@treasuredata/tdx 0.8.0 → 0.8.2

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 (125) hide show
  1. package/dist/bin.js +1 -1
  2. package/dist/build-info.json +2 -2
  3. package/dist/cli-categories.js +1 -1
  4. package/dist/cli.d.ts.map +1 -1
  5. package/dist/cli.js +1 -1
  6. package/dist/cli.js.map +1 -1
  7. package/dist/client/cdp-api-client.js +1 -1
  8. package/dist/client/engage-api-client.js +1 -1
  9. package/dist/client/http-client.js +1 -1
  10. package/dist/client/llm-api-client.js +1 -1
  11. package/dist/client/rate-limiter.js +1 -1
  12. package/dist/client/td-api-client.d.ts +2 -0
  13. package/dist/client/td-api-client.d.ts.map +1 -1
  14. package/dist/client/td-api-client.js +1 -1
  15. package/dist/client/td-api-client.js.map +1 -1
  16. package/dist/client/trino-api-client.js +1 -1
  17. package/dist/client/workflow-client.js +1 -1
  18. package/dist/commands/activations.js +1 -1
  19. package/dist/commands/api-command.js +1 -1
  20. package/dist/commands/auth-command.js +1 -1
  21. package/dist/commands/chat-command.js +1 -1
  22. package/dist/commands/claude-command.d.ts.map +1 -1
  23. package/dist/commands/claude-command.js +1 -1
  24. package/dist/commands/claude-command.js.map +1 -1
  25. package/dist/commands/claude-statusline-command.d.ts +1 -1
  26. package/dist/commands/claude-statusline-command.d.ts.map +1 -1
  27. package/dist/commands/claude-statusline-command.js +1 -1
  28. package/dist/commands/claude-statusline-command.js.map +1 -1
  29. package/dist/commands/claude-usage-command.js +1 -1
  30. package/dist/commands/command.js +1 -1
  31. package/dist/commands/connection-command.js +1 -1
  32. package/dist/commands/context-command.js +1 -1
  33. package/dist/commands/databases.js +1 -1
  34. package/dist/commands/describe.js +1 -1
  35. package/dist/commands/engage-command.js +1 -1
  36. package/dist/commands/job-command.js +1 -1
  37. package/dist/commands/llm-command.js +1 -1
  38. package/dist/commands/llm-proxy.js +1 -1
  39. package/dist/commands/parent-segment-command.js +1 -1
  40. package/dist/commands/profiles-command.js +1 -1
  41. package/dist/commands/query-command.js +1 -1
  42. package/dist/commands/segment-command.js +1 -1
  43. package/dist/commands/segment-create-command.js +1 -1
  44. package/dist/commands/segment-fields-command.js +1 -1
  45. package/dist/commands/segment-pull-command.js +1 -1
  46. package/dist/commands/segment-push-command.js +1 -1
  47. package/dist/commands/segment-update-command.js +1 -1
  48. package/dist/commands/segment-use-command.js +1 -1
  49. package/dist/commands/segments.js +1 -1
  50. package/dist/commands/show.js +1 -1
  51. package/dist/commands/tables.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/config.d.ts +26 -0
  57. package/dist/core/config.d.ts.map +1 -1
  58. package/dist/core/config.js +1 -1
  59. package/dist/core/config.js.map +1 -1
  60. package/dist/core/connection-cache.js +1 -1
  61. package/dist/core/credential-cache.js +1 -1
  62. package/dist/core/global-context.js +1 -1
  63. package/dist/core/keychain.js +1 -1
  64. package/dist/core/profile.js +1 -1
  65. package/dist/core/project-config.js +1 -1
  66. package/dist/core/session.js +1 -1
  67. package/dist/core/user-cache.js +1 -1
  68. package/dist/index.js +1 -1
  69. package/dist/proxy/anthropic-adapter.js +1 -1
  70. package/dist/proxy/claude-usage-tracker.js +1 -1
  71. package/dist/proxy/context-signature.js +1 -1
  72. package/dist/proxy/conversation-utils.js +1 -1
  73. package/dist/proxy/server.js +1 -1
  74. package/dist/proxy/session-cache.js +1 -1
  75. package/dist/sdk/api.js +1 -1
  76. package/dist/sdk/connection.js +1 -1
  77. package/dist/sdk/engage.js +1 -1
  78. package/dist/sdk/errors.js +1 -1
  79. package/dist/sdk/index.js +1 -1
  80. package/dist/sdk/job.js +1 -1
  81. package/dist/sdk/llm.js +1 -1
  82. package/dist/sdk/query.js +1 -1
  83. package/dist/sdk/segment/child-segment-yaml.js +1 -1
  84. package/dist/sdk/segment/parent-segment-preview.js +1 -1
  85. package/dist/sdk/segment/parent-segment-yaml.js +1 -1
  86. package/dist/sdk/segment.js +1 -1
  87. package/dist/sdk/user.js +1 -1
  88. package/dist/sdk/workflow.js +1 -1
  89. package/dist/types/endpoints.js +1 -1
  90. package/dist/types/index.d.ts +20 -1
  91. package/dist/types/index.d.ts.map +1 -1
  92. package/dist/types/index.js +1 -1
  93. package/dist/types/index.js.map +1 -1
  94. package/dist/utils/agent-ref-parser.js +1 -1
  95. package/dist/utils/async.js +1 -1
  96. package/dist/utils/chat-cache.js +1 -1
  97. package/dist/utils/colors.js +1 -1
  98. package/dist/utils/command-output.js +1 -1
  99. package/dist/utils/constants.js +1 -1
  100. package/dist/utils/diff.js +1 -1
  101. package/dist/utils/fields-display.js +1 -1
  102. package/dist/utils/file-permissions.js +1 -1
  103. package/dist/utils/format-detector.js +1 -1
  104. package/dist/utils/formatters.js +1 -1
  105. package/dist/utils/json-loader.js +1 -1
  106. package/dist/utils/llm-backup-utils.js +1 -1
  107. package/dist/utils/model-aliases.js +1 -1
  108. package/dist/utils/model-factors.js +1 -1
  109. package/dist/utils/option-validation.js +1 -1
  110. package/dist/utils/port.js +1 -1
  111. package/dist/utils/process.js +1 -1
  112. package/dist/utils/prompt.js +1 -1
  113. package/dist/utils/segment-path-parser.js +1 -1
  114. package/dist/utils/segment-ref-parser.js +1 -1
  115. package/dist/utils/spinner.js +1 -1
  116. package/dist/utils/sql-parser.js +1 -1
  117. package/dist/utils/sse-parser.js +1 -1
  118. package/dist/utils/string-utils.js +1 -1
  119. package/dist/utils/table-ref-parser.js +1 -1
  120. package/dist/utils/tdx-config.js +1 -1
  121. package/dist/utils/tdx-logger.js +1 -1
  122. package/dist/utils/tree-formatter.js +1 -1
  123. package/dist/utils/version-check.js +1 -1
  124. package/dist/utils/workflow-utils.js +1 -1
  125. package/package.json +1 -1
