@stacksjs/build 0.72.37 → 0.72.38
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/dist/index.js +1 -1
- package/package.json +5 -5
package/dist/index.js
CHANGED
|
@@ -119,7 +119,7 @@ ${$}}`}}let f=s.length>0?`{
|
|
|
119
119
|
`).map((F)=>{let V=F.trim();if(!V)return"";if(V==="{"||V==="}"||V==="["||V==="]"||V.startsWith("}")||V.startsWith("]"))return V;return` ${V}`}).join(`
|
|
120
120
|
`)}let G=b.endsWith("?")||N;if(b.endsWith("?"))b=b.slice(0,-1).trim();let L=G&&!m?"?":"";if(m)return`...${b}: ${k}`;return`${b}${L}: ${k}`}function As(p){let h=0;if(h<p.length&&p.charCodeAt(h)===45)h++;if(h>=p.length)return!1;let m=p.charCodeAt(h);if(m<48||m>57)return!1;while(h<p.length&&p.charCodeAt(h)>=48&&p.charCodeAt(h)<=57)h++;if(h<p.length&&p.charCodeAt(h)===46){if(h++,h>=p.length||p.charCodeAt(h)<48||p.charCodeAt(h)>57)return!1;while(h<p.length&&p.charCodeAt(h)>=48&&p.charCodeAt(h)<=57)h++}return h===p.length}function Vi(p){let h=p.trim();if(h==="true"||h==="false")return"boolean";if(As(h))return"number";if(h.startsWith("'")&&h.endsWith("'")||h.startsWith('"')&&h.endsWith('"'))return"string";if(h.startsWith("["))return"unknown[]";if(h.startsWith("{"))return"Record<string, unknown>";return"unknown"}function _i(p){let h=p.trim();if(h.endsWith("as const"))h=h.slice(0,-8).trim();if(h==="true"||h==="false")return h;if(As(h))return h;let m=oc(h);if(m!==null)return m;return"unknown"}function oc(p){if(p==="")return null;if(p.charCodeAt(0)===ie||p.charCodeAt(0)===oe){if(xi(p,0,p.charCodeAt(0))===p.length)return p}let h=lc(p,"+");if(h.length>1){let m=!1,y=!0,w=[];for(let E of h){let A=E.trim(),O=A.charCodeAt(0);if((O===ie||O===oe)&&xi(A,0,O)===A.length)m=!0,w.push(cc(A));else y=!1}if(y)return fc(w.join(""));if(m)return"string";return null}if(/^[\d\s()+*/%.\-]+$/.test(p)&&/\d/.test(p)&&/[+*/%\-\s]/.test(p))return"number";return null}function lc(p,h){let m=[],y=0,w="",E=0;while(E<p.length){let A=p.charCodeAt(E);if(A===ie||A===oe||A===Te){let O=xi(p,E,A);w+=p.slice(E,O),E=O;continue}if(A===J&&(p.charCodeAt(E+1)===J||p.charCodeAt(E+1)===42)){if(p.charCodeAt(E+1)===J){let b=p.indexOf(`
|
|
121
121
|
`,E+2),k=b===-1?p.length:b;w+=p.slice(E,k),E=k;continue}let O=p.indexOf("*/",E+2),S=O===-1?p.length:O+2;w+=p.slice(E,S),E=S;continue}if(A===Q||A===de||A===_)y++;else if(A===Ce||A===be||A===U)y--;if(p[E]===h&&y===0){m.push(w),w="",E++;continue}w+=p[E],E++}return m.push(w),m}function cc(p){return p.slice(1,-1).replace(/\\(.)/g,(h,m)=>{if(m==="n")return`
|
|
122
|
-
`;if(m==="t")return"\t";if(m==="r")return"\r";if(m==="0")return"\x00";return m})}function fc(p){return`'${p.replace(/\\/g,"\\\\").replace(/'/g,"\\'").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t")}'`}function Pr(p){if(p.endsWith("as const"))return null;let h=0,m=-1;for(let y=0;y<p.length;y++){let w=p.charCodeAt(y);if(w===ie||w===oe||w===Te)y=xi(p,y,w)-1;else if(w===123||w===91||w===40)h++;else if(w===125||w===93||w===41)h--;else if(h===0&&w===32&&y+4<=p.length&&p.substring(y,y+4)===" as ")m=y}if(m===-1)return null;return p.slice(m+4).trim()||null}function lr(){if(d(),l<o&&i.charCodeAt(l)===tt){l++,d();let p=l,h=0;while(l<o){if(x())continue;let m=i.charCodeAt(l);if(m===Q||m===de||m===me)h++;else if(m===Ce||m===be||m===he&&!ke())h--;else if(m===_)if(h>0)h++;else{let y=g(p,l),w=(E)=>{let A=y.length-E.length;return A>=0&&y.endsWith(E)&&(A===0||!Ke(y.charCodeAt(A-1)))};if(y.length===0||y.endsWith("|")||y.endsWith("&")||w("is")||w("extends"))h++;else break}else if(m===U){if(h===0)break;h--}else if(h===0&&m===Z)break;if(h===0&&te())break;l++}return g(p,l)}return""}function St(p,h,m,y){l+=8,d();let w=l<o&&i.charCodeAt(l)===we;if(w)l++,d();let E=W();if(!E&&!y)return null;d();let A=lt();d();let O=vt();d();let S=lr(),b=S.length>0;if(!S)if(m&&w)S="AsyncGenerator<unknown, void, unknown>";else if(w)S="Generator<unknown, void, unknown>";else if(m)S="Promise<void>";else S="void";d();let k=!1;if(l<o&&i.charCodeAt(l)===_){k=!0;let M=l+1;if(Pe(_,U),!a&&!b&&!w)S=Cr(i.slice(M,l-1),m,O)}else if(l<o&&i.charCodeAt(l)===Z)l++;let N=Ft(O),G=`${h?y?"export default function ":"export declare function ":"declare function "}${E||(y?"":"default")}${A}${N}: ${S};`,L=Ue(p);if(k)u.add(c.length);return{kind:"function",name:E||"default",text:G,isExported:h,isDefault:y,isAsync:m,isGenerator:w,returnType:S,generics:A||void 0,leadingComments:L,start:p,end:l}}function Nt(p,h,m){l+=h.length,d();let y=[];do{if(d(),l>=o)break;let w=i.charCodeAt(l);if(w===_||w===de)return z(),y;let E=W();if(!E)return z(),y;d();let A,O,S=!1;if(l<o&&i.charCodeAt(l)===tt){l++,d();let N=l,G=0;while(l<o){if(x())continue;let L=i.charCodeAt(l);if(L===Q||L===_||L===de||L===me)G++;else if(L===Ce||L===U||L===be||L===he&&!ke())G--;else if(G===0&&(L===Z||L===rt))break;else if(G===0&&L===$e&&!ut())break;if(G===0&&(Y()||q()))break;l++}A=g(N,l)}if(l<o&&i.charCodeAt(l)===$e)if(a&&A&&(!s||!Oh(A)))Dt();else{l++,d();let N=l,G=0,L=0,M=0;while(l<o){if(x())continue;let F=i.charCodeAt(l);if(F===Q||F===_||F===de)G++;else if(F===Ce||F===U||F===be)G--;else if(F===me&&G===0){let V=xs(l);if(V!==null)M=Math.max(0,M+V);else if(l+1>=o||i.charCodeAt(l+1)!==$e)L++}else if(F===he&&G===0&&M===0&&!ke()){if(L>0&&(l+1>=o||i.charCodeAt(l+1)!==$e))L--}else if(G===0&&L===0&&M===0&&(F===Z||F===rt))break;if(G===0&&L===0&&M===0&&(Y()||K()))break;l++}if(O=g(N,l),O.endsWith(" as const")||O==="const"){if(S=!0,!A){let F=O.endsWith(" as const")?O.slice(0,-9).trim():O,V=_i(F);A=V!=="unknown"?V:void 0}}else if(!A){let F=Pr(O);if(F)A=F}}if(l<o){let N=i.charCodeAt(l);if(N===rt){l++;continue}if(N===Z)l++}let b=Ue(p),k=`${m?"export ":""}declare ${h} ${E}: ${A||"unknown"};`;y.push({kind:"variable",name:E,text:k,isExported:m,typeAnnotation:A,value:O,modifiers:S?[h,"const assertion"]:[h],leadingComments:b,start:p,end:l});break}while(l<o);return y}function xs(p){if(i.charCodeAt(p)!==me||p+1>=o)return null;let h=i.charCodeAt(p+1);if(h===he)return 1;if(h===J)return-1;if(!kt(h))return null;let m=p+2;while(m<o){let b=i.charCodeAt(m);if(!Ke(b)&&b!==ct&&b!==58&&b!==45)break;m++}let y=i.slice(p+1,m),w=i.charCodeAt(m);if(w>32&&w!==he&&w!==J)return null;let E=0,A=0,O=m;for(;O<o;O++){let b=i.charCodeAt(O);if(A!==0){if(b===Je)O++;else if(b===A)A=0;continue}if(b===ie||b===oe||b===Te)A=b;else if(b===_)E++;else if(b===U&&E>0)E--;else if(b===he&&E===0)break}if(O>=o)return null;let S=O-1;while(S>p&&i.charCodeAt(S)<=32)S--;if(i.charCodeAt(S)===J)return 0;return i.indexOf(`</${y}`,O+1)===-1?null:1}function Hi(p,h){l+=9,d();let m=W();d();let y=lt();d();let w="";if(T("extends")){l+=7,d();let b=l,k=0;while(l<o){if(x())continue;let N=i.charCodeAt(l);if(N===me)k++;else if(N===he&&!ke())k--;else if(N===_&&k===0)break;l++}w=g(b,l)}d();let E=l<o&&i.charCodeAt(l)===_?Bi():"{}",A=Ss(E),O=`${h?"export ":""}declare interface ${m}${y}${w?` extends ${w}`:""} ${A}`,S=Ue(p);return{kind:"interface",name:m,text:O,isExported:h,extends:w||void 0,generics:y||void 0,leadingComments:S,start:p,end:l}}function ji(p,h){l+=4,d();let m=W();d();let y=lt();if(d(),l<o&&i.charCodeAt(l)===$e)l++;d();let w=l,E=0;while(l<o){if(x())continue;let b=i.charCodeAt(l);if(b===Q||b===_||b===de||b===me)E++;else if(b===Ce||b===U||b===be||b===he&&!ke())E--;else if(E===0&&b===Z)break;if(E===0&&Y())break;l++}let A=g(w,l);if(l<o&&i.charCodeAt(l)===Z)l++;let O=`${h?"export ":""}type ${m}${y} = ${A}`,S=Ue(p);return{kind:"type",name:m,text:O,isExported:h,generics:y||void 0,leadingComments:S,start:p,end:l}}function Wt(p,h,m){l+=4,d();let y=W();d();let w=l;if(l<o&&i.charCodeAt(l)===_)Pe(_,U);let E=g(p,l),A=Ue(p);return{kind:"enum",name:y,text:E,isExported:h,modifiers:m?["const"]:void 0,leadingComments:A,start:p,end:l}}function bt(p,h,m,y=!1){l+=5,d();let w=W()||"AnonymousClass";d();let E=lt();d();let A="";if(T("extends")){l+=7,d();let N=l,G=0;while(l<o){if(x())continue;let L=i.charCodeAt(l);if(L===me)G++;else if(L===he&&!ke())G--;else if(G===0&&(L===_||T("implements")))break;l++}A=g(N,l)}let O;if(T("implements")){l+=10,d();let N=l,G=0;while(l<o){if(x())continue;let M=i.charCodeAt(l);if(M===me)G++;else if(M===he&&!ke())G--;else if(G===0&&M===_)break;l++}let L=g(N,l);if(L)O=L.split(",").map((M)=>M.trim())}d();let S=Ki(),b=`${h?y?"export default ":"export declare ":"declare "}${m?"abstract ":""}class ${w}${E}${A?` extends ${A}`:""}${O&&O.length>0?` implements ${O.join(", ")}`:""} ${S}`,k=Ue(p);return{kind:"class",name:w,text:b,isExported:h,isDefault:y,extends:A||void 0,implements:O,generics:E||void 0,modifiers:m?["abstract"]:void 0,leadingComments:k,start:p,end:l}}function Ki(){if(l>=o||i.charCodeAt(l)!==_)return"{}";l++;let p=[];while(l<o){if(d(),l>=o)break;if(i.charCodeAt(l)===U){l++;break}if(i.charCodeAt(l)===Z){l++;continue}if(T("static")&&Ts("static")===_){l+=6,d(),Pe(_,U);continue}let h=!1,m=!1,y=!1,w=!1,E=!1,A=!1,O=!1,S=!1,b=!0;while(b){if(d(),T("private")){h=!0,l+=7;continue}if(T("protected")){m=!0,l+=9;continue}if(T("public")){l+=6;continue}if(T("static")){y=!0,l+=6;continue}if(T("abstract")){w=!0,l+=8;continue}if(T("readonly")){E=!0,l+=8;continue}if(T("override")){A=!0,l+=8;continue}if(T("accessor")){O=!0,l+=8;continue}if(T("async")){S=!0,l+=5;continue}if(T("declare")){l+=7;continue}break}if(d(),l>=o||i.charCodeAt(l)===U)break;if(i.charCodeAt(l)===Ai)h=!0;if(h){Ui();continue}let k=" ";if(m)k+="protected ";if(y)k+="static ";if(w)k+="abstract ";if(E)k+="readonly ";if(T("constructor")){l+=11,d();let N=vt();if(d(),uc(N,p),l<o&&i.charCodeAt(l)===_)Pe(_,U);else if(l<o&&i.charCodeAt(l)===Z)l++;let G=Ft(N);p.push(` constructor${G};`)}else if(T("get"))if(l+=3,d(),l<o&&(kt(i.charCodeAt(l))||i.charCodeAt(l)===de||i.charCodeAt(l)===Ai)){let N=Ji();if(N.startsWith("#")){if(d(),l<o&&i.charCodeAt(l)===Q)vt();if(d(),lr(),d(),l<o&&i.charCodeAt(l)===_)Pe(_,U);else if(l<o&&i.charCodeAt(l)===Z)l++;continue}d(),vt(),d();let G=lr()||"unknown";if(d(),l<o&&i.charCodeAt(l)===_)Pe(_,U);else if(l<o&&i.charCodeAt(l)===Z)l++;p.push(`${k}get ${N}(): ${G};`)}else Rs("get",k,y,E,S,p);else if(T("set"))if(l+=3,d(),l<o&&(kt(i.charCodeAt(l))||i.charCodeAt(l)===de||i.charCodeAt(l)===Ai)){let N=Ji();if(N.startsWith("#")){if(d(),l<o&&i.charCodeAt(l)===Q)vt();if(d(),l<o&&i.charCodeAt(l)===_)Pe(_,U);else if(l<o&&i.charCodeAt(l)===Z)l++;continue}d();let G=vt();if(d(),l<o&&i.charCodeAt(l)===_)Pe(_,U);else if(l<o&&i.charCodeAt(l)===Z)l++;let L=Ft(G);p.push(`${k}set ${N}${L};`)}else Rs("set",k,y,E,S,p);else{let N=i.charCodeAt(l)===we;if(N)l++,d();let G=Ji();if(!G){Ui();continue}Os(G,k,y,E,N,w,S,p)}}return`{
|
|
122
|
+
`;if(m==="t")return"\t";if(m==="r")return"\r";if(m==="0")return"\x00";return m})}function fc(p){return`'${p.replace(/\\/g,"\\\\").replace(/'/g,"\\'").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t")}'`}function Pr(p){if(p.endsWith("as const"))return null;let h=0,m=-1;for(let y=0;y<p.length;y++){let w=p.charCodeAt(y);if(w===ie||w===oe||w===Te)y=xi(p,y,w)-1;else if(w===123||w===91||w===40)h++;else if(w===125||w===93||w===41)h--;else if(h===0&&w===32&&y+4<=p.length&&p.substring(y,y+4)===" as ")m=y}if(m===-1)return null;return p.slice(m+4).trim()||null}function lr(){if(d(),l<o&&i.charCodeAt(l)===tt){l++,d();let p=l,h=0;while(l<o){if(x())continue;let m=i.charCodeAt(l);if(m===Q||m===de||m===me)h++;else if(m===Ce||m===be||m===he&&!ke())h--;else if(m===_)if(h>0)h++;else{let y=g(p,l),w=(E)=>{let A=y.length-E.length;return A>=0&&y.endsWith(E)&&(A===0||!Ke(y.charCodeAt(A-1)))};if(y.length===0||y.endsWith("|")||y.endsWith("&")||w("is")||w("extends"))h++;else break}else if(m===U){if(h===0)break;h--}else if(h===0&&m===Z)break;if(h===0&&te())break;l++}return g(p,l)}return""}function St(p,h,m,y){l+=8,d();let w=l<o&&i.charCodeAt(l)===we;if(w)l++,d();let E=W();if(!E&&!y)return null;d();let A=lt();d();let O=vt();d();let S=lr(),b=S.length>0;if(!S)if(m&&w)S="AsyncGenerator<unknown, void, unknown>";else if(w)S="Generator<unknown, void, unknown>";else if(m)S="Promise<void>";else S="void";d();let k=!1;if(l<o&&i.charCodeAt(l)===_){k=!0;let M=l+1;if(Pe(_,U),!a&&!b&&!w)S=Cr(i.slice(M,l-1),m,O)}else if(l<o&&i.charCodeAt(l)===Z)l++;let N=Ft(O),G=`${h?y?"export default function ":"export declare function ":"declare function "}${E||(y?"":"default")}${A}${N}: ${S};`,L=Ue(p);if(k)u.add(c.length);return{kind:"function",name:E||"default",text:G,isExported:h,isDefault:y,isAsync:m,isGenerator:w,returnType:S,generics:A||void 0,leadingComments:L,start:p,end:l}}function Nt(p,h,m){l+=h.length,d();let y=[];do{if(d(),l>=o)break;let w=i.charCodeAt(l);if(w===_||w===de)return z(),y;let E=W();if(!E)return z(),y;d();let A,O,S=!1;if(l<o&&i.charCodeAt(l)===tt){l++,d();let N=l,G=0;while(l<o){if(x())continue;let L=i.charCodeAt(l);if(L===Q||L===_||L===de||L===me)G++;else if(L===Ce||L===U||L===be||L===he&&!ke())G--;else if(G===0&&(L===Z||L===rt))break;else if(G===0&&L===$e&&!ut())break;if(G===0&&(Y()||q()))break;l++}A=g(N,l)}if(l<o&&i.charCodeAt(l)===$e)if(a&&A&&(!s||!Oh(A)))Dt();else{l++,d();let N=l,G=0,L=0,M=0;while(l<o){if(x())continue;let F=i.charCodeAt(l);if(F===Q||F===_||F===de)G++;else if(F===Ce||F===U||F===be)G--;else if(F===me&&G===0){let V=xs(l);if(V!==null)M=Math.max(0,M+V);else if(l+1>=o||i.charCodeAt(l+1)!==$e)L++}else if(F===he&&G===0&&M===0&&!ke()){if(L>0&&(l+1>=o||i.charCodeAt(l+1)!==$e))L--}else if(G===0&&L===0&&M===0&&(F===Z||F===rt))break;if(G===0&&L===0&&M===0&&(Y()||K()))break;l++}if(O=g(N,l),O.endsWith(" as const")||O==="const"){if(S=!0,!A){let F=O.endsWith(" as const")?O.slice(0,-9).trim():O,V=_i(F);A=V!=="unknown"?V:void 0}}else if(!A){let F=Pr(O);if(F)A=F}}if(l<o){let N=i.charCodeAt(l);if(N===rt){l++;continue}if(N===Z)l++}let b=Ue(p),k=`${m?"export ":""}declare ${h} ${E}: ${A||"unknown"};`;y.push({kind:"variable",name:E,text:k,isExported:m,typeAnnotation:A,value:O,modifiers:S?[h,"const assertion"]:[h],leadingComments:b,start:p,end:l});break}while(l<o);return y}function xs(p){if(i.charCodeAt(p)!==me||p+1>=o)return null;let h=i.charCodeAt(p+1);if(h===he)return 1;if(h===J)return-1;if(!kt(h))return null;let m=p+2;while(m<o){let b=i.charCodeAt(m);if(!Ke(b)&&b!==ct&&b!==58&&b!==45)break;m++}let y=i.slice(p+1,m),w=i.charCodeAt(m);if(w>32&&w!==he&&w!==J)return null;let E=0,A=0,O=m;for(;O<o;O++){let b=i.charCodeAt(O);if(A!==0){if(b===Je)O++;else if(b===A)A=0;continue}if(b===ie||b===oe||b===Te)A=b;else if(b===_)E++;else if(b===U&&E>0)E--;else if(b===he&&E===0)break}if(O>=o)return null;let S=O-1;while(S>p&&i.charCodeAt(S)<=32)S--;if(i.charCodeAt(S)===J)return 0;return i.indexOf(`</${y}`,O+1)===-1?null:1}function Hi(p,h){l+=9,d();let m=W();d();let y=lt();d();let w="";if(T("extends")){l+=7,d();let b=l,k=0;while(l<o){if(x())continue;let N=i.charCodeAt(l);if(N===me)k++;else if(N===he&&!ke())k--;else if(N===_&&k===0)break;l++}w=g(b,l)}d();let E=l<o&&i.charCodeAt(l)===_?Bi():"{}",A=Ss(E),O=`${h?"export ":""}declare interface ${m}${y}${w?` extends ${w}`:""} ${A}`,S=Ue(p);return{kind:"interface",name:m,text:O,isExported:h,extends:w||void 0,generics:y||void 0,leadingComments:S,start:p,end:l}}function ji(p,h){l+=4,d();let m=W();d();let y=lt();if(d(),l<o&&i.charCodeAt(l)===$e)l++;d();let w=l,E=0;while(l<o){if(x())continue;let b=i.charCodeAt(l);if(b===Q||b===_||b===de||b===me)E++;else if(b===Ce||b===U||b===be||b===he&&!ke())E--;else if(E===0&&b===Z)break;if(E===0&&(Y()||q()))break;l++}let A=g(w,l);if(l<o&&i.charCodeAt(l)===Z)l++;let O=`${h?"export ":""}type ${m}${y} = ${A}`,S=Ue(p);return{kind:"type",name:m,text:O,isExported:h,generics:y||void 0,leadingComments:S,start:p,end:l}}function Wt(p,h,m){l+=4,d();let y=W();d();let w=l;if(l<o&&i.charCodeAt(l)===_)Pe(_,U);let E=g(p,l),A=Ue(p);return{kind:"enum",name:y,text:E,isExported:h,modifiers:m?["const"]:void 0,leadingComments:A,start:p,end:l}}function bt(p,h,m,y=!1){l+=5,d();let w=W()||"AnonymousClass";d();let E=lt();d();let A="";if(T("extends")){l+=7,d();let N=l,G=0;while(l<o){if(x())continue;let L=i.charCodeAt(l);if(L===me)G++;else if(L===he&&!ke())G--;else if(G===0&&(L===_||T("implements")))break;l++}A=g(N,l)}let O;if(T("implements")){l+=10,d();let N=l,G=0;while(l<o){if(x())continue;let M=i.charCodeAt(l);if(M===me)G++;else if(M===he&&!ke())G--;else if(G===0&&M===_)break;l++}let L=g(N,l);if(L)O=L.split(",").map((M)=>M.trim())}d();let S=Ki(),b=`${h?y?"export default ":"export declare ":"declare "}${m?"abstract ":""}class ${w}${E}${A?` extends ${A}`:""}${O&&O.length>0?` implements ${O.join(", ")}`:""} ${S}`,k=Ue(p);return{kind:"class",name:w,text:b,isExported:h,isDefault:y,extends:A||void 0,implements:O,generics:E||void 0,modifiers:m?["abstract"]:void 0,leadingComments:k,start:p,end:l}}function Ki(){if(l>=o||i.charCodeAt(l)!==_)return"{}";l++;let p=[];while(l<o){if(d(),l>=o)break;if(i.charCodeAt(l)===U){l++;break}if(i.charCodeAt(l)===Z){l++;continue}if(T("static")&&Ts("static")===_){l+=6,d(),Pe(_,U);continue}let h=!1,m=!1,y=!1,w=!1,E=!1,A=!1,O=!1,S=!1,b=!0;while(b){if(d(),T("private")){h=!0,l+=7;continue}if(T("protected")){m=!0,l+=9;continue}if(T("public")){l+=6;continue}if(T("static")){y=!0,l+=6;continue}if(T("abstract")){w=!0,l+=8;continue}if(T("readonly")){E=!0,l+=8;continue}if(T("override")){A=!0,l+=8;continue}if(T("accessor")){O=!0,l+=8;continue}if(T("async")){S=!0,l+=5;continue}if(T("declare")){l+=7;continue}break}if(d(),l>=o||i.charCodeAt(l)===U)break;if(i.charCodeAt(l)===Ai)h=!0;if(h){Ui();continue}let k=" ";if(m)k+="protected ";if(y)k+="static ";if(w)k+="abstract ";if(E)k+="readonly ";if(T("constructor")){l+=11,d();let N=vt();if(d(),uc(N,p),l<o&&i.charCodeAt(l)===_)Pe(_,U);else if(l<o&&i.charCodeAt(l)===Z)l++;let G=Ft(N);p.push(` constructor${G};`)}else if(T("get"))if(l+=3,d(),l<o&&(kt(i.charCodeAt(l))||i.charCodeAt(l)===de||i.charCodeAt(l)===Ai)){let N=Ji();if(N.startsWith("#")){if(d(),l<o&&i.charCodeAt(l)===Q)vt();if(d(),lr(),d(),l<o&&i.charCodeAt(l)===_)Pe(_,U);else if(l<o&&i.charCodeAt(l)===Z)l++;continue}d(),vt(),d();let G=lr()||"unknown";if(d(),l<o&&i.charCodeAt(l)===_)Pe(_,U);else if(l<o&&i.charCodeAt(l)===Z)l++;p.push(`${k}get ${N}(): ${G};`)}else Rs("get",k,y,E,S,p);else if(T("set"))if(l+=3,d(),l<o&&(kt(i.charCodeAt(l))||i.charCodeAt(l)===de||i.charCodeAt(l)===Ai)){let N=Ji();if(N.startsWith("#")){if(d(),l<o&&i.charCodeAt(l)===Q)vt();if(d(),l<o&&i.charCodeAt(l)===_)Pe(_,U);else if(l<o&&i.charCodeAt(l)===Z)l++;continue}d();let G=vt();if(d(),l<o&&i.charCodeAt(l)===_)Pe(_,U);else if(l<o&&i.charCodeAt(l)===Z)l++;let L=Ft(G);p.push(`${k}set ${N}${L};`)}else Rs("set",k,y,E,S,p);else{let N=i.charCodeAt(l)===we;if(N)l++,d();let G=Ji();if(!G){Ui();continue}Os(G,k,y,E,N,w,S,p)}}return`{
|
|
123
123
|
${p.join(`
|
|
124
124
|
`)}
|
|
125
125
|
}`}function Ji(){if(l>=o)return"";let p=i.charCodeAt(l);if(p===de){let h=l;return Pe(de,be),i.slice(h,l)}if(p===Ai)return l++,`#${W()}`;return W()}function Ts(p){let h=l+p.length;while(h<o&&Fe(i.charCodeAt(h)))h++;return h<o?i.charCodeAt(h):0}function Ui(){let p=0;while(l<o){if(x())continue;let h=i.charCodeAt(l);if(h===_||h===Q)p++;else if(h===U||h===Ce){if(p===0)return;p--}else if(h===Z&&p===0){l++;return}if(p===0&&te())return;l++}}function Rs(p,h,m,y,w,E){Os(p,h,m,y,!1,!1,w,E)}function Os(p,h,m,y,w,E,A,O){if(d(),l>=o)return;let S=i.charCodeAt(l),b=!1;if(S===bi)b=!0,l++,d();if(l<o&&i.charCodeAt(l)===33)l++,d();let k=l<o?i.charCodeAt(l):0;if(k===Q||k===me){let N=k===me?lt():"";d();let G=vt();d();let L=lr(),M=L.length>0;if(!L)if(A&&w)L="AsyncGenerator<unknown, void, unknown>";else if(w)L="Generator<unknown, void, unknown>";else if(A)L="Promise<void>";else L="void";if(d(),l<o&&i.charCodeAt(l)===_){let Ae=l+1;if(Pe(_,U),!a&&!M&&!w)L=Cr(i.slice(Ae,l-1),A,G)}else if(l<o&&i.charCodeAt(l)===Z)l++;let F=Ft(G),V=b?"?":"";O.push(`${h}${p}${V}${N}${F}: ${L};`)}else if(k===tt||k===$e||k===Z||k===U||k===ne||k===pe){let N="";if(k===tt){l++,d();let M=l,F=0;while(l<o){if(x())continue;let V=i.charCodeAt(l);if(V===Q||V===_||V===de||V===me)F++;else if(V===Ce||V===U||V===be||V===he&&!ke()){if(F===0)break;F--}else if(F===0&&(V===Z||V===rt))break;else if(F===0&&V===$e&&!ut())break;if(F===0&&te())break;l++}N=g(M,l)}let G="";if(l<o&&i.charCodeAt(l)===$e)if(a&&N){l++;let M=0;while(l<o){if(x())continue;let F=i.charCodeAt(l);if(F===Q||F===_||F===de)M++;else if(F===Ce||F===U||F===be){if(M===0&&F===U)break;M--}else if(M===0&&F===Z)break;if(M===0&&te())break;l++}}else{l++,d();let M=l,F=0;while(l<o){if(x())continue;let V=i.charCodeAt(l);if(V===Q||V===_||V===de)F++;else if(V===Ce||V===U||V===be){if(F===0&&V===U)break;F--}else if(F===0&&V===Z)break;if(F===0&&te())break;l++}G=g(M,l)}if(l<o&&i.charCodeAt(l)===Z)l++;if(!N)if(G){let M=Pr(G);if(M)N=M;else N=G.endsWith("as const")||m&&y?_i(G):Vi(G)}else N="unknown";let L=b?"?":"";O.push(`${h}${p}${L}: ${N};`)}else Ui()}function uc(p,h){let m=p.slice(1,-1).trim();if(!m)return;let y=[],w=0,E=0,A=!1,O=0;for(let S=0;S<=m.length;S++){if(S===m.length){y.push(m.slice(w).trim());break}let b=m.charCodeAt(S);if(A){if(b===Je){S++;continue}if(b===O)A=!1;continue}if(b===ie||b===oe||b===Te){A=!0,O=b;continue}if(b===Q||b===_||b===de||b===me)E++;else if(b===Ce||b===U||b===be||b===he&&!(S>0&&m.charCodeAt(S-1)===$e))E--;else if(b===rt&&E===0)y.push(m.slice(w,S).trim()),w=S+1}for(let S of y){let b=S.startsWith("public ")||S.startsWith("public\t"),k=S.startsWith("protected ")||S.startsWith("protected\t"),N=S.startsWith("private ")||S.startsWith("private\t"),G=S.includes("readonly ");if(!b&&!k&&!N&&!G)continue;if(N)continue;let L=S,M=[];if(b){let Ae=6;while(Ae<L.length&&Fe(L.charCodeAt(Ae)))Ae++;L=L.slice(Ae),M.push("public")}if(k){let Ae=9;while(Ae<L.length&&Fe(L.charCodeAt(Ae)))Ae++;L=L.slice(Ae),M.push("protected")}if(G){let Ae=L.indexOf("readonly ");if(Ae!==-1){let Gt=Ae+8;while(Gt<L.length&&Fe(L.charCodeAt(Gt)))Gt++;L=L.slice(0,Ae)+L.slice(Gt)}M.push("readonly")}let F=M.length>0?`${M.join(" ")} `:"",V=bs(L);h.push(` ${F}${V};`)}}function Yi(p=" "){if(l>=o||i.charCodeAt(l)!==_)return"{}";l++;let h=[];while(l<o){if(d(),l>=o)break;if(i.charCodeAt(l)===U){l++;break}if(i.charCodeAt(l)===Z){l++;continue}let m=!1;if(T("export"))m=!0,l+=6,d();if(T("declare"))l+=7,d();let y=m?"export ":"";if(T("function")||T("async")&&hc("async","function")){let w=!1;if(T("async"))w=!0,l+=5,d();if(l+=8,d(),l<o&&i.charCodeAt(l)===we)l++,d();let E=W();d();let A=lt();d();let O=vt();d();let S=lr();if(!S)S=w?"Promise<void>":"void";if(d(),l<o&&i.charCodeAt(l)===_)Pe(_,U);else if(l<o&&i.charCodeAt(l)===Z)l++;let b=Ft(O);h.push(`${p}${y}function ${E}${A}${b}: ${S};`)}else if(T("const")||T("let")||T("var")){let w=T("const")?"const":T("let")?"let":"var";l+=w.length,d();let E=W();if(!E){z();continue}d();let A="";if(l<o&&i.charCodeAt(l)===tt){l++,d();let S=l,b=0;while(l<o){if(x())continue;let k=i.charCodeAt(l);if(k===Q||k===_||k===de||k===me)b++;else if(k===Ce||k===U||k===be||k===he&&!ke())b--;else if(b===0&&(k===Z||k===rt))break;else if(b===0&&k===$e&&!ut())break;if(b===0&&Y())break;l++}A=g(S,l)}let O="";if(l<o&&i.charCodeAt(l)===$e){l++,d();let S=l,b=0;while(l<o){if(x())continue;let k=i.charCodeAt(l);if(k===Q||k===_||k===de||k===me)b++;else if(k===Ce||k===U||k===be||k===he&&!ke())b--;else if(b===0&&(k===Z||k===rt))break;if(b===0&&Y())break;l++}O=g(S,l)}if(l<o&&i.charCodeAt(l)===Z)l++;if(!A&&O){let S=Pr(O);if(S)A=S;else if(w==="const")A=_i(O);else A=Vi(O)}if(!A)A="unknown";h.push(`${p}${y}${w} ${E}: ${A};`)}else if(T("interface")){l+=9,d();let w=W();d();let E=lt();d();let A="";if(T("extends")){l+=7,d();let S=l,b=0;while(l<o){if(x())continue;let k=i.charCodeAt(l);if(k===me)b++;else if(k===he&&!ke())b--;else if(k===_&&b===0)break;l++}A=g(S,l)}let O=Ss(Bi());h.push(`${p}${y}interface ${w}${E}${A?` extends ${A}`:""} ${O}`)}else if(T("type")){l+=4,d();let w=W();d();let E=lt();if(d(),l<o&&i.charCodeAt(l)===$e){l++,d();let A=l,O=0;while(l<o){if(x())continue;let b=i.charCodeAt(l);if(b===Q||b===_||b===de||b===me)O++;else if(b===Ce||b===U||b===be||b===he&&!ke())O--;else if(O===0&&b===Z)break;if(O===0&&Y())break;l++}let S=g(A,l);if(l<o&&i.charCodeAt(l)===Z)l++;h.push(`${p}${y}type ${w}${E} = ${S}`)}}else if(T("class")){l+=5,d();let w=W();d();let E=lt();d();let A=l,O=0;while(l<o){if(x())continue;let N=i.charCodeAt(l);if(N===me)O++;else if(N===he&&!ke())O--;else if(N===_&&O===0)break;l++}let S=g(A,l),b=S?` ${S}`:"",k=Ki();h.push(`${p}${y}class ${w}${E}${b} ${k}`)}else if(T("enum")){l+=4,d();let w=W();d();let E=Bi();h.push(`${p}${y}enum ${w} ${E}`)}else if(T("namespace")||T("module")){let w=T("namespace")?"namespace":"module";l+=w.length,d();let E=W();d();let A=Yi(p);h.push(`${p}${y}${w} ${E} ${A}`)}else if(T("abstract"))if(l+=8,d(),T("class")){l+=5,d();let w=W();d();let E=lt();d();let A=l,O=0;while(l<o){if(x())continue;let N=i.charCodeAt(l);if(N===me)O++;else if(N===he&&!ke())O--;else if(N===_&&O===0)break;l++}let S=g(A,l),b=S?` ${S}`:"",k=Ki();h.push(`${p}${y}abstract class ${w}${E}${b} ${k}`)}else z();else if(m&&T("default")){l+=7,d();let w=l;z();let E=g(w,l);if(E.charCodeAt(E.length-1)===Z)E=E.slice(0,-1);if(E)h.push(`${p}export default ${E};`)}else if(!m&&(i.charCodeAt(l)===ie||i.charCodeAt(l)===oe||i.charCodeAt(l)===Te))z();else z()}if(h.length===0)return"{}";return`{
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@stacksjs/build",
|
|
3
3
|
"type": "module",
|
|
4
4
|
"sideEffects": false,
|
|
5
|
-
"version": "0.72.
|
|
5
|
+
"version": "0.72.38",
|
|
6
6
|
"description": "The Stacks framework build tools and configurations.",
|
|
7
7
|
"author": "Chris Breuer",
|
|
8
8
|
"contributors": [
|
|
@@ -58,12 +58,12 @@
|
|
|
58
58
|
"prepublishOnly": "bun run build"
|
|
59
59
|
},
|
|
60
60
|
"dependencies": {
|
|
61
|
-
"bun-plugin-dtsx": "^0.11.
|
|
61
|
+
"bun-plugin-dtsx": "^0.11.10"
|
|
62
62
|
},
|
|
63
63
|
"devDependencies": {
|
|
64
|
-
"@stacksjs/cli": "0.72.
|
|
64
|
+
"@stacksjs/cli": "0.72.38",
|
|
65
65
|
"better-dx": "^0.2.24",
|
|
66
|
-
"@stacksjs/path": "0.72.
|
|
67
|
-
"@stacksjs/storage": "0.72.
|
|
66
|
+
"@stacksjs/path": "0.72.38",
|
|
67
|
+
"@stacksjs/storage": "0.72.38"
|
|
68
68
|
}
|
|
69
69
|
}
|