@treasuredata/tdx 0.25.4 → 0.25.5

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.
Files changed (183) hide show
  1. package/dist/bin.js +1 -1
  2. package/dist/build-info.json +3 -3
  3. package/dist/cli-categories.js +1 -1
  4. package/dist/cli.js +1 -1
  5. package/dist/commands/activations.js +1 -1
  6. package/dist/commands/agent-command.d.ts.map +1 -1
  7. package/dist/commands/agent-command.js +1 -1
  8. package/dist/commands/agent-command.js.map +1 -1
  9. package/dist/commands/agent-test-command.js +1 -1
  10. package/dist/commands/api-command.js +1 -1
  11. package/dist/commands/auth-command.js +1 -1
  12. package/dist/commands/chat-command.js +1 -1
  13. package/dist/commands/claude-command.js +1 -1
  14. package/dist/commands/claude-statusline-command.js +1 -1
  15. package/dist/commands/claude-usage-command.js +1 -1
  16. package/dist/commands/command.js +1 -1
  17. package/dist/commands/connection-command.js +1 -1
  18. package/dist/commands/databases.js +1 -1
  19. package/dist/commands/describe.js +1 -1
  20. package/dist/commands/engage-command.js +1 -1
  21. package/dist/commands/job-command.js +1 -1
  22. package/dist/commands/journey-command.js +1 -1
  23. package/dist/commands/journey-validate-command.js +1 -1
  24. package/dist/commands/llm-command.js +1 -1
  25. package/dist/commands/mcp-command.js +1 -1
  26. package/dist/commands/parent-segment-command.js +1 -1
  27. package/dist/commands/profile-command.js +1 -1
  28. package/dist/commands/profiles-command.js +1 -1
  29. package/dist/commands/query-command.js +1 -1
  30. package/dist/commands/schedule-command.js +1 -1
  31. package/dist/commands/segment-command.js +1 -1
  32. package/dist/commands/segment-create-command.js +1 -1
  33. package/dist/commands/segment-fields-command.js +1 -1
  34. package/dist/commands/segment-pull-command.js +1 -1
  35. package/dist/commands/segment-push-command.js +1 -1
  36. package/dist/commands/segment-update-command.js +1 -1
  37. package/dist/commands/segment-use-command.js +1 -1
  38. package/dist/commands/segment-validate-command.js +1 -1
  39. package/dist/commands/segments.js +1 -1
  40. package/dist/commands/show.js +1 -1
  41. package/dist/commands/status-command.js +1 -1
  42. package/dist/commands/tables.js +1 -1
  43. package/dist/commands/unset-command.js +1 -1
  44. package/dist/commands/use-command.js +1 -1
  45. package/dist/commands/user-command.js +1 -1
  46. package/dist/commands/workflow-command.js +1 -1
  47. package/dist/core/auth.js +1 -1
  48. package/dist/core/command-output.js +1 -1
  49. package/dist/core/config.js +1 -1
  50. package/dist/core/connection-cache.js +1 -1
  51. package/dist/core/constants.js +1 -1
  52. package/dist/core/credential-cache.js +1 -1
  53. package/dist/core/global-context.js +1 -1
  54. package/dist/core/keychain.js +1 -1
  55. package/dist/core/profile.js +1 -1
  56. package/dist/core/project-config.js +1 -1
  57. package/dist/core/session.js +1 -1
  58. package/dist/core/user-cache.js +1 -1
  59. package/dist/core/version.js +1 -1
  60. package/dist/index.js +1 -1
  61. package/dist/mcp/server.js +1 -1
  62. package/dist/mcp/tools/index.js +1 -1
  63. package/dist/mcp/tools/tdx-run.js +1 -1
  64. package/dist/mcp/tools/tdx-search.js +1 -1
  65. package/dist/mcp/utils.js +1 -1
  66. package/dist/proxy/claude-usage-tracker.js +1 -1
  67. package/dist/proxy/passthrough-server.js +1 -1
  68. package/dist/proxy/sse-usage-parser.js +1 -1
  69. package/dist/sdk/agent/agent-config.d.ts +10 -0
  70. package/dist/sdk/agent/agent-config.d.ts.map +1 -1
  71. package/dist/sdk/agent/agent-config.js +1 -1
  72. package/dist/sdk/agent/agent-config.js.map +1 -1
  73. package/dist/sdk/agent/agent-ref-parser.js +1 -1
  74. package/dist/sdk/agent/agent-yaml.d.ts +83 -4
  75. package/dist/sdk/agent/agent-yaml.d.ts.map +1 -1
  76. package/dist/sdk/agent/agent-yaml.js +1 -1
  77. package/dist/sdk/agent/agent-yaml.js.map +1 -1
  78. package/dist/sdk/agent/test/evaluator.js +1 -1
  79. package/dist/sdk/agent/test/executor.js +1 -1
  80. package/dist/sdk/agent/test/index.js +1 -1
  81. package/dist/sdk/agent/test/output.js +1 -1
  82. package/dist/sdk/agent/test/parser.js +1 -1
  83. package/dist/sdk/agent/types/agent-def.d.ts +54 -1
  84. package/dist/sdk/agent/types/agent-def.d.ts.map +1 -1
  85. package/dist/sdk/api.js +1 -1
  86. package/dist/sdk/client/cdp-api-client.js +1 -1
  87. package/dist/sdk/client/endpoints.js +1 -1
  88. package/dist/sdk/client/engage-api-client.js +1 -1
  89. package/dist/sdk/client/http-client.js +1 -1
  90. package/dist/sdk/client/llm-api-client.d.ts +89 -1
  91. package/dist/sdk/client/llm-api-client.d.ts.map +1 -1
  92. package/dist/sdk/client/llm-api-client.js +1 -1
  93. package/dist/sdk/client/llm-api-client.js.map +1 -1
  94. package/dist/sdk/client/rate-limiter.js +1 -1
  95. package/dist/sdk/client/td-api-client.js +1 -1
  96. package/dist/sdk/client/trino-api-client.js +1 -1
  97. package/dist/sdk/client/workflow-client.js +1 -1
  98. package/dist/sdk/connection-validator.js +1 -1
  99. package/dist/sdk/connection.js +1 -1
  100. package/dist/sdk/engage.js +1 -1
  101. package/dist/sdk/errors.js +1 -1
  102. package/dist/sdk/index.js +1 -1
  103. package/dist/sdk/io/index.js +1 -1
  104. package/dist/sdk/io/node-filesystem.js +1 -1
  105. package/dist/sdk/job.js +1 -1
  106. package/dist/sdk/journey.js +1 -1
  107. package/dist/sdk/llm/chat-cache.js +1 -1
  108. package/dist/sdk/llm/index.d.ts.map +1 -1
  109. package/dist/sdk/llm/index.js +1 -1
  110. package/dist/sdk/llm/index.js.map +1 -1
  111. package/dist/sdk/llm/llm-backup-utils.js +1 -1
  112. package/dist/sdk/llm/model-factors.js +1 -1
  113. package/dist/sdk/query/index.js +1 -1
  114. package/dist/sdk/query/sql-parser.js +1 -1
  115. package/dist/sdk/schedule.js +1 -1
  116. package/dist/sdk/segment/child-segment-yaml.js +1 -1
  117. package/dist/sdk/segment/fields-display.js +1 -1
  118. package/dist/sdk/segment/file-discovery.js +1 -1
  119. package/dist/sdk/segment/journey-utils.js +1 -1
  120. package/dist/sdk/segment/journey-yaml.js +1 -1
  121. package/dist/sdk/segment/parent-segment-preview.js +1 -1
  122. package/dist/sdk/segment/parent-segment-yaml.js +1 -1
  123. package/dist/sdk/segment/pull-workflow.js +1 -1
  124. package/dist/sdk/segment/push-workflow.js +1 -1
  125. package/dist/sdk/segment/resolution-context.js +1 -1
  126. package/dist/sdk/segment/segment-path-parser.js +1 -1
  127. package/dist/sdk/segment/segment-ref-parser.js +1 -1
  128. package/dist/sdk/segment/target-resolution.js +1 -1
  129. package/dist/sdk/segment/tdx-config.js +1 -1
  130. package/dist/sdk/segment/validate-files.js +1 -1
  131. package/dist/sdk/segment/yaml-validator.js +1 -1
  132. package/dist/sdk/segment.js +1 -1
  133. package/dist/sdk/types/index.d.ts +1 -1
  134. package/dist/sdk/types/index.d.ts.map +1 -1
  135. package/dist/sdk/types/index.js +1 -1
  136. package/dist/sdk/types/index.js.map +1 -1
  137. package/dist/sdk/types/llm.d.ts +176 -2
  138. package/dist/sdk/types/llm.d.ts.map +1 -1
  139. package/dist/sdk/types/progress.js +1 -1
  140. package/dist/sdk/user.js +1 -1
  141. package/dist/sdk/util/format-detector.js +1 -1
  142. package/dist/sdk/util/formatters.js +1 -1
  143. package/dist/sdk/util/index.js +1 -1
  144. package/dist/sdk/util/tree-formatter.js +1 -1
  145. package/dist/sdk/workflow/archive-validation.js +1 -1
  146. package/dist/sdk/workflow/clone-workflow.js +1 -1
  147. package/dist/sdk/workflow/index.js +1 -1
  148. package/dist/sdk/workflow/pull-workflow.js +1 -1
  149. package/dist/sdk/workflow/push-workflow.js +1 -1
  150. package/dist/sdk/workflow/tdx-config.js +1 -1
  151. package/dist/sdk/workflow/workflow-utils.js +1 -1
  152. package/dist/test-utils/command-runner.js +1 -1
  153. package/dist/test-utils/factories.js +1 -1
  154. package/dist/test-utils/fixtures.js +1 -1
  155. package/dist/test-utils/http-mock.js +1 -1
  156. package/dist/test-utils/index.js +1 -1
  157. package/dist/utils/async.js +1 -1
  158. package/dist/utils/colors.js +1 -1
  159. package/dist/utils/diff.js +1 -1
  160. package/dist/utils/file-permissions.js +1 -1
  161. package/dist/utils/global-cache.js +1 -1
  162. package/dist/utils/json-loader.js +1 -1
  163. package/dist/utils/local-cache.js +1 -1
  164. package/dist/utils/logger/formatters/default-formatter.js +1 -1
  165. package/dist/utils/logger/formatters/index.js +1 -1
  166. package/dist/utils/logger/handlers/console-handler.js +1 -1
  167. package/dist/utils/logger/handlers/file-handler.js +1 -1
  168. package/dist/utils/logger/handlers/index.js +1 -1
  169. package/dist/utils/logger/handlers/null-handler.js +1 -1
  170. package/dist/utils/logger/index.js +1 -1
  171. package/dist/utils/logger/logger.js +1 -1
  172. package/dist/utils/logger/types.js +1 -1
  173. package/dist/utils/option-validation.js +1 -1
  174. package/dist/utils/port.js +1 -1
  175. package/dist/utils/process.js +1 -1
  176. package/dist/utils/prompt.js +1 -1
  177. package/dist/utils/spinner.js +1 -1
  178. package/dist/utils/sse-parser.js +1 -1
  179. package/dist/utils/string-utils.js +1 -1
  180. package/dist/utils/table-ref-parser.js +1 -1
  181. package/dist/utils/tdx-logger.js +1 -1
  182. package/dist/utils/version-check.js +1 -1
  183. package/package.json +1 -1
