@treasuredata/tdx 0.2.1 → 0.2.2
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/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.d.ts +19 -3
- package/dist/proxy/anthropic-adapter.d.ts.map +1 -1
- package/dist/proxy/anthropic-adapter.js +1 -1
- package/dist/proxy/anthropic-adapter.js.map +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.js +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 a69_0x2ebf(_0x57aa08,_0x4946f7){const _0x405a9c=a69_0x405a();return a69_0x2ebf=function(_0x2ebff6,_0x375e82){_0x2ebff6=_0x2ebff6-0xed;let _0x3b8f83=_0x405a9c[_0x2ebff6];return _0x3b8f83;},a69_0x2ebf(_0x57aa08,_0x4946f7);}(function(_0x45672a,_0x1cd833){const _0x4d9d6a=a69_0x2ebf,_0x5e23b5=_0x45672a();while(!![]){try{const _0x4b0b09=parseInt(_0x4d9d6a(0xfa))/0x1+-parseInt(_0x4d9d6a(0xf9))/0x2+-parseInt(_0x4d9d6a(0xf8))/0x3+parseInt(_0x4d9d6a(0xf4))/0x4*(parseInt(_0x4d9d6a(0xfb))/0x5)+parseInt(_0x4d9d6a(0xf1))/0x6*(parseInt(_0x4d9d6a(0xef))/0x7)+-parseInt(_0x4d9d6a(0xf3))/0x8*(parseInt(_0x4d9d6a(0xfc))/0x9)+parseInt(_0x4d9d6a(0xee))/0xa;if(_0x4b0b09===_0x1cd833)break;else _0x5e23b5['push'](_0x5e23b5['shift']());}catch(_0x5a2d1e){_0x5e23b5['push'](_0x5e23b5['shift']());}}}(a69_0x405a,0x667d6));export function validateLimitOption(_0x24e4b3){const _0x154cf1=a69_0x2ebf;if(!Number[_0x154cf1(0xf2)](_0x24e4b3))return{'isValid':![],'error':_0x154cf1(0xed)+_0x24e4b3+_0x154cf1(0xf5)};if(_0x24e4b3<=0x0)return{'isValid':![],'error':_0x154cf1(0xed)+_0x24e4b3+_0x154cf1(0xf0)};return{'isValid':!![],'value':_0x24e4b3};}function a69_0x405a(){const _0x200204=['.\x20Must\x20be\x20a\x20positive\x20number.','Invalid\x20limit\x20value:\x20','11200570phWyIu','119lJqqXn','.\x20Must\x20be\x20a\x20positive\x20integer.','62178BDNrTr','isInteger','8344JAOuJa','869948IlGAQz','.\x20Must\x20be\x20an\x20integer.','Invalid\x20timeout\x20value:\x20','number','2484156EEtBBL','875510QDWjXD','173933psmIXF','15doquQe','3771FNIAzo'];a69_0x405a=function(){return _0x200204;};return a69_0x405a();}export function validateTimeoutOption(_0x57823f,_0x540801=0x1e){const _0x526727=a69_0x2ebf;if(_0x57823f===undefined)return{'isValid':!![],'value':_0x540801};const _0x36b92a=typeof _0x57823f===_0x526727(0xf7)?_0x57823f:parseFloat(_0x57823f);if(isNaN(_0x36b92a))return{'isValid':![],'error':_0x526727(0xf6)+_0x57823f+'.\x20Must\x20be\x20a\x20number.'};if(_0x36b92a<=0x0)return{'isValid':![],'error':_0x526727(0xf6)+_0x36b92a+_0x526727(0xfd)};return{'isValid':!![],'value':_0x36b92a};}
|
package/dist/utils/port.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x511aa0,_0x322f08){const _0x234918=a70_0x4a88,_0x2b8e81=_0x511aa0();while(!![]){try{const _0x59b5b9=-parseInt(_0x234918(0x1ca))/0x1*(-parseInt(_0x234918(0x1d2))/0x2)+parseInt(_0x234918(0x1d3))/0x3*(-parseInt(_0x234918(0x1cf))/0x4)+parseInt(_0x234918(0x1d1))/0x5+-parseInt(_0x234918(0x1dd))/0x6*(parseInt(_0x234918(0x1d7))/0x7)+-parseInt(_0x234918(0x1d9))/0x8*(-parseInt(_0x234918(0x1d8))/0x9)+-parseInt(_0x234918(0x1cd))/0xa+-parseInt(_0x234918(0x1d0))/0xb*(parseInt(_0x234918(0x1cc))/0xc);if(_0x59b5b9===_0x322f08)break;else _0x2b8e81['push'](_0x2b8e81['shift']());}catch(_0x5adbd2){_0x2b8e81['push'](_0x2b8e81['shift']());}}}(a70_0x4ad6,0xdc3a5));function a70_0x4ad6(){const _0x3e91b1=['24QzNOPq','close','EADDRINUSE','No\x20available\x20port\x20found\x20between\x20','7746fYEPYS','error','31091LNPYfi','once','12SaiLus','12874920hrnyXB','listen','4CELirv','9219683IeWAMo','7114725CQoccP','92XUTOrQ','391902xTvCzm','code','\x20and\x20','0.0.0.0','7777suVyst','5218506ZiiaXF'];a70_0x4ad6=function(){return _0x3e91b1;};return a70_0x4ad6();}import{createServer}from'node:net';function a70_0x4a88(_0x4e84e2,_0x37fb10){const _0x4ad653=a70_0x4ad6();return a70_0x4a88=function(_0x4a8815,_0x3d0006){_0x4a8815=_0x4a8815-0x1ca;let _0x1f9633=_0x4ad653[_0x4a8815];return _0x1f9633;},a70_0x4a88(_0x4e84e2,_0x37fb10);}export async function isPortAvailable(_0x3e60a0){return new Promise(_0x3e59c0=>{const _0x5354d2=a70_0x4a88,_0x2d481c=createServer();_0x2d481c[_0x5354d2(0x1cb)](_0x5354d2(0x1de),_0x10a7aa=>{const _0x1e2497=_0x5354d2;_0x10a7aa[_0x1e2497(0x1d4)]===_0x1e2497(0x1db)?_0x3e59c0(![]):_0x3e59c0(![]);}),_0x2d481c[_0x5354d2(0x1cb)]('listening',()=>{const _0x38b846=_0x5354d2;_0x2d481c[_0x38b846(0x1da)](),_0x3e59c0(!![]);}),_0x2d481c[_0x5354d2(0x1ce)](_0x3e60a0,_0x5354d2(0x1d6));});}export async function findAvailablePort(_0x4a1dfa=0xfa0,_0xac7d90=0x64){const _0x5c9875=a70_0x4a88;for(let _0x15b8c1=0x0;_0x15b8c1<_0xac7d90;_0x15b8c1++){const _0x25ed01=_0x4a1dfa+_0x15b8c1;if(await isPortAvailable(_0x25ed01))return _0x25ed01;}throw new Error(_0x5c9875(0x1dc)+_0x4a1dfa+_0x5c9875(0x1d5)+(_0x4a1dfa+_0xac7d90-0x1));}
|
package/dist/utils/process.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a71_0x278d(_0x23dffc,_0x4d7392){const _0x2c0ced=a71_0x2c0c();return a71_0x278d=function(_0x278ddc,_0x15ebba){_0x278ddc=_0x278ddc-0xa4;let _0x4e8f01=_0x2c0ced[_0x278ddc];return _0x4e8f01;},a71_0x278d(_0x23dffc,_0x4d7392);}const a71_0x239ba0=a71_0x278d;(function(_0x34ff38,_0x3218df){const _0x4c3b68=a71_0x278d,_0x26a329=_0x34ff38();while(!![]){try{const _0x4491c5=parseInt(_0x4c3b68(0xbc))/0x1+-parseInt(_0x4c3b68(0xbd))/0x2*(parseInt(_0x4c3b68(0xb3))/0x3)+-parseInt(_0x4c3b68(0xb2))/0x4*(parseInt(_0x4c3b68(0xb4))/0x5)+-parseInt(_0x4c3b68(0xca))/0x6*(-parseInt(_0x4c3b68(0xac))/0x7)+parseInt(_0x4c3b68(0xc8))/0x8*(-parseInt(_0x4c3b68(0xa5))/0x9)+parseInt(_0x4c3b68(0xaa))/0xa*(-parseInt(_0x4c3b68(0xc6))/0xb)+parseInt(_0x4c3b68(0xc4))/0xc*(parseInt(_0x4c3b68(0xab))/0xd);if(_0x4491c5===_0x3218df)break;else _0x26a329['push'](_0x26a329['shift']());}catch(_0x55d8be){_0x26a329['push'](_0x26a329['shift']());}}}(a71_0x2c0c,0xcaa1e));import{execSync}from'node:child_process';function a71_0x2c0c(){const _0x58b6d1=['utf-8','wmic\x20process\x20where\x20ProcessId=','dash','ppid','fish','36092digRNG','66XWbEYu','765izEMzP','replace','error','comm','pwsh','win32','ksh','toLowerCase','1084348kixEGD','49460raGPLr','csh','pid','\x20-o\x20ppid=,comm=','tcsh','trim','DEBUG','2339208TJWAKY','pop','33pUDKki','No\x20shell\x20found\x20in\x20process\x20tree,\x20falling\x20back\x20to\x20process.ppid','8381328amZoKK','\x20on\x20Windows:','403878dGBPcJ',',\x20using\x20fallback','Failed\x20to\x20get\x20process\x20info\x20for\x20PID\x20','elvish','env','xonsh','bash','9IKOZpl','platform','split','join','length','4880210RqlbJY','234XwZtxZ','70YnLygX'];a71_0x2c0c=function(){return _0x58b6d1;};return a71_0x2c0c();}const SHELL_NAMES=new Set([a71_0x239ba0(0xa4),'zsh','sh',a71_0x239ba0(0xb1),a71_0x239ba0(0xba),a71_0x239ba0(0xc1),a71_0x239ba0(0xbe),a71_0x239ba0(0xaf),a71_0x239ba0(0xb8),'powershell','nu','ion',a71_0x239ba0(0xcd),a71_0x239ba0(0xcf)]);function getProcessInfoWindows(_0x2579c6){const _0x30b838=a71_0x239ba0;try{const _0x171994=execSync(_0x30b838(0xae)+_0x2579c6+'\x20get\x20ParentProcessId,Name\x20/format:csv',{'encoding':_0x30b838(0xad),'windowsHide':!![]})['trim'](),_0x272e06=_0x171994[_0x30b838(0xa7)]('\x0a')['filter'](_0x5a9e49=>_0x5a9e49[_0x30b838(0xc2)]());if(_0x272e06[_0x30b838(0xa9)]<0x2)return null;const _0x48c628=_0x272e06[_0x272e06['length']-0x1][_0x30b838(0xa7)](',');if(_0x48c628[_0x30b838(0xa9)]<0x3)return null;const _0x339ac1=_0x48c628[0x1]?.[_0x30b838(0xc2)]()||'',_0x12d126=parseInt(_0x48c628[0x2]?.['trim']()||'0',0xa);if(isNaN(_0x12d126)||!_0x339ac1)return null;return{'pid':_0x2579c6,'ppid':_0x12d126,'comm':_0x339ac1[_0x30b838(0xb5)](/\.exe$/i,'')};}catch(_0x17e800){return process[_0x30b838(0xce)]['DEBUG']&&console[_0x30b838(0xb6)](_0x30b838(0xcc)+_0x2579c6+_0x30b838(0xc9),_0x17e800),null;}}function getProcessInfoPosix(_0x38df30){const _0x2c8dae=a71_0x239ba0;try{const _0x9d0939=execSync('ps\x20-p\x20'+_0x38df30+_0x2c8dae(0xc0),{'encoding':_0x2c8dae(0xad)})[_0x2c8dae(0xc2)](),[_0x8dbc09,..._0x420ecb]=_0x9d0939[_0x2c8dae(0xa7)](/\s+/),_0x3102c9=parseInt(_0x8dbc09,0xa),_0x359c1f=_0x420ecb[_0x2c8dae(0xa8)]('\x20');if(isNaN(_0x3102c9))return null;return{'pid':_0x38df30,'ppid':_0x3102c9,'comm':_0x359c1f};}catch(_0x4a3168){return process[_0x2c8dae(0xce)][_0x2c8dae(0xc3)]&&console[_0x2c8dae(0xb6)](_0x2c8dae(0xcc)+_0x38df30+'\x20on\x20POSIX:',_0x4a3168),null;}}function getProcessInfo(_0x4e4c40){const _0xafea9e=a71_0x239ba0;if(process[_0xafea9e(0xa6)]===_0xafea9e(0xb9))return getProcessInfoWindows(_0x4e4c40);return getProcessInfoPosix(_0x4e4c40);}function isShell(_0x30d966){const _0x397eed=a71_0x239ba0,_0x45fac7=_0x30d966[_0x397eed(0xb5)](/^-/,'')[_0x397eed(0xa7)]('/')[_0x397eed(0xc5)]()||'';return SHELL_NAMES['has'](_0x45fac7[_0x397eed(0xbb)]());}let cachedShellPID;function findShellPID(){const _0x59e634=a71_0x239ba0;let _0x4ee2ba=process[_0x59e634(0xb0)];const _0x1e37ae=0xa;let _0x4d69d9=0x0;while(_0x4d69d9<_0x1e37ae){const _0x48e053=getProcessInfo(_0x4ee2ba);if(!_0x48e053){process[_0x59e634(0xce)][_0x59e634(0xc3)]&&console['error']('Could\x20not\x20get\x20process\x20info\x20for\x20PID\x20'+_0x4ee2ba+_0x59e634(0xcb));break;}if(isShell(_0x48e053[_0x59e634(0xb7)]))return _0x48e053[_0x59e634(0xbf)];if(_0x48e053[_0x59e634(0xb0)]===0x0||_0x48e053[_0x59e634(0xb0)]===0x1){if(isShell(_0x48e053[_0x59e634(0xb7)]))return _0x48e053['pid'];break;}_0x4ee2ba=_0x48e053[_0x59e634(0xb0)],_0x4d69d9++;}return process[_0x59e634(0xce)][_0x59e634(0xc3)]&&console[_0x59e634(0xb6)](_0x59e634(0xc7)),process[_0x59e634(0xb0)];}export function getPPID(){return cachedShellPID===undefined&&(cachedShellPID=findShellPID()),cachedShellPID;}export function clearPPIDCache(){cachedShellPID=undefined;}export function isProcessRunning(_0x5e2274){try{return process['kill'](_0x5e2274,0x0),!![];}catch{return![];}}
|
package/dist/utils/prompt.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x4f2dd1,_0x235884){const _0xd1de7b=a72_0x53af,_0x244cba=_0x4f2dd1();while(!![]){try{const _0x5cb53c=parseInt(_0xd1de7b(0x144))/0x1+-parseInt(_0xd1de7b(0x147))/0x2+-parseInt(_0xd1de7b(0x14d))/0x3+parseInt(_0xd1de7b(0x149))/0x4*(parseInt(_0xd1de7b(0x143))/0x5)+-parseInt(_0xd1de7b(0x145))/0x6+-parseInt(_0xd1de7b(0x14e))/0x7*(parseInt(_0xd1de7b(0x14a))/0x8)+parseInt(_0xd1de7b(0x148))/0x9;if(_0x5cb53c===_0x235884)break;else _0x244cba['push'](_0x244cba['shift']());}catch(_0x1cd704){_0x244cba['push'](_0x244cba['shift']());}}}(a72_0xfb4c,0xd3abf));function a72_0x53af(_0x57d02c,_0x3376a4){const _0xfb4c60=a72_0xfb4c();return a72_0x53af=function(_0x53afe0,_0x4f401b){_0x53afe0=_0x53afe0-0x143;let _0xa87248=_0xfb4c60[_0x53afe0];return _0xa87248;},a72_0x53af(_0x57d02c,_0x3376a4);}import*as a72_0x2b281e from'readline';export async function confirm(_0x252f09){const _0x3f3e01=a72_0x53af,_0x1be14a=a72_0x2b281e[_0x3f3e01(0x146)]({'input':process[_0x3f3e01(0x14c)],'output':process['stdout']});return new Promise(_0x2d1b38=>{const _0x32581d=_0x3f3e01;_0x1be14a[_0x32581d(0x14b)](_0x252f09+'\x20(y/N):\x20',_0x5e8510=>{const _0x2d91d2=_0x32581d;_0x1be14a[_0x2d91d2(0x150)](),_0x2d1b38(_0x5e8510['toLowerCase']()==='y'||_0x5e8510[_0x2d91d2(0x14f)]()==='yes');});});}function a72_0xfb4c(){const _0x4eb36d=['close','12605oUnJpR','1286230WGMDSh','7422246DrTfCb','createInterface','2696274sVACcZ','26252433RtzQsk','1436ONGtnu','5690984rsmfBF','question','stdin','699825pSnWJc','14pfDEnB','toLowerCase'];a72_0xfb4c=function(){return _0x4eb36d;};return a72_0xfb4c();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x32bff8,_0x49fcf6){const _0x548ab4=a73_0x340a,_0x3283d0=_0x32bff8();while(!![]){try{const _0xf098ee=parseInt(_0x548ab4(0xb8))/0x1*(parseInt(_0x548ab4(0xc4))/0x2)+parseInt(_0x548ab4(0xbd))/0x3*(parseInt(_0x548ab4(0xb1))/0x4)+parseInt(_0x548ab4(0xc9))/0x5*(-parseInt(_0x548ab4(0xbc))/0x6)+-parseInt(_0x548ab4(0xb6))/0x7+parseInt(_0x548ab4(0xb0))/0x8+-parseInt(_0x548ab4(0xc7))/0x9*(-parseInt(_0x548ab4(0xc0))/0xa)+parseInt(_0x548ab4(0xb2))/0xb*(parseInt(_0x548ab4(0xbf))/0xc);if(_0xf098ee===_0x49fcf6)break;else _0x3283d0['push'](_0x3283d0['shift']());}catch(_0x5344a4){_0x3283d0['push'](_0x3283d0['shift']());}}}(a73_0x344f,0xccfdf));function a73_0x340a(_0x59495a,_0x1206d2){const _0x344f5c=a73_0x344f();return a73_0x340a=function(_0x340a30,_0x5c0b47){_0x340a30=_0x340a30-0xb0;let _0x45936f=_0x344f5c[_0x340a30];return _0x45936f;},a73_0x340a(_0x59495a,_0x1206d2);}export function parsePath(_0x1ba3fd){const _0x53a744=a73_0x340a;if(!_0x1ba3fd||_0x1ba3fd[_0x53a744(0xc2)]()==='')throw new Error('Path\x20cannot\x20be\x20empty');const _0x3032a1=_0x1ba3fd[_0x53a744(0xc2)]();if(_0x3032a1==='/')return{'segments':[],'isAbsolute':!![],'raw':_0x1ba3fd};const _0x3c8426=_0x3032a1['startsWith']('/')?_0x3032a1[_0x53a744(0xb9)](0x1):_0x3032a1,_0x341da4=_0x3c8426[_0x53a744(0xc1)]('/')[_0x53a744(0xc8)](_0x373556=>_0x373556!=='');if(_0x341da4[_0x53a744(0xc3)]===0x0)throw new Error('Path\x20must\x20contain\x20at\x20least\x20one\x20segment');const _0x13df61=_0x3032a1[_0x53a744(0xbe)]('/')||!isRelativePathSegment(_0x341da4[0x0]);for(const _0x3c03c4 of _0x341da4){validatePathSegment(_0x3c03c4);}return{'segments':_0x341da4,'isAbsolute':_0x13df61,'raw':_0x1ba3fd};}function isRelativePathSegment(_0x9b771b){return _0x9b771b==='.'||_0x9b771b==='..';}function validatePathSegment(_0x1b20b1){const _0x3de01e=a73_0x340a;if(_0x1b20b1==='')throw new Error(_0x3de01e(0xc6));if(_0x1b20b1==='.'||_0x1b20b1==='..')return;if(/[\x00-\x1F\x7F]/[_0x3de01e(0xb5)](_0x1b20b1))throw new Error('Path\x20segment\x20contains\x20invalid\x20control\x20characters:\x20'+_0x1b20b1);if(_0x1b20b1!==_0x1b20b1[_0x3de01e(0xc2)]()){}}export function validatePath(_0x508693){const _0x370aa0=a73_0x340a;if(_0x508693[_0x370aa0(0xb7)]['length']===0x0&&!_0x508693['isAbsolute'])throw new Error(_0x370aa0(0xb4));if(_0x508693[_0x370aa0(0xba)]){if(_0x508693['segments'][0x0]==='..')throw new Error(_0x370aa0(0xca));let _0xbba825=0x0;for(const _0xbef4ff of _0x508693[_0x370aa0(0xb7)]){if(_0xbef4ff==='..'){if(_0xbba825===0x0)throw new Error('Path\x20attempts\x20to\x20navigate\x20above\x20root');_0xbba825--;}else _0xbef4ff!=='.'&&_0xbba825++;}}}export function joinPaths(_0x368825,_0x54cdf4){const _0x373558=a73_0x340a;if(!_0x368825||_0x368825==='/')return _0x54cdf4;if(!_0x54cdf4||_0x54cdf4==='.')return _0x368825;if(_0x54cdf4[_0x373558(0xbe)]('/'))return _0x54cdf4;const _0x48588d=parsePath(_0x368825),_0x26a9e8=parsePath(_0x54cdf4),_0x37e0a4=[..._0x48588d['segments']];for(const _0x504756 of _0x26a9e8[_0x373558(0xb7)]){if(_0x504756==='.')continue;else{if(_0x504756==='..'){if(_0x37e0a4[_0x373558(0xc3)]===0x0)throw new Error(_0x373558(0xcd));_0x37e0a4[_0x373558(0xb3)]();}else _0x37e0a4[_0x373558(0xc5)](_0x504756);}}const _0xab12e1=_0x37e0a4[_0x373558(0xce)]('/');return _0x48588d[_0x373558(0xbb)]['startsWith']('/')?'/'+_0xab12e1:_0xab12e1;}export function normalizePath(_0xf69ec1){const _0x1c6919=a73_0x340a,_0x5d3408=parsePath(_0xf69ec1),_0x1d230b=[];for(const _0x486752 of _0x5d3408['segments']){if(_0x486752==='.')continue;else{if(_0x486752==='..'){if(_0x1d230b[_0x1c6919(0xc3)]===0x0){if(_0x5d3408[_0x1c6919(0xba)])throw new Error(_0x1c6919(0xcd));_0x1d230b[_0x1c6919(0xc5)]('..');}else _0x1d230b[_0x1d230b['length']-0x1]==='..'?_0x1d230b[_0x1c6919(0xc5)]('..'):_0x1d230b[_0x1c6919(0xb3)]();}else _0x1d230b[_0x1c6919(0xc5)](_0x486752);}}if(_0x1d230b[_0x1c6919(0xc3)]===0x0)return _0x5d3408[_0x1c6919(0xba)]?'/':'.';const _0x848fac=_0x1d230b['join']('/');return _0x5d3408['raw'][_0x1c6919(0xbe)]('/')?'/'+_0x848fac:_0x848fac;}export function getParentPath(_0x4010cf){const _0x41c07c=a73_0x340a,_0x4b3a2d=parsePath(_0x4010cf);if(_0x4b3a2d[_0x41c07c(0xb7)][_0x41c07c(0xc3)]<=0x1)return'/';const _0x5ada2d=_0x4b3a2d[_0x41c07c(0xb7)][_0x41c07c(0xcb)](0x0,-0x1)[_0x41c07c(0xce)]('/');return _0x4b3a2d[_0x41c07c(0xbb)][_0x41c07c(0xbe)]('/')?'/'+_0x5ada2d:_0x5ada2d;}export function getBaseName(_0x2571be){const _0xe8480f=a73_0x340a,_0xe5f1a1=parsePath(_0x2571be);return _0xe5f1a1[_0xe8480f(0xb7)][_0xe5f1a1[_0xe8480f(0xb7)]['length']-0x1]||'';}function a73_0x344f(){const _0x465176=['4IhzxJc','push','Path\x20segment\x20cannot\x20be\x20empty','549MYJjYE','filter','30PVNjil','Absolute\x20path\x20cannot\x20start\x20with\x20\x22..\x22','slice','Cannot\x20split\x20empty\x20path','Cannot\x20navigate\x20above\x20root','join','345520IdBDHY','19424GQqEoR','1214114zqMZct','pop','Relative\x20path\x20cannot\x20be\x20empty','test','2477006OHTAKa','segments','141751gVDNlE','substring','isAbsolute','raw','411414TTLEEP','426VfEdIN','startsWith','12SigTvd','78410kKDiVx','split','trim','length'];a73_0x344f=function(){return _0x465176;};return a73_0x344f();}export function isChildPath(_0x208bbf,_0x170a95){const _0x3b4790=a73_0x340a,_0x3e0984=parsePath(_0x208bbf),_0x4de7f7=parsePath(_0x170a95);if(_0x3e0984['segments'][_0x3b4790(0xc3)]<=_0x4de7f7[_0x3b4790(0xb7)][_0x3b4790(0xc3)])return![];for(let _0x4451d8=0x0;_0x4451d8<_0x4de7f7['segments'][_0x3b4790(0xc3)];_0x4451d8++){if(_0x3e0984[_0x3b4790(0xb7)][_0x4451d8]!==_0x4de7f7['segments'][_0x4451d8])return![];}return!![];}export function splitPath(_0x1eb4b3){const _0x255b9e=a73_0x340a,_0x6a7481=parsePath(_0x1eb4b3);if(_0x6a7481[_0x255b9e(0xb7)]['length']===0x0)throw new Error(_0x255b9e(0xcc));if(_0x6a7481[_0x255b9e(0xb7)][_0x255b9e(0xc3)]===0x1)return{'parent':_0x6a7481['segments'][0x0]};return{'parent':_0x6a7481[_0x255b9e(0xb7)][0x0],'child':_0x6a7481[_0x255b9e(0xb7)]['slice'](0x1)[_0x255b9e(0xce)]('/')};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x432b77,_0x5909eb){const _0x4b4ddd=a74_0x37a7,_0x1e5cb8=_0x432b77();while(!![]){try{const _0x13adea=parseInt(_0x4b4ddd(0xca))/0x1*(parseInt(_0x4b4ddd(0xc9))/0x2)+parseInt(_0x4b4ddd(0xc0))/0x3+-parseInt(_0x4b4ddd(0xc5))/0x4+-parseInt(_0x4b4ddd(0xc2))/0x5+-parseInt(_0x4b4ddd(0xc8))/0x6+-parseInt(_0x4b4ddd(0xc3))/0x7+parseInt(_0x4b4ddd(0xc1))/0x8;if(_0x13adea===_0x5909eb)break;else _0x1e5cb8['push'](_0x1e5cb8['shift']());}catch(_0x1322fa){_0x1e5cb8['push'](_0x1e5cb8['shift']());}}}(a74_0x4da1,0xc76a9));export function parseSegmentRef(_0x5c2702){const _0x2ac4d9=a74_0x37a7,_0x17fec2=_0x5c2702['indexOf']('/');if(_0x17fec2===-0x1)return{'parentId':_0x5c2702};if(_0x17fec2===0x0)throw new Error(_0x2ac4d9(0xc7)+_0x5c2702+'.\x20Parent\x20name\x20cannot\x20be\x20empty');const _0x5c4c13=_0x5c2702['substring'](0x0,_0x17fec2),_0x4bbac7=_0x5c2702[_0x2ac4d9(0xc6)](_0x17fec2+0x1);if(_0x4bbac7==='')throw new Error(_0x2ac4d9(0xc7)+_0x5c2702+_0x2ac4d9(0xc4));return{'parentId':_0x5c4c13,'childId':_0x4bbac7};}function a74_0x37a7(_0x1bb5f2,_0x359bee){const _0x4da1b6=a74_0x4da1();return a74_0x37a7=function(_0x37a766,_0x14a908){_0x37a766=_0x37a766-0xc0;let _0xaeed70=_0x4da1b6[_0x37a766];return _0xaeed70;},a74_0x37a7(_0x1bb5f2,_0x359bee);}function a74_0x4da1(){const _0x5d98ad=['4155138bjOVpc','6698584Mwifiq','4799205WAUQgw','3654182qtywKV','.\x20Child\x20name\x20cannot\x20be\x20empty','132380CwBFzg','substring','Invalid\x20segment\x20reference\x20format:\x20','6528174HNGdkH','2TmIgXe','1197431oADWLo'];a74_0x4da1=function(){return _0x5d98ad;};return a74_0x4da1();}
|
package/dist/utils/spinner.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a75_0x4403(){const _0x3d949a=['intervalFactory','jobId','replace','31236yOFfMb','7GGeySu','288906Htrzqq','isTTY','\x20[Job\x20ID:\x20','895800vIObQP','20OJuWlJ','5419744omMjOS','1604336KKjBCT','clock','4sluSzW','622338migxYi','243729BWKINg','cyan','start','toFixed','phase','floor','now','stop','extra','stdout','470pEQsHd'];a75_0x4403=function(){return _0x3d949a;};return a75_0x4403();}(function(_0x4f5f09,_0x2a3f3c){const _0xb7fcd2=a75_0x3c9b,_0xf42347=_0x4f5f09();while(!![]){try{const _0x1eba96=-parseInt(_0xb7fcd2(0x178))/0x1+-parseInt(_0xb7fcd2(0x180))/0x2*(parseInt(_0xb7fcd2(0x181))/0x3)+parseInt(_0xb7fcd2(0x17b))/0x4+parseInt(_0xb7fcd2(0x18c))/0x5*(parseInt(_0xb7fcd2(0x176))/0x6)+-parseInt(_0xb7fcd2(0x177))/0x7*(parseInt(_0xb7fcd2(0x17e))/0x8)+-parseInt(_0xb7fcd2(0x182))/0x9*(parseInt(_0xb7fcd2(0x17c))/0xa)+parseInt(_0xb7fcd2(0x17d))/0xb;if(_0x1eba96===_0x2a3f3c)break;else _0xf42347['push'](_0xf42347['shift']());}catch(_0x443337){_0xf42347['push'](_0xf42347['shift']());}}}(a75_0x4403,0x3c6dc));import a75_0x293ebc from'ora';function a75_0x3c9b(_0x21a516,_0x4c5ec1){const _0x440326=a75_0x4403();return a75_0x3c9b=function(_0x3c9b66,_0xc38ee1){_0x3c9b66=_0x3c9b66-0x176;let _0x4816b7=_0x440326[_0x3c9b66];return _0x4816b7;},a75_0x3c9b(_0x21a516,_0x4c5ec1);}export function createCommandSpinner(_0x1a80cc,_0xbdce1e={}){const _0x3450b4=a75_0x3c9b,{verbose:verbose=![],forceEnabled:forceEnabled=![]}=_0xbdce1e;return a75_0x293ebc({'text':_0x1a80cc,'color':_0x3450b4(0x183),'isEnabled':forceEnabled||process[_0x3450b4(0x18b)][_0x3450b4(0x179)]&&!verbose});}export async function withSpinner(_0x566720,_0x6e6062,_0x494761={}){const _0x2c63b3=a75_0x3c9b,_0x448e10=_0x494761[_0x2c63b3(0x17f)]??(()=>Date[_0x2c63b3(0x188)]()),_0x2225d5=createCommandSpinner(_0x566720,_0x494761);_0x2225d5[_0x2c63b3(0x184)]();const _0x5d2a68=_0x448e10();try{const _0x4a53cb=await _0x6e6062(),_0x52b373=_0x448e10()-_0x5d2a68;return _0x2225d5[_0x2c63b3(0x189)](),{'data':_0x4a53cb,'elapsedMs':_0x52b373};}catch(_0x253eb2){_0x2225d5[_0x2c63b3(0x189)]();throw _0x253eb2;}}export async function withQuerySpinner(_0x4a2293,_0x3797b4,_0x39f2f3={}){const _0x45c14f=a75_0x3c9b,_0x50b06c=_0x39f2f3[_0x45c14f(0x17f)]??(()=>Date['now']()),_0xc0a8ff=_0x39f2f3[_0x45c14f(0x18d)]??setInterval,_0x377699=createCommandSpinner(_0x4a2293,_0x39f2f3);_0x377699[_0x45c14f(0x184)]();const _0x40881f=_0x50b06c(),_0x1c0c8f=_0x4a2293[_0x45c14f(0x18f)]('...',''),_0x50d432={},_0x4dd5c8=()=>{const _0xa9a876=_0x45c14f;if(!_0x377699['isSpinning'])return;const _0x36a6e7=_0x50b06c()-_0x40881f,_0x176e39=formatElapsed(_0x36a6e7),_0x2f0599=_0x50d432[_0xa9a876(0x186)]??_0x1c0c8f,_0x39916d=_0x50d432[_0xa9a876(0x18e)]?_0xa9a876(0x17a)+_0x50d432[_0xa9a876(0x18e)]+']':'',_0x3f3c0c=_0x50d432[_0xa9a876(0x18a)]?'\x20'+_0x50d432['extra']:'';_0x377699['text']=_0x2f0599+'\x20'+_0x176e39+_0x3f3c0c+_0x39916d;},_0x534d1d=_0xc0a8ff(()=>{_0x4dd5c8();},0x3e8),_0x5dded2={'setPhase':_0x34cbeb=>{const _0x35361d=_0x45c14f;_0x50d432[_0x35361d(0x186)]=_0x34cbeb,_0x4dd5c8();},'setJobId':_0x177182=>{const _0x293382=_0x45c14f;_0x50d432[_0x293382(0x18e)]=_0x177182,_0x4dd5c8();},'setExtra':_0x134932=>{const _0xaee1b3=_0x45c14f;_0x50d432[_0xaee1b3(0x18a)]=_0x134932,_0x4dd5c8();}};_0x4dd5c8();try{const _0x348f68=await _0x3797b4(_0x5dded2),_0x85d67d=_0x50b06c()-_0x40881f;return{'data':_0x348f68,'elapsedMs':_0x85d67d};}finally{clearInterval(_0x534d1d),_0x377699[_0x45c14f(0x189)]();}}export function formatElapsed(_0x4864ee){const _0x5b172c=a75_0x3c9b,_0x4d70c9=Math[_0x5b172c(0x187)](_0x4864ee/0x3e8);if(_0x4d70c9<0x3c)return(_0x4864ee/0x3e8)[_0x5b172c(0x185)](0x1)+'s';const _0x131ea9=Math[_0x5b172c(0x187)](_0x4d70c9/0x3c),_0x375cd7=_0x4d70c9%0x3c;if(_0x131ea9<0x3c)return _0x131ea9+'m\x20'+_0x375cd7+'s';const _0x58fe15=Math[_0x5b172c(0x187)](_0x131ea9/0x3c),_0x4157a9=_0x131ea9%0x3c;return _0x58fe15+'h\x20'+_0x4157a9+'m';}
|
package/dist/utils/sql-parser.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3daaa1,_0x6f9c62){const _0x26f35a=a76_0x5241,_0x13ed42=_0x3daaa1();while(!![]){try{const _0x413bec=-parseInt(_0x26f35a(0x1f0))/0x1+-parseInt(_0x26f35a(0x1fd))/0x2+-parseInt(_0x26f35a(0x1f8))/0x3*(parseInt(_0x26f35a(0x1f1))/0x4)+-parseInt(_0x26f35a(0x1f3))/0x5+-parseInt(_0x26f35a(0x1fa))/0x6*(-parseInt(_0x26f35a(0x1f7))/0x7)+-parseInt(_0x26f35a(0x1ed))/0x8+parseInt(_0x26f35a(0x1f2))/0x9;if(_0x413bec===_0x6f9c62)break;else _0x13ed42['push'](_0x13ed42['shift']());}catch(_0x5d031a){_0x13ed42['push'](_0x13ed42['shift']());}}}(a76_0x53b0,0xd3768));import{readFileSync}from'fs';export function stripSqlComments(_0x5031e2){const _0x5db56d=a76_0x5241;let _0x4fb5c3=_0x5031e2['replace'](/\/\*(?:[^*]|\*(?!\/))*\*\//g,'');return _0x4fb5c3=_0x4fb5c3[_0x5db56d(0x1fe)](/--.*$/gm,''),_0x4fb5c3[_0x5db56d(0x1ef)]();}function a76_0x53b0(){const _0x31516a=['replace','Permission\x20denied\x20reading\x20file\x20\x27','code','message','filter','map','\x27\x20not\x20found','push','2515200ENenvH','EACCES','trim','518860ZAjEMA','8LuiSKn','38797920iMkTZv','4581180UOMmNv','length','File\x20\x27','Error\x20reading\x20file\x20\x27','7oiqCoA','156129aiQvUY','\x27:\x20','154380ElfubE','Content\x20contains\x20no\x20SQL\x20statements','utf-8','3233752MLenKJ'];a76_0x53b0=function(){return _0x31516a;};return a76_0x53b0();}function isEscaped(_0x3400d1,_0x2ade7a){let _0x2f931f=0x0;for(let _0x30df57=_0x2ade7a-0x1;_0x30df57>=0x0&&_0x3400d1[_0x30df57]==='\x5c';_0x30df57--){_0x2f931f++;}return _0x2f931f%0x2===0x1;}export function splitSqlStatements(_0x24014f){const _0x414835=a76_0x5241,_0xa1bac1=stripSqlComments(_0x24014f);if(!_0xa1bac1)throw new Error('Content\x20contains\x20no\x20SQL\x20statements');const _0x43f10d=[];let _0x5b2357='',_0x45afc2=![],_0x4c73b7=![],_0x24e73f=![];for(let _0x510325=0x0;_0x510325<_0x24014f[_0x414835(0x1f4)];_0x510325++){const _0x16df76=_0x24014f[_0x510325];if(_0x16df76==='\x27'&&!isEscaped(_0x24014f,_0x510325)&&!_0x4c73b7&&!_0x24e73f)_0x45afc2=!_0x45afc2;else{if(_0x16df76==='\x22'&&!isEscaped(_0x24014f,_0x510325)&&!_0x45afc2&&!_0x24e73f)_0x4c73b7=!_0x4c73b7;else _0x16df76==='`'&&!isEscaped(_0x24014f,_0x510325)&&!_0x45afc2&&!_0x4c73b7&&(_0x24e73f=!_0x24e73f);}if(_0x16df76===';'&&!_0x45afc2&&!_0x4c73b7&&!_0x24e73f){const _0x518327=_0x5b2357[_0x414835(0x1ef)]();_0x518327&&_0x43f10d[_0x414835(0x1ec)](_0x518327),_0x5b2357='';}else _0x5b2357+=_0x16df76;}const _0x2c6339=_0x5b2357[_0x414835(0x1ef)]();_0x2c6339&&_0x43f10d[_0x414835(0x1ec)](_0x2c6339);const _0x4ca4be=_0x43f10d[_0x414835(0x1ea)](_0x9a473b=>_0x9a473b['trim']())[_0x414835(0x1e9)](_0x505f87=>{const _0x38c338=stripSqlComments(_0x505f87);return _0x38c338['length']>0x0;});if(_0x4ca4be[_0x414835(0x1f4)]===0x0)throw new Error(_0x414835(0x1fb));return _0x4ca4be;}export function readFileContent(_0x2d29ab){const _0xa5c0cc=a76_0x5241;try{return readFileSync(_0x2d29ab,_0xa5c0cc(0x1fc));}catch(_0x3e88ff){const _0x270a2d=_0x3e88ff[_0xa5c0cc(0x200)];if(_0x270a2d==='ENOENT')throw new Error(_0xa5c0cc(0x1f5)+_0x2d29ab+_0xa5c0cc(0x1eb));else{if(_0x270a2d===_0xa5c0cc(0x1ee))throw new Error(_0xa5c0cc(0x1ff)+_0x2d29ab+'\x27');else throw new Error(_0xa5c0cc(0x1f6)+_0x2d29ab+_0xa5c0cc(0x1f9)+_0x3e88ff[_0xa5c0cc(0x1e8)]);}}}function a76_0x5241(_0x1b6615,_0x3b5411){const _0x53b0db=a76_0x53b0();return a76_0x5241=function(_0x524159,_0xe7cc2c){_0x524159=_0x524159-0x1e8;let _0x23b43b=_0x53b0db[_0x524159];return _0x23b43b;},a76_0x5241(_0x1b6615,_0x3b5411);}export function readSqlStatementsFromFile(_0x1a236f){const _0x4eac32=a76_0x5241,_0x4be734=readFileContent(_0x1a236f);try{return splitSqlStatements(_0x4be734);}catch(_0x32564f){throw new Error('File\x20\x27'+_0x1a236f+'\x27\x20'+_0x32564f[_0x4eac32(0x1e8)]['toLowerCase']());}}
|
package/dist/utils/sse-parser.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3eb716,_0x989c62){const _0x578d4b=a77_0x5cf0,_0x1297cc=_0x3eb716();while(!![]){try{const _0x42f3b4=parseInt(_0x578d4b(0x88))/0x1*(-parseInt(_0x578d4b(0x80))/0x2)+-parseInt(_0x578d4b(0x7a))/0x3+-parseInt(_0x578d4b(0x7d))/0x4+-parseInt(_0x578d4b(0x89))/0x5+-parseInt(_0x578d4b(0x83))/0x6+-parseInt(_0x578d4b(0x8a))/0x7+-parseInt(_0x578d4b(0x82))/0x8*(-parseInt(_0x578d4b(0x86))/0x9);if(_0x42f3b4===_0x989c62)break;else _0x1297cc['push'](_0x1297cc['shift']());}catch(_0x5aa462){_0x1297cc['push'](_0x1297cc['shift']());}}}(a77_0xf2cf,0xaa77e));export async function*parseSSEStream(_0x2eb740){const _0x1ca80b=a77_0x5cf0;if(!_0x2eb740['body'])throw new Error(_0x1ca80b(0x7b));const _0x1bbbbd=_0x2eb740[_0x1ca80b(0x84)]['getReader'](),_0x531bf0=new TextDecoder();let _0x49791c='',_0xc89834={};try{while(!![]){const {done:_0x60a250,value:_0x54f12c}=await _0x1bbbbd['read']();if(_0x60a250){_0xc89834['data']&&(yield parseSSEData(_0xc89834[_0x1ca80b(0x7f)]));break;}_0x49791c+=_0x531bf0['decode'](_0x54f12c,{'stream':!![]});const _0x136545=_0x49791c['split']('\x0a');_0x49791c=_0x136545[_0x1ca80b(0x85)]()||'';for(const _0x1d595e of _0x136545){if(_0x1d595e['trim']()===''){_0xc89834['data']&&(yield parseSSEData(_0xc89834['data']),_0xc89834={});continue;}if(_0x1d595e[_0x1ca80b(0x78)](':'))continue;const _0x225b25=_0x1d595e[_0x1ca80b(0x7e)](':');if(_0x225b25===-0x1)continue;const _0x6f4a35=_0x1d595e[_0x1ca80b(0x79)](0x0,_0x225b25);let _0x556cf6=_0x1d595e[_0x1ca80b(0x79)](_0x225b25+0x1);_0x556cf6['startsWith']('\x20')&&(_0x556cf6=_0x556cf6[_0x1ca80b(0x79)](0x1));switch(_0x6f4a35){case'event':_0xc89834[_0x1ca80b(0x8b)]=_0x556cf6;break;case _0x1ca80b(0x7f):_0xc89834['data']=_0xc89834['data']?_0xc89834[_0x1ca80b(0x7f)]+'\x0a'+_0x556cf6:_0x556cf6;break;case'id':_0xc89834['id']=_0x556cf6;break;}}}}finally{_0x1bbbbd[_0x1ca80b(0x7c)]();}}function a77_0xf2cf(){const _0x4ed5fc=['13815944yZXwJH','1498494ZXyEFt','body','pop','18LbURoB','parse','2BYHmrU','1354340XlJlJk','3650612EyPACs','event','startsWith','slice','1968045zodbFM','Response\x20body\x20is\x20null','releaseLock','234152kXCEAQ','indexOf','data','999062oQEMUO','Failed\x20to\x20parse\x20SSE\x20data\x20as\x20JSON:\x20'];a77_0xf2cf=function(){return _0x4ed5fc;};return a77_0xf2cf();}function a77_0x5cf0(_0x5355ca,_0x3b74bd){const _0xf2cf01=a77_0xf2cf();return a77_0x5cf0=function(_0x5cf07f,_0x3399bb){_0x5cf07f=_0x5cf07f-0x78;let _0x5abee6=_0xf2cf01[_0x5cf07f];return _0x5abee6;},a77_0x5cf0(_0x5355ca,_0x3b74bd);}function parseSSEData(_0x598a9e){const _0x25e5d8=a77_0x5cf0;try{return JSON[_0x25e5d8(0x87)](_0x598a9e);}catch(_0x4793ef){throw new Error(_0x25e5d8(0x81)+_0x598a9e,{'cause':_0x4793ef});}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a78_0x53b2(){const _0x3afcb4=['Cannot\x20build\x20LIKE\x20pattern\x20from\x20empty\x20string','7ivbBFQ','4444tCgtyn','5715237tEaVhb','unknown','trim','4736330lYGayd','1667320joKILr','replace','1425072ryEWtL','repeat','substring','\x5c$&','388muGBMS','toString','random','test','env','slice','toLowerCase','2778996tNJsrp','16555FMijOK','Cannot\x20escape\x20empty\x20string\x20literal','88yJRnuW','9LVvMmd','floor','length'];a78_0x53b2=function(){return _0x3afcb4;};return a78_0x53b2();}(function(_0x3c956d,_0x2a0e40){const _0xd7a877=a78_0x55c3,_0x5e68fb=_0x3c956d();while(!![]){try{const _0x400c14=-parseInt(_0xd7a877(0xa6))/0x1*(parseInt(_0xd7a877(0xac))/0x2)+-parseInt(_0xd7a877(0xb3))/0x3+-parseInt(_0xd7a877(0xb7))/0x4*(-parseInt(_0xd7a877(0xa4))/0x5)+parseInt(_0xd7a877(0xa3))/0x6+-parseInt(_0xd7a877(0xab))/0x7*(-parseInt(_0xd7a877(0xb1))/0x8)+-parseInt(_0xd7a877(0xa7))/0x9*(-parseInt(_0xd7a877(0xb0))/0xa)+-parseInt(_0xd7a877(0xad))/0xb;if(_0x400c14===_0x2a0e40)break;else _0x5e68fb['push'](_0x5e68fb['shift']());}catch(_0x177f42){_0x5e68fb['push'](_0x5e68fb['shift']());}}}(a78_0x53b2,0x4371e));import a78_0x188cad from'string-width';export function stringWidth(_0x427b4e){return a78_0x188cad(_0x427b4e);}export function padEnd(_0x474770,_0x2db0b3){const _0x34ae8e=a78_0x55c3,_0x490023=stringWidth(_0x474770);if(_0x490023>=_0x2db0b3)return _0x474770;return _0x474770+'\x20'[_0x34ae8e(0xb4)](_0x2db0b3-_0x490023);}export function padStart(_0x2b85cc,_0x232d47){const _0x41ef6d=stringWidth(_0x2b85cc);if(_0x41ef6d>=_0x232d47)return _0x2b85cc;return'\x20'['repeat'](_0x232d47-_0x41ef6d)+_0x2b85cc;}export function centerAlign(_0xe1b6f6,_0x39005c){const _0x84db77=a78_0x55c3,_0x4691a1=stringWidth(_0xe1b6f6);if(_0x4691a1>_0x39005c){if(_0x39005c<=0x1)return'…'[_0x84db77(0xb5)](0x0,_0x39005c);let _0x4fe13c=_0xe1b6f6;while(stringWidth(_0x4fe13c+'…')>_0x39005c){_0x4fe13c=_0x4fe13c[_0x84db77(0xbc)](0x0,-0x1);}return _0x4fe13c+'…';}if(_0x4691a1===_0x39005c)return _0xe1b6f6;const _0x721864=_0x39005c-_0x4691a1,_0x99eae5=Math['floor'](_0x721864/0x2),_0x41d49e=_0x721864-_0x99eae5;return'\x20'[_0x84db77(0xb4)](_0x99eae5)+_0xe1b6f6+'\x20'['repeat'](_0x41d49e);}export function escapeStringLiteral(_0x20384b){const _0x43b00e=a78_0x55c3;if(!_0x20384b||_0x20384b[_0x43b00e(0xaf)]()['length']===0x0)throw new Error(_0x43b00e(0xa5));const _0x219570=_0x20384b[_0x43b00e(0xb2)](/'/g,'\x27\x27');return'\x27'+_0x219570+'\x27';}export function globToLike(_0x34a0be){const _0x1b4242=a78_0x55c3;let _0x2b6459=_0x34a0be[_0x1b4242(0xb2)](/\\/g,'\x5c\x5c')['replace'](/%/g,'\x5c%')[_0x1b4242(0xb2)](/_/g,'\x5c_');return _0x2b6459=_0x2b6459[_0x1b4242(0xb2)](/\*/g,'%')['replace'](/\?/g,'_'),_0x2b6459;}export function buildLikePattern(_0x319cd0){const _0x3df1c1=a78_0x55c3;if(!_0x319cd0||_0x319cd0[_0x3df1c1(0xaf)]()[_0x3df1c1(0xa9)]===0x0)throw new Error(_0x3df1c1(0xaa));const _0x564b14=globToLike(_0x319cd0),_0x2e52b2=_0x564b14[_0x3df1c1(0xb2)](/'/g,'\x27\x27');return'\x27'+_0x2e52b2+'\x27';}export function matchGlobPattern(_0x4a33d1,_0x26ef1c){const _0x2d5b57=a78_0x55c3,_0x515e4a=_0x26ef1c[_0x2d5b57(0xb2)](/[.+^${}()|[\]\\]/g,_0x2d5b57(0xb6))[_0x2d5b57(0xb2)](/\*/g,'.*')[_0x2d5b57(0xb2)](/\?/g,'.'),_0x32ade8=new RegExp('^'+_0x515e4a+'$');return _0x32ade8[_0x2d5b57(0xba)](_0x4a33d1);}function a78_0x55c3(_0x1c1e3d,_0x164d5c){const _0x53b26e=a78_0x53b2();return a78_0x55c3=function(_0x55c302,_0x5c20df){_0x55c302=_0x55c302-0xa3;let _0x2e8625=_0x53b26e[_0x55c302];return _0x2e8625;},a78_0x55c3(_0x1c1e3d,_0x164d5c);}export function getSanitizedUsername(){const _0x2145de=a78_0x55c3,_0x4dea97=process[_0x2145de(0xbb)]['USER']||process['env']['USERNAME']||_0x2145de(0xae);return _0x4dea97[_0x2145de(0xb2)](/[^a-zA-Z0-9]/g,'')[_0x2145de(0xbd)]();}export function generateRandomHex(){const _0x1781b1=a78_0x55c3,_0xa54298=Math[_0x1781b1(0xa8)](Math[_0x1781b1(0xb9)]()*0xfffff);return _0xa54298[_0x1781b1(0xb8)](0x10)['padStart'](0x5,'0');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
(function(_0x404721,_0x3a2f95){const _0x4efeee=a79_0x11f5,_0xc8af2b=_0x404721();while(!![]){try{const _0x761046=parseInt(_0x4efeee(0xab))/0x1+parseInt(_0x4efeee(0xa4))/0x2+parseInt(_0x4efeee(0xa8))/0x3*(-parseInt(_0x4efeee(0xa9))/0x4)+parseInt(_0x4efeee(0x99))/0x5+parseInt(_0x4efeee(0xaa))/0x6+parseInt(_0x4efeee(0x9d))/0x7+parseInt(_0x4efeee(0x9e))/0x8*(-parseInt(_0x4efeee(0xa3))/0x9);if(_0x761046===_0x3a2f95)break;else _0xc8af2b['push'](_0xc8af2b['shift']());}catch(_0x313063){_0xc8af2b['push'](_0xc8af2b['shift']());}}}(a79_0xde90,0x528b0));function a79_0xde90(){const _0x226123=['4211186erpfMF','7896zIikRq','split','push','database','Pattern\x20cannot\x20be\x20empty\x20or\x20whitespace-only','5337EjpymI','130018KVbLtW','Table\x20part\x20cannot\x20be\x20empty\x20-\x20use\x20\x22*\x22\x20for\x20all\x20tables\x20(e.g.,\x20\x22mydb.*\x22)','Pattern\x20cannot\x20be\x20just\x20a\x20dot','Wildcards\x20are\x20not\x20allowed\x20in\x20database\x20name\x20for\x20describe\x20operation','146661RMtFnm','20UrHCQt','2360958SuGaPB','23161lfIXEO','Wildcards\x20are\x20not\x20allowed\x20in\x20table\x20name\x20for\x20describe\x20operation','Invalid\x20pattern\x20format\x20-\x20too\x20many\x20dots\x20(max:\x20catalog.database.table)','trim','length','422805beddSe','Invalid\x20catalog.database.table\x20format\x20-\x20all\x20parts\x20must\x20be\x20non-empty','Database\x20part\x20cannot\x20be\x20empty\x20-\x20use\x20\x22*\x22\x20for\x20all\x20databases\x20(e.g.,\x20\x22*.mytable\x22)','table'];a79_0xde90=function(){return _0x226123;};return a79_0xde90();}function hasWildcard(_0x2e09e7){return _0x2e09e7['includes']('*')||_0x2e09e7['includes']('?');}export function parseTableReference(_0xa8276c){const _0x42af0e=a79_0x11f5;if(!_0xa8276c||_0xa8276c[_0x42af0e(0x97)]()['length']===0x0)throw new Error(_0x42af0e(0xa2));const _0x12860b=_0xa8276c['trim'](),_0x3cca31={'original':_0x12860b},_0x26ede8=_0x12860b[_0x42af0e(0x9f)]('.');if(_0x26ede8['length']===0x1){const _0x46f5ee=_0x26ede8[0x0];if(!_0x46f5ee)throw new Error(_0x42af0e(0xa6));_0x3cca31[_0x42af0e(0x9c)]=_0x46f5ee;}else{if(_0x26ede8[_0x42af0e(0x98)]===0x2){const [_0x55530a,_0x1c0112]=_0x26ede8;if(!_0x55530a)throw new Error(_0x42af0e(0x9b));if(!_0x1c0112)throw new Error(_0x42af0e(0xa5));_0x3cca31[_0x42af0e(0xa1)]=_0x55530a,_0x3cca31[_0x42af0e(0x9c)]=_0x1c0112;}else{if(_0x26ede8['length']===0x3){const [_0x55e77d,_0x6c1667,_0xe5ae41]=_0x26ede8;if(!_0x55e77d||!_0x6c1667||!_0xe5ae41)throw new Error(_0x42af0e(0x9a));_0x3cca31['catalog']=_0x55e77d,_0x3cca31['database']=_0x6c1667,_0x3cca31[_0x42af0e(0x9c)]=_0xe5ae41;}else throw new Error(_0x42af0e(0x96));}}return _0x3cca31;}export function formatTableReference(_0x52aa72){const _0x58f587=a79_0x11f5,_0x34eca6=[];return _0x52aa72['catalog']&&_0x34eca6[_0x58f587(0xa0)](_0x52aa72['catalog']),_0x52aa72[_0x58f587(0xa1)]&&_0x34eca6['push'](_0x52aa72[_0x58f587(0xa1)]),_0x52aa72[_0x58f587(0x9c)]&&_0x34eca6[_0x58f587(0xa0)](_0x52aa72['table']),_0x34eca6['join']('.');}function a79_0x11f5(_0x4b8180,_0x179589){const _0xde9024=a79_0xde90();return a79_0x11f5=function(_0x11f524,_0x4b0bd2){_0x11f524=_0x11f524-0x96;let _0x135ce0=_0xde9024[_0x11f524];return _0x135ce0;},a79_0x11f5(_0x4b8180,_0x179589);}export function validateTableListReference(_0x20bec5){return undefined;}export function validateTableDescribeReference(_0x77206c){const _0x5d2b19=a79_0x11f5;if(!_0x77206c[_0x5d2b19(0x9c)])return'Table\x20name\x20is\x20required\x20for\x20describe\x20operation';if(_0x77206c['database']&&hasWildcard(_0x77206c[_0x5d2b19(0xa1)]))return _0x5d2b19(0xa7);if(hasWildcard(_0x77206c[_0x5d2b19(0x9c)]))return _0x5d2b19(0xac);return undefined;}
|
package/dist/utils/tdx-logger.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a80_0x59ca80=a80_0xcb33;(function(_0x4252e5,_0x370869){const _0x372e8f=a80_0xcb33,_0x77021a=_0x4252e5();while(!![]){try{const _0x523d93=-parseInt(_0x372e8f(0xfa))/0x1+parseInt(_0x372e8f(0xda))/0x2*(-parseInt(_0x372e8f(0xd1))/0x3)+-parseInt(_0x372e8f(0xf8))/0x4*(parseInt(_0x372e8f(0xca))/0x5)+-parseInt(_0x372e8f(0xd7))/0x6*(-parseInt(_0x372e8f(0xf1))/0x7)+parseInt(_0x372e8f(0xc2))/0x8+-parseInt(_0x372e8f(0xef))/0x9+parseInt(_0x372e8f(0xc7))/0xa;if(_0x523d93===_0x370869)break;else _0x77021a['push'](_0x77021a['shift']());}catch(_0x10376){_0x77021a['push'](_0x77021a['shift']());}}}(a80_0x3d38,0xe85d9));import{createWriteStream,createReadStream}from'fs';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_0x5ddf68 from'chalk';function safeStringify(_0x5d2650){const _0x546a10=a80_0xcb33;if(typeof _0x5d2650===_0x546a10(0xd5))return _0x5d2650;if(_0x5d2650 instanceof Error)return _0x5d2650[_0x546a10(0xcb)]||_0x5d2650[_0x546a10(0xe9)]+':\x20'+_0x5d2650['message'];try{return JSON['stringify'](_0x5d2650,(_0x233ac8,_0x150c2c)=>{const _0x3be9b7=_0x546a10;if(_0x150c2c instanceof Error)return{'name':_0x150c2c[_0x3be9b7(0xe9)],'message':_0x150c2c[_0x3be9b7(0xe3)],'stack':_0x150c2c[_0x3be9b7(0xcb)],'cause':_0x150c2c[_0x3be9b7(0xea)]};return _0x150c2c;});}catch{return String(_0x5d2650);}}function getTimezoneOffset(){const _0x291e68=a80_0xcb33,_0x42f578=-new Date()[_0x291e68(0xf6)](),_0xfdb8a5=Math[_0x291e68(0xdf)](Math[_0x291e68(0xc4)](_0x42f578)/0x3c),_0x297c86=Math['abs'](_0x42f578)%0x3c,_0x18cf2c=_0x42f578>=0x0?'+':'-';return''+_0x18cf2c+_0xfdb8a5['toString']()[_0x291e68(0xf0)](0x2,'0')+_0x297c86[_0x291e68(0xec)]()['padStart'](0x2,'0');}function formatTimestamp(){const _0x74a62e=a80_0xcb33,_0x45156a=new Date(),_0x3ad243=_0x45156a[_0x74a62e(0xc5)](),_0xe9b11a=(_0x45156a[_0x74a62e(0xfe)]()+0x1)[_0x74a62e(0xec)]()['padStart'](0x2,'0'),_0x581ad3=_0x45156a['getDate']()['toString']()[_0x74a62e(0xf0)](0x2,'0'),_0x145515=_0x45156a['getHours']()[_0x74a62e(0xec)]()[_0x74a62e(0xf0)](0x2,'0'),_0x2adc76=_0x45156a[_0x74a62e(0xe8)]()[_0x74a62e(0xec)]()[_0x74a62e(0xf0)](0x2,'0'),_0x4eccb8=_0x45156a['getSeconds']()['toString']()[_0x74a62e(0xf0)](0x2,'0'),_0x16b0db=_0x45156a[_0x74a62e(0xf7)]()['toString']()[_0x74a62e(0xf0)](0x3,'0'),_0x15592b=getTimezoneOffset();return _0x3ad243+'-'+_0xe9b11a+'-'+_0x581ad3+'\x20'+_0x145515+':'+_0x2adc76+':'+_0x4eccb8+'.'+_0x16b0db+_0x15592b;}function a80_0x3d38(){const _0x3c0c0d=['getMonth','logStream','warn','getLogPath','DEBUG','2783016BSyKZZ','logDir','abs','getFullYear','info','15040800Gxhjmr','INFO','filter','13045CpaTOb','stack','includes','logs','Warning:\x20Failed\x20to\x20compress\x20','split','error','246DmcngX','ERROR','write','init','string','toISOString','9295632aIiySP','gray','rotateOldLogs','24812ujioyW','tdx','.gz','proxy-','TRACE','floor','.cache','.log','cyan','message','proxy.log','Proxy\x20server\x20started','WARN','debug','getMinutes','name','cause','fileOnly','toString','log','end','7423551qBGaPp','padStart','7frFwpl','mtime','Warning:\x20Failed\x20to\x20initialize\x20proxy\x20log\x20files:','trace','join','getTimezoneOffset','getMilliseconds','284jBsEBc','yellow','422090XcfmhZ','close','Warning:\x20Error\x20writing\x20to\x20proxy.log:','logLevel'];a80_0x3d38=function(){return _0x3c0c0d;};return a80_0x3d38();}function formatColoredLogEntry(_0x55b0a2,_0x285a88){const _0x5779e=a80_0xcb33,_0x448e1c=formatTimestamp(),_0x3c5f7a=_0x285a88['map'](safeStringify)[_0x5779e(0xf5)]('\x20'),_0x30a78b=a80_0x5ddf68[_0x5779e(0xd8)](_0x448e1c);let _0x32970c;switch(_0x55b0a2){case _0x5779e(0xc6):_0x32970c=a80_0x5ddf68[_0x5779e(0xe2)]('['+_0x55b0a2+']\x20');break;case _0x5779e(0x100):_0x32970c=a80_0x5ddf68[_0x5779e(0xf9)]('['+_0x55b0a2+']\x20');break;case _0x5779e(0xd0):_0x32970c=a80_0x5ddf68['red']('['+_0x55b0a2+']');break;case _0x5779e(0xe7):_0x32970c=a80_0x5ddf68['gray']('['+_0x55b0a2+']');break;default:_0x32970c='['+_0x55b0a2+']';}return _0x30a78b+'\x20'+_0x32970c+'\x20'+_0x3c5f7a;}export var LogLevel;function a80_0xcb33(_0x177707,_0x53e678){const _0x3d389a=a80_0x3d38();return a80_0xcb33=function(_0xcb336b,_0x251c90){_0xcb336b=_0xcb336b-0xc2;let _0xc6e307=_0x3d389a[_0xcb336b];return _0xc6e307;},a80_0xcb33(_0x177707,_0x53e678);}(function(_0x1ee281){const _0x347e0a=a80_0xcb33;_0x1ee281[_0x1ee281[_0x347e0a(0xde)]=-0x2]=_0x347e0a(0xde),_0x1ee281[_0x1ee281[_0x347e0a(0x102)]=-0x1]=_0x347e0a(0x102),_0x1ee281[_0x1ee281[_0x347e0a(0xc8)]=0x0]=_0x347e0a(0xc8),_0x1ee281[_0x1ee281['WARN']=0x1]=_0x347e0a(0xe6),_0x1ee281[_0x1ee281[_0x347e0a(0xd2)]=0x2]=_0x347e0a(0xd2);}(LogLevel||(LogLevel={})));export class TDXLogger{[a80_0x59ca80(0xff)];['logDir'];[a80_0x59ca80(0xfd)];[a80_0x59ca80(0xeb)];constructor(_0x4ba1f4=LogLevel[a80_0x59ca80(0xc8)],_0x2601bd=![]){const _0x1b6e04=a80_0x59ca80;this[_0x1b6e04(0xc3)]=join(homedir(),_0x1b6e04(0xe0),_0x1b6e04(0xdb),_0x1b6e04(0xcd)),this[_0x1b6e04(0xfd)]=_0x4ba1f4,this[_0x1b6e04(0xeb)]=_0x2601bd;}async[a80_0x59ca80(0xd4)](){const _0x283938=a80_0x59ca80;try{await mkdir(this[_0x283938(0xc3)],{'recursive':!![]}),await this[_0x283938(0xd9)]();const _0x264eab=join(this['logDir'],_0x283938(0xe4));this[_0x283938(0xff)]=createWriteStream(_0x264eab,{'flags':'a'}),this[_0x283938(0xff)]['on']('error',_0x5630f5=>{const _0x5109c6=_0x283938;console['error'](_0x5109c6(0xfc),_0x5630f5[_0x5109c6(0xe3)]);}),this['info'](_0x283938(0xe5));}catch(_0x498ae1){console[_0x283938(0xd0)](_0x283938(0xf3),_0x498ae1);}}async[a80_0x59ca80(0xd9)](){const _0x3a2f01=a80_0x59ca80;try{const _0x5d2a07=await readdir(this[_0x3a2f01(0xc3)]),_0x4c3705=new Date()[_0x3a2f01(0xd6)]()[_0x3a2f01(0xcf)]('T')[0x0];if(_0x5d2a07[_0x3a2f01(0xcc)](_0x3a2f01(0xe4))){const _0x3ae086=join(this['logDir'],_0x3a2f01(0xe4)),_0x1e841a=await stat(_0x3ae086),_0x1fe434=new Date(_0x1e841a[_0x3a2f01(0xf2)])['toISOString']()['split']('T')[0x0];if(_0x1fe434<_0x4c3705){const _0x2da789=join(this[_0x3a2f01(0xc3)],_0x3a2f01(0xdd)+_0x1fe434+_0x3a2f01(0xe1));await rename(_0x3ae086,_0x2da789);}}const _0x1bba29=await readdir(this[_0x3a2f01(0xc3)]),_0x2aea42=/^proxy-(\d{4}-\d{2}-\d{2})\.log$/,_0x573310=_0x1bba29[_0x3a2f01(0xc9)](_0xd097f6=>_0x2aea42['test'](_0xd097f6));for(const _0xdbace2 of _0x573310){const _0xd743a7=join(this['logDir'],_0xdbace2),_0x1112e4=join(this[_0x3a2f01(0xc3)],_0xdbace2+_0x3a2f01(0xdc));try{await pipeline(createReadStream(_0xd743a7),createGzip(),createWriteStream(_0x1112e4)),await unlink(_0xd743a7);}catch(_0x105ecc){console[_0x3a2f01(0xd0)](_0x3a2f01(0xce)+_0xdbace2+':',_0x105ecc);}}}catch{}}[a80_0x59ca80(0xe7)](..._0x46a941){const _0x56b400=a80_0x59ca80;if(this[_0x56b400(0xfd)]>LogLevel[_0x56b400(0x102)])return;const _0x2ff27e=formatColoredLogEntry('debug',_0x46a941);this[_0x56b400(0xff)]?.[_0x56b400(0xd3)](_0x2ff27e+'\x0a');}['trace'](..._0x4011fc){const _0x2451ef=a80_0x59ca80;if(this[_0x2451ef(0xfd)]>LogLevel[_0x2451ef(0xde)])return;const _0x3b3769=formatColoredLogEntry(_0x2451ef(0xf4),_0x4011fc);this['logStream']?.['write'](_0x3b3769+'\x0a');}[a80_0x59ca80(0xc6)](..._0x4fb703){const _0x568dad=a80_0x59ca80;if(this[_0x568dad(0xfd)]>LogLevel[_0x568dad(0xc8)])return;const _0x4365a3=formatColoredLogEntry('info',_0x4fb703);!this[_0x568dad(0xeb)]&&console[_0x568dad(0xed)](_0x4365a3),this['logStream']?.[_0x568dad(0xd3)](_0x4365a3+'\x0a');}[a80_0x59ca80(0x100)](..._0x3fcce9){const _0x1ae6fc=a80_0x59ca80;if(this['logLevel']>LogLevel['WARN'])return;const _0x216e3a=formatColoredLogEntry(_0x1ae6fc(0x100),_0x3fcce9);!this[_0x1ae6fc(0xeb)]&&console['error'](_0x216e3a),this[_0x1ae6fc(0xff)]?.[_0x1ae6fc(0xd3)](_0x216e3a+'\x0a');}[a80_0x59ca80(0xd0)](..._0x4aa44f){const _0x2f1219=a80_0x59ca80,_0x5bc5a5=formatColoredLogEntry(_0x2f1219(0xd0),_0x4aa44f);!this['fileOnly']&&console[_0x2f1219(0xd0)](_0x5bc5a5),this['logStream']?.['write'](_0x5bc5a5+'\x0a');}async[a80_0x59ca80(0xfb)](){const _0x43cfbf=a80_0x59ca80;return this[_0x43cfbf(0xc6)]('Proxy\x20session\x20ended'),new Promise(_0x2dfef2=>{const _0x433eea=_0x43cfbf;this[_0x433eea(0xff)]?this[_0x433eea(0xff)][_0x433eea(0xee)](()=>{_0x2dfef2();}):_0x2dfef2();});}[a80_0x59ca80(0x101)](){const _0x3ae44d=a80_0x59ca80;return join(this['logDir'],_0x3ae44d(0xe4));}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x570e66,_0xb679c6){const _0x3cef39=a81_0x55e8,_0x12140f=_0x570e66();while(!![]){try{const _0x1dc595=-parseInt(_0x3cef39(0x10f))/0x1*(-parseInt(_0x3cef39(0x107))/0x2)+-parseInt(_0x3cef39(0x105))/0x3+parseInt(_0x3cef39(0xfc))/0x4+-parseInt(_0x3cef39(0x10b))/0x5*(parseInt(_0x3cef39(0xf8))/0x6)+parseInt(_0x3cef39(0x103))/0x7*(-parseInt(_0x3cef39(0x104))/0x8)+parseInt(_0x3cef39(0x101))/0x9*(-parseInt(_0x3cef39(0x10c))/0xa)+parseInt(_0x3cef39(0xf9))/0xb;if(_0x1dc595===_0xb679c6)break;else _0x12140f['push'](_0x12140f['shift']());}catch(_0x45e540){_0x12140f['push'](_0x12140f['shift']());}}}(a81_0x29d9,0xc0d78));import{formatRows}from'./formatters.js';import a81_0x40dc8b from'chalk';const DEFAULT_OPTIONS={'showTreeLines':!![],'showIcons':!![],'showMetadata':!![],'indent':'\x20\x20'};export function formatTree(_0xb19482,_0x4693c5={},_0x27023a=0x0,_0x37259d=''){const _0x435a60=a81_0x55e8,_0x3b804c={...DEFAULT_OPTIONS,..._0x4693c5},_0xea6eec=[],_0x5185b8=[..._0xb19482][_0x435a60(0xed)]((_0x23d822,_0x470ea7)=>_0x23d822['name'][_0x435a60(0xf3)](_0x470ea7[_0x435a60(0x106)]));for(let _0x37a0be=0x0;_0x37a0be<_0x5185b8[_0x435a60(0xf4)];_0x37a0be++){const _0x446cd3=_0x5185b8[_0x37a0be],_0x4867bc=_0x37a0be===_0x5185b8[_0x435a60(0xf4)]-0x1;let _0x5550d3='';_0x27023a>0x0&&(_0x5550d3+=_0x37259d);_0x3b804c[_0x435a60(0xf5)]&&_0x27023a>0x0&&(_0x5550d3+=a81_0x40dc8b[_0x435a60(0xfd)](_0x4867bc?'└──\x20':'├──\x20'));_0x3b804c['showIcons']&&(_0x5550d3+=_0x446cd3['type']===_0x435a60(0x100)?'📁\x20':'🎯\x20');_0x5550d3+=_0x446cd3[_0x435a60(0x106)];if(_0x3b804c[_0x435a60(0x108)]){if(_0x446cd3[_0x435a60(0xfe)]===_0x435a60(0x100)){const _0x1e9fd1=[];_0x446cd3[_0x435a60(0xfa)][_0x435a60(0xf1)]&&_0x1e9fd1[_0x435a60(0x102)](_0x446cd3['metadata'][_0x435a60(0xf1)]+_0x435a60(0xef)+(_0x446cd3[_0x435a60(0xfa)][_0x435a60(0xf1)]!==0x1?'s':'')),_0x446cd3['metadata'][_0x435a60(0xfb)]&&_0x1e9fd1[_0x435a60(0x102)](_0x446cd3[_0x435a60(0xfa)][_0x435a60(0xfb)]+'\x20folder'+(_0x446cd3['metadata'][_0x435a60(0xfb)]!==0x1?'s':'')),_0x1e9fd1[_0x435a60(0xf4)]>0x0&&(_0x5550d3+=a81_0x40dc8b[_0x435a60(0xfd)]('\x20('+_0x1e9fd1[_0x435a60(0xee)](',\x20')+')'));}else _0x446cd3[_0x435a60(0xfe)]===_0x435a60(0x10a)&&_0x446cd3[_0x435a60(0xf0)]!==undefined&&(_0x5550d3+=a81_0x40dc8b[_0x435a60(0xfd)]('\x20('+formatRows(_0x446cd3[_0x435a60(0xf0)])+')'));}_0xea6eec[_0x435a60(0x102)](_0x5550d3);if(_0x446cd3['children']&&_0x446cd3[_0x435a60(0x109)][_0x435a60(0xf4)]>0x0){let _0x5491c9;if(_0x27023a===0x0)_0x5491c9='';else _0x3b804c[_0x435a60(0xf5)]?_0x5491c9=_0x37259d+(_0x4867bc?_0x435a60(0x10e):a81_0x40dc8b[_0x435a60(0xfd)]('│')+_0x435a60(0xf7)):_0x5491c9=_0x37259d+_0x3b804c['indent'];const _0x2e4fb8=formatTree(_0x446cd3[_0x435a60(0x109)],_0x3b804c,_0x27023a+0x1,_0x5491c9);_0xea6eec['push'](_0x2e4fb8);}}return _0xea6eec[_0x435a60(0xee)]('\x0a');}function a81_0x55e8(_0x24e004,_0x2f6cd2){const _0x29d9ec=a81_0x29d9();return a81_0x55e8=function(_0x55e817,_0x780f6d){_0x55e817=_0x55e817-0xed;let _0x28e3ac=_0x29d9ec[_0x55e817];return _0x28e3ac;},a81_0x55e8(_0x24e004,_0x2f6cd2);}function a81_0x29d9(){const _0x4372a9=['showTreeLines','icon','\x20\x20\x20','1038BdBQxc','37251852xTDFJw','metadata','folderCount','1706960wIcyNY','dim','type','showIcons','folder','369RRFftk','push','6163087HcTgnR','8BYnoQw','810195MlsFYl','name','66KARPGF','showMetadata','children','segment','24300NmZaCw','263750rhKLyJ','map','\x20\x20\x20\x20','1493eIpdym','sort','join','\x20segment','population','segmentCount','(empty)','localeCompare','length'];a81_0x29d9=function(){return _0x4372a9;};return a81_0x29d9();}export function formatFlatList(_0x8ad22,_0x51eef9,_0x36f7c1={}){const _0x4f41b5=a81_0x55e8,_0x430ed7={...DEFAULT_OPTIONS,..._0x36f7c1},_0x58482d=[];for(const _0x372507 of _0x8ad22){_0x58482d[_0x4f41b5(0x102)]({'name':_0x372507['name'],'icon':_0x430ed7[_0x4f41b5(0xff)]?'📁':'','metadata':undefined});}for(const _0x23687f of _0x51eef9){const _0x28b319=_0x430ed7[_0x4f41b5(0x108)]&&_0x23687f[_0x4f41b5(0xf0)]!==undefined?a81_0x40dc8b[_0x4f41b5(0xfd)]('\x20('+formatRows(_0x23687f['population'])+')'):'';_0x58482d[_0x4f41b5(0x102)]({'name':_0x23687f[_0x4f41b5(0x106)],'icon':_0x430ed7['showIcons']?'🎯':'','metadata':_0x28b319});}_0x58482d[_0x4f41b5(0xed)]((_0x5e909c,_0x1b3a3e)=>_0x5e909c['name'][_0x4f41b5(0xf3)](_0x1b3a3e[_0x4f41b5(0x106)]));if(_0x58482d[_0x4f41b5(0xf4)]===0x0)return _0x4f41b5(0xf2);const _0x117890=_0x58482d[_0x4f41b5(0x10d)](_0x47a438=>{const _0x49874b=_0x4f41b5,_0xc05006=_0x47a438['icon']?_0x47a438[_0x49874b(0xf6)]+'\x20':'',_0x46a748=_0x47a438['metadata']||'';return''+_0xc05006+_0x47a438[_0x49874b(0x106)]+_0x46a748;});return _0x117890[_0x4f41b5(0xee)]('\x0a');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a82_0x442a(_0x3724d2,_0x56e286){const _0x4d26d2=a82_0x4d26();return a82_0x442a=function(_0x442a6e,_0x189bf8){_0x442a6e=_0x442a6e-0x152;let _0x3048ed=_0x4d26d2[_0x442a6e];return _0x3048ed;},a82_0x442a(_0x3724d2,_0x56e286);}(function(_0x5cd361,_0x49c92a){const _0x24c7c7=a82_0x442a,_0x24b627=_0x5cd361();while(!![]){try{const _0x258b6b=parseInt(_0x24c7c7(0x174))/0x1+parseInt(_0x24c7c7(0x171))/0x2+parseInt(_0x24c7c7(0x15e))/0x3+parseInt(_0x24c7c7(0x165))/0x4+-parseInt(_0x24c7c7(0x173))/0x5+parseInt(_0x24c7c7(0x170))/0x6*(-parseInt(_0x24c7c7(0x15b))/0x7)+-parseInt(_0x24c7c7(0x16f))/0x8;if(_0x258b6b===_0x49c92a)break;else _0x24b627['push'](_0x24b627['shift']());}catch(_0x2ff0f1){_0x24b627['push'](_0x24b627['shift']());}}}(a82_0x4d26,0x6a717));import{get}from'https';function a82_0x4d26(){const _0x1fd972=['123952IPNDWX','cyan','1555660NqPRXu','504835cNnNrH','Invalid\x20version\x20format','last_version_check','dim','Request\x20timeout','toISOString','\x0aRun:\x20','write','data','\x0aUpdate\x20available:\x20','green','npm\x20install\x20-g\x20@treasuredata/tdx@latest','70NXUybc','statusCode','currentVersion','1435314OSUBQj','version','utf-8','stderr','updateAvailable','isTTY','end','1858032ApZYKi','yellow','parse','Run:','NO_COLOR','now','destroy','Update\x20available:','latestVersion','getTime','1200672ATZVoK','367530bsjkCt'];a82_0x4d26=function(){return _0x1fd972;};return a82_0x4d26();}import{readFileSync,writeFileSync,mkdirSync}from'fs';import{join}from'path';import{gt,valid}from'semver';import a82_0x7157bc 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 _0x37364f=a82_0x442a,_0x1b3b2d=getCacheDir();return join(_0x1b3b2d,_0x37364f(0x176));}function readCache(){const _0x3f1a00=a82_0x442a;try{const _0x494220=getCacheFilePath(),_0x5235b6=readFileSync(_0x494220,_0x3f1a00(0x160));return JSON['parse'](_0x5235b6);}catch{return null;}}function writeCache(_0x362fa6){const _0x520c90=a82_0x442a;try{const _0x26137c=getCacheDir();mkdirSync(_0x26137c,{'recursive':!![]});const _0x1d8916={'lastCheck':new Date()[_0x520c90(0x154)](),'latestVersion':_0x362fa6},_0x14815a=getCacheFilePath();writeFileSync(_0x14815a,JSON['stringify'](_0x1d8916,null,0x2),_0x520c90(0x160));}catch{}}function isCacheValid(_0x5c4455){const _0x2c2394=a82_0x442a;if(!_0x5c4455)return![];const _0x3bbe34=new Date(_0x5c4455['lastCheck'])[_0x2c2394(0x16e)](),_0x5a2e1a=Date[_0x2c2394(0x16a)]();return _0x5a2e1a-_0x3bbe34<CACHE_DURATION_MS;}function fetchLatestVersion(){return new Promise((_0x4da66a,_0xf2371f)=>{const _0x4ea478=get(NPM_REGISTRY_URL,_0xee6904=>{const _0x23865a=a82_0x442a;if(_0xee6904[_0x23865a(0x15c)]!==0xc8){clearTimeout(_0x21dfe7),_0xf2371f(new Error('HTTP\x20'+_0xee6904[_0x23865a(0x15c)]));return;}let _0x338475='';_0xee6904['on'](_0x23865a(0x157),_0x5eaee7=>{_0x338475+=_0x5eaee7;}),_0xee6904['on'](_0x23865a(0x164),()=>{const _0x1e241f=_0x23865a;clearTimeout(_0x21dfe7);try{const _0x3e12c2=JSON[_0x1e241f(0x167)](_0x338475);if(!valid(_0x3e12c2[_0x1e241f(0x15f)])){_0xf2371f(new Error(_0x1e241f(0x175)));return;}_0x4da66a(_0x3e12c2[_0x1e241f(0x15f)]);}catch(_0x5a7bfc){_0xf2371f(_0x5a7bfc);}});})['on']('error',_0x53faa3=>{clearTimeout(_0x21dfe7),_0xf2371f(_0x53faa3);}),_0x21dfe7=setTimeout(()=>{const _0x7bb069=a82_0x442a;_0x4ea478[_0x7bb069(0x16b)](),_0xf2371f(new Error(_0x7bb069(0x153)));},TIMEOUT_MS);});}export async function checkForUpdate(_0x5e592b){const _0x960435=a82_0x442a;try{const _0x5a4b7c=readCache();if(isCacheValid(_0x5a4b7c)){const _0xdd603c=gt(_0x5a4b7c['latestVersion'],_0x5e592b);return{'updateAvailable':_0xdd603c,'currentVersion':_0x5e592b,'latestVersion':_0x5a4b7c[_0x960435(0x16d)]};}const _0x82aef=await fetchLatestVersion();writeCache(_0x82aef);const _0x4a4cf2=gt(_0x82aef,_0x5e592b);return{'updateAvailable':_0x4a4cf2,'currentVersion':_0x5e592b,'latestVersion':_0x82aef};}catch{return null;}}export function displayUpdateNotification(_0x332bf4){const _0x1bd22e=a82_0x442a;if(!_0x332bf4[_0x1bd22e(0x162)])return;const _0x1bd67e=process[_0x1bd22e(0x161)][_0x1bd22e(0x163)]&&!process['env'][_0x1bd22e(0x169)],_0x102a34=_0x1bd67e?a82_0x7157bc['gray']('→'):'→',_0x950c1a=_0x1bd67e?a82_0x7157bc[_0x1bd22e(0x152)](_0x332bf4['currentVersion']):_0x332bf4[_0x1bd22e(0x15d)],_0x16cc22=_0x1bd67e?a82_0x7157bc[_0x1bd22e(0x159)](_0x332bf4['latestVersion']):_0x332bf4[_0x1bd22e(0x16d)],_0x309c33=_0x1bd67e?a82_0x7157bc[_0x1bd22e(0x172)](_0x1bd22e(0x15a)):_0x1bd22e(0x15a),_0x55b973=_0x1bd67e?'\x0a'+a82_0x7157bc[_0x1bd22e(0x166)](_0x1bd22e(0x16c))+'\x20'+_0x950c1a+'\x20'+_0x102a34+'\x20'+_0x16cc22+'\x0a'+a82_0x7157bc[_0x1bd22e(0x152)](_0x1bd22e(0x168))+'\x20'+_0x309c33+'\x0a':_0x1bd22e(0x158)+_0x950c1a+'\x20'+_0x102a34+'\x20'+_0x16cc22+_0x1bd22e(0x155)+_0x309c33+'\x0a';process[_0x1bd22e(0x161)][_0x1bd22e(0x156)](_0x55b973);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
const a83_0x40202d=a83_0x815d;(function(_0x4f0165,_0x4743b1){const _0x1af26c=a83_0x815d,_0xe6559f=_0x4f0165();while(!![]){try{const _0x182331=parseInt(_0x1af26c(0x1d6))/0x1+-parseInt(_0x1af26c(0x1d0))/0x2+-parseInt(_0x1af26c(0x1d1))/0x3+parseInt(_0x1af26c(0x1da))/0x4*(parseInt(_0x1af26c(0x1d8))/0x5)+parseInt(_0x1af26c(0x1d9))/0x6+-parseInt(_0x1af26c(0x1d5))/0x7+parseInt(_0x1af26c(0x1d3))/0x8;if(_0x182331===_0x4743b1)break;else _0xe6559f['push'](_0xe6559f['shift']());}catch(_0x1c1fde){_0xe6559f['push'](_0xe6559f['shift']());}}}(a83_0x41cd,0x20b50));function a83_0x815d(_0x273c12,_0xa92dec){const _0x41cd6e=a83_0x41cd();return a83_0x815d=function(_0x815dad,_0x452f34){_0x815dad=_0x815dad-0x1d0;let _0x45c4c5=_0x41cd6e[_0x815dad];return _0x45c4c5;},a83_0x815d(_0x273c12,_0xa92dec);}export const WORKFLOW_FILE_EXTENSION=a83_0x40202d(0x1d4);export function shouldIncludeInArchive(_0x33d56c){const _0x166076=a83_0x40202d;if(_0x33d56c===_0x166076(0x1d2))return!![];if(_0x33d56c[_0x166076(0x1d7)]('.'))return![];return!![];}function a83_0x41cd(){const _0x2672cf=['445176pnujqw','271281uyTIil','.digdag','429504PBXtSE','.dig','316673jcuWcq','119804ROBnmd','startsWith','1500cEKGZv','562380BRzCzS','3000IscXCD'];a83_0x41cd=function(){return _0x2672cf;};return a83_0x41cd();}
|