vercel 60.1.1 → 60.1.3

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.
Files changed (117) hide show
  1. package/dist/chunks/{add-QBCRXMR3.js → add-5INBQVKB.js} +1 -1
  2. package/dist/chunks/{add-JKIDAH7K.js → add-IEQXYKXU.js} +1 -1
  3. package/dist/chunks/{add-D6D2J6ID.js → add-QJSYPE26.js} +1 -1
  4. package/dist/chunks/{build-PP4JOW2C.js → build-Z7KM3GMP.js} +1 -1
  5. package/dist/chunks/{chunk-7HT5KIFA.js → chunk-25LSRUTF.js} +1 -1
  6. package/dist/chunks/{chunk-2ZIWDSUX.js → chunk-3HLNS2I4.js} +1 -1
  7. package/dist/chunks/{chunk-3KQRJYBJ.js → chunk-3MVT26LH.js} +1 -1
  8. package/dist/chunks/{chunk-M6UYGRPW.js → chunk-7CTHRXTG.js} +1 -1
  9. package/dist/chunks/{chunk-YG6LPJFT.js → chunk-7QVVD3WT.js} +1 -1
  10. package/dist/chunks/{chunk-7JAKGIQ6.js → chunk-B6PMTBCU.js} +1 -1
  11. package/dist/chunks/{chunk-GK5C5TE5.js → chunk-BEGUGOL7.js} +1 -1
  12. package/dist/chunks/{chunk-SGU7YIY3.js → chunk-BHVHQKUZ.js} +1 -1
  13. package/dist/chunks/{chunk-2TBUMUHF.js → chunk-CN4SCEIP.js} +1 -1
  14. package/dist/chunks/{chunk-Q5VLP2LY.js → chunk-D2ZPYXZ6.js} +1 -1
  15. package/dist/chunks/{chunk-CD4FLZED.js → chunk-DV4Z4WSD.js} +1 -1
  16. package/dist/chunks/{chunk-77WAICTF.js → chunk-E3EJLJFQ.js} +1 -1
  17. package/dist/chunks/{chunk-WUH5HYCX.js → chunk-FZKWLGRG.js} +1 -1
  18. package/dist/chunks/{chunk-ZWYU5SBC.js → chunk-GL7HB5ZK.js} +1 -1
  19. package/dist/chunks/{chunk-G77TCKNI.js → chunk-HJ3E752K.js} +1 -1
  20. package/dist/chunks/{chunk-LNOX5GIA.js → chunk-IS43O66T.js} +1 -1
  21. package/dist/chunks/{chunk-GZBSABCA.js → chunk-JM3BFUXX.js} +1 -1
  22. package/dist/chunks/{chunk-4S6WFNRF.js → chunk-JZUVWAOK.js} +2 -2
  23. package/dist/chunks/chunk-LAYFSD5A.js +7 -0
  24. package/dist/chunks/{chunk-4OKKSZVX.js → chunk-LFQTA3CF.js} +1 -1
  25. package/dist/chunks/{chunk-KTB75ID3.js → chunk-M5Y335WI.js} +1 -1
  26. package/dist/chunks/{chunk-6A6LV2S2.js → chunk-MDZ2JJP3.js} +1 -1
  27. package/dist/chunks/{chunk-IXN5A5WZ.js → chunk-NR367IWV.js} +1 -1
  28. package/dist/chunks/{chunk-JMNAVONO.js → chunk-OCWSKPV4.js} +1 -1
  29. package/dist/chunks/{chunk-YMLWTVT5.js → chunk-QLS2XUFL.js} +1 -1
  30. package/dist/chunks/{chunk-RB3NPNPD.js → chunk-QVAZWF3J.js} +1 -1
  31. package/dist/chunks/{chunk-DPH3CQXE.js → chunk-R7ZRVA7E.js} +2 -2
  32. package/dist/chunks/{chunk-HMB4MZOB.js → chunk-RMYQX7NP.js} +1 -1
  33. package/dist/chunks/{chunk-C6QYMZ3S.js → chunk-TAG2AZXS.js} +1 -1
  34. package/dist/chunks/{chunk-RLCFE3MK.js → chunk-TTKDYUJD.js} +3 -3
  35. package/dist/chunks/{chunk-MSLHCYBD.js → chunk-U6AYMUHX.js} +2 -2
  36. package/dist/chunks/{chunk-URI72S7J.js → chunk-UFZ4W2PA.js} +1 -1
  37. package/dist/chunks/{chunk-VVWALKUM.js → chunk-UO2ECTIU.js} +1 -1
  38. package/dist/chunks/{chunk-STO2JRII.js → chunk-V54UKUGF.js} +1 -1
  39. package/dist/chunks/{chunk-3CQQXHDI.js → chunk-VCB6KNW3.js} +1 -1
  40. package/dist/chunks/chunk-W26LLGQV.js +7 -0
  41. package/dist/chunks/{chunk-H4IUDU5W.js → chunk-YXBDDHPL.js} +1 -1
  42. package/dist/chunks/{chunk-LUVIR6F2.js → chunk-YXTE2H6I.js} +1 -1
  43. package/dist/chunks/{clear-TQFWNYKK.js → clear-AZWSIGIF.js} +1 -1
  44. package/dist/chunks/{compile-vercel-config-YY3CODZP.js → compile-vercel-config-56X2X4Z3.js} +1 -1
  45. package/dist/chunks/{config-4FCRR7C5.js → config-A53AXEGB.js} +1 -1
  46. package/dist/chunks/{config-VZQLRHHA.js → config-NGVEJABO.js} +1 -1
  47. package/dist/chunks/config-validator.mjs +1 -1
  48. package/dist/chunks/{delete-MPLEIGYN.js → delete-LX44AJYC.js} +1 -1
  49. package/dist/chunks/{delete-L45TA4WK.js → delete-TA6UVDSJ.js} +1 -1
  50. package/dist/chunks/{detect-projects-3AFQ2AC5.js → detect-projects-LEVGWMQE.js} +1 -1
  51. package/dist/chunks/{detect-services-7QL6RPKV.js → detect-services-KO3GQ2ZK.js} +1 -1
  52. package/dist/chunks/{disable-WY6N4R7I.js → disable-E7TU3QIX.js} +1 -1
  53. package/dist/chunks/{discard-3VYFSUTH.js → discard-SVF5HBYG.js} +1 -1
  54. package/dist/chunks/{edit-VOZ4IKZI.js → edit-2RLFRAOJ.js} +1 -1
  55. package/dist/chunks/{edit-FCPWK252.js → edit-VCOF42GW.js} +1 -1
  56. package/dist/chunks/{enable-IJ7UEQ3G.js → enable-H6RL2XIW.js} +1 -1
  57. package/dist/chunks/{export-L4D4GCJI.js → export-JW3FFP7N.js} +1 -1
  58. package/dist/chunks/{generate-cert-for-deploy-GSWBCLZX.js → generate-cert-for-deploy-25UQ2477.js} +1 -1
  59. package/dist/chunks/{image-ORGBK7MR.js → image-MHAVMOJB.js} +1 -1
  60. package/dist/chunks/{import-builders-N4XIYEW5.js → import-builders-5UODCCVF.js} +1 -1
  61. package/dist/chunks/{inspect-377IAEIY.js → inspect-43UJHR4K.js} +1 -1
  62. package/dist/chunks/{inspect-V6IX3MOJ.js → inspect-HJF2XFBX.js} +1 -1
  63. package/dist/chunks/{inspect-F4OENUQT.js → inspect-KBJ7F64J.js} +1 -1
  64. package/dist/chunks/{inspect-GTALMRKE.js → inspect-LIGFVYDM.js} +1 -1
  65. package/dist/chunks/{inspect-2EMBEQHZ.js → inspect-VETXDYUD.js} +1 -1
  66. package/dist/chunks/{list-57XWFXDW.js → list-EGYYRTG5.js} +1 -1
  67. package/dist/chunks/{list-GKXJQRX6.js → list-KAGIR3PD.js} +1 -1
  68. package/dist/chunks/{list-5ZBTU324.js → list-NAABRL7N.js} +1 -1
  69. package/dist/chunks/{login-MQXAAFBP.js → login-MZ67I5ZB.js} +1 -1
  70. package/dist/chunks/{logs-ZYELN5F2.js → logs-GHHH2DZA.js} +1 -1
  71. package/dist/chunks/{ls-AAU7AKS7.js → ls-7JFKEA5P.js} +1 -1
  72. package/dist/chunks/{ls-POKSXYZU.js → ls-GOLB26ER.js} +1 -1
  73. package/dist/chunks/{ls-VYEJT272.js → ls-JHJPWFMF.js} +1 -1
  74. package/dist/chunks/{ls-LMHRMNKE.js → ls-MMA5XS6S.js} +1 -1
  75. package/dist/chunks/{ls-NX3EMRFH.js → ls-QXEB3MBD.js} +1 -1
  76. package/dist/chunks/{ls-GD6LB7IE.js → ls-UAQ2QDGG.js} +1 -1
  77. package/dist/chunks/{ls-ADATML6R.js → ls-YA4OQL3F.js} +1 -1
  78. package/dist/chunks/{mutate-QMU5QHF3.js → mutate-AJYMI5UB.js} +1 -1
  79. package/dist/chunks/{notifications-OYUKYMU7.js → notifications-DKZMDRHS.js} +1 -1
  80. package/dist/chunks/{open-SNN3JPON.js → open-L5DJKOV4.js} +1 -1
  81. package/dist/chunks/{permissions-5LSKNTW7.js → permissions-BRSVLT6O.js} +1 -1
  82. package/dist/chunks/{publish-FIHJARRJ.js → publish-PXKC5GXE.js} +1 -1
  83. package/dist/chunks/{pull-2M2BJYAS.js → pull-ZBELCNJJ.js} +1 -1
  84. package/dist/chunks/{purchase-domain-if-available-VKWKDDUD.js → purchase-domain-if-available-BI7AHJMX.js} +1 -1
  85. package/dist/chunks/{push-VN6BPT3B.js → push-G4JYPC5S.js} +1 -1
  86. package/dist/chunks/{query-P35ZTMXV.js → query-JGUDFRPJ.js} +1 -1
  87. package/dist/chunks/{reorder-L4L2V3MZ.js → reorder-VTFBS2DW.js} +1 -1
  88. package/dist/chunks/{reply-XIJ54B7U.js → reply-HXGAMNR6.js} +1 -1
  89. package/dist/chunks/{resolve-W2O6M4GH.js → resolve-IGQSKGRI.js} +1 -1
  90. package/dist/chunks/{restore-OZPJHXTE.js → restore-XKLJMOKB.js} +1 -1
  91. package/dist/chunks/{rm-IM7VAVCG.js → rm-3REOGKTJ.js} +1 -1
  92. package/dist/chunks/{rm-4EUHQZ7U.js → rm-C2OYOAJY.js} +1 -1
  93. package/dist/chunks/{rm-OYSWVVSJ.js → rm-DL7NRDLF.js} +1 -1
  94. package/dist/chunks/{rm-2YDLXDCB.js → rm-DTF2JN5L.js} +1 -1
  95. package/dist/chunks/{rm-HM7V26WX.js → rm-SQM4TQOV.js} +1 -1
  96. package/dist/chunks/{rule-inspect-75RUPIVB.js → rule-inspect-PQUJOWHR.js} +1 -1
  97. package/dist/chunks/{rules-PKOTTFKG.js → rules-IX7WN6XW.js} +1 -1
  98. package/dist/chunks/{schema-EPUGS3PX.js → schema-R2J4TS6Q.js} +1 -1
  99. package/dist/chunks/{schema-NJC47D5M.js → schema-WFKR7ULE.js} +1 -1
  100. package/dist/chunks/{set-GESKJPQA.js → set-763MJP2G.js} +1 -1
  101. package/dist/chunks/{setup-and-link-PM46H7GU.js → setup-and-link-57NI3GOM.js} +1 -1
  102. package/dist/chunks/{tags-MBJR7IQW.js → tags-FE4GVQQO.js} +1 -1
  103. package/dist/chunks/{update-TNUYPCS3.js → update-27EMACWZ.js} +1 -1
  104. package/dist/chunks/vlt-builder-importer-QEWS6M2P.js +11 -0
  105. package/dist/commands/build/index.js +1 -1
  106. package/dist/commands/deploy/index.js +3 -3
  107. package/dist/commands/dev/index.js +5 -5
  108. package/dist/commands/env/index.js +1 -1
  109. package/dist/commands/link/index.js +1 -1
  110. package/dist/commands/list/index.js +1 -1
  111. package/dist/commands-bulk.js +20 -16
  112. package/dist/index.js +1 -1
  113. package/dist/version.mjs +1 -1
  114. package/package.json +53 -53
  115. package/dist/chunks/chunk-6PFC3KWQ.js +0 -7
  116. package/dist/chunks/chunk-VHTNAYWA.js +0 -7
  117. package/dist/chunks/vlt-builder-importer-6DGKK72W.js +0 -11
package/dist/index.js CHANGED
@@ -4,7 +4,7 @@ import { dirname as __dirname_ } from 'node:path';
4
4
  const require = __createRequire(import.meta.url);
5
5
  const __filename = __fileURLToPath(import.meta.url);
6
6
  const __dirname = __dirname_(__filename);
