@visulima/vis 6.8.0 → 7.1.0-next.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 (128) hide show
  1. package/CHANGELOG.md +97 -0
  2. package/README.md +2 -0
  3. package/bin/route.mjs +16 -21
  4. package/dist/bin.js +1 -1
  5. package/dist/binx.js +1 -1
  6. package/dist/config/index.d.ts +16 -1
  7. package/dist/packem_chunks/bloom-sync.js +1 -1
  8. package/dist/packem_chunks/catalog.js +1 -1
  9. package/dist/packem_chunks/cli-exec.js +1 -1
  10. package/dist/packem_chunks/cli-main.js +88 -88
  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/handler4.js +1 -1
  28. package/dist/packem_chunks/handler46.js +1 -1
  29. package/dist/packem_chunks/handler5.js +1 -1
  30. package/dist/packem_chunks/handler50.js +1 -1
  31. package/dist/packem_chunks/handler51.js +1 -1
  32. package/dist/packem_chunks/handler52.js +1 -1
  33. package/dist/packem_chunks/handler54.js +1 -1
  34. package/dist/packem_chunks/handler55.js +1 -1
  35. package/dist/packem_chunks/handler56.js +1 -1
  36. package/dist/packem_chunks/handler58.js +1 -1
  37. package/dist/packem_chunks/handler59.js +1 -1
  38. package/dist/packem_chunks/handler6.js +1 -1
  39. package/dist/packem_chunks/handler60.js +1 -1
  40. package/dist/packem_chunks/handler61.js +1 -1
  41. package/dist/packem_chunks/handler62.js +1 -1
  42. package/dist/packem_chunks/handler63.js +1 -1
  43. package/dist/packem_chunks/handler64.js +1 -1
  44. package/dist/packem_chunks/handler65.js +1 -1
  45. package/dist/packem_chunks/handler66.js +1 -1
  46. package/dist/packem_chunks/handler67.js +1 -1
  47. package/dist/packem_chunks/handler68.js +1 -1
  48. package/dist/packem_chunks/handler69.js +25 -37
  49. package/dist/packem_chunks/handler7.js +1 -1
  50. package/dist/packem_chunks/handler70.js +50 -25
  51. package/dist/packem_chunks/handler71.js +1 -1
  52. package/dist/packem_chunks/handler72.js +1 -1
  53. package/dist/packem_chunks/handler73.js +1 -1
  54. package/dist/packem_chunks/handler74.js +1 -1
  55. package/dist/packem_chunks/handler75.js +1 -1
  56. package/dist/packem_chunks/handler76.js +1 -1
  57. package/dist/packem_chunks/handler77.js +1 -1
  58. package/dist/packem_chunks/handler78.js +1 -1
  59. package/dist/packem_chunks/handler79.js +1 -1
  60. package/dist/packem_chunks/handler8.js +1 -1
  61. package/dist/packem_chunks/heal.js +1 -1
  62. package/dist/packem_chunks/help-command.js +1 -1
  63. package/dist/packem_chunks/index7.js +1 -1
  64. package/dist/packem_chunks/keys-refresh.js +1 -1
  65. package/dist/packem_chunks/list.js +1 -1
  66. package/dist/packem_chunks/prune.js +1 -1
  67. package/dist/packem_chunks/status.js +1 -1
  68. package/dist/packem_chunks/sync.js +1 -1
  69. package/dist/packem_chunks/sync2.js +1 -1
  70. package/dist/packem_chunks/tripwire.js +1 -1
  71. package/dist/packem_chunks/verify-lockfile.js +1 -1
  72. package/dist/packem_shared/{advisories-Vd2kwoSf.js → advisories-O7twgy1s.js} +1 -1
  73. package/dist/packem_shared/{affected-selection-Dbbli-Ot.js → affected-selection-eR52q-oc.js} +1 -1
  74. package/dist/packem_shared/{ai-analysis-DZEjy6lu.js → ai-analysis-Doa-UG1c.js} +1 -1
  75. package/dist/packem_shared/{ai-cache-Q7TuGULh.js → ai-cache-BLz0YM15.js} +1 -1
  76. package/dist/packem_shared/{ai-fix-Cagw3I4D.js → ai-fix-h4fgPlz8.js} +1 -1
  77. package/dist/packem_shared/{bin-gxaewUwv.js → bin-BlwqCNwJ.js} +1 -1
  78. package/dist/packem_shared/{build-scripts-B5sROJPn.js → build-scripts-zlct5Ggj.js} +1 -1
  79. package/dist/packem_shared/{dependency-scan-Cpk1Z6Wj.js → dependency-scan-CpaMuJak.js} +1 -1
  80. package/dist/packem_shared/{detect-D8zxVYrU.js → detect-CrdazHI6.js} +1 -1
  81. package/dist/packem_shared/{docker-2ZjBNNeE.js → docker-ClRLF89f.js} +1 -1
  82. package/dist/packem_shared/{ecosystem-gate-BF9glH2Q.js → ecosystem-gate-Be06KMgT.js} +1 -1
  83. package/dist/packem_shared/{env-5cWSxQ96.js → env-BZGqwX30.js} +1 -1
  84. package/dist/packem_shared/{env-consistency-DkH7lUU7.js → env-consistency-DZmwPw-C.js} +1 -1
  85. package/dist/packem_shared/{failure-log-Dj9b94ax.js → failure-log-zDUnBhop.js} +1 -1
  86. package/dist/packem_shared/github-workflow-command-Bn0MgB78.js +3 -0
  87. package/dist/packem_shared/glob-Cyk1H9ZL-DVdKvjft.js +1 -0
  88. package/dist/packem_shared/{index-Dn_z9DYf.js → index-BCMh-e5u.js} +1 -1
  89. package/dist/packem_shared/{index-Bu_rMPKl.js → index-Byxjshm-.js} +1 -1
  90. package/dist/packem_shared/{lifecycle-BGTRxc9n.js → lifecycle-DEgFG8Hl.js} +1 -1
  91. package/dist/packem_shared/{manifests-C1FhhaNX.js → manifests-BYQ08vX_.js} +1 -1
  92. package/dist/packem_shared/{min-release-age-BbppxofB.js → min-release-age-CmziMU7E.js} +1 -1
  93. package/dist/packem_shared/{missing-package-json-DLTSyp4H.js → missing-package-json-BzB16zXB.js} +1 -1
  94. package/dist/packem_shared/{multi-eco-lockfiles-CxwaJO4v.js → multi-eco-lockfiles-BaEL_JYF.js} +1 -1
  95. package/dist/packem_shared/{native-config-sync-Di-76fQc.js → native-config-sync-Dkg3TMPR.js} +1 -1
  96. package/dist/packem_shared/{osv-DrEbiNXB.js → osv-D8S_X2KZ.js} +1 -1
  97. package/dist/packem_shared/{package-version-lWlrF9Wk.js → package-version-C7WbQEnJ.js} +1 -1
  98. package/dist/packem_shared/{packument-CW9GbXrT.js → packument-DE9EI2oo.js} +1 -1
  99. package/dist/packem_shared/{project-name-filter-DQ323iaJ.js → project-name-filter-xCPw_fxK.js} +1 -1
  100. package/dist/packem_shared/{provenance-DnK4Z14A.js → provenance-UZNpYcAR.js} +1 -1
  101. package/dist/packem_shared/publish-report-C-f7hkwx.js +1 -0
  102. package/dist/packem_shared/{registry-DqBIZZSL.js → registry-D65qizQE.js} +1 -1
  103. package/dist/packem_shared/{registry-keys-fVgmcPXl.js → registry-keys-C66uhEbp.js} +1 -1
  104. package/dist/packem_shared/{renderToString-DR0zDUjh-C8HCAyYP.js → renderToString-DR0zDUjh-CS7RIyZE.js} +1 -1
  105. package/dist/packem_shared/{resolve-explicit-B9zDWjx_.js → resolve-explicit-BEsg7ZYh.js} +1 -1
  106. package/dist/packem_shared/run-summary-utils-BrgoXV-3.js +1 -0
  107. package/dist/packem_shared/{runtime-check-B7ptIHX7.js → runtime-check-mhNpo3ah.js} +1 -1
  108. package/dist/packem_shared/{s1ngularity-27TGL2H3.js → s1ngularity-DFKNfAgy.js} +1 -1
  109. package/dist/packem_shared/{scaffold-files-BFWgtMR2.js → scaffold-files-DAU7B6Cw.js} +1 -1
  110. package/dist/packem_shared/{scan-progress-BwacnpFH.js → scan-progress-CgzPrpwB.js} +1 -1
  111. package/dist/packem_shared/{selectors-BisxDyYw.js → selectors-CUK5421Y.js} +1 -1
  112. package/dist/packem_shared/{signatures-Bl3Y1qG3.js → signatures-DJcxx8KS.js} +1 -1
  113. package/dist/packem_shared/{spinner-OBWz4yeR.js → spinner-DTKCtuC-.js} +1 -1
  114. package/dist/packem_shared/{table-BwL7to1g.js → table-CCIzXSUF.js} +1 -1
  115. package/dist/packem_shared/{tabs-Cr6uwTNJ.js → tabs-B9LOpICc.js} +1 -1
  116. package/dist/packem_shared/{toolchain-DVLvBR49.js → toolchain-CX-0Plms.js} +1 -1
  117. package/dist/packem_shared/{typosquats-DpcdyKGi.js → typosquats-BKUa8NgB.js} +1 -1
  118. package/dist/packem_shared/{use-measured-height-CVzcGyKB.js → use-measured-height-BvUJvSnd.js} +1 -1
  119. package/dist/packem_shared/{vis-update-app-0dbSUY-u.js → vis-update-app-DxnZ8owK.js} +1 -1
  120. package/dist/packem_shared/{vis-user-error-pMP1p7q1.js → vis-user-error-BurzAV6b.js} +1 -1
  121. package/dist/packem_shared/watch-loop-CatWMg-1.js +9 -0
  122. package/index.js +54 -54
  123. package/package.json +12 -12
  124. package/schemas/vis-config.schema.json +69 -0
  125. package/dist/packem_shared/glob-Cyk1H9ZL-CYVM7sl3.js +0 -1
  126. package/dist/packem_shared/publish-report-DOXKGOAj.js +0 -3
  127. package/dist/packem_shared/run-summary-utils-H2tE2PUC.js +0 -1
  128. package/dist/packem_shared/watch-loop-CpqHmDCt.js +0 -11
