@treasuredata/tdx 0.14.6 → 0.14.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (143) hide show
  1. package/dist/bin.js +1 -1
  2. package/dist/build-info.json +3 -3
  3. package/dist/cli-categories.js +1 -1
  4. package/dist/cli.js +1 -1
  5. package/dist/commands/activations.js +1 -1
  6. package/dist/commands/agent-command.js +1 -1
  7. package/dist/commands/api-command.js +1 -1
  8. package/dist/commands/auth-command.js +1 -1
  9. package/dist/commands/chat-command.js +1 -1
  10. package/dist/commands/claude-command.d.ts.map +1 -1
  11. package/dist/commands/claude-command.js +1 -1
  12. package/dist/commands/claude-command.js.map +1 -1
  13. package/dist/commands/claude-statusline-command.js +1 -1
  14. package/dist/commands/claude-usage-command.js +1 -1
  15. package/dist/commands/command.js +1 -1
  16. package/dist/commands/connection-command.js +1 -1
  17. package/dist/commands/databases.js +1 -1
  18. package/dist/commands/describe.js +1 -1
  19. package/dist/commands/engage-command.js +1 -1
  20. package/dist/commands/job-command.js +1 -1
  21. package/dist/commands/journey-command.js +1 -1
  22. package/dist/commands/journey-validate-command.js +1 -1
  23. package/dist/commands/llm-command.js +1 -1
  24. package/dist/commands/llm-proxy.js +1 -1
  25. package/dist/commands/parent-segment-command.js +1 -1
  26. package/dist/commands/profile-command.js +1 -1
  27. package/dist/commands/profiles-command.js +1 -1
  28. package/dist/commands/query-command.js +1 -1
  29. package/dist/commands/segment-command.js +1 -1
  30. package/dist/commands/segment-create-command.js +1 -1
  31. package/dist/commands/segment-fields-command.js +1 -1
  32. package/dist/commands/segment-pull-command.js +1 -1
  33. package/dist/commands/segment-push-command.js +1 -1
  34. package/dist/commands/segment-update-command.js +1 -1
  35. package/dist/commands/segment-use-command.js +1 -1
  36. package/dist/commands/segment-validate-command.js +1 -1
  37. package/dist/commands/segments.js +1 -1
  38. package/dist/commands/show.js +1 -1
  39. package/dist/commands/tables.js +1 -1
  40. package/dist/commands/unset-command.js +1 -1
  41. package/dist/commands/use-command.js +1 -1
  42. package/dist/commands/user-command.js +1 -1
  43. package/dist/commands/workflow-command.js +1 -1
  44. package/dist/core/auth.js +1 -1
  45. package/dist/core/command-output.js +1 -1
  46. package/dist/core/config.js +1 -1
  47. package/dist/core/connection-cache.js +1 -1
  48. package/dist/core/constants.js +1 -1
  49. package/dist/core/credential-cache.js +1 -1
  50. package/dist/core/global-context.js +1 -1
  51. package/dist/core/keychain.js +1 -1
  52. package/dist/core/profile.js +1 -1
  53. package/dist/core/project-config.js +1 -1
  54. package/dist/core/session.js +1 -1
  55. package/dist/core/user-cache.js +1 -1
  56. package/dist/core/version.js +1 -1
  57. package/dist/index.js +1 -1
  58. package/dist/proxy/anthropic-adapter.js +1 -1
  59. package/dist/proxy/claude-usage-tracker.js +1 -1
  60. package/dist/proxy/context-signature.js +1 -1
  61. package/dist/proxy/conversation-utils.js +1 -1
  62. package/dist/proxy/passthrough-server.js +1 -1
  63. package/dist/proxy/server.js +1 -1
  64. package/dist/proxy/session-cache.js +1 -1
  65. package/dist/proxy/sse-usage-parser.js +1 -1
  66. package/dist/sdk/agent/agent-config.js +1 -1
  67. package/dist/sdk/agent/agent-ref-parser.js +1 -1
  68. package/dist/sdk/agent/agent-yaml.js +1 -1
  69. package/dist/sdk/api.js +1 -1
  70. package/dist/sdk/client/cdp-api-client.js +1 -1
  71. package/dist/sdk/client/endpoints.js +1 -1
  72. package/dist/sdk/client/engage-api-client.js +1 -1
  73. package/dist/sdk/client/http-client.d.ts.map +1 -1
  74. package/dist/sdk/client/http-client.js +1 -1
  75. package/dist/sdk/client/http-client.js.map +1 -1
  76. package/dist/sdk/client/llm-api-client.js +1 -1
  77. package/dist/sdk/client/rate-limiter.js +1 -1
  78. package/dist/sdk/client/td-api-client.js +1 -1
  79. package/dist/sdk/client/trino-api-client.js +1 -1
  80. package/dist/sdk/client/workflow-client.js +1 -1
  81. package/dist/sdk/connection-validator.js +1 -1
  82. package/dist/sdk/connection.js +1 -1
  83. package/dist/sdk/engage.js +1 -1
  84. package/dist/sdk/errors.js +1 -1
  85. package/dist/sdk/index.js +1 -1
  86. package/dist/sdk/io/index.js +1 -1
  87. package/dist/sdk/io/node-filesystem.js +1 -1
  88. package/dist/sdk/job.js +1 -1
  89. package/dist/sdk/journey.js +1 -1
  90. package/dist/sdk/llm/chat-cache.js +1 -1
  91. package/dist/sdk/llm/index.js +1 -1
  92. package/dist/sdk/llm/llm-backup-utils.js +1 -1
  93. package/dist/sdk/llm/model-aliases.js +1 -1
  94. package/dist/sdk/llm/model-factors.js +1 -1
  95. package/dist/sdk/query/index.js +1 -1
  96. package/dist/sdk/query/sql-parser.js +1 -1
  97. package/dist/sdk/segment/child-segment-yaml.js +1 -1
  98. package/dist/sdk/segment/fields-display.js +1 -1
  99. package/dist/sdk/segment/file-discovery.js +1 -1
  100. package/dist/sdk/segment/journey-utils.js +1 -1
  101. package/dist/sdk/segment/journey-yaml.js +1 -1
  102. package/dist/sdk/segment/parent-segment-preview.js +1 -1
  103. package/dist/sdk/segment/parent-segment-yaml.js +1 -1
  104. package/dist/sdk/segment/pull-workflow.js +1 -1
  105. package/dist/sdk/segment/push-workflow.js +1 -1
  106. package/dist/sdk/segment/resolution-context.js +1 -1
  107. package/dist/sdk/segment/segment-path-parser.js +1 -1
  108. package/dist/sdk/segment/segment-ref-parser.js +1 -1
  109. package/dist/sdk/segment/target-resolution.js +1 -1
  110. package/dist/sdk/segment/tdx-config.js +1 -1
  111. package/dist/sdk/segment/validate-files.js +1 -1
  112. package/dist/sdk/segment/yaml-validator.js +1 -1
  113. package/dist/sdk/segment.js +1 -1
  114. package/dist/sdk/types/index.js +1 -1
  115. package/dist/sdk/types/progress.js +1 -1
  116. package/dist/sdk/user.js +1 -1
  117. package/dist/sdk/util/format-detector.js +1 -1
  118. package/dist/sdk/util/formatters.js +1 -1
  119. package/dist/sdk/util/index.js +1 -1
  120. package/dist/sdk/util/tree-formatter.js +1 -1
  121. package/dist/sdk/workflow/clone-workflow.js +1 -1
  122. package/dist/sdk/workflow/index.js +1 -1
  123. package/dist/sdk/workflow/pull-workflow.js +1 -1
  124. package/dist/sdk/workflow/push-workflow.js +1 -1
  125. package/dist/sdk/workflow/tdx-config.js +1 -1
  126. package/dist/sdk/workflow/workflow-utils.js +1 -1
  127. package/dist/tdx +10 -0
  128. package/dist/utils/async.js +1 -1
  129. package/dist/utils/colors.js +1 -1
  130. package/dist/utils/diff.js +1 -1
  131. package/dist/utils/file-permissions.js +1 -1
  132. package/dist/utils/json-loader.js +1 -1
  133. package/dist/utils/option-validation.js +1 -1
  134. package/dist/utils/port.js +1 -1
  135. package/dist/utils/process.js +1 -1
  136. package/dist/utils/prompt.js +1 -1
  137. package/dist/utils/spinner.js +1 -1
  138. package/dist/utils/sse-parser.js +1 -1
  139. package/dist/utils/string-utils.js +1 -1
  140. package/dist/utils/table-ref-parser.js +1 -1
  141. package/dist/utils/tdx-logger.js +1 -1
  142. package/dist/utils/version-check.js +1 -1
  143. package/package.json +2 -2
