@visulima/vis 6.5.0 → 6.5.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (148) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/dist/bin.js +1 -1
  3. package/dist/binx.js +1 -1
  4. package/dist/packem_chunks/bloom-sync.js +1 -1
  5. package/dist/packem_chunks/cargo-plan.js +1 -1
  6. package/dist/packem_chunks/catalog-detector.js +1 -1
  7. package/dist/packem_chunks/catalog.js +11 -1
  8. package/dist/packem_chunks/cli-exec.js +1 -1
  9. package/dist/packem_chunks/cli-main.js +2 -2
  10. package/dist/packem_chunks/context.js +4 -4
  11. package/dist/packem_chunks/fix.js +1 -1
  12. package/dist/packem_chunks/handler10.js +1 -1
  13. package/dist/packem_chunks/handler12.js +1 -1
  14. package/dist/packem_chunks/handler13.js +1 -1
  15. package/dist/packem_chunks/handler14.js +1 -1
  16. package/dist/packem_chunks/handler15.js +1 -1
  17. package/dist/packem_chunks/handler19.js +1 -1
  18. package/dist/packem_chunks/handler2.js +1 -1
  19. package/dist/packem_chunks/handler20.js +1 -1
  20. package/dist/packem_chunks/handler21.js +1 -1
  21. package/dist/packem_chunks/handler23.js +1 -1
  22. package/dist/packem_chunks/handler24.js +1 -1
  23. package/dist/packem_chunks/handler25.js +1 -1
  24. package/dist/packem_chunks/handler26.js +1 -1
  25. package/dist/packem_chunks/handler28.js +1 -1
  26. package/dist/packem_chunks/handler3.js +1 -1
  27. package/dist/packem_chunks/handler32.js +1 -1
  28. package/dist/packem_chunks/handler39.js +5 -5
  29. package/dist/packem_chunks/handler4.js +1 -1
  30. package/dist/packem_chunks/handler46.js +1 -1
  31. package/dist/packem_chunks/handler49.js +1 -1
  32. package/dist/packem_chunks/handler5.js +1 -1
  33. package/dist/packem_chunks/handler50.js +1 -1
  34. package/dist/packem_chunks/handler51.js +1 -1
  35. package/dist/packem_chunks/handler52.js +1 -1
  36. package/dist/packem_chunks/handler54.js +1 -1
  37. package/dist/packem_chunks/handler55.js +1 -1
  38. package/dist/packem_chunks/handler56.js +5 -5
  39. package/dist/packem_chunks/handler58.js +1 -1
  40. package/dist/packem_chunks/handler59.js +1 -1
  41. package/dist/packem_chunks/handler6.js +1 -1
  42. package/dist/packem_chunks/handler60.js +1 -1
  43. package/dist/packem_chunks/handler61.js +1 -1
  44. package/dist/packem_chunks/handler62.js +1 -1
  45. package/dist/packem_chunks/handler63.js +1 -1
  46. package/dist/packem_chunks/handler64.js +1 -1
  47. package/dist/packem_chunks/handler65.js +1 -1
  48. package/dist/packem_chunks/handler66.js +1 -1
  49. package/dist/packem_chunks/handler67.js +1 -1
  50. package/dist/packem_chunks/handler68.js +1 -1
  51. package/dist/packem_chunks/handler69.js +1 -1
  52. package/dist/packem_chunks/handler7.js +1 -1
  53. package/dist/packem_chunks/handler70.js +1 -1
  54. package/dist/packem_chunks/handler71.js +1 -1
  55. package/dist/packem_chunks/handler72.js +1 -1
  56. package/dist/packem_chunks/handler73.js +1 -1
  57. package/dist/packem_chunks/handler74.js +1 -1
  58. package/dist/packem_chunks/handler75.js +1 -1
  59. package/dist/packem_chunks/handler76.js +1 -1
  60. package/dist/packem_chunks/handler77.js +1 -1
  61. package/dist/packem_chunks/handler78.js +1 -1
  62. package/dist/packem_chunks/handler79.js +1 -1
  63. package/dist/packem_chunks/handler8.js +1 -1
  64. package/dist/packem_chunks/heal.js +1 -1
  65. package/dist/packem_chunks/help-command.js +1 -1
  66. package/dist/packem_chunks/index3.js +28 -35
  67. package/dist/packem_chunks/index5.js +140 -801
  68. package/dist/packem_chunks/index6.js +801 -140
  69. package/dist/packem_chunks/index7.js +1 -1
  70. package/dist/packem_chunks/keys-refresh.js +1 -1
  71. package/dist/packem_chunks/list.js +1 -1
  72. package/dist/packem_chunks/native-addon.js +12 -0
  73. package/dist/packem_chunks/prune.js +1 -1
  74. package/dist/packem_chunks/python-plan.js +1 -1
  75. package/dist/packem_chunks/python-projects.js +1 -1
  76. package/dist/packem_chunks/python.js +1 -1
  77. package/dist/packem_chunks/snapshot.js +2 -2
  78. package/dist/packem_chunks/status.js +1 -1
  79. package/dist/packem_chunks/sync.js +1 -1
  80. package/dist/packem_chunks/sync2.js +1 -1
  81. package/dist/packem_chunks/tripwire.js +1 -1
  82. package/dist/packem_chunks/verify-lockfile.js +1 -1
  83. package/dist/packem_chunks/version-resolver.js +1 -1
  84. package/dist/packem_chunks/workspace.js +1 -1
  85. package/dist/packem_shared/{ReleaseClient-DaoIXjdn.js → ReleaseClient-PVB_2PkQ.js} +1 -1
  86. package/dist/packem_shared/{advisories-DPfjSK6L.js → advisories-D6O8_7q8.js} +1 -1
  87. package/dist/packem_shared/{affected-selection-CEH0nr7L.js → affected-selection-pzrz7Up4.js} +1 -1
  88. package/dist/packem_shared/{ai-analysis-_x1ObDrt.js → ai-analysis-BEP03Gjy.js} +1 -1
  89. package/dist/packem_shared/{ai-cache-CDnuFo2o.js → ai-cache-CMlW-WEd.js} +1 -1
  90. package/dist/packem_shared/{ai-fix-DFlK168W.js → ai-fix-CVwgqleW.js} +1 -1
  91. package/dist/packem_shared/apply-VwWv8q05.js +8 -0
  92. package/dist/packem_shared/apply-release-plan-DdhDICdO.js +16 -0
  93. package/dist/packem_shared/{bin-IOaJHdvM.js → bin-CJlwiuPF.js} +1 -1
  94. package/dist/packem_shared/{build-scripts-udyGO2o_.js → build-scripts-BwIDu1P_.js} +1 -1
  95. package/dist/packem_shared/createVersionActions-GD1Y4pNe.js +1 -0
  96. package/dist/packem_shared/{dependency-scan-BtbCm8-s.js → dependency-scan-DrHMLDiM.js} +1 -1
  97. package/dist/packem_shared/{detect-859xRNqW.js → detect-C5tXtm2Z.js} +1 -1
  98. package/dist/packem_shared/{docker-C6KwNzQN.js → docker-APhsTulj.js} +1 -1
  99. package/dist/packem_shared/{ecosystem-gate-DOQpvPpW.js → ecosystem-gate-3nxiOrV7.js} +1 -1
  100. package/dist/packem_shared/{env-consistency-CPPb-xcn.js → env-consistency-Ds8_I0jB.js} +1 -1
  101. package/dist/packem_shared/{env-CK7L59IV.js → env-s78xWj4f.js} +1 -1
  102. package/dist/packem_shared/{failure-log-DeV1UYXh.js → failure-log-BegnAuGN.js} +1 -1
  103. package/dist/packem_shared/glob-Cyk1H9ZL-DfmRDyDG.js +1 -0
  104. package/dist/packem_shared/{index-SMwaTj0E.js → index-Dd7nwlNK.js} +1 -1
  105. package/dist/packem_shared/{index-D4AA8lkJ.js → index-Dp8XCka-.js} +1 -1
  106. package/dist/packem_shared/{lifecycle-Bh4g1Nw5.js → lifecycle-hseoB2PD.js} +1 -1
  107. package/dist/packem_shared/{manifests-DwbazsLq.js → manifests-DOxbsC47.js} +1 -1
  108. package/dist/packem_shared/{min-release-age-CdwchJ9y.js → min-release-age-CZvwRysw.js} +1 -1
  109. package/dist/packem_shared/{missing-package-json-C1471EYw.js → missing-package-json-CRA6kB_n.js} +1 -1
  110. package/dist/packem_shared/{multi-eco-lockfiles-BLuR5c-0.js → multi-eco-lockfiles-B8LKE3Z3.js} +1 -1
  111. package/dist/packem_shared/{native-config-sync-DfJbQPjx.js → native-config-sync-g2U55rGC.js} +1 -1
  112. package/dist/packem_shared/{osv-BOHJQmTi.js → osv-CieXV1_R.js} +1 -1
  113. package/dist/packem_shared/{package-version-CKOVJRf5.js → package-version-C9FT1f_V.js} +1 -1
  114. package/dist/packem_shared/{packument-B9mRtyX_.js → packument-DqZjBn3G.js} +1 -1
  115. package/dist/packem_shared/{project-name-filter-D2BnruR3.js → project-name-filter-60HYlbnm.js} +1 -1
  116. package/dist/packem_shared/{provenance-0_jMjBFB.js → provenance-BgNSfq5T.js} +1 -1
  117. package/dist/packem_shared/publish-missing-BbE62Cqp.js +35 -0
  118. package/dist/packem_shared/{registry-qnmM5zts.js → registry-BC__sZgy.js} +1 -1
  119. package/dist/packem_shared/{registry-keys-B8v0maMC.js → registry-keys-DQttOEKV.js} +1 -1
  120. package/dist/packem_shared/{renderToString-DR0zDUjh-CXoq9r5t.js → renderToString-DR0zDUjh-D2XYc9RB.js} +1 -1
  121. package/dist/packem_shared/{resolve-explicit-h-OAowPZ.js → resolve-explicit-Bh0I2Eeh.js} +1 -1
  122. package/dist/packem_shared/{run-summary-utils-B9iTtwWX.js → run-summary-utils-CDfttQa9.js} +1 -1
  123. package/dist/packem_shared/{runtime-check-BAP6OdMD.js → runtime-check-DF6jeQlZ.js} +1 -1
  124. package/dist/packem_shared/{s1ngularity-BEgUeVZN.js → s1ngularity-Dm0eZv4j.js} +1 -1
  125. package/dist/packem_shared/{scaffold-files-Hxak1SJe.js → scaffold-files-Cwp0HYeD.js} +1 -1
  126. package/dist/packem_shared/{scan-progress-DWNXvT3O.js → scan-progress-DpjrzZsZ.js} +1 -1
  127. package/dist/packem_shared/{selectors-a5O0ZJuW.js → selectors-D3cD94dM.js} +1 -1
  128. package/dist/packem_shared/{signatures-WNCS80My.js → signatures-CVJYTORu.js} +1 -1
  129. package/dist/packem_shared/{spinner-D0API6jF.js → spinner-Kqk6UZwr.js} +1 -1
  130. package/dist/packem_shared/{table-Bl_qTZDf.js → table-BDPKuUgn.js} +1 -1
  131. package/dist/packem_shared/{tabs-ApX_AMUl.js → tabs-xU0YiQZD.js} +1 -1
  132. package/dist/packem_shared/{toolchain-De9sHJyE.js → toolchain-CCm1qaKl.js} +1 -1
  133. package/dist/packem_shared/{typosquats-DxV7JosT.js → typosquats-C0GLxAf9.js} +1 -1
  134. package/dist/packem_shared/{use-measured-height-T4XFSNby.js → use-measured-height-DbDsK33L.js} +1 -1
  135. package/dist/packem_shared/{vis-update-app-DabaMe5c.js → vis-update-app-Byt2SgRv.js} +1 -1
  136. package/dist/packem_shared/{vis-user-error-xjSn62_Z.js → vis-user-error-D8_nt9Ay.js} +1 -1
  137. package/dist/packem_shared/{watch-loop-B1eIlmKa.js → watch-loop-BccjAm0o.js} +1 -1
  138. package/dist/release/index.js +1 -1
  139. package/index.js +26 -26
  140. package/package.json +9 -9
  141. package/dist/packem_chunks/cargo-lock.js +0 -5
  142. package/dist/packem_chunks/catalog2.js +0 -11
  143. package/dist/packem_shared/apply-DA-Dv8Pq.js +0 -8
  144. package/dist/packem_shared/apply-release-plan-BZ_E8GXQ.js +0 -15
  145. package/dist/packem_shared/clean-package-json-rutwkKl-.js +0 -1
  146. package/dist/packem_shared/createVersionActions-DXo4z8VN.js +0 -1
  147. package/dist/packem_shared/glob-Cyk1H9ZL-Dl3N7_h2.js +0 -1
  148. package/dist/packem_shared/publish-missing-Df39xUBX.js +0 -35
