nucleus-core-ts 0.8.3 → 0.8.5

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.
@@ -0,0 +1,8 @@
1
+ interface PageProps {
2
+ params: Promise<{
3
+ tablename: string;
4
+ }>;
5
+ }
6
+ export default function TablenamePage({ params }: PageProps): import("react/jsx-runtime").JSX.Element;
7
+ export {};
8
+ //# sourceMappingURL=page.d.ts.map
@@ -0,0 +1,2 @@
1
+ export default function Authorization(): import("react/jsx-runtime").JSX.Element;
2
+ //# sourceMappingURL=page.d.ts.map
@@ -0,0 +1,2 @@
1
+ export default function Users(): import("react/jsx-runtime").JSX.Element;
2
+ //# sourceMappingURL=page.d.ts.map
@@ -2,7 +2,28 @@ import { type AllGeneratedEndpointsWithEntityTypes, type InferEntity } from "nuc
2
2
  import { config } from "./config";
3
3
  type Entities = typeof config.entities;
4
4
  export type Entity<TName extends string> = InferEntity<Entities, TName>;
5
- declare const extraEndpoints: {};
5
+ declare const extraEndpoints: {
6
+ GET_WEATHER: {
7
+ method: "GET";
8
+ path: string;
9
+ isPublic: boolean;
10
+ _payload: {
11
+ city: string;
12
+ units?: string;
13
+ } | undefined;
14
+ _success: {
15
+ main: {
16
+ temp: number;
17
+ };
18
+ weather: {
19
+ description: string;
20
+ }[];
21
+ } | undefined;
22
+ _error: {
23
+ message: string;
24
+ } | undefined;
25
+ };
26
+ };
6
27
  type ExtraEndpointsType = typeof extraEndpoints;
7
28
  export type AllEndpoints = AllGeneratedEndpointsWithEntityTypes<typeof config.entities, ExtraEndpointsType>;
8
29
  export declare const endpoints: AllEndpoints;
