@treasuredata/tdx 2026.3.23 → 2026.3.25
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
|
-
const
|
|
1
|
+
const a209_0xe90b31=a209_0x7f35;(function(_0x3d6c70,_0x35dec9){const _0x195e59=a209_0x7f35,_0x322477=_0x3d6c70();while(!![]){try{const _0x53500e=parseInt(_0x195e59(0x12d))/0x1+parseInt(_0x195e59(0x13f))/0x2*(-parseInt(_0x195e59(0x12f))/0x3)+parseInt(_0x195e59(0x149))/0x4+-parseInt(_0x195e59(0x14e))/0x5+-parseInt(_0x195e59(0x157))/0x6*(-parseInt(_0x195e59(0x140))/0x7)+parseInt(_0x195e59(0x156))/0x8*(parseInt(_0x195e59(0x152))/0x9)+-parseInt(_0x195e59(0x142))/0xa;if(_0x53500e===_0x35dec9)break;else _0x322477['push'](_0x322477['shift']());}catch(_0x37b6af){_0x322477['push'](_0x322477['shift']());}}}(a209_0x3abc,0x99270));import{execSync,spawn}from'node:child_process';const SHELL_NAMES=new Set([a209_0xe90b31(0x135),'zsh','sh','fish',a209_0xe90b31(0x126),'tcsh','csh',a209_0xe90b31(0x14b),'pwsh',a209_0xe90b31(0x145),'nu',a209_0xe90b31(0x155),'elvish',a209_0xe90b31(0x15b)]),EPHEMERAL_SHELL_SPAWNERS=new Set([a209_0xe90b31(0x128),a209_0xe90b31(0x12b),a209_0xe90b31(0x158),a209_0xe90b31(0x13d),a209_0xe90b31(0x134)]);function getProcessInfoWindows(_0x3c6d42){const _0x5f564f=a209_0xe90b31;try{if(!Number[_0x5f564f(0x123)](_0x3c6d42)||_0x3c6d42<=0x0)return null;const _0x487fe0=_0x5f564f(0x12c)+_0x3c6d42+_0x5f564f(0x132),_0x1573b5=execSync(_0x5f564f(0x159)+_0x487fe0+'\x22',{'encoding':_0x5f564f(0x137),'windowsHide':!![],'stdio':[_0x5f564f(0x15a),'pipe','pipe']})[_0x5f564f(0x121)]();if(!_0x1573b5)return null;const [_0x7d0a7f,..._0x442de9]=_0x1573b5[_0x5f564f(0x122)](','),_0x2fd062=parseInt(_0x7d0a7f,0xa),_0x4c4253=_0x442de9[_0x5f564f(0x143)](',')[_0x5f564f(0x121)]();if(isNaN(_0x2fd062)||!_0x4c4253)return null;return{'pid':_0x3c6d42,'ppid':_0x2fd062,'comm':_0x4c4253['replace'](/\.exe$/i,'')};}catch{return null;}}function getProcessInfoPosix(_0x5905b6){const _0x22c90e=a209_0xe90b31;try{const _0xf8bc20=0x400000;if(!Number['isInteger'](_0x5905b6)||_0x5905b6<=0x0||_0x5905b6>_0xf8bc20)return null;const _0x513e95=execSync(_0x22c90e(0x12a)+_0x5905b6+_0x22c90e(0x146),{'encoding':_0x22c90e(0x137),'stdio':_0x22c90e(0x15a)})[_0x22c90e(0x121)](),[_0x5955a3,..._0x478472]=_0x513e95[_0x22c90e(0x122)](/\s+/),_0x40c962=parseInt(_0x5955a3,0xa),_0x4f2ac9=_0x478472['join']('\x20');if(isNaN(_0x40c962))return null;return{'pid':_0x5905b6,'ppid':_0x40c962,'comm':_0x4f2ac9};}catch{return null;}}function getProcessInfo(_0x3d73b5){const _0x2ed70c=a209_0xe90b31;if(process['platform']===_0x2ed70c(0x139))return getProcessInfoWindows(_0x3d73b5);return getProcessInfoPosix(_0x3d73b5);}function getBasename(_0x5b52af){const _0x1b560d=a209_0xe90b31;return _0x5b52af['replace'](/^-/,'')[_0x1b560d(0x122)]('/')[_0x1b560d(0x13e)]()?.['toLowerCase']()||'';}function isShell(_0x3b8a28){const _0x5e3848=a209_0xe90b31;return SHELL_NAMES[_0x5e3848(0x15c)](getBasename(_0x3b8a28));}function isEphemeralShellSpawner(_0x24d76c){return EPHEMERAL_SHELL_SPAWNERS['has'](getBasename(_0x24d76c));}let cachedShellPID;function findShellPID(){const _0x31631b=a209_0xe90b31;if(process[_0x31631b(0x147)]===undefined)return process['pid'];let _0x4591cf=process['ppid'];const _0x4f6829=0xa;let _0x7cc279=0x0;while(_0x7cc279<_0x4f6829){const _0x288860=getProcessInfo(_0x4591cf);if(!_0x288860)break;if(isShell(_0x288860[_0x31631b(0x130)])){const _0x19cdb5=getProcessInfo(_0x288860[_0x31631b(0x147)]);if(_0x19cdb5&&isEphemeralShellSpawner(_0x19cdb5[_0x31631b(0x130)])){_0x4591cf=_0x288860[_0x31631b(0x147)],_0x7cc279++;continue;}return _0x288860[_0x31631b(0x131)];}if(_0x288860[_0x31631b(0x147)]===0x0||_0x288860['ppid']===0x1){if(isShell(_0x288860[_0x31631b(0x130)]))return _0x288860[_0x31631b(0x131)];break;}_0x4591cf=_0x288860[_0x31631b(0x147)],_0x7cc279++;}return process[_0x31631b(0x147)]!==undefined?process[_0x31631b(0x147)]:process[_0x31631b(0x131)];}export function getPPID(){return cachedShellPID===undefined&&(cachedShellPID=findShellPID()),cachedShellPID;}export function clearPPIDCache(){cachedShellPID=undefined;}export function isProcessRunning(_0xa2e890){const _0x29ba59=a209_0xe90b31;if(!Number[_0x29ba59(0x123)](_0xa2e890)||_0xa2e890<=0x0)return![];try{return process[_0x29ba59(0x12e)](_0xa2e890,0x0),!![];}catch{return![];}}export function openBrowser(_0x1e6c50){const _0x903d9=a209_0xe90b31;let _0x3f611c;try{_0x3f611c=new URL(_0x1e6c50);}catch{throw new Error('Invalid\x20URL:\x20'+_0x1e6c50);}if(_0x3f611c[_0x903d9(0x127)]!=='http:'&&_0x3f611c[_0x903d9(0x127)]!==_0x903d9(0x14a))throw new Error(_0x903d9(0x124)+_0x3f611c[_0x903d9(0x127)]);const _0x2e00c7=_0x3f611c[_0x903d9(0x141)],_0x5c5df9=process[_0x903d9(0x144)];if(_0x5c5df9==='win32')spawn(_0x903d9(0x13a),['/c',_0x903d9(0x148),'',_0x2e00c7],{'detached':!![],'stdio':_0x903d9(0x14c)})[_0x903d9(0x138)]();else{const _0x526ec1=_0x5c5df9===_0x903d9(0x133)?_0x903d9(0x125):_0x903d9(0x154);spawn(_0x526ec1,[_0x2e00c7],{'detached':!![],'stdio':'ignore'})[_0x903d9(0x138)]();}}export function isWindows(){const _0x755056=a209_0xe90b31;return process[_0x755056(0x144)]===_0x755056(0x139);}function a209_0x7f35(_0x23ab99,_0x330c55){_0x23ab99=_0x23ab99-0x120;const _0x3abcd0=a209_0x3abc();let _0x7f3527=_0x3abcd0[_0x23ab99];return _0x7f3527;}export function getCrossSpawnOptions(_0x318d9e){return{..._0x318d9e??{},'shell':isWindows()};}export function escapeWindowsArg(_0x8a370d){const _0x5e7de6=a209_0xe90b31;if(!/[ \t"&|<>^%!`\r\n]/[_0x5e7de6(0x153)](_0x8a370d))return _0x8a370d;const _0xbeecd4=_0x8a370d[_0x5e7de6(0x136)](/"/g,'\x22\x22');return'\x22'+_0xbeecd4+'\x22';}export function crossSpawn(_0x2a7732,_0x1adf62,_0x1d0744){const _0x2310f9=a209_0xe90b31;if(isWindows()){const _0x1182e2=escapeWindowsArg(_0x2a7732),_0x9226c3=_0x1adf62[_0x2310f9(0x13c)](escapeWindowsArg),_0x4ca5e6=[_0x1182e2,..._0x9226c3]['join']('\x20');return spawn(_0x4ca5e6,[],{..._0x1d0744,'shell':!![]});}return spawn(_0x2a7732,_0x1adf62,{..._0x1d0744,'shell':![]});}function a209_0x3abc(){const _0x64214d=['code','Get-CimInstance\x20Win32_Process\x20-Filter\x20\x22ProcessId=','495176YiMcuQ','kill','827427fHIooy','comm','pid','\x22\x20|\x20Select-Object\x20-Property\x20ParentProcessId,Name\x20|\x20ForEach-Object\x20{\x20\x22$($_.ParentProcessId),$($_.Name)\x22\x20}','darwin','treasure\x20studio','bash','replace','utf-8','unref','win32','cmd.exe','toString','map','electron','pop','2FzkcyH','70nFlqgK','href','10194630PaxLyJ','join','platform','powershell','\x20-o\x20ppid=,comm=','ppid','start','2211468TJHNmQ','https:','dash','ignore','stdout','825080uBRFGX','data','stderr','which','63fBCSFT','test','xdg-open','ion','1048168NybhHa','73446aXQAtA','cursor','powershell.exe\x20-NoProfile\x20-NonInteractive\x20-Command\x20\x22','pipe','xonsh','has','error','trim','split','isInteger','Unsupported\x20protocol:\x20','open','ksh','protocol','claude','exit','ps\x20-p\x20'];a209_0x3abc=function(){return _0x64214d;};return a209_0x3abc();}export function gracefulExit(_0x3252af=0x0){const _0x7ba65e=a209_0xe90b31;isWindows()?setTimeout(()=>process[_0x7ba65e(0x129)](_0x3252af),0x32):process[_0x7ba65e(0x129)](_0x3252af);}export function findExecutable(_0x516879,_0xddfb10=0x1388){return new Promise(_0x5562ef=>{const _0x40e5ab=a209_0x7f35,_0xe8adf5=isWindows()?'where.exe':_0x40e5ab(0x151);let _0x5bed0a=![];const _0x1c188a=crossSpawn(_0xe8adf5,[_0x516879],{'stdio':_0x40e5ab(0x15a),'shell':isWindows()}),_0x594e6a=setTimeout(()=>{!_0x5bed0a&&(_0x5bed0a=!![],_0x1c188a['kill'](),_0x5562ef(null));},_0xddfb10);let _0x4bebdb='';_0x1c188a[_0x40e5ab(0x14d)]?.['on'](_0x40e5ab(0x14f),_0x209cf6=>{const _0x7c09b0=_0x40e5ab;_0x4bebdb+=_0x209cf6[_0x7c09b0(0x13b)]();}),_0x1c188a[_0x40e5ab(0x150)]?.['on'](_0x40e5ab(0x14f),()=>{}),_0x1c188a['on']('exit',_0x3b4552=>{const _0x3268b0=_0x40e5ab;if(_0x5bed0a)return;_0x5bed0a=!![],clearTimeout(_0x594e6a);if(_0x3b4552===0x0&&_0x4bebdb[_0x3268b0(0x121)]()){const _0x4a4672=_0x4bebdb[_0x3268b0(0x121)]()[_0x3268b0(0x122)](/\r?\n/)[0x0];_0x5562ef(_0x4a4672);}else _0x5562ef(null);}),_0x1c188a['on'](_0x40e5ab(0x120),()=>{if(_0x5bed0a)return;_0x5bed0a=!![],clearTimeout(_0x594e6a),_0x5562ef(null);});});}
|
package/dist/utils/prompt.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a210_0x410b(_0x771fbe,_0x488c5b){_0x771fbe=_0x771fbe-0x117;const _0x4f634d=a210_0x4f63();let _0x410b64=_0x4f634d[_0x771fbe];return _0x410b64;}(function(_0x547b1c,_0x5bca11){const _0x39718d=a210_0x410b,_0x34b13c=_0x547b1c();while(!![]){try{const _0xcdc2b6=-parseInt(_0x39718d(0x11e))/0x1*(parseInt(_0x39718d(0x130))/0x2)+parseInt(_0x39718d(0x125))/0x3*(parseInt(_0x39718d(0x123))/0x4)+-parseInt(_0x39718d(0x117))/0x5+-parseInt(_0x39718d(0x11d))/0x6*(-parseInt(_0x39718d(0x12e))/0x7)+parseInt(_0x39718d(0x11b))/0x8*(-parseInt(_0x39718d(0x118))/0x9)+-parseInt(_0x39718d(0x121))/0xa*(-parseInt(_0x39718d(0x12b))/0xb)+parseInt(_0x39718d(0x124))/0xc;if(_0xcdc2b6===_0x5bca11)break;else _0x34b13c['push'](_0x34b13c['shift']());}catch(_0x4635fb){_0x34b13c['push'](_0x34b13c['shift']());}}}(a210_0x4f63,0x719ed));import*as a210_0x560e45 from'readline';function a210_0x4f63(){const _0xf85ba6=['132333hTCuHa','\x20(y/N):\x20','write','close','setRawMode','utf8','11759wCUHoC','resume','toLowerCase','21msFqYk','createInterface','194ZtNSQF','question','yes','3509475gojsev','6918732GAJgOO','setEncoding','data','8DtXoBK','removeListener','1101606jGhAMl','206okzGtS','stderr','stdin','2790rTQmsL','isTTY','68tnNxjr','4284876cEBXwu'];a210_0x4f63=function(){return _0xf85ba6;};return a210_0x4f63();}import{gracefulExit}from'./process.js';export function isInteractive(){const _0x51f151=a210_0x410b;return process[_0x51f151(0x120)]['isTTY']===!![];}export async function confirm(_0x556988){const _0x2c24f8=a210_0x410b,_0x30afeb=a210_0x560e45[_0x2c24f8(0x12f)]({'input':process[_0x2c24f8(0x120)],'output':process['stdout']});return new Promise(_0x3e4851=>{const _0x25bea3=_0x2c24f8;_0x30afeb[_0x25bea3(0x131)](_0x556988+_0x25bea3(0x126),_0x1942f1=>{const _0x476a4a=_0x25bea3;_0x30afeb[_0x476a4a(0x128)](),_0x3e4851(_0x1942f1[_0x476a4a(0x12d)]()==='y'||_0x1942f1[_0x476a4a(0x12d)]()===_0x476a4a(0x132));});});}export async function confirmKey(_0x1dc47a){const _0x343b55=a210_0x410b;if(!process['stdin'][_0x343b55(0x122)])return![];return process[_0x343b55(0x11f)][_0x343b55(0x127)](_0x1dc47a+'\x20[y/N]\x20'),new Promise(_0x23387a=>{const _0x15c8c8=_0x343b55,_0x994c54=process[_0x15c8c8(0x120)];_0x994c54[_0x15c8c8(0x129)](!![]),_0x994c54[_0x15c8c8(0x12c)](),_0x994c54[_0x15c8c8(0x119)](_0x15c8c8(0x12a));const _0x5c5e57=_0x5a66a9=>{const _0x47860e=_0x15c8c8;_0x994c54[_0x47860e(0x129)](![]),_0x994c54['pause'](),_0x994c54[_0x47860e(0x11c)](_0x47860e(0x11a),_0x5c5e57);if(_0x5a66a9==='\x1b'){process['stderr'][_0x47860e(0x127)]('\x0a'),_0x23387a(![]);return;}_0x5a66a9==='\x03'&&(process[_0x47860e(0x11f)][_0x47860e(0x127)]('\x0a'),gracefulExit(0x82));if(_0x5a66a9[_0x47860e(0x12d)]()==='y'){process[_0x47860e(0x11f)][_0x47860e(0x127)]('y\x0a'),_0x23387a(!![]);return;}process[_0x47860e(0x11f)]['write']('\x0a'),_0x23387a(![]);};_0x994c54['on']('data',_0x5c5e57);});}
|
package/dist/utils/spinner.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a211_0x5cc3(_0x3de612,_0x38a20b){_0x3de612=_0x3de612-0xc5;const _0x3b69bf=a211_0x3b69();let _0x5cc361=_0x3b69bf[_0x3de612];return _0x5cc361;}(function(_0x189df4,_0x4a4523){const _0xcadf61=a211_0x5cc3,_0x1325c1=_0x189df4();while(!![]){try{const _0x2f4258=-parseInt(_0xcadf61(0xcc))/0x1+-parseInt(_0xcadf61(0xd1))/0x2*(-parseInt(_0xcadf61(0xca))/0x3)+parseInt(_0xcadf61(0xdd))/0x4+parseInt(_0xcadf61(0xdb))/0x5+-parseInt(_0xcadf61(0xd5))/0x6*(-parseInt(_0xcadf61(0xd0))/0x7)+parseInt(_0xcadf61(0xd4))/0x8*(-parseInt(_0xcadf61(0xd7))/0x9)+-parseInt(_0xcadf61(0xc9))/0xa;if(_0x2f4258===_0x4a4523)break;else _0x1325c1['push'](_0x1325c1['shift']());}catch(_0x3e5947){_0x1325c1['push'](_0x1325c1['shift']());}}}(a211_0x3b69,0xe497d));import a211_0x2eb87f from'ora';function a211_0x3b69(){const _0xeac57e=['2288194NYCyFw','text','isSpinning','8mNXkLy','678etUKBR','jobId','3546729QlEMTD','stderr','start','isTTY','7523695nsYOMe','\x20[Job\x20ID:\x20','4979708tEytAV','floor','now','...','replace','phase','stop','23830560nZnlUn','3mRqOBW','trim','887350JyqQNM','extra','Processing','clock','43799kbEzjC'];a211_0x3b69=function(){return _0xeac57e;};return a211_0x3b69();}import{isWindows}from'./process.js';const windowsSpinner={'interval':0x3e8,'frames':['•']};export function createCommandSpinner(_0x3cc218,_0x453d0d={}){const _0x333133=a211_0x5cc3,{verbose:verbose=![],forceEnabled:forceEnabled=![]}=_0x453d0d;return a211_0x2eb87f({'text':_0x3cc218,'color':'cyan','stream':process[_0x333133(0xd8)],'isEnabled':forceEnabled||process[_0x333133(0xd8)][_0x333133(0xda)]&&!verbose,...isWindows()&&{'spinner':windowsSpinner}});}export async function withSpinner(_0x269222,_0x349519,_0x291e77={}){const _0x291837=a211_0x5cc3,_0x4daa6c=_0x291e77['clock']??(()=>Date[_0x291837(0xdf)]()),_0x43cf12=createCommandSpinner(_0x269222,_0x291e77);_0x43cf12[_0x291837(0xd9)]();const _0x494f2e=_0x4daa6c();try{const _0x5814a9=await _0x349519(),_0x18dfaf=_0x4daa6c()-_0x494f2e;return _0x43cf12[_0x291837(0xc8)](),{'data':_0x5814a9,'elapsedMs':_0x18dfaf};}catch(_0x403b4f){_0x43cf12[_0x291837(0xc8)]();throw _0x403b4f;}}export async function withProgressSpinner(_0x1f7af5,_0x45d390,_0x59ec06={}){const _0x21dde6=a211_0x5cc3,_0x399ed8=_0x59ec06[_0x21dde6(0xcf)]??(()=>Date['now']()),_0x2f4a44=_0x59ec06['intervalFactory']??setInterval,_0x349e67=createCommandSpinner(_0x1f7af5,_0x59ec06);_0x349e67['start']();const _0x14099c=_0x399ed8(),_0x42f251=_0x1f7af5[_0x21dde6(0xc6)](_0x21dde6(0xc5),'')[_0x21dde6(0xcb)]()||_0x21dde6(0xce),_0x1d3e10={};let _0x333412=_0x1f7af5;const _0x2a339f=()=>{const _0x365ea1=_0x21dde6;if(!_0x349e67[_0x365ea1(0xd3)])return;const _0x420001=_0x399ed8()-_0x14099c,_0x1650fb=formatElapsed(_0x420001),_0x42cdaa=_0x1d3e10[_0x365ea1(0xc7)]?.[_0x365ea1(0xcb)]()||_0x42f251,_0x1258f8=_0x1d3e10[_0x365ea1(0xd6)]?_0x365ea1(0xdc)+_0x1d3e10['jobId']+']':'',_0x49f417=_0x1d3e10[_0x365ea1(0xcd)]?'\x20'+_0x1d3e10['extra']:'',_0x56b9c9=_0x42cdaa+'\x20'+_0x1650fb+_0x49f417+_0x1258f8;_0x56b9c9!==_0x333412&&_0x56b9c9[_0x365ea1(0xcb)]()&&(_0x349e67[_0x365ea1(0xd2)]=_0x56b9c9,_0x333412=_0x56b9c9);},_0xee7042=_0x2f4a44(()=>{_0x2a339f();},0x3e8),_0x3c3c3b={'setPhase':_0x40420f=>{const _0x42c0e5=_0x21dde6;_0x1d3e10[_0x42c0e5(0xc7)]=_0x40420f;const _0x3f61f=_0x40420f?.[_0x42c0e5(0xcb)]()||_0x42f251,_0x2559b7=_0x399ed8()-_0x14099c,_0x30d1c0=formatElapsed(_0x2559b7),_0xc8b0db=_0x1d3e10[_0x42c0e5(0xd6)]?_0x42c0e5(0xdc)+_0x1d3e10[_0x42c0e5(0xd6)]+']':'',_0x24c324=_0x1d3e10[_0x42c0e5(0xcd)]?'\x20'+_0x1d3e10[_0x42c0e5(0xcd)]:'',_0x382196=_0x3f61f+'\x20'+_0x30d1c0+_0x24c324+_0xc8b0db;_0x349e67[_0x42c0e5(0xd3)]&&_0x382196[_0x42c0e5(0xcb)]()&&(_0x349e67[_0x42c0e5(0xd2)]=_0x382196,_0x333412=_0x382196);},'setJobId':_0x5e1dd8=>{const _0x3d25d6=_0x21dde6;_0x1d3e10[_0x3d25d6(0xd6)]=_0x5e1dd8,_0x2a339f();},'setExtra':_0x2b26db=>{_0x1d3e10['extra']=_0x2b26db,_0x2a339f();}};_0x2a339f();try{const _0x1d8489=await _0x45d390(_0x3c3c3b),_0x2a1e41=_0x399ed8()-_0x14099c;return{'data':_0x1d8489,'elapsedMs':_0x2a1e41};}finally{clearInterval(_0xee7042),_0x349e67[_0x21dde6(0xc8)]();}}export function formatElapsed(_0x34f6bc){const _0x51974f=a211_0x5cc3,_0xba308a=Math[_0x51974f(0xde)](_0x34f6bc/0x3e8);if(_0xba308a<0x3c)return(_0x34f6bc/0x3e8)['toFixed'](0x1)+'s';const _0x1f8252=Math[_0x51974f(0xde)](_0xba308a/0x3c),_0x2b852b=_0xba308a%0x3c;if(_0x1f8252<0x3c)return _0x1f8252+'m\x20'+_0x2b852b+'s';const _0x4f12ca=Math['floor'](_0x1f8252/0x3c),_0x56ec8b=_0x1f8252%0x3c;return _0x4f12ca+'h\x20'+_0x56ec8b+'m';}
|
package/dist/utils/sse-parser.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a212_0x5a82(_0x5b07a0,_0xbbcd14){_0x5b07a0=_0x5b07a0-0x9e;const _0x35057f=a212_0x3505();let _0x5a82dd=_0x35057f[_0x5b07a0];return _0x5a82dd;}(function(_0x5229e1,_0x2f5bd8){const _0x19bfbb=a212_0x5a82,_0xde847b=_0x5229e1();while(!![]){try{const _0x915d26=parseInt(_0x19bfbb(0xb6))/0x1+-parseInt(_0x19bfbb(0xad))/0x2+-parseInt(_0x19bfbb(0xa5))/0x3*(parseInt(_0x19bfbb(0x9f))/0x4)+-parseInt(_0x19bfbb(0xa1))/0x5*(parseInt(_0x19bfbb(0xae))/0x6)+-parseInt(_0x19bfbb(0xa6))/0x7+parseInt(_0x19bfbb(0xaf))/0x8*(-parseInt(_0x19bfbb(0xa9))/0x9)+parseInt(_0x19bfbb(0xb2))/0xa;if(_0x915d26===_0x2f5bd8)break;else _0xde847b['push'](_0xde847b['shift']());}catch(_0x130c3b){_0xde847b['push'](_0xde847b['shift']());}}}(a212_0x3505,0xa510c));function a212_0x3505(){const _0x42f776=['416xKINCM','slice','Failed\x20to\x20parse\x20SSE\x20data\x20as\x20JSON:\x20','36745960dGbWvb','getReader','Response\x20body\x20is\x20null','pop','185217LTagfK','[LLM\x20API\x20SSE]\x20','10284mFtgzR','event','862405CnxrKk','releaseLock','read','startsWith','390zIQKmQ','3266214KuReNv','split','trim','152829EeiDaM','parse','body','data','1274912slWdrR','30yDWqGb'];a212_0x3505=function(){return _0x42f776;};return a212_0x3505();}export async function*parseSSEStream(_0x541664,_0x21104f){const _0x1752c2=a212_0x5a82;if(!_0x541664[_0x1752c2(0xab)])throw new Error(_0x1752c2(0xb4));const _0x2d40b3=_0x541664[_0x1752c2(0xab)][_0x1752c2(0xb3)](),_0x3f9a87=new TextDecoder();let _0x3f1ea4='',_0x78f738={};try{while(!![]){const {done:_0x3a9b5e,value:_0x5ba924}=await _0x2d40b3[_0x1752c2(0xa3)]();if(_0x3a9b5e){if(_0x78f738[_0x1752c2(0xac)]){_0x21104f?.['debug']('[LLM\x20API\x20SSE]\x20'+_0x78f738[_0x1752c2(0xac)]);const _0x5cd83a=parseSSEData(_0x78f738[_0x1752c2(0xac)]);yield _0x5cd83a;}break;}_0x3f1ea4+=_0x3f9a87['decode'](_0x5ba924,{'stream':!![]});const _0x2fea0b=_0x3f1ea4[_0x1752c2(0xa7)]('\x0a');_0x3f1ea4=_0x2fea0b[_0x1752c2(0xb5)]()||'';for(const _0x18d736 of _0x2fea0b){if(_0x18d736[_0x1752c2(0xa8)]()===''){if(_0x78f738[_0x1752c2(0xac)]){_0x21104f?.['debug'](_0x1752c2(0x9e)+_0x78f738[_0x1752c2(0xac)]);const _0x112420=parseSSEData(_0x78f738['data']);yield _0x112420,_0x78f738={};}continue;}if(_0x18d736[_0x1752c2(0xa4)](':'))continue;const _0x313846=_0x18d736['indexOf'](':');if(_0x313846===-0x1)continue;const _0x22e43a=_0x18d736[_0x1752c2(0xb0)](0x0,_0x313846);let _0x2343c0=_0x18d736[_0x1752c2(0xb0)](_0x313846+0x1);_0x2343c0[_0x1752c2(0xa4)]('\x20')&&(_0x2343c0=_0x2343c0[_0x1752c2(0xb0)](0x1));switch(_0x22e43a){case'event':_0x78f738[_0x1752c2(0xa0)]=_0x2343c0;break;case _0x1752c2(0xac):_0x78f738['data']=_0x78f738[_0x1752c2(0xac)]?_0x78f738['data']+'\x0a'+_0x2343c0:_0x2343c0;break;case'id':_0x78f738['id']=_0x2343c0;break;}}}}finally{_0x2d40b3[_0x1752c2(0xa2)]();}}function parseSSEData(_0x4ae5a6){const _0x7ca47f=a212_0x5a82;try{return JSON[_0x7ca47f(0xaa)](_0x4ae5a6);}catch(_0x40894e){throw new Error(_0x7ca47f(0xb1)+_0x4ae5a6,{'cause':_0x40894e});}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x6bb673,_0x1787a1){const _0x3458af=a213_0x2dbc,_0x1bbeee=_0x6bb673();while(!![]){try{const _0x2c1198=parseInt(_0x3458af(0x10c))/0x1*(-parseInt(_0x3458af(0x11e))/0x2)+-parseInt(_0x3458af(0x10b))/0x3+-parseInt(_0x3458af(0x11c))/0x4*(-parseInt(_0x3458af(0x117))/0x5)+parseInt(_0x3458af(0x119))/0x6+parseInt(_0x3458af(0x108))/0x7+-parseInt(_0x3458af(0x113))/0x8+parseInt(_0x3458af(0x11b))/0x9*(parseInt(_0x3458af(0x109))/0xa);if(_0x2c1198===_0x1787a1)break;else _0x1bbeee['push'](_0x1bbeee['shift']());}catch(_0x3f239b){_0x1bbeee['push'](_0x1bbeee['shift']());}}}(a213_0xe1f2,0x6f933));function a213_0xe1f2(){const _0x7fc3dc=['Cannot\x20escape\x20empty\x20string\x20literal','2073270iZeOAD','736657jqEimE','substring','toLowerCase','repeat','trim','random','replace','3984384vKAvNO','toString','\x5c$&','floor','85JddIgx','test','3446328iOVQko','Cannot\x20build\x20LIKE\x20pattern\x20from\x20empty\x20string','468DWMcLe','46264uITOfc','slice','2GvVDIz','unknown','4125240RDXNHP','196630cKEBMZ'];a213_0xe1f2=function(){return _0x7fc3dc;};return a213_0xe1f2();}import a213_0x4cc94a from'string-width';export function stringWidth(_0xeb78ce){return a213_0x4cc94a(_0xeb78ce);}export function padEnd(_0x527457,_0x4e0f11){const _0xd9f4e3=a213_0x2dbc,_0xc77389=stringWidth(_0x527457);if(_0xc77389>=_0x4e0f11)return _0x527457;return _0x527457+'\x20'[_0xd9f4e3(0x10f)](_0x4e0f11-_0xc77389);}export function padStart(_0x5cea5c,_0x4d5079){const _0x5ac356=a213_0x2dbc,_0x59ad0d=stringWidth(_0x5cea5c);if(_0x59ad0d>=_0x4d5079)return _0x5cea5c;return'\x20'[_0x5ac356(0x10f)](_0x4d5079-_0x59ad0d)+_0x5cea5c;}export function centerAlign(_0x3a0038,_0x373fb4){const _0x270402=a213_0x2dbc,_0x4c2320=stringWidth(_0x3a0038);if(_0x4c2320>_0x373fb4){if(_0x373fb4<=0x1)return'…'[_0x270402(0x10d)](0x0,_0x373fb4);let _0x30d2c4=_0x3a0038;while(stringWidth(_0x30d2c4+'…')>_0x373fb4){_0x30d2c4=_0x30d2c4[_0x270402(0x11d)](0x0,-0x1);}return _0x30d2c4+'…';}if(_0x4c2320===_0x373fb4)return _0x3a0038;const _0x152e2b=_0x373fb4-_0x4c2320,_0x2d9e16=Math[_0x270402(0x116)](_0x152e2b/0x2),_0xebff0a=_0x152e2b-_0x2d9e16;return'\x20'['repeat'](_0x2d9e16)+_0x3a0038+'\x20'['repeat'](_0xebff0a);}export function escapeStringLiteral(_0x357282){const _0x3de9bd=a213_0x2dbc;if(!_0x357282||_0x357282['trim']()['length']===0x0)throw new Error(_0x3de9bd(0x10a));const _0x12ac4f=_0x357282['replace'](/'/g,'\x27\x27');return'\x27'+_0x12ac4f+'\x27';}export function globToLike(_0x5ad732){const _0x4aad63=a213_0x2dbc;let _0x3a1068=_0x5ad732['replace'](/\\/g,'\x5c\x5c')[_0x4aad63(0x112)](/%/g,'\x5c%')['replace'](/_/g,'\x5c_');return _0x3a1068=_0x3a1068[_0x4aad63(0x112)](/\*/g,'%')[_0x4aad63(0x112)](/\?/g,'_'),_0x3a1068;}function a213_0x2dbc(_0x21b441,_0x540ffb){_0x21b441=_0x21b441-0x108;const _0xe1f2a1=a213_0xe1f2();let _0x2dbc39=_0xe1f2a1[_0x21b441];return _0x2dbc39;}export function buildLikePattern(_0x44ca99){const _0x1c4770=a213_0x2dbc;if(!_0x44ca99||_0x44ca99[_0x1c4770(0x110)]()['length']===0x0)throw new Error(_0x1c4770(0x11a));const _0x2f5e3e=globToLike(_0x44ca99),_0x2ac891=_0x2f5e3e[_0x1c4770(0x112)](/'/g,'\x27\x27');return'\x27'+_0x2ac891+'\x27';}export function matchGlobPattern(_0x215251,_0x595e18){const _0x131f8c=a213_0x2dbc,_0x4fea22=_0x595e18[_0x131f8c(0x112)](/[.+^${}()|[\]\\]/g,_0x131f8c(0x115))[_0x131f8c(0x112)](/\*/g,'.*')[_0x131f8c(0x112)](/\?/g,'.'),_0x453ec5=new RegExp('^'+_0x4fea22+'$');return _0x453ec5[_0x131f8c(0x118)](_0x215251);}export function getSanitizedUsername(){const _0x15499c=a213_0x2dbc,_0x35c331=process.env.USER||process.env.USERNAME||_0x15499c(0x11f);return _0x35c331['replace'](/[^a-zA-Z0-9]/g,'')['toLowerCase']();}export function generateRandomHex(){const _0x4574e2=a213_0x2dbc,_0x359684=Math[_0x4574e2(0x116)](Math[_0x4574e2(0x111)]()*0xfffff);return _0x359684[_0x4574e2(0x114)](0x10)['padStart'](0x5,'0');}export function sanitizeFileName(_0x38bcd4){const _0x1b89b1=a213_0x2dbc;return _0x38bcd4[_0x1b89b1(0x10e)]()[_0x1b89b1(0x112)](/[/\\:*?"<>|]/g,'-')[_0x1b89b1(0x112)](/\s+/g,'-')[_0x1b89b1(0x112)](/-+/g,'-')[_0x1b89b1(0x112)](/^-|-$/g,'');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a214_0x4492(_0x27fd12,_0x3d12f2){_0x27fd12=_0x27fd12-0x67;const _0x54b56f=a214_0x54b5();let _0x4492a7=_0x54b56f[_0x27fd12];return _0x4492a7;}(function(_0x5345ff,_0x24032e){const _0x45fabc=a214_0x4492,_0x1342dd=_0x5345ff();while(!![]){try{const _0x53a1ac=parseInt(_0x45fabc(0x7a))/0x1*(parseInt(_0x45fabc(0x74))/0x2)+parseInt(_0x45fabc(0x7b))/0x3*(parseInt(_0x45fabc(0x71))/0x4)+-parseInt(_0x45fabc(0x68))/0x5*(parseInt(_0x45fabc(0x76))/0x6)+-parseInt(_0x45fabc(0x67))/0x7*(-parseInt(_0x45fabc(0x80))/0x8)+parseInt(_0x45fabc(0x79))/0x9*(-parseInt(_0x45fabc(0x84))/0xa)+parseInt(_0x45fabc(0x72))/0xb*(-parseInt(_0x45fabc(0x6e))/0xc)+-parseInt(_0x45fabc(0x6f))/0xd*(-parseInt(_0x45fabc(0x7f))/0xe);if(_0x53a1ac===_0x24032e)break;else _0x1342dd['push'](_0x1342dd['shift']());}catch(_0x58572d){_0x1342dd['push'](_0x1342dd['shift']());}}}(a214_0x54b5,0x9a40c));function hasWildcard(_0x14fb87){return _0x14fb87['includes']('*')||_0x14fb87['includes']('?');}function a214_0x54b5(){const _0x729e1=['push','Pattern\x20cannot\x20be\x20just\x20a\x20dot','Pattern\x20cannot\x20be\x20empty\x20or\x20whitespace-only','322YJYkzr','8YPDWgI','Invalid\x20pattern\x20format\x20-\x20too\x20many\x20dots\x20(max:\x20catalog.database.table)','split','database','5210YvSdhU','3126501YwWEHg','2710690vobAdl','trim','join','Database\x20part\x20cannot\x20be\x20empty\x20-\x20use\x20\x22*\x22\x20for\x20all\x20databases\x20(e.g.,\x20\x22*.mytable\x22)','Wildcards\x20are\x20not\x20allowed\x20in\x20database\x20name\x20for\x20describe\x20operation','Wildcards\x20are\x20not\x20allowed\x20in\x20table\x20name\x20for\x20describe\x20operation','1874496arCIRO','1121393TRAyKf','Invalid\x20catalog.database.table\x20format\x20-\x20all\x20parts\x20must\x20be\x20non-empty','1221956megdSZ','66JNkCHG','length','86BMgbeQ','table','6HQWFgZ','catalog','Table\x20part\x20cannot\x20be\x20empty\x20-\x20use\x20\x22*\x22\x20for\x20all\x20tables\x20(e.g.,\x20\x22mydb.*\x22)','17820GaAadA','9457LQwFjS','3FcjuEz'];a214_0x54b5=function(){return _0x729e1;};return a214_0x54b5();}export function parseTableReference(_0x916db9){const _0x6138bd=a214_0x4492;if(!_0x916db9||_0x916db9[_0x6138bd(0x69)]()[_0x6138bd(0x73)]===0x0)throw new Error(_0x6138bd(0x7e));const _0x2f5893=_0x916db9[_0x6138bd(0x69)](),_0x85c0b5={'original':_0x2f5893},_0x3b3ff2=_0x2f5893[_0x6138bd(0x82)]('.');if(_0x3b3ff2[_0x6138bd(0x73)]===0x1){const _0xdca69e=_0x3b3ff2[0x0];if(!_0xdca69e)throw new Error(_0x6138bd(0x7d));_0x85c0b5[_0x6138bd(0x75)]=_0xdca69e;}else{if(_0x3b3ff2['length']===0x2){const [_0x38b93c,_0x48e5c3]=_0x3b3ff2;if(!_0x38b93c)throw new Error(_0x6138bd(0x6b));if(!_0x48e5c3)throw new Error(_0x6138bd(0x78));_0x85c0b5[_0x6138bd(0x83)]=_0x38b93c,_0x85c0b5[_0x6138bd(0x75)]=_0x48e5c3;}else{if(_0x3b3ff2[_0x6138bd(0x73)]===0x3){const [_0x106006,_0x346289,_0x209db8]=_0x3b3ff2;if(!_0x106006||!_0x346289||!_0x209db8)throw new Error(_0x6138bd(0x70));_0x85c0b5[_0x6138bd(0x77)]=_0x106006,_0x85c0b5[_0x6138bd(0x83)]=_0x346289,_0x85c0b5[_0x6138bd(0x75)]=_0x209db8;}else throw new Error(_0x6138bd(0x81));}}return _0x85c0b5;}export function formatTableReference(_0x2b3621){const _0x51bcbd=a214_0x4492,_0x2b2d3b=[];return _0x2b3621[_0x51bcbd(0x77)]&&_0x2b2d3b[_0x51bcbd(0x7c)](_0x2b3621['catalog']),_0x2b3621['database']&&_0x2b2d3b[_0x51bcbd(0x7c)](_0x2b3621['database']),_0x2b3621[_0x51bcbd(0x75)]&&_0x2b2d3b[_0x51bcbd(0x7c)](_0x2b3621[_0x51bcbd(0x75)]),_0x2b2d3b[_0x51bcbd(0x6a)]('.');}export function validateTableListReference(_0x50bc81){return undefined;}export function validateTableDescribeReference(_0x270a48){const _0xa04f97=a214_0x4492;if(!_0x270a48[_0xa04f97(0x75)])return'Table\x20name\x20is\x20required\x20for\x20describe\x20operation';if(_0x270a48[_0xa04f97(0x83)]&&hasWildcard(_0x270a48[_0xa04f97(0x83)]))return _0xa04f97(0x6c);if(hasWildcard(_0x270a48['table']))return _0xa04f97(0x6d);return undefined;}
|
package/dist/utils/tdx-logger.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a215_0x33c390=a215_0x123b;function a215_0x3d78(){const _0x5907b1=['18eegfqH','init','1842201HnvcLg','12518AXRvmM','push','info','INFO','24OgwuWj','1921775TqUlAq','tdx.log','logDir','4599637CONgQe','Session\x20ended','fileOnly','fileHandler','warn','logFileName','logger','logLevel','close','consoleHandler','trace','8100540RMSJOF','3339482AYhPrJ','18XVVlPp','tdx','598760YokyZW','shutdown','debug'];a215_0x3d78=function(){return _0x5907b1;};return a215_0x3d78();}function a215_0x123b(_0x13380b,_0x1a85e0){_0x13380b=_0x13380b-0x198;const _0x3d780c=a215_0x3d78();let _0x123b89=_0x3d780c[_0x13380b];return _0x123b89;}(function(_0x154001,_0x1c7ce5){const _0x3c6cc2=a215_0x123b,_0x651d31=_0x154001();while(!![]){try{const _0x30a017=parseInt(_0x3c6cc2(0x1a7))/0x1+-parseInt(_0x3c6cc2(0x19e))/0x2+-parseInt(_0x3c6cc2(0x1a4))/0x3*(-parseInt(_0x3c6cc2(0x1a1))/0x4)+parseInt(_0x3c6cc2(0x1ac))/0x5*(parseInt(_0x3c6cc2(0x19f))/0x6)+parseInt(_0x3c6cc2(0x1af))/0x7+-parseInt(_0x3c6cc2(0x1ab))/0x8*(-parseInt(_0x3c6cc2(0x1a6))/0x9)+-parseInt(_0x3c6cc2(0x19d))/0xa;if(_0x30a017===_0x1c7ce5)break;else _0x651d31['push'](_0x651d31['shift']());}catch(_0x799ba2){_0x651d31['push'](_0x651d31['shift']());}}}(a215_0x3d78,0xd0c2e));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_0x33c390(0x199)];[a215_0x33c390(0x1b1)];[a215_0x33c390(0x1ae)];[a215_0x33c390(0x1b4)];[a215_0x33c390(0x198)];['fileHandler']=null;[a215_0x33c390(0x19b)]=null;constructor(_0x1c9a17=LogLevel[a215_0x33c390(0x1aa)],_0x2e17f6=![],_0x337d5e,_0x82f590=a215_0x33c390(0x1ad)){const _0x3203db=a215_0x33c390;this['logLevel']=_0x1c9a17,this['fileOnly']=_0x2e17f6,this[_0x3203db(0x1ae)]=_0x337d5e||join(getGlobalCacheDir(),'logs'),this[_0x3203db(0x1b4)]=_0x82f590,this[_0x3203db(0x198)]=Logger['of'](_0x3203db(0x1a0));}async['init'](){const _0x1d32c9=a215_0x33c390,_0xc73685=join(this[_0x1d32c9(0x1ae)],this[_0x1d32c9(0x1b4)]);if(Logger['isInitialized']()){!this[_0x1d32c9(0x1b1)]&&(this[_0x1d32c9(0x19b)]=new ConsoleHandler({'minLevel':LogLevel[_0x1d32c9(0x1aa)],'colors':!![]}),Logger['addHandler'](this[_0x1d32c9(0x19b)]));return;}this[_0x1d32c9(0x1b2)]=new FileHandler({'filePath':_0xc73685});const _0x3f4416=[this['fileHandler']];!this['fileOnly']&&(this[_0x1d32c9(0x19b)]=new ConsoleHandler({'minLevel':LogLevel['INFO'],'colors':!![]}),_0x3f4416[_0x1d32c9(0x1a8)](this['consoleHandler'])),await Logger[_0x1d32c9(0x1a5)]({'defaultLevel':this['logLevel'],'handlers':_0x3f4416,'formatter':new DefaultLogFormatter({'colors':!![]})});}[a215_0x33c390(0x1a3)](..._0x5cc88a){const _0x2ac39b=a215_0x33c390;this[_0x2ac39b(0x198)]['debug'](..._0x5cc88a);}[a215_0x33c390(0x19c)](..._0x5ee9dd){const _0x1d597c=a215_0x33c390;this['logger'][_0x1d597c(0x19c)](..._0x5ee9dd);}[a215_0x33c390(0x1a9)](..._0x7a918e){const _0x5d62f5=a215_0x33c390;this[_0x5d62f5(0x198)][_0x5d62f5(0x1a9)](..._0x7a918e);}[a215_0x33c390(0x1b3)](..._0x594725){const _0x25ae5b=a215_0x33c390;this[_0x25ae5b(0x198)]['warn'](..._0x594725);}['error'](..._0x415cfc){const _0xfe9d0f=a215_0x33c390;this[_0xfe9d0f(0x198)]['error'](..._0x415cfc);}async[a215_0x33c390(0x19a)](){const _0x15bc9e=a215_0x33c390;this[_0x15bc9e(0x198)]['info'](_0x15bc9e(0x1b0)),await Logger[_0x15bc9e(0x1a2)]();}['getLogPath'](){const _0x4cfa59=a215_0x33c390;return join(this['logDir'],this[_0x4cfa59(0x1b4)]);}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a216_0x3755c3=a216_0x2901;(function(_0x422587,_0xd42640){const _0x5443e2=a216_0x2901,_0x3af6a2=_0x422587();while(!![]){try{const _0x436001=-parseInt(_0x5443e2(0xd2))/0x1*(parseInt(_0x5443e2(0xc8))/0x2)+-parseInt(_0x5443e2(0xe5))/0x3+-parseInt(_0x5443e2(0xcd))/0x4+-parseInt(_0x5443e2(0xd4))/0x5+-parseInt(_0x5443e2(0xeb))/0x6*(-parseInt(_0x5443e2(0xde))/0x7)+-parseInt(_0x5443e2(0xdc))/0x8*(parseInt(_0x5443e2(0xdf))/0x9)+parseInt(_0x5443e2(0xcb))/0xa;if(_0x436001===_0xd42640)break;else _0x3af6a2['push'](_0x3af6a2['shift']());}catch(_0x226415){_0x3af6a2['push'](_0x3af6a2['shift']());}}}(a216_0x7e53,0xcda47));import{get}from'https';import{gt,valid}from'semver';import a216_0x5abd90 from'chalk';import{createGlobalCache}from'./global-cache.js';function a216_0x7e53(){const _0x3d5434=['Run:','last_version_check','parse','9606736hxaoBX','dim','329kqeQIG','9ssUAlm','destroy','tdx\x20upgrade','toISOString','statusCode','Request\x20timeout','542133ofPeAv','green','channel','write','\x0aRun:\x20','next','175938QUNrFu','https://registry.npmjs.org/@treasuredata/tdx','cyan','190aaNFXq','currentVersion','latestVersion','31285610fvdrKq','yellow','3438872OYxzcG','gray','isTTY','stderr','end','13009HlARwY','version','936525dBqjvE','unref','stable','lastCheck','\x0aUpdate\x20available:\x20'];a216_0x7e53=function(){return _0x3d5434;};return a216_0x7e53();}const CACHE_DURATION_MS=0x18*0x3c*0x3c*0x3e8,NPM_REGISTRY_BASE=a216_0x3755c3(0xec),TIMEOUT_MS=0x7d0,stableVersionCache=createGlobalCache(a216_0x3755c3(0xda),'utils/version-check'),nextVersionCache=createGlobalCache('last_version_check_next','utils/version-check-next');function getCacheForChannel(_0x2d2c27){return _0x2d2c27==='next'?nextVersionCache:stableVersionCache;}function readCache(_0x58cead){return getCacheForChannel(_0x58cead)['read']()??null;}function a216_0x2901(_0x1e10dd,_0x4efcea){_0x1e10dd=_0x1e10dd-0xc7;const _0x7e53=a216_0x7e53();let _0x29014c=_0x7e53[_0x1e10dd];return _0x29014c;}function writeCache(_0x2ae2d7,_0x379cd6){const _0x5a6b28=a216_0x3755c3;try{getCacheForChannel(_0x379cd6)['write']({'lastCheck':new Date()[_0x5a6b28(0xe2)](),'latestVersion':_0x2ae2d7});}catch{}}function isCacheValid(_0x32ba74){const _0x59345b=a216_0x3755c3;if(!_0x32ba74)return![];const _0x3379f8=new Date(_0x32ba74[_0x59345b(0xd7)])['getTime'](),_0x1a4b3d=Date['now']();return _0x1a4b3d-_0x3379f8<CACHE_DURATION_MS;}export function fetchLatestVersion(_0xe50d32=a216_0x3755c3(0xd6)){const _0x476f7=a216_0x3755c3,_0x175a55=_0xe50d32===_0x476f7(0xea)?_0x476f7(0xea):'latest',_0x5aea62=NPM_REGISTRY_BASE+'/'+_0x175a55;return new Promise((_0x74e156,_0x120296)=>{const _0x15e72f=_0x476f7,_0x247063=get(_0x5aea62,{'timeout':TIMEOUT_MS},_0x520e4a=>{const _0x2c6655=a216_0x2901;if(_0x520e4a[_0x2c6655(0xe3)]!==0xc8){clearTimeout(_0x5a246c),_0x120296(new Error('HTTP\x20'+_0x520e4a['statusCode']));return;}let _0x35570e='';_0x520e4a['on']('data',_0x5e8114=>{_0x35570e+=_0x5e8114;}),_0x520e4a['on'](_0x2c6655(0xd1),()=>{const _0x148224=_0x2c6655;clearTimeout(_0x5a246c);try{const _0x2b4598=JSON[_0x148224(0xdb)](_0x35570e);if(!valid(_0x2b4598[_0x148224(0xd3)])){_0x120296(new Error('Invalid\x20version\x20format'));return;}_0x74e156(_0x2b4598[_0x148224(0xd3)]);}catch(_0x15175a){_0x120296(_0x15175a);}});})['on']('error',_0x5e9a75=>{clearTimeout(_0x5a246c),_0x120296(_0x5e9a75);});_0x247063['on']('socket',_0x4b83be=>{const _0x186abe=a216_0x2901;_0x4b83be[_0x186abe(0xd5)]();});const _0x5a246c=setTimeout(()=>{const _0x33eb32=a216_0x2901;_0x247063[_0x33eb32(0xe0)](),_0x120296(new Error(_0x33eb32(0xe4)));},TIMEOUT_MS);_0x5a246c[_0x15e72f(0xd5)]();});}export async function checkForUpdate(_0x280676,_0x2253be=a216_0x3755c3(0xd6)){const _0x49550d=a216_0x3755c3;try{const _0x46fe26=readCache(_0x2253be);if(isCacheValid(_0x46fe26)){const _0xe23013=gt(_0x46fe26[_0x49550d(0xca)],_0x280676);return{'updateAvailable':_0xe23013,'currentVersion':_0x280676,'latestVersion':_0x46fe26[_0x49550d(0xca)],'channel':_0x2253be};}const _0x1a8906=await fetchLatestVersion(_0x2253be);writeCache(_0x1a8906,_0x2253be);const _0x3ea0e8=gt(_0x1a8906,_0x280676);return{'updateAvailable':_0x3ea0e8,'currentVersion':_0x280676,'latestVersion':_0x1a8906,'channel':_0x2253be};}catch{return null;}}export function displayUpdateNotification(_0x37445a){const _0x537951=a216_0x3755c3;if(!_0x37445a['updateAvailable'])return;const _0xde32cb=_0x37445a[_0x537951(0xe7)]==='next'?'tdx\x20upgrade\x20--next':_0x537951(0xe1),_0xab798c=process['stderr'][_0x537951(0xcf)]&&!process.env.NO_COLOR,_0x394ea8=_0xab798c?a216_0x5abd90[_0x537951(0xce)]('→'):'→',_0x26b8be=_0xab798c?a216_0x5abd90[_0x537951(0xdd)](_0x37445a[_0x537951(0xc9)]):_0x37445a[_0x537951(0xc9)],_0x5a7def=_0xab798c?a216_0x5abd90[_0x537951(0xe6)](_0x37445a[_0x537951(0xca)]):_0x37445a[_0x537951(0xca)],_0x33cfd6=_0xab798c?a216_0x5abd90[_0x537951(0xc7)](_0xde32cb):_0xde32cb,_0x359489=_0xab798c?'\x0a'+a216_0x5abd90[_0x537951(0xcc)]('Update\x20available:')+'\x20'+_0x26b8be+'\x20'+_0x394ea8+'\x20'+_0x5a7def+'\x0a'+a216_0x5abd90[_0x537951(0xdd)](_0x537951(0xd9))+'\x20'+_0x33cfd6+'\x0a':_0x537951(0xd8)+_0x26b8be+'\x20'+_0x394ea8+'\x20'+_0x5a7def+_0x537951(0xe9)+_0x33cfd6+'\x0a';process[_0x537951(0xd0)][_0x537951(0xe8)](_0x359489);}
|