@@ -1074,6 +1074,60 @@
1074
1074
  "additionalProperties": false,
1075
1075
  "description": "Where the ruleset comes from. Omit for the bundled gitleaks default."
1076
1076
  },
1077
+ "overrides": {
1078
+ "type": "array",
1079
+ "items": {
1080
+ "type": "object",
1081
+ "properties": {
1082
+ "files": {
1083
+ "anyOf": [
1084
+ {
1085
+ "type": "string"
1086
+ },
1087
+ {
1088
+ "type": "array",
1089
+ "items": {
1090
+ "type": "string"
1091
+ }
1092
+ }
1093
+ ],
1094
+ "description": "Gitignore-syntax globs relative to the workspace root, e.g. `*.env` or `packages/api/**`."
1095
+ },
1096
+ "rules": {
1097
+ "type": "object",
1098
+ "properties": {
1099
+ "enable": {
1100
+ "type": "array",
1101
+ "items": {
1102
+ "type": "string"
1103
+ },
1104
+ "description": "Enable opt-in rules for matching files only."
1105
+ },
1106
+ "exclude": {
1107
+ "type": "array",
1108
+ "items": {
1109
+ "type": "string"
1110
+ },
1111
+ "description": "Drop these rules for matching files."
1112
+ },
1113
+ "include": {
1114
+ "type": "array",
1115
+ "items": {
1116
+ "type": "string"
1117
+ },
1118
+ "description": "Restrict matching files to these rules."
1119
+ }
1120
+ },
1121
+ "additionalProperties": false
1122
+ }
1123
+ },
1124
+ "required": [
1125
+ "files"
1126
+ ],
1127
+ "additionalProperties": false
1128
+ },
1129
+ "description": "File-specific rule filters, applied after the global `rules` filters."
1130
+ },
1077
1131
  "redact": {
1078
1132
  "type": "boolean",
1079
1133
  "description": "Redact secret values in findings."
@@ -1099,6 +1153,21 @@
1099
1153
  "additionalProperties": false,
1100
1154
  "description": "Rule-id filters applied after scanning."
1101
1155
  },
