@vercel/cli-support 65.14.0-snapshot-58343189052f → 65.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/{add-JLJGFCZ7.js → add-BYNKYST2.js} +1 -1
- package/dist/chunks/{add-LRMK5QWW.js → add-HXK3HUQG.js} +1 -1
- package/dist/chunks/{add-7VBB23MV.js → add-WTK2AFMX.js} +1 -1
- package/dist/chunks/{alerts-EQJMTJQA.js → alerts-XAOLRZK3.js} +1 -1
- package/dist/chunks/{build-NJL64KSO.js → build-BXCATM4H.js} +1 -1
- package/dist/chunks/{chunk-4IBYX357.js → chunk-22FAXGPD.js} +1 -1
- package/dist/chunks/{chunk-VSACZDAY.js → chunk-25W3CLDF.js} +1 -1
- package/dist/chunks/{chunk-M5CGBE5L.js → chunk-2CMY3JXZ.js} +1 -1
- package/dist/chunks/{chunk-HGUACMN4.js → chunk-2SVS5PWL.js} +1 -1
- package/dist/chunks/{chunk-HTHKABSH.js → chunk-3G6TOS6I.js} +1 -1
- package/dist/chunks/{chunk-AIPMDZLK.js → chunk-3N64YUGR.js} +1 -1
- package/dist/chunks/{chunk-UAZNHU74.js → chunk-4JPTCTBV.js} +1 -1
- package/dist/chunks/{chunk-SHSFYZ4U.js → chunk-4L6SITE4.js} +1 -1
- package/dist/chunks/{chunk-G2GT5LX5.js → chunk-4TD2KH46.js} +1 -1
- package/dist/chunks/{chunk-KG7ZKE45.js → chunk-5OOWE5CD.js} +1 -1
- package/dist/chunks/{chunk-WWEBHZS3.js → chunk-623OWG6A.js} +1 -1
- package/dist/chunks/{chunk-HCY7Y6J2.js → chunk-6CHTRMWQ.js} +1 -1
- package/dist/chunks/{chunk-QM3VWDGF.js → chunk-6FP3V45O.js} +1 -1
- package/dist/chunks/{chunk-7V23YG23.js → chunk-76FG2WPQ.js} +2 -2
- package/dist/chunks/{chunk-734OZCXO.js → chunk-7DT2GH67.js} +1 -1
- package/dist/chunks/{chunk-W6IPVM2N.js → chunk-A5UV4EAX.js} +1 -1
- package/dist/chunks/{chunk-4B7OXZG2.js → chunk-AAD3PR73.js} +1 -1
- package/dist/chunks/{chunk-DMELCYK6.js → chunk-AII372TC.js} +1 -1
- package/dist/chunks/{chunk-UBTGS2RE.js → chunk-B7SLQSME.js} +1 -1
- package/dist/chunks/{chunk-UXCP5URV.js → chunk-BJBJYWAJ.js} +1 -1
- package/dist/chunks/{chunk-IKY53Y7P.js → chunk-BSCJRQ3E.js} +1 -1
- package/dist/chunks/{chunk-AWJDH3ED.js → chunk-D4URLIDE.js} +1 -1
- package/dist/chunks/{chunk-E2HEHX2N.js → chunk-DMPPORR6.js} +2 -2
- package/dist/chunks/{chunk-N47KDNRV.js → chunk-DRXBDUAL.js} +1 -1
- package/dist/chunks/{chunk-HJLELUUM.js → chunk-E3E7SPFO.js} +1 -1
- package/dist/chunks/{chunk-CWJK3INE.js → chunk-E7T3YJRB.js} +1 -1
- package/dist/chunks/{chunk-BIYPQ3BS.js → chunk-EWHM5VFZ.js} +1 -1
- package/dist/chunks/{chunk-NBEBUXPR.js → chunk-FM4UZVFU.js} +2 -2
- package/dist/chunks/{chunk-M3N5SVDZ.js → chunk-FT5IZURV.js} +1 -1
- package/dist/chunks/{chunk-7Y77ESSJ.js → chunk-HDUZSFTK.js} +7 -7
- package/dist/chunks/{chunk-A27A3GJT.js → chunk-HFQ5T6HP.js} +1 -1
- package/dist/chunks/{chunk-W24HH4HP.js → chunk-HNLLL52N.js} +1 -1
- package/dist/chunks/{chunk-HNKTI4JA.js → chunk-HWUQVJIJ.js} +1 -1
- package/dist/chunks/chunk-IRNQJ6ZX.js +11 -0
- package/dist/chunks/{chunk-2FA4O2W3.js → chunk-IWFB7TGB.js} +1 -1
- package/dist/chunks/chunk-JLURS22G.js +7 -0
- package/dist/chunks/{chunk-23WWVXMH.js → chunk-JR3732RL.js} +1 -1
- package/dist/chunks/{chunk-QO5A4L5Q.js → chunk-JXLJZBJK.js} +1 -1
- package/dist/chunks/{chunk-HMTCRGJM.js → chunk-K5Z2NE3P.js} +1 -1
- package/dist/chunks/chunk-KHXWKYEZ.js +10 -0
- package/dist/chunks/{chunk-EABTHRPH.js → chunk-LRBJZNET.js} +1 -1
- package/dist/chunks/{chunk-EFYURJUO.js → chunk-MBEYI5HF.js} +1 -1
- package/dist/chunks/chunk-MGFM2KHC.js +11 -0
- package/dist/chunks/{chunk-RCLABQUS.js → chunk-MVOMOVK3.js} +1 -1
- package/dist/chunks/{chunk-OHBXFVKO.js → chunk-N56EMHCO.js} +1 -1
- package/dist/chunks/{chunk-H4GFL43V.js → chunk-NNHPXHOT.js} +1 -1
- package/dist/chunks/{chunk-HLZGUPEL.js → chunk-NR2JDEYD.js} +1 -1
- package/dist/chunks/chunk-P3JKE7TX.js +14 -0
- package/dist/chunks/chunk-PLGG2AWX.js +10 -0
- package/dist/chunks/chunk-PURYFV4L.js +7 -0
- package/dist/chunks/chunk-QEMYZTK7.js +7 -0
- package/dist/chunks/{chunk-LAVEAX6B.js → chunk-QHR6TD34.js} +1 -1
- package/dist/chunks/{chunk-CO4GCNXS.js → chunk-QTTJMXKJ.js} +1 -1
- package/dist/chunks/{chunk-BRRBZKWU.js → chunk-QU4WGUNK.js} +1 -1
- package/dist/chunks/{chunk-6FMXB6C4.js → chunk-QUAIU6FH.js} +1 -1
- package/dist/chunks/{chunk-OP3WRFB3.js → chunk-RD45QAHF.js} +1 -1
- package/dist/chunks/{chunk-DH5CSK6L.js → chunk-RJJYX4RA.js} +1 -1
- package/dist/chunks/{chunk-5QM74XJT.js → chunk-SAPTIA7Q.js} +1 -1
- package/dist/chunks/{chunk-7D2S3IK5.js → chunk-SJU4QJVF.js} +1 -1
- package/dist/chunks/chunk-T7GKQYWA.js +11 -0
- package/dist/chunks/chunk-TABMJZVW.js +9 -0
- package/dist/chunks/{chunk-BP6MSUB5.js → chunk-TEHLABJO.js} +1 -1
- package/dist/chunks/{chunk-C6N4K7XG.js → chunk-TF5BOGQN.js} +1 -1
- package/dist/chunks/{chunk-DQZI7WKX.js → chunk-TPKFVYL5.js} +2 -2
- package/dist/chunks/{chunk-HC43UL4S.js → chunk-TRGD2PHX.js} +1 -1
- package/dist/chunks/{chunk-SEGHMSYJ.js → chunk-UKBMDOUD.js} +1 -1
- package/dist/chunks/{chunk-DVXQXQRU.js → chunk-V4AZABH6.js} +1 -1
- package/dist/chunks/{chunk-R7UOJD3C.js → chunk-VTM6RPYS.js} +1 -1
- package/dist/chunks/{chunk-2GMYNAY3.js → chunk-WAWNYFSK.js} +1 -1
- package/dist/chunks/{chunk-5TQ7JRZW.js → chunk-WE5MHW2O.js} +1 -1
- package/dist/chunks/{chunk-JGJMCE72.js → chunk-WFAY2HPY.js} +1 -1
- package/dist/chunks/{chunk-7SDEJTAN.js → chunk-WFH24UO3.js} +1 -1
- package/dist/chunks/{chunk-IBZRULSM.js → chunk-WKFLDUTU.js} +1 -1
- package/dist/chunks/{chunk-CAFX72W3.js → chunk-Y6PC5E6Y.js} +1 -1
- package/dist/chunks/{chunk-GQTX2BPQ.js → chunk-Z3IAHGBR.js} +1 -1
- package/dist/chunks/{chunk-RPEQ4P26.js → chunk-ZMT7EYYL.js} +1 -1
- package/dist/chunks/{chunk-OGUA7JKD.js → chunk-ZP36CA3U.js} +1 -1
- package/dist/chunks/{chunk-5RYXL7LX.js → chunk-ZRHHEWGW.js} +1 -1
- package/dist/chunks/{chunk-QTQTKTKE.js → chunk-ZZTIGQXP.js} +1 -1
- package/dist/chunks/{clear-7PMLUHMK.js → clear-IVHCV4EA.js} +1 -1
- package/dist/chunks/{compile-vercel-config-NGP5R3IB.js → compile-vercel-config-PYYVTC3B.js} +1 -1
- package/dist/chunks/{config-DA4FRAKP.js → config-JUMF25FF.js} +1 -1
- package/dist/chunks/{config-HNGTLXET.js → config-XH62NJX7.js} +1 -1
- package/dist/chunks/{contract-V6GTRWBA.js → contract-BLBTK32L.js} +1 -1
- package/dist/chunks/{delete-FACIVOH6.js → delete-6FYWPVDH.js} +1 -1
- package/dist/chunks/{delete-LKEFYMAR.js → delete-PVH4423M.js} +1 -1
- package/dist/chunks/{describe-QLL6DJCK.js → describe-RNFQJQD5.js} +1 -1
- package/dist/chunks/{detect-services-F5KODVVW.js → detect-services-25NRRPII.js} +1 -1
- package/dist/chunks/{disable-ZCI25EGS.js → disable-HOKABZ7L.js} +1 -1
- package/dist/chunks/{discard-IP27EWY4.js → discard-TLBZGTGN.js} +1 -1
- package/dist/chunks/{edit-HI4YJ4FG.js → edit-HSJ4FSZQ.js} +1 -1
- package/dist/chunks/{edit-AISJBXKS.js → edit-NNIE7NNF.js} +1 -1
- package/dist/chunks/{enable-LUPCBCYI.js → enable-TY6QUZWZ.js} +1 -1
- package/dist/chunks/{export-36FICQA7.js → export-TVJDXCZA.js} +1 -1
- package/dist/chunks/{future-546NQS33.js → future-OELW62EE.js} +1 -1
- package/dist/chunks/{generate-cert-for-deploy-EF6ELZWG.js → generate-cert-for-deploy-HBBZE5NA.js} +1 -1
- package/dist/chunks/{image-GH4NIBKU.js → image-NFARXO3R.js} +1 -1
- package/dist/chunks/{import-builders-JJVY7J2Q.js → import-builders-ZEJEFXAX.js} +1 -1
- package/dist/chunks/{inspect-VTYZFMW4.js → inspect-4RQLEUGZ.js} +1 -1
- package/dist/chunks/{inspect-SZ5FMHGQ.js → inspect-H6LSGCYS.js} +1 -1
- package/dist/chunks/inspect-HXE2UT6Z.js +8 -0
- package/dist/chunks/{inspect-N4SAE3QX.js → inspect-OCHE3DVA.js} +1 -1
- package/dist/chunks/{inspect-WKRFDZI4.js → inspect-RMP4AAQR.js} +1 -1
- package/dist/chunks/{inspect-DCOPF4PI.js → inspect-UTYZYPSK.js} +1 -1
- package/dist/chunks/{list-2VXOBK4U.js → list-6SRUT2BU.js} +1 -1
- package/dist/chunks/{list-46KZJVIK.js → list-WEGUICE6.js} +1 -1
- package/dist/chunks/list-YYHMAGMG.js +8 -0
- package/dist/chunks/{list-JTDKLFDP.js → list-ZXY2AMNN.js} +1 -1
- package/dist/chunks/{login-HBSDXKH2.js → login-DBKNZ6RP.js} +1 -1
- package/dist/chunks/{login-2LQWDDOF.js → login-XNS4A4L7.js} +1 -1
- package/dist/chunks/{logs-CTY6IAN5.js → logs-F7AR7Y5S.js} +1 -1
- package/dist/chunks/{ls-QD3PNWDR.js → ls-7JX4KZXU.js} +1 -1
- package/dist/chunks/{ls-SI3QRM2I.js → ls-7Z5WT5OK.js} +1 -1
- package/dist/chunks/{ls-6DYBX4GC.js → ls-CKOBQXUR.js} +1 -1
- package/dist/chunks/{ls-MMPORI4R.js → ls-GGIZNTY4.js} +1 -1
- package/dist/chunks/{ls-KFAQOHOX.js → ls-ISBLA37G.js} +1 -1
- package/dist/chunks/{ls-LJF2LSLA.js → ls-PTRVCVXJ.js} +1 -1
- package/dist/chunks/{ls-ZLEN3ZO7.js → ls-YC4IWYN7.js} +1 -1
- package/dist/chunks/{migrate-experimental-services-JXGI5ERS.js → migrate-experimental-services-XHPJAZFK.js} +1 -1
- package/dist/chunks/{mutate-L5EEHZV3.js → mutate-AQGXSJED.js} +1 -1
- package/dist/chunks/native-self-update-JDTL3IBF.js +7 -0
- package/dist/chunks/{notifications-I5ZFUDU2.js → notifications-BTVI6EIG.js} +1 -1
- package/dist/chunks/{open-ARMO4SQT.js → open-TZLOIAGJ.js} +1 -1
- package/dist/chunks/{openapi-6CANSNLW.js → openapi-D66WN4LW.js} +1 -1
- package/dist/chunks/{permissions-FS23KRL4.js → permissions-JGQHHLCP.js} +1 -1
- package/dist/chunks/{plugin-offer-C6QFI72K.js → plugin-offer-OQF2T2HP.js} +1 -1
- package/dist/chunks/{prompt-missing-credentials-RSD7B4NO.js → prompt-missing-credentials-ATEAZE3Q.js} +1 -1
- package/dist/chunks/{publish-6LKKS6ZL.js → publish-E2QCYVQM.js} +1 -1
- package/dist/chunks/{pull-HEB7QVIB.js → pull-YEEZTBZB.js} +1 -1
- package/dist/chunks/{purchase-domain-if-available-WGJXPJIG.js → purchase-domain-if-available-66DVKBZ5.js} +1 -1
- package/dist/chunks/{push-6XKANZK3.js → push-WT2R2MH2.js} +1 -1
- package/dist/chunks/{query-IFIYEGHG.js → query-XKNAII7Y.js} +1 -1
- package/dist/chunks/{reauthenticate-VNZG2JMN.js → reauthenticate-JONKFLTL.js} +1 -1
- package/dist/chunks/remove-PLSYF2ZB.js +9 -0
- package/dist/chunks/{reorder-AL2IWWMR.js → reorder-4UCOO5AJ.js} +1 -1
- package/dist/chunks/{reply-T2ZFBMPR.js → reply-B2OCHHMQ.js} +1 -1
- package/dist/chunks/{resolve-RL6EOXDW.js → resolve-PU5UR7JC.js} +1 -1
- package/dist/chunks/{resolve-agent-team-UGH7UCM3.js → resolve-agent-team-FFV2K42Z.js} +1 -1
- package/dist/chunks/{restore-TDTSKPKF.js → restore-7AWVT7RT.js} +1 -1
- package/dist/chunks/{rm-C2TNO2RN.js → rm-523X3JI3.js} +1 -1
- package/dist/chunks/{rm-BOHIZVAV.js → rm-DTGRJLGC.js} +1 -1
- package/dist/chunks/{rm-JCLRNRHL.js → rm-GHF2AEO6.js} +1 -1
- package/dist/chunks/{rm-5TBWBMR2.js → rm-GVFFKCYP.js} +1 -1
- package/dist/chunks/{rm-NAMCINZD.js → rm-QXPFFK7Z.js} +1 -1
- package/dist/chunks/{rule-inspect-OJ2FSCU3.js → rule-inspect-N3B2737B.js} +1 -1
- package/dist/chunks/{schema-ABMGAMO6.js → schema-DULOJDLJ.js} +1 -1
- package/dist/chunks/{schema-6OUXJQXH.js → schema-KZ3NXHDV.js} +1 -1
- package/dist/chunks/{select-org-IV5WEGY3.js → select-org-RK3NJUXQ.js} +1 -1
- package/dist/chunks/{set-R3K53PBC.js → set-CYNAACFX.js} +1 -1
- package/dist/chunks/set-UDHZOYCP.js +8 -0
- package/dist/chunks/{setup-and-link-TFXGCHRR.js → setup-and-link-BUARMJER.js} +1 -1
- package/dist/chunks/{skills-EJ5TIFF2.js → skills-TZOXQHF6.js} +1 -1
- package/dist/chunks/{tags-5MYGTTAT.js → tags-FHC6EMQ2.js} +1 -1
- package/dist/chunks/{types-TRWJIRLG.js → types-5YOSC6SX.js} +1 -1
- package/dist/chunks/{update-RG3KBMS6.js → update-S6EDQLRE.js} +1 -1
- package/dist/chunks/{usage-Z6V3PUWR.js → usage-OZY35PJU.js} +1 -1
- package/dist/commands/build/index.js +1 -1
- package/dist/commands/deploy/index.js +18 -25
- package/dist/commands/dev/index.js +2 -2
- package/dist/commands/env/index.js +1 -1
- package/dist/commands/link/index.js +1 -1
- package/dist/commands/list/index.js +1 -1
- package/dist/commands/project/index.js +1 -1
- package/dist/commands/tunnel/index.js +1 -1
- package/dist/commands-account.js +3 -3
- package/dist/commands-ai.js +2 -2
- package/dist/commands-blob.js +2 -2
- package/dist/commands-core.js +6 -6
- package/dist/commands-deployments.js +1 -1
- package/dist/commands-flags.js +1 -1
- package/dist/commands-integrations.js +29 -18
- package/dist/commands-observability.js +2 -2
- package/dist/commands-routing.js +3 -3
- package/dist/help.js +1 -1
- package/dist/index.js +5 -5
- package/dist/internal-build.js +1 -1
- package/dist/package.json +11 -11
- package/dist/root-help-commands.mjs +1 -1
- package/dist/version.mjs +1 -1
- package/package.json +16 -16
- package/dist/chunks/chunk-IVO4GEZ5.js +0 -11
- package/dist/chunks/chunk-MLC4X6EF.js +0 -11
- package/dist/chunks/chunk-NAY7J6CC.js +0 -7
- package/dist/chunks/chunk-OM7QMZHC.js +0 -10
- package/dist/chunks/chunk-Q4DKYKAV.js +0 -10
- package/dist/chunks/chunk-RAQ6EUNL.js +0 -7
- package/dist/chunks/chunk-YKFNYJ7H.js +0 -13
- package/dist/chunks/inspect-JH3GYOLK.js +0 -8
- package/dist/chunks/list-AHBYA3G2.js +0 -8
- package/dist/chunks/native-self-update-DWMEZE2I.js +0 -7
- package/dist/chunks/remove-6OHEH6H6.js +0 -9
- package/dist/chunks/set-Q2NXKDFC.js +0 -9
package/dist/commands-flags.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{FILTER_DEPRECATION_WARNING,alignTimeRangeToGranularity,canonicalResponseToMetricsResponse,createCanonicalMetricsRequest,usesODataSyntax}from"./chunks/chunk-C6N4K7XG.js";import{init_dist,prepareFlagsDefinitions}from"./chunks/chunk-OAM5NJCU.js";import{EncryptJWT,base64url_exports,jwtDecrypt}from"./chunks/chunk-S3L2OHPO.js";import{sanitizeForTerminal}from"./chunks/chunk-UUBPAYTG.js";import{require_fast_deep_equal}from"./chunks/chunk-MCRKBVZA.js";import{getLinkedFlagsProject,getProjectNameFromFlags}from"./chunks/chunk-W24HH4HP.js";import{parseSubcommandArguments,requireProjectContext}from"./chunks/chunk-5QM74XJT.js";import{computeGranularity,formatText,generateSparkline}from"./chunks/chunk-M5CGBE5L.js";import{OBSERVABILITY_METRICS_PATH,getApiIssues,getRollupColumnName,handleApiError}from"./chunks/chunk-DMELCYK6.js";import"./chunks/chunk-IVSSTHB6.js";import{require_dist}from"./chunks/chunk-JELLVPCM.js";import{readStdinText}from"./chunks/chunk-PSOVLGHP.js";import{require_raw_body}from"./chunks/chunk-XOETL6DB.js";import{findCommandShorthands}from"./chunks/chunk-4OO6TXBM.js";import{normalizeRepeatableStringFilters,outputError,validateIntegerRangeWithDefault,validateTimeBound,validateTimeOrder}from"./chunks/chunk-ZJNDLFZ7.js";import{effectsDigest,requireApproval}from"./chunks/chunk-5TQ7JRZW.js";import{resolveTimeRange}from"./chunks/chunk-D3M2JG5C.js";import{ellipsizeMiddle,truncateEnd}from"./chunks/chunk-TOTTVS5P.js";import"./chunks/chunk-DH5CSK6L.js";import"./chunks/chunk-RAQ6EUNL.js";import"./chunks/chunk-OP3WRFB3.js";import{formatDate}from"./chunks/chunk-HRR57QNP.js";import{formatTable}from"./chunks/chunk-YIOMTAUF.js";import{stamp_default}from"./chunks/chunk-A2RZZQEP.js";import"./chunks/chunk-Q7D7RGXM.js";import"./chunks/chunk-GZNDA6SV.js";import{resolveProjectContext}from"./chunks/chunk-SHSFYZ4U.js";import{STANDARD_ENVIRONMENTS}from"./chunks/chunk-7YKFF6CE.js";import{formatProject}from"./chunks/chunk-3UZE566G.js";import{require_open}from"./chunks/chunk-PVASGBEF.js";import"./chunks/chunk-IKY53Y7P.js";import{readOnOffOption}from"./chunks/chunk-CFQPIYKY.js";import{getCommandFlags}from"./chunks/chunk-XGTKHQTT.js";import{canPrompt,canPromptOnTerminal}from"./chunks/chunk-IQ7FPAI4.js";import"./chunks/chunk-PFD7LETF.js";import{getInvalidSubcommand}from"./chunks/chunk-TG2RCYTH.js";import{trackCreatedId}from"./chunks/chunk-YJNMDXEG.js";import{getRenamedOption,reportRenamedOptionError,withWarnings}from"./chunks/chunk-A27A3GJT.js";import{getSubcommand}from"./chunks/chunk-ETV3C2CV.js";import{printNextPageCommand}from"./chunks/chunk-MSJA64LL.js";import{table}from"./chunks/chunk-CJZE7647.js";import"./chunks/chunk-Y2FVJ7YO.js";import{FLAG_ATTRIBUTE_TYPES,FLAG_CONDITION_LIST_COMPARATORS,FLAG_CONDITION_RHS_OPTIONAL_COMPARATORS,FLAG_EVALUATIONS_DIMENSIONS,FLAG_EVALUATIONS_DIMENSION_NAMES,FLAG_EVALUATIONS_GRANULARITIES,alertsInspectSubcommand,alertsListSubcommand,alertsSubcommand,archiveSubcommand,attackModeDisableSubcommand,attackModeEnableSubcommand,attackModeSubcommand,botManagementSubcommand,cleanupSubcommand,commandsStructs,connectionsAddSubcommand,connectionsListSubcommand,connectionsRemoveSubcommand,connectionsSubcommand,createSubcommand6 as createSubcommand,datafileSubcommand,diffSubcommand,disableSubcommand2 as disableSubcommand,discardSubcommand,enableSubcommand2 as enableSubcommand,entitiesCreateSubcommand,entitiesListSubcommand,entitiesRemoveSubcommand,entitiesSubcommand,entitiesUpdateSubcommand,evaluationsSubcommand,feedbackCommand,firewallCommand,flagsCommand,formatFlagAttributeTypeList,formatFlagConditionComparator,formatFlagConditionComparatorList,getCommandAliases,getFlagAttributeType,inspectSubcommand9 as inspectSubcommand,ipBlocksBlockSubcommand,ipBlocksListSubcommand,ipBlocksSubcommand,ipBlocksUnblockSubcommand,isBucketingAttribute,isFlagAttributeType,isFlagEvaluationsDimension,isFlagEvaluationsGranularity,isTimestampAttributeType,labelsListSubcommand,labelsSubcommand,listSubcommand14 as listSubcommand,openSubcommand3 as openSubcommand,overrideSubcommand,overviewSubcommand,persistentActionsInspectSubcommand,persistentActionsListSubcommand,persistentActionsSubcommand,prepareSubcommand,publishSubcommand,removeSubcommand8 as removeSubcommand,rolloutSubcommand,rulesAddSubcommand2 as rulesAddSubcommand,rulesAddSubcommand3 as rulesAddSubcommand2,rulesDisableSubcommand,rulesEditSubcommand2 as rulesEditSubcommand,rulesEnableSubcommand,rulesInspectSubcommand,rulesListSubcommand2 as rulesListSubcommand,rulesListSubcommand3 as rulesListSubcommand2,rulesMoveSubcommand,rulesRemoveSubcommand2 as rulesRemoveSubcommand,rulesRemoveSubcommand3 as rulesRemoveSubcommand2,rulesReorderSubcommand,rulesSubcommand2 as rulesSubcommand,rulesSubcommand3 as rulesSubcommand2,rulesUpdateSubcommand,sdkKeysAddSubcommand,sdkKeysListSubcommand,sdkKeysRemoveSubcommand,sdkKeysSubcommand,segmentsCreateSubcommand,segmentsInspectSubcommand,segmentsListSubcommand,segmentsRemoveSubcommand,segmentsSubcommand,segmentsUpdateSubcommand,setSubcommand2 as setSubcommand,splitSubcommand,staleSubcommand,statusSubcommand,systemBypassAddSubcommand,systemBypassListSubcommand,systemBypassRemoveSubcommand,systemBypassSubcommand,systemMitigationsPauseSubcommand,systemMitigationsResumeSubcommand,systemMitigationsSubcommand,targetingEnableSubcommand,targetingSubcommand,targetsAddSubcommand,targetsListSubcommand,targetsRemoveSubcommand,targetsSubcommand,trafficInspectSubcommand,trafficListSubcommand,trafficSubcommand,unarchiveSubcommand,updateSubcommand5 as updateSubcommand,useTargetingSubcommand,versionsDiffSubcommand,versionsListSubcommand,versionsSubcommand}from"./chunks/chunk-DQZI7WKX.js";import"./chunks/chunk-2V6UURUN.js";import"./chunks/chunk-OKKG2FUS.js";import"./chunks/chunk-5L566FZB.js";import"./chunks/chunk-6737KAJP.js";import"./chunks/chunk-O3DAPRJ3.js";import"./chunks/chunk-UZQJQXGJ.js";import"./chunks/chunk-5YLKPSZI.js";import"./chunks/chunk-SNGM6NSO.js";import"./chunks/chunk-JVGENO2R.js";import"./chunks/chunk-SP6E7PHW.js";import"./chunks/chunk-OFOZ5DBA.js";import"./chunks/chunk-6Q2XEYCJ.js";import"./chunks/chunk-SEHERY6U.js";import"./chunks/chunk-2LOA3LC6.js";import"./chunks/chunk-E7CEQ2PO.js";import"./chunks/chunk-W25UARQV.js";import"./chunks/chunk-Z5FNUSWW.js";import"./chunks/chunk-ABSFPYM4.js";import"./chunks/chunk-YANOBY2G.js";import"./chunks/chunk-F7L5SXJM.js";import"./chunks/chunk-E56JZWPW.js";import"./chunks/chunk-GUSOYIW6.js";import"./chunks/chunk-JALVF3C2.js";import"./chunks/chunk-LC535OIW.js";import"./chunks/chunk-SQ76HIB6.js";import"./chunks/chunk-HR66URIC.js";import{printError}from"./chunks/chunk-RPEQ4P26.js";import{help}from"./chunks/chunk-6C5KUHQP.js";import{remoteText}from"./chunks/chunk-GLIQ4KNY.js";import{getScope}from"./chunks/chunk-UAZNHU74.js";import{TelemetryClient}from"./chunks/chunk-KDCODXVL.js";import"./chunks/chunk-NWGBDBZI.js";import{AGENT_REASON,AGENT_STATUS,buildCommandWithGlobalFlags,buildCommandWithYes,clientObservabilityPlanRecovery,getExitCodeForReason,outputAgentError,shouldEmitNonInteractiveCommandError,writeActionRequired,writeAgentError}from"./chunks/chunk-IVO4GEZ5.js";import"./chunks/chunk-OFZUWHZW.js";import{getProjectByNameOrId,isPromptCanceledError,sleep}from"./chunks/chunk-7Y77ESSJ.js";import{require_pluralize}from"./chunks/chunk-4HR3I3ML.js";import{formatAlignedLabel,printAlignedLabel}from"./chunks/chunk-M7FED5YP.js";import{ua_default}from"./chunks/chunk-MTZYPCZ7.js";import"./chunks/chunk-D6REP5QQ.js";import"./chunks/chunk-UXRRYYSD.js";import{parseArguments}from"./chunks/chunk-NHB43235.js";import{teamCache}from"./chunks/chunk-2VBFQZ72.js";import{warnDeprecatedInput,warnDeprecatedOption,warnDeprecatedSubcommand}from"./chunks/chunk-6GKP6VUF.js";import"./chunks/chunk-LUX4PBJL.js";import"./chunks/chunk-OPORM35X.js";import"./chunks/chunk-FBYA6LLM.js";import{fetch,toNodeReadable}from"./chunks/chunk-MY4MONOH.js";import{require_ms}from"./chunks/chunk-MXTC4ZAQ.js";import"./chunks/chunk-4NTBYNFR.js";import"./chunks/chunk-4SAVH3H7.js";import{ProjectNotFound,isAPIError}from"./chunks/chunk-GOI2VVI7.js";import{cmd,getCommandName,getCommandNamePlain,packageName}from"./chunks/chunk-B4KA3ZH2.js";import{pkg_default}from"./chunks/chunk-BOJDM3O7.js";import{output_manager_default,recordCliError}from"./chunks/chunk-AP6DZGTK.js";import"./chunks/chunk-BLUPZPAS.js";import"./chunks/chunk-AW33SRYY.js";import"./chunks/chunk-5MDNVAE6.js";import"./chunks/chunk-OCR5CRTH.js";import"./chunks/chunk-7EJQLVWX.js";import"./chunks/chunk-SCV7XEEO.js";import"./chunks/chunk-MCYG7CCE.js";import"./chunks/chunk-YHPPP3SF.js";import"./chunks/chunk-24SIHFEW.js";import{SDK_KEY_PATTERN,getFlagsSpecification,getGlobalFlagsFromArgs,getProjectOptionFromArgs,quoteArg}from"./chunks/chunk-EZVNGJN5.js";import"./chunks/chunk-2BKALEOP.js";import{require_source}from"./chunks/chunk-NB2WLB3J.js";import"./chunks/chunk-ISWW3DKF.js";import"./chunks/chunk-BRQUZ5NC.js";import"./chunks/chunk-BULSRTQE.js";import{__toESM}from"./chunks/chunk-BZENIQ7N.js";var import_raw_body=__toESM(require_raw_body(),1);var FeedbackTelemetryClient=class extends TelemetryClient{trackCliArgumentNote(note){note!==void 0&&this.trackCliArgument({arg:"note",value:this.redactedValue})}trackCliOptionField(fields){fields?.length&&this.trackCliOption({option:"field",value:this.redactedValue})}};var FEEDBACK_URL="https://vercel.com/api/feedback/cli",MAX_FEEDBACK_BYTES=1024*1024,FETCH_TIMEOUT_MS=1e4;async function feedback(client){let fail=(reason,message,code)=>(recordCliError({code:reason}),output_manager_default.error(message),code),parsed;try{parsed=parseArguments(client.argv.slice(2),getFlagsSpecification(feedbackCommand.options))}catch{return fail(AGENT_REASON.INVALID_ARGUMENTS,"Invalid feedback arguments. Run vercel feedback --help for usage.",2)}let notes=parsed.args.slice(1),fields=parsed.flags["--field"]??[];if(notes.length===0&&fields.length===0)return client.stdout.write(help(feedbackCommand,{stream:client.stdout,columns:client.stdout.columns??client.stderr.columns})),0;if(notes.length>1)return fail(AGENT_REASON.INVALID_ARGUMENTS,"Pass one note. Quote notes containing spaces, or use vercel feedback - to read stdin.",2);let telemetry=new FeedbackTelemetryClient({opts:{store:client.telemetryEventStore}});telemetry.trackCliArgumentNote(notes[0]),telemetry.trackCliOptionField(fields);let data=Object.create(null);for(let field of fields){let separator=field.indexOf("="),key=field.slice(0,separator).trim();if(separator<1||key==="")return fail(AGENT_REASON.INVALID_ARGUMENTS,"Each --field needs a non-empty key followed by =value. Example: vercel feedback --field topic=deploy.",2);data[key]=field.slice(separator+1)}if(notes.length&&Object.hasOwn(data,"note"))return fail(AGENT_REASON.INVALID_ARGUMENTS,"Provide the note once: use a positional note or --field note=..., rather than both.",2);if(notes[0]==="-"){if(client.stdin.isTTY)return fail(AGENT_REASON.INVALID_ARGUMENTS,"No input was piped to stdin. Pipe a note with: cat notes.md | vercel feedback -",2);try{data.note=await readStdinText(client.stdin,MAX_FEEDBACK_BYTES)}catch(error){return error.type==="entity.too.large"?fail(AGENT_REASON.INVALID_ARGUMENTS,"Feedback is too large. Keep the complete submission below 1 MiB.",2):fail(AGENT_REASON.STDIN_ERROR,"Could not read the feedback note from stdin. Check the input pipe and try again.",1)}}else notes[0]!==void 0&&(data.note=notes[0]);for(let key of Object.keys(data))data[key].trim()||delete data[key];if(!Object.keys(data).length)return fail(AGENT_REASON.INVALID_ARGUMENTS,"Provide a note or at least one named field. Run vercel feedback --help for examples.",2);let canSendTelemetry=client.telemetryEventStore?.enabled??!1,body=JSON.stringify({metadata:canSendTelemetry?{agent:client.isAgent,agent_name:client.isAgent?client.agentName:void 0,cli_version:pkg_default.version,operating_system:process.platform,team_id:client.config.currentTeam??null,user_id:client.authConfig.userId??null,invocation_id:client.telemetryEventStore?.currentInvocationId??null,session_id:client.telemetryEventStore?.currentSessionId??null}:null,data});if(Buffer.byteLength(body)>MAX_FEEDBACK_BYTES)return fail(AGENT_REASON.INVALID_ARGUMENTS,"Feedback is too large. Keep the complete submission below 1 MiB.",2);let controller=new AbortController,timeout=setTimeout(()=>controller.abort(),FETCH_TIMEOUT_MS);timeout.unref?.();try{let response=await fetch(FEEDBACK_URL,{method:"POST",headers:{"content-type":"application/json","user-agent":ua_default},body,redirect:"manual",signal:controller.signal});if(!response.ok)return await response.body?.cancel(),fail(response.status===429?AGENT_REASON.RATE_LIMITED:AGENT_REASON.API_ERROR,`Feedback could not be submitted (HTTP ${response.status}). Try again later.`,1);let responseBody=toNodeReadable(response.body);return JSON.parse(await(0,import_raw_body.default)(responseBody,{limit:64*1024,encoding:"utf8"}).finally(()=>responseBody.destroy()))?.success!==!0?fail(AGENT_REASON.UNKNOWN_OUTCOME,"Could not confirm that Vercel accepted the feedback. It may have been submitted; no automatic retry was made.",1):(client.stdout.write(`Feedback sent
|
|
7
|
+
import{FILTER_DEPRECATION_WARNING,alignTimeRangeToGranularity,canonicalResponseToMetricsResponse,createCanonicalMetricsRequest,usesODataSyntax}from"./chunks/chunk-TF5BOGQN.js";import{init_dist,prepareFlagsDefinitions}from"./chunks/chunk-OAM5NJCU.js";import{EncryptJWT,base64url_exports,jwtDecrypt}from"./chunks/chunk-S3L2OHPO.js";import{sanitizeForTerminal}from"./chunks/chunk-UUBPAYTG.js";import{require_fast_deep_equal}from"./chunks/chunk-MCRKBVZA.js";import{getLinkedFlagsProject,getProjectNameFromFlags}from"./chunks/chunk-HNLLL52N.js";import{parseSubcommandArguments,requireProjectContext}from"./chunks/chunk-SAPTIA7Q.js";import{computeGranularity,formatText,generateSparkline}from"./chunks/chunk-2CMY3JXZ.js";import{OBSERVABILITY_METRICS_PATH,getApiIssues,getRollupColumnName,handleApiError}from"./chunks/chunk-AII372TC.js";import"./chunks/chunk-IVSSTHB6.js";import{require_dist}from"./chunks/chunk-JELLVPCM.js";import{readStdinText}from"./chunks/chunk-PSOVLGHP.js";import{require_raw_body}from"./chunks/chunk-XOETL6DB.js";import{findCommandShorthands}from"./chunks/chunk-4OO6TXBM.js";import{normalizeRepeatableStringFilters,outputError,validateIntegerRangeWithDefault,validateTimeBound,validateTimeOrder}from"./chunks/chunk-ZJNDLFZ7.js";import{effectsDigest,requireApproval}from"./chunks/chunk-WE5MHW2O.js";import{resolveTimeRange}from"./chunks/chunk-D3M2JG5C.js";import{ellipsizeMiddle,truncateEnd}from"./chunks/chunk-TOTTVS5P.js";import"./chunks/chunk-RJJYX4RA.js";import"./chunks/chunk-JLURS22G.js";import"./chunks/chunk-RD45QAHF.js";import{formatDate}from"./chunks/chunk-HRR57QNP.js";import{formatTable}from"./chunks/chunk-YIOMTAUF.js";import{stamp_default}from"./chunks/chunk-A2RZZQEP.js";import"./chunks/chunk-Q7D7RGXM.js";import"./chunks/chunk-GZNDA6SV.js";import{resolveProjectContext}from"./chunks/chunk-4L6SITE4.js";import{STANDARD_ENVIRONMENTS}from"./chunks/chunk-7YKFF6CE.js";import{formatProject}from"./chunks/chunk-3UZE566G.js";import{require_open}from"./chunks/chunk-PVASGBEF.js";import"./chunks/chunk-BSCJRQ3E.js";import{readOnOffOption}from"./chunks/chunk-CFQPIYKY.js";import{getCommandFlags}from"./chunks/chunk-XGTKHQTT.js";import{canPrompt,canPromptOnTerminal}from"./chunks/chunk-IQ7FPAI4.js";import"./chunks/chunk-PFD7LETF.js";import{getInvalidSubcommand}from"./chunks/chunk-TG2RCYTH.js";import{trackCreatedId}from"./chunks/chunk-YJNMDXEG.js";import{getRenamedOption,reportRenamedOptionError,withWarnings}from"./chunks/chunk-HFQ5T6HP.js";import{getSubcommand}from"./chunks/chunk-ETV3C2CV.js";import{printNextPageCommand}from"./chunks/chunk-MSJA64LL.js";import{table}from"./chunks/chunk-CJZE7647.js";import"./chunks/chunk-Y2FVJ7YO.js";import{FLAG_ATTRIBUTE_TYPES,FLAG_CONDITION_LIST_COMPARATORS,FLAG_CONDITION_RHS_OPTIONAL_COMPARATORS,FLAG_EVALUATIONS_DIMENSIONS,FLAG_EVALUATIONS_DIMENSION_NAMES,FLAG_EVALUATIONS_GRANULARITIES,alertsInspectSubcommand,alertsListSubcommand,alertsSubcommand,archiveSubcommand,attackModeDisableSubcommand,attackModeEnableSubcommand,attackModeSubcommand,botManagementSubcommand,cleanupSubcommand,commandsStructs,connectionsAddSubcommand,connectionsListSubcommand,connectionsRemoveSubcommand,connectionsSubcommand,createSubcommand6 as createSubcommand,datafileSubcommand,diffSubcommand,disableSubcommand2 as disableSubcommand,discardSubcommand,enableSubcommand2 as enableSubcommand,entitiesCreateSubcommand,entitiesListSubcommand,entitiesRemoveSubcommand,entitiesSubcommand,entitiesUpdateSubcommand,evaluationsSubcommand,feedbackCommand,firewallCommand,flagsCommand,formatFlagAttributeTypeList,formatFlagConditionComparator,formatFlagConditionComparatorList,getCommandAliases,getFlagAttributeType,inspectSubcommand9 as inspectSubcommand,ipBlocksBlockSubcommand,ipBlocksListSubcommand,ipBlocksSubcommand,ipBlocksUnblockSubcommand,isBucketingAttribute,isFlagAttributeType,isFlagEvaluationsDimension,isFlagEvaluationsGranularity,isTimestampAttributeType,labelsListSubcommand,labelsSubcommand,listSubcommand14 as listSubcommand,openSubcommand3 as openSubcommand,overrideSubcommand,overviewSubcommand,persistentActionsInspectSubcommand,persistentActionsListSubcommand,persistentActionsSubcommand,prepareSubcommand,publishSubcommand,removeSubcommand8 as removeSubcommand,rolloutSubcommand,rulesAddSubcommand2 as rulesAddSubcommand,rulesAddSubcommand3 as rulesAddSubcommand2,rulesDisableSubcommand,rulesEditSubcommand2 as rulesEditSubcommand,rulesEnableSubcommand,rulesInspectSubcommand,rulesListSubcommand2 as rulesListSubcommand,rulesListSubcommand3 as rulesListSubcommand2,rulesMoveSubcommand,rulesRemoveSubcommand2 as rulesRemoveSubcommand,rulesRemoveSubcommand3 as rulesRemoveSubcommand2,rulesReorderSubcommand,rulesSubcommand2 as rulesSubcommand,rulesSubcommand3 as rulesSubcommand2,rulesUpdateSubcommand,sdkKeysAddSubcommand,sdkKeysListSubcommand,sdkKeysRemoveSubcommand,sdkKeysSubcommand,segmentsCreateSubcommand,segmentsInspectSubcommand,segmentsListSubcommand,segmentsRemoveSubcommand,segmentsSubcommand,segmentsUpdateSubcommand,setSubcommand2 as setSubcommand,splitSubcommand,staleSubcommand,statusSubcommand,systemBypassAddSubcommand,systemBypassListSubcommand,systemBypassRemoveSubcommand,systemBypassSubcommand,systemMitigationsPauseSubcommand,systemMitigationsResumeSubcommand,systemMitigationsSubcommand,targetingEnableSubcommand,targetingSubcommand,targetsAddSubcommand,targetsListSubcommand,targetsRemoveSubcommand,targetsSubcommand,trafficInspectSubcommand,trafficListSubcommand,trafficSubcommand,unarchiveSubcommand,updateSubcommand5 as updateSubcommand,useTargetingSubcommand,versionsDiffSubcommand,versionsListSubcommand,versionsSubcommand}from"./chunks/chunk-TPKFVYL5.js";import"./chunks/chunk-2V6UURUN.js";import"./chunks/chunk-OKKG2FUS.js";import"./chunks/chunk-5L566FZB.js";import"./chunks/chunk-6737KAJP.js";import"./chunks/chunk-O3DAPRJ3.js";import"./chunks/chunk-UZQJQXGJ.js";import"./chunks/chunk-5YLKPSZI.js";import"./chunks/chunk-SNGM6NSO.js";import"./chunks/chunk-JVGENO2R.js";import"./chunks/chunk-SP6E7PHW.js";import"./chunks/chunk-OFOZ5DBA.js";import"./chunks/chunk-6Q2XEYCJ.js";import"./chunks/chunk-SEHERY6U.js";import"./chunks/chunk-2LOA3LC6.js";import"./chunks/chunk-E7CEQ2PO.js";import"./chunks/chunk-W25UARQV.js";import"./chunks/chunk-Z5FNUSWW.js";import"./chunks/chunk-ABSFPYM4.js";import"./chunks/chunk-YANOBY2G.js";import"./chunks/chunk-F7L5SXJM.js";import"./chunks/chunk-E56JZWPW.js";import"./chunks/chunk-GUSOYIW6.js";import"./chunks/chunk-JALVF3C2.js";import"./chunks/chunk-LC535OIW.js";import"./chunks/chunk-SQ76HIB6.js";import"./chunks/chunk-HR66URIC.js";import{printError}from"./chunks/chunk-ZMT7EYYL.js";import{help}from"./chunks/chunk-6C5KUHQP.js";import{remoteText}from"./chunks/chunk-GLIQ4KNY.js";import{getScope}from"./chunks/chunk-4JPTCTBV.js";import{TelemetryClient}from"./chunks/chunk-KDCODXVL.js";import"./chunks/chunk-NWGBDBZI.js";import{AGENT_REASON,AGENT_STATUS,buildCommandWithGlobalFlags,buildCommandWithYes,clientObservabilityPlanRecovery,getExitCodeForReason,outputAgentError,shouldEmitNonInteractiveCommandError,writeActionRequired,writeAgentError}from"./chunks/chunk-IRNQJ6ZX.js";import"./chunks/chunk-OFZUWHZW.js";import{getProjectByNameOrId,isPromptCanceledError,sleep}from"./chunks/chunk-HDUZSFTK.js";import{require_pluralize}from"./chunks/chunk-4HR3I3ML.js";import{formatAlignedLabel,printAlignedLabel}from"./chunks/chunk-M7FED5YP.js";import{ua_default}from"./chunks/chunk-MTZYPCZ7.js";import"./chunks/chunk-D6REP5QQ.js";import"./chunks/chunk-UXRRYYSD.js";import{parseArguments}from"./chunks/chunk-NHB43235.js";import{teamCache}from"./chunks/chunk-2VBFQZ72.js";import{warnDeprecatedInput,warnDeprecatedOption,warnDeprecatedSubcommand}from"./chunks/chunk-6GKP6VUF.js";import"./chunks/chunk-LUX4PBJL.js";import"./chunks/chunk-OPORM35X.js";import"./chunks/chunk-FBYA6LLM.js";import{fetch,toNodeReadable}from"./chunks/chunk-MY4MONOH.js";import{require_ms}from"./chunks/chunk-MXTC4ZAQ.js";import"./chunks/chunk-4NTBYNFR.js";import"./chunks/chunk-4SAVH3H7.js";import{ProjectNotFound,isAPIError}from"./chunks/chunk-GOI2VVI7.js";import{cmd,getCommandName,getCommandNamePlain,packageName}from"./chunks/chunk-B4KA3ZH2.js";import{pkg_default}from"./chunks/chunk-BOJDM3O7.js";import{output_manager_default,recordCliError}from"./chunks/chunk-AP6DZGTK.js";import"./chunks/chunk-BLUPZPAS.js";import"./chunks/chunk-AW33SRYY.js";import"./chunks/chunk-5MDNVAE6.js";import"./chunks/chunk-OCR5CRTH.js";import"./chunks/chunk-7EJQLVWX.js";import"./chunks/chunk-SCV7XEEO.js";import"./chunks/chunk-MCYG7CCE.js";import"./chunks/chunk-YHPPP3SF.js";import"./chunks/chunk-24SIHFEW.js";import{SDK_KEY_PATTERN,getFlagsSpecification,getGlobalFlagsFromArgs,getProjectOptionFromArgs,quoteArg}from"./chunks/chunk-EZVNGJN5.js";import"./chunks/chunk-2BKALEOP.js";import{require_source}from"./chunks/chunk-NB2WLB3J.js";import"./chunks/chunk-ISWW3DKF.js";import"./chunks/chunk-BRQUZ5NC.js";import"./chunks/chunk-BULSRTQE.js";import{__toESM}from"./chunks/chunk-BZENIQ7N.js";var import_raw_body=__toESM(require_raw_body(),1);var FeedbackTelemetryClient=class extends TelemetryClient{trackCliArgumentNote(note){note!==void 0&&this.trackCliArgument({arg:"note",value:this.redactedValue})}trackCliOptionField(fields){fields?.length&&this.trackCliOption({option:"field",value:this.redactedValue})}};var FEEDBACK_URL="https://vercel.com/api/feedback/cli",MAX_FEEDBACK_BYTES=1024*1024,FETCH_TIMEOUT_MS=1e4;async function feedback(client){let fail=(reason,message,code)=>(recordCliError({code:reason}),output_manager_default.error(message),code),parsed;try{parsed=parseArguments(client.argv.slice(2),getFlagsSpecification(feedbackCommand.options))}catch{return fail(AGENT_REASON.INVALID_ARGUMENTS,"Invalid feedback arguments. Run vercel feedback --help for usage.",2)}let notes=parsed.args.slice(1),fields=parsed.flags["--field"]??[];if(notes.length===0&&fields.length===0)return client.stdout.write(help(feedbackCommand,{stream:client.stdout,columns:client.stdout.columns??client.stderr.columns})),0;if(notes.length>1)return fail(AGENT_REASON.INVALID_ARGUMENTS,"Pass one note. Quote notes containing spaces, or use vercel feedback - to read stdin.",2);let telemetry=new FeedbackTelemetryClient({opts:{store:client.telemetryEventStore}});telemetry.trackCliArgumentNote(notes[0]),telemetry.trackCliOptionField(fields);let data=Object.create(null);for(let field of fields){let separator=field.indexOf("="),key=field.slice(0,separator).trim();if(separator<1||key==="")return fail(AGENT_REASON.INVALID_ARGUMENTS,"Each --field needs a non-empty key followed by =value. Example: vercel feedback --field topic=deploy.",2);data[key]=field.slice(separator+1)}if(notes.length&&Object.hasOwn(data,"note"))return fail(AGENT_REASON.INVALID_ARGUMENTS,"Provide the note once: use a positional note or --field note=..., rather than both.",2);if(notes[0]==="-"){if(client.stdin.isTTY)return fail(AGENT_REASON.INVALID_ARGUMENTS,"No input was piped to stdin. Pipe a note with: cat notes.md | vercel feedback -",2);try{data.note=await readStdinText(client.stdin,MAX_FEEDBACK_BYTES)}catch(error){return error.type==="entity.too.large"?fail(AGENT_REASON.INVALID_ARGUMENTS,"Feedback is too large. Keep the complete submission below 1 MiB.",2):fail(AGENT_REASON.STDIN_ERROR,"Could not read the feedback note from stdin. Check the input pipe and try again.",1)}}else notes[0]!==void 0&&(data.note=notes[0]);for(let key of Object.keys(data))data[key].trim()||delete data[key];if(!Object.keys(data).length)return fail(AGENT_REASON.INVALID_ARGUMENTS,"Provide a note or at least one named field. Run vercel feedback --help for examples.",2);let canSendTelemetry=client.telemetryEventStore?.enabled??!1,body=JSON.stringify({metadata:canSendTelemetry?{agent:client.isAgent,agent_name:client.isAgent?client.agentName:void 0,cli_version:pkg_default.version,operating_system:process.platform,team_id:client.config.currentTeam??null,user_id:client.authConfig.userId??null,invocation_id:client.telemetryEventStore?.currentInvocationId??null,session_id:client.telemetryEventStore?.currentSessionId??null}:null,data});if(Buffer.byteLength(body)>MAX_FEEDBACK_BYTES)return fail(AGENT_REASON.INVALID_ARGUMENTS,"Feedback is too large. Keep the complete submission below 1 MiB.",2);let controller=new AbortController,timeout=setTimeout(()=>controller.abort(),FETCH_TIMEOUT_MS);timeout.unref?.();try{let response=await fetch(FEEDBACK_URL,{method:"POST",headers:{"content-type":"application/json","user-agent":ua_default},body,redirect:"manual",signal:controller.signal});if(!response.ok)return await response.body?.cancel(),fail(response.status===429?AGENT_REASON.RATE_LIMITED:AGENT_REASON.API_ERROR,`Feedback could not be submitted (HTTP ${response.status}). Try again later.`,1);let responseBody=toNodeReadable(response.body);return JSON.parse(await(0,import_raw_body.default)(responseBody,{limit:64*1024,encoding:"utf8"}).finally(()=>responseBody.destroy()))?.success!==!0?fail(AGENT_REASON.UNKNOWN_OUTCOME,"Could not confirm that Vercel accepted the feedback. It may have been submitted; no automatic retry was made.",1):(client.stdout.write(`Feedback sent
|
|
8
8
|
`),0)}catch{return fail(AGENT_REASON.UNKNOWN_OUTCOME,"Could not confirm that Vercel accepted the feedback. Check your connection. It may have been submitted; no automatic retry was made.",1)}finally{clearTimeout(timeout)}}var import_chalk6=__toESM(require_source(),1);var import_chalk2=__toESM(require_source(),1);var import_chalk=__toESM(require_source(),1);var ACTION_COLORS={allow:import_chalk.default.blue,deny:import_chalk.default.red,challenge:import_chalk.default.yellow,log:import_chalk.default.magenta,rate_limit:import_chalk.default.cyan,"rate-limit":import_chalk.default.cyan,bypass:import_chalk.default.green};function labelForAction(action){return action==="rate_limit"||action==="rate-limit"?"Rate Limited":action.split(/[-_]/).filter(Boolean).map(word=>word.charAt(0).toUpperCase()+word.slice(1)).join(" ")}var MONTHS=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function formatCount(n){return n>=1e6?`${(n/1e6).toFixed(1)}M`:n>=1e3?`${(n/1e3).toFixed(1)}k`:String(Math.round(n))}function pad2(n){return String(n).padStart(2,"0")}function formatUtcTime(ms9,withDate){let d=new Date(ms9),hm=`${pad2(d.getUTCHours())}:${pad2(d.getUTCMinutes())}`;return withDate?`${MONTHS[d.getUTCMonth()]} ${d.getUTCDate()} ${hm}`:hm}function relativeTime(ts){let diff2=Date.now()-ts;return diff2<6e4?"just now":diff2<36e5?`${Math.floor(diff2/6e4)}m ago`:diff2<864e5?`${Math.floor(diff2/36e5)}h ago`:`${Math.floor(diff2/864e5)}d ago`}function formatUtcDateTime(ms9){return`${formatUtcTime(ms9,!0)} UTC (${relativeTime(ms9)})`}function colorizeDetail(detail){return detail.split(" \xB7 ").map(part=>{let color=ACTION_COLORS[part.toLowerCase().replace(/ /g,"_")];return color?color(part):part}).join(" \xB7 ")}function windowNeedsDate(startMs,endMs){return endMs-startMs>25*36e5}function granularityLabel(granularity){return"minutes"in granularity?`${granularity.minutes}m`:"hours"in granularity?`${granularity.hours}h`:`${granularity.days}d`}function formatActionTrendTable(series){let allTs=new Set;for(let s of series)for(let p of s.timeseries)allTs.add(p.timestamp);let axis=[...allTs].sort(),hasAnyTraffic=series.some(s=>s.total>0||s.timeseries.some(p=>p.value>0));if(series.length===0||axis.length===0||!hasAnyTraffic)return import_chalk.default.dim(" No request data for this period.");let startMs=new Date(axis[0]).getTime(),endMs=new Date(axis[axis.length-1]).getTime(),needsDate=windowNeedsDate(startMs,endMs),rows=[["Action","Trend","Total","Peak","Peak at"].map(h=>import_chalk.default.bold(import_chalk.default.cyan(h)))];for(let s of series){let byTs=new Map(s.timeseries.map(p=>[p.timestamp,p.value])),values=axis.map(t=>byTs.get(t)??0),peak=0,peakTs="";for(let i=0;i<axis.length;i++)values[i]>peak&&(peak=values[i],peakTs=axis[i]);let plain=x=>x,color=s.total>0?ACTION_COLORS[s.action]??plain:import_chalk.default.dim,trend=s.total>0?plain:import_chalk.default.dim;rows.push([color(labelForAction(s.action)),trend(generateSparkline(values)),formatCount(s.total),peak>0?formatCount(peak):"--",peak>0?formatUtcTime(new Date(peakTs).getTime(),needsDate):"--"])}return table(rows,{align:["l","l","r","r","r"],hsep:3}).split(`
|
|
9
9
|
`).map(line2=>` ${line2}`.trimEnd()).join(`
|
|
10
10
|
`)}var NO_SERVER_MESSAGE="Response Error";function apiServerMessage(error){let message=isAPIError(error)?error.serverMessage:void 0;return message&&message!==NO_SERVER_MESSAGE?message:void 0}var FIREWALL_O11Y_ALERT_TYPES=["botId_anomaly","firewallSystemRule_anomaly","firewallCustomRule_anomaly"],FIREWALL_ANOMALY_TYPE="firewall_anomaly",SYS_DOS_MITIGATION_RULE_ID="sys_dos_mitigation",SYSTEM_RULE_ANOMALY_TYPE="firewallSystemRule_anomaly",FIREWALL_ACTIVITY_PLAN_MESSAGE="Traffic and alerts need Observability Plus.",FIREWALL_ALERTS_PARTIAL_ERROR_MESSAGE="Couldn't load every alert source.";function reduceAttackAnomaly(anomaly){return Object.keys(anomaly.affectedHostMap).reduce((acc,host)=>{acc.hosts.push(host);let challenged=anomaly.affectedHostMap[host].ddosAlerts?.["sys_dos_mitigation:challenge"]?.totalReqs||0,denied=anomaly.affectedHostMap[host].ddosAlerts?.["sys_dos_mitigation:deny"]?.totalReqs||0;return acc.challenged+=challenged,acc.denied+=denied,acc.count+=challenged+denied,acc},{hosts:[],challenged:0,denied:0,count:0})}function hostsFromAnomaly(anomaly){return Object.entries(anomaly.affectedHostMap).map(([host,data])=>{let challenged=data.ddosAlerts?.["sys_dos_mitigation:challenge"]?.totalReqs||0,denied=data.ddosAlerts?.["sys_dos_mitigation:deny"]?.totalReqs||0;return{name:host,count:challenged+denied}}).filter(row=>row.count>0).sort((a,b)=>b.count-a.count)}function mapAttackAnomaly(anomaly){let reduced=reduceAttackAnomaly(anomaly),parts=["System rule"];return reduced.denied>0&&parts.push(labelForAction("deny")),reduced.challenged>0&&parts.push(labelForAction("challenge")),{id:`${anomaly.ownerId}-${anomaly.projectId}-${anomaly.startTime}`,title:"DDoS Mitigation",type:FIREWALL_ANOMALY_TYPE,startedAt:anomaly.startTime,resolvedAt:anomaly.endTime||void 0,count:reduced.count,detail:parts.join(" \xB7 "),action:reduced.denied>=reduced.challenged?"deny":"challenge",ruleId:SYS_DOS_MITIGATION_RULE_ID,host:reduced.hosts[0]}}function mapO11yAlert(alert){if(!alert.startedAt)return null;let action=alert.data?.action,ruleId=alert.data?.ruleId,detailParts=[alert.type,action?labelForAction(action):void 0,ruleId].filter(Boolean);return{id:alert.id||`${alert.type}-${alert.startedAt}`,title:alert.title||alert.type||"Firewall alert",type:alert.type||"unknown",startedAt:alert.startedAt,resolvedAt:alert.resolvedAt,count:alert.data?.count,detail:detailParts.filter(p=>p!==alert.title).join(" \xB7 ")||void 0,action,ruleId,path:alert.data?.path}}var ATTACK_STATUS_MAX_DAYS=7;async function getAttackStatus(client,opts){let query=new URLSearchParams;if(query.set("projectId",opts.projectId),query.set("teamId",opts.teamId),opts.sinceDays!==void 0){let sinceDays=Math.min(ATTACK_STATUS_MAX_DAYS,Math.max(1,Math.ceil(opts.sinceDays)));query.set("since",String(sinceDays))}return client.fetch(`/v1/security/firewall/attack-status?${query.toString()}`,{accountId:opts.teamId,signal:opts.signal})}var O11Y_ALERTS_LIMIT=200;async function getFirewallO11yAlerts(client,opts){let query=new URLSearchParams;query.set("teamId",opts.teamId),query.set("projectId",opts.projectId),query.set("from",opts.from.toISOString()),query.set("to",opts.to.toISOString()),query.set("limit",String(O11Y_ALERTS_LIMIT));for(let type of FIREWALL_O11Y_ALERT_TYPES)query.append("types",type);return(await client.fetch(`/alerts/v3/groups?${query.toString()}`,{accountId:opts.teamId,signal:opts.signal})).flatMap(g=>g.alerts??[]).map(mapO11yAlert).filter(a=>a!==null)}var ALERTS_TIMEOUT_MS=2e4;function sourceFailureReason(err){return isAPIError(err)&&err.status===408||err instanceof Error&&(err.name==="TimeoutError"||err.name==="AbortError")?"timed out":isAPIError(err)&&err.status===402?"needs Observability Plus":isAPIError(err)&&typeof err.status=="number"?`HTTP ${err.status}`:err instanceof Error&&err.message?err.message:"unknown error"}function resolveAlertsWindow(opts){let now=Date.now(),to=opts.to??new Date(now),from=opts.from??new Date(to.getTime()-864e5*(opts.sinceDays??1)),sinceDays=opts.sinceDays??Math.max(1,Math.ceil((now-from.getTime())/864e5));return{from,to,sinceDays}}function classifyAlertSourceError(err){if(isAPIError(err)&&(err.status===401||err.status===403))throw err;return isAPIError(err)&&err.status===402?{reason:"plan",message:FIREWALL_ACTIVITY_PLAN_MESSAGE}:{reason:"error",message:apiServerMessage(err)||!isAPIError(err)&&err instanceof Error&&err.message||FIREWALL_ALERTS_PARTIAL_ERROR_MESSAGE}}async function getFirewallAlertsDetailed(client,opts){let{from,to,sinceDays}=resolveAlertsWindow(opts),timeoutMs=opts.timeoutMs??ALERTS_TIMEOUT_MS,signal=AbortSignal.timeout(timeoutMs),[o11yResult,attackResult]=await Promise.allSettled([getFirewallO11yAlerts(client,{...opts,from,to,signal}),getAttackStatus(client,{...opts,sinceDays,signal})]),errors=[],o11yAlerts=[],o11y;o11yResult.status==="fulfilled"?o11yAlerts=o11yResult.value:(o11y=classifyAlertSourceError(o11yResult.reason),errors.push({source:"alerts",message:sourceFailureReason(o11yResult.reason)}));let mappedAttacks=[],attackStatus;attackResult.status==="fulfilled"?mappedAttacks=(attackResult.value.anomalies||[]).map(mapAttackAnomaly):(attackStatus=classifyAlertSourceError(attackResult.reason),errors.push({source:"attackStatus",message:sourceFailureReason(attackResult.reason)}));let resolvedCutoff=from.getTime();return{alerts:mappedAttacks.concat(o11yAlerts.filter(a=>!a.resolvedAt||a.resolvedAt>resolvedCutoff)).sort((a,b)=>!a.resolvedAt&&b.resolvedAt?-1:a.resolvedAt&&!b.resolvedAt?1:b.startedAt-a.startedAt),o11y,attackStatus,errors}}function alertsIncompleteMessage(errors){return`Attack count and alerts may be incomplete: ${errors.map(e=>`${e.source==="alerts"?"alerts":"attack history"} ${e.message}`).join("; ")}.`}function countAttacksMitigated(alerts,windowStartMs,windowEndMs){return alerts.filter(alert=>isAttackAlert(alert)&&alertOverlapsWindow(alert,windowStartMs,windowEndMs)).length}function alertOverlapsWindow(alert,windowStartMs,windowEndMs){return alert.startedAt<=windowEndMs&&(alert.resolvedAt??Number.POSITIVE_INFINITY)>=windowStartMs}function isAttackAlert(alert){return alert.type===FIREWALL_ANOMALY_TYPE?!0:alert.type===SYSTEM_RULE_ANOMALY_TYPE&&alert.ruleId===SYS_DOS_MITIGATION_RULE_ID}var O11Y_ALERT_ID_PREFIX="al_",INSPECT_FALLBACK_DAYS=7;function isO11yAlertId(id){return id.startsWith(O11Y_ALERT_ID_PREFIX)}function parseLegacyAlertStartTime(id){let match=id.match(/-(\d{13})$/);return match?Number(match[1]):void 0}function daysCovering(startMs,endMs){return Math.max(1,Math.ceil((endMs-startMs)/864e5))}function mapGroupAsAlert(group,alertId){let nested=(group.alerts??[]).map(mapO11yAlert).filter(a=>a!==null),hit=nested.find(a=>a.id===alertId)??nested[0];if(hit)return hit;let startedAt=group.recordedStartedAt;return startedAt?mapO11yAlert({id:alertId,title:group.title,type:group.type,startedAt,resolvedAt:group.recordedResolvedAt,data:group.alerts?.[0]?.data}):null}async function getO11yAlertById(client,opts){let query=new URLSearchParams;query.set("teamId",opts.teamId),query.set("projectId",opts.projectId);try{let group=await client.fetch(`/alerts/v3/groups/${encodeURIComponent(opts.alertId)}?${query.toString()}`,{accountId:opts.teamId,signal:opts.signal});return mapGroupAsAlert(group,opts.alertId)}catch(err){if(isAPIError(err)&&err.status===404)return null;throw err}}async function findFirewallAlert(client,opts){let timeoutMs=opts.timeoutMs??ALERTS_TIMEOUT_MS,budget=()=>AbortSignal.timeout(timeoutMs),now=Date.now();if(isO11yAlertId(opts.alertId)){let fromGroup2=await getO11yAlertById(client,{...opts,signal:budget()});if(fromGroup2)return{alert:fromGroup2};let from=new Date(now-864e5*INSPECT_FALLBACK_DAYS),hit=(await getFirewallO11yAlerts(client,{projectId:opts.projectId,teamId:opts.teamId,from,to:new Date(now),signal:budget()})).find(a=>a.id===opts.alertId);return hit?{alert:hit}:null}let startTime=parseLegacyAlertStartTime(opts.alertId),sinceDays=startTime?daysCovering(startTime,now)+1:INSPECT_FALLBACK_DAYS,anomaly=((await getAttackStatus(client,{projectId:opts.projectId,teamId:opts.teamId,sinceDays,signal:budget()}).catch(err=>{if(isAPIError(err)&&(err.status===401||err.status===403))throw err;return{anomalies:[]}})).anomalies||[]).find(a=>`${a.ownerId}-${a.projectId}-${a.startTime}`===opts.alertId);if(anomaly)return{alert:mapAttackAnomaly(anomaly),hosts:hostsFromAnomaly(anomaly)};let fromGroup=await getO11yAlertById(client,{...opts,signal:budget()}).catch(err=>{if(isAPIError(err)&&(err.status===401||err.status===403))throw err;return null});return fromGroup?{alert:fromGroup}:null}var AI_BOTS_CATEGORY_ACTIONS=["allow","log","deny"];function getAiBotsCategories(ruleset,catalogGroups){return[...new Set([...Object.keys(catalogGroups??{}),...Object.keys(ruleset?.ruleGroups??{})])].sort().map(ruleGroupId=>({id:ruleGroupId.replace(/_/g,"-"),ruleGroupId,name:catalogGroups?.[ruleGroupId]?.name??formatCategoryName(ruleGroupId)}))}function formatCategoryName(ruleGroupId){return ruleGroupId.split("_").map(word=>word==="ai"?"AI":word[0].toUpperCase()+word.slice(1)).join(" ")}function getAiBotsCategoryAction(ruleset,ruleGroupId){if(!ruleset?.active)return"allow";let group=ruleset.ruleGroups?.[ruleGroupId];return group?.active===!1?"allow":group?.action??ruleset.action??"log"}function getAiBotsCategoryActionAfterEdit(ruleset,ruleGroupId){if(!ruleset)return"log";if(ruleset.active)return getAiBotsCategoryAction(ruleset,ruleGroupId);let group=ruleset.ruleGroups?.[ruleGroupId];return group?.active?group.action??"log":"allow"}function hasAiBotsCategories(ruleset){return Object.keys(ruleset?.ruleGroups??{}).length>0}function getAiBotsCategoryDetails(ruleset){if(hasAiBotsCategories(ruleset))return getAiBotsCategories(ruleset).map(category=>({...category,action:getAiBotsCategoryAction(ruleset,category.ruleGroupId)}))}function aiBotsJsonStatus(ruleset){let categories=getAiBotsCategoryDetails(ruleset);return{enabled:ruleset?.active??!1,action:categories?null:ruleset?.action??null,...categories?{categories}:{}}}var MANAGED_BOT_RULE_IDS=["bot-protection","ai-bots","bot-id"],ALIASES={"bot-protection":"bot-protection","bot protection":"bot-protection",bot_protection:"bot-protection",bot_filter:"bot-protection",managed_bot_protection:"bot-protection",managed_bot_filter:"bot-protection","ai-bots":"ai-bots","ai bots":"ai-bots",ai_bots:"ai-bots",managed_ai_bots:"ai-bots","bot-id":"bot-id",botid:"bot-id",bot_id:"bot-id"},ACTIONS={"bot-protection":["off","log","challenge"],"ai-bots":["allow","log","challenge","deny"],"bot-id":["basic","deep-analysis"]},NAMES={"bot-protection":"Bot Protection","ai-bots":"AI Bots","bot-id":"BotID"},WAF_RULE_IDS={"bot-protection":"managed_bot_protection","ai-bots":"managed_ai_bots"};function resolveManagedBotRuleId(identifier){if(identifier)return ALIASES[identifier.trim().toLowerCase()]}function managedBotActions(id,category){return category?AI_BOTS_CATEGORY_ACTIONS:ACTIONS[id]}function formatManagedBotAction(action){return action==="deep-analysis"?"Deep Analysis":action.charAt(0).toUpperCase()+action.slice(1)}function botProtectionConfig(managedRules){return managedRules?.bot_filter??managedRules?.bot_protection}function currentBotProtectionAction(config){let ruleset=botProtectionConfig(config?.managedRules);return ruleset?.active?ruleset.action==="log"?"log":"challenge":"off"}function currentAiBotsAction(config){let ruleset=config?.managedRules?.ai_bots;return ruleset?.active?ruleset.action==="challenge"?"challenge":ruleset.action==="deny"?"deny":"log":"allow"}function currentBotIdAction(config){return config?.botIdEnabled?"deep-analysis":"basic"}function getManagedBotRule(config,id){let categories=id==="ai-bots"?getAiBotsCategoryDetails(config?.managedRules?.ai_bots):void 0,action=categories?null:id==="bot-protection"?currentBotProtectionAction(config):id==="ai-bots"?currentAiBotsAction(config):currentBotIdAction(config);return{id,name:NAMES[id],action,wafRuleId:WAF_RULE_IDS[id],...categories?{categories}:{}}}function getManagedBotRules(config){return MANAGED_BOT_RULE_IDS.map(id=>getManagedBotRule(config,id))}function parseManagedBotAction(id,raw,category){let action=raw.trim().toLowerCase().replace(/\s+/g,"-"),valid=managedBotActions(id,category);return valid.includes(action)?{action}:{error:`Invalid action "${raw}" for ${category?.name??NAMES[id]}. Use ${valid.join(", ")}.`}}function buildManagedBotPatch(id,action,category){if(category)return{action:"managedRuleGroup.update",id:"ai_bots",value:{[category.ruleGroupId]:action==="allow"?{active:!1}:{active:!0,action}}};if(id==="bot-id")return{action:"botId.toggle",value:action==="deep-analysis"};let patchId=id==="bot-protection"?"bot_protection":"ai_bots";return action==="off"||action==="allow"?{action:"managedRules.update",id:patchId,value:{active:!1}}:{action:"managedRules.update",id:patchId,value:{active:!0,action}}}function suggestedManagedBotAction(rule){return rule.id==="bot-protection"?rule.action==="challenge"?"log":"challenge":rule.id==="ai-bots"?rule.action==="deny"?"allow":"deny":rule.action==="deep-analysis"?"basic":"deep-analysis"}function managedBotTrafficWarning(id,from,to,category){if(id==="ai-bots"&&to==="deny")return category?`Deny blocks known ${category.name} traffic when published.`:"AI Bots deny blocks known AI crawlers from this project.";if(id==="bot-protection"&&from==="off"&&to==="challenge")return"Bot Protection challenge will present a verification page to non-browser traffic."}function managedBotJson(rule){return{id:rule.id,name:rule.name,action:rule.action,wafRuleId:rule.wafRuleId??null,...rule.categories?{categories:rule.categories}:{}}}function suggestedManagedBotEditCommand(rule){let category=rule.categories?.[0];if(rule.id==="ai-bots"&&!category)return"firewall rules update ai-bots";let action=suggestedManagedBotAction(category?{...rule,action:category.action}:rule);return`firewall rules update ${rule.id}${category?` --category ${category.id}`:""} --action ${action}`}function projectScope(project,teamId,teamSlug){return{type:"project",projectId:project.id,teamId,...teamSlug?{teamSlug}:{},displayName:project.name}}function firewallConfigUrl(scope,path=""){let query=new URLSearchParams;return scope.type==="project"?(query.set("projectId",scope.projectId),scope.teamId&&query.set("teamId",scope.teamId),`/v1/security/firewall/config${path}?${query.toString()}`):(query.set("teamId",scope.teamId),`/v1/security/firewall/team-config${path}?${query.toString()}`)}async function listFirewallConfigs(client,scope){return client.fetch(firewallConfigUrl(scope))}async function activateFirewallConfig(client,scope,configVersion){return client.fetch(firewallConfigUrl(scope,`/${configVersion}/activate`),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({})})}var PRIORITY_PROJECT_ENABLE_COMMAND="project priority enable",BUY_PRO_COMMAND="buy pro";function withGlobalFlags(client,commandTemplate,scope,options={}){let template=scope?.type==="team"?`${commandTemplate} --team-level`:commandTemplate;return buildCommandWithGlobalFlags(client.argv,template,void 0,{globalFlags:"all",preserveProject:options.preserveProject??!0,excludeFlags:options.excludeFlags})}async function resolveFirewallScope(client,flags){if(flags["--team-level"]&&flags["--project"]){let message="Cannot specify both --team-level and --project. Use one or the other.";return client.nonInteractive?(outputAgentError(client,{status:AGENT_STATUS.ERROR,reason:AGENT_REASON.INVALID_ARGUMENTS,message},2),2):(output_manager_default.error(message),2)}if(flags["--team-level"]){let{team}=await getScope(client);if(!team){let message="Team-level firewall requires a team scope. Personal accounts are not supported. Run `vercel switch` to select a team or pass --scope <team>.";return client.nonInteractive?(outputAgentError(client,{status:AGENT_STATUS.ERROR,reason:AGENT_REASON.MISSING_SCOPE,message},1),1):(output_manager_default.error(message),1)}return{type:"team",teamId:team.id,displayName:team.slug}}let link=await requireProjectContext(client,"firewall",flags["--project"]);if(typeof link=="number")return link;let{project,org}=link;return{type:"project",projectId:project.id,teamId:org.type==="team"?org.id:void 0,teamSlug:org.type==="team"?org.slug:void 0,displayName:project.name}}function mentionsPriorityProject(message){return/priority\s+project/i.test(message)||/priority\s+tier/i.test(message)}function teamPlan(scope){return scope.teamId?teamCache.get(scope.teamId)?.billing?.plan:void 0}function priorityTeam(scope){let cached=scope.teamId?teamCache.get(scope.teamId):void 0;if(scope.type==="team")return{id:scope.teamId,slug:scope.displayName,name:cached?.name??null,scopeArg:scope.displayName};if(!scope.teamId)return null;let slug=scope.teamSlug??cached?.slug??null;return{id:scope.teamId,slug,name:cached?.name??null,scopeArg:slug??scope.teamId}}function teamLabel(team){return team.name&&team.name!==team.slug?`${team.slug} (${team.name})`:team.slug}function styledCommand(command,plain){return plain?getCommandNamePlain(command):getCommandName(command)}function priorityProjectFix(scope){let excludeFlags=["--non-interactive","--project","--yes","--scope","--team"],project=scope.type==="project"?{id:scope.projectId,name:scope.displayName}:null,team=priorityTeam(scope),plan=teamPlan(scope)??null,data={project,team:team&&{id:team.id,slug:team.slug,name:team.name},plan},projectToken=project?quoteArg(project.name):"<project>",scopeFlag=team?` --scope ${quoteArg(team.scopeArg)}`:"",enable4=`${PRIORITY_PROJECT_ENABLE_COMMAND} ${projectToken}${scopeFlag}`;if(!team){let hint="Priority projects are only available on team accounts. Use --scope to specify one.";return{command:"",hint,plainHint:hint,when:hint,excludeFlags,preserveProject:!1,reason:AGENT_REASON.MISSING_SCOPE,data}}if(plan==="hobby"||plan==="oss"){let upgrade=`${BUY_PRO_COMMAND}${scopeFlag}`,hint=plain2=>`Priority Projects are only available on Pro or Enterprise team plans. Upgrade with ${styledCommand(upgrade,plain2)}, then run ${styledCommand(enable4,plain2)}.`;return{command:upgrade,hint:hint(!1),plainHint:hint(!0),when:"a person has approved upgrading the plan",excludeFlags,preserveProject:!1,reason:AGENT_REASON.PLAN_UPGRADE_REQUIRED,scope:team.scopeArg,data}}let shown=styledCommand(enable4,!1),plain=styledCommand(enable4,!0),placeholder="Replace <project> with a project on this team.";return{command:enable4,hint:project?shown:`${shown} ${placeholder}`,plainHint:project?plain:`${plain} ${placeholder}`,when:project?"user runs this command in an interactive terminal":"Replace <project> with a project on this team.",excludeFlags,preserveProject:!1,reason:AGENT_REASON.PLAN_UPGRADE_REQUIRED,scope:team.scopeArg,data}}function mapFirewallApiError(e,scope,fallback){let err=e;return scope.type==="team"&&err.status===403?err.code==="plan_not_supported"?`Team-level firewall requires an Enterprise plan (current team: "${scope.displayName}"). Pass --scope <team> or run \`vercel switch\` to target a different team.`:`You need to be a team owner to manage the team-level firewall for "${scope.displayName}".${err.message?` (${err.message})`:""}`:err.message||fallback}function priorityProjectMessage(scope,fix){let team=fix.data.team,label=team?.slug!=null?teamLabel({slug:team.slug,name:team.name}):void 0;return scope.type==="project"?label?`This rule requires a Priority project for ${scope.displayName} on team ${label}.`:`This rule requires a Priority project. ${fix.hint}`:label?`This rule requires a Priority project on team ${label}.`:"This rule requires a Priority project."}function failPriorityProjectGate(client,error,scope,opts){let serverMessage=apiServerMessage(error);if(!serverMessage||!mentionsPriorityProject(serverMessage))return null;let fix=priorityProjectFix(scope),message=priorityProjectMessage(scope,fix),payload={status:AGENT_STATUS.ERROR,reason:fix.reason,message,userActionRequired:!0,hint:fix.plainHint,retryable:!1,...fix.scope?{scope:fix.scope}:{},data:fix.data,...fix.command?{next:[{command:buildCommandWithGlobalFlags(client.argv,fix.command,packageName,{globalFlags:"all",preserveProject:!1,excludeFlags:fix.excludeFlags}),when:fix.when}]}:{}};return shouldEmitNonInteractiveCommandError(client)&&outputAgentError(client,payload,1),opts?.json?(output_manager_default.stopSpinner(),writeAgentError(client,payload),1):(output_manager_default.error(message),fix.command&&output_manager_default.log(fix.hint),1)}function getRulePayload(flags){let legacy=flags["--json"];return legacy!==void 0&&flags["--data"]!==void 0?(output_manager_default.error("Can't use --data with --json."),2):(legacy!==void 0&&output_manager_default.warning("--json is deprecated for rule payloads. Use --data."),flags["--data"]??legacy)}async function parseSubcommandArgs(argv,command,client,commandPath){let parsedArgs,fullPath=commandPath||command.name;try{parsedArgs=parseSubcommandArguments(argv,command)}catch(err){if(client?.nonInteractive){let rawMessage=err instanceof Error?err.message:String(err),flags=getGlobalFlagsFromArgs(client.argv.slice(2),{preserveProject:!0});return outputAgentError(client,{status:AGENT_STATUS.ERROR,reason:AGENT_REASON.INVALID_ARGUMENTS,message:rawMessage,next:[{command:getCommandNamePlain(`firewall ${fullPath} ${flags.join(" ")}`.trim()),when:"fix options and retry"}]},2),2}return printError(err),2}return parsedArgs}async function confirmAction(client,skipConfirmation,message,details){return skipConfirmation?!0:client.nonInteractive||!client.stdin.isTTY?(outputAgentError(client,{status:AGENT_STATUS.ERROR,reason:AGENT_REASON.CONFIRMATION_REQUIRED,message:`${message} Re-run with --yes to confirm.`,next:[{command:buildCommandWithYes(client.argv),when:"re-run with --yes to confirm"}]}),process.exit(1),!1):(details&&output_manager_default.print(` ${details}
|