@vercel/cli-support 65.17.0 → 65.18.0-snapshot-813a4d4489f4
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-6M3AALI3.js → add-RLEYWNPY.js} +1 -1
- package/dist/chunks/{add-C6VTEFXX.js → add-SGU4XBVU.js} +1 -1
- package/dist/chunks/{add-NU6HG5B7.js → add-XIET5BV2.js} +1 -1
- package/dist/chunks/{alerts-JNBP5ZOD.js → alerts-5Q7SMJVR.js} +1 -1
- package/dist/chunks/{build-6ZQB7L52.js → build-MLI2E6WI.js} +1 -1
- package/dist/chunks/{chunk-2PQM7TCT.js → chunk-23PA4KG4.js} +1 -1
- package/dist/chunks/{chunk-5XWTMJ5A.js → chunk-26H36Z43.js} +1 -1
- package/dist/chunks/{chunk-JYEKC35M.js → chunk-2TC5V2M2.js} +1 -1
- package/dist/chunks/{chunk-W5MWGVQT.js → chunk-34WAVWWU.js} +1 -1
- package/dist/chunks/chunk-3FVMCV7T.js +7 -0
- package/dist/chunks/{chunk-OS3Y2WGS.js → chunk-3JTC2CUD.js} +1 -1
- package/dist/chunks/{chunk-OXD4SLRA.js → chunk-4PU7F6AC.js} +1 -1
- package/dist/chunks/chunk-5A2O3SZX.js +12 -0
- package/dist/chunks/{chunk-ZBBATLPQ.js → chunk-5N43J7UG.js} +1 -1
- package/dist/chunks/{chunk-IUO6VPHD.js → chunk-5SXUZ3DD.js} +1 -1
- package/dist/chunks/{chunk-UGHD3ALY.js → chunk-66VYZZTY.js} +1 -1
- package/dist/chunks/{chunk-I2RMTV2E.js → chunk-6AOVTS5I.js} +1 -1
- package/dist/chunks/{chunk-UDQBYPFA.js → chunk-6CANAW3B.js} +1 -1
- package/dist/chunks/{chunk-4E2SYQVZ.js → chunk-6MZPCIOK.js} +1 -1
- package/dist/chunks/{chunk-54XPSLKL.js → chunk-73BOOIOB.js} +5 -5
- package/dist/chunks/{chunk-XDPSUC2N.js → chunk-7ECYJHY4.js} +1 -1
- package/dist/chunks/{chunk-GSEOOO5M.js → chunk-7THDUCSM.js} +1 -1
- package/dist/chunks/{chunk-5ZOZ6UI3.js → chunk-A57EHZTZ.js} +1 -1
- package/dist/chunks/{chunk-7BZRYBNY.js → chunk-AOVK6K6M.js} +1 -1
- package/dist/chunks/{chunk-CDDG77YO.js → chunk-APSIPJAY.js} +1 -1
- package/dist/chunks/{chunk-YERISP3L.js → chunk-BLDS7J3R.js} +1 -1
- package/dist/chunks/{chunk-2RPWRZMR.js → chunk-BP7EZEBH.js} +1 -1
- package/dist/chunks/{chunk-L7OQ5CUT.js → chunk-CG6NFETD.js} +1 -1
- package/dist/chunks/{chunk-6VSZ6NDD.js → chunk-CN7DUUHB.js} +1 -1
- package/dist/chunks/{chunk-V6O3MHVH.js → chunk-CQYU6ZO4.js} +1 -1
- package/dist/chunks/chunk-CY5KJ42N.js +13 -0
- package/dist/chunks/chunk-D5BTA6TV.js +7 -0
- package/dist/chunks/{chunk-4BCU4KFD.js → chunk-EA55QLHA.js} +1 -1
- package/dist/chunks/{chunk-ISFOL3XU.js → chunk-EI67RICC.js} +1 -1
- package/dist/chunks/chunk-FCTTEFC5.js +7 -0
- package/dist/chunks/{chunk-TJYRGELW.js → chunk-FRKDI2ZH.js} +1 -1
- package/dist/chunks/{chunk-CDGGZKIG.js → chunk-FSZJSIOF.js} +1 -1
- package/dist/chunks/{chunk-FUASV2IR.js → chunk-FXT2VBFG.js} +1 -1
- package/dist/chunks/{chunk-Y2CSNIOJ.js → chunk-FZBYQQQQ.js} +1 -1
- package/dist/chunks/{chunk-OCLUZVEL.js → chunk-GQEGNPWV.js} +1 -1
- package/dist/chunks/{chunk-TJ5F4BSH.js → chunk-HFVL4MR7.js} +1 -1
- package/dist/chunks/{chunk-VHVBGL5G.js → chunk-HQWR3EDU.js} +1 -1
- package/dist/chunks/{chunk-AKFCJNJF.js → chunk-HRUTRN4N.js} +1 -1
- package/dist/chunks/{chunk-4IRZBCXZ.js → chunk-HUEJNVBX.js} +1 -1
- package/dist/chunks/{chunk-M2HZOFN5.js → chunk-IBVIZ3OE.js} +1 -1
- package/dist/chunks/{chunk-DMU3EFXU.js → chunk-IGOZSD7O.js} +1 -1
- package/dist/chunks/{chunk-YKZ4N2KF.js → chunk-IL27CVNF.js} +1 -1
- package/dist/chunks/{chunk-ITMLCNB4.js → chunk-IRZ4JPAF.js} +1 -1
- package/dist/chunks/{chunk-2UV736RO.js → chunk-IUIN543V.js} +1 -1
- package/dist/chunks/{chunk-JCMUCY6R.js → chunk-IY2IG7TK.js} +1 -1
- package/dist/chunks/{chunk-FENHM66N.js → chunk-JRJ37SOJ.js} +1 -1
- package/dist/chunks/{chunk-3PNXCIIV.js → chunk-K4N7XZD6.js} +1 -1
- package/dist/chunks/{chunk-65YRE7OX.js → chunk-KTWGUBNP.js} +1 -1
- package/dist/chunks/{chunk-WZCLCG4J.js → chunk-KXK4TF6L.js} +1 -1
- package/dist/chunks/{chunk-W44QMOQF.js → chunk-LUS5HZSC.js} +1 -1
- package/dist/chunks/{chunk-ODHZ2KFO.js → chunk-MVK2PKRI.js} +1 -1
- package/dist/chunks/{chunk-6MQAEEY6.js → chunk-NNP7REQN.js} +1 -1
- package/dist/chunks/{chunk-ISPY2QPO.js → chunk-NX6TFI7A.js} +1 -1
- package/dist/chunks/{chunk-JENTVCIM.js → chunk-NZSXBNZT.js} +1 -1
- package/dist/chunks/{chunk-R4QGGO5B.js → chunk-OYH67DET.js} +1 -1
- package/dist/chunks/{chunk-4EYMHKPB.js → chunk-OYQOYJSJ.js} +1 -1
- package/dist/chunks/chunk-PNWRO3XW.js +11 -0
- package/dist/chunks/{chunk-LJHCDSQE.js → chunk-PO4M4TVV.js} +1 -1
- package/dist/chunks/{chunk-YSUBZ4H6.js → chunk-PTNQ2YZ3.js} +1 -1
- package/dist/chunks/{chunk-L3FMGAEY.js → chunk-Q2R3VQER.js} +1 -1
- package/dist/chunks/{chunk-J4S66QK6.js → chunk-Q3QNKEL7.js} +1 -1
- package/dist/chunks/{chunk-ZC4E5ZZT.js → chunk-Q5DOQ7AQ.js} +1 -1
- package/dist/chunks/{chunk-GLGJWYR5.js → chunk-QBN2HEUY.js} +1 -1
- package/dist/chunks/{chunk-2A6NUKKE.js → chunk-QGS3SBR6.js} +1 -1
- package/dist/chunks/{chunk-K3FIH7VS.js → chunk-QJ2ECZYD.js} +2 -2
- package/dist/chunks/{chunk-ACUK5DV4.js → chunk-RHPLVI37.js} +1 -1
- package/dist/chunks/{chunk-4UZDMIRB.js → chunk-RY5PXA7G.js} +1 -1
- package/dist/chunks/{chunk-RXEXEY5E.js → chunk-SEIOVQCO.js} +1 -1
- package/dist/chunks/{chunk-B3AVML3E.js → chunk-SW26TCUB.js} +1 -1
- package/dist/chunks/{chunk-2XLCSCWH.js → chunk-TEF7PTCH.js} +1 -1
- package/dist/chunks/{chunk-QIWCDJY6.js → chunk-TJTUE6P6.js} +1 -1
- package/dist/chunks/{chunk-SYI4LBMR.js → chunk-UEJ332R4.js} +1 -1
- package/dist/chunks/{chunk-K36E52T6.js → chunk-VXTAXRJU.js} +1 -1
- package/dist/chunks/{chunk-H5G36TLP.js → chunk-W4LFHCO7.js} +1 -1
- package/dist/chunks/{chunk-AMHVWM5D.js → chunk-WOD4NOA2.js} +1 -1
- package/dist/chunks/{chunk-KFFXZGVC.js → chunk-YDLFTMLP.js} +1 -1
- package/dist/chunks/{chunk-PPAXB7AB.js → chunk-ZFDLESCX.js} +1 -1
- package/dist/chunks/{chunk-IYBBF4IU.js → chunk-ZKQ2Q7UD.js} +2 -2
- package/dist/chunks/{chunk-52AG3KYV.js → chunk-ZVOWFG4V.js} +1 -1
- package/dist/chunks/{clear-3DUM5NVE.js → clear-ODRUYS7Q.js} +1 -1
- package/dist/chunks/{compile-vercel-config-7EGD4KID.js → compile-vercel-config-TMPQRDUI.js} +1 -1
- package/dist/chunks/{config-CM5FGY56.js → config-56WPXNJW.js} +1 -1
- package/dist/chunks/{config-Q6RCDUPL.js → config-HZ3BDJUP.js} +1 -1
- package/dist/chunks/{contract-UXF35JHG.js → contract-TZGAI6KK.js} +1 -1
- package/dist/chunks/{delete-L22JUSLG.js → delete-V2N3O6OC.js} +1 -1
- package/dist/chunks/{delete-7PAC36H5.js → delete-ZUB3I23T.js} +1 -1
- package/dist/chunks/{describe-BVOVNTIK.js → describe-5AH5J5C3.js} +1 -1
- package/dist/chunks/{detect-services-RLGDB3XS.js → detect-services-FJ2QVIDJ.js} +1 -1
- package/dist/chunks/{disable-2ILULETZ.js → disable-4O7BH74Y.js} +1 -1
- package/dist/chunks/{discard-ZQDVF2BV.js → discard-DFIIMCTT.js} +1 -1
- package/dist/chunks/{edit-B5HKAA3Y.js → edit-MXN4W2UH.js} +1 -1
- package/dist/chunks/{edit-2THCJXU6.js → edit-XDOMVVIS.js} +1 -1
- package/dist/chunks/{enable-KFEAC56T.js → enable-SQYMXDMO.js} +1 -1
- package/dist/chunks/{export-DWSSJSHN.js → export-U3C2WW7X.js} +1 -1
- package/dist/chunks/{future-27CSSTSM.js → future-IM2DO57J.js} +1 -1
- package/dist/chunks/{generate-cert-for-deploy-5HKKOLXE.js → generate-cert-for-deploy-JD4GD5TB.js} +1 -1
- package/dist/chunks/{image-ZTFQVIWL.js → image-5MNVVJ74.js} +1 -1
- package/dist/chunks/{import-builders-5RBWN5OQ.js → import-builders-5UKLFPYG.js} +1 -1
- package/dist/chunks/{inspect-Q3UKNIAX.js → inspect-D6PN72IQ.js} +1 -1
- package/dist/chunks/{inspect-RVJWMV2P.js → inspect-G6ATTJHN.js} +1 -1
- package/dist/chunks/{inspect-CRP6NH6E.js → inspect-WS2HZETN.js} +1 -1
- package/dist/chunks/{inspect-CJREE2KA.js → inspect-XVPEKP7G.js} +1 -1
- package/dist/chunks/{inspect-IGX2RQZF.js → inspect-YCQ3YSXK.js} +1 -1
- package/dist/chunks/{inspect-V4I6FLTI.js → inspect-ZLT27VWY.js} +1 -1
- package/dist/chunks/{list-NWCLD63A.js → list-KFCOIZUI.js} +1 -1
- package/dist/chunks/{list-MLXQFP32.js → list-LRV6CWNG.js} +1 -1
- package/dist/chunks/{list-EE5LP3XI.js → list-OCUW352D.js} +1 -1
- package/dist/chunks/{list-ECJGXPCX.js → list-X4TTNFOH.js} +1 -1
- package/dist/chunks/{login-FX3HON7Y.js → login-5AELYQXL.js} +1 -1
- package/dist/chunks/{login-KC2GH746.js → login-E6GEEEM5.js} +1 -1
- package/dist/chunks/{logs-LT5VYAYH.js → logs-6HZDMAH2.js} +1 -1
- package/dist/chunks/{ls-IO7UILP7.js → ls-6XRRBHDT.js} +1 -1
- package/dist/chunks/{ls-IVYLE77U.js → ls-CIXZ6MZY.js} +1 -1
- package/dist/chunks/{ls-ULSRILNF.js → ls-NC6HLQZJ.js} +1 -1
- package/dist/chunks/{ls-SAFP4AEL.js → ls-OJTBUTZI.js} +1 -1
- package/dist/chunks/{ls-SNCO5B5A.js → ls-OUHAQ47A.js} +1 -1
- package/dist/chunks/{ls-2R2MR3CO.js → ls-TSONQJT6.js} +1 -1
- package/dist/chunks/{ls-X6LE4ZFD.js → ls-Y4IDW3OF.js} +1 -1
- package/dist/chunks/{migrate-experimental-services-AJ6GVF6O.js → migrate-experimental-services-W3MOT2TD.js} +1 -1
- package/dist/chunks/{mutate-3NJKAHAD.js → mutate-IT6ENFVD.js} +1 -1
- package/dist/chunks/{notifications-73Y6R45H.js → notifications-UJTT2Q2U.js} +1 -1
- package/dist/chunks/{open-VIVK2UDK.js → open-LB5RHOJ4.js} +1 -1
- package/dist/chunks/{openapi-SUHPIPUZ.js → openapi-N5QU226Q.js} +1 -1
- package/dist/chunks/{permissions-GZZN7UUK.js → permissions-RFMDA7MY.js} +1 -1
- package/dist/chunks/{plugin-offer-2SMMNBHS.js → plugin-offer-FFOVUMFD.js} +1 -1
- package/dist/chunks/{prompt-missing-credentials-UFFTUCXU.js → prompt-missing-credentials-AH75D45I.js} +1 -1
- package/dist/chunks/{publish-QUC6TMRK.js → publish-WRCYA6VI.js} +1 -1
- package/dist/chunks/{pull-67X4FSMU.js → pull-IQCEVR6U.js} +1 -1
- package/dist/chunks/{purchase-domain-if-available-Z6JVVRSD.js → purchase-domain-if-available-HGGBPDD2.js} +1 -1
- package/dist/chunks/{push-QVHS7FDF.js → push-JLKD6TIQ.js} +1 -1
- package/dist/chunks/{query-BDDPR2EX.js → query-4XJV5I6S.js} +1 -1
- package/dist/chunks/{raw-query-NE7NWCB7.js → raw-query-AZIHTANR.js} +1 -1
- package/dist/chunks/{reauthenticate-IC7BSJ3P.js → reauthenticate-GZHIL45J.js} +1 -1
- package/dist/chunks/{remove-BHN6WPUV.js → remove-T4EBT5XK.js} +1 -1
- package/dist/chunks/{reorder-EIDH4EJE.js → reorder-AUM56FAG.js} +1 -1
- package/dist/chunks/{reply-WDAJW5SL.js → reply-VBPNT2QZ.js} +1 -1
- package/dist/chunks/{resolve-V47ENQW3.js → resolve-HNP5MLTO.js} +1 -1
- package/dist/chunks/{resolve-agent-team-MFQQGFOV.js → resolve-agent-team-5FN2CJRR.js} +1 -1
- package/dist/chunks/{restore-ROZT6YF2.js → restore-CXKKR2L7.js} +1 -1
- package/dist/chunks/{rm-5TR2TCLE.js → rm-AJCXU7HL.js} +1 -1
- package/dist/chunks/{rm-3KID2JH7.js → rm-TNVDWN3Y.js} +1 -1
- package/dist/chunks/{rm-2QIQDOGW.js → rm-WOLHEUS3.js} +1 -1
- package/dist/chunks/{rm-RILNS5CN.js → rm-ZIQF5OQN.js} +1 -1
- package/dist/chunks/{rm-JLFAI2BI.js → rm-ZY533MC4.js} +1 -1
- package/dist/chunks/{rule-inspect-S2V5GLHH.js → rule-inspect-3ZK4TVN7.js} +1 -1
- package/dist/chunks/{schema-UW2SZTDK.js → schema-JLQSQ4RZ.js} +1 -1
- package/dist/chunks/{schema-BACGWLK7.js → schema-KC4WALNH.js} +1 -1
- package/dist/chunks/{select-org-PENSE6DG.js → select-org-JQKFWXYR.js} +1 -1
- package/dist/chunks/{set-VCRWNXA2.js → set-PKLCP3YM.js} +1 -1
- package/dist/chunks/{set-T44OQCFV.js → set-ZWUY4ISS.js} +1 -1
- package/dist/chunks/{setup-and-link-KBW7TFOU.js → setup-and-link-GXKISJNJ.js} +1 -1
- package/dist/chunks/{skills-MWEEGIZS.js → skills-GMBA5QZ6.js} +5 -43
- package/dist/chunks/{tags-SU3K34BB.js → tags-UWSYGIVF.js} +1 -1
- package/dist/chunks/{types-VZQUPHE4.js → types-S7I5EBVX.js} +1 -1
- package/dist/chunks/{update-LCBI7RYJ.js → update-QZEEPBDR.js} +1 -1
- package/dist/chunks/{usage-IIY5U3TT.js → usage-JJ4YKKYY.js} +1 -1
- package/dist/commands/build/index.js +5 -5
- package/dist/commands/deploy/index.js +4 -4
- package/dist/commands/dev/index.js +3 -3
- 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 +24 -8
- package/dist/commands/tunnel/index.js +1 -1
- package/dist/commands-account.js +4 -4
- package/dist/commands-ai.js +3 -3
- 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 +18 -16
- package/dist/commands-integrations.js +1 -1
- package/dist/commands-observability.js +2 -2
- package/dist/commands-routing.js +2 -2
- package/dist/index.js +4 -4
- package/dist/internal-build.js +1 -1
- package/dist/package.json +40 -40
- package/dist/runtime-assets/node-preloads/next-dev-websocket.cjs +1 -2
- package/dist/version.mjs +1 -1
- package/package.json +42 -42
- package/dist/chunks/chunk-57INWX4T.js +0 -7
- package/dist/chunks/chunk-7YNV6Q6G.js +0 -12
- package/dist/chunks/chunk-LZ3KMDYM.js +0 -9
- package/dist/chunks/chunk-N465KVPA.js +0 -11
|
@@ -4,4 +4,4 @@ import { dirname as __dirname_ } from 'node:path';
|
|
|
4
4
|
const require = __createRequire(import.meta.url);
|
|
5
5
|
const __filename = __fileURLToPath(import.meta.url);
|
|
6
6
|
const __dirname = __dirname_(__filename);
|
|
7
|
-
import{ORGANIZATION_ID_PREFIX,OrganizationResponseError,getOrganization,listOrganizations}from"./chunk-
|
|
7
|
+
import{ORGANIZATION_ID_PREFIX,OrganizationResponseError,getOrganization,listOrganizations}from"./chunk-HQWR3EDU.js";import{TEAM_BUDGET,listBudgetProducts}from"./chunk-IG5ACFU6.js";import{BUDGET_SCOPES,OPTION_SCOPES,isBudgetScope}from"./chunk-C35SG42R.js";import{getProjectByNameOrId}from"./chunk-LOA7SZWH.js";import{getTeamByIdOrSlug}from"./chunk-2VBFQZ72.js";import{ProjectNotFound,isAPIError}from"./chunk-GOI2VVI7.js";import{getCommandName}from"./chunk-B4KA3ZH2.js";import{output_manager_default}from"./chunk-AP6DZGTK.js";async function resolveBudgetTeam(client){let id=await client.resolveCurrentTeam();if(!id)return output_manager_default.error("No team selected. Use `vercel --scope <team-slug> budget \u2026` or run `vercel switch` first."),null;try{let team=await getTeamByIdOrSlug(client,id);return{id:team.id,slug:team.slug}}catch{return{id,slug:id}}}var SCOPE_OPTIONS={organization:{noun:"an organization slug or ID",resolve:async(_client,organization)=>({value:organizationTarget(organization)})},project:{noun:"a project name or ID",resolve:resolveProject},product:{noun:"a product name or ID",resolve:resolveProduct}};function parseBudgetScopeOptions(opts){let given=OPTION_SCOPES.filter(scope2=>opts[`--${scope2}`]!==void 0);if(given.length>1)return{error:`Can't use --${given[0]} with --${given[1]}.`};if(given.length===0)return{value:null};let scope=given[0],value=opts[`--${scope}`]?.trim();return value?{value:{scope,value}}:{error:`Provide ${SCOPE_OPTIONS[scope].noun} with --${scope}.`}}function parseBudgetFilterOptions(opts){let scope=parseBudgetScopeOptions(opts);if("error"in scope)return scope;let values=(opts["--type"]??[]).flatMap(value=>value.split(",")).map(value=>value.trim());if(values.length===0)return{value:{input:scope.value,types:null}};let unknown=values.find(value=>!isBudgetScope(value));return unknown!==void 0?{error:`Unknown budget type "${unknown}". Expected one of: ${BUDGET_SCOPES.join(", ")}.`}:scope.value?{error:`Can't use --type with --${scope.value.scope}.`}:{value:{input:null,types:BUDGET_SCOPES.filter(type=>values.includes(type))}}}function scopeOptionArgs(input){return input?` --${input.scope} ${quoteArg(input.value)}`:""}function quoteArg(arg){return/\s/.test(arg)?JSON.stringify(arg):arg}function teamTarget(team){return{selector:TEAM_BUDGET,args:"",where:`on team ${team.slug}`,pauses:`all projects on team ${team.slug}`,json:{scope:"team",scopeId:team.id,name:team.slug}}}async function resolveBudgetTarget(client,team,input,{readOnly=!1}={}){return input?SCOPE_OPTIONS[input.scope].resolve(client,team,input.value,readOnly):{value:teamTarget(team)}}function typeFilter(team,types){if(!types)return{selector:void 0,args:"",where:`on team ${team.slug}`,json:{scope:null,scopeId:null,name:null}};let[first]=types;return{selector:{scope:types},args:types.includes("team")||first===void 0?"":` --${first} <${first.toUpperCase()}>`,where:`on team ${team.slug} (type ${types.join(", ")})`,json:{type:types}}}async function resolveBudgetFilter(client,team,{input,types}){return input?resolveBudgetTarget(client,team,input,{readOnly:!0}):{value:typeFilter(team,types)}}async function resolveBudgetOwner(client,input){if(input?.scope==="organization")return resolveOrganization(client,input.value);let team=await resolveBudgetTeam(client);return team?{value:{...team,type:"team"}}:null}async function resolveOrganization(client,value){let organization;try{organization=value.startsWith(ORGANIZATION_ID_PREFIX)?await getOrganization(client,value):(await listOrganizations(client)).organizations.find(org=>org.slug===value)}catch(err){if(isAPIError(err)&&err.status===404)organization=void 0;else{if(isAPIError(err)||err instanceof OrganizationResponseError)return{error:err.message,usage:!1};throw err}}return organization?{value:{type:"organization",id:organization.organizationId,slug:organization.slug}}:{error:`Couldn't find organization ${value}. List yours with ${getCommandName("organizations list")}.`,usage:!1}}function organizationTarget(organization){return{selector:{scope:"organization",orgId:organization.id},args:` --organization ${organization.slug}`,where:`on organization ${organization.slug}`,pauses:null,json:{scope:"organization",scopeId:organization.id,name:organization.slug}}}var PROJECT_ID=/^prj_[A-Za-z0-9]+$/;async function resolveProject(client,team,name,readOnly){let project;try{project=await getProjectByNameOrId(client,name,team.id)}catch(err){if(isAPIError(err))return{error:err.message,usage:!1};throw err}return project instanceof ProjectNotFound&&readOnly&&PROJECT_ID.test(name)?{value:{selector:{scope:"project",scopeId:name},args:` --project ${name}`,where:`on project ${name}`,pauses:`project ${name}`,json:{scope:"project",scopeId:name,name:null}}}:project instanceof ProjectNotFound?{error:`Project "${name}" was not found on team ${team.slug}.`,usage:!1}:{value:{selector:{scope:"project",scopeId:project.id},args:` --project ${project.name}`,where:`on project ${project.name}`,pauses:`project ${project.name}`,json:{scope:"project",scopeId:project.id,name:project.name}}}}var MAX_PRODUCT_SUGGESTIONS=5,PRODUCT_ID=/^prod_[a-z0-9]+$/;async function resolveProduct(client,team,name){let products;try{products=await listBudgetProducts(client)}catch(err){if(isAPIError(err))return{error:err.message,usage:!1};throw err}let lower=name.toLowerCase(),product=products.find(p=>p.id===name)??products.find(p=>p.name.toLowerCase()===lower);if(!product&&PRODUCT_ID.test(name))return{value:{selector:{scope:"product",scopeId:name},args:` --product ${name}`,where:`on product ${name}`,pauses:null,json:{scope:"product",scopeId:name,name:null}}};if(!product){if(products.length===0)return{error:`Team ${team.slug} has no products that can have a budget.`,usage:!0};let similar=products.filter(p=>p.name.toLowerCase().includes(lower)),hint=similar.length>0&&similar.length<=MAX_PRODUCT_SUGGESTIONS?`Did you mean ${similar.map(p=>`"${p.name}"`).join(", ")}?`:`Products that can have one: ${products.map(p=>p.name).sort((a,b)=>a.localeCompare(b)).join(", ")}.`;return{error:`Product "${name}" can't have a budget on team ${team.slug}. ${hint}`,usage:!0}}return{value:{selector:{scope:"product",scopeId:product.id},args:` --product ${product.id}`,where:`on product ${product.name}`,pauses:null,json:{scope:"product",scopeId:product.id,name:product.name}}}}function rejectUnexpectedArgs(args,command){return args.length===0?!1:(output_manager_default.error(`Unexpected argument "${args[0]}". ${getCommandName(command)} takes options only.`),!0)}function trackScopeOptions(telemetry,opts){for(let scope of OPTION_SCOPES){let method=`trackCliOption${capitalize(scope)}`;telemetry[method](opts[`--${scope}`])}}function capitalize(value){return`${value[0].toUpperCase()}${value.slice(1)}`}export{parseBudgetScopeOptions,parseBudgetFilterOptions,scopeOptionArgs,resolveBudgetTarget,typeFilter,resolveBudgetFilter,resolveBudgetOwner,organizationTarget,rejectUnexpectedArgs,trackScopeOptions};
|
|
@@ -4,7 +4,7 @@ import { dirname as __dirname_ } from 'node:path';
|
|
|
4
4
|
const require = __createRequire(import.meta.url);
|
|
5
5
|
const __filename = __fileURLToPath(import.meta.url);
|
|
6
6
|
const __dirname = __dirname_(__filename);
|
|
7
|
-
import{require_slugify}from"./chunk-COD3WAUI.js";import{createProject}from"./chunk-ANIA2G6F.js";import{printProjectNotFoundError}from"./chunk-
|
|
7
|
+
import{require_slugify}from"./chunk-COD3WAUI.js";import{createProject}from"./chunk-ANIA2G6F.js";import{printProjectNotFoundError}from"./chunk-Q5DOQ7AQ.js";import{canPrompt}from"./chunk-IQ7FPAI4.js";import{printError}from"./chunk-CY5KJ42N.js";import{detectExplicitScope,getScope,resolveOrg}from"./chunk-QGS3SBR6.js";import{AGENT_REASON,AGENT_STATUS,writeAgentError,writeTrackedActionRequired}from"./chunk-PNWRO3XW.js";import{getLinkedProject,getOrgById,isOwnerLookupUnavailableLink,require_dist2 as require_dist,require_lib}from"./chunk-73BOOIOB.js";import{printAlignedLabel}from"./chunk-M7FED5YP.js";import{isAPIError}from"./chunk-GOI2VVI7.js";import{packageName}from"./chunk-B4KA3ZH2.js";import{output_manager_default}from"./chunk-AP6DZGTK.js";import{require_build_utils}from"./chunk-5MDNVAE6.js";import{normalizeFlagName,quoteArg,stripSensitiveAuthArgs}from"./chunk-CFJBDBYH.js";import{__toESM}from"./chunk-BZENIQ7N.js";var import_fs_extra=__toESM(require_lib(),1);import{readdir}from"fs/promises";import{join}from"path";function isStaticFolderDeploy(project,localConfig,rootDirectory){if(rootDirectory||localConfig.builds?.length||localConfig.routes?.length||localConfig.rewrites?.length||localConfig.proxy)return!1;let setting=key=>Object.hasOwn(localConfig,key)?localConfig[key]:project[key],outputDirectory=setting("outputDirectory");return!setting("framework")&&!setting("buildCommand")&&(!outputDirectory||outputDirectory===".")}async function aliasLonePageInOutput(outputDir){if(!await isPlainStaticOutput(outputDir))return;let staticDir=join(outputDir,"static"),entries;try{entries=(await readdir(staticDir,{recursive:!0})).map(entry=>entry.split("\\").join("/"))}catch{return}let pages=entries.filter(entry=>/\.html?$/i.test(entry));if(pages.length!==1)return;let[page]=pages;page.includes("/")||page==="index.html"||page==="index.htm"||(await import_fs_extra.default.stat(join(staticDir,page))).isFile()&&await writeIndexCopy(staticDir,page)}async function isPlainStaticOutput(outputDir){if(await import_fs_extra.default.pathExists(join(outputDir,"functions")))return!1;let readJSON=name=>import_fs_extra.default.readJSON(join(outputDir,name)).catch(()=>null),builds=(await readJSON("builds.json"))?.builds;if(!Array.isArray(builds)||builds.length===0||builds.some(build=>build?.use!=="@vercel/static"))return!1;let config=await readJSON("config.json"),routes=config?.routes??[];return!config||!Array.isArray(routes)?!1:routes.findIndex(route=>route?.handle==="error")===0||routes.length===0}async function writeIndexCopy(dir,name){let page=join(dir,name),index=join(dir,"index.html"),existing=await import_fs_extra.default.stat(index).catch(()=>null);if(existing&&existing.ino===(await import_fs_extra.default.stat(page)).ino){await import_fs_extra.default.rename(page,index);return}await import_fs_extra.default.copy(page,index)}var import_fs_extra2=__toESM(require_lib(),1),import_slugify=__toESM(require_slugify(),1),import_build_utils=__toESM(require_build_utils(),1),import_client=__toESM(require_dist(),1);import{basename,dirname,extname,isAbsolute,join as join2,relative,sep}from"path";var singleFileConfig={framework:null,buildCommand:"",installCommand:"",outputDirectory:null},singleFileProjectSettings={...singleFileConfig,rootDirectory:null};async function stageSingleFile(file,dir){let name=basename(file);await import_fs_extra2.default.copy(file,join2(dir,name)),servesAtRoot(name)&&await writeIndexCopy(dir,name)}function servesAtRoot(name){let ext=extname(name).toLowerCase();return(ext===".html"||ext===".htm")&&name!=="index.html"&&name!=="index.htm"}async function isIgnoredFile(file,cwd){let roots=new Set([dirname(file)]),fromCwd=relative(cwd,file);fromCwd&&!fromCwd.startsWith(`..${sep}`)&&!isAbsolute(fromCwd)&&roots.add(cwd);for(let root of roots){let{ig}=await(0,import_client.getVercelIgnore)(root);if(ig.ignores(relative(root,file).split(sep).join("/")))return!0}return!1}function getSingleFileProjectName(file){return(0,import_slugify.default)(basename(file,extname(file))).slice(0,100).replace(/-+$/,"")||void 0}var PROJECT_NAME_RULES="Project names can be up to 100 characters long and must be lowercase. They can include letters, digits, and the following characters: '.', '_', '-'. However, they cannot contain the sequence '---'.";function isValidProjectName(name){return/^[a-z0-9._-]{1,100}$/.test(name)&&!name.includes("---")}var singleFileMeta={singleFile:"1"};function isStaticProject(project){if(project.framework||project.link||project.rootDirectory||project.buildCommand||project.installCommand)return!1;if(project.outputDirectory===".")return!0;if(project.outputDirectory)return!1;let served=project.targets?.production??project.latestDeployments?.[0];return!served||served.meta?.singleFile===singleFileMeta.singleFile}var PROJECT_FLAGS=["--project","--name","-n"],SCOPE_FLAGS=["--scope","--team","-S","-T"];function argsWithout(client,flags){let args=stripSensitiveAuthArgs(client.argv.slice(2)),kept=[];for(let i=0;i<args.length;i++){let arg=args[i];if(flags.includes(normalizeFlagName(arg))){arg.includes("=")||i++;continue}kept.push(quoteArg(arg))}return kept.join(" ")}function retryWithProject(client,project){return`${packageName} ${argsWithout(client,PROJECT_FLAGS)} --project ${project}`}function singleFileTargetArgs(client,link){let{org,project}=link,scope=!detectExplicitScope(client)&&org.type==="team"&&org.slug&&!isOwnerLookupUnavailableLink(link)?` --scope ${quoteArg(org.slug)}`:"";return` --project ${quoteArg(project.id)}${scope}`}async function applyNameScope(client){if(detectExplicitScope(client))return;if(client.ignoresSavedTeam){await client.resolveCurrentTeam();return}let envOrgId=(0,import_build_utils.getPlatformEnv)("ORG_ID");if(envOrgId){client.config.currentTeam=envOrgId.startsWith("team_")?envOrgId:void 0;return}if(!client.config.currentTeam)try{await getScope(client)}catch(err){output_manager_default.debug(`Using the token's scope for single-file deploys: ${err}`)}}function fail(client,asJson,{headline,detail,next=[],...failure},exitCode){if(asJson){let{status,...rest}=failure,payload={...rest,message:detail?`${headline} ${detail}`:headline,...next.length>0&&{next:next.map(({command,when})=>({command,when}))}};status===AGENT_STATUS.ERROR?writeAgentError(client,{...payload,status}):writeTrackedActionRequired(client,{...payload,status})}else{output_manager_default.fatal(detail?`${headline}
|
|
8
8
|
${detail}`:headline);for(let{instruction,command}of next)output_manager_default.print(`
|
|
9
9
|
${instruction}:
|
|
10
10
|
${command}
|
|
@@ -4,7 +4,7 @@ import { dirname as __dirname_ } from 'node:path';
|
|
|
4
4
|
const require = __createRequire(import.meta.url);
|
|
5
5
|
const __filename = __fileURLToPath(import.meta.url);
|
|
6
6
|
const __dirname = __dirname_(__filename);
|
|
7
|
-
import{require_dist as require_dist2}from"./chunk-PLRVNB34.js";import{validateConfig}from"./chunk-QH6W55RZ.js";import{compileVercelConfig,findSourceVercelConfigFile}from"./chunk-
|
|
7
|
+
import{require_dist as require_dist2}from"./chunk-PLRVNB34.js";import{validateConfig}from"./chunk-QH6W55RZ.js";import{compileVercelConfig,findSourceVercelConfigFile}from"./chunk-RY5PXA7G.js";import{init_dist,stringify}from"./chunk-U4Z2MMOF.js";import{applyEdits,findNodeAtLocation,init_main,modify,parse,parseTree}from"./chunk-J24BABG4.js";import{require_dist}from"./chunk-5T7OTGUG.js";import{printAlignedLabel}from"./chunk-M7FED5YP.js";import{code}from"./chunk-GOI2VVI7.js";import{link_default,output_manager_default}from"./chunk-AP6DZGTK.js";import{require_build_utils}from"./chunk-5MDNVAE6.js";import{require_source}from"./chunk-NB2WLB3J.js";import{__toESM}from"./chunk-BZENIQ7N.js";var import_chalk=__toESM(require_source(),1);init_main();init_dist();var import_build_utils=__toESM(require_build_utils(),1),import_fs_detectors=__toESM(require_dist(),1),import_service_topology=__toESM(require_dist2(),1);import{readFile,writeFile}from"fs/promises";import{basename}from"path";var EXPERIMENTAL_SERVICES_DOCS_URL="https://vercel.com/docs/services/experimental";async function prepareExperimentalServicesMigration(cwd,detectServicesResult){let compileResult=await compileVercelConfig(cwd);if(!compileResult.configPath)return null;let rawConfig=await readFile(compileResult.configPath,"utf8"),config=parse(rawConfig);if(!config||!(0,import_service_topology.hasLegacyServicesConfig)(config))return null;let resolvedServices=detectServicesResult?.resolved?.source==="configured"?detectServicesResult.services.filter(s=>(0,import_build_utils.isExperimentalService)(s)):void 0,plan=await(0,import_service_topology.migrateExperimentalServices)({fs:new import_fs_detectors.LocalFileSystemDetector(cwd),config,resolvedServices:resolvedServices&&resolvedServices.length>0?resolvedServices:void 0}),sourceFile=compileResult.sourceFile??basename(compileResult.configPath),preparation={plan,sourceFile,snippet:renderSnippet(sourceFile,plan)};if(plan.errors.length>0)return preparation;if(compileResult.wasCompiled)return preparation.writeBlocker=`${sourceFile} can't be updated automatically.`,preparation;let content=applyPlanToJson(rawConfig,config,plan),parseErrors=[],nextConfig=parse(content,parseErrors);if(parseErrors.length>0)return preparation.writeBlocker=`Couldn't produce a valid ${sourceFile}.`,preparation;let validationError=validateConfig(nextConfig);return validationError?(preparation.writeBlocker=validationError.message,preparation):(preparation.write={configPath:compileResult.configPath,content},preparation)}function applyPlanToJson(rawConfig,config,plan){let eol=rawConfig.includes(`\r
|
|
8
8
|
`)?`\r
|
|
9
9
|
`:`
|
|
10
10
|
`,indent2=/^([ \t]+)\S/m.exec(rawConfig)?.[1]??" ",formattingOptions={eol,insertSpaces:!indent2.startsWith(" "),tabSize:indent2.startsWith(" ")?1:indent2.length},legacyKey=config.experimentalServices?"experimentalServices":"experimentalServicesV2",key=findNodeAtLocation(parseTree(rawConfig),[legacyKey]).parent.children[0],text=applyEdits(rawConfig,[{offset:key.offset,length:key.length,content:'"services"'}]);text=applyEdits(text,modify(text,["services"],plan.patch.services,{formattingOptions}));for(let key2 of plan.removeKeys)key2!==legacyKey&&(text=applyEdits(text,modify(text,[key2],void 0,{formattingOptions})));for(let[key2,value]of Object.entries(plan.patch.build?.env??{}))text=applyEdits(text,modify(text,["build","env",key2],value,{formattingOptions}));if(plan.patch.rewrites.length>0)if(Array.isArray(config.rewrites))for(let rewrite of plan.patch.rewrites)text=applyEdits(text,modify(text,["rewrites",-1],rewrite,{formattingOptions}));else text=applyEdits(text,modify(text,["rewrites"],plan.patch.rewrites,{formattingOptions,getInsertionIndex:keys=>keys.indexOf("services")+1}));return text.endsWith(`
|
|
@@ -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{getScope}from"./chunk-
|
|
7
|
+
import{getScope}from"./chunk-QGS3SBR6.js";import{sleep}from"./chunk-73BOOIOB.js";import{require_ms}from"./chunk-MXTC4ZAQ.js";import{isAPIError}from"./chunk-GOI2VVI7.js";import{__toESM}from"./chunk-BZENIQ7N.js";var import_ms=__toESM(require_ms(),1);var DEFAULT_ORDER_WAIT="1m",DEFAULT_ORDER_WAIT_MS=(0,import_ms.default)(DEFAULT_ORDER_WAIT);function getOrderOutcome(order,domain){let item=order.domains.find(d=>d.domainName===domain);return order.status==="completed"&&item?.status==="completed"?"completed":order.error?.code==="payment-failed"?order.error.details?.reason==="authentication-required"?"payment_authentication_required":"payment_failed":item?.status==="refund-failed"?"refund_failed":item?.status==="refunded"?"refunded":item?.status==="failed"?"failed":"unknown"}async function getOrder(client,orderId,{signal}={}){let{team}=await getScope(client),teamParam=team?`?teamId=${team.slug}`:"";try{return await client.fetch(`/v1/registrar/orders/${orderId}${teamParam}`,{retry:{retries:0},bailOn429:!0,signal})}catch(err){if(isAPIError(err)){if(err.status===404)return null;if(err.status<500)return err}throw err}}function remainingWait(waitMs,sentAt){return Math.max(waitMs-(Date.now()-sentAt),0)}var ORDER_READ_TIMING={minReadMs:5*1e3},pollForOrder=async(client,orderId,timeoutMs)=>{let intervalMs=500,lastStatus=null,startTime=Date.now();for(;;){let sleepMs=intervalMs,order;try{let leftMs2=timeoutMs-(Date.now()-startTime);order=await getOrder(client,orderId,{signal:AbortSignal.timeout(Math.max(leftMs2,ORDER_READ_TIMING.minReadMs))})}catch{order=null}if(order instanceof Error)if(order.status===429)typeof order.retryAfterMs=="number"&&(sleepMs=Math.max(sleepMs,order.retryAfterMs));else return{order:null,lastStatus,readError:{status:order.status,code:order.code}};else if(order!==null){let pending=order.domains.some(d=>d.status==="pending");if(order.status==="failed"||order.status==="completed"&&!pending)return{order};order.status!=="completed"&&(lastStatus=order.status)}let leftMs=timeoutMs-(Date.now()-startTime);if(leftMs<=0)break;await sleep(Math.min(sleepMs,leftMs)),intervalMs=Math.min(intervalMs*2,5e3)}return{order:null,lastStatus}};export{DEFAULT_ORDER_WAIT,DEFAULT_ORDER_WAIT_MS,getOrderOutcome,remainingWait,ORDER_READ_TIMING,pollForOrder};
|