@treasuredata/tdx 0.8.5 → 0.8.7

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 (117) 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.js +1 -1
  5. package/dist/client/cdp-api-client.js +1 -1
  6. package/dist/client/engage-api-client.js +1 -1
  7. package/dist/client/http-client.js +1 -1
  8. package/dist/client/llm-api-client.js +1 -1
  9. package/dist/client/rate-limiter.js +1 -1
  10. package/dist/client/td-api-client.js +1 -1
  11. package/dist/client/trino-api-client.js +1 -1
  12. package/dist/client/workflow-client.js +1 -1
  13. package/dist/commands/activations.js +1 -1
  14. package/dist/commands/api-command.js +1 -1
  15. package/dist/commands/auth-command.js +1 -1
  16. package/dist/commands/chat-command.js +1 -1
  17. package/dist/commands/claude-command.d.ts +1 -0
  18. package/dist/commands/claude-command.d.ts.map +1 -1
  19. package/dist/commands/claude-command.js +1 -1
  20. package/dist/commands/claude-command.js.map +1 -1
  21. package/dist/commands/claude-statusline-command.js +1 -1
  22. package/dist/commands/claude-usage-command.js +1 -1
  23. package/dist/commands/command.js +1 -1
  24. package/dist/commands/connection-command.js +1 -1
  25. package/dist/commands/context-command.js +1 -1
  26. package/dist/commands/databases.js +1 -1
  27. package/dist/commands/describe.js +1 -1
  28. package/dist/commands/engage-command.js +1 -1
  29. package/dist/commands/job-command.js +1 -1
  30. package/dist/commands/journey-command.js +1 -1
  31. package/dist/commands/llm-command.js +1 -1
  32. package/dist/commands/llm-proxy.js +1 -1
  33. package/dist/commands/parent-segment-command.js +1 -1
  34. package/dist/commands/profiles-command.js +1 -1
  35. package/dist/commands/query-command.js +1 -1
  36. package/dist/commands/segment-command.js +1 -1
  37. package/dist/commands/segment-create-command.js +1 -1
  38. package/dist/commands/segment-fields-command.js +1 -1
  39. package/dist/commands/segment-pull-command.js +1 -1
  40. package/dist/commands/segment-push-command.js +1 -1
  41. package/dist/commands/segment-update-command.js +1 -1
  42. package/dist/commands/segment-use-command.js +1 -1
  43. package/dist/commands/segments.js +1 -1
  44. package/dist/commands/show.js +1 -1
  45. package/dist/commands/tables.js +1 -1
  46. package/dist/commands/use-command.js +1 -1
  47. package/dist/commands/user-command.js +1 -1
  48. package/dist/commands/workflow-command.js +1 -1
  49. package/dist/core/auth.js +1 -1
  50. package/dist/core/config.js +1 -1
  51. package/dist/core/connection-cache.js +1 -1
  52. package/dist/core/credential-cache.js +1 -1
  53. package/dist/core/global-context.js +1 -1
  54. package/dist/core/keychain.js +1 -1
  55. package/dist/core/profile.js +1 -1
  56. package/dist/core/project-config.js +1 -1
  57. package/dist/core/session.js +1 -1
  58. package/dist/core/user-cache.js +1 -1
  59. package/dist/index.js +1 -1
  60. package/dist/proxy/anthropic-adapter.js +1 -1
  61. package/dist/proxy/claude-usage-tracker.js +1 -1
  62. package/dist/proxy/context-signature.js +1 -1
  63. package/dist/proxy/conversation-utils.js +1 -1
  64. package/dist/proxy/server.js +1 -1
  65. package/dist/proxy/session-cache.js +1 -1
  66. package/dist/sdk/api.js +1 -1
  67. package/dist/sdk/connection.js +1 -1
  68. package/dist/sdk/engage.js +1 -1
  69. package/dist/sdk/errors.js +1 -1
  70. package/dist/sdk/index.js +1 -1
  71. package/dist/sdk/job.js +1 -1
  72. package/dist/sdk/journey.js +1 -1
  73. package/dist/sdk/llm.js +1 -1
  74. package/dist/sdk/query.js +1 -1
  75. package/dist/sdk/segment/child-segment-yaml.js +1 -1
  76. package/dist/sdk/segment/journey-yaml.js +1 -1
  77. package/dist/sdk/segment/parent-segment-preview.js +1 -1
  78. package/dist/sdk/segment/parent-segment-yaml.js +1 -1
  79. package/dist/sdk/segment.js +1 -1
  80. package/dist/sdk/user.js +1 -1
  81. package/dist/sdk/workflow.js +1 -1
  82. package/dist/types/endpoints.js +1 -1
  83. package/dist/types/index.js +1 -1
  84. package/dist/utils/agent-ref-parser.js +1 -1
  85. package/dist/utils/async.js +1 -1
  86. package/dist/utils/chat-cache.js +1 -1
  87. package/dist/utils/colors.js +1 -1
  88. package/dist/utils/command-output.js +1 -1
  89. package/dist/utils/constants.js +1 -1
  90. package/dist/utils/diff.js +1 -1
  91. package/dist/utils/fields-display.js +1 -1
  92. package/dist/utils/file-permissions.js +1 -1
  93. package/dist/utils/format-detector.js +1 -1
  94. package/dist/utils/formatters.js +1 -1
  95. package/dist/utils/json-loader.js +1 -1
  96. package/dist/utils/llm-backup-utils.js +1 -1
  97. package/dist/utils/model-aliases.js +1 -1
  98. package/dist/utils/model-factors.js +1 -1
  99. package/dist/utils/option-validation.js +1 -1
  100. package/dist/utils/port.js +1 -1
  101. package/dist/utils/process.d.ts.map +1 -1
  102. package/dist/utils/process.js +1 -1
  103. package/dist/utils/process.js.map +1 -1
  104. package/dist/utils/prompt.js +1 -1
  105. package/dist/utils/segment-path-parser.js +1 -1
  106. package/dist/utils/segment-ref-parser.js +1 -1
  107. package/dist/utils/spinner.js +1 -1
  108. package/dist/utils/sql-parser.js +1 -1
  109. package/dist/utils/sse-parser.js +1 -1
  110. package/dist/utils/string-utils.js +1 -1
  111. package/dist/utils/table-ref-parser.js +1 -1
  112. package/dist/utils/tdx-config.js +1 -1
  113. package/dist/utils/tdx-logger.js +1 -1
  114. package/dist/utils/tree-formatter.js +1 -1
  115. package/dist/utils/version-check.js +1 -1
  116. package/dist/utils/workflow-utils.js +1 -1
  117. package/package.json +1 -1
