vercel 60.1.3 → 61.1.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-5INBQVKB.js → add-2QHHI447.js} +1 -1
- package/dist/chunks/{add-IEQXYKXU.js → add-H5XUOIW4.js} +1 -1
- package/dist/chunks/{add-QJSYPE26.js → add-KDIVCEEY.js} +1 -1
- package/dist/chunks/{build-Z7KM3GMP.js → build-EFC6AC3A.js} +1 -1
- package/dist/chunks/chunk-23NBYS6R.js +36 -0
- package/dist/chunks/{chunk-AP36GAOG.js → chunk-2UNDQZGO.js} +1 -1
- package/dist/chunks/{chunk-R7ZRVA7E.js → chunk-3PU3JKJU.js} +7 -5
- package/dist/chunks/{chunk-3MVT26LH.js → chunk-3QIFLB5M.js} +1 -1
- package/dist/chunks/{chunk-JSKGZLE4.js → chunk-3Y2HZ7ZE.js} +1 -1
- package/dist/chunks/{chunk-LFQTA3CF.js → chunk-46JKXCHX.js} +1 -1
- package/dist/chunks/{chunk-H4FTGLWV.js → chunk-5E6XT7UP.js} +1 -1
- package/dist/chunks/{chunk-IVWPQYIH.js → chunk-5VEVDIX4.js} +1 -1
- package/dist/chunks/{chunk-YJZFFNUB.js → chunk-5XUEYLPX.js} +1 -1
- package/dist/chunks/{chunk-WUZD4KBL.js → chunk-6BWY63F2.js} +1 -1
- package/dist/chunks/{chunk-3B4P7YHO.js → chunk-6H37RZR4.js} +1 -1
- package/dist/chunks/chunk-6UV6HXVD.js +8 -0
- package/dist/chunks/{chunk-JM3BFUXX.js → chunk-7IU5MZY3.js} +1 -1
- package/dist/chunks/{chunk-E3EJLJFQ.js → chunk-7K5WQAIL.js} +1 -1
- package/dist/chunks/{chunk-KCARCOP5.js → chunk-7QZ3V4GA.js} +1 -1
- package/dist/chunks/{chunk-RMYQX7NP.js → chunk-APMYUYG3.js} +1 -1
- package/dist/chunks/{chunk-YMVDWVMO.js → chunk-ARM6TNWM.js} +1 -1
- package/dist/chunks/{chunk-M5Y335WI.js → chunk-B3CNVVZG.js} +1 -1
- package/dist/chunks/{chunk-UO2ECTIU.js → chunk-BN3XAVPG.js} +1 -1
- package/dist/chunks/{chunk-B6PMTBCU.js → chunk-C7FA3F6Y.js} +1 -1
- package/dist/chunks/chunk-CMMKTIUX.js +7 -0
- package/dist/chunks/{chunk-3HLNS2I4.js → chunk-DQKTW6TS.js} +4 -4
- package/dist/chunks/{chunk-OCWSKPV4.js → chunk-DT3EUC6S.js} +2 -2
- package/dist/chunks/{chunk-Y7PHTVZ6.js → chunk-ELOOLQEA.js} +1 -1
- package/dist/chunks/{chunk-FZKWLGRG.js → chunk-EMDAZAWN.js} +1 -1
- package/dist/chunks/{chunk-TAG2AZXS.js → chunk-EXTNOWQX.js} +1 -1
- package/dist/chunks/{chunk-DKV4IVH5.js → chunk-FCQ4OFIG.js} +1 -1
- package/dist/chunks/{chunk-ZKYS7EAB.js → chunk-FMIOMNT4.js} +1 -1
- package/dist/chunks/{chunk-D2ZPYXZ6.js → chunk-FPGLRLJB.js} +1 -1
- package/dist/chunks/{chunk-TTMLSKF7.js → chunk-FUYYSBG6.js} +1 -1
- package/dist/chunks/chunk-G6DJSRIM.js +7 -0
- package/dist/chunks/{chunk-MDZ2JJP3.js → chunk-GBPKXYFF.js} +3 -3
- package/dist/chunks/{chunk-U6AYMUHX.js → chunk-GS56NXBA.js} +4 -4
- package/dist/chunks/{chunk-QLS2XUFL.js → chunk-GT6CQWQC.js} +1 -1
- package/dist/chunks/{chunk-WWB66KP5.js → chunk-H24CDOLQ.js} +1 -1
- package/dist/chunks/chunk-HNGB3J6J.js +9 -0
- package/dist/chunks/{chunk-7CTHRXTG.js → chunk-HNQC4E2A.js} +2 -2
- package/dist/chunks/{chunk-VCB6KNW3.js → chunk-HQ3OQQIJ.js} +1 -1
- package/dist/chunks/{chunk-2R6NQXTQ.js → chunk-HWPICTAW.js} +1 -1
- package/dist/chunks/chunk-I3JY5FFO.js +9 -0
- package/dist/chunks/{chunk-IS43O66T.js → chunk-IJMVTAUG.js} +1 -1
- package/dist/chunks/chunk-IZPS6TSQ.js +9 -0
- package/dist/chunks/{chunk-CN4SCEIP.js → chunk-J4GDZSR6.js} +1 -1
- package/dist/chunks/{chunk-25LSRUTF.js → chunk-JT3YGQNY.js} +1 -1
- package/dist/chunks/{chunk-DV4Z4WSD.js → chunk-LIQM7J3Q.js} +1 -1
- package/dist/chunks/{chunk-MEAY2K5Z.js → chunk-LN3L5MUD.js} +1 -1
- package/dist/chunks/{chunk-3RV2B7D3.js → chunk-LRARKX6U.js} +1 -1
- package/dist/chunks/chunk-LYGUPV4A.js +7 -0
- package/dist/chunks/{chunk-TTKDYUJD.js → chunk-MDPHTALV.js} +4 -4
- package/dist/chunks/{chunk-YXTE2H6I.js → chunk-METJ7TPN.js} +1 -1
- package/dist/chunks/{chunk-NR367IWV.js → chunk-MOZORTXV.js} +1 -1
- package/dist/chunks/{chunk-JZUVWAOK.js → chunk-NQKUT3UM.js} +2 -2
- package/dist/chunks/{chunk-N3N5UHIL.js → chunk-OT7KL3CN.js} +1 -1
- package/dist/chunks/{chunk-EQ52F4LH.js → chunk-P7YEHZCP.js} +1 -1
- package/dist/chunks/{chunk-7QVVD3WT.js → chunk-PK44ANGQ.js} +1 -1
- package/dist/chunks/{chunk-UFZ4W2PA.js → chunk-QKSHLX2T.js} +1 -1
- package/dist/chunks/{chunk-QVAZWF3J.js → chunk-QS4HMEHM.js} +1 -1
- package/dist/chunks/{chunk-WSZHNPA6.js → chunk-R4XQKQFD.js} +1 -1
- package/dist/chunks/{chunk-5ENY7DSN.js → chunk-SUQDXU5Q.js} +1 -1
- package/dist/chunks/{chunk-YXBDDHPL.js → chunk-TAIDD65X.js} +1 -1
- package/dist/chunks/{chunk-BEGUGOL7.js → chunk-UIYOY4VY.js} +1 -1
- package/dist/chunks/chunk-UJRKHDLO.js +7 -0
- package/dist/chunks/{chunk-65JYSI26.js → chunk-UZCUQNR2.js} +1 -1
- package/dist/chunks/{chunk-HJ3E752K.js → chunk-VCLA7W76.js} +1 -1
- package/dist/chunks/{chunk-WH6M54KF.js → chunk-VRDAMDMZ.js} +3 -3
- package/dist/chunks/{chunk-BHVHQKUZ.js → chunk-WWIZKLDF.js} +1 -1
- package/dist/chunks/{chunk-JAJW3P42.js → chunk-XGGZRQRW.js} +1 -1
- package/dist/chunks/{chunk-LAYFSD5A.js → chunk-XYPCSFQH.js} +1 -1
- package/dist/chunks/{chunk-UTVDFSQS.js → chunk-Y2TKN7DM.js} +1 -1
- package/dist/chunks/{chunk-O7G3CZ42.js → chunk-YIWCEDDM.js} +1 -1
- package/dist/chunks/{chunk-QFPCR4NL.js → chunk-ZQAKHK55.js} +1 -1
- package/dist/chunks/{clear-AZWSIGIF.js → clear-XPCPE7IB.js} +1 -1
- package/dist/chunks/{compile-vercel-config-56X2X4Z3.js → compile-vercel-config-T3UH6HUK.js} +1 -1
- package/dist/chunks/config-57JYCPQE.js +7 -0
- package/dist/chunks/{config-NGVEJABO.js → config-RUQTGUAU.js} +1 -1
- package/dist/chunks/{delete-LX44AJYC.js → delete-AQLS65EZ.js} +1 -1
- package/dist/chunks/{delete-TA6UVDSJ.js → delete-YEG4PO32.js} +1 -1
- package/dist/chunks/{detect-projects-LEVGWMQE.js → detect-projects-325QE23N.js} +1 -1
- package/dist/chunks/{detect-services-KO3GQ2ZK.js → detect-services-O5R4LQYE.js} +1 -1
- package/dist/chunks/{disable-E7TU3QIX.js → disable-2IMTXHPN.js} +1 -1
- package/dist/chunks/{discard-SVF5HBYG.js → discard-LGTYXVWA.js} +1 -1
- package/dist/chunks/{edit-VCOF42GW.js → edit-5SAXFIIQ.js} +1 -1
- package/dist/chunks/{edit-2RLFRAOJ.js → edit-FLQUQJRB.js} +1 -1
- package/dist/chunks/{enable-H6RL2XIW.js → enable-ZU4EEGQU.js} +1 -1
- package/dist/chunks/{export-JW3FFP7N.js → export-YJLMAKU6.js} +1 -1
- package/dist/chunks/{future-IGDV62BF.js → future-GCRZEKNU.js} +1 -1
- package/dist/chunks/{generate-cert-for-deploy-25UQ2477.js → generate-cert-for-deploy-C2MZFJSD.js} +1 -1
- package/dist/chunks/{image-MHAVMOJB.js → image-TBIQVQTJ.js} +1 -1
- package/dist/chunks/{import-builders-5UODCCVF.js → import-builders-VIQ3AQKA.js} +1 -1
- package/dist/chunks/{inspect-HJF2XFBX.js → inspect-BCJ4576B.js} +1 -1
- package/dist/chunks/{inspect-43UJHR4K.js → inspect-DYSG64DM.js} +1 -1
- package/dist/chunks/{inspect-KBJ7F64J.js → inspect-EJGQIBO6.js} +1 -1
- package/dist/chunks/{inspect-LIGFVYDM.js → inspect-UBQLT7TK.js} +1 -1
- package/dist/chunks/{inspect-VETXDYUD.js → inspect-ZY7JD2NB.js} +1 -1
- package/dist/chunks/{list-EGYYRTG5.js → list-ACZ53KGA.js} +1 -1
- package/dist/chunks/{list-NAABRL7N.js → list-KILCIYI3.js} +1 -1
- package/dist/chunks/{list-KAGIR3PD.js → list-RSBMDKH3.js} +1 -1
- package/dist/chunks/{login-MZ67I5ZB.js → login-LEHHYIMB.js} +1 -1
- package/dist/chunks/{login-X3KPMMEP.js → login-XLBBDBF5.js} +1 -1
- package/dist/chunks/{logs-GHHH2DZA.js → logs-GGM6OIP5.js} +1 -1
- package/dist/chunks/{ls-MMA5XS6S.js → ls-7RJVN7NA.js} +1 -1
- package/dist/chunks/{ls-YA4OQL3F.js → ls-CXCMINIH.js} +1 -1
- package/dist/chunks/{ls-7JFKEA5P.js → ls-E52ZQKU2.js} +1 -1
- package/dist/chunks/{ls-GOLB26ER.js → ls-EYIOIUW4.js} +1 -1
- package/dist/chunks/{ls-UAQ2QDGG.js → ls-PMZQBH7M.js} +1 -1
- package/dist/chunks/{ls-JHJPWFMF.js → ls-TZZHYEUP.js} +1 -1
- package/dist/chunks/{ls-QXEB3MBD.js → ls-UANS2YOR.js} +1 -1
- package/dist/chunks/{mutate-AJYMI5UB.js → mutate-LDKQTMVQ.js} +1 -1
- package/dist/chunks/{notifications-DKZMDRHS.js → notifications-TNNPHJ2A.js} +1 -1
- package/dist/chunks/{open-L5DJKOV4.js → open-XULXWO4J.js} +1 -1
- package/dist/chunks/{openapi-7JUPKBWV.js → openapi-VOEHNJDC.js} +1 -1
- package/dist/chunks/{permissions-BRSVLT6O.js → permissions-BJCB363U.js} +1 -1
- package/dist/chunks/{prompt-missing-credentials-PPUSNDNC.js → prompt-missing-credentials-XYATS6AR.js} +1 -1
- package/dist/chunks/{publish-PXKC5GXE.js → publish-RHYABJG2.js} +1 -1
- package/dist/chunks/{pull-ZBELCNJJ.js → pull-Z7HGCSCC.js} +1 -1
- package/dist/chunks/{purchase-domain-if-available-BI7AHJMX.js → purchase-domain-if-available-METET7NV.js} +1 -1
- package/dist/chunks/{push-G4JYPC5S.js → push-K6JZXF3F.js} +1 -1
- package/dist/chunks/{query-JGUDFRPJ.js → query-IRE2AHWJ.js} +1 -1
- package/dist/chunks/{reauthenticate-DIFJZWC5.js → reauthenticate-SKNZW44L.js} +1 -1
- package/dist/chunks/{reorder-VTFBS2DW.js → reorder-XA4D4ETX.js} +1 -1
- package/dist/chunks/{reply-HXGAMNR6.js → reply-2J6FSDE3.js} +1 -1
- package/dist/chunks/{resolve-IGQSKGRI.js → resolve-LPG666BQ.js} +1 -1
- package/dist/chunks/{resolve-deployment-framework-preset-XF3NJIDS.js → resolve-deployment-framework-preset-QEPJNWVF.js} +1 -1
- package/dist/chunks/{restore-XKLJMOKB.js → restore-AUJYHVXJ.js} +1 -1
- package/dist/chunks/{rm-C2OYOAJY.js → rm-K72H7VZV.js} +1 -1
- package/dist/chunks/{rm-3REOGKTJ.js → rm-OWKRDHCM.js} +1 -1
- package/dist/chunks/{rm-DTF2JN5L.js → rm-RKSFOTDA.js} +1 -1
- package/dist/chunks/{rm-DL7NRDLF.js → rm-RUYNLXQI.js} +1 -1
- package/dist/chunks/{rm-SQM4TQOV.js → rm-ZQVXKO7U.js} +1 -1
- package/dist/chunks/{rule-inspect-PQUJOWHR.js → rule-inspect-GLIMHHLI.js} +1 -1
- package/dist/chunks/{rules-IX7WN6XW.js → rules-DKX7ZITE.js} +1 -1
- package/dist/chunks/{schema-WFKR7ULE.js → schema-4I7CTH47.js} +1 -1
- package/dist/chunks/{schema-R2J4TS6Q.js → schema-DR4YJJXD.js} +1 -1
- package/dist/chunks/{select-org-6AA7XX6E.js → select-org-6HKDVPLO.js} +1 -1
- package/dist/chunks/set-5B652FAX.js +7 -0
- package/dist/chunks/setup-and-link-YJDTNH73.js +7 -0
- package/dist/chunks/{tags-FE4GVQQO.js → tags-COAUKFHG.js} +1 -1
- package/dist/chunks/{types-UYIFBCCL.js → types-JMTJJVOR.js} +1 -1
- package/dist/chunks/{update-27EMACWZ.js → update-J5LPVY6R.js} +1 -1
- package/dist/chunks/{vlt-builder-importer-QEWS6M2P.js → vlt-builder-importer-W63QEXYX.js} +2 -2
- package/dist/commands/build/index.js +1 -1
- package/dist/commands/deploy/index.js +9 -9
- 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-bulk.js +37 -36
- package/dist/index.js +2 -2
- package/dist/internal-build-worker.js +2 -2
- package/dist/vc.js +1 -1
- package/dist/version.mjs +1 -1
- package/package.json +58 -58
- package/dist/chunks/chunk-5U25FWD5.js +0 -8
- package/dist/chunks/chunk-5UOVEMYX.js +0 -7
- package/dist/chunks/chunk-CVKB54WW.js +0 -7
- package/dist/chunks/chunk-GL7HB5ZK.js +0 -7
- package/dist/chunks/chunk-KK4AJES5.js +0 -36
- package/dist/chunks/chunk-KOOED3TJ.js +0 -9
- package/dist/chunks/chunk-N5AIKGEO.js +0 -9
- package/dist/chunks/chunk-SW7MNF4H.js +0 -7
- package/dist/chunks/chunk-V54UKUGF.js +0 -7
- package/dist/chunks/config-A53AXEGB.js +0 -7
- package/dist/chunks/set-763MJP2G.js +0 -7
- package/dist/chunks/setup-and-link-57NI3GOM.js +0 -7
|
@@ -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{agentErrorMetadata,buildCommandWithGlobalFlags,getErrorRecovery,observabilityPlusRecovery,trackAgentError}from"./chunk-
|
|
7
|
+
import{agentErrorMetadata,buildCommandWithGlobalFlags,getErrorRecovery,observabilityPlusRecovery,trackAgentError}from"./chunk-7QZ3V4GA.js";import{isAPIError}from"./chunk-RINZXCDJ.js";import{output_manager_default}from"./chunk-EWWFNMPZ.js";function getRollupColumnName(metric,aggregation){return`${metric}_${aggregation}`.replace(/[./]/g,"_")}function getResolvedOrderMetadata(query,response){let orderBy=query.orderBy??(response.orderBy?"count":void 0),orderDirection=response.orderDirection??query.orderDirection;return{...orderBy?{orderBy}:{},...orderDirection?{orderDirection}:{}}}function formatQueryJson(query,response){let orderMetadata=getResolvedOrderMetadata(query,response),queryWithResponseMetadata={...query,...orderMetadata};return JSON.stringify({query:queryWithResponseMetadata,summary:response.summary??[],data:response.data??[],...orderMetadata},null,2)}function formatErrorJson(code,message,allowedValues,recovery={}){let error={code,message};return allowedValues&&allowedValues.length>0&&(error.allowedValues=allowedValues),JSON.stringify({error:{...error,...recovery}},null,2)}function handleApiError(err,jsonOutput,client,overrides={}){let code,message,override=overrides[err.status];if(override)code=override.code||err.code||"BAD_REQUEST",message=override.message;else switch(err.status){case 402:code=err.code||"PAYMENT_REQUIRED",message=err.serverMessage||"This feature requires an Observability Plus subscription.";break;case 429:code=err.code||"RATE_LIMITED",message=err.serverMessage||"You have reached the metrics query rate limit. Please wait and try again. If you need a higher limit, request one from your Vercel account team.";break;case 403:code="FORBIDDEN",message=err.serverMessage&&err.serverMessage!=="Response Error"?err.serverMessage:"You do not have permission to query metrics for this project/team.";break;case 500:code="INTERNAL_ERROR",message="An internal error occurred. Please try again later.";break;case 504:code="TIMEOUT",message="The query timed out. Try a shorter time range or fewer groups.";break;case 400:code=err.code||"BAD_REQUEST",message=err.serverMessage||`API error (${err.status})`;break;default:code=err.code||"BAD_REQUEST",message=err.serverMessage||`API error (${err.status})`}let recovery=getErrorRecovery({...err,serverMessage:message},client),billing=err.status===402?observabilityPlusRecovery(message):void 0,next=billing?.command?[{command:buildCommandWithGlobalFlags(client.argv.filter(arg=>!/^(?:--yes|--force|-y)(?:=|$)/.test(arg)),billing.command),when:billing.when}]:void 0,details={...recovery,...next&&{next},...agentErrorMetadata(client)};if(trackAgentError(client,{reason:err.status===403?"forbidden":err.status===402?"payment_required":err.status===429?"rate_limited":code,...recovery}),jsonOutput||client.nonInteractive)client.stdout.write(formatErrorJson(code,message,err.allowedValues,details));else{output_manager_default.fatal(message),recovery.hint&&output_manager_default.print(` ${recovery.hint}
|
|
8
8
|
`);for(let step of next??[])output_manager_default.print(` ${step.command}
|
|
9
9
|
`);err.allowedValues&&err.allowedValues.length>0&&output_manager_default.print(`
|
|
10
10
|
Available values: ${err.allowedValues.join(", ")}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { createRequire as __createRequire } from 'node:module';
|
|
2
|
+
import { fileURLToPath as __fileURLToPath } from 'node:url';
|
|
3
|
+
import { dirname as __dirname_ } from 'node:path';
|
|
4
|
+
const require = __createRequire(import.meta.url);
|
|
5
|
+
const __filename = __fileURLToPath(import.meta.url);
|
|
6
|
+
const __dirname = __dirname_(__filename);
|
|
7
|
+
import{formatOption,jsonOption,projectOption,yesOption}from"./chunk-XGGZRQRW.js";import{packageName}from"./chunk-FI772UVH.js";var builtInBody={type:"built-in",name:"Production server errors",triggers:{mode:"selected",items:[{type:"error_anomaly",filter:"statusGroup:5xx AND route:/api/*"}]},matchMinimumSeverityLevel:"high"},patchBody={name:"Critical production errors",matchMinimumSeverityLevel:"critical"},authoringReference={title:"Authoring reference",body:["vercel alerts rules schema --type built-in"]},rulesAddHelpSections=[{title:"Scope",body:["Provide ruleScope in the body or use a scope flag, not both.","--project maps to one included project.","--all maps to every project in the team."]},{title:"Built-in body (rule.json)",body:[...JSON.stringify(builtInBody,null,2).split(`
|
|
8
|
+
`),"","vercel alerts rules add --project my-app --body ./rule.json"]},authoringReference],rulesUpdateHelpSections=[{title:"Update body",body:["Include only the fields to change. type is optional and inferred from the stored rule.","Use --project or --all to change scope with or without --body.","Do not combine a ruleScope field in the body with --project or --all.","--all moves the rule to team-wide scope."]},{title:"Partial body (patch.json)",body:[...JSON.stringify(patchBody,null,2).split(`
|
|
9
|
+
`),"","vercel alerts rules update ar_abc123 --body ./patch.json","vercel alerts rules update ar_abc123 --project my-app"]},authoringReference];var projectScopeOption={...projectOption,shorthand:"p",description:"Use a project by name or ID"},listAllOption={name:"all",shorthand:"a",type:Boolean,deprecated:!1,description:"List all accessible rules in the selected team"},mutationAllOption={...listAllOption,description:"Apply the rule to all projects in the selected team"},deprecatedItemScopeOptions=[{...projectScopeOption,deprecated:!0},{...listAllOption,deprecated:!0}],bodyOption={name:"body",shorthand:null,type:String,argument:"PATH",deprecated:!1,description:"Read the alert rule body from a JSON file"},rulesLsSubcommand={name:"ls",aliases:["list"],description:"List alert rules for a project or team",arguments:[],options:[projectScopeOption,listAllOption,{name:"type",shorthand:null,type:[String],argument:"TYPE",deprecated:!1,description:"Filter by rule type"},formatOption,jsonOption],examples:[{name:"List rules affecting the linked project",value:`${packageName} alerts rules ls`},{name:"List all rules in the selected team",value:`${packageName} alerts rules ls --all`},{name:"Write JSON output",value:`${packageName} alerts rules ls --all --json`}]},rulesSchemaSubcommand={name:"schema",aliases:[],description:"Show alert rule request fields and examples",arguments:[],options:[{name:"type",shorthand:null,type:String,argument:"TYPE",deprecated:!1,description:"Rule type to describe"},formatOption],examples:[{name:"List supported rule types",value:`${packageName} alerts rules schema`},{name:"Show the built-in rule schema",value:`${packageName} alerts rules schema --type built-in`}]},rulesAddSubcommand={name:"add",aliases:["create"],description:"Create an alert rule from a JSON body",helpSections:rulesAddHelpSections,arguments:[],options:[projectScopeOption,mutationAllOption,formatOption,jsonOption,bodyOption],examples:[{name:"Create a project-scoped rule",value:`${packageName} alerts rules add --project my-app --body ./rule.json`},{name:"Create a team-wide built-in rule",value:`${packageName} alerts rules add --all --body ./rule.json`}]},rulesInspectSubcommand={name:"inspect",aliases:["get"],description:"Show one alert rule by ID",arguments:[{name:"ruleId",required:!0}],options:[...deprecatedItemScopeOptions,formatOption,jsonOption],examples:[{name:"Inspect a rule",value:`${packageName} alerts rules inspect ar_abc123`},{name:"Write JSON output",value:`${packageName} alerts rules inspect ar_abc123 --json`}]},rulesRmSubcommand={name:"rm",aliases:["remove","delete"],description:"Delete an alert rule",arguments:[{name:"ruleId",required:!0}],options:[...deprecatedItemScopeOptions,formatOption,jsonOption,yesOption],examples:[{name:"Delete with confirmation",value:`${packageName} alerts rules rm ar_abc123`},{name:"Delete without a prompt",value:`${packageName} alerts rules rm ar_abc123 --yes`}]},rulesUpdateSubcommand={name:"update",aliases:["patch"],description:"Patch an alert rule or change its scope",helpSections:rulesUpdateHelpSections,arguments:[{name:"ruleId",required:!0}],options:[projectScopeOption,mutationAllOption,formatOption,jsonOption,{...bodyOption,description:"Read the partial update body from a JSON file"}],examples:[{name:"Update fields from a file",value:`${packageName} alerts rules update ar_abc123 --body ./patch.json`},{name:"Move a rule to a project",value:`${packageName} alerts rules update ar_abc123 --project my-app`}]},notificationTargetOptions=[{name:"webhook",shorthand:null,type:String,argument:"WEBHOOK_ID",deprecated:!1,description:"Select an account webhook by ID"},{name:"slack-channel",shorthand:null,type:String,argument:"CHANNEL_ID",deprecated:!1,description:"Select a Slack channel by ID"},{name:"slack-installation-id",shorthand:null,type:String,argument:"INSTALLATION_ID",deprecated:!1,description:"Slack installation ID. Optional only when the team has exactly one completed Slack installation."}],criticalOnlyOption={name:"critical-only",shorthand:null,type:Boolean,deprecated:!1,description:"Notify only when Vercel Agent escalates an alert to Critical"},noCriticalOnlyOption={name:"no-critical-only",shorthand:null,type:Boolean,deprecated:!1,description:"Deliver every alert matched by the rule"},rulesNotificationsLsSubcommand={name:"ls",aliases:["list"],default:!0,description:"List notification destinations for all readable rules or one alert rule",arguments:[{name:"ruleId",required:!1}],options:[formatOption,jsonOption],examples:[{name:"List notification destinations for all readable rules",value:`${packageName} alerts rules notifications ls`},{name:"List notification destinations for one rule",value:`${packageName} alerts rules notifications ls ar_abc123`},{name:"Write JSON output",value:`${packageName} alerts rules notifications ar_abc123 --json`}]},rulesNotificationsLinkSubcommand={name:"link",aliases:[],description:"Link a Slack channel or account webhook to an alert rule",arguments:[{name:"<ruleId>",required:!0}],options:[...notificationTargetOptions,criticalOnlyOption,formatOption,jsonOption],examples:[{name:"Link a Slack channel",value:`${packageName} alerts rules notifications link ar_abc123 --slack-channel C123`},{name:"Link a Slack channel from a specific installation",value:`${packageName} alerts rules notifications link ar_abc123 --slack-channel C123 --slack-installation-id icfg_abc123`},{name:"Link a webhook",value:`${packageName} alerts rules notifications link ar_abc123 --webhook wh_abc123`},{name:"Link a Critical-only webhook",value:`${packageName} alerts rules notifications link ar_abc123 --webhook wh_abc123 --critical-only`}]},rulesNotificationsUpdateSubcommand={name:"update",aliases:["patch"],description:"Update a notification destination's delivery setting",arguments:[{name:"<ruleId>",required:!0}],options:[...notificationTargetOptions,criticalOnlyOption,noCriticalOnlyOption,formatOption,jsonOption],examples:[{name:"Restrict a Slack channel to Critical alerts",value:`${packageName} alerts rules notifications update ar_abc123 --slack-channel C123 --critical-only`},{name:"Restore delivery for every alert matched by the rule",value:`${packageName} alerts rules notifications update ar_abc123 --webhook wh_abc123 --no-critical-only`}]},rulesNotificationsUnlinkSubcommand={name:"unlink",aliases:[],description:"Unlink a Slack channel or account webhook from an alert rule",arguments:[{name:"<ruleId>",required:!0}],options:[...notificationTargetOptions,formatOption,jsonOption],examples:[{name:"Unlink a Slack channel",value:`${packageName} alerts rules notifications unlink ar_abc123 --slack-channel C123`},{name:"Unlink a webhook",value:`${packageName} alerts rules notifications unlink ar_abc123 --webhook wh_abc123`}]},rulesNotificationsAggregateCommand={name:"notifications",aliases:[],description:"List and manage linked Slack and webhook destinations for alert rules",arguments:[],subcommands:[rulesNotificationsLsSubcommand,rulesNotificationsLinkSubcommand,rulesNotificationsUpdateSubcommand,rulesNotificationsUnlinkSubcommand],options:[formatOption,jsonOption],examples:[{name:"List destinations for all readable rules",value:`${packageName} alerts rules notifications`},{name:"List destinations for one rule",value:`${packageName} alerts rules notifications ar_abc123`},{name:"Link Slack with the team's only installation",value:`${packageName} alerts rules notifications link ar_abc123 --slack-channel C123`}]},rulesAggregateCommand={name:"rules",aliases:[],description:"Create, inspect, list, update, and delete alert rules and manage their notification destinations",arguments:[],subcommands:[rulesLsSubcommand,rulesSchemaSubcommand,rulesAddSubcommand,rulesInspectSubcommand,rulesRmSubcommand,rulesUpdateSubcommand,rulesNotificationsAggregateCommand],options:[],examples:[{name:"List rules for the linked project",value:`${packageName} alerts rules ls`},{name:"Add a rule",value:`${packageName} alerts rules add --project my-app --body ./rule.json`},{name:"Inspect a rule",value:`${packageName} alerts rules inspect ar_abc123`},{name:"Update a rule",value:`${packageName} alerts rules update ar_abc123 --body ./patch.json`},{name:"Delete a rule",value:`${packageName} alerts rules rm ar_abc123`},{name:"List notification destinations for a rule",value:`${packageName} alerts rules notifications ar_abc123`}]};export{rulesLsSubcommand,rulesSchemaSubcommand,rulesAddSubcommand,rulesInspectSubcommand,rulesRmSubcommand,rulesUpdateSubcommand,rulesNotificationsLsSubcommand,rulesNotificationsLinkSubcommand,rulesNotificationsUpdateSubcommand,rulesNotificationsUnlinkSubcommand,rulesNotificationsAggregateCommand,rulesAggregateCommand};
|
|
@@ -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-N6CNMMSZ.js";import{require_lib}from"./chunk-
|
|
7
|
+
import{require_json_parse_better_errors}from"./chunk-N6CNMMSZ.js";import{require_lib}from"./chunk-MDPHTALV.js";import{CantParseJSONFile}from"./chunk-RINZXCDJ.js";import{require_dist}from"./chunk-QGIQK47P.js";import{__toESM}from"./chunk-6L236MNA.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};
|