vercel 59.25.4 → 60.0.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.
Files changed (129) hide show
  1. package/dist/chunks/{add-B6SKHP6R.js → add-7OUJAZIH.js} +1 -1
  2. package/dist/chunks/{add-6MVD3GYU.js → add-D4E2N3HU.js} +1 -1
  3. package/dist/chunks/{add-Y34MSA3T.js → add-UG57LDJR.js} +1 -1
  4. package/dist/chunks/{build-PC5EQP2P.js → build-VSV5LVJK.js} +1 -1
  5. package/dist/chunks/{chunk-GJZRIDFC.js → chunk-3YOA3ODU.js} +1 -1
  6. package/dist/chunks/chunk-4JFQYK65.js +9 -0
  7. package/dist/chunks/{chunk-F7UV4YLV.js → chunk-4VFDQB4H.js} +2 -2
  8. package/dist/chunks/{chunk-P6C5L7KC.js → chunk-4XAIK5CI.js} +3 -3
  9. package/dist/chunks/{chunk-Q6O7GA7P.js → chunk-5B3BHCFE.js} +1 -1
  10. package/dist/chunks/{chunk-NBVY237X.js → chunk-5ENY7DSN.js} +1 -1
  11. package/dist/chunks/{chunk-CDK22NA2.js → chunk-5JFBDZTI.js} +1 -1
  12. package/dist/chunks/{chunk-Q22JZSWD.js → chunk-5LH3CZMJ.js} +1 -1
  13. package/dist/chunks/chunk-5UOVEMYX.js +7 -0
  14. package/dist/chunks/{chunk-OICV3NTQ.js → chunk-5WW7LFI6.js} +1 -1
  15. package/dist/chunks/{chunk-4M7CX4YK.js → chunk-AH3A52IK.js} +1 -1
  16. package/dist/chunks/{chunk-JUUECT2E.js → chunk-ECJKSW62.js} +1 -1
  17. package/dist/chunks/{chunk-VTQUMQ2P.js → chunk-EWSS6LUE.js} +1 -1
  18. package/dist/chunks/{chunk-3YEWE5MO.js → chunk-FFQ2SDHN.js} +1 -1
  19. package/dist/chunks/{chunk-DUZUOQVB.js → chunk-I7PARON4.js} +1 -1
  20. package/dist/chunks/{chunk-XJUAWZU2.js → chunk-IAS5LONF.js} +1 -1
  21. package/dist/chunks/{chunk-M3HTK4NR.js → chunk-JC4FG6EW.js} +1 -1
  22. package/dist/chunks/{chunk-TOHAMRDX.js → chunk-JMNAVONO.js} +1 -1
  23. package/dist/chunks/{chunk-QMO7LJLU.js → chunk-JSVZKMZO.js} +1 -1
  24. package/dist/chunks/{chunk-TFG7RTGQ.js → chunk-KDKSYHTU.js} +1 -1
  25. package/dist/chunks/{chunk-47BI2WLV.js → chunk-LTFVLQEF.js} +1 -1
  26. package/dist/chunks/{chunk-TGR6YHGO.js → chunk-MCZNQE4G.js} +1 -1
  27. package/dist/chunks/{chunk-ZY3FVURC.js → chunk-MNR5YQDP.js} +1 -1
  28. package/dist/chunks/{chunk-Q7UVAEN3.js → chunk-MRSU4C5C.js} +1 -1
  29. package/dist/chunks/{chunk-UOHEF2JZ.js → chunk-MWU4ZPZ4.js} +4 -4
  30. package/dist/chunks/{chunk-4NAYJHLI.js → chunk-PGHEHRSM.js} +1 -1
  31. package/dist/chunks/{chunk-643SKD3D.js → chunk-PNY65NDD.js} +1 -1
  32. package/dist/chunks/chunk-QFPCR4NL.js +7 -0
  33. package/dist/chunks/{chunk-FVIQMWYR.js → chunk-QXC2G7JY.js} +1 -1
  34. package/dist/chunks/{chunk-UWLDK7LJ.js → chunk-REONGB6P.js} +1 -1
  35. package/dist/chunks/chunk-SW7MNF4H.js +7 -0
  36. package/dist/chunks/{chunk-MAWP4YIY.js → chunk-TH2WHOUV.js} +1 -1
  37. package/dist/chunks/{chunk-WKZ6JSGZ.js → chunk-TKBORMUF.js} +1 -1
  38. package/dist/chunks/{chunk-T6A5HA5U.js → chunk-TQLNWAJY.js} +1 -1
  39. package/dist/chunks/{chunk-26LYRNMQ.js → chunk-TUVMXISG.js} +2 -2
  40. package/dist/chunks/{chunk-PSPKPQRS.js → chunk-TZN45RBM.js} +1 -1
  41. package/dist/chunks/{chunk-EIXOJUNN.js → chunk-UTVDFSQS.js} +1 -1
  42. package/dist/chunks/chunk-VHTNAYWA.js +7 -0
  43. package/dist/chunks/{chunk-GA65WALP.js → chunk-VVWALKUM.js} +1 -1
  44. package/dist/chunks/chunk-WSZHNPA6.js +7 -0
  45. package/dist/chunks/{chunk-MXCU7XDC.js → chunk-WTAM6QXM.js} +1 -1
  46. package/dist/chunks/{chunk-TF6R2AK2.js → chunk-XU4ETL7O.js} +1 -1
  47. package/dist/chunks/{chunk-UFFYFZAM.js → chunk-Y4GI6BXT.js} +1 -1
  48. package/dist/chunks/{chunk-6LE3FU2P.js → chunk-Y7PHTVZ6.js} +1 -1
  49. package/dist/chunks/{chunk-AKZOYEBP.js → chunk-YJZFFNUB.js} +4 -6
  50. package/dist/chunks/{clear-HVRCYR7Y.js → clear-NUMBAODD.js} +1 -1
  51. package/dist/chunks/{compile-vercel-config-C6HK4CET.js → compile-vercel-config-75XN6ZKP.js} +1 -1
  52. package/dist/chunks/{config-IGE3P5DW.js → config-26RISHPB.js} +1 -1
  53. package/dist/chunks/{config-OWBQ7UMH.js → config-Q6V74NTU.js} +1 -1
  54. package/dist/chunks/config-validator.mjs +1 -1
  55. package/dist/chunks/{constants-G4UYVLOF.js → constants-NCE2LWSS.js} +1 -1
  56. package/dist/chunks/{delete-7TLDNY3R.js → delete-LGIPH2II.js} +1 -1
  57. package/dist/chunks/{delete-44OXGSMJ.js → delete-PWVNXN4N.js} +1 -1
  58. package/dist/chunks/{detect-projects-MUTN7PJG.js → detect-projects-3AFQ2AC5.js} +1 -1
  59. package/dist/chunks/{detect-services-YFGQZSKL.js → detect-services-EX5ZTO5D.js} +1 -1
  60. package/dist/chunks/{disable-CAXQ5K7P.js → disable-62HLGVJG.js} +1 -1
  61. package/dist/chunks/{discard-VK4JVVUI.js → discard-LYY4AMIA.js} +1 -1
  62. package/dist/chunks/{edit-QQYOUSYT.js → edit-E6AMU6OJ.js} +1 -1
  63. package/dist/chunks/{edit-OUEGHFNI.js → edit-FEZFLAIJ.js} +1 -1
  64. package/dist/chunks/{enable-J3JXIEXT.js → enable-QDIH43E3.js} +1 -1
  65. package/dist/chunks/{export-V6BO2IPM.js → export-FO5JCAB4.js} +1 -1
  66. package/dist/chunks/{generate-cert-for-deploy-MICLCYMH.js → generate-cert-for-deploy-FG57HLGC.js} +1 -1
  67. package/dist/chunks/{image-2XS5KWHL.js → image-LZ32HAQV.js} +1 -1
  68. package/dist/chunks/{import-builders-P5BVQ6XV.js → import-builders-SELE5VYE.js} +1 -1
  69. package/dist/chunks/{inspect-XASVKP45.js → inspect-22LMAKCS.js} +1 -1
  70. package/dist/chunks/{inspect-NGKRKYFJ.js → inspect-BUNQSUCN.js} +1 -1
  71. package/dist/chunks/{inspect-WEURPPD2.js → inspect-D2S5CEPW.js} +1 -1
  72. package/dist/chunks/{inspect-4BJNJTCC.js → inspect-LGQ44GYB.js} +1 -1
  73. package/dist/chunks/{inspect-FFSXZNJX.js → inspect-XWT4QQRM.js} +1 -1
  74. package/dist/chunks/{list-DMNKMHHX.js → list-TXJQFAGW.js} +1 -1
  75. package/dist/chunks/{list-P35Q5I52.js → list-WRQRFVUL.js} +1 -1
  76. package/dist/chunks/{list-WZZJBBRG.js → list-XL4GMICP.js} +1 -1
  77. package/dist/chunks/{login-5OBK5VD6.js → login-QIPGRGDE.js} +1 -1
  78. package/dist/chunks/{logs-VRRUJRHE.js → logs-P4NGHB4I.js} +1 -1
  79. package/dist/chunks/{ls-YLEQL3HD.js → ls-COWL5TXJ.js} +1 -1
  80. package/dist/chunks/{ls-PFPQ4FVQ.js → ls-HTSBFV7C.js} +1 -1
  81. package/dist/chunks/{ls-ZQ7XIDOR.js → ls-JGBNPJEW.js} +1 -1
  82. package/dist/chunks/{ls-KDS7XXBR.js → ls-LOXX7YQ2.js} +1 -1
  83. package/dist/chunks/{ls-URHGCRIJ.js → ls-OCTMGB6C.js} +1 -1
  84. package/dist/chunks/{ls-J6HN2ZV6.js → ls-TXXVAVMF.js} +1 -1
  85. package/dist/chunks/{ls-6RY2JL5Y.js → ls-YTZOJEBT.js} +1 -1
  86. package/dist/chunks/mutate-BZHBI2PK.js +9 -0
  87. package/dist/chunks/notifications-CTNZYZZ2.js +7 -0
  88. package/dist/chunks/{open-A6XQS4I6.js → open-D53RMFUT.js} +1 -1
  89. package/dist/chunks/{permissions-C4UXCLJM.js → permissions-XHGXTFEU.js} +1 -1
  90. package/dist/chunks/{publish-TEH23DH4.js → publish-WTIW7W3Z.js} +1 -1
  91. package/dist/chunks/{pull-75Z4DDJE.js → pull-N5VAKGFJ.js} +1 -1
  92. package/dist/chunks/{purchase-domain-if-available-MMZA2NKN.js → purchase-domain-if-available-ZBXG4E7J.js} +1 -1
  93. package/dist/chunks/{push-MVETL2WL.js → push-ZQWVBEAJ.js} +1 -1
  94. package/dist/chunks/{query-SZHNXTY4.js → query-NNJNXQZG.js} +1 -1
  95. package/dist/chunks/{reorder-QLBFRK7S.js → reorder-64FNHY6J.js} +1 -1
  96. package/dist/chunks/{reply-YAQS5FVC.js → reply-MIJ6C3KT.js} +1 -1
  97. package/dist/chunks/{resolve-HANE4JO2.js → resolve-5HPYDKB4.js} +1 -1
  98. package/dist/chunks/{restore-4JNAT7IE.js → restore-KQ5T3MWQ.js} +1 -1
  99. package/dist/chunks/{rm-JWNSB3XZ.js → rm-C5GXOG3I.js} +1 -1
  100. package/dist/chunks/{rm-CVCPQXJI.js → rm-HZRLQ2FR.js} +1 -1
  101. package/dist/chunks/{rm-ZSFTT5HX.js → rm-S3TN7REH.js} +1 -1
  102. package/dist/chunks/{rm-LYOMGU2M.js → rm-WTUTQK3R.js} +1 -1
  103. package/dist/chunks/{rm-ARC7WDLH.js → rm-ZLKEDKBI.js} +1 -1
  104. package/dist/chunks/{rule-inspect-3RVLM4SD.js → rule-inspect-G4RGKBOI.js} +1 -1
  105. package/dist/chunks/{rules-NYBEYE3C.js → rules-5ECWTZPP.js} +1 -1
  106. package/dist/chunks/{schema-Y7A5YQQX.js → schema-EQCAQVSE.js} +1 -1
  107. package/dist/chunks/{schema-XAUOL37J.js → schema-NERSRSCG.js} +1 -1
  108. package/dist/chunks/{set-CTR3K32H.js → set-7HZRIJ6K.js} +1 -1
  109. package/dist/chunks/{setup-and-link-DHQEQNHY.js → setup-and-link-G4G4JJ6W.js} +1 -1
  110. package/dist/chunks/{tags-Y6NFCY2R.js → tags-JSRGITRJ.js} +1 -1
  111. package/dist/chunks/{update-SPG6HQBN.js → update-4B5AEB2C.js} +1 -1
  112. package/dist/commands/build/index.js +1 -1
  113. package/dist/commands/deploy/index.js +3 -3
  114. package/dist/commands/dev/index.js +20 -17
  115. package/dist/commands/env/index.js +1 -1
  116. package/dist/commands/link/index.js +1 -1
  117. package/dist/commands/list/index.js +1 -1
  118. package/dist/commands-bulk.js +46 -44
  119. package/dist/index.js +1 -1
  120. package/dist/version.mjs +1 -1
  121. package/package.json +54 -53
  122. package/dist/chunks/chunk-3QHJYVCY.js +0 -7
  123. package/dist/chunks/chunk-67ADLWX4.js +0 -7
  124. package/dist/chunks/chunk-AZ6NRDHG.js +0 -7
  125. package/dist/chunks/chunk-GTDDB5H3.js +0 -9
  126. package/dist/chunks/chunk-KUVMCIR4.js +0 -7
  127. package/dist/chunks/chunk-OAKO6LVS.js +0 -7
  128. package/dist/chunks/mutate-YBYD3KNW.js +0 -9
  129. package/dist/chunks/notifications-SB5JHLTX.js +0 -7
