@visulima/vis 4.2.0 → 4.3.1

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 (215) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/LICENSE.md +55 -129
  3. package/dist/bin.js +1 -1
  4. package/dist/binx.js +1 -1
  5. package/dist/config/index.d.ts +96 -0
  6. package/dist/packem_chunks/CONFIG_FILES.js +3 -3
  7. package/dist/packem_chunks/bloom-status.js +1 -1
  8. package/dist/packem_chunks/bloom-sync.js +1 -1
  9. package/dist/packem_chunks/cargo-plan.js +3 -0
  10. package/dist/packem_chunks/catalog.js +51 -48
  11. package/dist/packem_chunks/cli-exec.js +1 -1
  12. package/dist/packem_chunks/cli-main.js +164 -164
  13. package/dist/packem_chunks/composer-projects.js +2 -0
  14. package/dist/packem_chunks/dart-plan.js +1 -0
  15. package/dist/packem_chunks/dart-projects.js +1 -0
  16. package/dist/packem_chunks/dispatch.js +1 -1
  17. package/dist/packem_chunks/fix.js +8 -8
  18. package/dist/packem_chunks/gem-plan.js +2 -0
  19. package/dist/packem_chunks/gem-projects.js +1 -0
  20. package/dist/packem_chunks/git.js +5 -5
  21. package/dist/packem_chunks/go-plan.js +1 -0
  22. package/dist/packem_chunks/go-projects.js +2 -0
  23. package/dist/packem_chunks/gradle-plan.js +1 -0
  24. package/dist/packem_chunks/handler.js +1 -1
  25. package/dist/packem_chunks/handler10.js +3 -3
  26. package/dist/packem_chunks/handler11.js +1 -1
  27. package/dist/packem_chunks/handler12.js +2 -2
  28. package/dist/packem_chunks/handler13.js +1 -1
  29. package/dist/packem_chunks/handler14.js +1 -1
  30. package/dist/packem_chunks/handler15.js +1 -1
  31. package/dist/packem_chunks/handler16.js +1 -1
  32. package/dist/packem_chunks/handler17.js +1 -1
  33. package/dist/packem_chunks/handler18.js +1 -1
  34. package/dist/packem_chunks/handler19.js +1 -1
  35. package/dist/packem_chunks/handler2.js +1 -1
  36. package/dist/packem_chunks/handler20.js +2 -2
  37. package/dist/packem_chunks/handler21.js +1 -1
  38. package/dist/packem_chunks/handler22.js +1 -1
  39. package/dist/packem_chunks/handler23.js +1 -1
  40. package/dist/packem_chunks/handler24.js +1 -1
  41. package/dist/packem_chunks/handler26.js +1 -1
  42. package/dist/packem_chunks/handler27.js +1 -1
  43. package/dist/packem_chunks/handler28.js +1 -1
  44. package/dist/packem_chunks/handler29.js +1 -1
  45. package/dist/packem_chunks/handler3.js +1 -1
  46. package/dist/packem_chunks/handler30.js +1 -1
  47. package/dist/packem_chunks/handler39.js +6 -6
  48. package/dist/packem_chunks/handler4.js +3 -3
  49. package/dist/packem_chunks/handler5.js +2 -2
  50. package/dist/packem_chunks/handler50.js +1 -1
  51. package/dist/packem_chunks/handler51.js +1 -1
  52. package/dist/packem_chunks/handler53.js +1 -1
  53. package/dist/packem_chunks/handler54.js +2 -2
  54. package/dist/packem_chunks/handler55.js +1 -1
  55. package/dist/packem_chunks/handler58.js +2 -2
  56. package/dist/packem_chunks/handler59.js +1 -1
  57. package/dist/packem_chunks/handler6.js +7 -7
  58. package/dist/packem_chunks/handler60.js +8 -8
  59. package/dist/packem_chunks/handler61.js +1 -1
  60. package/dist/packem_chunks/handler62.js +16 -16
  61. package/dist/packem_chunks/handler63.js +2 -2
  62. package/dist/packem_chunks/handler64.js +1 -1
  63. package/dist/packem_chunks/handler65.js +3 -3
  64. package/dist/packem_chunks/handler66.js +2 -2
  65. package/dist/packem_chunks/handler67.js +3 -3
  66. package/dist/packem_chunks/handler68.js +4 -4
  67. package/dist/packem_chunks/handler69.js +3 -3
  68. package/dist/packem_chunks/handler7.js +1 -1
  69. package/dist/packem_chunks/handler70.js +5 -5
  70. package/dist/packem_chunks/handler71.js +5 -5
  71. package/dist/packem_chunks/handler72.js +2 -2
  72. package/dist/packem_chunks/handler73.js +87 -86
  73. package/dist/packem_chunks/handler74.js +1 -1
  74. package/dist/packem_chunks/handler75.js +23 -23
  75. package/dist/packem_chunks/handler76.js +6 -6
  76. package/dist/packem_chunks/handler77.js +2 -2
  77. package/dist/packem_chunks/handler78.js +19 -19
  78. package/dist/packem_chunks/handler8.js +1 -1
  79. package/dist/packem_chunks/handler9.js +1 -1
  80. package/dist/packem_chunks/heal-accept.js +1 -1
  81. package/dist/packem_chunks/heal.js +1 -1
  82. package/dist/packem_chunks/help-command.js +7 -7
  83. package/dist/packem_chunks/hex-plan.js +3 -0
  84. package/dist/packem_chunks/hex-projects.js +1 -0
  85. package/dist/packem_chunks/index2.js +52 -42
  86. package/dist/packem_chunks/index4.js +58 -802
  87. package/dist/packem_chunks/index5.js +802 -7
  88. package/dist/packem_chunks/index6.js +7 -58
  89. package/dist/packem_chunks/keys-refresh.js +1 -1
  90. package/dist/packem_chunks/lean.js +1 -1
  91. package/dist/packem_chunks/list.js +2 -2
  92. package/dist/packem_chunks/loader.js +1 -1
  93. package/dist/packem_chunks/maven-plan.js +1 -0
  94. package/dist/packem_chunks/maven-projects.js +1 -0
  95. package/dist/packem_chunks/nuget-plan.js +1 -0
  96. package/dist/packem_chunks/nuget-projects.js +1 -0
  97. package/dist/packem_chunks/orchestrator.js +33 -33
  98. package/dist/packem_chunks/prune.js +1 -1
  99. package/dist/packem_chunks/python-plan.js +3 -0
  100. package/dist/packem_chunks/python-projects.js +1 -0
  101. package/dist/packem_chunks/run.js +1 -1
  102. package/dist/packem_chunks/security.js +1 -1
  103. package/dist/packem_chunks/snapshot.js +2 -2
  104. package/dist/packem_chunks/status.js +1 -1
  105. package/dist/packem_chunks/swift-projects.js +1 -0
  106. package/dist/packem_chunks/sync.js +3 -2
  107. package/dist/packem_chunks/sync2.js +1 -1
  108. package/dist/packem_chunks/tripwire.js +2 -2
  109. package/dist/packem_chunks/ts-loader.js +5 -5
  110. package/dist/packem_chunks/verify-lockfile.js +2 -2
  111. package/dist/packem_chunks/version-resolver.js +3 -3
  112. package/dist/packem_chunks/zig-plan.js +1 -0
  113. package/dist/packem_chunks/zig-projects.js +1 -0
  114. package/dist/packem_shared/{affected-selection-M7riOi5-.js → affected-selection-D4giBK2X.js} +1 -1
  115. package/dist/packem_shared/{affected-shas-CAwpSPmP.js → affected-shas-B2V84O0g.js} +1 -1
  116. package/dist/packem_shared/{ai-analysis-DSQQDFU9.js → ai-analysis-pldoS_N4.js} +2 -2
  117. package/dist/packem_shared/{ai-fix-BTm1Z5og.js → ai-fix-BC6aIRJT.js} +4 -4
  118. package/dist/packem_shared/{augment-CBv1hwMR.js → augment-B9kSZuvW.js} +1 -1
  119. package/dist/packem_shared/{bin-Cbs_ix6l.js → bin-C1XKj-O-.js} +1 -1
  120. package/dist/packem_shared/build-scripts-CEDx_nJp.js +1 -0
  121. package/dist/packem_shared/{command-runtime-BD-4UmPB.js → command-runtime-p4IXiIf6.js} +1 -1
  122. package/dist/packem_shared/composer-DR3D-Psb.js +1 -0
  123. package/dist/packem_shared/dart-pubspec-BK_cK2EP.js +2 -0
  124. package/dist/packem_shared/dependency-scan-B8jroa1D.js +1 -0
  125. package/dist/packem_shared/{docker-1jgKW5Wd.js → docker-DXqV-07f.js} +3 -3
  126. package/dist/packem_shared/ecosystem-gate-ddru_hOg.js +6 -0
  127. package/dist/packem_shared/failure-log-D2x5BT8S.js +2 -0
  128. package/dist/packem_shared/formatBytes-BHAzNIrn-CrusHOew.js +4 -0
  129. package/dist/packem_shared/gemspec-K7N05xxc.js +3 -0
  130. package/dist/packem_shared/go-modules-BsVqtyeC.js +1 -0
  131. package/dist/packem_shared/gradle-build-CHZDHyjI.js +8 -0
  132. package/dist/packem_shared/index-BzhrR_iC.js +22 -0
  133. package/dist/packem_shared/index-Chje3u9v.js +1 -0
  134. package/dist/packem_shared/{index-Cq-J2MdB.js → index-DQ2GJzmy.js} +1 -1
  135. package/dist/packem_shared/{isAccessibleSync-DYKTrrvc-K2xhg6sV.js → isAccessibleSync-DYKTrrvc-C-_5cgwu.js} +1 -1
  136. package/dist/packem_shared/lifecycle-D6PMPor-.js +2 -0
  137. package/dist/packem_shared/lockfile-CiUtEbnt.js +1 -0
  138. package/dist/packem_shared/manifests-Du4yKlf_.js +1 -0
  139. package/dist/packem_shared/maven-pom-B0KG9kJQ.js +1 -0
  140. package/dist/packem_shared/{min-release-age-Da4V046o.js → min-release-age-JViyQuBM.js} +7 -7
  141. package/dist/packem_shared/missing-package-json-Cu5YVAot.js +1 -0
  142. package/dist/packem_shared/mix-project-RYvdZp3_.js +2 -0
  143. package/dist/packem_shared/multi-eco-lockfiles-B2X3yhyo.js +1 -0
  144. package/dist/packem_shared/{native-config-sync-CEB0rWlk.js → native-config-sync-TdTWjVgI.js} +1 -1
  145. package/dist/packem_shared/nuget-project-RApYSW_y.js +4 -0
  146. package/dist/packem_shared/{osv-bloom-BRacgzs7.js → osv-bloom-BCAX5ARR.js} +1 -1
  147. package/dist/packem_shared/package-version-Dxirp-UO.js +4 -0
  148. package/dist/packem_shared/packument-BQv4je9m.js +1 -0
  149. package/dist/packem_shared/pm-runner-CMSml1Bj.js +1 -0
  150. package/dist/packem_shared/{project-name-filter-zrdrEQbu.js → project-name-filter-D6tXD8gd.js} +1 -1
  151. package/dist/packem_shared/{provenance-CFPT_FQA.js → provenance-DNyVMxNv.js} +1 -1
  152. package/dist/packem_shared/readJsonSync-CbryXYxN-EWl7_7KX.js +1 -0
  153. package/dist/packem_shared/registry-keys-DwB3ZXS_.js +1 -0
  154. package/dist/packem_shared/{resolve-explicit-opfIkxoY.js → resolve-explicit-BPsdmuty.js} +1 -1
  155. package/dist/packem_shared/resolve-runtime-CNiHcVtx.js +1 -0
  156. package/dist/packem_shared/run-file-UBukWaha.js +1 -0
  157. package/dist/packem_shared/runtime-check-1U8HrQd9.js +1 -0
  158. package/dist/packem_shared/s1ngularity-QD2LD1sO.js +1 -0
  159. package/dist/packem_shared/{scan-progress-BGB9hIrD.js → scan-progress-CkumcBG-.js} +2 -2
  160. package/dist/packem_shared/{selectors-CjIZ3gy2.js → selectors-edwcgNl3.js} +1 -1
  161. package/dist/packem_shared/{signatures-DpqZVmmU.js → signatures-t8LbOaqr.js} +1 -1
  162. package/dist/packem_shared/spinner-ukDEdGvp.js +1 -0
  163. package/dist/packem_shared/swift-package-B6X5kzQE.js +1 -0
  164. package/dist/packem_shared/tabs--uxJGL8N.js +1 -0
  165. package/dist/packem_shared/{target-merge-hsawesT4.js → target-merge-DVJl-7Qz.js} +1 -1
  166. package/dist/packem_shared/target-options-DsHFmRZH.js +1 -0
  167. package/dist/packem_shared/toolchain-BRdpaAC4.js +5 -0
  168. package/dist/packem_shared/typosquats-8u0drCqQ.js +1 -0
  169. package/dist/packem_shared/use-measured-height-DUZyyias.js +1 -0
  170. package/dist/packem_shared/verify-B_MblU_Q.js +1 -0
  171. package/dist/packem_shared/{vis-update-app-D9KWJ9Ir.js → vis-update-app-BCIccZfA.js} +1 -1
  172. package/dist/packem_shared/{vis-user-error-Bdg9NRuJ.js → vis-user-error-75VtCwMv.js} +15 -15
  173. package/dist/packem_shared/watch-CcTketln.js +1 -0
  174. package/dist/packem_shared/watch-loop-qRn0IHPG.js +11 -0
  175. package/dist/packem_shared/{writeFileSync-DJoHk3Ks-O9zOKqeM.js → writeFileSync-DJoHk3Ks-BPRoepNw.js} +1 -1
  176. package/dist/packem_shared/zig-manifest-P7ydLEOa.js +7 -0
  177. package/dist/release/plugin-sdk.d.ts +1 -1
  178. package/dist/release/types.d.ts +133 -7
  179. package/dist/runtime/preload.js +1 -1
  180. package/index.d.ts +204 -204
  181. package/index.js +52 -52
  182. package/package.json +11 -11
  183. package/schemas/vis-config.schema.json +265 -5
  184. package/schemas/vis-release-config.schema.json +132 -5
  185. package/dist/packem_shared/advisories-BSpzRIXP.js +0 -1
  186. package/dist/packem_shared/build-scripts-BIgkWVgY.js +0 -1
  187. package/dist/packem_shared/cyclonedx-CT1rtKxV.js +0 -4
  188. package/dist/packem_shared/dependency-scan-W9b2X0a1.js +0 -1
  189. package/dist/packem_shared/failure-log-B91LvYWw.js +0 -2
  190. package/dist/packem_shared/formatBytes-BHAzNIrn-CLYsxlUj.js +0 -4
  191. package/dist/packem_shared/index-CVBR-Kit.js +0 -22
  192. package/dist/packem_shared/index-onibYJkv.js +0 -1
  193. package/dist/packem_shared/lifecycle-DDJzp-4H.js +0 -2
  194. package/dist/packem_shared/lockfile-Bi1mw9jJ.js +0 -1
  195. package/dist/packem_shared/manifests-D671Sb1T.js +0 -1
  196. package/dist/packem_shared/missing-package-json-CMoHdvmj.js +0 -1
  197. package/dist/packem_shared/package-version-C5EPMgRw.js +0 -4
  198. package/dist/packem_shared/packument-DuEV-qSE.js +0 -1
  199. package/dist/packem_shared/path-CxEa27Rz-pjheKk6v.js +0 -1
  200. package/dist/packem_shared/pm-runner-9L6ocnu2.js +0 -1
  201. package/dist/packem_shared/readJsonSync-CbryXYxN-BxKjDZnF.js +0 -1
  202. package/dist/packem_shared/registry-keys-C3EsP_s4.js +0 -1
  203. package/dist/packem_shared/resolve-runtime-lJ5L9gU4.js +0 -1
  204. package/dist/packem_shared/run-file-DZff6GqY.js +0 -1
  205. package/dist/packem_shared/runtime-check-DAbveBr_.js +0 -1
  206. package/dist/packem_shared/s1ngularity-DTvrfWIM.js +0 -1
  207. package/dist/packem_shared/spinner-BVCEMm3G.js +0 -1
  208. package/dist/packem_shared/tabs-Dz6xVpfX.js +0 -1
  209. package/dist/packem_shared/target-options-Bxb0Y5qa.js +0 -1
  210. package/dist/packem_shared/toolchain-887JoquG.js +0 -5
  211. package/dist/packem_shared/typosquats-Xv6dN4sr.js +0 -1
  212. package/dist/packem_shared/use-measured-height-BPQg2q_p.js +0 -1
  213. package/dist/packem_shared/verify-BLoaI7En.js +0 -1
  214. package/dist/packem_shared/watch-BTZw2Y8Q.js +0 -1
  215. package/dist/packem_shared/watch-loop-Cjh2wlUl.js +0 -11
