@buddysh/buddy 0.11.8 → 0.11.10

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.
@@ -1,7 +1,7 @@
1
1
  // @bun
2
- import{Ve as l}from"./chunk-kh6v93yb.js";import{ag as c,jg as A}from"./chunk-wreexgkb.js";import{rg as y}from"./chunk-gvnsr72j.js";import{xh as k}from"./chunk-6k6dgwmy.js";import{Oh as i}from"./chunk-8dj94fsy.js";import u from"process";var d=/\{([a-z_]+)\}/gi,b={title:"title",message:"message",group:"group",count:"count",strategy:"strategy",update_type:"updateType",updateType:"updateType",packages:"packages",updates_table:"updatesTable",release_notes:"releaseNotes",footer:"footer",package_count:"packageCount"};function C(W,$){return W.replace(d,(Y,R)=>{let K=b[R]??b[R.toLowerCase()];if(!K)return Y;let H=$[K];return H===void 0?Y:String(H)})}function f(W,$={},Y){return{...$,group:W.name,count:W.updates.length,packageCount:W.updates.length,updateType:W.updateType,packages:W.updates.map((R)=>R.name).join(", "),...Y?{strategy:Y}:{}}}class p{config;releaseNotesFetcher=new l;verbose=!1;logger;constructor(W,$){this.config=W;this.verbose=W?.verbose||u.env.BUDDY_VERBOSE==="true",this.logger=$??i()}get releaseNotesSettings(){let W=this.config?.releaseNotes;return{enabled:W?.enabled??!0,maxReleases:W?.maxReleases??3,maxBodyLength:W?.maxBodyLength??1000,includeCompareLinks:W?.includeCompareLinks??!0}}repositoryFileUrl(W){let $=k(this.config),{owner:Y,name:R,baseBranch:K}=this.config?.repository??{};return`${$}/${Y}/${R}/blob/${K||"main"}/${W}`}log(W,$){if(this.verbose){let Y=new Date().toISOString();if(this.logger.info(`[${Y}] PR-GEN: ${W}`),$)this.logger.info(JSON.stringify($,null,2))}}async generatePullRequests(W){let $=[];for(let Y of W){let R=this.generateTitle(Y),K=await this.generateBody(Y),H={number:0,title:R,body:K,head:`buddy/update-${Y.name.toLowerCase().replace(/\s+/g,"-")}`,base:"main",state:"open",url:"",createdAt:new Date,updatedAt:new Date,author:"github-actions[bot]",reviewers:[],assignees:[],labels:this.generateLabels(Y),draft:!1};$.push(H)}return $}generateLabels(W){let $=["dependencies"];if(W.updateType==="major")$.push("major");else if(W.updateType==="minor")$.push("minor");else if(W.updateType==="patch")$.push("patch");let Y=W.updates.filter((B)=>B.file==="package.json"||B.file.endsWith("/package.json")||B.file.endsWith("\\package.json")).length,R=W.updates.filter((B)=>B.file.endsWith("composer.json")||B.file.endsWith("composer.lock")).length,K=W.updates.filter((B)=>B.file.endsWith("build.zig.zon")).length,H=W.updates.filter((B)=>(B.file.includes(".yaml")||B.file.includes(".yml"))&&!B.file.includes(".github/workflows/")).length,Z=W.updates.filter((B)=>B.file.includes(".github/workflows/")).length;if(Y>0)$.push("npm");if(R>0)$.push("composer");if(K>0)$.push("zig");if(H>0)$.push("system");if(Z>0)$.push("github-actions");if(W.updates.length===1){let B=W.updates[0];$.push(B.name)}if(W.updates.length>=5)$.push("bulk-update");return $}generateTitle(W){let $=this.config?.pullRequest?.titleFormat;if($)return C($,f(W,{title:this.defaultTitle(W)},this.config?.packages?.strategy));return this.defaultTitle(W)}defaultTitle(W){if(W.updates.length===1){let R=W.updates[0];return`chore(deps): update dependency ${R.name} to v${R.newVersion}`}let $=W.updates.filter((R)=>R.updateType==="major").length,Y=W.updates.filter((R)=>R.updateType==="minor").length;if($>0)return`chore(deps): update ${W.updates.length} dependencies (major)`;else if(Y>0)return`chore(deps): update ${W.updates.length} dependencies (minor)`;else return`chore(deps): update ${W.updates.length} dependencies (patch)`}async generateBody(W){if(this.log("\uD83D\uDE80 Starting PR body generation",{groupName:W.name,totalUpdates:W.updates.length,updates:W.updates.map((Q)=>({name:Q.name,file:Q.file,dependencyType:Q.dependencyType,currentVersion:Q.currentVersion,newVersion:Q.newVersion,updateType:Q.updateType}))}),W.updates.length===0)this.log("\u26A0\uFE0F WARNING: No updates in group - this will result in sparse PR body",{groupName:W.name,groupTitle:W.title});let $=W.updates.filter((Q)=>Q.file==="package.json"||Q.file.endsWith("/package.json")||Q.file.endsWith("\\package.json")).length,Y=W.updates.filter((Q)=>(Q.file.includes(".yaml")||Q.file.includes(".yml"))&&!Q.file.includes(".github/workflows/")).length,R=W.updates.filter((Q)=>Q.file.includes(".github/workflows/")).length,K=W.updates.filter((Q)=>Q.file.endsWith("composer.json")||Q.file.endsWith("composer.lock")).length,H=W.updates.filter((Q)=>Q.file.endsWith("build.zig.zon")).length;if(this.log("\uD83D\uDCCA Package type counts",{packageJsonCount:$,dependencyFileCount:Y,githubActionsCount:R,composerCount:K,total:W.updates.length}),W.updates.length>0)this.log("\uD83D\uDD0D File path analysis",{files:W.updates.map((Q)=>({name:Q.name,file:Q.file,isExactMatch:Q.file==="package.json",endsWithSlash:Q.file.endsWith("/package.json"),endsWithBackslash:Q.file.endsWith("\\package.json"),matchesAny:Q.file==="package.json"||Q.file.endsWith("/package.json")||Q.file.endsWith("\\package.json")}))});let Z=`This PR contains the following updates:
2
+ import{Ve as c}from"./chunk-kh6v93yb.js";import{ag as l,jg as A}from"./chunk-wreexgkb.js";import{rg as y}from"./chunk-gvnsr72j.js";import{xh as k}from"./chunk-6k6dgwmy.js";import{Oh as i}from"./chunk-8dj94fsy.js";import u from"process";var d=/\{([a-z_]+)\}/gi,b={title:"title",message:"message",group:"group",count:"count",strategy:"strategy",update_type:"updateType",updateType:"updateType",packages:"packages",updates_table:"updatesTable",release_notes:"releaseNotes",footer:"footer",package_count:"packageCount"};function h(W,$){return W.replace(d,(Y,R)=>{let K=b[R]??b[R.toLowerCase()];if(!K)return Y;let H=$[K];return H===void 0?Y:String(H)})}function f(W,$={},Y){return{...$,group:W.name,count:W.updates.length,packageCount:W.updates.length,updateType:W.updateType,packages:W.updates.map((R)=>R.name).join(", "),...Y?{strategy:Y}:{}}}class p{config;releaseNotesFetcher=new c;verbose=!1;logger;constructor(W,$){this.config=W;this.verbose=W?.verbose||u.env.BUDDY_VERBOSE==="true",this.logger=$??i()}get releaseNotesSettings(){let W=this.config?.releaseNotes;return{enabled:W?.enabled??!0,maxReleases:W?.maxReleases??3,maxBodyLength:W?.maxBodyLength??1000,includeCompareLinks:W?.includeCompareLinks??!0}}repositoryFileUrl(W){let $=k(this.config),{owner:Y,name:R,baseBranch:K}=this.config?.repository??{};return`${$}/${Y}/${R}/blob/${K||"main"}/${W}`}log(W,$){if(this.verbose){let Y=new Date().toISOString();if(this.logger.info(`[${Y}] PR-GEN: ${W}`),$)this.logger.info(JSON.stringify($,null,2))}}async generatePullRequests(W){let $=[];for(let Y of W){let R=this.generateTitle(Y),K=await this.generateBody(Y),H={number:0,title:R,body:K,head:`buddy/update-${Y.name.toLowerCase().replace(/\s+/g,"-")}`,base:"main",state:"open",url:"",createdAt:new Date,updatedAt:new Date,author:"github-actions[bot]",reviewers:[],assignees:[],labels:this.generateLabels(Y),draft:!1};$.push(H)}return $}generateLabels(W){let $=["dependencies"];if(W.updateType==="major")$.push("major");else if(W.updateType==="minor")$.push("minor");else if(W.updateType==="patch")$.push("patch");let Y=W.updates.filter((D)=>D.file==="package.json"||D.file.endsWith("/package.json")||D.file.endsWith("\\package.json")).length,R=W.updates.filter((D)=>D.file.endsWith("composer.json")||D.file.endsWith("composer.lock")).length,K=W.updates.filter((D)=>D.file.endsWith("build.zig.zon")).length,H=W.updates.filter((D)=>(D.file.includes(".yaml")||D.file.includes(".yml"))&&!D.file.includes(".github/workflows/")).length,Z=W.updates.filter((D)=>D.file.includes(".github/workflows/")).length;if(Y>0)$.push("npm");if(R>0)$.push("composer");if(K>0)$.push("zig");if(H>0)$.push("system");if(Z>0)$.push("github-actions");if(W.updates.length===1){let D=W.updates[0];$.push(D.name)}if(W.updates.length>=5)$.push("bulk-update");return $}generateTitle(W){let $=this.config?.pullRequest?.titleFormat;if($)return h($,f(W,{title:this.defaultTitle(W)},this.config?.packages?.strategy));return this.defaultTitle(W)}defaultTitle(W){if(W.updates.length===1){let R=W.updates[0];return`chore(deps): update dependency ${R.name} to v${R.newVersion}`}let $=W.updates.filter((R)=>R.updateType==="major").length,Y=W.updates.filter((R)=>R.updateType==="minor").length;if($>0)return`chore(deps): update ${W.updates.length} dependencies (major)`;else if(Y>0)return`chore(deps): update ${W.updates.length} dependencies (minor)`;else return`chore(deps): update ${W.updates.length} dependencies (patch)`}async generateBody(W){if(this.log("\uD83D\uDE80 Starting PR body generation",{groupName:W.name,totalUpdates:W.updates.length,updates:W.updates.map((Q)=>({name:Q.name,file:Q.file,dependencyType:Q.dependencyType,currentVersion:Q.currentVersion,newVersion:Q.newVersion,updateType:Q.updateType}))}),W.updates.length===0)this.log("\u26A0\uFE0F WARNING: No updates in group - this will result in sparse PR body",{groupName:W.name,groupTitle:W.title});let $=W.updates.filter((Q)=>Q.file==="package.json"||Q.file.endsWith("/package.json")||Q.file.endsWith("\\package.json")).length,Y=W.updates.filter((Q)=>(Q.file.includes(".yaml")||Q.file.includes(".yml"))&&!Q.file.includes(".github/workflows/")).length,R=W.updates.filter((Q)=>Q.file.includes(".github/workflows/")).length,K=W.updates.filter((Q)=>Q.file.endsWith("composer.json")||Q.file.endsWith("composer.lock")).length,H=W.updates.filter((Q)=>Q.file.endsWith("build.zig.zon")).length;if(this.log("\uD83D\uDCCA Package type counts",{packageJsonCount:$,dependencyFileCount:Y,githubActionsCount:R,composerCount:K,total:W.updates.length}),W.updates.length>0)this.log("\uD83D\uDD0D File path analysis",{files:W.updates.map((Q)=>({name:Q.name,file:Q.file,isExactMatch:Q.file==="package.json",endsWithSlash:Q.file.endsWith("/package.json"),endsWithBackslash:Q.file.endsWith("\\package.json"),matchesAny:Q.file==="package.json"||Q.file.endsWith("/package.json")||Q.file.endsWith("\\package.json")}))});let Z=`This PR contains the following updates:
3
3
 
4
- `;Z+=c(W.updates);let B=W.updates.length>1;if(B){if(Z+=`## Package Updates Summary
4
+ `;Z+=l(W.updates);let D=W.updates.length>1;if(D){if(Z+=`## Package Updates Summary
5
5
 
6
6
  `,Z+=`| Type | Count |
7
7
  `,Z+=`|------|-------|
@@ -12,17 +12,17 @@ import{Ve as l}from"./chunk-kh6v93yb.js";import{ag as c,jg as A}from"./chunk-wre
12
12
  `;if(H>0)Z+=`| \u26A1 Zig Packages | ${H} |
13
13
  `;Z+=`| **Total** | **${W.updates.length}** |
14
14
 
15
- `}let E=W.updates.filter((Q)=>Q.file==="package.json"||Q.file.endsWith("/package.json")||Q.file.endsWith("\\package.json")),x=W.updates.filter((Q)=>Q.file.endsWith("composer.json")||Q.file.endsWith("composer.lock")),q=W.updates.filter((Q)=>Q.file.endsWith("build.zig.zon")),S=W.updates.filter((Q)=>Q.file.includes(".yaml")||Q.file.includes(".yml")).filter((Q)=>!Q.file.includes(".github/workflows/")),P=W.updates.filter((Q)=>Q.file.includes(".github/workflows/"));this.log("\uD83D\uDCDD Filtered updates by type",{packageJsonUpdates:{count:E.length,items:E.map((Q)=>({name:Q.name,file:Q.file}))},composerUpdates:{count:x.length,items:x.map((Q)=>({name:Q.name,file:Q.file}))},dependencyFileUpdates:{count:S.length,items:S.map((Q)=>({name:Q.name,file:Q.file}))},githubActionsUpdates:{count:P.length,items:P.map((Q)=>({name:Q.name,file:Q.file}))}});let T=new Map;for(let Q of P){let X=`${Q.name}@${Q.currentVersion}=>${Q.newVersion}`,D=T.get(X);if(D)D.files.add(Q.file);else T.set(X,{update:Q,files:new Set([Q.file])})}let V=Array.from(T.values()).map(({update:Q,files:X})=>({...Q,file:Array.from(X).join(", ")})),U=new Set,w=[];for(let Q of x){let X=`${Q.name}@${Q.currentVersion}=>${Q.newVersion}`;if(!U.has(X))U.add(X),w.push(Q)}let F=new Map,m=new Map;if(E.length>0){if(this.log("\u2705 Generating npm Dependencies section",{packageCount:E.length,packages:E.map((_)=>_.name)}),B||$<W.updates.length)Z+=`## \uD83D\uDCE6 npm Dependencies
15
+ `}let B=W.updates.filter((Q)=>Q.file==="package.json"||Q.file.endsWith("/package.json")||Q.file.endsWith("\\package.json")),x=W.updates.filter((Q)=>Q.file.endsWith("composer.json")||Q.file.endsWith("composer.lock")),q=W.updates.filter((Q)=>Q.file.endsWith("build.zig.zon")),S=W.updates.filter((Q)=>Q.file.includes(".yaml")||Q.file.includes(".yml")).filter((Q)=>!Q.file.includes(".github/workflows/")),P=W.updates.filter((Q)=>Q.file.includes(".github/workflows/"));this.log("\uD83D\uDCDD Filtered updates by type",{packageJsonUpdates:{count:B.length,items:B.map((Q)=>({name:Q.name,file:Q.file}))},composerUpdates:{count:x.length,items:x.map((Q)=>({name:Q.name,file:Q.file}))},dependencyFileUpdates:{count:S.length,items:S.map((Q)=>({name:Q.name,file:Q.file}))},githubActionsUpdates:{count:P.length,items:P.map((Q)=>({name:Q.name,file:Q.file}))}});let T=new Map;for(let Q of P){let X=`${Q.name}@${Q.currentVersion}=>${Q.newVersion}`,L=T.get(X);if(L)L.files.add(Q.file);else T.set(X,{update:Q,files:new Set([Q.file])})}let V=Array.from(T.values()).map(({update:Q,files:X})=>({...Q,file:Array.from(X).join(", ")})),U=new Set,w=[];for(let Q of x){let X=`${Q.name}@${Q.currentVersion}=>${Q.newVersion}`;if(!U.has(X))U.add(X),w.push(Q)}let F=new Map,m=new Map;if(B.length>0){if(this.log("\u2705 Generating npm Dependencies section",{packageCount:B.length,packages:B.map((_)=>_.name)}),D||$<W.updates.length)Z+=`## \uD83D\uDCE6 npm Dependencies
16
16
 
17
17
  `;if(Z+=`![npm](https://img.shields.io/badge/npm-CB3837?style=flat&logo=npm&logoColor=white)
18
18
 
19
- `,E.length>1)Z+=`*${E.length} packages will be updated*
19
+ `,B.length>1)Z+=`*${B.length} packages will be updated*
20
20
 
21
21
  `;Z+=`| Package | Change | Age | Adoption | Passing | Confidence |
22
22
  `,Z+=`|---|---|---|---|---|---|
23
- `;let Q=Date.now();this.log(`\u23F1\uFE0F Starting to fetch info for ${E.length} npm packages in parallel...`);let X=(this.releaseNotesSettings.enabled?E:[]).map(async(_)=>{let M=Date.now();try{let L=_.name.replace(/\s*\(dev\)$/,"").replace(/\s*\(peer\)$/,"").replace(/\s*\(optional\)$/,""),j=await this.releaseNotesFetcher.fetchPackageInfo(L,_.currentVersion,_.newVersion);return this.log(`\u23F1\uFE0F Fetched ${L} in ${Date.now()-M}ms`),{name:_.name,result:j}}catch(L){return this.logger.warn(`Failed to fetch info for ${_.name}:`,L),null}});(await Promise.all(X)).forEach((_)=>{if(_)F.set(_.name,_.result)});let O=Date.now()-Q;this.log(`\u23F1\uFE0F Total npm package info fetch took ${O}ms for ${E.length} packages (avg: ${Math.round(O/E.length)}ms per package)`),this.logger.info(`\u23F1\uFE0F [PR-GEN] npm package info fetch: ${O}ms for ${E.length} packages (PARALLEL)`);for(let _ of E){let L=F.get(_.name)?.packageInfo||{name:_.name},j=_.name.replace(/\s*\(dev\)$/,"").replace(/\s*\(peer\)$/,"").replace(/\s*\(optional\)$/,""),z;if(L.repository?.url){let J=this.getRepositorySourceUrl(L.repository.url,j),h=this.getRepositorySourceUrl(L.repository.url,j,"HEAD");z=`[${j}](${J}) ([source](${h}))`}else if(j.startsWith("@types/")){let J=j.replace("@types/",""),h=`https://redirect.github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/${J}`,r=`https://redirect.github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/${J}`;z=`[${j}](${h}) ([source](${r}))`}else z=`[${j}](https://www.npmjs.com/package/${encodeURIComponent(j)})`;let v=`https://renovatebot.com/diffs/npm/${encodeURIComponent(j)}/${encodeURIComponent(_.currentVersion)}/${encodeURIComponent(_.newVersion)}`,g=this.escapeMarkdownTableValue(_.currentVersion),n=this.escapeMarkdownTableValue(_.newVersion),s=`[\`${g}\` -> \`${n}\`](${v})`,I=this.releaseNotesFetcher.generatePackageBadges({...L,name:j},_.currentVersion,_.newVersion);Z+=`| ${z} | ${s} | ${I.age} | ${I.adoption} | ${I.passing} | ${I.confidence} |
23
+ `;let Q=Date.now();this.log(`\u23F1\uFE0F Starting to fetch info for ${B.length} npm packages in parallel...`);let X=(this.releaseNotesSettings.enabled?B:[]).map(async(_)=>{let M=Date.now();try{let O=_.name.replace(/\s*\(dev\)$/,"").replace(/\s*\(peer\)$/,"").replace(/\s*\(optional\)$/,""),j=await this.releaseNotesFetcher.fetchPackageInfo(O,_.currentVersion,_.newVersion);return this.log(`\u23F1\uFE0F Fetched ${O} in ${Date.now()-M}ms`),{name:_.name,result:j}}catch(O){return this.logger.warn(`Failed to fetch info for ${_.name}:`,O),null}});(await Promise.all(X)).forEach((_)=>{if(_)F.set(_.name,_.result)});let z=Date.now()-Q;this.log(`\u23F1\uFE0F Total npm package info fetch took ${z}ms for ${B.length} packages (avg: ${Math.round(z/B.length)}ms per package)`),this.logger.info(`\u23F1\uFE0F [PR-GEN] npm package info fetch: ${z}ms for ${B.length} packages (PARALLEL)`);for(let _ of B){let O=F.get(_.name)?.packageInfo||{name:_.name},j=_.name.replace(/\s*\(dev\)$/,"").replace(/\s*\(peer\)$/,"").replace(/\s*\(optional\)$/,""),E;if(O.repository?.url){let J=this.getRepositorySourceUrl(O.repository.url,j),C=this.getRepositorySourceUrl(O.repository.url,j,"HEAD");E=`[${j}](${J}) ([source](${C}))`}else if(j.startsWith("@types/")){let J=j.replace("@types/",""),C=`https://redirect.github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/${J}`,r=`https://redirect.github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/${J}`;E=`[${j}](${C}) ([source](${r}))`}else E=`[${j}](https://www.npmjs.com/package/${encodeURIComponent(j)})`;let v=`https://renovatebot.com/diffs/npm/${encodeURIComponent(j)}/${encodeURIComponent(_.currentVersion)}/${encodeURIComponent(_.newVersion)}`,g=this.escapeMarkdownTableValue(_.currentVersion),n=this.escapeMarkdownTableValue(_.newVersion),s=`[\`${g}\` -> \`${n}\`](${v})`,I=this.releaseNotesFetcher.generatePackageBadges({...O,name:j},_.currentVersion,_.newVersion);Z+=`| ${E} | ${s} | ${I.age} | ${I.adoption} | ${I.passing} | ${I.confidence} |
24
24
  `}Z+=`
25
- `}if(w.length>0){for(let Q of w)try{let X=await this.releaseNotesFetcher.fetchComposerPackageInfo(Q.name);m.set(Q.name,X)}catch(X){this.logger.warn(`Failed to fetch Composer info for ${Q.name}:`,X)}if(B||K<W.updates.length)Z+=`## \uD83D\uDC18 PHP/Composer Dependencies
25
+ `}if(w.length>0){for(let Q of w)try{let X=await this.releaseNotesFetcher.fetchComposerPackageInfo(Q.name);m.set(Q.name,X)}catch(X){this.logger.warn(`Failed to fetch Composer info for ${Q.name}:`,X)}if(D||K<W.updates.length)Z+=`## \uD83D\uDC18 PHP/Composer Dependencies
26
26
 
27
27
  `;if(Z+=`![composer](https://img.shields.io/badge/composer-885630?style=flat&logo=composer&logoColor=white)
28
28
 
@@ -30,9 +30,9 @@ import{Ve as l}from"./chunk-kh6v93yb.js";import{ag as c,jg as A}from"./chunk-wre
30
30
 
31
31
  `;Z+=`| Package | Change | Age | Adoption | Passing | Confidence | Type | Update |
32
32
  `,Z+=`|---|---|---|---|---|---|---|---|
33
- `;for(let Q of w){let X=m.get(Q.name)||{name:Q.name},D;if(X.homepage&&X.repository?.url){let v=this.getComposerRedirectSourceUrl(X.repository.url,Q.name);D=`[${Q.name}](${X.homepage}) ([source](${v}))`}else if(X.repository?.url){let v=this.getComposerRedirectSourceUrl(X.repository.url,Q.name);D=`[${Q.name}](${v})`}else D=`[${Q.name}](https://packagist.org/packages/${encodeURIComponent(Q.name)})`;let O=this.getConstraintStyleChange(Q.currentVersion,Q.newVersion),_=`https://renovatebot.com/diffs/packagist/${encodeURIComponent(Q.name)}/${Q.currentVersion}/${Q.newVersion}`,M=`[\`${O}\`](${_})`,L=this.releaseNotesFetcher.generateComposerBadges(X,Q.currentVersion,Q.newVersion),j=Q.dependencyType||"require",z=Q.updateType||"minor";Z+=`| ${D} | ${M} | ${L.age} | ${L.adoption} | ${L.passing} | ${L.confidence} | ${j} | ${z} |
33
+ `;for(let Q of w){let X=m.get(Q.name)||{name:Q.name},L;if(X.homepage&&X.repository?.url){let v=this.getComposerRedirectSourceUrl(X.repository.url,Q.name);L=`[${Q.name}](${X.homepage}) ([source](${v}))`}else if(X.repository?.url){let v=this.getComposerRedirectSourceUrl(X.repository.url,Q.name);L=`[${Q.name}](${v})`}else L=`[${Q.name}](https://packagist.org/packages/${encodeURIComponent(Q.name)})`;let z=this.getConstraintStyleChange(Q.currentVersion,Q.newVersion),_=`https://renovatebot.com/diffs/packagist/${encodeURIComponent(Q.name)}/${Q.currentVersion}/${Q.newVersion}`,M=`[\`${z}\`](${_})`,O=this.releaseNotesFetcher.generateComposerBadges(X,Q.currentVersion,Q.newVersion),j=Q.dependencyType||"require",E=Q.updateType||"minor";Z+=`| ${L} | ${M} | ${O.age} | ${O.adoption} | ${O.passing} | ${O.confidence} | ${j} | ${E} |
34
34
  `}Z+=`
35
- `}if(q.length>0){if(B||H<W.updates.length)Z+=`## \u26A1 Zig Dependencies
35
+ `}if(q.length>0){if(D||H<W.updates.length)Z+=`## \u26A1 Zig Dependencies
36
36
 
37
37
  `;if(Z+=`![zig](https://img.shields.io/badge/Zig-F7A41D?style=flat&logo=zig&logoColor=white)
38
38
 
@@ -40,9 +40,9 @@ import{Ve as l}from"./chunk-kh6v93yb.js";import{ag as c,jg as A}from"./chunk-wre
40
40
 
41
41
  `;Z+=`| Package | Change | Type | File |
42
42
  `,Z+=`|---|---|---|---|
43
- `;for(let Q of q){let X,D=Q.metadata;if(D?.url){let z=D.url.match(/https?:\/\/github\.com\/([^/]+\/[^/]+)/);if(z){let v=`https://github.com/${z[1]}`;X=`[${Q.name}](${v})`}else X=Q.name}else X=Q.name;let O=A(Q.currentVersion,Q.newVersion),_=O==="major"?"\uD83D\uDD34":O==="minor"?"\uD83D\uDFE1":"\uD83D\uDFE2",M=this.formatVersionChange(Q.currentVersion,Q.newVersion),L=Q.file.split("/").pop()||Q.file,j=this.config?.repository?.owner&&this.config?.repository?.name?`[\`${L}\`](${this.repositoryFileUrl(Q.file)})`:`\`${L}\``;Z+=`| ${X} | ${M} | ${_} ${O} | ${j} |
43
+ `;for(let Q of q){let X,L=Q.metadata;if(L?.url){let E=L.url.match(/https?:\/\/github\.com\/([^/]+\/[^/]+)/);if(E){let v=`https://github.com/${E[1]}`;X=`[${Q.name}](${v})`}else X=Q.name}else X=Q.name;let z=A(Q.currentVersion,Q.newVersion),_=z==="major"?"\uD83D\uDD34":z==="minor"?"\uD83D\uDFE1":"\uD83D\uDFE2",M=this.formatVersionChange(Q.currentVersion,Q.newVersion),O=Q.file.split("/").pop()||Q.file,j=this.config?.repository?.owner&&this.config?.repository?.name?`[\`${O}\`](${this.repositoryFileUrl(Q.file)})`:`\`${O}\``;Z+=`| ${X} | ${M} | ${_} ${z} | ${j} |
44
44
  `}Z+=`
45
- `}if(S.length>0){if(B||Y<W.updates.length)Z+=`## \uD83D\uDD27 System Dependencies
45
+ `}if(S.length>0){if(D||Y<W.updates.length)Z+=`## \uD83D\uDD27 System Dependencies
46
46
 
47
47
  `;Z+=`![system](https://img.shields.io/badge/system-4CAF50?style=flat&logo=linux&logoColor=white)
48
48
 
@@ -50,9 +50,9 @@ import{Ve as l}from"./chunk-kh6v93yb.js";import{ag as c,jg as A}from"./chunk-wre
50
50
 
51
51
  `;Z+=`| Package | Change | Type | File |
52
52
  `,Z+=`|---|---|---|---|
53
- `;for(let X of S){let D=X.name==="bun.sh"?"bun.com":X.name,O=X.name==="bun.sh"?"https://bun.sh":`https://pkgx.com/pkg/${encodeURIComponent(X.name)}`,_=`[${D}](${O})`,M=A(X.currentVersion,X.newVersion),L=M==="major"?"\uD83D\uDD34":M==="minor"?"\uD83D\uDFE1":"\uD83D\uDFE2",j=this.formatVersionChange(X.currentVersion,X.newVersion),z=X.file.split("/").pop()||X.file,v=this.config?.repository?.owner&&this.config?.repository?.name?`[\`${z}\`](${this.repositoryFileUrl(X.file)})`:`\`${z}\``;Z+=`| ${_} | ${j} | ${L} ${M} | ${v} |
53
+ `;for(let X of S){let L=X.name==="bun.sh"?"bun.com":X.name,z=X.name==="bun.sh"?"https://bun.sh":`https://pkgx.com/pkg/${encodeURIComponent(X.name)}`,_=`[${L}](${z})`,M=A(X.currentVersion,X.newVersion),O=M==="major"?"\uD83D\uDD34":M==="minor"?"\uD83D\uDFE1":"\uD83D\uDFE2",j=this.formatVersionChange(X.currentVersion,X.newVersion),E=X.file.split("/").pop()||X.file,v=this.config?.repository?.owner&&this.config?.repository?.name?`[\`${E}\`](${this.repositoryFileUrl(X.file)})`:`\`${E}\``;Z+=`| ${_} | ${j} | ${O} ${M} | ${v} |
54
54
  `}Z+=`
55
- `}if(V.length>0){if(B||R<W.updates.length)Z+=`## \uD83D\uDE80 GitHub Actions
55
+ `}if(V.length>0){if(D||R<W.updates.length)Z+=`## \uD83D\uDE80 GitHub Actions
56
56
 
57
57
  `;if(Z+=`![github-actions](https://img.shields.io/badge/GitHub%20Actions-2088FF?style=flat&logo=github-actions&logoColor=white)
58
58
 
@@ -60,35 +60,35 @@ import{Ve as l}from"./chunk-kh6v93yb.js";import{ag as c,jg as A}from"./chunk-wre
60
60
 
61
61
  `;Z+=`| Action | Change | Type | Files |
62
62
  `,Z+=`|---|---|---|---|
63
- `;for(let Q of V){let X=`${k(this.config)}/${Q.name}`,D=`[${Q.name}](${X})`,O=A(Q.currentVersion,Q.newVersion),_=O==="major"?"\uD83D\uDD34":O==="minor"?"\uD83D\uDFE1":"\uD83D\uDFE2",M=this.formatVersionChange(Q.currentVersion,Q.newVersion),L=Q.file.includes(", ")?Q.file.split(", ").map((j)=>{let z=j.split("/").pop()||j;return this.config?.repository?.owner&&this.config?.repository?.name?`[\`${z}\`](${this.repositoryFileUrl(j)})`:`\`${z}\``}).join(", "):(()=>{let j=Q.file.split("/").pop()||Q.file;return this.config?.repository?.owner&&this.config?.repository?.name?`[\`${j}\`](${this.repositoryFileUrl(Q.file)})`:`\`${j}\``})();Z+=`| ${D} | ${M} | ${_} ${O} | ${L} |
63
+ `;for(let Q of V){let X=`${k(this.config)}/${Q.name}`,L=`[${Q.name}](${X})`,z=A(Q.currentVersion,Q.newVersion),_=z==="major"?"\uD83D\uDD34":z==="minor"?"\uD83D\uDFE1":"\uD83D\uDFE2",M=this.formatVersionChange(Q.currentVersion,Q.newVersion),O=Q.file.includes(", ")?Q.file.split(", ").map((j)=>{let E=j.split("/").pop()||j;return this.config?.repository?.owner&&this.config?.repository?.name?`[\`${E}\`](${this.repositoryFileUrl(j)})`:`\`${E}\``}).join(", "):(()=>{let j=Q.file.split("/").pop()||Q.file;return this.config?.repository?.owner&&this.config?.repository?.name?`[\`${j}\`](${this.repositoryFileUrl(Q.file)})`:`\`${j}\``})();Z+=`| ${L} | ${M} | ${_} ${z} | ${O} |
64
64
  `}Z+=`
65
65
  `}Z+=`
66
66
  ---
67
67
 
68
68
  `;let G=this.releaseNotesSettings;if(!G.enabled)return this.finalizeBody(Z,W);Z+=`### Release Notes
69
69
 
70
- `;for(let Q of E){let X=F.get(Q.name),D=X?.packageInfo||{name:Q.name},O=X?.releaseNotes||[],_=X?.compareUrl;Z+=`<details>
71
- `;let M,L=Q.name.replace(/\s*\(dev\)$/,"").replace(/\s*\(peer\)$/,"").replace(/\s*\(optional\)$/,"");if(D.repository?.url)M=`${this.getRepositoryName(D.repository.url)} (${L})`;else M=L;if(Z+=`<summary>${M}</summary>
70
+ `;for(let Q of B){let X=F.get(Q.name),L=X?.packageInfo||{name:Q.name},z=X?.releaseNotes||[],_=X?.compareUrl;Z+=`<details>
71
+ `;let M,O=Q.name.replace(/\s*\(dev\)$/,"").replace(/\s*\(peer\)$/,"").replace(/\s*\(optional\)$/,"");if(L.repository?.url)M=`${this.getRepositoryName(L.repository.url)} (${O})`;else M=O;if(Z+=`<summary>${M}</summary>
72
72
 
73
73
  `,Z+=`**${Q.currentVersion} -> ${Q.newVersion}**
74
74
 
75
- `,O.length>0)for(let j of O.slice(0,G.maxReleases)){if(Z+=`### [\`${j.version}\`](${j.htmlUrl})
75
+ `,z.length>0)for(let j of z.slice(0,G.maxReleases)){if(Z+=`### [\`${j.version}\`](${j.htmlUrl})
76
76
 
77
77
  `,_&&G.includeCompareLinks)Z+=`[Compare Source](${_})
78
78
 
79
- `;if(j.body){let z=this.cleanReleaseBody(j.body);Z+=`${z}
79
+ `;if(j.body){let E=this.cleanReleaseBody(j.body);Z+=`${E}
80
80
 
81
81
  `}if(j.author)Z+=`*Released by [${j.author}](https://github.com/${j.author}) on ${new Date(j.date).toLocaleDateString()}*
82
82
 
83
83
  `}else{if(_&&G.includeCompareLinks)Z+=`[Compare Source](${_})
84
84
 
85
- `;if(D.description)Z+=`${D.description}
85
+ `;if(L.description)Z+=`${L.description}
86
86
 
87
- `;if(D.repository?.url){let j=this.getRepositoryName(D.repository.url);if(j)Z+=`\uD83D\uDCD6 [View Release Notes](https://github.com/${j}/releases)
87
+ `;if(L.repository?.url){let j=this.getRepositoryName(L.repository.url);if(j)Z+=`\uD83D\uDCD6 [View Release Notes](https://github.com/${j}/releases)
88
88
 
89
89
  `,Z+=`\uD83D\uDD17 [View Changelog](https://github.com/${j}/blob/main/CHANGELOG.md)
90
90
 
91
- `}else Z+=`\uD83D\uDCE6 [View on npm](https://www.npmjs.com/package/${encodeURIComponent(L)})
91
+ `}else Z+=`\uD83D\uDCE6 [View on npm](https://www.npmjs.com/package/${encodeURIComponent(O)})
92
92
 
93
93
  `;if(Q.releaseNotesUrl)Z+=`[Release Notes](${Q.releaseNotesUrl})
94
94
 
@@ -96,20 +96,20 @@ import{Ve as l}from"./chunk-kh6v93yb.js";import{ag as c,jg as A}from"./chunk-wre
96
96
 
97
97
  `}Z+=`</details>
98
98
 
99
- `}let N=S.filter((Q)=>!E.some((X)=>X.name.replace(/\s*\(dev\)$/,"").replace(/\s*\(peer\)$/,"").replace(/\s*\(optional\)$/,"")===Q.name));for(let Q of N){let X=Q.name==="bun.sh"?"bun.com":Q.name;Z+=`<details>
99
+ `}let N=S.filter((Q)=>!B.some((X)=>X.name.replace(/\s*\(dev\)$/,"").replace(/\s*\(peer\)$/,"").replace(/\s*\(optional\)$/,"")===Q.name));for(let Q of N){let X=Q.name==="bun.sh"?"bun.com":Q.name;Z+=`<details>
100
100
  `,Z+=`<summary>${X}</summary>
101
101
 
102
- `;let D=this.formatVersionChange(Q.currentVersion,Q.newVersion).replace(/`/g,"");if(Z+=`**${D}**
102
+ `;let L=this.formatVersionChange(Q.currentVersion,Q.newVersion).replace(/`/g,"");if(Z+=`**${L}**
103
103
 
104
- `,Q.file){let O=Q.file.split("/").pop()||Q.file,_=this.config?.repository?.owner&&this.config?.repository?.name?`\uD83D\uDCC1 **File**: [\`${O}\`](https://github.com/${this.config.repository.owner}/${this.config.repository.name}/blob/main/${Q.file})
104
+ `,Q.file){let z=Q.file.split("/").pop()||Q.file,_=this.config?.repository?.owner&&this.config?.repository?.name?`\uD83D\uDCC1 **File**: [\`${z}\`](https://github.com/${this.config.repository.owner}/${this.config.repository.name}/blob/main/${Q.file})
105
105
 
106
- `:`\uD83D\uDCC1 **File**: \`${O}\`
106
+ `:`\uD83D\uDCC1 **File**: \`${z}\`
107
107
 
108
108
  `;Z+=_}if(Q.name==="bun.sh")Z+=`\uD83D\uDD17 **Release Notes**: [bun.sh](https://bun.sh)
109
109
 
110
- `;else if(Q.name.includes(".org")||Q.name.includes(".net")||Q.name.includes(".com")){let O=Q.name.split("/")[0]||Q.name;Z+=`\uD83D\uDD17 **Package Info**: [pkgx.com](https://pkgx.com/pkg/${encodeURIComponent(Q.name)})
110
+ `;else if(Q.name.includes(".org")||Q.name.includes(".net")||Q.name.includes(".com")){let z=Q.name.split("/")[0]||Q.name;Z+=`\uD83D\uDD17 **Package Info**: [pkgx.com](https://pkgx.com/pkg/${encodeURIComponent(Q.name)})
111
111
 
112
- `,Z+=`\uD83C\uDF10 **Official Site**: [${O}](https://${O})
112
+ `,Z+=`\uD83C\uDF10 **Official Site**: [${z}](https://${z})
113
113
 
114
114
  `}else Z+=`\uD83D\uDD17 **Package Info**: [pkgx.com](https://pkgx.com/pkg/${encodeURIComponent(Q.name)})
115
115
 
@@ -137,7 +137,7 @@ import{Ve as l}from"./chunk-kh6v93yb.js";import{ag as c,jg as A}from"./chunk-wre
137
137
 
138
138
  `,F.size>0||w.length>0||N.length>0||V.length>0){Z+=`### \uD83D\uDCCA Package Statistics
139
139
 
140
- `;for(let Q of E){let D=F.get(Q.name)?.packageInfo;if(D?.weeklyDownloads)Z+=`- **${Q.name}**: ${D.weeklyDownloads.toLocaleString()} weekly downloads
140
+ `;for(let Q of B){let L=F.get(Q.name)?.packageInfo;if(L?.weeklyDownloads)Z+=`- **${Q.name}**: ${L.weeklyDownloads.toLocaleString()} weekly downloads
141
141
  `;else Z+=`- **${Q.name}**: npm package with weekly downloads tracked on npmjs.com
142
142
  `}for(let Q of w)Z+=`- **${Q.name}**: PHP package available on Packagist
143
143
  `;for(let Q of N){let X=Q.name==="bun.sh"?"bun.com":Q.name;if(Q.name==="bun.sh")Z+=`- **${X}**: Popular JavaScript runtime and package manager
@@ -146,7 +146,7 @@ import{Ve as l}from"./chunk-kh6v93yb.js";import{ag as c,jg as A}from"./chunk-wre
146
146
  `;Z+=`
147
147
  ---
148
148
 
149
- `}return this.finalizeBody(Z,W)}finalizeBody(W,$){let Y=this.config?.pullRequest?.bodyTemplate,R=" - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box";if(Y){if(W=C(Y,{...f($,{},this.config?.packages?.strategy),updatesTable:W,footer:" - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box"}),!W.includes("<!-- rebase-check -->"))W+=`
149
+ `}return this.finalizeBody(Z,W)}finalizeBody(W,$){let Y=this.config?.pullRequest?.bodyTemplate,R=" - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box";if(Y){if(W=h(Y,{...f($,{},this.config?.packages?.strategy),updatesTable:W,footer:" - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box"}),!W.includes("<!-- rebase-check -->"))W+=`
150
150
 
151
151
  - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box
152
152
  `}else{W+=`### Configuration
@@ -157,7 +157,7 @@ import{Ve as l}from"./chunk-kh6v93yb.js";import{ag as c,jg as A}from"./chunk-wre
157
157
 
158
158
  `,W+=`\u267B **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
159
159
 
160
- `;let Z=$.updates.length===1?"this update again":"these updates again";W+=`\uD83D\uDD15 **Ignore**: Close this PR and you won't be reminded about ${Z}.
160
+ `;let D=$.updates.length===1?"this update again":"these updates again";W+=`\uD83D\uDD15 **Ignore**: Close this PR and you won't be reminded about ${D}.
161
161
 
162
162
  `,W+=`---
163
163
 
@@ -165,22 +165,26 @@ import{Ve as l}from"./chunk-kh6v93yb.js";import{ag as c,jg as A}from"./chunk-wre
165
165
 
166
166
  `,W+=`---
167
167
 
168
- `,W+="This PR was generated by [Buddy](https://github.com/stacksjs/buddy) \uD83E\uDD16"}let K=y($),H=60000-K.length;if(W.length>H){let Z=W.substring(0,H),B=Z.lastIndexOf("</details>");if(B>0)W=`${Z.substring(0,B+10)}
168
+ `,W+="This PR was generated by [Buddy](https://github.com/stacksjs/buddy) \uD83E\uDD16"}let K=y($),H=`---
169
+
170
+ - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box
171
+
172
+ `,Z=60000-K.length-H.length;if(W.length>Z){let D=W.substring(0,Z),B=D.lastIndexOf("</details>");if(B>0)W=`${D.substring(0,B+10)}
169
173
 
170
174
  ---
171
175
 
172
176
  **Note**: This PR body was truncated due to GitHub's character limit. View the full details in the individual commits.
173
177
 
174
- `;else W=`${Z}
178
+ `;else W=`${D}
175
179
 
176
180
  ---
177
181
 
178
182
  **Note**: This PR body was truncated due to GitHub's character limit.
179
183
 
180
- `;W+="This PR was generated by [Buddy](https://github.com/stacksjs/buddy) \uD83E\uDD16"}if(W+=K,this.log("\u2705 PR body generation complete",{bodyLength:W.length,hasNpmSection:W.includes("## \uD83D\uDCE6 npm Dependencies"),hasComposerSection:W.includes("## \uD83D\uDC18 PHP/Composer Dependencies"),hasSystemSection:W.includes("## \uD83D\uDD27 System Dependencies"),hasGitHubActionsSection:W.includes("## \uD83D\uDE80 GitHub Actions"),hasPackageTable:W.includes("| Package | Change | Age | Adoption | Passing | Confidence |"),hasReleaseNotes:W.includes("### Release Notes"),isSparse:W.length<1000,sections:{hasNpmPackagesInSummary:W.includes("\uD83D\uDCE6 NPM Packages"),hasComposerInSummary:W.includes("\uD83D\uDC18 Composer Packages"),hasSystemInSummary:W.includes("\uD83D\uDD27 System Dependencies"),hasGitHubActionsInSummary:W.includes("\uD83D\uDE80 GitHub Actions")}}),W.length<1000)this.log("\uD83D\uDEA8 WARNING: Generated PR body appears sparse (under 1000 chars)!");return W}getRepositoryName(W){try{let $=W.replace(/^git\+/,"").replace(/\.git$/,"").replace(/^git:\/\//,"https://").replace(/^ssh:\/\/git@/,"https://").replace(/^git@github\.com:/,"https://github.com/"),R=new URL($).pathname.split("/").filter(Boolean);if(R.length>=2)return`${R[0]}/${R[1]}`;return W}catch{return W}}getRepositorySourceUrl(W,$,Y="master"){try{let R=W.replace(/^git\+/,"").replace(/\.git$/,"").replace(/^git:\/\//,"https://").replace(/^ssh:\/\/git@/,"https://").replace(/^git@github\.com:/,"https://github.com/"),K=new URL(R);if($.startsWith("@types/")&&K.pathname.includes("DefinitelyTyped")){let H=$.replace("@types/","");return`https://redirect.github.com/DefinitelyTyped/DefinitelyTyped/tree/${Y}/types/${H}`}if(K.hostname==="github.com")return`${R}/tree/${Y}`;return R}catch{return W}}getComposerSourceUrl(W,$){try{let Y=W.replace(/^git\+/,"").replace(/\.git$/,"").replace(/^git:\/\//,"https://").replace(/^ssh:\/\/git@/,"https://").replace(/^git@github\.com:/,"https://github.com/"),R=new URL(Y);if($.startsWith("@types/")&&R.pathname.includes("DefinitelyTyped"))return`https://redirect.github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/${$.replace("@types/","")}`;if(R.hostname==="github.com")return`${Y}/tree/master`;return Y}catch{return W}}getConstraintStyleChange(W,$){let Y=W.replace(/^v/,""),R=$.replace(/^v/,""),K=`^${Y}`,H=`^${R}`;return`${K} -> ${H}`}escapeMarkdownTableValue(W){return W.replaceAll("|","\\|").replaceAll(/\r?\n/g," ")}getComposerRedirectSourceUrl(W,$){try{let Y=W.replace(/^git\+/,"").replace(/\.git$/,"").replace(/^git:\/\//,"https://").replace(/^ssh:\/\/git@/,"https://").replace(/^git@github\.com:/,"https://github.com/"),R=new URL(Y);if($.startsWith("@types/")&&R.pathname.includes("DefinitelyTyped"))return`https://redirect.github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/${$.replace("@types/","")}`;if(R.hostname==="github.com"){let K=R.pathname.split("/").filter((H)=>H);if(K.length>=2){let H=K[0],Z=K[1];return`https://redirect.github.com/${H}/${Z}`}}return Y}catch{return W}}cleanReleaseBody(W){let $=W.replace(/\r\n/g,`
184
+ `;W+=H,W+="This PR was generated by [Buddy](https://github.com/stacksjs/buddy) \uD83E\uDD16"}if(W+=K,this.log("\u2705 PR body generation complete",{bodyLength:W.length,hasNpmSection:W.includes("## \uD83D\uDCE6 npm Dependencies"),hasComposerSection:W.includes("## \uD83D\uDC18 PHP/Composer Dependencies"),hasSystemSection:W.includes("## \uD83D\uDD27 System Dependencies"),hasGitHubActionsSection:W.includes("## \uD83D\uDE80 GitHub Actions"),hasPackageTable:W.includes("| Package | Change | Age | Adoption | Passing | Confidence |"),hasReleaseNotes:W.includes("### Release Notes"),isSparse:W.length<1000,sections:{hasNpmPackagesInSummary:W.includes("\uD83D\uDCE6 NPM Packages"),hasComposerInSummary:W.includes("\uD83D\uDC18 Composer Packages"),hasSystemInSummary:W.includes("\uD83D\uDD27 System Dependencies"),hasGitHubActionsInSummary:W.includes("\uD83D\uDE80 GitHub Actions")}}),W.length<1000)this.log("\uD83D\uDEA8 WARNING: Generated PR body appears sparse (under 1000 chars)!");return W}getRepositoryName(W){try{let $=W.replace(/^git\+/,"").replace(/\.git$/,"").replace(/^git:\/\//,"https://").replace(/^ssh:\/\/git@/,"https://").replace(/^git@github\.com:/,"https://github.com/"),R=new URL($).pathname.split("/").filter(Boolean);if(R.length>=2)return`${R[0]}/${R[1]}`;return W}catch{return W}}getRepositorySourceUrl(W,$,Y="master"){try{let R=W.replace(/^git\+/,"").replace(/\.git$/,"").replace(/^git:\/\//,"https://").replace(/^ssh:\/\/git@/,"https://").replace(/^git@github\.com:/,"https://github.com/"),K=new URL(R);if($.startsWith("@types/")&&K.pathname.includes("DefinitelyTyped")){let H=$.replace("@types/","");return`https://redirect.github.com/DefinitelyTyped/DefinitelyTyped/tree/${Y}/types/${H}`}if(K.hostname==="github.com")return`${R}/tree/${Y}`;return R}catch{return W}}getComposerSourceUrl(W,$){try{let Y=W.replace(/^git\+/,"").replace(/\.git$/,"").replace(/^git:\/\//,"https://").replace(/^ssh:\/\/git@/,"https://").replace(/^git@github\.com:/,"https://github.com/"),R=new URL(Y);if($.startsWith("@types/")&&R.pathname.includes("DefinitelyTyped"))return`https://redirect.github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/${$.replace("@types/","")}`;if(R.hostname==="github.com")return`${Y}/tree/master`;return Y}catch{return W}}getConstraintStyleChange(W,$){let Y=W.replace(/^v/,""),R=$.replace(/^v/,""),K=`^${Y}`,H=`^${R}`;return`${K} -> ${H}`}escapeMarkdownTableValue(W){return W.replaceAll("|","\\|").replaceAll(/\r?\n/g," ")}getComposerRedirectSourceUrl(W,$){try{let Y=W.replace(/^git\+/,"").replace(/\.git$/,"").replace(/^git:\/\//,"https://").replace(/^ssh:\/\/git@/,"https://").replace(/^git@github\.com:/,"https://github.com/"),R=new URL(Y);if($.startsWith("@types/")&&R.pathname.includes("DefinitelyTyped"))return`https://redirect.github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/${$.replace("@types/","")}`;if(R.hostname==="github.com"){let K=R.pathname.split("/").filter((H)=>H);if(K.length>=2){let H=K[0],Z=K[1];return`https://redirect.github.com/${H}/${Z}`}}return Y}catch{return W}}cleanReleaseBody(W){let $=W.replace(/\r\n/g,`
181
185
  `).replace(/\n{3,}/g,`
182
186
 
183
187
  `).trim();$=this.sanitizeMentions($),$=this.sanitizeGitHubReferences($);let Y=this.config?.releaseNotes?.maxBodyLength??1000;if($.length>Y)$=`${$.substring(0,Y)}...
184
188
 
185
- *[View full release notes]*`;return $}sanitizeMentions(W){let $=[],Y=[],R=W.replace(/```[\s\S]*?```/g,(K)=>{return $.push(K),`__FENCE_PLACEHOLDER_${$.length-1}__`});return R=R.replace(/`[^`\n]+`/g,(K)=>{return Y.push(K),`__INLINE_CODE_PLACEHOLDER_${Y.length-1}__`}),R=R.replace(/(?<![\w./])@([A-Z0-9-]+)(?![A-Z0-9-])/gi,(K,H)=>{return`[${H}](https://github.com/${H})`}),R=R.replace(/__INLINE_CODE_PLACEHOLDER_(\d+)__/g,(K,H)=>Y[Number(H)]),R=R.replace(/__FENCE_PLACEHOLDER_(\d+)__/g,(K,H)=>$[Number(H)]),R}sanitizeGitHubReferences(W){if(this.config?.releaseNotes?.sanitizeReferences===!1)return W;let $=[],Y=[],R=W.replace(/```[\s\S]*?```/g,(K)=>{return $.push(K),`__FENCE_PLACEHOLDER_${$.length-1}__`});return R=R.replace(/`[^`\n]+`/g,(K)=>{return Y.push(K),`__INLINE_CODE_PLACEHOLDER_${Y.length-1}__`}),R=R.replace(/https?:\/\/github\.com\/([^/]+)\/([^/]+)\/(?:pull|issues)\/(\d+)/g,(K,H,Z,B)=>`\`${H}/${Z}#${B}\``),R=R.replace(/(?<![`\w])#(\d+)(?!\d)/g,"`#$1`"),R=R.replace(/__INLINE_CODE_PLACEHOLDER_(\d+)__/g,(K,H)=>Y[Number(H)]),R=R.replace(/__FENCE_PLACEHOLDER_(\d+)__/g,(K,H)=>$[Number(H)]),R}generateCustomTemplate(W,$,Y={}){let R=$,H={...{"{title}":this.generateTitle(W),"{package_count}":W.updates.length.toString(),"{update_type}":W.updateType,"{packages}":W.updates.map((Z)=>Z.name).join(", "),"{date}":new Date().toISOString().split("T")[0]},...Y};for(let[Z,B]of Object.entries(H))R=R.replace(new RegExp(Z,"g"),B);return R}formatVersionChange(W,$){let Y=W.match(/^(\D+)/),R=Y?Y[1]:"";if(R){let K=W.replace(/^\D+/,""),H=$.replace(/^\D+/,"");return`\`${R}${K}\` \u2192 \`${R}${H}\``}return`\`${W}\` \u2192 \`${$}\``}getVersionChangeDescription(W,$,Y){return{major:"\uD83D\uDD34 Breaking changes possible",minor:"\uD83D\uDFE1 New features added",patch:"\uD83D\uDFE2 Bug fixes & patches"}[Y]}}
186
- export{C as qd,f as rd,p as sd};
189
+ *[View full release notes]*`;return $}sanitizeMentions(W){let $=[],Y=[],R=W.replace(/```[\s\S]*?```/g,(K)=>{return $.push(K),`__FENCE_PLACEHOLDER_${$.length-1}__`});return R=R.replace(/`[^`\n]+`/g,(K)=>{return Y.push(K),`__INLINE_CODE_PLACEHOLDER_${Y.length-1}__`}),R=R.replace(/(?<![\w./])@([A-Z0-9-]+)(?![A-Z0-9-])/gi,(K,H)=>{return`[${H}](https://github.com/${H})`}),R=R.replace(/__INLINE_CODE_PLACEHOLDER_(\d+)__/g,(K,H)=>Y[Number(H)]),R=R.replace(/__FENCE_PLACEHOLDER_(\d+)__/g,(K,H)=>$[Number(H)]),R}sanitizeGitHubReferences(W){if(this.config?.releaseNotes?.sanitizeReferences===!1)return W;let $=[],Y=[],R=W.replace(/```[\s\S]*?```/g,(K)=>{return $.push(K),`__FENCE_PLACEHOLDER_${$.length-1}__`});return R=R.replace(/`[^`\n]+`/g,(K)=>{return Y.push(K),`__INLINE_CODE_PLACEHOLDER_${Y.length-1}__`}),R=R.replace(/https?:\/\/github\.com\/([^/]+)\/([^/]+)\/(?:pull|issues)\/(\d+)/g,(K,H,Z,D)=>`\`${H}/${Z}#${D}\``),R=R.replace(/(?<![`\w])#(\d+)(?!\d)/g,"`#$1`"),R=R.replace(/__INLINE_CODE_PLACEHOLDER_(\d+)__/g,(K,H)=>Y[Number(H)]),R=R.replace(/__FENCE_PLACEHOLDER_(\d+)__/g,(K,H)=>$[Number(H)]),R}generateCustomTemplate(W,$,Y={}){let R=$,H={...{"{title}":this.generateTitle(W),"{package_count}":W.updates.length.toString(),"{update_type}":W.updateType,"{packages}":W.updates.map((Z)=>Z.name).join(", "),"{date}":new Date().toISOString().split("T")[0]},...Y};for(let[Z,D]of Object.entries(H))R=R.replace(new RegExp(Z,"g"),D);return R}formatVersionChange(W,$){let Y=W.match(/^(\D+)/),R=Y?Y[1]:"";if(R){let K=W.replace(/^\D+/,""),H=$.replace(/^\D+/,"");return`\`${R}${K}\` \u2192 \`${R}${H}\``}return`\`${W}\` \u2192 \`${$}\``}getVersionChangeDescription(W,$,Y){return{major:"\uD83D\uDD34 Breaking changes possible",minor:"\uD83D\uDFE1 New features added",patch:"\uD83D\uDFE2 Bug fixes & patches"}[Y]}}
190
+ export{h as qd,f as rd,p as sd};
@@ -36,6 +36,7 @@ export declare class GitHubProvider implements GitProvider {
36
36
  commitChanges(branchName: string, message: string, files: FileChange[], baseBranch?: string): Promise<void>;
37
37
  createPullRequest(options: PullRequestOptions): Promise<PullRequest>;
38
38
  runCommand(command: string, args: string[], tokenOverride?: string): Promise<string>;
39
+ isBranchBehind(branch: string, base: string): Promise<boolean>;
39
40
  getPullRequestFiles(number: number): Promise<string[]>;
40
41
  getPullRequests(state?: 'open' | 'closed' | 'all'): Promise<PullRequest[]>;
41
42
  updatePullRequest(prNumber: number, options: Partial<PullRequestOptions>): Promise<PullRequest>;
@@ -194,6 +194,7 @@ export declare interface GitProvider {
194
194
  commitChanges: (branchName: string, message: string, files: FileChange[], baseBranch?: string) => Promise<void>
195
195
  getFileContent: (path: string, ref: string) => Promise<string | null>
196
196
  getPullRequestFiles?: (number: number) => Promise<string[]>
197
+ isBranchBehind?: (branch: string, base: string) => Promise<boolean>
197
198
  createPullRequest: (options: PullRequestOptions) => Promise<PullRequest>
198
199
  getPullRequests: (state?: 'open' | 'closed' | 'all') => Promise<PullRequest[]>
199
200
  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-d7jpbw1z.js";import{W as ko,X as qo}from"../chunk-qtyr3kqj.js";import{$ as Wo,Y as Jo,Z as Ko,_ as Qo}from"../chunk-rrnvxj90.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-7bctsv0x.js";import{Aa as $o,Ba as bo,Ca as to,xa as Xo,ya as Yo,za as Zo}from"../chunk-ysgex7h7.js";import"../chunk-rb1fh9vd.js";import{Da as pm}from"../chunk-7gd1et2j.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-mcn3508w.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-k3x0mabj.js";import{Va as Yf,Wa as Zf}from"../chunk-pmszvhja.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-88xaexj1.js";import{mb as Id}from"../chunk-fystbk81.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-wtt17gzv.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-y7z0br2x.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-ggzjv4s0.js";import{gc as Vp,hc as ep,ic as gp,jc as rp,mc as vp,nc as ip}from"../chunk-rg996jqw.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-2m0134q8.js";import{Mc as dp}from"../chunk-f0gag8vx.js";import{Nc as mp,Oc as xp,Pc as fp}from"../chunk-zrg5ss0x.js";import{Tc as mm,Uc as xm,Vc as fm,Wc as dm}from"../chunk-5dscgksz.js";import{Xc as Bo,Yc as Fo,Zc as Ho}from"../chunk-er0ntw4q.js";import{$c as hp,_c as Sp,ad as up,bd as cp,dd as Do}from"../chunk-z24p5t3p.js";import"../chunk-p9z0hzej.js";import{fd as _p,gd as zp,hd as Dp,id as Tp,jd as jp}from"../chunk-amj037yy.js";import{kd as wp}from"../chunk-4wbbbcs2.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-p5yaf72b.js";import{td as Xf}from"../chunk-mg3em5qj.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-7crh00m7.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-be059ncv.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-1eh199jk.js";import"../chunk-hyp0wfta.js";import"../chunk-4hd1mryc.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-nwrr6jas.js";import{Ve as Cp}from"../chunk-kh6v93yb.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-3waqfh3y.js";import{rf as U,sf as A,tf as G,uf as E,vf as O,xf as P}from"../chunk-k7x9af5r.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-7rjrea9g.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-wreexgkb.js";import"../chunk-gvnsr72j.js";import"../chunk-1m5wprvm.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-9m0epv44.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-qdmr84mc.js";import{Ch as w}from"../chunk-6xzzs109.js";import"../chunk-pxdrwhxx.js";import{Eh as J,Fh as K,Gh as Q,Hh as W,Ih as X,Jh as Y}from"../chunk-a3bnhq58.js";import{Kh as k,Lh as q,Mh as Z,Nh as $,Oh as b}from"../chunk-8dj94fsy.js";import"../chunk-0apd8zqn.js";import"../chunk-s3ksf6s5.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-d7jpbw1z.js";import{W as ko,X as qo}from"../chunk-db9rffcf.js";import{$ as Wo,Y as Jo,Z as Ko,_ as Qo}from"../chunk-rrnvxj90.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-7bctsv0x.js";import{Aa as $o,Ba as bo,Ca as to,xa as Xo,ya as Yo,za as Zo}from"../chunk-ysgex7h7.js";import"../chunk-rb1fh9vd.js";import{Da as pm}from"../chunk-6w8vxy7s.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-a34szd4r.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-k3x0mabj.js";import{Va as Yf,Wa as Zf}from"../chunk-pmszvhja.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-88xaexj1.js";import{mb as Id}from"../chunk-fpzgxg8a.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-s3q7g2hy.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-y7z0br2x.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-ggzjv4s0.js";import{gc as Vp,hc as ep,ic as gp,jc as rp,mc as vp,nc as ip}from"../chunk-rg996jqw.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-2m0134q8.js";import{Mc as dp}from"../chunk-xffrrs85.js";import{Nc as mp,Oc as xp,Pc as fp}from"../chunk-zrg5ss0x.js";import{Tc as mm,Uc as xm,Vc as fm,Wc as dm}from"../chunk-gzjxhd7a.js";import{Xc as Bo,Yc as Fo,Zc as Ho}from"../chunk-tx9m7y1z.js";import{$c as hp,_c as Sp,ad as up,bd as cp,dd as Do}from"../chunk-785rgtn5.js";import"../chunk-p9z0hzej.js";import{fd as _p,gd as zp,hd as Dp,id as Tp,jd as jp}from"../chunk-amj037yy.js";import{kd as wp}from"../chunk-4wbbbcs2.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-yxb1jwxp.js";import{td as Xf}from"../chunk-mg3em5qj.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-7crh00m7.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-be059ncv.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-34rmja4x.js";import"../chunk-hyp0wfta.js";import"../chunk-4hd1mryc.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-nwrr6jas.js";import{Ve as Cp}from"../chunk-kh6v93yb.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-3waqfh3y.js";import{rf as U,sf as A,tf as G,uf as E,vf as O,xf as P}from"../chunk-k7x9af5r.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-7rjrea9g.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-wreexgkb.js";import"../chunk-gvnsr72j.js";import"../chunk-1m5wprvm.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-9m0epv44.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-qdmr84mc.js";import{Ch as w}from"../chunk-6xzzs109.js";import"../chunk-pxdrwhxx.js";import{Eh as J,Fh as K,Gh as Q,Hh as W,Ih as X,Jh as Y}from"../chunk-a3bnhq58.js";import{Kh as k,Lh as q,Mh as Z,Nh as $,Oh as b}from"../chunk-8dj94fsy.js";import"../chunk-0apd8zqn.js";import"../chunk-s3ksf6s5.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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@buddysh/buddy",
3
3
  "type": "module",
4
- "version": "0.11.8",
4
+ "version": "0.11.10",
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",