@treasuredata/tdx 2026.3.26 → 2026.3.27
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.d.ts.map +1 -1
- package/dist/core/oauth.js +1 -1
- package/dist/core/oauth.js.map +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
|
-
const
|
|
1
|
+
const a209_0x36bc75=a209_0x511d;(function(_0x30d50e,_0x3d25e3){const _0x154a31=a209_0x511d,_0x126c8a=_0x30d50e();while(!![]){try{const _0x2880b7=-parseInt(_0x154a31(0x1cb))/0x1+-parseInt(_0x154a31(0x1f1))/0x2+-parseInt(_0x154a31(0x1d4))/0x3*(parseInt(_0x154a31(0x1e2))/0x4)+-parseInt(_0x154a31(0x1b6))/0x5*(-parseInt(_0x154a31(0x1c7))/0x6)+-parseInt(_0x154a31(0x1be))/0x7+parseInt(_0x154a31(0x1e8))/0x8*(-parseInt(_0x154a31(0x1ce))/0x9)+parseInt(_0x154a31(0x1cd))/0xa;if(_0x2880b7===_0x3d25e3)break;else _0x126c8a['push'](_0x126c8a['shift']());}catch(_0x518381){_0x126c8a['push'](_0x126c8a['shift']());}}}(a209_0x1212,0xb032c));import{execSync,spawn}from'node:child_process';const SHELL_NAMES=new Set([a209_0x36bc75(0x1db),'zsh','sh','fish','ksh',a209_0x36bc75(0x1eb),a209_0x36bc75(0x1d3),a209_0x36bc75(0x1d8),a209_0x36bc75(0x1b9),a209_0x36bc75(0x1d2),'nu',a209_0x36bc75(0x1ef),'elvish',a209_0x36bc75(0x1e1)]),EPHEMERAL_SHELL_SPAWNERS=new Set([a209_0x36bc75(0x1ca),a209_0x36bc75(0x1ee),a209_0x36bc75(0x1b7),a209_0x36bc75(0x1d9),a209_0x36bc75(0x1d1)]);function getProcessInfoWindows(_0x54cabe){const _0x22c092=a209_0x36bc75;try{if(!Number['isInteger'](_0x54cabe)||_0x54cabe<=0x0)return null;const _0x46a5cd='Get-CimInstance\x20Win32_Process\x20-Filter\x20\x22ProcessId='+_0x54cabe+_0x22c092(0x1ed),_0x3ea04d=execSync(_0x22c092(0x1e5)+_0x46a5cd+'\x22',{'encoding':'utf-8','windowsHide':!![],'stdio':[_0x22c092(0x1dd),_0x22c092(0x1dd),_0x22c092(0x1dd)]})['trim']();if(!_0x3ea04d)return null;const [_0x499b2f,..._0x41973c]=_0x3ea04d['split'](','),_0x18fe84=parseInt(_0x499b2f,0xa),_0x14e7ff=_0x41973c[_0x22c092(0x1d6)](',')[_0x22c092(0x1f2)]();if(isNaN(_0x18fe84)||!_0x14e7ff)return null;return{'pid':_0x54cabe,'ppid':_0x18fe84,'comm':_0x14e7ff['replace'](/\.exe$/i,'')};}catch{return null;}}function getProcessInfoPosix(_0x225517){const _0x392ff6=a209_0x36bc75;try{const _0x75f310=0x400000;if(!Number[_0x392ff6(0x1c5)](_0x225517)||_0x225517<=0x0||_0x225517>_0x75f310)return null;const _0x1930b8=execSync(_0x392ff6(0x1dc)+_0x225517+'\x20-o\x20ppid=,comm=',{'encoding':_0x392ff6(0x1da),'stdio':_0x392ff6(0x1dd)})[_0x392ff6(0x1f2)](),[_0x138c6d,..._0x1fc7e0]=_0x1930b8[_0x392ff6(0x1bd)](/\s+/),_0x54e921=parseInt(_0x138c6d,0xa),_0x4aa367=_0x1fc7e0[_0x392ff6(0x1d6)]('\x20');if(isNaN(_0x54e921))return null;return{'pid':_0x225517,'ppid':_0x54e921,'comm':_0x4aa367};}catch{return null;}}function getProcessInfo(_0x19436d){const _0xdef282=a209_0x36bc75;if(process[_0xdef282(0x1e6)]===_0xdef282(0x1df))return getProcessInfoWindows(_0x19436d);return getProcessInfoPosix(_0x19436d);}function getBasename(_0x13d526){const _0xfffce8=a209_0x36bc75;return _0x13d526[_0xfffce8(0x1bb)](/^-/,'')[_0xfffce8(0x1bd)]('/')[_0xfffce8(0x1d7)]()?.['toLowerCase']()||'';}function isShell(_0x48bed1){const _0xc77ecd=a209_0x36bc75;return SHELL_NAMES[_0xc77ecd(0x1c8)](getBasename(_0x48bed1));}function isEphemeralShellSpawner(_0xe085a5){const _0x31b722=a209_0x36bc75;return EPHEMERAL_SHELL_SPAWNERS[_0x31b722(0x1c8)](getBasename(_0xe085a5));}let cachedShellPID;function findShellPID(){const _0x4168b3=a209_0x36bc75;if(process['ppid']===undefined)return process[_0x4168b3(0x1d5)];let _0x4c9b06=process[_0x4168b3(0x1c2)];const _0x261a9b=0xa;let _0x207a83=0x0;while(_0x207a83<_0x261a9b){const _0x49f8d1=getProcessInfo(_0x4c9b06);if(!_0x49f8d1)break;if(isShell(_0x49f8d1[_0x4168b3(0x1e4)])){const _0x479b2d=getProcessInfo(_0x49f8d1[_0x4168b3(0x1c2)]);if(_0x479b2d&&isEphemeralShellSpawner(_0x479b2d[_0x4168b3(0x1e4)])){_0x4c9b06=_0x49f8d1['ppid'],_0x207a83++;continue;}return _0x49f8d1[_0x4168b3(0x1d5)];}if(_0x49f8d1[_0x4168b3(0x1c2)]===0x0||_0x49f8d1[_0x4168b3(0x1c2)]===0x1){if(isShell(_0x49f8d1[_0x4168b3(0x1e4)]))return _0x49f8d1[_0x4168b3(0x1d5)];break;}_0x4c9b06=_0x49f8d1[_0x4168b3(0x1c2)],_0x207a83++;}return process[_0x4168b3(0x1c2)]!==undefined?process[_0x4168b3(0x1c2)]:process[_0x4168b3(0x1d5)];}export function getPPID(){return cachedShellPID===undefined&&(cachedShellPID=findShellPID()),cachedShellPID;}function a209_0x1212(){const _0x3d0896=['ps\x20-p\x20','pipe','exit','win32','cmd.exe','xonsh','28umjCwF','unref','comm','powershell.exe\x20-NoProfile\x20-NonInteractive\x20-Command\x20\x22','platform','error','8YcyfYr','Invalid\x20URL:\x20','ignore','tcsh','toString','\x22\x20|\x20Select-Object\x20-Property\x20ParentProcessId,Name\x20|\x20ForEach-Object\x20{\x20\x22$($_.ParentProcessId),$($_.Name)\x22\x20}','code','ion','open','2260326AYRLcK','trim','start','995dgwGxN','cursor','https:','pwsh','stderr','replace','kill','split','8131403ZCwoCm','which','href','stdout','ppid','darwin','Unsupported\x20protocol:\x20','isInteger','xdg-open','41694AUVDml','has','data','claude','22817XzemLm','map','42484540qcdyTF','10412109wNRiVn','protocol','where.exe','treasure\x20studio','powershell','csh','616323zOdHEs','pid','join','pop','dash','electron','utf-8','bash'];a209_0x1212=function(){return _0x3d0896;};return a209_0x1212();}export function clearPPIDCache(){cachedShellPID=undefined;}export function isProcessRunning(_0x24c2e0){const _0x46f263=a209_0x36bc75;if(!Number['isInteger'](_0x24c2e0)||_0x24c2e0<=0x0)return![];try{return process[_0x46f263(0x1bc)](_0x24c2e0,0x0),!![];}catch{return![];}}export function openBrowser(_0x49877e){const _0x3b5ea3=a209_0x36bc75;let _0x13b9c6;try{_0x13b9c6=new URL(_0x49877e);}catch{throw new Error(_0x3b5ea3(0x1e9)+_0x49877e);}if(_0x13b9c6[_0x3b5ea3(0x1cf)]!=='http:'&&_0x13b9c6[_0x3b5ea3(0x1cf)]!==_0x3b5ea3(0x1b8))throw new Error(_0x3b5ea3(0x1c4)+_0x13b9c6[_0x3b5ea3(0x1cf)]);const _0x210ed9=_0x13b9c6[_0x3b5ea3(0x1c0)],_0x2ddf73=process[_0x3b5ea3(0x1e6)];if(_0x2ddf73===_0x3b5ea3(0x1df))spawn(_0x3b5ea3(0x1e0),['/c',_0x3b5ea3(0x1f3),'',_0x210ed9],{'detached':!![],'stdio':_0x3b5ea3(0x1ea)})['unref']();else{const _0x490c59=_0x2ddf73===_0x3b5ea3(0x1c3)?_0x3b5ea3(0x1f0):_0x3b5ea3(0x1c6);spawn(_0x490c59,[_0x210ed9],{'detached':!![],'stdio':'ignore'})[_0x3b5ea3(0x1e3)]();}}function a209_0x511d(_0x397e6f,_0x4063fe){_0x397e6f=_0x397e6f-0x1b6;const _0x121260=a209_0x1212();let _0x511dc7=_0x121260[_0x397e6f];return _0x511dc7;}export function isWindows(){const _0x3e818e=a209_0x36bc75;return process[_0x3e818e(0x1e6)]===_0x3e818e(0x1df);}export function getCrossSpawnOptions(_0x1b5102){return{..._0x1b5102??{},'shell':isWindows()};}export function escapeWindowsArg(_0x2652f1){const _0x53d4cb=a209_0x36bc75;if(!/[ \t"&|<>^%!`\r\n]/['test'](_0x2652f1))return _0x2652f1;const _0x543d66=_0x2652f1[_0x53d4cb(0x1bb)](/"/g,'\x22\x22');return'\x22'+_0x543d66+'\x22';}export function crossSpawn(_0x1471d0,_0x29e035,_0x1784b6){const _0x57f1a4=a209_0x36bc75;if(isWindows()){const _0x46256a=escapeWindowsArg(_0x1471d0),_0xebb257=_0x29e035[_0x57f1a4(0x1cc)](escapeWindowsArg),_0x586417=[_0x46256a,..._0xebb257][_0x57f1a4(0x1d6)]('\x20');return spawn(_0x586417,[],{..._0x1784b6,'shell':!![]});}return spawn(_0x1471d0,_0x29e035,{..._0x1784b6,'shell':![]});}export function gracefulExit(_0x47d0bc=0x0){const _0x414afa=a209_0x36bc75;isWindows()?setTimeout(()=>process[_0x414afa(0x1de)](_0x47d0bc),0x32):process[_0x414afa(0x1de)](_0x47d0bc);}export function findExecutable(_0x3647f7,_0x43951d=0x1388){return new Promise(_0x605bbd=>{const _0x58ab6c=a209_0x511d,_0x20e02b=isWindows()?_0x58ab6c(0x1d0):_0x58ab6c(0x1bf);let _0x580372=![];const _0x352d98=crossSpawn(_0x20e02b,[_0x3647f7],{'stdio':_0x58ab6c(0x1dd),'shell':isWindows()}),_0x586e98=setTimeout(()=>{const _0x9dfe5c=_0x58ab6c;!_0x580372&&(_0x580372=!![],_0x352d98[_0x9dfe5c(0x1bc)](),_0x605bbd(null));},_0x43951d);let _0x51ad8d='';_0x352d98[_0x58ab6c(0x1c1)]?.['on'](_0x58ab6c(0x1c9),_0x555241=>{const _0xc27885=_0x58ab6c;_0x51ad8d+=_0x555241[_0xc27885(0x1ec)]();}),_0x352d98[_0x58ab6c(0x1ba)]?.['on'](_0x58ab6c(0x1c9),()=>{}),_0x352d98['on'](_0x58ab6c(0x1de),_0x625654=>{const _0x48c8e0=_0x58ab6c;if(_0x580372)return;_0x580372=!![],clearTimeout(_0x586e98);if(_0x625654===0x0&&_0x51ad8d[_0x48c8e0(0x1f2)]()){const _0x247077=_0x51ad8d[_0x48c8e0(0x1f2)]()[_0x48c8e0(0x1bd)](/\r?\n/)[0x0];_0x605bbd(_0x247077);}else _0x605bbd(null);}),_0x352d98['on'](_0x58ab6c(0x1e7),()=>{if(_0x580372)return;_0x580372=!![],clearTimeout(_0x586e98),_0x605bbd(null);});});}
|
package/dist/utils/prompt.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x37dd09,_0x1985f7){const _0x132494=a210_0x4bae,_0xa45fa8=_0x37dd09();while(!![]){try{const _0x3c054b=parseInt(_0x132494(0xfb))/0x1+parseInt(_0x132494(0xf8))/0x2+parseInt(_0x132494(0xf3))/0x3+-parseInt(_0x132494(0x105))/0x4*(parseInt(_0x132494(0xf7))/0x5)+-parseInt(_0x132494(0xfc))/0x6*(-parseInt(_0x132494(0xf2))/0x7)+-parseInt(_0x132494(0x100))/0x8+parseInt(_0x132494(0x108))/0x9*(parseInt(_0x132494(0x103))/0xa);if(_0x3c054b===_0x1985f7)break;else _0xa45fa8['push'](_0xa45fa8['shift']());}catch(_0x2eb783){_0xa45fa8['push'](_0xa45fa8['shift']());}}}(a210_0x52f6,0x5ef46));import*as a210_0x44fd30 from'readline';function a210_0x4bae(_0x3ec5ea,_0x4beca8){_0x3ec5ea=_0x3ec5ea-0xf0;const _0x52f619=a210_0x52f6();let _0x4baeeb=_0x52f619[_0x3ec5ea];return _0x4baeeb;}function a210_0x52f6(){const _0x125a15=['pause','toLowerCase','262932aWfYKa','18jtsHsV','removeListener','data','isTTY','2358592YHCzsA','\x20(y/N):\x20','setEncoding','10HtzeXE','\x20[y/N]\x20','584316pnyzHt','stderr','createInterface','1425069zXuwud','yes','resume','177142IWkrPD','349716kmbwSr','stdin','write','setRawMode','5MOoOVT','432148EiGTID'];a210_0x52f6=function(){return _0x125a15;};return a210_0x52f6();}import{gracefulExit}from'./process.js';export function isInteractive(){const _0x55f8b8=a210_0x4bae;return process[_0x55f8b8(0xf4)][_0x55f8b8(0xff)]===!![];}export async function confirm(_0x33dd39){const _0x1e9e2a=a210_0x4bae,_0x4e2c7a=a210_0x44fd30[_0x1e9e2a(0x107)]({'input':process[_0x1e9e2a(0xf4)],'output':process['stdout']});return new Promise(_0x577a25=>{const _0x58bdaf=_0x1e9e2a;_0x4e2c7a['question'](_0x33dd39+_0x58bdaf(0x101),_0x2cb3d6=>{const _0x508208=_0x58bdaf;_0x4e2c7a['close'](),_0x577a25(_0x2cb3d6['toLowerCase']()==='y'||_0x2cb3d6['toLowerCase']()===_0x508208(0xf0));});});}export async function confirmKey(_0x33db68){const _0x12a288=a210_0x4bae;if(!process[_0x12a288(0xf4)]['isTTY'])return![];return process[_0x12a288(0x106)][_0x12a288(0xf5)](_0x33db68+_0x12a288(0x104)),new Promise(_0x48f448=>{const _0x362197=_0x12a288,_0x5bf742=process['stdin'];_0x5bf742[_0x362197(0xf6)](!![]),_0x5bf742[_0x362197(0xf1)](),_0x5bf742[_0x362197(0x102)]('utf8');const _0x2e8c68=_0x3b4a7e=>{const _0xc041ef=_0x362197;_0x5bf742[_0xc041ef(0xf6)](![]),_0x5bf742[_0xc041ef(0xf9)](),_0x5bf742[_0xc041ef(0xfd)](_0xc041ef(0xfe),_0x2e8c68);if(_0x3b4a7e==='\x1b'){process[_0xc041ef(0x106)]['write']('\x0a'),_0x48f448(![]);return;}_0x3b4a7e==='\x03'&&(process[_0xc041ef(0x106)][_0xc041ef(0xf5)]('\x0a'),gracefulExit(0x82));if(_0x3b4a7e[_0xc041ef(0xfa)]()==='y'){process[_0xc041ef(0x106)][_0xc041ef(0xf5)]('y\x0a'),_0x48f448(!![]);return;}process['stderr'][_0xc041ef(0xf5)]('\x0a'),_0x48f448(![]);};_0x5bf742['on'](_0x362197(0xfe),_0x2e8c68);});}
|
package/dist/utils/spinner.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0xcaf399,_0x1a849e){const _0x49b36b=a211_0x2737,_0xe8e42c=_0xcaf399();while(!![]){try{const _0x3e1633=parseInt(_0x49b36b(0x141))/0x1*(-parseInt(_0x49b36b(0x14d))/0x2)+-parseInt(_0x49b36b(0x155))/0x3*(-parseInt(_0x49b36b(0x144))/0x4)+-parseInt(_0x49b36b(0x143))/0x5*(parseInt(_0x49b36b(0x150))/0x6)+parseInt(_0x49b36b(0x151))/0x7+-parseInt(_0x49b36b(0x14c))/0x8*(-parseInt(_0x49b36b(0x14b))/0x9)+-parseInt(_0x49b36b(0x13b))/0xa*(parseInt(_0x49b36b(0x146))/0xb)+parseInt(_0x49b36b(0x147))/0xc;if(_0x3e1633===_0x1a849e)break;else _0xe8e42c['push'](_0xe8e42c['shift']());}catch(_0x10c4d3){_0xe8e42c['push'](_0xe8e42c['shift']());}}}(a211_0x53d9,0x5478d));import a211_0x38a1e0 from'ora';function a211_0x53d9(){const _0x496f62=['14090cWzjOm','start','now','text','trim','clock','1xzxzlr','intervalFactory','3267455oNVxaC','18764hmzjkb','stderr','2299fxdYIn','10764492fOWMVw','Processing','isTTY','stop','63720rtDwAS','80bDjigx','348412vCEias','isSpinning','cyan','6ZWJlIq','382823JvUtGV','jobId','extra','floor','285pgbHSN','...','phase','\x20[Job\x20ID:\x20'];a211_0x53d9=function(){return _0x496f62;};return a211_0x53d9();}import{isWindows}from'./process.js';const windowsSpinner={'interval':0x3e8,'frames':['•']};export function createCommandSpinner(_0x494623,_0x54155e={}){const _0x546eff=a211_0x2737,{verbose:verbose=![],forceEnabled:forceEnabled=![]}=_0x54155e;return a211_0x38a1e0({'text':_0x494623,'color':_0x546eff(0x14f),'stream':process[_0x546eff(0x145)],'isEnabled':forceEnabled||process[_0x546eff(0x145)][_0x546eff(0x149)]&&!verbose,...isWindows()&&{'spinner':windowsSpinner}});}export async function withSpinner(_0x408e5e,_0x45d6e8,_0x4e4b99={}){const _0x1d4400=a211_0x2737,_0x45320f=_0x4e4b99[_0x1d4400(0x140)]??(()=>Date[_0x1d4400(0x13d)]()),_0x5c0bd3=createCommandSpinner(_0x408e5e,_0x4e4b99);_0x5c0bd3[_0x1d4400(0x13c)]();const _0x51a828=_0x45320f();try{const _0x292db4=await _0x45d6e8(),_0x59f919=_0x45320f()-_0x51a828;return _0x5c0bd3[_0x1d4400(0x14a)](),{'data':_0x292db4,'elapsedMs':_0x59f919};}catch(_0x41421e){_0x5c0bd3[_0x1d4400(0x14a)]();throw _0x41421e;}}function a211_0x2737(_0x472f78,_0x46c62d){_0x472f78=_0x472f78-0x139;const _0x53d9f1=a211_0x53d9();let _0x2737b8=_0x53d9f1[_0x472f78];return _0x2737b8;}export async function withProgressSpinner(_0x418578,_0x5a4037,_0x16f713={}){const _0x4f080d=a211_0x2737,_0x4b4fe4=_0x16f713[_0x4f080d(0x140)]??(()=>Date[_0x4f080d(0x13d)]()),_0x1bdbfa=_0x16f713[_0x4f080d(0x142)]??setInterval,_0x4b62fa=createCommandSpinner(_0x418578,_0x16f713);_0x4b62fa['start']();const _0x46848f=_0x4b4fe4(),_0x59eac9=_0x418578['replace'](_0x4f080d(0x156),'')[_0x4f080d(0x13f)]()||_0x4f080d(0x148),_0x4841cb={};let _0x11a660=_0x418578;const _0x3a96ae=()=>{const _0xd6709b=_0x4f080d;if(!_0x4b62fa[_0xd6709b(0x14e)])return;const _0x5c610d=_0x4b4fe4()-_0x46848f,_0x68b56b=formatElapsed(_0x5c610d),_0xcb5d8e=_0x4841cb[_0xd6709b(0x139)]?.['trim']()||_0x59eac9,_0x170312=_0x4841cb['jobId']?_0xd6709b(0x13a)+_0x4841cb[_0xd6709b(0x152)]+']':'',_0x40df8d=_0x4841cb['extra']?'\x20'+_0x4841cb[_0xd6709b(0x153)]:'',_0xddb4c3=_0xcb5d8e+'\x20'+_0x68b56b+_0x40df8d+_0x170312;_0xddb4c3!==_0x11a660&&_0xddb4c3['trim']()&&(_0x4b62fa[_0xd6709b(0x13e)]=_0xddb4c3,_0x11a660=_0xddb4c3);},_0x48f4ad=_0x1bdbfa(()=>{_0x3a96ae();},0x3e8),_0x58429e={'setPhase':_0x131e93=>{const _0xca3f5d=_0x4f080d;_0x4841cb[_0xca3f5d(0x139)]=_0x131e93;const _0xf224ec=_0x131e93?.[_0xca3f5d(0x13f)]()||_0x59eac9,_0x37bc0f=_0x4b4fe4()-_0x46848f,_0x29be82=formatElapsed(_0x37bc0f),_0x2fdf0b=_0x4841cb[_0xca3f5d(0x152)]?'\x20[Job\x20ID:\x20'+_0x4841cb[_0xca3f5d(0x152)]+']':'',_0xc74eed=_0x4841cb[_0xca3f5d(0x153)]?'\x20'+_0x4841cb[_0xca3f5d(0x153)]:'',_0x4deea3=_0xf224ec+'\x20'+_0x29be82+_0xc74eed+_0x2fdf0b;_0x4b62fa[_0xca3f5d(0x14e)]&&_0x4deea3[_0xca3f5d(0x13f)]()&&(_0x4b62fa['text']=_0x4deea3,_0x11a660=_0x4deea3);},'setJobId':_0x2102ce=>{const _0x5c1c19=_0x4f080d;_0x4841cb[_0x5c1c19(0x152)]=_0x2102ce,_0x3a96ae();},'setExtra':_0x2f09de=>{const _0x5b5d65=_0x4f080d;_0x4841cb[_0x5b5d65(0x153)]=_0x2f09de,_0x3a96ae();}};_0x3a96ae();try{const _0x2c8ca9=await _0x5a4037(_0x58429e),_0x1c5c8b=_0x4b4fe4()-_0x46848f;return{'data':_0x2c8ca9,'elapsedMs':_0x1c5c8b};}finally{clearInterval(_0x48f4ad),_0x4b62fa['stop']();}}export function formatElapsed(_0x56d3b5){const _0xd6bea3=a211_0x2737,_0x21d90c=Math[_0xd6bea3(0x154)](_0x56d3b5/0x3e8);if(_0x21d90c<0x3c)return(_0x56d3b5/0x3e8)['toFixed'](0x1)+'s';const _0x107c3a=Math['floor'](_0x21d90c/0x3c),_0x1d215c=_0x21d90c%0x3c;if(_0x107c3a<0x3c)return _0x107c3a+'m\x20'+_0x1d215c+'s';const _0xd9535c=Math[_0xd6bea3(0x154)](_0x107c3a/0x3c),_0x5f50b8=_0x107c3a%0x3c;return _0xd9535c+'h\x20'+_0x5f50b8+'m';}
|
package/dist/utils/sse-parser.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3e776c,_0x2d706a){const _0x430741=a212_0xd4fc,_0x4e44fe=_0x3e776c();while(!![]){try{const _0x355a37=-parseInt(_0x430741(0xec))/0x1*(-parseInt(_0x430741(0xf4))/0x2)+parseInt(_0x430741(0xf6))/0x3+-parseInt(_0x430741(0xf7))/0x4+parseInt(_0x430741(0xf0))/0x5+-parseInt(_0x430741(0xfd))/0x6+parseInt(_0x430741(0xf2))/0x7*(parseInt(_0x430741(0xea))/0x8)+parseInt(_0x430741(0xe9))/0x9*(-parseInt(_0x430741(0xe8))/0xa);if(_0x355a37===_0x2d706a)break;else _0x4e44fe['push'](_0x4e44fe['shift']());}catch(_0x2dc105){_0x4e44fe['push'](_0x4e44fe['shift']());}}}(a212_0xac7c,0x7e8a5));function a212_0xd4fc(_0x18d579,_0x3ee8a8){_0x18d579=_0x18d579-0xe6;const _0xac7c27=a212_0xac7c();let _0xd4fc3c=_0xac7c27[_0x18d579];return _0xd4fc3c;}export async function*parseSSEStream(_0x434445,_0x1d45bb){const _0x29bdcd=a212_0xd4fc;if(!_0x434445['body'])throw new Error(_0x29bdcd(0xfb));const _0x27fa89=_0x434445[_0x29bdcd(0xe6)][_0x29bdcd(0xfc)](),_0x2c02c3=new TextDecoder();let _0x1fc518='',_0x422dce={};try{while(!![]){const {done:_0x38e50e,value:_0x49863e}=await _0x27fa89['read']();if(_0x38e50e){if(_0x422dce[_0x29bdcd(0xf5)]){_0x1d45bb?.['debug'](_0x29bdcd(0xef)+_0x422dce[_0x29bdcd(0xf5)]);const _0xfd1400=parseSSEData(_0x422dce[_0x29bdcd(0xf5)]);yield _0xfd1400;}break;}_0x1fc518+=_0x2c02c3['decode'](_0x49863e,{'stream':!![]});const _0x4e9900=_0x1fc518[_0x29bdcd(0xed)]('\x0a');_0x1fc518=_0x4e9900[_0x29bdcd(0xf1)]()||'';for(const _0x483402 of _0x4e9900){if(_0x483402[_0x29bdcd(0xf8)]()===''){if(_0x422dce[_0x29bdcd(0xf5)]){_0x1d45bb?.[_0x29bdcd(0xf3)](_0x29bdcd(0xef)+_0x422dce[_0x29bdcd(0xf5)]);const _0x432154=parseSSEData(_0x422dce[_0x29bdcd(0xf5)]);yield _0x432154,_0x422dce={};}continue;}if(_0x483402['startsWith'](':'))continue;const _0x50dabf=_0x483402[_0x29bdcd(0xfa)](':');if(_0x50dabf===-0x1)continue;const _0x362319=_0x483402[_0x29bdcd(0xe7)](0x0,_0x50dabf);let _0x187d30=_0x483402[_0x29bdcd(0xe7)](_0x50dabf+0x1);_0x187d30['startsWith']('\x20')&&(_0x187d30=_0x187d30[_0x29bdcd(0xe7)](0x1));switch(_0x362319){case'event':_0x422dce[_0x29bdcd(0xfe)]=_0x187d30;break;case _0x29bdcd(0xf5):_0x422dce['data']=_0x422dce[_0x29bdcd(0xf5)]?_0x422dce[_0x29bdcd(0xf5)]+'\x0a'+_0x187d30:_0x187d30;break;case'id':_0x422dce['id']=_0x187d30;break;}}}}finally{_0x27fa89[_0x29bdcd(0xee)]();}}function parseSSEData(_0x8b331c){const _0x24807b=a212_0xd4fc;try{return JSON[_0x24807b(0xf9)](_0x8b331c);}catch(_0x5c804f){throw new Error(_0x24807b(0xeb)+_0x8b331c,{'cause':_0x5c804f});}}function a212_0xac7c(){const _0x4b7681=['slice','3044790uEOFtF','72ZsdWTS','40YYNURv','Failed\x20to\x20parse\x20SSE\x20data\x20as\x20JSON:\x20','868899QLXxKH','split','releaseLock','[LLM\x20API\x20SSE]\x20','4986110oRFQFM','pop','1301461HWplxp','debug','2TnUgGZ','data','2228856fHRhFp','814440YVrKDG','trim','parse','indexOf','Response\x20body\x20is\x20null','getReader','2285622nLzxHo','event','body'];a212_0xac7c=function(){return _0x4b7681;};return a212_0xac7c();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5ebc0f,_0x391a92){const _0x5a35c2=a213_0x3086,_0x3abccf=_0x5ebc0f();while(!![]){try{const _0xa69362=-parseInt(_0x5a35c2(0x14c))/0x1+-parseInt(_0x5a35c2(0x157))/0x2*(-parseInt(_0x5a35c2(0x154))/0x3)+-parseInt(_0x5a35c2(0x159))/0x4+parseInt(_0x5a35c2(0x14d))/0x5*(parseInt(_0x5a35c2(0x158))/0x6)+parseInt(_0x5a35c2(0x145))/0x7*(-parseInt(_0x5a35c2(0x150))/0x8)+parseInt(_0x5a35c2(0x152))/0x9+parseInt(_0x5a35c2(0x14f))/0xa*(-parseInt(_0x5a35c2(0x146))/0xb);if(_0xa69362===_0x391a92)break;else _0x3abccf['push'](_0x3abccf['shift']());}catch(_0x5576c4){_0x3abccf['push'](_0x3abccf['shift']());}}}(a213_0x5a97,0x54c2b));import a213_0x56d204 from'string-width';export function stringWidth(_0x1073e0){return a213_0x56d204(_0x1073e0);}export function padEnd(_0x441cac,_0x1ecfea){const _0x82b68d=a213_0x3086,_0x25ed84=stringWidth(_0x441cac);if(_0x25ed84>=_0x1ecfea)return _0x441cac;return _0x441cac+'\x20'[_0x82b68d(0x14b)](_0x1ecfea-_0x25ed84);}export function padStart(_0x512e52,_0xacc28){const _0x2c842b=stringWidth(_0x512e52);if(_0x2c842b>=_0xacc28)return _0x512e52;return'\x20'['repeat'](_0xacc28-_0x2c842b)+_0x512e52;}function a213_0x5a97(){const _0x463d70=['12VoWNEd','1853184wGFfdR','slice','toString','toLowerCase','73577GjtuXI','11SxOISh','Cannot\x20build\x20LIKE\x20pattern\x20from\x20empty\x20string','random','floor','replace','repeat','54469ZMPKmZ','1451055RVsSAp','length','5274860qcHuOA','352FQwEji','Cannot\x20escape\x20empty\x20string\x20literal','5776965IQMXGC','trim','1897821ROFRmT','unknown','padStart','2xFgiRS'];a213_0x5a97=function(){return _0x463d70;};return a213_0x5a97();}export function centerAlign(_0x355a48,_0x2af955){const _0x39fd1a=a213_0x3086,_0x2dfe1c=stringWidth(_0x355a48);if(_0x2dfe1c>_0x2af955){if(_0x2af955<=0x1)return'…'['substring'](0x0,_0x2af955);let _0x408a9c=_0x355a48;while(stringWidth(_0x408a9c+'…')>_0x2af955){_0x408a9c=_0x408a9c[_0x39fd1a(0x15a)](0x0,-0x1);}return _0x408a9c+'…';}if(_0x2dfe1c===_0x2af955)return _0x355a48;const _0x5e0b97=_0x2af955-_0x2dfe1c,_0x424360=Math[_0x39fd1a(0x149)](_0x5e0b97/0x2),_0x3f2188=_0x5e0b97-_0x424360;return'\x20'[_0x39fd1a(0x14b)](_0x424360)+_0x355a48+'\x20'['repeat'](_0x3f2188);}function a213_0x3086(_0xee9fae,_0x21ce9e){_0xee9fae=_0xee9fae-0x144;const _0x5a97b1=a213_0x5a97();let _0x3086c5=_0x5a97b1[_0xee9fae];return _0x3086c5;}export function escapeStringLiteral(_0x3ff4f1){const _0x34a536=a213_0x3086;if(!_0x3ff4f1||_0x3ff4f1[_0x34a536(0x153)]()[_0x34a536(0x14e)]===0x0)throw new Error(_0x34a536(0x151));const _0x17e031=_0x3ff4f1['replace'](/'/g,'\x27\x27');return'\x27'+_0x17e031+'\x27';}export function globToLike(_0xb702da){const _0x331faa=a213_0x3086;let _0x357649=_0xb702da[_0x331faa(0x14a)](/\\/g,'\x5c\x5c')['replace'](/%/g,'\x5c%')[_0x331faa(0x14a)](/_/g,'\x5c_');return _0x357649=_0x357649['replace'](/\*/g,'%')[_0x331faa(0x14a)](/\?/g,'_'),_0x357649;}export function buildLikePattern(_0x3fab9b){const _0x5e9645=a213_0x3086;if(!_0x3fab9b||_0x3fab9b[_0x5e9645(0x153)]()[_0x5e9645(0x14e)]===0x0)throw new Error(_0x5e9645(0x147));const _0x17b4df=globToLike(_0x3fab9b),_0xc1383b=_0x17b4df[_0x5e9645(0x14a)](/'/g,'\x27\x27');return'\x27'+_0xc1383b+'\x27';}export function matchGlobPattern(_0x4c9423,_0x52d475){const _0x3f2730=a213_0x3086,_0x56d582=_0x52d475[_0x3f2730(0x14a)](/[.+^${}()|[\]\\]/g,'\x5c$&')[_0x3f2730(0x14a)](/\*/g,'.*')['replace'](/\?/g,'.'),_0x3b2da3=new RegExp('^'+_0x56d582+'$');return _0x3b2da3['test'](_0x4c9423);}export function getSanitizedUsername(){const _0x897528=a213_0x3086,_0x47abc6=process.env.USER||process.env.USERNAME||_0x897528(0x155);return _0x47abc6[_0x897528(0x14a)](/[^a-zA-Z0-9]/g,'')[_0x897528(0x144)]();}export function generateRandomHex(){const _0x46a81f=a213_0x3086,_0x4c75fe=Math[_0x46a81f(0x149)](Math[_0x46a81f(0x148)]()*0xfffff);return _0x4c75fe[_0x46a81f(0x15b)](0x10)[_0x46a81f(0x156)](0x5,'0');}export function sanitizeFileName(_0x5dd6e3){const _0x457c7d=a213_0x3086;return _0x5dd6e3[_0x457c7d(0x144)]()['replace'](/[/\\:*?"<>|]/g,'-')[_0x457c7d(0x14a)](/\s+/g,'-')[_0x457c7d(0x14a)](/-+/g,'-')[_0x457c7d(0x14a)](/^-|-$/g,'');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x4f39a6,_0x4f1279){const _0x10aad3=a214_0x3ca2,_0x3bcda8=_0x4f39a6();while(!![]){try{const _0x4ffdc2=parseInt(_0x10aad3(0x1a8))/0x1*(-parseInt(_0x10aad3(0x197))/0x2)+parseInt(_0x10aad3(0x1aa))/0x3*(parseInt(_0x10aad3(0x1a1))/0x4)+parseInt(_0x10aad3(0x1a5))/0x5+parseInt(_0x10aad3(0x19f))/0x6+parseInt(_0x10aad3(0x1a0))/0x7+parseInt(_0x10aad3(0x1a2))/0x8+-parseInt(_0x10aad3(0x1a9))/0x9*(parseInt(_0x10aad3(0x1a4))/0xa);if(_0x4ffdc2===_0x4f1279)break;else _0x3bcda8['push'](_0x3bcda8['shift']());}catch(_0x55932c){_0x3bcda8['push'](_0x3bcda8['shift']());}}}(a214_0x500e,0x9a292));function hasWildcard(_0x475926){const _0x4bafee=a214_0x3ca2;return _0x475926[_0x4bafee(0x1ab)]('*')||_0x475926['includes']('?');}export function parseTableReference(_0x6f535){const _0x5f1293=a214_0x3ca2;if(!_0x6f535||_0x6f535[_0x5f1293(0x19b)]()['length']===0x0)throw new Error('Pattern\x20cannot\x20be\x20empty\x20or\x20whitespace-only');const _0x5cc18b=_0x6f535['trim'](),_0x8adffb={'original':_0x5cc18b},_0x47467f=_0x5cc18b['split']('.');if(_0x47467f[_0x5f1293(0x19d)]===0x1){const _0x4b37e6=_0x47467f[0x0];if(!_0x4b37e6)throw new Error(_0x5f1293(0x1ad));_0x8adffb[_0x5f1293(0x199)]=_0x4b37e6;}else{if(_0x47467f[_0x5f1293(0x19d)]===0x2){const [_0x4789aa,_0x5864ce]=_0x47467f;if(!_0x4789aa)throw new Error(_0x5f1293(0x1af));if(!_0x5864ce)throw new Error(_0x5f1293(0x1a6));_0x8adffb[_0x5f1293(0x1a3)]=_0x4789aa,_0x8adffb[_0x5f1293(0x199)]=_0x5864ce;}else{if(_0x47467f[_0x5f1293(0x19d)]===0x3){const [_0x1ff976,_0x36e01a,_0x245e82]=_0x47467f;if(!_0x1ff976||!_0x36e01a||!_0x245e82)throw new Error(_0x5f1293(0x1b0));_0x8adffb[_0x5f1293(0x19e)]=_0x1ff976,_0x8adffb[_0x5f1293(0x1a3)]=_0x36e01a,_0x8adffb[_0x5f1293(0x199)]=_0x245e82;}else throw new Error(_0x5f1293(0x1ac));}}return _0x8adffb;}function a214_0x3ca2(_0x3efa79,_0x269e5e){_0x3efa79=_0x3efa79-0x197;const _0x500e43=a214_0x500e();let _0x3ca204=_0x500e43[_0x3efa79];return _0x3ca204;}export function formatTableReference(_0xe6e2c5){const _0x5a9b3b=a214_0x3ca2,_0x592902=[];return _0xe6e2c5[_0x5a9b3b(0x19e)]&&_0x592902[_0x5a9b3b(0x1ae)](_0xe6e2c5['catalog']),_0xe6e2c5['database']&&_0x592902[_0x5a9b3b(0x1ae)](_0xe6e2c5[_0x5a9b3b(0x1a3)]),_0xe6e2c5[_0x5a9b3b(0x199)]&&_0x592902[_0x5a9b3b(0x1ae)](_0xe6e2c5[_0x5a9b3b(0x199)]),_0x592902[_0x5a9b3b(0x19c)]('.');}export function validateTableListReference(_0x3071ff){return undefined;}export function validateTableDescribeReference(_0x449101){const _0x3ea301=a214_0x3ca2;if(!_0x449101['table'])return _0x3ea301(0x1a7);if(_0x449101[_0x3ea301(0x1a3)]&&hasWildcard(_0x449101[_0x3ea301(0x1a3)]))return _0x3ea301(0x198);if(hasWildcard(_0x449101[_0x3ea301(0x199)]))return _0x3ea301(0x19a);return undefined;}function a214_0x500e(){const _0x257b00=['push','Database\x20part\x20cannot\x20be\x20empty\x20-\x20use\x20\x22*\x22\x20for\x20all\x20databases\x20(e.g.,\x20\x22*.mytable\x22)','Invalid\x20catalog.database.table\x20format\x20-\x20all\x20parts\x20must\x20be\x20non-empty','1944678SlGfjq','Wildcards\x20are\x20not\x20allowed\x20in\x20database\x20name\x20for\x20describe\x20operation','table','Wildcards\x20are\x20not\x20allowed\x20in\x20table\x20name\x20for\x20describe\x20operation','trim','join','length','catalog','3694644mjchhv','8718633QFlpTH','468kJFMIb','8006048npQjPo','database','23962850NvYSfP','3720390tnBhwm','Table\x20part\x20cannot\x20be\x20empty\x20-\x20use\x20\x22*\x22\x20for\x20all\x20tables\x20(e.g.,\x20\x22mydb.*\x22)','Table\x20name\x20is\x20required\x20for\x20describe\x20operation','1puFHvp','9UYjsXy','10101RuerFW','includes','Invalid\x20pattern\x20format\x20-\x20too\x20many\x20dots\x20(max:\x20catalog.database.table)','Pattern\x20cannot\x20be\x20just\x20a\x20dot'];a214_0x500e=function(){return _0x257b00;};return a214_0x500e();}
|
package/dist/utils/tdx-logger.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a215_0x179eaf=a215_0x23a4;(function(_0x2b621d,_0x2664c8){const _0x2ff41d=a215_0x23a4,_0x797b80=_0x2b621d();while(!![]){try{const _0x1f8df5=parseInt(_0x2ff41d(0x200))/0x1*(-parseInt(_0x2ff41d(0x207))/0x2)+parseInt(_0x2ff41d(0x203))/0x3+-parseInt(_0x2ff41d(0x1f1))/0x4*(-parseInt(_0x2ff41d(0x201))/0x5)+-parseInt(_0x2ff41d(0x202))/0x6*(parseInt(_0x2ff41d(0x20a))/0x7)+-parseInt(_0x2ff41d(0x1ed))/0x8*(-parseInt(_0x2ff41d(0x1f3))/0x9)+parseInt(_0x2ff41d(0x1f4))/0xa+-parseInt(_0x2ff41d(0x1fc))/0xb;if(_0x1f8df5===_0x2664c8)break;else _0x797b80['push'](_0x797b80['shift']());}catch(_0x51b662){_0x797b80['push'](_0x797b80['shift']());}}}(a215_0x19a2,0x1c81f));function a215_0x19a2(){const _0x55f664=['warn','logger','shutdown','1916BdIuXJ','Session\x20ended','62622oEizmg','1971960WJUJWg','fileOnly','info','INFO','trace','logDir','error','push','3895067KaTKLK','init','fileHandler','addHandler','169fpDfiz','2085poghWV','42RgEBXd','361311uGxfPz','getLogPath','debug','logLevel','1702XNqJFd','consoleHandler','logFileName','34895MswBgb','tdx','isInitialized','152ojqSnu'];a215_0x19a2=function(){return _0x55f664;};return a215_0x19a2();}function a215_0x23a4(_0x186a10,_0x2c01eb){_0x186a10=_0x186a10-0x1eb;const _0x19a215=a215_0x19a2();let _0x23a443=_0x19a215[_0x186a10];return _0x23a443;}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_0x179eaf(0x206)];[a215_0x179eaf(0x1f5)];[a215_0x179eaf(0x1f9)];[a215_0x179eaf(0x209)];[a215_0x179eaf(0x1ef)];[a215_0x179eaf(0x1fe)]=null;['consoleHandler']=null;constructor(_0x43e1f0=LogLevel['INFO'],_0x3f999e=![],_0x58138c,_0x8c914='tdx.log'){const _0x2664d9=a215_0x179eaf;this[_0x2664d9(0x206)]=_0x43e1f0,this[_0x2664d9(0x1f5)]=_0x3f999e,this[_0x2664d9(0x1f9)]=_0x58138c||join(getGlobalCacheDir(),'logs'),this[_0x2664d9(0x209)]=_0x8c914,this[_0x2664d9(0x1ef)]=Logger['of'](_0x2664d9(0x1eb));}async[a215_0x179eaf(0x1fd)](){const _0x266979=a215_0x179eaf,_0x324b6a=join(this[_0x266979(0x1f9)],this[_0x266979(0x209)]);if(Logger[_0x266979(0x1ec)]()){!this[_0x266979(0x1f5)]&&(this[_0x266979(0x208)]=new ConsoleHandler({'minLevel':LogLevel[_0x266979(0x1f7)],'colors':!![]}),Logger[_0x266979(0x1ff)](this[_0x266979(0x208)]));return;}this['fileHandler']=new FileHandler({'filePath':_0x324b6a});const _0x326db6=[this[_0x266979(0x1fe)]];!this[_0x266979(0x1f5)]&&(this['consoleHandler']=new ConsoleHandler({'minLevel':LogLevel[_0x266979(0x1f7)],'colors':!![]}),_0x326db6[_0x266979(0x1fb)](this['consoleHandler'])),await Logger['init']({'defaultLevel':this[_0x266979(0x206)],'handlers':_0x326db6,'formatter':new DefaultLogFormatter({'colors':!![]})});}[a215_0x179eaf(0x205)](..._0x3ceee6){const _0x1658d8=a215_0x179eaf;this['logger'][_0x1658d8(0x205)](..._0x3ceee6);}[a215_0x179eaf(0x1f8)](..._0x5e47b9){const _0x18e8db=a215_0x179eaf;this[_0x18e8db(0x1ef)][_0x18e8db(0x1f8)](..._0x5e47b9);}[a215_0x179eaf(0x1f6)](..._0x1bf572){const _0x18d9ad=a215_0x179eaf;this[_0x18d9ad(0x1ef)]['info'](..._0x1bf572);}['warn'](..._0x561ae5){const _0x4dd5dc=a215_0x179eaf;this[_0x4dd5dc(0x1ef)][_0x4dd5dc(0x1ee)](..._0x561ae5);}[a215_0x179eaf(0x1fa)](..._0x1e62a5){const _0x539a91=a215_0x179eaf;this[_0x539a91(0x1ef)][_0x539a91(0x1fa)](..._0x1e62a5);}async['close'](){const _0x52000b=a215_0x179eaf;this[_0x52000b(0x1ef)][_0x52000b(0x1f6)](_0x52000b(0x1f2)),await Logger[_0x52000b(0x1f0)]();}[a215_0x179eaf(0x204)](){const _0x22c2b8=a215_0x179eaf;return join(this['logDir'],this[_0x22c2b8(0x209)]);}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a216_0xf87182=a216_0xd956;(function(_0x155b20,_0x528b2c){const _0x3c4dfc=a216_0xd956,_0x29e7df=_0x155b20();while(!![]){try{const _0x547be4=-parseInt(_0x3c4dfc(0x130))/0x1+parseInt(_0x3c4dfc(0x144))/0x2+-parseInt(_0x3c4dfc(0x13a))/0x3+-parseInt(_0x3c4dfc(0x12f))/0x4+parseInt(_0x3c4dfc(0x145))/0x5*(parseInt(_0x3c4dfc(0x137))/0x6)+-parseInt(_0x3c4dfc(0x13f))/0x7*(parseInt(_0x3c4dfc(0x12b))/0x8)+parseInt(_0x3c4dfc(0x13b))/0x9*(parseInt(_0x3c4dfc(0x12d))/0xa);if(_0x547be4===_0x528b2c)break;else _0x29e7df['push'](_0x29e7df['shift']());}catch(_0xa9cf86){_0x29e7df['push'](_0x29e7df['shift']());}}}(a216_0x2979,0xf0d76));import{get}from'https';import{gt,valid}from'semver';import a216_0x4d3042 from'chalk';import{createGlobalCache}from'./global-cache.js';const CACHE_DURATION_MS=0x18*0x3c*0x3c*0x3e8,NPM_REGISTRY_BASE='https://registry.npmjs.org/@treasuredata/tdx',TIMEOUT_MS=0x7d0,stableVersionCache=createGlobalCache(a216_0xf87182(0x11c),a216_0xf87182(0x136)),nextVersionCache=createGlobalCache(a216_0xf87182(0x128),a216_0xf87182(0x143));function a216_0x2979(){const _0x3aceaf=['write','isTTY','Invalid\x20version\x20format','utils/version-check','6BzOwaq','currentVersion','\x0aRun:\x20','5369058pyCgWB','9liyaWx','stable','Run:','read','7oUTtfL','HTTP\x20','yellow','data','utils/version-check-next','2716478biccMP','4390825gXHWOu','last_version_check','latestVersion','Request\x20timeout','stderr','cyan','error','toISOString','next','Update\x20available:','tdx\x20upgrade','version','\x0aUpdate\x20available:\x20','last_version_check_next','gray','dim','10110536JZcsAS','unref','48884180GbHCle','statusCode','4760516RKWIzD','1894704eemOTh','now','updateAvailable'];a216_0x2979=function(){return _0x3aceaf;};return a216_0x2979();}function getCacheForChannel(_0xcf540e){const _0x106246=a216_0xf87182;return _0xcf540e===_0x106246(0x123)?nextVersionCache:stableVersionCache;}function readCache(_0x45cbeb){const _0x31ddf6=a216_0xf87182;return getCacheForChannel(_0x45cbeb)[_0x31ddf6(0x13e)]()??null;}function writeCache(_0xb9d7bd,_0x2ce03a){const _0x526892=a216_0xf87182;try{getCacheForChannel(_0x2ce03a)[_0x526892(0x133)]({'lastCheck':new Date()[_0x526892(0x122)](),'latestVersion':_0xb9d7bd});}catch{}}function a216_0xd956(_0x48ee95,_0x3ef6d9){_0x48ee95=_0x48ee95-0x11c;const _0x297968=a216_0x2979();let _0xd95639=_0x297968[_0x48ee95];return _0xd95639;}function isCacheValid(_0x5ac06c){const _0x40f864=a216_0xf87182;if(!_0x5ac06c)return![];const _0x5165f6=new Date(_0x5ac06c['lastCheck'])['getTime'](),_0x41a67a=Date[_0x40f864(0x131)]();return _0x41a67a-_0x5165f6<CACHE_DURATION_MS;}export function fetchLatestVersion(_0x21a96f=a216_0xf87182(0x13c)){const _0x2ac051=a216_0xf87182,_0x189476=_0x21a96f===_0x2ac051(0x123)?'next':'latest',_0x1c7e0b=NPM_REGISTRY_BASE+'/'+_0x189476;return new Promise((_0x28279c,_0x2065d9)=>{const _0x3e76d2=_0x2ac051,_0x406920=get(_0x1c7e0b,{'timeout':TIMEOUT_MS},_0x4efb76=>{const _0x214b92=a216_0xd956;if(_0x4efb76['statusCode']!==0xc8){clearTimeout(_0x7ad217),_0x2065d9(new Error(_0x214b92(0x140)+_0x4efb76[_0x214b92(0x12e)]));return;}let _0x68673='';_0x4efb76['on'](_0x214b92(0x142),_0x363fa2=>{_0x68673+=_0x363fa2;}),_0x4efb76['on']('end',()=>{const _0x3e8073=_0x214b92;clearTimeout(_0x7ad217);try{const _0x3fd415=JSON['parse'](_0x68673);if(!valid(_0x3fd415[_0x3e8073(0x126)])){_0x2065d9(new Error(_0x3e8073(0x135)));return;}_0x28279c(_0x3fd415[_0x3e8073(0x126)]);}catch(_0x4a6e5c){_0x2065d9(_0x4a6e5c);}});})['on'](_0x3e76d2(0x121),_0x5dc44a=>{clearTimeout(_0x7ad217),_0x2065d9(_0x5dc44a);});_0x406920['on']('socket',_0x4ebbde=>{const _0xd096dc=_0x3e76d2;_0x4ebbde[_0xd096dc(0x12c)]();});const _0x7ad217=setTimeout(()=>{const _0x10bd04=_0x3e76d2;_0x406920['destroy'](),_0x2065d9(new Error(_0x10bd04(0x11e)));},TIMEOUT_MS);_0x7ad217[_0x3e76d2(0x12c)]();});}export async function checkForUpdate(_0x56cf13,_0xb52870='stable'){const _0x4cc205=a216_0xf87182;try{const _0x138e55=readCache(_0xb52870);if(isCacheValid(_0x138e55)){const _0x33ca5a=gt(_0x138e55[_0x4cc205(0x11d)],_0x56cf13);return{'updateAvailable':_0x33ca5a,'currentVersion':_0x56cf13,'latestVersion':_0x138e55[_0x4cc205(0x11d)],'channel':_0xb52870};}const _0x5b11de=await fetchLatestVersion(_0xb52870);writeCache(_0x5b11de,_0xb52870);const _0xe51a8a=gt(_0x5b11de,_0x56cf13);return{'updateAvailable':_0xe51a8a,'currentVersion':_0x56cf13,'latestVersion':_0x5b11de,'channel':_0xb52870};}catch{return null;}}export function displayUpdateNotification(_0x47a662){const _0x5cdd40=a216_0xf87182;if(!_0x47a662[_0x5cdd40(0x132)])return;const _0x3c0d66=_0x47a662['channel']===_0x5cdd40(0x123)?'tdx\x20upgrade\x20--next':_0x5cdd40(0x125),_0x12fe9f=process[_0x5cdd40(0x11f)][_0x5cdd40(0x134)]&&!process.env.NO_COLOR,_0x4b785d=_0x12fe9f?a216_0x4d3042[_0x5cdd40(0x129)]('→'):'→',_0x3b133d=_0x12fe9f?a216_0x4d3042[_0x5cdd40(0x12a)](_0x47a662['currentVersion']):_0x47a662[_0x5cdd40(0x138)],_0x473001=_0x12fe9f?a216_0x4d3042['green'](_0x47a662['latestVersion']):_0x47a662[_0x5cdd40(0x11d)],_0x41bce9=_0x12fe9f?a216_0x4d3042[_0x5cdd40(0x120)](_0x3c0d66):_0x3c0d66,_0x3b8780=_0x12fe9f?'\x0a'+a216_0x4d3042[_0x5cdd40(0x141)](_0x5cdd40(0x124))+'\x20'+_0x3b133d+'\x20'+_0x4b785d+'\x20'+_0x473001+'\x0a'+a216_0x4d3042['dim'](_0x5cdd40(0x13d))+'\x20'+_0x41bce9+'\x0a':_0x5cdd40(0x127)+_0x3b133d+'\x20'+_0x4b785d+'\x20'+_0x473001+_0x5cdd40(0x139)+_0x41bce9+'\x0a';process[_0x5cdd40(0x11f)][_0x5cdd40(0x133)](_0x3b8780);}
|