vercel 62.0.0 → 62.2.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-MCZFWZIP.js → add-7HJR3HK7.js} +1 -1
- package/dist/chunks/add-Q5OZFIRM.js +8 -0
- package/dist/chunks/add-VLVURKGS.js +8 -0
- package/dist/chunks/{build-4KB4NLDZ.js → build-MR7MUWBQ.js} +1 -1
- package/dist/chunks/{chunk-AKZAWY6R.js → chunk-2RQFMCPJ.js} +1 -1
- package/dist/chunks/{chunk-WVQLFM45.js → chunk-3R66O72V.js} +1 -1
- package/dist/chunks/{chunk-43XQUIXX.js → chunk-4HXRTNAK.js} +1 -1
- package/dist/chunks/{chunk-QKIDYVDL.js → chunk-5VWK73R6.js} +1 -1
- package/dist/chunks/{chunk-U2Z3MYSU.js → chunk-6JU3QZ3O.js} +1 -1
- package/dist/chunks/{chunk-OGQRWLHV.js → chunk-743NGLUN.js} +1 -1
- package/dist/chunks/{chunk-BN3XAVPG.js → chunk-7ANQHBBE.js} +1 -1
- package/dist/chunks/{chunk-HXKTQSVU.js → chunk-7I23VXBQ.js} +1 -1
- package/dist/chunks/{chunk-ZRNMJQX5.js → chunk-7IRKF3ZG.js} +3 -3
- package/dist/chunks/{chunk-36RTKJWB.js → chunk-7JFK53D4.js} +1 -1
- package/dist/chunks/{chunk-J3HVEQRC.js → chunk-7POWBJDF.js} +2 -2
- package/dist/chunks/{chunk-56FBKYDJ.js → chunk-7T4CJ6MJ.js} +1 -1
- package/dist/chunks/{chunk-XWD3HYWE.js → chunk-A752WDCH.js} +1 -1
- package/dist/chunks/{chunk-VNOZYSNT.js → chunk-ACCZWEKL.js} +1 -1
- package/dist/chunks/chunk-ADDXKC3J.js +9 -0
- package/dist/chunks/{chunk-2A2GVGNS.js → chunk-AKPQWZIP.js} +2 -2
- package/dist/chunks/chunk-ALXWJ7XN.js +7 -0
- package/dist/chunks/{chunk-F46FFOPY.js → chunk-B5PFD6Q3.js} +1 -1
- package/dist/chunks/{chunk-HBB6S6FN.js → chunk-C3XFIO5L.js} +1 -1
- package/dist/chunks/{chunk-4DGSVSWX.js → chunk-C6ITILVT.js} +2 -2
- package/dist/chunks/{chunk-YZH6RUFI.js → chunk-CQ3RAERR.js} +1 -1
- package/dist/chunks/{chunk-IDWEEGMC.js → chunk-CVX5X5RI.js} +1 -1
- package/dist/chunks/chunk-D5VTBRWF.js +7 -0
- package/dist/chunks/{chunk-56CIPRSY.js → chunk-DECIQZZQ.js} +3 -3
- package/dist/chunks/{chunk-ZQZL5YQA.js → chunk-E4RLHRDF.js} +1 -1
- package/dist/chunks/{chunk-2F5ENFZE.js → chunk-EQHNA4BW.js} +1 -1
- package/dist/chunks/{chunk-GP62PIK6.js → chunk-GASSNHZG.js} +1 -1
- package/dist/chunks/{chunk-ORF2KLRG.js → chunk-HLVUEYOZ.js} +1 -1
- package/dist/chunks/chunk-HVROAV4B.js +9 -0
- package/dist/chunks/{chunk-HTPAVQS4.js → chunk-HYW4A5B3.js} +1 -1
- package/dist/chunks/{chunk-ZXE4XYIV.js → chunk-ILFUNCJZ.js} +1 -1
- package/dist/chunks/{chunk-GA25RADA.js → chunk-ILXXXXVQ.js} +1 -1
- package/dist/chunks/{chunk-X7REKM7I.js → chunk-JO3XBFR3.js} +1 -1
- package/dist/chunks/{chunk-63524SZ2.js → chunk-JRU6AGXG.js} +1 -1
- package/dist/chunks/{chunk-6FGTAOZC.js → chunk-JSKSNCK2.js} +1 -1
- package/dist/chunks/{chunk-XSBLZMTW.js → chunk-K5WTLFS6.js} +1 -1
- package/dist/chunks/{chunk-KMHCNMWF.js → chunk-KG5BMLOI.js} +1 -1
- package/dist/chunks/{chunk-SVOAPAXM.js → chunk-KOSM3DYE.js} +1 -1
- package/dist/chunks/{chunk-UNXGP4T4.js → chunk-KREBNPHL.js} +1 -1
- package/dist/chunks/{chunk-UOS7HE4I.js → chunk-L46BHPRD.js} +1 -1
- package/dist/chunks/{chunk-NNEWLQZ2.js → chunk-LCWCTL6L.js} +1 -1
- package/dist/chunks/{chunk-3AZEJ674.js → chunk-LCY4SULE.js} +1 -1
- package/dist/chunks/chunk-LHQUNL52.js +7 -0
- package/dist/chunks/{chunk-53BZCZTW.js → chunk-M7ZGWERO.js} +1 -1
- package/dist/chunks/{chunk-A5VLP25I.js → chunk-MCCL762Q.js} +1 -1
- package/dist/chunks/chunk-MK3CTSDV.js +24 -0
- package/dist/chunks/{chunk-DT3EUC6S.js → chunk-N4PVXHAJ.js} +2 -1
- package/dist/chunks/{chunk-T72CT7NM.js → chunk-N5MNZPPJ.js} +1 -1
- package/dist/chunks/{chunk-ODEEQEAD.js → chunk-N7XPPYQQ.js} +1 -1
- package/dist/chunks/{chunk-OMXVC7WL.js → chunk-NESZV33T.js} +1 -1
- package/dist/chunks/{chunk-J27GIFGM.js → chunk-NRN65VUM.js} +1 -1
- package/dist/chunks/{chunk-6HWPJHPE.js → chunk-NT67T6DL.js} +1 -1
- package/dist/chunks/chunk-NXTK7VKL.js +7 -0
- package/dist/chunks/{chunk-6MNJOHPD.js → chunk-PADCVJ7G.js} +1 -1
- package/dist/chunks/{chunk-2RU3W7DI.js → chunk-PAI3WRPA.js} +1 -1
- package/dist/chunks/{chunk-3RR5CAUY.js → chunk-PTFKU33G.js} +1 -1
- package/dist/chunks/{chunk-UKVHDIP7.js → chunk-PV5YI2ZZ.js} +1 -1
- package/dist/chunks/{chunk-UMSD2UEI.js → chunk-RFWCEREA.js} +1 -1
- package/dist/chunks/{chunk-HRW6JPGE.js → chunk-RVKOPGOI.js} +1 -1
- package/dist/chunks/{chunk-JV2R73IG.js → chunk-S2LBGLRE.js} +1 -1
- package/dist/chunks/{chunk-6OI6SRHZ.js → chunk-SDGWKUST.js} +1 -1
- package/dist/chunks/{chunk-QS3H2ANN.js → chunk-UOHVKN6N.js} +1 -1
- package/dist/chunks/{chunk-4HR5QZI5.js → chunk-UWO3M2L2.js} +1 -1
- package/dist/chunks/{chunk-J4WPHU3P.js → chunk-VDOJERIW.js} +1 -1
- package/dist/chunks/chunk-VGXFOQ4P.js +8 -0
- package/dist/chunks/{chunk-WPC7UHAS.js → chunk-VTMLKJVQ.js} +1 -1
- package/dist/chunks/{chunk-YIJERP7V.js → chunk-VZDY57PJ.js} +1 -1
- package/dist/chunks/{chunk-LW7WCZ52.js → chunk-W7PVS44H.js} +1 -1
- package/dist/chunks/{chunk-LQMW75EU.js → chunk-WN6OXK2F.js} +1 -1
- package/dist/chunks/{chunk-2YSKT6HL.js → chunk-WOKSTB3F.js} +1 -1
- package/dist/chunks/{chunk-3CJI4EAR.js → chunk-WW3VUXRV.js} +1 -1
- package/dist/chunks/{chunk-QMLU6UFC.js → chunk-X47XV2WG.js} +1 -1
- package/dist/chunks/{chunk-6WAQETPS.js → chunk-ZQIUMXCI.js} +1 -1
- package/dist/chunks/{chunk-ZRVFN7YO.js → chunk-ZUYWATU5.js} +1 -1
- package/dist/chunks/{clear-6NP2IT4F.js → clear-PPE55RPM.js} +1 -1
- package/dist/chunks/{compile-vercel-config-7JBRIIM7.js → compile-vercel-config-2IC23CNT.js} +1 -1
- package/dist/chunks/{config-ZP32YP6C.js → config-G2A6KPPM.js} +1 -1
- package/dist/chunks/{config-562NRVVZ.js → config-T3WHONFJ.js} +1 -1
- package/dist/chunks/config-validator.mjs +1 -1
- package/dist/chunks/{delete-UL76FA4Q.js → delete-75SYJKNE.js} +1 -1
- package/dist/chunks/{delete-J4TGLAU6.js → delete-MHXN5KTO.js} +1 -1
- package/dist/chunks/{detect-projects-325QE23N.js → detect-projects-GJF4VXQI.js} +1 -1
- package/dist/chunks/detect-services-K3363KB7.js +7 -0
- package/dist/chunks/{disable-CNJCXFS4.js → disable-OUYOHEWN.js} +1 -1
- package/dist/chunks/{discard-2YP7E4YP.js → discard-RXSHOY3J.js} +1 -1
- package/dist/chunks/{edit-NTJXKEVD.js → edit-Y7OL72ZK.js} +1 -1
- package/dist/chunks/{edit-I5L443ZZ.js → edit-Z5RCWPOX.js} +1 -1
- package/dist/chunks/{enable-JQVGB5EU.js → enable-HI2UH2NM.js} +1 -1
- package/dist/chunks/{export-KK46QDGW.js → export-CMP3APAJ.js} +1 -1
- package/dist/chunks/{future-T4Q7RANL.js → future-GS7ZLJ3N.js} +1 -1
- package/dist/chunks/{generate-cert-for-deploy-LUHAFVYC.js → generate-cert-for-deploy-2HHUYGHU.js} +1 -1
- package/dist/chunks/{image-4F5NKSSP.js → image-SQIUEBFK.js} +1 -1
- package/dist/chunks/{import-builders-B2QQXOHS.js → import-builders-EUOOFPHW.js} +1 -1
- package/dist/chunks/{inspect-MSDBVOII.js → inspect-2SXPXNYH.js} +1 -1
- package/dist/chunks/{inspect-UINFK4D6.js → inspect-DYNTJMTQ.js} +1 -1
- package/dist/chunks/{inspect-OZH4CRGR.js → inspect-J3F3U3YF.js} +1 -1
- package/dist/chunks/{inspect-VJ4JXO4W.js → inspect-KYFVYFWX.js} +1 -1
- package/dist/chunks/{inspect-TDCFV3JA.js → inspect-V7HA2GZ5.js} +1 -1
- package/dist/chunks/{list-W2AYLMXB.js → list-TSDBEAVF.js} +1 -1
- package/dist/chunks/{list-GDUN5WEP.js → list-X4MKKDJX.js} +1 -1
- package/dist/chunks/{list-VYCM7K3Y.js → list-ZQSOWXRI.js} +1 -1
- package/dist/chunks/{login-DFTGXDX2.js → login-5FMKHZVG.js} +1 -1
- package/dist/chunks/{login-EBMKYY53.js → login-YEDMPXUF.js} +1 -1
- package/dist/chunks/{logs-IXHYNZLV.js → logs-X2OIQXGW.js} +1 -1
- package/dist/chunks/{ls-XZO3FMRZ.js → ls-4W4KTJ6T.js} +1 -1
- package/dist/chunks/{ls-Z3VHVO6V.js → ls-6EDJUUDW.js} +1 -1
- package/dist/chunks/{ls-63MC7N47.js → ls-BMAVUMXU.js} +1 -1
- package/dist/chunks/{ls-6K3MIAYQ.js → ls-HK45UWBD.js} +1 -1
- package/dist/chunks/{ls-EXRSJHKJ.js → ls-LAYBQVU2.js} +1 -1
- package/dist/chunks/{ls-4MYTCHNA.js → ls-SQ42O6O5.js} +1 -1
- package/dist/chunks/{ls-AR2DBNXD.js → ls-XIJ4CY2N.js} +1 -1
- package/dist/chunks/{mutate-QDPLCRQI.js → mutate-6FCOCHSA.js} +1 -1
- package/dist/chunks/{notifications-T32HQJY3.js → notifications-JTK7ZOLC.js} +1 -1
- package/dist/chunks/{open-EN657452.js → open-3G4R3VIN.js} +1 -1
- package/dist/chunks/{openapi-V26Z3DHE.js → openapi-W365UPH2.js} +1 -1
- package/dist/chunks/{permissions-FOQAHGJV.js → permissions-IWUBXZBZ.js} +1 -1
- package/dist/chunks/{prompt-missing-credentials-OHEVPOTD.js → prompt-missing-credentials-VDR5HVA2.js} +1 -1
- package/dist/chunks/{publish-72BFQW57.js → publish-5QKVU6YV.js} +1 -1
- package/dist/chunks/pull-K4JQEP7N.js +7 -0
- package/dist/chunks/{purchase-domain-if-available-GNUGZD5G.js → purchase-domain-if-available-Q7H2TGKR.js} +1 -1
- package/dist/chunks/{push-KXIA3WMX.js → push-COILRLCW.js} +1 -1
- package/dist/chunks/{query-3YKNY4BU.js → query-ABPO2REN.js} +2 -2
- package/dist/chunks/{reauthenticate-L4S7TZ4L.js → reauthenticate-3H5Q2ZWD.js} +1 -1
- package/dist/chunks/{reorder-OUMHYKGW.js → reorder-FBUQ5ET7.js} +1 -1
- package/dist/chunks/{reply-RY25JMY6.js → reply-FR5VO7DA.js} +1 -1
- package/dist/chunks/{resolve-5BCDAP6S.js → resolve-JI2ENFS6.js} +1 -1
- package/dist/chunks/{restore-UUSDAZCM.js → restore-LYY4BSYJ.js} +1 -1
- package/dist/chunks/{rm-HLZI2UGH.js → rm-C2RWWMO3.js} +1 -1
- package/dist/chunks/{rm-OY4YZTBH.js → rm-CYYVIF2U.js} +1 -1
- package/dist/chunks/rm-ETLZ75RJ.js +8 -0
- package/dist/chunks/{rm-677RFR3N.js → rm-GHSQEFRG.js} +1 -1
- package/dist/chunks/{rm-LA26QYTP.js → rm-KHO6RV55.js} +1 -1
- package/dist/chunks/{routes-IPGKJ2E4.js → routes-FOCZWOGO.js} +1 -1
- package/dist/chunks/{rule-inspect-TW56Z4DI.js → rule-inspect-MISYALLU.js} +1 -1
- package/dist/chunks/{rules-IMBUQQNG.js → rules-KAGL6MH3.js} +1 -1
- package/dist/chunks/schema-EKWTCBNR.js +14 -0
- package/dist/chunks/{schema-CJ7N23WS.js → schema-FZVKQRNB.js} +2 -2
- package/dist/chunks/{select-org-EIEVJ6Z7.js → select-org-37C26F7T.js} +1 -1
- package/dist/chunks/set-5D7C6HMZ.js +7 -0
- package/dist/chunks/setup-and-link-H4P3FZB3.js +7 -0
- package/dist/chunks/{tags-P3BOHMPP.js → tags-DVGQQZNC.js} +1 -1
- package/dist/chunks/{types-CMM7WKD6.js → types-UN5J66MI.js} +1 -1
- package/dist/chunks/{update-L5QEVUQO.js → update-QY3ZME4T.js} +1 -1
- package/dist/commands/build/index.js +1 -1
- package/dist/commands/deploy/index.js +4 -4
- package/dist/commands/dev/index.js +7 -7
- 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 +699 -665
- package/dist/index.js +2 -2
- package/dist/root-help-commands.mjs +1 -1
- package/dist/vc.js +4 -2
- package/dist/version.mjs +1 -1
- package/package.json +56 -55
- package/dist/chunks/add-3IGZTUFX.js +0 -8
- package/dist/chunks/add-PVWJ6JM2.js +0 -8
- package/dist/chunks/chunk-2HB5UL2I.js +0 -9
- package/dist/chunks/chunk-6RUAMGHK.js +0 -9
- package/dist/chunks/chunk-K7RJ5LI6.js +0 -7
- package/dist/chunks/chunk-O242I22A.js +0 -7
- package/dist/chunks/chunk-O5GXI6UQ.js +0 -24
- package/dist/chunks/chunk-XKSNY65J.js +0 -7
- package/dist/chunks/chunk-XYPCSFQH.js +0 -7
- package/dist/chunks/detect-services-MGWUCUFW.js +0 -7
- package/dist/chunks/pull-LZHMR2OS.js +0 -7
- package/dist/chunks/rm-Y7E3Y4EY.js +0 -8
- package/dist/chunks/schema-HZIWO2YM.js +0 -14
- package/dist/chunks/set-G3SGK3DK.js +0 -7
- package/dist/chunks/setup-and-link-ARUWFOSZ.js +0 -7
|
@@ -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{formatOption,jsonOption,projectOption,yesOption}from"./chunk-UKVHDIP7.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};
|
|
@@ -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{permissionsAggregateCommand}from"./chunk-AKZAWY6R.js";import{tagsAggregateCommand}from"./chunk-6HWPJHPE.js";import{imageAggregateCommand}from"./chunk-OMXVC7WL.js";import{formatOption,jsonOption,limitOption,projectOption,yesOption}from"./chunk-UKVHDIP7.js";import{packageName}from"./chunk-FI772UVH.js";var projectScopeOption={...projectOption,shorthand:"p",description:"Project name or ID (defaults to the linked project)."},nextOption={name:"next",shorthand:null,type:String,deprecated:!1,description:"Continue from a previous response",argument:"CURSOR"},cursorOption={name:"cursor",shorthand:"c",type:String,deprecated:!0,description:"Cursor from a previous page to continue listing from",argument:"STRING"},platformOption={name:"platform",shorthand:null,type:String,deprecated:!1,description:"Target platform for the build (defaults to linux/amd64).",argument:"PLATFORM"},pushOption={name:"push",shorthand:null,type:Boolean,deprecated:!1,description:"Push the image after building. With Docker this builds and pushes in one step (Buildx enables zstd compression); Podman and Buildah build, then push with zstd compression."},publicOption={name:"public",shorthand:null,type:String,deprecated:!1,description:"Set the repository visibility: `true` for public, `false` for private.",argument:"BOOLEAN",choices:["true","false"]},listSubcommand={name:"ls",aliases:["list"],description:"List container registry repositories for a project",arguments:[],options:[projectScopeOption,limitOption,nextOption,cursorOption,formatOption,jsonOption],examples:[{name:"List repositories in the linked project",value:`${packageName} vcr ls`},{name:"List repositories for a specific project as JSON",value:`${packageName} vcr ls --project my-app --json`}]},inspectSubcommand={name:"inspect",aliases:["get"],description:"Show details for a single repository",arguments:[{name:"repository",required:!0}],options:[projectScopeOption,formatOption,jsonOption],examples:[{name:"Inspect a repository by name",value:`${packageName} vcr inspect my-repository`}]},addSubcommand={name:"add",aliases:["create"],description:"Create a container registry repository",arguments:[{name:"name",required:!0}],options:[projectScopeOption,formatOption,jsonOption],examples:[{name:"Create a repository",value:`${packageName} vcr add my-repository`}]},configSubcommand={name:"config",aliases:[],description:"Configure a container registry repository, such as the repository's visibility",arguments:[{name:"repository",required:!0}],options:[publicOption,projectScopeOption,formatOption,jsonOption],examples:[{name:"Make a repository public",value:`${packageName} vcr config my-repository --public true`},{name:"Make a repository private",value:`${packageName} vcr config my-repository --public false`}]},removeSubcommand={name:"rm",aliases:["remove","delete"],description:"Delete a container registry repository",arguments:[{name:"repository",required:!0}],options:[projectScopeOption,yesOption,formatOption,jsonOption],examples:[{name:"Delete a repository",value:`${packageName} vcr rm my-repository`},{name:"Delete a repository without the confirmation prompt",value:`${packageName} vcr rm my-repository --yes`}]},loginSubcommand={name:"login",aliases:[],description:"Authenticate a container tool (docker, podman, or buildah) with the Vercel Container Registry",arguments:[{name:"engine",required:!0}],options:[projectScopeOption,formatOption,jsonOption],examples:[{name:"Log in with Docker",value:`${packageName} vcr login docker`},{name:"Log in with Podman",value:`${packageName} vcr login podman`},{name:"Log in with Buildah",value:`${packageName} vcr login buildah`},{name:"Log in for a specific project",value:`${packageName} vcr login docker --project my-app`}]},buildSubcommand={name:"build",aliases:[],description:"Build a container image tagged for the Vercel Container Registry by shelling out to your container tool (docker, podman, or buildah)",arguments:[{name:"engine",required:!0},{name:"path",required:!1},{name:"name",required:!1}],options:[projectScopeOption,platformOption,pushOption],examples:[{name:"Build the current directory into the linked project (repository defaults to the project name, tag to latest)",value:`${packageName} vcr build docker`},{name:"Build and push in one step (Docker Buildx enables zstd compression)",value:`${packageName} vcr build docker --push`},{name:"Build a specific context path with a repository and tag",value:`${packageName} vcr build docker ./app my-api:1.2.3`},{name:"Pass extra flags through to the container tool",value:`${packageName} vcr build docker . -- --no-cache --build-arg KEY=value`}]},pushSubcommand={name:"push",aliases:[],description:"Push a container image to the Vercel Container Registry by shelling out to your container tool (docker, podman, or buildah)",arguments:[{name:"engine",required:!0},{name:"name",required:!1}],options:[projectScopeOption],examples:[{name:"Push the linked project image (repository defaults to the project name, tag to latest)",value:`${packageName} vcr push docker`},{name:"Push a specific repository and tag",value:`${packageName} vcr push docker my-api:1.2.3`}]},vcrCommand={name:"vcr",aliases:[],description:"Manage Vercel Container Registry repositories and images (see `vcr image`).",arguments:[],subcommands:[listSubcommand,inspectSubcommand,addSubcommand,configSubcommand,removeSubcommand,loginSubcommand,buildSubcommand,pushSubcommand,tagsAggregateCommand,imageAggregateCommand,permissionsAggregateCommand],options:[],examples:[{name:"List repositories in the linked project",value:`${packageName} vcr ls`},{name:"Create a repository",value:`${packageName} vcr add my-app`},{name:"List images in a repository",value:`${packageName} vcr image ls my-app`}]};export{listSubcommand,inspectSubcommand,addSubcommand,configSubcommand,removeSubcommand,loginSubcommand,buildSubcommand,pushSubcommand,vcrCommand};
|
|
@@ -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{getGlobalPathConfig}from"./chunk-YZH6RUFI.js";import{require_load_json_file}from"./chunk-RCTYVKM5.js";import{require_types}from"./chunk-GHM7V3GG.js";import{inspectTokenRequest,processInspectTokenResponse}from"./chunk-5XJNPXQK.js";import{parseArguments}from"./chunk-NNEWLQZ2.js";import{DEFAULT_VERCEL_CONFIG_FILENAME,VERCEL_CONFIG_EXTENSIONS,VERCEL_DIR,findProjectsFromPath,getLinkFromDir,getRepoLink,getVercelDirectory}from"./chunk-ZRNMJQX5.js";import{humanizePath}from"./chunk-PPCFQQSU.js";import{require_cli_config}from"./chunk-BRK4OB4B.js";import{getUser}from"./chunk-SM5JI6QM.js";import{getTeamByIdOrSlug}from"./chunk-VOZEB6PD.js";import{ConflictingConfigFiles,DeprecatedNowJson,InvalidLocalConfig,InvalidToken,NowError,TeamDeleted}from"./chunk-RINZXCDJ.js";import{output_manager_default}from"./chunk-EWWFNMPZ.js";import{require_dist}from"./chunk-QGIQK47P.js";import{require_source}from"./chunk-U7KCDTCH.js";import{__toESM}from"./chunk-6L236MNA.js";var import_chalk=__toESM(require_source(),1);function highlight(text){return import_chalk.default.bold.underline(text)}var VERCEL_API_ORIGIN="https://api.vercel.com";async function introspectToken(client){let token=client.authConfig.token;if(!token)throw new Error("No token to introspect");if(new URL(client.apiUrl).origin!==VERCEL_API_ORIGIN)throw new Error("Token introspection is unavailable for custom API origins");let[error,introspection]=await processInspectTokenResponse(await inspectTokenRequest(token));if(error)throw error;return introspection}function isAppPrincipalEnabled(){return!!process.env.APP_PRINCIPAL_ENABLED}function resolveAppFromToken(token){return!token.active||!token.client_id?null:{id:token.client_id,name:token.client_name}}async function resolveAppTokenScope(client,scope){let token=await introspectToken(client).catch(()=>null),app=token?resolveAppFromToken(token):null,team=token?.team;return!app||!team||team.id!==scope&&team.slug!==scope?!1:(client.config.currentTeam=team.id,!0)}import{relative}from"path";var import_cli_config=__toESM(require_cli_config(),1);var import_load_json_file=__toESM(require_load_json_file(),1),config=__toESM(require_cli_config(),1),import_error_utils=__toESM(require_dist(),1),import_types=__toESM(require_types(),1);import{join,basename,dirname}from"path";import{accessSync,constants}from"fs";import{persistCliAuthConfig,readCliAuthConfig}from"@vercel/cli-auth/credentials-store.js";import path from"path";import{existsSync}from"fs";function getLocalPathConfig(prefix,useCompiledConfig=!0){let customPath=parseArguments(process.argv.slice(2),{},{permissive:!0}).flags["--local-config"];if(customPath){if(typeof customPath!="string")throw new InvalidLocalConfig(customPath);return path.resolve(process.cwd(),customPath)}let vercelConfigPath=path.join(prefix,"vercel.json"),vercelTomlPath=path.join(prefix,"vercel.toml"),nowConfigPath=path.join(prefix,"now.json"),vercelConfigExists=existsSync(vercelConfigPath),vercelTomlExists=existsSync(vercelTomlPath),nowConfigExists=existsSync(nowConfigPath),foundConfigs=[];if(vercelConfigExists&&foundConfigs.push(vercelConfigPath),vercelTomlExists&&foundConfigs.push(vercelTomlPath),nowConfigExists)throw new DeprecatedNowJson(nowConfigPath);if(foundConfigs.length>1)throw new ConflictingConfigFiles(foundConfigs);let compiledConfigPath=path.join(prefix,VERCEL_DIR,"vercel.json"),compiledConfigExists=existsSync(compiledConfigPath);return useCompiledConfig&&compiledConfigExists?compiledConfigPath:vercelConfigPath}var VERCEL_DIR2=getGlobalPathConfig(),CONFIG_FILE_PATH=config.getConfigFilePath(VERCEL_DIR2),AUTH_CONFIG_FILE_PATH=config.getAuthConfigFilePath(VERCEL_DIR2),readConfigFile=()=>config.readGlobalConfigFile(CONFIG_FILE_PATH),writeToConfigFile=stuff=>{try{config.writeGlobalConfigFile(CONFIG_FILE_PATH,stuff)}catch(err){throw(0,import_error_utils.isErrnoException)(err)&&((0,import_error_utils.isErrnoException)(err)&&err.code==="EPERM"?(output_manager_default.error(`Not able to create ${highlight(CONFIG_FILE_PATH)} (operation not permitted).`),process.exit(1)):err.code==="EBADF"&&(output_manager_default.error(`Not able to create ${highlight(CONFIG_FILE_PATH)} (bad file descriptor).`),process.exit(1))),err}},readAuthConfigFile=_globalConfig=>({...config.getDefaultAuthConfig(),...readCliAuthConfig(VERCEL_DIR2)}),persistAuthConfig=(authConfig,_globalConfig)=>{try{return persistCliAuthConfig(VERCEL_DIR2,authConfig)}catch(err){let wrappedError=new Error(`Not able to create ${humanizePath(AUTH_CONFIG_FILE_PATH)} (${(0,import_error_utils.errorToStringFriendly)(err)}).`);throw wrappedError.cause=err,wrappedError}};function getConfigFilePath2(){return CONFIG_FILE_PATH}function getAuthConfigFilePath2(){return AUTH_CONFIG_FILE_PATH}function readLocalConfig(prefix=process.cwd()){let config2,target="";try{target=getLocalPathConfig(prefix)}catch(err){if(err instanceof NowError)output_manager_default.error(err.message),process.exit(1);else throw err}if(!target)return;try{accessSync(target,constants.F_OK),config2=import_load_json_file.default.sync(target)}catch(err){if(!((0,import_error_utils.isErrnoException)(err)&&err.code==="ENOENT"))if((0,import_error_utils.isError)(err)&&err.name==="JSONError")output_manager_default.error(err.message),process.exit(1);else if((0,import_error_utils.isErrnoException)(err)){let code=err.code?` (${err.code})`:"";output_manager_default.error(`Failed to read config file: ${target}${code}`),process.exit(1)}else output_manager_default.prettyError(err),process.exit(1)}if(!config2)return;if(basename(target)==="vercel.json"&&basename(dirname(target))===VERCEL_DIR){let workPath=dirname(dirname(target)),sourceFile=null;for(let ext of VERCEL_CONFIG_EXTENSIONS){let configPath=join(workPath,`vercel.${ext}`);try{accessSync(configPath,constants.F_OK),sourceFile=basename(configPath);break}catch{}}if(!sourceFile){let tomlPath=join(workPath,"vercel.toml");try{accessSync(tomlPath,constants.F_OK),sourceFile="vercel.toml"}catch{}}config2[import_types.fileNameSymbol]=sourceFile||DEFAULT_VERCEL_CONFIG_FILENAME}else config2[import_types.fileNameSymbol]=basename(target);return config2}function isEligibleForNativeBinaryAutoOptIn(client){return client.teams?.some(team=>team.slug==="vercel")===!0}function autoOptInNativeBinary(client){let envOverride=process.env.VERCEL_CLI_USE_NATIVE_BINARY;if(!(envOverride==="false"||envOverride==="0"||typeof client.config.useNativeBinary=="boolean"||client.config.nativeBinaryAutoOptIn===!0||!isEligibleForNativeBinaryAutoOptIn(client)))try{let configPath=getConfigFilePath2(),savedConfig=(0,import_cli_config.readGlobalConfigFile)(configPath);if(typeof savedConfig.useNativeBinary=="boolean"||savedConfig.nativeBinaryAutoOptIn===!0)return;let config2={...savedConfig,nativeBinaryAutoOptIn:!0};(0,import_cli_config.writeGlobalConfigFile)(configPath,config2),client.config={...client.config,nativeBinaryAutoOptIn:!0}}catch{output_manager_default.debug("Failed to persist automatic native binary enrollment.")}}async function getScope(client,opts={}){let{user,app,token}=await getPrincipal(client);user&&autoOptInNativeBinary(client);let defaultTeamId=user?.version==="northstar"?user.defaultTeamId:void 0,appTeamId=!user&&app?token?.team?.id:void 0;if(!user&&app&&opts.getTeam===!1)throw new Error("App principal scope resolution requires a team lookup.");!user&&app&&(client.config.currentTeam=appTeamId),!client.config.currentTeam&&defaultTeamId&&(client.config.currentTeam=defaultTeamId);let teamId=client.config.currentTeam||defaultTeamId,team=teamId&&opts.getTeam!==!1?await getTeam(client,teamId):null,contextName=team?.slug||user?.username||user?.email;if(!contextName)throw new Error("Unable to determine context name");return opts.resolveLocalScope?resolveLocalScopeContext(client,{user,app,team}):{contextName,team,user,app}}async function getPrincipal(client){if(!isAppPrincipalEnabled())return{user:await getUser(client),app:null,token:null};let[userResult,tokenResult]=await Promise.allSettled([getUser(client),introspectToken(client)]),token=tokenResult.status==="fulfilled"?tokenResult.value:null,app=token?resolveAppFromToken(token):null;if(userResult.status==="rejected"&&!(app&&userResult.reason instanceof InvalidToken))throw userResult.reason;return{user:userResult.status==="fulfilled"?userResult.value:null,app,token}}async function resolveLocalScopeContext(client,{user,app,team}){let explicitScopeProvided=detectExplicitScope(client),globalTeamId=client.config.currentTeam,{localOrgId,linkedRepo,isCrossTeamRepo}=await findLocalLink(client),isAppPrincipal=!user&&!!app,effectiveLocalOrgId=isAppPrincipal?void 0:localOrgId,scopeMismatch=!!(effectiveLocalOrgId&&globalTeamId&&globalTeamId!==effectiveLocalOrgId);!isAppPrincipal&&!explicitScopeProvided&&!effectiveLocalOrgId&&isCrossTeamRepo&&output_manager_default.warn("This repository has projects across multiple teams. Use `--scope` to specify which team, or `cd` into a project directory.");let resolvedTeam=!explicitScopeProvided&&effectiveLocalOrgId?await applyLocalOrg(client,effectiveLocalOrgId):team,{org,contextName}=resolveOrg(resolvedTeam,user);return{org,contextName,user,team:resolvedTeam,app,globalTeam:team,linkedRepo,isCrossTeamRepo,localOrgId:effectiveLocalOrgId,scopeMismatch,explicitScopeProvided}}async function applyLocalOrg(client,localOrgId){return client.config.currentTeam=localOrgId.startsWith("team_")?localOrgId:void 0,client.config.currentTeam?await getTeamByIdOrSlug(client,client.config.currentTeam):null}async function getTeam(client,teamId){let team=await getTeamByIdOrSlug(client,teamId);if(!team)throw new TeamDeleted;return team}function resolveOrg(team,user){if(team)return{org:{type:"team",id:team.id,slug:team.slug},contextName:team.slug};if(user)return{org:{type:"user",id:user.id,slug:user.username},contextName:user.username||user.email};throw new Error("Unable to determine scope: no team or personal account is available for this token. Use `--scope` to specify a team.")}async function findLocalLink(client){let[projectLink,repoLink]=await Promise.all([findProjectLink(client),findRepoLink(client)]);return{localOrgId:findLocalOrgId(client.cwd,projectLink,repoLink),linkedRepo:repoLink?.repoConfig?{repoConfig:repoLink.repoConfig,rootPath:repoLink.rootPath}:null,isCrossTeamRepo:detectCrossTeamRepo(repoLink?.repoConfig)}}async function findProjectLink(client){try{return await getLinkFromDir(getVercelDirectory(client.cwd))}catch{return null}}async function findRepoLink(client){try{return await getRepoLink(client,client.cwd)}catch{return null}}function findLocalOrgId(cwd,projectLink,repoLink){if(projectLink)return projectLink.orgId;if(repoLink?.repoConfig)return findRepoOrgId(repoLink.repoConfig,relative(repoLink.rootPath,cwd))}function findRepoOrgId(repoConfig,pathFromRepoRoot){let matchedProjects=findProjectsFromPath(repoConfig.projects,pathFromRepoRoot),projects=matchedProjects.length===0&&pathFromRepoRoot===""?repoConfig.projects:matchedProjects,orgIds=new Set(projects.map(p=>p.orgId??repoConfig.orgId??""));if(orgIds.size!==1)return;let[orgId]=orgIds;return orgId||void 0}function detectExplicitScope(client){let argv=client.argv;for(let arg of argv){if(arg==="--")break;if(arg==="--scope"||arg==="--team"||arg.startsWith("--scope=")||arg.startsWith("--team=")||arg==="-S"||arg==="-T")return!0}return!!client.localConfig?.scope}function detectCrossTeamRepo(repoConfig){if(!repoConfig?.projects||repoConfig.projects.length<2)return!1;let orgIds=new Set;for(let project of repoConfig.projects){let orgId=project.orgId??repoConfig.orgId;orgId&&orgIds.add(orgId)}return orgIds.size>1}export{highlight,introspectToken,isAppPrincipalEnabled,resolveAppFromToken,resolveAppTokenScope,getScope,detectExplicitScope,getLocalPathConfig,readConfigFile,writeToConfigFile,readAuthConfigFile,persistAuthConfig,getConfigFilePath2 as getConfigFilePath,getAuthConfigFilePath2 as getAuthConfigFilePath,readLocalConfig};
|