7
- import{BUILD_LABEL}from"./chunks/chunk-WKZ6JSGZ.js";import{help}from"./chunks/chunk-RYZ5FAUA.js";import{box,canAutoUpdate,executeAutomaticUpgrade,executeUpgrade,handleCommandTypo,hasAutoUpdatePreference,require_xdg_app_paths,scheduleNativeAutoUpdate,setAutoUpdate}from"./chunks/chunk-2ZIWDSUX.js";import{matchesCliApiTag}from"./chunks/chunk-AP36GAOG.js";import{getUpdateCommand}from"./chunks/chunk-Q5VLP2LY.js";import{require_semver}from"./chunks/chunk-KKS7XWEX.js";import{readJSONFile}from"./chunks/chunk-LNOX5GIA.js";import"./chunks/chunk-U56NHYAH.js";import{Client,isValidAccessToken}from"./chunks/chunk-6A6LV2S2.js";import"./chunks/chunk-TRTEXGVN.js";import"./chunks/chunk-T3GQAMBJ.js";import{require_ci_info}from"./chunks/chunk-T52FMXWC.js";import"./chunks/chunk-V6MR45PD.js";import"./chunks/chunk-2I64AYHG.js";import{shouldPrintVersionBanner,wantsMachineReadableOutput}from"./chunks/chunk-D4MW3RDW.js";import"./chunks/chunk-P2O5DOYE.js";import"./chunks/chunk-L3JDEHCQ.js";import"./chunks/chunk-N6CNMMSZ.js";import{getTeams}from"./chunks/chunk-I46LFJJG.js";import{commands,commandsStructs,isHiddenCommand}from"./chunks/chunk-KOOED3TJ.js";import"./chunks/chunk-DKV4IVH5.js";import"./chunks/chunk-IVWPQYIH.js";import"./chunks/chunk-65JYSI26.js";import"./chunks/chunk-YMVDWVMO.js";import"./chunks/chunk-O7G3CZ42.js";import"./chunks/chunk-N3N5UHIL.js";import"./chunks/chunk-WUZD4KBL.js";import"./chunks/chunk-QFPCR4NL.js";import"./chunks/chunk-5ENY7DSN.js";import"./chunks/chunk-UTVDFSQS.js";import"./chunks/chunk-SW7MNF4H.js";import"./chunks/chunk-MEAY2K5Z.js";import"./chunks/chunk-EQ52F4LH.js";import"./chunks/chunk-CVKB54WW.js";import"./chunks/chunk-JKTQV2QJ.js";import"./chunks/chunk-Y7PHTVZ6.js";import"./chunks/chunk-WSZHNPA6.js";import"./chunks/chunk-FAW6NBLQ.js";import"./chunks/chunk-5UOVEMYX.js";import"./chunks/chunk-SOJCELXH.js";import{param}from"./chunks/chunk-SXUEGVWB.js";import"./chunks/chunk-ZKYS7EAB.js";import{getAuthConfigFilePath,getConfigFilePath,getScope,highlight,isAppPrincipalEnabled,readAuthConfigFile,readConfigFile,resolveAppTokenScope,writeToConfigFile}from"./chunks/chunk-4OKKSZVX.js";import{getGlobalPathConfig}from"./chunks/chunk-JSKGZLE4.js";import{TelemetryClient,TelemetryEventStore}from"./chunks/chunk-A5VLP25I.js";import"./chunks/chunk-RCTYVKM5.js";import{isNativeBinaryInstall}from"./chunks/chunk-7T6TL3GQ.js";import{require_types}from"./chunks/chunk-GHM7V3GG.js";import"./chunks/chunk-5XJNPXQK.js";import{printError}from"./chunks/chunk-N5AIKGEO.js";import{getArgs,parseArguments}from"./chunks/chunk-WWB66KP5.js";import{setFetchDispatcher}from"./chunks/chunk-MY4MONOH.js";import{getLinkFromDir,getVercelDirectory,hasLocalProjectLink,require_lib}from"./chunks/chunk-RLCFE3MK.js";import"./chunks/chunk-F2ZWW2IO.js";import"./chunks/chunk-B4ATVYZW.js";import{humanizePath}from"./chunks/chunk-PPCFQQSU.js";import{require_cli_config}from"./chunks/chunk-BRK4OB4B.js";import"./chunks/chunk-OSCCYU74.js";import{shouldEmitNonInteractiveCommandError,trackAgentCommandOutcome}from"./chunks/chunk-KCARCOP5.js";import"./chunks/chunk-BKV35LVB.js";import"./chunks/chunk-JAJW3P42.js";import"./chunks/chunk-YMM3VY3J.js";import{getUser}from"./chunks/chunk-SM5JI6QM.js";import{getTeamByIdOrSlug}from"./chunks/chunk-VOZEB6PD.js";import{APIError,CantFindConfig,CantParseJSONFile,DeprecatedNowJson,WorkingDirectoryDoesNotExist}from"./chunks/chunk-RINZXCDJ.js";import{cmd,getTitleName}from"./chunks/chunk-FI772UVH.js";import{Diagnostic,output_manager_default,require_build_utils}from"./chunks/chunk-EWWFNMPZ.js";import{require_dist}from"./chunks/chunk-QGIQK47P.js";import{pkg_default}from"./chunks/chunk-AVSPFBLM.js";import"./chunks/chunk-XCJDGQO7.js";import"./chunks/chunk-YPTLSODC.js";import"./chunks/chunk-7HL2RPUO.js";import{require_source}from"./chunks/chunk-U7KCDTCH.js";import"./chunks/chunk-N3ZZ7FHQ.js";import"./chunks/chunk-GU6VIFR5.js";import{__commonJS,__require,__toESM}from"./chunks/chunk-6L236MNA.js";var require_epipebomb=__commonJS({"../../node_modules/.pnpm/epipebomb@1.0.0/node_modules/epipebomb/epipebomb.js"(exports,module){module.exports=epipeBomb;function epipeBomb(stream,callback){stream==null&&(stream=process.stdout),callback==null&&(callback=process.exit);function epipeFilter(err){if(err.code==="EPIPE")return callback();stream.listeners("error").length<=1&&(stream.removeAllListeners(),stream.emit("error",err),stream.on("error",epipeFilter))}stream.on("error",epipeFilter)}}});var require_fetch_dist_tags=__commonJS({"src/util/get-latest-version/fetch-dist-tags.cjs"(exports,module){"use strict";var https=__require("https");function fetchDistTags2(name,options){let timeout=options&&options.timeout||3e3,agent=new https.Agent({keepAlive:!0,maxSockets:15}),headers={accept:"application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, */*"},url=`https://registry.npmjs.org/-/package/${name}/dist-tags`;return new Promise(resolve=>{let timer=setTimeout(()=>{req.destroy(),resolve(void 0)},timeout),req=https.get(url,{agent,headers},res=>{let buf="";res.on("data",chunk=>{buf+=chunk}),res.on("end",()=>{clearTimeout(timer);try{if(res.statusCode&&res.statusCode>=400){resolve(void 0);return}resolve(JSON.parse(buf))}catch{resolve(void 0)}})});req.on("error",()=>{clearTimeout(timer),resolve(void 0)})})}module.exports={fetchDistTags:fetchDistTags2}}});var import_error_utils3=__toESM(require_dist(),1),import_fs_extra2=__toESM(require_lib(),1),import_chalk=__toESM(require_source(),1),import_semver2=__toESM(require_semver(),1),import_epipebomb=__toESM(require_epipebomb(),1);import{join as join2}from"path";import{existsSync as existsSync2}from"fs";var import_semver=__toESM(require_semver(),1),import_xdg_app_paths=__toESM(require_xdg_app_paths(),1),import_fs_extra=__toESM(require_lib(),1);import{dirname,parse as parsePath,resolve as resolvePath}from"path";import{spawn}from"child_process";var import_fetch_dist_tags=__toESM(require_fetch_dist_tags(),1);function getLatestVersion({cacheDir=(0,import_xdg_app_paths.default)("com.vercel.cli").cache(),distTag="latest",notifyInterval=1e3*60*60*24*3,pkg,updateCheckInterval=1e3*60*60*24,consumeNotification=!0}){if(!pkg||typeof pkg!="object"||!pkg.name||typeof pkg.name!="string")throw new TypeError("Expected package to be an object with a package name");let cacheFile=resolvePath(cacheDir,"package-updates",`${pkg.name}-${distTag}.json`),cache;try{cache=(0,import_fs_extra.readJSONSync)(cacheFile)}catch(err){err.code!=="ENOENT"&&output_manager_default?.debug(`Error reading latest package cache file: ${err}`)}if((!cache||!cache.expireAt||cache.expireAt<=Date.now())&&spawnWorker({cacheFile,distTag,name:pkg.name,updateCheckInterval}),cache){let shouldNotify=!cache.notifyAt||cache.notifyAt<=Date.now(),updateAvailable=!1;if(cache.version&&pkg.version&&(updateAvailable=import_semver.default.lt(pkg.version,cache.version)),shouldNotify&&updateAvailable)return consumeNotification&&(cache.notifyAt=Date.now()+notifyInterval,(0,import_fs_extra.outputJSONSync)(cacheFile,cache)),cache.version}}function spawnWorker(payload){let dir=dirname(__filename),script=resolvePath(dir,"dist","get-latest-worker.cjs"),{root}=parsePath(dir);for(;!(0,import_fs_extra.existsSync)(script);){if(dir=dirname(dir),dir===root){output_manager_default?.debug("Failed to find the get latest worker script!");return}script=resolvePath(dir,"dist","get-latest-worker.cjs")}output_manager_default?.debug(`Spawning ${script}`);let args=[script];output_manager_default?.debugEnabled&&args.push("--debug");let worker=spawn(process.execPath,args,{stdio:["inherit","inherit","inherit","ipc"],windowsHide:!0}),workerReadyTimer=setTimeout(()=>worker.kill(),2e3),onClose=code=>{output_manager_default?.debug(`Get latest worker exited (code ${code})`)};worker.on("close",onClose),worker.on("error",err=>{output_manager_default?.log(`Failed to spawn get latest worker: ${err.stack}`)}),worker.once("message",()=>{clearTimeout(workerReadyTimer),worker.removeListener("close",onClose),worker.send(payload),worker.unref()})}async function fetchLatestVersion({name,distTag="latest",timeout=3e3}){return(await(0,import_fetch_dist_tags.fetchDistTags)(name,{timeout}))?.[distTag]}function updateLatestVersionCache({cacheDir=(0,import_xdg_app_paths.default)("com.vercel.cli").cache(),distTag="latest",name,version,updateCheckInterval=1e3*60*60*24}){let cacheFile=resolvePath(cacheDir,"package-updates",`${name}-${distTag}.json`),notifyAt;try{notifyAt=(0,import_fs_extra.readJSONSync)(cacheFile)?.notifyAt}catch{}(0,import_fs_extra.outputJSONSync)(cacheFile,{expireAt:Date.now()+updateCheckInterval,notifyAt,version})}import{URL}from"url";var sentry;async function getSentry(){if(!sentry){let[SentryModule,{SENTRY_DSN},{default:pkg}]=await Promise.all([import("./chunks/cjs-GOQHXIHX.js"),import("./chunks/constants-G4UYVLOF.js"),import("./chunks/pkg-YFU67U7I.js")]),Sentry="init"in SentryModule?SentryModule:SentryModule.default;Sentry.init({dsn:SENTRY_DSN,release:`vercel-cli@${pkg.version}`,environment:"stable",autoSessionTracking:!1}),sentry=Sentry}return sentry}var SUBCOMMANDS_WITHOUT_TOKEN=["login","logout","signup","help","init","build","builders","changelog","deploy","sandbox","telemetry","upgrade","version","skills","agent","whoami"];function isOutputDebugEnabled(debugFlag){return debugFlag===!0||process.env.VERCEL_CLI_DEBUG==="1"}var import_error_utils=__toESM(require_dist(),1);async function reportError(sentry2,client2,error){if(ignoreError(error))return;let user,team,scopeError;try{({user,team}=await getScope(client2))}catch(err){(0,import_error_utils.isError)(err)&&(scopeError=err)}sentry2.withScope(scope=>{if(user){let spec={email:user.email,id:user.id,username:user.username,name:user.name};scope.setUser(spec)}team&&scope.setTag("currentTeam",team.id),scopeError&&scope.setExtra("scopeError",{name:scopeError.name,message:scopeError.message,stack:scopeError.stack});let args,argsError;try{args=getArgs(process.argv.slice(2),{})}catch(err){(0,import_error_utils.isError)(err)&&(argsError=err)}if(args){let flags=["--env","--build-env","--token"];for(let flag of flags)args[flag]&&(args[flag]="REDACTED");args._.length>=4&&args._[0].startsWith("secret")&&args._[1]==="add"&&(args._[3]="REDACTED"),scope.setExtra("args",args)}else{let msg="Unable to parse args";argsError&&(msg+=`: ${argsError}`),scope.setExtra("args",msg)}scope.setExtra("node",{execPath:process.execPath,version:process.version,platform:process.platform}),sentry2.captureException(error)});let sentryClient=sentry2.getCurrentHub().getClient();sentryClient&&await sentryClient.close()}function ignoreError(error){return(0,import_error_utils.isError)(error)&&error.message.includes("uv_cwd")}var import_types=__toESM(require_types(),1);import path from"path";var import_error_utils2=__toESM(require_dist(),1);var config;async function earlyGetConfig(configFile){if(config)return config;let localPath;try{localPath=process.cwd()}catch(err){if((0,import_error_utils2.isErrnoException)(err)&&err.code==="ENOENT")return new WorkingDirectoryDoesNotExist;throw err}if(configFile){let localFilePath=path.resolve(localPath,configFile);output_manager_default.debug(`Found config in provided --local-config path ${localFilePath}`);let localConfig=await readJSONFile(localFilePath);return localConfig instanceof CantParseJSONFile?localConfig:localConfig===null?new CantFindConfig([humanizePath(localFilePath)]):(config=localConfig,config[import_types.fileNameSymbol]=configFile,config)}let vercelFilePath=path.resolve(localPath,"vercel.json"),nowFilePath=path.resolve(localPath,"now.json"),[vercelConfig,nowConfig]=await Promise.all([readJSONFile(vercelFilePath),readJSONFile(nowFilePath)]);return vercelConfig instanceof CantParseJSONFile?vercelConfig:nowConfig instanceof CantParseJSONFile?nowConfig:vercelConfig!==null?(output_manager_default.debug(`Found config in file "${vercelFilePath}"`),config=vercelConfig,config[import_types.fileNameSymbol]="vercel.json",config):nowConfig!==null?new DeprecatedNowJson(nowFilePath):new CantFindConfig([vercelFilePath].map(humanizePath))}var import_cli_config=__toESM(require_cli_config(),1);async function runUpdateMaintenance(exitCode,update){try{return await update()}catch(error){return output_manager_default.stopSpinner(),output_manager_default.debug(`Post-command update failed; preserving exit code ${exitCode??0}: ${error instanceof Error?error.message:String(error)}`),exitCode}}var import_ci_info=__toESM(require_ci_info(),1);var RootTelemetryClient=class extends TelemetryClient{trackCliExtension(){this.trackExtension()}trackCliDefaultDeploy(defaultDeploy){defaultDeploy&&this.trackDefaultDeploy()}trackCliCommandAgent(actual){this.trackCliCommand({command:"agent",value:actual})}trackCliCommandAgentRuns(actual){this.trackCliCommand({command:"agent-runs",value:actual})}trackCliCommandAiGateway(actual){this.trackCliCommand({command:"ai-gateway",value:actual})}trackCliCommandAlias(actual){this.trackCliCommand({command:"alias",value:actual})}trackCliCommandActivity(actual){this.trackCliCommand({command:"activity",value:actual})}trackCliCommandAlerts(actual){this.trackCliCommand({command:"alerts",value:actual})}trackCliCommandApi(actual){this.trackCliCommand({command:"api",value:actual})}trackCliCommandBisect(actual){this.trackCliCommand({command:"bisect",value:actual})}trackCliCommandBlob(actual){this.trackCliCommand({command:"blob",value:actual})}trackCliCommandBudgets(actual){this.trackCliCommand({command:"budgets",value:actual})}trackCliCommandBuild(actual){this.trackCliCommand({command:"build",value:actual})}trackCliCommandBuy(actual){this.trackCliCommand({command:"buy",value:actual})}trackCliCommandCache(actual){this.trackCliCommand({command:"cache",value:actual})}trackCliCommandCerts(actual){this.trackCliCommand({command:"certs",value:actual})}trackCliCommandChangelog(actual){this.trackCliCommand({command:"changelog",value:actual})}trackCliCommandComments(actual){this.trackCliCommand({command:"comments",value:actual})}trackCliCommandConnex(actual){this.trackCliCommand({command:"connect",value:actual})}trackCliCommandContract(actual){this.trackCliCommand({command:"contract",value:actual})}trackCliCommandCrons(actual){this.trackCliCommand({command:"crons",value:actual})}trackCliCommandCurl(actual){this.trackCliCommand({command:"curl",value:actual})}trackCliCommandDeploy(actual){this.trackCliCommand({command:"deploy",value:actual})}trackCliCommandDeployHooks(actual){this.trackCliCommand({command:"deploy-hooks",value:actual})}trackCliCommandDev(actual){this.trackCliCommand({command:"dev",value:actual})}trackCliCommandDomains(actual){this.trackCliCommand({command:"domains",value:actual})}trackCliCommandDns(actual){this.trackCliCommand({command:"dns",value:actual})}trackCliCommandEnv(actual){this.trackCliCommand({command:"env",value:actual})}trackCliCommandExperiments(actual){this.trackCliCommand({command:"experiments",value:actual})}trackCliCommandFirewall(actual){this.trackCliCommand({command:"firewall",value:actual})}trackCliCommandFlags(actual){this.trackCliCommand({command:"flags",value:actual})}trackCliCommandGit(actual){this.trackCliCommand({command:"git",value:actual})}trackCliCommandGlobalConfig(actual){this.trackCliCommand({command:"global-config",value:actual})}trackCliCommandGuidance(actual){this.trackCliCommand({command:"guidance",value:actual})}trackCliCommandHelp(actual){this.trackCliCommand({command:"help",value:actual})}trackCliCommandHttpstat(actual){this.trackCliCommand({command:"httpstat",value:actual})}trackCliCommandInit(actual){this.trackCliCommand({command:"init",value:actual})}trackCliCommandInspect(actual){this.trackCliCommand({command:"inspect",value:actual})}trackCliCommandInstall(actual){this.trackCliCommand({command:"install",value:actual})}trackCliCommandIntegration(actual){this.trackCliCommand({command:"integration",value:actual})}trackCliCommandIntegrationResource(actual){this.trackCliCommand({command:"integration-resource",value:actual})}trackCliCommandKms(actual){this.trackCliCommand({command:"kms",value:actual})}trackCliCommandLink(actual){this.trackCliCommand({command:"link",value:actual})}trackCliCommandList(actual){this.trackCliCommand({command:"list",value:actual})}trackCliCommandLogin(actual){this.trackCliCommand({command:"login",value:actual})}trackCliCommandLogout(actual){this.trackCliCommand({command:"logout",value:actual})}trackCliCommandLogs(actual){this.trackCliCommand({command:"logs",value:actual})}trackCliCommandMetrics(actual){this.trackCliCommand({command:"metrics",value:actual})}trackCliCommandMicrofrontends(actual){this.trackCliCommand({command:"microfrontends",value:actual})}trackCliCommandOpen(actual){this.trackCliCommand({command:"open",value:actual})}trackCliCommandProject(actual){this.trackCliCommand({command:"project",value:actual})}trackCliCommandPromote(actual){this.trackCliCommand({command:"promote",value:actual})}trackCliCommandPull(actual){this.trackCliCommand({command:"pull",value:actual})}trackCliCommandRollback(actual){this.trackCliCommand({command:"rollback",value:actual})}trackCliCommandRollingRelease(actual){this.trackCliCommand({command:"rolling-release",value:actual})}trackCliCommandRedeploy(actual){this.trackCliCommand({command:"redeploy",value:actual})}trackCliCommandRedirects(actual){this.trackCliCommand({command:"redirects",value:actual})}trackCliCommandRoutes(actual){this.trackCliCommand({command:"routes",value:actual})}trackCliCommandRemove(actual){this.trackCliCommand({command:"remove",value:actual})}trackCliCommandSignup(actual){this.trackCliCommand({command:"signup",value:actual})}trackCliCommandSkills(actual){this.trackCliCommand({command:"skills",value:actual})}trackCliCommandSetup(actual){this.trackCliCommand({command:"setup",value:actual})}trackCliCommandSandbox(actual){this.trackCliCommand({command:"sandbox",value:actual})}trackCliCommandSchedules(actual){this.trackCliCommand({command:"schedules",value:actual})}trackCliCommandSecurity(actual){this.trackCliCommand({command:"security",value:actual})}trackCliCommandStorage(actual){this.trackCliCommand({command:"storage",value:actual})}trackCliCommandTarget(actual){this.trackCliCommand({command:"target",value:actual})}trackCliCommandTeams(actual){this.trackCliCommand({command:"teams",value:actual})}trackCliCommandTokens(actual){this.trackCliCommand({command:"tokens",value:actual})}trackCliCommandTelemetry(actual){this.trackCliCommand({command:"telemetry",value:actual})}trackCliCommandTraces(actual){this.trackCliCommand({command:"traces",value:actual})}trackCliCommandWhoami(actual){this.trackCliCommand({command:"whoami",value:actual})}trackCliCommandUpgrade(actual){this.trackCliCommand({command:"upgrade",value:actual})}trackCliCommandVersion(actual){this.trackCliCommand({command:"version",value:actual})}trackCliCommandWebhooks(actual){this.trackCliCommand({command:"webhooks",value:actual})}trackCliCommandUsage(actual){this.trackCliCommand({command:"usage",value:actual})}trackCliCommandVcr(actual){this.trackCliCommand({command:"vcr",value:actual})}trackCPUs(){super.trackCPUs()}trackAgenticUse(agent){super.trackAgenticUse(agent)}trackArch(){super.trackArch()}trackPlatform(){super.trackPlatform()}trackCIVendorName(){this.trackCI(import_ci_info.default.id)}trackStdinIsTTY(isTTY2){super.trackStdinIsTTY(isTTY2)}trackVersion(version){super.trackVersion(version)}trackProjectId(projectId){super.trackProjectId(projectId)}trackInvocationId(invocationId){super.trackInvocationId(invocationId)}trackDeviceId(deviceId){super.trackDeviceId(deviceId)}trackVercelPluginActiveSession(){super.trackVercelPluginActiveSession()}trackVercelPluginVersion(version){super.trackVercelPluginVersion(version)}trackErrorStatus(status){super.trackErrorStatus(status)}trackErrorCode(code){super.trackErrorCode(code)}trackErrorSlug(slug){super.trackErrorSlug(slug)}trackErrorAction(action){super.trackErrorAction(action)}trackErrorServerMessage(serverMessage){super.trackErrorServerMessage(serverMessage)}trackCliOptionCwd(cwd){cwd&&this.trackCliOption({option:"cwd",value:this.redactedValue})}trackCliOptionLocalConfig(localConfig){localConfig&&this.trackCliOption({option:"local-config",value:this.redactedValue})}trackCliOptionGlobalConfig(globalConfig){globalConfig&&this.trackCliOption({option:"global-config",value:this.redactedValue})}trackCliOptionScope(scope){scope&&this.trackCliOption({option:"scope",value:this.redactedValue})}trackCliOptionToken(token){token&&this.trackCliOption({option:"token",value:this.redactedValue})}trackCliOptionTeam(team){team&&this.trackCliOption({option:"team",value:this.redactedValue})}trackCliOptionApi(api){api&&this.trackCliOption({option:"api",value:this.redactedValue})}trackCliFlagDebug(debug){debug&&this.trackCliFlag("debug")}trackCliFlagNoColor(noColor){noColor&&this.trackCliFlag("no-color")}};function shouldStartUserLookupForTelemetry({authConfig,hasTelemetryUserId}){return!hasTelemetryUserId&&!authConfig.userId&&isValidAccessToken(authConfig)}import{readFileSync}from"node:fs";import{homedir}from"node:os";import{join}from"node:path";var ACTIVE_SESSION_MARKER_PATH=join(homedir(),".config","vercel-plugin","active-session.json"),SEMVERISH_RE=/^\d+\.\d+\.\d+(?:[-+][0-9A-Za-z.-]+)?$/;function isRecord(value){return typeof value=="object"&&value!==null}function readVercelPluginActiveSessionMarker(opts={}){let filePath=opts.filePath??ACTIVE_SESSION_MARKER_PATH,now=opts.now?.()??Date.now();try{let marker=JSON.parse(readFileSync(filePath,"utf-8"));return!isRecord(marker)||marker.schema!==1||marker.active!==!0||typeof marker.expiresAt!="number"||marker.expiresAt<=now||typeof marker.pluginVersion!="string"||!SEMVERISH_RE.test(marker.pluginVersion)?null:{pluginVersion:marker.pluginVersion}}catch{return null}}function checkTelemetryStatus({config:config2}){config2.telemetry||process.env.VERCEL_TELEMETRY_DISABLED||(output_manager_default.note("The Vercel CLI now collects telemetry regarding usage of the CLI."),output_manager_default.log("This information is used to shape the CLI roadmap and prioritize features."),output_manager_default.log("You can learn more, including how to opt-out if you'd not like to participate in this program, by visiting the following URL:"),output_manager_default.log("https://vercel.com/docs/cli/about-telemetry"),config2.telemetry={enabled:!0},writeToConfigFile(config2))}function checkGuidanceStatus({config:config2}){process.env.FF_GUIDANCE_MODE&&(process.env.CI||process.env.VERCEL_GUIDANCE_DISABLED||config2.guidance||(output_manager_default.note("The Vercel CLI can suggest common follow-up commands and steps to help guide new users."),output_manager_default.log("You can disable this feature by running:"),output_manager_default.log("vercel guidance disable"),output_manager_default.log("or by setting VERCEL_GUIDANCE_DISABLED=1"),config2.guidance={enabled:!0},writeToConfigFile(config2)))}import{determineAgent}from"@vercel/detect-agent";var import_build_utils=__toESM(require_build_utils(),1);import{mkdir,writeFile}from"fs/promises";try{process.cwd()}catch(err){(0,import_error_utils3.isError)(err)&&err.message.includes("uv_cwd")&&(console.error("Error: The current working directory does not exist."),process.exit(1))}{let SILENCED_ERRORS=["DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead."],originalError=console.error;console.error=msg=>{SILENCED_ERRORS.some(error=>typeof msg=="string"&&msg.includes(error))||originalError(msg)}}var VERCEL_DIR=getGlobalPathConfig(),VERCEL_CONFIG_PATH=getConfigFilePath(),VERCEL_AUTH_CONFIG_PATH=getAuthConfigFilePath(),GLOBAL_COMMANDS=new Set(["help"]);function hasProxyConfig(){return["HTTP_PROXY","HTTPS_PROXY","http_proxy","https_proxy","ALL_PROXY","all_proxy"].some(v=>process.env[v])}(0,import_epipebomb.default)();var client,resolvedCommandForUpdate,fatalErrorHandlerSymbol=Symbol.for("vercel.cli.fatal-error-handler");async function exitWithUnexpectedError(error){let handler=globalThis[fatalErrorHandlerSymbol];if(typeof handler=="function")try{await handler(error)}catch{}process.exit(1)}var handleRejection=async err=>{err?err instanceof Error?await handleUnexpected(err):(output_manager_default.error(`An unexpected rejection occurred
7
+ import{BUILD_LABEL}from"./chunks/chunk-WKZ6JSGZ.js";import{help}from"./chunks/chunk-RYZ5FAUA.js";import{box,canAutoUpdate,executeAutomaticUpgrade,executeUpgrade,handleCommandTypo,hasAutoUpdatePreference,require_xdg_app_paths,scheduleNativeAutoUpdate,setAutoUpdate}from"./chunks/chunk-3HLNS2I4.js";import{matchesCliApiTag}from"./chunks/chunk-AP36GAOG.js";import{getUpdateCommand}from"./chunks/chunk-D2ZPYXZ6.js";import{require_semver}from"./chunks/chunk-KKS7XWEX.js";import{readJSONFile}from"./chunks/chunk-IS43O66T.js";import"./chunks/chunk-U56NHYAH.js";import{Client,isValidAccessToken}from"./chunks/chunk-MDZ2JJP3.js";import"./chunks/chunk-TRTEXGVN.js";import"./chunks/chunk-T3GQAMBJ.js";import{require_ci_info}from"./chunks/chunk-T52FMXWC.js";import"./chunks/chunk-V6MR45PD.js";import"./chunks/chunk-2I64AYHG.js";import{shouldPrintVersionBanner,wantsMachineReadableOutput}from"./chunks/chunk-D4MW3RDW.js";import"./chunks/chunk-P2O5DOYE.js";import"./chunks/chunk-L3JDEHCQ.js";import"./chunks/chunk-N6CNMMSZ.js";import{getTeams}from"./chunks/chunk-I46LFJJG.js";import{commands,commandsStructs,isHiddenCommand}from"./chunks/chunk-KOOED3TJ.js";import"./chunks/chunk-DKV4IVH5.js";import"./chunks/chunk-IVWPQYIH.js";import"./chunks/chunk-65JYSI26.js";import"./chunks/chunk-YMVDWVMO.js";import"./chunks/chunk-O7G3CZ42.js";import"./chunks/chunk-N3N5UHIL.js";import"./chunks/chunk-WUZD4KBL.js";import"./chunks/chunk-QFPCR4NL.js";import"./chunks/chunk-5ENY7DSN.js";import"./chunks/chunk-UTVDFSQS.js";import"./chunks/chunk-SW7MNF4H.js";import"./chunks/chunk-MEAY2K5Z.js";import"./chunks/chunk-EQ52F4LH.js";import"./chunks/chunk-CVKB54WW.js";import"./chunks/chunk-JKTQV2QJ.js";import"./chunks/chunk-Y7PHTVZ6.js";import"./chunks/chunk-WSZHNPA6.js";import"./chunks/chunk-FAW6NBLQ.js";import"./chunks/chunk-5UOVEMYX.js";import"./chunks/chunk-SOJCELXH.js";import{param}from"./chunks/chunk-SXUEGVWB.js";import"./chunks/chunk-ZKYS7EAB.js";import{getAuthConfigFilePath,getConfigFilePath,getScope,highlight,isAppPrincipalEnabled,readAuthConfigFile,readConfigFile,resolveAppTokenScope,writeToConfigFile}from"./chunks/chunk-LFQTA3CF.js";import{getGlobalPathConfig}from"./chunks/chunk-JSKGZLE4.js";import{TelemetryClient,TelemetryEventStore}from"./chunks/chunk-A5VLP25I.js";import"./chunks/chunk-RCTYVKM5.js";import{isNativeBinaryInstall}from"./chunks/chunk-7T6TL3GQ.js";import{require_types}from"./chunks/chunk-GHM7V3GG.js";import"./chunks/chunk-5XJNPXQK.js";import{printError}from"./chunks/chunk-N5AIKGEO.js";import{getArgs,parseArguments}from"./chunks/chunk-WWB66KP5.js";import{setFetchDispatcher}from"./chunks/chunk-MY4MONOH.js";import{getLinkFromDir,getVercelDirectory,hasLocalProjectLink,require_lib}from"./chunks/chunk-TTKDYUJD.js";import"./chunks/chunk-F2ZWW2IO.js";import"./chunks/chunk-B4ATVYZW.js";import{humanizePath}from"./chunks/chunk-PPCFQQSU.js";import{require_cli_config}from"./chunks/chunk-BRK4OB4B.js";import"./chunks/chunk-OSCCYU74.js";import{shouldEmitNonInteractiveCommandError,trackAgentCommandOutcome}from"./chunks/chunk-KCARCOP5.js";import"./chunks/chunk-BKV35LVB.js";import"./chunks/chunk-JAJW3P42.js";import"./chunks/chunk-YMM3VY3J.js";import{getUser}from"./chunks/chunk-SM5JI6QM.js";import{getTeamByIdOrSlug}from"./chunks/chunk-VOZEB6PD.js";import{APIError,CantFindConfig,CantParseJSONFile,DeprecatedNowJson,WorkingDirectoryDoesNotExist}from"./chunks/chunk-RINZXCDJ.js";import{cmd,getTitleName}from"./chunks/chunk-FI772UVH.js";import{Diagnostic,output_manager_default,require_build_utils}from"./chunks/chunk-EWWFNMPZ.js";import{require_dist}from"./chunks/chunk-QGIQK47P.js";import{pkg_default}from"./chunks/chunk-AVSPFBLM.js";import"./chunks/chunk-XCJDGQO7.js";import"./chunks/chunk-YPTLSODC.js";import"./chunks/chunk-7HL2RPUO.js";import{require_source}from"./chunks/chunk-U7KCDTCH.js";import"./chunks/chunk-N3ZZ7FHQ.js";import"./chunks/chunk-GU6VIFR5.js";import{__commonJS,__require,__toESM}from"./chunks/chunk-6L236MNA.js";var require_epipebomb=__commonJS({"../../node_modules/.pnpm/epipebomb@1.0.0/node_modules/epipebomb/epipebomb.js"(exports,module){module.exports=epipeBomb;function epipeBomb(stream,callback){stream==null&&(stream=process.stdout),callback==null&&(callback=process.exit);function epipeFilter(err){if(err.code==="EPIPE")return callback();stream.listeners("error").length<=1&&(stream.removeAllListeners(),stream.emit("error",err),stream.on("error",epipeFilter))}stream.on("error",epipeFilter)}}});var require_fetch_dist_tags=__commonJS({"src/util/get-latest-version/fetch-dist-tags.cjs"(exports,module){"use strict";var https=__require("https");function fetchDistTags2(name,options){let timeout=options&&options.timeout||3e3,agent=new https.Agent({keepAlive:!0,maxSockets:15}),headers={accept:"application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, */*"},url=`https://registry.npmjs.org/-/package/${name}/dist-tags`;return new Promise(resolve=>{let timer=setTimeout(()=>{req.destroy(),resolve(void 0)},timeout),req=https.get(url,{agent,headers},res=>{let buf="";res.on("data",chunk=>{buf+=chunk}),res.on("end",()=>{clearTimeout(timer);try{if(res.statusCode&&res.statusCode>=400){resolve(void 0);return}resolve(JSON.parse(buf))}catch{resolve(void 0)}})});req.on("error",()=>{clearTimeout(timer),resolve(void 0)})})}module.exports={fetchDistTags:fetchDistTags2}}});var import_error_utils3=__toESM(require_dist(),1),import_fs_extra2=__toESM(require_lib(),1),import_chalk=__toESM(require_source(),1),import_semver2=__toESM(require_semver(),1),import_epipebomb=__toESM(require_epipebomb(),1);import{join as join2}from"path";import{existsSync as existsSync2}from"fs";var import_semver=__toESM(require_semver(),1),import_xdg_app_paths=__toESM(require_xdg_app_paths(),1),import_fs_extra=__toESM(require_lib(),1);import{dirname,parse as parsePath,resolve as resolvePath}from"path";import{spawn}from"child_process";var import_fetch_dist_tags=__toESM(require_fetch_dist_tags(),1);function getLatestVersion({cacheDir=(0,import_xdg_app_paths.default)("com.vercel.cli").cache(),distTag="latest",notifyInterval=1e3*60*60*24*3,pkg,updateCheckInterval=1e3*60*60*24,consumeNotification=!0}){if(!pkg||typeof pkg!="object"||!pkg.name||typeof pkg.name!="string")throw new TypeError("Expected package to be an object with a package name");let cacheFile=resolvePath(cacheDir,"package-updates",`${pkg.name}-${distTag}.json`),cache;try{cache=(0,import_fs_extra.readJSONSync)(cacheFile)}catch(err){err.code!=="ENOENT"&&output_manager_default?.debug(`Error reading latest package cache file: ${err}`)}if((!cache||!cache.expireAt||cache.expireAt<=Date.now())&&spawnWorker({cacheFile,distTag,name:pkg.name,updateCheckInterval}),cache){let shouldNotify=!cache.notifyAt||cache.notifyAt<=Date.now(),updateAvailable=!1;if(cache.version&&pkg.version&&(updateAvailable=import_semver.default.lt(pkg.version,cache.version)),shouldNotify&&updateAvailable)return consumeNotification&&(cache.notifyAt=Date.now()+notifyInterval,(0,import_fs_extra.outputJSONSync)(cacheFile,cache)),cache.version}}function spawnWorker(payload){let dir=dirname(__filename),script=resolvePath(dir,"dist","get-latest-worker.cjs"),{root}=parsePath(dir);for(;!(0,import_fs_extra.existsSync)(script);){if(dir=dirname(dir),dir===root){output_manager_default?.debug("Failed to find the get latest worker script!");return}script=resolvePath(dir,"dist","get-latest-worker.cjs")}output_manager_default?.debug(`Spawning ${script}`);let args=[script];output_manager_default?.debugEnabled&&args.push("--debug");let worker=spawn(process.execPath,args,{stdio:["inherit","inherit","inherit","ipc"],windowsHide:!0}),workerReadyTimer=setTimeout(()=>worker.kill(),2e3),onClose=code=>{output_manager_default?.debug(`Get latest worker exited (code ${code})`)};worker.on("close",onClose),worker.on("error",err=>{output_manager_default?.log(`Failed to spawn get latest worker: ${err.stack}`)}),worker.once("message",()=>{clearTimeout(workerReadyTimer),worker.removeListener("close",onClose),worker.send(payload),worker.unref()})}async function fetchLatestVersion({name,distTag="latest",timeout=3e3}){return(await(0,import_fetch_dist_tags.fetchDistTags)(name,{timeout}))?.[distTag]}function updateLatestVersionCache({cacheDir=(0,import_xdg_app_paths.default)("com.vercel.cli").cache(),distTag="latest",name,version,updateCheckInterval=1e3*60*60*24}){let cacheFile=resolvePath(cacheDir,"package-updates",`${name}-${distTag}.json`),notifyAt;try{notifyAt=(0,import_fs_extra.readJSONSync)(cacheFile)?.notifyAt}catch{}(0,import_fs_extra.outputJSONSync)(cacheFile,{expireAt:Date.now()+updateCheckInterval,notifyAt,version})}import{URL}from"url";var sentry;async function getSentry(){if(!sentry){let[SentryModule,{SENTRY_DSN},{default:pkg}]=await Promise.all([import("./chunks/cjs-GOQHXIHX.js"),import("./chunks/constants-G4UYVLOF.js"),import("./chunks/pkg-YFU67U7I.js")]),Sentry="init"in SentryModule?SentryModule:SentryModule.default;Sentry.init({dsn:SENTRY_DSN,release:`vercel-cli@${pkg.version}`,environment:"stable",autoSessionTracking:!1}),sentry=Sentry}return sentry}var SUBCOMMANDS_WITHOUT_TOKEN=["login","logout","signup","help","init","build","builders","changelog","deploy","sandbox","telemetry","upgrade","version","skills","agent","whoami"];function isOutputDebugEnabled(debugFlag){return debugFlag===!0||process.env.VERCEL_CLI_DEBUG==="1"}var import_error_utils=__toESM(require_dist(),1);async function reportError(sentry2,client2,error){if(ignoreError(error))return;let user,team,scopeError;try{({user,team}=await getScope(client2))}catch(err){(0,import_error_utils.isError)(err)&&(scopeError=err)}sentry2.withScope(scope=>{if(user){let spec={email:user.email,id:user.id,username:user.username,name:user.name};scope.setUser(spec)}team&&scope.setTag("currentTeam",team.id),scopeError&&scope.setExtra("scopeError",{name:scopeError.name,message:scopeError.message,stack:scopeError.stack});let args,argsError;try{args=getArgs(process.argv.slice(2),{})}catch(err){(0,import_error_utils.isError)(err)&&(argsError=err)}if(args){let flags=["--env","--build-env","--token"];for(let flag of flags)args[flag]&&(args[flag]="REDACTED");args._.length>=4&&args._[0].startsWith("secret")&&args._[1]==="add"&&(args._[3]="REDACTED"),scope.setExtra("args",args)}else{let msg="Unable to parse args";argsError&&(msg+=`: ${argsError}`),scope.setExtra("args",msg)}scope.setExtra("node",{execPath:process.execPath,version:process.version,platform:process.platform}),sentry2.captureException(error)});let sentryClient=sentry2.getCurrentHub().getClient();sentryClient&&await sentryClient.close()}function ignoreError(error){return(0,import_error_utils.isError)(error)&&error.message.includes("uv_cwd")}var import_types=__toESM(require_types(),1);import path from"path";var import_error_utils2=__toESM(require_dist(),1);var config;async function earlyGetConfig(configFile){if(config)return config;let localPath;try{localPath=process.cwd()}catch(err){if((0,import_error_utils2.isErrnoException)(err)&&err.code==="ENOENT")return new WorkingDirectoryDoesNotExist;throw err}if(configFile){let localFilePath=path.resolve(localPath,configFile);output_manager_default.debug(`Found config in provided --local-config path ${localFilePath}`);let localConfig=await readJSONFile(localFilePath);return localConfig instanceof CantParseJSONFile?localConfig:localConfig===null?new CantFindConfig([humanizePath(localFilePath)]):(config=localConfig,config[import_types.fileNameSymbol]=configFile,config)}let vercelFilePath=path.resolve(localPath,"vercel.json"),nowFilePath=path.resolve(localPath,"now.json"),[vercelConfig,nowConfig]=await Promise.all([readJSONFile(vercelFilePath),readJSONFile(nowFilePath)]);return vercelConfig instanceof CantParseJSONFile?vercelConfig:nowConfig instanceof CantParseJSONFile?nowConfig:vercelConfig!==null?(output_manager_default.debug(`Found config in file "${vercelFilePath}"`),config=vercelConfig,config[import_types.fileNameSymbol]="vercel.json",config):nowConfig!==null?new DeprecatedNowJson(nowFilePath):new CantFindConfig([vercelFilePath].map(humanizePath))}var import_cli_config=__toESM(require_cli_config(),1);async function runUpdateMaintenance(exitCode,update){try{return await update()}catch(error){return output_manager_default.stopSpinner(),output_manager_default.debug(`Post-command update failed; preserving exit code ${exitCode??0}: ${error instanceof Error?error.message:String(error)}`),exitCode}}var import_ci_info=__toESM(require_ci_info(),1);var RootTelemetryClient=class extends TelemetryClient{trackCliExtension(){this.trackExtension()}trackCliDefaultDeploy(defaultDeploy){defaultDeploy&&this.trackDefaultDeploy()}trackCliCommandAgent(actual){this.trackCliCommand({command:"agent",value:actual})}trackCliCommandAgentRuns(actual){this.trackCliCommand({command:"agent-runs",value:actual})}trackCliCommandAiGateway(actual){this.trackCliCommand({command:"ai-gateway",value:actual})}trackCliCommandAlias(actual){this.trackCliCommand({command:"alias",value:actual})}trackCliCommandActivity(actual){this.trackCliCommand({command:"activity",value:actual})}trackCliCommandAlerts(actual){this.trackCliCommand({command:"alerts",value:actual})}trackCliCommandApi(actual){this.trackCliCommand({command:"api",value:actual})}trackCliCommandBisect(actual){this.trackCliCommand({command:"bisect",value:actual})}trackCliCommandBlob(actual){this.trackCliCommand({command:"blob",value:actual})}trackCliCommandBudgets(actual){this.trackCliCommand({command:"budgets",value:actual})}trackCliCommandBuild(actual){this.trackCliCommand({command:"build",value:actual})}trackCliCommandBuy(actual){this.trackCliCommand({command:"buy",value:actual})}trackCliCommandCache(actual){this.trackCliCommand({command:"cache",value:actual})}trackCliCommandCerts(actual){this.trackCliCommand({command:"certs",value:actual})}trackCliCommandChangelog(actual){this.trackCliCommand({command:"changelog",value:actual})}trackCliCommandComments(actual){this.trackCliCommand({command:"comments",value:actual})}trackCliCommandConnex(actual){this.trackCliCommand({command:"connect",value:actual})}trackCliCommandContract(actual){this.trackCliCommand({command:"contract",value:actual})}trackCliCommandCrons(actual){this.trackCliCommand({command:"crons",value:actual})}trackCliCommandCurl(actual){this.trackCliCommand({command:"curl",value:actual})}trackCliCommandDeploy(actual){this.trackCliCommand({command:"deploy",value:actual})}trackCliCommandDeployHooks(actual){this.trackCliCommand({command:"deploy-hooks",value:actual})}trackCliCommandDev(actual){this.trackCliCommand({command:"dev",value:actual})}trackCliCommandDomains(actual){this.trackCliCommand({command:"domains",value:actual})}trackCliCommandDns(actual){this.trackCliCommand({command:"dns",value:actual})}trackCliCommandEnv(actual){this.trackCliCommand({command:"env",value:actual})}trackCliCommandExperiments(actual){this.trackCliCommand({command:"experiments",value:actual})}trackCliCommandFirewall(actual){this.trackCliCommand({command:"firewall",value:actual})}trackCliCommandFlags(actual){this.trackCliCommand({command:"flags",value:actual})}trackCliCommandGit(actual){this.trackCliCommand({command:"git",value:actual})}trackCliCommandGlobalConfig(actual){this.trackCliCommand({command:"global-config",value:actual})}trackCliCommandGuidance(actual){this.trackCliCommand({command:"guidance",value:actual})}trackCliCommandHelp(actual){this.trackCliCommand({command:"help",value:actual})}trackCliCommandHttpstat(actual){this.trackCliCommand({command:"httpstat",value:actual})}trackCliCommandInit(actual){this.trackCliCommand({command:"init",value:actual})}trackCliCommandInspect(actual){this.trackCliCommand({command:"inspect",value:actual})}trackCliCommandInstall(actual){this.trackCliCommand({command:"install",value:actual})}trackCliCommandIntegration(actual){this.trackCliCommand({command:"integration",value:actual})}trackCliCommandIntegrationResource(actual){this.trackCliCommand({command:"integration-resource",value:actual})}trackCliCommandKms(actual){this.trackCliCommand({command:"kms",value:actual})}trackCliCommandLink(actual){this.trackCliCommand({command:"link",value:actual})}trackCliCommandList(actual){this.trackCliCommand({command:"list",value:actual})}trackCliCommandLogin(actual){this.trackCliCommand({command:"login",value:actual})}trackCliCommandLogout(actual){this.trackCliCommand({command:"logout",value:actual})}trackCliCommandLogs(actual){this.trackCliCommand({command:"logs",value:actual})}trackCliCommandMetrics(actual){this.trackCliCommand({command:"metrics",value:actual})}trackCliCommandMicrofrontends(actual){this.trackCliCommand({command:"microfrontends",value:actual})}trackCliCommandOpen(actual){this.trackCliCommand({command:"open",value:actual})}trackCliCommandProject(actual){this.trackCliCommand({command:"project",value:actual})}trackCliCommandPromote(actual){this.trackCliCommand({command:"promote",value:actual})}trackCliCommandPull(actual){this.trackCliCommand({command:"pull",value:actual})}trackCliCommandRollback(actual){this.trackCliCommand({command:"rollback",value:actual})}trackCliCommandRollingRelease(actual){this.trackCliCommand({command:"rolling-release",value:actual})}trackCliCommandRedeploy(actual){this.trackCliCommand({command:"redeploy",value:actual})}trackCliCommandRedirects(actual){this.trackCliCommand({command:"redirects",value:actual})}trackCliCommandRoutes(actual){this.trackCliCommand({command:"routes",value:actual})}trackCliCommandRemove(actual){this.trackCliCommand({command:"remove",value:actual})}trackCliCommandSignup(actual){this.trackCliCommand({command:"signup",value:actual})}trackCliCommandSkills(actual){this.trackCliCommand({command:"skills",value:actual})}trackCliCommandSetup(actual){this.trackCliCommand({command:"setup",value:actual})}trackCliCommandSandbox(actual){this.trackCliCommand({command:"sandbox",value:actual})}trackCliCommandSchedules(actual){this.trackCliCommand({command:"schedules",value:actual})}trackCliCommandSecurity(actual){this.trackCliCommand({command:"security",value:actual})}trackCliCommandStorage(actual){this.trackCliCommand({command:"storage",value:actual})}trackCliCommandTarget(actual){this.trackCliCommand({command:"target",value:actual})}trackCliCommandTeams(actual){this.trackCliCommand({command:"teams",value:actual})}trackCliCommandTokens(actual){this.trackCliCommand({command:"tokens",value:actual})}trackCliCommandTelemetry(actual){this.trackCliCommand({command:"telemetry",value:actual})}trackCliCommandTraces(actual){this.trackCliCommand({command:"traces",value:actual})}trackCliCommandWhoami(actual){this.trackCliCommand({command:"whoami",value:actual})}trackCliCommandUpgrade(actual){this.trackCliCommand({command:"upgrade",value:actual})}trackCliCommandVersion(actual){this.trackCliCommand({command:"version",value:actual})}trackCliCommandWebhooks(actual){this.trackCliCommand({command:"webhooks",value:actual})}trackCliCommandUsage(actual){this.trackCliCommand({command:"usage",value:actual})}trackCliCommandVcr(actual){this.trackCliCommand({command:"vcr",value:actual})}trackCPUs(){super.trackCPUs()}trackAgenticUse(agent){super.trackAgenticUse(agent)}trackArch(){super.trackArch()}trackPlatform(){super.trackPlatform()}trackCIVendorName(){this.trackCI(import_ci_info.default.id)}trackStdinIsTTY(isTTY2){super.trackStdinIsTTY(isTTY2)}trackVersion(version){super.trackVersion(version)}trackProjectId(projectId){super.trackProjectId(projectId)}trackInvocationId(invocationId){super.trackInvocationId(invocationId)}trackDeviceId(deviceId){super.trackDeviceId(deviceId)}trackVercelPluginActiveSession(){super.trackVercelPluginActiveSession()}trackVercelPluginVersion(version){super.trackVercelPluginVersion(version)}trackErrorStatus(status){super.trackErrorStatus(status)}trackErrorCode(code){super.trackErrorCode(code)}trackErrorSlug(slug){super.trackErrorSlug(slug)}trackErrorAction(action){super.trackErrorAction(action)}trackErrorServerMessage(serverMessage){super.trackErrorServerMessage(serverMessage)}trackCliOptionCwd(cwd){cwd&&this.trackCliOption({option:"cwd",value:this.redactedValue})}trackCliOptionLocalConfig(localConfig){localConfig&&this.trackCliOption({option:"local-config",value:this.redactedValue})}trackCliOptionGlobalConfig(globalConfig){globalConfig&&this.trackCliOption({option:"global-config",value:this.redactedValue})}trackCliOptionScope(scope){scope&&this.trackCliOption({option:"scope",value:this.redactedValue})}trackCliOptionToken(token){token&&this.trackCliOption({option:"token",value:this.redactedValue})}trackCliOptionTeam(team){team&&this.trackCliOption({option:"team",value:this.redactedValue})}trackCliOptionApi(api){api&&this.trackCliOption({option:"api",value:this.redactedValue})}trackCliFlagDebug(debug){debug&&this.trackCliFlag("debug")}trackCliFlagNoColor(noColor){noColor&&this.trackCliFlag("no-color")}};function shouldStartUserLookupForTelemetry({authConfig,hasTelemetryUserId}){return!hasTelemetryUserId&&!authConfig.userId&&isValidAccessToken(authConfig)}import{readFileSync}from"node:fs";import{homedir}from"node:os";import{join}from"node:path";var ACTIVE_SESSION_MARKER_PATH=join(homedir(),".config","vercel-plugin","active-session.json"),SEMVERISH_RE=/^\d+\.\d+\.\d+(?:[-+][0-9A-Za-z.-]+)?$/;function isRecord(value){return typeof value=="object"&&value!==null}function readVercelPluginActiveSessionMarker(opts={}){let filePath=opts.filePath??ACTIVE_SESSION_MARKER_PATH,now=opts.now?.()??Date.now();try{let marker=JSON.parse(readFileSync(filePath,"utf-8"));return!isRecord(marker)||marker.schema!==1||marker.active!==!0||typeof marker.expiresAt!="number"||marker.expiresAt<=now||typeof marker.pluginVersion!="string"||!SEMVERISH_RE.test(marker.pluginVersion)?null:{pluginVersion:marker.pluginVersion}}catch{return null}}function checkTelemetryStatus({config:config2}){config2.telemetry||process.env.VERCEL_TELEMETRY_DISABLED||(output_manager_default.note("The Vercel CLI now collects telemetry regarding usage of the CLI."),output_manager_default.log("This information is used to shape the CLI roadmap and prioritize features."),output_manager_default.log("You can learn more, including how to opt-out if you'd not like to participate in this program, by visiting the following URL:"),output_manager_default.log("https://vercel.com/docs/cli/about-telemetry"),config2.telemetry={enabled:!0},writeToConfigFile(config2))}function checkGuidanceStatus({config:config2}){process.env.FF_GUIDANCE_MODE&&(process.env.CI||process.env.VERCEL_GUIDANCE_DISABLED||config2.guidance||(output_manager_default.note("The Vercel CLI can suggest common follow-up commands and steps to help guide new users."),output_manager_default.log("You can disable this feature by running:"),output_manager_default.log("vercel guidance disable"),output_manager_default.log("or by setting VERCEL_GUIDANCE_DISABLED=1"),config2.guidance={enabled:!0},writeToConfigFile(config2)))}import{determineAgent}from"@vercel/detect-agent";var import_build_utils=__toESM(require_build_utils(),1);import{mkdir,writeFile}from"fs/promises";try{process.cwd()}catch(err){(0,import_error_utils3.isError)(err)&&err.message.includes("uv_cwd")&&(console.error("Error: The current working directory does not exist."),process.exit(1))}{let SILENCED_ERRORS=["DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead."],originalError=console.error;console.error=msg=>{SILENCED_ERRORS.some(error=>typeof msg=="string"&&msg.includes(error))||originalError(msg)}}var VERCEL_DIR=getGlobalPathConfig(),VERCEL_CONFIG_PATH=getConfigFilePath(),VERCEL_AUTH_CONFIG_PATH=getAuthConfigFilePath(),GLOBAL_COMMANDS=new Set(["help"]);function hasProxyConfig(){return["HTTP_PROXY","HTTPS_PROXY","http_proxy","https_proxy","ALL_PROXY","all_proxy"].some(v=>process.env[v])}(0,import_epipebomb.default)();var client,resolvedCommandForUpdate,fatalErrorHandlerSymbol=Symbol.for("vercel.cli.fatal-error-handler");async function exitWithUnexpectedError(error){let handler=globalThis[fatalErrorHandlerSymbol];if(typeof handler=="function")try{await handler(error)}catch{}process.exit(1)}var handleRejection=async err=>{err?err instanceof Error?await handleUnexpected(err):(output_manager_default.error(`An unexpected rejection occurred
8
8
  ${err}`),await reportError(await getSentry(),client,err)):output_manager_default.error("An unexpected empty rejection occurred"),await exitWithUnexpectedError(err)},handleUnexpected=async err=>{let{message}=err;return message.includes("sentry")&&message.includes("ENOTFOUND")?(output_manager_default.debug(`Sentry is not reachable: ${err}`),!1):(output_manager_default.error(`An unexpected error occurred!
9
9
  ${err.stack}`),await reportError(await getSentry(),client,err),!0)};process.on("unhandledRejection",handleRejection);process.on("uncaughtException",async error=>{await handleUnexpected(error)&&await exitWithUnexpectedError(error)});process.env.CLAUDECODE&&process.stderr.write(`<claude-code-hint v="1" type="plugin" value="vercel@claude-plugins-official" />
10
10
  `);var SHOULD_CHECK_FOR_UPDATES=!process.env.NO_UPDATE_NOTIFIER&&!process.env.VERCEL,{isTTY}=process.stdout,apiUrl="https://api.vercel.com",InMemoryReporter=class{constructor(){this.events=[]}report(event){this.events.push(event)}},main=async()=>{let traceReporter=new InMemoryReporter,rootSpan=new import_build_utils.Span({name:"vc.cli",reporter:traceReporter}),isTelemetryFlushCommand=process.argv[2]==="telemetry"&&process.argv[3]==="flush";process.env.FORCE_TTY==="1"&&(isTTY=!0,process.stdout.isTTY=!0,process.stdin.isTTY=!0);let parseInitialArgs=()=>parseArguments(process.argv,{"--version":Boolean,"-v":"--version","--changelog":Boolean,"--non-interactive":Boolean},{permissive:!0}),parsedArgs;try{parsedArgs=parseInitialArgs();let isDebugging=isOutputDebugEnabled(parsedArgs.flags["--debug"]),isNoColor=parsedArgs.flags["--no-color"];output_manager_default.initialize({debug:isDebugging,noColor:isNoColor})}catch(err){return printError(err),1}let localConfigPath=parsedArgs.flags["--local-config"],localConfig=await earlyGetConfig(localConfigPath);if(localConfig instanceof CantParseJSONFile)return output_manager_default.error(`Couldn't parse JSON file ${localConfig.meta.file}.`),1;if(localConfig instanceof CantFindConfig){if(localConfigPath)return output_manager_default.error(`Couldn't find a project configuration file at
package/dist/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export const version = "60.1.1";
1
+ export const version = "60.1.3";
2
2
  export const buildLabel = "";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vercel",
3
- "version": "60.1.1",
3
+ "version": "60.1.3",
4
4
  "type": "module",
5
5
  "preferGlobal": true,
6
6
  "license": "Apache-2.0",
@@ -35,51 +35,51 @@
35
35
  "undici": "5.29.0",
36
36
  "uuid": "14.0.1",
37
37
  "zod": "4.1.11",
38
- "@vercel/backends": "11.0.0",
39
- "@vercel/build-utils": "14.13.0",
40
- "@vercel/cli-auth": "0.3.9",
38
+ "@vercel/build-utils": "14.13.1",
39
+ "@vercel/backends": "11.0.1",
41
40
  "@vercel/cli-config": "0.3.0",
42
- "@vercel/container": "11.0.0",
41
+ "@vercel/container": "11.0.1",
42
+ "@vercel/cli-auth": "0.3.9",
43
43
  "@vercel/detect-agent": "1.2.5",
44
- "@vercel/elysia": "11.0.0",
45
- "@vercel/express": "11.0.0",
46
- "@vercel/fastify": "11.0.0",
47
- "@vercel/go": "14.0.0",
48
- "@vercel/h3": "11.0.0",
49
- "@vercel/hono": "11.0.0",
50
- "@vercel/hydrogen": "12.0.0",
51
- "@vercel/koa": "11.0.0",
52
- "@vercel/nestjs": "11.0.0",
53
- "@vercel/next": "15.0.0",
54
- "@vercel/node": "16.0.0",
55
- "@vercel/python": "17.0.0",
44
+ "@vercel/elysia": "11.0.1",
45
+ "@vercel/express": "11.0.1",
46
+ "@vercel/fastify": "11.0.1",
47
+ "@vercel/h3": "11.0.1",
48
+ "@vercel/hono": "11.0.1",
49
+ "@vercel/hydrogen": "12.0.1",
50
+ "@vercel/go": "14.0.1",
51
+ "@vercel/koa": "11.0.1",
52
+ "@vercel/nestjs": "11.0.1",
53
+ "@vercel/next": "15.0.1",
54
+ "@vercel/node": "16.0.1",
55
+ "@vercel/python": "17.0.1",
56
56
  "@vercel/python-analysis": "0.14.0",
57
- "@vercel/redwood": "13.0.0",
58
- "@vercel/remix-builder": "16.0.0",
59
- "@vercel/ruby": "13.0.0",
60
- "@vercel/rust": "12.0.0",
61
- "@vercel/static-build": "13.0.0"
57
+ "@vercel/redwood": "13.0.1",
58
+ "@vercel/remix-builder": "16.0.1",
59
+ "@vercel/ruby": "13.0.1",
60
+ "@vercel/static-build": "13.0.1",
61
+ "@vercel/rust": "12.0.1"
62
62
  },
63
63
  "builders": {
64
- "@vercel/backends": "11.0.0",
65
- "@vercel/container": "11.0.0",
66
- "@vercel/elysia": "11.0.0",
67
- "@vercel/express": "11.0.0",
68
- "@vercel/fastify": "11.0.0",
69
- "@vercel/go": "14.0.0",
70
- "@vercel/h3": "11.0.0",
71
- "@vercel/hono": "11.0.0",
72
- "@vercel/hydrogen": "12.0.0",
73
- "@vercel/koa": "11.0.0",
74
- "@vercel/nestjs": "11.0.0",
75
- "@vercel/next": "15.0.0",
76
- "@vercel/node": "16.0.0",
77
- "@vercel/python": "17.0.0",
78
- "@vercel/redwood": "13.0.0",
79
- "@vercel/remix-builder": "16.0.0",
80
- "@vercel/ruby": "13.0.0",
81
- "@vercel/rust": "12.0.0",
82
- "@vercel/static-build": "13.0.0"
64
+ "@vercel/backends": "11.0.1",
65
+ "@vercel/container": "11.0.1",
66
+ "@vercel/elysia": "11.0.1",
67
+ "@vercel/express": "11.0.1",
68
+ "@vercel/fastify": "11.0.1",
69
+ "@vercel/go": "14.0.1",
70
+ "@vercel/h3": "11.0.1",
71
+ "@vercel/hono": "11.0.1",
72
+ "@vercel/hydrogen": "12.0.1",
73
+ "@vercel/koa": "11.0.1",
74
+ "@vercel/nestjs": "11.0.1",
75
+ "@vercel/next": "15.0.1",
76
+ "@vercel/node": "16.0.1",
77
+ "@vercel/python": "17.0.1",
78
+ "@vercel/redwood": "13.0.1",
79
+ "@vercel/remix-builder": "16.0.1",
80
+ "@vercel/ruby": "13.0.1",
81
+ "@vercel/rust": "12.0.1",
82
+ "@vercel/static-build": "13.0.1"
83
83
  },
84
84
  "devDependencies": {
85
85
  "@edge-runtime/node-utils": "2.3.0",
@@ -206,26 +206,26 @@
206
206
  "write-json-file": "2.2.0",
207
207
  "xdg-app-paths": "5.1.0",
208
208
  "yauzl-promise": "2.1.3",
209
- "@vercel-internals/builder-orchestration": "1.0.7",
210
- "@vercel-internals/cli-builder-integration": "1.0.9",
209
+ "@vercel-internals/cli-builder-integration": "1.0.10",
210
+ "@vercel-internals/builder-orchestration": "1.0.8",
211
211
  "@vercel-internals/constants": "1.0.4",
212
212
  "@vercel-internals/get-package-json": "1.0.0",
213
213
  "@vercel-internals/local-schedules": "0.0.3",
214
- "@vercel-internals/service-topology": "1.0.7",
215
- "@vercel-internals/types": "3.0.12",
216
- "@vercel/client": "18.4.5",
214
+ "@vercel-internals/service-topology": "1.0.8",
215
+ "@vercel-internals/types": "3.0.13",
216
+ "@vercel/client": "18.4.6",
217
217
  "@vercel/error-utils": "2.2.1",
218
218
  "@vercel/frameworks": "3.34.0",
219
- "@vercel/fs-detectors": "7.7.2",
219
+ "@vercel/fs-detectors": "7.7.3",
220
220
  "@vercel/routing-utils": "6.6.0"
221
221
  },
222
222
  "optionalDependencies": {
223
- "@vercel/vc-native-darwin-arm64": "60.1.1",
224
- "@vercel/vc-native-darwin-x64": "60.1.1",
225
- "@vercel/vc-native-linux-arm64": "60.1.1",
226
- "@vercel/vc-native-linux-x64": "60.1.1",
227
- "@vercel/vc-native-win32-arm64": "60.1.1",
228
- "@vercel/vc-native-win32-x64": "60.1.1"
223
+ "@vercel/vc-native-darwin-arm64": "60.1.3",
224
+ "@vercel/vc-native-darwin-x64": "60.1.3",
225
+ "@vercel/vc-native-linux-arm64": "60.1.3",
226
+ "@vercel/vc-native-linux-x64": "60.1.3",
227
+ "@vercel/vc-native-win32-arm64": "60.1.3",
228
+ "@vercel/vc-native-win32-x64": "60.1.3"
229
229
  },
230
230
  "scripts": {
231
231
  "test": "node scripts/test.mjs --run",
@@ -1,7 +0,0 @@
1
- import { createRequire as __createRequire } from 'node:module';
2
- import { fileURLToPath as __fileURLToPath } from 'node:url';
3
- import { dirname as __dirname_ } from 'node:path';
4
- const require = __createRequire(import.meta.url);
5
- const __filename = __fileURLToPath(import.meta.url);
6
- const __dirname = __dirname_(__filename);
7
- import{require_format}from"./chunk-WRILLB46.js";import{require_ms}from"./chunk-QTKJC2O5.js";import{require_source}from"./chunk-U7KCDTCH.js";import{__toESM}from"./chunk-6L236MNA.js";var import_ms=__toESM(require_ms(),1),import_chalk=__toESM(require_source(),1),import_format=__toESM(require_format(),1);function formatDate(dateStrOrNumber){if(!dateStrOrNumber)return import_chalk.default.gray("-");let date=new Date(dateStrOrNumber),diff=date.getTime()-Date.now();return diff<0?`${(0,import_format.default)(date,"DD MMMM YYYY HH:mm:ss")} ${import_chalk.default.gray(`[${(0,import_ms.default)(-diff)} ago]`)}`:`${(0,import_format.default)(date,"DD MMMM YYYY HH:mm:ss")} ${import_chalk.default.gray(`[in ${(0,import_ms.default)(diff)}]`)}`}function formatDateWithoutTime(dateStrOrNumber){if(!dateStrOrNumber)return import_chalk.default.gray("-");let date=new Date(dateStrOrNumber),diff=date.getTime()-Date.now();return diff<0?`${(0,import_format.default)(date,"MMM DD YYYY")} ${import_chalk.default.gray(`[${(0,import_ms.default)(-diff)} ago]`)}`:`${(0,import_format.default)(date,"MMM DD YYYY")} ${import_chalk.default.gray(`[in ${(0,import_ms.default)(diff)}]`)}`}export{formatDate,formatDateWithoutTime};
@@ -1,7 +0,0 @@
1
- import { createRequire as __createRequire } from 'node:module';
2
- import { fileURLToPath as __fileURLToPath } from 'node:url';
3
- import { dirname as __dirname_ } from 'node:path';
4
- const require = __createRequire(import.meta.url);
5
- const __filename = __fileURLToPath(import.meta.url);
6
- const __dirname = __dirname_(__filename);
7
- import{require_dist,require_dist2}from"./chunk-JMNAVONO.js";import{require_types}from"./chunk-GHM7V3GG.js";import{require_build_utils}from"./chunk-EWWFNMPZ.js";import{__commonJS,__toESM}from"./chunk-6L236MNA.js";var require_dist3=__commonJS({"../../internals/service-topology/dist/index.js"(exports,module){"use strict";var __defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__hasOwnProp=Object.prototype.hasOwnProperty,__export=(target,all)=>{for(var name in all)__defProp(target,name,{get:all[name],enumerable:!0})},__copyProps=(to,from,except,desc)=>{if(from&&typeof from=="object"||typeof from=="function")for(let key of __getOwnPropNames(from))!__hasOwnProp.call(to,key)&&key!==except&&__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to},__toCommonJS=mod=>__copyProps(__defProp({},"__esModule",{value:!0}),mod),src_exports={};__export(src_exports,{INTERNAL_SERVICE_PREFIX:()=>import_fs_detectors2.INTERNAL_SERVICE_PREFIX,autoDetectServices:()=>import_fs_detectors2.autoDetectServices,detectServices:()=>import_fs_detectors2.detectServices,generateServiceRewrites:()=>import_fs_detectors2.generateServiceRewrites,generateServicesRoutes:()=>import_fs_detectors2.generateServicesRoutes,getInternalServiceCronPath:()=>import_fs_detectors2.getInternalServiceCronPath,getInternalServiceCronPathPrefix:()=>import_fs_detectors2.getInternalServiceCronPathPrefix,getInternalServiceFunctionPath:()=>import_fs_detectors2.getInternalServiceFunctionPath,getInternalServiceWorkerPath:()=>import_fs_detectors2.getInternalServiceWorkerPath,getInternalServiceWorkerPathPrefix:()=>import_fs_detectors2.getInternalServiceWorkerPathPrefix,hasLegacyServicesConfig:()=>import_fs_detectors2.hasLegacyServicesConfig,isExperimentalService:()=>import_fs_detectors2.isExperimentalService,isExperimentalServiceV2:()=>import_fs_detectors2.isExperimentalServiceV2,isRouteOwningBuilder:()=>import_fs_detectors2.isRouteOwningBuilder,isStaticBuild:()=>import_fs_detectors2.isStaticBuild,migrateExperimentalServices:()=>import_fs_detectors2.migrateExperimentalServices,planExperimentalServicesMigration:()=>import_fs_detectors2.planExperimentalServicesMigration,resolveAllConfiguredServices:()=>import_fs_detectors2.resolveAllConfiguredServices,resolveAllConfiguredServicesV2:()=>import_fs_detectors2.resolveAllConfiguredServicesV2,resolveConfiguredServiceV2:()=>import_fs_detectors2.resolveConfiguredServiceV2,validateServiceConfigV2:()=>import_fs_detectors2.validateServiceConfigV2});module.exports=__toCommonJS(src_exports);var import_fs_detectors2=require_dist2()}});var import_routing_utils=__toESM(require_dist(),1),import_build_utils=__toESM(require_build_utils(),1),import_types=__toESM(require_types(),1),import_fs_detectors=__toESM(require_dist2(),1);import{getConfigValidator}from"./config-validator.mjs";var imagesSchema={type:"object",additionalProperties:!1,required:["sizes"],properties:{contentDispositionType:{enum:["inline","attachment"]},contentSecurityPolicy:{type:"string",minLength:1,maxLength:256},dangerouslyAllowSVG:{type:"boolean"},domains:{type:"array",minItems:0,maxItems:50,items:{type:"string",minLength:1,maxLength:256}},formats:{type:"array",minItems:1,maxItems:4,items:{enum:["image/avif","image/webp","image/jpeg","image/png"]}},localPatterns:{type:"array",minItems:0,maxItems:25,items:{type:"object",additionalProperties:!1,properties:{pathname:{type:"string",minLength:1,maxLength:256},search:{type:"string",minLength:0,maxLength:256}}}},minimumCacheTTL:{type:"integer",minimum:1,maximum:31536e4},qualities:{type:"array",minItems:1,maxItems:20,items:{type:"integer",minimum:1,maximum:100}},remotePatterns:{type:"array",minItems:0,maxItems:50,items:{type:"object",additionalProperties:!1,required:["hostname"],properties:{protocol:{enum:["http","https"]},hostname:{type:"string",minLength:1,maxLength:256},port:{type:"string",minLength:0,maxLength:5},pathname:{type:"string",minLength:1,maxLength:256},search:{type:"string",minLength:0,maxLength:256}}}},sizes:{type:"array",minItems:1,maxItems:50,items:{type:"number"}}}},cronsSchema={type:"array",minItems:0,items:{type:"object",additionalProperties:!1,required:["path","schedule"],properties:{path:{type:"string",minLength:1,maxLength:512,pattern:"^/.*"},schedule:{type:"string",minLength:9,maxLength:256}}}},schedulesSchema={type:"array",minItems:0,maxItems:100,items:{type:"object",additionalProperties:!1,required:["expression","target","name"],properties:{expression:{type:"object",additionalProperties:!1,required:["cron"],properties:{cron:{type:"string"},jitter:{type:"integer",minimum:1,maximum:15}}},target:{oneOf:[{type:"object",additionalProperties:!1,required:["function"],properties:{function:{type:"string",minLength:1}}},{type:"object",additionalProperties:!1,required:["topic"],properties:{topic:{type:"string",minLength:1,maxLength:256}}},{type:"object",additionalProperties:!1,required:["entrypoint"],properties:{entrypoint:{type:"string",minLength:1,maxLength:512}}}]},name:{type:"string",minLength:1,maxLength:256},timezone:{type:"string",minLength:1,maxLength:50,description:"IANA timezone for cron evaluation. Defaults to UTC."}}}},experimentalServicesMountSchema={oneOf:[{type:"string",minLength:1,maxLength:512},{type:"object",additionalProperties:!1,properties:{path:{type:"string",minLength:1,maxLength:512},subdomain:{type:"string",minLength:1,maxLength:63}},anyOf:[{required:["path"]},{required:["subdomain"]}]}]},staticExperimentalServiceScheduleSchema={type:"string",minLength:9,maxLength:256,not:{const:"<dynamic>"}},experimentalServiceScheduleSchema={oneOf:[{type:"string",minLength:9,maxLength:256},{type:"array",minItems:1,items:staticExperimentalServiceScheduleSchema}]},experimentalServiceQueueTopicSchema={type:"object",additionalProperties:!1,required:["topic"],properties:{topic:{type:"string",minLength:1,maxLength:256},retryAfterSeconds:{type:"integer",minimum:1,maximum:86400},initialDelaySeconds:{type:"integer",minimum:0,maximum:86400}}},experimentalServiceTopicsSchema={oneOf:[{type:"array",minItems:1,items:{type:"string",minLength:1,maxLength:256}},{type:"array",minItems:1,items:experimentalServiceQueueTopicSchema}]},envVarNamesSchema={pattern:"^[A-Za-z_][A-Za-z0-9_]*$",maxLength:256},getExperimentalServicesCommonProperties=()=>({entrypoint:{type:"string",minLength:1,maxLength:512},root:{type:"string",minLength:1,maxLength:512},workspace:{type:"string",minLength:1,maxLength:512},framework:{type:"string",minLength:1,maxLength:256},builder:{type:"string",minLength:1,maxLength:256},runtime:{type:"string",minLength:1,maxLength:256},buildCommand:{type:"string",minLength:1,maxLength:2048},installCommand:{type:"string",minLength:1,maxLength:2048},preDeployCommand:{type:"string",minLength:1,maxLength:2048},command:{oneOf:[{type:"string",minLength:1,maxLength:2048},{type:"array",minItems:1,items:{type:"string",minLength:1,maxLength:2048}}]},memory:{type:"integer",minimum:128,maximum:10240},maxDuration:(0,import_build_utils.getMaxDurationSchema)(),includeFiles:{oneOf:[{type:"string",minLength:1},{type:"array",items:{type:"string",minLength:1}}]},excludeFiles:{oneOf:[{type:"string",minLength:1},{type:"array",items:{type:"string",minLength:1}}]}}),experimentalServicesRoutableProperties={mount:experimentalServicesMountSchema,routePrefix:{type:"string",minLength:1,maxLength:512},subdomain:{type:"string",minLength:1,maxLength:63}},getExperimentalServicesServiceConfigSchema=()=>({oneOf:[{type:"object",additionalProperties:!1,properties:{...getExperimentalServicesCommonProperties(),...experimentalServicesRoutableProperties,type:{enum:["web"]}}},{type:"object",additionalProperties:!1,required:["type","trigger","schedule"],properties:{...getExperimentalServicesCommonProperties(),type:{const:"job"},trigger:{const:"schedule"},schedule:experimentalServiceScheduleSchema}},{type:"object",additionalProperties:!1,required:["type","trigger","topics"],properties:{...getExperimentalServicesCommonProperties(),type:{const:"job"},trigger:{const:"queue"},topics:experimentalServiceTopicsSchema,consumer:{type:"string",minLength:1,maxLength:256}}},{type:"object",additionalProperties:!1,required:["type","trigger","entrypoint"],properties:{...getExperimentalServicesCommonProperties(),type:{const:"job"},trigger:{const:"workflow"}}},{type:"object",additionalProperties:!1,required:["type"],properties:{...getExperimentalServicesCommonProperties(),type:{const:"worker"},topics:{type:"array",items:{type:"string",minLength:1,maxLength:256},minItems:1},consumer:{type:"string",minLength:1,maxLength:256}}},{type:"object",additionalProperties:!1,required:["type","schedule"],properties:{...getExperimentalServicesCommonProperties(),type:{const:"cron"},schedule:experimentalServiceScheduleSchema}}]}),getExperimentalServicesSchema=()=>({type:"object",propertyNames:{pattern:"^[a-zA-Z]([a-zA-Z0-9_-]*[a-zA-Z0-9])?$",maxLength:64},additionalProperties:getExperimentalServicesServiceConfigSchema()}),experimentalServiceGroupsSchema={type:"object",propertyNames:{pattern:"^[a-zA-Z]([a-zA-Z0-9_-]*[a-zA-Z0-9])?$",maxLength:64},additionalProperties:{type:"array",items:{type:"string",minLength:1,maxLength:256}}},servicesPathSchema={type:"string",minLength:1,maxLength:512},servicesCommandSchema={type:"string",minLength:1,maxLength:2048},servicesServiceNamePattern="^[a-z]([a-z_-]*[a-z])?$",servicesBindingSchema={type:"object",additionalProperties:!1,required:["service","format","env"],properties:{type:{description:"Optional binding type marker. Currently the only supported type is `service`. When present this must be `service`.",const:"service"},service:{type:"string",minLength:1,maxLength:64,pattern:servicesServiceNamePattern},format:{const:"url"},env:{type:"string",...envVarNamesSchema}}},servicesBindingsSchema={type:"array",maxItems:100,items:servicesBindingSchema},getServicesServiceConfigSchema=()=>({type:"object",additionalProperties:!1,required:["root"],properties:{root:servicesPathSchema,framework:{type:"string",minLength:1,maxLength:256},runtime:{type:"string",minLength:1,maxLength:256},entrypoint:servicesPathSchema,command:{oneOf:[{type:"string"},{type:"array",items:{type:"string"}}]},installCommand:servicesCommandSchema,buildCommand:servicesCommandSchema,devCommand:servicesCommandSchema,ignoreCommand:servicesCommandSchema,outputDirectory:servicesPathSchema,bindings:servicesBindingsSchema,functions:(0,import_build_utils.getFunctionsSchema)(),headers:import_routing_utils.headersSchema,redirects:import_routing_utils.redirectsSchema,rewrites:import_routing_utils.rewritesSchema,routes:import_routing_utils.routesSchema,cleanUrls:import_routing_utils.cleanUrlsSchema,trailingSlash:import_routing_utils.trailingSlashSchema}}),getServicesSchema=()=>({type:"object",propertyNames:{pattern:servicesServiceNamePattern,maxLength:64},additionalProperties:getServicesServiceConfigSchema()}),proxySchema={type:"object",additionalProperties:!1,required:["entrypoint"],properties:{entrypoint:{type:"string",minLength:1},matcher:{oneOf:[{type:"string",minLength:1},{type:"array",minItems:1,items:{type:"string",minLength:1}}]}}};function buildVercelConfigSchema(){return{type:"object",additionalProperties:!0,properties:{builds:import_build_utils.buildsSchema,routes:import_routing_utils.routesSchema,cleanUrls:import_routing_utils.cleanUrlsSchema,headers:import_routing_utils.headersSchema,redirects:import_routing_utils.redirectsSchema,rewrites:import_routing_utils.rewritesSchema,trailingSlash:import_routing_utils.trailingSlashSchema,functions:(0,import_build_utils.getFunctionsSchema)(),images:imagesSchema,crons:cronsSchema,schedules:schedulesSchema,bunVersion:{type:"string"},proxy:proxySchema,experimentalServices:getExperimentalServicesSchema(),experimentalServiceGroups:experimentalServiceGroupsSchema,services:getServicesSchema(),experimentalServicesV2:getServicesSchema()}}}function validateConfig(config){let validate=getConfigValidator(buildVercelConfigSchema);if(!validate(config)&&validate.errors&&validate.errors[0]){let error=validate.errors[0],fileName=config[import_types.fileNameSymbol]||"vercel.json",niceError=(0,import_build_utils.getPrettyError)(error);return niceError.message=`Invalid ${fileName} - ${niceError.message}`,niceError}for(let[index,schedule]of(config.schedules??[]).entries())if(schedule.timezone!==void 0)try{if(!/^[A-Za-z][A-Za-z0-9_+/-]*$/.test(schedule.timezone))throw new RangeError("Expected a named timezone");new Intl.DateTimeFormat("en-US",{timeZone:schedule.timezone})}catch{return new import_build_utils.NowBuildError({code:"INVALID_SCHEDULE_TIMEZONE",message:`Invalid ${config[import_types.fileNameSymbol]||"vercel.json"} - \`schedules[${index}].timezone\` must be a valid IANA timezone, such as "America/New_York". Omit it to use UTC.`})}for(let[pattern,fn]of Object.entries(config.functions??{}))if(fn.affinity!==void 0)return new import_build_utils.NowBuildError({code:"FUNCTION_AFFINITY_REQUIRES_SERVICE",message:`Function affinity can only be configured under a service. Move functions[${JSON.stringify(pattern)}].affinity into the relevant service's functions configuration.`,link:"https://vercel.com/docs/concepts/projects/project-configuration#functions"});let functionMaps=[config.functions,...Object.values(config.services??{}).map(service=>service.functions),...Object.values(config.experimentalServicesV2??{}).map(service=>service.functions)];for(let functions of functionMaps)for(let[pattern,fn]of Object.entries(functions??{})){let regions=[...new Set(fn.regions)];if(fn.affinity?.mode==="strict"&&(regions.includes("all")||regions.length>1))return new import_build_utils.NowBuildError({code:"INVALID_FUNCTION_AFFINITY_REGIONS",message:`Function affinity mode "strict" requires at most one statically configured region. Update \`functions[${JSON.stringify(pattern)}].regions\` to contain a single region.`,link:"https://vercel.com/docs/concepts/projects/project-configuration#functions"})}if(config.proxy){let proxyError=(0,import_fs_detectors.validateProxyConfig)(config.proxy);if(proxyError)return new import_build_utils.NowBuildError({code:proxyError.code.toUpperCase(),message:proxyError.message})}if(config.functions&&config.builds)return new import_build_utils.NowBuildError({code:"FUNCTIONS_AND_BUILDS",message:"The `functions` property cannot be used in conjunction with the `builds` property. Please remove one of them.",link:"https://vercel.link/functions-and-builds"});if(config.proxy&&config.builds)return new import_build_utils.NowBuildError({code:"PROXY_AND_BUILDS",message:"The `proxy` property cannot be used with the `builds` property. Remove `builds` to use an explicit proxy entrypoint."});let hasExperimentalServices=!!config.experimentalServices;if(hasExperimentalServices&&config.builds)return new import_build_utils.NowBuildError({code:"EXPERIMENTAL_SERVICES_AND_BUILDS",message:"The `experimentalServices` property cannot be used in conjunction with the `builds` property. Please remove one of them."});if(hasExperimentalServices&&config.functions)return new import_build_utils.NowBuildError({code:"EXPERIMENTAL_SERVICES_AND_FUNCTIONS",message:"The `experimentalServices` property cannot be used in conjunction with the `functions` property. Please remove one of them."});if(config.experimentalServiceGroups&&!config.experimentalServices)return new import_build_utils.NowBuildError({code:"SERVICE_GROUPS_WITHOUT_SERVICES",message:"The `experimentalServiceGroups` property requires `experimentalServices` to be defined. Service groups reference services by name."});let hasServices=config.services!=null,hasExperimentalServicesV2=config.experimentalServicesV2!=null;if(hasServices&&hasExperimentalServicesV2)return new import_build_utils.NowBuildError({code:"SERVICES_AND_EXPERIMENTAL_SERVICES_V2",message:"The `services` property cannot be used in conjunction with its deprecated alias `experimentalServicesV2`. Please use only `services`."});let servicesConfig=config.services??config.experimentalServicesV2,servicesConfigKey=hasServices?"services":"experimentalServicesV2",servicesErrorCodePrefix=hasServices?"SERVICES":"EXPERIMENTAL_SERVICES_V2";if(servicesConfig&&hasExperimentalServices)return new import_build_utils.NowBuildError({code:`${servicesErrorCodePrefix}_AND_EXPERIMENTAL_SERVICES`,message:`The \`${servicesConfigKey}\` property cannot be used in conjunction with the \`experimentalServices\` property. Please use only one services configuration.`});if(servicesConfig&&config.builds)return new import_build_utils.NowBuildError({code:`${servicesErrorCodePrefix}_AND_BUILDS`,message:`The \`${servicesConfigKey}\` property cannot be used in conjunction with the \`builds\` property. Please remove one of them.`});if(servicesConfig){let ambiguousTopLevel=[];if(config.functions!=null&&ambiguousTopLevel.push("functions"),config.installCommand!=null&&ambiguousTopLevel.push("installCommand"),config.buildCommand!=null&&ambiguousTopLevel.push("buildCommand"),config.devCommand!=null&&ambiguousTopLevel.push("devCommand"),config.ignoreCommand!=null&&ambiguousTopLevel.push("ignoreCommand"),config.outputDirectory!=null&&ambiguousTopLevel.push("outputDirectory"),config.framework!=null&&ambiguousTopLevel.push("framework"),ambiguousTopLevel.length>0){let count=ambiguousTopLevel.length,fields=ambiguousTopLevel.map(field=>`\`${field}\``).join(", ");return new import_build_utils.NowBuildError({code:`${servicesErrorCodePrefix}_AND_TOP_LEVEL_BUILD_SETTINGS`,message:`The top-level ${count>1?"properties":"property"} ${fields} cannot be used with \`${servicesConfigKey}\` because the owning service is ambiguous. Move ${count>1?"them":"it"} under the relevant service in \`${servicesConfigKey}\`.`})}}if(servicesConfig){let serviceNames=new Set(Object.keys(servicesConfig));for(let[serviceName,serviceConfig]of Object.entries(servicesConfig))for(let binding of serviceConfig.bindings??[])if(!serviceNames.has(binding.service))return new import_build_utils.NowBuildError({code:`${servicesErrorCodePrefix}_BINDING_UNKNOWN_SERVICE`,message:`Service "${serviceName}" declares a binding to unknown service "${binding.service}". Add "${binding.service}" to \`${servicesConfigKey}\` or fix the binding.`})}return null}export{require_dist3 as require_dist,validateConfig};
@@ -1,11 +0,0 @@
1
- import { createRequire as __createRequire } from 'node:module';
2
- import { fileURLToPath as __fileURLToPath } from 'node:url';
3
- import { dirname as __dirname_ } from 'node:path';
4
- const require = __createRequire(import.meta.url);
5
- const __filename = __fileURLToPath(import.meta.url);
6
- const __dirname = __dirname_(__filename);
7
- import{require_cli_config}from"./chunk-BRK4OB4B.js";import{__toESM}from"./chunk-6L236MNA.js";var import_cli_config=__toESM(require_cli_config(),1);import{createHash,randomBytes}from"node:crypto";import{link,lstat,mkdir,open,readFile,rename,rm,unlink,writeFile}from"node:fs/promises";import{join}from"node:path";import{install}from"@vltpkg/graph";import{PackageInfoClient}from"@vltpkg/package-info";import{PackageJson}from"@vltpkg/package-json";import{PathScurry}from"path-scurry";var LOCK_RETRY_MS=50,LOCK_WAIT_MS=5*60*1e3,LOCK_EMPTY_GRACE_MS=1e3,REMOVE_MAX_RETRIES=5,REMOVE_RETRY_DELAY_MS=100,TARBALL_FETCH_TIMEOUT_MS=2*60*1e3,activeInstallations=new Map;function compareKeys(a,b){return a<b?-1:a>b?1:0}function canonicalize(value){return Array.isArray(value)?value.map(canonicalize):value&&typeof value=="object"?Object.fromEntries(Object.entries(value).sort(([a],[b])=>compareKeys(a,b)).map(([key,child])=>[key,canonicalize(child)])):value}function validateGraph(graph){let{hash,...contents}=graph;if(createHash("sha256").update(JSON.stringify(canonicalize(contents))).digest("hex")!==hash)throw new Error(`The embedded vlt Builder graph for ${graph.name} is invalid.`)}async function wait(ms){await new Promise(resolve=>setTimeout(resolve,ms))}function hasErrorCode(error,code){return error instanceof Error&&"code"in error&&error.code===code}function isProcessAlive(pid){try{return process.kill(pid,0),!0}catch(error){return hasErrorCode(error,"EPERM")}}async function isLockHolderAlive(path){try{let pid=Number.parseInt((await readFile(path,"utf8")).trim(),10);return Number.isInteger(pid)&&pid>0&&isProcessAlive(pid)}catch{return!1}}async function tryStealStaleLock(path,emptyGraceMs){let first;try{first=await lstat(path)}catch{return!0}if(first.size===0&&Date.now()-first.mtimeMs<emptyGraceMs||await isLockHolderAlive(path))return!1;let second;try{second=await lstat(path)}catch{return!0}if(second.dev!==first.dev||second.ino!==first.ino||second.mtimeMs!==first.mtimeMs||second.size!==first.size)return!1;try{return await unlink(path),!0}catch{return!1}}async function acquireLock(path,{waitMs=LOCK_WAIT_MS,emptyGraceMs=LOCK_EMPTY_GRACE_MS}={}){await mkdir(join(path,".."),{recursive:!0});let startedAt=Date.now();for(;;){let tmp=`${path}.${process.pid}-${randomBytes(6).toString("hex")}`;await writeFile(tmp,`${process.pid}
8
- `,{flag:"wx"});try{return await link(tmp,path),await unlink(tmp).catch(()=>{}),await open(path,"r")}catch(error){if(await unlink(tmp).catch(()=>{}),!hasErrorCode(error,"EEXIST"))throw error;if(await tryStealStaleLock(path,emptyGraceMs))continue;if(Date.now()-startedAt>waitMs)throw new Error(`Timed out waiting for vlt Builder lock "${path}".`);await wait(LOCK_RETRY_MS)}}}async function removeInstallation(path){await rm(path,{recursive:!0,force:!0,maxRetries:REMOVE_MAX_RETRIES,retryDelay:REMOVE_RETRY_DELAY_MS})}async function installationComplete(root,graph){try{return(await readFile(join(root,".vercel-builder-graph"),"utf8")).trim()===graph.hash}catch{return!1}}var EmbeddedPackageInfoClient=class extends PackageInfoClient{constructor(options,fetchTimeoutMs=TARBALL_FETCH_TIMEOUT_MS){super(options);this.fetchTimeoutMs=fetchTimeoutMs}async extract(...args){let[rawSpec,target,rawOptions={}]=args,spec=rawSpec,options=rawOptions,type=spec.final?.type;if((type==="registry"||type==="remote")&&options.resolved){if(!options.integrity)throw new Error(`Missing integrity for Builder dependency ${options.resolved}`);let response;try{response=await fetch(options.resolved,{signal:AbortSignal.timeout(this.fetchTimeoutMs)})}catch(error){throw error instanceof Error&&(error.name==="TimeoutError"||error.name==="AbortError")?new Error(`Timed out downloading Builder dependency ${options.resolved}`):error}if(!response.ok)throw new Error(`Could not download Builder dependency ${options.resolved}: ${response.status}`);let bytes=Buffer.from(await response.arrayBuffer()),integrity=`sha512-${createHash("sha512").update(new Uint8Array(bytes)).digest("base64")}`;if(options.integrity!==integrity)throw new Error(`Integrity check failed for Builder dependency ${options.resolved}`);return await(await PackageInfoClient.prototype.getTarPool.call(this)).unpack(new Uint8Array(bytes),target),{resolved:options.resolved,integrity,spec:rawSpec}}return super.extract(...args)}};async function reifyGraph(root,graph,packageInfoFactory){let packageJson=new PackageJson,packageInfo=packageInfoFactory({...graph.lockfile.options,projectRoot:root,packageJson});await install({...graph.lockfile.options,projectRoot:root,packageJson,packageInfo,scurry:new PathScurry(root),allowScripts:":not(*)",frozenLockfile:!0,cleanInstall:!0})}async function ensureGraph(graph,cacheRoot,packageInfoFactory){validateGraph(graph);let root=join(cacheRoot,graph.hash),active=activeInstallations.get(root);if(active)return active;let installation=(async()=>{if(await installationComplete(root,graph))return root;let lockPath=join(cacheRoot,"locks",`${graph.hash}.lock`),lock=await acquireLock(lockPath),temporaryRoot;try{return await installationComplete(root,graph)||(await removeInstallation(root),temporaryRoot=process.platform==="win32"?root:join(cacheRoot,"tmp",`${graph.hash}-${process.pid}-${randomBytes(6).toString("hex")}`),await mkdir(temporaryRoot,{recursive:!0}),await writeFile(join(temporaryRoot,"package.json"),`${JSON.stringify(graph.manifest,null,2)}
9
- `),await writeFile(join(temporaryRoot,"vlt-lock.json"),`${JSON.stringify(graph.lockfile,null,2)}
10
- `),await reifyGraph(temporaryRoot,graph,packageInfoFactory),await writeFile(join(temporaryRoot,".vercel-builder-graph"),`${graph.hash}
11
- `),temporaryRoot!==root&&(await mkdir(join(root,".."),{recursive:!0}),await rename(temporaryRoot,root)),temporaryRoot=void 0),root}finally{await lock.close(),await unlink(lockPath).catch(()=>{}),temporaryRoot&&await removeInstallation(temporaryRoot)}})();activeInstallations.set(root,installation);let clearInstallation=()=>{activeInstallations.get(root)===installation&&activeInstallations.delete(root)};return installation.then(clearInstallation,clearInstallation),installation}function createVltBuilderImporter({graphs,loadGraphs=async()=>graphs,require:require2,cacheRoot=join((0,import_cli_config.getCachePath)(),"builders-vlt"),packageInfoFactory=options=>new EmbeddedPackageInfoClient(options),debug=()=>{}}){return async function(specs){if(specs.size===0)return new Map;let loadedGraphs=await loadGraphs();if(loadedGraphs.schemaVersion!==1)throw new Error("The embedded vlt Builder graph index is invalid.");let builders=new Map;return await Promise.all([...specs].map(async([spec,name])=>{let graph=loadedGraphs.builders[name];if(!graph)throw new Error(`No pinned vlt graph exists for ${name}.`);let root=await ensureGraph(graph,cacheRoot,packageInfoFactory),pkgPath=require2.resolve(`${name}/package.json`,{paths:[root]}),pkg=JSON.parse(await readFile(pkgPath,"utf8"));if(pkg.name!==name||pkg.version!==graph.version)throw new Error(`The vlt Builder graph materialized ${String(pkg.name)}@${String(pkg.version)} instead of ${name}@${graph.version}.`);let path=require2.resolve(name,{paths:[root]});debug(`Resolved ${name}@${graph.version} with vlt from ${root}`),builders.set(spec,{path,pkgPath,pkg:{...pkg,name},builder:require2(path),dynamicallyInstalled:!0})})),builders}}export{EmbeddedPackageInfoClient,TARBALL_FETCH_TIMEOUT_MS,acquireLock,createVltBuilderImporter};