@visulima/vis 1.0.0-alpha.44 → 1.0.0-alpha.46

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 (145) hide show
  1. package/CHANGELOG.md +57 -0
  2. package/dist/bin.js +1 -1
  3. package/dist/binx.js +1 -1
  4. package/dist/packem_chunks/CONFIG_FILES.js +3 -3
  5. package/dist/packem_chunks/agent-instructions.js +11 -0
  6. package/dist/packem_chunks/bloom-status.js +1 -1
  7. package/dist/packem_chunks/bloom-sync.js +1 -1
  8. package/dist/packem_chunks/catalog.js +63 -62
  9. package/dist/packem_chunks/cli-exec.js +1 -1
  10. package/dist/packem_chunks/cli-main.js +172 -973
  11. package/dist/packem_chunks/defineReleasePlugin.js +3 -0
  12. package/dist/packem_chunks/detect.js +1 -1
  13. package/dist/packem_chunks/fix.js +1 -1
  14. package/dist/packem_chunks/group-tags.js +1 -0
  15. package/dist/packem_chunks/handler.js +1 -1
  16. package/dist/packem_chunks/handler10.js +1 -1
  17. package/dist/packem_chunks/handler11.js +1 -1
  18. package/dist/packem_chunks/handler12.js +2 -2
  19. package/dist/packem_chunks/handler13.js +1 -1
  20. package/dist/packem_chunks/handler14.js +1 -1
  21. package/dist/packem_chunks/handler15.js +1 -1
  22. package/dist/packem_chunks/handler16.js +1 -1
  23. package/dist/packem_chunks/handler17.js +1 -1
  24. package/dist/packem_chunks/handler18.js +1 -1
  25. package/dist/packem_chunks/handler19.js +1 -1
  26. package/dist/packem_chunks/handler20.js +1 -1
  27. package/dist/packem_chunks/handler21.js +1 -1
  28. package/dist/packem_chunks/handler24.js +1 -1
  29. package/dist/packem_chunks/handler26.js +1 -1
  30. package/dist/packem_chunks/handler27.js +1 -1
  31. package/dist/packem_chunks/handler28.js +1 -1
  32. package/dist/packem_chunks/handler29.js +1 -1
  33. package/dist/packem_chunks/handler3.js +1 -1
  34. package/dist/packem_chunks/handler30.js +1 -1
  35. package/dist/packem_chunks/handler32.js +1 -1
  36. package/dist/packem_chunks/handler4.js +1 -1
  37. package/dist/packem_chunks/handler40.js +19 -19
  38. package/dist/packem_chunks/handler5.js +3 -3
  39. package/dist/packem_chunks/handler50.js +4 -4
  40. package/dist/packem_chunks/handler51.js +3 -3
  41. package/dist/packem_chunks/handler54.js +1 -1
  42. package/dist/packem_chunks/handler57.js +11 -5
  43. package/dist/packem_chunks/handler58.js +5 -11
  44. package/dist/packem_chunks/handler59.js +11 -3
  45. package/dist/packem_chunks/handler6.js +6 -6
  46. package/dist/packem_chunks/handler60.js +3 -22
  47. package/dist/packem_chunks/handler61.js +21 -60
  48. package/dist/packem_chunks/handler62.js +61 -3
  49. package/dist/packem_chunks/handler63.js +3 -6
  50. package/dist/packem_chunks/handler64.js +6 -9
  51. package/dist/packem_chunks/handler65.js +9 -2
  52. package/dist/packem_chunks/handler66.js +2 -24
  53. package/dist/packem_chunks/handler67.js +24 -25
  54. package/dist/packem_chunks/handler68.js +25 -153
  55. package/dist/packem_chunks/handler69.js +153 -10
  56. package/dist/packem_chunks/handler7.js +1 -1
  57. package/dist/packem_chunks/handler70.js +10 -23
  58. package/dist/packem_chunks/handler71.js +23 -322
  59. package/dist/packem_chunks/handler72.js +273 -659
  60. package/dist/packem_chunks/handler73.js +708 -48
  61. package/dist/packem_chunks/handler74.js +48 -27
  62. package/dist/packem_chunks/handler75.js +27 -3
  63. package/dist/packem_chunks/handler76.js +3 -190
  64. package/dist/packem_chunks/handler77.js +189 -37
  65. package/dist/packem_chunks/handler78.js +38 -0
  66. package/dist/packem_chunks/handler9.js +1 -1
  67. package/dist/packem_chunks/heal-accept.js +1 -1
  68. package/dist/packem_chunks/heal.js +1 -1
  69. package/dist/packem_chunks/help-command.js +1 -1
  70. package/dist/packem_chunks/index2.js +802 -7
  71. package/dist/packem_chunks/index3.js +7 -135
  72. package/dist/packem_chunks/index4.js +134 -73
  73. package/dist/packem_chunks/index5.js +74 -0
  74. package/dist/packem_chunks/keys-refresh.js +1 -1
  75. package/dist/packem_chunks/lean.js +1 -1
  76. package/dist/packem_chunks/list.js +1 -1
  77. package/dist/packem_chunks/loader.js +1 -1
  78. package/dist/packem_chunks/orchestrator.js +26 -23
  79. package/dist/packem_chunks/print-config.js +1 -1
  80. package/dist/packem_chunks/prune.js +1 -1
  81. package/dist/packem_chunks/registry.js +2 -2
  82. package/dist/packem_chunks/shell-runner.js +1 -1
  83. package/dist/packem_chunks/state.js +3 -3
  84. package/dist/packem_chunks/status.js +1 -1
  85. package/dist/packem_chunks/sync.js +1 -1
  86. package/dist/packem_chunks/sync2.js +1 -1
  87. package/dist/packem_chunks/tripwire.js +2 -2
  88. package/dist/packem_chunks/ts-loader.js +1 -1
  89. package/dist/packem_chunks/verify-lockfile.js +1 -1
  90. package/dist/packem_chunks/version-resolver.js +2 -2
  91. package/dist/packem_shared/ReleaseClient-BY4OZNCK.js +1 -0
  92. package/dist/packem_shared/{advisories-CefYKEPe.js → advisories-B76fBVL-.js} +1 -1
  93. package/dist/packem_shared/affected-shas-CCxG4tvm.js +1 -0
  94. package/dist/packem_shared/{ai-analysis-CO6S0afy.js → ai-analysis-DF_AfeS3.js} +4 -4
  95. package/dist/packem_shared/{ai-fix-CI0Vvqld.js → ai-fix-D1bFLkfk.js} +3 -3
  96. package/dist/packem_shared/bin-BlGVEhl8.js +1 -0
  97. package/dist/packem_shared/{build-scripts-MTSK6TNr.js → build-scripts-q__dKE2y.js} +1 -1
  98. package/dist/packem_shared/{command-runtime-BE-vKsGH.js → command-runtime-3FTGuUsK.js} +1 -1
  99. package/dist/packem_shared/{cyclonedx-BeUmPgfO.js → cyclonedx-CmrYQ0vx.js} +1 -1
  100. package/dist/packem_shared/{docker-CViFYtmM.js → docker-BYqiD711.js} +1 -1
  101. package/dist/packem_shared/{env-C2ZCnfP_.js → env-DJlbJiFh.js} +2 -2
  102. package/dist/packem_shared/{failure-log-jFfZRJK9.js → failure-log-Bt7sW4p7.js} +1 -1
  103. package/dist/packem_shared/{index-D7EZ612R.js → index-C6tpgeIV.js} +2 -2
  104. package/dist/packem_shared/{index-CQjzW7m8.js → index-D6fJJDli.js} +1 -1
  105. package/dist/packem_shared/{lifecycle-Dyb47wbD.js → lifecycle-XeMei1ED.js} +1 -1
  106. package/dist/packem_shared/{manifests-WBnsV_Eb.js → manifests-DSBr3-dw.js} +1 -1
  107. package/dist/packem_shared/{native-config-sync-BFDVK9LH.js → native-config-sync-D-z2Uwqu.js} +1 -1
  108. package/dist/packem_shared/{osv-bloom-BsQ-aFiM.js → osv-bloom-DMhXP184.js} +2 -2
  109. package/dist/packem_shared/{packument-DquNPIq9.js → packument-CY2QDFml.js} +1 -1
  110. package/dist/packem_shared/plugins.d-ND23R9I3.d.ts +4 -0
  111. package/dist/packem_shared/pm-runner-CQcraCcu.js +1 -0
  112. package/dist/packem_shared/{provenance-DIq8KyBV.js → provenance-DVHiWZrW.js} +1 -1
  113. package/dist/packem_shared/{registry-keys-C8K11ets.js → registry-keys-BKEq72qX.js} +1 -1
  114. package/dist/packem_shared/{resolve-explicit-Dr4kIybR.js → resolve-explicit-UtkNrGKq.js} +1 -1
  115. package/dist/packem_shared/resolve-runtime-QRaQucfL.js +1 -0
  116. package/dist/packem_shared/{runtime-check-BXehSP06.js → runtime-check-qnrPTlma.js} +1 -1
  117. package/dist/packem_shared/{s1ngularity-CtMmtXJo.js → s1ngularity-DUZtU95L.js} +1 -1
  118. package/dist/packem_shared/scan-progress-BgtHexnt.js +2 -0
  119. package/dist/packem_shared/{signatures-CE8OAK-i.js → signatures-QoCuUv9E.js} +1 -1
  120. package/dist/packem_shared/target-merge-Dg25Izl5.js +11 -0
  121. package/dist/packem_shared/{toolchain-C44mPKPu.js → toolchain-Zb3VzZb4.js} +1 -1
  122. package/dist/packem_shared/{typosquats-CQz-1Y6K.js → typosquats-C12CP_2G.js} +1 -1
  123. package/dist/packem_shared/use-measured-height-BpKmrlkw.js +1 -0
  124. package/dist/packem_shared/{vis-update-app-Cpme_3Du.js → vis-update-app-BoCQ4ute.js} +1 -1
  125. package/dist/packem_shared/{watch-loop-JfGKIgKB.js → watch-loop-BZudYfcl.js} +1 -1
  126. package/dist/release/index.d.ts +39 -2
  127. package/dist/release/index.js +1 -1
  128. package/dist/release/plugin-sdk.d.ts +2 -1
  129. package/dist/release/plugin-sdk.js +1 -1
  130. package/dist/release/types.d.ts +117 -1
  131. package/dist/release/types.js +1 -1
  132. package/index.js +52 -52
  133. package/package.json +11 -11
  134. package/schemas/vis-config.schema.json +33 -0
  135. package/schemas/vis-release-config.schema.json +33 -0
  136. package/dist/packem_shared/ReleaseClient-YHzBIxYS.js +0 -1
  137. package/dist/packem_shared/affected-shas-CwRY5aoc.js +0 -1
  138. package/dist/packem_shared/bin-P6Q5tKrP.js +0 -1
  139. package/dist/packem_shared/pm-runner-D4jM58Oz.js +0 -1
  140. package/dist/packem_shared/resolve-runtime-Tx0bvg0h.js +0 -1
  141. package/dist/packem_shared/scan-progress-D4yywI6P.js +0 -2
  142. package/dist/packem_shared/target-merge-DOm6h6tW.js +0 -11
  143. package/dist/packem_shared/use-measured-height-XK9YSwtv.js +0 -1
  144. package/dist/packem_shared/window-ops-DDePlWLV.js +0 -2
  145. /package/dist/packem_shared/{readJsonSync-CvkZyKmL-ihoybKvs.js → readJsonSync-DuMMeB3s-ihoybKvs.js} +0 -0