@@ -1 +1 @@
1
- (function(_0x57d148,_0x34ab75){const _0x2c262b=a140_0x16a9,_0xd8fcb=_0x57d148();while(!![]){try{const _0x5b9a7b=-parseInt(_0x2c262b(0x96))/0x1+-parseInt(_0x2c262b(0x8f))/0x2*(-parseInt(_0x2c262b(0x88))/0x3)+-parseInt(_0x2c262b(0x87))/0x4+-parseInt(_0x2c262b(0x85))/0x5+-parseInt(_0x2c262b(0x92))/0x6+-parseInt(_0x2c262b(0x93))/0x7*(-parseInt(_0x2c262b(0x8e))/0x8)+-parseInt(_0x2c262b(0x90))/0x9*(-parseInt(_0x2c262b(0x8b))/0xa);if(_0x5b9a7b===_0x34ab75)break;else _0xd8fcb['push'](_0xd8fcb['shift']());}catch(_0x1963dc){_0xd8fcb['push'](_0xd8fcb['shift']());}}}(a140_0x55d6,0x8c48a));import*as a140_0x133e9b from'node:fs';function a140_0x55d6(){const _0x5374a7=['Warning:\x20Could\x20not\x20set\x20secure\x20permissions\x20on\x20','7172JHnCFx','writeFileSync','829445QgbEZJ','Should\x20be\x200600\x20or\x20more\x20restrictive.','1229160oyUUSE','76089ZtKXct','chmodSync','toString','20OMAxEt','statSync','warn','2616bSvFgd','6kXJXUl','5464350JREYlH','mkdirSync','6702168nsaEPr','18872JyoHEd','mode'];a140_0x55d6=function(){return _0x5374a7;};return a140_0x55d6();}import*as a140_0x2c4200 from'node:path';function a140_0x16a9(_0x265b0a,_0x3b7a0f){_0x265b0a=_0x265b0a-0x85;const _0x55d644=a140_0x55d6();let _0x16a9f7=_0x55d644[_0x265b0a];return _0x16a9f7;}export function setSecureFilePermissions(_0x38b640){const _0x17cbf3=a140_0x16a9;try{a140_0x133e9b[_0x17cbf3(0x89)](_0x38b640,0x180);}catch{console[_0x17cbf3(0x8d)](_0x17cbf3(0x95)+_0x38b640);}}export function setSecureDirectoryPermissions(_0x1339bf){const _0x25206d=a140_0x16a9;try{a140_0x133e9b[_0x25206d(0x89)](_0x1339bf,0x1c0);}catch{console[_0x25206d(0x8d)]('Warning:\x20Could\x20not\x20set\x20secure\x20permissions\x20on\x20'+_0x1339bf);}}export function createSecureDirectory(_0x3320c1){const _0xac12ff=a140_0x16a9;!a140_0x133e9b['existsSync'](_0x3320c1)&&(a140_0x133e9b[_0xac12ff(0x91)](_0x3320c1,{'recursive':!![],'mode':0x1c0}),setSecureDirectoryPermissions(_0x3320c1));}export function validateSecureFilePermissions(_0x268a40){const _0x5beda1=a140_0x16a9;try{const _0x1fe214=a140_0x133e9b[_0x5beda1(0x8c)](_0x268a40),_0x5c8062=_0x1fe214[_0x5beda1(0x94)]&0x1ff,_0x1b2f32=(_0x5c8062&0x3f)!==0x0;if(_0x1b2f32)return console['warn']('Warning:\x20'+_0x268a40+'\x20has\x20insecure\x20permissions\x20('+_0x5c8062[_0x5beda1(0x8a)](0x8)+').\x20'+_0x5beda1(0x86)),![];return!![];}catch{return!![];}}export function writeSecureFile(_0x23ab13,_0x56a1d2){const _0x117ab3=a140_0x16a9,_0xd95911=a140_0x2c4200['dirname'](_0x23ab13);createSecureDirectory(_0xd95911),a140_0x133e9b[_0x117ab3(0x97)](_0x23ab13,_0x56a1d2,{'mode':0x180}),setSecureFilePermissions(_0x23ab13);}
1
+ function a140_0x12f6(){const _0x4c3768=['31312FuGXTW','mode','\x20has\x20insecure\x20permissions\x20(','559746nOXSRS','existsSync','warn','2dwMFXn','169530BUIftP','Warning:\x20Could\x20not\x20set\x20secure\x20permissions\x20on\x20','writeFileSync','chmodSync','5077536rxEFPW','toString','10eDEHVF','1373826RCsptN','1782VHQdTS','mkdirSync','4323634mqEmWl','859373zzIcOF',').\x20'];a140_0x12f6=function(){return _0x4c3768;};return a140_0x12f6();}(function(_0x571b95,_0x5c43ab){const _0x1605e9=a140_0x1ace,_0x772a3d=_0x571b95();while(!![]){try{const _0x4a336e=-parseInt(_0x1605e9(0x171))/0x1*(parseInt(_0x1605e9(0x165))/0x2)+-parseInt(_0x1605e9(0x16d))/0x3+-parseInt(_0x1605e9(0x173))/0x4+parseInt(_0x1605e9(0x16c))/0x5*(parseInt(_0x1605e9(0x162))/0x6)+-parseInt(_0x1605e9(0x170))/0x7+-parseInt(_0x1605e9(0x16a))/0x8+-parseInt(_0x1605e9(0x16e))/0x9*(-parseInt(_0x1605e9(0x166))/0xa);if(_0x4a336e===_0x5c43ab)break;else _0x772a3d['push'](_0x772a3d['shift']());}catch(_0x480d95){_0x772a3d['push'](_0x772a3d['shift']());}}}(a140_0x12f6,0xebc93));import*as a140_0x4f382e from'node:fs';import*as a140_0x330af4 from'node:path';export function setSecureFilePermissions(_0x1e07f8){const _0x15057f=a140_0x1ace;try{a140_0x4f382e[_0x15057f(0x169)](_0x1e07f8,0x180);}catch{console[_0x15057f(0x164)]('Warning:\x20Could\x20not\x20set\x20secure\x20permissions\x20on\x20'+_0x1e07f8);}}export function setSecureDirectoryPermissions(_0xa7b34e){const _0x4581a4=a140_0x1ace;try{a140_0x4f382e[_0x4581a4(0x169)](_0xa7b34e,0x1c0);}catch{console[_0x4581a4(0x164)](_0x4581a4(0x167)+_0xa7b34e);}}function a140_0x1ace(_0x422f63,_0x5618cf){_0x422f63=_0x422f63-0x162;const _0x12f6e3=a140_0x12f6();let _0x1ace31=_0x12f6e3[_0x422f63];return _0x1ace31;}export function createSecureDirectory(_0x8494a2){const _0x29c05e=a140_0x1ace;!a140_0x4f382e[_0x29c05e(0x163)](_0x8494a2)&&(a140_0x4f382e[_0x29c05e(0x16f)](_0x8494a2,{'recursive':!![],'mode':0x1c0}),setSecureDirectoryPermissions(_0x8494a2));}export function validateSecureFilePermissions(_0x7216f3){const _0x2fdc1e=a140_0x1ace;try{const _0x2c848c=a140_0x4f382e['statSync'](_0x7216f3),_0x3bb6d1=_0x2c848c[_0x2fdc1e(0x174)]&0x1ff,_0x3ca6e1=(_0x3bb6d1&0x3f)!==0x0;if(_0x3ca6e1)return console['warn']('Warning:\x20'+_0x7216f3+_0x2fdc1e(0x175)+_0x3bb6d1[_0x2fdc1e(0x16b)](0x8)+_0x2fdc1e(0x172)+'Should\x20be\x200600\x20or\x20more\x20restrictive.'),![];return!![];}catch{return!![];}}export function writeSecureFile(_0x486b5e,_0x55c870){const _0x557177=a140_0x1ace,_0x1c4c40=a140_0x330af4['dirname'](_0x486b5e);createSecureDirectory(_0x1c4c40),a140_0x4f382e[_0x557177(0x168)](_0x486b5e,_0x55c870,{'mode':0x180}),setSecureFilePermissions(_0x486b5e);}
@@ -1 +1 @@
1
- (function(_0x58a6a1,_0x59afba){const _0x35098c=a141_0x48b3,_0x45f621=_0x58a6a1();while(!![]){try{const _0x57f298=parseInt(_0x35098c(0xb1))/0x1+parseInt(_0x35098c(0xb8))/0x2*(parseInt(_0x35098c(0xb3))/0x3)+-parseInt(_0x35098c(0xba))/0x4+parseInt(_0x35098c(0xbc))/0x5*(parseInt(_0x35098c(0xa7))/0x6)+parseInt(_0x35098c(0xaf))/0x7+parseInt(_0x35098c(0xb2))/0x8*(-parseInt(_0x35098c(0xa8))/0x9)+-parseInt(_0x35098c(0xb5))/0xa;if(_0x57f298===_0x59afba)break;else _0x45f621['push'](_0x45f621['shift']());}catch(_0x2757fe){_0x45f621['push'](_0x45f621['shift']());}}}(a141_0x1787,0xce666));import{readFile}from'fs/promises';import{SDKError,ErrorCode}from'../sdk/errors.js';function a141_0x48b3(_0x29b4bf,_0x115881){_0x29b4bf=_0x29b4bf-0xa7;const _0x1787f6=a141_0x1787();let _0x48b3d5=_0x1787f6[_0x29b4bf];return _0x48b3d5;}export async function loadJSON(_0x1f1976,_0x393453){const _0x3eeb87=a141_0x48b3;try{if(_0x393453){const _0x46006c=await readFile(_0x1f1976,'utf-8');try{return JSON[_0x3eeb87(0xbe)](_0x46006c);}catch(_0x105936){throw new SDKError(ErrorCode[_0x3eeb87(0xb0)],_0x3eeb87(0xbf)+_0x1f1976+_0x3eeb87(0xad)+(_0x105936 instanceof Error?_0x105936[_0x3eeb87(0xbd)]:String(_0x105936)));}}else try{return JSON[_0x3eeb87(0xbe)](_0x1f1976);}catch(_0x1d3fc2){throw new SDKError(ErrorCode[_0x3eeb87(0xb0)],_0x3eeb87(0xa9)+(_0x1d3fc2 instanceof Error?_0x1d3fc2[_0x3eeb87(0xbd)]:String(_0x1d3fc2)));}}catch(_0xe4f0a0){if(_0xe4f0a0 instanceof SDKError)throw _0xe4f0a0;if(_0xe4f0a0 instanceof Error&&'code'in _0xe4f0a0){const _0x11486d=_0xe4f0a0;if(_0x11486d[_0x3eeb87(0xac)]==='ENOENT')throw new SDKError(ErrorCode[_0x3eeb87(0xae)],_0x3eeb87(0xb9)+_0x1f1976);else{if(_0x11486d[_0x3eeb87(0xac)]===_0x3eeb87(0xb6))throw new SDKError(ErrorCode[_0x3eeb87(0xb7)],_0x3eeb87(0xab)+_0x1f1976);}}throw new SDKError(ErrorCode[_0x3eeb87(0xb4)],_0x3eeb87(0xbb)+(_0xe4f0a0 instanceof Error?_0xe4f0a0[_0x3eeb87(0xbd)]:String(_0xe4f0a0)));}}function a141_0x1787(){const _0x3cf481=['40bJWntZ','File\x20not\x20found:\x20','1623596fATSDx','Failed\x20to\x20load\x20JSON:\x20','5sHqGfH','message','parse','Invalid\x20JSON\x20in\x20file\x20\x27','7508652hSnbPA','129186JzDNCF','Invalid\x20JSON\x20string:\x20','Cannot\x20specify\x20both\x20inline\x20JSON\x20and\x20file\x20path.\x20Use\x20one\x20or\x20the\x20other.','Permission\x20denied\x20reading\x20file:\x20','code','\x27:\x20','NOT_FOUND','9041221IMHTkM','INVALID_ARGUMENT','1295875hvsocx','352oOBKdh','185781hqrEmM','INTERNAL','31945710LgAIXK','EACCES','PERMISSION_DENIED'];a141_0x1787=function(){return _0x3cf481;};return a141_0x1787();}export async function loadJSONFromOptions(_0x342ec5,_0x4ddc22){const _0x36ec52=a141_0x48b3;if(_0x342ec5&&_0x4ddc22)throw new SDKError(ErrorCode[_0x36ec52(0xb0)],_0x36ec52(0xaa));if(_0x342ec5)return await loadJSON(_0x342ec5,![]);if(_0x4ddc22)return await loadJSON(_0x4ddc22,!![]);return undefined;}
1
+ (function(_0x71c309,_0x11f24f){const _0x2b2c0d=a141_0x46f1,_0x53ccc3=_0x71c309();while(!![]){try{const _0x93f50a=parseInt(_0x2b2c0d(0x12f))/0x1+parseInt(_0x2b2c0d(0x12d))/0x2*(parseInt(_0x2b2c0d(0x13d))/0x3)+parseInt(_0x2b2c0d(0x135))/0x4+-parseInt(_0x2b2c0d(0x130))/0x5+-parseInt(_0x2b2c0d(0x136))/0x6*(parseInt(_0x2b2c0d(0x141))/0x7)+parseInt(_0x2b2c0d(0x137))/0x8*(parseInt(_0x2b2c0d(0x13a))/0x9)+parseInt(_0x2b2c0d(0x140))/0xa;if(_0x93f50a===_0x11f24f)break;else _0x53ccc3['push'](_0x53ccc3['shift']());}catch(_0x2d2bd2){_0x53ccc3['push'](_0x53ccc3['shift']());}}}(a141_0x2f1f,0xd5899));import{readFile}from'fs/promises';function a141_0x46f1(_0x39bb07,_0x24408b){_0x39bb07=_0x39bb07-0x12a;const _0x2f1ffe=a141_0x2f1f();let _0x46f17d=_0x2f1ffe[_0x39bb07];return _0x46f17d;}import{SDKError,ErrorCode}from'../sdk/errors.js';export async function loadJSON(_0x24ee2c,_0x2b4b9e){const _0x476f2c=a141_0x46f1;try{if(_0x2b4b9e){const _0x1e72c2=await readFile(_0x24ee2c,'utf-8');try{return JSON['parse'](_0x1e72c2);}catch(_0x38492c){throw new SDKError(ErrorCode[_0x476f2c(0x139)],_0x476f2c(0x132)+_0x24ee2c+_0x476f2c(0x13e)+(_0x38492c instanceof Error?_0x38492c[_0x476f2c(0x12b)]:String(_0x38492c)));}}else try{return JSON[_0x476f2c(0x12c)](_0x24ee2c);}catch(_0x192d66){throw new SDKError(ErrorCode[_0x476f2c(0x139)],_0x476f2c(0x131)+(_0x192d66 instanceof Error?_0x192d66[_0x476f2c(0x12b)]:String(_0x192d66)));}}catch(_0x407fb2){if(_0x407fb2 instanceof SDKError)throw _0x407fb2;if(_0x407fb2 instanceof Error&&'code'in _0x407fb2){const _0x5f2c55=_0x407fb2;if(_0x5f2c55[_0x476f2c(0x13c)]==='ENOENT')throw new SDKError(ErrorCode[_0x476f2c(0x12a)],_0x476f2c(0x13f)+_0x24ee2c);else{if(_0x5f2c55[_0x476f2c(0x13c)]==='EACCES')throw new SDKError(ErrorCode[_0x476f2c(0x12e)],_0x476f2c(0x134)+_0x24ee2c);}}throw new SDKError(ErrorCode[_0x476f2c(0x133)],_0x476f2c(0x13b)+(_0x407fb2 instanceof Error?_0x407fb2['message']:String(_0x407fb2)));}}export async function loadJSONFromOptions(_0x45dfbd,_0xbf34d7){const _0x1f96ab=a141_0x46f1;if(_0x45dfbd&&_0xbf34d7)throw new SDKError(ErrorCode[_0x1f96ab(0x139)],_0x1f96ab(0x138));if(_0x45dfbd)return await loadJSON(_0x45dfbd,![]);if(_0xbf34d7)return await loadJSON(_0xbf34d7,!![]);return undefined;}function a141_0x2f1f(){const _0x4b4318=['message','parse','1047636kTTpLg','PERMISSION_DENIED','301797xPlCKB','4640035wOgkhf','Invalid\x20JSON\x20string:\x20','Invalid\x20JSON\x20in\x20file\x20\x27','INTERNAL','Permission\x20denied\x20reading\x20file:\x20','2640032fCxDxC','6AvrnOh','40Fgusnu','Cannot\x20specify\x20both\x20inline\x20JSON\x20and\x20file\x20path.\x20Use\x20one\x20or\x20the\x20other.','INVALID_ARGUMENT','2225871bnlpno','Failed\x20to\x20load\x20JSON:\x20','code','6VYcIgk','\x27:\x20','File\x20not\x20found:\x20','800150aMawub','10663765iswxWk','NOT_FOUND'];a141_0x2f1f=function(){return _0x4b4318;};return a141_0x2f1f();}
@@ -1 +1 @@
1
- (function(_0x4df37a,_0x42f27c){const _0x5e6f43=a142_0x3508,_0x1e7dae=_0x4df37a();while(!![]){try{const _0x108c70=parseInt(_0x5e6f43(0x164))/0x1*(-parseInt(_0x5e6f43(0x16e))/0x2)+parseInt(_0x5e6f43(0x167))/0x3*(-parseInt(_0x5e6f43(0x165))/0x4)+-parseInt(_0x5e6f43(0x171))/0x5+parseInt(_0x5e6f43(0x16f))/0x6+parseInt(_0x5e6f43(0x16d))/0x7+-parseInt(_0x5e6f43(0x163))/0x8+parseInt(_0x5e6f43(0x16a))/0x9;if(_0x108c70===_0x42f27c)break;else _0x1e7dae['push'](_0x1e7dae['shift']());}catch(_0x48ed7e){_0x1e7dae['push'](_0x1e7dae['shift']());}}}(a142_0x89f3,0x98e8b));function a142_0x89f3(){const _0x5f56aa=['4HCpKfl','number','198393EFqfki','isInteger','.\x20Must\x20be\x20an\x20integer.','14685507tSepur','Invalid\x20limit\x20value:\x20','.\x20Must\x20be\x20a\x20positive\x20integer.','6031522wEICoR','740RGsZmn','6635220DojjIk','.\x20Must\x20be\x20a\x20number.','6160025EsuBzB','Invalid\x20timeout\x20value:\x20','7060944JFwfAp','2141BJzAsv'];a142_0x89f3=function(){return _0x5f56aa;};return a142_0x89f3();}export function validateLimitOption(_0x18f716){const _0x52b85b=a142_0x3508;if(!Number[_0x52b85b(0x168)](_0x18f716))return{'isValid':![],'error':_0x52b85b(0x16b)+_0x18f716+_0x52b85b(0x169)};if(_0x18f716<=0x0)return{'isValid':![],'error':_0x52b85b(0x16b)+_0x18f716+_0x52b85b(0x16c)};return{'isValid':!![],'value':_0x18f716};}function a142_0x3508(_0x4daa09,_0x59239f){_0x4daa09=_0x4daa09-0x163;const _0x89f37=a142_0x89f3();let _0x3508bb=_0x89f37[_0x4daa09];return _0x3508bb;}export function validateTimeoutOption(_0x2f9e16,_0x52433a=0x1e){const _0x58f263=a142_0x3508;if(_0x2f9e16===undefined)return{'isValid':!![],'value':_0x52433a};const _0x1acc9e=typeof _0x2f9e16===_0x58f263(0x166)?_0x2f9e16:parseFloat(_0x2f9e16);if(isNaN(_0x1acc9e))return{'isValid':![],'error':_0x58f263(0x172)+_0x2f9e16+_0x58f263(0x170)};if(_0x1acc9e<=0x0)return{'isValid':![],'error':'Invalid\x20timeout\x20value:\x20'+_0x1acc9e+'.\x20Must\x20be\x20a\x20positive\x20number.'};return{'isValid':!![],'value':_0x1acc9e};}
1
+ function a142_0x5f5a(_0xf442a1,_0x117e2b){_0xf442a1=_0xf442a1-0x6a;const _0x410f73=a142_0x410f();let _0x5f5a77=_0x410f73[_0xf442a1];return _0x5f5a77;}(function(_0x13049a,_0x108788){const _0x3907b0=a142_0x5f5a,_0x2877e1=_0x13049a();while(!![]){try{const _0xe003e6=parseInt(_0x3907b0(0x78))/0x1*(parseInt(_0x3907b0(0x71))/0x2)+parseInt(_0x3907b0(0x70))/0x3*(parseInt(_0x3907b0(0x79))/0x4)+-parseInt(_0x3907b0(0x77))/0x5*(-parseInt(_0x3907b0(0x76))/0x6)+-parseInt(_0x3907b0(0x6f))/0x7+parseInt(_0x3907b0(0x6b))/0x8*(parseInt(_0x3907b0(0x74))/0x9)+parseInt(_0x3907b0(0x6c))/0xa+-parseInt(_0x3907b0(0x6d))/0xb*(parseInt(_0x3907b0(0x73))/0xc);if(_0xe003e6===_0x108788)break;else _0x2877e1['push'](_0x2877e1['shift']());}catch(_0x2e9461){_0x2877e1['push'](_0x2877e1['shift']());}}}(a142_0x410f,0x7fb9b));export function validateLimitOption(_0x9097ea){const _0x4b4f82=a142_0x5f5a;if(!Number[_0x4b4f82(0x6a)](_0x9097ea))return{'isValid':![],'error':_0x4b4f82(0x6e)+_0x9097ea+'.\x20Must\x20be\x20an\x20integer.'};if(_0x9097ea<=0x0)return{'isValid':![],'error':'Invalid\x20limit\x20value:\x20'+_0x9097ea+'.\x20Must\x20be\x20a\x20positive\x20integer.'};return{'isValid':!![],'value':_0x9097ea};}export function validateTimeoutOption(_0xf572ce,_0x2f86fd=0x1e){const _0x2cb849=a142_0x5f5a;if(_0xf572ce===undefined)return{'isValid':!![],'value':_0x2f86fd};const _0xd69606=typeof _0xf572ce==='number'?_0xf572ce:parseFloat(_0xf572ce);if(isNaN(_0xd69606))return{'isValid':![],'error':'Invalid\x20timeout\x20value:\x20'+_0xf572ce+'.\x20Must\x20be\x20a\x20number.'};if(_0xd69606<=0x0)return{'isValid':![],'error':_0x2cb849(0x72)+_0xd69606+_0x2cb849(0x75)};return{'isValid':!![],'value':_0xd69606};}function a142_0x410f(){const _0x5a7ce9=['8580yMrXMT','150ABDHto','271663BbtDAH','4Ajhlrs','isInteger','3291128VmlugF','5542930oXfTQB','2662286ckhtEz','Invalid\x20limit\x20value:\x20','6384938xEXlJS','376239uupbcF','4JopTqb','Invalid\x20timeout\x20value:\x20','12pdfWDj','9sXEdwQ','.\x20Must\x20be\x20a\x20positive\x20number.'];a142_0x410f=function(){return _0x5a7ce9;};return a142_0x410f();}
@@ -1 +1 @@
1
- (function(_0x3230a6,_0x26b5a8){const _0x4b0417=a143_0x21c7,_0x27ba61=_0x3230a6();while(!![]){try{const _0x3f6b94=parseInt(_0x4b0417(0xfe))/0x1*(parseInt(_0x4b0417(0x104))/0x2)+parseInt(_0x4b0417(0x101))/0x3+-parseInt(_0x4b0417(0x107))/0x4+parseInt(_0x4b0417(0x109))/0x5+-parseInt(_0x4b0417(0xfd))/0x6+parseInt(_0x4b0417(0xfc))/0x7*(parseInt(_0x4b0417(0x108))/0x8)+parseInt(_0x4b0417(0xff))/0x9*(-parseInt(_0x4b0417(0x10b))/0xa);if(_0x3f6b94===_0x26b5a8)break;else _0x27ba61['push'](_0x27ba61['shift']());}catch(_0x2ee1a7){_0x27ba61['push'](_0x27ba61['shift']());}}}(a143_0x4c56,0xa6db4));import{createServer}from'node:net';export async function isPortAvailable(_0x3babcb){return new Promise(_0x273688=>{const _0x3fbbc2=a143_0x21c7,_0x4e453e=createServer();_0x4e453e[_0x3fbbc2(0x106)](_0x3fbbc2(0x10d),_0x51ea4d=>{const _0x572458=_0x3fbbc2;_0x51ea4d[_0x572458(0x10a)]==='EADDRINUSE'?_0x273688(![]):_0x273688(![]);}),_0x4e453e['once'](_0x3fbbc2(0x10c),()=>{const _0x594833=_0x3fbbc2;_0x4e453e[_0x594833(0x105)](),_0x273688(!![]);}),_0x4e453e[_0x3fbbc2(0x102)](_0x3babcb,'0.0.0.0');});}function a143_0x21c7(_0x58989e,_0x16daaf){_0x58989e=_0x58989e-0xfc;const _0x4c5683=a143_0x4c56();let _0x21c7d4=_0x4c5683[_0x58989e];return _0x21c7d4;}function a143_0x4c56(){const _0x53082b=['listen','\x20and\x20','6KhRSBj','close','once','2718004QSSGuL','1368088KPZehT','5687660dAZOpt','code','350Vjguqy','listening','error','28ntpjQU','1715040kyJyfD','210619WxMJve','426546qhtgJN','No\x20available\x20port\x20found\x20between\x20','2562426DOvzJH'];a143_0x4c56=function(){return _0x53082b;};return a143_0x4c56();}export async function findAvailablePort(_0xa10ee9=0xfa0,_0x449793=0x64){const _0x15a964=a143_0x21c7;for(let _0x560ce0=0x0;_0x560ce0<_0x449793;_0x560ce0++){const _0x2651b1=_0xa10ee9+_0x560ce0;if(await isPortAvailable(_0x2651b1))return _0x2651b1;}throw new Error(_0x15a964(0x100)+_0xa10ee9+_0x15a964(0x103)+(_0xa10ee9+_0x449793-0x1));}
1
+ function a143_0x4a78(){const _0x22539e=['140IPjwna','244744MpxFCl','1476423TXWsln','0.0.0.0','42888ogVHtI','EADDRINUSE','code','once','listening','3665776mpchJa','5192052ZoiBOo','44tVciwb','No\x20available\x20port\x20found\x20between\x20','error','2209955aQNTHy','2090604NuaYQT'];a143_0x4a78=function(){return _0x22539e;};return a143_0x4a78();}(function(_0x442ca0,_0xb9c520){const _0x205d57=a143_0x4961,_0x8ac71e=_0x442ca0();while(!![]){try{const _0x573209=-parseInt(_0x205d57(0x7c))/0x1*(parseInt(_0x205d57(0x83))/0x2)+-parseInt(_0x205d57(0x77))/0x3+parseInt(_0x205d57(0x81))/0x4+-parseInt(_0x205d57(0x86))/0x5+parseInt(_0x205d57(0x82))/0x6+-parseInt(_0x205d57(0x78))/0x7*(-parseInt(_0x205d57(0x79))/0x8)+parseInt(_0x205d57(0x7a))/0x9;if(_0x573209===_0xb9c520)break;else _0x8ac71e['push'](_0x8ac71e['shift']());}catch(_0x1c75c6){_0x8ac71e['push'](_0x8ac71e['shift']());}}}(a143_0x4a78,0x740a2));function a143_0x4961(_0x511c6d,_0x565ff8){_0x511c6d=_0x511c6d-0x77;const _0x4a7820=a143_0x4a78();let _0x496103=_0x4a7820[_0x511c6d];return _0x496103;}import{createServer}from'node:net';export async function isPortAvailable(_0x5a601f){return new Promise(_0xf72ff8=>{const _0x255fe0=a143_0x4961,_0x2b9fb9=createServer();_0x2b9fb9[_0x255fe0(0x7f)](_0x255fe0(0x85),_0x142753=>{const _0x5d2ef5=_0x255fe0;_0x142753[_0x5d2ef5(0x7e)]===_0x5d2ef5(0x7d)?_0xf72ff8(![]):_0xf72ff8(![]);}),_0x2b9fb9[_0x255fe0(0x7f)](_0x255fe0(0x80),()=>{_0x2b9fb9['close'](),_0xf72ff8(!![]);}),_0x2b9fb9['listen'](_0x5a601f,_0x255fe0(0x7b));});}export async function findAvailablePort(_0x2e1d9e=0xfa0,_0xda0925=0x64){const _0x489ac0=a143_0x4961;for(let _0x52f11f=0x0;_0x52f11f<_0xda0925;_0x52f11f++){const _0x1d1602=_0x2e1d9e+_0x52f11f;if(await isPortAvailable(_0x1d1602))return _0x1d1602;}throw new Error(_0x489ac0(0x84)+_0x2e1d9e+'\x20and\x20'+(_0x2e1d9e+_0xda0925-0x1));}
@@ -1 +1 @@
1
- const a144_0x36d3c8=a144_0x4724;(function(_0x46a8ee,_0x31902c){const _0x3dbfb2=a144_0x4724,_0x4107bf=_0x46a8ee();while(!![]){try{const _0x3c4ffc=parseInt(_0x3dbfb2(0x9b))/0x1+-parseInt(_0x3dbfb2(0x9f))/0x2*(-parseInt(_0x3dbfb2(0x9c))/0x3)+-parseInt(_0x3dbfb2(0x86))/0x4+parseInt(_0x3dbfb2(0xb0))/0x5*(parseInt(_0x3dbfb2(0x98))/0x6)+-parseInt(_0x3dbfb2(0xab))/0x7+parseInt(_0x3dbfb2(0x9e))/0x8+-parseInt(_0x3dbfb2(0x85))/0x9;if(_0x3c4ffc===_0x31902c)break;else _0x4107bf['push'](_0x4107bf['shift']());}catch(_0x2a3ddf){_0x4107bf['push'](_0x4107bf['shift']());}}}(a144_0x3389,0xc0c58));import{execSync,spawn}from'node:child_process';const SHELL_NAMES=new Set(['bash',a144_0x36d3c8(0x80),'sh',a144_0x36d3c8(0x87),a144_0x36d3c8(0x97),a144_0x36d3c8(0xb3),'csh',a144_0x36d3c8(0xa2),a144_0x36d3c8(0x8d),a144_0x36d3c8(0x8a),'nu',a144_0x36d3c8(0x81),'elvish',a144_0x36d3c8(0x91)]),EPHEMERAL_SHELL_SPAWNERS=new Set([a144_0x36d3c8(0x89),a144_0x36d3c8(0x96),a144_0x36d3c8(0xad)]);function getProcessInfoWindows(_0xf00e0e){const _0x3b27d4=a144_0x36d3c8;try{if(!Number[_0x3b27d4(0x83)](_0xf00e0e)||_0xf00e0e<=0x0)return null;const _0x53f628=_0x3b27d4(0xa4)+_0xf00e0e+_0x3b27d4(0xa9),_0xa429c0=execSync(_0x3b27d4(0xaf)+_0x53f628+'\x22',{'encoding':_0x3b27d4(0xaa),'windowsHide':!![],'stdio':[_0x3b27d4(0x93),_0x3b27d4(0x93),'pipe']})[_0x3b27d4(0xa6)]();if(!_0xa429c0)return null;const [_0x513121,..._0x1718c8]=_0xa429c0[_0x3b27d4(0xa8)](','),_0x49d98e=parseInt(_0x513121,0xa),_0x484475=_0x1718c8[_0x3b27d4(0x7d)](',')[_0x3b27d4(0xa6)]();if(isNaN(_0x49d98e)||!_0x484475)return null;return{'pid':_0xf00e0e,'ppid':_0x49d98e,'comm':_0x484475[_0x3b27d4(0xb2)](/\.exe$/i,'')};}catch{return null;}}function getProcessInfoPosix(_0x508ded){const _0x5bde7b=a144_0x36d3c8;try{const _0x201a0f=0x400000;if(!Number[_0x5bde7b(0x83)](_0x508ded)||_0x508ded<=0x0||_0x508ded>_0x201a0f)return null;const _0x380e8f=execSync(_0x5bde7b(0x8b)+_0x508ded+'\x20-o\x20ppid=,comm=',{'encoding':_0x5bde7b(0xaa),'stdio':'pipe'})['trim'](),[_0x1f2e21,..._0x3dbd26]=_0x380e8f[_0x5bde7b(0xa8)](/\s+/),_0x148364=parseInt(_0x1f2e21,0xa),_0x198d68=_0x3dbd26[_0x5bde7b(0x7d)]('\x20');if(isNaN(_0x148364))return null;return{'pid':_0x508ded,'ppid':_0x148364,'comm':_0x198d68};}catch{return null;}}function a144_0x4724(_0x2fbf8a,_0x1e3372){_0x2fbf8a=_0x2fbf8a-0x7c;const _0x33895a=a144_0x3389();let _0x4724c2=_0x33895a[_0x2fbf8a];return _0x4724c2;}function getProcessInfo(_0x28423d){const _0x252c7f=a144_0x36d3c8;if(process[_0x252c7f(0x90)]===_0x252c7f(0xae))return getProcessInfoWindows(_0x28423d);return getProcessInfoPosix(_0x28423d);}function getBasename(_0x469eba){const _0x598487=a144_0x36d3c8;return _0x469eba[_0x598487(0xb2)](/^-/,'')[_0x598487(0xa8)]('/')[_0x598487(0x82)]()?.[_0x598487(0xac)]()||'';}function isShell(_0x25bb5f){const _0x233c79=a144_0x36d3c8;return SHELL_NAMES[_0x233c79(0xb5)](getBasename(_0x25bb5f));}function isEphemeralShellSpawner(_0x4c2014){const _0x252433=a144_0x36d3c8;return EPHEMERAL_SHELL_SPAWNERS[_0x252433(0xb5)](getBasename(_0x4c2014));}let cachedShellPID;function findShellPID(){const _0x1891e0=a144_0x36d3c8;if(process[_0x1891e0(0x7e)]===undefined)return process[_0x1891e0(0x95)];let _0x16c41e=process['ppid'];const _0x2e0037=0xa;let _0x526571=0x0;while(_0x526571<_0x2e0037){const _0x19b8f4=getProcessInfo(_0x16c41e);if(!_0x19b8f4)break;if(isShell(_0x19b8f4[_0x1891e0(0xa1)])){const _0x2bfe30=getProcessInfo(_0x19b8f4[_0x1891e0(0x7e)]);if(_0x2bfe30&&isEphemeralShellSpawner(_0x2bfe30[_0x1891e0(0xa1)])){_0x16c41e=_0x19b8f4[_0x1891e0(0x7e)],_0x526571++;continue;}return _0x19b8f4['pid'];}if(_0x19b8f4[_0x1891e0(0x7e)]===0x0||_0x19b8f4['ppid']===0x1){if(isShell(_0x19b8f4['comm']))return _0x19b8f4[_0x1891e0(0x95)];break;}_0x16c41e=_0x19b8f4['ppid'],_0x526571++;}return process[_0x1891e0(0x7e)]!==undefined?process[_0x1891e0(0x7e)]:process[_0x1891e0(0x95)];}export function getPPID(){return cachedShellPID===undefined&&(cachedShellPID=findShellPID()),cachedShellPID;}export function clearPPIDCache(){cachedShellPID=undefined;}export function isProcessRunning(_0x36bcae){const _0x2bc779=a144_0x36d3c8;if(!Number[_0x2bc779(0x83)](_0x36bcae)||_0x36bcae<=0x0)return![];try{return process[_0x2bc779(0x88)](_0x36bcae,0x0),!![];}catch{return![];}}function a144_0x3389(){const _0x5a3b46=['isInteger','Invalid\x20URL:\x20','10736433PdkhGg','3682356mtkThj','fish','kill','claude','powershell','ps\x20-p\x20','toString','pwsh','data','ignore','platform','xonsh','darwin','pipe','xdg-open','pid','code','ksh','18EWnlUW','protocol','open','1519434soEyCs','22407PTVOEe','cmd.exe','4550992klndwJ','82dHXRGX','stdout','comm','dash','where.exe','Get-CimInstance\x20Win32_Process\x20-Filter\x20\x22ProcessId=','which','trim','https:','split','\x22\x20|\x20Select-Object\x20-Property\x20ParentProcessId,Name\x20|\x20ForEach-Object\x20{\x20\x22$($_.ParentProcessId),$($_.Name)\x22\x20}','utf-8','4265142ZzASgB','toLowerCase','cursor','win32','powershell.exe\x20-NoProfile\x20-NonInteractive\x20-Command\x20\x22','1863145JmUHLo','test','replace','tcsh','http:','has','href','map','join','ppid','unref','zsh','ion','pop'];a144_0x3389=function(){return _0x5a3b46;};return a144_0x3389();}export function openBrowser(_0xcd6c33){const _0x57b5bf=a144_0x36d3c8;let _0x5b248a;try{_0x5b248a=new URL(_0xcd6c33);}catch{throw new Error(_0x57b5bf(0x84)+_0xcd6c33);}if(_0x5b248a[_0x57b5bf(0x99)]!==_0x57b5bf(0xb4)&&_0x5b248a[_0x57b5bf(0x99)]!==_0x57b5bf(0xa7))throw new Error('Unsupported\x20protocol:\x20'+_0x5b248a[_0x57b5bf(0x99)]);const _0xacf2ed=_0x5b248a[_0x57b5bf(0xb6)],_0x14c440=process[_0x57b5bf(0x90)];if(_0x14c440===_0x57b5bf(0xae))spawn(_0x57b5bf(0x9d),['/c','start','',_0xacf2ed],{'detached':!![],'stdio':'ignore'})[_0x57b5bf(0x7f)]();else{const _0x31ce6c=_0x14c440===_0x57b5bf(0x92)?_0x57b5bf(0x9a):_0x57b5bf(0x94);spawn(_0x31ce6c,[_0xacf2ed],{'detached':!![],'stdio':_0x57b5bf(0x8f)})[_0x57b5bf(0x7f)]();}}export function isWindows(){const _0x31b04e=a144_0x36d3c8;return process['platform']===_0x31b04e(0xae);}export function getCrossSpawnOptions(_0x579b05){return{..._0x579b05??{},'shell':isWindows()};}export function escapeWindowsArg(_0x1c2256){const _0x4b9b75=a144_0x36d3c8;if(!/[ \t"&|<>^%!`\r\n]/[_0x4b9b75(0xb1)](_0x1c2256))return _0x1c2256;const _0x4be46f=_0x1c2256['replace'](/"/g,'\x22\x22');return'\x22'+_0x4be46f+'\x22';}export function crossSpawn(_0x281322,_0x682bdc,_0x5c72c4){const _0x1f12f1=a144_0x36d3c8;if(isWindows()){const _0x169f0c=escapeWindowsArg(_0x281322),_0x3b417c=_0x682bdc[_0x1f12f1(0x7c)](escapeWindowsArg),_0x524afc=[_0x169f0c,..._0x3b417c][_0x1f12f1(0x7d)]('\x20');return spawn(_0x524afc,[],{..._0x5c72c4,'shell':!![]});}return spawn(_0x281322,_0x682bdc,{..._0x5c72c4,'shell':![]});}export function findExecutable(_0xc48c29,_0x596966=0x1388){return new Promise(_0x2a30bb=>{const _0x4b4dc8=a144_0x4724,_0x32067f=isWindows()?_0x4b4dc8(0xa3):_0x4b4dc8(0xa5);let _0x312ddc=![];const _0x516869=crossSpawn(_0x32067f,[_0xc48c29],{'stdio':_0x4b4dc8(0x93)}),_0x18efb1=setTimeout(()=>{const _0x3662a7=_0x4b4dc8;!_0x312ddc&&(_0x312ddc=!![],_0x516869[_0x3662a7(0x88)](),_0x2a30bb(null));},_0x596966);let _0x481992='';_0x516869[_0x4b4dc8(0xa0)]?.['on'](_0x4b4dc8(0x8e),_0x117461=>{const _0x8fe9a4=_0x4b4dc8;_0x481992+=_0x117461[_0x8fe9a4(0x8c)]();}),_0x516869['stderr']?.['on'](_0x4b4dc8(0x8e),()=>{}),_0x516869['on']('exit',_0x6ce733=>{const _0x35d719=_0x4b4dc8;if(_0x312ddc)return;_0x312ddc=!![],clearTimeout(_0x18efb1);if(_0x6ce733===0x0&&_0x481992[_0x35d719(0xa6)]()){const _0x2e479e=_0x481992['trim']()['split'](/\r?\n/)[0x0];_0x2a30bb(_0x2e479e);}else _0x2a30bb(null);}),_0x516869['on']('error',()=>{if(_0x312ddc)return;_0x312ddc=!![],clearTimeout(_0x18efb1),_0x2a30bb(null);});});}
1
+ const a144_0x4396d2=a144_0x4bec;(function(_0x41191b,_0x41a063){const _0x953afc=a144_0x4bec,_0x5e8c46=_0x41191b();while(!![]){try{const _0x41c7f0=-parseInt(_0x953afc(0x1ed))/0x1+-parseInt(_0x953afc(0x202))/0x2*(-parseInt(_0x953afc(0x21e))/0x3)+-parseInt(_0x953afc(0x213))/0x4+parseInt(_0x953afc(0x1fb))/0x5*(parseInt(_0x953afc(0x209))/0x6)+parseInt(_0x953afc(0x21c))/0x7*(-parseInt(_0x953afc(0x1fd))/0x8)+-parseInt(_0x953afc(0x1f5))/0x9*(parseInt(_0x953afc(0x1f0))/0xa)+-parseInt(_0x953afc(0x20b))/0xb*(-parseInt(_0x953afc(0x225))/0xc);if(_0x41c7f0===_0x41a063)break;else _0x5e8c46['push'](_0x5e8c46['shift']());}catch(_0x5ebb69){_0x5e8c46['push'](_0x5e8c46['shift']());}}}(a144_0x543b,0x452f6));import{execSync,spawn}from'node:child_process';function a144_0x4bec(_0x2a8bd4,_0x22b326){_0x2a8bd4=_0x2a8bd4-0x1ed;const _0x543b1b=a144_0x543b();let _0x4bece9=_0x543b1b[_0x2a8bd4];return _0x4bece9;}const SHELL_NAMES=new Set([a144_0x4396d2(0x21a),a144_0x4396d2(0x201),'sh','fish',a144_0x4396d2(0x1f7),a144_0x4396d2(0x20a),a144_0x4396d2(0x1fe),'dash',a144_0x4396d2(0x208),a144_0x4396d2(0x21f),'nu','ion',a144_0x4396d2(0x20e),a144_0x4396d2(0x1f8)]),EPHEMERAL_SHELL_SPAWNERS=new Set(['claude',a144_0x4396d2(0x1f4),a144_0x4396d2(0x20c)]);function getProcessInfoWindows(_0x81d1b6){const _0x3b7bd4=a144_0x4396d2;try{if(!Number[_0x3b7bd4(0x1fc)](_0x81d1b6)||_0x81d1b6<=0x0)return null;const _0x181b6f=_0x3b7bd4(0x207)+_0x81d1b6+_0x3b7bd4(0x1f3),_0x4eef2d=execSync('powershell.exe\x20-NoProfile\x20-NonInteractive\x20-Command\x20\x22'+_0x181b6f+'\x22',{'encoding':'utf-8','windowsHide':!![],'stdio':[_0x3b7bd4(0x217),_0x3b7bd4(0x217),_0x3b7bd4(0x217)]})[_0x3b7bd4(0x1ef)]();if(!_0x4eef2d)return null;const [_0x35459c,..._0x40941b]=_0x4eef2d[_0x3b7bd4(0x223)](','),_0x4cd401=parseInt(_0x35459c,0xa),_0x4d9ba8=_0x40941b[_0x3b7bd4(0x21b)](',')[_0x3b7bd4(0x1ef)]();if(isNaN(_0x4cd401)||!_0x4d9ba8)return null;return{'pid':_0x81d1b6,'ppid':_0x4cd401,'comm':_0x4d9ba8['replace'](/\.exe$/i,'')};}catch{return null;}}function getProcessInfoPosix(_0x1492c2){const _0x365531=a144_0x4396d2;try{const _0x442dcb=0x400000;if(!Number['isInteger'](_0x1492c2)||_0x1492c2<=0x0||_0x1492c2>_0x442dcb)return null;const _0x2e977d=execSync(_0x365531(0x212)+_0x1492c2+'\x20-o\x20ppid=,comm=',{'encoding':'utf-8','stdio':_0x365531(0x217)})[_0x365531(0x1ef)](),[_0x484846,..._0x14c4ac]=_0x2e977d['split'](/\s+/),_0x246ef7=parseInt(_0x484846,0xa),_0x13cc09=_0x14c4ac[_0x365531(0x21b)]('\x20');if(isNaN(_0x246ef7))return null;return{'pid':_0x1492c2,'ppid':_0x246ef7,'comm':_0x13cc09};}catch{return null;}}function getProcessInfo(_0x1c90c8){const _0x29a3f8=a144_0x4396d2;if(process[_0x29a3f8(0x214)]==='win32')return getProcessInfoWindows(_0x1c90c8);return getProcessInfoPosix(_0x1c90c8);}function getBasename(_0x111dee){const _0x5ea946=a144_0x4396d2;return _0x111dee[_0x5ea946(0x1f1)](/^-/,'')[_0x5ea946(0x223)]('/')[_0x5ea946(0x20f)]()?.[_0x5ea946(0x215)]()||'';}function isShell(_0x3f860d){const _0x2d6aad=a144_0x4396d2;return SHELL_NAMES[_0x2d6aad(0x200)](getBasename(_0x3f860d));}function isEphemeralShellSpawner(_0x24553f){const _0x3e00da=a144_0x4396d2;return EPHEMERAL_SHELL_SPAWNERS[_0x3e00da(0x200)](getBasename(_0x24553f));}let cachedShellPID;function findShellPID(){const _0x3fc24c=a144_0x4396d2;if(process[_0x3fc24c(0x220)]===undefined)return process[_0x3fc24c(0x21d)];let _0x1e9e63=process['ppid'];const _0x447d6e=0xa;let _0x3a8ec4=0x0;while(_0x3a8ec4<_0x447d6e){const _0x2a7a9f=getProcessInfo(_0x1e9e63);if(!_0x2a7a9f)break;if(isShell(_0x2a7a9f[_0x3fc24c(0x1ee)])){const _0xb2c94c=getProcessInfo(_0x2a7a9f['ppid']);if(_0xb2c94c&&isEphemeralShellSpawner(_0xb2c94c['comm'])){_0x1e9e63=_0x2a7a9f[_0x3fc24c(0x220)],_0x3a8ec4++;continue;}return _0x2a7a9f[_0x3fc24c(0x21d)];}if(_0x2a7a9f[_0x3fc24c(0x220)]===0x0||_0x2a7a9f[_0x3fc24c(0x220)]===0x1){if(isShell(_0x2a7a9f[_0x3fc24c(0x1ee)]))return _0x2a7a9f['pid'];break;}_0x1e9e63=_0x2a7a9f['ppid'],_0x3a8ec4++;}return process[_0x3fc24c(0x220)]!==undefined?process['ppid']:process[_0x3fc24c(0x21d)];}function a144_0x543b(){const _0xf744=['comm','trim','169010aWlkIc','replace','data','\x22\x20|\x20Select-Object\x20-Property\x20ParentProcessId,Name\x20|\x20ForEach-Object\x20{\x20\x22$($_.ParentProcessId),$($_.Name)\x22\x20}','code','207onaFzT','xdg-open','ksh','xonsh','exit','href','114575qqknlO','isInteger','224miXQKI','csh','open','has','zsh','565496KWuERo','ignore','darwin','kill','test','Get-CimInstance\x20Win32_Process\x20-Filter\x20\x22ProcessId=','pwsh','6moZcSF','tcsh','13367211FhBLJN','cursor','toString','elvish','pop','start','Unsupported\x20protocol:\x20','ps\x20-p\x20','1370184YFhxOH','platform','toLowerCase','win32','pipe','protocol','stderr','bash','join','39802oppSUe','pid','3qbfUjZ','powershell','ppid','map','unref','split','cmd.exe','12KSNXzm','347005jSYynf'];a144_0x543b=function(){return _0xf744;};return a144_0x543b();}export function getPPID(){return cachedShellPID===undefined&&(cachedShellPID=findShellPID()),cachedShellPID;}export function clearPPIDCache(){cachedShellPID=undefined;}export function isProcessRunning(_0x4dfc5f){const _0x3c089e=a144_0x4396d2;if(!Number[_0x3c089e(0x1fc)](_0x4dfc5f)||_0x4dfc5f<=0x0)return![];try{return process[_0x3c089e(0x205)](_0x4dfc5f,0x0),!![];}catch{return![];}}export function openBrowser(_0xe7ce93){const _0x34ab9d=a144_0x4396d2;let _0xff94a2;try{_0xff94a2=new URL(_0xe7ce93);}catch{throw new Error('Invalid\x20URL:\x20'+_0xe7ce93);}if(_0xff94a2[_0x34ab9d(0x218)]!=='http:'&&_0xff94a2['protocol']!=='https:')throw new Error(_0x34ab9d(0x211)+_0xff94a2['protocol']);const _0x272d12=_0xff94a2[_0x34ab9d(0x1fa)],_0x3a6b98=process[_0x34ab9d(0x214)];if(_0x3a6b98==='win32')spawn(_0x34ab9d(0x224),['/c',_0x34ab9d(0x210),'',_0x272d12],{'detached':!![],'stdio':_0x34ab9d(0x203)})[_0x34ab9d(0x222)]();else{const _0x5b1de5=_0x3a6b98===_0x34ab9d(0x204)?_0x34ab9d(0x1ff):_0x34ab9d(0x1f6);spawn(_0x5b1de5,[_0x272d12],{'detached':!![],'stdio':_0x34ab9d(0x203)})['unref']();}}export function isWindows(){const _0x59f4c7=a144_0x4396d2;return process['platform']===_0x59f4c7(0x216);}export function getCrossSpawnOptions(_0x2b0ce8){return{..._0x2b0ce8??{},'shell':isWindows()};}export function escapeWindowsArg(_0x26bcff){const _0xb8822=a144_0x4396d2;if(!/[ \t"&|<>^%!`\r\n]/[_0xb8822(0x206)](_0x26bcff))return _0x26bcff;const _0x2b7ccb=_0x26bcff['replace'](/"/g,'\x22\x22');return'\x22'+_0x2b7ccb+'\x22';}export function crossSpawn(_0x1ae3d6,_0xf757aa,_0x4811c1){const _0x119f77=a144_0x4396d2;if(isWindows()){const _0x3f37f7=escapeWindowsArg(_0x1ae3d6),_0x2f1a27=_0xf757aa[_0x119f77(0x221)](escapeWindowsArg),_0x4a70c4=[_0x3f37f7,..._0x2f1a27]['join']('\x20');return spawn(_0x4a70c4,[],{..._0x4811c1,'shell':!![]});}return spawn(_0x1ae3d6,_0xf757aa,{..._0x4811c1,'shell':![]});}export function findExecutable(_0xf91898,_0x27d6fe=0x1388){return new Promise(_0x493d07=>{const _0x34ff77=a144_0x4bec,_0xfea5a0=isWindows()?'where.exe':'which';let _0x2451a1=![];const _0x272134=crossSpawn(_0xfea5a0,[_0xf91898],{'stdio':_0x34ff77(0x217)}),_0x4d3e3f=setTimeout(()=>{!_0x2451a1&&(_0x2451a1=!![],_0x272134['kill'](),_0x493d07(null));},_0x27d6fe);let _0x5e9e71='';_0x272134['stdout']?.['on'](_0x34ff77(0x1f2),_0x473c1e=>{const _0x4e2e27=_0x34ff77;_0x5e9e71+=_0x473c1e[_0x4e2e27(0x20d)]();}),_0x272134[_0x34ff77(0x219)]?.['on'](_0x34ff77(0x1f2),()=>{}),_0x272134['on'](_0x34ff77(0x1f9),_0x994828=>{const _0x10b2c1=_0x34ff77;if(_0x2451a1)return;_0x2451a1=!![],clearTimeout(_0x4d3e3f);if(_0x994828===0x0&&_0x5e9e71[_0x10b2c1(0x1ef)]()){const _0x4b8f6c=_0x5e9e71[_0x10b2c1(0x1ef)]()[_0x10b2c1(0x223)](/\r?\n/)[0x0];_0x493d07(_0x4b8f6c);}else _0x493d07(null);}),_0x272134['on']('error',()=>{if(_0x2451a1)return;_0x2451a1=!![],clearTimeout(_0x4d3e3f),_0x493d07(null);});});}
@@ -1 +1 @@
1
- (function(_0x3f809,_0x589178){const _0x4ce184=a145_0x4832,_0x19b321=_0x3f809();while(!![]){try{const _0x2cd924=-parseInt(_0x4ce184(0x12e))/0x1+parseInt(_0x4ce184(0x12d))/0x2*(-parseInt(_0x4ce184(0x123))/0x3)+parseInt(_0x4ce184(0x120))/0x4*(-parseInt(_0x4ce184(0x128))/0x5)+parseInt(_0x4ce184(0x12a))/0x6+parseInt(_0x4ce184(0x125))/0x7+parseInt(_0x4ce184(0x130))/0x8+-parseInt(_0x4ce184(0x12c))/0x9*(-parseInt(_0x4ce184(0x121))/0xa);if(_0x2cd924===_0x589178)break;else _0x19b321['push'](_0x19b321['shift']());}catch(_0x1daaa0){_0x19b321['push'](_0x19b321['shift']());}}}(a145_0x1869,0x7bd73));import*as a145_0x119b1f from'readline';export async function confirm(_0xc9627e){const _0x4ab270=a145_0x4832,_0x45c47d=a145_0x119b1f[_0x4ab270(0x11f)]({'input':process[_0x4ab270(0x12f)],'output':process['stdout']});return new Promise(_0x41d8de=>{const _0x387a87=_0x4ab270;_0x45c47d['question'](_0xc9627e+_0x387a87(0x134),_0xabbaef=>{const _0x330ed1=_0x387a87;_0x45c47d['close'](),_0x41d8de(_0xabbaef['toLowerCase']()==='y'||_0xabbaef[_0x330ed1(0x132)]()==='yes');});});}function a145_0x1869(){const _0x2b8e3c=['8020eqYmom','251632xXKtnO','stdin','5060856spjhWI','resume','toLowerCase','pause','\x20(y/N):\x20','\x20[y/N]\x20','removeListener','createInterface','40ETdPso','50FDisoS','exit','237aUrffD','setRawMode','4825681WnLwKO','data','utf8','417880LwCUpd','stderr','1641558SQOywG','write','568530frdLEQ'];a145_0x1869=function(){return _0x2b8e3c;};return a145_0x1869();}function a145_0x4832(_0x33a57d,_0x28e9f4){_0x33a57d=_0x33a57d-0x11e;const _0x186910=a145_0x1869();let _0x483225=_0x186910[_0x33a57d];return _0x483225;}export async function confirmKey(_0x5d5ac8){const _0x228138=a145_0x4832;if(!process['stdin']['isTTY'])return![];return process[_0x228138(0x129)][_0x228138(0x12b)](_0x5d5ac8+_0x228138(0x135)),new Promise(_0x24f45e=>{const _0x137ea3=_0x228138,_0x13f317=process['stdin'];_0x13f317[_0x137ea3(0x124)](!![]),_0x13f317[_0x137ea3(0x131)](),_0x13f317['setEncoding'](_0x137ea3(0x127));const _0x37a98b=_0x18ad84=>{const _0x2ba4ae=_0x137ea3;_0x13f317[_0x2ba4ae(0x124)](![]),_0x13f317[_0x2ba4ae(0x133)](),_0x13f317[_0x2ba4ae(0x11e)](_0x2ba4ae(0x126),_0x37a98b);if(_0x18ad84==='\x1b'){process[_0x2ba4ae(0x129)][_0x2ba4ae(0x12b)]('\x0a'),_0x24f45e(![]);return;}_0x18ad84==='\x03'&&(process[_0x2ba4ae(0x129)][_0x2ba4ae(0x12b)]('\x0a'),process[_0x2ba4ae(0x122)](0x82));if(_0x18ad84[_0x2ba4ae(0x132)]()==='y'){process[_0x2ba4ae(0x129)][_0x2ba4ae(0x12b)]('y\x0a'),_0x24f45e(!![]);return;}process[_0x2ba4ae(0x129)][_0x2ba4ae(0x12b)]('\x0a'),_0x24f45e(![]);};_0x13f317['on'](_0x137ea3(0x126),_0x37a98b);});}
1
+ function a145_0x1c53(_0x28d81d,_0x5280a2){_0x28d81d=_0x28d81d-0xec;const _0x4a00c1=a145_0x4a00();let _0x1c5316=_0x4a00c1[_0x28d81d];return _0x1c5316;}(function(_0x1403ac,_0x4e5165){const _0x50064c=a145_0x1c53,_0x5b81fd=_0x1403ac();while(!![]){try{const _0x30b570=-parseInt(_0x50064c(0xed))/0x1+-parseInt(_0x50064c(0xfc))/0x2*(-parseInt(_0x50064c(0xfa))/0x3)+parseInt(_0x50064c(0xec))/0x4*(parseInt(_0x50064c(0xff))/0x5)+-parseInt(_0x50064c(0xf9))/0x6+parseInt(_0x50064c(0xf1))/0x7*(-parseInt(_0x50064c(0xf8))/0x8)+-parseInt(_0x50064c(0x102))/0x9+parseInt(_0x50064c(0xef))/0xa;if(_0x30b570===_0x4e5165)break;else _0x5b81fd['push'](_0x5b81fd['shift']());}catch(_0x19a78c){_0x5b81fd['push'](_0x5b81fd['shift']());}}}(a145_0x4a00,0x87bd7));import*as a145_0x1e6a21 from'readline';export async function confirm(_0x5f3882){const _0x390660=a145_0x1c53,_0x1a9b76=a145_0x1e6a21['createInterface']({'input':process['stdin'],'output':process[_0x390660(0xfe)]});return new Promise(_0x129c7f=>{const _0x5d54d7=_0x390660;_0x1a9b76[_0x5d54d7(0xf2)](_0x5f3882+_0x5d54d7(0x103),_0x41f722=>{const _0x38ec62=_0x5d54d7;_0x1a9b76['close'](),_0x129c7f(_0x41f722[_0x38ec62(0xfb)]()==='y'||_0x41f722[_0x38ec62(0xfb)]()===_0x38ec62(0xfd));});});}export async function confirmKey(_0x49dd85){const _0x220a0a=a145_0x1c53;if(!process[_0x220a0a(0xf3)]['isTTY'])return![];return process['stderr'][_0x220a0a(0xf0)](_0x49dd85+_0x220a0a(0xf7)),new Promise(_0x395fe3=>{const _0x1aa3e3=_0x220a0a,_0x41f7ff=process[_0x1aa3e3(0xf3)];_0x41f7ff['setRawMode'](!![]),_0x41f7ff[_0x1aa3e3(0x104)](),_0x41f7ff[_0x1aa3e3(0xee)](_0x1aa3e3(0xf6));const _0x4b3c19=_0x1b8701=>{const _0x115a59=_0x1aa3e3;_0x41f7ff[_0x115a59(0x100)](![]),_0x41f7ff['pause'](),_0x41f7ff['removeListener'](_0x115a59(0xf4),_0x4b3c19);if(_0x1b8701==='\x1b'){process[_0x115a59(0xf5)][_0x115a59(0xf0)]('\x0a'),_0x395fe3(![]);return;}_0x1b8701==='\x03'&&(process[_0x115a59(0xf5)][_0x115a59(0xf0)]('\x0a'),process[_0x115a59(0x101)](0x82));if(_0x1b8701[_0x115a59(0xfb)]()==='y'){process[_0x115a59(0xf5)][_0x115a59(0xf0)]('y\x0a'),_0x395fe3(!![]);return;}process[_0x115a59(0xf5)][_0x115a59(0xf0)]('\x0a'),_0x395fe3(![]);};_0x41f7ff['on'](_0x1aa3e3(0xf4),_0x4b3c19);});}function a145_0x4a00(){const _0x50073e=['utf8','\x20[y/N]\x20','8eaZsIS','6276756VlNihA','757698lAgLDO','toLowerCase','6tltYBf','yes','stdout','62095BYiFqD','setRawMode','exit','7557939qNFmid','\x20(y/N):\x20','resume','20lApAbQ','565204PmyLbX','setEncoding','22096300HLYYrn','write','156317MlMyfA','question','stdin','data','stderr'];a145_0x4a00=function(){return _0x50073e;};return a145_0x4a00();}
@@ -1 +1 @@
1
- (function(_0x3d6419,_0x9b63ea){const _0x57d7e0=a146_0x5595,_0x283d4d=_0x3d6419();while(!![]){try{const _0x141d50=parseInt(_0x57d7e0(0x153))/0x1+parseInt(_0x57d7e0(0x14e))/0x2+parseInt(_0x57d7e0(0x162))/0x3*(parseInt(_0x57d7e0(0x168))/0x4)+parseInt(_0x57d7e0(0x157))/0x5*(parseInt(_0x57d7e0(0x169))/0x6)+-parseInt(_0x57d7e0(0x151))/0x7*(-parseInt(_0x57d7e0(0x164))/0x8)+parseInt(_0x57d7e0(0x165))/0x9*(-parseInt(_0x57d7e0(0x163))/0xa)+-parseInt(_0x57d7e0(0x15b))/0xb;if(_0x141d50===_0x9b63ea)break;else _0x283d4d['push'](_0x283d4d['shift']());}catch(_0x23fbf2){_0x283d4d['push'](_0x283d4d['shift']());}}}(a146_0x5cb1,0x6c61a));import a146_0x469a06 from'ora';import{isWindows}from'./process.js';const windowsSpinner={'interval':0x3e8,'frames':['•']};export function createCommandSpinner(_0x2c50eb,_0x232938={}){const _0x263665=a146_0x5595,{verbose:verbose=![],forceEnabled:forceEnabled=![]}=_0x232938;return a146_0x469a06({'text':_0x2c50eb,'color':_0x263665(0x14f),'stream':process['stderr'],'isEnabled':forceEnabled||process[_0x263665(0x158)]['isTTY']&&!verbose,...isWindows()&&{'spinner':windowsSpinner}});}export async function withSpinner(_0x23b09c,_0x5e5d82,_0x4f5642={}){const _0x18d719=a146_0x5595,_0x1a9b00=_0x4f5642[_0x18d719(0x150)]??(()=>Date[_0x18d719(0x15c)]()),_0x3cd466=createCommandSpinner(_0x23b09c,_0x4f5642);_0x3cd466['start']();const _0x5aaea9=_0x1a9b00();try{const _0x27f3d9=await _0x5e5d82(),_0x1181c7=_0x1a9b00()-_0x5aaea9;return _0x3cd466[_0x18d719(0x14d)](),{'data':_0x27f3d9,'elapsedMs':_0x1181c7};}catch(_0x46e575){_0x3cd466['stop']();throw _0x46e575;}}function a146_0x5cb1(){const _0xe96237=['start','isSpinning','45aDPnib','stderr','...','\x20[Job\x20ID:\x20','19159635HfVZnf','now','jobId','trim','Processing','floor','text','5517iPNfFI','20yhqvtq','824uqhAbp','674073OyZblr','extra','toFixed','1508HBbMRe','566004AadEJX','stop','249794nxbgXw','cyan','clock','33558lfnNqK','intervalFactory','174521HnVfnj','phase'];a146_0x5cb1=function(){return _0xe96237;};return a146_0x5cb1();}function a146_0x5595(_0x2b9f4c,_0x3761fe){_0x2b9f4c=_0x2b9f4c-0x14d;const _0x5cb1aa=a146_0x5cb1();let _0x559593=_0x5cb1aa[_0x2b9f4c];return _0x559593;}export async function withProgressSpinner(_0x388370,_0x163b58,_0x354faf={}){const _0x375bbb=a146_0x5595,_0xd14aa4=_0x354faf[_0x375bbb(0x150)]??(()=>Date[_0x375bbb(0x15c)]()),_0x585443=_0x354faf[_0x375bbb(0x152)]??setInterval,_0x4c7adb=createCommandSpinner(_0x388370,_0x354faf);_0x4c7adb[_0x375bbb(0x155)]();const _0x25c1ff=_0xd14aa4(),_0x1ec997=_0x388370['replace'](_0x375bbb(0x159),'')[_0x375bbb(0x15e)]()||_0x375bbb(0x15f),_0x402e73={};let _0x1530e0=_0x388370;const _0x4fb5fd=()=>{const _0x36eb21=_0x375bbb;if(!_0x4c7adb[_0x36eb21(0x156)])return;const _0x497d53=_0xd14aa4()-_0x25c1ff,_0x4970bf=formatElapsed(_0x497d53),_0x138d22=_0x402e73[_0x36eb21(0x154)]?.[_0x36eb21(0x15e)]()||_0x1ec997,_0x262ebd=_0x402e73[_0x36eb21(0x15d)]?_0x36eb21(0x15a)+_0x402e73[_0x36eb21(0x15d)]+']':'',_0xbd55d0=_0x402e73[_0x36eb21(0x166)]?'\x20'+_0x402e73[_0x36eb21(0x166)]:'',_0x4c8233=_0x138d22+'\x20'+_0x4970bf+_0xbd55d0+_0x262ebd;_0x4c8233!==_0x1530e0&&_0x4c8233[_0x36eb21(0x15e)]()&&(_0x4c7adb[_0x36eb21(0x161)]=_0x4c8233,_0x1530e0=_0x4c8233);},_0x2c542f=_0x585443(()=>{_0x4fb5fd();},0x3e8),_0x4e466b={'setPhase':_0x107c60=>{const _0x32fd9f=_0x375bbb;_0x402e73[_0x32fd9f(0x154)]=_0x107c60;const _0x508591=_0x107c60?.[_0x32fd9f(0x15e)]()||_0x1ec997,_0x16949d=_0xd14aa4()-_0x25c1ff,_0x5478f7=formatElapsed(_0x16949d),_0x22435=_0x402e73[_0x32fd9f(0x15d)]?_0x32fd9f(0x15a)+_0x402e73[_0x32fd9f(0x15d)]+']':'',_0x10ed2a=_0x402e73[_0x32fd9f(0x166)]?'\x20'+_0x402e73['extra']:'',_0xabaf68=_0x508591+'\x20'+_0x5478f7+_0x10ed2a+_0x22435;_0x4c7adb[_0x32fd9f(0x156)]&&_0xabaf68[_0x32fd9f(0x15e)]()&&(_0x4c7adb[_0x32fd9f(0x161)]=_0xabaf68,_0x1530e0=_0xabaf68);},'setJobId':_0x3eff1f=>{const _0x29e9cc=_0x375bbb;_0x402e73[_0x29e9cc(0x15d)]=_0x3eff1f,_0x4fb5fd();},'setExtra':_0x2c9a23=>{const _0x26f754=_0x375bbb;_0x402e73[_0x26f754(0x166)]=_0x2c9a23,_0x4fb5fd();}};_0x4fb5fd();try{const _0xf44858=await _0x163b58(_0x4e466b),_0x48f308=_0xd14aa4()-_0x25c1ff;return{'data':_0xf44858,'elapsedMs':_0x48f308};}finally{clearInterval(_0x2c542f),_0x4c7adb['stop']();}}export function formatElapsed(_0x1fd5d3){const _0x5d5f9d=a146_0x5595,_0x4d3414=Math[_0x5d5f9d(0x160)](_0x1fd5d3/0x3e8);if(_0x4d3414<0x3c)return(_0x1fd5d3/0x3e8)[_0x5d5f9d(0x167)](0x1)+'s';const _0x50636b=Math['floor'](_0x4d3414/0x3c),_0x4740f8=_0x4d3414%0x3c;if(_0x50636b<0x3c)return _0x50636b+'m\x20'+_0x4740f8+'s';const _0x5e7fdc=Math['floor'](_0x50636b/0x3c),_0x4eeed2=_0x50636b%0x3c;return _0x5e7fdc+'h\x20'+_0x4eeed2+'m';}
1
+ (function(_0x5827fd,_0x5e70a8){const _0x869871=a146_0x16fc,_0x2729df=_0x5827fd();while(!![]){try{const _0x13b29f=parseInt(_0x869871(0x124))/0x1+-parseInt(_0x869871(0x11d))/0x2*(parseInt(_0x869871(0x123))/0x3)+-parseInt(_0x869871(0x11f))/0x4+-parseInt(_0x869871(0x116))/0x5+-parseInt(_0x869871(0x115))/0x6+parseInt(_0x869871(0x122))/0x7+-parseInt(_0x869871(0x120))/0x8*(-parseInt(_0x869871(0x12b))/0x9);if(_0x13b29f===_0x5e70a8)break;else _0x2729df['push'](_0x2729df['shift']());}catch(_0x338256){_0x2729df['push'](_0x2729df['shift']());}}}(a146_0x251b,0x9aee1));import a146_0x32e4a0 from'ora';import{isWindows}from'./process.js';const windowsSpinner={'interval':0x3e8,'frames':['•']};export function createCommandSpinner(_0x1814f8,_0x523316={}){const _0x153ee5=a146_0x16fc,{verbose:verbose=![],forceEnabled:forceEnabled=![]}=_0x523316;return a146_0x32e4a0({'text':_0x1814f8,'color':_0x153ee5(0x128),'stream':process[_0x153ee5(0x117)],'isEnabled':forceEnabled||process[_0x153ee5(0x117)][_0x153ee5(0x12e)]&&!verbose,...isWindows()&&{'spinner':windowsSpinner}});}export async function withSpinner(_0x414808,_0x5c31cd,_0x13a6e7={}){const _0x4b3398=a146_0x16fc,_0x27d7ed=_0x13a6e7[_0x4b3398(0x125)]??(()=>Date[_0x4b3398(0x114)]()),_0x19f580=createCommandSpinner(_0x414808,_0x13a6e7);_0x19f580['start']();const _0x557029=_0x27d7ed();try{const _0x50efda=await _0x5c31cd(),_0x18a2e7=_0x27d7ed()-_0x557029;return _0x19f580[_0x4b3398(0x12d)](),{'data':_0x50efda,'elapsedMs':_0x18a2e7};}catch(_0x4b8968){_0x19f580[_0x4b3398(0x12d)]();throw _0x4b8968;}}export async function withProgressSpinner(_0x998606,_0x5beeb6,_0x484865={}){const _0x8e3542=a146_0x16fc,_0x27e3ec=_0x484865['clock']??(()=>Date[_0x8e3542(0x114)]()),_0x94198a=_0x484865[_0x8e3542(0x129)]??setInterval,_0x5585e5=createCommandSpinner(_0x998606,_0x484865);_0x5585e5['start']();const _0x3757a9=_0x27e3ec(),_0x1a168a=_0x998606[_0x8e3542(0x118)](_0x8e3542(0x11e),'')[_0x8e3542(0x12c)]()||'Processing',_0x4a13bb={};let _0x541be4=_0x998606;const _0x8dfd9a=()=>{const _0x3e7085=_0x8e3542;if(!_0x5585e5[_0x3e7085(0x119)])return;const _0x5f4f06=_0x27e3ec()-_0x3757a9,_0x1e5ad4=formatElapsed(_0x5f4f06),_0x5872f2=_0x4a13bb['phase']?.['trim']()||_0x1a168a,_0x525862=_0x4a13bb[_0x3e7085(0x11b)]?_0x3e7085(0x127)+_0x4a13bb[_0x3e7085(0x11b)]+']':'',_0x344ab4=_0x4a13bb[_0x3e7085(0x126)]?'\x20'+_0x4a13bb['extra']:'',_0x4702c9=_0x5872f2+'\x20'+_0x1e5ad4+_0x344ab4+_0x525862;_0x4702c9!==_0x541be4&&_0x4702c9[_0x3e7085(0x12c)]()&&(_0x5585e5[_0x3e7085(0x11a)]=_0x4702c9,_0x541be4=_0x4702c9);},_0x9e9e74=_0x94198a(()=>{_0x8dfd9a();},0x3e8),_0x28fd9d={'setPhase':_0x2fe772=>{const _0x51e2b9=_0x8e3542;_0x4a13bb[_0x51e2b9(0x11c)]=_0x2fe772;const _0x40e64b=_0x2fe772?.['trim']()||_0x1a168a,_0x1ab2f5=_0x27e3ec()-_0x3757a9,_0x4b2313=formatElapsed(_0x1ab2f5),_0x5bd8f3=_0x4a13bb['jobId']?_0x51e2b9(0x127)+_0x4a13bb['jobId']+']':'',_0xc00bef=_0x4a13bb[_0x51e2b9(0x126)]?'\x20'+_0x4a13bb[_0x51e2b9(0x126)]:'',_0x413f55=_0x40e64b+'\x20'+_0x4b2313+_0xc00bef+_0x5bd8f3;_0x5585e5[_0x51e2b9(0x119)]&&_0x413f55['trim']()&&(_0x5585e5[_0x51e2b9(0x11a)]=_0x413f55,_0x541be4=_0x413f55);},'setJobId':_0x81a86=>{const _0x33d485=_0x8e3542;_0x4a13bb[_0x33d485(0x11b)]=_0x81a86,_0x8dfd9a();},'setExtra':_0x16822a=>{_0x4a13bb['extra']=_0x16822a,_0x8dfd9a();}};_0x8dfd9a();try{const _0x5c0769=await _0x5beeb6(_0x28fd9d),_0xe9b71b=_0x27e3ec()-_0x3757a9;return{'data':_0x5c0769,'elapsedMs':_0xe9b71b};}finally{clearInterval(_0x9e9e74),_0x5585e5[_0x8e3542(0x12d)]();}}export function formatElapsed(_0x28e6e6){const _0x356368=a146_0x16fc,_0x3a7f30=Math[_0x356368(0x12a)](_0x28e6e6/0x3e8);if(_0x3a7f30<0x3c)return(_0x28e6e6/0x3e8)[_0x356368(0x121)](0x1)+'s';const _0x3aa4e1=Math[_0x356368(0x12a)](_0x3a7f30/0x3c),_0x1d7b2a=_0x3a7f30%0x3c;if(_0x3aa4e1<0x3c)return _0x3aa4e1+'m\x20'+_0x1d7b2a+'s';const _0x33be5d=Math['floor'](_0x3aa4e1/0x3c),_0x522aff=_0x3aa4e1%0x3c;return _0x33be5d+'h\x20'+_0x522aff+'m';}function a146_0x16fc(_0x49d28c,_0x274b13){_0x49d28c=_0x49d28c-0x114;const _0x251b4b=a146_0x251b();let _0x16fc80=_0x251b4b[_0x49d28c];return _0x16fc80;}function a146_0x251b(){const _0x4120fc=['8498903aDaDgD','500067NVCxCv','234544LnwWbM','clock','extra','\x20[Job\x20ID:\x20','cyan','intervalFactory','floor','387dIqtwa','trim','stop','isTTY','now','3932880ggbkgF','3088670rHXUKY','stderr','replace','isSpinning','text','jobId','phase','2czuNrP','...','2483848zNrSAY','231960XQBZVJ','toFixed'];a146_0x251b=function(){return _0x4120fc;};return a146_0x251b();}
@@ -1 +1 @@
1
- (function(_0x503fc6,_0x402e71){const _0x1d0085=a147_0x562b,_0x58477a=_0x503fc6();while(!![]){try{const _0x2e00c9=parseInt(_0x1d0085(0x1a5))/0x1*(-parseInt(_0x1d0085(0x19a))/0x2)+parseInt(_0x1d0085(0x194))/0x3+-parseInt(_0x1d0085(0x1a1))/0x4+parseInt(_0x1d0085(0x1a4))/0x5*(-parseInt(_0x1d0085(0x198))/0x6)+-parseInt(_0x1d0085(0x19d))/0x7*(parseInt(_0x1d0085(0x19e))/0x8)+-parseInt(_0x1d0085(0x19b))/0x9+-parseInt(_0x1d0085(0x192))/0xa*(-parseInt(_0x1d0085(0x19f))/0xb);if(_0x2e00c9===_0x402e71)break;else _0x58477a['push'](_0x58477a['shift']());}catch(_0x47c9a1){_0x58477a['push'](_0x58477a['shift']());}}}(a147_0x3b56,0xcbb15));function a147_0x562b(_0xd05ca2,_0x5dbd63){_0xd05ca2=_0xd05ca2-0x18d;const _0x3b5624=a147_0x3b56();let _0x562be9=_0x3b5624[_0xd05ca2];return _0x562be9;}export async function*parseSSEStream(_0x52d58d,_0x184f4e){const _0x1a4621=a147_0x562b;if(!_0x52d58d[_0x1a4621(0x18f)])throw new Error(_0x1a4621(0x193));const _0x2a8bb7=_0x52d58d[_0x1a4621(0x18f)][_0x1a4621(0x1a6)](),_0x59ec3b=new TextDecoder();let _0x2d0062='',_0x18620e={};try{while(!![]){const {done:_0xe65811,value:_0x414b0d}=await _0x2a8bb7[_0x1a4621(0x19c)]();if(_0xe65811){if(_0x18620e[_0x1a4621(0x18d)]){_0x184f4e?.[_0x1a4621(0x1a3)](_0x1a4621(0x199)+_0x18620e[_0x1a4621(0x18d)]);const _0xcd10b8=parseSSEData(_0x18620e[_0x1a4621(0x18d)]);yield _0xcd10b8;}break;}_0x2d0062+=_0x59ec3b[_0x1a4621(0x1a2)](_0x414b0d,{'stream':!![]});const _0x4eec91=_0x2d0062[_0x1a4621(0x190)]('\x0a');_0x2d0062=_0x4eec91[_0x1a4621(0x197)]()||'';for(const _0x58d5b8 of _0x4eec91){if(_0x58d5b8[_0x1a4621(0x191)]()===''){if(_0x18620e[_0x1a4621(0x18d)]){_0x184f4e?.['debug'](_0x1a4621(0x199)+_0x18620e[_0x1a4621(0x18d)]);const _0x2412b9=parseSSEData(_0x18620e['data']);yield _0x2412b9,_0x18620e={};}continue;}if(_0x58d5b8['startsWith'](':'))continue;const _0x34dd71=_0x58d5b8[_0x1a4621(0x1a0)](':');if(_0x34dd71===-0x1)continue;const _0x3cb184=_0x58d5b8[_0x1a4621(0x195)](0x0,_0x34dd71);let _0xf41b65=_0x58d5b8[_0x1a4621(0x195)](_0x34dd71+0x1);_0xf41b65[_0x1a4621(0x1a7)]('\x20')&&(_0xf41b65=_0xf41b65['slice'](0x1));switch(_0x3cb184){case'event':_0x18620e['event']=_0xf41b65;break;case _0x1a4621(0x18d):_0x18620e[_0x1a4621(0x18d)]=_0x18620e['data']?_0x18620e[_0x1a4621(0x18d)]+'\x0a'+_0xf41b65:_0xf41b65;break;case'id':_0x18620e['id']=_0xf41b65;break;}}}}finally{_0x2a8bb7[_0x1a4621(0x18e)]();}}function parseSSEData(_0xb5bdd9){const _0x3834eb=a147_0x562b;try{return JSON[_0x3834eb(0x196)](_0xb5bdd9);}catch(_0x4fbcf8){throw new Error('Failed\x20to\x20parse\x20SSE\x20data\x20as\x20JSON:\x20'+_0xb5bdd9,{'cause':_0x4fbcf8});}}function a147_0x3b56(){const _0x38829e=['body','split','trim','900JAqJTf','Response\x20body\x20is\x20null','4799745WxezBF','slice','parse','pop','2593380JlIQzD','[LLM\x20API\x20SSE]\x20','757938YUqogm','12230595oQgtjG','read','49BBwcBa','1248848wCoRep','597179nQouDH','indexOf','6310020dFChUm','decode','debug','10edwKtF','2bOARjZ','getReader','startsWith','data','releaseLock'];a147_0x3b56=function(){return _0x38829e;};return a147_0x3b56();}
1
+ function a147_0x5375(_0x1f8e60,_0x121103){_0x1f8e60=_0x1f8e60-0x111;const _0x3379dd=a147_0x3379();let _0x53759f=_0x3379dd[_0x1f8e60];return _0x53759f;}(function(_0x5a9975,_0x38e2bd){const _0x543564=a147_0x5375,_0x1c0164=_0x5a9975();while(!![]){try{const _0x404033=parseInt(_0x543564(0x124))/0x1+-parseInt(_0x543564(0x128))/0x2+parseInt(_0x543564(0x117))/0x3*(-parseInt(_0x543564(0x115))/0x4)+parseInt(_0x543564(0x126))/0x5*(parseInt(_0x543564(0x118))/0x6)+-parseInt(_0x543564(0x11f))/0x7+parseInt(_0x543564(0x111))/0x8*(-parseInt(_0x543564(0x122))/0x9)+-parseInt(_0x543564(0x113))/0xa*(-parseInt(_0x543564(0x112))/0xb);if(_0x404033===_0x38e2bd)break;else _0x1c0164['push'](_0x1c0164['shift']());}catch(_0x3fb77b){_0x1c0164['push'](_0x1c0164['shift']());}}}(a147_0x3379,0xe1624));export async function*parseSSEStream(_0x7896d4,_0x3e1f0e){const _0x7b352a=a147_0x5375;if(!_0x7896d4[_0x7b352a(0x121)])throw new Error(_0x7b352a(0x11d));const _0x383456=_0x7896d4[_0x7b352a(0x121)][_0x7b352a(0x119)](),_0x36e804=new TextDecoder();let _0x579b14='',_0x750ab0={};try{while(!![]){const {done:_0x2b0d70,value:_0x385abe}=await _0x383456[_0x7b352a(0x127)]();if(_0x2b0d70){if(_0x750ab0['data']){_0x3e1f0e?.['debug']('[LLM\x20API\x20SSE]\x20'+_0x750ab0[_0x7b352a(0x123)]);const _0x4cae52=parseSSEData(_0x750ab0[_0x7b352a(0x123)]);yield _0x4cae52;}break;}_0x579b14+=_0x36e804[_0x7b352a(0x11c)](_0x385abe,{'stream':!![]});const _0x2b8864=_0x579b14[_0x7b352a(0x11e)]('\x0a');_0x579b14=_0x2b8864[_0x7b352a(0x11b)]()||'';for(const _0x2cf60c of _0x2b8864){if(_0x2cf60c[_0x7b352a(0x114)]()===''){if(_0x750ab0['data']){_0x3e1f0e?.['debug']('[LLM\x20API\x20SSE]\x20'+_0x750ab0[_0x7b352a(0x123)]);const _0x259608=parseSSEData(_0x750ab0[_0x7b352a(0x123)]);yield _0x259608,_0x750ab0={};}continue;}if(_0x2cf60c[_0x7b352a(0x11a)](':'))continue;const _0x27b31f=_0x2cf60c['indexOf'](':');if(_0x27b31f===-0x1)continue;const _0x1a0d00=_0x2cf60c['slice'](0x0,_0x27b31f);let _0x2849d9=_0x2cf60c[_0x7b352a(0x120)](_0x27b31f+0x1);_0x2849d9[_0x7b352a(0x11a)]('\x20')&&(_0x2849d9=_0x2849d9[_0x7b352a(0x120)](0x1));switch(_0x1a0d00){case _0x7b352a(0x125):_0x750ab0['event']=_0x2849d9;break;case _0x7b352a(0x123):_0x750ab0[_0x7b352a(0x123)]=_0x750ab0[_0x7b352a(0x123)]?_0x750ab0[_0x7b352a(0x123)]+'\x0a'+_0x2849d9:_0x2849d9;break;case'id':_0x750ab0['id']=_0x2849d9;break;}}}}finally{_0x383456[_0x7b352a(0x116)]();}}function parseSSEData(_0x33850e){try{return JSON['parse'](_0x33850e);}catch(_0x5426fa){throw new Error('Failed\x20to\x20parse\x20SSE\x20data\x20as\x20JSON:\x20'+_0x33850e,{'cause':_0x5426fa});}}function a147_0x3379(){const _0x56ff33=['369200MdzekN','4152egRGDY','20595509XWqcgf','10GXBvnK','trim','903068FCVFcP','releaseLock','24PsFrmV','102294mnufpk','getReader','startsWith','pop','decode','Response\x20body\x20is\x20null','split','10732302moKbNO','slice','body','5679LjTtFl','data','1299658STbmcj','event','470xBXXDE','read'];a147_0x3379=function(){return _0x56ff33;};return a147_0x3379();}
@@ -1 +1 @@
1
- (function(_0x44ab47,_0x1a3c88){const _0x892b6=a148_0xa8fe,_0x53bde1=_0x44ab47();while(!![]){try{const _0x1abee1=parseInt(_0x892b6(0xeb))/0x1+-parseInt(_0x892b6(0xe7))/0x2*(-parseInt(_0x892b6(0xd6))/0x3)+-parseInt(_0x892b6(0xe6))/0x4*(-parseInt(_0x892b6(0xda))/0x5)+-parseInt(_0x892b6(0xd8))/0x6*(parseInt(_0x892b6(0xde))/0x7)+parseInt(_0x892b6(0xdd))/0x8+parseInt(_0x892b6(0xd4))/0x9+parseInt(_0x892b6(0xe8))/0xa*(-parseInt(_0x892b6(0xdb))/0xb);if(_0x1abee1===_0x1a3c88)break;else _0x53bde1['push'](_0x53bde1['shift']());}catch(_0x1c1e23){_0x53bde1['push'](_0x53bde1['shift']());}}}(a148_0x3913,0xaa664));import a148_0x14b1bb from'string-width';function a148_0x3913(){const _0x4fba77=['68GiuWSP','2150qfjBFs','23064990Sesalv','replace','test','1289185PCSRpR','Cannot\x20escape\x20empty\x20string\x20literal','padStart','toString','1828197sVSwqI','trim','2283aFPjEV','substring','6567582FnAFDd','slice','292805dXafGg','11OXQTOM','USER','6344976hAscnI','7YyGVKf','length','floor','Cannot\x20build\x20LIKE\x20pattern\x20from\x20empty\x20string','repeat','\x5c$&','toLowerCase','env'];a148_0x3913=function(){return _0x4fba77;};return a148_0x3913();}export function stringWidth(_0x292983){return a148_0x14b1bb(_0x292983);}export function padEnd(_0x2bef6f,_0x25ead5){const _0x38e9fb=stringWidth(_0x2bef6f);if(_0x38e9fb>=_0x25ead5)return _0x2bef6f;return _0x2bef6f+'\x20'['repeat'](_0x25ead5-_0x38e9fb);}export function padStart(_0x8c806e,_0x249033){const _0x1874c9=stringWidth(_0x8c806e);if(_0x1874c9>=_0x249033)return _0x8c806e;return'\x20'['repeat'](_0x249033-_0x1874c9)+_0x8c806e;}function a148_0xa8fe(_0x3a4637,_0x35ad8e){_0x3a4637=_0x3a4637-0xd3;const _0x3913ea=a148_0x3913();let _0xa8fef5=_0x3913ea[_0x3a4637];return _0xa8fef5;}export function centerAlign(_0x584e78,_0x21af04){const _0x416ceb=a148_0xa8fe,_0x3564fb=stringWidth(_0x584e78);if(_0x3564fb>_0x21af04){if(_0x21af04<=0x1)return'…'[_0x416ceb(0xd7)](0x0,_0x21af04);let _0x5a709b=_0x584e78;while(stringWidth(_0x5a709b+'…')>_0x21af04){_0x5a709b=_0x5a709b[_0x416ceb(0xd9)](0x0,-0x1);}return _0x5a709b+'…';}if(_0x3564fb===_0x21af04)return _0x584e78;const _0x214cbe=_0x21af04-_0x3564fb,_0x2af819=Math[_0x416ceb(0xe0)](_0x214cbe/0x2),_0x2c6070=_0x214cbe-_0x2af819;return'\x20'[_0x416ceb(0xe2)](_0x2af819)+_0x584e78+'\x20'[_0x416ceb(0xe2)](_0x2c6070);}export function escapeStringLiteral(_0x13a6d8){const _0x3f69c0=a148_0xa8fe;if(!_0x13a6d8||_0x13a6d8[_0x3f69c0(0xd5)]()['length']===0x0)throw new Error(_0x3f69c0(0xec));const _0x324ba2=_0x13a6d8[_0x3f69c0(0xe9)](/'/g,'\x27\x27');return'\x27'+_0x324ba2+'\x27';}export function globToLike(_0x53a24c){const _0x4fd4af=a148_0xa8fe;let _0x20a2a7=_0x53a24c[_0x4fd4af(0xe9)](/\\/g,'\x5c\x5c')[_0x4fd4af(0xe9)](/%/g,'\x5c%')[_0x4fd4af(0xe9)](/_/g,'\x5c_');return _0x20a2a7=_0x20a2a7[_0x4fd4af(0xe9)](/\*/g,'%')[_0x4fd4af(0xe9)](/\?/g,'_'),_0x20a2a7;}export function buildLikePattern(_0x36773c){const _0x1b5e2e=a148_0xa8fe;if(!_0x36773c||_0x36773c[_0x1b5e2e(0xd5)]()[_0x1b5e2e(0xdf)]===0x0)throw new Error(_0x1b5e2e(0xe1));const _0x1a7976=globToLike(_0x36773c),_0x1ac172=_0x1a7976[_0x1b5e2e(0xe9)](/'/g,'\x27\x27');return'\x27'+_0x1ac172+'\x27';}export function matchGlobPattern(_0x214247,_0x32d62e){const _0xb85b88=a148_0xa8fe,_0x525fb2=_0x32d62e[_0xb85b88(0xe9)](/[.+^${}()|[\]\\]/g,_0xb85b88(0xe3))[_0xb85b88(0xe9)](/\*/g,'.*')['replace'](/\?/g,'.'),_0x3dab28=new RegExp('^'+_0x525fb2+'$');return _0x3dab28[_0xb85b88(0xea)](_0x214247);}export function getSanitizedUsername(){const _0x2034bd=a148_0xa8fe,_0x1109e8=process[_0x2034bd(0xe5)][_0x2034bd(0xdc)]||process[_0x2034bd(0xe5)]['USERNAME']||'unknown';return _0x1109e8[_0x2034bd(0xe9)](/[^a-zA-Z0-9]/g,'')['toLowerCase']();}export function generateRandomHex(){const _0x1625b2=a148_0xa8fe,_0x2c8592=Math['floor'](Math['random']()*0xfffff);return _0x2c8592[_0x1625b2(0xd3)](0x10)[_0x1625b2(0xed)](0x5,'0');}export function sanitizeFileName(_0x30e579){const _0x39d480=a148_0xa8fe;return _0x30e579[_0x39d480(0xe4)]()[_0x39d480(0xe9)](/[/\\:*?"<>|]/g,'-')['replace'](/\s+/g,'-')['replace'](/-+/g,'-')[_0x39d480(0xe9)](/^-|-$/g,'');}
1
+ (function(_0x53ffb4,_0x866db8){const _0x267bb3=a148_0x2665,_0x26bdf5=_0x53ffb4();while(!![]){try{const _0x2ae80e=-parseInt(_0x267bb3(0x1bc))/0x1*(parseInt(_0x267bb3(0x1bd))/0x2)+parseInt(_0x267bb3(0x1c2))/0x3*(parseInt(_0x267bb3(0x1c8))/0x4)+-parseInt(_0x267bb3(0x1b4))/0x5*(-parseInt(_0x267bb3(0x1bb))/0x6)+-parseInt(_0x267bb3(0x1c1))/0x7+parseInt(_0x267bb3(0x1b2))/0x8*(-parseInt(_0x267bb3(0x1b6))/0x9)+parseInt(_0x267bb3(0x1b3))/0xa+parseInt(_0x267bb3(0x1ae))/0xb;if(_0x2ae80e===_0x866db8)break;else _0x26bdf5['push'](_0x26bdf5['shift']());}catch(_0x226ede){_0x26bdf5['push'](_0x26bdf5['shift']());}}}(a148_0x339f,0x4c916));import a148_0x495d0e from'string-width';export function stringWidth(_0x2af8d9){return a148_0x495d0e(_0x2af8d9);}function a148_0x2665(_0xd4a581,_0x2fabc2){_0xd4a581=_0xd4a581-0x1ad;const _0x339ff2=a148_0x339f();let _0x26652b=_0x339ff2[_0xd4a581];return _0x26652b;}export function padEnd(_0xb806a2,_0x5b2fa4){const _0x51406e=a148_0x2665,_0x34bc5b=stringWidth(_0xb806a2);if(_0x34bc5b>=_0x5b2fa4)return _0xb806a2;return _0xb806a2+'\x20'[_0x51406e(0x1c6)](_0x5b2fa4-_0x34bc5b);}function a148_0x339f(){const _0x28d759=['length','217308FTQAWd','28Gnfcjg','1838WaWTiu','unknown','Cannot\x20build\x20LIKE\x20pattern\x20from\x20empty\x20string','toLowerCase','3629577GcoZgZ','9KjIyfF','floor','\x5c$&','toString','repeat','USERNAME','704356CYkqXX','USER','722722ZrpsJZ','replace','padStart','Cannot\x20escape\x20empty\x20string\x20literal','493016eTJXgX','2784960QWbecI','15mNrFFS','slice','18lzMnmD','substring','random','trim'];a148_0x339f=function(){return _0x28d759;};return a148_0x339f();}export function padStart(_0xdbcf36,_0x233a2c){const _0x357dad=a148_0x2665,_0x41ed8f=stringWidth(_0xdbcf36);if(_0x41ed8f>=_0x233a2c)return _0xdbcf36;return'\x20'[_0x357dad(0x1c6)](_0x233a2c-_0x41ed8f)+_0xdbcf36;}export function centerAlign(_0x3c9ede,_0x2811fb){const _0x187ab2=a148_0x2665,_0xebe9c8=stringWidth(_0x3c9ede);if(_0xebe9c8>_0x2811fb){if(_0x2811fb<=0x1)return'…'[_0x187ab2(0x1b7)](0x0,_0x2811fb);let _0x2fd64d=_0x3c9ede;while(stringWidth(_0x2fd64d+'…')>_0x2811fb){_0x2fd64d=_0x2fd64d[_0x187ab2(0x1b5)](0x0,-0x1);}return _0x2fd64d+'…';}if(_0xebe9c8===_0x2811fb)return _0x3c9ede;const _0x227609=_0x2811fb-_0xebe9c8,_0x42115d=Math[_0x187ab2(0x1c3)](_0x227609/0x2),_0x2edb1a=_0x227609-_0x42115d;return'\x20'['repeat'](_0x42115d)+_0x3c9ede+'\x20'['repeat'](_0x2edb1a);}export function escapeStringLiteral(_0x397089){const _0x92f0df=a148_0x2665;if(!_0x397089||_0x397089[_0x92f0df(0x1b9)]()['length']===0x0)throw new Error(_0x92f0df(0x1b1));const _0x1bfd2f=_0x397089[_0x92f0df(0x1af)](/'/g,'\x27\x27');return'\x27'+_0x1bfd2f+'\x27';}export function globToLike(_0x232bdd){const _0x473df8=a148_0x2665;let _0x58af97=_0x232bdd[_0x473df8(0x1af)](/\\/g,'\x5c\x5c')[_0x473df8(0x1af)](/%/g,'\x5c%')['replace'](/_/g,'\x5c_');return _0x58af97=_0x58af97[_0x473df8(0x1af)](/\*/g,'%')[_0x473df8(0x1af)](/\?/g,'_'),_0x58af97;}export function buildLikePattern(_0x55f63b){const _0x5b849b=a148_0x2665;if(!_0x55f63b||_0x55f63b['trim']()[_0x5b849b(0x1ba)]===0x0)throw new Error(_0x5b849b(0x1bf));const _0xbb16e8=globToLike(_0x55f63b),_0x360fce=_0xbb16e8[_0x5b849b(0x1af)](/'/g,'\x27\x27');return'\x27'+_0x360fce+'\x27';}export function matchGlobPattern(_0x46b928,_0x87a96b){const _0x5d959c=a148_0x2665,_0x24002f=_0x87a96b[_0x5d959c(0x1af)](/[.+^${}()|[\]\\]/g,_0x5d959c(0x1c4))['replace'](/\*/g,'.*')[_0x5d959c(0x1af)](/\?/g,'.'),_0x228e17=new RegExp('^'+_0x24002f+'$');return _0x228e17['test'](_0x46b928);}export function getSanitizedUsername(){const _0x414d9c=a148_0x2665,_0x295af7=process['env'][_0x414d9c(0x1ad)]||process['env'][_0x414d9c(0x1c7)]||_0x414d9c(0x1be);return _0x295af7[_0x414d9c(0x1af)](/[^a-zA-Z0-9]/g,'')[_0x414d9c(0x1c0)]();}export function generateRandomHex(){const _0x4b7b01=a148_0x2665,_0x144953=Math[_0x4b7b01(0x1c3)](Math[_0x4b7b01(0x1b8)]()*0xfffff);return _0x144953[_0x4b7b01(0x1c5)](0x10)[_0x4b7b01(0x1b0)](0x5,'0');}export function sanitizeFileName(_0x4f2888){const _0x47f27e=a148_0x2665;return _0x4f2888[_0x47f27e(0x1c0)]()[_0x47f27e(0x1af)](/[/\\:*?"<>|]/g,'-')[_0x47f27e(0x1af)](/\s+/g,'-')['replace'](/-+/g,'-')['replace'](/^-|-$/g,'');}
@@ -1 +1 @@
1
- (function(_0x24fb3c,_0x563c68){const _0x18b542=a149_0x1c20,_0x4db5bc=_0x24fb3c();while(!![]){try{const _0x2b0304=parseInt(_0x18b542(0xaf))/0x1*(parseInt(_0x18b542(0xba))/0x2)+parseInt(_0x18b542(0xc0))/0x3*(-parseInt(_0x18b542(0xb5))/0x4)+-parseInt(_0x18b542(0xb8))/0x5*(parseInt(_0x18b542(0xb2))/0x6)+-parseInt(_0x18b542(0xbd))/0x7+-parseInt(_0x18b542(0xae))/0x8+parseInt(_0x18b542(0xbf))/0x9+parseInt(_0x18b542(0xc4))/0xa;if(_0x2b0304===_0x563c68)break;else _0x4db5bc['push'](_0x4db5bc['shift']());}catch(_0x24e33b){_0x4db5bc['push'](_0x4db5bc['shift']());}}}(a149_0x376f,0xea2b5));function hasWildcard(_0xa2c961){const _0x581492=a149_0x1c20;return _0xa2c961[_0x581492(0xb4)]('*')||_0xa2c961['includes']('?');}export function parseTableReference(_0x55d9bd){const _0x440058=a149_0x1c20;if(!_0x55d9bd||_0x55d9bd[_0x440058(0xb9)]()['length']===0x0)throw new Error(_0x440058(0xc7));const _0x2f857b=_0x55d9bd[_0x440058(0xb9)](),_0x1032d8={'original':_0x2f857b},_0x32f149=_0x2f857b[_0x440058(0xbb)]('.');if(_0x32f149['length']===0x1){const _0x3820c2=_0x32f149[0x0];if(!_0x3820c2)throw new Error(_0x440058(0xad));_0x1032d8[_0x440058(0xb6)]=_0x3820c2;}else{if(_0x32f149[_0x440058(0xc1)]===0x2){const [_0x386c2d,_0x76f469]=_0x32f149;if(!_0x386c2d)throw new Error(_0x440058(0xbe));if(!_0x76f469)throw new Error(_0x440058(0xc2));_0x1032d8[_0x440058(0xc6)]=_0x386c2d,_0x1032d8[_0x440058(0xb6)]=_0x76f469;}else{if(_0x32f149[_0x440058(0xc1)]===0x3){const [_0x514fed,_0x31b2e9,_0x4665b1]=_0x32f149;if(!_0x514fed||!_0x31b2e9||!_0x4665b1)throw new Error(_0x440058(0xb3));_0x1032d8[_0x440058(0xb7)]=_0x514fed,_0x1032d8['database']=_0x31b2e9,_0x1032d8['table']=_0x4665b1;}else throw new Error(_0x440058(0xbc));}}return _0x1032d8;}export function formatTableReference(_0x66c44f){const _0x3f5c95=a149_0x1c20,_0x2a0903=[];return _0x66c44f[_0x3f5c95(0xb7)]&&_0x2a0903[_0x3f5c95(0xb0)](_0x66c44f['catalog']),_0x66c44f[_0x3f5c95(0xc6)]&&_0x2a0903[_0x3f5c95(0xb0)](_0x66c44f[_0x3f5c95(0xc6)]),_0x66c44f[_0x3f5c95(0xb6)]&&_0x2a0903[_0x3f5c95(0xb0)](_0x66c44f['table']),_0x2a0903['join']('.');}export function validateTableListReference(_0x594eff){return undefined;}export function validateTableDescribeReference(_0x10645e){const _0x22016a=a149_0x1c20;if(!_0x10645e[_0x22016a(0xb6)])return _0x22016a(0xc3);if(_0x10645e['database']&&hasWildcard(_0x10645e['database']))return _0x22016a(0xc5);if(hasWildcard(_0x10645e[_0x22016a(0xb6)]))return _0x22016a(0xb1);return undefined;}function a149_0x1c20(_0x25e075,_0x2fd9f1){_0x25e075=_0x25e075-0xad;const _0x376fdd=a149_0x376f();let _0x1c207f=_0x376fdd[_0x25e075];return _0x1c207f;}function a149_0x376f(){const _0x125001=['Pattern\x20cannot\x20be\x20just\x20a\x20dot','1772968OSjeLV','700316kgBakW','push','Wildcards\x20are\x20not\x20allowed\x20in\x20table\x20name\x20for\x20describe\x20operation','6EjvQIZ','Invalid\x20catalog.database.table\x20format\x20-\x20all\x20parts\x20must\x20be\x20non-empty','includes','148DZOhRV','table','catalog','3128435KRBkHJ','trim','2yrkVir','split','Invalid\x20pattern\x20format\x20-\x20too\x20many\x20dots\x20(max:\x20catalog.database.table)','5360782MlNexR','Database\x20part\x20cannot\x20be\x20empty\x20-\x20use\x20\x22*\x22\x20for\x20all\x20databases\x20(e.g.,\x20\x22*.mytable\x22)','8148042gvXTkC','146607lSbLMc','length','Table\x20part\x20cannot\x20be\x20empty\x20-\x20use\x20\x22*\x22\x20for\x20all\x20tables\x20(e.g.,\x20\x22mydb.*\x22)','Table\x20name\x20is\x20required\x20for\x20describe\x20operation','27747900skzbSl','Wildcards\x20are\x20not\x20allowed\x20in\x20database\x20name\x20for\x20describe\x20operation','database','Pattern\x20cannot\x20be\x20empty\x20or\x20whitespace-only'];a149_0x376f=function(){return _0x125001;};return a149_0x376f();}
1
+ (function(_0x4a93ab,_0x57c38e){const _0x3700e3=a149_0x4a72,_0xab9658=_0x4a93ab();while(!![]){try{const _0x4b5de3=parseInt(_0x3700e3(0xad))/0x1+-parseInt(_0x3700e3(0xac))/0x2+-parseInt(_0x3700e3(0xb3))/0x3*(-parseInt(_0x3700e3(0x9e))/0x4)+-parseInt(_0x3700e3(0xab))/0x5*(-parseInt(_0x3700e3(0xa1))/0x6)+-parseInt(_0x3700e3(0xa0))/0x7+parseInt(_0x3700e3(0xa9))/0x8+-parseInt(_0x3700e3(0xb2))/0x9;if(_0x4b5de3===_0x57c38e)break;else _0xab9658['push'](_0xab9658['shift']());}catch(_0x24513b){_0xab9658['push'](_0xab9658['shift']());}}}(a149_0x22db,0xef4cd));function a149_0x4a72(_0x10775c,_0x411fb9){_0x10775c=_0x10775c-0x9d;const _0x22db97=a149_0x22db();let _0x4a7276=_0x22db97[_0x10775c];return _0x4a7276;}function hasWildcard(_0x482fa1){const _0xf8f2ee=a149_0x4a72;return _0x482fa1[_0xf8f2ee(0xa5)]('*')||_0x482fa1[_0xf8f2ee(0xa5)]('?');}export function parseTableReference(_0x387671){const _0x1fec8f=a149_0x4a72;if(!_0x387671||_0x387671[_0x1fec8f(0xa2)]()['length']===0x0)throw new Error(_0x1fec8f(0xae));const _0x1e6603=_0x387671['trim'](),_0x1270b1={'original':_0x1e6603},_0x2f593b=_0x1e6603[_0x1fec8f(0xb0)]('.');if(_0x2f593b['length']===0x1){const _0x3d1d8e=_0x2f593b[0x0];if(!_0x3d1d8e)throw new Error(_0x1fec8f(0xaf));_0x1270b1[_0x1fec8f(0xb1)]=_0x3d1d8e;}else{if(_0x2f593b['length']===0x2){const [_0x40a622,_0x361e07]=_0x2f593b;if(!_0x40a622)throw new Error(_0x1fec8f(0xa4));if(!_0x361e07)throw new Error(_0x1fec8f(0xb4));_0x1270b1['database']=_0x40a622,_0x1270b1[_0x1fec8f(0xb1)]=_0x361e07;}else{if(_0x2f593b[_0x1fec8f(0x9f)]===0x3){const [_0x3de5b0,_0x44131f,_0xbe7af6]=_0x2f593b;if(!_0x3de5b0||!_0x44131f||!_0xbe7af6)throw new Error('Invalid\x20catalog.database.table\x20format\x20-\x20all\x20parts\x20must\x20be\x20non-empty');_0x1270b1['catalog']=_0x3de5b0,_0x1270b1[_0x1fec8f(0xa3)]=_0x44131f,_0x1270b1[_0x1fec8f(0xb1)]=_0xbe7af6;}else throw new Error(_0x1fec8f(0xa6));}}return _0x1270b1;}function a149_0x22db(){const _0x319ac=['table','2415402VDYHGE','2262873jlXBna','Table\x20part\x20cannot\x20be\x20empty\x20-\x20use\x20\x22*\x22\x20for\x20all\x20tables\x20(e.g.,\x20\x22mydb.*\x22)','Table\x20name\x20is\x20required\x20for\x20describe\x20operation','Wildcards\x20are\x20not\x20allowed\x20in\x20table\x20name\x20for\x20describe\x20operation','Wildcards\x20are\x20not\x20allowed\x20in\x20database\x20name\x20for\x20describe\x20operation','4AEzbbP','length','3870755UizYBI','4590624YSvmNg','trim','database','Database\x20part\x20cannot\x20be\x20empty\x20-\x20use\x20\x22*\x22\x20for\x20all\x20databases\x20(e.g.,\x20\x22*.mytable\x22)','includes','Invalid\x20pattern\x20format\x20-\x20too\x20many\x20dots\x20(max:\x20catalog.database.table)','push','join','1059432fHDVBj','catalog','10ZvSqva','2663030WmQnxD','716103KSRZPm','Pattern\x20cannot\x20be\x20empty\x20or\x20whitespace-only','Pattern\x20cannot\x20be\x20just\x20a\x20dot','split'];a149_0x22db=function(){return _0x319ac;};return a149_0x22db();}export function formatTableReference(_0x25b0ed){const _0xe423e6=a149_0x4a72,_0x560a84=[];return _0x25b0ed['catalog']&&_0x560a84[_0xe423e6(0xa7)](_0x25b0ed[_0xe423e6(0xaa)]),_0x25b0ed['database']&&_0x560a84[_0xe423e6(0xa7)](_0x25b0ed[_0xe423e6(0xa3)]),_0x25b0ed[_0xe423e6(0xb1)]&&_0x560a84[_0xe423e6(0xa7)](_0x25b0ed['table']),_0x560a84[_0xe423e6(0xa8)]('.');}export function validateTableListReference(_0x322ad8){return undefined;}export function validateTableDescribeReference(_0x389eef){const _0x193619=a149_0x4a72;if(!_0x389eef[_0x193619(0xb1)])return _0x193619(0xb5);if(_0x389eef[_0x193619(0xa3)]&&hasWildcard(_0x389eef[_0x193619(0xa3)]))return _0x193619(0x9d);if(hasWildcard(_0x389eef[_0x193619(0xb1)]))return _0x193619(0xb6);return undefined;}
@@ -1 +1 @@
1
- const a150_0x11da70=a150_0x3f28;function a150_0x12cb(){const _0x23fc15=['getLogPath','ERROR','1167152qMJIRg','.cache','logLevel','getMinutes','map','tdx.log','info','Proxy\x20session\x20ended','.gz','Warning:\x20Failed\x20to\x20initialize\x20log\x20files:','write','gray','29523RRtTZu','1875572SSyBcH','logDir','Warning:\x20Error\x20writing\x20to\x20tdx.log:','getSeconds','getFullYear','yellow','tdx-','warn','TRACE','WARN','toISOString','close','17237gcwAJU','158268hnoHQf','6lxkctw','trace','DEBUG','split','end','16356gvDVnP','floor','message','test','getHours','padStart','603873tSYtfG','INFO','cyan','5dOhfJm','getMonth','stack','logs','fileOnly','getMilliseconds','Warning:\x20Failed\x20to\x20compress\x20','logStream','name','678808zRvnTh','error','filter','99dykclr','red','.log','abs','133BDrJMG','6680EoREIK','debug','join','mtime','init','toString','rotateOldLogs'];a150_0x12cb=function(){return _0x23fc15;};return a150_0x12cb();}(function(_0x4429c3,_0x403610){const _0x5441d1=a150_0x3f28,_0x4ee0e2=_0x4429c3();while(!![]){try{const _0x38c78a=-parseInt(_0x5441d1(0x1a4))/0x1+parseInt(_0x5441d1(0x1bf))/0x2*(parseInt(_0x5441d1(0x1ca))/0x3)+-parseInt(_0x5441d1(0x1b1))/0x4*(parseInt(_0x5441d1(0x1cd))/0x5)+parseInt(_0x5441d1(0x1be))/0x6*(parseInt(_0x5441d1(0x1dd))/0x7)+-parseInt(_0x5441d1(0x1d6))/0x8*(parseInt(_0x5441d1(0x1d9))/0x9)+parseInt(_0x5441d1(0x19b))/0xa*(-parseInt(_0x5441d1(0x1bd))/0xb)+parseInt(_0x5441d1(0x1c4))/0xc*(parseInt(_0x5441d1(0x1b0))/0xd);if(_0x38c78a===_0x403610)break;else _0x4ee0e2['push'](_0x4ee0e2['shift']());}catch(_0x47964f){_0x4ee0e2['push'](_0x4ee0e2['shift']());}}}(a150_0x12cb,0x8ea4a));function a150_0x3f28(_0x343bcd,_0x6184cc){_0x343bcd=_0x343bcd-0x19b;const _0x12cb9e=a150_0x12cb();let _0x3f2893=_0x12cb9e[_0x343bcd];return _0x3f2893;}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 a150_0x5157cf from'chalk';function safeStringify(_0x49f55c){const _0x443c7f=a150_0x3f28;if(typeof _0x49f55c==='string')return _0x49f55c;if(_0x49f55c instanceof Error)return _0x49f55c[_0x443c7f(0x1cf)]||_0x49f55c['name']+':\x20'+_0x49f55c[_0x443c7f(0x1c6)];try{return JSON['stringify'](_0x49f55c,(_0x3c2d68,_0x1b8f25)=>{const _0xa57ada=_0x443c7f;if(_0x1b8f25 instanceof Error)return{'name':_0x1b8f25[_0xa57ada(0x1d5)],'message':_0x1b8f25[_0xa57ada(0x1c6)],'stack':_0x1b8f25[_0xa57ada(0x1cf)],'cause':_0x1b8f25['cause']};return _0x1b8f25;});}catch{return String(_0x49f55c);}}function getTimezoneOffset(){const _0x5266ba=a150_0x3f28,_0x593bc4=-new Date()['getTimezoneOffset'](),_0x259409=Math[_0x5266ba(0x1c5)](Math[_0x5266ba(0x1dc)](_0x593bc4)/0x3c),_0x19cb6b=Math['abs'](_0x593bc4)%0x3c,_0x206c73=_0x593bc4>=0x0?'+':'-';return''+_0x206c73+_0x259409[_0x5266ba(0x1a0)]()[_0x5266ba(0x1c9)](0x2,'0')+_0x19cb6b[_0x5266ba(0x1a0)]()[_0x5266ba(0x1c9)](0x2,'0');}function formatTimestamp(){const _0x3da315=a150_0x3f28,_0xebe03d=new Date(),_0x1a5b8c=_0xebe03d[_0x3da315(0x1b5)](),_0x12ea13=(_0xebe03d[_0x3da315(0x1ce)]()+0x1)[_0x3da315(0x1a0)]()[_0x3da315(0x1c9)](0x2,'0'),_0x5b57b2=_0xebe03d['getDate']()[_0x3da315(0x1a0)]()[_0x3da315(0x1c9)](0x2,'0'),_0x1908b6=_0xebe03d[_0x3da315(0x1c8)]()[_0x3da315(0x1a0)]()[_0x3da315(0x1c9)](0x2,'0'),_0x29a3c6=_0xebe03d[_0x3da315(0x1a7)]()[_0x3da315(0x1a0)]()[_0x3da315(0x1c9)](0x2,'0'),_0x560ab2=_0xebe03d[_0x3da315(0x1b4)]()[_0x3da315(0x1a0)]()[_0x3da315(0x1c9)](0x2,'0'),_0x191bc9=_0xebe03d[_0x3da315(0x1d2)]()[_0x3da315(0x1a0)]()[_0x3da315(0x1c9)](0x3,'0'),_0x1477d7=getTimezoneOffset();return _0x1a5b8c+'-'+_0x12ea13+'-'+_0x5b57b2+'\x20'+_0x1908b6+':'+_0x29a3c6+':'+_0x560ab2+'.'+_0x191bc9+_0x1477d7;}function formatColoredLogEntry(_0x5997fb,_0x4ce84b){const _0x5e9067=a150_0x3f28,_0x2635c3=formatTimestamp(),_0x587317=_0x4ce84b[_0x5e9067(0x1a8)](safeStringify)[_0x5e9067(0x19d)]('\x20'),_0x1622d4=a150_0x5157cf[_0x5e9067(0x1af)](_0x2635c3);let _0x1977c4;switch(_0x5997fb){case _0x5e9067(0x1aa):_0x1977c4=a150_0x5157cf[_0x5e9067(0x1cc)]('['+_0x5997fb+']\x20');break;case _0x5e9067(0x1b8):_0x1977c4=a150_0x5157cf[_0x5e9067(0x1b6)]('['+_0x5997fb+']\x20');break;case'error':_0x1977c4=a150_0x5157cf[_0x5e9067(0x1da)]('['+_0x5997fb+']');break;case _0x5e9067(0x19c):_0x1977c4=a150_0x5157cf[_0x5e9067(0x1af)]('['+_0x5997fb+']');break;default:_0x1977c4='['+_0x5997fb+']';}return _0x1622d4+'\x20'+_0x1977c4+'\x20'+_0x587317;}export var LogLevel;(function(_0x262a76){const _0x284770=a150_0x3f28;_0x262a76[_0x262a76['TRACE']=-0x2]=_0x284770(0x1b9),_0x262a76[_0x262a76[_0x284770(0x1c1)]=-0x1]='DEBUG',_0x262a76[_0x262a76[_0x284770(0x1cb)]=0x0]=_0x284770(0x1cb),_0x262a76[_0x262a76['WARN']=0x1]=_0x284770(0x1ba),_0x262a76[_0x262a76[_0x284770(0x1a3)]=0x2]='ERROR';}(LogLevel||(LogLevel={})));export class TDXLogger{[a150_0x11da70(0x1d4)];['logDir'];[a150_0x11da70(0x1a6)];[a150_0x11da70(0x1d1)];constructor(_0x27a891=LogLevel[a150_0x11da70(0x1cb)],_0x249b19=![]){const _0x27a60c=a150_0x11da70;this[_0x27a60c(0x1b2)]=join(homedir(),_0x27a60c(0x1a5),'tdx',_0x27a60c(0x1d0)),this[_0x27a60c(0x1a6)]=_0x27a891,this[_0x27a60c(0x1d1)]=_0x249b19;}async[a150_0x11da70(0x19f)](){const _0x5ddd1a=a150_0x11da70;try{await mkdir(this[_0x5ddd1a(0x1b2)],{'recursive':!![]}),await this[_0x5ddd1a(0x1a1)]();const _0x5c9aa0=join(this['logDir'],_0x5ddd1a(0x1a9));this[_0x5ddd1a(0x1d4)]=createWriteStream(_0x5c9aa0,{'flags':'a'}),this['logStream']['on']('error',_0x3a0da1=>{const _0x451311=_0x5ddd1a;console['error'](_0x451311(0x1b3),_0x3a0da1[_0x451311(0x1c6)]);});}catch(_0x436fa6){console[_0x5ddd1a(0x1d7)](_0x5ddd1a(0x1ad),_0x436fa6);}}async[a150_0x11da70(0x1a1)](){const _0x542388=a150_0x11da70;try{const _0x107f27=await readdir(this[_0x542388(0x1b2)]),_0x1c566f=new Date()[_0x542388(0x1bb)]()['split']('T')[0x0];if(_0x107f27['includes'](_0x542388(0x1a9))){const _0x51699b=join(this[_0x542388(0x1b2)],_0x542388(0x1a9)),_0x4182d8=await stat(_0x51699b),_0x53779=new Date(_0x4182d8[_0x542388(0x19e)])[_0x542388(0x1bb)]()[_0x542388(0x1c2)]('T')[0x0];if(_0x53779<_0x1c566f){const _0x3f57e0=join(this[_0x542388(0x1b2)],_0x542388(0x1b7)+_0x53779+_0x542388(0x1db));await rename(_0x51699b,_0x3f57e0);}}const _0x3e13ea=await readdir(this[_0x542388(0x1b2)]),_0x11a73d=/^tdx-(\d{4}-\d{2}-\d{2})\.log$/,_0x17bfa4=_0x3e13ea[_0x542388(0x1d8)](_0x129036=>_0x11a73d[_0x542388(0x1c7)](_0x129036));for(const _0x57d731 of _0x17bfa4){const _0x2206bd=join(this[_0x542388(0x1b2)],_0x57d731),_0x3b80be=join(this['logDir'],_0x57d731+_0x542388(0x1ac));try{await pipeline(createReadStream(_0x2206bd),createGzip(),createWriteStream(_0x3b80be)),await unlink(_0x2206bd);}catch(_0x225a4e){console[_0x542388(0x1d7)](_0x542388(0x1d3)+_0x57d731+':',_0x225a4e);}}}catch{}}[a150_0x11da70(0x19c)](..._0x3eafaa){const _0x587b60=a150_0x11da70;if(this[_0x587b60(0x1a6)]>LogLevel[_0x587b60(0x1c1)])return;const _0x55440a=formatColoredLogEntry(_0x587b60(0x19c),_0x3eafaa);this['logStream']?.[_0x587b60(0x1ae)](_0x55440a+'\x0a');}[a150_0x11da70(0x1c0)](..._0xffeef9){const _0x3563d1=a150_0x11da70;if(this[_0x3563d1(0x1a6)]>LogLevel[_0x3563d1(0x1b9)])return;const _0x28ba87=formatColoredLogEntry(_0x3563d1(0x1c0),_0xffeef9);this['logStream']?.[_0x3563d1(0x1ae)](_0x28ba87+'\x0a');}[a150_0x11da70(0x1aa)](..._0x45a3bc){const _0x279c5e=a150_0x11da70;if(this[_0x279c5e(0x1a6)]>LogLevel[_0x279c5e(0x1cb)])return;const _0x9f367a=formatColoredLogEntry('info',_0x45a3bc);!this[_0x279c5e(0x1d1)]&&console['log'](_0x9f367a),this[_0x279c5e(0x1d4)]?.[_0x279c5e(0x1ae)](_0x9f367a+'\x0a');}[a150_0x11da70(0x1b8)](..._0x366a7f){const _0x1163cb=a150_0x11da70;if(this[_0x1163cb(0x1a6)]>LogLevel[_0x1163cb(0x1ba)])return;const _0x254498=formatColoredLogEntry(_0x1163cb(0x1b8),_0x366a7f);!this[_0x1163cb(0x1d1)]&&console[_0x1163cb(0x1d7)](_0x254498),this[_0x1163cb(0x1d4)]?.[_0x1163cb(0x1ae)](_0x254498+'\x0a');}['error'](..._0x3a8d7b){const _0x4ee3a6=a150_0x11da70,_0x2a9728=formatColoredLogEntry(_0x4ee3a6(0x1d7),_0x3a8d7b);!this[_0x4ee3a6(0x1d1)]&&console[_0x4ee3a6(0x1d7)](_0x2a9728),this[_0x4ee3a6(0x1d4)]?.[_0x4ee3a6(0x1ae)](_0x2a9728+'\x0a');}async[a150_0x11da70(0x1bc)](){const _0x2a4662=a150_0x11da70;return this[_0x2a4662(0x1aa)](_0x2a4662(0x1ab)),new Promise(_0x1fa67a=>{const _0x5cc461=_0x2a4662;this[_0x5cc461(0x1d4)]?this[_0x5cc461(0x1d4)][_0x5cc461(0x1c3)](()=>{_0x1fa67a();}):_0x1fa67a();});}[a150_0x11da70(0x1a2)](){const _0x4a527a=a150_0x11da70;return join(this[_0x4a527a(0x1b2)],_0x4a527a(0x1a9));}}
1
+ function a150_0x50cb(_0x265611,_0x308519){_0x265611=_0x265611-0xde;const _0xf761f0=a150_0xf761();let _0x50cb87=_0xf761f0[_0x265611];return _0x50cb87;}const a150_0x4cf6ea=a150_0x50cb;(function(_0x2bc57b,_0x35fdf9){const _0x480d9a=a150_0x50cb,_0x17eef5=_0x2bc57b();while(!![]){try{const _0x54acf8=-parseInt(_0x480d9a(0x101))/0x1*(-parseInt(_0x480d9a(0xf2))/0x2)+parseInt(_0x480d9a(0xe6))/0x3*(-parseInt(_0x480d9a(0x10b))/0x4)+-parseInt(_0x480d9a(0x11a))/0x5*(-parseInt(_0x480d9a(0xfe))/0x6)+parseInt(_0x480d9a(0x109))/0x7*(parseInt(_0x480d9a(0xf3))/0x8)+-parseInt(_0x480d9a(0x112))/0x9*(-parseInt(_0x480d9a(0x105))/0xa)+-parseInt(_0x480d9a(0xe7))/0xb*(-parseInt(_0x480d9a(0x10e))/0xc)+-parseInt(_0x480d9a(0x115))/0xd*(parseInt(_0x480d9a(0xec))/0xe);if(_0x54acf8===_0x35fdf9)break;else _0x17eef5['push'](_0x17eef5['shift']());}catch(_0x4cc741){_0x17eef5['push'](_0x17eef5['shift']());}}}(a150_0xf761,0x45e28));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 a150_0xf761(){const _0x289488=['test','2562YvOCCD','message','.gz','.cache','getFullYear','toString','1098OKprVs','56TpGgIh','map','init','getMonth','Warning:\x20Failed\x20to\x20initialize\x20log\x20files:','tdx-','name','Proxy\x20session\x20ended','padStart','ERROR','getSeconds','2746608HVZvuh','getTimezoneOffset','tdx.log','115Oenavn','fileOnly','stringify','stack','1290uWwtXL','info','yellow','gray','69741nQBAjB','DEBUG','424068FYAsQi','close','toISOString','12dJNjlg','error','string','logs','7344qAwkkK','split','write','61906RUILQJ','Warning:\x20Error\x20writing\x20to\x20tdx.log:','getHours','abs','WARN','5OomTXq','logLevel','debug','end','getMilliseconds','logDir','getMinutes','logStream','cyan','getDate','TRACE','3iAZXbe','6245833CCrQol','warn','log','INFO'];a150_0xf761=function(){return _0x289488;};return a150_0xf761();}import{pipeline}from'stream/promises';import a150_0xc566b9 from'chalk';function safeStringify(_0x7c2425){const _0x2cd734=a150_0x50cb;if(typeof _0x7c2425===_0x2cd734(0x110))return _0x7c2425;if(_0x7c2425 instanceof Error)return _0x7c2425[_0x2cd734(0x104)]||_0x7c2425[_0x2cd734(0xf9)]+':\x20'+_0x7c2425[_0x2cd734(0xed)];try{return JSON[_0x2cd734(0x103)](_0x7c2425,(_0x207ff6,_0xe441a5)=>{const _0x52f11c=_0x2cd734;if(_0xe441a5 instanceof Error)return{'name':_0xe441a5[_0x52f11c(0xf9)],'message':_0xe441a5[_0x52f11c(0xed)],'stack':_0xe441a5[_0x52f11c(0x104)],'cause':_0xe441a5['cause']};return _0xe441a5;});}catch{return String(_0x7c2425);}}function getTimezoneOffset(){const _0x386a03=a150_0x50cb,_0x1c4bf5=-new Date()[_0x386a03(0xff)](),_0x5ad305=Math['floor'](Math[_0x386a03(0x118)](_0x1c4bf5)/0x3c),_0x5c7215=Math[_0x386a03(0x118)](_0x1c4bf5)%0x3c,_0x1b4b89=_0x1c4bf5>=0x0?'+':'-';return''+_0x1b4b89+_0x5ad305['toString']()[_0x386a03(0xfb)](0x2,'0')+_0x5c7215[_0x386a03(0xf1)]()[_0x386a03(0xfb)](0x2,'0');}function formatTimestamp(){const _0xaede9f=a150_0x50cb,_0x408435=new Date(),_0x3d66f5=_0x408435[_0xaede9f(0xf0)](),_0x24df6c=(_0x408435[_0xaede9f(0xf6)]()+0x1)[_0xaede9f(0xf1)]()[_0xaede9f(0xfb)](0x2,'0'),_0x66d375=_0x408435[_0xaede9f(0xe4)]()[_0xaede9f(0xf1)]()[_0xaede9f(0xfb)](0x2,'0'),_0x1b74ac=_0x408435[_0xaede9f(0x117)]()[_0xaede9f(0xf1)]()[_0xaede9f(0xfb)](0x2,'0'),_0x542cff=_0x408435[_0xaede9f(0xe1)]()['toString']()[_0xaede9f(0xfb)](0x2,'0'),_0x4a8129=_0x408435[_0xaede9f(0xfd)]()[_0xaede9f(0xf1)]()['padStart'](0x2,'0'),_0x1b1710=_0x408435[_0xaede9f(0xdf)]()[_0xaede9f(0xf1)]()['padStart'](0x3,'0'),_0x23b55b=getTimezoneOffset();return _0x3d66f5+'-'+_0x24df6c+'-'+_0x66d375+'\x20'+_0x1b74ac+':'+_0x542cff+':'+_0x4a8129+'.'+_0x1b1710+_0x23b55b;}function formatColoredLogEntry(_0x4967c4,_0x23b828){const _0x4ab5e2=a150_0x50cb,_0x138e08=formatTimestamp(),_0x505d48=_0x23b828[_0x4ab5e2(0xf4)](safeStringify)['join']('\x20'),_0x2ade57=a150_0xc566b9['gray'](_0x138e08);let _0x1d963e;switch(_0x4967c4){case'info':_0x1d963e=a150_0xc566b9[_0x4ab5e2(0xe3)]('['+_0x4967c4+']\x20');break;case _0x4ab5e2(0xe8):_0x1d963e=a150_0xc566b9[_0x4ab5e2(0x107)]('['+_0x4967c4+']\x20');break;case _0x4ab5e2(0x10f):_0x1d963e=a150_0xc566b9['red']('['+_0x4967c4+']');break;case _0x4ab5e2(0x11c):_0x1d963e=a150_0xc566b9[_0x4ab5e2(0x108)]('['+_0x4967c4+']');break;default:_0x1d963e='['+_0x4967c4+']';}return _0x2ade57+'\x20'+_0x1d963e+'\x20'+_0x505d48;}export var LogLevel;(function(_0x1a77f7){const _0x1ac335=a150_0x50cb;_0x1a77f7[_0x1a77f7[_0x1ac335(0xe5)]=-0x2]=_0x1ac335(0xe5),_0x1a77f7[_0x1a77f7[_0x1ac335(0x10a)]=-0x1]=_0x1ac335(0x10a),_0x1a77f7[_0x1a77f7[_0x1ac335(0xea)]=0x0]=_0x1ac335(0xea),_0x1a77f7[_0x1a77f7[_0x1ac335(0x119)]=0x1]=_0x1ac335(0x119),_0x1a77f7[_0x1a77f7[_0x1ac335(0xfc)]=0x2]='ERROR';}(LogLevel||(LogLevel={})));export class TDXLogger{['logStream'];['logDir'];['logLevel'];[a150_0x4cf6ea(0x102)];constructor(_0x381bbc=LogLevel['INFO'],_0x381468=![]){const _0x4266df=a150_0x4cf6ea;this[_0x4266df(0xe0)]=join(homedir(),_0x4266df(0xef),'tdx',_0x4266df(0x111)),this[_0x4266df(0x11b)]=_0x381bbc,this['fileOnly']=_0x381468;}async[a150_0x4cf6ea(0xf5)](){const _0x7e3e32=a150_0x4cf6ea;try{await mkdir(this[_0x7e3e32(0xe0)],{'recursive':!![]}),await this['rotateOldLogs']();const _0x48a4b9=join(this[_0x7e3e32(0xe0)],_0x7e3e32(0x100));this[_0x7e3e32(0xe2)]=createWriteStream(_0x48a4b9,{'flags':'a'}),this[_0x7e3e32(0xe2)]['on'](_0x7e3e32(0x10f),_0x40336f=>{const _0x285fe6=_0x7e3e32;console[_0x285fe6(0x10f)](_0x285fe6(0x116),_0x40336f['message']);});}catch(_0x2b0e94){console[_0x7e3e32(0x10f)](_0x7e3e32(0xf7),_0x2b0e94);}}async['rotateOldLogs'](){const _0x8f1186=a150_0x4cf6ea;try{const _0x198393=await readdir(this[_0x8f1186(0xe0)]),_0x8634d3=new Date()[_0x8f1186(0x10d)]()[_0x8f1186(0x113)]('T')[0x0];if(_0x198393['includes'](_0x8f1186(0x100))){const _0x326904=join(this[_0x8f1186(0xe0)],'tdx.log'),_0x323cf6=await stat(_0x326904),_0x21bda7=new Date(_0x323cf6['mtime'])[_0x8f1186(0x10d)]()[_0x8f1186(0x113)]('T')[0x0];if(_0x21bda7<_0x8634d3){const _0x1f051f=join(this[_0x8f1186(0xe0)],_0x8f1186(0xf8)+_0x21bda7+'.log');await rename(_0x326904,_0x1f051f);}}const _0x5da604=await readdir(this[_0x8f1186(0xe0)]),_0x570d69=/^tdx-(\d{4}-\d{2}-\d{2})\.log$/,_0x2db966=_0x5da604['filter'](_0x2e4516=>_0x570d69[_0x8f1186(0xeb)](_0x2e4516));for(const _0xc60031 of _0x2db966){const _0x2f0346=join(this[_0x8f1186(0xe0)],_0xc60031),_0x164ff9=join(this[_0x8f1186(0xe0)],_0xc60031+_0x8f1186(0xee));try{await pipeline(createReadStream(_0x2f0346),createGzip(),createWriteStream(_0x164ff9)),await unlink(_0x2f0346);}catch(_0x399f2d){console[_0x8f1186(0x10f)]('Warning:\x20Failed\x20to\x20compress\x20'+_0xc60031+':',_0x399f2d);}}}catch{}}['debug'](..._0x163849){const _0x59027c=a150_0x4cf6ea;if(this['logLevel']>LogLevel[_0x59027c(0x10a)])return;const _0x1f3e48=formatColoredLogEntry(_0x59027c(0x11c),_0x163849);this[_0x59027c(0xe2)]?.['write'](_0x1f3e48+'\x0a');}['trace'](..._0xa621a5){const _0x3a6583=a150_0x4cf6ea;if(this[_0x3a6583(0x11b)]>LogLevel[_0x3a6583(0xe5)])return;const _0x2f622d=formatColoredLogEntry('trace',_0xa621a5);this[_0x3a6583(0xe2)]?.['write'](_0x2f622d+'\x0a');}[a150_0x4cf6ea(0x106)](..._0x5982e7){const _0x1162dd=a150_0x4cf6ea;if(this[_0x1162dd(0x11b)]>LogLevel[_0x1162dd(0xea)])return;const _0x201e4a=formatColoredLogEntry(_0x1162dd(0x106),_0x5982e7);!this[_0x1162dd(0x102)]&&console[_0x1162dd(0xe9)](_0x201e4a),this[_0x1162dd(0xe2)]?.[_0x1162dd(0x114)](_0x201e4a+'\x0a');}[a150_0x4cf6ea(0xe8)](..._0x2858e6){const _0x4158a2=a150_0x4cf6ea;if(this[_0x4158a2(0x11b)]>LogLevel['WARN'])return;const _0xa165ac=formatColoredLogEntry(_0x4158a2(0xe8),_0x2858e6);!this[_0x4158a2(0x102)]&&console['error'](_0xa165ac),this[_0x4158a2(0xe2)]?.['write'](_0xa165ac+'\x0a');}[a150_0x4cf6ea(0x10f)](..._0x3ade78){const _0x2dac9a=a150_0x4cf6ea,_0x487270=formatColoredLogEntry(_0x2dac9a(0x10f),_0x3ade78);!this[_0x2dac9a(0x102)]&&console[_0x2dac9a(0x10f)](_0x487270),this[_0x2dac9a(0xe2)]?.[_0x2dac9a(0x114)](_0x487270+'\x0a');}async[a150_0x4cf6ea(0x10c)](){const _0x53a8ef=a150_0x4cf6ea;return this[_0x53a8ef(0x106)](_0x53a8ef(0xfa)),new Promise(_0x9dc044=>{const _0x2397c3=_0x53a8ef;this[_0x2397c3(0xe2)]?this[_0x2397c3(0xe2)][_0x2397c3(0xde)](()=>{_0x9dc044();}):_0x9dc044();});}['getLogPath'](){const _0x4ce320=a150_0x4cf6ea;return join(this[_0x4ce320(0xe0)],'tdx.log');}}
@@ -1 +1 @@
1
- (function(_0x5c8360,_0x3aeaee){const _0x21502f=a151_0x47f5,_0x336670=_0x5c8360();while(!![]){try{const _0x5ecf53=-parseInt(_0x21502f(0xf8))/0x1+parseInt(_0x21502f(0x109))/0x2+parseInt(_0x21502f(0x10e))/0x3*(parseInt(_0x21502f(0x10d))/0x4)+parseInt(_0x21502f(0x111))/0x5+parseInt(_0x21502f(0x118))/0x6*(-parseInt(_0x21502f(0xfd))/0x7)+parseInt(_0x21502f(0x10f))/0x8*(parseInt(_0x21502f(0x11a))/0x9)+-parseInt(_0x21502f(0x11b))/0xa;if(_0x5ecf53===_0x3aeaee)break;else _0x336670['push'](_0x336670['shift']());}catch(_0x467e19){_0x336670['push'](_0x336670['shift']());}}}(a151_0x4c94,0xa3439));import{get}from'https';import{readFileSync,writeFileSync,mkdirSync}from'fs';import{join}from'path';import{gt,valid}from'semver';import a151_0x2447ae 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 a151_0x47f5(_0x32bd47,_0x55321e){_0x32bd47=_0x32bd47-0xf3;const _0x4c9407=a151_0x4c94();let _0x47f531=_0x4c9407[_0x32bd47];return _0x47f531;}function getCacheFilePath(){const _0xdc300a=a151_0x47f5,_0x51c141=getCacheDir();return join(_0x51c141,_0xdc300a(0x114));}function readCache(){const _0x48216d=a151_0x47f5;try{const _0x27e286=getCacheFilePath(),_0x241f69=readFileSync(_0x27e286,_0x48216d(0xfa));return JSON['parse'](_0x241f69);}catch{return null;}}function writeCache(_0x15ac42){const _0x1a8eac=a151_0x47f5;try{const _0x9c017f=getCacheDir();mkdirSync(_0x9c017f,{'recursive':!![]});const _0x2c10a2={'lastCheck':new Date()[_0x1a8eac(0x108)](),'latestVersion':_0x15ac42},_0x2b6e2d=getCacheFilePath();writeFileSync(_0x2b6e2d,JSON[_0x1a8eac(0xf6)](_0x2c10a2,null,0x2),_0x1a8eac(0xfa));}catch{}}function isCacheValid(_0x313bba){const _0x462970=a151_0x47f5;if(!_0x313bba)return![];const _0x20ab16=new Date(_0x313bba[_0x462970(0xff)])[_0x462970(0x104)](),_0x502131=Date[_0x462970(0x10a)]();return _0x502131-_0x20ab16<CACHE_DURATION_MS;}function fetchLatestVersion(){return new Promise((_0x4c2cbf,_0x558362)=>{const _0x527d0b=a151_0x47f5,_0x40bda3=get(NPM_REGISTRY_URL,_0x108a9e=>{const _0x4138c5=a151_0x47f5;if(_0x108a9e[_0x4138c5(0xfe)]!==0xc8){clearTimeout(_0x5e8f26),_0x558362(new Error(_0x4138c5(0x119)+_0x108a9e[_0x4138c5(0xfe)]));return;}let _0x42fffc='';_0x108a9e['on'](_0x4138c5(0xf4),_0x34a2ba=>{_0x42fffc+=_0x34a2ba;}),_0x108a9e['on']('end',()=>{const _0x1f0424=_0x4138c5;clearTimeout(_0x5e8f26);try{const _0x3bdede=JSON[_0x1f0424(0x101)](_0x42fffc);if(!valid(_0x3bdede[_0x1f0424(0xfc)])){_0x558362(new Error(_0x1f0424(0x110)));return;}_0x4c2cbf(_0x3bdede[_0x1f0424(0xfc)]);}catch(_0x40cccb){_0x558362(_0x40cccb);}});})['on'](_0x527d0b(0x102),_0x2a724f=>{clearTimeout(_0x5e8f26),_0x558362(_0x2a724f);}),_0x5e8f26=setTimeout(()=>{const _0xfb4c0f=_0x527d0b;_0x40bda3[_0xfb4c0f(0x100)](),_0x558362(new Error(_0xfb4c0f(0xfb)));},TIMEOUT_MS);});}export async function checkForUpdate(_0x23e97b){const _0x5210fb=a151_0x47f5;try{const _0x11cc7e=readCache();if(isCacheValid(_0x11cc7e)){const _0x33097f=gt(_0x11cc7e[_0x5210fb(0xf7)],_0x23e97b);return{'updateAvailable':_0x33097f,'currentVersion':_0x23e97b,'latestVersion':_0x11cc7e[_0x5210fb(0xf7)]};}const _0x47022e=await fetchLatestVersion();writeCache(_0x47022e);const _0x2f2e0b=gt(_0x47022e,_0x23e97b);return{'updateAvailable':_0x2f2e0b,'currentVersion':_0x23e97b,'latestVersion':_0x47022e};}catch{return null;}}function a151_0x4c94(){const _0x4d1d9c=['Run:','toISOString','738346iDhTsu','now','\x0aRun:\x20','green','5956VNEUsg','726aCsYIL','8vZUqIo','Invalid\x20version\x20format','3453585prVYHG','Update\x20available:','yellow','last_version_check','updateAvailable','\x0aUpdate\x20available:\x20','currentVersion','315786ukMmwk','HTTP\x20','6016527myawmZ','9822960tVTtLG','cyan','npm\x20install\x20-g\x20@treasuredata/tdx@latest','data','dim','stringify','latestVersion','174551yomAap','stderr','utf-8','Request\x20timeout','version','35XLWUUT','statusCode','lastCheck','destroy','parse','error','write','getTime','isTTY','gray'];a151_0x4c94=function(){return _0x4d1d9c;};return a151_0x4c94();}export function displayUpdateNotification(_0x2dbde9){const _0x5b418f=a151_0x47f5;if(!_0x2dbde9[_0x5b418f(0x115)])return;const _0x574aeb=process[_0x5b418f(0xf9)][_0x5b418f(0x105)]&&!process['env']['NO_COLOR'],_0x4aa6f3=_0x574aeb?a151_0x2447ae[_0x5b418f(0x106)]('→'):'→',_0x175dfd=_0x574aeb?a151_0x2447ae[_0x5b418f(0xf5)](_0x2dbde9[_0x5b418f(0x117)]):_0x2dbde9[_0x5b418f(0x117)],_0x400780=_0x574aeb?a151_0x2447ae[_0x5b418f(0x10c)](_0x2dbde9[_0x5b418f(0xf7)]):_0x2dbde9['latestVersion'],_0x233f4e=_0x574aeb?a151_0x2447ae[_0x5b418f(0x11c)](_0x5b418f(0xf3)):_0x5b418f(0xf3),_0x58aa10=_0x574aeb?'\x0a'+a151_0x2447ae[_0x5b418f(0x113)](_0x5b418f(0x112))+'\x20'+_0x175dfd+'\x20'+_0x4aa6f3+'\x20'+_0x400780+'\x0a'+a151_0x2447ae[_0x5b418f(0xf5)](_0x5b418f(0x107))+'\x20'+_0x233f4e+'\x0a':_0x5b418f(0x116)+_0x175dfd+'\x20'+_0x4aa6f3+'\x20'+_0x400780+_0x5b418f(0x10b)+_0x233f4e+'\x0a';process['stderr'][_0x5b418f(0x103)](_0x58aa10);}
1
+ const a151_0x700526=a151_0x221d;(function(_0x669753,_0x48a035){const _0x39a18d=a151_0x221d,_0x3eb7bb=_0x669753();while(!![]){try{const _0x220378=-parseInt(_0x39a18d(0x1c6))/0x1*(parseInt(_0x39a18d(0x1e3))/0x2)+-parseInt(_0x39a18d(0x1d9))/0x3*(-parseInt(_0x39a18d(0x1d6))/0x4)+parseInt(_0x39a18d(0x1e0))/0x5*(parseInt(_0x39a18d(0x1c2))/0x6)+parseInt(_0x39a18d(0x1d4))/0x7*(parseInt(_0x39a18d(0x1d3))/0x8)+parseInt(_0x39a18d(0x1da))/0x9*(parseInt(_0x39a18d(0x1cc))/0xa)+parseInt(_0x39a18d(0x1cb))/0xb*(-parseInt(_0x39a18d(0x1e7))/0xc)+-parseInt(_0x39a18d(0x1e4))/0xd;if(_0x220378===_0x48a035)break;else _0x3eb7bb['push'](_0x3eb7bb['shift']());}catch(_0xa66601){_0x3eb7bb['push'](_0x3eb7bb['shift']());}}}(a151_0x2088,0x1fbe1));function a151_0x2088(){const _0x26e148=['https://registry.npmjs.org/@treasuredata/tdx/latest','9hiteLG','9OBlaLt','green','write','HTTP\x20','Run:','stringify','5yCvOds','dim','version','10930IMWggM','2511496kBJDct','last_version_check','Update\x20available:','1700760cDoUcI','end','stderr','\x0aRun:\x20','destroy','yellow','1201866arTDZh','utf-8','cyan','getTime','45GKKVQG','gray','Request\x20timeout','updateAvailable','isTTY','11jLdtiD','1598110UBXBLY','env','error','toISOString','statusCode','latestVersion','currentVersion','685704RszacY','21UgvWpg','npm\x20install\x20-g\x20@treasuredata/tdx@latest','124804GvlPlQ','parse'];a151_0x2088=function(){return _0x26e148;};return a151_0x2088();}import{get}from'https';import{readFileSync,writeFileSync,mkdirSync}from'fs';import{join}from'path';import{gt,valid}from'semver';import a151_0x537668 from'chalk';import{getCacheDir}from'../core/config.js';const CACHE_DURATION_MS=0x18*0x3c*0x3c*0x3e8,NPM_REGISTRY_URL=a151_0x700526(0x1d8),TIMEOUT_MS=0x7d0;function getCacheFilePath(){const _0x1ac90b=a151_0x700526,_0x465acb=getCacheDir();return join(_0x465acb,_0x1ac90b(0x1e5));}function readCache(){const _0x5b65ac=a151_0x700526;try{const _0x4a1b10=getCacheFilePath(),_0x4adfb4=readFileSync(_0x4a1b10,_0x5b65ac(0x1c3));return JSON['parse'](_0x4adfb4);}catch{return null;}}function writeCache(_0x1ac42f){const _0x28bc47=a151_0x700526;try{const _0x369341=getCacheDir();mkdirSync(_0x369341,{'recursive':!![]});const _0x4a4f78={'lastCheck':new Date()[_0x28bc47(0x1cf)](),'latestVersion':_0x1ac42f},_0x246c6b=getCacheFilePath();writeFileSync(_0x246c6b,JSON[_0x28bc47(0x1df)](_0x4a4f78,null,0x2),_0x28bc47(0x1c3));}catch{}}function isCacheValid(_0x259556){const _0x41e61a=a151_0x700526;if(!_0x259556)return![];const _0x4ac1eb=new Date(_0x259556['lastCheck'])[_0x41e61a(0x1c5)](),_0x20c295=Date['now']();return _0x20c295-_0x4ac1eb<CACHE_DURATION_MS;}function fetchLatestVersion(){return new Promise((_0x2e1b46,_0x31afb4)=>{const _0xa6e07b=a151_0x221d,_0x45e6a8=get(NPM_REGISTRY_URL,_0x596a10=>{const _0x29e2f2=a151_0x221d;if(_0x596a10[_0x29e2f2(0x1d0)]!==0xc8){clearTimeout(_0x42d65d),_0x31afb4(new Error(_0x29e2f2(0x1dd)+_0x596a10[_0x29e2f2(0x1d0)]));return;}let _0x130cad='';_0x596a10['on']('data',_0xcd9730=>{_0x130cad+=_0xcd9730;}),_0x596a10['on'](_0x29e2f2(0x1e8),()=>{const _0x2dc374=_0x29e2f2;clearTimeout(_0x42d65d);try{const _0x5b17f9=JSON[_0x2dc374(0x1d7)](_0x130cad);if(!valid(_0x5b17f9[_0x2dc374(0x1e2)])){_0x31afb4(new Error('Invalid\x20version\x20format'));return;}_0x2e1b46(_0x5b17f9[_0x2dc374(0x1e2)]);}catch(_0x1234f4){_0x31afb4(_0x1234f4);}});})['on'](_0xa6e07b(0x1ce),_0x5b872f=>{clearTimeout(_0x42d65d),_0x31afb4(_0x5b872f);}),_0x42d65d=setTimeout(()=>{const _0x1723a7=_0xa6e07b;_0x45e6a8[_0x1723a7(0x1eb)](),_0x31afb4(new Error(_0x1723a7(0x1c8)));},TIMEOUT_MS);});}export async function checkForUpdate(_0x293d48){const _0x1652ca=a151_0x700526;try{const _0x2a88ae=readCache();if(isCacheValid(_0x2a88ae)){const _0x5a06f6=gt(_0x2a88ae[_0x1652ca(0x1d1)],_0x293d48);return{'updateAvailable':_0x5a06f6,'currentVersion':_0x293d48,'latestVersion':_0x2a88ae[_0x1652ca(0x1d1)]};}const _0x29fe95=await fetchLatestVersion();writeCache(_0x29fe95);const _0x4b06b0=gt(_0x29fe95,_0x293d48);return{'updateAvailable':_0x4b06b0,'currentVersion':_0x293d48,'latestVersion':_0x29fe95};}catch{return null;}}function a151_0x221d(_0x21e605,_0x365db6){_0x21e605=_0x21e605-0x1c1;const _0x20884d=a151_0x2088();let _0x221d2a=_0x20884d[_0x21e605];return _0x221d2a;}export function displayUpdateNotification(_0x3be569){const _0x176189=a151_0x700526;if(!_0x3be569[_0x176189(0x1c9)])return;const _0x22a1f8=process['stderr'][_0x176189(0x1ca)]&&!process[_0x176189(0x1cd)]['NO_COLOR'],_0x40360e=_0x22a1f8?a151_0x537668[_0x176189(0x1c7)]('→'):'→',_0x1ad9fe=_0x22a1f8?a151_0x537668[_0x176189(0x1e1)](_0x3be569[_0x176189(0x1d2)]):_0x3be569['currentVersion'],_0x36c27b=_0x22a1f8?a151_0x537668[_0x176189(0x1db)](_0x3be569[_0x176189(0x1d1)]):_0x3be569[_0x176189(0x1d1)],_0x541411=_0x22a1f8?a151_0x537668[_0x176189(0x1c4)](_0x176189(0x1d5)):_0x176189(0x1d5),_0x3ec5e8=_0x22a1f8?'\x0a'+a151_0x537668[_0x176189(0x1c1)](_0x176189(0x1e6))+'\x20'+_0x1ad9fe+'\x20'+_0x40360e+'\x20'+_0x36c27b+'\x0a'+a151_0x537668['dim'](_0x176189(0x1de))+'\x20'+_0x541411+'\x0a':'\x0aUpdate\x20available:\x20'+_0x1ad9fe+'\x20'+_0x40360e+'\x20'+_0x36c27b+_0x176189(0x1ea)+_0x541411+'\x0a';process[_0x176189(0x1e9)][_0x176189(0x1dc)](_0x3ec5e8);}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@treasuredata/tdx",
3
- "version": "0.14.6",
3
+ "version": "0.14.8",
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": {
@@ -27,7 +27,7 @@
27
27
  },
28
28
  "scripts": {
29
29
  "build:info": "bash scripts/generate-build-info.sh",
30
- "build:ts": "npm run build:info && tsc && chmod +x dist/bin.js && cp src/build-info.json dist/build-info.json",
30
+ "build:ts": "npm run build:info && tsc && chmod +x dist/bin.js && cp src/build-info.json dist/build-info.json && node -e \"require('fs').copyFileSync('dist/bin.js','dist/tdx')\"",
31
31
  "build:install": "npm run build:ts && npm install -g",
32
32
  "build:obfuscate": "javascript-obfuscator ./dist --output ./dist",
33
33
  "build": "npm run build:ts && npm run build:obfuscate",