@treasuredata/tdx 0.2.5 → 0.2.7
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/build-info.json +2 -2
- package/dist/cli.js +1 -1
- package/dist/client/cdp-client.js +1 -1
- package/dist/client/http-client.js +1 -1
- package/dist/client/llm-client.js +1 -1
- package/dist/client/llm-client.js.map +1 -1
- package/dist/client/rate-limiter.js +1 -1
- package/dist/client/td-client.js +1 -1
- package/dist/client/trino-client.js +1 -1
- package/dist/client/workflow-client.js +1 -1
- package/dist/commands/activations.js +1 -1
- package/dist/commands/api-command.js +1 -1
- package/dist/commands/chat-command.js +1 -1
- package/dist/commands/claude-command.js +1 -1
- package/dist/commands/command.js +1 -1
- package/dist/commands/context-command.js +1 -1
- package/dist/commands/databases.js +1 -1
- package/dist/commands/describe.js +1 -1
- package/dist/commands/job-command.js +1 -1
- package/dist/commands/llm-command.js +1 -1
- package/dist/commands/llm-proxy.js +1 -1
- package/dist/commands/parent-segment-command.js +1 -1
- package/dist/commands/profiles-command.js +1 -1
- package/dist/commands/query-command.js +1 -1
- package/dist/commands/segment-command.js +1 -1
- package/dist/commands/segment-create-command.js +1 -1
- package/dist/commands/segment-fields-command.js +1 -1
- package/dist/commands/segment-pwd-command.js +1 -1
- package/dist/commands/segment-update-command.js +1 -1
- package/dist/commands/segment-use-command.js +1 -1
- package/dist/commands/segments.js +1 -1
- package/dist/commands/show.js +1 -1
- package/dist/commands/tables.js +1 -1
- package/dist/commands/use-command.js +1 -1
- package/dist/commands/workflow-command.js +1 -1
- package/dist/core/auth.js +1 -1
- package/dist/core/config.js +1 -1
- package/dist/core/global-context.js +1 -1
- package/dist/core/profile.js +1 -1
- package/dist/core/project-config.js +1 -1
- package/dist/core/session.js +1 -1
- package/dist/index.js +1 -1
- package/dist/proxy/anthropic-adapter.js +1 -1
- package/dist/proxy/server.d.ts.map +1 -1
- package/dist/proxy/server.js +1 -1
- package/dist/proxy/server.js.map +1 -1
- package/dist/proxy/session-cache.d.ts +3 -1
- package/dist/proxy/session-cache.d.ts.map +1 -1
- package/dist/proxy/session-cache.js +1 -1
- package/dist/proxy/session-cache.js.map +1 -1
- package/dist/sdk/api.js +1 -1
- package/dist/sdk/database.js +1 -1
- package/dist/sdk/errors.js +1 -1
- package/dist/sdk/index.js +1 -1
- package/dist/sdk/job.js +1 -1
- package/dist/sdk/llm.js +1 -1
- package/dist/sdk/query.js +1 -1
- package/dist/sdk/segment.js +1 -1
- package/dist/sdk/table.js +1 -1
- package/dist/sdk/workflow.js +1 -1
- package/dist/types/endpoints.js +1 -1
- package/dist/types/index.js +1 -1
- package/dist/utils/agent-ref-parser.js +1 -1
- package/dist/utils/chat-cache.js +1 -1
- package/dist/utils/colors.js +1 -1
- package/dist/utils/command-output.js +1 -1
- package/dist/utils/constants.js +1 -1
- package/dist/utils/file-permissions.js +1 -1
- package/dist/utils/format-detector.js +1 -1
- package/dist/utils/formatters.js +1 -1
- package/dist/utils/json-loader.js +1 -1
- package/dist/utils/model-aliases.js +1 -1
- package/dist/utils/option-validation.js +1 -1
- package/dist/utils/port.js +1 -1
- package/dist/utils/process.js +1 -1
- package/dist/utils/prompt.js +1 -1
- package/dist/utils/segment-path-parser.js +1 -1
- package/dist/utils/segment-ref-parser.js +1 -1
- package/dist/utils/spinner.js +1 -1
- package/dist/utils/sql-parser.js +1 -1
- package/dist/utils/sse-parser.js +1 -1
- package/dist/utils/string-utils.js +1 -1
- package/dist/utils/table-ref-parser.js +1 -1
- package/dist/utils/tdx-logger.js +1 -1
- package/dist/utils/tree-formatter.js +1 -1
- package/dist/utils/version-check.js +1 -1
- package/dist/utils/workflow-utils.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a74_0x4b4c(_0x4b8310,_0x2fd7a9){const _0x2ab28e=a74_0x2ab2();return a74_0x4b4c=function(_0x4b4c7f,_0x4f60b3){_0x4b4c7f=_0x4b4c7f-0x1c2;let _0x1ac044=_0x2ab28e[_0x4b4c7f];return _0x1ac044;},a74_0x4b4c(_0x4b8310,_0x2fd7a9);}(function(_0x28ba21,_0x3ad2f7){const _0x1c940e=a74_0x4b4c,_0x1b9671=_0x28ba21();while(!![]){try{const _0x23ad29=-parseInt(_0x1c940e(0x1ca))/0x1+parseInt(_0x1c940e(0x1c3))/0x2+-parseInt(_0x1c940e(0x1c7))/0x3*(parseInt(_0x1c940e(0x1c5))/0x4)+parseInt(_0x1c940e(0x1c9))/0x5*(-parseInt(_0x1c940e(0x1c6))/0x6)+-parseInt(_0x1c940e(0x1c8))/0x7+-parseInt(_0x1c940e(0x1cb))/0x8*(parseInt(_0x1c940e(0x1c2))/0x9)+parseInt(_0x1c940e(0x1c4))/0xa;if(_0x23ad29===_0x3ad2f7)break;else _0x1b9671['push'](_0x1b9671['shift']());}catch(_0x4a5b5c){_0x1b9671['push'](_0x1b9671['shift']());}}}(a74_0x2ab2,0x53b0d));export function parseSegmentRef(_0x23be49){const _0x126b16=a74_0x4b4c,_0x2570bb=_0x23be49[_0x126b16(0x1ce)]('/');if(_0x2570bb===-0x1)return{'parentId':_0x23be49};if(_0x2570bb===0x0)throw new Error('Invalid\x20segment\x20reference\x20format:\x20'+_0x23be49+_0x126b16(0x1cc));const _0x415fa8=_0x23be49['substring'](0x0,_0x2570bb),_0x544fc7=_0x23be49['substring'](_0x2570bb+0x1);if(_0x544fc7==='')throw new Error('Invalid\x20segment\x20reference\x20format:\x20'+_0x23be49+_0x126b16(0x1cd));return{'parentId':_0x415fa8,'childId':_0x544fc7};}function a74_0x2ab2(){const _0x467173=['19731180cwxUSC','211116mlHuxg','799698rgpeRs','6iCgKyA','3790990LQiKXq','5mtfOJD','330386XhOjxE','4823608KZUsBY','.\x20Parent\x20name\x20cannot\x20be\x20empty','.\x20Child\x20name\x20cannot\x20be\x20empty','indexOf','9oBeFvy','166854TySFTZ'];a74_0x2ab2=function(){return _0x467173;};return a74_0x2ab2();}
|
package/dist/utils/spinner.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a75_0x1596(){const _0x1452e3=['1212AmjJmi','1425477kgwACb','6759805jrqwiV','stop','floor','clock','12436cLQvuH','toFixed','start','jobId','extra','5183787XBIfzt','cyan','1483630CaYmpN','...','phase','text','\x20[Job\x20ID:\x20','12994360tOMzqV','now','isTTY','6945240MfJWpe'];a75_0x1596=function(){return _0x1452e3;};return a75_0x1596();}(function(_0x545864,_0x298e3d){const _0x3f9751=a75_0x53de,_0x2b9b6e=_0x545864();while(!![]){try{const _0x2718e6=-parseInt(_0x3f9751(0x12d))/0x1+parseInt(_0x3f9751(0x139))/0x2+parseInt(_0x3f9751(0x12c))/0x3*(parseInt(_0x3f9751(0x132))/0x4)+parseInt(_0x3f9751(0x12e))/0x5+parseInt(_0x3f9751(0x12b))/0x6+-parseInt(_0x3f9751(0x137))/0x7+-parseInt(_0x3f9751(0x13e))/0x8;if(_0x2718e6===_0x298e3d)break;else _0x2b9b6e['push'](_0x2b9b6e['shift']());}catch(_0x3a14d2){_0x2b9b6e['push'](_0x2b9b6e['shift']());}}}(a75_0x1596,0xaf0ef));import a75_0xb2bf97 from'ora';function a75_0x53de(_0x540a27,_0x1ba888){const _0x1596b0=a75_0x1596();return a75_0x53de=function(_0x53de8f,_0x96c421){_0x53de8f=_0x53de8f-0x129;let _0x27b9c5=_0x1596b0[_0x53de8f];return _0x27b9c5;},a75_0x53de(_0x540a27,_0x1ba888);}export function createCommandSpinner(_0x28447b,_0x5282d1={}){const _0xb55878=a75_0x53de,{verbose:verbose=![],forceEnabled:forceEnabled=![]}=_0x5282d1;return a75_0xb2bf97({'text':_0x28447b,'color':_0xb55878(0x138),'isEnabled':forceEnabled||process['stdout'][_0xb55878(0x12a)]&&!verbose});}export async function withSpinner(_0x36f5b2,_0x127b93,_0x4920d8={}){const _0x3208ae=a75_0x53de,_0x18ffc2=_0x4920d8['clock']??(()=>Date[_0x3208ae(0x129)]()),_0x4e0e2c=createCommandSpinner(_0x36f5b2,_0x4920d8);_0x4e0e2c[_0x3208ae(0x134)]();const _0x2a9c30=_0x18ffc2();try{const _0x160efd=await _0x127b93(),_0x10fc6d=_0x18ffc2()-_0x2a9c30;return _0x4e0e2c[_0x3208ae(0x12f)](),{'data':_0x160efd,'elapsedMs':_0x10fc6d};}catch(_0x3bd996){_0x4e0e2c[_0x3208ae(0x12f)]();throw _0x3bd996;}}export async function withQuerySpinner(_0x6e5505,_0x5d67e0,_0x171cec={}){const _0x25b591=a75_0x53de,_0x1dce6b=_0x171cec[_0x25b591(0x131)]??(()=>Date['now']()),_0x1a0101=_0x171cec['intervalFactory']??setInterval,_0x13472d=createCommandSpinner(_0x6e5505,_0x171cec);_0x13472d['start']();const _0x105cbb=_0x1dce6b(),_0x5a9efc=_0x6e5505['replace'](_0x25b591(0x13a),''),_0x437a9b={},_0x4bf356=()=>{const _0x5c4e8c=_0x25b591;if(!_0x13472d['isSpinning'])return;const _0x330a96=_0x1dce6b()-_0x105cbb,_0xd28214=formatElapsed(_0x330a96),_0x298ddc=_0x437a9b[_0x5c4e8c(0x13b)]??_0x5a9efc,_0x2a979e=_0x437a9b[_0x5c4e8c(0x135)]?_0x5c4e8c(0x13d)+_0x437a9b[_0x5c4e8c(0x135)]+']':'',_0x3a0639=_0x437a9b[_0x5c4e8c(0x136)]?'\x20'+_0x437a9b['extra']:'';_0x13472d[_0x5c4e8c(0x13c)]=_0x298ddc+'\x20'+_0xd28214+_0x3a0639+_0x2a979e;},_0x1bee59=_0x1a0101(()=>{_0x4bf356();},0x3e8),_0x30aa10={'setPhase':_0x4c54be=>{const _0x5ed6f8=_0x25b591;_0x437a9b[_0x5ed6f8(0x13b)]=_0x4c54be,_0x4bf356();},'setJobId':_0x23ac71=>{const _0x29d468=_0x25b591;_0x437a9b[_0x29d468(0x135)]=_0x23ac71,_0x4bf356();},'setExtra':_0x18c4d2=>{const _0x2fa53a=_0x25b591;_0x437a9b[_0x2fa53a(0x136)]=_0x18c4d2,_0x4bf356();}};_0x4bf356();try{const _0x5a327b=await _0x5d67e0(_0x30aa10),_0x55fb50=_0x1dce6b()-_0x105cbb;return{'data':_0x5a327b,'elapsedMs':_0x55fb50};}finally{clearInterval(_0x1bee59),_0x13472d['stop']();}}export function formatElapsed(_0x1abdc0){const _0x1f20bb=a75_0x53de,_0x26389d=Math[_0x1f20bb(0x130)](_0x1abdc0/0x3e8);if(_0x26389d<0x3c)return(_0x1abdc0/0x3e8)[_0x1f20bb(0x133)](0x1)+'s';const _0x14b3a2=Math['floor'](_0x26389d/0x3c),_0x3981d1=_0x26389d%0x3c;if(_0x14b3a2<0x3c)return _0x14b3a2+'m\x20'+_0x3981d1+'s';const _0x28253f=Math[_0x1f20bb(0x130)](_0x14b3a2/0x3c),_0x4f668d=_0x14b3a2%0x3c;return _0x28253f+'h\x20'+_0x4f668d+'m';}
|
package/dist/utils/sql-parser.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x47db78,_0x533cca){const _0x2782d7=a76_0x1767,_0x16b766=_0x47db78();while(!![]){try{const _0x1491a2=parseInt(_0x2782d7(0x1e5))/0x1*(-parseInt(_0x2782d7(0x1f8))/0x2)+-parseInt(_0x2782d7(0x1ea))/0x3+parseInt(_0x2782d7(0x1ed))/0x4*(-parseInt(_0x2782d7(0x1f7))/0x5)+parseInt(_0x2782d7(0x1fa))/0x6*(parseInt(_0x2782d7(0x1e9))/0x7)+parseInt(_0x2782d7(0x1fd))/0x8+parseInt(_0x2782d7(0x1ef))/0x9*(parseInt(_0x2782d7(0x1f2))/0xa)+-parseInt(_0x2782d7(0x1f1))/0xb;if(_0x1491a2===_0x533cca)break;else _0x16b766['push'](_0x16b766['shift']());}catch(_0x28e351){_0x16b766['push'](_0x16b766['shift']());}}}(a76_0x41ff,0xc5a6b));import{readFileSync}from'fs';export function stripSqlComments(_0x52373d){const _0x43c65e=a76_0x1767;let _0x259b03=_0x52373d[_0x43c65e(0x1f6)](/\/\*(?:[^*]|\*(?!\/))*\*\//g,'');return _0x259b03=_0x259b03[_0x43c65e(0x1f6)](/--.*$/gm,''),_0x259b03[_0x43c65e(0x1e7)]();}function a76_0x1767(_0x10853b,_0x665040){const _0x41ff91=a76_0x41ff();return a76_0x1767=function(_0x176746,_0x4c027e){_0x176746=_0x176746-0x1e4;let _0x82e187=_0x41ff91[_0x176746];return _0x82e187;},a76_0x1767(_0x10853b,_0x665040);}function isEscaped(_0x2d4e37,_0x272d3f){let _0x30a594=0x0;for(let _0x4324b9=_0x272d3f-0x1;_0x4324b9>=0x0&&_0x2d4e37[_0x4324b9]==='\x5c';_0x4324b9--){_0x30a594++;}return _0x30a594%0x2===0x1;}export function splitSqlStatements(_0x1b2f54){const _0x430fc9=a76_0x1767,_0x4ab1c0=stripSqlComments(_0x1b2f54);if(!_0x4ab1c0)throw new Error(_0x430fc9(0x1f9));const _0x2ac928=[];let _0x37e1d7='',_0x6facad=![],_0x4c2538=![],_0x215a8d=![];for(let _0xf02ca9=0x0;_0xf02ca9<_0x1b2f54[_0x430fc9(0x1fb)];_0xf02ca9++){const _0x1edf59=_0x1b2f54[_0xf02ca9];if(_0x1edf59==='\x27'&&!isEscaped(_0x1b2f54,_0xf02ca9)&&!_0x4c2538&&!_0x215a8d)_0x6facad=!_0x6facad;else{if(_0x1edf59==='\x22'&&!isEscaped(_0x1b2f54,_0xf02ca9)&&!_0x6facad&&!_0x215a8d)_0x4c2538=!_0x4c2538;else _0x1edf59==='`'&&!isEscaped(_0x1b2f54,_0xf02ca9)&&!_0x6facad&&!_0x4c2538&&(_0x215a8d=!_0x215a8d);}if(_0x1edf59===';'&&!_0x6facad&&!_0x4c2538&&!_0x215a8d){const _0x591799=_0x37e1d7[_0x430fc9(0x1e7)]();_0x591799&&_0x2ac928['push'](_0x591799),_0x37e1d7='';}else _0x37e1d7+=_0x1edf59;}const _0x344665=_0x37e1d7['trim']();_0x344665&&_0x2ac928[_0x430fc9(0x1fc)](_0x344665);const _0x3752b0=_0x2ac928[_0x430fc9(0x1f3)](_0x2f1df3=>_0x2f1df3[_0x430fc9(0x1e7)]())[_0x430fc9(0x1e6)](_0x52120a=>{const _0x6fe2d2=_0x430fc9,_0xf424e=stripSqlComments(_0x52120a);return _0xf424e[_0x6fe2d2(0x1fb)]>0x0;});if(_0x3752b0[_0x430fc9(0x1fb)]===0x0)throw new Error(_0x430fc9(0x1f9));return _0x3752b0;}export function readFileContent(_0x365101){const _0x42c624=a76_0x1767;try{return readFileSync(_0x365101,_0x42c624(0x1ec));}catch(_0x57037a){const _0x278adc=_0x57037a['code'];if(_0x278adc===_0x42c624(0x1e4))throw new Error(_0x42c624(0x1f4)+_0x365101+'\x27\x20not\x20found');else{if(_0x278adc===_0x42c624(0x1f5))throw new Error(_0x42c624(0x1fe)+_0x365101+'\x27');else throw new Error(_0x42c624(0x1f0)+_0x365101+_0x42c624(0x1e8)+_0x57037a[_0x42c624(0x1eb)]);}}}function a76_0x41ff(){const _0x1a4185=['3263832BriTKK','10jlbTOw','map','File\x20\x27','EACCES','replace','30QQtCVv','4LgdLGC','Content\x20contains\x20no\x20SQL\x20statements','462xCDcxk','length','push','11023008Vizneb','Permission\x20denied\x20reading\x20file\x20\x27','ENOENT','290620WBAdFC','filter','trim','\x27:\x20','89887oTJMbn','1313367DpRxbz','message','utf-8','943772CSdYwc','toLowerCase','10569105iojChf','Error\x20reading\x20file\x20\x27'];a76_0x41ff=function(){return _0x1a4185;};return a76_0x41ff();}export function readSqlStatementsFromFile(_0x2bfd9d){const _0x2ff9b5=a76_0x1767,_0x384d3f=readFileContent(_0x2bfd9d);try{return splitSqlStatements(_0x384d3f);}catch(_0x38c086){throw new Error(_0x2ff9b5(0x1f4)+_0x2bfd9d+'\x27\x20'+_0x38c086[_0x2ff9b5(0x1eb)][_0x2ff9b5(0x1ee)]());}}
|
package/dist/utils/sse-parser.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a77_0x3f2c(){const _0x2e9ca4=['2141060mmHdcQ','846833iPAZvl','Response\x20body\x20is\x20null','startsWith','683258hWdefN','decode','576650FTKOCk','11WbyohD','413YlFBkw','indexOf','event','79302PhVDCN','4hsewKT','trim','708429fLHXcy','data','9CfWzBy','getReader','slice','13964632dNrcSA','Failed\x20to\x20parse\x20SSE\x20data\x20as\x20JSON:\x20','276gqbsVn','parse','28SHCRGf','split'];a77_0x3f2c=function(){return _0x2e9ca4;};return a77_0x3f2c();}(function(_0x3ec2f9,_0x4a51a1){const _0x555e7b=a77_0x4892,_0x36834a=_0x3ec2f9();while(!![]){try{const _0x553e88=parseInt(_0x555e7b(0x84))/0x1*(-parseInt(_0x555e7b(0x73))/0x2)+-parseInt(_0x555e7b(0x75))/0x3*(-parseInt(_0x555e7b(0x7e))/0x4)+-parseInt(_0x555e7b(0x6d))/0x5+-parseInt(_0x555e7b(0x72))/0x6*(-parseInt(_0x555e7b(0x6f))/0x7)+parseInt(_0x555e7b(0x7a))/0x8*(-parseInt(_0x555e7b(0x77))/0x9)+parseInt(_0x555e7b(0x80))/0xa*(parseInt(_0x555e7b(0x6e))/0xb)+-parseInt(_0x555e7b(0x7c))/0xc*(-parseInt(_0x555e7b(0x81))/0xd);if(_0x553e88===_0x4a51a1)break;else _0x36834a['push'](_0x36834a['shift']());}catch(_0x2ce7a9){_0x36834a['push'](_0x36834a['shift']());}}}(a77_0x3f2c,0xe00e0));function a77_0x4892(_0x489504,_0x345c60){const _0x3f2c25=a77_0x3f2c();return a77_0x4892=function(_0x4892f5,_0x5f3eaf){_0x4892f5=_0x4892f5-0x6c;let _0x2e4686=_0x3f2c25[_0x4892f5];return _0x2e4686;},a77_0x4892(_0x489504,_0x345c60);}export async function*parseSSEStream(_0xbe45ad){const _0x116552=a77_0x4892;if(!_0xbe45ad['body'])throw new Error(_0x116552(0x82));const _0x1d9c5d=_0xbe45ad['body'][_0x116552(0x78)](),_0x84c31=new TextDecoder();let _0xc6f4eb='',_0x1420c1={};try{while(!![]){const {done:_0x788838,value:_0x30fdd9}=await _0x1d9c5d['read']();if(_0x788838){_0x1420c1[_0x116552(0x76)]&&(yield parseSSEData(_0x1420c1[_0x116552(0x76)]));break;}_0xc6f4eb+=_0x84c31[_0x116552(0x6c)](_0x30fdd9,{'stream':!![]});const _0x5a664e=_0xc6f4eb[_0x116552(0x7f)]('\x0a');_0xc6f4eb=_0x5a664e['pop']()||'';for(const _0x257aaf of _0x5a664e){if(_0x257aaf[_0x116552(0x74)]()===''){_0x1420c1[_0x116552(0x76)]&&(yield parseSSEData(_0x1420c1[_0x116552(0x76)]),_0x1420c1={});continue;}if(_0x257aaf[_0x116552(0x83)](':'))continue;const _0x340cbe=_0x257aaf[_0x116552(0x70)](':');if(_0x340cbe===-0x1)continue;const _0x2f04d2=_0x257aaf[_0x116552(0x79)](0x0,_0x340cbe);let _0xddacfa=_0x257aaf[_0x116552(0x79)](_0x340cbe+0x1);_0xddacfa[_0x116552(0x83)]('\x20')&&(_0xddacfa=_0xddacfa[_0x116552(0x79)](0x1));switch(_0x2f04d2){case _0x116552(0x71):_0x1420c1[_0x116552(0x71)]=_0xddacfa;break;case'data':_0x1420c1['data']=_0x1420c1[_0x116552(0x76)]?_0x1420c1[_0x116552(0x76)]+'\x0a'+_0xddacfa:_0xddacfa;break;case'id':_0x1420c1['id']=_0xddacfa;break;}}}}finally{_0x1d9c5d['releaseLock']();}}function parseSSEData(_0x2ff8f5){const _0x45100c=a77_0x4892;try{return JSON[_0x45100c(0x7d)](_0x2ff8f5);}catch(_0x27dde8){throw new Error(_0x45100c(0x7b)+_0x2ff8f5,{'cause':_0x27dde8});}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x342850,_0x9339e1){const _0x4e28ed=a78_0x52eb,_0x4d3f4b=_0x342850();while(!![]){try{const _0x41c625=-parseInt(_0x4e28ed(0x6d))/0x1+parseInt(_0x4e28ed(0x71))/0x2*(parseInt(_0x4e28ed(0x6f))/0x3)+-parseInt(_0x4e28ed(0x66))/0x4+-parseInt(_0x4e28ed(0x75))/0x5+-parseInt(_0x4e28ed(0x69))/0x6+-parseInt(_0x4e28ed(0x6e))/0x7*(-parseInt(_0x4e28ed(0x6c))/0x8)+parseInt(_0x4e28ed(0x76))/0x9;if(_0x41c625===_0x9339e1)break;else _0x4d3f4b['push'](_0x4d3f4b['shift']());}catch(_0x7ff6ce){_0x4d3f4b['push'](_0x4d3f4b['shift']());}}}(a78_0x2749,0xc0e10));function a78_0x2749(){const _0x1f4550=['slice','5969944uzOLsJ','unknown','padStart','7273452mLCnnp','floor','test','3963000OQBobO','439540xiDkZm','21nhEANv','8973RGcoJx','trim','366TMKMDu','USERNAME','env','replace','1276950CcIfiU','19405908QpOqNK','Cannot\x20escape\x20empty\x20string\x20literal','repeat','length','Cannot\x20build\x20LIKE\x20pattern\x20from\x20empty\x20string','\x5c$&'];a78_0x2749=function(){return _0x1f4550;};return a78_0x2749();}import a78_0x5c56ae from'string-width';export function stringWidth(_0x573ebc){return a78_0x5c56ae(_0x573ebc);}export function padEnd(_0x4eb28e,_0x3e7eb1){const _0x46988d=stringWidth(_0x4eb28e);if(_0x46988d>=_0x3e7eb1)return _0x4eb28e;return _0x4eb28e+'\x20'['repeat'](_0x3e7eb1-_0x46988d);}export function padStart(_0x4cb864,_0x526cb0){const _0x165873=a78_0x52eb,_0x2d3555=stringWidth(_0x4cb864);if(_0x2d3555>=_0x526cb0)return _0x4cb864;return'\x20'[_0x165873(0x78)](_0x526cb0-_0x2d3555)+_0x4cb864;}function a78_0x52eb(_0x16bce5,_0x385e0c){const _0x274945=a78_0x2749();return a78_0x52eb=function(_0x52ebfd,_0x43e335){_0x52ebfd=_0x52ebfd-0x65;let _0x3243fc=_0x274945[_0x52ebfd];return _0x3243fc;},a78_0x52eb(_0x16bce5,_0x385e0c);}export function centerAlign(_0x17cc19,_0x4c3570){const _0x1251c8=a78_0x52eb,_0xbf73aa=stringWidth(_0x17cc19);if(_0xbf73aa>_0x4c3570){if(_0x4c3570<=0x1)return'…'['substring'](0x0,_0x4c3570);let _0x41735f=_0x17cc19;while(stringWidth(_0x41735f+'…')>_0x4c3570){_0x41735f=_0x41735f[_0x1251c8(0x65)](0x0,-0x1);}return _0x41735f+'…';}if(_0xbf73aa===_0x4c3570)return _0x17cc19;const _0x474598=_0x4c3570-_0xbf73aa,_0x567bf2=Math[_0x1251c8(0x6a)](_0x474598/0x2),_0x30bddd=_0x474598-_0x567bf2;return'\x20'[_0x1251c8(0x78)](_0x567bf2)+_0x17cc19+'\x20'[_0x1251c8(0x78)](_0x30bddd);}export function escapeStringLiteral(_0x416cc3){const _0x454485=a78_0x52eb;if(!_0x416cc3||_0x416cc3[_0x454485(0x70)]()['length']===0x0)throw new Error(_0x454485(0x77));const _0x15c480=_0x416cc3['replace'](/'/g,'\x27\x27');return'\x27'+_0x15c480+'\x27';}export function globToLike(_0x7e0221){const _0x2951e8=a78_0x52eb;let _0x58d849=_0x7e0221[_0x2951e8(0x74)](/\\/g,'\x5c\x5c')[_0x2951e8(0x74)](/%/g,'\x5c%')[_0x2951e8(0x74)](/_/g,'\x5c_');return _0x58d849=_0x58d849[_0x2951e8(0x74)](/\*/g,'%')['replace'](/\?/g,'_'),_0x58d849;}export function buildLikePattern(_0x218990){const _0x222b38=a78_0x52eb;if(!_0x218990||_0x218990[_0x222b38(0x70)]()[_0x222b38(0x79)]===0x0)throw new Error(_0x222b38(0x7a));const _0x248a79=globToLike(_0x218990),_0x5bd9a5=_0x248a79['replace'](/'/g,'\x27\x27');return'\x27'+_0x5bd9a5+'\x27';}export function matchGlobPattern(_0x211890,_0x5bebe6){const _0x478b8f=a78_0x52eb,_0x4f9441=_0x5bebe6[_0x478b8f(0x74)](/[.+^${}()|[\]\\]/g,_0x478b8f(0x7b))[_0x478b8f(0x74)](/\*/g,'.*')[_0x478b8f(0x74)](/\?/g,'.'),_0x4f6bb3=new RegExp('^'+_0x4f9441+'$');return _0x4f6bb3[_0x478b8f(0x6b)](_0x211890);}export function getSanitizedUsername(){const _0x5e7413=a78_0x52eb,_0x2a8918=process[_0x5e7413(0x73)]['USER']||process[_0x5e7413(0x73)][_0x5e7413(0x72)]||_0x5e7413(0x67);return _0x2a8918['replace'](/[^a-zA-Z0-9]/g,'')['toLowerCase']();}export function generateRandomHex(){const _0x52d460=a78_0x52eb,_0x2a39aa=Math['floor'](Math['random']()*0xfffff);return _0x2a39aa['toString'](0x10)[_0x52d460(0x68)](0x5,'0');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x434dcf,_0x2b24d2){const _0x100f6c=a79_0x1f10,_0xd23851=_0x434dcf();while(!![]){try{const _0x4c85ce=parseInt(_0x100f6c(0x108))/0x1*(-parseInt(_0x100f6c(0x10d))/0x2)+parseInt(_0x100f6c(0x10a))/0x3*(-parseInt(_0x100f6c(0x10b))/0x4)+-parseInt(_0x100f6c(0xf9))/0x5*(parseInt(_0x100f6c(0x105))/0x6)+parseInt(_0x100f6c(0xfc))/0x7+-parseInt(_0x100f6c(0xfd))/0x8+-parseInt(_0x100f6c(0x103))/0x9+-parseInt(_0x100f6c(0xf8))/0xa*(-parseInt(_0x100f6c(0x110))/0xb);if(_0x4c85ce===_0x2b24d2)break;else _0xd23851['push'](_0xd23851['shift']());}catch(_0x2f0ce1){_0xd23851['push'](_0xd23851['shift']());}}}(a79_0x2b49,0xd3507));function hasWildcard(_0x4e64c5){const _0x1ca334=a79_0x1f10;return _0x4e64c5[_0x1ca334(0xfa)]('*')||_0x4e64c5[_0x1ca334(0xfa)]('?');}function a79_0x1f10(_0xdc013,_0x2313a7){const _0x2b4976=a79_0x2b49();return a79_0x1f10=function(_0x1f102b,_0x43012c){_0x1f102b=_0x1f102b-0xf7;let _0x4224c0=_0x2b4976[_0x1f102b];return _0x4224c0;},a79_0x1f10(_0xdc013,_0x2313a7);}export function parseTableReference(_0x41d93c){const _0x51ba3a=a79_0x1f10;if(!_0x41d93c||_0x41d93c[_0x51ba3a(0x10e)]()[_0x51ba3a(0x104)]===0x0)throw new Error(_0x51ba3a(0x106));const _0x1c1020=_0x41d93c['trim'](),_0x3e7ac5={'original':_0x1c1020},_0x36e659=_0x1c1020[_0x51ba3a(0x102)]('.');if(_0x36e659['length']===0x1){const _0x29f299=_0x36e659[0x0];if(!_0x29f299)throw new Error(_0x51ba3a(0x101));_0x3e7ac5[_0x51ba3a(0x109)]=_0x29f299;}else{if(_0x36e659[_0x51ba3a(0x104)]===0x2){const [_0x2898e2,_0x2dd4c8]=_0x36e659;if(!_0x2898e2)throw new Error(_0x51ba3a(0xfb));if(!_0x2dd4c8)throw new Error('Table\x20part\x20cannot\x20be\x20empty\x20-\x20use\x20\x22*\x22\x20for\x20all\x20tables\x20(e.g.,\x20\x22mydb.*\x22)');_0x3e7ac5[_0x51ba3a(0x10f)]=_0x2898e2,_0x3e7ac5['table']=_0x2dd4c8;}else{if(_0x36e659['length']===0x3){const [_0x547f03,_0x111f19,_0x11c8a4]=_0x36e659;if(!_0x547f03||!_0x111f19||!_0x11c8a4)throw new Error(_0x51ba3a(0xf7));_0x3e7ac5[_0x51ba3a(0xff)]=_0x547f03,_0x3e7ac5['database']=_0x111f19,_0x3e7ac5['table']=_0x11c8a4;}else throw new Error(_0x51ba3a(0xfe));}}return _0x3e7ac5;}export function formatTableReference(_0x2fa26f){const _0x53e608=a79_0x1f10,_0x295380=[];return _0x2fa26f[_0x53e608(0xff)]&&_0x295380[_0x53e608(0x10c)](_0x2fa26f[_0x53e608(0xff)]),_0x2fa26f['database']&&_0x295380[_0x53e608(0x10c)](_0x2fa26f[_0x53e608(0x10f)]),_0x2fa26f[_0x53e608(0x109)]&&_0x295380['push'](_0x2fa26f[_0x53e608(0x109)]),_0x295380['join']('.');}export function validateTableListReference(_0x3eceb3){return undefined;}function a79_0x2b49(){const _0x4c2ebc=['1842090LrUrPI','4wADYck','push','166vKvaTj','trim','database','22zTkVRY','Invalid\x20catalog.database.table\x20format\x20-\x20all\x20parts\x20must\x20be\x20non-empty','23512720HiOEtI','35810XTIGUq','includes','Database\x20part\x20cannot\x20be\x20empty\x20-\x20use\x20\x22*\x22\x20for\x20all\x20databases\x20(e.g.,\x20\x22*.mytable\x22)','1110235bCWMqF','1548112yzCgGk','Invalid\x20pattern\x20format\x20-\x20too\x20many\x20dots\x20(max:\x20catalog.database.table)','catalog','Wildcards\x20are\x20not\x20allowed\x20in\x20database\x20name\x20for\x20describe\x20operation','Pattern\x20cannot\x20be\x20just\x20a\x20dot','split','10374975RxJfmk','length','426qdMPuS','Pattern\x20cannot\x20be\x20empty\x20or\x20whitespace-only','Table\x20name\x20is\x20required\x20for\x20describe\x20operation','18395oqZQcV','table'];a79_0x2b49=function(){return _0x4c2ebc;};return a79_0x2b49();}export function validateTableDescribeReference(_0x2383d4){const _0x5187e9=a79_0x1f10;if(!_0x2383d4[_0x5187e9(0x109)])return _0x5187e9(0x107);if(_0x2383d4['database']&&hasWildcard(_0x2383d4[_0x5187e9(0x10f)]))return _0x5187e9(0x100);if(hasWildcard(_0x2383d4['table']))return'Wildcards\x20are\x20not\x20allowed\x20in\x20table\x20name\x20for\x20describe\x20operation';return undefined;}
|
package/dist/utils/tdx-logger.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a80_0x4151c9=a80_0x39f0;function a80_0x39f0(_0x2b4838,_0x4135d8){const _0x1fa10f=a80_0x1fa1();return a80_0x39f0=function(_0x39f0fe,_0x1b2b38){_0x39f0fe=_0x39f0fe-0x1a4;let _0x5948c5=_0x1fa10f[_0x39f0fe];return _0x5948c5;},a80_0x39f0(_0x2b4838,_0x4135d8);}(function(_0x32448b,_0xf54863){const _0x4f060f=a80_0x39f0,_0x1b22e2=_0x32448b();while(!![]){try{const _0x7f7d59=parseInt(_0x4f060f(0x1c5))/0x1+-parseInt(_0x4f060f(0x1c3))/0x2+-parseInt(_0x4f060f(0x1d2))/0x3*(parseInt(_0x4f060f(0x1a5))/0x4)+-parseInt(_0x4f060f(0x1ce))/0x5*(-parseInt(_0x4f060f(0x1ae))/0x6)+-parseInt(_0x4f060f(0x1bc))/0x7*(parseInt(_0x4f060f(0x1e0))/0x8)+-parseInt(_0x4f060f(0x1ab))/0x9*(-parseInt(_0x4f060f(0x1b3))/0xa)+parseInt(_0x4f060f(0x1ac))/0xb*(parseInt(_0x4f060f(0x1c6))/0xc);if(_0x7f7d59===_0xf54863)break;else _0x1b22e2['push'](_0x1b22e2['shift']());}catch(_0x34dbb0){_0x1b22e2['push'](_0x1b22e2['shift']());}}}(a80_0x1fa1,0x86787));import{createWriteStream,createReadStream}from'fs';function a80_0x1fa1(){const _0x5e6ff8=['map','2001336hzBHLT','getFullYear','abs','getDate','INFO','574124GWgpql','toString','getTimezoneOffset','ERROR','.log','filter','261jXkHYI','5534397ipSuvT','getMilliseconds','31254hxWmIf','logLevel','gray','cause','debug','2750TKgsYy','test','logDir','toISOString','Warning:\x20Error\x20writing\x20to\x20proxy.log:','info','proxy-','TRACE','error','21lJXaCZ','name','DEBUG','logStream','floor','Proxy\x20server\x20started','warn','1485794TtwBfF','getMinutes','123636XvTKzs','60qUSNYX','red','Warning:\x20Failed\x20to\x20initialize\x20proxy\x20log\x20files:','cyan','close','stack','getSeconds','write','110UHJjDz','message','split','end','15lwwyUW','mtime','getLogPath','proxy.log','padStart','.cache','stringify','WARN','rotateOldLogs','.gz','tdx','Proxy\x20session\x20ended','fileOnly'];a80_0x1fa1=function(){return _0x5e6ff8;};return a80_0x1fa1();}import{mkdir,readdir,unlink,stat,rename}from'fs/promises';import{join}from'path';import{homedir}from'os';import{createGzip}from'zlib';import{pipeline}from'stream/promises';import a80_0x2a4967 from'chalk';function safeStringify(_0x454697){const _0x1bf5f8=a80_0x39f0;if(typeof _0x454697==='string')return _0x454697;if(_0x454697 instanceof Error)return _0x454697[_0x1bf5f8(0x1cb)]||_0x454697['name']+':\x20'+_0x454697[_0x1bf5f8(0x1cf)];try{return JSON[_0x1bf5f8(0x1d8)](_0x454697,(_0x1ed6d1,_0x3f0093)=>{const _0x17b0b6=_0x1bf5f8;if(_0x3f0093 instanceof Error)return{'name':_0x3f0093[_0x17b0b6(0x1bd)],'message':_0x3f0093[_0x17b0b6(0x1cf)],'stack':_0x3f0093['stack'],'cause':_0x3f0093[_0x17b0b6(0x1b1)]};return _0x3f0093;});}catch{return String(_0x454697);}}function getTimezoneOffset(){const _0x3f1aec=a80_0x39f0,_0x598668=-new Date()[_0x3f1aec(0x1a7)](),_0x1d58cc=Math[_0x3f1aec(0x1c0)](Math[_0x3f1aec(0x1e2)](_0x598668)/0x3c),_0x134135=Math[_0x3f1aec(0x1e2)](_0x598668)%0x3c,_0x2f4eb1=_0x598668>=0x0?'+':'-';return''+_0x2f4eb1+_0x1d58cc[_0x3f1aec(0x1a6)]()[_0x3f1aec(0x1d6)](0x2,'0')+_0x134135[_0x3f1aec(0x1a6)]()[_0x3f1aec(0x1d6)](0x2,'0');}function formatTimestamp(){const _0x15b945=a80_0x39f0,_0x53a44c=new Date(),_0x5ac7f4=_0x53a44c[_0x15b945(0x1e1)](),_0x48f363=(_0x53a44c['getMonth']()+0x1)['toString']()['padStart'](0x2,'0'),_0x31fe0b=_0x53a44c[_0x15b945(0x1e3)]()['toString']()[_0x15b945(0x1d6)](0x2,'0'),_0x25dbde=_0x53a44c['getHours']()[_0x15b945(0x1a6)]()[_0x15b945(0x1d6)](0x2,'0'),_0xb8ad0f=_0x53a44c[_0x15b945(0x1c4)]()[_0x15b945(0x1a6)]()[_0x15b945(0x1d6)](0x2,'0'),_0x2ce0e1=_0x53a44c[_0x15b945(0x1cc)]()[_0x15b945(0x1a6)]()['padStart'](0x2,'0'),_0x42baaa=_0x53a44c[_0x15b945(0x1ad)]()[_0x15b945(0x1a6)]()[_0x15b945(0x1d6)](0x3,'0'),_0x130528=getTimezoneOffset();return _0x5ac7f4+'-'+_0x48f363+'-'+_0x31fe0b+'\x20'+_0x25dbde+':'+_0xb8ad0f+':'+_0x2ce0e1+'.'+_0x42baaa+_0x130528;}function formatColoredLogEntry(_0x57c2c1,_0x56e5aa){const _0xb6212=a80_0x39f0,_0x337733=formatTimestamp(),_0x5aea0d=_0x56e5aa[_0xb6212(0x1df)](safeStringify)['join']('\x20'),_0x14845d=a80_0x2a4967[_0xb6212(0x1b0)](_0x337733);let _0x3bb3aa;switch(_0x57c2c1){case'info':_0x3bb3aa=a80_0x2a4967[_0xb6212(0x1c9)]('['+_0x57c2c1+']\x20');break;case _0xb6212(0x1c2):_0x3bb3aa=a80_0x2a4967['yellow']('['+_0x57c2c1+']\x20');break;case _0xb6212(0x1bb):_0x3bb3aa=a80_0x2a4967[_0xb6212(0x1c7)]('['+_0x57c2c1+']');break;case _0xb6212(0x1b2):_0x3bb3aa=a80_0x2a4967[_0xb6212(0x1b0)]('['+_0x57c2c1+']');break;default:_0x3bb3aa='['+_0x57c2c1+']';}return _0x14845d+'\x20'+_0x3bb3aa+'\x20'+_0x5aea0d;}export var LogLevel;(function(_0x27b8fd){const _0xc66bc3=a80_0x39f0;_0x27b8fd[_0x27b8fd[_0xc66bc3(0x1ba)]=-0x2]=_0xc66bc3(0x1ba),_0x27b8fd[_0x27b8fd[_0xc66bc3(0x1be)]=-0x1]='DEBUG',_0x27b8fd[_0x27b8fd[_0xc66bc3(0x1a4)]=0x0]=_0xc66bc3(0x1a4),_0x27b8fd[_0x27b8fd[_0xc66bc3(0x1d9)]=0x1]=_0xc66bc3(0x1d9),_0x27b8fd[_0x27b8fd[_0xc66bc3(0x1a8)]=0x2]=_0xc66bc3(0x1a8);}(LogLevel||(LogLevel={})));export class TDXLogger{['logStream'];[a80_0x4151c9(0x1b5)];[a80_0x4151c9(0x1af)];[a80_0x4151c9(0x1de)];constructor(_0x416c29=LogLevel[a80_0x4151c9(0x1a4)],_0x5cdb94=![]){const _0x2523b1=a80_0x4151c9;this[_0x2523b1(0x1b5)]=join(homedir(),_0x2523b1(0x1d7),_0x2523b1(0x1dc),'logs'),this[_0x2523b1(0x1af)]=_0x416c29,this[_0x2523b1(0x1de)]=_0x5cdb94;}async['init'](){const _0x5bc653=a80_0x4151c9;try{await mkdir(this[_0x5bc653(0x1b5)],{'recursive':!![]}),await this[_0x5bc653(0x1da)]();const _0x22deaf=join(this['logDir'],_0x5bc653(0x1d5));this['logStream']=createWriteStream(_0x22deaf,{'flags':'a'}),this[_0x5bc653(0x1bf)]['on'](_0x5bc653(0x1bb),_0x3326e0=>{const _0x42af91=_0x5bc653;console[_0x42af91(0x1bb)](_0x42af91(0x1b7),_0x3326e0[_0x42af91(0x1cf)]);}),this[_0x5bc653(0x1b8)](_0x5bc653(0x1c1));}catch(_0x3aa337){console[_0x5bc653(0x1bb)](_0x5bc653(0x1c8),_0x3aa337);}}async['rotateOldLogs'](){const _0x14653e=a80_0x4151c9;try{const _0x65e178=await readdir(this[_0x14653e(0x1b5)]),_0x42f9b8=new Date()[_0x14653e(0x1b6)]()[_0x14653e(0x1d0)]('T')[0x0];if(_0x65e178['includes'](_0x14653e(0x1d5))){const _0x438657=join(this[_0x14653e(0x1b5)],_0x14653e(0x1d5)),_0x590a6f=await stat(_0x438657),_0x2214a2=new Date(_0x590a6f[_0x14653e(0x1d3)])[_0x14653e(0x1b6)]()[_0x14653e(0x1d0)]('T')[0x0];if(_0x2214a2<_0x42f9b8){const _0x31404a=join(this[_0x14653e(0x1b5)],_0x14653e(0x1b9)+_0x2214a2+_0x14653e(0x1a9));await rename(_0x438657,_0x31404a);}}const _0x4fc1fd=await readdir(this[_0x14653e(0x1b5)]),_0x1bb824=/^proxy-(\d{4}-\d{2}-\d{2})\.log$/,_0x433a63=_0x4fc1fd[_0x14653e(0x1aa)](_0x2591cc=>_0x1bb824[_0x14653e(0x1b4)](_0x2591cc));for(const _0x1c5b13 of _0x433a63){const _0x26aec3=join(this[_0x14653e(0x1b5)],_0x1c5b13),_0x47a0cc=join(this['logDir'],_0x1c5b13+_0x14653e(0x1db));try{await pipeline(createReadStream(_0x26aec3),createGzip(),createWriteStream(_0x47a0cc)),await unlink(_0x26aec3);}catch(_0xd831fc){console['error']('Warning:\x20Failed\x20to\x20compress\x20'+_0x1c5b13+':',_0xd831fc);}}}catch{}}['debug'](..._0x13664e){const _0x2a2edf=a80_0x4151c9;if(this['logLevel']>LogLevel[_0x2a2edf(0x1be)])return;const _0x54345a=formatColoredLogEntry('debug',_0x13664e);this['logStream']?.[_0x2a2edf(0x1cd)](_0x54345a+'\x0a');}['trace'](..._0x228e9e){const _0x5837dc=a80_0x4151c9;if(this[_0x5837dc(0x1af)]>LogLevel[_0x5837dc(0x1ba)])return;const _0x5540b9=formatColoredLogEntry('trace',_0x228e9e);this['logStream']?.['write'](_0x5540b9+'\x0a');}['info'](..._0x436a2e){const _0x1373c6=a80_0x4151c9;if(this[_0x1373c6(0x1af)]>LogLevel[_0x1373c6(0x1a4)])return;const _0x260a94=formatColoredLogEntry(_0x1373c6(0x1b8),_0x436a2e);!this['fileOnly']&&console['log'](_0x260a94),this[_0x1373c6(0x1bf)]?.['write'](_0x260a94+'\x0a');}[a80_0x4151c9(0x1c2)](..._0x3e4843){const _0x401457=a80_0x4151c9;if(this['logLevel']>LogLevel[_0x401457(0x1d9)])return;const _0x1359ab=formatColoredLogEntry(_0x401457(0x1c2),_0x3e4843);!this['fileOnly']&&console[_0x401457(0x1bb)](_0x1359ab),this[_0x401457(0x1bf)]?.[_0x401457(0x1cd)](_0x1359ab+'\x0a');}[a80_0x4151c9(0x1bb)](..._0x23124d){const _0x14af19=a80_0x4151c9,_0x34392c=formatColoredLogEntry(_0x14af19(0x1bb),_0x23124d);!this['fileOnly']&&console[_0x14af19(0x1bb)](_0x34392c),this[_0x14af19(0x1bf)]?.[_0x14af19(0x1cd)](_0x34392c+'\x0a');}async[a80_0x4151c9(0x1ca)](){const _0x2c3b56=a80_0x4151c9;return this[_0x2c3b56(0x1b8)](_0x2c3b56(0x1dd)),new Promise(_0x358e65=>{const _0x42872c=_0x2c3b56;this['logStream']?this[_0x42872c(0x1bf)][_0x42872c(0x1d1)](()=>{_0x358e65();}):_0x358e65();});}[a80_0x4151c9(0x1d4)](){const _0x15e086=a80_0x4151c9;return join(this[_0x15e086(0x1b5)],'proxy.log');}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a81_0x13e2(){const _0x49fa4e=['length','push','showMetadata','indent','\x20\x20\x20\x20','sort','1772145vYamKb','dim','localeCompare','└──\x20','showIcons','segment','12eATgHi','11494WYGiFj','\x20folder','showTreeLines','metadata','├──\x20','10jaOuNR','children','131332DGThsj','1224IcoAya','14591382ZLZjxe','1955620WcVfeF','population','segmentCount','\x20segment','11nXiJBS','572twXvqr','join','9yOCPVb','6122416tuQBRa','\x20\x20\x20','name','map','2417PPGbzR','type','folder','folderCount','icon'];a81_0x13e2=function(){return _0x49fa4e;};return a81_0x13e2();}(function(_0x2a42ac,_0x3a15cf){const _0x35adcd=a81_0x1363,_0x37f240=_0x2a42ac();while(!![]){try{const _0x40a220=-parseInt(_0x35adcd(0x1b7))/0x1*(-parseInt(_0x35adcd(0x1d8))/0x2)+-parseInt(_0x35adcd(0x1c2))/0x3+parseInt(_0x35adcd(0x1d0))/0x4*(parseInt(_0x35adcd(0x1ce))/0x5)+-parseInt(_0x35adcd(0x1d1))/0x6*(parseInt(_0x35adcd(0x1c9))/0x7)+-parseInt(_0x35adcd(0x1b3))/0x8*(parseInt(_0x35adcd(0x1b2))/0x9)+-parseInt(_0x35adcd(0x1d3))/0xa*(-parseInt(_0x35adcd(0x1d7))/0xb)+parseInt(_0x35adcd(0x1c8))/0xc*(parseInt(_0x35adcd(0x1d2))/0xd);if(_0x40a220===_0x3a15cf)break;else _0x37f240['push'](_0x37f240['shift']());}catch(_0x4fe08b){_0x37f240['push'](_0x37f240['shift']());}}}(a81_0x13e2,0x5dbaf));import{formatRows}from'./formatters.js';import a81_0x1b9488 from'chalk';const DEFAULT_OPTIONS={'showTreeLines':!![],'showIcons':!![],'showMetadata':!![],'indent':'\x20\x20'};export function formatTree(_0x1e55f9,_0x1fa406={},_0x2e0d75=0x0,_0x198615=''){const _0xef305e=a81_0x1363,_0x375fbb={...DEFAULT_OPTIONS,..._0x1fa406},_0x5d573b=[],_0xf36898=[..._0x1e55f9][_0xef305e(0x1c1)]((_0xf81865,_0x24f276)=>_0xf81865['name'][_0xef305e(0x1c4)](_0x24f276[_0xef305e(0x1b5)]));for(let _0x476d5b=0x0;_0x476d5b<_0xf36898[_0xef305e(0x1bc)];_0x476d5b++){const _0x196a69=_0xf36898[_0x476d5b],_0x306333=_0x476d5b===_0xf36898['length']-0x1;let _0x427273='';_0x2e0d75>0x0&&(_0x427273+=_0x198615);_0x375fbb[_0xef305e(0x1cb)]&&_0x2e0d75>0x0&&(_0x427273+=a81_0x1b9488[_0xef305e(0x1c3)](_0x306333?_0xef305e(0x1c5):_0xef305e(0x1cd)));_0x375fbb[_0xef305e(0x1c6)]&&(_0x427273+=_0x196a69[_0xef305e(0x1b8)]===_0xef305e(0x1b9)?'📁\x20':'🎯\x20');_0x427273+=_0x196a69[_0xef305e(0x1b5)];if(_0x375fbb[_0xef305e(0x1be)]){if(_0x196a69[_0xef305e(0x1b8)]===_0xef305e(0x1b9)){const _0x8e2926=[];_0x196a69['metadata'][_0xef305e(0x1d5)]&&_0x8e2926[_0xef305e(0x1bd)](_0x196a69[_0xef305e(0x1cc)][_0xef305e(0x1d5)]+_0xef305e(0x1d6)+(_0x196a69[_0xef305e(0x1cc)]['segmentCount']!==0x1?'s':'')),_0x196a69[_0xef305e(0x1cc)][_0xef305e(0x1ba)]&&_0x8e2926[_0xef305e(0x1bd)](_0x196a69[_0xef305e(0x1cc)][_0xef305e(0x1ba)]+_0xef305e(0x1ca)+(_0x196a69[_0xef305e(0x1cc)][_0xef305e(0x1ba)]!==0x1?'s':'')),_0x8e2926['length']>0x0&&(_0x427273+=a81_0x1b9488['dim']('\x20('+_0x8e2926[_0xef305e(0x1d9)](',\x20')+')'));}else _0x196a69[_0xef305e(0x1b8)]===_0xef305e(0x1c7)&&_0x196a69['population']!==undefined&&(_0x427273+=a81_0x1b9488['dim']('\x20('+formatRows(_0x196a69[_0xef305e(0x1d4)])+')'));}_0x5d573b[_0xef305e(0x1bd)](_0x427273);if(_0x196a69[_0xef305e(0x1cf)]&&_0x196a69[_0xef305e(0x1cf)][_0xef305e(0x1bc)]>0x0){let _0x5c5399;if(_0x2e0d75===0x0)_0x5c5399='';else _0x375fbb[_0xef305e(0x1cb)]?_0x5c5399=_0x198615+(_0x306333?_0xef305e(0x1c0):a81_0x1b9488['dim']('│')+_0xef305e(0x1b4)):_0x5c5399=_0x198615+_0x375fbb[_0xef305e(0x1bf)];const _0x5722b3=formatTree(_0x196a69[_0xef305e(0x1cf)],_0x375fbb,_0x2e0d75+0x1,_0x5c5399);_0x5d573b['push'](_0x5722b3);}}return _0x5d573b[_0xef305e(0x1d9)]('\x0a');}function a81_0x1363(_0x255a8b,_0x6515ca){const _0x13e2f1=a81_0x13e2();return a81_0x1363=function(_0x136324,_0x460581){_0x136324=_0x136324-0x1b2;let _0x305082=_0x13e2f1[_0x136324];return _0x305082;},a81_0x1363(_0x255a8b,_0x6515ca);}export function formatFlatList(_0x55bf89,_0x47e300,_0x27bc77={}){const _0xcaf075=a81_0x1363,_0x5e703a={...DEFAULT_OPTIONS,..._0x27bc77},_0x545375=[];for(const _0xc451cf of _0x55bf89){_0x545375[_0xcaf075(0x1bd)]({'name':_0xc451cf[_0xcaf075(0x1b5)],'icon':_0x5e703a[_0xcaf075(0x1c6)]?'📁':'','metadata':undefined});}for(const _0xab48b5 of _0x47e300){const _0x1a8805=_0x5e703a[_0xcaf075(0x1be)]&&_0xab48b5['population']!==undefined?a81_0x1b9488['dim']('\x20('+formatRows(_0xab48b5[_0xcaf075(0x1d4)])+')'):'';_0x545375[_0xcaf075(0x1bd)]({'name':_0xab48b5[_0xcaf075(0x1b5)],'icon':_0x5e703a[_0xcaf075(0x1c6)]?'🎯':'','metadata':_0x1a8805});}_0x545375[_0xcaf075(0x1c1)]((_0x49180d,_0x2328bd)=>_0x49180d[_0xcaf075(0x1b5)][_0xcaf075(0x1c4)](_0x2328bd[_0xcaf075(0x1b5)]));if(_0x545375['length']===0x0)return'(empty)';const _0x22bd64=_0x545375[_0xcaf075(0x1b6)](_0x3ef67c=>{const _0x46946e=_0xcaf075,_0x41b976=_0x3ef67c[_0x46946e(0x1bb)]?_0x3ef67c['icon']+'\x20':'',_0x443400=_0x3ef67c[_0x46946e(0x1cc)]||'';return''+_0x41b976+_0x3ef67c[_0x46946e(0x1b5)]+_0x443400;});return _0x22bd64[_0xcaf075(0x1d9)]('\x0a');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x5db9e3,_0x836a74){const _0x114657=a82_0x4c05,_0x44dd7a=_0x5db9e3();while(!![]){try{const _0x219b6b=parseInt(_0x114657(0x1a7))/0x1*(-parseInt(_0x114657(0x1bb))/0x2)+parseInt(_0x114657(0x1b9))/0x3+parseInt(_0x114657(0x1bf))/0x4*(parseInt(_0x114657(0x1c0))/0x5)+parseInt(_0x114657(0x1ad))/0x6*(-parseInt(_0x114657(0x1b2))/0x7)+-parseInt(_0x114657(0x1c1))/0x8*(parseInt(_0x114657(0x1a8))/0x9)+-parseInt(_0x114657(0x1aa))/0xa+-parseInt(_0x114657(0x1b1))/0xb*(-parseInt(_0x114657(0x19f))/0xc);if(_0x219b6b===_0x836a74)break;else _0x44dd7a['push'](_0x44dd7a['shift']());}catch(_0x9e7a86){_0x44dd7a['push'](_0x44dd7a['shift']());}}}(a82_0x2c1f,0x547f2));import{get}from'https';import{readFileSync,writeFileSync,mkdirSync}from'fs';import{join}from'path';import{gt,valid}from'semver';import a82_0x130712 from'chalk';import{getCacheDir}from'../core/config.js';const CACHE_DURATION_MS=0x18*0x3c*0x3c*0x3e8,NPM_REGISTRY_URL='https://registry.npmjs.org/@treasuredata/tdx/latest',TIMEOUT_MS=0x7d0;function getCacheFilePath(){const _0x5171a6=a82_0x4c05,_0x11f084=getCacheDir();return join(_0x11f084,_0x5171a6(0x1ae));}function a82_0x2c1f(){const _0x471030=['green','49211wwxFSy','36xKGNud','currentVersion','297980rFMdFQ','gray','toISOString','6osjUyj','last_version_check','stderr','latestVersion','3521397svkTpD','3221547CMMYVD','Invalid\x20version\x20format','dim','utf-8','error','parse','\x0aRun:\x20','1239024QcqxSb','statusCode','10lnBbKA','env','data','isTTY','689484FuWZan','5VTmutC','927176TcnHjv','NO_COLOR','Run:','npm\x20install\x20-g\x20@treasuredata/tdx@latest','stringify','yellow','36qnXGMF','getTime','HTTP\x20','version','end','updateAvailable','Update\x20available:'];a82_0x2c1f=function(){return _0x471030;};return a82_0x2c1f();}function readCache(){const _0x1cf732=a82_0x4c05;try{const _0x26ecd2=getCacheFilePath(),_0x2bb35b=readFileSync(_0x26ecd2,_0x1cf732(0x1b5));return JSON[_0x1cf732(0x1b7)](_0x2bb35b);}catch{return null;}}function writeCache(_0x11651d){const _0x1386ac=a82_0x4c05;try{const _0x2bfb07=getCacheDir();mkdirSync(_0x2bfb07,{'recursive':!![]});const _0x149c9e={'lastCheck':new Date()[_0x1386ac(0x1ac)](),'latestVersion':_0x11651d},_0x1c9370=getCacheFilePath();writeFileSync(_0x1c9370,JSON[_0x1386ac(0x1c5)](_0x149c9e,null,0x2),_0x1386ac(0x1b5));}catch{}}function isCacheValid(_0xf86b1e){const _0x26251d=a82_0x4c05;if(!_0xf86b1e)return![];const _0x1fb1a4=new Date(_0xf86b1e['lastCheck'])[_0x26251d(0x1a0)](),_0xd5cfd9=Date['now']();return _0xd5cfd9-_0x1fb1a4<CACHE_DURATION_MS;}function fetchLatestVersion(){return new Promise((_0x36f3d2,_0x424159)=>{const _0x145179=a82_0x4c05,_0x540dcd=get(NPM_REGISTRY_URL,_0x121add=>{const _0x57fc86=a82_0x4c05;if(_0x121add[_0x57fc86(0x1ba)]!==0xc8){clearTimeout(_0x1b57b6),_0x424159(new Error(_0x57fc86(0x1a1)+_0x121add[_0x57fc86(0x1ba)]));return;}let _0x13008c='';_0x121add['on'](_0x57fc86(0x1bd),_0x2beddb=>{_0x13008c+=_0x2beddb;}),_0x121add['on'](_0x57fc86(0x1a3),()=>{const _0x341b86=_0x57fc86;clearTimeout(_0x1b57b6);try{const _0x3dfea1=JSON[_0x341b86(0x1b7)](_0x13008c);if(!valid(_0x3dfea1[_0x341b86(0x1a2)])){_0x424159(new Error(_0x341b86(0x1b3)));return;}_0x36f3d2(_0x3dfea1['version']);}catch(_0x5b0358){_0x424159(_0x5b0358);}});})['on'](_0x145179(0x1b6),_0x33a89b=>{clearTimeout(_0x1b57b6),_0x424159(_0x33a89b);}),_0x1b57b6=setTimeout(()=>{_0x540dcd['destroy'](),_0x424159(new Error('Request\x20timeout'));},TIMEOUT_MS);});}function a82_0x4c05(_0x1f9e18,_0x6960dc){const _0x2c1fbc=a82_0x2c1f();return a82_0x4c05=function(_0x4c0512,_0x377cd5){_0x4c0512=_0x4c0512-0x19e;let _0x3c397f=_0x2c1fbc[_0x4c0512];return _0x3c397f;},a82_0x4c05(_0x1f9e18,_0x6960dc);}export async function checkForUpdate(_0x5efcd2){try{const _0x21ff6d=readCache();if(isCacheValid(_0x21ff6d)){const _0x652273=gt(_0x21ff6d['latestVersion'],_0x5efcd2);return{'updateAvailable':_0x652273,'currentVersion':_0x5efcd2,'latestVersion':_0x21ff6d['latestVersion']};}const _0x42dfc5=await fetchLatestVersion();writeCache(_0x42dfc5);const _0x5c0af1=gt(_0x42dfc5,_0x5efcd2);return{'updateAvailable':_0x5c0af1,'currentVersion':_0x5efcd2,'latestVersion':_0x42dfc5};}catch{return null;}}export function displayUpdateNotification(_0x1c690d){const _0x2b6550=a82_0x4c05;if(!_0x1c690d[_0x2b6550(0x1a4)])return;const _0x5577dc=process[_0x2b6550(0x1af)][_0x2b6550(0x1be)]&&!process[_0x2b6550(0x1bc)][_0x2b6550(0x1c2)],_0x26ce58=_0x5577dc?a82_0x130712[_0x2b6550(0x1ab)]('→'):'→',_0x5ca6f7=_0x5577dc?a82_0x130712['dim'](_0x1c690d[_0x2b6550(0x1a9)]):_0x1c690d[_0x2b6550(0x1a9)],_0x1d95bc=_0x5577dc?a82_0x130712[_0x2b6550(0x1a6)](_0x1c690d[_0x2b6550(0x1b0)]):_0x1c690d[_0x2b6550(0x1b0)],_0x32267c=_0x5577dc?a82_0x130712['cyan'](_0x2b6550(0x1c4)):_0x2b6550(0x1c4),_0x140185=_0x5577dc?'\x0a'+a82_0x130712[_0x2b6550(0x19e)](_0x2b6550(0x1a5))+'\x20'+_0x5ca6f7+'\x20'+_0x26ce58+'\x20'+_0x1d95bc+'\x0a'+a82_0x130712[_0x2b6550(0x1b4)](_0x2b6550(0x1c3))+'\x20'+_0x32267c+'\x0a':'\x0aUpdate\x20available:\x20'+_0x5ca6f7+'\x20'+_0x26ce58+'\x20'+_0x1d95bc+_0x2b6550(0x1b8)+_0x32267c+'\x0a';process[_0x2b6550(0x1af)]['write'](_0x140185);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a83_0x17ce(){const _0x3a2b4d=['203UJQTnN','2001910NlhNej','4JYtxZm','3212358XfOzRy','28036370TdgPwm','3550485STUPpc','430262aJOHfh','18WnfgDG','9040WyBxdg','.dig','3187896nDWtQp','startsWith'];a83_0x17ce=function(){return _0x3a2b4d;};return a83_0x17ce();}const a83_0x53bcb6=a83_0x1b91;(function(_0x585bdb,_0x2b31b4){const _0x596a56=a83_0x1b91,_0x552937=_0x585bdb();while(!![]){try{const _0x3f5baf=parseInt(_0x596a56(0x183))/0x1*(-parseInt(_0x596a56(0x17f))/0x2)+-parseInt(_0x596a56(0x17c))/0x3+-parseInt(_0x596a56(0x179))/0x4*(parseInt(_0x596a56(0x184))/0x5)+-parseInt(_0x596a56(0x17a))/0x6+parseInt(_0x596a56(0x17d))/0x7+-parseInt(_0x596a56(0x181))/0x8*(-parseInt(_0x596a56(0x17e))/0x9)+parseInt(_0x596a56(0x17b))/0xa;if(_0x3f5baf===_0x2b31b4)break;else _0x552937['push'](_0x552937['shift']());}catch(_0x449790){_0x552937['push'](_0x552937['shift']());}}}(a83_0x17ce,0x98a5f));function a83_0x1b91(_0x980f90,_0x3eb77c){const _0x17ce6a=a83_0x17ce();return a83_0x1b91=function(_0x1b915a,_0x5d6113){_0x1b915a=_0x1b915a-0x179;let _0x1fa1b7=_0x17ce6a[_0x1b915a];return _0x1fa1b7;},a83_0x1b91(_0x980f90,_0x3eb77c);}export const WORKFLOW_FILE_EXTENSION=a83_0x53bcb6(0x180);export function shouldIncludeInArchive(_0x45c4d2){const _0x24fd75=a83_0x53bcb6;if(_0x45c4d2==='.digdag')return!![];if(_0x45c4d2[_0x24fd75(0x182)]('.'))return![];return!![];}
|