@vercel/cli-support 68.3.0-snapshot-4bb5562899c1 → 68.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/{add-JGXB7TKO.js → add-6QNDJVXV.js} +1 -1
- package/dist/chunks/{add-OVCKUCKJ.js → add-LVSBBBNT.js} +1 -1
- package/dist/chunks/{add-WXYF62BV.js → add-QNZUJVW3.js} +1 -1
- package/dist/chunks/{alerts-XC3HSFNS.js → alerts-TCS56TZU.js} +1 -1
- package/dist/chunks/{build-EOC2F5EB.js → build-KKE7LLGT.js} +1 -1
- package/dist/chunks/{chunk-JOV747QS.js → chunk-24L6BDAY.js} +1 -1
- package/dist/chunks/{chunk-VL2DQ4JF.js → chunk-2CDYSI2W.js} +1 -1
- package/dist/chunks/{chunk-XBMLLP4J.js → chunk-3CK5SHI4.js} +1 -1
- package/dist/chunks/{chunk-GTZ6ASHD.js → chunk-3TOEU3F6.js} +1 -1
- package/dist/chunks/{chunk-PIK7YTVD.js → chunk-4ZZEDEMN.js} +1 -1
- package/dist/chunks/{chunk-STMC2M6P.js → chunk-5KLSANRW.js} +1 -1
- package/dist/chunks/{chunk-4IJ6MNTE.js → chunk-5NRYTFUS.js} +2 -2
- package/dist/chunks/{chunk-S3HHQBZN.js → chunk-5VVIXI7N.js} +1 -1
- package/dist/chunks/{chunk-7KWH24QW.js → chunk-6562FIUX.js} +1 -1
- package/dist/chunks/{chunk-MQAI6NJ5.js → chunk-67H6BT7B.js} +1 -1
- package/dist/chunks/{chunk-Y3VTP4NX.js → chunk-BSPLBWAX.js} +1 -1
- package/dist/chunks/{chunk-X24LA5TL.js → chunk-DFZRZPCJ.js} +2 -2
- package/dist/chunks/{chunk-ZJNJZSJA.js → chunk-DPQLHYC5.js} +1 -1
- package/dist/chunks/{chunk-QV2PDKZY.js → chunk-DSFXR6UL.js} +1 -1
- package/dist/chunks/{chunk-FKX3DSV3.js → chunk-EYH6WGF2.js} +1 -1
- package/dist/chunks/{chunk-HPAGXT6E.js → chunk-FEO3KPCN.js} +2 -2
- package/dist/chunks/{chunk-HFX56MAE.js → chunk-FRBBC5I7.js} +1 -1
- package/dist/chunks/{chunk-JZIVQAEF.js → chunk-GIRRO4QV.js} +1 -1
- package/dist/chunks/{chunk-FSKAAYPW.js → chunk-GJQ3G7OG.js} +1 -1
- package/dist/chunks/{chunk-USTT3CON.js → chunk-GROKZBM5.js} +1 -1
- package/dist/chunks/{chunk-QUE6QJJL.js → chunk-GVQEICZZ.js} +1 -1
- package/dist/chunks/{chunk-UGHEH4LA.js → chunk-GXTN6ATK.js} +1 -1
- package/dist/chunks/{chunk-577HHXC7.js → chunk-H3K7IR5S.js} +1 -1
- package/dist/chunks/{chunk-L6QX3T3V.js → chunk-H3NVQYY6.js} +1 -1
- package/dist/chunks/{chunk-JW522BFH.js → chunk-HCFEUT2S.js} +1 -1
- package/dist/chunks/{chunk-Q4B2ICJM.js → chunk-HH7YFAAX.js} +1 -1
- package/dist/chunks/{chunk-LUK3POIP.js → chunk-HHV7F6W4.js} +1 -1
- package/dist/chunks/{chunk-62IAZJKT.js → chunk-HOYNGN6Y.js} +1 -1
- package/dist/chunks/{chunk-IGUBYNVC.js → chunk-I3EXVLOR.js} +1 -1
- package/dist/chunks/{chunk-DKDYIUCY.js → chunk-IXRTZRJN.js} +1 -1
- package/dist/chunks/{chunk-75GXMKCF.js → chunk-JZXT53LT.js} +1 -1
- package/dist/chunks/{chunk-OIHLZ4IA.js → chunk-KNQPKVDP.js} +1 -1
- package/dist/chunks/{chunk-EQQJB7MI.js → chunk-KTWVMMXL.js} +1 -1
- package/dist/chunks/{chunk-O45CPVEL.js → chunk-LCM7GAHQ.js} +1 -1
- package/dist/chunks/{chunk-VSXHIE2L.js → chunk-MDSJKFYU.js} +1 -1
- package/dist/chunks/{chunk-CYEMSHQ4.js → chunk-MHIH4NVP.js} +1 -1
- package/dist/chunks/{chunk-OWO23BQ5.js → chunk-MSKKM36B.js} +1 -1
- package/dist/chunks/{chunk-4YGSXM2T.js → chunk-MUJDAD73.js} +4 -4
- package/dist/chunks/{chunk-ZTTGEYEE.js → chunk-N4J3R7KS.js} +1 -1
- package/dist/chunks/{chunk-L52TWK6B.js → chunk-NBMLJM3J.js} +1 -1
- package/dist/chunks/{chunk-MECG6WLF.js → chunk-NNYSREF6.js} +1 -1
- package/dist/chunks/{chunk-JOKL5GT4.js → chunk-NZU43SVD.js} +1 -1
- package/dist/chunks/{chunk-OZLK3WML.js → chunk-OCIRBXJK.js} +1 -1
- package/dist/chunks/{chunk-IZL4EP7R.js → chunk-OHK7TSWE.js} +1 -1
- package/dist/chunks/{chunk-CZC5QGI5.js → chunk-PYXGCPOE.js} +1 -1
- package/dist/chunks/{chunk-S5IZAQDU.js → chunk-SP73R4DW.js} +1 -1
- package/dist/chunks/{chunk-KI2DDO2M.js → chunk-SUZXGVMN.js} +1 -1
- package/dist/chunks/{chunk-R2UVL57S.js → chunk-T2DXWRDM.js} +1 -1
- package/dist/chunks/{chunk-LYWMEQRT.js → chunk-TTGD6NBN.js} +1 -1
- package/dist/chunks/{chunk-FA7WAHGX.js → chunk-TTSA4CGZ.js} +1 -1
- package/dist/chunks/{chunk-2YE7HO7L.js → chunk-TXQFB44P.js} +1 -1
- package/dist/chunks/{chunk-LM3VCTGL.js → chunk-UL6BYW6P.js} +1 -1
- package/dist/chunks/{chunk-O2CAD56C.js → chunk-V2BCAK3I.js} +1 -1
- package/dist/chunks/{chunk-F5HOZBY3.js → chunk-W6KIUTKO.js} +1 -1
- package/dist/chunks/{chunk-JATIYY4H.js → chunk-X2LS3YDZ.js} +1 -1
- package/dist/chunks/{chunk-B6G3V7C7.js → chunk-XJVTGNAB.js} +1 -1
- package/dist/chunks/{chunk-PB6T5FH2.js → chunk-XTDL6VDZ.js} +1 -1
- package/dist/chunks/{chunk-6E6TYIDT.js → chunk-YDWOGOYQ.js} +1 -1
- package/dist/chunks/{chunk-O5SIUXE6.js → chunk-YSOO56PM.js} +1 -1
- package/dist/chunks/{chunk-KW7G66ZY.js → chunk-Z7B7PFAR.js} +2 -2
- package/dist/chunks/{chunk-DXG5ITSX.js → chunk-ZZTCTVBJ.js} +1 -1
- package/dist/chunks/{clear-XM6U2LZG.js → clear-CHK647GV.js} +1 -1
- package/dist/chunks/{compile-vercel-config-7HTV3XDT.js → compile-vercel-config-HAQYXHPB.js} +1 -1
- package/dist/chunks/{config-WAYNH5FH.js → config-ROLBZC3E.js} +1 -1
- package/dist/chunks/{config-H7B62N7P.js → config-X6N2ECGU.js} +1 -1
- package/dist/chunks/{delete-HNJEM6SL.js → delete-A3ZN3JL2.js} +1 -1
- package/dist/chunks/{delete-3GLZUBWG.js → delete-MC7BC7NX.js} +1 -1
- package/dist/chunks/{describe-L7HZBSWX.js → describe-MF3QA4XP.js} +1 -1
- package/dist/chunks/{detect-services-QQWDDXR4.js → detect-services-V6P6RNRY.js} +1 -1
- package/dist/chunks/{disable-7NRBTCQH.js → disable-GKANXOTL.js} +1 -1
- package/dist/chunks/{discard-F7N2DAVD.js → discard-2WY2RBN3.js} +1 -1
- package/dist/chunks/{edit-WTJMNCAV.js → edit-DXAJX6I2.js} +1 -1
- package/dist/chunks/{edit-ILM7AU2K.js → edit-U4VYAWI2.js} +1 -1
- package/dist/chunks/{enable-3QT356KG.js → enable-LLHUA7RH.js} +1 -1
- package/dist/chunks/{export-EUDVMKNC.js → export-4DW4AQ46.js} +1 -1
- package/dist/chunks/{future-VI6GFQ5S.js → future-WJEMZHER.js} +1 -1
- package/dist/chunks/{generate-cert-for-deploy-B5SEDLVP.js → generate-cert-for-deploy-EHPJUMRI.js} +1 -1
- package/dist/chunks/{group-actions-RKKQ4N3U.js → group-actions-MVWNYISJ.js} +1 -1
- package/dist/chunks/{image-4LT5EYSE.js → image-XXG2UE6K.js} +1 -1
- package/dist/chunks/{import-builders-6RQ33NP7.js → import-builders-JZ2W4AKZ.js} +1 -1
- package/dist/chunks/{inspect-4KPVCIE6.js → inspect-23F7OG7O.js} +1 -1
- package/dist/chunks/{inspect-O7ACMOY7.js → inspect-2YUBT5J7.js} +1 -1
- package/dist/chunks/{inspect-IFCFRG5Q.js → inspect-CMX764GE.js} +1 -1
- package/dist/chunks/{inspect-6QOQ34XR.js → inspect-FBFB4673.js} +1 -1
- package/dist/chunks/{inspect-FK3DKMSD.js → inspect-NIW6SLTJ.js} +1 -1
- package/dist/chunks/{list-YFYMW3PF.js → list-4HCIH7ZT.js} +1 -1
- package/dist/chunks/{list-USYKOYNK.js → list-5EN5BQGX.js} +1 -1
- package/dist/chunks/{list-XP5PWPPV.js → list-LBLSWS4G.js} +1 -1
- package/dist/chunks/{login-N6NXJVOY.js → login-7B6WUTZA.js} +1 -1
- package/dist/chunks/{login-WJMEDLYY.js → login-FCE6ZNVP.js} +1 -1
- package/dist/chunks/{logs-K224ET3X.js → logs-UCFAA573.js} +1 -1
- package/dist/chunks/{ls-IVDRION6.js → ls-22KCD6XH.js} +1 -1
- package/dist/chunks/{ls-V5NG5442.js → ls-74UF3GAZ.js} +1 -1
- package/dist/chunks/{ls-CZQQSAWN.js → ls-AFD7VVPV.js} +1 -1
- package/dist/chunks/{ls-D5BBVUGJ.js → ls-JF5IEJRG.js} +1 -1
- package/dist/chunks/{ls-UJYVIGPU.js → ls-M3AULXSF.js} +1 -1
- package/dist/chunks/{ls-DTQQXLRH.js → ls-TZVW6K64.js} +1 -1
- package/dist/chunks/{ls-N7WA56X3.js → ls-VX6NJEQ5.js} +1 -1
- package/dist/chunks/{migrate-experimental-services-NVNIIL5I.js → migrate-experimental-services-DPLTGN7G.js} +1 -1
- package/dist/chunks/{mutate-F35S2QC7.js → mutate-ANP4MINN.js} +1 -1
- package/dist/chunks/{notifications-VIH6IT6O.js → notifications-ZLM75IM7.js} +1 -1
- package/dist/chunks/{open-XCUBKH5P.js → open-BTVG7PAR.js} +1 -1
- package/dist/chunks/{permissions-3JSUIIVW.js → permissions-R2VXNC7P.js} +1 -1
- package/dist/chunks/{plugin-offer-IGID5HXG.js → plugin-offer-TOGG57CN.js} +1 -1
- package/dist/chunks/{prompt-missing-credentials-6XVEA3P5.js → prompt-missing-credentials-M3MJ23CT.js} +1 -1
- package/dist/chunks/{publish-GWDTWIM6.js → publish-ZE5QH5IK.js} +1 -1
- package/dist/chunks/{pull-4TPB2B5E.js → pull-THZVVRD5.js} +1 -1
- package/dist/chunks/{purchase-domain-if-available-2A5QEP5U.js → purchase-domain-if-available-JCYJIHA3.js} +1 -1
- package/dist/chunks/{push-OKQJWOA5.js → push-3IMAJJIA.js} +1 -1
- package/dist/chunks/{query-7XT3JVXP.js → query-JS46X4HV.js} +1 -1
- package/dist/chunks/{raw-query-K3NOPCB2.js → raw-query-4K6JHAQG.js} +1 -1
- package/dist/chunks/{reauthenticate-UNE3JLFT.js → reauthenticate-5WD77AFG.js} +1 -1
- package/dist/chunks/{remove-3ZHQO7AX.js → remove-KOF4XIZ7.js} +1 -1
- package/dist/chunks/{reorder-YLJYY5ZS.js → reorder-3NXXZRZO.js} +1 -1
- package/dist/chunks/{reply-2MPQ4RQW.js → reply-JNYYMJN5.js} +1 -1
- package/dist/chunks/{resolve-MKHP5X4E.js → resolve-RGGB7NDY.js} +1 -1
- package/dist/chunks/{resolve-agent-team-JCV6SHFD.js → resolve-agent-team-ZB6AGD4A.js} +1 -1
- package/dist/chunks/{restore-OYFENAAK.js → restore-7TLQ4OQL.js} +1 -1
- package/dist/chunks/{rm-63TJ62IW.js → rm-GG4YAYEG.js} +1 -1
- package/dist/chunks/{rm-4YDKARD4.js → rm-GKRLNTNG.js} +1 -1
- package/dist/chunks/{rm-HBL4R7OM.js → rm-LVENOOH4.js} +1 -1
- package/dist/chunks/{rm-VKTDKTBV.js → rm-NUEUIXWD.js} +1 -1
- package/dist/chunks/{rm-2QUJ4MTD.js → rm-TR7263R7.js} +1 -1
- package/dist/chunks/{rule-inspect-ZD4EP6N4.js → rule-inspect-7VXXJWNZ.js} +1 -1
- package/dist/chunks/{schema-6FBKE5HK.js → schema-HCNHCZ3R.js} +1 -1
- package/dist/chunks/{schema-XS3JIJUY.js → schema-LZGI5ZTU.js} +1 -1
- package/dist/chunks/{select-org-33F2CJEO.js → select-org-HKSE2YDF.js} +1 -1
- package/dist/chunks/{set-D5IT5H2E.js → set-7UNVXHZM.js} +1 -1
- package/dist/chunks/{setup-and-link-JACRSC6H.js → setup-and-link-L47YL6MP.js} +1 -1
- package/dist/chunks/{skills-VLGGLIV3.js → skills-MTZCIW44.js} +1 -1
- package/dist/chunks/{tags-IYGDEHIO.js → tags-NXBLJZJF.js} +1 -1
- package/dist/chunks/{update-GBXFXO7R.js → update-BCBWJ565.js} +1 -1
- package/dist/chunks/{usage-P3LBOYE7.js → usage-G4CJ3ZOH.js} +1 -1
- package/dist/chunks/{views-HCN2WBW7.js → views-QU3K2TSP.js} +1 -1
- package/dist/commands/build/index.js +1 -1
- package/dist/commands/deploy/index.js +5 -5
- package/dist/commands/dev/index.js +2 -2
- package/dist/commands/env/index.js +1 -1
- package/dist/commands/link/index.js +1 -1
- package/dist/commands/list/index.js +1 -1
- package/dist/commands/project/index.js +1 -1
- package/dist/commands/tunnel/index.js +1 -1
- package/dist/commands-account.js +2 -2
- package/dist/commands-ai.js +9 -9
- package/dist/commands-blob.js +1 -1
- package/dist/commands-core.js +5 -5
- package/dist/commands-deployments.js +1 -1
- package/dist/commands-flags.js +1 -1
- package/dist/commands-integrations.js +1 -1
- package/dist/commands-observability.js +40 -30
- package/dist/commands-routing.js +2 -2
- package/dist/index.js +3 -3
- package/dist/internal-build.js +1 -1
- package/dist/package.json +40 -40
- package/dist/version.mjs +1 -1
- package/package.json +42 -42
|
@@ -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{readJSONFile}from"./chunk-
|
|
7
|
+
import{readJSONFile}from"./chunk-NZU43SVD.js";import{getNetworkFailureCause}from"./chunk-KXK4TF6L.js";import{commands}from"./chunk-DFZRZPCJ.js";import{getScope}from"./chunk-3TOEU3F6.js";import{readConfigFile}from"./chunk-MUJDAD73.js";import{fetch}from"./chunk-MY4MONOH.js";import{getArgs}from"./chunk-E7ICSU45.js";import{require_types}from"./chunk-PH2MLBQO.js";import{CantFindConfig,CantParseJSONFile,DeprecatedNowJson,WorkingDirectoryDoesNotExist,humanizePath}from"./chunk-UNAQQ5DF.js";import{pkg_default}from"./chunk-JCDPMWKO.js";import{cliErrorFromUnknown,output_manager_default,recordCliError}from"./chunk-RIXTYUYN.js";import{require_dist}from"./chunk-4SIQE2W4.js";import{__commonJS,__toESM}from"./chunk-NBPLUP7C.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)}}});function isOutputDebugEnabled(debugFlag){return debugFlag===!0||process.env.VERCEL_CLI_DEBUG==="1"}var import_epipebomb=__toESM(require_epipebomb(),1),SILENCED_ERRORS=["DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead."],installed=!1;function installProcessGuards(){if(installed)return;installed=!0;let originalError=console.error;console.error=msg=>{SILENCED_ERRORS.some(error=>typeof msg=="string"&&msg.includes(error))||originalError(msg)},(0,import_epipebomb.default)()}var import_error_utils=__toESM(require_dist(),1),CRASH_REPORT_TIMEOUT_MS=2e3;async function reportError(client,error){if(ignoreError(error)||!telemetryEnabled(client))return;let user,team,scopeError;if(client&&!getNetworkFailureCause(error))try{({user,team}=await getScope(client))}catch(err){(0,import_error_utils.isError)(err)&&(scopeError=err)}let crashReport={cli_version:pkg_default.version,invocation_id:client?.telemetryEventStore?.currentInvocationId,error:(0,import_error_utils.isError)(error)?{kind:error.name,message:error.message,stack:stackOf(error)}:{kind:"NonError",message:String(error)},user:user?{id:user.id,email:user.email,username:user.username,name:user.name}:void 0,team_id:team?.id,scope_error:scopeError?{name:scopeError.name,message:scopeError.message,stack:scopeError.stack}:void 0,args:reportableArgs(),node:{execPath:process.execPath,version:process.version,platform:process.platform}};try{(await fetch(process.env.VERCEL_TELEMETRY_BRIDGE_URL||"https://telemetry.vercel.com/api/vercel-cli/v1/events",{method:"POST",headers:{"Content-Type":"application/json","x-vercel-cli-crash-report":"1"},body:JSON.stringify({version:1,crashReport}),signal:AbortSignal.timeout(CRASH_REPORT_TIMEOUT_MS)})).body?.cancel().catch(()=>{})}catch{}}function telemetryEnabled(client){if(process.env.VERCEL_TELEMETRY_DISABLED)return!1;if(client?.telemetryEventStore)return client.telemetryEventStore.enabled;try{return readConfigFile().telemetry?.enabled!==!1}catch(err){return(0,import_error_utils.isErrnoException)(err)&&err.code==="ENOENT"}}function stackOf(error){let stacks=[],current=error;for(;(0,import_error_utils.isError)(current)&&stacks.length<5;)stacks.push(current.stack??`${current.name}: ${current.message}`),current=current.cause;return stacks.join(`
|
|
8
8
|
Caused by: `)}function reportableArgs(){try{let parsed=getArgs(process.argv.slice(2),{},{permissive:!0}),{_,...flags}=parsed,[command]=_;return{...typeof command=="string"&&commands.has(command)?{command}:{},flags:Object.keys(flags).sort()}}catch(err){return`Unable to parse args${(0,import_error_utils.isError)(err)?`: ${err}`:""}`}}function ignoreError(error){return(0,import_error_utils.isError)(error)&&error.message.includes("uv_cwd")}var 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)}async function handleUnexpectedError(client,err){output_manager_default.error(`An unexpected error occurred!
|
|
9
9
|
${err.stack}`),await reportError(client,err)}function registerUnexpectedErrorHandlers(getClient){process.on("unhandledRejection",async err=>{recordCliError(cliErrorFromUnknown(err)),err?err instanceof Error?await handleUnexpectedError(getClient(),err):(output_manager_default.error(`An unexpected rejection occurred
|
|
10
10
|
${err}`),await reportError(getClient(),err)):output_manager_default.error("An unexpected empty rejection occurred"),await exitWithUnexpectedError(err)}),process.on("uncaughtException",async error=>{await handleUnexpectedError(getClient(),error),await exitWithUnexpectedError(error)})}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 fallbackReason;function recordDirectBuildFallback(reason){fallbackReason=reason}function getDirectBuildFallbackAttributes(){return fallbackReason===void 0?void 0:{directBuild:"false",fallbackReason}}function resolveNonInteractive({argv,nonInteractiveFlag,isAgent,stdinIsTTY}){let explicitNonInteractiveFalse=argv.includes("--non-interactive=false")||argv.includes("--no-non-interactive")||argv.includes("--non-interactive")&&argv[argv.indexOf("--non-interactive")+1]==="false";return{nonInteractive:explicitNonInteractiveFalse?!1:nonInteractiveFlag||isAgent&&!stdinIsTTY,explicitNonInteractiveFalse}}export{isOutputDebugEnabled,installProcessGuards,reportError,exitWithUnexpectedError,handleUnexpectedError,registerUnexpectedErrorHandlers,earlyGetConfig,recordDirectBuildFallback,getDirectBuildFallbackAttributes,resolveNonInteractive};
|
|
@@ -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{events_default}from"./chunk-
|
|
7
|
+
import{events_default}from"./chunk-V2BCAK3I.js";import{output_manager_default}from"./chunk-RIXTYUYN.js";import{require_source}from"./chunk-UJ7YUIEJ.js";import{require_strip_ansi}from"./chunk-LPYHYTYI.js";import{__toESM}from"./chunk-NBPLUP7C.js";var import_chalk=__toESM(require_source(),1);var import_strip_ansi=__toESM(require_strip_ansi(),1);function displayBuildLogs(client,deployment,follow=!0,onAliasAssigned){let abortController=new AbortController;return{promise:events_default(client,deployment.id,{mode:"logs",onEvent:event=>printBuildLog(event,output_manager_default.print),onAliasAssigned,quiet:!1,findOpts:{direction:"forward",follow}},abortController),abortController}}function collectBuildLogs(client,deployment,follow=!0){let logs=[],abortController=new AbortController;return{promise:events_default(client,deployment.id,{mode:"logs",onEvent:event=>{event.created&&logs.push(event)},quiet:!0,findOpts:{direction:"forward",follow}},abortController).then(()=>logs),abortController}}async function displayBuildLogsUntilFinalError(client,deployment,error){let abortController=new AbortController;return events_default(client,deployment.id,{mode:"logs",onEvent:event=>{printBuildLog(event,output_manager_default.print),event.level==="error"&&event.text?.includes(error)&&abortController.abort()},quiet:!1,findOpts:{direction:"forward",follow:!0}},abortController)}function printBuildLog(log,print){if(!log.created)return;let date=new Date(log.created).toISOString(),cleanText=parseLogLines(log).join(`
|
|
8
8
|
`);for(let line of colorize(cleanText,log).split(`
|
|
9
9
|
`))print(`${import_chalk.default.dim(date)} ${line}
|
|
10
10
|
`)}function sanitize(log){return(0,import_strip_ansi.default)(log.text||"").replace(/\n$/,"").replace(/^\n/,"")}function parseLogLines(log){return sanitize(log).split(`
|
|
@@ -4,4 +4,4 @@ import { dirname as __dirname_ } from 'node:path';
|
|
|
4
4
|
const require = __createRequire(import.meta.url);
|
|
5
5
|
const __filename = __fileURLToPath(import.meta.url);
|
|
6
6
|
const __dirname = __dirname_(__filename);
|
|
7
|
-
import{require_json_parse_better_errors}from"./chunk-K7YK4PZP.js";import{require_lib}from"./chunk-
|
|
7
|
+
import{require_json_parse_better_errors}from"./chunk-K7YK4PZP.js";import{require_lib}from"./chunk-MUJDAD73.js";import{CantParseJSONFile}from"./chunk-UNAQQ5DF.js";import{require_dist}from"./chunk-4SIQE2W4.js";import{__toESM}from"./chunk-NBPLUP7C.js";var import_fs_extra=__toESM(require_lib(),1);var import_json_parse_better_errors=__toESM(require_json_parse_better_errors(),1),import_error_utils=__toESM(require_dist(),1);async function readJSONFile(file){let content=await readFileSafe(file);if(content===null)return content;try{return(0,import_json_parse_better_errors.default)(content)}catch(error){return new CantParseJSONFile(file,(0,import_error_utils.errorToString)(error))}}async function readFileSafe(file){try{return await import_fs_extra.default.readFile(file,"utf8")}catch{return null}}export{readJSONFile};
|
|
@@ -4,5 +4,5 @@ import { dirname as __dirname_ } from 'node:path';
|
|
|
4
4
|
const require = __createRequire(import.meta.url);
|
|
5
5
|
const __filename = __fileURLToPath(import.meta.url);
|
|
6
6
|
const __dirname = __dirname_(__filename);
|
|
7
|
-
import{canPrompt}from"./chunk-IQ7FPAI4.js";import{require_lib}from"./chunk-
|
|
7
|
+
import{canPrompt}from"./chunk-IQ7FPAI4.js";import{require_lib}from"./chunk-MUJDAD73.js";import{AGENT_REASON,AGENT_STATUS,outputActionRequired}from"./chunk-3QTP26QS.js";import{humanizePath}from"./chunk-UNAQQ5DF.js";import{output_manager_default}from"./chunk-RIXTYUYN.js";import{require_source}from"./chunk-UJ7YUIEJ.js";import{__toESM}from"./chunk-NBPLUP7C.js";var import_fs_extra=__toESM(require_lib(),1),import_chalk=__toESM(require_source(),1);import{homedir}from"os";import{resolve,sep}from"path";import{realpath as realpathCallback}from"node:fs";import*as fs from"node:fs/promises";import{promisify}from"node:util";var realpathInJavaScript=promisify(realpathCallback);async function validateRootDirectory(cwd,path,errorSuffix=""){let pathStat=await(0,import_fs_extra.lstat)(path).catch(()=>null),suffix=errorSuffix?` ${errorSuffix}`:"";return pathStat?pathStat.isDirectory()?await resolvesInside(cwd,path)?!0:(output_manager_default.error(`The provided path ${import_chalk.default.cyan(`\u201C${humanizePath(path)}\u201D`)} is outside of the project.${suffix}`),!1):(output_manager_default.error(`The provided path ${import_chalk.default.cyan(`\u201C${humanizePath(path)}\u201D`)} is a file, but expected a directory.${suffix}`),!1):(output_manager_default.error(`The provided path ${import_chalk.default.cyan(`\u201C${humanizePath(path)}\u201D`)} does not exist.${suffix}`),!1)}async function validatePaths(client,paths,{allowFiles=!1}={}){if(paths.length>1)return output_manager_default.error("Can't deploy more than one path."),{valid:!1,exitCode:1};let path=paths[0],pathStat=await(0,import_fs_extra.lstat)(path).catch(()=>null);if(!pathStat)return output_manager_default.error(`Could not find ${import_chalk.default.cyan(`\u201C${humanizePath(path)}\u201D`)}`),{valid:!1,exitCode:1};let isFile=pathStat.isFile();if(!pathStat.isDirectory()&&!(allowFiles&&isFile))return output_manager_default.fatal(allowFiles?"Deploy a regular file or directory. Symbolic links and special files are not supported as deployment paths.":"This command requires a directory. Use `vercel <file>` to deploy a single file."),{valid:!1,exitCode:1};let refusal=await confirmHomeDirectory(client,path);return refusal||{valid:!0,path,isFile}}async function validateUploadRoot(client,path,repoRoot){if(!repoRoot||repoRoot===path)return{valid:!0,path};let[resolvedRoot,resolvedPath]=await Promise.all([resolveLinks(repoRoot),resolveLinks(path)]);return resolvedRoot===resolvedPath?{valid:!0,path:repoRoot}:rootContains(repoRoot,path,resolvedRoot,resolvedPath)?await confirmHomeDirectory(client,repoRoot,`The repository link ${humanizePath(resolve(repoRoot,".vercel","repo.json"))} makes your home directory the directory to deploy.`)??{valid:!0,path:repoRoot}:(output_manager_default.error(repoRootOutsideMessage("deploy",path,repoRoot)),{valid:!1,exitCode:1})}async function repoRootContains(repoRoot,path){let[resolvedRoot,resolvedPath]=await Promise.all([resolveLinks(repoRoot),resolveLinks(path)]);return rootContains(repoRoot,path,resolvedRoot,resolvedPath)}function rootContains(repoRoot,path,resolvedRoot,resolvedPath){return isInside(repoRoot,path)||isInside(resolvedRoot,resolvedPath)}function repoRootOutsideMessage(action,path,repoRoot){return`Can't ${action} ${humanizePath(path)}. Git reports the repository root ${humanizePath(repoRoot)}, which does not contain this directory. Check \`core.worktree\` in the Git configuration and the \`GIT_WORK_TREE\` environment variable.`}async function resolvesInside(directory,path){let[base,target]=await Promise.all([resolveExisting(directory),resolveExisting(path)]);return base!==null&&target!==null&&isInside(base,target)}async function resolvesToDirectoryInside(directory,path){return!!(await fs.stat(path).catch(()=>null))?.isDirectory()&&await resolvesInside(directory,path)}async function resolveExisting(path){try{return await fs.realpath(path)}catch{return realpathInJavaScript(path).catch(()=>null)}}async function confirmHomeDirectory(client,path,cause){if(!await isHomeDirectory(path))return null;if(!canPrompt(client)){let message=`Can't deploy your home directory without interactive confirmation. ${cause?`${cause} Run`:"Run from your project directory, or run"} in a terminal to confirm deploying your home directory.`;return outputActionRequired(client,{status:AGENT_STATUS.ACTION_REQUIRED,reason:AGENT_REASON.INTERACTIVE_CONFIRMATION_REQUIRED,message,userActionRequired:!0},2),output_manager_default.error(message),{valid:!1,exitCode:2}}return cause&&output_manager_default.warning(cause),await client.input.confirm("You are deploying your home directory. Do you want to continue?",!1)?null:(output_manager_default.print(`Canceled
|
|
8
8
|
`),{valid:!1,exitCode:0})}async function isHomeDirectory(path){let home=homedir();return path===home||await resolveLinks(path)===await resolveLinks(home)}function resolveLinks(path){return fs.realpath(path).catch(()=>path)}function isInside(directory,path){let base=resolve(directory),target=resolve(path);return target===base||target.startsWith(base.endsWith(sep)?base:base+sep)}export{validateRootDirectory,validatePaths,validateUploadRoot,repoRootContains,repoRootOutsideMessage,resolvesInside,resolvesToDirectoryInside};
|
|
@@ -4,4 +4,4 @@ import { dirname as __dirname_ } from 'node:path';
|
|
|
4
4
|
const require = __createRequire(import.meta.url);
|
|
5
5
|
const __filename = __fileURLToPath(import.meta.url);
|
|
6
6
|
const __dirname = __dirname_(__filename);
|
|
7
|
-
import{purchaseDomainIfAvailable}from"./chunk-
|
|
7
|
+
import{purchaseDomainIfAvailable}from"./chunk-4ZZEDEMN.js";import{addDomain,getDomainByName,require_cjs}from"./chunk-SUZXGVMN.js";import{mapCertError}from"./chunk-BV456GI7.js";import{trackCreatedId}from"./chunk-ILNTOWHG.js";import{require_dist as require_dist2}from"./chunk-MUJDAD73.js";import{DomainNotFound,DomainPermissionDenied,InvalidDomain,NowError,isAPIError}from"./chunk-UNAQQ5DF.js";import{output_manager_default}from"./chunk-RIXTYUYN.js";import{require_dist}from"./chunk-4SIQE2W4.js";import{require_source}from"./chunk-UJ7YUIEJ.js";import{__toESM}from"./chunk-NBPLUP7C.js";var import_chalk=__toESM(require_source(),1);var import_async_retry=__toESM(require_dist2(),1);var import_error_utils=__toESM(require_dist(),1);async function issueCert(client,cns){return(0,import_async_retry.default)(async bail=>{try{let cert=await client.fetch("/v3/certs",{method:"POST",body:{domains:cns}});return trackCreatedId(client,"cert",cert.uid),cert}catch(err){if(isAPIError(err)&&err.code==="configuration_error")throw err;if((0,import_error_utils.isError)(err))bail(err);else throw err}},{retries:3,minTimeout:5e3,maxTimeout:15e3})}async function createCertForCns(client,cns,context){output_manager_default.spinner(`Issuing a certificate for ${import_chalk.default.bold(cns.join(", "))}`);try{return await issueCert(client,cns)}catch(err){if(isAPIError(err)){if(err.code==="forbidden")return new DomainPermissionDenied(err.domain,context);let mappedError=mapCertError(err,cns);if(mappedError)return mappedError}throw err}finally{output_manager_default.stopSpinner()}}var import_tldts=__toESM(require_cjs(),1);async function maybeGetDomainByName(client,contextName,domainName){let maybeDomain=await getDomainByName(client,contextName,domainName);return maybeDomain instanceof DomainPermissionDenied?maybeDomain:maybeDomain instanceof DomainNotFound?null:maybeDomain}function isWildcardAlias(alias){return alias.startsWith("*.")}function extractDomain(alias){return isWildcardAlias(alias)?alias.slice(2):alias}async function setupDomain(client,alias,contextName){let aliasDomain=extractDomain(alias);output_manager_default.debug(`Trying to fetch domain ${aliasDomain} by name`);let info=await maybeGetDomainByName(client,contextName,aliasDomain);if(info instanceof DomainPermissionDenied)return info;if(info){let{name:domain2}=info;return output_manager_default.debug(`Domain ${domain2} found for the given context`),info}output_manager_default.debug(`The domain ${aliasDomain} was not found, trying to purchase it`);let purchased=await purchaseDomainIfAvailable(client,aliasDomain,contextName);if(purchased instanceof NowError)return purchased;if(!purchased){output_manager_default.debug(`Domain ${aliasDomain} is not available to be purchased. Trying to add it`);let parsedDomain=(0,import_tldts.parse)(aliasDomain);if(!parsedDomain.domain)return new InvalidDomain(alias);let{domain:domain2}=parsedDomain;output_manager_default.debug(`Adding ${domain2}`);let addResult=await addDomain(client,domain2,contextName);return addResult instanceof NowError||output_manager_default.debug(`Domain ${domain2} successfully added and automatically verified`),addResult}output_manager_default.debug(`The domain ${aliasDomain} was successfully purchased`);let purchasedDomain=await maybeGetDomainByName(client,contextName,aliasDomain),{name:domain}=purchasedDomain;return output_manager_default.debug(`Domain ${domain} was purchased and it is automatically verified`),maybeGetDomainByName(client,contextName,domain)}export{createCertForCns,isWildcardAlias,extractDomain,setupDomain};
|
|
@@ -4,4 +4,4 @@ import { dirname as __dirname_ } from 'node:path';
|
|
|
4
4
|
const require = __createRequire(import.meta.url);
|
|
5
5
|
const __filename = __fileURLToPath(import.meta.url);
|
|
6
6
|
const __dirname = __dirname_(__filename);
|
|
7
|
-
import{performDeviceCodeFlow}from"./chunk-
|
|
7
|
+
import{performDeviceCodeFlow}from"./chunk-DSFXR6UL.js";import{isAPIError}from"./chunk-UNAQQ5DF.js";import{output_manager_default}from"./chunk-RIXTYUYN.js";import{URLSearchParams}from"url";var RECOVERABLE_CHALLENGE_CODES=new Set(["challenge_required","challenge_required_email_otp","user_auth_required"]);async function withEnvChallengeRecovery(client,fn){let hadStoredSession=!!(client.authConfig.token||client.authConfig.refreshToken);try{return await fn()}catch(error){if(!isAPIError(error))throw error;let isRecoverableChallenge=RECOVERABLE_CHALLENGE_CODES.has(error.code),isRejectedStoredSession=hadStoredSession&&error.invalidToken===!0;if(!isRecoverableChallenge&&!isRejectedStoredSession||client.authConfig.tokenSource||!client.stdin.isTTY||client.nonInteractive)throw error;output_manager_default.stopSpinner(),output_manager_default.log("Sensitive Environment Variables require fresh authentication.");let refreshToken=client.authConfig.refreshToken,acrValues=getAcrValuesFromWWWAuthenticate(error.wwwAuthenticate),tokens=isRecoverableChallenge&&refreshToken&&acrValues?await performDeviceCodeFlow(client,{refreshToken,acrValues,fallbackToLoginOnStepUpFailure:!0}):await performDeviceCodeFlow(client);if(!tokens)throw error;return client.updateAuthConfig({token:tokens.access_token,userId:void 0,expiresAt:Math.floor(Date.now()/1e3)+tokens.expires_in,refreshToken:tokens.refresh_token,dpop:tokens.dpop}),client.persistAuthConfig(),await fn()}}function getAcrValuesFromWWWAuthenticate(header){if(!header)return;let lowerHeader=header.toLowerCase(),scheme=lowerHeader.includes("bearer")?"bearer":"dpop",schemeIndex=lowerHeader.indexOf(scheme);if(schemeIndex===-1)return;let match=header.slice(schemeIndex+scheme.length).match(/(?:^|[,\s])acr_values=(?:"((?:\\.|[^"\\])*)"|([^,\s]+))/i);return match?.[1]?.replace(/\\(.)/g,"$1")??match?.[2]}async function getEnvRecords(client,projectId,source,{target,gitBranch,decrypt}={}){output_manager_default.debug(`Fetching Environment Variables of project ${projectId} and target ${target}`);let query=new URLSearchParams;if(target){let targetParam="target";target!=="production"&&target!=="preview"&&target!=="development"&&(targetParam="customEnvironmentId"),query.set(targetParam,target)}gitBranch&&query.set("gitBranch",gitBranch),decrypt&&query.set("decrypt",decrypt.toString()),source&&query.set("source",source);let url=`/v10/projects/${projectId}/env?${query}`;return withEnvChallengeRecovery(client,()=>client.fetch(url))}async function pullEnvRecords(client,projectIdOrDeploymentId,source,{target,gitBranch}={}){output_manager_default.debug(`Fetching Environment Variables of ${projectIdOrDeploymentId} and target ${target}`);let query=new URLSearchParams,url=`/v3/env/pull/${projectIdOrDeploymentId}`;return projectIdOrDeploymentId.startsWith("dpl_")||target&&(url+=`/${encodeURIComponent(target)}`,gitBranch&&(url+=`/${encodeURIComponent(gitBranch)}`)),source&&query.set("source",source),Array.from(query).length>0&&(url+=`?${query}`),withEnvChallengeRecovery(client,()=>client.fetch(url))}export{getEnvRecords,pullEnvRecords};
|
|
@@ -4,4 +4,4 @@ import { dirname as __dirname_ } from 'node:path';
|
|
|
4
4
|
const require = __createRequire(import.meta.url);
|
|
5
5
|
const __filename = __fileURLToPath(import.meta.url);
|
|
6
6
|
const __dirname = __dirname_(__filename);
|
|
7
|
-
import{ensureLink}from"./chunk-
|
|
7
|
+
import{ensureLink}from"./chunk-Z7B7PFAR.js";import{getTeams}from"./chunk-HPXRESOF.js";import{scopeFlagPassed}from"./chunk-3TOEU3F6.js";import{getLinkedProject,getUser,resolveProjectCwd}from"./chunk-MUJDAD73.js";import{getProjectByNameOrId}from"./chunk-VO5M6G7M.js";import{parseArguments}from"./chunk-E7ICSU45.js";import{argvHasNonInteractive}from"./chunk-3QTP26QS.js";import{LinkRequiredError,ProjectNotFound}from"./chunk-UNAQQ5DF.js";import{output_manager_default}from"./chunk-RIXTYUYN.js";import{require_build_utils}from"./chunk-BVFFSUG3.js";import{__toESM}from"./chunk-NBPLUP7C.js";async function getProjectByCwdOrLink({autoConfirm,nonInteractive,client,commandName,cwd,projectNameOrId,forReadOnlyCommand,skipOwnerLookup}){if(projectNameOrId){let project=await getProjectByNameOrId(client,projectNameOrId);if(project instanceof ProjectNotFound)throw project;return project}let effectiveNonInteractive=nonInteractive??client.nonInteractive??argvHasNonInteractive(client.argv);if(forReadOnlyCommand&&effectiveNonInteractive){let resolvedCwd=await resolveProjectCwd(cwd??client.cwd),link=await getLinkedProject(client,{cwd:resolvedCwd,skipOwnerLookup});if(link.status==="linked"&&link.project)return link.project;if(link.status==="error"){let err=new Error("Link project error");throw err.code="ERR_LINK_PROJECT",err}throw new LinkRequiredError}let linkedProject=await ensureLink(commandName,client,cwd??client.cwd,{autoConfirm,nonInteractive,skipOwnerLookup});if(typeof linkedProject=="number"){let err=new Error("Link project error");throw err.code="ERR_LINK_PROJECT",err}return linkedProject.project}var import_build_utils=__toESM(require_build_utils(),1);async function isTeamExplicit(client){if(scopeFlagPassed(client.argv)){let{flags}=parseArguments(client.argv.slice(2),{},{permissive:!0});if(flags["--scope"]||flags["--team"])return!0}let team=await client.resolveCurrentTeam({ask:!1});if(!team&&client.isTeamUnchosen())return!1;let orgId=(0,import_build_utils.getPlatformEnv)("ORG_ID");try{if(!team)return orgId?orgId===(await getUser(client)).id:(await getTeams(client)).length===0;if(orgId)return orgId===team;let teams=await getTeams(client);return teams.length===1&&teams[0].id===team}catch(err){return output_manager_default.debug(`Couldn't check the scope: ${err}`),!1}}export{getProjectByCwdOrLink,isTeamExplicit};
|