@buddysh/buddy 0.11.5 → 0.11.7
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 +29 -0
- package/dist/bin/cli.js +19 -19
- package/dist/chunk-03j2dx5h.js +4 -0
- package/dist/chunk-06k6abjj.js +2 -0
- package/dist/{chunk-mkzmjg3f.js → chunk-0ewzxzt3.js} +2 -2
- package/dist/chunk-19n3wnxq.js +106 -0
- package/dist/{chunk-f53y8ans.js → chunk-1n42ghef.js} +2 -2
- package/dist/chunk-1q6s6a5e.js +2 -0
- package/dist/{chunk-s4zb0fcj.js → chunk-1szfwcst.js} +1 -1
- package/dist/{chunk-tzwnfagh.js → chunk-1z4nhstx.js} +2 -2
- package/dist/{chunk-hd5j9e3c.js → chunk-1z9a3hpe.js} +1 -1
- package/dist/chunk-23c6tfbw.js +2 -0
- package/dist/{chunk-v1wfa758.js → chunk-2egzc1fp.js} +1 -1
- package/dist/chunk-2ppt1rrx.js +2 -0
- package/dist/chunk-2pv5zwbm.js +38 -0
- package/dist/{chunk-wn6pbyzn.js → chunk-305184z3.js} +1 -1
- package/dist/{chunk-9t15md0g.js → chunk-39ne6m3w.js} +1 -1
- package/dist/{chunk-tjc2vgwn.js → chunk-3d3rwmmj.js} +1 -1
- package/dist/{chunk-5044y9en.js → chunk-3d5pjrz7.js} +2 -2
- package/dist/chunk-3jw9d546.js +2 -0
- package/dist/{chunk-be629jhq.js → chunk-3wy8fypy.js} +2 -2
- package/dist/{chunk-c3es7pgf.js → chunk-3z759ya5.js} +1 -1
- package/dist/{chunk-aa277p5r.js → chunk-3zk2ye6r.js} +1 -1
- package/dist/{chunk-3fzbvs2p.js → chunk-4b0p7kgk.js} +1 -1
- package/dist/chunk-4d13qb9f.js +2 -0
- package/dist/{chunk-rc2mk5x6.js → chunk-4gx2f1k6.js} +1 -1
- package/dist/{chunk-96ht6hwd.js → chunk-4mwgk0jh.js} +2 -2
- package/dist/{chunk-1qgr52wx.js → chunk-4rvgatmm.js} +1 -1
- package/dist/{chunk-vbeeyhhe.js → chunk-4wh0wryv.js} +2 -2
- package/dist/{chunk-fjp3a7hp.js → chunk-4ycesykg.js} +1 -1
- package/dist/chunk-52jcty4n.js +2 -0
- package/dist/{chunk-tw047td6.js → chunk-55znd3yn.js} +1 -1
- package/dist/chunk-5ct11b1j.js +2 -0
- package/dist/{chunk-3cvng2nz.js → chunk-5gybfx14.js} +1 -1
- package/dist/chunk-5zs6jrpt.js +2 -0
- package/dist/{chunk-8hjvthz4.js → chunk-675c6ddc.js} +2 -2
- package/dist/{chunk-193abzy6.js → chunk-6k6dgwmy.js} +1 -1
- package/dist/{chunk-q4t568hv.js → chunk-6sm15trq.js} +1 -1
- package/dist/chunk-6t1rb4tz.js +2 -0
- package/dist/{chunk-g30dr44w.js → chunk-7wk4px2k.js} +2 -2
- package/dist/{chunk-2et8yavs.js → chunk-88j356ng.js} +1 -1
- package/dist/{chunk-pkr6905p.js → chunk-89s9f3mf.js} +1 -1
- package/dist/{chunk-05me15qw.js → chunk-97cvp0t3.js} +1 -1
- package/dist/{chunk-0w695m54.js → chunk-9b2yfhzj.js} +1 -1
- package/dist/{chunk-dm5yktev.js → chunk-9b4z1bpx.js} +1 -1
- package/dist/{chunk-3pqra420.js → chunk-a1fkxmxq.js} +1 -1
- package/dist/chunk-a4m6bqpq.js +2 -0
- package/dist/{chunk-vgtmrd4c.js → chunk-bggpgbdx.js} +1 -1
- package/dist/{chunk-jnb80k2x.js → chunk-c87s8txp.js} +1 -1
- package/dist/{chunk-s6z3gm2s.js → chunk-cbqg29zr.js} +1 -1
- package/dist/{chunk-r763e19p.js → chunk-d2d5m2kx.js} +3 -3
- package/dist/{chunk-e68nf7cm.js → chunk-ddmvjp0y.js} +1 -1
- package/dist/chunk-djdf848n.js +2 -0
- package/dist/chunk-dsep28r5.js +2 -0
- package/dist/chunk-e6sg7jg4.js +2 -0
- package/dist/{chunk-bffxf4xy.js → chunk-efqnnrwq.js} +1 -1
- package/dist/{chunk-ctt9xk2j.js → chunk-eftyxrxw.js} +2 -2
- package/dist/chunk-eme4fny7.js +2 -0
- package/dist/{chunk-1cpdz49v.js → chunk-emygmh7r.js} +1 -1
- package/dist/{chunk-0hc97k0t.js → chunk-f001yg2a.js} +3 -3
- package/dist/{chunk-hfjywbbc.js → chunk-f0z6kyqt.js} +1 -1
- package/dist/chunk-f298fv6p.js +2 -0
- package/dist/chunk-fjp4k18r.js +2 -0
- package/dist/{chunk-jtxcr5yw.js → chunk-fvhnza91.js} +2 -2
- package/dist/{chunk-3901s7h9.js → chunk-gvnsr72j.js} +1 -1
- package/dist/{chunk-zgkrhymn.js → chunk-gw3t78fw.js} +1 -1
- package/dist/chunk-h4084ykd.js +2 -0
- package/dist/{chunk-cwfkm7h9.js → chunk-he97rsmj.js} +2 -2
- package/dist/{chunk-k26wnmzk.js → chunk-hkb714k3.js} +1 -1
- package/dist/{chunk-nrr8z2z7.js → chunk-j0bsva07.js} +2 -2
- package/dist/{chunk-eseshkd0.js → chunk-ja3rvd6y.js} +1 -1
- package/dist/chunk-jczf4z85.js +2 -0
- package/dist/{chunk-08x5b93v.js → chunk-jpdd59fh.js} +1 -1
- package/dist/{chunk-cgvt98pd.js → chunk-kpqez1ht.js} +1 -1
- package/dist/{chunk-qd2s51gc.js → chunk-ktmgq0ja.js} +1 -1
- package/dist/{chunk-0scz1dv5.js → chunk-m17kvr7m.js} +1 -1
- package/dist/chunk-m2qq154g.js +2 -0
- package/dist/chunk-m8kqe55k.js +2 -0
- package/dist/chunk-n42c80f3.js +2 -0
- package/dist/{chunk-428c5652.js → chunk-na0b9r57.js} +1 -1
- package/dist/chunk-nfcyqj66.js +2 -0
- package/dist/{chunk-sw2538r0.js → chunk-nhe8axrf.js} +2 -2
- package/dist/{chunk-g24hav8e.js → chunk-njfbmhm4.js} +7 -7
- package/dist/{chunk-p6qbqsyp.js → chunk-p8azbpq6.js} +2 -2
- package/dist/{chunk-yngahb11.js → chunk-p96zq2zc.js} +2 -2
- package/dist/chunk-pvfavmy3.js +2 -0
- package/dist/{chunk-25sz1y7j.js → chunk-q0tve4cm.js} +1 -1
- package/dist/{chunk-hptfq3rg.js → chunk-q5pxt13t.js} +1 -1
- package/dist/{chunk-61xecp1z.js → chunk-qczzpthf.js} +1 -1
- package/dist/{chunk-5x4gt4c5.js → chunk-qk43d3vv.js} +1 -1
- package/dist/{chunk-kbbqs8ae.js → chunk-qv1nvaha.js} +1 -1
- package/dist/{chunk-pskqrv5r.js → chunk-qz5nqeza.js} +1 -1
- package/dist/chunk-rfgacg5h.js +2 -0
- package/dist/{chunk-phfmnnne.js → chunk-sczx20gw.js} +2 -2
- package/dist/chunk-sf4p2t84.js +2 -0
- package/dist/chunk-sjk83y3d.js +2 -0
- package/dist/{chunk-11hdrnf6.js → chunk-srznv36n.js} +2 -2
- package/dist/chunk-t0kvt1pm.js +2 -0
- package/dist/{chunk-9fq7drn8.js → chunk-t3a1703q.js} +1 -1
- package/dist/{chunk-8gd76j8e.js → chunk-tgh61e5e.js} +2 -2
- package/dist/{chunk-b9escac0.js → chunk-v6dephze.js} +2 -2
- package/dist/{chunk-rz7pg7pb.js → chunk-v8746363.js} +3 -3
- package/dist/{chunk-c8rzx3a1.js → chunk-vckn5ate.js} +1 -1
- package/dist/{chunk-6p4qz8qv.js → chunk-w16pwfh3.js} +1 -1
- package/dist/{chunk-kprtsn8c.js → chunk-wcjf072v.js} +1 -1
- package/dist/chunk-wfn702a2.js +2 -0
- package/dist/{chunk-40znfg3x.js → chunk-wr1q4k9e.js} +1 -1
- package/dist/{chunk-m4p7cnvk.js → chunk-wts1sqw7.js} +1 -1
- package/dist/{chunk-txtrpypt.js → chunk-x4ea69ek.js} +2 -2
- package/dist/{chunk-ds4stft2.js → chunk-xe2xdg6z.js} +1 -1
- package/dist/{chunk-xs12dtf1.js → chunk-xny4kgcc.js} +1 -1
- package/dist/chunk-xpsetmcw.js +2 -0
- package/dist/{chunk-hmskwy76.js → chunk-xzhzvdcv.js} +1 -1
- package/dist/chunk-yd834q68.js +2 -0
- package/dist/{chunk-68fw3ma0.js → chunk-yke7v3gh.js} +1 -1
- package/dist/chunk-ymwjjyke.js +2 -0
- package/dist/{chunk-hsa07n7c.js → chunk-ysp81zyt.js} +1 -1
- package/dist/{chunk-vqa6vte3.js → chunk-z456ptfw.js} +1 -1
- package/dist/{chunk-yp1tgdh3.js → chunk-zkv7e2q2.js} +1 -1
- package/dist/chunk-ztw515ew.js +3 -0
- package/dist/src/git/github-provider.d.ts +20 -0
- package/dist/src/git/provider.d.ts +1 -0
- package/dist/src/index.js +1 -1
- package/dist/src/setup.js +1 -1
- package/dist/src/types.d.ts +1 -0
- package/dist/src/utils/github-actions-parser.d.ts +10 -0
- package/dist/src/utils/lock-file.d.ts +16 -0
- package/package.json +1 -1
- package/dist/chunk-0paakbpj.js +0 -2
- package/dist/chunk-19zyq15p.js +0 -2
- package/dist/chunk-24c2ab29.js +0 -2
- package/dist/chunk-2wj5xtdn.js +0 -2
- package/dist/chunk-3cab6vqx.js +0 -106
- package/dist/chunk-49znmbh8.js +0 -2
- package/dist/chunk-4sfyfxdk.js +0 -2
- package/dist/chunk-4yq2fny9.js +0 -2
- package/dist/chunk-5gejc3rx.js +0 -2
- package/dist/chunk-5xfs8a89.js +0 -2
- package/dist/chunk-8ycrg9gp.js +0 -3
- package/dist/chunk-90zmqn5k.js +0 -2
- package/dist/chunk-97qf7mdt.js +0 -2
- package/dist/chunk-a4hzzn28.js +0 -2
- package/dist/chunk-b357cgb0.js +0 -2
- package/dist/chunk-baq6x78h.js +0 -2
- package/dist/chunk-brfyymhf.js +0 -2
- package/dist/chunk-dgfb8k0h.js +0 -2
- package/dist/chunk-emyvrx5t.js +0 -2
- package/dist/chunk-fpnjpgrb.js +0 -2
- package/dist/chunk-fr5c326k.js +0 -2
- package/dist/chunk-gkpd5nw2.js +0 -2
- package/dist/chunk-hns85dqw.js +0 -2
- package/dist/chunk-j9cgwkm8.js +0 -38
- package/dist/chunk-jfzqpmnp.js +0 -2
- package/dist/chunk-mcwxpdg9.js +0 -2
- package/dist/chunk-mf959vjt.js +0 -2
- package/dist/chunk-ppmabn5h.js +0 -2
- package/dist/chunk-sc7emb71.js +0 -2
- package/dist/chunk-vdd1cghr.js +0 -2
- package/dist/chunk-vj1sdxpp.js +0 -2
- package/dist/chunk-xznnmhyt.js +0 -2
- package/dist/chunk-yk183r6z.js +0 -2
- package/dist/chunk-ys1qqcpp.js +0 -2
- package/dist/chunk-ytmxd5fk.js +0 -4
- package/dist/chunk-zxgkp71x.js +0 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{td as R}from"./chunk-he97rsmj.js";import{qe as F,re as A}from"./chunk-1z4nhstx.js";import{Af as S}from"./chunk-jpdd59fh.js";import{Qf as L}from"./chunk-p8azbpq6.js";import{Kh as K,Nh as O}from"./chunk-f0z6kyqt.js";import{cl as P}from"./chunk-6sm15trq.js";var b=[{kind:"lockfile-drift",mechanical:!0,patterns:[/lockfile had changes, but lockfile is frozen/i,/your lockfile does not satisfy your workspace/i,/the lockfile (?:is|was) out of date/i,/npm ci can only install packages when your package\.json and package-lock\.json .* are in sync/i,/composer\.lock is not up to date/i]},{kind:"flake",mechanical:!0,patterns:[/\bECONNRESET\b|\bETIMEDOUT\b|\bENOTFOUND\b|\bEAI_AGAIN\b/,/socket hang up/i,/502 Bad Gateway|503 Service Unavailable|504 Gateway Time-?out/i,/rate limit exceeded/i,/the runner has received a shutdown signal/i]},{kind:"install",mechanical:!1,patterns:[/could not resolve (?:dependency|host)/i,/no matching version found for/i,/unable to resolve dependency tree/i,/peer dep(?:endency)? .* conflict/i]},{kind:"type-error",mechanical:!1,patterns:[/error TS\d{4}:/,/\berror\[E\d+\]:/,/Type '.*' is not assignable to type/]},{kind:"test-failure",mechanical:!1,patterns:[/\d+ (?:tests? )?fail(?:ed|ing)\b/i,/\(fail\)/,/AssertionError|expect\(received\)/,/\u25CF .* \u203A /]},{kind:"lint",mechanical:!1,patterns:[/\b\d+ problems? \(\d+ errors?/i,/eslint|pickier|biome|oxlint/i]}];function N(x){if(!x.trim())return{kind:"unknown",mechanical:!1,evidence:[]};let H=x.split(`
|
|
3
3
|
`);for(let z of b){let J=[];for(let V of H)if(z.patterns.some((Q)=>Q.test(V))){if(J.push(V.trim()),J.length>=5)break}if(J.length>0)return{kind:z.kind,mechanical:z.mechanical,evidence:J}}return{kind:"unknown",mechanical:!1,evidence:T(H)}}function T(x,H=40){let z=x.filter((J)=>/\b(?:error|failed|failure|exception|panic|fatal)\b/i.test(J)&&!/^\s*(?:at\s|\s*\.\.\.)/.test(J));return(z.length>0?z:x.slice(-H)).slice(-H).map((J)=>J.trim()).filter(Boolean)}function G(x){switch(x.kind){case"lockfile-drift":return"The lock file is out of step with its manifest.";case"flake":return"A network or runner problem, unrelated to the change.";case"install":return"Dependencies could not be resolved.";case"type-error":return"The change does not type-check.";case"test-failure":return"One or more tests failed.";case"lint":return"Lint or formatting checks failed.";default:return"The failure could not be classified automatically."}}var w=3;async function M(x,H,z,J){let V=J??O();try{let Q=await x.listWorkflowRuns(H,{status:"completed",limit:20});for(let Y of _(Q).slice(0,w)){let Z=await x.getWorkflowRunLogs(Y.id);if(!Z)continue;if(N(Z).kind===z)return V.info(`\uD83E\uDDED ${H} already fails the same way (run ${Y.id}) \u2014 not this pull request's to fix`),!0}return!1}catch(Q){return V.debug(`Could not check ${H} for a pre-existing failure: ${K(Q)}`),!1}}function _(x){let H=new Map;for(let z of x)if(!H.has(z.name))H.set(z.name,z);return[...H.values()].filter((z)=>z.conclusion==="failure")}function h(x,H){if(!x)return"Tried to regenerate the lock file, but the install did not succeed.";if(!H)return"Regenerated the lock file, but could not push it to the branch. The change is in the workspace only, so the run will still be red until someone commits it.";return"Regenerated the lock file and pushed the result. No model was needed."}function f(x){let H="Repairs run on the pull request's branch, and answering a comment runs on the default branch, so anything I changed here would land on the wrong tree. ";if(x.kind==="lockfile-drift")return`Regenerating the lock file would fix this, and no model would be needed. ${H}The \`fix-ci\` job will do it on the next failing run, or you can run \`buddy fix-ci --run-id <id> --pr <number>\` yourself.`;return`${H}The \`fix-ci\` job runs on the failing run itself and can repair this; this reply is the diagnosis it would start from.`}async function I(x){let H=x.logger??O(),z=N(x.log),J=x.maxAttempts??3;if(H.info(`\uD83E\uDE7A CI failure classified as ${z.kind}`),x.failsOnBase??(x.checkBase?await x.checkBase(z.kind):!1))return{failure:z,action:"skipped",fixed:!1,report:$(z,"This failure also occurs on the base branch, so it is not caused by this change. Fixing it here would only mask it.")};if((x.priorAttempts??0)>=J)return{failure:z,action:"skipped",fixed:!1,report:$(z,`Already attempted ${x.priorAttempts} time(s); stopping rather than looping.`)};if(x.analysisOnly&&z.kind!=="flake")return{failure:z,action:"reported",fixed:!1,report:$(z,f(z))};if(z.kind==="lockfile-drift"&&x.regenerateLockfile){if(x.dryRun)return{failure:z,action:"mechanical-fix",fixed:!1,report:$(z,"Regenerating the lock file would fix this. No model would be needed. Nothing was changed, because this was a dry run.")};H.info("\uD83D\uDD27 Regenerating the lock file");let{regenerated:Y,pushed:Z}=await x.regenerateLockfile();return{failure:z,action:"mechanical-fix",fixed:Z,report:$(z,h(Y,Z))}}if(z.kind==="flake"){if(x.dryRun)return{failure:z,action:"retry",fixed:!1,report:$(z,"This looks transient, and re-running the failed jobs would likely clear it. Nothing was changed, because this was a dry run.")};if(!x.rerun)return{failure:z,action:"retry",fixed:!1,report:$(z,"This looks transient. Re-running the failed job is likely to clear it.")};H.info("\uD83D\uDD01 Re-running the failed jobs");let Y=await x.rerun();return{failure:z,action:"retry",fixed:!1,report:$(z,Y?"This looks transient, so I re-ran the failed jobs. No model was needed.":"This looks transient, but I could not re-run the failed jobs \u2014 `actions: write` is the usual reason. "+"Re-running them from the Actions tab is likely to clear it.")}}if(!x.ai)return{failure:z,action:"reported",fixed:!1,report:$(z,"No AI provider is configured, so this needs a human. See https://buddy.sh/ai/providers to enable automatic repair.")};let Q=await L(x.ai,{mode:S,task:["A CI job on this branch is failing. Diagnose the root cause and fix it if the fix is clear.","",`Classification: ${z.kind} \u2014 ${G(z)}`,"","Relevant log lines:",z.evidence.join(`
|
|
4
4
|
`),"","Verify your fix by running the project's tests or build before reporting it done.","If the fix is not clear, explain what you found rather than guessing."].join(`
|
|
5
5
|
`),context:{workspace:x.workspace,baseBranch:x.baseBranch,...x.branch?{branch:x.branch}:{}},logger:H});return{failure:z,action:"agent-fix",fixed:Q.stopReason==="completed",report:$(z,Q.output||"The repair run ended without a conclusion.")}}function $(x,H){let z=`## \uD83E\uDE7A CI failure analysis
|
|
@@ -20,8 +20,8 @@ ${x.evidence.slice(0,20).join(`
|
|
|
20
20
|
${JSON.stringify(J)}
|
|
21
21
|
-->`;return`${(x??"").replace(B,"").trimEnd()}
|
|
22
22
|
|
|
23
|
-
${V}`}async function m(x,H,z){if(!F(x,"ciRuns","listWorkflowRuns"))return null;try{let J=await x.getPullRequestHeadSha(H.number),V=await x.listWorkflowRuns(H.head,{status:"completed",limit:30}),Q=J?V.filter((Y)=>Y.headSha===J):V;return _(Q)[0]?.id??null}catch(J){return z.debug(`Could not resolve the failing run for #${H.number}: ${K(J)}`),null}}async function c(x){let H=x.logger??O(),{config:z,provider:J}=x,V=x.workspace??process.cwd();A(J,"ciLogs","getWorkflowRunLogs","reading CI logs");let Q;if(x.prNumber){if(Q=(await J.getPullRequests("open")).find((W)=>W.number===x.prNumber),!Q)return`Could not find open pull request #${x.prNumber}.`}let Y=x.runId??(Q?await m(J,Q,H):null);if(!Y)return Q?"Nothing is failing at the head of this pull request, so there is nothing to diagnose.":"No run to diagnose. Pass --run-id, or --pr so I can find the failing run myself.";let Z=await J.getWorkflowRunLogs(Y);if(!Z)return H.warn(`\u26A0\uFE0F Could not read the logs for run ${Y}; nothing to diagnose`),`Could not read the logs for run ${Y}. They may have expired.`;let U=E(Q?.body)?.attempts??0,j=z.repository?.baseBranch??"main",D=F(J,"ciRuns","listWorkflowRuns"),y=F(J,"ciRuns","rerunWorkflowRun"),{createAiClient:v}=await import("./chunk-
|
|
23
|
+
${V}`}async function m(x,H,z){if(!F(x,"ciRuns","listWorkflowRuns"))return null;try{let J=await x.getPullRequestHeadSha(H.number),V=await x.listWorkflowRuns(H.head,{status:"completed",limit:30}),Q=J?V.filter((Y)=>Y.headSha===J):V;return _(Q)[0]?.id??null}catch(J){return z.debug(`Could not resolve the failing run for #${H.number}: ${K(J)}`),null}}async function c(x){let H=x.logger??O(),{config:z,provider:J}=x,V=x.workspace??process.cwd();A(J,"ciLogs","getWorkflowRunLogs","reading CI logs");let Q;if(x.prNumber){if(Q=(await J.getPullRequests("open")).find((W)=>W.number===x.prNumber),!Q)return`Could not find open pull request #${x.prNumber}.`}let Y=x.runId??(Q?await m(J,Q,H):null);if(!Y)return Q?"Nothing is failing at the head of this pull request, so there is nothing to diagnose.":"No run to diagnose. Pass --run-id, or --pr so I can find the failing run myself.";let Z=await J.getWorkflowRunLogs(Y);if(!Z)return H.warn(`\u26A0\uFE0F Could not read the logs for run ${Y}; nothing to diagnose`),`Could not read the logs for run ${Y}. They may have expired.`;let U=E(Q?.body)?.attempts??0,j=z.repository?.baseBranch??"main",D=F(J,"ciRuns","listWorkflowRuns"),y=F(J,"ciRuns","rerunWorkflowRun"),{createAiClient:v}=await import("./chunk-ysp81zyt.js"),C=await I({log:Z,priorAttempts:U,workspace:V,baseBranch:j,ai:x.analysisOnly?null:v(z,H),logger:H,dryRun:Boolean(x.dryRun),analysisOnly:Boolean(x.analysisOnly),...D?{checkBase:(X)=>M({listWorkflowRuns:(W,k)=>J.listWorkflowRuns(W,k),getWorkflowRunLogs:(W)=>J.getWorkflowRunLogs(W)},j,X,H)}:{},...y?{rerun:()=>J.rerunWorkflowRun(Y)}:{},...x.analysisOnly?{}:{regenerateLockfile:()=>g(V,H)}});if(H.info(`
|
|
24
24
|
${C.report}
|
|
25
|
-
`),x.prNumber&&!x.dryRun){if(await J.createComment(x.prNumber,C.report),C.action!=="skipped"&&Q)try{await J.updatePullRequest(x.prNumber,{body:q(Q.body,U+1)})}catch(X){H.warn(`Could not record the fix attempt on PR #${x.prNumber}: ${K(X)}`)}}return await R(z.notifications,"fixci.completed",{...x.prNumber?{number:x.prNumber}:{},action:C.action,fixed:C.fixed}),`${C.action}${C.fixed?" (fixed)":""}`}async function g(x,H){let{regenerateLockFile:z,detectRequiredPackageManagers:J,getAllLockFilePaths:V,hasLockFile:Q}=await import("./chunk-
|
|
25
|
+
`),x.prNumber&&!x.dryRun){if(await J.createComment(x.prNumber,C.report),C.action!=="skipped"&&Q)try{await J.updatePullRequest(x.prNumber,{body:q(Q.body,U+1)})}catch(X){H.warn(`Could not record the fix attempt on PR #${x.prNumber}: ${K(X)}`)}}return await R(z.notifications,"fixci.completed",{...x.prNumber?{number:x.prNumber}:{},action:C.action,fixed:C.fixed}),`${C.action}${C.fixed?" (fixed)":""}`}async function g(x,H){let{regenerateLockFile:z,detectRequiredPackageManagers:J,getAllLockFilePaths:V,hasLockFile:Q}=await import("./chunk-fjp4k18r.js"),{commitAndPush:Y}=await import("./chunk-3zk2ye6r.js"),Z=J(["package.json","composer.json"],x).filter((j)=>Q(j,x)),U=!1;for(let j of Z){let D=await z(j,x);if(D.success)U=!0;else H.warn(`\u26A0\uFE0F ${D.message}`)}if(!U)return{regenerated:!1,pushed:!1};try{return{regenerated:!0,pushed:await Y(V(),`fix(deps): regenerate the lock file
|
|
26
26
|
|
|
27
27
|
The lock file had drifted from the manifest, which failed CI.`,x)}}catch(j){return H.warn(`\u26A0\uFE0F Could not push the regenerated lock file: ${K(j)}`),{regenerated:!0,pushed:!1}}}export{N as Ea,T as Fa,G as Ga,M as Ha,_ as Ia,I as Ja,c as Ka};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import{posix as G}from"path";class v extends Error{constructor(q){super(q);this.name="FileChangeValidationError"}}function H(q){let j=G.normalize(q.replaceAll("\\","/").replace(/^\.\/+/,""));if(!j||j==="."||j===".."||j.startsWith("../")||G.isAbsolute(j))throw new v(`Refusing unsafe repository path: ${JSON.stringify(q)}`);return j}async function J(q,j){for(let B of q){let D=H(B.path);if(B.type==="update"&&!await j(D))throw new v(`Refusing to create missing update target: ${D}. Use change type "create" for intentional new files.`)}}
|
|
3
|
-
export{v as
|
|
3
|
+
export{v as Zf,H as _f,J as $f};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{Hh as U}from"./chunk-ddmvjp0y.js";import{Nh as f}from"./chunk-f0z6kyqt.js";var{Glob:u}=globalThis.Bun;import{readdir as m}from"fs/promises";import{join as P,relative as l}from"path";import O from"process";var c=new Set(["node_modules","vendor","target",".git",".venv","venv","dist","build","__pycache__",".next",".cache"]);function W(z){return z.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}async function L(z,H,$=4){let X=H.map((K)=>new u(K)),Z=[];async function J(K,G){if(G>$)return;let V=await m(K,{withFileTypes:!0}).catch(()=>[]);for(let Q of V){let j=P(K,Q.name);if(Q.isDirectory()){if(!c.has(Q.name)&&!Q.name.startsWith("."))await J(j,G+1);continue}let q=l(z,j);if(X.some((Y)=>Y.match(Q.name)||Y.match(q)))Z.push(q)}}return await J(z,0),Z.sort()}async function M(z,H){let $=[],X=[];for(let Z of H){if(!await Bun.file(P(z,Z.lockfile)).exists())continue;let[J]=Z.command;if(!await E(J)){X.push(`${Z.lockfile} (needs \`${Z.command.join(" ")}\`)`);continue}if(await Bun.spawn(Z.command,{cwd:z,stdout:"ignore",stderr:"ignore",env:{PATH:O.env.PATH??"",HOME:O.env.HOME??""}}).exited===0)$.push(Z.lockfile);else X.push(`${Z.lockfile} (\`${Z.command.join(" ")}\` failed)`)}return{regenerated:$,...X.length>0?{note:`These lockfiles were not regenerated and need updating locally: ${X.join(", ")}.`}:{}}}async function E(z){try{return await Bun.spawn(["which",z],{stdout:"ignore",stderr:"ignore",env:{PATH:O.env.PATH??""}}).exited===0}catch{return!1}}function B(z,H){let $=(J)=>J.replace(/^[^\d]*/,"").split(/[.-]/).map((K)=>Number.parseInt(K,10)||0),X=$(z),Z=$(H);for(let J=0;J<Math.max(X.length,Z.length);J++){let K=(X[J]??0)-(Z[J]??0);if(K!==0)return K}return 0}function C(z,H){let $=(J)=>J.replace(/^[^\d]*/,"").split(/[.-]/).map((K)=>Number.parseInt(K,10)||0),X=$(z),Z=$(H);if((X[0]??0)!==(Z[0]??0))return"major";if((X[1]??0)!==(Z[1]??0))return"minor";return"patch"}var p=/^\s*(?:require\s+)?([\w.~-]+(?:\.[\w.~-]+)*\/[^\s]+)\s+(v[\w.+-]+)\s*(\/\/.*)?$/,R=/^v\d+\.\d+\.\d+-\d{14}-[a-f0-9]{12}$/,I={name:"go",manifestPatterns:["go.mod"],async detect(z){return L(z,this.manifestPatterns)},async parse(z,H){let $=[],X=!1;for(let Z of H.split(`
|
|
3
3
|
`)){let J=Z.trim();if(/^require\s*\($/.test(J)){X=!0;continue}if(X&&J===")"){X=!1;continue}if(!X&&!J.startsWith("require "))continue;let K=p.exec(Z);if(!K)continue;let[,G,V,Q]=K;if(Q?.includes("indirect"))continue;if(R.test(V))continue;$.push({name:G,currentVersion:V,section:"require",file:z})}return $},async latest(z,H={}){let $=H.registryUrl??"https://proxy.golang.org",X=z.name.replace(/[A-Z]/g,(K)=>`!${K.toLowerCase()}`),Z=await U(`${$}/${X}/@latest`,{headers:{"User-Agent":"buddy",Accept:"application/json"}}).catch(()=>null);if(!Z?.ok)return null;let J=await Z.json().catch(()=>null);if(!J?.Version)return null;if(R.test(J.Version))return null;return{latest:J.Version,...J.Time?{publishedAt:new Date(J.Time)}:{},releaseNotesUrl:`https://pkg.go.dev/${z.name}@${J.Version}`,homepage:`https://pkg.go.dev/${z.name}`}},applyUpdate(z,H){let $=W(H.name),X=W(H.currentVersion);return z.replace(new RegExp(`^(\\s*(?:require\\s+)?${$}\\s+)${X}(\\s|$)`,"gm"),`$1${H.newVersion}$2`)},async postWrite(z){return M(z,[{lockfile:"go.sum",command:["go","mod","tidy"]}])},osvEcosystem:"Go",compareVersions:B,updateType:C};var s=/^\s*v?(?:(\d+)!)?(\d+(?:\.\d+)*)((?:[-_.]?(?:a|b|c|rc|alpha|beta|pre|preview)[-_.]?\d*)?)((?:[-_.]?(?:post|rev|r)[-_.]?\d*|-\d+)?)((?:[-_.]?dev[-_.]?\d*)?)(?:\+([a-z0-9]+(?:[-_.][a-z0-9]+)*))?\s*$/i,i={a:"a",alpha:"a",b:"b",beta:"b",c:"rc",rc:"rc",pre:"rc",preview:"rc"},v={a:0,b:1,rc:2};function S(z){let H=s.exec(z);if(!H)return null;let[,$,X,Z,J,K,G]=H,V={epoch:$?Number($):0,release:X.split(".").map(Number)};if(Z){let Q=/([a-z]+)[-_.]?(\d*)/i.exec(Z);if(Q){let j=i[Q[1].toLowerCase()];if(j)V.pre=[j,Q[2]?Number(Q[2]):0]}}if(J){let Q=/(\d+)/.exec(J);V.post=Q?Number(Q[1]):0}if(K){let Q=/(\d+)/.exec(K);V.dev=Q?Number(Q[1]):0}if(G)V.local=G.toLowerCase();return V}function d(z,H){for(let $=0;$<Math.max(z.length,H.length);$++){let X=(z[$]??0)-(H[$]??0);if(X!==0)return X}return 0}function A(z,H){let $=S(z),X=S(H);if(!$||!X)return z===H?0:z<H?-1:1;if($.epoch!==X.epoch)return $.epoch-X.epoch;let Z=d($.release,X.release);if(Z!==0)return Z;let J=(Q)=>{if(Q.dev!==void 0&&Q.pre===void 0&&Q.post===void 0)return 0;if(Q.pre!==void 0)return 1;if(Q.post!==void 0)return 3;return 2},K=J($)-J(X);if(K!==0)return K;if($.pre&&X.pre){let Q=v[$.pre[0]]-v[X.pre[0]];if(Q!==0)return Q;if($.pre[1]!==X.pre[1])return $.pre[1]-X.pre[1]}if(($.post??0)!==(X.post??0))return($.post??0)-(X.post??0);let G=$.dev??Number.POSITIVE_INFINITY,V=X.dev??Number.POSITIVE_INFINITY;if(G!==V)return G<V?-1:1;return 0}function g(z){let H=S(z);return Boolean(H&&(H.pre!==void 0||H.dev!==void 0))}function D(z,H){let $=S(z),X=S(H);if(!$||!X)return"patch";if($.epoch!==X.epoch||($.release[0]??0)!==(X.release[0]??0))return"major";if(($.release[1]??0)!==(X.release[1]??0))return"minor";return"patch"}function N(z){let H=/^\s*(~=|===|==|!=|<=|>=|<|>|\^)?\s*(.*)$/.exec(z.trim());if(!H)return{operator:"",version:z.trim()};return{operator:H[1]??"",version:H[2].trim()}}var b=/^\s*([A-Z0-9][\w.-]*)\s*(\[[^\]]*\])?\s*([<>=!~^].*?)?\s*(?:;.*)?$/i,o=/^\s*(?:-|#|$)/;function r(z,H){let $=[];return H.split(`
|
|
4
4
|
`).forEach((X)=>{let Z=X.split("#")[0];if(o.test(Z))return;let J=b.exec(Z);if(!J?.[1]||!J[3])return;$.push({name:J[1],currentVersion:J[3].trim(),section:"dependencies",file:z,...J[2]?{metadata:{extras:J[2]}}:{}})}),$}var a=[[/^\s*dependencies\s*=\s*\[/m,"dependencies"],[/^\s*(?:dev-dependencies|dev)\s*=\s*\[/m,"devDependencies"]];function n(z,H){let $=[],X=new Set,Z=(K,G,V)=>{let Q=`${V}:${K}`;if(!G.trim()||G.trim()==="*"||X.has(Q))return;X.add(Q),$.push({name:K,currentVersion:G.trim(),section:V,file:z})};for(let[K,G]of a){let V=K.exec(H);if(!V)continue;let Q=V.index+V[0].length,j=H.indexOf("]",Q);if(j===-1)continue;for(let q of H.slice(Q,j).matchAll(/["']([^"']+)["']/g)){let Y=b.exec(q[1]);if(Y?.[1]&&Y[3])Z(Y[1],Y[3],G)}}let J=H.matchAll(/\[tool\.poetry\.(?:group\.[\w-]+\.)?(dependencies|dev-dependencies)\]([\s\S]*?)(?=\n\[|$)/g);for(let K of J){let G=K[1]==="dependencies"?"dependencies":"devDependencies";for(let V of K[2].matchAll(/^\s*([A-Z0-9][\w.-]*)\s*=\s*(.+)$/gim)){let Q=V[1];if(Q.toLowerCase()==="python")continue;let j=V[2].trim(),q=/version\s*=\s*["']([^"']+)["']/.exec(j),Y=/^["']([^"']+)["']/.exec(j),F=q?.[1]??Y?.[1];if(F)Z(Q,F,G)}}return $}var w={name:"python",manifestPatterns:["pyproject.toml","requirements.txt","requirements-*.txt","requirements/*.txt"],async detect(z){return L(z,this.manifestPatterns)},async parse(z,H){return z.endsWith(".toml")?n(z,H):r(z,H)},async latest(z,H={}){let $=H.registryUrl??"https://pypi.org",X=await U(`${$}/pypi/${encodeURIComponent(z.name)}/json`,{headers:{"User-Agent":"buddy",Accept:"application/json"}}).catch(()=>null);if(!X?.ok)return null;let Z=await X.json().catch(()=>null);if(!Z?.info?.version)return null;let J=Z.info.version;if(H.includePrerelease&&Z.releases){let V=Object.keys(Z.releases).filter((Q)=>!Z.releases[Q]?.every((j)=>j.yanked)).sort(A);J=V[V.length-1]??J}let G=Z.releases?.[J]?.find((V)=>V.upload_time_iso_8601)?.upload_time_iso_8601;return{latest:J,...G?{publishedAt:new Date(G)}:{},...Z.info.yanked?{deprecated:!0}:{},...Z.info.project_urls?.Changelog?{releaseNotesUrl:Z.info.project_urls.Changelog}:{},...Z.info.home_page?{homepage:Z.info.home_page}:{}}},applyUpdate(z,H){let{operator:$}=N(H.currentVersion),X=W(H.name),Z=W(H.currentVersion),J=N(H.newVersion).version,K=$?`${$}${J}`:J;return z.replace(new RegExp(`(^|["'\\s])(${X})(\\[[^\\]]*\\])?\\s*${Z}`,"gim"),(G,V,Q,j)=>`${V}${Q}${j??""}${K}`).replace(new RegExp(`^(\\s*${X}\\s*=\\s*["'])${Z}(["'])`,"gim"),`$1${K}$2`).replace(new RegExp(`^(\\s*${X}\\s*=\\s*\\{[^}]*version\\s*=\\s*["'])${Z}(["'])`,"gim"),`$1${K}$2`)},async postWrite(z){return M(z,[{lockfile:"uv.lock",command:["uv","lock"]},{lockfile:"poetry.lock",command:["poetry","lock","--no-update"]}])},osvEcosystem:"PyPI",compareVersions:A,updateType:D};var t=/^\s*gem\s+["']([\w-]+)["']\s*(?:,\s*["']([^"']+)["'])?/,e=/^\s*group\s+(.+?)\s+do\s*$/,zz=/^\s*end\s*$/,x={name:"ruby",manifestPatterns:["Gemfile","*.gemspec"],async detect(z){return L(z,this.manifestPatterns)},async parse(z,H){let $=[],X=[];for(let Z of H.split(`
|
|
5
5
|
`)){let J=Z.replace(/#.*$/,""),K=e.exec(J);if(K){X.push(K[1].replace(/[:'",\s]/g,"")||"default");continue}if(zz.test(J)){X.pop();continue}let G=t.exec(J);if(!G?.[1])continue;if(!G[2])continue;if(/\b(?:path|git|github|branch):/.test(J))continue;$.push({name:G[1],currentVersion:G[2],section:X.length>0?X[X.length-1]:"dependencies",file:z})}return $},async latest(z,H={}){let $=H.registryUrl??"https://rubygems.org",X=await U(`${$}/api/v1/versions/${encodeURIComponent(z.name)}.json`,{headers:{"User-Agent":"buddy",Accept:"application/json"}}).catch(()=>null);if(!X?.ok)return null;let Z=await X.json().catch(()=>null);if(!Array.isArray(Z)||Z.length===0)return null;let J=Z.filter((G)=>G.number&&!G.yanked).filter((G)=>H.includePrerelease?!0:!G.prerelease).sort((G,V)=>B(G.number,V.number)),K=J[J.length-1];if(!K?.number)return null;return{latest:K.number,...K.created_at?{publishedAt:new Date(K.created_at)}:{},homepage:`${$}/gems/${z.name}`}},applyUpdate(z,H){let $=W(H.name),X=W(H.currentVersion),Z=/^\s*(~>|>=|<=|>|<|=)?\s*/.exec(H.currentVersion)?.[1]??"",J=Z?`${Z} ${H.newVersion}`:H.newVersion;return z.replace(new RegExp(`^(\\s*gem\\s+["']${$}["']\\s*,\\s*["'])${X}(["'])`,"gm"),`$1${J}$2`)},async postWrite(z){return M(z,[{lockfile:"Gemfile.lock",command:["bundle","lock","--update"]}])},osvEcosystem:"RubyGems",compareVersions:B,updateType:C};var Hz=[[/^\[dependencies\]/m,"dependencies"],[/^\[dev-dependencies\]/m,"devDependencies"],[/^\[build-dependencies\]/m,"buildDependencies"],[/^\[workspace\.dependencies\]/m,"workspaceDependencies"]],T={name:"rust",manifestPatterns:["Cargo.toml"],async detect(z){return L(z,this.manifestPatterns)},async parse(z,H){let $=[];for(let[X,Z]of Hz){let J=X.exec(H);if(!J)continue;let K=J.index+J[0].length,G=H.slice(K).search(/\n\[/),V=G===-1?H.slice(K):H.slice(K,K+G);for(let Q of V.matchAll(/^\s*([\w-]+)\s*=\s*(.+)$/gm)){let j=Q[1],q=Q[2].trim(),Y=/version\s*=\s*["']([^"']+)["']/.exec(q),F=/^["']([^"']+)["']/.exec(q),_=Y?.[1]??F?.[1];if(!_||/\b(?:path|git)\s*=/.test(q))continue;$.push({name:j,currentVersion:_,section:Z,file:z})}}return $},async latest(z,H={}){let $=H.registryUrl??"https://crates.io",X=await U(`${$}/api/v1/crates/${encodeURIComponent(z.name)}`,{headers:{"User-Agent":"buddy (https://buddy.sh)",Accept:"application/json"}}).catch(()=>null);if(!X?.ok)return null;let Z=await X.json().catch(()=>null);if(!Z?.crate)return null;let J=H.includePrerelease?Z.crate.newest_version??Z.crate.max_stable_version:Z.crate.max_stable_version??Z.crate.newest_version;if(!J)return null;let K=Z.versions?.find((G)=>G.num===J);if(K?.yanked)return null;return{latest:J,...K?.created_at?{publishedAt:new Date(K.created_at)}:{},...Z.crate.repository?{releaseNotesUrl:`${Z.crate.repository}/releases`}:{},...Z.crate.homepage?{homepage:Z.crate.homepage}:{}}},applyUpdate(z,H){let $=W(H.name),X=W(H.currentVersion);return z.replace(new RegExp(`^(\\s*${$}\\s*=\\s*["'])${X}(["'])`,"gm"),`$1${H.newVersion}$2`).replace(new RegExp(`^(\\s*${$}\\s*=\\s*\\{[^}]*?version\\s*=\\s*["'])${X}(["'])`,"gm"),`$1${H.newVersion}$2`)},async postWrite(z){return M(z,[{lockfile:"Cargo.lock",command:["cargo","update","--workspace"]}])},osvEcosystem:"crates.io",compareVersions:B,updateType:C};import{join as Xz}from"path";async function Zz(z){let H=z.logger??f(),$=z.adapters??k,X=new Set(z.ignore??[]),Z=[],J={},K=[];return await Promise.all($.map(async(G)=>{let V;try{V=await G.detect(z.dir)}catch(Q){H.warn(`\u26A0\uFE0F ${G.name}: could not look for manifests: ${Q}`);return}if(V.length===0)return;K.push({ecosystem:G.name,files:V}),H.debug(`\uD83D\uDCE6 ${G.name}: ${V.length} manifest(s)`);for(let Q of V){let j;try{j=await G.parse(Q,await Bun.file(Xz(z.dir,Q)).text())}catch(Y){H.warn(`\u26A0\uFE0F ${G.name}: could not parse ${Q}: ${Y}`);continue}J[G.name]=(J[G.name]??0)+j.length;let q=await Promise.all(j.map(async(Y)=>{if(X.has(Y.name))return null;try{let F=await G.latest(Y,{...z.includePrerelease!==void 0?{includePrerelease:z.includePrerelease}:{},logger:H});if(!F)return null;let _=y(Y.currentVersion);if(G.compareVersions(F.latest,_)<=0)return null;return{name:Y.name,currentVersion:Y.currentVersion,newVersion:F.latest,updateType:G.updateType(_,F.latest),dependencyType:G.name,file:Q,...F.releaseNotesUrl?{releaseNotesUrl:F.releaseNotesUrl}:{},...F.homepage?{homepage:F.homepage}:{}}}catch(F){return H.debug(`${G.name}: could not resolve ${Y.name}: ${F}`),null}}));Z.push(...q.filter((Y)=>Y!==null))}})),{updates:Z,dependenciesByEcosystem:J,manifests:K}}function y(z){let H=/(\d[\w.!+-]*)/.exec(z);return H?H[1]:z.trim()}async function $z(z,H,$=k){let X=[],Z=[];for(let J of $){if(!H.includes(J.name)||!J.postWrite)continue;let K=await J.postWrite(z).catch(()=>({regenerated:[],note:void 0}));if(X.push(...K.regenerated),K.note)Z.push(K.note)}return{regenerated:X,notes:Z}}var k=[w,T,I,x];function Ez(z,H=k){let $=z.split("/").pop()??z;for(let X of H)if(X.manifestPatterns.some((Z)=>h($,Z)||h(z,Z)))return X;return null}function h(z,H){if(!H.includes("*"))return z===H;let $=H.split("*").map((X)=>X.replace(/[.+?^${}()|[\]\\]/g,"\\$&")).join("[^/]*");return new RegExp(`^${$}$`).test(z)}function Rz(z,H=k){return H.find(($)=>$.name===z)??null}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import"./chunk-
|
|
2
|
+
import"./chunk-6sm15trq.js";function f(i){return JSON.stringify({ok:!i.failed,summary:{workflows:i.workflows.length,findings:i.findings.length,errors:i.findings.filter((n)=>n.severity==="error").length,warnings:i.findings.filter((n)=>n.severity==="warning").length,info:i.findings.filter((n)=>n.severity==="info").length},findings:i.findings},null,2)}export{f as formatJson};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{D as s,E as t,F as u,G as v,H as w,c as a,d as b,e as c,f as d,g as e,h as f,i as g,j as h,k as i,l as j,m as k,n as l,o as m,p as n,q as o,u as p,v as q,w as r}from"./chunk-
|
|
2
|
+
import{D as s,E as t,F as u,G as v,H as w,c as a,d as b,e as c,f as d,g as e,h as f,i as g,j as h,k as i,l as j,m as k,n as l,o as m,p as n,q as o,u as p,v as q,w as r}from"./chunk-nhe8axrf.js";import"./chunk-6sm15trq.js";export{r as toFile,v as default,w as betaRefusalFallbackMiddleware,l as UnprocessableEntityError,f as RetryableError,m as RateLimitError,i as PermissionDeniedError,q as PagePromise,j as NotFoundError,n as InternalServerError,s as HUMAN_PROMPT,k as ConflictError,o as BetaFallbackState,u as BaseAnthropic,g as BadRequestError,h as AuthenticationError,a as AnthropicError,v as Anthropic,c as APIUserAbortError,p as APIPromise,b as APIError,e as APIConnectionTimeoutError,d as APIConnectionError,t as AI_PROMPT};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{Ai as
|
|
2
|
+
import{Ai as s,Bi as t,Ci as c,Di as r,Ei as P,Fi as n,Gi as o,Hi as g,Ii as l,Ji as p,Ki as d,Li as k,yi as a,zi as e}from"./chunk-njfbmhm4.js";import"./chunk-6sm15trq.js";export{o as startPeriodicCleanup,n as setupCleanupHandlers,p as scanPantryPackages,t as saveToCacheAndOutput,a as savePackageAsTypeScript,d as readPantryPackageInfo,s as getValidCachedPackage,r as fetchPkgxProjects,k as fetchPantryPackageWithMetadata,P as fetchPantryPackage,l as fetchAndSavePackage,g as fetchAndSaveAllPackages,c as cleanupBrowserResources,e as cleanStaleOutputFiles};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
3
|
-
export{F as
|
|
2
|
+
import{Nh as K}from"./chunk-f0z6kyqt.js";import{cl as N}from"./chunk-6sm15trq.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 se,S as te,w as ue,U as ve};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{Aa as d,Ba as e,Ca as f,xa as a,ya as b,za as c}from"./chunk-
|
|
2
|
+
import{Aa as d,Ba as e,Ca as f,xa as a,ya as b,za as c}from"./chunk-5gybfx14.js";import"./chunk-ddmvjp0y.js";import"./chunk-f0z6kyqt.js";import"./chunk-6sm15trq.js";export{b as productFor,f as describeEol,c as cycleFor,d as checkEol,e as EOL_WARNING_DAYS,a as EOL_PRODUCTS};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import{existsSync as O,readdirSync as R,statSync as A}from"fs";import{join as U,relative as L}from"path";function T(z,K){try{let V=Bun.YAML.parse(K);if(!V||typeof V!=="object")return null;return{file:z,raw:K,data:V}}catch{return null}}function B(z,K){if(!K)return;let V=z.indexOf(K);if(V<0)return;let M=1;for(let Y=0;Y<V;Y++)if(z.charCodeAt(Y)===10)M++;return M}async function W(z){let K=U(z,".github","workflows");if(!O(K))return[];let V=R(K),M=[];for(let Y of V){if(!Y.endsWith(".yml")&&!Y.endsWith(".yaml"))continue;let Q=U(K,Y);if(!A(Q).isFile())continue;let Z=await Bun.file(Q).text(),N=T(L(z,Q),Z);if(N)M.push(N)}return M}function*X(z){let K=z.data.jobs;if(!K||typeof K!=="object")return;for(let[V,M]of Object.entries(K)){if(!M||typeof M!=="object")continue;let Y=M.steps;if(!Array.isArray(Y))continue;for(let Q=0;Q<Y.length;Q++){let Z=Y[Q];if(!Z||typeof Z!=="object")continue;yield{jobId:V,job:M,stepIndex:Q,step:Z}}}}function*$(z){let K=z.data.jobs;if(!K||typeof K!=="object")return;for(let[V,M]of Object.entries(K)){if(!M||typeof M!=="object")continue;yield{jobId:V,job:M}}}var F={id:"bash-injection",defaultSeverity:"error",description:"Avoid `${{ }}` interpolation of untrusted input inside `run:` blocks.",check(z){let K=[];for(let{jobId:V,step:M,stepIndex:Y}of X(z)){let Q=typeof M.run==="string"?M.run:null;if(!Q)continue;let Z=[...Q.matchAll(/\$\{\{\s*([^}]+?)\s*\}\}/g)];for(let N of Z){let C=N[1].trim();if(I(C))continue;K.push({ruleId:this.id,severity:this.defaultSeverity,message:`Job \`${V}\`, step ${Y+1}: \`${C}\` is interpolated into a shell.`,detail:"GitHub evaluates `${{ ... }}` before the shell runs, so attacker-controlled values become part of the command line. Move the value into `env:` and reference it as a shell variable.",file:z.file,line:B(z.raw,N[0]),fix:'Put the value in `env:` and reference it with `"$NAME"` instead.'})}}return K}},_=["secrets.","vars.","runner.","env.","inputs.","matrix.","strategy.","job.","steps.","needs."],S=new Set(["github.repository","github.repository_owner","github.workflow","github.run_id","github.run_number","github.run_attempt","github.event_name","github.sha","github.ref_name","github.token","github.actor","github.actor_id","github.api_url","github.server_url","github.graphql_url","github.workspace","github.action","github.action_path","github.action_ref","github.action_repository","github.action_status","github.job","github.job_workflow_sha"]);function I(z){if(S.has(z))return!0;return _.some((K)=>z.startsWith(K))}var J={id:"dangerous-pull-request-target",defaultSeverity:"error",description:"Avoid checking out PR-author code from a `pull_request_target` workflow.",check(z){if(!x(z.data.on,"pull_request_target"))return[];let K=[];for(let{jobId:V,step:M}of X(z)){if(!(typeof M.uses==="string"?M.uses:"").startsWith("actions/checkout@"))continue;let Q=typeof M.with?.ref==="string"?M.with.ref:null;if(!Q)continue;if(Q.includes("pull_request")||Q.includes("head.sha")||Q.includes("head.ref")||Q.includes("github.head_ref"))K.push({ruleId:this.id,severity:this.defaultSeverity,message:`Job \`${V}\` checks out PR-author code under \`pull_request_target\`.`,detail:"This grants attacker-controlled code access to repository secrets and write tokens. Move the build to `pull_request` or run untrusted code in a sandboxed second workflow without secrets.",file:z.file,line:B(z.raw,Q),fix:"Either switch the trigger to `pull_request`, or split into two workflows: one privileged (no checkout of head) and one unprivileged (checkout of head, no secrets)."})}return K}};function x(z,K){if(typeof z==="string")return z===K;if(Array.isArray(z))return z.includes(K);if(z&&typeof z==="object")return K in z;return!1}var q={id:"excessive-permissions",defaultSeverity:"warning",description:"Workflows and jobs should declare a least-privilege `permissions:` block.",check(z){let K=[],V=z.data.permissions;if(V===void 0)K.push({ruleId:this.id,severity:this.defaultSeverity,message:"Workflow does not declare top-level `permissions:`.",detail:"Without an explicit `permissions:` block, jobs inherit the repository default \u2014 historically `write-all`. Add a least-privilege block at the workflow root.",file:z.file,line:1,fix:"Add `permissions:\\n contents: read` at the top of the workflow, then narrow per-job as needed."});else if(V==="write-all")K.push({ruleId:this.id,severity:"error",message:"Workflow grants `permissions: write-all`.",file:z.file,line:B(z.raw,"write-all"),fix:"Replace with explicit per-scope grants (e.g. `contents: read`, `pull-requests: write`)."});else if(V!=="read-all"&&typeof V==="object")K.push(...P(this.id,z.file,z.raw,V,"workflow"));for(let{jobId:M,job:Y}of $(z)){let Q=Y.permissions;if(Q===void 0)continue;if(Q==="write-all")K.push({ruleId:this.id,severity:"error",message:`Job \`${M}\` grants \`permissions: write-all\`.`,file:z.file,line:B(z.raw,"write-all"),fix:"Replace with explicit per-scope grants."});else if(Q!=="read-all"&&typeof Q==="object")K.push(...P(this.id,z.file,z.raw,Q,`job \`${M}\``))}return K}};function P(z,K,V,M,Y){let Q=[];if(typeof M!=="object"||M===null)return Q;for(let[Z,N]of Object.entries(M))if(N==="write"&&(Z==="actions"||Z==="id-token"))Q.push({ruleId:z,severity:"warning",message:`${Y} grants \`${Z}: write\` \u2014 verify this is required.`,detail:Z==="id-token"?"`id-token: write` is needed for OIDC federation but should never be combined with running untrusted code.":"`actions: write` allows the workflow to dispatch other workflows, increasing blast radius if compromised.",file:K,line:B(V,`${Z}: write`)});return Q}var D={id:"missing-timeout",defaultSeverity:"warning",description:"Jobs should declare an explicit `timeout-minutes` to bound runaway execution.",check(z){let K=[];for(let{jobId:V,job:M}of $(z)){let Y=M["timeout-minutes"];if(typeof Y==="number"&&Y>0)continue;K.push({ruleId:this.id,severity:this.defaultSeverity,message:`Job \`${V}\` has no \`timeout-minutes\`.`,file:z.file,line:B(z.raw,`${V}:`),fix:"Add `timeout-minutes: <n>` (15\u201360 is a reasonable default for most CI jobs)."})}return K}};var G={id:"self-hosted-exposure",defaultSeverity:"warning",description:"Self-hosted runners should be scoped with additional labels, not used bare.",check(z){let K=[];for(let{jobId:V,job:M}of $(z)){let Y=M["runs-on"];if(!Y)continue;if(typeof Y==="string"){if(Y==="self-hosted")K.push({ruleId:this.id,severity:this.defaultSeverity,message:`Job \`${V}\` uses bare \`runs-on: self-hosted\`.`,file:z.file,line:B(z.raw,"runs-on: self-hosted"),fix:"Add at least one scoping label, e.g. `runs-on: [self-hosted, my-project]`, and disable persistence on the runner."});continue}if(Array.isArray(Y)){let Q=Y.filter((Z)=>typeof Z==="string");if(Q.includes("self-hosted")&&Q.length===1)K.push({ruleId:this.id,severity:this.defaultSeverity,message:`Job \`${V}\` uses \`runs-on: [self-hosted]\` with no additional labels.`,file:z.file,line:B(z.raw,"self-hosted"),fix:"Add at least one scoping label (project name, environment) so the pool is explicit."})}}return K}};var v=/^[0-9a-f]{40}$/i,E={id:"unpinned-action",defaultSeverity:"warning",description:"Third-party actions should be pinned to a full commit SHA, not a tag or branch.",check(z){let K=[];for(let{step:V}of X(z)){let M=typeof V.uses==="string"?V.uses:null;if(!M)continue;if(M.startsWith("./")||M.startsWith("docker://"))continue;let Y=M.lastIndexOf("@");if(Y<0){K.push({ruleId:this.id,severity:this.defaultSeverity,message:`Action \`${M}\` is missing a version reference.`,file:z.file,line:B(z.raw,M),fix:`Pin to a commit SHA: \`${M}@<full-sha> # vX.Y.Z\``});continue}let Q=M.slice(0,M.indexOf("/")),Z=M.slice(Y+1);if(Q==="actions"||Q==="github")continue;if(v.test(Z))continue;K.push({ruleId:this.id,severity:this.defaultSeverity,message:`Action \`${M}\` is pinned to a mutable ref (\`${Z}\`).`,file:z.file,line:B(z.raw,M),fix:`Replace with a SHA-pinned reference: \`${M.slice(0,Y)}@<full-sha> # ${Z}\``})}return K}};var H=[E,q,J,F,D,G];async function Tz(z,K={}){let V=await W(z);return y(V,K)}function y(z,K={}){let V=(K.rules??H).filter((Q)=>{return!K.ignore?.includes(Q.id)}),M=[];for(let Q of z)for(let Z of V){let N=Z.check(Q);for(let C of N)M.push(C)}let Y=M.some((Q)=>Q.severity==="error");return{workflows:z,findings:M,failed:Y}}
|
|
3
|
-
export{Tz as
|
|
3
|
+
export{Tz as fe,y as ge};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{ka as a,la as b,ma as c,na as d,oa as e,pa as f,qa as g,ra as h,sa as i,ta as j,ua as k,va as l,wa as m}from"./chunk-
|
|
2
|
+
import{ka as a,la as b,ma as c,na as d,oa as e,pa as f,qa as g,ra as h,sa as i,ta as j,ua as k,va as l,wa as m}from"./chunk-4ycesykg.js";import"./chunk-f0z6kyqt.js";import"./chunk-6sm15trq.js";export{e as summarizeGates,l as runPostMerge,d as runGates,i as runAiGates,m as isMergeEvent,f as gateIcon,j as findLinkedIssues,a as checkTitleFormat,g as checkLinkedIssue,b as checkDescription,c as checkDependencies,h as checkCustomAssertions,k as appendChangelogEntry};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{Jc as a,Kc as b,Lc as c,Mc as d}from"./chunk-2pv5zwbm.js";import"./chunk-ztw515ew.js";import"./chunk-vckn5ate.js";import"./chunk-f001yg2a.js";import"./chunk-gvnsr72j.js";import"./chunk-fvhnza91.js";import"./chunk-ktmgq0ja.js";import"./chunk-6k6dgwmy.js";import"./chunk-ddmvjp0y.js";import"./chunk-f0z6kyqt.js";import"./chunk-njfbmhm4.js";import"./chunk-6sm15trq.js";export{c as isWorkflowPermissionRefusal,a as gitAuthConfigArgs,b as WorkflowPermissionError,d as GitHubProvider};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{$a as e,Xa as a,Ya as b,Za as c,_a as d,ab as f,bb as g,cb as h,db as i,eb as j,fb as k,gb as l}from"./chunk-
|
|
2
|
+
import{$a as e,Xa as a,Ya as b,Za as c,_a as d,ab as f,bb as g,cb as h,db as i,eb as j,fb as k,gb as l}from"./chunk-1szfwcst.js";import"./chunk-jpdd59fh.js";import"./chunk-6sm15trq.js";export{k as withTouchOffer,b as unitTestsTouch,d as simplifyTouch,i as renderTouchOffer,e as planTouch,l as parseTouchSelections,j as hasTouchOffer,g as getFinishingTouch,a as docstringsTouch,c as autofixTouch,h as TOUCH_OFFER_MARKER,f as FINISHING_TOUCHES};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{of as a,pf as b,qf as c}from"./chunk-675c6ddc.js";import"./chunk-p96zq2zc.js";import"./chunk-jpdd59fh.js";import"./chunk-p8azbpq6.js";import"./chunk-emygmh7r.js";import"./chunk-kpqez1ht.js";import"./chunk-vckn5ate.js";import"./chunk-f001yg2a.js";import"./chunk-gvnsr72j.js";import"./chunk-fvhnza91.js";import"./chunk-ktmgq0ja.js";import"./chunk-6k6dgwmy.js";import"./chunk-ddmvjp0y.js";import"./chunk-f0z6kyqt.js";import"./chunk-njfbmhm4.js";import"./chunk-6sm15trq.js";export{a as matchesGlobs,c as appendUpgradeReport,b as analyzeGroupMajors};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{Qb as p,Rb as q,Sb as r,Tb as s,Ub as t,Vb as u,Wb as v,Xb as w,Yb as x}from"./chunk-
|
|
2
|
+
import{Qb as p,Rb as q,Sb as r,Tb as s,Ub as t,Vb as u,Wb as v,Xb as w,Yb as x}from"./chunk-4gx2f1k6.js";import{$b as i,Zb as g,_b as h,ac as j,bc as k,cc as l,dc as m,ec as n,fc as o}from"./chunk-3d3rwmmj.js";import"./chunk-emygmh7r.js";import{Tf as a,Uf as b,Vf as c,Wf as d,Xf as e,Yf as f}from"./chunk-kpqez1ht.js";import"./chunk-ddmvjp0y.js";import"./chunk-f0z6kyqt.js";import"./chunk-6sm15trq.js";export{s as serializeLearnings,v as selectLearnings,j as resolveModelAlias,n as resolveAiProvider,w as renderLearnings,d as redactError,c as redactDeep,b as redact,r as parseLearnings,x as loadLearnings,m as createOpenAiProvider,t as createLearning,l as createGoogleProvider,k as createAnthropicProvider,o as createAiClient,u as addLearning,a as REDACTED,i as PROVIDER_PRIORITY,h as PROVIDER_KEY_ENV,g as MODEL_ALIASES,q as DEFAULT_PROMPT_LIMIT,p as DEFAULT_LEARNINGS_FILE,f as AiProviderError,e as AiBudgetExceededError};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{Nh as X}from"./chunk-f0z6kyqt.js";import"./chunk-6sm15trq.js";import{readFileSync as _}from"fs";function L(q){let z=q.split("/").pop()||"";return z==="composer.json"||z==="composer.lock"}async function R(q,z){try{let j=JSON.parse(z),A=[];if(j.require)J(j.require,"require",q,A);if(j["require-dev"])J(j["require-dev"],"require-dev",q,A);return{path:q,type:"composer.json",content:z,dependencies:A}}catch(j){return X().warn(`Failed to parse composer.json file ${q}:`,j),null}}async function S(q,z){try{let j=JSON.parse(z),A=[];if(j.packages){for(let b of j.packages)if(b.name&&b.version)A.push({name:b.name,currentVersion:b.version,type:"require",file:q})}if(j["packages-dev"]){for(let b of j["packages-dev"])if(b.name&&b.version)A.push({name:b.name,currentVersion:b.version,type:"require-dev",file:q})}return{path:q,type:"composer.lock",content:z,dependencies:A}}catch(j){return X().warn(`Failed to parse composer.lock file ${q}:`,j),null}}async function v(q,z){let j=q.split("/").pop()||"";if(j==="composer.json")return R(q,z);if(j==="composer.lock")return S(q,z);return null}function J(q,z,j,A){for(let[b,Z]of Object.entries(q)){if(b==="php"||b.startsWith("ext-"))continue;if(b.includes("/"))A.push({name:b,currentVersion:Z,type:z,file:j})}}async function U(q){let z=[],j=q.filter((b)=>b.file.endsWith("composer.json"));if(j.length===0)return z;let A=new Map;for(let b of j){if(!A.has(b.file))A.set(b.file,[]);A.get(b.file).push({name:b.name,newVersion:b.newVersion})}for(let[b,Z]of A)try{let K=_(b,"utf-8"),T=JSON.parse(K);for(let E of Z){let Y=!1;if(T.require&&T.require[E.name]){let H=T.require[E.name],O;if(H.includes(",")){let G=H.match(/\d+\.\d+(?:\.\d+)?/),Q=G?G[0]:null;O=H.replace(/\d+\.\d+(?:\.\d+)?/g,(W)=>{return Q!==null&&W===Q?E.newVersion:W})}else{let G=H.match(/^(\D*)/);O=`${G?G[1]:""}${E.newVersion}`}let $=new RegExp(`("${E.name.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}"\\s*:\\s*")([^"]+)(")`,"g");K=K.replace($,`$1${O}$3`),Y=!0}if(!Y&&T["require-dev"]&&T["require-dev"][E.name]){let H=T["require-dev"][E.name],O;if(H.includes(",")){let G=H.match(/\d+\.\d+(?:\.\d+)?/),Q=G?G[0]:null;O=H.replace(/\d+\.\d+(?:\.\d+)?/g,(W)=>{return Q!==null&&W===Q?E.newVersion:W})}else{let G=H.match(/^(\D*)/);O=`${G?G[1]:""}${E.newVersion}`}let $=new RegExp(`("${E.name.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}"\\s*:\\s*")([^"]+)(")`,"g");K=K.replace($,`$1${O}$3`),Y=!0}if(!Y)X().warn(`Package ${E.name} not found in ${b}`)}z.push({path:b,content:K,type:"update"})}catch(K){X().error(`Failed to update ${b}:`,K)}return z}export{S as parseComposerLock,R as parseComposerJson,v as parseComposerFile,L as isComposerFile,U as generateComposerUpdates};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{Ib as $}from"./chunk-vckhctmr.js";import"./chunk-
|
|
2
|
+
import{Ib as $}from"./chunk-vckhctmr.js";import"./chunk-6sm15trq.js";import{readdir as Z}from"fs/promises";import{join as W}from"path";var w=["dependencies","peerDependencies","optionalDependencies"];async function x(U,V,M,Q){let J=await G(M,Q);if(J.length===0)return[];let H=new Map,z=(q,v,E)=>{let X=H.get(q),Y={by:v,range:E};if(X)X.push(Y);else H.set(q,[Y])};for(let q of U)for(let v of q.dependencies)z(v.name,$,v.currentVersion);for(let q of J)for(let[v,E]of Object.entries(q.ranges))z(v,q.name,E);let D=[];for(let q of J){let v=H.get(q.name);if(!v||v.length===0)continue;try{let E=await V.getPackageMetadata(q.name);if(!E?.versions?.length)continue;D.push({name:q.name,installed:q.version,available:E.versions,declared:v})}catch(E){Q.debug(`Skipping drift analysis for ${q.name}: ${E}`)}}return D}async function G(U,V){let M=W(U,"node_modules"),Q=[],J;try{J=await Z(M)}catch{return V.debug("No node_modules directory, skipping resolution drift analysis"),[]}let H=[];for(let z of J){if(z.startsWith("."))continue;if(z.startsWith("@")){try{let D=await Z(W(M,z));H.push(...D.map((q)=>`${z}/${q}`))}catch{continue}continue}H.push(z)}return await Promise.all(H.map(async(z)=>{try{let D=await Bun.file(W(M,z,"package.json")).json();if(!D.name||!D.version)return;let q={};for(let v of w)Object.assign(q,D[v]??{});Q.push({name:D.name,version:D.version,ranges:q})}catch{}})),Q}export{x as collectDriftInputs};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{cg as Z}from"./chunk-f001yg2a.js";import{Nh as J}from"./chunk-f0z6kyqt.js";import{cl as q}from"./chunk-6sm15trq.js";import{spawn as E}from"child_process";import{existsSync as K}from"fs";import V from"process";function v(){return["bun.lock","bun.lockb","package-lock.json","yarn.lock","pnpm-lock.yaml","composer.lock","pantry.lock"]}function Y(b){switch(b){case"bun":return{command:"bun",args:["install"]};case"npm":return{command:"npm",args:["install"]};case"yarn":return{command:"yarn",args:["install"]};case"pnpm":return{command:"pnpm",args:["install"]};case"composer":return{command:"composer",args:["update","--lock"]};case"pantry":return{command:"pantry",args:["install","--ignore-scripts","--quiet"]}}}async function x(b,z,j=300000){let{command:B,args:Q}=Y(b);return J().info(`\uD83D\uDD04 Regenerating lock file with ${b} (${B} ${Q.join(" ")})...`),new Promise((H)=>{let O=E(B,Q,{cwd:z,stdio:"pipe",env:{...V.env,CI:"true"}}),$="",U="",W=!1,X=setTimeout(()=>{W=!0,J().warn(`\u26A0\uFE0F ${b} install timed out after ${j/1000}s, sending SIGTERM...`),O.kill("SIGTERM"),setTimeout(()=>{if(!O.killed)J().warn(`\u26A0\uFE0F ${b} install did not exit after SIGTERM, sending SIGKILL...`),O.kill("SIGKILL")},1e4)},j);O.stdout?.on("data",(G)=>{$+=G.toString()}),O.stderr?.on("data",(G)=>{U+=G.toString()}),O.on("close",(G)=>{if(clearTimeout(X),W){H({success:!1,packageManager:b,message:`Lock file regeneration timed out after ${j/1000}s`});return}if(G===0)J().info(`\u2705 Lock file regenerated successfully with ${b}`),H({success:!0,packageManager:b,message:"Lock file regenerated successfully"});else{if(J().warn(`\u26A0\uFE0F ${b} install exited with code ${G}`),U)J().warn(` stderr: ${U.slice(0,500)}`);H({success:!1,packageManager:b,message:`Install exited with code ${G}: ${U.slice(0,200)}`})}}),O.on("error",(G)=>{clearTimeout(X),J().warn(`\u26A0\uFE0F Failed to run ${B}: ${G.message}`),H({success:!1,packageManager:b,message:`Failed to run ${B}: ${G.message}`})})})}var A=new Set(["deps.yaml","deps.yml","pantry.jsonc","pantry.json","pantry.toml"]);function R(b,z=V.cwd()){let j=new Set,B=!1;for(let Q of b){let H=Q.split("/").pop()||"";if(H==="package.json")j.add(Z(z)),B=!0;if(H==="composer.json")j.add("composer");if(A.has(H))B=!0}if(B&&_("pantry",z))j.add("pantry");return Array.from(j)}function T(b,z){return{bun:["bun.lock","bun.lockb"],npm:["package-lock.json"],yarn:["yarn.lock"],pnpm:["pnpm-lock.yaml"],composer:["composer.lock"],pantry:["pantry.lock"]}[b].find((B)=>K(`${z}/${B}`))??null}function F(b,z=V.cwd()){let j=new Set(b.map((B)=>B.replace(/^\.\//,"")));return R(b,z).map((B)=>T(B,z)).filter((B)=>B!==null&&!j.has(B))}function _(b,z){let j=q("path");switch(b){case"bun":return K(j.join(z,"bun.lock"))||K(j.join(z,"bun.lockb"));case"npm":return K(j.join(z,"package-lock.json"));case"yarn":return K(j.join(z,"yarn.lock"));case"pnpm":return K(j.join(z,"pnpm-lock.yaml"));case"composer":return K(j.join(z,"composer.lock"));case"pantry":return K(j.join(z,"pantry.lock"))}}
|
|
3
|
+
export{v as Nc,x as Oc,R as Pc,T as Qc,F as Rc,_ as Sc};
|
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
import type { FileChange, Issue, IssueOptions, PullRequest, PullRequestOptions } from '../types';
|
|
2
2
|
import type { GitProvider, ListWorkflowRunsOptions, ProviderCapabilities, ReviewThread, WorkflowRun } from './provider';
|
|
3
|
+
/**
|
|
4
|
+
* `git -c` arguments that make git authenticate as `token` against `serverUrl`.
|
|
5
|
+
*
|
|
6
|
+
* actions/checkout persists its token as `http.<server>/.extraheader`, which
|
|
7
|
+
* git sends on every request. Header values accumulate, so the empty value
|
|
8
|
+
* resets the list before the replacement is added.
|
|
9
|
+
*/
|
|
10
|
+
export declare function gitAuthConfigArgs(serverUrl: string, token: string): string[];
|
|
11
|
+
/** Whether a push was refused for touching workflow files without permission. */
|
|
12
|
+
export declare function isWorkflowPermissionRefusal(error: unknown): boolean;
|
|
3
13
|
/**
|
|
4
14
|
* Thrown when lockfile regeneration fails. Not a transient git error —
|
|
5
15
|
* must bubble past the API fallback so we don't silently open a PR with
|
|
@@ -8,6 +18,15 @@ import type { GitProvider, ListWorkflowRunsOptions, ProviderCapabilities, Review
|
|
|
8
18
|
declare class LockfileRegenerationError extends Error {
|
|
9
19
|
constructor(message: string);
|
|
10
20
|
}
|
|
21
|
+
/**
|
|
22
|
+
* Thrown when GitHub refuses a push because the token may not touch
|
|
23
|
+
* `.github/workflows/` - a GitHub App without the Workflows permission, or a
|
|
24
|
+
* PAT without the `workflow` scope. The API path is refused for the same
|
|
25
|
+
* reason, so falling back to it only turns a permission gap into a failed run.
|
|
26
|
+
*/
|
|
27
|
+
export declare class WorkflowPermissionError extends Error {
|
|
28
|
+
constructor(message: string);
|
|
29
|
+
}
|
|
11
30
|
export declare class GitHubProvider implements GitProvider {
|
|
12
31
|
constructor(token: string, owner: string, repo: string, hasWorkflowPermissions?: boolean, workflowToken?: string);
|
|
13
32
|
capabilities(): ProviderCapabilities;
|
|
@@ -17,6 +36,7 @@ export declare class GitHubProvider implements GitProvider {
|
|
|
17
36
|
commitChanges(branchName: string, message: string, files: FileChange[], baseBranch?: string): Promise<void>;
|
|
18
37
|
createPullRequest(options: PullRequestOptions): Promise<PullRequest>;
|
|
19
38
|
runCommand(command: string, args: string[], tokenOverride?: string): Promise<string>;
|
|
39
|
+
getPullRequestFiles(number: number): Promise<string[]>;
|
|
20
40
|
getPullRequests(state?: 'open' | 'closed' | 'all'): Promise<PullRequest[]>;
|
|
21
41
|
updatePullRequest(prNumber: number, options: Partial<PullRequestOptions>): Promise<PullRequest>;
|
|
22
42
|
closePullRequest(prNumber: number): Promise<void>;
|
|
@@ -193,6 +193,7 @@ export declare interface GitProvider {
|
|
|
193
193
|
deleteBranch: (branchName: string) => Promise<void>
|
|
194
194
|
commitChanges: (branchName: string, message: string, files: FileChange[], baseBranch?: string) => Promise<void>
|
|
195
195
|
getFileContent: (path: string, ref: string) => Promise<string | null>
|
|
196
|
+
getPullRequestFiles?: (number: number) => Promise<string[]>
|
|
196
197
|
createPullRequest: (options: PullRequestOptions) => Promise<PullRequest>
|
|
197
198
|
getPullRequests: (state?: 'open' | 'closed' | 'all') => Promise<PullRequest[]>
|
|
198
199
|
updatePullRequest: (prNumber: number, options: Partial<PullRequestOptions>) => Promise<PullRequest>
|
package/dist/src/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{I as wo,J as So,K as ho,L as uo,M as co,N as Vo,O as eo,P as go,Q as ro,R as vo,S as io,T as so,U as no}from"../chunk-0w695m54.js";import{W as ko,X as qo}from"../chunk-kbbqs8ae.js";import{$ as Wo,Y as Jo,Z as Ko,_ as Qo}from"../chunk-jnb80k2x.js";import{aa as PR,ba as aR,ca as lR,da as yR,ea as CR,fa as NR,ga as _R,ha as zR,ia as DR,ja as TR}from"../chunk-69qyr9ef.js";import{ka as pR,la as oR,ma as mR,na as xR,oa as fR,pa as dR,qa as RR,ra as MR,sa as UR,ta as AR,ua as GR,va as ER,wa as OR}from"../chunk-fjp3a7hp.js";import{Aa as $o,Ba as bo,Ca as to,xa as Xo,ya as Yo,za as Zo}from"../chunk-3cvng2nz.js";import"../chunk-rb1fh9vd.js";import{Da as pm}from"../chunk-dm5yktev.js";import{Ea as ed,Fa as gd,Ga as rd,Ha as vd,Ia as id,Ja as sd,Ka as nd}from"../chunk-rz7pg7pb.js";import{La as Zd,Ma as $d,Na as bd,Oa as td,Pa as wd,Qa as Sd,Ra as hd,Sa as ud,Ta as cd,Ua as Vd}from"../chunk-96ht6hwd.js";import{Va as Yf,Wa as Zf}from"../chunk-s6z3gm2s.js";import{$a as Sf,Xa as $f,Ya as bf,Za as tf,_a as wf,ab as hf,bb as uf,cb as cf,db as Vf,eb as ef,fb as gf,gb as rf}from"../chunk-s4zb0fcj.js";import{hb as vf,ib as sf,jb as nf,kb as pd,lb as od}from"../chunk-tw047td6.js";import{mb as Id}from"../chunk-9fq7drn8.js";import{Ab as Td,Bb as jd,Cb as Ld,Db as Bd,nb as dd,ob as Rd,pb as Md,qb as Ud,rb as Ad,sb as Gd,tb as Ed,ub as Od,vb as Pd,wb as Nd,xb as _d,yb as zd,zb as Dd}from"../chunk-5x4gt4c5.js";import{Eb as md,Fb as xd,Gb as fd}from"../chunk-q2tjkhez.js";import{Hb as Co,Ib as No,Jb as _o,Kb as zo}from"../chunk-vckhctmr.js";import{Lb as ad,Mb as ld,Nb as yd,Pb as Cd}from"../chunk-5yfaptmp.js";import{Qb as Rf,Rb as Mf,Sb as Uf,Tb as Af,Ub as Gf,Vb as Ef,Wb as Of,Xb as Pf,Yb as af}from"../chunk-rc2mk5x6.js";import{$b as nx,Zb as ix,_b as sx,ac as pf,bc as of,cc as mf,dc as xf,ec as ff,fc as df}from"../chunk-tjc2vgwn.js";import{gc as Vp,hc as ep,ic as gp,jc as rp,mc as vp,nc as ip}from"../chunk-61xecp1z.js";import{Ac as Uo,Bc as Ao,Cc as Go,Dc as Eo,Ec as Oo,Fc as Po,Gc as ao,Hc as lo,Ic as yo,pc as sp,sc as np,tc as po,uc as oo,vc as mo,wc as xo,xc as fo,yc as Ro,zc as Mo}from"../chunk-6p4qz8qv.js";import{Jc as dp}from"../chunk-j9cgwkm8.js";import{Kc as mp,Lc as xp,Mc as fp}from"../chunk-8ycrg9gp.js";import{Oc as mm,Pc as xm,Qc as fm,Rc as dm}from"../chunk-8gd76j8e.js";import{Sc as Bo,Tc as Fo,Uc as Ho}from"../chunk-ctt9xk2j.js";import{Vc as Sp,Wc as hp,Xc as up,Yc as cp,_c as Do}from"../chunk-3cab6vqx.js";import"../chunk-phfmnnne.js";import{ad as _p,bd as zp,cd as Dp,dd as Tp,ed as jp}from"../chunk-r763e19p.js";import{fd as wp}from"../chunk-be629jhq.js";import"../chunk-pkr6905p.js";import{hd as ex,id as gx,jd as rx,kd as vx}from"../chunk-eseshkd0.js";import{nd as Np}from"../chunk-11hdrnf6.js";import{od as Xf}from"../chunk-cwfkm7h9.js";import{pd as $x,qd as bx,rd as tx,sd as wx,td as Sx,ud as hx,vd as ux,wd as cx,xd as Vx}from"../chunk-mkzmjg3f.js";import{Ad as kd,Bd as qd,Cd as Jd,Dd as Kd,Ed as Qd,Fd as Wd,Gd as Xd,Hd as Yd,yd as Fd,zd as Hd}from"../chunk-vgtmrd4c.js";import{$d as Wf,Id as lf,Jd as yf,Kd as Cf,Ld as Nf,Md as _f,Nd as zf,Od as Df,Pd as Tf,Qd as jf,Rd as If,Sd as Lf,Td as Bf,Ud as Ff,Vd as Hf,Wd as kf,Xd as qf,Yd as Jf,Zd as Kf,_d as Qf}from"../chunk-nrr8z2z7.js";import"../chunk-xs12dtf1.js";import{ce as Rp,de as Mp,ee as Up,fe as Ap,ge as Gp,he as Ep,ie as Op,je as Pp,ke as ap,le as lp,me as yp}from"../chunk-tzwnfagh.js";import"../chunk-ytmxd5fk.js";import{Ae as Kp,Be as Qp,Ce as Wp,se as Ip,te as Lp,ue as Bp,ve as Fp,we as Hp,xe as kp,ye as qp,ze as Jp}from"../chunk-b9escac0.js";import{Je as Cp}from"../chunk-g30dr44w.js";import{Ke as Xp,Le as Yp,Me as Zp,Ne as $p,Oe as bp,Pe as tp}from"../chunk-2et8yavs.js";import"../chunk-txtrpypt.js";import{$e as _,We as a,Xe as l,Ye as y,Ze as C,_e as N,af as z,bf as D,cf as T,df as j,ef as I,ff as L,gf as B,hf as F,if as H}from"../chunk-8hjvthz4.js";import{jf as U,kf as A,lf as G,mf as E,nf as O,pf as P}from"../chunk-yngahb11.js";import{qf as Px,rf as ax,sf as lx,tf as yx,uf as Cx,vf as Nx}from"../chunk-08x5b93v.js";import{Af as kx,Bf as qx,Cf as Jx,Df as Kx,Ef as Qx,Ff as Wx,Gf as Xx,Hf as Yx,If as Zx,wf as Lx,xf as Bx,yf as Fx,zf as Hx}from"../chunk-p6qbqsyp.js";import"../chunk-1cpdz49v.js";import{Lf as _x,Mf as zx,Nf as Dx,Of as Tx,Pf as jx,Qf as Ix}from"../chunk-cgvt98pd.js";import"../chunk-c8rzx3a1.js";import{$f as pp,Uf as e,Vf as g,Wf as r,Xf as v,Yf as i,Zf as s,_f as n,ag as op,bg as d}from"../chunk-0hc97k0t.js";import"../chunk-3901s7h9.js";import"../chunk-jtxcr5yw.js";import"../chunk-qd2s51gc.js";import{$g as JR,Og as To,Pg as jo,Qg as Io,Rg as Lo,Tg as jR,Ug as IR,Vg as LR,Wg as BR,Xg as FR,Yg as HR,Zg as kR,_g as qR,ah as KR,bh as QR,ch as WR,dh as XR,eh as YR,fh as ZR,gh as $R,hh as bR,ih as tR,jh as wR,kh as SR,lh as hR,mh as uR}from"../chunk-vbeeyhhe.js";import{nh as om}from"../chunk-k26wnmzk.js";import{oh as S,ph as h,qh as u,rh as c,sh as V}from"../chunk-193abzy6.js";import{th as t}from"../chunk-5044y9en.js";import{uh as w}from"../chunk-f53y8ans.js";import{Ah as Y,vh as J,wh as K,xh as Q,yh as W,zh as X}from"../chunk-e68nf7cm.js";import{Bh as k,Ch as q,Dh as Z,Eh as $,Fh as b}from"../chunk-hfjywbbc.js";import"../chunk-g24hav8e.js";import"../chunk-q4t568hv.js";var{semver:m}=globalThis.Bun;class R{static compareVersions(p,o){return m.order(p,o)}static satisfiesRange(p,o){return m.satisfies(p,o)}static getLatestInRange(p,o){let f=p.filter((x)=>m.satisfies(x,o));if(f.length===0)return null;return f.sort((x,M)=>m.order(M,x))[0]}static createRange(p){return{raw:p,range:p.replace(/^[\^~>=<]+/,""),isExact:!/^[\^~>=<]/.test(p),satisfies:(o)=>this.satisfiesRange(o,p),getLatest:(o)=>this.getLatestInRange(o,p)}}static getUpdateType(p,o){return d(p,o)}static isSafeUpdate(p,o){return m.satisfies(o,p)}}export{Fx as writeFileTool,Yx as wrapUntrusted,gf as withTouchOffer,no as withNarrative,sf as verifyChanges,tR as validateWorkflowGeneration,wR as validateRepositoryAccess,Ud as validateFindings,Bo as validateConfig,Jo as validateAgainstSchema,HR as updateProgress,bf as unitTestsTouch,Sp as toOsvEcosystem,Hp as tagUpdateType,Kf as syntaxAnalyzer,lp as supports,z as summarizeUsage,fR as summarizeGates,lo as stripOperators,bd as stripNonCommandContext,nf as stackedBranchName,Mo as splitConstraint,op as sortUpdatesByPriority,wf as simplifyTouch,yR as similarity,Vx as sign,uR as showFinalInstructions,N as shouldOpenAsDraft,Yd as shouldFail,Jf as shellcheckAnalyzer,Kx as shellTool,hR as setupCustomWorkflow,$ as setDefaultLogger,ld as serializeReviewState,Af as serializeLearnings,Of as selectLearnings,Fp as selectLatestTag,qf as secretsAnalyzer,YR as schedulePlan,ao as scanEcosystems,vp as scanCatalogs,Bp as sameVariant,Go as rustAdapter,yf as runTool,pd as runStackedTouch,Bd as runReviewForPR,LR as runPreflightChecks,ER as runPostMerge,Zf as runPlan,Ko as runHeadless,xR as runGates,nd as runFixCi,Wf as runAnalyzers,UR as runAiGates,Zx as runAgent,A as ruleMatches,Ao as rubyAdapter,Ld as reviewPullRequest,Px as reviewMode,Ed as reviewDiff,Lx as resolveWorkspacePath,G as resolveRuleEffects,Op as resolveProviderToken,pf as resolveModelAlias,bp as resolveEngineVersion,Kp as resolveCredentials,ep as resolveCatalogReference,Id as resolveBuddyThreads,ff as resolveAiProvider,fm as resetConfigCache,Vf as renderTouchOffer,so as renderReport,TR as renderQuickLinks,aR as renderPackageContext,D as renderMigrationReport,Pf as renderLearnings,Td as renderFinding,qo as renderDoctorReport,xd as renderDiffForReview,_f as relativize,yo as regenerateLockfiles,xp as regenerateLockFile,Tx as redactError,Dx as redactDeep,zx as redact,Bx as readFileTool,Uo as pythonAdapter,Wo as publishOutput,Yo as productFor,jd as prepareReview,Sf as planTouch,yx as planMode,$p as pinBlocksUpdate,Ro as pep440UpdateType,Vp as parseWorkspaceCatalogs,md as parseUnifiedDiff,rf as parseTouchSelections,Nf as parseToolJson,Ip as parseTag,yd as parseReviewState,W as parseRetryDelay,qR as parseRemote,zR as parseQuickSelection,mo as parsePep440,g as parsePackageFile,Uf as parseLearnings,kp as parseImageRef,ho as parseHistory,td as parseCommand,Qp as parseAuthChallenge,If as offsetToLine,po as numericUpdateType,hp as normalizeSeverity,C as normalizePlan,Cd as needsReview,O as mergeGroupEffects,Sd as mentionsBot,B as matchesGlobs,Hf as markdownlintAnalyzer,zp as mapWithConcurrency,Cf as mapSeverity,af as loadLearnings,Vo as loadHistory,zd as loadGuidelines,Hx as listDirTool,Ff as linterAnalyzer,id as latestFailurePerWorkflow,wd as isReadOnlyCommand,fo as isPep440Prerelease,OR as isMergeEvent,gp as isCatalogReference,l as isAllowedCodemod,ax as implementMode,ef as hasTouchOffer,jf as hadolintAnalyzer,KR as guideTokenCreation,WR as guideRepositorySettings,P as groupsToRules,pp as groupUpdates,oo as goAdapter,Tf as githubActionsAnalyzer,bR as getWorkflowPreset,c as getNpmRegistryUrl,h as getGitHubServerUrl,S as getGitHubApiUrl,uf as getFinishingTouch,b as getDefaultLogger,xm as getConfig,V as getComposerRegistryUrl,mp as getAllLockFilePaths,Nx as getAgentMode,ZR as generateUnifiedWorkflow,jo as generateGitLabPipeline,$R as generateCoreWorkflows,XR as generateConfigFile,n as generateBranchName,Io as generateBitbucketPipeline,dR as gateIcon,kx as fsTools,e as formatSecurityAdvisorySection,Wd as formatReview,qd as formatPretty,i as formatPRTitle,s as formatPRBody,qp as formatImageRef,Qo as formatGithubOutput,Jd as formatGithub,q as formatError,Fo as formatConfigIssues,v as formatCommitMessage,Kd as formatAgent,lx as fixCiMode,Md as fingerprint,_ as findUsageSites,co as findPrevious,PR as findMentionedPackages,AR as findLinkedIssues,CR as findDuplicates,_o as findDrift,X as fetchWithTimeout,Y as fetchJsonOrNull,vd as failsOnBaseBranch,gd as extractErrorLines,Yp as extractEngines,Xf as emitEvent,U as ecosystemOf,Co as driftFor,$f as docstringsTouch,SR as displayValidationResults,kR as displayProgress,cd as dispatchCommand,Hd as diffArgsFor,ko as diagnose,fp as detectRequiredPackageManagers,JR as detectRepository,r as detectPackageManager,Bf as detectLinter,sp as detectFiles,od as detectChangedFiles,L as describeSpanGaps,rd as describeFailure,tx as describeEvent,to as describeEol,zo as describeDrift,Pd as defaultIncludePath,mm as defaultConfig,Ad as dedupeFindings,Zo as cycleFor,cx as createWebhookSink,hx as createSlackSink,Sx as createSinks,Yf as createReadIssueTool,ap as createProvider,FR as createProgressTracker,xf as createOpenAiProvider,Gf as createLearning,Vd as createHandlers,mf as createGoogleProvider,ux as createDiscordSink,of as createAnthropicProvider,df as createAiClient,Qd as countBySeverity,lR as constrainLabels,QR as confirmTokenSetup,dm as config,ro as computeMetrics,vo as computeDeltas,Dd as composeInstructions,Lp as compareVersions,xo as comparePep440,np as compareNumeric,zf as commandExists,I as collectSpanNotes,Zp as collectResolutionPins,kd as collectLocalDiff,fd as collectGitDiff,DR as clearQuickSelection,u as clearNpmrcCache,ed as classifyFailure,Lo as ciTemplateFor,Dp as chunk,pR as checkTitleFormat,ud as checkPermission,RR as checkLinkedIssue,$o as checkEol,oR as checkDescription,mR as checkDependencies,MR as checkCustomAssertions,tp as bumpEngineConstraint,Jx as buildShellEnv,y as buildAnalysisPrompt,tf as autofixTouch,T as attemptMajorUpgrade,sd as attemptFix,Ho as assertValidConfig,yp as assertSupports,Pp as assertProviderSupported,Xd as applySuggestion,E as applyRules,ip as applyCatalogUpdates,rp as applyCatalogUpdate,H as appendUpgradeReport,uo as appendHistory,GR as appendChangelogEntry,Jp as apiHostFor,Od as anchorMap,BR as analyzeProject,F as analyzeGroupMajors,cp as advisoryKey,Ef as addLearning,Po as adapterNamed,Oo as adapterFor,Df as actionlintAnalyzer,wx as WEBHOOK_PAYLOAD_VERSION,R as VersionResolver,Gp as UnsupportedProviderError,Xx as Toolbelt,Qx as ToolPermissionError,cf as TOUCH_OFFER_MARKER,lf as TOOL_TIMEOUT_MS,vf as TEST_COMMANDS,up as SecurityAdvisoryService,pm as Scheduler,qx as SHELL_ENV_ALLOWLIST,dd as SEVERITY_ORDER,kf as SECRET_RULES,Cp as ReleaseNotesFetcher,jp as RegistryClient,No as ROOT,ad as REVIEW_STATE_VERSION,Rd as REVIEW_SCHEMA,Fd as REVIEW_FORMATS,eo as REPORT_PERIODS,io as REPORT_MARKER,_x as REDACTED,$d as READ_ONLY_COMMANDS,NR as QUICK_LINKS_MARKER,_R as QUICK_ACTIONS,Np as PullRequestGenerator,IR as PluginManager,wp as PackageScanner,gx as PackageRegistryError,Up as PROVIDER_TRACKING_ISSUES,Ep as PROVIDER_TOKEN_ENV,nx as PROVIDER_PRIORITY,Rp as PROVIDER_NAMES,sx as PROVIDER_KEY_ENV,go as PERIOD_DAYS,Wp as OciClient,Ap as NO_CAPABILITIES,ix as MODEL_ALIASES,a as MIGRATION_PLAN_SCHEMA,_d as MAX_GUIDELINE_CHARS,Z as Logger,Lf as LINTER_SPECS,Xp as KNOWN_ENGINES,Mp as IMPLEMENTED_PROVIDERS,Q as HttpRequestError,wo as HISTORY_PATH,So as HISTORY_LIMIT,hd as HELP_TEXT,rx as GitProviderError,t as GitLabProvider,dp as GitHubProvider,k as GitHubApiError,om as GitHubActionsTemplate,hf as FINISHING_TOUCHES,bx as EventBus,$x as EVENT_NAMES,bo as EOL_WARNING_DAYS,Xo as EOL_PRODUCTS,J as DEFAULT_TIMEOUT_MS,j as DEFAULT_SPAN_BUDGET,To as DEFAULT_SCHEDULE,K as DEFAULT_RETRIES,Mf as DEFAULT_PROMPT_LIMIT,Rf as DEFAULT_LEARNINGS_FILE,Nd as DEFAULT_GUIDELINE_FILES,Gd as DEFAULT_EXCLUDED_PATHS,_p as DEFAULT_CONCURRENCY,jR as ConfigurationMigrator,vx as ConfigurationError,Zd as COMMAND_ALIASES,ex as BuddyError,Do as Buddy,w as BitbucketProvider,Wx as BUILTIN_TOOLS,Qf as BUILTIN_ANALYZERS,Eo as BUILTIN_ADAPTERS,Tp as AsyncMemo,Ix as AiProviderError,jx as AiBudgetExceededError,Cx as AGENT_MODES};
|
|
2
|
+
import{I as wo,J as So,K as ho,L as uo,M as co,N as Vo,O as eo,P as go,Q as ro,R as vo,S as io,T as so,U as no}from"../chunk-9b2yfhzj.js";import{W as ko,X as qo}from"../chunk-qv1nvaha.js";import{$ as Wo,Y as Jo,Z as Ko,_ as Qo}from"../chunk-c87s8txp.js";import{aa as PR,ba as aR,ca as lR,da as yR,ea as CR,fa as NR,ga as _R,ha as zR,ia as DR,ja as TR}from"../chunk-69qyr9ef.js";import{ka as pR,la as oR,ma as mR,na as xR,oa as fR,pa as dR,qa as RR,ra as MR,sa as UR,ta as AR,ua as GR,va as ER,wa as OR}from"../chunk-4ycesykg.js";import{Aa as $o,Ba as bo,Ca as to,xa as Xo,ya as Yo,za as Zo}from"../chunk-5gybfx14.js";import"../chunk-rb1fh9vd.js";import{Da as pm}from"../chunk-9b4z1bpx.js";import{Ea as ed,Fa as gd,Ga as rd,Ha as vd,Ia as id,Ja as sd,Ka as nd}from"../chunk-v8746363.js";import{La as Zd,Ma as $d,Na as bd,Oa as td,Pa as wd,Qa as Sd,Ra as hd,Sa as ud,Ta as cd,Ua as Vd}from"../chunk-4mwgk0jh.js";import{Va as Yf,Wa as Zf}from"../chunk-cbqg29zr.js";import{$a as Sf,Xa as $f,Ya as bf,Za as tf,_a as wf,ab as hf,bb as uf,cb as cf,db as Vf,eb as ef,fb as gf,gb as rf}from"../chunk-1szfwcst.js";import{hb as vf,ib as sf,jb as nf,kb as pd,lb as od}from"../chunk-55znd3yn.js";import{mb as Id}from"../chunk-t3a1703q.js";import{Ab as Td,Bb as jd,Cb as Ld,Db as Bd,nb as dd,ob as Rd,pb as Md,qb as Ud,rb as Ad,sb as Gd,tb as Ed,ub as Od,vb as Pd,wb as Nd,xb as _d,yb as zd,zb as Dd}from"../chunk-qk43d3vv.js";import{Eb as md,Fb as xd,Gb as fd}from"../chunk-q2tjkhez.js";import{Hb as Co,Ib as No,Jb as _o,Kb as zo}from"../chunk-vckhctmr.js";import{Lb as ad,Mb as ld,Nb as yd,Pb as Cd}from"../chunk-5yfaptmp.js";import{Qb as Rf,Rb as Mf,Sb as Uf,Tb as Af,Ub as Gf,Vb as Ef,Wb as Of,Xb as Pf,Yb as af}from"../chunk-4gx2f1k6.js";import{$b as nx,Zb as ix,_b as sx,ac as pf,bc as of,cc as mf,dc as xf,ec as ff,fc as df}from"../chunk-3d3rwmmj.js";import{gc as Vp,hc as ep,ic as gp,jc as rp,mc as vp,nc as ip}from"../chunk-qczzpthf.js";import{Ac as Uo,Bc as Ao,Cc as Go,Dc as Eo,Ec as Oo,Fc as Po,Gc as ao,Hc as lo,Ic as yo,pc as sp,sc as np,tc as po,uc as oo,vc as mo,wc as xo,xc as fo,yc as Ro,zc as Mo}from"../chunk-w16pwfh3.js";import{Mc as dp}from"../chunk-2pv5zwbm.js";import{Nc as mp,Oc as xp,Pc as fp}from"../chunk-ztw515ew.js";import{Tc as mm,Uc as xm,Vc as fm,Wc as dm}from"../chunk-tgh61e5e.js";import{Xc as Bo,Yc as Fo,Zc as Ho}from"../chunk-eftyxrxw.js";import{$c as hp,_c as Sp,ad as up,bd as cp,dd as Do}from"../chunk-19n3wnxq.js";import"../chunk-sczx20gw.js";import{fd as _p,gd as zp,hd as Dp,id as Tp,jd as jp}from"../chunk-d2d5m2kx.js";import{kd as wp}from"../chunk-3wy8fypy.js";import"../chunk-89s9f3mf.js";import{md as ex,nd as gx,od as rx,pd as vx}from"../chunk-ja3rvd6y.js";import{sd as Np}from"../chunk-srznv36n.js";import{td as Xf}from"../chunk-he97rsmj.js";import{Ad as ux,Bd as cx,Cd as Vx,ud as $x,vd as bx,wd as tx,xd as wx,yd as Sx,zd as hx}from"../chunk-0ewzxzt3.js";import{Dd as Fd,Ed as Hd,Fd as kd,Gd as qd,Hd as Jd,Id as Kd,Jd as Qd,Kd as Wd,Ld as Xd,Md as Yd}from"../chunk-bggpgbdx.js";import{$d as kf,Nd as lf,Od as yf,Pd as Cf,Qd as Nf,Rd as _f,Sd as zf,Td as Df,Ud as Tf,Vd as jf,Wd as If,Xd as Lf,Yd as Bf,Zd as Ff,_d as Hf,ae as qf,be as Jf,ce as Kf,de as Qf,ee as Wf}from"../chunk-j0bsva07.js";import"../chunk-xny4kgcc.js";import{he as Rp,ie as Mp,je as Up,ke as Ap,le as Gp,me as Ep,ne as Op,oe as Pp,pe as ap,qe as lp,re as yp}from"../chunk-1z4nhstx.js";import"../chunk-x4ea69ek.js";import"../chunk-03j2dx5h.js";import{Ee as Ip,Fe as Lp,Ge as Bp,He as Fp,Ie as Hp,Je as kp,Ke as qp,Le as Jp,Me as Kp,Ne as Qp,Oe as Wp}from"../chunk-v6dephze.js";import{Ve as Cp}from"../chunk-7wk4px2k.js";import{$e as tp,We as Xp,Xe as Yp,Ye as Zp,Ze as $p,_e as bp}from"../chunk-88j356ng.js";import{cf as a,df as l,ef as y,ff as C,gf as N,hf as _,if as z,jf as D,kf as T,lf as j,mf as I,nf as L,of as B,pf as F,qf as H}from"../chunk-675c6ddc.js";import{rf as U,sf as A,tf as G,uf as E,vf as O,xf as P}from"../chunk-p96zq2zc.js";import{Af as lx,Bf as yx,Cf as Cx,Df as Nx,yf as Px,zf as ax}from"../chunk-jpdd59fh.js";import{Ef as Lx,Ff as Bx,Gf as Fx,Hf as Hx,If as kx,Jf as qx,Kf as Jx,Lf as Kx,Mf as Qx,Nf as Wx,Of as Xx,Pf as Yx,Qf as Zx}from"../chunk-p8azbpq6.js";import"../chunk-emygmh7r.js";import{Tf as _x,Uf as zx,Vf as Dx,Wf as Tx,Xf as jx,Yf as Ix}from"../chunk-kpqez1ht.js";import"../chunk-vckn5ate.js";import{ag as e,bg as g,cg as r,dg as v,eg as i,fg as s,gg as n,hg as pp,ig as op,jg as d}from"../chunk-f001yg2a.js";import"../chunk-gvnsr72j.js";import"../chunk-fvhnza91.js";import"../chunk-ktmgq0ja.js";import{$g as jR,Wg as To,Xg as jo,Yg as Io,Zg as Lo,ah as IR,bh as LR,ch as BR,dh as FR,eh as HR,fh as kR,gh as qR,hh as JR,ih as KR,jh as QR,kh as WR,lh as XR,mh as YR,nh as ZR,oh as $R,ph as bR,qh as tR,rh as wR,sh as SR,th as hR,uh as uR}from"../chunk-4wh0wryv.js";import{vh as om}from"../chunk-hkb714k3.js";import{Ah as V,wh as S,xh as h,yh as u,zh as c}from"../chunk-6k6dgwmy.js";import{Bh as t}from"../chunk-3d5pjrz7.js";import{Ch as w}from"../chunk-1n42ghef.js";import{Dh as J,Eh as K,Fh as Q,Gh as W,Hh as X,Ih as Y}from"../chunk-ddmvjp0y.js";import{Jh as k,Kh as q,Lh as Z,Mh as $,Nh as b}from"../chunk-f0z6kyqt.js";import"../chunk-njfbmhm4.js";import"../chunk-6sm15trq.js";var{semver:m}=globalThis.Bun;class R{static compareVersions(p,o){return m.order(p,o)}static satisfiesRange(p,o){return m.satisfies(p,o)}static getLatestInRange(p,o){let f=p.filter((x)=>m.satisfies(x,o));if(f.length===0)return null;return f.sort((x,M)=>m.order(M,x))[0]}static createRange(p){return{raw:p,range:p.replace(/^[\^~>=<]+/,""),isExact:!/^[\^~>=<]/.test(p),satisfies:(o)=>this.satisfiesRange(o,p),getLatest:(o)=>this.getLatestInRange(o,p)}}static getUpdateType(p,o){return d(p,o)}static isSafeUpdate(p,o){return m.satisfies(o,p)}}export{Fx as writeFileTool,Yx as wrapUntrusted,gf as withTouchOffer,no as withNarrative,sf as verifyChanges,tR as validateWorkflowGeneration,wR as validateRepositoryAccess,Ud as validateFindings,Bo as validateConfig,Jo as validateAgainstSchema,HR as updateProgress,bf as unitTestsTouch,Sp as toOsvEcosystem,Hp as tagUpdateType,Kf as syntaxAnalyzer,lp as supports,z as summarizeUsage,fR as summarizeGates,lo as stripOperators,bd as stripNonCommandContext,nf as stackedBranchName,Mo as splitConstraint,op as sortUpdatesByPriority,wf as simplifyTouch,yR as similarity,Vx as sign,uR as showFinalInstructions,N as shouldOpenAsDraft,Yd as shouldFail,Jf as shellcheckAnalyzer,Kx as shellTool,hR as setupCustomWorkflow,$ as setDefaultLogger,ld as serializeReviewState,Af as serializeLearnings,Of as selectLearnings,Fp as selectLatestTag,qf as secretsAnalyzer,YR as schedulePlan,ao as scanEcosystems,vp as scanCatalogs,Bp as sameVariant,Go as rustAdapter,yf as runTool,pd as runStackedTouch,Bd as runReviewForPR,LR as runPreflightChecks,ER as runPostMerge,Zf as runPlan,Ko as runHeadless,xR as runGates,nd as runFixCi,Wf as runAnalyzers,UR as runAiGates,Zx as runAgent,A as ruleMatches,Ao as rubyAdapter,Ld as reviewPullRequest,Px as reviewMode,Ed as reviewDiff,Lx as resolveWorkspacePath,G as resolveRuleEffects,Op as resolveProviderToken,pf as resolveModelAlias,bp as resolveEngineVersion,Kp as resolveCredentials,ep as resolveCatalogReference,Id as resolveBuddyThreads,ff as resolveAiProvider,fm as resetConfigCache,Vf as renderTouchOffer,so as renderReport,TR as renderQuickLinks,aR as renderPackageContext,D as renderMigrationReport,Pf as renderLearnings,Td as renderFinding,qo as renderDoctorReport,xd as renderDiffForReview,_f as relativize,yo as regenerateLockfiles,xp as regenerateLockFile,Tx as redactError,Dx as redactDeep,zx as redact,Bx as readFileTool,Uo as pythonAdapter,Wo as publishOutput,Yo as productFor,jd as prepareReview,Sf as planTouch,yx as planMode,$p as pinBlocksUpdate,Ro as pep440UpdateType,Vp as parseWorkspaceCatalogs,md as parseUnifiedDiff,rf as parseTouchSelections,Nf as parseToolJson,Ip as parseTag,yd as parseReviewState,W as parseRetryDelay,qR as parseRemote,zR as parseQuickSelection,mo as parsePep440,g as parsePackageFile,Uf as parseLearnings,kp as parseImageRef,ho as parseHistory,td as parseCommand,Qp as parseAuthChallenge,If as offsetToLine,po as numericUpdateType,hp as normalizeSeverity,C as normalizePlan,Cd as needsReview,O as mergeGroupEffects,Sd as mentionsBot,B as matchesGlobs,Hf as markdownlintAnalyzer,zp as mapWithConcurrency,Cf as mapSeverity,af as loadLearnings,Vo as loadHistory,zd as loadGuidelines,Hx as listDirTool,Ff as linterAnalyzer,id as latestFailurePerWorkflow,wd as isReadOnlyCommand,fo as isPep440Prerelease,OR as isMergeEvent,gp as isCatalogReference,l as isAllowedCodemod,ax as implementMode,ef as hasTouchOffer,jf as hadolintAnalyzer,KR as guideTokenCreation,WR as guideRepositorySettings,P as groupsToRules,pp as groupUpdates,oo as goAdapter,Tf as githubActionsAnalyzer,bR as getWorkflowPreset,c as getNpmRegistryUrl,h as getGitHubServerUrl,S as getGitHubApiUrl,uf as getFinishingTouch,b as getDefaultLogger,xm as getConfig,V as getComposerRegistryUrl,mp as getAllLockFilePaths,Nx as getAgentMode,ZR as generateUnifiedWorkflow,jo as generateGitLabPipeline,$R as generateCoreWorkflows,XR as generateConfigFile,n as generateBranchName,Io as generateBitbucketPipeline,dR as gateIcon,kx as fsTools,e as formatSecurityAdvisorySection,Wd as formatReview,qd as formatPretty,i as formatPRTitle,s as formatPRBody,qp as formatImageRef,Qo as formatGithubOutput,Jd as formatGithub,q as formatError,Fo as formatConfigIssues,v as formatCommitMessage,Kd as formatAgent,lx as fixCiMode,Md as fingerprint,_ as findUsageSites,co as findPrevious,PR as findMentionedPackages,AR as findLinkedIssues,CR as findDuplicates,_o as findDrift,X as fetchWithTimeout,Y as fetchJsonOrNull,vd as failsOnBaseBranch,gd as extractErrorLines,Yp as extractEngines,Xf as emitEvent,U as ecosystemOf,Co as driftFor,$f as docstringsTouch,SR as displayValidationResults,kR as displayProgress,cd as dispatchCommand,Hd as diffArgsFor,ko as diagnose,fp as detectRequiredPackageManagers,JR as detectRepository,r as detectPackageManager,Bf as detectLinter,sp as detectFiles,od as detectChangedFiles,L as describeSpanGaps,rd as describeFailure,tx as describeEvent,to as describeEol,zo as describeDrift,Pd as defaultIncludePath,mm as defaultConfig,Ad as dedupeFindings,Zo as cycleFor,cx as createWebhookSink,hx as createSlackSink,Sx as createSinks,Yf as createReadIssueTool,ap as createProvider,FR as createProgressTracker,xf as createOpenAiProvider,Gf as createLearning,Vd as createHandlers,mf as createGoogleProvider,ux as createDiscordSink,of as createAnthropicProvider,df as createAiClient,Qd as countBySeverity,lR as constrainLabels,QR as confirmTokenSetup,dm as config,ro as computeMetrics,vo as computeDeltas,Dd as composeInstructions,Lp as compareVersions,xo as comparePep440,np as compareNumeric,zf as commandExists,I as collectSpanNotes,Zp as collectResolutionPins,kd as collectLocalDiff,fd as collectGitDiff,DR as clearQuickSelection,u as clearNpmrcCache,ed as classifyFailure,Lo as ciTemplateFor,Dp as chunk,pR as checkTitleFormat,ud as checkPermission,RR as checkLinkedIssue,$o as checkEol,oR as checkDescription,mR as checkDependencies,MR as checkCustomAssertions,tp as bumpEngineConstraint,Jx as buildShellEnv,y as buildAnalysisPrompt,tf as autofixTouch,T as attemptMajorUpgrade,sd as attemptFix,Ho as assertValidConfig,yp as assertSupports,Pp as assertProviderSupported,Xd as applySuggestion,E as applyRules,ip as applyCatalogUpdates,rp as applyCatalogUpdate,H as appendUpgradeReport,uo as appendHistory,GR as appendChangelogEntry,Jp as apiHostFor,Od as anchorMap,BR as analyzeProject,F as analyzeGroupMajors,cp as advisoryKey,Ef as addLearning,Po as adapterNamed,Oo as adapterFor,Df as actionlintAnalyzer,wx as WEBHOOK_PAYLOAD_VERSION,R as VersionResolver,Gp as UnsupportedProviderError,Xx as Toolbelt,Qx as ToolPermissionError,cf as TOUCH_OFFER_MARKER,lf as TOOL_TIMEOUT_MS,vf as TEST_COMMANDS,up as SecurityAdvisoryService,pm as Scheduler,qx as SHELL_ENV_ALLOWLIST,dd as SEVERITY_ORDER,kf as SECRET_RULES,Cp as ReleaseNotesFetcher,jp as RegistryClient,No as ROOT,ad as REVIEW_STATE_VERSION,Rd as REVIEW_SCHEMA,Fd as REVIEW_FORMATS,eo as REPORT_PERIODS,io as REPORT_MARKER,_x as REDACTED,$d as READ_ONLY_COMMANDS,NR as QUICK_LINKS_MARKER,_R as QUICK_ACTIONS,Np as PullRequestGenerator,IR as PluginManager,wp as PackageScanner,gx as PackageRegistryError,Up as PROVIDER_TRACKING_ISSUES,Ep as PROVIDER_TOKEN_ENV,nx as PROVIDER_PRIORITY,Rp as PROVIDER_NAMES,sx as PROVIDER_KEY_ENV,go as PERIOD_DAYS,Wp as OciClient,Ap as NO_CAPABILITIES,ix as MODEL_ALIASES,a as MIGRATION_PLAN_SCHEMA,_d as MAX_GUIDELINE_CHARS,Z as Logger,Lf as LINTER_SPECS,Xp as KNOWN_ENGINES,Mp as IMPLEMENTED_PROVIDERS,Q as HttpRequestError,wo as HISTORY_PATH,So as HISTORY_LIMIT,hd as HELP_TEXT,rx as GitProviderError,t as GitLabProvider,dp as GitHubProvider,k as GitHubApiError,om as GitHubActionsTemplate,hf as FINISHING_TOUCHES,bx as EventBus,$x as EVENT_NAMES,bo as EOL_WARNING_DAYS,Xo as EOL_PRODUCTS,J as DEFAULT_TIMEOUT_MS,j as DEFAULT_SPAN_BUDGET,To as DEFAULT_SCHEDULE,K as DEFAULT_RETRIES,Mf as DEFAULT_PROMPT_LIMIT,Rf as DEFAULT_LEARNINGS_FILE,Nd as DEFAULT_GUIDELINE_FILES,Gd as DEFAULT_EXCLUDED_PATHS,_p as DEFAULT_CONCURRENCY,jR as ConfigurationMigrator,vx as ConfigurationError,Zd as COMMAND_ALIASES,ex as BuddyError,Do as Buddy,w as BitbucketProvider,Wx as BUILTIN_TOOLS,Qf as BUILTIN_ANALYZERS,Eo as BUILTIN_ADAPTERS,Tp as AsyncMemo,Ix as AiProviderError,jx as AiBudgetExceededError,Cx as AGENT_MODES};
|
package/dist/src/setup.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{$g as
|
|
2
|
+
import{$g as a,ah as b,bh as c,ch as d,dh as e,eh as f,fh as g,gh as h,hh as i,ih as j,jh as k,kh as l,lh as m,mh as n,nh as o,oh as p,ph as q,qh as r,rh as s,sh as t,th as u,uh as v}from"../chunk-4wh0wryv.js";import"../chunk-hkb714k3.js";import"../chunk-6k6dgwmy.js";import"../chunk-ddmvjp0y.js";import"../chunk-f0z6kyqt.js";import"../chunk-6sm15trq.js";export{r as validateWorkflowGeneration,s as validateRepositoryAccess,f as updateProgress,v as showFinalInstructions,u as setupCustomWorkflow,n as schedulePlan,c as runPreflightChecks,h as parseRemote,j as guideTokenCreation,l as guideRepositorySettings,q as getWorkflowPreset,o as generateUnifiedWorkflow,p as generateCoreWorkflows,m as generateConfigFile,t as displayValidationResults,g as displayProgress,i as detectRepository,e as createProgressTracker,k as confirmTokenSetup,d as analyzeProject,b as PluginManager,a as ConfigurationMigrator};
|
package/dist/src/types.d.ts
CHANGED
|
@@ -7,6 +7,10 @@ export declare function isGitHubActionsFile(filePath: string): boolean;
|
|
|
7
7
|
* Parse a GitHub Actions workflow file to extract action dependencies
|
|
8
8
|
*/
|
|
9
9
|
export declare function parseGitHubActionsFile(filePath: string, content: string): Promise<PackageFile | null>;
|
|
10
|
+
/** A full 40-character commit SHA, the only immutable way to pin an action. */
|
|
11
|
+
export declare function isCommitSha(ref: string): boolean;
|
|
12
|
+
/** `v1.2.3` and `1.2.3` name the same release. */
|
|
13
|
+
export declare function sameActionVersion(a: string, b: string): boolean;
|
|
10
14
|
/**
|
|
11
15
|
* Update action versions in a GitHub Actions workflow file
|
|
12
16
|
*/
|
|
@@ -15,6 +19,12 @@ export declare function updateGitHubActionsFile(filePath: string, content: strin
|
|
|
15
19
|
* Generate file changes for GitHub Actions workflow files
|
|
16
20
|
*/
|
|
17
21
|
export declare function generateGitHubActionsUpdates(updates: PackageUpdate[]): Promise<Array<{ path: string, content: string, type: 'update' }>>;
|
|
22
|
+
/**
|
|
23
|
+
* The commit a tag of an action's repository points at, so a SHA pin can move
|
|
24
|
+
* to a newer release without becoming a mutable tag reference. Annotated tags
|
|
25
|
+
* are peeled by the commits endpoint. Null when the tag cannot be resolved.
|
|
26
|
+
*/
|
|
27
|
+
export declare function fetchActionTagCommit(actionName: string, tag: string): Promise<string | null>;
|
|
18
28
|
/**
|
|
19
29
|
* Fetch latest version for a GitHub Action from GitHub API
|
|
20
30
|
*/
|
|
@@ -24,6 +24,22 @@ export declare function regenerateLockFile(packageManager: PackageManagerType, c
|
|
|
24
24
|
* @param cwd - Project root whose lock files decide the managers
|
|
25
25
|
*/
|
|
26
26
|
export declare function detectRequiredPackageManagers(updatedFilePaths: string[], cwd?: string): PackageManagerType[];
|
|
27
|
+
/**
|
|
28
|
+
* The lock file a manager writes in this project, or null when it has none.
|
|
29
|
+
*/
|
|
30
|
+
export declare function lockFileFor(packageManager: PackageManagerType, cwd: string): string | null;
|
|
31
|
+
/**
|
|
32
|
+
* Lock files a pull request should have regenerated but does not change.
|
|
33
|
+
*
|
|
34
|
+
* A pull request opened by an older release, or by a run whose regeneration
|
|
35
|
+
* was skipped, carries manifests its lock files do not match. Its updates
|
|
36
|
+
* still "match", so it was left alone and stayed red; this is the evidence
|
|
37
|
+
* that it needs refreshing. Only lock files the project has are expected.
|
|
38
|
+
*
|
|
39
|
+
* @param changedPaths - Paths the pull request changes
|
|
40
|
+
* @param cwd - Project root whose lock files decide what is expected
|
|
41
|
+
*/
|
|
42
|
+
export declare function missingLockFiles(changedPaths: string[], cwd?: string): string[];
|
|
27
43
|
/**
|
|
28
44
|
* Check if a lock file exists for a given package manager in the working directory
|
|
29
45
|
*/
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@buddysh/buddy",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.11.
|
|
4
|
+
"version": "0.11.7",
|
|
5
5
|
"description": "AI code review and dependency updates in one bot. Reviews pull requests and local changes, answers @buddy comments, gates merges, repairs failing CI, and keeps dependencies current across npm, Composer, Docker, GitHub Actions and more.",
|
|
6
6
|
"author": "Chris Breuer <chris@stacksjs.org>",
|
|
7
7
|
"license": "MIT",
|
package/dist/chunk-0paakbpj.js
DELETED
package/dist/chunk-19zyq15p.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{qg as a,rg as b,sg as c,tg as d}from"./chunk-jtxcr5yw.js";import"./chunk-qd2s51gc.js";import"./chunk-hfjywbbc.js";import"./chunk-g24hav8e.js";import"./chunk-q4t568hv.js";export{c as updateDependencyFile,b as parseDependencyFile,a as isDependencyFile,d as generateDependencyFileUpdates};
|
package/dist/chunk-24c2ab29.js
DELETED
package/dist/chunk-2wj5xtdn.js
DELETED