@buddysh/buddy 0.11.18 → 0.11.20
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/CHANGELOG.md +37 -0
- package/bin/cli.ts +81 -71
- package/dist/bin/cli.js +72 -108
- package/dist/bin/entry.js +1 -1
- package/dist/bin/stacks.js +1 -1
- package/dist/{chunk-1pecmenc.js → chunk-016ce171.js} +1 -1
- package/dist/{chunk-w3ktf7th.js → chunk-038mdwdf.js} +3 -3
- package/dist/{chunk-8efgn47g.js → chunk-0668q6tf.js} +1 -1
- package/dist/{chunk-r976qdkb.js → chunk-09wkxvnt.js} +2 -2
- package/dist/{chunk-2z9mh5y4.js → chunk-0cqhy9qh.js} +1 -1
- package/dist/{chunk-4yy4f6wc.js → chunk-0n78c2xd.js} +1 -1
- package/dist/{chunk-v9aakgat.js → chunk-1ajy5sev.js} +1 -1
- package/dist/{chunk-h3vdnyqy.js → chunk-1aw736x8.js} +1 -1
- package/dist/{chunk-b22d85q8.js → chunk-2mtwdyka.js} +1 -1
- package/dist/{chunk-vx23zjwq.js → chunk-2qwk5xfp.js} +2 -2
- package/dist/chunk-3nvrjrtp.js +2 -0
- package/dist/{chunk-b75yqx1f.js → chunk-3sbrd9az.js} +1 -1
- package/dist/{chunk-gs26n8tm.js → chunk-5qj3vteh.js} +2 -2
- package/dist/chunk-5xgq771b.js +2 -0
- package/dist/chunk-64nen17y.js +2 -0
- package/dist/{chunk-13cpe0kf.js → chunk-64zgq7hq.js} +2 -2
- package/dist/{chunk-6v9c84ds.js → chunk-6evq4y1q.js} +2 -2
- package/dist/{chunk-18wwzwcz.js → chunk-6jak98cy.js} +1 -1
- package/dist/{chunk-rxqph6cj.js → chunk-6njk0m4a.js} +2 -2
- package/dist/{chunk-yy8vb4yk.js → chunk-6zp71ecf.js} +1 -1
- package/dist/chunk-71mhymva.js +2 -0
- package/dist/{chunk-09qpgqgj.js → chunk-7523xqb9.js} +2 -2
- package/dist/{chunk-5107xbwj.js → chunk-75rj89c2.js} +2 -2
- package/dist/chunk-7dgdvzxn.js +2 -0
- package/dist/{chunk-24xvskkf.js → chunk-7h8qjayv.js} +1 -1
- package/dist/{chunk-cj4d5ad7.js → chunk-7khgke9n.js} +1 -1
- package/dist/{chunk-48a66w2p.js → chunk-7vk0vrwm.js} +2 -2
- package/dist/{chunk-56t2za4k.js → chunk-91gpxfta.js} +1 -1
- package/dist/chunk-9dtfray9.js +2 -0
- package/dist/{chunk-dbhgxe35.js → chunk-9g0am1m2.js} +2 -2
- package/dist/chunk-9k79e8wa.js +2 -0
- package/dist/{chunk-p09rsh3z.js → chunk-9rvapdmv.js} +2 -2
- package/dist/chunk-a1ta528t.js +2 -0
- package/dist/{chunk-jpbq9xqv.js → chunk-a7r9dwmt.js} +1 -1
- package/dist/chunk-aa8gbnyc.js +2 -0
- package/dist/chunk-aw70467z.js +2 -0
- package/dist/{chunk-97857d8t.js → chunk-b1ng5aqx.js} +2 -2
- package/dist/chunk-b7f35wap.js +2 -0
- package/dist/{chunk-ad8ws736.js → chunk-brk9jn8q.js} +1 -1
- package/dist/chunk-cb6g7nt3.js +2 -0
- package/dist/{chunk-142zh7e5.js → chunk-cbzc9ggs.js} +1 -1
- package/dist/{chunk-n2de4spv.js → chunk-cf5czw9m.js} +2 -2
- package/dist/{chunk-gkdmk7xt.js → chunk-cftyw099.js} +1 -1
- package/dist/chunk-cndn37he.js +2 -0
- package/dist/chunk-cpc1y0gs.js +2 -0
- package/dist/{chunk-zdh3gd22.js → chunk-cqh3eadc.js} +2 -2
- package/dist/chunk-csf42r3d.js +2 -0
- package/dist/{chunk-sveh3wjr.js → chunk-dmqptf7k.js} +2 -2
- package/dist/chunk-dvnshk0g.js +2 -0
- package/dist/{chunk-rzxj5fgp.js → chunk-dz2e81v7.js} +2 -2
- package/dist/{chunk-3zp7a103.js → chunk-ep7hn1za.js} +1 -1
- package/dist/chunk-ezjvwa4v.js +2 -0
- package/dist/{chunk-rb6gzts6.js → chunk-fanj4t6c.js} +2 -2
- package/dist/chunk-fr2rhvnt.js +2 -0
- package/dist/chunk-fr7tw9n2.js +2 -0
- package/dist/{chunk-0baffydm.js → chunk-g0ttytab.js} +2 -2
- package/dist/chunk-gcmx3cp6.js +2 -0
- package/dist/{chunk-nn9rcqsz.js → chunk-gn3tjadq.js} +2 -2
- package/dist/chunk-gqqqhe3n.js +2 -0
- package/dist/{chunk-yh13j2af.js → chunk-gt3m1eqn.js} +1 -1
- package/dist/{chunk-w20n4t27.js → chunk-h0bf6z4x.js} +2 -2
- package/dist/{chunk-dcbkac9x.js → chunk-jrkmj5ex.js} +1 -1
- package/dist/chunk-jzhsa1xh.js +2 -0
- package/dist/chunk-kebfqksf.js +2 -0
- package/dist/{chunk-kqwdg3nw.js → chunk-kfn6xbc6.js} +1 -1
- package/dist/{chunk-wjzravb7.js → chunk-m7v1dba6.js} +2 -2
- package/dist/chunk-me7y4rd3.js +3 -0
- package/dist/{chunk-nkwfez01.js → chunk-mpk7ypxd.js} +1 -1
- package/dist/{chunk-5czhqsvn.js → chunk-n1g9gs8x.js} +3 -3
- package/dist/{chunk-c5d5webv.js → chunk-n5mvfhd0.js} +2 -2
- package/dist/{chunk-s3t54kj1.js → chunk-n7hbbha7.js} +2 -2
- package/dist/{chunk-b27ezdzq.js → chunk-n8zfts91.js} +4 -4
- package/dist/{chunk-xaw1yts1.js → chunk-nap5dm82.js} +2 -2
- package/dist/chunk-nekgd2v5.js +2 -0
- package/dist/{chunk-q2tjkhez.js → chunk-np5qajht.js} +1 -1
- package/dist/{chunk-drn3hq53.js → chunk-nqgn0drz.js} +7 -7
- package/dist/{chunk-35wxea5y.js → chunk-nrm7vjmv.js} +2 -2
- package/dist/chunk-nwj826gp.js +2 -0
- package/dist/chunk-p0s7w67s.js +2 -0
- package/dist/{chunk-r7c4arkp.js → chunk-p59g8wwa.js} +1 -1
- package/dist/{chunk-2z54h4e9.js → chunk-pakq6dsv.js} +2 -2
- package/dist/{chunk-hzpsmg4z.js → chunk-q31cbz9d.js} +2 -2
- package/dist/{chunk-292qaqqe.js → chunk-q496yz80.js} +1 -1
- package/dist/chunk-q7250hvx.js +4 -0
- package/dist/chunk-q8wzcyxj.js +2 -0
- package/dist/{chunk-vna64r40.js → chunk-qeg388qq.js} +2 -2
- package/dist/{chunk-wkjv03yr.js → chunk-rad9rc2j.js} +1 -1
- package/dist/chunk-rbhz8bda.js +2 -0
- package/dist/{chunk-wm6g7y1r.js → chunk-rk5j5mcr.js} +1 -1
- package/dist/chunk-rma8b124.js +2 -0
- package/dist/chunk-s3g9x8wf.js +1043 -0
- package/dist/{chunk-j9xw849s.js → chunk-s44q0cps.js} +2 -2
- package/dist/{chunk-jan74vw2.js → chunk-s8apaa3h.js} +5 -5
- package/dist/chunk-sa2m2y9s.js +2 -0
- package/dist/{chunk-vjav82c6.js → chunk-skg1syjj.js} +1 -1
- package/dist/chunk-swmkkya0.js +2 -0
- package/dist/chunk-t64134ws.js +2 -0
- package/dist/{chunk-9mpeqda3.js → chunk-t68hsq01.js} +2 -2
- package/dist/{chunk-c067bnx5.js → chunk-t81252jj.js} +2 -2
- package/dist/{chunk-339ae7vn.js → chunk-tf0mb8m0.js} +2 -2
- package/dist/chunk-txpb6btd.js +2 -0
- package/dist/chunk-tzz4mpz5.js +2 -0
- package/dist/{chunk-0g44mytk.js → chunk-v32q2vv7.js} +1 -1
- package/dist/chunk-v8dteyvv.js +2 -0
- package/dist/{chunk-2k7b8te1.js → chunk-vcn1gemr.js} +1 -1
- package/dist/chunk-ve9xvyez.js +2 -0
- package/dist/chunk-vtjh07ea.js +2 -0
- package/dist/chunk-wc68652g.js +2 -0
- package/dist/{chunk-j46f90n8.js → chunk-we0x722x.js} +1 -1
- package/dist/{chunk-d3cqth47.js → chunk-weqbnsnn.js} +1 -1
- package/dist/{chunk-mm9b9pwb.js → chunk-wr7scn9c.js} +1 -1
- package/dist/{chunk-t74w5ddy.js → chunk-x33ryte5.js} +2 -2
- package/dist/{chunk-x9vpk4kk.js → chunk-x496v9vb.js} +1 -1
- package/dist/chunk-x7y2eh7c.js +2 -0
- package/dist/chunk-xd6sxr1m.js +3 -0
- package/dist/{chunk-ejfyc7r8.js → chunk-xdqk8fzw.js} +1 -1
- package/dist/chunk-xkhznax2.js +2 -0
- package/dist/{chunk-eaz23nsf.js → chunk-xmqv24zr.js} +1 -1
- package/dist/{chunk-0hrxtesf.js → chunk-xt0k22yx.js} +2 -2
- package/dist/{chunk-npjgqzfg.js → chunk-xx7cytzs.js} +2 -2
- package/dist/chunk-y59p36an.js +2 -0
- package/dist/{chunk-nznpzbq4.js → chunk-y5t07fny.js} +1 -1
- package/dist/{chunk-b8bfag6k.js → chunk-yknz94wd.js} +2 -2
- package/dist/{chunk-d2vrstjq.js → chunk-yzyqkwsc.js} +1 -1
- package/dist/{chunk-g482e1b0.js → chunk-zbk3g5vf.js} +3 -3
- package/dist/{chunk-249qcsjm.js → chunk-ze91acnq.js} +1 -1
- package/dist/chunk-zhgwbbj9.js +2 -0
- package/dist/chunk-zqrgvftj.js +3 -0
- package/dist/chunk-zza4y6dx.js +2 -0
- package/dist/src/index.js +1 -1
- package/dist/src/setup.js +1 -1
- package/package.json +2 -4
- package/dist/chunk-255r8t6k.js +0 -2
- package/dist/chunk-2c2bkhwj.js +0 -2
- package/dist/chunk-4aavwqyt.js +0 -2
- package/dist/chunk-6c6e5xgb.js +0 -2
- package/dist/chunk-7qp8ng5e.js +0 -2
- package/dist/chunk-7rdqaj9g.js +0 -2
- package/dist/chunk-87x43s85.js +0 -2
- package/dist/chunk-981xyxzj.js +0 -2
- package/dist/chunk-a12s15m8.js +0 -2
- package/dist/chunk-a7veqg3a.js +0 -2
- package/dist/chunk-b9b3xwar.js +0 -2
- package/dist/chunk-bjvx1r6g.js +0 -2
- package/dist/chunk-c7s8nsbr.js +0 -2
- package/dist/chunk-ckvtfmyg.js +0 -2
- package/dist/chunk-ems4rhqe.js +0 -2
- package/dist/chunk-erges5h8.js +0 -1070
- package/dist/chunk-f1d20z92.js +0 -2
- package/dist/chunk-f4rmh2s9.js +0 -2
- package/dist/chunk-ff1dah6m.js +0 -2
- package/dist/chunk-fz9th4yv.js +0 -2
- package/dist/chunk-haemkbh1.js +0 -2
- package/dist/chunk-hgcr63c6.js +0 -2
- package/dist/chunk-hh4zq6m0.js +0 -2
- package/dist/chunk-j5k195b6.js +0 -2
- package/dist/chunk-jf4s1r34.js +0 -2
- package/dist/chunk-k1w134pz.js +0 -2
- package/dist/chunk-ksght1x7.js +0 -2
- package/dist/chunk-mkfsh53w.js +0 -2
- package/dist/chunk-nfcxgb5d.js +0 -2
- package/dist/chunk-pbrpej0s.js +0 -2
- package/dist/chunk-pz2nmnhh.js +0 -2
- package/dist/chunk-sc4bxrwb.js +0 -2
- package/dist/chunk-tp3hze1v.js +0 -2
- package/dist/chunk-v02hzntq.js +0 -2
- package/dist/chunk-vg0pry4b.js +0 -2
- package/dist/chunk-vgys0c1v.js +0 -2
- package/dist/chunk-wk4rtet9.js +0 -2
- package/dist/chunk-wq4g8082.js +0 -2
- package/dist/chunk-x8dry63m.js +0 -2
- package/dist/chunk-y2zqnbbf.js +0 -2
- package/dist/chunk-z18bksyr.js +0 -3
- package/dist/chunk-za2yg8vc.js +0 -2
- package/dist/chunk-zrnfjw7d.js +0 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{Ad as N}from"./chunk-d2vrstjq.js";import{Fd as M}from"./chunk-s3t54kj1.js";import{ee as T}from"./chunk-n2de4spv.js";import{je as L,ke as _}from"./chunk-p09rsh3z.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{Dd as N}from"./chunk-yzyqkwsc.js";import{Id as M}from"./chunk-n7hbbha7.js";import{he as T}from"./chunk-cf5czw9m.js";import{me as L,ne as _}from"./chunk-9rvapdmv.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
|
-
export{p as
|
|
5
|
+
export{p as $c,u as ad,$J as bd};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{$ as h,U as a,V as b,W as c,X as d,Y as e,Z as f,_ as g,aa as i,ba as j,ca as k,da as l,ea as m,fa as n}from"./chunk-pakq6dsv.js";import"./chunk-rad9rc2j.js";import"./chunk-91gpxfta.js";import"./chunk-xmqv24zr.js";export{m as withNarrative,n as shouldPublishReport,l as renderReport,c as parseHistory,f as loadHistory,e as findPrevious,i as computeMetrics,j as computeDeltas,d as appendHistory,g as REPORT_PERIODS,k as REPORT_MARKER,h as PERIOD_DAYS,a as HISTORY_PATH,b as HISTORY_LIMIT};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{Ai as
|
|
2
|
+
import{Ai as c,Bi as r,Ci as n,Di as g,Ei as m,Fi as u,Gi as P,Hi as l,Ii as h,ui as a,vi as e,wi as o,xi as s,yi as t,zi as i}from"./chunk-nqgn0drz.js";import"./chunk-xmqv24zr.js";export{n as toPropertyKey,e as shouldProceedWithGitHubRequest,a as saveRateLimitInfo,s as saveGitHubPackageCache,u as resolvePackageDomain,i as logPkgxProjects,l as isKnownAlias,m as guessOriginalDomain,P as getPackageAliases,o as getGitHubPackageCache,h as getCanonicalDomain,c as formatObjectWithoutQuotedKeys,t as fetchPackageListFromGitHub,r as convertDomainToVarName,g as convertDomainToFileName};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{Nh as Z}from"./chunk-rad9rc2j.js";import{Yh as K}from"./chunk-91gpxfta.js";var R=".buddy/reports.jsonl",U=52;function X(M){if(!M?.trim())return[];let E=[];for(let j of M.split(`
|
|
3
3
|
`)){if(!j.trim())continue;try{let N=JSON.parse(j);if(N?.period&&N.generatedAt&&N.health&&N.activity)E.push(N)}catch{continue}}return E}function x(M,E){return`${[...M,E].slice(-U).map((N)=>JSON.stringify(N)).join(`
|
|
4
4
|
`)}
|
|
5
5
|
`}function W(M,E){for(let j=M.length-1;j>=0;j--)if(M[j].period===E)return M[j];return null}async function _(M,E,j=K()){try{return X(await M.getFileContent(R,E))}catch(N){return j.debug(`No report history at ${R}: ${N}`),[]}}var k=["7d","30d","90d"],O={"7d":7,"30d":30,"90d":90};function A(M){let E=new Date(M.now.getTime()-O[M.period]*24*60*60*1000),j=M.pullRequests.filter((q)=>M.branchPrefix?q.head.startsWith(M.branchPrefix):Z(q.head)),N=j.filter((q)=>q.createdAt>=E),C=j.filter((q)=>q.mergedAt!==void 0&&q.mergedAt>=E),z=j.filter((q)=>q.state==="closed"&&q.mergedAt===void 0&&q.updatedAt>=E),F=C.map((q)=>(q.mergedAt.getTime()-q.createdAt.getTime())/3600000).sort((q,Q)=>q-Q),H=Object.values(M.dependenciesByEcosystem).reduce((q,Q)=>q+Q,0),J=M.updates.length;return{period:M.period,generatedAt:M.now.toISOString(),health:{byEcosystem:{...M.dependenciesByEcosystem},total:H,outdated:J,outdatedPercent:H>0?Math.round(J/H*100):0,majorBehind:M.updates.filter((q)=>q.updateType==="major").length,vulnerable:M.updates.filter((q)=>(q.securityAdvisories?.length??0)>0).length,deprecated:M.deprecated??0,drifted:M.drifted??0},activity:{opened:N.length,merged:C.length,closed:z.length,open:j.filter((q)=>q.state==="open").length,medianHoursToMerge:L(F),mergeRate:N.length>0?Math.round(C.length/N.length*100):0}}}function L(M){if(M.length===0)return null;let E=Math.floor(M.length/2),j=M.length%2===0?(M[E-1]+M[E])/2:M[E];return Math.round(j*10)/10}function S(M,E){if(!E)return{};let j=new Set(["merged","mergeRate"]),N=[["outdated",M.health.outdated,E.health.outdated],["majorBehind",M.health.majorBehind,E.health.majorBehind],["vulnerable",M.health.vulnerable,E.health.vulnerable],["deprecated",M.health.deprecated,E.health.deprecated],["opened",M.activity.opened,E.activity.opened],["merged",M.activity.merged,E.activity.merged],["mergeRate",M.activity.mergeRate,E.activity.mergeRate]],C={};for(let[z,F,H]of N){let J=F-H;C[z]={current:F,previous:H,change:J,improved:j.has(z)?J>=0:J<=0}}return C}var $="<!-- buddy:report -->";function G(M){if(!M||M.change===0)return"\u2014";let E=M.change>0?"\u25B2":"\u25BC",j=M.change>0?"+":"";return`${E} ${j}${M.change}${M.improved?"":" \u26A0\uFE0F"}`}function T(M,E={}){let j=O[M.period],N=[$,"",`## Dependency report \u2014 last ${j} days`,"",`Generated ${M.generatedAt.slice(0,10)}.`,"","### Dependency health","","| Metric | Value | Change |","| --- | --- | --- |",`| Total dependencies | ${M.health.total} | |`,`| Outdated | ${M.health.outdated} (${M.health.outdatedPercent}%) | ${G(E.outdated)} |`,`| A major behind | ${M.health.majorBehind} | ${G(E.majorBehind)} |`,`| With known advisories | ${M.health.vulnerable} | ${G(E.vulnerable)} |`,`| Deprecated | ${M.health.deprecated} | ${G(E.deprecated)} |`];if(M.health.drifted>0)N.push(`| Held back by a dependant | ${M.health.drifted} | |`);N.push("","### By ecosystem","");let C=Object.entries(M.health.byEcosystem).filter(([,z])=>z>0).sort(([,z],[,F])=>F-z);if(C.length===0)N.push("No dependencies detected.");else{N.push("| Ecosystem | Dependencies |","| --- | --- |");for(let[z,F]of C)N.push(`| ${z} | ${F} |`)}if(N.push("","### Bot activity","","| Metric | Value | Change |","| --- | --- | --- |",`| Pull requests opened | ${M.activity.opened} | ${G(E.opened)} |`,`| Merged | ${M.activity.merged} | ${G(E.merged)} |`,`| Closed without merging | ${M.activity.closed} | |`,`| Currently open | ${M.activity.open} | |`),M.activity.medianHoursToMerge!==null)N.push(`| Median time to merge | ${w(M.activity.medianHoursToMerge)} | |`);if(N.push(`| Merged vs opened | ${M.activity.mergeRate}% | ${G(E.mergeRate)} |`),N.push("",`_"Merged vs opened" compares both counts within the same ${j}-day window, so`,"recently opened pull requests depress it by definition._"),Object.keys(E).length===0)N.push("","_No previous report to compare against; this is the baseline._");return N.join(`
|
|
6
6
|
`)}async function Y(M,E,j,N,C=K()){if(!j)return M;try{let F=(await j.complete({system:"You write short factual summaries of dependency-health metrics. Interpret the numbers you are given; never invent figures, and never restate a table that already appears in the report. Three sentences at most.",messages:[{role:"user",content:[N?`Focus: ${N}`:"Focus: what changed and what needs attention.","","Metrics:",JSON.stringify(E,null,2)].join(`
|
|
7
7
|
`)}]})).text.trim();if(!F)return M;return M.replace("### Dependency health",`${F}
|
|
8
8
|
|
|
9
|
-
### Dependency health`)}catch(z){return C.warn(`\u26A0\uFE0F Could not write the report narrative: ${z}`),M}}function w(M){if(M<24)return`${M}h`;return`${Math.round(M/24*10)/10}d`}function B(M){if(!M.scheduled)return{publish:!0};if(M.enabled===!0)return{publish:!0};return{publish:!1,reason:M.enabled===!1?"reports.enabled is false":"reports.enabled is not set \u2014 scheduled reports are opt-in"}}export{R as
|
|
9
|
+
### Dependency health`)}catch(z){return C.warn(`\u26A0\uFE0F Could not write the report narrative: ${z}`),M}}function w(M){if(M<24)return`${M}h`;return`${Math.round(M/24*10)/10}d`}function B(M){if(!M.scheduled)return{publish:!0};if(M.enabled===!0)return{publish:!0};return{publish:!1,reason:M.enabled===!1?"reports.enabled is false":"reports.enabled is not set \u2014 scheduled reports are opt-in"}}export{R as U,U as V,X as W,x as X,W as Y,_ as Z,k as _,O as $,A as aa,S as ba,$ as ca,T as da,Y as ea,B as fa};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
3
|
-
export{F as
|
|
2
|
+
import{Yh as K}from"./chunk-91gpxfta.js";import{nl as N}from"./chunk-xmqv24zr.js";function F(q){return(q.split(/[/\\]/).pop()||"")==="build.zig.zon"}async function S(q,z){try{if(!F(q))return null;let J=[],j=z.match(/\.dependencies\s*=\s*\.?\{/);if(j){let Q=j.index+j[0].length,A=1,T=Q;while(T<z.length&&A>0){if(z[T]==="{")A++;else if(z[T]==="}")A--;T++}let G=z.slice(Q,T-1),O=/\.(\w+)\s*=\s*\.?\{/g,W=O.exec(G);while(W!==null){let b=W[1],X=W.index+W[0].length,Y=1,V=X;while(V<G.length&&Y>0){if(G[V]==="{")Y++;else if(G[V]==="}")Y--;V++}let _=G.slice(X,V-1),$=_.match(/\.url\s*=\s*"([^"]+)"/),R=_.match(/\.hash\s*=\s*"([^"]+)"/);if($){let H=$[1],v=H.match(/\/v?(\d+\.\d+\.\d+(?:-[\w.]+)?)/i),E=v?v[1]:"unknown",Z={url:H};if(R)Z.hash=R[1];J.push({name:b,currentVersion:E,type:"zig-dependencies",file:q,metadata:Z})}W=O.exec(G)}}return{path:q,type:"build.zig.zon",content:z,dependencies:J}}catch(J){return K().warn(`Failed to parse Zig manifest ${q}:`,J),null}}async function w(q,z,J){try{if(!F(q))return K().info(`\u26A0\uFE0F updateZigManifest: ${q} is not a Zig manifest file, returning original content`),z;let j=z;for(let Q of J){let A=Q.name.trim(),T=new RegExp(`(\\.${A}\\s*=\\s*\\.?\\{[^}]*\\.url\\s*=\\s*")([^"]+)("[^}]*\\})`,"s"),G=j.match(T);if(G){let[O,W,b,X]=G,Y=/\/v?(\d+\.\d+\.\d+(?:-[\w.]+)?)/i,V=b.replace(Y,(H)=>{return H.startsWith("/v")?`/v${Q.newVersion}`:`/${Q.newVersion}`}),_=Q.resolved?.hash,$=X;if(_)$=X.replace(/(\.hash\s*=\s*")([^"]+)(")/,`$1${_}$3`);else if(/\.hash\s*=/.test(X)){K().warn(`\u26A0\uFE0F No hash available for ${A}; leaving ${q} unchanged to avoid a hash mismatch`);continue}let R=`${W}${V}${$}`;j=j.replace(O,R),K().info(`\u2705 Updated ${A} from ${G[2]} to ${V}`)}else K().warn(`\u26A0\uFE0F Could not find dependency block for ${A} in ${q}`)}return j}catch(j){return K().warn(`Failed to update Zig manifest ${q}:`,j),z}}async function U(q){let z=[],J=new Map;for(let j of q)if(F(j.file)){if(!J.has(j.file))J.set(j.file,[]);J.get(j.file).push(j)}for(let[j,Q]of J)try{let A=await import("fs");if(A.existsSync(j)){let T=A.readFileSync(j,"utf-8"),G=await w(j,T,Q);if(G!==T)z.push({path:j,content:G,type:"update"}),K().info(`\u2705 Generated update for ${j} with ${Q.length} package changes`);else K().info(`\u2139\uFE0F No changes needed for ${j} - versions already up to date`)}else K().warn(`\u26A0\uFE0F Zig manifest file ${j} does not exist`)}catch(A){K().warn(`Failed to generate updates for Zig manifest ${j}:`,A)}return z}
|
|
3
|
+
export{F as we,S as xe,w as ye,U as ze};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{Pb as w}from"./chunk-6zp71ecf.js";import"./chunk-xmqv24zr.js";import{readdir as $}from"fs/promises";import{join as X}from"path";var G=["dependencies","peerDependencies","optionalDependencies"];async function x(V,W,Q,U){let M=await K(Q,U);if(M.length===0)return[];let J=new Map,D=(q,z,H)=>{let Y=J.get(q),Z={by:z,range:H};if(Y)Y.push(Z);else J.set(q,[Z])};for(let q of V)for(let z of q.dependencies)D(z.name,w,z.currentVersion);for(let q of M)for(let[z,H]of Object.entries(q.ranges))D(z,q.name,H);let E=[];for(let q of M){let z=J.get(q.name);if(!z||z.length===0)continue;try{let H=await W.getReleaseVersions(q.name);if(H.length===0)continue;E.push({name:q.name,installed:q.version,available:H,declared:z})}catch(H){U.debug(`Skipping drift analysis for ${q.name}: ${H}`)}}return E}async function K(V,W){let Q=X(V,"node_modules"),U=[],M;try{M=await $(Q)}catch{return W.debug("No node_modules directory, skipping resolution drift analysis"),[]}let J=[];for(let D of M){if(D.startsWith("."))continue;if(D.startsWith("@")){try{let E=await $(X(Q,D));J.push(...E.map((q)=>`${D}/${q}`))}catch{continue}continue}J.push(D)}return await Promise.all(J.map(async(D)=>{try{let E=await Bun.file(X(Q,D,"package.json")).json();if(!E.name||!E.version)return;let q={};for(let z of G)Object.assign(q,E[z]??{});U.push({name:E.name,version:E.version,ranges:q})}catch{}})),U}export{x as collectDriftInputs};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
function N(z){let w=new Map;for(let q of z?.split(",")??[]){let[B,E,...G]=q.trim().split("=");if(B!=="bughq"&&B!=="loghq"&&B!=="statushq"||!E||G.length)throw Error("Use --hq-sources with comma-separated bughq=ID, loghq=ID, or statushq=ID entries.");if(w.has(E))throw Error("Each ID in --hq-sources must appear only once.");w.set(E,B)}return w}function M(z){let w=z.split(`
|
|
3
|
+
`,1)[0]?.trim();if(w==="**Test notification**")return{kind:"test"};if(w?.startsWith("**\uD83D\uDCE2 ")&&w.endsWith("**"))return{kind:"status-report"};let q=w?.match(/^\*\*(\uD83D\uDD34|\u26A0\uFE0F?|\u2705) (.+?)(?: is down|: issue detected| has recovered)\*\*$/u);if(!q)return{kind:"unrecognized"};if(q[1]==="\uD83D\uDD34"&&w?.endsWith(" is down**"))return{kind:"outage",project:q[2]};if(q[1]==="\u2705"&&w?.endsWith(" has recovered**"))return{kind:"recovery",project:q[2]};if(q[1].startsWith("\u26A0")&&w?.endsWith(": issue detected**"))return{kind:"degradation",project:q[2]};return{kind:"unrecognized"}}function O(z,w){if(z==="statushq")return{source:z,...M(w.content)};let q=w.embeds.find((F)=>F.footer?.text===z),B=(F)=>q?.fields?.find((L)=>L.name===F)?.value,E=B("Project"),G=B("Environment"),K=B("Level"),J=q?.url,A=J&&URL.canParse(J)?new URL(J):void 0,D={source:z,project:E,level:K,environment:G};if(!A||A.origin!==`https://${z}.org`||A.username||A.password||!E)return{...D,kind:"unrecognized"};if(G==="test"&&K==="info"&&A.pathname==="/dashboard"&&!A.search)return{...D,kind:"test"};if(z==="bughq"&&/^\/issue\/[\w-]+$/.test(A.pathname)){let F=A.pathname.split("/").at(-1);if(q?.description==="A new issue was just captured.")return{...D,kind:"bug",reference:F};if(q?.description==="An issue you resolved is happening again.")return{...D,kind:"regression",reference:F}}let H=A.searchParams.get("project");if(z==="loghq"&&A.pathname==="/dashboard"&&H&&/^[\w-]+$/.test(H)){if(q?.description==="A new error was just logged.")return{...D,kind:"error",reference:H};if(q?.description==="An error that had gone quiet is happening again.")return{...D,kind:"regression",reference:H}}return{...D,kind:"unrecognized"}}
|
|
4
|
+
export{N as a,O as b};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
3
|
-
export{W as
|
|
2
|
+
import{Vf as K}from"./chunk-7h8qjayv.js";import{og as D}from"./chunk-038mdwdf.js";var F=[[0,59],[0,23],[1,31],[1,12],[0,6]];function I(j,J){let[U,B]=F[J],H=new Set;for(let Q of j.split(",")){let[X,Z]=Q.split("/"),q=Z===void 0?1:Number(Z);if(!Number.isInteger(q)||q<1)return null;let $,G;if(X==="*")$=U,G=B;else if(X.includes("-")){let[Y,_]=X.split("-").map(Number);if(!Number.isInteger(Y)||!Number.isInteger(_))return null;$=Y,G=_}else{let Y=Number(X);if(!Number.isInteger(Y))return null;$=Y,G=Y}if($<U||G>B||$>G)return null;for(let Y=$;Y<=G;Y+=q)H.add(Y)}return H.size>0?H:null}function L(j){let J=j.trim().split(/\s+/);if(J.length!==5)return null;let U=J.map((Z,q)=>I(Z,q));if(U.some((Z)=>Z===null))return null;let[,B,H,Q,X]=U;return{hours:B,daysOfMonth:H,months:Q,daysOfWeek:X}}function N(j,J){if(!J)return{hour:j.getHours(),day:j.getDate(),month:j.getMonth()+1,weekday:j.getDay()};let U=new Intl.DateTimeFormat("en-US",{timeZone:J,hour:"numeric",hour12:!1,day:"numeric",month:"numeric",weekday:"short"}),B=Object.fromEntries(U.formatToParts(j).map((Q)=>[Q.type,Q.value])),H=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"];return{hour:Number(B.hour)%24,day:Number(B.day),month:Number(B.month),weekday:Math.max(0,H.indexOf(B.weekday))}}function C(j,J=new Date,U){let B=L(j);if(!B)return!1;let{hour:H,day:Q,month:X,weekday:Z}=N(J,U);if(!B.hours.has(H)||!B.months.has(X))return!1;let q=B.daysOfMonth.size<31,$=B.daysOfWeek.size<7;if(q&&$)return B.daysOfMonth.has(Q)||B.daysOfWeek.has(Z);return B.daysOfMonth.has(Q)&&B.daysOfWeek.has(Z)}function W(j){if(j.dependencyType==="github-actions")return"github-actions";if(j.dependencyType==="docker-image")return"docker";if(j.dependencyType==="zig-dependencies")return"zig";if(j.dependencyType==="python"||j.dependencyType==="rust"||j.dependencyType==="go"||j.dependencyType==="ruby")return j.dependencyType;if(j.file.endsWith("composer.json")||j.file.endsWith("composer.lock"))return"composer";if(j.file.endsWith("package.json"))return"npm";return"pkgx"}function A(j,J,U=new Date){if(j.matchPackages?.length){if(!K(j.matchPackages).matches(J.name))return!1}if(j.matchEcosystems?.length&&!j.matchEcosystems.includes(W(J)))return!1;if(j.matchDepTypes?.length&&!j.matchDepTypes.includes(J.dependencyType))return!1;if(j.matchUpdateTypes?.length&&!j.matchUpdateTypes.includes(J.updateType))return!1;if(j.matchFiles?.length){if(!K(j.matchFiles).matches(J.file))return!1}if(j.matchCurrentVersion&&!E(J.currentVersion,j.matchCurrentVersion))return!1;if(j.schedule&&!C(j.schedule,U,j.scheduleTimezone))return!1;return!0}function E(j,J){let U=j.replace(/^[\^~>=<\s]+/,"").trim();return U?D(U,J):!1}function S(j,J=[],U=new Date){let B={enabled:!0,labels:[],reviewers:[],assignees:[],prPriority:0};for(let H of J){if(!A(H,j,U))continue;if(H.enabled!==void 0)B.enabled=H.enabled;if(H.strategy!==void 0)B.strategy=H.strategy;if(H.groupName!==void 0)B.groupName=H.groupName;if(H.autoMerge!==void 0)B.autoMerge=H.autoMerge;if(H.minimumReleaseAge!==void 0)B.minimumReleaseAge=H.minimumReleaseAge;if(H.prPriority!==void 0)B.prPriority=H.prPriority;if(H.autoMigrate!==void 0)B.autoMigrate=H.autoMigrate;for(let Q of H.labels??[])if(!B.labels.includes(Q))B.labels.push(Q);for(let Q of H.reviewers??[])if(!B.reviewers.includes(Q))B.reviewers.push(Q);for(let Q of H.assignees??[])if(!B.assignees.includes(Q))B.assignees.push(Q)}return B}function k(j,J=[],U=new Date){let B=[];for(let H of j){let Q=S(H,J,U);if(!Q.enabled)continue;if(Q.strategy&&!V(Q.strategy,H.updateType))continue;B.push({update:H,effects:Q})}return B}function T(j){let J=new Set,U=new Set,B=new Set,H=0;for(let Q of j)Q.labels.forEach((X)=>J.add(X)),Q.reviewers.forEach((X)=>U.add(X)),Q.assignees.forEach((X)=>B.add(X)),H=Math.max(H,Q.prPriority);return{labels:[...J],reviewers:[...U],assignees:[...B],autoMerge:j.length>0&&j.every((Q)=>Q.autoMerge===!0),prPriority:H,autoMigrate:j.some((Q)=>Q.autoMigrate===!0)}}function V(j,J){switch(j){case"all":return!0;case"major":return J==="major";case"minor":return J==="minor"||J==="patch";case"patch":return J==="patch"}}function b(j=[]){return j.map((J)=>({matchPackages:J.patterns,groupName:J.name,...J.strategy?{strategy:J.strategy}:{}}))}
|
|
3
|
+
export{W as vf,A as wf,S as xf,k as yf,T as zf,V as Af,b as Bf};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{Fa as t,Ga as u}from"./chunk-t68hsq01.js";import{Ha as v,Ia as w,Ja as x,Ka as y,La as z,Ma as A,Na as B,Oa as C,Pa as D,Qa as E,Ra as F,Sa as G}from"./chunk-cqh3eadc.js";import{Ta as H,Ua as I,Va as J,Wa as K,Xa as L}from"./chunk-6njk0m4a.js";import"./chunk-nap5dm82.js";import"./chunk-b1ng5aqx.js";import{Cf as a,Df as b,Ef as c,Ff as d,Gf as e,Hf as f}from"./chunk-016ce171.js";import{If as g,Jf as h,Kf as i,Lf as j,Mf as k,Nf as l,Of as m,Pf as n,Qf as o,Rf as p,Sf as q,Tf as r,Uf as s}from"./chunk-fanj4t6c.js";import"./chunk-7h8qjayv.js";import"./chunk-zqrgvftj.js";import"./chunk-me7y4rd3.js";import"./chunk-7khgke9n.js";import"./chunk-kfn6xbc6.js";import"./chunk-91gpxfta.js";import"./chunk-xmqv24zr.js";export{i as writeFileTool,r as wrapUntrusted,F as withTouchOffer,I as verifyChanges,w as unitTestsTouch,J as stackedBranchName,y as simplifyTouch,n as shellTool,K as runStackedTouch,u as runPlan,s as runAgent,a as reviewMode,g as resolveWorkspacePath,D as renderTouchOffer,h as readFileTool,z as planTouch,d as planMode,G as parseTouchSelections,j as listDirTool,b as implementMode,E as hasTouchOffer,B as getFinishingTouch,f as getAgentMode,k as fsTools,c as fixCiMode,v as docstringsTouch,L as detectChangedFiles,t as createReadIssueTool,m as buildShellEnv,x as autofixTouch,q as Toolbelt,o as ToolPermissionError,C as TOUCH_OFFER_MARKER,H as TEST_COMMANDS,l as SHELL_ENV_ALLOWLIST,A as FINISHING_TOUCHES,p as BUILTIN_TOOLS,e as AGENT_MODES};
|
|
@@ -4,4 +4,4 @@ ${JSON.stringify(x)}
|
|
|
4
4
|
-->`}function I(j){if(!j)return null;let x=j.match(B);if(!x)return null;try{let k=JSON.parse(x[2].trim());if(typeof k.reviewedSha!=="string")return null;return{schemaVersion:Number(k.schemaVersion)||1,reviewedSha:k.reviewedSha,fingerprints:Array.isArray(k.fingerprints)?k.fingerprints.filter((D)=>typeof D==="string"):[],reviewedAt:typeof k.reviewedAt==="string"?k.reviewedAt:new Date(0).toISOString(),...k.paused?{paused:!0}:{}}}catch{return null}}function J(j,x){return`${(j??"").replace(B,"").trimEnd()}
|
|
5
5
|
|
|
6
6
|
${F(x)}`}function L(j,x){if(j?.paused)return!1;return j?.reviewedSha!==x}
|
|
7
|
-
export{H as
|
|
7
|
+
export{H as Jb,F as Kb,I as Lb,J as Mb,L as Nb};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{Za as a}from"./chunk-s44q0cps.js";import"./chunk-s8apaa3h.js";import"./chunk-n5mvfhd0.js";import"./chunk-zbk3g5vf.js";import"./chunk-yknz94wd.js";import"./chunk-ep7hn1za.js";import"./chunk-yzyqkwsc.js";import"./chunk-m7v1dba6.js";import"./chunk-n7hbbha7.js";import"./chunk-9rvapdmv.js";import"./chunk-q31cbz9d.js";import"./chunk-g0ttytab.js";import"./chunk-dmqptf7k.js";import"./chunk-dz2e81v7.js";import"./chunk-we0x722x.js";import"./chunk-7523xqb9.js";import"./chunk-qeg388qq.js";import"./chunk-016ce171.js";import"./chunk-fanj4t6c.js";import"./chunk-7h8qjayv.js";import"./chunk-zqrgvftj.js";import"./chunk-me7y4rd3.js";import"./chunk-7khgke9n.js";import"./chunk-038mdwdf.js";import"./chunk-x496v9vb.js";import"./chunk-75rj89c2.js";import"./chunk-0cqhy9qh.js";import"./chunk-gt3m1eqn.js";import"./chunk-rad9rc2j.js";import"./chunk-kfn6xbc6.js";import"./chunk-91gpxfta.js";import"./chunk-nqgn0drz.js";import"./chunk-xmqv24zr.js";export{a as Scheduler};
|