nucleus-core-ts 0.8.8 → 0.8.10
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/client.js +1 -1
- package/dist/dist/index-hhnypnb1.d.ts +494 -0
- package/dist/dist/index.d.ts +12 -475
- package/dist/index-hhnypnb1.js +1 -0
- package/dist/index.js +1 -1
- package/dist/nucleus.config.d.ts +3 -1
- package/dist/src/Client/Proxy/httpProxy.js +1 -1
- package/dist/src/Client/Proxy/index.js +1 -1
- package/dist/src/Client/Proxy/server.js +1 -1
- package/dist/src/Client/Proxy/utils.js +1 -1
- package/dist/src/Client/Proxy/wsProxy.js +1 -1
- package/package.json +1 -1
- package/scripts/build.ts +9 -0
package/dist/nucleus.config.d.ts
CHANGED
|
@@ -16,13 +16,15 @@ export declare const config: {
|
|
|
16
16
|
/** Entry Points - These become subpath exports */
|
|
17
17
|
readonly entryPoints: {
|
|
18
18
|
readonly ".": "./index.ts";
|
|
19
|
+
readonly "./client": "./client.ts";
|
|
19
20
|
};
|
|
20
21
|
/** Entry points that should be transpiled only (not bundled) - for client-side use */
|
|
21
22
|
readonly transpileOnly: {
|
|
22
|
-
readonly "./client": "./client.ts";
|
|
23
23
|
readonly "./fe": "./fe/index.ts";
|
|
24
24
|
readonly "./proxy": "./src/Client/Proxy/index.ts";
|
|
25
25
|
};
|
|
26
|
+
/** Additional directories to transpile (dependencies of transpileOnly entries) */
|
|
27
|
+
readonly transpileDirs: readonly [];
|
|
26
28
|
/** Build Configuration */
|
|
27
29
|
readonly build: {
|
|
28
30
|
readonly outDir: "dist";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x16afb9,_0xabec0d){const _0x53ffa7=_0x183e,_0x34bd9c=_0x16afb9();while(!![]){try{const _0x3ea904=-parseInt(_0x53ffa7(0x19d))/0x1+parseInt(_0x53ffa7(0x1a4))/0x2+parseInt(_0x53ffa7(0x1b4))/0x3*(parseInt(_0x53ffa7(0x1ac))/0x4)+-parseInt(_0x53ffa7(0x18b))/0x5+-parseInt(_0x53ffa7(0x1b2))/0x6*(-parseInt(_0x53ffa7(0x1b6))/0x7)+parseInt(_0x53ffa7(0x195))/0x8*(parseInt(_0x53ffa7(0x18f))/0x9)+-parseInt(_0x53ffa7(0x18a))/0xa;if(_0x3ea904===_0xabec0d)break;else _0x34bd9c['push'](_0x34bd9c['shift']());}catch(_0x21a543){_0x34bd9c['push'](_0x34bd9c['shift']());}}}(_0x4a24,0x7cdcf));import{createProxyLogger,matchPath,parseCookies,rewritePath}from'./utils';export function createHttpProxyHandler(_0x15850a){const _0x16078a=_0x183e,_0x238a6c={'aptnt':function(_0x6b4d0c,_0x271408){return _0x6b4d0c(_0x271408);},'bBORN':function(_0x11c159,_0x136549){return _0x11c159!==_0x136549;},'qMJMo':_0x16078a(0x1a9),'jBCqh':'authorization','ZAHxo':_0x16078a(0x1ba),'VtVlK':'manual','YSaVc':_0x16078a(0x1b1),'nyXiy':function(_0x38985e,_0x5e2908){return _0x38985e-_0x5e2908;},'bWpMt':_0x16078a(0x199),'QqLsU':function(_0x42c12c,_0x4c3649){return _0x42c12c===_0x4c3649;},'oTdcu':'Gateway\x20Timeout','PKdEr':'Backend\x20request\x20timed\x20out','zfZVm':_0x16078a(0x1a0),'zCNeo':_0x16078a(0x19e),'DWFKi':'HTTP\x20Proxy'},_0x23ac0e=createProxyLogger(_0x238a6c[_0x16078a(0x19a)],_0x15850a['debug']??![]);function _0x4d0eff(_0x31efac){const _0x4e3055=_0x16078a;for(const _0x2d1881 of _0x15850a['targets']){if(matchPath(_0x31efac,_0x2d1881[_0x4e3055(0x1af)]))return _0x2d1881;}return null;}function _0x279f89(_0x223d03,_0x34a941){const _0x39ba1a=_0x16078a,_0x7be5ac=_0x34a941[_0x39ba1a(0x1a2)]['replace'](/\/$/,'');let _0x405342=_0x223d03;return _0x34a941[_0x39ba1a(0x1b8)]&&(_0x405342=rewritePath(_0x223d03,_0x34a941[_0x39ba1a(0x1b8)])),''+_0x7be5ac+_0x405342;}return{async 'handle'(_0xb59bdf){const _0x39d17e=_0x16078a,_0x246fa5=new URL(_0xb59bdf[_0x39d17e(0x1a2)]),_0x2d1bcc=_0x246fa5['pathname'],_0x81284b=_0x238a6c[_0x39d17e(0x1a1)](_0x4d0eff,_0x2d1bcc);if(!_0x81284b)return null;const _0x2eb9a6=performance[_0x39d17e(0x187)](),_0x1edaf9=_0x279f89(_0x2d1bcc,_0x81284b),_0x5ec5e4=_0x246fa5['search']?''+_0x1edaf9+_0x246fa5['search']:_0x1edaf9;_0x23ac0e[_0x39d17e(0x192)]('Proxying:\x20'+_0xb59bdf['method']+'\x20'+_0x2d1bcc+_0x39d17e(0x194)+_0x5ec5e4),_0x15850a['onRequest']?.(_0x2d1bcc,_0x5ec5e4);const _0x2f0d30=new Headers(_0xb59bdf['headers']);if(_0x238a6c[_0x39d17e(0x1aa)](_0x81284b[_0x39d17e(0x198)],![])){const _0x2ac919=new URL(_0x81284b['url']);_0x2f0d30[_0x39d17e(0x1a8)]('host',_0x2ac919['host']),_0x2f0d30[_0x39d17e(0x1a8)](_0x238a6c[_0x39d17e(0x1b9)],_0x2ac919['origin']);}if(_0x81284b['injectTokenFromCookie']){const _0x2a907f=_0x238a6c[_0x39d17e(0x1a1)](parseCookies,_0xb59bdf[_0x39d17e(0x1b5)][_0x39d17e(0x18d)]('cookie')),_0x4ab0dd=_0x2a907f[_0x81284b['injectTokenFromCookie']['cookieName']];if(_0x4ab0dd){const _0x2ded71=_0x81284b['injectTokenFromCookie'][_0x39d17e(0x188)]??_0x238a6c[_0x39d17e(0x1ad)];_0x2f0d30[_0x39d17e(0x1a8)](_0x2ded71,_0x39d17e(0x189)+_0x4ab0dd),_0x23ac0e[_0x39d17e(0x192)]('Token\x20injected\x20from\x20cookie\x20to\x20'+_0x2ded71);}}if(_0x81284b['headers'])for(const [_0x108cc0,_0x4e9031]of Object['entries'](_0x81284b[_0x39d17e(0x1b5)])){_0x2f0d30['set'](_0x108cc0,_0x4e9031);}_0x2f0d30['delete'](_0x238a6c[_0x39d17e(0x191)]);try{const _0x3b87de=new AbortController(),_0x37e2d4=_0x81284b['timeout']??0x7530,_0x443af0=setTimeout(()=>{const _0x1401fe=_0x39d17e;_0x3b87de[_0x1401fe(0x1a5)]();},_0x37e2d4),_0x1405ae={};_0x1405ae[_0x39d17e(0x196)]=_0xb59bdf['method'],_0x1405ae[_0x39d17e(0x1b5)]=_0x2f0d30,_0x1405ae['body']=_0xb59bdf[_0x39d17e(0x197)],_0x1405ae['signal']=_0x3b87de[_0x39d17e(0x18c)],_0x1405ae[_0x39d17e(0x19f)]=_0x81284b[_0x39d17e(0x1a6)]===![]?_0x238a6c[_0x39d17e(0x18e)]:_0x238a6c[_0x39d17e(0x1b7)];const _0x46809b=await fetch(_0x5ec5e4,_0x1405ae);_0x238a6c['aptnt'](clearTimeout,_0x443af0);const _0x14fb50=_0x238a6c[_0x39d17e(0x186)](performance['now'](),_0x2eb9a6);_0x23ac0e['info'](_0x39d17e(0x1a3)+_0x46809b[_0x39d17e(0x19c)]+'\x20('+_0x14fb50[_0x39d17e(0x193)](0x0)+_0x39d17e(0x19b)),_0x15850a['onResponse']?.(_0x2d1bcc,_0x46809b['status'],_0x14fb50);const _0xcc774c=new Headers(_0x46809b[_0x39d17e(0x1b5)]);return _0xcc774c[_0x39d17e(0x1b3)](_0x238a6c['bWpMt']),_0xcc774c['delete'](_0x39d17e(0x1b0)),new Response(_0x46809b[_0x39d17e(0x197)],{'status':_0x46809b['status'],'statusText':_0x46809b['statusText'],'headers':_0xcc774c});}catch(_0x366a49){const _0x1a4af7=_0x238a6c[_0x39d17e(0x186)](performance[_0x39d17e(0x187)](),_0x2eb9a6),_0x105e6a=_0x366a49 instanceof Error?_0x366a49:new Error(String(_0x366a49));if(_0x238a6c[_0x39d17e(0x1bb)](_0x105e6a['name'],'AbortError')){_0x23ac0e[_0x39d17e(0x185)]('Timeout\x20after\x20'+_0x1a4af7['toFixed'](0x0)+_0x39d17e(0x1ab)+_0x2d1bcc),_0x15850a['onError']?.(new Error('Request\x20timeout'),_0x2d1bcc,0x1f8);const _0x49243c={};_0x49243c['error']=_0x238a6c[_0x39d17e(0x1a7)],_0x49243c[_0x39d17e(0x1ae)]=_0x238a6c['PKdEr'];const _0x221b89={};_0x221b89[_0x39d17e(0x190)]=_0x39d17e(0x19e);const _0x2bd845={};return _0x2bd845['status']=0x1f8,_0x2bd845['headers']=_0x221b89,new Response(JSON['stringify'](_0x49243c),_0x2bd845);}_0x23ac0e[_0x39d17e(0x185)]('Error:\x20'+_0x2d1bcc,_0x105e6a[_0x39d17e(0x1ae)]),_0x15850a['onError']?.(_0x105e6a,_0x2d1bcc,0x1f6);const _0x53cae1={};_0x53cae1['error']=_0x238a6c['zfZVm'],_0x53cae1['message']=_0x105e6a[_0x39d17e(0x1ae)];const _0x27ba0d={};_0x27ba0d[_0x39d17e(0x190)]=_0x238a6c['zCNeo'];const _0x2ab6e8={};return _0x2ab6e8[_0x39d17e(0x19c)]=0x1f6,_0x2ab6e8[_0x39d17e(0x1b5)]=_0x27ba0d,new Response(JSON['stringify'](_0x53cae1),_0x2ab6e8);}}};}function _0x183e(_0x2d597a,_0x22a656){_0x2d597a=_0x2d597a-0x185;const _0x4a24c2=_0x4a24();let _0x183e23=_0x4a24c2[_0x2d597a];if(_0x183e['WqGuvE']===undefined){var _0x35cc22=function(_0x49b940){const _0x27d7ba='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x13d3ea='',_0x36b2fd='';for(let _0x1365ff=0x0,_0x13a144,_0x3307ad,_0x49aa98=0x0;_0x3307ad=_0x49b940['charAt'](_0x49aa98++);~_0x3307ad&&(_0x13a144=_0x1365ff%0x4?_0x13a144*0x40+_0x3307ad:_0x3307ad,_0x1365ff++%0x4)?_0x13d3ea+=String['fromCharCode'](0xff&_0x13a144>>(-0x2*_0x1365ff&0x6)):0x0){_0x3307ad=_0x27d7ba['indexOf'](_0x3307ad);}for(let _0x423178=0x0,_0x46f458=_0x13d3ea['length'];_0x423178<_0x46f458;_0x423178++){_0x36b2fd+='%'+('00'+_0x13d3ea['charCodeAt'](_0x423178)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x36b2fd);};_0x183e['EUazLf']=_0x35cc22,_0x183e['CCCFlS']={},_0x183e['WqGuvE']=!![];}const _0x1779db=_0x4a24c2[0x0],_0x3ee69f=_0x2d597a+_0x1779db,_0x1207af=_0x183e['CCCFlS'][_0x3ee69f];return!_0x1207af?(_0x183e23=_0x183e['EUazLf'](_0x183e23),_0x183e['CCCFlS'][_0x3ee69f]=_0x183e23):_0x183e23=_0x1207af,_0x183e23;}function _0x4a24(){const _0x1cc4af=['Ag9ZDa','uxfmC1u','zxjYB3i','BNLyAxK','BM93','AgvHzgvYtMfTzq','qMvHCMvYia','ntyZnda2menVzvbTvW','nda5ntGWwgzSvufO','C2LNBMfS','z2v0','vNrwBeS','ntiWmNr4qLb5CW','q29UDgvUDc1uExbL','wKfiEg8','Aw5MBW','Dg9gAxHLza','ic0+ia','mtm2odHysfrlvNq','Bwv0Ag9K','yM9KEq','y2HHBMDLt3jPz2LU','y29UDgvUDc1LBMnVzgLUzW','rfDgs2K','BxmP','C3rHDhvZ','nJu0mJi1twLHzwDA','yxbWBgLJyxrPB24VANnVBG','CMvKAxjLy3q','qMfKieDHDgv3yxK','yxb0BNq','DxjS','uMvZCg9UC2u6ia','nZq5mJy0s3b1thzf','ywjVCNq','zM9SBg93uMvKAxjLy3rZ','B1rKy3u','C2v0','B3jPz2LU','yKjpuK4','Bxm6ia','ntaWCNjsuxvt','AKjdCwG','BwvZC2fNzq','Cgf0Ahm','DhjHBNnMzxiTzw5JB2rPBMC','zM9SBg93','nLzhz2XAEa','zgvSzxrL','mZC3mwLREhreqq','AgvHzgvYCW','mJaZmtG5n1rOtLfTzG','wvnHvMm','Cgf0AfjLD3jPDgu','Cu1ktw8'];_0x4a24=function(){return _0x1cc4af;};return _0x4a24();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4ee6e3,_0xd4e51f){var _0x3be2e7=_0x6c73,_0x516555=_0x4ee6e3();while(!![]){try{var _0x14eee2=parseInt(_0x3be2e7(0x169))/0x1*(-parseInt(_0x3be2e7(0x171))/0x2)+parseInt(_0x3be2e7(0x16b))/0x3*(-parseInt(_0x3be2e7(0x16e))/0x4)+-parseInt(_0x3be2e7(0x174))/0x5*(parseInt(_0x3be2e7(0x16c))/0x6)+-parseInt(_0x3be2e7(0x16d))/0x7*(parseInt(_0x3be2e7(0x173))/0x8)+parseInt(_0x3be2e7(0x16f))/0x9*(-parseInt(_0x3be2e7(0x172))/0xa)+parseInt(_0x3be2e7(0x170))/0xb+parseInt(_0x3be2e7(0x16a))/0xc;if(_0x14eee2===_0xd4e51f)break;else _0x516555['push'](_0x516555['shift']());}catch(_0x1b96e9){_0x516555['push'](_0x516555['shift']());}}}(_0x19e9,0x3375f));export{createHttpProxyHandler}from'./httpProxy';export{createProxyServer,defaultProxyConfig}from'./server';export{addQueryParam,createProxyLogger,globToRegex,httpToWs,loadEnvFile,matchPath,parseCookies,rewritePath,sanitizeForLog,wsToHttp}from'./utils';function _0x19e9(){var _0x10260e=['mtyYmdyZmg9VyKzbva','nJyZmtrJsePRrxi','mZa2mdGWz1rpCMjq','ntm2t29Tv3bL','ndq1r3jOrg1H','oeXuuMn0Dq','mta4nJK1nJrbCvv2zK8','nZG1mtLoEvPdDhq','mZy3ogXis1vfAa','mJK1mtLjBhL6CfG','mZjQtKzeCNK','oufiBxnHsq'];_0x19e9=function(){return _0x10260e;};return _0x19e9();}function _0x6c73(_0x3cc6e5,_0x36308d){_0x3cc6e5=_0x3cc6e5-0x169;var _0x19e936=_0x19e9();var _0x6c7314=_0x19e936[_0x3cc6e5];if(_0x6c73['XITeFM']===undefined){var _0x31e6d2=function(_0x5d0e72){var _0x2267c6='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';var _0xbbf531='',_0x11b029='';for(var _0x1801de=0x0,_0x29849f,_0xfbbc47,_0x2c3a0c=0x0;_0xfbbc47=_0x5d0e72['charAt'](_0x2c3a0c++);~_0xfbbc47&&(_0x29849f=_0x1801de%0x4?_0x29849f*0x40+_0xfbbc47:_0xfbbc47,_0x1801de++%0x4)?_0xbbf531+=String['fromCharCode'](0xff&_0x29849f>>(-0x2*_0x1801de&0x6)):0x0){_0xfbbc47=_0x2267c6['indexOf'](_0xfbbc47);}for(var _0x4059fa=0x0,_0x46bc28=_0xbbf531['length'];_0x4059fa<_0x46bc28;_0x4059fa++){_0x11b029+='%'+('00'+_0xbbf531['charCodeAt'](_0x4059fa)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x11b029);};_0x6c73['hDEIwy']=_0x31e6d2,_0x6c73['EwHAwM']={},_0x6c73['XITeFM']=!![];}var _0x57ae65=_0x19e936[0x0],_0x466dd6=_0x3cc6e5+_0x57ae65,_0x827c7a=_0x6c73['EwHAwM'][_0x466dd6];return!_0x827c7a?(_0x6c7314=_0x6c73['hDEIwy'](_0x6c7314),_0x6c73['EwHAwM'][_0x466dd6]=_0x6c7314):_0x6c7314=_0x827c7a,_0x6c7314;}export{createWsProxyHandler,startWsProxyServer}from'./wsProxy';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const _0xa685bd=_0x3efe;(function(_0x5587b8,_0x4e57b2){const _0x1e3b2e=_0x3efe,_0x50776b=_0x5587b8();while(!![]){try{const _0x58c099=parseInt(_0x1e3b2e(0xd7))/0x1*(parseInt(_0x1e3b2e(0xd9))/0x2)+parseInt(_0x1e3b2e(0xc2))/0x3*(-parseInt(_0x1e3b2e(0xb7))/0x4)+-parseInt(_0x1e3b2e(0xca))/0x5+-parseInt(_0x1e3b2e(0xcf))/0x6+parseInt(_0x1e3b2e(0xb6))/0x7+parseInt(_0x1e3b2e(0xc9))/0x8+-parseInt(_0x1e3b2e(0xd8))/0x9*(parseInt(_0x1e3b2e(0xbd))/0xa);if(_0x58c099===_0x4e57b2)break;else _0x50776b['push'](_0x50776b['shift']());}catch(_0x74dd93){_0x50776b['push'](_0x50776b['shift']());}}}(_0x5489,0x2fa3e));import{createHttpProxyHandler}from'./httpProxy';import{createProxyLogger,loadEnvFile}from'./utils';import{createWsProxyHandler}from'./wsProxy';export async function createProxyServer(_0x33c526){const _0x5e5ec3=_0x3efe,_0x487ff4={'JfuXg':function(_0x5a9b04,_0x1d236c){return _0x5a9b04===_0x1d236c;},'CmeLg':_0x5e5ec3(0xbb),'DIJgD':function(_0x4cb314,_0x47decc){return _0x4cb314===_0x47decc;},'GOxEz':function(_0x49b417,_0x3bc400){return _0x49b417 instanceof _0x3bc400;},'sstsI':'No\x20matching\x20proxy\x20target\x20for\x20this\x20request','tAbZg':_0x5e5ec3(0xba),'CskcV':'0.0.0.0','FHYzL':_0x5e5ec3(0xb8),'GUpQx':_0x5e5ec3(0xe1),'klnYZ':function(_0x50661b,_0x501a52){return _0x50661b(_0x501a52);},'OSSpK':function(_0x49e907,_0x5085db){return _0x49e907(_0x5085db);}},_0x3f241f=_0x33c526[_0x5e5ec3(0xc8)]??0xfa0,_0x746e03=_0x33c526['hostname']??_0x487ff4[_0x5e5ec3(0xc7)],_0x67939c=_0x33c526['dev']??process[_0x5e5ec3(0xc6)][_0x5e5ec3(0xcd)]!==_0x487ff4[_0x5e5ec3(0xde)],_0xf0c41c=createProxyLogger(_0x487ff4[_0x5e5ec3(0xdf)],_0x67939c);_0x33c526[_0x5e5ec3(0xdb)]&&await _0x487ff4['klnYZ'](loadEnvFile,_0x33c526[_0x5e5ec3(0xdb)]);_0xf0c41c['info']('Starting\x20proxy\x20server...'),_0xf0c41c['info']('\x20\x20-\x20hostname:\x20'+_0x746e03),_0xf0c41c[_0x5e5ec3(0xd6)](_0x5e5ec3(0xd1)+_0x3f241f),_0xf0c41c[_0x5e5ec3(0xd6)](_0x5e5ec3(0xda)+_0x67939c);const _0x272524=_0x33c526['ws']?_0x487ff4['klnYZ'](createWsProxyHandler,{..._0x33c526['ws'],'debug':_0x33c526['ws'][_0x5e5ec3(0xc1)]??_0x67939c}):null,_0x45aad3=_0x33c526['http']?_0x487ff4[_0x5e5ec3(0xbc)](createHttpProxyHandler,{..._0x33c526[_0x5e5ec3(0xc5)],'debug':_0x33c526[_0x5e5ec3(0xc5)][_0x5e5ec3(0xc1)]??_0x67939c}):null;if(_0x272524&&_0x33c526['ws']?.[_0x5e5ec3(0xcc)]){_0xf0c41c['info']('\x20\x20-\x20WebSocket\x20targets:\x20'+_0x33c526['ws'][_0x5e5ec3(0xcc)][_0x5e5ec3(0xcb)]);for(const _0x11858d of _0x33c526['ws']['targets']){_0xf0c41c['info'](_0x5e5ec3(0xbf)+_0x11858d[_0x5e5ec3(0xc4)]+':\x20'+_0x11858d['paths'][_0x5e5ec3(0xc3)](',\x20'));}}if(_0x45aad3&&_0x33c526['http']?.['targets']){_0xf0c41c[_0x5e5ec3(0xd6)]('\x20\x20-\x20HTTP\x20targets:\x20'+_0x33c526[_0x5e5ec3(0xc5)][_0x5e5ec3(0xcc)][_0x5e5ec3(0xcb)]);for(const _0xcece90 of _0x33c526[_0x5e5ec3(0xc5)]['targets']){_0xf0c41c['info'](_0x5e5ec3(0xbf)+_0xcece90['url']+':\x20'+_0xcece90['paths'][_0x5e5ec3(0xc3)](',\x20'));}}const _0x192999={};_0x192999['open']=function(){},_0x192999[_0x5e5ec3(0xce)]=function(){},_0x192999['close']=function(){},_0x192999['drain']=function(){};const _0xe419c8=Bun['serve']({'port':_0x3f241f,'hostname':_0x746e03,async 'fetch'(_0x1ea843,_0x2b65bb){const _0x196071=_0x5e5ec3;if(_0x487ff4['JfuXg'](_0x1ea843['headers']['get'](_0x487ff4[_0x196071(0xd2)])?.['toLowerCase'](),'websocket')){if(_0x272524){const _0x28cfbb=_0x272524['upgrade'](_0x1ea843,_0x2b65bb);if(_0x487ff4['DIJgD'](_0x28cfbb,!![]))return undefined;if(_0x487ff4['GOxEz'](_0x28cfbb,Response))return _0x28cfbb;}}if(_0x45aad3){const _0x63cf0b=await _0x45aad3['handle'](_0x1ea843);if(_0x63cf0b)return _0x63cf0b;}const _0x4e959a={};_0x4e959a[_0x196071(0xb9)]=_0x196071(0xdd),_0x4e959a['message']=_0x487ff4['sstsI'];const _0x4d55f7={};_0x4d55f7[_0x196071(0xd4)]=_0x487ff4['tAbZg'];const _0x1f11c3={};return _0x1f11c3[_0x196071(0xbe)]=0x194,_0x1f11c3[_0x196071(0xd0)]=_0x4d55f7,new Response(JSON[_0x196071(0xdc)](_0x4e959a),_0x1f11c3);},'websocket':_0x272524?.['websocket']??_0x192999});_0xf0c41c[_0x5e5ec3(0xd6)]('>\x20Ready\x20on\x20http://'+_0x746e03+':'+_0x3f241f);const _0x2da991={};return _0x2da991[_0x5e5ec3(0xc8)]=_0x3f241f,_0x2da991[_0x5e5ec3(0xd3)]=_0x746e03,_0x33c526['onReady']?.(_0x2da991),_0xe419c8;}const _0x14b3b4={};function _0x5489(){const _0x3be26c=['otG2oteWAu92zwTL','BgvUz3rO','DgfYz2v0CW','tK9erv9ftLy','BwvZC2fNzq','mta2mJu4mLHbEK1TCG','AgvHzgvYCW','icaTihbVCNq6ia','q21LtgC','Ag9ZDg5HBwu','q29UDgvUDc1uExbL','CMvQzwn0vw5RBM93BG','Aw5MBW','mZmXnJq5z2rgA0Xx','ouLoB3HZua','mKDsrNLhAW','icaTigrLDJOG','zw52ugf0Aa','C3rYAw5NAwz5','tM90iezVDw5K','rKHzEKW','r1vWuxG','mc4WlJaUma','uhjVEhKGu2vYDMvY','mJe1mJy5nMHqshPowG','mtK0ntjNvLL6zfq','ChjVzhvJDgLVBG','zxjYB3i','yxbWBgLJyxrPB24VANnVBG','DxbNCMfKzq','t1ntCeS','mtyZnZKXmhrHrKPwvG','C3rHDhvZ','icaGic0G','zgv2','zgvIDwC','odDts3bcCgq','AM9PBG','DxjS','Ahr0Ca','zw52','q3nRy1y','Cg9YDa','mtG4mJaZmNnrsNHzta'];_0x5489=function(){return _0x3be26c;};return _0x5489();}_0x14b3b4[_0xa685bd(0xcc)]=[],_0x14b3b4[_0xa685bd(0xc1)]=![],_0x14b3b4['allowHmr']=!![],_0x14b3b4[_0xa685bd(0xd5)]=!![];const _0x4ad214={};_0x4ad214['targets']=[],_0x4ad214['debug']=![];const _0x2a91d9={};function _0x3efe(_0x43aa9,_0x19beaf){_0x43aa9=_0x43aa9-0xb6;const _0x548996=_0x5489();let _0x3efefc=_0x548996[_0x43aa9];if(_0x3efe['kaLuaI']===undefined){var _0x5c8794=function(_0x292878){const _0x4f5b00='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x15b8cd='',_0x3c6c30='';for(let _0x587e89=0x0,_0x50c2f1,_0x27b947,_0x1d15a5=0x0;_0x27b947=_0x292878['charAt'](_0x1d15a5++);~_0x27b947&&(_0x50c2f1=_0x587e89%0x4?_0x50c2f1*0x40+_0x27b947:_0x27b947,_0x587e89++%0x4)?_0x15b8cd+=String['fromCharCode'](0xff&_0x50c2f1>>(-0x2*_0x587e89&0x6)):0x0){_0x27b947=_0x4f5b00['indexOf'](_0x27b947);}for(let _0xaa9bb4=0x0,_0xe04519=_0x15b8cd['length'];_0xaa9bb4<_0xe04519;_0xaa9bb4++){_0x3c6c30+='%'+('00'+_0x15b8cd['charCodeAt'](_0xaa9bb4)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x3c6c30);};_0x3efe['wWSKBH']=_0x5c8794,_0x3efe['ayhCUo']={},_0x3efe['kaLuaI']=!![];}const _0x563971=_0x548996[0x0],_0x45f944=_0x43aa9+_0x563971,_0x31c265=_0x3efe['ayhCUo'][_0x45f944];return!_0x31c265?(_0x3efefc=_0x3efe['wWSKBH'](_0x3efefc),_0x3efe['ayhCUo'][_0x45f944]=_0x3efefc):_0x3efefc=_0x31c265,_0x3efefc;}_0x2a91d9[_0xa685bd(0xc8)]=0xfa0,_0x2a91d9['hostname']=_0xa685bd(0xe0),_0x2a91d9[_0xa685bd(0xc0)]=process['env'][_0xa685bd(0xcd)]!==_0xa685bd(0xb8),_0x2a91d9['ws']=_0x14b3b4,_0x2a91d9[_0xa685bd(0xc5)]=_0x4ad214;export const defaultProxyConfig=_0x2a91d9;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function _0x1bc9(_0x449d3e,_0x300898){_0x449d3e=_0x449d3e-0x148;const _0x58a7ac=_0x58a7();let _0x1bc9b6=_0x58a7ac[_0x449d3e];if(_0x1bc9['GFIgka']===undefined){var _0x19c45a=function(_0x438755){const _0xc6bd32='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x3bdfa2='',_0x1af16f='';for(let _0x3b5ffc=0x0,_0x33d936,_0x43a9a3,_0x53d523=0x0;_0x43a9a3=_0x438755['charAt'](_0x53d523++);~_0x43a9a3&&(_0x33d936=_0x3b5ffc%0x4?_0x33d936*0x40+_0x43a9a3:_0x43a9a3,_0x3b5ffc++%0x4)?_0x3bdfa2+=String['fromCharCode'](0xff&_0x33d936>>(-0x2*_0x3b5ffc&0x6)):0x0){_0x43a9a3=_0xc6bd32['indexOf'](_0x43a9a3);}for(let _0x5998d8=0x0,_0x45ebcb=_0x3bdfa2['length'];_0x5998d8<_0x45ebcb;_0x5998d8++){_0x1af16f+='%'+('00'+_0x3bdfa2['charCodeAt'](_0x5998d8)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x1af16f);};_0x1bc9['WZYlnY']=_0x19c45a,_0x1bc9['AefnZo']={},_0x1bc9['GFIgka']=!![];}const _0x4960d4=_0x58a7ac[0x0],_0x43adf1=_0x449d3e+_0x4960d4,_0x2609d5=_0x1bc9['AefnZo'][_0x43adf1];return!_0x2609d5?(_0x1bc9b6=_0x1bc9['WZYlnY'](_0x1bc9b6),_0x1bc9['AefnZo'][_0x43adf1]=_0x1bc9b6):_0x1bc9b6=_0x2609d5,_0x1bc9b6;}(function(_0x2c9362,_0x30c27d){const _0x34ca83=_0x1bc9,_0x22e985=_0x2c9362();while(!![]){try{const _0x3c6e5e=parseInt(_0x34ca83(0x153))/0x1*(-parseInt(_0x34ca83(0x148))/0x2)+parseInt(_0x34ca83(0x152))/0x3*(-parseInt(_0x34ca83(0x160))/0x4)+parseInt(_0x34ca83(0x159))/0x5+-parseInt(_0x34ca83(0x15a))/0x6+parseInt(_0x34ca83(0x163))/0x7+-parseInt(_0x34ca83(0x15d))/0x8*(parseInt(_0x34ca83(0x15c))/0x9)+parseInt(_0x34ca83(0x164))/0xa;if(_0x3c6e5e===_0x30c27d)break;else _0x22e985['push'](_0x22e985['shift']());}catch(_0x1e34e6){_0x22e985['push'](_0x22e985['shift']());}}}(_0x58a7,0x798f6));export function parseCookies(_0x20a125){const _0x3c4d1a=_0x1bc9,_0x6d09af={};_0x6d09af[_0x3c4d1a(0x156)]=function(_0x379539,_0x1bd6cf){return _0x379539>_0x1bd6cf;};const _0x43ac4d=_0x6d09af,_0x358d5e={};if(!_0x20a125)return _0x358d5e;for(const _0x54561c of _0x20a125[_0x3c4d1a(0x158)](';')){const [_0x36c80c,..._0x23cb3e]=_0x54561c[_0x3c4d1a(0x154)]()[_0x3c4d1a(0x158)]('=');_0x36c80c&&_0x43ac4d['cUUmy'](_0x23cb3e[_0x3c4d1a(0x155)],0x0)&&(_0x358d5e[_0x36c80c]=decodeURIComponent(_0x23cb3e[_0x3c4d1a(0x15b)]('=')));}return _0x358d5e;}export function globToRegex(_0x2693d7){const _0x10a4af=_0x1bc9,_0x200a7c={};_0x200a7c[_0x10a4af(0x15e)]='\x5c$&';const _0x2b38a2=_0x200a7c;let _0x657139=_0x2693d7[_0x10a4af(0x14a)](/:[\w]+\*/g,'*');return _0x657139=_0x657139['replace'](/[.+?^${}()|[\]\\]/g,_0x2b38a2['LCVxx']),_0x657139=_0x657139[_0x10a4af(0x14a)](/\*/g,'.*'),new RegExp('^'+_0x657139+'$');}export function matchPath(_0x35d5f2,_0x164d3b){const _0x46a0c1=_0x1bc9;for(const _0x105a75 of _0x164d3b){const _0x5031e5=globToRegex(_0x105a75);if(_0x5031e5[_0x46a0c1(0x162)](_0x35d5f2))return!![];}return![];}export function rewritePath(_0x2495b8,_0x3ad534){const _0x480802=_0x1bc9,_0x1c835e={'bBeHO':function(_0x4aff70,_0x239de6){return _0x4aff70(_0x239de6);}};for(const [_0x24de59,_0x23ba18]of Object[_0x480802(0x157)](_0x3ad534)){const _0x4e7d76=_0x1c835e[_0x480802(0x15f)](globToRegex,_0x24de59);if(_0x4e7d76['test'](_0x2495b8)){const _0x4546fd=_0x24de59[_0x480802(0x14a)](/\*.*$/,''),_0x45a9a6=_0x23ba18['replace'](/\*.*$/,'');return _0x2495b8['replace'](_0x4546fd,_0x45a9a6);}}return _0x2495b8;}export function addQueryParam(_0x4370a9,_0x197a49,_0x1288df){const _0x913821={'EMtyR':function(_0x232422,_0x229441){return _0x232422(_0x229441);}},_0x4d78c4=_0x4370a9['includes']('?')?'&':'?';return''+_0x4370a9+_0x4d78c4+_0x913821['EMtyR'](encodeURIComponent,_0x197a49)+'='+encodeURIComponent(_0x1288df);}export function httpToWs(_0x4773b3){return _0x4773b3['replace'](/^http/,'ws');}export function wsToHttp(_0x121515){const _0x230a65=_0x1bc9,_0x1d71d6={};_0x1d71d6[_0x230a65(0x149)]='http';const _0x4006bb=_0x1d71d6;return _0x121515[_0x230a65(0x14a)](/^ws/,_0x4006bb[_0x230a65(0x149)]);}export function createProxyLogger(_0x27cb87,_0xec4a24){return{'info':(..._0x393fd1)=>{const _0x13e77a=_0x1bc9;_0xec4a24&&console[_0x13e77a(0x161)]('['+_0x27cb87+']',..._0x393fd1);},'warn':(..._0x2ad9d8)=>{const _0xd49fdd=_0x1bc9;console[_0xd49fdd(0x14b)]('['+_0x27cb87+']',..._0x2ad9d8);},'error':(..._0x126f5c)=>{const _0x5ede83=_0x1bc9;console[_0x5ede83(0x14c)]('['+_0x27cb87+']',..._0x126f5c);}};}function _0x58a7(){const _0x3eb887=['ntC0mtqWwvbqrxHA','AM9PBG','ou5VELLSqW','ndi5otGXnKD3DxLrsa','tenwEhG','yKjLse8','mJC1nda0ngngsvzkua','Bg9N','DgvZDa','nJe1ntC0nfbVAvjOwq','mtyWnZK0odbpDermyMG','mLHoB2LZCG','ww1bvNu','CMvWBgfJzq','D2fYBG','zxjYB3i','yu9ztwG','zMLSzq','zxHPC3rZ','C2XPy2u','Dgv4Da','m0X3CKPyDq','nZG5mdq3shj5Aujx','DhjPBq','BgvUz3rO','y1vvBxK','zw50CMLLCW','C3bSAxq','nJa2ndC1s2DXAu94'];_0x58a7=function(){return _0x3eb887;};return _0x58a7();}export async function loadEnvFile(_0x224a64){const _0x2f2672=_0x1bc9;try{const _0x163a0a=Bun[_0x2f2672(0x14e)](_0x224a64),_0x3b57ac=await _0x163a0a[_0x2f2672(0x14f)]();if(!_0x3b57ac)return;const _0x17d8b1=await _0x163a0a[_0x2f2672(0x151)]();for(const _0x417fbf of _0x17d8b1[_0x2f2672(0x158)]('\x0a')){const _0x138128=_0x417fbf['trim']();if(_0x138128&&!_0x138128['startsWith']('#')){const [_0x18b318,..._0x3c3635]=_0x138128[_0x2f2672(0x158)]('='),_0x3fe9e1=_0x3c3635[_0x2f2672(0x15b)]('=')['replace'](/^["']|["']$/g,'');_0x18b318&&!process['env'][_0x18b318]&&(process['env'][_0x18b318]=_0x3fe9e1);}}}catch{}}export function sanitizeForLog(_0x25fe32,_0x4d7402=0x32){const _0x34d5aa=_0x1bc9,_0x2c8445={};_0x2c8445[_0x34d5aa(0x14d)]=function(_0x14ca77,_0x26d660){return _0x14ca77<=_0x26d660;};const _0x24dcae=_0x2c8445;if(_0x24dcae['aOYMh'](_0x25fe32[_0x34d5aa(0x155)],_0x4d7402))return _0x25fe32;return _0x25fe32[_0x34d5aa(0x150)](0x0,_0x4d7402)+'...';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function _0x5e26(){const _0x22fcbe=['t1bftG','Aw5MBW','qMfJA2vUzcbJB25Uzwn0zwq6ia','vvjkq0G','tuLezvq','C2v0','zgf0yq','otG5ndK4s3riA1D6','nde1uePyAffM','tM90igeGv2vIu29JA2v0ihjLCxvLC3q','Cgf0Ag5HBwu','se1sigj5CgfZCZOG','sMP3vwy','ywXSB3DiBxi','y29VA2LLtMfTzq','yMfJA2vUzfDZ','C3rHCNrZv2L0Aa','zvDfBwi','mZe3ntmYovfRB0XKtW','B25pCgvU','mc4WlJaUma','mtfUyMTxs0i','vg9Rzw4GAw5Qzwn0zwqGzNjVBsbJB29RAwu','CMvHzhLtDgf0zq','l19UzxH0l3DLyNbHy2STAg1Y','zgvIDwC','DgfYz2v0','yxjYyxLcDwzMzxi','mta1odiZmgTpz2HXDW','q2XPzw50ignSB3nLzdOG','ic0+ia','w1DtifbYB3H5xsbtDgfYDgvKig9Uia','ChvZAa','C2vUza','DxbNCMfKzq','nZyWmJzRqwj3tgK','yNvMzMvY','ALbvwvK','mtGWmta3odHYrKzgC2y','ne1dBgvfsa','mtiWnduYnxzXywj0Aq','B25VCgvU','Cgf0AfjLD3jPDgu','Bg9N','v1mGuhjVEhK','mJq0mJnlq1DYt2W','Aw5Qzwn0vg9Rzw5gCM9Tq29VA2LL','Cgf0Aa','D2fYBG','v2vIu29JA2v0ihbHDgGGBM90igzVDw5K','qMfJA2vUzcbJBg9Zzwq6ia','mZC1mNfLuKngva','DxjS','otLgC2zWvNK'];_0x5e26=function(){return _0x22fcbe;};return _0x5e26();}(function(_0x5a17ee,_0xd521e2){const _0x5591e4=_0xab72,_0x91dfd4=_0x5a17ee();while(!![]){try{const _0x155126=parseInt(_0x5591e4(0x208))/0x1+-parseInt(_0x5591e4(0x1e7))/0x2+parseInt(_0x5591e4(0x1f2))/0x3*(parseInt(_0x5591e4(0x207))/0x4)+-parseInt(_0x5591e4(0x1e8))/0x5*(-parseInt(_0x5591e4(0x203))/0x6)+parseInt(_0x5591e4(0x20d))/0x7*(-parseInt(_0x5591e4(0x213))/0x8)+-parseInt(_0x5591e4(0x215))/0x9*(-parseInt(_0x5591e4(0x1fc))/0xa)+parseInt(_0x5591e4(0x1f5))/0xb*(-parseInt(_0x5591e4(0x206))/0xc);if(_0x155126===_0xd521e2)break;else _0x91dfd4['push'](_0x91dfd4['shift']());}catch(_0x3dbd4a){_0x91dfd4['push'](_0x91dfd4['shift']());}}}(_0x5e26,0xceb85));import{addQueryParam,createProxyLogger,httpToWs,matchPath,parseCookies,rewritePath}from'./utils';function _0xab72(_0x2d05ce,_0x132398){_0x2d05ce=_0x2d05ce-0x1e4;const _0x5e265e=_0x5e26();let _0xab72b1=_0x5e265e[_0x2d05ce];if(_0xab72['lVuNJZ']===undefined){var _0x403424=function(_0x1f256a){const _0x3b6d8c='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0xa9e696='',_0x39a4ea='';for(let _0x5137e2=0x0,_0x37c800,_0x48be1b,_0x250de4=0x0;_0x48be1b=_0x1f256a['charAt'](_0x250de4++);~_0x48be1b&&(_0x37c800=_0x5137e2%0x4?_0x37c800*0x40+_0x48be1b:_0x48be1b,_0x5137e2++%0x4)?_0xa9e696+=String['fromCharCode'](0xff&_0x37c800>>(-0x2*_0x5137e2&0x6)):0x0){_0x48be1b=_0x3b6d8c['indexOf'](_0x48be1b);}for(let _0x5e90bd=0x0,_0x23111f=_0xa9e696['length'];_0x5e90bd<_0x23111f;_0x5e90bd++){_0x39a4ea+='%'+('00'+_0xa9e696['charCodeAt'](_0x5e90bd)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x39a4ea);};_0xab72['gUuapE']=_0x403424,_0xab72['cOTZPD']={},_0xab72['lVuNJZ']=!![];}const _0x13ff43=_0x5e265e[0x0],_0x35dc17=_0x2d05ce+_0x13ff43,_0x5e430a=_0xab72['cOTZPD'][_0x35dc17];return!_0x5e430a?(_0xab72b1=_0xab72['gUuapE'](_0xab72b1),_0xab72['cOTZPD'][_0x35dc17]=_0xab72b1):_0xab72b1=_0x5e430a,_0xab72b1;}export function createWsProxyHandler(_0x25773c){const _0x73fe8f=_0xab72,_0xf9f4c8={'urbuQ':'http','URJCH':function(_0xff9959,_0x430333,_0x391187){return _0xff9959(_0x430333,_0x391187);},'hokcL':_0x73fe8f(0x1f8),'lkvib':function(_0x138706,_0x1bc4e4){return _0x138706!==_0x1bc4e4;},'cyLvm':function(_0xb5dad9,_0x26e9cb){return _0xb5dad9(_0x26e9cb);},'JjwUf':function(_0x240ced,_0x5384ea,_0x3c6002,_0x2fc90c,_0x495ab4){return _0x240ced(_0x5384ea,_0x3c6002,_0x2fc90c,_0x495ab4);},'eWEmb':function(_0x17f494,_0x5af8bb){return _0x17f494===_0x5af8bb;},'jPUYY':function(_0xee705c,_0x3da6c4){return _0xee705c instanceof _0x3da6c4;},'MIDeT':function(_0x307793,_0x5c7aa4){return _0x307793 instanceof _0x5c7aa4;}},_0x59baf3=_0xf9f4c8[_0x73fe8f(0x219)](createProxyLogger,_0x73fe8f(0x20c),_0x25773c[_0x73fe8f(0x1f9)]??![]);function _0x172aff(_0x3bda35){for(const _0x153cd7 of _0x25773c['targets']){if(matchPath(_0x3bda35,_0x153cd7['paths']))return _0x153cd7;}return null;}function _0x296d96(_0x28023a,_0x55e249,_0x11a0e5,_0x10242e){const _0x22129d=_0x73fe8f;let _0x115a4c=_0x55e249['url']['replace'](/\/$/,'');_0x115a4c[_0x22129d(0x1f0)](_0xf9f4c8['urbuQ'])&&(_0x115a4c=httpToWs(_0x115a4c));let _0x1d01d7=_0x28023a;_0x55e249['pathRewrite']&&(_0x1d01d7=_0xf9f4c8['URJCH'](rewritePath,_0x28023a,_0x55e249[_0x22129d(0x20a)]));let _0x10aac7=''+_0x115a4c+_0x1d01d7;const _0x374713=_0x10242e['toString']();_0x374713&&(_0x10aac7=_0x10aac7+'?'+_0x374713);if(_0x55e249['injectTokenFromCookie']){const _0x29df49=_0x11a0e5[_0x55e249['injectTokenFromCookie'][_0x22129d(0x1ee)]];if(_0x29df49){const _0x550b3f=_0x55e249[_0x22129d(0x20e)]['queryParam']??'token';_0x10aac7=addQueryParam(_0x10aac7,_0x550b3f,_0x29df49),_0x59baf3[_0x22129d(0x217)](_0x22129d(0x1f6));}}return _0x10aac7;}return{'upgrade'(_0x19f6cf,_0x51502a){const _0x413281=_0x73fe8f,_0x2fe6ab=new URL(_0x19f6cf[_0x413281(0x214)]),_0x5d2ffc=_0x2fe6ab[_0x413281(0x1ea)];if(_0x25773c[_0x413281(0x1ed)]!==![]&&_0x5d2ffc['startsWith'](_0xf9f4c8['hokcL']))return _0x59baf3['info'](_0x413281(0x1eb)+_0x5d2ffc),![];const _0x4d4279=_0x172aff(_0x5d2ffc);if(!_0x4d4279){if(_0xf9f4c8['lkvib'](_0x25773c['rejectUnknown'],![])){_0x59baf3[_0x413281(0x210)]('No\x20target\x20found\x20for:\x20'+_0x5d2ffc);const _0x3f2a52={};return _0x3f2a52['status']=0x194,new Response(_0x413281(0x211),_0x3f2a52);}return![];}const _0x3fd957=_0xf9f4c8['cyLvm'](parseCookies,_0x19f6cf['headers']['get']('cookie')),_0x254b4c=_0xf9f4c8[_0x413281(0x1ec)](_0x296d96,_0x5d2ffc,_0x4d4279,_0x3fd957,_0x2fe6ab['searchParams']);_0x59baf3['info']('Upgrading:\x20'+_0x5d2ffc+_0x413281(0x1fe)+_0x254b4c);const _0x450d4b={};_0x450d4b[_0x413281(0x1ef)]=null,_0x450d4b['path']=_0x5d2ffc,_0x450d4b['target']=_0x254b4c,_0x450d4b['buffer']=[];const _0xb539a7={};_0xb539a7[_0x413281(0x1e6)]=_0x450d4b;const _0x1ecb67=_0x51502a[_0x413281(0x202)](_0x19f6cf,_0xb539a7);return _0x1ecb67;},'websocket':{'open'(_0x287003){const _0x11a168=_0x73fe8f,_0x3bf856=_0x287003['data'],_0x5b83b8=new WebSocket(_0x3bf856['target']);_0x5b83b8[_0x11a168(0x209)]=()=>{const _0x127195=_0x11a168;_0x59baf3['info'](_0x127195(0x218)+_0x3bf856['path']),_0x25773c[_0x127195(0x1f3)]?.(_0x3bf856['path'],_0x3bf856[_0x127195(0x1fa)]);for(const _0x4d5283 of _0x3bf856['buffer']){_0x5b83b8[_0x127195(0x201)](_0x4d5283);}_0x3bf856[_0x127195(0x204)]=[];},_0x5b83b8['onmessage']=_0xb8ea3d=>{const _0x32f628=_0x11a168;if(_0xf9f4c8[_0x32f628(0x1f1)](typeof _0xb8ea3d['data'],'string'))_0x287003['send'](_0xb8ea3d[_0x32f628(0x1e6)]);else{if(_0xf9f4c8[_0x32f628(0x205)](_0xb8ea3d[_0x32f628(0x1e6)],ArrayBuffer))_0x287003['send'](new Uint8Array(_0xb8ea3d['data']));else _0xf9f4c8[_0x32f628(0x1e4)](_0xb8ea3d[_0x32f628(0x1e6)],Blob)&&_0xb8ea3d['data'][_0x32f628(0x1fb)]()['then'](_0x1ac8e0=>{const _0x26999c=_0x32f628;_0x287003[_0x26999c(0x201)](new Uint8Array(_0x1ac8e0));});}},_0x5b83b8['onerror']=_0x143890=>{const _0x2e6d03=_0x11a168,_0x4bd88c=new Error('Backend\x20WebSocket\x20error');_0x59baf3['error']('Backend\x20error:\x20'+_0x3bf856[_0x2e6d03(0x20f)],_0x143890),_0x25773c['onError']?.(_0x4bd88c,_0x3bf856[_0x2e6d03(0x20f)]);},_0x5b83b8['onclose']=()=>{const _0x58a0be=_0x11a168;_0x59baf3[_0x58a0be(0x217)](_0x58a0be(0x212)+_0x3bf856[_0x58a0be(0x20f)]),_0x25773c['onClose']?.(_0x3bf856['path']),_0x287003['close']();},_0x3bf856[_0x11a168(0x1ef)]=_0x5b83b8;},'message'(_0x2aaccc,_0xf0e167){const _0x3d60dc=_0x73fe8f,_0x1f1e75=_0x2aaccc['data'];if(_0x1f1e75[_0x3d60dc(0x1ef)]?.[_0x3d60dc(0x1f7)]===WebSocket[_0x3d60dc(0x216)])_0x1f1e75[_0x3d60dc(0x1ef)]['send'](_0xf0e167);else{if(_0xf9f4c8[_0x3d60dc(0x1f1)](typeof _0xf0e167,'string'))_0x1f1e75[_0x3d60dc(0x204)][_0x3d60dc(0x200)](_0xf0e167);else{const _0x4354a5=new ArrayBuffer(_0xf0e167['byteLength']);new Uint8Array(_0x4354a5)[_0x3d60dc(0x1e5)](new Uint8Array(_0xf0e167)),_0x1f1e75['buffer']['push'](_0x4354a5);}}},'close'(_0x6c6a6a){const _0x25713d=_0x73fe8f,_0x25aec9=_0x6c6a6a['data'];_0x59baf3['info'](_0x25713d(0x1fd)+_0x25aec9[_0x25713d(0x20f)]),_0x25aec9['backendWs']&&_0x25aec9[_0x25713d(0x1ef)]['close']();},'drain'(_0x2b5fae){}}};}export function startWsProxyServer(_0xee09b0){const _0x23eecd=_0xab72,_0x25d47e={'yPiPE':function(_0x574848,_0x44cecb){return _0x574848(_0x44cecb);},'aIcTw':_0x23eecd(0x1f4)},_0xc9bf6=_0x25d47e['yPiPE'](createWsProxyHandler,_0xee09b0),_0x3e2ff7=_0xee09b0['port']??0xfa1,_0x34de81=_0xee09b0['hostname']??_0x25d47e['aIcTw'],_0x38a073=Bun['serve']({'port':_0x3e2ff7,'hostname':_0x34de81,'fetch'(_0x3b5d41,_0x262bf2){const _0x2dc98d=_0x23eecd,_0x3bccd1=_0xc9bf6['upgrade'](_0x3b5d41,_0x262bf2);if(_0x3bccd1===!![])return undefined;if(_0x3bccd1 instanceof Response)return _0x3bccd1;const _0x264b0a={};return _0x264b0a['status']=0x190,new Response(_0x2dc98d(0x1e9),_0x264b0a);},'websocket':_0xc9bf6['websocket']});return console[_0x23eecd(0x20b)](_0x23eecd(0x1ff)+_0x34de81+':'+_0x3e2ff7),_0x38a073;}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nucleus-core-ts",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.10",
|
|
4
4
|
"description": "Production-ready, enterprise-grade TypeScript framework for building multi-tenant APIs",
|
|
5
5
|
"author": "Hidayet Can Özcan <hidayetcan@gmail.com>",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE",
|
package/scripts/build.ts
CHANGED
|
@@ -95,6 +95,15 @@ async function transpileClientModules() {
|
|
|
95
95
|
}
|
|
96
96
|
}
|
|
97
97
|
|
|
98
|
+
// Transpile additional directories (dependencies)
|
|
99
|
+
const transpileDirs = config.transpileDirs || [];
|
|
100
|
+
for (const srcDir of transpileDirs) {
|
|
101
|
+
log.info(` Transpiling dependency: ${srcDir}`);
|
|
102
|
+
await $`bunx @swc/cli ${srcDir} -d ${config.build.outDir} -C jsc.parser.syntax=typescript -C jsc.parser.tsx=true -C jsc.target=es2020 -C module.type=es6 -C jsc.transform.react.runtime=automatic`.quiet().catch((e) => {
|
|
103
|
+
log.warn(`swc warning: ${e}`);
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
|
|
98
107
|
log.success("Client modules transpiled");
|
|
99
108
|
}
|
|
100
109
|
|