@treasuredata/tdx 2026.3.29 → 2026.3.30
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/bin.js +1 -1
- package/dist/build-info.json +3 -3
- package/dist/cli-categories.js +1 -1
- package/dist/cli.js +1 -1
- package/dist/commands/activations.js +1 -1
- package/dist/commands/agent-command.js +1 -1
- package/dist/commands/agent-test-command.js +1 -1
- package/dist/commands/api-command.js +1 -1
- package/dist/commands/auth-command.js +1 -1
- package/dist/commands/auth-login-command.js +1 -1
- package/dist/commands/chat-command.js +1 -1
- package/dist/commands/claude-command.js +1 -1
- package/dist/commands/claude-statusline-command.js +1 -1
- package/dist/commands/claude-usage-command.js +1 -1
- package/dist/commands/command.js +1 -1
- package/dist/commands/connection-command.js +1 -1
- package/dist/commands/databases.js +1 -1
- package/dist/commands/delivery-command.js +1 -1
- package/dist/commands/describe.js +1 -1
- package/dist/commands/engage-campaign-pull-command.js +1 -1
- package/dist/commands/engage-campaign-push-command.js +1 -1
- package/dist/commands/engage-campaign-validate-command.js +1 -1
- package/dist/commands/engage-command.js +1 -1
- package/dist/commands/engage-template-pull-command.js +1 -1
- package/dist/commands/engage-template-push-command.js +1 -1
- package/dist/commands/engage-template-validate-command.js +1 -1
- package/dist/commands/job-command.js +1 -1
- package/dist/commands/journey-command.js +1 -1
- package/dist/commands/journey-validate-command.js +1 -1
- package/dist/commands/llm-command.js +1 -1
- package/dist/commands/mcp-command.js +1 -1
- package/dist/commands/parent-segment-command.js +1 -1
- package/dist/commands/policy-command.js +1 -1
- package/dist/commands/profile-command.js +1 -1
- package/dist/commands/profiles-command.js +1 -1
- package/dist/commands/query-command.js +1 -1
- package/dist/commands/schedule-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-pull-command.js +1 -1
- package/dist/commands/segment-push-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/segment-validate-command.js +1 -1
- package/dist/commands/segments.js +1 -1
- package/dist/commands/show.js +1 -1
- package/dist/commands/status-command.js +1 -1
- package/dist/commands/tables.js +1 -1
- package/dist/commands/unset-command.js +1 -1
- package/dist/commands/upgrade-command.js +1 -1
- package/dist/commands/use-command.js +1 -1
- package/dist/commands/user-command.js +1 -1
- package/dist/commands/workflow-command.js +1 -1
- package/dist/core/auth.js +1 -1
- package/dist/core/command-output.js +1 -1
- package/dist/core/config.js +1 -1
- package/dist/core/connection-cache.js +1 -1
- package/dist/core/constants.js +1 -1
- package/dist/core/credential-cache.js +1 -1
- package/dist/core/global-context.js +1 -1
- package/dist/core/keychain.js +1 -1
- package/dist/core/oauth-keychain.js +1 -1
- package/dist/core/oauth.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/core/user-cache.js +1 -1
- package/dist/core/version.js +1 -1
- package/dist/index.js +1 -1
- package/dist/mcp/server.js +1 -1
- package/dist/mcp/tools/index.js +1 -1
- package/dist/mcp/tools/tdx-run.js +1 -1
- package/dist/mcp/tools/tdx-search.js +1 -1
- package/dist/mcp/utils.js +1 -1
- package/dist/proxy/claude-usage-tracker.js +1 -1
- package/dist/proxy/passthrough-server.js +1 -1
- package/dist/proxy/sse-usage-parser.js +1 -1
- package/dist/sdk/agent/agent-config.js +1 -1
- package/dist/sdk/agent/agent-ref-parser.js +1 -1
- package/dist/sdk/agent/agent-yaml.js +1 -1
- package/dist/sdk/agent/test/evaluator.js +1 -1
- package/dist/sdk/agent/test/executor.js +1 -1
- package/dist/sdk/agent/test/index.js +1 -1
- package/dist/sdk/agent/test/output.js +1 -1
- package/dist/sdk/agent/test/parser.js +1 -1
- package/dist/sdk/agent/tool-target-registry.js +1 -1
- package/dist/sdk/api.js +1 -1
- package/dist/sdk/client/cdp-api-client.js +1 -1
- package/dist/sdk/client/delivery-api-client.js +1 -1
- package/dist/sdk/client/endpoints.js +1 -1
- package/dist/sdk/client/engage-api-client.js +1 -1
- package/dist/sdk/client/http-client.js +1 -1
- package/dist/sdk/client/llm-api-client.js +1 -1
- package/dist/sdk/client/oauth-refresh.js +1 -1
- package/dist/sdk/client/rate-limiter.js +1 -1
- package/dist/sdk/client/td-api-client.js +1 -1
- package/dist/sdk/client/trino-api-client.js +1 -1
- package/dist/sdk/client/workflow-client.js +1 -1
- package/dist/sdk/connection-validator.js +1 -1
- package/dist/sdk/connection.js +1 -1
- package/dist/sdk/delivery.js +1 -1
- package/dist/sdk/engage/campaign-pull.js +1 -1
- package/dist/sdk/engage/campaign-push.js +1 -1
- package/dist/sdk/engage/campaign-validator.js +1 -1
- package/dist/sdk/engage/campaign-yaml.js +1 -1
- package/dist/sdk/engage/template-pull.js +1 -1
- package/dist/sdk/engage/template-push.js +1 -1
- package/dist/sdk/engage/template-validator.js +1 -1
- package/dist/sdk/engage/template-yaml.js +1 -1
- package/dist/sdk/engage/types/campaign-def.js +1 -1
- package/dist/sdk/engage/types/campaign-schema.js +1 -1
- package/dist/sdk/engage/types/template-schema.js +1 -1
- package/dist/sdk/engage.js +1 -1
- package/dist/sdk/errors.js +1 -1
- package/dist/sdk/index.js +1 -1
- package/dist/sdk/io/index.js +1 -1
- package/dist/sdk/io/node-filesystem.js +1 -1
- package/dist/sdk/job.js +1 -1
- package/dist/sdk/journey.js +1 -1
- package/dist/sdk/llm/chat-cache.js +1 -1
- package/dist/sdk/llm/index.js +1 -1
- package/dist/sdk/llm/llm-backup-utils.js +1 -1
- package/dist/sdk/llm/model-factors.js +1 -1
- package/dist/sdk/personalization.js +1 -1
- package/dist/sdk/policy.js +1 -1
- package/dist/sdk/query/index.js +1 -1
- package/dist/sdk/query/sql-parser.js +1 -1
- package/dist/sdk/realtime.js +1 -1
- package/dist/sdk/schedule.js +1 -1
- package/dist/sdk/segment/child-segment-yaml.js +1 -1
- package/dist/sdk/segment/fields-display.js +1 -1
- package/dist/sdk/segment/file-discovery.js +1 -1
- package/dist/sdk/segment/journey-utils.js +1 -1
- package/dist/sdk/segment/journey-validator.js +1 -1
- package/dist/sdk/segment/journey-yaml.js +1 -1
- package/dist/sdk/segment/parent-segment-preview.js +1 -1
- package/dist/sdk/segment/parent-segment-yaml.js +1 -1
- package/dist/sdk/segment/pull-workflow.js +1 -1
- package/dist/sdk/segment/push-recovery.js +1 -1
- package/dist/sdk/segment/push-workflow.js +1 -1
- package/dist/sdk/segment/resolution-context.js +1 -1
- package/dist/sdk/segment/segment-path-parser.js +1 -1
- package/dist/sdk/segment/segment-ref-parser.js +1 -1
- package/dist/sdk/segment/segment-validator.js +1 -1
- package/dist/sdk/segment/target-resolution.js +1 -1
- package/dist/sdk/segment/tdx-config.js +1 -1
- package/dist/sdk/segment/types/activation-schema.js +1 -1
- package/dist/sdk/segment/types/journey-def.js +1 -1
- package/dist/sdk/segment/types/journey-schema.js +1 -1
- package/dist/sdk/segment/types/segment-def.js +1 -1
- package/dist/sdk/segment/types/segment-schema.js +1 -1
- package/dist/sdk/segment/validate-files.js +1 -1
- package/dist/sdk/segment/yaml-validator.js +1 -1
- package/dist/sdk/segment.js +1 -1
- package/dist/sdk/types/index.js +1 -1
- package/dist/sdk/types/progress.js +1 -1
- package/dist/sdk/user.js +1 -1
- package/dist/sdk/util/format-detector.js +1 -1
- package/dist/sdk/util/formatters.js +1 -1
- package/dist/sdk/util/index.js +1 -1
- package/dist/sdk/util/paginate.js +1 -1
- package/dist/sdk/util/tree-formatter.js +1 -1
- package/dist/sdk/workflow/archive-validation.js +1 -1
- package/dist/sdk/workflow/clone-workflow.js +1 -1
- package/dist/sdk/workflow/index.js +1 -1
- package/dist/sdk/workflow/pull-workflow.js +1 -1
- package/dist/sdk/workflow/push-workflow.js +1 -1
- package/dist/sdk/workflow/tdx-config.js +1 -1
- package/dist/sdk/workflow/workflow-utils.js +1 -1
- package/dist/test-utils/command-runner.js +1 -1
- package/dist/test-utils/factories.js +1 -1
- package/dist/test-utils/fixtures.js +1 -1
- package/dist/test-utils/http-mock.js +1 -1
- package/dist/test-utils/index.js +1 -1
- package/dist/utils/async.js +1 -1
- package/dist/utils/colors.js +1 -1
- package/dist/utils/diff.js +1 -1
- package/dist/utils/file-permissions.js +1 -1
- package/dist/utils/file-reader.js +1 -1
- package/dist/utils/github-releases.js +1 -1
- package/dist/utils/global-cache.js +1 -1
- package/dist/utils/json-loader.js +1 -1
- package/dist/utils/local-cache.js +1 -1
- package/dist/utils/logger/formatters/default-formatter.js +1 -1
- package/dist/utils/logger/formatters/index.js +1 -1
- package/dist/utils/logger/handlers/console-handler.js +1 -1
- package/dist/utils/logger/handlers/file-handler.js +1 -1
- package/dist/utils/logger/handlers/index.js +1 -1
- package/dist/utils/logger/handlers/null-handler.js +1 -1
- package/dist/utils/logger/index.js +1 -1
- package/dist/utils/logger/logger.js +1 -1
- package/dist/utils/logger/types.js +1 -1
- package/dist/utils/option-validation.js +1 -1
- package/dist/utils/process.js +1 -1
- package/dist/utils/prompt.js +1 -1
- package/dist/utils/spinner.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/version-check.js +1 -1
- package/package.json +1 -1
package/dist/utils/process.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a209_0x5afdb9=a209_0x1d14;(function(_0x1efa8a,_0x19a80e){const _0xe2837b=a209_0x1d14,_0x48796c=_0x1efa8a();while(!![]){try{const _0x56c364=-parseInt(_0xe2837b(0x118))/0x1+-parseInt(_0xe2837b(0x119))/0x2*(parseInt(_0xe2837b(0x126))/0x3)+-parseInt(_0xe2837b(0x123))/0x4*(parseInt(_0xe2837b(0x145))/0x5)+parseInt(_0xe2837b(0x139))/0x6+parseInt(_0xe2837b(0x12b))/0x7*(-parseInt(_0xe2837b(0x149))/0x8)+-parseInt(_0xe2837b(0x13d))/0x9+parseInt(_0xe2837b(0x140))/0xa;if(_0x56c364===_0x19a80e)break;else _0x48796c['push'](_0x48796c['shift']());}catch(_0x28b58e){_0x48796c['push'](_0x48796c['shift']());}}}(a209_0x1864,0xc0c66));function a209_0x1864(){const _0x1f4d12=['win32','kill','darwin','http:','claude','zsh','where.exe','4zxgmpg','xonsh','test','2967fbsqMQ','Unsupported\x20protocol:\x20','Get-CimInstance\x20Win32_Process\x20-Filter\x20\x22ProcessId=','toString','data','21259VEgYOK','fish','exit','join','powershell.exe\x20-NoProfile\x20-NonInteractive\x20-Command\x20\x22','pipe','dash','stdout','elvish','ignore','ppid','comm','pid','code','8532576eAVPZC','csh','unref','isInteger','12603321QRUGqM','protocol','ion','45140300aiqscG','error','powershell','has','platform','5821270qGnXpp','map','open','cmd.exe','1304vmpaew','ksh','cursor','replace','\x20-o\x20ppid=,comm=','split','tcsh','https:','href','Invalid\x20URL:\x20','trim','utf-8','1575553XyqkWK','1034cWUpxE','pop','xdg-open'];a209_0x1864=function(){return _0x1f4d12;};return a209_0x1864();}import{execSync,spawn}from'node:child_process';const SHELL_NAMES=new Set(['bash',a209_0x5afdb9(0x121),'sh',a209_0x5afdb9(0x12c),a209_0x5afdb9(0x14a),a209_0x5afdb9(0x112),a209_0x5afdb9(0x13a),a209_0x5afdb9(0x131),'pwsh',a209_0x5afdb9(0x142),'nu',a209_0x5afdb9(0x13f),a209_0x5afdb9(0x133),a209_0x5afdb9(0x124)]),EPHEMERAL_SHELL_SPAWNERS=new Set([a209_0x5afdb9(0x120),a209_0x5afdb9(0x138),a209_0x5afdb9(0x14b),'electron','treasure\x20studio']);function getProcessInfoWindows(_0x2787ae){const _0x11ed9f=a209_0x5afdb9;try{if(!Number['isInteger'](_0x2787ae)||_0x2787ae<=0x0)return null;const _0x4900db=_0x11ed9f(0x128)+_0x2787ae+'\x22\x20|\x20Select-Object\x20-Property\x20ParentProcessId,Name\x20|\x20ForEach-Object\x20{\x20\x22$($_.ParentProcessId),$($_.Name)\x22\x20}',_0x5f48a9=execSync(_0x11ed9f(0x12f)+_0x4900db+'\x22',{'encoding':_0x11ed9f(0x117),'windowsHide':!![],'stdio':['pipe',_0x11ed9f(0x130),_0x11ed9f(0x130)]})[_0x11ed9f(0x116)]();if(!_0x5f48a9)return null;const [_0x1f6ddb,..._0x3ecbdb]=_0x5f48a9[_0x11ed9f(0x14e)](','),_0x7ae7e7=parseInt(_0x1f6ddb,0xa),_0x12d200=_0x3ecbdb[_0x11ed9f(0x12e)](',')[_0x11ed9f(0x116)]();if(isNaN(_0x7ae7e7)||!_0x12d200)return null;return{'pid':_0x2787ae,'ppid':_0x7ae7e7,'comm':_0x12d200[_0x11ed9f(0x14c)](/\.exe$/i,'')};}catch{return null;}}function getProcessInfoPosix(_0x28b823){const _0x5de24f=a209_0x5afdb9;try{const _0x535643=0x400000;if(!Number[_0x5de24f(0x13c)](_0x28b823)||_0x28b823<=0x0||_0x28b823>_0x535643)return null;const _0x6b8e9f=execSync('ps\x20-p\x20'+_0x28b823+_0x5de24f(0x14d),{'encoding':'utf-8','stdio':_0x5de24f(0x130)})[_0x5de24f(0x116)](),[_0x5306e5,..._0x5e93ba]=_0x6b8e9f[_0x5de24f(0x14e)](/\s+/),_0x13bdf3=parseInt(_0x5306e5,0xa),_0x1b6c0a=_0x5e93ba['join']('\x20');if(isNaN(_0x13bdf3))return null;return{'pid':_0x28b823,'ppid':_0x13bdf3,'comm':_0x1b6c0a};}catch{return null;}}function getProcessInfo(_0x3908a4){const _0x27a346=a209_0x5afdb9;if(process['platform']===_0x27a346(0x11c))return getProcessInfoWindows(_0x3908a4);return getProcessInfoPosix(_0x3908a4);}function getBasename(_0x2224ee){const _0x3820aa=a209_0x5afdb9;return _0x2224ee[_0x3820aa(0x14c)](/^-/,'')['split']('/')[_0x3820aa(0x11a)]()?.['toLowerCase']()||'';}function isShell(_0x31310f){const _0x4f21d3=a209_0x5afdb9;return SHELL_NAMES[_0x4f21d3(0x143)](getBasename(_0x31310f));}function isEphemeralShellSpawner(_0x58a616){const _0x497a7c=a209_0x5afdb9;return EPHEMERAL_SHELL_SPAWNERS[_0x497a7c(0x143)](getBasename(_0x58a616));}let cachedShellPID;function findShellPID(){const _0x4c1faa=a209_0x5afdb9;if(process[_0x4c1faa(0x135)]===undefined)return process[_0x4c1faa(0x137)];let _0x53c76b=process[_0x4c1faa(0x135)];const _0x4980e0=0xa;let _0x159976=0x0;while(_0x159976<_0x4980e0){const _0x2e033c=getProcessInfo(_0x53c76b);if(!_0x2e033c)break;if(isShell(_0x2e033c['comm'])){const _0x54798c=getProcessInfo(_0x2e033c[_0x4c1faa(0x135)]);if(_0x54798c&&isEphemeralShellSpawner(_0x54798c[_0x4c1faa(0x136)])){_0x53c76b=_0x2e033c[_0x4c1faa(0x135)],_0x159976++;continue;}return _0x2e033c['pid'];}if(_0x2e033c[_0x4c1faa(0x135)]===0x0||_0x2e033c[_0x4c1faa(0x135)]===0x1){if(isShell(_0x2e033c[_0x4c1faa(0x136)]))return _0x2e033c[_0x4c1faa(0x137)];break;}_0x53c76b=_0x2e033c[_0x4c1faa(0x135)],_0x159976++;}return process[_0x4c1faa(0x135)]!==undefined?process['ppid']:process['pid'];}export function getPPID(){return cachedShellPID===undefined&&(cachedShellPID=findShellPID()),cachedShellPID;}export function clearPPIDCache(){cachedShellPID=undefined;}export function isProcessRunning(_0x20c5b4){const _0xf3e4d0=a209_0x5afdb9;if(!Number[_0xf3e4d0(0x13c)](_0x20c5b4)||_0x20c5b4<=0x0)return![];try{return process[_0xf3e4d0(0x11d)](_0x20c5b4,0x0),!![];}catch{return![];}}export function openBrowser(_0x5cce78){const _0x36695d=a209_0x5afdb9;let _0x572985;try{_0x572985=new URL(_0x5cce78);}catch{throw new Error(_0x36695d(0x115)+_0x5cce78);}if(_0x572985[_0x36695d(0x13e)]!==_0x36695d(0x11f)&&_0x572985[_0x36695d(0x13e)]!==_0x36695d(0x113))throw new Error(_0x36695d(0x127)+_0x572985[_0x36695d(0x13e)]);const _0x5a5f92=_0x572985[_0x36695d(0x114)],_0x3cacfd=process[_0x36695d(0x144)];if(_0x3cacfd===_0x36695d(0x11c))spawn(_0x36695d(0x148),['/c','start','',_0x5a5f92],{'detached':!![],'stdio':_0x36695d(0x134)})[_0x36695d(0x13b)]();else{const _0x12a4f6=_0x3cacfd===_0x36695d(0x11e)?_0x36695d(0x147):_0x36695d(0x11b);spawn(_0x12a4f6,[_0x5a5f92],{'detached':!![],'stdio':'ignore'})[_0x36695d(0x13b)]();}}export function isWindows(){const _0x25771f=a209_0x5afdb9;return process[_0x25771f(0x144)]===_0x25771f(0x11c);}export function getCrossSpawnOptions(_0x132b5d){return{..._0x132b5d??{},'shell':isWindows()};}export function escapeWindowsArg(_0x3e1b78){const _0xa955d9=a209_0x5afdb9;if(!/[ \t"&|<>^%!`\r\n]/[_0xa955d9(0x125)](_0x3e1b78))return _0x3e1b78;const _0x406351=_0x3e1b78[_0xa955d9(0x14c)](/"/g,'\x22\x22');return'\x22'+_0x406351+'\x22';}export function crossSpawn(_0x10b327,_0x3e9a5f,_0x4a04bd){const _0x556860=a209_0x5afdb9;if(isWindows()){const _0x259b90=escapeWindowsArg(_0x10b327),_0x1c873f=_0x3e9a5f[_0x556860(0x146)](escapeWindowsArg),_0x2f07e7=[_0x259b90,..._0x1c873f][_0x556860(0x12e)]('\x20');return spawn(_0x2f07e7,[],{..._0x4a04bd,'shell':!![]});}return spawn(_0x10b327,_0x3e9a5f,{..._0x4a04bd,'shell':![]});}export function gracefulExit(_0x37dc0d=0x0){const _0x562250=a209_0x5afdb9;isWindows()?setTimeout(()=>process['exit'](_0x37dc0d),0x32):process[_0x562250(0x12d)](_0x37dc0d);}function a209_0x1d14(_0xef5501,_0x481b00){_0xef5501=_0xef5501-0x112;const _0x1864a6=a209_0x1864();let _0x1d140c=_0x1864a6[_0xef5501];return _0x1d140c;}export function findExecutable(_0x56d6db,_0x47e059=0x1388){return new Promise(_0x43e004=>{const _0x90a54f=a209_0x1d14,_0x5f59fa=isWindows()?_0x90a54f(0x122):'which';let _0x1a2234=![];const _0x244679=crossSpawn(_0x5f59fa,[_0x56d6db],{'stdio':_0x90a54f(0x130),'shell':isWindows()}),_0x2654b4=setTimeout(()=>{!_0x1a2234&&(_0x1a2234=!![],_0x244679['kill'](),_0x43e004(null));},_0x47e059);let _0x54d6e8='';_0x244679[_0x90a54f(0x132)]?.['on']('data',_0x326a54=>{const _0x411509=_0x90a54f;_0x54d6e8+=_0x326a54[_0x411509(0x129)]();}),_0x244679['stderr']?.['on'](_0x90a54f(0x12a),()=>{}),_0x244679['on'](_0x90a54f(0x12d),_0x31b9f3=>{const _0x2183c3=_0x90a54f;if(_0x1a2234)return;_0x1a2234=!![],clearTimeout(_0x2654b4);if(_0x31b9f3===0x0&&_0x54d6e8[_0x2183c3(0x116)]()){const _0x4241f7=_0x54d6e8[_0x2183c3(0x116)]()[_0x2183c3(0x14e)](/\r?\n/)[0x0];_0x43e004(_0x4241f7);}else _0x43e004(null);}),_0x244679['on'](_0x90a54f(0x141),()=>{if(_0x1a2234)return;_0x1a2234=!![],clearTimeout(_0x2654b4),_0x43e004(null);});});}
|
package/dist/utils/prompt.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0xddcf5b,_0xb12bd3){const _0x6d8a62=a210_0x58df,_0x55c3b8=_0xddcf5b();while(!![]){try{const _0x577dca=-parseInt(_0x6d8a62(0x1bb))/0x1+-parseInt(_0x6d8a62(0x1bd))/0x2*(-parseInt(_0x6d8a62(0x1be))/0x3)+parseInt(_0x6d8a62(0x1b0))/0x4+parseInt(_0x6d8a62(0x1bf))/0x5+parseInt(_0x6d8a62(0x1c4))/0x6*(parseInt(_0x6d8a62(0x1bc))/0x7)+-parseInt(_0x6d8a62(0x1b6))/0x8+-parseInt(_0x6d8a62(0x1c2))/0x9;if(_0x577dca===_0xb12bd3)break;else _0x55c3b8['push'](_0x55c3b8['shift']());}catch(_0x321917){_0x55c3b8['push'](_0x55c3b8['shift']());}}}(a210_0x91c1,0xdb4ec));import*as a210_0x3c7698 from'readline';function a210_0x58df(_0x391170,_0x45dfd4){_0x391170=_0x391170-0x1ad;const _0x91c13e=a210_0x91c1();let _0x58df66=_0x91c13e[_0x391170];return _0x58df66;}import{gracefulExit}from'./process.js';export function isInteractive(){const _0x5e4de9=a210_0x58df;return process[_0x5e4de9(0x1b8)]['isTTY']===!![];}export async function confirm(_0x427d84){const _0x4d7cfb=a210_0x58df,_0x279cd1=a210_0x3c7698[_0x4d7cfb(0x1af)]({'input':process['stdin'],'output':process[_0x4d7cfb(0x1b5)]});return new Promise(_0x2ab7b6=>{_0x279cd1['question'](_0x427d84+'\x20(y/N):\x20',_0x521871=>{const _0x3c06a0=a210_0x58df;_0x279cd1[_0x3c06a0(0x1b4)](),_0x2ab7b6(_0x521871['toLowerCase']()==='y'||_0x521871[_0x3c06a0(0x1b2)]()==='yes');});});}export async function confirmKey(_0x197960){const _0x45052c=a210_0x58df;if(!process[_0x45052c(0x1b8)]['isTTY'])return![];return process[_0x45052c(0x1ba)][_0x45052c(0x1b9)](_0x197960+_0x45052c(0x1b3)),new Promise(_0x3f0440=>{const _0x58cc91=_0x45052c,_0x539c8a=process[_0x58cc91(0x1b8)];_0x539c8a[_0x58cc91(0x1b1)](!![]),_0x539c8a[_0x58cc91(0x1c3)](),_0x539c8a[_0x58cc91(0x1ae)](_0x58cc91(0x1c1));const _0x31394a=_0x2fc757=>{const _0x314e91=_0x58cc91;_0x539c8a[_0x314e91(0x1b1)](![]),_0x539c8a[_0x314e91(0x1c0)](),_0x539c8a[_0x314e91(0x1ad)](_0x314e91(0x1b7),_0x31394a);if(_0x2fc757==='\x1b'){process[_0x314e91(0x1ba)][_0x314e91(0x1b9)]('\x0a'),_0x3f0440(![]);return;}_0x2fc757==='\x03'&&(process[_0x314e91(0x1ba)]['write']('\x0a'),gracefulExit(0x82));if(_0x2fc757[_0x314e91(0x1b2)]()==='y'){process['stderr'][_0x314e91(0x1b9)]('y\x0a'),_0x3f0440(!![]);return;}process[_0x314e91(0x1ba)][_0x314e91(0x1b9)]('\x0a'),_0x3f0440(![]);};_0x539c8a['on'](_0x58cc91(0x1b7),_0x31394a);});}function a210_0x91c1(){const _0x2b676a=['11187183LXYBtU','1107774jnkuew','3rznjUY','6516975RahyvJ','pause','utf8','22012308FylOFz','resume','6ktiEqG','removeListener','setEncoding','createInterface','1948728QCAtrW','setRawMode','toLowerCase','\x20[y/N]\x20','close','stdout','2250848VCLBQj','data','stdin','write','stderr','317181BQWSuo'];a210_0x91c1=function(){return _0x2b676a;};return a210_0x91c1();}
|
package/dist/utils/spinner.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1221bf,_0x231af5){const _0x520fe2=a211_0x8ae8,_0x2893e1=_0x1221bf();while(!![]){try{const _0x32a02a=parseInt(_0x520fe2(0x15d))/0x1+parseInt(_0x520fe2(0x14b))/0x2*(parseInt(_0x520fe2(0x15b))/0x3)+parseInt(_0x520fe2(0x149))/0x4+parseInt(_0x520fe2(0x14a))/0x5+-parseInt(_0x520fe2(0x145))/0x6*(parseInt(_0x520fe2(0x14d))/0x7)+-parseInt(_0x520fe2(0x15c))/0x8+-parseInt(_0x520fe2(0x148))/0x9;if(_0x32a02a===_0x231af5)break;else _0x2893e1['push'](_0x2893e1['shift']());}catch(_0x2f1c59){_0x2893e1['push'](_0x2893e1['shift']());}}}(a211_0x20bb,0xa9fa6));import a211_0x39040f from'ora';import{isWindows}from'./process.js';const windowsSpinner={'interval':0x3e8,'frames':['•']};export function createCommandSpinner(_0x4a4901,_0x5360f1={}){const _0xe8c46=a211_0x8ae8,{verbose:verbose=![],forceEnabled:forceEnabled=![]}=_0x5360f1;return a211_0x39040f({'text':_0x4a4901,'color':_0xe8c46(0x15a),'stream':process['stderr'],'isEnabled':forceEnabled||process[_0xe8c46(0x151)][_0xe8c46(0x152)]&&!verbose,...isWindows()&&{'spinner':windowsSpinner}});}export async function withSpinner(_0x1259fc,_0x510707,_0xc2baeb={}){const _0x50cb67=a211_0x8ae8,_0x1ae20c=_0xc2baeb[_0x50cb67(0x150)]??(()=>Date['now']()),_0x83b840=createCommandSpinner(_0x1259fc,_0xc2baeb);_0x83b840[_0x50cb67(0x14f)]();const _0x3b922f=_0x1ae20c();try{const _0x1dac90=await _0x510707(),_0x5b8983=_0x1ae20c()-_0x3b922f;return _0x83b840[_0x50cb67(0x153)](),{'data':_0x1dac90,'elapsedMs':_0x5b8983};}catch(_0x3d795b){_0x83b840['stop']();throw _0x3d795b;}}export async function withProgressSpinner(_0x55561a,_0x370931,_0x57814d={}){const _0x850d6f=a211_0x8ae8,_0x39504d=_0x57814d[_0x850d6f(0x150)]??(()=>Date[_0x850d6f(0x14e)]()),_0x43e2f0=_0x57814d[_0x850d6f(0x146)]??setInterval,_0x1459a6=createCommandSpinner(_0x55561a,_0x57814d);_0x1459a6[_0x850d6f(0x14f)]();const _0x42d038=_0x39504d(),_0x5ac739=_0x55561a[_0x850d6f(0x154)](_0x850d6f(0x156),'')[_0x850d6f(0x159)]()||'Processing',_0x41cc3a={};let _0x32b055=_0x55561a;const _0xa0fe83=()=>{const _0x2b3a1e=_0x850d6f;if(!_0x1459a6[_0x2b3a1e(0x158)])return;const _0x39cf8b=_0x39504d()-_0x42d038,_0x491e83=formatElapsed(_0x39cf8b),_0x4df11f=_0x41cc3a['phase']?.['trim']()||_0x5ac739,_0x5262ae=_0x41cc3a[_0x2b3a1e(0x147)]?_0x2b3a1e(0x157)+_0x41cc3a[_0x2b3a1e(0x147)]+']':'',_0x12cc7a=_0x41cc3a[_0x2b3a1e(0x155)]?'\x20'+_0x41cc3a['extra']:'',_0x327813=_0x4df11f+'\x20'+_0x491e83+_0x12cc7a+_0x5262ae;_0x327813!==_0x32b055&&_0x327813[_0x2b3a1e(0x159)]()&&(_0x1459a6[_0x2b3a1e(0x144)]=_0x327813,_0x32b055=_0x327813);},_0x1f3b03=_0x43e2f0(()=>{_0xa0fe83();},0x3e8),_0x39db2b={'setPhase':_0x233187=>{const _0x428e9d=_0x850d6f;_0x41cc3a[_0x428e9d(0x14c)]=_0x233187;const _0x525ff2=_0x233187?.['trim']()||_0x5ac739,_0x55683e=_0x39504d()-_0x42d038,_0xa49796=formatElapsed(_0x55683e),_0x153ef1=_0x41cc3a[_0x428e9d(0x147)]?_0x428e9d(0x157)+_0x41cc3a[_0x428e9d(0x147)]+']':'',_0x570189=_0x41cc3a['extra']?'\x20'+_0x41cc3a[_0x428e9d(0x155)]:'',_0x4c7143=_0x525ff2+'\x20'+_0xa49796+_0x570189+_0x153ef1;_0x1459a6['isSpinning']&&_0x4c7143[_0x428e9d(0x159)]()&&(_0x1459a6[_0x428e9d(0x144)]=_0x4c7143,_0x32b055=_0x4c7143);},'setJobId':_0x3bd7fe=>{const _0x50eb4f=_0x850d6f;_0x41cc3a[_0x50eb4f(0x147)]=_0x3bd7fe,_0xa0fe83();},'setExtra':_0x363513=>{_0x41cc3a['extra']=_0x363513,_0xa0fe83();}};_0xa0fe83();try{const _0x1051e7=await _0x370931(_0x39db2b),_0x40d6b1=_0x39504d()-_0x42d038;return{'data':_0x1051e7,'elapsedMs':_0x40d6b1};}finally{clearInterval(_0x1f3b03),_0x1459a6[_0x850d6f(0x153)]();}}function a211_0x20bb(){const _0x1fa6eb=['673482mLtSTJ','intervalFactory','jobId','11323764gNWDST','3377340mexqwC','1040625UrclGQ','18354oFDwSW','phase','7aLtNDD','now','start','clock','stderr','isTTY','stop','replace','extra','...','\x20[Job\x20ID:\x20','isSpinning','trim','cyan','306GgkScu','1515600aBkgAX','267609CRTwLp','text'];a211_0x20bb=function(){return _0x1fa6eb;};return a211_0x20bb();}function a211_0x8ae8(_0x3a8dff,_0xad2a9f){_0x3a8dff=_0x3a8dff-0x144;const _0x20bb99=a211_0x20bb();let _0x8ae895=_0x20bb99[_0x3a8dff];return _0x8ae895;}export function formatElapsed(_0xdc670e){const _0xed98fe=Math['floor'](_0xdc670e/0x3e8);if(_0xed98fe<0x3c)return(_0xdc670e/0x3e8)['toFixed'](0x1)+'s';const _0x5039bd=Math['floor'](_0xed98fe/0x3c),_0x167654=_0xed98fe%0x3c;if(_0x5039bd<0x3c)return _0x5039bd+'m\x20'+_0x167654+'s';const _0x5c04c5=Math['floor'](_0x5039bd/0x3c),_0x2d85d6=_0x5039bd%0x3c;return _0x5c04c5+'h\x20'+_0x2d85d6+'m';}
|
package/dist/utils/sse-parser.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x56ef22,_0x543ce2){const _0x99a79e=a212_0x2a3d,_0x5cbb4c=_0x56ef22();while(!![]){try{const _0x4b7010=-parseInt(_0x99a79e(0x16d))/0x1*(parseInt(_0x99a79e(0x15d))/0x2)+parseInt(_0x99a79e(0x160))/0x3*(parseInt(_0x99a79e(0x15f))/0x4)+-parseInt(_0x99a79e(0x168))/0x5*(parseInt(_0x99a79e(0x159))/0x6)+parseInt(_0x99a79e(0x16a))/0x7*(-parseInt(_0x99a79e(0x166))/0x8)+-parseInt(_0x99a79e(0x15a))/0x9*(parseInt(_0x99a79e(0x15b))/0xa)+-parseInt(_0x99a79e(0x161))/0xb+parseInt(_0x99a79e(0x158))/0xc;if(_0x4b7010===_0x543ce2)break;else _0x5cbb4c['push'](_0x5cbb4c['shift']());}catch(_0x2b988b){_0x5cbb4c['push'](_0x5cbb4c['shift']());}}}(a212_0x2ac7,0xaeb2d));export async function*parseSSEStream(_0x19edc4,_0x5793cc){const _0x1869f7=a212_0x2a3d;if(!_0x19edc4[_0x1869f7(0x170)])throw new Error(_0x1869f7(0x167));const _0x545340=_0x19edc4[_0x1869f7(0x170)][_0x1869f7(0x163)](),_0x112b10=new TextDecoder();let _0x1a4871='',_0x5f077a={};try{while(!![]){const {done:_0x547215,value:_0x55d165}=await _0x545340['read']();if(_0x547215){if(_0x5f077a[_0x1869f7(0x15e)]){_0x5793cc?.['debug'](_0x1869f7(0x15c)+_0x5f077a[_0x1869f7(0x15e)]);const _0x296209=parseSSEData(_0x5f077a[_0x1869f7(0x15e)]);yield _0x296209;}break;}_0x1a4871+=_0x112b10[_0x1869f7(0x164)](_0x55d165,{'stream':!![]});const _0x2f0b34=_0x1a4871[_0x1869f7(0x16f)]('\x0a');_0x1a4871=_0x2f0b34['pop']()||'';for(const _0x514780 of _0x2f0b34){if(_0x514780[_0x1869f7(0x157)]()===''){if(_0x5f077a[_0x1869f7(0x15e)]){_0x5793cc?.[_0x1869f7(0x162)](_0x1869f7(0x15c)+_0x5f077a[_0x1869f7(0x15e)]);const _0x2f5664=parseSSEData(_0x5f077a['data']);yield _0x2f5664,_0x5f077a={};}continue;}if(_0x514780[_0x1869f7(0x16b)](':'))continue;const _0x2443b1=_0x514780[_0x1869f7(0x16c)](':');if(_0x2443b1===-0x1)continue;const _0x2a4def=_0x514780[_0x1869f7(0x169)](0x0,_0x2443b1);let _0x7a196=_0x514780['slice'](_0x2443b1+0x1);_0x7a196[_0x1869f7(0x16b)]('\x20')&&(_0x7a196=_0x7a196['slice'](0x1));switch(_0x2a4def){case _0x1869f7(0x156):_0x5f077a[_0x1869f7(0x156)]=_0x7a196;break;case _0x1869f7(0x15e):_0x5f077a[_0x1869f7(0x15e)]=_0x5f077a['data']?_0x5f077a[_0x1869f7(0x15e)]+'\x0a'+_0x7a196:_0x7a196;break;case'id':_0x5f077a['id']=_0x7a196;break;}}}}finally{_0x545340[_0x1869f7(0x16e)]();}}function a212_0x2a3d(_0x4b3824,_0x4ec0ce){_0x4b3824=_0x4b3824-0x155;const _0x2ac760=a212_0x2ac7();let _0x2a3dd6=_0x2ac760[_0x4b3824];return _0x2a3dd6;}function a212_0x2ac7(){const _0x1bd8f5=['releaseLock','split','body','Failed\x20to\x20parse\x20SSE\x20data\x20as\x20JSON:\x20','event','trim','26621172CYyiOD','4014402GHgyka','9zQJSdo','2842570VUuHur','[LLM\x20API\x20SSE]\x20','2EFpjEc','data','275524rxjrKI','57sJWhNG','6277315iiKfFK','debug','getReader','decode','parse','10275832xJnXCI','Response\x20body\x20is\x20null','5ZQOLzB','slice','7WastNM','startsWith','indexOf','3137HbIaCv'];a212_0x2ac7=function(){return _0x1bd8f5;};return a212_0x2ac7();}function parseSSEData(_0x3d7610){const _0x34efe8=a212_0x2a3d;try{return JSON[_0x34efe8(0x165)](_0x3d7610);}catch(_0x336377){throw new Error(_0x34efe8(0x155)+_0x3d7610,{'cause':_0x336377});}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x36c2e5,_0x2ff8bd){const _0x323422=a213_0x1d07,_0x2e566d=_0x36c2e5();while(!![]){try{const _0x59999d=-parseInt(_0x323422(0x178))/0x1*(-parseInt(_0x323422(0x166))/0x2)+-parseInt(_0x323422(0x177))/0x3+parseInt(_0x323422(0x172))/0x4*(-parseInt(_0x323422(0x169))/0x5)+parseInt(_0x323422(0x16e))/0x6*(-parseInt(_0x323422(0x176))/0x7)+-parseInt(_0x323422(0x175))/0x8*(-parseInt(_0x323422(0x171))/0x9)+parseInt(_0x323422(0x16c))/0xa+parseInt(_0x323422(0x16a))/0xb;if(_0x59999d===_0x2ff8bd)break;else _0x2e566d['push'](_0x2e566d['shift']());}catch(_0x239ccd){_0x2e566d['push'](_0x2e566d['shift']());}}}(a213_0xb76b,0xbf930));import a213_0x4fd636 from'string-width';function a213_0xb76b(){const _0x2b3099=['4541360hCbTvB','slice','1600806nXJDYP','substring','replace','18zhRMgL','34028uAbINX','floor','trim','3289784oBTbcI','14JZtzHe','4304172hHgFPJ','3NVKaet','padStart','Cannot\x20escape\x20empty\x20string\x20literal','toString','toLowerCase','length','159830PytPej','repeat','\x5c$&','295ITwsCl','19124600LPUkww','random'];a213_0xb76b=function(){return _0x2b3099;};return a213_0xb76b();}export function stringWidth(_0x143993){return a213_0x4fd636(_0x143993);}export function padEnd(_0x27d779,_0x2326e5){const _0x4bcc5a=a213_0x1d07,_0x218e49=stringWidth(_0x27d779);if(_0x218e49>=_0x2326e5)return _0x27d779;return _0x27d779+'\x20'[_0x4bcc5a(0x167)](_0x2326e5-_0x218e49);}export function padStart(_0x7038c,_0x1026ee){const _0x2fe782=a213_0x1d07,_0x5a6aa9=stringWidth(_0x7038c);if(_0x5a6aa9>=_0x1026ee)return _0x7038c;return'\x20'[_0x2fe782(0x167)](_0x1026ee-_0x5a6aa9)+_0x7038c;}export function centerAlign(_0x22ac34,_0x484a39){const _0x22d774=a213_0x1d07,_0x5d3953=stringWidth(_0x22ac34);if(_0x5d3953>_0x484a39){if(_0x484a39<=0x1)return'…'[_0x22d774(0x16f)](0x0,_0x484a39);let _0x476b88=_0x22ac34;while(stringWidth(_0x476b88+'…')>_0x484a39){_0x476b88=_0x476b88[_0x22d774(0x16d)](0x0,-0x1);}return _0x476b88+'…';}if(_0x5d3953===_0x484a39)return _0x22ac34;const _0x1b43d0=_0x484a39-_0x5d3953,_0x67f138=Math[_0x22d774(0x173)](_0x1b43d0/0x2),_0xae1e06=_0x1b43d0-_0x67f138;return'\x20'['repeat'](_0x67f138)+_0x22ac34+'\x20'[_0x22d774(0x167)](_0xae1e06);}function a213_0x1d07(_0x146a9e,_0xdd2e4f){_0x146a9e=_0x146a9e-0x162;const _0xb76b71=a213_0xb76b();let _0x1d0771=_0xb76b71[_0x146a9e];return _0x1d0771;}export function escapeStringLiteral(_0x3e9548){const _0x82f7d0=a213_0x1d07;if(!_0x3e9548||_0x3e9548[_0x82f7d0(0x174)]()[_0x82f7d0(0x165)]===0x0)throw new Error(_0x82f7d0(0x162));const _0x6c8841=_0x3e9548[_0x82f7d0(0x170)](/'/g,'\x27\x27');return'\x27'+_0x6c8841+'\x27';}export function globToLike(_0x30ee74){const _0x5e369d=a213_0x1d07;let _0x2323a4=_0x30ee74[_0x5e369d(0x170)](/\\/g,'\x5c\x5c')[_0x5e369d(0x170)](/%/g,'\x5c%')['replace'](/_/g,'\x5c_');return _0x2323a4=_0x2323a4[_0x5e369d(0x170)](/\*/g,'%')[_0x5e369d(0x170)](/\?/g,'_'),_0x2323a4;}export function buildLikePattern(_0x5098cb){const _0x57f67c=a213_0x1d07;if(!_0x5098cb||_0x5098cb[_0x57f67c(0x174)]()['length']===0x0)throw new Error('Cannot\x20build\x20LIKE\x20pattern\x20from\x20empty\x20string');const _0x41a484=globToLike(_0x5098cb),_0x578291=_0x41a484[_0x57f67c(0x170)](/'/g,'\x27\x27');return'\x27'+_0x578291+'\x27';}export function matchGlobPattern(_0x13fe31,_0xf1e311){const _0x971035=a213_0x1d07,_0x1019e2=_0xf1e311[_0x971035(0x170)](/[.+^${}()|[\]\\]/g,_0x971035(0x168))[_0x971035(0x170)](/\*/g,'.*')[_0x971035(0x170)](/\?/g,'.'),_0x32e54d=new RegExp('^'+_0x1019e2+'$');return _0x32e54d['test'](_0x13fe31);}export function getSanitizedUsername(){const _0x559e6e=a213_0x1d07,_0x5c0135=process.env.USER||process.env.USERNAME||'unknown';return _0x5c0135[_0x559e6e(0x170)](/[^a-zA-Z0-9]/g,'')[_0x559e6e(0x164)]();}export function generateRandomHex(){const _0x47c8da=a213_0x1d07,_0x4bd0f6=Math[_0x47c8da(0x173)](Math[_0x47c8da(0x16b)]()*0xfffff);return _0x4bd0f6[_0x47c8da(0x163)](0x10)[_0x47c8da(0x179)](0x5,'0');}export function sanitizeFileName(_0x5e1180){const _0x12113c=a213_0x1d07;return _0x5e1180[_0x12113c(0x164)]()[_0x12113c(0x170)](/[/\\:*?"<>|]/g,'-')['replace'](/\s+/g,'-')['replace'](/-+/g,'-')['replace'](/^-|-$/g,'');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x2bf28e,_0x243c3f){const _0x450e3e=a214_0x1570,_0x29505a=_0x2bf28e();while(!![]){try{const _0x510a1e=-parseInt(_0x450e3e(0x1c6))/0x1*(-parseInt(_0x450e3e(0x1d4))/0x2)+parseInt(_0x450e3e(0x1d1))/0x3+-parseInt(_0x450e3e(0x1cf))/0x4*(-parseInt(_0x450e3e(0x1d3))/0x5)+parseInt(_0x450e3e(0x1c4))/0x6*(-parseInt(_0x450e3e(0x1c8))/0x7)+parseInt(_0x450e3e(0x1d0))/0x8+-parseInt(_0x450e3e(0x1de))/0x9+-parseInt(_0x450e3e(0x1cb))/0xa*(parseInt(_0x450e3e(0x1d8))/0xb);if(_0x510a1e===_0x243c3f)break;else _0x29505a['push'](_0x29505a['shift']());}catch(_0x491d0f){_0x29505a['push'](_0x29505a['shift']());}}}(a214_0x4b2e,0x92563));function hasWildcard(_0x2c6971){const _0x38037f=a214_0x1570;return _0x2c6971[_0x38037f(0x1dc)]('*')||_0x2c6971[_0x38037f(0x1dc)]('?');}export function parseTableReference(_0x3a96ef){const _0x4f9759=a214_0x1570;if(!_0x3a96ef||_0x3a96ef[_0x4f9759(0x1d2)]()[_0x4f9759(0x1c5)]===0x0)throw new Error(_0x4f9759(0x1c9));const _0x5c0e74=_0x3a96ef[_0x4f9759(0x1d2)](),_0x21f868={'original':_0x5c0e74},_0x481167=_0x5c0e74[_0x4f9759(0x1ca)]('.');if(_0x481167[_0x4f9759(0x1c5)]===0x1){const _0x21240e=_0x481167[0x0];if(!_0x21240e)throw new Error(_0x4f9759(0x1d6));_0x21f868[_0x4f9759(0x1d9)]=_0x21240e;}else{if(_0x481167[_0x4f9759(0x1c5)]===0x2){const [_0x1ef433,_0x550ed5]=_0x481167;if(!_0x1ef433)throw new Error(_0x4f9759(0x1da));if(!_0x550ed5)throw new Error(_0x4f9759(0x1dd));_0x21f868[_0x4f9759(0x1cd)]=_0x1ef433,_0x21f868[_0x4f9759(0x1d9)]=_0x550ed5;}else{if(_0x481167['length']===0x3){const [_0x394da0,_0xc5f8e4,_0x43c8b6]=_0x481167;if(!_0x394da0||!_0xc5f8e4||!_0x43c8b6)throw new Error('Invalid\x20catalog.database.table\x20format\x20-\x20all\x20parts\x20must\x20be\x20non-empty');_0x21f868['catalog']=_0x394da0,_0x21f868['database']=_0xc5f8e4,_0x21f868['table']=_0x43c8b6;}else throw new Error(_0x4f9759(0x1d5));}}return _0x21f868;}export function formatTableReference(_0x5dc719){const _0x5556ec=a214_0x1570,_0x3869ac=[];return _0x5dc719[_0x5556ec(0x1db)]&&_0x3869ac[_0x5556ec(0x1d7)](_0x5dc719[_0x5556ec(0x1db)]),_0x5dc719[_0x5556ec(0x1cd)]&&_0x3869ac[_0x5556ec(0x1d7)](_0x5dc719[_0x5556ec(0x1cd)]),_0x5dc719['table']&&_0x3869ac[_0x5556ec(0x1d7)](_0x5dc719[_0x5556ec(0x1d9)]),_0x3869ac[_0x5556ec(0x1ce)]('.');}export function validateTableListReference(_0x227527){return undefined;}function a214_0x1570(_0x1221b9,_0x24c63c){_0x1221b9=_0x1221b9-0x1c4;const _0x4b2e1b=a214_0x4b2e();let _0x1570ed=_0x4b2e1b[_0x1221b9];return _0x1570ed;}function a214_0x4b2e(){const _0x37c20e=['catalog','includes','Table\x20part\x20cannot\x20be\x20empty\x20-\x20use\x20\x22*\x22\x20for\x20all\x20tables\x20(e.g.,\x20\x22mydb.*\x22)','2361492HYStLZ','49812hmoyNG','length','865153RQbmhF','Wildcards\x20are\x20not\x20allowed\x20in\x20table\x20name\x20for\x20describe\x20operation','658kkBHOI','Pattern\x20cannot\x20be\x20empty\x20or\x20whitespace-only','split','7713910xkuupu','Table\x20name\x20is\x20required\x20for\x20describe\x20operation','database','join','136vtXnvp','5926464zvTEGo','1079361YnlTun','trim','65855gmJEEv','2kutsRr','Invalid\x20pattern\x20format\x20-\x20too\x20many\x20dots\x20(max:\x20catalog.database.table)','Pattern\x20cannot\x20be\x20just\x20a\x20dot','push','11HqceLs','table','Database\x20part\x20cannot\x20be\x20empty\x20-\x20use\x20\x22*\x22\x20for\x20all\x20databases\x20(e.g.,\x20\x22*.mytable\x22)'];a214_0x4b2e=function(){return _0x37c20e;};return a214_0x4b2e();}export function validateTableDescribeReference(_0xfdf15e){const _0xab7cfa=a214_0x1570;if(!_0xfdf15e[_0xab7cfa(0x1d9)])return _0xab7cfa(0x1cc);if(_0xfdf15e[_0xab7cfa(0x1cd)]&&hasWildcard(_0xfdf15e[_0xab7cfa(0x1cd)]))return'Wildcards\x20are\x20not\x20allowed\x20in\x20database\x20name\x20for\x20describe\x20operation';if(hasWildcard(_0xfdf15e[_0xab7cfa(0x1d9)]))return _0xab7cfa(0x1c7);return undefined;}
|
package/dist/utils/tdx-logger.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a215_0x50ef(_0x1084ca,_0x1a254d){_0x1084ca=_0x1084ca-0x1ac;const _0x182eb9=a215_0x182e();let _0x50ef3a=_0x182eb9[_0x1084ca];return _0x50ef3a;}function a215_0x182e(){const _0xf57487=['27624dADpjx','consoleHandler','addHandler','error','250966iUVOxi','logLevel','INFO','13zmxOMp','10877152Fnlaqn','debug','34719izAGDD','20601405TfnFKO','Session\x20ended','logDir','10WQWdMt','192YqPcAq','info','1065rkavzq','isInitialized','logger','trace','fileOnly','close','tdx.log','fileHandler','init','shutdown','11733147oDNmiv','getLogPath','push','logFileName','warn','4369757uUfrld'];a215_0x182e=function(){return _0xf57487;};return a215_0x182e();}const a215_0x2194dc=a215_0x50ef;(function(_0x12f990,_0x40469d){const _0x2f860d=a215_0x50ef,_0x2b793b=_0x12f990();while(!![]){try{const _0x589c47=-parseInt(_0x2f860d(0x1ba))/0x1*(-parseInt(_0x2f860d(0x1b7))/0x2)+parseInt(_0x2f860d(0x1bd))/0x3*(-parseInt(_0x2f860d(0x1c2))/0x4)+-parseInt(_0x2f860d(0x1c4))/0x5*(-parseInt(_0x2f860d(0x1b3))/0x6)+parseInt(_0x2f860d(0x1b2))/0x7+parseInt(_0x2f860d(0x1bb))/0x8+parseInt(_0x2f860d(0x1ad))/0x9*(-parseInt(_0x2f860d(0x1c1))/0xa)+-parseInt(_0x2f860d(0x1be))/0xb;if(_0x589c47===_0x40469d)break;else _0x2b793b['push'](_0x2b793b['shift']());}catch(_0x4ae54f){_0x2b793b['push'](_0x2b793b['shift']());}}}(a215_0x182e,0xd2e28));import{join}from'path';import{Logger,LogLevel,FileHandler,ConsoleHandler,DefaultLogFormatter}from'./logger/index.js';import{getGlobalCacheDir}from'./global-cache.js';export{LogLevel}from'./logger/index.js';export class TDXLogger{[a215_0x2194dc(0x1b8)];['fileOnly'];[a215_0x2194dc(0x1c0)];[a215_0x2194dc(0x1b0)];[a215_0x2194dc(0x1c6)];['fileHandler']=null;[a215_0x2194dc(0x1b4)]=null;constructor(_0x4138c6=LogLevel[a215_0x2194dc(0x1b9)],_0x4962f7=![],_0x3d3a24,_0x4d71f9=a215_0x2194dc(0x1ca)){const _0x529a28=a215_0x2194dc;this[_0x529a28(0x1b8)]=_0x4138c6,this['fileOnly']=_0x4962f7,this[_0x529a28(0x1c0)]=_0x3d3a24||join(getGlobalCacheDir(),'logs'),this[_0x529a28(0x1b0)]=_0x4d71f9,this['logger']=Logger['of']('tdx');}async[a215_0x2194dc(0x1cc)](){const _0x33f1fe=a215_0x2194dc,_0x102cd3=join(this[_0x33f1fe(0x1c0)],this[_0x33f1fe(0x1b0)]);if(Logger[_0x33f1fe(0x1c5)]()){!this[_0x33f1fe(0x1c8)]&&(this['consoleHandler']=new ConsoleHandler({'minLevel':LogLevel[_0x33f1fe(0x1b9)],'colors':!![]}),Logger[_0x33f1fe(0x1b5)](this[_0x33f1fe(0x1b4)]));return;}this[_0x33f1fe(0x1cb)]=new FileHandler({'filePath':_0x102cd3});const _0x5b8fd3=[this[_0x33f1fe(0x1cb)]];!this['fileOnly']&&(this[_0x33f1fe(0x1b4)]=new ConsoleHandler({'minLevel':LogLevel[_0x33f1fe(0x1b9)],'colors':!![]}),_0x5b8fd3[_0x33f1fe(0x1af)](this['consoleHandler'])),await Logger['init']({'defaultLevel':this[_0x33f1fe(0x1b8)],'handlers':_0x5b8fd3,'formatter':new DefaultLogFormatter({'colors':!![]})});}[a215_0x2194dc(0x1bc)](..._0x58ba45){const _0x2324c4=a215_0x2194dc;this['logger'][_0x2324c4(0x1bc)](..._0x58ba45);}[a215_0x2194dc(0x1c7)](..._0x168a36){const _0x154060=a215_0x2194dc;this[_0x154060(0x1c6)]['trace'](..._0x168a36);}['info'](..._0xd04779){const _0x4ca59e=a215_0x2194dc;this[_0x4ca59e(0x1c6)]['info'](..._0xd04779);}['warn'](..._0x23041e){const _0x38f671=a215_0x2194dc;this[_0x38f671(0x1c6)][_0x38f671(0x1b1)](..._0x23041e);}[a215_0x2194dc(0x1b6)](..._0x387481){const _0x3afbd8=a215_0x2194dc;this[_0x3afbd8(0x1c6)][_0x3afbd8(0x1b6)](..._0x387481);}async[a215_0x2194dc(0x1c9)](){const _0x159194=a215_0x2194dc;this[_0x159194(0x1c6)][_0x159194(0x1c3)](_0x159194(0x1bf)),await Logger[_0x159194(0x1ac)]();}[a215_0x2194dc(0x1ae)](){const _0x453c03=a215_0x2194dc;return join(this[_0x453c03(0x1c0)],this['logFileName']);}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a216_0x35248f=a216_0x44fc;(function(_0x1a99e4,_0x138067){const _0x15339f=a216_0x44fc,_0x7cc215=_0x1a99e4();while(!![]){try{const _0x483dbb=-parseInt(_0x15339f(0x134))/0x1+-parseInt(_0x15339f(0x14c))/0x2+parseInt(_0x15339f(0x13e))/0x3+parseInt(_0x15339f(0x13c))/0x4*(parseInt(_0x15339f(0x135))/0x5)+parseInt(_0x15339f(0x150))/0x6+parseInt(_0x15339f(0x142))/0x7+parseInt(_0x15339f(0x12e))/0x8*(parseInt(_0x15339f(0x139))/0x9);if(_0x483dbb===_0x138067)break;else _0x7cc215['push'](_0x7cc215['shift']());}catch(_0x30d711){_0x7cc215['push'](_0x7cc215['shift']());}}}(a216_0x1b40,0x3d854));import{get}from'https';import{gt,valid}from'semver';import a216_0x19de55 from'chalk';import{createGlobalCache}from'./global-cache.js';const CACHE_DURATION_MS=0x18*0x3c*0x3c*0x3e8,NPM_REGISTRY_BASE=a216_0x35248f(0x14a),TIMEOUT_MS=0x7d0,stableVersionCache=createGlobalCache('last_version_check',a216_0x35248f(0x149)),nextVersionCache=createGlobalCache(a216_0x35248f(0x14f),a216_0x35248f(0x14b));function getCacheForChannel(_0x37593c){const _0x22767c=a216_0x35248f;return _0x37593c===_0x22767c(0x153)?nextVersionCache:stableVersionCache;}function readCache(_0x2008d0){const _0x4ad8cc=a216_0x35248f;return getCacheForChannel(_0x2008d0)[_0x4ad8cc(0x13b)]()??null;}function writeCache(_0xc19bab,_0x39196a){const _0x2ad6f1=a216_0x35248f;try{getCacheForChannel(_0x39196a)['write']({'lastCheck':new Date()[_0x2ad6f1(0x154)](),'latestVersion':_0xc19bab});}catch{}}function isCacheValid(_0x35fba6){const _0x1a9acf=a216_0x35248f;if(!_0x35fba6)return![];const _0x3ed327=new Date(_0x35fba6[_0x1a9acf(0x136)])[_0x1a9acf(0x133)](),_0x107720=Date[_0x1a9acf(0x145)]();return _0x107720-_0x3ed327<CACHE_DURATION_MS;}export function fetchLatestVersion(_0x24cfcf=a216_0x35248f(0x12d)){const _0x6b48d4=a216_0x35248f,_0x27a0e2=_0x24cfcf===_0x6b48d4(0x153)?'next':'latest',_0x3c582c=NPM_REGISTRY_BASE+'/'+_0x27a0e2;return new Promise((_0x2b4f1a,_0x308134)=>{const _0x3ed95b=_0x6b48d4,_0x7b8223=get(_0x3c582c,{'timeout':TIMEOUT_MS},_0x373a27=>{const _0xdfe8da=a216_0x44fc;if(_0x373a27[_0xdfe8da(0x14d)]!==0xc8){clearTimeout(_0x125bee),_0x308134(new Error(_0xdfe8da(0x138)+_0x373a27[_0xdfe8da(0x14d)]));return;}let _0x17fe34='';_0x373a27['on']('data',_0xa8bc40=>{_0x17fe34+=_0xa8bc40;}),_0x373a27['on'](_0xdfe8da(0x140),()=>{const _0x5403dc=_0xdfe8da;clearTimeout(_0x125bee);try{const _0x30cbe7=JSON[_0x5403dc(0x12f)](_0x17fe34);if(!valid(_0x30cbe7[_0x5403dc(0x148)])){_0x308134(new Error(_0x5403dc(0x147)));return;}_0x2b4f1a(_0x30cbe7[_0x5403dc(0x148)]);}catch(_0x462cc5){_0x308134(_0x462cc5);}});})['on'](_0x3ed95b(0x144),_0x1452b2=>{clearTimeout(_0x125bee),_0x308134(_0x1452b2);});_0x7b8223['on'](_0x3ed95b(0x151),_0x2f2ead=>{const _0x1feb8d=_0x3ed95b;_0x2f2ead[_0x1feb8d(0x152)]();});const _0x125bee=setTimeout(()=>{const _0x41bbeb=_0x3ed95b;_0x7b8223['destroy'](),_0x308134(new Error(_0x41bbeb(0x137)));},TIMEOUT_MS);_0x125bee[_0x3ed95b(0x152)]();});}export async function checkForUpdate(_0x107aa1,_0x500ff8=a216_0x35248f(0x12d)){const _0xd83eed=a216_0x35248f;try{const _0x4c86d2=readCache(_0x500ff8);if(isCacheValid(_0x4c86d2)){const _0xc878b1=gt(_0x4c86d2[_0xd83eed(0x13f)],_0x107aa1);return{'updateAvailable':_0xc878b1,'currentVersion':_0x107aa1,'latestVersion':_0x4c86d2[_0xd83eed(0x13f)],'channel':_0x500ff8};}const _0x34bfe9=await fetchLatestVersion(_0x500ff8);writeCache(_0x34bfe9,_0x500ff8);const _0x447170=gt(_0x34bfe9,_0x107aa1);return{'updateAvailable':_0x447170,'currentVersion':_0x107aa1,'latestVersion':_0x34bfe9,'channel':_0x500ff8};}catch{return null;}}function a216_0x1b40(){const _0x469804=['last_version_check_next','419052RtKEIk','socket','unref','next','toISOString','green','tdx\x20upgrade\x20--next','stable','56RsrMYY','parse','tdx\x20upgrade','stderr','write','getTime','378919kWlKeP','20kGpPdq','lastCheck','Request\x20timeout','HTTP\x20','514314wRtvmt','yellow','read','222004urNIPU','gray','297285nQcund','latestVersion','end','Update\x20available:','814170XFdhjh','channel','error','now','dim','Invalid\x20version\x20format','version','utils/version-check','https://registry.npmjs.org/@treasuredata/tdx','utils/version-check-next','552732WnDEcF','statusCode','currentVersion'];a216_0x1b40=function(){return _0x469804;};return a216_0x1b40();}function a216_0x44fc(_0x803ba,_0x48576c){_0x803ba=_0x803ba-0x12b;const _0x1b4040=a216_0x1b40();let _0x44fc1f=_0x1b4040[_0x803ba];return _0x44fc1f;}export function displayUpdateNotification(_0x1bf9eb){const _0x5cff80=a216_0x35248f;if(!_0x1bf9eb['updateAvailable'])return;const _0x483b91=_0x1bf9eb[_0x5cff80(0x143)]===_0x5cff80(0x153)?_0x5cff80(0x12c):_0x5cff80(0x130),_0x1b9194=process[_0x5cff80(0x131)]['isTTY']&&!process.env.NO_COLOR,_0x4fd80a=_0x1b9194?a216_0x19de55[_0x5cff80(0x13d)]('→'):'→',_0x171301=_0x1b9194?a216_0x19de55['dim'](_0x1bf9eb[_0x5cff80(0x14e)]):_0x1bf9eb[_0x5cff80(0x14e)],_0x59f57d=_0x1b9194?a216_0x19de55[_0x5cff80(0x12b)](_0x1bf9eb[_0x5cff80(0x13f)]):_0x1bf9eb[_0x5cff80(0x13f)],_0x3f9165=_0x1b9194?a216_0x19de55['cyan'](_0x483b91):_0x483b91,_0x343b16=_0x1b9194?'\x0a'+a216_0x19de55[_0x5cff80(0x13a)](_0x5cff80(0x141))+'\x20'+_0x171301+'\x20'+_0x4fd80a+'\x20'+_0x59f57d+'\x0a'+a216_0x19de55[_0x5cff80(0x146)]('Run:')+'\x20'+_0x3f9165+'\x0a':'\x0aUpdate\x20available:\x20'+_0x171301+'\x20'+_0x4fd80a+'\x20'+_0x59f57d+'\x0aRun:\x20'+_0x3f9165+'\x0a';process[_0x5cff80(0x131)][_0x5cff80(0x132)](_0x343b16);}
|