@@ -1 +1 @@
1
- const a170_0x2ce39d=a170_0x3c9d;(function(_0x29db2e,_0x1cb86f){const _0x4850eb=a170_0x3c9d,_0x4bf9d5=_0x29db2e();while(!![]){try{const _0x1a9752=-parseInt(_0x4850eb(0xba))/0x1+parseInt(_0x4850eb(0xd0))/0x2*(-parseInt(_0x4850eb(0xb8))/0x3)+parseInt(_0x4850eb(0xe4))/0x4+parseInt(_0x4850eb(0xd7))/0x5*(-parseInt(_0x4850eb(0xbf))/0x6)+-parseInt(_0x4850eb(0xd4))/0x7*(parseInt(_0x4850eb(0xd1))/0x8)+-parseInt(_0x4850eb(0xdd))/0x9*(-parseInt(_0x4850eb(0xc0))/0xa)+parseInt(_0x4850eb(0xe6))/0xb;if(_0x1a9752===_0x1cb86f)break;else _0x4bf9d5['push'](_0x4bf9d5['shift']());}catch(_0x2d3908){_0x4bf9d5['push'](_0x4bf9d5['shift']());}}}(a170_0x382b,0xdd91d));import{execSync,spawn}from'node:child_process';const SHELL_NAMES=new Set([a170_0x2ce39d(0xe9),a170_0x2ce39d(0xd5),'sh','fish',a170_0x2ce39d(0xc1),'tcsh','csh',a170_0x2ce39d(0xb5),a170_0x2ce39d(0xcc),a170_0x2ce39d(0xb6),'nu',a170_0x2ce39d(0xc8),a170_0x2ce39d(0xd9),a170_0x2ce39d(0xeb)]),EPHEMERAL_SHELL_SPAWNERS=new Set(['claude',a170_0x2ce39d(0xbc),'cursor','electron',a170_0x2ce39d(0xca)]);function getProcessInfoWindows(_0x121a65){const _0x532dcf=a170_0x2ce39d;try{if(!Number[_0x532dcf(0xc3)](_0x121a65)||_0x121a65<=0x0)return null;const _0x271717='Get-CimInstance\x20Win32_Process\x20-Filter\x20\x22ProcessId='+_0x121a65+_0x532dcf(0xe2),_0x53d852=execSync(_0x532dcf(0xcb)+_0x271717+'\x22',{'encoding':_0x532dcf(0xce),'windowsHide':!![],'stdio':[_0x532dcf(0xb1),_0x532dcf(0xb1),_0x532dcf(0xb1)]})[_0x532dcf(0xd2)]();if(!_0x53d852)return null;const [_0x267d0e,..._0x27312a]=_0x53d852['split'](','),_0x3f2f43=parseInt(_0x267d0e,0xa),_0x2e16d8=_0x27312a[_0x532dcf(0xc6)](',')['trim']();if(isNaN(_0x3f2f43)||!_0x2e16d8)return null;return{'pid':_0x121a65,'ppid':_0x3f2f43,'comm':_0x2e16d8[_0x532dcf(0xe3)](/\.exe$/i,'')};}catch{return null;}}function getProcessInfoPosix(_0x3a6a22){const _0x1a5631=a170_0x2ce39d;try{const _0x52f08e=0x400000;if(!Number[_0x1a5631(0xc3)](_0x3a6a22)||_0x3a6a22<=0x0||_0x3a6a22>_0x52f08e)return null;const _0x4beb0b=execSync('ps\x20-p\x20'+_0x3a6a22+'\x20-o\x20ppid=,comm=',{'encoding':_0x1a5631(0xce),'stdio':_0x1a5631(0xb1)})['trim'](),[_0x58b879,..._0x2db5ea]=_0x4beb0b['split'](/\s+/),_0x5665f2=parseInt(_0x58b879,0xa),_0x343517=_0x2db5ea[_0x1a5631(0xc6)]('\x20');if(isNaN(_0x5665f2))return null;return{'pid':_0x3a6a22,'ppid':_0x5665f2,'comm':_0x343517};}catch{return null;}}function getProcessInfo(_0x14d095){const _0x58520c=a170_0x2ce39d;if(process[_0x58520c(0xd3)]===_0x58520c(0xda))return getProcessInfoWindows(_0x14d095);return getProcessInfoPosix(_0x14d095);}function a170_0x3c9d(_0x44ee8d,_0x505662){_0x44ee8d=_0x44ee8d-0xb1;const _0x382b11=a170_0x382b();let _0x3c9dd4=_0x382b11[_0x44ee8d];return _0x3c9dd4;}function getBasename(_0x212b20){const _0x1ffc61=a170_0x2ce39d;return _0x212b20['replace'](/^-/,'')[_0x1ffc61(0xcf)]('/')[_0x1ffc61(0xe5)]()?.[_0x1ffc61(0xb2)]()||'';}function isShell(_0x2c8cd2){const _0x3c42d8=a170_0x2ce39d;return SHELL_NAMES[_0x3c42d8(0xea)](getBasename(_0x2c8cd2));}function isEphemeralShellSpawner(_0x204066){const _0x5635da=a170_0x2ce39d;return EPHEMERAL_SHELL_SPAWNERS[_0x5635da(0xea)](getBasename(_0x204066));}let cachedShellPID;function findShellPID(){const _0x230719=a170_0x2ce39d;if(process[_0x230719(0xb7)]===undefined)return process['pid'];let _0xa141aa=process[_0x230719(0xb7)];const _0x47b73f=0xa;let _0x40a67c=0x0;while(_0x40a67c<_0x47b73f){const _0x3f4d50=getProcessInfo(_0xa141aa);if(!_0x3f4d50)break;if(isShell(_0x3f4d50[_0x230719(0xbd)])){const _0xe43e97=getProcessInfo(_0x3f4d50['ppid']);if(_0xe43e97&&isEphemeralShellSpawner(_0xe43e97[_0x230719(0xbd)])){_0xa141aa=_0x3f4d50[_0x230719(0xb7)],_0x40a67c++;continue;}return _0x3f4d50[_0x230719(0xc4)];}if(_0x3f4d50['ppid']===0x0||_0x3f4d50[_0x230719(0xb7)]===0x1){if(isShell(_0x3f4d50[_0x230719(0xbd)]))return _0x3f4d50[_0x230719(0xc4)];break;}_0xa141aa=_0x3f4d50['ppid'],_0x40a67c++;}return process[_0x230719(0xb7)]!==undefined?process['ppid']:process[_0x230719(0xc4)];}export function getPPID(){return cachedShellPID===undefined&&(cachedShellPID=findShellPID()),cachedShellPID;}export function clearPPIDCache(){cachedShellPID=undefined;}export function isProcessRunning(_0x35cdb3){const _0x406e39=a170_0x2ce39d;if(!Number[_0x406e39(0xc3)](_0x35cdb3)||_0x35cdb3<=0x0)return![];try{return process[_0x406e39(0xd8)](_0x35cdb3,0x0),!![];}catch{return![];}}export function openBrowser(_0x181010){const _0x242d5d=a170_0x2ce39d;let _0x48fb6f;try{_0x48fb6f=new URL(_0x181010);}catch{throw new Error(_0x242d5d(0xe7)+_0x181010);}if(_0x48fb6f['protocol']!==_0x242d5d(0xc7)&&_0x48fb6f[_0x242d5d(0xc9)]!==_0x242d5d(0xcd))throw new Error(_0x242d5d(0xdf)+_0x48fb6f[_0x242d5d(0xc9)]);const _0x3077be=_0x48fb6f[_0x242d5d(0xe8)],_0x3ba341=process['platform'];if(_0x3ba341===_0x242d5d(0xda))spawn(_0x242d5d(0xe0),['/c',_0x242d5d(0xc5),'',_0x3077be],{'detached':!![],'stdio':_0x242d5d(0xb4)})[_0x242d5d(0xb9)]();else{const _0x213315=_0x3ba341===_0x242d5d(0xd6)?'open':_0x242d5d(0xb3);spawn(_0x213315,[_0x3077be],{'detached':!![],'stdio':_0x242d5d(0xb4)})['unref']();}}export function isWindows(){const _0x5ea506=a170_0x2ce39d;return process[_0x5ea506(0xd3)]===_0x5ea506(0xda);}export function getCrossSpawnOptions(_0x3a3ba1){return{..._0x3a3ba1??{},'shell':isWindows()};}export function escapeWindowsArg(_0xcc626f){const _0x4113f8=a170_0x2ce39d;if(!/[ \t"&|<>^%!`\r\n]/[_0x4113f8(0xde)](_0xcc626f))return _0xcc626f;const _0x1b5850=_0xcc626f[_0x4113f8(0xe3)](/"/g,'\x22\x22');return'\x22'+_0x1b5850+'\x22';}export function crossSpawn(_0x1ed60e,_0x371f57,_0xb8e37d){const _0x2e8533=a170_0x2ce39d;if(isWindows()){const _0x2b5763=escapeWindowsArg(_0x1ed60e),_0x4501be=_0x371f57[_0x2e8533(0xec)](escapeWindowsArg),_0x30c62a=[_0x2b5763,..._0x4501be][_0x2e8533(0xc6)]('\x20');return spawn(_0x30c62a,[],{..._0xb8e37d,'shell':!![]});}return spawn(_0x1ed60e,_0x371f57,{..._0xb8e37d,'shell':![]});}function a170_0x382b(){const _0x29f623=['1230057zLbDnE','test','Unsupported\x20protocol:\x20','cmd.exe','stdout','\x22\x20|\x20Select-Object\x20-Property\x20ParentProcessId,Name\x20|\x20ForEach-Object\x20{\x20\x22$($_.ParentProcessId),$($_.Name)\x22\x20}','replace','1442964ZJjoKK','pop','34102288lyQCal','Invalid\x20URL:\x20','href','bash','has','xonsh','map','pipe','toLowerCase','xdg-open','ignore','dash','powershell','ppid','615IojXNg','unref','447473LWONnb','toString','code','comm','stderr','9723570tHMitj','20ohdklS','ksh','exit','isInteger','pid','start','join','http:','ion','protocol','treasure\x20studio','powershell.exe\x20-NoProfile\x20-NonInteractive\x20-Command\x20\x22','pwsh','https:','utf-8','split','4106Cevgwt','8hnzWMH','trim','platform','2364691udcPmi','zsh','darwin','5WOMwWC','kill','elvish','win32','where.exe','data'];a170_0x382b=function(){return _0x29f623;};return a170_0x382b();}export function gracefulExit(_0x4bfb80=0x0){const _0x9b8b65=a170_0x2ce39d;isWindows()?setImmediate(()=>process[_0x9b8b65(0xc2)](_0x4bfb80)):process[_0x9b8b65(0xc2)](_0x4bfb80);}export function findExecutable(_0x2c712a,_0x565497=0x1388){return new Promise(_0x2c16bd=>{const _0x39a6aa=a170_0x3c9d,_0x55ea24=isWindows()?_0x39a6aa(0xdb):'which';let _0x29c105=![];const _0x38e1fe=crossSpawn(_0x55ea24,[_0x2c712a],{'stdio':_0x39a6aa(0xb1),'shell':isWindows()}),_0x205ba6=setTimeout(()=>{const _0xc8bdb0=_0x39a6aa;!_0x29c105&&(_0x29c105=!![],_0x38e1fe[_0xc8bdb0(0xd8)](),_0x2c16bd(null));},_0x565497);let _0x57c188='';_0x38e1fe[_0x39a6aa(0xe1)]?.['on']('data',_0x371a3c=>{const _0x2de045=_0x39a6aa;_0x57c188+=_0x371a3c[_0x2de045(0xbb)]();}),_0x38e1fe[_0x39a6aa(0xbe)]?.['on'](_0x39a6aa(0xdc),()=>{}),_0x38e1fe['on'](_0x39a6aa(0xc2),_0x56404e=>{const _0x9b6a6e=_0x39a6aa;if(_0x29c105)return;_0x29c105=!![],clearTimeout(_0x205ba6);if(_0x56404e===0x0&&_0x57c188[_0x9b6a6e(0xd2)]()){const _0x209c1a=_0x57c188[_0x9b6a6e(0xd2)]()[_0x9b6a6e(0xcf)](/\r?\n/)[0x0];_0x2c16bd(_0x209c1a);}else _0x2c16bd(null);}),_0x38e1fe['on']('error',()=>{if(_0x29c105)return;_0x29c105=!![],clearTimeout(_0x205ba6),_0x2c16bd(null);});});}
1
+ const a170_0x55c96e=a170_0x1655;(function(_0x3fd111,_0x5dfa88){const _0x3ab4de=a170_0x1655,_0x411450=_0x3fd111();while(!![]){try{const _0x338a99=parseInt(_0x3ab4de(0x215))/0x1+parseInt(_0x3ab4de(0x1ee))/0x2*(-parseInt(_0x3ab4de(0x21a))/0x3)+parseInt(_0x3ab4de(0x200))/0x4+-parseInt(_0x3ab4de(0x20f))/0x5*(-parseInt(_0x3ab4de(0x222))/0x6)+-parseInt(_0x3ab4de(0x21e))/0x7+parseInt(_0x3ab4de(0x202))/0x8*(-parseInt(_0x3ab4de(0x205))/0x9)+parseInt(_0x3ab4de(0x221))/0xa*(parseInt(_0x3ab4de(0x228))/0xb);if(_0x338a99===_0x5dfa88)break;else _0x411450['push'](_0x411450['shift']());}catch(_0x4a44cc){_0x411450['push'](_0x411450['shift']());}}}(a170_0x4ca2,0x93606));import{execSync,spawn}from'node:child_process';const SHELL_NAMES=new Set([a170_0x55c96e(0x1ea),'zsh','sh','fish',a170_0x55c96e(0x1ec),a170_0x55c96e(0x1f5),a170_0x55c96e(0x213),a170_0x55c96e(0x204),'pwsh',a170_0x55c96e(0x217),'nu','ion',a170_0x55c96e(0x1f7),a170_0x55c96e(0x212)]),EPHEMERAL_SHELL_SPAWNERS=new Set([a170_0x55c96e(0x1f6),a170_0x55c96e(0x1f8),a170_0x55c96e(0x206),a170_0x55c96e(0x1f9),'treasure\x20studio']);function getProcessInfoWindows(_0x4a7c1d){const _0x3b26dd=a170_0x55c96e;try{if(!Number[_0x3b26dd(0x1ed)](_0x4a7c1d)||_0x4a7c1d<=0x0)return null;const _0x327cb9=_0x3b26dd(0x214)+_0x4a7c1d+_0x3b26dd(0x223),_0x555d69=execSync(_0x3b26dd(0x1fa)+_0x327cb9+'\x22',{'encoding':_0x3b26dd(0x1fe),'windowsHide':!![],'stdio':[_0x3b26dd(0x225),_0x3b26dd(0x225),'pipe']})[_0x3b26dd(0x1f4)]();if(!_0x555d69)return null;const [_0x8f8199,..._0x4b0939]=_0x555d69[_0x3b26dd(0x1ff)](','),_0x2c69a3=parseInt(_0x8f8199,0xa),_0x336353=_0x4b0939[_0x3b26dd(0x1f1)](',')[_0x3b26dd(0x1f4)]();if(isNaN(_0x2c69a3)||!_0x336353)return null;return{'pid':_0x4a7c1d,'ppid':_0x2c69a3,'comm':_0x336353['replace'](/\.exe$/i,'')};}catch{return null;}}function getProcessInfoPosix(_0x5f20c2){const _0x51b702=a170_0x55c96e;try{const _0x4d83c2=0x400000;if(!Number['isInteger'](_0x5f20c2)||_0x5f20c2<=0x0||_0x5f20c2>_0x4d83c2)return null;const _0x13711a=execSync(_0x51b702(0x21b)+_0x5f20c2+_0x51b702(0x210),{'encoding':_0x51b702(0x1fe),'stdio':'pipe'})[_0x51b702(0x1f4)](),[_0x2b3953,..._0xbb626e]=_0x13711a[_0x51b702(0x1ff)](/\s+/),_0x1dbf7c=parseInt(_0x2b3953,0xa),_0x425042=_0xbb626e[_0x51b702(0x1f1)]('\x20');if(isNaN(_0x1dbf7c))return null;return{'pid':_0x5f20c2,'ppid':_0x1dbf7c,'comm':_0x425042};}catch{return null;}}function getProcessInfo(_0x35dade){const _0xbd8759=a170_0x55c96e;if(process['platform']===_0xbd8759(0x211))return getProcessInfoWindows(_0x35dade);return getProcessInfoPosix(_0x35dade);}function getBasename(_0xb507c3){const _0xc92487=a170_0x55c96e;return _0xb507c3[_0xc92487(0x219)](/^-/,'')['split']('/')[_0xc92487(0x20c)]()?.[_0xc92487(0x209)]()||'';}function isShell(_0x43d2c4){const _0xbe7e8=a170_0x55c96e;return SHELL_NAMES[_0xbe7e8(0x207)](getBasename(_0x43d2c4));}function isEphemeralShellSpawner(_0x3ed7b7){return EPHEMERAL_SHELL_SPAWNERS['has'](getBasename(_0x3ed7b7));}let cachedShellPID;function findShellPID(){const _0x35cc83=a170_0x55c96e;if(process[_0x35cc83(0x208)]===undefined)return process['pid'];let _0x3fd619=process[_0x35cc83(0x208)];const _0x21d785=0xa;let _0x42bf15=0x0;while(_0x42bf15<_0x21d785){const _0x331ff5=getProcessInfo(_0x3fd619);if(!_0x331ff5)break;if(isShell(_0x331ff5['comm'])){const _0x480086=getProcessInfo(_0x331ff5[_0x35cc83(0x208)]);if(_0x480086&&isEphemeralShellSpawner(_0x480086[_0x35cc83(0x1fd)])){_0x3fd619=_0x331ff5['ppid'],_0x42bf15++;continue;}return _0x331ff5['pid'];}if(_0x331ff5[_0x35cc83(0x208)]===0x0||_0x331ff5['ppid']===0x1){if(isShell(_0x331ff5['comm']))return _0x331ff5[_0x35cc83(0x1eb)];break;}_0x3fd619=_0x331ff5['ppid'],_0x42bf15++;}return process[_0x35cc83(0x208)]!==undefined?process[_0x35cc83(0x208)]:process[_0x35cc83(0x1eb)];}export function getPPID(){return cachedShellPID===undefined&&(cachedShellPID=findShellPID()),cachedShellPID;}export function clearPPIDCache(){cachedShellPID=undefined;}export function isProcessRunning(_0x158a20){const _0x3e6b26=a170_0x55c96e;if(!Number[_0x3e6b26(0x1ed)](_0x158a20)||_0x158a20<=0x0)return![];try{return process[_0x3e6b26(0x1f0)](_0x158a20,0x0),!![];}catch{return![];}}export function openBrowser(_0x2d709f){const _0x170db1=a170_0x55c96e;let _0x57beb2;try{_0x57beb2=new URL(_0x2d709f);}catch{throw new Error(_0x170db1(0x1f3)+_0x2d709f);}if(_0x57beb2[_0x170db1(0x20b)]!==_0x170db1(0x20a)&&_0x57beb2[_0x170db1(0x20b)]!==_0x170db1(0x21d))throw new Error(_0x170db1(0x201)+_0x57beb2[_0x170db1(0x20b)]);const _0x43b85a=_0x57beb2[_0x170db1(0x226)],_0x47701f=process['platform'];if(_0x47701f===_0x170db1(0x211))spawn(_0x170db1(0x21c),['/c',_0x170db1(0x220),'',_0x43b85a],{'detached':!![],'stdio':_0x170db1(0x20e)})[_0x170db1(0x224)]();else{const _0x338cfb=_0x47701f===_0x170db1(0x218)?'open':_0x170db1(0x216);spawn(_0x338cfb,[_0x43b85a],{'detached':!![],'stdio':_0x170db1(0x20e)})['unref']();}}export function isWindows(){const _0x5c7d82=a170_0x55c96e;return process[_0x5c7d82(0x1f2)]===_0x5c7d82(0x211);}export function getCrossSpawnOptions(_0x4fbf25){return{..._0x4fbf25??{},'shell':isWindows()};}export function escapeWindowsArg(_0x159922){const _0x30728e=a170_0x55c96e;if(!/[ \t"&|<>^%!`\r\n]/[_0x30728e(0x1fc)](_0x159922))return _0x159922;const _0x5d6d7f=_0x159922[_0x30728e(0x219)](/"/g,'\x22\x22');return'\x22'+_0x5d6d7f+'\x22';}export function crossSpawn(_0x8a090e,_0x1b3168,_0xb68abd){const _0x27cd66=a170_0x55c96e;if(isWindows()){const _0x3e0129=escapeWindowsArg(_0x8a090e),_0x54e222=_0x1b3168[_0x27cd66(0x20d)](escapeWindowsArg),_0x547bcd=[_0x3e0129,..._0x54e222][_0x27cd66(0x1f1)]('\x20');return spawn(_0x547bcd,[],{..._0xb68abd,'shell':!![]});}return spawn(_0x8a090e,_0x1b3168,{..._0xb68abd,'shell':![]});}function a170_0x1655(_0x5c57c5,_0x4647d6){_0x5c57c5=_0x5c57c5-0x1ea;const _0x4ca29b=a170_0x4ca2();let _0x165518=_0x4ca29b[_0x5c57c5];return _0x165518;}export function gracefulExit(_0x54a4e5=0x0){const _0x299f95=a170_0x55c96e;isWindows()?setImmediate(()=>process[_0x299f95(0x21f)](_0x54a4e5)):process[_0x299f95(0x21f)](_0x54a4e5);}export function findExecutable(_0x539ad9,_0x2b59b5=0x1388){return new Promise(_0x2699de=>{const _0x42c7f6=a170_0x1655,_0x773b98=isWindows()?_0x42c7f6(0x1fb):'which';let _0x3d1429=![];const _0x3bb886=crossSpawn(_0x773b98,[_0x539ad9],{'stdio':'pipe','shell':isWindows()}),_0x4348d=setTimeout(()=>{const _0x3dc3ef=_0x42c7f6;!_0x3d1429&&(_0x3d1429=!![],_0x3bb886[_0x3dc3ef(0x1f0)](),_0x2699de(null));},_0x2b59b5);let _0x3ae744='';_0x3bb886['stdout']?.['on']('data',_0x2b9b04=>{const _0x2d07af=_0x42c7f6;_0x3ae744+=_0x2b9b04[_0x2d07af(0x203)]();}),_0x3bb886[_0x42c7f6(0x227)]?.['on']('data',()=>{}),_0x3bb886['on']('exit',_0x5b80dc=>{const _0x154228=_0x42c7f6;if(_0x3d1429)return;_0x3d1429=!![],clearTimeout(_0x4348d);if(_0x5b80dc===0x0&&_0x3ae744['trim']()){const _0x1a4599=_0x3ae744['trim']()[_0x154228(0x1ff)](/\r?\n/)[0x0];_0x2699de(_0x1a4599);}else _0x2699de(null);}),_0x3bb886['on'](_0x42c7f6(0x1ef),()=>{if(_0x3d1429)return;_0x3d1429=!![],clearTimeout(_0x4348d),_0x2699de(null);});});}function a170_0x4ca2(){const _0x5093ca=['257879KyUiLi','xdg-open','powershell','darwin','replace','171pOVzIQ','ps\x20-p\x20','cmd.exe','https:','8398999IIJPsj','exit','start','25958410EtTKvH','2514cQxHqo','\x22\x20|\x20Select-Object\x20-Property\x20ParentProcessId,Name\x20|\x20ForEach-Object\x20{\x20\x22$($_.ParentProcessId),$($_.Name)\x22\x20}','unref','pipe','href','stderr','11sVfpKZ','bash','pid','ksh','isInteger','6074ORwquF','error','kill','join','platform','Invalid\x20URL:\x20','trim','tcsh','claude','elvish','code','electron','powershell.exe\x20-NoProfile\x20-NonInteractive\x20-Command\x20\x22','where.exe','test','comm','utf-8','split','372480JAEDlL','Unsupported\x20protocol:\x20','8ormbBa','toString','dash','9376821NkBGuE','cursor','has','ppid','toLowerCase','http:','protocol','pop','map','ignore','855yFoILX','\x20-o\x20ppid=,comm=','win32','xonsh','csh','Get-CimInstance\x20Win32_Process\x20-Filter\x20\x22ProcessId='];a170_0x4ca2=function(){return _0x5093ca;};return a170_0x4ca2();}
@@ -1 +1 @@
1
- (function(_0x151c4c,_0x52eb4d){const _0x52c56a=a171_0x2034,_0x2100f8=_0x151c4c();while(!![]){try{const _0x4a4434=-parseInt(_0x52c56a(0x8c))/0x1+-parseInt(_0x52c56a(0x83))/0x2+parseInt(_0x52c56a(0x86))/0x3+parseInt(_0x52c56a(0x76))/0x4+parseInt(_0x52c56a(0x7d))/0x5+-parseInt(_0x52c56a(0x80))/0x6+parseInt(_0x52c56a(0x7e))/0x7;if(_0x4a4434===_0x52eb4d)break;else _0x2100f8['push'](_0x2100f8['shift']());}catch(_0x15a564){_0x2100f8['push'](_0x2100f8['shift']());}}}(a171_0x261f,0x5524c));function a171_0x2034(_0x4c81f5,_0x22b43d){_0x4c81f5=_0x4c81f5-0x76;const _0x261ff3=a171_0x261f();let _0x203410=_0x261ff3[_0x4c81f5];return _0x203410;}import*as a171_0x9a45a6 from'readline';function a171_0x261f(){const _0x5788a9=['962214flhVJZ','exit','isTTY','removeListener','stdout','yes','120660xHqYlW','2163580brEujS','\x20(y/N):\x20','utf8','data','createInterface','stderr','\x20[y/N]\x20','60210oIAVlh','410949pGtGLV','toLowerCase','1697364gNTxFZ','setEncoding','pause','360160uWcgia','stdin','write'];a171_0x261f=function(){return _0x5788a9;};return a171_0x261f();}export function isInteractive(){const _0x39a96d=a171_0x2034;return process[_0x39a96d(0x84)][_0x39a96d(0x88)]===!![];}export async function confirm(_0x4d04ac){const _0x2dba09=a171_0x2034,_0x526b63=a171_0x9a45a6[_0x2dba09(0x7a)]({'input':process[_0x2dba09(0x84)],'output':process[_0x2dba09(0x8a)]});return new Promise(_0x567fb1=>{const _0x2ca329=_0x2dba09;_0x526b63['question'](_0x4d04ac+_0x2ca329(0x77),_0x375321=>{const _0xb4ad40=_0x2ca329;_0x526b63['close'](),_0x567fb1(_0x375321['toLowerCase']()==='y'||_0x375321[_0xb4ad40(0x7f)]()===_0xb4ad40(0x8b));});});}export async function confirmKey(_0x4a3b81){const _0x157707=a171_0x2034;if(!process[_0x157707(0x84)][_0x157707(0x88)])return![];return process[_0x157707(0x7b)][_0x157707(0x85)](_0x4a3b81+_0x157707(0x7c)),new Promise(_0x4ba711=>{const _0x351f90=_0x157707,_0x5b6c53=process[_0x351f90(0x84)];_0x5b6c53['setRawMode'](!![]),_0x5b6c53['resume'](),_0x5b6c53[_0x351f90(0x81)](_0x351f90(0x78));const _0x16bb23=_0x28d722=>{const _0x1c0d4a=_0x351f90;_0x5b6c53['setRawMode'](![]),_0x5b6c53[_0x1c0d4a(0x82)](),_0x5b6c53[_0x1c0d4a(0x89)](_0x1c0d4a(0x79),_0x16bb23);if(_0x28d722==='\x1b'){process['stderr'][_0x1c0d4a(0x85)]('\x0a'),_0x4ba711(![]);return;}_0x28d722==='\x03'&&(process[_0x1c0d4a(0x7b)][_0x1c0d4a(0x85)]('\x0a'),process[_0x1c0d4a(0x87)](0x82));if(_0x28d722[_0x1c0d4a(0x7f)]()==='y'){process[_0x1c0d4a(0x7b)][_0x1c0d4a(0x85)]('y\x0a'),_0x4ba711(!![]);return;}process[_0x1c0d4a(0x7b)][_0x1c0d4a(0x85)]('\x0a'),_0x4ba711(![]);};_0x5b6c53['on'](_0x351f90(0x79),_0x16bb23);});}
1
+ function a171_0x59fc(_0x194c1c,_0x47fc41){_0x194c1c=_0x194c1c-0x132;const _0x5bdcfa=a171_0x5bdc();let _0x59fc95=_0x5bdcfa[_0x194c1c];return _0x59fc95;}(function(_0x4a66b6,_0x1066bb){const _0x55973c=a171_0x59fc,_0x2f7e2e=_0x4a66b6();while(!![]){try{const _0x333fda=-parseInt(_0x55973c(0x13b))/0x1*(parseInt(_0x55973c(0x13d))/0x2)+parseInt(_0x55973c(0x135))/0x3+-parseInt(_0x55973c(0x14a))/0x4+parseInt(_0x55973c(0x13a))/0x5+parseInt(_0x55973c(0x143))/0x6*(parseInt(_0x55973c(0x13c))/0x7)+-parseInt(_0x55973c(0x140))/0x8+-parseInt(_0x55973c(0x14b))/0x9;if(_0x333fda===_0x1066bb)break;else _0x2f7e2e['push'](_0x2f7e2e['shift']());}catch(_0x553e2b){_0x2f7e2e['push'](_0x2f7e2e['shift']());}}}(a171_0x5bdc,0x590d5));import*as a171_0x5b322f from'readline';export function isInteractive(){const _0xbd04b2=a171_0x59fc;return process[_0xbd04b2(0x133)][_0xbd04b2(0x132)]===!![];}export async function confirm(_0x420d24){const _0x2a2594=a171_0x59fc,_0x4ce2fd=a171_0x5b322f['createInterface']({'input':process[_0x2a2594(0x133)],'output':process[_0x2a2594(0x13f)]});return new Promise(_0xc7b022=>{const _0x31cee1=_0x2a2594;_0x4ce2fd[_0x31cee1(0x149)](_0x420d24+_0x31cee1(0x148),_0x5508e8=>{const _0x5d5a1f=_0x31cee1;_0x4ce2fd[_0x5d5a1f(0x142)](),_0xc7b022(_0x5508e8[_0x5d5a1f(0x13e)]()==='y'||_0x5508e8[_0x5d5a1f(0x13e)]()===_0x5d5a1f(0x144));});});}export async function confirmKey(_0x40f0f1){const _0x2d8179=a171_0x59fc;if(!process[_0x2d8179(0x133)][_0x2d8179(0x132)])return![];return process[_0x2d8179(0x139)][_0x2d8179(0x146)](_0x40f0f1+'\x20[y/N]\x20'),new Promise(_0x3b28ea=>{const _0x11b94b=_0x2d8179,_0x30dc80=process['stdin'];_0x30dc80[_0x11b94b(0x137)](!![]),_0x30dc80['resume'](),_0x30dc80[_0x11b94b(0x141)](_0x11b94b(0x136));const _0x72e498=_0x367967=>{const _0x13c70c=_0x11b94b;_0x30dc80[_0x13c70c(0x137)](![]),_0x30dc80[_0x13c70c(0x134)](),_0x30dc80[_0x13c70c(0x138)]('data',_0x72e498);if(_0x367967==='\x1b'){process[_0x13c70c(0x139)][_0x13c70c(0x146)]('\x0a'),_0x3b28ea(![]);return;}_0x367967==='\x03'&&(process[_0x13c70c(0x139)][_0x13c70c(0x146)]('\x0a'),process[_0x13c70c(0x147)](0x82));if(_0x367967[_0x13c70c(0x13e)]()==='y'){process[_0x13c70c(0x139)][_0x13c70c(0x146)]('y\x0a'),_0x3b28ea(!![]);return;}process['stderr'][_0x13c70c(0x146)]('\x0a'),_0x3b28ea(![]);};_0x30dc80['on'](_0x11b94b(0x145),_0x72e498);});}function a171_0x5bdc(){const _0x53119b=['yes','data','write','exit','\x20(y/N):\x20','question','817224VmcFTT','2551383pRzVac','isTTY','stdin','pause','1500675bYFytz','utf8','setRawMode','removeListener','stderr','2329605saNtcK','1WohlAj','4370226emXsNS','466260WsXLYW','toLowerCase','stdout','4038272RvTAVG','setEncoding','close','6HmCJif'];a171_0x5bdc=function(){return _0x53119b;};return a171_0x5bdc();}
@@ -1 +1 @@
1
- (function(_0x5ecabf,_0x4ea556){const _0x27e5b2=a172_0x14a3,_0x30be10=_0x5ecabf();while(!![]){try{const _0x3c6b09=-parseInt(_0x27e5b2(0xec))/0x1+-parseInt(_0x27e5b2(0xf1))/0x2+parseInt(_0x27e5b2(0xfa))/0x3*(parseInt(_0x27e5b2(0xf8))/0x4)+-parseInt(_0x27e5b2(0xfc))/0x5*(parseInt(_0x27e5b2(0xf5))/0x6)+-parseInt(_0x27e5b2(0xf6))/0x7*(parseInt(_0x27e5b2(0xf9))/0x8)+-parseInt(_0x27e5b2(0xfd))/0x9*(parseInt(_0x27e5b2(0xeb))/0xa)+parseInt(_0x27e5b2(0x107))/0xb;if(_0x3c6b09===_0x4ea556)break;else _0x30be10['push'](_0x30be10['shift']());}catch(_0x3bfd4b){_0x30be10['push'](_0x30be10['shift']());}}}(a172_0x4a77,0xe0cda));import a172_0x31dad0 from'ora';import{isWindows}from'./process.js';const windowsSpinner={'interval':0x3e8,'frames':['•']};export function createCommandSpinner(_0x77f414,_0x17f4d8={}){const _0x14ac16=a172_0x14a3,{verbose:verbose=![],forceEnabled:forceEnabled=![]}=_0x17f4d8;return a172_0x31dad0({'text':_0x77f414,'color':_0x14ac16(0xea),'stream':process[_0x14ac16(0xef)],'isEnabled':forceEnabled||process['stderr'][_0x14ac16(0xff)]&&!verbose,...isWindows()&&{'spinner':windowsSpinner}});}export async function withSpinner(_0x4e4d2b,_0x179a83,_0x47e543={}){const _0x17f2fd=a172_0x14a3,_0x4c3b4f=_0x47e543[_0x17f2fd(0x105)]??(()=>Date[_0x17f2fd(0xfe)]()),_0x24efc6=createCommandSpinner(_0x4e4d2b,_0x47e543);_0x24efc6[_0x17f2fd(0xfb)]();const _0x33d85f=_0x4c3b4f();try{const _0x1127e0=await _0x179a83(),_0x3ffd4e=_0x4c3b4f()-_0x33d85f;return _0x24efc6[_0x17f2fd(0x104)](),{'data':_0x1127e0,'elapsedMs':_0x3ffd4e};}catch(_0x311f2c){_0x24efc6[_0x17f2fd(0x104)]();throw _0x311f2c;}}export async function withProgressSpinner(_0x63cbe1,_0x399573,_0x173981={}){const _0x1b5c2f=a172_0x14a3,_0x498136=_0x173981['clock']??(()=>Date[_0x1b5c2f(0xfe)]()),_0x513664=_0x173981[_0x1b5c2f(0xf0)]??setInterval,_0x4510e0=createCommandSpinner(_0x63cbe1,_0x173981);_0x4510e0['start']();const _0x512dd1=_0x498136(),_0x5846b8=_0x63cbe1['replace'](_0x1b5c2f(0x102),'')[_0x1b5c2f(0x101)]()||_0x1b5c2f(0x106),_0x2e6588={};let _0xa36820=_0x63cbe1;const _0x58bc78=()=>{const _0x525434=_0x1b5c2f;if(!_0x4510e0[_0x525434(0x103)])return;const _0x570e51=_0x498136()-_0x512dd1,_0x40fd27=formatElapsed(_0x570e51),_0x5d64c8=_0x2e6588[_0x525434(0xee)]?.[_0x525434(0x101)]()||_0x5846b8,_0x2ad808=_0x2e6588[_0x525434(0x100)]?_0x525434(0xf7)+_0x2e6588[_0x525434(0x100)]+']':'',_0x5a6358=_0x2e6588[_0x525434(0xf2)]?'\x20'+_0x2e6588[_0x525434(0xf2)]:'',_0x4908b4=_0x5d64c8+'\x20'+_0x40fd27+_0x5a6358+_0x2ad808;_0x4908b4!==_0xa36820&&_0x4908b4[_0x525434(0x101)]()&&(_0x4510e0[_0x525434(0xed)]=_0x4908b4,_0xa36820=_0x4908b4);},_0x99ce74=_0x513664(()=>{_0x58bc78();},0x3e8),_0x44e3c3={'setPhase':_0x2daf65=>{const _0x578ec7=_0x1b5c2f;_0x2e6588[_0x578ec7(0xee)]=_0x2daf65;const _0x176db2=_0x2daf65?.[_0x578ec7(0x101)]()||_0x5846b8,_0x4f05bd=_0x498136()-_0x512dd1,_0x306ce8=formatElapsed(_0x4f05bd),_0x48cd78=_0x2e6588[_0x578ec7(0x100)]?_0x578ec7(0xf7)+_0x2e6588[_0x578ec7(0x100)]+']':'',_0x344d51=_0x2e6588[_0x578ec7(0xf2)]?'\x20'+_0x2e6588[_0x578ec7(0xf2)]:'',_0x3ad872=_0x176db2+'\x20'+_0x306ce8+_0x344d51+_0x48cd78;_0x4510e0[_0x578ec7(0x103)]&&_0x3ad872[_0x578ec7(0x101)]()&&(_0x4510e0[_0x578ec7(0xed)]=_0x3ad872,_0xa36820=_0x3ad872);},'setJobId':_0x495fd5=>{const _0x221ed5=_0x1b5c2f;_0x2e6588[_0x221ed5(0x100)]=_0x495fd5,_0x58bc78();},'setExtra':_0xe3d76e=>{_0x2e6588['extra']=_0xe3d76e,_0x58bc78();}};_0x58bc78();try{const _0x3b03ae=await _0x399573(_0x44e3c3),_0x3ae322=_0x498136()-_0x512dd1;return{'data':_0x3b03ae,'elapsedMs':_0x3ae322};}finally{clearInterval(_0x99ce74),_0x4510e0[_0x1b5c2f(0x104)]();}}function a172_0x14a3(_0x344c7e,_0x47099a){_0x344c7e=_0x344c7e-0xea;const _0x4a7786=a172_0x4a77();let _0x14a3f4=_0x4a7786[_0x344c7e];return _0x14a3f4;}export function formatElapsed(_0x3a0bd0){const _0x1e146d=a172_0x14a3,_0x479511=Math[_0x1e146d(0xf4)](_0x3a0bd0/0x3e8);if(_0x479511<0x3c)return(_0x3a0bd0/0x3e8)[_0x1e146d(0xf3)](0x1)+'s';const _0x24bb60=Math[_0x1e146d(0xf4)](_0x479511/0x3c),_0x3dfd86=_0x479511%0x3c;if(_0x24bb60<0x3c)return _0x24bb60+'m\x20'+_0x3dfd86+'s';const _0x40d383=Math[_0x1e146d(0xf4)](_0x24bb60/0x3c),_0x573409=_0x24bb60%0x3c;return _0x40d383+'h\x20'+_0x573409+'m';}function a172_0x4a77(){const _0x2518f3=['extra','toFixed','floor','6dNbvug','161AxDafx','\x20[Job\x20ID:\x20','6212392lgAbKt','303944iAnLxD','3ermojh','start','9111275ABvZIT','126KUBgjg','now','isTTY','jobId','trim','...','isSpinning','stop','clock','Processing','58588475METoYM','cyan','908380HiaQDz','708184QqtSZi','text','phase','stderr','intervalFactory','2565038OSnGdn'];a172_0x4a77=function(){return _0x2518f3;};return a172_0x4a77();}
1
+ (function(_0xfd6295,_0x24a911){const _0x5335d0=a172_0x51a1,_0x15dab9=_0xfd6295();while(!![]){try{const _0xeba978=-parseInt(_0x5335d0(0x13e))/0x1+-parseInt(_0x5335d0(0x130))/0x2+-parseInt(_0x5335d0(0x12f))/0x3*(-parseInt(_0x5335d0(0x145))/0x4)+-parseInt(_0x5335d0(0x136))/0x5*(-parseInt(_0x5335d0(0x13b))/0x6)+-parseInt(_0x5335d0(0x139))/0x7*(parseInt(_0x5335d0(0x141))/0x8)+-parseInt(_0x5335d0(0x12c))/0x9*(-parseInt(_0x5335d0(0x146))/0xa)+parseInt(_0x5335d0(0x135))/0xb;if(_0xeba978===_0x24a911)break;else _0x15dab9['push'](_0x15dab9['shift']());}catch(_0x23913a){_0x15dab9['push'](_0x15dab9['shift']());}}}(a172_0x53b5,0x7057a));import a172_0x29fa21 from'ora';function a172_0x51a1(_0x54a04b,_0x47c459){_0x54a04b=_0x54a04b-0x12c;const _0x53b5e3=a172_0x53b5();let _0x51a115=_0x53b5e3[_0x54a04b];return _0x51a115;}import{isWindows}from'./process.js';const windowsSpinner={'interval':0x3e8,'frames':['•']};export function createCommandSpinner(_0x2a39a1,_0x3bee47={}){const _0x45f323=a172_0x51a1,{verbose:verbose=![],forceEnabled:forceEnabled=![]}=_0x3bee47;return a172_0x29fa21({'text':_0x2a39a1,'color':'cyan','stream':process[_0x45f323(0x143)],'isEnabled':forceEnabled||process[_0x45f323(0x143)][_0x45f323(0x137)]&&!verbose,...isWindows()&&{'spinner':windowsSpinner}});}export async function withSpinner(_0x250bd7,_0x492f33,_0x2af714={}){const _0x54000c=a172_0x51a1,_0xc73143=_0x2af714[_0x54000c(0x13f)]??(()=>Date[_0x54000c(0x12d)]()),_0x582f19=createCommandSpinner(_0x250bd7,_0x2af714);_0x582f19[_0x54000c(0x134)]();const _0x1d209c=_0xc73143();try{const _0x624c3=await _0x492f33(),_0x18d4ce=_0xc73143()-_0x1d209c;return _0x582f19[_0x54000c(0x132)](),{'data':_0x624c3,'elapsedMs':_0x18d4ce};}catch(_0x5c864f){_0x582f19[_0x54000c(0x132)]();throw _0x5c864f;}}export async function withProgressSpinner(_0xc13151,_0x1dbe39,_0x2a72fd={}){const _0x4b523a=a172_0x51a1,_0x2825d0=_0x2a72fd[_0x4b523a(0x13f)]??(()=>Date[_0x4b523a(0x12d)]()),_0x7b3f87=_0x2a72fd[_0x4b523a(0x131)]??setInterval,_0x588dfd=createCommandSpinner(_0xc13151,_0x2a72fd);_0x588dfd[_0x4b523a(0x134)]();const _0x12eb72=_0x2825d0(),_0x1a1cc2=_0xc13151['replace'](_0x4b523a(0x140),'')['trim']()||_0x4b523a(0x13c),_0x20f1f5={};let _0x32cab6=_0xc13151;const _0x249f00=()=>{const _0x3bff95=_0x4b523a;if(!_0x588dfd[_0x3bff95(0x142)])return;const _0x1ea61c=_0x2825d0()-_0x12eb72,_0x110de3=formatElapsed(_0x1ea61c),_0x2513fd=_0x20f1f5[_0x3bff95(0x12e)]?.[_0x3bff95(0x148)]()||_0x1a1cc2,_0x9c9eef=_0x20f1f5['jobId']?_0x3bff95(0x13a)+_0x20f1f5[_0x3bff95(0x144)]+']':'',_0x16550=_0x20f1f5[_0x3bff95(0x138)]?'\x20'+_0x20f1f5['extra']:'',_0x38650f=_0x2513fd+'\x20'+_0x110de3+_0x16550+_0x9c9eef;_0x38650f!==_0x32cab6&&_0x38650f[_0x3bff95(0x148)]()&&(_0x588dfd[_0x3bff95(0x147)]=_0x38650f,_0x32cab6=_0x38650f);},_0x5c5c10=_0x7b3f87(()=>{_0x249f00();},0x3e8),_0x3fa165={'setPhase':_0x117ab9=>{const _0x54e361=_0x4b523a;_0x20f1f5[_0x54e361(0x12e)]=_0x117ab9;const _0x350243=_0x117ab9?.[_0x54e361(0x148)]()||_0x1a1cc2,_0x2eb50b=_0x2825d0()-_0x12eb72,_0x2afb14=formatElapsed(_0x2eb50b),_0x1701af=_0x20f1f5[_0x54e361(0x144)]?_0x54e361(0x13a)+_0x20f1f5[_0x54e361(0x144)]+']':'',_0x2b99ca=_0x20f1f5[_0x54e361(0x138)]?'\x20'+_0x20f1f5[_0x54e361(0x138)]:'',_0x205f44=_0x350243+'\x20'+_0x2afb14+_0x2b99ca+_0x1701af;_0x588dfd[_0x54e361(0x142)]&&_0x205f44[_0x54e361(0x148)]()&&(_0x588dfd[_0x54e361(0x147)]=_0x205f44,_0x32cab6=_0x205f44);},'setJobId':_0x31c7c2=>{const _0x5ad434=_0x4b523a;_0x20f1f5[_0x5ad434(0x144)]=_0x31c7c2,_0x249f00();},'setExtra':_0x20a44c=>{const _0x5e9a19=_0x4b523a;_0x20f1f5[_0x5e9a19(0x138)]=_0x20a44c,_0x249f00();}};_0x249f00();try{const _0x4ac05c=await _0x1dbe39(_0x3fa165),_0x1090ac=_0x2825d0()-_0x12eb72;return{'data':_0x4ac05c,'elapsedMs':_0x1090ac};}finally{clearInterval(_0x5c5c10),_0x588dfd[_0x4b523a(0x132)]();}}export function formatElapsed(_0x1f06ad){const _0x51eb6a=a172_0x51a1,_0x2e50a6=Math[_0x51eb6a(0x133)](_0x1f06ad/0x3e8);if(_0x2e50a6<0x3c)return(_0x1f06ad/0x3e8)[_0x51eb6a(0x13d)](0x1)+'s';const _0x42b1cc=Math[_0x51eb6a(0x133)](_0x2e50a6/0x3c),_0x4810ef=_0x2e50a6%0x3c;if(_0x42b1cc<0x3c)return _0x42b1cc+'m\x20'+_0x4810ef+'s';const _0x533684=Math['floor'](_0x42b1cc/0x3c),_0x74a580=_0x42b1cc%0x3c;return _0x533684+'h\x20'+_0x74a580+'m';}function a172_0x53b5(){const _0x2ccff4=['floor','start','13894771icMEys','503575uuYrOi','isTTY','extra','1112909ReiHJy','\x20[Job\x20ID:\x20','6AXJcmB','Processing','toFixed','567929JUbWNb','clock','...','24BZVihx','isSpinning','stderr','jobId','8012KdGatP','4134310cTGVyC','text','trim','9rQLejD','now','phase','939fbZOiG','1798404eivUoO','intervalFactory','stop'];a172_0x53b5=function(){return _0x2ccff4;};return a172_0x53b5();}
@@ -1 +1 @@
1
- function a173_0x8aa7(){const _0x36f1c1=['45mSOCFH','3zAjQmI','releaseLock','parse','pop','read','6556902JboiTm','51906xrYkno','indexOf','getReader','6AHQBAY','decode','1029357ctjJMb','body','slice','698536nwNszd','debug','1475095BfbQez','data','Failed\x20to\x20parse\x20SSE\x20data\x20as\x20JSON:\x20','[LLM\x20API\x20SSE]\x20','488390mEfpoe','startsWith','12yjZSdX','trim','Response\x20body\x20is\x20null','1362800RlieXL'];a173_0x8aa7=function(){return _0x36f1c1;};return a173_0x8aa7();}(function(_0x5bd070,_0x106ad2){const _0x1e47b0=a173_0x4204,_0x482070=_0x5bd070();while(!![]){try{const _0x3195b2=-parseInt(_0x1e47b0(0x9f))/0x1*(parseInt(_0x1e47b0(0xaa))/0x2)+parseInt(_0x1e47b0(0xa4))/0x3*(parseInt(_0x1e47b0(0xb2))/0x4)+parseInt(_0x1e47b0(0x99))/0x5*(parseInt(_0x1e47b0(0xad))/0x6)+-parseInt(_0x1e47b0(0xaf))/0x7+-parseInt(_0x1e47b0(0xa2))/0x8+-parseInt(_0x1e47b0(0xa3))/0x9*(parseInt(_0x1e47b0(0x9d))/0xa)+parseInt(_0x1e47b0(0xa9))/0xb;if(_0x3195b2===_0x106ad2)break;else _0x482070['push'](_0x482070['shift']());}catch(_0x4bfa7b){_0x482070['push'](_0x482070['shift']());}}}(a173_0x8aa7,0x2f0bf));export async function*parseSSEStream(_0x19d9b3,_0x1c1d9e){const _0x1ee4c3=a173_0x4204;if(!_0x19d9b3[_0x1ee4c3(0xb0)])throw new Error(_0x1ee4c3(0xa1));const _0x3ee9e7=_0x19d9b3['body'][_0x1ee4c3(0xac)](),_0x544342=new TextDecoder();let _0x5a7e4='',_0x135c8e={};try{while(!![]){const {done:_0x4f8bd1,value:_0x30043b}=await _0x3ee9e7[_0x1ee4c3(0xa8)]();if(_0x4f8bd1){if(_0x135c8e[_0x1ee4c3(0x9a)]){_0x1c1d9e?.[_0x1ee4c3(0x98)](_0x1ee4c3(0x9c)+_0x135c8e[_0x1ee4c3(0x9a)]);const _0x24d585=parseSSEData(_0x135c8e['data']);yield _0x24d585;}break;}_0x5a7e4+=_0x544342[_0x1ee4c3(0xae)](_0x30043b,{'stream':!![]});const _0x7a6c24=_0x5a7e4['split']('\x0a');_0x5a7e4=_0x7a6c24[_0x1ee4c3(0xa7)]()||'';for(const _0x47510e of _0x7a6c24){if(_0x47510e[_0x1ee4c3(0xa0)]()===''){if(_0x135c8e[_0x1ee4c3(0x9a)]){_0x1c1d9e?.[_0x1ee4c3(0x98)](_0x1ee4c3(0x9c)+_0x135c8e['data']);const _0x4d120c=parseSSEData(_0x135c8e[_0x1ee4c3(0x9a)]);yield _0x4d120c,_0x135c8e={};}continue;}if(_0x47510e[_0x1ee4c3(0x9e)](':'))continue;const _0x350132=_0x47510e[_0x1ee4c3(0xab)](':');if(_0x350132===-0x1)continue;const _0x5c839f=_0x47510e[_0x1ee4c3(0xb1)](0x0,_0x350132);let _0xfc19d8=_0x47510e[_0x1ee4c3(0xb1)](_0x350132+0x1);_0xfc19d8[_0x1ee4c3(0x9e)]('\x20')&&(_0xfc19d8=_0xfc19d8[_0x1ee4c3(0xb1)](0x1));switch(_0x5c839f){case'event':_0x135c8e['event']=_0xfc19d8;break;case _0x1ee4c3(0x9a):_0x135c8e[_0x1ee4c3(0x9a)]=_0x135c8e[_0x1ee4c3(0x9a)]?_0x135c8e['data']+'\x0a'+_0xfc19d8:_0xfc19d8;break;case'id':_0x135c8e['id']=_0xfc19d8;break;}}}}finally{_0x3ee9e7[_0x1ee4c3(0xa5)]();}}function a173_0x4204(_0x38dd3f,_0x192328){_0x38dd3f=_0x38dd3f-0x98;const _0x8aa791=a173_0x8aa7();let _0x42047d=_0x8aa791[_0x38dd3f];return _0x42047d;}function parseSSEData(_0x2df863){const _0x222b3e=a173_0x4204;try{return JSON[_0x222b3e(0xa6)](_0x2df863);}catch(_0x205de4){throw new Error(_0x222b3e(0x9b)+_0x2df863,{'cause':_0x205de4});}}
1
+ function a173_0x2772(_0x2f041e,_0x635d8d){_0x2f041e=_0x2f041e-0x83;const _0x2d2766=a173_0x2d27();let _0x277281=_0x2d2766[_0x2f041e];return _0x277281;}function a173_0x2d27(){const _0x3409ce=['21826550dLKhYD','7dPUGYk','2911741vgjxuV','event','[LLM\x20API\x20SSE]\x20','4735030QFerUu','320805WeawhL','Response\x20body\x20is\x20null','getReader','read','20WOtnNY','debug','Failed\x20to\x20parse\x20SSE\x20data\x20as\x20JSON:\x20','split','indexOf','139420bDvmVF','6wQmJmK','pop','releaseLock','slice','3289400bzcHoI','trim','data','941535LtHyLT','decode','parse','startsWith'];a173_0x2d27=function(){return _0x3409ce;};return a173_0x2d27();}(function(_0x39973c,_0x2e2d14){const _0x502639=a173_0x2772,_0x331775=_0x39973c();while(!![]){try{const _0x56b70c=-parseInt(_0x502639(0x94))/0x1*(-parseInt(_0x502639(0x87))/0x2)+parseInt(_0x502639(0x99))/0x3*(parseInt(_0x502639(0x9d))/0x4)+-parseInt(_0x502639(0x98))/0x5*(-parseInt(_0x502639(0x88))/0x6)+parseInt(_0x502639(0x95))/0x7+parseInt(_0x502639(0x8c))/0x8+-parseInt(_0x502639(0x8f))/0x9+-parseInt(_0x502639(0x93))/0xa;if(_0x56b70c===_0x2e2d14)break;else _0x331775['push'](_0x331775['shift']());}catch(_0x39fd42){_0x331775['push'](_0x331775['shift']());}}}(a173_0x2d27,0x7c64f));export async function*parseSSEStream(_0x20d8f1,_0x1a3766){const _0x28eb17=a173_0x2772;if(!_0x20d8f1['body'])throw new Error(_0x28eb17(0x9a));const _0x182772=_0x20d8f1['body'][_0x28eb17(0x9b)](),_0x593f0a=new TextDecoder();let _0x3c2c02='',_0x434457={};try{while(!![]){const {done:_0x1d4991,value:_0x40adb2}=await _0x182772[_0x28eb17(0x9c)]();if(_0x1d4991){if(_0x434457['data']){_0x1a3766?.[_0x28eb17(0x83)](_0x28eb17(0x97)+_0x434457[_0x28eb17(0x8e)]);const _0x33ca18=parseSSEData(_0x434457['data']);yield _0x33ca18;}break;}_0x3c2c02+=_0x593f0a[_0x28eb17(0x90)](_0x40adb2,{'stream':!![]});const _0x555bce=_0x3c2c02[_0x28eb17(0x85)]('\x0a');_0x3c2c02=_0x555bce[_0x28eb17(0x89)]()||'';for(const _0x5d701e of _0x555bce){if(_0x5d701e[_0x28eb17(0x8d)]()===''){if(_0x434457[_0x28eb17(0x8e)]){_0x1a3766?.['debug'](_0x28eb17(0x97)+_0x434457['data']);const _0x27538c=parseSSEData(_0x434457[_0x28eb17(0x8e)]);yield _0x27538c,_0x434457={};}continue;}if(_0x5d701e['startsWith'](':'))continue;const _0x3980e0=_0x5d701e[_0x28eb17(0x86)](':');if(_0x3980e0===-0x1)continue;const _0x37cd1=_0x5d701e[_0x28eb17(0x8b)](0x0,_0x3980e0);let _0x2d6dcb=_0x5d701e[_0x28eb17(0x8b)](_0x3980e0+0x1);_0x2d6dcb[_0x28eb17(0x92)]('\x20')&&(_0x2d6dcb=_0x2d6dcb[_0x28eb17(0x8b)](0x1));switch(_0x37cd1){case _0x28eb17(0x96):_0x434457[_0x28eb17(0x96)]=_0x2d6dcb;break;case _0x28eb17(0x8e):_0x434457[_0x28eb17(0x8e)]=_0x434457[_0x28eb17(0x8e)]?_0x434457[_0x28eb17(0x8e)]+'\x0a'+_0x2d6dcb:_0x2d6dcb;break;case'id':_0x434457['id']=_0x2d6dcb;break;}}}}finally{_0x182772[_0x28eb17(0x8a)]();}}function parseSSEData(_0x15aa26){const _0x46767e=a173_0x2772;try{return JSON[_0x46767e(0x91)](_0x15aa26);}catch(_0x1775fe){throw new Error(_0x46767e(0x84)+_0x15aa26,{'cause':_0x1775fe});}}
@@ -1 +1 @@
1
- (function(_0x2ec712,_0x3c5b10){const _0x28c7e5=a174_0x21a3,_0x5542a5=_0x2ec712();while(!![]){try{const _0x15c88d=parseInt(_0x28c7e5(0x1f7))/0x1+-parseInt(_0x28c7e5(0x1f4))/0x2*(parseInt(_0x28c7e5(0x1ec))/0x3)+-parseInt(_0x28c7e5(0x1f6))/0x4*(-parseInt(_0x28c7e5(0x1f0))/0x5)+parseInt(_0x28c7e5(0x1f2))/0x6+parseInt(_0x28c7e5(0x1f8))/0x7+-parseInt(_0x28c7e5(0x1ed))/0x8+parseInt(_0x28c7e5(0x1f5))/0x9*(-parseInt(_0x28c7e5(0x1eb))/0xa);if(_0x15c88d===_0x3c5b10)break;else _0x5542a5['push'](_0x5542a5['shift']());}catch(_0x45b034){_0x5542a5['push'](_0x5542a5['shift']());}}}(a174_0x3cdc,0xc944f));import a174_0x3ee90e from'string-width';export function stringWidth(_0x83affa){return a174_0x3ee90e(_0x83affa);}export function padEnd(_0x3c41a4,_0x4d8e75){const _0x4dd382=stringWidth(_0x3c41a4);if(_0x4dd382>=_0x4d8e75)return _0x3c41a4;return _0x3c41a4+'\x20'['repeat'](_0x4d8e75-_0x4dd382);}export function padStart(_0x43eb42,_0x3ca3bd){const _0x52a7ac=stringWidth(_0x43eb42);if(_0x52a7ac>=_0x3ca3bd)return _0x43eb42;return'\x20'['repeat'](_0x3ca3bd-_0x52a7ac)+_0x43eb42;}export function centerAlign(_0x2069e2,_0x523ada){const _0x1fb8d7=a174_0x21a3,_0x197ce8=stringWidth(_0x2069e2);if(_0x197ce8>_0x523ada){if(_0x523ada<=0x1)return'…'['substring'](0x0,_0x523ada);let _0x51c81f=_0x2069e2;while(stringWidth(_0x51c81f+'…')>_0x523ada){_0x51c81f=_0x51c81f[_0x1fb8d7(0x1e9)](0x0,-0x1);}return _0x51c81f+'…';}if(_0x197ce8===_0x523ada)return _0x2069e2;const _0x181546=_0x523ada-_0x197ce8,_0x56e9aa=Math[_0x1fb8d7(0x1f9)](_0x181546/0x2),_0x188236=_0x181546-_0x56e9aa;return'\x20'['repeat'](_0x56e9aa)+_0x2069e2+'\x20'['repeat'](_0x188236);}export function escapeStringLiteral(_0x42b67d){const _0x23dc17=a174_0x21a3;if(!_0x42b67d||_0x42b67d[_0x23dc17(0x1f1)]()[_0x23dc17(0x1f3)]===0x0)throw new Error(_0x23dc17(0x1e6));const _0x277e0c=_0x42b67d[_0x23dc17(0x1ea)](/'/g,'\x27\x27');return'\x27'+_0x277e0c+'\x27';}export function globToLike(_0x59cf67){const _0x4b253f=a174_0x21a3;let _0x439319=_0x59cf67[_0x4b253f(0x1ea)](/\\/g,'\x5c\x5c')[_0x4b253f(0x1ea)](/%/g,'\x5c%')[_0x4b253f(0x1ea)](/_/g,'\x5c_');return _0x439319=_0x439319[_0x4b253f(0x1ea)](/\*/g,'%')['replace'](/\?/g,'_'),_0x439319;}export function buildLikePattern(_0x423d78){const _0x817f39=a174_0x21a3;if(!_0x423d78||_0x423d78['trim']()[_0x817f39(0x1f3)]===0x0)throw new Error('Cannot\x20build\x20LIKE\x20pattern\x20from\x20empty\x20string');const _0x59d0eb=globToLike(_0x423d78),_0x46a218=_0x59d0eb[_0x817f39(0x1ea)](/'/g,'\x27\x27');return'\x27'+_0x46a218+'\x27';}function a174_0x3cdc(){const _0x461f72=['replace','5230wgZuAo','3IvRaFF','1407856NGsxPZ','toLowerCase','\x5c$&','188495uewCrj','trim','8385450XWEmQx','length','2947174nRFqYZ','21609wJuMMN','4zeGvde','1088649yYyeHG','8440376LLpKxo','floor','Cannot\x20escape\x20empty\x20string\x20literal','random','toString','slice'];a174_0x3cdc=function(){return _0x461f72;};return a174_0x3cdc();}export function matchGlobPattern(_0x160382,_0x801065){const _0x634ab1=a174_0x21a3,_0x273d6e=_0x801065['replace'](/[.+^${}()|[\]\\]/g,_0x634ab1(0x1ef))[_0x634ab1(0x1ea)](/\*/g,'.*')[_0x634ab1(0x1ea)](/\?/g,'.'),_0x417e81=new RegExp('^'+_0x273d6e+'$');return _0x417e81['test'](_0x160382);}export function getSanitizedUsername(){const _0x381167=a174_0x21a3,_0x3bb730=process.env.USER||process.env.USERNAME||'unknown';return _0x3bb730[_0x381167(0x1ea)](/[^a-zA-Z0-9]/g,'')['toLowerCase']();}export function generateRandomHex(){const _0x11f64e=a174_0x21a3,_0x512860=Math[_0x11f64e(0x1f9)](Math[_0x11f64e(0x1e7)]()*0xfffff);return _0x512860[_0x11f64e(0x1e8)](0x10)['padStart'](0x5,'0');}function a174_0x21a3(_0x391c60,_0x32891d){_0x391c60=_0x391c60-0x1e6;const _0x3cdc1c=a174_0x3cdc();let _0x21a384=_0x3cdc1c[_0x391c60];return _0x21a384;}export function sanitizeFileName(_0x5aad76){const _0x1750ee=a174_0x21a3;return _0x5aad76[_0x1750ee(0x1ee)]()['replace'](/[/\\:*?"<>|]/g,'-')[_0x1750ee(0x1ea)](/\s+/g,'-')[_0x1750ee(0x1ea)](/-+/g,'-')[_0x1750ee(0x1ea)](/^-|-$/g,'');}
1
+ (function(_0x5f2eec,_0x361d85){const _0x500627=a174_0x437f,_0x151e2d=_0x5f2eec();while(!![]){try{const _0x16537e=parseInt(_0x500627(0x1e1))/0x1*(-parseInt(_0x500627(0x1f9))/0x2)+parseInt(_0x500627(0x1e2))/0x3*(parseInt(_0x500627(0x1e5))/0x4)+parseInt(_0x500627(0x1eb))/0x5*(parseInt(_0x500627(0x1e4))/0x6)+parseInt(_0x500627(0x1f8))/0x7*(parseInt(_0x500627(0x1e7))/0x8)+-parseInt(_0x500627(0x1ec))/0x9+parseInt(_0x500627(0x1ed))/0xa+parseInt(_0x500627(0x1f4))/0xb*(-parseInt(_0x500627(0x1f6))/0xc);if(_0x16537e===_0x361d85)break;else _0x151e2d['push'](_0x151e2d['shift']());}catch(_0x576d0c){_0x151e2d['push'](_0x151e2d['shift']());}}}(a174_0x3676,0xb6357));function a174_0x437f(_0x154f33,_0x17f0f9){_0x154f33=_0x154f33-0x1e0;const _0x3676ce=a174_0x3676();let _0x437f19=_0x3676ce[_0x154f33];return _0x437f19;}import a174_0x2c0ffa from'string-width';export function stringWidth(_0x1e76a1){return a174_0x2c0ffa(_0x1e76a1);}export function padEnd(_0x2e8acf,_0x37b758){const _0x2c0677=a174_0x437f,_0x5f41b2=stringWidth(_0x2e8acf);if(_0x5f41b2>=_0x37b758)return _0x2e8acf;return _0x2e8acf+'\x20'[_0x2c0677(0x1f0)](_0x37b758-_0x5f41b2);}export function padStart(_0x207dbe,_0x370099){const _0x5a25df=a174_0x437f,_0x17d0d8=stringWidth(_0x207dbe);if(_0x17d0d8>=_0x370099)return _0x207dbe;return'\x20'[_0x5a25df(0x1f0)](_0x370099-_0x17d0d8)+_0x207dbe;}export function centerAlign(_0x480944,_0x16fe34){const _0x1f768c=a174_0x437f,_0x26e506=stringWidth(_0x480944);if(_0x26e506>_0x16fe34){if(_0x16fe34<=0x1)return'…'[_0x1f768c(0x1f3)](0x0,_0x16fe34);let _0x243ad8=_0x480944;while(stringWidth(_0x243ad8+'…')>_0x16fe34){_0x243ad8=_0x243ad8[_0x1f768c(0x1e8)](0x0,-0x1);}return _0x243ad8+'…';}if(_0x26e506===_0x16fe34)return _0x480944;const _0x3f30ec=_0x16fe34-_0x26e506,_0x47f17c=Math[_0x1f768c(0x1f5)](_0x3f30ec/0x2),_0x382959=_0x3f30ec-_0x47f17c;return'\x20'['repeat'](_0x47f17c)+_0x480944+'\x20'[_0x1f768c(0x1f0)](_0x382959);}export function escapeStringLiteral(_0x6a189f){const _0x533564=a174_0x437f;if(!_0x6a189f||_0x6a189f[_0x533564(0x1e9)]()[_0x533564(0x1f7)]===0x0)throw new Error(_0x533564(0x1ea));const _0x360e94=_0x6a189f[_0x533564(0x1f1)](/'/g,'\x27\x27');return'\x27'+_0x360e94+'\x27';}export function globToLike(_0x3d39ec){const _0x192283=a174_0x437f;let _0x307a52=_0x3d39ec[_0x192283(0x1f1)](/\\/g,'\x5c\x5c')[_0x192283(0x1f1)](/%/g,'\x5c%')['replace'](/_/g,'\x5c_');return _0x307a52=_0x307a52['replace'](/\*/g,'%')[_0x192283(0x1f1)](/\?/g,'_'),_0x307a52;}export function buildLikePattern(_0x317776){const _0x2e92b1=a174_0x437f;if(!_0x317776||_0x317776[_0x2e92b1(0x1e9)]()[_0x2e92b1(0x1f7)]===0x0)throw new Error(_0x2e92b1(0x1ee));const _0x4940c9=globToLike(_0x317776),_0xca5b81=_0x4940c9[_0x2e92b1(0x1f1)](/'/g,'\x27\x27');return'\x27'+_0xca5b81+'\x27';}export function matchGlobPattern(_0x1862e1,_0xb334ed){const _0x2a95dc=a174_0x437f,_0x49d21=_0xb334ed['replace'](/[.+^${}()|[\]\\]/g,'\x5c$&')[_0x2a95dc(0x1f1)](/\*/g,'.*')['replace'](/\?/g,'.'),_0x376a2a=new RegExp('^'+_0x49d21+'$');return _0x376a2a[_0x2a95dc(0x1f2)](_0x1862e1);}export function getSanitizedUsername(){const _0x2fc850=a174_0x437f,_0xbd71bf=process.env.USER||process.env.USERNAME||'unknown';return _0xbd71bf[_0x2fc850(0x1f1)](/[^a-zA-Z0-9]/g,'')[_0x2fc850(0x1e6)]();}function a174_0x3676(){const _0x175f65=['44HpnvkH','padStart','38707zPcOOW','9nOEtHM','random','2309838XCppPB','1826512Okuotg','toLowerCase','2367752ogkogt','slice','trim','Cannot\x20escape\x20empty\x20string\x20literal','15drcPkj','11697129uqriSd','13112950fyaEfn','Cannot\x20build\x20LIKE\x20pattern\x20from\x20empty\x20string','toString','repeat','replace','test','substring','44PFLzmc','floor','6367236Uznafr','length','28cFECSW'];a174_0x3676=function(){return _0x175f65;};return a174_0x3676();}export function generateRandomHex(){const _0x36b9be=a174_0x437f,_0x56becb=Math[_0x36b9be(0x1f5)](Math[_0x36b9be(0x1e3)]()*0xfffff);return _0x56becb[_0x36b9be(0x1ef)](0x10)[_0x36b9be(0x1e0)](0x5,'0');}export function sanitizeFileName(_0x52204a){const _0x5e821e=a174_0x437f;return _0x52204a[_0x5e821e(0x1e6)]()['replace'](/[/\\:*?"<>|]/g,'-')[_0x5e821e(0x1f1)](/\s+/g,'-')[_0x5e821e(0x1f1)](/-+/g,'-')[_0x5e821e(0x1f1)](/^-|-$/g,'');}
@@ -1 +1 @@
1
- (function(_0x40b35b,_0x148392){const _0x147016=a175_0x2107,_0x421723=_0x40b35b();while(!![]){try{const _0x12b7a1=parseInt(_0x147016(0x7e))/0x1+parseInt(_0x147016(0x87))/0x2*(-parseInt(_0x147016(0x7a))/0x3)+-parseInt(_0x147016(0x85))/0x4+parseInt(_0x147016(0x84))/0x5*(-parseInt(_0x147016(0x78))/0x6)+-parseInt(_0x147016(0x8d))/0x7*(-parseInt(_0x147016(0x7b))/0x8)+parseInt(_0x147016(0x81))/0x9*(parseInt(_0x147016(0x7d))/0xa)+parseInt(_0x147016(0x8a))/0xb;if(_0x12b7a1===_0x148392)break;else _0x421723['push'](_0x421723['shift']());}catch(_0x2ca97d){_0x421723['push'](_0x421723['shift']());}}}(a175_0x2c8e,0xebc5a));function a175_0x2107(_0x360c60,_0x1bbd5a){_0x360c60=_0x360c60-0x77;const _0x2c8e95=a175_0x2c8e();let _0x21077a=_0x2c8e95[_0x360c60];return _0x21077a;}function hasWildcard(_0x291c10){const _0x48b183=a175_0x2107;return _0x291c10[_0x48b183(0x82)]('*')||_0x291c10[_0x48b183(0x82)]('?');}export function parseTableReference(_0x1af6fd){const _0x5ac8f1=a175_0x2107;if(!_0x1af6fd||_0x1af6fd[_0x5ac8f1(0x80)]()[_0x5ac8f1(0x7c)]===0x0)throw new Error(_0x5ac8f1(0x79));const _0x2bf673=_0x1af6fd[_0x5ac8f1(0x80)](),_0x215ae0={'original':_0x2bf673},_0x304291=_0x2bf673[_0x5ac8f1(0x7f)]('.');if(_0x304291[_0x5ac8f1(0x7c)]===0x1){const _0x177f3d=_0x304291[0x0];if(!_0x177f3d)throw new Error('Pattern\x20cannot\x20be\x20just\x20a\x20dot');_0x215ae0[_0x5ac8f1(0x8b)]=_0x177f3d;}else{if(_0x304291[_0x5ac8f1(0x7c)]===0x2){const [_0x558047,_0xd89791]=_0x304291;if(!_0x558047)throw new Error('Database\x20part\x20cannot\x20be\x20empty\x20-\x20use\x20\x22*\x22\x20for\x20all\x20databases\x20(e.g.,\x20\x22*.mytable\x22)');if(!_0xd89791)throw new Error('Table\x20part\x20cannot\x20be\x20empty\x20-\x20use\x20\x22*\x22\x20for\x20all\x20tables\x20(e.g.,\x20\x22mydb.*\x22)');_0x215ae0[_0x5ac8f1(0x8e)]=_0x558047,_0x215ae0['table']=_0xd89791;}else{if(_0x304291[_0x5ac8f1(0x7c)]===0x3){const [_0x388895,_0x54640e,_0x2767b4]=_0x304291;if(!_0x388895||!_0x54640e||!_0x2767b4)throw new Error('Invalid\x20catalog.database.table\x20format\x20-\x20all\x20parts\x20must\x20be\x20non-empty');_0x215ae0[_0x5ac8f1(0x8f)]=_0x388895,_0x215ae0[_0x5ac8f1(0x8e)]=_0x54640e,_0x215ae0[_0x5ac8f1(0x8b)]=_0x2767b4;}else throw new Error(_0x5ac8f1(0x88));}}return _0x215ae0;}export function formatTableReference(_0x238c76){const _0x650b39=a175_0x2107,_0x4fdca7=[];return _0x238c76[_0x650b39(0x8f)]&&_0x4fdca7[_0x650b39(0x8c)](_0x238c76[_0x650b39(0x8f)]),_0x238c76['database']&&_0x4fdca7['push'](_0x238c76['database']),_0x238c76[_0x650b39(0x8b)]&&_0x4fdca7['push'](_0x238c76[_0x650b39(0x8b)]),_0x4fdca7[_0x650b39(0x89)]('.');}function a175_0x2c8e(){const _0x1063bc=['Wildcards\x20are\x20not\x20allowed\x20in\x20table\x20name\x20for\x20describe\x20operation','2QxzFUx','Invalid\x20pattern\x20format\x20-\x20too\x20many\x20dots\x20(max:\x20catalog.database.table)','join','964953WDqhWX','table','push','4795izCVWu','database','catalog','Table\x20name\x20is\x20required\x20for\x20describe\x20operation','30qvpjjz','Pattern\x20cannot\x20be\x20empty\x20or\x20whitespace-only','4016124rxawuJ','22240QvhqNp','length','10XpsBVn','124735hJIOpP','split','trim','14848002TrZFQg','includes','Wildcards\x20are\x20not\x20allowed\x20in\x20database\x20name\x20for\x20describe\x20operation','782675rrValm','2717724lkmXvo'];a175_0x2c8e=function(){return _0x1063bc;};return a175_0x2c8e();}export function validateTableListReference(_0xcecba7){return undefined;}export function validateTableDescribeReference(_0x1fa2cf){const _0x2ce7e8=a175_0x2107;if(!_0x1fa2cf['table'])return _0x2ce7e8(0x77);if(_0x1fa2cf[_0x2ce7e8(0x8e)]&&hasWildcard(_0x1fa2cf[_0x2ce7e8(0x8e)]))return _0x2ce7e8(0x83);if(hasWildcard(_0x1fa2cf[_0x2ce7e8(0x8b)]))return _0x2ce7e8(0x86);return undefined;}
1
+ function a175_0x38b8(){const _0x3eccd4=['Table\x20name\x20is\x20required\x20for\x20describe\x20operation','17242XpNfpq','4389300aFnnJs','length','table','Wildcards\x20are\x20not\x20allowed\x20in\x20database\x20name\x20for\x20describe\x20operation','trim','Wildcards\x20are\x20not\x20allowed\x20in\x20table\x20name\x20for\x20describe\x20operation','join','Table\x20part\x20cannot\x20be\x20empty\x20-\x20use\x20\x22*\x22\x20for\x20all\x20tables\x20(e.g.,\x20\x22mydb.*\x22)','push','93EAAMKJ','8793696GlPjQb','16809039zwGQlz','Pattern\x20cannot\x20be\x20empty\x20or\x20whitespace-only','2523132OPoNtv','includes','645976bBDzdX','Invalid\x20catalog.database.table\x20format\x20-\x20all\x20parts\x20must\x20be\x20non-empty','Pattern\x20cannot\x20be\x20just\x20a\x20dot','catalog','Database\x20part\x20cannot\x20be\x20empty\x20-\x20use\x20\x22*\x22\x20for\x20all\x20databases\x20(e.g.,\x20\x22*.mytable\x22)','14RbrQuC','1283328qcOnqq','database'];a175_0x38b8=function(){return _0x3eccd4;};return a175_0x38b8();}(function(_0x3c08d7,_0x4869d6){const _0xa81316=a175_0x1ea2,_0x5f113a=_0x3c08d7();while(!![]){try{const _0x1bda77=parseInt(_0xa81316(0x11f))/0x1+-parseInt(_0xa81316(0x128))/0x2*(parseInt(_0xa81316(0x132))/0x3)+parseInt(_0xa81316(0x136))/0x4+parseInt(_0xa81316(0x129))/0x5+parseInt(_0xa81316(0x125))/0x6*(-parseInt(_0xa81316(0x124))/0x7)+parseInt(_0xa81316(0x133))/0x8+-parseInt(_0xa81316(0x134))/0x9;if(_0x1bda77===_0x4869d6)break;else _0x5f113a['push'](_0x5f113a['shift']());}catch(_0x5bc465){_0x5f113a['push'](_0x5f113a['shift']());}}}(a175_0x38b8,0xa8bbd));function hasWildcard(_0x5d30fe){const _0x5141d5=a175_0x1ea2;return _0x5d30fe[_0x5141d5(0x11e)]('*')||_0x5d30fe[_0x5141d5(0x11e)]('?');}function a175_0x1ea2(_0x1cace1,_0x2bb18a){_0x1cace1=_0x1cace1-0x11e;const _0x38b81d=a175_0x38b8();let _0x1ea2b5=_0x38b81d[_0x1cace1];return _0x1ea2b5;}export function parseTableReference(_0x2fe0fd){const _0xeca68e=a175_0x1ea2;if(!_0x2fe0fd||_0x2fe0fd[_0xeca68e(0x12d)]()['length']===0x0)throw new Error(_0xeca68e(0x135));const _0x2cca93=_0x2fe0fd[_0xeca68e(0x12d)](),_0x34f7af={'original':_0x2cca93},_0x1d071f=_0x2cca93['split']('.');if(_0x1d071f[_0xeca68e(0x12a)]===0x1){const _0x56a22f=_0x1d071f[0x0];if(!_0x56a22f)throw new Error(_0xeca68e(0x121));_0x34f7af[_0xeca68e(0x12b)]=_0x56a22f;}else{if(_0x1d071f[_0xeca68e(0x12a)]===0x2){const [_0x79a3d5,_0xfa5d61]=_0x1d071f;if(!_0x79a3d5)throw new Error(_0xeca68e(0x123));if(!_0xfa5d61)throw new Error(_0xeca68e(0x130));_0x34f7af[_0xeca68e(0x126)]=_0x79a3d5,_0x34f7af['table']=_0xfa5d61;}else{if(_0x1d071f[_0xeca68e(0x12a)]===0x3){const [_0x23c03c,_0x410602,_0x4e2eac]=_0x1d071f;if(!_0x23c03c||!_0x410602||!_0x4e2eac)throw new Error(_0xeca68e(0x120));_0x34f7af[_0xeca68e(0x122)]=_0x23c03c,_0x34f7af[_0xeca68e(0x126)]=_0x410602,_0x34f7af['table']=_0x4e2eac;}else throw new Error('Invalid\x20pattern\x20format\x20-\x20too\x20many\x20dots\x20(max:\x20catalog.database.table)');}}return _0x34f7af;}export function formatTableReference(_0x167aba){const _0x3fe318=a175_0x1ea2,_0x2c0721=[];return _0x167aba[_0x3fe318(0x122)]&&_0x2c0721[_0x3fe318(0x131)](_0x167aba[_0x3fe318(0x122)]),_0x167aba[_0x3fe318(0x126)]&&_0x2c0721['push'](_0x167aba[_0x3fe318(0x126)]),_0x167aba[_0x3fe318(0x12b)]&&_0x2c0721[_0x3fe318(0x131)](_0x167aba[_0x3fe318(0x12b)]),_0x2c0721[_0x3fe318(0x12f)]('.');}export function validateTableListReference(_0x37c5c8){return undefined;}export function validateTableDescribeReference(_0x3ee253){const _0x1dd55a=a175_0x1ea2;if(!_0x3ee253[_0x1dd55a(0x12b)])return _0x1dd55a(0x127);if(_0x3ee253[_0x1dd55a(0x126)]&&hasWildcard(_0x3ee253[_0x1dd55a(0x126)]))return _0x1dd55a(0x12c);if(hasWildcard(_0x3ee253['table']))return _0x1dd55a(0x12e);return undefined;}
@@ -1 +1 @@
1
- const a176_0x2ef440=a176_0x2208;(function(_0x2aa0e0,_0x4e1547){const _0x3e77d8=a176_0x2208,_0x5ee744=_0x2aa0e0();while(!![]){try{const _0x567ef3=-parseInt(_0x3e77d8(0xcd))/0x1*(parseInt(_0x3e77d8(0xbe))/0x2)+-parseInt(_0x3e77d8(0xd2))/0x3+-parseInt(_0x3e77d8(0xc0))/0x4*(-parseInt(_0x3e77d8(0xd8))/0x5)+parseInt(_0x3e77d8(0xd3))/0x6*(parseInt(_0x3e77d8(0xc9))/0x7)+-parseInt(_0x3e77d8(0xd4))/0x8*(-parseInt(_0x3e77d8(0xd6))/0x9)+-parseInt(_0x3e77d8(0xc6))/0xa*(parseInt(_0x3e77d8(0xc3))/0xb)+parseInt(_0x3e77d8(0xc7))/0xc*(-parseInt(_0x3e77d8(0xc5))/0xd);if(_0x567ef3===_0x4e1547)break;else _0x5ee744['push'](_0x5ee744['shift']());}catch(_0xe4b2b1){_0x5ee744['push'](_0x5ee744['shift']());}}}(a176_0x1f0a,0x8a1ca));function a176_0x2208(_0x25e9ea,_0x539b30){_0x25e9ea=_0x25e9ea-0xbd;const _0x1f0a37=a176_0x1f0a();let _0x220843=_0x1f0a37[_0x25e9ea];return _0x220843;}import{join}from'path';function a176_0x1f0a(){const _0x8ce8f5=['isInitialized','init','64caVEyZ','fileHandler','858128rGoHJx','fileOnly','push','719785DiFrvb','logLevel','52dKQtKW','80tJDpMS','37404DgMVYV','logger','539YEoRHG','consoleHandler','logDir','getLogPath','14046fdHsFw','shutdown','INFO','info','logFileName','2057289iMjSOp','78708xNjokK','40idxRFT','Session\x20ended','663615YsiZAR','trace','20oVxAtA','debug','warn'];a176_0x1f0a=function(){return _0x8ce8f5;};return a176_0x1f0a();}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{['logLevel'];[a176_0x2ef440(0xc1)];[a176_0x2ef440(0xcb)];[a176_0x2ef440(0xd1)];[a176_0x2ef440(0xc8)];[a176_0x2ef440(0xbf)]=null;['consoleHandler']=null;constructor(_0x559d5f=LogLevel[a176_0x2ef440(0xcf)],_0x5de529=![],_0x2ee90f,_0x154824='tdx.log'){const _0x1d536e=a176_0x2ef440;this[_0x1d536e(0xc4)]=_0x559d5f,this[_0x1d536e(0xc1)]=_0x5de529,this[_0x1d536e(0xcb)]=_0x2ee90f||join(getGlobalCacheDir(),'logs'),this[_0x1d536e(0xd1)]=_0x154824,this[_0x1d536e(0xc8)]=Logger['of']('tdx');}async[a176_0x2ef440(0xbd)](){const _0x50f3a9=a176_0x2ef440,_0x3fdb10=join(this[_0x50f3a9(0xcb)],this[_0x50f3a9(0xd1)]);if(Logger[_0x50f3a9(0xdb)]()){!this['fileOnly']&&(this[_0x50f3a9(0xca)]=new ConsoleHandler({'minLevel':LogLevel[_0x50f3a9(0xcf)],'colors':!![]}),Logger['addHandler'](this[_0x50f3a9(0xca)]));return;}this[_0x50f3a9(0xbf)]=new FileHandler({'filePath':_0x3fdb10});const _0x50b3f6=[this['fileHandler']];!this[_0x50f3a9(0xc1)]&&(this[_0x50f3a9(0xca)]=new ConsoleHandler({'minLevel':LogLevel['INFO'],'colors':!![]}),_0x50b3f6[_0x50f3a9(0xc2)](this[_0x50f3a9(0xca)])),await Logger[_0x50f3a9(0xbd)]({'defaultLevel':this['logLevel'],'handlers':_0x50b3f6,'formatter':new DefaultLogFormatter({'colors':!![]})});}[a176_0x2ef440(0xd9)](..._0x2fbbb6){const _0x201766=a176_0x2ef440;this[_0x201766(0xc8)][_0x201766(0xd9)](..._0x2fbbb6);}[a176_0x2ef440(0xd7)](..._0x3d7fbe){const _0x2972ed=a176_0x2ef440;this[_0x2972ed(0xc8)][_0x2972ed(0xd7)](..._0x3d7fbe);}[a176_0x2ef440(0xd0)](..._0x429419){const _0x29615d=a176_0x2ef440;this[_0x29615d(0xc8)][_0x29615d(0xd0)](..._0x429419);}[a176_0x2ef440(0xda)](..._0x3f6d84){const _0x3362f6=a176_0x2ef440;this[_0x3362f6(0xc8)]['warn'](..._0x3f6d84);}['error'](..._0x5da701){const _0x1cf4e1=a176_0x2ef440;this[_0x1cf4e1(0xc8)]['error'](..._0x5da701);}async['close'](){const _0x5b4a48=a176_0x2ef440;this[_0x5b4a48(0xc8)][_0x5b4a48(0xd0)](_0x5b4a48(0xd5)),await Logger[_0x5b4a48(0xce)]();}[a176_0x2ef440(0xcc)](){const _0x17d5e3=a176_0x2ef440;return join(this[_0x17d5e3(0xcb)],this[_0x17d5e3(0xd1)]);}}
1
+ function a176_0x4a96(_0x5b1ccf,_0x3d8452){_0x5b1ccf=_0x5b1ccf-0xf6;const _0x200485=a176_0x2004();let _0x4a96fb=_0x200485[_0x5b1ccf];return _0x4a96fb;}const a176_0x16cad8=a176_0x4a96;(function(_0x45e74e,_0x5d3074){const _0x4b71dd=a176_0x4a96,_0x548516=_0x45e74e();while(!![]){try{const _0x446271=-parseInt(_0x4b71dd(0x103))/0x1+parseInt(_0x4b71dd(0xf7))/0x2+parseInt(_0x4b71dd(0x109))/0x3*(parseInt(_0x4b71dd(0x10f))/0x4)+-parseInt(_0x4b71dd(0xfb))/0x5+-parseInt(_0x4b71dd(0x106))/0x6*(parseInt(_0x4b71dd(0x107))/0x7)+parseInt(_0x4b71dd(0x114))/0x8*(-parseInt(_0x4b71dd(0xfe))/0x9)+parseInt(_0x4b71dd(0x100))/0xa;if(_0x446271===_0x5d3074)break;else _0x548516['push'](_0x548516['shift']());}catch(_0xec7c10){_0x548516['push'](_0x548516['shift']());}}}(a176_0x2004,0xeaed5));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 a176_0x2004(){const _0x17aa0e=['isInitialized','INFO','trace','1761010SNgRsm','info','error','9gHfNgH','tdx.log','24973790KmYZPM','logs','init','771811DKzgbr','getLogPath','logger','1237548vMcXxD','21xWAkqS','debug','4208271DdldfH','Session\x20ended','consoleHandler','logFileName','fileHandler','warn','4dSJfNR','fileOnly','logDir','logLevel','tdx','13662008uUymqg','close','1025326OYxYHP'];a176_0x2004=function(){return _0x17aa0e;};return a176_0x2004();}export class TDXLogger{[a176_0x16cad8(0x112)];[a176_0x16cad8(0x110)];[a176_0x16cad8(0x111)];[a176_0x16cad8(0x10c)];['logger'];['fileHandler']=null;[a176_0x16cad8(0x10b)]=null;constructor(_0x258991=LogLevel[a176_0x16cad8(0xf9)],_0x574436=![],_0x693b5a,_0xb1ccff=a176_0x16cad8(0xff)){const _0x25b187=a176_0x16cad8;this['logLevel']=_0x258991,this[_0x25b187(0x110)]=_0x574436,this[_0x25b187(0x111)]=_0x693b5a||join(getGlobalCacheDir(),_0x25b187(0x101)),this[_0x25b187(0x10c)]=_0xb1ccff,this[_0x25b187(0x105)]=Logger['of'](_0x25b187(0x113));}async['init'](){const _0x39ae66=a176_0x16cad8,_0x1bccc1=join(this['logDir'],this['logFileName']);if(Logger[_0x39ae66(0xf8)]()){!this[_0x39ae66(0x110)]&&(this['consoleHandler']=new ConsoleHandler({'minLevel':LogLevel[_0x39ae66(0xf9)],'colors':!![]}),Logger['addHandler'](this['consoleHandler']));return;}this[_0x39ae66(0x10d)]=new FileHandler({'filePath':_0x1bccc1});const _0x3de269=[this['fileHandler']];!this[_0x39ae66(0x110)]&&(this[_0x39ae66(0x10b)]=new ConsoleHandler({'minLevel':LogLevel['INFO'],'colors':!![]}),_0x3de269['push'](this[_0x39ae66(0x10b)])),await Logger[_0x39ae66(0x102)]({'defaultLevel':this[_0x39ae66(0x112)],'handlers':_0x3de269,'formatter':new DefaultLogFormatter({'colors':!![]})});}['debug'](..._0x290570){const _0x4085ca=a176_0x16cad8;this[_0x4085ca(0x105)][_0x4085ca(0x108)](..._0x290570);}[a176_0x16cad8(0xfa)](..._0x3184d5){const _0x271d7a=a176_0x16cad8;this['logger'][_0x271d7a(0xfa)](..._0x3184d5);}[a176_0x16cad8(0xfc)](..._0x274815){const _0x43c0f0=a176_0x16cad8;this[_0x43c0f0(0x105)][_0x43c0f0(0xfc)](..._0x274815);}['warn'](..._0x1b0632){const _0x273cf7=a176_0x16cad8;this['logger'][_0x273cf7(0x10e)](..._0x1b0632);}[a176_0x16cad8(0xfd)](..._0x359b34){this['logger']['error'](..._0x359b34);}async[a176_0x16cad8(0xf6)](){const _0x2e34b1=a176_0x16cad8;this[_0x2e34b1(0x105)][_0x2e34b1(0xfc)](_0x2e34b1(0x10a)),await Logger['shutdown']();}[a176_0x16cad8(0x104)](){const _0x1ce6ee=a176_0x16cad8;return join(this[_0x1ce6ee(0x111)],this[_0x1ce6ee(0x10c)]);}}
@@ -1 +1 @@
1
- const a177_0x5ee022=a177_0x4abf;(function(_0x4b263a,_0x31de68){const _0x34048d=a177_0x4abf,_0x11d935=_0x4b263a();while(!![]){try{const _0x1af620=-parseInt(_0x34048d(0x110))/0x1*(parseInt(_0x34048d(0x131))/0x2)+parseInt(_0x34048d(0x133))/0x3+parseInt(_0x34048d(0x118))/0x4+parseInt(_0x34048d(0x126))/0x5*(-parseInt(_0x34048d(0x11f))/0x6)+parseInt(_0x34048d(0x11c))/0x7*(parseInt(_0x34048d(0x136))/0x8)+-parseInt(_0x34048d(0x135))/0x9*(parseInt(_0x34048d(0x112))/0xa)+parseInt(_0x34048d(0x12d))/0xb*(parseInt(_0x34048d(0x138))/0xc);if(_0x1af620===_0x31de68)break;else _0x11d935['push'](_0x11d935['shift']());}catch(_0x9a1a4a){_0x11d935['push'](_0x11d935['shift']());}}}(a177_0x103e,0x8b5e6));import{get}from'https';import{gt,valid}from'semver';function a177_0x4abf(_0x34cf9b,_0x57cf6){_0x34cf9b=_0x34cf9b-0x110;const _0x103e12=a177_0x103e();let _0x4abf84=_0x103e12[_0x34cf9b];return _0x4abf84;}import a177_0x5d531c from'chalk';import{createGlobalCache}from'./global-cache.js';const CACHE_DURATION_MS=0x18*0x3c*0x3c*0x3e8,NPM_REGISTRY_BASE=a177_0x5ee022(0x117),TIMEOUT_MS=0x7d0,stableVersionCache=createGlobalCache(a177_0x5ee022(0x13a),a177_0x5ee022(0x121)),nextVersionCache=createGlobalCache(a177_0x5ee022(0x11d),a177_0x5ee022(0x11e));function getCacheForChannel(_0x595c7d){const _0x40fbba=a177_0x5ee022;return _0x595c7d===_0x40fbba(0x125)?nextVersionCache:stableVersionCache;}function readCache(_0x499131){const _0x3e86e0=a177_0x5ee022;return getCacheForChannel(_0x499131)[_0x3e86e0(0x124)]()??null;}function writeCache(_0x38cf5f,_0x151a07){const _0x296a97=a177_0x5ee022;try{getCacheForChannel(_0x151a07)[_0x296a97(0x13e)]({'lastCheck':new Date()[_0x296a97(0x11b)](),'latestVersion':_0x38cf5f});}catch{}}function a177_0x103e(){const _0x5fd27a=['134910COjPBw','16grVKNY','Invalid\x20version\x20format','330612jItcwi','cyan','last_version_check','npm\x20install\x20-g\x20@treasuredata/tdx@','end','channel','write','parse','162133gMYlcZ','latest','670GkiEys','stderr','Request\x20timeout','latestVersion','getTime','https://registry.npmjs.org/@treasuredata/tdx','367784NAODVL','HTTP\x20','green','toISOString','3845702sJnXmy','last_version_check_next','utils/version-check-next','702wAVkAt','Update\x20available:','utils/version-check','yellow','isTTY','read','next','39165QhjWyS','data','lastCheck','currentVersion','gray','\x0aRun:\x20','destroy','891xToUdH','Run:','updateAvailable','now','14Wcyokq','stable','612681kpBVpK','version'];a177_0x103e=function(){return _0x5fd27a;};return a177_0x103e();}function isCacheValid(_0xb61df6){const _0xc2051b=a177_0x5ee022;if(!_0xb61df6)return![];const _0xc7b10d=new Date(_0xb61df6[_0xc2051b(0x128)])[_0xc2051b(0x116)](),_0x22d1bb=Date[_0xc2051b(0x130)]();return _0x22d1bb-_0xc7b10d<CACHE_DURATION_MS;}function fetchLatestVersion(_0x4f7741=a177_0x5ee022(0x132)){const _0x2543e5=a177_0x5ee022,_0x4f2391=_0x4f7741===_0x2543e5(0x125)?_0x2543e5(0x125):_0x2543e5(0x111),_0x22ba42=NPM_REGISTRY_BASE+'/'+_0x4f2391;return new Promise((_0x2fd484,_0x9040a2)=>{const _0x496d29=get(_0x22ba42,_0x107c2f=>{const _0xc456ce=a177_0x4abf;if(_0x107c2f['statusCode']!==0xc8){clearTimeout(_0x2f2a22),_0x9040a2(new Error(_0xc456ce(0x119)+_0x107c2f['statusCode']));return;}let _0x55755c='';_0x107c2f['on'](_0xc456ce(0x127),_0x46859c=>{_0x55755c+=_0x46859c;}),_0x107c2f['on'](_0xc456ce(0x13c),()=>{const _0x6654a5=_0xc456ce;clearTimeout(_0x2f2a22);try{const _0x4927a6=JSON[_0x6654a5(0x13f)](_0x55755c);if(!valid(_0x4927a6['version'])){_0x9040a2(new Error(_0x6654a5(0x137)));return;}_0x2fd484(_0x4927a6[_0x6654a5(0x134)]);}catch(_0x3f4118){_0x9040a2(_0x3f4118);}});})['on']('error',_0x580aba=>{clearTimeout(_0x2f2a22),_0x9040a2(_0x580aba);}),_0x2f2a22=setTimeout(()=>{const _0x26b584=a177_0x4abf;_0x496d29[_0x26b584(0x12c)](),_0x9040a2(new Error(_0x26b584(0x114)));},TIMEOUT_MS);});}export async function checkForUpdate(_0x598eb9,_0x29d7b7=a177_0x5ee022(0x132)){const _0x29b2ca=a177_0x5ee022;try{const _0x3b6738=readCache(_0x29d7b7);if(isCacheValid(_0x3b6738)){const _0x4672e5=gt(_0x3b6738[_0x29b2ca(0x115)],_0x598eb9);return{'updateAvailable':_0x4672e5,'currentVersion':_0x598eb9,'latestVersion':_0x3b6738['latestVersion'],'channel':_0x29d7b7};}const _0x5b63b6=await fetchLatestVersion(_0x29d7b7);writeCache(_0x5b63b6,_0x29d7b7);const _0x10a96c=gt(_0x5b63b6,_0x598eb9);return{'updateAvailable':_0x10a96c,'currentVersion':_0x598eb9,'latestVersion':_0x5b63b6,'channel':_0x29d7b7};}catch{return null;}}export function displayUpdateNotification(_0x37f322){const _0x3f9984=a177_0x5ee022;if(!_0x37f322[_0x3f9984(0x12f)])return;const _0x3f32f3=_0x37f322[_0x3f9984(0x13d)]==='next'?'next':'latest',_0x50aca0=process[_0x3f9984(0x113)][_0x3f9984(0x123)]&&!process.env.NO_COLOR,_0xd95780=_0x50aca0?a177_0x5d531c[_0x3f9984(0x12a)]('→'):'→',_0x98689b=_0x50aca0?a177_0x5d531c['dim'](_0x37f322[_0x3f9984(0x129)]):_0x37f322[_0x3f9984(0x129)],_0xf6a280=_0x50aca0?a177_0x5d531c[_0x3f9984(0x11a)](_0x37f322[_0x3f9984(0x115)]):_0x37f322[_0x3f9984(0x115)],_0x19ce7b=_0x50aca0?a177_0x5d531c[_0x3f9984(0x139)](_0x3f9984(0x13b)+_0x3f32f3):_0x3f9984(0x13b)+_0x3f32f3,_0x2ce5aa=_0x50aca0?'\x0a'+a177_0x5d531c[_0x3f9984(0x122)](_0x3f9984(0x120))+'\x20'+_0x98689b+'\x20'+_0xd95780+'\x20'+_0xf6a280+'\x0a'+a177_0x5d531c['dim'](_0x3f9984(0x12e))+'\x20'+_0x19ce7b+'\x0a':'\x0aUpdate\x20available:\x20'+_0x98689b+'\x20'+_0xd95780+'\x20'+_0xf6a280+_0x3f9984(0x12b)+_0x19ce7b+'\x0a';process['stderr']['write'](_0x2ce5aa);}
1
+ const a177_0x4a9c7f=a177_0x5d3c;(function(_0x372401,_0x1bb2c6){const _0x1b0f0f=a177_0x5d3c,_0x4c4c75=_0x372401();while(!![]){try{const _0x50e64a=-parseInt(_0x1b0f0f(0x12c))/0x1+-parseInt(_0x1b0f0f(0x131))/0x2+-parseInt(_0x1b0f0f(0x12f))/0x3*(parseInt(_0x1b0f0f(0x125))/0x4)+parseInt(_0x1b0f0f(0x135))/0x5*(parseInt(_0x1b0f0f(0x123))/0x6)+parseInt(_0x1b0f0f(0x130))/0x7*(parseInt(_0x1b0f0f(0x121))/0x8)+-parseInt(_0x1b0f0f(0x132))/0x9*(parseInt(_0x1b0f0f(0x12e))/0xa)+parseInt(_0x1b0f0f(0x141))/0xb;if(_0x50e64a===_0x1bb2c6)break;else _0x4c4c75['push'](_0x4c4c75['shift']());}catch(_0xb4e98f){_0x4c4c75['push'](_0x4c4c75['shift']());}}}(a177_0x2c71,0x20252));import{get}from'https';function a177_0x2c71(){const _0x2b8c74=['9384sRBikN','last_version_check','282MqPDok','gray','92uwRUJQ','statusCode','utils/version-check','Run:','data','\x0aRun:\x20','channel','35105pCnzCU','error','2320mzgIkV','1041CtVVpo','210TMKlrl','332674ePVWpu','99YbaeKa','last_version_check_next','latestVersion','19520UxcFTo','version','stderr','parse','write','stable','cyan','yellow','currentVersion','dim','next','https://registry.npmjs.org/@treasuredata/tdx','1374593FVqQmj','toISOString','lastCheck','Request\x20timeout','updateAvailable','Invalid\x20version\x20format','Update\x20available:','now','npm\x20install\x20-g\x20@treasuredata/tdx@'];a177_0x2c71=function(){return _0x2b8c74;};return a177_0x2c71();}import{gt,valid}from'semver';import a177_0x2317b4 from'chalk';import{createGlobalCache}from'./global-cache.js';const CACHE_DURATION_MS=0x18*0x3c*0x3c*0x3e8,NPM_REGISTRY_BASE=a177_0x4a9c7f(0x140),TIMEOUT_MS=0x7d0,stableVersionCache=createGlobalCache(a177_0x4a9c7f(0x122),a177_0x4a9c7f(0x127)),nextVersionCache=createGlobalCache(a177_0x4a9c7f(0x133),'utils/version-check-next');function getCacheForChannel(_0x141937){const _0x58aa18=a177_0x4a9c7f;return _0x141937===_0x58aa18(0x13f)?nextVersionCache:stableVersionCache;}function readCache(_0x5d3d7e){return getCacheForChannel(_0x5d3d7e)['read']()??null;}function writeCache(_0x18e997,_0x25cc41){const _0x49e7f5=a177_0x4a9c7f;try{getCacheForChannel(_0x25cc41)[_0x49e7f5(0x139)]({'lastCheck':new Date()[_0x49e7f5(0x142)](),'latestVersion':_0x18e997});}catch{}}function isCacheValid(_0x1cdcb8){const _0x21cc2d=a177_0x4a9c7f;if(!_0x1cdcb8)return![];const _0x3fb3c5=new Date(_0x1cdcb8[_0x21cc2d(0x143)])['getTime'](),_0x3f2429=Date[_0x21cc2d(0x11f)]();return _0x3f2429-_0x3fb3c5<CACHE_DURATION_MS;}function fetchLatestVersion(_0x20a387=a177_0x4a9c7f(0x13a)){const _0x571391=a177_0x4a9c7f,_0x4580e7=_0x20a387===_0x571391(0x13f)?_0x571391(0x13f):'latest',_0x516aa1=NPM_REGISTRY_BASE+'/'+_0x4580e7;return new Promise((_0x33dc0b,_0x37cce1)=>{const _0x402e52=_0x571391,_0x179c50=get(_0x516aa1,_0x265fa2=>{const _0x31ac56=a177_0x5d3c;if(_0x265fa2[_0x31ac56(0x126)]!==0xc8){clearTimeout(_0x3eaeb3),_0x37cce1(new Error('HTTP\x20'+_0x265fa2[_0x31ac56(0x126)]));return;}let _0x32a8fc='';_0x265fa2['on'](_0x31ac56(0x129),_0x10122b=>{_0x32a8fc+=_0x10122b;}),_0x265fa2['on']('end',()=>{const _0x1a2345=_0x31ac56;clearTimeout(_0x3eaeb3);try{const _0x4446af=JSON[_0x1a2345(0x138)](_0x32a8fc);if(!valid(_0x4446af[_0x1a2345(0x136)])){_0x37cce1(new Error(_0x1a2345(0x146)));return;}_0x33dc0b(_0x4446af[_0x1a2345(0x136)]);}catch(_0x3a10c6){_0x37cce1(_0x3a10c6);}});})['on'](_0x402e52(0x12d),_0x18e425=>{clearTimeout(_0x3eaeb3),_0x37cce1(_0x18e425);}),_0x3eaeb3=setTimeout(()=>{const _0x4c1748=_0x402e52;_0x179c50['destroy'](),_0x37cce1(new Error(_0x4c1748(0x144)));},TIMEOUT_MS);});}function a177_0x5d3c(_0xec69d7,_0x43fbc7){_0xec69d7=_0xec69d7-0x11f;const _0x2c717b=a177_0x2c71();let _0x5d3c59=_0x2c717b[_0xec69d7];return _0x5d3c59;}export async function checkForUpdate(_0x4ca443,_0x500ac2=a177_0x4a9c7f(0x13a)){const _0x36e77b=a177_0x4a9c7f;try{const _0x71180=readCache(_0x500ac2);if(isCacheValid(_0x71180)){const _0x3f831c=gt(_0x71180['latestVersion'],_0x4ca443);return{'updateAvailable':_0x3f831c,'currentVersion':_0x4ca443,'latestVersion':_0x71180[_0x36e77b(0x134)],'channel':_0x500ac2};}const _0x7da736=await fetchLatestVersion(_0x500ac2);writeCache(_0x7da736,_0x500ac2);const _0x2637ae=gt(_0x7da736,_0x4ca443);return{'updateAvailable':_0x2637ae,'currentVersion':_0x4ca443,'latestVersion':_0x7da736,'channel':_0x500ac2};}catch{return null;}}export function displayUpdateNotification(_0x23ec90){const _0x348a26=a177_0x4a9c7f;if(!_0x23ec90[_0x348a26(0x145)])return;const _0x1e7540=_0x23ec90[_0x348a26(0x12b)]===_0x348a26(0x13f)?_0x348a26(0x13f):'latest',_0x2122d0=process[_0x348a26(0x137)]['isTTY']&&!process.env.NO_COLOR,_0xdf3335=_0x2122d0?a177_0x2317b4[_0x348a26(0x124)]('→'):'→',_0x148f25=_0x2122d0?a177_0x2317b4[_0x348a26(0x13e)](_0x23ec90[_0x348a26(0x13d)]):_0x23ec90[_0x348a26(0x13d)],_0x1cda92=_0x2122d0?a177_0x2317b4['green'](_0x23ec90[_0x348a26(0x134)]):_0x23ec90[_0x348a26(0x134)],_0x590d77=_0x2122d0?a177_0x2317b4[_0x348a26(0x13b)](_0x348a26(0x120)+_0x1e7540):_0x348a26(0x120)+_0x1e7540,_0x5ae9c2=_0x2122d0?'\x0a'+a177_0x2317b4[_0x348a26(0x13c)](_0x348a26(0x147))+'\x20'+_0x148f25+'\x20'+_0xdf3335+'\x20'+_0x1cda92+'\x0a'+a177_0x2317b4[_0x348a26(0x13e)](_0x348a26(0x128))+'\x20'+_0x590d77+'\x0a':'\x0aUpdate\x20available:\x20'+_0x148f25+'\x20'+_0xdf3335+'\x20'+_0x1cda92+_0x348a26(0x12a)+_0x590d77+'\x0a';process['stderr'][_0x348a26(0x139)](_0x5ae9c2);}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@treasuredata/tdx",
3
- "version": "0.25.4",
3
+ "version": "0.25.5",
4
4
  "description": "AI-native CLI for Treasure Data - optimized for both human engineers and AI coding assistants",
5
5
  "type": "module",
6
6
  "bin": {