Lines 1-89javascript
1import {a}from'./chunk-MKDRULJ6.js';import {p,o,j,n,a as a$1,i,k,d,e,q,r,s}from'./chunk-XTHPCEME.js';import {b}from'./chunk-EK7ODJWE.js';import*as B from'path';import {basename,dirname}from'path';import*as xe from'fs/promises';import {readFile,mkdtemp,rm as rm$1,mkdir,writeFile}from'fs/promises';import U from'typescript';import*as us from'crypto';import E from'chalk';import*as An from'os';import {parse}from'yaml';import {spawn,execFile}from'child_process';import*as sn from'fs';import {mkdirSync,writeFileSync}from'fs';import {createRequire}from'module';import*as oa from'zlib';import {promisify} ...
2`&&t[o]!=="\r";o++)c+=t[o];if(c=c.trim(),c[c.length-1]==="/"&&(c=c.substring(0,c.length-1),o--),!La(c)){let p;return c.trim().length===0?p="Invalid space after '<'.":p="Tag '"+c+"' is an invalid name.",G("InvalidTag",p,te(t,o))}let l=Ca(t,o);if(l===false)return G("InvalidAttr","Attributes for '"+c+"' have open quote.",te(t,o));let u=l.value;if(o=l.index,u[u.length-1]==="/"){let p=o-u.length;u=u.substring(0,u.length-1);let f=_s(u,e);if(f===true)r=true;else return G(f.err.code,f.err.msg,te(t,p+f.err.line))}else if(a)if(l.tagClosed){if(u.trim().length>0)return G("InvalidTag","Closing tag '"+c+"' ...
HighChild Process
Package source references child process execution.
dist/chunk-2GHB73ES.jsView on unpkg · L1 3`||t==="\r"}function Rs(t,e){let n=e;for(;e<t.length;e++)if(t[e]=="?"||t[e]==" "){let r=t.substr(n,e-n);if(e>5&&r==="xml")return G("InvalidXml","XML declaration allowed only at the start of the document.",te(t,e));if(t[e]=="?"&&t[e+1]==">"){e++;break}else continue}return e}function Is(t,e){if(t.length>e+5&&t[e+1]==="-"&&t[e+2]==="-"){for(e+=3;e<t.length;e++)if(t[e]==="-"&&t[e+1]==="-"&&t[e+2]===">"){e+=2;break}}else if(t.length>e+8&&t[e+1]==="D"&&t[e+2]==="O"&&t[e+3]==="C"&&t[e+4]==="T"&&t[e+5]==="Y"&&t[e+6]==="P"&&t[e+7]==="E"){let n=1;for(e+=8;e<t.length;e++)if(t[e]==="<"
4`);let e=new ie("!xml"),n=e,r="";this.matcher.reset(),this.entityDecoder.reset(),this.entityExpansionCount=0,this.currentExpandedLength=0;let s=this.options,o=new yn(s.processEntities),i=t.length;for(let a=0;a<i;a++)if(t[a]==="<"){let l=t.charCodeAt(a+1);if(l===47){let u=Kt(t,">",a,"Closing Tag is not closed."),p=t.substring(a+2,u).trim();if(s.removeNSPrefix){let d=p.indexOf(":");d!==-1&&(p=p.substr(d+1));}p=Fr(s.transformTagName,p,"",s).tagName,n&&(r=this.saveTextToParentTag(r,n,this.readonlyMatcher));let f=this.matcher.getCurrentTag();if(p&&s.unpairedTagsSet.has(p))throw new Error(`Unpaired ...
5`,i===e&&(s+=" ".repeat(o+n+2),s+=`^
6`));}return s}var R=class extends Error{line;column;codeblock;constructor(e,n){let[r,s]=Rc(n.toml,n.ptr),o=Ic(n.toml,r,s);super(`Invalid TOML document: ${e}
8${o}`,n),this.line=r,this.column=s,this.codeblock=o;}};var _c=/^((0x[0-9a-fA-F](_?[0-9a-fA-F])*)|(([+-]|0[ob])?\d(_?\d)*))$/,Fc=/^[+-]?\d(_?\d)*(\.\d(_?\d)*)?([eE][+-]?\d(_?\d)*)?$/,Oc=/^[+-]?0[0-9_]/;function nr(t,e){let n=t[e++],r=n,s=n==="'",o=n===t[e]&&n===t[e+1];o&&(t[e+=2]===`
9`?e++:t[e]==="\r"&&t[e+1]===`
10`&&(e+=2));let i="",a=e,c=0;for(let l=e;l<t.length;l++)if(n=t[l],o&&(n===`
11`||n==="\r"&&t[l+1]===`
12`))c=c&&3;else {if(n<" "&&n!==" "||n==="\x7F")throw new R("control characters are not allowed in strings",{toml:t,ptr:l});if((!c||c===3)&&n===r&&(!o||t[l+1]===r&&t[l+2]===r))return o&&(t[l+3]===r&&l++,t[l+3]===r&&l++),[c?i:i+t.slice(a,l),l+(o?3:1)];if(!c)!s&&n==="\\"&&(i+=t.slice(a,a=l),c=1);else if(c===1)if(n==="x"||n==="u"||n==="U"){let u=0,p=n==="x"?2:n==="u"?4:8;for(let f=0;f<p;f++,l++){let d=t.charCodeAt(l+1),h=d>=48&&d<=57?d-48:d>=65&&d<=70?d-65+10:d>=97&&d<=102?d-97+10:-1;if(h<0)throw new R("invalid non-hex character in unicode escape",{toml:t,ptr:l+1});u=u<<4|h;}if(u<0||u>1114111||u>=5 ...
13`;else if(n==="f")i+="\f";else if(n==="r")i+="\r";else if(n==="e")i+="\x1B";else if(n==='"')i+='"';else if(n==="\\")i+="\\";else throw new R("unrecognized escape sequence",{toml:t,ptr:l});a=l+1,c=0;}else if(n!==" "&&n!==" "){if(c===2)throw new R("invalid escape: only line-ending whitespace may be escaped",{toml:t,ptr:a});c=!s&&n==="\\"?1:0,a=l;}}throw new R("unfinished string",{toml:t,ptr:e})}function xo(t,e,n,r){if(t===
14`,e);return t[r-1]==="\r"&&r--,r<=n?r:-1}function Yt(t,e){for(let n=e;n<t.length;n++){let r=t[n];if(r===`
15`)return n;if(r==="\r"&&t[n+1]===`
16`)return n+1;if(r<" "&&r!==" "||r==="\x7F")throw new R("control characters are not allowed in comments",{toml:t,ptr:e})}return t.length}function Te(t,e,n,r){let s;for(;;){for(;(s=t[e])===" "||s===" "||!n&&(s===`
17`||s==="\r"&&t[e+1]===`
18`);)e++;if(r||s!=="#")break;e=Yt(t,e);}return e}function Eo(t,e,n,r,s=false){if(!r)return e=rr(t,e),e<0?t.length:e;for(let o=e;o<t.length;o++){let i=t[o];if(i==="#")o=rr(t,o);else {if(i===n)return o+1;if(i===r||s&&(i===`
19`||i==="\r"&&t[o+1]===`
20`))return o}}throw new R("cannot find end of structure",{toml:t,ptr:e})}function Bc(t,e,n){let r=t.slice(e,n),s=r.indexOf("#");return s>-1&&(Yt(t,s),r=r.slice(0,s)),[r.trimEnd(),s]}function wn(t,e,n,r,s){if(r===0)throw new R("document contains excessively nested structures. aborting.",{toml:t,ptr:e});let o=t[e];if(o==="["||o==="{"){let[c,l]=o==="["?To(t,e,r,s):jo(t,e,r,s);if(n){if(l=Te(t,l),t[l]===",")l++;else if(t[l]!==n)throw new R("expected comma or end of structure",{toml:t,ptr:l})}return [c,l]}if(o==='"'||o==="'"){let[c,l]=nr(t,e);if(n){if(l=Te(t,l),t[l]&&t[l]!==","&&t[l]!==n&&t[l]!==`
21`&&t[l]!=="\r")throw new R("unexpected character encountered",{toml:t,ptr:l});t[l]===","&&l++;}return [c,l]}let i=Eo(t,e,",",n),a=Bc(t,e,i-(t[i-1]===","?1:0));if(!a[0])throw new R("incomplete key-value declaration: no value specified",{toml:t,ptr:e});return n&&a[1]>-1&&(i=Te(t,e+a[1]),t[i]===","&&i++),[xo(a[0],t,e,s),i]}var Vc=/^[a-zA-Z0-9-_]+[ \t]*$/;function sr(t,e,n="="){let r=e-1,s=[],o=t.indexOf(n,e);if(o<0)throw new R("incomplete key-value: cannot find end of key",{toml:t,ptr:e});do{let i=t[e=++r];if(i!==" "&&i!==" ")if(i==='"'||i==="'"){if(i===t[e+1]&&i===t[e+2])throw new R("multiline s ...
22`&&i!=="\r"){let a,c=s,l=false,[u,p]=sr(t,e-1);for(let h=0;h<u.length;h++){if(h&&(c=l?c[a]:c[a]={}),a=u[h],(l=Object.hasOwn(c,a))&&(typeof c[a]!="object"||o.has(c[a])))throw new R("trying to redefine an already defined value",{toml:t,ptr:e});!l&&a==="__proto__"&&Object.defineProperty(c,a,{enumerable:true,configurable:true,writable:true});}if(l)throw new R("trying to redefine an already defined value",{toml:t,ptr:e});let[f,d]=wn(t,p,"}",n-1,r);o.add(f),c[a]=f,e=d;}}if(!i)throw new R("unfinished table encountered",{toml:t,ptr:e});return [s,e]}function To(t,e,n,r){let s=[],o;for(e++;(o=t[e++])!== ...
23`&&o!=="\r"){let i=wn(t,e-1,"]",n-1,r);s.push(i[0]),e=i[1];}}if(!o)throw new R("unfinished array encountered",{toml:t,ptr:e});return [s,e]}function Co(t,e,
24`&&t[a]!=="\r")throw new R("each key-value declaration must be followed by an end-of-line",{toml:t,ptr:a});a=Te(t,a);}return r}var Pt=b(a(),1);var Mt=b(a(),1),Ie=b(a(),1),_e=b(a(),1),Ae=b(a(),1),ut=b(a(),1),Fe=b(a(),1),Oe=b(a(),1),gr=b(a(),1),Se=b(a(),1),yr=b(a(),1),$t=b(a(),1),ke=b(a(),1),rn=b(a(),1),re=b(a(),1),me=b(a(),1),Be=b(a(),1),K=b(a(),1),$e=b(a(),1),pt=b(a(),1);var Ve=b(a(),1),Pn=b(a(),1),Mn=b(a(),1),$n=b(a(),1),ce=b(a(),1),ye=b(a(),1),ve=b(a(),1),be=b(a(),1),we=b(a(),1),Ee=b(a(),1),ra=b(a(),1);var Dc=["vibgrate.config.ts","vibgrate.config.js","vibgrate.config.json"],Uc="VIBGRATE_TRU ...
25
MediumDynamic Require
Package source references dynamic require/import behavior.
dist/chunk-2GHB73ES.jsView on unpkg · L23 26const config: VibgrateConfig = {
27 // exclude: ['legacy/**'],
28 // maxFileSizeToScan: 5_242_880, // 5 MB (default)
29 // projectScanTimeout: 180, // 3 min per project (default, in seconds)
34 dependencyTwoPlusPercent: 50,
38 dependencyTwoPlusPercent: 30,
49 ${l.runtime} \u2192 ${l.runtimeLatest} (${l.runtimeMajorsBehind} major${l.runtimeMajorsBehind>1?"s":""} behind)`);a+=c.join(""),e.push({title:`Upgrade EOL runtime${n.length>1?"s":""} in ${i}`,explanation:a,impact:`\u2212${Math.min(n.length*10,30)} drift points (runtime & EOL)`,severity:100});}let r=[];for(let i of t.projects)for(let a of i.frameworks)a.majorsBehind!==null&&a.majorsBehind>=3&&r.push({name:a.name,fw:`${a.currentVersion} \u2192 ${a.latestVersion}`,behind:a.majorsBehind,project:i.name,projectPath:i.path});if(r.length>0){let i=r.sort((f,d)=>d.behind-f.behind)[0],a=r.length>1 ...
50 ./${f.projectPath}`),l.push(`
51 ${f.name}: ${f.fw} (${f.behind} major${f.behind>1?"s":""} behind)`),u++;}let p=r.length-u;c+=l.join(""),p>0&&(c+=`
52 ... and ${p} more`),e.push({title:`Upgrade ${i.name} ${i.fw} in ${i.project}${a}`,explanation:c,impact:"\u22125\u201315 drift points",severity:90});}for(let i of t.projects){let a=i.dependencyAgeBuckets,c=a.current+a.oneBehind+a.twoPlusBehind;if(c===
53 ./${i.path}`);for(let g of p){if(d>=8)break;let y=g.resolvedVersion??g.currentSpec,w=g.latestStable??"?";f.push(`
54 ${g.package}: ${y} \u2192 ${w} (${g.majorsBehind} major${g.majorsBehind>1?"s":""} behind)`),d++;}let h=p.length-d;u+=f.join(""),h>0&&(u+=`
55 ... and ${h} more`);}e.push({title:`Reduce dependency rot in ${i.name} (${l}% severely outdated)`,explanation:u,impact:"\u22125\u201310 drift points",severity:80+l/10});}}let s=[];for(let i of t.projects)for(let a of i.frameworks)a.majorsBehind===2&&s.push({name:a.name,project:i.name,projectPath:i.path,fw:`${a.currentVersion} \u2192 ${a.latestVersion}`});let o=[...new Map(s.map(i=>[i.name,i])).values()];if(o.length>0){let i=o.slice(0,3).map(f=>`${f.name} (${f.fw})`).join(", "),a=o.length>3?` +${o.length-3} more`:"",c="These frameworks are 2 major versions behind. Create upgrade tickets an ...
56 ./${f.projectPath}`),l.push(`
57 ${f.name}: ${f.fw}`),u++;}let p=s.length-u;c+=l.join(""),p>0&&(c+=`
58 ... and ${p} more`),e.push({title:`Plan major framework upgrades: ${i}${a}`,explanation:c,impact:"\u22125\u201310 drift points",severity:60});}if(t.extended?.breakingChangeExposure){let i=t.extended.breakingChangeExposure,a=i.deprecatedPackages.length+i.legacyPolyfills.length;if(a>0){let c=[...i.deprecatedPackages,...i.legacyPolyfills].slice(
59 ./${g.path}`);for(let w of y){if(d>=10)break;let j=w.resolvedVersion??w.currentSpec,P=i.deprecatedPackages.includes(w.package)?"deprecated":"polyfill";f.push(`
60 ${w.package}: ${j} (${P})`),d++;}}}let h=a-d;u+=f.join(""),h>0&&(u+=`
61 ... and ${h} more`),e.push({title:`Replace deprecated/legacy packages: ${c}${l}`,explanation:u,severity:55});}}if(t.extended?.dependencyGraph){let i=t.extended.dependencyGraph,a=i.phantomDependencies.length;if(a>=10){let c="Packages used in code but not declared in package.json. These rely on transitive installs and can break unpredictably when other packages update.",l=i.phantomDependencyDetails;if(l&&l.length>0){let u=new Map;for(let h of l)u.has(h.sourcePath)||u.set(h.sourcePath,[]),u.get(h.sourcePath).push({package:h.package,spec:h.spec});let p=[],f=0;for(let[h,g]of u){if(f>=10)break; ...
62 ./${h}`);for(let y of g){if(f>=10)break;p.push(`
63 ${y.package}: ${y.spec}`),f++;}}let d=a-f;c+=p.join(""),d>0&&(c+=`
64 ... and ${d} more`);}e.push({title:`Fix ${a} phantom dependencies`,explanation:c,severity:45});}}if(t.extended?.securityPosture){let i=t.extended.securityPosture;if(i.envFilesTracked||!i.lockfilePresent){let a=[];i.envFilesTracked&&a.push(".env files are tracked in git"),i.lockfilePresent||a.push("no lockfile found");let c;i.envFilesTracked?(c="Environment files may contain secrets. Add them to .gitignore and rotate any exposed credentials immediately.",c+=
66 Add: .env, .env.*, .env.local`):(c="Without a lockfile, installs are non-deterministic. Run the install command to generate one and commit it.",c+=`
68 Missing: ${i.lockfileTypes.length>0?i.lockfileTypes.join(", ")+" (multiple types detected)":"package-lock.json, pnpm-lock.yaml, or yarn.lock"}`),e.push({title:`Fix security posture: ${a.join(", ")}`,explanation:c,severity:95});}}if(t.extended?.dependencyGraph){let a=t.extended.dependencyGraph.duplicatedPackages.filter(c=>c.versions.length>=
69 ${d.name}: ${d.versions.join(", ")} (${d.consumers} consumer${d.consumers!==1?"s":""})`),p++;}let f=a.length-p;l+=u.join(""),f>0&&(l+=`
70 ... and ${f} more`),e.push({title:"Deduplicate heavily-versioned packages",explanation:l,severity:35});}}return e.sort((i,a)=>a.severity-i.severity),e.slice(0,5)}function Cl(t){let e=Al(t.findings),n=t.findings.map(r=>Pl(r));return {$schema:
71`)}var Ll=/^node_modules\/((?:@[^/]+\/)?[^/]+)$/;function Nl(t){let e=new Map;if(!t||typeof t!="object")return e;let n=t;if(n.packages&&typeof n.packages=="object")for(let[r,s]of Object.entries(n.packages)){let o=s?.version;if(!o)continue;let i=Ll.exec(r);i&&e.set(i[1],o);}if(e.size===0&&n.dependencies&&typeof n.dependencies=="object")for(let[r,s]of Object.entries(n.dependencies)){let o=s?.version;o&&e.set(r,o);}return e}function Rl(t){let e=t.indexOf("@",t.startsWith("@")?1:0);return e>0?t.slice(0,e):null}function Il(t){let e=new Map,n=new Map,r=[];for(let s of t.split(`
72`))if(!(!s.trim()||s.trimStart().startsWith("#")))if(!/^\s/.test(s))r=s.replace(/:\s*$/,"").split(",").map(o=>o.trim().replace(/^"|"$/g,"")).filter(Boolean);else {let o=/^\s+version:?\s+"?([^"\s]+)"?/.exec(s);if(o&&r.length){let i=o[1];for(let a of r){let c=Rl(a);c&&(e.set(a,i),n.set(c,i));}r=[];}}return {bySpec:e,byName:n}}function _l(t){let e=t.split("(")[0].trim().replace(/^\/+/,""),n=e.lastIndexOf("@");return n>0&&/^\d/.test(e.slice(n+1))&&(e=e.slice(n+1)),/^\d/.test(e)?e:null}function Fl(t){let e=new Map;if(!t||typeof t!="object")return e;let n=t,r=s=>{if(!(!s||typeof s!="object"))for(let ...
73`)){let r=ps(n);r&&e.push(r);}return e}function Au(t){let e={dependencies:[]},n=t.match(/^\s*name\s*=\s*"([^"]+)"/m);n&&(e.projectName=n[1]);let r=t.
74`);for(let a of i){let c=a.match(/^\s*([A-Za-z0-9][-A-Za-z0-9_.]*)\s*=\s*(?:"([^"]+)"|{.*?version\s*=\s*"([^"]+)".*?})/
75`);for(let o of s){let i=o.match(/^\s*([A-Za-z0-9][-A-Za-z0-9_.]*)\s*=\s*(?:"([^"]+)"|{.*?version\s*=\s*"([^"]+)".*?}
76`);for(let o of s){let i=o.match(/^\s*([A-Za-z0-9][-A-Za-z0-9_.]*)\s*=\s*(?:"([^"]+)"|{.*?version\s*=\s*"([^"]+)".*?}
77`)){let c=ps(a);c&&e.deps.push(c);}}}return e}var ki=new Set(["requirements.txt","requirements-dev.txt","requirements_dev.txt","requirements-test.txt","dev-requirements.txt","pyproject.toml","setup.py","setup.cfg","Pipfile"]);async function $u(t,e,n,r,s=Ne){let o=n?await n.findFiles(t,l=>ki.has(l)||/^requirements.*\.txt$/.test(l)):await Lu(t),i=new Map;for(let l of o){let u=B.dirname(l);i.has(u)||i.set(u,[]),i.get(u).push(l);}let a=[],c=r??n?.projectScanTimeout??18e4;for(let[l,u]of i)try{let p=Nu(l,u,t,e,n,s),f=await Me(p,c);if(f.ok)a.push(f.value);else {let d=B.relative(t,l);n&&n.addStuckPath ...
78`)){let r=n.trim();if(!r||r.startsWith("#")||r.startsWith("empty="))continue;let s=Ru.exec(r);if(!s)continue;let o=`${s[1]}:${s[2]}`;e.has(o)||e.set(o,s[3]);}return e}async function Iu(t,e){let n=B.join(t,"gradle.lockfile");if(!await e.exists(n).catch(()=>false))return null;try{let r=Ei(await e.readText(n));return r.size?{size:r.size,resolve:s=>r.get(s)??null}:null}catch{return null}}var _u=new je({ignoreAttributes:false,attributeNamePrefix:"@_"}),Do={"org.springframework.boot:spring-boot-starter-web":"Spring Boot Web","org.springframework.boot:spring-boot-starter":"Spring Boot","org.springfra ...
79`)){let r=Gu.exec(n);if(!r)continue;let s=r[1],o=r[2].split("-")[0].trim();/^\d/.test(o)&&(e.has(s)||e.set(s,o));}return e}async function Hu(t,e){let n=B.join(t,"Gemfile.lock");if(!await e.exists(n).catch(()=>false))return null;try{let r=qu(
80`),l=xd(c);l.length&&s.push({version:a,tag:i,url:o.html_url??null,date:o.published_at??null,signals:l,excerpt:Ed(c)});}return s.sort((o,i)=>K.lt(o.version,i.version)?-1:K.gt(o.version,i.version)?1:o.tag.localeCompare(i.tag)),s}async function Hi(t){let e=new AbortController,n=setTimeout(()=>e.abort(),wd);try{let r=await fetch(t,{signal:e.signal,headers:{"user-agent":"vibgrate-cli",accept:"application/json"}});return r.ok?await r.json():null}catch{return null}finally{clearTimeout(n);}}async function Pd(t,e){let n=kd[t];if(!n)return null;let s=(await Hi(`https://packages.ecosyste.ms/api/v1/regist ...
HighSame File Env Network Execution
A single source file combines environment access, network access, and code or shell execution; review context before blocking.
dist/chunk-2GHB73ES.jsView on unpkg · L69 81`)){if(!c)continue;let l=c.split(Nd);l.length<6||a.push({sha:l[0],shortSha:l[1],authorName:l[2],authorEmail:l[3],date:l[4],subject:l[5]});}return a.reverse(),a}async function Fd(t,e,n){if(!/^[0-9a-f]{4,40}$/i.test(e))return null;let r=await Rn(t);if(!r)return null;let s=await br(r,["show",`${e}:${Wi(n)}`]);return s.ok?s.stdout:null}var Ji=3,Ki="version-timeline.json";function he(t,e,n){if(!e||!n)return;let r=t.get(e);if(r===void 0){t.set(e,n);return}let s=pt.valid(pt.coerce(r)),o=pt.valid(pt.coerce(n));s&&o?pt.gt(o,s)&&t.set(e,n):n>r&&t.set(e,n);}function is(t){let e=new Map,n;try{n=JSON.parse ...
82`)){if(/^\S/.test(r)){n=/^packages:\s*$/.test(r);continue}if(!n)continue;let s=r.match(/^ {2}(\S.*?):\s*$/);if(!s)continue;let o=s[1].trim();(o.startsWith("'")&&o.endsWith("'")||o.startsWith('"')&&o.endsWith('"'))&&(o=o.slice(1,-1));let i=Od(o);i&&he(e,i.name,i.version);}return e}function Vd(t){let e=t.split(",")[0].trim().replace(/^"/,"").replace(/"$/,""),n=e.indexOf("@",e.startsWith("@")?1:0);return n<=0?null:e.slice(0,n)}function Dd(t){let e=new Map,n=null;for(let r of t.split(`
83`)){if(!r.trim()||r.trimStart().startsWith("#"))continue;if(/^\S/.test(r)||r.startsWith('"')){n=Vd(r.replace(/:\s*$/,""));continue}let s=r.match
84`)){if(/^\S/.test(r)){n=false;continue}if(/^ {2}specs:\s*$/.test(r)){n=true;continue}if(!n)continue;let s=r.match(/^ {4}(\S+) \(([^)]+)\)\s*$/);s&&he(e,s[1],s[2].split("-")[0].trim());}return e}function qd(t){let e=new Map,n=false;for(let r of t.split(`
85`)){let s=r.replace(/\/\/.*$/,"").trim();if(!s)continue;if(n){if(s===")"){n=false;continue}let i=s.match(/^(\S+)\s+(v\S+)/);i&&he(e,i[1],i[2]);continue}if(s==="require ("){n=true;continue}let o=s.match(/^require\s+(\S+)\s+(v\S+)/);o&&he(e,o[1],o[2]);}return e}function Hd(t){let e=new Map,n;try{n=JSON.parse(t);}catch{return e}let r=n;for(let s of ["default","develop"]){let o=r?.[s];if(!(!o||typeof o!="object"))for(let[i,a]of Object.entries(o)){let c=a&&typeof a=="object"?a.version:void 0;typeof c=="string"&&he(e,i,c.replace(/^==/,"").trim());}}return e}function zd(t){let e=new Map,n=false,r=nul ...
86`)){if(/^\S/.test(s)){n=/^packages:\s*$/.test(s),r=null;continue}if(!n)continue;let o=s.match(/^ {2}(\S+):\s*$/);if(o){r
87`).filter(Boolean),l=[];for(let f of c){if(/[+-](?:alpha|beta|rc|pre|dev)/i.test(f)||/v\d+\.\d+\.\d+-\d{14}-[a-f0-9]+/.test(f))continue;let d=ye.valid(ye.clean(f));d&&l.push(d);}let p=[...l].sort(ye.rcompare)[0]??null;return {latest:p,stableVersions:l,latestStableOverall:p}}catch{return {latest:null,stableVersions:[],latestStableOverall:null}}});return this.meta.set(t,n),n}},ym=class{constructor(t,e,n=false){this.sem=t,this.manifest=e,this.offline=n;}meta=new Map;get(t){let e=this.meta.get(t);if(e)return e;let n=this.sem.run(async()=>{let r=W(this.manifest,"cargo",t);if(r){let s=[];for(let a o ...
88`)){if(o.startsWith("#")||o.startsWith("^"))continue;let i=o.trim().split(" ");if(i.length>=2&&i[1]===e)return i[0]}}catch{}}async function xm(t){
89`)}}function Cm(t,e){let n=["flowchart LR"],r=new Map(e.map(a=>[a.path,a])),s=e.filter(a=>a.projectReferences?.some(c=>c.path===t.path)),o=(t.projectReferences??[]).map(a=>r.get(a.path)).filter(a=>!!a),i=Re(t.projectId||t.path||t.name);n.push(`${i}["${Zt(Cn(t))}"]`),n.push(`class ${i} ${en(t.drift?.score)}`);for(let a of s){let c=Re(a.projectId||a.path||a.name);n.push(`${c}["${Zt(Cn(a))}"]`),n.push(`class ${c} ${en(a.drift?.score)}`),n.push(`${c} --> ${i}`);}for(let a of o){let c=Re(a.projectId||a.path||a.name);n.push(`${c}["${Zt(Cn(a))}"]`),n.push(`class ${c} ${en(a.drift?.score)}`),n.push(`
Long lines were clipped for display.