@@ -1,153 +1,25 @@
1
- import{createRequire as ae}from"node:module";import{j as b,q as k,E as p}from"../packem_shared/index.server-J83sowC4.js";import{B as $,J as se,f as j,a as y,m as l,T as u,y as L,o as ce,A as le}from"../packem_shared/index-CE6MsgcV.js";import{p as a}from"./cli-main.js";import{$ as Z,w as pe,R as ue}from"../packem_shared/pm-runner-D4jM58Oz.js";import{g as he}from"../packem_shared/_commonjsHelpers-B5Y90VFO.js";import{f as fe}from"../packem_shared/giget-DVTFJlbR.js";import{a as V}from"../packem_shared/readJsonSync-CvkZyKmL-ihoybKvs.js";const ne=ae(import.meta.url),q=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,z=e=>{if(typeof q<"u"&&q.versions&&q.versions.node){const[t,r]=q.versions.node.split(".").map(Number);if(t>22||t===22&&r>=3||t===20&&r>=16)return q.getBuiltinModule(e)}return ne(e)},{spawnSync:oe}=z("node:child_process"),{createInterface:de}=z("node:readline"),{readdirSync:me,chmodSync:ge}=z("node:fs"),ye={"vis:app":"builtin:app","vis:application":"builtin:app","vis:generator":"builtin:generator","vis:lib":"builtin:library","vis:library":"builtin:library","vis:monorepo":"builtin:monorepo"},ve=["https://github.com/","https://gitlab.com/","https://bitbucket.org/","https://raw.githubusercontent.com/","https://git.sr.ht/","git@github.com:","git@gitlab.com:","git@bitbucket.org:","git@git.sr.ht:","github:","gh:","gitlab:","bitbucket:","sourcehut:","git:","http://","https://"],be=e=>{for(const t of ve)if(e.startsWith(t))return!0;return!e.startsWith("@")&&/^[^/#@][^/#]*\/[^/#]+/.test(e)},we=new Set(["sv"]),ke=e=>{if(we.has(e)||e.startsWith("create-")||e.startsWith("@")&&e.includes("/create-"))return e;if(e.startsWith("@")){const t=e.indexOf("/");if(t!==-1){const r=e.slice(0,t),i=e.slice(t+1);return`${r}/create-${i}`}return e}return`create-${e}`},xe=(e,t=[])=>{if(!e)throw new Error("No template specified.");const r=e.toLowerCase(),i=ye[r];return i?{args:t,source:r,type:i}:be(e)?{args:t,source:e,type:"remote:git"}:{args:t,source:ke(e),type:"remote:npm"}},$e=e=>{switch(e){case"builtin:app":return"apps";case"builtin:generator":case"builtin:library":return"packages";default:return"."}},W=["ability","able","about","above","abroad","absence","absolute","absolutely","absorb","academic","accept","access","accompany","accomplish","according","account","accurate","achieve","achievement","acid","acknowledge","acquire","across","act","action","active","activist","activity","actor","actress","actual","actually","adapt","add","addition","additional","address","adequate","adjust","adjustment","administration","administrator","admire","admission","admit","adolescent","adopt","adult","advance","advanced","advantage","adventure","advertising","advice","advise","adviser","advocate","affair","affect","afford","after","afternoon","again","against","age","agency","agenda","agent","ago","agree","agreement","agricultural","ahead","aid","aide","aim","air","aircraft","airline","airport","album","alive","all","alliance","allow","ally","almost","alone","along","already","also","alter","alternative","although","always","amazing","among","amount","analysis","analyst","analyze","ancient","and","angle","animal","anniversary","announce","annual","another","answer","anticipate","any","anybody","anymore","anyone","anything","anyway","anywhere","apart","apartment","apparent","apparently","appeal","appear","appearance","apple","application","apply","appoint","appointment","appreciate","approach","appropriate","approval","approve","approximately","architect","area","argue","argument","arise","arm","armed","around","arrange","arrangement","arrival","arrive","art","article","artist","artistic","aside","ask","asleep","aspect","assert","assess","assessment","asset","assign","assignment","assist","assistance","assistant","associate","association","assume","assumption","assure","athlete","athletic","atmosphere","attach","attempt","attend","attention","attitude","attorney","attract","attractive","attribute","audience","author","authority","auto","available","average","avoid","award","aware","awareness","away","awesome","baby","back","background","bag","bake","balance","ball","ban","band","bank","bar","barely","barrel","base","baseball","basic","basically","basis","basket","basketball","bathroom","battery","beach","bean","bear","beat","beautiful","beauty","because","become","bed","bedroom","beer","before","begin","beginning","behavior","behind","being","belief","believe","bell","belong","below","belt","bench","bend","beneath","benefit","beside","besides","best","bet","better","between","beyond","big","bike","bill","billion","bind","biological","bird","birth","birthday","bit","bite","black","blade","blanket","blind","block","blow","blue","board","boat","body","bond","bone","book","boom","boot","border","born","borrow","boss","both","bother","bottle","bottom","boundary","bowl","box","boy","boyfriend","brain","branch","brand","bread","break","breakfast","breast","breath","breathe","brick","bridge","brief","briefly","bright","brilliant","bring","broad","brother","brown","brush","buck","budget","build","building","bullet","bunch","bury","bus","business","busy","but","butter","button","buy","buyer","cabin","cabinet","cable","cake","calculate","call","camera","camp","campaign","campus","can","candidate","cap","capability","capable","capacity","capital","captain","capture","car","carbon","card","care","career","careful","carefully","carrier","carry","case","cash","cast","cat","catch","category","cause","ceiling","celebrate","celebration","celebrity","cell","center","central","century","ceremony","certain","certainly","chain","chair","chairman","challenge","chamber","champion","championship","chance","change","changing","channel","chapter","character","characteristic","characterize","charge","charity","chart","chase","cheap","check","cheek","cheese","chef","chemical","chest","chicken","chief","child","childhood","chip","chocolate","choice","cholesterol","choose","church","cigarette","circle","circumstance","cite","citizen","city","civil","civilian","claim","class","classic","classroom","clean","clear","clearly","client","climate","climb","clinic","clinical","clock","close","closely","closer","clothes","clothing","cloud","club","clue","cluster","coach","coal","coalition","coast","coat","code","coffee","cognitive","cold","colleague","collect","collection","collective","college","colonial","color","column","combination","combine","come","comedy","comfort","comfortable","command","commander","comment","commercial","commission","commit","commitment","committee","common","communicate","communication","community","company","compare","comparison","compete","competition","competitive","competitor","complete","completely","complex","complicated","component","compose","composition","comprehensive","computer","concentrate","concentration","concept","concern","concerned","concert","conclude","conclusion","concrete","condition","conduct","conference","confidence","confident","confirm","confront","confusion","congressional","connect","connection","consciousness","consensus","consequence","conservative","consider","considerable","consideration","consist","consistent","constant","constantly","constitute","constitutional","construct","construction","consultant","consume","consumer","consumption","contact","contain","container","contemporary","content","contest","context","continue","continued","contract","contrast","contribute","contribution","control","convention","conventional","conversation","convert","conviction","convince","cook","cookie","cooking","cool","cooperation","cop","cope","copy","core","corn","corner","corporate","corporation","correct","correspondent","cost","cotton","couch","could","council","counselor","count","counter","country","county","couple","courage","course","court","cousin","cover","coverage","cow","crack","craft","cream","create","creation","creative","creature","credit","crew","criteria","crop","cross","crowd","crucial","cultural","culture","cup","curious","current","currently","curriculum","custom","customer","cut","cycle","dad","daily","dance","dare","dark","darkness","data","date","daughter","day","deal","dealer","dear","debate","decade","decide","decision","deck","declare","decrease","deep","deeply","deer","defend","defendant","defense","defensive","define","definitely","definition","degree","delay","deliver","delivery","demand","democracy","democratic","demonstrate","demonstration","deny","department","depend","dependent","depending","depict","depth","deputy","derive","describe","description","desert","deserve","design","designer","desire","desk","desperate","despite","detail","detailed","detect","determine","develop","developing","development","device","devote","dialogue","diet","differ","difference","different","differently","difficult","difficulty","dig","digital","dimension","dining","dinner","direct","direction","directly","director","disability","disagree","disappear","discipline","discourse","discover","discovery","discuss","discussion","dish","dismiss","display","distance","distant","distinct","distinction","distinguish","distribute","distribution","district","diverse","diversity","divide","division","doctor","document","dog","domestic","dominant","dominate","door","double","down","downtown","dozen","draft","drag","drama","dramatic","dramatically","draw","drawing","dream","dress","drink","drive","driver","drop","dry","due","during","dust","duty","each","eager","ear","early","earn","earnings","earth","ease","easily","east","eastern","easy","eat","economic","economics","economist","economy","edge","edition","editor","educate","education","educational","educator","effect","effective","effectively","efficiency","efficient","effort","egg","eight","either","elderly","elect","election","electric","electricity","electronic","element","elementary","eliminate","elite","else","elsewhere","embrace","emerge","emission","emotion","emotional","emphasis","emphasize","employ","employee","employer","employment","empty","enable","encounter","encourage","end","energy","enforcement","engage","engine","engineer","engineering","enhance","enjoy","enormous","enough","ensure","enter","enterprise","entertainment","entire","entirely","entrance","entry","environment","environmental","episode","equal","equally","equipment","era","escape","especially","essay","essential","essentially","establish","establishment","estate","estimate","etc","ethics","ethnic","evaluate","evaluation","even","evening","event","eventually","ever","every","everybody","everyday","everyone","everything","everywhere","evidence","evolution","evolve","exact","exactly","examination","examine","example","exceed","excellent","except","exception","exchange","exciting","executive","exercise","exhibit","exhibition","exist","existence","existing","expand","expansion","expect","expectation","expense","expensive","experience","experiment","expert","explain","explanation","explore","expose","express","expression","extend","extension","extensive","extent","external","extra","extraordinary","extreme","extremely","eye","fabric","face","facility","fact","factor","factory","faculty","fade","fair","fairly","faith","fall","false","familiar","family","famous","fan","fantasy","far","farm","farmer","fashion","fast","fate","father","favor","favorite","feature","federal","fee","feed","feel","feeling","fellow","female","fence","few","fewer","fiber","fiction","field","fifteen","fifth","fifty","figure","file","fill","film","final","finally","finance","financial","find","finding","fine","finger","finish","firm","first","fish","fishing","fit","fitness","five","fix","flag","flame","flat","flavor","flesh","flight","float","floor","flow","flower","fly","focus","folk","follow","following","food","foot","football","for","force","foreign","forest","forever","forget","form","formal","formation","former","formula","forth","fortune","forward","found","foundation","founder","four","fourth","frame","framework","free","freedom","freeze","frequency","frequent","frequently","fresh","friend","friendly","friendship","from","front","fruit","fuel","full","fully","fun","function","fund","fundamental","funding","funeral","funny","furniture","furthermore","future","gain","galaxy","gallery","game","gap","garage","garden","garlic","gas","gate","gather","gaze","gear","gender","gene","general","generally","generate","generation","genetic","gentleman","gently","gesture","get","ghost","giant","gift","gifted","girl","girlfriend","give","given","glad","glance","glass","global","glove","goal","gold","golden","golf","good","government","governor","grab","grade","gradually","graduate","grain","grand","grandfather","grandmother","grant","grass","grave","gray","great","greatest","green","grocery","ground","group","grow","growing","growth","guarantee","guard","guess","guest","guide","guideline","guy","habit","habitat","hair","half","hall","hand","handful","handle","hang","happen","happy","hard","hardly","hat","have","head","headline","headquarters","health","healthy","hear","hearing","heart","heat","heaven","heavily","heavy","heel","height","helicopter","hello","help","helpful","here","heritage","hero","herself","hey","hide","high","highlight","highly","highway","hill","himself","hip","hire","historian","historic","historical","history","hit","hold","hole","holiday","holy","home","honest","honey","honor","hope","horizon","horse","hospital","host","hot","hotel","hour","house","household","housing","how","however","huge","human","humor","hundred","hungry","hunter","hunting","husband","hypothesis","ice","idea","ideal","identification","identify","identity","ignore","illustrate","image","imagination","imagine","immediate","immediately","immigrant","immigration","impact","implement","implication","imply","importance","important","impose","impossible","impress","impression","impressive","improve","improvement","incentive","incident","include","including","income","incorporate","increase","increased","increasing","increasingly","incredible","indeed","independence","independent","index","indicate","indication","individual","industrial","industry","infant","inflation","influence","inform","information","ingredient","initial","initially","initiative","inner","innocent","inquiry","inside","insight","insist","inspire","install","instance","instead","institution","institutional","instruction","instructor","instrument","insurance","intellectual","intelligence","intend","intense","intensity","intention","interaction","interest","interested","interesting","internal","international","interpret","interpretation","intervention","interview","into","introduce","introduction","invest","investigate","investigation","investigator","investment","investor","invite","involve","involved","involvement","iron","island","issue","item","its","itself","jacket","jet","job","join","joint","joke","journal","journalist","journey","joy","judge","judgment","juice","jump","junior","jury","just","justice","justify","keep","key","kick","kid","kind","king","kiss","kitchen","knee","knife","knock","know","knowledge","lab","label","labor","laboratory","lady","lake","land","landscape","language","lap","large","largely","last","late","later","latter","laugh","launch","law","lawn","lawsuit","lawyer","lay","layer","lead","leader","leadership","leading","leaf","league","lean","learn","learning","least","leather","leave","left","leg","legacy","legal","legend","legislation","legitimate","lemon","length","less","lesson","let","letter","level","liberal","library","license","lie","life","lifestyle","lifetime","lift","light","like","likely","limit","limitation","limited","line","link","lip","list","listen","literally","literary","literature","little","live","living","load","loan","local","locate","location","lock","long","look","loose","lose","lost","lot","lots","loud","love","lovely","lover","low","lower","luck","lucky","lunch","lung","machine","magazine","mail","main","mainly","maintain","maintenance","major","majority","make","maker","makeup","male","mall","man","manage","management","manager","manner","manufacturer","manufacturing","many","map","margin","mark","market","marketing","marriage","married","marry","mask","mass","massive","master","match","material","math","matter","may","maybe","mayor","meal","mean","meaning","meanwhile","measure","measurement","meat","mechanism","media","medical","medication","medicine","medium","meet","meeting","member","membership","memory","mental","mention","menu","mere","merely","message","metal","meter","method","middle","might","military","milk","million","mind","mine","minister","minor","minority","minute","miracle","mirror","miss","missile","mission","mix","mixture","mode","model","moderate","modern","modest","mom","moment","money","monitor","month","mood","moon","moral","more","moreover","morning","mortgage","most","mostly","mother","motion","motivation","motor","mount","mountain","mouse","mouth","move","movement","movie","much","multiple","muscle","museum","music","musical","musician","must","mutual","myself","mystery","myth","naked","name","narrative","narrow","nation","national","native","natural","naturally","nature","near","nearby","nearly","necessarily","necessary","neck","need","negative","negotiate","negotiation","neighbor","neighborhood","neither","nerve","net","network","never","nevertheless","new","newly","news","newspaper","next","nice","night","nine","nobody","nod","nomination","none","nonetheless","nor","normal","normally","north","northern","nose","not","note","nothing","notice","notion","novel","now","nowhere","nuclear","number","numerous","nurse","nut","object","objective","obligation","observation","observe","observer","obtain","obvious","obviously","occasion","occasionally","occupation","occupy","occur","ocean","odd","odds","off","offer","office","officer","official","often","oil","okay","old","once","one","ongoing","onion","online","only","onto","open","opening","operate","operating","operation","operator","opinion","opponent","opportunity","oppose","opposite","opposition","option","orange","order","ordinary","organic","organization","organize","orientation","origin","original","originally","other","others","otherwise","ought","our","ourselves","out","outcome","outside","oven","over","overall","overcome","overlook","owe","own","owner","pace","pack","package","page","paint","painter","painting","pair","pale","palm","pan","panel","pant","paper","parent","park","parking","part","participant","participate","participation","particular","particularly","partly","partner","partnership","party","pass","passage","passenger","passion","past","patch","path","patient","pattern","pause","pay","payment","peace","peak","peer","people","pepper","per","perceive","percentage","perception","perfect","perfectly","perform","performance","perhaps","period","permanent","permission","permit","person","personal","personality","personally","personnel","perspective","persuade","pet","phase","phenomenon","philosophy","phone","photo","photograph","photographer","phrase","physical","physically","physician","piano","pick","picture","pie","piece","pile","pilot","pine","pink","pipe","pitch","place","plan","plane","planet","planning","plant","plastic","plate","platform","play","player","please","pleasure","plenty","plot","plus","pocket","poem","poet","poetry","point","pole","police","policy","political","politically","politician","politics","poll","pool","pop","popular","population","porch","port","portion","portrait","portray","pose","position","positive","possess","possibility","possible","possibly","post","pot","potato","potential","potentially","pound","pour","powder","power","powerful","practical","practice","pray","prayer","precisely","predict","prefer","preference","pregnancy","pregnant","preparation","prepare","prescription","presence","present","presentation","preserve","president","presidential","press","pretend","pretty","prevent","previous","previously","price","pride","priest","primarily","primary","prime","principal","principle","print","prior","priority","privacy","private","probably","procedure","proceed","process","produce","producer","product","production","profession","professional","professor","profile","profit","program","progress","project","prominent","promise","promote","prompt","proof","proper","properly","property","proportion","proposal","propose","proposed","prosecutor","prospect","protect","protection","protein","protest","proud","prove","provide","provider","province","provision","psychological","psychologist","psychology","public","publication","publicly","publish","publisher","pull","purchase","pure","purpose","pursue","push","put","qualify","quality","quarter","quarterback","question","quick","quickly","quiet","quietly","quit","quite","quote","race","racial","radical","radio","rail","rain","raise","range","rank","rapid","rapidly","rare","rarely","rate","rather","rating","ratio","raw","reach","react","reaction","read","reader","reading","ready","real","reality","realize","really","reason","reasonable","recall","receive","recent","recently","recipe","recognition","recognize","recommend","recommendation","record","recording","recover","recovery","recruit","red","reduce","reduction","refer","reference","reflect","reflection","reform","refugee","refuse","regard","regarding","regardless","regime","region","regional","register","regular","regularly","regulate","regulation","reinforce","relate","relation","relationship","relative","relatively","relax","release","relevant","relief","religion","religious","rely","remain","remaining","remarkable","remember","remind","remote","remove","repeat","repeatedly","replace","reply","report","reporter","represent","representation","representative","reputation","request","require","requirement","research","researcher","resemble","reservation","resident","resist","resolution","resolve","resort","resource","respect","respond","respondent","response","responsibility","responsible","rest","restaurant","restore","restriction","result","retain","retire","retirement","return","reveal","revenue","review","revolution","rhythm","rice","rich","rid","ride","rifle","right","ring","rise","river","road","rock","role","roll","romantic","roof","room","root","rope","rose","roughly","round","route","routine","row","rub","rule","run","running","rural","rush","sacred","safe","safety","sake","salad","salary","sale","sales","salt","same","sample","sanction","sand","satellite","satisfaction","satisfy","sauce","save","saving","say","scale","scenario","scene","schedule","scheme","scholar","scholarship","school","science","scientific","scientist","scope","score","screen","script","sea","search","season","seat","second","secret","secretary","section","sector","secure","security","see","seed","seek","seem","segment","seize","select","selection","self","sell","senator","send","senior","sense","sensitive","sentence","separate","sequence","series","serious","seriously","serve","service","session","set","setting","settle","settlement","seven","several","shade","shadow","shake","shall","shape","share","sharp","sheet","shelf","shell","shelter","shift","shine","ship","shirt","shoe","shop","shopping","shore","short","shortly","shot","should","shoulder","shout","show","shower","shrug","shut","side","sigh","sight","sign","signal","significance","significant","significantly","silence","silent","silver","similar","similarly","simple","simply","since","sing","singer","single","sink","sir","sister","sit","site","situation","six","size","ski","skill","skin","sky","sleep","slice","slide","slight","slightly","slip","slow","slowly","small","smart","smell","smile","smooth","snap","snow","soccer","social","society","soft","software","soil","solar","solid","solution","solve","some","somebody","somehow","someone","something","sometimes","somewhat","somewhere","son","song","soon","sophisticated","sorry","sort","soul","sound","soup","source","south","southern","space","speak","speaker","special","specialist","species","specific","specifically","speech","speed","spend","spending","spin","spirit","spiritual","split","spokesman","sport","spot","spread","spring","square","squeeze","stability","stable","staff","stage","stair","stake","stand","standard","standing","star","stare","start","state","statement","station","statistics","status","stay","steady","steal","steel","step","stick","still","stir","stock","stomach","stone","stop","storage","store","storm","story","straight","strange","stranger","strategic","strategy","stream","street","strength","strengthen","stretch","string","strip","strong","strongly","structure","student","studio","study","stuff","style","subject","submit","subsequent","substance","substantial","succeed","success","successful","successfully","such","sudden","suddenly","sue","sufficient","sugar","suggest","suggestion","suit","summer","summit","sun","super","supply","support","supporter","suppose","supposed","sure","surely","surface","surgery","surprise","surprised","surprising","surprisingly","surround","survey","survival","survive","survivor","sustain","swear","sweep","sweet","swim","swing","switch","symbol","system","table","tablespoon","tactic","tail","take","tale","talent","talk","tall","tank","tap","tape","target","task","taste","tax","taxpayer","tea","teach","teacher","teaching","team","tear","teaspoon","technical","technique","technology","teen","teenager","telephone","telescope","television","tell","temperature","temporary","ten","tend","tendency","tennis","tent","term","terms","territory","test","testify","testimony","testing","text","than","thank","thanks","that","the","theater","their","them","theme","themselves","then","theory","therapy","there","therefore","thick","thin","thing","think","thinking","third","thirty","though","thought","thousand","three","throat","through","throughout","throw","ticket","tie","tight","time","tiny","tip","tire","tired","tissue","title","today","toe","together","tomato","tomorrow","tone","tongue","tonight","too","tool","tooth","top","topic","toss","total","totally","touch","tough","tour","tourist","tournament","tower","town","toy","trace","track","trade","tradition","traditional","traffic","trail","train","training","transfer","transform","transformation","transition","translate","transportation","travel","treat","treatment","treaty","tree","tremendous","trend","trial","tribe","trip","troop","truck","true","truly","trust","truth","try","tube","tunnel","turn","twelve","twenty","twice","twin","two","type","typical","typically","ultimate","ultimately","unable","uncle","under","undergo","understand","understanding","unfortunately","uniform","union","unique","unit","universal","universe","university","unknown","unless","unlike","unlikely","until","unusual","upon","upper","urban","urge","use","used","useful","user","usual","usually","utility","vacation","valley","valuable","value","variable","variation","variety","various","vary","vast","vegetable","vehicle","venture","version","versus","very","vessel","veteran","via","victory","video","view","viewer","village","virtually","virtue","visible","vision","visit","visitor","visual","vital","voice","volume","volunteer","vote","voter","wage","wait","wake","walk","wall","wander","want","warm","warn","warning","wash","watch","water","wave","way","wealth","wealthy","wear","weather","wedding","week","weekend","weekly","weigh","weight","welcome","welfare","well","west","western","wet","what","whatever","wheel","when","whenever","where","whereas","whether","which","while","whisper","white","who","whole","whom","whose","why","wide","widely","widespread","wife","wild","will","willing","win","wind","window","wine","wing","winner","winter","wipe","wire","wisdom","wise","wish","with","withdraw","within","without","witness","woman","wonder","wonderful","wood","wooden","word","work","worker","working","works","workshop","world","worried","worth","would","wrap","write","writer","writing","yard","yeah","year","yell","yellow","yes","yesterday","yield","young","your","yours","yourself","youth","zone"],_e=(e,t)=>Math.floor(e+Math.random()*(t-e+1));function K(){return W[_e(0,W.length-1)]}const je=()=>`${K()}-${K()}`;var T,Y;function Ce(){return Y||(Y=1,T=["_http_agent","_http_client","_http_common","_http_incoming","_http_outgoing","_http_server","_stream_duplex","_stream_passthrough","_stream_readable","_stream_transform","_stream_wrap","_stream_writable","_tls_common","_tls_wrap","assert","assert/strict","async_hooks","buffer","child_process","cluster","console","constants","crypto","dgram","diagnostics_channel","dns","dns/promises","domain","events","fs","fs/promises","http","http2","https","inspector","inspector/promises","module","net","os","path","path/posix","path/win32","perf_hooks","process","punycode","querystring","readline","readline/promises","repl","stream","stream/consumers","stream/promises","stream/web","string_decoder","sys","timers","timers/promises","tls","trace_events","tty","url","util","util/types","v8","vm","wasi","worker_threads","zlib","node:sea","node:sqlite","node:test","node:test/reporters"]),T}var I,Q;function Se(){if(Q)return I;Q=1;const e=Ce();var t=new RegExp("^(?:@([^/]+?)[/])?([^/]+?)$"),r=["node_modules","favicon.ico"];function i(n){var c=[],s=[];if(n===null)return s.push("name cannot be null"),o(c,s);if(n===void 0)return s.push("name cannot be undefined"),o(c,s);if(typeof n!="string")return s.push("name must be a string"),o(c,s);if(n.length||s.push("name length must be greater than zero"),n.startsWith(".")&&s.push("name cannot start with a period"),n.startsWith("-")&&s.push("name cannot start with a hyphen"),n.match(/^_/)&&s.push("name cannot start with an underscore"),n.trim()!==n&&s.push("name cannot contain leading or trailing spaces"),r.forEach(function(x){n.toLowerCase()===x&&s.push(x+" is not a valid package name")}),e.includes(n.toLowerCase())&&c.push(n+" is a core module name"),n.length>214&&c.push("name can no longer contain more than 214 characters"),n.toLowerCase()!==n&&c.push("name can no longer contain capital letters"),/[~'!()*]/.test(n.split("/").slice(-1)[0])&&c.push(`name can no longer contain special characters ("~'!()*")`),encodeURIComponent(n)!==n){var m=n.match(t);if(m){var w=m[1],v=m[2];if(v.startsWith(".")&&s.push("name cannot start with a period"),encodeURIComponent(w)===w&&encodeURIComponent(v)===v)return o(c,s)}s.push("name can only contain URL-friendly characters")}return o(c,s)}var o=function(n,c){var s={validForNewPackages:c.length===0&&n.length===0,validForOldPackages:c.length===0,warnings:n,errors:c};return s.warnings.length||delete s.warnings,s.errors.length||delete s.errors,s};return I=i,I}var qe=Se();const Ee=he(qe),ee=e=>e?Ee(e).validForNewPackages:!1,N=e=>e.toLowerCase().trim().replaceAll(/\s+/g,"-").replaceAll(/[^a-z\d\-~]/g,"-").replace(/^[._-]+/,"").replaceAll(/-{2,}/g,"-").replace(/-$/,""),Ne=new Set([".DS_Store",".git",".gitkeep","Thumbs.db"]),te=e=>j(e)?me(e).every(t=>Ne.has(t)):!0,De=(e,t)=>{const r=$(t,e);return{packageName:N(se(r)),targetDir:r}},Re=e=>te(e),E=(e,t)=>new Promise(r=>{e.question(t,i=>{r(i.trim())})}),M=async(e,t,r=!0)=>{const i=await E(e,` ${t} ${p(r?"[Y/n]":"[y/N]")} `);return i===""?r:i.toLowerCase()==="y"||i.toLowerCase()==="yes"},X=async(e,t,r)=>{process.stderr.write(` ${t}
2
- `);for(const[i,o]of r.entries()){const n=b(k(` ${String(i+1)}.`)),c=o.hint?p(` — ${o.hint}`):"";process.stderr.write(`${n} ${o.label}${c}
3
- `)}for(;;){const i=await E(e,`
4
- ${p(`Enter choice (1-${String(r.length)}):`)} `),o=Number.parseInt(i,10);if(o>=1&&o<=r.length)return r[o-1].value;const n=r.find(c=>c.value===i||c.label.toLowerCase()===i.toLowerCase());if(n)return n.value;process.stderr.write(` ${p("Invalid choice. Try again.")}
5
- `)}},Oe=async e=>{const t=de({input:process.stdin,output:process.stdout});try{process.stderr.write(`
6
- ${b(k("vis create"))} ${p("— project scaffolding")}
7
-
8
- `);const r=e.inMonorepo?[{hint:"Scaffold via create-vite",label:"Vis Application",value:"vis:app"},{hint:"Reusable package scaffold",label:"Vis Library",value:"vis:library"},{hint:"Code generator scaffold",label:"Vis Generator",value:"vis:generator"},{hint:"Enter an npm create-* package or GitHub URL",label:"Custom template",value:"__custom__"}]:[{hint:"Full workspace setup",label:"Vis Monorepo",value:"vis:monorepo"},{hint:"Scaffold via create-vite",label:"Vis Application",value:"vis:app"},{hint:"Reusable package scaffold",label:"Vis Library",value:"vis:library"},{hint:"Code generator scaffold",label:"Vis Generator",value:"vis:generator"},{hint:"Enter an npm create-* package or GitHub URL",label:"Custom template",value:"__custom__"}];let i=await X(t,"Select a template:",r);if(i==="__custom__"&&(i=await E(t,`
9
- ${p("Template (npm package or GitHub URL):")} `),!i))throw new Error("No template specified.");const o=je(),n=await E(t,`
10
- ${p(`Project name (${o}):`)} `)||o;if(!ee(N(n)))throw new Error(`Invalid project name: "${n}". Must be a valid npm package name.`);const c=N(n),s=await E(t,` ${p(`Target directory (${c}):`)} `)||c;let m=!1;const w=$(e.cwd,s);if(!te(w)&&(m=await M(t,`Directory "${s}" is not empty. Overwrite?`,!1),!m))throw new Error("Aborted directory not empty.");let v;e.inMonorepo||(e.defaultPm?(v=e.defaultPm,process.stderr.write(` ${p(`Package manager: ${v} (from config)`)}
11
- `)):v=await X(t,"Package manager:",[{label:"pnpm",value:"pnpm"},{label:"npm",value:"npm"},{label:"yarn",value:"yarn"},{label:"bun",value:"bun"}]));let x=!1;e.inMonorepo||(x=await M(t,"Initialize a git repository?",e.defaultGitInit??!1));const f=e.defaultEditor==="vscode",h=await M(t,"Generate VS Code configuration?",f)?"vscode":void 0;return process.stderr.write(`
12
- `),{editor:h,gitInit:x,overwrite:m,pm:v,projectName:n,targetDir:s,template:i}}finally{t.close()}},Te=(e,t)=>{a.info("Scaffolding application via create-vite...");const r=[L(t.cwd,t.targetDir)||".",...e.args];return r.includes("--no-immediate")||r.push("--no-immediate"),Z(t.pm,{additionalPackages:[],args:r,package:"create-vite",shellMode:!1,silent:!1},t.cwd,t.logger)},Ie=e=>`${JSON.stringify({devDependencies:{typescript:"^5.0.0",vitest:"^3.0.0"},exports:{".":{default:"./dist/index.js",types:"./dist/index.d.ts"}},files:["dist"],main:"./dist/index.js",name:e,scripts:{build:"tsc",dev:"tsc --watch",test:"vitest run","test:watch":"vitest"},type:"module",types:"./dist/index.d.ts",version:"0.0.1"},null,4)}
13
- `,Me=()=>`${JSON.stringify({compilerOptions:{declaration:!0,declarationMap:!0,esModuleInterop:!0,module:"Node16",moduleResolution:"Node16",outDir:"./dist",rootDir:"./src",skipLibCheck:!0,sourceMap:!0,strict:!0,target:"ES2022"},include:["src/**/*"]},null,4)}
14
- `,ze=e=>`/**
15
- * ${e} — library entry point.
16
- */
17
-
18
- export const greet = (name: string): string => \`Hello from ${e}, \${name}!\`;
19
- `,Le=e=>`import { describe, expect, it } from "vitest";
20
-
21
- import { greet } from "../src/index";
22
-
23
- describe("${e}", () => {
24
- it("should greet", () => {
25
- expect(greet("world")).toBe("Hello from ${e}, world!");
26
- });
27
- });
28
- `,Pe=(e,t)=>{const{projectName:r,targetDir:i}=t;return a.info("Scaffolding library package..."),y(i),y(l(i,"src")),y(l(i,"__tests__")),u(l(i,"package.json"),Ie(r)),a.success("Created package.json"),u(l(i,"tsconfig.json"),Me()),a.success("Created tsconfig.json"),u(l(i,"src","index.ts"),ze(r)),a.success("Created src/index.ts"),u(l(i,"__tests__","index.test.ts"),Le(r)),a.success("Created __tests__/index.test.ts"),u(l(i,".gitignore"),`node_modules/
29
- dist/
30
- .env
31
- .DS_Store
32
- `),a.success("Created .gitignore"),0},Ae=(e,t)=>{switch(e.type){case"builtin:app":return Te(e,t);case"builtin:library":return Pe(e,t);default:throw new Error(`Unknown built-in template type: ${e.type}`)}},Ue=(e,t)=>`${JSON.stringify({bin:{[e]:"./bin/index.js"},description:t,devDependencies:{typescript:"^5.0.0"},name:e,private:!0,scripts:{build:"tsc",dev:"tsc --watch"},type:"module",version:"0.0.1"},null,4)}
33
- `,Ge=e=>`#!/usr/bin/env node
34
-
35
- /**
36
- * ${e} — code generator
37
- *
38
- * Usage: npx ${e} [options]
39
- */
40
-
41
- console.log("Hello from ${e}!");
42
- `,Be=()=>`${JSON.stringify({compilerOptions:{declaration:!0,esModuleInterop:!0,module:"Node16",moduleResolution:"Node16",outDir:"./dist",rootDir:"./src",skipLibCheck:!0,strict:!0,target:"ES2022"},include:["src/**/*","bin/**/*"]},null,4)}
43
- `,Fe=()=>`/**
44
- * Generator core logic — export functions used by the CLI entry point.
45
- */
46
-
47
- export const generate = (): void => {
48
- // TODO: Implement your generator logic here
49
- };
50
- `,He=(e,t="")=>{const{projectName:r,targetDir:i}=e;a.info("Scaffolding code generator..."),y(i),y(l(i,"bin")),y(l(i,"src")),u(l(i,"package.json"),Ue(r,t||`Code generator: ${r}`)),a.success("Created package.json");const o=l(i,"bin","index.js");return u(o,Ge(r)),ge(o,493),a.success("Created bin/index.js (executable)"),u(l(i,"tsconfig.json"),Be()),a.success("Created tsconfig.json"),u(l(i,"src","index.ts"),Fe()),a.success("Created src/index.ts"),0},Je=e=>`${JSON.stringify({devDependencies:{"@visulima/vis":"latest"},name:e,packageManager:"pnpm@latest",private:!0,scripts:{build:"vis run build",dev:"vis run dev",lint:"vis run lint",test:"vis run test"},type:"module",version:"0.0.0"},null,4)}
51
- `,Ve=()=>`packages:
52
- - "apps/*"
53
- - "packages/*"
54
- `,We=()=>`# Dependencies
55
- node_modules/
56
-
57
- # Build output
58
- dist/
59
- .output/
60
-
61
- # Environment
62
- .env
63
- .env.local
64
- .env.*.local
65
-
66
- # IDE
67
- .vscode/*
68
- !.vscode/settings.json
69
- !.vscode/extensions.json
70
- .idea/
71
-
72
- # OS
73
- .DS_Store
74
- Thumbs.db
75
-
76
- # Logs
77
- *.log
78
- npm-debug.log*
79
- pnpm-debug.log*
80
-
81
- # Cache
82
- .turbo/
83
- .cache/
84
- `,Ke=()=>`root = true
85
-
86
- [*]
87
- indent_style = space
88
- indent_size = 4
89
- end_of_line = lf
90
- charset = utf-8
91
- trim_trailing_whitespace = true
92
- insert_final_newline = true
93
-
94
- [*.{yml,yaml}]
95
- indent_size = 2
96
-
97
- [*.md]
98
- trim_trailing_whitespace = false
99
- `,Ye=e=>`# ${e}
100
-
101
- A monorepo powered by [vis](https://visulima.com/packages/vis).
102
-
103
- ## Getting Started
104
-
105
- \`\`\`bash
106
- # Install dependencies
107
- pnpm install
108
-
109
- # Run all apps in development mode
110
- pnpm dev
111
-
112
- # Build all packages
113
- pnpm build
114
-
115
- # Run tests
116
- pnpm test
117
- \`\`\`
118
-
119
- ## Structure
120
-
121
- \`\`\`
122
- ├── apps/ # Applications
123
- ├── packages/ # Shared packages & libraries
124
- ├── pnpm-workspace.yaml
125
- └── package.json
126
- \`\`\`
127
- `,Qe=e=>{const{projectName:t,targetDir:r}=e;return a.info("Scaffolding monorepo workspace..."),y(r),y(l(r,"apps")),y(l(r,"packages")),u(l(r,"package.json"),Je(t)),a.success("Created package.json"),u(l(r,"pnpm-workspace.yaml"),Ve()),a.success("Created pnpm-workspace.yaml"),u(l(r,".gitignore"),We()),a.success("Created .gitignore"),u(l(r,".editorconfig"),Ke()),a.success("Created .editorconfig"),u(l(r,"README.md"),Ye(t)),a.success("Created README.md"),u(l(r,"apps",".gitkeep"),""),u(l(r,"packages",".gitkeep"),""),0},Xe={"create-nuxt":{monoArgs:["--no-gitInit"]},"create-vite":{args:["--no-immediate"]},sv:{args:["--no-install"],prependCommand:"create"}},Ze=(e,t,r)=>{const i=Xe[e];if(!i)return t;const o=[...t];if(i.prependCommand&&!o.includes(i.prependCommand)&&o.unshift(i.prependCommand),i.args)for(const n of i.args)o.includes(n)||o.push(n);if(r&&i.monoArgs)for(const n of i.monoArgs)o.includes(n)||o.push(n);return o},et=(e,t)=>{const r=L(t.cwd,t.targetDir)||".",i=[...e.args];i.includes(r)||i.unshift(r);const o=Ze(e.source,i,t.inMonorepo);return a.info(`Running ${e.source} via ${t.pm.name} dlx...`),Z(t.pm,{additionalPackages:[],args:o,package:e.source,shellMode:!1,silent:!1},t.cwd,t.logger)},tt=async(e,t)=>{const{createConfig:r}=t;a.info(`Downloading template from ${e.source}...`);try{const i=await fe(e.source,{auth:r?.auth||process.env.GIGET_AUTH||process.env.GITHUB_TOKEN||process.env.GH_TOKEN||void 0,dir:t.targetDir,force:!0,preferOffline:r?.preferOffline,provider:r?.defaultProvider,registry:r?.registry});return a.info(`Downloaded to ${i.dir}`),0}catch(i){const o=i instanceof Error?i.message:String(i);return a.warn(`Failed to download template: ${o}`),1}},rt=async(e,t)=>{switch(e.type){case"builtin:app":case"builtin:library":return Ae(e,t);case"builtin:generator":return He(t);case"builtin:monorepo":return Qe(t);case"remote:git":return tt(e,t);case"remote:npm":return et(e,t);default:throw new Error(`Unknown template type: ${e.type}`)}},it=e=>{const t=l(e,".vscode");y(t);const r=l(t,"settings.json"),i={"editor.defaultFormatter":"oxc.oxc-vscode","editor.formatOnSave":!0};if(j(r))try{const c=V(r);u(r,`${JSON.stringify({...i,...c},null,4)}
128
- `),a.success("Merged .vscode/settings.json")}catch{a.warn("Could not merge .vscode/settings.json, skipping")}else u(r,`${JSON.stringify(i,null,4)}
129
- `),a.success("Created .vscode/settings.json");const o=l(t,"extensions.json"),n={recommendations:["oxc.oxc-vscode"]};if(j(o))try{const c=V(o);u(o,`${JSON.stringify({...c,recommendations:[...new Set([...c.recommendations||[],...n.recommendations])]},null,4)}
130
- `),a.success("Merged .vscode/extensions.json")}catch{a.warn("Could not merge .vscode/extensions.json, skipping")}else u(o,`${JSON.stringify(n,null,4)}
131
- `),a.success("Created .vscode/extensions.json")},at=(e,t)=>{const r=l(e,".ai");y(r);const i=l(r,"instructions");if(j(i))return;const o=`# Project Instructions
132
-
133
- This project was scaffolded with vis create.
134
-
135
- ## Development
136
-
137
- - Package manager: ${t}
138
- - Build: \`${t} run build\`
139
- - Test: \`${t} run test\`
140
- - Lint: \`${t} run lint\`
141
-
142
- ## Conventions
143
-
144
- - Use TypeScript strict mode
145
- - ESM modules (\`"type": "module"\`)
146
- - Follow Angular-style conventional commits
147
- `;u(i,o),a.success("Created .ai/instructions")},nt=e=>{oe("git",["init"],{cwd:e,stdio:"pipe"}).status===0?a.success("Initialized git repository"):a.warn("Failed to initialize git repository")},ot=(e,t,r,i=!1)=>(a.info("Installing dependencies..."),ue(t,{dev:!1,filter:[],force:!1,frozenLockfile:!1,ignoreScripts:!1,lockfileOnly:!1,noOptional:!1,offline:i,prod:!1,recursive:!1,silent:!1,workspaceRoot:!1},e,r)===0?(a.success("Dependencies installed"),!0):(a.warn("Dependency installation failed (you can run install manually)"),!1)),st=e=>{const t=e.split("#")[0].split("?")[0].replace(/\/+$/,"").replace(/\.git$/,"").split("/").filter(Boolean).at(-1)??"",r=t.includes(":")?t.split(":").pop()??t:t;return N(r)||"my-project"},ct=e=>{if(a.info(""),a.info(" Built-in templates:"),a.info(` ${b(k("vis:monorepo"))} ${p("Full pnpm workspace setup")}`),a.info(` ${b(k("vis:app"))} ${p("Application scaffold via create-vite")}`),a.info(` ${b(k("vis:library"))} ${p("Reusable TypeScript library package")}`),a.info(` ${b(k("vis:generator"))} ${p("Code generator scaffold with bin entry")}`),e&&Object.keys(e).length>0){a.info(""),a.info(" Config aliases (vis.config.ts → create.templates):");for(const[t,r]of Object.entries(e))a.info(` ${b(k(t))}${" ".repeat(Math.max(1,16-t.length))}${p(r)}`)}a.info(""),a.info(" Remote templates:"),a.info(` ${p("Any npm create-* package:")} vis create vite`),a.info(` ${p("GitHub repository:")} vis create user/repo`),a.info(` ${p("GitLab / Bitbucket:")} vis create gitlab:user/repo`),a.info(` ${p("Full URL:")} vis create https://github.com/user/repo`),a.info(""),a.info(` ${p("Template args after --:")} vis create vite -- --template react-ts`),a.info("")},lt=(e,t,r,i)=>{const o=$(t)===$(e)?"":e;process.stderr.write(`
148
- `),a.success("Project created successfully!"),process.stderr.write(`
149
- `),a.notice("Next steps:"),o&&a.info(` cd ${o}`),i||a.info(` ${r} install`),a.info(` ${r} run dev`),process.stderr.write(`
150
- `)},vt=async({argument:e,logger:t,options:r,rawUnknown:i,visConfig:o,workspaceRoot:n})=>{const c=Array.isArray(e)?e:e?[e]:[],s=o?.create;if(r.list){ct(s?.templates);return}const m=r.cwd||n||process.cwd(),w=!!n,v=!!process.stdin.isTTY,x=pe(m);let f,h,d,C=s?.defaultEditor,D=s?.gitInit??!1,P=[],S=x,A=!1;if(c.length===0&&v&&r.interactive!==!1){const g=await Oe({cwd:m,defaultEditor:s?.defaultEditor,defaultGitInit:s?.gitInit,defaultPm:s?.defaultPm,inMonorepo:w});f=g.template,h=g.projectName,d=$(m,g.targetDir),C=g.editor??C,D=g.gitInit,A=g.overwrite,g.pm&&(S={name:g.pm,version:x.version})}else{if(c.length===0)throw new Error(`No template specified. Usage: vis create <template> [name] [-- args...]
151
- Use --list to see available templates, or run interactively in a terminal.`);{let g=[...i??[]];if(g.length===0){const H=process.argv.slice(2),J=H.indexOf("--");J!==-1&&(g=H.slice(J+1))}const _=c.indexOf("--"),ie=_===-1?c:c.slice(0,_);P=[..._===-1?[]:c.slice(_+1),...g],[f,h]=ie,!h&&f&&(h=st(f)),C=r.editor==="vscode"?"vscode":C,D=!!r.gitInit||D}}if(!f)throw new Error("No template specified.");const R=s?.templates?.[f]??f,U=xe(R,P);if(!d){const g=w?$e(U.type):".",_=De(h??"",$(m,g));d=_.targetDir,h=_.packageName}const G=N(h??"");if(!ee(G))throw new Error(`Invalid project name: "${h}". Use lowercase alphanumeric characters and hyphens.`);h=G;const re=$(d),O=L($(m),re);if(O===".."||O.startsWith(`..${ce}`)||le(O))throw new Error(`Target directory "${d}" is outside the working directory. Use a name without "../" path segments.`);if(!A&&!Re(d))throw new Error(`Target directory "${d}" is not empty.
152
- Use a different name or clear the directory first.`);R!==f&&a.info(`Alias: ${b(k(f))} → ${p(R)}`),a.info(`Template: ${b(k(R))}`),a.info(`Project: ${b(h)}`),a.info(`Target: ${p(d)}`),process.stderr.write(`
153
- `);const B=await rt(U,{createConfig:s,cwd:m,inMonorepo:w,logger:t,pm:S,projectName:h,targetDir:d});if(B!==0){process.exitCode=B;return}C==="vscode"&&it(d),j(d)&&at(d,S.name),D&&!w&&nt(d);let F=!1;s?.install!==!1&&j(l(d,"package.json"))&&(F=ot(d,S,t,s?.preferOffline)),lt(d,m,S.name,F)};export{vt as default};
1
+ import{createRequire as Q}from"node:module";import{I as w,j as P,E as u,q as T,s as v,V as D}from"../packem_shared/index.server-J83sowC4.js";import{m as j,f as A,v as ee,T as te,O as R,y as $}from"../packem_shared/index-CE6MsgcV.js";import G from"./index.js";import{a0 as oe,Z as C,g as se,a1 as ne,a2 as ae,a3 as re,a4 as ie}from"./cli-main.js";import{e as pe,W as B,l as I,a as L,U as q,R as ce}from"./catalog.js";import{a as S}from"../packem_shared/readJsonSync-DuMMeB3s-ihoybKvs.js";import{l as fe}from"../packem_shared/missing-package-json-CTF71tE5.js";const X=Q(import.meta.url),V=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Y=e=>{if(typeof V<"u"&&V.versions&&V.versions.node){const[a,o]=V.versions.node.split(".").map(Number);if(a>22||a===22&&o>=3||a===20&&o>=16)return V.getBuiltinModule(e)}return X(e)},{readFileSync:H,writeFileSync:z}=Y("node:fs"),le=e=>/[*?[\]{}!]/.test(e),ge=e=>typeof e=="string"?e:e.reason,de=e=>typeof e=="string"?void 0:e.replacement,U=(e,a)=>e.some(o=>G(o,a)),Z=(e,a)=>{if(typeof e=="string")return!0;const o=Array.isArray(e.packages)&&e.packages.length>0,t=Array.isArray(e.paths)&&e.paths.length>0;return!!(!o&&!t||o&&a.packageName!==void 0&&U(e.packages,a.packageName)||t&&U(e.paths,a.packageDir))},ue=(e,a)=>{const o=a[e.depName];if(o!==void 0&&Z(o,e))return{pattern:e.depName,rule:o};for(const[t,r]of Object.entries(a))if(le(t)&&G(t,e.depName)&&Z(r,e))return{pattern:t,rule:r}},me=(e,a)=>{if(Object.keys(a).length===0)return[];const o=[];for(const t of e){if(t.isInternal)continue;const r=ue(t,a);r&&o.push({depName:t.depName,depType:t.depType,matchedPattern:r.pattern,packageDir:t.packageDir,packageJsonPath:t.packageJsonPath,packageName:t.packageName,reason:ge(r.rule),replacement:de(r.rule),specifier:t.specifier})}return o},he=new Set(["dependencies","devDependencies","peerDependencies"]),ke=e=>e.startsWith("catalog:"),ye=e=>e.startsWith("workspace:"),$e=(e,a)=>{if(!e)return!1;for(const o of e.values())if(o.has(a))return!0;return!1},Pe=(e,a={})=>{const o=a.min??3,t=new Set(a.ignoreDeps),r=e.filter(i=>i.isInternal||!he.has(i.depType)||ye(i.specifier)||a.dep!==void 0&&i.depName!==a.dep?!1:!t.has(i.depName)),n=new Map;for(const i of r){const p=n.get(i.depName);p?p.push(i):n.set(i.depName,[i])}const s=[];for(const[i,p]of n){if($e(a.catalogs,i)||p.some(m=>ke(m.specifier)))continue;const c=new Map;for(const m of p){let d=c.get(m.specifier);d||(d=new Set,c.set(m.specifier,d)),d.add(m.packageJsonPath)}const f=[...c.entries()].sort((m,d)=>m[1].size!==d[1].size?d[1].size-m[1].size:m[0].localeCompare(d[0]))[0];!f||f[1].size<o||s.push({catalogName:"default",depName:i,instanceCount:f[1].size,specifier:f[0]})}return s.sort((i,p)=>i.depName.localeCompare(p.depName))},we=(e,a)=>{if(a.length===0)return;const o=j(e,"pnpm-workspace.yaml"),t=A(o)?H(o,"utf8"):"",r=t.includes(`\r
2
+ `)?`\r
3
+ `:`
4
+ `,n=a.filter(d=>d.catalogName==="default").sort((d,g)=>d.depName.localeCompare(g.depName));if(n.length===0)return;const s=t.length>0?t.split(r):[],i=s.findIndex(d=>/^catalog\s*:\s*$/.test(d));if(i===-1){const d=["catalog:"];for(const y of n)d.push(` ${y.depName}: "${y.specifier}"`);let g=0;for(;g<s.length&&(s[g]??"").trim().length===0;)g+=1;const h=[...s.slice(0,g),...d,"",...s.slice(g)].join(r);return z(o,h.endsWith(r)?h:`${h}${r}`),o}let p=s.length;const c=new Set;for(let d=i+1;d<s.length;d+=1){const g=s[d]??"",h=g.trimStart();if(g.length===0)continue;if(g.length-h.length===0&&h.length>0&&!h.startsWith("#")){p=d;break}const y=/^([\w./@-]+)\s*:/.exec(h);y?.[1]&&c.add(y[1])}const f=[];for(const d of n)c.has(d.depName)||f.push(` ${d.depName}: "${d.specifier}"`);if(f.length===0)return;const m=[...s.slice(0,p),...f,...s.slice(p)].join(r);return z(o,m.endsWith(r)?m:`${m}${r}`),o},De=(e,a)=>{if(a.length===0)return"";const o=j(e,"pnpm-workspace.yaml"),t=A(o)?H(o,"utf8"):"",r=[...a].sort((i,p)=>i.depName.localeCompare(p.depName)),n=["--- pnpm-workspace.yaml","+++ pnpm-workspace.yaml"],s=t.includes(`\r
5
+ `)?`\r
6
+ `:`
7
+ `;if((t.length>0?t.split(s):[]).findIndex(i=>/^catalog\s*:\s*$/.test(i))===-1){n.push("@@ +1 @@","+catalog:");for(const i of r)n.push(`+ ${i.depName}: "${i.specifier}"`)}else{n.push("@@ catalog: @@");for(const i of r)n.push(`+ ${i.depName}: "${i.specifier}"`)}return n.join(s)},ve=e=>{const a=[],o=pe(e);if(o){const r=j(e,"pnpm-workspace.yaml");for(const n of o)n.startsWith("!")||B(e,[n]).length===0&&a.push({pattern:n,source:"pnpm-workspace.yaml",sourcePath:r})}const t=j(e,"package.json");if(A(t)){const r=S(t).workspaces,n=Array.isArray(r)?r:r?.packages;if(n)for(const s of n)typeof s!="string"||s.startsWith("!")||B(e,[s]).length===0&&a.push({pattern:s,source:"package.json",sourcePath:t})}return a},Ne=(e,a={})=>{const{useEditorconfig:o}=a,t=new Map;for(const n of e){const s=t.get(n.sourcePath);s?s.push(n):t.set(n.sourcePath,[n])}const r=[];for(const[n,s]of t){const i=new Set(s.map(f=>f.pattern));if(n.endsWith(".yaml")||n.endsWith(".yml")){const f=ee(n).split(`
8
+ `).filter(m=>{const d=m.trim();if(!d.startsWith("- "))return!0;const g=d.slice(2).replaceAll(/^['"]|['"]$/g,"");return!i.has(g)}).join(`
9
+ `);te(n,f,{overwrite:!0}),r.push(n);continue}const p=S(n),c=p.workspaces;Array.isArray(c)?p.workspaces=c.filter(f=>typeof f!="string"||!i.has(f)):c&&Array.isArray(c.packages)&&(c.packages=c.packages.filter(f=>typeof f!="string"||!i.has(f))),R(n,p,{indent:I(n,{useEditorconfig:o}),overwrite:!0}),r.push(n)}return r},be=["dependencies","devDependencies","peerDependencies","optionalDependencies"],xe=(e,a={})=>{const o=new Set(a.ignoreBlocks),t=oe(e),r=[];for(const n of t){const s=j(e,n,"package.json"),i=C(s);if(!i)continue;const p=typeof i.name=="string"?i.name:void 0;for(const c of be){if(o.has(c))continue;const f=i[c];typeof f=="object"&&f!==null&&!Array.isArray(f)&&Object.keys(f).length===0&&r.push({depType:c,packageDir:n,packageJsonPath:s,packageName:p})}}return r},Je=(e,a={})=>{const{useEditorconfig:o}=a,t=new Map;for(const n of e){const s=t.get(n.packageJsonPath);s?s.push(n):t.set(n.packageJsonPath,[n])}const r=[];for(const[n,s]of t){const i=S(n);for(const p of s){const c=i[p.depType];typeof c=="object"&&c!==null&&!Array.isArray(c)&&Object.keys(c).length===0&&Reflect.deleteProperty(i,p.depType)}R(n,i,{indent:I(n,{useEditorconfig:o}),overwrite:!0}),r.push(n)}return r},Te=["dependencies","devDependencies","optionalDependencies","peerDependencies"],Se=(e,a={})=>{const o=new Set(a.depTypes??Te),t=new Set(a.ignoreDeps),r=new Map;for(const s of e)s.packageDir!=="."||!o.has(s.depType)||r.set(s.depName,{depType:s.depType,specifier:s.specifier});if(r.size===0)return[];const n=[];for(const s of e){if(s.packageDir==="."||!o.has(s.depType)||t.has(s.depName))continue;const i=r.get(s.depName);i&&n.push({childSpecifier:s.specifier,depName:s.depName,depType:s.depType,packageDir:s.packageDir,packageJsonPath:s.packageJsonPath,packageName:s.packageName,rootDepType:i.depType,rootSpecifier:i.specifier})}return n},Me=(e,a)=>{if(!a)return[];const o=j(e,"package.json"),t=C(o);if(!t)return[];if(t.private!==!0)return[];const r=t.dependencies;if(typeof r!="object"||r===null||Array.isArray(r))return[];const n=Object.keys(r);return n.length===0?[]:[{depNames:n,packageJsonPath:o}]},je=(e,a={})=>{const{useEditorconfig:o}=a,t=[];for(const r of e){const n=S(r.packageJsonPath),s=n.dependencies;if(typeof s!="object"||s===null)continue;const i=s;n.devDependencies??={};const p=n.devDependencies;for(const c of r.depNames){const f=i[c];typeof f=="string"&&(c in p||(p[c]=f),Reflect.deleteProperty(i,c))}Object.keys(i).length===0&&Reflect.deleteProperty(n,"dependencies"),R(r.packageJsonPath,n,{indent:I(r.packageJsonPath,{useEditorconfig:o}),overwrite:!0}),t.push(r.packageJsonPath)}return t},We=/^[a-z][\w-]*@\S+$/i,Re=(e,a,o={})=>{if(!a)return[];const t=j(e,"package.json"),r=C(t);if(!r)return[];const n=r.packageManager;return typeof n=="string"&&We.test(n)?[]:[{packageJsonPath:t,suggested:o.suggested}]},Ie=(e,a={})=>{const{useEditorconfig:o}=a,t=[];for(const r of e){if(!r.suggested)continue;const n=S(r.packageJsonPath);n.packageManager=r.suggested,R(r.packageJsonPath,n,{indent:I(r.packageJsonPath,{useEditorconfig:o}),overwrite:!0}),t.push(r.packageJsonPath)}return t},Ee=(e,a)=>{if(!a)return[];const o=j(e,"package.json"),t=C(o);return t?t.private===!0?[]:[{packageJsonPath:o,rawValue:t.private}]:[]},Fe=(e,a={})=>{const{useEditorconfig:o}=a,t=[];for(const r of e){const n=S(r.packageJsonPath);let s=n;if("private"in n)n.private=!0;else{const{name:i,version:p,...c}=n,f={};i!==void 0&&(f.name=i),p!==void 0&&(f.version=p),f.private=!0;for(const[m,d]of Object.entries(c))f[m]=d;s=f}R(r.packageJsonPath,s,{indent:I(r.packageJsonPath,{useEditorconfig:o}),overwrite:!0}),t.push(r.packageJsonPath)}return t},Ve=[{id:"react",label:"React",members:["react","react-dom","react-test-renderer"]},{id:"next",label:"Next.js",members:["next","@next/font","@next/bundle-analyzer","@next/mdx","@next/third-parties","@next/eslint-plugin-next","eslint-config-next"]},{id:"babel",label:"Babel",prefixes:["@babel/"]},{id:"storybook",label:"Storybook",members:["storybook","sb"],prefixes:["@storybook/"]},{id:"vitest",label:"Vitest",members:["vitest"],prefixes:["@vitest/"]},{id:"playwright",label:"Playwright",members:["playwright","@playwright/test"]},{id:"trpc",label:"tRPC",prefixes:["@trpc/"]},{id:"prisma",label:"Prisma",members:["prisma"],prefixes:["@prisma/"]},{id:"turborepo",label:"Turborepo",members:["turbo","turbo-ignore","@turbo/gen","eslint-config-turbo","eslint-plugin-turbo"]},{id:"typescript-eslint",label:"typescript-eslint",members:["typescript-eslint"],prefixes:["@typescript-eslint/"]},{id:"eslint-stylistic",label:"ESLint Stylistic",prefixes:["@stylistic/"]},{id:"lexical",label:"Lexical",members:["lexical"],prefixes:["@lexical/"]},{id:"nx",label:"Nx",prefixes:["@nx/","@nrwl/"]}],Ae=new Set(["dependencies","devDependencies","peerDependencies"]),Ce=(e,a)=>{for(const o of e)if(o.members?.includes(a)||o.prefixes?.some(t=>a.startsWith(t)))return o},Oe=e=>e.startsWith("workspace:")||e.startsWith("catalog:"),_e=(e,a={})=>{const o=new Set(a.ignoreFamilies),t=new Map;for(const i of Ve)t.set(i.id,i);for(const i of a.extraFamilies??[])t.set(i.id,i);const r=[...t.values()],n=new Map;for(const i of e){if(i.isInternal||!Ae.has(i.depType)||Oe(i.specifier))continue;const p=Ce(r,i.depName);if(!p||o.has(p.id))continue;const c=n.get(p.id),f={depName:i.depName,depType:i.depType,packageDir:i.packageDir,packageJsonPath:i.packageJsonPath,packageName:i.packageName,specifier:i.specifier};c?c.push(f):n.set(p.id,[f])}const s=[];for(const[i,p]of n){const c=[...new Set(p.map(m=>m.specifier))];if(c.length<2)continue;const f=t.get(i);f&&s.push({family:i,familyLabel:f.label??i,members:p,specifiers:c})}return s},ze=e=>e.startsWith("@types/"),Be=(e,a={})=>{const o=new Set(a.ignoreDeps),t=new Map,r=s=>{const i=t.get(s);if(i!==void 0)return i;try{const p=S(s).private===!0;return t.set(s,p),p}catch{return t.set(s,!1),!1}},n=[];for(const s of e)s.depType==="dependencies"&&ze(s.depName)&&(o.has(s.depName)||r(s.packageJsonPath)&&n.push({childSpecifier:s.specifier,depName:s.depName,packageDir:s.packageDir,packageJsonPath:s.packageJsonPath,packageName:s.packageName}));return n},Le=(e,a={})=>{const{useEditorconfig:o}=a,t=new Map;for(const n of e){const s=t.get(n.packageJsonPath);s?s.push(n):t.set(n.packageJsonPath,[n])}const r=[];for(const[n,s]of t){const i=S(n),p=i.dependencies;if(typeof p!="object"||p===null)continue;const c=p;i.devDependencies??={};const f=i.devDependencies;for(const m of s){const d=c[m.depName];typeof d=="string"&&(m.depName in f||(f[m.depName]=d),Reflect.deleteProperty(c,m.depName))}Object.keys(c).length===0&&Reflect.deleteProperty(i,"dependencies"),R(n,i,{indent:I(n,{useEditorconfig:o}),overwrite:!0}),r.push(n)}return r},qe=e=>e.startsWith("workspace:"),Ue=(e,a={})=>{const o=a.fixSpecifier??"workspace:*",t=[];for(const r of e)r.isInternal&&(qe(r.specifier)||t.push({depName:r.depName,depType:r.depType,fix:o,packageDir:r.packageDir,packageJsonPath:r.packageJsonPath,packageName:r.packageName,specifier:r.specifier}));return t},Ze=(e,a,o,t)=>{const r=a.split(".");let n=e;for(let p=0;p<r.length-1;p+=1){const c=r[p],f=n[c];(typeof f!="object"||f===null)&&(n[c]={}),n=n[c]}const s=r.at(-1);let i=n[s];(typeof i!="object"||i===null)&&(i={},n[s]=i),i[o]=t},Ge=(e,a={})=>{const{useEditorconfig:o}=a,t=new Map;for(const n of e){const s=t.get(n.packageJsonPath);s?s.push(n):t.set(n.packageJsonPath,[n])}const r=[];for(const[n,s]of t){const i=S(n);for(const p of s)if(p.depType.includes("."))Ze(i,p.depType,p.depName,p.fix);else{const c=i[p.depType];typeof c=="object"&&c!==null&&(c[p.depName]=p.fix)}R(n,i,{indent:I(n,{useEditorconfig:o}),overwrite:!0}),r.push(n)}return r},He=new Set(["dependencies","devDependencies","peerDependencies"]),Ke=e=>e.startsWith("catalog:"),Qe=e=>e.startsWith("workspace:"),Xe=e=>{if(!e.startsWith("catalog:"))return;const a=e.slice(8);return a===""?"default":a},Ye=(e,a)=>{if(e.get("default")?.has(a))return"default";const o=[...e.keys()].filter(t=>t!=="default").sort();for(const t of o)if(e.get(t)?.has(a))return t},et=e=>e==="default"?"catalog:":`catalog:${e}`,tt=(e,a)=>{const o=[...e].sort((r,n)=>(r.packageName??r.packageDir).localeCompare(n.packageName??n.packageDir));let t;for(const r of o){const n=L(r.specifier);if(!n)continue;if(!t){t=r;continue}const s=L(t.specifier);if(!s){t=r;continue}const i=q(s,n),p=q(n,s);(a==="highest"&&i||a==="lowest"&&p)&&(t=r)}if(t)return{canonical:t,canonicalSource:t.packageName??t.packageDir}},ot=(e,a={})=>{const o=a.resolve??"highest",t=new Set(a.ignoreDeps),r=[],n=e.filter(i=>i.isInternal||!He.has(i.depType)||Qe(i.specifier)||a.dep!==void 0&&i.depName!==a.dep?!1:!t.has(i.depName)),s=new Map;for(const i of n){const p=s.get(i.depName);p?p.push(i):s.set(i.depName,[i])}for(const[i,p]of s){const c=a.pinned?.get(i);if(c!==void 0){for(const g of p)g.specifier!==c&&r.push({canonicalSource:"cli:--pin",depName:i,depType:g.depType,fix:c,packageDir:g.packageDir,packageJsonPath:g.packageJsonPath,packageName:g.packageName,specifier:g.specifier});continue}if(o==="catalog"){const{catalogs:g}=a;if(!g)continue;const h=Ye(g,i);if(!h)continue;const y=et(h);for(const x of p)Xe(x.specifier)!==h&&r.push({canonicalSource:`catalog:${h}`,depName:i,depType:x.depType,fix:y,packageDir:x.packageDir,packageJsonPath:x.packageJsonPath,packageName:x.packageName,specifier:x.specifier});continue}const f=p.filter(g=>!Ke(g.specifier));if(f.length<2||new Set(f.map(g=>g.specifier)).size<=1)continue;const m=tt(f,o);if(!m)continue;const d=m.canonical.specifier;for(const g of f)g.specifier!==d&&r.push({canonicalSource:m.canonicalSource,depName:i,depType:g.depType,fix:d,packageDir:g.packageDir,packageJsonPath:g.packageJsonPath,packageName:g.packageName,specifier:g.specifier})}return r},st=(e,a={})=>{const{useEditorconfig:o}=a,t=new Map;for(const n of e){const s=t.get(n.packageJsonPath);s?s.push(n):t.set(n.packageJsonPath,[n])}const r=[];for(const[n,s]of t){const i=S(n);for(const p of s){const c=i[p.depType];typeof c=="object"&&c!==null&&(c[p.depName]=p.fix)}R(n,i,{indent:I(n,{useEditorconfig:o}),overwrite:!0}),r.push(n)}return r},nt=e=>{if(A(j(e,"pnpm-workspace.yaml")))return!0;const a=j(e,"package.json");if(!A(a))return!1;try{return S(a).workspaces!==void 0}catch{return!1}},E=(e,a)=>{const o=new Map;for(const t of e){const r=a(t),n=o.get(r);n?n.push(t):o.set(r,[t])}return o},at=(e,a,o,t)=>{if(e.length===0){t.info(w("✓ workspace-protocol: no violations"));return}const r=o?"Fixed":"Found",n=o?T:v;t.info(n(P(`${r} ${String(e.length)} workspace-protocol violation${e.length===1?"":"s"}`)));for(const[s,i]of E(e,p=>p.packageName??p.packageJsonPath)){const p=$(a,i[0].packageJsonPath);t.info(` ${P(s)} ${u(`(${p})`)}`);for(const c of i){const f=o?T("→"):v("→");t.info(` ${u(c.depType)} ${c.depName}: ${D(c.specifier)} ${f} ${w(c.fix)}`)}}o||t.info(u(" Run with --fix to rewrite specifiers in place."))},rt=(e,a,o)=>{if(e.length===0){o.info(w("✓ redefine-root: no violations"));return}o.info(v(P(`Found ${String(e.length)} dep${e.length===1?"":"s"} re-declared from root`)));for(const[t,r]of E(e,n=>n.packageName??n.packageJsonPath)){const n=$(a,r[0].packageJsonPath);o.info(` ${P(t)} ${u(`(${n})`)}`);for(const s of r)o.info(` ${u(s.depType)} ${s.depName}: ${D(s.childSpecifier)} ${u(`(root ${s.rootDepType}: ${s.rootSpecifier})`)}`)}o.info(u(" Remove these from child package.json files — root pin will resolve."))},it=(e,a,o,t)=>{if(e.length===0){t.info(w("✓ workspace-versions: no drift"));return}const r=o?"Fixed":"Found",n=o?T:v;t.info(n(P(`${r} ${String(e.length)} workspace-version drift${e.length===1?"":"s"}`)));for(const[s,i]of E(e,p=>p.depName)){const p=i[0].fix,c=i[0].canonicalSource;t.info(` ${P(s)} ${u(`canonical: ${p} (from ${c})`)}`);for(const f of i){const m=$(a,f.packageJsonPath),d=f.packageName??m,g=o?T("→"):v("→");t.info(` ${d} ${u(`(${m})`)} ${u(f.depType)}: ${D(f.specifier)} ${g} ${w(f.fix)}`)}}o||t.info(u(" Run with --fix to align drifting specifiers."))},pt=(e,a,o)=>{if(e.length===0){o.info(w("✓ banned-deps: no violations"));return}o.info(D(P(`Found ${String(e.length)} banned dep${e.length===1?"":"s"}`)));for(const[t,r]of E(e,n=>n.packageName??n.packageJsonPath)){const n=$(a,r[0].packageJsonPath);o.info(` ${P(t)} ${u(`(${n})`)}`);for(const s of r){const i=s.replacement?` ${u("→")} ${w(s.replacement)}`:"";o.info(` ${u(s.depType)} ${D(s.depName)}${i}`),o.info(` ${u(s.reason)}`)}}},ct=(e,a,o,t)=>{if(e.length===0){t.info(w("✓ catalog-proposals: nothing worth promoting"));return}const r=o?"Added":"Would add",n=o?T:v;t.info(n(P(`${r} ${String(e.length)} catalog entr${e.length===1?"y":"ies"}`)));for(const s of e)t.info(` ${P(s.depName)}: ${w(s.specifier)} ${u(`(${String(s.instanceCount)} packages agree)`)}`);if(!o){const s=De(a,e);if(s){t.info(""),t.info(u("Proposed pnpm-workspace.yaml changes:"));for(const i of s.split(`
10
+ `))i.startsWith("+")?t.info(w(i)):i.startsWith("-")?t.info(D(i)):t.info(u(i))}t.info(u(" Run with --fix to write these entries to pnpm-workspace.yaml."))}},ft=(e,a,o,t)=>{if(e.length===0){t.info(w("✓ custom-types: no engines / packageManager / volta drift"));return}const r=o?"Fixed":"Found",n=o?T:v;t.info(n(P(`${r} ${String(e.length)} custom-type drift${e.length===1?"":"s"}`)));for(const[s,i]of E(e,p=>`${p.customType} ${p.depName}`)){const p=i[0].fix,c=i[0].canonicalSource;t.info(` ${P(s)} ${u(`canonical: ${p} (from ${c})`)}`);for(const f of i){const m=$(a,f.packageJsonPath),d=f.packageName??m,g=o?T("→"):v("→");t.info(` ${d} ${u(`(${m})`)}: ${D(f.specifier)} ${g} ${w(f.fix)}`)}}o||t.info(u(" Run with --fix to align engines/packageManager/volta versions."))},lt=(e,a,o,t)=>{if(e.length===0){t.info(w("✓ empty-deps: no empty dependency blocks"));return}const r=o?"Removed":"Found",n=o?T:v;t.info(n(P(`${r} ${String(e.length)} empty dependency block${e.length===1?"":"s"}`)));for(const[s,i]of E(e,p=>p.packageName??p.packageJsonPath)){const p=$(a,i[0].packageJsonPath);t.info(` ${P(s)} ${u(`(${p})`)}`);for(const c of i)t.info(` ${u(c.depType)}: ${D("{}")}`)}o||t.info(u(" Run with --fix to drop empty blocks."))},gt=(e,a,o,t)=>{if(e.length===0){t.info(w('✓ root-private: root package.json is "private": true'));return}const r=o?"Set":"Missing",n=o?T:D;for(const s of e){const i=$(a,s.packageJsonPath);if(t.info(n(P(`${r} "private": true on root ${u(`(${i})`)}`))),!o){const p=s.rawValue===void 0?"absent":JSON.stringify(s.rawValue);t.info(` ${u("current:")} ${D(p)}`)}}o||t.info(u(' Run with --fix to set "private": true.'))},dt=(e,a,o,t)=>{if(e.length===0){t.info(w("✓ root-package-manager: packageManager field present"));return}const r=o?"Set":"Missing",n=o?T:D;for(const s of e){const i=$(a,s.packageJsonPath);t.info(n(P(`${r} packageManager on root ${u(`(${i})`)}`))),!o&&!s.suggested&&t.info(u(" no canonical specifier configured (set policy.rootPackageManager.suggested to enable --fix)"))}o||t.info(u(' e.g. "packageManager": "pnpm@10.32.1"'))},ut=(e,a,o,t)=>{if(e.length===0){t.info(w("✓ root-deps: no runtime dependencies on private root"));return}const r=o?"Moved":"Found",n=o?T:v;for(const s of e){const i=$(a,s.packageJsonPath);t.info(n(P(`${r} ${String(s.depNames.length)} runtime dep${s.depNames.length===1?"":"s"} on private root ${u(`(${i})`)}`)));for(const p of s.depNames)t.info(` ${D(p)}`)}o||t.info(u(" Run with --fix to move them to devDependencies."))},mt=(e,a)=>{if(e.length===0){a.info(w("✓ missing-package-json: every workspace dir has a package.json"));return}a.info(v(P(`Found ${String(e.length)} workspace dir${e.length===1?"":"s"} without a package.json`)));for(const o of e)a.info(` ${D(o.packageDir)}`);a.info(u(" Either delete the directory or scaffold a package.json (vis create)."))},ht=(e,a,o)=>{if(e.length===0){o.info(w("✓ dead-workspace-pattern: every workspace pattern matches at least one package"));return}const t=a?"Removed":"Found",r=a?T:v;o.info(r(P(`${t} ${String(e.length)} unmatched workspace pattern${e.length===1?"":"s"}`)));for(const[n,s]of E(e,i=>i.source)){o.info(` ${P(n)}`);for(const i of s)o.info(` ${D(i.pattern)}`)}a||o.info(u(" Run with --fix to drop dead patterns."))},kt=(e,a,o,t)=>{if(e.length===0){t.info(w("✓ types-in-deps: no @types/* in dependencies of private packages"));return}const r=o?"Moved":"Found",n=o?T:v;t.info(n(P(`${r} ${String(e.length)} @types/* dep${e.length===1?"":"s"} in dependencies`)));for(const[s,i]of E(e,p=>p.packageName??p.packageJsonPath)){const p=$(a,i[0].packageJsonPath);t.info(` ${P(s)} ${u(`(${p})`)}`);for(const c of i)t.info(` ${D(c.depName)} ${u(c.childSpecifier)}`)}o||t.info(u(" Run with --fix to move them to devDependencies."))},yt=(e,a,o)=>{if(e.length===0){o.info(w("✓ similar-deps: every related dep family is in sync"));return}o.info(v(P(`Found ${String(e.length)} family${e.length===1?"":" families"} with version drift`)));for(const t of e){o.info(` ${P(t.familyLabel)} ${u(`(${t.specifiers.join(", ")})`)}`);for(const r of t.members){const n=$(a,r.packageJsonPath),s=r.packageName??n;o.info(` ${s} ${u(`(${n})`)} ${u(r.depType)}: ${D(r.depName)}@${v(r.specifier)}`)}}o.info(u(" Pick a single specifier per family and align by hand — auto-fix is unsafe across name boundaries."))},$t=(e,a,o,t,r)=>{let n=!0;const s=i=>{n||r.info(""),n=!1,i()};t.workspaceProtocol&&s(()=>{at(e.workspaceProtocol??[],a,o.workspaceProtocol,r)}),t.redefineRoot&&s(()=>{rt(e.redefineRoot??[],a,r)}),t.workspaceVersions&&s(()=>{it(e.workspaceVersions??[],a,o.workspaceVersions,r)}),t.customTypes&&s(()=>{ft(e.customTypes??[],a,o.customTypes,r)}),e.catalogProposals!==void 0&&s(()=>{ct(e.catalogProposals??[],a,o.catalogProposals,r)}),t.bannedDeps&&s(()=>{pt(e.bannedDeps??[],a,r)}),t.emptyDeps&&s(()=>{lt(e.emptyDeps??[],a,o.emptyDeps,r)}),t.rootPrivate&&s(()=>{gt(e.rootPrivate??[],a,o.rootPrivate,r)}),t.rootPackageManager&&s(()=>{dt(e.rootPackageManager??[],a,o.rootPackageManager,r)}),t.rootDeps&&s(()=>{ut(e.rootDeps??[],a,o.rootDeps,r)}),t.missingPackageJson&&s(()=>{mt(e.missingPackageJson??[],r)}),t.deadWorkspacePatterns&&s(()=>{ht(e.deadWorkspacePatterns??[],o.deadWorkspacePatterns,r)}),t.typesInDeps&&s(()=>{kt(e.typesInDeps??[],a,o.typesInDeps,r)}),t.similarDeps&&s(()=>{yt(e.similarDeps??[],a,r)})},Pt=(e,a)=>{for(const o of e.workspaceProtocol??[]){const t=$(a,o.packageJsonPath);process.stdout.write(`workspace-protocol ${t} ${o.depType} ${o.depName} ${o.specifier} → ${o.fix}
11
+ `)}for(const o of e.redefineRoot??[]){const t=$(a,o.packageJsonPath);process.stdout.write(`redefine-root ${t} ${o.depType} ${o.depName} ${o.childSpecifier}
12
+ `)}for(const o of e.workspaceVersions??[]){const t=$(a,o.packageJsonPath);process.stdout.write(`workspace-versions ${t} ${o.depType} ${o.depName} ${o.specifier} ${o.fix}
13
+ `)}for(const o of e.customTypes??[]){const t=$(a,o.packageJsonPath);process.stdout.write(`custom-types ${t} ${o.customType} ${o.depName} ${o.specifier} → ${o.fix}
14
+ `)}for(const o of e.bannedDeps??[]){const t=$(a,o.packageJsonPath);process.stdout.write(`banned-deps ${t} ${o.depType} ${o.depName} ${o.reason}
15
+ `)}for(const o of e.catalogProposals??[])process.stdout.write(`catalog-proposal ${o.catalogName} ${o.depName} ${o.specifier} ${String(o.instanceCount)}
16
+ `);for(const o of e.emptyDeps??[]){const t=$(a,o.packageJsonPath);process.stdout.write(`empty-deps ${t} ${o.depType}
17
+ `)}for(const o of e.rootPrivate??[]){const t=$(a,o.packageJsonPath);process.stdout.write(`root-private ${t}
18
+ `)}for(const o of e.rootPackageManager??[]){const t=$(a,o.packageJsonPath);process.stdout.write(`root-package-manager ${t} ${o.suggested??""}
19
+ `)}for(const o of e.rootDeps??[]){const t=$(a,o.packageJsonPath);for(const r of o.depNames)process.stdout.write(`root-deps ${t} ${r}
20
+ `)}for(const o of e.missingPackageJson??[])process.stdout.write(`missing-package-json ${o.packageDir}
21
+ `);for(const o of e.deadWorkspacePatterns??[])process.stdout.write(`dead-workspace-pattern ${o.source} ${o.pattern}
22
+ `);for(const o of e.typesInDeps??[]){const t=$(a,o.packageJsonPath);process.stdout.write(`types-in-deps ${t} ${o.depName} ${o.childSpecifier}
23
+ `)}for(const o of e.similarDeps??[])for(const t of o.members){const r=$(a,t.packageJsonPath);process.stdout.write(`similar-deps ${o.family} ${r} ${t.depType} ${t.depName} ${t.specifier}
24
+ `)}},wt=(e,a,o,t)=>{const r=s=>({...s,packageJsonPath:$(a,s.packageJsonPath)}),n={fixed:o};if(t.workspaceProtocol){const s=(e.workspaceProtocol??[]).map(i=>r(i));n.workspaceProtocol={issues:s,total:s.length}}if(t.redefineRoot){const s=(e.redefineRoot??[]).map(i=>r(i));n.redefineRoot={issues:s,total:s.length}}if(t.workspaceVersions){const s=(e.workspaceVersions??[]).map(i=>r(i));n.workspaceVersions={issues:s,total:s.length}}if(t.customTypes){const s=(e.customTypes??[]).map(i=>r(i));n.customTypes={issues:s,total:s.length}}if(t.bannedDeps){const s=(e.bannedDeps??[]).map(i=>r(i));n.bannedDeps={issues:s,total:s.length}}if(e.catalogProposals!==void 0){const s=e.catalogProposals;n.catalogProposals={proposals:s,total:s.length}}if(t.emptyDeps){const s=(e.emptyDeps??[]).map(i=>r(i));n.emptyDeps={issues:s,total:s.length}}if(t.rootPrivate){const s=(e.rootPrivate??[]).map(i=>r(i));n.rootPrivate={issues:s,total:s.length}}if(t.rootPackageManager){const s=(e.rootPackageManager??[]).map(i=>r(i));n.rootPackageManager={issues:s,total:s.length}}if(t.rootDeps){const s=(e.rootDeps??[]).map(i=>r(i));n.rootDeps={issues:s,total:s.length}}if(t.missingPackageJson){const s=e.missingPackageJson??[];n.missingPackageJson={issues:s,total:s.length}}if(t.deadWorkspacePatterns){const s=e.deadWorkspacePatterns??[];n.deadWorkspacePatterns={issues:s,total:s.length}}if(t.typesInDeps){const s=(e.typesInDeps??[]).map(i=>r(i));n.typesInDeps={issues:s,total:s.length}}if(t.similarDeps){const s=(e.similarDeps??[]).map(i=>({...i,members:i.members.map(p=>({...p,packageJsonPath:$(a,p.packageJsonPath)}))}));n.similarDeps={issues:s,total:s.length}}process.stdout.write(`${JSON.stringify(n,void 0,2)}
25
+ `)},J=(e,a,o)=>{const t=e[a];return typeof t=="boolean"?t:e[o]===!0},Dt=e=>{const a=e,o=(e.ban?.length??0)>0,t=(e.pin?.length??0)>0,r=J(a,"workspaceProtocol","workspace-protocol"),n=J(a,"redefineRoot","redefine-root"),s=J(a,"bannedDeps","banned-deps"),i=J(a,"workspaceVersions","workspace-versions"),p=J(a,"customTypes","custom-types"),c=J(a,"emptyDeps","empty-deps"),f=J(a,"rootPrivate","root-private"),m=J(a,"rootPackageManager","root-package-manager"),d=J(a,"rootDeps","root-deps"),g=J(a,"missingPackageJson","missing-package-json"),h=J(a,"deadWorkspacePatterns","dead-workspace-patterns"),y=J(a,"typesInDeps","types-in-deps"),x=J(a,"similarDeps","similar-deps");return r||n||s||i||p||c||f||m||d||g||h||y||x||o||t?{bannedDeps:s||o,customTypes:p,deadWorkspacePatterns:h,emptyDeps:c,missingPackageJson:g,redefineRoot:n,rootDeps:d,rootPackageManager:m,rootPrivate:f,similarDeps:x,typesInDeps:y,workspaceProtocol:r,workspaceVersions:i||t}:{bannedDeps:!0,customTypes:!0,deadWorkspacePatterns:!0,emptyDeps:!0,missingPackageJson:!0,redefineRoot:!0,rootDeps:!0,rootPackageManager:!0,rootPrivate:!0,similarDeps:!0,typesInDeps:!0,workspaceProtocol:!0,workspaceVersions:!0}},vt=e=>{const a=new Map;for(const o of e??[]){const t=o.lastIndexOf("@");if(t<=0||t===o.length-1)throw new Error(`Invalid --pin "${o}". Use: name@<specifier> (e.g. react@^18.2.0).`);const r=o.slice(0,t),n=o.slice(t+1);a.set(r,n)}return a},Nt=new Set(["catalog","highest","lowest"]),bt=e=>{if(e===void 0)return"highest";if(!Nt.has(e))throw new Error(`Invalid --resolve "${e}". Use: highest, lowest, or catalog.`);return e},W=(e,a)=>e?a===void 0||a===!0:!1,xt={"custom-types":"policy.customTypes.autofix","workspace-protocol":"policy.workspaceProtocol.autofix","workspace-versions":"policy.workspaceVersions.autofix"},_=(e,a,o,t)=>{const r=xt[a],n=o==="prompt"?`${r} = "prompt" (interactive mode not yet implemented; report-only)`:`${r} = false`,s=`Set "${r}": true (or remove it) to enable rewrites.`;e.warn(`${a}: ${String(t)} issue${t===1?"":"s"} not rewritten — ${n}. ${s}`)},Et=async({logger:e,options:a,visConfig:o,workspaceRoot:t})=>{if(!t)throw new Error("Could not determine workspace root. Run this command inside a monorepo.");const r=t,n=a.fix??!1,s=a.format??"human",i=a.quiet??!1;if(!["human","json","minimal"].includes(s))throw new Error(`Invalid --format "${s}". Use: human, json, or minimal.`);const p=Dt(a),c=o?.policy??{},f=o?.editorconfig??!0,m=vt(a.pin),d=a.ban??[];(a.dep!==void 0||a.resolve!==void 0)&&!p.workspaceVersions&&!i&&e.warn("--dep / --resolve only apply to --workspace-versions; ignored.");const g=se(r),h={},y={catalogProposals:!1,customTypes:!1,deadWorkspacePatterns:!1,emptyDeps:!1,rootDeps:!1,rootPackageManager:!1,rootPrivate:!1,typesInDeps:!1,workspaceProtocol:!1,workspaceVersions:!1},x=nt(r);let N=0;if(p.workspaceProtocol){const l=Ue(g,{fixSpecifier:a.fixSpecifier}),k=W(n,c.workspaceProtocol?.autofix);k&&l.length>0&&(Ge(l,{useEditorconfig:f}),y.workspaceProtocol=!0),h.workspaceProtocol=l,k||(N+=l.length),n&&!k&&l.length>0&&!i&&_(e,"workspace-protocol",c.workspaceProtocol?.autofix,l.length)}if(p.redefineRoot){const l=Se(g,{ignoreDeps:c.redefineRoot?.ignore});h.redefineRoot=l,N+=l.length}if(p.workspaceVersions){const l=bt(a.resolve??c.workspaceVersions?.resolve),k=l==="catalog"?ce(r):void 0;l==="catalog"&&(!k||k.size===0)&&!i&&e.warn("--resolve catalog: no catalog found in pnpm-workspace.yaml or root package.json — nothing to align.");const b=ot(g,{catalogs:k,dep:a.dep,ignoreDeps:c.workspaceVersions?.ignore,pinned:m.size>0?m:void 0,resolve:l}),F=W(n,c.workspaceVersions?.autofix);if(F&&b.length>0&&(st(b,{useEditorconfig:f}),y.workspaceVersions=!0),h.workspaceVersions=b,F||(N+=b.length),n&&!F&&b.length>0&&!i&&_(e,"workspace-versions",c.workspaceVersions?.autofix,b.length),a.proposeMin!==void 0){if(l!=="catalog"&&!i)e.warn("--propose-min only runs under --resolve catalog; ignored.");else if(l==="catalog"){const M=Pe(g,{catalogs:k,ignoreDeps:c.workspaceVersions?.ignore,min:a.proposeMin});F&&M.length>0&&(we(r,M),y.catalogProposals=!0),h.catalogProposals=M}}}if(p.customTypes){const l=c.customTypes?.extraTypes,k=ne(l);if(k.length>0){for(const K of k)e.error(`policy.customTypes.${K}`);process.exitCode=1;return}const b=ae(r,l),F=(a.resolve??c.customTypes?.resolve)==="lowest"?"lowest":"highest",M=re(b,{dep:a.dep,ignoreDeps:c.customTypes?.ignore,resolve:F}),O=W(n,c.customTypes?.autofix);O&&M.length>0&&(ie(M,{useEditorconfig:f}),y.customTypes=!0),h.customTypes=M,O||(N+=M.length),n&&!O&&M.length>0&&!i&&_(e,"custom-types",c.customTypes?.autofix,M.length)}if(p.bannedDeps){const l={...c.bannedDeps};for(const b of d)l[b]={reason:"banned via --ban CLI flag"};Object.keys(l).length===0&&a.bannedDeps&&!i&&e.warn("--banned-deps: no policy.bannedDeps in vis config, nothing to check.");const k=me(g,l);h.bannedDeps=k,N+=k.length}if(p.emptyDeps){const l=xe(r,{ignoreBlocks:c.emptyDeps?.ignoreBlocks}),k=W(n,c.emptyDeps?.autofix);k&&l.length>0&&(Je(l,{useEditorconfig:f}),y.emptyDeps=!0),h.emptyDeps=l,k||(N+=l.length)}if(p.rootPrivate){const l=Ee(r,x),k=W(n,c.rootPrivate?.autofix);k&&l.length>0&&(Fe(l,{useEditorconfig:f}),y.rootPrivate=!0),h.rootPrivate=l,k||(N+=l.length)}if(p.rootPackageManager){const l=Re(r,x,{suggested:c.rootPackageManager?.suggested}),k=W(n,c.rootPackageManager?.autofix);k&&l.some(b=>b.suggested!==void 0)&&(Ie(l,{useEditorconfig:f}),y.rootPackageManager=!0),h.rootPackageManager=l,(!k||!y.rootPackageManager)&&(N+=l.filter(b=>b.suggested===void 0||!y.rootPackageManager).length)}if(p.rootDeps){const l=Me(r,x),k=W(n,c.rootDeps?.autofix);k&&l.length>0&&(je(l,{useEditorconfig:f}),y.rootDeps=!0),h.rootDeps=l,k||(N+=l.length)}if(p.missingPackageJson){const l=fe(r);h.missingPackageJson=l,N+=l.length}if(p.deadWorkspacePatterns){const l=ve(r),k=W(n,c.deadWorkspacePatterns?.autofix);k&&l.length>0&&(Ne(l,{useEditorconfig:f}),y.deadWorkspacePatterns=!0),h.deadWorkspacePatterns=l,k||(N+=l.length)}if(p.typesInDeps){const l=Be(g,{ignoreDeps:c.typesInDeps?.ignore}),k=W(n,c.typesInDeps?.autofix);k&&l.length>0&&(Le(l,{useEditorconfig:f}),y.typesInDeps=!0),h.typesInDeps=l,k||(N+=l.length)}if(p.similarDeps){const l=_e(g,{extraFamilies:c.similarDeps?.extraFamilies,ignoreFamilies:c.similarDeps?.ignoreFamilies});h.similarDeps=l,N+=l.length}i||(s==="json"?wt(h,r,y,p):s==="minimal"?Pt(h,r):$t(h,r,y,p,e)),N>0&&(process.exitCode=1)};export{Et as default};