@treasuredata/tdx 2026.3.23 → 2026.3.24

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 (203) 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.js +1 -1
  7. package/dist/commands/agent-test-command.js +1 -1
  8. package/dist/commands/api-command.js +1 -1
  9. package/dist/commands/auth-command.js +1 -1
  10. package/dist/commands/auth-login-command.js +1 -1
  11. package/dist/commands/chat-command.js +1 -1
  12. package/dist/commands/claude-command.js +1 -1
  13. package/dist/commands/claude-statusline-command.js +1 -1
  14. package/dist/commands/claude-usage-command.js +1 -1
  15. package/dist/commands/command.js +1 -1
  16. package/dist/commands/connection-command.js +1 -1
  17. package/dist/commands/databases.js +1 -1
  18. package/dist/commands/delivery-command.js +1 -1
  19. package/dist/commands/describe.js +1 -1
  20. package/dist/commands/engage-campaign-pull-command.js +1 -1
  21. package/dist/commands/engage-campaign-push-command.js +1 -1
  22. package/dist/commands/engage-campaign-validate-command.js +1 -1
  23. package/dist/commands/engage-command.js +1 -1
  24. package/dist/commands/engage-template-pull-command.js +1 -1
  25. package/dist/commands/engage-template-push-command.js +1 -1
  26. package/dist/commands/engage-template-validate-command.js +1 -1
  27. package/dist/commands/job-command.js +1 -1
  28. package/dist/commands/journey-command.js +1 -1
  29. package/dist/commands/journey-validate-command.js +1 -1
  30. package/dist/commands/llm-command.js +1 -1
  31. package/dist/commands/mcp-command.js +1 -1
  32. package/dist/commands/parent-segment-command.js +1 -1
  33. package/dist/commands/policy-command.js +1 -1
  34. package/dist/commands/profile-command.js +1 -1
  35. package/dist/commands/profiles-command.js +1 -1
  36. package/dist/commands/query-command.js +1 -1
  37. package/dist/commands/schedule-command.js +1 -1
  38. package/dist/commands/segment-command.js +1 -1
  39. package/dist/commands/segment-create-command.js +1 -1
  40. package/dist/commands/segment-fields-command.js +1 -1
  41. package/dist/commands/segment-pull-command.js +1 -1
  42. package/dist/commands/segment-push-command.js +1 -1
  43. package/dist/commands/segment-update-command.js +1 -1
  44. package/dist/commands/segment-use-command.js +1 -1
  45. package/dist/commands/segment-validate-command.js +1 -1
  46. package/dist/commands/segments.js +1 -1
  47. package/dist/commands/show.js +1 -1
  48. package/dist/commands/status-command.js +1 -1
  49. package/dist/commands/tables.js +1 -1
  50. package/dist/commands/unset-command.js +1 -1
  51. package/dist/commands/upgrade-command.js +1 -1
  52. package/dist/commands/use-command.js +1 -1
  53. package/dist/commands/user-command.js +1 -1
  54. package/dist/commands/workflow-command.js +1 -1
  55. package/dist/core/auth.js +1 -1
  56. package/dist/core/command-output.js +1 -1
  57. package/dist/core/config.js +1 -1
  58. package/dist/core/connection-cache.js +1 -1
  59. package/dist/core/constants.js +1 -1
  60. package/dist/core/credential-cache.js +1 -1
  61. package/dist/core/global-context.js +1 -1
  62. package/dist/core/keychain.js +1 -1
  63. package/dist/core/oauth-keychain.js +1 -1
  64. package/dist/core/oauth.js +1 -1
  65. package/dist/core/profile.js +1 -1
  66. package/dist/core/project-config.js +1 -1
  67. package/dist/core/session.js +1 -1
  68. package/dist/core/user-cache.js +1 -1
  69. package/dist/core/version.js +1 -1
  70. package/dist/index.js +1 -1
  71. package/dist/mcp/server.js +1 -1
  72. package/dist/mcp/tools/index.js +1 -1
  73. package/dist/mcp/tools/tdx-run.js +1 -1
  74. package/dist/mcp/tools/tdx-search.js +1 -1
  75. package/dist/mcp/utils.js +1 -1
  76. package/dist/proxy/claude-usage-tracker.js +1 -1
  77. package/dist/proxy/passthrough-server.js +1 -1
  78. package/dist/proxy/sse-usage-parser.js +1 -1
  79. package/dist/sdk/agent/agent-config.js +1 -1
  80. package/dist/sdk/agent/agent-ref-parser.js +1 -1
  81. package/dist/sdk/agent/agent-yaml.js +1 -1
  82. package/dist/sdk/agent/test/evaluator.js +1 -1
  83. package/dist/sdk/agent/test/executor.js +1 -1
  84. package/dist/sdk/agent/test/index.js +1 -1
  85. package/dist/sdk/agent/test/output.js +1 -1
  86. package/dist/sdk/agent/test/parser.js +1 -1
  87. package/dist/sdk/agent/tool-target-registry.js +1 -1
  88. package/dist/sdk/api.js +1 -1
  89. package/dist/sdk/client/cdp-api-client.js +1 -1
  90. package/dist/sdk/client/delivery-api-client.js +1 -1
  91. package/dist/sdk/client/endpoints.js +1 -1
  92. package/dist/sdk/client/engage-api-client.js +1 -1
  93. package/dist/sdk/client/http-client.js +1 -1
  94. package/dist/sdk/client/llm-api-client.js +1 -1
  95. package/dist/sdk/client/oauth-refresh.js +1 -1
  96. package/dist/sdk/client/rate-limiter.js +1 -1
  97. package/dist/sdk/client/td-api-client.js +1 -1
  98. package/dist/sdk/client/trino-api-client.js +1 -1
  99. package/dist/sdk/client/workflow-client.js +1 -1
  100. package/dist/sdk/connection-validator.js +1 -1
  101. package/dist/sdk/connection.js +1 -1
  102. package/dist/sdk/delivery.js +1 -1
  103. package/dist/sdk/engage/campaign-pull.js +1 -1
  104. package/dist/sdk/engage/campaign-push.js +1 -1
  105. package/dist/sdk/engage/campaign-validator.js +1 -1
  106. package/dist/sdk/engage/campaign-yaml.js +1 -1
  107. package/dist/sdk/engage/template-pull.js +1 -1
  108. package/dist/sdk/engage/template-push.js +1 -1
  109. package/dist/sdk/engage/template-validator.js +1 -1
  110. package/dist/sdk/engage/template-yaml.js +1 -1
  111. package/dist/sdk/engage/types/campaign-def.js +1 -1
  112. package/dist/sdk/engage/types/campaign-schema.js +1 -1
  113. package/dist/sdk/engage/types/template-schema.js +1 -1
  114. package/dist/sdk/engage.js +1 -1
  115. package/dist/sdk/errors.js +1 -1
  116. package/dist/sdk/index.js +1 -1
  117. package/dist/sdk/io/index.js +1 -1
  118. package/dist/sdk/io/node-filesystem.js +1 -1
  119. package/dist/sdk/job.js +1 -1
  120. package/dist/sdk/journey.js +1 -1
  121. package/dist/sdk/llm/chat-cache.js +1 -1
  122. package/dist/sdk/llm/index.js +1 -1
  123. package/dist/sdk/llm/llm-backup-utils.js +1 -1
  124. package/dist/sdk/llm/model-factors.js +1 -1
  125. package/dist/sdk/personalization.js +1 -1
  126. package/dist/sdk/policy.js +1 -1
  127. package/dist/sdk/query/index.js +1 -1
  128. package/dist/sdk/query/sql-parser.js +1 -1
  129. package/dist/sdk/realtime.js +1 -1
  130. package/dist/sdk/schedule.js +1 -1
  131. package/dist/sdk/segment/child-segment-yaml.js +1 -1
  132. package/dist/sdk/segment/fields-display.js +1 -1
  133. package/dist/sdk/segment/file-discovery.js +1 -1
  134. package/dist/sdk/segment/journey-utils.js +1 -1
  135. package/dist/sdk/segment/journey-validator.js +1 -1
  136. package/dist/sdk/segment/journey-yaml.js +1 -1
  137. package/dist/sdk/segment/parent-segment-preview.js +1 -1
  138. package/dist/sdk/segment/parent-segment-yaml.js +1 -1
  139. package/dist/sdk/segment/pull-workflow.js +1 -1
  140. package/dist/sdk/segment/push-recovery.js +1 -1
  141. package/dist/sdk/segment/push-workflow.js +1 -1
  142. package/dist/sdk/segment/resolution-context.js +1 -1
  143. package/dist/sdk/segment/segment-path-parser.js +1 -1
  144. package/dist/sdk/segment/segment-ref-parser.js +1 -1
  145. package/dist/sdk/segment/segment-validator.js +1 -1
  146. package/dist/sdk/segment/target-resolution.js +1 -1
  147. package/dist/sdk/segment/tdx-config.js +1 -1
  148. package/dist/sdk/segment/types/activation-schema.js +1 -1
  149. package/dist/sdk/segment/types/journey-def.js +1 -1
  150. package/dist/sdk/segment/types/journey-schema.js +1 -1
  151. package/dist/sdk/segment/types/segment-def.js +1 -1
  152. package/dist/sdk/segment/types/segment-schema.js +1 -1
  153. package/dist/sdk/segment/validate-files.js +1 -1
  154. package/dist/sdk/segment/yaml-validator.js +1 -1
  155. package/dist/sdk/segment.js +1 -1
  156. package/dist/sdk/types/index.js +1 -1
  157. package/dist/sdk/types/progress.js +1 -1
  158. package/dist/sdk/user.js +1 -1
  159. package/dist/sdk/util/format-detector.js +1 -1
  160. package/dist/sdk/util/formatters.js +1 -1
  161. package/dist/sdk/util/index.js +1 -1
  162. package/dist/sdk/util/paginate.js +1 -1
  163. package/dist/sdk/util/tree-formatter.js +1 -1
  164. package/dist/sdk/workflow/archive-validation.js +1 -1
  165. package/dist/sdk/workflow/clone-workflow.js +1 -1
  166. package/dist/sdk/workflow/index.js +1 -1
  167. package/dist/sdk/workflow/pull-workflow.js +1 -1
  168. package/dist/sdk/workflow/push-workflow.js +1 -1
  169. package/dist/sdk/workflow/tdx-config.js +1 -1
  170. package/dist/sdk/workflow/workflow-utils.js +1 -1
  171. package/dist/test-utils/command-runner.js +1 -1
  172. package/dist/test-utils/factories.js +1 -1
  173. package/dist/test-utils/fixtures.js +1 -1
  174. package/dist/test-utils/http-mock.js +1 -1
  175. package/dist/test-utils/index.js +1 -1
  176. package/dist/utils/async.js +1 -1
  177. package/dist/utils/colors.js +1 -1
  178. package/dist/utils/diff.js +1 -1
  179. package/dist/utils/file-permissions.js +1 -1
  180. package/dist/utils/file-reader.js +1 -1
  181. package/dist/utils/github-releases.js +1 -1
  182. package/dist/utils/global-cache.js +1 -1
  183. package/dist/utils/json-loader.js +1 -1
  184. package/dist/utils/local-cache.js +1 -1
  185. package/dist/utils/logger/formatters/default-formatter.js +1 -1
  186. package/dist/utils/logger/formatters/index.js +1 -1
  187. package/dist/utils/logger/handlers/console-handler.js +1 -1
  188. package/dist/utils/logger/handlers/file-handler.js +1 -1
  189. package/dist/utils/logger/handlers/index.js +1 -1
  190. package/dist/utils/logger/handlers/null-handler.js +1 -1
  191. package/dist/utils/logger/index.js +1 -1
  192. package/dist/utils/logger/logger.js +1 -1
  193. package/dist/utils/logger/types.js +1 -1
  194. package/dist/utils/option-validation.js +1 -1
  195. package/dist/utils/process.js +1 -1
  196. package/dist/utils/prompt.js +1 -1
  197. package/dist/utils/spinner.js +1 -1
  198. package/dist/utils/sse-parser.js +1 -1
  199. package/dist/utils/string-utils.js +1 -1
  200. package/dist/utils/table-ref-parser.js +1 -1
  201. package/dist/utils/tdx-logger.js +1 -1
  202. package/dist/utils/version-check.js +1 -1
  203. package/package.json +1 -1