@@ -1,15 +0,0 @@
1
- import{s as h}from"./index--eV4qIz5.js";import{VisReleaseError as E}from"./VisReleaseError-DZtgcKf8.js";import{c as $}from"../packem_chunks/cargo-lock.js";const w=["dependencies","devDependencies","peerDependencies","optionalDependencies"],y=(e,t)=>{if(e.startsWith("catalog:")||e==="*"||e==="workspace:*"||e==="workspace:^"||e==="workspace:~")return e;if(e.startsWith("workspace:")){const n=e.slice(10);return`workspace:${m(n)}${t}`}if(e.startsWith("npm:")){const n=e.lastIndexOf("@");if(n<=4)return e;const i=e.slice(4,n),r=e.slice(n+1),c=m(r);return`npm:${i}@${c}${t}`}return`${m(e)}${t}`},P=/^([\^~=]|>=?|<=?)/,m=e=>{const t=P.exec(e);return t?t[1]??"^":"^"},D=/^[\^~=]?\s*v?\d+\.\d+\.\d+(?:-[\w.-]+)?(?:\+[\w.-]+)?$/,C=(e,t,s="rewrite",n={})=>{const i=s==="preserve-satisfying"?$(e):null;if(i===null||D.test(i.trim())||h.validRange(i)===null)return y(e,t);if(h.satisfies(t,i))return e;const r=i.split("||").map(a=>a.trim()),c=r.findIndex(a=>h.satisfies(t,a,{includePrerelease:!0}));if(c===-1){const a=n.dependent?` in ${n.dependent}'s ${n.kind??"dependencies"}`:"";throw new E({code:"DEPENDENCY_RANGE_EXCEEDED",hint:'Widen the range by hand (or set `internalDependencyRanges: "rewrite"`), then re-run the release.',message:`${n.depName??"dependency"}@${t} is outside "${e}"${a}; refusing to rewrite the range.`,packageName:n.dependent})}const p=(new h.Range(r[c]).set[0]??[]).filter(a=>a.operator.startsWith("<")).map(a=>a.value);return r[c]=[`>=${t}`,...p].join(" "),`${e.slice(0,e.length-i.length)}${r.join(" || ")}`},A=async(e,t,s={})=>{const n=s.serializeManifest??_,i=s.changelogPath??M,r=s.renderChangelogEntry??S,c=new Map(e.releases.map(o=>[o.name,o.newVersion])),p=await Promise.all(e.releases.map(async o=>{const l=t.getPackage(o.name);if(!l)return;const d=k(l.manifest,o.newVersion,c,s.internalDependencyRanges),g=s.readManifest?.(l.manifestPath),u=i(l);return{changelogEntry:await r(o),changelogPath:u,manifestWrite:l.ecosystem===void 0?{content:n(d,g),path:l.manifestPath}:void 0}})),a=[],f=new Map;for(const o of p){if(!o)continue;o.manifestWrite&&a.push(o.manifestWrite);const l=f.get(o.changelogPath);l?l.push(o.changelogEntry):f.set(o.changelogPath,[o.changelogEntry])}for(const[o,l]of f){const d=l.join(`
2
-
3
- `),g=s.readChangelog?.(o);a.push({content:W(d,g),path:o})}return{deletions:e.consumedChangeFiles.map(o=>o.path),writes:a}},k=(e,t,s,n)=>{const i={...e,version:t};for(const r of w){const c=e[r];if(!c||typeof c!="object")continue;const p={...c};let a=!1;for(const[f,o]of Object.entries(c)){const l=s.get(f);if(l===void 0)continue;const d=C(o,l,n,{dependent:e.name,depName:f,kind:r});d!==o&&(p[f]=d,a=!0)}a&&(i[r]=p)}return i},v=/^# .+/,N=/^## /m,W=(e,t)=>{const s=e.trim();if(!t||t.trim()==="")return`# Changelog
4
-
5
- ${s}
6
- `;const n=t.split(/\r?\n/);if(n[0]&&v.test(n[0])){let i=1;for(;i<n.length&&!(n[i]??"").startsWith("## ");)i+=1;const r=n.slice(0,i),c=n.slice(i);return r.length>0&&r[r.length-1]!==""&&r.push(""),[...r,s,"",...c].join(`
7
- `).replaceAll(/\n{3,}/g,`
8
-
9
- `)}return N.test(t)?`${s}
10
-
11
- ${t.trimStart()}`:`${s}
12
-
13
- ${t.trimStart()}`},_=(e,t)=>{const s=b(t);return`${JSON.stringify(e,null,s)}
14
- `},b=e=>{if(!e)return 4;const t=/\n(\s+)"/.exec(e);if(!t)return 4;const s=(t[1]??"").length;return s===2||s===4?s:4},M=e=>`${e.dir}/CHANGELOG.md`,S=e=>{const t=new Date().toISOString().slice(0,10),s=[`## ${e.newVersion}`,`<sub>${t}</sub>`,""];if(e.isCascadeBump||e.isGroupBump)for(const n of e.sources)s.push(`- Version bump from ${n.name}@${n.newVersion}`);else if(e.isDependencyBump&&e.changeFiles.length===0)for(const n of e.sources)n.newVersion===""?s.push(`- Removed dependency ${n.name}`):s.push(`- Updated dependency ${n.name}@${n.newVersion}`);else for(const n of e.changeFiles)for(const i of n.body.split(/\r?\n/)){if(i.trim()===""){s.push("");continue}s.push(i.startsWith("-")||i.startsWith("*")?i:`- ${i}`)}return s.join(`
15
- `)};export{A as a,W as p,y as r,C as u};
@@ -1 +0,0 @@
1
- import{resolveCleanStripList as i}from"../packem_chunks/DEFAULT_CLEAN_KEEP.js";const a=(e,o)=>{if(o===!1)return{...e};const t=new Set(i(o)),r={name:e.name,version:e.version};for(const[n,s]of Object.entries(e))t.has(n)||(r[n]=s);return r};export{a as c};
@@ -1 +0,0 @@
1
- import{c as t}from"../packem_chunks/index3.js";import"../packem_chunks/python.js";export{t as createVersionActions};
@@ -1 +0,0 @@
1
- import{I as t}from"./registry-qnmM5zts.js";const s=async(a,o)=>await t(a,o);export{s as l};
@@ -1,35 +0,0 @@
1
- import{s as I}from"./index--eV4qIz5.js";import{c as D,d as W,D as L}from"../packem_chunks/version-resolver.js";import{createTag as U,pushTags as K,resolveReleaseSource as z,renderTagPattern as J,defaultTagFor as Y}from"../packem_chunks/git.js";import{createShellRunner as _}from"../packem_chunks/shell-runner.js";import{DEFAULT_CHANGES_DIR as E}from"../packem_chunks/DEFAULT_CLEAN_KEEP.js";import{r as B,b as q}from"./apply-DA-Dv8Pq.js";import{parseCatalogs as X}from"../packem_chunks/catalog.js";import{c as Q}from"../packem_chunks/index3.js";import{a as Z}from"../packem_chunks/context.js";import{escapeMarkdown as x}from"../packem_chunks/security.js";import{VisReleaseError as F}from"./VisReleaseError-DZtgcKf8.js";const ee=/\{(name|version|previousVersion|date|repo|contributors)\}/g,se=(e,s)=>e.replaceAll(ee,(a,l)=>s[l]??""),ae=(e,s={})=>{const a=new Set;for(const n of s.internalAuthors??[]){const u=n.trim().toLowerCase().replace(/^@/,"");u.length>0&&a.add(u)}const l=new Set,r=[];for(const n of e){const u=n.meta?.author;if(u)for(const o of u.split(",")){const g=o.trim();if(!g)continue;const t=g.replace(/^@/,"");if(t.length===0)continue;const i=t.toLowerCase();l.has(i)||a.has(i)||(l.add(i),r.push(x(g)))}}return r.length===0?"":r.map(n=>`- ${n}`).join(`
2
- `)},ie=e=>e.length===0?"":`## Related releases
3
-
4
- ${e.map(a=>`- [${a.name}](${a.url})`).join(`
5
- `)}`,re=(e,s,a)=>{if(!s||!s.header&&!s.footer)return e;const l=n=>se(n,{contributors:a.contributors??"",date:a.date,name:a.name,previousVersion:a.previousVersion,repo:a.repo,version:a.version}).replaceAll(/\n{3,}/g,`
6
-
7
- `).replace(/\s+$/,""),r=[];if(s.header){const n=l(s.header);n.length>0&&r.push(n)}if(r.push(e),s.footer){const n=l(s.footer);n.length>0&&r.push(n)}return r.join(`
8
-
9
- `)},te=e=>{if(!Array.isArray(e))return;const[s,a]=e;if(s!=="github"||typeof a!="object"||a===null)return;const{internalAuthors:l}=a;if(Array.isArray(l))return l.filter(r=>typeof r=="string")},ne=e=>(e.config.publish?.publishArgs??[]).includes("--provenance")&&e.pm.id!=="bun",oe=async(e,s)=>{const{options:a,persistState:l,releases:r,result:n,state:u}=s,{removePendingStages:o,upsertPendingStages:g}=await import("../packem_chunks/staged-registry.js"),t=await e.pm.readCatalogYaml(e.cwd),i=X(t),c=e.depGraph.topologicalSort(r.map(d=>d.name)),f=new Map(r.map(d=>[d.name,d])),w=new Set,$=new Map;for(const d of e.plan.releases){const y=e.depGraph.getPackage(d.name);y&&$.set(d.name,{...y.manifest,version:d.newVersion})}const v={config:e.config,cwd:e.cwd},k=e.config.plugins?.length?await import("../packem_chunks/defineReleasePlugin.js"):void 0;for(const d of c){const y=f.get(d);if(!y){n.skipped.push({name:d,reason:"topo-sort returned a name not in the release plan (internal bug)"});continue}const b=e.depGraph.getPackage(d);if(!b)continue;const P=[...new Set(e.depGraph.getDependencies(d).filter(h=>h.kind!=="devDependencies"&&w.has(h.name)).map(h=>h.name))];if(P.length>0){n.skipped.push({name:d,reason:`dependency-failed: not published because ${P.join(", ")} failed to publish (publishing would orphan this package's dependency range)`}),w.add(d);continue}const p=e.perPackageConfig.get(d)??{},C=Z(b,p),R=a.publishActionsOverride??Q(C),m=a.tag??e.channel?.tag;if(k){const h=await k.runWillPublishHooks(v,{dir:b.dir,name:d,oldVersion:y.oldVersion,version:y.newVersion});if(h.skip){n.skipped.push({name:d,reason:`plugin-skipped${h.by?` by "${h.by}"`:""}`}),w.add(d);continue}}const T=s.stagedRegistry.pending.find(h=>h.name===d&&h.version===y.newVersion);try{const h=await R.publish({catalogs:i,cleanPackageJsonConfig:e.config.publish?.cleanPackageJson,dryRun:a.dryRun,otp:a.otp,perPackageConfig:p,pkg:b,pm:e.pm,provenance:ne(e),registry:p.registry,release:y,resumeStageId:T?.id,tag:m,versionedManifestByName:$,workspaceConfig:e.config});if(h.published||h.alreadyPublished){const S=s.stagedRegistry.pending.filter(A=>A.name===d&&A.version===y.newVersion).map(A=>A.id);S.length>0&&(s.stagedRegistry=o(s.stagedRegistry,S))}if(h.published)n.published.push({name:d,stageId:h.stageId,tarball:h.tarball,version:y.newVersion}),u.published.push(`${d}@${y.newVersion}`),k&&await k.runAfterPublishHooks(v,{dir:b.dir,name:d,oldVersion:y.oldVersion,version:y.newVersion});else if(h.alreadyPublished)n.skipped.push({name:d,reason:"already-published"}),u.published.push(`${d}@${y.newVersion}`);else if(n.skipped.push({name:d,reason:h.output??"skipped"}),h.stageId){const S=(h.output??"").startsWith("stage-rejected")?"rejected":"timeout";s.stagedRegistry=g(s.stagedRegistry,[{id:h.stageId,name:d,reason:S,stagedAt:new Date().toISOString(),tag:m??"latest",version:y.newVersion}])}await l()}catch(h){n.failed.push({name:d,reason:h.message}),w.add(d)}}k&&await k.runAfterPublishAllHooks(v,{failed:n.failed.map(d=>({name:d.name,reason:d.reason})),published:n.published.map(d=>({name:d.name,version:d.version})),skipped:n.skipped.map(d=>({name:d.name,reason:d.reason}))})},ge=async(e,s,a,l)=>{const{createRemoteClient:r,detectRemoteProvider:n}=await import("../packem_chunks/detect.js"),u=await n(e.cwd,a,e.config.provider),o=r(u,{githubHost:e.config.githubHost,gitlabHost:e.config.gitlabHost,httpProxy:e.config.httpProxy}),g=await o.detectRepoSlug(e.cwd,a);if(!g)return;const t=typeof e.config.aggregateRelease=="object"?e.config.aggregateRelease:{enabled:e.config.aggregateRelease===!0},i=e.config.publish?.draftRelease===!0,c=e.config.publish?.discussionCategory,f=e.config.publish?.addReleases;if(t.enabled){const p=new Date().toISOString().slice(0,10),R=(t.title??"Release {date}").replaceAll("{date}",p),m=`release-${p}`,T=s.published.map(h=>`- \`${h.name}\` → ${h.version}`).join(`
10
- `);try{const h=await o.createRelease(a,{body:T,cwd:e.cwd,discussionCategory:c,draft:i,repo:g,tag:m,title:R});if(h?.url)for(const S of s.published)S.url=h.url}catch{}return}const{defaultTagFor:w,renderTagPattern:$}=await import("../packem_chunks/git.js"),v=e.config.releaseTagPattern,k=e.channel?.tag,d=e.config.publish?.releaseAssets??{},y=new Date().toISOString().slice(0,10),b=te(e.config.changelog),P=ae(e.plan.consumedChangeFiles??[],{internalAuthors:b});for(const p of l.groups){const C=p.members.map(R=>`- \`${R}\` → ${s.published.find(m=>m.name===R)?.version??p.version}`).join(`
11
- `);try{const R=await o.createRelease(a,{body:C,cwd:e.cwd,discussionCategory:c,draft:i,prerelease:p.version.includes("-"),repo:g,tag:p.tag,title:`${p.name} ${p.version}`});if(R?.url)for(const m of s.published)p.members.includes(m.name)&&(m.url=R.url)}catch(R){console.warn(`createRelease failed for group ${p.name} (tag ${p.tag}): ${R.message}`)}}for(const p of s.published){if(l.grouped.has(p.name))continue;const R=e.perPackageConfig.get(p.name)?.releaseTagPattern??v,m=R?$(R,{channel:k,name:p.name,version:p.version}):w(p.name,p.version),T=p.version.includes("-");let h=`Release of ${p.name}@${p.version}.`;if(p.stageId&&(h=`${h}
12
-
13
- > ⏳ **Staged — not yet installable.** Approve via \`vis release stage approve ${p.stageId}\` or the npmjs.com web UI.`),d.stampHashes&&p.tarball&&(h=`${h}
14
-
15
- ### Tarball integrity
16
-
17
- - size: \`${p.tarball.size}\` bytes
18
- - sha256: \`${p.tarball.sha256}\`
19
- - sha512: \`${p.tarball.sha512}\``),f!==void 0&&f!==!1)try{const H=m.lastIndexOf("@"),N=H>0?m.slice(0,H+1):"",V=await o.listRecentReleases(a,{cwd:e.cwd,excludeTag:m,limit:5,repo:g,tagPrefix:N}),G=ie(V);G&&(h=f==="top"?`${G}
20
-
21
- ${h}`:`${h}
22
-
23
- ${G}`)}catch{}const{releaseNoteTemplate:S}=e.config;if(S){const N=e.plan.releases.find(V=>V.name===p.name)?.oldVersion??"";h=re(h,S,{contributors:P,date:y,name:p.name,previousVersion:N,repo:g,version:p.version})}const A=[];d.uploadTarball&&p.tarball&&A.push(p.tarball.path);try{const H=await o.createRelease(a,{assets:A.length>0?A:void 0,body:h,cwd:e.cwd,discussionCategory:c,draft:i,prerelease:T,repo:g,tag:m,title:`${p.name} v${p.version}`});H?.url&&(p.url=H.url)}catch(H){console.warn(`createRelease failed for ${p.name}@${p.version} (tag ${m}): ${H.message}`)}}},ce=async(e,s,a)=>{const{changesDir:l,options:r,persistState:n,result:u,runner:o,state:g}=s,{writeStagedRegistry:t}=await import("../packem_chunks/staged-registry.js");if(!r.dryRun&&u.published.length>0&&u.tagsPushed){e.config.publish?.noRelease!==!0&&await ge(e,u,o,a);try{const{walkSuccessfulRelease:i}=await import("../packem_chunks/success-walk.js"),{createRemoteClient:c,detectRemoteProvider:f}=await import("../packem_chunks/detect.js"),{resolveFormatter:w}=await import("../packem_chunks/resolveFormatter.js"),$=await f(e.cwd,o,e.config.provider),v=c($,{githubHost:e.config.githubHost,gitlabHost:e.config.gitlabHost,httpProxy:e.config.httpProxy}),k=await v.detectRepoSlug(e.cwd,o),d=await w(e.config.changelog,e.cwd),{recordRecentlyWalked:y}=await import("../packem_chunks/staged-registry.js"),b=new Set([...g.walked??[],...(s.stagedRegistry.recentlyWalked??[]).map(C=>C.key)]),P={...u,published:u.published.filter(C=>!b.has(`${C.name}@${C.version}`))},p=P.published.length>0?await i(e,P,o,{client:v,formatter:d,repo:k}):void 0;if(p?.ran===!0){const C=P.published.map(R=>`${R.name}@${R.version}`);g.walked=[...g.walked??[],...C],await n(),s.stagedRegistry=y(s.stagedRegistry,C),p.warnings.length>0&&e.plan.warnings.push(...p.warnings)}}catch(i){e.plan.warnings.push(`successWalk: could not run post-release walk: ${i.message}`)}if(e.config.notifications)try{const{dispatchNotifications:i}=await import("../packem_chunks/interface.js"),{createRemoteClient:c,detectRemoteProvider:f}=await import("../packem_chunks/detect.js"),w=await f(e.cwd,o,e.config.provider),v=await c(w,{githubHost:e.config.githubHost,gitlabHost:e.config.gitlabHost,httpProxy:e.config.httpProxy}).detectRepoSlug(e.cwd,o);let k;try{const b=`${e.cwd}/package.json`,P=await import("node:fs/promises");k=JSON.parse(await P.readFile(b,"utf8")).name}catch{}const d=new Set([...g.notified??[],...(s.stagedRegistry.recentlyNotified??[]).map(b=>b.key)]),y=u.published.filter(b=>!d.has(`${b.name}@${b.version}`));if(y.length>0){const b=await i(e.config.notifications,{channel:e.channel?.tag,completedAt:new Date().toISOString(),...k===void 0?{}:{monorepoName:k},published:y.map(P=>({name:P.name,tag:e.channel?.tag,...P.url===void 0?{}:{url:P.url},version:P.version})),...v===void 0?{}:{repo:v},skipped:u.skipped.map(P=>({name:P.name,reason:P.reason}))},{warn:P=>e.plan.warnings.push(P)});if(b.succeeded.length>0){const P=y.map(C=>`${C.name}@${C.version}`);g.notified=[...g.notified??[],...P],await n();const{recordRecentlyNotified:p}=await import("../packem_chunks/staged-registry.js");s.stagedRegistry=p(s.stagedRegistry,P)}if(b.failed.length>0||b.succeeded.length>0){const P=b.succeeded.length+b.failed.length;if(b.failed.length>0){e.plan.warnings.push(`[notifications] dispatched ${b.succeeded.length}/${P} channels${b.succeeded.length>0?` (succeeded: ${b.succeeded.join(", ")})`:""}; ${b.failed.length} failed.`);for(const p of b.failed)e.plan.warnings.push(`[notifications:${p.id}] ${p.error}`)}}}}catch(i){e.plan.warnings.push(`notifications: dispatch failed: ${i.message}`)}if(!r.dryRun)try{const i=await t(e.cwd,l,s.stagedRegistry);if(i.changed){const{stageAndCommitFile:c}=await import("../packem_chunks/git.js");try{await c({cwd:e.cwd,runner:o},i.path,"chore(release): record cross-runner notify/walk dedupe [skip ci]",{author:e.config.gitUser,push:!r.noPush&&!r.noBranchPush,sign:e.config.gitSignCommits===!0})}catch(f){process.stderr.write(`[vis release] Warning: could not commit ${i.path} (notify/walk dedupe): ${f.message}
24
- `)}}}catch(i){process.stderr.write(`[vis release] Warning: could not update cross-runner dedupe registry: ${i.message}
25
- `)}}},le=async e=>{const{defaultTagFor:s,floatingMajorTagFor:a,renderTagPattern:l}=await import("../packem_chunks/git.js"),{resolveSyncTagGroups:r}=await import("../packem_chunks/group-tags.js"),n=e.plan.releases.filter(i=>e.depGraph.getPackage(i.name)?.manifest?.private!==!0).map(i=>({name:i.name,version:i.newVersion})),u=r(e.config,n),o=u.groups.map(i=>i.tag),g=[],t=!!e.channel?.prerelease||!!e.preMode;for(const{name:i,version:c}of n){if(u.grouped.has(i))continue;const f=e.perPackageConfig.get(i),w=f?.releaseTagPattern??e.config.releaseTagPattern;if(o.push(w?l(w,{channel:e.channel?.tag,name:i,version:c}):s(i,c)),e.config.floatingMajorTag===!0&&!t&&!w?.includes("{major}")&&f?.skipNpmPublish!==!0){const $=a(i,c);$!==void 0&&g.push($)}}return{created:o,updated:g}},de=async(e,s,a)=>{if((await s.run("git",["remote","get-url","--push","origin"],{cwd:e.cwd,silent:!0})).exitCode!==0)return;const{getCurrentBranch:r,resolvePushCredentials:n,verifyPushAccess:u}=await import("../packem_chunks/git.js"),o={cwd:e.cwd,runner:s},g=await u(o);if(g!==void 0)return`Cannot push to origin, nothing was published. Set VIS_GH_TOKEN (or GITHUB_TOKEN / GITLAB_TOKEN) with write access, or pass --no-push. git said: ${g}`;const{createRemoteClient:t,detectRemoteProvider:i}=await import("../packem_chunks/detect.js");let c;try{c=await i(e.cwd,s,e.config.provider)}catch{return}if(c!=="github")return;const w=await t(c,{githubHost:e.config.githubHost,httpProxy:e.config.httpProxy}).detectRepoSlug(e.cwd,s);if(!w)return;const $=await n(o),v={...process.env};$!==void 0&&(v.GH_TOKEN=$.token),e.config.githubHost&&(v.GH_HOST=e.config.githubHost),e.config.httpProxy&&(v.HTTPS_PROXY=e.config.httpProxy,v.HTTP_PROXY=e.config.httpProxy);const{checkGithubPushRules:k}=await import("../packem_chunks/github-push-rules.js"),d=a.noTag?{created:[],updated:[]}:await le(e),y=await k(s,{branch:await r(o),createdTags:d.created,cwd:e.cwd,env:v,repo:w,signedCommits:e.config.gitSignCommits===!0,updatedTags:d.updated});for(const b of y.warnings)process.stderr.write(`[vis release] Warning: ${b}
26
- `);if(y.blocked.length>0)return`GitHub push rules would reject this release, nothing was published:
27
- - ${y.blocked.join(`
28
- - `)}
29
- Grant the pushing token a bypass, adjust the ruleset, or pass --no-push / --no-tag.`},pe=async(e,s,a,l)=>{if(!a.dryRun&&e.channel?.mode==="version-pr"){const{createRemoteClient:r,detectRemoteProvider:n}=await import("../packem_chunks/detect.js");let u;try{const g=await n(e.cwd,s,e.config.provider);u=await r(g,{githubHost:e.config.githubHost,gitlabHost:e.config.gitlabHost,httpProxy:e.config.httpProxy}).detectRepoSlug(e.cwd,s)}catch(g){return l.failed.push({name:"_preflight",reason:`Could not read the remote to check for an open release PR: ${g.message}`}),!0}const o=e.config.versionPr?.branch??"vis-release/version-packages";if(u)try{const g=await s.run("gh",["pr","list","--head",o,"--state","open","--json","number"],{cwd:e.cwd,silent:!0});if(g.exitCode===0&&g.stdout.trim()&&g.stdout.trim()!=="[]"){const t=JSON.parse(g.stdout);if(t[0])return l.failed.push({name:"_preflight",reason:`Open release PR #${t[0].number} exists. Merge or close it before publishing locally. (Override: --no-push then \`git push --tags\` manually.)`}),!0}}catch{}}if(!a.dryRun&&e.config.prePublishCommand)try{await B(e.cwd,e.config.prePublishCommand,"prePublishCommand")}catch(r){return l.failed.push({name:"_prePublishCommand",reason:r.message}),!0}if(!a.dryRun&&!a.noPush){let r;try{r=await de(e,s,{noTag:a.noTag===!0})}catch(n){return l.failed.push({name:"_preflight",reason:`Could not verify the release pushes: ${n.message}`}),!0}if(r!==void 0)return l.failed.push({name:"_pushAccess",reason:r}),!0}return!1},ue=async(e,s)=>{const{changesDir:a,options:l,runner:r}=s,{writeStagedRegistry:n}=await import("../packem_chunks/staged-registry.js");if(!l.dryRun){const u=s.priorRegistrySnapshot.pending.length,o=s.stagedRegistry.pending.length,g=await n(e.cwd,a,s.stagedRegistry);if(g.changed){const{stageAndCommitFile:t}=await import("../packem_chunks/git.js");let i;if(g.removed)i="chore(release): clear pending stage registry [skip ci]";else if(o>u){const c=o-u;i=`chore(release): record ${c} new pending stage${c===1?"":"s"} [skip ci]`}else if(o<u){const c=u-o;i=`chore(release): drain ${c} resolved stage${c===1?"":"s"} [skip ci]`}else i=`chore(release): update pending stage registry (${o} pending) [skip ci]`;try{await t({cwd:e.cwd,runner:r},g.path,i,{author:e.config.gitUser,push:!l.noPush&&!l.noBranchPush,sign:e.config.gitSignCommits===!0})}catch(c){process.stderr.write(`[vis release] Warning: could not commit ${g.path}: ${c.message}
30
- `)}}}},he=async(e,s)=>{const{options:a,result:l,runner:r}=s;if(!a.dryRun&&l.published.length>0&&e.config.workspaceChangelog!==!1){const n=e.config.workspaceChangelog,u=typeof n=="object"?n:void 0,o=typeof e.config.aggregateRelease=="object"?e.config.aggregateRelease.enabled:e.config.aggregateRelease===!0;if(u!==void 0||o)try{const{writeWorkspaceChangelogWave:g}=await import("../packem_chunks/workspace.js"),t=new Set(l.published.map(f=>f.name)),i=e.plan.releases.filter(f=>t.has(f.name)),c=await g({changelogConfig:e.config.changelog,cwd:e.cwd,workspaceChangelog:e.config.workspaceChangelog},i);if(c)try{const{stageAndCommitFile:f}=await import("../packem_chunks/git.js");await f({cwd:e.cwd,runner:r},c,"chore(release): record wave [skip ci]",{author:e.config.gitUser,push:!a.noPush&&!a.noBranchPush,sign:e.config.gitSignCommits===!0})}catch(f){process.stderr.write(`[vis release] Warning: could not commit workspace CHANGELOG.md: ${f.message}
31
- `)}}catch(g){process.stderr.write(`[vis release] Warning: could not write workspace CHANGELOG.md wave entry: ${g.message}
32
- `)}}},O=async(e,s,a,l,r)=>{const{stageAndCommitFile:n}=await import("../packem_chunks/git.js"),{stateFilePath:u}=await import("../packem_chunks/state.js");try{const o=await n({cwd:e.cwd,runner:s},u(e.cwd,a,!0),`chore(release): ${l} publish lock [skip ci]`,{author:e.config.gitUser,push:!r.noPush,sign:e.config.gitSignCommits===!0});!r.noPush&&o.committed&&!o.pushed&&process.stderr.write(`[vis release] Warning: publish lock (${l}) was committed locally but could not be pushed — cross-runner resume may use a stale lock.
33
- `)}catch(o){process.stderr.write(`[vis release] Warning: could not commit publish lock (${l}): ${o.message}
34
- `)}},fe=async(e,s,a,l)=>{const{filterPlanByState:r,newState:n,readState:u,writeState:o}=await import("../packem_chunks/state.js"),{readStagedRegistry:g}=await import("../packem_chunks/staged-registry.js"),t=e.config.changesDir??E,i=e.config.publish?.lockInGit===!0;let c=a.resume||i?await u(e.cwd,t,i):void 0;c&&i&&(c.channel=e.channel?.tag);const f=async()=>{a.dryRun||!c||(await o(e.cwd,t,c,i),i&&await O(e,s,t,"progress",{noPush:a.noPush||a.noBranchPush}))};let w=await g(e.cwd,t);await q(e,"publish",w,{runner:s}),w=await g(e.cwd,t);const $={...w,pending:[...w.pending]};let{releases:v}=e.plan;return c?v=r(v,c):(c=n(e.channel?.tag,e.plan.releases),a.dryRun||(await o(e.cwd,t,c,i),i&&await O(e,s,t,"open",{noPush:a.noPush||a.noBranchPush}))),{changesDir:t,lockInGit:i,options:a,persistState:f,priorRegistrySnapshot:$,releases:v,result:l,runner:s,stagedRegistry:w,state:c}},me=async(e,s,a)=>{const{changesDir:l,lockInGit:r,options:n,persistState:u,result:o,runner:g,state:t}=s,{clearState:i}=await import("../packem_chunks/state.js");if(!n.dryRun&&!n.noTag&&o.published.length>0){const{createOrUpdateFloatingTag:c,createTag:f,defaultTagFor:w,floatingMajorTagFor:$,pushTags:v,renderTagPattern:k,resolveReleaseSource:d}=await import("../packem_chunks/git.js");let y;try{y=n.defaultTagTarget??(e.config.tagTarget==="source"?await d({cwd:e.cwd,runner:g}):void 0)}catch(m){o.failed.push({name:"_tagTarget",reason:m.message}),await u();return}const b=[],P=e.config.releaseTagPattern,p=e.channel?.tag,C=e.config.floatingMajorTag===!0,R=!!e.channel?.prerelease||!!e.preMode;for(const{name:m,version:T}of o.published){if(a.grouped.has(m))continue;const S=e.perPackageConfig.get(m)?.releaseTagPattern??P,A=S?k(S,{channel:p,name:m,version:T}):w(m,T);try{await f({cwd:e.cwd,runner:g},A,`Release ${m}@${T}`,{signing:e.config.signing,skipRemoteCheck:e.firstRelease,target:n.tagTargets?.get(m)??y}),o.tags.push(A)}catch(j){e.firstRelease&&j instanceof F&&j.code==="TAG_COLLISION"?o.skipped.push({name:A,reason:"tag-creation: tag already exists (first-release — skipped)"}):o.failed.push({name:A,reason:`tag-creation: ${j.message}`})}const H=e.depGraph.getPackage(m),N=e.perPackageConfig.get(m),V=H?.manifest?.private===!0,G=N?.skipNpmPublish===!0;if(C&&!R&&!S?.includes("{major}")&&!V&&!G){const j=$(m,T);if(j!==void 0)try{await c({cwd:e.cwd,runner:g},j,{push:!1,signing:e.config.signing,target:y}),b.push(`+refs/tags/${j}:refs/tags/${j}`),o.tags.push(j)}catch(M){o.skipped.push({name:j,reason:`floating-major-tag: ${M.message}`})}}}for(const m of a.groups)try{await f({cwd:e.cwd,runner:g},m.tag,`Release ${m.name} ${m.version}`,{signing:e.config.signing,skipRemoteCheck:e.firstRelease,target:y}),o.tags.push(m.tag)}catch(T){e.firstRelease&&T instanceof F&&T.code==="TAG_COLLISION"?o.skipped.push({name:m.tag,reason:"tag-creation: tag already exists (first-release — skipped)"}):o.failed.push({name:m.tag,reason:`tag-creation: ${T.message}`})}if(!n.noPush&&o.tags.length>0)try{await v({cwd:e.cwd,runner:g},{refspecs:b}),o.tagsPushed=!0}catch(m){o.tagsPushed=!1,o.failed.push({name:"_pushTags",reason:`git push --tags failed: ${m.message}. Retry with: git push --tags`})}t.tagged=[...o.tags],t.pushed=o.tagsPushed,await u(),o.failed.length===0&&!n.dryRun&&(await i(e.cwd,l,r),r&&await O(e,g,l,"close",{noPush:n.noPush||n.noBranchPush}))}},we=async(e,s={})=>{const a={failed:[],published:[],skipped:[],tags:[],tagsPushed:!1},l=_();if(e.plan.releases.length===0||await pe(e,l,s,a))return a;const r=e.config.changesDir??E,{acquireLock:n,releaseLock:u}=await import("../packem_chunks/state.js");let o=!1;if(!s.dryRun)try{await n(e.cwd,r),o=!0}catch(g){return a.failed.push({name:"_lock",reason:g.message}),a}try{const g=await fe(e,l,s,a);await oe(e,g);const{resolveSyncTagGroups:t}=await import("../packem_chunks/group-tags.js"),i=t(e.config,a.published);if(await me(e,g,i),await ue(e,g),await he(e,g),await ce(e,g,i),!s.dryRun&&e.config.postPublishCommand)try{await B(e.cwd,e.config.postPublishCommand,"postPublishCommand")}catch(c){a.failed.push({name:"_postPublishCommand",reason:c.message})}return a}finally{o&&await u(e.cwd,r)}},be=(e,s)=>async(a,l,r)=>{const n=["view",`${a.name}@${l}`,"version"];r&&n.push("--registry",r);const u=await e.run("npm",n,{cwd:s,silent:!0});return u.exitCode===0?u.stdout.trim()!=="":/\bE404\b/.test(`${u.stdout}
35
- ${u.stderr}`)?!1:void 0},ye=async(e,s,a)=>{const l=await e.run("git",["log","-1","--format=%H%x00%s",String.raw`-G"version"[[:space:]]*:`,"--",a],{cwd:s,silent:!0}),[r,n]=l.stdout.trim().split("\0");return l.exitCode===0&&r?{sha:r,subject:n??""}:void 0},Pe=async(e,s={})=>{const a=s.runner??_(),l=s.registryProbe??be(a,e.cwd),r={missing:[],skipped:[]},n=e.config.versionPr?.title??"🚀 Versioned release",u=t=>t.startsWith(n)||L.some(i=>i.test(t)),{default:o}=await import("../packem_chunks/index.js"),g=s.projects??[];for(const t of e.packages){const i=e.perPackageConfig.get(t.name);if(t.ecosystem!==void 0||t.private||i?.skipNpmPublish===!0||!I.valid(t.version)||g.length>0&&!g.some(d=>d===t.name||o(d,t.name)))continue;const c=await W(t,"git-tag",e.depGraph,{channelPrerelease:e.channelPrerelease,cwd:e.cwd,perPackageConfig:i,pm:e.pm,runner:a,workspaceConfig:e.config});if(c.resolvedFrom!=="git-tag"||!I.gt(t.version,c.version))continue;const f=d=>{r.skipped.push({name:t.name,reason:`${t.version} is untagged but ${d}`})},w=await ye(a,e.cwd,t.manifestPath);if(!w){f("the commit that set it could not be found");continue}if(!u(w.subject)){f(`it was set by ${w.sha.slice(0,7)} ("${w.subject}"), which is not a release commit`);continue}if((await a.run("git",["diff","--quiet",w.sha,"--",t.dir],{cwd:e.cwd,silent:!0})).exitCode!==0){f(`${t.dir} changed since ${w.sha.slice(0,7)}; the next release covers it`);continue}const v=await l(t,t.version,i?.registry);if(v===void 0){f("the registry could not confirm whether it is published");continue}let k;try{k=await z({cwd:e.cwd,runner:a},w.sha)??w.sha}catch(d){f(d.message);continue}r.missing.push({commit:w.sha,name:t.name,onRegistry:v,previousVersion:c.version,target:k,version:t.version})}return r},ve=(e,s,a)=>{const l=e.perPackageConfig.get(s)?.releaseTagPattern??e.config.releaseTagPattern;return l?J(l,{channel:e.channel?.tag,name:s,version:a}):Y(s,a)},ke=(e,s)=>{const a=I.diff(e,s);return a==="major"||a==="premajor"?"major":a==="minor"||a==="preminor"?"minor":"patch"},Ie=async(e,s={})=>{const a=_(),l=await Pe(e,{projects:s.projects,registryProbe:s.registryProbe,runner:a}),r={completed:[],failed:[],missing:l.missing,published:[],skipped:[...l.skipped],tags:[],tagsPushed:!1,warnings:[...e.plan.warnings]};l.missing.length>0&&D();const n=l.missing.filter(t=>!t.onRegistry),u=l.missing.filter(t=>t.onRegistry);if(n.length>0){const t=n.map(c=>({changeFiles:[],isCascadeBump:!1,isDependencyBump:!1,isGroupBump:!1,name:c.name,newVersion:c.version,oldVersion:c.previousVersion,reasons:[],sources:[],type:ke(c.previousVersion,c.version)})),i=await we({...e,plan:{consumedChangeFiles:[],releases:t,warnings:r.warnings}},{...s,tagTargets:new Map(n.map(c=>[c.name,c.target]))});r.failed.push(...i.failed),r.published.push(...i.published),r.completed.push(...n.filter(c=>i.published.some(f=>f.name===c.name&&f.version===c.version))),r.skipped.push(...i.skipped),r.tags.push(...i.tags),r.tagsPushed=i.tagsPushed}if(u.length===0||s.dryRun||s.noTag)return r;const o=[],g=[];for(const t of u){const i=ve(e,t.name,t.version);try{await U({cwd:e.cwd,runner:a},i,`Release ${t.name}@${t.version}`,{signing:e.config.signing,target:t.target}),o.push(i),g.push(t),r.skipped.push({name:t.name,reason:`already-published: tagged ${i}`})}catch(c){r.failed.push({name:i,reason:`tag-creation: ${c.message}`})}}if(r.tags.push(...o),o.length>0&&!s.noPush)try{await K({cwd:e.cwd,runner:a}),r.tagsPushed=!0}catch(t){r.tagsPushed=!1,r.failed.push({name:"_pushTags",reason:`git push --tags failed: ${t.message}. Retry with: git push --tags`})}return(s.noPush||r.tagsPushed)&&r.completed.push(...g),r};export{we as a,Ie as p};