@@ -1 +1 @@
1
- const a112_0x190d1a=a112_0x6d04;(function(_0x1095bc,_0x57a2d1){const _0x1ae472=a112_0x6d04,_0x5b3b09=_0x1095bc();while(!![]){try{const _0x158783=-parseInt(_0x1ae472(0xf1))/0x1+-parseInt(_0x1ae472(0x10c))/0x2+parseInt(_0x1ae472(0xdd))/0x3*(parseInt(_0x1ae472(0xe5))/0x4)+parseInt(_0x1ae472(0x10b))/0x5*(-parseInt(_0x1ae472(0x105))/0x6)+parseInt(_0x1ae472(0xf9))/0x7*(-parseInt(_0x1ae472(0xec))/0x8)+parseInt(_0x1ae472(0xea))/0x9+parseInt(_0x1ae472(0xed))/0xa*(parseInt(_0x1ae472(0xd9))/0xb);if(_0x158783===_0x57a2d1)break;else _0x5b3b09['push'](_0x5b3b09['shift']());}catch(_0x339bb9){_0x5b3b09['push'](_0x5b3b09['shift']());}}}(a112_0x51d5,0x28214));import{createWriteStream,createReadStream}from'fs';import{mkdir,readdir,unlink,stat,rename}from'fs/promises';import{join}from'path';import{homedir}from'os';import{createGzip}from'zlib';import{pipeline}from'stream/promises';import a112_0x1342d5 from'chalk';function safeStringify(_0x2870b3){const _0x1c87a3=a112_0x6d04;if(typeof _0x2870b3===_0x1c87a3(0xe4))return _0x2870b3;if(_0x2870b3 instanceof Error)return _0x2870b3[_0x1c87a3(0xe0)]||_0x2870b3[_0x1c87a3(0xf8)]+':\x20'+_0x2870b3['message'];try{return JSON['stringify'](_0x2870b3,(_0x35b8c2,_0x9bdcb0)=>{const _0x18f2e5=_0x1c87a3;if(_0x9bdcb0 instanceof Error)return{'name':_0x9bdcb0['name'],'message':_0x9bdcb0[_0x18f2e5(0xd7)],'stack':_0x9bdcb0[_0x18f2e5(0xe0)],'cause':_0x9bdcb0['cause']};return _0x9bdcb0;});}catch{return String(_0x2870b3);}}function getTimezoneOffset(){const _0x2b3f04=a112_0x6d04,_0x52a045=-new Date()[_0x2b3f04(0xf6)](),_0x5a9748=Math[_0x2b3f04(0xfe)](Math[_0x2b3f04(0xd2)](_0x52a045)/0x3c),_0x172cb6=Math['abs'](_0x52a045)%0x3c,_0x56e3ae=_0x52a045>=0x0?'+':'-';return''+_0x56e3ae+_0x5a9748[_0x2b3f04(0xd4)]()['padStart'](0x2,'0')+_0x172cb6[_0x2b3f04(0xd4)]()[_0x2b3f04(0xe7)](0x2,'0');}function formatTimestamp(){const _0x58df87=a112_0x6d04,_0x343151=new Date(),_0x40d51c=_0x343151['getFullYear'](),_0x3abb8e=(_0x343151[_0x58df87(0x104)]()+0x1)[_0x58df87(0xd4)]()[_0x58df87(0xe7)](0x2,'0'),_0x9f9e8d=_0x343151[_0x58df87(0xfc)]()[_0x58df87(0xd4)]()['padStart'](0x2,'0'),_0x5352ee=_0x343151['getHours']()['toString']()[_0x58df87(0xe7)](0x2,'0'),_0x526d21=_0x343151['getMinutes']()[_0x58df87(0xd4)]()[_0x58df87(0xe7)](0x2,'0'),_0x5334e5=_0x343151[_0x58df87(0xd1)]()[_0x58df87(0xd4)]()[_0x58df87(0xe7)](0x2,'0'),_0x39c552=_0x343151[_0x58df87(0xd6)]()[_0x58df87(0xd4)]()[_0x58df87(0xe7)](0x3,'0'),_0xed16b7=getTimezoneOffset();return _0x40d51c+'-'+_0x3abb8e+'-'+_0x9f9e8d+'\x20'+_0x5352ee+':'+_0x526d21+':'+_0x5334e5+'.'+_0x39c552+_0xed16b7;}function formatColoredLogEntry(_0x4bf44f,_0x45393d){const _0x3f5b4e=a112_0x6d04,_0x5e1e6a=formatTimestamp(),_0x28e347=_0x45393d[_0x3f5b4e(0xeb)](safeStringify)[_0x3f5b4e(0xf2)]('\x20'),_0x52e713=a112_0x1342d5['gray'](_0x5e1e6a);let _0x2879bc;switch(_0x4bf44f){case _0x3f5b4e(0x102):_0x2879bc=a112_0x1342d5[_0x3f5b4e(0xcf)]('['+_0x4bf44f+']\x20');break;case'warn':_0x2879bc=a112_0x1342d5[_0x3f5b4e(0xda)]('['+_0x4bf44f+']\x20');break;case _0x3f5b4e(0xde):_0x2879bc=a112_0x1342d5[_0x3f5b4e(0xe2)]('['+_0x4bf44f+']');break;case _0x3f5b4e(0xf3):_0x2879bc=a112_0x1342d5[_0x3f5b4e(0x10a)]('['+_0x4bf44f+']');break;default:_0x2879bc='['+_0x4bf44f+']';}return _0x52e713+'\x20'+_0x2879bc+'\x20'+_0x28e347;}export var LogLevel;(function(_0xe4462c){const _0x3dcb6d=a112_0x6d04;_0xe4462c[_0xe4462c['TRACE']=-0x2]='TRACE',_0xe4462c[_0xe4462c[_0x3dcb6d(0x101)]=-0x1]='DEBUG',_0xe4462c[_0xe4462c['INFO']=0x0]=_0x3dcb6d(0xe3),_0xe4462c[_0xe4462c[_0x3dcb6d(0xfd)]=0x1]=_0x3dcb6d(0xfd),_0xe4462c[_0xe4462c[_0x3dcb6d(0xd5)]=0x2]='ERROR';}(LogLevel||(LogLevel={})));export class TDXLogger{[a112_0x190d1a(0xe6)];['logDir'];['logLevel'];[a112_0x190d1a(0x107)];constructor(_0x2091d3=LogLevel[a112_0x190d1a(0xe3)],_0x2f9301=![]){const _0x20e10c=a112_0x190d1a;this[_0x20e10c(0xdb)]=join(homedir(),_0x20e10c(0xdf),'tdx',_0x20e10c(0xe1)),this[_0x20e10c(0xe9)]=_0x2091d3,this[_0x20e10c(0x107)]=_0x2f9301;}async[a112_0x190d1a(0xee)](){const _0x31d774=a112_0x190d1a;try{await mkdir(this[_0x31d774(0xdb)],{'recursive':!![]}),await this[_0x31d774(0x108)]();const _0x165427=join(this[_0x31d774(0xdb)],_0x31d774(0xe8));this['logStream']=createWriteStream(_0x165427,{'flags':'a'}),this['logStream']['on']('error',_0x887657=>{const _0x243cc2=_0x31d774;console[_0x243cc2(0xde)](_0x243cc2(0xd3),_0x887657[_0x243cc2(0xd7)]);});}catch(_0x45d3b1){console[_0x31d774(0xde)](_0x31d774(0xf5),_0x45d3b1);}}async['rotateOldLogs'](){const _0x324bab=a112_0x190d1a;try{const _0x5c36a6=await readdir(this['logDir']),_0x5e467f=new Date()['toISOString']()[_0x324bab(0xdc)]('T')[0x0];if(_0x5c36a6[_0x324bab(0xd8)](_0x324bab(0xe8))){const _0xd6a464=join(this[_0x324bab(0xdb)],_0x324bab(0xe8)),_0x2d2380=await stat(_0xd6a464),_0x2cb082=new Date(_0x2d2380[_0x324bab(0x103)])[_0x324bab(0x100)]()['split']('T')[0x0];if(_0x2cb082<_0x5e467f){const _0xfe03ce=join(this[_0x324bab(0xdb)],_0x324bab(0xf0)+_0x2cb082+_0x324bab(0xd0));await rename(_0xd6a464,_0xfe03ce);}}const _0xc2d859=await readdir(this[_0x324bab(0xdb)]),_0xd788af=/^tdx-(\d{4}-\d{2}-\d{2})\.log$/,_0x39c286=_0xc2d859[_0x324bab(0xf4)](_0x17e4ee=>_0xd788af['test'](_0x17e4ee));for(const _0x34771a of _0x39c286){const _0x3ce2d0=join(this[_0x324bab(0xdb)],_0x34771a),_0x495c15=join(this[_0x324bab(0xdb)],_0x34771a+_0x324bab(0xfa));try{await pipeline(createReadStream(_0x3ce2d0),createGzip(),createWriteStream(_0x495c15)),await unlink(_0x3ce2d0);}catch(_0xa2bfa0){console['error'](_0x324bab(0xef)+_0x34771a+':',_0xa2bfa0);}}}catch{}}[a112_0x190d1a(0xf3)](..._0x362fc3){const _0x3c84f5=a112_0x190d1a;if(this['logLevel']>LogLevel[_0x3c84f5(0x101)])return;const _0x4d026a=formatColoredLogEntry(_0x3c84f5(0xf3),_0x362fc3);this[_0x3c84f5(0xe6)]?.['write'](_0x4d026a+'\x0a');}[a112_0x190d1a(0xfb)](..._0x3cfcaf){const _0x826e6a=a112_0x190d1a;if(this[_0x826e6a(0xe9)]>LogLevel[_0x826e6a(0xff)])return;const _0x50d1ec=formatColoredLogEntry(_0x826e6a(0xfb),_0x3cfcaf);this[_0x826e6a(0xe6)]?.['write'](_0x50d1ec+'\x0a');}[a112_0x190d1a(0x102)](..._0x2268ad){const _0x398ef4=a112_0x190d1a;if(this[_0x398ef4(0xe9)]>LogLevel[_0x398ef4(0xe3)])return;const _0x4fa66c=formatColoredLogEntry(_0x398ef4(0x102),_0x2268ad);!this[_0x398ef4(0x107)]&&console[_0x398ef4(0x106)](_0x4fa66c),this[_0x398ef4(0xe6)]?.[_0x398ef4(0x109)](_0x4fa66c+'\x0a');}[a112_0x190d1a(0xf7)](..._0x29be19){const _0x443b07=a112_0x190d1a;if(this[_0x443b07(0xe9)]>LogLevel[_0x443b07(0xfd)])return;const _0x4f76b0=formatColoredLogEntry(_0x443b07(0xf7),_0x29be19);!this[_0x443b07(0x107)]&&console['error'](_0x4f76b0),this['logStream']?.['write'](_0x4f76b0+'\x0a');}['error'](..._0x3f8d07){const _0x4879d4=a112_0x190d1a,_0x42df95=formatColoredLogEntry(_0x4879d4(0xde),_0x3f8d07);!this['fileOnly']&&console[_0x4879d4(0xde)](_0x42df95),this[_0x4879d4(0xe6)]?.[_0x4879d4(0x109)](_0x42df95+'\x0a');}async['close'](){const _0x574d5d=a112_0x190d1a;return this[_0x574d5d(0x102)]('Proxy\x20session\x20ended'),new Promise(_0x371c9e=>{const _0xcf4eb2=_0x574d5d;this[_0xcf4eb2(0xe6)]?this[_0xcf4eb2(0xe6)]['end'](()=>{_0x371c9e();}):_0x371c9e();});}['getLogPath'](){const _0x4be714=a112_0x190d1a;return join(this[_0x4be714(0xdb)],'tdx.log');}}function a112_0x6d04(_0x21a72b,_0x302538){_0x21a72b=_0x21a72b-0xcf;const _0x51d599=a112_0x51d5();let _0x6d0423=_0x51d599[_0x21a72b];return _0x6d0423;}function a112_0x51d5(){const _0x8ca0a0=['write','gray','1017410NuYkql','565662qNZGpd','cyan','.log','getSeconds','abs','Warning:\x20Error\x20writing\x20to\x20tdx.log:','toString','ERROR','getMilliseconds','message','includes','126742TKPKJS','yellow','logDir','split','844551ArKNCP','error','.cache','stack','logs','red','INFO','string','4aHBHfI','logStream','padStart','tdx.log','logLevel','2898675yhhrxT','map','169720RVzgRC','230vxDwvT','init','Warning:\x20Failed\x20to\x20compress\x20','tdx-','154268iiyjZd','join','debug','filter','Warning:\x20Failed\x20to\x20initialize\x20log\x20files:','getTimezoneOffset','warn','name','21BuVaxH','.gz','trace','getDate','WARN','floor','TRACE','toISOString','DEBUG','info','mtime','getMonth','6yFjMcU','log','fileOnly','rotateOldLogs'];a112_0x51d5=function(){return _0x8ca0a0;};return a112_0x51d5();}
1
+ const a112_0x2bfe61=a112_0x345e;(function(_0x2325ef,_0x4e6b0){const _0x34de62=a112_0x345e,_0x4561f5=_0x2325ef();while(!![]){try{const _0x2e4da0=parseInt(_0x34de62(0x10c))/0x1*(parseInt(_0x34de62(0x115))/0x2)+-parseInt(_0x34de62(0x11c))/0x3*(parseInt(_0x34de62(0xf9))/0x4)+parseInt(_0x34de62(0xfa))/0x5+-parseInt(_0x34de62(0x135))/0x6+-parseInt(_0x34de62(0x116))/0x7+parseInt(_0x34de62(0x131))/0x8+-parseInt(_0x34de62(0x11b))/0x9;if(_0x2e4da0===_0x4e6b0)break;else _0x4561f5['push'](_0x4561f5['shift']());}catch(_0x2f4ff9){_0x4561f5['push'](_0x4561f5['shift']());}}}(a112_0x54e0,0xa028e));import{createWriteStream,createReadStream}from'fs';import{mkdir,readdir,unlink,stat,rename}from'fs/promises';import{join}from'path';import{homedir}from'os';import{createGzip}from'zlib';import{pipeline}from'stream/promises';import a112_0xfcbce0 from'chalk';function safeStringify(_0x186908){const _0x1e347b=a112_0x345e;if(typeof _0x186908==='string')return _0x186908;if(_0x186908 instanceof Error)return _0x186908[_0x1e347b(0x110)]||_0x186908[_0x1e347b(0x102)]+':\x20'+_0x186908[_0x1e347b(0x125)];try{return JSON[_0x1e347b(0xfb)](_0x186908,(_0x432792,_0x18e8c2)=>{const _0x4d08de=_0x1e347b;if(_0x18e8c2 instanceof Error)return{'name':_0x18e8c2['name'],'message':_0x18e8c2[_0x4d08de(0x125)],'stack':_0x18e8c2[_0x4d08de(0x110)],'cause':_0x18e8c2['cause']};return _0x18e8c2;});}catch{return String(_0x186908);}}function getTimezoneOffset(){const _0x29b6d8=a112_0x345e,_0xc07569=-new Date()[_0x29b6d8(0x11d)](),_0x3eb9c1=Math[_0x29b6d8(0x100)](Math[_0x29b6d8(0x12e)](_0xc07569)/0x3c),_0xb9532f=Math[_0x29b6d8(0x12e)](_0xc07569)%0x3c,_0x597010=_0xc07569>=0x0?'+':'-';return''+_0x597010+_0x3eb9c1[_0x29b6d8(0x12a)]()[_0x29b6d8(0x127)](0x2,'0')+_0xb9532f[_0x29b6d8(0x12a)]()[_0x29b6d8(0x127)](0x2,'0');}function formatTimestamp(){const _0x3fb304=a112_0x345e,_0x363b3a=new Date(),_0x578627=_0x363b3a[_0x3fb304(0x10a)](),_0xf50d2c=(_0x363b3a[_0x3fb304(0x112)]()+0x1)[_0x3fb304(0x12a)]()['padStart'](0x2,'0'),_0x27d5c=_0x363b3a[_0x3fb304(0x121)]()[_0x3fb304(0x12a)]()[_0x3fb304(0x127)](0x2,'0'),_0xc9f3cf=_0x363b3a[_0x3fb304(0x118)]()[_0x3fb304(0x12a)]()[_0x3fb304(0x127)](0x2,'0'),_0x2f4222=_0x363b3a['getMinutes']()[_0x3fb304(0x12a)]()[_0x3fb304(0x127)](0x2,'0'),_0x163011=_0x363b3a[_0x3fb304(0x123)]()[_0x3fb304(0x12a)]()['padStart'](0x2,'0'),_0x31735a=_0x363b3a[_0x3fb304(0x12d)]()['toString']()[_0x3fb304(0x127)](0x3,'0'),_0x4853ca=getTimezoneOffset();return _0x578627+'-'+_0xf50d2c+'-'+_0x27d5c+'\x20'+_0xc9f3cf+':'+_0x2f4222+':'+_0x163011+'.'+_0x31735a+_0x4853ca;}function a112_0x345e(_0x3ed54,_0x2f7bbd){_0x3ed54=_0x3ed54-0xf9;const _0x54e034=a112_0x54e0();let _0x345e37=_0x54e034[_0x3ed54];return _0x345e37;}function formatColoredLogEntry(_0x2a4a57,_0x384ef0){const _0x5379f2=a112_0x345e,_0x3af48a=formatTimestamp(),_0x1cc280=_0x384ef0[_0x5379f2(0x132)](safeStringify)[_0x5379f2(0x11e)]('\x20'),_0xbd9405=a112_0xfcbce0['gray'](_0x3af48a);let _0x43a6a5;switch(_0x2a4a57){case _0x5379f2(0x114):_0x43a6a5=a112_0xfcbce0[_0x5379f2(0xff)]('['+_0x2a4a57+']\x20');break;case _0x5379f2(0x128):_0x43a6a5=a112_0xfcbce0['yellow']('['+_0x2a4a57+']\x20');break;case _0x5379f2(0x111):_0x43a6a5=a112_0xfcbce0[_0x5379f2(0x107)]('['+_0x2a4a57+']');break;case _0x5379f2(0xfe):_0x43a6a5=a112_0xfcbce0[_0x5379f2(0x108)]('['+_0x2a4a57+']');break;default:_0x43a6a5='['+_0x2a4a57+']';}return _0xbd9405+'\x20'+_0x43a6a5+'\x20'+_0x1cc280;}function a112_0x54e0(){const _0x26a137=['tdx','.cache','red','gray','trace','getFullYear','Warning:\x20Failed\x20to\x20compress\x20','860599aTPOUG','logStream','TRACE','WARN','stack','error','getMonth','Warning:\x20Error\x20writing\x20to\x20tdx.log:','info','2MBhlEF','4808776TCefKt','getLogPath','getHours','rotateOldLogs','toISOString','7846767ZuFuwJ','677082EWvlVK','getTimezoneOffset','join','split','logLevel','getDate','test','getSeconds','Proxy\x20session\x20ended','message','fileOnly','padStart','warn','end','toString','ERROR','Warning:\x20Failed\x20to\x20initialize\x20log\x20files:','getMilliseconds','abs','INFO','mtime','9026328QmYBXj','map','.gz','logDir','1713624fhmtjE','12xwNdJx','5943205xRcyjo','stringify','DEBUG','write','debug','cyan','floor','tdx.log','name','includes','.log'];a112_0x54e0=function(){return _0x26a137;};return a112_0x54e0();}export var LogLevel;(function(_0x346d71){const _0x56f45c=a112_0x345e;_0x346d71[_0x346d71['TRACE']=-0x2]=_0x56f45c(0x10e),_0x346d71[_0x346d71[_0x56f45c(0xfc)]=-0x1]=_0x56f45c(0xfc),_0x346d71[_0x346d71[_0x56f45c(0x12f)]=0x0]=_0x56f45c(0x12f),_0x346d71[_0x346d71[_0x56f45c(0x10f)]=0x1]=_0x56f45c(0x10f),_0x346d71[_0x346d71[_0x56f45c(0x12b)]=0x2]=_0x56f45c(0x12b);}(LogLevel||(LogLevel={})));export class TDXLogger{[a112_0x2bfe61(0x10d)];[a112_0x2bfe61(0x134)];[a112_0x2bfe61(0x120)];['fileOnly'];constructor(_0x479c57=LogLevel[a112_0x2bfe61(0x12f)],_0x2d78dc=![]){const _0x191910=a112_0x2bfe61;this['logDir']=join(homedir(),_0x191910(0x106),_0x191910(0x105),'logs'),this[_0x191910(0x120)]=_0x479c57,this[_0x191910(0x126)]=_0x2d78dc;}async['init'](){const _0x557d85=a112_0x2bfe61;try{await mkdir(this['logDir'],{'recursive':!![]}),await this[_0x557d85(0x119)]();const _0x348b31=join(this[_0x557d85(0x134)],_0x557d85(0x101));this['logStream']=createWriteStream(_0x348b31,{'flags':'a'}),this['logStream']['on']('error',_0x3f45ab=>{const _0x3b9394=_0x557d85;console[_0x3b9394(0x111)](_0x3b9394(0x113),_0x3f45ab['message']);});}catch(_0x568853){console['error'](_0x557d85(0x12c),_0x568853);}}async[a112_0x2bfe61(0x119)](){const _0x365db7=a112_0x2bfe61;try{const _0xc8a3db=await readdir(this[_0x365db7(0x134)]),_0x30d944=new Date()[_0x365db7(0x11a)]()[_0x365db7(0x11f)]('T')[0x0];if(_0xc8a3db[_0x365db7(0x103)](_0x365db7(0x101))){const _0xa9dae0=join(this[_0x365db7(0x134)],_0x365db7(0x101)),_0x44eafc=await stat(_0xa9dae0),_0x15b700=new Date(_0x44eafc[_0x365db7(0x130)])['toISOString']()[_0x365db7(0x11f)]('T')[0x0];if(_0x15b700<_0x30d944){const _0x506683=join(this['logDir'],'tdx-'+_0x15b700+_0x365db7(0x104));await rename(_0xa9dae0,_0x506683);}}const _0x5c0de8=await readdir(this[_0x365db7(0x134)]),_0x57724d=/^tdx-(\d{4}-\d{2}-\d{2})\.log$/,_0x944315=_0x5c0de8['filter'](_0x3c71a1=>_0x57724d[_0x365db7(0x122)](_0x3c71a1));for(const _0x172a54 of _0x944315){const _0xe817af=join(this[_0x365db7(0x134)],_0x172a54),_0x2a68bf=join(this[_0x365db7(0x134)],_0x172a54+_0x365db7(0x133));try{await pipeline(createReadStream(_0xe817af),createGzip(),createWriteStream(_0x2a68bf)),await unlink(_0xe817af);}catch(_0x1168dd){console['error'](_0x365db7(0x10b)+_0x172a54+':',_0x1168dd);}}}catch{}}[a112_0x2bfe61(0xfe)](..._0xb50f4c){const _0x1ac6b0=a112_0x2bfe61;if(this[_0x1ac6b0(0x120)]>LogLevel[_0x1ac6b0(0xfc)])return;const _0x170a54=formatColoredLogEntry(_0x1ac6b0(0xfe),_0xb50f4c);this[_0x1ac6b0(0x10d)]?.['write'](_0x170a54+'\x0a');}[a112_0x2bfe61(0x109)](..._0x1806e2){const _0x54f8d6=a112_0x2bfe61;if(this['logLevel']>LogLevel[_0x54f8d6(0x10e)])return;const _0x5d8b5=formatColoredLogEntry(_0x54f8d6(0x109),_0x1806e2);this[_0x54f8d6(0x10d)]?.['write'](_0x5d8b5+'\x0a');}[a112_0x2bfe61(0x114)](..._0x411da1){const _0x18495c=a112_0x2bfe61;if(this[_0x18495c(0x120)]>LogLevel['INFO'])return;const _0x14ce29=formatColoredLogEntry(_0x18495c(0x114),_0x411da1);!this[_0x18495c(0x126)]&&console['log'](_0x14ce29),this['logStream']?.[_0x18495c(0xfd)](_0x14ce29+'\x0a');}[a112_0x2bfe61(0x128)](..._0x192bb3){const _0x5a9906=a112_0x2bfe61;if(this['logLevel']>LogLevel[_0x5a9906(0x10f)])return;const _0x489dd2=formatColoredLogEntry('warn',_0x192bb3);!this['fileOnly']&&console['error'](_0x489dd2),this['logStream']?.[_0x5a9906(0xfd)](_0x489dd2+'\x0a');}[a112_0x2bfe61(0x111)](..._0x1b4f9a){const _0x128061=a112_0x2bfe61,_0x47e473=formatColoredLogEntry(_0x128061(0x111),_0x1b4f9a);!this['fileOnly']&&console[_0x128061(0x111)](_0x47e473),this[_0x128061(0x10d)]?.[_0x128061(0xfd)](_0x47e473+'\x0a');}async['close'](){const _0x243849=a112_0x2bfe61;return this[_0x243849(0x114)](_0x243849(0x124)),new Promise(_0xe8f99=>{const _0x450685=_0x243849;this[_0x450685(0x10d)]?this['logStream'][_0x450685(0x129)](()=>{_0xe8f99();}):_0xe8f99();});}[a112_0x2bfe61(0x117)](){const _0x119aad=a112_0x2bfe61;return join(this['logDir'],_0x119aad(0x101));}}
@@ -1 +1 @@
1
- (function(_0x29ec16,_0x3fd05b){const _0x244fb6=a113_0x51af,_0x3ac736=_0x29ec16();while(!![]){try{const _0x324f53=parseInt(_0x244fb6(0x208))/0x1+-parseInt(_0x244fb6(0x1ff))/0x2*(parseInt(_0x244fb6(0x204))/0x3)+-parseInt(_0x244fb6(0x200))/0x4+-parseInt(_0x244fb6(0x203))/0x5+parseInt(_0x244fb6(0x205))/0x6*(-parseInt(_0x244fb6(0x1fc))/0x7)+parseInt(_0x244fb6(0x1f6))/0x8+-parseInt(_0x244fb6(0x1fa))/0x9*(-parseInt(_0x244fb6(0x202))/0xa);if(_0x324f53===_0x3fd05b)break;else _0x3ac736['push'](_0x3ac736['shift']());}catch(_0x485324){_0x3ac736['push'](_0x3ac736['shift']());}}}(a113_0x22b7,0xb881c));import{formatRows}from'./formatters.js';function a113_0x51af(_0x131361,_0x436f14){_0x131361=_0x131361-0x1f0;const _0x22b7f4=a113_0x22b7();let _0x51af3b=_0x22b7f4[_0x131361];return _0x51af3b;}import a113_0x2c28e6 from'chalk';const DEFAULT_OPTIONS={'showTreeLines':!![],'showIcons':!![],'showMetadata':!![],'indent':'\x20\x20'};export function formatTree(_0x4c9553,_0x53e018={},_0x269af7=0x0,_0x59ce40=''){const _0x2185bb=a113_0x51af,_0x51174f={...DEFAULT_OPTIONS,..._0x53e018},_0x243b23=[],_0x512f08=[..._0x4c9553][_0x2185bb(0x20d)]((_0x10e906,_0x828ea2)=>_0x10e906[_0x2185bb(0x1fe)][_0x2185bb(0x1f0)](_0x828ea2[_0x2185bb(0x1fe)]));for(let _0x2c693c=0x0;_0x2c693c<_0x512f08[_0x2185bb(0x20a)];_0x2c693c++){const _0x55fa17=_0x512f08[_0x2c693c],_0x191268=_0x2c693c===_0x512f08[_0x2185bb(0x20a)]-0x1;let _0x42a04a='';_0x269af7>0x0&&(_0x42a04a+=_0x59ce40);_0x51174f['showTreeLines']&&_0x269af7>0x0&&(_0x42a04a+=a113_0x2c28e6['dim'](_0x191268?'└──\x20':'├──\x20'));_0x51174f['showIcons']&&(_0x42a04a+=_0x55fa17[_0x2185bb(0x201)]===_0x2185bb(0x20f)?'📁\x20':'🎯\x20');_0x42a04a+=_0x55fa17[_0x2185bb(0x1fe)];if(_0x51174f[_0x2185bb(0x1f5)]){if(_0x55fa17[_0x2185bb(0x201)]==='folder'){const _0xca179e=[];_0x55fa17[_0x2185bb(0x206)][_0x2185bb(0x20b)]&&_0xca179e['push'](_0x55fa17[_0x2185bb(0x206)][_0x2185bb(0x20b)]+'\x20segment'+(_0x55fa17[_0x2185bb(0x206)][_0x2185bb(0x20b)]!==0x1?'s':'')),_0x55fa17[_0x2185bb(0x206)][_0x2185bb(0x1f7)]&&_0xca179e['push'](_0x55fa17[_0x2185bb(0x206)][_0x2185bb(0x1f7)]+_0x2185bb(0x1f9)+(_0x55fa17[_0x2185bb(0x206)][_0x2185bb(0x1f7)]!==0x1?'s':'')),_0xca179e[_0x2185bb(0x20a)]>0x0&&(_0x42a04a+=a113_0x2c28e6['dim']('\x20('+_0xca179e[_0x2185bb(0x1f1)](',\x20')+')'));}else _0x55fa17['type']===_0x2185bb(0x1f4)&&_0x55fa17[_0x2185bb(0x1fd)]!==undefined&&(_0x42a04a+=a113_0x2c28e6[_0x2185bb(0x1f2)]('\x20('+formatRows(_0x55fa17[_0x2185bb(0x1fd)])+')'));}_0x243b23[_0x2185bb(0x20c)](_0x42a04a);if(_0x55fa17[_0x2185bb(0x1fb)]&&_0x55fa17['children'][_0x2185bb(0x20a)]>0x0){let _0x237cd3;if(_0x269af7===0x0)_0x237cd3='';else _0x51174f['showTreeLines']?_0x237cd3=_0x59ce40+(_0x191268?'\x20\x20\x20\x20':a113_0x2c28e6[_0x2185bb(0x1f2)]('│')+_0x2185bb(0x209)):_0x237cd3=_0x59ce40+_0x51174f[_0x2185bb(0x1f8)];const _0x4adaf4=formatTree(_0x55fa17[_0x2185bb(0x1fb)],_0x51174f,_0x269af7+0x1,_0x237cd3);_0x243b23[_0x2185bb(0x20c)](_0x4adaf4);}}return _0x243b23['join']('\x0a');}function a113_0x22b7(){const _0x3633e4=['name','1225064nlnNvL','327848WGMZab','type','130180PMxWMr','5201820HwNnpN','6FyoCxP','42asQjVZ','metadata','icon','47375MGbfQj','\x20\x20\x20','length','segmentCount','push','sort','showIcons','folder','localeCompare','join','dim','map','segment','showMetadata','3524912gtebuS','folderCount','indent','\x20folder','2817FWTZqu','children','1459493uQzrqe','population'];a113_0x22b7=function(){return _0x3633e4;};return a113_0x22b7();}export function formatFlatList(_0x52e8c8,_0x6d8d5c,_0x124f95={}){const _0xc8610f=a113_0x51af,_0x3f3fb4={...DEFAULT_OPTIONS,..._0x124f95},_0x3ec904=[];for(const _0x58807b of _0x52e8c8){_0x3ec904[_0xc8610f(0x20c)]({'name':_0x58807b['name'],'icon':_0x3f3fb4[_0xc8610f(0x20e)]?'📁':'','metadata':undefined});}for(const _0x255f11 of _0x6d8d5c){const _0x4efdfb=_0x3f3fb4[_0xc8610f(0x1f5)]&&_0x255f11[_0xc8610f(0x1fd)]!==undefined?a113_0x2c28e6[_0xc8610f(0x1f2)]('\x20('+formatRows(_0x255f11[_0xc8610f(0x1fd)])+')'):'';_0x3ec904[_0xc8610f(0x20c)]({'name':_0x255f11['name'],'icon':_0x3f3fb4[_0xc8610f(0x20e)]?'🎯':'','metadata':_0x4efdfb});}_0x3ec904[_0xc8610f(0x20d)]((_0x563f7e,_0x1565bc)=>_0x563f7e['name'][_0xc8610f(0x1f0)](_0x1565bc[_0xc8610f(0x1fe)]));if(_0x3ec904[_0xc8610f(0x20a)]===0x0)return'(empty)';const _0x189026=_0x3ec904[_0xc8610f(0x1f3)](_0x3506c3=>{const _0x2553e0=_0xc8610f,_0x5e0a0d=_0x3506c3[_0x2553e0(0x207)]?_0x3506c3['icon']+'\x20':'',_0x538281=_0x3506c3[_0x2553e0(0x206)]||'';return''+_0x5e0a0d+_0x3506c3[_0x2553e0(0x1fe)]+_0x538281;});return _0x189026[_0xc8610f(0x1f1)]('\x0a');}
1
+ (function(_0x550704,_0x5578f4){const _0x539642=a113_0x371b,_0x1e18a1=_0x550704();while(!![]){try{const _0x4ba687=-parseInt(_0x539642(0x93))/0x1+parseInt(_0x539642(0x7c))/0x2*(parseInt(_0x539642(0x8d))/0x3)+parseInt(_0x539642(0x7b))/0x4+-parseInt(_0x539642(0x8c))/0x5+-parseInt(_0x539642(0x83))/0x6+parseInt(_0x539642(0x92))/0x7*(-parseInt(_0x539642(0x76))/0x8)+parseInt(_0x539642(0x89))/0x9*(parseInt(_0x539642(0x81))/0xa);if(_0x4ba687===_0x5578f4)break;else _0x1e18a1['push'](_0x1e18a1['shift']());}catch(_0x2f74ca){_0x1e18a1['push'](_0x1e18a1['shift']());}}}(a113_0x5a72,0x7fce6));import{formatRows}from'./formatters.js';import a113_0x13d2a2 from'chalk';const DEFAULT_OPTIONS={'showTreeLines':!![],'showIcons':!![],'showMetadata':!![],'indent':'\x20\x20'};function a113_0x5a72(){const _0x450692=['sort','children','66735KbXBXN','length','\x20segment','2476435nAxVKe','25302kBcUAK','join','showMetadata','icon','folderCount','1673ZmzVEK','792292qoCxqs','└──\x20','push','🎯\x20','2712IgIvpA','├──\x20','showIcons','indent','metadata','1206624fSizfQ','32luJfer','name','segmentCount','map','population','3220dYfRwr','showTreeLines','5592816FmvTHZ','dim','folder','type'];a113_0x5a72=function(){return _0x450692;};return a113_0x5a72();}function a113_0x371b(_0x534edb,_0x29dfc8){_0x534edb=_0x534edb-0x74;const _0x5a728a=a113_0x5a72();let _0x371bb2=_0x5a728a[_0x534edb];return _0x371bb2;}export function formatTree(_0x4af358,_0x121731={},_0x192503=0x0,_0x56a7a0=''){const _0x3c7363=a113_0x371b,_0x4577c3={...DEFAULT_OPTIONS,..._0x121731},_0xafb228=[],_0xbaa463=[..._0x4af358]['sort']((_0x3d5733,_0x516c19)=>_0x3d5733[_0x3c7363(0x7d)]['localeCompare'](_0x516c19[_0x3c7363(0x7d)]));for(let _0x127532=0x0;_0x127532<_0xbaa463[_0x3c7363(0x8a)];_0x127532++){const _0x525e8e=_0xbaa463[_0x127532],_0x568d65=_0x127532===_0xbaa463[_0x3c7363(0x8a)]-0x1;let _0x3809fc='';_0x192503>0x0&&(_0x3809fc+=_0x56a7a0);_0x4577c3[_0x3c7363(0x82)]&&_0x192503>0x0&&(_0x3809fc+=a113_0x13d2a2['dim'](_0x568d65?_0x3c7363(0x94):_0x3c7363(0x77)));_0x4577c3[_0x3c7363(0x78)]&&(_0x3809fc+=_0x525e8e[_0x3c7363(0x86)]===_0x3c7363(0x85)?'📁\x20':_0x3c7363(0x75));_0x3809fc+=_0x525e8e[_0x3c7363(0x7d)];if(_0x4577c3[_0x3c7363(0x8f)]){if(_0x525e8e[_0x3c7363(0x86)]===_0x3c7363(0x85)){const _0x6c9e36=[];_0x525e8e[_0x3c7363(0x7a)][_0x3c7363(0x7e)]&&_0x6c9e36[_0x3c7363(0x74)](_0x525e8e[_0x3c7363(0x7a)][_0x3c7363(0x7e)]+_0x3c7363(0x8b)+(_0x525e8e['metadata']['segmentCount']!==0x1?'s':'')),_0x525e8e[_0x3c7363(0x7a)][_0x3c7363(0x91)]&&_0x6c9e36['push'](_0x525e8e[_0x3c7363(0x7a)][_0x3c7363(0x91)]+'\x20folder'+(_0x525e8e['metadata'][_0x3c7363(0x91)]!==0x1?'s':'')),_0x6c9e36[_0x3c7363(0x8a)]>0x0&&(_0x3809fc+=a113_0x13d2a2['dim']('\x20('+_0x6c9e36['join'](',\x20')+')'));}else _0x525e8e[_0x3c7363(0x86)]==='segment'&&_0x525e8e[_0x3c7363(0x80)]!==undefined&&(_0x3809fc+=a113_0x13d2a2[_0x3c7363(0x84)]('\x20('+formatRows(_0x525e8e[_0x3c7363(0x80)])+')'));}_0xafb228[_0x3c7363(0x74)](_0x3809fc);if(_0x525e8e[_0x3c7363(0x88)]&&_0x525e8e[_0x3c7363(0x88)][_0x3c7363(0x8a)]>0x0){let _0x2315d8;if(_0x192503===0x0)_0x2315d8='';else _0x4577c3['showTreeLines']?_0x2315d8=_0x56a7a0+(_0x568d65?'\x20\x20\x20\x20':a113_0x13d2a2['dim']('│')+'\x20\x20\x20'):_0x2315d8=_0x56a7a0+_0x4577c3[_0x3c7363(0x79)];const _0x2889e3=formatTree(_0x525e8e[_0x3c7363(0x88)],_0x4577c3,_0x192503+0x1,_0x2315d8);_0xafb228['push'](_0x2889e3);}}return _0xafb228[_0x3c7363(0x8e)]('\x0a');}export function formatFlatList(_0x45906c,_0x5b8c5c,_0xad1d8={}){const _0x186741=a113_0x371b,_0x2d7b98={...DEFAULT_OPTIONS,..._0xad1d8},_0x4c7da0=[];for(const _0x3fe26c of _0x45906c){_0x4c7da0[_0x186741(0x74)]({'name':_0x3fe26c[_0x186741(0x7d)],'icon':_0x2d7b98[_0x186741(0x78)]?'📁':'','metadata':undefined});}for(const _0x56d14f of _0x5b8c5c){const _0x9f8efd=_0x2d7b98[_0x186741(0x8f)]&&_0x56d14f[_0x186741(0x80)]!==undefined?a113_0x13d2a2[_0x186741(0x84)]('\x20('+formatRows(_0x56d14f['population'])+')'):'';_0x4c7da0[_0x186741(0x74)]({'name':_0x56d14f[_0x186741(0x7d)],'icon':_0x2d7b98[_0x186741(0x78)]?'🎯':'','metadata':_0x9f8efd});}_0x4c7da0[_0x186741(0x87)]((_0x5a972d,_0xfbb487)=>_0x5a972d[_0x186741(0x7d)]['localeCompare'](_0xfbb487[_0x186741(0x7d)]));if(_0x4c7da0[_0x186741(0x8a)]===0x0)return'(empty)';const _0x3766c4=_0x4c7da0[_0x186741(0x7f)](_0x5bf45d=>{const _0x1afe03=_0x186741,_0x551d3d=_0x5bf45d[_0x1afe03(0x90)]?_0x5bf45d[_0x1afe03(0x90)]+'\x20':'',_0x55136a=_0x5bf45d[_0x1afe03(0x7a)]||'';return''+_0x551d3d+_0x5bf45d[_0x1afe03(0x7d)]+_0x55136a;});return _0x3766c4[_0x186741(0x8e)]('\x0a');}
@@ -1 +1 @@
1
- (function(_0xe84117,_0x346166){const _0x563749=a114_0xda81,_0x1b0f53=_0xe84117();while(!![]){try{const _0x3d8ad3=parseInt(_0x563749(0x1cf))/0x1*(-parseInt(_0x563749(0x1b2))/0x2)+-parseInt(_0x563749(0x1be))/0x3+parseInt(_0x563749(0x1ca))/0x4+parseInt(_0x563749(0x1d3))/0x5+-parseInt(_0x563749(0x1ba))/0x6+parseInt(_0x563749(0x1d4))/0x7*(-parseInt(_0x563749(0x1c4))/0x8)+-parseInt(_0x563749(0x1b7))/0x9*(-parseInt(_0x563749(0x1bf))/0xa);if(_0x3d8ad3===_0x346166)break;else _0x1b0f53['push'](_0x1b0f53['shift']());}catch(_0x16b5ce){_0x1b0f53['push'](_0x1b0f53['shift']());}}}(a114_0x4dbb,0x50688));function a114_0xda81(_0x3b052f,_0x139041){_0x3b052f=_0x3b052f-0x1af;const _0x4dbb0c=a114_0x4dbb();let _0xda81b=_0x4dbb0c[_0x3b052f];return _0xda81b;}import{get}from'https';import{readFileSync,writeFileSync,mkdirSync}from'fs';import{join}from'path';import{gt,valid}from'semver';import a114_0x1567dc from'chalk';import{getCacheDir}from'../core/config.js';const CACHE_DURATION_MS=0x18*0x3c*0x3c*0x3e8,NPM_REGISTRY_URL='https://registry.npmjs.org/@treasuredata/tdx/latest',TIMEOUT_MS=0x7d0;function getCacheFilePath(){const _0x4248d9=a114_0xda81,_0x3e6f77=getCacheDir();return join(_0x3e6f77,_0x4248d9(0x1d2));}function readCache(){const _0x4d6c3e=a114_0xda81;try{const _0x3679fc=getCacheFilePath(),_0x256d6a=readFileSync(_0x3679fc,_0x4d6c3e(0x1c2));return JSON[_0x4d6c3e(0x1c9)](_0x256d6a);}catch{return null;}}function writeCache(_0x471097){const _0x52dd50=a114_0xda81;try{const _0x4fc3ac=getCacheDir();mkdirSync(_0x4fc3ac,{'recursive':!![]});const _0x547c74={'lastCheck':new Date()['toISOString'](),'latestVersion':_0x471097},_0x2d0527=getCacheFilePath();writeFileSync(_0x2d0527,JSON[_0x52dd50(0x1c0)](_0x547c74,null,0x2),_0x52dd50(0x1c2));}catch{}}function a114_0x4dbb(){const _0x308054=['642205aiZlfN','390012ruQuOT','isTTY','Request\x20timeout','Invalid\x20version\x20format','58TQVJwZ','statusCode','stderr','currentVersion','updateAvailable','9366975oLpUBl','HTTP\x20','getTime','839364ETXiNp','\x0aUpdate\x20available:\x20','write','latestVersion','1120416VVbZml','10vEqdqz','stringify','destroy','utf-8','NO_COLOR','16XWDJnz','Update\x20available:','end','error','cyan','parse','134320pmcLPN','dim','version','\x0aRun:\x20','yellow','8574GZLIQo','npm\x20install\x20-g\x20@treasuredata/tdx@latest','Run:','last_version_check'];a114_0x4dbb=function(){return _0x308054;};return a114_0x4dbb();}function isCacheValid(_0x2a1688){const _0x2e5423=a114_0xda81;if(!_0x2a1688)return![];const _0x51242b=new Date(_0x2a1688['lastCheck'])[_0x2e5423(0x1b9)](),_0x552989=Date['now']();return _0x552989-_0x51242b<CACHE_DURATION_MS;}function fetchLatestVersion(){return new Promise((_0x760bc2,_0x2e58c4)=>{const _0x4f78b6=a114_0xda81,_0x53e05b=get(NPM_REGISTRY_URL,_0x14eaa9=>{const _0x5089b4=a114_0xda81;if(_0x14eaa9[_0x5089b4(0x1b3)]!==0xc8){clearTimeout(_0x4ee988),_0x2e58c4(new Error(_0x5089b4(0x1b8)+_0x14eaa9[_0x5089b4(0x1b3)]));return;}let _0x5ddee0='';_0x14eaa9['on']('data',_0x5a9c1f=>{_0x5ddee0+=_0x5a9c1f;}),_0x14eaa9['on'](_0x5089b4(0x1c6),()=>{const _0x3e344e=_0x5089b4;clearTimeout(_0x4ee988);try{const _0x10edc6=JSON[_0x3e344e(0x1c9)](_0x5ddee0);if(!valid(_0x10edc6[_0x3e344e(0x1cc)])){_0x2e58c4(new Error(_0x3e344e(0x1b1)));return;}_0x760bc2(_0x10edc6[_0x3e344e(0x1cc)]);}catch(_0x33c05b){_0x2e58c4(_0x33c05b);}});})['on'](_0x4f78b6(0x1c7),_0x497e68=>{clearTimeout(_0x4ee988),_0x2e58c4(_0x497e68);}),_0x4ee988=setTimeout(()=>{const _0x382d03=_0x4f78b6;_0x53e05b[_0x382d03(0x1c1)](),_0x2e58c4(new Error(_0x382d03(0x1b0)));},TIMEOUT_MS);});}export async function checkForUpdate(_0x58968f){const _0x1b58ac=a114_0xda81;try{const _0x156b47=readCache();if(isCacheValid(_0x156b47)){const _0x440328=gt(_0x156b47[_0x1b58ac(0x1bd)],_0x58968f);return{'updateAvailable':_0x440328,'currentVersion':_0x58968f,'latestVersion':_0x156b47[_0x1b58ac(0x1bd)]};}const _0x2d15fb=await fetchLatestVersion();writeCache(_0x2d15fb);const _0x2c0d7a=gt(_0x2d15fb,_0x58968f);return{'updateAvailable':_0x2c0d7a,'currentVersion':_0x58968f,'latestVersion':_0x2d15fb};}catch{return null;}}export function displayUpdateNotification(_0x379717){const _0x39521b=a114_0xda81;if(!_0x379717[_0x39521b(0x1b6)])return;const _0xf4f5ad=process[_0x39521b(0x1b4)][_0x39521b(0x1af)]&&!process['env'][_0x39521b(0x1c3)],_0x1985f9=_0xf4f5ad?a114_0x1567dc['gray']('→'):'→',_0x194c16=_0xf4f5ad?a114_0x1567dc[_0x39521b(0x1cb)](_0x379717[_0x39521b(0x1b5)]):_0x379717[_0x39521b(0x1b5)],_0xdc0da5=_0xf4f5ad?a114_0x1567dc['green'](_0x379717[_0x39521b(0x1bd)]):_0x379717[_0x39521b(0x1bd)],_0x3ac397=_0xf4f5ad?a114_0x1567dc[_0x39521b(0x1c8)](_0x39521b(0x1d0)):_0x39521b(0x1d0),_0x2d635a=_0xf4f5ad?'\x0a'+a114_0x1567dc[_0x39521b(0x1ce)](_0x39521b(0x1c5))+'\x20'+_0x194c16+'\x20'+_0x1985f9+'\x20'+_0xdc0da5+'\x0a'+a114_0x1567dc['dim'](_0x39521b(0x1d1))+'\x20'+_0x3ac397+'\x0a':_0x39521b(0x1bb)+_0x194c16+'\x20'+_0x1985f9+'\x20'+_0xdc0da5+_0x39521b(0x1cd)+_0x3ac397+'\x0a';process[_0x39521b(0x1b4)][_0x39521b(0x1bc)](_0x2d635a);}
1
+ const a114_0x5aec22=a114_0x3de9;(function(_0x3d6ee2,_0x2d1f2c){const _0x2026ee=a114_0x3de9,_0x8c751b=_0x3d6ee2();while(!![]){try{const _0x1c12f2=-parseInt(_0x2026ee(0x14e))/0x1*(-parseInt(_0x2026ee(0x135))/0x2)+parseInt(_0x2026ee(0x131))/0x3+parseInt(_0x2026ee(0x13b))/0x4+parseInt(_0x2026ee(0x14d))/0x5+parseInt(_0x2026ee(0x13f))/0x6*(-parseInt(_0x2026ee(0x132))/0x7)+-parseInt(_0x2026ee(0x12f))/0x8*(parseInt(_0x2026ee(0x134))/0x9)+parseInt(_0x2026ee(0x13d))/0xa;if(_0x1c12f2===_0x2d1f2c)break;else _0x8c751b['push'](_0x8c751b['shift']());}catch(_0x2e39c0){_0x8c751b['push'](_0x8c751b['shift']());}}}(a114_0x27f6,0xf341a));import{get}from'https';import{readFileSync,writeFileSync,mkdirSync}from'fs';import{join}from'path';function a114_0x3de9(_0x24b117,_0x4fe326){_0x24b117=_0x24b117-0x12b;const _0x27f635=a114_0x27f6();let _0x3de906=_0x27f635[_0x24b117];return _0x3de906;}import{gt,valid}from'semver';import a114_0x30f0e3 from'chalk';import{getCacheDir}from'../core/config.js';const CACHE_DURATION_MS=0x18*0x3c*0x3c*0x3e8,NPM_REGISTRY_URL=a114_0x5aec22(0x148),TIMEOUT_MS=0x7d0;function getCacheFilePath(){const _0x35cdbd=a114_0x5aec22,_0x33f633=getCacheDir();return join(_0x33f633,_0x35cdbd(0x147));}function readCache(){const _0x5f44e3=a114_0x5aec22;try{const _0x16254f=getCacheFilePath(),_0x5543a6=readFileSync(_0x16254f,_0x5f44e3(0x13a));return JSON[_0x5f44e3(0x14b)](_0x5543a6);}catch{return null;}}function writeCache(_0x504cd1){const _0x237ab2=a114_0x5aec22;try{const _0x4ce180=getCacheDir();mkdirSync(_0x4ce180,{'recursive':!![]});const _0x247e37={'lastCheck':new Date()['toISOString'](),'latestVersion':_0x504cd1},_0x2e533d=getCacheFilePath();writeFileSync(_0x2e533d,JSON[_0x237ab2(0x144)](_0x247e37,null,0x2),'utf-8');}catch{}}function isCacheValid(_0x403cd2){const _0x3cb29a=a114_0x5aec22;if(!_0x403cd2)return![];const _0x204770=new Date(_0x403cd2['lastCheck'])[_0x3cb29a(0x130)](),_0x3ceaa3=Date[_0x3cb29a(0x141)]();return _0x3ceaa3-_0x204770<CACHE_DURATION_MS;}function fetchLatestVersion(){return new Promise((_0x328331,_0x5c3649)=>{const _0x2a9feb=a114_0x3de9,_0x291f0f=get(NPM_REGISTRY_URL,_0x599b59=>{const _0x23d232=a114_0x3de9;if(_0x599b59[_0x23d232(0x13e)]!==0xc8){clearTimeout(_0x1e91b8),_0x5c3649(new Error(_0x23d232(0x146)+_0x599b59[_0x23d232(0x13e)]));return;}let _0x4c9eaf='';_0x599b59['on'](_0x23d232(0x14a),_0x3a908f=>{_0x4c9eaf+=_0x3a908f;}),_0x599b59['on'](_0x23d232(0x12e),()=>{const _0x2dee0e=_0x23d232;clearTimeout(_0x1e91b8);try{const _0x3c0abd=JSON[_0x2dee0e(0x14b)](_0x4c9eaf);if(!valid(_0x3c0abd['version'])){_0x5c3649(new Error(_0x2dee0e(0x12d)));return;}_0x328331(_0x3c0abd['version']);}catch(_0x1b1f2e){_0x5c3649(_0x1b1f2e);}});})['on'](_0x2a9feb(0x12b),_0x1825ca=>{clearTimeout(_0x1e91b8),_0x5c3649(_0x1825ca);}),_0x1e91b8=setTimeout(()=>{_0x291f0f['destroy'](),_0x5c3649(new Error('Request\x20timeout'));},TIMEOUT_MS);});}export async function checkForUpdate(_0x1b5092){const _0x287340=a114_0x5aec22;try{const _0x42abbc=readCache();if(isCacheValid(_0x42abbc)){const _0x1b75ff=gt(_0x42abbc[_0x287340(0x145)],_0x1b5092);return{'updateAvailable':_0x1b75ff,'currentVersion':_0x1b5092,'latestVersion':_0x42abbc[_0x287340(0x145)]};}const _0x254365=await fetchLatestVersion();writeCache(_0x254365);const _0x42d293=gt(_0x254365,_0x1b5092);return{'updateAvailable':_0x42d293,'currentVersion':_0x1b5092,'latestVersion':_0x254365};}catch{return null;}}export function displayUpdateNotification(_0x3130a0){const _0x34d1cc=a114_0x5aec22;if(!_0x3130a0[_0x34d1cc(0x136)])return;const _0xf0dcbd=process['stderr']['isTTY']&&!process[_0x34d1cc(0x138)][_0x34d1cc(0x133)],_0x2c6aef=_0xf0dcbd?a114_0x30f0e3[_0x34d1cc(0x12c)]('→'):'→',_0x21dd24=_0xf0dcbd?a114_0x30f0e3[_0x34d1cc(0x139)](_0x3130a0[_0x34d1cc(0x14c)]):_0x3130a0['currentVersion'],_0x238890=_0xf0dcbd?a114_0x30f0e3['green'](_0x3130a0[_0x34d1cc(0x145)]):_0x3130a0[_0x34d1cc(0x145)],_0x811be0=_0xf0dcbd?a114_0x30f0e3[_0x34d1cc(0x140)](_0x34d1cc(0x13c)):_0x34d1cc(0x13c),_0x4d1567=_0xf0dcbd?'\x0a'+a114_0x30f0e3['yellow'](_0x34d1cc(0x143))+'\x20'+_0x21dd24+'\x20'+_0x2c6aef+'\x20'+_0x238890+'\x0a'+a114_0x30f0e3[_0x34d1cc(0x139)](_0x34d1cc(0x142))+'\x20'+_0x811be0+'\x0a':'\x0aUpdate\x20available:\x20'+_0x21dd24+'\x20'+_0x2c6aef+'\x20'+_0x238890+'\x0aRun:\x20'+_0x811be0+'\x0a';process[_0x34d1cc(0x137)][_0x34d1cc(0x149)](_0x4d1567);}function a114_0x27f6(){const _0x526eb0=['dim','utf-8','2460660WZORWW','npm\x20install\x20-g\x20@treasuredata/tdx@latest','4118850fXyJrl','statusCode','162qmKjUk','cyan','now','Run:','Update\x20available:','stringify','latestVersion','HTTP\x20','last_version_check','https://registry.npmjs.org/@treasuredata/tdx/latest','write','data','parse','currentVersion','4046040byJHLs','1XRpNjc','error','gray','Invalid\x20version\x20format','end','32mQQHtK','getTime','2321337JcmNYt','414890XoTtFZ','NO_COLOR','1427328yOElZA','1241998JYZIeB','updateAvailable','stderr','env'];a114_0x27f6=function(){return _0x526eb0;};return a114_0x27f6();}
@@ -1 +1 @@
1
- const a115_0x578270=a115_0x3629;(function(_0x5aa202,_0x219c29){const _0x5249ad=a115_0x3629,_0x501ad3=_0x5aa202();while(!![]){try{const _0x4a27d6=-parseInt(_0x5249ad(0x198))/0x1+-parseInt(_0x5249ad(0x190))/0x2+parseInt(_0x5249ad(0x199))/0x3+parseInt(_0x5249ad(0x197))/0x4*(-parseInt(_0x5249ad(0x193))/0x5)+-parseInt(_0x5249ad(0x194))/0x6*(-parseInt(_0x5249ad(0x192))/0x7)+parseInt(_0x5249ad(0x18f))/0x8+-parseInt(_0x5249ad(0x19a))/0x9;if(_0x4a27d6===_0x219c29)break;else _0x501ad3['push'](_0x501ad3['shift']());}catch(_0x412e23){_0x501ad3['push'](_0x501ad3['shift']());}}}(a115_0x3c46,0xe1483));function a115_0x3629(_0x54ed9f,_0x38c9da){_0x54ed9f=_0x54ed9f-0x18f;const _0x3c4641=a115_0x3c46();let _0x3629d2=_0x3c4641[_0x54ed9f];return _0x3629d2;}export const WORKFLOW_FILE_EXTENSION=a115_0x578270(0x195);function a115_0x3c46(){const _0x58d369=['3454852PUEgex','291258gZYwbE','4319223GrPNvg','2776302cZHyvO','11114208pHKUHb','3360692IUGueT','.digdag','7QkQcLK','5uKAjqo','7425198wkFJXD','.dig','startsWith'];a115_0x3c46=function(){return _0x58d369;};return a115_0x3c46();}export function shouldIncludeInArchive(_0x2794d6){const _0x20d511=a115_0x578270;if(_0x2794d6===_0x20d511(0x191))return!![];if(_0x2794d6[_0x20d511(0x196)]('.'))return![];return!![];}
1
+ const a115_0x12b934=a115_0x5b99;function a115_0x5b99(_0x175fe9,_0xbbb57a){_0x175fe9=_0x175fe9-0x177;const _0x205f41=a115_0x205f();let _0x5b992d=_0x205f41[_0x175fe9];return _0x5b992d;}(function(_0x5cb8b5,_0x15b046){const _0x3407d6=a115_0x5b99,_0x3f3193=_0x5cb8b5();while(!![]){try{const _0x185c8e=-parseInt(_0x3407d6(0x178))/0x1*(parseInt(_0x3407d6(0x17f))/0x2)+-parseInt(_0x3407d6(0x183))/0x3*(-parseInt(_0x3407d6(0x179))/0x4)+parseInt(_0x3407d6(0x17d))/0x5+-parseInt(_0x3407d6(0x182))/0x6+-parseInt(_0x3407d6(0x180))/0x7*(parseInt(_0x3407d6(0x17b))/0x8)+-parseInt(_0x3407d6(0x177))/0x9+parseInt(_0x3407d6(0x181))/0xa;if(_0x185c8e===_0x15b046)break;else _0x3f3193['push'](_0x3f3193['shift']());}catch(_0x26c69f){_0x3f3193['push'](_0x3f3193['shift']());}}}(a115_0x205f,0x1dbb0));export const WORKFLOW_FILE_EXTENSION=a115_0x12b934(0x17e);export function shouldIncludeInArchive(_0x16838e){const _0x3e5f40=a115_0x12b934;if(_0x16838e===_0x3e5f40(0x17a))return!![];if(_0x16838e[_0x3e5f40(0x17c)]('.'))return![];return!![];}function a115_0x205f(){const _0x5d93e7=['761415DzfPZf','.dig','42066FTZrxC','140zQbLAV','2479370czvBHc','742212rJuBJB','3copyaC','865773FCkzRJ','6sDpFDV','302692XsGAPx','.digdag','3208cXAyyg','startsWith'];a115_0x205f=function(){return _0x5d93e7;};return a115_0x205f();}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@treasuredata/tdx",
3
- "version": "0.8.0",
3
+ "version": "0.8.2",
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": {