vercel 59.15.1 → 59.16.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-7XFD2OHW.js → add-65ZSJF26.js} +1 -1
- package/dist/chunks/{add-HZC7AUBY.js → add-7G6574RA.js} +1 -1
- package/dist/chunks/{add-PYUNJZ6K.js → add-MFTI65B7.js} +1 -1
- package/dist/chunks/{build-EFKQ6BND.js → build-BLQRFSLM.js} +1 -1
- package/dist/chunks/{chunk-KO733OJG.js → chunk-265LYROU.js} +1 -1
- package/dist/chunks/{chunk-HZZ5L472.js → chunk-3EBQRPCU.js} +1 -1
- package/dist/chunks/{chunk-KNEWCUWF.js → chunk-4XH66IEQ.js} +1 -1
- package/dist/chunks/{chunk-EOBD4ZEG.js → chunk-4XO6BRQW.js} +1 -1
- package/dist/chunks/{chunk-3QT7VOE3.js → chunk-65JYSI26.js} +1 -1
- package/dist/chunks/{chunk-JIYY3B4C.js → chunk-6NVGLVCH.js} +1 -1
- package/dist/chunks/{chunk-3IAQUNQH.js → chunk-7FEWFNWG.js} +1 -1
- package/dist/chunks/{chunk-NGNOUPWS.js → chunk-7GU2GVQ7.js} +1 -1
- package/dist/chunks/{chunk-RKAUVPOQ.js → chunk-7HSQ4ULK.js} +1 -1
- package/dist/chunks/{chunk-EE3FVJLV.js → chunk-7V6DZO2T.js} +1 -1
- package/dist/chunks/{chunk-ADUYPK2G.js → chunk-AK5EV3WD.js} +1 -1
- package/dist/chunks/{chunk-XHOGOH6N.js → chunk-BMOWQEWL.js} +1 -1
- package/dist/chunks/{chunk-GTRGQIY2.js → chunk-DFE7LVAK.js} +1 -1
- package/dist/chunks/{chunk-7R5FEXZ5.js → chunk-EIXOJUNN.js} +1 -1
- package/dist/chunks/{chunk-AFPOIDM5.js → chunk-FANE2VO3.js} +1 -1
- package/dist/chunks/{chunk-CGOVWHI3.js → chunk-G4QF3M55.js} +1 -1
- package/dist/chunks/{chunk-NHTF332K.js → chunk-GYGIBRFB.js} +1 -1
- package/dist/chunks/{chunk-SGWVKRSR.js → chunk-IT3UX6V4.js} +1 -1
- package/dist/chunks/chunk-LSBEGBBX.js +9 -0
- package/dist/chunks/{chunk-VLZ47RWM.js → chunk-M67S3ZNJ.js} +2 -2
- package/dist/chunks/chunk-MPV7JL34.js +29 -0
- package/dist/chunks/{chunk-M2XARQBF.js → chunk-NB2UCUFL.js} +1 -1
- package/dist/chunks/{chunk-5QQNYN4N.js → chunk-O3QTFKP3.js} +1 -1
- package/dist/chunks/chunk-OAKO6LVS.js +7 -0
- package/dist/chunks/{chunk-OD6RZ3XZ.js → chunk-OTVTI2GM.js} +1 -1
- package/dist/chunks/chunk-PV5PBVER.js +7 -0
- package/dist/chunks/{chunk-HSJ6AHWG.js → chunk-PZPLBXHU.js} +1 -1
- package/dist/chunks/{chunk-MAVRGZQP.js → chunk-QGHN2WOY.js} +1 -1
- package/dist/chunks/{chunk-LDM3SQAU.js → chunk-R3RHRLGI.js} +1 -1
- package/dist/chunks/{chunk-AUGK2HIT.js → chunk-RN2EWPUH.js} +2 -2
- package/dist/chunks/{chunk-ENS6KX2F.js → chunk-RUJT2JBX.js} +1 -1
- package/dist/chunks/chunk-TEAQZXCV.js +9 -0
- package/dist/chunks/{chunk-TKBXN4H3.js → chunk-TGVB4DJ4.js} +2 -2
- package/dist/chunks/{chunk-WKZ6JSGZ.js → chunk-TKBORMUF.js} +1 -1
- package/dist/chunks/{chunk-D3EHMP4U.js → chunk-V4L6NUSW.js} +1 -1
- package/dist/chunks/{chunk-OK3S6KFX.js → chunk-V6GSMYQB.js} +2 -2
- package/dist/chunks/{chunk-562OXD3F.js → chunk-XK2BQUWV.js} +3 -3
- package/dist/chunks/{chunk-OKZDOANA.js → chunk-XZ2JXEXU.js} +1 -1
- package/dist/chunks/{chunk-2PPXY24N.js → chunk-YCCBAQIH.js} +2 -2
- package/dist/chunks/{chunk-CUAIEGNE.js → chunk-YCD5VEHQ.js} +1 -1
- package/dist/chunks/{chunk-HVUHCRZB.js → chunk-ZM2RFVTV.js} +1 -1
- package/dist/chunks/{clear-5NQAVWIF.js → clear-OJ6EDV3Q.js} +1 -1
- package/dist/chunks/{compile-vercel-config-6J2XUFRK.js → compile-vercel-config-HKMFYX2L.js} +1 -1
- package/dist/chunks/{config-CKYRXZXL.js → config-IVZNLEUK.js} +1 -1
- package/dist/chunks/{config-VNUY4RJ4.js → config-LULRZCTY.js} +1 -1
- package/dist/chunks/config-validator.mjs +1 -1
- package/dist/chunks/{constants-G4UYVLOF.js → constants-NCE2LWSS.js} +1 -1
- package/dist/chunks/{delete-HRJEO4MI.js → delete-DUHLA627.js} +1 -1
- package/dist/chunks/{delete-GTXXCSKQ.js → delete-HBL7TKZ5.js} +1 -1
- package/dist/chunks/{detect-services-GHILEGNU.js → detect-services-5GIRISUS.js} +1 -1
- package/dist/chunks/{disable-RWCRVG5O.js → disable-XTZ2FN2I.js} +1 -1
- package/dist/chunks/{discard-SHFIYCJU.js → discard-4IW37YWA.js} +1 -1
- package/dist/chunks/{edit-DMO3NSO2.js → edit-BBEW6J4Y.js} +1 -1
- package/dist/chunks/{edit-EVQI2RSS.js → edit-PUQ4NHNH.js} +1 -1
- package/dist/chunks/{enable-AWDU6STD.js → enable-4AIU4V44.js} +1 -1
- package/dist/chunks/{export-IQKTA4RS.js → export-NQ4SZHRW.js} +1 -1
- package/dist/chunks/{generate-cert-for-deploy-VKOWC4PZ.js → generate-cert-for-deploy-IGJNGQLD.js} +1 -1
- package/dist/chunks/{image-LDFYNOCA.js → image-PEDML4FR.js} +1 -1
- package/dist/chunks/{import-builders-P7CXSX2D.js → import-builders-UAMMKJAT.js} +1 -1
- package/dist/chunks/{inspect-53SGDDAH.js → inspect-DXFD47VC.js} +1 -1
- package/dist/chunks/{inspect-5INZDUQS.js → inspect-EEGSI64I.js} +1 -1
- package/dist/chunks/{inspect-WMT2M335.js → inspect-EZP7WID3.js} +1 -1
- package/dist/chunks/{inspect-3N47ODIH.js → inspect-TUXRUGES.js} +1 -1
- package/dist/chunks/{inspect-Y6BUCOUV.js → inspect-WY6ISJM6.js} +1 -1
- package/dist/chunks/{list-K5J7OULR.js → list-EQBJKUH7.js} +1 -1
- package/dist/chunks/{list-BIAPHKFM.js → list-JC24ACBV.js} +1 -1
- package/dist/chunks/{list-DMOCRRSE.js → list-QTYHA5QM.js} +1 -1
- package/dist/chunks/{login-SRVNHI4Y.js → login-WDMVEUBV.js} +1 -1
- package/dist/chunks/{logs-GK7CJBYY.js → logs-JWDSCEI5.js} +1 -1
- package/dist/chunks/{ls-AJWN5ZR4.js → ls-3VJGBK3L.js} +1 -1
- package/dist/chunks/{ls-UVKTHBTE.js → ls-3ZKP7ZPO.js} +1 -1
- package/dist/chunks/{ls-KGIE6HCO.js → ls-BAMHXX2I.js} +1 -1
- package/dist/chunks/{ls-WEG45IOC.js → ls-S6JZYPGH.js} +1 -1
- package/dist/chunks/ls-TYHGH2W4.js +11 -0
- package/dist/chunks/{ls-7ZX6DCJW.js → ls-YA2L3HO5.js} +1 -1
- package/dist/chunks/{ls-BFJWCRLZ.js → ls-YXJ4X57G.js} +1 -1
- package/dist/chunks/mutate-PE6TUYAM.js +9 -0
- package/dist/chunks/notifications-T3RUG34N.js +7 -0
- package/dist/chunks/{open-OEWPI5G6.js → open-BAWCRPNZ.js} +1 -1
- package/dist/chunks/{permissions-EPQBQFE3.js → permissions-4AXOWGE6.js} +1 -1
- package/dist/chunks/{publish-JG7MEPWT.js → publish-2XWTYLVS.js} +1 -1
- package/dist/chunks/{pull-MRKXG6TO.js → pull-KCOUWGVC.js} +1 -1
- package/dist/chunks/{purchase-domain-if-available-O5ARXEZ5.js → purchase-domain-if-available-BLEETOAR.js} +1 -1
- package/dist/chunks/{push-XOXJDFYO.js → push-HVT3DU7K.js} +1 -1
- package/dist/chunks/query-MJ7EBPCB.js +12 -0
- package/dist/chunks/{reorder-5DMRFDBY.js → reorder-2L5YJSXX.js} +1 -1
- package/dist/chunks/{reply-WSRNZWFD.js → reply-PPDMG3MF.js} +1 -1
- package/dist/chunks/{resolve-YJUXQVOZ.js → resolve-YJVUNKED.js} +1 -1
- package/dist/chunks/{restore-QT3DBGKU.js → restore-V6I26UDI.js} +1 -1
- package/dist/chunks/{rm-MVZFU6RG.js → rm-3NXDUNS4.js} +1 -1
- package/dist/chunks/{rm-WB2AIP3N.js → rm-43ZFE4U2.js} +1 -1
- package/dist/chunks/{rm-XRP6MRUT.js → rm-CD6UH446.js} +1 -1
- package/dist/chunks/{rm-PXR4J2US.js → rm-SQNLLMLK.js} +1 -1
- package/dist/chunks/{rm-MHPIUEZ5.js → rm-VUOBWXNR.js} +1 -1
- package/dist/chunks/{rule-inspect-TT3DRGCS.js → rule-inspect-D6NCXGFR.js} +1 -1
- package/dist/chunks/rules-CI4NIZTK.js +7 -0
- package/dist/chunks/schema-C2ZBFLA5.js +14 -0
- package/dist/chunks/{schema-KCNKVFT3.js → schema-GTOTPNEE.js} +1 -1
- package/dist/chunks/{set-7BANEWEL.js → set-5OG2JDEK.js} +1 -1
- package/dist/chunks/{setup-and-link-ZAV3EFGC.js → setup-and-link-KW27P3UH.js} +1 -1
- package/dist/chunks/{tags-VZR66NUC.js → tags-77GJR6ZK.js} +1 -1
- package/dist/chunks/{update-RBFNNSWE.js → update-5BEQ4XCV.js} +2 -2
- package/dist/chunks/utils-BG3TNJBX.js +86 -0
- package/dist/commands/build/index.js +1 -1
- package/dist/commands/deploy/index.js +3 -3
- package/dist/commands/dev/index.js +4 -4
- package/dist/commands/env/index.js +1 -1
- package/dist/commands/link/index.js +1 -1
- package/dist/commands/list/index.js +1 -1
- package/dist/commands-bulk.js +508 -492
- package/dist/index.js +1 -1
- package/dist/version.mjs +1 -1
- package/package.json +46 -46
- package/dist/chunks/chunk-BATE73HA.js +0 -9
- package/dist/chunks/chunk-EOCTK4EA.js +0 -7
- package/dist/chunks/chunk-FKCOBJFH.js +0 -7
- package/dist/chunks/chunk-G5FC5ZCO.js +0 -9
- package/dist/chunks/chunk-NWFHHUKZ.js +0 -7
- package/dist/chunks/query-AL7C6WV2.js +0 -12
- package/dist/chunks/rules-B5GW4KJH.js +0 -7
- package/dist/chunks/schema-JY5QTZOG.js +0 -14
- package/dist/chunks/utils-B5ZTMQKY.js +0 -58
|
@@ -4,6 +4,6 @@ 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{emitAlertsScopeError,resolveAlertsScope}from"./chunk-
|
|
7
|
+
import{emitAlertsScopeError,resolveAlertsScope}from"./chunk-FANE2VO3.js";import{handleValidationError,validateAllProjectMutualExclusivity}from"./chunk-6RIQPTJA.js";import{isJSONObject}from"./chunk-YCCBAQIH.js";import{AGENT_REASON}from"./chunk-ENBTTYJR.js";import{buildCommandWithGlobalFlags,outputAgentError}from"./chunk-NS4FH2TY.js";import{getScope}from"./chunk-O3QTFKP3.js";import{getProjectByNameOrId}from"./chunk-M67S3ZNJ.js";import{ProjectNotFound,isAPIError}from"./chunk-R2TGGVCT.js";import{output_manager_default}from"./chunk-Z6Y55QJW.js";async function resolveRulesTeam(client,jsonOutput){let{team}=await getScope(client,{resolveLocalScope:!0});return team?{teamId:team.id}:emitAlertsScopeError(client,jsonOutput,"NO_TEAM","No team context found. Run `vercel switch` to select a team, use `--scope <team>`, or link a team project.",{reason:AGENT_REASON.MISSING_SCOPE,hint:"Alert rules belong to a team. Select the team before retrying.",next:[{command:buildCommandWithGlobalFlags(client.argv,"teams switch"),when:"Select a team"},{command:buildCommandWithGlobalFlags(client.argv,"whoami"),when:"Inspect the current scope"}]})}async function resolveRulesProject(client,projectNameOrId,jsonOutput,command){let teamScope=await resolveRulesTeam(client,jsonOutput);if(typeof teamScope=="number")return teamScope;try{let project=await getProjectByNameOrId(client,projectNameOrId,teamScope.teamId);return project instanceof ProjectNotFound?emitAlertsScopeError(client,jsonOutput,"PROJECT_NOT_FOUND",`Project "${projectNameOrId}" was not found in the selected team.`,{reason:AGENT_REASON.NOT_FOUND,next:[{command:buildCommandWithGlobalFlags(client.argv,`${command} --project <name_or_id>`),when:"Retry with a valid project"}]}):{...teamScope,projectId:project.id,projectName:project.name}}catch(error){if(!isAPIError(error))throw error;return emitAlertsScopeError(client,jsonOutput,error.code||"API_ERROR",error.serverMessage||`API error (${error.status}).`,{reason:error.status===401?"not_authorized":error.status===403?"forbidden":AGENT_REASON.API_ERROR})}}async function parseRulesFlagsAndScope(client,flags,jsonOutput,command="alerts rules ls"){let mutual=validateAllProjectMutualExclusivity(flags["--all"],flags["--project"]);if(!mutual.valid)return outputAgentError(client,{status:"error",reason:AGENT_REASON.INVALID_ARGUMENTS,message:mutual.message,next:[{command:buildCommandWithGlobalFlags(client.argv,"alerts rules --help"),when:"Use either `--project` or `--all`, not both"}]},1),handleValidationError(mutual,jsonOutput,client);if(flags["--all"])return resolveRulesTeam(client,jsonOutput);if(flags["--project"])return resolveRulesProject(client,flags["--project"],jsonOutput,command);let linkedScope=await resolveAlertsScope(client,{jsonOutput,command});if(typeof linkedScope=="number")return linkedScope;let teamScope=await resolveRulesTeam(client,jsonOutput);return typeof teamScope=="number"?teamScope:linkedScope.teamId===teamScope.teamId?linkedScope:teamScope}import{readFileSync}from"fs";import{resolve}from"path";function rulesCollectionPath(teamId,options={}){let query=new URLSearchParams({teamId});return options.limit!==void 0&&query.set("limit",String(options.limit)),options.cursor&&query.set("cursor",options.cursor),options.projectId&&query.set("projectId",options.projectId),options.type&&query.set("type",options.type),`/alerts/v3/alert-rules?${query.toString()}`}function rulesItemPath(teamId,ruleId){let query=new URLSearchParams({teamId});return`/alerts/v3/alert-rules/${encodeURIComponent(ruleId)}?${query.toString()}`}function ruleNotificationsPath(teamId,ruleId){let query=new URLSearchParams({teamId});return`/alerts/v3/alert-rules/${encodeURIComponent(ruleId)}/notifications?${query.toString()}`}function rulesNotificationsPath(teamId,options={}){let query=new URLSearchParams({teamId});return options.limit!==void 0&&query.set("limit",String(options.limit)),options.cursor&&query.set("cursor",options.cursor),`/alerts/v3/alert-rules/notifications?${query.toString()}`}function rulesNotificationLinksPath(teamId,ruleId){let query=new URLSearchParams({teamId});return`/alerts/v3/alert-rules/${encodeURIComponent(ruleId)}/notifications/links?${query.toString()}`}function rulesSchemaPath(teamId,type){let query=new URLSearchParams({teamId});return type&&query.set("type",type),`/alerts/v3/alert-rules/schema?${query.toString()}`}async function fetchRule(client,scope,ruleId){return(await client.fetch(rulesItemPath(scope.teamId,ruleId))).rule}function getIssues(error){return Array.isArray(error.issues)?error.issues.filter(issue=>isJSONObject(issue)&&typeof issue.path=="string"&&typeof issue.message=="string"):[]}function outputRulesError(client,jsonOutput,code,message,options={}){let issues=options.issues??[],issueSummary=issues.slice(0,5).map(issue=>`${issue.path||"body"}: ${issue.message}`).join("; ");return outputAgentError(client,{status:"error",reason:options.reason??AGENT_REASON.INVALID_ARGUMENTS,message,hint:options.hint??(issueSummary||void 0)},1),jsonOutput?client.stdout.write(`${JSON.stringify({error:{code,message,...issues.length?{issues}:{}}},null,2)}
|
|
8
8
|
`):output_manager_default.fatal([message,...issues.map(issue=>` ${issue.path}: ${issue.message}`)].join(`
|
|
9
|
-
`)),1}function handleRulesApiError(client,err,jsonOutput){let message=err.status===401?"You do not have access to alert rules in this team. Ensure your role can manage Alert Rules, or pass --token and --scope.":err.status===403?err.serverMessage||"You do not have permission to manage alert rules in this team.":err.status>=500?`The alert rules endpoint failed (${err.status}). Re-run with --debug and share the x-vercel-id from the failed request.`:err.serverMessage||`API error (${err.status}).`;return outputRulesError(client,jsonOutput,err.code||"API_ERROR",message,{reason:err.status===401?"not_authorized":err.status===403?"forbidden":err.status===404?AGENT_REASON.NOT_FOUND:err.status===429?"rate_limited":AGENT_REASON.API_ERROR,issues:getIssues(err),hint:err.status===401||err.status===403?"Confirm the team with `vercel whoami`; use --scope <team-slug> if the rule belongs to another team.":void 0})}var LEGACY_BODY_FIELDS=["alertTypes","customAlert","queryJsonString"];function readRuleBody(client,bodyPath,jsonOutput){let raw;try{raw=readFileSync(resolve(client.cwd,bodyPath),"utf8")}catch{return outputRulesError(client,jsonOutput,"INVALID_ARGUMENTS",`Could not read --body file: ${bodyPath}`)}let parsed;try{parsed=JSON.parse(raw)}catch{return outputRulesError(client,jsonOutput,"INVALID_ARGUMENTS","Invalid JSON in --body file.")}return isJSONObject(parsed)?LEGACY_BODY_FIELDS.some(field=>Object.hasOwn(parsed,field))?outputRulesError(client,jsonOutput,"LEGACY_ALERT_RULE_BODY","This body uses the previous alert-rules shape. Rewrite it using the
|
|
9
|
+
`)),1}function handleRulesApiError(client,err,jsonOutput){let message=err.status===401?"You do not have access to alert rules in this team. Ensure your role can manage Alert Rules, or pass --token and --scope.":err.status===403?err.serverMessage||"You do not have permission to manage alert rules in this team.":err.status>=500?`The alert rules endpoint failed (${err.status}). Re-run with --debug and share the x-vercel-id from the failed request.`:err.serverMessage||`API error (${err.status}).`;return outputRulesError(client,jsonOutput,err.code||"API_ERROR",message,{reason:err.status===401?"not_authorized":err.status===403?"forbidden":err.status===404?AGENT_REASON.NOT_FOUND:err.status===429?"rate_limited":AGENT_REASON.API_ERROR,issues:getIssues(err),hint:err.status===401||err.status===403?"Confirm the team with `vercel whoami`; use --scope <team-slug> if the rule belongs to another team.":void 0})}var LEGACY_BODY_FIELDS=["alertTypes","customAlert","queryJsonString"];function readRuleBody(client,bodyPath,jsonOutput){let raw;try{raw=readFileSync(resolve(client.cwd,bodyPath),"utf8")}catch{return outputRulesError(client,jsonOutput,"INVALID_ARGUMENTS",`Could not read --body file: ${bodyPath}`)}let parsed;try{parsed=JSON.parse(raw)}catch{return outputRulesError(client,jsonOutput,"INVALID_ARGUMENTS","Invalid JSON in --body file.")}return isJSONObject(parsed)?LEGACY_BODY_FIELDS.some(field=>Object.hasOwn(parsed,field))?outputRulesError(client,jsonOutput,"LEGACY_ALERT_RULE_BODY","This body uses the previous alert-rules shape. Rewrite it using the current schema.",{hint:"Run `vercel alerts rules schema --type built-in` for examples."}):parsed:outputRulesError(client,jsonOutput,"INVALID_ARGUMENTS","The --body file must contain a JSON object.")}function getBodyType(body){return body.type==="built-in"||body.type==="custom"?body.type:void 0}function emitRulesArgParseError(client,err,recoverWithProjectFlag){let message=err instanceof Error?err.message:String(err),projectFlagMissingArg=message.includes("--project")&&message.includes("requires argument");outputAgentError(client,{status:"error",reason:AGENT_REASON.INVALID_ARGUMENTS,message:projectFlagMissingArg?"`--project` requires a project name or id (for example `--project my-app`).":message,next:[{command:buildCommandWithGlobalFlags(client.argv,projectFlagMissingArg?recoverWithProjectFlag:"alerts rules --help"),when:projectFlagMissingArg?"Retry with a project name or id":"See valid `alerts rules` subcommands"}]},1)}export{resolveRulesTeam,resolveRulesProject,parseRulesFlagsAndScope,rulesCollectionPath,rulesItemPath,ruleNotificationsPath,rulesNotificationsPath,rulesNotificationLinksPath,rulesSchemaPath,fetchRule,outputRulesError,handleRulesApiError,readRuleBody,getBodyType,emitRulesArgParseError};
|
|
@@ -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
|
-
var SENTRY_DSN=
|
|
7
|
+
var SENTRY_DSN=void 0,BUILD_LABEL=void 0;export{SENTRY_DSN,BUILD_LABEL};
|