@depup/vercel 59.23.2-depup.0 → 62.2.0-depup.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +27 -8
- package/changes.json +87 -11
- package/dist/chunks/add-7HJR3HK7.js +8 -0
- package/dist/chunks/add-Q5OZFIRM.js +8 -0
- package/dist/chunks/add-VLVURKGS.js +8 -0
- package/dist/chunks/build-MR7MUWBQ.js +7 -0
- package/dist/chunks/chunk-23NBYS6R.js +36 -0
- package/dist/chunks/{chunk-YMVDWVMO.js → chunk-2RQFMCPJ.js} +1 -1
- package/dist/chunks/{chunk-IVWPQYIH.js → chunk-3R66O72V.js} +1 -1
- package/dist/chunks/{chunk-JGPECEYY.js → chunk-4HXRTNAK.js} +2 -2
- package/dist/chunks/chunk-5VWK73R6.js +10 -0
- package/dist/chunks/chunk-6JU3QZ3O.js +22 -0
- package/dist/chunks/{chunk-UXCTETFN.js → chunk-6NPXWN5F.js} +1 -1
- package/dist/chunks/{chunk-PS645CWM.js → chunk-743NGLUN.js} +1 -1
- package/dist/chunks/{chunk-WDVSYGZS.js → chunk-7ANQHBBE.js} +1 -1
- package/dist/chunks/chunk-7I23VXBQ.js +7 -0
- package/dist/chunks/{chunk-64NJHVA3.js → chunk-7IRKF3ZG.js} +6 -6
- package/dist/chunks/{chunk-NBVY237X.js → chunk-7JFK53D4.js} +1 -1
- package/dist/chunks/{chunk-FZH7RIRX.js → chunk-7POWBJDF.js} +7 -5
- package/dist/chunks/chunk-7T4CJ6MJ.js +9 -0
- package/dist/chunks/{chunk-SOQ5DE44.js → chunk-A752WDCH.js} +1 -1
- package/dist/chunks/{chunk-GTJ2OLYI.js → chunk-ACCZWEKL.js} +1 -1
- package/dist/chunks/chunk-ADDXKC3J.js +9 -0
- package/dist/chunks/{chunk-UUM2N6IG.js → chunk-AKPQWZIP.js} +4 -4
- package/dist/chunks/chunk-ALXWJ7XN.js +7 -0
- package/dist/chunks/chunk-B5PFD6Q3.js +7 -0
- package/dist/chunks/{chunk-WKZ6JSGZ.js → chunk-BKV35LVB.js} +1 -1
- package/dist/chunks/chunk-C3XFIO5L.js +7 -0
- package/dist/chunks/{chunk-GHULCYAR.js → chunk-C5KVTG2O.js} +1 -1
- package/dist/chunks/{chunk-QI3JSWD6.js → chunk-C6ITILVT.js} +2 -2
- package/dist/chunks/{chunk-KBKN7EI7.js → chunk-CQ3RAERR.js} +1 -1
- package/dist/chunks/chunk-CVX5X5RI.js +7 -0
- package/dist/chunks/chunk-D5VTBRWF.js +7 -0
- package/dist/chunks/{chunk-NYOQMU3P.js → chunk-DECIQZZQ.js} +4 -4
- package/dist/chunks/{chunk-E4X2DH4K.js → chunk-E4RLHRDF.js} +2 -2
- package/dist/chunks/chunk-EQHNA4BW.js +7 -0
- package/dist/chunks/{chunk-M6A7UH4U.js → chunk-GASSNHZG.js} +7 -7
- package/dist/chunks/{chunk-UGXNE4YE.js → chunk-HLVUEYOZ.js} +1 -1
- package/dist/chunks/chunk-HVROAV4B.js +9 -0
- package/dist/chunks/{chunk-4YVA7TSY.js → chunk-HYW4A5B3.js} +1 -1
- package/dist/chunks/{chunk-VIR3KDCQ.js → chunk-I46LFJJG.js} +1 -1
- package/dist/chunks/{chunk-ZXE4XYIV.js → chunk-ILFUNCJZ.js} +1 -1
- package/dist/chunks/{chunk-Z6LKARXP.js → chunk-ILXXXXVQ.js} +1 -1
- package/dist/chunks/chunk-J6OPPI3A.js +63 -0
- package/dist/chunks/{chunk-HOYHUMBD.js → chunk-JO3XBFR3.js} +1 -1
- package/dist/chunks/{chunk-MEAY2K5Z.js → chunk-JRU6AGXG.js} +1 -1
- package/dist/chunks/{chunk-6SA6SOHU.js → chunk-JSKSNCK2.js} +1 -1
- package/dist/chunks/{chunk-TJKM3345.js → chunk-K5WTLFS6.js} +1 -1
- package/dist/chunks/chunk-KG5BMLOI.js +7 -0
- package/dist/chunks/chunk-KOSM3DYE.js +7 -0
- package/dist/chunks/{chunk-7B5NNJ2P.js → chunk-KREBNPHL.js} +3 -3
- package/dist/chunks/{chunk-KXYR43H5.js → chunk-L46BHPRD.js} +1 -1
- package/dist/chunks/{chunk-T4AZ3U7O.js → chunk-LCWCTL6L.js} +1 -1
- package/dist/chunks/{chunk-GR3DLKYP.js → chunk-LCY4SULE.js} +1 -1
- package/dist/chunks/chunk-LHQUNL52.js +7 -0
- package/dist/chunks/chunk-M7ZGWERO.js +9 -0
- package/dist/chunks/{chunk-A5VLP25I.js → chunk-MCCL762Q.js} +1 -1
- package/dist/chunks/chunk-MK3CTSDV.js +24 -0
- package/dist/chunks/{chunk-RRQTVE2P.js → chunk-MKY5IBKK.js} +1 -1
- package/dist/chunks/{chunk-Z7PBDQNR.js → chunk-N4PVXHAJ.js} +4 -3
- package/dist/chunks/{chunk-UWZ5VIIQ.js → chunk-N5MNZPPJ.js} +1 -1
- package/dist/chunks/{chunk-6LE44WCK.js → chunk-N7XPPYQQ.js} +1 -1
- package/dist/chunks/{chunk-N3N5UHIL.js → chunk-NESZV33T.js} +1 -1
- package/dist/chunks/chunk-NRN65VUM.js +8 -0
- package/dist/chunks/{chunk-O7G3CZ42.js → chunk-NT67T6DL.js} +1 -1
- package/dist/chunks/chunk-NXTK7VKL.js +7 -0
- package/dist/chunks/chunk-PADCVJ7G.js +7 -0
- package/dist/chunks/{chunk-GGNZLN4R.js → chunk-PAI3WRPA.js} +1 -1
- package/dist/chunks/{chunk-GL2AUBAI.js → chunk-PTFKU33G.js} +1 -1
- package/dist/chunks/{chunk-JAJW3P42.js → chunk-PV5YI2ZZ.js} +1 -1
- package/dist/chunks/{chunk-WUZD4KBL.js → chunk-RFWCEREA.js} +1 -1
- package/dist/chunks/chunk-RINZXCDJ.js +19 -0
- package/dist/chunks/{chunk-EIXOJUNN.js → chunk-RVKOPGOI.js} +1 -1
- package/dist/chunks/{chunk-ZKYS7EAB.js → chunk-S2LBGLRE.js} +1 -1
- package/dist/chunks/{chunk-6OI6SRHZ.js → chunk-SDGWKUST.js} +1 -1
- package/dist/chunks/{chunk-V5DCSHYJ.js → chunk-SM5JI6QM.js} +1 -1
- package/dist/chunks/{chunk-QR7QPUFN.js → chunk-TKBORMUF.js} +1 -1
- package/dist/chunks/chunk-UOHVKN6N.js +8 -0
- package/dist/chunks/{chunk-73G2MHUX.js → chunk-UWO3M2L2.js} +1 -1
- package/dist/chunks/{chunk-ZKWM4JBE.js → chunk-VDOJERIW.js} +1 -1
- package/dist/chunks/chunk-VGXFOQ4P.js +8 -0
- package/dist/chunks/{chunk-ZDORSGCG.js → chunk-VTMLKJVQ.js} +1 -1
- package/dist/chunks/{chunk-2SLHYWMC.js → chunk-VZDY57PJ.js} +1 -1
- package/dist/chunks/chunk-W26LLGQV.js +7 -0
- package/dist/chunks/{chunk-EQ52F4LH.js → chunk-W7PVS44H.js} +1 -1
- package/dist/chunks/{chunk-6LE3FU2P.js → chunk-WN6OXK2F.js} +1 -1
- package/dist/chunks/{chunk-YGJO25LP.js → chunk-WOKSTB3F.js} +1 -1
- package/dist/chunks/{chunk-2HEC5TDU.js → chunk-WW3VUXRV.js} +1 -1
- package/dist/chunks/{chunk-J5X5YRBH.js → chunk-X47XV2WG.js} +1 -1
- package/dist/chunks/{chunk-4WSAOLBH.js → chunk-XQQGQ55A.js} +1 -1
- package/dist/chunks/chunk-ZQIUMXCI.js +7 -0
- package/dist/chunks/chunk-ZUYWATU5.js +27 -0
- package/dist/chunks/clear-PPE55RPM.js +8 -0
- package/dist/chunks/compile-vercel-config-2IC23CNT.js +7 -0
- package/dist/chunks/config-G2A6KPPM.js +8 -0
- package/dist/chunks/config-T3WHONFJ.js +7 -0
- package/dist/chunks/config-validator.mjs +1 -1
- package/dist/chunks/{connect-git-provider-P3SGOW6X.js → connect-git-provider-VYU65KTS.js} +1 -1
- package/dist/chunks/{constants-G4UYVLOF.js → constants-NCE2LWSS.js} +1 -1
- package/dist/chunks/delete-75SYJKNE.js +10 -0
- package/dist/chunks/delete-MHXN5KTO.js +9 -0
- package/dist/chunks/{detect-projects-WLAFT5HC.js → detect-projects-GJF4VXQI.js} +1 -1
- package/dist/chunks/detect-services-K3363KB7.js +7 -0
- package/dist/chunks/disable-OUYOHEWN.js +7 -0
- package/dist/chunks/discard-RXSHOY3J.js +14 -0
- package/dist/chunks/edit-Y7OL72ZK.js +9 -0
- package/dist/chunks/edit-Z5RCWPOX.js +8 -0
- package/dist/chunks/enable-HI2UH2NM.js +7 -0
- package/dist/chunks/{exec-YH5WUJ4C.js → exec-3RMS2X6B.js} +1 -1
- package/dist/chunks/{export-QCBAQNTT.js → export-CMP3APAJ.js} +1 -1
- package/dist/chunks/future-GS7ZLJ3N.js +7 -0
- package/dist/chunks/generate-cert-for-deploy-2HHUYGHU.js +7 -0
- package/dist/chunks/{image-DU7GJZR2.js → image-SQIUEBFK.js} +1 -1
- package/dist/chunks/import-builders-EUOOFPHW.js +7 -0
- package/dist/chunks/inspect-2SXPXNYH.js +13 -0
- package/dist/chunks/{inspect-IVJOEZC4.js → inspect-DYNTJMTQ.js} +1 -1
- package/dist/chunks/inspect-J3F3U3YF.js +9 -0
- package/dist/chunks/{inspect-EMWJLBAW.js → inspect-KYFVYFWX.js} +1 -1
- package/dist/chunks/{inspect-CPOFKE4X.js → inspect-V7HA2GZ5.js} +1 -1
- package/dist/chunks/{list-KYZNCXBM.js → list-TSDBEAVF.js} +1 -1
- package/dist/chunks/{list-ZE2VPPXI.js → list-X4MKKDJX.js} +1 -1
- package/dist/chunks/list-ZQSOWXRI.js +11 -0
- package/dist/chunks/login-5FMKHZVG.js +7 -0
- package/dist/chunks/login-YEDMPXUF.js +9 -0
- package/dist/chunks/logs-X2OIQXGW.js +7 -0
- package/dist/chunks/{ls-7O63WIES.js → ls-4W4KTJ6T.js} +1 -1
- package/dist/chunks/{ls-DU5QTKKA.js → ls-6EDJUUDW.js} +1 -1
- package/dist/chunks/{ls-P6LKMT33.js → ls-BMAVUMXU.js} +1 -1
- package/dist/chunks/{ls-AKGRKWHM.js → ls-HK45UWBD.js} +1 -1
- package/dist/chunks/ls-LAYBQVU2.js +8 -0
- package/dist/chunks/ls-SQ42O6O5.js +11 -0
- package/dist/chunks/ls-XIJ4CY2N.js +8 -0
- package/dist/chunks/mutate-6FCOCHSA.js +9 -0
- package/dist/chunks/notifications-JTK7ZOLC.js +7 -0
- package/dist/chunks/open-3G4R3VIN.js +7 -0
- package/dist/chunks/openapi-W365UPH2.js +7 -0
- package/dist/chunks/{permissions-AE5JO26V.js → permissions-IWUBXZBZ.js} +1 -1
- package/dist/chunks/prompt-missing-credentials-VDR5HVA2.js +7 -0
- package/dist/chunks/publish-5QKVU6YV.js +15 -0
- package/dist/chunks/pull-K4JQEP7N.js +7 -0
- package/dist/chunks/purchase-domain-if-available-Q7H2TGKR.js +7 -0
- package/dist/chunks/push-COILRLCW.js +7 -0
- package/dist/chunks/{query-PHAGR43V.js → query-ABPO2REN.js} +2 -2
- package/dist/chunks/{reauthenticate-O6C2AW3J.js → reauthenticate-3H5Q2ZWD.js} +1 -1
- package/dist/chunks/reorder-FBUQ5ET7.js +10 -0
- package/dist/chunks/reply-FR5VO7DA.js +9 -0
- package/dist/chunks/resolve-JI2ENFS6.js +12 -0
- package/dist/chunks/{resolve-deployment-framework-preset-XF3NJIDS.js → resolve-deployment-framework-preset-QEPJNWVF.js} +1 -1
- package/dist/chunks/restore-LYY4BSYJ.js +16 -0
- package/dist/chunks/rm-C2RWWMO3.js +8 -0
- package/dist/chunks/rm-CYYVIF2U.js +8 -0
- package/dist/chunks/rm-ETLZ75RJ.js +8 -0
- package/dist/chunks/rm-GHSQEFRG.js +8 -0
- package/dist/chunks/rm-KHO6RV55.js +8 -0
- package/dist/chunks/{routes-IPGKJ2E4.js → routes-FOCZWOGO.js} +1 -1
- package/dist/chunks/rule-inspect-MISYALLU.js +8 -0
- package/dist/chunks/{rules-6TZ6GSKT.js → rules-KAGL6MH3.js} +1 -1
- package/dist/chunks/schema-EKWTCBNR.js +14 -0
- package/dist/chunks/{schema-5CZLK6NI.js → schema-FZVKQRNB.js} +2 -2
- package/dist/chunks/{select-org-F2A5JJFH.js → select-org-37C26F7T.js} +1 -1
- package/dist/chunks/set-5D7C6HMZ.js +7 -0
- package/dist/chunks/setup-and-link-H4P3FZB3.js +7 -0
- package/dist/chunks/{tags-C3HWJLJ4.js → tags-DVGQQZNC.js} +1 -1
- package/dist/chunks/{types-H3B56MH6.js → types-UN5J66MI.js} +1 -1
- package/dist/chunks/{update-5HE4X45O.js → update-QY3ZME4T.js} +1 -1
- package/dist/chunks/vlt-builder-importer-W63QEXYX.js +11 -0
- package/dist/commands/build/index.js +1 -1
- package/dist/commands/deploy/index.js +9 -9
- package/dist/commands/dev/index.js +24 -21
- package/dist/commands/env/index.js +1 -1
- package/dist/commands/link/index.js +1 -1
- package/dist/commands/list/index.js +2 -2
- package/dist/commands-bulk.js +791 -704
- package/dist/help.js +1 -1
- package/dist/index.js +7 -6
- package/dist/internal-build-worker.js +10 -0
- package/dist/root-help-commands.mjs +1 -0
- package/dist/vc.js +110 -11
- package/dist/version.mjs +1 -1
- package/package.json +151 -73
- package/dist/chunks/add-JVSHQKWC.js +0 -8
- package/dist/chunks/add-UKFIETLE.js +0 -8
- package/dist/chunks/add-Z3CJT63N.js +0 -8
- package/dist/chunks/build-SMQYQX23.js +0 -7
- package/dist/chunks/chunk-32QBGZ2Z.js +0 -7
- package/dist/chunks/chunk-3QHJYVCY.js +0 -7
- package/dist/chunks/chunk-5YA32S6K.js +0 -7
- package/dist/chunks/chunk-65JYSI26.js +0 -7
- package/dist/chunks/chunk-66RYR2GI.js +0 -7
- package/dist/chunks/chunk-6C7LA5RA.js +0 -9
- package/dist/chunks/chunk-6PFC3KWQ.js +0 -7
- package/dist/chunks/chunk-ABSRS5KC.js +0 -9
- package/dist/chunks/chunk-AZ6NRDHG.js +0 -7
- package/dist/chunks/chunk-BX5KDMLT.js +0 -10
- package/dist/chunks/chunk-CVKB54WW.js +0 -7
- package/dist/chunks/chunk-DL665Q3Z.js +0 -7
- package/dist/chunks/chunk-EHTHHCNG.js +0 -130
- package/dist/chunks/chunk-EQP3SW72.js +0 -7
- package/dist/chunks/chunk-FB5TMOLQ.js +0 -7
- package/dist/chunks/chunk-GRDPI246.js +0 -29
- package/dist/chunks/chunk-J3U3L45Y.js +0 -7
- package/dist/chunks/chunk-KK4AJES5.js +0 -36
- package/dist/chunks/chunk-KUVMCIR4.js +0 -7
- package/dist/chunks/chunk-LKI6FRNM.js +0 -19
- package/dist/chunks/chunk-M5AV545M.js +0 -7
- package/dist/chunks/chunk-NZKBBY2A.js +0 -24
- package/dist/chunks/chunk-OAKO6LVS.js +0 -7
- package/dist/chunks/chunk-SFTXBTMI.js +0 -7
- package/dist/chunks/chunk-TBBU37TD.js +0 -9
- package/dist/chunks/chunk-TOGR3HUB.js +0 -8
- package/dist/chunks/chunk-V6IKQCOT.js +0 -8
- package/dist/chunks/chunk-WHYH7DVI.js +0 -20
- package/dist/chunks/chunk-X4X5RB2V.js +0 -7
- package/dist/chunks/clear-6IXTTZO6.js +0 -8
- package/dist/chunks/compile-vercel-config-ZFMPTU47.js +0 -7
- package/dist/chunks/config-HLVJQKP7.js +0 -7
- package/dist/chunks/config-XXHMPW46.js +0 -8
- package/dist/chunks/delete-52QKO73X.js +0 -10
- package/dist/chunks/delete-6VOUZDIR.js +0 -9
- package/dist/chunks/detect-services-YYT3LUUX.js +0 -7
- package/dist/chunks/disable-7FGR2S56.js +0 -7
- package/dist/chunks/discard-XKPTY3DC.js +0 -14
- package/dist/chunks/edit-A3HJCNPW.js +0 -8
- package/dist/chunks/edit-A7WGTO6K.js +0 -9
- package/dist/chunks/enable-NGKLGHJ2.js +0 -7
- package/dist/chunks/future-BB7OE645.js +0 -7
- package/dist/chunks/generate-cert-for-deploy-U7JF3HF3.js +0 -7
- package/dist/chunks/import-builders-IFZM44NL.js +0 -7
- package/dist/chunks/inspect-PHUMEO4A.js +0 -9
- package/dist/chunks/inspect-Q7OVSWFO.js +0 -13
- package/dist/chunks/list-G4JM2TYX.js +0 -11
- package/dist/chunks/login-AVVJFLSC.js +0 -9
- package/dist/chunks/login-RMAISH4F.js +0 -7
- package/dist/chunks/logs-3LTU2N25.js +0 -7
- package/dist/chunks/ls-4M2OBNG6.js +0 -8
- package/dist/chunks/ls-HWUYP3XY.js +0 -8
- package/dist/chunks/ls-Y4QR3I6O.js +0 -11
- package/dist/chunks/mutate-KOAALPIL.js +0 -9
- package/dist/chunks/notifications-3RDFNJSD.js +0 -7
- package/dist/chunks/open-VD4F6MAO.js +0 -7
- package/dist/chunks/openapi-DKMCRF2V.js +0 -7
- package/dist/chunks/prompt-missing-credentials-QY4MZDT6.js +0 -7
- package/dist/chunks/publish-YXVJXBQT.js +0 -15
- package/dist/chunks/pull-QLC2CV4J.js +0 -7
- package/dist/chunks/purchase-domain-if-available-74ZYVVBE.js +0 -7
- package/dist/chunks/push-TMPPU5NU.js +0 -7
- package/dist/chunks/reorder-OAJ3NXQQ.js +0 -10
- package/dist/chunks/reply-Q3JFRFA3.js +0 -9
- package/dist/chunks/resolve-XXJVOXNE.js +0 -12
- package/dist/chunks/restore-MO4B2EQV.js +0 -16
- package/dist/chunks/rm-63LFH6NA.js +0 -8
- package/dist/chunks/rm-F2XD2XKB.js +0 -8
- package/dist/chunks/rm-GMG2DZOV.js +0 -8
- package/dist/chunks/rm-P6KA5RSP.js +0 -8
- package/dist/chunks/rm-SZ4HWA4R.js +0 -8
- package/dist/chunks/rule-inspect-JKAXOBII.js +0 -8
- package/dist/chunks/schema-S2ZAREKF.js +0 -14
- package/dist/chunks/set-PIKLGKT6.js +0 -7
- package/dist/chunks/setup-and-link-O5QSQ5K2.js +0 -7
- package/dist/chunks/vlt-builder-importer-YVCYYRVV.js +0 -11
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@depup/vercel",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "62.2.0-depup.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"preferGlobal": true,
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -21,67 +21,67 @@
|
|
|
21
21
|
"README.md"
|
|
22
22
|
],
|
|
23
23
|
"engines": {
|
|
24
|
-
"node": ">=
|
|
24
|
+
"node": ">= 20"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"@vercel/blob": "2.8.0",
|
|
28
|
-
"@vercel/fun": "
|
|
29
|
-
"@vercel/prepare-flags-definitions": "^0.
|
|
28
|
+
"@vercel/fun": "1.3.6",
|
|
29
|
+
"@vercel/prepare-flags-definitions": "^0.5.0",
|
|
30
30
|
"chokidar": "^5.0.0",
|
|
31
31
|
"esbuild": "^0.28.2",
|
|
32
32
|
"jose": "^6.2.12",
|
|
33
33
|
"jsonc-parser": "3.3.1",
|
|
34
34
|
"luxon": "^3.7.2",
|
|
35
|
-
"sandbox": "^4.
|
|
36
|
-
"smol-toml": "^1.
|
|
37
|
-
"undici": "^8.
|
|
35
|
+
"sandbox": "^4.6.0",
|
|
36
|
+
"smol-toml": "^1.9.0",
|
|
37
|
+
"undici": "^8.11.2",
|
|
38
38
|
"uuid": "^14.0.2",
|
|
39
39
|
"zod": "^4.6.5",
|
|
40
|
-
"@vercel/
|
|
41
|
-
"@vercel/
|
|
42
|
-
"@vercel/
|
|
43
|
-
"@vercel/cli-config": "0.
|
|
44
|
-
"@vercel/
|
|
40
|
+
"@vercel/build-utils": "^14.17.0",
|
|
41
|
+
"@vercel/cli-auth": "0.3.10",
|
|
42
|
+
"@vercel/backends": "^15.0.0",
|
|
43
|
+
"@vercel/cli-config": "0.3.1",
|
|
44
|
+
"@vercel/elysia": "^15.0.0",
|
|
45
|
+
"@vercel/container": "^15.0.0",
|
|
45
46
|
"@vercel/detect-agent": "1.2.5",
|
|
46
|
-
"@vercel/
|
|
47
|
-
"@vercel/
|
|
48
|
-
"@vercel/go": "
|
|
49
|
-
"@vercel/h3": "
|
|
50
|
-
"@vercel/hono": "
|
|
51
|
-
"@vercel/
|
|
52
|
-
"@vercel/
|
|
53
|
-
"@vercel/
|
|
54
|
-
"@vercel/next": "
|
|
55
|
-
"@vercel/
|
|
56
|
-
"@vercel/
|
|
57
|
-
"@vercel/redwood": "10.0.1",
|
|
58
|
-
"@vercel/remix-builder": "13.0.1",
|
|
47
|
+
"@vercel/fastify": "^15.0.0",
|
|
48
|
+
"@vercel/express": "^15.0.0",
|
|
49
|
+
"@vercel/go": "^18.0.0",
|
|
50
|
+
"@vercel/h3": "^15.0.0",
|
|
51
|
+
"@vercel/hono": "^15.0.0",
|
|
52
|
+
"@vercel/hydrogen": "^16.0.0",
|
|
53
|
+
"@vercel/koa": "^15.0.0",
|
|
54
|
+
"@vercel/nestjs": "^15.0.0",
|
|
55
|
+
"@vercel/next": "^19.0.0",
|
|
56
|
+
"@vercel/python": "^21.0.0",
|
|
57
|
+
"@vercel/node": "^20.0.0",
|
|
59
58
|
"@vercel/python-analysis": "0.14.0",
|
|
60
|
-
"@vercel/
|
|
61
|
-
"@vercel/
|
|
62
|
-
"@vercel/
|
|
63
|
-
"@vercel/
|
|
59
|
+
"@vercel/redwood": "^17.0.0",
|
|
60
|
+
"@vercel/remix-builder": "^20.0.0",
|
|
61
|
+
"@vercel/ruby": "^17.0.0",
|
|
62
|
+
"@vercel/rust": "^16.0.0",
|
|
63
|
+
"@vercel/static-build": "^17.0.0"
|
|
64
64
|
},
|
|
65
65
|
"builders": {
|
|
66
|
-
"@vercel/backends": "
|
|
67
|
-
"@vercel/container": "
|
|
68
|
-
"@vercel/elysia": "
|
|
69
|
-
"@vercel/express": "
|
|
70
|
-
"@vercel/fastify": "
|
|
71
|
-
"@vercel/go": "
|
|
72
|
-
"@vercel/h3": "
|
|
73
|
-
"@vercel/hono": "
|
|
74
|
-
"@vercel/hydrogen": "
|
|
75
|
-
"@vercel/koa": "
|
|
76
|
-
"@vercel/nestjs": "
|
|
77
|
-
"@vercel/next": "
|
|
78
|
-
"@vercel/node": "
|
|
79
|
-
"@vercel/python": "
|
|
80
|
-
"@vercel/redwood": "
|
|
81
|
-
"@vercel/remix-builder": "
|
|
82
|
-
"@vercel/ruby": "
|
|
83
|
-
"@vercel/rust": "
|
|
84
|
-
"@vercel/static-build": "
|
|
66
|
+
"@vercel/backends": "13.0.0",
|
|
67
|
+
"@vercel/container": "13.0.0",
|
|
68
|
+
"@vercel/elysia": "13.0.0",
|
|
69
|
+
"@vercel/express": "13.0.0",
|
|
70
|
+
"@vercel/fastify": "13.0.0",
|
|
71
|
+
"@vercel/go": "16.0.0",
|
|
72
|
+
"@vercel/h3": "13.0.0",
|
|
73
|
+
"@vercel/hono": "13.0.0",
|
|
74
|
+
"@vercel/hydrogen": "14.0.0",
|
|
75
|
+
"@vercel/koa": "13.0.0",
|
|
76
|
+
"@vercel/nestjs": "13.0.0",
|
|
77
|
+
"@vercel/next": "17.0.0",
|
|
78
|
+
"@vercel/node": "18.0.0",
|
|
79
|
+
"@vercel/python": "19.0.0",
|
|
80
|
+
"@vercel/redwood": "15.0.0",
|
|
81
|
+
"@vercel/remix-builder": "18.0.0",
|
|
82
|
+
"@vercel/ruby": "15.0.0",
|
|
83
|
+
"@vercel/rust": "14.0.0",
|
|
84
|
+
"@vercel/static-build": "15.0.0"
|
|
85
85
|
},
|
|
86
86
|
"devDependencies": {
|
|
87
87
|
"@edge-runtime/node-utils": "2.3.0",
|
|
@@ -208,25 +208,27 @@
|
|
|
208
208
|
"write-json-file": "2.2.0",
|
|
209
209
|
"xdg-app-paths": "5.1.0",
|
|
210
210
|
"yauzl-promise": "2.1.3",
|
|
211
|
-
"@vercel-internals/
|
|
211
|
+
"@vercel-internals/builder-orchestration": "1.0.12",
|
|
212
212
|
"@vercel-internals/constants": "1.0.4",
|
|
213
213
|
"@vercel-internals/get-package-json": "1.0.0",
|
|
214
|
-
"@vercel-internals/
|
|
215
|
-
"@vercel-internals/
|
|
216
|
-
"@vercel-internals/
|
|
217
|
-
"@vercel/
|
|
218
|
-
"@vercel/
|
|
214
|
+
"@vercel-internals/cli-builder-integration": "1.0.14",
|
|
215
|
+
"@vercel-internals/local-schedules": "0.0.4",
|
|
216
|
+
"@vercel-internals/runtimes": "1.1.8",
|
|
217
|
+
"@vercel-internals/service-topology": "1.0.11",
|
|
218
|
+
"@vercel/client": "18.6.0",
|
|
219
|
+
"@vercel-internals/types": "3.0.16",
|
|
219
220
|
"@vercel/error-utils": "2.2.1",
|
|
220
|
-
"@vercel/fs-detectors": "7.
|
|
221
|
+
"@vercel/fs-detectors": "7.9.0",
|
|
222
|
+
"@vercel/frameworks": "3.35.0",
|
|
221
223
|
"@vercel/routing-utils": "6.6.0"
|
|
222
224
|
},
|
|
223
225
|
"optionalDependencies": {
|
|
224
|
-
"@vercel/vc-native-darwin-arm64": "
|
|
225
|
-
"@vercel/vc-native-darwin-x64": "
|
|
226
|
-
"@vercel/vc-native-linux-arm64": "
|
|
227
|
-
"@vercel/vc-native-linux-x64": "
|
|
228
|
-
"@vercel/vc-native-win32-arm64": "
|
|
229
|
-
"@vercel/vc-native-win32-x64": "
|
|
226
|
+
"@vercel/vc-native-darwin-arm64": "62.2.0",
|
|
227
|
+
"@vercel/vc-native-darwin-x64": "62.2.0",
|
|
228
|
+
"@vercel/vc-native-linux-arm64": "62.2.0",
|
|
229
|
+
"@vercel/vc-native-linux-x64": "62.2.0",
|
|
230
|
+
"@vercel/vc-native-win32-arm64": "62.2.0",
|
|
231
|
+
"@vercel/vc-native-win32-x64": "62.2.0"
|
|
230
232
|
},
|
|
231
233
|
"scripts": {
|
|
232
234
|
"test": "node scripts/test.mjs --run",
|
|
@@ -259,13 +261,9 @@
|
|
|
259
261
|
],
|
|
260
262
|
"depup": {
|
|
261
263
|
"changes": {
|
|
262
|
-
"@vercel/fun": {
|
|
263
|
-
"from": "1.3.0",
|
|
264
|
-
"to": "^1.3.1"
|
|
265
|
-
},
|
|
266
264
|
"@vercel/prepare-flags-definitions": {
|
|
267
265
|
"from": "0.3.0",
|
|
268
|
-
"to": "^0.
|
|
266
|
+
"to": "^0.5.0"
|
|
269
267
|
},
|
|
270
268
|
"chokidar": {
|
|
271
269
|
"from": "4.0.0",
|
|
@@ -284,16 +282,16 @@
|
|
|
284
282
|
"to": "^3.7.2"
|
|
285
283
|
},
|
|
286
284
|
"sandbox": {
|
|
287
|
-
"from": "4.
|
|
288
|
-
"to": "^4.
|
|
285
|
+
"from": "4.4.0",
|
|
286
|
+
"to": "^4.6.0"
|
|
289
287
|
},
|
|
290
288
|
"smol-toml": {
|
|
291
289
|
"from": "1.5.2",
|
|
292
|
-
"to": "^1.
|
|
290
|
+
"to": "^1.9.0"
|
|
293
291
|
},
|
|
294
292
|
"undici": {
|
|
295
293
|
"from": "5.29.0",
|
|
296
|
-
"to": "^8.
|
|
294
|
+
"to": "^8.11.2"
|
|
297
295
|
},
|
|
298
296
|
"uuid": {
|
|
299
297
|
"from": "14.0.1",
|
|
@@ -302,12 +300,92 @@
|
|
|
302
300
|
"zod": {
|
|
303
301
|
"from": "4.1.11",
|
|
304
302
|
"to": "^4.6.5"
|
|
303
|
+
},
|
|
304
|
+
"@vercel/build-utils": {
|
|
305
|
+
"from": "14.15.0",
|
|
306
|
+
"to": "^14.17.0"
|
|
307
|
+
},
|
|
308
|
+
"@vercel/backends": {
|
|
309
|
+
"from": "13.0.0",
|
|
310
|
+
"to": "^15.0.0"
|
|
311
|
+
},
|
|
312
|
+
"@vercel/elysia": {
|
|
313
|
+
"from": "13.0.0",
|
|
314
|
+
"to": "^15.0.0"
|
|
315
|
+
},
|
|
316
|
+
"@vercel/container": {
|
|
317
|
+
"from": "13.0.0",
|
|
318
|
+
"to": "^15.0.0"
|
|
319
|
+
},
|
|
320
|
+
"@vercel/fastify": {
|
|
321
|
+
"from": "13.0.0",
|
|
322
|
+
"to": "^15.0.0"
|
|
323
|
+
},
|
|
324
|
+
"@vercel/express": {
|
|
325
|
+
"from": "13.0.0",
|
|
326
|
+
"to": "^15.0.0"
|
|
327
|
+
},
|
|
328
|
+
"@vercel/go": {
|
|
329
|
+
"from": "16.0.0",
|
|
330
|
+
"to": "^18.0.0"
|
|
331
|
+
},
|
|
332
|
+
"@vercel/h3": {
|
|
333
|
+
"from": "13.0.0",
|
|
334
|
+
"to": "^15.0.0"
|
|
335
|
+
},
|
|
336
|
+
"@vercel/hono": {
|
|
337
|
+
"from": "13.0.0",
|
|
338
|
+
"to": "^15.0.0"
|
|
339
|
+
},
|
|
340
|
+
"@vercel/hydrogen": {
|
|
341
|
+
"from": "14.0.0",
|
|
342
|
+
"to": "^16.0.0"
|
|
343
|
+
},
|
|
344
|
+
"@vercel/koa": {
|
|
345
|
+
"from": "13.0.0",
|
|
346
|
+
"to": "^15.0.0"
|
|
347
|
+
},
|
|
348
|
+
"@vercel/nestjs": {
|
|
349
|
+
"from": "13.0.0",
|
|
350
|
+
"to": "^15.0.0"
|
|
351
|
+
},
|
|
352
|
+
"@vercel/next": {
|
|
353
|
+
"from": "17.0.0",
|
|
354
|
+
"to": "^19.0.0"
|
|
355
|
+
},
|
|
356
|
+
"@vercel/python": {
|
|
357
|
+
"from": "19.0.0",
|
|
358
|
+
"to": "^21.0.0"
|
|
359
|
+
},
|
|
360
|
+
"@vercel/node": {
|
|
361
|
+
"from": "18.0.0",
|
|
362
|
+
"to": "^20.0.0"
|
|
363
|
+
},
|
|
364
|
+
"@vercel/redwood": {
|
|
365
|
+
"from": "15.0.0",
|
|
366
|
+
"to": "^17.0.0"
|
|
367
|
+
},
|
|
368
|
+
"@vercel/remix-builder": {
|
|
369
|
+
"from": "18.0.0",
|
|
370
|
+
"to": "^20.0.0"
|
|
371
|
+
},
|
|
372
|
+
"@vercel/ruby": {
|
|
373
|
+
"from": "15.0.0",
|
|
374
|
+
"to": "^17.0.0"
|
|
375
|
+
},
|
|
376
|
+
"@vercel/rust": {
|
|
377
|
+
"from": "14.0.0",
|
|
378
|
+
"to": "^16.0.0"
|
|
379
|
+
},
|
|
380
|
+
"@vercel/static-build": {
|
|
381
|
+
"from": "15.0.0",
|
|
382
|
+
"to": "^17.0.0"
|
|
305
383
|
}
|
|
306
384
|
},
|
|
307
|
-
"depsUpdated":
|
|
385
|
+
"depsUpdated": 30,
|
|
308
386
|
"originalPackage": "vercel",
|
|
309
|
-
"originalVersion": "
|
|
310
|
-
"processedAt": "2026-
|
|
387
|
+
"originalVersion": "62.2.0",
|
|
388
|
+
"processedAt": "2026-10-04T01:32:54.001Z",
|
|
311
389
|
"smokeTest": "failed"
|
|
312
390
|
}
|
|
313
391
|
}
|
|
@@ -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{parseTeamRefs,require_async_sema,teamRefBody}from"./chunk-S5CEIACD.js";import{repositoryPermissionsPath}from"./chunk-DFVNL5ML.js";import{emitVcrArgParseError,resolveVcrScope,validateVcrJsonOutput}from"./chunk-GL2AUBAI.js";import{outputError}from"./chunk-FA6O7FPC.js";import"./chunk-D4MW3RDW.js";import{permissionsAddSubcommand}from"./chunk-YMVDWVMO.js";import"./chunk-HWWHR7H3.js";import"./chunk-2I64AYHG.js";import"./chunk-QTKJC2O5.js";import{AGENT_REASON}from"./chunk-EQP3SW72.js";import"./chunk-SOJCELXH.js";import"./chunk-32QBGZ2Z.js";import"./chunk-5XJNPXQK.js";import{printError}from"./chunk-TBBU37TD.js";import{parseArguments}from"./chunk-T4AZ3U7O.js";import"./chunk-MY4MONOH.js";import"./chunk-64NJHVA3.js";import"./chunk-F2ZWW2IO.js";import"./chunk-B4ATVYZW.js";import"./chunk-PPCFQQSU.js";import{buildCommandWithGlobalFlags,outputAgentError}from"./chunk-BX5KDMLT.js";import{getFlagsSpecification}from"./chunk-JAJW3P42.js";import"./chunk-YMM3VY3J.js";import"./chunk-V5DCSHYJ.js";import"./chunk-VOZEB6PD.js";import{isAPIError}from"./chunk-LKI6FRNM.js";import{packageName}from"./chunk-FI772UVH.js";import{output_manager_default}from"./chunk-EWWFNMPZ.js";import"./chunk-QGIQK47P.js";import"./chunk-BRK4OB4B.js";import"./chunk-AVSPFBLM.js";import"./chunk-XCJDGQO7.js";import"./chunk-YPTLSODC.js";import"./chunk-7HL2RPUO.js";import"./chunk-U7KCDTCH.js";import"./chunk-N3ZZ7FHQ.js";import"./chunk-GU6VIFR5.js";import{__toESM}from"./chunk-6L236MNA.js";var import_async_sema=__toESM(require_async_sema(),1);var USAGE="vcr permissions <repository> add <team>[,<team>...]";async function add(client,argv,telemetry){let parsedArgs;try{parsedArgs=parseArguments(argv,getFlagsSpecification(permissionsAddSubcommand.options))}catch(err){return emitVcrArgParseError(client,err,USAGE),printError(err),1}let fr=validateVcrJsonOutput(client,parsedArgs.flags);if(typeof fr=="number")return fr;let repository=parsedArgs.args[0],teamRefs=parseTeamRefs(parsedArgs.args.slice(2)),project=parsedArgs.flags["--project"];if(telemetry.trackCliOptionProject(project),telemetry.trackCliOptionFormat(parsedArgs.flags["--format"]),teamRefs.length===0)return outputAgentError(client,{status:"error",reason:AGENT_REASON.MISSING_ARGUMENTS,message:`Missing team. Example: ${packageName} vcr permissions ${repository} add team_1a2b3c4d`,next:[{command:buildCommandWithGlobalFlags(client.argv,USAGE),when:"Replace <team> with a team id or slug (comma-separate multiple teams)"}]},1),outputError(client,fr.jsonOutput,"MISSING_ARGUMENTS",`Usage: \`vercel ${USAGE}\``);let scope=await resolveVcrScope(client,{project,jsonOutput:fr.jsonOutput});if(typeof scope=="number")return scope;let path=repositoryPermissionsPath(scope,repository),added=[],failed=[];output_manager_default.spinner(`Sharing ${repository} with ${teamRefs.length===1?teamRefs[0]:`${teamRefs.length} teams`}...`);let sema=new import_async_sema.default(10),results;try{results=await Promise.all(teamRefs.map(async team=>{await sema.acquire();try{let result=await client.fetch(path,{method:"POST",body:teamRefBody(team)});return{ok:!0,team,permission:result.permission}}catch(err){if(!isAPIError(err))throw err;let message=err.serverMessage||`API error (${err.status}).`;return{ok:!1,team,failure:{team,code:err.code||"API_ERROR",message}}}finally{sema.release()}}))}finally{output_manager_default.stopSpinner()}for(let result of results)result.ok?(added.push(result.permission),fr.jsonOutput||output_manager_default.success(`Shared ${repository} with ${result.permission?.teamSlug??result.team}`)):(failed.push(result.failure),fr.jsonOutput||output_manager_default.error(`Failed to share ${repository} with ${result.team}: ${result.failure.message}`));return failed.length>0&&outputAgentError(client,{status:"error",reason:AGENT_REASON.API_ERROR,message:`Failed to share ${repository} with ${failed.map(f=>`${f.team} (${f.message})`).join(", ")}`},1),fr.jsonOutput&&client.stdout.write(`${JSON.stringify({permissions:added,failed},null,2)}
|
|
8
|
-
`),failed.length>0?1:0}export{add as default};
|
|
@@ -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{emitVcrArgParseError,handleVcrApiError,resolveVcrScope,validateVcrJsonOutput}from"./chunk-GL2AUBAI.js";import{outputError}from"./chunk-FA6O7FPC.js";import"./chunk-D4MW3RDW.js";import{addSubcommand}from"./chunk-65JYSI26.js";import"./chunk-YMVDWVMO.js";import"./chunk-O7G3CZ42.js";import"./chunk-N3N5UHIL.js";import"./chunk-HWWHR7H3.js";import"./chunk-2I64AYHG.js";import"./chunk-QTKJC2O5.js";import{AGENT_REASON}from"./chunk-EQP3SW72.js";import"./chunk-SOJCELXH.js";import"./chunk-32QBGZ2Z.js";import"./chunk-5XJNPXQK.js";import{printError}from"./chunk-TBBU37TD.js";import{parseArguments}from"./chunk-T4AZ3U7O.js";import"./chunk-MY4MONOH.js";import"./chunk-64NJHVA3.js";import"./chunk-F2ZWW2IO.js";import"./chunk-B4ATVYZW.js";import"./chunk-PPCFQQSU.js";import{buildCommandWithGlobalFlags,outputAgentError}from"./chunk-BX5KDMLT.js";import{getFlagsSpecification}from"./chunk-JAJW3P42.js";import"./chunk-YMM3VY3J.js";import"./chunk-V5DCSHYJ.js";import"./chunk-VOZEB6PD.js";import{isAPIError}from"./chunk-LKI6FRNM.js";import{packageName}from"./chunk-FI772UVH.js";import{output_manager_default}from"./chunk-EWWFNMPZ.js";import"./chunk-QGIQK47P.js";import"./chunk-BRK4OB4B.js";import"./chunk-AVSPFBLM.js";import"./chunk-XCJDGQO7.js";import"./chunk-YPTLSODC.js";import"./chunk-7HL2RPUO.js";import"./chunk-U7KCDTCH.js";import"./chunk-N3ZZ7FHQ.js";import"./chunk-GU6VIFR5.js";import"./chunk-6L236MNA.js";async function add(client,argv,telemetry){let parsedArgs;try{parsedArgs=parseArguments(argv,getFlagsSpecification(addSubcommand.options))}catch(err){return emitVcrArgParseError(client,err,"vcr add <name> --project <name-or-id>"),printError(err),1}let fr=validateVcrJsonOutput(client,parsedArgs.flags);if(typeof fr=="number")return fr;let name=parsedArgs.args[0],project=parsedArgs.flags["--project"];if(telemetry.trackCliOptionProject(project),telemetry.trackCliOptionFormat(parsedArgs.flags["--format"]),!name)return outputAgentError(client,{status:"error",reason:AGENT_REASON.MISSING_ARGUMENTS,message:`Missing repository name. Example: ${packageName} vcr add <name>`,next:[{command:buildCommandWithGlobalFlags(client.argv,"vcr add <name>"),when:"Replace <name> with the repository name to create"}]},1),outputError(client,fr.jsonOutput,"MISSING_ARGUMENTS","Usage: `vercel vcr add <name>`");let scope=await resolveVcrScope(client,{project,jsonOutput:fr.jsonOutput});if(typeof scope=="number")return scope;let path=`/v1/vcr/repository?teamId=${encodeURIComponent(scope.teamId)}`;output_manager_default.spinner("Creating repository...");try{let created=await client.fetch(path,{method:"POST",body:{projectId:scope.projectId,name}});return fr.jsonOutput?client.stdout.write(`${JSON.stringify(created,null,2)}
|
|
8
|
-
`):output_manager_default.success(`Created repository ${created.repository?.name??name}`),0}catch(err){if(isAPIError(err))return handleVcrApiError(client,err,fr.jsonOutput,{retry:{command:buildCommandWithGlobalFlags(client.argv,"vcr ls"),when:"List existing repositories (a name conflict means it already exists)"}});throw err}finally{output_manager_default.stopSpinner()}}export{add as default};
|
|
@@ -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{printRuleMutationReceipt}from"./chunk-SOQ5DE44.js";import{emitRulesArgParseError,getBodyType,handleRulesApiError,outputRulesError,readRuleBody,resolveRulesProject,resolveRulesTeam,rulesCollectionPath}from"./chunk-GGNZLN4R.js";import"./chunk-7PNYOSDU.js";import"./chunk-2SLHYWMC.js";import"./chunk-6PFC3KWQ.js";import"./chunk-GZNDA6SV.js";import"./chunk-WRILLB46.js";import"./chunk-FA6O7FPC.js";import"./chunk-GHAY4PSD.js";import"./chunk-NYOQMU3P.js";import"./chunk-TRTEXGVN.js";import"./chunk-T3GQAMBJ.js";import"./chunk-J3U3L45Y.js";import"./chunk-KBKN7EI7.js";import"./chunk-DL665Q3Z.js";import"./chunk-MBL6TXEJ.js";import{validateJsonOutput}from"./chunk-D4MW3RDW.js";import"./chunk-P2O5DOYE.js";import{rulesAddSubcommand}from"./chunk-OAKO6LVS.js";import"./chunk-QTKJC2O5.js";import"./chunk-GHM7V3GG.js";import"./chunk-QR7QPUFN.js";import"./chunk-EQP3SW72.js";import"./chunk-6TAQ6OWD.js";import"./chunk-WPS6JZF6.js";import"./chunk-32QBGZ2Z.js";import"./chunk-RCTYVKM5.js";import"./chunk-5XJNPXQK.js";import{printError}from"./chunk-TBBU37TD.js";import{parseArguments}from"./chunk-T4AZ3U7O.js";import"./chunk-MY4MONOH.js";import"./chunk-64NJHVA3.js";import"./chunk-F2ZWW2IO.js";import"./chunk-B4ATVYZW.js";import"./chunk-PPCFQQSU.js";import"./chunk-OSCCYU74.js";import"./chunk-BX5KDMLT.js";import{getFlagsSpecification}from"./chunk-JAJW3P42.js";import"./chunk-YMM3VY3J.js";import"./chunk-V5DCSHYJ.js";import"./chunk-VOZEB6PD.js";import{isAPIError}from"./chunk-LKI6FRNM.js";import"./chunk-FI772UVH.js";import{output_manager_default}from"./chunk-EWWFNMPZ.js";import"./chunk-QGIQK47P.js";import"./chunk-BRK4OB4B.js";import"./chunk-AVSPFBLM.js";import"./chunk-XCJDGQO7.js";import"./chunk-YPTLSODC.js";import"./chunk-7HL2RPUO.js";import"./chunk-U7KCDTCH.js";import"./chunk-N3ZZ7FHQ.js";import"./chunk-GU6VIFR5.js";import"./chunk-6L236MNA.js";function applyScopeFlag(client,body,type,scope,flags,jsonOutput){if(Object.hasOwn(body,"ruleScope"))return flags["--project"]||flags["--all"]?outputRulesError(client,jsonOutput,"SCOPE_CONFLICT","Specify rule scope either in the body or with --project/--all, not both."):void 0;if(flags["--project"]){body.ruleScope=type==="custom"?{type:"project",projectId:scope.projectId}:{type:"include",projectIds:[scope.projectId]};return}if(flags["--all"]){if(type==="custom")return outputRulesError(client,jsonOutput,"INVALID_SCOPE","Custom alert rules must target one project. Use --project <name-or-id>.");body.ruleScope={type:"all"};return}return outputRulesError(client,jsonOutput,"MISSING_SCOPE","Missing rule scope. Add ruleScope to the body, or pass --project or --all.")}async function resolveCreateScope(client,flags,jsonOutput){return flags["--project"]&&flags["--all"]?outputRulesError(client,jsonOutput,"MUTUAL_EXCLUSIVITY","Cannot specify both --all and --project. Use one or the other."):flags["--project"]?resolveRulesProject(client,flags["--project"],jsonOutput,"alerts rules add"):resolveRulesTeam(client,jsonOutput)}async function add(client,argv){let parsedArgs;try{parsedArgs=parseArguments(argv,getFlagsSpecification(rulesAddSubcommand.options))}catch(error){return emitRulesArgParseError(client,error,"alerts rules add --project <name-or-id> --body <path>"),printError(error),1}let flags=parsedArgs.flags,format=validateJsonOutput(flags);if(!format.valid)return outputRulesError(client,!1,"INVALID_ARGUMENTS",format.error);if(!flags["--body"])return outputRulesError(client,format.jsonOutput,"MISSING_ARGUMENTS","Missing required flag: --body <PATH>.");let body=readRuleBody(client,flags["--body"],format.jsonOutput);if(typeof body=="number")return body;let type=getBodyType(body);if(!type)return outputRulesError(client,format.jsonOutput,"INVALID_RULE_TYPE","Create body must set a supported rule type.");if(Object.hasOwn(body,"ruleScope")&&(flags["--project"]||flags["--all"]))return outputRulesError(client,format.jsonOutput,"SCOPE_CONFLICT","Specify rule scope either in the body or with --project/--all, not both.");if(type==="custom"&&flags["--all"])return outputRulesError(client,format.jsonOutput,"INVALID_SCOPE","Custom alert rules must target one project. Use --project <name-or-id>.");let scope=await resolveCreateScope(client,flags,format.jsonOutput);if(typeof scope=="number")return scope;let scopeError=applyScopeFlag(client,body,type,scope,flags,format.jsonOutput);if(scopeError!==void 0)return scopeError;output_manager_default.spinner("Creating alert rule\u2026");try{let response=await client.fetch(rulesCollectionPath(scope.teamId),{method:"POST",body});return format.jsonOutput?client.stdout.write(`${JSON.stringify(response,null,2)}
|
|
8
|
-
`):printRuleMutationReceipt("Created",response.rule,client.argv),0}catch(error){if(isAPIError(error))return handleRulesApiError(client,error,format.jsonOutput);throw error}finally{output_manager_default.stopSpinner()}}export{add as default};
|
|
@@ -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{DEFAULT_TAG,buildRepositoryReference,parseNameArg,validateImageParts}from"./chunk-HEGJZJO7.js";import{VCR_ENGINES,emitVcrArgParseError,isBuildxAvailable,isEngineInstalled,pushCompressionArgs,reportEngineCommandFailure,reportEnginePushFailure,resolveRegistry,resolveVcrScope,runEngine,splitPassthrough,validateVcrChoice}from"./chunk-GL2AUBAI.js";import{outputError}from"./chunk-FA6O7FPC.js";import"./chunk-D4MW3RDW.js";import{buildSubcommand}from"./chunk-65JYSI26.js";import"./chunk-YMVDWVMO.js";import"./chunk-O7G3CZ42.js";import"./chunk-N3N5UHIL.js";import"./chunk-HWWHR7H3.js";import"./chunk-2I64AYHG.js";import"./chunk-QTKJC2O5.js";import{AGENT_REASON}from"./chunk-EQP3SW72.js";import"./chunk-SOJCELXH.js";import"./chunk-32QBGZ2Z.js";import"./chunk-5XJNPXQK.js";import{printError}from"./chunk-TBBU37TD.js";import{parseArguments}from"./chunk-T4AZ3U7O.js";import"./chunk-MY4MONOH.js";import"./chunk-64NJHVA3.js";import"./chunk-F2ZWW2IO.js";import"./chunk-B4ATVYZW.js";import"./chunk-PPCFQQSU.js";import{buildCommandWithGlobalFlags,outputAgentError}from"./chunk-BX5KDMLT.js";import{getFlagsSpecification}from"./chunk-JAJW3P42.js";import"./chunk-YMM3VY3J.js";import"./chunk-V5DCSHYJ.js";import"./chunk-VOZEB6PD.js";import"./chunk-LKI6FRNM.js";import"./chunk-FI772UVH.js";import{output_manager_default}from"./chunk-EWWFNMPZ.js";import"./chunk-QGIQK47P.js";import"./chunk-BRK4OB4B.js";import"./chunk-AVSPFBLM.js";import"./chunk-XCJDGQO7.js";import"./chunk-YPTLSODC.js";import"./chunk-7HL2RPUO.js";import"./chunk-U7KCDTCH.js";import"./chunk-N3ZZ7FHQ.js";import"./chunk-GU6VIFR5.js";import"./chunk-6L236MNA.js";var DEFAULT_PLATFORM="linux/amd64";async function build(client,telemetry){let{own,passthrough}=splitPassthrough(client.argv),parsedArgs;try{parsedArgs=parseArguments(own,getFlagsSpecification(buildSubcommand.options))}catch(err){return emitVcrArgParseError(client,err,"vcr build <engine> [path] [name[:tag]]"),printError(err),1}let[engineArg,pathArg,nameArg]=parsedArgs.args.slice(2),project=parsedArgs.flags["--project"],platform=parsedArgs.flags["--platform"],push=!!parsedArgs.flags["--push"];if(telemetry.trackCliArgumentEngine(engineArg),telemetry.trackCliArgumentPath(pathArg),telemetry.trackCliArgumentName(nameArg),telemetry.trackCliOptionProject(project),telemetry.trackCliOptionPlatform(platform),telemetry.trackCliFlagPush(push),!engineArg){let message=`Missing engine. Choose one of: ${VCR_ENGINES.join(", ")}.`;return outputAgentError(client,{status:"error",reason:AGENT_REASON.MISSING_ARGUMENTS,message,next:[{command:buildCommandWithGlobalFlags(client.argv,"vcr build docker"),when:"Replace docker with the container tool you use"}]},1),outputError(client,!1,"MISSING_ARGUMENTS",message)}let choiceError=validateVcrChoice(client,"engine",engineArg,VCR_ENGINES,!1);if(typeof choiceError=="number")return choiceError;let engine=engineArg;if(!isEngineInstalled(engine)){let message=`\`${engine}\` is not installed or not on your PATH. Install it and try again.`;return outputAgentError(client,{status:"error",reason:"engine_not_found",message},1),outputError(client,!1,"ENGINE_NOT_FOUND",message)}let scope=await resolveVcrScope(client,{project,jsonOutput:!1});if(typeof scope=="number")return scope;let parsed=parseNameArg(nameArg,scope.projectName);if("error"in parsed)return outputAgentError(client,{status:"error",reason:AGENT_REASON.INVALID_ARGUMENTS,message:parsed.error},1),outputError(client,!1,"INVALID_ARGUMENTS",parsed.error);let validationError=validateImageParts(parsed);if(validationError)return outputAgentError(client,{status:"error",reason:AGENT_REASON.INVALID_ARGUMENTS,message:validationError},1),outputError(client,!1,"INVALID_ARGUMENTS",validationError);let ref=`${buildRepositoryReference({registry:resolveRegistry(),teamSlug:scope.teamSlug,projectName:scope.projectName,repository:parsed.repository})}:${parsed.tag??DEFAULT_TAG}`,contextPath=pathArg??".",buildPlatform=platform??DEFAULT_PLATFORM;if(push&&engine==="docker"&&await isBuildxAvailable()){let outputSpec=`type=image,name=${ref},push=true,oci-mediatypes=true,compression=zstd,compression-level=3,force-compression=true`,engineArgs2=["buildx","build","--platform",buildPlatform,"--output",outputSpec,...passthrough,contextPath];output_manager_default.log(`Running: ${engine} ${engineArgs2.join(" ")}`);let result2=await runEngine(engine,engineArgs2,{cwd:client.cwd,captureStderr:!0});return result2.exitCode!==0?reportEnginePushFailure(client,engine,"buildx build",result2):(output_manager_default.success(`Built and pushed ${ref} (zstd compression)`),0)}push&&engine==="docker"&&output_manager_default.warn("Docker Buildx is not available; building and pushing without zstd compression. Install Buildx for smaller, faster image pushes.");let engineArgs=["build","--platform",buildPlatform,"--tag",ref,...passthrough,contextPath];output_manager_default.log(`Running: ${engine} ${engineArgs.join(" ")}`);let result=await runEngine(engine,engineArgs,{cwd:client.cwd});if(result.exitCode!==0)return reportEngineCommandFailure(client,engine,"build",result);if(!push)return output_manager_default.success(`Built ${ref}`),output_manager_default.log(`Push it with \`${buildCommandWithGlobalFlags(client.argv,`vcr push ${engine}${nameArg?` ${nameArg}`:""}`)}\`.`),0;let pushArgs=["push",...pushCompressionArgs(engine),ref];output_manager_default.log(`Running: ${engine} ${pushArgs.join(" ")}`);let pushResult=await runEngine(engine,pushArgs,{cwd:client.cwd,captureStderr:!0});if(pushResult.exitCode!==0)return reportEnginePushFailure(client,engine,"push",pushResult);let compressed=engine!=="docker";return output_manager_default.success(`Built and pushed ${ref}${compressed?" (zstd compression)":""}`),0}export{build as default};
|
|
@@ -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{inspectTokenRequest,processInspectTokenResponse}from"./chunk-5XJNPXQK.js";import{findProjectsFromPath,getLinkFromDir,getRepoLink,getVercelDirectory}from"./chunk-64NJHVA3.js";import{getUser}from"./chunk-V5DCSHYJ.js";import{getTeamByIdOrSlug}from"./chunk-VOZEB6PD.js";import{InvalidToken,TeamDeleted}from"./chunk-LKI6FRNM.js";import{output_manager_default}from"./chunk-EWWFNMPZ.js";var VERCEL_API_ORIGIN="https://api.vercel.com";async function introspectToken(client){let token=client.authConfig.token;if(!token)throw new Error("No token to introspect");if(new URL(client.apiUrl).origin!==VERCEL_API_ORIGIN)throw new Error("Token introspection is unavailable for custom API origins");let[error,introspection]=await processInspectTokenResponse(await inspectTokenRequest(token));if(error)throw error;return introspection}function isAppPrincipalEnabled(){return!!process.env.APP_PRINCIPAL_ENABLED}function resolveAppFromToken(token){return!token.active||!token.client_id?null:{id:token.client_id,name:token.client_name}}async function resolveAppTokenScope(client,scope){let token=await introspectToken(client).catch(()=>null),app=token?resolveAppFromToken(token):null,team=token?.team;return!app||!team||team.id!==scope&&team.slug!==scope?!1:(client.config.currentTeam=team.id,!0)}import{relative}from"path";async function getScope(client,opts={}){let{user,app,token}=await getPrincipal(client),defaultTeamId=user?.version==="northstar"?user.defaultTeamId:void 0,appTeamId=!user&&app?token?.team?.id:void 0;if(!user&&app&&opts.getTeam===!1)throw new Error("App principal scope resolution requires a team lookup.");!user&&app&&(client.config.currentTeam=appTeamId),!client.config.currentTeam&&defaultTeamId&&(client.config.currentTeam=defaultTeamId);let teamId=client.config.currentTeam||defaultTeamId,team=teamId&&opts.getTeam!==!1?await getTeam(client,teamId):null,contextName=team?.slug||user?.username||user?.email;if(!contextName)throw new Error("Unable to determine context name");return opts.resolveLocalScope?resolveLocalScopeContext(client,{user,app,team}):{contextName,team,user,app}}async function getPrincipal(client){if(!isAppPrincipalEnabled())return{user:await getUser(client),app:null,token:null};let[userResult,tokenResult]=await Promise.allSettled([getUser(client),introspectToken(client)]),token=tokenResult.status==="fulfilled"?tokenResult.value:null,app=token?resolveAppFromToken(token):null;if(userResult.status==="rejected"&&!(app&&userResult.reason instanceof InvalidToken))throw userResult.reason;return{user:userResult.status==="fulfilled"?userResult.value:null,app,token}}async function resolveLocalScopeContext(client,{user,app,team}){let explicitScopeProvided=detectExplicitScope(client),globalTeamId=client.config.currentTeam,{localOrgId,linkedRepo,isCrossTeamRepo}=await findLocalLink(client),isAppPrincipal=!user&&!!app,effectiveLocalOrgId=isAppPrincipal?void 0:localOrgId,scopeMismatch=!!(effectiveLocalOrgId&&globalTeamId&&globalTeamId!==effectiveLocalOrgId);!isAppPrincipal&&!explicitScopeProvided&&!effectiveLocalOrgId&&isCrossTeamRepo&&output_manager_default.warn("This repository has projects across multiple teams. Use `--scope` to specify which team, or `cd` into a project directory.");let resolvedTeam=!explicitScopeProvided&&effectiveLocalOrgId?await applyLocalOrg(client,effectiveLocalOrgId):team,{org,contextName}=resolveOrg(resolvedTeam,user);return{org,contextName,user,team:resolvedTeam,app,globalTeam:team,linkedRepo,isCrossTeamRepo,scopeMismatch,explicitScopeProvided}}async function applyLocalOrg(client,localOrgId){return client.config.currentTeam=localOrgId.startsWith("team_")?localOrgId:void 0,client.config.currentTeam?await getTeamByIdOrSlug(client,client.config.currentTeam):null}async function getTeam(client,teamId){let team=await getTeamByIdOrSlug(client,teamId);if(!team)throw new TeamDeleted;return team}function resolveOrg(team,user){if(team)return{org:{type:"team",id:team.id,slug:team.slug},contextName:team.slug};if(user)return{org:{type:"user",id:user.id,slug:user.username},contextName:user.username||user.email};throw new Error("Unable to determine scope: no team or personal account is available for this token. Use `--scope` to specify a team.")}async function findLocalLink(client){let[projectLink,repoLink]=await Promise.all([findProjectLink(client),findRepoLink(client)]);return{localOrgId:findLocalOrgId(client.cwd,projectLink,repoLink),linkedRepo:repoLink?.repoConfig?{repoConfig:repoLink.repoConfig,rootPath:repoLink.rootPath}:null,isCrossTeamRepo:detectCrossTeamRepo(repoLink?.repoConfig)}}async function findProjectLink(client){try{return await getLinkFromDir(getVercelDirectory(client.cwd))}catch{return null}}async function findRepoLink(client){try{return await getRepoLink(client,client.cwd)}catch{return null}}function findLocalOrgId(cwd,projectLink,repoLink){if(projectLink)return projectLink.orgId;if(repoLink?.repoConfig)return findRepoOrgId(repoLink.repoConfig,relative(repoLink.rootPath,cwd))}function findRepoOrgId(repoConfig,pathFromRepoRoot){let projects=findProjectsFromPath(repoConfig.projects,pathFromRepoRoot),orgIds=new Set(projects.map(p=>p.orgId??repoConfig.orgId??""));if(orgIds.size!==1)return;let[orgId]=orgIds;return orgId||void 0}function detectExplicitScope(client){let argv=client.argv;for(let arg of argv){if(arg==="--")break;if(arg==="--scope"||arg==="--team"||arg.startsWith("--scope=")||arg.startsWith("--team=")||arg==="-S"||arg==="-T")return!0}return!!client.localConfig?.scope}function detectCrossTeamRepo(repoConfig){if(!repoConfig?.projects||repoConfig.projects.length<2)return!1;let orgIds=new Set;for(let project of repoConfig.projects){let orgId=project.orgId??repoConfig.orgId;orgId&&orgIds.add(orgId)}return orgIds.size>1}export{isAppPrincipalEnabled,resolveAppTokenScope,getScope,detectExplicitScope};
|
|
@@ -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{projectOption,yesOption}from"./chunk-JAJW3P42.js";import{packageName}from"./chunk-FI772UVH.js";var listSubcommand={name:"list",aliases:["ls"],description:"List all routing rules for the current project. These routes apply to all deployments and environments.",arguments:[],options:[projectOption,{name:"search",description:"Search by name, description, source, or destination",shorthand:"s",type:String,argument:"QUERY",deprecated:!1},{name:"filter",description:"Filter by type: rewrite, redirect, set_status, transform",shorthand:"f",type:String,argument:"TYPE",deprecated:!1},{name:"production",description:"List routes from the live production version",shorthand:null,type:Boolean,deprecated:!1},{name:"version-id",description:"List routes from a specific version ID",shorthand:null,type:String,argument:"VERSION_ID",deprecated:!1},{name:"diff",description:"Compare staged changes against production. Use with --version-id to compare a specific version.",shorthand:null,type:Boolean,deprecated:!1},{name:"expand",description:"Show expanded details for each route",shorthand:"e",type:Boolean,deprecated:!1}],examples:[{name:"List all routes",value:`${packageName} routes list`},{name:"Search for routes",value:`${packageName} routes list --search "api"`},{name:"Filter by type",value:`${packageName} routes list --filter rewrite`},{name:"Show staged changes",value:`${packageName} routes list --diff`},{name:"Show live production routes",value:`${packageName} routes list --production`},{name:"Show expanded details",value:`${packageName} routes list --expand`}]},listVersionsSubcommand={name:"list-versions",aliases:["ls-versions"],description:"List all versions of routing rules",arguments:[],options:[projectOption,{name:"count",description:"Number of versions to fetch (default: 20, max: 100)",shorthand:null,type:Number,argument:"NUMBER",deprecated:!1}],examples:[{name:"List route versions",value:`${packageName} routes list-versions`},{name:"List more versions",value:`${packageName} routes list-versions --count 50`}]},inspectSubcommand={name:"inspect",aliases:[],description:"Show detailed information about a specific route",arguments:[{name:"name-or-id",required:!0}],options:[projectOption,{name:"diff",description:"Compare staged changes against production for this route",shorthand:null,type:Boolean,deprecated:!1}],examples:[{name:"Inspect a route by name",value:`${packageName} routes inspect "API rewrite"`},{name:"Inspect a route by ID",value:`${packageName} routes inspect abc123`},{name:"Show staged changes for a route",value:`${packageName} routes inspect "My route" --diff`}]},addSubcommand={name:"add",aliases:[],description:"Add a new routing rule to the project",arguments:[{name:"name",required:!1}],options:[projectOption,{name:"src",description:"Path pattern (required in non-interactive mode)",shorthand:null,type:String,argument:"PATTERN",deprecated:!1},{name:"src-syntax",description:"Path syntax: regex (default), path-to-regexp, equals",shorthand:null,type:String,argument:"TYPE",deprecated:!1},{name:"action",description:"Action type: rewrite, redirect, or set-status (required with --dest/--status)",shorthand:null,type:String,argument:"TYPE",deprecated:!1},{name:"dest",description:"Destination URL for rewrite or redirect",shorthand:null,type:String,argument:"URL",deprecated:!1},{name:"status",description:"Status code (301/302/307/308 for redirect, or any for set-status)",shorthand:null,type:Number,argument:"CODE",deprecated:!1},{name:"set-response-header",description:"Set response header: key=value (repeatable)",shorthand:null,type:[String],argument:"HEADER",deprecated:!1},{name:"append-response-header",description:"Append to response header: key=value (repeatable)",shorthand:null,type:[String],argument:"HEADER",deprecated:!1},{name:"delete-response-header",description:"Delete response header: key (repeatable)",shorthand:null,type:[String],argument:"KEY",deprecated:!1},{name:"set-request-header",description:"Set request header: key=value (repeatable)",shorthand:null,type:[String],argument:"HEADER",deprecated:!1},{name:"append-request-header",description:"Append to request header: key=value (repeatable)",shorthand:null,type:[String],argument:"HEADER",deprecated:!1},{name:"delete-request-header",description:"Delete request header: key (repeatable)",shorthand:null,type:[String],argument:"KEY",deprecated:!1},{name:"set-request-query",description:"Set query parameter: key=value (repeatable)",shorthand:null,type:[String],argument:"PARAM",deprecated:!1},{name:"append-request-query",description:"Append to query parameter: key=value (repeatable)",shorthand:null,type:[String],argument:"PARAM",deprecated:!1},{name:"delete-request-query",description:"Delete query parameter: key (repeatable)",shorthand:null,type:[String],argument:"KEY",deprecated:!1},{name:"has",description:"Condition that must match: type:key or type:key:value (repeatable)",shorthand:null,type:[String],argument:"CONDITION",deprecated:!1},{name:"missing",description:'"Does not have" condition: type:key or type:key:value (repeatable)',shorthand:null,type:[String],argument:"CONDITION",deprecated:!1},{name:"description",description:"Route description (max 1024 chars)",shorthand:null,type:String,argument:"TEXT",deprecated:!1},{name:"disabled",description:"Create route in disabled state",shorthand:null,type:Boolean,deprecated:!1},{name:"ai",description:"Generate route from a natural language description (AI-powered)",shorthand:null,type:String,argument:"PROMPT",deprecated:!1},{name:"position",description:"Position: start, end, after:<id>, before:<id>",shorthand:null,type:String,argument:"POSITION",deprecated:!1},{name:"yes",description:"Skip confirmation prompts",shorthand:"y",type:Boolean,deprecated:!1}],examples:[{name:"Interactive mode",value:`${packageName} routes add`},{name:"Create with AI",value:`${packageName} routes add --ai "Rewrite /api/* to https://backend.internal/*"`},{name:"Add a rewrite",value:`${packageName} routes add "API Proxy" --src "/api/:path*" --src-syntax path-to-regexp --action rewrite --dest "https://api.example.com/:path*" --yes`},{name:"Add a redirect",value:`${packageName} routes add "Old Blog" --src "/blog" --src-syntax equals --action redirect --dest "/articles" --status 301 --yes`},{name:"Add CORS headers",value:`${packageName} routes add "CORS" --src "^/api/.*$" --set-response-header "Access-Control-Allow-Origin=*" --yes`},{name:"Block access (set status)",value:`${packageName} routes add "Block Admin" --src "^/admin/.*$" --action set-status --status 403 --yes`},{name:"Conditional redirect",value:`${packageName} routes add "Auth Required" --src "/protected/:path*" --src-syntax path-to-regexp --action redirect --dest "/login" --status 307 --missing "cookie:session" --yes`},{name:"Rewrite with request headers",value:`${packageName} routes add "Backend Proxy" --src "/backend/:path*" --src-syntax path-to-regexp --action rewrite --dest "https://internal.example.com/:path*" --set-request-header "X-Forwarded-Host=myapp.com" --yes`},{name:"Add route at start",value:`${packageName} routes add "Priority Route" --src "/priority" --src-syntax equals --action rewrite --dest "/handler" --position start --yes`}]},publishSubcommand={name:"publish",aliases:[],description:"Publish staged routing changes to production",arguments:[],options:[projectOption,{...yesOption,description:"Skip the confirmation prompt when publishing"}],examples:[{name:"Publish staged changes",value:`${packageName} routes publish`},{name:"Publish without confirmation",value:`${packageName} routes publish --yes`}]},restoreSubcommand={name:"restore",aliases:[],description:"Restore a previous routing version to production",arguments:[{name:"version-id",required:!0}],options:[projectOption,{...yesOption,description:"Skip the confirmation prompt when restoring"}],examples:[{name:"Restore a previous version",value:`${packageName} routes restore <version-id>`},{name:"Restore without confirmation",value:`${packageName} routes restore <version-id> --yes`}]},discardSubcommand={name:"discard-staging",aliases:[],description:"Discard staged routing changes",arguments:[],options:[projectOption,{...yesOption,description:"Skip the confirmation prompt when discarding"}],examples:[{name:"Discard staged changes",value:`${packageName} routes discard-staging`},{name:"Discard without confirmation",value:`${packageName} routes discard-staging --yes`}]},deleteSubcommand={name:"delete",aliases:["rm"],description:"Delete one or more routing rules",arguments:[{name:"name-or-id",required:!0,multiple:!0}],options:[projectOption,{...yesOption,description:"Skip the confirmation prompt when deleting"}],examples:[{name:"Delete a route by name",value:`${packageName} routes delete "Old Redirect"`},{name:"Delete a route by ID",value:`${packageName} routes delete abc123`},{name:"Delete multiple routes",value:`${packageName} routes delete "Route A" "Route B"`},{name:"Delete without confirmation",value:`${packageName} routes delete "Old Route" --yes`}]},enableSubcommand={name:"enable",aliases:[],description:"Enable a disabled routing rule",arguments:[{name:"name-or-id",required:!0}],options:[projectOption],examples:[{name:"Enable a route by name",value:`${packageName} routes enable "API Proxy"`},{name:"Enable a route by ID",value:`${packageName} routes enable abc123`}]},disableSubcommand={name:"disable",aliases:[],description:"Disable a routing rule without deleting it",arguments:[{name:"name-or-id",required:!0}],options:[projectOption],examples:[{name:"Disable a route by name",value:`${packageName} routes disable "API Proxy"`},{name:"Disable a route by ID",value:`${packageName} routes disable abc123`}]},reorderSubcommand={name:"reorder",aliases:["move"],description:"Move a routing rule to a different position",arguments:[{name:"name-or-id",required:!0}],options:[projectOption,{name:"position",description:"Target position: start, end, a number (1-based), before:<id>, after:<id>",shorthand:null,type:String,argument:"POSITION",deprecated:!1},{name:"first",description:"Move to the first position (highest priority)",shorthand:null,type:Boolean,deprecated:!1},{name:"last",description:"Move to the last position (lowest priority)",shorthand:null,type:Boolean,deprecated:!1},{...yesOption,description:"Skip the confirmation prompt when reordering"}],examples:[{name:"Move to first position",value:`${packageName} routes reorder "Catch All" --first`},{name:"Move to last position",value:`${packageName} routes reorder "Catch All" --last`},{name:"Move to a specific position",value:`${packageName} routes reorder "API Proxy" --position 3`},{name:"Move after another route",value:`${packageName} routes reorder "API Proxy" --position after:route-id-123`},{name:"Interactive reorder (prompts for position)",value:`${packageName} routes reorder "API Proxy"`}]},editSubcommand={name:"edit",aliases:[],description:"Edit an existing routing rule",arguments:[{name:"name-or-id",required:!0}],options:[projectOption,{name:"name",description:"Change route name",shorthand:null,type:String,argument:"NAME",deprecated:!1},{name:"description",description:'Change description (use "" to clear)',shorthand:null,type:String,argument:"TEXT",deprecated:!1},{name:"src",description:"Change source path pattern",shorthand:null,type:String,argument:"PATTERN",deprecated:!1},{name:"src-syntax",description:"Change path syntax: regex, path-to-regexp, equals",shorthand:null,type:String,argument:"TYPE",deprecated:!1},{name:"action",description:"Set action type: rewrite, redirect, or set-status (required when switching types)",shorthand:null,type:String,argument:"TYPE",deprecated:!1},{name:"dest",description:"Set destination URL",shorthand:null,type:String,argument:"URL",deprecated:!1},{name:"status",description:"Set status code",shorthand:null,type:Number,argument:"CODE",deprecated:!1},{name:"no-dest",description:"Remove destination",shorthand:null,type:Boolean,deprecated:!1},{name:"no-status",description:"Remove status code",shorthand:null,type:Boolean,deprecated:!1},{name:"set-response-header",description:"Set response header: key=value (repeatable)",shorthand:null,type:[String],argument:"HEADER",deprecated:!1},{name:"append-response-header",description:"Append to response header: key=value (repeatable)",shorthand:null,type:[String],argument:"HEADER",deprecated:!1},{name:"delete-response-header",description:"Delete response header: key (repeatable)",shorthand:null,type:[String],argument:"KEY",deprecated:!1},{name:"set-request-header",description:"Set request header: key=value (repeatable)",shorthand:null,type:[String],argument:"HEADER",deprecated:!1},{name:"append-request-header",description:"Append to request header: key=value (repeatable)",shorthand:null,type:[String],argument:"HEADER",deprecated:!1},{name:"delete-request-header",description:"Delete request header: key (repeatable)",shorthand:null,type:[String],argument:"KEY",deprecated:!1},{name:"set-request-query",description:"Set query parameter: key=value (repeatable)",shorthand:null,type:[String],argument:"PARAM",deprecated:!1},{name:"append-request-query",description:"Append to query parameter: key=value (repeatable)",shorthand:null,type:[String],argument:"PARAM",deprecated:!1},{name:"delete-request-query",description:"Delete query parameter: key (repeatable)",shorthand:null,type:[String],argument:"KEY",deprecated:!1},{name:"has",description:"Add a has condition: type:key or type:key:value (repeatable)",shorthand:null,type:[String],argument:"CONDITION",deprecated:!1},{name:"missing",description:'Add a "does not have" condition: type:key or type:key:value (repeatable)',shorthand:null,type:[String],argument:"CONDITION",deprecated:!1},{name:"clear-conditions",description:"Remove all has/does-not-have conditions",shorthand:null,type:Boolean,deprecated:!1},{name:"clear-headers",description:"Remove all response headers",shorthand:null,type:Boolean,deprecated:!1},{name:"clear-transforms",description:"Remove all transforms (request headers, request query)",shorthand:null,type:Boolean,deprecated:!1},{name:"ai",description:"Describe changes using natural language (AI-powered)",shorthand:null,type:String,argument:"PROMPT",deprecated:!1},{...yesOption,description:"Skip confirmation prompts"}],examples:[{name:"Interactive mode",value:`${packageName} routes edit "API Proxy"`},{name:"Edit with AI",value:`${packageName} routes edit "API Proxy" --ai "Add CORS headers and change status to 308"`},{name:"Change destination",value:`${packageName} routes edit "API Proxy" --dest "https://new-api.example.com/:path*"`},{name:"Switch to redirect",value:`${packageName} routes edit "Old Route" --action redirect --dest "/new" --status 301`},{name:"Add a response header",value:`${packageName} routes edit "My Route" --set-response-header "Cache-Control=public, max-age=3600"`},{name:"Clear all conditions and add new ones",value:`${packageName} routes edit "My Route" --clear-conditions --has "header:Authorization"`}]},exportSubcommand={name:"export",aliases:[],description:"Export routes to a vercel.json or vercel.ts file",arguments:[{name:"name-or-id",required:!1}],options:[projectOption,{name:"output",description:"Output file format: .json (default) or .ts",shorthand:"o",type:String,argument:"json|ts",deprecated:!1}],examples:[{name:"Export as vercel.json format",value:`${packageName} routes export`},{name:"Export as vercel.ts format",value:`${packageName} routes export --output ts`},{name:"Export a specific route",value:`${packageName} routes export "API Proxy"`},{name:"Export to a file",value:`${packageName} routes export > routes.json`}]},routesCommand={name:"routes",aliases:[],description:"Manage routing rules for a project. Routes managed at the project level apply to all deployments and environments.",arguments:[],subcommands:[listSubcommand,listVersionsSubcommand,inspectSubcommand,addSubcommand,editSubcommand,deleteSubcommand,enableSubcommand,disableSubcommand,reorderSubcommand,exportSubcommand,publishSubcommand,restoreSubcommand,discardSubcommand],options:[],examples:[]};export{listSubcommand,listVersionsSubcommand,inspectSubcommand,addSubcommand,publishSubcommand,restoreSubcommand,discardSubcommand,deleteSubcommand,enableSubcommand,disableSubcommand,reorderSubcommand,editSubcommand,exportSubcommand,routesCommand};
|
|
@@ -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{isNativeBinaryInstall}from"./chunk-7T6TL3GQ.js";import{require_lib}from"./chunk-64NJHVA3.js";import{packageName}from"./chunk-FI772UVH.js";import{__toESM}from"./chunk-6L236MNA.js";var import_fs_extra=__toESM(require_lib(),1);import{join as join2,sep}from"path";import{execFile}from"child_process";import{promisify}from"util";import{tmpdir}from"node:os";import{resolve}from"node:path";var trustedUpgradeEnvironment=Object.freeze({...process.env}),trustedUpgradeDirectory=resolve(tmpdir());import{join}from"path";var packageManagers={npm:{metadataArgs:specifier=>["view",specifier,"version","--json","--global"],installArgs:specifier=>["i","-g",specifier],releaseAgeBypassArgs:["--min-release-age=0"],globalDetection:{args:["root","-g"],packageDir:(root,pkg)=>join(root,pkg)}},pnpm:{metadataArgs:specifier=>["view",specifier,"version","--json"],installArgs:specifier=>["i","-g",specifier],releaseAgeBypassArgs:["--config.minimumReleaseAge=0"],globalDetection:{args:pkg=>["list","-g",pkg,"--depth=0","--json"],packageDir:(output,pkg)=>{try{let projects=JSON.parse(output),path=(Array.isArray(projects)?projects[0]:projects)?.dependencies?.[pkg]?.path;return typeof path=="string"?path:void 0}catch{return}}}},yarn:{metadataArgs:specifier=>["info",specifier.endsWith("@latest")?specifier.slice(0,-7):specifier,"version","--json"],installArgs:specifier=>["global","add",specifier],releaseAgeBypassArgs:[],globalDetection:{args:["--silent","global","dir"],packageDir:(root,pkg)=>join(root,"node_modules",pkg)}},bun:{metadataArgs:specifier=>["info",specifier,"version","--json","--global"],installArgs:specifier=>["add","-g",specifier],releaseAgeBypassArgs:[],globalDetection:{args:["pm","bin","-g"],binaryNames:["vercel","vc"]}}};function getUpgradePackageManager(name){return packageManagers[name]}var nativePackageName="@vercel/vc-native",execFileAsync=promisify(execFile),UnsupportedUpgradeInstallError=class extends Error{},globalCliTypes=["npm","pnpm","yarn","bun"];async function getPackageManagerGlobalRoot(cliType,pkg,env=trustedUpgradeEnvironment){try{let detectionArgs=getUpgradePackageManager(cliType).globalDetection.args,{stdout}=await execFileAsync(cliType,typeof detectionArgs=="function"?detectionArgs(pkg):detectionArgs,{encoding:"utf8",windowsHide:!0,cwd:trustedUpgradeDirectory,timeout:15e3,env});return stdout.trim()||null}catch{return null}}async function detectGlobalPackageManager(installPath,pkg,cliTypes=globalCliTypes,env=trustedUpgradeEnvironment){for(let cliType of cliTypes){let root=await getPackageManagerGlobalRoot(cliType,pkg,env);if(!root)continue;let detection=getUpgradePackageManager(cliType).globalDetection;if(detection.packageDir)try{let packageDir=detection.packageDir(root,pkg);if(!packageDir)continue;let resolvedPackageDir=await(0,import_fs_extra.realpath)(packageDir);if(installPath===resolvedPackageDir||installPath.startsWith(resolvedPackageDir+sep))return cliType}catch{}for(let binary of detection.binaryNames||[])try{let target=await(0,import_fs_extra.realpath)(join2(root,binary));if(target===installPath||target.startsWith(installPath+sep)||installPath.startsWith(target+sep))return cliType;let entrypoint=await(0,import_fs_extra.realpath)(process.argv[1]);if(!isNativeBinaryInstall()&&target===entrypoint)return cliType}catch{}}return null}async function resolveInstall(env=trustedUpgradeEnvironment){let nativeInstall=isNativeBinaryInstall(),pkg=nativeInstall?nativePackageName:packageName,installPath=nativeInstall?process.execPath:process.argv[1];try{installPath=await(0,import_fs_extra.realpath)(installPath)}catch{throw new UnsupportedUpgradeInstallError("Could not resolve this Vercel CLI installation. Update it with the package manager that installed it.")}let packageManager=await detectGlobalPackageManager(installPath,pkg,globalCliTypes,env);if(!packageManager)throw new UnsupportedUpgradeInstallError("Could not detect a supported global npm, pnpm, Yarn, or Bun installation of Vercel CLI. Update it with the package manager that installed it.");return{packageManager,global:!0,assumed:!1}}async function isGlobal(){try{return await resolveInstall(),!0}catch{return!1}}async function getUpdateCommandInfo(env=trustedUpgradeEnvironment){let nativeInstall=isNativeBinaryInstall(),pkg=nativeInstall?nativePackageName:packageName,{packageManager}=await resolveInstall(env),args=getUpgradePackageManager(packageManager).installArgs(`${pkg}@latest`),force=nativeInstall&&packageManager==="npm"?" --force":"",allowBuild=pnpmAllowBuildFlag(packageManager,nativeInstall?nativePackageName:"esbuild");return{command:`${packageManager} ${args.join(" ")}${force}${allowBuild}`,global:!0,packageManager,assumed:!1}}function pnpmAllowBuildFlag(cliType,pkg){return cliType==="pnpm"?` --allow-build=${pkg}`:""}async function getUpdateCommand(){return(await getUpdateCommandInfo()).command}export{trustedUpgradeEnvironment,trustedUpgradeDirectory,getUpgradePackageManager,isGlobal,getUpdateCommandInfo,getUpdateCommand};
|
|
@@ -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{permissionsAggregateCommand}from"./chunk-YMVDWVMO.js";import{tagsAggregateCommand}from"./chunk-O7G3CZ42.js";import{imageAggregateCommand}from"./chunk-N3N5UHIL.js";import{formatOption,jsonOption,limitOption,projectOption,yesOption}from"./chunk-JAJW3P42.js";import{packageName}from"./chunk-FI772UVH.js";var projectScopeOption={...projectOption,shorthand:"p",description:"Project name or ID (defaults to the linked project)."},nextOption={name:"next",shorthand:null,type:String,deprecated:!1,description:"Continue from a previous response",argument:"CURSOR"},cursorOption={name:"cursor",shorthand:"c",type:String,deprecated:!0,description:"Cursor from a previous page to continue listing from",argument:"STRING"},platformOption={name:"platform",shorthand:null,type:String,deprecated:!1,description:"Target platform for the build (defaults to linux/amd64).",argument:"PLATFORM"},pushOption={name:"push",shorthand:null,type:Boolean,deprecated:!1,description:"Push the image after building. With Docker this builds and pushes in one step (Buildx enables zstd compression); Podman and Buildah build, then push with zstd compression."},publicOption={name:"public",shorthand:null,type:String,deprecated:!1,description:"Set the repository visibility: `true` for public, `false` for private.",argument:"BOOLEAN",choices:["true","false"]},listSubcommand={name:"ls",aliases:["list"],description:"List container registry repositories for a project",arguments:[],options:[projectScopeOption,limitOption,nextOption,cursorOption,formatOption,jsonOption],examples:[{name:"List repositories in the linked project",value:`${packageName} vcr ls`},{name:"List repositories for a specific project as JSON",value:`${packageName} vcr ls --project my-app --json`}]},inspectSubcommand={name:"inspect",aliases:["get"],description:"Show details for a single repository",arguments:[{name:"repository",required:!0}],options:[projectScopeOption,formatOption,jsonOption],examples:[{name:"Inspect a repository by name",value:`${packageName} vcr inspect my-repository`}]},addSubcommand={name:"add",aliases:["create"],description:"Create a container registry repository",arguments:[{name:"name",required:!0}],options:[projectScopeOption,formatOption,jsonOption],examples:[{name:"Create a repository",value:`${packageName} vcr add my-repository`}]},configSubcommand={name:"config",aliases:[],description:"Configure a container registry repository, such as the repository's visibility",arguments:[{name:"repository",required:!0}],options:[publicOption,projectScopeOption,formatOption,jsonOption],examples:[{name:"Make a repository public",value:`${packageName} vcr config my-repository --public true`},{name:"Make a repository private",value:`${packageName} vcr config my-repository --public false`}]},removeSubcommand={name:"rm",aliases:["remove","delete"],description:"Delete a container registry repository",arguments:[{name:"repository",required:!0}],options:[projectScopeOption,yesOption,formatOption,jsonOption],examples:[{name:"Delete a repository",value:`${packageName} vcr rm my-repository`},{name:"Delete a repository without the confirmation prompt",value:`${packageName} vcr rm my-repository --yes`}]},loginSubcommand={name:"login",aliases:[],description:"Authenticate a container tool (docker, podman, or buildah) with the Vercel Container Registry",arguments:[{name:"engine",required:!0}],options:[projectScopeOption,formatOption,jsonOption],examples:[{name:"Log in with Docker",value:`${packageName} vcr login docker`},{name:"Log in with Podman",value:`${packageName} vcr login podman`},{name:"Log in with Buildah",value:`${packageName} vcr login buildah`},{name:"Log in for a specific project",value:`${packageName} vcr login docker --project my-app`}]},buildSubcommand={name:"build",aliases:[],description:"Build a container image tagged for the Vercel Container Registry by shelling out to your container tool (docker, podman, or buildah)",arguments:[{name:"engine",required:!0},{name:"path",required:!1},{name:"name",required:!1}],options:[projectScopeOption,platformOption,pushOption],examples:[{name:"Build the current directory into the linked project (repository defaults to the project name, tag to latest)",value:`${packageName} vcr build docker`},{name:"Build and push in one step (Docker Buildx enables zstd compression)",value:`${packageName} vcr build docker --push`},{name:"Build a specific context path with a repository and tag",value:`${packageName} vcr build docker ./app my-api:1.2.3`},{name:"Pass extra flags through to the container tool",value:`${packageName} vcr build docker . -- --no-cache --build-arg KEY=value`}]},pushSubcommand={name:"push",aliases:[],description:"Push a container image to the Vercel Container Registry by shelling out to your container tool (docker, podman, or buildah)",arguments:[{name:"engine",required:!0},{name:"name",required:!1}],options:[projectScopeOption],examples:[{name:"Push the linked project image (repository defaults to the project name, tag to latest)",value:`${packageName} vcr push docker`},{name:"Push a specific repository and tag",value:`${packageName} vcr push docker my-api:1.2.3`}]},vcrCommand={name:"vcr",aliases:[],description:"Manage Vercel Container Registry repositories and images (see `vcr image`).",arguments:[],subcommands:[listSubcommand,inspectSubcommand,addSubcommand,configSubcommand,removeSubcommand,loginSubcommand,buildSubcommand,pushSubcommand,tagsAggregateCommand,imageAggregateCommand,permissionsAggregateCommand],options:[],examples:[{name:"List repositories in the linked project",value:`${packageName} vcr ls`},{name:"Create a repository",value:`${packageName} vcr add my-app`},{name:"List images in a repository",value:`${packageName} vcr image ls my-app`}]};export{listSubcommand,inspectSubcommand,addSubcommand,configSubcommand,removeSubcommand,loginSubcommand,buildSubcommand,pushSubcommand,vcrCommand};
|
|
@@ -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{printProjectNotFoundError}from"./chunk-GR3DLKYP.js";import{detectExplicitScope}from"./chunk-32QBGZ2Z.js";import{getLinkedProject}from"./chunk-64NJHVA3.js";import{omitGlobalFlagsFromArgs}from"./chunk-BX5KDMLT.js";function getInvokingCommandFromArgv(argv){let args=omitGlobalFlagsFromArgs(argv.slice(2)),positionals=[];for(let arg of args){if(arg.startsWith("-"))break;positionals.push(arg)}return positionals.join(" ")}async function resolveProjectContext({client,cwd=client.cwd,projectNameOrId,commandName="",projectNotFoundHandling="report"}){let context=await getLinkedProject(client,{cwd,projectName:projectNameOrId,projectNameIsExplicit:!!projectNameOrId,scopeIsExplicit:detectExplicitScope(client)});return context.status==="not_linked"&&projectNameOrId&&projectNotFoundHandling==="report"?(await printProjectNotFoundError(client,projectNameOrId,commandName||getInvokingCommandFromArgv(client.argv),context.orgId),{status:"error",exitCode:1,orgId:context.orgId}):context}export{resolveProjectContext};
|
|
@@ -1,9 +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{MISSING_BOTH_MESSAGE}from"./chunk-X4X5RB2V.js";import{RULE_ENVIRONMENTS}from"./chunk-IVWPQYIH.js";import{resolveProjectContext}from"./chunk-66RYR2GI.js";import{AGENT_REASON,AGENT_STATUS}from"./chunk-EQP3SW72.js";import{detectExplicitScope}from"./chunk-32QBGZ2Z.js";import{printError}from"./chunk-TBBU37TD.js";import{outputAgentError}from"./chunk-BX5KDMLT.js";import{isAPIError}from"./chunk-LKI6FRNM.js";import{output_manager_default}from"./chunk-EWWFNMPZ.js";function messageFor(err){return isAPIError(err)?err.serverMessage||err.message:err instanceof Error?err.message:String(err)}function handleTracingApiError(client,err){if(client.nonInteractive){let status=isAPIError(err)?err.status:void 0;outputAgentError(client,{status:AGENT_STATUS.ERROR,reason:status===403?AGENT_REASON.PERMISSION_DENIED:status===404?AGENT_REASON.NOT_FOUND:AGENT_REASON.API_ERROR,message:messageFor(err)})}return isAPIError(err)&&err.status===403?(output_manager_default.error(messageFor(err)),1):(printError(err),1)}function configError(client,reason,message){return client.nonInteractive&&outputAgentError(client,{status:AGENT_STATUS.ERROR,reason,message}),output_manager_default.error(message),1}function invalidArguments(client,message){return configError(client,AGENT_REASON.INVALID_ARGUMENTS,message)}function ruleNotFound(client,message){return configError(client,AGENT_REASON.NOT_FOUND,message)}function confirmationRequired(client,message,next){return outputAgentError(client,{status:AGENT_STATUS.ERROR,reason:AGENT_REASON.CONFIRMATION_REQUIRED,message,userActionRequired:!0,next}),output_manager_default.error(message),1}function writeConfigJson(client,{project,bare,envelope,message,next}){if(!client.nonInteractive){client.stdout.write(`${JSON.stringify(bare,null,2)}
|
|
8
|
-
`);return}client.stdout.write(`${JSON.stringify({status:AGENT_STATUS.OK,projectId:project.id,projectName:project.name,...envelope,message,next},null,2)}
|
|
9
|
-
`)}var RULE_LIMIT=10,MIN_SAMPLE_RATE=1,MAX_SAMPLE_RATE=100;function isRuleEnvironment(value){return RULE_ENVIRONMENTS.includes(value)}var ENVIRONMENT_ERROR=`\`environment\` must be one of: ${RULE_ENVIRONMENTS.join(", ")}.`,RATE_ERROR=`\`rate\` must be a whole number from ${MIN_SAMPLE_RATE} to ${MAX_SAMPLE_RATE}.`,EMPTY_PATH_ERROR="`requestPath` cannot be empty.";function parseSampleRate(value){if(!/^\d+$/.test(value.trim()))return;let rate=Number(value);return rate>=MIN_SAMPLE_RATE&&rate<=MAX_SAMPLE_RATE?rate:void 0}function toRow(rule){return{environment:rule.env??"any",requestPath:rule.requestPath??null,sampleRate:Math.round(rule.rate*100)}}function toApiRate(sampleRate){return sampleRate/100}function toRule(row){return{rate:toApiRate(row.sampleRate),...row.environment==="any"?{}:{env:row.environment},...row.requestPath===null?{}:{requestPath:row.requestPath}}}var ALL_PATHS_LABEL="(all paths)";function formatPath(requestPath){return requestPath??ALL_PATHS_LABEL}function formatRate(sampleRate){return`${sampleRate}%`}function formatRuleTarget(environment,requestPath){return`${environment} ${formatPath(requestPath)}`}function formatRuleLine(row){return`${formatRuleTarget(row.environment,row.requestPath)} ${formatRate(row.sampleRate)}`}var COMMAND_WORD_COUNT=3;function subcommandArguments(positional){return positional.slice(COMMAND_WORD_COUNT)}function hasSameKey(a,b){return a.environment===b.environment&&a.requestPath===b.requestPath}async function readProjectTracing({client,teamId,projectId}){let project=await client.fetch(`/v9/projects/${encodeURIComponent(projectId)}`,{accountId:teamId}),tracing=project.tracing??null;return{project,tracing,entries:(tracing?.samplingRules??[]).map(rule=>({rule,row:toRow(rule)}))}}async function writeSamplingRules({client,teamId,projectId,tracing,rules}){let body={tracing:{...tracing??{},samplingRules:rules}};await client.fetch(`/v9/projects/${encodeURIComponent(projectId)}`,{accountId:teamId,method:"PATCH",body})}async function resolveConfigScope(client,flags){let link=await resolveProjectContext({client,projectNameOrId:flags.project});return link.status==="error"?{exitCode:link.exitCode}:link.status==="not_linked"?(output_manager_default.error(MISSING_BOTH_MESSAGE),{exitCode:1}):flags.project===void 0&&detectExplicitScope(client)&&link.org.id!==client.config.currentTeam?(output_manager_default.error(`The linked project ${link.project.name} belongs to ${link.org.slug||link.org.id}, which is not the scope that was passed. Pass --project <name> to act on a project in that scope.`),{exitCode:1}):{teamId:link.org.id,projectId:link.project.id}}export{handleTracingApiError,invalidArguments,ruleNotFound,confirmationRequired,writeConfigJson,RULE_LIMIT,isRuleEnvironment,ENVIRONMENT_ERROR,RATE_ERROR,EMPTY_PATH_ERROR,parseSampleRate,toApiRate,toRule,formatPath,formatRate,formatRuleTarget,formatRuleLine,subcommandArguments,hasSameKey,readProjectTracing,writeSamplingRules,resolveConfigScope};
|
|
@@ -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_format}from"./chunk-WRILLB46.js";import{require_ms}from"./chunk-QTKJC2O5.js";import{require_source}from"./chunk-U7KCDTCH.js";import{__toESM}from"./chunk-6L236MNA.js";var import_ms=__toESM(require_ms(),1),import_chalk=__toESM(require_source(),1),import_format=__toESM(require_format(),1);function formatDate(dateStrOrNumber){if(!dateStrOrNumber)return import_chalk.default.gray("-");let date=new Date(dateStrOrNumber),diff=date.getTime()-Date.now();return diff<0?`${(0,import_format.default)(date,"DD MMMM YYYY HH:mm:ss")} ${import_chalk.default.gray(`[${(0,import_ms.default)(-diff)} ago]`)}`:`${(0,import_format.default)(date,"DD MMMM YYYY HH:mm:ss")} ${import_chalk.default.gray(`[in ${(0,import_ms.default)(diff)}]`)}`}function formatDateWithoutTime(dateStrOrNumber){if(!dateStrOrNumber)return import_chalk.default.gray("-");let date=new Date(dateStrOrNumber),diff=date.getTime()-Date.now();return diff<0?`${(0,import_format.default)(date,"MMM DD YYYY")} ${import_chalk.default.gray(`[${(0,import_ms.default)(-diff)} ago]`)}`:`${(0,import_format.default)(date,"MMM DD YYYY")} ${import_chalk.default.gray(`[in ${(0,import_ms.default)(diff)}]`)}`}export{formatDate,formatDateWithoutTime};
|