1156
+ "secretlintIgnore": {
1157
+ "anyOf": [
1158
+ {
1159
+ "type": "array",
1160
+ "items": {
1161
+ "type": "string"
1162
+ }
1163
+ },
1164
+ {
1165
+ "type": "boolean",
1166
+ "const": false
1167
+ }
1168
+ ],
1169
+ "description": "`.secretlintignore` paths, or `false` to disable auto-discovery."
1170
+ },
1102
1171
  "walk": {
1103
1172
  "type": "object",
1104
1173
  "properties": {
@@ -1 +0,0 @@
1
- import{I as t}from"./registry-DqBIZZSL.js";const s=async(a,o)=>await t(a,o);export{s as l};
@@ -1,3 +0,0 @@
1
- const s=(r,n)=>{process.env.GITHUB_ACTIONS==="true"&&process.stdout.write(`::${r}::${n.replaceAll("%","%25").replaceAll("\r","%0D").replaceAll(`
2
- `,"%0A")}
3
- `)},i=(r,n)=>{r.warn(n),s("warning",n)},o=(r,n)=>{r.error(n),s("error",n)},t=(r,n,a)=>{for(const e of n.published)r.info(` [published] ${e.name}@${e.version} (dist-tag ${a})`);for(const e of n.skipped)e.reason.startsWith("stage-")?(r.warn(` [stage] ${e.name} (${e.reason} — re-run \`vis release publish\` once approved)`),s("warning",`${e.name}: ${e.reason} — re-run \`vis release publish\` once approved`)):r.info(` [skipped] ${e.name} (${e.reason})`);for(const e of n.failed)r.error(` [failed] ${e.name}: ${e.reason}`),s("error",`${e.name}: ${e.reason}`);r.info(""),r.info(`Published: ${n.published.length} | Skipped: ${n.skipped.length} | Failed: ${n.failed.length}`),n.tags.length>0&&r.info(`Tags created: ${n.tags.length}${n.tagsPushed?" (pushed)":" (NOT pushed — re-run with --resume to retry)"}`)},p=(r,n)=>{const a=[...new Set(n)];if(a.length!==0){r.warn(`${a.length} warning(s):`);for(const e of a)r.warn(` - ${e}`),s("warning",e)}};export{t as a,o as b,i as l,p as r};
@@ -1 +0,0 @@
1
- import{createRequire as h}from"node:module";import{e as d}from"./index-0dnGN3GP.js";import{a as u}from"./env-5cWSxQ96.js";let y;const _=s=>(y??=h(import.meta.url))(s),c=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,j=s=>{if(typeof c<"u"&&c.versions&&c.versions.node){const[t,e]=c.versions.node.split(".").map(Number);if(t>22||t===22&&e>=3||t===20&&e>=16)return c.getBuiltinModule(s)}return _(s)},{readFile:f,readdir:l,stat:p}=j("node:fs/promises"),v=(s,t)=>s.tasks.find(e=>e.taskId===t),m=(s,t)=>{const e=s??{},o=t??{},i=[],n=[],r=[];for(const a of Object.keys(e))a in o?e[a]!==o[a]&&r.push(a):i.push(a);for(const a of Object.keys(o))a in e||n.push(a);return i.sort(),n.sort(),r.sort(),{added:i,changed:r,removed:n}},D=(s,t)=>({commandChanged:(s?.command??"")!==(t?.command??""),implicitDeps:m(s?.implicitDeps,t?.implicitDeps),nodes:m(s?.nodes,t?.nodes),runtime:m(s?.runtime,t?.runtime)}),R=async(s,t)=>{const e=d(u(s),`${t}.json`);try{const o=await f(e,"utf8");return JSON.parse(o)}catch{return}},b=async(s,t)=>{const e=u(s);let o;try{o=await l(e)}catch{return}const i=[];for(const n of o){if(!n.endsWith(".json")||t!==void 0&&n===`${t}.json`)continue;const r=d(e,n);try{const a=await p(r);a.isFile()&&i.push({mtimeMs:a.mtimeMs,path:r})}catch{}}if(i.length!==0){i.sort((n,r)=>r.mtimeMs-n.mtimeMs);try{const n=await f(i[0].path,"utf8");return JSON.parse(n)}catch{return}}},w=async s=>{const t=u(s);let e;try{e=await l(t)}catch{return[]}const o=[];for(const i of e){if(!i.endsWith(".json"))continue;const n=d(t,i);try{const r=await p(n);r.isFile()&&o.push({id:i.slice(0,-5),mtimeMs:r.mtimeMs,path:n})}catch{}}return o.sort((i,n)=>n.mtimeMs-i.mtimeMs),o};export{b as a,D as d,v as f,w as l,R as r};
@@ -1,11 +0,0 @@
1
- import{createRequire as q}from"node:module";import{e as m,z as U,v as S,U as J,m as z}from"./index-0dnGN3GP.js";import{v as A}from"./registry-DqBIZZSL.js";import{d as M,f as E}from"./detect-D8zxVYrU.js";import{y as K}from"./isAccessibleSync-DYKTrrvc-CBsMZhj-.js";import{h as ne}from"./env-5cWSxQ96.js";import{s as se}from"./watch-C-9-PD2m.js";let B;const V=e=>(B??=q(import.meta.url))(e),y=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,x=e=>{if(typeof y<"u"&&y.versions&&y.versions.node){const[t,n]=y.versions.node.split(".").map(Number);if(t>22||t===22&&n>=3||t===20&&n>=16)return y.getBuiltinModule(e)}return V(e)},{createHash:v}=x("node:crypto"),{spawnSync:G,spawn:H}=x("node:child_process"),{openSync:Y,writeSync:Q,closeSync:X,statSync:Z,readFileSync:O,mkdirSync:ee,writeFileSync:te}=x("node:fs"),{pathToFileURL:re}=x("node:url"),{availableParallelism:F}=x("node:os"),oe={error:"error",info:"info",information:"info",warning:"warning"},Ye={argsCheck:(e,t)=>k(e,t,!1),argsFix:(e,t)=>k(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 v("sha256").update(n.join("|")).digest("hex").slice(0,16)},detect:(e,t)=>{const n=M(t,A.biome.packageNames[0]),r=E(e,A.biome.configFiles);if(!(!n&&!r))return{adapter:"biome",configFile:r,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 r=[];for(const o of n.diagnostics??[]){const s=o.location?.start,i=o.location?.end,c=ie(t.root,o.location?.path),u=o.category??"",a=u==="format"||u.startsWith("format/");r.push({adapter:"biome",column:s?.column&&s.column>0?s.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:s?.line&&s.line>0?s.line:void 0,message:a?"Code style issues would be auto-fixed":o.message??"",ruleId:u||void 0,severity:oe[o.severity??""]??"warning"})}return r}},k=(e,t,n)=>{const r=["check","--reporter=json"];return n&&r.push("--write"),typeof t.maxWarnings=="number"&&r.push(`--max-diagnostics=${String(t.maxWarnings)}`),t.extraArgs?.length&&r.push(...t.extraArgs),r.push(...e),r},ie=(e,t)=>{const n=typeof t=="string"?t:t?.file;return n?n.startsWith("/")||/^[a-z]:[\\/]/i.test(n)?n:m(e,n):e},j="pyproject.toml",ce=/^\[tool\.ruff(?:\.[\w-]+)*\]\s*$/m,ae=/^Would reformat:?\s+(.+)$/,le=e=>{const t=m(e,j);if(!K(t))return!1;try{const n=U(t);return ce.test(n)}catch{return!1}},N=e=>(t,n)=>{const r=A.ruff.packageNames.map(c=>M(n,c)).find(c=>c!==void 0),o=E(t,A.ruff.configFiles),s=o?void 0:le(t)?m(t,j):void 0,i=o??s;if(!(!r&&!i))return{adapter:e,configFile:i,declared:!!r,declaredVersion:r,root:t}},ue=e=>e.startsWith("/")||/^[a-z]:[\\/]/i.test(e),P=(e,t)=>e?ue(e)?e:m(t,e):t,fe=e=>ae.exec(e)?.[1]?.trim(),Qe={argsCheck:(e,t)=>I(e,t,!1),argsFix:(e,t)=>I(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 v("sha256").update(n.join("|")).digest("hex").slice(0,16)},detect:N("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 r=[];for(const o of n){const s=o.location,i=o.end_location;r.push({adapter:"ruff-check",column:s?.column,endColumn:i?.column,endLine:i?.row,file:P(o.filename,t.root),fixable:!!o.fix,line:s?.row,message:o.message??"",ruleId:o.code,severity:"warning"})}return r}},Xe={argsCheck:(e,t)=>R(e,t,!1),argsFix:(e,t)=>R(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 v("sha256").update(n.join("|")).digest("hex").slice(0,16)},detect:N("ruff-fmt"),extensions:["py","pyi"],id:"ruff-fmt",kind:"fmt",parse:(e,t)=>{if(e.exitCode===0)return[];const n=[],r=new Set;for(const o of e.stdout.split(/\r?\n/)){const s=fe(o);!s||r.has(s)||(r.add(s),n.push({adapter:"ruff-fmt",file:P(s,t.root),fixable:!0,message:"Code style issues would be auto-fixed",severity:"info"}))}return n}},I=(e,t,n)=>{const r=["--output-format=json"];return n&&r.push("--fix"),t.quiet&&r.push("--quiet"),t.extraArgs?.length&&r.push(...t.extraArgs),r.push(...e),r},R=(e,t,n)=>{const r=[];return n||r.push("--check"),t.quiet&&r.push("--quiet"),t.extraArgs?.length&&r.push(...t.extraArgs),r.push(...e),r},Ze=(e,t)=>{const n=w(e,["diff","--name-only","--diff-filter=ACMR","-z",`${t}...HEAD`]);if(n===void 0)return;const r=w(e,["diff","--name-only","--diff-filter=ACMR","-z"]),o=w(e,["diff","--name-only","--diff-filter=ACMR","--cached","-z"]),s=w(e,["ls-files","--others","--exclude-standard","-z"]),i=new Set;for(const c of[n,r??"",o??"",s??""])for(const u of c.split("\0"))u.length!==0&&i.add(S(u)?u:m(e,u));return[...i].sort()},et=e=>{const t=w(e,["diff","--name-only","--diff-filter=ACMR","--cached","-z"]);if(t===void 0)return;const n=new Set;for(const r of t.split("\0"))r.length!==0&&n.add(S(r)?r:m(e,r));return[...n].sort()},w=(e,t)=>{const n=G("git",[...t],{cwd:e,encoding:"utf8",timeout:1e4});if(n.status===0)return n.stdout},tt=(e,t)=>{const n=new Set(t.map(s=>s.toLowerCase())),r=[],o=new Set;for(const s of e){const i=s.lastIndexOf(".");if(i===-1||i===s.length-1)continue;const c=s.slice(i+1).toLowerCase();n.has(c)&&(o.has(s)||(o.add(s),r.push(s)))}return r},de=new Set(["-","stdout"]),T=e=>({close:()=>{},write:t=>{e.write(t)}}),pe=e=>{ne(z(e));const t=Y(e,"w");let n=[];return{close:()=>{n.length>0&&(Q(t,n.join("")),n=[]),X(t)},write:r=>{n.push(r)}}},nt=e=>{const{cwd:t,target:n}=e;if(n===void 0||de.has(n))return T(process.stdout);if(n==="stderr")return T(process.stderr);const r=S(n)?n:J(t,n);return pe(r)},C=["oxlint","oxfmt","biome","eslint","dprint","prettier","stylelint","ruff-check","ruff-fmt","markdownlint","shellcheck","typecheck"],rt=(e,t)=>{const n=new Map(e.map(i=>[i.id,i])),r=[],o=new Set,s=t&&t.length>0?t:C;for(const i of s){const c=n.get(i);c&&!o.has(i)&&(r.push(c),o.add(i))}if(t&&t.length>0)for(const i of C){const c=n.get(i);c&&!o.has(i)&&(r.push(c),o.add(i))}for(const i of e)o.has(i.id)||(r.push(i),o.add(i.id));return r},st=(e,t,n)=>{const r=[];for(const o of t){const s=e.get(o.id);s&&me(o.kind,n)&&r.push({adapter:o,presence:s})}return r},me=(e,t)=>e===t||e==="both",ot=(e,t,n={})=>{const r=new Map;for(const o of e){const s=he(o),i=ge(s,t,n);if(!i)continue;const c=r.get(i);c?c.push(o):r.set(i,[o])}return r},he=e=>{const t=e.lastIndexOf(".");return t===-1||t===e.length-1?"":e.slice(t+1).toLowerCase()},ge=(e,t,n)=>{const r=n[e];if(r&&t.some(o=>o.adapter.id===r))return r;for(const{adapter:o}of t)if(o.extensions.includes(e))return o.id},it=(e,t,n)=>{const r=new Set(C),o=new Set([...n?.order??[],...Object.keys(n?.adapters??{})]);for(const s of o)r.has(s)||e.warn(`vis.config ${t}: unknown adapter "${s}" is ignored.`)},ye=e=>e==="error"?"error":e==="warning"?"warning":"notice",D=e=>e.replaceAll("%","%25").replaceAll("\r","%0D").replaceAll(`
2
- `,"%0A"),_=e=>D(e).replaceAll(",","%2C").replaceAll(":","%3A").replaceAll("=","%3D"),we=(e,t)=>t&&e.startsWith(`${t}/`)?e.slice(t.length+1):e,xe=(e,t)=>e.file!==t.file?e.file<t.file?-1:1:(e.line??0)-(t.line??0)||(e.column??0)-(t.column??0),ve=(e,t)=>{const n=ye(e.severity),r=we(e.file,t),o=e.ruleId?`${e.adapter}(${e.ruleId})`:e.adapter,s=[`file=${_(r)}`];return e.line!==void 0&&s.push(`line=${String(e.line)}`),e.endLine!==void 0&&s.push(`endLine=${String(e.endLine)}`),e.column!==void 0&&s.push(`col=${String(e.column)}`),e.endColumn!==void 0&&s.push(`endColumn=${String(e.endColumn)}`),s.push(`title=${_(o)}`),`::${n} ${s.join(",")}::${D(e.message)}
3
- `},ct=e=>e.runs.flatMap(n=>[...n.findings]).sort(xe).map(n=>ve(n,e.workspaceRoot)).join(""),g=e=>e.replaceAll("&","&amp;").replaceAll("<","&lt;").replaceAll(">","&gt;").replaceAll('"',"&quot;").replaceAll("'","&apos;"),Se=e=>`<![CDATA[${e.replaceAll("]]>","]]]]><![CDATA[>")}]]>`,Ae=(e,t)=>e.file!==t.file?e.file<t.file?-1:1:(e.line??0)-(t.line??0)||(e.column??0)-(t.column??0),$e=e=>e==="error"?"error":e==="warning"?"warning":"info",Ce=(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)}`},Fe=(e,t,n)=>{const r=Ce(e,n),o=$e(e.severity),s=e.ruleId?`[${e.ruleId}] ${e.message}`:e.message;return[` <testcase classname="${g(t)}" name="${g(r)}">`,` <failure type="${g(o)}" message="${g(s)}">${Se(e.message)}</failure>`," </testcase>",""].join(`
4
- `)},ke=(e,t,n)=>{const r=[...e.findings].sort(Ae),o=r.filter(f=>f.severity==="error").length,s=r.filter(f=>f.severity==="warning").length,i=r.length,c=(e.durationMs/1e3).toFixed(3),u=r.map(f=>Fe(f,e.adapter,n)).join("");return` <testsuite ${[`name="${g(e.adapter)}"`,`tests="${String(i)}"`,`failures="${String(o)}"`,'errors="0"',`skipped="${String(s)}"`,`time="${c}"`,`timestamp="${t}"`].join(" ")}>
5
- ${u} </testsuite>
6
- `},at=e=>{const t=(e.now??new Date).toISOString(),n=e.suiteName??"vis-lint-fmt",r=e.runs.map(a=>ke(a,t,e.workspaceRoot)).join(""),o=e.runs.reduce((a,f)=>a+f.findings.length,0),s=e.runs.reduce((a,f)=>a+f.findings.filter(l=>l.severity==="error").length,0),i=e.runs.reduce((a,f)=>a+f.findings.filter(l=>l.severity==="warning").length,0),c=(e.runs.reduce((a,f)=>a+f.durationMs,0)/1e3).toFixed(3);return`<?xml version="1.0" encoding="UTF-8"?>
7
- <testsuites ${[`name="${g(n)}"`,`tests="${String(o)}"`,`failures="${String(s)}"`,'errors="0"',`skipped="${String(i)}"`,`time="${c}"`].join(" ")}>
8
- ${r}</testsuites>
9
- `},Ie="2.1.0",Re="https://json.schemastore.org/sarif-2.1.0.json",Te=e=>e==="error"?"error":e==="warning"?"warning":"note",_e=(e,t)=>t&&e.startsWith(`${t}/`)?{uri:e.slice(t.length+1),uriBaseId:"SRCROOT"}:{uri:e},be=e=>{const{href:t}=re(e);return t.endsWith("/")?t:`${t}/`},Le=(e,t)=>e.file!==t.file?e.file<t.file?-1:1:(e.line??0)-(t.line??0)||(e.column??0)-(t.column??0),Me=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()]},Ee=(e,t)=>{const{uri:n,uriBaseId:r}=_e(e.file,t),o={artifactLocation:r?{uri:n,uriBaseId:r}:{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 s={level:Te(e.severity),locations:[{physicalLocation:o}],message:{text:e.message}};return e.ruleId&&(s.ruleId=e.ruleId),s},Oe=(e,t)=>{const n=[...e.findings].sort(Le),r=Me(n),o={name:e.adapter,rules:r};e.presence?.declaredVersion&&(o.version=e.presence.declaredVersion);const s={results:n.map(i=>Ee(i,t)),tool:{driver:o}};return t&&(s.originalUriBaseIds={SRCROOT:{uri:be(t)}}),s},lt=e=>{const t={$schema:Re,runs:e.runs.map(n=>Oe(n,e.workspaceRoot)),version:Ie};return`${JSON.stringify(t,void 0,2)}
10
- `},b={error:3,info:1,warning:2},ut=e=>{const t=[],n=[];let r,o=!1;for(const s of e){n.push({adapter:s.adapter,durationMs:s.durationMs,exitCode:s.exitCode,findingCount:s.findings.length}),s.exitCode!==0&&s.exitCode!==null&&s.findings.length===0&&(o=!0);for(const i of s.findings)t.push(i),(!r||b[i.severity]>b[r])&&(r=i.severity)}return{findings:t,hadProcessFailure:o,maxSeverity:r,runs:n}},ft=e=>{const t=new Map;for(const n of e){const r=t.get(n.file);r?r.push(n):t.set(n.file,[n])}return t},dt=e=>e.hadProcessFailure||e.maxSeverity==="error"?1:0,je=(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},Ne=e=>{try{const t=O(e);return v("sha256").update(t).digest("hex")}catch{return}},Pe=(e,t,n,r,o)=>{const s=e.cacheKey(t,r),i=[];for(const u of[...n].sort()){const a=S(u)?u:m(t.root,u);try{Z(a)}catch{return}const f=Ne(a);if(!f)return;i.push({hash:f,path:a})}const c=v("sha256");c.update(e.id),c.update("\0"),c.update(s),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")}},W=(e,t)=>m(e,"lint-fmt",t),De=(e,t,n)=>{const r=m(W(e,t.id),`${n}.json`);try{const o=O(r,"utf8"),s=JSON.parse(o);return s.schema!==1?void 0:s}catch{return}},We=(e,t,n,r,o)=>{const s=W(e,t.id),i={fileHashes:o,result:r,savedAt:Date.now(),schema:1};try{ee(s,{recursive:!0}),te(m(s,`${n}.json`),JSON.stringify(i))}catch{}},L=async(e,t,n,r,o)=>{const s=e.bin(t),i=[...s.slice(1),...o==="fix"?e.argsFix(n,r):e.argsCheck(n,r)];return new Promise(c=>{const u=Date.now(),a=H(s[0],i,{cwd:t.root}),f=[],l=[];let h=!1;const p=setTimeout(()=>{h=!0,a.kill("SIGKILL")},6e4);a.stdout.on("data",d=>f.push(d)),a.stderr.on("data",d=>l.push(d)),a.on("error",d=>{clearTimeout(p),c({durationMs:Date.now()-u,exitCode:null,stderr:d.message,stdout:""})}),a.on("close",d=>{clearTimeout(p),c({durationMs:Date.now()-u,exitCode:h?null:d,stderr:Buffer.concat(l).toString("utf8"),stdout:Buffer.concat(f).toString("utf8")})})})},pt=async(e,t,n,r=F())=>{if(e.length===0)return[];const{cacheRoot:o,concurrency:s}=typeof r=="number"?{concurrency:r}:{cacheRoot:r.cacheRoot,concurrency:r.concurrency??F()},i=async l=>{const h=l.options??t;if(o&&je(l.files,n)){const p=Pe(l.adapter,l.presence,l.files,h,n);if(p){const d=De(o,l.adapter,p.key);if(d)return d.result;const $=await L(l.adapter,l.presence,l.files,h,n);return $.exitCode!==null&&We(o,l.adapter,p.key,$,p.fileHashes),$}}return L(l.adapter,l.presence,l.files,h,n)};if(process.env.VIS_LINT_FMT_SERIAL==="1"){const l=[];for(const h of e)l.push(await i(h));return l}const c=Math.max(1,Math.min(s,e.length)),u=Array.from({length:e.length});let a=0;const f=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},()=>f())),u},qe=e=>{const t=new Set;for(const n of e)t.add(n.toLowerCase());return t},Be=(e,t)=>{const n=e.lastIndexOf(".");return n===-1||n===e.length-1?!1:t.has(e.slice(n+1).toLowerCase())},mt=async e=>{const{extensions:t,initialFiles:n,label:r,log:o,runCycle:s,workspaceRoot:i}=e,c=o??(p=>{process.stdout.write(`${p}
11
- `)}),u=qe(t);await s(n),c(`▸ ${r}: watching workspace — press Ctrl-C to exit`);let a=new Set,f=!1;const l=async()=>{for(;a.size>0;){const p=[...a];a=new Set;try{await s(p)}catch(d){c(`✗ ${r}: watch cycle failed — ${d.message}`)}}},h=se({debounceMs:200,filter:p=>Be(p,u),onChange:async p=>{for(const d of p)a.add(S(d)?d:m(i,d));if(!f){f=!0;try{await l()}finally{f=!1}}},paths:[i]});await new Promise(p=>{const d=()=>{h.close(),process.off("SIGINT",d),process.off("SIGTERM",d),p()};process.once("SIGINT",d),process.once("SIGTERM",d)})};export{st as a,mt as b,Ze as c,Ye as d,Xe as e,ot as f,pt as g,ut as h,nt as i,lt as j,at as k,ct as l,dt as m,ft as n,Qe as o,tt as p,rt as r,et as s,it as w};