vercel 62.4.0 → 62.7.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 +2 -0
- package/dist/chunks/{add-XZMJUVCZ.js → add-OXHI3PVM.js} +1 -1
- package/dist/chunks/{add-K6P7R3M4.js → add-P3FNSVMN.js} +1 -1
- package/dist/chunks/{add-E6SM6YUU.js → add-WUT6QU2J.js} +1 -1
- package/dist/chunks/{build-ORM2P3M7.js → build-J6VW3KHT.js} +1 -1
- package/dist/chunks/{chunk-3YAQUAOG.js → chunk-2KSNNB4B.js} +1 -1
- package/dist/chunks/{chunk-54SEEVOA.js → chunk-35QK5NDD.js} +1 -1
- package/dist/chunks/{chunk-LOD56FYJ.js → chunk-3XLK5ZPD.js} +5 -5
- package/dist/chunks/{chunk-TNJVIC27.js → chunk-3ZMD36SU.js} +1 -1
- package/dist/chunks/{chunk-GV6XYKYC.js → chunk-46UCIIJN.js} +1 -1
- package/dist/chunks/chunk-4CACOKMS.js +7 -0
- package/dist/chunks/chunk-4H5LPD3T.js +9 -0
- package/dist/chunks/{chunk-SDGWKUST.js → chunk-4KQBTIMZ.js} +1 -1
- package/dist/chunks/{chunk-YMM3VY3J.js → chunk-4QSVBLAS.js} +1 -1
- package/dist/chunks/{chunk-Z4VR6CQ2.js → chunk-5AXNGQJC.js} +1 -1
- package/dist/chunks/{chunk-ROOWZCAB.js → chunk-5IPBCD7K.js} +1 -1
- package/dist/chunks/{chunk-KQM2AGUS.js → chunk-5JN3FWV2.js} +1 -1
- package/dist/chunks/{chunk-HNF6WZ5S.js → chunk-5M45EBVX.js} +2 -2
- package/dist/chunks/{chunk-UZ2DSUM6.js → chunk-5ZQF5WIO.js} +1 -1
- package/dist/chunks/{chunk-G7AD7DRG.js → chunk-6C4RPAG7.js} +1 -1
- package/dist/chunks/{chunk-SANUW37I.js → chunk-6DJ6PMEK.js} +2 -2
- package/dist/chunks/chunk-6EW4BCMR.js +9 -0
- package/dist/chunks/chunk-774D3BGN.js +7 -0
- package/dist/chunks/chunk-7SNMU7U7.js +7 -0
- package/dist/chunks/{chunk-HWWHR7H3.js → chunk-A73N3QKT.js} +1 -1
- package/dist/chunks/{chunk-GTZDB7IL.js → chunk-AEEEEOYS.js} +1 -1
- package/dist/chunks/chunk-APSIFBD4.js +7 -0
- package/dist/chunks/{chunk-R3B67TKQ.js → chunk-B2L2QTXT.js} +1 -1
- package/dist/chunks/{chunk-UDVWL4I4.js → chunk-BHBNTQRT.js} +1 -1
- package/dist/chunks/{chunk-B4VX6C2E.js → chunk-CF2PIWRO.js} +1 -1
- package/dist/chunks/{chunk-VUCFX2G4.js → chunk-CR2ZQBDU.js} +1 -1
- package/dist/chunks/{chunk-ETYHCI6U.js → chunk-CRITS7IX.js} +1 -1
- package/dist/chunks/{chunk-3P7HVGKM.js → chunk-DGH5CD6D.js} +1 -1
- package/dist/chunks/chunk-DZZFEAM6.js +7 -0
- package/dist/chunks/{chunk-MJRZSYU2.js → chunk-ECMWDZTJ.js} +4 -4
- package/dist/chunks/{chunk-WT73KR4Y.js → chunk-EDDOQXEI.js} +1 -1
- package/dist/chunks/{chunk-UV4HOEHC.js → chunk-EQ24OC5G.js} +1 -1
- package/dist/chunks/{chunk-57NFMJ6O.js → chunk-FAJB3JV5.js} +1 -1
- package/dist/chunks/chunk-FB3U3RAM.js +9 -0
- package/dist/chunks/{chunk-DQ2KI6FO.js → chunk-FEEG5UU2.js} +1 -1
- package/dist/chunks/{chunk-PP36OP55.js → chunk-FQJCWZ4C.js} +1 -1
- package/dist/chunks/chunk-GMTLVRN7.js +8 -0
- package/dist/chunks/{chunk-DJC2LX46.js → chunk-GUTZ45DE.js} +1 -1
- package/dist/chunks/{chunk-7NEJJJH6.js → chunk-H3QRCTIJ.js} +1 -1
- package/dist/chunks/{chunk-RDC4BJSR.js → chunk-I5JR7PIO.js} +1 -1
- package/dist/chunks/{chunk-TNERVI3E.js → chunk-IEKUTNKT.js} +1 -1
- package/dist/chunks/{chunk-XQVD5V3T.js → chunk-JNLWD6DK.js} +1 -1
- package/dist/chunks/{chunk-VGXFOQ4P.js → chunk-K2RQEX7N.js} +1 -1
- package/dist/chunks/{chunk-QFVAARN7.js → chunk-KXMVFT2K.js} +1 -1
- package/dist/chunks/{chunk-SL5SJUAH.js → chunk-LCH3SUJ7.js} +1 -1
- package/dist/chunks/{chunk-TQ5ETS24.js → chunk-LWQVT6YW.js} +1 -1
- package/dist/chunks/chunk-LXNMVWYO.js +9 -0
- package/dist/chunks/{chunk-PTUZ7ATN.js → chunk-LYKPLTZ7.js} +1 -1
- package/dist/chunks/chunk-M3HO5CTQ.js +7 -0
- package/dist/chunks/{chunk-IHXHZBHR.js → chunk-M4IVLSNQ.js} +1 -1
- package/dist/chunks/{chunk-3HO365U7.js → chunk-M4IWOZEG.js} +1 -1
- package/dist/chunks/{chunk-6BZCSVH6.js → chunk-M5NWE7EO.js} +1 -1
- package/dist/chunks/{chunk-MCCL762Q.js → chunk-MCBO6LL7.js} +2 -2
- package/dist/chunks/{chunk-I46LFJJG.js → chunk-MIG67KZ2.js} +1 -1
- package/dist/chunks/{chunk-JEYKXG6O.js → chunk-MOLEXKVC.js} +1 -1
- package/dist/chunks/{chunk-RINZXCDJ.js → chunk-NM67DIPQ.js} +1 -1
- package/dist/chunks/{chunk-V6MR45PD.js → chunk-NNP5NITU.js} +1 -1
- package/dist/chunks/{chunk-7W3B5AJR.js → chunk-NYFB3EYC.js} +1 -1
- package/dist/chunks/chunk-O3UY73UQ.js +7 -0
- package/dist/chunks/chunk-O5A7CNRV.js +7 -0
- package/dist/chunks/chunk-ONPJXQQ6.js +10 -0
- package/dist/chunks/{chunk-LW3HJWXW.js → chunk-OQVE2WXX.js} +1 -1
- package/dist/chunks/chunk-ORJGSUQT.js +9 -0
- package/dist/chunks/{chunk-SM5JI6QM.js → chunk-PE7QZUY7.js} +1 -1
- package/dist/chunks/{chunk-EWWFNMPZ.js → chunk-Q2YQSMIB.js} +8 -6
- package/dist/chunks/{chunk-J4YZKLVO.js → chunk-Q7AYTXUR.js} +2 -2
- package/dist/chunks/{chunk-IIKYA7SM.js → chunk-QZ2G3AMY.js} +1 -1
- package/dist/chunks/{chunk-FSHYI4ZE.js → chunk-RMZJP32R.js} +1 -1
- package/dist/chunks/{chunk-7OBZ2AM6.js → chunk-RSLPLRVK.js} +1 -1
- package/dist/chunks/{chunk-OL3BQESW.js → chunk-RYMRVMGD.js} +3 -3
- package/dist/chunks/{chunk-MB4RN7BI.js → chunk-S54ISKGR.js} +1 -1
- package/dist/chunks/{chunk-QLJ72TJJ.js → chunk-SMC4MGY5.js} +1 -1
- package/dist/chunks/{chunk-72DVIZTW.js → chunk-SR5XEF7L.js} +1 -1
- package/dist/chunks/{chunk-LQBC5QPO.js → chunk-TAT5WGDZ.js} +1 -1
- package/dist/chunks/chunk-THB7KY2N.js +7 -0
- package/dist/chunks/{chunk-XQQGQ55A.js → chunk-UKMRJIIZ.js} +1 -1
- package/dist/chunks/{chunk-MKY5IBKK.js → chunk-UKVEXM5O.js} +1 -1
- package/dist/chunks/{chunk-5G3VXZB4.js → chunk-ULHETT7U.js} +1 -1
- package/dist/chunks/{chunk-JI2BTGLU.js → chunk-UOZHC2ZG.js} +1 -1
- package/dist/chunks/chunk-V426AGVC.js +9 -0
- package/dist/chunks/{chunk-EWW4GCZY.js → chunk-V6Y6UK6B.js} +2 -4
- package/dist/chunks/{chunk-WGPFU3NA.js → chunk-VWBJWUYQ.js} +1 -1
- package/dist/chunks/{chunk-TKBORMUF.js → chunk-WKZ6JSGZ.js} +1 -1
- package/dist/chunks/{chunk-GNJPIPBF.js → chunk-WNTA7DCC.js} +1 -1
- package/dist/chunks/chunk-WOTPEBSH.js +11 -0
- package/dist/chunks/{chunk-HTZPGIVL.js → chunk-XQQ7DTQG.js} +1 -1
- package/dist/chunks/{chunk-C5KVTG2O.js → chunk-YEWZFZ2O.js} +1 -1
- package/dist/chunks/{chunk-YAJFAGUO.js → chunk-YGMOJBSP.js} +2 -2
- package/dist/chunks/{chunk-3GUBYJN6.js → chunk-YKOIVWZI.js} +1 -1
- package/dist/chunks/{chunk-BIFJ5QEB.js → chunk-YTIANIL7.js} +1 -1
- package/dist/chunks/chunk-YUDKK2QJ.js +7 -0
- package/dist/chunks/chunk-YW5R6XQI.js +7 -0
- package/dist/chunks/{chunk-6NPXWN5F.js → chunk-YZBYL3SH.js} +1 -1
- package/dist/chunks/{chunk-7X34JCBW.js → chunk-ZN37NQM4.js} +1 -1
- package/dist/chunks/{chunk-6RNZA3VS.js → chunk-ZNQI6M3S.js} +1 -1
- package/dist/chunks/{chunk-ZXEYTD3W.js → chunk-ZTUQEA2X.js} +1 -1
- package/dist/chunks/{clear-IWIBH2TY.js → clear-VMJVLPVR.js} +1 -1
- package/dist/chunks/{compile-vercel-config-B2ZES5JB.js → compile-vercel-config-YCLXPL5H.js} +1 -1
- package/dist/chunks/{config-5GNX5VM2.js → config-JPX6NJMJ.js} +1 -1
- package/dist/chunks/{config-BLTCR2NA.js → config-YMUUPO3R.js} +1 -1
- package/dist/chunks/config-validator.mjs +1 -1
- package/dist/chunks/{connect-git-provider-VYU65KTS.js → connect-git-provider-KLSBCSD2.js} +1 -1
- package/dist/chunks/{constants-NCE2LWSS.js → constants-G4UYVLOF.js} +1 -1
- package/dist/chunks/{delete-TN2UUEOF.js → delete-E7J4B5E5.js} +1 -1
- package/dist/chunks/{delete-DSDSQVG7.js → delete-EEY7M6XT.js} +1 -1
- package/dist/chunks/{detect-services-VQWDU5RR.js → detect-services-E2TWAKQS.js} +1 -1
- package/dist/chunks/{disable-76QRXL7J.js → disable-5TKY6JK2.js} +1 -1
- package/dist/chunks/{discard-CWXRCRFL.js → discard-ALSOF66H.js} +1 -1
- package/dist/chunks/{edit-LYZPKUZY.js → edit-2M3KEE3H.js} +1 -1
- package/dist/chunks/{edit-KC6AK6DA.js → edit-ISUCMYNW.js} +1 -1
- package/dist/chunks/{enable-ZVEULDXQ.js → enable-2QTTTYQD.js} +1 -1
- package/dist/chunks/{exec-3RMS2X6B.js → exec-XIQJ2A3J.js} +1 -1
- package/dist/chunks/{export-SYT5NHSM.js → export-PV2NDS7C.js} +1 -1
- package/dist/chunks/{future-YNSZJIAG.js → future-SQS5POAL.js} +1 -1
- package/dist/chunks/{generate-cert-for-deploy-G26VGC4I.js → generate-cert-for-deploy-4EJRA7MS.js} +1 -1
- package/dist/chunks/{image-XAJFJ6UD.js → image-6GL2UOA2.js} +1 -1
- package/dist/chunks/import-builders-KAZMYQCR.js +7 -0
- package/dist/chunks/{inspect-HIRGIJON.js → inspect-3HGROSZO.js} +1 -1
- package/dist/chunks/{inspect-A76MME2I.js → inspect-FK6GC5JZ.js} +1 -1
- package/dist/chunks/{inspect-DF35I6AZ.js → inspect-LZMU7RIU.js} +1 -1
- package/dist/chunks/{inspect-JEHOMETA.js → inspect-ORVORGUM.js} +1 -1
- package/dist/chunks/{inspect-7CODV4HJ.js → inspect-UNL54246.js} +1 -1
- package/dist/chunks/{list-XNNJCS5K.js → list-EWJI2WSQ.js} +1 -1
- package/dist/chunks/{list-3KNHQV4S.js → list-FVUIZPC7.js} +1 -1
- package/dist/chunks/{list-M2YCP5HV.js → list-WOUJM4WR.js} +1 -1
- package/dist/chunks/login-IJLY5XTT.js +7 -0
- package/dist/chunks/{login-UM35IU3S.js → login-JREQ7SLY.js} +1 -1
- package/dist/chunks/logs-Z7IMGFO2.js +7 -0
- package/dist/chunks/{ls-M2SGUIZK.js → ls-4COX4SMJ.js} +1 -1
- package/dist/chunks/{ls-KGYG3F3A.js → ls-6CD2OQGA.js} +1 -1
- package/dist/chunks/ls-6DOYSBQM.js +8 -0
- package/dist/chunks/{ls-ISILCAV4.js → ls-AHT2FRGM.js} +1 -1
- package/dist/chunks/{ls-YJEUWZFT.js → ls-LXBUE4LZ.js} +1 -1
- package/dist/chunks/{ls-Z2JKBJKR.js → ls-RBWPVJ5G.js} +1 -1
- package/dist/chunks/{ls-Y3CBOCK2.js → ls-W5SJUIHD.js} +1 -1
- package/dist/chunks/{mutate-ZCA7FKDL.js → mutate-TVUHBRBK.js} +1 -1
- package/dist/chunks/{notifications-7QROHXJQ.js → notifications-OXOSD6UK.js} +1 -1
- package/dist/chunks/{open-FU7OJPAY.js → open-SWPHB54M.js} +1 -1
- package/dist/chunks/{openapi-KGCZ7LB4.js → openapi-32XHDVJL.js} +1 -1
- package/dist/chunks/{permissions-I4ZXPUVY.js → permissions-A4WMGETJ.js} +1 -1
- package/dist/chunks/{prompt-missing-credentials-YPLDAGZA.js → prompt-missing-credentials-6IXO6VND.js} +1 -1
- package/dist/chunks/{publish-6WBGPES3.js → publish-2CS4RYJW.js} +1 -1
- package/dist/chunks/pull-WWUH4M5V.js +7 -0
- package/dist/chunks/purchase-domain-if-available-TAXCYIV7.js +7 -0
- package/dist/chunks/{push-ZRDFCF3D.js → push-OPRW7M4I.js} +1 -1
- package/dist/chunks/{query-RXONIAT5.js → query-22PGP7BC.js} +1 -1
- package/dist/chunks/{reauthenticate-7RZ2XFR4.js → reauthenticate-LMR25CIE.js} +1 -1
- package/dist/chunks/{reorder-P5LWY3FS.js → reorder-Y3NMEA2S.js} +1 -1
- package/dist/chunks/{reply-QNIIC2TP.js → reply-YEZHST2Q.js} +1 -1
- package/dist/chunks/{resolve-RQBKN4WL.js → resolve-QC37E2EB.js} +1 -1
- package/dist/chunks/{restore-NPY7XA3A.js → restore-RMQVGYQB.js} +1 -1
- package/dist/chunks/rm-42U6SPVV.js +8 -0
- package/dist/chunks/{rm-5LVIH5IE.js → rm-43MPIHP3.js} +1 -1
- package/dist/chunks/{rm-4PBTYQBF.js → rm-4MSUYUEP.js} +1 -1
- package/dist/chunks/{rm-XOE3T2QM.js → rm-DPHE34CD.js} +1 -1
- package/dist/chunks/{rm-K3V6KVHW.js → rm-JHWXYHJY.js} +1 -1
- package/dist/chunks/{routes-FOCZWOGO.js → routes-2GTCE542.js} +1 -1
- package/dist/chunks/{rule-inspect-6UI5XBGA.js → rule-inspect-7LIPL5YY.js} +1 -1
- package/dist/chunks/{rules-MJWNYYRT.js → rules-6KWBVUF2.js} +1 -1
- package/dist/chunks/{schema-SOV2XP24.js → schema-OUFU5V7Z.js} +1 -1
- package/dist/chunks/{schema-ABJKQ6AB.js → schema-S2DE7S5N.js} +1 -1
- package/dist/chunks/{select-org-G4KFHFH3.js → select-org-EL66MG67.js} +1 -1
- package/dist/chunks/set-VXSNREF4.js +7 -0
- package/dist/chunks/setup-and-link-I7SGZNGO.js +7 -0
- package/dist/chunks/{tags-DY5IM5QF.js → tags-AGLQDT3Z.js} +1 -1
- package/dist/chunks/{types-RHUVE4FN.js → types-GQNKYZJH.js} +1 -1
- package/dist/chunks/{update-6WSCOLSB.js → update-TI3YRVQT.js} +1 -1
- package/dist/chunks/{vlt-builder-graph-B4DFIUS6.js → vlt-builder-graph-S4YJ5UTQ.js} +1 -1
- package/dist/chunks/vlt-builder-importer-2ITR3DMQ.js +11 -0
- package/dist/commands/build/index.js +7 -7
- package/dist/commands/deploy/index.js +44 -28
- package/dist/commands/dev/index.js +8 -8
- package/dist/commands/env/index.js +1 -1
- package/dist/commands/link/index.js +1 -1
- package/dist/commands/list/index.js +1 -1
- package/dist/commands-bulk.js +419 -406
- package/dist/index.js +7 -8
- package/dist/internal-build-worker.js +4 -4
- package/dist/internal-build.js +11 -0
- package/dist/root-help-commands.mjs +1 -1
- package/dist/vc.js +24 -9
- package/dist/version.mjs +1 -1
- package/package.json +56 -55
- package/dist/chunks/chunk-2KCAQTPM.js +0 -9
- package/dist/chunks/chunk-AUIBCIET.js +0 -7
- package/dist/chunks/chunk-CJPM2DXZ.js +0 -7
- package/dist/chunks/chunk-DBDWXNAR.js +0 -7
- package/dist/chunks/chunk-E4M34FSN.js +0 -9
- package/dist/chunks/chunk-EZU5U2PZ.js +0 -7
- package/dist/chunks/chunk-J7JW6BBJ.js +0 -9
- package/dist/chunks/chunk-L37LRUIN.js +0 -7
- package/dist/chunks/chunk-LKYVY3SY.js +0 -7
- package/dist/chunks/chunk-OY2H4NBN.js +0 -8
- package/dist/chunks/chunk-QYGA4IKR.js +0 -7
- package/dist/chunks/chunk-TATIUO4V.js +0 -11
- package/dist/chunks/chunk-VX7JFH7Q.js +0 -7
- package/dist/chunks/chunk-WQLEYC3T.js +0 -9
- package/dist/chunks/chunk-WVUD3JPC.js +0 -10
- package/dist/chunks/chunk-XP4C5FLG.js +0 -7
- package/dist/chunks/import-builders-JXIILQOI.js +0 -7
- package/dist/chunks/login-2GVRFOQQ.js +0 -7
- package/dist/chunks/logs-HS5YRXDR.js +0 -7
- package/dist/chunks/ls-WROXB2SF.js +0 -8
- package/dist/chunks/pull-BJUOPX3J.js +0 -7
- package/dist/chunks/purchase-domain-if-available-7KTEXJFK.js +0 -7
- package/dist/chunks/rm-GGY4TGSX.js +0 -8
- package/dist/chunks/set-DJO2C6XG.js +0 -7
- package/dist/chunks/setup-and-link-BZCJ74II.js +0 -7
- package/dist/chunks/vlt-builder-importer-W63QEXYX.js +0 -11
|
@@ -4,4 +4,4 @@ import { dirname as __dirname_ } from 'node:path';
|
|
|
4
4
|
const require = __createRequire(import.meta.url);
|
|
5
5
|
const __filename = __fileURLToPath(import.meta.url);
|
|
6
6
|
const __dirname = __dirname_(__filename);
|
|
7
|
-
import{allOption,confirmOption,formatOption,jsonOption,limitOption,nextOption,yesOption}from"./chunk-
|
|
7
|
+
import{allOption,confirmOption,formatOption,jsonOption,limitOption,nextOption,yesOption}from"./chunk-5IPBCD7K.js";import{packageName}from"./chunk-FI772UVH.js";var listCommand={name:"list",aliases:["ls"],description:"List deployments.",arguments:[{name:"app",required:!1}],options:[allOption,{name:"meta",description:"Filter deployments by metadata (e.g.: `-m KEY=value`). Can appear many times.",argument:"KEY=VALUE",shorthand:"m",type:[String],deprecated:!1},{name:"policy",description:"See deployments with provided Deployment Retention policies (e.g.: `-p KEY=value`). Can appear many times.",argument:"KEY=VALUE",shorthand:"p",type:[String],deprecated:!1},{name:"environment",description:"",argument:"TARGET",shorthand:null,type:String,deprecated:!1},{name:"status",description:"Filter deployments by their status. Can be comma-separated for multiple statuses (e.g.: `--status BUILDING,READY`)",argument:"STATUS",shorthand:"s",type:String,deprecated:!1},nextOption,limitOption,{name:"prod",shorthand:null,type:Boolean,deprecated:!1},yesOption,confirmOption,formatOption,jsonOption],examples:[{name:"List all deployments for the currently linked project",value:`${packageName} list`},{name:"List all deployments across all projects",value:`${packageName} list --all`},{name:"List all deployments for the project `my-app`",value:`${packageName} list my-app`},{name:"Filter deployments by metadata",value:`${packageName} list -m key1=value1 -m key2=value2`},{name:"Paginate deployments for a project, where `1584722256178` is the time in milliseconds since the UNIX epoch",value:`${packageName} list my-app --next 1584722256178`},{name:"Filter deployments by status",value:`${packageName} list --status READY`},{name:"Filter deployments by multiple statuses",value:`${packageName} list --status BUILDING,ERROR`}]};export{listCommand};
|
|
@@ -4,5 +4,5 @@ import { dirname as __dirname_ } from 'node:path';
|
|
|
4
4
|
const require = __createRequire(import.meta.url);
|
|
5
5
|
const __filename = __fileURLToPath(import.meta.url);
|
|
6
6
|
const __dirname = __dirname_(__filename);
|
|
7
|
-
import{output_manager_default}from"./chunk-
|
|
7
|
+
import{output_manager_default}from"./chunk-Q2YQSMIB.js";import{require_source}from"./chunk-U7KCDTCH.js";import{__toESM}from"./chunk-6L236MNA.js";var import_chalk=__toESM(require_source(),1);var FID_METRIC_ID="vercel.speed_insights.fid_ms",FID_DEPRECATION_WARNING="First Input Delay will be sunset on November 1st. Use Interaction to Next Paint instead (vercel.speed_insights.inp_ms). Learn more: https://web.dev/articles/fid";function warnIfFidMetric(metric){metric===FID_METRIC_ID&&output_manager_default.print(`${import_chalk.default.yellow("!")} ${FID_DEPRECATION_WARNING}
|
|
8
8
|
`)}export{warnIfFidMetric};
|
|
@@ -4,7 +4,7 @@ import { dirname as __dirname_ } from 'node:path';
|
|
|
4
4
|
const require = __createRequire(import.meta.url);
|
|
5
5
|
const __filename = __fileURLToPath(import.meta.url);
|
|
6
6
|
const __dirname = __dirname_(__filename);
|
|
7
|
-
import{
|
|
7
|
+
import{AGENT_REASON,AGENT_STATUS,buildCommandWithGlobalFlags,outputAgentError,shouldEmitNonInteractiveCommandError}from"./chunk-ONPJXQQ6.js";import{getScope}from"./chunk-THB7KY2N.js";import{getOrgById}from"./chunk-3XLK5ZPD.js";import{output_manager_default}from"./chunk-Q2YQSMIB.js";async function printProjectNotFoundError(client,projectNameOrId,commandName,orgId){let contextName;try{orgId?contextName=(await getOrgById(client,orgId))?.slug??orgId:contextName=(await getScope(client)).contextName}catch(err){contextName=orgId,output_manager_default.debug(`Scope lookup failed during error reporting: ${err}`)}let scopeClause=contextName?` (${contextName})`:"",headline=`Project "${projectNameOrId}" was not found in the current scope${scopeClause}.`;if(output_manager_default.error(`${headline}
|
|
8
8
|
|
|
9
9
|
If it lives in a different team or account:
|
|
10
10
|
\u2022 Retry with \`--scope <team-slug|your-username>\`, or
|
|
@@ -4,5 +4,5 @@ import { dirname as __dirname_ } from 'node:path';
|
|
|
4
4
|
const require = __createRequire(import.meta.url);
|
|
5
5
|
const __filename = __fileURLToPath(import.meta.url);
|
|
6
6
|
const __dirname = __dirname_(__filename);
|
|
7
|
-
import{login}from"./chunk-
|
|
7
|
+
import{login}from"./chunk-FQJCWZ4C.js";import{loginCommand}from"./chunk-JKTQV2QJ.js";import{help}from"./chunk-NYFB3EYC.js";import{printError}from"./chunk-LXNMVWYO.js";import{TelemetryClient}from"./chunk-MCBO6LL7.js";import{parseArguments}from"./chunk-LYKPLTZ7.js";import{getFlagsSpecification}from"./chunk-5IPBCD7K.js";import{output_manager_default}from"./chunk-Q2YQSMIB.js";import{require_source}from"./chunk-U7KCDTCH.js";import{__toESM}from"./chunk-6L236MNA.js";var import_chalk=__toESM(require_source(),1);var LoginTelemetryClient=class extends TelemetryClient{trackState(...args){this.trackLoginState(...args)}};async function login2(client,options){let parsedArgs=null,flagsSpecification=getFlagsSpecification(loginCommand.options),telemetry=new LoginTelemetryClient({opts:{store:client.telemetryEventStore}});try{options.shouldParseArgs&&(parsedArgs=parseArguments(client.argv.slice(2),flagsSpecification))}catch(error){return printError(error),2}if(parsedArgs?.flags["--help"])return telemetry.trackCliFlagHelp("login"),output_manager_default.print(help(loginCommand,{columns:client.stderr.columns})),0;if(parsedArgs?.flags["--token"])return output_manager_default.error('`--token` may not be used with the "login" command'),2;if(options.shouldParseArgs&&parsedArgs){let obsoleteFlags=Object.keys(parsedArgs.flags).filter(flag=>{let flagKey=flag.replace("--",""),option=loginCommand.options.find(o=>o.name===flagKey);if(!(!option||typeof option=="number"))return"deprecated"in option&&option.deprecated});if(obsoleteFlags.length){let flags=obsoleteFlags.map(f=>import_chalk.default.bold(f)).join(", ");output_manager_default.warn(`The following flags are deprecated: ${flags}`)}let obsoleteArguments=parsedArgs.args.slice(1);if(obsoleteArguments.length){let args=obsoleteArguments.map(a=>import_chalk.default.bold(a)).join(", ");output_manager_default.warn(`The following arguments are deprecated: ${args}`)}(obsoleteArguments.length||obsoleteFlags.length)&&output_manager_default.print(`Read more in our ${output_manager_default.link("changelog","https://vercel.com/changelog/new-vercel-cli-login-flow")}.
|
|
8
8
|
`)}return telemetry.trackState("started"),await login(client,telemetry,options.shouldParseArgs)}export{login2 as login};
|
|
@@ -4,4 +4,4 @@ import { dirname as __dirname_ } from 'node:path';
|
|
|
4
4
|
const require = __createRequire(import.meta.url);
|
|
5
5
|
const __filename = __fileURLToPath(import.meta.url);
|
|
6
6
|
const __dirname = __dirname_(__filename);
|
|
7
|
-
import{require_dist}from"./chunk-
|
|
7
|
+
import{require_dist}from"./chunk-MCBO6LL7.js";import{forceOption,formatOption,jsonOption,projectOption,yesOption}from"./chunk-5IPBCD7K.js";import{packageName,require_lib}from"./chunk-FI772UVH.js";import{__toESM}from"./chunk-6L236MNA.js";var import_constants=__toESM(require_dist(),1),import_title=__toESM(require_lib(),1),envTargetChoices=import_constants.PROJECT_ENV_TARGET.map(t=>({name:(0,import_title.default)(t),value:t}));function isValidEnvTarget(target){return typeof target>"u"||envTargetChoices.map(c=>c.value).includes(target)}function getEnvTargetPlaceholder(){return`<${envTargetChoices.map(c=>c.value).join(" | ")}>`}function parseEnvTargetArg(arg){return Array.from(new Set(arg.split(",").map(t=>t.trim()).filter(Boolean)))}var targetPlaceholder=getEnvTargetPlaceholder(),listSubcommand={name:"list",aliases:["ls"],description:"List all Environment Variables for a Project",arguments:[{name:"environment",required:!1},{name:"git-branch",required:!1}],options:[{...formatOption,description:"Specify the output format (json, including readable Environment Variable values)"},{...jsonOption,description:"Output as JSON, including readable Environment Variable values"},projectOption,{name:"guidance",description:"Receive command suggestions once command is complete",shorthand:null,type:Boolean,deprecated:!1}],examples:[]},addSubcommand={name:"add",aliases:[],description:"Add an Environment Variable",arguments:[{name:"name",required:!0},{name:"environment",required:!1}],options:[projectOption,{name:"git-branch",description:"Set the Git branch for a Preview Environment Variable",shorthand:null,type:String,argument:"NAME",deprecated:!1},{name:"sensitive",description:"Store the value as a Secret",shorthand:null,type:Boolean,deprecated:!1},{name:"no-sensitive",description:"Store the value as Config",shorthand:null,type:Boolean,deprecated:!1},{name:"type",description:"Set the Environment Variable type (`config` or `secret`)",shorthand:null,type:String,argument:"TYPE",deprecated:!1},{name:"visibility",description:"Deprecated alias for `--type`",shorthand:null,type:String,argument:"VISIBILITY",deprecated:!0},{...forceOption,description:"Overwrite an existing variable for the same target",shorthand:null},{...yesOption,description:"Accept default choices when adding an Environment Variable"},{name:"guidance",description:"Show command suggestions after completion",shorthand:null,type:Boolean,deprecated:!1},{name:"value",description:"Set the variable value for non-interactive use; otherwise use stdin or the prompt",shorthand:null,type:String,argument:"VALUE",deprecated:!1}],examples:[{name:"Add a new variable (prompts for value and Environments)",value:[`${packageName} env add <name>`,`${packageName} env add API_TOKEN`]},{name:"Add a new Environment Variable to a specific Environment",value:[`${packageName} env add <name> ${targetPlaceholder}`,`${packageName} env add DB_PASS production`]},{name:"Add one variable to multiple Environments (comma-separated)",value:[`${packageName} env add <name> <environment>[,<environment>]`,`${packageName} env add API_URL production,preview,development`]},{name:"Override an existing Environment Variable of same target (production, preview, deployment)",value:`${packageName} env add API_TOKEN --force`},{name:"Add a Config Environment Variable that remains readable later",value:`${packageName} env add API_TOKEN --no-sensitive`},{name:"Add a new Environment Variable for a specific Environment and Git Branch",value:[`${packageName} env add <name> ${targetPlaceholder} --git-branch <name>`,`${packageName} env add DB_PASS preview --git-branch feat1`]},{name:"Add a new Environment Variable from stdin",value:[`cat <file> | ${packageName} env add <name> ${targetPlaceholder}`,`cat ~/.npmrc | ${packageName} env add NPM_RC preview`,`${packageName} env add API_URL production < url.txt`]},{name:"Add with --value for non-interactive use",value:`${packageName} env add API_TOKEN production --value "<value>" --yes`}]},removeSubcommand={name:"remove",aliases:["rm"],description:"Remove an Environment Variable (see examples below)",arguments:[{name:"name",required:!0},{name:"environment",required:!1}],options:[projectOption,{...yesOption,description:"Skip the confirmation prompt when removing an Environment Variable"}],examples:[{name:"Remove a variable from multiple Environments",value:[`${packageName} env remove <name>`,`${packageName} env remove API_TOKEN`]},{name:"Remove a variable from a specific Environment",value:[`${packageName} env remove <name> ${targetPlaceholder}`,`${packageName} env remove NPM_RC preview`]},{name:"Remove a variable from a specific Environment and Git Branch",value:[`${packageName} env remove <name> ${targetPlaceholder} <gitbranch>`,`${packageName} env remove NPM_RC preview feat1`]}]},pullSubcommand={name:"pull",aliases:[],description:"Pull Environment Variables into a local file (default: .env.local)",arguments:[{name:"filename",required:!1}],options:[projectOption,{name:"environment",description:"Select the environment to pull (default: development)",shorthand:null,type:String,argument:"TARGET",deprecated:!1},{name:"git-branch",description:"Specify the Git branch to pull specific Environment Variables for",shorthand:null,type:String,argument:"NAME",deprecated:!1},{name:"id",description:"Pull Environment Variables for a specific deployment (e.g. dpl_xxx)",shorthand:null,type:String,argument:"ID",deprecated:!1},{...yesOption,description:"Skip the confirmation prompt when overwriting an existing file"}],examples:[{name:"Pull Development Environment Variables into a custom file (check .gitignore)",value:[`${packageName} env pull <file>`,`${packageName} env pull .env.development.local`]},{name:"Pull Environment Variables for a specific deployment",value:`${packageName} env pull --id dpl_xxx`}]},runSubcommand={name:"run",aliases:[],description:"Run a command with environment variables from the linked Vercel project",arguments:[{name:"command",required:!0,multiple:!0}],options:[projectOption,{name:"environment",description:"Specify the environment to pull variables from (default: development)",shorthand:"e",type:String,argument:"TARGET",deprecated:!1},{name:"git-branch",description:"Specify the Git branch to pull specific Environment Variables for",shorthand:null,type:String,argument:"NAME",deprecated:!1}],examples:[{name:"Run Next.js dev server with development environment variables",value:`${packageName} env run -- next dev`},{name:"Run tests with preview environment variables for a specific branch",value:`${packageName} env run -e preview --git-branch feature-x -- npm test`}]},updateSubcommand={name:"update",aliases:[],description:"Update the value of an existing Environment Variable (see examples below)",arguments:[{name:"name",required:!0},{name:"environment",required:!1}],options:[projectOption,{name:"sensitive",description:"Store the updated value as a Secret",shorthand:null,type:Boolean,deprecated:!1},{name:"type",description:"Set the Environment Variable type (`config` or `secret`)",shorthand:null,type:String,argument:"TYPE",deprecated:!1},{name:"visibility",description:"Deprecated alias for `--type`",shorthand:null,type:String,argument:"VISIBILITY",deprecated:!0},{...yesOption,description:"Skip the confirmation prompt when updating an Environment Variable"},{name:"value",description:"New value for the variable (non-interactive). Otherwise use stdin or you will be prompted.",shorthand:null,type:String,argument:"VALUE",deprecated:!1}],examples:[{name:"Update a variable in all Environments",value:[`${packageName} env update <name>`,`${packageName} env update API_TOKEN`]},{name:"Update a variable in a specific Environment",value:[`${packageName} env update <name> ${targetPlaceholder}`,`${packageName} env update DB_PASS production`]},{name:"Update a variable for a specific Environment and Git Branch",value:[`${packageName} env update <name> ${targetPlaceholder} <gitbranch>`,`${packageName} env update NPM_RC preview feat1`]},{name:"Update a variable from stdin",value:[`cat <file> | ${packageName} env update <name> ${targetPlaceholder}`,`cat ~/.npmrc | ${packageName} env update NPM_RC preview`,`${packageName} env update API_URL production < url.txt`]}]},envCommand={name:"env",aliases:[],description:"Interact with Environment Variables for a Project",arguments:[],subcommands:[addSubcommand,listSubcommand,pullSubcommand,removeSubcommand,runSubcommand,updateSubcommand],options:[],examples:[{name:"Run a command with Environment Variables from the linked Project",value:`${packageName} env run -- <command>`},{name:"Add one variable to multiple Environments",value:`${packageName} env add API_URL production,preview,development`}]};export{envTargetChoices,isValidEnvTarget,getEnvTargetPlaceholder,parseEnvTargetArg,listSubcommand,addSubcommand,removeSubcommand,pullSubcommand,runSubcommand,updateSubcommand,envCommand};
|
|
@@ -0,0 +1,9 @@
|
|
|
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{getErrorRecovery,shouldEmitNonInteractiveCommandError,trackAgentError,writeAgentError}from"./chunk-ONPJXQQ6.js";import{buildCorrectedCommand,isArgumentError}from"./chunk-LYKPLTZ7.js";import{parseRetryAfterHeaderAsMillis,require_bytes}from"./chunk-NM67DIPQ.js";import{getCommandName}from"./chunk-FI772UVH.js";import{cliErrorFromUnknown,output_manager_default,recordCliError}from"./chunk-Q2YQSMIB.js";import{pkg_default}from"./chunk-AVSPFBLM.js";import{require_source}from"./chunk-U7KCDTCH.js";import{__toESM}from"./chunk-6L236MNA.js";var import_chalk=__toESM(require_source(),1);var import_bytes=__toESM(require_bytes(),1);async function responseError(res,fallbackMessage=null,parsedBody={}){let message="",bodyError;if(res.status>=400&&res.status<500){let body;try{body=await res.json()}catch{body=parsedBody}bodyError=body.error||body.err||{},message=bodyError.message}message||(message=fallbackMessage===null?"Response Error":fallbackMessage);let err=new Error(`${message} (${res.status})`);if(err.status=res.status,err.serverMessage=message,bodyError)for(let field of Object.keys(bodyError))field!=="message"&&(err[field]=bodyError[field]);if(res.status===429||res.status===503){let parsed=parseRetryAfterHeaderAsMillis(res.headers.get("Retry-After"));err.retryAfterMs=parsed??(res.status===429?0:void 0)}return err}var MAX_SERIALIZED_ERROR_DEPTH=5;function isPlainObject(value){let proto=Object.getPrototypeOf(value);return proto===null||proto===Object.prototype}function toJsonSafe(value,ancestors,depth){if(typeof value=="bigint")return value.toString();if(!(typeof value=="function"||typeof value=="symbol")){if(value===null||typeof value!="object")return value;if(ancestors.has(value))return"[Circular]";if(depth>=MAX_SERIALIZED_ERROR_DEPTH)return"[Truncated]";if(value instanceof Error)return serializeError(value,ancestors,depth+1);if(!Array.isArray(value)&&!isPlainObject(value))return`[${value.constructor?.name||"Object"}]`;ancestors.add(value);try{if(Array.isArray(value))return value.map(item=>toJsonSafe(item,ancestors,depth+1));let copy={};for(let[key,child]of Object.entries(value))copy[key]=toJsonSafe(child,ancestors,depth+1);return copy}finally{ancestors.delete(value)}}}function serializeError(err,ancestors,depth){ancestors.add(err);try{let enumerable={name:err.name};for(let key of Object.getOwnPropertyNames(err))enumerable[key]=toJsonSafe(err[key],ancestors,depth);return enumerable}finally{ancestors.delete(err)}}function toEnumerableError(err){return err===null||typeof err!="object"?{name:"Error",message:String(err)}:serializeError(err,new WeakSet,0)}function printError(error2,client){typeof error2=="string"&&(error2=new Error(error2)),recordCliError(cliErrorFromUnknown(error2));let apiError=error2,{message,stack,status,code,sizeLimit}=apiError,argumentError=isArgumentError(error2)?error2:void 0,suggestion=argumentError?.suggestedOption&&argumentError.invalidOption,correction=suggestion&&client&&argumentError?buildCorrectedCommand(client.argv,argumentError.invalidOption,argumentError.suggestedOption,argumentError.flagsSpecification):void 0,recovery=getErrorRecovery(apiError,client),reason=status===403?"forbidden":status===402?"payment_required":status===401?"not_authorized":status===429?"rate_limited":argumentError?"invalid_arguments":"api_error",hint=argumentError?.allowedOptions?`Vercel CLI ${pkg_default.version} accepts: ${argumentError.allowedOptions.join(", ")}.${suggestion?` Did you mean ${argumentError.suggestedOption}?`:""}`:recovery.hint;if(client&&(status||argumentError?.allowedOptions)){let payload={...recovery,status:"error",reason,message:apiError.serverMessage||message,hint,...argumentError?.allowedOptions&&{allowedOptions:argumentError.allowedOptions,suggestedOption:argumentError.suggestedOption,cliVersion:pkg_default.version},...correction&&{next:[{command:correction,when:correction.includes("<")?"Replace placeholders with the intended values, then run the corrected command":"Run the corrected command"}]}};if(shouldEmitNonInteractiveCommandError(client)){output_manager_default.stopSpinner(),writeAgentError(client,payload);return}trackAgentError(client,payload)}if(hint){output_manager_default.stopSpinner(),output_manager_default.fatal(apiError.serverMessage||message||"The request failed."),output_manager_default.print(` ${hint}
|
|
8
|
+
`),correction&&output_manager_default.print(` ${correction}
|
|
9
|
+
`);return}output_manager_default.debug(`handling error: ${stack}`),message!=="User force closed the prompt with 0 null"&&(status===403?output_manager_default.error(message||`Authentication error. Run ${getCommandName("login")} to log-in again.`):status===429?output_manager_default.error(message):code==="size_limit_exceeded"?output_manager_default.error(`File size limit exceeded (${(0,import_bytes.default)(sizeLimit)})`):message?output_manager_default.prettyError(apiError):status===500?output_manager_default.error("Unexpected server error. Please retry."):code==="USER_ABORT"?output_manager_default.log("Canceled"):output_manager_default.error(`Unexpected error. Please try again later. (${message})`))}export{responseError,toEnumerableError,printError};
|
|
@@ -4,4 +4,4 @@ import { dirname as __dirname_ } from 'node:path';
|
|
|
4
4
|
const require = __createRequire(import.meta.url);
|
|
5
5
|
const __filename = __fileURLToPath(import.meta.url);
|
|
6
6
|
const __dirname = __dirname_(__filename);
|
|
7
|
-
import{quoteArg}from"./chunk-BKV35LVB.js";import{arg_common_default,stripSensitiveAuthArgs}from"./chunk-
|
|
7
|
+
import{quoteArg}from"./chunk-BKV35LVB.js";import{arg_common_default,stripSensitiveAuthArgs}from"./chunk-5IPBCD7K.js";import{packageName}from"./chunk-FI772UVH.js";import{__commonJS,__toESM}from"./chunk-6L236MNA.js";var require_arg=__commonJS({"../../node_modules/.pnpm/arg@5.0.0/node_modules/arg/index.js"(exports,module){var flagSymbol=Symbol("arg flag"),ArgError=class _ArgError extends Error{constructor(msg,code){super(msg),this.name="ArgError",this.code=code,Object.setPrototypeOf(this,_ArgError.prototype)}};function arg2(opts,{argv=process.argv.slice(2),permissive=!1,stopAtPositional=!1}={}){if(!opts)throw new ArgError("argument specification object is required","ARG_CONFIG_NO_SPEC");let result={_:[]},aliases={},handlers={};for(let key of Object.keys(opts)){if(!key)throw new ArgError("argument key cannot be an empty string","ARG_CONFIG_EMPTY_KEY");if(key[0]!=="-")throw new ArgError(`argument key must start with '-' but found: '${key}'`,"ARG_CONFIG_NONOPT_KEY");if(key.length===1)throw new ArgError(`argument key must have a name; singular '-' keys are not allowed: ${key}`,"ARG_CONFIG_NONAME_KEY");if(typeof opts[key]=="string"){aliases[key]=opts[key];continue}let type=opts[key],isFlag=!1;if(Array.isArray(type)&&type.length===1&&typeof type[0]=="function"){let[fn]=type;type=(value,name,prev=[])=>(prev.push(fn(value,name,prev[prev.length-1])),prev),isFlag=fn===Boolean||fn[flagSymbol]===!0}else if(typeof type=="function")isFlag=type===Boolean||type[flagSymbol]===!0;else throw new ArgError(`type missing or not a function or valid array type: ${key}`,"ARG_CONFIG_VAD_TYPE");if(key[1]!=="-"&&key.length>2)throw new ArgError(`short argument keys (with a single hyphen) must have only one character: ${key}`,"ARG_CONFIG_SHORTOPT_TOOLONG");handlers[key]=[type,isFlag]}for(let i=0,len=argv.length;i<len;i++){let wholeArg=argv[i];if(stopAtPositional&&result._.length>0){result._=result._.concat(argv.slice(i));break}if(wholeArg==="--"){result._=result._.concat(argv.slice(i+1));break}if(wholeArg.length>1&&wholeArg[0]==="-"){let separatedArguments=wholeArg[1]==="-"||wholeArg.length===2?[wholeArg]:wholeArg.slice(1).split("").map(a=>`-${a}`);for(let j=0;j<separatedArguments.length;j++){let arg3=separatedArguments[j],[originalArgName,argStr]=arg3[1]==="-"?arg3.split(/=(.*)/,2):[arg3,void 0],argName=originalArgName;for(;argName in aliases;)argName=aliases[argName];if(!(argName in handlers))if(permissive){result._.push(arg3);continue}else throw new ArgError(`unknown or unexpected option: ${originalArgName}`,"ARG_UNKNOWN_OPTION");let[type,isFlag]=handlers[argName];if(!isFlag&&j+1<separatedArguments.length)throw new ArgError(`option requires argument (but was followed by another short argument): ${originalArgName}`,"ARG_MISSING_REQUIRED_SHORTARG");if(isFlag)result[argName]=type(!0,argName,result[argName]);else if(argStr===void 0){if(argv.length<i+2||argv[i+1].length>1&&argv[i+1][0]==="-"&&!(argv[i+1].match(/^-?\d*(\.(?=\d))?\d*$/)&&(type===Number||typeof BigInt<"u"&&type===BigInt))){let extended=originalArgName===argName?"":` (alias for ${argName})`;throw new ArgError(`option requires argument: ${originalArgName}${extended}`,"ARG_MISSING_REQUIRED_LONGARG")}result[argName]=type(argv[i+1],argName,result[argName]),++i}else result[argName]=type(argStr,argName,result[argName])}}else result._.push(wholeArg)}return result}arg2.flag=fn=>(fn[flagSymbol]=!0,fn);arg2.COUNT=arg2.flag((v,name,existingCount)=>(existingCount||0)+1);arg2.ArgError=ArgError;module.exports=arg2}});var import_arg=__toESM(require_arg(),1);function suggestCorrection(input,choices){if(input.replace(/^-+/,"").length<3||choices.includes(input))return;let matches=[...new Set(choices)].filter(choice=>{if(Math.abs(input.length-choice.length)>1)return!1;let i=0;for(;i<input.length&&input[i]===choice[i];)i++;return input.length===choice.length?input.slice(i+1)===choice.slice(i+1)||input[i]===choice[i+1]&&input[i+1]===choice[i]&&input.slice(i+2)===choice.slice(i+2):input.length>choice.length?input.slice(i+1)===choice.slice(i):input.slice(i)===choice.slice(i+1)});return matches.length===1?matches[0]:void 0}var SAFE_VALUE_FLAGS=new Set(["--cwd","--scope","--team","-S","-T","--project","-p","--format","--environment","--since","--until","--limit"]),READ_COMMANDS=new Set(["inspect","list","ls","schema","whoami"]);function buildCorrectedCommand(argv,from,to,flagsSpecification={}){let corrected=argv.slice(2),spec={...arg_common_default(),...flagsSpecification},valuelessFlags=new Set,takesValue=new Set;for(let[name,value]of Object.entries(spec))((typeof value=="string"?spec[value]:value)===Boolean?valuelessFlags:takesValue).add(name);for(let i=0;i<corrected.length;i++){let value=corrected[i];if(value==="--")break;if(value===from||value.startsWith(`${from}=`)){corrected[i]=to+value.slice(from.length);break}takesValue.has(value)&&i++}let args=stripSensitiveAuthArgs(corrected).filter(arg2=>!/^-t[^-=]/.test(arg2)),out=[],positionals=0,readCommand=!1;for(let i=0;i<args.length;i++){let value=args[i];if(value==="--"){out.push("--","<argument>");break}if(value.startsWith("-")){if(/^-[A-Za-z][^=].+/.test(value)&&!value.startsWith("--")){let name2=value.slice(0,2);out.push(name2,SAFE_VALUE_FLAGS.has(name2)?value.slice(2):"<value>");continue}let equals=value.indexOf("="),name=equals<0?value:value.slice(0,equals);equals>=0?out.push(`${name}=${SAFE_VALUE_FLAGS.has(name)||valuelessFlags.has(name)&&/^(true|false)$/.test(value.slice(equals+1))?value.slice(equals+1):"<value>"}`):(out.push(name),!valuelessFlags.has(name)&&i+1<args.length&&(takesValue.has(name)||!args[i+1].startsWith("-"))&&(i++,out.push(SAFE_VALUE_FLAGS.has(name)?args[i]:"<value>")))}else positionals++,positionals<=2&&(readCommand||=READ_COMMANDS.has(value)),out.push(positionals<=2||readCommand?value:"<argument>")}return[packageName,...out].map(quoteArg).join(" ")}var argumentErrors=new WeakSet;function isArgumentError(error){return error instanceof Error&&argumentErrors.has(error)}function parseWithSuggestions(args,spec,options){try{return(0,import_arg.default)(spec,{...options,argv:args})}catch(error){if(error instanceof Error&&"code"in error&&["ARG_UNKNOWN_OPTION","ARG_MISSING_REQUIRED_LONGARG","ARG_MISSING_REQUIRED_SHORTARG"].includes(String(error.code))){let err=error,option=/(?:unknown or unexpected option|option requires argument(?: \([^)]*\))?): (--?[A-Za-z0-9-]+)(?: \(alias for --?[A-Za-z0-9-]+\))?$/.exec(err.message)?.[1];option&&(argumentErrors.add(err),err.invalidOption=option,err.allowedOptions=Object.keys(spec).filter(name=>name.startsWith("--")).sort(),err.code==="ARG_UNKNOWN_OPTION"&&(err.suggestedOption=suggestCorrection(option,err.allowedOptions)),err.flagsSpecification=spec)}throw error}}function getArgs(argv,argsOptions,argOptions={}){return parseWithSuggestions(argv,Object.assign({},arg_common_default(),argsOptions),argOptions)}function parseArguments(args,flagsSpecification,parserOptions={}){let{_:positional,...rest}=parseWithSuggestions(args,Object.assign({},arg_common_default(),flagsSpecification),parserOptions);return{args:positional,flags:rest}}export{require_arg,suggestCorrection,buildCorrectedCommand,isArgumentError,getArgs,parseArguments};
|
|
@@ -0,0 +1,7 @@
|
|
|
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-KXMVFT2K.js";import{performDeviceCodeFlow}from"./chunk-FQJCWZ4C.js";import{param}from"./chunk-SXUEGVWB.js";import{buildCommandWithYes,outputActionRequired}from"./chunk-ONPJXQQ6.js";import{detectExplicitScope}from"./chunk-THB7KY2N.js";import{getLinkedProject,resolveProjectCwd}from"./chunk-3XLK5ZPD.js";import{isAPIError}from"./chunk-NM67DIPQ.js";import{getCommandName,getCommandNamePlain}from"./chunk-FI772UVH.js";import{output_manager_default}from"./chunk-Q2YQSMIB.js";import{URLSearchParams}from"url";var RECOVERABLE_CHALLENGE_CODES=new Set(["challenge_required","challenge_required_email_otp","user_auth_required"]);async function withEnvChallengeRecovery(client,fn){let hadStoredSession=!!(client.authConfig.token||client.authConfig.refreshToken);try{return await fn()}catch(error){if(!isAPIError(error))throw error;let isRecoverableChallenge=RECOVERABLE_CHALLENGE_CODES.has(error.code),isRejectedStoredSession=hadStoredSession&&error.invalidToken===!0;if(!isRecoverableChallenge&&!isRejectedStoredSession||client.authConfig.tokenSource||!client.stdin.isTTY||client.nonInteractive)throw error;output_manager_default.stopSpinner(),output_manager_default.log("Sensitive Environment Variables require fresh authentication.");let refreshToken=client.authConfig.refreshToken,acrValues=getAcrValuesFromWWWAuthenticate(error.wwwAuthenticate),tokens=isRecoverableChallenge&&refreshToken&&acrValues?await performDeviceCodeFlow(client,{refreshToken,acrValues,fallbackToLoginOnStepUpFailure:!0}):await performDeviceCodeFlow(client);if(!tokens)throw error;return client.updateAuthConfig({token:tokens.access_token,userId:void 0,expiresAt:Math.floor(Date.now()/1e3)+tokens.expires_in,refreshToken:tokens.refresh_token}),client.persistAuthConfig(),await fn()}}function getAcrValuesFromWWWAuthenticate(header){if(!header)return;let bearerIndex=header.toLowerCase().indexOf("bearer");if(bearerIndex===-1)return;let match=header.slice(bearerIndex+6).match(/(?:^|[,\s])acr_values=(?:"((?:\\.|[^"\\])*)"|([^,\s]+))/i);return match?.[1]?.replace(/\\(.)/g,"$1")??match?.[2]}async function getEnvRecords(client,projectId,source,{target,gitBranch,decrypt}={}){output_manager_default.debug(`Fetching Environment Variables of project ${projectId} and target ${target}`);let query=new URLSearchParams;if(target){let targetParam="target";target!=="production"&&target!=="preview"&&target!=="development"&&(targetParam="customEnvironmentId"),query.set(targetParam,target)}gitBranch&&query.set("gitBranch",gitBranch),decrypt&&query.set("decrypt",decrypt.toString()),source&&query.set("source",source);let url=`/v10/projects/${projectId}/env?${query}`;return withEnvChallengeRecovery(client,()=>client.fetch(url))}async function pullEnvRecords(client,projectIdOrDeploymentId,source,{target,gitBranch}={}){output_manager_default.debug(`Fetching Environment Variables of ${projectIdOrDeploymentId} and target ${target}`);let query=new URLSearchParams,url=`/v3/env/pull/${projectIdOrDeploymentId}`;return projectIdOrDeploymentId.startsWith("dpl_")||target&&(url+=`/${encodeURIComponent(target)}`,gitBranch&&(url+=`/${encodeURIComponent(gitBranch)}`)),source&&query.set("source",source),Array.from(query).length>0&&(url+=`?${query}`),withEnvChallengeRecovery(client,()=>client.fetch(url))}var parseEnv=env=>{if(!env)return{};if(typeof env=="string"&&(env=[env]),Array.isArray(env)){let startingDict={};return env.reduce((o,e)=>{let key,value,equalsSign=e.indexOf("=");return equalsSign===-1?key=e:(key=e.slice(0,equalsSign),value=e.slice(equalsSign+1)),o[key]=value,o},startingDict)}return env};async function ensureLink(commandName,client,cwd,opts={}){opts.singleFile||(cwd=await resolveProjectCwd(cwd));let link=opts.link,nonInteractive=opts.nonInteractive??client.nonInteractive??!1;if(opts.nonInteractive=nonInteractive,link||(opts.forceDelete?link={status:"not_linked",org:null,project:null}:link=await getLinkedProject(client,{cwd,projectName:opts.projectName,projectNameIsExplicit:!!(opts.projectName&&opts.failIfNotFound),scopeIsExplicit:detectExplicitScope(client),allowOwnerLookupFallback:opts.allowOwnerLookupFallback,skipOwnerLookup:opts.skipOwnerLookup,skipRemoteLookup:opts.skipRemoteLookup,skipProjectRootResolution:!!opts.singleFile}),opts.link=link),link.status==="linked"&&opts.forceDelete||link.status==="not_linked"){if(link.status==="not_linked"&&opts.failIfNotFound&&opts.projectName)return await printProjectNotFoundError(client,opts.projectName,commandName,link.orgId),1;if(link.status==="not_linked"&&opts.requireExistingLink)return output_manager_default.error(`Project is not linked. Run ${getCommandName("link")} first.`),1;let{default:setupAndLink}=await import("./setup-and-link-I7SGZNGO.js");if(link=await setupAndLink(client,cwd,opts),link.status==="not_linked")return 0}return link.status==="error"?(link.reason==="HEADLESS"&&(nonInteractive?outputActionRequired(client,{status:"action_required",reason:"confirmation_required",message:`Command ${getCommandNamePlain(commandName)} requires confirmation. Use option --yes to confirm.`,next:[{command:buildCommandWithYes(client.argv),when:"Confirm and run"}]},link.exitCode):output_manager_default.error(`Command ${getCommandName(commandName)} requires confirmation. Use option ${param("--yes")} to confirm.`)),nonInteractive&&process.exit(link.exitCode),link.exitCode):link}export{getEnvRecords,pullEnvRecords,parseEnv,ensureLink};
|
|
@@ -4,7 +4,7 @@ import { dirname as __dirname_ } from 'node:path';
|
|
|
4
4
|
const require = __createRequire(import.meta.url);
|
|
5
5
|
const __filename = __fileURLToPath(import.meta.url);
|
|
6
6
|
const __dirname = __dirname_(__filename);
|
|
7
|
-
import{require_format}from"./chunk-WRILLB46.js";import{events_default,require_jsonlines}from"./chunk-
|
|
7
|
+
import{require_format}from"./chunk-WRILLB46.js";import{events_default,require_jsonlines}from"./chunk-6EW4BCMR.js";import{CommandTimeout}from"./chunk-WOTPEBSH.js";import{require_strip_ansi}from"./chunk-OSCCYU74.js";import{require_ms}from"./chunk-QTKJC2O5.js";import{toNodeReadable}from"./chunk-MY4MONOH.js";import{output_manager_default}from"./chunk-Q2YQSMIB.js";import{require_source}from"./chunk-U7KCDTCH.js";import{__commonJS,__require,__toESM}from"./chunk-6L236MNA.js";var require_split2=__commonJS({"../../node_modules/.pnpm/split2@4.2.0/node_modules/split2/index.js"(exports,module){"use strict";var{Transform}=__require("stream"),{StringDecoder}=__require("string_decoder"),kLast=Symbol("last"),kDecoder=Symbol("decoder");function transform(chunk,enc,cb){let list;if(this.overflow){if(list=this[kDecoder].write(chunk).split(this.matcher),list.length===1)return cb();list.shift(),this.overflow=!1}else this[kLast]+=this[kDecoder].write(chunk),list=this[kLast].split(this.matcher);this[kLast]=list.pop();for(let i=0;i<list.length;i++)try{push(this,this.mapper(list[i]))}catch(error){return cb(error)}if(this.overflow=this[kLast].length>this.maxLength,this.overflow&&!this.skipOverflow){cb(new Error("maximum buffer reached"));return}cb()}function flush(cb){if(this[kLast]+=this[kDecoder].end(),this[kLast])try{push(this,this.mapper(this[kLast]))}catch(error){return cb(error)}cb()}function push(self,val){val!==void 0&&self.push(val)}function noop(incoming){return incoming}function split2(matcher,mapper,options){switch(matcher=matcher||/\r?\n/,mapper=mapper||noop,options=options||{},arguments.length){case 1:typeof matcher=="function"?(mapper=matcher,matcher=/\r?\n/):typeof matcher=="object"&&!(matcher instanceof RegExp)&&!matcher[Symbol.split]&&(options=matcher,matcher=/\r?\n/);break;case 2:typeof matcher=="function"?(options=mapper,mapper=matcher,matcher=/\r?\n/):typeof mapper=="object"&&(options=mapper,mapper=noop)}options=Object.assign({},options),options.autoDestroy=!0,options.transform=transform,options.flush=flush,options.readableObjectMode=!0;let stream=new Transform(options);return stream[kLast]="",stream[kDecoder]=new StringDecoder("utf8"),stream.matcher=matcher,stream.mapper=mapper,stream.maxLength=options.maxLength,stream.skipOverflow=options.skipOverflow||!1,stream.overflow=!1,stream._destroy=function(err,cb){this._writableState.errorEmitted=!1,cb(err)},stream}module.exports=split2}});var import_chalk=__toESM(require_source(),1),import_format=__toESM(require_format(),1),import_ms=__toESM(require_ms(),1),import_jsonlines=__toESM(require_jsonlines(),1),import_split2=__toESM(require_split2(),1);import{URLSearchParams}from"url";var import_strip_ansi=__toESM(require_strip_ansi(),1);function displayBuildLogs(client,deployment,follow=!0,onAliasAssigned){let abortController=new AbortController;return{promise:events_default(client,deployment.id,{mode:"logs",onEvent:event=>printBuildLog(event,output_manager_default.print),onAliasAssigned,quiet:!1,findOpts:{direction:"forward",follow}},abortController),abortController}}function collectBuildLogs(client,deployment,follow=!0){let logs=[],abortController=new AbortController;return{promise:events_default(client,deployment.id,{mode:"logs",onEvent:event=>{event.created&&logs.push(event)},quiet:!0,findOpts:{direction:"forward",follow}},abortController).then(()=>logs),abortController}}async function displayBuildLogsUntilFinalError(client,deployment,error){let abortController=new AbortController;return events_default(client,deployment.id,{mode:"logs",onEvent:event=>{printBuildLog(event,output_manager_default.print),event.level==="error"&&event.text?.includes(error)&&abortController.abort()},quiet:!1,findOpts:{direction:"forward",follow:!0}},abortController)}var runtimeLogSpinnerMessage="waiting for new logs...";async function displayRuntimeLogs(client,options,abortController){let{log,debug,print,spinner,stopSpinner,warn}=output_manager_default,{projectId,deploymentId,parse}=options,query=new URLSearchParams({format:"lines"}),url=`/v1/projects/${projectId}/deployments/${deploymentId}/runtime-logs?${query}`;spinner(runtimeLogSpinnerMessage);let timeout=setTimeout(()=>{abortController.abort(),warn(`${import_chalk.default.bold(`Command automatically interrupted after ${CommandTimeout}.`)}
|
|
8
8
|
`)},(0,import_ms.default)(CommandTimeout)),response=await client.fetch(url,{json:!1,signal:abortController.signal,retry:{retries:3,onRetry:err=>{if(log(`Runtime logs error: ${err.message}`),!(err instanceof Error&&err.name==="AbortError"))throw err}}});return new Promise((resolve,reject)=>{let readable=toNodeReadable(response.body),stream=readable.pipe(parse?import_jsonlines.default.parse():(0,import_split2.default)()),finished=!1,errored=!1;function finish(err){finished||(clearTimeout(timeout),stopSpinner(),finished=!0,err?reject(err):resolve(abortController.signal.aborted?1:0))}let handleData=data=>{let log2=parse?data:JSON.parse(data);if(stopSpinner(),isRuntimeLimitDelimiter(log2)){abortController.abort(),warn(`${import_chalk.default.bold(log2.message)}
|
|
9
9
|
`);return}parse?prettyPrintLogline(log2,print):printRawLogLine(data,client),spinner(runtimeLogSpinnerMessage)},handleError=err=>{if(!(finished||errored)){if(err.name==="AbortError"){finish();return}stream.destroy(),errored=!0,debug(`Runtime logs stream error: ${err.message??err}`),setTimeout(()=>{abortController.signal.aborted||displayRuntimeLogs(client,options,abortController).then(resolve,reject)},2e3)}};stream.on("end",finish),stream.on("data",handleData),stream.on("error",handleError),readable.on("error",handleError)})}function printBuildLog(log,print){if(!log.created)return;let date=new Date(log.created).toISOString(),cleanText=parseLogLines(log).join(`
|
|
10
10
|
`);for(let line of colorize(cleanText,log).split(`
|
|
@@ -4,4 +4,4 @@ import { dirname as __dirname_ } from 'node:path';
|
|
|
4
4
|
const require = __createRequire(import.meta.url);
|
|
5
5
|
const __filename = __fileURLToPath(import.meta.url);
|
|
6
6
|
const __dirname = __dirname_(__filename);
|
|
7
|
-
import{formatOption,jsonOption,limitOption,projectOption}from"./chunk-
|
|
7
|
+
import{formatOption,jsonOption,limitOption,projectOption}from"./chunk-5IPBCD7K.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"},TAGS_SORT_BY_CHOICES=["updatedAt","tag"],TAGS_SORT_ORDER_CHOICES=["asc","desc"],tagsLsSubcommand={name:"ls",aliases:["list"],description:"List a repository's tags",arguments:[{name:"repository",required:!0}],options:[projectScopeOption,{name:"sort-by",shorthand:null,type:String,deprecated:!1,description:"Field to sort tags by (default: updatedAt)",argument:"FIELD",choices:TAGS_SORT_BY_CHOICES},{name:"sort-order",shorthand:null,type:String,deprecated:!1,description:"Sort direction (default: desc)",argument:"ORDER",choices:TAGS_SORT_ORDER_CHOICES},limitOption,nextOption,cursorOption,formatOption,jsonOption],examples:[{name:"List a repository's tags",value:`${packageName} vcr tag ls my-app`}]},tagsInspectSubcommand={name:"inspect",aliases:["get"],description:"Show details for a single tag",arguments:[{name:"repository",required:!0},{name:"tag",required:!0}],options:[projectScopeOption,formatOption,jsonOption],examples:[{name:"Inspect a tag by name",value:`${packageName} vcr tag inspect my-app latest`}]},tagsAggregateCommand={name:"tag",aliases:["tags"],description:"List or inspect a repository's tags",arguments:[],subcommands:[tagsLsSubcommand,tagsInspectSubcommand],options:[],examples:[]};export{TAGS_SORT_BY_CHOICES,TAGS_SORT_ORDER_CHOICES,tagsLsSubcommand,tagsInspectSubcommand,tagsAggregateCommand};
|
|
@@ -4,4 +4,4 @@ import { dirname as __dirname_ } from 'node:path';
|
|
|
4
4
|
const require = __createRequire(import.meta.url);
|
|
5
5
|
const __filename = __fileURLToPath(import.meta.url);
|
|
6
6
|
const __dirname = __dirname_(__filename);
|
|
7
|
-
import{output_manager_default}from"./chunk-
|
|
7
|
+
import{output_manager_default}from"./chunk-Q2YQSMIB.js";import{require_source}from"./chunk-U7KCDTCH.js";import{__toESM}from"./chunk-6L236MNA.js";var import_chalk=__toESM(require_source(),1);function formatProject(orgSlug,projectSlug,options){let orgProjectSlug=`${orgSlug}/${projectSlug}`,projectUrl=`https://vercel.com/${orgProjectSlug}`;return output_manager_default.link(import_chalk.default.bold(orgProjectSlug),projectUrl,{fallback:()=>import_chalk.default.bold(orgProjectSlug),color:!1,...options})}var STANDARD_ENVIRONMENTS=["production","preview","development"];export{formatProject,STANDARD_ENVIRONMENTS};
|
|
@@ -4,10 +4,10 @@ import { dirname as __dirname_ } from 'node:path';
|
|
|
4
4
|
const require = __createRequire(import.meta.url);
|
|
5
5
|
const __filename = __fileURLToPath(import.meta.url);
|
|
6
6
|
const __dirname = __dirname_(__filename);
|
|
7
|
-
import{require_load_json_file,require_pify}from"./chunk-RCTYVKM5.js";import{isNativeBinaryInstall}from"./chunk-7T6TL3GQ.js";import{require_graceful_fs}from"./chunk-F2ZWW2IO.js";import{output_manager_default,require_build_utils,require_signal_exit}from"./chunk-EWWFNMPZ.js";import{__commonJS,__require,__toESM}from"./chunk-6L236MNA.js";var require_dist=__commonJS({"../../internals/constants/dist/index.js"(exports){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});exports.TITLE=exports.NAME=exports.LOGO=exports.PROJECT_ENV_TARGET=void 0;exports.PROJECT_ENV_TARGET=["production","preview","development"];exports.LOGO="\u25B2";exports.NAME="vercel";exports.TITLE="Vercel"}});var require_imurmurhash=__commonJS({"../../node_modules/.pnpm/imurmurhash@0.1.4/node_modules/imurmurhash/imurmurhash.js"(exports,module){(function(){var cache;function MurmurHash3(key,seed){var m=this instanceof MurmurHash3?this:cache;if(m.reset(seed),typeof key=="string"&&key.length>0&&m.hash(key),m!==this)return m}MurmurHash3.prototype.hash=function(key){var h1,k1,i,top,len;switch(len=key.length,this.len+=len,k1=this.k1,i=0,this.rem){case 0:k1^=len>i?key.charCodeAt(i++)&65535:0;case 1:k1^=len>i?(key.charCodeAt(i++)&65535)<<8:0;case 2:k1^=len>i?(key.charCodeAt(i++)&65535)<<16:0;case 3:k1^=len>i?(key.charCodeAt(i)&255)<<24:0,k1^=len>i?(key.charCodeAt(i++)&65280)>>8:0}if(this.rem=len+this.rem&3,len-=this.rem,len>0){for(h1=this.h1;k1=k1*11601+(k1&65535)*3432906752&4294967295,k1=k1<<15|k1>>>17,k1=k1*13715+(k1&65535)*461832192&4294967295,h1^=k1,h1=h1<<13|h1>>>19,h1=h1*5+3864292196&4294967295,!(i>=len);)k1=key.charCodeAt(i++)&65535^(key.charCodeAt(i++)&65535)<<8^(key.charCodeAt(i++)&65535)<<16,top=key.charCodeAt(i++),k1^=(top&255)<<24^(top&65280)>>8;switch(k1=0,this.rem){case 3:k1^=(key.charCodeAt(i+2)&65535)<<16;case 2:k1^=(key.charCodeAt(i+1)&65535)<<8;case 1:k1^=key.charCodeAt(i)&65535}this.h1=h1}return this.k1=k1,this},MurmurHash3.prototype.result=function(){var k1,h1;return k1=this.k1,h1=this.h1,k1>0&&(k1=k1*11601+(k1&65535)*3432906752&4294967295,k1=k1<<15|k1>>>17,k1=k1*13715+(k1&65535)*461832192&4294967295,h1^=k1),h1^=this.len,h1^=h1>>>16,h1=h1*51819+(h1&65535)*2246770688&4294967295,h1^=h1>>>13,h1=h1*44597+(h1&65535)*3266445312&4294967295,h1^=h1>>>16,h1>>>0},MurmurHash3.prototype.reset=function(seed){return this.h1=typeof seed=="number"?seed:0,this.rem=this.k1=this.len=0,this},cache=new MurmurHash3,typeof module<"u"?module.exports=MurmurHash3:this.MurmurHash3=MurmurHash3})()}});var require_write_file_atomic=__commonJS({"../../node_modules/.pnpm/write-file-atomic@2.4.3/node_modules/write-file-atomic/index.js"(exports,module){"use strict";module.exports=writeFile;module.exports.sync=writeFileSync2;module.exports._getTmpname=getTmpname;module.exports._cleanupOnExit=cleanupOnExit;var fs=require_graceful_fs(),MurmurHash3=require_imurmurhash(),onExit=require_signal_exit(),path=__require("path"),activeFiles={},threadId=function(){try{var workerThreads=__require("worker_threads");return workerThreads.threadId}catch{return 0}}(),invocations=0;function getTmpname(filename){return filename+"."+MurmurHash3(__filename).hash(String(process.pid)).hash(String(threadId)).hash(String(++invocations)).result()}function cleanupOnExit(tmpfile){return function(){try{fs.unlinkSync(typeof tmpfile=="function"?tmpfile():tmpfile)}catch{}}}function writeFile(filename,data,options,callback){options?options instanceof Function?(callback=options,options={}):typeof options=="string"&&(options={encoding:options}):options={};var Promise2=options.Promise||global.Promise,truename,fd,tmpfile,removeOnExitHandler=onExit(cleanupOnExit(()=>tmpfile)),absoluteName=path.resolve(filename);new Promise2(function(resolve){activeFiles[absoluteName]||(activeFiles[absoluteName]=[]),activeFiles[absoluteName].push(resolve),activeFiles[absoluteName].length===1&&resolve()}).then(function(){return new Promise2(function(resolve){fs.realpath(filename,function(_,realname){truename=realname||filename,tmpfile=getTmpname(truename),resolve()})})}).then(function(){return new Promise2(function(resolve){options.mode&&options.chown?resolve():fs.stat(truename,function(err,stats){err||!stats||(options=Object.assign({},options),options.mode==null&&(options.mode=stats.mode),options.chown==null&&process.getuid&&(options.chown={uid:stats.uid,gid:stats.gid})),resolve()})})}).then(function(){return new Promise2(function(resolve,reject){fs.open(tmpfile,"w",options.mode,function(err,_fd){fd=_fd,err?reject(err):resolve()})})}).then(function(){return new Promise2(function(resolve,reject){Buffer.isBuffer(data)?fs.write(fd,data,0,data.length,0,function(err){err?reject(err):resolve()}):data!=null?fs.write(fd,String(data),0,String(options.encoding||"utf8"),function(err){err?reject(err):resolve()}):resolve()})}).then(function(){return new Promise2(function(resolve,reject){options.fsync!==!1?fs.fsync(fd,function(err){err?fs.close(fd,()=>reject(err)):fs.close(fd,resolve)}):fs.close(fd,resolve)})}).then(function(){if(fd=null,options.chown)return new Promise2(function(resolve,reject){fs.chown(tmpfile,options.chown.uid,options.chown.gid,function(err){err?reject(err):resolve()})})}).then(function(){if(options.mode)return new Promise2(function(resolve,reject){fs.chmod(tmpfile,options.mode,function(err){err?reject(err):resolve()})})}).then(function(){return new Promise2(function(resolve,reject){fs.rename(tmpfile,truename,function(err){err?reject(err):resolve()})})}).then(function(){removeOnExitHandler(),callback()},function(err){return new Promise2(resolve=>fd?fs.close(fd,resolve):resolve()).then(()=>{removeOnExitHandler(),fs.unlink(tmpfile,function(){callback(err)})})}).then(function(){activeFiles[absoluteName].shift(),activeFiles[absoluteName].length>0?activeFiles[absoluteName][0]():delete activeFiles[absoluteName]})}function writeFileSync2(filename,data,options){typeof options=="string"?options={encoding:options}:options||(options={});try{filename=fs.realpathSync(filename)}catch{}var tmpfile=getTmpname(filename);if(!options.mode||!options.chown)try{var stats=fs.statSync(filename);options=Object.assign({},options),options.mode||(options.mode=stats.mode),!options.chown&&process.getuid&&(options.chown={uid:stats.uid,gid:stats.gid})}catch{}var fd,cleanup=cleanupOnExit(tmpfile),removeOnExitHandler=onExit(cleanup);try{fd=fs.openSync(tmpfile,"w",options.mode),Buffer.isBuffer(data)?fs.writeSync(fd,data,0,data.length,0):data!=null&&fs.writeSync(fd,String(data),0,String(options.encoding||"utf8")),options.fsync!==!1&&fs.fsyncSync(fd),fs.closeSync(fd),options.chown&&fs.chownSync(tmpfile,options.chown.uid,options.chown.gid),options.mode&&fs.chmodSync(tmpfile,options.mode),fs.renameSync(tmpfile,filename),removeOnExitHandler()}catch(err){if(fd)try{fs.closeSync(fd)}catch{}throw removeOnExitHandler(),cleanup(),err}}}});var require_is_plain_obj=__commonJS({"../../node_modules/.pnpm/is-plain-obj@1.1.0/node_modules/is-plain-obj/index.js"(exports,module){"use strict";var toString=Object.prototype.toString;module.exports=function(x){var prototype;return toString.call(x)==="[object Object]"&&(prototype=Object.getPrototypeOf(x),prototype===null||prototype===Object.getPrototypeOf({}))}}});var require_sort_keys=__commonJS({"../../node_modules/.pnpm/sort-keys@1.1.2/node_modules/sort-keys/index.js"(exports,module){"use strict";var isPlainObj=require_is_plain_obj();module.exports=function(obj,opts){if(!isPlainObj(obj))throw new TypeError("Expected a plain object");opts=opts||{},typeof opts=="function"&&(opts={compare:opts});var deep=opts.deep,seenInput=[],seenOutput=[],sortKeys=function(x){var seenIndex=seenInput.indexOf(x);if(seenIndex!==-1)return seenOutput[seenIndex];var ret={},keys=Object.keys(x).sort(opts.compare);seenInput.push(x),seenOutput.push(ret);for(var i=0;i<keys.length;i++){var key=keys[i],val=x[key];ret[key]=deep&&isPlainObj(val)?sortKeys(val):val}return ret};return sortKeys(obj)}}});var require_pify2=__commonJS({"../../node_modules/.pnpm/pify@3.0.0/node_modules/pify/index.js"(exports,module){"use strict";var processFn=(fn,opts)=>function(){let P=opts.promiseModule,args=new Array(arguments.length);for(let i=0;i<arguments.length;i++)args[i]=arguments[i];return new P((resolve,reject)=>{opts.errorFirst?args.push(function(err,result){if(opts.multiArgs){let results=new Array(arguments.length-1);for(let i=1;i<arguments.length;i++)results[i-1]=arguments[i];err?(results.unshift(err),reject(results)):resolve(results)}else err?reject(err):resolve(result)}):args.push(function(result){if(opts.multiArgs){let results=new Array(arguments.length-1);for(let i=0;i<arguments.length;i++)results[i]=arguments[i];resolve(results)}else resolve(result)}),fn.apply(this,args)})};module.exports=(obj,opts)=>{opts=Object.assign({exclude:[/.+(Sync|Stream)$/],errorFirst:!0,promiseModule:Promise},opts);let filter=key=>{let match=pattern=>typeof pattern=="string"?key===pattern:pattern.test(key);return opts.include?opts.include.some(match):!opts.exclude.some(match)},ret;typeof obj=="function"?ret=function(){return opts.excludeMain?obj.apply(this,arguments):processFn(obj,opts).apply(this,arguments)}:ret=Object.create(Object.getPrototypeOf(obj));for(let key in obj){let x=obj[key];ret[key]=typeof x=="function"&&filter(key)?processFn(x,opts):x}return ret}}});var require_make_dir=__commonJS({"../../node_modules/.pnpm/make-dir@1.3.0/node_modules/make-dir/index.js"(exports,module){"use strict";var fs=__require("fs"),path=__require("path"),pify=require_pify2(),defaults={mode:511&~process.umask(),fs},checkPath=pth=>{if(process.platform==="win32"&&/[<>:"|?*]/.test(pth.replace(path.parse(pth).root,""))){let err=new Error(`Path contains invalid characters: ${pth}`);throw err.code="EINVAL",err}};module.exports=(input,opts)=>Promise.resolve().then(()=>{checkPath(input),opts=Object.assign({},defaults,opts);let mkdir=pify(opts.fs.mkdir),stat=pify(opts.fs.stat),make=pth=>mkdir(pth,opts.mode).then(()=>pth).catch(err=>{if(err.code==="ENOENT"){if(err.message.includes("null bytes")||path.dirname(pth)===pth)throw err;return make(path.dirname(pth)).then(()=>make(pth))}return stat(pth).then(stats=>stats.isDirectory()?pth:Promise.reject()).catch(()=>{throw err})});return make(path.resolve(input))});module.exports.sync=(input,opts)=>{checkPath(input),opts=Object.assign({},defaults,opts);let make=pth=>{try{opts.fs.mkdirSync(pth,opts.mode)}catch(err){if(err.code==="ENOENT"){if(err.message.includes("null bytes")||path.dirname(pth)===pth)throw err;return make(path.dirname(pth)),make(pth)}try{if(!opts.fs.statSync(pth).isDirectory())throw new Error("The path is not a directory")}catch{throw err}}return pth};return make(path.resolve(input))}}});var require_detect_indent=__commonJS({"../../node_modules/.pnpm/detect-indent@5.0.0/node_modules/detect-indent/index.js"(exports,module){"use strict";var INDENT_RE=/^(?:( )+|\t+)/;function getMostUsed(indents){let result=0,maxUsed=0,maxWeight=0;for(let entry of indents){let key=entry[0],val=entry[1],u=val[0],w=val[1];(u>maxUsed||u===maxUsed&&w>maxWeight)&&(maxUsed=u,maxWeight=w,result=Number(key))}return result}module.exports=str=>{if(typeof str!="string")throw new TypeError("Expected a string");let tabs=0,spaces=0,prev=0,indents=new Map,current,isIndent;for(let line of str.split(/\n/g)){if(!line)continue;let indent2,matches=line.match(INDENT_RE);matches?(indent2=matches[0].length,matches[1]?spaces++:tabs++):indent2=0;let diff=indent2-prev;prev=indent2,diff?(isIndent=diff>0,current=indents.get(isIndent?diff:-diff),current?current[0]++:(current=[1,0],indents.set(diff,current))):current&&(current[1]+=Number(isIndent))}let amount=getMostUsed(indents),type,indent;return amount?spaces>=tabs?(type="space",indent=" ".repeat(amount)):(type="tab",indent=" ".repeat(amount)):(type=null,indent=""),{amount,type,indent}}}});var require_write_json_file=__commonJS({"../../node_modules/.pnpm/write-json-file@2.2.0/node_modules/write-json-file/index.js"(exports,module){"use strict";var path=__require("path"),fs=require_graceful_fs(),writeFileAtomic=require_write_file_atomic(),sortKeys=require_sort_keys(),makeDir=require_make_dir(),pify=require_pify(),detectIndent=require_detect_indent(),init=(fn,fp,data,opts)=>{if(!fp)throw new TypeError("Expected a filepath");if(data===void 0)throw new TypeError("Expected data to stringify");return opts=Object.assign({indent:" ",sortKeys:!1},opts),opts.sortKeys&&(data=sortKeys(data,{deep:!0,compare:typeof opts.sortKeys=="function"&&opts.sortKeys})),fn(fp,data,opts)},readFile=fp=>pify(fs.readFile)(fp,"utf8").catch(()=>{}),main=(fp,data,opts)=>(opts.detectIndent?readFile(fp):Promise.resolve()).then(str=>{let indent=str?detectIndent(str).indent:opts.indent,json=JSON.stringify(data,opts.replacer,indent);return pify(writeFileAtomic)(fp,`${json}
|
|
7
|
+
import{require_load_json_file,require_pify}from"./chunk-RCTYVKM5.js";import{isNativeBinaryInstall}from"./chunk-7T6TL3GQ.js";import{require_graceful_fs}from"./chunk-F2ZWW2IO.js";import{output_manager_default,require_build_utils,require_signal_exit}from"./chunk-Q2YQSMIB.js";import{__commonJS,__require,__toESM}from"./chunk-6L236MNA.js";var require_dist=__commonJS({"../../internals/constants/dist/index.js"(exports){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});exports.TITLE=exports.NAME=exports.LOGO=exports.PROJECT_ENV_TARGET=void 0;exports.PROJECT_ENV_TARGET=["production","preview","development"];exports.LOGO="\u25B2";exports.NAME="vercel";exports.TITLE="Vercel"}});var require_imurmurhash=__commonJS({"../../node_modules/.pnpm/imurmurhash@0.1.4/node_modules/imurmurhash/imurmurhash.js"(exports,module){(function(){var cache;function MurmurHash3(key,seed){var m=this instanceof MurmurHash3?this:cache;if(m.reset(seed),typeof key=="string"&&key.length>0&&m.hash(key),m!==this)return m}MurmurHash3.prototype.hash=function(key){var h1,k1,i,top,len;switch(len=key.length,this.len+=len,k1=this.k1,i=0,this.rem){case 0:k1^=len>i?key.charCodeAt(i++)&65535:0;case 1:k1^=len>i?(key.charCodeAt(i++)&65535)<<8:0;case 2:k1^=len>i?(key.charCodeAt(i++)&65535)<<16:0;case 3:k1^=len>i?(key.charCodeAt(i)&255)<<24:0,k1^=len>i?(key.charCodeAt(i++)&65280)>>8:0}if(this.rem=len+this.rem&3,len-=this.rem,len>0){for(h1=this.h1;k1=k1*11601+(k1&65535)*3432906752&4294967295,k1=k1<<15|k1>>>17,k1=k1*13715+(k1&65535)*461832192&4294967295,h1^=k1,h1=h1<<13|h1>>>19,h1=h1*5+3864292196&4294967295,!(i>=len);)k1=key.charCodeAt(i++)&65535^(key.charCodeAt(i++)&65535)<<8^(key.charCodeAt(i++)&65535)<<16,top=key.charCodeAt(i++),k1^=(top&255)<<24^(top&65280)>>8;switch(k1=0,this.rem){case 3:k1^=(key.charCodeAt(i+2)&65535)<<16;case 2:k1^=(key.charCodeAt(i+1)&65535)<<8;case 1:k1^=key.charCodeAt(i)&65535}this.h1=h1}return this.k1=k1,this},MurmurHash3.prototype.result=function(){var k1,h1;return k1=this.k1,h1=this.h1,k1>0&&(k1=k1*11601+(k1&65535)*3432906752&4294967295,k1=k1<<15|k1>>>17,k1=k1*13715+(k1&65535)*461832192&4294967295,h1^=k1),h1^=this.len,h1^=h1>>>16,h1=h1*51819+(h1&65535)*2246770688&4294967295,h1^=h1>>>13,h1=h1*44597+(h1&65535)*3266445312&4294967295,h1^=h1>>>16,h1>>>0},MurmurHash3.prototype.reset=function(seed){return this.h1=typeof seed=="number"?seed:0,this.rem=this.k1=this.len=0,this},cache=new MurmurHash3,typeof module<"u"?module.exports=MurmurHash3:this.MurmurHash3=MurmurHash3})()}});var require_write_file_atomic=__commonJS({"../../node_modules/.pnpm/write-file-atomic@2.4.3/node_modules/write-file-atomic/index.js"(exports,module){"use strict";module.exports=writeFile;module.exports.sync=writeFileSync2;module.exports._getTmpname=getTmpname;module.exports._cleanupOnExit=cleanupOnExit;var fs=require_graceful_fs(),MurmurHash3=require_imurmurhash(),onExit=require_signal_exit(),path=__require("path"),activeFiles={},threadId=function(){try{var workerThreads=__require("worker_threads");return workerThreads.threadId}catch{return 0}}(),invocations=0;function getTmpname(filename){return filename+"."+MurmurHash3(__filename).hash(String(process.pid)).hash(String(threadId)).hash(String(++invocations)).result()}function cleanupOnExit(tmpfile){return function(){try{fs.unlinkSync(typeof tmpfile=="function"?tmpfile():tmpfile)}catch{}}}function writeFile(filename,data,options,callback){options?options instanceof Function?(callback=options,options={}):typeof options=="string"&&(options={encoding:options}):options={};var Promise2=options.Promise||global.Promise,truename,fd,tmpfile,removeOnExitHandler=onExit(cleanupOnExit(()=>tmpfile)),absoluteName=path.resolve(filename);new Promise2(function(resolve){activeFiles[absoluteName]||(activeFiles[absoluteName]=[]),activeFiles[absoluteName].push(resolve),activeFiles[absoluteName].length===1&&resolve()}).then(function(){return new Promise2(function(resolve){fs.realpath(filename,function(_,realname){truename=realname||filename,tmpfile=getTmpname(truename),resolve()})})}).then(function(){return new Promise2(function(resolve){options.mode&&options.chown?resolve():fs.stat(truename,function(err,stats){err||!stats||(options=Object.assign({},options),options.mode==null&&(options.mode=stats.mode),options.chown==null&&process.getuid&&(options.chown={uid:stats.uid,gid:stats.gid})),resolve()})})}).then(function(){return new Promise2(function(resolve,reject){fs.open(tmpfile,"w",options.mode,function(err,_fd){fd=_fd,err?reject(err):resolve()})})}).then(function(){return new Promise2(function(resolve,reject){Buffer.isBuffer(data)?fs.write(fd,data,0,data.length,0,function(err){err?reject(err):resolve()}):data!=null?fs.write(fd,String(data),0,String(options.encoding||"utf8"),function(err){err?reject(err):resolve()}):resolve()})}).then(function(){return new Promise2(function(resolve,reject){options.fsync!==!1?fs.fsync(fd,function(err){err?fs.close(fd,()=>reject(err)):fs.close(fd,resolve)}):fs.close(fd,resolve)})}).then(function(){if(fd=null,options.chown)return new Promise2(function(resolve,reject){fs.chown(tmpfile,options.chown.uid,options.chown.gid,function(err){err?reject(err):resolve()})})}).then(function(){if(options.mode)return new Promise2(function(resolve,reject){fs.chmod(tmpfile,options.mode,function(err){err?reject(err):resolve()})})}).then(function(){return new Promise2(function(resolve,reject){fs.rename(tmpfile,truename,function(err){err?reject(err):resolve()})})}).then(function(){removeOnExitHandler(),callback()},function(err){return new Promise2(resolve=>fd?fs.close(fd,resolve):resolve()).then(()=>{removeOnExitHandler(),fs.unlink(tmpfile,function(){callback(err)})})}).then(function(){activeFiles[absoluteName].shift(),activeFiles[absoluteName].length>0?activeFiles[absoluteName][0]():delete activeFiles[absoluteName]})}function writeFileSync2(filename,data,options){typeof options=="string"?options={encoding:options}:options||(options={});try{filename=fs.realpathSync(filename)}catch{}var tmpfile=getTmpname(filename);if(!options.mode||!options.chown)try{var stats=fs.statSync(filename);options=Object.assign({},options),options.mode||(options.mode=stats.mode),!options.chown&&process.getuid&&(options.chown={uid:stats.uid,gid:stats.gid})}catch{}var fd,cleanup=cleanupOnExit(tmpfile),removeOnExitHandler=onExit(cleanup);try{fd=fs.openSync(tmpfile,"w",options.mode),Buffer.isBuffer(data)?fs.writeSync(fd,data,0,data.length,0):data!=null&&fs.writeSync(fd,String(data),0,String(options.encoding||"utf8")),options.fsync!==!1&&fs.fsyncSync(fd),fs.closeSync(fd),options.chown&&fs.chownSync(tmpfile,options.chown.uid,options.chown.gid),options.mode&&fs.chmodSync(tmpfile,options.mode),fs.renameSync(tmpfile,filename),removeOnExitHandler()}catch(err){if(fd)try{fs.closeSync(fd)}catch{}throw removeOnExitHandler(),cleanup(),err}}}});var require_is_plain_obj=__commonJS({"../../node_modules/.pnpm/is-plain-obj@1.1.0/node_modules/is-plain-obj/index.js"(exports,module){"use strict";var toString=Object.prototype.toString;module.exports=function(x){var prototype;return toString.call(x)==="[object Object]"&&(prototype=Object.getPrototypeOf(x),prototype===null||prototype===Object.getPrototypeOf({}))}}});var require_sort_keys=__commonJS({"../../node_modules/.pnpm/sort-keys@1.1.2/node_modules/sort-keys/index.js"(exports,module){"use strict";var isPlainObj=require_is_plain_obj();module.exports=function(obj,opts){if(!isPlainObj(obj))throw new TypeError("Expected a plain object");opts=opts||{},typeof opts=="function"&&(opts={compare:opts});var deep=opts.deep,seenInput=[],seenOutput=[],sortKeys=function(x){var seenIndex=seenInput.indexOf(x);if(seenIndex!==-1)return seenOutput[seenIndex];var ret={},keys=Object.keys(x).sort(opts.compare);seenInput.push(x),seenOutput.push(ret);for(var i=0;i<keys.length;i++){var key=keys[i],val=x[key];ret[key]=deep&&isPlainObj(val)?sortKeys(val):val}return ret};return sortKeys(obj)}}});var require_pify2=__commonJS({"../../node_modules/.pnpm/pify@3.0.0/node_modules/pify/index.js"(exports,module){"use strict";var processFn=(fn,opts)=>function(){let P=opts.promiseModule,args=new Array(arguments.length);for(let i=0;i<arguments.length;i++)args[i]=arguments[i];return new P((resolve,reject)=>{opts.errorFirst?args.push(function(err,result){if(opts.multiArgs){let results=new Array(arguments.length-1);for(let i=1;i<arguments.length;i++)results[i-1]=arguments[i];err?(results.unshift(err),reject(results)):resolve(results)}else err?reject(err):resolve(result)}):args.push(function(result){if(opts.multiArgs){let results=new Array(arguments.length-1);for(let i=0;i<arguments.length;i++)results[i]=arguments[i];resolve(results)}else resolve(result)}),fn.apply(this,args)})};module.exports=(obj,opts)=>{opts=Object.assign({exclude:[/.+(Sync|Stream)$/],errorFirst:!0,promiseModule:Promise},opts);let filter=key=>{let match=pattern=>typeof pattern=="string"?key===pattern:pattern.test(key);return opts.include?opts.include.some(match):!opts.exclude.some(match)},ret;typeof obj=="function"?ret=function(){return opts.excludeMain?obj.apply(this,arguments):processFn(obj,opts).apply(this,arguments)}:ret=Object.create(Object.getPrototypeOf(obj));for(let key in obj){let x=obj[key];ret[key]=typeof x=="function"&&filter(key)?processFn(x,opts):x}return ret}}});var require_make_dir=__commonJS({"../../node_modules/.pnpm/make-dir@1.3.0/node_modules/make-dir/index.js"(exports,module){"use strict";var fs=__require("fs"),path=__require("path"),pify=require_pify2(),defaults={mode:511&~process.umask(),fs},checkPath=pth=>{if(process.platform==="win32"&&/[<>:"|?*]/.test(pth.replace(path.parse(pth).root,""))){let err=new Error(`Path contains invalid characters: ${pth}`);throw err.code="EINVAL",err}};module.exports=(input,opts)=>Promise.resolve().then(()=>{checkPath(input),opts=Object.assign({},defaults,opts);let mkdir=pify(opts.fs.mkdir),stat=pify(opts.fs.stat),make=pth=>mkdir(pth,opts.mode).then(()=>pth).catch(err=>{if(err.code==="ENOENT"){if(err.message.includes("null bytes")||path.dirname(pth)===pth)throw err;return make(path.dirname(pth)).then(()=>make(pth))}return stat(pth).then(stats=>stats.isDirectory()?pth:Promise.reject()).catch(()=>{throw err})});return make(path.resolve(input))});module.exports.sync=(input,opts)=>{checkPath(input),opts=Object.assign({},defaults,opts);let make=pth=>{try{opts.fs.mkdirSync(pth,opts.mode)}catch(err){if(err.code==="ENOENT"){if(err.message.includes("null bytes")||path.dirname(pth)===pth)throw err;return make(path.dirname(pth)),make(pth)}try{if(!opts.fs.statSync(pth).isDirectory())throw new Error("The path is not a directory")}catch{throw err}}return pth};return make(path.resolve(input))}}});var require_detect_indent=__commonJS({"../../node_modules/.pnpm/detect-indent@5.0.0/node_modules/detect-indent/index.js"(exports,module){"use strict";var INDENT_RE=/^(?:( )+|\t+)/;function getMostUsed(indents){let result=0,maxUsed=0,maxWeight=0;for(let entry of indents){let key=entry[0],val=entry[1],u=val[0],w=val[1];(u>maxUsed||u===maxUsed&&w>maxWeight)&&(maxUsed=u,maxWeight=w,result=Number(key))}return result}module.exports=str=>{if(typeof str!="string")throw new TypeError("Expected a string");let tabs=0,spaces=0,prev=0,indents=new Map,current,isIndent;for(let line of str.split(/\n/g)){if(!line)continue;let indent2,matches=line.match(INDENT_RE);matches?(indent2=matches[0].length,matches[1]?spaces++:tabs++):indent2=0;let diff=indent2-prev;prev=indent2,diff?(isIndent=diff>0,current=indents.get(isIndent?diff:-diff),current?current[0]++:(current=[1,0],indents.set(diff,current))):current&&(current[1]+=Number(isIndent))}let amount=getMostUsed(indents),type,indent;return amount?spaces>=tabs?(type="space",indent=" ".repeat(amount)):(type="tab",indent=" ".repeat(amount)):(type=null,indent=""),{amount,type,indent}}}});var require_write_json_file=__commonJS({"../../node_modules/.pnpm/write-json-file@2.2.0/node_modules/write-json-file/index.js"(exports,module){"use strict";var path=__require("path"),fs=require_graceful_fs(),writeFileAtomic=require_write_file_atomic(),sortKeys=require_sort_keys(),makeDir=require_make_dir(),pify=require_pify(),detectIndent=require_detect_indent(),init=(fn,fp,data,opts)=>{if(!fp)throw new TypeError("Expected a filepath");if(data===void 0)throw new TypeError("Expected data to stringify");return opts=Object.assign({indent:" ",sortKeys:!1},opts),opts.sortKeys&&(data=sortKeys(data,{deep:!0,compare:typeof opts.sortKeys=="function"&&opts.sortKeys})),fn(fp,data,opts)},readFile=fp=>pify(fs.readFile)(fp,"utf8").catch(()=>{}),main=(fp,data,opts)=>(opts.detectIndent?readFile(fp):Promise.resolve()).then(str=>{let indent=str?detectIndent(str).indent:opts.indent,json=JSON.stringify(data,opts.replacer,indent);return pify(writeFileAtomic)(fp,`${json}
|
|
8
8
|
`,{mode:opts.mode})}),mainSync=(fp,data,opts)=>{let indent=opts.indent;if(opts.detectIndent)try{let file=fs.readFileSync(fp,"utf8");indent=detectIndent(file).indent}catch(err){if(err.code!=="ENOENT")throw err}let json=JSON.stringify(data,opts.replacer,indent);return writeFileAtomic.sync(fp,`${json}
|
|
9
9
|
`,{mode:opts.mode})};module.exports=(fp,data,opts)=>makeDir(path.dirname(fp),{fs}).then(()=>init(main,fp,data,opts));module.exports.sync=(fp,data,opts)=>{makeDir.sync(path.dirname(fp),{fs}),init(mainSync,fp,data,opts)}}});import{randomUUID as randomUUID2}from"node:crypto";import os from"node:os";var import_constants=__toESM(require_dist(),1),import_build_utils=__toESM(require_build_utils(),1);import{spawn}from"node:child_process";var import_load_json_file=__toESM(require_load_json_file(),1),import_write_json_file=__toESM(require_write_json_file(),1);import{randomUUID}from"node:crypto";import{mkdirSync,renameSync,rmSync,writeFileSync}from"node:fs";import{dirname}from"node:path";var DEFAULT_CLI_SESSION_INACTIVITY_TIMEOUT_MS=30*60*1e3,DEFAULT_CLI_SESSION_MAX_LIFETIME_MS=24*60*60*1e3;function isPersistedCliSession(value){if(!value||typeof value!="object")return!1;let session=value;return typeof session.id=="string"&&typeof session.createdAt=="number"&&Number.isFinite(session.createdAt)&&typeof session.lastSeenAt=="number"&&Number.isFinite(session.lastSeenAt)}function isPersistedCliDevice(value){return!value||typeof value!="object"?!1:typeof value.id=="string"}function readPersistedCliSession(filePath){try{let session=import_load_json_file.default.sync(filePath);return isPersistedCliSession(session)?session:null}catch{return null}}function writePersistedCliSession(filePath,session){let temporaryPath=`${filePath}.${process.pid}.${randomUUID()}.tmp`;try{mkdirSync(dirname(filePath),{recursive:!0}),writeFileSync(temporaryPath,`${JSON.stringify(session,null,2)}
|
|
10
|
-
`,{flag:"wx",mode:384}),renameSync(temporaryPath,filePath)}catch{}finally{try{rmSync(temporaryPath,{force:!0})}catch{}}}function readPersistedCliDevice(filePath){try{let device=import_load_json_file.default.sync(filePath);return isPersistedCliDevice(device)?device:null}catch{return null}}function writePersistedCliDevice(filePath,device){try{mkdirSync(dirname(filePath),{recursive:!0}),import_write_json_file.default.sync(filePath,device,{indent:2})}catch{}}function getOrCreatePersistedCliSession(opts){let now=opts.now?.()??Date.now(),inactivityTimeoutMs=opts.inactivityTimeoutMs??DEFAULT_CLI_SESSION_INACTIVITY_TIMEOUT_MS,maxLifetimeMs=opts.maxLifetimeMs??DEFAULT_CLI_SESSION_MAX_LIFETIME_MS,existing=readPersistedCliSession(opts.filePath),session=existing&&now-existing.lastSeenAt<=inactivityTimeoutMs&&now-existing.createdAt<=maxLifetimeMs?{...existing,lastSeenAt:now}:{id:randomUUID(),createdAt:now,lastSeenAt:now};return writePersistedCliSession(opts.filePath,session),session}function touchPersistedCliSession(opts,session){let nextSession={...session,lastSeenAt:opts.now?.()??Date.now()};return writePersistedCliSession(opts.filePath,nextSession),nextSession}function getOrCreatePersistedCliDevice(opts){let existing=readPersistedCliDevice(opts.filePath);if(existing)return existing;let device={id:randomUUID()};return writePersistedCliDevice(opts.filePath,device),device}var LogLabel="['telemetry']:",MAX_ERROR_SERVER_MESSAGE_LENGTH=500,TelemetryClient=class{constructor({opts}){this.redactedValue="[REDACTED]";this.noValueToTriggerPrompt="[TRIGGER_PROMPT]";this.redactedArgumentsLength=args=>args&&args.length===1?"ONE":args.length>1?"MANY":"NONE";this.redactedTargetName=target=>import_constants.PROJECT_ENV_TARGET.includes(target)?target:this.redactedValue;this.isDebug=opts.isDebug||!1,this.store=opts.store}track(eventData){this.isDebug&&output_manager_default.debug(`${LogLabel} ${eventData.key}:${eventData.value}`);let event={id:randomUUID2(),eventTime:Date.now(),...eventData};this.store.add(event)}trackCliCommand(eventData){this.track({key:`command:${eventData.command}`,value:eventData.value})}trackCliSubcommand(eventData){this.track({key:`subcommand:${eventData.subcommand}`,value:eventData.value})}trackCliArgument(eventData){eventData.value&&this.track({key:`argument:${eventData.arg}`,value:eventData.value})}trackCliOption(eventData){this.track({key:`option:${eventData.option}`,value:eventData.value})}trackTargetEnvironment(targetEnvironment){this.track({key:"target_environment",value:targetEnvironment})}trackCommandOutput(eventData){this.track({key:`output:${eventData.key}`,value:eventData.value})}trackCliFlag(flag){this.track({key:`flag:${flag}`,value:"TRUE"})}trackOidcTokenRefresh(count){this.track({key:"oidc-token-refresh",value:`${count}`})}trackCPUs(){this.track({key:"cpu_count",value:String(os.cpus().length)})}trackAgenticUse(agent){agent&&this.track({key:"agent",value:agent})}trackPlatform(){this.track({key:"platform",value:os.platform()})}trackArch(){this.track({key:"arch",value:os.arch()})}trackCI(ciVendorName){ciVendorName&&this.track({key:"ci",value:ciVendorName})}trackStdinIsTTY(isTTY){this.track({key:"stdin_is_tty",value:isTTY?"true":"false"})}trackVersion(version){version&&this.track({key:"version",value:version})}trackDefaultDeploy(){this.track({key:"default-deploy",value:"TRUE"})}trackProjectId(projectId){projectId&&this.track({key:"project_id",value:projectId})}trackInvocationId(invocationId){invocationId&&this.track({key:"invocation_id",value:invocationId})}trackDeviceId(deviceId){deviceId&&this.track({key:"device_id",value:deviceId})}trackVercelPluginActiveSession(){this.track({key:"vercel_plugin_active_session",value:"TRUE"})}trackVercelPluginVersion(version){version&&this.track({key:"vercel_plugin_version",value:version})}trackErrorStatus(status){typeof status<"u"&&this.track({key:"error_status",value:String(status)})}trackErrorCode(code){code&&this.track({key:"error_code",value:code})}trackErrorSlug(slug){slug&&this.track({key:"error_slug",value:slug})}trackErrorAction(action){action&&this.track({key:"error_action",value:action})}trackErrorServerMessage(serverMessage){if(serverMessage){let normalizedServerMessage=serverMessage.trim().replace(/\s+/g," ");this.track({key:"error_server_message",value:normalizedServerMessage.slice(0,MAX_ERROR_SERVER_MESSAGE_LENGTH)})}}trackExtension(){this.track({key:"extension",value:this.redactedValue})}trackLoginState(state){state==="started"&&(this.loginAttempt=randomUUID2()),this.loginAttempt&&this.track({key:`login:attempt:${this.loginAttempt}`,value:state}),state!=="started"&&(this.loginAttempt=void 0)}trackCliFlagHelp(command,subcommands){let subcommand;subcommands&&(subcommand=Array.isArray(subcommands)?subcommands[0]:subcommands),this.track({key:"flag:help",value:subcommand?`${command}:${subcommand}`:command})}trackCliOptionFormat(format){if(format){let allowedFormat=["json"].includes(format)?format:this.redactedValue;this.trackCliOption({option:"format",value:allowedFormat})}}trackCliOptionProject(value){value&&(Array.isArray(value)&&value.length===0||this.trackCliOption({option:"project",value:this.redactedValue}))}},TelemetryEventStore=class{constructor(opts){this.teamId="NO_TEAM_ID";this.userId="NO_USER_ID";this.projectId="NO_PROJECT_ID";this.isDebug=opts?.isDebug||!1,this.events=[],this.config=opts?.config,this.cliDeviceOptions=opts?.cliDevice,this.cliSessionOptions=opts?.cliSession,this.invocationId=randomUUID2(),this.deviceId=randomUUID2(),this.cliDeviceOptions&&(this.cliDevice=getOrCreatePersistedCliDevice(this.cliDeviceOptions),this.deviceId=this.cliDevice.id),this.cliSessionOptions?(this.cliSession=getOrCreatePersistedCliSession(this.cliSessionOptions),this.sessionId=this.cliSession.id):this.sessionId=randomUUID2()}add(event){event.sessionId=this.sessionId,event.invocationId=this.invocationId,event.teamId=this.teamId,event.userId=this.userId,event.projectId=this.projectId,this.events.push(event)}updateTeamId(teamId){teamId&&(this.teamId=teamId)}updateUserId(userId){userId&&(this.userId=userId)}updateProjectId(projectId){projectId&&(this.projectId=projectId)}get hasUserId(){return this.userId!=="NO_USER_ID"}get currentProjectId(){return this.projectId}get currentInvocationId(){return this.invocationId}get currentDeviceId(){return this.deviceId}get currentSessionId(){return this.sessionId}get readonlyEvents(){return Array.from(this.events)}reset(){this.events=[]}get enabled(){return process.env.VERCEL_TELEMETRY_DISABLED?!1:this.config?.enabled??!0}async save(){if(this.cliSession&&this.cliSessionOptions&&(this.cliSession=touchPersistedCliSession(this.cliSessionOptions,this.cliSession)),this.isDebug){output_manager_default.log(`${LogLabel} Flushing Events`);for(let event of this.events)event.teamId=this.teamId,event.userId=this.userId,event.projectId=this.projectId,output_manager_default.log(JSON.stringify(event));return}if(this.enabled){let sessionId=this.events[0]?.sessionId;if(!sessionId){output_manager_default.debug("Unable to send metrics: no session ID");return}let events=this.events.map(event=>{let{eventTime,invocationId,...rest}=event;return delete rest.sessionId,delete rest.teamId,delete rest.userId,delete rest.projectId,{event_time:eventTime,invocation_id:invocationId,team_id:this.teamId,user_id:this.userId,project_id:this.projectId,...rest}}),payload={invocationId:this.invocationId,headers:{"Client-id":"vercel-cli","x-vercel-cli-topic-id":"generic","x-vercel-cli-session-id":sessionId},body:events};await this.sendToSubprocess(payload,output_manager_default.debugEnabled)}}async sendToSubprocess(payload,outputDebugEnabled){let flushArgs=["telemetry","flush",JSON.stringify(payload)],nodeBinaryPath,script;if(isNativeBinaryInstall())nodeBinaryPath=process.execPath,script=flushArgs;else{let args=[process.execPath,process.argv[0],process.argv[1]];args[0]===args[1]&&args.shift(),nodeBinaryPath=args[0],script=[...args.slice(1),...flushArgs]}let env=(0,import_build_utils.cloneEnv)(process.env,{VERCEL_TELEMETRY_DISABLED:"1"});if(outputDebugEnabled)return new Promise(resolve=>{let childProcess=spawn(nodeBinaryPath,script,{env,stdio:["ignore","pipe","pipe"]});childProcess.stderr.on("data",data=>output_manager_default.debug(data.toString())),childProcess.stdout.on("data",data=>output_manager_default.debug(data.toString())),childProcess.on("error",d=>{output_manager_default.debug(d)});let timeout=setTimeout(()=>{output_manager_default.debug("Telemetry subprocess killed due to timeout"),childProcess.kill()},2e3);childProcess.on("exit",code=>{output_manager_default.debug(`Telemetry subprocess exited with code ${code}`),childProcess.unref(),timeout.unref(),resolve()})});spawn(nodeBinaryPath,script,{stdio:"ignore",env,windowsHide:!0,detached:!0}).unref()}};export{require_dist,TelemetryClient,TelemetryEventStore};
|
|
10
|
+
`,{flag:"wx",mode:384}),renameSync(temporaryPath,filePath)}catch{}finally{try{rmSync(temporaryPath,{force:!0})}catch{}}}function readPersistedCliDevice(filePath){try{let device=import_load_json_file.default.sync(filePath);return isPersistedCliDevice(device)?device:null}catch{return null}}function writePersistedCliDevice(filePath,device){try{mkdirSync(dirname(filePath),{recursive:!0}),import_write_json_file.default.sync(filePath,device,{indent:2})}catch{}}function getOrCreatePersistedCliSession(opts){let now=opts.now?.()??Date.now(),inactivityTimeoutMs=opts.inactivityTimeoutMs??DEFAULT_CLI_SESSION_INACTIVITY_TIMEOUT_MS,maxLifetimeMs=opts.maxLifetimeMs??DEFAULT_CLI_SESSION_MAX_LIFETIME_MS,existing=readPersistedCliSession(opts.filePath),session=existing&&now-existing.lastSeenAt<=inactivityTimeoutMs&&now-existing.createdAt<=maxLifetimeMs?{...existing,lastSeenAt:now}:{id:randomUUID(),createdAt:now,lastSeenAt:now};return writePersistedCliSession(opts.filePath,session),session}function touchPersistedCliSession(opts,session){let nextSession={...session,lastSeenAt:opts.now?.()??Date.now()};return writePersistedCliSession(opts.filePath,nextSession),nextSession}function getOrCreatePersistedCliDevice(opts){let existing=readPersistedCliDevice(opts.filePath);if(existing)return existing;let device={id:randomUUID()};return writePersistedCliDevice(opts.filePath,device),device}var LogLabel="['telemetry']:",MAX_ERROR_SERVER_MESSAGE_LENGTH=500,TelemetryClient=class{constructor({opts}){this.redactedValue="[REDACTED]";this.noValueToTriggerPrompt="[TRIGGER_PROMPT]";this.redactedArgumentsLength=args=>args&&args.length===1?"ONE":args.length>1?"MANY":"NONE";this.redactedTargetName=target=>import_constants.PROJECT_ENV_TARGET.includes(target)?target:this.redactedValue;this.isDebug=opts.isDebug||!1,this.store=opts.store}track(eventData){this.isDebug&&output_manager_default.debug(`${LogLabel} ${eventData.key}:${eventData.value}`);let event={id:randomUUID2(),eventTime:Date.now(),...eventData};this.store.add(event)}trackCliCommand(eventData){this.track({key:`command:${eventData.command}`,value:eventData.value})}trackCliSubcommand(eventData){this.track({key:`subcommand:${eventData.subcommand}`,value:eventData.value})}trackCliArgument(eventData){eventData.value&&this.track({key:`argument:${eventData.arg}`,value:eventData.value})}trackCliOption(eventData){this.track({key:`option:${eventData.option}`,value:eventData.value})}trackTargetEnvironment(targetEnvironment){this.track({key:"target_environment",value:targetEnvironment})}trackCommandOutput(eventData){this.track({key:`output:${eventData.key}`,value:eventData.value})}trackCliFlag(flag){this.track({key:`flag:${flag}`,value:"TRUE"})}trackOidcTokenRefresh(count){this.track({key:"oidc-token-refresh",value:`${count}`})}trackCPUs(){this.track({key:"cpu_count",value:String(os.cpus().length)})}trackAgenticUse(agent){agent&&this.track({key:"agent",value:agent})}trackPlatform(){this.track({key:"platform",value:os.platform()})}trackArch(){this.track({key:"arch",value:os.arch()})}trackCI(ciVendorName){ciVendorName&&this.track({key:"ci",value:ciVendorName})}trackStdinIsTTY(isTTY){this.track({key:"stdin_is_tty",value:isTTY?"true":"false"})}trackVersion(version){version&&this.track({key:"version",value:version})}trackDefaultDeploy(){this.track({key:"default-deploy",value:"TRUE"})}trackProjectId(projectId){projectId&&this.track({key:"project_id",value:projectId})}trackInvocationId(invocationId){invocationId&&this.track({key:"invocation_id",value:invocationId})}trackDeviceId(deviceId){deviceId&&this.track({key:"device_id",value:deviceId})}trackVercelPluginActiveSession(){this.track({key:"vercel_plugin_active_session",value:"TRUE"})}trackVercelPluginVersion(version){version&&this.track({key:"vercel_plugin_version",value:version})}trackErrorStatus(status){typeof status<"u"&&this.track({key:"error_status",value:String(status)})}trackErrorCode(code){code&&this.track({key:"error_code",value:code})}trackErrorSlug(slug){slug&&this.track({key:"error_slug",value:slug})}trackErrorAction(action){action&&this.track({key:"error_action",value:action})}trackErrorServerMessage(serverMessage){if(serverMessage){let normalizedServerMessage=serverMessage.trim().replace(/\s+/g," ");this.track({key:"error_server_message",value:normalizedServerMessage.slice(0,MAX_ERROR_SERVER_MESSAGE_LENGTH)})}}trackExtension(){this.track({key:"extension",value:this.redactedValue})}trackLoginState(state){state==="started"&&(this.loginAttempt=randomUUID2()),this.loginAttempt&&this.track({key:`login:attempt:${this.loginAttempt}`,value:state}),state!=="started"&&(this.loginAttempt=void 0)}trackCliFlagHelp(command,subcommands){let subcommand;subcommands&&(subcommand=Array.isArray(subcommands)?subcommands[0]:subcommands),this.track({key:"flag:help",value:subcommand?`${command}:${subcommand}`:command})}trackCliOptionFormat(format){if(format){let allowedFormat=["json"].includes(format)?format:this.redactedValue;this.trackCliOption({option:"format",value:allowedFormat})}}trackCliOptionProject(value){value&&(Array.isArray(value)&&value.length===0||this.trackCliOption({option:"project",value:this.redactedValue}))}},TelemetryEventStore=class{constructor(opts){this.teamId="NO_TEAM_ID";this.userId="NO_USER_ID";this.projectId="NO_PROJECT_ID";this.isDebug=opts?.isDebug||!1,this.events=[],this.config=opts?.config,this.cliDeviceOptions=opts?.cliDevice,this.cliSessionOptions=opts?.cliSession,this.invocationId=randomUUID2(),this.deviceId=randomUUID2(),this.cliDeviceOptions&&(this.cliDevice=getOrCreatePersistedCliDevice(this.cliDeviceOptions),this.deviceId=this.cliDevice.id),this.cliSessionOptions?(this.cliSession=getOrCreatePersistedCliSession(this.cliSessionOptions),this.sessionId=this.cliSession.id):this.sessionId=randomUUID2()}add(event){event.sessionId=this.sessionId,event.invocationId=this.invocationId,event.teamId=this.teamId,event.userId=this.userId,event.projectId=this.projectId,this.events.push(event)}updateTeamId(teamId){teamId&&(this.teamId=teamId)}updateUserId(userId){userId&&(this.userId=userId)}updateProjectId(projectId){projectId&&(this.projectId=projectId)}get hasUserId(){return this.userId!=="NO_USER_ID"}get currentProjectId(){return this.projectId}get currentInvocationId(){return this.invocationId}get currentDeviceId(){return this.deviceId}get currentSessionId(){return this.sessionId}get readonlyEvents(){return Array.from(this.events)}reset(){this.events=[]}get enabled(){return process.env.VERCEL_TELEMETRY_DISABLED?!1:this.config?.enabled??!0}async save({detach=!1}={}){if(this.cliSession&&this.cliSessionOptions&&(this.cliSession=touchPersistedCliSession(this.cliSessionOptions,this.cliSession)),this.isDebug){output_manager_default.log(`${LogLabel} Flushing Events`);for(let event of this.events)event.teamId=this.teamId,event.userId=this.userId,event.projectId=this.projectId,output_manager_default.log(JSON.stringify(event));return}if(this.enabled){let sessionId=this.events[0]?.sessionId;if(!sessionId){output_manager_default.debug("Unable to send metrics: no session ID");return}let events=this.events.map(event=>{let{eventTime,invocationId,...rest}=event;return delete rest.sessionId,delete rest.teamId,delete rest.userId,delete rest.projectId,{event_time:eventTime,invocation_id:invocationId,team_id:this.teamId,user_id:this.userId,project_id:this.projectId,...rest}}),payload={invocationId:this.invocationId,headers:{"Client-id":"vercel-cli","x-vercel-cli-topic-id":"generic","x-vercel-cli-session-id":sessionId},body:events};await this.sendToSubprocess(payload,output_manager_default.debugEnabled&&!detach)}}async sendToSubprocess(payload,outputDebugEnabled){let flushArgs=["telemetry","flush",JSON.stringify(payload)],nodeBinaryPath,script;if(isNativeBinaryInstall())nodeBinaryPath=process.execPath,script=flushArgs;else{let args=[process.execPath,process.argv[0],process.argv[1]];args[0]===args[1]&&args.shift(),nodeBinaryPath=args[0],script=[...args.slice(1),...flushArgs]}let env=(0,import_build_utils.cloneEnv)(process.env,{VERCEL_TELEMETRY_DISABLED:"1"});if(outputDebugEnabled)return new Promise(resolve=>{let childProcess=spawn(nodeBinaryPath,script,{env,stdio:["ignore","pipe","pipe"]});childProcess.stderr.on("data",data=>output_manager_default.debug(data.toString())),childProcess.stdout.on("data",data=>output_manager_default.debug(data.toString())),childProcess.on("error",d=>{output_manager_default.debug(d)});let timeout=setTimeout(()=>{output_manager_default.debug("Telemetry subprocess killed due to timeout"),childProcess.kill()},2e3);childProcess.on("exit",code=>{output_manager_default.debug(`Telemetry subprocess exited with code ${code}`),childProcess.unref(),timeout.unref(),resolve()})});spawn(nodeBinaryPath,script,{stdio:"ignore",env,windowsHide:!0,detached:!0}).unref()}};export{require_dist,TelemetryClient,TelemetryEventStore};
|
|
11
11
|
/*! Bundled license information:
|
|
12
12
|
|
|
13
13
|
imurmurhash/imurmurhash.js:
|
|
@@ -4,4 +4,4 @@ import { dirname as __dirname_ } from 'node:path';
|
|
|
4
4
|
const require = __createRequire(import.meta.url);
|
|
5
5
|
const __filename = __fileURLToPath(import.meta.url);
|
|
6
6
|
const __dirname = __dirname_(__filename);
|
|
7
|
-
import{teamCache}from"./chunk-VOZEB6PD.js";import{APIError,InvalidToken}from"./chunk-
|
|
7
|
+
import{teamCache}from"./chunk-VOZEB6PD.js";import{APIError,InvalidToken}from"./chunk-NM67DIPQ.js";import{URLSearchParams}from"url";async function getTeams(client,opts={}){let{apiVersion=1}=opts;if(apiVersion===1){if(client.teams)return client.teams;if(client.teamsPromise)return client.teamsPromise;client.teamsPromise=fetchTeams(client,opts).then(result=>{let teams=Array.isArray(result)?result:result.teams;return client.teams=teams,teams});try{return await client.teamsPromise}finally{client.teamsPromise=void 0}}return fetchTeams(client,opts)}async function fetchTeams(client,opts={}){let{apiVersion=1}=opts,query="";if(opts.apiVersion===2){let params=new URLSearchParams({limit:String(typeof opts.limit=="number"?opts.limit:20)});opts.next&¶ms.set("next",String(opts.next)),query=`?${params}`}try{let body=await client.fetch(`/v${apiVersion}/teams${query}`,{useCurrentTeam:!1});if(apiVersion===1){let teams=body.teams||[];for(let team of teams)teamCache.set(team.id,team);return teams}return body}catch(error){throw error instanceof APIError&&error.status===403?new InvalidToken(client.authConfig.tokenSource):error}}export{getTeams};
|
|
@@ -4,4 +4,4 @@ import { dirname as __dirname_ } from 'node:path';
|
|
|
4
4
|
const require = __createRequire(import.meta.url);
|
|
5
5
|
const __filename = __fileURLToPath(import.meta.url);
|
|
6
6
|
const __dirname = __dirname_(__filename);
|
|
7
|
-
import{
|
|
7
|
+
import{imageAggregateCommand}from"./chunk-EDDOQXEI.js";import{permissionsAggregateCommand}from"./chunk-35QK5NDD.js";import{tagsAggregateCommand}from"./chunk-M4IWOZEG.js";import{formatOption,jsonOption,limitOption,projectOption,yesOption}from"./chunk-5IPBCD7K.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:"create",aliases:["add"],description:"Create a container registry repository",arguments:[{name:"name",required:!0}],options:[projectScopeOption,formatOption,jsonOption],examples:[{name:"Create a repository",value:`${packageName} vcr create 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 create 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};
|
|
@@ -4,7 +4,7 @@ import { dirname as __dirname_ } from 'node:path';
|
|
|
4
4
|
const require = __createRequire(import.meta.url);
|
|
5
5
|
const __filename = __fileURLToPath(import.meta.url);
|
|
6
6
|
const __dirname = __dirname_(__filename);
|
|
7
|
-
import{getCommandName}from"./chunk-FI772UVH.js";import{require_build_utils}from"./chunk-EWWFNMPZ.js";import{require_dist}from"./chunk-QGIQK47P.js";import{require_source}from"./chunk-U7KCDTCH.js";import{__commonJS,__toESM}from"./chunk-6L236MNA.js";var require_bytes=__commonJS({"../../node_modules/.pnpm/bytes@3.0.0/node_modules/bytes/index.js"(exports,module){"use strict";module.exports=bytes2;module.exports.format=format;module.exports.parse=parse;var formatThousandsRegExp=/\B(?=(\d{3})+(?!\d))/g,formatDecimalsRegExp=/(?:\.0*|(\.[^0]+)0+)$/,map={b:1,kb:1024,mb:1<<20,gb:1<<30,tb:(1<<30)*1024},parseRegExp=/^((-|\+)?(\d+(?:\.\d+)?)) *(kb|mb|gb|tb)$/i;function bytes2(value,options){return typeof value=="string"?parse(value):typeof value=="number"?format(value,options):null}function format(value,options){if(!Number.isFinite(value))return null;var mag=Math.abs(value),thousandsSeparator=options&&options.thousandsSeparator||"",unitSeparator=options&&options.unitSeparator||"",decimalPlaces=options&&options.decimalPlaces!==void 0?options.decimalPlaces:2,fixedDecimals=!!(options&&options.fixedDecimals),unit=options&&options.unit||"";(!unit||!map[unit.toLowerCase()])&&(mag>=map.tb?unit="TB":mag>=map.gb?unit="GB":mag>=map.mb?unit="MB":mag>=map.kb?unit="KB":unit="B");var val=value/map[unit.toLowerCase()],str=val.toFixed(decimalPlaces);return fixedDecimals||(str=str.replace(formatDecimalsRegExp,"$1")),thousandsSeparator&&(str=str.replace(formatThousandsRegExp,thousandsSeparator)),str+unitSeparator+unit}function parse(val){if(typeof val=="number"&&!isNaN(val))return val;if(typeof val!="string")return null;var results=parseRegExp.exec(val),floatValue,unit="b";return results?(floatValue=parseFloat(results[1]),unit=results[4].toLowerCase()):(floatValue=parseInt(val,10),unit="b"),Math.floor(map[unit]*floatValue)}}});var NowError=class extends Error{constructor({code:code2,message,meta}){super(message);this.code=code2,this.meta=meta}};var import_chalk=__toESM(require_source(),1);function code(cmd,{backticks=!0}={}){let tick=backticks?import_chalk.default.gray("`"):"";return`${tick}${import_chalk.default.bold(cmd)}${tick}`}var import_bytes=__toESM(require_bytes(),1),import_build_utils=__toESM(require_build_utils(),1);var import_chalk2=__toESM(require_source(),1),import_error_utils=__toESM(require_dist(),1),APIError=class extends Error{constructor(message,response,body){super();if(this.message=`${message} (${response.status})`,this.status=response.status,this.serverMessage=message,this.wwwAuthenticate=response.headers.get("WWW-Authenticate")??void 0,body)for(let field of Object.keys(body))field!=="message"&&(this[field]=body[field]);if(response.status===429||response.status===503){let parsed=parseRetryAfterHeaderAsMillis(response.headers.get("Retry-After"));this.retryAfterMs=parsed??(response.status===429?0:void 0)}}};function parseRetryAfterHeaderAsMillis(header){if(!header)return;let retryAfterMs=Number(header)*1e3;if(Number.isNaN(retryAfterMs)){if(retryAfterMs=Date.parse(header),Number.isNaN(retryAfterMs))return;retryAfterMs=retryAfterMs-Date.now()}return Math.max(retryAfterMs,0)}function isAPIError(v){return(0,import_error_utils.isError)(v)&&"status"in v}var TeamDeleted=class extends NowError{constructor(){super({code:"TEAM_DELETED",message:`Your team was deleted or you were removed from the team. You can switch to a different one using ${getCommandName("switch")}.`,meta:{}})}},InvalidToken=class extends NowError{constructor(tokenSource){let message;tokenSource==="flag"?message="The token provided via `--token` argument is not valid. Please provide a valid token.":tokenSource==="env"?message="The token provided via VERCEL_TOKEN environment variable is not valid. Please provide a valid token.":message=`The specified token is not valid. Use ${getCommandName("login")} to generate a new token.`,super({code:"NOT_AUTHORIZED",message,meta:{}})}},MissingUser=class extends NowError{constructor(){super({code:"MISSING_USER",message:"Not able to load user, missing from response",meta:{}})}},DomainAlreadyExists=class extends NowError{constructor(domain){super({code:"DOMAIN_ALREADY_EXISTS",meta:{domain},message:`The domain ${domain} already exists under a different context.`})}},DomainPermissionDenied=class extends NowError{constructor(domain,context){super({code:"DOMAIN_PERMISSION_DENIED",meta:{domain,context},message:`You don't have access to the domain ${domain} under ${context}.`})}},DomainExternal=class extends NowError{constructor(domain){super({code:"DOMAIN_EXTERNAL",meta:{domain},message:`The domain ${domain} must point to zeit.world.`})}},SourceNotFound=class extends NowError{constructor(){super({code:"SOURCE_NOT_FOUND",meta:{},message:"Not able to purchase. Please add a payment method using the dashboard."})}};var DomainNotFound=class extends NowError{constructor(domain,contextName){super({code:"DOMAIN_NOT_FOUND",meta:{domain},message:`Domain not found by "${domain}"${contextName?` under ${import_chalk2.default.bold(contextName)}`:""}.`})}},DomainNotVerified=class extends NowError{constructor(domain){super({code:"DOMAIN_NOT_VERIFIED",meta:{domain},message:`The domain ${domain} is not verified.`})}},DomainVerificationFailed=class extends NowError{constructor({domain,nsVerification,txtVerification,purchased=!1}){super({code:"DOMAIN_VERIFICATION_FAILED",meta:{domain,nsVerification,txtVerification,purchased},message:`We can't verify the domain ${domain}. Both Name Servers and DNS TXT verifications failed.`})}},InvalidDomain=class extends NowError{constructor(domain,message){super({code:"INVALID_DOMAIN",meta:{domain},message:message||`The domain ${domain} is not valid.`})}},NotDomainOwner=class extends NowError{constructor(message){super({code:"NOT_DOMAIN_OWNER",meta:{},message})}},InvalidDeploymentId=class extends NowError{constructor(id,message){super({code:"INVALID_DEPLOYMENT_ID",meta:{id},message:message||`The deployment id "${id}" is not valid.`})}},UnsupportedTLD=class extends NowError{constructor(domain){super({code:"UNSUPPORTED_TLD",meta:{domain},message:`The TLD for domain name ${domain} is not supported.`})}},TLDNotSupportedViaCLI=class extends NowError{constructor(domain){super({code:"UNSUPPORTED_TLD_VIA_CLI",meta:{domain},message:`Purchased for the TLD for domain name ${domain} are not supported via the CLI. Use the REST API or the dashboard to purchase.`})}},DomainNotAvailable=class extends NowError{constructor(domain){super({code:"DOMAIN_NOT_AVAILABLE",meta:{domain},message:`The domain ${domain} is not available to be purchased.`})}};var UnexpectedDomainPurchaseError=class extends NowError{constructor(domain){super({code:"UNEXPECTED_DOMAIN_PURCHASE_ERROR",meta:{domain},message:"An unexpected error happened while purchasing."})}},UnexpectedDomainTransferError=class extends NowError{constructor(domain){super({code:"UNEXPECTED_DOMAIN_TRANSFER_ERROR",meta:{domain},message:"An unexpected error happened while transferring."})}},DomainPaymentError=class extends NowError{constructor(){super({code:"DOMAIN_PAYMENT_ERROR",meta:{},message:"Your card was declined."})}},DomainPurchasePending=class extends NowError{constructor(domain){super({code:"DOMAIN_PURCHASE_PENDING",meta:{domain},message:`The domain purchase for ${domain} is pending.`})}},UserAborted=class extends NowError{constructor(){super({code:"USER_ABORTED",meta:{},message:"The user canceled the operation."})}},CertNotFound=class extends NowError{constructor(id){super({code:"CERT_NOT_FOUND",meta:{id},message:`The cert ${id} can't be found.`})}},CertsPermissionDenied=class extends NowError{constructor(context,domain){super({code:"CERTS_PERMISSION_DENIED",meta:{domain},message:`You don't have access to ${domain}'s certs under ${context}.`})}},CertOrderNotFound=class extends NowError{constructor(cns){super({code:"CERT_ORDER_NOT_FOUND",meta:{cns},message:`No cert order could be found for cns ${cns.join(" ,")}`})}},TooManyRequests=class extends NowError{constructor(api,retryAfterMs){super({code:"TOO_MANY_REQUESTS",meta:{api,retryAfterMs},message:"Rate limited. Too many requests to the same endpoint."})}},CertError=class extends NowError{constructor({cns,code:code2,message,helpUrl}){super({code:"CERT_ERROR",meta:{cns,code:code2,helpUrl},message})}},CertConfigurationError=class extends NowError{constructor({cns,message,external,type,helpUrl}){super({code:"CERT_CONFIGURATION_ERROR",meta:{cns,helpUrl,external,type},message})}},DeploymentNotFound=class extends NowError{constructor({context,id=""}){super({code:"DEPLOYMENT_NOT_FOUND",meta:{id,context},message:`Can't find the deployment "${id}" under the context "${context}"`})}},DeploymentNotReady=class extends NowError{constructor({url=""}){super({code:"DEPLOYMENT_NOT_READY",meta:{url},message:`The deployment https://${url} is not ready.`})}},DeploymentFailedAliasImpossible=class extends NowError{constructor(){super({code:"DEPLOYMENT_FAILED_ALIAS_IMPOSSIBLE",meta:{},message:"The deployment build has failed and cannot be aliased"})}},DeploymentPermissionDenied=class extends NowError{constructor(id,context){super({code:"DEPLOYMENT_PERMISSION_DENIED",meta:{id,context},message:`You don't have access to the deployment ${id} under ${context}.`})}},InvalidAlias=class extends NowError{constructor(alias){super({code:"INVALID_ALIAS",meta:{alias},message:`The given alias ${alias} is not valid`})}},AliasInUse=class extends NowError{constructor(alias){super({code:"ALIAS_IN_USE",meta:{alias},message:"The alias is already in use"})}},CertMissing=class extends NowError{constructor(domain){super({code:"CERT_MISSING",meta:{domain},message:`The certificate for domain ${domain} is missing`})}},CantParseJSONFile=class extends NowError{constructor(file,parseErrorLocation){let message=`Can't parse json file ${file}: ${parseErrorLocation}`;super({code:"CANT_PARSE_JSON_FILE",meta:{file,parseErrorLocation},message})}},ConflictingConfigFiles=class extends import_build_utils.NowBuildError{constructor(files,message,link){super({code:"CONFLICTING_CONFIG_FILES",message:message||"Multiple config files found. Please use only one configuration file.",link:link||"https://vercel.link/combining-old-and-new-config"});this.files=files}},DeprecatedNowJson=class extends import_build_utils.NowBuildError{constructor(_file){super({code:"DEPRECATED_NOW_JSON",message:"The `now.json` file is deprecated and no longer supported. Please rename it to `vercel.json`.",link:"https://vercel.com/docs/projects/project-configuration"})}},CantFindConfig=class extends NowError{constructor(paths){super({code:"CANT_FIND_CONFIG",meta:{paths},message:"Can't find a configuration file in the given locations."})}},WorkingDirectoryDoesNotExist=class extends NowError{constructor(){super({code:"CWD_DOES_NOT_EXIST",meta:{},message:"The current working directory does not exist."})}};var NoAliasInConfig=class extends NowError{constructor(){super({code:"NO_ALIAS_IN_CONFIG",meta:{},message:"There is no alias set up in config file."})}},InvalidAliasInConfig=class extends NowError{constructor(value){super({code:"INVALID_ALIAS_IN_CONFIG",meta:{value},message:"Invalid alias option in configuration."})}};var DNSPermissionDenied=class extends NowError{constructor(domain){super({code:"DNS_PERMISSION_DENIED",meta:{domain},message:`You don't have access to the DNS records of ${domain}.`})}},DNSInvalidPort=class extends NowError{constructor(){super({code:"DNS_INVALID_PORT",meta:{},message:"Invalid <port> parameter. A number was expected"})}},DNSInvalidType=class extends NowError{constructor(type){super({code:"DNS_INVALID_TYPE",meta:{type},message:`Invalid <type> parameter "${type}". Expected one of A, AAAA, ALIAS, CAA, CNAME, MX, SRV, TXT`})}},DNSConflictingRecord=class extends NowError{constructor(record){super({code:"DNS_CONFLICTING_RECORD",meta:{record},message:` A conflicting record exists "${record}".`})}},DomainRemovalConflict=class extends NowError{constructor({aliases,certs,message,pendingAsyncPurchase,resolvable,suffix,transferring}){super({code:"domain_removal_conflict",meta:{aliases,certs,pendingAsyncPurchase,suffix,transferring,resolvable},message})}},DomainMoveConflict=class extends NowError{constructor({message,pendingAsyncPurchase,resolvable,suffix}){super({code:"domain_move_conflict",meta:{pendingAsyncPurchase,resolvable,suffix},message})}};var InvalidMoveDestination=class extends NowError{constructor(destination){super({code:"INVALID_MOVE_DESTINATION",message:`Invalid move destination "${destination}"`,meta:{destination}})}};var LambdaSizeExceededError=class extends NowError{constructor(size,maxLambdaSize){super({code:"MAX_LAMBDA_SIZE_EXCEEDED",message:`The lambda function size (${(0,import_bytes.default)(size).toLowerCase()}) exceeds the maximum size limit (${(0,import_bytes.default)(maxLambdaSize).toLowerCase()}).`,meta:{size,maxLambdaSize}})}},MissingDotenvVarsError=class extends NowError{constructor(type,missing){let message;missing.length===1?message=`Env var ${JSON.stringify(missing[0])} is not defined in ${code(type)} file`:message=[`The following env vars are not defined in ${code(type)} file:`,...missing.map(name=>` - ${JSON.stringify(name)}`)].join(`
|
|
7
|
+
import{getCommandName}from"./chunk-FI772UVH.js";import{require_build_utils}from"./chunk-Q2YQSMIB.js";import{require_dist}from"./chunk-QGIQK47P.js";import{require_source}from"./chunk-U7KCDTCH.js";import{__commonJS,__toESM}from"./chunk-6L236MNA.js";var require_bytes=__commonJS({"../../node_modules/.pnpm/bytes@3.0.0/node_modules/bytes/index.js"(exports,module){"use strict";module.exports=bytes2;module.exports.format=format;module.exports.parse=parse;var formatThousandsRegExp=/\B(?=(\d{3})+(?!\d))/g,formatDecimalsRegExp=/(?:\.0*|(\.[^0]+)0+)$/,map={b:1,kb:1024,mb:1<<20,gb:1<<30,tb:(1<<30)*1024},parseRegExp=/^((-|\+)?(\d+(?:\.\d+)?)) *(kb|mb|gb|tb)$/i;function bytes2(value,options){return typeof value=="string"?parse(value):typeof value=="number"?format(value,options):null}function format(value,options){if(!Number.isFinite(value))return null;var mag=Math.abs(value),thousandsSeparator=options&&options.thousandsSeparator||"",unitSeparator=options&&options.unitSeparator||"",decimalPlaces=options&&options.decimalPlaces!==void 0?options.decimalPlaces:2,fixedDecimals=!!(options&&options.fixedDecimals),unit=options&&options.unit||"";(!unit||!map[unit.toLowerCase()])&&(mag>=map.tb?unit="TB":mag>=map.gb?unit="GB":mag>=map.mb?unit="MB":mag>=map.kb?unit="KB":unit="B");var val=value/map[unit.toLowerCase()],str=val.toFixed(decimalPlaces);return fixedDecimals||(str=str.replace(formatDecimalsRegExp,"$1")),thousandsSeparator&&(str=str.replace(formatThousandsRegExp,thousandsSeparator)),str+unitSeparator+unit}function parse(val){if(typeof val=="number"&&!isNaN(val))return val;if(typeof val!="string")return null;var results=parseRegExp.exec(val),floatValue,unit="b";return results?(floatValue=parseFloat(results[1]),unit=results[4].toLowerCase()):(floatValue=parseInt(val,10),unit="b"),Math.floor(map[unit]*floatValue)}}});var NowError=class extends Error{constructor({code:code2,message,meta}){super(message);this.code=code2,this.meta=meta}};var import_chalk=__toESM(require_source(),1);function code(cmd,{backticks=!0}={}){let tick=backticks?import_chalk.default.gray("`"):"";return`${tick}${import_chalk.default.bold(cmd)}${tick}`}var import_bytes=__toESM(require_bytes(),1),import_build_utils=__toESM(require_build_utils(),1);var import_chalk2=__toESM(require_source(),1),import_error_utils=__toESM(require_dist(),1),APIError=class extends Error{constructor(message,response,body){super();if(this.message=`${message} (${response.status})`,this.status=response.status,this.serverMessage=message,this.wwwAuthenticate=response.headers.get("WWW-Authenticate")??void 0,body)for(let field of Object.keys(body))field!=="message"&&(this[field]=body[field]);if(response.status===429||response.status===503){let parsed=parseRetryAfterHeaderAsMillis(response.headers.get("Retry-After"));this.retryAfterMs=parsed??(response.status===429?0:void 0)}}};function parseRetryAfterHeaderAsMillis(header){if(!header)return;let retryAfterMs=Number(header)*1e3;if(Number.isNaN(retryAfterMs)){if(retryAfterMs=Date.parse(header),Number.isNaN(retryAfterMs))return;retryAfterMs=retryAfterMs-Date.now()}return Math.max(retryAfterMs,0)}function isAPIError(v){return(0,import_error_utils.isError)(v)&&"status"in v}var TeamDeleted=class extends NowError{constructor(){super({code:"TEAM_DELETED",message:`Your team was deleted or you were removed from the team. You can switch to a different one using ${getCommandName("switch")}.`,meta:{}})}},InvalidToken=class extends NowError{constructor(tokenSource){let message;tokenSource==="flag"?message="The token provided via `--token` argument is not valid. Please provide a valid token.":tokenSource==="env"?message="The token provided via VERCEL_TOKEN environment variable is not valid. Please provide a valid token.":message=`The specified token is not valid. Use ${getCommandName("login")} to generate a new token.`,super({code:"NOT_AUTHORIZED",message,meta:{}})}},MissingUser=class extends NowError{constructor(){super({code:"MISSING_USER",message:"Not able to load user, missing from response",meta:{}})}},DomainAlreadyExists=class extends NowError{constructor(domain){super({code:"DOMAIN_ALREADY_EXISTS",meta:{domain},message:`The domain ${domain} already exists under a different context.`})}},DomainPermissionDenied=class extends NowError{constructor(domain,context){super({code:"DOMAIN_PERMISSION_DENIED",meta:{domain,context},message:`You don't have access to the domain ${domain} under ${context}.`})}},DomainExternal=class extends NowError{constructor(domain){super({code:"DOMAIN_EXTERNAL",meta:{domain},message:`The domain ${domain} must point to zeit.world.`})}},SourceNotFound=class extends NowError{constructor(){super({code:"SOURCE_NOT_FOUND",meta:{},message:"Not able to purchase. Please add a payment method using the dashboard."})}};var DomainNotFound=class extends NowError{constructor(domain,contextName){super({code:"DOMAIN_NOT_FOUND",meta:{domain},message:`Domain not found by "${domain}"${contextName?` under ${import_chalk2.default.bold(contextName)}`:""}.`})}},DomainNotVerified=class extends NowError{constructor(domain){super({code:"DOMAIN_NOT_VERIFIED",meta:{domain},message:`The domain ${domain} is not verified.`})}},DomainVerificationFailed=class extends NowError{constructor({domain,nsVerification,txtVerification,purchased=!1}){super({code:"DOMAIN_VERIFICATION_FAILED",meta:{domain,nsVerification,txtVerification,purchased},message:`We can't verify the domain ${domain}. Both Name Servers and DNS TXT verifications failed.`})}},InvalidDomain=class extends NowError{constructor(domain,message){super({code:"INVALID_DOMAIN",meta:{domain},message:message||`The domain ${domain} is not valid.`})}},NotDomainOwner=class extends NowError{constructor(message){super({code:"NOT_DOMAIN_OWNER",meta:{},message})}},InvalidDeploymentId=class extends NowError{constructor(id,message){super({code:"INVALID_DEPLOYMENT_ID",meta:{id},message:message||`The deployment id "${id}" is not valid.`})}},UnsupportedTLD=class extends NowError{constructor(domain){super({code:"UNSUPPORTED_TLD",meta:{domain},message:`The TLD for domain name ${domain} is not supported.`})}},TLDNotSupportedViaCLI=class extends NowError{constructor(domain){super({code:"UNSUPPORTED_TLD_VIA_CLI",meta:{domain},message:`Purchased for the TLD for domain name ${domain} are not supported via the CLI. Use the REST API or the dashboard to purchase.`})}},DomainNotAvailable=class extends NowError{constructor(domain){super({code:"DOMAIN_NOT_AVAILABLE",meta:{domain},message:`The domain ${domain} is not available to be purchased.`})}};var UnexpectedDomainPurchaseError=class extends NowError{constructor(domain){super({code:"UNEXPECTED_DOMAIN_PURCHASE_ERROR",meta:{domain},message:"An unexpected error happened while purchasing."})}},UnexpectedDomainTransferError=class extends NowError{constructor(domain){super({code:"UNEXPECTED_DOMAIN_TRANSFER_ERROR",meta:{domain},message:"An unexpected error happened while transferring."})}},DomainPaymentError=class extends NowError{constructor(){super({code:"DOMAIN_PAYMENT_ERROR",meta:{},message:"Your card was declined."})}},DomainPurchasePending=class extends NowError{constructor(domain){super({code:"DOMAIN_PURCHASE_PENDING",meta:{domain},message:`The domain purchase for ${domain} is pending.`})}},UserAborted=class extends NowError{constructor(){super({code:"USER_ABORTED",meta:{},message:"The user canceled the operation."})}},CertNotFound=class extends NowError{constructor(id){super({code:"CERT_NOT_FOUND",meta:{id},message:`The cert ${id} can't be found.`})}},CertsPermissionDenied=class extends NowError{constructor(context,domain){super({code:"CERTS_PERMISSION_DENIED",meta:{domain},message:`You don't have access to ${domain}'s certs under ${context}.`})}},CertOrderNotFound=class extends NowError{constructor(cns){super({code:"CERT_ORDER_NOT_FOUND",meta:{cns},message:`No cert order could be found for cns ${cns.join(" ,")}`})}},TooManyRequests=class extends NowError{constructor(api,retryAfterMs){super({code:"TOO_MANY_REQUESTS",meta:{api,retryAfterMs},message:"Rate limited. Too many requests to the same endpoint."})}},CertError=class extends NowError{constructor({cns,code:code2,message,helpUrl}){super({code:"CERT_ERROR",meta:{cns,code:code2,helpUrl},message})}},CertConfigurationError=class extends NowError{constructor({cns,message,external,type,helpUrl}){super({code:"CERT_CONFIGURATION_ERROR",meta:{cns,helpUrl,external,type},message})}},DeploymentNotFound=class extends NowError{constructor({context,id=""}){super({code:"DEPLOYMENT_NOT_FOUND",meta:{id,context},message:`Can't find the deployment "${id}" under the context "${context}"`})}},DeploymentNotReady=class extends NowError{constructor({url=""}){super({code:"DEPLOYMENT_NOT_READY",meta:{url},message:`The deployment https://${url} is not ready.`})}},DeploymentFailedAliasImpossible=class extends NowError{constructor(){super({code:"DEPLOYMENT_FAILED_ALIAS_IMPOSSIBLE",meta:{},message:"The deployment build has failed and cannot be aliased"})}},DeploymentPermissionDenied=class extends NowError{constructor(id,context){super({code:"DEPLOYMENT_PERMISSION_DENIED",meta:{id,context},message:`You don't have access to the deployment ${id} under ${context}.`})}},InvalidAlias=class extends NowError{constructor(alias){super({code:"INVALID_ALIAS",meta:{alias},message:`The given alias ${alias} is not valid`})}},AliasInUse=class extends NowError{constructor(alias){super({code:"ALIAS_IN_USE",meta:{alias},message:"The alias is already in use"})}},CertMissing=class extends NowError{constructor(domain){super({code:"CERT_MISSING",meta:{domain},message:`The certificate for domain ${domain} is missing`})}},CantParseJSONFile=class extends NowError{constructor(file,parseErrorLocation){let message=`Can't parse json file ${file}: ${parseErrorLocation}`;super({code:"CANT_PARSE_JSON_FILE",meta:{file,parseErrorLocation},message})}},ConflictingConfigFiles=class extends import_build_utils.NowBuildError{constructor(files,message,link){super({code:"CONFLICTING_CONFIG_FILES",message:message||"Multiple config files found. Please use only one configuration file.",link:link||"https://vercel.link/combining-old-and-new-config"});this.files=files}},DeprecatedNowJson=class extends import_build_utils.NowBuildError{constructor(_file){super({code:"DEPRECATED_NOW_JSON",message:"The `now.json` file is deprecated and no longer supported. Please rename it to `vercel.json`.",link:"https://vercel.com/docs/projects/project-configuration"})}},CantFindConfig=class extends NowError{constructor(paths){super({code:"CANT_FIND_CONFIG",meta:{paths},message:"Can't find a configuration file in the given locations."})}},WorkingDirectoryDoesNotExist=class extends NowError{constructor(){super({code:"CWD_DOES_NOT_EXIST",meta:{},message:"The current working directory does not exist."})}};var NoAliasInConfig=class extends NowError{constructor(){super({code:"NO_ALIAS_IN_CONFIG",meta:{},message:"There is no alias set up in config file."})}},InvalidAliasInConfig=class extends NowError{constructor(value){super({code:"INVALID_ALIAS_IN_CONFIG",meta:{value},message:"Invalid alias option in configuration."})}};var DNSPermissionDenied=class extends NowError{constructor(domain){super({code:"DNS_PERMISSION_DENIED",meta:{domain},message:`You don't have access to the DNS records of ${domain}.`})}},DNSInvalidPort=class extends NowError{constructor(){super({code:"DNS_INVALID_PORT",meta:{},message:"Invalid <port> parameter. A number was expected"})}},DNSInvalidType=class extends NowError{constructor(type){super({code:"DNS_INVALID_TYPE",meta:{type},message:`Invalid <type> parameter "${type}". Expected one of A, AAAA, ALIAS, CAA, CNAME, MX, SRV, TXT`})}},DNSConflictingRecord=class extends NowError{constructor(record){super({code:"DNS_CONFLICTING_RECORD",meta:{record},message:` A conflicting record exists "${record}".`})}},DomainRemovalConflict=class extends NowError{constructor({aliases,certs,message,pendingAsyncPurchase,resolvable,suffix,transferring}){super({code:"domain_removal_conflict",meta:{aliases,certs,pendingAsyncPurchase,suffix,transferring,resolvable},message})}},DomainMoveConflict=class extends NowError{constructor({message,pendingAsyncPurchase,resolvable,suffix}){super({code:"domain_move_conflict",meta:{pendingAsyncPurchase,resolvable,suffix},message})}};var InvalidMoveDestination=class extends NowError{constructor(destination){super({code:"INVALID_MOVE_DESTINATION",message:`Invalid move destination "${destination}"`,meta:{destination}})}};var LambdaSizeExceededError=class extends NowError{constructor(size,maxLambdaSize){super({code:"MAX_LAMBDA_SIZE_EXCEEDED",message:`The lambda function size (${(0,import_bytes.default)(size).toLowerCase()}) exceeds the maximum size limit (${(0,import_bytes.default)(maxLambdaSize).toLowerCase()}).`,meta:{size,maxLambdaSize}})}},MissingDotenvVarsError=class extends NowError{constructor(type,missing){let message;missing.length===1?message=`Env var ${JSON.stringify(missing[0])} is not defined in ${code(type)} file`:message=[`The following env vars are not defined in ${code(type)} file:`,...missing.map(name=>` - ${JSON.stringify(name)}`)].join(`
|
|
8
8
|
`),message+=`
|
|
9
9
|
Read more: https://err.sh/vercel/missing-env-file`,super({code:"MISSING_DOTENV_VARS",message,meta:{type,missing}})}},DeploymentsRateLimited=class extends NowError{constructor(message){super({code:"DEPLOYMENTS_RATE_LIMITED",meta:{},message})}},BuildsRateLimited=class extends NowError{constructor(message,meta={}){super({code:"BUILDS_RATE_LIMITED",meta,message})}},ProjectNotFound=class extends NowError{constructor(nameOrId){super({code:"PROJECT_NOT_FOUND",meta:{},message:`There is no project for "${nameOrId}"`})}},LinkRequiredError=class extends NowError{constructor(message="No project is linked in this directory. Run `vercel link` or pass a project name."){super({code:"LINK_REQUIRED",meta:{},message})}},AliasDomainConfigured=class extends NowError{constructor({message}){super({code:"DOMAIN_CONFIGURED",meta:{},message})}},MissingBuildScript=class extends NowError{constructor({message}){super({code:"MISSING_BUILD_SCRIPT",meta:{},message})}},ConflictingFilePath=class extends NowError{constructor({message}){super({code:"CONFLICTING_FILE_PATH",meta:{},message})}},ConflictingPathSegment=class extends NowError{constructor({message}){super({code:"CONFLICTING_PATH_SEGMENT",meta:{},message})}},BuildError=class extends NowError{constructor({message,meta}){super({code:"BUILD_ERROR",meta,message})}},SchemaValidationFailed=class extends NowError{constructor(message,keyword,dataPath,params){super({code:"SCHEMA_VALIDATION_FAILED",meta:{message,keyword,dataPath,params},message:"Schema verification failed"})}},InvalidLocalConfig=class extends NowError{constructor(value){super({code:"INVALID_LOCAL_CONFIG",meta:{value},message:`Invalid local config parameter [${value.map(localConfig=>`"${localConfig}"`).join(", ")}]. A string was expected.`})}};export{require_bytes,NowError,code,APIError,parseRetryAfterHeaderAsMillis,isAPIError,TeamDeleted,InvalidToken,MissingUser,DomainAlreadyExists,DomainPermissionDenied,DomainExternal,SourceNotFound,DomainNotFound,DomainNotVerified,DomainVerificationFailed,InvalidDomain,NotDomainOwner,InvalidDeploymentId,UnsupportedTLD,TLDNotSupportedViaCLI,DomainNotAvailable,UnexpectedDomainPurchaseError,UnexpectedDomainTransferError,DomainPaymentError,DomainPurchasePending,UserAborted,CertNotFound,CertsPermissionDenied,CertOrderNotFound,TooManyRequests,CertError,CertConfigurationError,DeploymentNotFound,DeploymentNotReady,DeploymentFailedAliasImpossible,DeploymentPermissionDenied,InvalidAlias,AliasInUse,CertMissing,CantParseJSONFile,ConflictingConfigFiles,DeprecatedNowJson,CantFindConfig,WorkingDirectoryDoesNotExist,NoAliasInConfig,InvalidAliasInConfig,DNSPermissionDenied,DNSInvalidPort,DNSInvalidType,DNSConflictingRecord,DomainRemovalConflict,DomainMoveConflict,InvalidMoveDestination,LambdaSizeExceededError,MissingDotenvVarsError,DeploymentsRateLimited,BuildsRateLimited,ProjectNotFound,LinkRequiredError,AliasDomainConfigured,MissingBuildScript,ConflictingFilePath,ConflictingPathSegment,BuildError,SchemaValidationFailed,InvalidLocalConfig};
|
|
10
10
|
/*! Bundled license information:
|