@visulima/vis 4.3.1 → 6.0.0
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 +598 -0
- package/LICENSE.md +151 -88
- package/README.md +2 -2
- package/dist/bin.js +1 -1
- package/dist/binx.js +1 -1
- package/dist/config/index.d.ts +42 -19
- package/dist/packem_chunks/CONFIG_FILES.js +4 -4
- package/dist/packem_chunks/bloom-status.js +1 -1
- package/dist/packem_chunks/bloom-sync.js +1 -1
- package/dist/packem_chunks/catalog.js +61 -51
- package/dist/packem_chunks/cli-exec.js +1 -1
- package/dist/packem_chunks/cli-main.js +202 -176
- package/dist/packem_chunks/dart-plan.js +1 -1
- package/dist/packem_chunks/dart-projects.js +1 -1
- package/dist/packem_chunks/dispatch.js +1 -1
- package/dist/packem_chunks/doctor-probe.js +1 -1
- package/dist/packem_chunks/fix.js +1 -1
- package/dist/packem_chunks/handler.js +1 -1
- package/dist/packem_chunks/handler10.js +4 -4
- package/dist/packem_chunks/handler11.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/handler16.js +1 -1
- package/dist/packem_chunks/handler17.js +1 -1
- package/dist/packem_chunks/handler18.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 +2 -2
- package/dist/packem_chunks/handler21.js +1 -1
- package/dist/packem_chunks/handler22.js +2 -2
- package/dist/packem_chunks/handler23.js +1 -1
- package/dist/packem_chunks/handler24.js +1 -1
- package/dist/packem_chunks/handler26.js +5 -5
- package/dist/packem_chunks/handler27.js +1 -1
- package/dist/packem_chunks/handler28.js +1 -1
- package/dist/packem_chunks/handler29.js +1 -1
- package/dist/packem_chunks/handler3.js +1 -1
- package/dist/packem_chunks/handler30.js +1 -1
- package/dist/packem_chunks/handler39.js +6 -6
- package/dist/packem_chunks/handler5.js +1 -1
- package/dist/packem_chunks/handler50.js +2 -2
- package/dist/packem_chunks/handler51.js +1 -1
- package/dist/packem_chunks/handler53.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 +7 -7
- package/dist/packem_chunks/handler61.js +2 -2
- package/dist/packem_chunks/handler62.js +10 -10
- package/dist/packem_chunks/handler63.js +1 -1
- package/dist/packem_chunks/handler64.js +6 -3
- package/dist/packem_chunks/handler65.js +8 -6
- package/dist/packem_chunks/handler66.js +2 -2
- package/dist/packem_chunks/handler67.js +31 -20
- package/dist/packem_chunks/handler68.js +1 -1
- package/dist/packem_chunks/handler69.js +22 -153
- package/dist/packem_chunks/handler7.js +1 -1
- package/dist/packem_chunks/handler70.js +9 -9
- package/dist/packem_chunks/handler71.js +153 -22
- 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 +35 -35
- package/dist/packem_chunks/handler76.js +1 -1
- package/dist/packem_chunks/handler77.js +3 -3
- package/dist/packem_chunks/handler78.js +69 -67
- package/dist/packem_chunks/handler8.js +1 -1
- package/dist/packem_chunks/handler9.js +1 -1
- package/dist/packem_chunks/heal-accept.js +1 -1
- package/dist/packem_chunks/heal.js +1 -1
- package/dist/packem_chunks/help-command.js +40 -7
- package/dist/packem_chunks/index2.js +32 -32
- package/dist/packem_chunks/index6.js +1 -1
- package/dist/packem_chunks/keys-refresh.js +1 -1
- package/dist/packem_chunks/lean.js +3 -4
- package/dist/packem_chunks/list.js +1 -1
- package/dist/packem_chunks/loader.js +1 -1
- package/dist/packem_chunks/orchestrator.js +1 -1
- package/dist/packem_chunks/prompts.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/tar.js +1 -1
- package/dist/packem_chunks/tripwire.js +1 -1
- package/dist/packem_chunks/ts-loader.js +5 -5
- package/dist/packem_chunks/verify-lockfile.js +1 -1
- package/dist/packem_shared/{affected-selection-D4giBK2X.js → affected-selection-DDxwjwM4.js} +1 -1
- package/dist/packem_shared/affected-shas-BuaWvmsG.js +1 -0
- package/dist/packem_shared/{ai-fix-BC6aIRJT.js → ai-fix-C2BhFFhi.js} +5 -5
- package/dist/packem_shared/{augment-B9kSZuvW.js → augment-CxUPE8KX.js} +1 -1
- package/dist/packem_shared/{bin-C1XKj-O-.js → bin-Be7_QhQK.js} +1 -1
- package/dist/packem_shared/{build-scripts-CEDx_nJp.js → build-scripts-DxyVSkgM.js} +1 -1
- package/dist/packem_shared/command-runtime-BXvH5EC0.js +1 -0
- package/dist/packem_shared/{dart-pubspec-BK_cK2EP.js → dart-pubspec-DvmyleIr.js} +2 -2
- package/dist/packem_shared/{dependency-scan-B8jroa1D.js → dependency-scan-DKK3ZEZI.js} +1 -1
- package/dist/packem_shared/{docker-DXqV-07f.js → docker-BTuwdXaC.js} +1 -1
- package/dist/packem_shared/{ecosystem-gate-ddru_hOg.js → ecosystem-gate-BpQNUJzN.js} +1 -1
- package/dist/packem_shared/env-consistency-CUBJHENL.js +1 -0
- package/dist/packem_shared/{failure-log-D2x5BT8S.js → failure-log-kp0n2rbD.js} +1 -1
- package/dist/packem_shared/{formatBytes-BHAzNIrn-CrusHOew.js → formatBytes-BHAzNIrn-DRcKvqnb.js} +1 -1
- package/dist/packem_shared/git-source-DExWbfN0.js +2 -0
- package/dist/packem_shared/{index-BzhrR_iC.js → index-BdMIfGVZ.js} +15 -15
- package/dist/packem_shared/index-C9ENZqH9.js +39 -0
- package/dist/packem_shared/{index-Chje3u9v.js → index-DQfNpt2u.js} +1 -1
- package/dist/packem_shared/{index-DQ2GJzmy.js → index-DsSWb5XH.js} +1 -1
- package/dist/packem_shared/{index.server-sXNQYpsl.js → index.server-D8BLnYZO.js} +2 -2
- package/dist/packem_shared/{isAccessibleSync-DYKTrrvc-C-_5cgwu.js → isAccessibleSync-DYKTrrvc-BwaMhQs0.js} +1 -1
- package/dist/packem_shared/{lifecycle-D6PMPor-.js → lifecycle-BAhkhE2L.js} +1 -1
- package/dist/packem_shared/{lockfile-CiUtEbnt.js → lockfile-DHmlPGk1.js} +1 -1
- package/dist/packem_shared/{manifests-Du4yKlf_.js → manifests-Dd4Hoztt.js} +1 -1
- package/dist/packem_shared/{min-release-age-JViyQuBM.js → min-release-age-BJnOQaoF.js} +1 -1
- package/dist/packem_shared/{missing-package-json-Cu5YVAot.js → missing-package-json-DfzrGwe1.js} +1 -1
- package/dist/packem_shared/{multi-eco-lockfiles-B2X3yhyo.js → multi-eco-lockfiles-BIa6xvJc.js} +1 -1
- package/dist/packem_shared/{native-config-sync-TdTWjVgI.js → native-config-sync-Dr9XvxOf.js} +1 -1
- package/dist/packem_shared/osv-bloom-t40ra5U5.js +2 -0
- package/dist/packem_shared/{package-version-Dxirp-UO.js → package-version-CFuNUWDG.js} +2 -2
- package/dist/packem_shared/{packument-BQv4je9m.js → packument-C9nRiBJf.js} +1 -1
- package/dist/packem_shared/pm-runner-ImwtpnWY.js +1 -0
- package/dist/packem_shared/{project-name-filter-D6tXD8gd.js → project-name-filter-C2rkW-Vn.js} +1 -1
- package/dist/packem_shared/{provenance-DNyVMxNv.js → provenance-DF-ypZj3.js} +1 -1
- package/dist/packem_shared/{readJsonSync-CbryXYxN-EWl7_7KX.js → readJsonSync-CbryXYxN-Bm5i10UW.js} +1 -1
- package/dist/packem_shared/{registry-keys-DwB3ZXS_.js → registry-keys-BLuHOyZu.js} +1 -1
- package/dist/packem_shared/{resolve-explicit-BPsdmuty.js → resolve-explicit-BDaQRR6o.js} +1 -1
- package/dist/packem_shared/resolve-runtime-Cr19Pk6L.js +1 -0
- package/dist/packem_shared/{run-file-UBukWaha.js → run-file-XbRCF6Mp.js} +1 -1
- package/dist/packem_shared/{runtime-check-1U8HrQd9.js → runtime-check-Bh5q9IrT.js} +1 -1
- package/dist/packem_shared/{s1ngularity-QD2LD1sO.js → s1ngularity-UCZN7skW.js} +1 -1
- package/dist/packem_shared/{scan-progress-CkumcBG-.js → scan-progress-DcYI76zE.js} +1 -1
- package/dist/packem_shared/{selectors-edwcgNl3.js → selectors-DCiEU0iv.js} +2 -2
- package/dist/packem_shared/{signatures-t8LbOaqr.js → signatures-CicxPHN4.js} +1 -1
- package/dist/packem_shared/target-merge-BClIXg2k.js +14 -0
- package/dist/packem_shared/{target-options-DsHFmRZH.js → target-options-PgWIuJnb.js} +1 -1
- package/dist/packem_shared/task-env-Dl08aklA.js +2 -0
- package/dist/packem_shared/toolchain-DvUxlbDz.js +5 -0
- package/dist/packem_shared/{typosquats-8u0drCqQ.js → typosquats-DxPzyK7u.js} +1 -1
- package/dist/packem_shared/{verify-B_MblU_Q.js → verify-CadR9PUk.js} +1 -1
- package/dist/packem_shared/{vis-update-app-BCIccZfA.js → vis-update-app-DrFWQyPn.js} +1 -1
- package/dist/packem_shared/{vis-user-error-75VtCwMv.js → vis-user-error-k7CLTpA4.js} +15 -15
- package/dist/packem_shared/{watch-CcTketln.js → watch-Dr_6yz3o.js} +1 -1
- package/dist/packem_shared/watch-loop-BId9vT7Q.js +11 -0
- package/dist/packem_shared/{writeFileSync-DJoHk3Ks-BPRoepNw.js → writeFileSync-DJoHk3Ks-Dhem3Uof.js} +1 -1
- package/dist/release/core/version-actions/index.d.ts +1 -1
- package/dist/release/presets.d.ts +1 -55
- package/dist/release/presets.js +1 -1
- package/dist/release/types.d.ts +1 -18
- package/dist/runtime/preload.js +1 -1
- package/index.d.ts +204 -204
- package/index.js +52 -52
- package/package.json +10 -10
- package/schemas/project.schema.json +44 -1
- package/schemas/vis-config.schema.json +128 -35
- package/schemas/vis-release-config.schema.json +1 -12
- package/skills/vis/SKILL.md +24 -12
- package/dist/packem_shared/Table-BB8xHTU5-BLPS917D.js +0 -11
- package/dist/packem_shared/affected-shas-B2V84O0g.js +0 -1
- package/dist/packem_shared/command-runtime-p4IXiIf6.js +0 -1
- package/dist/packem_shared/giget-D8Kwb0kD.js +0 -2
- package/dist/packem_shared/index-BisalDCf.js +0 -39
- package/dist/packem_shared/osv-bloom-BCAX5ARR.js +0 -2
- package/dist/packem_shared/pm-runner-CMSml1Bj.js +0 -1
- package/dist/packem_shared/resolve-runtime-CNiHcVtx.js +0 -1
- package/dist/packem_shared/target-merge-DVJl-7Qz.js +0 -4
- package/dist/packem_shared/toolchain-BRdpaAC4.js +0 -5
- package/dist/packem_shared/watch-loop-qRn0IHPG.js +0 -11
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{createRequire as
|
|
2
|
-
`;break;case 114:l+="\r";break;case 116:l+=" ";break;case 117:const p=
|
|
3
|
-
`),f++,u=t,s=14;switch(l){case 123:return t++,s=1;case 125:return t++,s=2;case 91:return t++,s=3;case 93:return t++,s=4;case 58:return t++,s=6;case 44:return t++,s=5;case 34:return t++,o=A(),s=10;case 47:const O=t-1;if(e.charCodeAt(t+1)===47){for(t+=2;t<i&&!x(e.charCodeAt(t));)t++;return o=e.substring(O,t),s=12}if(e.charCodeAt(t+1)===42){t+=2;const k=i-1;let g=!1;for(;t<k;){const p=e.charCodeAt(t);if(p===42&&e.charCodeAt(t+1)===47){t+=2,g=!0;break}t++,x(p)&&(p===13&&e.charCodeAt(t)===10&&t++,f++,u=t)}return g||(t++,m=1),o=e.substring(O,t),s=13}return o+=String.fromCharCode(l),t++,s=16;case 45:if(o+=String.fromCharCode(l),t++,t===i||!R(e.charCodeAt(t)))return s=16;case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return o+=y(),s=11;default:for(;t<i&&_(l);)t++,l=e.charCodeAt(t);if(r!==t){switch(o=e.substring(r,t),o){case"true":return s=8;case"false":return s=9;case"null":return s=7}return s=16}return o+=String.fromCharCode(l),t++,s=16}}function _(l){if(ee(l)||x(l))return!1;switch(l){case 125:case 93:case 123:case 91:case 34:case 58:case 44:case 47:return!1}return!0}function d(){let l;do l=N();while(l>=12&&l<=15);return l}return{setPosition:b,getPosition:()=>t,scan:n?d:N,getToken:()=>s,getTokenValue:()=>o,getTokenOffset:()=>r,getTokenLength:()=>t-r,getTokenStartLine:()=>c,getTokenStartCharacter:()=>r-a,getTokenError:()=>m}}function ee(e){return e===32||e===9}function x(e){return e===10||e===13}function R(e){return e>=48&&e<=57}var Oe;(function(e){e[e.lineFeed=10]="lineFeed",e[e.carriageReturn=13]="carriageReturn",e[e.space=32]="space",e[e._0=48]="_0",e[e._1=49]="_1",e[e._2=50]="_2",e[e._3=51]="_3",e[e._4=52]="_4",e[e._5=53]="_5",e[e._6=54]="_6",e[e._7=55]="_7",e[e._8=56]="_8",e[e._9=57]="_9",e[e.a=97]="a",e[e.b=98]="b",e[e.c=99]="c",e[e.d=100]="d",e[e.e=101]="e",e[e.f=102]="f",e[e.g=103]="g",e[e.h=104]="h",e[e.i=105]="i",e[e.j=106]="j",e[e.k=107]="k",e[e.l=108]="l",e[e.m=109]="m",e[e.n=110]="n",e[e.o=111]="o",e[e.p=112]="p",e[e.q=113]="q",e[e.r=114]="r",e[e.s=115]="s",e[e.t=116]="t",e[e.u=117]="u",e[e.v=118]="v",e[e.w=119]="w",e[e.x=120]="x",e[e.y=121]="y",e[e.z=122]="z",e[e.A=65]="A",e[e.B=66]="B",e[e.C=67]="C",e[e.D=68]="D",e[e.E=69]="E",e[e.F=70]="F",e[e.G=71]="G",e[e.H=72]="H",e[e.I=73]="I",e[e.J=74]="J",e[e.K=75]="K",e[e.L=76]="L",e[e.M=77]="M",e[e.N=78]="N",e[e.O=79]="O",e[e.P=80]="P",e[e.Q=81]="Q",e[e.R=82]="R",e[e.S=83]="S",e[e.T=84]="T",e[e.U=85]="U",e[e.V=86]="V",e[e.W=87]="W",e[e.X=88]="X",e[e.Y=89]="Y",e[e.Z=90]="Z",e[e.asterisk=42]="asterisk",e[e.backslash=92]="backslash",e[e.closeBrace=125]="closeBrace",e[e.closeBracket=93]="closeBracket",e[e.colon=58]="colon",e[e.comma=44]="comma",e[e.dot=46]="dot",e[e.doubleQuote=34]="doubleQuote",e[e.minus=45]="minus",e[e.openBrace=123]="openBrace",e[e.openBracket=91]="openBracket",e[e.plus=43]="plus",e[e.slash=47]="slash",e[e.formFeed=12]="formFeed",e[e.tab=9]="tab"})(Oe||(Oe={}));var Z;(function(e){e.DEFAULT={allowTrailingComma:!1}})(Z||(Z={}));function ct(e,n=[],i=Z.DEFAULT){let t=null,o=[];const r=[];function s(c){Array.isArray(o)?o.push(c):t!==null&&(o[t]=c)}return ut(e,{onObjectBegin:()=>{const c={};s(c),r.push(o),o=c,t=null},onObjectProperty:c=>{t=c},onObjectEnd:()=>{o=r.pop()},onArrayBegin:()=>{const c=[];s(c),r.push(o),o=c,t=null},onArrayEnd:()=>{o=r.pop()},onLiteralValue:s,onError:(c,u,a)=>{n.push({error:c,offset:u,length:a})}},i),o[0]}function ut(e,n,i=Z.DEFAULT){const t=lt(e,!1),o=[];let r=0;function s(w){return w?()=>r===0&&w(t.getTokenOffset(),t.getTokenLength(),t.getTokenStartLine(),t.getTokenStartCharacter()):()=>!0}function f(w){return w?T=>r===0&&w(T,t.getTokenOffset(),t.getTokenLength(),t.getTokenStartLine(),t.getTokenStartCharacter()):()=>!0}function c(w){return w?T=>r===0&&w(T,t.getTokenOffset(),t.getTokenLength(),t.getTokenStartLine(),t.getTokenStartCharacter(),()=>o.slice()):()=>!0}function u(w){return w?()=>{r>0?r++:w(t.getTokenOffset(),t.getTokenLength(),t.getTokenStartLine(),t.getTokenStartCharacter(),()=>o.slice())===!1&&(r=1)}:()=>!0}function a(w){return w?()=>{r>0&&r--,r===0&&w(t.getTokenOffset(),t.getTokenLength(),t.getTokenStartLine(),t.getTokenStartCharacter())}:()=>!0}const m=u(n.onObjectBegin),v=c(n.onObjectProperty),b=a(n.onObjectEnd),y=u(n.onArrayBegin),A=a(n.onArrayEnd),N=c(n.onLiteralValue),_=f(n.onSeparator),d=s(n.onComment),l=f(n.onError),O=i&&i.disallowComments,k=i&&i.allowTrailingComma;function g(){for(;;){const w=t.scan();switch(t.getTokenError()){case 4:p(14);break;case 5:p(15);break;case 3:p(13);break;case 1:O||p(11);break;case 2:p(12);break;case 6:p(16);break}switch(w){case 12:case 13:O?p(10):d();break;case 16:p(1);break;case 15:case 14:break;default:return w}}}function p(w,T=[],de=[]){if(l(w),T.length+de.length>0){let q=t.getToken();for(;q!==17;){if(T.indexOf(q)!==-1){g();break}else if(de.indexOf(q)!==-1)break;q=g()}}}function I(w){const T=t.getTokenValue();return w?N(T):(v(T),o.push(T)),g(),!0}function B(){switch(t.getToken()){case 11:const w=t.getTokenValue();let T=Number(w);isNaN(T)&&(p(2),T=0),N(T);break;case 7:N(null);break;case 8:N(!0);break;case 9:N(!1);break;default:return!1}return g(),!0}function J(){return t.getToken()!==10?(p(3,[],[2,5]),!1):(I(!1),t.getToken()===6?(_(":"),g(),C()||p(4,[],[2,5])):p(5,[],[2,5]),o.pop(),!0)}function Ge(){m(),g();let w=!1;for(;t.getToken()!==2&&t.getToken()!==17;){if(t.getToken()===5){if(w||p(4,[],[]),_(","),g(),t.getToken()===2&&k)break}else w&&p(6,[],[]);J()||p(4,[],[2,5]),w=!0}return b(),t.getToken()!==2?p(7,[2],[]):g(),!0}function He(){y(),g();let w=!0,T=!1;for(;t.getToken()!==4&&t.getToken()!==17;){if(t.getToken()===5){if(T||p(4,[],[]),_(","),g(),t.getToken()===4&&k)break}else T&&p(6,[],[]);w?(o.push(0),w=!1):o[o.length-1]++,C()||p(4,[],[4,5]),T=!0}return A(),w||o.pop(),t.getToken()!==4?p(8,[4],[]):g(),!0}function C(){switch(t.getToken()){case 3:return He();case 1:return Ge();case 10:return I(!0);default:return B()}}return g(),t.getToken()===17?i.allowEmptyContent?!0:(p(4,[],[]),!1):C()?(t.getToken()!==17&&p(9,[],[]),!0):(p(4,[],[]),!1)}var be;(function(e){e[e.None=0]="None",e[e.UnexpectedEndOfComment=1]="UnexpectedEndOfComment",e[e.UnexpectedEndOfString=2]="UnexpectedEndOfString",e[e.UnexpectedEndOfNumber=3]="UnexpectedEndOfNumber",e[e.InvalidUnicode=4]="InvalidUnicode",e[e.InvalidEscapeCharacter=5]="InvalidEscapeCharacter",e[e.InvalidCharacter=6]="InvalidCharacter"})(be||(be={}));var ke;(function(e){e[e.OpenBraceToken=1]="OpenBraceToken",e[e.CloseBraceToken=2]="CloseBraceToken",e[e.OpenBracketToken=3]="OpenBracketToken",e[e.CloseBracketToken=4]="CloseBracketToken",e[e.CommaToken=5]="CommaToken",e[e.ColonToken=6]="ColonToken",e[e.NullKeyword=7]="NullKeyword",e[e.TrueKeyword=8]="TrueKeyword",e[e.FalseKeyword=9]="FalseKeyword",e[e.StringLiteral=10]="StringLiteral",e[e.NumericLiteral=11]="NumericLiteral",e[e.LineCommentTrivia=12]="LineCommentTrivia",e[e.BlockCommentTrivia=13]="BlockCommentTrivia",e[e.LineBreakTrivia=14]="LineBreakTrivia",e[e.Trivia=15]="Trivia",e[e.Unknown=16]="Unknown",e[e.EOF=17]="EOF"})(ke||(ke={}));const K=ct;var we;(function(e){e[e.InvalidSymbol=1]="InvalidSymbol",e[e.InvalidNumberFormat=2]="InvalidNumberFormat",e[e.PropertyNameExpected=3]="PropertyNameExpected",e[e.ValueExpected=4]="ValueExpected",e[e.ColonExpected=5]="ColonExpected",e[e.CommaExpected=6]="CommaExpected",e[e.CloseBraceExpected=7]="CloseBraceExpected",e[e.CloseBracketExpected=8]="CloseBracketExpected",e[e.EndOfFileExpected=9]="EndOfFileExpected",e[e.InvalidCommentToken=10]="InvalidCommentToken",e[e.UnexpectedEndOfComment=11]="UnexpectedEndOfComment",e[e.UnexpectedEndOfString=12]="UnexpectedEndOfString",e[e.UnexpectedEndOfNumber=13]="UnexpectedEndOfNumber",e[e.InvalidUnicode=14]="InvalidUnicode",e[e.InvalidEscapeCharacter=15]="InvalidEscapeCharacter",e[e.InvalidCharacter=16]="InvalidCharacter"})(we||(we={}));function pt(e){switch(e){case 1:return"InvalidSymbol";case 2:return"InvalidNumberFormat";case 3:return"PropertyNameExpected";case 4:return"ValueExpected";case 5:return"ColonExpected";case 6:return"CommaExpected";case 7:return"CloseBraceExpected";case 8:return"CloseBracketExpected";case 9:return"EndOfFileExpected";case 10:return"InvalidCommentToken";case 11:return"UnexpectedEndOfComment";case 12:return"UnexpectedEndOfString";case 13:return"UnexpectedEndOfNumber";case 14:return"InvalidUnicode";case 15:return"InvalidEscapeCharacter";case 16:return"InvalidCharacter"}return"<unknown ParseErrorCode>"}const ft=(e,n,i,t)=>{if(e.length===0)return;const o=e[0],r=Ce(n,o.offset),s=new et(`${pt(o.error)} at offset ${o.offset}`);throw s.fileName=i,s.codeFrame=tt(n,{start:r},{tabWidth:!1,...t}),s},at=(e,n)=>{const{allowEmptyContent:i,allowTrailingComma:t=!0,beforeParse:o,buffer:r,color:s,compression:f,disallowComments:c,encoding:u="utf8",flag:a}=n??{},m=D(e,{buffer:r,compression:f,encoding:u,flag:a}),v=typeof o=="function"?o(m):m,b=[],y=K(v,b,{allowEmptyContent:i,allowTrailingComma:t,disallowComments:c});return ft(b,v,nt(e),{color:s}),y},le=e=>Array.isArray(e)?e.map(n=>le(n)):e!==null&&typeof e=="object"&&Object.getPrototypeOf(e)===null?Object.fromEntries(Object.entries(e).map(([n,i])=>[n,le(i)])):e,mt=(e,n)=>{const i=D(e,{encoding:"utf8",...n});return le(st(i))};function dt(e,n,i){const t={},{buffer:o,compression:r,encoding:s="utf8",flag:f,...c}=t,u=D(e,{buffer:o,compression:r,encoding:s,flag:f});return typeof n=="function"?ge(u,n,c):ge(u,c)}var S={},ye;function gt(){if(ye)return S;ye=1,Object.defineProperty(S,"__esModule",{value:!0});const e=d=>d!==null&&typeof d=="object",n=(d,l)=>Object.assign(new Error(`[${d}]: ${l}`),{code:d}),i="ERR_INVALID_PACKAGE_CONFIG",t="ERR_INVALID_PACKAGE_TARGET",o="ERR_PACKAGE_PATH_NOT_EXPORTED",r="ERR_PACKAGE_IMPORT_NOT_DEFINED",s=/^\d+$/,f=/^(\.{1,2}|node_modules)$/i,c=/\/|\\/;var u=(d=>(d.Export="exports",d.Import="imports",d))(u||{});const a=(d,l,O,k,g)=>{if(l==null)return[];if(typeof l=="string"){const[p,...I]=l.split(c);if(p===".."||I.some(B=>f.test(B)))throw n(t,`Invalid "${d}" target "${l}" defined in the package config`);return[g?l.replace(/\*/g,g):l]}if(Array.isArray(l))return l.flatMap(p=>a(d,p,O,k,g));if(e(l)){for(const p of Object.keys(l)){if(s.test(p))throw n(i,"Cannot contain numeric property keys");if(p==="default"||k.includes(p))return a(d,l[p],O,k,g)}return[]}throw n(t,`Invalid "${d}" target "${l}"`)},m="*",v=(d,l)=>{const O=d.indexOf(m),k=l.indexOf(m);return O===k?l.length>d.length:k>O};function b(d,l){if(!l.includes(m)&&d.hasOwnProperty(l))return[l];let O,k;for(const g of Object.keys(d))if(g.includes(m)){const[p,I,B]=g.split(m);if(B===void 0&&l.startsWith(p)&&l.endsWith(I)){const J=l.slice(p.length,-I.length||void 0);J&&(!O||v(O,g))&&(O=g,k=J)}}return[O,k]}const y=d=>Object.keys(d).reduce((l,O)=>{const k=O===""||O[0]!==".";if(l===void 0||l===k)return k;throw n(i,'"exports" cannot contain some keys starting with "." and some not')},void 0),A=/^\w+:/,N=(d,l,O)=>{if(!d)throw new Error('"exports" is required');l=l===""?".":`./${l}`,(typeof d=="string"||Array.isArray(d)||e(d)&&y(d))&&(d={".":d});const[k,g]=b(d,l),p=a(u.Export,d[k],l,O,g);if(p.length===0)throw n(o,l==="."?'No "exports" main defined':`Package subpath '${l}' is not defined by "exports"`);for(const I of p)if(!I.startsWith("./")&&!A.test(I))throw n(t,`Invalid "exports" target "${I}" defined in the package config`);return p},_=(d,l,O)=>{if(!d)throw new Error('"imports" is required');const[k,g]=b(d,l),p=a(u.Import,d[k],l,O,g);if(p.length===0)throw n(r,`Package import specifier "${l}" is not defined in package`);return p};return S.resolveExports=N,S.resolveImports=_,S}var Ot=gt();let bt;const kt=e=>(bt??=je(import.meta.url))(e),W=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,_e=e=>{if(typeof W<"u"&&W.versions&&W.versions.node){const[n,i]=W.versions.node.split(".").map(Number);if(n>22||n===22&&i>=3||n===20&&i>=16)return W.getBuiltinModule(e)}return kt(e)},{statSync:H}=_e("node:fs"),wt=_e("node:module"),De=(e=process.cwd())=>{const{findPnpApi:n}=wt;return n?n(e):void 0},yt=e=>K(D(e,{buffer:!1})),te=(e,n,i,t)=>{const o=`resolveFromPackageJsonPath:${e}:${n}:${i?"yes":"no"}`;if(t?.has(o))return t.get(o);const r=yt(e);if(!r)return;let s=n||"tsconfig.json";if(!i&&r.exports)try{const[f]=Ot.resolveExports(r.exports,n,["require","types"]);s=f}catch{return!1}else!n&&r.tsconfig&&(s=r.tsconfig);return s=h(e,"..",s),t?.set(o,s),s},ne="package.json",oe="tsconfig.json",vt=(e,n,i)=>{let t=e;if(e===".."&&(t=h(t,oe)),e.startsWith(".")&&(t=j(n,t)),me(t)){if($(t)){if(H(t).isFile())return t}else if(!t.endsWith(".json")){const b=`${t}.json`;if($(b))return b}return}const[o="",...r]=e.split("/"),s=o.startsWith("@")?`${o}/${String(r.shift())}`:o,f=r.join("/"),c=De(n);if(c){const{resolveRequest:b}=c;try{if(s===e){const y=b(h(s,ne),n);if(y){const A=te(y,f,!1,i);if(A&&$(A))return A}}else{let y;try{y=b(e,n,{extensions:[".json"]})}catch{y=b(h(e,oe),n)}if(y)return y}}catch{}}const u=X(b=>{const y=h(j(b),"node_modules",s);if($(y))return h("node_modules",s)},{cwd:n,type:"directory"});if(!u||!H(u).isDirectory())return;const a=h(u,ne);if($(a)){const b=te(a,f,!1,i);if(b===!1)return;if(b&&$(b)&&H(b).isFile())return b}const m=h(u,f),v=m.endsWith(".json");if(!v){const b=`${m}.json`;if($(b))return b}if($(m)){if(H(m).isDirectory()){const b=h(m,ne);if($(b)){const A=te(b,"",!0,i);if(A&&$(A))return A}const y=h(m,oe);if($(y))return y}else if(v)return m}},Re=e=>{const n=j(e);let i;const t=De(n);if(t)try{i=t.resolveRequest("typescript/package.json",n)??void 0}catch{}if(i??=X(o=>h(o,"node_modules","typescript","package.json"),{cwd:n,type:"file"}),!!i)try{const o=K(D(i,{buffer:!1}));if(typeof o?.version=="string")return o.version}catch{}},Fe=new Set(["node16","node18","node20","nodenext"]),Be=e=>e!==void 0&&Fe.has(e),Tt=e=>{switch(e){case"node20":return"es2023";case"nodenext":return"esnext";default:return"es2022"}},ht=e=>e==="nodenext"?"nodenext":"node16",At=e=>{if(e==="nodenext")return"nodenext";if(e==="node16")return"node16"},Ue=(e,n,i)=>{const t=n.has("module")?e.module:void 0,o=n.has("moduleResolution")?e.moduleResolution:void 0;let r;t!==void 0&&Fe.has(t)?r=t:o!==void 0&&(r=At(o)),i.target!==void 0&&!n.has("target")&&(e.target=r?Tt(r):i.target),n.has("module")||(e.module=r??i.module),n.has("moduleResolution")||(e.moduleResolution=r?ht(r):"bundler")},Et=(e,n)=>{!n.has("target")&&!Be(e.module)&&(e.target="es3")},It=(e,n)=>{!n.has("target")&&!Be(e.module)&&(e.target="es5")},$t=(e,n)=>{n.has("strict")||(e.strict=!0),Ue(e,n,{module:"es2022",target:"es2025"}),n.has("rootDir")||(e.rootDir="."),n.has("types")||(e.types=[]),n.has("noUncheckedSideEffectImports")||(e.noUncheckedSideEffectImports=!0),n.has("libReplacement")||(e.libReplacement=!1),n.has("alwaysStrict")||(e.alwaysStrict=!0)},jt=(e,n)=>{Ue(e,n,{module:"esnext"}),n.has("stableTypeOrdering")||(e.stableTypeOrdering=!0)},Nt=[[4,Et],[5,It],[6,$t],[7,jt]],Lt=/^v?(\d+)/,_t=e=>{const n=Lt.exec(e);return n?Number(n[1]):void 0},Dt=(e,n)=>{const i=_t(n);if(i===void 0)return;const t=new Set(Object.keys(e));for(const[o,r]of Nt)o<=i&&r(e,t)},Rt=e=>K(D(e,{buffer:!1})),Ft=e=>e.replaceAll("\\","/"),M=e=>{const n=ot(e);return it(n)?n:`./${n}`},ce=["files","include","exclude"],ve=(e,n,i)=>{const t=h(n,i),o=P(e,t);return Y(o)||"./"},Bt=(e,n,i)=>{const t=P(e,n);if(!t)return i;const o=i.startsWith("./")?i.slice(2):i;return`${t}/${o}`},Ut=(e,n,i,t,o)=>{if(i.has(e))throw new Error(`Circularity detected while resolving configuration: ${e}`);i.add(e);const r=L(e),s=xe(e,t,i,o);delete s.references;const{compilerOptions:f}=s;if(f){const{baseUrl:c}=f;c&&!c.startsWith(E)&&(f.baseUrl=ve(n,r,c));const{outDir:u}=f;u&&!u.startsWith(E)&&(f.outDir=ve(n,r,u))}for(const c of ce){const u=s[c];u&&(s[c]=u.map(a=>a.startsWith(E)||me(a)?a:Bt(n,r,a)))}return s},xe=(e,n,i=new Set,t=new Map)=>{let o;try{o=Rt(e)??{}}catch(s){throw new Error(`Cannot resolve tsconfig at path: ${e}`,{cause:s})}if(typeof o!="object")throw new SyntaxError(`Failed to parse tsconfig at: ${e}`);const r=L(e);if(o.compilerOptions){const{compilerOptions:s}=o;s.paths&&!s.baseUrl&&(s[Se]=r)}if(o.extends){const s=Array.isArray(o.extends)?o.extends:[o.extends];delete o.extends;const f=s.toReversed();for(let c=0;c<f.length;c++){const u=f[c],a=vt(u,r,t);if(!a)throw new Ne(`No such file or directory, for '${u}' found.`);const m=Ut(a,r,new Set(i),n,t);m.compilerOptions?.rootDir!==void 0&&!m.compilerOptions.rootDir.startsWith(E)&&(m.compilerOptions.rootDir=h(L(a),m.compilerOptions.rootDir));const v={...m,...o,compilerOptions:{...m.compilerOptions,...o.compilerOptions}};m.watchOptions&&(v.watchOptions={...m.watchOptions,...o.watchOptions}),o=v}}if(o.compilerOptions){const{compilerOptions:s}=o;for(const f of["baseUrl","rootDir"]){const c=s[f];if(c&&!c.startsWith(E)){const u=j(r,c);s[f]=M(P(r,u))}}for(const f of["outDir","declarationDir"]){let c=s[f];c&&(Array.isArray(o.exclude)||(o.exclude=["outDir","declarationDir"].map(u=>{const a=s[u];if(a)return a.startsWith(E)||me(a)?a:h(r,a)}).filter(Boolean)),c.startsWith(E)||(c=M(c)),s[f]=c)}}else o.compilerOptions={};if(o.include&&(o.include=o.include.map(s=>Ft(s))),o.files&&(o.files=o.files.map(s=>s.startsWith(E)?s:M(s))),o.watchOptions){const{watchOptions:s}=o;s.excludeDirectories&&(s.excludeDirectories=s.excludeDirectories.map(f=>Y(j(r,f)))),s.excludeFiles&&(s.excludeFiles=s.excludeFiles.map(f=>Y(j(r,f)))),s.watchFile&&(s.watchFile=s.watchFile.toLowerCase()),s.watchDirectory&&(s.watchDirectory=s.watchDirectory.toLowerCase()),s.fallbackPolling&&(s.fallbackPolling=s.fallbackPolling.toLowerCase())}if(o.compilerOptions.lib&&(o.compilerOptions.lib=o.compilerOptions.lib.map(s=>s.toLowerCase())),o.compilerOptions.module){let s=o.compilerOptions.module.toLowerCase();s==="es2015"&&(s="es6"),o.compilerOptions.module=s}if(o.compilerOptions.target){let s=o.compilerOptions.target.toLowerCase();s==="es2015"&&(s="es6"),o.compilerOptions.target=s}if(o.compilerOptions.moduleResolution){let s=o.compilerOptions.moduleResolution.toLowerCase();s==="node"&&(s="node10"),o.compilerOptions.moduleResolution=s}return o.compilerOptions.jsx&&(o.compilerOptions.jsx=o.compilerOptions.jsx.toLowerCase()),o.compilerOptions.moduleDetection&&(o.compilerOptions.moduleDetection=o.compilerOptions.moduleDetection.toLowerCase()),o.compilerOptions.importsNotUsedAsValues&&(o.compilerOptions.importsNotUsedAsValues=o.compilerOptions.importsNotUsedAsValues.toLowerCase()),o.compilerOptions.newLine&&(o.compilerOptions.newLine=o.compilerOptions.newLine.toLowerCase()),o},z=(e,n)=>{if(e.startsWith(E))return Y(h(n,e.slice(E.length)))},xt=["outDir","declarationDir","outFile","rootDir","baseUrl","tsBuildInfoFile"],Te=e=>e==="es2022"||e==="es2023"||e==="es2024"||e==="es2025"||e==="esnext",St=(e,n)=>{if(e.compilerOptions===void 0)return e;if(e.compilerOptions.rewriteRelativeImportExtensions&&(e.compilerOptions.allowImportingTsExtensions??=!0),e.compilerOptions.composite&&(e.compilerOptions.declaration??=!0,e.compilerOptions.incremental??=!0),e.compilerOptions.checkJs&&(e.compilerOptions.allowJs??=!0),e.compilerOptions.verbatimModuleSyntax&&(e.compilerOptions.isolatedModules??=!0,e.compilerOptions.preserveConstEnums??=!0),["5.4","5.5","5.6","5.7","5.8","5.9"].includes(String(n?.tscCompatible))){if(e.compilerOptions.esModuleInterop===void 0&&(e.compilerOptions.module==="node16"||e.compilerOptions.module==="node18"||e.compilerOptions.module==="node20"||e.compilerOptions.module==="nodenext"||e.compilerOptions.module==="preserve")&&(e.compilerOptions.esModuleInterop=!0),e.compilerOptions.moduleDetection===void 0&&e.compilerOptions.module&&["node16","node18","node20","nodenext"].includes(e.compilerOptions.module)&&(e.compilerOptions.moduleDetection="force"),e.compilerOptions.moduleResolution===void 0){let i="classic";if(e.compilerOptions.module!==void 0)switch(e.compilerOptions.module.toLocaleLowerCase()){case"commonjs":{i="node10";break}case"node16":case"node18":{i="node16";break}case"node20":{i="node16";break}case"nodenext":{i="nodenext";break}case"preserve":{i="bundler";break}}i!=="classic"&&(e.compilerOptions.moduleResolution=i)}if(e.compilerOptions.moduleResolution==="bundler"&&(e.compilerOptions.resolveJsonModule??=!0),e.compilerOptions.module&&["node20","nodenext"].includes(e.compilerOptions.module)&&(e.compilerOptions.resolveJsonModule??=!0),(e.compilerOptions.esModuleInterop||e.compilerOptions.module==="system"||e.compilerOptions.moduleResolution==="bundler")&&e.compilerOptions.allowSyntheticDefaultImports===void 0&&(e.compilerOptions.allowSyntheticDefaultImports=!0),["5.7","5.8","5.9"].includes(String(n?.tscCompatible))&&e.compilerOptions.moduleResolution){let i=!1;["bundler","node16","nodenext"].includes(e.compilerOptions.moduleResolution.toLocaleLowerCase())&&(i=!0),e.compilerOptions.resolvePackageJsonExports===void 0&&i&&(e.compilerOptions.resolvePackageJsonExports=!0),e.compilerOptions.resolvePackageJsonImports===void 0&&i&&(e.compilerOptions.resolvePackageJsonImports=!0)}if(e.compilerOptions.target===void 0){let i="es5";switch(e.compilerOptions.module){case"node16":case"node18":{i="es2022";break}case"node20":{i="es2023";break}case"nodenext":{i="esnext";break}}i!=="es5"&&(e.compilerOptions.target=i)}e.compilerOptions.useDefineForClassFields===void 0&&e.compilerOptions.target&&Te(e.compilerOptions.target)&&(e.compilerOptions.useDefineForClassFields=!0)}if(["5.6","5.7","5.8","5.9"].includes(String(n?.tscCompatible))&&e.compilerOptions.strict&&e.compilerOptions.strictBuiltinIteratorReturn===void 0&&(e.compilerOptions.strictBuiltinIteratorReturn=!0),["5.4","5.5","5.6","5.7","5.8","5.9"].includes(String(n?.tscCompatible))&&(e.compilerOptions.strict&&(e.compilerOptions.noImplicitAny=e.compilerOptions.noImplicitAny??!0,e.compilerOptions.noImplicitThis=e.compilerOptions.noImplicitThis??!0,e.compilerOptions.strictNullChecks=e.compilerOptions.strictNullChecks??!0,e.compilerOptions.strictFunctionTypes=e.compilerOptions.strictFunctionTypes??!0,e.compilerOptions.strictBindCallApply=e.compilerOptions.strictBindCallApply??!0,e.compilerOptions.strictPropertyInitialization=e.compilerOptions.strictPropertyInitialization??!0,e.compilerOptions.alwaysStrict=e.compilerOptions.alwaysStrict??!0),e.compilerOptions.strict&&e.compilerOptions.useUnknownInCatchVariables===void 0&&(e.compilerOptions.useUnknownInCatchVariables=!0),e.compilerOptions.isolatedModules&&(e.compilerOptions.preserveConstEnums=e.compilerOptions.preserveConstEnums??!0)),["6.0","7.0","true"].includes(String(n?.tscCompatible))){if(e.compilerOptions.moduleDetection===void 0&&e.compilerOptions.module&&["node16","node18","node20","nodenext"].includes(e.compilerOptions.module)&&(e.compilerOptions.moduleDetection="force"),e.compilerOptions.moduleResolution===void 0&&e.compilerOptions.module){const i=e.compilerOptions.module.toLocaleLowerCase();i==="node16"||i==="node18"||i==="node20"?e.compilerOptions.moduleResolution="node16":i==="nodenext"&&(e.compilerOptions.moduleResolution="nodenext")}if(e.compilerOptions.useDefineForClassFields===void 0&&e.compilerOptions.module&&["node16","node18","node20","nodenext"].includes(e.compilerOptions.module)&&e.compilerOptions.target&&!Te(e.compilerOptions.target)&&(e.compilerOptions.useDefineForClassFields=!1),e.compilerOptions.isolatedModules&&e.compilerOptions.preserveConstEnums===void 0&&(e.compilerOptions.preserveConstEnums=!0),e.compilerOptions.resolveJsonModule===void 0){const i=e.compilerOptions.module,t=e.compilerOptions.moduleResolution?.toLocaleLowerCase();!(i!==void 0&&["node20","nodenext"].includes(i)||t==="bundler")&&t&&(e.compilerOptions.resolveJsonModule=!1)}if(e.compilerOptions.moduleResolution){const i=e.compilerOptions.moduleResolution.toLocaleLowerCase();["bundler","node16","nodenext"].includes(i)||(e.compilerOptions.resolvePackageJsonExports??=!1,e.compilerOptions.resolvePackageJsonImports??=!1)}}return e.compileOnSave===!1&&delete e.compileOnSave,e},Wt=(e,n)=>{const i=e?.typescriptVersion;if(!(i===!1||i===void 0))return i==="auto"?Re(n):i},E="${configDir}",Se=Symbol("implicitBaseUrl"),Vt=(e,n)=>{const i=j(e),t=xe(i,n),o=L(i),r=Wt(n,o);r&&t.compilerOptions&&Dt(t.compilerOptions,r);const{compilerOptions:s}=t;if(s){for(const c of xt){const u=s[c];if(u){const a=z(u,o);s[c]=a?M(P(o,a)):u}}for(const c of["rootDirs","typeRoots"]){const u=s[c];u&&(s[c]=u.map(a=>{const m=z(a,o);return m?M(P(o,m)):a}))}const{paths:f}=s;if(f){const c=Object.keys(f);for(let u=0;u<c.length;u++){const a=c[u];f[a]=f[a].map(m=>z(m,o)??m)}}}for(let f=0;f<ce.length;f++){const c=ce[f],u=t[c];u&&(t[c]=u.map(a=>z(a,o)??a))}return St(t,n)};let Mt;const Pt=e=>(Mt??=je(import.meta.url))(e),V=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Jt=e=>{if(typeof V<"u"&&V.versions&&V.versions.node){const[n,i]=V.versions.node.split(".").map(Number);if(n>22||n===22&&i>=3||n===20&&i>=16)return V.getBuiltinModule(e)}return Pt(e)},{statSync:qt}=Jt("node:fs"),Gt=new Map,ue=new WeakMap,Ht="tsconfig.json",We=e=>{try{return qt(e).mtimeMs}catch{return 0}},zt=(e,n)=>{let i=String(n.typescriptVersion);return n.typescriptVersion==="auto"&&(i=`auto:${String(Re(L(e)))}`),`${e}::${String(n.tscCompatible)}::${i}`},Qt=(e,n,i)=>{if(e.has(n)&&ue.get(e)?.get(n)===We(i))return e.get(n)},Xt=(e,n,i,t)=>{e.set(n,t);let o=ue.get(e);o||(o=new Map,ue.set(e,o)),o.set(n,We(i))},Yt=(e,n={})=>{const i=n.configFileName??Ht,t=n.configFileName===void 0;let o=X(i,{...e&&{cwd:e},type:"file"});if(!o&&t&&(o=X("jsconfig.json",{...e&&{cwd:e},type:"file"})),!o)throw new Ne(t?`No such file or directory, for '${i}' or 'jsconfig.json' found.`:`No such file or directory, for '${i}' found.`);const r=n.cache&&typeof n.cache!="boolean"?n.cache:Gt,s=zt(o,n);if(n.cache){const c=Qt(r,s,o);if(c)return c}const f={config:Vt(o,{tscCompatible:n.tscCompatible,typescriptVersion:n.typescriptVersion}),path:o};return n.cache&&Xt(r,s,o,f),f},Zt=/\.[cm]?tsx?$/,Kt=[".yaml",".yml",".toml",".jsonc",".json5",".txt"],Ve=/\.(?:ya?ml|toml|jsonc|json5|txt)$/,Ct=e=>e.endsWith(".yaml")||e.endsWith(".yml")?dt(e):e.endsWith(".toml")?mt(e):e.endsWith(".jsonc")?at(e,{allowTrailingComma:!0}):e.endsWith(".json5")?rt(e):ae(e,"utf8"),pe=e=>e===void 0?"undefined":e===null?"null":typeof e=="number"?Number.isNaN(e)?"NaN":e===Number.POSITIVE_INFINITY?"Infinity":e===Number.NEGATIVE_INFINITY?"-Infinity":String(e):typeof e=="bigint"?`${e}n`:typeof e=="boolean"?String(e):typeof e=="string"?JSON.stringify(e):e instanceof Date?`new Date(${JSON.stringify(e.toISOString())})`:Array.isArray(e)?`[${e.map(n=>pe(n)).join(",")}]`:typeof e=="object"?`{${Object.entries(e).map(([i,t])=>`${JSON.stringify(i)}:${pe(t)}`).join(",")}}`:"null",ie=new Map,en=(e,n)=>e.startsWith(E)?h(n,e.slice(E.length)):e,tn=e=>{if(ie.has(e))return ie.get(e);let n;try{const{config:i,path:t}=Yt(e,{cache:!1}),o=L(t),r=i.compilerOptions,s=r?.paths??{};if(r!==void 0){const{baseUrl:f}=r;let c,u=!1;if(f===void 0){const a=r[Se];c=typeof a=="string"?a:o}else u=!0,c=j(o,en(f,o));n={hasBaseUrl:u,paths:s,pathsBase:c}}}catch{n=void 0}return ie.set(e,n),n},Me=(e,n)=>{const i=tn(n);if(i===void 0)return;const{hasBaseUrl:t,pathsBase:o}=i,r=s=>Pe(s)??Je(s);for(const[s,f]of Object.entries(i.paths)){const c=s.indexOf("*");if(c===-1){if(s===e)for(const m of f){const v=r(j(o,m));if(v!==void 0)return v}continue}const u=s.slice(0,c),a=s.slice(c+1);if(e.startsWith(u)&&e.endsWith(a)&&e.length>=u.length+a.length){const m=e.slice(u.length,e.length-a.length);for(const v of f){const b=v.replace("*",m),y=r(j(o,b));if(y!==void 0)return y}}}if(t){const s=r(j(o,e));if(s!==void 0)return s}};let he=!1,se=0,Ae=!1,Ee=!1;const nn=()=>{Ee||(Ee=!0,process.setSourceMapsEnabled?.(!0))},on=e=>{const n=e.indexOf("?");return n===-1?e:e.slice(0,n)},sn=e=>e.endsWith(".cts")?"commonjs":"module",Ie=[".ts",".tsx",".mts",".cts",".js",".mjs",".cjs",".json"],F=e=>{try{return $e(e).isFile()}catch{return!1}},rn=e=>{try{return $e(e).isDirectory()}catch{return!1}},ln=e=>{if(e.endsWith(".js"))return`${e.slice(0,-3)}.ts`;if(e.endsWith(".mjs"))return`${e.slice(0,-4)}.mts`;if(e.endsWith(".cjs"))return`${e.slice(0,-4)}.cts`},Pe=e=>{if(F(e))return e;const n=ln(e);if(n!==void 0&&F(n))return n;for(const i of Ie)if(F(e+i))return e+i;if(rn(e))for(const i of Ie){const t=`${e}/index${i}`;if(F(t))return t}},Je=e=>{if(F(e)&&Ve.test(e))return e;for(const n of Kt)if(F(e+n))return e+n},qe=()=>{nn();const{registerHooks:e}=re;return typeof e!="function"?!1:(he||(e({load(n,i,t){const o=on(n);if(o.startsWith("file:")&&Zt.test(o)){const r=G(o),{code:s}=Le(r,ae(r,"utf8"));return{format:sn(r),shortCircuit:!0,source:s}}if(o.startsWith("file:")&&Ve.test(o)){const r=G(o),s=Ct(r);return{format:"module",shortCircuit:!0,source:`export default ${pe(s)};
|
|
4
|
-
`}}return t(n,i)},resolve(n,i,t){if((n.startsWith(".")||n.startsWith("/"))&&i.parentURL!==void 0){let o;try{o=new URL(n,i.parentURL)}catch{o=void 0}if(o?.protocol==="file:"){const r=G(o),s=Pe(r)??Je(r);if(s!==void 0)return{shortCircuit:!0,url:Q(s).href}}}if(i.parentURL!==void 0&&!n.startsWith(".")&&!n.startsWith("/")&&!n.startsWith("#")&&!n.startsWith("node:")&&!re.isBuiltin?.(n)){let o;try{o=
|
|
5
|
-
`));const{code:n}=
|
|
1
|
+
import{createRequire as He}from"node:module";import{a as D,f as Ke,c as Ce,r as et,T as tt,C as nt,U as j,$ as _,b as P,k as X,e as h,g as Ne,z as me,h as Y,t as ot,L as it}from"../packem_shared/index-BdMIfGVZ.js";import{parse as st}from"./index4.js";import{y as ge}from"../packem_shared/index-C9ENZqH9.js";import{y as $}from"../packem_shared/isAccessibleSync-DYKTrrvc-BwaMhQs0.js";import{transformTs as _e}from"#native";let Qe;const Xe=e=>(Qe??=He(import.meta.url))(e),U=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,fe=e=>{if(typeof U<"u"&&U.versions&&U.versions.node){const[n,i]=U.versions.node.split(".").map(Number);if(n>22||n===22&&i>=3||n===20&&i>=16)return U.getBuiltinModule(e)}return Xe(e)},{readFileSync:ae,writeFileSync:Ye,unlinkSync:Ze,statSync:$e}=fe("node:fs"),re=fe("node:module"),{createRequire:je}=re,{pathToFileURL:Q,fileURLToPath:G}=fe("node:url");function rt(e,n,i){const{beforeParse:t,buffer:o,compression:r,encoding:s="utf8",flag:f}={},c=D(e,{buffer:o,compression:r,encoding:s,flag:f}),u=typeof t=="function"?t(c):c;return Ke.parse(u,n)}function lt(e,n=!1){const i=e.length;let t=0,o="",r=0,s=16,f=0,c=0,u=0,a=0,m=0;function T(l,O){let k=0,g=0;for(;k<l;){let p=e.charCodeAt(t);if(p>=48&&p<=57)g=g*16+p-48;else if(p>=65&&p<=70)g=g*16+p-65+10;else if(p>=97&&p<=102)g=g*16+p-97+10;else break;t++,k++}return k<l&&(g=-1),g}function b(l){t=l,o="",r=0,s=16,m=0}function y(){let l=t;if(e.charCodeAt(t)===48)t++;else for(t++;t<e.length&&R(e.charCodeAt(t));)t++;if(t<e.length&&e.charCodeAt(t)===46)if(t++,t<e.length&&R(e.charCodeAt(t)))for(t++;t<e.length&&R(e.charCodeAt(t));)t++;else return m=3,e.substring(l,t);let O=t;if(t<e.length&&(e.charCodeAt(t)===69||e.charCodeAt(t)===101))if(t++,(t<e.length&&e.charCodeAt(t)===43||e.charCodeAt(t)===45)&&t++,t<e.length&&R(e.charCodeAt(t))){for(t++;t<e.length&&R(e.charCodeAt(t));)t++;O=t}else m=3;return e.substring(l,O)}function A(){let l="",O=t;for(;;){if(t>=i){l+=e.substring(O,t),m=2;break}const k=e.charCodeAt(t);if(k===34){l+=e.substring(O,t),t++;break}if(k===92){if(l+=e.substring(O,t),t++,t>=i){m=2;break}switch(e.charCodeAt(t++)){case 34:l+='"';break;case 92:l+="\\";break;case 47:l+="/";break;case 98:l+="\b";break;case 102:l+="\f";break;case 110:l+=`
|
|
2
|
+
`;break;case 114:l+="\r";break;case 116:l+=" ";break;case 117:const p=T(4);p>=0?l+=String.fromCharCode(p):m=4;break;default:m=5}O=t;continue}if(k>=0&&k<=31)if(x(k)){l+=e.substring(O,t),m=2;break}else m=6;t++}return l}function N(){if(o="",m=0,r=t,c=f,a=u,t>=i)return r=i,s=17;let l=e.charCodeAt(t);if(ee(l)){do t++,o+=String.fromCharCode(l),l=e.charCodeAt(t);while(ee(l));return s=15}if(x(l))return t++,o+=String.fromCharCode(l),l===13&&e.charCodeAt(t)===10&&(t++,o+=`
|
|
3
|
+
`),f++,u=t,s=14;switch(l){case 123:return t++,s=1;case 125:return t++,s=2;case 91:return t++,s=3;case 93:return t++,s=4;case 58:return t++,s=6;case 44:return t++,s=5;case 34:return t++,o=A(),s=10;case 47:const O=t-1;if(e.charCodeAt(t+1)===47){for(t+=2;t<i&&!x(e.charCodeAt(t));)t++;return o=e.substring(O,t),s=12}if(e.charCodeAt(t+1)===42){t+=2;const k=i-1;let g=!1;for(;t<k;){const p=e.charCodeAt(t);if(p===42&&e.charCodeAt(t+1)===47){t+=2,g=!0;break}t++,x(p)&&(p===13&&e.charCodeAt(t)===10&&t++,f++,u=t)}return g||(t++,m=1),o=e.substring(O,t),s=13}return o+=String.fromCharCode(l),t++,s=16;case 45:if(o+=String.fromCharCode(l),t++,t===i||!R(e.charCodeAt(t)))return s=16;case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return o+=y(),s=11;default:for(;t<i&&L(l);)t++,l=e.charCodeAt(t);if(r!==t){switch(o=e.substring(r,t),o){case"true":return s=8;case"false":return s=9;case"null":return s=7}return s=16}return o+=String.fromCharCode(l),t++,s=16}}function L(l){if(ee(l)||x(l))return!1;switch(l){case 125:case 93:case 123:case 91:case 34:case 58:case 44:case 47:return!1}return!0}function d(){let l;do l=N();while(l>=12&&l<=15);return l}return{setPosition:b,getPosition:()=>t,scan:n?d:N,getToken:()=>s,getTokenValue:()=>o,getTokenOffset:()=>r,getTokenLength:()=>t-r,getTokenStartLine:()=>c,getTokenStartCharacter:()=>r-a,getTokenError:()=>m}}function ee(e){return e===32||e===9}function x(e){return e===10||e===13}function R(e){return e>=48&&e<=57}var Oe;(function(e){e[e.lineFeed=10]="lineFeed",e[e.carriageReturn=13]="carriageReturn",e[e.space=32]="space",e[e._0=48]="_0",e[e._1=49]="_1",e[e._2=50]="_2",e[e._3=51]="_3",e[e._4=52]="_4",e[e._5=53]="_5",e[e._6=54]="_6",e[e._7=55]="_7",e[e._8=56]="_8",e[e._9=57]="_9",e[e.a=97]="a",e[e.b=98]="b",e[e.c=99]="c",e[e.d=100]="d",e[e.e=101]="e",e[e.f=102]="f",e[e.g=103]="g",e[e.h=104]="h",e[e.i=105]="i",e[e.j=106]="j",e[e.k=107]="k",e[e.l=108]="l",e[e.m=109]="m",e[e.n=110]="n",e[e.o=111]="o",e[e.p=112]="p",e[e.q=113]="q",e[e.r=114]="r",e[e.s=115]="s",e[e.t=116]="t",e[e.u=117]="u",e[e.v=118]="v",e[e.w=119]="w",e[e.x=120]="x",e[e.y=121]="y",e[e.z=122]="z",e[e.A=65]="A",e[e.B=66]="B",e[e.C=67]="C",e[e.D=68]="D",e[e.E=69]="E",e[e.F=70]="F",e[e.G=71]="G",e[e.H=72]="H",e[e.I=73]="I",e[e.J=74]="J",e[e.K=75]="K",e[e.L=76]="L",e[e.M=77]="M",e[e.N=78]="N",e[e.O=79]="O",e[e.P=80]="P",e[e.Q=81]="Q",e[e.R=82]="R",e[e.S=83]="S",e[e.T=84]="T",e[e.U=85]="U",e[e.V=86]="V",e[e.W=87]="W",e[e.X=88]="X",e[e.Y=89]="Y",e[e.Z=90]="Z",e[e.asterisk=42]="asterisk",e[e.backslash=92]="backslash",e[e.closeBrace=125]="closeBrace",e[e.closeBracket=93]="closeBracket",e[e.colon=58]="colon",e[e.comma=44]="comma",e[e.dot=46]="dot",e[e.doubleQuote=34]="doubleQuote",e[e.minus=45]="minus",e[e.openBrace=123]="openBrace",e[e.openBracket=91]="openBracket",e[e.plus=43]="plus",e[e.slash=47]="slash",e[e.formFeed=12]="formFeed",e[e.tab=9]="tab"})(Oe||(Oe={}));var Z;(function(e){e.DEFAULT={allowTrailingComma:!1}})(Z||(Z={}));function ct(e,n=[],i=Z.DEFAULT){let t=null,o=[];const r=[];function s(c){Array.isArray(o)?o.push(c):t!==null&&(o[t]=c)}return ut(e,{onObjectBegin:()=>{const c={};s(c),r.push(o),o=c,t=null},onObjectProperty:c=>{t=c},onObjectEnd:()=>{o=r.pop()},onArrayBegin:()=>{const c=[];s(c),r.push(o),o=c,t=null},onArrayEnd:()=>{o=r.pop()},onLiteralValue:s,onError:(c,u,a)=>{n.push({error:c,offset:u,length:a})}},i),o[0]}function ut(e,n,i=Z.DEFAULT){const t=lt(e,!1),o=[];let r=0;function s(w){return w?()=>r===0&&w(t.getTokenOffset(),t.getTokenLength(),t.getTokenStartLine(),t.getTokenStartCharacter()):()=>!0}function f(w){return w?v=>r===0&&w(v,t.getTokenOffset(),t.getTokenLength(),t.getTokenStartLine(),t.getTokenStartCharacter()):()=>!0}function c(w){return w?v=>r===0&&w(v,t.getTokenOffset(),t.getTokenLength(),t.getTokenStartLine(),t.getTokenStartCharacter(),()=>o.slice()):()=>!0}function u(w){return w?()=>{r>0?r++:w(t.getTokenOffset(),t.getTokenLength(),t.getTokenStartLine(),t.getTokenStartCharacter(),()=>o.slice())===!1&&(r=1)}:()=>!0}function a(w){return w?()=>{r>0&&r--,r===0&&w(t.getTokenOffset(),t.getTokenLength(),t.getTokenStartLine(),t.getTokenStartCharacter())}:()=>!0}const m=u(n.onObjectBegin),T=c(n.onObjectProperty),b=a(n.onObjectEnd),y=u(n.onArrayBegin),A=a(n.onArrayEnd),N=c(n.onLiteralValue),L=f(n.onSeparator),d=s(n.onComment),l=f(n.onError),O=i&&i.disallowComments,k=i&&i.allowTrailingComma;function g(){for(;;){const w=t.scan();switch(t.getTokenError()){case 4:p(14);break;case 5:p(15);break;case 3:p(13);break;case 1:O||p(11);break;case 2:p(12);break;case 6:p(16);break}switch(w){case 12:case 13:O?p(10):d();break;case 16:p(1);break;case 15:case 14:break;default:return w}}}function p(w,v=[],de=[]){if(l(w),v.length+de.length>0){let q=t.getToken();for(;q!==17;){if(v.indexOf(q)!==-1){g();break}else if(de.indexOf(q)!==-1)break;q=g()}}}function I(w){const v=t.getTokenValue();return w?N(v):(T(v),o.push(v)),g(),!0}function B(){switch(t.getToken()){case 11:const w=t.getTokenValue();let v=Number(w);isNaN(v)&&(p(2),v=0),N(v);break;case 7:N(null);break;case 8:N(!0);break;case 9:N(!1);break;default:return!1}return g(),!0}function J(){return t.getToken()!==10?(p(3,[],[2,5]),!1):(I(!1),t.getToken()===6?(L(":"),g(),C()||p(4,[],[2,5])):p(5,[],[2,5]),o.pop(),!0)}function Ge(){m(),g();let w=!1;for(;t.getToken()!==2&&t.getToken()!==17;){if(t.getToken()===5){if(w||p(4,[],[]),L(","),g(),t.getToken()===2&&k)break}else w&&p(6,[],[]);J()||p(4,[],[2,5]),w=!0}return b(),t.getToken()!==2?p(7,[2],[]):g(),!0}function ze(){y(),g();let w=!0,v=!1;for(;t.getToken()!==4&&t.getToken()!==17;){if(t.getToken()===5){if(v||p(4,[],[]),L(","),g(),t.getToken()===4&&k)break}else v&&p(6,[],[]);w?(o.push(0),w=!1):o[o.length-1]++,C()||p(4,[],[4,5]),v=!0}return A(),w||o.pop(),t.getToken()!==4?p(8,[4],[]):g(),!0}function C(){switch(t.getToken()){case 3:return ze();case 1:return Ge();case 10:return I(!0);default:return B()}}return g(),t.getToken()===17?i.allowEmptyContent?!0:(p(4,[],[]),!1):C()?(t.getToken()!==17&&p(9,[],[]),!0):(p(4,[],[]),!1)}var be;(function(e){e[e.None=0]="None",e[e.UnexpectedEndOfComment=1]="UnexpectedEndOfComment",e[e.UnexpectedEndOfString=2]="UnexpectedEndOfString",e[e.UnexpectedEndOfNumber=3]="UnexpectedEndOfNumber",e[e.InvalidUnicode=4]="InvalidUnicode",e[e.InvalidEscapeCharacter=5]="InvalidEscapeCharacter",e[e.InvalidCharacter=6]="InvalidCharacter"})(be||(be={}));var ke;(function(e){e[e.OpenBraceToken=1]="OpenBraceToken",e[e.CloseBraceToken=2]="CloseBraceToken",e[e.OpenBracketToken=3]="OpenBracketToken",e[e.CloseBracketToken=4]="CloseBracketToken",e[e.CommaToken=5]="CommaToken",e[e.ColonToken=6]="ColonToken",e[e.NullKeyword=7]="NullKeyword",e[e.TrueKeyword=8]="TrueKeyword",e[e.FalseKeyword=9]="FalseKeyword",e[e.StringLiteral=10]="StringLiteral",e[e.NumericLiteral=11]="NumericLiteral",e[e.LineCommentTrivia=12]="LineCommentTrivia",e[e.BlockCommentTrivia=13]="BlockCommentTrivia",e[e.LineBreakTrivia=14]="LineBreakTrivia",e[e.Trivia=15]="Trivia",e[e.Unknown=16]="Unknown",e[e.EOF=17]="EOF"})(ke||(ke={}));const K=ct;var we;(function(e){e[e.InvalidSymbol=1]="InvalidSymbol",e[e.InvalidNumberFormat=2]="InvalidNumberFormat",e[e.PropertyNameExpected=3]="PropertyNameExpected",e[e.ValueExpected=4]="ValueExpected",e[e.ColonExpected=5]="ColonExpected",e[e.CommaExpected=6]="CommaExpected",e[e.CloseBraceExpected=7]="CloseBraceExpected",e[e.CloseBracketExpected=8]="CloseBracketExpected",e[e.EndOfFileExpected=9]="EndOfFileExpected",e[e.InvalidCommentToken=10]="InvalidCommentToken",e[e.UnexpectedEndOfComment=11]="UnexpectedEndOfComment",e[e.UnexpectedEndOfString=12]="UnexpectedEndOfString",e[e.UnexpectedEndOfNumber=13]="UnexpectedEndOfNumber",e[e.InvalidUnicode=14]="InvalidUnicode",e[e.InvalidEscapeCharacter=15]="InvalidEscapeCharacter",e[e.InvalidCharacter=16]="InvalidCharacter"})(we||(we={}));function pt(e){switch(e){case 1:return"InvalidSymbol";case 2:return"InvalidNumberFormat";case 3:return"PropertyNameExpected";case 4:return"ValueExpected";case 5:return"ColonExpected";case 6:return"CommaExpected";case 7:return"CloseBraceExpected";case 8:return"CloseBracketExpected";case 9:return"EndOfFileExpected";case 10:return"InvalidCommentToken";case 11:return"UnexpectedEndOfComment";case 12:return"UnexpectedEndOfString";case 13:return"UnexpectedEndOfNumber";case 14:return"InvalidUnicode";case 15:return"InvalidEscapeCharacter";case 16:return"InvalidCharacter"}return"<unknown ParseErrorCode>"}const ft=(e,n,i,t)=>{if(e.length===0)return;const o=e[0],r=Ce(n,o.offset),s=new et(`${pt(o.error)} at offset ${o.offset}`);throw s.fileName=i,s.codeFrame=tt(n,{start:r},{tabWidth:!1,...t}),s},at=(e,n)=>{const{allowEmptyContent:i,allowTrailingComma:t=!0,beforeParse:o,buffer:r,color:s,compression:f,disallowComments:c,encoding:u="utf8",flag:a}=n??{},m=D(e,{buffer:r,compression:f,encoding:u,flag:a}),T=typeof o=="function"?o(m):m,b=[],y=K(T,b,{allowEmptyContent:i,allowTrailingComma:t,disallowComments:c});return ft(b,T,nt(e),{color:s}),y},le=e=>Array.isArray(e)?e.map(n=>le(n)):e!==null&&typeof e=="object"&&Object.getPrototypeOf(e)===null?Object.fromEntries(Object.entries(e).map(([n,i])=>[n,le(i)])):e,mt=(e,n)=>{const i=D(e,{encoding:"utf8",...n});return le(st(i))};function dt(e,n,i){const t={},{buffer:o,compression:r,encoding:s="utf8",flag:f,...c}=t,u=D(e,{buffer:o,compression:r,encoding:s,flag:f});return typeof n=="function"?ge(u,n,c):ge(u,c)}var S={},ye;function gt(){if(ye)return S;ye=1,Object.defineProperty(S,"__esModule",{value:!0});const e=d=>d!==null&&typeof d=="object",n=(d,l)=>Object.assign(new Error(`[${d}]: ${l}`),{code:d}),i="ERR_INVALID_PACKAGE_CONFIG",t="ERR_INVALID_PACKAGE_TARGET",o="ERR_PACKAGE_PATH_NOT_EXPORTED",r="ERR_PACKAGE_IMPORT_NOT_DEFINED",s=/^\d+$/,f=/^(\.{1,2}|node_modules)$/i,c=/\/|\\/;var u=(d=>(d.Export="exports",d.Import="imports",d))(u||{});const a=(d,l,O,k,g)=>{if(l==null)return[];if(typeof l=="string"){const[p,...I]=l.split(c);if(p===".."||I.some(B=>f.test(B)))throw n(t,`Invalid "${d}" target "${l}" defined in the package config`);return[g?l.replace(/\*/g,g):l]}if(Array.isArray(l))return l.flatMap(p=>a(d,p,O,k,g));if(e(l)){for(const p of Object.keys(l)){if(s.test(p))throw n(i,"Cannot contain numeric property keys");if(p==="default"||k.includes(p))return a(d,l[p],O,k,g)}return[]}throw n(t,`Invalid "${d}" target "${l}"`)},m="*",T=(d,l)=>{const O=d.indexOf(m),k=l.indexOf(m);return O===k?l.length>d.length:k>O};function b(d,l){if(!l.includes(m)&&d.hasOwnProperty(l))return[l];let O,k;for(const g of Object.keys(d))if(g.includes(m)){const[p,I,B]=g.split(m);if(B===void 0&&l.startsWith(p)&&l.endsWith(I)){const J=l.slice(p.length,-I.length||void 0);J&&(!O||T(O,g))&&(O=g,k=J)}}return[O,k]}const y=d=>Object.keys(d).reduce((l,O)=>{const k=O===""||O[0]!==".";if(l===void 0||l===k)return k;throw n(i,'"exports" cannot contain some keys starting with "." and some not')},void 0),A=/^\w+:/,N=(d,l,O)=>{if(!d)throw new Error('"exports" is required');l=l===""?".":`./${l}`,(typeof d=="string"||Array.isArray(d)||e(d)&&y(d))&&(d={".":d});const[k,g]=b(d,l),p=a(u.Export,d[k],l,O,g);if(p.length===0)throw n(o,l==="."?'No "exports" main defined':`Package subpath '${l}' is not defined by "exports"`);for(const I of p)if(!I.startsWith("./")&&!A.test(I))throw n(t,`Invalid "exports" target "${I}" defined in the package config`);return p},L=(d,l,O)=>{if(!d)throw new Error('"imports" is required');const[k,g]=b(d,l),p=a(u.Import,d[k],l,O,g);if(p.length===0)throw n(r,`Package import specifier "${l}" is not defined in package`);return p};return S.resolveExports=N,S.resolveImports=L,S}var Ot=gt();let bt;const kt=e=>(bt??=je(import.meta.url))(e),W=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Le=e=>{if(typeof W<"u"&&W.versions&&W.versions.node){const[n,i]=W.versions.node.split(".").map(Number);if(n>22||n===22&&i>=3||n===20&&i>=16)return W.getBuiltinModule(e)}return kt(e)},{statSync:z}=Le("node:fs"),wt=Le("node:module"),De=(e=process.cwd())=>{const{findPnpApi:n}=wt;return n?n(e):void 0},yt=e=>K(D(e,{buffer:!1})),te=(e,n,i,t)=>{const o=`resolveFromPackageJsonPath:${e}:${n}:${i?"yes":"no"}`;if(t?.has(o))return t.get(o);const r=yt(e);if(!r)return;let s=n||"tsconfig.json";if(!i&&r.exports)try{const[f]=Ot.resolveExports(r.exports,n,["require","types"]);s=f}catch{return!1}else!n&&r.tsconfig&&(s=r.tsconfig);return s=h(e,"..",s),t?.set(o,s),s},ne="package.json",oe="tsconfig.json",Tt=(e,n,i)=>{let t=e;if(e===".."&&(t=h(t,oe)),e.startsWith(".")&&(t=j(n,t)),me(t)){if($(t)){if(z(t).isFile())return t}else if(!t.endsWith(".json")){const b=`${t}.json`;if($(b))return b}return}const[o="",...r]=e.split("/"),s=o.startsWith("@")?`${o}/${String(r.shift())}`:o,f=r.join("/"),c=De(n);if(c){const{resolveRequest:b}=c;try{if(s===e){const y=b(h(s,ne),n);if(y){const A=te(y,f,!1,i);if(A&&$(A))return A}}else{let y;try{y=b(e,n,{extensions:[".json"]})}catch{y=b(h(e,oe),n)}if(y)return y}}catch{}}const u=X(b=>{const y=h(j(b),"node_modules",s);if($(y))return h("node_modules",s)},{cwd:n,type:"directory"});if(!u||!z(u).isDirectory())return;const a=h(u,ne);if($(a)){const b=te(a,f,!1,i);if(b===!1)return;if(b&&$(b)&&z(b).isFile())return b}const m=h(u,f),T=m.endsWith(".json");if(!T){const b=`${m}.json`;if($(b))return b}if($(m)){if(z(m).isDirectory()){const b=h(m,ne);if($(b)){const A=te(b,"",!0,i);if(A&&$(A))return A}const y=h(m,oe);if($(y))return y}else if(T)return m}},Re=e=>{const n=j(e);let i;const t=De(n);if(t)try{i=t.resolveRequest("typescript/package.json",n)??void 0}catch{}if(i??=X(o=>h(o,"node_modules","typescript","package.json"),{cwd:n,type:"file"}),!!i)try{const o=K(D(i,{buffer:!1}));if(typeof o?.version=="string")return o.version}catch{}},Fe=new Set(["node16","node18","node20","nodenext"]),Be=e=>e!==void 0&&Fe.has(e),vt=e=>{switch(e){case"node20":return"es2023";case"nodenext":return"esnext";default:return"es2022"}},ht=e=>e==="nodenext"?"nodenext":"node16",At=e=>{if(e==="nodenext")return"nodenext";if(e==="node16")return"node16"},Ue=(e,n,i)=>{const t=n.has("module")?e.module:void 0,o=n.has("moduleResolution")?e.moduleResolution:void 0;let r;t!==void 0&&Fe.has(t)?r=t:o!==void 0&&(r=At(o)),i.target!==void 0&&!n.has("target")&&(e.target=r?vt(r):i.target),n.has("module")||(e.module=r??i.module),n.has("moduleResolution")||(e.moduleResolution=r?ht(r):"bundler")},Et=(e,n)=>{!n.has("target")&&!Be(e.module)&&(e.target="es3")},It=(e,n)=>{!n.has("target")&&!Be(e.module)&&(e.target="es5")},$t=(e,n)=>{n.has("strict")||(e.strict=!0),Ue(e,n,{module:"es2022",target:"es2025"}),n.has("rootDir")||(e.rootDir="."),n.has("types")||(e.types=[]),n.has("noUncheckedSideEffectImports")||(e.noUncheckedSideEffectImports=!0),n.has("libReplacement")||(e.libReplacement=!1),n.has("alwaysStrict")||(e.alwaysStrict=!0)},jt=(e,n)=>{Ue(e,n,{module:"esnext"}),n.has("stableTypeOrdering")||(e.stableTypeOrdering=!0)},Nt=[[4,Et],[5,It],[6,$t],[7,jt]],_t=/^v?(\d+)/,Lt=e=>{const n=_t.exec(e);return n?Number(n[1]):void 0},Dt=(e,n)=>{const i=Lt(n);if(i===void 0)return;const t=new Set(Object.keys(e));for(const[o,r]of Nt)o<=i&&r(e,t)},Rt=e=>K(D(e,{buffer:!1})),Ft=e=>e.replaceAll("\\","/"),M=e=>{const n=ot(e);return it(n)?n:`./${n}`},ce=["files","include","exclude"],Te=(e,n,i)=>{const t=h(n,i),o=P(e,t);return Y(o)||"./"},Bt=(e,n,i)=>{const t=P(e,n);if(!t)return i;const o=i.startsWith("./")?i.slice(2):i;return`${t}/${o}`},Ut=(e,n,i,t,o)=>{if(i.has(e))throw new Error(`Circularity detected while resolving configuration: ${e}`);i.add(e);const r=_(e),s=xe(e,t,i,o);delete s.references;const{compilerOptions:f}=s;if(f){const{baseUrl:c}=f;c&&!c.startsWith(E)&&(f.baseUrl=Te(n,r,c));const{outDir:u}=f;u&&!u.startsWith(E)&&(f.outDir=Te(n,r,u))}for(const c of ce){const u=s[c];u&&(s[c]=u.map(a=>a.startsWith(E)||me(a)?a:Bt(n,r,a)))}return s},xe=(e,n,i=new Set,t=new Map)=>{let o;try{o=Rt(e)??{}}catch(s){throw new Error(`Cannot resolve tsconfig at path: ${e}`,{cause:s})}if(typeof o!="object")throw new SyntaxError(`Failed to parse tsconfig at: ${e}`);const r=_(e);if(o.compilerOptions){const{compilerOptions:s}=o;s.paths&&!s.baseUrl&&(s[Se]=r)}if(o.extends){const s=Array.isArray(o.extends)?o.extends:[o.extends];delete o.extends;const f=s.toReversed();for(let c=0;c<f.length;c++){const u=f[c],a=Tt(u,r,t);if(!a)throw new Ne(`No such file or directory, for '${u}' found.`);const m=Ut(a,r,new Set(i),n,t);m.compilerOptions?.rootDir!==void 0&&!m.compilerOptions.rootDir.startsWith(E)&&(m.compilerOptions.rootDir=h(_(a),m.compilerOptions.rootDir));const T={...m,...o,compilerOptions:{...m.compilerOptions,...o.compilerOptions}};m.watchOptions&&(T.watchOptions={...m.watchOptions,...o.watchOptions}),o=T}}if(o.compilerOptions){const{compilerOptions:s}=o;for(const f of["baseUrl","rootDir"]){const c=s[f];if(c&&!c.startsWith(E)){const u=j(r,c);s[f]=M(P(r,u))}}for(const f of["outDir","declarationDir"]){let c=s[f];c&&(Array.isArray(o.exclude)||(o.exclude=["outDir","declarationDir"].map(u=>{const a=s[u];if(a)return a.startsWith(E)||me(a)?a:h(r,a)}).filter(Boolean)),c.startsWith(E)||(c=M(c)),s[f]=c)}}else o.compilerOptions={};if(o.include&&(o.include=o.include.map(s=>Ft(s))),o.files&&(o.files=o.files.map(s=>s.startsWith(E)?s:M(s))),o.watchOptions){const{watchOptions:s}=o;s.excludeDirectories&&(s.excludeDirectories=s.excludeDirectories.map(f=>Y(j(r,f)))),s.excludeFiles&&(s.excludeFiles=s.excludeFiles.map(f=>Y(j(r,f)))),s.watchFile&&(s.watchFile=s.watchFile.toLowerCase()),s.watchDirectory&&(s.watchDirectory=s.watchDirectory.toLowerCase()),s.fallbackPolling&&(s.fallbackPolling=s.fallbackPolling.toLowerCase())}if(o.compilerOptions.lib&&(o.compilerOptions.lib=o.compilerOptions.lib.map(s=>s.toLowerCase())),o.compilerOptions.module){let s=o.compilerOptions.module.toLowerCase();s==="es2015"&&(s="es6"),o.compilerOptions.module=s}if(o.compilerOptions.target){let s=o.compilerOptions.target.toLowerCase();s==="es2015"&&(s="es6"),o.compilerOptions.target=s}if(o.compilerOptions.moduleResolution){let s=o.compilerOptions.moduleResolution.toLowerCase();s==="node"&&(s="node10"),o.compilerOptions.moduleResolution=s}return o.compilerOptions.jsx&&(o.compilerOptions.jsx=o.compilerOptions.jsx.toLowerCase()),o.compilerOptions.moduleDetection&&(o.compilerOptions.moduleDetection=o.compilerOptions.moduleDetection.toLowerCase()),o.compilerOptions.importsNotUsedAsValues&&(o.compilerOptions.importsNotUsedAsValues=o.compilerOptions.importsNotUsedAsValues.toLowerCase()),o.compilerOptions.newLine&&(o.compilerOptions.newLine=o.compilerOptions.newLine.toLowerCase()),o},H=(e,n)=>{if(e.startsWith(E))return Y(h(n,e.slice(E.length)))},xt=["outDir","declarationDir","outFile","rootDir","baseUrl","tsBuildInfoFile"],ve=e=>e==="es2022"||e==="es2023"||e==="es2024"||e==="es2025"||e==="esnext",St=(e,n)=>{if(e.compilerOptions===void 0)return e;if(e.compilerOptions.rewriteRelativeImportExtensions&&(e.compilerOptions.allowImportingTsExtensions??=!0),e.compilerOptions.composite&&(e.compilerOptions.declaration??=!0,e.compilerOptions.incremental??=!0),e.compilerOptions.checkJs&&(e.compilerOptions.allowJs??=!0),e.compilerOptions.verbatimModuleSyntax&&(e.compilerOptions.isolatedModules??=!0,e.compilerOptions.preserveConstEnums??=!0),["5.4","5.5","5.6","5.7","5.8","5.9"].includes(String(n?.tscCompatible))){if(e.compilerOptions.esModuleInterop===void 0&&(e.compilerOptions.module==="node16"||e.compilerOptions.module==="node18"||e.compilerOptions.module==="node20"||e.compilerOptions.module==="nodenext"||e.compilerOptions.module==="preserve")&&(e.compilerOptions.esModuleInterop=!0),e.compilerOptions.moduleDetection===void 0&&e.compilerOptions.module&&["node16","node18","node20","nodenext"].includes(e.compilerOptions.module)&&(e.compilerOptions.moduleDetection="force"),e.compilerOptions.moduleResolution===void 0){let i="classic";if(e.compilerOptions.module!==void 0)switch(e.compilerOptions.module.toLocaleLowerCase()){case"commonjs":{i="node10";break}case"node16":case"node18":{i="node16";break}case"node20":{i="node16";break}case"nodenext":{i="nodenext";break}case"preserve":{i="bundler";break}}i!=="classic"&&(e.compilerOptions.moduleResolution=i)}if(e.compilerOptions.moduleResolution==="bundler"&&(e.compilerOptions.resolveJsonModule??=!0),e.compilerOptions.module&&["node20","nodenext"].includes(e.compilerOptions.module)&&(e.compilerOptions.resolveJsonModule??=!0),(e.compilerOptions.esModuleInterop||e.compilerOptions.module==="system"||e.compilerOptions.moduleResolution==="bundler")&&e.compilerOptions.allowSyntheticDefaultImports===void 0&&(e.compilerOptions.allowSyntheticDefaultImports=!0),["5.7","5.8","5.9"].includes(String(n?.tscCompatible))&&e.compilerOptions.moduleResolution){let i=!1;["bundler","node16","nodenext"].includes(e.compilerOptions.moduleResolution.toLocaleLowerCase())&&(i=!0),e.compilerOptions.resolvePackageJsonExports===void 0&&i&&(e.compilerOptions.resolvePackageJsonExports=!0),e.compilerOptions.resolvePackageJsonImports===void 0&&i&&(e.compilerOptions.resolvePackageJsonImports=!0)}if(e.compilerOptions.target===void 0){let i="es5";switch(e.compilerOptions.module){case"node16":case"node18":{i="es2022";break}case"node20":{i="es2023";break}case"nodenext":{i="esnext";break}}i!=="es5"&&(e.compilerOptions.target=i)}e.compilerOptions.useDefineForClassFields===void 0&&e.compilerOptions.target&&ve(e.compilerOptions.target)&&(e.compilerOptions.useDefineForClassFields=!0)}if(["5.6","5.7","5.8","5.9"].includes(String(n?.tscCompatible))&&e.compilerOptions.strict&&e.compilerOptions.strictBuiltinIteratorReturn===void 0&&(e.compilerOptions.strictBuiltinIteratorReturn=!0),["5.4","5.5","5.6","5.7","5.8","5.9"].includes(String(n?.tscCompatible))&&(e.compilerOptions.strict&&(e.compilerOptions.noImplicitAny=e.compilerOptions.noImplicitAny??!0,e.compilerOptions.noImplicitThis=e.compilerOptions.noImplicitThis??!0,e.compilerOptions.strictNullChecks=e.compilerOptions.strictNullChecks??!0,e.compilerOptions.strictFunctionTypes=e.compilerOptions.strictFunctionTypes??!0,e.compilerOptions.strictBindCallApply=e.compilerOptions.strictBindCallApply??!0,e.compilerOptions.strictPropertyInitialization=e.compilerOptions.strictPropertyInitialization??!0,e.compilerOptions.alwaysStrict=e.compilerOptions.alwaysStrict??!0),e.compilerOptions.strict&&e.compilerOptions.useUnknownInCatchVariables===void 0&&(e.compilerOptions.useUnknownInCatchVariables=!0),e.compilerOptions.isolatedModules&&(e.compilerOptions.preserveConstEnums=e.compilerOptions.preserveConstEnums??!0)),["6.0","7.0","true"].includes(String(n?.tscCompatible))){if(e.compilerOptions.moduleDetection===void 0&&e.compilerOptions.module&&["node16","node18","node20","nodenext"].includes(e.compilerOptions.module)&&(e.compilerOptions.moduleDetection="force"),e.compilerOptions.moduleResolution===void 0&&e.compilerOptions.module){const i=e.compilerOptions.module.toLocaleLowerCase();i==="node16"||i==="node18"||i==="node20"?e.compilerOptions.moduleResolution="node16":i==="nodenext"&&(e.compilerOptions.moduleResolution="nodenext")}if(e.compilerOptions.useDefineForClassFields===void 0&&e.compilerOptions.module&&["node16","node18","node20","nodenext"].includes(e.compilerOptions.module)&&e.compilerOptions.target&&!ve(e.compilerOptions.target)&&(e.compilerOptions.useDefineForClassFields=!1),e.compilerOptions.isolatedModules&&e.compilerOptions.preserveConstEnums===void 0&&(e.compilerOptions.preserveConstEnums=!0),e.compilerOptions.resolveJsonModule===void 0){const i=e.compilerOptions.module,t=e.compilerOptions.moduleResolution?.toLocaleLowerCase();!(i!==void 0&&["node20","nodenext"].includes(i)||t==="bundler")&&t&&(e.compilerOptions.resolveJsonModule=!1)}if(e.compilerOptions.moduleResolution){const i=e.compilerOptions.moduleResolution.toLocaleLowerCase();["bundler","node16","nodenext"].includes(i)||(e.compilerOptions.resolvePackageJsonExports??=!1,e.compilerOptions.resolvePackageJsonImports??=!1)}}return e.compileOnSave===!1&&delete e.compileOnSave,e},Wt=(e,n)=>{const i=e?.typescriptVersion;if(!(i===!1||i===void 0))return i==="auto"?Re(n):i},E="${configDir}",Se=Symbol("implicitBaseUrl"),Vt=(e,n)=>{const i=j(e),t=xe(i,n),o=_(i),r=Wt(n,o);r&&t.compilerOptions&&Dt(t.compilerOptions,r);const{compilerOptions:s}=t;if(s){for(const c of xt){const u=s[c];if(u){const a=H(u,o);s[c]=a?M(P(o,a)):u}}for(const c of["rootDirs","typeRoots"]){const u=s[c];u&&(s[c]=u.map(a=>{const m=H(a,o);return m?M(P(o,m)):a}))}const{paths:f}=s;if(f){const c=Object.keys(f);for(let u=0;u<c.length;u++){const a=c[u];f[a]=f[a].map(m=>H(m,o)??m)}}}for(let f=0;f<ce.length;f++){const c=ce[f],u=t[c];u&&(t[c]=u.map(a=>H(a,o)??a))}return St(t,n)};let Mt;const Pt=e=>(Mt??=je(import.meta.url))(e),V=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Jt=e=>{if(typeof V<"u"&&V.versions&&V.versions.node){const[n,i]=V.versions.node.split(".").map(Number);if(n>22||n===22&&i>=3||n===20&&i>=16)return V.getBuiltinModule(e)}return Pt(e)},{statSync:qt}=Jt("node:fs"),Gt=new Map,ue=new WeakMap,zt="tsconfig.json",We=e=>{try{return qt(e).mtimeMs}catch{return 0}},Ht=(e,n)=>{let i=String(n.typescriptVersion);return n.typescriptVersion==="auto"&&(i=`auto:${String(Re(_(e)))}`),`${e}::${String(n.tscCompatible)}::${i}`},Qt=(e,n,i)=>{if(e.has(n)&&ue.get(e)?.get(n)===We(i))return e.get(n)},Xt=(e,n,i,t)=>{e.set(n,t);let o=ue.get(e);o||(o=new Map,ue.set(e,o)),o.set(n,We(i))},Yt=(e,n={})=>{const i=n.configFileName??zt,t=n.configFileName===void 0;let o=X(i,{...e&&{cwd:e},type:"file"});if(!o&&t&&(o=X("jsconfig.json",{...e&&{cwd:e},type:"file"})),!o)throw new Ne(t?`No such file or directory, for '${i}' or 'jsconfig.json' found.`:`No such file or directory, for '${i}' found.`);const r=n.cache&&typeof n.cache!="boolean"?n.cache:Gt,s=Ht(o,n);if(n.cache){const c=Qt(r,s,o);if(c)return c}const f={config:Vt(o,{tscCompatible:n.tscCompatible,typescriptVersion:n.typescriptVersion}),path:o};return n.cache&&Xt(r,s,o,f),f},Zt=/\.[cm]?tsx?$/,Kt=[".yaml",".yml",".toml",".jsonc",".json5",".txt"],Ve=/\.(?:ya?ml|toml|jsonc|json5|txt)$/,Ct=e=>e.endsWith(".yaml")||e.endsWith(".yml")?dt(e):e.endsWith(".toml")?mt(e):e.endsWith(".jsonc")?at(e,{allowTrailingComma:!0}):e.endsWith(".json5")?rt(e):ae(e,"utf8"),pe=e=>e===void 0?"undefined":e===null?"null":typeof e=="number"?Number.isNaN(e)?"NaN":e===Number.POSITIVE_INFINITY?"Infinity":e===Number.NEGATIVE_INFINITY?"-Infinity":String(e):typeof e=="bigint"?`${e}n`:typeof e=="boolean"?String(e):typeof e=="string"?JSON.stringify(e):e instanceof Date?`new Date(${JSON.stringify(e.toISOString())})`:Array.isArray(e)?`[${e.map(n=>pe(n)).join(",")}]`:typeof e=="object"?`{${Object.entries(e).map(([i,t])=>`${JSON.stringify(i)}:${pe(t)}`).join(",")}}`:"null",ie=new Map,en=(e,n)=>e.startsWith(E)?h(n,e.slice(E.length)):e,tn=e=>{if(ie.has(e))return ie.get(e);let n;try{const{config:i,path:t}=Yt(e,{cache:!1}),o=_(t),r=i.compilerOptions,s=r?.paths??{};if(r!==void 0){const{baseUrl:f}=r;let c,u=!1;if(f===void 0){const a=r[Se];c=typeof a=="string"?a:o}else u=!0,c=j(o,en(f,o));n={hasBaseUrl:u,paths:s,pathsBase:c}}}catch{n=void 0}return ie.set(e,n),n},Me=(e,n)=>{const i=tn(n);if(i===void 0)return;const{hasBaseUrl:t,pathsBase:o}=i,r=s=>Pe(s)??Je(s);for(const[s,f]of Object.entries(i.paths)){const c=s.indexOf("*");if(c===-1){if(s===e)for(const m of f){const T=r(j(o,m));if(T!==void 0)return T}continue}const u=s.slice(0,c),a=s.slice(c+1);if(e.startsWith(u)&&e.endsWith(a)&&e.length>=u.length+a.length){const m=e.slice(u.length,e.length-a.length);for(const T of f){const b=T.replace("*",m),y=r(j(o,b));if(y!==void 0)return y}}}if(t){const s=r(j(o,e));if(s!==void 0)return s}};let he=!1,se=0,Ae=!1,Ee=!1;const nn=()=>{Ee||(Ee=!0,process.setSourceMapsEnabled?.(!0))},on=e=>{const n=e.indexOf("?");return n===-1?e:e.slice(0,n)},sn=e=>e.endsWith(".cts")?"commonjs":"module",Ie=[".ts",".tsx",".mts",".cts",".js",".mjs",".cjs",".json"],F=e=>{try{return $e(e).isFile()}catch{return!1}},rn=e=>{try{return $e(e).isDirectory()}catch{return!1}},ln=e=>{if(e.endsWith(".js"))return`${e.slice(0,-3)}.ts`;if(e.endsWith(".mjs"))return`${e.slice(0,-4)}.mts`;if(e.endsWith(".cjs"))return`${e.slice(0,-4)}.cts`},Pe=e=>{if(F(e))return e;const n=ln(e);if(n!==void 0&&F(n))return n;for(const i of Ie)if(F(e+i))return e+i;if(rn(e))for(const i of Ie){const t=`${e}/index${i}`;if(F(t))return t}},Je=e=>{if(F(e)&&Ve.test(e))return e;for(const n of Kt)if(F(e+n))return e+n},qe=()=>{nn();const{registerHooks:e}=re;return typeof e!="function"?!1:(he||(e({load(n,i,t){const o=on(n);if(o.startsWith("file:")&&Zt.test(o)){const r=G(o),{code:s}=_e(r,ae(r,"utf8"));return{format:sn(r),shortCircuit:!0,source:s}}if(o.startsWith("file:")&&Ve.test(o)){const r=G(o),s=Ct(r);return{format:"module",shortCircuit:!0,source:`export default ${pe(s)};
|
|
4
|
+
`}}return t(n,i)},resolve(n,i,t){if((n.startsWith(".")||n.startsWith("/"))&&i.parentURL!==void 0){let o;try{o=new URL(n,i.parentURL)}catch{o=void 0}if(o?.protocol==="file:"){const r=G(o),s=Pe(r)??Je(r);if(s!==void 0)return{shortCircuit:!0,url:Q(s).href}}}if(i.parentURL!==void 0&&!n.startsWith(".")&&!n.startsWith("/")&&!n.startsWith("#")&&!n.startsWith("node:")&&!re.isBuiltin?.(n)){let o;try{o=_(G(i.parentURL))}catch{o=void 0}if(o!==void 0){const r=Me(n,o);if(r!==void 0)return{shortCircuit:!0,url:Q(r).href}}}return t(n,i)}}),he=!0),!0)},cn=()=>qe(),un=async e=>{if(se+=1,qe())return await import(`${Q(e).href}?v=${String(se)}`);Ae||(Ae=!0,process.stderr.write(`vis: Node < 22.15 has no module.registerHooks — only the entry file is transpiled; local TypeScript imports won't load. Upgrade to Node >= 22.15 for full support.
|
|
5
|
+
`));const{code:n}=_e(e,ae(e,"utf8")),i=h(_(e),`.vis-ts-${String(se)}-${String(process.pid)}.mjs`);Ye(i,n);try{return await import(Q(i).href)}finally{try{Ze(i)}catch{}}},On=Object.defineProperty({__proto__:null,importTs:un,registerTsHooks:cn,resolveTsConfigPaths:Me},Symbol.toStringTag,{value:"Module"});export{Yt as R,mt as f,un as i,dt as l,cn as r,On as t};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{p}from"./cli-main.js";import{d as b}from"../packem_shared/pm-runner-
|
|
1
|
+
import{p}from"./cli-main.js";import{d as b}from"../packem_shared/pm-runner-ImwtpnWY.js";import{r as m,l as w,L as v}from"../packem_shared/dependency-scan-DKK3ZEZI.js";import{a as S,e as g}from"../packem_shared/index-BdMIfGVZ.js";import{S as $}from"../packem_shared/lockfile-DhHAaHN5.js";import{e as x}from"../packem_shared/index-DQfNpt2u.js";import{y as C}from"../packem_shared/isAccessibleSync-DYKTrrvc-BwaMhQs0.js";const E=e=>{const o=e.trim();return o===""?!1:/^(?:git\+|git:\/\/|git@|ssh:\/\/)/i.test(o)||/^(?:github|gitlab|bitbucket|gist):/i.test(o)||/^[\w.-]+\/[\w.-]+(?:#.+)?$/.test(o)&&!o.includes("@")?!0:/^https?:\/\//i.test(o)},M=(e,o)=>{for(const i of o)if(i===e||i.endsWith("*")&&e.startsWith(i.slice(0,-1)))return!0;return!1},L=(e,o,i={})=>{const t=m(e,o);if(!t)return[];let s;try{s=S(g(e,t.file))}catch{return[]}const n=$(s,t.type);if(n.length===0)return[];const r=i.allow??[],l=[],f=new Set;for(const c of n){const a=`${c.name}@${c.version}`;for(const d of[c.dependencies,c.optionalDependencies])if(d){for(const[u,h]of Object.entries(d))if(!M(u,r))for(const k of h){if(!E(k))continue;const y=`${a}->${u}@${k}`;f.has(y)||(f.add(y),l.push({declaredBy:a,packageName:u,source:k}))}}}return l.sort((c,a)=>c.packageName.localeCompare(a.packageName)||c.declaredBy.localeCompare(a.declaredBy))},D=new Set(["firstSeen","publisherChange"]),I=e=>e.severity==="block"&&e.acceptedRisk===void 0,N=e=>{const o=e.security?.policies?.firstSeen?.minutes,i=typeof o=="number"&&o>0,t=e.security?.policies?.publisherChange?.mode==="no-downgrade",s=e.security?.blockExoticSubdeps===!0;return i||t||s},O=async e=>{const{offline:o=!1,packageManager:i,visConfig:t,workspaceRoot:s}=e,n=Date.now();if(!N(t))return{decisions:[],durationMs:Date.now()-n,entryCount:0,exoticViolations:[],lockfileMissing:!1,status:"skipped"};const r=m(s,i);if(!r||!C(g(s,r.file)))return{decisions:[],durationMs:Date.now()-n,entryCount:0,exoticViolations:[],lockfileMissing:!0,status:"fail"};const l=w(s,i,{includeDev:!0}),f=l.length,c=await x({offline:o,packageManager:i,packages:l,workspaceRoot:s},"install",{enabledPolicies:new Set(D),visConfig:t}),a=t.security?.blockExoticSubdeps===!0?L(s,i,{allow:t.security.exoticSubdepsAllow}):[],d=c.some(u=>I(u))||a.length>0;return{decisions:c,durationMs:Date.now()-n,entryCount:f,exoticViolations:a,lockfileMissing:!1,status:d?"fail":"pass"}},P=e=>e<1e3?`${String(e)}ms`:`${(e/1e3).toFixed(1)}s`,V=e=>{if(e.status==="skipped")return["– Lockfile supply-chain verification skipped (no firstSeen / publisherChange / blockExoticSubdeps policy configured)"];if(e.lockfileMissing)return["✗ Lockfile supply-chain verification failed — no lockfile found, the resolved closure cannot be attested"];const o=`(${String(e.entryCount)} ${e.entryCount===1?"entry":"entries"}, ${P(e.durationMs)})`;if(e.status==="pass")return[`✓ Lockfile passes supply-chain policies ${o}`];const i=[`✗ Lockfile failed supply-chain policy check ${o}`];for(const t of e.decisions)t.severity==="block"&&t.acceptedRisk===void 0&&i.push(` [${t.policy}] ${t.reason}`);for(const t of e.exoticViolations)i.push(` [blockExoticSubdeps] ${t.packageName} pulled from exotic source by ${t.declaredBy}: ${t.source}`);return i},z=async({options:e,visConfig:o,workspaceRoot:i})=>{const t=i??process.cwd(),s=b(t);if(!v[s.name]){p.warn(`Package manager '${s.name}' has no lockfile vis can verify.`);return}const n=await O({offline:!!e.offline,packageManager:s.name,visConfig:o??{},workspaceRoot:t});if(e.json){process.stdout.write(`${JSON.stringify(n,void 0,2)}
|
|
2
2
|
`),n.status==="fail"&&(process.exitCode=1);return}const[r,...l]=V(n);if(n.status==="skipped"){p.info(r);return}if(n.status==="pass"){p.success(r);return}p.error(r);for(const f of l)p.error(f);process.exitCode=1};export{z as default};
|
package/dist/packem_shared/{affected-selection-D4giBK2X.js → affected-selection-DDxwjwM4.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createRequire as T}from"node:module";import{getAffectedProjects as W}from"@visulima/task-runner";import{i as A}from"./index-BjdW45xX.js";import{V as k}from"./vis-user-error-
|
|
1
|
+
import{createRequire as T}from"node:module";import{getAffectedProjects as W}from"@visulima/task-runner";import{i as A}from"./index-BjdW45xX.js";import{V as k}from"./vis-user-error-k7CLTpA4.js";import{r as B}from"./affected-shas-BuaWvmsG.js";let I;const R=e=>(I??=T(import.meta.url))(e),f=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,F=e=>{if(typeof f<"u"&&f.versions&&f.versions.node){const[t,s]=f.versions.node.split(".").map(Number);if(t>22||t===22&&s>=3||t===20&&s>=16)return f.getBuiltinModule(e)}return R(e)},{spawnSync:S}=F("node:child_process"),b=new Set(["deep","direct","none"]),O=e=>{const t=[],s=e.split("\0");for(let n=0;n<s.length;n++){const o=s[n];if(!o||o.length<4)continue;const c=o.slice(0,2),p=o.slice(3);if(p&&t.push(p),c.includes("R")||c.includes("C")){n+=1;const l=s[n];l&&t.push(l)}}return t},P=e=>{const t=S("git",["status","--porcelain","-z"],{cwd:e,encoding:"utf8"});return t.error||t.status!==0||typeof t.stdout!="string"?[]:O(t.stdout)},D=async(e,t,s={})=>{const n=e.downstream??"deep",o=e.upstream??"none";if(!b.has(n))throw new k(`Invalid --downstream value: "${n}". Must be "none", "direct", or "deep".`);if(!b.has(o))throw new k(`Invalid --upstream value: "${o}". Must be "none", "direct", or "deep".`);const{fileOwners:c,projectGraph:p,projects:l,workspaceRoot:h}=t,a=[];let{base:g}=e,{head:i}=e;if(!g||!i){const u=B({defaultBase:s.defaultBase,workspaceRoot:h});g=g||u.base,i=i||u.head,a.push(`Resolved affected refs from ${u.provider} (${u.notes.join("; ")})`)}const y=s.runningInCi??A,w=i==="HEAD"||i==="",$=e.uncommitted??(!y&&w);let d=[];if($)if(w){const j=(s.readWorkingTreeChanges??P)(h),C=Object.values(l).map(r=>r.root?.replace(/\/$/,"")).filter(r=>!!r&&r!==".");d=j.filter(r=>c!==void 0&&Object.hasOwn(c,r)||C.some(v=>r===v||r.startsWith(`${v}/`)));const _=j.length-d.length;d.length>0&&a.push(`including ${d.length} uncommitted working-tree file(s)`),_>0&&a.push(`ignoring ${_} uncommitted path(s) outside any project (untracked scratch would otherwise mark every project affected)`)}else a.push(`ignoring --uncommitted: --head=${i} pins the comparison to a commit, not the working tree`);const m=await W({additionalChangedFiles:d,base:g,downstream:n,fileOwners:c,head:i,ignoredFiles:s.affectedIgnore,projectGraph:p,projects:l,upstream:o,workspaceRoot:h});return m.ignoredFiles.length>0&&a.push(`ignoring ${m.ignoredFiles.length} changed path(s) outside any project matching affectedIgnore`),{...m,notes:a,uncommittedFileCount:d.length}};export{D as s};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{createRequire as l}from"node:module";import{a as g}from"./index-BdMIfGVZ.js";import{y as b}from"./isAccessibleSync-DYKTrrvc-BwaMhQs0.js";let E;const d=e=>(E??=l(import.meta.url))(e),u=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,h=e=>{if(typeof u<"u"&&u.versions&&u.versions.node){const[t,r]=u.versions.node.split(".").map(Number);if(t>22||t===22&&r>=3||t===20&&r>=16)return u.getBuiltinModule(e)}return d(e)},{spawnSync:p}=h("node:child_process"),A="0000000000000000000000000000000000000000",f=e=>{if(b(e))try{const t=g(e);return JSON.parse(t)}catch{return}},R=(e,t)=>{const r=p("git",e,{cwd:t,encoding:"utf8"});if(!(r.error||typeof r.status!="number"||r.status!==0))return typeof r.stdout=="string"?r.stdout.trim():void 0},_=e=>typeof e=="string"&&e.length>0&&e!==A,S=(e,t,r)=>{const o=[],s=e.GITHUB_BASE_REF,n=e.GITHUB_SHA??"HEAD";if(s&&s.length>0)return o.push(`pull_request: $GITHUB_BASE_REF=${s}`),{base:`origin/${s}`,head:n,notes:o,provider:"github"};const i=e.GITHUB_EVENT_PATH,c=i?r(i):void 0;if(c){const a=typeof c.before=="string"?c.before:void 0;if(_(a))return o.push(`push: event.before=${a}`),{base:a,head:n,notes:o,provider:"github"}}return o.push(`fallback: origin/${t}`),{base:`origin/${t}`,head:n,notes:o,provider:"github"}},I=(e,t)=>{const r=[],o=e.CI_COMMIT_SHA??"HEAD";if(e.CI_PIPELINE_SOURCE==="merge_request_event"){const c=e.CI_MERGE_REQUEST_DIFF_BASE_SHA;if(_(c))return r.push(`merge_request: $CI_MERGE_REQUEST_DIFF_BASE_SHA=${c}`),{base:c,head:o,notes:r,provider:"gitlab"};const a=e.CI_MERGE_REQUEST_TARGET_BRANCH_NAME;if(a&&a.length>0)return r.push(`merge_request: $CI_MERGE_REQUEST_TARGET_BRANCH_NAME=${a}`),{base:`origin/${a}`,head:o,notes:r,provider:"gitlab"}}const n=e.CI_COMMIT_BEFORE_SHA;if(_(n))return r.push(`push: $CI_COMMIT_BEFORE_SHA=${n}`),{base:n,head:o,notes:r,provider:"gitlab"};const i=e.CI_DEFAULT_BRANCH??t;return r.push(`fallback: origin/${i}`),{base:`origin/${i}`,head:o,notes:r,provider:"gitlab"}},T=(e,t)=>{const r=[],o=e.BUILD_SOURCEVERSION??"HEAD",s=e.SYSTEM_PULLREQUEST_TARGETBRANCHNAME,n=e.SYSTEM_PULLREQUEST_TARGETBRANCH,i=s&&s.length>0?s:n?.replace(/^refs\/heads\//,"");return i&&i.length>0?(r.push(`pull_request: target branch ${i}`),{base:`origin/${i}`,head:o,notes:r,provider:"azure"}):(r.push(`fallback: origin/${t} (azure has no canonical previous-build SHA env)`),{base:`origin/${t}`,head:o,notes:r,provider:"azure"})},C=(e,t)=>{const r=[],o=e.BUILDKITE_COMMIT??"HEAD",s=e.BUILDKITE_PULL_REQUEST_BASE_BRANCH;return s&&s.length>0?(r.push(`pull_request: $BUILDKITE_PULL_REQUEST_BASE_BRANCH=${s}`),{base:`origin/${s}`,head:o,notes:r,provider:"buildkite"}):(r.push(`fallback: origin/${t} (buildkite has no canonical previous-build SHA env)`),{base:`origin/${t}`,head:o,notes:r,provider:"buildkite"})},B=(e,t)=>{const r=[],o=e.CIRCLE_SHA1??"HEAD",s=e.CIRCLE_PR_BASE_BRANCH;return s&&s.length>0?(r.push(`pull_request: $CIRCLE_PR_BASE_BRANCH=${s}`),{base:`origin/${s}`,head:o,notes:r,provider:"circleci"}):(r.push(`fallback: origin/${t} (circleci has no canonical previous-build SHA env)`),{base:`origin/${t}`,head:o,notes:r,provider:"circleci"})},H=(e,t,r)=>{const o=[],s=t(["merge-base","HEAD",`origin/${e}`],r);return s&&s.length>0?(o.push(`local: git merge-base HEAD origin/${e}=${s}`),{base:s,head:"HEAD",notes:o,provider:"local"}):(o.push(`local fallback: origin/${e} (no merge-base available)`),{base:`origin/${e}`,head:"HEAD",notes:o,provider:"local"})},m=e=>{const t=e?.env??process.env,r=e?.defaultBase??"main",o=e?.readEventPayload??f,s=e?.runGit??R,n=e?.workspaceRoot??process.cwd();return t.GITHUB_ACTIONS==="true"?S(t,r,o):t.GITLAB_CI==="true"?I(t,r):t.TF_BUILD?.toLowerCase()==="true"?T(t,r):t.BUILDKITE==="true"?C(t,r):t.CIRCLECI==="true"?B(t,r):H(r,s,n)};export{m as r};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{createRequire as T}from"node:module";import{readLastRunSummary as _}from"@visulima/task-runner";import{a as $}from"./failure-log-
|
|
2
|
-
${n}`},J=async(e,t)=>t===void 0?_(e,{dataDirectory:R(e)}):j(e,t),pe=async(e,t,n={})=>{const o=n.terminalOutputLimit??q,[r,i]=await Promise.all([$(e,t),J(e,n.runId)]),s=i?v(i,t):void 0;if(!r&&!s)return;let a,c;if(i&&s){const u=await P(e,i.id),f=u?v(u,t):void 0;a=D(s.hashDetails,f?.hashDetails),c=u?.id}const d=r?.terminalOutput??"";return{command:r?.command??void 0,cwd:r?.cwd??void 0,dependencies:s?.dependencies??[],duration:s?.duration,exitCode:r?.exitCode??s?.exitCode,hash:s?.hash??r?.hash,hashDetails:s?.hashDetails,hashDiff:a,previousRunId:c,project:s?.target.project,runId:i?.id??r?.runId,status:r?.status??(s?K(s):void 0),target:s?.target.target,taskId:t,terminalOutput:W(d,o),terminalOutputCaptured:!!r,timestamp:r?.timestamp??s?.endTime??s?.startTime}},K=e=>{if(e.exitCode!==void 0&&e.exitCode!==0)return"failure";switch(e.cacheStatus){case"HIT":return"local-cache";case"REMOTE_HIT":return"remote-cache";case"SKIPPED":return"skipped";default:return e.exitCode===0?"success":void 0}},Y=3600*1e3,w=80,V=new Set(["high","low","medium"]),
|
|
1
|
+
import{createRequire as T}from"node:module";import{readLastRunSummary as _}from"@visulima/task-runner";import{a as $}from"./failure-log-kp0n2rbD.js";import{m as v,n as P,o as D,d as j,s as E,t as N,u as A}from"../packem_chunks/cli-main.js";import{c as R}from"./formatBytes-BHAzNIrn-DRcKvqnb.js";import{z as x,U as y,e as B,b as H}from"./index-BdMIfGVZ.js";import{a as C,b as U,e as k}from"./ai-analysis-pldoS_N4.js";let I;const F=e=>(I??=T(import.meta.url))(e),h=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,O=e=>{if(typeof h<"u"&&h.versions&&h.versions.node){const[t,n]=h.versions.node.split(".").map(Number);if(t>22||t===22&&n>=3||t===20&&n>=16)return h.getBuiltinModule(e)}return F(e)},{readFile:L,writeFile:M}=O("node:fs/promises"),q=32*1024,W=(e,t)=>{if(e.length<=t)return e;const n=e.slice(-t),o=e.length-n.length;return`[…${String(o)} bytes truncated from head…]
|
|
2
|
+
${n}`},J=async(e,t)=>t===void 0?_(e,{dataDirectory:R(e)}):j(e,t),pe=async(e,t,n={})=>{const o=n.terminalOutputLimit??q,[r,i]=await Promise.all([$(e,t),J(e,n.runId)]),s=i?v(i,t):void 0;if(!r&&!s)return;let a,c;if(i&&s){const u=await P(e,i.id),f=u?v(u,t):void 0;a=D(s.hashDetails,f?.hashDetails),c=u?.id}const d=r?.terminalOutput??"";return{command:r?.command??void 0,cwd:r?.cwd??void 0,dependencies:s?.dependencies??[],duration:s?.duration,exitCode:r?.exitCode??s?.exitCode,hash:s?.hash??r?.hash,hashDetails:s?.hashDetails,hashDiff:a,previousRunId:c,project:s?.target.project,runId:i?.id??r?.runId,status:r?.status??(s?K(s):void 0),target:s?.target.target,taskId:t,terminalOutput:W(d,o),terminalOutputCaptured:!!r,timestamp:r?.timestamp??s?.endTime??s?.startTime}},K=e=>{if(e.exitCode!==void 0&&e.exitCode!==0)return"failure";switch(e.cacheStatus){case"HIT":return"local-cache";case"REMOTE_HIT":return"remote-cache";case"SKIPPED":return"skipped";default:return e.exitCode===0?"success":void 0}},Y=3600*1e3,w=80,V=new Set(["high","low","medium"]),z=()=>`You are an expert software engineer helping fix a failing build/test/lint task.
|
|
3
3
|
|
|
4
4
|
You will be given:
|
|
5
5
|
- The terminal output (stdout/stderr) from the failed task.
|
|
@@ -32,9 +32,9 @@ Respond ONLY with valid JSON in this exact structure:
|
|
|
32
32
|
"cannotFix": "optional — set when no safe patch can be proposed"
|
|
33
33
|
}`,l=(e,t)=>{const n=[];if(t.added.length>0&&n.push(` added: ${t.added.join(", ")}`),t.changed.length>0&&n.push(` changed: ${t.changed.join(", ")}`),t.removed.length>0&&n.push(` removed: ${t.removed.join(", ")}`),n.length!==0)return`- ${e}:
|
|
34
34
|
${n.join(`
|
|
35
|
-
`)}`},
|
|
36
|
-
`)},G=e=>{const t=[`Task: ${e.taskId}`];return e.project&&t.push(`Project: ${e.project}`),e.target&&t.push(`Target: ${e.target}`),e.command&&t.push(`Command: ${e.command}`),e.cwd&&t.push(`CWD: ${e.cwd}`),e.exitCode!==void 0&&t.push(`Exit code: ${String(e.exitCode)}`),e.hash&&t.push(`Task hash: ${e.hash}`),t.push("","Hash-diff since previous run:",
|
|
37
|
-
`)},Q=e=>`${
|
|
35
|
+
`)}`},X=e=>{if(!e.hashDiff)return"No hash-diff available — there is no previous run to compare against.";const t=[];e.hashDiff.commandChanged&&t.push("- command line changed since previous run");const n=l("file inputs",e.hashDiff.nodes),o=l("implicit deps",e.hashDiff.implicitDeps),r=l("runtime/env",e.hashDiff.runtime);return n&&t.push(n),o&&t.push(o),r&&t.push(r),t.length===0?"No detectable changes between this run and the previous run.":t.join(`
|
|
36
|
+
`)},G=e=>{const t=[`Task: ${e.taskId}`];return e.project&&t.push(`Project: ${e.project}`),e.target&&t.push(`Target: ${e.target}`),e.command&&t.push(`Command: ${e.command}`),e.cwd&&t.push(`CWD: ${e.cwd}`),e.exitCode!==void 0&&t.push(`Exit code: ${String(e.exitCode)}`),e.hash&&t.push(`Task hash: ${e.hash}`),t.push("","Hash-diff since previous run:",X(e),""),e.terminalOutputCaptured?t.push("Terminal output:","```",e.terminalOutput,"```"):t.push("Terminal output: <no failure log was captured for this task>",'Set "cannotFix" and tell the user to re-run with `vis run` so logs can be captured.'),t.join(`
|
|
37
|
+
`)},Q=e=>`${z()}
|
|
38
38
|
|
|
39
39
|
${G(e)}`,Z=(e,t)=>{const n=Array.isArray(e.patches)?e.patches:[],o=[];for(const i of n)typeof i.file!="string"||i.file.length===0||typeof i.oldString!="string"||i.oldString.length===0||typeof i.newString=="string"&&o.push({file:i.file,newString:i.newString,oldString:i.oldString,reason:typeof i.reason=="string"&&i.reason.length>0?i.reason:void 0});const r=typeof e.cannotFix=="string"&&e.cannotFix.length>0?e.cannotFix:void 0;return{cannotFix:r,confidence:V.has(e.confidence)?e.confidence:"low",explanation:typeof e.explanation=="string"?e.explanation:"",patches:r?[]:o,provider:t}},ee=(e,t)=>{const n=k(e);return!n||typeof n!="object"?{cannotFix:"AI response was not valid JSON.",confidence:"low",explanation:"Failed to parse AI response.",patches:[],provider:t}:Z(n,t)},te=(e,t)=>A({cwd:t.cwd??null,flow:"ai-fix",hash:t.hash??null,provider:e,taskId:t.taskId,terminalOutput:t.terminalOutput,terminalOutputCaptured:t.terminalOutputCaptured}),le=async(e,t,n={})=>{const o=C(n.config);if(!o){t.warn(`No AI provider available — install one of: claude, gemini, copilot, codex.
|
|
40
40
|
`);return}const r=n.cache!==!1,i=te(o.name,e);if(r){const s=E(i);if(s)return t.info(`Using cached fix proposal from ${s.provider}.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{createRequire as _}from"node:module";import{l as L}from"./target-options-
|
|
1
|
+
import{createRequire as _}from"node:module";import{l as L}from"./target-options-PgWIuJnb.js";import{e as q}from"./index-BdMIfGVZ.js";let P;const R=e=>(P??=_(import.meta.url))(e),g=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,b=e=>{if(typeof g<"u"&&g.versions&&g.versions.node){const[t,r]=g.versions.node.split(".").map(Number);if(t>22||t===22&&r>=3||t===20&&r>=16)return g.getBuiltinModule(e)}return R(e)},{createRequire:j}=b("node:module"),{pathToFileURL:F}=b("node:url"),w=["temporal","urlpattern","reporterror","regexp-escape","promise-try","float16array","error-iserror","navigator-locks"],x=e=>{const t=e.trim().toLowerCase();return t===""||t==="all"||t==="1"||t==="true"?w:t.split(",").map(r=>r.trim()).filter(r=>w.includes(r))},E=async(e,t)=>{try{const o=j(q(t,"__vis_polyfill_resolver__.js")).resolve(e);return await import(F(o).href)}catch{return}},A=async e=>{if(globalThis.Temporal!==void 0)return;const t=await E("@js-temporal/polyfill",e);t?.Temporal===void 0?process.stderr.write(`vis: --polyfill temporal requested but @js-temporal/polyfill is not installed in this project.
|
|
2
2
|
`):globalThis.Temporal=t.Temporal},I=async e=>{if(globalThis.URLPattern!==void 0)return;const t=await E("urlpattern-polyfill",e);t?.URLPattern===void 0?process.stderr.write(`vis: --polyfill urlpattern requested but urlpattern-polyfill is not installed in this project.
|
|
3
3
|
`):globalThis.URLPattern=t.URLPattern},N=()=>{typeof globalThis.reportError!="function"&&(globalThis.reportError=e=>{const t=e instanceof Error?e.stack??`${e.name}: ${e.message}`:String(e);process.stderr.write(`${t}
|
|
4
4
|
`)})},O=()=>{if(typeof RegExp.escape=="function")return;const e=new Set(String.raw`^$\.*+?()[]{}|/`),t={"\f":String.raw`\f`,"\n":String.raw`\n`,"\r":String.raw`\r`," ":String.raw`\t`,"\v":String.raw`\v`},r=/\s/u,o=l=>l<=255?String.raw`\x${l.toString(16).padStart(2,"0")}`:String.raw`\u${l.toString(16).padStart(4,"0")}`;RegExp.escape=l=>{if(typeof l!="string")throw new TypeError("RegExp.escape requires a string argument");let i="",s=!0;for(const a of l){const u=a.codePointAt(0);s&&/[\dA-Za-z]/u.test(a)?i+=o(u):e.has(a)?i+=`\\${a}`:t[a]!==void 0?i+=t[a]:r.test(a)?i+=o(u):i+=a,s=!1}return i}},k=()=>{typeof Promise.try!="function"&&(Promise.try=function(t,...r){const o=typeof this=="function"?this:Promise;return new o((n,l)=>{try{n(t(...r))}catch(i){l(i)}})})},h=e=>{const t=new Float32Array(1),r=new Uint32Array(t.buffer);t[0]=e;const o=r[0],n=o>>>16&32768,l=o>>>23&255,i=o&8388607;if(l===255)return i===0?n|31744:n|32256;const s=l-127+15;if(s>=31)return n|31744;if(s<=0){if(s<-10)return n;const f=i|8388608,c=14-s;let p=f>>c;const m=f&(1<<c)-1,d=1<<c-1;return(m>d||m===d&&(p&1)===1)&&(p+=1),n|p}let a=s<<10|i>>13;const u=i&8191;return(u>4096||u===4096&&(a&1)===1)&&(a+=1),n|a},v=e=>{const t=e&32768?-1:1,r=e>>10&31,o=e&1023;return r===0?t*o*2**-24:r===31?o?Number.NaN:t*Number.POSITIVE_INFINITY:t*(1+o/1024)*2**(r-15)},U=()=>{const e=Math;typeof e.f16round!="function"&&(e.f16round=r=>v(h(r)));const t=DataView.prototype;typeof t.getFloat16!="function"&&(t.getFloat16=function(o,n){return v(this.getUint16(o,n))}),typeof t.setFloat16!="function"&&(t.setFloat16=function(o,n,l){this.setUint16(o,h(n),l)})},C=()=>{typeof Error.isError!="function"&&(Error.isError=e=>typeof e=="object"&&e!==null&&Object.prototype.toString.call(e)==="[object Error]")},V=()=>{const e=globalThis,t=e.navigator;if(t?.locks!==void 0)return;const r=new Map,o=new Set,n=s=>s.reason??(typeof DOMException=="function"?new DOMException("The lock request is aborted","AbortError"):Object.assign(new Error("The lock request is aborted"),{name:"AbortError"})),i={request:async(s,a,u)=>{const f=typeof a!="function",c=(f?a:{})??{},p=f?u:a,m=c.mode==="shared"?"shared":"exclusive";if(c.signal?.aborted)throw n(c.signal);if(c.ifAvailable===!0&&o.has(s))return p(null);const d=r.get(s)??Promise.resolve();let y;const S=new Promise(T=>{y=T});if(r.set(s,d.then(()=>S)),await d.catch(()=>{}),c.signal?.aborted)throw y(),n(c.signal);o.add(s);try{return await p({mode:m,name:s})}finally{o.delete(s),y()}}};t===void 0?Object.defineProperty(e,"navigator",{configurable:!0,enumerable:!0,value:{locks:i},writable:!0}):Object.defineProperty(t,"locks",{configurable:!0,enumerable:!0,value:i})},$={"error-iserror":C,float16array:U,"navigator-locks":V,"promise-try":k,"regexp-escape":O,reporterror:N},M=async(e,t=process.cwd())=>{const r=x(e);await Promise.all(r.map(async o=>{o==="temporal"?await A(t):o==="urlpattern"?await I(t):$[o]?.()}))},H=async e=>{for(const[t,r]of Object.entries(L(e,!0)))process.env[t]===void 0&&(process.env[t]=r);process.env.VIS_POLYFILL!==void 0&&await M(process.env.VIS_POLYFILL,e)};export{H as p};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createRequire as
|
|
1
|
+
import{createRequire as h}from"node:module";import{t as T}from"./compile-cache-DoMHRsRZ.js";import{l as w,i as R,a as j,b as M,c as m,g as S}from"./package-version-CFuNUWDG.js";import{i as $}from"./index-BjdW45xX.js";let _;const x=s=>(_??=h(import.meta.url))(s),t=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,b=s=>{if(typeof t<"u"&&t.versions&&t.versions.node){const[e,o]=t.versions.node.split(".").map(Number);if(e>22||e===22&&o>=3||e===20&&o>=16)return t.getBuiltinModule(s)}return x(s)},{createRequire:y}=b("node:module");let N;const O=s=>(N??=y(import.meta.url))(s),r=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,f=s=>{if(typeof r<"u"&&r.versions&&r.versions.node){const[e,o]=r.versions.node.split(".").map(Number);if(e>22||e===22&&o>=3||e===20&&o>=16)return r.getBuiltinModule(s)}return O(s)},{execFileSync:C}=f("node:child_process"),{totalmem:I}=f("node:os"),q=/--max-old-space-size=(\d+)/,z=/--max-semi-space-size=(\d+)/,E=s=>Math.floor(I()/1024/1024*s),P=s=>s<=512?4:s<=1024?8:s<=2048?16:s<=4096?32:s<=8192?64:Math.floor(Math.log2(s))*8,d=(s,e)=>{for(const o of e){const n=s.exec(o);if(n)return Number.parseInt(n[1],10)}},B=s=>{const o=[...w()],n=[...R()],a=d(q,o),p=d(z,o);if(a!==void 0&&p!==void 0)return;const l=a??E(.75),g=p??P(l),c=[];if(a===void 0&&c.push(`--max-old-space-size=${String(l)}`),p===void 0&&c.push(`--max-semi-space-size=${String(g)}`),c.length!==0)try{C(j(),[...c,...o,...n.slice(1)],{env:M(),stdio:"inherit"}),m(0)}catch(v){const u=v.status;m(typeof u=="number"?u:1)}},V=()=>{process.env.VIS_VERSION=S()},H=s=>{!process.stdout.isTTY||$||process.env.TERM==="dumb"||process.stdout.write(`\x1B]0;${s}\x07`)},L=new Set(["","--help","--version","-h","-v","completion","dlx","exec","x"]),i=process.argv[2]??"";!L.has(i)&&!process.argv.includes("--help")&&!process.argv.includes("-h")&&B();process.argv.includes("--no-color")&&(process.env.NO_COLOR="1",process.env.FORCE_COLOR="0");V();T();(async()=>{if(i==="__pm-shim"){const{dispatchShim:e}=await import("../packem_chunks/dispatch.js");e(process.argv[3]??"",process.argv.slice(4));return}if(i==="x"){const{runLeanX:e}=await import("../packem_chunks/lean.js");await e(process.argv.slice(3));return}if(i==="exec"||i==="dlx"){const{runExecCli:e}=await import("../packem_chunks/cli-exec.js");await e();return}const{runCli:s}=await import("../packem_chunks/cli-main.js").then(e=>e.av);await s()})();export{H as s};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createRequire as W}from"node:module";import{e as h}from"./index-
|
|
1
|
+
import{createRequire as W}from"node:module";import{e as h}from"./index-BdMIfGVZ.js";import{y as g}from"./isAccessibleSync-DYKTrrvc-BwaMhQs0.js";import{p as O}from"./readJsonSync-CbryXYxN-Bm5i10UW.js";let S;const B=e=>(S??=W(import.meta.url))(e),_=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,w=e=>{if(typeof _<"u"&&_.versions&&_.versions.node){const[s,n]=_.versions.node.split(".").map(Number);if(s>22||s===22&&n>=3||s===20&&n>=16)return _.getBuiltinModule(e)}return B(e)},{readdirSync:y,statSync:M}=w("node:fs"),P=["preinstall","install","postinstall","prepare"],$=e=>{const s=h(e,"node_modules");if(!g(s))return[];const n=new Map,o=(p,f="")=>{let l;try{l=y(p)}catch{return}for(const r of l){const i=h(p,r);if(r.startsWith("@")){o(i,`${r}/`);continue}if(r===".pnpm"&&f===""){let u;try{u=y(i)}catch{continue}for(const a of u){const c=h(i,a,"node_modules");g(c)&&o(c)}continue}if(r.startsWith("."))continue;const m=f+r,t=h(i,"package.json");try{if(!M(i).isDirectory()||!g(t))continue;const u=O(t),a=u.scripts??{},c=P.filter(v=>a[v]);!a.preinstall&&!a.install&&!a.postinstall&&g(h(i,"binding.gyp"))&&c.push("install (binding.gyp)"),c.length>0&&!n.has(m)&&n.set(m,{directory:i,hooks:c,name:m,version:typeof u.version=="string"?u.version:void 0});const d=h(i,"node_modules");g(d)&&o(d)}catch{}}};return o(s),[...n.values()]},b=e=>{const s=e.startsWith("@"),n=e.indexOf("@",s?1:0);return n===-1?{name:e}:{name:e.slice(0,n),version:e.slice(n+1)}},k=(e,s,n)=>{for(const[o,p]of Object.entries(s)){if(!p)continue;if(o.endsWith("@*")){if(o.slice(0,-2)===e.name)return!0;continue}if(o.endsWith("*")){if(e.name.startsWith(o.slice(0,-1)))return!0;continue}const{name:f,version:l}=b(o);if(f===e.name&&(!n||l===void 0||e.version===l))return!0}return!1},q=(e,s,n={})=>{const o=n.pinVersions===!0,p=$(e),f=[],l=[],r=new Map(p.map(t=>[t.name,t]));for(const t of p)k(t,s,o)?l.push(t):f.push(t);const i=[],m=[];for(const[t,u]of Object.entries(s)){if(!u)continue;if(t.endsWith("@*")){const v=t.slice(0,-2);r.has(v)||i.push(t);continue}if(t.endsWith("*")){const v=t.slice(0,-1);[...r.keys()].some(j=>j.startsWith(v))||i.push(t);continue}const{name:a,version:c}=b(t),d=r.get(a);if(!d){i.push(t);continue}o&&c!==void 0&&c!=="*"&&d.version&&d.version!==c&&m.push({from:t,to:`${a}@${d.version}`})}return{excess:i,installed:l,unapproved:f,versionDrift:m}},T=(e,s)=>q(e,s).unapproved.map(n=>`${n.name} (${n.hooks.join(", ")})`);export{q as a,T as s};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r}from"./resolve-runtime-Cr19Pk6L.js";const t=e=>{if(e!==null&&typeof e=="object"&&"runtime"in e){const n=e.runtime;if(typeof n=="string")return n}},u=(e,n)=>r(n,{config:e.visConfig?.runtime,flag:t(e.options)}),m=e=>e.runtime==="bun"?"bun":void 0;export{m as a,u as r};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{createRequire as v}from"node:module";import{
|
|
2
|
-
`).length,value:t.version}}return{dependencyNames:c!==null&&typeof c=="object"&&!Array.isArray(c)?Object.keys(c):[],name:n,publishTo:s,version:a,workspace:o}},E=(e,r,t)=>{const n=m.exec(e);if(n?.[3]!==r)throw new i(`the version literal is no longer "${r}"`);const s=n.index+8+n[1].length+n[2].length,o=s+n[3].length;return`${e.slice(0,s)}${t}${e.slice(o)}`},q=(e,r)=>{const t=r.split("/").filter(s=>s!==""&&s!==".");if(r.startsWith("/")||t.includes("..")||r.includes("\\"))throw new i(`workspace entry "${r}" must be a relative path inside the workspace`);let n=[e];for(const s of t){if(s==="**"||s.includes("*")&&s!=="*")throw new i(`workspace entry "${r}" uses an unsupported pattern; list the package directories explicitly or use "dir/*"`);n=n.flatMap(o=>{if(s!=="*")return[u(o,s)];let c;try{c=g(o)}catch{return[]}return c.map(a=>u(o,a)).filter(a=>d(a))})}return n.filter(s=>d(s)
|
|
1
|
+
import{createRequire as v}from"node:module";import{x as b}from"./index-C9ENZqH9.js";let w;const y=e=>(w??=v(import.meta.url))(e),l=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,f=e=>{if(typeof l<"u"&&l.versions&&l.versions.node){const[r,t]=l.versions.node.split(".").map(Number);if(r>22||r===22&&t>=3||r===20&&t>=16)return l.getBuiltinModule(e)}return y(e)},{readdirSync:g,statSync:h}=f("node:fs"),{join:u}=f("node:path");class i extends Error{}const _=/^\d+\.\d+\.\d+(?:-[\w.-]+)?(?:\+[\w.-]+)?$/,m=/^version:([ \t]+)(["']?)([^"'\s#]+)\2[ \t]*(?:#.*)?$/m,D=e=>{const r=b(e);if(r.errors.length>0)throw new i(`the YAML does not parse: ${r.errors[0]?.message??"unknown error"}`);const t=r.toJS()??{},{name:n}=t,s=t.publish_to,{workspace:o}=t,{dependencies:c}=t;if(n!==void 0&&typeof n!="string")throw new i("name must be a plain string");if(s!==void 0&&typeof s!="string")throw new i("publish_to must be a string");if(o!==void 0&&(!Array.isArray(o)||o.some(p=>typeof p!="string")))throw new i("workspace must be a list of directory paths");let a;if(t.version!==void 0){if(typeof t.version!="string")throw new i(`version is ${typeof t.version=="number"?"a number":"not a string"}; quote it, for example version: "1.0.0"`);const p=m.exec(e);if(p?.[3]!==t.version)throw new i("version must be a plain or quoted literal on its own top-level line, for example version: 1.0.0");if(!_.test(t.version))throw new i(`version "${t.version}" is not a semantic version`);a={line:e.slice(0,p.index).split(`
|
|
2
|
+
`).length,value:t.version}}return{dependencyNames:c!==null&&typeof c=="object"&&!Array.isArray(c)?Object.keys(c):[],name:n,publishTo:s,version:a,workspace:o}},E=(e,r,t)=>{const n=m.exec(e);if(n?.[3]!==r)throw new i(`the version literal is no longer "${r}"`);const s=n.index+8+n[1].length+n[2].length,o=s+n[3].length;return`${e.slice(0,s)}${t}${e.slice(o)}`},q=(e,r)=>{const t=r.split("/").filter(s=>s!==""&&s!==".");if(r.startsWith("/")||t.includes("..")||r.includes("\\"))throw new i(`workspace entry "${r}" must be a relative path inside the workspace`);let n=[e];for(const s of t){if(s==="**"||s.includes("*")&&s!=="*")throw new i(`workspace entry "${r}" uses an unsupported pattern; list the package directories explicitly or use "dir/*"`);n=n.flatMap(o=>{if(s!=="*")return[u(o,s)];let c;try{c=g(o)}catch{return[]}return c.map(a=>u(o,a)).filter(a=>d(a))})}return n.filter(s=>d(s)&&x(u(s,"pubspec.yaml")))},d=e=>{try{return h(e).isDirectory()}catch{return!1}},x=e=>{try{return h(e).isFile()}catch{return!1}};export{i as D,q as e,E as r,D as s};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as l,
|
|
1
|
+
import{e as l,a as d}from"./index-BdMIfGVZ.js";import{S as m}from"./lockfile-DhHAaHN5.js";import{k as v,l as g}from"../packem_chunks/catalog.js";import{y as D}from"./isAccessibleSync-DYKTrrvc-BwaMhQs0.js";const b={bun:{file:"bun.lock",type:"bun"},npm:{aliases:["npm-shrinkwrap.json"],file:"package-lock.json",type:"npm"},pnpm:{file:"pnpm-lock.yaml",type:"pnpm"},yarn:{file:"yarn.lock",type:"yarn"}},P=t=>{const o=b[t];return o?[...o.aliases??[],o.file].map(e=>({file:e,type:o.type})):[]},h=(t,o)=>{const e=P(o);if(e.length!==0)return e.find(r=>D(l(t,r.file)))??e[e.length-1]},k=t=>{try{return JSON.parse(d(t))}catch{return}},y=t=>{const o=[],e=k(l(t,"package.json"));e&&o.push(e);const r=v(t);let c;if(r?c=r:e?.workspaces&&(Array.isArray(e.workspaces)?c=e.workspaces:e.workspaces.packages&&(c=e.workspaces.packages)),!c)return o;const a=g(t,c);for(const s of a){const n=k(l(t,s,"package.json"));n&&o.push(n)}return o},S=(t,o)=>{const e=new Set,r=[],c=new Map;for(const s of o){const n=c.get(s.name);n?n.push(s):c.set(s.name,[s])}const a=s=>{if(s)for(const n of Object.keys(s))e.has(n)||(e.add(n),r.push(n))};for(const s of y(t))a(s.dependencies),a(s.peerDependencies),a(s.optionalDependencies);for(;r.length>0;){const s=r.shift(),n=c.get(s);if(n){for(const i of n)for(const p of[i.dependencies,i.peerDependencies,i.optionalDependencies])if(p)for(const f of Object.keys(p))e.has(f)||(e.add(f),r.push(f))}}return e},O=(t,o,e={})=>{const r=h(t,o);if(!r)return[];let c;try{c=d(l(t,r.file))}catch{return[]}const a=m(c,r.type);if(a.length===0)return[];const n=e.includeDev??!0?void 0:S(t,a),i=new Set,p=[];for(const f of a){if(n&&!n.has(f.name))continue;const u=`${f.name}@${f.version}`;i.has(u)||(i.add(u),p.push({isDev:!1,name:f.name,version:f.version}))}return p},I=(t,o)=>{const e=h(t,o);if(!e)return[];let r;try{r=d(l(t,e.file))}catch{return[]}const c=m(r,e.type);if(c.length===0)return[];const a=new Map;for(const n of c)a.has(n.name)||a.set(n.name,new Set),a.get(n.name).add(n.version);const s=[];for(const[n,i]of a)i.size<=1||s.push({name:n,versions:[...i]});return s.sort((n,i)=>n.name.localeCompare(i.name))},M=(t,o)=>{const e=h(t,o);if(!e)return;let r;try{r=d(l(t,e.file))}catch{return}const c=m(r,e.type);if(c.length===0)return;const a=[],s=new Set;for(const n of y(t))for(const i of[n.dependencies,n.devDependencies,n.peerDependencies,n.optionalDependencies])if(i)for(const[p,f]of Object.entries(i)){const u=`${p}@${f}`;s.has(u)||(s.add(u),a.push({name:p,version:f}))}return{entries:c,roots:a}};export{b as L,M as a,I as f,O as l,h as r};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{createRequire as Xs}from"node:module";import{e as Le,
|
|
1
|
+
import{createRequire as Xs}from"node:module";import{e as Le,b as to,$ as _i}from"./index-BdMIfGVZ.js";import{N as so,M as oo}from"./index-C9ENZqH9.js";import{y as fo}from"./isAccessibleSync-DYKTrrvc-BwaMhQs0.js";import{p as ns}from"./readJsonSync-CbryXYxN-Bm5i10UW.js";import{U as ut,h as lo}from"./writeFileSync-DJoHk3Ks-Dhem3Uof.js";let Zs;const eo=a=>(Zs??=Xs(import.meta.url))(a),zr=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,ro=a=>{if(typeof zr<"u"&&zr.versions&&zr.versions.node){const[g,C]=zr.versions.node.split(".").map(Number);if(g>22||g===22&&C>=3||g===20&&C>=16)return zr.getBuiltinModule(a)}return eo(a)},{rmSync:ki,existsSync:es,readFileSync:at,cpSync:rs,lstatSync:no,readdirSync:io}=ro("node:fs");class Ze extends Error{constructor(g){super(g),this.name="LockfilePruneError"}}const is=a=>{let g=a.startsWith("/")?a.slice(1):a;const C=g.indexOf("(");return C!==-1&&(g=g.slice(0,C)),g},co=(a,g)=>{if(!(g.startsWith("link:")||g.startsWith("file:")||g.startsWith("workspace:")))return`${a}@${g}`},ao=a=>{const g=[];for(const C of[a.dependencies,a.devDependencies,a.optionalDependencies])if(C)for(const[s,h]of Object.entries(C))h?.version&&g.push({name:s,version:h.version});return g},pt=a=>{const g=[];for(const C of[a.dependencies,a.optionalDependencies])if(C)for(const[s,h]of Object.entries(C))typeof h=="string"&&g.push({name:s,version:h});return g},ht=a=>{const g=new Map;if(!a)return g;for(const C of Object.keys(a)){const s=is(C),h=g.get(s);h?h.push(C):g.set(s,[C])}return g},ts=a=>{const g=a.displayName??"pnpm-lock.yaml",C=typeof a.lockfileContent=="string"?a.lockfileContent:a.lockfileContent.toString("utf8");let s;try{s=so(C)}catch(V){throw new Ze(`${g}: parse failed — ${V.message}`)}const h=V=>V.packages?Object.keys(V.packages).length:0;let e;for(const V of s){const[ne]=V.errors;if(ne)throw new Ze(`${g}: parse failed — ${ne.message}`);const M=V.toJS();if(!M||typeof M!="object")continue;const le=M;(e===void 0||h(le)>h(e))&&(e=le)}if(e===void 0)throw new Ze(`${g}: top-level value is not an object`);const d=e.importers??{},w=ht(e.packages),m=ht(e.snapshots),A=new Set(["."]);for(const V of a.closure)A.add(V.relativeRoot===""?".":V.relativeRoot);const x={};for(const[V,ne]of Object.entries(d))A.has(V)&&(x[V]=ne);const Y=new Set,y=new Set,v=[];for(const V of Object.values(x))for(const ne of ao(V))v.push(ne);for(;v.length>0;){const{name:V,version:ne}=v.shift(),M=co(V,ne);if(!M)continue;const le=is(M),we=m.get(le)??m.get(M)??[];for(const ve of we){if(y.has(ve))continue;y.add(ve);const Se=e.snapshots?.[ve];if(Se)for(const xe of pt(Se))v.push(xe)}const ge=w.get(le)??w.get(M)??[];for(const ve of ge){if(Y.has(ve))continue;Y.add(ve);const Se=e.packages?.[ve];if(Se&&!e.snapshots)for(const xe of pt(Se))v.push(xe)}}const $={lockfileVersion:e.lockfileVersion};for(const V of["settings","overrides","patchedDependencies","catalogs"])e[V]!==void 0&&($[V]=e[V]);if($.importers=x,e.packages){const V={};for(const ne of Object.keys(e.packages))Y.has(ne)&&(V[ne]=e.packages[ne]);$.packages=V}if(e.snapshots){const V={};for(const ne of Object.keys(e.snapshots))y.has(ne)&&(V[ne]=e.snapshots[ne]);$.snapshots=V}const P=Object.keys(e.packages??{}).length,ie=Object.keys($.packages??{}).length,oe=P-ie,R=Object.keys(d).length-Object.keys(x).length;return{content:oo($,{lineWidth:0}),message:`${g}: kept ${ie}/${P} packages and ${Object.keys(x).length} importers (dropped ${oe} packages, ${R} importers)`,status:"pruned"}},uo=a=>ts({...a,displayName:a.displayName??"aube-lock.yaml"}),po=a=>{let g="",C=!1,s=!1,h=!1;for(let e=0;e<a.length;e+=1){const d=a[e],w=a[e+1];if(s){d===`
|
|
2
2
|
`&&(s=!1,g+=d);continue}if(h){d==="*"&&w==="/"&&(h=!1,e+=1);continue}if(C){if(d==="\\"){g+=d,w!==void 0&&(g+=w,e+=1);continue}d==='"'&&(C=!1),g+=d;continue}if(d==='"'){C=!0,g+=d;continue}if(d==="/"&&w==="/"){s=!0,e+=1;continue}if(d==="/"&&w==="*"){h=!0,e+=1;continue}g+=d}return g},ho=a=>{const g=[];for(const C of[a.dependencies,a.devDependencies,a.optionalDependencies,a.peerDependencies])if(C)for(const[s,h]of Object.entries(C))typeof h=="string"&&g.push({name:s,spec:h});return g},go=a=>{for(const g of a)if(typeof g=="object"&&!Array.isArray(g))return g},mo=a=>{if(!a)return[];const g=[];for(const C of["dependencies","optionalDependencies","peerDependencies"]){const s=a[C];s!==null&&typeof s=="object"&&!Array.isArray(s)&&g.push(...Object.keys(s))}return g},yo=a=>{if(Buffer.isBuffer(a.lockfileContent))return{message:"bun.lockb is binary; run `bun install --save-text-lockfile` to regenerate as bun.lock, then rerun `vis docker scaffold`.",status:"skipped"};const g=po(a.lockfileContent);let C;try{C=JSON.parse(g)}catch(P){throw new Ze(`bun.lock: parse failed — ${P.message}`)}if(!C||typeof C!="object")throw new Ze("bun.lock: top-level value is not an object");const s=C.workspaces??{},h=C.packages??{},e=new Set([""]);for(const P of a.closure)e.add(P.relativeRoot===""?"":P.relativeRoot);const d={},w=[];for(const[P,ie]of Object.entries(s))e.has(P)&&(d[P]=ie,w.push(...ho(ie)));const m=new Set;for(const{name:P}of w)m.add(P);const A=[...m];for(;A.length>0;){const P=A.shift();for(const ie of Object.keys(h)){if(ie.split("/")[0]!==P&&ie!==P)continue;const R=go(h[ie]);for(const V of mo(R))m.has(V)||(m.add(V),A.push(V))}}const x={};for(const[P,ie]of Object.entries(h)){const oe=P.split("/")[0];(m.has(oe)||m.has(P))&&(x[P]=ie)}const Y={...C,packages:x,workspaces:d},y=Object.keys(h).length,v=Object.keys(x).length,$=y-v;return{content:`${JSON.stringify(Y,null,2)}
|
|
3
3
|
`,message:`bun.lock: kept ${v}/${y} packages (dropped ${$})`,status:"pruned"}},Jn="node_modules/",$o=(a,g,C)=>{let s=g;for(;;){const h=s===""?`${Jn}${C}`:`${s}/${Jn}${C}`;if(a[h]!==void 0)return h;if(s==="")return;const e=s.lastIndexOf(`/${Jn.slice(0,-1)}/`);s=e===-1?"":s.slice(0,e)}},vo=a=>{const g=[];for(const C of[a.dependencies,a.devDependencies,a.optionalDependencies,a.peerDependencies])if(C)for(const s of Object.keys(C))g.push(s);return g},Ao=a=>{const g=a.displayName??"package-lock.json",C=typeof a.lockfileContent=="string"?a.lockfileContent:a.lockfileContent.toString("utf8");let s;try{s=JSON.parse(C)}catch($){throw new Ze(`${g}: parse failed — ${$.message}`)}if(!s||typeof s!="object")throw new Ze(`${g}: top-level value is not an object`);const h=s.packages??{},e=new Set([""]);for(const $ of a.closure)$.relativeRoot!==""&&e.add($.relativeRoot);const d=new Set,w=[];for(const $ of Object.keys(h))e.has($)&&(d.add($),w.push($));for(const[$,P]of Object.entries(h))P.link===!0&&typeof P.resolved=="string"&&e.has(P.resolved)&&d.add($);for(;w.length>0;){const $=w.shift(),P=h[$];if(P)for(const ie of vo(P)){const oe=$o(h,$,ie);if(!oe||d.has(oe))continue;d.add(oe);const R=h[oe];R.link===!0&&typeof R.resolved=="string"&&h[R.resolved]!==void 0&&!d.has(R.resolved)?(d.add(R.resolved),w.push(R.resolved)):w.push(oe)}}const m={};for(const $ of Object.keys(h))d.has($)&&(m[$]=h[$]);const A=m[""];A&&Array.isArray(A.workspaces)&&(A.workspaces=A.workspaces.filter($=>{if(typeof $!="string")return!1;const P=$.replace(/\/?\*+$/,"").replace(/\/$/,"");if(P===""||P==="*")return!0;for(const ie of e)if(ie===$||ie===P||ie.startsWith(`${P}/`))return!0;return!1}));const x={...s,packages:m};delete x.dependencies;const Y=Object.keys(h).length,y=Object.keys(m).length,v=Y-y;return{content:`${JSON.stringify(x,null,2)}
|
|
4
4
|
`,message:`${g}: kept ${y}/${Y} entries (dropped ${v})`,status:"pruned"}};var Qn={},Fe={},zn,gt;function wo(){if(gt)return zn;gt=1;function a(s,h){function e(){this.constructor=s}e.prototype=h.prototype,s.prototype=new e}function g(s,h,e,d){this.message=s,this.expected=h,this.found=e,this.location=d,this.name="SyntaxError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,g)}a(g,Error),g.buildMessage=function(s,h){var e={literal:function(y){return'"'+w(y.text)+'"'},class:function(y){var v="",$;for($=0;$<y.parts.length;$++)v+=y.parts[$]instanceof Array?m(y.parts[$][0])+"-"+m(y.parts[$][1]):m(y.parts[$]);return"["+(y.inverted?"^":"")+v+"]"},any:function(y){return"any character"},end:function(y){return"end of input"},other:function(y){return y.description}};function d(y){return y.charCodeAt(0).toString(16).toUpperCase()}function w(y){return y.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(v){return"\\x0"+d(v)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(v){return"\\x"+d(v)})}function m(y){return y.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(v){return"\\x0"+d(v)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(v){return"\\x"+d(v)})}function A(y){return e[y.type](y)}function x(y){var v=new Array(y.length),$,P;for($=0;$<y.length;$++)v[$]=A(y[$]);if(v.sort(),v.length>0){for($=1,P=1;$<v.length;$++)v[$-1]!==v[$]&&(v[P]=v[$],P++);v.length=P}switch(v.length){case 1:return v[0];case 2:return v[0]+" or "+v[1];default:return v.slice(0,-1).join(", ")+", or "+v[v.length-1]}}function Y(y){return y?'"'+w(y)+'"':"end of input"}return"Expected "+x(s)+" but "+Y(h)+" found."};function C(s,h){h=h!==void 0?h:{};var e={},d={Start:Vi},w=Vi,m=function(r){return r||[]},A=function(r,t,o){return[{command:r,type:t}].concat(o||[])},x=function(r,t){return[{command:r,type:t||";"}]},Y=function(r){return r},y=";",v=ce(";",!1),$="&",P=ce("&",!1),ie=function(r,t){return t?{chain:r,then:t}:{chain:r}},oe=function(r,t){return{type:r,line:t}},R="&&",V=ce("&&",!1),ne="||",M=ce("||",!1),le=function(r,t){return t?{...r,then:t}:r},we=function(r,t){return{type:r,chain:t}},ge="|&",ve=ce("|&",!1),Se="|",xe=ce("|",!1),je="=",Be=ce("=",!1),$e=function(r,t){return{name:r,args:[t]}},Ne=function(r){return{name:r,args:[]}},Qe="(",Ee=ce("(",!1),re=")",Ie=ce(")",!1),De=function(r,t){return{type:"subshell",subshell:r,args:t}},Oe="{",Pe=ce("{",!1),_e="}",B=ce("}",!1),G=function(r,t){return{type:"group",group:r,args:t}},X=function(r,t){return{type:"command",args:t,envs:r}},me=function(r){return{type:"envs",envs:r}},qe=function(r){return r},ze=function(r){return r},Me=/^[0-9]/,Ye=We([["0","9"]],!1,!1),er=function(r,t,o){return{type:"redirection",subtype:t,fd:r!==null?parseInt(r):null,args:[o]}},or=">>",hr=ce(">>",!1),fr=">&",lr=ce(">&",!1),Cr=">",gr=ce(">",!1),Ke="<<<",rr=ce("<<<",!1),Ge="<&",dr=ce("<&",!1),mr="<",yr=ce("<",!1),Ue=function(r){return{type:"argument",segments:[].concat(...r)}},n=function(r){return r},k="$'",j=ce("$'",!1),J="'",l=ce("'",!1),b=function(r){return[{type:"text",text:r}]},E='""',T=ce('""',!1),O=function(){return{type:"text",text:""}},q='"',U=ce('"',!1),N=function(r){return r},Z=function(r){return{type:"arithmetic",arithmetic:r,quoted:!0}},Q=function(r){return{type:"shell",shell:r,quoted:!0}},ae=function(r){return{type:"variable",...r,quoted:!0}},de=function(r){return{type:"text",text:r}},se=function(r){return{type:"arithmetic",arithmetic:r,quoted:!1}},En=function(r){return{type:"shell",shell:r,quoted:!1}},kn=function(r){return{type:"variable",...r,quoted:!1}},tn=function(r){return{type:"glob",pattern:r}},jr=/^[^']/,Fr=We(["'"],!0,!1),$r=function(r){return r.join("")},sn=/^[^$"]/,on=We(["$",'"'],!0,!1),Kr=`\\
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{createRequire as ze}from"node:module";import{e as M,
|
|
1
|
+
import{createRequire as ze}from"node:module";import{e as M,a as Fe}from"./index-BdMIfGVZ.js";import{r as qe}from"./docker-BTuwdXaC.js";import{parse as We}from"../packem_chunks/index4.js";import Re from"../packem_chunks/index.js";import{b as fe,l as Ke,a as Ze,d as Qe,e as en,f as nn,g as tn}from"./multi-eco-lockfiles-BIa6xvJc.js";import{p as ke,r as ue,c as sn}from"./composer-DR3D-Psb.js";import{p as Ie}from"./readJsonSync-CbryXYxN-Bm5i10UW.js";import{e as on}from"./license-DvlYdo6T.js";import{S as rn}from"./lockfile-DhHAaHN5.js";import{a as cn}from"./index-B4AjSxHU.js";import{V as Le}from"./vis-user-error-k7CLTpA4.js";import{w as an,r as pn,Z as Ce}from"./zig-manifest-P7ydLEOa.js";let He;const Ve=e=>(He??=ze(import.meta.url))(e),ee=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,be=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 Ve(e)},{randomUUID:Be}=be("node:crypto"),{readFileSync:G,readdirSync:Pe,statSync:Xe,existsSync:Je}=be("node:fs"),{join:A,relative:$e,resolve:De,basename:Ye}=be("node:path"),ne=e=>e.replaceAll(/[^\w.~-]/g,t=>`%${(t.codePointAt(0)??0).toString(16).toUpperCase().padStart(2,"0")}`),j=(e,t)=>{const n=e.toLowerCase();if(n.startsWith("@")){const s=n.indexOf("/");if(s>0){const o=n.slice(0,s),r=n.slice(s+1);return`pkg:npm/${ne(o)}/${ne(r)}@${ne(t)}`}}return`pkg:npm/${ne(n)}@${ne(t)}`},_={ARRAY:"array",BOOLEAN:"boolean",DATE:"date",FUNCTION:"function",JSTOXML_OBJECT:"jstoxml-object",NULL:"null",NUMBER:"number",OBJECT:"object",STRING:"string"},ln=[_.STRING,_.NUMBER,_.BOOLEAN],un='<?xml version="1.0" encoding="UTF-8"?>',Ee=["_selfCloseTag","_attrs"],fn=(e="",t=0)=>e.repeat(t),pe=e=>Array.isArray(e)&&_.ARRAY||typeof e===_.OBJECT&&e!==null&&e._name&&_.JSTOXML_OBJECT||e instanceof Date&&_.DATE||e===null&&_.NULL||typeof e,Ue=e=>e.startsWith("<![CDATA["),je=(e="",t={},n)=>{let s=e;if(typeof e===_.STRING){if(Ue(e))return e;const o=new RegExp(`(${Object.keys(t).join("|")})(?!(\\w|#)*;)`,"g");s=String(e).replace(o,(r,l)=>t[l]||"")}return typeof n=="function"?n(s):s},dn=(e={},t,n,s)=>(Array.isArray(e)?e:Object.entries(e).map(([r,l])=>({[r]:l}))).reduce((r,l)=>{const c=Object.keys(l)[0],i=l[c];if(typeof n===_.FUNCTION&&n(c,i))return r;const a=t?je(i,t):i,f=!s&&a===!0?"":`="${a}"`;return r.push(`${c}${f}`),r},[]),mn=(e={},t,n,s)=>{const o=dn(e,t,n,s);return o.length===0?"":` ${o.join(" ")}`},hn=(e={})=>Object.keys(e).map(t=>({_name:t,_content:e[t]})),gn=e=>ln.includes(pe(e)),vn=e=>!e.match("<"),yn=({header:e,isOutputStart:t})=>e&&t?typeof e===_.BOOLEAN?un:e:"",Ae={"<":"<",">":">","&":"&",'"':"""},q=(e={},t={})=>{const{depth:n=0,indent:s,_isFirstItem:o,_isOutputStart:r=!0,header:l,attributeReplacements:c={},attributeFilter:i,attributeExplicitTrue:a=!1,contentReplacements:f={},contentMap:g,selfCloseTags:y=!0}=t,X=typeof c=="boolean"&&!c?{}:{...Ae,...c},z=typeof f=="boolean"&&!f?{}:{...Ae,...f},N=typeof s=="string",H=fn(s,n),J=pe(e),Y=yn({header:l,isOutputStart:r}),O=r&&!Y&&o&&n===0,V=N&&!O?`
|
|
2
2
|
`:"";let k="";switch(J){case _.JSTOXML_OBJECT:{const{_name:b,_content:S}=e;if(S===null&&typeof g!="function"){k=`${V}${H}${b}`;break}if(Array.isArray(S)&&S.every(gn))return S.map(ae=>q({_name:b,_content:ae},{...t,depth:n,_isOutputStart:!1})).join("");if(Ee.includes(b))break;const $=q(S,{...t,depth:n+1,_isOutputStart:O}),B=pe($),E=vn($),oe=Ue($),T=`${V}${H}`;if(b==="_comment"){k+=`${T}<!-- ${S} -->`;break}const R=B==="undefined"||$==="",D=y,W=e._selfCloseTag,K=typeof W===_.BOOLEAN?R&&W:R&&D,I=K?"/":"",re=mn(e._attrs,X,i,a),Z=`<${b}${re}${I}>`,ce=N&&!E&&!oe?`
|
|
3
3
|
${H}`:"",ie=K?"":`${$}${ce}</${b}>`;k+=`${T}${Z}${ie}`;break}case _.OBJECT:{const b=Object.keys(e);k=b.map((v,$)=>{const B={...t,_isFirstItem:$===0,_isLastItem:$+1===b.length,_isOutputStart:O},E={_name:v};if(pe(e[v])===_.OBJECT&&(Ee.forEach(R=>{const D=e[v][R];typeof D<"u"&&(E[R]=D,delete e[v][R])}),typeof e[v]._content<"u"&&Object.keys(e[v]).length>1)){const R=Object.assign({},e[v]);delete R._content,E._content=[...hn(R),e[v]._content]}return typeof E._content>"u"&&(E._content=e[v]),q(E,B)},t).join("");break}case _.FUNCTION:{const b=e(t);k=q(b,t);break}case _.ARRAY:{k=e.map((S,v)=>{const $={...t,_isFirstItem:v===0,_isLastItem:v+1===e.length,_isOutputStart:O};return q(S,$)}).join("");break}default:{k=je(e,z,g);break}}return`${Y}${k}`},_n=(e,t)=>`pkg:cargo/${encodeURIComponent(e)}@${encodeURIComponent(t)}`,se=e=>e,bn=e=>{const t=e.split(" ")[0];if(t===void 0||t==="")return;const n=/^\S+\s+(\d[^\s(]*)/.exec(e)?.[1],s=/\(([^)]+)\)/.exec(e)?.[1];return{kind:"main",name:t,source:s,version:n}},$n=e=>{const t=[];let n,s=!1;const o=()=>{n?.name!==void 0&&n.version!==void 0&&t.push({deps:n.deps,member:n.source===void 0,name:n.name,source:n.source,version:n.version})};for(const r of e.split(`
|
|
4
4
|
`)){const l=r.trim();if(l==="[[package]]"){o(),n={deps:[]},s=!1;continue}if(n===void 0)continue;if(s){const i=/^"([^"]+)",?$/.exec(l);if(i){const a=bn(i[1]);a!==void 0&&n.deps.push(a)}else l==="]"&&(s=!1);continue}if(l==="dependencies = ["){s=!0;continue}const c=/^(name|version|source)\s*=\s*"([^"]*)"$/.exec(l);if(c){const[,i="",a=""]=c;i==="name"?n.name=a:i==="version"?n.version=a:n.source=a}}return o(),t},Cn=(e,t)=>{const n=typeof t=="object"&&t!==null?t.package:void 0;return typeof n=="string"?n:e},Sn=(e,t)=>{const n=Array.isArray(t.workspace?.members)?t.workspace.members.filter(r=>typeof r=="string"):[],s=Array.isArray(t.workspace?.exclude)?t.workspace.exclude.filter(r=>typeof r=="string"):[],o=new Set;for(const r of n){let l=[e];for(const c of r.split("/").filter(i=>i!==""&&i!==".")){const i=[];for(const a of l){if(!/[*?[{]/.test(c)){i.push(A(a,c));continue}let f;try{f=Pe(a)}catch{f=[]}for(const g of f){const y=A(a,g);Re(c,g)&&Xe(y).isDirectory()&&i.push(y)}}l=i}for(const c of l){const i=c.slice(e.length+1).split("\\").join("/");s.some(a=>Re(a,i))||o.add(c)}}return[...o]},Rn=e=>{const t=new Map;let n;try{n=Oe(G(A(e,"Cargo.toml"),"utf8"))}catch{return t}const s=Sn(e,n);n.package?.name!==void 0&&s.push(e);for(const o of s){let r;try{r=Oe(G(A(o,"Cargo.toml"),"utf8"))}catch{continue}if(typeof r.package?.name!="string")continue;const l=new Set,c=i=>{for(const[a,f]of Object.entries(i??{}))l.add(se(Cn(a,f)))};c(r.dependencies),c(r["build-dependencies"]);for(const i of Object.values(r.target??{}))c(i.dependencies),c(i["build-dependencies"]);t.set(se(r.package.name),l)}return t},Oe=e=>We(e),kn=(e,t={})=>{let n;try{n=G(A(e,"Cargo.lock"),"utf8")}catch{return{components:[],dependencies:[]}}const s=Rn(e),o=$n(n).map(r=>{const l=r.member?s.get(se(r.name)):void 0;return l===void 0?r:{...r,deps:r.deps.map(c=>l.has(se(c.name))?c:{...c,kind:"dev"})}});return fe(o,{focusNames:t.focusNames,includeDev:t.includeDev,normalize:se,purl:_n})},En=(e,t)=>`pkg:composer/${e.split("/").map(n=>encodeURIComponent(n)).join("/")}@${encodeURIComponent(t)}`,te=e=>e.toLowerCase(),An=e=>{const t=[];for(const[n,s]of[["packages",!1],["packages-dev",!0]]){const o=e[n];if(Array.isArray(o))for(const r of o){if(typeof r.name!="string"||typeof r.version!="string")continue;const l=[...ue(r,"require").map(c=>({kind:s?"dev":"main",name:c})),...ue(r,"require-dev").map(c=>({kind:"dev",name:c}))];t.push({deps:l,member:!1,name:r.name,version:sn(r.version)})}}return t},On=(e,t={})=>{const n={components:[],dependencies:[]};let s,o;try{s=ke(G(A(e,"composer.lock"),"utf8")),o=ke(G(A(e,"composer.json"),"utf8"))}catch{return n}const r=typeof o.name=="string"?te(o.name):void 0;if(t.focusNames!==void 0&&!t.focusNames.some(i=>te(i)===r))return n;const l=new Set([...ue(o,"require"),...t.includeDev?ue(o,"require-dev"):[]].map(i=>te(i))),c=An(s).map(i=>({...i,member:l.has(te(i.name))}));return fe(c,{includeDev:t.includeDev,normalize:te,purl:En})},Te=e=>e.split("/").map(t=>encodeURIComponent(t)).join("/"),Tn={Go:(e,t)=>`pkg:golang/${Te(e)}@${encodeURIComponent(t)}`,Pub:(e,t)=>`pkg:pub/${encodeURIComponent(e)}@${encodeURIComponent(t)}`,SwiftURL:(e,t)=>`pkg:swift/${Te(e)}@${encodeURIComponent(t)}`},wn=(e,t)=>{const n=Ke(e,t).map(s=>{const o=Tn[t](s.name,s.version);return{"bom-ref":o,name:s.name,purl:o,type:"library",version:s.version}}).sort((s,o)=>(s["bom-ref"]??"").localeCompare(o["bom-ref"]??""));return{components:n,dependencies:n.map(s=>({ref:s["bom-ref"]??""}))}},xn=(e,t)=>`pkg:gem/${encodeURIComponent(e)}@${encodeURIComponent(t)}`,Nn=/^ {4}(\S+) \(([^()]+)\)\s*$/,Pn=/^ {6}(\S+)(?: \(.*\))?\s*$/,Dn=e=>{const t=new Map;let n,s,o;for(const r of e.split(/\r?\n/)){if(r.length>0&&!r.startsWith(" ")){n=r.trim(),s=void 0,o=void 0;continue}if(n!=="PATH"&&n!=="GEM"&&n!=="GIT")continue;const l=/^ {2}remote: (.+)$/.exec(r);if(l?.[1]!==void 0){s=l[1].trim();continue}const c=Nn.exec(r);if(c?.[1]!==void 0&&c[2]!==void 0){const a=c[1],f=c[2].split("-")[0]??c[2],g=n==="GIT"&&s!==void 0?`git:${s}`:void 0,y=`${a}\0${f}\0${g??""}`;o=t.get(y)??{deps:[],member:n==="PATH",name:a,source:g,version:f},t.set(y,o);continue}const i=Pn.exec(r);i?.[1]!==void 0&&o!==void 0&&o.deps.push({kind:"main",name:i[1]})}return[...t.values()]},In=(e,t={})=>{let n;try{n=G(A(e,"Gemfile.lock"),"utf8")}catch{return{components:[],dependencies:[]}}return fe(Dn(n),{focusNames:t.focusNames,includeDev:t.includeDev,normalize:s=>s,purl:xn})},ye=e=>{try{return Ie(e)}catch{return}},Ln=e=>{if(e.length===0||e.includes("..")||e.startsWith(".")||e.includes("\0")||e.includes("\\"))return!1;if(e.startsWith("@")){const t=e.indexOf("/");return t>1&&!e.includes("/",t+1)}return!e.includes("/")},Un=e=>e.length>0&&!e.includes("/")&&!e.includes("\\")&&!e.includes("..")&&!e.includes("\0"),jn=(e,t,n)=>{const o=`${t.replaceAll("/","+")}@${n}`,r=M(e,"node_modules",".pnpm"),l=ye(M(r,o,"node_modules",t,"package.json"));if(l)return l;let c;try{c=Pe(r)}catch{return}const i=`${o}_`;for(const a of c){if(!a.startsWith(i))continue;const f=ye(M(r,a,"node_modules",t,"package.json"));if(f)return f}},Mn=(e,t,n)=>{const s=ye(M(e,"node_modules",t,"package.json"));return s?.version===n?s:void 0},Gn=(e,t,n)=>{if(!(!Ln(t)||!Un(n)))return jn(e,t,n)??Mn(e,t,n)},zn={sha256:"SHA-256",sha384:"SHA-384",sha512:"SHA-512"},Hn={sha256:64,sha384:96,sha512:128},Vn=e=>{const t={name:e.name,version:e.version},{integrity:n}=e;return n&&n.hex.length===Hn[n.algorithm]&&(t.hash={alg:zn[n.algorithm],content:n.hex}),e.dependencies&&(t.dependencies=e.dependencies),e.peerDependencies&&(t.peerDependencies=e.peerDependencies),e.optionalDependencies&&(t.optionalDependencies=e.optionalDependencies),t},Bn=[{file:"pnpm-lock.yaml",type:"pnpm"},{file:"npm-shrinkwrap.json",type:"npm"},{file:"package-lock.json",type:"npm"},{file:"yarn.lock",type:"yarn"},{file:"bun.lock",type:"bun"}],Fn=e=>{for(const{file:t,type:n}of Bn){let s;try{s=Fe(M(e,t))}catch{continue}const o=new Map;for(const r of rn(s,n))o.set(`${r.name}@${r.version}`,Vn(r));return{packages:o,type:n}}},Me=e=>e.toLowerCase().replaceAll(/[-_.]+/g,"-"),qn=(e,t)=>`pkg:pypi/${encodeURIComponent(Me(e))}@${encodeURIComponent(t)}`,Xn=/^source\s*=\s*\{\s*(?:editable|virtual|directory)\s*=/,Jn=/\{\s*name\s*=\s*"([^"]+)"([^}]*)\}/,Yn=e=>{const t=[];let n,s="none",o=!1;const r=()=>{n?.name!==void 0&&n.version!==void 0&&t.push({deps:n.deps,member:n.member,name:n.name,source:n.source,version:n.version})};for(const l of e.split(`
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{e as d,a as u}from"./index-BdMIfGVZ.js";import{s as l}from"./index-B4AjSxHU.js";import{y as f}from"./isAccessibleSync-DYKTrrvc-BwaMhQs0.js";import{p as m}from"./readJsonSync-CbryXYxN-Bm5i10UW.js";const v={sha1:40,sha224:56,sha256:64,sha384:96,sha512:128},p=o=>{const n=o.indexOf("+");if(n===-1)return;const t=o.slice(n+1),e=/^([a-z0-9]+)\.([0-9a-f]+)$/.exec(t),s=e?v[e[1]]:void 0;if(!(e&&s!==void 0&&e[2].length===s))return`packageManager "${o}" has a malformed integrity suffix. Expected "+<algo>.<hex>" with algo sha1, sha224, sha256, sha384 or sha512 and lowercase hex of the matching length (sha512 = 128 characters).`},k=[".nvmrc",".node-version"],y=o=>{const n=d(o,"package.json");if(!f(n))return{};try{return m(n)??{}}catch{return{}}},c=(o,n)=>{const t=[];for(const{name:e,version:s}of n){const a=typeof s=="string"&&s.trim()!==""?s.trim():"*";l.validRange(a)!==null&&t.push({name:e,range:a})}if(t.length!==0)return{entries:t,label:o,value:n.map(e=>typeof e.version=="string"&&e.version!==""?`${e.name}@${e.version}`:e.name).join(" | ")}},h=(o,n)=>{const t=Array.isArray(o)?o:[o],e=[];for(const s of t){if(typeof s!="object"||s===null)continue;const{name:a,version:r}=s;typeof a!="string"||n!==void 0&&a!==n||e.push({name:a,version:r})}return e},E=(o,n)=>{const t=d(o,n);if(f(t))try{const e=u(t).trim();return e===""?void 0:e}catch{return}},x=(o,n)=>{const t=[];for(const r of k){const i=E(o,r);i!==void 0&&t.push(c(r,[{name:"node",version:i}]))}const e=n.engines;e&&typeof e.node=="string"&&t.push(c("engines.node",[{name:"node",version:e.node}]));const s=n.devEngines;s?.runtime!==void 0&&t.push(c("devEngines.runtime",h(s.runtime,"node")));const a=n.volta;return a&&typeof a.node=="string"&&t.push(c("volta.node",[{name:"node",version:a.node}])),t.filter(r=>r!==void 0)},$=o=>{const n=[],t=[];if(typeof o.packageManager=="string"){const s=o.packageManager,a=p(s);a&&t.push(a);const[r]=s.split("+",1),i=/^([^@]+)@(.+)$/.exec(r??"");i&&n.push(c("packageManager",[{name:i[1],version:i[2]}]))}const e=o.devEngines;if(e?.packageManager!==void 0){const s=h(e.packageManager);n.push(c("devEngines.packageManager",s))}return{declarations:n.filter(s=>s!==void 0),integrityIssues:t}},M=(o,n)=>o.entries.some(t=>n.entries.some(e=>t.name===e.name&&l.intersects(t.range,e.range))),g=(o,n)=>{const t=[];for(let e=0;e<n.length;e++)for(let s=e+1;s<n.length;s++){const a=n[e],r=n[s];M(a,r)||t.push(`Conflicting ${o} declarations: ${a.label} (${a.value}) and ${r.label} (${r.value}) have no version in common. vis does not pick one; align them.`)}return t},P=o=>{const n=y(o),t=x(o,n),{declarations:e,integrityIssues:s}=$(n),a=t.length+e.length;if(a===0&&s.length===0)return[{id:"env-declarations",message:"No Node.js or package-manager declarations to cross-check.",status:"skip"}];const r=[...g("Node.js",t),...g("package-manager",e)].map(i=>({id:"env-conflict",message:i,status:"warn"}));for(const i of s)r.push({id:"env-integrity",message:i,status:"warn"});return r.length===0?[{id:"env-declarations",message:`Node.js and package-manager declarations agree (${a} checked).`,status:"ok"}]:r};export{P as c};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{createRequire as p}from"node:module";import{e as j}from"./index-
|
|
1
|
+
import{createRequire as p}from"node:module";import{e as j}from"./index-BdMIfGVZ.js";import{a as F}from"./formatBytes-BHAzNIrn-DRcKvqnb.js";let h;const m=t=>(h??=p(import.meta.url))(t),s=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,c=t=>{if(typeof s<"u"&&s.versions&&s.versions.node){const[e,r]=s.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return s.getBuiltinModule(t)}return m(t)},{mkdirSync:f,writeFileSync:y,readdirSync:g}=c("node:fs"),{readFile:_}=c("node:fs/promises"),i=t=>F(t),a=(t,e)=>j(i(t),`${encodeURIComponent(e)}.json`);class R{#e;#t;constructor(e,r){this.#e=e,this.#t=r}printTaskTerminalOutput(e,r,o){if(r!=="failure")return;const n=i(this.#e);try{f(n,{recursive:!0})}catch{return}const u=e.overrides.command,d=e.projectRoot,l={command:u,cwd:d,exitCode:void 0,hash:e.hash,runId:this.#t,status:r,taskId:e.id,terminalOutput:o,timestamp:new Date().toISOString()};try{y(a(this.#e,e.id),`${JSON.stringify(l,void 0,2)}
|
|
2
2
|
`,"utf8")}catch{}}}const S=async(t,e)=>{const r=a(t,e);try{const o=await _(r,"utf8");return JSON.parse(o)}catch{return}},w=t=>{const e=i(t);let r;try{r=g(e)}catch{return[]}const o=[];for(const n of r)if(n.endsWith(".json"))try{o.push(decodeURIComponent(n.slice(0,-5)))}catch{}return o};export{R as F,S as a,w as l};
|