@vercel/cli-support 65.15.0 → 65.16.0-snapshot-579f9b2619d8
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-WGP6UVQN.js → add-7QN52B57.js} +1 -1
- package/dist/chunks/{add-6T3KGMEH.js → add-F6E3N6EL.js} +1 -1
- package/dist/chunks/{add-LULORXI7.js → add-MC6ZRFQX.js} +1 -1
- package/dist/chunks/{alerts-IFUWVZU4.js → alerts-LVINUFWK.js} +1 -1
- package/dist/chunks/{build-H5WTYJH4.js → build-IU3F645C.js} +1 -1
- package/dist/chunks/{chunk-X5LOHZT5.js → chunk-26NZS3ME.js} +1 -1
- package/dist/chunks/{chunk-HFVCKK5P.js → chunk-2DP7BD4A.js} +1 -1
- package/dist/chunks/{chunk-6737KAJP.js → chunk-2GBU6ULJ.js} +1 -1
- package/dist/chunks/{chunk-QEZ6KFSY.js → chunk-2QAXUK5X.js} +1 -1
- package/dist/chunks/{chunk-DETGGKXT.js → chunk-2R3K7FYA.js} +1 -1
- package/dist/chunks/{chunk-UZXQY5X5.js → chunk-2Y5X7IPM.js} +1 -1
- package/dist/chunks/{chunk-5DEAFZBT.js → chunk-33P2H5LU.js} +1 -1
- package/dist/chunks/{chunk-KVDSSSSF.js → chunk-34RN7PH7.js} +1 -1
- package/dist/chunks/{chunk-PL6TMRQZ.js → chunk-3FXGAG5H.js} +1 -1
- package/dist/chunks/{chunk-XDBRJ7H3.js → chunk-4K2IT6C4.js} +1 -1
- package/dist/chunks/{chunk-P333Z5AT.js → chunk-5MZ7JZY7.js} +1 -1
- package/dist/chunks/{chunk-3JFPC5MK.js → chunk-5S6VTCXQ.js} +1 -1
- package/dist/chunks/{chunk-W25UARQV.js → chunk-5ZCSFPWG.js} +1 -1
- package/dist/chunks/{chunk-6MFLATDD.js → chunk-5ZJ6UU6P.js} +1 -1
- package/dist/chunks/{chunk-ODM3YKPR.js → chunk-62EY3VOP.js} +1 -1
- package/dist/chunks/{chunk-4TD2KH46.js → chunk-63FPHKCJ.js} +1 -1
- package/dist/chunks/{chunk-SP6E7PHW.js → chunk-6CJFPT4F.js} +1 -1
- package/dist/chunks/{chunk-2LOA3LC6.js → chunk-6FYPSSL4.js} +1 -1
- package/dist/chunks/{chunk-BYJQPGPK.js → chunk-6IT3XN6I.js} +1 -1
- package/dist/chunks/chunk-6IZ2TU4N.js +12 -0
- package/dist/chunks/{chunk-2OQD274E.js → chunk-6UI3ZNHM.js} +7 -7
- package/dist/chunks/{chunk-UXRRYYSD.js → chunk-7HLAWGY2.js} +1 -1
- package/dist/chunks/{chunk-6C5KUHQP.js → chunk-7KCRYDGK.js} +1 -1
- package/dist/chunks/{chunk-SQ76HIB6.js → chunk-AB4WXRCO.js} +1 -1
- package/dist/chunks/{chunk-HVZ5OOOP.js → chunk-AFQLIDZC.js} +1 -1
- package/dist/chunks/{chunk-HVQEYQWF.js → chunk-AXKC5J52.js} +1 -1
- package/dist/chunks/{chunk-3EHJOZJB.js → chunk-BBQ4XOTI.js} +1 -1
- package/dist/chunks/{chunk-HVBSYQDN.js → chunk-BKHJUBCA.js} +1 -1
- package/dist/chunks/{chunk-JVGENO2R.js → chunk-BMIYC2MH.js} +1 -1
- package/dist/chunks/{chunk-26EJ4FM6.js → chunk-BPIGFKNN.js} +1 -1
- package/dist/chunks/{chunk-VBGL7MZR.js → chunk-BPM6HU7K.js} +1 -1
- package/dist/chunks/{chunk-CJ6XPDSS.js → chunk-BPQUJWX5.js} +1 -1
- package/dist/chunks/{chunk-YE245S4O.js → chunk-C35SG42R.js} +1 -1
- package/dist/chunks/{chunk-XHPIQGUS.js → chunk-CBEMES2R.js} +1 -1
- package/dist/chunks/{chunk-JZ4NMX3Z.js → chunk-CC36LXTT.js} +1 -1
- package/dist/chunks/chunk-CFJBDBYH.js +7 -0
- package/dist/chunks/{chunk-JQHS743O.js → chunk-CM7I3U5I.js} +1 -1
- package/dist/chunks/{chunk-MSJA64LL.js → chunk-D44WCAOX.js} +1 -1
- package/dist/chunks/chunk-D66BF5UU.js +7 -0
- package/dist/chunks/{chunk-2V6UURUN.js → chunk-DDPH26ZO.js} +1 -1
- package/dist/chunks/{chunk-PRNTZKYB.js → chunk-DJIBJVEQ.js} +1 -1
- package/dist/chunks/{chunk-T7XSLFZ6.js → chunk-DMPINPWB.js} +1 -1
- package/dist/chunks/{chunk-Z5FNUSWW.js → chunk-DOBV3XLO.js} +1 -1
- package/dist/chunks/{chunk-7GSB5AQE.js → chunk-DSHWUXYY.js} +1 -1
- package/dist/chunks/{chunk-OFZUWHZW.js → chunk-DTUEHPME.js} +1 -1
- package/dist/chunks/{chunk-WKSXBH7X.js → chunk-DY643UZ7.js} +2 -1
- package/dist/chunks/{chunk-O3DAPRJ3.js → chunk-EJLYDHT7.js} +1 -1
- package/dist/chunks/{chunk-4OO6TXBM.js → chunk-ELM2KPYX.js} +1 -1
- package/dist/chunks/{chunk-7OJMANDL.js → chunk-EVZCOEPD.js} +1 -1
- package/dist/chunks/{chunk-XEISEISC.js → chunk-FBLGDSCA.js} +6 -6
- package/dist/chunks/{chunk-U3J3SJJ5.js → chunk-FZ5XTMGO.js} +2 -2
- package/dist/chunks/{chunk-AR3ADTVY.js → chunk-GDOKUFG3.js} +1 -1
- package/dist/chunks/chunk-GLCSWIB4.js +7 -0
- package/dist/chunks/{chunk-RWK4YZLO.js → chunk-GV4XVRPN.js} +1 -1
- package/dist/chunks/{chunk-MTJLZGL5.js → chunk-HQGD4PEO.js} +1 -1
- package/dist/chunks/{chunk-UDKIA6WN.js → chunk-HXEXHXD4.js} +1 -1
- package/dist/chunks/{chunk-KAYGNWHX.js → chunk-I4QLOG2Z.js} +1 -1
- package/dist/chunks/{chunk-W45KFKUW.js → chunk-IG5ACFU6.js} +1 -1
- package/dist/chunks/{chunk-5L566FZB.js → chunk-IIK6GUVI.js} +1 -1
- package/dist/chunks/chunk-IJHT5BPS.js +12 -0
- package/dist/chunks/{chunk-3JM374FP.js → chunk-INICCBM4.js} +1 -1
- package/dist/chunks/{chunk-O3I6OKIE.js → chunk-IOQZ7HZM.js} +1 -1
- package/dist/chunks/chunk-IVZF2PMV.js +11 -0
- package/dist/chunks/chunk-JNA6LHLT.js +24 -0
- package/dist/chunks/{chunk-ATUJAOUR.js → chunk-JNXPL4Y4.js} +1 -1
- package/dist/chunks/{chunk-XF3327G6.js → chunk-JP2TYFG4.js} +1 -1
- package/dist/chunks/chunk-JWKFVECK.js +7 -0
- package/dist/chunks/{chunk-7O2W7ILO.js → chunk-K2IVJE2G.js} +1 -1
- package/dist/chunks/{chunk-X5I33MJS.js → chunk-K7ZPHS55.js} +1 -1
- package/dist/chunks/{chunk-ONXOTUO6.js → chunk-KBON4ISC.js} +1 -1
- package/dist/chunks/{chunk-2W4ND5DH.js → chunk-KEGZOZE5.js} +1 -1
- package/dist/chunks/{chunk-PSPPENIK.js → chunk-KLII7LME.js} +1 -1
- package/dist/chunks/{chunk-Z2HYNJLC.js → chunk-KNVMEDGC.js} +1 -1
- package/dist/chunks/{chunk-GTOSMVDY.js → chunk-L7MSHLII.js} +1 -1
- package/dist/chunks/{chunk-VTZH5DW3.js → chunk-LAFP5A4S.js} +1 -1
- package/dist/chunks/{chunk-NHB43235.js → chunk-LYL26S3N.js} +1 -1
- package/dist/chunks/{chunk-IDHH6QTJ.js → chunk-LYRSA2EI.js} +13 -3
- package/dist/chunks/{chunk-554TYJKV.js → chunk-M2J4MIKF.js} +1 -1
- package/dist/chunks/{chunk-4TAAEP5J.js → chunk-MCKKADC2.js} +1 -1
- package/dist/chunks/{chunk-TDHFWPK5.js → chunk-MKXE2IE4.js} +1 -1
- package/dist/chunks/{chunk-SPV6M2GS.js → chunk-MNRHYWPJ.js} +1 -1
- package/dist/chunks/{chunk-6TYBUUO4.js → chunk-MXAXD5DQ.js} +1 -1
- package/dist/chunks/{chunk-A7YTYTWM.js → chunk-MXN736AL.js} +1 -1
- package/dist/chunks/{chunk-EZ7CJF5G.js → chunk-N5MSOEHD.js} +1 -1
- package/dist/chunks/{chunk-5THEFDOZ.js → chunk-NJFTAKDY.js} +1 -1
- package/dist/chunks/{chunk-7RAGU3PA.js → chunk-NPROMJAU.js} +1 -1
- package/dist/chunks/{chunk-O47OWLP7.js → chunk-OKRQ2XLR.js} +1 -1
- package/dist/chunks/chunk-PDPX7546.js +12 -0
- package/dist/chunks/{chunk-VHRQW57O.js → chunk-PDUIYEMP.js} +1 -1
- package/dist/chunks/{chunk-OKKG2FUS.js → chunk-PIDEH4SJ.js} +1 -1
- package/dist/chunks/{chunk-QFCYM4RS.js → chunk-PY4WWD6Z.js} +1 -1
- package/dist/chunks/{chunk-B6WYIUOW.js → chunk-Q2PXJ55R.js} +1 -1
- package/dist/chunks/{chunk-LT3Z7YQX.js → chunk-QM2VCL36.js} +1 -1
- package/dist/chunks/{chunk-UZQJQXGJ.js → chunk-QOLGACFD.js} +1 -1
- package/dist/chunks/{chunk-N7NTAYBS.js → chunk-R5EPF72H.js} +1 -1
- package/dist/chunks/{chunk-KRZBZ7PB.js → chunk-RDO7G5LL.js} +1 -1
- package/dist/chunks/{chunk-U6P3UM3Z.js → chunk-RUGX7ONC.js} +1 -1
- package/dist/chunks/{chunk-YVIAN4VL.js → chunk-SCXMZVZ4.js} +1 -1
- package/dist/chunks/{chunk-A3C67PNC.js → chunk-SKYIWHB5.js} +1 -1
- package/dist/chunks/{chunk-HR66URIC.js → chunk-SYJXONEV.js} +1 -1
- package/dist/chunks/chunk-T3SXUNB7.js +21 -0
- package/dist/chunks/{chunk-TA4HB2ZR.js → chunk-TKF4SYCC.js} +1 -1
- package/dist/chunks/{chunk-YEQ7BBOS.js → chunk-TWHV3M4I.js} +1 -1
- package/dist/chunks/{chunk-ABSFPYM4.js → chunk-UDZJCD5W.js} +1 -1
- package/dist/chunks/{chunk-C35XH6YM.js → chunk-UJKEX77T.js} +1 -1
- package/dist/chunks/chunk-UQZZX2J7.js +7 -0
- package/dist/chunks/{chunk-6Q2XEYCJ.js → chunk-VHSAI6FS.js} +1 -1
- package/dist/chunks/chunk-VRYJNBOR.js +7 -0
- package/dist/chunks/chunk-WJX5PGNN.js +7 -0
- package/dist/chunks/chunk-WZCLCG4J.js +7 -0
- package/dist/chunks/{chunk-GUSOYIW6.js → chunk-XDYVJWGX.js} +1 -1
- package/dist/chunks/{chunk-E7CEQ2PO.js → chunk-XECELSF5.js} +1 -1
- package/dist/chunks/chunk-XKPB27SC.js +8 -0
- package/dist/chunks/{chunk-2QYOZU6E.js → chunk-XPFVO6C6.js} +1 -1
- package/dist/chunks/{chunk-DCUWC7WP.js → chunk-XTLEX3PJ.js} +1 -1
- package/dist/chunks/chunk-Y3F3TOOX.js +10 -0
- package/dist/chunks/{chunk-6VUD3LZP.js → chunk-ZKQ47ZXI.js} +1 -1
- package/dist/chunks/chunk-ZRA5BQXP.js +27 -0
- package/dist/chunks/{chunk-MCLT57FD.js → chunk-ZTLBMY3L.js} +1 -1
- package/dist/chunks/{chunk-HIK5CJTT.js → chunk-ZUDCZSDX.js} +1 -1
- package/dist/chunks/{chunk-OFOZ5DBA.js → chunk-ZZD5W5KT.js} +1 -1
- package/dist/chunks/{clear-L4HSULAA.js → clear-GJJUFB2T.js} +1 -1
- package/dist/chunks/{cli-embedded-NCWN74UF.js → cli-embedded-6SKYFUXJ.js} +2 -3
- package/dist/chunks/{compile-vercel-config-3AD57TKS.js → compile-vercel-config-6X6PGKDP.js} +1 -1
- package/dist/chunks/{config-N4SB5PPU.js → config-PJG22P4Z.js} +1 -1
- package/dist/chunks/{config-E7OJDF2P.js → config-S5V6CZRI.js} +1 -1
- package/dist/chunks/config-validator.mjs +1 -1
- package/dist/chunks/{contract-EULMKZS4.js → contract-R7ZFR2S3.js} +1 -1
- package/dist/chunks/{delete-33WIMH3P.js → delete-K4E77OOH.js} +1 -1
- package/dist/chunks/{delete-45EEPRWI.js → delete-NPYVDIFP.js} +1 -1
- package/dist/chunks/{describe-QAF4MI7I.js → describe-P4GM6EO2.js} +1 -1
- package/dist/chunks/{detect-projects-XGIE3YBG.js → detect-projects-4GK5I7QF.js} +1 -1
- package/dist/chunks/{detect-services-AAVP4EBS.js → detect-services-RPRW33BU.js} +1 -1
- package/dist/chunks/{disable-H3Z7OJJE.js → disable-OVOL3LWV.js} +1 -1
- package/dist/chunks/{discard-KIEAG7NI.js → discard-WOXNVSDS.js} +1 -1
- package/dist/chunks/{edit-YQJNSZTX.js → edit-G4DQQ4RV.js} +1 -1
- package/dist/chunks/{edit-3Q36ZYIA.js → edit-TSHEL2Y4.js} +1 -1
- package/dist/chunks/{enable-BMB5D7AO.js → enable-TDASZXQQ.js} +1 -1
- package/dist/chunks/{engine-DkdkXQEy-FDYYIXY7.js → engine-DkdkXQEy-VKQPUSSO.js} +1 -1
- package/dist/chunks/{export-QQAZAQOU.js → export-3EX2GKDG.js} +1 -1
- package/dist/chunks/{future-TZACZMSV.js → future-JZGOH3V2.js} +1 -1
- package/dist/chunks/{generate-cert-for-deploy-EZM5MW2G.js → generate-cert-for-deploy-C7O33LOJ.js} +1 -1
- package/dist/chunks/{image-YAMHIRFF.js → image-OVUBWPST.js} +1 -1
- package/dist/chunks/{import-builders-DE7NPR7N.js → import-builders-FKD73NYP.js} +1 -1
- package/dist/chunks/{inspect-MFVWIQT4.js → inspect-AJR3QIH5.js} +1 -1
- package/dist/chunks/{inspect-QNZWH5O3.js → inspect-AV5FVCCK.js} +1 -1
- package/dist/chunks/{inspect-OHNQUBKI.js → inspect-SEXVZS4G.js} +1 -1
- package/dist/chunks/{inspect-DIH47SML.js → inspect-TBSVBZUN.js} +1 -1
- package/dist/chunks/{inspect-VCJDESUJ.js → inspect-V4SPH2NB.js} +1 -1
- package/dist/chunks/{inspect-Y5LG6JUC.js → inspect-ZJD2MJWC.js} +1 -1
- package/dist/chunks/{list-AYUHH7TO.js → list-C6FS72S5.js} +1 -1
- package/dist/chunks/{list-KB6YGNJZ.js → list-EBCMDKJS.js} +1 -1
- package/dist/chunks/{list-C7GYUVSJ.js → list-M77FQQFX.js} +1 -1
- package/dist/chunks/{list-YJSC2ST6.js → list-QJZEUHZD.js} +1 -1
- package/dist/chunks/{login-T2VKRCUS.js → login-6PBI6PM2.js} +1 -1
- package/dist/chunks/{login-E47LQVJN.js → login-XYSPQU6N.js} +1 -1
- package/dist/chunks/{logs-BLMH6Y45.js → logs-ANETOSUR.js} +1 -1
- package/dist/chunks/{ls-V6KTI55Z.js → ls-26I7XZBC.js} +1 -1
- package/dist/chunks/{ls-BPRVNFEB.js → ls-2YN4PHE6.js} +1 -1
- package/dist/chunks/{ls-CBV4C474.js → ls-AXYPC5JY.js} +1 -1
- package/dist/chunks/{ls-JOOH2AF2.js → ls-DK6563EC.js} +1 -1
- package/dist/chunks/{ls-GI4HMBK6.js → ls-OUPL2GET.js} +1 -1
- package/dist/chunks/{ls-EBJTSOO7.js → ls-W7P3L76L.js} +1 -1
- package/dist/chunks/{ls-5KNEE66N.js → ls-XXK4CXFN.js} +1 -1
- package/dist/chunks/{migrate-experimental-services-ZMZITRD4.js → migrate-experimental-services-MSGNPCL7.js} +1 -1
- package/dist/chunks/{mutate-5AQS53DH.js → mutate-IBPZFKJ5.js} +1 -1
- package/dist/chunks/{notifications-T74YEQUZ.js → notifications-D2EQYROT.js} +1 -1
- package/dist/chunks/{open-GUNAPG6S.js → open-CXDBD72L.js} +1 -1
- package/dist/chunks/openapi-XZOI5Q7B.js +7 -0
- package/dist/chunks/{permissions-BISSYSWA.js → permissions-BPXSQD6I.js} +1 -1
- package/dist/chunks/{plugin-offer-NIDPSYYJ.js → plugin-offer-SQNMTIYE.js} +1 -1
- package/dist/chunks/{prompt-missing-credentials-YR5RBSGW.js → prompt-missing-credentials-QM4NGCZD.js} +1 -1
- package/dist/chunks/{publish-D7EXNS3C.js → publish-5BKJUDF2.js} +1 -1
- package/dist/chunks/{pull-NQ2FQBCM.js → pull-L7VY77Y4.js} +1 -1
- package/dist/chunks/{purchase-domain-if-available-YG3AOXZ7.js → purchase-domain-if-available-P66IAKLA.js} +1 -1
- package/dist/chunks/{push-OCU3RUHV.js → push-ZDALENLW.js} +1 -1
- package/dist/chunks/query-N4C5TD22.js +7 -0
- package/dist/chunks/raw-query-A7U4PTQZ.js +8 -0
- package/dist/chunks/{reauthenticate-S7ZZYONP.js → reauthenticate-ZX6AMGZ6.js} +1 -1
- package/dist/chunks/{remove-LZTO47IA.js → remove-TRI7VSFC.js} +1 -1
- package/dist/chunks/{reorder-TMBGWMPR.js → reorder-BCRI7RUZ.js} +1 -1
- package/dist/chunks/{reply-55HPMB6K.js → reply-SFW3HYUS.js} +1 -1
- package/dist/chunks/{resolve-BTBTAK33.js → resolve-QK4KE7FE.js} +1 -1
- package/dist/chunks/{resolve-agent-team-3QXPCCT7.js → resolve-agent-team-Z7ZHCMLX.js} +1 -1
- package/dist/chunks/{restore-K6LCLHTG.js → restore-LWBDMFH2.js} +1 -1
- package/dist/chunks/{rm-CEUCQRIX.js → rm-7CDYQOBQ.js} +1 -1
- package/dist/chunks/{rm-I5PRDQHP.js → rm-KIPL54AA.js} +1 -1
- package/dist/chunks/{rm-UOP7BPBQ.js → rm-OWZAM6LM.js} +1 -1
- package/dist/chunks/{rm-LL6X65SS.js → rm-PMS5WEEL.js} +1 -1
- package/dist/chunks/{rm-4PSIPJUA.js → rm-WBSH2FU4.js} +1 -1
- package/dist/chunks/{rule-inspect-DKODR7X2.js → rule-inspect-O544YVJS.js} +1 -1
- package/dist/chunks/{schema-L3YB2LQE.js → schema-UYWLZVGF.js} +1 -1
- package/dist/chunks/{schema-LRVPWIYU.js → schema-XKG4E3TS.js} +1 -1
- package/dist/chunks/{select-org-JQBD5NDP.js → select-org-SGAC2GQ5.js} +1 -1
- package/dist/chunks/{serving-DKny38LK-UNINNTL5.js → serving-DKny38LK-WG5QDDEJ.js} +1 -1
- package/dist/chunks/{set-YBCB2ZLD.js → set-J4UEV5IF.js} +1 -1
- package/dist/chunks/{set-UMNUZAGG.js → set-NRTRIRMB.js} +1 -1
- package/dist/chunks/{setup-and-link-JRQ5DLOI.js → setup-and-link-ZXJW6CB4.js} +1 -1
- package/dist/chunks/{skills-DDFYTBGG.js → skills-GICDAOI2.js} +3 -1
- package/dist/chunks/{tags-WRH47Z4W.js → tags-5BLLDHDY.js} +1 -1
- package/dist/chunks/token-MYYNOUIT.js +7 -0
- package/dist/chunks/{token-util-KL35LHLQ.js → token-util-OJHS52JP.js} +1 -1
- package/dist/chunks/{types-NQECZN4K.js → types-HBXTZZAC.js} +1 -1
- package/dist/chunks/{update-FAMBH7PW.js → update-NXJ7PC5H.js} +1 -1
- package/dist/chunks/{usage-YACGLTPY.js → usage-6U2JZOPE.js} +1 -1
- package/dist/chunks/{validate-config-X6DF35VG.js → validate-config-6RVSBIWX.js} +1 -1
- package/dist/commands/build/index.js +1 -1
- package/dist/commands/deploy/index.js +11 -10
- package/dist/commands/dev/index.js +5 -5
- package/dist/commands/env/index.js +3 -3
- package/dist/commands/link/index.js +1 -1
- package/dist/commands/list/index.js +1 -1
- package/dist/commands/project/index.js +31 -29
- package/dist/commands/tunnel/index.js +1 -1
- package/dist/commands-account.js +18 -18
- package/dist/commands-ai.js +130 -80
- package/dist/commands-blob.js +16 -16
- package/dist/commands-core.js +9 -9
- package/dist/commands-deployments.js +1 -1
- package/dist/commands-flags.js +165 -142
- package/dist/commands-integrations.js +6 -6
- package/dist/commands-observability.js +3 -3
- package/dist/commands-routing.js +7 -7
- package/dist/help.js +1 -1
- package/dist/index.js +4 -4
- package/dist/internal-build.js +1 -1
- package/dist/package.json +41 -41
- package/dist/version.mjs +1 -1
- package/package.json +43 -43
- package/dist/chunks/chunk-3S7H6NCV.js +0 -20
- package/dist/chunks/chunk-5PAMKYPV.js +0 -14
- package/dist/chunks/chunk-AY523IYR.js +0 -7
- package/dist/chunks/chunk-DIHB5BUY.js +0 -8
- package/dist/chunks/chunk-EB7744O7.js +0 -24
- package/dist/chunks/chunk-EI4CUIVA.js +0 -7
- package/dist/chunks/chunk-EZVNGJN5.js +0 -7
- package/dist/chunks/chunk-HOGVBY6Q.js +0 -11
- package/dist/chunks/chunk-HSCWCGL7.js +0 -7
- package/dist/chunks/chunk-IIMHD3FA.js +0 -7
- package/dist/chunks/chunk-KRVZKKJV.js +0 -12
- package/dist/chunks/chunk-LNQAOLNW.js +0 -10
- package/dist/chunks/chunk-MZ7ITRVR.js +0 -12
- package/dist/chunks/chunk-SEHERY6U.js +0 -7
- package/dist/chunks/chunk-U2ZNF6HN.js +0 -8
- package/dist/chunks/chunk-UIGZMWS6.js +0 -16
- package/dist/chunks/chunk-YANOBY2G.js +0 -7
- package/dist/chunks/openapi-5WTF7EXK.js +0 -7
- package/dist/chunks/query-FM6SRTQP.js +0 -12
- package/dist/chunks/token-3ILJZPAZ.js +0 -7
- package/dist/chunks/token-JJLQVXPI.js +0 -7
- package/dist/chunks/token-util-A4BSB3KP.js +0 -7
- /package/dist/chunks/{chunk-WFS3XBAA.js → chunk-MRCM5VF5.js} +0 -0
- /package/dist/chunks/{chunk-SNGM6NSO.js → chunk-TK7K6GCG.js} +0 -0
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { createRequire as __createRequire } from 'node:module';
|
|
2
|
-
import { fileURLToPath as __fileURLToPath } from 'node:url';
|
|
3
|
-
import { dirname as __dirname_ } from 'node:path';
|
|
4
|
-
const require = __createRequire(import.meta.url);
|
|
5
|
-
const __filename = __fileURLToPath(import.meta.url);
|
|
6
|
-
const __dirname = __dirname_(__filename);
|
|
7
|
-
import{packageName}from"./chunk-B4KA3ZH2.js";import{environmentOption,formatOption,jsonOption,projectOption,sinceOption,untilOption}from"./chunk-EZVNGJN5.js";var schemaSubcommand={name:"schema",aliases:[],description:"List available metrics or inspect a specific metric.",arguments:[{name:"metric-or-prefix",required:!1}],options:[formatOption,jsonOption],examples:[{name:"List all metrics",value:`${packageName} metrics schema`},{name:"Show metric details",value:`${packageName} metrics schema vercel.function_invocation`},{name:"Schema as JSON for agents",value:`${packageName} metrics schema vercel.request.count --json`}]},metricsCommand={name:"metrics",aliases:[],description:"Query observability metrics for your Vercel project or team.",arguments:[{name:"metric-id",required:!1}],subcommands:[{name:"query",aliases:[],description:"",default:!0,hidden:!0,arguments:[],options:[],examples:[]},schemaSubcommand],options:[{name:"aggregation",shorthand:null,deprecatedShorthand:"a",type:String,deprecated:!1,description:"Aggregation function (default: sum for counts/bytes/currency, avg for durations/memory/ratios)",argument:"FN"},{name:"group-by",shorthand:null,type:[String],deprecated:!1,description:"Dimensions to group by (repeatable)",argument:"DIM"},{name:"limit",shorthand:"n",deprecatedShorthand:"l",type:Number,deprecated:!1,description:"Max groups per time bucket (default: 10)",argument:"N"},{name:"order-by",shorthand:null,type:String,deprecated:!1,description:"Order grouped results by value or count (default: count, or value when count is unsupported)",argument:"value|count"},{name:"order",shorthand:null,type:String,deprecated:!1,description:"Order direction for grouped results: asc or desc (default: desc)",argument:"asc|desc"},{name:"query",shorthand:"q",type:[String],deprecated:!1,description:"KQL filter expression (repeatable, ANDed together)",argument:"TEXT"},{name:"filter",shorthand:"f",type:[String],deprecated:!0,description:"Deprecated alias for `--query`",argument:"EXPR"},{...environmentOption,description:"Limit the query to one environment, such as production or preview"},{name:"prod",shorthand:null,type:Boolean,deprecated:!0,description:"Deprecated alias for `--environment production`"},{...sinceOption,description:`${sinceOption.description} (default: 1h ago)`},untilOption,{name:"granularity",shorthand:null,deprecatedShorthand:"g",type:String,deprecated:!1,description:"Time bucket size: 1m, 5m, 15m, 1h, 4h, 1d (default: auto; raised when too fine for the time range)",argument:"SIZE"},{name:"bucket-timezone",shorthand:null,type:String,deprecated:!1,description:"IANA timezone for calendar bucket alignment only; does not shift --since/--until or output timestamps (e.g., Europe/Paris)",argument:"ZONE"},{...projectOption,shorthand:"p"},{name:"all",shorthand:null,type:Boolean,deprecated:!1,description:"Query across all projects for the team"},formatOption,jsonOption],examples:[{name:"5xx errors by error code in the last hour",value:`${packageName} metrics vercel.function_invocation.count --query "httpStatus >= 500" --group-by errorCode --since 1h`},{name:"Function invocations by HTTP status code",value:`${packageName} metrics vercel.function_invocation.count --group-by httpStatus --since 6h`},{name:"Function duration by route",value:`${packageName} metrics vercel.function_invocation.function_duration_ms --aggregation avg --group-by route --since 1h`},{name:"AI Gateway costs by provider",value:`${packageName} metrics vercel.ai_gateway.request.cost --aggregation sum --group-by aiProvider --since 7d`},{name:"Core Web Vitals (LCP) by route",value:`${packageName} metrics vercel.speed_insights.lcp_ms --aggregation p75 --environment production --group-by route --since 7d`},{name:"Routes with the lowest p75 LCP",value:`${packageName} metrics vercel.speed_insights.lcp_ms --aggregation p75 --environment production --group-by route --since 7d --order-by value --order asc`},{name:"Daily pageviews",value:`${packageName} metrics vercel.analytics.page_view.count --since 7d --granularity 1d`},{name:"Visitors time series from the top 5 countries",value:`${packageName} metrics vercel.analytics.page_view.count --aggregation unique/visitorId --group-by country --since 1d --granularity 1h --limit 5`},{name:"List available metrics",value:`${packageName} metrics schema`},{name:"Function executions matching an API route",value:`${packageName} metrics vercel.function_invocation.count --query 'route:"/api"' --group-by route --since 1h`},{name:"Function executions matching multiple filters",value:`${packageName} metrics vercel.function_invocation.count --query "httpStatus >= 500" --query 'route:"/api"' --since 1h`},{name:"Show schema for a metric prefix",value:`${packageName} metrics schema vercel.request`},{name:"Team-wide function executions by project",value:`${packageName} metrics --all vercel.function_invocation.count --group-by projectId --since 24h`}]};export{schemaSubcommand,metricsCommand};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { createRequire as __createRequire } from 'node:module';
|
|
2
|
-
import { fileURLToPath as __fileURLToPath } from 'node:url';
|
|
3
|
-
import { dirname as __dirname_ } from 'node:path';
|
|
4
|
-
const require = __createRequire(import.meta.url);
|
|
5
|
-
const __filename = __fileURLToPath(import.meta.url);
|
|
6
|
-
const __dirname = __dirname_(__filename);
|
|
7
|
-
import{require_dist}from"./chunk-WKSXBH7X.js";import{__commonJS,__require}from"./chunk-BZENIQ7N.js";var require_token_error=__commonJS({"../../node_modules/.pnpm/@vercel+oidc@3.8.2/node_modules/@vercel/oidc/dist/token-error.js"(exports,module){"use strict";var __defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__hasOwnProp=Object.prototype.hasOwnProperty,__export=(target,all)=>{for(var name in all)__defProp(target,name,{get:all[name],enumerable:!0})},__copyProps=(to,from,except,desc)=>{if(from&&typeof from=="object"||typeof from=="function")for(let key of __getOwnPropNames(from))!__hasOwnProp.call(to,key)&&key!==except&&__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to},__toCommonJS=mod=>__copyProps(__defProp({},"__esModule",{value:!0}),mod),token_error_exports={};__export(token_error_exports,{VercelOidcTokenError:()=>VercelOidcTokenError});module.exports=__toCommonJS(token_error_exports);var VercelOidcTokenError=class extends Error{constructor(message,cause){super(message),this.name="VercelOidcTokenError",this.cause=cause}toString(){return this.cause?`${this.name}: ${this.message}: ${this.cause}`:`${this.name}: ${this.message}`}}}});var require_token_io=__commonJS({"../../node_modules/.pnpm/@vercel+oidc@3.8.2/node_modules/@vercel/oidc/dist/token-io.js"(exports,module){"use strict";var __create=Object.create,__defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__getProtoOf=Object.getPrototypeOf,__hasOwnProp=Object.prototype.hasOwnProperty,__export=(target,all)=>{for(var name in all)__defProp(target,name,{get:all[name],enumerable:!0})},__copyProps=(to,from,except,desc)=>{if(from&&typeof from=="object"||typeof from=="function")for(let key of __getOwnPropNames(from))!__hasOwnProp.call(to,key)&&key!==except&&__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to},__toESM=(mod,isNodeMode,target)=>(target=mod!=null?__create(__getProtoOf(mod)):{},__copyProps(isNodeMode||!mod||!mod.__esModule?__defProp(target,"default",{value:mod,enumerable:!0}):target,mod)),__toCommonJS=mod=>__copyProps(__defProp({},"__esModule",{value:!0}),mod),token_io_exports={};__export(token_io_exports,{findRootDir:()=>findRootDir,getUserDataDir:()=>getUserDataDir});module.exports=__toCommonJS(token_io_exports);var import_path=__toESM(__require("path")),import_fs=__toESM(__require("fs")),import_os=__toESM(__require("os")),import_token_error=require_token_error();function findRootDir(){try{let dir=process.cwd();for(;dir!==import_path.default.dirname(dir);){let pkgPath=import_path.default.join(dir,".vercel");if(import_fs.default.existsSync(pkgPath))return dir;dir=import_path.default.dirname(dir)}}catch{throw new import_token_error.VercelOidcTokenError("Token refresh only supported in node server environments")}return null}function getUserDataDir(){if(process.env.XDG_DATA_HOME)return process.env.XDG_DATA_HOME;switch(import_os.default.platform()){case"darwin":return import_path.default.join(import_os.default.homedir(),"Library/Application Support");case"linux":return import_path.default.join(import_os.default.homedir(),".local/share");case"win32":return process.env.LOCALAPPDATA?process.env.LOCALAPPDATA:null;default:return null}}}});var require_oauth=__commonJS({"../../node_modules/.pnpm/@vercel+oidc@3.8.2/node_modules/@vercel/oidc/dist/oauth.js"(exports,module){"use strict";var __defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__hasOwnProp=Object.prototype.hasOwnProperty,__export=(target,all)=>{for(var name in all)__defProp(target,name,{get:all[name],enumerable:!0})},__copyProps=(to,from,except,desc)=>{if(from&&typeof from=="object"||typeof from=="function")for(let key of __getOwnPropNames(from))!__hasOwnProp.call(to,key)&&key!==except&&__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to},__toCommonJS=mod=>__copyProps(__defProp({},"__esModule",{value:!0}),mod),oauth_exports={};__export(oauth_exports,{processTokenResponse:()=>processTokenResponse,refreshTokenRequest:()=>refreshTokenRequest});module.exports=__toCommonJS(oauth_exports);var import_os=__require("os"),VERCEL_ISSUER="https://vercel.com",VERCEL_CLI_CLIENT_ID="cl_HYyOPBNtFMfHhaUn9L4QPfTZz6TP47bp",userAgent=`@vercel/oidc node-${process.version} ${(0,import_os.platform)()} (${(0,import_os.arch)()}) ${(0,import_os.hostname)()}`,_tokenEndpoint=null;async function getTokenEndpoint(){if(_tokenEndpoint)return _tokenEndpoint;let discoveryUrl=`${VERCEL_ISSUER}/.well-known/openid-configuration`,response=await fetch(discoveryUrl,{headers:{"user-agent":userAgent}});if(!response.ok)throw new Error("Failed to discover OAuth endpoints");let metadata=await response.json();if(!metadata||typeof metadata.token_endpoint!="string")throw new Error("Invalid OAuth discovery response");let endpoint=metadata.token_endpoint;return _tokenEndpoint=endpoint,endpoint}async function refreshTokenRequest(options){let tokenEndpoint=await getTokenEndpoint();return await fetch(tokenEndpoint,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded","user-agent":userAgent},body:new URLSearchParams({client_id:VERCEL_CLI_CLIENT_ID,grant_type:"refresh_token",...options})})}async function processTokenResponse(response){let json=await response.json();if(!response.ok){let errorMsg=typeof json=="object"&&json&&"error"in json?String(json.error):"Token refresh failed";return[new Error(errorMsg)]}return typeof json!="object"||json===null?[new Error("Invalid token response")]:typeof json.access_token!="string"?[new Error("Missing access_token in response")]:json.token_type!=="Bearer"?[new Error("Invalid token_type in response")]:typeof json.expires_in!="number"?[new Error("Missing expires_in in response")]:[null,json]}}});var require_auth_errors=__commonJS({"../../node_modules/.pnpm/@vercel+oidc@3.8.2/node_modules/@vercel/oidc/dist/auth-errors.js"(exports,module){"use strict";var __defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__hasOwnProp=Object.prototype.hasOwnProperty,__export=(target,all)=>{for(var name in all)__defProp(target,name,{get:all[name],enumerable:!0})},__copyProps=(to,from,except,desc)=>{if(from&&typeof from=="object"||typeof from=="function")for(let key of __getOwnPropNames(from))!__hasOwnProp.call(to,key)&&key!==except&&__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to},__toCommonJS=mod=>__copyProps(__defProp({},"__esModule",{value:!0}),mod),auth_errors_exports={};__export(auth_errors_exports,{AccessTokenMissingError:()=>AccessTokenMissingError,RefreshAccessTokenFailedError:()=>RefreshAccessTokenFailedError});module.exports=__toCommonJS(auth_errors_exports);var AccessTokenMissingError=class extends Error{constructor(){super("No authentication found. Please log in with the Vercel CLI (vercel login)."),this.name="AccessTokenMissingError"}},RefreshAccessTokenFailedError=class extends Error{constructor(cause){super("Failed to refresh authentication token."),this.name="RefreshAccessTokenFailedError",cause!==void 0&&(this.cause=cause)}}}});var require_token_util=__commonJS({"../../node_modules/.pnpm/@vercel+oidc@3.8.2/node_modules/@vercel/oidc/dist/token-util.js"(exports,module){var __create=Object.create,__defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__getProtoOf=Object.getPrototypeOf,__hasOwnProp=Object.prototype.hasOwnProperty,__export=(target,all)=>{for(var name in all)__defProp(target,name,{get:all[name],enumerable:!0})},__copyProps=(to,from,except,desc)=>{if(from&&typeof from=="object"||typeof from=="function")for(let key of __getOwnPropNames(from))!__hasOwnProp.call(to,key)&&key!==except&&__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to},__toESM=(mod,isNodeMode,target)=>(target=mod!=null?__create(__getProtoOf(mod)):{},__copyProps(isNodeMode||!mod||!mod.__esModule?__defProp(target,"default",{value:mod,enumerable:!0}):target,mod)),__toCommonJS=mod=>__copyProps(__defProp({},"__esModule",{value:!0}),mod),token_util_exports={};__export(token_util_exports,{assertVercelOidcTokenResponse:()=>assertVercelOidcTokenResponse,findProjectInfo:()=>findProjectInfo,getTokenPayload:()=>getTokenPayload,getVercelOidcToken:()=>getVercelOidcToken,getVercelOidcTokenFromCli:()=>getVercelOidcTokenFromCli,getVercelToken:()=>getVercelToken,isExpired:()=>isExpired,loadToken:()=>loadToken,saveToken:()=>saveToken});module.exports=__toCommonJS(token_util_exports);var path=__toESM(__require("path")),fs=__toESM(__require("fs")),import_cli_exec=require_dist(),import_cli_config=__require("@vercel/cli-config"),import_token_error=require_token_error(),import_token_io=require_token_io(),import_oauth=require_oauth(),import_auth_errors=require_auth_errors();async function getVercelToken(options){let configDir=(0,import_cli_config.getGlobalPathConfig)(),authConfig=(0,import_cli_config.tryReadAuthConfig)(configDir);if(!authConfig||!authConfig.token&&!authConfig.refreshToken)throw new import_auth_errors.AccessTokenMissingError;if(isValidAccessToken(authConfig,options?.expirationBufferMs))return authConfig.token;if(!authConfig.refreshToken)throw(0,import_cli_config.writeAuthConfig)(configDir,{}),new import_auth_errors.RefreshAccessTokenFailedError("No refresh token available");try{let tokenResponse=await(0,import_oauth.refreshTokenRequest)({refresh_token:authConfig.refreshToken}),[tokensError,tokens]=await(0,import_oauth.processTokenResponse)(tokenResponse);if(tokensError||!tokens)throw(0,import_cli_config.writeAuthConfig)(configDir,{}),new import_auth_errors.RefreshAccessTokenFailedError(tokensError);let updatedConfig={token:tokens.access_token,expiresAt:Math.floor(Date.now()/1e3)+tokens.expires_in,refreshToken:tokens.refresh_token};return(0,import_cli_config.writeAuthConfig)(configDir,updatedConfig),updatedConfig.token}catch(error){throw(0,import_cli_config.writeAuthConfig)(configDir,{}),error instanceof import_auth_errors.AccessTokenMissingError||error instanceof import_auth_errors.RefreshAccessTokenFailedError?error:new import_auth_errors.RefreshAccessTokenFailedError(error)}}function isValidAccessToken(authConfig,expirationBufferMs=0){if(!authConfig.token)return!1;if(typeof authConfig.expiresAt!="number")return!0;let nowInSeconds=Math.floor(Date.now()/1e3),bufferInSeconds=expirationBufferMs/1e3;return authConfig.expiresAt>=nowInSeconds+bufferInSeconds}async function getVercelOidcTokenFromCli(projectId,teamId){let args=["project","token",projectId,"--format=json"];teamId&&args.push("--scope",teamId);try{let{stdout}=await(0,import_cli_exec.execVercelCli)(args),parsedOutput;if(typeof stdout!="string")throw new import_token_error.VercelOidcTokenError("Failed to refresh OIDC token: `vercel project token` did not return stdout");try{parsedOutput=JSON.parse(stdout)}catch{throw new import_token_error.VercelOidcTokenError("Failed to refresh OIDC token: `vercel project token` returned invalid JSON: "+stdout)}return assertVercelOidcTokenResponse(parsedOutput),parsedOutput}catch(error){if(error instanceof import_token_error.VercelOidcTokenError)throw error;let message=error instanceof Error?error.message:"",stderr=error instanceof import_cli_exec.VercelCliError?error.stderr?.trim():void 0;throw stderr&&!message.includes(stderr)&&(message=`${message}
|
|
8
|
-
${stderr}`.trim()),new import_token_error.VercelOidcTokenError(message?`Failed to refresh OIDC token with the Vercel CLI: ${message}`:"Failed to refresh OIDC token with the Vercel CLI")}}async function getVercelOidcToken(authToken,projectId,teamId){let url=`https://api.vercel.com/v1/projects/${projectId}/token?source=vercel-oidc-refresh${teamId?`&teamId=${teamId}`:""}`,res=await fetch(url,{method:"POST",headers:{Authorization:`Bearer ${authToken}`}});if(!res.ok)throw new import_token_error.VercelOidcTokenError(`Failed to refresh OIDC token: ${res.statusText}`);let tokenRes=await res.json();return assertVercelOidcTokenResponse(tokenRes),tokenRes}function assertVercelOidcTokenResponse(res){if(!res||typeof res!="object")throw new TypeError("Vercel OIDC token is malformed. Expected an object.");if(!("token"in res)||typeof res.token!="string")throw new TypeError("Vercel OIDC token is malformed. Expected a string-valued token property.")}function findProjectInfo(){let dir=(0,import_token_io.findRootDir)();if(!dir)throw new import_token_error.VercelOidcTokenError("Unable to find project root directory. Have you linked your project with `vc link?`");let prjPath=path.join(dir,".vercel","project.json");if(!fs.existsSync(prjPath))throw new import_token_error.VercelOidcTokenError("project.json not found, have you linked your project with `vc link?`");let prj=JSON.parse(fs.readFileSync(prjPath,"utf8"));if(typeof prj.projectId!="string"&&typeof prj.orgId!="string")throw new TypeError("Expected a string-valued projectId property. Try running `vc link` to re-link your project.");return{projectId:prj.projectId,teamId:prj.orgId}}function saveToken(token,projectId){let dir=(0,import_token_io.getUserDataDir)();if(!dir)throw new import_token_error.VercelOidcTokenError("Unable to find user data directory. Please reach out to Vercel support.");let tokenPath=path.join(dir,"com.vercel.token",`${projectId}.json`),tokenJson=JSON.stringify(token);fs.mkdirSync(path.dirname(tokenPath),{mode:504,recursive:!0}),fs.writeFileSync(tokenPath,tokenJson),fs.chmodSync(tokenPath,432)}function loadToken(projectId){let dir=(0,import_token_io.getUserDataDir)();if(!dir)throw new import_token_error.VercelOidcTokenError("Unable to find user data directory. Please reach out to Vercel support.");let tokenPath=path.join(dir,"com.vercel.token",`${projectId}.json`);if(!fs.existsSync(tokenPath))return null;let token=JSON.parse(fs.readFileSync(tokenPath,"utf8"));return assertVercelOidcTokenResponse(token),token}function getTokenPayload(token){let tokenParts=token.split(".");if(tokenParts.length!==3)throw new import_token_error.VercelOidcTokenError("Invalid token.");let base64=tokenParts[1].replace(/-/g,"+").replace(/_/g,"/"),padded=base64.padEnd(base64.length+(4-base64.length%4)%4,"=");return JSON.parse(Buffer.from(padded,"base64").toString("utf8"))}function isExpired(token,bufferMs=0){return token.exp*1e3<Date.now()+bufferMs}}});export{require_token_error,require_auth_errors,require_token_util};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { createRequire as __createRequire } from 'node:module';
|
|
2
|
-
import { fileURLToPath as __fileURLToPath } from 'node:url';
|
|
3
|
-
import { dirname as __dirname_ } from 'node:path';
|
|
4
|
-
const require = __createRequire(import.meta.url);
|
|
5
|
-
const __filename = __fileURLToPath(import.meta.url);
|
|
6
|
-
const __dirname = __dirname_(__filename);
|
|
7
|
-
import{getResolvedOrderMetadata,getRollupColumnName}from"./chunk-KRVZKKJV.js";import{formatGranularity}from"./chunk-IVSSTHB6.js";import{ellipsizeMiddle}from"./chunk-TOTTVS5P.js";import{elapsed}from"./chunk-Q7D7RGXM.js";import{indent_default}from"./chunk-GZNDA6SV.js";import{table}from"./chunk-CJZE7647.js";import{require_ms}from"./chunk-MXTC4ZAQ.js";import{require_source}from"./chunk-NB2WLB3J.js";import{__toESM}from"./chunk-BZENIQ7N.js";var CANONICAL_AGGREGATIONS=["count","sum","avg","min","max","p50","p75","p90","p95","p99","stddev"];function isCanonicalAggregation(aggregation){return CANONICAL_AGGREGATIONS.includes(aggregation)}var DURATION_UNITS=new Set(["nanoseconds","microseconds","milliseconds","seconds","minutes","hours","days"]);function normalizeMetricUnit(unit){return unit.trim().toLowerCase().replace(/[_\s]+/g," ")}function getPreferredCustomMetricAggregation(unit){let normalizedUnit=normalizeMetricUnit(unit);return DURATION_UNITS.has(normalizedUnit)?"p75":normalizedUnit==="percent"?"avg":"sum"}function getDefaultCustomMetricAggregation(unit,aggregations){let preferredAggregation=getPreferredCustomMetricAggregation(unit);return aggregations?.includes(preferredAggregation)?preferredAggregation:aggregations?.includes("sum")?"sum":aggregations?.find(isCanonicalAggregation)}var import_ms=__toESM(require_ms(),1),MINUTE_MS=60*1e3,HOUR_MS=60*MINUTE_MS,DAY_MS=24*HOUR_MS;function toGranularityDuration(input){let milliseconds=(0,import_ms.default)(input);if(milliseconds===void 0)throw new Error(`Invalid granularity format "${input}". Use 1m, 5m, 15m, 1h, 4h, 1d.`);return milliseconds>=DAY_MS?{days:milliseconds/DAY_MS}:milliseconds>=HOUR_MS?{hours:milliseconds/HOUR_MS}:{minutes:milliseconds/MINUTE_MS}}function toGranularityMs(input){let milliseconds=(0,import_ms.default)(input);if(milliseconds===void 0)throw new Error(`Invalid granularity format "${input}".`);return milliseconds}var GRANULARITY_THRESHOLDS=[[1*HOUR_MS,"1m","1m"],[2*HOUR_MS,"5m","5m"],[12*HOUR_MS,"15m","5m"],[3*DAY_MS,"1h","1h"],[30*DAY_MS,"4h","4h"]],FALLBACK_GRANULARITY="1d";function getAutoGranularity(rangeMs){for(let[maxRange,defaultG]of GRANULARITY_THRESHOLDS)if(rangeMs<=maxRange)return defaultG;return FALLBACK_GRANULARITY}function getMinGranularity(rangeMs){for(let[maxRange,,minG]of GRANULARITY_THRESHOLDS)if(rangeMs<=maxRange)return minG;return FALLBACK_GRANULARITY}function computeGranularity(rangeMs,explicit){if(!explicit){let auto=getAutoGranularity(rangeMs);return{duration:toGranularityDuration(auto),adjusted:!1}}let minG=getMinGranularity(rangeMs),explicitMs=toGranularityMs(explicit),minMs=toGranularityMs(minG);if(explicitMs<minMs){let rangeDays=Math.round(rangeMs/DAY_MS),rangeHours=Math.round(rangeMs/HOUR_MS),rangeLabel=rangeDays>=1?`${rangeDays}-day`:`${rangeHours}-hour`;return{duration:toGranularityDuration(minG),adjusted:!0,notice:`Granularity adjusted from ${explicit} to ${minG} for a ${rangeLabel} time range.`}}return{duration:toGranularityDuration(explicit),adjusted:!1}}function toGranularityMsFromDuration(duration){return"minutes"in duration?duration.minutes*MINUTE_MS:"hours"in duration?duration.hours*HOUR_MS:duration.days*DAY_MS}var import_chalk=__toESM(require_source(),1);var GROUP_KEY_DELIMITER="",MAX_SPARKLINE_LENGTH=120,DURATION_SCALE_MS={seconds:1e3,minutes:6e4,hours:36e5,days:864e5},BYTE_SCALE={bytes:1,kilobytes:1e3,megabytes:1e6,gigabytes:1e9,terabytes:1e12,petabytes:1e15},COMPACT_NUMBER_FORMATTER=new Intl.NumberFormat("en-US",{notation:"compact",compactDisplay:"short"}),TWO_FRACTION_NUMBER_FORMATTER=new Intl.NumberFormat("en-US",{maximumFractionDigits:2}),TWO_SIGNIFICANT_NUMBER_FORMATTER=new Intl.NumberFormat("en-US",{minimumSignificantDigits:2,maximumSignificantDigits:2,maximumFractionDigits:2}),PERCENTAGE_FORMATTER=new Intl.NumberFormat("en-US",{style:"unit",unit:"percent",unitDisplay:"narrow",maximumFractionDigits:1}),USD_FORMATTER=new Intl.NumberFormat("en-US",{style:"currency",currency:"USD",minimumFractionDigits:2,maximumFractionDigits:2}),BLOCKS=["\u2581","\u2582","\u2583","\u2584","\u2585","\u2586","\u2587","\u2588"],MISSING_CHAR="\xB7";function isAggregationWithDimension(aggregation){let[,dimension]=aggregation.split("/");return!!dimension}function toGroupKey(groupValues){return groupValues.length===0?"":groupValues.join(GROUP_KEY_DELIMITER)}function pad2(n){return String(n).padStart(2,"0")}function pad4(n){return String(n).padStart(4,"0")}function formatHumanMinute(date){return`${pad4(date.getUTCFullYear())}-${pad2(date.getUTCMonth()+1)}-${pad2(date.getUTCDate())} ${pad2(date.getUTCHours())}:${pad2(date.getUTCMinutes())}`}function formatPeriodBound(input){let date=new Date(input);return isNaN(date.getTime())?input:formatHumanMinute(date)}function formatPeriodSpan(startInput,endInput){let start=Date.parse(startInput),durationMs=Date.parse(endInput)-start;return!Number.isFinite(durationMs)||durationMs<=0?null:elapsed(durationMs)}function getStatColumns(aggregation){return aggregation==="sum"||aggregation==="count"?["total","avg","min","max"]:["avg","min","max"]}function toNumericValue(value){if(value==null)return null;if(typeof value=="number")return Number.isFinite(value)?value:null;let parsed=Number(value);return Number.isFinite(parsed)?parsed:null}function isNonNullNumber(value){return value!==null}function isPointWithValue(point){return point.value!==null}function getOrCreate(map,key,make){let existing=map.get(key);if(existing!==void 0)return existing;let created=make();return map.set(key,created),created}function getGroupFieldValue(row,field){let value=row[field];return value==null||value===""?"(not set)":String(value)}function normalizeTimestampToIso(timestamp){let parsed=Date.parse(timestamp);return isNaN(parsed)?null:new Date(parsed).toISOString()}function formatStatCell(column,stats,periodStart,periodEnd,formatValue){switch(column){case"total":return formatValue(stats.total);case"avg":return formatValue(stats.avg,{preserveFractionalCount:!0});case"min":{let ts=formatMinMaxTimestamp(new Date(stats.min.timestamp),periodStart,periodEnd);return`${formatValue(stats.min.value)} at ${ts}`}case"max":{let ts=formatMinMaxTimestamp(new Date(stats.max.timestamp),periodStart,periodEnd);return`${formatValue(stats.max.value)} at ${ts}`}}}function buildExpectedTimestamps(periodStart,periodEnd,granularityMs){let start=Date.parse(periodStart),end=Date.parse(periodEnd);if(isNaN(start)||isNaN(end)||granularityMs<=0||end<=start)return[];let timestamps=[];for(let current=start;current<end;current+=granularityMs)timestamps.push(new Date(current).toISOString());return timestamps}function buildObservedTimestamps(observedTimestamps,granularityMs){let timestamps=[...observedTimestamps].map(timestamp=>Date.parse(timestamp)).filter(Number.isFinite).sort((a,b)=>a-b);if(timestamps.length===0||granularityMs<=0)return[];let start=timestamps[0],end=timestamps[timestamps.length-1]+granularityMs;return buildExpectedTimestamps(new Date(start).toISOString(),new Date(end).toISOString(),granularityMs)}function buildSeriesTimestamps(periodStart,periodEnd,granularityMs,observedTimestamps){let expectedTimestamps=buildExpectedTimestamps(periodStart,periodEnd,granularityMs);return observedTimestamps.size===0||expectedTimestamps.some(timestamp=>observedTimestamps.has(timestamp))?expectedTimestamps:buildObservedTimestamps(observedTimestamps,granularityMs)}function formatCount(n){return Math.round(n).toLocaleString("en-US")}function formatDecimal(n){if(!Number.isFinite(n))return String(n);if(n===0||Object.is(n,-0))return"0";let sign=n<0?"-":"",abs=Math.abs(n);if(abs>=1)return`${sign}${abs.toFixed(1)}`;let exponent=Math.floor(Math.log10(abs)),decimals=Math.min(20,Math.max(2,-exponent+1)),trimmed=abs.toFixed(decimals).replace(/(\.\d*?[1-9])0+$/,"$1").replace(/\.0+$/,"").replace(/\.$/,"");return`${sign}${trimmed}`}function formatDuration(durationMs){let durationSeconds=durationMs/1e3;return durationMs<1e3?`${durationMs.toFixed(0)}ms`:durationMs<5e3?`${Math.round(durationSeconds*100)/100}s`:durationSeconds<60?`${durationSeconds.toFixed(0)}s`:durationSeconds<3600?`${(durationSeconds/60).toFixed(0)}m`:`${(durationSeconds/3600).toFixed(0)}h`}function formatBytes(bytes){if(bytes===0)return"0 Bytes";let units=["Bytes","KB","MB","GB","TB","PB"],absoluteBytes=Math.abs(bytes),unitIndex=Math.min(units.length-1,Math.max(0,Math.floor(Math.log(absoluteBytes)/Math.log(1e3)))),value=bytes/1e3**unitIndex;return(unitIndex===1||unitIndex===2)&&(value=Math.round(value),Math.abs(value)===1e3&&unitIndex<units.length-1&&(value/=1e3,unitIndex+=1)),`${TWO_FRACTION_NUMBER_FORMATTER.format(value)} ${units[unitIndex]}`}function formatMetricValue(value,baseUnit,aggregation,opts){let formatCountValue=()=>opts?.preserveFractionalCount&&!Number.isInteger(value)?formatDecimal(value):formatCount(value);if(isAggregationWithDimension(aggregation)||aggregation==="count")return formatCountValue();let unit=normalizeMetricUnit(baseUnit??"units");if(aggregation==="percent"||unit==="percent")return PERCENTAGE_FORMATTER.format(value);if(aggregation==="unique")return COMPACT_NUMBER_FORMATTER.format(value);let withRateSuffix=formatted2=>aggregation==="persecond"?`${formatted2}/s`:formatted2;if(unit==="milliseconds")return withRateSuffix(formatDuration(value));let durationScale=DURATION_SCALE_MS[unit];if(durationScale)return withRateSuffix(formatDuration(value*durationScale));if(unit==="nanoseconds"||unit==="microseconds"){let suffix=unit==="nanoseconds"?" ns":" \xB5s",formatted2=TWO_FRACTION_NUMBER_FORMATTER.format(value);return withRateSuffix(`${formatted2}${suffix}`)}let byteScale=BYTE_SCALE[unit];if(byteScale)return withRateSuffix(formatBytes(value*byteScale));if(unit==="gigabyte hour"||unit==="gigabyte hours"){let formatted2=TWO_SIGNIFICANT_NUMBER_FORMATTER.format(value);return withRateSuffix(`${formatted2} GB-hrs`)}if(unit==="usd"||unit==="us dollars"||unit==="dollars")return withRateSuffix(USD_FORMATTER.format(value));if(unit==="count"&&aggregation==="sum")return formatCountValue();let formatted=COMPACT_NUMBER_FORMATTER.format(value),unitLabel=baseUnit?.trim();return withRateSuffix(!unitLabel||unit==="units"||unit==="count"||unit==="ratio"?formatted:`${formatted} ${unitLabel}`)}function formatMinMaxTimestamp(date,periodStart,periodEnd){return periodStart.getUTCFullYear()===periodEnd.getUTCFullYear()&&periodStart.getUTCMonth()===periodEnd.getUTCMonth()&&periodStart.getUTCDate()===periodEnd.getUTCDate()?`${pad2(date.getUTCHours())}:${pad2(date.getUTCMinutes())}`:periodStart.getUTCFullYear()===periodEnd.getUTCFullYear()?`${pad2(date.getUTCMonth()+1)}-${pad2(date.getUTCDate())} ${pad2(date.getUTCHours())}:${pad2(date.getUTCMinutes())}`:`${pad4(date.getUTCFullYear())}-${pad2(date.getUTCMonth()+1)}-${pad2(date.getUTCDate())} ${pad2(date.getUTCHours())}:${pad2(date.getUTCMinutes())}`}function extractGroupedSeries(data,groupBy,rollupColumn,periodStart,periodEnd,granularityMs){let groups=[],groupValues=new Map,valueByGroup=new Map,observedTimestamps=new Set;for(let row of data){let values=groupBy.map(field=>getGroupFieldValue(row,field)),key=toGroupKey(values);groupValues.has(key)||(groups.push(key),groupValues.set(key,values));let groupMap=getOrCreate(valueByGroup,key,()=>new Map),rawTimestamp=row.timestamp;if(rawTimestamp.length===0)continue;let timestamp=normalizeTimestampToIso(rawTimestamp);if(!timestamp)continue;observedTimestamps.add(timestamp);let numeric=toNumericValue(row[rollupColumn]);groupMap.set(timestamp,numeric)}let expectedTimestamps=buildSeriesTimestamps(periodStart,periodEnd,granularityMs,observedTimestamps),series=new Map;for(let key of groups){let byTimestamp=valueByGroup.get(key);if(!byTimestamp)continue;let points=expectedTimestamps.map(timestamp=>({timestamp,value:byTimestamp.has(timestamp)?byTimestamp.get(timestamp)??null:null}));series.set(key,points)}return{groups,series,groupValues}}function computeGroupStats(points){let present=points.filter(isPointWithValue);if(present.length===0)return{total:0,avg:0,min:{value:0,timestamp:""},max:{value:0,timestamp:""},count:0,allMissing:!0};let total=0,min=present[0],max=present[0];for(let point of present)total+=point.value,point.value<min.value&&(min=point),point.value>max.value&&(max=point);return{total,avg:total/present.length,min:{value:min.value,timestamp:min.timestamp},max:{value:max.value,timestamp:max.timestamp},count:present.length,allMissing:!1}}var MAX_GROUP_VALUE_LENGTH=60;function downsample(values,maxLen){if(maxLen<=0)return[];if(values.length<=maxLen)return[...values];let result=[];for(let i=0;i<maxLen;i++){let start=Math.floor(i*values.length/maxLen),end=Math.floor((i+1)*values.length/maxLen),bucket=values.slice(start,Math.max(start+1,end)),nullCount=bucket.filter(value=>value===null).length;if(nullCount===bucket.length||nullCount>bucket.length/2){result.push(null);continue}let present=bucket.filter(isNonNullNumber),avg=present.reduce((sum,value)=>sum+value,0)/present.length;result.push(avg)}return result}function generateSparkline(values,options={}){let sampled=downsample(values,options.maxLength??MAX_SPARKLINE_LENGTH);if(sampled.length===0)return"";let present=sampled.filter(isNonNullNumber);if(present.length===0)return sampled.map(()=>MISSING_CHAR).join("");let min=options.scale?.min??Math.min(...present),max=options.scale?.max??Math.max(...present);if(min===max){let block=min===0?BLOCKS[0]:BLOCKS[BLOCKS.length-1];return sampled.map(value=>value===null?MISSING_CHAR:block).join("")}let range=max-min;return sampled.map(value=>{if(value===null)return MISSING_CHAR;let ratio=(value-min)/range,index=Math.max(0,Math.min(BLOCKS.length-1,Math.round(ratio*(BLOCKS.length-1))));return BLOCKS[index]}).join("")}function formatMetadataHeader(opts){let periodSpan=opts.compact?formatPeriodSpan(opts.periodStart,opts.periodEnd):null,rows=[];return opts.compact||rows.push({key:"Metric",value:`${opts.metric} ${opts.aggregation}`}),rows.push({key:"Period",value:`${formatPeriodBound(opts.periodStart)} to ${formatPeriodBound(opts.periodEnd)} (UTC)${periodSpan?` ${periodSpan}`:""}`},{key:"Interval",value:"days"in opts.granularity?`${formatGranularity(opts.granularity)} (${opts.bucketTimezone??"UTC"})`:formatGranularity(opts.granularity)}),typeof opts.periodUnique=="number"&&rows.push({key:"Unique (period)",value:formatCount(opts.periodUnique)}),!opts.compact&&opts.filter&&rows.push({key:"Filter",value:opts.filter}),!opts.compact&&opts.orderBy&&opts.orderDirection&&rows.push({key:"Order By",value:`${opts.orderBy} ${opts.orderDirection}${opts.orderBy==="count"?" (default)":""}`}),opts.scope.type==="project"?rows.push({key:"Project",value:`${opts.projectName??opts.scope.projectIds[0]} (${opts.teamName??opts.scope.ownerId})`}):rows.push({key:"Team",value:`${opts.teamName??opts.scope.ownerId} (all projects)`}),!opts.compact&&typeof opts.groupCount=="number"&&rows.push({key:"Groups",value:String(opts.groupCount)}),rows.map(row=>`> ${import_chalk.default.gray(`${row.key}:`)} ${row.value}`).join(`
|
|
8
|
-
`)}function formatSummaryTable(opts){let statColumns=getStatColumns(opts.aggregation),header=[...opts.groupByFields,...statColumns],rows=[header.map(name=>import_chalk.default.bold(import_chalk.default.cyan(name)))];for(let row of opts.rows){let nextRow=row.groupValues.map(v=>ellipsizeMiddle(v,MAX_GROUP_VALUE_LENGTH,opts.ansiAwareGroupValues));if(row.stats.allMissing){nextRow.push(...statColumns.map(()=>"--")),rows.push(nextRow);continue}nextRow.push(...statColumns.map(column=>formatStatCell(column,row.stats,opts.periodStart,opts.periodEnd,opts.formatValue))),rows.push(nextRow)}let centeredColumns=new Set(["min","max"]),align=header.map(col=>centeredColumns.has(col)?"c":"r");return indent_default(table(rows,{align,hsep:2}),2)}function formatSparklineSection(groupRows,sparklines,groupByFields,compact=!1){if(groupRows.length===0){let sparkline=sparklines[0],chart2=sparkline?indent_default(sparkline,2):"";return compact?chart2:["sparklines:",chart2].filter(Boolean).join(`
|
|
9
|
-
`)}let rows=[[...groupByFields,compact?"":"sparkline"].map(name=>import_chalk.default.bold(import_chalk.default.cyan(name))),...groupRows.map((groupValues,index)=>[...groupValues.map(v=>ellipsizeMiddle(v,MAX_GROUP_VALUE_LENGTH,compact)),sparklines[index]??""])],align=groupByFields.map(()=>"r");align.push("l");let chart=indent_default(table(rows,{align,hsep:2}),2);return compact?chart:`sparklines:
|
|
10
|
-
${chart}`}function formatText(response,opts){let rollupColumn=getRollupColumnName(opts.metric,opts.aggregation),formatValue=(value,formatOptions)=>formatMetricValue(value,opts.metricUnit,opts.aggregation,formatOptions),granularityMs=toGranularityMsFromDuration(opts.granularity),orderMetadata=getResolvedOrderMetadata(opts,response),{groups,series,groupValues}=extractGroupedSeries(response.data??[],opts.groupBy,rollupColumn,opts.periodStart,opts.periodEnd,granularityMs),periodUnique;if(isAggregationWithDimension(opts.aggregation)&&opts.groupBy.length===0){let summaryValue=toNumericValue(response.summary?.[0]?.[rollupColumn]);summaryValue!==null&&(periodUnique=summaryValue)}let metadata=formatMetadataHeader({metric:opts.metric,aggregation:opts.aggregation,periodStart:opts.periodStart,periodEnd:opts.periodEnd,granularity:opts.granularity,periodUnique,bucketTimezone:opts.bucketTimezone,filter:opts.filter,...opts.groupBy.length>0?orderMetadata:{},scope:opts.scope,projectName:opts.projectName,teamName:opts.teamName,groupCount:opts.groupBy.length>0?groups.length:void 0,compact:opts.presentation?.compact});if(groups.length===0)return`${metadata}
|
|
11
|
-
|
|
12
|
-
No data found for this period.
|
|
13
|
-
`;let summaryRows=[],groupRows=[],sparklineRows=[];for(let key of groups){let points=series.get(key)??[],values=points.map(point=>point.value),displayGroupValues=(groupValues.get(key)??[]).map((value,index)=>{let field=opts.groupBy[index];return opts.presentation?.formatGroupValue?.(field,value)??value});summaryRows.push({groupValues:displayGroupValues,stats:computeGroupStats(points)}),groupRows.push(displayGroupValues),sparklineRows.push(generateSparkline(values))}let summaryTable=formatSummaryTable({rows:summaryRows,groupByFields:opts.groupBy,aggregation:opts.aggregation,periodStart:new Date(opts.periodStart),periodEnd:new Date(opts.periodEnd),formatValue,ansiAwareGroupValues:opts.presentation?.compact}),groupedOutput=opts.groupBy.length>0,sparklineSection=formatSparklineSection(groupedOutput?groupRows:[],sparklineRows,opts.groupBy,opts.presentation?.compact);return`${[metadata,summaryTable,sparklineSection].join(`
|
|
14
|
-
|
|
15
|
-
`)}
|
|
16
|
-
`}export{getDefaultCustomMetricAggregation,computeGranularity,toGranularityMsFromDuration,formatMetricValue,generateSparkline,formatText};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { createRequire as __createRequire } from 'node:module';
|
|
2
|
-
import { fileURLToPath as __fileURLToPath } from 'node:url';
|
|
3
|
-
import { dirname as __dirname_ } from 'node:path';
|
|
4
|
-
const require = __createRequire(import.meta.url);
|
|
5
|
-
const __filename = __fileURLToPath(import.meta.url);
|
|
6
|
-
const __dirname = __dirname_(__filename);
|
|
7
|
-
import{packageName}from"./chunk-B4KA3ZH2.js";import{formatOption,jsonOption}from"./chunk-EZVNGJN5.js";var specUrlOption={name:"spec-url",shorthand:null,type:String,argument:"URL",deprecated:!1,description:"Fetch endpoints from a custom OpenAPI spec URL instead of the public Vercel spec"},listSubcommand={name:"list",aliases:["ls"],description:"List all available API endpoints",arguments:[],options:[formatOption,jsonOption,specUrlOption,{name:"refresh",shorthand:null,type:Boolean,deprecated:!1,description:"Force refresh the cached OpenAPI spec"}],examples:[{name:"List all endpoints in table format",value:`${packageName} api list`},{name:"List all endpoints as JSON",value:`${packageName} api list --json`},{name:"List endpoints from a custom OpenAPI spec",value:`${packageName} api list --spec-url https://openapi-internal.vercel.sh --refresh`}]},apiCommand={name:"api",aliases:[],description:"Make authenticated HTTP requests to the Vercel API",arguments:[{name:"endpoint",required:!1}],subcommands:[listSubcommand],options:[{name:"method",shorthand:"X",type:String,argument:"METHOD",deprecated:!1,description:"HTTP method (GET, POST, PUT, PATCH, DELETE) (default: GET, or POST if body is provided)"},{name:"field",shorthand:"F",type:[String],argument:"KEY=VALUE",deprecated:!1,description:"Add a typed parameter (numbers, booleans parsed). Use @file for file contents"},{name:"raw-field",shorthand:"f",type:[String],argument:"KEY=VALUE",deprecated:!1,description:"Add a string option (no type parsing)"},{name:"header",shorthand:"H",type:[String],argument:"KEY:VALUE",deprecated:!1,description:"Add a custom HTTP header"},{name:"input",shorthand:null,type:String,argument:"FILE",deprecated:!1,description:"Read request body from file (use - for stdin)"},{name:"paginate",shorthand:null,type:Boolean,deprecated:!1,description:"Fetch all pages of results"},{name:"include",shorthand:"i",type:Boolean,deprecated:!1,description:"Include response headers in output"},{name:"silent",shorthand:null,type:Boolean,deprecated:!1,description:"Suppress response output"},{name:"verbose",shorthand:null,type:Boolean,deprecated:!1,description:"Show debug information including full request/response"},{name:"raw",shorthand:null,type:Boolean,deprecated:!1,description:"Output raw JSON without pretty-printing (default: on when output is piped)"},{name:"refresh",shorthand:null,type:Boolean,deprecated:!1,description:"Force refresh the cached OpenAPI spec"},specUrlOption,{name:"generate",shorthand:null,type:String,argument:"FORMAT",deprecated:!1,description:"Generate output instead of executing (e.g., --generate=curl)"},{name:"dangerously-skip-permissions",shorthand:null,type:Boolean,deprecated:!1,description:"Skip confirmation prompts for DELETE operations (use with caution)"}],examples:[{name:"Get current user information",value:`${packageName} api /v2/user`},{name:"List projects with team scope",value:`${packageName} api /v9/projects --scope my-team`},{name:"Create a new project",value:`${packageName} api /v10/projects -X POST -F name=my-project`},{name:"Delete a deployment",value:`${packageName} api /v13/deployments/dpl_abc123 -X DELETE`},{name:"Paginate through all deployments",value:`${packageName} api /v6/deployments --paginate`},{name:"Post JSON from file",value:`${packageName} api /v10/projects -X POST --input config.json`},{name:"Add custom header",value:`${packageName} api /v2/user -H "X-Custom-Header: value"`},{name:"Interactive mode (select endpoint)",value:`${packageName} api`},{name:"Interactive mode with a custom OpenAPI spec",value:`${packageName} api --spec-url https://openapi-internal.vercel.sh --refresh`}]};export{listSubcommand,apiCommand};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { createRequire as __createRequire } from 'node:module';
|
|
2
|
-
import { fileURLToPath as __fileURLToPath } from 'node:url';
|
|
3
|
-
import { dirname as __dirname_ } from 'node:path';
|
|
4
|
-
const require = __createRequire(import.meta.url);
|
|
5
|
-
const __filename = __fileURLToPath(import.meta.url);
|
|
6
|
-
const __dirname = __dirname_(__filename);
|
|
7
|
-
import{createOpenApiCache,fetchSpecUrl,foldNamingStyle,formatAsCard,formatAsDataTable,inferCliSubcommandAliases,operationIdToKebabCase,resolveEndpointByTagAndOperationId,tryOpenApiFallback}from"./chunk-XEISEISC.js";import{humanReadableColumnLabel,humanizeIdentifier}from"./chunk-GHAY4PSD.js";import{CACHE_FILE,CACHE_TTL_MS,FETCH_TIMEOUT_MS,MAX_OPENAPI_SPEC_BYTES,OPENAPI_URL,OpenApiCache,SSO_API_URL,VERCEL_CLI_ROOT_DISPLAY_KEY,assertAllowedSpecUrl,matchesCliApiTag,readSpecResponse,resolveOpenApiTagForProjectsCli}from"./chunk-IIMHD3FA.js";import"./chunk-CJZE7647.js";import"./chunk-YANOBY2G.js";import"./chunk-VHRQW57O.js";import"./chunk-6C5KUHQP.js";import"./chunk-GLIQ4KNY.js";import"./chunk-KDCODXVL.js";import"./chunk-NWGBDBZI.js";import"./chunk-HOGVBY6Q.js";import"./chunk-OFZUWHZW.js";import"./chunk-UXRRYYSD.js";import"./chunk-NHB43235.js";import"./chunk-2VBFQZ72.js";import"./chunk-6GKP6VUF.js";import"./chunk-MXTC4ZAQ.js";import"./chunk-4NTBYNFR.js";import"./chunk-4SAVH3H7.js";import"./chunk-GOI2VVI7.js";import"./chunk-B4KA3ZH2.js";import"./chunk-BOJDM3O7.js";import"./chunk-AP6DZGTK.js";import"./chunk-BLUPZPAS.js";import"./chunk-5MDNVAE6.js";import"./chunk-MCYG7CCE.js";import"./chunk-YHPPP3SF.js";import"./chunk-24SIHFEW.js";import"./chunk-EZVNGJN5.js";import"./chunk-2BKALEOP.js";import"./chunk-NB2WLB3J.js";import"./chunk-ISWW3DKF.js";import"./chunk-BRQUZ5NC.js";import"./chunk-BULSRTQE.js";import"./chunk-BZENIQ7N.js";export{CACHE_FILE,CACHE_TTL_MS,FETCH_TIMEOUT_MS,MAX_OPENAPI_SPEC_BYTES,OPENAPI_URL,OpenApiCache,SSO_API_URL,VERCEL_CLI_ROOT_DISPLAY_KEY,assertAllowedSpecUrl,createOpenApiCache,fetchSpecUrl,foldNamingStyle,formatAsCard,formatAsDataTable,humanReadableColumnLabel,humanizeIdentifier,inferCliSubcommandAliases,matchesCliApiTag,operationIdToKebabCase,readSpecResponse,resolveEndpointByTagAndOperationId,resolveOpenApiTagForProjectsCli,tryOpenApiFallback};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { createRequire as __createRequire } from 'node:module';
|
|
2
|
-
import { fileURLToPath as __fileURLToPath } from 'node:url';
|
|
3
|
-
import { dirname as __dirname_ } from 'node:path';
|
|
4
|
-
const require = __createRequire(import.meta.url);
|
|
5
|
-
const __filename = __fileURLToPath(import.meta.url);
|
|
6
|
-
const __dirname = __dirname_(__filename);
|
|
7
|
-
import{warnIfFidMetric}from"./chunk-5IZI5QH6.js";import{FILTER_DEPRECATION_WARNING,alignTimeRangeToGranularity,canonicalResponseToMetricsResponse,createCanonicalMetricsRequest,usesODataSyntax}from"./chunk-HSCWCGL7.js";import{computeGranularity,formatText,getDefaultCustomMetricAggregation}from"./chunk-UIGZMWS6.js";import{OBSERVABILITY_METRICS_PATH,fetchCatalogMetricDetailOrExit,formatErrorJson,formatQueryJson,getRollupColumnName,handleApiError}from"./chunk-KRVZKKJV.js";import"./chunk-IVSSTHB6.js";import{validateAllProjectMutualExclusivity}from"./chunk-ZJNDLFZ7.js";import{resolveTimeRange}from"./chunk-D3M2JG5C.js";import"./chunk-TOTTVS5P.js";import"./chunk-Q7D7RGXM.js";import"./chunk-GZNDA6SV.js";import{warnDeprecatedProdFlag}from"./chunk-HAGBKLAS.js";import{getRenamedOption}from"./chunk-6MFLATDD.js";import"./chunk-CJZE7647.js";import{metricsCommand}from"./chunk-SEHERY6U.js";import{printError}from"./chunk-VHRQW57O.js";import"./chunk-GLIQ4KNY.js";import{getScope}from"./chunk-HVZ5OOOP.js";import"./chunk-HOGVBY6Q.js";import"./chunk-OFZUWHZW.js";import{getLinkedProject}from"./chunk-2OQD274E.js";import"./chunk-M7FED5YP.js";import"./chunk-4HR3I3ML.js";import{getProjectByNameOrId}from"./chunk-LOA7SZWH.js";import"./chunk-MTZYPCZ7.js";import"./chunk-D6REP5QQ.js";import"./chunk-UXRRYYSD.js";import{getTypedOptionName,parseArguments}from"./chunk-NHB43235.js";import"./chunk-2VBFQZ72.js";import{validateJsonOutput}from"./chunk-6GKP6VUF.js";import"./chunk-LUX4PBJL.js";import"./chunk-OPORM35X.js";import"./chunk-FBYA6LLM.js";import"./chunk-MY4MONOH.js";import"./chunk-MXTC4ZAQ.js";import"./chunk-4NTBYNFR.js";import"./chunk-4SAVH3H7.js";import{ProjectNotFound,isAPIError}from"./chunk-GOI2VVI7.js";import"./chunk-B4KA3ZH2.js";import"./chunk-BOJDM3O7.js";import{output_manager_default}from"./chunk-AP6DZGTK.js";import"./chunk-BLUPZPAS.js";import"./chunk-AW33SRYY.js";import"./chunk-5MDNVAE6.js";import"./chunk-OCR5CRTH.js";import"./chunk-7EJQLVWX.js";import"./chunk-SCV7XEEO.js";import"./chunk-MCYG7CCE.js";import"./chunk-YHPPP3SF.js";import{getFlagsSpecification}from"./chunk-EZVNGJN5.js";import"./chunk-2BKALEOP.js";import{require_source}from"./chunk-NB2WLB3J.js";import"./chunk-ISWW3DKF.js";import"./chunk-BRQUZ5NC.js";import"./chunk-BULSRTQE.js";import{__toESM}from"./chunk-BZENIQ7N.js";var import_chalk=__toESM(require_source(),1);function validateRequiredMetric(metric){return metric?{valid:!0,value:metric}:{valid:!1,code:"MISSING_METRIC",message:`Missing required metric. Specify the metric to query.
|
|
8
|
-
|
|
9
|
-
Run 'vercel metrics schema' to see available metrics.`}}function validateOrderDirection(orderDirection){return orderDirection===void 0?{valid:!0,value:void 0}:orderDirection==="asc"||orderDirection==="desc"?{valid:!0,value:orderDirection}:{valid:!1,code:"INVALID_ORDER",message:`Invalid order "${orderDirection}". Use "asc" or "desc".`,allowedValues:["asc","desc"]}}function validateOrderBy(orderBy){return orderBy===void 0?{valid:!0,value:void 0}:orderBy==="value"||orderBy==="count"?{valid:!0,value:orderBy}:{valid:!1,code:"INVALID_ORDER_BY",message:`Invalid order-by "${orderBy}". Use "value" or "count".`,allowedValues:["value","count"]}}function handleValidationError(result,jsonOutput,client,telemetry){return telemetry.trackCliError(result.code),jsonOutput?client.stdout.write(formatErrorJson(result.code,result.message,result.allowedValues)):(output_manager_default.error(result.message),result.allowedValues&&result.allowedValues.length>0&&output_manager_default.print(`
|
|
10
|
-
Available values: ${result.allowedValues.join(", ")}
|
|
11
|
-
`)),1}var ENVIRONMENT_PATTERN=/^[a-z0-9][a-z0-9-]*$/i,SUM_DEFAULT_METRIC_UNITS=new Set(["bytes","count","usd","units"]);function combineFilters(filters,environment,syntax="odata"){let nonEmptyFilters=[...filters?.filter(filter=>filter.length>0)??[],...environment?[syntax==="kql"?`environment:${environment}`:`environment eq '${environment}'`]:[]];if(nonEmptyFilters.length===0)return;if(nonEmptyFilters.length===1)return nonEmptyFilters[0];let conjunction=syntax==="kql"?" AND ":" and ";return nonEmptyFilters.map(filter=>`(${filter})`).join(conjunction)}function getCatalogDefaultAggregation(metric,isPlatformMetric){if(!isPlatformMetric)return getDefaultCustomMetricAggregation(metric.unit,metric.aggregations);let defaultAggregation=SUM_DEFAULT_METRIC_UNITS.has(metric.unit)?"sum":"avg";return metric.aggregations.includes(defaultAggregation)?defaultAggregation:defaultAggregation==="sum"&&metric.aggregations.includes("count")?"count":metric.aggregations.includes("sum")?"sum":metric.aggregations[0]}function getUndiscoveredDefaultAggregation(metric){return metric.startsWith("vercel.")&&metric.endsWith(".count")?"count":"sum"}function toCanonicalMetricSelection(metric,aggregation,supportedAggregations){let[aggregationName,...dimensionParts]=aggregation.split("/"),dimension=dimensionParts.join("/")||void 0,additiveAggregation=supportedAggregations?supportedAggregations.includes("count")&&!supportedAggregations.includes("sum")?"count":"sum":getUndiscoveredDefaultAggregation(metric);return aggregation==="persecond"?{metric,aggregation:additiveAggregation,per:"second"}:aggregation==="percent"?{metric,aggregation:additiveAggregation,normalize:"percent"}:aggregationName==="unique"&&dimension?{metric,aggregation:"unique",dimensions:[dimension]}:{metric,aggregation}}function getCanonicalOrderBy(orderBy,selection,supportedAggregations){if(orderBy)return orderBy;let supportsCount=supportedAggregations===void 0||supportedAggregations.includes("count");return selection.aggregation==="count"||supportsCount?"count":"value"}async function resolveQueryScope(client,telemetry,opts){if(opts.project||opts.all){let{team}=await getScope(client);if(!team)return handleValidationError({valid:!1,code:"NO_TEAM",message:"No team context found. Run `vercel switch` to select a team, or use `vercel link` in a project directory."},opts.jsonOutput,client,telemetry);if(opts.all)return{scope:{type:"owner",ownerId:team.id},accountId:team.id,teamName:team.slug};let project=await getProjectByNameOrId(client,opts.project,team.id);if(project instanceof ProjectNotFound){let errMsg=`Project "${opts.project}" was not found in team "${team.slug}".`;return handleValidationError({valid:!1,code:"PROJECT_NOT_FOUND",message:errMsg},opts.jsonOutput,client,telemetry)}return{scope:{type:"project",ownerId:team.id,projectIds:[project.id]},accountId:team.id,teamName:team.slug,projectName:project.name}}let linkedProject=await getLinkedProject(client);return linkedProject.status==="error"?(telemetry.trackCliError("LINK_ERROR"),linkedProject.exitCode):linkedProject.status==="not_linked"?handleValidationError({valid:!1,code:"NOT_LINKED",message:"No linked project found. Run `vercel link` to link a project, or use --project <name-or-id> or --all."},opts.jsonOutput,client,telemetry):{scope:{type:"project",ownerId:linkedProject.org.id,projectIds:[linkedProject.project.id]},accountId:linkedProject.org.id,teamName:linkedProject.org.slug,projectName:linkedProject.project.name}}async function query(client,telemetry){let parsedArgs,flagsSpecification=getFlagsSpecification(metricsCommand.options);try{parsedArgs=parseArguments(client.argv.slice(2),flagsSpecification)}catch(err){return telemetry.trackCliError("INVALID_ARGUMENTS"),printError(err,client),2}let flags=parsedArgs.flags,positionalArgs=parsedArgs.args.slice(1),positionalMetric=positionalArgs[0]==="query"?positionalArgs[1]:positionalArgs[0],formatResult=validateJsonOutput(flags);if(!formatResult.valid)return telemetry.trackCliError("INVALID_OUTPUT_FORMAT"),output_manager_default.error(formatResult.error),2;let jsonOutput=formatResult.jsonOutput,metricFlag=positionalMetric,aggregationFlag=flags["--aggregation"],groupBy=flags["--group-by"]??[],limit=flags["--limit"],orderByInput=typeof flags["--order-by"]=="string"?flags["--order-by"].trim().toLowerCase():void 0,orderInput=typeof flags["--order"]=="string"?flags["--order"].trim().toLowerCase():void 0,environmentFlag=flags["--environment"],prod=flags["--prod"],since=flags["--since"],until=flags["--until"],granularity=flags["--granularity"],bucketTimezone=flags["--bucket-timezone"]?.trim(),project=flags["--project"],all=flags["--all"];telemetry.trackCliArgumentMetricId(metricFlag),telemetry.trackCliOptionAggregation(aggregationFlag),telemetry.trackCliOptionGroupBy(groupBy.length>0?groupBy:void 0),telemetry.trackCliOptionLimit(limit),telemetry.trackCliOptionOrderBy(orderByInput),telemetry.trackCliOptionOrder(orderInput),telemetry.trackCliOptionQuery(flags["--query"]),telemetry.trackCliOptionFilter(flags["--filter"]),telemetry.trackCliOptionEnvironment(environmentFlag),telemetry.trackCliFlagProd(prod),telemetry.trackCliOptionSince(since),telemetry.trackCliOptionUntil(until),telemetry.trackCliOptionGranularity(granularity),telemetry.trackCliOptionBucketTimezone(bucketTimezone),telemetry.trackCliOptionProject(project),telemetry.trackCliFlagAll(all),telemetry.trackCliOptionFormat(flags["--format"]);let queryOption=getRenamedOption(flags,"--query","--filter",{json:jsonOutput,typedName:getTypedOptionName(client.argv.slice(2),getFlagsSpecification(metricsCommand.options),"--filter")});if("error"in queryOption)return handleValidationError({valid:!1,code:"CONFLICTING_OPTIONS",message:queryOption.error},jsonOutput,client,telemetry),2;let filters=queryOption.value;if(prod&&environmentFlag!==void 0)return handleValidationError({valid:!1,code:"CONFLICTING_OPTIONS",message:"Can't use --prod with --environment. Use --environment."},jsonOutput,client,telemetry),2;if(environmentFlag!==void 0&&!ENVIRONMENT_PATTERN.test(environmentFlag))return handleValidationError({valid:!1,code:"INVALID_ENVIRONMENT",message:`Can't query metrics for environment ${JSON.stringify(environmentFlag)}. Environments use letters, numbers, and hyphens, like production or preview.`},jsonOutput,client,telemetry),2;warnDeprecatedProdFlag(client,flags);let environment=environmentFlag??(prod?"production":void 0),orderByResult=validateOrderBy(orderByInput);if(!orderByResult.valid)return handleValidationError(orderByResult,jsonOutput,client,telemetry);let orderByMode=orderByResult.value,requiredMetric=validateRequiredMetric(metricFlag);if(!requiredMetric.valid)return handleValidationError(requiredMetric,jsonOutput,client,telemetry);let metric=requiredMetric.value;warnIfFidMetric(metric);let mutualResult=validateAllProjectMutualExclusivity(all,project);if(!mutualResult.valid)return handleValidationError(mutualResult,jsonOutput,client,telemetry);let orderDirectionResult=validateOrderDirection(orderInput);if(!orderDirectionResult.valid)return handleValidationError(orderDirectionResult,jsonOutput,client,telemetry);let orderDirection=orderDirectionResult.value,scopeResult=await resolveQueryScope(client,telemetry,{project,all,jsonOutput});if(typeof scopeResult=="number")return scopeResult;let{scope,accountId,teamName,projectName}=scopeResult,isPlatformMetric=metric.startsWith("vercel."),filterUsesOData=usesODataSyntax(filters);filterUsesOData&&output_manager_default.print(`${import_chalk.default.yellow("!")} ${FILTER_DEPRECATION_WARNING}
|
|
12
|
-
`);let filter=combineFilters(filters,environment,filterUsesOData?"odata":"kql"),startTime,endTime;try{({startTime,endTime}=resolveTimeRange(since,until))}catch(err){let errMsg=err instanceof Error?err.message:String(err);return handleValidationError({valid:!1,code:"INVALID_TIME",message:errMsg},jsonOutput,client,telemetry)}let catalogOrExitCode=await fetchCatalogMetricDetailOrExit(client,accountId,jsonOutput,metric,isPlatformMetric?"system":"custom",startTime.toISOString());if(typeof catalogOrExitCode=="number")return telemetry.trackCliError("SCHEMA_FETCH_FAILED"),catalogOrExitCode;let catalogMetric=catalogOrExitCode.find(item=>item.id===metric),metricUnit=catalogMetric?.unit,canonicalAggregations=catalogMetric?.aggregations,aggregation=aggregationFlag??(catalogMetric&&getCatalogDefaultAggregation(catalogMetric,isPlatformMetric))??getUndiscoveredDefaultAggregation(metric),rangeMs=endTime.getTime()-startTime.getTime(),granResult=computeGranularity(rangeMs,granularity),queryTimeRange=alignTimeRangeToGranularity(startTime,endTime,granResult.duration);if(!jsonOutput&&granResult.adjusted&&granResult.notice&&output_manager_default.log(`Notice: ${granResult.notice}`),bucketTimezone)return handleValidationError({valid:!1,code:"UNSUPPORTED_BUCKET_TIMEZONE",message:"--bucket-timezone is not supported by the new Observability query API yet."},jsonOutput,client,telemetry);let selection=toCanonicalMetricSelection(metric,aggregation,canonicalAggregations),canonicalOrderBy=groupBy.length>0?getCanonicalOrderBy(orderByMode,selection,canonicalAggregations):void 0,body=createCanonicalMetricsRequest({scope,metric,selection,startTime:queryTimeRange.startTime,endTime:queryTimeRange.endTime,granularity:granResult.duration,groupBy,filter,limit:limit??10,orderBy:canonicalOrderBy,orderDirection}),resolvedOrderBy=canonicalOrderBy??orderByMode;jsonOutput||output_manager_default.spinner("Querying metrics...");let response;try{let canonicalResponse=await client.fetch(OBSERVABILITY_METRICS_PATH,{method:"POST",body:JSON.stringify(body),headers:{"Content-Type":"application/json"},accountId,bailOn429:!0});response=canonicalResponseToMetricsResponse(canonicalResponse,getRollupColumnName(metric,aggregation),canonicalOrderBy,groupBy.length>0?orderDirection??"desc":void 0)}catch(err){if(isAPIError(err))return telemetry.trackCliError(err.code??"API_ERROR",err.status),handleApiError(err,jsonOutput,client,{},{scope:accountId.startsWith("team_")?teamName||accountId:void 0,projectName});let errMsg=err instanceof Error?err.message:String(err);return telemetry.trackCliError("NETWORK_ERROR"),jsonOutput?client.stdout.write(formatErrorJson("NETWORK_ERROR",errMsg)):output_manager_default.error(errMsg),1}finally{jsonOutput||output_manager_default.stopSpinner()}return jsonOutput?client.stdout.write(formatQueryJson({metric,aggregation,groupBy,filter,startTime:queryTimeRange.startTime.toISOString(),endTime:queryTimeRange.endTime.toISOString(),granularity:granResult.duration,...bucketTimezone?{bucketTimezone}:{},...resolvedOrderBy?{orderBy:resolvedOrderBy}:{},...orderDirection?{orderDirection}:{}},response,[queryOption.warning])):client.stdout.write(formatText(response,{metric,metricUnit,aggregation,groupBy,filter,scope,projectName,teamName,periodStart:queryTimeRange.startTime.toISOString(),periodEnd:queryTimeRange.endTime.toISOString(),granularity:granResult.duration,bucketTimezone,orderBy:resolvedOrderBy,orderDirection})),0}export{query as default};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { createRequire as __createRequire } from 'node:module';
|
|
2
|
-
import { fileURLToPath as __fileURLToPath } from 'node:url';
|
|
3
|
-
import { dirname as __dirname_ } from 'node:path';
|
|
4
|
-
const require = __createRequire(import.meta.url);
|
|
5
|
-
const __filename = __fileURLToPath(import.meta.url);
|
|
6
|
-
const __dirname = __dirname_(__filename);
|
|
7
|
-
import{require_token_error,require_token_util}from"./chunk-U2ZNF6HN.js";import"./chunk-WKSXBH7X.js";import"./chunk-GD7AV7BO.js";import"./chunk-OPORM35X.js";import"./chunk-BLUPZPAS.js";import{__commonJS,__require}from"./chunk-BZENIQ7N.js";var require_token=__commonJS({"../../node_modules/.pnpm/@vercel+oidc@3.8.2/node_modules/@vercel/oidc/dist/token.js"(exports,module){var __defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__hasOwnProp=Object.prototype.hasOwnProperty,__export=(target,all)=>{for(var name in all)__defProp(target,name,{get:all[name],enumerable:!0})},__copyProps=(to,from,except,desc)=>{if(from&&typeof from=="object"||typeof from=="function")for(let key of __getOwnPropNames(from))!__hasOwnProp.call(to,key)&&key!==except&&__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to},__toCommonJS=mod=>__copyProps(__defProp({},"__esModule",{value:!0}),mod),token_exports={};__export(token_exports,{refreshToken:()=>refreshToken});module.exports=__toCommonJS(token_exports);var import_cli_config=__require("@vercel/cli-config"),import_token_error=require_token_error(),import_token_util=require_token_util();async function refreshToken(options){let projectId=options?.project,teamId=options?.team;if(!projectId&&!teamId){let projectInfo=(0,import_token_util.findProjectInfo)();projectId=projectInfo.projectId,teamId=projectInfo.teamId}else if(!projectId||!teamId){let projectInfo=(0,import_token_util.findProjectInfo)();projectId=projectId??projectInfo.projectId,teamId=teamId??projectInfo.teamId}if(!projectId)throw new import_token_error.VercelOidcTokenError("Failed to refresh OIDC token: No project specified. Try re-linking your project with `vc link`");let maybeToken=(0,import_token_util.loadToken)(projectId);if(!maybeToken||(0,import_token_util.isExpired)((0,import_token_util.getTokenPayload)(maybeToken.token),options?.expirationBufferMs)){let configDir=(0,import_cli_config.getGlobalPathConfig)();if((0,import_cli_config.getLikelyEffectiveCredStorage)(configDir)==="keyring")maybeToken=await(0,import_token_util.getVercelOidcTokenFromCli)(projectId,teamId);else{let authToken=await(0,import_token_util.getVercelToken)({expirationBufferMs:options?.expirationBufferMs});maybeToken=await(0,import_token_util.getVercelOidcToken)(authToken,projectId,teamId)}if(!maybeToken)throw new import_token_error.VercelOidcTokenError("Failed to refresh OIDC token");(0,import_token_util.saveToken)(maybeToken,projectId)}process.env.VERCEL_OIDC_TOKEN=maybeToken.token}}});export default require_token();
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { createRequire as __createRequire } from 'node:module';
|
|
2
|
-
import { fileURLToPath as __fileURLToPath } from 'node:url';
|
|
3
|
-
import { dirname as __dirname_ } from 'node:path';
|
|
4
|
-
const require = __createRequire(import.meta.url);
|
|
5
|
-
const __filename = __fileURLToPath(import.meta.url);
|
|
6
|
-
const __dirname = __dirname_(__filename);
|
|
7
|
-
import{require_token_error,require_token_util}from"./chunk-DIHB5BUY.js";import"./chunk-WKSXBH7X.js";import"./chunk-GD7AV7BO.js";import"./chunk-OPORM35X.js";import"./chunk-BLUPZPAS.js";import{__commonJS,__require}from"./chunk-BZENIQ7N.js";var require_token=__commonJS({"../../node_modules/.pnpm/@vercel+oidc@3.8.10/node_modules/@vercel/oidc/dist/token.js"(exports,module){var __defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__hasOwnProp=Object.prototype.hasOwnProperty,__export=(target,all)=>{for(var name in all)__defProp(target,name,{get:all[name],enumerable:!0})},__copyProps=(to,from,except,desc)=>{if(from&&typeof from=="object"||typeof from=="function")for(let key of __getOwnPropNames(from))!__hasOwnProp.call(to,key)&&key!==except&&__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to},__toCommonJS=mod=>__copyProps(__defProp({},"__esModule",{value:!0}),mod),token_exports={};__export(token_exports,{refreshToken:()=>refreshToken});module.exports=__toCommonJS(token_exports);var import_cli_config=__require("@vercel/cli-config"),import_token_error=require_token_error(),import_token_util=require_token_util();async function refreshToken(options){let projectId=options?.project,teamId=options?.team;if(!projectId&&!teamId){let projectInfo=(0,import_token_util.findProjectInfo)();projectId=projectInfo.projectId,teamId=projectInfo.teamId}else if(!projectId||!teamId){let projectInfo=(0,import_token_util.findProjectInfo)();projectId=projectId??projectInfo.projectId,teamId=teamId??projectInfo.teamId}if(!projectId)throw new import_token_error.VercelOidcTokenError("Failed to refresh OIDC token: No project specified. Try re-linking your project with `vc link`");let maybeToken=(0,import_token_util.loadToken)(projectId);if(!maybeToken||(0,import_token_util.isExpired)((0,import_token_util.getTokenPayload)(maybeToken.token),options?.expirationBufferMs)){let configDir=(0,import_cli_config.getGlobalPathConfig)();if((0,import_cli_config.getLikelyEffectiveCredStorage)(configDir)==="keyring")maybeToken=await(0,import_token_util.getVercelOidcTokenFromCli)(projectId,teamId);else{let authToken=await(0,import_token_util.getVercelToken)({expirationBufferMs:options?.expirationBufferMs});maybeToken=await(0,import_token_util.getVercelOidcToken)(authToken,projectId,teamId)}if(!maybeToken)throw new import_token_error.VercelOidcTokenError("Failed to refresh OIDC token");(0,import_token_util.saveToken)(maybeToken,projectId)}process.env.VERCEL_OIDC_TOKEN=maybeToken.token}}});export default require_token();
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { createRequire as __createRequire } from 'node:module';
|
|
2
|
-
import { fileURLToPath as __fileURLToPath } from 'node:url';
|
|
3
|
-
import { dirname as __dirname_ } from 'node:path';
|
|
4
|
-
const require = __createRequire(import.meta.url);
|
|
5
|
-
const __filename = __fileURLToPath(import.meta.url);
|
|
6
|
-
const __dirname = __dirname_(__filename);
|
|
7
|
-
import{require_token_util}from"./chunk-DIHB5BUY.js";import"./chunk-WKSXBH7X.js";import"./chunk-GD7AV7BO.js";import"./chunk-OPORM35X.js";import"./chunk-BLUPZPAS.js";import"./chunk-BZENIQ7N.js";export default require_token_util();
|
|
File without changes
|
|
File without changes
|