@@ -1,11 +0,0 @@
1
- import{createRequire as K}from"node:module";import{e as h,v as S,U as H,m as Y}from"./path-CxEa27Rz-pjheKk6v.js";import{T as w}from"../packem_chunks/catalog.js";import{z as Z}from"./index-CVBR-Kit.js";import{y as C}from"./isAccessibleSync-DYKTrrvc-K2xhg6sV.js";import{p as ee}from"./readJsonSync-CbryXYxN-BxKjDZnF.js";import{h as le}from"./writeFileSync-DJoHk3Ks-O9zOKqeM.js";import{s as ue}from"./watch-BTZw2Y8Q.js";let z;const G=e=>(z??=K(import.meta.url))(e),x=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,A=e=>{if(typeof x<"u"&&x.versions&&x.versions.node){const[t,n]=x.versions.node.split(".").map(Number);if(t>22||t===22&&n>=3||t===20&&n>=16)return x.getBuiltinModule(e)}return G(e)},{createHash:g}=A("node:crypto"),{fileURLToPath:Q,pathToFileURL:X}=A("node:url"),{spawnSync:te,spawn:ne}=A("node:child_process"),{openSync:se,writeSync:re,closeSync:oe,statSync:ie,readFileSync:P,mkdirSync:ce,writeFileSync:ae}=A("node:fs"),{availableParallelism:k}=A("node:os"),D=(e,t)=>{for(const n of["dependencies","devDependencies","optionalDependencies","peerDependencies"]){const s=e[n];if(s&&typeof s[t]=="string")return s[t]}},F=(e,t)=>{for(const n of t){const s=h(e,n);if(C(s))return s}},de=e=>{const t=h(e,"package.json");if(!C(t))return{};try{return ee(t)}catch{return{}}},ot=(e,t)=>{const n=de(e),s=new Map;for(const o of t){const r=o.detect(e,n);r&&s.set(o.id,r)}return s},fe={error:"error",info:"info",information:"info",warning:"warning"},it={argsCheck:(e,t)=>I(e,t,!1),argsFix:(e,t)=>I(e,t,!0),bin:()=>["pnpm","exec","biome"],cacheKey:(e,t)=>{const n=["biome",e.declaredVersion??"unknown",e.configFile??"no-config",t.maxWarnings===void 0?"":`mw=${t.maxWarnings}`,t.quiet?"q":"",...t.extraArgs??[]];return g("sha256").update(n.join("|")).digest("hex").slice(0,16)},detect:(e,t)=>{const n=D(t,w.biome.packageNames[0]),s=F(e,w.biome.configFiles);if(!(!n&&!s))return{adapter:"biome",configFile:s,declared:!!n,declaredVersion:n,root:e}},extensions:["astro","cjs","css","cts","js","json","jsonc","jsx","mjs","mts","svelte","ts","tsx","vue"],id:"biome",kind:"both",parse:(e,t)=>{if(!e.stdout.trim())return[];let n;try{n=JSON.parse(e.stdout)}catch{return[{adapter:"biome",file:t.root,fixable:!1,message:`biome output was not valid JSON (exit ${e.exitCode})`,severity:"error"}]}const s=[];for(const o of n.diagnostics??[]){const r=o.location?.start,i=o.location?.end,c=pe(t.root,o.location?.path),u=o.category??"",a=u==="format"||u.startsWith("format/");s.push({adapter:"biome",column:r?.column&&r.column>0?r.column:void 0,endColumn:i?.column&&i.column>0?i.column:void 0,endLine:i?.line&&i.line>0?i.line:void 0,file:c,fixable:!0,line:r?.line&&r.line>0?r.line:void 0,message:a?"Code style issues would be auto-fixed":o.message??"",ruleId:u||void 0,severity:fe[o.severity??""]??"warning"})}return s}},I=(e,t,n)=>{const s=["check","--reporter=json"];return n&&s.push("--write"),typeof t.maxWarnings=="number"&&s.push(`--max-diagnostics=${String(t.maxWarnings)}`),t.extraArgs?.length&&s.push(...t.extraArgs),s.push(...e),s},pe=(e,t)=>{const n=typeof t=="string"?t:t?.file;return n?n.startsWith("/")||/^[a-z]:[\\/]/i.test(n)?n:h(e,n):e},N=e=>t=>{const n=F(t,w.deno.configFiles);if(n)return{adapter:e,configFile:n,declared:!1,root:t}},O=e=>e.startsWith("/")||/^[a-z]:[\\/]/i.test(e),ct={argsCheck:(e,t)=>b(e,t,!1),argsFix:(e,t)=>b(e,t,!0),bin:()=>["deno","lint"],cacheKey:(e,t)=>{const n=["deno-lint",e.configFile??"no-config",t.quiet?"q":"",...t.extraArgs??[]];return g("sha256").update(n.join("|")).digest("hex").slice(0,16)},detect:N("deno-lint"),extensions:["js","jsx","mjs","mts","ts","tsx"],id:"deno-lint",kind:"lint",parse:(e,t)=>{if(!e.stdout.trim())return[];let n;try{n=JSON.parse(e.stdout)}catch{return[{adapter:"deno-lint",file:t.root,fixable:!1,message:`deno lint output was not valid JSON (exit ${e.exitCode})`,severity:"error"}]}const s=[];for(const o of n.diagnostics??[]){const r=o.range?.start,i=o.range?.end;s.push({adapter:"deno-lint",column:r?.col===void 0?void 0:r.col+1,endColumn:i?.col===void 0?void 0:i.col+1,endLine:i?.line===void 0?void 0:i.line+1,file:he(o.filename??t.root,t.root),fixable:!1,line:r?.line===void 0?void 0:r.line+1,message:o.message??"",ruleId:o.code,severity:"warning"})}return s}},at={argsCheck:(e,t)=>R(e,t,!1),argsFix:(e,t)=>R(e,t,!0),bin:()=>["deno","fmt"],cacheKey:(e,t)=>{const n=["deno-fmt",e.configFile??"no-config",t.quiet?"q":"",...t.extraArgs??[]];return g("sha256").update(n.join("|")).digest("hex").slice(0,16)},detect:N("deno-fmt"),extensions:["astro","cjs","css","cts","html","ipynb","js","json","jsonc","jsx","less","md","mjs","mts","sass","scss","sql","svelte","ts","tsx","vue","yaml","yml"],id:"deno-fmt",kind:"fmt",parse:(e,t)=>{if(e.exitCode===0)return[];const n=[],s=new Set;for(const o of e.stdout.split(/\r?\n/)){const r=/^from (.+):$/.exec(o);if(!r)continue;const i=r[1];s.has(i)||(s.add(i),n.push({adapter:"deno-fmt",file:O(i)?i:`${t.root}/${i}`,fixable:!0,message:"Code style issues would be auto-fixed",severity:"info"}))}return n}},b=(e,t,n)=>{const s=["--json"];return n&&s.push("--fix"),t.extraArgs?.length&&s.push(...t.extraArgs),s.push(...e),s},R=(e,t,n)=>{const s=[];return n||s.push("--check"),t.quiet&&s.push("--quiet"),t.extraArgs?.length&&s.push(...t.extraArgs),s.push(...e),s},he=(e,t)=>e.startsWith("file://")?Q(e):O(e)?e:`${t}/${e}`,W="pyproject.toml",me=/^\[tool\.ruff(?:\.[\w-]+)*\]\s*$/m,ge=/^Would reformat:?\s+(.+)$/,ye=e=>{const t=h(e,W);if(!C(t))return!1;try{const n=Z(t);return me.test(n)}catch{return!1}},B=e=>(t,n)=>{const s=w.ruff.packageNames.map(c=>D(n,c)).find(c=>c!==void 0),o=F(t,w.ruff.configFiles),r=o?void 0:ye(t)?h(t,W):void 0,i=o??r;if(!(!s&&!i))return{adapter:e,configFile:i,declared:!!s,declaredVersion:s,root:t}},xe=e=>e.startsWith("/")||/^[a-z]:[\\/]/i.test(e),J=(e,t)=>e?xe(e)?e:h(t,e):t,ve=e=>ge.exec(e)?.[1]?.trim(),lt={argsCheck:(e,t)=>T(e,t,!1),argsFix:(e,t)=>T(e,t,!0),bin:()=>["ruff","check"],cacheKey:(e,t)=>{const n=["ruff-check",e.declaredVersion??"unknown",e.configFile??"no-config",t.maxWarnings===void 0?"":`mw=${t.maxWarnings}`,t.quiet?"q":"",...t.extraArgs??[]];return g("sha256").update(n.join("|")).digest("hex").slice(0,16)},detect:B("ruff-check"),extensions:["py","pyi"],id:"ruff-check",kind:"lint",parse:(e,t)=>{if(!e.stdout.trim())return[];let n;try{n=JSON.parse(e.stdout)}catch{return[{adapter:"ruff-check",file:t.root,fixable:!1,message:`ruff check output was not valid JSON (exit ${e.exitCode})`,severity:"error"}]}const s=[];for(const o of n){const r=o.location,i=o.end_location;s.push({adapter:"ruff-check",column:r?.column,endColumn:i?.column,endLine:i?.row,file:J(o.filename,t.root),fixable:!!o.fix,line:r?.row,message:o.message??"",ruleId:o.code,severity:"warning"})}return s}},ut={argsCheck:(e,t)=>L(e,t,!1),argsFix:(e,t)=>L(e,t,!0),bin:()=>["ruff","format"],cacheKey:(e,t)=>{const n=["ruff-fmt",e.declaredVersion??"unknown",e.configFile??"no-config",t.quiet?"q":"",...t.extraArgs??[]];return g("sha256").update(n.join("|")).digest("hex").slice(0,16)},detect:B("ruff-fmt"),extensions:["py","pyi"],id:"ruff-fmt",kind:"fmt",parse:(e,t)=>{if(e.exitCode===0)return[];const n=[],s=new Set;for(const o of e.stdout.split(/\r?\n/)){const r=ve(o);!r||s.has(r)||(s.add(r),n.push({adapter:"ruff-fmt",file:J(r,t.root),fixable:!0,message:"Code style issues would be auto-fixed",severity:"info"}))}return n}},T=(e,t,n)=>{const s=["--output-format=json"];return n&&s.push("--fix"),t.quiet&&s.push("--quiet"),t.extraArgs?.length&&s.push(...t.extraArgs),s.push(...e),s},L=(e,t,n)=>{const s=[];return n||s.push("--check"),t.quiet&&s.push("--quiet"),t.extraArgs?.length&&s.push(...t.extraArgs),s.push(...e),s},dt=(e,t)=>{const n=v(e,["diff","--name-only","--diff-filter=ACMR","-z",`${t}...HEAD`]);if(n===void 0)return;const s=v(e,["diff","--name-only","--diff-filter=ACMR","-z"]),o=v(e,["diff","--name-only","--diff-filter=ACMR","--cached","-z"]),r=v(e,["ls-files","--others","--exclude-standard","-z"]),i=new Set;for(const c of[n,s??"",o??"",r??""])for(const u of c.split("\0"))u.length!==0&&i.add(S(u)?u:h(e,u));return[...i].sort()},ft=e=>{const t=v(e,["diff","--name-only","--diff-filter=ACMR","--cached","-z"]);if(t===void 0)return;const n=new Set;for(const s of t.split("\0"))s.length!==0&&n.add(S(s)?s:h(e,s));return[...n].sort()},v=(e,t)=>{const n=te("git",[...t],{cwd:e,encoding:"utf8",timeout:1e4});if(n.status===0)return n.stdout},pt=(e,t)=>{const n=new Set(t.map(r=>r.toLowerCase())),s=[],o=new Set;for(const r of e){const i=r.lastIndexOf(".");if(i===-1||i===r.length-1)continue;const c=r.slice(i+1).toLowerCase();n.has(c)&&(o.has(r)||(o.add(r),s.push(r)))}return s},we=new Set(["-","stdout"]),_=e=>({close:()=>{},write:t=>{e.write(t)}}),Ae=e=>{le(Y(e));const t=se(e,"w");let n=[];return{close:()=>{n.length>0&&(re(t,n.join("")),n=[]),oe(t)},write:s=>{n.push(s)}}},ht=e=>{const{cwd:t,target:n}=e;if(n===void 0||we.has(n))return _(process.stdout);if(n==="stderr")return _(process.stderr);const s=S(n)?n:H(t,n);return Ae(s)},j=["oxlint","oxfmt","biome","eslint","dprint","prettier","stylelint","ruff-check","ruff-fmt","markdownlint","shellcheck","deno-lint","deno-fmt"],mt=(e,t)=>{const n=new Map(e.map(i=>[i.id,i])),s=[],o=new Set,r=t&&t.length>0?t:j;for(const i of r){const c=n.get(i);c&&!o.has(i)&&(s.push(c),o.add(i))}if(t&&t.length>0)for(const i of j){const c=n.get(i);c&&!o.has(i)&&(s.push(c),o.add(i))}for(const i of e)o.has(i.id)||(s.push(i),o.add(i.id));return s},gt=(e,t,n)=>{const s=[];for(const o of t){const r=e.get(o.id);r&&Se(o.kind,n)&&s.push({adapter:o,presence:r})}return s},Se=(e,t)=>e===t||e==="both",yt=(e,t,n={})=>{const s=new Map;for(const o of e){const r=$e(o),i=Ce(r,t,n);if(!i)continue;const c=s.get(i);c?c.push(o):s.set(i,[o])}return s},$e=e=>{const t=e.lastIndexOf(".");return t===-1||t===e.length-1?"":e.slice(t+1).toLowerCase()},Ce=(e,t,n)=>{const s=n[e];if(s&&t.some(o=>o.adapter.id===s))return s;for(const{adapter:o}of t)if(o.extensions.includes(e))return o.id},Fe=e=>e==="error"?"error":e==="warning"?"warning":"notice",V=e=>e.replaceAll("%","%25").replaceAll("\r","%0D").replaceAll(`
2
- `,"%0A"),M=e=>V(e).replaceAll(",","%2C").replaceAll(":","%3A").replaceAll("=","%3D"),ke=(e,t)=>t&&e.startsWith(`${t}/`)?e.slice(t.length+1):e,Ie=(e,t)=>e.file!==t.file?e.file<t.file?-1:1:(e.line??0)-(t.line??0)||(e.column??0)-(t.column??0),be=(e,t)=>{const n=Fe(e.severity),s=ke(e.file,t),o=e.ruleId?`${e.adapter}(${e.ruleId})`:e.adapter,r=[`file=${M(s)}`];return e.line!==void 0&&r.push(`line=${String(e.line)}`),e.endLine!==void 0&&r.push(`endLine=${String(e.endLine)}`),e.column!==void 0&&r.push(`col=${String(e.column)}`),e.endColumn!==void 0&&r.push(`endColumn=${String(e.endColumn)}`),r.push(`title=${M(o)}`),`::${n} ${r.join(",")}::${V(e.message)}
3
- `},xt=e=>e.runs.flatMap(n=>[...n.findings]).sort(Ie).map(n=>be(n,e.workspaceRoot)).join(""),y=e=>e.replaceAll("&","&amp;").replaceAll("<","&lt;").replaceAll(">","&gt;").replaceAll('"',"&quot;").replaceAll("'","&apos;"),Re=e=>`<![CDATA[${e.replaceAll("]]>","]]]]><![CDATA[>")}]]>`,Te=(e,t)=>e.file!==t.file?e.file<t.file?-1:1:(e.line??0)-(t.line??0)||(e.column??0)-(t.column??0),Le=e=>e==="error"?"error":e==="warning"?"warning":"info",_e=(e,t)=>{let{file:n}=e;return t&&e.file.startsWith(`${t}/`)&&(n=e.file.slice(t.length+1)),e.line===void 0?n:e.column===void 0?`${n}:${String(e.line)}`:`${n}:${String(e.line)}:${String(e.column)}`},je=(e,t,n)=>{const s=_e(e,n),o=Le(e.severity),r=e.ruleId?`[${e.ruleId}] ${e.message}`:e.message;return[` <testcase classname="${y(t)}" name="${y(s)}">`,` <failure type="${y(o)}" message="${y(r)}">${Re(e.message)}</failure>`," </testcase>",""].join(`
4
- `)},Me=(e,t,n)=>{const s=[...e.findings].sort(Te),o=s.filter(d=>d.severity==="error").length,r=s.filter(d=>d.severity==="warning").length,i=s.length,c=(e.durationMs/1e3).toFixed(3),u=s.map(d=>je(d,e.adapter,n)).join("");return` <testsuite ${[`name="${y(e.adapter)}"`,`tests="${String(i)}"`,`failures="${String(o)}"`,'errors="0"',`skipped="${String(r)}"`,`time="${c}"`,`timestamp="${t}"`].join(" ")}>
5
- ${u} </testsuite>
6
- `},vt=e=>{const t=(e.now??new Date).toISOString(),n=e.suiteName??"vis-lint-fmt",s=e.runs.map(a=>Me(a,t,e.workspaceRoot)).join(""),o=e.runs.reduce((a,d)=>a+d.findings.length,0),r=e.runs.reduce((a,d)=>a+d.findings.filter(l=>l.severity==="error").length,0),i=e.runs.reduce((a,d)=>a+d.findings.filter(l=>l.severity==="warning").length,0),c=(e.runs.reduce((a,d)=>a+d.durationMs,0)/1e3).toFixed(3);return`<?xml version="1.0" encoding="UTF-8"?>
7
- <testsuites ${[`name="${y(n)}"`,`tests="${String(o)}"`,`failures="${String(r)}"`,'errors="0"',`skipped="${String(i)}"`,`time="${c}"`].join(" ")}>
8
- ${s}</testsuites>
9
- `},Ee="2.1.0",qe="https://json.schemastore.org/sarif-2.1.0.json",Pe=e=>e==="error"?"error":e==="warning"?"warning":"note",De=(e,t)=>t&&e.startsWith(`${t}/`)?{uri:e.slice(t.length+1),uriBaseId:"SRCROOT"}:{uri:e},Ne=e=>{const{href:t}=X(e);return t.endsWith("/")?t:`${t}/`},Oe=(e,t)=>e.file!==t.file?e.file<t.file?-1:1:(e.line??0)-(t.line??0)||(e.column??0)-(t.column??0),We=e=>{const t=new Map;for(const n of e)n.ruleId&&(t.has(n.ruleId)||t.set(n.ruleId,{id:n.ruleId,name:n.ruleId}));return[...t.values()]},Be=(e,t)=>{const{uri:n,uriBaseId:s}=De(e.file,t),o={artifactLocation:s?{uri:n,uriBaseId:s}:{uri:n}};if(e.line!==void 0){const i={startLine:e.line};e.column!==void 0&&(i.startColumn=e.column),e.endLine!==void 0&&(i.endLine=e.endLine),e.endColumn!==void 0&&(i.endColumn=e.endColumn),o.region=i}const r={level:Pe(e.severity),locations:[{physicalLocation:o}],message:{text:e.message}};return e.ruleId&&(r.ruleId=e.ruleId),r},Je=(e,t)=>{const n=[...e.findings].sort(Oe),s=We(n),o={name:e.adapter,rules:s};e.presence?.declaredVersion&&(o.version=e.presence.declaredVersion);const r={results:n.map(i=>Be(i,t)),tool:{driver:o}};return t&&(r.originalUriBaseIds={SRCROOT:{uri:Ne(t)}}),r},wt=e=>{const t={$schema:qe,runs:e.runs.map(n=>Je(n,e.workspaceRoot)),version:Ee};return`${JSON.stringify(t,void 0,2)}
10
- `},E={error:3,info:1,warning:2},At=e=>{const t=[],n=[];let s,o=!1;for(const r of e){n.push({adapter:r.adapter,durationMs:r.durationMs,exitCode:r.exitCode,findingCount:r.findings.length}),r.exitCode!==0&&r.exitCode!==null&&r.findings.length===0&&(o=!0);for(const i of r.findings)t.push(i),(!s||E[i.severity]>E[s])&&(s=i.severity)}return{findings:t,hadProcessFailure:o,maxSeverity:s,runs:n}},St=e=>{const t=new Map;for(const n of e){const s=t.get(n.file);s?s.push(n):t.set(n.file,[n])}return t},$t=e=>e.hadProcessFailure||e.maxSeverity==="error"?1:0,Ve=(e,t)=>{if(t==="fix"||process.env.VIS_NO_CACHE==="1"||e.length===0)return!1;for(const n of e)if(n==="."||n==="./"||n==="..")return!1;return!0},Ue=e=>{try{const t=P(e);return g("sha256").update(t).digest("hex")}catch{return}},Ke=(e,t,n,s,o)=>{const r=e.cacheKey(t,s),i=[];for(const u of[...n].sort()){const a=S(u)?u:h(t.root,u);try{ie(a)}catch{return}const d=Ue(a);if(!d)return;i.push({hash:d,path:a})}const c=g("sha256");c.update(e.id),c.update("\0"),c.update(r),c.update("\0"),c.update(o);for(const u of i)c.update("\0"),c.update(u.path),c.update("\0"),c.update(u.hash);return{fileHashes:i,key:c.digest("hex")}},U=(e,t)=>h(e,"lint-fmt",t),ze=(e,t,n)=>{const s=h(U(e,t.id),`${n}.json`);try{const o=P(s,"utf8"),r=JSON.parse(o);return r.schema!==1?void 0:r}catch{return}},Ge=(e,t,n,s,o)=>{const r=U(e,t.id),i={fileHashes:o,result:s,savedAt:Date.now(),schema:1};try{ce(r,{recursive:!0}),ae(h(r,`${n}.json`),JSON.stringify(i))}catch{}},q=async(e,t,n,s,o)=>{const r=e.bin(t),i=[...r.slice(1),...o==="fix"?e.argsFix(n,s):e.argsCheck(n,s)];return new Promise(c=>{const u=Date.now(),a=ne(r[0],i,{cwd:t.root}),d=[],l=[];let m=!1;const p=setTimeout(()=>{m=!0,a.kill("SIGKILL")},6e4);a.stdout.on("data",f=>d.push(f)),a.stderr.on("data",f=>l.push(f)),a.on("error",f=>{clearTimeout(p),c({durationMs:Date.now()-u,exitCode:null,stderr:f.message,stdout:""})}),a.on("close",f=>{clearTimeout(p),c({durationMs:Date.now()-u,exitCode:m?null:f,stderr:Buffer.concat(l).toString("utf8"),stdout:Buffer.concat(d).toString("utf8")})})})},Ct=async(e,t,n,s=k())=>{if(e.length===0)return[];const{cacheRoot:o,concurrency:r}=typeof s=="number"?{concurrency:s}:{cacheRoot:s.cacheRoot,concurrency:s.concurrency??k()},i=async l=>{const m=l.options??t;if(o&&Ve(l.files,n)){const p=Ke(l.adapter,l.presence,l.files,m,n);if(p){const f=ze(o,l.adapter,p.key);if(f)return f.result;const $=await q(l.adapter,l.presence,l.files,m,n);return $.exitCode!==null&&Ge(o,l.adapter,p.key,$,p.fileHashes),$}}return q(l.adapter,l.presence,l.files,m,n)};if(process.env.VIS_LINT_FMT_SERIAL==="1"){const l=[];for(const m of e)l.push(await i(m));return l}const c=Math.max(1,Math.min(r,e.length)),u=Array.from({length:e.length});let a=0;const d=async()=>{for(;;){const l=a;if(a+=1,l>=e.length)return;u[l]=await i(e[l])}};return await Promise.all(Array.from({length:c},()=>d())),u},He=e=>{const t=new Set;for(const n of e)t.add(n.toLowerCase());return t},Ye=(e,t)=>{const n=e.lastIndexOf(".");return n===-1||n===e.length-1?!1:t.has(e.slice(n+1).toLowerCase())},Ft=async e=>{const{extensions:t,initialFiles:n,label:s,log:o,runCycle:r,workspaceRoot:i}=e,c=o??(p=>{process.stdout.write(`${p}
11
- `)}),u=He(t);await r(n),c(`▸ ${s}: watching workspace — press Ctrl-C to exit`);let a=new Set,d=!1;const l=async()=>{for(;a.size>0;){const p=[...a];a=new Set;try{await r(p)}catch(f){c(`✗ ${s}: watch cycle failed — ${f.message}`)}}},m=ue({debounceMs:200,filter:p=>Ye(p,u),onChange:async p=>{for(const f of p)a.add(S(f)?f:h(i,f));if(!d){d=!0;try{await l()}finally{d=!1}}},paths:[i]});await new Promise(p=>{const f=()=>{m.close(),process.off("SIGINT",f),process.off("SIGTERM",f),p()};process.once("SIGINT",f),process.once("SIGTERM",f)})};export{ot as a,gt as b,dt as c,D as d,Ft as e,F as f,it as g,ut as h,at as i,yt as j,Ct as k,At as l,ht as m,wt as n,vt as o,xt as p,$t as q,mt as r,ft as s,St as t,lt as u,ct as v,pt as w};