// @bun
import{a as d}from"../chunk-5zkev525.js";import{b as y}from"../chunk-jzyzbn62.js";import{c as w,d as B,e as R}from"../chunk-tw7620w0.js";import{f as s,g as e,h as jj,i as qj,j as k}from"../chunk-wkct9j9q.js";import"../chunk-fz6g3nqe.js";import"../chunk-xey07r6k.js";import{u as A,v as F,w as G,x as L}from"../chunk-j3wvheq5.js";import{y as T,z as U}from"../chunk-dgw5sv04.js";import{A as O,B as Q,C as W,D as X,E as Y,F as Z,G as _,H as $}from"../chunk-dpaxpy69.js";import"../chunk-nmj3neqg.js";import"../chunk-e9b0zqk5.js";import"../chunk-fqhnkxet.js";import"../chunk-s75v6w7b.js";import"../chunk-mttbh4fd.js";import"../chunk-9hw5pn14.js";import"../chunk-zt8mhebs.js";import"../chunk-g5xk33wn.js";import"../chunk-bqh4yh6g.js";class J{token;projectId;constructor(j,q){this.token=j;this.projectId=q}async branchExists(j){return console.log(`Would check if branch ${j} exists`),!1}async createBranch(j,q){console.log(`Would create branch ${j} from ${q}`)}async commitChanges(j,q,z,C){console.log(`Would commit ${z.length} files to ${j} with message: ${q}`)}async createPullRequest(j){return console.log(`Would create MR: ${j.title}`),{number:1,title:j.title,body:j.body,head:j.head,base:j.base,state:"open",url:`https://gitlab.com/project/${this.projectId}/-/merge_requests/1`,createdAt:new Date,updatedAt:new Date,author:"buddy",reviewers:j.reviewers||[],assignees:j.assignees||[],labels:j.labels||[],draft:j.draft||!1}}async getPullRequests(j="open"){return console.log(`Would get ${j} MRs`),[]}async updatePullRequest(j,q){throw console.log(`Would update MR #${j}`),Error("Not implemented")}async closePullRequest(j){console.log(`Would close MR #${j}`)}async createComment(j,q){console.log(`Would add comment to MR #${j}: ${q}`)}async mergePullRequest(j,q="merge"){console.log(`Would merge MR #${j} using ${q}`)}async deleteBranch(j){console.log(`Would delete branch ${j}`)}async createIssue(j){return console.log(`Would create issue: ${j.title}`),{number:1,title:j.title,body:j.body,state:"open",url:`https://gitlab.com/project/${this.projectId}/-/issues/1`,createdAt:new Date,updatedAt:new Date,author:"buddy",assignees:j.assignees||[],labels:j.labels||[],pinned:!1}}async getIssues(j="open"){return console.log(`Would get ${j} issues`),[]}async updateIssue(j,q){throw console.log(`Would update issue #${j}`),Error("Not implemented")}async closeIssue(j){console.log(`Would close issue #${j}`)}async unpinIssue(j){console.log("\u2139\uFE0F GitLab does not support issue pinning")}}class K{projectPath;constructor(j){this.projectPath=j}async applyUpdates(j){console.log(`Would apply ${j.length} updates`)}async applyScanResult(j){await this.applyUpdates(j.updates)}}var{semver:H}=globalThis.Bun;class M{static compareVersions(j,q){return H.order(j,q)}static satisfiesRange(j,q){return H.satisfies(j,q)}static getLatestInRange(j,q){let z=j.filter((C)=>H.satisfies(C,q));if(z.length===0)return null;return z.sort((C,x)=>H.order(x,C))[0]}static createRange(j){return{raw:j,range:j.replace(/^[\^~>=<]+/,""),isExact:!/^[\^~>=<]/.test(j),satisfies:(q)=>this.satisfiesRange(q,j),getLatest:(q)=>this.getLatestInRange(q,j)}}static getUpdateType(j,q){let z=j.replace(/^[\^~>=<@]+/,""),C=q.replace(/^[\^~>=<@]+/,""),x=z.split(".").map((I)=>{let E=Number(I);return Number.isNaN(E)?0:E}),D=C.split(".").map((I)=>{let E=Number(I);return Number.isNaN(E)?0:E});while(x.length<3)x.push(0);while(D.length<3)D.push(0);if(D[0]>x[0])return"major";if(D[0]===x[0]&&D[1]>x[1])return"minor";return"patch"}static isSafeUpdate(j,q){return H.satisfies(q,j)}}export{$ as sortUpdatesByPriority,F as regenerateLockFile,O as parsePackageFile,_ as groupUpdates,A as getAllLockFilePaths,Z as generateBranchName,X as formatPRTitle,Y as formatPRBody,W as formatCommitMessage,G as detectRequiredPackageManagers,Q as detectPackageManager,M as VersionResolver,K as UpdateProcessor,d as Scheduler,T as ReleaseNotesFetcher,k as RegistryClient,U as PullRequestGenerator,w as PackageScanner,e as PackageRegistryError,B as Logger,jj as GitProviderError,J as GitLabProvider,L as GitHubProvider,y as GitHubActionsTemplate,qj as ConfigurationError,s as BuddyError,R as Buddy};

//# debugId=919A7E312E0D917A64756E2164756E21
