@buddysh/buddy 0.11.11 → 0.11.13

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 (144) hide show
  1. package/CHANGELOG.md +28 -0
  2. package/bin/cli.ts +5 -8
  3. package/dist/bin/cli.js +74 -74
  4. package/dist/{chunk-raj75r4h.js → chunk-01d81hn0.js} +1 -1
  5. package/dist/{chunk-z05djfac.js → chunk-028354j6.js} +7 -7
  6. package/dist/chunk-0w6jmcsh.js +2 -0
  7. package/dist/{chunk-3c114myc.js → chunk-1tdkpeva.js} +1 -1
  8. package/dist/{chunk-2e4e6zjs.js → chunk-1znpbjrv.js} +1 -1
  9. package/dist/{chunk-0g4ybxwj.js → chunk-2b07w74s.js} +1 -1
  10. package/dist/{chunk-42xvqxdw.js → chunk-2z85fqdp.js} +2 -2
  11. package/dist/{chunk-b9szrnxw.js → chunk-34vracy4.js} +1 -1
  12. package/dist/chunk-3578axtf.js +2 -0
  13. package/dist/{chunk-2jjrxgs1.js → chunk-37zd94a7.js} +2 -2
  14. package/dist/{chunk-pq115qkn.js → chunk-3a5gcj3y.js} +1 -1
  15. package/dist/{chunk-1xe0960b.js → chunk-3a63hke8.js} +1 -1
  16. package/dist/{chunk-dsnd6ndd.js → chunk-3nn2j810.js} +1 -1
  17. package/dist/chunk-3r0jb90q.js +2 -0
  18. package/dist/{chunk-ycbk7tg9.js → chunk-4fh7w98z.js} +1 -1
  19. package/dist/{chunk-sxfk3naz.js → chunk-4kyxrwxn.js} +1 -1
  20. package/dist/{chunk-vtr2vbk0.js → chunk-4qv88x27.js} +1 -1
  21. package/dist/chunk-4x1mv7qj.js +2 -0
  22. package/dist/{chunk-d9m42wym.js → chunk-54hdfa8r.js} +1 -1
  23. package/dist/{chunk-va3k91tf.js → chunk-5sh69bkj.js} +1 -1
  24. package/dist/{chunk-g0x10e1d.js → chunk-66nntsnf.js} +1 -1
  25. package/dist/chunk-6hyrj0b5.js +2 -0
  26. package/dist/{chunk-mt53v4sx.js → chunk-6np84pfr.js} +1 -1
  27. package/dist/{chunk-hc651afv.js → chunk-6prz7chv.js} +1 -1
  28. package/dist/{chunk-bsh3kp53.js → chunk-6qw89f68.js} +1 -1
  29. package/dist/{chunk-mpb1g0xk.js → chunk-7b156stw.js} +1 -1
  30. package/dist/{chunk-2z9pkk1y.js → chunk-7t8s2mcf.js} +1 -1
  31. package/dist/{chunk-25sjd6zk.js → chunk-83srz04v.js} +4 -4
  32. package/dist/chunk-86xv8x00.js +2 -0
  33. package/dist/chunk-87k997bm.js +2 -0
  34. package/dist/chunk-8jvmqdvc.js +2 -0
  35. package/dist/{chunk-gpjde0j6.js → chunk-92gh2n65.js} +1 -1
  36. package/dist/{chunk-54er1whp.js → chunk-94tnmc7j.js} +2 -2
  37. package/dist/{chunk-csqh2ca4.js → chunk-9n1kth4b.js} +1 -1
  38. package/dist/{chunk-z4btj7s0.js → chunk-a6hv92fx.js} +1 -1
  39. package/dist/{chunk-rr8apsh5.js → chunk-awjm9n45.js} +1 -1
  40. package/dist/{chunk-2hb8dan0.js → chunk-bgw39afd.js} +1 -1
  41. package/dist/{chunk-wt83nzn3.js → chunk-bstgsak0.js} +1 -1
  42. package/dist/{chunk-33h1me7n.js → chunk-c4cj24qm.js} +2 -2
  43. package/dist/chunk-c8xfj0m5.js +2 -0
  44. package/dist/{chunk-08daxhzx.js → chunk-c9266b5x.js} +1 -1
  45. package/dist/{chunk-4kr6evh6.js → chunk-ce26jarj.js} +1 -1
  46. package/dist/chunk-cj5fkyxv.js +2 -0
  47. package/dist/{chunk-7c1284fb.js → chunk-cx89kty3.js} +1 -1
  48. package/dist/chunk-d3m5kcpp.js +2 -0
  49. package/dist/{chunk-vs68hsbp.js → chunk-dg2q6egm.js} +1 -1
  50. package/dist/{chunk-8swwcx7w.js → chunk-dkhherd0.js} +1 -1
  51. package/dist/{chunk-qdr900z7.js → chunk-dq681xgx.js} +1 -1
  52. package/dist/{chunk-ktn47bq8.js → chunk-drmk6r1m.js} +1 -1
  53. package/dist/{chunk-5jvde2as.js → chunk-ebnc6980.js} +1 -1
  54. package/dist/{chunk-gweqk008.js → chunk-edm12hnb.js} +1 -1
  55. package/dist/{chunk-naz864cb.js → chunk-eh71jv8w.js} +1 -1
  56. package/dist/{chunk-40pvn33p.js → chunk-ekf183jk.js} +1 -1
  57. package/dist/{chunk-jhz202wk.js → chunk-fgec04jx.js} +1 -1
  58. package/dist/chunk-fzfgvt8s.js +2 -0
  59. package/dist/{chunk-dd895pm0.js → chunk-gcwg4b2w.js} +1 -1
  60. package/dist/{chunk-w55x2g9n.js → chunk-gjhxc6ma.js} +1 -1
  61. package/dist/{chunk-q7y8dvbz.js → chunk-hc2pdv4j.js} +1 -1
  62. package/dist/chunk-j21m6rf6.js +2 -0
  63. package/dist/{chunk-0m1z85m9.js → chunk-j6bejzk9.js} +1 -1
  64. package/dist/{chunk-vpw7adwd.js → chunk-j6geg3qt.js} +1 -1
  65. package/dist/{chunk-ry5zh9cx.js → chunk-j7qktvpg.js} +1 -1
  66. package/dist/chunk-jjwxbcfz.js +2 -0
  67. package/dist/{chunk-nkztawjh.js → chunk-jkn2sdm0.js} +1 -1
  68. package/dist/{chunk-apdrg3r7.js → chunk-jn3t9v6d.js} +1 -1
  69. package/dist/{chunk-b3s185kp.js → chunk-k907b533.js} +1 -1
  70. package/dist/{chunk-zk8zdv23.js → chunk-kjhqe26r.js} +1 -1
  71. package/dist/chunk-kkh3q0s2.js +2 -0
  72. package/dist/chunk-ksngk47a.js +2 -0
  73. package/dist/{chunk-y3w8h4sy.js → chunk-m00hfvnp.js} +1 -1
  74. package/dist/{chunk-65by8f14.js → chunk-m8brd9b5.js} +1 -1
  75. package/dist/{chunk-wjfw6rx8.js → chunk-ma01xp3y.js} +1 -1
  76. package/dist/{chunk-5pheqk23.js → chunk-mg67hhgj.js} +1 -1
  77. package/dist/{chunk-62j8q7sg.js → chunk-n5mz7csc.js} +1 -1
  78. package/dist/chunk-nd780ymh.js +2 -0
  79. package/dist/chunk-ngzrrqy2.js +2 -0
  80. package/dist/{chunk-afstgmb4.js → chunk-nn5rzwty.js} +1 -1
  81. package/dist/{chunk-esm5jjgf.js → chunk-p16pnhj3.js} +1 -1
  82. package/dist/{chunk-k3r7v3dp.js → chunk-p2h2z6d3.js} +2 -2
  83. package/dist/{chunk-yqfwvk9z.js → chunk-pg32mf9k.js} +1 -1
  84. package/dist/{chunk-5vekh5w1.js → chunk-q7709hwk.js} +1 -1
  85. package/dist/{chunk-vmt1bed1.js → chunk-q99xd3m5.js} +1 -1
  86. package/dist/{chunk-a3zgenkh.js → chunk-qcvtp2mt.js} +1 -1
  87. package/dist/{chunk-7b4jsg36.js → chunk-qjzpzd7j.js} +1 -1
  88. package/dist/{chunk-0rbxek2f.js → chunk-rwz433q2.js} +2 -2
  89. package/dist/{chunk-gzkwszsg.js → chunk-s5czyzje.js} +3 -3
  90. package/dist/{chunk-pegk4jhq.js → chunk-s609kp6h.js} +1 -1
  91. package/dist/{chunk-kbvj6qxc.js → chunk-s82adeq9.js} +1 -1
  92. package/dist/{chunk-59993g25.js → chunk-sn0qr6q7.js} +1 -1
  93. package/dist/{chunk-nbyxgt9c.js → chunk-t5hq4ke1.js} +1 -1
  94. package/dist/{chunk-77qe887p.js → chunk-t879n4ab.js} +1 -1
  95. package/dist/chunk-tmzd2p2n.js +2 -0
  96. package/dist/chunk-tqsrr90t.js +2 -0
  97. package/dist/{chunk-be7g40yf.js → chunk-v808b36p.js} +1 -1
  98. package/dist/chunk-v9avf6sc.js +2 -0
  99. package/dist/chunk-w2vsf1q0.js +2 -0
  100. package/dist/{chunk-89jytkd6.js → chunk-wf1jcxtr.js} +1 -1
  101. package/dist/chunk-wjmrh1nv.js +2 -0
  102. package/dist/{chunk-jsf2322c.js → chunk-x9qhsyp6.js} +2 -2
  103. package/dist/chunk-x9vpk4kk.js +7 -0
  104. package/dist/{chunk-h8wskvjv.js → chunk-xhn5331s.js} +1 -1
  105. package/dist/{chunk-b6a5txek.js → chunk-y1d6e0ye.js} +1 -1
  106. package/dist/{chunk-kq0n3x2e.js → chunk-ym9475ry.js} +1 -1
  107. package/dist/chunk-yrr9hqvw.js +2 -0
  108. package/dist/chunk-zcsahxe6.js +2 -0
  109. package/dist/chunk-zpgm9yzy.js +2 -0
  110. package/dist/{chunk-ddky3026.js → chunk-zrec546r.js} +1 -1
  111. package/dist/{chunk-x1w6q9tk.js → chunk-zwtx6vn3.js} +1 -1
  112. package/dist/chunk-zy49dwqk.js +44 -0
  113. package/dist/src/index.js +1 -1
  114. package/dist/src/pr/pr-manifest.d.ts +10 -0
  115. package/dist/src/setup.js +1 -1
  116. package/package.json +1 -1
  117. package/dist/chunk-0m6b7bac.js +0 -2
  118. package/dist/chunk-0sm25gee.js +0 -2
  119. package/dist/chunk-18xha279.js +0 -2
  120. package/dist/chunk-1tx3t9ke.js +0 -2
  121. package/dist/chunk-1w1h2tsf.js +0 -2
  122. package/dist/chunk-2h90wcxe.js +0 -2
  123. package/dist/chunk-64kt1w23.js +0 -2
  124. package/dist/chunk-6gdenphk.js +0 -2
  125. package/dist/chunk-6pcnvdj9.js +0 -2
  126. package/dist/chunk-7m1ab6p8.js +0 -2
  127. package/dist/chunk-83yea9pk.js +0 -2
  128. package/dist/chunk-9exbsfz5.js +0 -2
  129. package/dist/chunk-b59zbkfx.js +0 -2
  130. package/dist/chunk-ffbbc38r.js +0 -2
  131. package/dist/chunk-hmymd6m2.js +0 -2
  132. package/dist/chunk-knpdntnh.js +0 -7
  133. package/dist/chunk-m1zv8db4.js +0 -2
  134. package/dist/chunk-m63hkte2.js +0 -2
  135. package/dist/chunk-njrezpsw.js +0 -2
  136. package/dist/chunk-qxf3f6ks.js +0 -2
  137. package/dist/chunk-rphwf28s.js +0 -2
  138. package/dist/chunk-sd5xqd44.js +0 -2
  139. package/dist/chunk-tbt8btwf.js +0 -2
  140. package/dist/chunk-tjvvb919.js +0 -2
  141. package/dist/chunk-vpsvtb9v.js +0 -2
  142. package/dist/chunk-xdrvb89m.js +0 -44
  143. package/dist/chunk-xxwevpnr.js +0 -2
  144. package/dist/chunk-yf01hyxn.js +0 -2
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{qd as N}from"./chunk-0f1xye20.js";import{vd as M}from"./chunk-5jvde2as.js";import{ee as T}from"./chunk-0g4ybxwj.js";import{je as L,ke as _}from"./chunk-b6a5txek.js";var D=["major","minor","patch","all"],m=["merge","squash","rebase"],P=["patch-only","minor-only","security-only","all"],R=["anthropic","openai","google","openrouter","openai-compatible"],A=["low","medium","high"],S=["chill","assertive"],d=["never","critical"],q=["low","moderate","high","critical"],E=["silent","error","warn","info","debug"],w=["npm","composer","github-actions","docker","pkgx","zig","python","rust","go","ruby"],b=["major","minor","patch"],U=T.map((J)=>J.name);function K(J){return JSON.stringify(J)}function Z(J){return typeof J==="object"&&J!==null&&!Array.isArray(J)}function Y(J,B,X,$){if(X===void 0)return;if(typeof X!=="string"||!$.includes(X))J.push({path:B,message:`expected one of ${$.map(K).join(", ")}, got ${K(X)}`})}function C(J,B,X,$={}){let Q=$.min??0,W=$.integer??!1;if(X===void 0)return;if(typeof X!=="number"||!Number.isFinite(X)||X<Q){J.push({path:B,message:`expected a number >= ${Q}, got ${K(X)}`});return}if(W&&!Number.isInteger(X))J.push({path:B,message:`expected a whole number, got ${K(X)}`})}function j(J,B,X,$){if(X===void 0)return;if(!Array.isArray(X)){J.push({path:B,message:`expected an array, got ${K(X)}`});return}X.forEach((Q,W)=>Y(J,`${B}[${W}]`,Q,$))}function F(J,B,X){if(X===void 0)return;if(!Array.isArray(X)){J.push({path:B,message:`expected an array of strings, got ${K(X)}`});return}X.forEach(($,Q)=>{if(typeof $!=="string"||!$.trim())J.push({path:`${B}[${Q}]`,message:`expected a non-empty string, got ${K($)}`})})}function G(J,B,X){if(X===void 0)return;if(typeof X!=="string"){J.push({path:B,message:`expected a URL string, got ${K(X)}`});return}try{let $=new URL(X);if($.protocol!=="http:"&&$.protocol!=="https:")J.push({path:B,message:`expected an http(s) URL, got ${K(X)}`})}catch{J.push({path:B,message:`expected a valid absolute URL, got ${K(X)}`})}}function x(J,B,X){if(X===void 0)return;if(typeof X!=="string"||!X.trim()){J.push({path:B,message:`expected a cron expression string, got ${K(X)}`});return}let $=X.trim().split(/\s+/);if($.length!==5&&$.length!==6)J.push({path:B,message:`expected 5 or 6 whitespace-separated fields, got ${$.length} (${K(X)})`})}function p(J){let B=[];if(J.verbose!==void 0&&typeof J.verbose!=="boolean")B.push({path:"verbose",message:`expected a boolean, got ${K(J.verbose)}`});return Y(B,"logLevel",J.logLevel,E),C(B,"maxPRsPerRun",J.maxPRsPerRun,{min:1,integer:!0}),h(B,J),v(B,J),n(B,J),l(B,J),t(B,J),r(B,J),o(B,J),a(B,J),i(B,J),c(B,J),y(B,J),B}function f(J,B){if(B===void 0)return;if(!Z(B)){J.push({path:"registries.docker",message:`expected an object keyed by registry host, got ${K(B)}`});return}for(let[X,$]of Object.entries(B)){let Q=`registries.docker.${X}`;if(!Z($)){J.push({path:Q,message:`expected an object, got ${K($)}`});continue}for(let W of["username","passwordEnv","tokenEnv"]){let H=$[W];if(H!==void 0&&(typeof H!=="string"||!H.trim()))J.push({path:`${Q}.${W}`,message:`expected a non-empty string, got ${K(H)}`})}if($.username&&!$.passwordEnv&&!$.tokenEnv)J.push({path:`${Q}.passwordEnv`,message:"is required when a username is given"});if($.passwordEnv&&!$.username)J.push({path:`${Q}.username`,message:"is required when passwordEnv is given"})}}function y(J,B){let X=B.analysis;if(X===void 0)return;if(!Z(X)){J.push({path:"analysis",message:`expected an object, got ${K(X)}`});return}if(X.enabled!==void 0&&typeof X.enabled!=="boolean")J.push({path:"analysis.enabled",message:`expected a boolean, got ${K(X.enabled)}`});if(X.tools===void 0)return;if(!Z(X.tools)){J.push({path:"analysis.tools",message:`expected an object mapping analyzer names to booleans, got ${K(X.tools)}`});return}for(let[$,Q]of Object.entries(X.tools))if(typeof Q!=="boolean")J.push({path:`analysis.tools.${$}`,message:`expected a boolean, got ${K(Q)}`});else if(!U.includes($))J.push({path:`analysis.tools.${$}`,message:`unknown analyzer; expected one of ${U.map(K).join(", ")}`})}function h(J,B){let X=B.repository;if(X===void 0)return;if(!Z(X)){J.push({path:"repository",message:`expected an object, got ${K(X)}`});return}if(X.provider!==void 0&&!L.includes(X.provider)){let $=_[String(X.provider)];J.push({path:"repository.provider",message:$?`${K(X.provider)} support is not implemented yet \u2014 follow ${$}`:`only ${L.map(K).join(", ")} is supported, got ${K(X.provider)}`})}for(let $ of["owner","name","baseBranch","token"]){let Q=X[$];if(Q!==void 0&&typeof Q!=="string")J.push({path:`repository.${$}`,message:`expected a string, got ${K(Q)}`})}G(J,"repository.apiUrl",X.apiUrl),G(J,"repository.serverUrl",X.serverUrl)}function v(J,B){let X=B.packages;if(X===void 0)return;if(!Z(X)){J.push({path:"packages",message:`expected an object, got ${K(X)}`});return}Y(J,"packages.strategy",X.strategy,D),F(J,"packages.ignore",X.ignore),F(J,"packages.ignorePaths",X.ignorePaths),F(J,"packages.minimumReleaseAgeExclude",X.minimumReleaseAgeExclude),C(J,"packages.minimumReleaseAge",X.minimumReleaseAge,{min:0});for(let $ of["includePrerelease","excludeMajor","respectLatest","engines"]){let Q=X[$];if(Q!==void 0&&typeof Q!=="boolean")J.push({path:`packages.${$}`,message:`expected a boolean, got ${K(Q)}`})}if(X.pin!==void 0){if(!Z(X.pin))J.push({path:"packages.pin",message:`expected an object mapping package names to versions, got ${K(X.pin)}`});else for(let[$,Q]of Object.entries(X.pin))if(typeof Q!=="string"||!Q.trim())J.push({path:`packages.pin.${$}`,message:`expected a version string, got ${K(Q)}`})}if(X.groups!==void 0){if(!Array.isArray(X.groups)){J.push({path:"packages.groups",message:`expected an array of groups, got ${K(X.groups)}`});return}X.groups.forEach(($,Q)=>{let W=`packages.groups[${Q}]`;if(!Z($)){J.push({path:W,message:`expected an object, got ${K($)}`});return}if(typeof $.name!=="string"||!$.name.trim())J.push({path:`${W}.name`,message:`expected a non-empty string, got ${K($.name)}`});if(!Array.isArray($.patterns)||$.patterns.length===0)J.push({path:`${W}.patterns`,message:`expected a non-empty array of patterns, got ${K($.patterns)}`});else F(J,`${W}.patterns`,$.patterns);Y(J,`${W}.strategy`,$.strategy,D)})}g(J,X.rules)}var I=["matchPackages","matchEcosystems","matchDepTypes","matchUpdateTypes","matchFiles","matchCurrentVersion","schedule"],k=["enabled","strategy","groupName","labels","reviewers","assignees","autoMerge","autoMigrate","minimumReleaseAge","prPriority","scheduleTimezone"];function g(J,B){if(B===void 0)return;if(!Array.isArray(B)){J.push({path:"packages.rules",message:`expected an array of rules, got ${K(B)}`});return}let X=new Set([...I,...k]);B.forEach(($,Q)=>{let W=`packages.rules[${Q}]`;if(!Z($)){J.push({path:W,message:`expected an object, got ${K($)}`});return}for(let z of Object.keys($))if(!X.has(z))J.push({path:`${W}.${z}`,message:`unknown key; expected one of ${[...X].map(K).join(", ")}`});if(!I.some((z)=>$[z]!==void 0))J.push({path:W,message:'has no matchers, so it applies to every update \u2014 add `matchPackages: ["*"]` if that is intended'});if(F(J,`${W}.matchPackages`,$.matchPackages),F(J,`${W}.matchDepTypes`,$.matchDepTypes),F(J,`${W}.matchFiles`,$.matchFiles),F(J,`${W}.labels`,$.labels),F(J,`${W}.reviewers`,$.reviewers),F(J,`${W}.assignees`,$.assignees),j(J,`${W}.matchEcosystems`,$.matchEcosystems,w),j(J,`${W}.matchUpdateTypes`,$.matchUpdateTypes,b),Y(J,`${W}.strategy`,$.strategy,D),C(J,`${W}.minimumReleaseAge`,$.minimumReleaseAge,{min:0}),$.prPriority!==void 0&&typeof $.prPriority!=="number")J.push({path:`${W}.prPriority`,message:`expected a number, got ${K($.prPriority)}`});for(let z of["enabled","autoMerge","autoMigrate"])if($[z]!==void 0&&typeof $[z]!=="boolean")J.push({path:`${W}.${z}`,message:`expected a boolean, got ${K($[z])}`});for(let z of["groupName","matchCurrentVersion","scheduleTimezone"])if($[z]!==void 0&&(typeof $[z]!=="string"||!String($[z]).trim()))J.push({path:`${W}.${z}`,message:`expected a non-empty string, got ${K($[z])}`});x(J,`${W}.schedule`,$.schedule)})}function n(J,B){let X=B.pullRequest;if(X===void 0)return;if(!Z(X)){J.push({path:"pullRequest",message:`expected an object, got ${K(X)}`});return}F(J,"pullRequest.reviewers",X.reviewers),F(J,"pullRequest.assignees",X.assignees),F(J,"pullRequest.labels",X.labels);let $=X.autoMerge;if($!==void 0){if(!Z($)){J.push({path:"pullRequest.autoMerge",message:`expected an object, got ${K($)}`});return}if($.enabled!==void 0&&typeof $.enabled!=="boolean")J.push({path:"pullRequest.autoMerge.enabled",message:`expected a boolean, got ${K($.enabled)}`});if(Y(J,"pullRequest.autoMerge.strategy",$.strategy,m),F(J,"pullRequest.autoMerge.conditions",$.conditions),Array.isArray($.conditions))for(let[Q,W]of $.conditions.entries())Y(J,`pullRequest.autoMerge.conditions[${Q}]`,W,P);if($.requireGreenCI!==void 0&&typeof $.requireGreenCI!=="boolean")J.push({path:"pullRequest.autoMerge.requireGreenCI",message:`expected a boolean, got ${K($.requireGreenCI)}`});if($.optOutLabel!==void 0&&typeof $.optOutLabel!=="string")J.push({path:"pullRequest.autoMerge.optOutLabel",message:`expected a string, got ${K($.optOutLabel)}`})}}function c(J,B){let X=B.ai;if(X===void 0)return;if(!Z(X)){J.push({path:"ai",message:`expected an object, got ${K(X)}`});return}if(X.enabled!==void 0&&typeof X.enabled!=="boolean")J.push({path:"ai.enabled",message:`expected a boolean, got ${K(X.enabled)}`});Y(J,"ai.provider",X.provider,R),Y(J,"ai.effort",X.effort,A);for(let Q of["model","apiKeyEnv","baseUrl"])if(X[Q]!==void 0&&typeof X[Q]!=="string")J.push({path:`ai.${Q}`,message:`expected a string, got ${K(X[Q])}`});if(typeof X.apiKeyEnv==="string"&&/^sk-|^AIza/.test(X.apiKeyEnv))J.push({path:"ai.apiKeyEnv",message:"expected the NAME of an environment variable, not an API key"});let $=X.review;if($!==void 0)if(!Z($))J.push({path:"ai.review",message:`expected an object, got ${K($)}`});else{for(let Q of["enabled","drafts","autoReview","summaryOnly"])if($[Q]!==void 0&&typeof $[Q]!=="boolean")J.push({path:`ai.review.${Q}`,message:`expected a boolean, got ${K($[Q])}`});if(Y(J,"ai.review.profile",$.profile,S),Y(J,"ai.review.requestChangesOn",$.requestChangesOn,d),F(J,"ai.review.ignoreTitleKeywords",$.ignoreTitleKeywords),F(J,"ai.review.ignoreUsernames",$.ignoreUsernames),F(J,"ai.review.pathFilters",$.pathFilters),$.instructions!==void 0&&typeof $.instructions!=="string")J.push({path:"ai.review.instructions",message:`expected a string, got ${K($.instructions)}`});if($.guidelineFiles!==void 0&&$.guidelineFiles!==!1)F(J,"ai.review.guidelineFiles",$.guidelineFiles);if($.pathInstructions!==void 0)if(!Array.isArray($.pathInstructions))J.push({path:"ai.review.pathInstructions",message:`expected an array, got ${K($.pathInstructions)}`});else $.pathInstructions.forEach((Q,W)=>{let H=`ai.review.pathInstructions[${W}]`;if(!Z(Q)){J.push({path:H,message:`expected an object, got ${K(Q)}`});return}for(let z of["path","instructions"])if(typeof Q[z]!=="string"||!Q[z].trim())J.push({path:`${H}.${z}`,message:`expected a non-empty string, got ${K(Q[z])}`})})}if(X.maxTokensPerRun!==void 0){if(typeof X.maxTokensPerRun!=="number"||!Number.isFinite(X.maxTokensPerRun)||X.maxTokensPerRun<=0)J.push({path:"ai.maxTokensPerRun",message:`expected a positive number, got ${K(X.maxTokensPerRun)}`})}}function l(J,B){let X=B.registries;if(X===void 0)return;if(!Z(X)){J.push({path:"registries",message:`expected an object, got ${K(X)}`});return}if(f(J,X.docker),G(J,"registries.npm",X.npm),G(J,"registries.composer",X.composer),X.npmScopes!==void 0){if(!Z(X.npmScopes)){J.push({path:"registries.npmScopes",message:`expected an object keyed by scope, got ${K(X.npmScopes)}`});return}for(let[$,Q]of Object.entries(X.npmScopes)){if(!$.startsWith("@"))J.push({path:`registries.npmScopes.${$}`,message:`scope keys must start with "@", got ${K($)}`});G(J,`registries.npmScopes.${$}`,Q)}}}function t(J,B){let X=B.security;if(X===void 0)return;if(!Z(X)){J.push({path:"security",message:`expected an object, got ${K(X)}`});return}for(let $ of["enabled","prioritize"]){let Q=X[$];if(Q!==void 0&&typeof Q!=="boolean")J.push({path:`security.${$}`,message:`expected a boolean, got ${K(Q)}`})}if(X.label!==void 0&&(typeof X.label!=="string"||!X.label.trim()))J.push({path:"security.label",message:`expected a non-empty string, got ${K(X.label)}`});Y(J,"security.minimumSeverity",X.minimumSeverity,q)}function r(J,B){if(B.schedule!==void 0){if(!Z(B.schedule))J.push({path:"schedule",message:`expected an object, got ${K(B.schedule)}`});else if(x(J,"schedule.cron",B.schedule.cron),B.schedule.timezone!==void 0&&typeof B.schedule.timezone!=="string")J.push({path:"schedule.timezone",message:`expected a string, got ${K(B.schedule.timezone)}`})}let X=B.workflows?.custom;if(X===void 0)return;if(!Array.isArray(X)){J.push({path:"workflows.custom",message:`expected an array, got ${K(X)}`});return}X.forEach(($,Q)=>{let W=`workflows.custom[${Q}]`;if(!Z($)){J.push({path:W,message:`expected an object, got ${K($)}`});return}if(typeof $.name!=="string"||!$.name.trim())J.push({path:`${W}.name`,message:`expected a non-empty string, got ${K($.name)}`});x(J,`${W}.schedule`,$.schedule),Y(J,`${W}.strategy`,$.strategy,D),F(J,`${W}.reviewers`,$.reviewers),F(J,`${W}.assignees`,$.assignees),F(J,`${W}.labels`,$.labels)})}function o(J,B){let X=B.releaseNotes;if(X===void 0)return;if(!Z(X)){J.push({path:"releaseNotes",message:`expected an object, got ${K(X)}`});return}for(let $ of["enabled","sanitizeReferences","includeCompareLinks"]){let Q=X[$];if(Q!==void 0&&typeof Q!=="boolean")J.push({path:`releaseNotes.${$}`,message:`expected a boolean, got ${K(Q)}`})}C(J,"releaseNotes.maxReleases",X.maxReleases,{min:1,integer:!0}),C(J,"releaseNotes.maxBodyLength",X.maxBodyLength,{min:1,integer:!0})}function a(J,B){let X=B.dashboard;if(X===void 0)return;if(!Z(X)){J.push({path:"dashboard",message:`expected an object, got ${K(X)}`});return}if(F(J,"dashboard.labels",X.labels),F(J,"dashboard.assignees",X.assignees),C(J,"dashboard.issueNumber",X.issueNumber,{min:1,integer:!0}),X.title!==void 0&&(typeof X.title!=="string"||!X.title.trim()))J.push({path:"dashboard.title",message:`expected a non-empty string, got ${K(X.title)}`})}function i(J,B){let X=B.notifications;if(X===void 0)return;if(!Z(X)){J.push({path:"notifications",message:`expected an object, got ${K(X)}`});return}let $=(H,z)=>{if(z===void 0)return;if(!Array.isArray(z)){J.push({path:H,message:`expected an array of event names, got ${K(z)}`});return}z.forEach((V,O)=>{Y(J,`${H}[${O}]`,V,M)})},Q=(H,z)=>{if(z!==void 0&&(typeof z!=="string"||!z.trim()))J.push({path:H,message:`expected an environment variable name, got ${K(z)}`})};for(let H of["slack","discord"]){let z=X[H];if(z===void 0)continue;if(!Z(z)){J.push({path:`notifications.${H}`,message:`expected an object, got ${K(z)}`});continue}Q(`notifications.${H}.webhookEnv`,z.webhookEnv),$(`notifications.${H}.events`,z.events)}let W=X.webhooks;if(W===void 0)return;if(!Array.isArray(W)){J.push({path:"notifications.webhooks",message:`expected an array, got ${K(W)}`});return}W.forEach((H,z)=>{let V=`notifications.webhooks[${z}]`;if(!Z(H)){J.push({path:V,message:`expected an object, got ${K(H)}`});return}if(H.url===void 0)J.push({path:`${V}.url`,message:"a webhook needs a url"});else G(J,`${V}.url`,H.url);Q(`${V}.secretEnv`,H.secretEnv),$(`${V}.events`,H.events)})}function u(J){return J.map((B)=>` \u2022 ${B.path}: ${B.message}`).join(`
2
+ import{qd as N}from"./chunk-0f1xye20.js";import{vd as M}from"./chunk-ebnc6980.js";import{ee as T}from"./chunk-2b07w74s.js";import{je as L,ke as _}from"./chunk-y1d6e0ye.js";var D=["major","minor","patch","all"],m=["merge","squash","rebase"],P=["patch-only","minor-only","security-only","all"],R=["anthropic","openai","google","openrouter","openai-compatible"],A=["low","medium","high"],S=["chill","assertive"],d=["never","critical"],q=["low","moderate","high","critical"],E=["silent","error","warn","info","debug"],w=["npm","composer","github-actions","docker","pkgx","zig","python","rust","go","ruby"],b=["major","minor","patch"],U=T.map((J)=>J.name);function K(J){return JSON.stringify(J)}function Z(J){return typeof J==="object"&&J!==null&&!Array.isArray(J)}function Y(J,B,X,$){if(X===void 0)return;if(typeof X!=="string"||!$.includes(X))J.push({path:B,message:`expected one of ${$.map(K).join(", ")}, got ${K(X)}`})}function C(J,B,X,$={}){let Q=$.min??0,W=$.integer??!1;if(X===void 0)return;if(typeof X!=="number"||!Number.isFinite(X)||X<Q){J.push({path:B,message:`expected a number >= ${Q}, got ${K(X)}`});return}if(W&&!Number.isInteger(X))J.push({path:B,message:`expected a whole number, got ${K(X)}`})}function j(J,B,X,$){if(X===void 0)return;if(!Array.isArray(X)){J.push({path:B,message:`expected an array, got ${K(X)}`});return}X.forEach((Q,W)=>Y(J,`${B}[${W}]`,Q,$))}function F(J,B,X){if(X===void 0)return;if(!Array.isArray(X)){J.push({path:B,message:`expected an array of strings, got ${K(X)}`});return}X.forEach(($,Q)=>{if(typeof $!=="string"||!$.trim())J.push({path:`${B}[${Q}]`,message:`expected a non-empty string, got ${K($)}`})})}function G(J,B,X){if(X===void 0)return;if(typeof X!=="string"){J.push({path:B,message:`expected a URL string, got ${K(X)}`});return}try{let $=new URL(X);if($.protocol!=="http:"&&$.protocol!=="https:")J.push({path:B,message:`expected an http(s) URL, got ${K(X)}`})}catch{J.push({path:B,message:`expected a valid absolute URL, got ${K(X)}`})}}function x(J,B,X){if(X===void 0)return;if(typeof X!=="string"||!X.trim()){J.push({path:B,message:`expected a cron expression string, got ${K(X)}`});return}let $=X.trim().split(/\s+/);if($.length!==5&&$.length!==6)J.push({path:B,message:`expected 5 or 6 whitespace-separated fields, got ${$.length} (${K(X)})`})}function p(J){let B=[];if(J.verbose!==void 0&&typeof J.verbose!=="boolean")B.push({path:"verbose",message:`expected a boolean, got ${K(J.verbose)}`});return Y(B,"logLevel",J.logLevel,E),C(B,"maxPRsPerRun",J.maxPRsPerRun,{min:1,integer:!0}),h(B,J),v(B,J),n(B,J),l(B,J),t(B,J),r(B,J),o(B,J),a(B,J),i(B,J),c(B,J),y(B,J),B}function f(J,B){if(B===void 0)return;if(!Z(B)){J.push({path:"registries.docker",message:`expected an object keyed by registry host, got ${K(B)}`});return}for(let[X,$]of Object.entries(B)){let Q=`registries.docker.${X}`;if(!Z($)){J.push({path:Q,message:`expected an object, got ${K($)}`});continue}for(let W of["username","passwordEnv","tokenEnv"]){let H=$[W];if(H!==void 0&&(typeof H!=="string"||!H.trim()))J.push({path:`${Q}.${W}`,message:`expected a non-empty string, got ${K(H)}`})}if($.username&&!$.passwordEnv&&!$.tokenEnv)J.push({path:`${Q}.passwordEnv`,message:"is required when a username is given"});if($.passwordEnv&&!$.username)J.push({path:`${Q}.username`,message:"is required when passwordEnv is given"})}}function y(J,B){let X=B.analysis;if(X===void 0)return;if(!Z(X)){J.push({path:"analysis",message:`expected an object, got ${K(X)}`});return}if(X.enabled!==void 0&&typeof X.enabled!=="boolean")J.push({path:"analysis.enabled",message:`expected a boolean, got ${K(X.enabled)}`});if(X.tools===void 0)return;if(!Z(X.tools)){J.push({path:"analysis.tools",message:`expected an object mapping analyzer names to booleans, got ${K(X.tools)}`});return}for(let[$,Q]of Object.entries(X.tools))if(typeof Q!=="boolean")J.push({path:`analysis.tools.${$}`,message:`expected a boolean, got ${K(Q)}`});else if(!U.includes($))J.push({path:`analysis.tools.${$}`,message:`unknown analyzer; expected one of ${U.map(K).join(", ")}`})}function h(J,B){let X=B.repository;if(X===void 0)return;if(!Z(X)){J.push({path:"repository",message:`expected an object, got ${K(X)}`});return}if(X.provider!==void 0&&!L.includes(X.provider)){let $=_[String(X.provider)];J.push({path:"repository.provider",message:$?`${K(X.provider)} support is not implemented yet \u2014 follow ${$}`:`only ${L.map(K).join(", ")} is supported, got ${K(X.provider)}`})}for(let $ of["owner","name","baseBranch","token"]){let Q=X[$];if(Q!==void 0&&typeof Q!=="string")J.push({path:`repository.${$}`,message:`expected a string, got ${K(Q)}`})}G(J,"repository.apiUrl",X.apiUrl),G(J,"repository.serverUrl",X.serverUrl)}function v(J,B){let X=B.packages;if(X===void 0)return;if(!Z(X)){J.push({path:"packages",message:`expected an object, got ${K(X)}`});return}Y(J,"packages.strategy",X.strategy,D),F(J,"packages.ignore",X.ignore),F(J,"packages.ignorePaths",X.ignorePaths),F(J,"packages.minimumReleaseAgeExclude",X.minimumReleaseAgeExclude),C(J,"packages.minimumReleaseAge",X.minimumReleaseAge,{min:0});for(let $ of["includePrerelease","excludeMajor","respectLatest","engines"]){let Q=X[$];if(Q!==void 0&&typeof Q!=="boolean")J.push({path:`packages.${$}`,message:`expected a boolean, got ${K(Q)}`})}if(X.pin!==void 0){if(!Z(X.pin))J.push({path:"packages.pin",message:`expected an object mapping package names to versions, got ${K(X.pin)}`});else for(let[$,Q]of Object.entries(X.pin))if(typeof Q!=="string"||!Q.trim())J.push({path:`packages.pin.${$}`,message:`expected a version string, got ${K(Q)}`})}if(X.groups!==void 0){if(!Array.isArray(X.groups)){J.push({path:"packages.groups",message:`expected an array of groups, got ${K(X.groups)}`});return}X.groups.forEach(($,Q)=>{let W=`packages.groups[${Q}]`;if(!Z($)){J.push({path:W,message:`expected an object, got ${K($)}`});return}if(typeof $.name!=="string"||!$.name.trim())J.push({path:`${W}.name`,message:`expected a non-empty string, got ${K($.name)}`});if(!Array.isArray($.patterns)||$.patterns.length===0)J.push({path:`${W}.patterns`,message:`expected a non-empty array of patterns, got ${K($.patterns)}`});else F(J,`${W}.patterns`,$.patterns);Y(J,`${W}.strategy`,$.strategy,D)})}g(J,X.rules)}var I=["matchPackages","matchEcosystems","matchDepTypes","matchUpdateTypes","matchFiles","matchCurrentVersion","schedule"],k=["enabled","strategy","groupName","labels","reviewers","assignees","autoMerge","autoMigrate","minimumReleaseAge","prPriority","scheduleTimezone"];function g(J,B){if(B===void 0)return;if(!Array.isArray(B)){J.push({path:"packages.rules",message:`expected an array of rules, got ${K(B)}`});return}let X=new Set([...I,...k]);B.forEach(($,Q)=>{let W=`packages.rules[${Q}]`;if(!Z($)){J.push({path:W,message:`expected an object, got ${K($)}`});return}for(let z of Object.keys($))if(!X.has(z))J.push({path:`${W}.${z}`,message:`unknown key; expected one of ${[...X].map(K).join(", ")}`});if(!I.some((z)=>$[z]!==void 0))J.push({path:W,message:'has no matchers, so it applies to every update \u2014 add `matchPackages: ["*"]` if that is intended'});if(F(J,`${W}.matchPackages`,$.matchPackages),F(J,`${W}.matchDepTypes`,$.matchDepTypes),F(J,`${W}.matchFiles`,$.matchFiles),F(J,`${W}.labels`,$.labels),F(J,`${W}.reviewers`,$.reviewers),F(J,`${W}.assignees`,$.assignees),j(J,`${W}.matchEcosystems`,$.matchEcosystems,w),j(J,`${W}.matchUpdateTypes`,$.matchUpdateTypes,b),Y(J,`${W}.strategy`,$.strategy,D),C(J,`${W}.minimumReleaseAge`,$.minimumReleaseAge,{min:0}),$.prPriority!==void 0&&typeof $.prPriority!=="number")J.push({path:`${W}.prPriority`,message:`expected a number, got ${K($.prPriority)}`});for(let z of["enabled","autoMerge","autoMigrate"])if($[z]!==void 0&&typeof $[z]!=="boolean")J.push({path:`${W}.${z}`,message:`expected a boolean, got ${K($[z])}`});for(let z of["groupName","matchCurrentVersion","scheduleTimezone"])if($[z]!==void 0&&(typeof $[z]!=="string"||!String($[z]).trim()))J.push({path:`${W}.${z}`,message:`expected a non-empty string, got ${K($[z])}`});x(J,`${W}.schedule`,$.schedule)})}function n(J,B){let X=B.pullRequest;if(X===void 0)return;if(!Z(X)){J.push({path:"pullRequest",message:`expected an object, got ${K(X)}`});return}F(J,"pullRequest.reviewers",X.reviewers),F(J,"pullRequest.assignees",X.assignees),F(J,"pullRequest.labels",X.labels);let $=X.autoMerge;if($!==void 0){if(!Z($)){J.push({path:"pullRequest.autoMerge",message:`expected an object, got ${K($)}`});return}if($.enabled!==void 0&&typeof $.enabled!=="boolean")J.push({path:"pullRequest.autoMerge.enabled",message:`expected a boolean, got ${K($.enabled)}`});if(Y(J,"pullRequest.autoMerge.strategy",$.strategy,m),F(J,"pullRequest.autoMerge.conditions",$.conditions),Array.isArray($.conditions))for(let[Q,W]of $.conditions.entries())Y(J,`pullRequest.autoMerge.conditions[${Q}]`,W,P);if($.requireGreenCI!==void 0&&typeof $.requireGreenCI!=="boolean")J.push({path:"pullRequest.autoMerge.requireGreenCI",message:`expected a boolean, got ${K($.requireGreenCI)}`});if($.optOutLabel!==void 0&&typeof $.optOutLabel!=="string")J.push({path:"pullRequest.autoMerge.optOutLabel",message:`expected a string, got ${K($.optOutLabel)}`})}}function c(J,B){let X=B.ai;if(X===void 0)return;if(!Z(X)){J.push({path:"ai",message:`expected an object, got ${K(X)}`});return}if(X.enabled!==void 0&&typeof X.enabled!=="boolean")J.push({path:"ai.enabled",message:`expected a boolean, got ${K(X.enabled)}`});Y(J,"ai.provider",X.provider,R),Y(J,"ai.effort",X.effort,A);for(let Q of["model","apiKeyEnv","baseUrl"])if(X[Q]!==void 0&&typeof X[Q]!=="string")J.push({path:`ai.${Q}`,message:`expected a string, got ${K(X[Q])}`});if(typeof X.apiKeyEnv==="string"&&/^sk-|^AIza/.test(X.apiKeyEnv))J.push({path:"ai.apiKeyEnv",message:"expected the NAME of an environment variable, not an API key"});let $=X.review;if($!==void 0)if(!Z($))J.push({path:"ai.review",message:`expected an object, got ${K($)}`});else{for(let Q of["enabled","drafts","autoReview","summaryOnly"])if($[Q]!==void 0&&typeof $[Q]!=="boolean")J.push({path:`ai.review.${Q}`,message:`expected a boolean, got ${K($[Q])}`});if(Y(J,"ai.review.profile",$.profile,S),Y(J,"ai.review.requestChangesOn",$.requestChangesOn,d),F(J,"ai.review.ignoreTitleKeywords",$.ignoreTitleKeywords),F(J,"ai.review.ignoreUsernames",$.ignoreUsernames),F(J,"ai.review.pathFilters",$.pathFilters),$.instructions!==void 0&&typeof $.instructions!=="string")J.push({path:"ai.review.instructions",message:`expected a string, got ${K($.instructions)}`});if($.guidelineFiles!==void 0&&$.guidelineFiles!==!1)F(J,"ai.review.guidelineFiles",$.guidelineFiles);if($.pathInstructions!==void 0)if(!Array.isArray($.pathInstructions))J.push({path:"ai.review.pathInstructions",message:`expected an array, got ${K($.pathInstructions)}`});else $.pathInstructions.forEach((Q,W)=>{let H=`ai.review.pathInstructions[${W}]`;if(!Z(Q)){J.push({path:H,message:`expected an object, got ${K(Q)}`});return}for(let z of["path","instructions"])if(typeof Q[z]!=="string"||!Q[z].trim())J.push({path:`${H}.${z}`,message:`expected a non-empty string, got ${K(Q[z])}`})})}if(X.maxTokensPerRun!==void 0){if(typeof X.maxTokensPerRun!=="number"||!Number.isFinite(X.maxTokensPerRun)||X.maxTokensPerRun<=0)J.push({path:"ai.maxTokensPerRun",message:`expected a positive number, got ${K(X.maxTokensPerRun)}`})}}function l(J,B){let X=B.registries;if(X===void 0)return;if(!Z(X)){J.push({path:"registries",message:`expected an object, got ${K(X)}`});return}if(f(J,X.docker),G(J,"registries.npm",X.npm),G(J,"registries.composer",X.composer),X.npmScopes!==void 0){if(!Z(X.npmScopes)){J.push({path:"registries.npmScopes",message:`expected an object keyed by scope, got ${K(X.npmScopes)}`});return}for(let[$,Q]of Object.entries(X.npmScopes)){if(!$.startsWith("@"))J.push({path:`registries.npmScopes.${$}`,message:`scope keys must start with "@", got ${K($)}`});G(J,`registries.npmScopes.${$}`,Q)}}}function t(J,B){let X=B.security;if(X===void 0)return;if(!Z(X)){J.push({path:"security",message:`expected an object, got ${K(X)}`});return}for(let $ of["enabled","prioritize"]){let Q=X[$];if(Q!==void 0&&typeof Q!=="boolean")J.push({path:`security.${$}`,message:`expected a boolean, got ${K(Q)}`})}if(X.label!==void 0&&(typeof X.label!=="string"||!X.label.trim()))J.push({path:"security.label",message:`expected a non-empty string, got ${K(X.label)}`});Y(J,"security.minimumSeverity",X.minimumSeverity,q)}function r(J,B){if(B.schedule!==void 0){if(!Z(B.schedule))J.push({path:"schedule",message:`expected an object, got ${K(B.schedule)}`});else if(x(J,"schedule.cron",B.schedule.cron),B.schedule.timezone!==void 0&&typeof B.schedule.timezone!=="string")J.push({path:"schedule.timezone",message:`expected a string, got ${K(B.schedule.timezone)}`})}let X=B.workflows?.custom;if(X===void 0)return;if(!Array.isArray(X)){J.push({path:"workflows.custom",message:`expected an array, got ${K(X)}`});return}X.forEach(($,Q)=>{let W=`workflows.custom[${Q}]`;if(!Z($)){J.push({path:W,message:`expected an object, got ${K($)}`});return}if(typeof $.name!=="string"||!$.name.trim())J.push({path:`${W}.name`,message:`expected a non-empty string, got ${K($.name)}`});x(J,`${W}.schedule`,$.schedule),Y(J,`${W}.strategy`,$.strategy,D),F(J,`${W}.reviewers`,$.reviewers),F(J,`${W}.assignees`,$.assignees),F(J,`${W}.labels`,$.labels)})}function o(J,B){let X=B.releaseNotes;if(X===void 0)return;if(!Z(X)){J.push({path:"releaseNotes",message:`expected an object, got ${K(X)}`});return}for(let $ of["enabled","sanitizeReferences","includeCompareLinks"]){let Q=X[$];if(Q!==void 0&&typeof Q!=="boolean")J.push({path:`releaseNotes.${$}`,message:`expected a boolean, got ${K(Q)}`})}C(J,"releaseNotes.maxReleases",X.maxReleases,{min:1,integer:!0}),C(J,"releaseNotes.maxBodyLength",X.maxBodyLength,{min:1,integer:!0})}function a(J,B){let X=B.dashboard;if(X===void 0)return;if(!Z(X)){J.push({path:"dashboard",message:`expected an object, got ${K(X)}`});return}if(F(J,"dashboard.labels",X.labels),F(J,"dashboard.assignees",X.assignees),C(J,"dashboard.issueNumber",X.issueNumber,{min:1,integer:!0}),X.title!==void 0&&(typeof X.title!=="string"||!X.title.trim()))J.push({path:"dashboard.title",message:`expected a non-empty string, got ${K(X.title)}`})}function i(J,B){let X=B.notifications;if(X===void 0)return;if(!Z(X)){J.push({path:"notifications",message:`expected an object, got ${K(X)}`});return}let $=(H,z)=>{if(z===void 0)return;if(!Array.isArray(z)){J.push({path:H,message:`expected an array of event names, got ${K(z)}`});return}z.forEach((V,O)=>{Y(J,`${H}[${O}]`,V,M)})},Q=(H,z)=>{if(z!==void 0&&(typeof z!=="string"||!z.trim()))J.push({path:H,message:`expected an environment variable name, got ${K(z)}`})};for(let H of["slack","discord"]){let z=X[H];if(z===void 0)continue;if(!Z(z)){J.push({path:`notifications.${H}`,message:`expected an object, got ${K(z)}`});continue}Q(`notifications.${H}.webhookEnv`,z.webhookEnv),$(`notifications.${H}.events`,z.events)}let W=X.webhooks;if(W===void 0)return;if(!Array.isArray(W)){J.push({path:"notifications.webhooks",message:`expected an array, got ${K(W)}`});return}W.forEach((H,z)=>{let V=`notifications.webhooks[${z}]`;if(!Z(H)){J.push({path:V,message:`expected an object, got ${K(H)}`});return}if(H.url===void 0)J.push({path:`${V}.url`,message:"a webhook needs a url"});else G(J,`${V}.url`,H.url);Q(`${V}.secretEnv`,H.secretEnv),$(`${V}.events`,H.events)})}function u(J){return J.map((B)=>` \u2022 ${B.path}: ${B.message}`).join(`
3
3
  `)}function $J(J){let B=p(J);if(B.length===0)return;throw new N(`Invalid buddy configuration (${B.length} issue${B.length===1?"":"s"}):
4
4
  ${u(B)}`,B[0].path)}
5
5
  export{p as Yc,u as Zc,$J as _c};