@@ -1 +1 @@
1
- const _0xba884d=_0x51b2;(function(_0x1ec507,_0xbeeffe){const _0x1b8a06=_0x51b2,_0x126c4c=_0x1ec507();while(!![]){try{const _0x44251a=-parseInt(_0x1b8a06(0xed))/0x1+parseInt(_0x1b8a06(0xdd))/0x2*(-parseInt(_0x1b8a06(0x120))/0x3)+-parseInt(_0x1b8a06(0x11b))/0x4*(-parseInt(_0x1b8a06(0x101))/0x5)+-parseInt(_0x1b8a06(0xfd))/0x6*(parseInt(_0x1b8a06(0xc1))/0x7)+-parseInt(_0x1b8a06(0xca))/0x8+parseInt(_0x1b8a06(0xe4))/0x9+parseInt(_0x1b8a06(0xf3))/0xa;if(_0x44251a===_0xbeeffe)break;else _0x126c4c['push'](_0x126c4c['shift']());}catch(_0x4beb2c){_0x126c4c['push'](_0x126c4c['shift']());}}}(_0x418b,0xd8d07));function _0x418b(){const _0x10c8ca=['zMLSzq','tLjlC28','mtqWotCXmdvgsgvUBNy','qMfKieDHDgv3yxK','Cgf0Aa','Aw5JBhvKzxm','Cg9YDa','C2LNBMfS','zNbQDM8','uhjVEhKGu2vYDMvY','icaTigrLDJOG','oda4mdi3tKrgs3vi','CxvLCNLqyxjHBq','qNnvtLa','B3jPz2LU','C3bSAxq','BwvZC2fNzq','mZaZnJi1nJbnDvHLv1u','qMfJA2vUzcbJB25Uzwn0zwq6ia','y29VA2LLtMfTzq','zgf0yq','AM9PBG','BxmP','y29VA2LL','Dg9gAxHLza','B25szxf1zxn0','yNvMzMvY','mtC0tgf6Dfjt','ENnVD2G','C2vHCMnO','pIbszwfKEsbVBIbODhrWoI8V','odvnu0r3EuW','icaTieHuvfaGDgfYz2v0CZOG','B25TzxnZywDL','B1zyswm','C3rYAw5NAwz5','DgHLBG','Aw5Qzwn0vg9Rzw5gCM9Tq29VA2LL','Ahr0Ca','Bg9N','CwLUq04','tM8GDgfYz2v0igzVDw5KigzVCJOG','B25szwfKEq','qKXYtMm','CMvHzhLtDgf0zq','zw50CMLLCW','tMXLwhG','yxbWBgLJyxrPB24VANnVBG','Cgf0Ahm','rvzKuu0','uhjVEhLPBMC6ia','B3bLBG','yNzXAKm','zgv2','vxbNCMfKAw5NoIa','CMvQzwn0vw5RBM93BG','DxjS','mJe3oti4vKjzug9i','D2vIC29JA2v0','BM93','zg1Qqxe','r2f0zxDHEsbuAw1LB3v0','ndK2ndm2nfzXzeH1Da','B25JBg9Zzq','icaGic0G','B25dBg9Zzq','BgvUz3rO','C2v0','q29UDgvUDc1uExbL','Ag9ZDa','ic0+ia','icaTihbVCNq6ia','DgfYz2v0','yMfJA2vUzfDZ','y2XVC2u','C3rYAw5N','Dgv4Da','zxjYB3i','zM9SBg93','zw52','uuH2uum','mJq2mteZDwfPveji','xcqM','DgvZDa','qwjVCNrfCNjVCG','DxbNCMfKzq','C2vUza','C3rHDhvZ','C3rHCNrZv2L0Aa','C2vYDMu','oti2nJm4nhLjyuDprq','AgvHzgvYCW','Cgf0AfjLD3jPDgu','zgvIDwC','qMfJA2vUzcbLCNjVCJOG','z2v0','Ag9ZDg5HBwu','CMvWBgfJzq','z0LYsfC','mc4WlJaUma','D2fYBG','t1bftG','Cgf0Ag5HBwu','DhjPBq','y2z0qMK','r3L4Chi','zxHPC3rZ','AgfUzgXL','Aw5MBW','mLbQwwDIsG','DgLTzw91Da','B25fCNjVCG','B25szxnWB25Zzq','DgfYz2v0CW'];_0x418b=function(){return _0x10c8ca;};return _0x418b();}import'../../../index-0yyw12k6.js';function h(_0x56b4a1){const _0x14f324=_0x51b2;let _0x43531c={};if(!_0x56b4a1)return _0x43531c;for(let _0x2abdfa of _0x56b4a1[_0x14f324(0xf1)](';')){let [_0xa85874,..._0x5f521b]=_0x2abdfa[_0x14f324(0xd7)]()['split']('=');if(_0xa85874&&_0x5f521b[_0x14f324(0x124)]>0x0)_0x43531c[_0xa85874]=decodeURIComponent(_0x5f521b['join']('='));}return _0x43531c;}function b(_0x39f85c){const _0x4be26a=_0x51b2,_0x5086ff={};_0x5086ff[_0x4be26a(0xe3)]=_0x4be26a(0xc2);const _0x52544b=_0x5086ff;let _0x267f90=_0x39f85c['replace'](/:[\w]+\*/g,'*');return _0x267f90=_0x267f90[_0x4be26a(0xd1)](/[.+?^${}()|[\]\\]/g,_0x52544b['NRKso']),_0x267f90=_0x267f90['replace'](/\*/g,'.*'),new RegExp('^'+_0x267f90+'$');}function x(_0x3f4b7d,_0x143849){const _0x2d1cf6=_0x51b2,_0x39d817={'BsUNP':function(_0x4c2152,_0x53a54e){return _0x4c2152(_0x53a54e);}};for(let _0x15675b of _0x143849)if(_0x39d817[_0x2d1cf6(0xef)](b,_0x15675b)[_0x2d1cf6(0xc3)](_0x3f4b7d))return!0x0;return!0x1;}function P(_0x3c5543,_0x4d7b82){const _0x30aaec=_0x51b2,_0x28a286={'dmjAq':function(_0x5f178a,_0x4b9dbb){return _0x5f178a(_0x4b9dbb);}};for(let [_0x5b69a7,_0x5456b9]of Object[_0x30aaec(0x10f)](_0x4d7b82))if(_0x28a286[_0x30aaec(0x11e)](b,_0x5b69a7)['test'](_0x3c5543)){let _0x5f3677=_0x5b69a7['replace'](/\*.*$/,''),_0x543d02=_0x5456b9[_0x30aaec(0xd1)](/\*.*$/,'');return _0x3c5543[_0x30aaec(0xd1)](_0x5f3677,_0x543d02);}return _0x3c5543;}function $(_0x5e2bad,_0x19ab5a,_0x26c48b){const _0x22395d=_0x51b2,_0x11e337={'zsowh':function(_0x516c23,_0x23ab58){return _0x516c23(_0x23ab58);}};let _0x2e09df=_0x5e2bad[_0x22395d(0xe7)]('?')?'&':'?';return''+_0x5e2bad+_0x2e09df+_0x11e337[_0x22395d(0xfe)](encodeURIComponent,_0x19ab5a)+'='+encodeURIComponent(_0x26c48b);}function S(_0x29560a){return _0x29560a['replace'](/^http/,'ws');}function C(_0x4e76e5){const _0x4e04a1=_0x51b2;return _0x4e76e5[_0x4e04a1(0xd1)](/^ws/,'http');}function _0x51b2(_0x308421,_0x4dd59f){_0x308421=_0x308421-0xbe;const _0x418bcb=_0x418b();let _0x51b276=_0x418bcb[_0x308421];if(_0x51b2['bhFaPg']===undefined){var _0xa712da=function(_0x119fd1){const _0x48eede='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x62443d='',_0xfcbe85='';for(let _0x1c4d75=0x0,_0x2998f3,_0x521733,_0x1eebbe=0x0;_0x521733=_0x119fd1['charAt'](_0x1eebbe++);~_0x521733&&(_0x2998f3=_0x1c4d75%0x4?_0x2998f3*0x40+_0x521733:_0x521733,_0x1c4d75++%0x4)?_0x62443d+=String['fromCharCode'](0xff&_0x2998f3>>(-0x2*_0x1c4d75&0x6)):0x0){_0x521733=_0x48eede['indexOf'](_0x521733);}for(let _0x1d4b0d=0x0,_0x7d8172=_0x62443d['length'];_0x1d4b0d<_0x7d8172;_0x1d4b0d++){_0xfcbe85+='%'+('00'+_0x62443d['charCodeAt'](_0x1d4b0d)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0xfcbe85);};_0x51b2['aWyIuT']=_0xa712da,_0x51b2['uwmpGg']={},_0x51b2['bhFaPg']=!![];}const _0x4d5ac3=_0x418bcb[0x0],_0x5ea820=_0x308421+_0x4d5ac3,_0x375951=_0x51b2['uwmpGg'][_0x5ea820];return!_0x375951?(_0x51b276=_0x51b2['aWyIuT'](_0x51b276),_0x51b2['uwmpGg'][_0x5ea820]=_0x51b276):_0x51b276=_0x375951,_0x51b276;}function y(_0x24c080,_0x418027){return{'info':(..._0x28f7e0)=>{const _0x192d77=_0x51b2;if(_0x418027)console[_0x192d77(0x109)]('['+_0x24c080+']',..._0x28f7e0);},'warn':(..._0x20793b)=>{const _0x5d8f50=_0x51b2;console[_0x5d8f50(0xd4)]('['+_0x24c080+']',..._0x20793b);},'error':(..._0x271c51)=>{console['error']('['+_0x24c080+']',..._0x271c51);}};}async function W(_0x4168c8){const _0x446128=_0x51b2;try{let _0x281ecf=Bun[_0x446128(0xe2)](_0x4168c8);if(!await _0x281ecf[_0x446128(0xda)]())return;let _0x3192c9=await _0x281ecf[_0x446128(0x12e)]();for(let _0x510563 of _0x3192c9['split']('\x0a')){let _0x56b7bf=_0x510563['trim']();if(_0x56b7bf&&!_0x56b7bf['startsWith']('#')){let [_0x41c5fd,..._0x5521bb]=_0x56b7bf['split']('='),_0x312e09=_0x5521bb[_0x446128(0xf7)]('=')[_0x446128(0xd1)](/^["']|["']$/g,'');if(_0x41c5fd&&!process[_0x446128(0xbf)][_0x41c5fd])process['env'][_0x41c5fd]=_0x312e09;}}}catch{}}function v(_0x4db7ac,_0x43034b=0x32){const _0x5c616b=_0x51b2;if(_0x4db7ac[_0x5c616b(0x124)]<=_0x43034b)return _0x4db7ac;return _0x4db7ac['slice'](0x0,_0x43034b)+'...';}function T(_0x5031d2){const _0xb61552=_0x51b2,_0x5ecc4a={'gjQpI':function(_0x48ac79,_0x41013b,_0x28ff67){return _0x48ac79(_0x41013b,_0x28ff67);},'PnjuU':function(_0x146683,_0x2985db){return _0x146683!==_0x2985db;},'pZtIw':_0xb61552(0x127),'Zjauv':function(_0x5172a8,_0x7c525d){return _0x5172a8(_0x7c525d);},'gIrHW':'authorization','kKlUi':function(_0x5c435a,_0xb1aa85,_0x35754f){return _0x5c435a(_0xb1aa85,_0x35754f);},'qinCN':function(_0x49787b,_0x52943e){return _0x49787b===_0x52943e;},'FRrtA':function(_0xb9fd92,_0x3f68aa){return _0xb9fd92-_0x3f68aa;},'mOTCr':'content-encoding','ycetg':'transfer-encoding','QHvQC':function(_0x128bcc,_0x3502cb){return _0x128bcc instanceof _0x3502cb;},'cftBi':_0xb61552(0xc4),'NleXx':function(_0x2726d3,_0x46bba5){return _0x2726d3(_0x46bba5);},'BLrNc':function(_0x2645fa,_0x363b22,_0x36e122){return _0x2645fa(_0x363b22,_0x36e122);}};let _0x2e73ef=_0x5ecc4a[_0xb61552(0x10d)](y,'HTTP\x20Proxy',_0x5031d2[_0xb61552(0xcd)]??!0x1);function _0x1590e8(_0x3e846c){for(let _0x23ddca of _0x5031d2['targets'])if(x(_0x3e846c,_0x23ddca['paths']))return _0x23ddca;return null;}function _0xab4915(_0x4fe296,_0x59957c){let _0x5117b0=_0x59957c['url']['replace'](/\/$/,''),_0x9eac5c=_0x4fe296;if(_0x59957c['pathRewrite'])_0x9eac5c=_0x5ecc4a['gjQpI'](P,_0x4fe296,_0x59957c['pathRewrite']);return''+_0x5117b0+_0x9eac5c;}return{async 'handle'(_0x1c44fd){const _0x52bdf5=_0xb61552;let _0x2bcf16=new URL(_0x1c44fd[_0x52bdf5(0x11a)]),_0x54678c=_0x2bcf16[_0x52bdf5(0xd6)],_0x147a4c=_0x1590e8(_0x54678c);if(!_0x147a4c)return null;let _0x493473=performance[_0x52bdf5(0x11d)](),_0xdb4c83=_0xab4915(_0x54678c,_0x147a4c),_0x1c4a7a=_0x2bcf16['search']?''+_0xdb4c83+_0x2bcf16[_0x52bdf5(0xff)]:_0xdb4c83;_0x2e73ef['info'](_0x52bdf5(0x114)+_0x1c44fd['method']+'\x20'+_0x54678c+_0x52bdf5(0x128)+_0x1c4a7a),_0x5031d2[_0x52bdf5(0xfb)]?.(_0x54678c,_0x1c4a7a);let _0x3f1955=new Headers(_0x1c44fd['headers']);if(_0x5ecc4a['PnjuU'](_0x147a4c['changeOrigin'],!0x1)){let _0x292db7=new URL(_0x147a4c['url']);_0x3f1955['set'](_0x5ecc4a['pZtIw'],_0x292db7['host']),_0x3f1955[_0x52bdf5(0x125)]('origin',_0x292db7[_0x52bdf5(0xf0)]);}if(_0x147a4c['injectTokenFromCookie']){let _0x77c9a3=_0x5ecc4a['Zjauv'](h,_0x1c44fd['headers'][_0x52bdf5(0xcf)](_0x52bdf5(0xf9)))[_0x147a4c[_0x52bdf5(0x107)]['cookieName']];if(_0x77c9a3){let _0x293176=_0x147a4c[_0x52bdf5(0x107)]['headerName']??_0x5ecc4a[_0x52bdf5(0xd2)];_0x3f1955[_0x52bdf5(0x125)](_0x293176,'Bearer\x20'+_0x77c9a3),_0x2e73ef['info']('Token\x20injected\x20from\x20cookie\x20to\x20'+_0x293176);}}if(_0x147a4c['headers']){for(let [_0x1c19a8,_0x3351bb]of Object[_0x52bdf5(0x10f)](_0x147a4c[_0x52bdf5(0xcb)]))_0x3f1955[_0x52bdf5(0x125)](_0x1c19a8,_0x3351bb);}_0x3f1955['delete'](_0x52bdf5(0x127));try{let _0xacb23=new AbortController(),_0x2d9896=_0x147a4c[_0x52bdf5(0xde)]??0x7530,_0x49dbcb=_0x5ecc4a['kKlUi'](setTimeout,()=>{_0xacb23['abort']();},_0x2d9896),_0x4578af=await fetch(_0x1c4a7a,{'method':_0x1c44fd['method'],'headers':_0x3f1955,'body':_0x1c44fd['body'],'signal':_0xacb23[_0x52bdf5(0xe9)],'redirect':_0x5ecc4a['qinCN'](_0x147a4c['followRedirects'],!0x1)?'manual':_0x52bdf5(0xbe)});clearTimeout(_0x49dbcb);let _0x15494e=_0x5ecc4a['FRrtA'](performance[_0x52bdf5(0x11d)](),_0x493473);_0x2e73ef['info']('Response:\x20'+_0x4578af['status']+'\x20('+_0x15494e['toFixed'](0x0)+_0x52bdf5(0xf8)),_0x5031d2[_0x52bdf5(0xe0)]?.(_0x54678c,_0x4578af[_0x52bdf5(0xc7)],_0x15494e);let _0x513ee4=new Headers(_0x4578af[_0x52bdf5(0xcb)]);return _0x513ee4['delete'](_0x5ecc4a['mOTCr']),_0x513ee4['delete'](_0x5ecc4a['ycetg']),new Response(_0x4578af['body'],{'status':_0x4578af[_0x52bdf5(0xc7)],'statusText':_0x4578af['statusText'],'headers':_0x513ee4});}catch(_0x5dcc77){let _0x33b7ed=performance['now']()-_0x493473,_0x185e5d=_0x5ecc4a[_0x52bdf5(0xc0)](_0x5dcc77,Error)?_0x5dcc77:_0x5ecc4a['Zjauv'](Error,_0x5ecc4a['Zjauv'](String,_0x5dcc77));const _0x1bc0db={};_0x1bc0db['error']=_0x52bdf5(0x11f),_0x1bc0db['message']='Backend\x20request\x20timed\x20out';const _0x3cdd3d={};_0x3cdd3d[_0x52bdf5(0x126)]=_0x52bdf5(0x111);const _0x5aa0f5={};_0x5aa0f5['status']=0x1f8,_0x5aa0f5['headers']=_0x3cdd3d;if(_0x5ecc4a[_0x52bdf5(0x10a)](_0x185e5d['name'],_0x5ecc4a[_0x52bdf5(0xd8)]))return _0x2e73ef[_0x52bdf5(0x12f)]('Timeout\x20after\x20'+_0x33b7ed[_0x52bdf5(0xfa)](0x0)+'ms:\x20'+_0x54678c),_0x5031d2['onError']?.(_0x5ecc4a[_0x52bdf5(0x110)](Error,'Request\x20timeout'),_0x54678c,0x1f8),new Response(JSON[_0x52bdf5(0x105)](_0x1bc0db),_0x5aa0f5);const _0x2b6aec={};_0x2b6aec['Content-Type']='application/json';const _0x37ccc6={};return _0x37ccc6[_0x52bdf5(0xc7)]=0x1f6,_0x37ccc6[_0x52bdf5(0xcb)]=_0x2b6aec,(_0x2e73ef['error']('Error:\x20'+_0x54678c,_0x185e5d[_0x52bdf5(0xf2)]),_0x5031d2[_0x52bdf5(0xdf)]?.(_0x185e5d,_0x54678c,0x1f6),new Response(JSON['stringify']({'error':_0x52bdf5(0xe5),'message':_0x185e5d[_0x52bdf5(0xf2)]}),_0x37ccc6));}}};}function k(_0x2f75bb){const _0x1b3097=_0x51b2,_0x588fc2={'oVXIc':function(_0xe6098a,_0x458357,_0x4e4b85){return _0xe6098a(_0x458357,_0x4e4b85);},'eCGDq':'/_next/webpack-hmr','fpjvo':function(_0xaf27f6,_0x8c3c36){return _0xaf27f6(_0x8c3c36);},'zGrbP':function(_0x574aea,_0xd2bbc1){return _0x574aea!==_0xd2bbc1;},'MqmUK':function(_0xb0edaa,_0x42d787,_0xe973f4,_0x74b006,_0x5cacc1){return _0xb0edaa(_0x42d787,_0xe973f4,_0x74b006,_0x5cacc1);},'Gyxpr':'string','MLHma':function(_0x3e184c,_0x1eecc3){return _0x3e184c===_0x1eecc3;}};let _0x3df69a=_0x588fc2[_0x1b3097(0x104)](y,'WS\x20Proxy',_0x2f75bb['debug']??!0x1);function _0x10fb78(_0x1ac69c){const _0x3a9e25=_0x1b3097;for(let _0x4d050d of _0x2f75bb[_0x3a9e25(0xe1)])if(x(_0x1ac69c,_0x4d050d[_0x3a9e25(0x112)]))return _0x4d050d;return null;}function _0x43cd76(_0x1ae6b6,_0x46848b,_0x975c22,_0x4e1f15){const _0x3ed144=_0x1b3097;let _0x2f0d0a=_0x46848b[_0x3ed144(0x11a)][_0x3ed144(0xd1)](/\/$/,'');if(_0x2f0d0a[_0x3ed144(0xc8)](_0x3ed144(0x108)))_0x2f0d0a=S(_0x2f0d0a);let _0x5516db=_0x1ae6b6;if(_0x46848b['pathRewrite'])_0x5516db=_0x588fc2[_0x3ed144(0x104)](P,_0x1ae6b6,_0x46848b[_0x3ed144(0xcc)]);let _0x3f64fe=''+_0x2f0d0a+_0x5516db,_0xaf2bbc=_0x4e1f15['toString']();if(_0xaf2bbc)_0x3f64fe=_0x3f64fe+'?'+_0xaf2bbc;if(_0x46848b[_0x3ed144(0x107)]){let _0x4e5795=_0x975c22[_0x46848b['injectTokenFromCookie'][_0x3ed144(0xf5)]];if(_0x4e5795){let _0x135cee=_0x46848b[_0x3ed144(0x107)][_0x3ed144(0xee)]??'token';_0x3f64fe=$(_0x3f64fe,_0x135cee,_0x4e5795),_0x3df69a['info']('Token\x20injected\x20from\x20cookie');}}return _0x3f64fe;}return{'upgrade'(_0x116abe,_0xd838e1){const _0x4b2e38=_0x1b3097;let _0x291a0a=new URL(_0x116abe['url']),_0xd21552=_0x291a0a['pathname'];if(_0x2f75bb['allowHmr']!==!0x1&&_0xd21552['startsWith'](_0x588fc2['eCGDq']))return _0x3df69a[_0x4b2e38(0xdc)]('HMR\x20bypass:\x20'+_0xd21552),!0x1;let _0x291585=_0x588fc2[_0x4b2e38(0xea)](_0x10fb78,_0xd21552);if(!_0x291585){const _0x3f023c={};_0x3f023c[_0x4b2e38(0xc7)]=0x194;if(_0x588fc2['zGrbP'](_0x2f75bb[_0x4b2e38(0x119)],!0x1))return _0x3df69a[_0x4b2e38(0xd4)](_0x4b2e38(0x10b)+_0xd21552),new Response('WebSocket\x20path\x20not\x20found',_0x3f023c);return!0x1;}let _0xbbba8a=h(_0x116abe[_0x4b2e38(0xcb)]['get'](_0x4b2e38(0xf9))),_0x30c80c=_0x588fc2['MqmUK'](_0x43cd76,_0xd21552,_0x291585,_0xbbba8a,_0x291a0a['searchParams']);return _0x3df69a['info'](_0x4b2e38(0x118)+_0xd21552+'\x20->\x20'+_0x30c80c),_0xd838e1['upgrade'](_0x116abe,{'data':{'backendWs':null,'path':_0xd21552,'target':_0x30c80c,'buffer':[]}});},'websocket':{'open'(_0x4be8e3){const _0x17a662=_0x1b3097;let _0x46c11e=_0x4be8e3[_0x17a662(0xf6)],_0x4deb60=new WebSocket(_0x46c11e[_0x17a662(0x12a)]);_0x4deb60['onopen']=()=>{const _0x425b42=_0x17a662;_0x3df69a[_0x425b42(0xdc)](_0x425b42(0xf4)+_0x46c11e['path']),_0x2f75bb['onOpen']?.(_0x46c11e[_0x425b42(0xe6)],_0x46c11e['target']);for(let _0x135710 of _0x46c11e['buffer'])_0x4deb60[_0x425b42(0xc6)](_0x135710);_0x46c11e[_0x425b42(0xfc)]=[];},_0x4deb60[_0x17a662(0x103)]=_0x49cfae=>{const _0x5bae4c=_0x17a662;if(typeof _0x49cfae[_0x5bae4c(0xf6)]===_0x588fc2[_0x5bae4c(0xd9)])_0x4be8e3[_0x5bae4c(0xc6)](_0x49cfae[_0x5bae4c(0xf6)]);else{if(_0x49cfae['data']instanceof ArrayBuffer)_0x4be8e3[_0x5bae4c(0xc6)](new Uint8Array(_0x49cfae['data']));else{if(_0x49cfae['data']instanceof Blob)_0x49cfae[_0x5bae4c(0xf6)]['arrayBuffer']()[_0x5bae4c(0x106)](_0x1e9146=>{const _0x39a2c6=_0x5bae4c;_0x4be8e3[_0x39a2c6(0xc6)](new Uint8Array(_0x1e9146));});}}},_0x4deb60['onerror']=_0x41785e=>{const _0x1ab992=_0x17a662;let _0x315d57=Error('Backend\x20WebSocket\x20error');_0x3df69a['error'](_0x1ab992(0xce)+_0x46c11e[_0x1ab992(0xe6)],_0x41785e),_0x2f75bb['onError']?.(_0x315d57,_0x46c11e[_0x1ab992(0xe6)]);},_0x4deb60[_0x17a662(0x121)]=()=>{const _0x34c2e0=_0x17a662;_0x3df69a['info']('Backend\x20closed:\x20'+_0x46c11e['path']),_0x2f75bb[_0x34c2e0(0x123)]?.(_0x46c11e[_0x34c2e0(0xe6)]),_0x4be8e3['close']();},_0x46c11e[_0x17a662(0x12b)]=_0x4deb60;},'message'(_0x30b977,_0x43e551){const _0x42a469=_0x1b3097;let _0x2d7f7c=_0x30b977['data'];if(_0x2d7f7c[_0x42a469(0x12b)]?.[_0x42a469(0x10e)]===WebSocket[_0x42a469(0xd5)])_0x2d7f7c[_0x42a469(0x12b)][_0x42a469(0xc6)](_0x43e551);else{if(_0x588fc2['MLHma'](typeof _0x43e551,_0x42a469(0x12d)))_0x2d7f7c['buffer']['push'](_0x43e551);else{let _0x1e9d04=new ArrayBuffer(_0x43e551['byteLength']);new Uint8Array(_0x1e9d04)[_0x42a469(0x125)](new Uint8Array(_0x43e551)),_0x2d7f7c['buffer']['push'](_0x1e9d04);}}},'close'(_0x350539){const _0x3fc41c=_0x1b3097;let _0x5a334f=_0x350539['data'];if(_0x3df69a[_0x3fc41c(0xdc)]('Client\x20closed:\x20'+_0x5a334f[_0x3fc41c(0xe6)]),_0x5a334f[_0x3fc41c(0x12b)])_0x5a334f[_0x3fc41c(0x12b)][_0x3fc41c(0x12c)]();},'drain'(_0x1e835f){}}};}function H(_0x266ea1){const _0x196274=_0x51b2,_0x2bbd8b={};_0x2bbd8b['eXnxD']=function(_0x381e1d,_0xcde124){return _0x381e1d instanceof _0xcde124;},_0x2bbd8b['aTlhH']='Not\x20a\x20WebSocket\x20request';const _0x5bc632=_0x2bbd8b;let _0xee3bc0=k(_0x266ea1),_0x521471=_0x266ea1[_0x196274(0xe8)]??0xfa1,_0x11d457=_0x266ea1[_0x196274(0xd0)]??_0x196274(0xd3),_0x2ea8e7=Bun[_0x196274(0xc9)]({'port':_0x521471,'hostname':_0x11d457,'fetch'(_0x5a0714,_0x4af9d9){const _0x5e4877=_0x196274;let _0xdeb1bc=_0xee3bc0[_0x5e4877(0xc5)](_0x5a0714,_0x4af9d9);if(_0xdeb1bc===!0x0)return;if(_0x5bc632['eXnxD'](_0xdeb1bc,Response))return _0xdeb1bc;const _0x29e3e9={};return _0x29e3e9['status']=0x190,new Response(_0x5bc632['aTlhH'],_0x29e3e9);},'websocket':_0xee3bc0[_0x196274(0x11c)]});return console[_0x196274(0x109)]('[WS\x20Proxy]\x20Started\x20on\x20'+_0x11d457+':'+_0x521471),_0x2ea8e7;}async function U(_0x3382a2){const _0x439ffc=_0x51b2,_0x24a2cf={'dgfiS':function(_0x51ed60,_0x472861){return _0x51ed60===_0x472861;},'FiIqJ':'websocket','Gfjxq':function(_0x12386c,_0x587d16){return _0x12386c===_0x587d16;},'EVdQM':'Not\x20Found','VHFWT':'No\x20matching\x20proxy\x20target\x20for\x20this\x20request','KbhyG':'application/json','UoMPQ':_0x439ffc(0xeb),'bvqjC':function(_0x5e6f1a,_0x46f3c2){return _0x5e6f1a(_0x46f3c2);}};let _0x181213=_0x3382a2['port']??0xfa0,_0x1cc5fa=_0x3382a2['hostname']??'0.0.0.0',_0x42d3d7=_0x3382a2[_0x439ffc(0x117)]??!0x0,_0x2d8f06=y(_0x24a2cf['UoMPQ'],_0x42d3d7);if(_0x3382a2['envPath'])await W(_0x3382a2['envPath']);_0x2d8f06['info']('Starting\x20proxy\x20server...'),_0x2d8f06['info']('\x20\x20-\x20hostname:\x20'+_0x1cc5fa),_0x2d8f06['info'](_0x439ffc(0x129)+_0x181213),_0x2d8f06[_0x439ffc(0xdc)](_0x439ffc(0xec)+_0x42d3d7);let _0x4c58e7=_0x3382a2['ws']?_0x24a2cf[_0x439ffc(0x116)](k,{..._0x3382a2['ws'],'debug':_0x3382a2['ws']['debug']??_0x42d3d7}):null,_0x25c904=_0x3382a2[_0x439ffc(0x108)]?T({..._0x3382a2['http'],'debug':_0x3382a2['http']['debug']??_0x42d3d7}):null;if(_0x4c58e7&&_0x3382a2['ws']?.[_0x439ffc(0xe1)]){_0x2d8f06['info']('\x20\x20-\x20WebSocket\x20targets:\x20'+_0x3382a2['ws']['targets']['length']);for(let _0x536c53 of _0x3382a2['ws'][_0x439ffc(0xe1)])_0x2d8f06[_0x439ffc(0xdc)](_0x439ffc(0x122)+_0x536c53[_0x439ffc(0x11a)]+':\x20'+_0x536c53[_0x439ffc(0x112)][_0x439ffc(0xf7)](',\x20'));}if(_0x25c904&&_0x3382a2['http']?.[_0x439ffc(0xe1)]){_0x2d8f06['info'](_0x439ffc(0x102)+_0x3382a2[_0x439ffc(0x108)][_0x439ffc(0xe1)][_0x439ffc(0x124)]);for(let _0x683f4b of _0x3382a2[_0x439ffc(0x108)][_0x439ffc(0xe1)])_0x2d8f06['info']('\x20\x20\x20\x20-\x20'+_0x683f4b['url']+':\x20'+_0x683f4b['paths'][_0x439ffc(0xf7)](',\x20'));}const _0x5c8f23={};_0x5c8f23[_0x439ffc(0x115)]=function(){},_0x5c8f23['message']=function(){},_0x5c8f23[_0x439ffc(0x12c)]=function(){},_0x5c8f23['drain']=function(){};let _0x2f6b33=Bun['serve']({'port':_0x181213,'hostname':_0x1cc5fa,async 'fetch'(_0x12d1b8,_0x98e0c5){const _0x377509=_0x439ffc;if(_0x24a2cf['dgfiS'](_0x12d1b8[_0x377509(0xcb)][_0x377509(0xcf)]('upgrade')?.['toLowerCase'](),_0x24a2cf['FiIqJ'])){if(_0x4c58e7){let _0x1096b9=_0x4c58e7[_0x377509(0xc5)](_0x12d1b8,_0x98e0c5);if(_0x24a2cf['Gfjxq'](_0x1096b9,!0x0))return;if(_0x1096b9 instanceof Response)return _0x1096b9;}}if(_0x25c904){let _0x4d7b44=await _0x25c904[_0x377509(0xdb)](_0x12d1b8);if(_0x4d7b44)return _0x4d7b44;}const _0x561775={};_0x561775['error']=_0x24a2cf[_0x377509(0x113)],_0x561775['message']=_0x24a2cf['VHFWT'];const _0x542acd={};_0x542acd['Content-Type']=_0x24a2cf['KbhyG'];const _0x2c08dd={};return _0x2c08dd[_0x377509(0xc7)]=0x194,_0x2c08dd['headers']=_0x542acd,new Response(JSON[_0x377509(0x105)](_0x561775),_0x2c08dd);},'websocket':_0x4c58e7?.[_0x439ffc(0x11c)]??_0x5c8f23});return _0x2d8f06['info'](_0x439ffc(0x100)+_0x1cc5fa+':'+_0x181213),_0x3382a2[_0x439ffc(0x10c)]?.({'port':_0x181213,'hostname':_0x1cc5fa}),_0x2f6b33;}const _0x291ccd={};_0x291ccd['targets']=[],_0x291ccd['debug']=!0x1,_0x291ccd['allowHmr']=!0x0,_0x291ccd[_0xba884d(0x119)]=!0x0;const _0x82928b={};_0x82928b[_0xba884d(0xe1)]=[],_0x82928b['debug']=!0x1;const _0x2e9a38={};_0x2e9a38[_0xba884d(0xe8)]=0xfa0,_0x2e9a38[_0xba884d(0xd0)]='0.0.0.0',_0x2e9a38['dev']=!0x0,_0x2e9a38['ws']=_0x291ccd,_0x2e9a38['http']=_0x82928b;var B=_0x2e9a38;export{C as wsToHttp,H as startWsProxyServer,v as sanitizeForLog,P as rewritePath,h as parseCookies,x as matchPath,W as loadEnvFile,S as httpToWs,b as globToRegex,B as defaultProxyConfig,k as createWsProxyHandler,U as createProxyServer,y as createProxyLogger,T as createHttpProxyHandler,$ as addQueryParam};
1
+ const _0x4e9436=_0x1d82;(function(_0x262bb9,_0x184966){const _0x1c5ec0=_0x1d82,_0x26d61e=_0x262bb9();while(!![]){try{const _0x4472cd=parseInt(_0x1c5ec0(0x268))/0x1+-parseInt(_0x1c5ec0(0x220))/0x2+-parseInt(_0x1c5ec0(0x239))/0x3+-parseInt(_0x1c5ec0(0x247))/0x4+parseInt(_0x1c5ec0(0x201))/0x5*(-parseInt(_0x1c5ec0(0x1ee))/0x6)+parseInt(_0x1c5ec0(0x1fb))/0x7*(-parseInt(_0x1c5ec0(0x22a))/0x8)+parseInt(_0x1c5ec0(0x200))/0x9*(parseInt(_0x1c5ec0(0x21a))/0xa);if(_0x4472cd===_0x184966)break;else _0x26d61e['push'](_0x26d61e['shift']());}catch(_0x2c7134){_0x26d61e['push'](_0x26d61e['shift']());}}}(_0x5745,0x686d0));import'../../../index-0yyw12k6.js';function h(_0x32a144){const _0xa95f1b=_0x1d82,_0x56ac41={'FKmjv':function(_0x44224b,_0x2f1c0c){return _0x44224b>_0x2f1c0c;},'hTCaF':function(_0x5a8d50,_0x24aaa6){return _0x5a8d50(_0x24aaa6);}};let _0x2338c2={};if(!_0x32a144)return _0x2338c2;for(let _0x426b73 of _0x32a144[_0xa95f1b(0x25d)](';')){let [_0x114a4e,..._0x535233]=_0x426b73['trim']()[_0xa95f1b(0x25d)]('=');if(_0x114a4e&&_0x56ac41[_0xa95f1b(0x225)](_0x535233['length'],0x0))_0x2338c2[_0x114a4e]=_0x56ac41['hTCaF'](decodeURIComponent,_0x535233['join']('='));}return _0x2338c2;}function b(_0x4812e5){const _0x5d5b7d=_0x1d82,_0x45c477={};_0x45c477[_0x5d5b7d(0x223)]=_0x5d5b7d(0x1ea);const _0xd1c20c=_0x45c477;let _0x582350=_0x4812e5['replace'](/:[\w]+\*/g,'*');return _0x582350=_0x582350[_0x5d5b7d(0x1ef)](/[.+?^${}()|[\]\\]/g,_0xd1c20c['xPILy']),_0x582350=_0x582350[_0x5d5b7d(0x1ef)](/\*/g,'.*'),new RegExp('^'+_0x582350+'$');}function x(_0x292db2,_0x13b5c0){const _0x428103=_0x1d82,_0xba141d={'fIQWi':function(_0x3ac2a9,_0x63481c){return _0x3ac2a9(_0x63481c);}};for(let _0x437c90 of _0x13b5c0)if(_0xba141d[_0x428103(0x246)](b,_0x437c90)[_0x428103(0x24b)](_0x292db2))return!0x0;return!0x1;}function P(_0x59b0f7,_0x488261){const _0x155208=_0x1d82;for(let [_0x129040,_0x25246a]of Object[_0x155208(0x233)](_0x488261))if(b(_0x129040)['test'](_0x59b0f7)){let _0x1bc8bb=_0x129040['replace'](/\*.*$/,''),_0x5ce08e=_0x25246a['replace'](/\*.*$/,'');return _0x59b0f7['replace'](_0x1bc8bb,_0x5ce08e);}return _0x59b0f7;}function $(_0xa80eaa,_0x76a3db,_0x34a908){const _0x5634d5={'EPFPr':function(_0x2b6250,_0x148fd8){return _0x2b6250(_0x148fd8);}};let _0x56e092=_0xa80eaa['includes']('?')?'&':'?';return''+_0xa80eaa+_0x56e092+_0x5634d5['EPFPr'](encodeURIComponent,_0x76a3db)+'='+encodeURIComponent(_0x34a908);}function S(_0x25d8b1){const _0x27c851=_0x1d82;return _0x25d8b1[_0x27c851(0x1ef)](/^http/,'ws');}function C(_0x2b0187){const _0x556093=_0x1d82;return _0x2b0187[_0x556093(0x1ef)](/^ws/,_0x556093(0x264));}function y(_0x35309d,_0x3d3fe5){return{'info':(..._0x1c71ea)=>{const _0xf4269b=_0x1d82;if(_0x3d3fe5)console[_0xf4269b(0x227)]('['+_0x35309d+']',..._0x1c71ea);},'warn':(..._0x4bd7ef)=>{console['warn']('['+_0x35309d+']',..._0x4bd7ef);},'error':(..._0x27d187)=>{const _0x5996ec=_0x1d82;console[_0x5996ec(0x255)]('['+_0x35309d+']',..._0x27d187);}};}async function W(_0x2b0d19){const _0xd8ac73=_0x1d82;try{let _0x41e524=Bun[_0xd8ac73(0x1eb)](_0x2b0d19);if(!await _0x41e524['exists']())return;let _0x45fd3b=await _0x41e524['text']();for(let _0x334abc of _0x45fd3b['split']('\x0a')){let _0xc2aa74=_0x334abc['trim']();if(_0xc2aa74&&!_0xc2aa74[_0xd8ac73(0x21f)]('#')){let [_0x5321f9,..._0x2799e4]=_0xc2aa74[_0xd8ac73(0x25d)]('='),_0x17df9c=_0x2799e4['join']('=')[_0xd8ac73(0x1ef)](/^["']|["']$/g,'');if(_0x5321f9&&!process[_0xd8ac73(0x254)][_0x5321f9])process['env'][_0x5321f9]=_0x17df9c;}}}catch{}}function v(_0x306fcf,_0x1f7874=0x32){const _0x135c24=_0x1d82,_0x1544e1={};_0x1544e1[_0x135c24(0x267)]=function(_0xe2c1a7,_0xbe9f9){return _0xe2c1a7<=_0xbe9f9;};const _0x33cde1=_0x1544e1;if(_0x33cde1[_0x135c24(0x267)](_0x306fcf[_0x135c24(0x1f5)],_0x1f7874))return _0x306fcf;return _0x306fcf['slice'](0x0,_0x1f7874)+'...';}function T(_0x4cb407){const _0x2c0d5d=_0x1d82,_0x87b251={'HvpoG':function(_0x36db5d,_0x4b4f41){return _0x36db5d(_0x4b4f41);},'iTdHq':'host','luRwf':'origin','XVOmh':_0x2c0d5d(0x20a),'PorGm':function(_0xc2f51b,_0x48d36c){return _0xc2f51b===_0x48d36c;},'euYOk':'manual','JlGjj':function(_0x69afa3,_0x1b5f2a){return _0x69afa3(_0x1b5f2a);},'NHORg':function(_0xf60e91,_0x500f0e){return _0xf60e91-_0x500f0e;},'cFOBu':'transfer-encoding','RfwIM':_0x2c0d5d(0x236),'UgGuU':_0x2c0d5d(0x1f9),'QKEhn':function(_0x189599,_0x1ad149,_0x4c010f){return _0x189599(_0x1ad149,_0x4c010f);},'anyia':_0x2c0d5d(0x249)};let _0x323692=_0x87b251[_0x2c0d5d(0x219)](y,_0x87b251[_0x2c0d5d(0x1e8)],_0x4cb407[_0x2c0d5d(0x22b)]??!0x1);function _0x54c2b6(_0x1a0696){const _0x2ea775=_0x2c0d5d;for(let _0x162e32 of _0x4cb407['targets'])if(x(_0x1a0696,_0x162e32[_0x2ea775(0x259)]))return _0x162e32;return null;}function _0x293fe8(_0x4fac2e,_0x293156){const _0x525d36=_0x2c0d5d;let _0x2b2901=_0x293156[_0x525d36(0x1e7)][_0x525d36(0x1ef)](/\/$/,''),_0x46fea9=_0x4fac2e;if(_0x293156[_0x525d36(0x25c)])_0x46fea9=P(_0x4fac2e,_0x293156['pathRewrite']);return''+_0x2b2901+_0x46fea9;}return{async 'handle'(_0x12a820){const _0x3e8dd6=_0x2c0d5d;let _0x109401=new URL(_0x12a820['url']),_0x4ae539=_0x109401[_0x3e8dd6(0x258)],_0x735dc1=_0x87b251['HvpoG'](_0x54c2b6,_0x4ae539);if(!_0x735dc1)return null;let _0x48b1b0=performance[_0x3e8dd6(0x256)](),_0xafa734=_0x293fe8(_0x4ae539,_0x735dc1),_0xef4dc1=_0x109401[_0x3e8dd6(0x21c)]?''+_0xafa734+_0x109401[_0x3e8dd6(0x21c)]:_0xafa734;_0x323692['info']('Proxying:\x20'+_0x12a820[_0x3e8dd6(0x242)]+'\x20'+_0x4ae539+'\x20->\x20'+_0xef4dc1),_0x4cb407[_0x3e8dd6(0x1e6)]?.(_0x4ae539,_0xef4dc1);let _0x4eff9c=new Headers(_0x12a820[_0x3e8dd6(0x250)]);if(_0x735dc1[_0x3e8dd6(0x24c)]!==!0x1){let _0x3fcf7d=new URL(_0x735dc1['url']);_0x4eff9c['set'](_0x87b251['iTdHq'],_0x3fcf7d['host']),_0x4eff9c['set'](_0x87b251[_0x3e8dd6(0x22c)],_0x3fcf7d[_0x3e8dd6(0x21d)]);}if(_0x735dc1['injectTokenFromCookie']){let _0x58b953=h(_0x12a820['headers']['get'](_0x87b251[_0x3e8dd6(0x243)]))[_0x735dc1[_0x3e8dd6(0x229)][_0x3e8dd6(0x1e3)]];if(_0x58b953){let _0x977344=_0x735dc1['injectTokenFromCookie']['headerName']??'authorization';_0x4eff9c['set'](_0x977344,'Bearer\x20'+_0x58b953),_0x323692['info']('Token\x20injected\x20from\x20cookie\x20to\x20'+_0x977344);}}if(_0x735dc1[_0x3e8dd6(0x250)]){for(let [_0x16d6d6,_0x457243]of Object['entries'](_0x735dc1['headers']))_0x4eff9c['set'](_0x16d6d6,_0x457243);}_0x4eff9c['delete'](_0x3e8dd6(0x207));try{let _0x48d624=new AbortController(),_0x4e0fc8=_0x735dc1[_0x3e8dd6(0x265)]??0x7530,_0x4889cc=setTimeout(()=>{_0x48d624['abort']();},_0x4e0fc8),_0x4039e4=await fetch(_0xef4dc1,{'method':_0x12a820['method'],'headers':_0x4eff9c,'body':_0x12a820['body'],'signal':_0x48d624['signal'],'redirect':_0x87b251[_0x3e8dd6(0x235)](_0x735dc1['followRedirects'],!0x1)?_0x87b251[_0x3e8dd6(0x23e)]:'follow'});_0x87b251[_0x3e8dd6(0x20e)](clearTimeout,_0x4889cc);let _0x2ebead=_0x87b251['NHORg'](performance[_0x3e8dd6(0x256)](),_0x48b1b0);_0x323692['info']('Response:\x20'+_0x4039e4['status']+'\x20('+_0x2ebead['toFixed'](0x0)+_0x3e8dd6(0x25f)),_0x4cb407['onResponse']?.(_0x4ae539,_0x4039e4['status'],_0x2ebead);let _0x572052=new Headers(_0x4039e4['headers']);return _0x572052['delete']('content-encoding'),_0x572052[_0x3e8dd6(0x1f0)](_0x87b251[_0x3e8dd6(0x224)]),new Response(_0x4039e4[_0x3e8dd6(0x25a)],{'status':_0x4039e4['status'],'statusText':_0x4039e4['statusText'],'headers':_0x572052});}catch(_0xd13edb){let _0x2c05d9=performance[_0x3e8dd6(0x256)]()-_0x48b1b0,_0x3ca303=_0xd13edb instanceof Error?_0xd13edb:_0x87b251['JlGjj'](Error,String(_0xd13edb));const _0x3b8d95={};_0x3b8d95[_0x3e8dd6(0x255)]=_0x3e8dd6(0x20f),_0x3b8d95['message']=_0x87b251[_0x3e8dd6(0x252)];const _0x56ec94={};_0x56ec94['Content-Type']=_0x87b251['UgGuU'];const _0x28b44b={};_0x28b44b[_0x3e8dd6(0x21b)]=0x1f8,_0x28b44b['headers']=_0x56ec94;if(_0x3ca303['name']==='AbortError')return _0x323692['error'](_0x3e8dd6(0x266)+_0x2c05d9[_0x3e8dd6(0x23f)](0x0)+'ms:\x20'+_0x4ae539),_0x4cb407['onError']?.(Error(_0x3e8dd6(0x244)),_0x4ae539,0x1f8),new Response(JSON[_0x3e8dd6(0x22e)](_0x3b8d95),_0x28b44b);const _0x120736={};_0x120736[_0x3e8dd6(0x21e)]=_0x3e8dd6(0x1f9);const _0x267171={};return _0x267171[_0x3e8dd6(0x21b)]=0x1f6,_0x267171['headers']=_0x120736,(_0x323692[_0x3e8dd6(0x255)]('Error:\x20'+_0x4ae539,_0x3ca303['message']),_0x4cb407[_0x3e8dd6(0x1f8)]?.(_0x3ca303,_0x4ae539,0x1f6),new Response(JSON[_0x3e8dd6(0x22e)]({'error':'Bad\x20Gateway','message':_0x3ca303['message']}),_0x267171));}}};}function k(_0x43b937){const _0x3be3f7=_0x1d82,_0x16580f={'gnazO':function(_0x194f40,_0x4ae1ab,_0x108a9f){return _0x194f40(_0x4ae1ab,_0x108a9f);},'UeOJP':'http','wqGQF':function(_0xb8bdeb,_0xf3aa52,_0x153c90){return _0xb8bdeb(_0xf3aa52,_0x153c90);},'nRjNi':'token','oiRpy':function(_0x7fa853,_0x319b68,_0x2b934d,_0x32e679){return _0x7fa853(_0x319b68,_0x2b934d,_0x32e679);},'aOrma':_0x3be3f7(0x206),'lGZil':function(_0x5e420e,_0xaf9b4){return _0x5e420e(_0xaf9b4);},'oKkoI':'WebSocket\x20path\x20not\x20found','MzCPG':function(_0x356b71,_0x3d9200){return _0x356b71===_0x3d9200;},'HRTiV':function(_0x1812e6,_0x226340){return _0x1812e6 instanceof _0x226340;},'RnhPZ':'WS\x20Proxy'};let _0x4194dc=y(_0x16580f[_0x3be3f7(0x20c)],_0x43b937[_0x3be3f7(0x22b)]??!0x1);function _0x2899b4(_0x91d9e5){const _0x56ddcd=_0x3be3f7;for(let _0x44f36f of _0x43b937[_0x56ddcd(0x208)])if(_0x16580f['gnazO'](x,_0x91d9e5,_0x44f36f[_0x56ddcd(0x259)]))return _0x44f36f;return null;}function _0x5bab3c(_0x4ac803,_0x4184b7,_0xca7ca8,_0x109670){const _0x6919e7=_0x3be3f7;let _0x3945c6=_0x4184b7[_0x6919e7(0x1e7)]['replace'](/\/$/,'');if(_0x3945c6[_0x6919e7(0x21f)](_0x16580f[_0x6919e7(0x261)]))_0x3945c6=S(_0x3945c6);let _0x5276e1=_0x4ac803;if(_0x4184b7[_0x6919e7(0x25c)])_0x5276e1=_0x16580f[_0x6919e7(0x1fc)](P,_0x4ac803,_0x4184b7['pathRewrite']);let _0x3c8fa5=''+_0x3945c6+_0x5276e1,_0x7e35=_0x109670[_0x6919e7(0x214)]();if(_0x7e35)_0x3c8fa5=_0x3c8fa5+'?'+_0x7e35;if(_0x4184b7['injectTokenFromCookie']){let _0x26004c=_0xca7ca8[_0x4184b7['injectTokenFromCookie']['cookieName']];if(_0x26004c){let _0x5a7efc=_0x4184b7[_0x6919e7(0x229)][_0x6919e7(0x20b)]??_0x16580f['nRjNi'];_0x3c8fa5=_0x16580f[_0x6919e7(0x1f4)]($,_0x3c8fa5,_0x5a7efc,_0x26004c),_0x4194dc['info'](_0x16580f[_0x6919e7(0x211)]);}}return _0x3c8fa5;}return{'upgrade'(_0x44e21a,_0x19bcc1){const _0x58f33d=_0x3be3f7;let _0x16fe1b=new URL(_0x44e21a[_0x58f33d(0x1e7)]),_0x4eeb28=_0x16fe1b[_0x58f33d(0x258)];if(_0x43b937['allowHmr']!==!0x1&&_0x4eeb28[_0x58f33d(0x21f)]('/_next/webpack-hmr'))return _0x4194dc[_0x58f33d(0x24d)](_0x58f33d(0x1ec)+_0x4eeb28),!0x1;let _0x2a0ada=_0x16580f['lGZil'](_0x2899b4,_0x4eeb28);if(!_0x2a0ada){const _0x2de52b={};_0x2de52b['status']=0x194;if(_0x43b937[_0x58f33d(0x231)]!==!0x1)return _0x4194dc['warn'](_0x58f33d(0x210)+_0x4eeb28),new Response(_0x16580f[_0x58f33d(0x20d)],_0x2de52b);return!0x1;}let _0x50d7cd=_0x16580f[_0x58f33d(0x25b)](h,_0x44e21a[_0x58f33d(0x250)][_0x58f33d(0x232)](_0x58f33d(0x20a))),_0x3d7e8e=_0x5bab3c(_0x4eeb28,_0x2a0ada,_0x50d7cd,_0x16fe1b[_0x58f33d(0x248)]);return _0x4194dc[_0x58f33d(0x24d)](_0x58f33d(0x1e9)+_0x4eeb28+_0x58f33d(0x262)+_0x3d7e8e),_0x19bcc1[_0x58f33d(0x215)](_0x44e21a,{'data':{'backendWs':null,'path':_0x4eeb28,'target':_0x3d7e8e,'buffer':[]}});},'websocket':{'open'(_0x2b8f1a){const _0x33fcb8=_0x3be3f7,_0x56dd2c={'SuxLa':function(_0x268823,_0x3009b5){const _0x40b736=_0x1d82;return _0x16580f[_0x40b736(0x25b)](_0x268823,_0x3009b5);}};let _0xfb0273=_0x2b8f1a['data'],_0x386210=new WebSocket(_0xfb0273[_0x33fcb8(0x205)]);_0x386210[_0x33fcb8(0x1fd)]=()=>{const _0x57ccc1=_0x33fcb8;_0x4194dc['info']('Backend\x20connected:\x20'+_0xfb0273[_0x57ccc1(0x221)]),_0x43b937['onOpen']?.(_0xfb0273[_0x57ccc1(0x221)],_0xfb0273[_0x57ccc1(0x205)]);for(let _0x3f1253 of _0xfb0273[_0x57ccc1(0x202)])_0x386210['send'](_0x3f1253);_0xfb0273['buffer']=[];},_0x386210[_0x33fcb8(0x23a)]=_0x1f36db=>{const _0x3d4bc1=_0x33fcb8;if(_0x16580f[_0x3d4bc1(0x216)](typeof _0x1f36db[_0x3d4bc1(0x23b)],'string'))_0x2b8f1a[_0x3d4bc1(0x22f)](_0x1f36db['data']);else{if(_0x16580f['HRTiV'](_0x1f36db['data'],ArrayBuffer))_0x2b8f1a[_0x3d4bc1(0x22f)](new Uint8Array(_0x1f36db['data']));else{if(_0x16580f[_0x3d4bc1(0x240)](_0x1f36db[_0x3d4bc1(0x23b)],Blob))_0x1f36db['data'][_0x3d4bc1(0x251)]()['then'](_0x326000=>{const _0x39a9d9=_0x3d4bc1;_0x2b8f1a[_0x39a9d9(0x22f)](new Uint8Array(_0x326000));});}}},_0x386210[_0x33fcb8(0x23d)]=_0xba95bd=>{const _0x2785e0=_0x33fcb8;let _0x5386dc=_0x56dd2c['SuxLa'](Error,'Backend\x20WebSocket\x20error');_0x4194dc['error']('Backend\x20error:\x20'+_0xfb0273[_0x2785e0(0x221)],_0xba95bd),_0x43b937[_0x2785e0(0x1f8)]?.(_0x5386dc,_0xfb0273[_0x2785e0(0x221)]);},_0x386210[_0x33fcb8(0x1ff)]=()=>{const _0x3add48=_0x33fcb8;_0x4194dc['info']('Backend\x20closed:\x20'+_0xfb0273['path']),_0x43b937[_0x3add48(0x245)]?.(_0xfb0273[_0x3add48(0x221)]),_0x2b8f1a[_0x3add48(0x1f6)]();},_0xfb0273['backendWs']=_0x386210;},'message'(_0x239366,_0x2ccb99){const _0x332721=_0x3be3f7;let _0x413ae7=_0x239366[_0x332721(0x23b)];if(_0x413ae7[_0x332721(0x1f3)]?.[_0x332721(0x213)]===WebSocket[_0x332721(0x1f1)])_0x413ae7[_0x332721(0x1f3)][_0x332721(0x22f)](_0x2ccb99);else{if(_0x16580f['MzCPG'](typeof _0x2ccb99,_0x332721(0x1fe)))_0x413ae7['buffer'][_0x332721(0x228)](_0x2ccb99);else{let _0x5492e5=new ArrayBuffer(_0x2ccb99[_0x332721(0x24e)]);new Uint8Array(_0x5492e5)[_0x332721(0x222)](new Uint8Array(_0x2ccb99)),_0x413ae7['buffer'][_0x332721(0x228)](_0x5492e5);}}},'close'(_0x115619){const _0x5d0509=_0x3be3f7;let _0x9cad83=_0x115619[_0x5d0509(0x23b)];if(_0x4194dc['info'](_0x5d0509(0x212)+_0x9cad83[_0x5d0509(0x221)]),_0x9cad83[_0x5d0509(0x1f3)])_0x9cad83['backendWs']['close']();},'drain'(_0x3aef4d){}}};}function H(_0x4d31e3){const _0x2d3885=_0x1d82;let _0x678b21=k(_0x4d31e3),_0x4a65ca=_0x4d31e3['port']??0xfa1,_0x29b70f=_0x4d31e3['hostname']??_0x2d3885(0x24f),_0x46f0e9=Bun[_0x2d3885(0x22d)]({'port':_0x4a65ca,'hostname':_0x29b70f,'fetch'(_0x2f2f51,_0x1f4812){let _0x764ffa=_0x678b21['upgrade'](_0x2f2f51,_0x1f4812);if(_0x764ffa===!0x0)return;if(_0x764ffa instanceof Response)return _0x764ffa;const _0x32a432={};return _0x32a432['status']=0x190,new Response('Not\x20a\x20WebSocket\x20request',_0x32a432);},'websocket':_0x678b21['websocket']});return console[_0x2d3885(0x227)]('[WS\x20Proxy]\x20Started\x20on\x20'+_0x29b70f+':'+_0x4a65ca),_0x46f0e9;}async function U(_0xeb80d4){const _0x500a62=_0x1d82,_0x24a43f={'vCjKS':_0x500a62(0x215),'WdMVO':'websocket','pTxcH':function(_0x251ac5,_0xe7b390){return _0x251ac5 instanceof _0xe7b390;},'ayZeX':_0x500a62(0x257),'RnLXq':'application/json','brFqg':function(_0x417204,_0x54d476,_0x181f12){return _0x417204(_0x54d476,_0x181f12);},'DFvrz':_0x500a62(0x1e5),'IwAiW':function(_0x5dc9d6,_0x3c9e48){return _0x5dc9d6(_0x3c9e48);},'tZNec':_0x500a62(0x253)};let _0x580034=_0xeb80d4['port']??0xfa0,_0x536c28=_0xeb80d4[_0x500a62(0x238)]??'0.0.0.0',_0x57450c=_0xeb80d4[_0x500a62(0x1f2)]??!0x0,_0x5b6806=_0x24a43f[_0x500a62(0x203)](y,_0x24a43f[_0x500a62(0x24a)],_0x57450c);if(_0xeb80d4['envPath'])await _0x24a43f['IwAiW'](W,_0xeb80d4[_0x500a62(0x204)]);_0x5b6806[_0x500a62(0x24d)](_0x24a43f[_0x500a62(0x226)]),_0x5b6806['info']('\x20\x20-\x20hostname:\x20'+_0x536c28),_0x5b6806[_0x500a62(0x24d)](_0x500a62(0x230)+_0x580034),_0x5b6806[_0x500a62(0x24d)](_0x500a62(0x1e2)+_0x57450c);let _0x3f7f4e=_0xeb80d4['ws']?k({..._0xeb80d4['ws'],'debug':_0xeb80d4['ws']['debug']??_0x57450c}):null,_0x1a6321=_0xeb80d4['http']?T({..._0xeb80d4['http'],'debug':_0xeb80d4[_0x500a62(0x264)]['debug']??_0x57450c}):null;if(_0x3f7f4e&&_0xeb80d4['ws']?.[_0x500a62(0x208)]){_0x5b6806['info'](_0x500a62(0x263)+_0xeb80d4['ws'][_0x500a62(0x208)][_0x500a62(0x1f5)]);for(let _0x48baab of _0xeb80d4['ws']['targets'])_0x5b6806[_0x500a62(0x24d)](_0x500a62(0x23c)+_0x48baab['url']+':\x20'+_0x48baab[_0x500a62(0x259)][_0x500a62(0x241)](',\x20'));}if(_0x1a6321&&_0xeb80d4[_0x500a62(0x264)]?.[_0x500a62(0x208)]){_0x5b6806['info'](_0x500a62(0x209)+_0xeb80d4[_0x500a62(0x264)][_0x500a62(0x208)]['length']);for(let _0x267375 of _0xeb80d4[_0x500a62(0x264)]['targets'])_0x5b6806[_0x500a62(0x24d)]('\x20\x20\x20\x20-\x20'+_0x267375[_0x500a62(0x1e7)]+':\x20'+_0x267375[_0x500a62(0x259)][_0x500a62(0x241)](',\x20'));}const _0x49fdb6={};_0x49fdb6[_0x500a62(0x25e)]=function(){},_0x49fdb6[_0x500a62(0x234)]=function(){},_0x49fdb6[_0x500a62(0x1f6)]=function(){},_0x49fdb6[_0x500a62(0x217)]=function(){};let _0x226976=Bun['serve']({'port':_0x580034,'hostname':_0x536c28,async 'fetch'(_0xf33463,_0x4711e2){const _0x47e629=_0x500a62;if(_0xf33463[_0x47e629(0x250)][_0x47e629(0x232)](_0x24a43f[_0x47e629(0x1e4)])?.[_0x47e629(0x1fa)]()===_0x24a43f[_0x47e629(0x1ed)]){if(_0x3f7f4e){let _0x55dc62=_0x3f7f4e['upgrade'](_0xf33463,_0x4711e2);if(_0x55dc62===!0x0)return;if(_0x24a43f[_0x47e629(0x218)](_0x55dc62,Response))return _0x55dc62;}}if(_0x1a6321){let _0x3e4dc6=await _0x1a6321['handle'](_0xf33463);if(_0x3e4dc6)return _0x3e4dc6;}const _0x48bda6={};_0x48bda6['error']=_0x24a43f['ayZeX'],_0x48bda6[_0x47e629(0x234)]='No\x20matching\x20proxy\x20target\x20for\x20this\x20request';const _0x2c09f0={};_0x2c09f0['Content-Type']=_0x24a43f['RnLXq'];const _0x50b615={};return _0x50b615[_0x47e629(0x21b)]=0x194,_0x50b615['headers']=_0x2c09f0,new Response(JSON[_0x47e629(0x22e)](_0x48bda6),_0x50b615);},'websocket':_0x3f7f4e?.[_0x500a62(0x260)]??_0x49fdb6});return _0x5b6806[_0x500a62(0x24d)](_0x500a62(0x237)+_0x536c28+':'+_0x580034),_0xeb80d4['onReady']?.({'port':_0x580034,'hostname':_0x536c28}),_0x226976;}function _0x1d82(_0x339296,_0x1096b6){_0x339296=_0x339296-0x1e2;const _0x5745e8=_0x5745();let _0x1d82b4=_0x5745e8[_0x339296];if(_0x1d82['qeAiZQ']===undefined){var _0x1bb188=function(_0x129c80){const _0x4d0b27='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0xb51779='',_0x26201a='';for(let _0xcf3065=0x0,_0x3e783f,_0x24a2ad,_0x122b1a=0x0;_0x24a2ad=_0x129c80['charAt'](_0x122b1a++);~_0x24a2ad&&(_0x3e783f=_0xcf3065%0x4?_0x3e783f*0x40+_0x24a2ad:_0x24a2ad,_0xcf3065++%0x4)?_0xb51779+=String['fromCharCode'](0xff&_0x3e783f>>(-0x2*_0xcf3065&0x6)):0x0){_0x24a2ad=_0x4d0b27['indexOf'](_0x24a2ad);}for(let _0x25aec4=0x0,_0x2dfa4b=_0xb51779['length'];_0x25aec4<_0x2dfa4b;_0x25aec4++){_0x26201a+='%'+('00'+_0xb51779['charCodeAt'](_0x25aec4)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x26201a);};_0x1d82['XgCpwR']=_0x1bb188,_0x1d82['uHXVOd']={},_0x1d82['qeAiZQ']=!![];}const _0xded63a=_0x5745e8[0x0],_0x161407=_0x339296+_0xded63a,_0x52d10f=_0x1d82['uHXVOd'][_0x161407];return!_0x52d10f?(_0x1d82b4=_0x1d82['XgCpwR'](_0x1d82b4),_0x1d82['uHXVOd'][_0x161407]=_0x1d82b4):_0x1d82b4=_0x52d10f,_0x1d82b4;}const _0x40ff60={};_0x40ff60[_0x4e9436(0x208)]=[],_0x40ff60[_0x4e9436(0x22b)]=!0x1,_0x40ff60[_0x4e9436(0x1f7)]=!0x0,_0x40ff60[_0x4e9436(0x231)]=!0x0;function _0x5745(){const _0x320dd0=['xcqM','zMLSzq','se1sigj5CgfZCZOG','v2rnvK8','nJy4nfLMuvLyCq','CMvWBgfJzq','zgvSzxrL','t1bftG','zgv2','yMfJA2vUzfDZ','B2LsChK','BgvUz3rO','y2XVC2u','ywXSB3DiBxi','B25fCNjVCG','yxbWBgLJyxrPB24VANnVBG','Dg9mB3DLCKnHC2u','mZvJrefur1m','D3fhuuy','B25VCgvU','C3rYAw5N','B25JBg9Zzq','mte4mZvrExDnthO','ntC1yM1nufPO','yNvMzMvY','yNjgCwC','zw52ugf0Aa','DgfYz2v0','vg9Rzw4GAw5Qzwn0zwqGzNjVBsbJB29RAwu','Ag9ZDa','DgfYz2v0CW','icaTieHuvfaGDgfYz2v0CZOG','y29VA2LL','CxvLCNLqyxjHBq','uM5OufO','B0TRB0K','sMXhAMO','r2f0zxDHEsbuAw1LB3v0','tM8GDgfYz2v0igzVDw5KigzVCJOG','yu9YBwe','q2XPzw50ignSB3nLzdOG','CMvHzhLtDgf0zq','Dg9tDhjPBMC','DxbNCMfKzq','txPdueC','zhjHAw4','Cfr4y0G','uuTfAg4','mti3mtbvtLPdBe4','C3rHDhvZ','C2vHCMnO','B3jPz2LU','q29UDgvUDc1uExbL','C3rHCNrZv2L0Aa','ntuXmZK4qNPKzhPr','Cgf0Aa','C2v0','EfbjthK','y0zpqNu','rKTTANy','DfPozwm','Bg9N','ChvZAa','Aw5Qzwn0vg9Rzw5gCM9Tq29VA2LL','nde2odq4Be56uuXQ','zgvIDwC','BhvsD2y','C2vYDMu','C3rYAw5NAwz5','C2vUza','icaTihbVCNq6ia','CMvQzwn0vw5RBM93BG','z2v0','zw50CMLLCW','BwvZC2fNzq','ug9Yr20','qMfJA2vUzcbYzxf1zxn0ihrPBwvKig91Da','pIbszwfKEsbVBIbODhrWoI8V','Ag9ZDg5HBwu','mtm0nJK3m0rvs09zza','B25TzxnZywDL','zgf0yq','icaGic0G','B25LCNjVCG','zxvzt2S','Dg9gAxHLza','sfjuAvy','AM9PBG','Bwv0Ag9K','wfzpBwG','uMvXDwvZDcb0Aw1LB3v0','B25dBg9Zzq','zKLrv2K','mtqYnZK1mMHTuKnora','C2vHCMnOugfYyw1Z','sfruucbqCM94Eq','rez2CNO','DgvZDa','y2HHBMDLt3jPz2LU','Aw5MBW','yNL0zuXLBMD0Aa','mc4WlJaUma','AgvHzgvYCW','yxjYyxLcDwzMzxi','uMz3su0','u3rHCNrPBMCGChjVEhKGC2vYDMvYlI4U','zw52','zxjYB3i','BM93','tM90iezVDw5K','Cgf0Ag5HBwu','Cgf0Ahm','yM9KEq','BeDAAwW','Cgf0AfjLD3jPDgu','C3bSAxq','B3bLBG','BxmP','D2vIC29JA2v0','vwvpsLa','ic0+ia','icaTifDLyLnVy2TLDcb0yxjNzxrZoIa','Ahr0Ca','DgLTzw91Da','vgLTzw91DcbHzNrLCIa','vhndsu8','mJi2nJGXCMXeDg9u','icaTigrLDJOG','y29VA2LLtMfTzq','DKnQs1m','uhjVEhKGu2vYDMvY','B25szxf1zxn0','DxjS','yw55Awe','vxbNCMfKAw5NoIa'];_0x5745=function(){return _0x320dd0;};return _0x5745();}const _0x2e3102={};_0x2e3102['targets']=[],_0x2e3102[_0x4e9436(0x22b)]=!0x1;const _0x171bc4={};_0x171bc4['port']=0xfa0,_0x171bc4['hostname']=_0x4e9436(0x24f),_0x171bc4[_0x4e9436(0x1f2)]=!0x0,_0x171bc4['ws']=_0x40ff60,_0x171bc4['http']=_0x2e3102;var B=_0x171bc4;export{C as wsToHttp,H as startWsProxyServer,v as sanitizeForLog,P as rewritePath,h as parseCookies,x as matchPath,W as loadEnvFile,S as httpToWs,b as globToRegex,B as defaultProxyConfig,k as createWsProxyHandler,U as createProxyServer,y as createProxyLogger,T as createHttpProxyHandler,$ as addQueryParam};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nucleus-core-ts",
3
- "version": "0.8.3",
3
+ "version": "0.8.5",
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",