@@ -1 +1 @@
1
- function a111_0x129b(){const _0x341af4=['2232920ENUIeo','2672504rzrQKu','1400946uNnKCi','slice','body','trim','split','read','event','decode','Failed\x20to\x20parse\x20SSE\x20data\x20as\x20JSON:\x20','9WEGKOo','5sQfnmw','796089AMhwWA','8601wOdDzD','startsWith','debug','4236786xbptad','[LLM\x20API\x20SSE]\x20','data','8DkUiGY','getReader','indexOf','513952sDcvhG'];a111_0x129b=function(){return _0x341af4;};return a111_0x129b();}(function(_0x387340,_0x3faf98){const _0x4df54b=a111_0x46a0,_0x371304=_0x387340();while(!![]){try{const _0x395b4d=-parseInt(_0x4df54b(0x14d))/0x1*(-parseInt(_0x4df54b(0x153))/0x2)+-parseInt(_0x4df54b(0x159))/0x3+-parseInt(_0x4df54b(0x156))/0x4*(-parseInt(_0x4df54b(0x14b))/0x5)+parseInt(_0x4df54b(0x150))/0x6+-parseInt(_0x4df54b(0x14c))/0x7+parseInt(_0x4df54b(0x158))/0x8+parseInt(_0x4df54b(0x14a))/0x9*(-parseInt(_0x4df54b(0x157))/0xa);if(_0x395b4d===_0x3faf98)break;else _0x371304['push'](_0x371304['shift']());}catch(_0x37462c){_0x371304['push'](_0x371304['shift']());}}}(a111_0x129b,0x616ed));export async function*parseSSEStream(_0x3d8970,_0x1e99c5){const _0x397c10=a111_0x46a0;if(!_0x3d8970[_0x397c10(0x15b)])throw new Error('Response\x20body\x20is\x20null');const _0x22e39b=_0x3d8970['body'][_0x397c10(0x154)](),_0x1c155b=new TextDecoder();let _0x3f47e9='',_0x5edb84={};try{while(!![]){const {done:_0x119d03,value:_0x300db3}=await _0x22e39b[_0x397c10(0x146)]();if(_0x119d03){if(_0x5edb84[_0x397c10(0x152)]){_0x1e99c5?.[_0x397c10(0x14f)](_0x397c10(0x151)+_0x5edb84['data']);const _0x57fe14=parseSSEData(_0x5edb84['data']);yield _0x57fe14;}break;}_0x3f47e9+=_0x1c155b[_0x397c10(0x148)](_0x300db3,{'stream':!![]});const _0x317b0d=_0x3f47e9[_0x397c10(0x145)]('\x0a');_0x3f47e9=_0x317b0d['pop']()||'';for(const _0x2e678c of _0x317b0d){if(_0x2e678c[_0x397c10(0x144)]()===''){if(_0x5edb84[_0x397c10(0x152)]){_0x1e99c5?.['debug'](_0x397c10(0x151)+_0x5edb84['data']);const _0x4b7f5a=parseSSEData(_0x5edb84[_0x397c10(0x152)]);yield _0x4b7f5a,_0x5edb84={};}continue;}if(_0x2e678c[_0x397c10(0x14e)](':'))continue;const _0x1592a8=_0x2e678c[_0x397c10(0x155)](':');if(_0x1592a8===-0x1)continue;const _0x5d379a=_0x2e678c[_0x397c10(0x15a)](0x0,_0x1592a8);let _0x180485=_0x2e678c[_0x397c10(0x15a)](_0x1592a8+0x1);_0x180485['startsWith']('\x20')&&(_0x180485=_0x180485[_0x397c10(0x15a)](0x1));switch(_0x5d379a){case _0x397c10(0x147):_0x5edb84[_0x397c10(0x147)]=_0x180485;break;case _0x397c10(0x152):_0x5edb84[_0x397c10(0x152)]=_0x5edb84[_0x397c10(0x152)]?_0x5edb84['data']+'\x0a'+_0x180485:_0x180485;break;case'id':_0x5edb84['id']=_0x180485;break;}}}}finally{_0x22e39b['releaseLock']();}}function a111_0x46a0(_0x37c080,_0x3bae84){_0x37c080=_0x37c080-0x144;const _0x129b5b=a111_0x129b();let _0x46a061=_0x129b5b[_0x37c080];return _0x46a061;}function parseSSEData(_0x139e6c){const _0x43542d=a111_0x46a0;try{return JSON['parse'](_0x139e6c);}catch(_0x364447){throw new Error(_0x43542d(0x149)+_0x139e6c,{'cause':_0x364447});}}
1
+ (function(_0x32de9e,_0x12cd2a){const _0x3b2c86=a111_0x3c39,_0x3fc1fe=_0x32de9e();while(!![]){try{const _0x1d8c4d=-parseInt(_0x3b2c86(0x1a7))/0x1*(-parseInt(_0x3b2c86(0x1aa))/0x2)+parseInt(_0x3b2c86(0x1a4))/0x3+-parseInt(_0x3b2c86(0x1ac))/0x4+-parseInt(_0x3b2c86(0x1b0))/0x5+-parseInt(_0x3b2c86(0x1a9))/0x6*(parseInt(_0x3b2c86(0x1b4))/0x7)+-parseInt(_0x3b2c86(0x1ab))/0x8*(parseInt(_0x3b2c86(0x1b5))/0x9)+parseInt(_0x3b2c86(0x1b1))/0xa;if(_0x1d8c4d===_0x12cd2a)break;else _0x3fc1fe['push'](_0x3fc1fe['shift']());}catch(_0x49bb88){_0x3fc1fe['push'](_0x3fc1fe['shift']());}}}(a111_0x975e,0x61ae2));function a111_0x3c39(_0xb1e8e3,_0x3c0e50){_0xb1e8e3=_0xb1e8e3-0x1a3;const _0x975ee7=a111_0x975e();let _0x3c3937=_0x975ee7[_0xb1e8e3];return _0x3c3937;}function a111_0x975e(){const _0x712151=['883218MDSmPj','[LLM\x20API\x20SSE]\x20','event','37063NfvpyU','debug','2281908BSsKgq','4CVPirt','640gmDwbT','478652nkdijJ','body','slice','parse','1920745ziaGvM','14555340iNQAIt','Failed\x20to\x20parse\x20SSE\x20data\x20as\x20JSON:\x20','startsWith','14Dsagbq','17946FIXdtg','getReader','data','decode','read'];a111_0x975e=function(){return _0x712151;};return a111_0x975e();}export async function*parseSSEStream(_0x17144b,_0x34ed86){const _0x38e6e7=a111_0x3c39;if(!_0x17144b[_0x38e6e7(0x1ad)])throw new Error('Response\x20body\x20is\x20null');const _0x24fba2=_0x17144b[_0x38e6e7(0x1ad)][_0x38e6e7(0x1b6)](),_0x6ccb2a=new TextDecoder();let _0x56d348='',_0x431b4f={};try{while(!![]){const {done:_0x15b84e,value:_0x146a77}=await _0x24fba2[_0x38e6e7(0x1a3)]();if(_0x15b84e){if(_0x431b4f[_0x38e6e7(0x1b7)]){_0x34ed86?.[_0x38e6e7(0x1a8)](_0x38e6e7(0x1a5)+_0x431b4f['data']);const _0xc3d06c=parseSSEData(_0x431b4f[_0x38e6e7(0x1b7)]);yield _0xc3d06c;}break;}_0x56d348+=_0x6ccb2a[_0x38e6e7(0x1b8)](_0x146a77,{'stream':!![]});const _0x10adb8=_0x56d348['split']('\x0a');_0x56d348=_0x10adb8['pop']()||'';for(const _0x38c162 of _0x10adb8){if(_0x38c162['trim']()===''){if(_0x431b4f['data']){_0x34ed86?.[_0x38e6e7(0x1a8)](_0x38e6e7(0x1a5)+_0x431b4f['data']);const _0x317209=parseSSEData(_0x431b4f[_0x38e6e7(0x1b7)]);yield _0x317209,_0x431b4f={};}continue;}if(_0x38c162[_0x38e6e7(0x1b3)](':'))continue;const _0x54dfc6=_0x38c162['indexOf'](':');if(_0x54dfc6===-0x1)continue;const _0x43064e=_0x38c162[_0x38e6e7(0x1ae)](0x0,_0x54dfc6);let _0x2a7bc6=_0x38c162[_0x38e6e7(0x1ae)](_0x54dfc6+0x1);_0x2a7bc6[_0x38e6e7(0x1b3)]('\x20')&&(_0x2a7bc6=_0x2a7bc6[_0x38e6e7(0x1ae)](0x1));switch(_0x43064e){case _0x38e6e7(0x1a6):_0x431b4f[_0x38e6e7(0x1a6)]=_0x2a7bc6;break;case _0x38e6e7(0x1b7):_0x431b4f[_0x38e6e7(0x1b7)]=_0x431b4f['data']?_0x431b4f[_0x38e6e7(0x1b7)]+'\x0a'+_0x2a7bc6:_0x2a7bc6;break;case'id':_0x431b4f['id']=_0x2a7bc6;break;}}}}finally{_0x24fba2['releaseLock']();}}function parseSSEData(_0x566ac3){const _0x458f3f=a111_0x3c39;try{return JSON[_0x458f3f(0x1af)](_0x566ac3);}catch(_0x22ff2a){throw new Error(_0x458f3f(0x1b2)+_0x566ac3,{'cause':_0x22ff2a});}}
@@ -1 +1 @@
1
- (function(_0x25ad2f,_0x403be0){const _0x14338e=a112_0x4f19,_0x145652=_0x25ad2f();while(!![]){try{const _0x3994eb=-parseInt(_0x14338e(0x1ef))/0x1+-parseInt(_0x14338e(0x1f7))/0x2+parseInt(_0x14338e(0x1fd))/0x3+parseInt(_0x14338e(0x1fb))/0x4*(parseInt(_0x14338e(0x1fe))/0x5)+parseInt(_0x14338e(0x1fa))/0x6+parseInt(_0x14338e(0x1f1))/0x7*(parseInt(_0x14338e(0x1ff))/0x8)+-parseInt(_0x14338e(0x1f5))/0x9*(parseInt(_0x14338e(0x1f9))/0xa);if(_0x3994eb===_0x403be0)break;else _0x145652['push'](_0x145652['shift']());}catch(_0x3a9536){_0x145652['push'](_0x145652['shift']());}}}(a112_0x8d17,0x2ec67));import a112_0x4b96c5 from'string-width';export function stringWidth(_0x818e0f){return a112_0x4b96c5(_0x818e0f);}export function padEnd(_0x17cdda,_0x3615fa){const _0x459212=stringWidth(_0x17cdda);if(_0x459212>=_0x3615fa)return _0x17cdda;return _0x17cdda+'\x20'['repeat'](_0x3615fa-_0x459212);}export function padStart(_0x3955da,_0x355274){const _0x403472=a112_0x4f19,_0x4c373d=stringWidth(_0x3955da);if(_0x4c373d>=_0x355274)return _0x3955da;return'\x20'[_0x403472(0x1ec)](_0x355274-_0x4c373d)+_0x3955da;}export function centerAlign(_0x18f02e,_0x27652e){const _0x1aa833=a112_0x4f19,_0x34acc7=stringWidth(_0x18f02e);if(_0x34acc7>_0x27652e){if(_0x27652e<=0x1)return'…'['substring'](0x0,_0x27652e);let _0x2d4644=_0x18f02e;while(stringWidth(_0x2d4644+'…')>_0x27652e){_0x2d4644=_0x2d4644[_0x1aa833(0x1f8)](0x0,-0x1);}return _0x2d4644+'…';}if(_0x34acc7===_0x27652e)return _0x18f02e;const _0x499974=_0x27652e-_0x34acc7,_0x3ab7a1=Math[_0x1aa833(0x1ee)](_0x499974/0x2),_0x493ae7=_0x499974-_0x3ab7a1;return'\x20'[_0x1aa833(0x1ec)](_0x3ab7a1)+_0x18f02e+'\x20'['repeat'](_0x493ae7);}function a112_0x8d17(){const _0x114ab6=['toString','982065IuAeZV','194885jIcViB','3992HrvdMR','trim','padStart','\x5c$&','repeat','toLowerCase','floor','113092BXYVea','unknown','4515HrYgkW','length','USER','Cannot\x20escape\x20empty\x20string\x20literal','174141ihXLmc','replace','40026TPWPlZ','slice','230ijAeXY','21492XmVLJu','12VcGaZc'];a112_0x8d17=function(){return _0x114ab6;};return a112_0x8d17();}export function escapeStringLiteral(_0x5cfa07){const _0x564dbe=a112_0x4f19;if(!_0x5cfa07||_0x5cfa07[_0x564dbe(0x200)]()[_0x564dbe(0x1f2)]===0x0)throw new Error(_0x564dbe(0x1f4));const _0x5397c8=_0x5cfa07[_0x564dbe(0x1f6)](/'/g,'\x27\x27');return'\x27'+_0x5397c8+'\x27';}function a112_0x4f19(_0x5398b4,_0x589180){_0x5398b4=_0x5398b4-0x1ec;const _0x8d1708=a112_0x8d17();let _0x4f194f=_0x8d1708[_0x5398b4];return _0x4f194f;}export function globToLike(_0x31f6af){const _0x28909d=a112_0x4f19;let _0x3669bc=_0x31f6af[_0x28909d(0x1f6)](/\\/g,'\x5c\x5c')[_0x28909d(0x1f6)](/%/g,'\x5c%')[_0x28909d(0x1f6)](/_/g,'\x5c_');return _0x3669bc=_0x3669bc['replace'](/\*/g,'%')[_0x28909d(0x1f6)](/\?/g,'_'),_0x3669bc;}export function buildLikePattern(_0x7f9f2){const _0x52e63b=a112_0x4f19;if(!_0x7f9f2||_0x7f9f2[_0x52e63b(0x200)]()['length']===0x0)throw new Error('Cannot\x20build\x20LIKE\x20pattern\x20from\x20empty\x20string');const _0x53f171=globToLike(_0x7f9f2),_0x30d58d=_0x53f171[_0x52e63b(0x1f6)](/'/g,'\x27\x27');return'\x27'+_0x30d58d+'\x27';}export function matchGlobPattern(_0x265f99,_0x217145){const _0x2365c1=a112_0x4f19,_0x1530fe=_0x217145[_0x2365c1(0x1f6)](/[.+^${}()|[\]\\]/g,_0x2365c1(0x202))[_0x2365c1(0x1f6)](/\*/g,'.*')[_0x2365c1(0x1f6)](/\?/g,'.'),_0x17b67a=new RegExp('^'+_0x1530fe+'$');return _0x17b67a['test'](_0x265f99);}export function getSanitizedUsername(){const _0x146623=a112_0x4f19,_0x28173f=process['env'][_0x146623(0x1f3)]||process['env']['USERNAME']||_0x146623(0x1f0);return _0x28173f['replace'](/[^a-zA-Z0-9]/g,'')[_0x146623(0x1ed)]();}export function generateRandomHex(){const _0x2f8e30=a112_0x4f19,_0x14c2bc=Math[_0x2f8e30(0x1ee)](Math['random']()*0xfffff);return _0x14c2bc[_0x2f8e30(0x1fc)](0x10)[_0x2f8e30(0x201)](0x5,'0');}export function sanitizeFileName(_0x40d05c){const _0x361be1=a112_0x4f19;return _0x40d05c[_0x361be1(0x1ed)]()[_0x361be1(0x1f6)](/[/\\:*?"<>|]/g,'-')[_0x361be1(0x1f6)](/\s+/g,'-')[_0x361be1(0x1f6)](/-+/g,'-')[_0x361be1(0x1f6)](/^-|-$/g,'');}
1
+ (function(_0x4e55c2,_0x3f132f){const _0x35fad2=a112_0x2794,_0x4f2a42=_0x4e55c2();while(!![]){try{const _0x175342=parseInt(_0x35fad2(0x1ed))/0x1+-parseInt(_0x35fad2(0x1f6))/0x2*(-parseInt(_0x35fad2(0x1f8))/0x3)+-parseInt(_0x35fad2(0x202))/0x4*(-parseInt(_0x35fad2(0x200))/0x5)+parseInt(_0x35fad2(0x1fb))/0x6*(-parseInt(_0x35fad2(0x1fe))/0x7)+parseInt(_0x35fad2(0x1f4))/0x8*(-parseInt(_0x35fad2(0x1ef))/0x9)+parseInt(_0x35fad2(0x1f7))/0xa*(parseInt(_0x35fad2(0x1ee))/0xb)+parseInt(_0x35fad2(0x1fc))/0xc;if(_0x175342===_0x3f132f)break;else _0x4f2a42['push'](_0x4f2a42['shift']());}catch(_0x575189){_0x4f2a42['push'](_0x4f2a42['shift']());}}}(a112_0x52f0,0xa4a16));import a112_0x4912ee from'string-width';export function stringWidth(_0xd5c6dd){return a112_0x4912ee(_0xd5c6dd);}export function padEnd(_0x41d905,_0x430ef4){const _0xdc5945=stringWidth(_0x41d905);if(_0xdc5945>=_0x430ef4)return _0x41d905;return _0x41d905+'\x20'['repeat'](_0x430ef4-_0xdc5945);}function a112_0x2794(_0x3a0b39,_0x27d371){_0x3a0b39=_0x3a0b39-0x1ec;const _0x52f088=a112_0x52f0();let _0x2794fd=_0x52f088[_0x3a0b39];return _0x2794fd;}export function padStart(_0x585710,_0x327003){const _0x55d4df=stringWidth(_0x585710);if(_0x55d4df>=_0x327003)return _0x585710;return'\x20'['repeat'](_0x327003-_0x55d4df)+_0x585710;}export function centerAlign(_0x3eaca9,_0x3b0f4e){const _0x58131b=a112_0x2794,_0x2b64f5=stringWidth(_0x3eaca9);if(_0x2b64f5>_0x3b0f4e){if(_0x3b0f4e<=0x1)return'…'[_0x58131b(0x1f2)](0x0,_0x3b0f4e);let _0x1a4f81=_0x3eaca9;while(stringWidth(_0x1a4f81+'…')>_0x3b0f4e){_0x1a4f81=_0x1a4f81['slice'](0x0,-0x1);}return _0x1a4f81+'…';}if(_0x2b64f5===_0x3b0f4e)return _0x3eaca9;const _0xa385d6=_0x3b0f4e-_0x2b64f5,_0x2d2ce9=Math['floor'](_0xa385d6/0x2),_0x23c40b=_0xa385d6-_0x2d2ce9;return'\x20'[_0x58131b(0x1f3)](_0x2d2ce9)+_0x3eaca9+'\x20'[_0x58131b(0x1f3)](_0x23c40b);}export function escapeStringLiteral(_0x261fbe){const _0x3e848c=a112_0x2794;if(!_0x261fbe||_0x261fbe[_0x3e848c(0x1ff)]()[_0x3e848c(0x1ec)]===0x0)throw new Error('Cannot\x20escape\x20empty\x20string\x20literal');const _0x3d3803=_0x261fbe[_0x3e848c(0x1f0)](/'/g,'\x27\x27');return'\x27'+_0x3d3803+'\x27';}function a112_0x52f0(){const _0x3e1f0b=['repeat','1492280bHzAwB','USERNAME','23990pKXazu','3160hvwIpG','3IWUMle','toLowerCase','USER','12168YLdtBJ','7164876oCWXUO','\x5c$&','1848PVxINX','trim','535090sIfZQA','padStart','12xYsKVY','length','412696MRzAUz','21340whhHFT','36MdoLlN','replace','toString','substring'];a112_0x52f0=function(){return _0x3e1f0b;};return a112_0x52f0();}export function globToLike(_0x4f6033){const _0x492505=a112_0x2794;let _0x193ce3=_0x4f6033['replace'](/\\/g,'\x5c\x5c')[_0x492505(0x1f0)](/%/g,'\x5c%')[_0x492505(0x1f0)](/_/g,'\x5c_');return _0x193ce3=_0x193ce3['replace'](/\*/g,'%')[_0x492505(0x1f0)](/\?/g,'_'),_0x193ce3;}export function buildLikePattern(_0x3ba2e2){const _0x97f505=a112_0x2794;if(!_0x3ba2e2||_0x3ba2e2[_0x97f505(0x1ff)]()['length']===0x0)throw new Error('Cannot\x20build\x20LIKE\x20pattern\x20from\x20empty\x20string');const _0x5b2d1a=globToLike(_0x3ba2e2),_0x29e8cb=_0x5b2d1a[_0x97f505(0x1f0)](/'/g,'\x27\x27');return'\x27'+_0x29e8cb+'\x27';}export function matchGlobPattern(_0x5b0e03,_0x596c81){const _0x578e30=a112_0x2794,_0xc10923=_0x596c81[_0x578e30(0x1f0)](/[.+^${}()|[\]\\]/g,_0x578e30(0x1fd))[_0x578e30(0x1f0)](/\*/g,'.*')['replace'](/\?/g,'.'),_0x2f6d7a=new RegExp('^'+_0xc10923+'$');return _0x2f6d7a['test'](_0x5b0e03);}export function getSanitizedUsername(){const _0x59fd00=a112_0x2794,_0x541570=process['env'][_0x59fd00(0x1fa)]||process['env'][_0x59fd00(0x1f5)]||'unknown';return _0x541570[_0x59fd00(0x1f0)](/[^a-zA-Z0-9]/g,'')['toLowerCase']();}export function generateRandomHex(){const _0x33d4a1=a112_0x2794,_0xb7d0ba=Math['floor'](Math['random']()*0xfffff);return _0xb7d0ba[_0x33d4a1(0x1f1)](0x10)[_0x33d4a1(0x201)](0x5,'0');}export function sanitizeFileName(_0x428c72){const _0x94afb6=a112_0x2794;return _0x428c72[_0x94afb6(0x1f9)]()['replace'](/[/\\:*?"<>|]/g,'-')['replace'](/\s+/g,'-')[_0x94afb6(0x1f0)](/-+/g,'-')[_0x94afb6(0x1f0)](/^-|-$/g,'');}
@@ -1 +1 @@
1
- (function(_0x58c5c7,_0x2ec3cf){const _0x21ef03=a113_0x1e88,_0x19f77=_0x58c5c7();while(!![]){try{const _0x1afbd8=-parseInt(_0x21ef03(0xee))/0x1*(parseInt(_0x21ef03(0xe2))/0x2)+parseInt(_0x21ef03(0xea))/0x3+parseInt(_0x21ef03(0xe9))/0x4*(parseInt(_0x21ef03(0xe3))/0x5)+parseInt(_0x21ef03(0xe8))/0x6*(parseInt(_0x21ef03(0xe7))/0x7)+-parseInt(_0x21ef03(0xdd))/0x8+-parseInt(_0x21ef03(0xe1))/0x9*(-parseInt(_0x21ef03(0xda))/0xa)+-parseInt(_0x21ef03(0xef))/0xb*(parseInt(_0x21ef03(0xf0))/0xc);if(_0x1afbd8===_0x2ec3cf)break;else _0x19f77['push'](_0x19f77['shift']());}catch(_0x3ae2d6){_0x19f77['push'](_0x19f77['shift']());}}}(a113_0x38a3,0x47dfd));function hasWildcard(_0x1e1d52){const _0x29120f=a113_0x1e88;return _0x1e1d52['includes']('*')||_0x1e1d52[_0x29120f(0xd8)]('?');}function a113_0x38a3(){const _0x258e60=['trim','3669952jfoOeO','Wildcards\x20are\x20not\x20allowed\x20in\x20database\x20name\x20for\x20describe\x20operation','length','Invalid\x20catalog.database.table\x20format\x20-\x20all\x20parts\x20must\x20be\x20non-empty','1567260EfmPdx','51638nUfEih','552365LWYMGs','split','Pattern\x20cannot\x20be\x20empty\x20or\x20whitespace-only','database','1547224WRdfRU','12NJSTlW','4AMFWFV','184491INyAwg','push','table','Wildcards\x20are\x20not\x20allowed\x20in\x20table\x20name\x20for\x20describe\x20operation','8wAuQow','11WAllil','31452tLmwkz','Pattern\x20cannot\x20be\x20just\x20a\x20dot','join','catalog','includes','Table\x20part\x20cannot\x20be\x20empty\x20-\x20use\x20\x22*\x22\x20for\x20all\x20tables\x20(e.g.,\x20\x22mydb.*\x22)','20pwPuzK','Invalid\x20pattern\x20format\x20-\x20too\x20many\x20dots\x20(max:\x20catalog.database.table)'];a113_0x38a3=function(){return _0x258e60;};return a113_0x38a3();}export function parseTableReference(_0x290c95){const _0x2336c0=a113_0x1e88;if(!_0x290c95||_0x290c95[_0x2336c0(0xdc)]()['length']===0x0)throw new Error(_0x2336c0(0xe5));const _0x1a0062=_0x290c95[_0x2336c0(0xdc)](),_0x8c14e0={'original':_0x1a0062},_0x4acc19=_0x1a0062[_0x2336c0(0xe4)]('.');if(_0x4acc19[_0x2336c0(0xdf)]===0x1){const _0x417f7a=_0x4acc19[0x0];if(!_0x417f7a)throw new Error(_0x2336c0(0xf1));_0x8c14e0[_0x2336c0(0xec)]=_0x417f7a;}else{if(_0x4acc19['length']===0x2){const [_0x445d11,_0x5c10c8]=_0x4acc19;if(!_0x445d11)throw new Error('Database\x20part\x20cannot\x20be\x20empty\x20-\x20use\x20\x22*\x22\x20for\x20all\x20databases\x20(e.g.,\x20\x22*.mytable\x22)');if(!_0x5c10c8)throw new Error(_0x2336c0(0xd9));_0x8c14e0[_0x2336c0(0xe6)]=_0x445d11,_0x8c14e0[_0x2336c0(0xec)]=_0x5c10c8;}else{if(_0x4acc19[_0x2336c0(0xdf)]===0x3){const [_0x116a97,_0x52a1fb,_0x226277]=_0x4acc19;if(!_0x116a97||!_0x52a1fb||!_0x226277)throw new Error(_0x2336c0(0xe0));_0x8c14e0[_0x2336c0(0xf3)]=_0x116a97,_0x8c14e0[_0x2336c0(0xe6)]=_0x52a1fb,_0x8c14e0[_0x2336c0(0xec)]=_0x226277;}else throw new Error(_0x2336c0(0xdb));}}return _0x8c14e0;}export function formatTableReference(_0x4c0e40){const _0xaeffcc=a113_0x1e88,_0x5560d1=[];return _0x4c0e40['catalog']&&_0x5560d1[_0xaeffcc(0xeb)](_0x4c0e40[_0xaeffcc(0xf3)]),_0x4c0e40[_0xaeffcc(0xe6)]&&_0x5560d1[_0xaeffcc(0xeb)](_0x4c0e40[_0xaeffcc(0xe6)]),_0x4c0e40['table']&&_0x5560d1[_0xaeffcc(0xeb)](_0x4c0e40[_0xaeffcc(0xec)]),_0x5560d1[_0xaeffcc(0xf2)]('.');}export function validateTableListReference(_0x4c77ee){return undefined;}function a113_0x1e88(_0x121d58,_0x1a02fb){_0x121d58=_0x121d58-0xd8;const _0x38a3f7=a113_0x38a3();let _0x1e8871=_0x38a3f7[_0x121d58];return _0x1e8871;}export function validateTableDescribeReference(_0x367ffd){const _0x552be7=a113_0x1e88;if(!_0x367ffd['table'])return'Table\x20name\x20is\x20required\x20for\x20describe\x20operation';if(_0x367ffd[_0x552be7(0xe6)]&&hasWildcard(_0x367ffd[_0x552be7(0xe6)]))return _0x552be7(0xde);if(hasWildcard(_0x367ffd[_0x552be7(0xec)]))return _0x552be7(0xed);return undefined;}
1
+ (function(_0x2ed691,_0x37ade9){const _0x1256de=a113_0xb521,_0x2bb3ce=_0x2ed691();while(!![]){try{const _0x350e97=parseInt(_0x1256de(0x142))/0x1+parseInt(_0x1256de(0x155))/0x2+-parseInt(_0x1256de(0x141))/0x3*(-parseInt(_0x1256de(0x14a))/0x4)+-parseInt(_0x1256de(0x154))/0x5*(parseInt(_0x1256de(0x145))/0x6)+parseInt(_0x1256de(0x159))/0x7+-parseInt(_0x1256de(0x146))/0x8+parseInt(_0x1256de(0x157))/0x9*(-parseInt(_0x1256de(0x150))/0xa);if(_0x350e97===_0x37ade9)break;else _0x2bb3ce['push'](_0x2bb3ce['shift']());}catch(_0x3254fc){_0x2bb3ce['push'](_0x2bb3ce['shift']());}}}(a113_0x27dd,0xa0360));function hasWildcard(_0x1605a7){const _0xea8e89=a113_0xb521;return _0x1605a7[_0xea8e89(0x14c)]('*')||_0x1605a7[_0xea8e89(0x14c)]('?');}export function parseTableReference(_0x53f72a){const _0x2b95b1=a113_0xb521;if(!_0x53f72a||_0x53f72a[_0x2b95b1(0x143)]()['length']===0x0)throw new Error(_0x2b95b1(0x149));const _0x1fe883=_0x53f72a[_0x2b95b1(0x143)](),_0x521d80={'original':_0x1fe883},_0x39ab76=_0x1fe883['split']('.');if(_0x39ab76[_0x2b95b1(0x14d)]===0x1){const _0x30309e=_0x39ab76[0x0];if(!_0x30309e)throw new Error(_0x2b95b1(0x14e));_0x521d80[_0x2b95b1(0x148)]=_0x30309e;}else{if(_0x39ab76[_0x2b95b1(0x14d)]===0x2){const [_0x262140,_0x3f4faa]=_0x39ab76;if(!_0x262140)throw new Error(_0x2b95b1(0x144));if(!_0x3f4faa)throw new Error('Table\x20part\x20cannot\x20be\x20empty\x20-\x20use\x20\x22*\x22\x20for\x20all\x20tables\x20(e.g.,\x20\x22mydb.*\x22)');_0x521d80[_0x2b95b1(0x153)]=_0x262140,_0x521d80[_0x2b95b1(0x148)]=_0x3f4faa;}else{if(_0x39ab76[_0x2b95b1(0x14d)]===0x3){const [_0x195f4e,_0x56e79c,_0x4def45]=_0x39ab76;if(!_0x195f4e||!_0x56e79c||!_0x4def45)throw new Error('Invalid\x20catalog.database.table\x20format\x20-\x20all\x20parts\x20must\x20be\x20non-empty');_0x521d80[_0x2b95b1(0x14f)]=_0x195f4e,_0x521d80[_0x2b95b1(0x153)]=_0x56e79c,_0x521d80[_0x2b95b1(0x148)]=_0x4def45;}else throw new Error(_0x2b95b1(0x151));}}return _0x521d80;}export function formatTableReference(_0x4fca77){const _0x3701f8=a113_0xb521,_0x3ee8ce=[];return _0x4fca77['catalog']&&_0x3ee8ce[_0x3701f8(0x152)](_0x4fca77[_0x3701f8(0x14f)]),_0x4fca77[_0x3701f8(0x153)]&&_0x3ee8ce[_0x3701f8(0x152)](_0x4fca77[_0x3701f8(0x153)]),_0x4fca77[_0x3701f8(0x148)]&&_0x3ee8ce[_0x3701f8(0x152)](_0x4fca77[_0x3701f8(0x148)]),_0x3ee8ce[_0x3701f8(0x156)]('.');}function a113_0xb521(_0x565357,_0x57ef82){_0x565357=_0x565357-0x141;const _0x27ddf2=a113_0x27dd();let _0xb5211d=_0x27ddf2[_0x565357];return _0xb5211d;}export function validateTableListReference(_0x497f19){return undefined;}function a113_0x27dd(){const _0x356d79=['includes','length','Pattern\x20cannot\x20be\x20just\x20a\x20dot','catalog','6868930Njtgdd','Invalid\x20pattern\x20format\x20-\x20too\x20many\x20dots\x20(max:\x20catalog.database.table)','push','database','2305igulEF','523774BQmHpO','join','9UpXTjd','Table\x20name\x20is\x20required\x20for\x20describe\x20operation','6477590eTaCjk','3889068ELcjFW','220908XCQBVN','trim','Database\x20part\x20cannot\x20be\x20empty\x20-\x20use\x20\x22*\x22\x20for\x20all\x20databases\x20(e.g.,\x20\x22*.mytable\x22)','1326visSxx','10076184vllUQe','Wildcards\x20are\x20not\x20allowed\x20in\x20database\x20name\x20for\x20describe\x20operation','table','Pattern\x20cannot\x20be\x20empty\x20or\x20whitespace-only','4bTaarY','Wildcards\x20are\x20not\x20allowed\x20in\x20table\x20name\x20for\x20describe\x20operation'];a113_0x27dd=function(){return _0x356d79;};return a113_0x27dd();}export function validateTableDescribeReference(_0x3ca351){const _0x18f156=a113_0xb521;if(!_0x3ca351[_0x18f156(0x148)])return _0x18f156(0x158);if(_0x3ca351[_0x18f156(0x153)]&&hasWildcard(_0x3ca351[_0x18f156(0x153)]))return _0x18f156(0x147);if(hasWildcard(_0x3ca351[_0x18f156(0x148)]))return _0x18f156(0x14b);return undefined;}
@@ -1 +1 @@
1
- const a114_0x247564=a114_0x2c1e;(function(_0x11a5e4,_0xe7f8dc){const _0x208eb4=a114_0x2c1e,_0x2a8d7e=_0x11a5e4();while(!![]){try{const _0xc9b5b7=-parseInt(_0x208eb4(0x200))/0x1*(parseInt(_0x208eb4(0x1f1))/0x2)+parseInt(_0x208eb4(0x1ed))/0x3+-parseInt(_0x208eb4(0x1ec))/0x4*(-parseInt(_0x208eb4(0x202))/0x5)+parseInt(_0x208eb4(0x1ff))/0x6*(parseInt(_0x208eb4(0x1f2))/0x7)+-parseInt(_0x208eb4(0x203))/0x8*(-parseInt(_0x208eb4(0x204))/0x9)+parseInt(_0x208eb4(0x1fe))/0xa*(parseInt(_0x208eb4(0x1fa))/0xb)+parseInt(_0x208eb4(0x1f8))/0xc*(-parseInt(_0x208eb4(0x1ef))/0xd);if(_0xc9b5b7===_0xe7f8dc)break;else _0x2a8d7e['push'](_0x2a8d7e['shift']());}catch(_0x4debbf){_0x2a8d7e['push'](_0x2a8d7e['shift']());}}}(a114_0x3fac,0x87228));function a114_0x2c1e(_0xcaa55,_0x10dbdf){_0xcaa55=_0xcaa55-0x1e9;const _0x3fac95=a114_0x3fac();let _0x2c1ede=_0x3fac95[_0xcaa55];return _0x2c1ede;}import{existsSync,readFileSync}from'fs';import a114_0x48fa02 from'path';const TDX_CONFIG_FILE=a114_0x247564(0x1fd),SEGMENTS_DIR=a114_0x247564(0x1ea);export function findTdxConfigPath(_0x37a757=process[a114_0x247564(0x1f9)]()){const _0x57dc1a=a114_0x247564;let _0x331c97=a114_0x48fa02['resolve'](_0x37a757);const _0x5b4027=a114_0x48fa02[_0x57dc1a(0x1f3)](_0x331c97)[_0x57dc1a(0x1ee)];while(_0x331c97!==_0x5b4027){const _0x1c75da=a114_0x48fa02[_0x57dc1a(0x1f5)](_0x331c97,TDX_CONFIG_FILE);if(existsSync(_0x1c75da))return _0x1c75da;_0x331c97=a114_0x48fa02['dirname'](_0x331c97);}return null;}export function loadTdxConfig(_0x56ce0e){const _0x59d4bb=a114_0x247564,_0x1315fb=readFileSync(_0x56ce0e,_0x59d4bb(0x1f4));let _0x2c716c;try{_0x2c716c=JSON[_0x59d4bb(0x1f3)](_0x1315fb);}catch{throw new Error(_0x59d4bb(0x1eb)+_0x56ce0e);}if(!_0x2c716c||typeof _0x2c716c!==_0x59d4bb(0x201))throw new Error('Invalid\x20tdx.json:\x20expected\x20object');const _0x5a94aa=_0x2c716c;if(!_0x5a94aa[_0x59d4bb(0x1fc)]||typeof _0x5a94aa[_0x59d4bb(0x1fc)]!==_0x59d4bb(0x1f7))throw new Error(_0x59d4bb(0x1f0));return{'parent_segment':_0x5a94aa[_0x59d4bb(0x1fc)]};}export function findTdxConfig(_0x1035e5=process[a114_0x247564(0x1f9)]()){const _0x3dc622=a114_0x247564,_0x5bdc10=findTdxConfigPath(_0x1035e5);if(!_0x5bdc10)throw new Error('No\x20tdx.json\x20found.\x20Please\x20run\x20\x27tdx\x20sg\x20pull\x20<parent_segment>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure.');const _0x282820=loadTdxConfig(_0x5bdc10),_0x5cd6c6=a114_0x48fa02[_0x3dc622(0x205)](_0x5bdc10);return{'config':_0x282820,'configPath':_0x5bdc10,'configDir':_0x5cd6c6};}export function getSegmentRootDir(_0x4e06b2,_0x25ae40=process[a114_0x247564(0x1f9)]()){return a114_0x48fa02['join'](_0x25ae40,SEGMENTS_DIR,_0x4e06b2);}export function getTdxConfigPath(_0x2b851e,_0x548546=process[a114_0x247564(0x1f9)]()){const _0x490132=a114_0x247564;return a114_0x48fa02[_0x490132(0x1f5)](getSegmentRootDir(_0x2b851e,_0x548546),TDX_CONFIG_FILE);}function a114_0x3fac(){const _0x1f94b0=['171hWKXaO','dirname','stringify','segments','Invalid\x20JSON\x20in\x20','356smtyty','2705787rwmCRH','root','134303emOaJu','Invalid\x20tdx.json:\x20missing\x20or\x20invalid\x20\x27parent_segment\x27\x20field','7374mhxjsh','7LmLirb','parse','utf-8','join','replace','string','2460dyAxxl','cwd','2784122OLnuNY','resolve','parent_segment','tdx.json','10ElFZMa','6135018zFLUtl','263aGuMuM','object','21865mLruBe','452344zhUTKN'];a114_0x3fac=function(){return _0x1f94b0;};return a114_0x3fac();}export function getRelativePathFromConfig(_0x5750ab,_0x7f2527){const _0x1bd9be=a114_0x247564,_0x50692a=a114_0x48fa02[_0x1bd9be(0x1fb)](_0x5750ab),_0xa5a5ae=a114_0x48fa02['relative'](_0x7f2527,_0x50692a);if(_0xa5a5ae['startsWith']('..'))return'';return _0xa5a5ae;}export function localPathToTdFolderPath(_0x5a7b6f){const _0x106eb4=a114_0x247564,_0x2be445=a114_0x48fa02['dirname'](_0x5a7b6f);if(_0x2be445==='.'||_0x2be445==='')return'';return _0x2be445[_0x106eb4(0x1f6)](/\\/g,'/');}export function tdFolderPathToLocalPath(_0x5ec6be,_0x20d783){if(!_0x5ec6be)return _0x20d783;return a114_0x48fa02['join'](_0x20d783,_0x5ec6be);}export function createTdxConfigContent(_0x4c0e2e){const _0x587389=a114_0x247564,_0x16fa28={'parent_segment':_0x4c0e2e};return JSON[_0x587389(0x1e9)](_0x16fa28,null,0x2)+'\x0a';}
1
+ const a114_0x43a602=a114_0x15d3;function a114_0x4ccd(){const _0x48872d=['string','554556lIjytZ','relative','cwd','parse','356544QyPbGR','join','Invalid\x20tdx.json:\x20missing\x20or\x20invalid\x20\x27parent_segment\x27\x20field','root','startsWith','dirname','parent_segment','8860zYSksq','resolve','4086vHsDqN','4000AUgwfi','No\x20tdx.json\x20found.\x20Please\x20run\x20\x27tdx\x20sg\x20pull\x20<parent_segment>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure.','1166710LRrlmV','object','Invalid\x20JSON\x20in\x20','tdx.json','2430LWTfLr','1320swjzBv','1603fsBxeV','168KeACcw','segments'];a114_0x4ccd=function(){return _0x48872d;};return a114_0x4ccd();}(function(_0x389df3,_0x4f3a53){const _0xe7d7d5=a114_0x15d3,_0x2db7d7=_0x389df3();while(!![]){try{const _0x47b4a7=parseInt(_0xe7d7d5(0x194))/0x1+parseInt(_0xe7d7d5(0x191))/0x2*(-parseInt(_0xe7d7d5(0x19d))/0x3)+parseInt(_0xe7d7d5(0x18a))/0x4+parseInt(_0xe7d7d5(0x196))/0x5+-parseInt(_0xe7d7d5(0x186))/0x6+-parseInt(_0xe7d7d5(0x19c))/0x7*(-parseInt(_0xe7d7d5(0x19b))/0x8)+-parseInt(_0xe7d7d5(0x193))/0x9*(-parseInt(_0xe7d7d5(0x19a))/0xa);if(_0x47b4a7===_0x4f3a53)break;else _0x2db7d7['push'](_0x2db7d7['shift']());}catch(_0x2372d7){_0x2db7d7['push'](_0x2db7d7['shift']());}}}(a114_0x4ccd,0x20bbf));import{existsSync,readFileSync}from'fs';import a114_0x29be5a from'path';const TDX_CONFIG_FILE=a114_0x43a602(0x199),SEGMENTS_DIR=a114_0x43a602(0x19e);export function findTdxConfigPath(_0xa8f3f9=process['cwd']()){const _0x67bc5d=a114_0x43a602;let _0x35c9a4=a114_0x29be5a[_0x67bc5d(0x192)](_0xa8f3f9);const _0x490987=a114_0x29be5a[_0x67bc5d(0x189)](_0x35c9a4)[_0x67bc5d(0x18d)];while(_0x35c9a4!==_0x490987){const _0xd5fe82=a114_0x29be5a[_0x67bc5d(0x18b)](_0x35c9a4,TDX_CONFIG_FILE);if(existsSync(_0xd5fe82))return _0xd5fe82;_0x35c9a4=a114_0x29be5a[_0x67bc5d(0x18f)](_0x35c9a4);}return null;}export function loadTdxConfig(_0x4fbbc6){const _0x274aea=a114_0x43a602,_0x389367=readFileSync(_0x4fbbc6,'utf-8');let _0x361f4c;try{_0x361f4c=JSON[_0x274aea(0x189)](_0x389367);}catch{throw new Error(_0x274aea(0x198)+_0x4fbbc6);}if(!_0x361f4c||typeof _0x361f4c!==_0x274aea(0x197))throw new Error('Invalid\x20tdx.json:\x20expected\x20object');const _0x17127c=_0x361f4c;if(!_0x17127c[_0x274aea(0x190)]||typeof _0x17127c['parent_segment']!==_0x274aea(0x19f))throw new Error(_0x274aea(0x18c));return{'parent_segment':_0x17127c['parent_segment']};}export function findTdxConfig(_0x2d7727=process[a114_0x43a602(0x188)]()){const _0x405db1=a114_0x43a602,_0x46f6b6=findTdxConfigPath(_0x2d7727);if(!_0x46f6b6)throw new Error(_0x405db1(0x195));const _0x13ac65=loadTdxConfig(_0x46f6b6),_0x3ddfec=a114_0x29be5a[_0x405db1(0x18f)](_0x46f6b6);return{'config':_0x13ac65,'configPath':_0x46f6b6,'configDir':_0x3ddfec};}export function getSegmentRootDir(_0x121c41,_0x1b9380=process['cwd']()){const _0x1cd5fc=a114_0x43a602;return a114_0x29be5a[_0x1cd5fc(0x18b)](_0x1b9380,SEGMENTS_DIR,_0x121c41);}export function getTdxConfigPath(_0x56122e,_0x5104cc=process[a114_0x43a602(0x188)]()){const _0x2c9cfd=a114_0x43a602;return a114_0x29be5a[_0x2c9cfd(0x18b)](getSegmentRootDir(_0x56122e,_0x5104cc),TDX_CONFIG_FILE);}function a114_0x15d3(_0x422cc5,_0x45b80a){_0x422cc5=_0x422cc5-0x186;const _0x4ccdad=a114_0x4ccd();let _0x15d38b=_0x4ccdad[_0x422cc5];return _0x15d38b;}export function getRelativePathFromConfig(_0x539af6,_0x2ea8aa){const _0x2130fe=a114_0x43a602,_0x4d7cde=a114_0x29be5a[_0x2130fe(0x192)](_0x539af6),_0x3014fc=a114_0x29be5a[_0x2130fe(0x187)](_0x2ea8aa,_0x4d7cde);if(_0x3014fc[_0x2130fe(0x18e)]('..'))return'';return _0x3014fc;}export function localPathToTdFolderPath(_0xfb94fb){const _0x2283ac=a114_0x29be5a['dirname'](_0xfb94fb);if(_0x2283ac==='.'||_0x2283ac==='')return'';return _0x2283ac['replace'](/\\/g,'/');}export function tdFolderPathToLocalPath(_0x1e996a,_0x11351f){const _0x3f00f7=a114_0x43a602;if(!_0x1e996a)return _0x11351f;return a114_0x29be5a[_0x3f00f7(0x18b)](_0x11351f,_0x1e996a);}export function createTdxConfigContent(_0xd053d1){const _0x3ab9aa={'parent_segment':_0xd053d1};return JSON['stringify'](_0x3ab9aa,null,0x2)+'\x0a';}
@@ -1 +1 @@
1
- const a115_0x4ee6cc=a115_0x524a;(function(_0x147184,_0x270bf2){const _0x1c07dd=a115_0x524a,_0x239e95=_0x147184();while(!![]){try{const _0x39388e=parseInt(_0x1c07dd(0x92))/0x1*(-parseInt(_0x1c07dd(0xaa))/0x2)+-parseInt(_0x1c07dd(0x90))/0x3*(-parseInt(_0x1c07dd(0xb5))/0x4)+-parseInt(_0x1c07dd(0xbe))/0x5+-parseInt(_0x1c07dd(0xa0))/0x6*(parseInt(_0x1c07dd(0x9c))/0x7)+-parseInt(_0x1c07dd(0x8f))/0x8+parseInt(_0x1c07dd(0x99))/0x9+-parseInt(_0x1c07dd(0x93))/0xa*(-parseInt(_0x1c07dd(0xb3))/0xb);if(_0x39388e===_0x270bf2)break;else _0x239e95['push'](_0x239e95['shift']());}catch(_0x149039){_0x239e95['push'](_0x239e95['shift']());}}}(a115_0x2a68,0xf3f32));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';function a115_0x524a(_0x259e79,_0x2071aa){_0x259e79=_0x259e79-0x8e;const _0x2a6800=a115_0x2a68();let _0x524acd=_0x2a6800[_0x259e79];return _0x524acd;}import{pipeline}from'stream/promises';import a115_0x423151 from'chalk';function safeStringify(_0x577668){const _0x2717f5=a115_0x524a;if(typeof _0x577668==='string')return _0x577668;if(_0x577668 instanceof Error)return _0x577668[_0x2717f5(0x96)]||_0x577668['name']+':\x20'+_0x577668[_0x2717f5(0x9d)];try{return JSON[_0x2717f5(0xac)](_0x577668,(_0x264471,_0x54a41c)=>{const _0x280f9b=_0x2717f5;if(_0x54a41c instanceof Error)return{'name':_0x54a41c[_0x280f9b(0xc0)],'message':_0x54a41c['message'],'stack':_0x54a41c['stack'],'cause':_0x54a41c[_0x280f9b(0xaf)]};return _0x54a41c;});}catch{return String(_0x577668);}}function getTimezoneOffset(){const _0x5e9d9e=a115_0x524a,_0x415f4a=-new Date()[_0x5e9d9e(0xad)](),_0x38f990=Math[_0x5e9d9e(0x97)](Math[_0x5e9d9e(0xc7)](_0x415f4a)/0x3c),_0xcbe891=Math[_0x5e9d9e(0xc7)](_0x415f4a)%0x3c,_0x4b6e99=_0x415f4a>=0x0?'+':'-';return''+_0x4b6e99+_0x38f990[_0x5e9d9e(0x98)]()['padStart'](0x2,'0')+_0xcbe891[_0x5e9d9e(0x98)]()[_0x5e9d9e(0xa1)](0x2,'0');}function formatTimestamp(){const _0x423472=a115_0x524a,_0x6ab527=new Date(),_0x3fd1fa=_0x6ab527['getFullYear'](),_0x3b73b3=(_0x6ab527[_0x423472(0xb9)]()+0x1)[_0x423472(0x98)]()[_0x423472(0xa1)](0x2,'0'),_0x26e49e=_0x6ab527['getDate']()[_0x423472(0x98)]()[_0x423472(0xa1)](0x2,'0'),_0x46056d=_0x6ab527['getHours']()[_0x423472(0x98)]()[_0x423472(0xa1)](0x2,'0'),_0x18e491=_0x6ab527[_0x423472(0xc1)]()[_0x423472(0x98)]()[_0x423472(0xa1)](0x2,'0'),_0x328590=_0x6ab527[_0x423472(0x91)]()['toString']()[_0x423472(0xa1)](0x2,'0'),_0x2f3350=_0x6ab527[_0x423472(0xb2)]()[_0x423472(0x98)]()[_0x423472(0xa1)](0x3,'0'),_0x23de39=getTimezoneOffset();return _0x3fd1fa+'-'+_0x3b73b3+'-'+_0x26e49e+'\x20'+_0x46056d+':'+_0x18e491+':'+_0x328590+'.'+_0x2f3350+_0x23de39;}function formatColoredLogEntry(_0x119b8d,_0x1afa6c){const _0xae8e3b=a115_0x524a,_0x345cdf=formatTimestamp(),_0x2a2bc4=_0x1afa6c[_0xae8e3b(0x95)](safeStringify)[_0xae8e3b(0xa9)]('\x20'),_0x19570a=a115_0x423151[_0xae8e3b(0xb0)](_0x345cdf);let _0x557336;switch(_0x119b8d){case _0xae8e3b(0x8e):_0x557336=a115_0x423151[_0xae8e3b(0x9b)]('['+_0x119b8d+']\x20');break;case _0xae8e3b(0xb8):_0x557336=a115_0x423151[_0xae8e3b(0xbd)]('['+_0x119b8d+']\x20');break;case'error':_0x557336=a115_0x423151['red']('['+_0x119b8d+']');break;case'debug':_0x557336=a115_0x423151[_0xae8e3b(0xb0)]('['+_0x119b8d+']');break;default:_0x557336='['+_0x119b8d+']';}return _0x19570a+'\x20'+_0x557336+'\x20'+_0x2a2bc4;}export var LogLevel;(function(_0xb1ef14){const _0x1ddd42=a115_0x524a;_0xb1ef14[_0xb1ef14[_0x1ddd42(0xbb)]=-0x2]=_0x1ddd42(0xbb),_0xb1ef14[_0xb1ef14[_0x1ddd42(0xae)]=-0x1]=_0x1ddd42(0xae),_0xb1ef14[_0xb1ef14['INFO']=0x0]='INFO',_0xb1ef14[_0xb1ef14[_0x1ddd42(0xc6)]=0x1]=_0x1ddd42(0xc6),_0xb1ef14[_0xb1ef14[_0x1ddd42(0xa4)]=0x2]=_0x1ddd42(0xa4);}(LogLevel||(LogLevel={})));export class TDXLogger{[a115_0x4ee6cc(0xc4)];[a115_0x4ee6cc(0xa3)];[a115_0x4ee6cc(0x9a)];['fileOnly'];constructor(_0x163a86=LogLevel['INFO'],_0x4f369e=![]){const _0x3f7a76=a115_0x4ee6cc;this['logDir']=join(homedir(),'.cache',_0x3f7a76(0xab),_0x3f7a76(0xbf)),this[_0x3f7a76(0x9a)]=_0x163a86,this[_0x3f7a76(0xa8)]=_0x4f369e;}async[a115_0x4ee6cc(0xc2)](){const _0x1f0a47=a115_0x4ee6cc;try{await mkdir(this['logDir'],{'recursive':!![]}),await this['rotateOldLogs']();const _0x29acbe=join(this[_0x1f0a47(0xa3)],_0x1f0a47(0xa2));this[_0x1f0a47(0xc4)]=createWriteStream(_0x29acbe,{'flags':'a'}),this[_0x1f0a47(0xc4)]['on'](_0x1f0a47(0xc5),_0x4bc159=>{const _0x168a2a=_0x1f0a47;console['error'](_0x168a2a(0xc3),_0x4bc159['message']);});}catch(_0x3cdcef){console[_0x1f0a47(0xc5)](_0x1f0a47(0xba),_0x3cdcef);}}async['rotateOldLogs'](){const _0x3a455f=a115_0x4ee6cc;try{const _0x38941a=await readdir(this[_0x3a455f(0xa3)]),_0x3546e1=new Date()['toISOString']()['split']('T')[0x0];if(_0x38941a['includes'](_0x3a455f(0xa2))){const _0x595581=join(this[_0x3a455f(0xa3)],'tdx.log'),_0x1e6270=await stat(_0x595581),_0xa3cdbf=new Date(_0x1e6270[_0x3a455f(0xb1)])[_0x3a455f(0x9f)]()[_0x3a455f(0xc9)]('T')[0x0];if(_0xa3cdbf<_0x3546e1){const _0x4b3894=join(this['logDir'],_0x3a455f(0xa6)+_0xa3cdbf+_0x3a455f(0xb6));await rename(_0x595581,_0x4b3894);}}const _0x161c5b=await readdir(this[_0x3a455f(0xa3)]),_0x4b1361=/^tdx-(\d{4}-\d{2}-\d{2})\.log$/,_0x370f19=_0x161c5b[_0x3a455f(0xa5)](_0xe3fbb=>_0x4b1361[_0x3a455f(0xbc)](_0xe3fbb));for(const _0x2f4f74 of _0x370f19){const _0x5afc8c=join(this[_0x3a455f(0xa3)],_0x2f4f74),_0x402cab=join(this[_0x3a455f(0xa3)],_0x2f4f74+_0x3a455f(0x9e));try{await pipeline(createReadStream(_0x5afc8c),createGzip(),createWriteStream(_0x402cab)),await unlink(_0x5afc8c);}catch(_0x3c82e0){console[_0x3a455f(0xc5)](_0x3a455f(0xa7)+_0x2f4f74+':',_0x3c82e0);}}}catch{}}[a115_0x4ee6cc(0xc8)](..._0x40c7f5){const _0x2b8a74=a115_0x4ee6cc;if(this['logLevel']>LogLevel['DEBUG'])return;const _0x5cf74d=formatColoredLogEntry('debug',_0x40c7f5);this[_0x2b8a74(0xc4)]?.[_0x2b8a74(0x94)](_0x5cf74d+'\x0a');}['trace'](..._0x3d58f2){const _0xb50f8=a115_0x4ee6cc;if(this[_0xb50f8(0x9a)]>LogLevel[_0xb50f8(0xbb)])return;const _0x569d79=formatColoredLogEntry('trace',_0x3d58f2);this[_0xb50f8(0xc4)]?.['write'](_0x569d79+'\x0a');}[a115_0x4ee6cc(0x8e)](..._0x4a3701){const _0x3557d5=a115_0x4ee6cc;if(this['logLevel']>LogLevel['INFO'])return;const _0x30cb77=formatColoredLogEntry(_0x3557d5(0x8e),_0x4a3701);!this[_0x3557d5(0xa8)]&&console[_0x3557d5(0xb4)](_0x30cb77),this[_0x3557d5(0xc4)]?.[_0x3557d5(0x94)](_0x30cb77+'\x0a');}[a115_0x4ee6cc(0xb8)](..._0x107bab){const _0x566bc2=a115_0x4ee6cc;if(this['logLevel']>LogLevel['WARN'])return;const _0x4d855b=formatColoredLogEntry(_0x566bc2(0xb8),_0x107bab);!this[_0x566bc2(0xa8)]&&console[_0x566bc2(0xc5)](_0x4d855b),this['logStream']?.['write'](_0x4d855b+'\x0a');}[a115_0x4ee6cc(0xc5)](..._0x4a071e){const _0x44ac05=a115_0x4ee6cc,_0x53b435=formatColoredLogEntry(_0x44ac05(0xc5),_0x4a071e);!this['fileOnly']&&console['error'](_0x53b435),this[_0x44ac05(0xc4)]?.['write'](_0x53b435+'\x0a');}async['close'](){const _0x228418=a115_0x4ee6cc;return this[_0x228418(0x8e)](_0x228418(0xca)),new Promise(_0x55c283=>{const _0x53fc3a=_0x228418;this[_0x53fc3a(0xc4)]?this['logStream']['end'](()=>{_0x55c283();}):_0x55c283();});}[a115_0x4ee6cc(0xb7)](){const _0x3c645a=a115_0x4ee6cc;return join(this['logDir'],_0x3c645a(0xa2));}}function a115_0x2a68(){const _0xc7dec8=['floor','toString','3364272qwRanH','logLevel','cyan','2415049AktYgd','message','.gz','toISOString','18KoxnlZ','padStart','tdx.log','logDir','ERROR','filter','tdx-','Warning:\x20Failed\x20to\x20compress\x20','fileOnly','join','310462XNzfqU','tdx','stringify','getTimezoneOffset','DEBUG','cause','gray','mtime','getMilliseconds','4667762fwoCHp','log','36QHEHEw','.log','getLogPath','warn','getMonth','Warning:\x20Failed\x20to\x20initialize\x20log\x20files:','TRACE','test','yellow','163885vPOAxw','logs','name','getMinutes','init','Warning:\x20Error\x20writing\x20to\x20tdx.log:','logStream','error','WARN','abs','debug','split','Proxy\x20session\x20ended','info','7069808NCxRvW','165525sQqcwx','getSeconds','3zgLwJf','60RjvFkk','write','map','stack'];a115_0x2a68=function(){return _0xc7dec8;};return a115_0x2a68();}
1
+ const a115_0x3908eb=a115_0x2c57;(function(_0x248e9b,_0x9b1e0f){const _0x1acce1=a115_0x2c57,_0x28b847=_0x248e9b();while(!![]){try{const _0x3eb711=-parseInt(_0x1acce1(0x149))/0x1+parseInt(_0x1acce1(0x144))/0x2+-parseInt(_0x1acce1(0x150))/0x3*(-parseInt(_0x1acce1(0x14a))/0x4)+-parseInt(_0x1acce1(0x140))/0x5*(-parseInt(_0x1acce1(0x11d))/0x6)+-parseInt(_0x1acce1(0x125))/0x7+-parseInt(_0x1acce1(0x13d))/0x8*(parseInt(_0x1acce1(0x124))/0x9)+parseInt(_0x1acce1(0x14c))/0xa*(parseInt(_0x1acce1(0x12a))/0xb);if(_0x3eb711===_0x9b1e0f)break;else _0x28b847['push'](_0x28b847['shift']());}catch(_0x3aed76){_0x28b847['push'](_0x28b847['shift']());}}}(a115_0x34c6,0x62106));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';function a115_0x34c6(){const _0x36fba6=['logs','gray','logLevel','297937ZvkQon','4WnSLCy','getMonth','50KFegWp','TRACE','init','getTimezoneOffset','1141509znqMGC','logDir','toString','logStream','end','Warning:\x20Failed\x20to\x20initialize\x20log\x20files:','stringify','Proxy\x20session\x20ended','getMinutes','info','getDate','join','tdx-','12akzgzP','cyan','getSeconds','abs','log','name','getFullYear','55179DangLk','4452826SEtxCa','getHours','toISOString','rotateOldLogs','filter','163273lLgrxO','trace','INFO','map','tdx.log','.gz','red','.log','warn','debug','DEBUG','includes','fileOnly','tdx','close','.cache','write','message','stack','616CRBzDF','split','error','1875490OCieRy','string','padStart','WARN','1205796mfOBCA','ERROR'];a115_0x34c6=function(){return _0x36fba6;};return a115_0x34c6();}function a115_0x2c57(_0x430125,_0x53111f){_0x430125=_0x430125-0x11a;const _0x34c60e=a115_0x34c6();let _0x2c572d=_0x34c60e[_0x430125];return _0x2c572d;}import{pipeline}from'stream/promises';import a115_0x39b38f from'chalk';function safeStringify(_0x34a802){const _0x27f063=a115_0x2c57;if(typeof _0x34a802===_0x27f063(0x141))return _0x34a802;if(_0x34a802 instanceof Error)return _0x34a802[_0x27f063(0x13c)]||_0x34a802['name']+':\x20'+_0x34a802[_0x27f063(0x13b)];try{return JSON[_0x27f063(0x156)](_0x34a802,(_0x21af6e,_0x1af46e)=>{const _0x5e16b0=_0x27f063;if(_0x1af46e instanceof Error)return{'name':_0x1af46e[_0x5e16b0(0x122)],'message':_0x1af46e['message'],'stack':_0x1af46e[_0x5e16b0(0x13c)],'cause':_0x1af46e['cause']};return _0x1af46e;});}catch{return String(_0x34a802);}}function getTimezoneOffset(){const _0x515e97=a115_0x2c57,_0x44888f=-new Date()[_0x515e97(0x14f)](),_0x49fdb8=Math['floor'](Math[_0x515e97(0x120)](_0x44888f)/0x3c),_0x5c6637=Math[_0x515e97(0x120)](_0x44888f)%0x3c,_0x245b86=_0x44888f>=0x0?'+':'-';return''+_0x245b86+_0x49fdb8[_0x515e97(0x152)]()['padStart'](0x2,'0')+_0x5c6637[_0x515e97(0x152)]()[_0x515e97(0x142)](0x2,'0');}function formatTimestamp(){const _0x13b36c=a115_0x2c57,_0x3b6be1=new Date(),_0x497e71=_0x3b6be1[_0x13b36c(0x123)](),_0x3c1bb4=(_0x3b6be1[_0x13b36c(0x14b)]()+0x1)[_0x13b36c(0x152)]()['padStart'](0x2,'0'),_0x35a9fc=_0x3b6be1[_0x13b36c(0x11a)]()[_0x13b36c(0x152)]()[_0x13b36c(0x142)](0x2,'0'),_0x51d4a5=_0x3b6be1[_0x13b36c(0x126)]()[_0x13b36c(0x152)]()['padStart'](0x2,'0'),_0x51f98f=_0x3b6be1[_0x13b36c(0x158)]()[_0x13b36c(0x152)]()[_0x13b36c(0x142)](0x2,'0'),_0x1ab6b8=_0x3b6be1[_0x13b36c(0x11f)]()[_0x13b36c(0x152)]()[_0x13b36c(0x142)](0x2,'0'),_0x8aa456=_0x3b6be1['getMilliseconds']()['toString']()['padStart'](0x3,'0'),_0x5841bb=getTimezoneOffset();return _0x497e71+'-'+_0x3c1bb4+'-'+_0x35a9fc+'\x20'+_0x51d4a5+':'+_0x51f98f+':'+_0x1ab6b8+'.'+_0x8aa456+_0x5841bb;}function formatColoredLogEntry(_0x583bb9,_0x4eda07){const _0x4d26c0=a115_0x2c57,_0x35e817=formatTimestamp(),_0x4885c4=_0x4eda07[_0x4d26c0(0x12d)](safeStringify)[_0x4d26c0(0x11b)]('\x20'),_0x34bfbd=a115_0x39b38f[_0x4d26c0(0x147)](_0x35e817);let _0x28b69b;switch(_0x583bb9){case'info':_0x28b69b=a115_0x39b38f[_0x4d26c0(0x11e)]('['+_0x583bb9+']\x20');break;case _0x4d26c0(0x132):_0x28b69b=a115_0x39b38f['yellow']('['+_0x583bb9+']\x20');break;case'error':_0x28b69b=a115_0x39b38f[_0x4d26c0(0x130)]('['+_0x583bb9+']');break;case _0x4d26c0(0x133):_0x28b69b=a115_0x39b38f[_0x4d26c0(0x147)]('['+_0x583bb9+']');break;default:_0x28b69b='['+_0x583bb9+']';}return _0x34bfbd+'\x20'+_0x28b69b+'\x20'+_0x4885c4;}export var LogLevel;(function(_0x4b7c48){const _0x14723e=a115_0x2c57;_0x4b7c48[_0x4b7c48[_0x14723e(0x14d)]=-0x2]=_0x14723e(0x14d),_0x4b7c48[_0x4b7c48[_0x14723e(0x134)]=-0x1]=_0x14723e(0x134),_0x4b7c48[_0x4b7c48['INFO']=0x0]=_0x14723e(0x12c),_0x4b7c48[_0x4b7c48[_0x14723e(0x143)]=0x1]=_0x14723e(0x143),_0x4b7c48[_0x4b7c48['ERROR']=0x2]=_0x14723e(0x145);}(LogLevel||(LogLevel={})));export class TDXLogger{[a115_0x3908eb(0x153)];[a115_0x3908eb(0x151)];[a115_0x3908eb(0x148)];[a115_0x3908eb(0x136)];constructor(_0x5b2307=LogLevel['INFO'],_0x350aa0=![]){const _0x34b44a=a115_0x3908eb;this['logDir']=join(homedir(),_0x34b44a(0x139),_0x34b44a(0x137),_0x34b44a(0x146)),this[_0x34b44a(0x148)]=_0x5b2307,this[_0x34b44a(0x136)]=_0x350aa0;}async[a115_0x3908eb(0x14e)](){const _0x2a7feb=a115_0x3908eb;try{await mkdir(this[_0x2a7feb(0x151)],{'recursive':!![]}),await this[_0x2a7feb(0x128)]();const _0x1bd73d=join(this[_0x2a7feb(0x151)],_0x2a7feb(0x12e));this['logStream']=createWriteStream(_0x1bd73d,{'flags':'a'}),this['logStream']['on'](_0x2a7feb(0x13f),_0x4796c3=>{const _0x2a246c=_0x2a7feb;console['error']('Warning:\x20Error\x20writing\x20to\x20tdx.log:',_0x4796c3[_0x2a246c(0x13b)]);});}catch(_0x346a9d){console[_0x2a7feb(0x13f)](_0x2a7feb(0x155),_0x346a9d);}}async[a115_0x3908eb(0x128)](){const _0x2093ea=a115_0x3908eb;try{const _0x5dc9b5=await readdir(this['logDir']),_0x466e95=new Date()[_0x2093ea(0x127)]()[_0x2093ea(0x13e)]('T')[0x0];if(_0x5dc9b5[_0x2093ea(0x135)]('tdx.log')){const _0x534c40=join(this['logDir'],'tdx.log'),_0x55d82e=await stat(_0x534c40),_0x3c7ecf=new Date(_0x55d82e['mtime'])['toISOString']()[_0x2093ea(0x13e)]('T')[0x0];if(_0x3c7ecf<_0x466e95){const _0x46ee2a=join(this['logDir'],_0x2093ea(0x11c)+_0x3c7ecf+_0x2093ea(0x131));await rename(_0x534c40,_0x46ee2a);}}const _0xa741b9=await readdir(this[_0x2093ea(0x151)]),_0x2ebe5f=/^tdx-(\d{4}-\d{2}-\d{2})\.log$/,_0x279d67=_0xa741b9[_0x2093ea(0x129)](_0x152167=>_0x2ebe5f['test'](_0x152167));for(const _0x4104e3 of _0x279d67){const _0x121bb9=join(this['logDir'],_0x4104e3),_0x80cf58=join(this[_0x2093ea(0x151)],_0x4104e3+_0x2093ea(0x12f));try{await pipeline(createReadStream(_0x121bb9),createGzip(),createWriteStream(_0x80cf58)),await unlink(_0x121bb9);}catch(_0x597d09){console['error']('Warning:\x20Failed\x20to\x20compress\x20'+_0x4104e3+':',_0x597d09);}}}catch{}}['debug'](..._0x2a9070){const _0xeb1ee4=a115_0x3908eb;if(this['logLevel']>LogLevel[_0xeb1ee4(0x134)])return;const _0x2a8b58=formatColoredLogEntry(_0xeb1ee4(0x133),_0x2a9070);this[_0xeb1ee4(0x153)]?.[_0xeb1ee4(0x13a)](_0x2a8b58+'\x0a');}[a115_0x3908eb(0x12b)](..._0x4b34c1){const _0x2fac5a=a115_0x3908eb;if(this[_0x2fac5a(0x148)]>LogLevel[_0x2fac5a(0x14d)])return;const _0x4bb50b=formatColoredLogEntry(_0x2fac5a(0x12b),_0x4b34c1);this[_0x2fac5a(0x153)]?.[_0x2fac5a(0x13a)](_0x4bb50b+'\x0a');}[a115_0x3908eb(0x159)](..._0x2a5d56){const _0x518f98=a115_0x3908eb;if(this[_0x518f98(0x148)]>LogLevel[_0x518f98(0x12c)])return;const _0x291c04=formatColoredLogEntry(_0x518f98(0x159),_0x2a5d56);!this[_0x518f98(0x136)]&&console[_0x518f98(0x121)](_0x291c04),this[_0x518f98(0x153)]?.[_0x518f98(0x13a)](_0x291c04+'\x0a');}[a115_0x3908eb(0x132)](..._0x2f2fc9){const _0x259bbc=a115_0x3908eb;if(this[_0x259bbc(0x148)]>LogLevel[_0x259bbc(0x143)])return;const _0x517fce=formatColoredLogEntry(_0x259bbc(0x132),_0x2f2fc9);!this[_0x259bbc(0x136)]&&console[_0x259bbc(0x13f)](_0x517fce),this['logStream']?.[_0x259bbc(0x13a)](_0x517fce+'\x0a');}[a115_0x3908eb(0x13f)](..._0x51254c){const _0x5f10f4=a115_0x3908eb,_0x4281b6=formatColoredLogEntry('error',_0x51254c);!this['fileOnly']&&console[_0x5f10f4(0x13f)](_0x4281b6),this[_0x5f10f4(0x153)]?.[_0x5f10f4(0x13a)](_0x4281b6+'\x0a');}async[a115_0x3908eb(0x138)](){const _0x5c2b78=a115_0x3908eb;return this[_0x5c2b78(0x159)](_0x5c2b78(0x157)),new Promise(_0x3c6d7b=>{const _0x30ba33=_0x5c2b78;this[_0x30ba33(0x153)]?this[_0x30ba33(0x153)][_0x30ba33(0x154)](()=>{_0x3c6d7b();}):_0x3c6d7b();});}['getLogPath'](){const _0x942961=a115_0x3908eb;return join(this[_0x942961(0x151)],'tdx.log');}}
@@ -1 +1 @@
1
- (function(_0x2d1491,_0x5bd1e0){const _0x2e4eaa=a116_0x5d7e,_0x2d213d=_0x2d1491();while(!![]){try{const _0x4dc0b0=parseInt(_0x2e4eaa(0x19b))/0x1*(parseInt(_0x2e4eaa(0x19c))/0x2)+parseInt(_0x2e4eaa(0x1a3))/0x3*(-parseInt(_0x2e4eaa(0x18f))/0x4)+-parseInt(_0x2e4eaa(0x193))/0x5+parseInt(_0x2e4eaa(0x1a7))/0x6*(-parseInt(_0x2e4eaa(0x194))/0x7)+-parseInt(_0x2e4eaa(0x18e))/0x8+parseInt(_0x2e4eaa(0x19d))/0x9+parseInt(_0x2e4eaa(0x192))/0xa;if(_0x4dc0b0===_0x5bd1e0)break;else _0x2d213d['push'](_0x2d213d['shift']());}catch(_0x423db4){_0x2d213d['push'](_0x2d213d['shift']());}}}(a116_0x307f,0x7a408));import{formatRows}from'./formatters.js';import a116_0x294d9f from'chalk';const DEFAULT_OPTIONS={'showTreeLines':!![],'showIcons':!![],'showMetadata':!![],'indent':'\x20\x20','showUrl':![],'getSegmentUrl':undefined};export function formatTree(_0x330461,_0x115480={},_0x27979a=0x0,_0x300712=''){const _0x51db61=a116_0x5d7e,_0xcf6961={...DEFAULT_OPTIONS,..._0x115480},_0x2ba1a2=[],_0x37aba1=[..._0x330461][_0x51db61(0x199)]((_0x16bf38,_0x413f69)=>_0x16bf38[_0x51db61(0x19f)][_0x51db61(0x183)](_0x413f69[_0x51db61(0x19f)]));for(let _0x4dc744=0x0;_0x4dc744<_0x37aba1[_0x51db61(0x1a9)];_0x4dc744++){const _0x31614d=_0x37aba1[_0x4dc744],_0x3dbb2c=_0x4dc744===_0x37aba1[_0x51db61(0x1a9)]-0x1;let _0x1a17c0='';_0x27979a>0x0&&(_0x1a17c0+=_0x300712);_0xcf6961[_0x51db61(0x1a4)]&&_0x27979a>0x0&&(_0x1a17c0+=a116_0x294d9f[_0x51db61(0x18a)](_0x3dbb2c?_0x51db61(0x19a):'├──\x20'));_0xcf6961['showIcons']&&(_0x1a17c0+=_0x31614d[_0x51db61(0x1a5)]==='folder'?_0x51db61(0x188):_0x51db61(0x189));_0x1a17c0+=_0x31614d[_0x51db61(0x19f)];if(_0xcf6961[_0x51db61(0x18b)]){if(_0x31614d[_0x51db61(0x1a5)]==='folder'){const _0x6a5b5f=[];_0x31614d[_0x51db61(0x197)][_0x51db61(0x18c)]&&_0x6a5b5f['push'](_0x31614d[_0x51db61(0x197)]['segmentCount']+'\x20segment'+(_0x31614d[_0x51db61(0x197)][_0x51db61(0x18c)]!==0x1?'s':'')),_0x31614d[_0x51db61(0x197)][_0x51db61(0x1a0)]&&_0x6a5b5f[_0x51db61(0x190)](_0x31614d[_0x51db61(0x197)]['folderCount']+_0x51db61(0x184)+(_0x31614d[_0x51db61(0x197)][_0x51db61(0x1a0)]!==0x1?'s':'')),_0x6a5b5f[_0x51db61(0x1a9)]>0x0&&(_0x1a17c0+=a116_0x294d9f[_0x51db61(0x18a)]('\x20('+_0x6a5b5f[_0x51db61(0x1a8)](',\x20')+')'));}else _0x31614d[_0x51db61(0x1a5)]===_0x51db61(0x1a1)&&_0x31614d[_0x51db61(0x187)]!==undefined&&(_0x1a17c0+=a116_0x294d9f[_0x51db61(0x18a)]('\x20('+formatRows(_0x31614d[_0x51db61(0x187)])+')'));}_0xcf6961[_0x51db61(0x191)]&&_0xcf6961[_0x51db61(0x1a2)]&&_0x31614d[_0x51db61(0x1a5)]===_0x51db61(0x1a1)&&(_0x1a17c0+='\x20'+a116_0x294d9f[_0x51db61(0x186)](_0xcf6961[_0x51db61(0x1a2)](_0x31614d['id'])));_0x2ba1a2['push'](_0x1a17c0);if(_0x31614d['children']&&_0x31614d[_0x51db61(0x19e)][_0x51db61(0x1a9)]>0x0){let _0x1b5e9e;if(_0x27979a===0x0)_0x1b5e9e='';else _0xcf6961[_0x51db61(0x1a4)]?_0x1b5e9e=_0x300712+(_0x3dbb2c?_0x51db61(0x185):a116_0x294d9f[_0x51db61(0x18a)]('│')+_0x51db61(0x196)):_0x1b5e9e=_0x300712+_0xcf6961['indent'];const _0x5add5d=formatTree(_0x31614d[_0x51db61(0x19e)],_0xcf6961,_0x27979a+0x1,_0x1b5e9e);_0x2ba1a2[_0x51db61(0x190)](_0x5add5d);}}return _0x2ba1a2[_0x51db61(0x1a8)]('\x0a');}export function formatFlatList(_0x2c4872,_0x2e17e6,_0x4cbbe3={}){const _0x92317b=a116_0x5d7e,_0x29032b={...DEFAULT_OPTIONS,..._0x4cbbe3},_0x33177b=[];for(const _0x37f13c of _0x2c4872){_0x33177b[_0x92317b(0x190)]({'name':_0x37f13c[_0x92317b(0x19f)],'icon':_0x29032b[_0x92317b(0x198)]?'📁':'','metadata':undefined});}for(const _0x2756fa of _0x2e17e6){const _0x14f9a3=_0x29032b[_0x92317b(0x18b)]&&_0x2756fa['population']!==undefined?a116_0x294d9f['dim']('\x20('+formatRows(_0x2756fa['population'])+')'):'',_0x205b8f=_0x29032b[_0x92317b(0x191)]&&_0x29032b[_0x92317b(0x1a2)]?_0x29032b[_0x92317b(0x1a2)](_0x2756fa['id']):undefined;_0x33177b[_0x92317b(0x190)]({'name':_0x2756fa['name'],'icon':_0x29032b[_0x92317b(0x198)]?'🎯':'','metadata':_0x14f9a3,'url':_0x205b8f});}_0x33177b['sort']((_0x1622d4,_0x1f1fc9)=>_0x1622d4[_0x92317b(0x19f)][_0x92317b(0x183)](_0x1f1fc9['name']));if(_0x33177b[_0x92317b(0x1a9)]===0x0)return _0x92317b(0x195);const _0x19b5b4=_0x33177b['map'](_0x4dacbb=>{const _0x25b8ac=_0x92317b,_0xe64c32=_0x4dacbb[_0x25b8ac(0x1a6)]?_0x4dacbb[_0x25b8ac(0x1a6)]+'\x20':'',_0x386ab3=_0x4dacbb[_0x25b8ac(0x197)]||'',_0x28cd90=_0x4dacbb[_0x25b8ac(0x18d)]?'\x20'+a116_0x294d9f[_0x25b8ac(0x186)](_0x4dacbb['url']):'';return''+_0xe64c32+_0x4dacbb['name']+_0x386ab3+_0x28cd90;});return _0x19b5b4[_0x92317b(0x1a8)]('\x0a');}function a116_0x5d7e(_0x184a23,_0x3f17e8){_0x184a23=_0x184a23-0x183;const _0x307fe0=a116_0x307f();let _0x5d7e2c=_0x307fe0[_0x184a23];return _0x5d7e2c;}function a116_0x307f(){const _0x44bbbb=['population','📁\x20','🎯\x20','dim','showMetadata','segmentCount','url','2029152qECHQS','1689308HmEPol','push','showUrl','26352090RFlxoI','3386810uGsrDa','273BdhKWK','(empty)','\x20\x20\x20','metadata','showIcons','sort','└──\x20','89372rhbAKW','2ADmwdk','2781774GRRQBH','children','name','folderCount','segment','getSegmentUrl','6RxCcKj','showTreeLines','type','icon','116502zSSxOt','join','length','localeCompare','\x20folder','\x20\x20\x20\x20','cyan'];a116_0x307f=function(){return _0x44bbbb;};return a116_0x307f();}
1
+ (function(_0x1604aa,_0x4c81a7){const _0x3a5496=a116_0x8345,_0xb36f1e=_0x1604aa();while(!![]){try{const _0x4dc428=parseInt(_0x3a5496(0xed))/0x1+-parseInt(_0x3a5496(0xcc))/0x2*(-parseInt(_0x3a5496(0xd7))/0x3)+-parseInt(_0x3a5496(0xf2))/0x4*(-parseInt(_0x3a5496(0xd0))/0x5)+-parseInt(_0x3a5496(0xce))/0x6+parseInt(_0x3a5496(0xd5))/0x7*(-parseInt(_0x3a5496(0xe6))/0x8)+-parseInt(_0x3a5496(0xf3))/0x9*(parseInt(_0x3a5496(0xf4))/0xa)+-parseInt(_0x3a5496(0xe8))/0xb*(-parseInt(_0x3a5496(0xf5))/0xc);if(_0x4dc428===_0x4c81a7)break;else _0xb36f1e['push'](_0xb36f1e['shift']());}catch(_0x29eee3){_0xb36f1e['push'](_0xb36f1e['shift']());}}}(a116_0x4f7e,0x66b52));function a116_0x8345(_0x53ebfb,_0x4b8f75){_0x53ebfb=_0x53ebfb-0xcc;const _0x4f7e0a=a116_0x4f7e();let _0x8345da=_0x4f7e0a[_0x53ebfb];return _0x8345da;}function a116_0x4f7e(){const _0x16c5ea=['2284308UJbRDs','└──\x20','690OqHlRs','indent','map','📁\x20','cyan','993727QxlTeJ','showUrl','15dYnPwZ','showTreeLines','folder','segmentCount','url','🎯\x20','type','segment','metadata','dim','\x20segment','showIcons','localeCompare','\x20\x20\x20\x20','\x20folder','40dcgvHj','\x20\x20\x20','297bweaJF','getSegmentUrl','sort','name','folderCount','215327InPSjH','children','population','length','showMetadata','5008CQLmWY','45693TRKSjX','1010PEDDAT','576852qgeJWy','├──\x20','push','135188YYjGsq','join'];a116_0x4f7e=function(){return _0x16c5ea;};return a116_0x4f7e();}import{formatRows}from'./formatters.js';import a116_0x2c93a1 from'chalk';const DEFAULT_OPTIONS={'showTreeLines':!![],'showIcons':!![],'showMetadata':!![],'indent':'\x20\x20','showUrl':![],'getSegmentUrl':undefined};export function formatTree(_0x470c5c,_0x303493={},_0x3643b2=0x0,_0x160a7b=''){const _0x2d7b2a=a116_0x8345,_0x2b2cc4={...DEFAULT_OPTIONS,..._0x303493},_0x3c4860=[],_0x46c15d=[..._0x470c5c][_0x2d7b2a(0xea)]((_0x2b2418,_0x1eec8c)=>_0x2b2418['name']['localeCompare'](_0x1eec8c[_0x2d7b2a(0xeb)]));for(let _0x5730fc=0x0;_0x5730fc<_0x46c15d[_0x2d7b2a(0xf0)];_0x5730fc++){const _0x1c29ad=_0x46c15d[_0x5730fc],_0x4120f4=_0x5730fc===_0x46c15d[_0x2d7b2a(0xf0)]-0x1;let _0x14ca04='';_0x3643b2>0x0&&(_0x14ca04+=_0x160a7b);_0x2b2cc4[_0x2d7b2a(0xd8)]&&_0x3643b2>0x0&&(_0x14ca04+=a116_0x2c93a1[_0x2d7b2a(0xe0)](_0x4120f4?_0x2d7b2a(0xcf):_0x2d7b2a(0xf6)));_0x2b2cc4['showIcons']&&(_0x14ca04+=_0x1c29ad[_0x2d7b2a(0xdd)]===_0x2d7b2a(0xd9)?_0x2d7b2a(0xd3):_0x2d7b2a(0xdc));_0x14ca04+=_0x1c29ad[_0x2d7b2a(0xeb)];if(_0x2b2cc4[_0x2d7b2a(0xf1)]){if(_0x1c29ad[_0x2d7b2a(0xdd)]===_0x2d7b2a(0xd9)){const _0x4e73b8=[];_0x1c29ad['metadata'][_0x2d7b2a(0xda)]&&_0x4e73b8['push'](_0x1c29ad[_0x2d7b2a(0xdf)][_0x2d7b2a(0xda)]+_0x2d7b2a(0xe1)+(_0x1c29ad[_0x2d7b2a(0xdf)][_0x2d7b2a(0xda)]!==0x1?'s':'')),_0x1c29ad[_0x2d7b2a(0xdf)][_0x2d7b2a(0xec)]&&_0x4e73b8[_0x2d7b2a(0xf7)](_0x1c29ad[_0x2d7b2a(0xdf)][_0x2d7b2a(0xec)]+_0x2d7b2a(0xe5)+(_0x1c29ad['metadata'][_0x2d7b2a(0xec)]!==0x1?'s':'')),_0x4e73b8[_0x2d7b2a(0xf0)]>0x0&&(_0x14ca04+=a116_0x2c93a1['dim']('\x20('+_0x4e73b8[_0x2d7b2a(0xcd)](',\x20')+')'));}else _0x1c29ad['type']===_0x2d7b2a(0xde)&&_0x1c29ad['population']!==undefined&&(_0x14ca04+=a116_0x2c93a1[_0x2d7b2a(0xe0)]('\x20('+formatRows(_0x1c29ad[_0x2d7b2a(0xef)])+')'));}_0x2b2cc4['showUrl']&&_0x2b2cc4[_0x2d7b2a(0xe9)]&&_0x1c29ad['type']===_0x2d7b2a(0xde)&&(_0x14ca04+='\x20'+a116_0x2c93a1[_0x2d7b2a(0xd4)](_0x2b2cc4[_0x2d7b2a(0xe9)](_0x1c29ad['id'])));_0x3c4860[_0x2d7b2a(0xf7)](_0x14ca04);if(_0x1c29ad['children']&&_0x1c29ad[_0x2d7b2a(0xee)][_0x2d7b2a(0xf0)]>0x0){let _0x4f109e;if(_0x3643b2===0x0)_0x4f109e='';else _0x2b2cc4[_0x2d7b2a(0xd8)]?_0x4f109e=_0x160a7b+(_0x4120f4?_0x2d7b2a(0xe4):a116_0x2c93a1[_0x2d7b2a(0xe0)]('│')+_0x2d7b2a(0xe7)):_0x4f109e=_0x160a7b+_0x2b2cc4[_0x2d7b2a(0xd1)];const _0x21cd17=formatTree(_0x1c29ad['children'],_0x2b2cc4,_0x3643b2+0x1,_0x4f109e);_0x3c4860[_0x2d7b2a(0xf7)](_0x21cd17);}}return _0x3c4860[_0x2d7b2a(0xcd)]('\x0a');}export function formatFlatList(_0x3fd4cb,_0x31033b,_0x343231={}){const _0x5e57bd=a116_0x8345,_0x4ba4c1={...DEFAULT_OPTIONS,..._0x343231},_0xe35baa=[];for(const _0x59c9f8 of _0x3fd4cb){_0xe35baa[_0x5e57bd(0xf7)]({'name':_0x59c9f8['name'],'icon':_0x4ba4c1[_0x5e57bd(0xe2)]?'📁':'','metadata':undefined});}for(const _0x5e4caa of _0x31033b){const _0x26ee96=_0x4ba4c1[_0x5e57bd(0xf1)]&&_0x5e4caa[_0x5e57bd(0xef)]!==undefined?a116_0x2c93a1[_0x5e57bd(0xe0)]('\x20('+formatRows(_0x5e4caa['population'])+')'):'',_0x148e63=_0x4ba4c1[_0x5e57bd(0xd6)]&&_0x4ba4c1[_0x5e57bd(0xe9)]?_0x4ba4c1['getSegmentUrl'](_0x5e4caa['id']):undefined;_0xe35baa['push']({'name':_0x5e4caa[_0x5e57bd(0xeb)],'icon':_0x4ba4c1['showIcons']?'🎯':'','metadata':_0x26ee96,'url':_0x148e63});}_0xe35baa[_0x5e57bd(0xea)]((_0x2faed1,_0x381c5f)=>_0x2faed1[_0x5e57bd(0xeb)][_0x5e57bd(0xe3)](_0x381c5f['name']));if(_0xe35baa[_0x5e57bd(0xf0)]===0x0)return'(empty)';const _0x31cf77=_0xe35baa[_0x5e57bd(0xd2)](_0x1e694c=>{const _0x2b1167=_0x5e57bd,_0x59963f=_0x1e694c['icon']?_0x1e694c['icon']+'\x20':'',_0xa330d8=_0x1e694c[_0x2b1167(0xdf)]||'',_0x3f3cf2=_0x1e694c[_0x2b1167(0xdb)]?'\x20'+a116_0x2c93a1[_0x2b1167(0xd4)](_0x1e694c['url']):'';return''+_0x59963f+_0x1e694c[_0x2b1167(0xeb)]+_0xa330d8+_0x3f3cf2;});return _0x31cf77[_0x5e57bd(0xcd)]('\x0a');}
@@ -1 +1 @@
1
- const a117_0x41b971=a117_0x4c82;(function(_0x1cca7e,_0x4b48d6){const _0x2e1685=a117_0x4c82,_0xca14=_0x1cca7e();while(!![]){try{const _0x4ce917=parseInt(_0x2e1685(0x132))/0x1*(parseInt(_0x2e1685(0x140))/0x2)+parseInt(_0x2e1685(0x123))/0x3+-parseInt(_0x2e1685(0x144))/0x4+-parseInt(_0x2e1685(0x143))/0x5*(-parseInt(_0x2e1685(0x136))/0x6)+-parseInt(_0x2e1685(0x135))/0x7+-parseInt(_0x2e1685(0x12e))/0x8+-parseInt(_0x2e1685(0x12f))/0x9;if(_0x4ce917===_0x4b48d6)break;else _0xca14['push'](_0xca14['shift']());}catch(_0xef6967){_0xca14['push'](_0xca14['shift']());}}}(a117_0xb0f8,0xb30cc));import{get}from'https';import{readFileSync,writeFileSync,mkdirSync}from'fs';import{join}from'path';import{gt,valid}from'semver';import a117_0x16062f from'chalk';import{getCacheDir}from'../core/config.js';const CACHE_DURATION_MS=0x18*0x3c*0x3c*0x3e8,NPM_REGISTRY_URL=a117_0x41b971(0x129),TIMEOUT_MS=0x7d0;function getCacheFilePath(){const _0x100449=getCacheDir();return join(_0x100449,'last_version_check');}function a117_0x4c82(_0x2aae28,_0x522dfc){_0x2aae28=_0x2aae28-0x123;const _0xb0f87=a117_0xb0f8();let _0x4c82cf=_0xb0f87[_0x2aae28];return _0x4c82cf;}function readCache(){const _0x50c03c=a117_0x41b971;try{const _0x382b0d=getCacheFilePath(),_0x498683=readFileSync(_0x382b0d,_0x50c03c(0x13c));return JSON['parse'](_0x498683);}catch{return null;}}function a117_0xb0f8(){const _0x48820d=['utf-8','yellow','dim','Run:','156242wTPEBK','isTTY','currentVersion','6205UYjyfa','158376BWOOqY','now','1484907Lppmys','env','green','statusCode','latestVersion','\x0aUpdate\x20available:\x20','https://registry.npmjs.org/@treasuredata/tdx/latest','cyan','write','NO_COLOR','\x0aRun:\x20','4624448zlnESR','2323845wprHAD','end','version','15CltMQb','destroy','npm\x20install\x20-g\x20@treasuredata/tdx@latest','5606300NKOPRk','3594WFdIdD','stringify','stderr','Update\x20available:','HTTP\x20','gray'];a117_0xb0f8=function(){return _0x48820d;};return a117_0xb0f8();}function writeCache(_0x3f627c){const _0x4efd21=a117_0x41b971;try{const _0x1b8659=getCacheDir();mkdirSync(_0x1b8659,{'recursive':!![]});const _0x462b9d={'lastCheck':new Date()['toISOString'](),'latestVersion':_0x3f627c},_0x2103a2=getCacheFilePath();writeFileSync(_0x2103a2,JSON[_0x4efd21(0x137)](_0x462b9d,null,0x2),_0x4efd21(0x13c));}catch{}}function isCacheValid(_0x5d172c){const _0x117cfc=a117_0x41b971;if(!_0x5d172c)return![];const _0x294aff=new Date(_0x5d172c['lastCheck'])['getTime'](),_0x243027=Date[_0x117cfc(0x145)]();return _0x243027-_0x294aff<CACHE_DURATION_MS;}function fetchLatestVersion(){return new Promise((_0x19e34a,_0x58c87d)=>{const _0x221fce=get(NPM_REGISTRY_URL,_0x465c00=>{const _0x18f133=a117_0x4c82;if(_0x465c00['statusCode']!==0xc8){clearTimeout(_0x23960e),_0x58c87d(new Error(_0x18f133(0x13a)+_0x465c00[_0x18f133(0x126)]));return;}let _0x3c82c3='';_0x465c00['on']('data',_0xa87bfd=>{_0x3c82c3+=_0xa87bfd;}),_0x465c00['on'](_0x18f133(0x130),()=>{const _0x40628c=_0x18f133;clearTimeout(_0x23960e);try{const _0x598dcc=JSON['parse'](_0x3c82c3);if(!valid(_0x598dcc[_0x40628c(0x131)])){_0x58c87d(new Error('Invalid\x20version\x20format'));return;}_0x19e34a(_0x598dcc['version']);}catch(_0x2194ee){_0x58c87d(_0x2194ee);}});})['on']('error',_0x450e40=>{clearTimeout(_0x23960e),_0x58c87d(_0x450e40);}),_0x23960e=setTimeout(()=>{const _0x1fcf3b=a117_0x4c82;_0x221fce[_0x1fcf3b(0x133)](),_0x58c87d(new Error('Request\x20timeout'));},TIMEOUT_MS);});}export async function checkForUpdate(_0x356d83){const _0x39e5b4=a117_0x41b971;try{const _0x271df2=readCache();if(isCacheValid(_0x271df2)){const _0x1483f2=gt(_0x271df2['latestVersion'],_0x356d83);return{'updateAvailable':_0x1483f2,'currentVersion':_0x356d83,'latestVersion':_0x271df2[_0x39e5b4(0x127)]};}const _0x41ce25=await fetchLatestVersion();writeCache(_0x41ce25);const _0x38823b=gt(_0x41ce25,_0x356d83);return{'updateAvailable':_0x38823b,'currentVersion':_0x356d83,'latestVersion':_0x41ce25};}catch{return null;}}export function displayUpdateNotification(_0x16c921){const _0x57cf01=a117_0x41b971;if(!_0x16c921['updateAvailable'])return;const _0x452380=process['stderr'][_0x57cf01(0x141)]&&!process[_0x57cf01(0x124)][_0x57cf01(0x12c)],_0x4bd3aa=_0x452380?a117_0x16062f[_0x57cf01(0x13b)]('→'):'→',_0x419919=_0x452380?a117_0x16062f['dim'](_0x16c921[_0x57cf01(0x142)]):_0x16c921['currentVersion'],_0x30b7bf=_0x452380?a117_0x16062f[_0x57cf01(0x125)](_0x16c921[_0x57cf01(0x127)]):_0x16c921[_0x57cf01(0x127)],_0x4502be=_0x452380?a117_0x16062f[_0x57cf01(0x12a)](_0x57cf01(0x134)):_0x57cf01(0x134),_0x3415fe=_0x452380?'\x0a'+a117_0x16062f[_0x57cf01(0x13d)](_0x57cf01(0x139))+'\x20'+_0x419919+'\x20'+_0x4bd3aa+'\x20'+_0x30b7bf+'\x0a'+a117_0x16062f[_0x57cf01(0x13e)](_0x57cf01(0x13f))+'\x20'+_0x4502be+'\x0a':_0x57cf01(0x128)+_0x419919+'\x20'+_0x4bd3aa+'\x20'+_0x30b7bf+_0x57cf01(0x12d)+_0x4502be+'\x0a';process[_0x57cf01(0x138)][_0x57cf01(0x12b)](_0x3415fe);}
1
+ const a117_0x217ae8=a117_0x14d9;(function(_0x4bf83a,_0x189582){const _0x27671d=a117_0x14d9,_0x40ce78=_0x4bf83a();while(!![]){try{const _0x30af0d=parseInt(_0x27671d(0x200))/0x1+-parseInt(_0x27671d(0x1fb))/0x2+-parseInt(_0x27671d(0x1e5))/0x3*(-parseInt(_0x27671d(0x1e3))/0x4)+-parseInt(_0x27671d(0x1ff))/0x5+parseInt(_0x27671d(0x1e4))/0x6+-parseInt(_0x27671d(0x1fc))/0x7*(-parseInt(_0x27671d(0x1ed))/0x8)+parseInt(_0x27671d(0x1f7))/0x9*(-parseInt(_0x27671d(0x204))/0xa);if(_0x30af0d===_0x189582)break;else _0x40ce78['push'](_0x40ce78['shift']());}catch(_0x35653d){_0x40ce78['push'](_0x40ce78['shift']());}}}(a117_0x5bff,0x1adff));import{get}from'https';function a117_0x5bff(){const _0x39c895=['1005336fDbbYI','9621wTtzOI','HTTP\x20','npm\x20install\x20-g\x20@treasuredata/tdx@latest','data','isTTY','utf-8','toISOString','https://registry.npmjs.org/@treasuredata/tdx/latest','43368SUVVkn','now','Run:','getTime','\x0aRun:\x20','gray','Invalid\x20version\x20format','yellow','write','currentVersion','11871zkrRqu','Request\x20timeout','Update\x20available:','statusCode','421976IAStMW','70OTaaMz','cyan','env','129955bFzxEE','89083bqWVzP','parse','version','green','1160uDmPqt','destroy','latestVersion','stderr','dim','\x0aUpdate\x20available:\x20','lastCheck','236FNupks'];a117_0x5bff=function(){return _0x39c895;};return a117_0x5bff();}import{readFileSync,writeFileSync,mkdirSync}from'fs';import{join}from'path';import{gt,valid}from'semver';import a117_0x54bb7c from'chalk';function a117_0x14d9(_0x38d201,_0x2631eb){_0x38d201=_0x38d201-0x1e2;const _0x5bffa3=a117_0x5bff();let _0x14d9e0=_0x5bffa3[_0x38d201];return _0x14d9e0;}import{getCacheDir}from'../core/config.js';const CACHE_DURATION_MS=0x18*0x3c*0x3c*0x3e8,NPM_REGISTRY_URL=a117_0x217ae8(0x1ec),TIMEOUT_MS=0x7d0;function getCacheFilePath(){const _0x4b1618=getCacheDir();return join(_0x4b1618,'last_version_check');}function readCache(){const _0x1429a7=a117_0x217ae8;try{const _0x54a8e2=getCacheFilePath(),_0x5abf6c=readFileSync(_0x54a8e2,_0x1429a7(0x1ea));return JSON[_0x1429a7(0x201)](_0x5abf6c);}catch{return null;}}function writeCache(_0x2913d9){const _0x36eb35=a117_0x217ae8;try{const _0x5f247c=getCacheDir();mkdirSync(_0x5f247c,{'recursive':!![]});const _0x142baa={'lastCheck':new Date()[_0x36eb35(0x1eb)](),'latestVersion':_0x2913d9},_0x4a0edf=getCacheFilePath();writeFileSync(_0x4a0edf,JSON['stringify'](_0x142baa,null,0x2),_0x36eb35(0x1ea));}catch{}}function isCacheValid(_0x556d60){const _0x2280a5=a117_0x217ae8;if(!_0x556d60)return![];const _0x358f66=new Date(_0x556d60[_0x2280a5(0x1e2)])[_0x2280a5(0x1f0)](),_0x3082a3=Date[_0x2280a5(0x1ee)]();return _0x3082a3-_0x358f66<CACHE_DURATION_MS;}function fetchLatestVersion(){return new Promise((_0x3b4bd7,_0x3db4db)=>{const _0x541de6=get(NPM_REGISTRY_URL,_0x490126=>{const _0x4cb700=a117_0x14d9;if(_0x490126['statusCode']!==0xc8){clearTimeout(_0x456d91),_0x3db4db(new Error(_0x4cb700(0x1e6)+_0x490126[_0x4cb700(0x1fa)]));return;}let _0x30a843='';_0x490126['on'](_0x4cb700(0x1e8),_0x3f0aac=>{_0x30a843+=_0x3f0aac;}),_0x490126['on']('end',()=>{const _0x46e810=_0x4cb700;clearTimeout(_0x456d91);try{const _0x1d2182=JSON[_0x46e810(0x201)](_0x30a843);if(!valid(_0x1d2182[_0x46e810(0x202)])){_0x3db4db(new Error(_0x46e810(0x1f3)));return;}_0x3b4bd7(_0x1d2182[_0x46e810(0x202)]);}catch(_0x25f403){_0x3db4db(_0x25f403);}});})['on']('error',_0x55de45=>{clearTimeout(_0x456d91),_0x3db4db(_0x55de45);}),_0x456d91=setTimeout(()=>{const _0x429c57=a117_0x14d9;_0x541de6[_0x429c57(0x205)](),_0x3db4db(new Error(_0x429c57(0x1f8)));},TIMEOUT_MS);});}export async function checkForUpdate(_0xf958d5){const _0x4ad6f7=a117_0x217ae8;try{const _0x597024=readCache();if(isCacheValid(_0x597024)){const _0x4f6fb4=gt(_0x597024[_0x4ad6f7(0x206)],_0xf958d5);return{'updateAvailable':_0x4f6fb4,'currentVersion':_0xf958d5,'latestVersion':_0x597024[_0x4ad6f7(0x206)]};}const _0x58fb1b=await fetchLatestVersion();writeCache(_0x58fb1b);const _0x2d458a=gt(_0x58fb1b,_0xf958d5);return{'updateAvailable':_0x2d458a,'currentVersion':_0xf958d5,'latestVersion':_0x58fb1b};}catch{return null;}}export function displayUpdateNotification(_0x150900){const _0x15a17a=a117_0x217ae8;if(!_0x150900['updateAvailable'])return;const _0x1e860a=process['stderr'][_0x15a17a(0x1e9)]&&!process[_0x15a17a(0x1fe)]['NO_COLOR'],_0x3f36d6=_0x1e860a?a117_0x54bb7c[_0x15a17a(0x1f2)]('→'):'→',_0x41ae57=_0x1e860a?a117_0x54bb7c[_0x15a17a(0x208)](_0x150900[_0x15a17a(0x1f6)]):_0x150900[_0x15a17a(0x1f6)],_0x24f448=_0x1e860a?a117_0x54bb7c[_0x15a17a(0x203)](_0x150900['latestVersion']):_0x150900[_0x15a17a(0x206)],_0x26af63=_0x1e860a?a117_0x54bb7c[_0x15a17a(0x1fd)](_0x15a17a(0x1e7)):_0x15a17a(0x1e7),_0x4c1d33=_0x1e860a?'\x0a'+a117_0x54bb7c[_0x15a17a(0x1f4)](_0x15a17a(0x1f9))+'\x20'+_0x41ae57+'\x20'+_0x3f36d6+'\x20'+_0x24f448+'\x0a'+a117_0x54bb7c[_0x15a17a(0x208)](_0x15a17a(0x1ef))+'\x20'+_0x26af63+'\x0a':_0x15a17a(0x209)+_0x41ae57+'\x20'+_0x3f36d6+'\x20'+_0x24f448+_0x15a17a(0x1f1)+_0x26af63+'\x0a';process[_0x15a17a(0x207)][_0x15a17a(0x1f5)](_0x4c1d33);}
@@ -1 +1 @@
1
- (function(_0x107f9b,_0xf3434c){const _0x2499c9=a118_0x29ab,_0x4a5b4b=_0x107f9b();while(!![]){try{const _0xa73d3b=-parseInt(_0x2499c9(0xa4))/0x1+parseInt(_0x2499c9(0xae))/0x2*(-parseInt(_0x2499c9(0xaf))/0x3)+parseInt(_0x2499c9(0xac))/0x4*(parseInt(_0x2499c9(0xa6))/0x5)+-parseInt(_0x2499c9(0xa7))/0x6+-parseInt(_0x2499c9(0xad))/0x7*(-parseInt(_0x2499c9(0xa3))/0x8)+-parseInt(_0x2499c9(0xab))/0x9*(parseInt(_0x2499c9(0xa5))/0xa)+parseInt(_0x2499c9(0xa9))/0xb*(parseInt(_0x2499c9(0xa8))/0xc);if(_0xa73d3b===_0xf3434c)break;else _0x4a5b4b['push'](_0x4a5b4b['shift']());}catch(_0x3a90be){_0x4a5b4b['push'](_0x4a5b4b['shift']());}}}(a118_0x451f,0xae8a0));export const WORKFLOW_FILE_EXTENSION='.dig';function a118_0x29ab(_0x4ac06b,_0x463887){_0x4ac06b=_0x4ac06b-0xa3;const _0x451ff3=a118_0x451f();let _0x29ab8a=_0x451ff3[_0x4ac06b];return _0x29ab8a;}function a118_0x451f(){const _0x40e03a=['922HveFvL','771VgMqoq','45208NhsLwO','377719iRGnaO','805520CDffds','492110hrKiiF','8199348GkHoly','9868956JvGYoJ','22nyWgic','.digdag','18Bloebh','44HypZus','14KOYAAU'];a118_0x451f=function(){return _0x40e03a;};return a118_0x451f();}export function shouldIncludeInArchive(_0x44e0c5){const _0x394ef5=a118_0x29ab;if(_0x44e0c5===_0x394ef5(0xaa))return!![];if(_0x44e0c5['startsWith']('.'))return![];return!![];}
1
+ function a118_0x42a4(){const _0x5681f1=['3853ZVYpSZ','96xDaIrK','4762870EhrAFF','.dig','24912jFzzLN','56367Zfqrpg','.digdag','7139000DLVGox','588RMWCsn','74494PKJEmX','7607240zteyQh','274LBjTJI','2079cqLBFp'];a118_0x42a4=function(){return _0x5681f1;};return a118_0x42a4();}const a118_0x5304c6=a118_0x18cd;(function(_0x58c855,_0xa0e19d){const _0x464d1e=a118_0x18cd,_0x4de4ed=_0x58c855();while(!![]){try{const _0x4f8691=-parseInt(_0x464d1e(0x1b7))/0x1*(-parseInt(_0x464d1e(0x1b5))/0x2)+parseInt(_0x464d1e(0x1bc))/0x3*(-parseInt(_0x464d1e(0x1b8))/0x4)+parseInt(_0x464d1e(0x1b9))/0x5+-parseInt(_0x464d1e(0x1bf))/0x6*(parseInt(_0x464d1e(0x1b3))/0x7)+parseInt(_0x464d1e(0x1bb))/0x8*(parseInt(_0x464d1e(0x1b6))/0x9)+-parseInt(_0x464d1e(0x1b4))/0xa+parseInt(_0x464d1e(0x1be))/0xb;if(_0x4f8691===_0xa0e19d)break;else _0x4de4ed['push'](_0x4de4ed['shift']());}catch(_0x1483ef){_0x4de4ed['push'](_0x4de4ed['shift']());}}}(a118_0x42a4,0x91111));function a118_0x18cd(_0x3185d2,_0x2efb1a){_0x3185d2=_0x3185d2-0x1b3;const _0x42a428=a118_0x42a4();let _0x18cdab=_0x42a428[_0x3185d2];return _0x18cdab;}export const WORKFLOW_FILE_EXTENSION=a118_0x5304c6(0x1ba);export function shouldIncludeInArchive(_0x1d211a){const _0x1bf2cb=a118_0x5304c6;if(_0x1d211a===_0x1bf2cb(0x1bd))return!![];if(_0x1d211a['startsWith']('.'))return![];return!![];}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@treasuredata/tdx",
3
- "version": "0.8.5",
3
+ "version": "0.8.7",
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": {