vercel 59.14.0 → 59.15.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/add-7XFD2OHW.js +8 -0
- package/dist/chunks/add-HZC7AUBY.js +8 -0
- package/dist/chunks/add-PYUNJZ6K.js +8 -0
- package/dist/chunks/build-EFKQ6BND.js +7 -0
- package/dist/chunks/chunk-2B2MN3U5.js +8 -0
- package/dist/chunks/chunk-2H77IRPI.js +9 -0
- package/dist/chunks/chunk-2I64AYHG.js +7 -0
- package/dist/chunks/chunk-2PPXY24N.js +20 -0
- package/dist/chunks/chunk-2S6PE6GB.js +7 -0
- package/dist/chunks/{chunk-PIMIVJYK.js → chunk-3FMJYJUR.js} +7 -32
- package/dist/chunks/chunk-3IAQUNQH.js +7 -0
- package/dist/chunks/chunk-3QHJYVCY.js +7 -0
- package/dist/chunks/chunk-3QT7VOE3.js +7 -0
- package/dist/chunks/chunk-3TXEXPUW.js +7 -0
- package/dist/chunks/chunk-4MZK6JT6.js +7 -0
- package/dist/chunks/chunk-4NE5IQ25.js +7 -0
- package/dist/chunks/chunk-4PNSSS3L.js +7 -0
- package/dist/chunks/chunk-4QX77CP7.js +7 -0
- package/dist/chunks/chunk-562OXD3F.js +21 -0
- package/dist/chunks/chunk-57GHYR4Y.js +25 -0
- package/dist/chunks/chunk-5QQNYN4N.js +7 -0
- package/dist/chunks/chunk-5XJNPXQK.js +7 -0
- package/dist/chunks/chunk-6L236MNA.js +7 -0
- package/dist/chunks/chunk-6PFC3KWQ.js +7 -0
- package/dist/chunks/chunk-6QKS6QK7.js +7 -0
- package/dist/chunks/chunk-6RIQPTJA.js +8 -0
- package/dist/chunks/chunk-6TAQ6OWD.js +13 -0
- package/dist/chunks/chunk-6YAADRQB.js +9 -0
- package/dist/chunks/chunk-75CPY75D.js +15 -0
- package/dist/chunks/chunk-7HL2RPUO.js +7 -0
- package/dist/chunks/chunk-7PNYOSDU.js +9 -0
- package/dist/chunks/chunk-7R5FEXZ5.js +7 -0
- package/dist/chunks/chunk-7RMCBXBB.js +62 -0
- package/dist/chunks/chunk-7RR7MIMT.js +7 -0
- package/dist/chunks/chunk-7T6TL3GQ.js +7 -0
- package/dist/chunks/chunk-ADUYPK2G.js +13 -0
- package/dist/chunks/chunk-AFPOIDM5.js +7 -0
- package/dist/chunks/chunk-AM46JVVN.js +7 -0
- package/dist/chunks/chunk-AUGK2HIT.js +18 -0
- package/dist/chunks/chunk-AVSPFBLM.js +7 -0
- package/dist/chunks/chunk-B4ATVYZW.js +7 -0
- package/dist/chunks/chunk-BATE73HA.js +9 -0
- package/dist/chunks/{chunk-64IF634X.js → chunk-BRK4OB4B.js} +1 -12
- package/dist/chunks/chunk-BVH2AEFE.js +7 -0
- package/dist/chunks/chunk-CGOVWHI3.js +45 -0
- package/dist/chunks/chunk-CN2QZO4U.js +7 -0
- package/dist/chunks/chunk-COQGD2EI.js +8 -0
- package/dist/chunks/chunk-CUAIEGNE.js +7 -0
- package/dist/chunks/chunk-CVKB54WW.js +7 -0
- package/dist/chunks/{chunk-A3NYPUKZ.js → chunk-CZSOZKHX.js} +1 -11
- package/dist/chunks/chunk-D3EHMP4U.js +24 -0
- package/dist/chunks/chunk-D4MW3RDW.js +7 -0
- package/dist/chunks/chunk-DFVNL5ML.js +7 -0
- package/dist/chunks/chunk-EE3FVJLV.js +16 -0
- package/dist/chunks/chunk-EGMJRU5P.js +28 -0
- package/dist/chunks/chunk-ENBTTYJR.js +7 -0
- package/dist/chunks/chunk-ENS6KX2F.js +7 -0
- package/dist/chunks/chunk-EOBD4ZEG.js +8 -0
- package/dist/chunks/chunk-EOCTK4EA.js +7 -0
- package/dist/chunks/chunk-EQ52F4LH.js +7 -0
- package/dist/chunks/chunk-ETV3C2CV.js +7 -0
- package/dist/chunks/chunk-EVZRQGNK.js +7 -0
- package/dist/chunks/chunk-F2ZWW2IO.js +8 -0
- package/dist/chunks/chunk-FAW6NBLQ.js +7 -0
- package/dist/chunks/chunk-FI772UVH.js +7 -0
- package/dist/chunks/chunk-FKCOBJFH.js +7 -0
- package/dist/chunks/chunk-G5FC5ZCO.js +9 -0
- package/dist/chunks/chunk-G6CTAHKY.js +39 -0
- package/dist/chunks/chunk-G7Y77DFH.js +7 -0
- package/dist/chunks/chunk-GHAY4PSD.js +7 -0
- package/dist/chunks/chunk-GHM7V3GG.js +7 -0
- package/dist/chunks/chunk-GRNTLNC7.js +7 -0
- package/dist/chunks/chunk-GTRGQIY2.js +10 -0
- package/dist/chunks/chunk-GU6VIFR5.js +7 -0
- package/dist/chunks/{constants-YMCRE6IG.js → chunk-GZNDA6SV.js} +2 -9
- package/dist/chunks/chunk-HBFPLBTX.js +10 -0
- package/dist/chunks/chunk-HEGJZJO7.js +7 -0
- package/dist/chunks/chunk-HSJ6AHWG.js +12 -0
- package/dist/chunks/chunk-HTC6KO2B.js +7 -0
- package/dist/chunks/chunk-HVUHCRZB.js +18 -0
- package/dist/chunks/chunk-HZZ5L472.js +7 -0
- package/dist/chunks/chunk-IVSSTHB6.js +7 -0
- package/dist/chunks/chunk-IVWPQYIH.js +7 -0
- package/dist/chunks/chunk-J3U3L45Y.js +7 -0
- package/dist/chunks/chunk-JAJW3P42.js +7 -0
- package/dist/chunks/chunk-JEIMW3CO.js +7 -0
- package/dist/chunks/chunk-JIYY3B4C.js +7 -0
- package/dist/chunks/chunk-JKTQV2QJ.js +7 -0
- package/dist/chunks/chunk-JTVVBRW7.js +7 -0
- package/dist/chunks/chunk-JYAUUIR4.js +7 -0
- package/dist/chunks/chunk-JZRMH5UA.js +7 -0
- package/dist/chunks/chunk-K2RAW5DI.js +10 -0
- package/dist/chunks/chunk-K3KJZLBD.js +7 -0
- package/dist/chunks/chunk-KK4AJES5.js +36 -0
- package/dist/chunks/chunk-KKS7XWEX.js +7 -0
- package/dist/chunks/chunk-KNEWCUWF.js +14 -0
- package/dist/chunks/chunk-KO733OJG.js +9 -0
- package/dist/chunks/chunk-L243RUIR.js +19 -0
- package/dist/chunks/chunk-L3JDEHCQ.js +7 -0
- package/dist/chunks/chunk-LDM3SQAU.js +13 -0
- package/dist/chunks/chunk-LNPMDXBJ.js +7 -0
- package/dist/chunks/chunk-M2W3HKV3.js +23 -0
- package/dist/chunks/chunk-M2XARQBF.js +9 -0
- package/dist/chunks/chunk-M5AV545M.js +7 -0
- package/dist/chunks/chunk-MAVRGZQP.js +7 -0
- package/dist/chunks/chunk-MBL6TXEJ.js +7 -0
- package/dist/chunks/chunk-MEAY2K5Z.js +11 -0
- package/dist/chunks/chunk-MY4MONOH.js +7 -0
- package/dist/chunks/chunk-N3N5UHIL.js +7 -0
- package/dist/chunks/chunk-N3ZZ7FHQ.js +7 -0
- package/dist/chunks/chunk-N6CNMMSZ.js +7 -0
- package/dist/chunks/chunk-NBVY237X.js +7 -0
- package/dist/chunks/chunk-NGNOUPWS.js +25 -0
- package/dist/chunks/chunk-NHTF332K.js +7 -0
- package/dist/chunks/chunk-NNP5NITU.js +15 -0
- package/dist/chunks/chunk-NS4FH2TY.js +11 -0
- package/dist/chunks/chunk-NUGLE4QY.js +11 -0
- package/dist/chunks/chunk-NWFHHUKZ.js +7 -0
- package/dist/chunks/chunk-O7G3CZ42.js +7 -0
- package/dist/chunks/chunk-OD6RZ3XZ.js +8 -0
- package/dist/chunks/chunk-OHDEHZLX.js +7 -0
- package/dist/chunks/chunk-OK3S6KFX.js +16 -0
- package/dist/chunks/chunk-OKZDOANA.js +23 -0
- package/dist/chunks/chunk-OSCCYU74.js +7 -0
- package/dist/chunks/chunk-OUHPDA7Q.js +7 -0
- package/dist/chunks/chunk-P2O5DOYE.js +7 -0
- package/dist/chunks/chunk-PHW54NU5.js +13 -0
- package/dist/chunks/chunk-PPCFQQSU.js +7 -0
- package/dist/chunks/chunk-QGIGNMII.js +8 -0
- package/dist/chunks/chunk-QGIQK47P.js +7 -0
- package/dist/chunks/chunk-QHJLRTVY.js +7 -0
- package/dist/chunks/{chunk-2473DUBR.js → chunk-QR7QPUFN.js} +1 -9
- package/dist/chunks/chunk-QTKJC2O5.js +7 -0
- package/dist/chunks/chunk-R2TGGVCT.js +19 -0
- package/dist/chunks/chunk-RAIBQIKB.js +7 -0
- package/dist/chunks/chunk-RCTYVKM5.js +16 -0
- package/dist/chunks/chunk-RKAUVPOQ.js +86 -0
- package/dist/chunks/chunk-S5CEIACD.js +7 -0
- package/dist/chunks/chunk-SGWVKRSR.js +8 -0
- package/dist/chunks/chunk-SOJCELXH.js +7 -0
- package/dist/chunks/chunk-SXUEGVWB.js +7 -0
- package/dist/chunks/{chunk-GGPE5377.js → chunk-T3GQAMBJ.js} +1 -9
- package/dist/chunks/chunk-T52FMXWC.js +7 -0
- package/dist/chunks/chunk-TG2RCYTH.js +7 -0
- package/dist/chunks/chunk-TJCIHDPZ.js +9 -0
- package/dist/chunks/chunk-TKBXN4H3.js +9 -0
- package/dist/chunks/chunk-TRTEXGVN.js +7 -0
- package/dist/chunks/chunk-U56NHYAH.js +7 -0
- package/dist/chunks/chunk-U7KCDTCH.js +12 -0
- package/dist/chunks/chunk-UETTIYUQ.js +8 -0
- package/dist/chunks/chunk-ULLWCOYC.js +7 -0
- package/dist/chunks/chunk-UXTHEQVJ.js +21 -0
- package/dist/chunks/chunk-VLZ47RWM.js +44 -0
- package/dist/chunks/chunk-WKZ6JSGZ.js +7 -0
- package/dist/chunks/chunk-WPS6JZF6.js +7 -0
- package/dist/chunks/chunk-WRILLB46.js +7 -0
- package/dist/chunks/chunk-WUZD4KBL.js +7 -0
- package/dist/chunks/chunk-XCJDGQO7.js +7 -0
- package/dist/chunks/{pkg-56KRLZ5K.js → chunk-XD2LZRBS.js} +1 -7
- package/dist/chunks/chunk-XFVGX5HG.js +7 -0
- package/dist/chunks/chunk-XHOGOH6N.js +7 -0
- package/dist/chunks/{update-route-version-E3V47KNI.js → chunk-XPXOV5UO.js} +1 -7
- package/dist/chunks/chunk-XQ73QIQ3.js +7 -0
- package/dist/chunks/chunk-XSVBYDYI.js +8 -0
- package/dist/chunks/chunk-YKZLKOOD.js +12 -0
- package/dist/chunks/chunk-YMVDWVMO.js +7 -0
- package/dist/chunks/chunk-YPTLSODC.js +7 -0
- package/dist/chunks/chunk-YV6CTDHR.js +7 -0
- package/dist/chunks/chunk-Z6Y55QJW.js +23 -0
- package/dist/chunks/chunk-ZDX75YNZ.js +7 -0
- package/dist/chunks/chunk-ZIPVX7LD.js +7 -0
- package/dist/chunks/chunk-ZKYS7EAB.js +7 -0
- package/dist/chunks/chunk-ZXE4XYIV.js +7 -0
- package/dist/chunks/chunk-ZZQRMRWD.js +20 -0
- package/dist/chunks/cjs-GOQHXIHX.js +54 -0
- package/dist/chunks/clear-5NQAVWIF.js +8 -0
- package/dist/chunks/compile-vercel-config-6J2XUFRK.js +7 -0
- package/dist/chunks/config-CKYRXZXL.js +7 -0
- package/dist/chunks/config-VNUY4RJ4.js +8 -0
- package/dist/chunks/connect-git-provider-GIU5WZ52.js +7 -0
- package/dist/chunks/constants-G4UYVLOF.js +7 -0
- package/dist/chunks/create-project-SRQGD4JY.js +7 -0
- package/dist/chunks/delete-GTXXCSKQ.js +10 -0
- package/dist/chunks/delete-HRJEO4MI.js +9 -0
- package/dist/chunks/detect-projects-2GNCZ4CS.js +7 -0
- package/dist/chunks/detect-services-GHILEGNU.js +7 -0
- package/dist/chunks/disable-RWCRVG5O.js +7 -0
- package/dist/chunks/discard-SHFIYCJU.js +14 -0
- package/dist/chunks/edit-DMO3NSO2.js +9 -0
- package/dist/chunks/edit-EVQI2RSS.js +8 -0
- package/dist/chunks/enable-AWDU6STD.js +7 -0
- package/dist/chunks/esm-7HVUFWMN.js +7 -0
- package/dist/chunks/esm-BZBEM7YA.js +7 -0
- package/dist/chunks/esm-CXICLFA3.js +9 -0
- package/dist/chunks/esm-HDEHVK7I.js +9 -0
- package/dist/chunks/esm-NQRLKALI.js +20 -0
- package/dist/chunks/esm-SZZI53W7.js +7 -0
- package/dist/chunks/esm-WGJFGCLK.js +7 -0
- package/dist/chunks/exec-4AISDHUV.js +16372 -0
- package/dist/chunks/export-IQKTA4RS.js +19 -0
- package/dist/chunks/fetch-proxy-AEAWC6MD.js +7 -0
- package/dist/chunks/future-E2FHKPJN.js +7 -0
- package/dist/chunks/generate-cert-for-deploy-VKOWC4PZ.js +7 -0
- package/dist/chunks/image-LDFYNOCA.js +7 -0
- package/dist/chunks/import-builders-P7CXSX2D.js +7 -0
- package/dist/chunks/inspect-3N47ODIH.js +15 -0
- package/dist/chunks/inspect-53SGDDAH.js +20 -0
- package/dist/chunks/inspect-5INZDUQS.js +19 -0
- package/dist/chunks/inspect-WMT2M335.js +9 -0
- package/dist/chunks/inspect-Y6BUCOUV.js +13 -0
- package/dist/chunks/list-BIAPHKFM.js +11 -0
- package/dist/chunks/list-DMOCRRSE.js +16 -0
- package/dist/chunks/list-K5J7OULR.js +10 -0
- package/dist/chunks/login-DEAEVUHM.js +7 -0
- package/dist/chunks/login-SRVNHI4Y.js +9 -0
- package/dist/chunks/logs-GK7CJBYY.js +7 -0
- package/dist/chunks/ls-7ZX6DCJW.js +12 -0
- package/dist/chunks/ls-AJWN5ZR4.js +12 -0
- package/dist/chunks/ls-BFJWCRLZ.js +12 -0
- package/dist/chunks/ls-KGIE6HCO.js +12 -0
- package/dist/chunks/ls-UVKTHBTE.js +8 -0
- package/dist/chunks/ls-WEG45IOC.js +8 -0
- package/dist/chunks/native-self-update-KOJVRMHR.js +7 -0
- package/dist/chunks/open-OEWPI5G6.js +7 -0
- package/dist/chunks/openapi-MO5HYMHR.js +7 -0
- package/dist/chunks/permissions-EPQBQFE3.js +7 -0
- package/dist/chunks/pkg-YFU67U7I.js +7 -0
- package/dist/chunks/prompt-missing-credentials-IUHLYSQU.js +7 -0
- package/dist/chunks/publish-JG7MEPWT.js +15 -0
- package/dist/chunks/pull-MRKXG6TO.js +7 -0
- package/dist/chunks/purchase-domain-if-available-O5ARXEZ5.js +7 -0
- package/dist/chunks/push-XOXJDFYO.js +7 -0
- package/dist/chunks/query-AL7C6WV2.js +12 -0
- package/dist/chunks/reauthenticate-SH4XR7NH.js +7 -0
- package/dist/chunks/reorder-5DMRFDBY.js +10 -0
- package/dist/chunks/reply-WSRNZWFD.js +9 -0
- package/dist/chunks/repo-info-to-url-SK3VX6UL.js +7 -0
- package/dist/chunks/resolve-YJUXQVOZ.js +12 -0
- package/dist/chunks/resolve-deployment-framework-preset-XF3NJIDS.js +7 -0
- package/dist/chunks/restore-QT3DBGKU.js +16 -0
- package/dist/chunks/rm-MHPIUEZ5.js +8 -0
- package/dist/chunks/rm-MVZFU6RG.js +8 -0
- package/dist/chunks/rm-PXR4J2US.js +8 -0
- package/dist/chunks/rm-WB2AIP3N.js +8 -0
- package/dist/chunks/rm-XRP6MRUT.js +8 -0
- package/dist/chunks/routes-5DERZV5M.js +7 -0
- package/dist/chunks/rule-inspect-TT3DRGCS.js +8 -0
- package/dist/chunks/rules-B5GW4KJH.js +7 -0
- package/dist/chunks/schema-JY5QTZOG.js +14 -0
- package/dist/chunks/schema-KCNKVFT3.js +44 -0
- package/dist/chunks/select-org-KSCYSESV.js +7 -0
- package/dist/chunks/set-7BANEWEL.js +7 -0
- package/dist/chunks/setup-and-link-ZAV3EFGC.js +7 -0
- package/dist/chunks/slugify-O5DBATYT.js +7 -0
- package/dist/chunks/stamp-OX4YO3KY.js +7 -0
- package/dist/chunks/tags-VZR66NUC.js +7 -0
- package/dist/chunks/types-LRXQEDYI.js +14 -0
- package/dist/chunks/update-RBFNNSWE.js +8 -0
- package/dist/chunks/update-route-version-XZAFPQJC.js +7 -0
- package/dist/chunks/utils-B5ZTMQKY.js +58 -0
- package/dist/chunks/vlt-builder-importer-YVCYYRVV.js +11 -0
- package/dist/commands/build/index.js +24 -4925
- package/dist/commands/deploy/index.js +43 -2875
- package/dist/commands/dev/index.js +56 -23857
- package/dist/commands/env/index.js +26 -3411
- package/dist/commands/link/index.js +4 -284
- package/dist/commands/list/index.js +6 -566
- package/dist/commands-bulk.js +1187 -87691
- package/dist/help.js +1 -8
- package/dist/index.js +19 -2591
- package/dist/version.mjs +1 -1
- package/package.json +50 -51
- package/dist/chunks/add-EQZRT4XL.js +0 -221
- package/dist/chunks/add-KMDROZC3.js +0 -196
- package/dist/chunks/add-QPJ3XMBV.js +0 -145
- package/dist/chunks/build-W4HPTAOB.js +0 -251
- package/dist/chunks/chunk-26CU4Q3C.js +0 -598
- package/dist/chunks/chunk-2HSQ7YUK.js +0 -93
- package/dist/chunks/chunk-2JIX6UMI.js +0 -4626
- package/dist/chunks/chunk-2LCFOK66.js +0 -1536
- package/dist/chunks/chunk-332LMJLZ.js +0 -16014
- package/dist/chunks/chunk-3HZLXCVL.js +0 -137
- package/dist/chunks/chunk-3VM7HWF6.js +0 -104
- package/dist/chunks/chunk-3ZE5CFVM.js +0 -346
- package/dist/chunks/chunk-4IALDGB7.js +0 -22
- package/dist/chunks/chunk-4KD5BYHB.js +0 -127
- package/dist/chunks/chunk-4TUMNBEE.js +0 -231
- package/dist/chunks/chunk-4WG2MYCI.js +0 -163
- package/dist/chunks/chunk-57RHXXXG.js +0 -150
- package/dist/chunks/chunk-5AJPMLDV.js +0 -28
- package/dist/chunks/chunk-5EIV6LPQ.js +0 -305
- package/dist/chunks/chunk-5NF5HOBJ.js +0 -1854
- package/dist/chunks/chunk-653QRQAD.js +0 -417
- package/dist/chunks/chunk-67CRVWDF.js +0 -81
- package/dist/chunks/chunk-6E6KPBXY.js +0 -43
- package/dist/chunks/chunk-75VENWDN.js +0 -1892
- package/dist/chunks/chunk-7MRDIPJY.js +0 -107
- package/dist/chunks/chunk-7NRNFV77.js +0 -875
- package/dist/chunks/chunk-7Q45OKWR.js +0 -149
- package/dist/chunks/chunk-AHU7WNL2.js +0 -24
- package/dist/chunks/chunk-AINIBIP4.js +0 -39
- package/dist/chunks/chunk-AJ5HUOWB.js +0 -14059
- package/dist/chunks/chunk-AKLTIZCU.js +0 -46
- package/dist/chunks/chunk-AQ6P3IGG.js +0 -49
- package/dist/chunks/chunk-B5NH7SLK.js +0 -324
- package/dist/chunks/chunk-B5XLQKHI.js +0 -849
- package/dist/chunks/chunk-BEQV3X2L.js +0 -86
- package/dist/chunks/chunk-CAHP7UGE.js +0 -79
- package/dist/chunks/chunk-CFDDM4TX.js +0 -13618
- package/dist/chunks/chunk-CJV7J7B5.js +0 -314
- package/dist/chunks/chunk-CV5YC2EN.js +0 -867
- package/dist/chunks/chunk-CXFY6A6W.js +0 -255
- package/dist/chunks/chunk-D5SMZXVO.js +0 -233
- package/dist/chunks/chunk-E336ZXPP.js +0 -43
- package/dist/chunks/chunk-EDMW7SBH.js +0 -246
- package/dist/chunks/chunk-EFYMIIER.js +0 -40
- package/dist/chunks/chunk-EKPSCRJZ.js +0 -26
- package/dist/chunks/chunk-EOZFDJSY.js +0 -18
- package/dist/chunks/chunk-EWBCSDTM.js +0 -1708
- package/dist/chunks/chunk-EZKW5YJ2.js +0 -177
- package/dist/chunks/chunk-F2QLCXCF.js +0 -2399
- package/dist/chunks/chunk-FGDKMNEN.js +0 -21
- package/dist/chunks/chunk-FRVG4OW3.js +0 -7438
- package/dist/chunks/chunk-FVF4UHDM.js +0 -1288
- package/dist/chunks/chunk-G5FBSUL4.js +0 -822
- package/dist/chunks/chunk-GDOUDU6O.js +0 -74
- package/dist/chunks/chunk-GGP5R3FU.js +0 -129
- package/dist/chunks/chunk-GVNCVKCI.js +0 -68
- package/dist/chunks/chunk-GY5I4AYD.js +0 -122
- package/dist/chunks/chunk-GZLPFESR.js +0 -48
- package/dist/chunks/chunk-HB4UKFDO.js +0 -1295
- package/dist/chunks/chunk-HD4DR3DA.js +0 -818
- package/dist/chunks/chunk-HKHXKSXQ.js +0 -152
- package/dist/chunks/chunk-HM24ZWQL.js +0 -174
- package/dist/chunks/chunk-HRXRELD3.js +0 -338
- package/dist/chunks/chunk-IB5L4LKZ.js +0 -1082
- package/dist/chunks/chunk-IIMSID24.js +0 -104
- package/dist/chunks/chunk-J7JKZM4T.js +0 -58
- package/dist/chunks/chunk-JC2O346E.js +0 -137
- package/dist/chunks/chunk-JSD4EZL3.js +0 -34
- package/dist/chunks/chunk-JZXJZX7O.js +0 -257
- package/dist/chunks/chunk-K3RED3VO.js +0 -566
- package/dist/chunks/chunk-KFWQ3EFH.js +0 -151
- package/dist/chunks/chunk-KW7BS25T.js +0 -466
- package/dist/chunks/chunk-KXDWXXJH.js +0 -70
- package/dist/chunks/chunk-LERVNZTD.js +0 -90
- package/dist/chunks/chunk-LYAAQDNS.js +0 -242
- package/dist/chunks/chunk-M5I6INNF.js +0 -61
- package/dist/chunks/chunk-N6HP5BLI.js +0 -18190
- package/dist/chunks/chunk-ND5CF2H3.js +0 -53
- package/dist/chunks/chunk-NFU4XJIR.js +0 -120
- package/dist/chunks/chunk-NW34PW6V.js +0 -1772
- package/dist/chunks/chunk-OAMU5QO6.js +0 -18
- package/dist/chunks/chunk-OCIZ6ZYA.js +0 -253
- package/dist/chunks/chunk-ORQZKIIB.js +0 -2914
- package/dist/chunks/chunk-P3SKP5WM.js +0 -27
- package/dist/chunks/chunk-P4QNYOFB.js +0 -96
- package/dist/chunks/chunk-P7VSBDR4.js +0 -827
- package/dist/chunks/chunk-PEC3CQSK.js +0 -90
- package/dist/chunks/chunk-PMSMUMUO.js +0 -30
- package/dist/chunks/chunk-PNGVSHR3.js +0 -40
- package/dist/chunks/chunk-POOO7W47.js +0 -916
- package/dist/chunks/chunk-PRWJUY5U.js +0 -848
- package/dist/chunks/chunk-Q2DGFCO7.js +0 -579
- package/dist/chunks/chunk-RBF2NPUP.js +0 -577
- package/dist/chunks/chunk-RBIFXFZX.js +0 -52
- package/dist/chunks/chunk-RDTRWLWB.js +0 -11441
- package/dist/chunks/chunk-RN6V5ODW.js +0 -114
- package/dist/chunks/chunk-RNSMTWA6.js +0 -122
- package/dist/chunks/chunk-RTJASENB.js +0 -59
- package/dist/chunks/chunk-RVBZ64EQ.js +0 -52
- package/dist/chunks/chunk-S7KYDPEM.js +0 -1564
- package/dist/chunks/chunk-SLPSPYVR.js +0 -334
- package/dist/chunks/chunk-SM3F3PYJ.js +0 -522
- package/dist/chunks/chunk-TO7QZGYK.js +0 -105
- package/dist/chunks/chunk-TSBUHSN7.js +0 -3495
- package/dist/chunks/chunk-TSFWMUCY.js +0 -506
- package/dist/chunks/chunk-TZ2YI2VH.js +0 -87
- package/dist/chunks/chunk-UG2WOB5L.js +0 -150
- package/dist/chunks/chunk-UNKHOYMF.js +0 -559
- package/dist/chunks/chunk-UOVWUSLG.js +0 -2099
- package/dist/chunks/chunk-V4RMJKQP.js +0 -36
- package/dist/chunks/chunk-VGIMO3ZK.js +0 -17
- package/dist/chunks/chunk-VGKSIKCC.js +0 -92
- package/dist/chunks/chunk-VP5Y3SZG.js +0 -106
- package/dist/chunks/chunk-VXYGCOKL.js +0 -28
- package/dist/chunks/chunk-W7FGI2GZ.js +0 -233
- package/dist/chunks/chunk-WGGABYO5.js +0 -31
- package/dist/chunks/chunk-XDGOOW3K.js +0 -60
- package/dist/chunks/chunk-XFF5TGRA.js +0 -303
- package/dist/chunks/chunk-XNIZGCN5.js +0 -58
- package/dist/chunks/chunk-XPJLPUKO.js +0 -117
- package/dist/chunks/chunk-XUAWTW4W.js +0 -467
- package/dist/chunks/chunk-YPQSDAEW.js +0 -29
- package/dist/chunks/chunk-YS76T533.js +0 -270
- package/dist/chunks/chunk-ZDU2NODC.js +0 -104
- package/dist/chunks/chunk-ZW6HETRE.js +0 -97
- package/dist/chunks/cjs-DV4RM7XU.js +0 -20743
- package/dist/chunks/clear-4IACMLFU.js +0 -141
- package/dist/chunks/compile-vercel-config-PQQ3OCLV.js +0 -33
- package/dist/chunks/config-BQQKMQBP.js +0 -168
- package/dist/chunks/config-OCPNHXQL.js +0 -127
- package/dist/chunks/delete-HRKIYPCO.js +0 -159
- package/dist/chunks/delete-P2UL3KTU.js +0 -226
- package/dist/chunks/detect-projects-ODNU4PK2.js +0 -18
- package/dist/chunks/detect-services-U7QGT7VO.js +0 -40
- package/dist/chunks/disable-3NYMICQ3.js +0 -198
- package/dist/chunks/discard-RNVEJUK3.js +0 -145
- package/dist/chunks/edit-63S2RQHR.js +0 -162
- package/dist/chunks/edit-CTENFZ7H.js +0 -647
- package/dist/chunks/enable-WILWXAHV.js +0 -204
- package/dist/chunks/exec-4IPHZ55G.js +0 -1291
- package/dist/chunks/export-YHGV3EPK.js +0 -177
- package/dist/chunks/fetch-proxy-R3JZNXBZ.js +0 -99
- package/dist/chunks/image-MWKS2YMB.js +0 -75
- package/dist/chunks/import-builders-H55X5VYD.js +0 -39
- package/dist/chunks/inspect-JTJMK6TO.js +0 -596
- package/dist/chunks/inspect-KBIPLMGR.js +0 -216
- package/dist/chunks/inspect-OP26FDBY.js +0 -171
- package/dist/chunks/inspect-SW4UMWTB.js +0 -175
- package/dist/chunks/inspect-WPLZPVBO.js +0 -145
- package/dist/chunks/list-HE7DWAWH.js +0 -387
- package/dist/chunks/list-OUG7WCT7.js +0 -404
- package/dist/chunks/list-QUSEURJZ.js +0 -426
- package/dist/chunks/login-MIIQJVF3.js +0 -233
- package/dist/chunks/ls-24N3DUK4.js +0 -183
- package/dist/chunks/ls-3Y7KEFKT.js +0 -175
- package/dist/chunks/ls-75F5HIJ5.js +0 -188
- package/dist/chunks/ls-REN6X2X5.js +0 -204
- package/dist/chunks/ls-W4STUDXK.js +0 -223
- package/dist/chunks/ls-Z4CTSD6C.js +0 -210
- package/dist/chunks/open-ARMCLPBK.js +0 -116
- package/dist/chunks/permissions-JKI67F62.js +0 -99
- package/dist/chunks/publish-SMSQ7OX2.js +0 -155
- package/dist/chunks/pull-4QZJZELD.js +0 -45
- package/dist/chunks/push-T6IYQY2J.js +0 -191
- package/dist/chunks/query-CP3JK5LW.js +0 -725
- package/dist/chunks/reorder-RAWKFGLV.js +0 -412
- package/dist/chunks/reply-235UHUD4.js +0 -176
- package/dist/chunks/resolve-5KCLN7QV.js +0 -237
- package/dist/chunks/resolve-deployment-framework-preset-NPE6RLV3.js +0 -36
- package/dist/chunks/restore-D24WAUAN.js +0 -252
- package/dist/chunks/rm-DBQDXSOC.js +0 -162
- package/dist/chunks/rm-G5INO77R.js +0 -148
- package/dist/chunks/rm-NLKSEKZ5.js +0 -195
- package/dist/chunks/rm-QV76CJA4.js +0 -322
- package/dist/chunks/rm-TZ4PDDUK.js +0 -147
- package/dist/chunks/routes-QVMBXOSX.js +0 -24
- package/dist/chunks/rule-inspect-76MC7I2D.js +0 -123
- package/dist/chunks/rules-IDUXVTPG.js +0 -89
- package/dist/chunks/schema-AV6BHGKY.js +0 -237
- package/dist/chunks/schema-QJVQTNB4.js +0 -381
- package/dist/chunks/set-L5NFQSCF.js +0 -250
- package/dist/chunks/setup-and-link-USSVDKCM.js +0 -65
- package/dist/chunks/stamp-AA7R3MZS.js +0 -16
- package/dist/chunks/tags-2NLUU4EC.js +0 -69
- package/dist/chunks/types-4GAJ7XQQ.js +0 -116
- package/dist/chunks/update-WGLBB65M.js +0 -224
- package/dist/chunks/vlt-builder-importer-USCFHWPL.js +0 -322
|
@@ -1,818 +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 {
|
|
8
|
-
getResolvedOrderMetadata,
|
|
9
|
-
getRollupColumnName
|
|
10
|
-
} from "./chunk-7MRDIPJY.js";
|
|
11
|
-
import {
|
|
12
|
-
formatGranularity
|
|
13
|
-
} from "./chunk-5AJPMLDV.js";
|
|
14
|
-
import {
|
|
15
|
-
indent_default
|
|
16
|
-
} from "./chunk-A3NYPUKZ.js";
|
|
17
|
-
import {
|
|
18
|
-
ellipsizeMiddle
|
|
19
|
-
} from "./chunk-ND5CF2H3.js";
|
|
20
|
-
import {
|
|
21
|
-
elapsed
|
|
22
|
-
} from "./chunk-VXYGCOKL.js";
|
|
23
|
-
import {
|
|
24
|
-
require_ms
|
|
25
|
-
} from "./chunk-GGP5R3FU.js";
|
|
26
|
-
import {
|
|
27
|
-
table
|
|
28
|
-
} from "./chunk-NW34PW6V.js";
|
|
29
|
-
import {
|
|
30
|
-
require_source
|
|
31
|
-
} from "./chunk-S7KYDPEM.js";
|
|
32
|
-
import {
|
|
33
|
-
__toESM
|
|
34
|
-
} from "./chunk-TZ2YI2VH.js";
|
|
35
|
-
|
|
36
|
-
// src/commands/metrics/time-utils.ts
|
|
37
|
-
var import_ms = __toESM(require_ms(), 1);
|
|
38
|
-
var MINUTE_MS = 60 * 1e3;
|
|
39
|
-
var HOUR_MS = 60 * MINUTE_MS;
|
|
40
|
-
var DAY_MS = 24 * HOUR_MS;
|
|
41
|
-
function toGranularityDuration(input) {
|
|
42
|
-
const milliseconds = (0, import_ms.default)(input);
|
|
43
|
-
if (milliseconds === void 0) {
|
|
44
|
-
throw new Error(
|
|
45
|
-
`Invalid granularity format "${input}". Use 1m, 5m, 15m, 1h, 4h, 1d.`
|
|
46
|
-
);
|
|
47
|
-
}
|
|
48
|
-
if (milliseconds >= DAY_MS) {
|
|
49
|
-
return { days: milliseconds / DAY_MS };
|
|
50
|
-
}
|
|
51
|
-
if (milliseconds >= HOUR_MS) {
|
|
52
|
-
return { hours: milliseconds / HOUR_MS };
|
|
53
|
-
}
|
|
54
|
-
return { minutes: milliseconds / MINUTE_MS };
|
|
55
|
-
}
|
|
56
|
-
function toGranularityMs(input) {
|
|
57
|
-
const milliseconds = (0, import_ms.default)(input);
|
|
58
|
-
if (milliseconds === void 0) {
|
|
59
|
-
throw new Error(`Invalid granularity format "${input}".`);
|
|
60
|
-
}
|
|
61
|
-
return milliseconds;
|
|
62
|
-
}
|
|
63
|
-
var GRANULARITY_THRESHOLDS = [
|
|
64
|
-
[1 * HOUR_MS, "1m", "1m"],
|
|
65
|
-
// ≤1h
|
|
66
|
-
[2 * HOUR_MS, "5m", "5m"],
|
|
67
|
-
// ≤2h
|
|
68
|
-
[12 * HOUR_MS, "15m", "5m"],
|
|
69
|
-
// ≤12h
|
|
70
|
-
[3 * DAY_MS, "1h", "1h"],
|
|
71
|
-
// ≤3d
|
|
72
|
-
[30 * DAY_MS, "4h", "4h"]
|
|
73
|
-
// ≤30d
|
|
74
|
-
];
|
|
75
|
-
var FALLBACK_GRANULARITY = "1d";
|
|
76
|
-
function getAutoGranularity(rangeMs) {
|
|
77
|
-
for (const [maxRange, defaultG] of GRANULARITY_THRESHOLDS) {
|
|
78
|
-
if (rangeMs <= maxRange) {
|
|
79
|
-
return defaultG;
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
return FALLBACK_GRANULARITY;
|
|
83
|
-
}
|
|
84
|
-
function getMinGranularity(rangeMs) {
|
|
85
|
-
for (const [maxRange, , minG] of GRANULARITY_THRESHOLDS) {
|
|
86
|
-
if (rangeMs <= maxRange) {
|
|
87
|
-
return minG;
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
return FALLBACK_GRANULARITY;
|
|
91
|
-
}
|
|
92
|
-
function computeGranularity(rangeMs, explicit) {
|
|
93
|
-
if (!explicit) {
|
|
94
|
-
const auto = getAutoGranularity(rangeMs);
|
|
95
|
-
return {
|
|
96
|
-
duration: toGranularityDuration(auto),
|
|
97
|
-
adjusted: false
|
|
98
|
-
};
|
|
99
|
-
}
|
|
100
|
-
const minG = getMinGranularity(rangeMs);
|
|
101
|
-
const explicitMs = toGranularityMs(explicit);
|
|
102
|
-
const minMs = toGranularityMs(minG);
|
|
103
|
-
if (explicitMs < minMs) {
|
|
104
|
-
const rangeDays = Math.round(rangeMs / DAY_MS);
|
|
105
|
-
const rangeHours = Math.round(rangeMs / HOUR_MS);
|
|
106
|
-
const rangeLabel = rangeDays >= 1 ? `${rangeDays}-day` : `${rangeHours}-hour`;
|
|
107
|
-
return {
|
|
108
|
-
duration: toGranularityDuration(minG),
|
|
109
|
-
adjusted: true,
|
|
110
|
-
notice: `Granularity adjusted from ${explicit} to ${minG} for a ${rangeLabel} time range.`
|
|
111
|
-
};
|
|
112
|
-
}
|
|
113
|
-
return {
|
|
114
|
-
duration: toGranularityDuration(explicit),
|
|
115
|
-
adjusted: false
|
|
116
|
-
};
|
|
117
|
-
}
|
|
118
|
-
function toGranularityMsFromDuration(duration) {
|
|
119
|
-
if ("minutes" in duration) {
|
|
120
|
-
return duration.minutes * MINUTE_MS;
|
|
121
|
-
}
|
|
122
|
-
if ("hours" in duration) {
|
|
123
|
-
return duration.hours * HOUR_MS;
|
|
124
|
-
}
|
|
125
|
-
return duration.days * DAY_MS;
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
// src/commands/metrics/types.ts
|
|
129
|
-
var CANONICAL_AGGREGATIONS = [
|
|
130
|
-
"count",
|
|
131
|
-
"sum",
|
|
132
|
-
"avg",
|
|
133
|
-
"min",
|
|
134
|
-
"max",
|
|
135
|
-
"p50",
|
|
136
|
-
"p75",
|
|
137
|
-
"p90",
|
|
138
|
-
"p95",
|
|
139
|
-
"p99",
|
|
140
|
-
"stddev"
|
|
141
|
-
];
|
|
142
|
-
function isCanonicalAggregation(aggregation) {
|
|
143
|
-
return CANONICAL_AGGREGATIONS.includes(aggregation);
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
// src/commands/metrics/metric-units.ts
|
|
147
|
-
var DURATION_UNITS = /* @__PURE__ */ new Set([
|
|
148
|
-
"nanoseconds",
|
|
149
|
-
"microseconds",
|
|
150
|
-
"milliseconds",
|
|
151
|
-
"seconds",
|
|
152
|
-
"minutes",
|
|
153
|
-
"hours",
|
|
154
|
-
"days"
|
|
155
|
-
]);
|
|
156
|
-
function normalizeMetricUnit(unit) {
|
|
157
|
-
return unit.trim().toLowerCase().replace(/[_\s]+/g, " ");
|
|
158
|
-
}
|
|
159
|
-
function getPreferredCustomMetricAggregation(unit) {
|
|
160
|
-
const normalizedUnit = normalizeMetricUnit(unit);
|
|
161
|
-
if (DURATION_UNITS.has(normalizedUnit)) {
|
|
162
|
-
return "p75";
|
|
163
|
-
}
|
|
164
|
-
if (normalizedUnit === "percent") {
|
|
165
|
-
return "avg";
|
|
166
|
-
}
|
|
167
|
-
return "sum";
|
|
168
|
-
}
|
|
169
|
-
function getDefaultCustomMetricAggregation(unit, aggregations) {
|
|
170
|
-
const preferredAggregation = getPreferredCustomMetricAggregation(unit);
|
|
171
|
-
if (aggregations?.includes(preferredAggregation)) {
|
|
172
|
-
return preferredAggregation;
|
|
173
|
-
}
|
|
174
|
-
if (aggregations?.includes("sum")) {
|
|
175
|
-
return "sum";
|
|
176
|
-
}
|
|
177
|
-
return aggregations?.find(isCanonicalAggregation);
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
// src/commands/metrics/text-output.ts
|
|
181
|
-
var import_chalk = __toESM(require_source(), 1);
|
|
182
|
-
var GROUP_KEY_DELIMITER = "";
|
|
183
|
-
var MAX_SPARKLINE_LENGTH = 120;
|
|
184
|
-
var DURATION_SCALE_MS = {
|
|
185
|
-
seconds: 1e3,
|
|
186
|
-
minutes: 6e4,
|
|
187
|
-
hours: 36e5,
|
|
188
|
-
days: 864e5
|
|
189
|
-
};
|
|
190
|
-
var BYTE_SCALE = {
|
|
191
|
-
bytes: 1,
|
|
192
|
-
kilobytes: 1e3,
|
|
193
|
-
megabytes: 1e6,
|
|
194
|
-
gigabytes: 1e9,
|
|
195
|
-
terabytes: 1e12,
|
|
196
|
-
petabytes: 1e15
|
|
197
|
-
};
|
|
198
|
-
var COMPACT_NUMBER_FORMATTER = new Intl.NumberFormat("en-US", {
|
|
199
|
-
notation: "compact",
|
|
200
|
-
compactDisplay: "short"
|
|
201
|
-
});
|
|
202
|
-
var TWO_FRACTION_NUMBER_FORMATTER = new Intl.NumberFormat("en-US", {
|
|
203
|
-
maximumFractionDigits: 2
|
|
204
|
-
});
|
|
205
|
-
var TWO_SIGNIFICANT_NUMBER_FORMATTER = new Intl.NumberFormat("en-US", {
|
|
206
|
-
minimumSignificantDigits: 2,
|
|
207
|
-
maximumSignificantDigits: 2,
|
|
208
|
-
maximumFractionDigits: 2
|
|
209
|
-
});
|
|
210
|
-
var PERCENTAGE_FORMATTER = new Intl.NumberFormat("en-US", {
|
|
211
|
-
style: "unit",
|
|
212
|
-
unit: "percent",
|
|
213
|
-
unitDisplay: "narrow",
|
|
214
|
-
maximumFractionDigits: 1
|
|
215
|
-
});
|
|
216
|
-
var USD_FORMATTER = new Intl.NumberFormat("en-US", {
|
|
217
|
-
style: "currency",
|
|
218
|
-
currency: "USD",
|
|
219
|
-
minimumFractionDigits: 2,
|
|
220
|
-
maximumFractionDigits: 2
|
|
221
|
-
});
|
|
222
|
-
var BLOCKS = ["\u2581", "\u2582", "\u2583", "\u2584", "\u2585", "\u2586", "\u2587", "\u2588"];
|
|
223
|
-
var MISSING_CHAR = "\xB7";
|
|
224
|
-
function isAggregationWithDimension(aggregation) {
|
|
225
|
-
const [, dimension] = aggregation.split("/");
|
|
226
|
-
return Boolean(dimension);
|
|
227
|
-
}
|
|
228
|
-
function toGroupKey(groupValues) {
|
|
229
|
-
if (groupValues.length === 0) {
|
|
230
|
-
return "";
|
|
231
|
-
}
|
|
232
|
-
return groupValues.join(GROUP_KEY_DELIMITER);
|
|
233
|
-
}
|
|
234
|
-
function pad2(n) {
|
|
235
|
-
return String(n).padStart(2, "0");
|
|
236
|
-
}
|
|
237
|
-
function pad4(n) {
|
|
238
|
-
return String(n).padStart(4, "0");
|
|
239
|
-
}
|
|
240
|
-
function formatHumanMinute(date) {
|
|
241
|
-
return `${pad4(date.getUTCFullYear())}-${pad2(date.getUTCMonth() + 1)}-${pad2(date.getUTCDate())} ${pad2(date.getUTCHours())}:${pad2(date.getUTCMinutes())}`;
|
|
242
|
-
}
|
|
243
|
-
function formatPeriodBound(input) {
|
|
244
|
-
const date = new Date(input);
|
|
245
|
-
if (isNaN(date.getTime())) {
|
|
246
|
-
return input;
|
|
247
|
-
}
|
|
248
|
-
return formatHumanMinute(date);
|
|
249
|
-
}
|
|
250
|
-
function formatPeriodSpan(startInput, endInput) {
|
|
251
|
-
const start = Date.parse(startInput);
|
|
252
|
-
const end = Date.parse(endInput);
|
|
253
|
-
const durationMs = end - start;
|
|
254
|
-
if (!Number.isFinite(durationMs) || durationMs <= 0) {
|
|
255
|
-
return null;
|
|
256
|
-
}
|
|
257
|
-
return elapsed(durationMs);
|
|
258
|
-
}
|
|
259
|
-
function getStatColumns(aggregation) {
|
|
260
|
-
if (aggregation === "sum" || aggregation === "count") {
|
|
261
|
-
return ["total", "avg", "min", "max"];
|
|
262
|
-
}
|
|
263
|
-
return ["avg", "min", "max"];
|
|
264
|
-
}
|
|
265
|
-
function toNumericValue(value) {
|
|
266
|
-
if (value === null || value === void 0) {
|
|
267
|
-
return null;
|
|
268
|
-
}
|
|
269
|
-
if (typeof value === "number") {
|
|
270
|
-
return Number.isFinite(value) ? value : null;
|
|
271
|
-
}
|
|
272
|
-
const parsed = Number(value);
|
|
273
|
-
return Number.isFinite(parsed) ? parsed : null;
|
|
274
|
-
}
|
|
275
|
-
function isNonNullNumber(value) {
|
|
276
|
-
return value !== null;
|
|
277
|
-
}
|
|
278
|
-
function isPointWithValue(point) {
|
|
279
|
-
return point.value !== null;
|
|
280
|
-
}
|
|
281
|
-
function getOrCreate(map, key, make) {
|
|
282
|
-
const existing = map.get(key);
|
|
283
|
-
if (existing !== void 0) {
|
|
284
|
-
return existing;
|
|
285
|
-
}
|
|
286
|
-
const created = make();
|
|
287
|
-
map.set(key, created);
|
|
288
|
-
return created;
|
|
289
|
-
}
|
|
290
|
-
function getGroupFieldValue(row, field) {
|
|
291
|
-
const value = row[field];
|
|
292
|
-
return value == null || value === "" ? "(not set)" : String(value);
|
|
293
|
-
}
|
|
294
|
-
function normalizeTimestampToIso(timestamp) {
|
|
295
|
-
const parsed = Date.parse(timestamp);
|
|
296
|
-
if (isNaN(parsed)) {
|
|
297
|
-
return null;
|
|
298
|
-
}
|
|
299
|
-
return new Date(parsed).toISOString();
|
|
300
|
-
}
|
|
301
|
-
function formatStatCell(column, stats, periodStart, periodEnd, formatValue) {
|
|
302
|
-
switch (column) {
|
|
303
|
-
case "total":
|
|
304
|
-
return formatValue(stats.total);
|
|
305
|
-
case "avg":
|
|
306
|
-
return formatValue(stats.avg, {
|
|
307
|
-
preserveFractionalCount: true
|
|
308
|
-
});
|
|
309
|
-
case "min": {
|
|
310
|
-
const ts = formatMinMaxTimestamp(
|
|
311
|
-
new Date(stats.min.timestamp),
|
|
312
|
-
periodStart,
|
|
313
|
-
periodEnd
|
|
314
|
-
);
|
|
315
|
-
return `${formatValue(stats.min.value)} at ${ts}`;
|
|
316
|
-
}
|
|
317
|
-
case "max": {
|
|
318
|
-
const ts = formatMinMaxTimestamp(
|
|
319
|
-
new Date(stats.max.timestamp),
|
|
320
|
-
periodStart,
|
|
321
|
-
periodEnd
|
|
322
|
-
);
|
|
323
|
-
return `${formatValue(stats.max.value)} at ${ts}`;
|
|
324
|
-
}
|
|
325
|
-
}
|
|
326
|
-
}
|
|
327
|
-
function buildExpectedTimestamps(periodStart, periodEnd, granularityMs) {
|
|
328
|
-
const start = Date.parse(periodStart);
|
|
329
|
-
const end = Date.parse(periodEnd);
|
|
330
|
-
if (isNaN(start) || isNaN(end) || granularityMs <= 0 || end <= start) {
|
|
331
|
-
return [];
|
|
332
|
-
}
|
|
333
|
-
const timestamps = [];
|
|
334
|
-
for (let current = start; current < end; current += granularityMs) {
|
|
335
|
-
timestamps.push(new Date(current).toISOString());
|
|
336
|
-
}
|
|
337
|
-
return timestamps;
|
|
338
|
-
}
|
|
339
|
-
function buildObservedTimestamps(observedTimestamps, granularityMs) {
|
|
340
|
-
const timestamps = [...observedTimestamps].map((timestamp) => Date.parse(timestamp)).filter(Number.isFinite).sort((a, b) => a - b);
|
|
341
|
-
if (timestamps.length === 0 || granularityMs <= 0) {
|
|
342
|
-
return [];
|
|
343
|
-
}
|
|
344
|
-
const start = timestamps[0];
|
|
345
|
-
const end = timestamps[timestamps.length - 1] + granularityMs;
|
|
346
|
-
return buildExpectedTimestamps(
|
|
347
|
-
new Date(start).toISOString(),
|
|
348
|
-
new Date(end).toISOString(),
|
|
349
|
-
granularityMs
|
|
350
|
-
);
|
|
351
|
-
}
|
|
352
|
-
function buildSeriesTimestamps(periodStart, periodEnd, granularityMs, observedTimestamps) {
|
|
353
|
-
const expectedTimestamps = buildExpectedTimestamps(
|
|
354
|
-
periodStart,
|
|
355
|
-
periodEnd,
|
|
356
|
-
granularityMs
|
|
357
|
-
);
|
|
358
|
-
if (observedTimestamps.size === 0 || expectedTimestamps.some((timestamp) => observedTimestamps.has(timestamp))) {
|
|
359
|
-
return expectedTimestamps;
|
|
360
|
-
}
|
|
361
|
-
return buildObservedTimestamps(observedTimestamps, granularityMs);
|
|
362
|
-
}
|
|
363
|
-
function formatCount(n) {
|
|
364
|
-
return Math.round(n).toLocaleString("en-US");
|
|
365
|
-
}
|
|
366
|
-
function formatDecimal(n) {
|
|
367
|
-
if (!Number.isFinite(n)) {
|
|
368
|
-
return String(n);
|
|
369
|
-
}
|
|
370
|
-
if (n === 0 || Object.is(n, -0)) {
|
|
371
|
-
return "0";
|
|
372
|
-
}
|
|
373
|
-
const sign = n < 0 ? "-" : "";
|
|
374
|
-
const abs = Math.abs(n);
|
|
375
|
-
if (abs >= 1) {
|
|
376
|
-
return `${sign}${abs.toFixed(1)}`;
|
|
377
|
-
}
|
|
378
|
-
const exponent = Math.floor(Math.log10(abs));
|
|
379
|
-
const decimals = Math.min(20, Math.max(2, -exponent + 1));
|
|
380
|
-
const fixed = abs.toFixed(decimals);
|
|
381
|
-
const trimmed = fixed.replace(/(\.\d*?[1-9])0+$/, "$1").replace(/\.0+$/, "").replace(/\.$/, "");
|
|
382
|
-
return `${sign}${trimmed}`;
|
|
383
|
-
}
|
|
384
|
-
function formatDuration(durationMs) {
|
|
385
|
-
const durationSeconds = durationMs / 1e3;
|
|
386
|
-
if (durationMs < 1e3) {
|
|
387
|
-
return `${durationMs.toFixed(0)}ms`;
|
|
388
|
-
}
|
|
389
|
-
if (durationMs < 5e3) {
|
|
390
|
-
return `${Math.round(durationSeconds * 100) / 100}s`;
|
|
391
|
-
}
|
|
392
|
-
if (durationSeconds < 60) {
|
|
393
|
-
return `${durationSeconds.toFixed(0)}s`;
|
|
394
|
-
}
|
|
395
|
-
if (durationSeconds < 3600) {
|
|
396
|
-
return `${(durationSeconds / 60).toFixed(0)}m`;
|
|
397
|
-
}
|
|
398
|
-
return `${(durationSeconds / 3600).toFixed(0)}h`;
|
|
399
|
-
}
|
|
400
|
-
function formatBytes(bytes) {
|
|
401
|
-
if (bytes === 0) {
|
|
402
|
-
return "0 Bytes";
|
|
403
|
-
}
|
|
404
|
-
const units = ["Bytes", "KB", "MB", "GB", "TB", "PB"];
|
|
405
|
-
const absoluteBytes = Math.abs(bytes);
|
|
406
|
-
let unitIndex = Math.min(
|
|
407
|
-
units.length - 1,
|
|
408
|
-
Math.max(0, Math.floor(Math.log(absoluteBytes) / Math.log(1e3)))
|
|
409
|
-
);
|
|
410
|
-
let value = bytes / 1e3 ** unitIndex;
|
|
411
|
-
if (unitIndex === 1 || unitIndex === 2) {
|
|
412
|
-
value = Math.round(value);
|
|
413
|
-
if (Math.abs(value) === 1e3 && unitIndex < units.length - 1) {
|
|
414
|
-
value /= 1e3;
|
|
415
|
-
unitIndex += 1;
|
|
416
|
-
}
|
|
417
|
-
}
|
|
418
|
-
return `${TWO_FRACTION_NUMBER_FORMATTER.format(value)} ${units[unitIndex]}`;
|
|
419
|
-
}
|
|
420
|
-
function formatMetricValue(value, baseUnit, aggregation, opts) {
|
|
421
|
-
const formatCountValue = () => opts?.preserveFractionalCount && !Number.isInteger(value) ? formatDecimal(value) : formatCount(value);
|
|
422
|
-
if (isAggregationWithDimension(aggregation) || aggregation === "count") {
|
|
423
|
-
return formatCountValue();
|
|
424
|
-
}
|
|
425
|
-
const unit = normalizeMetricUnit(baseUnit ?? "units");
|
|
426
|
-
if (aggregation === "percent" || unit === "percent") {
|
|
427
|
-
return PERCENTAGE_FORMATTER.format(value);
|
|
428
|
-
}
|
|
429
|
-
if (aggregation === "unique") {
|
|
430
|
-
return COMPACT_NUMBER_FORMATTER.format(value);
|
|
431
|
-
}
|
|
432
|
-
const withRateSuffix = (formatted2) => aggregation === "persecond" ? `${formatted2}/s` : formatted2;
|
|
433
|
-
if (unit === "milliseconds") {
|
|
434
|
-
return withRateSuffix(formatDuration(value));
|
|
435
|
-
}
|
|
436
|
-
const durationScale = DURATION_SCALE_MS[unit];
|
|
437
|
-
if (durationScale) {
|
|
438
|
-
return withRateSuffix(formatDuration(value * durationScale));
|
|
439
|
-
}
|
|
440
|
-
if (unit === "nanoseconds" || unit === "microseconds") {
|
|
441
|
-
const suffix = unit === "nanoseconds" ? " ns" : " \xB5s";
|
|
442
|
-
const formatted2 = TWO_FRACTION_NUMBER_FORMATTER.format(value);
|
|
443
|
-
return withRateSuffix(`${formatted2}${suffix}`);
|
|
444
|
-
}
|
|
445
|
-
const byteScale = BYTE_SCALE[unit];
|
|
446
|
-
if (byteScale) {
|
|
447
|
-
return withRateSuffix(formatBytes(value * byteScale));
|
|
448
|
-
}
|
|
449
|
-
if (unit === "gigabyte hour" || unit === "gigabyte hours") {
|
|
450
|
-
const formatted2 = TWO_SIGNIFICANT_NUMBER_FORMATTER.format(value);
|
|
451
|
-
return withRateSuffix(`${formatted2} GB-hrs`);
|
|
452
|
-
}
|
|
453
|
-
if (unit === "usd" || unit === "us dollars" || unit === "dollars") {
|
|
454
|
-
return withRateSuffix(USD_FORMATTER.format(value));
|
|
455
|
-
}
|
|
456
|
-
if (unit === "count" && aggregation === "sum") {
|
|
457
|
-
return formatCountValue();
|
|
458
|
-
}
|
|
459
|
-
const formatted = COMPACT_NUMBER_FORMATTER.format(value);
|
|
460
|
-
const unitLabel = baseUnit?.trim();
|
|
461
|
-
if (!unitLabel || unit === "units" || unit === "count" || unit === "ratio") {
|
|
462
|
-
return withRateSuffix(formatted);
|
|
463
|
-
}
|
|
464
|
-
return withRateSuffix(`${formatted} ${unitLabel}`);
|
|
465
|
-
}
|
|
466
|
-
function formatMinMaxTimestamp(date, periodStart, periodEnd) {
|
|
467
|
-
const sameDay = periodStart.getUTCFullYear() === periodEnd.getUTCFullYear() && periodStart.getUTCMonth() === periodEnd.getUTCMonth() && periodStart.getUTCDate() === periodEnd.getUTCDate();
|
|
468
|
-
if (sameDay) {
|
|
469
|
-
return `${pad2(date.getUTCHours())}:${pad2(date.getUTCMinutes())}`;
|
|
470
|
-
}
|
|
471
|
-
const sameYear = periodStart.getUTCFullYear() === periodEnd.getUTCFullYear();
|
|
472
|
-
if (sameYear) {
|
|
473
|
-
return `${pad2(date.getUTCMonth() + 1)}-${pad2(date.getUTCDate())} ${pad2(date.getUTCHours())}:${pad2(date.getUTCMinutes())}`;
|
|
474
|
-
}
|
|
475
|
-
return `${pad4(date.getUTCFullYear())}-${pad2(date.getUTCMonth() + 1)}-${pad2(date.getUTCDate())} ${pad2(date.getUTCHours())}:${pad2(date.getUTCMinutes())}`;
|
|
476
|
-
}
|
|
477
|
-
function extractGroupedSeries(data, groupBy, rollupColumn, periodStart, periodEnd, granularityMs) {
|
|
478
|
-
const groups = [];
|
|
479
|
-
const groupValues = /* @__PURE__ */ new Map();
|
|
480
|
-
const valueByGroup = /* @__PURE__ */ new Map();
|
|
481
|
-
const observedTimestamps = /* @__PURE__ */ new Set();
|
|
482
|
-
for (const row of data) {
|
|
483
|
-
const values = groupBy.map((field) => getGroupFieldValue(row, field));
|
|
484
|
-
const key = toGroupKey(values);
|
|
485
|
-
if (!groupValues.has(key)) {
|
|
486
|
-
groups.push(key);
|
|
487
|
-
groupValues.set(key, values);
|
|
488
|
-
}
|
|
489
|
-
const groupMap = getOrCreate(valueByGroup, key, () => /* @__PURE__ */ new Map());
|
|
490
|
-
const rawTimestamp = row.timestamp;
|
|
491
|
-
if (rawTimestamp.length === 0) {
|
|
492
|
-
continue;
|
|
493
|
-
}
|
|
494
|
-
const timestamp = normalizeTimestampToIso(rawTimestamp);
|
|
495
|
-
if (!timestamp) {
|
|
496
|
-
continue;
|
|
497
|
-
}
|
|
498
|
-
observedTimestamps.add(timestamp);
|
|
499
|
-
const numeric = toNumericValue(row[rollupColumn]);
|
|
500
|
-
groupMap.set(timestamp, numeric);
|
|
501
|
-
}
|
|
502
|
-
const expectedTimestamps = buildSeriesTimestamps(
|
|
503
|
-
periodStart,
|
|
504
|
-
periodEnd,
|
|
505
|
-
granularityMs,
|
|
506
|
-
observedTimestamps
|
|
507
|
-
);
|
|
508
|
-
const series = /* @__PURE__ */ new Map();
|
|
509
|
-
for (const key of groups) {
|
|
510
|
-
const byTimestamp = valueByGroup.get(key);
|
|
511
|
-
if (!byTimestamp) {
|
|
512
|
-
continue;
|
|
513
|
-
}
|
|
514
|
-
const points = expectedTimestamps.map((timestamp) => ({
|
|
515
|
-
timestamp,
|
|
516
|
-
value: byTimestamp.has(timestamp) ? byTimestamp.get(timestamp) ?? null : null
|
|
517
|
-
}));
|
|
518
|
-
series.set(key, points);
|
|
519
|
-
}
|
|
520
|
-
return { groups, series, groupValues };
|
|
521
|
-
}
|
|
522
|
-
function computeGroupStats(points) {
|
|
523
|
-
const present = points.filter(isPointWithValue);
|
|
524
|
-
if (present.length === 0) {
|
|
525
|
-
return {
|
|
526
|
-
total: 0,
|
|
527
|
-
avg: 0,
|
|
528
|
-
min: { value: 0, timestamp: "" },
|
|
529
|
-
max: { value: 0, timestamp: "" },
|
|
530
|
-
count: 0,
|
|
531
|
-
allMissing: true
|
|
532
|
-
};
|
|
533
|
-
}
|
|
534
|
-
let total = 0;
|
|
535
|
-
let min = present[0];
|
|
536
|
-
let max = present[0];
|
|
537
|
-
for (const point of present) {
|
|
538
|
-
total += point.value;
|
|
539
|
-
if (point.value < min.value) {
|
|
540
|
-
min = point;
|
|
541
|
-
}
|
|
542
|
-
if (point.value > max.value) {
|
|
543
|
-
max = point;
|
|
544
|
-
}
|
|
545
|
-
}
|
|
546
|
-
return {
|
|
547
|
-
total,
|
|
548
|
-
avg: total / present.length,
|
|
549
|
-
min: { value: min.value, timestamp: min.timestamp },
|
|
550
|
-
max: { value: max.value, timestamp: max.timestamp },
|
|
551
|
-
count: present.length,
|
|
552
|
-
allMissing: false
|
|
553
|
-
};
|
|
554
|
-
}
|
|
555
|
-
var MAX_GROUP_VALUE_LENGTH = 60;
|
|
556
|
-
function downsample(values, maxLen) {
|
|
557
|
-
if (maxLen <= 0) {
|
|
558
|
-
return [];
|
|
559
|
-
}
|
|
560
|
-
if (values.length <= maxLen) {
|
|
561
|
-
return [...values];
|
|
562
|
-
}
|
|
563
|
-
const result = [];
|
|
564
|
-
for (let i = 0; i < maxLen; i++) {
|
|
565
|
-
const start = Math.floor(i * values.length / maxLen);
|
|
566
|
-
const end = Math.floor((i + 1) * values.length / maxLen);
|
|
567
|
-
const bucket = values.slice(start, Math.max(start + 1, end));
|
|
568
|
-
const nullCount = bucket.filter((value) => value === null).length;
|
|
569
|
-
if (nullCount === bucket.length || nullCount > bucket.length / 2) {
|
|
570
|
-
result.push(null);
|
|
571
|
-
continue;
|
|
572
|
-
}
|
|
573
|
-
const present = bucket.filter(isNonNullNumber);
|
|
574
|
-
const avg = present.reduce((sum, value) => sum + value, 0) / present.length;
|
|
575
|
-
result.push(avg);
|
|
576
|
-
}
|
|
577
|
-
return result;
|
|
578
|
-
}
|
|
579
|
-
function generateSparkline(values) {
|
|
580
|
-
const sampled = downsample(values, MAX_SPARKLINE_LENGTH);
|
|
581
|
-
if (sampled.length === 0) {
|
|
582
|
-
return "";
|
|
583
|
-
}
|
|
584
|
-
const present = sampled.filter(isNonNullNumber);
|
|
585
|
-
if (present.length === 0) {
|
|
586
|
-
return sampled.map(() => MISSING_CHAR).join("");
|
|
587
|
-
}
|
|
588
|
-
const min = Math.min(...present);
|
|
589
|
-
const max = Math.max(...present);
|
|
590
|
-
if (min === max) {
|
|
591
|
-
const block = min === 0 ? BLOCKS[0] : BLOCKS[BLOCKS.length - 1];
|
|
592
|
-
return sampled.map((value) => value === null ? MISSING_CHAR : block).join("");
|
|
593
|
-
}
|
|
594
|
-
const range = max - min;
|
|
595
|
-
return sampled.map((value) => {
|
|
596
|
-
if (value === null) {
|
|
597
|
-
return MISSING_CHAR;
|
|
598
|
-
}
|
|
599
|
-
const ratio = (value - min) / range;
|
|
600
|
-
const index = Math.max(
|
|
601
|
-
0,
|
|
602
|
-
Math.min(BLOCKS.length - 1, Math.round(ratio * (BLOCKS.length - 1)))
|
|
603
|
-
);
|
|
604
|
-
return BLOCKS[index];
|
|
605
|
-
}).join("");
|
|
606
|
-
}
|
|
607
|
-
function formatMetadataHeader(opts) {
|
|
608
|
-
const periodSpan = opts.compact ? formatPeriodSpan(opts.periodStart, opts.periodEnd) : null;
|
|
609
|
-
const rows = [];
|
|
610
|
-
if (!opts.compact) {
|
|
611
|
-
rows.push({
|
|
612
|
-
key: "Metric",
|
|
613
|
-
value: `${opts.metric} ${opts.aggregation}`
|
|
614
|
-
});
|
|
615
|
-
}
|
|
616
|
-
rows.push(
|
|
617
|
-
{
|
|
618
|
-
// Period bounds are always UTC; annotate them so the boundary is
|
|
619
|
-
// unambiguous when the Interval below reports a different
|
|
620
|
-
// --bucket-timezone.
|
|
621
|
-
key: "Period",
|
|
622
|
-
value: `${formatPeriodBound(opts.periodStart)} to ${formatPeriodBound(opts.periodEnd)} (UTC)${periodSpan ? ` ${periodSpan}` : ""}`
|
|
623
|
-
},
|
|
624
|
-
{
|
|
625
|
-
// Period bounds are always UTC; the timezone only controls calendar
|
|
626
|
-
// bucket alignment, which is a no-op below 1d granularity. Annotate the
|
|
627
|
-
// interval (instead of a standalone Timezone row) to avoid implying the
|
|
628
|
-
// period itself is zone-local.
|
|
629
|
-
key: "Interval",
|
|
630
|
-
value: "days" in opts.granularity ? `${formatGranularity(opts.granularity)} (${opts.bucketTimezone ?? "UTC"})` : formatGranularity(opts.granularity)
|
|
631
|
-
}
|
|
632
|
-
);
|
|
633
|
-
if (typeof opts.periodUnique === "number") {
|
|
634
|
-
rows.push({
|
|
635
|
-
key: "Unique (period)",
|
|
636
|
-
value: formatCount(opts.periodUnique)
|
|
637
|
-
});
|
|
638
|
-
}
|
|
639
|
-
if (!opts.compact && opts.filter) {
|
|
640
|
-
rows.push({ key: "Filter", value: opts.filter });
|
|
641
|
-
}
|
|
642
|
-
if (!opts.compact && opts.orderBy && opts.orderDirection) {
|
|
643
|
-
rows.push({
|
|
644
|
-
key: "Order By",
|
|
645
|
-
value: `${opts.orderBy} ${opts.orderDirection}${opts.orderBy === "count" ? " (default)" : ""}`
|
|
646
|
-
});
|
|
647
|
-
}
|
|
648
|
-
if (opts.scope.type === "project") {
|
|
649
|
-
rows.push({
|
|
650
|
-
key: "Project",
|
|
651
|
-
value: `${opts.projectName ?? opts.scope.projectIds[0]} (${opts.teamName ?? opts.scope.ownerId})`
|
|
652
|
-
});
|
|
653
|
-
} else {
|
|
654
|
-
rows.push({
|
|
655
|
-
key: "Team",
|
|
656
|
-
value: `${opts.teamName ?? opts.scope.ownerId} (all projects)`
|
|
657
|
-
});
|
|
658
|
-
}
|
|
659
|
-
if (!opts.compact && typeof opts.groupCount === "number") {
|
|
660
|
-
rows.push({ key: "Groups", value: String(opts.groupCount) });
|
|
661
|
-
}
|
|
662
|
-
return rows.map((row) => `> ${import_chalk.default.gray(`${row.key}:`)} ${row.value}`).join("\n");
|
|
663
|
-
}
|
|
664
|
-
function formatSummaryTable(opts) {
|
|
665
|
-
const statColumns = getStatColumns(opts.aggregation);
|
|
666
|
-
const header = [...opts.groupByFields, ...statColumns];
|
|
667
|
-
const rows = [header.map((name) => import_chalk.default.bold(import_chalk.default.cyan(name)))];
|
|
668
|
-
for (const row of opts.rows) {
|
|
669
|
-
const nextRow = row.groupValues.map(
|
|
670
|
-
(v) => ellipsizeMiddle(v, MAX_GROUP_VALUE_LENGTH, opts.ansiAwareGroupValues)
|
|
671
|
-
);
|
|
672
|
-
if (row.stats.allMissing) {
|
|
673
|
-
nextRow.push(...statColumns.map(() => "--"));
|
|
674
|
-
rows.push(nextRow);
|
|
675
|
-
continue;
|
|
676
|
-
}
|
|
677
|
-
nextRow.push(
|
|
678
|
-
...statColumns.map(
|
|
679
|
-
(column) => formatStatCell(
|
|
680
|
-
column,
|
|
681
|
-
row.stats,
|
|
682
|
-
opts.periodStart,
|
|
683
|
-
opts.periodEnd,
|
|
684
|
-
opts.formatValue
|
|
685
|
-
)
|
|
686
|
-
)
|
|
687
|
-
);
|
|
688
|
-
rows.push(nextRow);
|
|
689
|
-
}
|
|
690
|
-
const centeredColumns = /* @__PURE__ */ new Set(["min", "max"]);
|
|
691
|
-
const align = header.map(
|
|
692
|
-
(col) => centeredColumns.has(col) ? "c" : "r"
|
|
693
|
-
);
|
|
694
|
-
return indent_default(
|
|
695
|
-
table(rows, {
|
|
696
|
-
align,
|
|
697
|
-
hsep: 2
|
|
698
|
-
}),
|
|
699
|
-
2
|
|
700
|
-
);
|
|
701
|
-
}
|
|
702
|
-
function formatSparklineSection(groupRows, sparklines, groupByFields, compact = false) {
|
|
703
|
-
if (groupRows.length === 0) {
|
|
704
|
-
const sparkline = sparklines[0];
|
|
705
|
-
const chart2 = sparkline ? indent_default(sparkline, 2) : "";
|
|
706
|
-
return compact ? chart2 : ["sparklines:", chart2].filter(Boolean).join("\n");
|
|
707
|
-
}
|
|
708
|
-
const header = [...groupByFields, compact ? "" : "sparkline"];
|
|
709
|
-
const rows = [
|
|
710
|
-
header.map((name) => import_chalk.default.bold(import_chalk.default.cyan(name))),
|
|
711
|
-
...groupRows.map((groupValues, index) => [
|
|
712
|
-
...groupValues.map(
|
|
713
|
-
(v) => ellipsizeMiddle(v, MAX_GROUP_VALUE_LENGTH, compact)
|
|
714
|
-
),
|
|
715
|
-
sparklines[index] ?? ""
|
|
716
|
-
])
|
|
717
|
-
];
|
|
718
|
-
const align = groupByFields.map(() => "r");
|
|
719
|
-
align.push("l");
|
|
720
|
-
const chart = indent_default(
|
|
721
|
-
table(rows, {
|
|
722
|
-
align,
|
|
723
|
-
hsep: 2
|
|
724
|
-
}),
|
|
725
|
-
2
|
|
726
|
-
);
|
|
727
|
-
return compact ? chart : `sparklines:
|
|
728
|
-
${chart}`;
|
|
729
|
-
}
|
|
730
|
-
function formatText(response, opts) {
|
|
731
|
-
const rollupColumn = getRollupColumnName(opts.metric, opts.aggregation);
|
|
732
|
-
const formatValue = (value, formatOptions) => formatMetricValue(value, opts.metricUnit, opts.aggregation, formatOptions);
|
|
733
|
-
const granularityMs = toGranularityMsFromDuration(opts.granularity);
|
|
734
|
-
const orderMetadata = getResolvedOrderMetadata(opts, response);
|
|
735
|
-
const { groups, series, groupValues } = extractGroupedSeries(
|
|
736
|
-
response.data ?? [],
|
|
737
|
-
opts.groupBy,
|
|
738
|
-
rollupColumn,
|
|
739
|
-
opts.periodStart,
|
|
740
|
-
opts.periodEnd,
|
|
741
|
-
granularityMs
|
|
742
|
-
);
|
|
743
|
-
let periodUnique;
|
|
744
|
-
if (isAggregationWithDimension(opts.aggregation) && opts.groupBy.length === 0) {
|
|
745
|
-
const summaryValue = toNumericValue(response.summary?.[0]?.[rollupColumn]);
|
|
746
|
-
if (summaryValue !== null) {
|
|
747
|
-
periodUnique = summaryValue;
|
|
748
|
-
}
|
|
749
|
-
}
|
|
750
|
-
const metadata = formatMetadataHeader({
|
|
751
|
-
metric: opts.metric,
|
|
752
|
-
aggregation: opts.aggregation,
|
|
753
|
-
periodStart: opts.periodStart,
|
|
754
|
-
periodEnd: opts.periodEnd,
|
|
755
|
-
granularity: opts.granularity,
|
|
756
|
-
periodUnique,
|
|
757
|
-
bucketTimezone: opts.bucketTimezone,
|
|
758
|
-
filter: opts.filter,
|
|
759
|
-
...opts.groupBy.length > 0 ? orderMetadata : {},
|
|
760
|
-
scope: opts.scope,
|
|
761
|
-
projectName: opts.projectName,
|
|
762
|
-
teamName: opts.teamName,
|
|
763
|
-
groupCount: opts.groupBy.length > 0 ? groups.length : void 0,
|
|
764
|
-
compact: opts.presentation?.compact
|
|
765
|
-
});
|
|
766
|
-
if (groups.length === 0) {
|
|
767
|
-
return `${metadata}
|
|
768
|
-
|
|
769
|
-
No data found for this period.
|
|
770
|
-
`;
|
|
771
|
-
}
|
|
772
|
-
const summaryRows = [];
|
|
773
|
-
const groupRows = [];
|
|
774
|
-
const sparklineRows = [];
|
|
775
|
-
for (const key of groups) {
|
|
776
|
-
const points = series.get(key) ?? [];
|
|
777
|
-
const values = points.map((point) => point.value);
|
|
778
|
-
const currentGroupValues = groupValues.get(key) ?? [];
|
|
779
|
-
const displayGroupValues = currentGroupValues.map((value, index) => {
|
|
780
|
-
const field = opts.groupBy[index];
|
|
781
|
-
return opts.presentation?.formatGroupValue?.(field, value) ?? value;
|
|
782
|
-
});
|
|
783
|
-
summaryRows.push({
|
|
784
|
-
groupValues: displayGroupValues,
|
|
785
|
-
stats: computeGroupStats(points)
|
|
786
|
-
});
|
|
787
|
-
groupRows.push(displayGroupValues);
|
|
788
|
-
sparklineRows.push(generateSparkline(values));
|
|
789
|
-
}
|
|
790
|
-
const summaryTable = formatSummaryTable({
|
|
791
|
-
rows: summaryRows,
|
|
792
|
-
groupByFields: opts.groupBy,
|
|
793
|
-
aggregation: opts.aggregation,
|
|
794
|
-
periodStart: new Date(opts.periodStart),
|
|
795
|
-
periodEnd: new Date(opts.periodEnd),
|
|
796
|
-
formatValue,
|
|
797
|
-
ansiAwareGroupValues: opts.presentation?.compact
|
|
798
|
-
});
|
|
799
|
-
const groupedOutput = opts.groupBy.length > 0;
|
|
800
|
-
const sparklineSection = formatSparklineSection(
|
|
801
|
-
groupedOutput ? groupRows : [],
|
|
802
|
-
sparklineRows,
|
|
803
|
-
opts.groupBy,
|
|
804
|
-
opts.presentation?.compact
|
|
805
|
-
);
|
|
806
|
-
const sections = [metadata, summaryTable, sparklineSection];
|
|
807
|
-
return `${sections.join("\n\n")}
|
|
808
|
-
`;
|
|
809
|
-
}
|
|
810
|
-
|
|
811
|
-
export {
|
|
812
|
-
computeGranularity,
|
|
813
|
-
toGranularityMsFromDuration,
|
|
814
|
-
isCanonicalAggregation,
|
|
815
|
-
getDefaultCustomMetricAggregation,
|
|
816
|
-
generateSparkline,
|
|
817
|
-
formatText
|
|
818
|
-
};
|