@visulima/vis 6.4.1 → 6.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/dist/bin.js +1 -1
- package/dist/binx.js +1 -1
- package/dist/packem_chunks/bloom-sync.js +1 -1
- package/dist/packem_chunks/catalog2.js +1 -1
- package/dist/packem_chunks/cli-exec.js +1 -1
- package/dist/packem_chunks/cli-main.js +1 -1
- package/dist/packem_chunks/fix.js +1 -1
- package/dist/packem_chunks/handler10.js +1 -1
- package/dist/packem_chunks/handler12.js +1 -1
- package/dist/packem_chunks/handler13.js +1 -1
- package/dist/packem_chunks/handler14.js +1 -1
- package/dist/packem_chunks/handler15.js +1 -1
- package/dist/packem_chunks/handler19.js +1 -1
- package/dist/packem_chunks/handler2.js +1 -1
- package/dist/packem_chunks/handler20.js +1 -1
- package/dist/packem_chunks/handler21.js +1 -1
- package/dist/packem_chunks/handler23.js +1 -1
- package/dist/packem_chunks/handler24.js +1 -1
- package/dist/packem_chunks/handler25.js +1 -1
- package/dist/packem_chunks/handler26.js +1 -1
- package/dist/packem_chunks/handler28.js +1 -1
- package/dist/packem_chunks/handler3.js +1 -1
- package/dist/packem_chunks/handler4.js +1 -1
- package/dist/packem_chunks/handler5.js +1 -1
- package/dist/packem_chunks/handler50.js +1 -1
- package/dist/packem_chunks/handler51.js +1 -1
- package/dist/packem_chunks/handler52.js +1 -1
- package/dist/packem_chunks/handler54.js +1 -1
- package/dist/packem_chunks/handler55.js +1 -1
- package/dist/packem_chunks/handler58.js +1 -1
- package/dist/packem_chunks/handler59.js +1 -1
- package/dist/packem_chunks/handler6.js +1 -1
- package/dist/packem_chunks/handler60.js +1 -1
- package/dist/packem_chunks/handler61.js +1 -1
- package/dist/packem_chunks/handler62.js +1 -1
- package/dist/packem_chunks/handler63.js +1 -1
- package/dist/packem_chunks/handler64.js +1 -1
- package/dist/packem_chunks/handler65.js +1 -1
- package/dist/packem_chunks/handler66.js +1 -1
- package/dist/packem_chunks/handler67.js +1 -1
- package/dist/packem_chunks/handler68.js +1 -1
- package/dist/packem_chunks/handler69.js +1 -1
- package/dist/packem_chunks/handler7.js +1 -1
- package/dist/packem_chunks/handler70.js +1 -1
- package/dist/packem_chunks/handler71.js +1 -1
- package/dist/packem_chunks/handler72.js +1 -1
- package/dist/packem_chunks/handler73.js +1 -1
- package/dist/packem_chunks/handler74.js +1 -1
- package/dist/packem_chunks/handler75.js +1 -1
- package/dist/packem_chunks/handler76.js +1 -1
- package/dist/packem_chunks/handler77.js +1 -1
- package/dist/packem_chunks/handler78.js +1 -1
- package/dist/packem_chunks/handler79.js +1 -1
- package/dist/packem_chunks/handler8.js +1 -1
- package/dist/packem_chunks/heal.js +1 -1
- package/dist/packem_chunks/help-command.js +1 -1
- package/dist/packem_chunks/index7.js +1 -1
- package/dist/packem_chunks/keys-refresh.js +1 -1
- package/dist/packem_chunks/list.js +1 -1
- package/dist/packem_chunks/prune.js +1 -1
- package/dist/packem_chunks/status.js +1 -1
- package/dist/packem_chunks/sync.js +1 -1
- package/dist/packem_chunks/sync2.js +1 -1
- package/dist/packem_chunks/tripwire.js +1 -1
- package/dist/packem_chunks/verify-lockfile.js +1 -1
- package/dist/packem_shared/{advisories-DTwACNnG.js → advisories-arGnANlP.js} +1 -1
- package/dist/packem_shared/{affected-selection-D_APcBUH.js → affected-selection-4P_4VOku.js} +1 -1
- package/dist/packem_shared/{ai-analysis-CXV3P9IN.js → ai-analysis-BgLn6WXE.js} +1 -1
- package/dist/packem_shared/{ai-cache-CAwR0t_H.js → ai-cache-oMFFLpNQ.js} +1 -1
- package/dist/packem_shared/{ai-fix-CZSdH72D.js → ai-fix-lz4PVF5q.js} +1 -1
- package/dist/packem_shared/{bin-BUpNU4sc.js → bin-Ddvvkoyg.js} +1 -1
- package/dist/packem_shared/{build-scripts-BedOAAkJ.js → build-scripts-CvYQWcfN.js} +1 -1
- package/dist/packem_shared/{dependency-scan-CIhI1eyk.js → dependency-scan--CSSl4sD.js} +1 -1
- package/dist/packem_shared/{detect-DHj8Ofgf.js → detect-CyhiZrG4.js} +1 -1
- package/dist/packem_shared/{docker-aU0BWfDE.js → docker-TWxji7Gt.js} +1 -1
- package/dist/packem_shared/{ecosystem-gate-B4JHFwgQ.js → ecosystem-gate-D-8KxXHL.js} +1 -1
- package/dist/packem_shared/{env-B5goXAfs.js → env-CIjL91bL.js} +1 -1
- package/dist/packem_shared/{env-consistency-C8bLhpjg.js → env-consistency-DNDppHRM.js} +1 -1
- package/dist/packem_shared/{failure-log-CcPGcBQL.js → failure-log-DfQ_gcej.js} +1 -1
- package/dist/packem_shared/glob-Cyk1H9ZL-XEb3rU1E.js +1 -0
- package/dist/packem_shared/{index-D1clv9vM.js → index-BwaFsBLp.js} +1 -1
- package/dist/packem_shared/{index-D089GoZ9.js → index-DxkJHi_r.js} +1 -1
- package/dist/packem_shared/{lifecycle-B-0T5Yuq.js → lifecycle-D-i54tm7.js} +1 -1
- package/dist/packem_shared/{manifests-D7c5FRMX.js → manifests-BzDUkhdS.js} +1 -1
- package/dist/packem_shared/{min-release-age-D4LRTLUm.js → min-release-age-BtCQdOw2.js} +1 -1
- package/dist/packem_shared/{missing-package-json-B9Xir-Vw.js → missing-package-json-kZJkmIIS.js} +1 -1
- package/dist/packem_shared/{multi-eco-lockfiles-DT7U-DYp.js → multi-eco-lockfiles-DnW6l9MG.js} +1 -1
- package/dist/packem_shared/{native-config-sync-BKbgIItW.js → native-config-sync-B2d_G-BL.js} +1 -1
- package/dist/packem_shared/{osv-Bio6kt4F.js → osv-J_mHkgZd.js} +1 -1
- package/dist/packem_shared/{package-version-DSr8JAeI.js → package-version-1bOYjD9y.js} +1 -1
- package/dist/packem_shared/{packument-DbQ_r11E.js → packument-NfjGusnR.js} +1 -1
- package/dist/packem_shared/{project-name-filter-BcztXZE-.js → project-name-filter-BCWQz_vk.js} +1 -1
- package/dist/packem_shared/{provenance-DMbTd536.js → provenance-DHHnGfCf.js} +1 -1
- package/dist/packem_shared/{registry-DSnDqaMj.js → registry-B0ZWcmrX.js} +1 -1
- package/dist/packem_shared/{registry-keys-AfmCDN0t.js → registry-keys-CHylv2GA.js} +1 -1
- package/dist/packem_shared/{renderToString-DR0zDUjh-tkxcyz0F.js → renderToString-DR0zDUjh-Dmqmk7JQ.js} +1 -1
- package/dist/packem_shared/{resolve-explicit-58Z6lTQV.js → resolve-explicit-BqdVEYdu.js} +1 -1
- package/dist/packem_shared/{run-summary-utils-DkFMNNG6.js → run-summary-utils-BUmbjE6o.js} +1 -1
- package/dist/packem_shared/{runtime-check-B7QxGpK0.js → runtime-check-BymbfieO.js} +1 -1
- package/dist/packem_shared/{s1ngularity-Cpp6-qlj.js → s1ngularity-D09ba0l8.js} +1 -1
- package/dist/packem_shared/{scaffold-files-CHFgRMFa.js → scaffold-files-Ckm-7u-y.js} +1 -1
- package/dist/packem_shared/{scan-progress-CvsykB5m.js → scan-progress-B01KpX5C.js} +1 -1
- package/dist/packem_shared/{selectors-0QAupVtN.js → selectors-olPi0hnD.js} +1 -1
- package/dist/packem_shared/{signatures-CoEhOr9P.js → signatures-_Vj8gPcb.js} +1 -1
- package/dist/packem_shared/{spinner-qG4qR4qA.js → spinner-C2ooiNiQ.js} +1 -1
- package/dist/packem_shared/{table-2p7PFkBg.js → table-Cvzi8xDP.js} +1 -1
- package/dist/packem_shared/{tabs-DbOgtQo8.js → tabs-D11xScKQ.js} +1 -1
- package/dist/packem_shared/{toolchain-COSpTkfG.js → toolchain-DqfROuxy.js} +1 -1
- package/dist/packem_shared/{typosquats-2YY_t-BX.js → typosquats-DrMeBxep.js} +1 -1
- package/dist/packem_shared/{use-measured-height-BHsk7UvV.js → use-measured-height-vEj7peq1.js} +1 -1
- package/dist/packem_shared/{vis-update-app-BtSSrY1T.js → vis-update-app-C4azW8X9.js} +1 -1
- package/dist/packem_shared/{vis-user-error-BrIWyJ2j.js → vis-user-error-SviCghWq.js} +1 -1
- package/dist/packem_shared/{watch-loop-ipSruNM2.js → watch-loop-B2rpFkpU.js} +1 -1
- package/index.js +26 -26
- package/package.json +9 -9
- package/dist/packem_shared/glob-Cyk1H9ZL-CWIhTwGz.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{createRequire as je}from"node:module";import{j as w,q as $,F as p}from"../packem_shared/index.server-Ca_EEVfw.js";import{U as _,$ as Ce,e as u,a as B,l as he,v as ye}from"../packem_shared/index-0dnGN3GP.js";import{p as n}from"./cli-main.js";import{o as ve,d as Ie,n as Ae}from"../packem_shared/pm-runner-BXRi4ZM9.js";import{V as P}from"../packem_shared/vis-user-error-BrIWyJ2j.js";import{r as Ne,a as De,d as Pe}from"../packem_shared/git-source-DExWbfN0.js";import{g as Ge}from"../packem_shared/_commonjsHelpers-DTfxOvZk.js";import{y as K}from"../packem_shared/isAccessibleSync-DYKTrrvc-CBsMZhj-.js";import{g as Ue,l as Be}from"../packem_shared/npmrc-CIvOb61L.js";import{a as Fe,g as He,b as Ve}from"../packem_shared/scaffold-files-CHFgRMFa.js";import{h as x,U as f}from"../packem_shared/env-B5goXAfs.js";let Se;const Te=e=>(Se??=je(import.meta.url))(e),D=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,U=e=>{if(typeof D<"u"&&D.versions&&D.versions.node){const[t,r]=D.versions.node.split(".").map(Number);if(t>22||t===22&&r>=3||t===20&&r>=16)return D.getBuiltinModule(e)}return Te(e)},{spawnSync:Ee}=U("node:child_process"),{createInterface:be}=U("node:readline"),{readdirSync:qe,mkdtempSync:Oe,realpathSync:oe,cpSync:Re,lstatSync:ze,rmSync:Me,chmodSync:Le}=U("node:fs"),{tmpdir:We}=U("node:os"),Je={"vis:app":"builtin:app","vis:application":"builtin:app","vis:generator":"builtin:generator","vis:lib":"builtin:library","vis:library":"builtin:library","vis:monorepo":"builtin:monorepo"},Xe=["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:","gitlab://","bitbucket:","sourcehut:","git:","http://","https://"],Ke=e=>{for(const t of Xe)if(e.startsWith(t))return!0;return/^[\w.-]+@[\w.-]+:/.test(e)?!0:!e.startsWith("@")&&/^[^/#@][^/#]*\/[^/#]+/.test(e)},Ye=new Set(["sv"]),Qe=e=>{if(Ye.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}`},Ze=(e,t=[])=>{if(!e)throw new Error("No template specified.");const r=e.toLowerCase(),i=Je[r];return i?{args:t,source:r,type:i}:Ke(e)?{args:t,source:e,type:"remote:git"}:{args:t,source:Qe(e),type:"remote:npm"}},et=e=>{switch(e){case"builtin:app":return"apps";case"builtin:generator":case"builtin:library":return"packages";default:return"."}},se=["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"],tt=(e,t)=>Math.floor(e+Math.random()*(t-e+1));function le(){return se[tt(0,se.length-1)]}const rt=()=>`${le()}-${le()}`;var V,ce;function it(){return ce||(ce=1,V=["_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"]),V}var W,pe;function at(){if(pe)return W;pe=1;const e=it();var t=new RegExp("^(?:@([^/]+?)[/])?([^/]+?)$"),r=["node_modules","favicon.ico"];function i(a){var l=[],s=[];if(a===null)return s.push("name cannot be null"),o(l,s);if(a===void 0)return s.push("name cannot be undefined"),o(l,s);if(typeof a!="string")return s.push("name must be a string"),o(l,s);if(a.length||s.push("name length must be greater than zero"),a.startsWith(".")&&s.push("name cannot start with a period"),a.startsWith("-")&&s.push("name cannot start with a hyphen"),a.match(/^_/)&&s.push("name cannot start with an underscore"),a.trim()!==a&&s.push("name cannot contain leading or trailing spaces"),r.forEach(function(v){a.toLowerCase()===v&&s.push(v+" is not a valid package name")}),e.includes(a.toLowerCase())&&l.push(a+" is a core module name"),a.length>214&&l.push("name can no longer contain more than 214 characters"),a.toLowerCase()!==a&&l.push("name can no longer contain capital letters"),/[~'!()*]/.test(a.split("/").slice(-1)[0])&&l.push(`name can no longer contain special characters ("~'!()*")`),encodeURIComponent(a)!==a){var c=a.match(t);if(c){var y=c[1],h=c[2];if(h.startsWith(".")&&s.push("name cannot start with a period"),encodeURIComponent(y)===y&&encodeURIComponent(h)===h)return o(l,s)}s.push("name can only contain URL-friendly characters")}return o(l,s)}var o=function(a,l){var s={validForNewPackages:l.length===0&&a.length===0,validForOldPackages:l.length===0,warnings:a,errors:l};return s.warnings.length||delete s.warnings,s.errors.length||delete s.errors,s};return W=i,W}var nt=at();const ot=Ge(nt),we=e=>e?ot(e).validForNewPackages:!1,O=e=>e.toLowerCase().trim().replaceAll(/\s+/g,"-").replaceAll(/[^a-z\d\-~]/g,"-").replace(/^[._-]+/,"").replaceAll(/-{2,}/g,"-").replace(/-$/,""),st=new Set([".DS_Store",".git",".gitkeep","Thumbs.db"]),ke=e=>K(e)?qe(e).every(r=>st.has(r)):!0,lt=(e,t)=>{const r=_(t,e);return{packageName:O(Ce(r)),targetDir:r}},ct=e=>ke(e),q=(e,t)=>new Promise(r=>{e.question(t,i=>{r(i.trim())})}),J=async(e,t,r=!0)=>{const o=await q(e,` ${t} ${p(r?"[Y/n]":"[y/N]")} `);return o===""?r:o.toLowerCase()==="y"||o.toLowerCase()==="yes"},Y=async(e,t,r)=>{process.stderr.write(` ${t}
|
|
1
|
+
import{createRequire as je}from"node:module";import{j as w,q as $,F as p}from"../packem_shared/index.server-Ca_EEVfw.js";import{U as _,$ as Ce,e as u,a as B,l as he,v as ye}from"../packem_shared/index-0dnGN3GP.js";import{p as n}from"./cli-main.js";import{o as ve,d as Ie,n as Ae}from"../packem_shared/pm-runner-BXRi4ZM9.js";import{V as P}from"../packem_shared/vis-user-error-SviCghWq.js";import{r as Ne,a as De,d as Pe}from"../packem_shared/git-source-DExWbfN0.js";import{g as Ge}from"../packem_shared/_commonjsHelpers-DTfxOvZk.js";import{y as K}from"../packem_shared/isAccessibleSync-DYKTrrvc-CBsMZhj-.js";import{g as Ue,l as Be}from"../packem_shared/npmrc-CIvOb61L.js";import{a as Fe,g as He,b as Ve}from"../packem_shared/scaffold-files-Ckm-7u-y.js";import{h as x,U as f}from"../packem_shared/env-CIjL91bL.js";let Se;const Te=e=>(Se??=je(import.meta.url))(e),D=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,U=e=>{if(typeof D<"u"&&D.versions&&D.versions.node){const[t,r]=D.versions.node.split(".").map(Number);if(t>22||t===22&&r>=3||t===20&&r>=16)return D.getBuiltinModule(e)}return Te(e)},{spawnSync:Ee}=U("node:child_process"),{createInterface:be}=U("node:readline"),{readdirSync:qe,mkdtempSync:Oe,realpathSync:oe,cpSync:Re,lstatSync:ze,rmSync:Me,chmodSync:Le}=U("node:fs"),{tmpdir:We}=U("node:os"),Je={"vis:app":"builtin:app","vis:application":"builtin:app","vis:generator":"builtin:generator","vis:lib":"builtin:library","vis:library":"builtin:library","vis:monorepo":"builtin:monorepo"},Xe=["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:","gitlab://","bitbucket:","sourcehut:","git:","http://","https://"],Ke=e=>{for(const t of Xe)if(e.startsWith(t))return!0;return/^[\w.-]+@[\w.-]+:/.test(e)?!0:!e.startsWith("@")&&/^[^/#@][^/#]*\/[^/#]+/.test(e)},Ye=new Set(["sv"]),Qe=e=>{if(Ye.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}`},Ze=(e,t=[])=>{if(!e)throw new Error("No template specified.");const r=e.toLowerCase(),i=Je[r];return i?{args:t,source:r,type:i}:Ke(e)?{args:t,source:e,type:"remote:git"}:{args:t,source:Qe(e),type:"remote:npm"}},et=e=>{switch(e){case"builtin:app":return"apps";case"builtin:generator":case"builtin:library":return"packages";default:return"."}},se=["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"],tt=(e,t)=>Math.floor(e+Math.random()*(t-e+1));function le(){return se[tt(0,se.length-1)]}const rt=()=>`${le()}-${le()}`;var V,ce;function it(){return ce||(ce=1,V=["_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"]),V}var W,pe;function at(){if(pe)return W;pe=1;const e=it();var t=new RegExp("^(?:@([^/]+?)[/])?([^/]+?)$"),r=["node_modules","favicon.ico"];function i(a){var l=[],s=[];if(a===null)return s.push("name cannot be null"),o(l,s);if(a===void 0)return s.push("name cannot be undefined"),o(l,s);if(typeof a!="string")return s.push("name must be a string"),o(l,s);if(a.length||s.push("name length must be greater than zero"),a.startsWith(".")&&s.push("name cannot start with a period"),a.startsWith("-")&&s.push("name cannot start with a hyphen"),a.match(/^_/)&&s.push("name cannot start with an underscore"),a.trim()!==a&&s.push("name cannot contain leading or trailing spaces"),r.forEach(function(v){a.toLowerCase()===v&&s.push(v+" is not a valid package name")}),e.includes(a.toLowerCase())&&l.push(a+" is a core module name"),a.length>214&&l.push("name can no longer contain more than 214 characters"),a.toLowerCase()!==a&&l.push("name can no longer contain capital letters"),/[~'!()*]/.test(a.split("/").slice(-1)[0])&&l.push(`name can no longer contain special characters ("~'!()*")`),encodeURIComponent(a)!==a){var c=a.match(t);if(c){var y=c[1],h=c[2];if(h.startsWith(".")&&s.push("name cannot start with a period"),encodeURIComponent(y)===y&&encodeURIComponent(h)===h)return o(l,s)}s.push("name can only contain URL-friendly characters")}return o(l,s)}var o=function(a,l){var s={validForNewPackages:l.length===0&&a.length===0,validForOldPackages:l.length===0,warnings:a,errors:l};return s.warnings.length||delete s.warnings,s.errors.length||delete s.errors,s};return W=i,W}var nt=at();const ot=Ge(nt),we=e=>e?ot(e).validForNewPackages:!1,O=e=>e.toLowerCase().trim().replaceAll(/\s+/g,"-").replaceAll(/[^a-z\d\-~]/g,"-").replace(/^[._-]+/,"").replaceAll(/-{2,}/g,"-").replace(/-$/,""),st=new Set([".DS_Store",".git",".gitkeep","Thumbs.db"]),ke=e=>K(e)?qe(e).every(r=>st.has(r)):!0,lt=(e,t)=>{const r=_(t,e);return{packageName:O(Ce(r)),targetDir:r}},ct=e=>ke(e),q=(e,t)=>new Promise(r=>{e.question(t,i=>{r(i.trim())})}),J=async(e,t,r=!0)=>{const o=await q(e,` ${t} ${p(r?"[Y/n]":"[y/N]")} `);return o===""?r:o.toLowerCase()==="y"||o.toLowerCase()==="yes"},Y=async(e,t,r)=>{process.stderr.write(` ${t}
|
|
2
2
|
`);for(const[i,o]of r.entries()){const a=w($(` ${String(i+1)}.`)),l=o.hint?p(` — ${o.hint}`):"";process.stderr.write(`${a} ${o.label}${l}
|
|
3
3
|
`)}for(;;){const i=await q(e,`
|
|
4
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 a=r.find(l=>l.value===i||l.label.toLowerCase()===i.toLowerCase());if(a)return a.value;process.stderr.write(` ${p("Invalid choice. Try again.")}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{createRequire as ae}from"node:module";import{e as h,z as O}from"../packem_shared/index-0dnGN3GP.js";import{V as J}from"../packem_shared/vis-user-error-
|
|
1
|
+
import{createRequire as ae}from"node:module";import{e as h,z as O}from"../packem_shared/index-0dnGN3GP.js";import{V as J}from"../packem_shared/vis-user-error-SviCghWq.js";import{a4 as z,a5 as he,a6 as X,a7 as R,a8 as me,a9 as pe,aa as ke,ab as $e,ac as B,ad as we,ae as Y,af as Q,ag as Z,ah as ee,ai as te}from"./cli-main.js";import{y as b}from"../packem_shared/isAccessibleSync-DYKTrrvc-CBsMZhj-.js";import{f as Ee}from"./ts-loader.js";import{L as ye}from"../packem_shared/index-BisalDCf.js";import{K as ve}from"../packem_shared/registry-B0ZWcmrX.js";import{allKnownTags as Se,tagsFromPaths as Re,NATIVE_BINDING_VERSION as G}from"#native";import{h as ne}from"../packem_shared/env-CIjL91bL.js";let ce;const fe=e=>(ce??=ae(import.meta.url))(e),x=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,F=e=>{if(typeof x<"u"&&x.versions&&x.versions.node){const[t,n]=x.versions.node.split(".").map(Number);if(t>22||t===22&&n>=3||t===20&&n>=16)return x.getBuiltinModule(e)}return fe(e)},{readdirSync:q,statSync:M,readFileSync:I,existsSync:T,writeFileSync:y,unlinkSync:le,rmSync:ue,chmodSync:de}=F("node:fs"),{cwd:A}=x,{createInterface:ge}=F("node:readline"),{spawnSync:E}=F("node:child_process"),{basename:be}=F("node:path"),_e=/^# ([^:\s]\S*)(?::\s+(.+))?$/,xe=e=>{const t=[],n=e.split(`
|
|
2
2
|
`);let s;for(const o of n){if(o.startsWith("#!")||o.startsWith("# Generated by")||o.startsWith("# NOTE:")||o==="set -e"||o==="")continue;const i=_e.exec(o);if(i){s&&t.push(s),s={command:"",id:i[1]??"",...i[2]?{name:i[2]}:{}};continue}s?s.command=s.command.length>0?`${s.command}
|
|
3
3
|
${o}`:o:s={command:o,id:"(custom)"}}return s&&t.push(s),t},Ae=(e,t)=>{const n=h(e,t),s=[],o=new Set(z);if(b(n))for(const i of q(n)){if(i.startsWith(".")||i==="_"||!o.has(i))continue;const r=h(n,i);if(!M(r).isFile())continue;const c=O(r),a=xe(c);s.push({blocks:a,rawLineCount:c.split(`
|
|
4
4
|
`).length,stage:i})}return s.sort((i,r)=>i.stage.localeCompare(r.stage)),{hooksDirectory:t,stages:s}},Ie=e=>{const t=[];if(e.stages.length===0)return t.push(`No hooks installed in ${e.hooksDirectory}/.`),t;t.push(`Hooks in ${e.hooksDirectory}/:`);for(const n of e.stages)if(t.push("",`${n.stage} (${n.rawLineCount} lines)`),n.blocks.length===0)t.push(" (empty)");else for(const s of n.blocks){const o=s.name?`${s.id} — ${s.name}`:s.id;t.push(` - ${o}`);const i=s.command.split(`
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{createRequire as Vt}from"node:module";import{X as ke,F as T,b as $e,q as yt,T as bt}from"../packem_shared/index.server-Ca_EEVfw.js";import{e as V,z as Se,U as Ht}from"../packem_shared/index-0dnGN3GP.js";import{i as _e}from"../packem_shared/index-BjdW45xX.js";import{whichBin as Bt}from"#native";import{b as Kt,a as qt,e as Yt}from"../packem_shared/ai-analysis-
|
|
1
|
+
import{createRequire as Vt}from"node:module";import{X as ke,F as T,b as $e,q as yt,T as bt}from"../packem_shared/index.server-Ca_EEVfw.js";import{e as V,z as Se,U as Ht}from"../packem_shared/index-0dnGN3GP.js";import{i as _e}from"../packem_shared/index-BjdW45xX.js";import{whichBin as Bt}from"#native";import{b as Kt,a as qt,e as Yt}from"../packem_shared/ai-analysis-BgLn6WXE.js";import{e as Jt,b as Xt,g as Zt,s as Qt}from"../packem_shared/ai-cache-oMFFLpNQ.js";import{l as ze}from"./ts-loader.js";import{y as Z}from"../packem_shared/isAccessibleSync-DYKTrrvc-CBsMZhj-.js";import{U as it,e as en,i as at,f as tn,k as nn}from"../packem_shared/env-CIjL91bL.js";import{L as an,h as rn,i as on,K as sn,a as cn,f as ln,d as pn,b as dn}from"../packem_shared/registry-B0ZWcmrX.js";import{p as g,c as rt}from"./cli-main.js";import{d as fn,c as gn}from"../packem_shared/pm-runner-BXRi4ZM9.js";import{a as D}from"../packem_shared/index--eV4qIz5.js";import{c as xt,s as be,g as un,p as mn,e as hn}from"../packem_shared/index-BwaFsBLp.js";import{d as vn}from"../packem_shared/anolilab-text-CAM_E6uK.js";import{t as wn,b as yn,G as bn}from"../packem_shared/ecosystem-gate-D-8KxXHL.js";import{s as $n}from"../packem_shared/scan-progress-B01KpX5C.js";import{r as Sn,b as An,c as ot,q as st,a as ct}from"../packem_shared/advisories-arGnANlP.js";import{p as $t}from"../packem_shared/package-version-1bOYjD9y.js";import{r as Nn,l as Cn,f as En,a as On}from"../packem_shared/dependency-scan--CSSl4sD.js";import{r as In}from"../packem_shared/manifests-BzDUkhdS.js";import{c as oe,h as Rn,i as jn,l as Tn,m as Pn}from"../packem_shared/multi-eco-lockfiles-DnW6l9MG.js";import{l as Ln,p as Dn,O as Mn}from"../packem_shared/osv-bloom-DU6avR2k.js";import{f as zn}from"../packem_shared/osv-J_mHkgZd.js";let Ft;const Ut=e=>(Ft??=Vt(import.meta.url))(e),ne=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Q=e=>{if(typeof ne<"u"&&ne.versions&&ne.versions.node){const[t,n]=ne.versions.node.split(".").map(Number);if(t>22||t===22&&n>=3||t===20&&n>=16)return ne.getBuiltinModule(e)}return Ut(e)},{spawnSync:zt}=Q("node:child_process"),{createInterface:Wt}=Q("node:readline"),{stripVTControlCharacters:Gt}=Q("node:util"),{createHash:xn}=Q("node:crypto"),{relative:kt,join:kn}=Q("node:path"),{readFileSync:_n,writeFileSync:Vn,renameSync:Fn,unlinkSync:Un}=Q("node:fs"),lt=(e,t={})=>{Array.isArray(t.extensions)||(t.extensions=["js","mjs","cjs","ts"]);const n=[];for(const i of an(e,t))n.push(i.path);return n},Ae=e=>`${e.packageName}@${e.packageVersion}:${e.vulnerability.id}`,Wn=e=>e==null||e===!0||e===""||e==="true"||e.toString().toLowerCase()==="all",Hn=(e,t)=>{if(Wn(t))return e;const n=String(t).trim();if(/^\d+$/.test(n)){const a=Number.parseInt(n,10)-1,r=e[a];return r?[r]:[]}const i=n.toLowerCase();return e.filter(a=>{const{aliases:r,id:o}=a.vulnerability;return o.toLowerCase()===i||(r??[]).some(c=>c.toLowerCase()===i)})},Bn=e=>{const{packageName:t,packageVersion:n,vulnerability:i}=e,a=(i.aliases??[]).join(", ")||"none",r=(i.fixedVersions??[]).join(", ")||"no fixed version published";return`You are a security engineer. Explain this dependency vulnerability for a developer triaging it.
|
|
2
2
|
|
|
3
3
|
Package: ${t}@${n}
|
|
4
4
|
Advisory: ${i.id} (aliases: ${a})
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{createRequire as gt}from"node:module";import{J as We,b as _,F as M,q as Ke,X as K,j as wt}from"../packem_shared/index.server-Ca_EEVfw.js";import{e as L,z,v as vt}from"../packem_shared/index-0dnGN3GP.js";import{l as Ce,f as kt}from"./ts-loader.js";import{O as bt,aj as Rt,c as me,q as Te}from"./cli-main.js";import{O as he}from"../packem_shared/renderToString-DR0zDUjh-
|
|
1
|
+
import{createRequire as gt}from"node:module";import{J as We,b as _,F as M,q as Ke,X as K,j as wt}from"../packem_shared/index.server-Ca_EEVfw.js";import{e as L,z,v as vt}from"../packem_shared/index-0dnGN3GP.js";import{l as Ce,f as kt}from"./ts-loader.js";import{O as bt,aj as Rt,c as me,q as Te}from"./cli-main.js";import{O as he}from"../packem_shared/renderToString-DR0zDUjh-Dmqmk7JQ.js";import{L as X,a as Et,R as V,O as H}from"../packem_shared/registry-B0ZWcmrX.js";import{i as le}from"../packem_shared/index-BjdW45xX.js";import{v as xt,r as At,f as Ie}from"../packem_shared/ai-analysis-BgLn6WXE.js";import{p as St,a as Ct,s as ze}from"../packem_shared/pm-runner-BXRi4ZM9.js";import{a as Tt,r as It}from"../packem_shared/command-runtime-DG49t2MT.js";import{r as Ot,a as _t,p as Nt}from"../packem_shared/resolve-explicit-BqdVEYdu.js";import{s as jt}from"../packem_shared/min-release-age-BtCQdOw2.js";import{U as Ut,s as Dt}from"../packem_shared/env-CIjL91bL.js";import{r as Bt,s as Lt}from"../packem_shared/typosquats-DrMeBxep.js";import{U as Pt,V as Vt,C as Oe,e as Mt}from"../packem_shared/vis-update-app-C4azW8X9.js";import{hasBackup as Ft,restoreFromBackup as Gt,hasCatalogs as Ht,readCatalogs as qt,checkOutdated as Wt,collectInternalOutdated as Kt,fetchChangelogInfo as Ye,formatSummary as Je,promptPackageSelection as zt,toFilterArray as F,applyCatalogUpdates as Yt,formatOutdatedJson as Jt,formatOutdatedMinimal as Xt,formatOutdatedTable as Qt}from"./catalog2.js";import{h as Xe,P as Qe}from"../packem_shared/peer-warnings-CmYSxvql.js";import{p as Ze}from"../packem_shared/utils-DQFHJn72.js";import{L as Zt}from"../packem_shared/index-BisalDCf.js";import{y as D}from"../packem_shared/isAccessibleSync-DYKTrrvc-CBsMZhj-.js";import{a as ne}from"../packem_shared/index--eV4qIz5.js";import{r as nn,a as ge,q as sn}from"../packem_shared/advisories-arGnANlP.js";import{l as rn}from"../packem_shared/npmrc-CIvOb61L.js";let yt;const $t=e=>(yt??=gt(import.meta.url))(e),ee=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,He=e=>{if(typeof ee<"u"&&ee.versions&&ee.versions.node){const[t,n]=ee.versions.node.split(".").map(Number);if(t>22||t===22&&n>=3||t===20&&n>=16)return ee.getBuiltinModule(e)}return $t(e)},{createInterface:qe}=He("node:readline"),{existsSync:en,realpathSync:tn}=He("node:fs"),on=e=>{const t=[];for(const n of e.filters)t.push("--filter",n);return e.workspaceRoot&&t.push("--filter","."),t.push("update"),e.latest&&t.push("--latest"),e.recursive&&t.push("--recursive"),e.interactive&&t.push("--interactive"),e.dev&&t.push("--dev"),e.prod&&t.push("--prod"),e.noOptional&&t.push("--no-optional"),e.noSave&&t.push("--no-save"),t.push(...e.packages),{args:t,bin:"pnpm"}},an=e=>{const t=[];return e.filters.length>0&&t.push("workspace",e.filters[0]),t.push("upgrade"),e.latest&&t.push("--latest"),t.push(...e.packages),{args:t,bin:"yarn"}},cn=e=>{const t=[];if(e.filters.length>0||e.recursive){t.push("workspaces","foreach","--all");for(const n of e.filters)t.push("--include",n)}return t.push("up"),e.interactive&&t.push("--interactive"),t.push(...e.packages),{args:t,bin:"yarn"}},ln=(e,t)=>{const n=["update"];e.latest&&t.push("npm does not support --latest flag. Packages will be updated within their semver range."),e.interactive&&t.push("npm does not support --interactive mode.");for(const s of e.filters)n.push("--workspace",s);return e.recursive&&n.push("--workspaces"),e.workspaceRoot&&n.push("--include-workspace-root"),e.dev&&n.push("--dev"),e.prod&&n.push("--production"),e.noOptional&&n.push("--no-optional"),e.noSave&&n.push("--no-save"),n.push(...e.packages),{args:n,bin:"npm"}},dn=e=>{const t=["update"];e.latest&&t.push("--latest");for(const n of e.filters)t.push("--filter",n);return t.push(...e.packages),{args:t,bin:"bun"}},un=(e,t,n)=>{const s=[];if(n.global&&e!=="aube")return{command:{args:["update","--global",...n.packages],bin:"npm"},warnings:s};let i;switch(e){case"aube":{const r=St(n);i={args:r.args,bin:r.bin},s.push(...r.warnings);break}case"bun":{i=dn(n);break}case"npm":{i=ln(n,s);break}case"pnpm":{i=on(n);break}case"yarn":{i=t.startsWith("1.")?an(n):cn(n);break}default:{const r=e;throw new Error(`Unsupported package manager: ${String(r)}`)}}return{command:i,warnings:s}},et=e=>{const t=e.indexOf("@");return t<=0?e:e.slice(0,t)},fn=e=>{switch(e){case"docker":case"docker-compose":return"docker";case"github-actions":return"actions";case"gitlab-ci":return"gitlab";default:return}},pn=(e,t)=>{const n=[".github/dependabot.yml",".github/dependabot.yaml"];for(const s of n){const i=L(e,s);if(!D(i))continue;let r;try{r=Zt(z(i))}catch{continue}if(r?.updates){for(const o of r.updates){const a=fn(o["package-ecosystem"]);if(!(!a||!Array.isArray(o.ignore)))for(const p of o.ignore){const c=p["dependency-name"];typeof c=="string"&&c.length>0&&t[a].add(et(c))}}return}}},mn=Object.freeze({"docker-compose":"docker",dockerfile:"docker","github-actions":"actions",gitlabci:"gitlab","gitlabci-include":"gitlab"}),hn=Object.freeze({docker:"docker","github-tags":"actions"}),ye=(e,t)=>{if(t)for(const n of t)typeof n=="string"&&n.length>0&&e.add(et(n))},gn=e=>{let t="",n=0;const{length:s}=e;let i=!1,r="";for(;n<s;){const o=e[n]??"";if(i){if(t+=o,o==="\\"&&n+1<s){t+=e[n+1]??"",n+=2;continue}o===r&&(i=!1),n+=1;continue}if(o==='"'||o==="'"){i=!0,r=o,t+=o,n+=1;continue}if(o==="/"&&e[n+1]==="/"){for(;n<s&&e[n]!==`
|
|
2
2
|
`;)n+=1;continue}if(o==="/"&&e[n+1]==="*"){for(n+=2;n<s&&!(e[n]==="*"&&e[n+1]==="/");)n+=1;n+=2;continue}if(o===","){let a=n+1;for(;a<s&&/\s/.test(e[a]??"");)a+=1;const p=e[a];if(p==="}"||p==="]"){n+=1;continue}}t+=o,n+=1}return t},yn=(e,t)=>{const n=["renovate.json","renovate.json5",".renovaterc",".renovaterc.json"];for(const s of n){const i=L(e,s);if(!D(i))continue;let r;try{const a=z(i);r=JSON.parse(gn(a))}catch{continue}if(!r)continue;if(Array.isArray(r.ignoreDeps))for(const a of["actions","docker","gitlab"])ye(t[a],r.ignoreDeps);const o=[["github-actions","actions"],["dockerfile","docker"],["docker-compose","docker"],["gitlabci","gitlab"],["gitlabci-include","gitlab"]];for(const[a,p]of o){const c=r[a];ye(t[p],c?.ignoreDeps)}if(!Array.isArray(r.packageRules))return;for(const a of r.packageRules){if(a.enabled!==!1)continue;const p=new Set;for(const d of a.matchManagers??[]){const f=mn[d];f&&p.add(f)}for(const d of a.matchDatasources??[]){const f=hn[d];f&&p.add(f)}p.size===0&&(p.add("actions"),p.add("docker"),p.add("gitlab"));const c=[...a.matchPackageNames??[],...a.matchDepNames??[],...a.matchPackagePatterns??[]];for(const d of p)ye(t[d],c)}return}},$n=e=>{const t={actions:new Set,docker:new Set,gitlab:new Set};return pn(e,t),yn(e,t),t},ve=(e,t,n)=>{const s=n[t];if(s.size===0)return!1;if(s.has(e))return!0;for(const i of s)if(/[*?[\]/.+]/.test(i))try{const r=i.replaceAll(/[.+^${}()|]/g,String.raw`\$&`).replaceAll("*",".*").replaceAll("?",".");if(new RegExp(`^${r}$`).test(e))return!0}catch{}return!1},q=e=>{const t=e.trim();if(t==="")return;const n=t.startsWith("v")||t.startsWith("V")?t.slice(1):t,i=(ne.valid(n)?ne.parse(n):void 0)??ne.coerce(n,{includePrerelease:!0});if(i)return{major:i.major,minor:i.minor,normalized:`${String(i.major)}.${String(i.minor)}.${String(i.patch)}${i.prerelease.length>0?`-${i.prerelease.join(".")}`:""}`,patch:i.patch,prerelease:i.prerelease.length>0,raw:t}},wn=(e,t)=>ne.rcompare(e.normalized,t.normalized),ke=(e,t,n,s)=>{if(!t&&n!=="latest")return;const i=e.filter(r=>r.prerelease?!1:t?n==="patch"&&(r.major!==t.major||r.minor!==t.minor)||n==="minor"&&r.major!==t.major?!1:ne.gt(r.normalized,t.normalized):!0);if(i.length!==0)return i.toSorted(wn)[0]},be=(e,t)=>!e||!t?"unknown":t.major!==e.major?"major":t.minor!==e.minor?"minor":t.patch!==e.patch?"patch":"unknown",vn="GitHub Actions",kn=e=>({fixedVersions:e.fixedVersions,id:e.id,severity:e.severity,summary:e.summary}),bn=(e,t)=>{if(t.length===0)return t;const n=nn(e);if(!en(n))return t;const s=new Map;for(const r of t){const o=r.currentVersion??r.currentRef;o&&s.set(ge(r.name,o),{name:r.name,version:o})}if(s.size===0)return t;const i=new Map;try{for(const[r,o]of s){const p=sn([o],{ecosystem:vn,workspaceRoot:e}).get(ge(o.name,o.version));p&&p.length>0&&i.set(r,p)}}catch{return t}return i.size===0?t:t.map(r=>{const o=r.currentVersion??r.currentRef;if(!o)return r;const a=i.get(ge(r.name,o));return a?{...r,advisories:a.map(p=>kn(p))}:r})},tt=e=>{if(!e)return{};const t={};for(const n of e.split(",")){const s=/^\s*<([^>]+)>\s*;\s*(.+)$/.exec(n);if(!s)continue;const i=s[1]??"",r=s[2]??"";switch(/rel\s*=\s*"?([^";\s]+)"?/i.exec(r)?.[1]?.toLowerCase()){case"first":{t.first=i;break}case"last":{t.last=i;break}case"next":{t.next=i;break}case"prev":case"previous":{t.previous=i;break}}}return t};class Rn{token;apiBase;fetchImpl;tagsCache=new Map;commitCache=new Map;constructor(t){this.token=t.token??process.env.GITHUB_TOKEN??process.env.GH_TOKEN,this.apiBase=t.apiBase??"https://api.github.com",this.fetchImpl=t.fetch??fetch}async listTags(t,n){const s=`${t}/${n}`,i=this.tagsCache.get(s);if(i)return i;const r=this.fetchTags(t,n);return this.tagsCache.set(s,r),r}async resolveRef(t,n,s){const i=`${t}/${n}@${s}`,r=this.commitCache.get(i);if(r)return r;const o=this.fetchCommit(t,n,s);return this.commitCache.set(i,o),o}buildHeaders(){const t={Accept:"application/vnd.github+json","User-Agent":"vis-update-actions","X-GitHub-Api-Version":"2022-11-28"};return this.token&&(t.Authorization=`Bearer ${this.token}`),t}async fetchTags(t,n){const s=`${this.apiBase}/repos/${encodeURIComponent(t)}/${encodeURIComponent(n)}/tags?per_page=100`,i={parsed:[],tags:[]},r=[];let o=s,a=0;for(;o&&a<5;){const c=o;let d;try{d=await this.fetchImpl(c,{headers:this.buildHeaders()})}catch{return i}if(!d.ok)return i;let f;try{f=await d.json()}catch{return i}if(!Array.isArray(f))return i;for(const m of f){const g=typeof m.name=="string"?m.name:"",h=typeof m.commit?.sha=="string"?m.commit.sha:"";g!==""&&h!==""&&r.push({name:g,sha:h})}o=tt(d.headers.get("link")).next,a+=1}const p=[];for(const c of r){const d=q(c.name);d&&p.push({...d,sha:c.sha})}return{parsed:p,tags:r}}async fetchCommit(t,n,s){const i=`${this.apiBase}/repos/${encodeURIComponent(t)}/${encodeURIComponent(n)}/commits/${encodeURIComponent(s)}`;try{const r=await this.fetchImpl(i,{headers:this.buildHeaders()});if(!r.ok)return;const o=await r.json();return typeof o.sha!="string"?void 0:{committedAt:o.commit?.committer?.date,sha:o.sha}}catch{return}}}const En=".github/workflows",xn=".github/actions",An=/^\s*-?\s*uses:\s*(['"]?)([^'"\s#]+)\1(?:\s*#\s*(.+))?\s*$/,Sn=/^[a-f0-9]{40}$/i,Cn=/actions-up-ignore-next-line(?::\s*(.+))?/i,Tn=/actions-up-ignore-start/i,In=/actions-up-ignore-end/i,On=e=>{const t=e.split("/");if(t.length<2)return;const[n,s,...i]=t;if(!(!n||!s))return{owner:n,repo:s,subpath:i.length>0?i.join("/"):void 0}},_n=(e,t)=>{const n=t.split(/\r?\n/),s=[];let i,r=!1;for(const[o,a]of n.entries()){const p=a??"";if(Tn.test(p)&&(r=!0),In.test(p)){r=!1;continue}const c=p.trim(),f=c===""||c.startsWith("#")?Cn.exec(p):void 0;if(f){i=f[1]??"actions-up-ignore-next-line";continue}const m=An.exec(p);if(!m){i=void 0;continue}const g=m[1]??"",h=g==="'"||g==='"'?g:"",b=m[2]??"",k=m[3]?.trim();if(b.startsWith("./")||b.startsWith("../")||b.startsWith("docker://")){i=void 0;continue}const y=b.lastIndexOf("@");if(y<=0){i=void 0;continue}const A=b.slice(0,y),v=b.slice(y+1),u=On(A);if(!u){i=void 0;continue}let $=i??(r?"actions-up-ignore-block":void 0);if(k){const l=/^actions-up-ignore(?:-next-line)?(?::\s*(.+))?(?:\s|$)/i.exec(k);l&&($=$??l[1]??"actions-up-ignore")}i=void 0,s.push({file:e,ignoreReason:$,isSha:Sn.test(v),line:o+1,original:`${h}${b}${h}`,owner:u.owner,quote:h,ref:v,repo:u.repo,slug:A,subpath:u.subpath,trailingComment:k&&!$?k:void 0})}return s},_e=e=>e.endsWith(".yml")||e.endsWith(".yaml"),Nn=(e,t=[])=>{const n=[],s=new Set,i=a=>{if(s.has(a))return;s.add(a);let p;try{p=z(a)}catch{return}const c=_n(a,p);n.push(...c)},r=L(e,En);if(D(r))for(const a of X(r,{includeDirs:!1,includeSymlinks:!1,maxDepth:1}))_e(a.name)&&i(a.path);const o=L(e,xn);if(D(o))for(const a of X(o,{includeDirs:!1,includeSymlinks:!1,maxDepth:3}))(a.name==="action.yml"||a.name==="action.yaml")&&i(a.path);for(const a of["action.yml","action.yaml"]){const p=L(e,a);D(p)&&i(p)}for(const a of t){const p=vt(a)?a:L(e,a);if(D(p))for(const c of X(p,{includeDirs:!1,includeSymlinks:!1}))_e(c.name)&&i(c.path)}return n},jn=40,Un=1440*60*1e3,Dn=new Set(["develop","edge","main","master","stable","trunk"]),Bn=e=>e.length===jn&&/^[a-f0-9]{40}$/i.test(e)?!1:Dn.has(e.toLowerCase())?!0:q(e)===void 0,Ne=(e,t)=>{for(const n of t)try{if(new RegExp(n).test(e))return!0}catch{if(e.includes(n))return!0}return!1},Ln=(e,t,n,s)=>{const i=s==="sha"||e.isSha,{quote:r}=e;return i?`${r}${e.slug}@${t}${r} # ${n}`:`${r}${e.slug}@${n}${r}`},Pn=async(e,t)=>{const{ignoreRules:n,options:s,references:i,resolverOptions:r}=t,o=[],a=[],p=[];if(i.length===0)return{failed:p,ignored:a,updates:o};const c=new Rn({apiBase:r?.apiBase,fetch:r?.fetch,token:s.githubToken??r?.token}),d=new Map;for(const y of i){const A=`${y.owner}/${y.repo}`,v=d.get(A)??[];v.push(y),d.set(A,v)}const f=Math.max(1,s.maxConcurrentRequests),m=[...d.keys()];let g=0;const h=async y=>{const A=d.get(y)??[],[v,u]=y.split("/");if(!v||!u)return;let $;try{$=await c.listTags(v,u)}catch{for(const l of A)p.push({file:l.file,reason:`failed to list tags for ${y}`});return}for(const l of A){const S=l.slug;let w;if(l.ignoreReason?w=l.ignoreReason:Ne(S,s.exclude)?w="matched --exclude":s.include.length>0&&!Ne(S,s.include)?w="not matched by --include":s.respectDependabotConfig&&n&&ve(S,"actions",n)&&(w="ignored by dependabot/renovate config"),w){a.push({currentRef:l.ref,currentVersion:l.isSha?l.trailingComment?.replace(/^#\s*/,""):l.ref,ecosystem:"actions",file:l.file,ignored:!0,line:l.line,name:S,newRef:l.ref,newVersion:void 0,original:l.original,reason:w,replacement:l.original,updateType:"unknown"});continue}if(!s.includeBranches&&!l.isSha&&Bn(l.ref)){a.push({currentRef:l.ref,currentVersion:l.ref,ecosystem:"actions",file:l.file,ignored:!0,line:l.line,name:S,newRef:l.ref,newVersion:void 0,original:l.original,reason:"branch reference (use --include-branches)",replacement:l.original,updateType:"unknown"});continue}const C=l.isSha?l.trailingComment?.replace(/^#\s*/,"").split(/\s+/)[0]??"":l.ref,T=q(C);if(l.isSha&&!T&&s.mode!=="latest"){a.push({currentRef:l.ref,currentVersion:void 0,ecosystem:"actions",file:l.file,ignored:!0,line:l.line,name:S,newRef:l.ref,newVersion:void 0,original:l.original,reason:`SHA pin has no version-hint comment; cannot apply --target=${s.mode}`,replacement:l.original,updateType:"unknown"});continue}const E=ke($.parsed,T,s.mode);if(!E)continue;if(s.minAgeDays!==void 0){const P=await c.resolveRef(v,u,E.sha),N=P?.committedAt?new Date(P.committedAt).getTime():void 0;if(N&&(Date.now()-N)/Un<s.minAgeDays){a.push({currentRef:l.ref,currentVersion:T?.raw,ecosystem:"actions",file:l.file,ignored:!0,line:l.line,name:S,newRef:l.ref,newVersion:E.raw,original:l.original,reason:`release younger than ${String(s.minAgeDays)} days`,replacement:l.original,updateType:"unknown"});continue}}const I=s.style==="sha"||l.isSha?E.sha:E.raw,O=Ln(l,E.sha,E.raw,s.style);o.push({currentRef:l.ref,currentVersion:T?.raw??l.trailingComment?.replace(/^#\s*/,""),ecosystem:"actions",file:l.file,line:l.line,name:S,newRef:I,newVersion:E.raw,original:l.original,replacement:O,updateType:be(T,E),url:`https://github.com/${v}/${u}/releases/tag/${E.raw}`})}},b=[];for(let y=0;y<Math.min(f,m.length);y++)b.push((async()=>{for(;g<m.length;){const A=m[g];g+=1,A!==void 0&&await h(A)}})());await Promise.all(b);const k=bn(e,o);return{failed:p,ignored:a,updates:k}},Vn=e=>e.toSorted((t,n)=>t.file!==n.file?t.file<n.file?-1:1:t.line-n.line),nt=e=>{const t=[],n=[];if(e.length===0)return{applied:t,skipped:n};const s=Vn(e),i=new Map;for(const r of s){const o=i.get(r.file)??[];o.push(r),i.set(r.file,o)}for(const[r,o]of i){let a;try{a=z(r)}catch(m){for(const g of o)n.push({reason:`read failed: ${m.message}`,update:g});continue}const p=a.includes(`\r
|
|
3
3
|
`)?`\r
|
|
4
4
|
`:`
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{createRequire as wt}from"node:module";import{a as b,$ as rt,U as yt,v as nt,e as P,q as Tt}from"../packem_shared/index-0dnGN3GP.js";import{j as m,X as $,O as S,l as vt,i as St}from"../packem_shared/registry-
|
|
1
|
+
import{createRequire as wt}from"node:module";import{a as b,$ as rt,U as yt,v as nt,e as P,q as Tt}from"../packem_shared/index-0dnGN3GP.js";import{j as m,X as $,O as S,l as vt,i as St}from"../packem_shared/registry-B0ZWcmrX.js";import it from"./index.js";import{x as at}from"../packem_shared/main-CgDAlZkm.js";import{y as G}from"../packem_shared/isAccessibleSync-DYKTrrvc-CBsMZhj-.js";import{q as $t}from"./cli-main.js";import{l as At}from"../packem_shared/spinner-C2ooiNiQ.js";import{C as ot,D as F,T as ct}from"../packem_shared/symbols-BXDZ_sKt.js";import{b as z,F as E,q as D,X as L,J as It}from"../packem_shared/index.server-Ca_EEVfw.js";import{withEnhancedPath as Mt}from"@visulima/task-runner";let mt;const kt=t=>(mt??=wt(import.meta.url))(t),M=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,B=t=>{if(typeof M<"u"&&M.versions&&M.versions.node){const[e,s]=M.versions.node.split(".").map(Number);if(e>22||e===22&&s>=3||e===20&&s>=16)return M.getBuiltinModule(t)}return kt(t)},{readFileSync:bt,writeFileSync:xt,unlinkSync:Ct}=B("node:fs"),{randomBytes:Et}=B("node:crypto"),{availableParallelism:W}=B("node:os");class I extends Error{constructor(e,s){super(e,s),this.name=this.constructor.name}}class Rt extends I{}class T extends I{}class V extends I{}class j extends I{stderr;constructor(e,s,n){super(e,n),this.stderr=s}}class X extends I{}class A extends I{commandTitle;constructor(e,s,n){super(s,n),this.commandTitle=e}}const dt=t=>t.includes("/"),O=(t,e)=>e?t.toLowerCase():t,jt=(t,e,s,n={})=>{const r=dt(t),i=n.caseInsensitive===!0,c=O(t,i),a=[];for(const o of e){const l=r?b(s,o):rt(o);it(c,O(l,i))&&a.push(o)}return a},_t=(t,e,s,n={})=>{if(!e||e.length===0)return[...t];const r=n.caseInsensitive===!0;return t.filter(i=>{for(const c of e){const a=dt(c)?b(s,i):rt(i),o=O(c,r);if(it(o,O(a,r)))return!1}return!0})},U=t=>typeof t=="object"&&t!==null&&typeof t.title=="string"&&typeof t.task=="function",_=t=>typeof t=="object"&&t!==null&&typeof t.command=="string"&&typeof t.task!="function",Pt=(t,e)=>{const s=b(t,e);return s===""||!s.startsWith("..")&&!nt(s)},Ft=(t,e)=>{let s;for(const n of e)Pt(n,t)&&(s===void 0||n.length>s.length)&&(s=n);return s},Ot=async t=>{let e=0,s=0;const n=()=>(e+=1,`pattern-${e}`),r=()=>(s+=1,`cmd-${s}`),i=(o,l,f,d)=>{if(o.perPackage===!0){const u=t.workspacePackages??[],g=new Map;for(const h of f){const w=Ft(h,u)??t.cwd,k=g.get(w)??[];k.push(b(w,h)),g.set(w,k)}for(const h of[...g.keys()].sort()){const w=b(t.cwd,h)||".";d.push({command:o.command,cwd:h,files:g.get(h)??[],id:r(),source:"string",title:`${o.command} — ${w}`})}return}if(o.cwd!==void 0){const u=yt(t.cwd,o.cwd);d.push({command:o.command,cwd:u,files:f,id:r(),source:"string",title:`${o.command} — ${b(t.cwd,u)||"."}`});return}d.push({command:o.command,files:l,id:r(),source:"string",title:o.command})},c=async(o,l,f,d)=>{if(typeof o=="string"){d.push({command:o,files:l,id:r(),source:"string",title:o});return}if(Array.isArray(o)){for(const u of o)await c(u,l,f,d);return}if(_(o)){i(o,l,f,d);return}if(typeof o=="function"){const u=await o([...l]);if(typeof u=="string"){d.push({command:u,files:l,id:r(),source:"function",title:u,verbatim:!0});return}if(Array.isArray(u)){for(const g of u)if(typeof g=="string")d.push({command:g,files:l,id:r(),source:"function",title:g,verbatim:!0});else if(_(g))i(g,l,f,d);else if(U(g))d.push({files:l,id:r(),run:g.task,source:"custom",title:g.title});else throw new T("Task function returned an array with an unsupported entry — expected strings, { command, … }, or { title, task }.");return}if(_(u)){i(u,l,f,d);return}if(U(u)){d.push({files:l,id:r(),run:u.task,source:"custom",title:u.title});return}throw new T("Task function returned an unsupported value — expected string, string[], { command, … }, or { title, task }.")}if(U(o)){d.push({files:l,id:r(),run:o.task,source:"custom",title:o.title});return}throw new T("Unsupported task value — expected string, string[], function, { command, … }, or { title, task }.")},a=[];for(const[o,l]of Object.entries(t.config)){const f=jt(o,t.files,t.cwd,{caseInsensitive:t.caseInsensitive===!0});if(f.length===0)continue;const d=t.relative?f.map(g=>b(t.cwd,g)):f,u=[];await c(l,d,f,u),u.length!==0&&a.push({commands:u,files:d,id:n(),pattern:o,title:`${o} — ${f.length} file${f.length===1?"":"s"}`})}return a},Nt=async t=>{if(t.config!==void 0)return t.config;throw new T(`No staged config provided. Add \`staged\` to your vis.config.ts:
|
|
2
2
|
|
|
3
3
|
import { defineConfig } from "@visulima/vis/config";
|
|
4
4
|
|