@@ -1,7 +0,0 @@
1
- import { createRequire as __createRequire } from 'node:module';
2
- import { fileURLToPath as __fileURLToPath } from 'node:url';
3
- import { dirname as __dirname_ } from 'node:path';
4
- const require = __createRequire(import.meta.url);
5
- const __filename = __fileURLToPath(import.meta.url);
6
- const __dirname = __dirname_(__filename);
7
- import{require_dist}from"./chunk-A5VLP25I.js";import{forceOption,formatOption,jsonOption,projectOption,yesOption}from"./chunk-JAJW3P42.js";import{packageName,require_lib}from"./chunk-FI772UVH.js";import{__toESM}from"./chunk-6L236MNA.js";var import_constants=__toESM(require_dist(),1),import_title=__toESM(require_lib(),1),envTargetChoices=import_constants.PROJECT_ENV_TARGET.map(t=>({name:(0,import_title.default)(t),value:t}));function isValidEnvTarget(target){return typeof target>"u"||envTargetChoices.map(c=>c.value).includes(target)}function getEnvTargetPlaceholder(){return`<${envTargetChoices.map(c=>c.value).join(" | ")}>`}function parseEnvTargetArg(arg){return Array.from(new Set(arg.split(",").map(t=>t.trim()).filter(Boolean)))}var targetPlaceholder=getEnvTargetPlaceholder(),listSubcommand={name:"list",aliases:["ls"],description:"List all Environment Variables for a Project",arguments:[{name:"environment",required:!1},{name:"git-branch",required:!1}],options:[formatOption,jsonOption,projectOption,{name:"guidance",description:"Receive command suggestions once command is complete",shorthand:null,type:Boolean,deprecated:!1}],examples:[]},addSubcommand={name:"add",aliases:[],description:"Add an Environment Variable",arguments:[{name:"name",required:!0},{name:"environment",required:!1}],options:[projectOption,{name:"git-branch",description:"Set the Git branch for a Preview Environment Variable",shorthand:null,type:String,argument:"NAME",deprecated:!1},{name:"sensitive",description:"Store the value as a Secret",shorthand:null,type:Boolean,deprecated:!1},{name:"no-sensitive",description:"Store the value as Config",shorthand:null,type:Boolean,deprecated:!1},{name:"type",description:"Set the Environment Variable type (`config` or `secret`)",shorthand:null,type:String,argument:"TYPE",deprecated:!1},{name:"visibility",description:"Deprecated alias for `--type`",shorthand:null,type:String,argument:"VISIBILITY",deprecated:!0},{...forceOption,description:"Overwrite an existing variable for the same target",shorthand:null},{...yesOption,description:"Accept default choices when adding an Environment Variable"},{name:"guidance",description:"Show command suggestions after completion",shorthand:null,type:Boolean,deprecated:!1},{name:"value",description:"Set the variable value for non-interactive use; otherwise use stdin or the prompt",shorthand:null,type:String,argument:"VALUE",deprecated:!1}],examples:[{name:"Add a new variable (prompts for value and Environments)",value:[`${packageName} env add <name>`,`${packageName} env add API_TOKEN`]},{name:"Add a new Environment Variable to a specific Environment",value:[`${packageName} env add <name> ${targetPlaceholder}`,`${packageName} env add DB_PASS production`]},{name:"Add one variable to multiple Environments (comma-separated)",value:[`${packageName} env add <name> <environment>[,<environment>]`,`${packageName} env add API_URL production,preview,development`]},{name:"Override an existing Environment Variable of same target (production, preview, deployment)",value:`${packageName} env add API_TOKEN --force`},{name:"Add a Config Environment Variable that remains readable later",value:`${packageName} env add API_TOKEN --no-sensitive`},{name:"Add a new Environment Variable for a specific Environment and Git Branch",value:[`${packageName} env add <name> ${targetPlaceholder} --git-branch <name>`,`${packageName} env add DB_PASS preview --git-branch feat1`]},{name:"Add a new Environment Variable from stdin",value:[`cat <file> | ${packageName} env add <name> ${targetPlaceholder}`,`cat ~/.npmrc | ${packageName} env add NPM_RC preview`,`${packageName} env add API_URL production < url.txt`]},{name:"Add with --value for non-interactive use",value:`${packageName} env add API_TOKEN production --value "<value>" --yes`}]},removeSubcommand={name:"remove",aliases:["rm"],description:"Remove an Environment Variable (see examples below)",arguments:[{name:"name",required:!0},{name:"environment",required:!1}],options:[projectOption,{...yesOption,description:"Skip the confirmation prompt when removing an Environment Variable"}],examples:[{name:"Remove a variable from multiple Environments",value:[`${packageName} env rm <name>`,`${packageName} env rm API_TOKEN`]},{name:"Remove a variable from a specific Environment",value:[`${packageName} env rm <name> ${targetPlaceholder}`,`${packageName} env rm NPM_RC preview`]},{name:"Remove a variable from a specific Environment and Git Branch",value:[`${packageName} env rm <name> ${targetPlaceholder} <gitbranch>`,`${packageName} env rm NPM_RC preview feat1`]}]},pullSubcommand={name:"pull",aliases:[],description:"Pull all Development Environment Variables from the cloud and write to a file [.env.local]",arguments:[{name:"filename",required:!1}],options:[projectOption,{name:"environment",description:"Set the Environment when pulling Environment Variables",shorthand:null,type:String,argument:"TARGET",deprecated:!1},{name:"git-branch",description:"Specify the Git branch to pull specific Environment Variables for",shorthand:null,type:String,argument:"NAME",deprecated:!1},{name:"id",description:"Pull environment variables for a specific deployment (e.g. dpl_xxx)",shorthand:null,type:String,argument:"ID",deprecated:!1},{...yesOption,description:"Skip the confirmation prompt when removing an environment variable"}],examples:[{name:"Pull all Development Environment Variables down from the cloud",value:[`${packageName} env pull <file>`,`${packageName} env pull .env.development.local`]},{name:"Pull environment variables for a specific deployment",value:`${packageName} env pull --id dpl_xxx`}]},runSubcommand={name:"run",aliases:[],description:"Run a command with environment variables from the linked Vercel project",arguments:[{name:"command",required:!0,multiple:!0}],options:[projectOption,{name:"environment",description:"Specify the environment to pull variables from (default: development)",shorthand:"e",type:String,argument:"TARGET",deprecated:!1},{name:"git-branch",description:"Specify the Git branch to pull specific Environment Variables for",shorthand:null,type:String,argument:"NAME",deprecated:!1}],examples:[{name:"Run Next.js dev server with development environment variables",value:`${packageName} env run -- next dev`},{name:"Run tests with preview environment variables for a specific branch",value:`${packageName} env run -e preview --git-branch feature-x -- npm test`}]},updateSubcommand={name:"update",aliases:[],description:"Update the value of an existing Environment Variable (see examples below)",arguments:[{name:"name",required:!0},{name:"environment",required:!1}],options:[projectOption,{name:"sensitive",description:"Store the updated value as a Secret",shorthand:null,type:Boolean,deprecated:!1},{name:"type",description:"Set the Environment Variable type (`config` or `secret`)",shorthand:null,type:String,argument:"TYPE",deprecated:!1},{name:"visibility",description:"Deprecated alias for `--type`",shorthand:null,type:String,argument:"VISIBILITY",deprecated:!0},{...yesOption,description:"Skip the confirmation prompt when updating an Environment Variable"},{name:"value",description:"New value for the variable (non-interactive). Otherwise use stdin or you will be prompted.",shorthand:null,type:String,argument:"VALUE",deprecated:!1}],examples:[{name:"Update a variable in all Environments",value:[`${packageName} env update <name>`,`${packageName} env update API_TOKEN`]},{name:"Update a variable in a specific Environment",value:[`${packageName} env update <name> ${targetPlaceholder}`,`${packageName} env update DB_PASS production`]},{name:"Update a variable for a specific Environment and Git Branch",value:[`${packageName} env update <name> ${targetPlaceholder} <gitbranch>`,`${packageName} env update NPM_RC preview feat1`]},{name:"Update a variable from stdin",value:[`cat <file> | ${packageName} env update <name> ${targetPlaceholder}`,`cat ~/.npmrc | ${packageName} env update NPM_RC preview`,`${packageName} env update API_URL production < url.txt`]}]},envCommand={name:"env",aliases:[],description:"Interact with Environment Variables for a Project",arguments:[],subcommands:[addSubcommand,listSubcommand,pullSubcommand,removeSubcommand,runSubcommand,updateSubcommand],options:[],examples:[{name:"Run a command with Environment Variables from the linked Project",value:`${packageName} env run -- <command>`},{name:"Add one variable to multiple Environments",value:`${packageName} env add API_URL production,preview,development`}]};export{envTargetChoices,isValidEnvTarget,getEnvTargetPlaceholder,parseEnvTargetArg,listSubcommand,addSubcommand,removeSubcommand,pullSubcommand,runSubcommand,updateSubcommand,envCommand};
@@ -1,7 +0,0 @@
1
- import { createRequire as __createRequire } from 'node:module';
2
- import { fileURLToPath as __fileURLToPath } from 'node:url';
3
- import { dirname as __dirname_ } from 'node:path';
4
- const require = __createRequire(import.meta.url);
5
- const __filename = __fileURLToPath(import.meta.url);
6
- const __dirname = __dirname_(__filename);
7
- import{formatOption,jsonOption,projectOption,yesOption}from"./chunk-JAJW3P42.js";import{packageName}from"./chunk-FI772UVH.js";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",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",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:"Account webhook ID to link or unlink"},{name:"slack-channel",shorthand:null,type:String,argument:"CHANNEL_ID",deprecated:!1,description:"Slack channel ID to link or unlink"},{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."}],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,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`}]},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,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,rulesNotificationsUnlinkSubcommand,rulesNotificationsAggregateCommand,rulesAggregateCommand};
@@ -1,9 +0,0 @@
1
- import { createRequire as __createRequire } from 'node:module';
2
- import { fileURLToPath as __fileURLToPath } from 'node:url';
3
- import { dirname as __dirname_ } from 'node:path';
4
- const require = __createRequire(import.meta.url);
5
- const __filename = __fileURLToPath(import.meta.url);
6
- const __dirname = __dirname_(__filename);
7
- import{buildRuleNotificationsInspectCommand,printRuleNotificationMutationReceipt}from"./chunk-AKZOYEBP.js";import{emitRulesArgParseError,handleRulesApiError,outputRulesError,resolveRulesTeam,rulesNotificationLinksPath}from"./chunk-T6A5HA5U.js";import"./chunk-OICV3NTQ.js";import"./chunk-FA6O7FPC.js";import"./chunk-GJZRIDFC.js";import"./chunk-TRTEXGVN.js";import"./chunk-T3GQAMBJ.js";import"./chunk-QTKJC2O5.js";import{validateJsonOutput}from"./chunk-D4MW3RDW.js";import"./chunk-P2O5DOYE.js";import{AGENT_STATUS}from"./chunk-T4LZS75P.js";import{rulesNotificationsLinkSubcommand,rulesNotificationsUnlinkSubcommand}from"./chunk-OAKO6LVS.js";import"./chunk-4M7CX4YK.js";import"./chunk-JSKGZLE4.js";import"./chunk-RCTYVKM5.js";import"./chunk-GHM7V3GG.js";import"./chunk-5XJNPXQK.js";import{printError}from"./chunk-N5AIKGEO.js";import{parseArguments}from"./chunk-WWB66KP5.js";import"./chunk-MY4MONOH.js";import"./chunk-P6C5L7KC.js";import"./chunk-F2ZWW2IO.js";import"./chunk-B4ATVYZW.js";import"./chunk-PPCFQQSU.js";import"./chunk-BRK4OB4B.js";import"./chunk-KCARCOP5.js";import"./chunk-BKV35LVB.js";import{getFlagsSpecification}from"./chunk-JAJW3P42.js";import"./chunk-YMM3VY3J.js";import"./chunk-SM5JI6QM.js";import"./chunk-VOZEB6PD.js";import{isAPIError}from"./chunk-RINZXCDJ.js";import{packageName}from"./chunk-FI772UVH.js";import{output_manager_default}from"./chunk-EWWFNMPZ.js";import"./chunk-QGIQK47P.js";import"./chunk-AVSPFBLM.js";import"./chunk-XCJDGQO7.js";import"./chunk-YPTLSODC.js";import"./chunk-7HL2RPUO.js";import"./chunk-U7KCDTCH.js";import"./chunk-N3ZZ7FHQ.js";import"./chunk-GU6VIFR5.js";import"./chunk-6L236MNA.js";var API_SLACK_INSTALLATION_REQUIRED_MESSAGE="configId is required unless the team has exactly one Slack configuration.",CLI_SLACK_INSTALLATION_REQUIRED_MESSAGE="A Slack installation ID is required unless the team has exactly one completed Slack installation. Pass --slack-installation-id <installation-id>.";function getTarget(client,flags,jsonOutput){let webhookId=flags["--webhook"],channelId=flags["--slack-channel"],configId=flags["--slack-installation-id"];return webhookId&&(channelId||configId)?outputRulesError(client,jsonOutput,"INVALID_ARGUMENTS","Specify either --webhook or --slack-channel, not both."):configId&&!channelId?outputRulesError(client,jsonOutput,"INVALID_ARGUMENTS","--slack-installation-id requires --slack-channel."):webhookId?{type:"webhook",webhookId}:channelId?configId?{type:"slack",channelId,configId}:{type:"slack",channelId}:outputRulesError(client,jsonOutput,"MISSING_ARGUMENTS","Specify a notification destination with --webhook or --slack-channel.")}async function mutate(client,argv,action){let command=action==="link"?rulesNotificationsLinkSubcommand:rulesNotificationsUnlinkSubcommand,parsedArgs;try{parsedArgs=parseArguments(argv,getFlagsSpecification(command.options))}catch(error){return emitRulesArgParseError(client,error,`alerts rules notifications ${action} <rule-id> --webhook <webhook-id>`),printError(error),1}let flags=parsedArgs.flags,format=validateJsonOutput(flags);if(!format.valid)return outputRulesError(client,!1,"INVALID_ARGUMENTS",format.error);let[ruleId,extraArg]=parsedArgs.args;if(!ruleId)return outputRulesError(client,format.jsonOutput,"MISSING_ARGUMENTS",`Missing rule ID. Example: ${packageName} alerts rules notifications ${action} <rule-id> --webhook <webhook-id>`);if(extraArg)return outputRulesError(client,format.jsonOutput,"INVALID_ARGUMENTS","Expected exactly one rule ID.");let target=getTarget(client,flags,format.jsonOutput);if(typeof target=="number")return target;let scope=await resolveRulesTeam(client,format.jsonOutput);if(typeof scope=="number")return scope;client.nonInteractive||output_manager_default.spinner(`${action==="link"?"Linking":"Unlinking"} notification destination\u2026`);try{let response=await client.fetch(rulesNotificationLinksPath(scope.teamId,ruleId),{method:action==="link"?"POST":"DELETE",body:target});if(client.nonInteractive){let actionPastTense=action==="link"?"Linked":"Unlinked";client.stdout.write(`${JSON.stringify({status:AGENT_STATUS.OK,success:response.success,action,ruleId,notification:target,message:`${actionPastTense} notification destination ${action==="link"?"to":"from"} alert rule ${ruleId}.`,next:[{command:buildRuleNotificationsInspectCommand(client.argv,ruleId),when:"Inspect linked notification destinations"}]},null,2)}
8
- `)}else format.jsonOutput?client.stdout.write(`${JSON.stringify(response,null,2)}
9
- `):printRuleNotificationMutationReceipt(action==="link"?"Linked":"Unlinked",ruleId,target,client.argv);return 0}catch(error){if(isAPIError(error))return error.serverMessage===API_SLACK_INSTALLATION_REQUIRED_MESSAGE?outputRulesError(client,format.jsonOutput,error.code||"bad_request",CLI_SLACK_INSTALLATION_REQUIRED_MESSAGE):handleRulesApiError(client,error,format.jsonOutput);throw error}finally{client.nonInteractive||output_manager_default.stopSpinner()}}export{mutate as default};
@@ -1,7 +0,0 @@
1
- import { createRequire as __createRequire } from 'node:module';
2
- import { fileURLToPath as __fileURLToPath } from 'node:url';
3
- import { dirname as __dirname_ } from 'node:path';
4
- const require = __createRequire(import.meta.url);
5
- const __filename = __fileURLToPath(import.meta.url);
6
- const __dirname = __dirname_(__filename);
7
- import{getSubcommand}from"./chunk-ETV3C2CV.js";import{AGENT_REASON}from"./chunk-T4LZS75P.js";import{buildCommandWithGlobalFlags,outputAgentError}from"./chunk-KCARCOP5.js";import"./chunk-BKV35LVB.js";import"./chunk-JAJW3P42.js";import"./chunk-VOZEB6PD.js";import"./chunk-RINZXCDJ.js";import"./chunk-FI772UVH.js";import{output_manager_default}from"./chunk-EWWFNMPZ.js";import"./chunk-QGIQK47P.js";import"./chunk-AVSPFBLM.js";import"./chunk-XCJDGQO7.js";import"./chunk-YPTLSODC.js";import"./chunk-7HL2RPUO.js";import"./chunk-U7KCDTCH.js";import"./chunk-N3ZZ7FHQ.js";import"./chunk-GU6VIFR5.js";import"./chunk-6L236MNA.js";var NOTIFICATIONS_CONFIG={ls:["ls","list"],link:["link"],unlink:["unlink"]};async function notifications(client,argv){if(argv.length===0||argv[0]?.startsWith("-")||argv[0]?.startsWith("ar_"))return(await import("./ls-6RY2JL5Y.js")).default(client,argv);let{subcommand,args}=getSubcommand(argv,NOTIFICATIONS_CONFIG);if(subcommand==null)return outputAgentError(client,{status:"error",reason:AGENT_REASON.INVALID_ARGUMENTS,message:`Unknown "alerts rules notifications" subcommand "${argv[0]}".`,next:[{command:buildCommandWithGlobalFlags(client.argv,"alerts rules notifications --help"),when:"Show valid notification subcommands"}]},1),output_manager_default.error(`Unknown "alerts rules notifications" subcommand "${argv[0]}". Run \`vercel alerts rules notifications --help\`.`),1;switch(subcommand){case"ls":return(await import("./ls-6RY2JL5Y.js")).default(client,args);case"link":case"unlink":return(await import("./mutate-YBYD3KNW.js")).default(client,args,subcommand);default:return output_manager_default.error(`Unhandled notifications subcommand: ${String(subcommand)}`),1}}export{notifications as default};