@@ -1 +1 @@
1
- const a209_0x368077=a209_0x562d;(function(_0x4d8469,_0x36225a){const _0x532286=a209_0x562d,_0xe551a7=_0x4d8469();while(!![]){try{const _0x487c04=parseInt(_0x532286(0xaf))/0x1+-parseInt(_0x532286(0xb2))/0x2*(parseInt(_0x532286(0xc8))/0x3)+parseInt(_0x532286(0xd9))/0x4+parseInt(_0x532286(0xc7))/0x5*(-parseInt(_0x532286(0xd1))/0x6)+parseInt(_0x532286(0xc0))/0x7+-parseInt(_0x532286(0xb7))/0x8*(parseInt(_0x532286(0xd0))/0x9)+parseInt(_0x532286(0xde))/0xa*(parseInt(_0x532286(0xd3))/0xb);if(_0x487c04===_0x36225a)break;else _0xe551a7['push'](_0xe551a7['shift']());}catch(_0x4fb1bf){_0xe551a7['push'](_0xe551a7['shift']());}}}(a209_0x3536,0x625cc));import{execSync,spawn}from'node:child_process';const SHELL_NAMES=new Set([a209_0x368077(0xcb),a209_0x368077(0xc1),'sh',a209_0x368077(0xba),a209_0x368077(0xb1),a209_0x368077(0xb0),a209_0x368077(0xbb),a209_0x368077(0xdf),a209_0x368077(0xae),a209_0x368077(0xac),'nu','ion',a209_0x368077(0xd4),a209_0x368077(0xa6)]),EPHEMERAL_SHELL_SPAWNERS=new Set([a209_0x368077(0xdb),a209_0x368077(0xe0),a209_0x368077(0xa0),a209_0x368077(0xd7),a209_0x368077(0xaa)]);function getProcessInfoWindows(_0x488eff){const _0x246715=a209_0x368077;try{if(!Number[_0x246715(0xb5)](_0x488eff)||_0x488eff<=0x0)return null;const _0x27a812=_0x246715(0xad)+_0x488eff+_0x246715(0xbd),_0x4356f2=execSync('powershell.exe\x20-NoProfile\x20-NonInteractive\x20-Command\x20\x22'+_0x27a812+'\x22',{'encoding':_0x246715(0xab),'windowsHide':!![],'stdio':[_0x246715(0xb3),_0x246715(0xb3),_0x246715(0xb3)]})[_0x246715(0x9f)]();if(!_0x4356f2)return null;const [_0x49ac5b,..._0x12e761]=_0x4356f2[_0x246715(0xb6)](','),_0x2679e2=parseInt(_0x49ac5b,0xa),_0x373552=_0x12e761[_0x246715(0xdc)](',')[_0x246715(0x9f)]();if(isNaN(_0x2679e2)||!_0x373552)return null;return{'pid':_0x488eff,'ppid':_0x2679e2,'comm':_0x373552[_0x246715(0xb9)](/\.exe$/i,'')};}catch{return null;}}function getProcessInfoPosix(_0x5213b9){const _0x1480a6=a209_0x368077;try{const _0x4685f7=0x400000;if(!Number[_0x1480a6(0xb5)](_0x5213b9)||_0x5213b9<=0x0||_0x5213b9>_0x4685f7)return null;const _0x32df1b=execSync(_0x1480a6(0xa9)+_0x5213b9+_0x1480a6(0x9d),{'encoding':_0x1480a6(0xab),'stdio':'pipe'})['trim'](),[_0x1c6629,..._0xff45da]=_0x32df1b[_0x1480a6(0xb6)](/\s+/),_0x30a829=parseInt(_0x1c6629,0xa),_0x143ee3=_0xff45da[_0x1480a6(0xdc)]('\x20');if(isNaN(_0x30a829))return null;return{'pid':_0x5213b9,'ppid':_0x30a829,'comm':_0x143ee3};}catch{return null;}}function getProcessInfo(_0x157585){const _0x2f7f23=a209_0x368077;if(process[_0x2f7f23(0xc5)]===_0x2f7f23(0xce))return getProcessInfoWindows(_0x157585);return getProcessInfoPosix(_0x157585);}function getBasename(_0x5ea807){const _0x4cfaaf=a209_0x368077;return _0x5ea807['replace'](/^-/,'')[_0x4cfaaf(0xb6)]('/')[_0x4cfaaf(0xcc)]()?.[_0x4cfaaf(0xc2)]()||'';}function isShell(_0x39a5cc){const _0x49b77e=a209_0x368077;return SHELL_NAMES[_0x49b77e(0xd8)](getBasename(_0x39a5cc));}function isEphemeralShellSpawner(_0x683a1){const _0x340a6d=a209_0x368077;return EPHEMERAL_SHELL_SPAWNERS[_0x340a6d(0xd8)](getBasename(_0x683a1));}let cachedShellPID;function findShellPID(){const _0x4c2bbc=a209_0x368077;if(process[_0x4c2bbc(0xa3)]===undefined)return process[_0x4c2bbc(0xa4)];let _0x62f160=process[_0x4c2bbc(0xa3)];const _0x6f977c=0xa;let _0x1eb2dd=0x0;while(_0x1eb2dd<_0x6f977c){const _0x17066a=getProcessInfo(_0x62f160);if(!_0x17066a)break;if(isShell(_0x17066a[_0x4c2bbc(0xc3)])){const _0x8b77b4=getProcessInfo(_0x17066a[_0x4c2bbc(0xa3)]);if(_0x8b77b4&&isEphemeralShellSpawner(_0x8b77b4['comm'])){_0x62f160=_0x17066a['ppid'],_0x1eb2dd++;continue;}return _0x17066a[_0x4c2bbc(0xa4)];}if(_0x17066a[_0x4c2bbc(0xa3)]===0x0||_0x17066a['ppid']===0x1){if(isShell(_0x17066a[_0x4c2bbc(0xc3)]))return _0x17066a['pid'];break;}_0x62f160=_0x17066a['ppid'],_0x1eb2dd++;}return process[_0x4c2bbc(0xa3)]!==undefined?process[_0x4c2bbc(0xa3)]:process[_0x4c2bbc(0xa4)];}export function getPPID(){return cachedShellPID===undefined&&(cachedShellPID=findShellPID()),cachedShellPID;}export function clearPPIDCache(){cachedShellPID=undefined;}export function isProcessRunning(_0x52fa4e){const _0x4093dd=a209_0x368077;if(!Number[_0x4093dd(0xb5)](_0x52fa4e)||_0x52fa4e<=0x0)return![];try{return process[_0x4093dd(0xe1)](_0x52fa4e,0x0),!![];}catch{return![];}}export function openBrowser(_0x43619d){const _0x432e22=a209_0x368077;let _0x5e9fc5;try{_0x5e9fc5=new URL(_0x43619d);}catch{throw new Error(_0x432e22(0xd2)+_0x43619d);}if(_0x5e9fc5[_0x432e22(0xc4)]!==_0x432e22(0xca)&&_0x5e9fc5[_0x432e22(0xc4)]!==_0x432e22(0xd6))throw new Error(_0x432e22(0xbe)+_0x5e9fc5[_0x432e22(0xc4)]);const _0x42829f=_0x5e9fc5['href'],_0xd8c141=process[_0x432e22(0xc5)];if(_0xd8c141===_0x432e22(0xce))spawn(_0x432e22(0xc9),['/c',_0x432e22(0xbc),'',_0x42829f],{'detached':!![],'stdio':_0x432e22(0xc6)})[_0x432e22(0xb4)]();else{const _0x2c8958=_0xd8c141===_0x432e22(0xa8)?_0x432e22(0xbf):_0x432e22(0xa5);spawn(_0x2c8958,[_0x42829f],{'detached':!![],'stdio':_0x432e22(0xc6)})['unref']();}}export function isWindows(){const _0x6d03fa=a209_0x368077;return process[_0x6d03fa(0xc5)]===_0x6d03fa(0xce);}export function getCrossSpawnOptions(_0x231047){return{..._0x231047??{},'shell':isWindows()};}export function escapeWindowsArg(_0x30424b){const _0x3a97fa=a209_0x368077;if(!/[ \t"&|<>^%!`\r\n]/[_0x3a97fa(0xa1)](_0x30424b))return _0x30424b;const _0x38ea05=_0x30424b['replace'](/"/g,'\x22\x22');return'\x22'+_0x38ea05+'\x22';}export function crossSpawn(_0x2ec379,_0x41c48c,_0xa6dbea){const _0x43e727=a209_0x368077;if(isWindows()){const _0x4cb107=escapeWindowsArg(_0x2ec379),_0x31bcbd=_0x41c48c[_0x43e727(0x9e)](escapeWindowsArg),_0x1c2966=[_0x4cb107,..._0x31bcbd]['join']('\x20');return spawn(_0x1c2966,[],{..._0xa6dbea,'shell':!![]});}return spawn(_0x2ec379,_0x41c48c,{..._0xa6dbea,'shell':![]});}function a209_0x562d(_0x2d7852,_0x5049c5){_0x2d7852=_0x2d7852-0x9d;const _0x3536a2=a209_0x3536();let _0x562d3=_0x3536a2[_0x2d7852];return _0x562d3;}export function gracefulExit(_0x1bcd07=0x0){const _0x2e719b=a209_0x368077;isWindows()?setTimeout(()=>process[_0x2e719b(0xcd)](_0x1bcd07),0x32):process[_0x2e719b(0xcd)](_0x1bcd07);}function a209_0x3536(){const _0x58c581=['trim','cursor','test','error','ppid','pid','xdg-open','xonsh','which','darwin','ps\x20-p\x20','treasure\x20studio','utf-8','powershell','Get-CimInstance\x20Win32_Process\x20-Filter\x20\x22ProcessId=','pwsh','205367qXrElb','tcsh','ksh','89246hTUdqE','pipe','unref','isInteger','split','4763272GQbZnN','where.exe','replace','fish','csh','start','\x22\x20|\x20Select-Object\x20-Property\x20ParentProcessId,Name\x20|\x20ForEach-Object\x20{\x20\x22$($_.ParentProcessId),$($_.Name)\x22\x20}','Unsupported\x20protocol:\x20','open','2496739JeODYB','zsh','toLowerCase','comm','protocol','platform','ignore','15jLrwfZ','18HVErSQ','cmd.exe','http:','bash','pop','exit','win32','toString','9TwdnCZ','710058kAGSgh','Invalid\x20URL:\x20','341JuDKvt','elvish','stdout','https:','electron','has','1998764UottEx','data','claude','join','stderr','180430cBHrbl','dash','code','kill','\x20-o\x20ppid=,comm=','map'];a209_0x3536=function(){return _0x58c581;};return a209_0x3536();}export function findExecutable(_0x37572f,_0xa4af59=0x1388){return new Promise(_0x22c026=>{const _0x4cf2e4=a209_0x562d,_0xf1ad1=isWindows()?_0x4cf2e4(0xb8):_0x4cf2e4(0xa7);let _0x200a30=![];const _0x24e23d=crossSpawn(_0xf1ad1,[_0x37572f],{'stdio':_0x4cf2e4(0xb3),'shell':isWindows()}),_0x2acbe5=setTimeout(()=>{const _0x31cad6=_0x4cf2e4;!_0x200a30&&(_0x200a30=!![],_0x24e23d[_0x31cad6(0xe1)](),_0x22c026(null));},_0xa4af59);let _0x3282ca='';_0x24e23d[_0x4cf2e4(0xd5)]?.['on'](_0x4cf2e4(0xda),_0x339239=>{const _0x446334=_0x4cf2e4;_0x3282ca+=_0x339239[_0x446334(0xcf)]();}),_0x24e23d[_0x4cf2e4(0xdd)]?.['on'](_0x4cf2e4(0xda),()=>{}),_0x24e23d['on'](_0x4cf2e4(0xcd),_0x144791=>{const _0x2019b2=_0x4cf2e4;if(_0x200a30)return;_0x200a30=!![],clearTimeout(_0x2acbe5);if(_0x144791===0x0&&_0x3282ca[_0x2019b2(0x9f)]()){const _0x28dcd1=_0x3282ca[_0x2019b2(0x9f)]()[_0x2019b2(0xb6)](/\r?\n/)[0x0];_0x22c026(_0x28dcd1);}else _0x22c026(null);}),_0x24e23d['on'](_0x4cf2e4(0xa2),()=>{if(_0x200a30)return;_0x200a30=!![],clearTimeout(_0x2acbe5),_0x22c026(null);});});}
1
+ function a209_0x1840(_0x2b914d,_0x4db58a){_0x2b914d=_0x2b914d-0x12a;const _0x811afe=a209_0x811a();let _0x1840e1=_0x811afe[_0x2b914d];return _0x1840e1;}const a209_0x3669ca=a209_0x1840;(function(_0x3de28d,_0x3fb554){const _0x202ae2=a209_0x1840,_0x19209d=_0x3de28d();while(!![]){try{const _0x4054ee=-parseInt(_0x202ae2(0x134))/0x1*(parseInt(_0x202ae2(0x158))/0x2)+parseInt(_0x202ae2(0x15d))/0x3+-parseInt(_0x202ae2(0x136))/0x4*(parseInt(_0x202ae2(0x13d))/0x5)+-parseInt(_0x202ae2(0x130))/0x6+parseInt(_0x202ae2(0x168))/0x7+-parseInt(_0x202ae2(0x12f))/0x8*(parseInt(_0x202ae2(0x156))/0x9)+parseInt(_0x202ae2(0x13e))/0xa*(parseInt(_0x202ae2(0x132))/0xb);if(_0x4054ee===_0x3fb554)break;else _0x19209d['push'](_0x19209d['shift']());}catch(_0x2ab699){_0x19209d['push'](_0x19209d['shift']());}}}(a209_0x811a,0xc5bdc));import{execSync,spawn}from'node:child_process';const SHELL_NAMES=new Set([a209_0x3669ca(0x14b),a209_0x3669ca(0x148),'sh',a209_0x3669ca(0x16b),'ksh',a209_0x3669ca(0x155),a209_0x3669ca(0x15f),a209_0x3669ca(0x147),a209_0x3669ca(0x12a),a209_0x3669ca(0x154),'nu',a209_0x3669ca(0x14e),a209_0x3669ca(0x14d),a209_0x3669ca(0x165)]),EPHEMERAL_SHELL_SPAWNERS=new Set([a209_0x3669ca(0x14c),a209_0x3669ca(0x12e),'cursor',a209_0x3669ca(0x14f),a209_0x3669ca(0x12d)]);function getProcessInfoWindows(_0x588747){const _0x54d51a=a209_0x3669ca;try{if(!Number[_0x54d51a(0x138)](_0x588747)||_0x588747<=0x0)return null;const _0x3b0772='Get-CimInstance\x20Win32_Process\x20-Filter\x20\x22ProcessId='+_0x588747+_0x54d51a(0x133),_0x448d09=execSync(_0x54d51a(0x16a)+_0x3b0772+'\x22',{'encoding':_0x54d51a(0x164),'windowsHide':!![],'stdio':[_0x54d51a(0x162),'pipe','pipe']})[_0x54d51a(0x13b)]();if(!_0x448d09)return null;const [_0x3cd1e2,..._0x9ddd2d]=_0x448d09[_0x54d51a(0x157)](','),_0x35cebf=parseInt(_0x3cd1e2,0xa),_0x118437=_0x9ddd2d[_0x54d51a(0x161)](',')[_0x54d51a(0x13b)]();if(isNaN(_0x35cebf)||!_0x118437)return null;return{'pid':_0x588747,'ppid':_0x35cebf,'comm':_0x118437[_0x54d51a(0x14a)](/\.exe$/i,'')};}catch{return null;}}function getProcessInfoPosix(_0x86a737){const _0x4372b6=a209_0x3669ca;try{const _0x297385=0x400000;if(!Number[_0x4372b6(0x138)](_0x86a737)||_0x86a737<=0x0||_0x86a737>_0x297385)return null;const _0x52d868=execSync(_0x4372b6(0x15b)+_0x86a737+_0x4372b6(0x131),{'encoding':_0x4372b6(0x164),'stdio':'pipe'})[_0x4372b6(0x13b)](),[_0x5646f1,..._0x2fb02e]=_0x52d868[_0x4372b6(0x157)](/\s+/),_0x219d42=parseInt(_0x5646f1,0xa),_0x3a7163=_0x2fb02e[_0x4372b6(0x161)]('\x20');if(isNaN(_0x219d42))return null;return{'pid':_0x86a737,'ppid':_0x219d42,'comm':_0x3a7163};}catch{return null;}}function getProcessInfo(_0x2914ed){const _0x4f8510=a209_0x3669ca;if(process[_0x4f8510(0x15a)]==='win32')return getProcessInfoWindows(_0x2914ed);return getProcessInfoPosix(_0x2914ed);}function getBasename(_0x81890a){const _0x5bcfb1=a209_0x3669ca;return _0x81890a['replace'](/^-/,'')[_0x5bcfb1(0x157)]('/')[_0x5bcfb1(0x152)]()?.[_0x5bcfb1(0x135)]()||'';}function isShell(_0x4bb85a){return SHELL_NAMES['has'](getBasename(_0x4bb85a));}function isEphemeralShellSpawner(_0x1e86d4){return EPHEMERAL_SHELL_SPAWNERS['has'](getBasename(_0x1e86d4));}let cachedShellPID;function findShellPID(){const _0x200a8c=a209_0x3669ca;if(process[_0x200a8c(0x13a)]===undefined)return process[_0x200a8c(0x141)];let _0x3a4d1b=process['ppid'];const _0x3066cc=0xa;let _0x53a24f=0x0;while(_0x53a24f<_0x3066cc){const _0x9cc5e1=getProcessInfo(_0x3a4d1b);if(!_0x9cc5e1)break;if(isShell(_0x9cc5e1['comm'])){const _0x527882=getProcessInfo(_0x9cc5e1[_0x200a8c(0x13a)]);if(_0x527882&&isEphemeralShellSpawner(_0x527882['comm'])){_0x3a4d1b=_0x9cc5e1[_0x200a8c(0x13a)],_0x53a24f++;continue;}return _0x9cc5e1[_0x200a8c(0x141)];}if(_0x9cc5e1[_0x200a8c(0x13a)]===0x0||_0x9cc5e1[_0x200a8c(0x13a)]===0x1){if(isShell(_0x9cc5e1[_0x200a8c(0x139)]))return _0x9cc5e1['pid'];break;}_0x3a4d1b=_0x9cc5e1[_0x200a8c(0x13a)],_0x53a24f++;}return process[_0x200a8c(0x13a)]!==undefined?process['ppid']:process[_0x200a8c(0x141)];}export function getPPID(){return cachedShellPID===undefined&&(cachedShellPID=findShellPID()),cachedShellPID;}export function clearPPIDCache(){cachedShellPID=undefined;}export function isProcessRunning(_0x3926c5){const _0x13b42c=a209_0x3669ca;if(!Number[_0x13b42c(0x138)](_0x3926c5)||_0x3926c5<=0x0)return![];try{return process[_0x13b42c(0x160)](_0x3926c5,0x0),!![];}catch{return![];}}export function openBrowser(_0x4d1383){const _0x48980e=a209_0x3669ca;let _0x48cfaa;try{_0x48cfaa=new URL(_0x4d1383);}catch{throw new Error(_0x48980e(0x137)+_0x4d1383);}if(_0x48cfaa[_0x48980e(0x149)]!==_0x48980e(0x151)&&_0x48cfaa[_0x48980e(0x149)]!==_0x48980e(0x15e))throw new Error(_0x48980e(0x167)+_0x48cfaa[_0x48980e(0x149)]);const _0x5cb1bd=_0x48cfaa[_0x48980e(0x145)],_0x1a78fa=process[_0x48980e(0x15a)];if(_0x1a78fa===_0x48980e(0x153))spawn(_0x48980e(0x13c),['/c',_0x48980e(0x12c),'',_0x5cb1bd],{'detached':!![],'stdio':'ignore'})['unref']();else{const _0xa9bf4=_0x1a78fa===_0x48980e(0x159)?_0x48980e(0x140):_0x48980e(0x150);spawn(_0xa9bf4,[_0x5cb1bd],{'detached':!![],'stdio':_0x48980e(0x142)})[_0x48980e(0x166)]();}}export function isWindows(){const _0x5a7823=a209_0x3669ca;return process[_0x5a7823(0x15a)]==='win32';}export function getCrossSpawnOptions(_0x2d4385){return{..._0x2d4385??{},'shell':isWindows()};}export function escapeWindowsArg(_0x3d43fc){const _0x2a4506=a209_0x3669ca;if(!/[ \t"&|<>^%!`\r\n]/[_0x2a4506(0x12b)](_0x3d43fc))return _0x3d43fc;const _0x185ce6=_0x3d43fc['replace'](/"/g,'\x22\x22');return'\x22'+_0x185ce6+'\x22';}export function crossSpawn(_0x10cde1,_0x50bddb,_0x14a91e){const _0x27656a=a209_0x3669ca;if(isWindows()){const _0x40c7f0=escapeWindowsArg(_0x10cde1),_0x515c02=_0x50bddb[_0x27656a(0x15c)](escapeWindowsArg),_0x45fb4b=[_0x40c7f0,..._0x515c02][_0x27656a(0x161)]('\x20');return spawn(_0x45fb4b,[],{..._0x14a91e,'shell':!![]});}return spawn(_0x10cde1,_0x50bddb,{..._0x14a91e,'shell':![]});}export function gracefulExit(_0xa4f805=0x0){const _0x4319b6=a209_0x3669ca;isWindows()?setTimeout(()=>process[_0x4319b6(0x146)](_0xa4f805),0x32):process[_0x4319b6(0x146)](_0xa4f805);}function a209_0x811a(){const _0x24c8e3=['where.exe','powershell.exe\x20-NoProfile\x20-NonInteractive\x20-Command\x20\x22','fish','pwsh','test','start','treasure\x20studio','code','294288mdPIVS','2414730hLZyCw','\x20-o\x20ppid=,comm=','6259ceoHJz','\x22\x20|\x20Select-Object\x20-Property\x20ParentProcessId,Name\x20|\x20ForEach-Object\x20{\x20\x22$($_.ParentProcessId),$($_.Name)\x22\x20}','2ksMkwT','toLowerCase','530064ijWTzP','Invalid\x20URL:\x20','isInteger','comm','ppid','trim','cmd.exe','40ToIDil','26140lQnUcR','stdout','open','pid','ignore','toString','stderr','href','exit','dash','zsh','protocol','replace','bash','claude','elvish','ion','electron','xdg-open','http:','pop','win32','powershell','tcsh','162WxVxSN','split','1002262MvmfTW','darwin','platform','ps\x20-p\x20','map','3138264wqtzhi','https:','csh','kill','join','pipe','data','utf-8','xonsh','unref','Unsupported\x20protocol:\x20','9824409qlhuFG'];a209_0x811a=function(){return _0x24c8e3;};return a209_0x811a();}export function findExecutable(_0x5418e2,_0x1fb273=0x1388){return new Promise(_0x1ea203=>{const _0x457000=a209_0x1840,_0x5e52ac=isWindows()?_0x457000(0x169):'which';let _0x530787=![];const _0x2ee3d0=crossSpawn(_0x5e52ac,[_0x5418e2],{'stdio':_0x457000(0x162),'shell':isWindows()}),_0x1640e2=setTimeout(()=>{const _0x44d6d6=_0x457000;!_0x530787&&(_0x530787=!![],_0x2ee3d0[_0x44d6d6(0x160)](),_0x1ea203(null));},_0x1fb273);let _0x19cb06='';_0x2ee3d0[_0x457000(0x13f)]?.['on'](_0x457000(0x163),_0x37432b=>{const _0xff900f=_0x457000;_0x19cb06+=_0x37432b[_0xff900f(0x143)]();}),_0x2ee3d0[_0x457000(0x144)]?.['on'](_0x457000(0x163),()=>{}),_0x2ee3d0['on'](_0x457000(0x146),_0x2ed3e2=>{const _0x1e6291=_0x457000;if(_0x530787)return;_0x530787=!![],clearTimeout(_0x1640e2);if(_0x2ed3e2===0x0&&_0x19cb06['trim']()){const _0x47c8ae=_0x19cb06[_0x1e6291(0x13b)]()[_0x1e6291(0x157)](/\r?\n/)[0x0];_0x1ea203(_0x47c8ae);}else _0x1ea203(null);}),_0x2ee3d0['on']('error',()=>{if(_0x530787)return;_0x530787=!![],clearTimeout(_0x1640e2),_0x1ea203(null);});});}
@@ -1 +1 @@
1
- function a210_0x52fa(_0x1e66c3,_0x5b3d55){_0x1e66c3=_0x1e66c3-0x1ec;const _0x4b108a=a210_0x4b10();let _0x52fac7=_0x4b108a[_0x1e66c3];return _0x52fac7;}function a210_0x4b10(){const _0xae58cb=['isTTY','444jqRvNM','setRawMode','923725bzNlbf','1112815plSlVP','5836432dkrTRH','toLowerCase','createInterface','24429EXVkLK','setEncoding','pause','close','45aPxozT','write','4450544gVpvdW','84882vnqQHn','\x20[y/N]\x20','removeListener','resume','680990puXZDL','290UZgqbR','stdin','stderr','data','question'];a210_0x4b10=function(){return _0xae58cb;};return a210_0x4b10();}(function(_0x52a6c0,_0x1b30a4){const _0x7b35fa=a210_0x52fa,_0x43252d=_0x52a6c0();while(!![]){try{const _0x13516f=parseInt(_0x7b35fa(0x1f6))/0x1+-parseInt(_0x7b35fa(0x1ee))/0x2*(-parseInt(_0x7b35fa(0x1fb))/0x3)+-parseInt(_0x7b35fa(0x201))/0x4+-parseInt(_0x7b35fa(0x1f7))/0x5+parseInt(_0x7b35fa(0x1f4))/0x6*(parseInt(_0x7b35fa(0x202))/0x7)+-parseInt(_0x7b35fa(0x1f8))/0x8+parseInt(_0x7b35fa(0x1ff))/0x9*(-parseInt(_0x7b35fa(0x1ed))/0xa);if(_0x13516f===_0x1b30a4)break;else _0x43252d['push'](_0x43252d['shift']());}catch(_0x3da17e){_0x43252d['push'](_0x43252d['shift']());}}}(a210_0x4b10,0x91a38));import*as a210_0x50876d from'readline';import{gracefulExit}from'./process.js';export function isInteractive(){const _0xfb63c=a210_0x52fa;return process[_0xfb63c(0x1ef)][_0xfb63c(0x1f3)]===!![];}export async function confirm(_0x9c326b){const _0x1c63b5=a210_0x52fa,_0x2d2460=a210_0x50876d[_0x1c63b5(0x1fa)]({'input':process[_0x1c63b5(0x1ef)],'output':process['stdout']});return new Promise(_0x5bd5e5=>{const _0x24d876=_0x1c63b5;_0x2d2460[_0x24d876(0x1f2)](_0x9c326b+'\x20(y/N):\x20',_0x3d4ceb=>{const _0x442a00=_0x24d876;_0x2d2460[_0x442a00(0x1fe)](),_0x5bd5e5(_0x3d4ceb['toLowerCase']()==='y'||_0x3d4ceb[_0x442a00(0x1f9)]()==='yes');});});}export async function confirmKey(_0x5a852d){const _0x1459a2=a210_0x52fa;if(!process['stdin'][_0x1459a2(0x1f3)])return![];return process['stderr'][_0x1459a2(0x200)](_0x5a852d+_0x1459a2(0x203)),new Promise(_0x1561f0=>{const _0x1a7c76=_0x1459a2,_0xb067b6=process[_0x1a7c76(0x1ef)];_0xb067b6[_0x1a7c76(0x1f5)](!![]),_0xb067b6[_0x1a7c76(0x1ec)](),_0xb067b6[_0x1a7c76(0x1fc)]('utf8');const _0x1ee4b8=_0x35061d=>{const _0x29a555=_0x1a7c76;_0xb067b6[_0x29a555(0x1f5)](![]),_0xb067b6[_0x29a555(0x1fd)](),_0xb067b6[_0x29a555(0x204)](_0x29a555(0x1f1),_0x1ee4b8);if(_0x35061d==='\x1b'){process[_0x29a555(0x1f0)]['write']('\x0a'),_0x1561f0(![]);return;}_0x35061d==='\x03'&&(process['stderr'][_0x29a555(0x200)]('\x0a'),gracefulExit(0x82));if(_0x35061d[_0x29a555(0x1f9)]()==='y'){process['stderr']['write']('y\x0a'),_0x1561f0(!![]);return;}process[_0x29a555(0x1f0)]['write']('\x0a'),_0x1561f0(![]);};_0xb067b6['on'](_0x1a7c76(0x1f1),_0x1ee4b8);});}
1
+ (function(_0x3e2efa,_0x28073e){const _0x49581=a210_0x1ff9,_0x3b7d56=_0x3e2efa();while(!![]){try{const _0x52dc9e=parseInt(_0x49581(0x1d5))/0x1*(parseInt(_0x49581(0x1d7))/0x2)+-parseInt(_0x49581(0x1c7))/0x3+parseInt(_0x49581(0x1d6))/0x4*(-parseInt(_0x49581(0x1dd))/0x5)+-parseInt(_0x49581(0x1d3))/0x6+-parseInt(_0x49581(0x1cc))/0x7*(-parseInt(_0x49581(0x1c6))/0x8)+-parseInt(_0x49581(0x1d9))/0x9*(parseInt(_0x49581(0x1d2))/0xa)+parseInt(_0x49581(0x1d4))/0xb;if(_0x52dc9e===_0x28073e)break;else _0x3b7d56['push'](_0x3b7d56['shift']());}catch(_0x14a7c5){_0x3b7d56['push'](_0x3b7d56['shift']());}}}(a210_0x38de,0x85740));function a210_0x38de(){const _0x507161=['20dPQOTG','47886Lwssky','removeListener','5651829XYbCAG','isTTY','stdout','resume','608245TcUuIA','createInterface','data','1171416xcBPdy','1640679bpJCzq','utf8','stdin','pause','close','21fVfaIx','setEncoding','write','stderr','setRawMode','toLowerCase','10VTwKHc','326142HJFIxc','13491819OqRMuQ','30SJYtoY'];a210_0x38de=function(){return _0x507161;};return a210_0x38de();}import*as a210_0x32c3f0 from'readline';import{gracefulExit}from'./process.js';export function isInteractive(){const _0x54bc7e=a210_0x1ff9;return process[_0x54bc7e(0x1c9)]['isTTY']===!![];}function a210_0x1ff9(_0x3b1364,_0x429017){_0x3b1364=_0x3b1364-0x1c6;const _0x38ded4=a210_0x38de();let _0x1ff94a=_0x38ded4[_0x3b1364];return _0x1ff94a;}export async function confirm(_0x2a84bb){const _0x5802be=a210_0x1ff9,_0x2cd8ca=a210_0x32c3f0[_0x5802be(0x1de)]({'input':process['stdin'],'output':process[_0x5802be(0x1db)]});return new Promise(_0x19c7a0=>{_0x2cd8ca['question'](_0x2a84bb+'\x20(y/N):\x20',_0x49a50d=>{const _0x4a456d=a210_0x1ff9;_0x2cd8ca[_0x4a456d(0x1cb)](),_0x19c7a0(_0x49a50d[_0x4a456d(0x1d1)]()==='y'||_0x49a50d['toLowerCase']()==='yes');});});}export async function confirmKey(_0x3e8767){const _0x571f45=a210_0x1ff9;if(!process['stdin'][_0x571f45(0x1da)])return![];return process[_0x571f45(0x1cf)][_0x571f45(0x1ce)](_0x3e8767+'\x20[y/N]\x20'),new Promise(_0x55c1c8=>{const _0x322e36=_0x571f45,_0x33c4bf=process[_0x322e36(0x1c9)];_0x33c4bf['setRawMode'](!![]),_0x33c4bf[_0x322e36(0x1dc)](),_0x33c4bf[_0x322e36(0x1cd)](_0x322e36(0x1c8));const _0x1d73f6=_0x392369=>{const _0x238485=_0x322e36;_0x33c4bf[_0x238485(0x1d0)](![]),_0x33c4bf[_0x238485(0x1ca)](),_0x33c4bf[_0x238485(0x1d8)](_0x238485(0x1df),_0x1d73f6);if(_0x392369==='\x1b'){process[_0x238485(0x1cf)][_0x238485(0x1ce)]('\x0a'),_0x55c1c8(![]);return;}_0x392369==='\x03'&&(process[_0x238485(0x1cf)][_0x238485(0x1ce)]('\x0a'),gracefulExit(0x82));if(_0x392369[_0x238485(0x1d1)]()==='y'){process[_0x238485(0x1cf)][_0x238485(0x1ce)]('y\x0a'),_0x55c1c8(!![]);return;}process['stderr']['write']('\x0a'),_0x55c1c8(![]);};_0x33c4bf['on'](_0x322e36(0x1df),_0x1d73f6);});}
@@ -1 +1 @@
1
- (function(_0x38786b,_0x3bdfee){const _0xf37371=a211_0x4f8e,_0x195504=_0x38786b();while(!![]){try{const _0x1f0776=parseInt(_0xf37371(0x136))/0x1*(-parseInt(_0xf37371(0x11d))/0x2)+parseInt(_0xf37371(0x133))/0x3+parseInt(_0xf37371(0x130))/0x4+parseInt(_0xf37371(0x12d))/0x5+parseInt(_0xf37371(0x137))/0x6*(-parseInt(_0xf37371(0x134))/0x7)+-parseInt(_0xf37371(0x12c))/0x8+-parseInt(_0xf37371(0x126))/0x9;if(_0x1f0776===_0x3bdfee)break;else _0x195504['push'](_0x195504['shift']());}catch(_0x463348){_0x195504['push'](_0x195504['shift']());}}}(a211_0x5439,0xa7e51));import a211_0x3eb795 from'ora';function a211_0x4f8e(_0x200c6f,_0x201332){_0x200c6f=_0x200c6f-0x11d;const _0x5439b1=a211_0x5439();let _0x4f8e66=_0x5439b1[_0x200c6f];return _0x4f8e66;}import{isWindows}from'./process.js';const windowsSpinner={'interval':0x3e8,'frames':['•']};export function createCommandSpinner(_0x101ed2,_0x2b8c16={}){const _0x5369e8=a211_0x4f8e,{verbose:verbose=![],forceEnabled:forceEnabled=![]}=_0x2b8c16;return a211_0x3eb795({'text':_0x101ed2,'color':_0x5369e8(0x12b),'stream':process['stderr'],'isEnabled':forceEnabled||process['stderr'][_0x5369e8(0x132)]&&!verbose,...isWindows()&&{'spinner':windowsSpinner}});}function a211_0x5439(){const _0x18eee6=['intervalFactory','\x20[Job\x20ID:\x20','cyan','4330096vzlSCj','1569165nBfDml','trim','start','3947072KXPoEg','phase','isTTY','4087041ZRXecr','46837VPXThZ','isSpinning','53tNGuCf','780laGywN','2978QNWGkB','extra','replace','now','clock','jobId','text','...','floor','4367178TPASCf','Processing','stop'];a211_0x5439=function(){return _0x18eee6;};return a211_0x5439();}export async function withSpinner(_0x26b438,_0x5b7b40,_0x24d27e={}){const _0x3315b8=a211_0x4f8e,_0x5baf00=_0x24d27e['clock']??(()=>Date[_0x3315b8(0x120)]()),_0x6e4c9a=createCommandSpinner(_0x26b438,_0x24d27e);_0x6e4c9a[_0x3315b8(0x12f)]();const _0x728061=_0x5baf00();try{const _0x474638=await _0x5b7b40(),_0x4bf039=_0x5baf00()-_0x728061;return _0x6e4c9a[_0x3315b8(0x128)](),{'data':_0x474638,'elapsedMs':_0x4bf039};}catch(_0xeb89ab){_0x6e4c9a[_0x3315b8(0x128)]();throw _0xeb89ab;}}export async function withProgressSpinner(_0x4f4306,_0x38d3fa,_0x4ec6f3={}){const _0x528529=a211_0x4f8e,_0x9781a9=_0x4ec6f3[_0x528529(0x121)]??(()=>Date[_0x528529(0x120)]()),_0x39a8a4=_0x4ec6f3[_0x528529(0x129)]??setInterval,_0x29db30=createCommandSpinner(_0x4f4306,_0x4ec6f3);_0x29db30['start']();const _0x281a5a=_0x9781a9(),_0x2628b5=_0x4f4306[_0x528529(0x11f)](_0x528529(0x124),'')[_0x528529(0x12e)]()||_0x528529(0x127),_0x508e84={};let _0x415425=_0x4f4306;const _0x1cb185=()=>{const _0x517ffd=_0x528529;if(!_0x29db30['isSpinning'])return;const _0x5223a9=_0x9781a9()-_0x281a5a,_0x112e5a=formatElapsed(_0x5223a9),_0x3c1415=_0x508e84[_0x517ffd(0x131)]?.['trim']()||_0x2628b5,_0x3b8fc9=_0x508e84[_0x517ffd(0x122)]?_0x517ffd(0x12a)+_0x508e84[_0x517ffd(0x122)]+']':'',_0x1e07a3=_0x508e84['extra']?'\x20'+_0x508e84['extra']:'',_0x3f6e9c=_0x3c1415+'\x20'+_0x112e5a+_0x1e07a3+_0x3b8fc9;_0x3f6e9c!==_0x415425&&_0x3f6e9c[_0x517ffd(0x12e)]()&&(_0x29db30[_0x517ffd(0x123)]=_0x3f6e9c,_0x415425=_0x3f6e9c);},_0x124d9e=_0x39a8a4(()=>{_0x1cb185();},0x3e8),_0x49ceb1={'setPhase':_0x259f30=>{const _0x201a4f=_0x528529;_0x508e84[_0x201a4f(0x131)]=_0x259f30;const _0x389007=_0x259f30?.[_0x201a4f(0x12e)]()||_0x2628b5,_0x40689a=_0x9781a9()-_0x281a5a,_0xefeb23=formatElapsed(_0x40689a),_0x107480=_0x508e84[_0x201a4f(0x122)]?_0x201a4f(0x12a)+_0x508e84['jobId']+']':'',_0x33dbb4=_0x508e84[_0x201a4f(0x11e)]?'\x20'+_0x508e84['extra']:'',_0x56448f=_0x389007+'\x20'+_0xefeb23+_0x33dbb4+_0x107480;_0x29db30[_0x201a4f(0x135)]&&_0x56448f[_0x201a4f(0x12e)]()&&(_0x29db30[_0x201a4f(0x123)]=_0x56448f,_0x415425=_0x56448f);},'setJobId':_0x13fec2=>{const _0x429fe6=_0x528529;_0x508e84[_0x429fe6(0x122)]=_0x13fec2,_0x1cb185();},'setExtra':_0x323cf0=>{const _0x4030ed=_0x528529;_0x508e84[_0x4030ed(0x11e)]=_0x323cf0,_0x1cb185();}};_0x1cb185();try{const _0x188066=await _0x38d3fa(_0x49ceb1),_0x4d7095=_0x9781a9()-_0x281a5a;return{'data':_0x188066,'elapsedMs':_0x4d7095};}finally{clearInterval(_0x124d9e),_0x29db30[_0x528529(0x128)]();}}export function formatElapsed(_0x3fc54a){const _0x3189ce=a211_0x4f8e,_0x865924=Math['floor'](_0x3fc54a/0x3e8);if(_0x865924<0x3c)return(_0x3fc54a/0x3e8)['toFixed'](0x1)+'s';const _0x47a681=Math[_0x3189ce(0x125)](_0x865924/0x3c),_0x3f5367=_0x865924%0x3c;if(_0x47a681<0x3c)return _0x47a681+'m\x20'+_0x3f5367+'s';const _0x4c4ebc=Math['floor'](_0x47a681/0x3c),_0x280540=_0x47a681%0x3c;return _0x4c4ebc+'h\x20'+_0x280540+'m';}
1
+ (function(_0x103201,_0x98a2dc){const _0x5a602e=a211_0x1796,_0xb693ed=_0x103201();while(!![]){try{const _0x5c5be6=parseInt(_0x5a602e(0x15e))/0x1*(-parseInt(_0x5a602e(0x16a))/0x2)+parseInt(_0x5a602e(0x15c))/0x3+parseInt(_0x5a602e(0x162))/0x4+parseInt(_0x5a602e(0x168))/0x5+parseInt(_0x5a602e(0x15d))/0x6+-parseInt(_0x5a602e(0x166))/0x7+parseInt(_0x5a602e(0x171))/0x8*(parseInt(_0x5a602e(0x16e))/0x9);if(_0x5c5be6===_0x98a2dc)break;else _0xb693ed['push'](_0xb693ed['shift']());}catch(_0x11c0c7){_0xb693ed['push'](_0xb693ed['shift']());}}}(a211_0x248e,0xbe400));import a211_0x2c88ff from'ora';import{isWindows}from'./process.js';const windowsSpinner={'interval':0x3e8,'frames':['•']};export function createCommandSpinner(_0x50b1b6,_0x3f418a={}){const _0x583d91=a211_0x1796,{verbose:verbose=![],forceEnabled:forceEnabled=![]}=_0x3f418a;return a211_0x2c88ff({'text':_0x50b1b6,'color':_0x583d91(0x167),'stream':process[_0x583d91(0x169)],'isEnabled':forceEnabled||process[_0x583d91(0x169)]['isTTY']&&!verbose,...isWindows()&&{'spinner':windowsSpinner}});}export async function withSpinner(_0x3b04e1,_0x179f12,_0x118377={}){const _0x515ef7=a211_0x1796,_0x5311ed=_0x118377[_0x515ef7(0x161)]??(()=>Date[_0x515ef7(0x170)]()),_0x5bda26=createCommandSpinner(_0x3b04e1,_0x118377);_0x5bda26[_0x515ef7(0x16d)]();const _0x30a67b=_0x5311ed();try{const _0x3e17d7=await _0x179f12(),_0x399f94=_0x5311ed()-_0x30a67b;return _0x5bda26['stop'](),{'data':_0x3e17d7,'elapsedMs':_0x399f94};}catch(_0x4f1d9d){_0x5bda26[_0x515ef7(0x164)]();throw _0x4f1d9d;}}function a211_0x1796(_0xae1384,_0x3a52a4){_0xae1384=_0xae1384-0x15b;const _0x248e2a=a211_0x248e();let _0x1796e3=_0x248e2a[_0xae1384];return _0x1796e3;}export async function withProgressSpinner(_0x8a7662,_0xc29d41,_0x3060f7={}){const _0x20f473=a211_0x1796,_0x36b479=_0x3060f7['clock']??(()=>Date[_0x20f473(0x170)]()),_0xccf438=_0x3060f7['intervalFactory']??setInterval,_0xc42c93=createCommandSpinner(_0x8a7662,_0x3060f7);_0xc42c93[_0x20f473(0x16d)]();const _0x1f15e2=_0x36b479(),_0x3229e3=_0x8a7662[_0x20f473(0x160)]('...','')[_0x20f473(0x15b)]()||'Processing',_0x1867ff={};let _0x3a614f=_0x8a7662;const _0x53cf2b=()=>{const _0x37a60=_0x20f473;if(!_0xc42c93[_0x37a60(0x16b)])return;const _0x2d1afb=_0x36b479()-_0x1f15e2,_0x52ab3e=formatElapsed(_0x2d1afb),_0x26a49b=_0x1867ff[_0x37a60(0x16f)]?.[_0x37a60(0x15b)]()||_0x3229e3,_0x51efa6=_0x1867ff[_0x37a60(0x172)]?_0x37a60(0x15f)+_0x1867ff['jobId']+']':'',_0x19532a=_0x1867ff[_0x37a60(0x165)]?'\x20'+_0x1867ff[_0x37a60(0x165)]:'',_0x37083e=_0x26a49b+'\x20'+_0x52ab3e+_0x19532a+_0x51efa6;_0x37083e!==_0x3a614f&&_0x37083e[_0x37a60(0x15b)]()&&(_0xc42c93['text']=_0x37083e,_0x3a614f=_0x37083e);},_0x4df01e=_0xccf438(()=>{_0x53cf2b();},0x3e8),_0x392631={'setPhase':_0x20c1e5=>{const _0x3c2d6b=_0x20f473;_0x1867ff[_0x3c2d6b(0x16f)]=_0x20c1e5;const _0x194d8d=_0x20c1e5?.[_0x3c2d6b(0x15b)]()||_0x3229e3,_0x2fb583=_0x36b479()-_0x1f15e2,_0x334670=formatElapsed(_0x2fb583),_0x477020=_0x1867ff[_0x3c2d6b(0x172)]?_0x3c2d6b(0x15f)+_0x1867ff[_0x3c2d6b(0x172)]+']':'',_0x56ca83=_0x1867ff['extra']?'\x20'+_0x1867ff[_0x3c2d6b(0x165)]:'',_0x55297d=_0x194d8d+'\x20'+_0x334670+_0x56ca83+_0x477020;_0xc42c93[_0x3c2d6b(0x16b)]&&_0x55297d['trim']()&&(_0xc42c93[_0x3c2d6b(0x16c)]=_0x55297d,_0x3a614f=_0x55297d);},'setJobId':_0x4a9f40=>{const _0x4bcc75=_0x20f473;_0x1867ff[_0x4bcc75(0x172)]=_0x4a9f40,_0x53cf2b();},'setExtra':_0x22868c=>{_0x1867ff['extra']=_0x22868c,_0x53cf2b();}};_0x53cf2b();try{const _0x361193=await _0xc29d41(_0x392631),_0x14ccfb=_0x36b479()-_0x1f15e2;return{'data':_0x361193,'elapsedMs':_0x14ccfb};}finally{clearInterval(_0x4df01e),_0xc42c93['stop']();}}export function formatElapsed(_0x58ce35){const _0xd49a65=a211_0x1796,_0x1389bc=Math[_0xd49a65(0x163)](_0x58ce35/0x3e8);if(_0x1389bc<0x3c)return(_0x58ce35/0x3e8)['toFixed'](0x1)+'s';const _0x320c03=Math['floor'](_0x1389bc/0x3c),_0x11b4f5=_0x1389bc%0x3c;if(_0x320c03<0x3c)return _0x320c03+'m\x20'+_0x11b4f5+'s';const _0x509b05=Math[_0xd49a65(0x163)](_0x320c03/0x3c),_0x2d660f=_0x320c03%0x3c;return _0x509b05+'h\x20'+_0x2d660f+'m';}function a211_0x248e(){const _0x1791eb=['213335XjrcnY','stderr','6RwHHLv','isSpinning','text','start','56286dNADio','phase','now','896wiaVNO','jobId','trim','2564973VqhHfZ','528960eAAWhM','363507OrxUwA','\x20[Job\x20ID:\x20','replace','clock','3297632VjTusX','floor','stop','extra','4486223twkYhJ','cyan'];a211_0x248e=function(){return _0x1791eb;};return a211_0x248e();}
@@ -1 +1 @@
1
- function a212_0x1599(_0x326547,_0x55c934){_0x326547=_0x326547-0x102;const _0x29f828=a212_0x29f8();let _0x159984=_0x29f828[_0x326547];return _0x159984;}function a212_0x29f8(){const _0x4deb78=['body','pop','890782IpPwOz','Failed\x20to\x20parse\x20SSE\x20data\x20as\x20JSON:\x20','parse','data','slice','split','203dAvkKj','114792jCBpEA','decode','7790fuqCfK','indexOf','event','145374xAwUCE','10451782aSmpgu','801oucGLY','3QwtdPY','read','trim','[LLM\x20API\x20SSE]\x20','debug','getReader','7542BsSXKC','48rjWZLF','releaseLock','12283210wqBxpk'];a212_0x29f8=function(){return _0x4deb78;};return a212_0x29f8();}(function(_0x12d486,_0x3f9f11){const _0x5e32fe=a212_0x1599,_0x5f413f=_0x12d486();while(!![]){try{const _0x288ff8=-parseInt(_0x5e32fe(0x114))/0x1*(-parseInt(_0x5e32fe(0x105))/0x2)+parseInt(_0x5e32fe(0x111))/0x3*(parseInt(_0x5e32fe(0x11b))/0x4)+-parseInt(_0x5e32fe(0x10e))/0x5+-parseInt(_0x5e32fe(0x11a))/0x6*(-parseInt(_0x5e32fe(0x10b))/0x7)+-parseInt(_0x5e32fe(0x10c))/0x8*(parseInt(_0x5e32fe(0x113))/0x9)+parseInt(_0x5e32fe(0x102))/0xa+-parseInt(_0x5e32fe(0x112))/0xb;if(_0x288ff8===_0x3f9f11)break;else _0x5f413f['push'](_0x5f413f['shift']());}catch(_0x4eb984){_0x5f413f['push'](_0x5f413f['shift']());}}}(a212_0x29f8,0xe8d3e));export async function*parseSSEStream(_0x421997,_0x19c17b){const _0x3e6a36=a212_0x1599;if(!_0x421997['body'])throw new Error('Response\x20body\x20is\x20null');const _0x443225=_0x421997[_0x3e6a36(0x103)][_0x3e6a36(0x119)](),_0x4777ca=new TextDecoder();let _0x2bc7ba='',_0x1fa01d={};try{while(!![]){const {done:_0x3f67dc,value:_0x49b7e8}=await _0x443225[_0x3e6a36(0x115)]();if(_0x3f67dc){if(_0x1fa01d[_0x3e6a36(0x108)]){_0x19c17b?.['debug'](_0x3e6a36(0x117)+_0x1fa01d['data']);const _0x560912=parseSSEData(_0x1fa01d[_0x3e6a36(0x108)]);yield _0x560912;}break;}_0x2bc7ba+=_0x4777ca[_0x3e6a36(0x10d)](_0x49b7e8,{'stream':!![]});const _0x30454a=_0x2bc7ba[_0x3e6a36(0x10a)]('\x0a');_0x2bc7ba=_0x30454a[_0x3e6a36(0x104)]()||'';for(const _0x3fedbc of _0x30454a){if(_0x3fedbc[_0x3e6a36(0x116)]()===''){if(_0x1fa01d['data']){_0x19c17b?.[_0x3e6a36(0x118)]('[LLM\x20API\x20SSE]\x20'+_0x1fa01d[_0x3e6a36(0x108)]);const _0x113c48=parseSSEData(_0x1fa01d[_0x3e6a36(0x108)]);yield _0x113c48,_0x1fa01d={};}continue;}if(_0x3fedbc['startsWith'](':'))continue;const _0x500304=_0x3fedbc[_0x3e6a36(0x10f)](':');if(_0x500304===-0x1)continue;const _0x6a2087=_0x3fedbc[_0x3e6a36(0x109)](0x0,_0x500304);let _0x29d353=_0x3fedbc[_0x3e6a36(0x109)](_0x500304+0x1);_0x29d353['startsWith']('\x20')&&(_0x29d353=_0x29d353['slice'](0x1));switch(_0x6a2087){case'event':_0x1fa01d[_0x3e6a36(0x110)]=_0x29d353;break;case _0x3e6a36(0x108):_0x1fa01d[_0x3e6a36(0x108)]=_0x1fa01d['data']?_0x1fa01d[_0x3e6a36(0x108)]+'\x0a'+_0x29d353:_0x29d353;break;case'id':_0x1fa01d['id']=_0x29d353;break;}}}}finally{_0x443225[_0x3e6a36(0x11c)]();}}function parseSSEData(_0x5c86dc){const _0x3caca9=a212_0x1599;try{return JSON[_0x3caca9(0x107)](_0x5c86dc);}catch(_0x419e63){throw new Error(_0x3caca9(0x106)+_0x5c86dc,{'cause':_0x419e63});}}
1
+ function a212_0x1a9e(_0x35e09a,_0x547c57){_0x35e09a=_0x35e09a-0x102;const _0x53a406=a212_0x53a4();let _0x1a9e79=_0x53a406[_0x35e09a];return _0x1a9e79;}(function(_0x5f4159,_0x2c4e9d){const _0x751bf2=a212_0x1a9e,_0x469539=_0x5f4159();while(!![]){try{const _0x2525a5=parseInt(_0x751bf2(0x109))/0x1+parseInt(_0x751bf2(0x10c))/0x2*(parseInt(_0x751bf2(0x118))/0x3)+parseInt(_0x751bf2(0x102))/0x4*(parseInt(_0x751bf2(0x111))/0x5)+parseInt(_0x751bf2(0x119))/0x6*(parseInt(_0x751bf2(0x10e))/0x7)+-parseInt(_0x751bf2(0x10f))/0x8*(parseInt(_0x751bf2(0x10d))/0x9)+parseInt(_0x751bf2(0x105))/0xa+parseInt(_0x751bf2(0x10a))/0xb*(-parseInt(_0x751bf2(0x110))/0xc);if(_0x2525a5===_0x2c4e9d)break;else _0x469539['push'](_0x469539['shift']());}catch(_0x2504db){_0x469539['push'](_0x469539['shift']());}}}(a212_0x53a4,0xad799));export async function*parseSSEStream(_0x23283e,_0x56b53d){const _0x4c51f1=a212_0x1a9e;if(!_0x23283e[_0x4c51f1(0x114)])throw new Error('Response\x20body\x20is\x20null');const _0x5a8458=_0x23283e[_0x4c51f1(0x114)]['getReader'](),_0x3ec350=new TextDecoder();let _0x25f7d6='',_0x5c2546={};try{while(!![]){const {done:_0x488b4e,value:_0x513553}=await _0x5a8458['read']();if(_0x488b4e){if(_0x5c2546[_0x4c51f1(0x117)]){_0x56b53d?.['debug'](_0x4c51f1(0x113)+_0x5c2546[_0x4c51f1(0x117)]);const _0x1ebb67=parseSSEData(_0x5c2546[_0x4c51f1(0x117)]);yield _0x1ebb67;}break;}_0x25f7d6+=_0x3ec350['decode'](_0x513553,{'stream':!![]});const _0x326ab2=_0x25f7d6[_0x4c51f1(0x116)]('\x0a');_0x25f7d6=_0x326ab2[_0x4c51f1(0x107)]()||'';for(const _0x306d0d of _0x326ab2){if(_0x306d0d[_0x4c51f1(0x115)]()===''){if(_0x5c2546[_0x4c51f1(0x117)]){_0x56b53d?.[_0x4c51f1(0x104)](_0x4c51f1(0x113)+_0x5c2546[_0x4c51f1(0x117)]);const _0x2cc908=parseSSEData(_0x5c2546['data']);yield _0x2cc908,_0x5c2546={};}continue;}if(_0x306d0d[_0x4c51f1(0x10b)](':'))continue;const _0x1950f1=_0x306d0d['indexOf'](':');if(_0x1950f1===-0x1)continue;const _0x514dd7=_0x306d0d[_0x4c51f1(0x108)](0x0,_0x1950f1);let _0x50bdf0=_0x306d0d[_0x4c51f1(0x108)](_0x1950f1+0x1);_0x50bdf0[_0x4c51f1(0x10b)]('\x20')&&(_0x50bdf0=_0x50bdf0[_0x4c51f1(0x108)](0x1));switch(_0x514dd7){case _0x4c51f1(0x106):_0x5c2546['event']=_0x50bdf0;break;case _0x4c51f1(0x117):_0x5c2546[_0x4c51f1(0x117)]=_0x5c2546[_0x4c51f1(0x117)]?_0x5c2546['data']+'\x0a'+_0x50bdf0:_0x50bdf0;break;case'id':_0x5c2546['id']=_0x50bdf0;break;}}}}finally{_0x5a8458[_0x4c51f1(0x112)]();}}function a212_0x53a4(){const _0x4dce99=['pop','slice','94597cNczYK','4961JCvYbk','startsWith','2miKriD','131976RzBpqA','28AcNvZb','152tEiWEV','44844pcsDFy','980IrISmL','releaseLock','[LLM\x20API\x20SSE]\x20','body','trim','split','data','34539xxtjUS','1157028sMVhqp','9508qLaYSN','Failed\x20to\x20parse\x20SSE\x20data\x20as\x20JSON:\x20','debug','13312020PXBxji','event'];a212_0x53a4=function(){return _0x4dce99;};return a212_0x53a4();}function parseSSEData(_0x161e53){const _0xa15f67=a212_0x1a9e;try{return JSON['parse'](_0x161e53);}catch(_0x2f8396){throw new Error(_0xa15f67(0x103)+_0x161e53,{'cause':_0x2f8396});}}
@@ -1 +1 @@
1
- (function(_0x1dc882,_0x3b13a5){const _0x1ac05c=a213_0x4bf6,_0x106f29=_0x1dc882();while(!![]){try{const _0x21b9dc=-parseInt(_0x1ac05c(0x7e))/0x1*(-parseInt(_0x1ac05c(0x7a))/0x2)+-parseInt(_0x1ac05c(0x75))/0x3+-parseInt(_0x1ac05c(0x84))/0x4*(-parseInt(_0x1ac05c(0x7b))/0x5)+-parseInt(_0x1ac05c(0x76))/0x6*(parseInt(_0x1ac05c(0x87))/0x7)+-parseInt(_0x1ac05c(0x83))/0x8*(parseInt(_0x1ac05c(0x79))/0x9)+-parseInt(_0x1ac05c(0x8a))/0xa*(parseInt(_0x1ac05c(0x88))/0xb)+parseInt(_0x1ac05c(0x7d))/0xc;if(_0x21b9dc===_0x3b13a5)break;else _0x106f29['push'](_0x106f29['shift']());}catch(_0x1c83bd){_0x106f29['push'](_0x106f29['shift']());}}}(a213_0x3c83,0xa4535));import a213_0x2a6ca6 from'string-width';export function stringWidth(_0x2e8f68){return a213_0x2a6ca6(_0x2e8f68);}export function padEnd(_0x5728d2,_0x2c2bf0){const _0x5492a0=a213_0x4bf6,_0x16b97e=stringWidth(_0x5728d2);if(_0x16b97e>=_0x2c2bf0)return _0x5728d2;return _0x5728d2+'\x20'[_0x5492a0(0x80)](_0x2c2bf0-_0x16b97e);}export function padStart(_0x5b1662,_0x194d4f){const _0x10111a=a213_0x4bf6,_0x2f6a05=stringWidth(_0x5b1662);if(_0x2f6a05>=_0x194d4f)return _0x5b1662;return'\x20'[_0x10111a(0x80)](_0x194d4f-_0x2f6a05)+_0x5b1662;}export function centerAlign(_0x54eef8,_0x40c9ec){const _0x4b87d6=a213_0x4bf6,_0x15e131=stringWidth(_0x54eef8);if(_0x15e131>_0x40c9ec){if(_0x40c9ec<=0x1)return'…'[_0x4b87d6(0x85)](0x0,_0x40c9ec);let _0x2e7272=_0x54eef8;while(stringWidth(_0x2e7272+'…')>_0x40c9ec){_0x2e7272=_0x2e7272[_0x4b87d6(0x7f)](0x0,-0x1);}return _0x2e7272+'…';}if(_0x15e131===_0x40c9ec)return _0x54eef8;const _0xfa6f5f=_0x40c9ec-_0x15e131,_0x15cd61=Math[_0x4b87d6(0x72)](_0xfa6f5f/0x2),_0x2db019=_0xfa6f5f-_0x15cd61;return'\x20'['repeat'](_0x15cd61)+_0x54eef8+'\x20'[_0x4b87d6(0x80)](_0x2db019);}function a213_0x4bf6(_0x186d23,_0x2fe6c9){_0x186d23=_0x186d23-0x71;const _0x3c8340=a213_0x3c83();let _0x4bf68b=_0x3c8340[_0x186d23];return _0x4bf68b;}export function escapeStringLiteral(_0x4b137f){const _0xb61cb0=a213_0x4bf6;if(!_0x4b137f||_0x4b137f['trim']()[_0xb61cb0(0x7c)]===0x0)throw new Error('Cannot\x20escape\x20empty\x20string\x20literal');const _0x4ddbe6=_0x4b137f[_0xb61cb0(0x74)](/'/g,'\x27\x27');return'\x27'+_0x4ddbe6+'\x27';}export function globToLike(_0x4243f9){const _0xf64bf2=a213_0x4bf6;let _0x2bad22=_0x4243f9['replace'](/\\/g,'\x5c\x5c')[_0xf64bf2(0x74)](/%/g,'\x5c%')[_0xf64bf2(0x74)](/_/g,'\x5c_');return _0x2bad22=_0x2bad22[_0xf64bf2(0x74)](/\*/g,'%')[_0xf64bf2(0x74)](/\?/g,'_'),_0x2bad22;}export function buildLikePattern(_0x1a6e2e){const _0x4f06f9=a213_0x4bf6;if(!_0x1a6e2e||_0x1a6e2e[_0x4f06f9(0x77)]()[_0x4f06f9(0x7c)]===0x0)throw new Error(_0x4f06f9(0x73));const _0x1ea728=globToLike(_0x1a6e2e),_0x529f26=_0x1ea728[_0x4f06f9(0x74)](/'/g,'\x27\x27');return'\x27'+_0x529f26+'\x27';}export function matchGlobPattern(_0x5edf85,_0x3d7408){const _0x4bbad1=a213_0x4bf6,_0x443d91=_0x3d7408[_0x4bbad1(0x74)](/[.+^${}()|[\]\\]/g,'\x5c$&')[_0x4bbad1(0x74)](/\*/g,'.*')[_0x4bbad1(0x74)](/\?/g,'.'),_0x2d8e18=new RegExp('^'+_0x443d91+'$');return _0x2d8e18[_0x4bbad1(0x78)](_0x5edf85);}export function getSanitizedUsername(){const _0x2a7c97=a213_0x4bf6,_0x57a78f=process.env.USER||process.env.USERNAME||_0x2a7c97(0x81);return _0x57a78f['replace'](/[^a-zA-Z0-9]/g,'')[_0x2a7c97(0x71)]();}function a213_0x3c83(){const _0x1529b9=['padStart','764230NGmqvS','toLowerCase','floor','Cannot\x20build\x20LIKE\x20pattern\x20from\x20empty\x20string','replace','1859928BuPJfu','1025526xeBGoL','trim','test','501453BJTaTg','4226DWjApr','10xFyzjH','length','17083788CDotUi','509FrgmAP','slice','repeat','unknown','random','104AVCLRE','1670948tRfIyr','substring','toString','7znHTyt','165ugQRyM'];a213_0x3c83=function(){return _0x1529b9;};return a213_0x3c83();}export function generateRandomHex(){const _0xf997e1=a213_0x4bf6,_0x1aa346=Math[_0xf997e1(0x72)](Math[_0xf997e1(0x82)]()*0xfffff);return _0x1aa346[_0xf997e1(0x86)](0x10)[_0xf997e1(0x89)](0x5,'0');}export function sanitizeFileName(_0x5c0e1d){const _0x396146=a213_0x4bf6;return _0x5c0e1d[_0x396146(0x71)]()[_0x396146(0x74)](/[/\\:*?"<>|]/g,'-')[_0x396146(0x74)](/\s+/g,'-')[_0x396146(0x74)](/-+/g,'-')['replace'](/^-|-$/g,'');}
1
+ (function(_0x2a467a,_0x1e1c5a){const _0x56aec2=a213_0x300f,_0x2e0b17=_0x2a467a();while(!![]){try{const _0x3476b4=-parseInt(_0x56aec2(0x16e))/0x1+-parseInt(_0x56aec2(0x17c))/0x2*(-parseInt(_0x56aec2(0x171))/0x3)+parseInt(_0x56aec2(0x17d))/0x4*(-parseInt(_0x56aec2(0x176))/0x5)+parseInt(_0x56aec2(0x16f))/0x6+parseInt(_0x56aec2(0x174))/0x7+-parseInt(_0x56aec2(0x16d))/0x8+parseInt(_0x56aec2(0x170))/0x9;if(_0x3476b4===_0x1e1c5a)break;else _0x2e0b17['push'](_0x2e0b17['shift']());}catch(_0x4edd3e){_0x2e0b17['push'](_0x2e0b17['shift']());}}}(a213_0x263b,0xc7dd1));import a213_0x217500 from'string-width';export function stringWidth(_0x1e7d43){return a213_0x217500(_0x1e7d43);}export function padEnd(_0x1de00a,_0x5c6bb7){const _0x3e0a56=a213_0x300f,_0x4fbd21=stringWidth(_0x1de00a);if(_0x4fbd21>=_0x5c6bb7)return _0x1de00a;return _0x1de00a+'\x20'[_0x3e0a56(0x175)](_0x5c6bb7-_0x4fbd21);}export function padStart(_0x51e228,_0x1ebb7d){const _0x50a02f=a213_0x300f,_0x4f4660=stringWidth(_0x51e228);if(_0x4f4660>=_0x1ebb7d)return _0x51e228;return'\x20'[_0x50a02f(0x175)](_0x1ebb7d-_0x4f4660)+_0x51e228;}export function centerAlign(_0x3d2993,_0x35d65){const _0x52badd=a213_0x300f,_0x3e495d=stringWidth(_0x3d2993);if(_0x3e495d>_0x35d65){if(_0x35d65<=0x1)return'…'[_0x52badd(0x16c)](0x0,_0x35d65);let _0x3a8dde=_0x3d2993;while(stringWidth(_0x3a8dde+'…')>_0x35d65){_0x3a8dde=_0x3a8dde[_0x52badd(0x16a)](0x0,-0x1);}return _0x3a8dde+'…';}if(_0x3e495d===_0x35d65)return _0x3d2993;const _0x1e355f=_0x35d65-_0x3e495d,_0x1dfcd9=Math[_0x52badd(0x172)](_0x1e355f/0x2),_0x10d674=_0x1e355f-_0x1dfcd9;return'\x20'[_0x52badd(0x175)](_0x1dfcd9)+_0x3d2993+'\x20'[_0x52badd(0x175)](_0x10d674);}export function escapeStringLiteral(_0x158236){const _0x2a6b39=a213_0x300f;if(!_0x158236||_0x158236['trim']()['length']===0x0)throw new Error(_0x2a6b39(0x179));const _0x3687cb=_0x158236[_0x2a6b39(0x178)](/'/g,'\x27\x27');return'\x27'+_0x3687cb+'\x27';}function a213_0x300f(_0x5cd19c,_0x46773d){_0x5cd19c=_0x5cd19c-0x169;const _0x263b96=a213_0x263b();let _0x300fee=_0x263b96[_0x5cd19c];return _0x300fee;}export function globToLike(_0x133ae6){const _0x295cc4=a213_0x300f;let _0xdaf367=_0x133ae6[_0x295cc4(0x178)](/\\/g,'\x5c\x5c')['replace'](/%/g,'\x5c%')['replace'](/_/g,'\x5c_');return _0xdaf367=_0xdaf367[_0x295cc4(0x178)](/\*/g,'%')[_0x295cc4(0x178)](/\?/g,'_'),_0xdaf367;}export function buildLikePattern(_0xae6a8d){const _0x27dcfc=a213_0x300f;if(!_0xae6a8d||_0xae6a8d['trim']()[_0x27dcfc(0x17a)]===0x0)throw new Error(_0x27dcfc(0x177));const _0x53122c=globToLike(_0xae6a8d),_0x54448b=_0x53122c[_0x27dcfc(0x178)](/'/g,'\x27\x27');return'\x27'+_0x54448b+'\x27';}function a213_0x263b(){const _0x5e5be3=['test','4447387jDtUkv','repeat','10oNIGMC','Cannot\x20build\x20LIKE\x20pattern\x20from\x20empty\x20string','replace','Cannot\x20escape\x20empty\x20string\x20literal','length','unknown','25446lWDvCp','1846304pUvOvc','toLowerCase','random','slice','toString','substring','12274840EzfyHc','1513023tRvkFl','7772262WNXOcM','21718332VZTYKq','105DvxMBt','floor'];a213_0x263b=function(){return _0x5e5be3;};return a213_0x263b();}export function matchGlobPattern(_0x32a3e9,_0x35c95b){const _0x19c04f=a213_0x300f,_0x2299d7=_0x35c95b['replace'](/[.+^${}()|[\]\\]/g,'\x5c$&')[_0x19c04f(0x178)](/\*/g,'.*')[_0x19c04f(0x178)](/\?/g,'.'),_0xa7e723=new RegExp('^'+_0x2299d7+'$');return _0xa7e723[_0x19c04f(0x173)](_0x32a3e9);}export function getSanitizedUsername(){const _0x1b7489=a213_0x300f,_0x9a363f=process.env.USER||process.env.USERNAME||_0x1b7489(0x17b);return _0x9a363f['replace'](/[^a-zA-Z0-9]/g,'')[_0x1b7489(0x17e)]();}export function generateRandomHex(){const _0x54ca21=a213_0x300f,_0x42f957=Math['floor'](Math[_0x54ca21(0x169)]()*0xfffff);return _0x42f957[_0x54ca21(0x16b)](0x10)['padStart'](0x5,'0');}export function sanitizeFileName(_0xa95d47){const _0x3966cf=a213_0x300f;return _0xa95d47[_0x3966cf(0x17e)]()[_0x3966cf(0x178)](/[/\\:*?"<>|]/g,'-')[_0x3966cf(0x178)](/\s+/g,'-')[_0x3966cf(0x178)](/-+/g,'-')[_0x3966cf(0x178)](/^-|-$/g,'');}
@@ -1 +1 @@
1
- function a214_0x3f0d(_0x4512e4,_0x2a2ad4){_0x4512e4=_0x4512e4-0x18f;const _0x5d4399=a214_0x5d43();let _0x3f0d1c=_0x5d4399[_0x4512e4];return _0x3f0d1c;}(function(_0x40e7cb,_0xb1cb08){const _0x501254=a214_0x3f0d,_0x3e0c01=_0x40e7cb();while(!![]){try{const _0x1011cb=-parseInt(_0x501254(0x1a1))/0x1*(parseInt(_0x501254(0x190))/0x2)+-parseInt(_0x501254(0x19e))/0x3+-parseInt(_0x501254(0x1a2))/0x4+-parseInt(_0x501254(0x1a3))/0x5+-parseInt(_0x501254(0x19d))/0x6+parseInt(_0x501254(0x196))/0x7+parseInt(_0x501254(0x193))/0x8*(parseInt(_0x501254(0x192))/0x9);if(_0x1011cb===_0xb1cb08)break;else _0x3e0c01['push'](_0x3e0c01['shift']());}catch(_0x49b9d4){_0x3e0c01['push'](_0x3e0c01['shift']());}}}(a214_0x5d43,0x9b500));function hasWildcard(_0x1fbd1a){const _0x2eda5a=a214_0x3f0d;return _0x1fbd1a['includes']('*')||_0x1fbd1a[_0x2eda5a(0x1a6)]('?');}export function parseTableReference(_0x1065c3){const _0x8d369c=a214_0x3f0d;if(!_0x1065c3||_0x1065c3[_0x8d369c(0x19a)]()[_0x8d369c(0x1a5)]===0x0)throw new Error(_0x8d369c(0x199));const _0x1d8e56=_0x1065c3['trim'](),_0xa12fc6={'original':_0x1d8e56},_0x2ecceb=_0x1d8e56[_0x8d369c(0x1a0)]('.');if(_0x2ecceb[_0x8d369c(0x1a5)]===0x1){const _0x4a0ddd=_0x2ecceb[0x0];if(!_0x4a0ddd)throw new Error(_0x8d369c(0x19c));_0xa12fc6[_0x8d369c(0x198)]=_0x4a0ddd;}else{if(_0x2ecceb[_0x8d369c(0x1a5)]===0x2){const [_0x58e480,_0x3cce49]=_0x2ecceb;if(!_0x58e480)throw new Error(_0x8d369c(0x19b));if(!_0x3cce49)throw new Error(_0x8d369c(0x1a4));_0xa12fc6[_0x8d369c(0x1a7)]=_0x58e480,_0xa12fc6['table']=_0x3cce49;}else{if(_0x2ecceb[_0x8d369c(0x1a5)]===0x3){const [_0x23a969,_0x1bea75,_0x31ed4d]=_0x2ecceb;if(!_0x23a969||!_0x1bea75||!_0x31ed4d)throw new Error(_0x8d369c(0x18f));_0xa12fc6[_0x8d369c(0x19f)]=_0x23a969,_0xa12fc6['database']=_0x1bea75,_0xa12fc6['table']=_0x31ed4d;}else throw new Error(_0x8d369c(0x195));}}return _0xa12fc6;}export function formatTableReference(_0x2b4a71){const _0x4b4abf=a214_0x3f0d,_0x1b8d32=[];return _0x2b4a71[_0x4b4abf(0x19f)]&&_0x1b8d32[_0x4b4abf(0x191)](_0x2b4a71[_0x4b4abf(0x19f)]),_0x2b4a71[_0x4b4abf(0x1a7)]&&_0x1b8d32[_0x4b4abf(0x191)](_0x2b4a71[_0x4b4abf(0x1a7)]),_0x2b4a71[_0x4b4abf(0x198)]&&_0x1b8d32['push'](_0x2b4a71['table']),_0x1b8d32['join']('.');}function a214_0x5d43(){const _0x46ae5e=['Table\x20part\x20cannot\x20be\x20empty\x20-\x20use\x20\x22*\x22\x20for\x20all\x20tables\x20(e.g.,\x20\x22mydb.*\x22)','length','includes','database','Invalid\x20catalog.database.table\x20format\x20-\x20all\x20parts\x20must\x20be\x20non-empty','36vYADex','push','9zyisPK','21889128gcBVfq','Table\x20name\x20is\x20required\x20for\x20describe\x20operation','Invalid\x20pattern\x20format\x20-\x20too\x20many\x20dots\x20(max:\x20catalog.database.table)','2142777KtakIo','Wildcards\x20are\x20not\x20allowed\x20in\x20database\x20name\x20for\x20describe\x20operation','table','Pattern\x20cannot\x20be\x20empty\x20or\x20whitespace-only','trim','Database\x20part\x20cannot\x20be\x20empty\x20-\x20use\x20\x22*\x22\x20for\x20all\x20databases\x20(e.g.,\x20\x22*.mytable\x22)','Pattern\x20cannot\x20be\x20just\x20a\x20dot','1938504JjrWMC','861504rfrcWN','catalog','split','15798nHrdZy','4986952OSMmol','1323690oHDwUV'];a214_0x5d43=function(){return _0x46ae5e;};return a214_0x5d43();}export function validateTableListReference(_0xd06702){return undefined;}export function validateTableDescribeReference(_0x525922){const _0xdd38d2=a214_0x3f0d;if(!_0x525922['table'])return _0xdd38d2(0x194);if(_0x525922[_0xdd38d2(0x1a7)]&&hasWildcard(_0x525922[_0xdd38d2(0x1a7)]))return _0xdd38d2(0x197);if(hasWildcard(_0x525922[_0xdd38d2(0x198)]))return'Wildcards\x20are\x20not\x20allowed\x20in\x20table\x20name\x20for\x20describe\x20operation';return undefined;}
1
+ function a214_0x4bb2(_0x22faf3,_0xaffa7d){_0x22faf3=_0x22faf3-0x130;const _0x707675=a214_0x7076();let _0x4bb21e=_0x707675[_0x22faf3];return _0x4bb21e;}(function(_0x4cf5a0,_0x58c339){const _0x1728b3=a214_0x4bb2,_0x531f22=_0x4cf5a0();while(!![]){try{const _0x3e81b5=parseInt(_0x1728b3(0x13a))/0x1+-parseInt(_0x1728b3(0x145))/0x2+parseInt(_0x1728b3(0x135))/0x3*(-parseInt(_0x1728b3(0x144))/0x4)+parseInt(_0x1728b3(0x142))/0x5+-parseInt(_0x1728b3(0x13f))/0x6+-parseInt(_0x1728b3(0x134))/0x7+-parseInt(_0x1728b3(0x136))/0x8*(-parseInt(_0x1728b3(0x13c))/0x9);if(_0x3e81b5===_0x58c339)break;else _0x531f22['push'](_0x531f22['shift']());}catch(_0x26863b){_0x531f22['push'](_0x531f22['shift']());}}}(a214_0x7076,0xb93d9));function hasWildcard(_0x396ee8){const _0x377585=a214_0x4bb2;return _0x396ee8[_0x377585(0x141)]('*')||_0x396ee8['includes']('?');}export function parseTableReference(_0x105535){const _0x282e5d=a214_0x4bb2;if(!_0x105535||_0x105535[_0x282e5d(0x139)]()[_0x282e5d(0x131)]===0x0)throw new Error(_0x282e5d(0x140));const _0x53b6c9=_0x105535['trim'](),_0x2e6b5e={'original':_0x53b6c9},_0x189305=_0x53b6c9[_0x282e5d(0x132)]('.');if(_0x189305['length']===0x1){const _0x46e908=_0x189305[0x0];if(!_0x46e908)throw new Error('Pattern\x20cannot\x20be\x20just\x20a\x20dot');_0x2e6b5e[_0x282e5d(0x130)]=_0x46e908;}else{if(_0x189305[_0x282e5d(0x131)]===0x2){const [_0x4aeb91,_0x491a94]=_0x189305;if(!_0x4aeb91)throw new Error(_0x282e5d(0x13e));if(!_0x491a94)throw new Error('Table\x20part\x20cannot\x20be\x20empty\x20-\x20use\x20\x22*\x22\x20for\x20all\x20tables\x20(e.g.,\x20\x22mydb.*\x22)');_0x2e6b5e[_0x282e5d(0x143)]=_0x4aeb91,_0x2e6b5e[_0x282e5d(0x130)]=_0x491a94;}else{if(_0x189305[_0x282e5d(0x131)]===0x3){const [_0x2dab3d,_0x24a4d9,_0x202c68]=_0x189305;if(!_0x2dab3d||!_0x24a4d9||!_0x202c68)throw new Error('Invalid\x20catalog.database.table\x20format\x20-\x20all\x20parts\x20must\x20be\x20non-empty');_0x2e6b5e[_0x282e5d(0x137)]=_0x2dab3d,_0x2e6b5e[_0x282e5d(0x143)]=_0x24a4d9,_0x2e6b5e[_0x282e5d(0x130)]=_0x202c68;}else throw new Error(_0x282e5d(0x133));}}return _0x2e6b5e;}function a214_0x7076(){const _0x3c51f3=['Invalid\x20pattern\x20format\x20-\x20too\x20many\x20dots\x20(max:\x20catalog.database.table)','9915780UvseSP','522VlWEQY','8MUmQzm','catalog','join','trim','762987mLxKrr','Table\x20name\x20is\x20required\x20for\x20describe\x20operation','13135896MUVops','push','Database\x20part\x20cannot\x20be\x20empty\x20-\x20use\x20\x22*\x22\x20for\x20all\x20databases\x20(e.g.,\x20\x22*.mytable\x22)','529170gAjRUP','Pattern\x20cannot\x20be\x20empty\x20or\x20whitespace-only','includes','7022720xUEKCI','database','27176QVsoap','362878TrqYsz','table','length','split'];a214_0x7076=function(){return _0x3c51f3;};return a214_0x7076();}export function formatTableReference(_0x3ea7eb){const _0x11a832=a214_0x4bb2,_0x45fe4d=[];return _0x3ea7eb[_0x11a832(0x137)]&&_0x45fe4d['push'](_0x3ea7eb[_0x11a832(0x137)]),_0x3ea7eb[_0x11a832(0x143)]&&_0x45fe4d[_0x11a832(0x13d)](_0x3ea7eb[_0x11a832(0x143)]),_0x3ea7eb[_0x11a832(0x130)]&&_0x45fe4d['push'](_0x3ea7eb[_0x11a832(0x130)]),_0x45fe4d[_0x11a832(0x138)]('.');}export function validateTableListReference(_0x146349){return undefined;}export function validateTableDescribeReference(_0x126aa3){const _0x583380=a214_0x4bb2;if(!_0x126aa3[_0x583380(0x130)])return _0x583380(0x13b);if(_0x126aa3['database']&&hasWildcard(_0x126aa3[_0x583380(0x143)]))return'Wildcards\x20are\x20not\x20allowed\x20in\x20database\x20name\x20for\x20describe\x20operation';if(hasWildcard(_0x126aa3['table']))return'Wildcards\x20are\x20not\x20allowed\x20in\x20table\x20name\x20for\x20describe\x20operation';return undefined;}
@@ -1 +1 @@
1
- const a215_0xce9f1d=a215_0x3807;(function(_0x1af427,_0x223f6d){const _0x5865d1=a215_0x3807,_0x3e862e=_0x1af427();while(!![]){try{const _0x5c9256=parseInt(_0x5865d1(0xfb))/0x1+parseInt(_0x5865d1(0x100))/0x2*(-parseInt(_0x5865d1(0xf5))/0x3)+-parseInt(_0x5865d1(0x103))/0x4+-parseInt(_0x5865d1(0xf8))/0x5+parseInt(_0x5865d1(0xed))/0x6*(parseInt(_0x5865d1(0xf6))/0x7)+parseInt(_0x5865d1(0x105))/0x8*(parseInt(_0x5865d1(0xf1))/0x9)+-parseInt(_0x5865d1(0x102))/0xa*(-parseInt(_0x5865d1(0xfa))/0xb);if(_0x5c9256===_0x223f6d)break;else _0x3e862e['push'](_0x3e862e['shift']());}catch(_0x57c8ed){_0x3e862e['push'](_0x3e862e['shift']());}}}(a215_0x3ad3,0xdcaad));function a215_0x3807(_0x5fef5b,_0x4063c8){_0x5fef5b=_0x5fef5b-0xe8;const _0x3ad3da=a215_0x3ad3();let _0x3807b6=_0x3ad3da[_0x5fef5b];return _0x3807b6;}function a215_0x3ad3(){const _0x1efe87=['trace','debug','fileHandler','2293714FfjiBy','close','10Pwwtfw','4792732TzagQV','addHandler','2952RynJfn','error','tdx.log','logs','consoleHandler','INFO','getLogPath','102KjvFvq','isInitialized','push','logLevel','40077ycuJfd','info','Session\x20ended','logFileName','3ztLYqQ','89173kEHnBu','fileOnly','1350640QFGFrw','warn','5534617GSMEmM','1156154slrlDC','logger'];a215_0x3ad3=function(){return _0x1efe87;};return a215_0x3ad3();}import{join}from'path';import{Logger,LogLevel,FileHandler,ConsoleHandler,DefaultLogFormatter}from'./logger/index.js';import{getGlobalCacheDir}from'./global-cache.js';export{LogLevel}from'./logger/index.js';export class TDXLogger{[a215_0xce9f1d(0xf0)];[a215_0xce9f1d(0xf7)];['logDir'];[a215_0xce9f1d(0xf4)];[a215_0xce9f1d(0xfc)];[a215_0xce9f1d(0xff)]=null;[a215_0xce9f1d(0xea)]=null;constructor(_0x10a762=LogLevel[a215_0xce9f1d(0xeb)],_0x917e13=![],_0x39dd4c,_0x21d08a=a215_0xce9f1d(0xe8)){const _0x2d3deb=a215_0xce9f1d;this['logLevel']=_0x10a762,this[_0x2d3deb(0xf7)]=_0x917e13,this['logDir']=_0x39dd4c||join(getGlobalCacheDir(),_0x2d3deb(0xe9)),this[_0x2d3deb(0xf4)]=_0x21d08a,this['logger']=Logger['of']('tdx');}async['init'](){const _0x546f91=a215_0xce9f1d,_0x2a03fb=join(this['logDir'],this['logFileName']);if(Logger[_0x546f91(0xee)]()){!this[_0x546f91(0xf7)]&&(this['consoleHandler']=new ConsoleHandler({'minLevel':LogLevel['INFO'],'colors':!![]}),Logger[_0x546f91(0x104)](this[_0x546f91(0xea)]));return;}this[_0x546f91(0xff)]=new FileHandler({'filePath':_0x2a03fb});const _0x575968=[this[_0x546f91(0xff)]];!this[_0x546f91(0xf7)]&&(this[_0x546f91(0xea)]=new ConsoleHandler({'minLevel':LogLevel[_0x546f91(0xeb)],'colors':!![]}),_0x575968[_0x546f91(0xef)](this[_0x546f91(0xea)])),await Logger['init']({'defaultLevel':this[_0x546f91(0xf0)],'handlers':_0x575968,'formatter':new DefaultLogFormatter({'colors':!![]})});}[a215_0xce9f1d(0xfe)](..._0x1864cb){const _0x45147c=a215_0xce9f1d;this[_0x45147c(0xfc)][_0x45147c(0xfe)](..._0x1864cb);}[a215_0xce9f1d(0xfd)](..._0x1e7a68){const _0x4d4d03=a215_0xce9f1d;this[_0x4d4d03(0xfc)][_0x4d4d03(0xfd)](..._0x1e7a68);}[a215_0xce9f1d(0xf2)](..._0x55f42a){const _0xa2cf9a=a215_0xce9f1d;this[_0xa2cf9a(0xfc)][_0xa2cf9a(0xf2)](..._0x55f42a);}[a215_0xce9f1d(0xf9)](..._0x3f6bd3){const _0x41d9a7=a215_0xce9f1d;this[_0x41d9a7(0xfc)][_0x41d9a7(0xf9)](..._0x3f6bd3);}[a215_0xce9f1d(0x106)](..._0xb8aada){const _0x266464=a215_0xce9f1d;this[_0x266464(0xfc)][_0x266464(0x106)](..._0xb8aada);}async[a215_0xce9f1d(0x101)](){const _0x145956=a215_0xce9f1d;this[_0x145956(0xfc)][_0x145956(0xf2)](_0x145956(0xf3)),await Logger['shutdown']();}[a215_0xce9f1d(0xec)](){return join(this['logDir'],this['logFileName']);}}
1
+ const a215_0x494fe6=a215_0x3505;(function(_0xea8d3c,_0x2da597){const _0x1dcbac=a215_0x3505,_0x101540=_0xea8d3c();while(!![]){try{const _0x3ebeb9=parseInt(_0x1dcbac(0x1cf))/0x1*(parseInt(_0x1dcbac(0x1cb))/0x2)+parseInt(_0x1dcbac(0x1d1))/0x3+-parseInt(_0x1dcbac(0x1c7))/0x4+parseInt(_0x1dcbac(0x1c8))/0x5*(parseInt(_0x1dcbac(0x1d9))/0x6)+-parseInt(_0x1dcbac(0x1cd))/0x7+-parseInt(_0x1dcbac(0x1d7))/0x8*(-parseInt(_0x1dcbac(0x1c4))/0x9)+-parseInt(_0x1dcbac(0x1df))/0xa*(parseInt(_0x1dcbac(0x1d6))/0xb);if(_0x3ebeb9===_0x2da597)break;else _0x101540['push'](_0x101540['shift']());}catch(_0x578a8f){_0x101540['push'](_0x101540['shift']());}}}(a215_0x4307,0x8278b));import{join}from'path';import{Logger,LogLevel,FileHandler,ConsoleHandler,DefaultLogFormatter}from'./logger/index.js';import{getGlobalCacheDir}from'./global-cache.js';export{LogLevel}from'./logger/index.js';export class TDXLogger{[a215_0x494fe6(0x1c5)];['fileOnly'];[a215_0x494fe6(0x1d0)];[a215_0x494fe6(0x1c9)];[a215_0x494fe6(0x1dc)];['fileHandler']=null;[a215_0x494fe6(0x1db)]=null;constructor(_0x5c54bc=LogLevel[a215_0x494fe6(0x1d3)],_0x12f544=![],_0x196cd9,_0x3923ee=a215_0x494fe6(0x1e0)){const _0x223f9a=a215_0x494fe6;this['logLevel']=_0x5c54bc,this[_0x223f9a(0x1cc)]=_0x12f544,this[_0x223f9a(0x1d0)]=_0x196cd9||join(getGlobalCacheDir(),_0x223f9a(0x1e1)),this['logFileName']=_0x3923ee,this['logger']=Logger['of'](_0x223f9a(0x1c3));}async[a215_0x494fe6(0x1c0)](){const _0x4c6cc4=a215_0x494fe6,_0x26f8bd=join(this['logDir'],this[_0x4c6cc4(0x1c9)]);if(Logger[_0x4c6cc4(0x1c6)]()){!this['fileOnly']&&(this['consoleHandler']=new ConsoleHandler({'minLevel':LogLevel[_0x4c6cc4(0x1d3)],'colors':!![]}),Logger[_0x4c6cc4(0x1ce)](this['consoleHandler']));return;}this[_0x4c6cc4(0x1ca)]=new FileHandler({'filePath':_0x26f8bd});const _0x15ea51=[this[_0x4c6cc4(0x1ca)]];!this[_0x4c6cc4(0x1cc)]&&(this[_0x4c6cc4(0x1db)]=new ConsoleHandler({'minLevel':LogLevel['INFO'],'colors':!![]}),_0x15ea51[_0x4c6cc4(0x1da)](this[_0x4c6cc4(0x1db)])),await Logger[_0x4c6cc4(0x1c0)]({'defaultLevel':this[_0x4c6cc4(0x1c5)],'handlers':_0x15ea51,'formatter':new DefaultLogFormatter({'colors':!![]})});}[a215_0x494fe6(0x1de)](..._0xe38dc8){const _0x2ac88d=a215_0x494fe6;this[_0x2ac88d(0x1dc)][_0x2ac88d(0x1de)](..._0xe38dc8);}[a215_0x494fe6(0x1c1)](..._0xeebf5c){const _0x33d528=a215_0x494fe6;this['logger'][_0x33d528(0x1c1)](..._0xeebf5c);}['info'](..._0x1f8b25){this['logger']['info'](..._0x1f8b25);}[a215_0x494fe6(0x1d5)](..._0x1586b7){const _0x3ea507=a215_0x494fe6;this[_0x3ea507(0x1dc)]['warn'](..._0x1586b7);}[a215_0x494fe6(0x1c2)](..._0x2ee96b){const _0x3e9a1c=a215_0x494fe6;this[_0x3e9a1c(0x1dc)][_0x3e9a1c(0x1c2)](..._0x2ee96b);}async['close'](){const _0x57ffdb=a215_0x494fe6;this[_0x57ffdb(0x1dc)][_0x57ffdb(0x1d2)](_0x57ffdb(0x1d4)),await Logger[_0x57ffdb(0x1dd)]();}[a215_0x494fe6(0x1d8)](){const _0x14e070=a215_0x494fe6;return join(this[_0x14e070(0x1d0)],this[_0x14e070(0x1c9)]);}}function a215_0x3505(_0x3d9d3a,_0x55a79d){_0x3d9d3a=_0x3d9d3a-0x1c0;const _0x43071b=a215_0x4307();let _0x35055d=_0x43071b[_0x3d9d3a];return _0x35055d;}function a215_0x4307(){const _0x135a41=['logger','shutdown','debug','90dBOGaw','tdx.log','logs','init','trace','error','tdx','135747ZyRwpu','logLevel','isInitialized','1655028KYvDza','80ZJWpyM','logFileName','fileHandler','4gtDnEE','fileOnly','4876585JtTayV','addHandler','114916tnbvOp','logDir','2357100QqsMqE','info','INFO','Session\x20ended','warn','779031Nuvlcs','192xiPGvw','getLogPath','339258lvPOUH','push','consoleHandler'];a215_0x4307=function(){return _0x135a41;};return a215_0x4307();}
@@ -1 +1 @@
1
- const a216_0x3129ab=a216_0x5c3c;(function(_0x342060,_0x387a66){const _0x23a43b=a216_0x5c3c,_0x5e8fb0=_0x342060();while(!![]){try{const _0xbc7797=parseInt(_0x23a43b(0x1ed))/0x1*(parseInt(_0x23a43b(0x1de))/0x2)+parseInt(_0x23a43b(0x201))/0x3*(-parseInt(_0x23a43b(0x1df))/0x4)+-parseInt(_0x23a43b(0x1e6))/0x5*(-parseInt(_0x23a43b(0x207))/0x6)+-parseInt(_0x23a43b(0x209))/0x7*(-parseInt(_0x23a43b(0x1dd))/0x8)+-parseInt(_0x23a43b(0x1fc))/0x9+-parseInt(_0x23a43b(0x1e4))/0xa+parseInt(_0x23a43b(0x1e8))/0xb;if(_0xbc7797===_0x387a66)break;else _0x5e8fb0['push'](_0x5e8fb0['shift']());}catch(_0x22b0fb){_0x5e8fb0['push'](_0x5e8fb0['shift']());}}}(a216_0x6d16,0x76d74));import{get}from'https';import{gt,valid}from'semver';import a216_0x5caeb8 from'chalk';import{createGlobalCache}from'./global-cache.js';const CACHE_DURATION_MS=0x18*0x3c*0x3c*0x3e8,NPM_REGISTRY_BASE=a216_0x3129ab(0x1fe),TIMEOUT_MS=0x7d0,stableVersionCache=createGlobalCache('last_version_check',a216_0x3129ab(0x1e0)),nextVersionCache=createGlobalCache(a216_0x3129ab(0x1fd),a216_0x3129ab(0x1e5));function getCacheForChannel(_0x1f1526){const _0x1f9ba9=a216_0x3129ab;return _0x1f1526===_0x1f9ba9(0x1f0)?nextVersionCache:stableVersionCache;}function readCache(_0x25b505){const _0xa58ab5=a216_0x3129ab;return getCacheForChannel(_0x25b505)[_0xa58ab5(0x1e3)]()??null;}function writeCache(_0x3293f6,_0x329c99){const _0x11afa7=a216_0x3129ab;try{getCacheForChannel(_0x329c99)[_0x11afa7(0x208)]({'lastCheck':new Date()['toISOString'](),'latestVersion':_0x3293f6});}catch{}}function a216_0x5c3c(_0x5c0d88,_0xa0db60){_0x5c0d88=_0x5c0d88-0x1dc;const _0x6d1611=a216_0x6d16();let _0x5c3cdb=_0x6d1611[_0x5c0d88];return _0x5c3cdb;}function isCacheValid(_0x57fa53){const _0x1a23dc=a216_0x3129ab;if(!_0x57fa53)return![];const _0x21a71a=new Date(_0x57fa53['lastCheck'])[_0x1a23dc(0x200)](),_0x546646=Date[_0x1a23dc(0x1ec)]();return _0x546646-_0x21a71a<CACHE_DURATION_MS;}function a216_0x6d16(){const _0x3665f8=['2780335LiRDKa','cyan','9720865PKghAt','Update\x20available:','end','version','now','7RoyACI','stderr','gray','next','dim','socket','channel','destroy','green','latest','statusCode','yellow','tdx\x20upgrade\x20--next','\x0aUpdate\x20available:\x20','tdx\x20upgrade','7681995Ursvgz','last_version_check_next','https://registry.npmjs.org/@treasuredata/tdx','HTTP\x20','getTime','796248GyrmlB','Invalid\x20version\x20format','\x0aRun:\x20','latestVersion','stable','parse','6jctvbM','write','5579eeouvY','updateAvailable','currentVersion','2000zFNQmB','161954EhRBWR','8bJKpIw','utils/version-check','isTTY','unref','read','3347120qkreFe','utils/version-check-next'];a216_0x6d16=function(){return _0x3665f8;};return a216_0x6d16();}export function fetchLatestVersion(_0x5991bf=a216_0x3129ab(0x205)){const _0x3ed2ae=a216_0x3129ab,_0x546d97=_0x5991bf===_0x3ed2ae(0x1f0)?_0x3ed2ae(0x1f0):_0x3ed2ae(0x1f6),_0x38073d=NPM_REGISTRY_BASE+'/'+_0x546d97;return new Promise((_0x37db43,_0x332711)=>{const _0x206d1e=_0x3ed2ae,_0x348436=get(_0x38073d,{'timeout':TIMEOUT_MS},_0x2d883a=>{const _0x1af080=a216_0x5c3c;if(_0x2d883a[_0x1af080(0x1f7)]!==0xc8){clearTimeout(_0x52fd6a),_0x332711(new Error(_0x1af080(0x1ff)+_0x2d883a[_0x1af080(0x1f7)]));return;}let _0x25ec27='';_0x2d883a['on']('data',_0x2def7c=>{_0x25ec27+=_0x2def7c;}),_0x2d883a['on'](_0x1af080(0x1ea),()=>{const _0x286f48=_0x1af080;clearTimeout(_0x52fd6a);try{const _0x3d3dcc=JSON[_0x286f48(0x206)](_0x25ec27);if(!valid(_0x3d3dcc[_0x286f48(0x1eb)])){_0x332711(new Error(_0x286f48(0x202)));return;}_0x37db43(_0x3d3dcc[_0x286f48(0x1eb)]);}catch(_0x4f34b4){_0x332711(_0x4f34b4);}});})['on']('error',_0x2b5ff8=>{clearTimeout(_0x52fd6a),_0x332711(_0x2b5ff8);});_0x348436['on'](_0x206d1e(0x1f2),_0x4200fa=>{const _0x4fc11a=_0x206d1e;_0x4200fa[_0x4fc11a(0x1e2)]();});const _0x52fd6a=setTimeout(()=>{const _0x200072=_0x206d1e;_0x348436[_0x200072(0x1f4)](),_0x332711(new Error('Request\x20timeout'));},TIMEOUT_MS);_0x52fd6a[_0x206d1e(0x1e2)]();});}export async function checkForUpdate(_0x449305,_0xf56349='stable'){const _0x1fa05d=a216_0x3129ab;try{const _0x388800=readCache(_0xf56349);if(isCacheValid(_0x388800)){const _0x4fd90e=gt(_0x388800[_0x1fa05d(0x204)],_0x449305);return{'updateAvailable':_0x4fd90e,'currentVersion':_0x449305,'latestVersion':_0x388800[_0x1fa05d(0x204)],'channel':_0xf56349};}const _0x17d683=await fetchLatestVersion(_0xf56349);writeCache(_0x17d683,_0xf56349);const _0x17f46e=gt(_0x17d683,_0x449305);return{'updateAvailable':_0x17f46e,'currentVersion':_0x449305,'latestVersion':_0x17d683,'channel':_0xf56349};}catch{return null;}}export function displayUpdateNotification(_0x3321ca){const _0xda2730=a216_0x3129ab;if(!_0x3321ca[_0xda2730(0x20a)])return;const _0xf77da2=_0x3321ca[_0xda2730(0x1f3)]==='next'?_0xda2730(0x1f9):_0xda2730(0x1fb),_0x2e00ae=process[_0xda2730(0x1ee)][_0xda2730(0x1e1)]&&!process.env.NO_COLOR,_0x6c76e8=_0x2e00ae?a216_0x5caeb8[_0xda2730(0x1ef)]('→'):'→',_0x2b5b34=_0x2e00ae?a216_0x5caeb8[_0xda2730(0x1f1)](_0x3321ca[_0xda2730(0x1dc)]):_0x3321ca[_0xda2730(0x1dc)],_0x114172=_0x2e00ae?a216_0x5caeb8[_0xda2730(0x1f5)](_0x3321ca['latestVersion']):_0x3321ca[_0xda2730(0x204)],_0x25f8d2=_0x2e00ae?a216_0x5caeb8[_0xda2730(0x1e7)](_0xf77da2):_0xf77da2,_0x278d5f=_0x2e00ae?'\x0a'+a216_0x5caeb8[_0xda2730(0x1f8)](_0xda2730(0x1e9))+'\x20'+_0x2b5b34+'\x20'+_0x6c76e8+'\x20'+_0x114172+'\x0a'+a216_0x5caeb8[_0xda2730(0x1f1)]('Run:')+'\x20'+_0x25f8d2+'\x0a':_0xda2730(0x1fa)+_0x2b5b34+'\x20'+_0x6c76e8+'\x20'+_0x114172+_0xda2730(0x203)+_0x25f8d2+'\x0a';process[_0xda2730(0x1ee)][_0xda2730(0x208)](_0x278d5f);}
1
+ const a216_0x3220ab=a216_0x4f39;(function(_0x263089,_0x2c0a8b){const _0x585eb2=a216_0x4f39,_0x1500cc=_0x263089();while(!![]){try{const _0x2ddaba=-parseInt(_0x585eb2(0xd5))/0x1*(parseInt(_0x585eb2(0xf9))/0x2)+parseInt(_0x585eb2(0xd2))/0x3*(-parseInt(_0x585eb2(0xf6))/0x4)+parseInt(_0x585eb2(0xed))/0x5+parseInt(_0x585eb2(0xf1))/0x6*(parseInt(_0x585eb2(0xe7))/0x7)+-parseInt(_0x585eb2(0xd4))/0x8*(-parseInt(_0x585eb2(0xee))/0x9)+-parseInt(_0x585eb2(0xe5))/0xa+parseInt(_0x585eb2(0xf5))/0xb;if(_0x2ddaba===_0x2c0a8b)break;else _0x1500cc['push'](_0x1500cc['shift']());}catch(_0x37fcf2){_0x1500cc['push'](_0x1500cc['shift']());}}}(a216_0x5683,0x1fd04));import{get}from'https';import{gt,valid}from'semver';function a216_0x4f39(_0x4cb2fe,_0x245b64){_0x4cb2fe=_0x4cb2fe-0xd0;const _0x5683e1=a216_0x5683();let _0x4f39a6=_0x5683e1[_0x4cb2fe];return _0x4f39a6;}import a216_0x176930 from'chalk';import{createGlobalCache}from'./global-cache.js';function a216_0x5683(){const _0x1ab3b3=['956644FjimHC','utils/version-check','destroy','433118gvslnE','latestVersion','unref','latest','read','Run:','currentVersion','\x0aUpdate\x20available:\x20','HTTP\x20','3yrPEAi','dim','5912zgoVDV','1jeyduy','version','gray','toISOString','statusCode','stable','next','last_version_check','utils/version-check-next','\x0aRun:\x20','socket','lastCheck','stderr','Update\x20available:','last_version_check_next','isTTY','2449500HfOnkk','end','7wwTZBJ','channel','cyan','Request\x20timeout','tdx\x20upgrade','now','1129840Vcgtgd','36QUVKxr','getTime','parse','60972hWRAbk','tdx\x20upgrade\x20--next','updateAvailable','write','6510812duerKw'];a216_0x5683=function(){return _0x1ab3b3;};return a216_0x5683();}const CACHE_DURATION_MS=0x18*0x3c*0x3c*0x3e8,NPM_REGISTRY_BASE='https://registry.npmjs.org/@treasuredata/tdx',TIMEOUT_MS=0x7d0,stableVersionCache=createGlobalCache(a216_0x3220ab(0xdc),a216_0x3220ab(0xf7)),nextVersionCache=createGlobalCache(a216_0x3220ab(0xe3),a216_0x3220ab(0xdd));function getCacheForChannel(_0x1ddd59){const _0x2c9b2d=a216_0x3220ab;return _0x1ddd59===_0x2c9b2d(0xdb)?nextVersionCache:stableVersionCache;}function readCache(_0xbb614c){const _0x1dd090=a216_0x3220ab;return getCacheForChannel(_0xbb614c)[_0x1dd090(0xfd)]()??null;}function writeCache(_0x645fef,_0x592a69){const _0x25cb57=a216_0x3220ab;try{getCacheForChannel(_0x592a69)[_0x25cb57(0xf4)]({'lastCheck':new Date()[_0x25cb57(0xd8)](),'latestVersion':_0x645fef});}catch{}}function isCacheValid(_0x2883e3){const _0x210d05=a216_0x3220ab;if(!_0x2883e3)return![];const _0x181229=new Date(_0x2883e3[_0x210d05(0xe0)])[_0x210d05(0xef)](),_0x58872c=Date[_0x210d05(0xec)]();return _0x58872c-_0x181229<CACHE_DURATION_MS;}export function fetchLatestVersion(_0x32d95b=a216_0x3220ab(0xda)){const _0x2f786d=a216_0x3220ab,_0x5037fb=_0x32d95b===_0x2f786d(0xdb)?_0x2f786d(0xdb):_0x2f786d(0xfc),_0x4a6c24=NPM_REGISTRY_BASE+'/'+_0x5037fb;return new Promise((_0x24700e,_0x207450)=>{const _0x274afa=_0x2f786d,_0x1e9c74=get(_0x4a6c24,{'timeout':TIMEOUT_MS},_0x787fc1=>{const _0x27c8ca=a216_0x4f39;if(_0x787fc1[_0x27c8ca(0xd9)]!==0xc8){clearTimeout(_0x421175),_0x207450(new Error(_0x27c8ca(0xd1)+_0x787fc1[_0x27c8ca(0xd9)]));return;}let _0x16a82f='';_0x787fc1['on']('data',_0x4ae25a=>{_0x16a82f+=_0x4ae25a;}),_0x787fc1['on'](_0x27c8ca(0xe6),()=>{const _0x9d5e9e=_0x27c8ca;clearTimeout(_0x421175);try{const _0x25b19b=JSON[_0x9d5e9e(0xf0)](_0x16a82f);if(!valid(_0x25b19b[_0x9d5e9e(0xd6)])){_0x207450(new Error('Invalid\x20version\x20format'));return;}_0x24700e(_0x25b19b[_0x9d5e9e(0xd6)]);}catch(_0x3d17fb){_0x207450(_0x3d17fb);}});})['on']('error',_0x1529bf=>{clearTimeout(_0x421175),_0x207450(_0x1529bf);});_0x1e9c74['on'](_0x274afa(0xdf),_0x1a9b5b=>{const _0x537a98=_0x274afa;_0x1a9b5b[_0x537a98(0xfb)]();});const _0x421175=setTimeout(()=>{const _0x427c05=_0x274afa;_0x1e9c74[_0x427c05(0xf8)](),_0x207450(new Error(_0x427c05(0xea)));},TIMEOUT_MS);_0x421175[_0x274afa(0xfb)]();});}export async function checkForUpdate(_0xfb9f90,_0x333b34=a216_0x3220ab(0xda)){const _0x5e34fe=a216_0x3220ab;try{const _0x1352b1=readCache(_0x333b34);if(isCacheValid(_0x1352b1)){const _0x523056=gt(_0x1352b1[_0x5e34fe(0xfa)],_0xfb9f90);return{'updateAvailable':_0x523056,'currentVersion':_0xfb9f90,'latestVersion':_0x1352b1[_0x5e34fe(0xfa)],'channel':_0x333b34};}const _0x2d25a5=await fetchLatestVersion(_0x333b34);writeCache(_0x2d25a5,_0x333b34);const _0x2b2e6e=gt(_0x2d25a5,_0xfb9f90);return{'updateAvailable':_0x2b2e6e,'currentVersion':_0xfb9f90,'latestVersion':_0x2d25a5,'channel':_0x333b34};}catch{return null;}}export function displayUpdateNotification(_0x28fe6f){const _0x38f3bb=a216_0x3220ab;if(!_0x28fe6f[_0x38f3bb(0xf3)])return;const _0x1f6e2f=_0x28fe6f[_0x38f3bb(0xe8)]===_0x38f3bb(0xdb)?_0x38f3bb(0xf2):_0x38f3bb(0xeb),_0x2155e6=process[_0x38f3bb(0xe1)][_0x38f3bb(0xe4)]&&!process.env.NO_COLOR,_0x440624=_0x2155e6?a216_0x176930[_0x38f3bb(0xd7)]('→'):'→',_0x4f79ac=_0x2155e6?a216_0x176930[_0x38f3bb(0xd3)](_0x28fe6f[_0x38f3bb(0xff)]):_0x28fe6f[_0x38f3bb(0xff)],_0x33b7d0=_0x2155e6?a216_0x176930['green'](_0x28fe6f[_0x38f3bb(0xfa)]):_0x28fe6f['latestVersion'],_0x2f578b=_0x2155e6?a216_0x176930[_0x38f3bb(0xe9)](_0x1f6e2f):_0x1f6e2f,_0x246a61=_0x2155e6?'\x0a'+a216_0x176930['yellow'](_0x38f3bb(0xe2))+'\x20'+_0x4f79ac+'\x20'+_0x440624+'\x20'+_0x33b7d0+'\x0a'+a216_0x176930[_0x38f3bb(0xd3)](_0x38f3bb(0xfe))+'\x20'+_0x2f578b+'\x0a':_0x38f3bb(0xd0)+_0x4f79ac+'\x20'+_0x440624+'\x20'+_0x33b7d0+_0x38f3bb(0xde)+_0x2f578b+'\x0a';process[_0x38f3bb(0xe1)][_0x38f3bb(0xf4)](_0x246a61);}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@treasuredata/tdx",
3
- "version": "2026.3.23",
3
+ "version": "2026.3.24",
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": {