@treasuredata/tdx 2026.3.7 → 2026.3.8
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-command.js.map +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/profile-command.js +1 -1
- package/dist/commands/profiles-command.d.ts.map +1 -1
- package/dist/commands/profiles-command.js +1 -1
- package/dist/commands/profiles-command.js.map +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.d.ts.map +1 -1
- package/dist/commands/user-command.js +1 -1
- package/dist/commands/user-command.js.map +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/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 a206_0x4db3d2=a206_0x4e6b;(function(_0x4d86e2,_0x3c790a){const _0x3349d3=a206_0x4e6b,_0x564e32=_0x4d86e2();while(!![]){try{const _0x407b50=-parseInt(_0x3349d3(0x1f0))/0x1+-parseInt(_0x3349d3(0x1f7))/0x2+parseInt(_0x3349d3(0x220))/0x3*(-parseInt(_0x3349d3(0x1fe))/0x4)+parseInt(_0x3349d3(0x217))/0x5+-parseInt(_0x3349d3(0x213))/0x6*(parseInt(_0x3349d3(0x20e))/0x7)+-parseInt(_0x3349d3(0x1fd))/0x8+parseInt(_0x3349d3(0x1f6))/0x9*(parseInt(_0x3349d3(0x210))/0xa);if(_0x407b50===_0x3c790a)break;else _0x564e32['push'](_0x564e32['shift']());}catch(_0x110aee){_0x564e32['push'](_0x564e32['shift']());}}}(a206_0x5057,0x5edf4));import{execSync,spawn}from'node:child_process';const SHELL_NAMES=new Set([a206_0x4db3d2(0x22d),a206_0x4db3d2(0x1f8),'sh',a206_0x4db3d2(0x21c),a206_0x4db3d2(0x215),a206_0x4db3d2(0x20b),'csh',a206_0x4db3d2(0x203),a206_0x4db3d2(0x22e),'powershell','nu','ion',a206_0x4db3d2(0x21a),a206_0x4db3d2(0x204)]),EPHEMERAL_SHELL_SPAWNERS=new Set([a206_0x4db3d2(0x22f),a206_0x4db3d2(0x22b),a206_0x4db3d2(0x222),a206_0x4db3d2(0x202),a206_0x4db3d2(0x21f)]);function getProcessInfoWindows(_0x3c281d){const _0x5ecfad=a206_0x4db3d2;try{if(!Number[_0x5ecfad(0x1fa)](_0x3c281d)||_0x3c281d<=0x0)return null;const _0x88e817=_0x5ecfad(0x20d)+_0x3c281d+_0x5ecfad(0x219),_0x547727=execSync(_0x5ecfad(0x218)+_0x88e817+'\x22',{'encoding':_0x5ecfad(0x207),'windowsHide':!![],'stdio':[_0x5ecfad(0x1f4),_0x5ecfad(0x1f4),_0x5ecfad(0x1f4)]})['trim']();if(!_0x547727)return null;const [_0x6dc866,..._0x1d280b]=_0x547727['split'](','),_0x3697bd=parseInt(_0x6dc866,0xa),_0x55abab=_0x1d280b[_0x5ecfad(0x223)](',')[_0x5ecfad(0x212)]();if(isNaN(_0x3697bd)||!_0x55abab)return null;return{'pid':_0x3c281d,'ppid':_0x3697bd,'comm':_0x55abab[_0x5ecfad(0x200)](/\.exe$/i,'')};}catch{return null;}}function getProcessInfoPosix(_0x47f384){const _0x24dec9=a206_0x4db3d2;try{const _0x3b31b1=0x400000;if(!Number[_0x24dec9(0x1fa)](_0x47f384)||_0x47f384<=0x0||_0x47f384>_0x3b31b1)return null;const _0x116b35=execSync('ps\x20-p\x20'+_0x47f384+'\x20-o\x20ppid=,comm=',{'encoding':_0x24dec9(0x207),'stdio':_0x24dec9(0x1f4)})[_0x24dec9(0x212)](),[_0x115699,..._0x29b7c8]=_0x116b35[_0x24dec9(0x1f2)](/\s+/),_0xee3c77=parseInt(_0x115699,0xa),_0x5c4ffe=_0x29b7c8[_0x24dec9(0x223)]('\x20');if(isNaN(_0xee3c77))return null;return{'pid':_0x47f384,'ppid':_0xee3c77,'comm':_0x5c4ffe};}catch{return null;}}function getProcessInfo(_0xda7e36){const _0x4abd45=a206_0x4db3d2;if(process[_0x4abd45(0x1fb)]===_0x4abd45(0x21b))return getProcessInfoWindows(_0xda7e36);return getProcessInfoPosix(_0xda7e36);}function a206_0x5057(){const _0x328e66=['Unsupported\x20protocol:\x20','tcsh','Invalid\x20URL:\x20','Get-CimInstance\x20Win32_Process\x20-Filter\x20\x22ProcessId=','7BDakOc','which','50mtmrAW','https:','trim','2406762qhjjUk','cmd.exe','ksh','toString','51715IKyDTN','powershell.exe\x20-NoProfile\x20-NonInteractive\x20-Command\x20\x22','\x22\x20|\x20Select-Object\x20-Property\x20ParentProcessId,Name\x20|\x20ForEach-Object\x20{\x20\x22$($_.ParentProcessId),$($_.Name)\x22\x20}','elvish','win32','fish','error','pid','treasure\x20studio','6eINqiH','test','cursor','join','toLowerCase','href','start','has','ppid','http:','pop','code','ignore','bash','pwsh','claude','protocol','172919YHVnpa','where.exe','split','unref','pipe','stderr','2889279ORLwXf','603396WvumWE','zsh','exit','isInteger','platform','data','2761664VGgjqq','11900yxjeTx','xdg-open','replace','map','electron','dash','xonsh','comm','open','utf-8','kill','stdout'];a206_0x5057=function(){return _0x328e66;};return a206_0x5057();}function getBasename(_0x42999a){const _0x2f73e8=a206_0x4db3d2;return _0x42999a['replace'](/^-/,'')[_0x2f73e8(0x1f2)]('/')[_0x2f73e8(0x22a)]()?.[_0x2f73e8(0x224)]()||'';}function isShell(_0x41e6a5){const _0x148774=a206_0x4db3d2;return SHELL_NAMES[_0x148774(0x227)](getBasename(_0x41e6a5));}function isEphemeralShellSpawner(_0x182c48){const _0x29b2c9=a206_0x4db3d2;return EPHEMERAL_SHELL_SPAWNERS[_0x29b2c9(0x227)](getBasename(_0x182c48));}let cachedShellPID;function findShellPID(){const _0x4c8c98=a206_0x4db3d2;if(process[_0x4c8c98(0x228)]===undefined)return process[_0x4c8c98(0x21e)];let _0x5bf744=process['ppid'];const _0x269980=0xa;let _0xdffe73=0x0;while(_0xdffe73<_0x269980){const _0xaca642=getProcessInfo(_0x5bf744);if(!_0xaca642)break;if(isShell(_0xaca642['comm'])){const _0x41c193=getProcessInfo(_0xaca642[_0x4c8c98(0x228)]);if(_0x41c193&&isEphemeralShellSpawner(_0x41c193[_0x4c8c98(0x205)])){_0x5bf744=_0xaca642['ppid'],_0xdffe73++;continue;}return _0xaca642['pid'];}if(_0xaca642[_0x4c8c98(0x228)]===0x0||_0xaca642[_0x4c8c98(0x228)]===0x1){if(isShell(_0xaca642['comm']))return _0xaca642[_0x4c8c98(0x21e)];break;}_0x5bf744=_0xaca642[_0x4c8c98(0x228)],_0xdffe73++;}return process[_0x4c8c98(0x228)]!==undefined?process['ppid']:process[_0x4c8c98(0x21e)];}export function getPPID(){return cachedShellPID===undefined&&(cachedShellPID=findShellPID()),cachedShellPID;}export function clearPPIDCache(){cachedShellPID=undefined;}export function isProcessRunning(_0x998cce){const _0x445070=a206_0x4db3d2;if(!Number['isInteger'](_0x998cce)||_0x998cce<=0x0)return![];try{return process[_0x445070(0x208)](_0x998cce,0x0),!![];}catch{return![];}}export function openBrowser(_0x4caa62){const _0x6b2162=a206_0x4db3d2;let _0x406f6;try{_0x406f6=new URL(_0x4caa62);}catch{throw new Error(_0x6b2162(0x20c)+_0x4caa62);}if(_0x406f6[_0x6b2162(0x1ef)]!==_0x6b2162(0x229)&&_0x406f6[_0x6b2162(0x1ef)]!==_0x6b2162(0x211))throw new Error(_0x6b2162(0x20a)+_0x406f6['protocol']);const _0x519289=_0x406f6[_0x6b2162(0x225)],_0x404fc3=process['platform'];if(_0x404fc3===_0x6b2162(0x21b))spawn(_0x6b2162(0x214),['/c',_0x6b2162(0x226),'',_0x519289],{'detached':!![],'stdio':_0x6b2162(0x22c)})[_0x6b2162(0x1f3)]();else{const _0x1155d8=_0x404fc3==='darwin'?_0x6b2162(0x206):_0x6b2162(0x1ff);spawn(_0x1155d8,[_0x519289],{'detached':!![],'stdio':_0x6b2162(0x22c)})[_0x6b2162(0x1f3)]();}}function a206_0x4e6b(_0x179b1f,_0x50aeb3){_0x179b1f=_0x179b1f-0x1ef;const _0x505782=a206_0x5057();let _0x4e6bc5=_0x505782[_0x179b1f];return _0x4e6bc5;}export function isWindows(){const _0x59407d=a206_0x4db3d2;return process[_0x59407d(0x1fb)]==='win32';}export function getCrossSpawnOptions(_0x304cfc){return{..._0x304cfc??{},'shell':isWindows()};}export function escapeWindowsArg(_0x539bf3){const _0xb9820c=a206_0x4db3d2;if(!/[ \t"&|<>^%!`\r\n]/[_0xb9820c(0x221)](_0x539bf3))return _0x539bf3;const _0x455e64=_0x539bf3[_0xb9820c(0x200)](/"/g,'\x22\x22');return'\x22'+_0x455e64+'\x22';}export function crossSpawn(_0x25d30a,_0x7256c8,_0x49d799){const _0x3b2d8e=a206_0x4db3d2;if(isWindows()){const _0x38b0f1=escapeWindowsArg(_0x25d30a),_0x4b3ac6=_0x7256c8[_0x3b2d8e(0x201)](escapeWindowsArg),_0x50c574=[_0x38b0f1,..._0x4b3ac6][_0x3b2d8e(0x223)]('\x20');return spawn(_0x50c574,[],{..._0x49d799,'shell':!![]});}return spawn(_0x25d30a,_0x7256c8,{..._0x49d799,'shell':![]});}export function gracefulExit(_0x55a97f=0x0){const _0x599447=a206_0x4db3d2;isWindows()?setTimeout(()=>process[_0x599447(0x1f9)](_0x55a97f),0x32):process[_0x599447(0x1f9)](_0x55a97f);}export function findExecutable(_0x1680e5,_0x5c0904=0x1388){return new Promise(_0x4443e6=>{const _0x5881e9=a206_0x4e6b,_0x22ede8=isWindows()?_0x5881e9(0x1f1):_0x5881e9(0x20f);let _0x341322=![];const _0x46e417=crossSpawn(_0x22ede8,[_0x1680e5],{'stdio':_0x5881e9(0x1f4),'shell':isWindows()}),_0x1a26c8=setTimeout(()=>{!_0x341322&&(_0x341322=!![],_0x46e417['kill'](),_0x4443e6(null));},_0x5c0904);let _0x3944d='';_0x46e417[_0x5881e9(0x209)]?.['on'](_0x5881e9(0x1fc),_0x4efd54=>{const _0x25ca40=_0x5881e9;_0x3944d+=_0x4efd54[_0x25ca40(0x216)]();}),_0x46e417[_0x5881e9(0x1f5)]?.['on'](_0x5881e9(0x1fc),()=>{}),_0x46e417['on']('exit',_0x508f42=>{const _0x139697=_0x5881e9;if(_0x341322)return;_0x341322=!![],clearTimeout(_0x1a26c8);if(_0x508f42===0x0&&_0x3944d['trim']()){const _0x4e9d7c=_0x3944d[_0x139697(0x212)]()[_0x139697(0x1f2)](/\r?\n/)[0x0];_0x4443e6(_0x4e9d7c);}else _0x4443e6(null);}),_0x46e417['on'](_0x5881e9(0x21d),()=>{if(_0x341322)return;_0x341322=!![],clearTimeout(_0x1a26c8),_0x4443e6(null);});});}
|
package/dist/utils/prompt.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5468a2,_0x4c21c9){const _0x5179d1=a207_0x4ea0,_0x13bb69=_0x5468a2();while(!![]){try{const _0x3d47d9=parseInt(_0x5179d1(0x1d7))/0x1+-parseInt(_0x5179d1(0x1d1))/0x2+parseInt(_0x5179d1(0x1c1))/0x3*(-parseInt(_0x5179d1(0x1d3))/0x4)+parseInt(_0x5179d1(0x1d0))/0x5*(-parseInt(_0x5179d1(0x1d8))/0x6)+parseInt(_0x5179d1(0x1c8))/0x7+parseInt(_0x5179d1(0x1d4))/0x8*(-parseInt(_0x5179d1(0x1bf))/0x9)+parseInt(_0x5179d1(0x1d2))/0xa*(parseInt(_0x5179d1(0x1cd))/0xb);if(_0x3d47d9===_0x4c21c9)break;else _0x13bb69['push'](_0x13bb69['shift']());}catch(_0x553f13){_0x13bb69['push'](_0x13bb69['shift']());}}}(a207_0x10da,0x31eea));import*as a207_0x1fa554 from'readline';function a207_0x10da(){const _0x40038a=['108vQXJKq','440sKsRYx','toLowerCase','data','370083tqhEZC','2316zZygWl','19062zYvWph','question','18231ukvOFN','write','isTTY','resume','stdin','removeListener','stderr','1642676PWssaK','setRawMode','\x20(y/N):\x20','pause','stdout','83809mJrIqI','utf8','setEncoding','1570PaiwQY','12150oypRRS','10aPrIpj'];a207_0x10da=function(){return _0x40038a;};return a207_0x10da();}import{gracefulExit}from'./process.js';export function isInteractive(){return process['stdin']['isTTY']===!![];}function a207_0x4ea0(_0x5cbbb4,_0x2570f6){_0x5cbbb4=_0x5cbbb4-0x1bf;const _0x10da30=a207_0x10da();let _0x4ea089=_0x10da30[_0x5cbbb4];return _0x4ea089;}export async function confirm(_0x1b9819){const _0x43c32a=a207_0x4ea0,_0x4b0ad7=a207_0x1fa554['createInterface']({'input':process[_0x43c32a(0x1c5)],'output':process[_0x43c32a(0x1cc)]});return new Promise(_0x2df559=>{const _0x27eb7c=_0x43c32a;_0x4b0ad7[_0x27eb7c(0x1c0)](_0x1b9819+_0x27eb7c(0x1ca),_0x284669=>{const _0x317dd0=_0x27eb7c;_0x4b0ad7['close'](),_0x2df559(_0x284669[_0x317dd0(0x1d5)]()==='y'||_0x284669['toLowerCase']()==='yes');});});}export async function confirmKey(_0x33f067){const _0x2fc12f=a207_0x4ea0;if(!process[_0x2fc12f(0x1c5)][_0x2fc12f(0x1c3)])return![];return process[_0x2fc12f(0x1c7)]['write'](_0x33f067+'\x20[y/N]\x20'),new Promise(_0x368785=>{const _0x1f1d9d=_0x2fc12f,_0x1df520=process[_0x1f1d9d(0x1c5)];_0x1df520[_0x1f1d9d(0x1c9)](!![]),_0x1df520[_0x1f1d9d(0x1c4)](),_0x1df520[_0x1f1d9d(0x1cf)](_0x1f1d9d(0x1ce));const _0x24be80=_0x889c5c=>{const _0x52c9b8=_0x1f1d9d;_0x1df520[_0x52c9b8(0x1c9)](![]),_0x1df520[_0x52c9b8(0x1cb)](),_0x1df520[_0x52c9b8(0x1c6)](_0x52c9b8(0x1d6),_0x24be80);if(_0x889c5c==='\x1b'){process[_0x52c9b8(0x1c7)][_0x52c9b8(0x1c2)]('\x0a'),_0x368785(![]);return;}_0x889c5c==='\x03'&&(process[_0x52c9b8(0x1c7)]['write']('\x0a'),gracefulExit(0x82));if(_0x889c5c['toLowerCase']()==='y'){process[_0x52c9b8(0x1c7)][_0x52c9b8(0x1c2)]('y\x0a'),_0x368785(!![]);return;}process['stderr']['write']('\x0a'),_0x368785(![]);};_0x1df520['on'](_0x1f1d9d(0x1d6),_0x24be80);});}
|
package/dist/utils/spinner.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x19505c,_0x34d44b){const _0x51dc8d=a208_0x59f8,_0x327e2f=_0x19505c();while(!![]){try{const _0x41e3c4=-parseInt(_0x51dc8d(0x117))/0x1+-parseInt(_0x51dc8d(0x115))/0x2+-parseInt(_0x51dc8d(0x112))/0x3+-parseInt(_0x51dc8d(0x107))/0x4+-parseInt(_0x51dc8d(0x11a))/0x5*(parseInt(_0x51dc8d(0x10e))/0x6)+parseInt(_0x51dc8d(0x11b))/0x7+parseInt(_0x51dc8d(0x116))/0x8*(parseInt(_0x51dc8d(0x110))/0x9);if(_0x41e3c4===_0x34d44b)break;else _0x327e2f['push'](_0x327e2f['shift']());}catch(_0x831ccc){_0x327e2f['push'](_0x327e2f['shift']());}}}(a208_0x3ad3,0x6d38f));import a208_0x39ce83 from'ora';import{isWindows}from'./process.js';const windowsSpinner={'interval':0x3e8,'frames':['•']};function a208_0x59f8(_0xaf0f8b,_0x17f7df){_0xaf0f8b=_0xaf0f8b-0x106;const _0x3ad33c=a208_0x3ad3();let _0x59f834=_0x3ad33c[_0xaf0f8b];return _0x59f834;}export function createCommandSpinner(_0x49ff20,_0x1ce7d2={}){const _0x258eff=a208_0x59f8,{verbose:verbose=![],forceEnabled:forceEnabled=![]}=_0x1ce7d2;return a208_0x39ce83({'text':_0x49ff20,'color':'cyan','stream':process[_0x258eff(0x118)],'isEnabled':forceEnabled||process[_0x258eff(0x118)]['isTTY']&&!verbose,...isWindows()&&{'spinner':windowsSpinner}});}export async function withSpinner(_0x5ab4a2,_0x4296e1,_0x9002eb={}){const _0x342db1=a208_0x59f8,_0x57b888=_0x9002eb['clock']??(()=>Date[_0x342db1(0x114)]()),_0x27a2d8=createCommandSpinner(_0x5ab4a2,_0x9002eb);_0x27a2d8[_0x342db1(0x10f)]();const _0x28d56a=_0x57b888();try{const _0xb16768=await _0x4296e1(),_0x25759e=_0x57b888()-_0x28d56a;return _0x27a2d8[_0x342db1(0x11d)](),{'data':_0xb16768,'elapsedMs':_0x25759e};}catch(_0x17ab1d){_0x27a2d8['stop']();throw _0x17ab1d;}}export async function withProgressSpinner(_0x5974db,_0x189b7c,_0x2c9922={}){const _0x34238b=a208_0x59f8,_0x546e01=_0x2c9922[_0x34238b(0x111)]??(()=>Date[_0x34238b(0x114)]()),_0x2cde0b=_0x2c9922[_0x34238b(0x10a)]??setInterval,_0x54f34b=createCommandSpinner(_0x5974db,_0x2c9922);_0x54f34b['start']();const _0x4dd86c=_0x546e01(),_0x203698=_0x5974db['replace'](_0x34238b(0x106),'')['trim']()||'Processing',_0x2f153c={};let _0x399a16=_0x5974db;const _0x16b047=()=>{const _0x512093=_0x34238b;if(!_0x54f34b[_0x512093(0x10d)])return;const _0x83fb21=_0x546e01()-_0x4dd86c,_0x49dec2=formatElapsed(_0x83fb21),_0x3bf016=_0x2f153c['phase']?.['trim']()||_0x203698,_0x40ad95=_0x2f153c[_0x512093(0x11c)]?'\x20[Job\x20ID:\x20'+_0x2f153c[_0x512093(0x11c)]+']':'',_0x3f7203=_0x2f153c[_0x512093(0x119)]?'\x20'+_0x2f153c['extra']:'',_0x1a2d58=_0x3bf016+'\x20'+_0x49dec2+_0x3f7203+_0x40ad95;_0x1a2d58!==_0x399a16&&_0x1a2d58[_0x512093(0x10c)]()&&(_0x54f34b['text']=_0x1a2d58,_0x399a16=_0x1a2d58);},_0x30197e=_0x2cde0b(()=>{_0x16b047();},0x3e8),_0x3218a2={'setPhase':_0x36e372=>{const _0xe2f196=_0x34238b;_0x2f153c[_0xe2f196(0x113)]=_0x36e372;const _0x22ba4d=_0x36e372?.[_0xe2f196(0x10c)]()||_0x203698,_0x3e441b=_0x546e01()-_0x4dd86c,_0xc0dbab=formatElapsed(_0x3e441b),_0x1b568b=_0x2f153c['jobId']?_0xe2f196(0x109)+_0x2f153c[_0xe2f196(0x11c)]+']':'',_0x50e8aa=_0x2f153c[_0xe2f196(0x119)]?'\x20'+_0x2f153c[_0xe2f196(0x119)]:'',_0x43101e=_0x22ba4d+'\x20'+_0xc0dbab+_0x50e8aa+_0x1b568b;_0x54f34b['isSpinning']&&_0x43101e[_0xe2f196(0x10c)]()&&(_0x54f34b['text']=_0x43101e,_0x399a16=_0x43101e);},'setJobId':_0x4e5e53=>{_0x2f153c['jobId']=_0x4e5e53,_0x16b047();},'setExtra':_0x553e0b=>{_0x2f153c['extra']=_0x553e0b,_0x16b047();}};_0x16b047();try{const _0x297e30=await _0x189b7c(_0x3218a2),_0x461c92=_0x546e01()-_0x4dd86c;return{'data':_0x297e30,'elapsedMs':_0x461c92};}finally{clearInterval(_0x30197e),_0x54f34b['stop']();}}export function formatElapsed(_0x3a3c07){const _0x2fd2c5=a208_0x59f8,_0x38ce46=Math['floor'](_0x3a3c07/0x3e8);if(_0x38ce46<0x3c)return(_0x3a3c07/0x3e8)[_0x2fd2c5(0x108)](0x1)+'s';const _0x4d194a=Math[_0x2fd2c5(0x10b)](_0x38ce46/0x3c),_0x552ece=_0x38ce46%0x3c;if(_0x4d194a<0x3c)return _0x4d194a+'m\x20'+_0x552ece+'s';const _0xc96270=Math[_0x2fd2c5(0x10b)](_0x4d194a/0x3c),_0x4b0589=_0x4d194a%0x3c;return _0xc96270+'h\x20'+_0x4b0589+'m';}function a208_0x3ad3(){const _0x51212b=['164539vUlEzL','stderr','extra','1175mHEqOg','4609766ZBowtf','jobId','stop','...','2401292iadnpy','toFixed','\x20[Job\x20ID:\x20','intervalFactory','floor','trim','isSpinning','5598IwIDTN','start','108gMOxqd','clock','1751856jhIQRQ','phase','now','408084cHtBSj','1040632kQeTIi'];a208_0x3ad3=function(){return _0x51212b;};return a208_0x3ad3();}
|
package/dist/utils/sse-parser.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x47da69,_0x188563){const _0x1ce2d6=a209_0x4e2a,_0x170988=_0x47da69();while(!![]){try{const _0x1fafc4=parseInt(_0x1ce2d6(0x8b))/0x1+-parseInt(_0x1ce2d6(0x9e))/0x2+-parseInt(_0x1ce2d6(0x93))/0x3+-parseInt(_0x1ce2d6(0xa2))/0x4*(parseInt(_0x1ce2d6(0x9a))/0x5)+-parseInt(_0x1ce2d6(0x8d))/0x6+parseInt(_0x1ce2d6(0x92))/0x7*(parseInt(_0x1ce2d6(0x90))/0x8)+parseInt(_0x1ce2d6(0x94))/0x9*(parseInt(_0x1ce2d6(0x9b))/0xa);if(_0x1fafc4===_0x188563)break;else _0x170988['push'](_0x170988['shift']());}catch(_0x152328){_0x170988['push'](_0x170988['shift']());}}}(a209_0x5266,0xba3da));function a209_0x4e2a(_0x533797,_0x439c7d){_0x533797=_0x533797-0x8b;const _0x5266b5=a209_0x5266();let _0x4e2a52=_0x5266b5[_0x533797];return _0x4e2a52;}export async function*parseSSEStream(_0xac2f13,_0x44cc48){const _0x293ea3=a209_0x4e2a;if(!_0xac2f13[_0x293ea3(0xa4)])throw new Error(_0x293ea3(0xa3));const _0x19c49b=_0xac2f13[_0x293ea3(0xa4)][_0x293ea3(0x98)](),_0x246484=new TextDecoder();let _0x434757='',_0x69dc17={};try{while(!![]){const {done:_0x4f88e7,value:_0x566974}=await _0x19c49b[_0x293ea3(0x8c)]();if(_0x4f88e7){if(_0x69dc17[_0x293ea3(0x8e)]){_0x44cc48?.['debug'](_0x293ea3(0x91)+_0x69dc17[_0x293ea3(0x8e)]);const _0x284d3d=parseSSEData(_0x69dc17['data']);yield _0x284d3d;}break;}_0x434757+=_0x246484[_0x293ea3(0x9f)](_0x566974,{'stream':!![]});const _0x4cf94a=_0x434757[_0x293ea3(0x95)]('\x0a');_0x434757=_0x4cf94a[_0x293ea3(0x97)]()||'';for(const _0x1a56aa of _0x4cf94a){if(_0x1a56aa[_0x293ea3(0x99)]()===''){if(_0x69dc17[_0x293ea3(0x8e)]){_0x44cc48?.[_0x293ea3(0x8f)](_0x293ea3(0x91)+_0x69dc17[_0x293ea3(0x8e)]);const _0x4828e9=parseSSEData(_0x69dc17[_0x293ea3(0x8e)]);yield _0x4828e9,_0x69dc17={};}continue;}if(_0x1a56aa[_0x293ea3(0xa0)](':'))continue;const _0x1f2eb5=_0x1a56aa['indexOf'](':');if(_0x1f2eb5===-0x1)continue;const _0x284b7c=_0x1a56aa[_0x293ea3(0xa1)](0x0,_0x1f2eb5);let _0x4d5b53=_0x1a56aa[_0x293ea3(0xa1)](_0x1f2eb5+0x1);_0x4d5b53[_0x293ea3(0xa0)]('\x20')&&(_0x4d5b53=_0x4d5b53[_0x293ea3(0xa1)](0x1));switch(_0x284b7c){case _0x293ea3(0x9d):_0x69dc17[_0x293ea3(0x9d)]=_0x4d5b53;break;case'data':_0x69dc17[_0x293ea3(0x8e)]=_0x69dc17['data']?_0x69dc17[_0x293ea3(0x8e)]+'\x0a'+_0x4d5b53:_0x4d5b53;break;case'id':_0x69dc17['id']=_0x4d5b53;break;}}}}finally{_0x19c49b['releaseLock']();}}function a209_0x5266(){const _0xfc98c7=['15UlvOMd','1780TzdZVQ','parse','event','1356294TLUUZM','decode','startsWith','slice','1793836nuXLFA','Response\x20body\x20is\x20null','body','1305948mvSArm','read','1704246XnTXNe','data','debug','34616VXNEPC','[LLM\x20API\x20SSE]\x20','203ctRtBX','1520976eijayv','108504LtsMwy','split','Failed\x20to\x20parse\x20SSE\x20data\x20as\x20JSON:\x20','pop','getReader','trim'];a209_0x5266=function(){return _0xfc98c7;};return a209_0x5266();}function parseSSEData(_0x8d222b){const _0x1db660=a209_0x4e2a;try{return JSON[_0x1db660(0x9c)](_0x8d222b);}catch(_0x3f5e23){throw new Error(_0x1db660(0x96)+_0x8d222b,{'cause':_0x3f5e23});}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5af6df,_0x5bb470){const _0x501893=a210_0x517b,_0x38cb29=_0x5af6df();while(!![]){try{const _0x301ed5=parseInt(_0x501893(0x12b))/0x1*(-parseInt(_0x501893(0x130))/0x2)+parseInt(_0x501893(0x121))/0x3+parseInt(_0x501893(0x122))/0x4*(-parseInt(_0x501893(0x128))/0x5)+-parseInt(_0x501893(0x129))/0x6+parseInt(_0x501893(0x12c))/0x7*(parseInt(_0x501893(0x11f))/0x8)+parseInt(_0x501893(0x12e))/0x9*(-parseInt(_0x501893(0x11e))/0xa)+parseInt(_0x501893(0x133))/0xb;if(_0x301ed5===_0x5bb470)break;else _0x38cb29['push'](_0x38cb29['shift']());}catch(_0x414ba4){_0x38cb29['push'](_0x38cb29['shift']());}}}(a210_0x2ad1,0x65a86));import a210_0x3f17c1 from'string-width';export function stringWidth(_0x3a1665){return a210_0x3f17c1(_0x3a1665);}export function padEnd(_0x463b86,_0x3f0805){const _0x38d5c4=a210_0x517b,_0x4b5984=stringWidth(_0x463b86);if(_0x4b5984>=_0x3f0805)return _0x463b86;return _0x463b86+'\x20'[_0x38d5c4(0x125)](_0x3f0805-_0x4b5984);}function a210_0x517b(_0x34839a,_0x2265de){_0x34839a=_0x34839a-0x11d;const _0x2ad1cd=a210_0x2ad1();let _0x517b3b=_0x2ad1cd[_0x34839a];return _0x517b3b;}export function padStart(_0x155ade,_0x5ccf5c){const _0x11e775=stringWidth(_0x155ade);if(_0x11e775>=_0x5ccf5c)return _0x155ade;return'\x20'['repeat'](_0x5ccf5c-_0x11e775)+_0x155ade;}export function centerAlign(_0x131781,_0x3aebc4){const _0x3c0c7d=a210_0x517b,_0x1b591e=stringWidth(_0x131781);if(_0x1b591e>_0x3aebc4){if(_0x3aebc4<=0x1)return'…'[_0x3c0c7d(0x126)](0x0,_0x3aebc4);let _0x10e02f=_0x131781;while(stringWidth(_0x10e02f+'…')>_0x3aebc4){_0x10e02f=_0x10e02f[_0x3c0c7d(0x12f)](0x0,-0x1);}return _0x10e02f+'…';}if(_0x1b591e===_0x3aebc4)return _0x131781;const _0xa3282b=_0x3aebc4-_0x1b591e,_0x36ce97=Math[_0x3c0c7d(0x12a)](_0xa3282b/0x2),_0x2f48f7=_0xa3282b-_0x36ce97;return'\x20'[_0x3c0c7d(0x125)](_0x36ce97)+_0x131781+'\x20'[_0x3c0c7d(0x125)](_0x2f48f7);}export function escapeStringLiteral(_0x432ad0){const _0x201ec2=a210_0x517b;if(!_0x432ad0||_0x432ad0[_0x201ec2(0x127)]()['length']===0x0)throw new Error(_0x201ec2(0x11d));const _0x21ccb7=_0x432ad0[_0x201ec2(0x134)](/'/g,'\x27\x27');return'\x27'+_0x21ccb7+'\x27';}function a210_0x2ad1(){const _0x12793d=['repeat','substring','trim','5BmtJvG','795750zKIios','floor','158dcbWDO','807744qKPlPh','toLowerCase','1450665xJEouu','slice','2578lnaOlO','Cannot\x20build\x20LIKE\x20pattern\x20from\x20empty\x20string','padStart','2442121OffQSG','replace','length','Cannot\x20escape\x20empty\x20string\x20literal','10wbOwXX','40vKykGo','\x5c$&','1434624mcjzWm','1453268TcWUME','test','random'];a210_0x2ad1=function(){return _0x12793d;};return a210_0x2ad1();}export function globToLike(_0x1bf0e9){const _0x42dc6c=a210_0x517b;let _0x219258=_0x1bf0e9[_0x42dc6c(0x134)](/\\/g,'\x5c\x5c')[_0x42dc6c(0x134)](/%/g,'\x5c%')[_0x42dc6c(0x134)](/_/g,'\x5c_');return _0x219258=_0x219258['replace'](/\*/g,'%')['replace'](/\?/g,'_'),_0x219258;}export function buildLikePattern(_0x40af25){const _0x2e8a16=a210_0x517b;if(!_0x40af25||_0x40af25[_0x2e8a16(0x127)]()[_0x2e8a16(0x135)]===0x0)throw new Error(_0x2e8a16(0x131));const _0x2770d5=globToLike(_0x40af25),_0x7e5abd=_0x2770d5['replace'](/'/g,'\x27\x27');return'\x27'+_0x7e5abd+'\x27';}export function matchGlobPattern(_0x4a11e2,_0x39ff5d){const _0x40aee2=a210_0x517b,_0x56b71b=_0x39ff5d[_0x40aee2(0x134)](/[.+^${}()|[\]\\]/g,_0x40aee2(0x120))[_0x40aee2(0x134)](/\*/g,'.*')[_0x40aee2(0x134)](/\?/g,'.'),_0x476314=new RegExp('^'+_0x56b71b+'$');return _0x476314[_0x40aee2(0x123)](_0x4a11e2);}export function getSanitizedUsername(){const _0x5a146f=a210_0x517b,_0x2b5a01=process.env.USER||process.env.USERNAME||'unknown';return _0x2b5a01[_0x5a146f(0x134)](/[^a-zA-Z0-9]/g,'')[_0x5a146f(0x12d)]();}export function generateRandomHex(){const _0x4ccaa5=a210_0x517b,_0x434f74=Math[_0x4ccaa5(0x12a)](Math[_0x4ccaa5(0x124)]()*0xfffff);return _0x434f74['toString'](0x10)[_0x4ccaa5(0x132)](0x5,'0');}export function sanitizeFileName(_0x59ebff){const _0x5b1093=a210_0x517b;return _0x59ebff[_0x5b1093(0x12d)]()['replace'](/[/\\:*?"<>|]/g,'-')[_0x5b1093(0x134)](/\s+/g,'-')['replace'](/-+/g,'-')[_0x5b1093(0x134)](/^-|-$/g,'');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x523be8,_0x3c672e){const _0x247e33=a211_0x55e3,_0x35922a=_0x523be8();while(!![]){try{const _0x570289=-parseInt(_0x247e33(0x17c))/0x1*(-parseInt(_0x247e33(0x17e))/0x2)+parseInt(_0x247e33(0x190))/0x3*(-parseInt(_0x247e33(0x193))/0x4)+-parseInt(_0x247e33(0x191))/0x5+parseInt(_0x247e33(0x186))/0x6+parseInt(_0x247e33(0x18a))/0x7*(parseInt(_0x247e33(0x18b))/0x8)+parseInt(_0x247e33(0x180))/0x9*(parseInt(_0x247e33(0x18d))/0xa)+-parseInt(_0x247e33(0x18c))/0xb;if(_0x570289===_0x3c672e)break;else _0x35922a['push'](_0x35922a['shift']());}catch(_0xb415e5){_0x35922a['push'](_0x35922a['shift']());}}}(a211_0x45c4,0xd9a65));function hasWildcard(_0x1cb6a1){const _0x3e57eb=a211_0x55e3;return _0x1cb6a1['includes']('*')||_0x1cb6a1[_0x3e57eb(0x18e)]('?');}function a211_0x45c4(){const _0x6a160a=['trim','599724NHMayV','catalog','Wildcards\x20are\x20not\x20allowed\x20in\x20database\x20name\x20for\x20describe\x20operation','Database\x20part\x20cannot\x20be\x20empty\x20-\x20use\x20\x22*\x22\x20for\x20all\x20databases\x20(e.g.,\x20\x22*.mytable\x22)','push','database','8942652RCDakq','Invalid\x20pattern\x20format\x20-\x20too\x20many\x20dots\x20(max:\x20catalog.database.table)','split','Pattern\x20cannot\x20be\x20just\x20a\x20dot','931JwXWYP','67528zSqJYO','12381083QuUKTS','110tAVFVO','includes','Table\x20name\x20is\x20required\x20for\x20describe\x20operation','33159dchOck','6652065SYgOBN','table','292JbHVAq','length','1RtVoGT','Wildcards\x20are\x20not\x20allowed\x20in\x20table\x20name\x20for\x20describe\x20operation','1616474YQlVBW'];a211_0x45c4=function(){return _0x6a160a;};return a211_0x45c4();}export function parseTableReference(_0x2033c8){const _0x81ad4d=a211_0x55e3;if(!_0x2033c8||_0x2033c8[_0x81ad4d(0x17f)]()[_0x81ad4d(0x194)]===0x0)throw new Error('Pattern\x20cannot\x20be\x20empty\x20or\x20whitespace-only');const _0x5c4be3=_0x2033c8[_0x81ad4d(0x17f)](),_0x23e80c={'original':_0x5c4be3},_0x2f39c3=_0x5c4be3[_0x81ad4d(0x188)]('.');if(_0x2f39c3[_0x81ad4d(0x194)]===0x1){const _0x2ed1ed=_0x2f39c3[0x0];if(!_0x2ed1ed)throw new Error(_0x81ad4d(0x189));_0x23e80c['table']=_0x2ed1ed;}else{if(_0x2f39c3[_0x81ad4d(0x194)]===0x2){const [_0xf6387a,_0x59bb09]=_0x2f39c3;if(!_0xf6387a)throw new Error(_0x81ad4d(0x183));if(!_0x59bb09)throw new Error('Table\x20part\x20cannot\x20be\x20empty\x20-\x20use\x20\x22*\x22\x20for\x20all\x20tables\x20(e.g.,\x20\x22mydb.*\x22)');_0x23e80c[_0x81ad4d(0x185)]=_0xf6387a,_0x23e80c[_0x81ad4d(0x192)]=_0x59bb09;}else{if(_0x2f39c3[_0x81ad4d(0x194)]===0x3){const [_0x2553d9,_0x20cf3b,_0x463bb8]=_0x2f39c3;if(!_0x2553d9||!_0x20cf3b||!_0x463bb8)throw new Error('Invalid\x20catalog.database.table\x20format\x20-\x20all\x20parts\x20must\x20be\x20non-empty');_0x23e80c['catalog']=_0x2553d9,_0x23e80c[_0x81ad4d(0x185)]=_0x20cf3b,_0x23e80c[_0x81ad4d(0x192)]=_0x463bb8;}else throw new Error(_0x81ad4d(0x187));}}return _0x23e80c;}function a211_0x55e3(_0xd4d733,_0xc22652){_0xd4d733=_0xd4d733-0x17c;const _0x45c482=a211_0x45c4();let _0x55e346=_0x45c482[_0xd4d733];return _0x55e346;}export function formatTableReference(_0x51e1a4){const _0x1ba43d=a211_0x55e3,_0x9e4253=[];return _0x51e1a4[_0x1ba43d(0x181)]&&_0x9e4253[_0x1ba43d(0x184)](_0x51e1a4[_0x1ba43d(0x181)]),_0x51e1a4[_0x1ba43d(0x185)]&&_0x9e4253[_0x1ba43d(0x184)](_0x51e1a4[_0x1ba43d(0x185)]),_0x51e1a4[_0x1ba43d(0x192)]&&_0x9e4253[_0x1ba43d(0x184)](_0x51e1a4[_0x1ba43d(0x192)]),_0x9e4253['join']('.');}export function validateTableListReference(_0x384be8){return undefined;}export function validateTableDescribeReference(_0x27325b){const _0x4b32c0=a211_0x55e3;if(!_0x27325b[_0x4b32c0(0x192)])return _0x4b32c0(0x18f);if(_0x27325b[_0x4b32c0(0x185)]&&hasWildcard(_0x27325b[_0x4b32c0(0x185)]))return _0x4b32c0(0x182);if(hasWildcard(_0x27325b[_0x4b32c0(0x192)]))return _0x4b32c0(0x17d);return undefined;}
|
package/dist/utils/tdx-logger.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a212_0x2f4e7a=a212_0x2b07;(function(_0x548986,_0x455aa8){const _0x3b3505=a212_0x2b07,_0x3b160d=_0x548986();while(!![]){try{const _0x28d170=-parseInt(_0x3b3505(0x1da))/0x1+-parseInt(_0x3b3505(0x1e2))/0x2*(-parseInt(_0x3b3505(0x1e5))/0x3)+parseInt(_0x3b3505(0x1e3))/0x4+-parseInt(_0x3b3505(0x1e8))/0x5+-parseInt(_0x3b3505(0x1e7))/0x6*(parseInt(_0x3b3505(0x1e1))/0x7)+-parseInt(_0x3b3505(0x1e9))/0x8+parseInt(_0x3b3505(0x1d8))/0x9;if(_0x28d170===_0x455aa8)break;else _0x3b160d['push'](_0x3b160d['shift']());}catch(_0x23519e){_0x3b160d['push'](_0x3b160d['shift']());}}}(a212_0x15f0,0x99030));function a212_0x15f0(){const _0x407dbb=['error','fileHandler','info','26859fZBJVo','1240FDpGUB','4759228hDoGHk','INFO','4581CMMrAJ','shutdown','66cjTIxe','3891645FOSwhj','2319592vFTIDr','tdx.log','addHandler','trace','init','getLogPath','logFileName','consoleHandler','logs','debug','push','tdx','fileOnly','2802537ztQYnX','logDir','710719etYXvI','logLevel','logger','warn'];a212_0x15f0=function(){return _0x407dbb;};return a212_0x15f0();}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';function a212_0x2b07(_0x13ee1b,_0x205f3d){_0x13ee1b=_0x13ee1b-0x1d7;const _0x15f03e=a212_0x15f0();let _0x2b07c5=_0x15f03e[_0x13ee1b];return _0x2b07c5;}export class TDXLogger{[a212_0x2f4e7a(0x1db)];['fileOnly'];['logDir'];[a212_0x2f4e7a(0x1ef)];[a212_0x2f4e7a(0x1dc)];[a212_0x2f4e7a(0x1df)]=null;[a212_0x2f4e7a(0x1f0)]=null;constructor(_0x10135a=LogLevel[a212_0x2f4e7a(0x1e4)],_0x18ae33=![],_0x48dfe9,_0x17e5cd=a212_0x2f4e7a(0x1ea)){const _0x281478=a212_0x2f4e7a;this[_0x281478(0x1db)]=_0x10135a,this[_0x281478(0x1d7)]=_0x18ae33,this[_0x281478(0x1d9)]=_0x48dfe9||join(getGlobalCacheDir(),_0x281478(0x1f1)),this[_0x281478(0x1ef)]=_0x17e5cd,this[_0x281478(0x1dc)]=Logger['of'](_0x281478(0x1f4));}async[a212_0x2f4e7a(0x1ed)](){const _0x3a26f7=a212_0x2f4e7a,_0x334973=join(this[_0x3a26f7(0x1d9)],this['logFileName']);if(Logger['isInitialized']()){!this[_0x3a26f7(0x1d7)]&&(this['consoleHandler']=new ConsoleHandler({'minLevel':LogLevel[_0x3a26f7(0x1e4)],'colors':!![]}),Logger[_0x3a26f7(0x1eb)](this['consoleHandler']));return;}this['fileHandler']=new FileHandler({'filePath':_0x334973});const _0x3ec6a5=[this[_0x3a26f7(0x1df)]];!this['fileOnly']&&(this['consoleHandler']=new ConsoleHandler({'minLevel':LogLevel['INFO'],'colors':!![]}),_0x3ec6a5[_0x3a26f7(0x1f3)](this[_0x3a26f7(0x1f0)])),await Logger[_0x3a26f7(0x1ed)]({'defaultLevel':this['logLevel'],'handlers':_0x3ec6a5,'formatter':new DefaultLogFormatter({'colors':!![]})});}[a212_0x2f4e7a(0x1f2)](..._0x1e428f){const _0xfd488d=a212_0x2f4e7a;this[_0xfd488d(0x1dc)][_0xfd488d(0x1f2)](..._0x1e428f);}[a212_0x2f4e7a(0x1ec)](..._0x422e9d){const _0x2e716b=a212_0x2f4e7a;this[_0x2e716b(0x1dc)]['trace'](..._0x422e9d);}['info'](..._0xae3824){const _0x11e209=a212_0x2f4e7a;this[_0x11e209(0x1dc)]['info'](..._0xae3824);}['warn'](..._0x202666){const _0x3ff053=a212_0x2f4e7a;this['logger'][_0x3ff053(0x1dd)](..._0x202666);}[a212_0x2f4e7a(0x1de)](..._0x7137f2){const _0x5a16c2=a212_0x2f4e7a;this[_0x5a16c2(0x1dc)]['error'](..._0x7137f2);}async['close'](){const _0xff9d35=a212_0x2f4e7a;this['logger'][_0xff9d35(0x1e0)]('Session\x20ended'),await Logger[_0xff9d35(0x1e6)]();}[a212_0x2f4e7a(0x1ee)](){const _0x5ca929=a212_0x2f4e7a;return join(this[_0x5ca929(0x1d9)],this['logFileName']);}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a213_0x46d049=a213_0x5a46;(function(_0x580eef,_0x38044f){const _0x318c3c=a213_0x5a46,_0x164095=_0x580eef();while(!![]){try{const _0x267318=parseInt(_0x318c3c(0x11b))/0x1*(-parseInt(_0x318c3c(0x141))/0x2)+parseInt(_0x318c3c(0x11e))/0x3*(parseInt(_0x318c3c(0x143))/0x4)+-parseInt(_0x318c3c(0x12f))/0x5+parseInt(_0x318c3c(0x11a))/0x6+-parseInt(_0x318c3c(0x11d))/0x7+-parseInt(_0x318c3c(0x134))/0x8*(parseInt(_0x318c3c(0x117))/0x9)+parseInt(_0x318c3c(0x12c))/0xa*(parseInt(_0x318c3c(0x133))/0xb);if(_0x267318===_0x38044f)break;else _0x164095['push'](_0x164095['shift']());}catch(_0x3b3b3){_0x164095['push'](_0x164095['shift']());}}}(a213_0x64fe,0x53f24));function a213_0x5a46(_0x4f8066,_0x355d31){_0x4f8066=_0x4f8066-0x116;const _0x64fe9f=a213_0x64fe();let _0x5a46e6=_0x64fe9f[_0x4f8066];return _0x5a46e6;}import{get}from'https';function a213_0x64fe(){const _0x101ebb=['Invalid\x20version\x20format','48879hyWZNW','latest','last_version_check_next','3353988qKMqJl','41IDqzHG','statusCode','4051810loGtFl','15JGCLCb','data','last_version_check','Request\x20timeout','updateAvailable','utils/version-check-next','latestVersion','HTTP\x20','https://registry.npmjs.org/@treasuredata/tdx','tdx\x20upgrade\x20--next','unref','getTime','dim','gray','870ocLURb','next','version','3220680bqWVWh','isTTY','socket','cyan','168586DPkmJN','808KTGLvL','\x0aRun:\x20','lastCheck','stderr','destroy','parse','\x0aUpdate\x20available:\x20','write','tdx\x20upgrade','Update\x20available:','now','Run:','error','8088tRUUJq','utils/version-check','311028XPoJIR','currentVersion'];a213_0x64fe=function(){return _0x101ebb;};return a213_0x64fe();}import{gt,valid}from'semver';import a213_0x96268b from'chalk';import{createGlobalCache}from'./global-cache.js';const CACHE_DURATION_MS=0x18*0x3c*0x3c*0x3e8,NPM_REGISTRY_BASE=a213_0x46d049(0x126),TIMEOUT_MS=0x7d0,stableVersionCache=createGlobalCache(a213_0x46d049(0x120),a213_0x46d049(0x142)),nextVersionCache=createGlobalCache(a213_0x46d049(0x119),a213_0x46d049(0x123));function getCacheForChannel(_0x417a8d){const _0x4b7083=a213_0x46d049;return _0x417a8d===_0x4b7083(0x12d)?nextVersionCache:stableVersionCache;}function readCache(_0x2325f7){return getCacheForChannel(_0x2325f7)['read']()??null;}function writeCache(_0x2332de,_0x5afa61){const _0x31f705=a213_0x46d049;try{getCacheForChannel(_0x5afa61)[_0x31f705(0x13b)]({'lastCheck':new Date()['toISOString'](),'latestVersion':_0x2332de});}catch{}}function isCacheValid(_0x531507){const _0x27f2f8=a213_0x46d049;if(!_0x531507)return![];const _0x3f5058=new Date(_0x531507[_0x27f2f8(0x136)])[_0x27f2f8(0x129)](),_0x59bc1d=Date[_0x27f2f8(0x13e)]();return _0x59bc1d-_0x3f5058<CACHE_DURATION_MS;}export function fetchLatestVersion(_0x22a4b0='stable'){const _0xd883d=a213_0x46d049,_0x5a183a=_0x22a4b0===_0xd883d(0x12d)?_0xd883d(0x12d):_0xd883d(0x118),_0x1fc8ba=NPM_REGISTRY_BASE+'/'+_0x5a183a;return new Promise((_0x39cdcf,_0x2d9f6c)=>{const _0x340e4f=_0xd883d,_0x27e12c=get(_0x1fc8ba,{'timeout':TIMEOUT_MS},_0x5c441e=>{const _0x194055=a213_0x5a46;if(_0x5c441e[_0x194055(0x11c)]!==0xc8){clearTimeout(_0x1da971),_0x2d9f6c(new Error(_0x194055(0x125)+_0x5c441e[_0x194055(0x11c)]));return;}let _0x30adbe='';_0x5c441e['on'](_0x194055(0x11f),_0x2ae337=>{_0x30adbe+=_0x2ae337;}),_0x5c441e['on']('end',()=>{const _0x155a51=_0x194055;clearTimeout(_0x1da971);try{const _0x1f663d=JSON[_0x155a51(0x139)](_0x30adbe);if(!valid(_0x1f663d['version'])){_0x2d9f6c(new Error(_0x155a51(0x116)));return;}_0x39cdcf(_0x1f663d[_0x155a51(0x12e)]);}catch(_0x5d17db){_0x2d9f6c(_0x5d17db);}});})['on'](_0x340e4f(0x140),_0x50c216=>{clearTimeout(_0x1da971),_0x2d9f6c(_0x50c216);});_0x27e12c['on'](_0x340e4f(0x131),_0x198aa2=>{const _0x4de0a1=_0x340e4f;_0x198aa2[_0x4de0a1(0x128)]();});const _0x1da971=setTimeout(()=>{const _0xfc021d=_0x340e4f;_0x27e12c[_0xfc021d(0x138)](),_0x2d9f6c(new Error(_0xfc021d(0x121)));},TIMEOUT_MS);_0x1da971[_0x340e4f(0x128)]();});}export async function checkForUpdate(_0x4ee05c,_0x43087f='stable'){const _0x3fb028=a213_0x46d049;try{const _0x3653d2=readCache(_0x43087f);if(isCacheValid(_0x3653d2)){const _0x3864f3=gt(_0x3653d2[_0x3fb028(0x124)],_0x4ee05c);return{'updateAvailable':_0x3864f3,'currentVersion':_0x4ee05c,'latestVersion':_0x3653d2[_0x3fb028(0x124)],'channel':_0x43087f};}const _0x23a7c7=await fetchLatestVersion(_0x43087f);writeCache(_0x23a7c7,_0x43087f);const _0x126856=gt(_0x23a7c7,_0x4ee05c);return{'updateAvailable':_0x126856,'currentVersion':_0x4ee05c,'latestVersion':_0x23a7c7,'channel':_0x43087f};}catch{return null;}}export function displayUpdateNotification(_0x3f28a2){const _0x4ed7f0=a213_0x46d049;if(!_0x3f28a2[_0x4ed7f0(0x122)])return;const _0x3649f4=_0x3f28a2['channel']==='next'?_0x4ed7f0(0x127):_0x4ed7f0(0x13c),_0xa68b7e=process[_0x4ed7f0(0x137)][_0x4ed7f0(0x130)]&&!process.env.NO_COLOR,_0x57d961=_0xa68b7e?a213_0x96268b[_0x4ed7f0(0x12b)]('→'):'→',_0x5f4677=_0xa68b7e?a213_0x96268b[_0x4ed7f0(0x12a)](_0x3f28a2[_0x4ed7f0(0x144)]):_0x3f28a2[_0x4ed7f0(0x144)],_0x11cdad=_0xa68b7e?a213_0x96268b['green'](_0x3f28a2['latestVersion']):_0x3f28a2[_0x4ed7f0(0x124)],_0x545019=_0xa68b7e?a213_0x96268b[_0x4ed7f0(0x132)](_0x3649f4):_0x3649f4,_0x1136db=_0xa68b7e?'\x0a'+a213_0x96268b['yellow'](_0x4ed7f0(0x13d))+'\x20'+_0x5f4677+'\x20'+_0x57d961+'\x20'+_0x11cdad+'\x0a'+a213_0x96268b[_0x4ed7f0(0x12a)](_0x4ed7f0(0x13f))+'\x20'+_0x545019+'\x0a':_0x4ed7f0(0x13a)+_0x5f4677+'\x20'+_0x57d961+'\x20'+_0x11cdad+_0x4ed7f0(0x135)+_0x545019+'\x0a';process['stderr'][_0x4ed7f0(0x13b)](_0x1136db);}
|