@treasuredata/tdx 0.8.1 → 0.8.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (113) hide show
  1. package/dist/bin.js +1 -1
  2. package/dist/build-info.json +2 -2
  3. package/dist/cli-categories.js +1 -1
  4. package/dist/cli.d.ts.map +1 -1
  5. package/dist/cli.js +1 -1
  6. package/dist/cli.js.map +1 -1
  7. package/dist/client/cdp-api-client.js +1 -1
  8. package/dist/client/engage-api-client.js +1 -1
  9. package/dist/client/http-client.js +1 -1
  10. package/dist/client/llm-api-client.js +1 -1
  11. package/dist/client/rate-limiter.js +1 -1
  12. package/dist/client/td-api-client.js +1 -1
  13. package/dist/client/trino-api-client.js +1 -1
  14. package/dist/client/workflow-client.js +1 -1
  15. package/dist/commands/activations.js +1 -1
  16. package/dist/commands/api-command.js +1 -1
  17. package/dist/commands/auth-command.js +1 -1
  18. package/dist/commands/chat-command.js +1 -1
  19. package/dist/commands/claude-command.d.ts.map +1 -1
  20. package/dist/commands/claude-command.js +1 -1
  21. package/dist/commands/claude-command.js.map +1 -1
  22. package/dist/commands/claude-statusline-command.js +1 -1
  23. package/dist/commands/claude-usage-command.js +1 -1
  24. package/dist/commands/command.js +1 -1
  25. package/dist/commands/connection-command.js +1 -1
  26. package/dist/commands/context-command.js +1 -1
  27. package/dist/commands/databases.js +1 -1
  28. package/dist/commands/describe.js +1 -1
  29. package/dist/commands/engage-command.js +1 -1
  30. package/dist/commands/job-command.js +1 -1
  31. package/dist/commands/llm-command.js +1 -1
  32. package/dist/commands/llm-proxy.js +1 -1
  33. package/dist/commands/parent-segment-command.js +1 -1
  34. package/dist/commands/profiles-command.js +1 -1
  35. package/dist/commands/query-command.js +1 -1
  36. package/dist/commands/segment-command.js +1 -1
  37. package/dist/commands/segment-create-command.js +1 -1
  38. package/dist/commands/segment-fields-command.js +1 -1
  39. package/dist/commands/segment-pull-command.js +1 -1
  40. package/dist/commands/segment-push-command.js +1 -1
  41. package/dist/commands/segment-update-command.js +1 -1
  42. package/dist/commands/segment-use-command.js +1 -1
  43. package/dist/commands/segments.js +1 -1
  44. package/dist/commands/show.js +1 -1
  45. package/dist/commands/tables.js +1 -1
  46. package/dist/commands/use-command.js +1 -1
  47. package/dist/commands/user-command.js +1 -1
  48. package/dist/commands/workflow-command.js +1 -1
  49. package/dist/core/auth.js +1 -1
  50. package/dist/core/config.js +1 -1
  51. package/dist/core/connection-cache.js +1 -1
  52. package/dist/core/credential-cache.js +1 -1
  53. package/dist/core/global-context.js +1 -1
  54. package/dist/core/keychain.js +1 -1
  55. package/dist/core/profile.js +1 -1
  56. package/dist/core/project-config.js +1 -1
  57. package/dist/core/session.js +1 -1
  58. package/dist/core/user-cache.js +1 -1
  59. package/dist/index.js +1 -1
  60. package/dist/proxy/anthropic-adapter.js +1 -1
  61. package/dist/proxy/claude-usage-tracker.js +1 -1
  62. package/dist/proxy/context-signature.js +1 -1
  63. package/dist/proxy/conversation-utils.js +1 -1
  64. package/dist/proxy/server.js +1 -1
  65. package/dist/proxy/session-cache.js +1 -1
  66. package/dist/sdk/api.js +1 -1
  67. package/dist/sdk/connection.js +1 -1
  68. package/dist/sdk/engage.js +1 -1
  69. package/dist/sdk/errors.js +1 -1
  70. package/dist/sdk/index.js +1 -1
  71. package/dist/sdk/job.js +1 -1
  72. package/dist/sdk/llm.js +1 -1
  73. package/dist/sdk/query.js +1 -1
  74. package/dist/sdk/segment/child-segment-yaml.js +1 -1
  75. package/dist/sdk/segment/parent-segment-preview.js +1 -1
  76. package/dist/sdk/segment/parent-segment-yaml.js +1 -1
  77. package/dist/sdk/segment.js +1 -1
  78. package/dist/sdk/user.js +1 -1
  79. package/dist/sdk/workflow.js +1 -1
  80. package/dist/types/endpoints.js +1 -1
  81. package/dist/types/index.js +1 -1
  82. package/dist/utils/agent-ref-parser.js +1 -1
  83. package/dist/utils/async.js +1 -1
  84. package/dist/utils/chat-cache.js +1 -1
  85. package/dist/utils/colors.js +1 -1
  86. package/dist/utils/command-output.js +1 -1
  87. package/dist/utils/constants.js +1 -1
  88. package/dist/utils/diff.js +1 -1
  89. package/dist/utils/fields-display.js +1 -1
  90. package/dist/utils/file-permissions.js +1 -1
  91. package/dist/utils/format-detector.js +1 -1
  92. package/dist/utils/formatters.js +1 -1
  93. package/dist/utils/json-loader.js +1 -1
  94. package/dist/utils/llm-backup-utils.js +1 -1
  95. package/dist/utils/model-aliases.js +1 -1
  96. package/dist/utils/model-factors.js +1 -1
  97. package/dist/utils/option-validation.js +1 -1
  98. package/dist/utils/port.js +1 -1
  99. package/dist/utils/process.js +1 -1
  100. package/dist/utils/prompt.js +1 -1
  101. package/dist/utils/segment-path-parser.js +1 -1
  102. package/dist/utils/segment-ref-parser.js +1 -1
  103. package/dist/utils/spinner.js +1 -1
  104. package/dist/utils/sql-parser.js +1 -1
  105. package/dist/utils/sse-parser.js +1 -1
  106. package/dist/utils/string-utils.js +1 -1
  107. package/dist/utils/table-ref-parser.js +1 -1
  108. package/dist/utils/tdx-config.js +1 -1
  109. package/dist/utils/tdx-logger.js +1 -1
  110. package/dist/utils/tree-formatter.js +1 -1
  111. package/dist/utils/version-check.js +1 -1
  112. package/dist/utils/workflow-utils.js +1 -1
  113. package/package.json +1 -1
@@ -1 +1 @@
1
- function a36_0x4a31(_0x5e8aee,_0x521124){_0x5e8aee=_0x5e8aee-0x1ef;const _0x2f76e0=a36_0x2f76();let _0x4a31ba=_0x2f76e0[_0x5e8aee];return _0x4a31ba;}const a36_0x3d6d08=a36_0x4a31;(function(_0x54c53a,_0x1febf6){const _0x1ffe68=a36_0x4a31,_0x1051c8=_0x54c53a();while(!![]){try{const _0x36684e=-parseInt(_0x1ffe68(0x205))/0x1*(-parseInt(_0x1ffe68(0x214))/0x2)+parseInt(_0x1ffe68(0x209))/0x3*(-parseInt(_0x1ffe68(0x1fc))/0x4)+-parseInt(_0x1ffe68(0x1f4))/0x5+parseInt(_0x1ffe68(0x206))/0x6*(-parseInt(_0x1ffe68(0x1fb))/0x7)+parseInt(_0x1ffe68(0x1ff))/0x8*(-parseInt(_0x1ffe68(0x21e))/0x9)+parseInt(_0x1ffe68(0x1f6))/0xa*(-parseInt(_0x1ffe68(0x21a))/0xb)+parseInt(_0x1ffe68(0x204))/0xc;if(_0x36684e===_0x1febf6)break;else _0x1051c8['push'](_0x1051c8['shift']());}catch(_0x52439e){_0x1051c8['push'](_0x1051c8['shift']());}}}(a36_0x2f76,0x4a03f));import{existsSync,statSync}from'fs';import a36_0x2c3f7d from'chalk';import{BaseCommand}from'./command.js';function a36_0x2f76(){const _0xb5a3e2=['Set\x20current\x20segment/folder\x20context\x20for\x20navigation','red','\x20\x20tdx\x20segment\x20use\x20\x22My\x20Audience/Marketing\x22','Resolved\x20relative\x20path\x20to:\x20','Parent\x20ID:\x20','Tip:\x20Run\x20`tdx\x20sg\x20pull\x20<parent_name>`\x20first\x20to\x20create\x20the\x20folder\x20structure','parentId','Use\x20\x22tdx\x20segments\x22\x20to\x20list\x20contents\x20in\x20this\x20context','fullPath','288loZmWa','Resolved\x20path\x20type:\x20','segments','Error:\x20Path\x20is\x20required\x0a','type','Site:\x20','4004JzUVAu','Use\x20\x22tdx\x20context\x22\x20to\x20see\x20all\x20context\x20parameters','folderPath','parent_segment','9lLuMBv','length','segmentPath','cyan','join','Folder\x20ID:\x20','✔\x20Context\x20cleared.\x20Back\x20to\x20root.','name','data','execute','error','\x20\x20tdx\x20segment\x20use\x20\x22My\x20Audience\x22','Error:\x20No\x20context\x20set.\x20Cannot\x20use\x20relative\x20path.','✔\x20Context\x20set\x20to:\x20','slice','description','Target\x20path:\x20','Use:\x20tdx\x20segment\x20use\x20','1375560PzvqcO','verbose','9460iDRlZa','folderId','site','parentName','resolvePathToResource','7042HAxAaQ','188EVARMs','Use\x20an\x20absolute\x20path\x20or\x20set\x20context\x20with:\x20tdx\x20segment\x20use\x20<parent_name>','Resolving\x20path\x20\x27','1850216EQpPbz','\x27...','segment','dim','green','16571256XZeFwb','2875ktiAAM','1278cFDFUJ','Context\x20can\x20only\x20be\x20set\x20to\x20a\x20parent\x20segment\x20or\x20folder.','\x20\x20tdx\x20segment\x20use\x20/\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Clear\x20context','27240JryqYL','log'];a36_0x2f76=function(){return _0xb5a3e2;};return a36_0x2f76();}import{saveSessionContext}from'../core/session.js';import{withSpinner}from'../utils/spinner.js';import{parsePath,normalizePath}from'../utils/segment-path-parser.js';import{findTdxConfig}from'../utils/tdx-config.js';export class SegmentUseCommand extends BaseCommand{[a36_0x3d6d08(0x225)]='segment:use';[a36_0x3d6d08(0x1f1)]=a36_0x3d6d08(0x20b);async[a36_0x3d6d08(0x227)](_0x3704f8){const _0x42cae0=a36_0x3d6d08,{options:_0x1f7ca4,args:_0x13ad55,tdx:_0x527ce8}=_0x3704f8;if(_0x13ad55[_0x42cae0(0x21f)]===0x0)return console[_0x42cae0(0x228)](a36_0x2c3f7d[_0x42cae0(0x20c)](_0x42cae0(0x217))),console[_0x42cae0(0x228)]('Usage:\x20tdx\x20segment\x20use\x20<path>'),console[_0x42cae0(0x228)]('Examples:'),console['error'](_0x42cae0(0x229)),console[_0x42cae0(0x228)](_0x42cae0(0x20d)),console[_0x42cae0(0x228)](_0x42cae0(0x208)),console[_0x42cae0(0x228)]('\x20\x20tdx\x20segment\x20use\x20..\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Go\x20to\x20parent'),0x1;const _0x3f9fbe=_0x13ad55[0x0],_0x4e0a33=_0x1f7ca4['session'];try{if(_0x3f9fbe==='/')return saveSessionContext({'segment_path':undefined},_0x4e0a33),console[_0x42cae0(0x20a)](a36_0x2c3f7d[_0x42cae0(0x203)](_0x42cae0(0x224))),0x0;if(existsSync(_0x3f9fbe)&&statSync(_0x3f9fbe)['isDirectory']()){let _0xb2d265;try{_0xb2d265=findTdxConfig(_0x3f9fbe);}catch{return console[_0x42cae0(0x228)](a36_0x2c3f7d['red']('Error:\x20No\x20tdx.json\x20found\x20in\x20or\x20above:\x20'+_0x3f9fbe)),console[_0x42cae0(0x228)](a36_0x2c3f7d[_0x42cae0(0x221)](_0x42cae0(0x210))),0x1;}const _0x467817=_0xb2d265['config'][_0x42cae0(0x21d)];return saveSessionContext({'segment_path':_0x467817,'parent_segment':_0x467817},_0x4e0a33),console[_0x42cae0(0x20a)](a36_0x2c3f7d[_0x42cae0(0x203)]('✔\x20Context\x20set\x20to:\x20'+a36_0x2c3f7d[_0x42cae0(0x221)](_0x467817))),0x0;}const _0x1a16f8=_0x1f7ca4[_0x42cae0(0x220)];let _0x25e4a3=_0x3f9fbe;const _0x3b199e=parsePath(_0x3f9fbe);if(!_0x3b199e['isAbsolute']){if(!_0x1a16f8)return console['error'](a36_0x2c3f7d[_0x42cae0(0x20c)](_0x42cae0(0x22a))),console[_0x42cae0(0x228)](a36_0x2c3f7d[_0x42cae0(0x221)](_0x42cae0(0x1fd))),0x1;if(_0x3f9fbe==='..'){const _0x1efa94=_0x1a16f8['split']('/')[_0x42cae0(0x1f0)](0x0,-0x1)['join']('/');_0x25e4a3=_0x1efa94||'/';}else _0x3f9fbe==='.'?_0x25e4a3=_0x1a16f8:_0x25e4a3=_0x1a16f8+'/'+_0x3f9fbe;_0x1f7ca4[_0x42cae0(0x1f5)]&&console[_0x42cae0(0x228)](_0x42cae0(0x20e)+_0x25e4a3);}if(_0x25e4a3==='/'||_0x25e4a3==='')return saveSessionContext({'segment_path':undefined},_0x4e0a33),console[_0x42cae0(0x20a)](a36_0x2c3f7d[_0x42cae0(0x203)](_0x42cae0(0x224))),0x0;_0x25e4a3=normalizePath(_0x25e4a3);const _0x39a2c5=parsePath(_0x25e4a3)[_0x42cae0(0x216)];if(_0x39a2c5[_0x42cae0(0x21f)]===0x0)return saveSessionContext({'segment_path':undefined},_0x4e0a33),console[_0x42cae0(0x20a)](a36_0x2c3f7d[_0x42cae0(0x203)]('✔\x20Context\x20cleared.\x20Back\x20to\x20root.')),0x0;_0x1f7ca4[_0x42cae0(0x1f5)]&&(console[_0x42cae0(0x228)](_0x42cae0(0x219)+_0x1f7ca4[_0x42cae0(0x1f8)]),console[_0x42cae0(0x228)](_0x42cae0(0x1f2)+_0x25e4a3));const _0xeb7a0b=await withSpinner(_0x42cae0(0x1fe)+_0x25e4a3+_0x42cae0(0x200),()=>_0x527ce8[_0x42cae0(0x201)][_0x42cae0(0x1fa)](_0x25e4a3),{'verbose':_0x1f7ca4[_0x42cae0(0x1f5)]}),_0x391784=_0xeb7a0b[_0x42cae0(0x226)];_0x1f7ca4[_0x42cae0(0x1f5)]&&(console[_0x42cae0(0x228)](_0x42cae0(0x215)+_0x391784[_0x42cae0(0x218)]),console[_0x42cae0(0x228)](_0x42cae0(0x20f)+_0x391784[_0x42cae0(0x211)]),_0x391784['folderId']&&console['error'](_0x42cae0(0x223)+_0x391784[_0x42cae0(0x1f7)]));if(_0x391784[_0x42cae0(0x218)]===_0x42cae0(0x201))return console[_0x42cae0(0x228)](a36_0x2c3f7d[_0x42cae0(0x20c)]('Error:\x20Cannot\x20set\x20context\x20to\x20a\x20segment.')),console[_0x42cae0(0x228)](_0x42cae0(0x207)),console['error'](a36_0x2c3f7d[_0x42cae0(0x221)](_0x42cae0(0x1f3)+_0x391784[_0x42cae0(0x1f9)]+(_0x391784[_0x42cae0(0x21c)]?'/'+_0x391784[_0x42cae0(0x21c)][_0x42cae0(0x222)]('/'):''))),0x1;return saveSessionContext({'segment_path':_0x391784[_0x42cae0(0x213)],'parent_segment':_0x391784[_0x42cae0(0x1f9)]},_0x4e0a33),console['log'](a36_0x2c3f7d['green'](_0x42cae0(0x1ef)+a36_0x2c3f7d[_0x42cae0(0x221)](_0x391784[_0x42cae0(0x213)]))),_0x1f7ca4[_0x42cae0(0x1f5)]&&(console[_0x42cae0(0x228)](a36_0x2c3f7d[_0x42cae0(0x202)](_0x42cae0(0x212))),console[_0x42cae0(0x228)](a36_0x2c3f7d[_0x42cae0(0x202)](_0x42cae0(0x21b)))),0x0;}catch(_0x683eb3){throw _0x683eb3;}}}
1
+ const a36_0x4531a9=a36_0x16ce;(function(_0x262784,_0x19c988){const _0x3267d9=a36_0x16ce,_0x37c228=_0x262784();while(!![]){try{const _0x2d5b1f=-parseInt(_0x3267d9(0x161))/0x1+-parseInt(_0x3267d9(0x15e))/0x2*(-parseInt(_0x3267d9(0x172))/0x3)+-parseInt(_0x3267d9(0x174))/0x4+-parseInt(_0x3267d9(0x181))/0x5*(parseInt(_0x3267d9(0x159))/0x6)+-parseInt(_0x3267d9(0x16a))/0x7+-parseInt(_0x3267d9(0x170))/0x8*(-parseInt(_0x3267d9(0x163))/0x9)+parseInt(_0x3267d9(0x151))/0xa*(parseInt(_0x3267d9(0x167))/0xb);if(_0x2d5b1f===_0x19c988)break;else _0x37c228['push'](_0x37c228['shift']());}catch(_0x49e102){_0x37c228['push'](_0x37c228['shift']());}}}(a36_0x1fee,0x33880));import{existsSync,statSync}from'fs';import a36_0x1f79b5 from'chalk';function a36_0x16ce(_0x36d0a2,_0x199f8a){_0x36d0a2=_0x36d0a2-0x150;const _0x1fee3e=a36_0x1fee();let _0x16ceef=_0x1fee3e[_0x36d0a2];return _0x16ceef;}import{BaseCommand}from'./command.js';import{saveSessionContext}from'../core/session.js';import{withSpinner}from'../utils/spinner.js';import{parsePath,normalizePath}from'../utils/segment-path-parser.js';import{findTdxConfig}from'../utils/tdx-config.js';function a36_0x1fee(){const _0x49983d=['dim','24VOJBaN','Error:\x20Path\x20is\x20required\x0a','6gKPDKE','Tip:\x20Run\x20`tdx\x20sg\x20pull\x20<parent_name>`\x20first\x20to\x20create\x20the\x20folder\x20structure','4752oVTAJK','\x20\x20tdx\x20segment\x20use\x20..\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Go\x20to\x20parent','Use\x20\x22tdx\x20context\x22\x20to\x20see\x20all\x20context\x20parameters','slice','Target\x20path:\x20','✔\x20Context\x20set\x20to:\x20','\x27...','parentId','data','parent_segment','fullPath','✔\x20Context\x20cleared.\x20Back\x20to\x20root.','\x20\x20tdx\x20segment\x20use\x20/\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Clear\x20context','58065fgrGUu','segment:use','cyan','folderPath','verbose','isDirectory','Site:\x20','Resolved\x20path\x20type:\x20','length','Use\x20\x22tdx\x20segments\x22\x20to\x20list\x20contents\x20in\x20this\x20context','red','440SncsIh','split','resolvePathToResource','Set\x20current\x20segment/folder\x20context\x20for\x20navigation','segment','parentName','Parent\x20ID:\x20','config','30pqEwMX','name','green','type','error','311208tTKYFz','Context\x20can\x20only\x20be\x20set\x20to\x20a\x20parent\x20segment\x20or\x20folder.','segments','370050AyvAtS','Error:\x20No\x20tdx.json\x20found\x20in\x20or\x20above:\x20','3366MXqBtK','Usage:\x20tdx\x20segment\x20use\x20<path>','log','folderId','154770yYLMlP','Use:\x20tdx\x20segment\x20use\x20','site','2037245XqiXKC','Resolved\x20relative\x20path\x20to:\x20','join','Error:\x20No\x20context\x20set.\x20Cannot\x20use\x20relative\x20path.','\x20\x20tdx\x20segment\x20use\x20\x22My\x20Audience\x22'];a36_0x1fee=function(){return _0x49983d;};return a36_0x1fee();}export class SegmentUseCommand extends BaseCommand{[a36_0x4531a9(0x15a)]=a36_0x4531a9(0x182);['description']=a36_0x4531a9(0x154);async['execute'](_0x1c473e){const _0x478191=a36_0x4531a9,{options:_0x582ac2,args:_0x87b3e4,tdx:_0x55d2c3}=_0x1c473e;if(_0x87b3e4[_0x478191(0x189)]===0x0)return console[_0x478191(0x15d)](a36_0x1f79b5[_0x478191(0x150)](_0x478191(0x171))),console[_0x478191(0x15d)](_0x478191(0x164)),console[_0x478191(0x15d)]('Examples:'),console[_0x478191(0x15d)](_0x478191(0x16e)),console['error']('\x20\x20tdx\x20segment\x20use\x20\x22My\x20Audience/Marketing\x22'),console['error'](_0x478191(0x180)),console[_0x478191(0x15d)](_0x478191(0x175)),0x1;const _0x4d445b=_0x87b3e4[0x0],_0xc2548b=_0x582ac2['session'];try{if(_0x4d445b==='/')return saveSessionContext({'segment_path':undefined},_0xc2548b),console['log'](a36_0x1f79b5[_0x478191(0x15b)](_0x478191(0x17f))),0x0;if(existsSync(_0x4d445b)&&statSync(_0x4d445b)[_0x478191(0x186)]()){let _0x1a98a6;try{_0x1a98a6=findTdxConfig(_0x4d445b);}catch{return console[_0x478191(0x15d)](a36_0x1f79b5[_0x478191(0x150)](_0x478191(0x162)+_0x4d445b)),console['error'](a36_0x1f79b5[_0x478191(0x183)](_0x478191(0x173))),0x1;}const _0x379a08=_0x1a98a6[_0x478191(0x158)][_0x478191(0x17d)];return saveSessionContext({'segment_path':_0x379a08,'parent_segment':_0x379a08},_0xc2548b),console[_0x478191(0x165)](a36_0x1f79b5[_0x478191(0x15b)](_0x478191(0x179)+a36_0x1f79b5['cyan'](_0x379a08))),0x0;}const _0x4b80c1=_0x582ac2['segmentPath'];let _0x39c35f=_0x4d445b;const _0x47825b=parsePath(_0x4d445b);if(!_0x47825b['isAbsolute']){if(!_0x4b80c1)return console['error'](a36_0x1f79b5[_0x478191(0x150)](_0x478191(0x16d))),console[_0x478191(0x15d)](a36_0x1f79b5[_0x478191(0x183)]('Use\x20an\x20absolute\x20path\x20or\x20set\x20context\x20with:\x20tdx\x20segment\x20use\x20<parent_name>')),0x1;if(_0x4d445b==='..'){const _0x13fef9=_0x4b80c1[_0x478191(0x152)]('/')[_0x478191(0x177)](0x0,-0x1)[_0x478191(0x16c)]('/');_0x39c35f=_0x13fef9||'/';}else _0x4d445b==='.'?_0x39c35f=_0x4b80c1:_0x39c35f=_0x4b80c1+'/'+_0x4d445b;_0x582ac2[_0x478191(0x185)]&&console['error'](_0x478191(0x16b)+_0x39c35f);}if(_0x39c35f==='/'||_0x39c35f==='')return saveSessionContext({'segment_path':undefined},_0xc2548b),console[_0x478191(0x165)](a36_0x1f79b5[_0x478191(0x15b)](_0x478191(0x17f))),0x0;_0x39c35f=normalizePath(_0x39c35f);const _0x44d0b3=parsePath(_0x39c35f)[_0x478191(0x160)];if(_0x44d0b3[_0x478191(0x189)]===0x0)return saveSessionContext({'segment_path':undefined},_0xc2548b),console['log'](a36_0x1f79b5[_0x478191(0x15b)]('✔\x20Context\x20cleared.\x20Back\x20to\x20root.')),0x0;_0x582ac2[_0x478191(0x185)]&&(console[_0x478191(0x15d)](_0x478191(0x187)+_0x582ac2[_0x478191(0x169)]),console['error'](_0x478191(0x178)+_0x39c35f));const _0x35c22e=await withSpinner('Resolving\x20path\x20\x27'+_0x39c35f+_0x478191(0x17a),()=>_0x55d2c3[_0x478191(0x155)][_0x478191(0x153)](_0x39c35f),{'verbose':_0x582ac2[_0x478191(0x185)]}),_0x556b8c=_0x35c22e[_0x478191(0x17c)];_0x582ac2[_0x478191(0x185)]&&(console[_0x478191(0x15d)](_0x478191(0x188)+_0x556b8c['type']),console['error'](_0x478191(0x157)+_0x556b8c[_0x478191(0x17b)]),_0x556b8c[_0x478191(0x166)]&&console[_0x478191(0x15d)]('Folder\x20ID:\x20'+_0x556b8c[_0x478191(0x166)]));if(_0x556b8c[_0x478191(0x15c)]===_0x478191(0x155))return console[_0x478191(0x15d)](a36_0x1f79b5[_0x478191(0x150)]('Error:\x20Cannot\x20set\x20context\x20to\x20a\x20segment.')),console['error'](_0x478191(0x15f)),console[_0x478191(0x15d)](a36_0x1f79b5['cyan'](_0x478191(0x168)+_0x556b8c[_0x478191(0x156)]+(_0x556b8c[_0x478191(0x184)]?'/'+_0x556b8c[_0x478191(0x184)][_0x478191(0x16c)]('/'):''))),0x1;return saveSessionContext({'segment_path':_0x556b8c[_0x478191(0x17e)],'parent_segment':_0x556b8c[_0x478191(0x156)]},_0xc2548b),console['log'](a36_0x1f79b5[_0x478191(0x15b)](_0x478191(0x179)+a36_0x1f79b5['cyan'](_0x556b8c['fullPath']))),_0x582ac2[_0x478191(0x185)]&&(console[_0x478191(0x15d)](a36_0x1f79b5[_0x478191(0x16f)](_0x478191(0x18a))),console[_0x478191(0x15d)](a36_0x1f79b5[_0x478191(0x16f)](_0x478191(0x176)))),0x0;}catch(_0x4b4611){throw _0x4b4611;}}}
@@ -1 +1 @@
1
- function a37_0x3a17(_0x3c7bbf,_0x1ab79c){_0x3c7bbf=_0x3c7bbf-0x188;const _0x3995dd=a37_0x3995();let _0x3a1702=_0x3995dd[_0x3c7bbf];return _0x3a1702;}const a37_0x29e46f=a37_0x3a17;(function(_0x33833e,_0x159e9b){const _0x137fce=a37_0x3a17,_0x2d6542=_0x33833e();while(!![]){try{const _0x124d58=-parseInt(_0x137fce(0x18a))/0x1+parseInt(_0x137fce(0x198))/0x2*(-parseInt(_0x137fce(0x195))/0x3)+-parseInt(_0x137fce(0x1ba))/0x4+parseInt(_0x137fce(0x1a7))/0x5*(-parseInt(_0x137fce(0x199))/0x6)+-parseInt(_0x137fce(0x1b6))/0x7*(parseInt(_0x137fce(0x18c))/0x8)+parseInt(_0x137fce(0x191))/0x9+parseInt(_0x137fce(0x19a))/0xa;if(_0x124d58===_0x159e9b)break;else _0x2d6542['push'](_0x2d6542['shift']());}catch(_0x4ea24f){_0x2d6542['push'](_0x2d6542['shift']());}}}(a37_0x3995,0xb7101));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleSDKOutput}from'../utils/command-output.js';import{withSpinner}from'../utils/spinner.js';function a37_0x3995(){const _0x34c58d=['resolvePathToResource','json','replace','cause','✔\x20Found\x20','segment','parentId','\x20top-level\x20items','map','Site:\x20','Folder\x20ID:\x20','(empty)','folderId','694178DeglPr','recursive','3307032ItCUve','Folder/pattern\x20arg:\x20','\x20segment','localeCompare','No\x20items\x20match\x20pattern:\x20','12378717gxMSeJ','jsonl','site','listUnified','66975vzPCOV','error','\x27...','4pPQubJ','90dSQsTy','31916670nCVugM','sort','\x20\x20Cause:\x20','Resolving\x20parent\x20segment\x20\x27','dim','Set\x20a\x20parent\x20segment\x20context\x20first:','\x20folder','\x20and\x20','log','length','Resolving\x20path\x20\x27','listRecursive','\x20\x20tdx\x20sg\x20pull\x20\x22My\x20Audience\x22','286095qPTOhx','segments','\x5c$&','Error:\x20No\x20parent\x20segment\x20context\x20set.','includes','(not\x20set)','filter','Parent\x20ID:\x20','verbose','name','description','format','Recursive\x20mode:\x20enabled','✔\x20Built\x20tree\x20with\x20','\x20matching\x20\x27','14eyWBFX','test','folder','message','5573536ZGtPTa','data','Listing\x20folders\x20and\x20segments...'];a37_0x3995=function(){return _0x34c58d;};return a37_0x3995();}import{formatFlatList,formatTree}from'../utils/tree-formatter.js';import a37_0x4d2c2b from'chalk';export class SegmentsCommand extends BaseCommand{[a37_0x29e46f(0x1b0)]=a37_0x29e46f(0x1a8);[a37_0x29e46f(0x1b1)]='List\x20folders\x20and\x20child\x20segments';async['execute'](_0x32f553){const _0x5e8bf8=a37_0x29e46f,{options:_0x40ceee,args:_0xae8271}=_0x32f553,_0x122ccb=_0x40ceee[_0x5e8bf8(0x18b)],_0x508e96=_0xae8271[0x0];try{const _0x5d3c61=_0x40ceee['parentSegment'];_0x40ceee[_0x5e8bf8(0x1af)]&&(console[_0x5e8bf8(0x196)](_0x5e8bf8(0x1c6)+_0x40ceee[_0x5e8bf8(0x193)]),console[_0x5e8bf8(0x196)]('Parent\x20segment\x20context:\x20'+(_0x5d3c61||_0x5e8bf8(0x1ac))),_0x508e96&&console[_0x5e8bf8(0x196)](_0x5e8bf8(0x18d)+_0x508e96),_0x122ccb&&console[_0x5e8bf8(0x196)](_0x5e8bf8(0x1b3)));if(!_0x5d3c61)return console['error'](_0x5e8bf8(0x1aa)),console['error'](''),console[_0x5e8bf8(0x196)](_0x5e8bf8(0x19f)),console[_0x5e8bf8(0x196)](_0x5e8bf8(0x1a6)),console[_0x5e8bf8(0x196)]('\x20\x20tdx\x20sg\x20use\x20\x22My\x20Audience\x22'),console[_0x5e8bf8(0x196)](''),console[_0x5e8bf8(0x196)]('Use\x20tdx\x20ps\x20list\x20to\x20see\x20available\x20parent\x20segments.'),0x1;const _0x478429=_0x508e96&&(_0x508e96[_0x5e8bf8(0x1ab)]('*')||_0x508e96['includes']('?'));if(_0x478429)return await this['listWithPattern'](_0x32f553,_0x5d3c61,_0x508e96);const _0x441c34=_0x508e96?_0x5d3c61+'/'+_0x508e96:_0x5d3c61;return _0x122ccb?await this[_0x5e8bf8(0x1a5)](_0x32f553,_0x441c34):await this[_0x5e8bf8(0x194)](_0x32f553,_0x441c34);}catch(_0x255e79){if(_0x255e79 instanceof SDKError)return console['error']('Error:\x20'+_0x255e79[_0x5e8bf8(0x1b9)]),_0x255e79[_0x5e8bf8(0x1c0)]&&console[_0x5e8bf8(0x196)](_0x5e8bf8(0x19c)+_0x255e79[_0x5e8bf8(0x1c0)]),0x1;throw _0x255e79;}}async['listWithPattern'](_0x34ca3c,_0x3de115,_0x127d25){const _0x184080=a37_0x29e46f,{options:_0x1ab20b,tdx:_0x250571}=_0x34ca3c,_0x3d08a2=await withSpinner(_0x184080(0x19d)+_0x3de115+_0x184080(0x197),()=>_0x250571['segment'][_0x184080(0x1bd)](_0x3de115),{'verbose':_0x1ab20b[_0x184080(0x1af)]}),_0xabd2f8=_0x3d08a2[_0x184080(0x1bb)],_0xd5c14f=await withSpinner(_0x184080(0x1bc),()=>_0x250571['segment']['listUnified'](_0xabd2f8[_0x184080(0x1c3)],_0xabd2f8[_0x184080(0x189)]),{'verbose':_0x1ab20b[_0x184080(0x1af)]}),{folders:_0x27e50a,segments:_0x276e2c}=_0xd5c14f['data'],_0x57bafe=_0x127d25['replace'](/[.+^${}()|[\]\\]/g,_0x184080(0x1a9))[_0x184080(0x1bf)](/\*/g,'.*')[_0x184080(0x1bf)](/\?/g,'.'),_0x3bee43=new RegExp('^'+_0x57bafe+'$','i'),_0x298b5a=_0x27e50a[_0x184080(0x1ad)](_0x1b8222=>_0x3bee43[_0x184080(0x1b7)](_0x1b8222[_0x184080(0x1b0)])),_0x1a2fd1=_0x276e2c[_0x184080(0x1ad)](_0xc7b2dc=>_0x3bee43[_0x184080(0x1b7)](_0xc7b2dc[_0x184080(0x1b0)])),_0x2a338e=_0x298b5a[_0x184080(0x1a3)]+_0x1a2fd1[_0x184080(0x1a3)];console['error'](_0x184080(0x1c1)+_0x298b5a[_0x184080(0x1a3)]+_0x184080(0x1a0)+(_0x298b5a[_0x184080(0x1a3)]!==0x1?'s':'')+_0x184080(0x1a1)+_0x1a2fd1[_0x184080(0x1a3)]+_0x184080(0x18e)+(_0x1a2fd1[_0x184080(0x1a3)]!==0x1?'s':'')+_0x184080(0x1b5)+_0x127d25+'\x27');if(_0x1ab20b[_0x184080(0x1b2)]===_0x184080(0x1be)||_0x1ab20b[_0x184080(0x1b2)]==='jsonl'){const _0x4ac194=[..._0x298b5a[_0x184080(0x1c5)](_0x19e662=>({..._0x19e662,'type':_0x184080(0x1b8)})),..._0x1a2fd1[_0x184080(0x1c5)](_0xf74acc=>({..._0xf74acc,'type':'segment'}))][_0x184080(0x19b)]((_0x4d0473,_0x5e2c9b)=>_0x4d0473[_0x184080(0x1b0)][_0x184080(0x18f)](_0x5e2c9b['name']));await handleSDKOutput(_0x4ac194,_0x1ab20b);}else{if(_0x2a338e===0x0)console['log'](_0x184080(0x190)+_0x127d25);else{console[_0x184080(0x1a2)](a37_0x4d2c2b[_0x184080(0x19e)]('['+_0x3de115+']\x20matching\x20\x27'+_0x127d25+'\x27'));const _0x2701c1=formatFlatList(_0x298b5a,_0x1a2fd1,{'showMetadata':!![]});console[_0x184080(0x1a2)](_0x2701c1);}}return 0x0;}async['listUnified'](_0xd3353e,_0x39aa1a){const _0x279cbc=a37_0x29e46f,{options:_0x3c5c24,tdx:_0x4b906c}=_0xd3353e,_0x181a88=await withSpinner('Resolving\x20path\x20\x27'+_0x39aa1a+_0x279cbc(0x197),()=>_0x4b906c[_0x279cbc(0x1c2)][_0x279cbc(0x1bd)](_0x39aa1a),{'verbose':_0x3c5c24[_0x279cbc(0x1af)]}),_0x4836a0=_0x181a88[_0x279cbc(0x1bb)];_0x3c5c24['verbose']&&(console[_0x279cbc(0x196)]('Parent\x20ID:\x20'+_0x4836a0[_0x279cbc(0x1c3)]),_0x4836a0['folderId']&&console['error'](_0x279cbc(0x1c7)+_0x4836a0['folderId']));const _0x78038f=await withSpinner(_0x279cbc(0x1bc),()=>_0x4b906c[_0x279cbc(0x1c2)][_0x279cbc(0x194)](_0x4836a0[_0x279cbc(0x1c3)],_0x4836a0[_0x279cbc(0x189)]),{'verbose':_0x3c5c24[_0x279cbc(0x1af)]}),{folders:_0x4de99d,segments:_0x4197fe}=_0x78038f[_0x279cbc(0x1bb)],_0x415d37=_0x4de99d[_0x279cbc(0x1a3)]+_0x4197fe[_0x279cbc(0x1a3)];console[_0x279cbc(0x196)]('✔\x20Found\x20'+_0x4de99d[_0x279cbc(0x1a3)]+_0x279cbc(0x1a0)+(_0x4de99d['length']!==0x1?'s':'')+'\x20and\x20'+_0x4197fe[_0x279cbc(0x1a3)]+_0x279cbc(0x18e)+(_0x4197fe[_0x279cbc(0x1a3)]!==0x1?'s':''));if(_0x3c5c24['format']===_0x279cbc(0x1be)||_0x3c5c24['format']===_0x279cbc(0x192)){const _0x35ab98=[..._0x4de99d['map'](_0x223e98=>({..._0x223e98,'type':_0x279cbc(0x1b8)})),..._0x4197fe[_0x279cbc(0x1c5)](_0x167597=>({..._0x167597,'type':_0x279cbc(0x1c2)}))][_0x279cbc(0x19b)]((_0x41cf38,_0x24e87f)=>_0x41cf38['name'][_0x279cbc(0x18f)](_0x24e87f['name']));await handleSDKOutput(_0x35ab98,_0x3c5c24);}else{if(_0x415d37===0x0)console[_0x279cbc(0x1a2)](a37_0x4d2c2b[_0x279cbc(0x19e)]('['+_0x39aa1a+']')),console[_0x279cbc(0x1a2)](_0x279cbc(0x188));else{console['log'](a37_0x4d2c2b[_0x279cbc(0x19e)]('['+_0x39aa1a+']'));const _0x4d3858=formatFlatList(_0x4de99d,_0x4197fe,{'showMetadata':!![]});console[_0x279cbc(0x1a2)](_0x4d3858);}}return 0x0;}async[a37_0x29e46f(0x1a5)](_0x43c857,_0x3f0884){const _0x42f24f=a37_0x29e46f,{options:_0x2b0dbf,tdx:_0xbf84f7}=_0x43c857,_0x2b4026=await withSpinner(_0x42f24f(0x1a4)+_0x3f0884+_0x42f24f(0x197),()=>_0xbf84f7[_0x42f24f(0x1c2)][_0x42f24f(0x1bd)](_0x3f0884),{'verbose':_0x2b0dbf[_0x42f24f(0x1af)]}),_0x1b5395=_0x2b4026[_0x42f24f(0x1bb)];_0x2b0dbf[_0x42f24f(0x1af)]&&(console[_0x42f24f(0x196)](_0x42f24f(0x1ae)+_0x1b5395[_0x42f24f(0x1c3)]),_0x1b5395[_0x42f24f(0x189)]&&console[_0x42f24f(0x196)]('Folder\x20ID:\x20'+_0x1b5395[_0x42f24f(0x189)]));const _0x2d230d=_0x2b0dbf['maxDepth']||0xa,_0x5ec9f4=await withSpinner('Building\x20hierarchy\x20tree...',()=>_0xbf84f7[_0x42f24f(0x1c2)][_0x42f24f(0x1a5)](_0x1b5395['parentId'],_0x1b5395[_0x42f24f(0x189)],0x0,_0x2d230d),{'verbose':_0x2b0dbf[_0x42f24f(0x1af)]}),_0x4c7410=_0x5ec9f4[_0x42f24f(0x1bb)];console[_0x42f24f(0x196)](_0x42f24f(0x1b4)+_0x4c7410[_0x42f24f(0x1a3)]+_0x42f24f(0x1c4));if(_0x2b0dbf['format']==='json'||_0x2b0dbf[_0x42f24f(0x1b2)]===_0x42f24f(0x192))await handleSDKOutput(_0x4c7410,_0x2b0dbf);else{console['log'](a37_0x4d2c2b[_0x42f24f(0x19e)]('['+_0x3f0884+']'));const _0x70fe31=formatTree(_0x4c7410,{'showMetadata':!![]});console[_0x42f24f(0x1a2)](_0x70fe31);}return 0x0;}}
1
+ const a37_0x176df8=a37_0x6fa9;(function(_0x1cc7a1,_0x27dfc0){const _0x21edb6=a37_0x6fa9,_0x3c7c68=_0x1cc7a1();while(!![]){try{const _0x371e3a=-parseInt(_0x21edb6(0x1be))/0x1*(parseInt(_0x21edb6(0x1bc))/0x2)+parseInt(_0x21edb6(0x1b7))/0x3*(-parseInt(_0x21edb6(0x19d))/0x4)+-parseInt(_0x21edb6(0x1b0))/0x5+parseInt(_0x21edb6(0x1c8))/0x6+-parseInt(_0x21edb6(0x1a4))/0x7*(-parseInt(_0x21edb6(0x1c6))/0x8)+parseInt(_0x21edb6(0x1ac))/0x9*(parseInt(_0x21edb6(0x189))/0xa)+parseInt(_0x21edb6(0x1b6))/0xb;if(_0x371e3a===_0x27dfc0)break;else _0x3c7c68['push'](_0x3c7c68['shift']());}catch(_0x2a08cc){_0x3c7c68['push'](_0x3c7c68['shift']());}}}(a37_0x502d,0x8582c));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleSDKOutput}from'../utils/command-output.js';import{withSpinner}from'../utils/spinner.js';function a37_0x6fa9(_0x23aa12,_0x729984){_0x23aa12=_0x23aa12-0x188;const _0x502ddd=a37_0x502d();let _0x6fa906=_0x502ddd[_0x23aa12];return _0x6fa906;}import{formatFlatList,formatTree}from'../utils/tree-formatter.js';import a37_0x3b65a1 from'chalk';function a37_0x502d(){const _0x165db0=['Parent\x20ID:\x20','Error:\x20No\x20parent\x20segment\x20context\x20set.','Recursive\x20mode:\x20enabled','\x20\x20tdx\x20sg\x20pull\x20\x22My\x20Audience\x22','539772iKbeyN','listUnified','recursive','List\x20folders\x20and\x20child\x20segments','dim','\x20and\x20','✔\x20Found\x20','31381JkZPnA','site','Building\x20hierarchy\x20tree...','maxDepth','(empty)','localeCompare','verbose','jsonl','18SmvVpO','message','\x20\x20Cause:\x20','json','4598355HUCkiT','Folder\x20ID:\x20','Use\x20tdx\x20ps\x20list\x20to\x20see\x20available\x20parent\x20segments.','\x5c$&','execute','log','7682466IfyHjU','3EzfitW','error','map','No\x20items\x20match\x20pattern:\x20','format','2daJQuB','sort','891178wHbLXz','\x20\x20tdx\x20sg\x20use\x20\x22My\x20Audience\x22','cause','data','replace','Folder/pattern\x20arg:\x20','Resolving\x20path\x20\x27','segment','1648uWKlty','\x27...','1367292JhUpOe',']\x20matching\x20\x27','Error:\x20','length','Listing\x20folders\x20and\x20segments...','Set\x20a\x20parent\x20segment\x20context\x20first:','\x20matching\x20\x27','filter','3214330oSzmID','parentId','\x20segment','folder','\x20folder','(not\x20set)','segments','listRecursive','✔\x20Built\x20tree\x20with\x20','name','folderId','resolvePathToResource','\x20top-level\x20items','includes','Resolving\x20parent\x20segment\x20\x27','test'];a37_0x502d=function(){return _0x165db0;};return a37_0x502d();}export class SegmentsCommand extends BaseCommand{[a37_0x176df8(0x192)]=a37_0x176df8(0x18f);['description']=a37_0x176df8(0x1a0);async[a37_0x176df8(0x1b4)](_0x3308b0){const _0x354627=a37_0x176df8,{options:_0x26e5a4,args:_0x3a5536}=_0x3308b0,_0x2896bb=_0x26e5a4[_0x354627(0x19f)],_0x1ccdcf=_0x3a5536[0x0];try{const _0x2ce06e=_0x26e5a4['parentSegment'];_0x26e5a4[_0x354627(0x1aa)]&&(console['error']('Site:\x20'+_0x26e5a4[_0x354627(0x1a5)]),console['error']('Parent\x20segment\x20context:\x20'+(_0x2ce06e||_0x354627(0x18e))),_0x1ccdcf&&console['error'](_0x354627(0x1c3)+_0x1ccdcf),_0x2896bb&&console[_0x354627(0x1b8)](_0x354627(0x19b)));if(!_0x2ce06e)return console['error'](_0x354627(0x19a)),console['error'](''),console['error'](_0x354627(0x1cd)),console['error'](_0x354627(0x19c)),console[_0x354627(0x1b8)](_0x354627(0x1bf)),console[_0x354627(0x1b8)](''),console[_0x354627(0x1b8)](_0x354627(0x1b2)),0x1;const _0x23ccc7=_0x1ccdcf&&(_0x1ccdcf[_0x354627(0x196)]('*')||_0x1ccdcf[_0x354627(0x196)]('?'));if(_0x23ccc7)return await this['listWithPattern'](_0x3308b0,_0x2ce06e,_0x1ccdcf);const _0x441d49=_0x1ccdcf?_0x2ce06e+'/'+_0x1ccdcf:_0x2ce06e;return _0x2896bb?await this[_0x354627(0x190)](_0x3308b0,_0x441d49):await this[_0x354627(0x19e)](_0x3308b0,_0x441d49);}catch(_0x45ff35){if(_0x45ff35 instanceof SDKError)return console[_0x354627(0x1b8)](_0x354627(0x1ca)+_0x45ff35[_0x354627(0x1ad)]),_0x45ff35[_0x354627(0x1c0)]&&console[_0x354627(0x1b8)](_0x354627(0x1ae)+_0x45ff35[_0x354627(0x1c0)]),0x1;throw _0x45ff35;}}async['listWithPattern'](_0x40421f,_0x3f15de,_0x37cc33){const _0x229a3c=a37_0x176df8,{options:_0x289bd8,tdx:_0x48456e}=_0x40421f,_0x1fcdfd=await withSpinner(_0x229a3c(0x197)+_0x3f15de+_0x229a3c(0x1c7),()=>_0x48456e[_0x229a3c(0x1c5)][_0x229a3c(0x194)](_0x3f15de),{'verbose':_0x289bd8[_0x229a3c(0x1aa)]}),_0x1843b3=_0x1fcdfd[_0x229a3c(0x1c1)],_0x2cd204=await withSpinner('Listing\x20folders\x20and\x20segments...',()=>_0x48456e['segment'][_0x229a3c(0x19e)](_0x1843b3[_0x229a3c(0x18a)],_0x1843b3[_0x229a3c(0x193)]),{'verbose':_0x289bd8['verbose']}),{folders:_0x286369,segments:_0x1da6c0}=_0x2cd204[_0x229a3c(0x1c1)],_0x41d739=_0x37cc33[_0x229a3c(0x1c2)](/[.+^${}()|[\]\\]/g,_0x229a3c(0x1b3))['replace'](/\*/g,'.*')[_0x229a3c(0x1c2)](/\?/g,'.'),_0x1639dd=new RegExp('^'+_0x41d739+'$','i'),_0x5181c7=_0x286369['filter'](_0x3cabe0=>_0x1639dd[_0x229a3c(0x198)](_0x3cabe0[_0x229a3c(0x192)])),_0x53d09f=_0x1da6c0[_0x229a3c(0x188)](_0x443cbe=>_0x1639dd['test'](_0x443cbe[_0x229a3c(0x192)])),_0x2a3c81=_0x5181c7[_0x229a3c(0x1cb)]+_0x53d09f[_0x229a3c(0x1cb)];console[_0x229a3c(0x1b8)]('✔\x20Found\x20'+_0x5181c7['length']+_0x229a3c(0x18d)+(_0x5181c7[_0x229a3c(0x1cb)]!==0x1?'s':'')+_0x229a3c(0x1a2)+_0x53d09f[_0x229a3c(0x1cb)]+_0x229a3c(0x18b)+(_0x53d09f[_0x229a3c(0x1cb)]!==0x1?'s':'')+_0x229a3c(0x1ce)+_0x37cc33+'\x27');if(_0x289bd8['format']===_0x229a3c(0x1af)||_0x289bd8[_0x229a3c(0x1bb)]==='jsonl'){const _0x8bd112=[..._0x5181c7[_0x229a3c(0x1b9)](_0x2c9e26=>({..._0x2c9e26,'type':_0x229a3c(0x18c)})),..._0x53d09f[_0x229a3c(0x1b9)](_0x451cde=>({..._0x451cde,'type':_0x229a3c(0x1c5)}))][_0x229a3c(0x1bd)]((_0x267235,_0x462dcb)=>_0x267235[_0x229a3c(0x192)][_0x229a3c(0x1a9)](_0x462dcb[_0x229a3c(0x192)]));await handleSDKOutput(_0x8bd112,_0x289bd8);}else{if(_0x2a3c81===0x0)console[_0x229a3c(0x1b5)](_0x229a3c(0x1ba)+_0x37cc33);else{console[_0x229a3c(0x1b5)](a37_0x3b65a1['dim']('['+_0x3f15de+_0x229a3c(0x1c9)+_0x37cc33+'\x27'));const _0x57f1b7=formatFlatList(_0x5181c7,_0x53d09f,{'showMetadata':!![]});console[_0x229a3c(0x1b5)](_0x57f1b7);}}return 0x0;}async[a37_0x176df8(0x19e)](_0x2d7fb1,_0x45868c){const _0x15ab15=a37_0x176df8,{options:_0x4798d5,tdx:_0x57328d}=_0x2d7fb1,_0x214734=await withSpinner(_0x15ab15(0x1c4)+_0x45868c+'\x27...',()=>_0x57328d[_0x15ab15(0x1c5)]['resolvePathToResource'](_0x45868c),{'verbose':_0x4798d5[_0x15ab15(0x1aa)]}),_0x5f3e86=_0x214734['data'];_0x4798d5[_0x15ab15(0x1aa)]&&(console[_0x15ab15(0x1b8)](_0x15ab15(0x199)+_0x5f3e86[_0x15ab15(0x18a)]),_0x5f3e86[_0x15ab15(0x193)]&&console[_0x15ab15(0x1b8)](_0x15ab15(0x1b1)+_0x5f3e86[_0x15ab15(0x193)]));const _0xb3671a=await withSpinner(_0x15ab15(0x1cc),()=>_0x57328d[_0x15ab15(0x1c5)][_0x15ab15(0x19e)](_0x5f3e86[_0x15ab15(0x18a)],_0x5f3e86['folderId']),{'verbose':_0x4798d5['verbose']}),{folders:_0x3ae3bf,segments:_0x37c63d}=_0xb3671a['data'],_0x58b677=_0x3ae3bf[_0x15ab15(0x1cb)]+_0x37c63d[_0x15ab15(0x1cb)];console[_0x15ab15(0x1b8)](_0x15ab15(0x1a3)+_0x3ae3bf[_0x15ab15(0x1cb)]+'\x20folder'+(_0x3ae3bf[_0x15ab15(0x1cb)]!==0x1?'s':'')+_0x15ab15(0x1a2)+_0x37c63d[_0x15ab15(0x1cb)]+_0x15ab15(0x18b)+(_0x37c63d[_0x15ab15(0x1cb)]!==0x1?'s':''));if(_0x4798d5[_0x15ab15(0x1bb)]==='json'||_0x4798d5[_0x15ab15(0x1bb)]===_0x15ab15(0x1ab)){const _0x8dacd9=[..._0x3ae3bf[_0x15ab15(0x1b9)](_0x573820=>({..._0x573820,'type':'folder'})),..._0x37c63d[_0x15ab15(0x1b9)](_0x4dc9c0=>({..._0x4dc9c0,'type':_0x15ab15(0x1c5)}))][_0x15ab15(0x1bd)]((_0x4196f2,_0x2a7f19)=>_0x4196f2[_0x15ab15(0x192)][_0x15ab15(0x1a9)](_0x2a7f19[_0x15ab15(0x192)]));await handleSDKOutput(_0x8dacd9,_0x4798d5);}else{if(_0x58b677===0x0)console['log'](a37_0x3b65a1['dim']('['+_0x45868c+']')),console[_0x15ab15(0x1b5)](_0x15ab15(0x1a8));else{console[_0x15ab15(0x1b5)](a37_0x3b65a1[_0x15ab15(0x1a1)]('['+_0x45868c+']'));const _0x1e2e29=formatFlatList(_0x3ae3bf,_0x37c63d,{'showMetadata':!![]});console['log'](_0x1e2e29);}}return 0x0;}async[a37_0x176df8(0x190)](_0x237e8d,_0x16620d){const _0x234de1=a37_0x176df8,{options:_0x17dd9b,tdx:_0x51ba8b}=_0x237e8d,_0x4cfb69=await withSpinner(_0x234de1(0x1c4)+_0x16620d+_0x234de1(0x1c7),()=>_0x51ba8b['segment'][_0x234de1(0x194)](_0x16620d),{'verbose':_0x17dd9b[_0x234de1(0x1aa)]}),_0x4314cf=_0x4cfb69['data'];_0x17dd9b['verbose']&&(console[_0x234de1(0x1b8)](_0x234de1(0x199)+_0x4314cf[_0x234de1(0x18a)]),_0x4314cf[_0x234de1(0x193)]&&console[_0x234de1(0x1b8)](_0x234de1(0x1b1)+_0x4314cf[_0x234de1(0x193)]));const _0x1d6e93=_0x17dd9b[_0x234de1(0x1a7)]||0xa,_0x2635ff=await withSpinner(_0x234de1(0x1a6),()=>_0x51ba8b[_0x234de1(0x1c5)][_0x234de1(0x190)](_0x4314cf[_0x234de1(0x18a)],_0x4314cf[_0x234de1(0x193)],0x0,_0x1d6e93),{'verbose':_0x17dd9b['verbose']}),_0x55d64a=_0x2635ff['data'];console[_0x234de1(0x1b8)](_0x234de1(0x191)+_0x55d64a['length']+_0x234de1(0x195));if(_0x17dd9b['format']===_0x234de1(0x1af)||_0x17dd9b['format']==='jsonl')await handleSDKOutput(_0x55d64a,_0x17dd9b);else{console[_0x234de1(0x1b5)](a37_0x3b65a1[_0x234de1(0x1a1)]('['+_0x16620d+']'));const _0x106fa2=formatTree(_0x55d64a,{'showMetadata':!![]});console['log'](_0x106fa2);}return 0x0;}}
@@ -1 +1 @@
1
- const a38_0x4b9e4f=a38_0x43b1;function a38_0x43b1(_0x569e6a,_0x2e1f6d){_0x569e6a=_0x569e6a-0x188;const _0x1f7bdb=a38_0x1f7b();let _0x43b1b0=_0x1f7bdb[_0x569e6a];return _0x43b1b0;}(function(_0x3f3591,_0x21f0bb){const _0x135b9e=a38_0x43b1,_0x4e52b9=_0x3f3591();while(!![]){try{const _0x2302ea=-parseInt(_0x135b9e(0x19e))/0x1*(-parseInt(_0x135b9e(0x1a1))/0x2)+-parseInt(_0x135b9e(0x1a4))/0x3+parseInt(_0x135b9e(0x193))/0x4+-parseInt(_0x135b9e(0x1a7))/0x5*(-parseInt(_0x135b9e(0x1a0))/0x6)+parseInt(_0x135b9e(0x196))/0x7*(-parseInt(_0x135b9e(0x191))/0x8)+parseInt(_0x135b9e(0x1a8))/0x9*(parseInt(_0x135b9e(0x1ab))/0xa)+-parseInt(_0x135b9e(0x1ac))/0xb;if(_0x2302ea===_0x21f0bb)break;else _0x4e52b9['push'](_0x4e52b9['shift']());}catch(_0x5e82a1){_0x4e52b9['push'](_0x4e52b9['shift']());}}}(a38_0x1f7b,0x36a47));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleSDKOutput}from'../utils/command-output.js';import{parseTableReference,validateTableDescribeReference}from'../utils/table-ref-parser.js';import{withSpinner}from'../utils/spinner.js';import{DEFAULT_DISPLAY_LIMIT,resolveLimit}from'../utils/constants.js';export class ShowCommand extends BaseCommand{[a38_0x4b9e4f(0x1b0)]=a38_0x4b9e4f(0x1ae);[a38_0x4b9e4f(0x197)]='Show\x20table\x20contents';async['execute'](_0x3bf012){return this['showTable'](_0x3bf012);}async[a38_0x4b9e4f(0x190)](_0x2a8025){const _0x24b5a6=a38_0x4b9e4f,{options:_0x19d7e2,args:_0x2d13b6,tdx:_0x569e66}=_0x2a8025;let _0x1d82f4;try{_0x1d82f4=parseTableReference(_0x2d13b6[0x0]);const _0x14ce30=_0x19d7e2['database'];!_0x1d82f4[_0x24b5a6(0x18e)]&&_0x14ce30&&(_0x1d82f4['database']=_0x14ce30);const _0x37a39a=validateTableDescribeReference(_0x1d82f4);if(_0x37a39a)return console[_0x24b5a6(0x19c)]('Error:\x20'+_0x37a39a),console['error'](_0x24b5a6(0x1a3)),console[_0x24b5a6(0x19c)](_0x24b5a6(0x18c)),console[_0x24b5a6(0x19c)](_0x24b5a6(0x18d)),0x1;}catch(_0x443c39){return console[_0x24b5a6(0x19c)](_0x24b5a6(0x1af)+_0x443c39[_0x24b5a6(0x1aa)]),console[_0x24b5a6(0x19c)]('Usage:\x20tdx\x20show\x20<database.table>'),console[_0x24b5a6(0x19c)](_0x24b5a6(0x18c)),console['error'](_0x24b5a6(0x18d)),0x1;}const _0x24871c=_0x1d82f4[_0x24b5a6(0x1a5)],_0x3c7659=_0x1d82f4[_0x24b5a6(0x18e)],_0x2f759d=_0x1d82f4[_0x24b5a6(0x189)],_0x443e2e=resolveLimit(_0x19d7e2['limit'],DEFAULT_DISPLAY_LIMIT);try{_0x19d7e2[_0x24b5a6(0x188)]&&(console[_0x24b5a6(0x19c)](_0x24b5a6(0x1a6)+_0x19d7e2[_0x24b5a6(0x194)]),_0x24871c&&console['error'](_0x24b5a6(0x18b)+_0x24871c),console[_0x24b5a6(0x19c)](_0x24b5a6(0x198)+_0x3c7659),console['error']('Table:\x20'+_0x2f759d),console[_0x24b5a6(0x19c)](_0x24b5a6(0x1a2)+_0x443e2e));const _0x2e6057=_0x24871c?_0x24871c+'.'+_0x3c7659+'.'+_0x2f759d:_0x3c7659+'.'+_0x2f759d,_0x28c833=await withSpinner(_0x24b5a6(0x19d)+_0x2e6057+_0x24b5a6(0x18f),()=>_0x569e66[_0x24b5a6(0x19f)][_0x24b5a6(0x190)](_0x3c7659,_0x2f759d,_0x443e2e,_0x24871c),{'verbose':_0x19d7e2[_0x24b5a6(0x188)]}),_0x2aa608=_0x28c833[_0x24b5a6(0x199)],_0x32c570=_0x2aa608[_0x24b5a6(0x199)];return _0x32c570[_0x24b5a6(0x1a9)]===0x0?console[_0x24b5a6(0x19c)]('✔\x20Query\x20successful\x20-\x200\x20rows\x20returned'):console[_0x24b5a6(0x19c)]('✔\x20Retrieved\x20'+_0x32c570[_0x24b5a6(0x1a9)]+_0x24b5a6(0x195)+(_0x32c570[_0x24b5a6(0x1a9)]!==0x1?'s':'')+_0x24b5a6(0x192)+_0x2e6057),await handleSDKOutput(_0x32c570,_0x19d7e2),0x0;}catch(_0x14d7b0){if(_0x14d7b0 instanceof SDKError)return console[_0x24b5a6(0x19c)](_0x24b5a6(0x1af)+_0x14d7b0[_0x24b5a6(0x1aa)]),_0x14d7b0[_0x24b5a6(0x19b)]&&console[_0x24b5a6(0x19c)]('\x20\x20Cause:\x20'+_0x14d7b0[_0x24b5a6(0x19b)]),0x1;throw _0x14d7b0;}}[a38_0x4b9e4f(0x19a)](_0x11886c){const _0x242acc=a38_0x4b9e4f;if(_0x11886c[_0x242acc(0x1ad)][_0x242acc(0x1a9)]===0x0)return _0x242acc(0x18a);if(_0x11886c[_0x242acc(0x1ad)][_0x242acc(0x1a9)]>0x1)return'Too\x20many\x20arguments\x0aUsage:\x20tdx\x20show\x20<database.table>\x0a\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--database\x20<database>\x0a\x0aRun\x20\x27tdx\x20show\x20--help\x27\x20for\x20more\x20options';return undefined;}}function a38_0x1f7b(){const _0x1a2ea5=['310cKvShf','2050026YmLEPs','args','show','Error:\x20','name','verbose','table','Usage:\x20tdx\x20show\x20<database.table>\x0a\x20\x20\x20or:\x20tdx\x20show\x20<catalog.database.table>\x0a\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--database\x20<database>\x0a\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--in\x20<database>\x0a\x0aRun\x20\x27tdx\x20show\x20--help\x27\x20for\x20more\x20options','Catalog:\x20','\x20\x20\x20or:\x20tdx\x20show\x20<catalog.database.table>','\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--database\x20<database>','database','...','showTable','26016ldEory','\x20from\x20','152612SUCywW','site','\x20row','42QiIxIO','description','Database:\x20','data','validate','cause','error','Querying\x20','25NiZSom','query','6wirzLc','526moHwgI','Limit:\x20','Usage:\x20tdx\x20show\x20<database.table>','498048QiuOuC','catalog','Site:\x20','1905040AWAijA','49347fPSVDt','length','message'];a38_0x1f7b=function(){return _0x1a2ea5;};return a38_0x1f7b();}
1
+ const a38_0x14439f=a38_0x2a76;(function(_0x36dcd4,_0x5861ae){const _0x41829f=a38_0x2a76,_0x3a7285=_0x36dcd4();while(!![]){try{const _0x201472=parseInt(_0x41829f(0xb6))/0x1*(parseInt(_0x41829f(0xa4))/0x2)+parseInt(_0x41829f(0xa0))/0x3+parseInt(_0x41829f(0xa1))/0x4*(-parseInt(_0x41829f(0xc3))/0x5)+parseInt(_0x41829f(0xb0))/0x6+parseInt(_0x41829f(0xbb))/0x7+-parseInt(_0x41829f(0xa7))/0x8*(parseInt(_0x41829f(0xbf))/0x9)+-parseInt(_0x41829f(0xad))/0xa;if(_0x201472===_0x5861ae)break;else _0x3a7285['push'](_0x3a7285['shift']());}catch(_0x2e0929){_0x3a7285['push'](_0x3a7285['shift']());}}}(a38_0x1263,0xad1ff));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleSDKOutput}from'../utils/command-output.js';import{parseTableReference,validateTableDescribeReference}from'../utils/table-ref-parser.js';import{withSpinner}from'../utils/spinner.js';function a38_0x1263(){const _0x1467c9=['Site:\x20','5aWTqoR','showTable','\x20\x20\x20or:\x20tdx\x20show\x20<catalog.database.table>','✔\x20Retrieved\x20','description','2993091mghdzm','3286060AUFtBN','Table:\x20','message','22LRGlLz','\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--database\x20<database>','Show\x20table\x20contents','8uPpEAK','show','site','table','...','length','2070510XQDLoI','error','data','6963798GABKJk','catalog','query','cause','Usage:\x20tdx\x20show\x20<database.table>\x0a\x20\x20\x20or:\x20tdx\x20show\x20<catalog.database.table>\x0a\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--database\x20<database>\x0a\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--in\x20<database>\x0a\x0aRun\x20\x27tdx\x20show\x20--help\x27\x20for\x20more\x20options','verbose','38237vGvQWF','Too\x20many\x20arguments\x0aUsage:\x20tdx\x20show\x20<database.table>\x0a\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--database\x20<database>\x0a\x0aRun\x20\x27tdx\x20show\x20--help\x27\x20for\x20more\x20options','name','validate','database','2386489TYmLVV','✔\x20Query\x20successful\x20-\x200\x20rows\x20returned','limit','\x20from\x20','10639611lrPpNG','\x20\x20Cause:\x20','Error:\x20'];a38_0x1263=function(){return _0x1467c9;};return a38_0x1263();}import{DEFAULT_DISPLAY_LIMIT,resolveLimit}from'../utils/constants.js';function a38_0x2a76(_0x4caa0a,_0x4ec24f){_0x4caa0a=_0x4caa0a-0xa0;const _0x1263fb=a38_0x1263();let _0x2a764d=_0x1263fb[_0x4caa0a];return _0x2a764d;}export class ShowCommand extends BaseCommand{[a38_0x14439f(0xb8)]=a38_0x14439f(0xa8);[a38_0x14439f(0xc7)]=a38_0x14439f(0xa6);async['execute'](_0x312806){const _0x388c42=a38_0x14439f;return this[_0x388c42(0xc4)](_0x312806);}async[a38_0x14439f(0xc4)](_0x3b388c){const _0x15d873=a38_0x14439f,{options:_0x55ae2e,args:_0x44cfe6,tdx:_0x25e802}=_0x3b388c;let _0xbe2e0b;try{_0xbe2e0b=parseTableReference(_0x44cfe6[0x0]);const _0x5bd93b=_0x55ae2e[_0x15d873(0xba)];!_0xbe2e0b[_0x15d873(0xba)]&&_0x5bd93b&&(_0xbe2e0b[_0x15d873(0xba)]=_0x5bd93b);const _0x47c3e1=validateTableDescribeReference(_0xbe2e0b);if(_0x47c3e1)return console[_0x15d873(0xae)]('Error:\x20'+_0x47c3e1),console[_0x15d873(0xae)]('Usage:\x20tdx\x20show\x20<database.table>'),console[_0x15d873(0xae)](_0x15d873(0xc5)),console[_0x15d873(0xae)](_0x15d873(0xa5)),0x1;}catch(_0x549ef1){return console[_0x15d873(0xae)]('Error:\x20'+_0x549ef1['message']),console[_0x15d873(0xae)]('Usage:\x20tdx\x20show\x20<database.table>'),console[_0x15d873(0xae)](_0x15d873(0xc5)),console[_0x15d873(0xae)](_0x15d873(0xa5)),0x1;}const _0xf3e1c0=_0xbe2e0b[_0x15d873(0xb1)],_0xdb70dc=_0xbe2e0b[_0x15d873(0xba)],_0x40c797=_0xbe2e0b[_0x15d873(0xaa)],_0x112486=resolveLimit(_0x55ae2e[_0x15d873(0xbd)],DEFAULT_DISPLAY_LIMIT);try{_0x55ae2e[_0x15d873(0xb5)]&&(console[_0x15d873(0xae)](_0x15d873(0xc2)+_0x55ae2e[_0x15d873(0xa9)]),_0xf3e1c0&&console['error']('Catalog:\x20'+_0xf3e1c0),console[_0x15d873(0xae)]('Database:\x20'+_0xdb70dc),console[_0x15d873(0xae)](_0x15d873(0xa2)+_0x40c797),console[_0x15d873(0xae)]('Limit:\x20'+_0x112486));const _0xbea139=_0xf3e1c0?_0xf3e1c0+'.'+_0xdb70dc+'.'+_0x40c797:_0xdb70dc+'.'+_0x40c797,_0x102263=await withSpinner('Querying\x20'+_0xbea139+_0x15d873(0xab),()=>_0x25e802[_0x15d873(0xb2)][_0x15d873(0xc4)](_0xdb70dc,_0x40c797,_0x112486,_0xf3e1c0),{'verbose':_0x55ae2e[_0x15d873(0xb5)]}),_0x411652=_0x102263[_0x15d873(0xaf)],_0x44fd02=_0x411652[_0x15d873(0xaf)];return _0x44fd02[_0x15d873(0xac)]===0x0?console[_0x15d873(0xae)](_0x15d873(0xbc)):console[_0x15d873(0xae)](_0x15d873(0xc6)+_0x44fd02[_0x15d873(0xac)]+'\x20row'+(_0x44fd02[_0x15d873(0xac)]!==0x1?'s':'')+_0x15d873(0xbe)+_0xbea139),await handleSDKOutput(_0x44fd02,_0x55ae2e),0x0;}catch(_0x58adf7){if(_0x58adf7 instanceof SDKError)return console[_0x15d873(0xae)](_0x15d873(0xc1)+_0x58adf7[_0x15d873(0xa3)]),_0x58adf7[_0x15d873(0xb3)]&&console[_0x15d873(0xae)](_0x15d873(0xc0)+_0x58adf7[_0x15d873(0xb3)]),0x1;throw _0x58adf7;}}[a38_0x14439f(0xb9)](_0x3d3adc){const _0x1041ff=a38_0x14439f;if(_0x3d3adc['args'][_0x1041ff(0xac)]===0x0)return _0x1041ff(0xb4);if(_0x3d3adc['args'][_0x1041ff(0xac)]>0x1)return _0x1041ff(0xb7);return undefined;}}
@@ -1 +1 @@
1
- const a39_0x1890e4=a39_0x31e8;(function(_0x588f0f,_0x128852){const _0x5f14a9=a39_0x31e8,_0x3d6720=_0x588f0f();while(!![]){try{const _0x3ac88d=parseInt(_0x5f14a9(0x1a2))/0x1*(-parseInt(_0x5f14a9(0x199))/0x2)+parseInt(_0x5f14a9(0x1c9))/0x3+-parseInt(_0x5f14a9(0x1b1))/0x4*(-parseInt(_0x5f14a9(0x1cc))/0x5)+parseInt(_0x5f14a9(0x1ca))/0x6+-parseInt(_0x5f14a9(0x198))/0x7*(parseInt(_0x5f14a9(0x1af))/0x8)+-parseInt(_0x5f14a9(0x1c1))/0x9*(-parseInt(_0x5f14a9(0x1be))/0xa)+-parseInt(_0x5f14a9(0x1b8))/0xb;if(_0x3ac88d===_0x128852)break;else _0x3d6720['push'](_0x3d6720['shift']());}catch(_0x4dee2d){_0x3d6720['push'](_0x3d6720['shift']());}}}(a39_0x440e,0xc0b4c));import{BaseCommand}from'./command.js';function a39_0x440e(){const _0x25df38=['data','✖\x20No\x20tables\x20found','name','listTables','Error:\x20Too\x20many\x20arguments.\x20Use\x20single\x20argument:','validate','\x27\x20across\x20all\x20databases.','site','8sDMBgM','Database:\x20all','284mQEmYT','Database:\x20','database','Listing\x20tables...','\x27\x20is\x20ambiguous.','cause','tables','10059104PKXsWV','\x20\x20Use:\x20tdx\x20tables\x20\x22','error','\x20\x20Cause:\x20','Database\x20\x27','Or\x20use\x20--in\x20flag:','1910YChqct','Error:\x20','Site:\x20','54666eEHQiB','execute','List\x20tables\x20in\x20a\x20database','.*\x22','query','\x27\x20without\x20wildcards\x20would\x20search\x20for\x20tables\x20named\x20\x27','Table\x20pattern:\x20','includes','186048iIMsbj','8779446uMvNUu','\x20\x20Or:\x20\x20tdx\x20tables\x20--in\x20','65165fHSWXB','\x20\x20tdx\x20tables\x20\x22mydb.*\x22\x20\x20\x20\x20\x20\x20\x20\x20->\x20all\x20tables\x20from\x20mydb','Did\x20you\x20mean\x20to\x20list\x20all\x20tables\x20from\x20database\x20\x27','\x20\x20tdx\x20tables\x20users\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20->\x20table\x20\x22users\x22\x20across\x20all\x20databases','7352135tJefqh','566YtXVlw','length','description','table','\x20\x20Or:\x20\x20tdx\x20tables\x20--database\x20','message','✔\x20Found\x20','limit','\x27\x20may\x20not\x20exist\x20or\x20contains\x20no\x20tables','3027pOjekL','\x20\x20tdx\x20tables\x20\x22mydb.users\x22\x20\x20\x20\x20->\x20table\x20\x22users\x22\x20in\x20database\x20mydb','\x20\x20tdx\x20tables\x20--in\x20mydb\x20\x20\x20\x20\x20\x20\x20->\x20all\x20tables\x20from\x20mydb','verbose','Note:\x20\x27'];a39_0x440e=function(){return _0x25df38;};return a39_0x440e();}import{SDKError}from'../sdk/index.js';import{handleSDKOutput}from'../utils/command-output.js';function a39_0x31e8(_0xef005f,_0x3ca978){_0xef005f=_0xef005f-0x197;const _0x440e4b=a39_0x440e();let _0x31e87a=_0x440e4b[_0xef005f];return _0x31e87a;}import{parseTableReference}from'../utils/table-ref-parser.js';import{DEFAULT_LISTING_LIMIT,resolveLimit}from'../utils/constants.js';import{withSpinner}from'../utils/spinner.js';export class TablesCommand extends BaseCommand{[a39_0x1890e4(0x1a9)]=a39_0x1890e4(0x1b7);[a39_0x1890e4(0x19b)]=a39_0x1890e4(0x1c3);async[a39_0x1890e4(0x1c2)](_0x435d1f){const _0x44b3b2=a39_0x1890e4,{options:_0x8b2f8e,args:_0x44bc47,tdx:_0x2c5c7e}=_0x435d1f;let _0xdbe48f;if(_0x44bc47[_0x44b3b2(0x19a)]===0x0)_0xdbe48f={'database':undefined,'table':undefined,'original':''};else{if(_0x44bc47[_0x44b3b2(0x19a)]===0x1)try{_0xdbe48f=parseTableReference(_0x44bc47[0x0]);if(_0xdbe48f[_0x44b3b2(0x19c)]&&!_0xdbe48f['database']&&!_0xdbe48f['table'][_0x44b3b2(0x1c8)]('*')&&!_0xdbe48f['table'][_0x44b3b2(0x1c8)]('?'))return console['error']('Error:\x20Pattern\x20\x27'+_0x44bc47[0x0]+_0x44b3b2(0x1b5)),console[_0x44b3b2(0x1ba)](_0x44b3b2(0x1ce)+_0xdbe48f['table']+'\x27?'),console[_0x44b3b2(0x1ba)](_0x44b3b2(0x1b9)+_0xdbe48f[_0x44b3b2(0x19c)]+_0x44b3b2(0x1c4)),console[_0x44b3b2(0x1ba)](_0x44b3b2(0x1cb)+_0xdbe48f[_0x44b3b2(0x19c)]),console[_0x44b3b2(0x1ba)](_0x44b3b2(0x19d)+_0xdbe48f[_0x44b3b2(0x19c)]),console['error'](''),console[_0x44b3b2(0x1ba)](_0x44b3b2(0x1a6)+_0x44bc47[0x0]+_0x44b3b2(0x1c6)+_0xdbe48f[_0x44b3b2(0x19c)]+_0x44b3b2(0x1ad)),0x1;}catch(_0x51ae8f){return console[_0x44b3b2(0x1ba)](_0x44b3b2(0x1bf)+_0x51ae8f[_0x44b3b2(0x19e)]),0x1;}else return console[_0x44b3b2(0x1ba)](_0x44b3b2(0x1ab)),console[_0x44b3b2(0x1ba)](_0x44b3b2(0x197)),console[_0x44b3b2(0x1ba)](_0x44b3b2(0x1cd)),console[_0x44b3b2(0x1ba)](_0x44b3b2(0x1a3)),console[_0x44b3b2(0x1ba)]('\x20\x20tdx\x20tables\x20\x22*.user*\x22\x20\x20\x20\x20\x20\x20\x20->\x20tables\x20matching\x20user*\x20across\x20databases'),console[_0x44b3b2(0x1ba)](_0x44b3b2(0x1bd)),console['error'](_0x44b3b2(0x1a4)),0x1;}const _0x41b085=_0x8b2f8e[_0x44b3b2(0x1b3)];!_0xdbe48f['database']&&_0x41b085&&(_0xdbe48f[_0x44b3b2(0x1b3)]=_0x41b085);try{const _0x469996=_0x90722=>_0x90722&&(_0x90722[_0x44b3b2(0x1c8)]('*')||_0x90722[_0x44b3b2(0x1c8)]('?')),_0x4a3dd6=_0x469996(_0xdbe48f[_0x44b3b2(0x1b3)]);_0x8b2f8e[_0x44b3b2(0x1a5)]&&(console[_0x44b3b2(0x1ba)](_0x44b3b2(0x1c0)+_0x8b2f8e[_0x44b3b2(0x1ae)]),_0xdbe48f[_0x44b3b2(0x1b3)]?_0x4a3dd6?console[_0x44b3b2(0x1ba)]('Database\x20pattern:\x20'+_0xdbe48f[_0x44b3b2(0x1b3)]):console[_0x44b3b2(0x1ba)](_0x44b3b2(0x1b2)+_0xdbe48f[_0x44b3b2(0x1b3)]):console[_0x44b3b2(0x1ba)](_0x44b3b2(0x1b0)),_0xdbe48f[_0x44b3b2(0x19c)]&&console[_0x44b3b2(0x1ba)](_0x44b3b2(0x1c7)+_0xdbe48f[_0x44b3b2(0x19c)]));const _0x3a1a41=_0xdbe48f[_0x44b3b2(0x1b3)]&&!_0x4a3dd6?_0xdbe48f[_0x44b3b2(0x1b3)]:undefined,_0x40fdda=_0x4a3dd6?_0xdbe48f['database']:undefined,_0x453396=_0xdbe48f[_0x44b3b2(0x19c)],_0x4802b6=resolveLimit(_0x8b2f8e[_0x44b3b2(0x1a0)],DEFAULT_LISTING_LIMIT),_0x37ed9a=await withSpinner(_0x44b3b2(0x1b4),()=>_0x2c5c7e[_0x44b3b2(0x1c5)][_0x44b3b2(0x1aa)](_0x3a1a41,_0x453396,_0x40fdda,_0x4802b6),{'verbose':_0x8b2f8e[_0x44b3b2(0x1a5)]}),_0x349024=_0x37ed9a[_0x44b3b2(0x1a7)];if(_0x349024[_0x44b3b2(0x19a)]===0x0&&_0xdbe48f[_0x44b3b2(0x1b3)]&&!_0x4a3dd6)return console[_0x44b3b2(0x1ba)](_0x44b3b2(0x1a8)),console[_0x44b3b2(0x1ba)](_0x44b3b2(0x1bc)+_0xdbe48f[_0x44b3b2(0x1b3)]+_0x44b3b2(0x1a1)),0x1;return console[_0x44b3b2(0x1ba)](_0x44b3b2(0x19f)+_0x349024[_0x44b3b2(0x19a)]+'\x20table'+(_0x349024[_0x44b3b2(0x19a)]!==0x1?'s':'')),await handleSDKOutput(_0x349024,{..._0x8b2f8e,'limit':_0x4802b6}),0x0;}catch(_0x1350d1){if(_0x1350d1 instanceof SDKError)return console[_0x44b3b2(0x1ba)](_0x44b3b2(0x1bf)+_0x1350d1[_0x44b3b2(0x19e)]),_0x1350d1[_0x44b3b2(0x1b6)]&&console['error'](_0x44b3b2(0x1bb)+_0x1350d1[_0x44b3b2(0x1b6)]),0x1;throw _0x1350d1;}}[a39_0x1890e4(0x1ac)](_0x286120){return undefined;}}
1
+ const a39_0x572e2a=a39_0x5997;function a39_0x5997(_0x9d4bba,_0x4a850b){_0x9d4bba=_0x9d4bba-0x170;const _0x3a9219=a39_0x3a92();let _0x599717=_0x3a9219[_0x9d4bba];return _0x599717;}(function(_0x432dd8,_0x41337b){const _0x102a52=a39_0x5997,_0x23ba20=_0x432dd8();while(!![]){try{const _0x2ff759=parseInt(_0x102a52(0x186))/0x1*(parseInt(_0x102a52(0x18d))/0x2)+-parseInt(_0x102a52(0x17c))/0x3*(parseInt(_0x102a52(0x187))/0x4)+parseInt(_0x102a52(0x194))/0x5+parseInt(_0x102a52(0x18c))/0x6+parseInt(_0x102a52(0x198))/0x7*(parseInt(_0x102a52(0x18a))/0x8)+-parseInt(_0x102a52(0x189))/0x9+-parseInt(_0x102a52(0x17b))/0xa;if(_0x2ff759===_0x41337b)break;else _0x23ba20['push'](_0x23ba20['shift']());}catch(_0x2f807e){_0x23ba20['push'](_0x23ba20['shift']());}}}(a39_0x3a92,0xaa9db));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleSDKOutput}from'../utils/command-output.js';function a39_0x3a92(){const _0x1a20b9=['Or\x20use\x20--in\x20flag:','data','\x20\x20tdx\x20tables\x20--in\x20mydb\x20\x20\x20\x20\x20\x20\x20->\x20all\x20tables\x20from\x20mydb','\x20\x20Or:\x20\x20tdx\x20tables\x20--database\x20','Database:\x20all','message','database','4491120ycRjad','173973NeelkU','limit','.*\x22','query','tables','error','execute','validate','\x27\x20without\x20wildcards\x20would\x20search\x20for\x20tables\x20named\x20\x27','cause','66415nhRckq','44cboJFF','description','11886264WzGyoq','4888kwvdFY','Table\x20pattern:\x20','5488470eYbAPs','36ckSylX','Listing\x20tables...','\x20\x20Or:\x20\x20tdx\x20tables\x20--in\x20','verbose','List\x20tables\x20in\x20a\x20database','Note:\x20\x27','listTables','3723025mCPhLv','\x27\x20may\x20not\x20exist\x20or\x20contains\x20no\x20tables','✔\x20Found\x20','Error:\x20Pattern\x20\x27','2884BGCBRI','\x20\x20Cause:\x20','length','Did\x20you\x20mean\x20to\x20list\x20all\x20tables\x20from\x20database\x20\x27','site','\x20\x20tdx\x20tables\x20\x22mydb.users\x22\x20\x20\x20\x20->\x20table\x20\x22users\x22\x20in\x20database\x20mydb','includes','table','✖\x20No\x20tables\x20found','Error:\x20','name','\x20\x20tdx\x20tables\x20users\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20->\x20table\x20\x22users\x22\x20across\x20all\x20databases','Site:\x20','\x20\x20tdx\x20tables\x20\x22mydb.*\x22\x20\x20\x20\x20\x20\x20\x20\x20->\x20all\x20tables\x20from\x20mydb'];a39_0x3a92=function(){return _0x1a20b9;};return a39_0x3a92();}import{parseTableReference}from'../utils/table-ref-parser.js';import{DEFAULT_LISTING_LIMIT,resolveLimit}from'../utils/constants.js';import{withSpinner}from'../utils/spinner.js';export class TablesCommand extends BaseCommand{[a39_0x572e2a(0x170)]=a39_0x572e2a(0x180);[a39_0x572e2a(0x188)]=a39_0x572e2a(0x191);async[a39_0x572e2a(0x182)](_0x1caaae){const _0x2be761=a39_0x572e2a,{options:_0x1fdaf9,args:_0x2ccd21,tdx:_0xb1b16b}=_0x1caaae;let _0x342ef5;if(_0x2ccd21[_0x2be761(0x19a)]===0x0)_0x342ef5={'database':undefined,'table':undefined,'original':''};else{if(_0x2ccd21[_0x2be761(0x19a)]===0x1)try{_0x342ef5=parseTableReference(_0x2ccd21[0x0]);if(_0x342ef5[_0x2be761(0x19f)]&&!_0x342ef5['database']&&!_0x342ef5['table']['includes']('*')&&!_0x342ef5['table']['includes']('?'))return console['error'](_0x2be761(0x197)+_0x2ccd21[0x0]+'\x27\x20is\x20ambiguous.'),console[_0x2be761(0x181)](_0x2be761(0x19b)+_0x342ef5['table']+'\x27?'),console[_0x2be761(0x181)]('\x20\x20Use:\x20tdx\x20tables\x20\x22'+_0x342ef5[_0x2be761(0x19f)]+_0x2be761(0x17e)),console[_0x2be761(0x181)](_0x2be761(0x18f)+_0x342ef5[_0x2be761(0x19f)]),console[_0x2be761(0x181)](_0x2be761(0x177)+_0x342ef5[_0x2be761(0x19f)]),console['error'](''),console[_0x2be761(0x181)](_0x2be761(0x192)+_0x2ccd21[0x0]+_0x2be761(0x184)+_0x342ef5[_0x2be761(0x19f)]+'\x27\x20across\x20all\x20databases.'),0x1;}catch(_0x3b7640){return console['error'](_0x2be761(0x1a1)+_0x3b7640[_0x2be761(0x179)]),0x1;}else return console['error']('Error:\x20Too\x20many\x20arguments.\x20Use\x20single\x20argument:'),console[_0x2be761(0x181)](_0x2be761(0x171)),console[_0x2be761(0x181)](_0x2be761(0x173)),console[_0x2be761(0x181)](_0x2be761(0x19d)),console[_0x2be761(0x181)]('\x20\x20tdx\x20tables\x20\x22*.user*\x22\x20\x20\x20\x20\x20\x20\x20->\x20tables\x20matching\x20user*\x20across\x20databases'),console[_0x2be761(0x181)](_0x2be761(0x174)),console['error'](_0x2be761(0x176)),0x1;}const _0x1e4649=_0x1fdaf9[_0x2be761(0x17a)];!_0x342ef5[_0x2be761(0x17a)]&&_0x1e4649&&(_0x342ef5[_0x2be761(0x17a)]=_0x1e4649);try{const _0x3f4fc5=_0x292944=>_0x292944&&(_0x292944[_0x2be761(0x19e)]('*')||_0x292944['includes']('?')),_0x5be578=_0x3f4fc5(_0x342ef5[_0x2be761(0x17a)]);_0x1fdaf9[_0x2be761(0x190)]&&(console[_0x2be761(0x181)](_0x2be761(0x172)+_0x1fdaf9[_0x2be761(0x19c)]),_0x342ef5[_0x2be761(0x17a)]?_0x5be578?console[_0x2be761(0x181)]('Database\x20pattern:\x20'+_0x342ef5[_0x2be761(0x17a)]):console[_0x2be761(0x181)]('Database:\x20'+_0x342ef5['database']):console['error'](_0x2be761(0x178)),_0x342ef5[_0x2be761(0x19f)]&&console[_0x2be761(0x181)](_0x2be761(0x18b)+_0x342ef5['table']));const _0x552edf=_0x342ef5[_0x2be761(0x17a)]&&!_0x5be578?_0x342ef5['database']:undefined,_0x56b306=_0x5be578?_0x342ef5[_0x2be761(0x17a)]:undefined,_0x31580d=_0x342ef5['table'],_0x3cafac=resolveLimit(_0x1fdaf9[_0x2be761(0x17d)],DEFAULT_LISTING_LIMIT),_0x6272b6=await withSpinner(_0x2be761(0x18e),()=>_0xb1b16b[_0x2be761(0x17f)][_0x2be761(0x193)](_0x552edf,_0x31580d,_0x56b306,_0x3cafac),{'verbose':_0x1fdaf9[_0x2be761(0x190)]}),_0x508417=_0x6272b6[_0x2be761(0x175)];if(_0x508417['length']===0x0&&_0x342ef5[_0x2be761(0x17a)]&&!_0x5be578)return console[_0x2be761(0x181)](_0x2be761(0x1a0)),console[_0x2be761(0x181)]('Database\x20\x27'+_0x342ef5[_0x2be761(0x17a)]+_0x2be761(0x195)),0x1;return console[_0x2be761(0x181)](_0x2be761(0x196)+_0x508417[_0x2be761(0x19a)]+'\x20table'+(_0x508417[_0x2be761(0x19a)]!==0x1?'s':'')),await handleSDKOutput(_0x508417,{..._0x1fdaf9,'limit':_0x3cafac}),0x0;}catch(_0x3b6236){if(_0x3b6236 instanceof SDKError)return console[_0x2be761(0x181)]('Error:\x20'+_0x3b6236[_0x2be761(0x179)]),_0x3b6236[_0x2be761(0x185)]&&console[_0x2be761(0x181)](_0x2be761(0x199)+_0x3b6236[_0x2be761(0x185)]),0x1;throw _0x3b6236;}}[a39_0x572e2a(0x183)](_0x3857ec){return undefined;}}
@@ -1 +1 @@
1
- function a40_0x821c(){const _0x8ad778=['clear','includes','\x0aTip:\x20Use\x20\x27tdx\x20use\x20--clear\x27\x20to\x20clear\x20session\x20overrides','name','1264686IABVIe','3177760YcdzWL','toString','Session\x20database\x20set\x20to:\x20','Set\x20session-level\x20context','dim','displayWithSources','62253DhJZsK','3431172BXwsEw','11417721aCmVGu','engage_workspace','58qFWZoA','\x0aUse\x20\x27tdx\x20profiles\x27\x20to\x20see\x20available\x20profiles','session','profile','8cfWFgl','length','\x27\x20does\x20not\x20exist','Usage:\x20tdx\x20use\x20<resource>\x20<value>\x0a','Error:\x20','\x0aRun\x20\x27tdx\x20use\x20--help\x27\x20for\x20more\x20options','join','208424wOVKpg','\x0aSet\x20context:\x20tdx\x20use\x20<resource>\x20<value>','387hEhcsx','log','Session\x20parent_segment\x20set\x20to:\x20','\x0aResources:\x20database,\x20parent_segment,\x20llm_project,\x20profile,\x20engage_workspace\x0a','681895Fstrto','message','database','parent_segment','llm_project','(session:\x20','Resources:\x20database,\x20parent_segment,\x20llm_project,\x20profile,\x20engage_workspace','\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20--clear\x20\x20\x20\x20\x20\x20#\x20Clear\x20session\x20context\x0a','Session\x20engage_workspace\x20set\x20to:\x20','execute','display','.\x20Must\x20be\x20one\x20of:\x20','error','Session\x20llm_project\x20set\x20to:\x20','green'];a40_0x821c=function(){return _0x8ad778;};return a40_0x821c();}const a40_0x25a850=a40_0x1c08;(function(_0x43947a,_0x582f0b){const _0xaaf820=a40_0x1c08,_0x5d1c41=_0x43947a();while(!![]){try{const _0x1ab133=-parseInt(_0xaaf820(0x84))/0x1+-parseInt(_0xaaf820(0x8f))/0x2*(parseInt(_0xaaf820(0x8b))/0x3)+parseInt(_0xaaf820(0x93))/0x4*(parseInt(_0xaaf820(0x71))/0x5)+-parseInt(_0xaaf820(0x8c))/0x6+parseInt(_0xaaf820(0x8d))/0x7+-parseInt(_0xaaf820(0x9a))/0x8*(-parseInt(_0xaaf820(0x9c))/0x9)+parseInt(_0xaaf820(0x85))/0xa;if(_0x1ab133===_0x582f0b)break;else _0x5d1c41['push'](_0x5d1c41['shift']());}catch(_0x48cc71){_0x5d1c41['push'](_0x5d1c41['shift']());}}}(a40_0x821c,0xdc9a5));function a40_0x1c08(_0x1e2696,_0x144378){_0x1e2696=_0x1e2696-0x70;const _0x821cab=a40_0x821c();let _0x1c08f3=_0x821cab[_0x1e2696];return _0x1c08f3;}import{BaseCommand}from'./command.js';import{saveSessionContext,getCurrentSessionPID,cleanExpiredSessions,clearSessionContext}from'../core/session.js';import{profileExists}from'../core/profile.js';import{GlobalContext}from'../core/global-context.js';import a40_0x1efcc1 from'chalk';export class UseCommand extends BaseCommand{[a40_0x25a850(0x83)]='use';['description']=a40_0x25a850(0x88);['validate'](_0x6ed00e){const _0x1f505d=a40_0x25a850,{args:_0x469602}=_0x6ed00e;if(_0x469602['length']===0x0)return undefined;if(_0x469602[_0x1f505d(0x94)]===0x1)return _0x1f505d(0x96)+'\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20current\x20context\x0a'+_0x1f505d(0x78)+_0x1f505d(0x70)+_0x1f505d(0x98);const _0x56ae7c=_0x469602[0x0],_0x4f980a=[_0x1f505d(0x73),_0x1f505d(0x74),_0x1f505d(0x75),'profile','engage_workspace'];if(!_0x4f980a[_0x1f505d(0x81)](_0x56ae7c))return'Invalid\x20resource:\x20'+_0x56ae7c+_0x1f505d(0x7c)+_0x4f980a[_0x1f505d(0x99)](',\x20');return undefined;}async[a40_0x25a850(0x7a)](_0x5a6756){const _0x159636=a40_0x25a850,{args:_0xb9ce3a,options:_0x5a4dfb}=_0x5a6756,_0x18d138=_0x5a4dfb['debug'],_0x3c2807=_0x5a4dfb[_0x159636(0x80)];cleanExpiredSessions();try{if(_0x3c2807){clearSessionContext(_0x5a4dfb[_0x159636(0x91)]);const _0x214d6f=_0x5a4dfb[_0x159636(0x91)]||getCurrentSessionPID()[_0x159636(0x86)]();return console[_0x159636(0x9d)]('Session\x20context\x20'+a40_0x1efcc1[_0x159636(0x7f)]('cleared')+'\x20'+a40_0x1efcc1[_0x159636(0x89)](_0x159636(0x76)+_0x214d6f+')')),0x0;}if(_0xb9ce3a[_0x159636(0x94)]===0x0){const _0x2a226c=new GlobalContext(_0x5a4dfb);return _0x18d138?_0x2a226c[_0x159636(0x8a)]():_0x2a226c[_0x159636(0x7b)](),console[_0x159636(0x9d)](a40_0x1efcc1[_0x159636(0x89)](_0x159636(0x9b))),console[_0x159636(0x9d)](a40_0x1efcc1['dim'](_0x159636(0x77))),0x0;}const _0x1752b2=_0xb9ce3a[0x0],_0x48b49d=_0xb9ce3a[0x1];if(_0x1752b2===_0x159636(0x92)){if(!profileExists(_0x48b49d))return console[_0x159636(0x7d)]('Error:\x20Profile\x20\x27'+_0x48b49d+_0x159636(0x95)),console[_0x159636(0x7d)](_0x159636(0x90)),0x1;const _0xa319ea=_0x5a4dfb['session']||getCurrentSessionPID()[_0x159636(0x86)]();return saveSessionContext({'profile':_0x48b49d},_0x5a4dfb[_0x159636(0x91)]),console['log']('Session\x20profile\x20set\x20to:\x20'+a40_0x1efcc1[_0x159636(0x7f)](_0x48b49d)+'\x20'+a40_0x1efcc1[_0x159636(0x89)](_0x159636(0x76)+_0xa319ea+')')),console['log'](a40_0x1efcc1[_0x159636(0x89)](_0x159636(0x82))),0x0;}const _0x25cc05={},_0x3f897b=_0x5a4dfb[_0x159636(0x91)]||getCurrentSessionPID()[_0x159636(0x86)]();switch(_0x1752b2){case _0x159636(0x73):_0x25cc05[_0x159636(0x73)]=_0x48b49d,console[_0x159636(0x9d)](_0x159636(0x87)+a40_0x1efcc1[_0x159636(0x7f)](_0x48b49d)+'\x20'+a40_0x1efcc1[_0x159636(0x89)](_0x159636(0x76)+_0x3f897b+')'));break;case'parent_segment':_0x25cc05['parent_segment']=_0x48b49d,console[_0x159636(0x9d)](_0x159636(0x9e)+a40_0x1efcc1[_0x159636(0x7f)](_0x48b49d)+'\x20'+a40_0x1efcc1[_0x159636(0x89)]('(session:\x20'+_0x3f897b+')'));break;case _0x159636(0x75):_0x25cc05[_0x159636(0x75)]=_0x48b49d,console[_0x159636(0x9d)](_0x159636(0x7e)+a40_0x1efcc1[_0x159636(0x7f)](_0x48b49d)+'\x20'+a40_0x1efcc1[_0x159636(0x89)](_0x159636(0x76)+_0x3f897b+')'));break;case _0x159636(0x8e):_0x25cc05['engage_workspace']=_0x48b49d,console[_0x159636(0x9d)](_0x159636(0x79)+a40_0x1efcc1[_0x159636(0x7f)](_0x48b49d)+'\x20'+a40_0x1efcc1[_0x159636(0x89)](_0x159636(0x76)+_0x3f897b+')'));break;}return saveSessionContext(_0x25cc05,_0x5a4dfb[_0x159636(0x91)]),console[_0x159636(0x9d)](a40_0x1efcc1[_0x159636(0x89)](_0x159636(0x82))),0x0;}catch(_0x3f84cb){return _0x3f84cb instanceof Error&&console[_0x159636(0x7d)](_0x159636(0x97)+_0x3f84cb[_0x159636(0x72)]),0x1;}}}
1
+ const a40_0x256c5d=a40_0x27be;(function(_0x4f19d1,_0x15267b){const _0x1a058b=a40_0x27be,_0x372f08=_0x4f19d1();while(!![]){try{const _0x23e78f=-parseInt(_0x1a058b(0xf8))/0x1*(parseInt(_0x1a058b(0xf0))/0x2)+parseInt(_0x1a058b(0xdb))/0x3+-parseInt(_0x1a058b(0xfb))/0x4*(-parseInt(_0x1a058b(0xef))/0x5)+parseInt(_0x1a058b(0xf1))/0x6+parseInt(_0x1a058b(0xea))/0x7+-parseInt(_0x1a058b(0xee))/0x8*(parseInt(_0x1a058b(0xe5))/0x9)+-parseInt(_0x1a058b(0xf2))/0xa;if(_0x23e78f===_0x15267b)break;else _0x372f08['push'](_0x372f08['shift']());}catch(_0x58273e){_0x372f08['push'](_0x372f08['shift']());}}}(a40_0x21b4,0x43f33));import{BaseCommand}from'./command.js';function a40_0x27be(_0xa8a014,_0x54e42a){_0xa8a014=_0xa8a014-0xd0;const _0x21b4e9=a40_0x21b4();let _0x27be21=_0x21b4e9[_0xa8a014];return _0x27be21;}import{saveSessionContext,getCurrentSessionPID,cleanExpiredSessions,clearSessionContext}from'../core/session.js';import{profileExists}from'../core/profile.js';import{GlobalContext}from'../core/global-context.js';import a40_0x371e4a from'chalk';function a40_0x21b4(){const _0x7c3add=['Error:\x20','\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20--clear\x20\x20\x20\x20\x20\x20#\x20Clear\x20session\x20context\x0a','1359fjRMMh','Error:\x20Profile\x20\x27','engage_workspace','parent_segment','.\x20Must\x20be\x20one\x20of:\x20','2858863MJipfJ','\x27\x20does\x20not\x20exist','execute','cleared','27176GvYJEf','35ofFhkQ','4WssGsE','2303082hMHmaA','1596840zFSxGo','join','description','Session\x20profile\x20set\x20to:\x20','message','includes','149449ALtthk','green','dim','61444DgsWTw','validate','Set\x20session-level\x20context','log','Session\x20llm_project\x20set\x20to:\x20','displayWithSources','profile','debug','session','use','\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20current\x20context\x0a','length','Invalid\x20resource:\x20','\x0aTip:\x20Use\x20\x27tdx\x20use\x20--clear\x27\x20to\x20clear\x20session\x20overrides','llm_project','1050207eqeoUD','toString','database','(session:\x20','Session\x20parent_segment\x20set\x20to:\x20','error','Session\x20database\x20set\x20to:\x20','Session\x20engage_workspace\x20set\x20to:\x20'];a40_0x21b4=function(){return _0x7c3add;};return a40_0x21b4();}export class UseCommand extends BaseCommand{['name']=a40_0x256c5d(0xd5);[a40_0x256c5d(0xf4)]=a40_0x256c5d(0xfd);[a40_0x256c5d(0xfc)](_0x344b31){const _0x577015=a40_0x256c5d,{args:_0x1ec5a2}=_0x344b31;if(_0x1ec5a2[_0x577015(0xd7)]===0x0)return undefined;if(_0x1ec5a2[_0x577015(0xd7)]===0x1)return'Usage:\x20tdx\x20use\x20<resource>\x20<value>\x0a'+_0x577015(0xd6)+_0x577015(0xe4)+'\x0aResources:\x20database,\x20parent_segment,\x20llm_project,\x20profile,\x20engage_workspace\x0a'+'\x0aRun\x20\x27tdx\x20use\x20--help\x27\x20for\x20more\x20options';const _0x2fb3b7=_0x1ec5a2[0x0],_0x5159f4=['database',_0x577015(0xe8),_0x577015(0xda),_0x577015(0xd2),'engage_workspace'];if(!_0x5159f4[_0x577015(0xf7)](_0x2fb3b7))return _0x577015(0xd8)+_0x2fb3b7+_0x577015(0xe9)+_0x5159f4[_0x577015(0xf3)](',\x20');return undefined;}async[a40_0x256c5d(0xec)](_0x306dc0){const _0x3a2f51=a40_0x256c5d,{args:_0x270331,options:_0x54d1c5}=_0x306dc0,_0x2ecdfd=_0x54d1c5[_0x3a2f51(0xd3)],_0xc8264=_0x54d1c5['clear'];cleanExpiredSessions();try{if(_0xc8264){clearSessionContext(_0x54d1c5[_0x3a2f51(0xd4)]);const _0x8f8b55=_0x54d1c5['session']||getCurrentSessionPID()[_0x3a2f51(0xdc)]();return console[_0x3a2f51(0xfe)]('Session\x20context\x20'+a40_0x371e4a[_0x3a2f51(0xf9)](_0x3a2f51(0xed))+'\x20'+a40_0x371e4a[_0x3a2f51(0xfa)]('(session:\x20'+_0x8f8b55+')')),0x0;}if(_0x270331[_0x3a2f51(0xd7)]===0x0){const _0x521ed5=new GlobalContext(_0x54d1c5);return _0x2ecdfd?_0x521ed5[_0x3a2f51(0xd1)]():_0x521ed5['display'](),console['log'](a40_0x371e4a[_0x3a2f51(0xfa)]('\x0aSet\x20context:\x20tdx\x20use\x20<resource>\x20<value>')),console['log'](a40_0x371e4a[_0x3a2f51(0xfa)]('Resources:\x20database,\x20parent_segment,\x20llm_project,\x20profile,\x20engage_workspace')),0x0;}const _0x1bbbcf=_0x270331[0x0],_0x1d9c2a=_0x270331[0x1];if(_0x1bbbcf===_0x3a2f51(0xd2)){if(!profileExists(_0x1d9c2a))return console[_0x3a2f51(0xe0)](_0x3a2f51(0xe6)+_0x1d9c2a+_0x3a2f51(0xeb)),console[_0x3a2f51(0xe0)]('\x0aUse\x20\x27tdx\x20profiles\x27\x20to\x20see\x20available\x20profiles'),0x1;const _0x334f0b=_0x54d1c5[_0x3a2f51(0xd4)]||getCurrentSessionPID()[_0x3a2f51(0xdc)]();return saveSessionContext({'profile':_0x1d9c2a},_0x54d1c5[_0x3a2f51(0xd4)]),console[_0x3a2f51(0xfe)](_0x3a2f51(0xf5)+a40_0x371e4a['green'](_0x1d9c2a)+'\x20'+a40_0x371e4a[_0x3a2f51(0xfa)](_0x3a2f51(0xde)+_0x334f0b+')')),console[_0x3a2f51(0xfe)](a40_0x371e4a[_0x3a2f51(0xfa)](_0x3a2f51(0xd9))),0x0;}const _0x1e4d27={},_0x165133=_0x54d1c5['session']||getCurrentSessionPID()[_0x3a2f51(0xdc)]();switch(_0x1bbbcf){case _0x3a2f51(0xdd):_0x1e4d27[_0x3a2f51(0xdd)]=_0x1d9c2a,console[_0x3a2f51(0xfe)](_0x3a2f51(0xe1)+a40_0x371e4a[_0x3a2f51(0xf9)](_0x1d9c2a)+'\x20'+a40_0x371e4a['dim'](_0x3a2f51(0xde)+_0x165133+')'));break;case _0x3a2f51(0xe8):_0x1e4d27['parent_segment']=_0x1d9c2a,console[_0x3a2f51(0xfe)](_0x3a2f51(0xdf)+a40_0x371e4a['green'](_0x1d9c2a)+'\x20'+a40_0x371e4a['dim']('(session:\x20'+_0x165133+')'));break;case _0x3a2f51(0xda):_0x1e4d27[_0x3a2f51(0xda)]=_0x1d9c2a,console[_0x3a2f51(0xfe)](_0x3a2f51(0xd0)+a40_0x371e4a[_0x3a2f51(0xf9)](_0x1d9c2a)+'\x20'+a40_0x371e4a[_0x3a2f51(0xfa)](_0x3a2f51(0xde)+_0x165133+')'));break;case _0x3a2f51(0xe7):_0x1e4d27['engage_workspace']=_0x1d9c2a,console[_0x3a2f51(0xfe)](_0x3a2f51(0xe2)+a40_0x371e4a[_0x3a2f51(0xf9)](_0x1d9c2a)+'\x20'+a40_0x371e4a[_0x3a2f51(0xfa)]('(session:\x20'+_0x165133+')'));break;}return saveSessionContext(_0x1e4d27,_0x54d1c5[_0x3a2f51(0xd4)]),console[_0x3a2f51(0xfe)](a40_0x371e4a['dim'](_0x3a2f51(0xd9))),0x0;}catch(_0x5ce6a8){return _0x5ce6a8 instanceof Error&&console[_0x3a2f51(0xe0)](_0x3a2f51(0xe3)+_0x5ce6a8[_0x3a2f51(0xf6)]),0x1;}}}
@@ -1 +1 @@
1
- const a41_0x5c810e=a41_0x13e2;(function(_0x11e819,_0x4f3a56){const _0x2423f0=a41_0x13e2,_0xe57a70=_0x11e819();while(!![]){try{const _0x2c355a=-parseInt(_0x2423f0(0x1da))/0x1*(-parseInt(_0x2423f0(0x1cd))/0x2)+parseInt(_0x2423f0(0x1d2))/0x3+-parseInt(_0x2423f0(0x1d9))/0x4*(-parseInt(_0x2423f0(0x1cf))/0x5)+-parseInt(_0x2423f0(0x1dc))/0x6+-parseInt(_0x2423f0(0x1d3))/0x7*(-parseInt(_0x2423f0(0x1cc))/0x8)+parseInt(_0x2423f0(0x1e7))/0x9+parseInt(_0x2423f0(0x1e1))/0xa*(-parseInt(_0x2423f0(0x1e2))/0xb);if(_0x2c355a===_0x4f3a56)break;else _0xe57a70['push'](_0xe57a70['shift']());}catch(_0x23cd37){_0xe57a70['push'](_0xe57a70['shift']());}}}(a41_0x52b0,0x9538c));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleSDKOutput,handleSingleObjectOutput}from'../utils/command-output.js';import{withSpinner}from'../utils/spinner.js';function a41_0x13e2(_0xed9100,_0x1bb25a){_0xed9100=_0xed9100-0x1cb;const _0x52b00f=a41_0x52b0();let _0x13e2dc=_0x52b00f[_0xed9100];return _0x13e2dc;}export class UserCommand extends BaseCommand{[a41_0x5c810e(0x1e0)]='user';['description']=a41_0x5c810e(0x1e4);async[a41_0x5c810e(0x1d8)](_0x40588a){const _0x1aaa86=a41_0x5c810e,{options:_0x22e896,tdx:_0x2b2ea4}=_0x40588a;try{const _0x3ab99d=await withSpinner('Fetching\x20user\x20info...',()=>_0x2b2ea4[_0x1aaa86(0x1d7)][_0x1aaa86(0x1d0)](),{'verbose':_0x22e896[_0x1aaa86(0x1d5)]}),_0x36bdf1=_0x3ab99d[_0x1aaa86(0x1d6)];return await handleSingleObjectOutput(_0x36bdf1,_0x22e896),0x0;}catch(_0x7f4dc5){if(_0x7f4dc5 instanceof SDKError)return console['error'](_0x1aaa86(0x1db)+_0x7f4dc5[_0x1aaa86(0x1d1)]),_0x7f4dc5[_0x1aaa86(0x1d4)]&&console[_0x1aaa86(0x1e6)]('\x20\x20Cause:\x20'+_0x7f4dc5[_0x1aaa86(0x1d4)]),0x1;throw _0x7f4dc5;}}}function a41_0x52b0(){const _0x4b3807=['321687qMeasw','user\x20list','8mzHFjW','6ldKxkh','length','35KTshzG','getCurrent','message','2319411ByLeFF','4632026sTIgZu','cause','verbose','data','user','execute','225332fmHHlu','93350fywvGd','Error:\x20','4162668nIWnzt','List\x20all\x20users\x20in\x20the\x20account','Listing\x20users...','\x20user','name','8399890DHTOKI','11xAdXTd','✔\x20Found\x20','Show\x20current\x20user\x20information','description','error'];a41_0x52b0=function(){return _0x4b3807;};return a41_0x52b0();}export class UserListCommand extends BaseCommand{[a41_0x5c810e(0x1e0)]=a41_0x5c810e(0x1cb);[a41_0x5c810e(0x1e5)]=a41_0x5c810e(0x1dd);async[a41_0x5c810e(0x1d8)](_0x2797b5){const _0x3405b7=a41_0x5c810e,{options:_0x407279,tdx:_0x4aacd4}=_0x2797b5;try{const _0x42e733=await withSpinner(_0x3405b7(0x1de),()=>_0x4aacd4[_0x3405b7(0x1d7)]['list'](),{'verbose':_0x407279[_0x3405b7(0x1d5)]}),_0x28e55b=_0x42e733['data'];return console[_0x3405b7(0x1e6)](_0x3405b7(0x1e3)+_0x28e55b[_0x3405b7(0x1ce)]+_0x3405b7(0x1df)+(_0x28e55b[_0x3405b7(0x1ce)]!==0x1?'s':'')),await handleSDKOutput(_0x28e55b,_0x407279),0x0;}catch(_0x14c233){if(_0x14c233 instanceof SDKError)return console['error'](_0x3405b7(0x1db)+_0x14c233[_0x3405b7(0x1d1)]),_0x14c233[_0x3405b7(0x1d4)]&&console[_0x3405b7(0x1e6)]('\x20\x20Cause:\x20'+_0x14c233['cause']),0x1;throw _0x14c233;}}}
1
+ function a41_0x350a(_0x99d23d,_0x5a80c2){_0x99d23d=_0x99d23d-0x174;const _0x57bb3d=a41_0x57bb();let _0x350a1c=_0x57bb3d[_0x99d23d];return _0x350a1c;}const a41_0x599ba9=a41_0x350a;(function(_0x2d7de4,_0x3e828c){const _0xba9dd3=a41_0x350a,_0x19582c=_0x2d7de4();while(!![]){try{const _0x574fdb=-parseInt(_0xba9dd3(0x18c))/0x1*(parseInt(_0xba9dd3(0x188))/0x2)+-parseInt(_0xba9dd3(0x184))/0x3+-parseInt(_0xba9dd3(0x176))/0x4*(-parseInt(_0xba9dd3(0x17f))/0x5)+parseInt(_0xba9dd3(0x177))/0x6*(-parseInt(_0xba9dd3(0x180))/0x7)+-parseInt(_0xba9dd3(0x18e))/0x8*(parseInt(_0xba9dd3(0x179))/0x9)+-parseInt(_0xba9dd3(0x182))/0xa*(-parseInt(_0xba9dd3(0x181))/0xb)+parseInt(_0xba9dd3(0x186))/0xc;if(_0x574fdb===_0x3e828c)break;else _0x19582c['push'](_0x19582c['shift']());}catch(_0x4d8387){_0x19582c['push'](_0x19582c['shift']());}}}(a41_0x57bb,0x5e940));function a41_0x57bb(){const _0x12b877=['data','error','\x20\x20Cause:\x20','Fetching\x20user\x20info...','3025485REGLnN','443401RHzBdU','11Mzcrrg','5988830jroBuc','length','1802856bhYPHw','cause','15662916AQNMmM','Listing\x20users...','1414hvkUDE','name','verbose','user','917wxIbna','getCurrent','5460248oefZex','\x20user','✔\x20Found\x20','message','execute','description','4MXbZEr','18hXWvai','List\x20all\x20users\x20in\x20the\x20account','9RJLify','Error:\x20'];a41_0x57bb=function(){return _0x12b877;};return a41_0x57bb();}import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleSDKOutput,handleSingleObjectOutput}from'../utils/command-output.js';import{withSpinner}from'../utils/spinner.js';export class UserCommand extends BaseCommand{['name']='user';[a41_0x599ba9(0x175)]='Show\x20current\x20user\x20information';async[a41_0x599ba9(0x174)](_0x256a1c){const _0x3a330b=a41_0x599ba9,{options:_0x48bbd4,tdx:_0x4161dd}=_0x256a1c;try{const _0x342db5=await withSpinner(_0x3a330b(0x17e),()=>_0x4161dd[_0x3a330b(0x18b)][_0x3a330b(0x18d)](),{'verbose':_0x48bbd4[_0x3a330b(0x18a)]}),_0x35dc5a=_0x342db5['data'];return await handleSingleObjectOutput(_0x35dc5a,_0x48bbd4),0x0;}catch(_0x176ed1){if(_0x176ed1 instanceof SDKError)return console['error'](_0x3a330b(0x17a)+_0x176ed1[_0x3a330b(0x191)]),_0x176ed1['cause']&&console[_0x3a330b(0x17c)](_0x3a330b(0x17d)+_0x176ed1[_0x3a330b(0x185)]),0x1;throw _0x176ed1;}}}export class UserListCommand extends BaseCommand{[a41_0x599ba9(0x189)]='user\x20list';[a41_0x599ba9(0x175)]=a41_0x599ba9(0x178);async[a41_0x599ba9(0x174)](_0x32bbce){const _0x4cb8b4=a41_0x599ba9,{options:_0x2b3fb1,tdx:_0x22262d}=_0x32bbce;try{const _0x1cd67c=await withSpinner(_0x4cb8b4(0x187),()=>_0x22262d[_0x4cb8b4(0x18b)]['list'](),{'verbose':_0x2b3fb1[_0x4cb8b4(0x18a)]}),_0x5b4ce5=_0x1cd67c[_0x4cb8b4(0x17b)];return console[_0x4cb8b4(0x17c)](_0x4cb8b4(0x190)+_0x5b4ce5['length']+_0x4cb8b4(0x18f)+(_0x5b4ce5[_0x4cb8b4(0x183)]!==0x1?'s':'')),await handleSDKOutput(_0x5b4ce5,_0x2b3fb1),0x0;}catch(_0x5d6612){if(_0x5d6612 instanceof SDKError)return console[_0x4cb8b4(0x17c)](_0x4cb8b4(0x17a)+_0x5d6612[_0x4cb8b4(0x191)]),_0x5d6612[_0x4cb8b4(0x185)]&&console['error'](_0x4cb8b4(0x17d)+_0x5d6612['cause']),0x1;throw _0x5d6612;}}}
@@ -1 +1 @@
1
- const a42_0x3a9913=a42_0x298e;(function(_0x96a69f,_0x573406){const _0x35ff64=a42_0x298e,_0x190fa7=_0x96a69f();while(!![]){try{const _0x131c3a=-parseInt(_0x35ff64(0xfd))/0x1*(-parseInt(_0x35ff64(0x9c))/0x2)+parseInt(_0x35ff64(0xe4))/0x3*(parseInt(_0x35ff64(0xee))/0x4)+-parseInt(_0x35ff64(0xbd))/0x5*(parseInt(_0x35ff64(0x8a))/0x6)+-parseInt(_0x35ff64(0x92))/0x7*(-parseInt(_0x35ff64(0x103))/0x8)+-parseInt(_0x35ff64(0xfa))/0x9+-parseInt(_0x35ff64(0xd9))/0xa*(parseInt(_0x35ff64(0xf4))/0xb)+parseInt(_0x35ff64(0xda))/0xc;if(_0x131c3a===_0x573406)break;else _0x190fa7['push'](_0x190fa7['shift']());}catch(_0x3f5144){_0x190fa7['push'](_0x190fa7['shift']());}}}(a42_0x120b,0x63189));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleSDKOutput,handleSingleObjectOutput}from'../utils/command-output.js';function a42_0x298e(_0x263914,_0x4e9af8){_0x263914=_0x263914-0x78;const _0x120b38=a42_0x120b();let _0x298eac=_0x120b38[_0x263914];return _0x298eac;}import{withSpinner}from'../utils/spinner.js';import{confirm}from'../utils/prompt.js';import{formatBytes}from'../utils/formatters.js';function a42_0x120b(){const _0x11d711=['\x20task','List\x20workflow\x20attempts','name','\x20\x20New\x20attempt\x20ID:\x20','5869456QXhyAw','Project:\x20','workflow:logs','No\x20log\x20files\x20found\x20for\x20this\x20attempt','Reason:\x20','Status:\x20','Attempt\x20ID:\x20','Show\x20logs\x20for\x20a\x20workflow\x20attempt','execute','workflow:projects','Show\x20tasks\x20for\x20an\x20attempt','includeRetried','Listing\x20workflow\x20sessions...','retrySession','From\x20task:\x20','List\x20workflow\x20execution\x20sessions','select','Download\x20workflow\x20project\x20from\x20Treasure\x20Data','attemptId','\x20\x20Project\x20ID:\x20','parse','index','\x20is\x20not\x20a\x20directory','log','Resume\x20from:\x20','Pattern:\x20','getTime','filesExtracted','Workflow:\x20','split','Killing\x20attempt...','description','Downloading\x20project\x20','task','delete','Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20project\x20\x22','✔\x20Pushed\x20','map','Error:\x20','fromTask','Include\x20retried:\x20yes','success','Params:\x20','verbose','logFiles','6thueMD','utf-8','cause','retryAttemptName','finishedAt','Retry\x20a\x20session\x20or\x20attempt','...','\x20\x20Attempt\x20ID:\x20','7rlxDMY','projectName','Usage:\x20workflow:download\x20<project-name>\x20[output-dir]','Listing\x20workflow\x20projects...','\x20attempt','workflow:workflows','Error:\x20Invalid\x20pattern.\x20Use\x20format:\x20project\x20or\x20project.workflow','Getting\x20attempt\x20details...','\x20\x20Session\x20ID:\x20','Project\x20directory:\x20','174wcLSzF','limit','isArray','Listing\x20workflow\x20attempts...','\x20\x20Location:\x20','Usage:\x20workflow\x20retry\x20session:<id>\x20or\x20workflow\x20retry\x20attempt:<id>','data','✔\x20Found\x20','✔\x20Workflow\x20run\x20started','createdAt','message','Error:\x20Invalid\x20parameter\x20format:\x20','running','Usage:\x20workflow\x20run\x20<project.workflow>\x20[options]','\x20project','retryAttempt','workflows','params','Select\x20a\x20task\x20to\x20view\x20logs:','No\x20log\x20content\x20found','Retrying\x20session...','workflow:delete','fileSize','stat','✔\x20Retry\x20started','projectId','startsWith','\x20session','Filter:\x20project=','error','Target:\x20','status','projects','2773970gMZyur','workflow:attempt','Error:\x20Workflow\x20identifier\x20is\x20required','skipValidation','Pushing\x20workflow\x20project...','List\x20workflows','Revision:\x20','workflow:retry','length','Starting\x20workflow\x20run...','readFile','\x20\x20Revision:\x20','workflow:tasks','yes','Error:\x20Invalid\x20JSON\x20in\x20--params','reason','Parameters:\x20','json','Cancelled','sessionTime','workflow:kill','force','Error:\x20Session\x20ID\x20or\x20attempt\x20ID\x20is\x20required','\x20\x20Cause:\x20','✔\x20Downloaded\x20','attempt','workflow:download','Project\x20name:\x20','210SmQAyU','7175700yoUWwS','kill','session','Kill\x20a\x20running\x20attempt','fs/promises','includeSubtasks','resumeFrom','param','workflow:sessions','Expected\x20format:\x20--param\x20key=value','22629ANaGzn','Task\x20name:\x20','Error:\x20Attempt\x20ID\x20is\x20required','substring','push','Error:\x20Target\x20must\x20be\x20prefixed\x20with\x20\x22session:\x22\x20or\x20\x22attempt:\x22','\x20\x20Project:\x20','sessionId','Error:\x20Project\x20name\x20is\x20required','Show\x20specific\x20attempt\x20details','328UxUEuQ','round','revision','\x20\x20Files\x20extracted:\x20','format','workflow:push','403117KDjjWY','logs','Error:\x20Project\x20name\x20or\x20ID\x20is\x20required','Deleting\x20project\x20','project','keys','5265396mIZGLZ','taskName','Filter:\x20','4197wLuuTH','workflow'];a42_0x120b=function(){return _0x11d711;};return a42_0x120b();}import a42_0x4e3679 from'prompts';export class WorkflowProjectsCommand extends BaseCommand{['name']=a42_0x3a9913(0x10c);[a42_0x3a9913(0x7c)]='List\x20all\x20workflow\x20projects';async['execute'](_0x177a53){const _0x57b366=a42_0x3a9913,{options:_0x54d594,args:_0xd30c51,tdx:_0x34d257}=_0x177a53,_0x4964c2=_0xd30c51[0x0];try{_0x54d594['verbose']&&_0x4964c2&&console[_0x57b366(0xb9)](_0x57b366(0x11c)+_0x4964c2);const _0x1d7be2=await withSpinner(_0x57b366(0x95),()=>_0x34d257[_0x57b366(0xfe)][_0x57b366(0xbc)](_0x4964c2,{'limit':_0x54d594['limit']}),{'verbose':_0x54d594[_0x57b366(0x88)]}),_0x4ecd54=_0x1d7be2[_0x57b366(0xa2)];return console['error'](_0x57b366(0xa3)+_0x4ecd54['length']+_0x57b366(0xaa)+(_0x4ecd54['length']!==0x1?'s':'')),await handleSDKOutput(_0x4ecd54,_0x54d594),0x0;}catch(_0xea0466){if(_0xea0466 instanceof SDKError)return console[_0x57b366(0xb9)]('Error:\x20'+_0xea0466[_0x57b366(0xa6)]),_0xea0466[_0x57b366(0x8c)]&&console[_0x57b366(0xb9)](_0x57b366(0xd4)+_0xea0466[_0x57b366(0x8c)]),0x1;throw _0xea0466;}}}export class WorkflowWorkflowsCommand extends BaseCommand{[a42_0x3a9913(0x101)]=a42_0x3a9913(0x97);[a42_0x3a9913(0x7c)]=a42_0x3a9913(0xc2);async['execute'](_0xff0c0d){const _0x5ead50=a42_0x3a9913,{options:_0x359038,args:_0x2b3607,tdx:_0x56abb0}=_0xff0c0d,_0x3d36a6=_0x2b3607[0x0];try{_0x359038['verbose']&&_0x3d36a6&&console[_0x5ead50(0xb9)]('Project\x20filter:\x20'+_0x3d36a6);const _0x5ad91e=await withSpinner('Listing\x20workflows...',()=>_0x56abb0['workflow'][_0x5ead50(0xac)](_0x3d36a6,{'limit':_0x359038[_0x5ead50(0x9d)]}),{'verbose':_0x359038[_0x5ead50(0x88)]}),_0x4841e6=_0x5ad91e[_0x5ead50(0xa2)];return console['error'](_0x5ead50(0xa3)+_0x4841e6[_0x5ead50(0xc5)]+'\x20workflow'+(_0x4841e6[_0x5ead50(0xc5)]!==0x1?'s':'')),await handleSDKOutput(_0x4841e6,_0x359038),0x0;}catch(_0x117951){if(_0x117951 instanceof SDKError)return console[_0x5ead50(0xb9)](_0x5ead50(0x83)+_0x117951[_0x5ead50(0xa6)]),_0x117951[_0x5ead50(0x8c)]&&console[_0x5ead50(0xb9)](_0x5ead50(0xd4)+_0x117951[_0x5ead50(0x8c)]),0x1;throw _0x117951;}}}export class WorkflowSessionsCommand extends BaseCommand{['name']=a42_0x3a9913(0xe2);[a42_0x3a9913(0x7c)]=a42_0x3a9913(0x112);async[a42_0x3a9913(0x10b)](_0x269d21){const _0x529cf4=a42_0x3a9913,{options:_0x33b805,args:_0x496ccd,tdx:_0x477591}=_0x269d21;let _0x153fdb,_0x5437aa;if(_0x496ccd[0x0]){const _0x40e581=_0x496ccd[0x0][_0x529cf4(0x7a)]('.');if(_0x40e581[_0x529cf4(0xc5)]===0x1)_0x153fdb=_0x40e581[0x0];else{if(_0x40e581['length']===0x2)[_0x153fdb,_0x5437aa]=_0x40e581;else return console[_0x529cf4(0xb9)](_0x529cf4(0x98)),0x1;}}try{if(_0x33b805[_0x529cf4(0x88)]){if(_0x153fdb&&_0x5437aa)console[_0x529cf4(0xb9)](_0x529cf4(0xfc)+_0x153fdb+'.'+_0x5437aa);else _0x153fdb&&console['error'](_0x529cf4(0xb8)+_0x153fdb);const _0x9bee9b=_0x33b805['status'];_0x9bee9b&&console['error'](_0x529cf4(0x108)+_0x9bee9b);}const _0x18a11c=await withSpinner(_0x529cf4(0x10f),()=>_0x477591[_0x529cf4(0xfe)]['sessions']({'projectName':_0x153fdb,'workflowName':_0x5437aa,'status':_0x33b805[_0x529cf4(0xbb)],'fromTime':_0x33b805['from'],'toTime':_0x33b805['to'],'limit':_0x33b805[_0x529cf4(0x9d)]}),{'verbose':_0x33b805[_0x529cf4(0x88)]}),_0x47370d=_0x18a11c[_0x529cf4(0xa2)];return console['error']('✔\x20Found\x20'+_0x47370d['length']+_0x529cf4(0xb7)+(_0x47370d['length']!==0x1?'s':'')),await handleSDKOutput(_0x47370d,_0x33b805),0x0;}catch(_0x46d206){if(_0x46d206 instanceof SDKError)return console[_0x529cf4(0xb9)](_0x529cf4(0x83)+_0x46d206[_0x529cf4(0xa6)]),_0x46d206[_0x529cf4(0x8c)]&&console[_0x529cf4(0xb9)](_0x529cf4(0xd4)+_0x46d206[_0x529cf4(0x8c)]),0x1;throw _0x46d206;}}}export class WorkflowAttemptsCommand extends BaseCommand{[a42_0x3a9913(0x101)]='workflow:attempts';[a42_0x3a9913(0x7c)]=a42_0x3a9913(0x100);async[a42_0x3a9913(0x10b)](_0x22070f){const _0x546a11=a42_0x3a9913,{options:_0x5081bf,args:_0x64fb1b,tdx:_0x519c6d}=_0x22070f;let _0x3c37c8,_0x4b03ce;if(_0x64fb1b[0x0]){const _0x4677c8=_0x64fb1b[0x0][_0x546a11(0x7a)]('.');if(_0x4677c8['length']===0x1)_0x3c37c8=_0x4677c8[0x0];else{if(_0x4677c8[_0x546a11(0xc5)]===0x2)[_0x3c37c8,_0x4b03ce]=_0x4677c8;else return console[_0x546a11(0xb9)](_0x546a11(0x98)),0x1;}}try{const _0x12bce1=_0x5081bf[_0x546a11(0x10e)];if(_0x5081bf[_0x546a11(0x88)]){if(_0x3c37c8&&_0x4b03ce)console[_0x546a11(0xb9)](_0x546a11(0xfc)+_0x3c37c8+'.'+_0x4b03ce);else _0x3c37c8&&console['error'](_0x546a11(0xb8)+_0x3c37c8);_0x12bce1&&console[_0x546a11(0xb9)](_0x546a11(0x85));}const _0x3d0468=await withSpinner(_0x546a11(0x9f),()=>_0x519c6d[_0x546a11(0xfe)]['attempts']({'projectName':_0x3c37c8,'workflowName':_0x4b03ce,'includeRetried':_0x12bce1,'limit':_0x5081bf['limit']}),{'verbose':_0x5081bf[_0x546a11(0x88)]}),_0x1d693f=_0x3d0468[_0x546a11(0xa2)];return console[_0x546a11(0xb9)](_0x546a11(0xa3)+_0x1d693f[_0x546a11(0xc5)]+_0x546a11(0x96)+(_0x1d693f['length']!==0x1?'s':'')),await handleSDKOutput(_0x1d693f,_0x5081bf),0x0;}catch(_0x20a5a3){if(_0x20a5a3 instanceof SDKError)return console[_0x546a11(0xb9)]('Error:\x20'+_0x20a5a3[_0x546a11(0xa6)]),_0x20a5a3['cause']&&console[_0x546a11(0xb9)]('\x20\x20Cause:\x20'+_0x20a5a3[_0x546a11(0x8c)]),0x1;throw _0x20a5a3;}}}export class WorkflowAttemptCommand extends BaseCommand{[a42_0x3a9913(0x101)]=a42_0x3a9913(0xbe);[a42_0x3a9913(0x7c)]=a42_0x3a9913(0xed);async[a42_0x3a9913(0x10b)](_0xdd91b){const _0x1d2b80=a42_0x3a9913,{options:_0x3cd28a,args:_0x520264,tdx:_0x450bc4}=_0xdd91b,_0x5c71ec=_0x520264[0x0];if(!_0x5c71ec)return console['error'](_0x1d2b80(0xe6)),0x1;try{_0x3cd28a[_0x1d2b80(0x88)]&&console[_0x1d2b80(0xb9)](_0x1d2b80(0x109)+_0x5c71ec);const _0x470d3e=await withSpinner(_0x1d2b80(0x99),()=>_0x450bc4[_0x1d2b80(0xfe)][_0x1d2b80(0xd6)](_0x5c71ec),{'verbose':_0x3cd28a[_0x1d2b80(0x88)]}),_0x9b5783=_0x470d3e[_0x1d2b80(0xa2)];let _0x25a7e6;!_0x9b5783['done']?_0x25a7e6=_0x9b5783['cancelRequested']?'canceling':_0x1d2b80(0xa8):_0x25a7e6=_0x9b5783[_0x1d2b80(0x86)]?_0x1d2b80(0x86):_0x1d2b80(0xb9);let _0x3c6bd0;if(_0x9b5783[_0x1d2b80(0xa5)]&&_0x9b5783[_0x1d2b80(0x8e)]){const _0x48d81b=new Date(_0x9b5783[_0x1d2b80(0xa5)])[_0x1d2b80(0x11d)](),_0x450fc3=new Date(_0x9b5783[_0x1d2b80(0x8e)])[_0x1d2b80(0x11d)]();_0x3c6bd0=Math[_0x1d2b80(0xef)]((_0x450fc3-_0x48d81b)/0x3e8);}const _0x562d47={'attempt_id':_0x9b5783['id'],'status':_0x25a7e6,..._0x9b5783[_0x1d2b80(0x118)]!==undefined&&{'index':_0x9b5783['index']},..._0x9b5783[_0x1d2b80(0xf8)]&&{'project':_0x9b5783[_0x1d2b80(0xf8)][_0x1d2b80(0x101)]},..._0x9b5783[_0x1d2b80(0xfe)]&&{'workflow':_0x9b5783[_0x1d2b80(0xfe)][_0x1d2b80(0x101)]},..._0x9b5783[_0x1d2b80(0xeb)]&&{'session_id':_0x9b5783['sessionId']},..._0x9b5783[_0x1d2b80(0xd0)]&&{'session_time':_0x9b5783[_0x1d2b80(0xd0)]},..._0x9b5783[_0x1d2b80(0x8d)]&&{'retry_attempt':_0x9b5783[_0x1d2b80(0x8d)]},..._0x3c6bd0!==undefined&&{'duration_sec':_0x3c6bd0},..._0x9b5783['createdAt']&&{'created_at':_0x9b5783['createdAt']},..._0x9b5783[_0x1d2b80(0x8e)]&&{'finished_at':_0x9b5783[_0x1d2b80(0x8e)]},...Object[_0x1d2b80(0xf9)](_0x9b5783[_0x1d2b80(0xad)])[_0x1d2b80(0xc5)]>0x0&&{'params':_0x9b5783[_0x1d2b80(0xad)]}};return await handleSingleObjectOutput(_0x562d47,_0x3cd28a),0x0;}catch(_0x501191){if(_0x501191 instanceof SDKError)return console[_0x1d2b80(0xb9)]('Error:\x20'+_0x501191[_0x1d2b80(0xa6)]),_0x501191[_0x1d2b80(0x8c)]&&console[_0x1d2b80(0xb9)](_0x1d2b80(0xd4)+_0x501191[_0x1d2b80(0x8c)]),0x1;throw _0x501191;}}}export class WorkflowTasksCommand extends BaseCommand{[a42_0x3a9913(0x101)]=a42_0x3a9913(0xc9);['description']=a42_0x3a9913(0x10d);async[a42_0x3a9913(0x10b)](_0x22265d){const _0xd7a8dc=a42_0x3a9913,{options:_0x29d7fc,args:_0x1394c2,tdx:_0x346ed2}=_0x22265d,_0x97b263=_0x1394c2[0x0];if(!_0x97b263)return console[_0xd7a8dc(0xb9)]('Error:\x20Attempt\x20ID\x20is\x20required'),0x1;try{const _0x208198=_0x29d7fc[_0xd7a8dc(0xdf)];_0x29d7fc[_0xd7a8dc(0x88)]&&(console[_0xd7a8dc(0xb9)]('Attempt\x20ID:\x20'+_0x97b263),_0x208198&&console[_0xd7a8dc(0xb9)]('Including\x20subtasks:\x20yes'));const _0x36874=await withSpinner('Getting\x20attempt\x20tasks...',()=>_0x346ed2[_0xd7a8dc(0xfe)]['tasks'](_0x97b263,_0x208198||![]),{'verbose':_0x29d7fc['verbose']}),_0x41694b=_0x36874[_0xd7a8dc(0xa2)];return console[_0xd7a8dc(0xb9)]('✔\x20Found\x20'+_0x41694b[_0xd7a8dc(0xc5)]+_0xd7a8dc(0xff)+(_0x41694b[_0xd7a8dc(0xc5)]!==0x1?'s':'')),await handleSDKOutput(_0x41694b,_0x29d7fc),0x0;}catch(_0x324029){if(_0x324029 instanceof SDKError)return console[_0xd7a8dc(0xb9)]('Error:\x20'+_0x324029[_0xd7a8dc(0xa6)]),_0x324029['cause']&&console[_0xd7a8dc(0xb9)](_0xd7a8dc(0xd4)+_0x324029[_0xd7a8dc(0x8c)]),0x1;throw _0x324029;}}}export class WorkflowLogsCommand extends BaseCommand{[a42_0x3a9913(0x101)]=a42_0x3a9913(0x105);['description']=a42_0x3a9913(0x10a);async[a42_0x3a9913(0x10b)](_0x5e4f26){const _0x5eb243=a42_0x3a9913,{options:_0x225aa7,args:_0x2811ed,tdx:_0x108912}=_0x5e4f26,_0x59fed6=_0x2811ed[0x0];let _0x956e74=_0x2811ed[0x1];if(!_0x59fed6)return console[_0x5eb243(0xb9)](_0x5eb243(0xe6)),0x1;try{_0x225aa7[_0x5eb243(0x88)]&&(console[_0x5eb243(0xb9)](_0x5eb243(0x109)+_0x59fed6),_0x956e74&&console['error'](_0x5eb243(0xe5)+_0x956e74));const _0x4bb022=await withSpinner('Fetching\x20log\x20files...',()=>_0x108912[_0x5eb243(0xfe)][_0x5eb243(0x89)](_0x59fed6,_0x956e74),{'verbose':_0x225aa7[_0x5eb243(0x88)]}),_0x1add3c=_0x4bb022['data'];if(_0x1add3c['length']===0x0)return console[_0x5eb243(0xb9)](_0x5eb243(0x106)),0x0;if(!_0x956e74&&(_0x225aa7[_0x5eb243(0xce)]||_0x225aa7[_0x5eb243(0xf2)]))return await handleSDKOutput(_0x1add3c,_0x225aa7),0x0;if(!_0x956e74){const _0xbc9863=_0x1add3c[_0x5eb243(0x82)](_0x131232=>({'title':_0x131232[_0x5eb243(0xfb)]+'\x20('+formatBytes(_0x131232[_0x5eb243(0xb2)])+')','value':_0x131232[_0x5eb243(0xfb)]})),_0x1f29e3=await a42_0x4e3679({'type':_0x5eb243(0x113),'name':'task','message':_0x5eb243(0xae),'choices':_0xbc9863});if(!_0x1f29e3[_0x5eb243(0x7e)])return console[_0x5eb243(0xb9)](_0x5eb243(0xcf)),0x0;_0x956e74=_0x1f29e3[_0x5eb243(0x7e)];}const _0x5345bd=await withSpinner('Downloading\x20logs...',()=>_0x108912['workflow'][_0x5eb243(0xf5)](_0x59fed6,_0x956e74),{'verbose':_0x225aa7[_0x5eb243(0x88)]}),_0x397629=_0x5345bd[_0x5eb243(0xa2)];return _0x397629?console[_0x5eb243(0x11a)](_0x397629):console['error'](_0x5eb243(0xaf)),0x0;}catch(_0x5861c9){if(_0x5861c9 instanceof SDKError)return console[_0x5eb243(0xb9)](_0x5eb243(0x83)+_0x5861c9[_0x5eb243(0xa6)]),_0x5861c9[_0x5eb243(0x8c)]&&console[_0x5eb243(0xb9)](_0x5eb243(0xd4)+_0x5861c9['cause']),0x1;throw _0x5861c9;}}}export class WorkflowKillCommand extends BaseCommand{[a42_0x3a9913(0x101)]=a42_0x3a9913(0xd1);['description']=a42_0x3a9913(0xdd);async[a42_0x3a9913(0x10b)](_0x5d7bf7){const _0x22923a=a42_0x3a9913,{options:_0x26c811,args:_0x5d0b88,tdx:_0x4854fa}=_0x5d7bf7,_0x316405=_0x5d0b88[0x0];if(!_0x316405)return console['error'](_0x22923a(0xe6)),0x1;try{const _0x3c9684=_0x26c811[_0x22923a(0xcc)];_0x26c811[_0x22923a(0x88)]&&(console[_0x22923a(0xb9)]('Attempt\x20ID:\x20'+_0x316405),_0x3c9684&&console['error'](_0x22923a(0x107)+_0x3c9684));if(!_0x26c811['yes']){const _0x13a5c2=await confirm('Are\x20you\x20sure\x20you\x20want\x20to\x20kill\x20attempt\x20'+_0x316405+'?');if(!_0x13a5c2)return console[_0x22923a(0xb9)](_0x22923a(0xcf)),0x0;}const _0x55479d=await withSpinner(_0x22923a(0x7b),()=>_0x4854fa[_0x22923a(0xfe)][_0x22923a(0xdb)](_0x316405,_0x3c9684),{'verbose':_0x26c811[_0x22923a(0x88)]}),_0x9cbaea=_0x55479d[_0x22923a(0xa2)];return console[_0x22923a(0xb9)]('✔\x20'+_0x9cbaea),0x0;}catch(_0x81b319){if(_0x81b319 instanceof SDKError)return console[_0x22923a(0xb9)]('Error:\x20'+_0x81b319[_0x22923a(0xa6)]),_0x81b319['cause']&&console[_0x22923a(0xb9)](_0x22923a(0xd4)+_0x81b319[_0x22923a(0x8c)]),0x1;throw _0x81b319;}}}export class WorkflowRetryCommand extends BaseCommand{[a42_0x3a9913(0x101)]=a42_0x3a9913(0xc4);['description']=a42_0x3a9913(0x8f);async['execute'](_0x78232e){const _0xa1baf4=a42_0x3a9913,{options:_0x395082,args:_0x496565,tdx:_0x134077}=_0x78232e,_0x28d573=_0x496565[0x0];if(!_0x28d573)return console[_0xa1baf4(0xb9)](_0xa1baf4(0xd3)),console[_0xa1baf4(0xb9)](_0xa1baf4(0xa1)),0x1;let _0x1dff5c=![],_0x3a9698=_0x28d573;if(_0x28d573[_0xa1baf4(0xb6)]('session:'))_0x1dff5c=!![],_0x3a9698=_0x28d573['substring'](0x8);else{if(_0x28d573['startsWith']('attempt:'))_0x1dff5c=![],_0x3a9698=_0x28d573[_0xa1baf4(0xe7)](0x8);else return console[_0xa1baf4(0xb9)](_0xa1baf4(0xe9)),console[_0xa1baf4(0xb9)]('Usage:\x20workflow\x20retry\x20session:<id>\x20or\x20workflow\x20retry\x20attempt:<id>'),0x1;}try{const _0x16e804=_0x395082[_0xa1baf4(0x84)],_0x1d1259=_0x395082[_0xa1baf4(0xe0)],_0x51b0bf=_0x395082[_0xa1baf4(0xad)],_0x1a9d1d=_0x395082[_0xa1baf4(0xd2)];_0x395082[_0xa1baf4(0x88)]&&(console[_0xa1baf4(0xb9)](_0xa1baf4(0xba)+(_0x1dff5c?_0xa1baf4(0xdc):_0xa1baf4(0xd6))+'\x20'+_0x3a9698),_0x16e804&&console['error'](_0xa1baf4(0x111)+_0x16e804),_0x1d1259&&console[_0xa1baf4(0xb9)](_0xa1baf4(0x11b)+_0x1d1259),_0x51b0bf&&console[_0xa1baf4(0xb9)](_0xa1baf4(0x87)+_0x51b0bf),_0x1a9d1d&&console['error']('Force:\x20yes'));let _0x34b2fc;if(_0x51b0bf)try{if(_0x51b0bf[_0xa1baf4(0xb6)]('@')){const _0x2c3124=await import(_0xa1baf4(0xde)),_0x25cf8b=_0x51b0bf[_0xa1baf4(0xe7)](0x1),_0x45e265=await _0x2c3124[_0xa1baf4(0xc7)](_0x25cf8b,_0xa1baf4(0x8b));_0x34b2fc=JSON[_0xa1baf4(0x117)](_0x45e265);}else _0x34b2fc=JSON['parse'](_0x51b0bf);}catch{return console[_0xa1baf4(0xb9)](_0xa1baf4(0xcb)),0x1;}if(!_0x395082[_0xa1baf4(0xca)]){const _0x4f2117=await confirm('Are\x20you\x20sure\x20you\x20want\x20to\x20retry\x20'+(_0x1dff5c?'session':_0xa1baf4(0xd6))+'\x20'+_0x3a9698+'?');if(!_0x4f2117)return console[_0xa1baf4(0xb9)](_0xa1baf4(0xcf)),0x0;}let _0x34439e;_0x1dff5c?_0x34439e=await withSpinner(_0xa1baf4(0xb0),()=>_0x134077[_0xa1baf4(0xfe)][_0xa1baf4(0x110)](_0x3a9698,{'fromTask':_0x16e804,'retryParams':_0x34b2fc}),{'verbose':_0x395082[_0xa1baf4(0x88)]}):_0x34439e=await withSpinner('Retrying\x20attempt...',()=>_0x134077[_0xa1baf4(0xfe)][_0xa1baf4(0xab)](_0x3a9698,{'resumeFrom':_0x1d1259,'retryParams':_0x34b2fc,'force':_0x1a9d1d}),{'verbose':_0x395082[_0xa1baf4(0x88)]});const _0x8e8784=_0x34439e[_0xa1baf4(0xa2)];return console[_0xa1baf4(0xb9)](_0xa1baf4(0xb4)),console[_0xa1baf4(0xb9)](_0xa1baf4(0x102)+_0x8e8784[_0xa1baf4(0x115)]),console['error']('\x20\x20Session\x20ID:\x20'+_0x8e8784[_0xa1baf4(0xeb)]),0x0;}catch(_0x8432d5){if(_0x8432d5 instanceof SDKError)return console[_0xa1baf4(0xb9)](_0xa1baf4(0x83)+_0x8432d5['message']),_0x8432d5['cause']&&console[_0xa1baf4(0xb9)]('\x20\x20Cause:\x20'+_0x8432d5['cause']),0x1;throw _0x8432d5;}}}export class WorkflowRunCommand extends BaseCommand{[a42_0x3a9913(0x101)]='workflow:run';['description']='Start\x20a\x20workflow\x20run';async[a42_0x3a9913(0x10b)](_0x470a7a){const _0x243567=a42_0x3a9913,{options:_0x340e86,args:_0x5d371e,tdx:_0x58c0cb}=_0x470a7a,_0x36f505=_0x5d371e[0x0];if(!_0x36f505)return console[_0x243567(0xb9)](_0x243567(0xbf)),console[_0x243567(0xb9)](_0x243567(0xa9)),0x1;const _0x1f5eef=_0x340e86[_0x243567(0xe1)],_0x372214=_0x340e86['sessionTime'],_0x499af2={};if(_0x1f5eef&&Array[_0x243567(0x9e)](_0x1f5eef))for(const _0x4c0e3d of _0x1f5eef){const _0x5e9e16=_0x4c0e3d['indexOf']('=');if(_0x5e9e16===-0x1)return console['error'](_0x243567(0xa7)+_0x4c0e3d),console[_0x243567(0xb9)](_0x243567(0xe3)),0x1;const _0x2a85f4=_0x4c0e3d['substring'](0x0,_0x5e9e16),_0x4faf82=_0x4c0e3d[_0x243567(0xe7)](_0x5e9e16+0x1);try{_0x499af2[_0x2a85f4]=JSON[_0x243567(0x117)](_0x4faf82);}catch{_0x499af2[_0x2a85f4]=_0x4faf82;}}_0x340e86[_0x243567(0x88)]&&(console[_0x243567(0xb9)](_0x243567(0x79)+_0x36f505),Object['keys'](_0x499af2)[_0x243567(0xc5)]>0x0&&console[_0x243567(0xb9)](_0x243567(0xcd)+JSON['stringify'](_0x499af2)),_0x372214&&console[_0x243567(0xb9)]('Session\x20time:\x20'+_0x372214));const _0x4f6f60=await withSpinner(_0x243567(0xc6),()=>_0x58c0cb[_0x243567(0xfe)]['run'](_0x36f505,_0x499af2,{'sessionTime':_0x372214}),{'verbose':_0x340e86[_0x243567(0x88)]}),_0x443b1e=_0x4f6f60[_0x243567(0xa2)];return console['error'](_0x243567(0xa4)),console[_0x243567(0xb9)](_0x243567(0x91)+_0x443b1e['id']),console[_0x243567(0xb9)](_0x243567(0x9a)+_0x443b1e[_0x243567(0xeb)]),console['error'](_0x243567(0xea)+_0x443b1e[_0x243567(0xf8)]?.[_0x243567(0x101)]),console['error']('\x20\x20Workflow:\x20'+_0x443b1e['workflow']?.[_0x243567(0x101)]),0x0;}}export class WorkflowDownloadCommand extends BaseCommand{[a42_0x3a9913(0x101)]=a42_0x3a9913(0xd7);[a42_0x3a9913(0x7c)]=a42_0x3a9913(0x114);async[a42_0x3a9913(0x10b)](_0x4ecb81){const _0x40876d=a42_0x3a9913,{options:_0x4e2d81,args:_0x49acf7,tdx:_0x1cbb43}=_0x4ecb81,_0x499871=_0x49acf7[0x0],_0x34b733=_0x49acf7[0x1]||'.';if(!_0x499871)return console[_0x40876d(0xb9)](_0x40876d(0xec)),console[_0x40876d(0xb9)](_0x40876d(0x94)),0x1;const _0x42a20d=_0x4e2d81[_0x40876d(0xf0)];_0x4e2d81[_0x40876d(0x88)]&&(console['error']('Project:\x20'+_0x499871),console['error']('Output\x20directory:\x20'+_0x34b733),_0x42a20d&&console[_0x40876d(0xb9)](_0x40876d(0xc3)+_0x42a20d));const _0x431252=await withSpinner(_0x40876d(0x7d)+_0x499871+_0x40876d(0x90),()=>_0x1cbb43[_0x40876d(0xfe)]['download'](_0x499871,_0x34b733,{'revision':_0x42a20d}),{'verbose':_0x4e2d81[_0x40876d(0x88)]}),_0x1805ec=_0x431252[_0x40876d(0xa2)];return console[_0x40876d(0xb9)](_0x40876d(0xd5)+_0x1805ec[_0x40876d(0x93)]),console[_0x40876d(0xb9)](_0x40876d(0xc8)+_0x1805ec[_0x40876d(0xf0)]),console[_0x40876d(0xb9)](_0x40876d(0xf1)+_0x1805ec[_0x40876d(0x78)]),console[_0x40876d(0xb9)](_0x40876d(0xa0)+_0x34b733+'/'+_0x1805ec[_0x40876d(0x93)]),0x0;}}export class WorkflowPushCommand extends BaseCommand{[a42_0x3a9913(0x101)]=a42_0x3a9913(0xf3);[a42_0x3a9913(0x7c)]='Push\x20workflow\x20project\x20to\x20Treasure\x20Data';async['execute'](_0x588ee6){const _0x3031b4=a42_0x3a9913,{options:_0x41d739,args:_0x43a82d,tdx:_0x4ac80c}=_0x588ee6;let _0x448cf9='.',_0xc43268=_0x41d739[_0x3031b4(0x101)];if(_0x43a82d[0x0]){const {promises:_0x4e876b}=await import('fs');try{const _0xaa66f7=await _0x4e876b[_0x3031b4(0xb3)](_0x43a82d[0x0]);if(_0xaa66f7['isDirectory']())_0x448cf9=_0x43a82d[0x0];else return console['error'](_0x3031b4(0x83)+_0x43a82d[0x0]+_0x3031b4(0x119)),0x1;}catch{_0xc43268=_0x43a82d[0x0],_0x448cf9='.';}}const _0x17b2cd=_0x41d739['revision'],_0x58a371=_0x41d739[_0x3031b4(0xc0)];_0x41d739['verbose']&&(console['error'](_0x3031b4(0x9b)+_0x448cf9),_0xc43268&&console['error'](_0x3031b4(0xd8)+_0xc43268),_0x17b2cd&&console[_0x3031b4(0xb9)](_0x3031b4(0xc3)+_0x17b2cd),_0x58a371&&console[_0x3031b4(0xb9)]('Validation:\x20skipped'));const _0x364f31=await withSpinner(_0x3031b4(0xc1),()=>_0x4ac80c[_0x3031b4(0xfe)][_0x3031b4(0xe8)](_0x448cf9,{'projectName':_0xc43268,'revision':_0x17b2cd,'skipValidation':_0x58a371}),{'verbose':_0x41d739[_0x3031b4(0x88)]}),_0x5d97cc=_0x364f31['data'];return console[_0x3031b4(0xb9)](_0x3031b4(0x81)+_0x5d97cc[_0x3031b4(0x93)]),console[_0x3031b4(0xb9)](_0x3031b4(0x116)+_0x5d97cc['projectId']),console[_0x3031b4(0xb9)]('\x20\x20Revision:\x20'+_0x5d97cc['revision']),0x0;}}export class WorkflowDeleteCommand extends BaseCommand{[a42_0x3a9913(0x101)]=a42_0x3a9913(0xb1);[a42_0x3a9913(0x7c)]='Delete\x20workflow\x20project\x20from\x20Treasure\x20Data';async[a42_0x3a9913(0x10b)](_0x3e902e){const _0x3f2f89=a42_0x3a9913,{options:_0x499474,args:_0x4d261f,tdx:_0x5e7642}=_0x3e902e,_0x5d5e7b=_0x4d261f[0x0];if(!_0x5d5e7b)return console[_0x3f2f89(0xb9)](_0x3f2f89(0xf6)),console['error']('Usage:\x20workflow:delete\x20<project-name-or-id>'),0x1;_0x499474[_0x3f2f89(0x88)]&&console['error'](_0x3f2f89(0x104)+_0x5d5e7b);if(!_0x499474['yes']){const _0x452621=await confirm(_0x3f2f89(0x80)+_0x5d5e7b+'\x22?\x20This\x20cannot\x20be\x20undone.');if(!_0x452621)return console[_0x3f2f89(0xb9)](_0x3f2f89(0xcf)),0x0;}const _0x512e5a=await withSpinner(_0x3f2f89(0xf7)+_0x5d5e7b+_0x3f2f89(0x90),()=>_0x5e7642[_0x3f2f89(0xfe)][_0x3f2f89(0x7f)](_0x5d5e7b),{'verbose':_0x499474[_0x3f2f89(0x88)]}),_0x278985=_0x512e5a[_0x3f2f89(0xa2)];return console[_0x3f2f89(0xb9)]('✔\x20Deleted\x20project\x20'+_0x278985[_0x3f2f89(0x93)]),console['error'](_0x3f2f89(0x116)+_0x278985[_0x3f2f89(0xb5)]),0x0;}}
1
+ const a42_0x156904=a42_0x1e46;(function(_0xe7ed5b,_0xf6eb17){const _0x5b8b08=a42_0x1e46,_0x3b0b7e=_0xe7ed5b();while(!![]){try{const _0x1136be=parseInt(_0x5b8b08(0x10c))/0x1+-parseInt(_0x5b8b08(0x144))/0x2*(-parseInt(_0x5b8b08(0x11a))/0x3)+-parseInt(_0x5b8b08(0x164))/0x4+-parseInt(_0x5b8b08(0x141))/0x5*(parseInt(_0x5b8b08(0x114))/0x6)+parseInt(_0x5b8b08(0x159))/0x7*(parseInt(_0x5b8b08(0x11c))/0x8)+-parseInt(_0x5b8b08(0x11f))/0x9*(-parseInt(_0x5b8b08(0x130))/0xa)+-parseInt(_0x5b8b08(0x146))/0xb;if(_0x1136be===_0xf6eb17)break;else _0x3b0b7e['push'](_0x3b0b7e['shift']());}catch(_0x507c9f){_0x3b0b7e['push'](_0x3b0b7e['shift']());}}}(a42_0x21bc,0x1c78b));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleSDKOutput,handleSingleObjectOutput}from'../utils/command-output.js';import{withSpinner}from'../utils/spinner.js';import{confirm}from'../utils/prompt.js';import{formatBytes}from'../utils/formatters.js';import a42_0x4a61c9 from'prompts';export class WorkflowProjectsCommand extends BaseCommand{[a42_0x156904(0x16e)]='workflow:projects';[a42_0x156904(0xe6)]='List\x20all\x20workflow\x20projects';async[a42_0x156904(0xee)](_0x57aff0){const _0x5093ec=a42_0x156904,{options:_0x3ac4ee,args:_0x324958,tdx:_0x215dac}=_0x57aff0,_0x1a7ce6=_0x324958[0x0];try{_0x3ac4ee[_0x5093ec(0x142)]&&_0x1a7ce6&&console[_0x5093ec(0x115)](_0x5093ec(0x12f)+_0x1a7ce6);const _0x4a4ad7=await withSpinner('Listing\x20workflow\x20projects...',()=>_0x215dac[_0x5093ec(0xd7)][_0x5093ec(0x112)](_0x1a7ce6,{'limit':_0x3ac4ee[_0x5093ec(0x16b)]}),{'verbose':_0x3ac4ee['verbose']}),_0x35a3e5=_0x4a4ad7[_0x5093ec(0x17c)];return console[_0x5093ec(0x115)]('✔\x20Found\x20'+_0x35a3e5[_0x5093ec(0x178)]+_0x5093ec(0x17b)+(_0x35a3e5[_0x5093ec(0x178)]!==0x1?'s':'')),await handleSDKOutput(_0x35a3e5,_0x3ac4ee),0x0;}catch(_0x51edb2){if(_0x51edb2 instanceof SDKError)return console[_0x5093ec(0x115)](_0x5093ec(0xef)+_0x51edb2[_0x5093ec(0x172)]),_0x51edb2[_0x5093ec(0x167)]&&console[_0x5093ec(0x115)](_0x5093ec(0xeb)+_0x51edb2[_0x5093ec(0x167)]),0x1;throw _0x51edb2;}}}function a42_0x1e46(_0x32830b,_0x4576d4){_0x32830b=_0x32830b-0xd7;const _0x21bc15=a42_0x21bc();let _0x1e466a=_0x21bc15[_0x32830b];return _0x1e466a;}export class WorkflowWorkflowsCommand extends BaseCommand{[a42_0x156904(0x16e)]='workflow:workflows';['description']=a42_0x156904(0x162);async[a42_0x156904(0xee)](_0x263b44){const _0x4da715=a42_0x156904,{options:_0x3fae1d,args:_0x2d4cf7,tdx:_0x3c3056}=_0x263b44,_0x2df236=_0x2d4cf7[0x0];try{_0x3fae1d['verbose']&&_0x2df236&&console[_0x4da715(0x115)](_0x4da715(0xe3)+_0x2df236);const _0xfcd6e5=await withSpinner('Listing\x20workflows...',()=>_0x3c3056[_0x4da715(0xd7)]['workflows'](_0x2df236,{'limit':_0x3fae1d['limit']}),{'verbose':_0x3fae1d[_0x4da715(0x142)]}),_0x5ef791=_0xfcd6e5['data'];return console['error'](_0x4da715(0xfa)+_0x5ef791['length']+_0x4da715(0x125)+(_0x5ef791[_0x4da715(0x178)]!==0x1?'s':'')),await handleSDKOutput(_0x5ef791,_0x3fae1d),0x0;}catch(_0x18ff41){if(_0x18ff41 instanceof SDKError)return console[_0x4da715(0x115)](_0x4da715(0xef)+_0x18ff41[_0x4da715(0x172)]),_0x18ff41[_0x4da715(0x167)]&&console['error'](_0x4da715(0xeb)+_0x18ff41[_0x4da715(0x167)]),0x1;throw _0x18ff41;}}}export class WorkflowSessionsCommand extends BaseCommand{[a42_0x156904(0x16e)]=a42_0x156904(0x135);['description']='List\x20workflow\x20execution\x20sessions';async[a42_0x156904(0xee)](_0x4aecbf){const _0x4d2a07=a42_0x156904,{options:_0x5f5635,args:_0x5d7021,tdx:_0x1f97fa}=_0x4aecbf;let _0x23670b,_0x165d1b;if(_0x5d7021[0x0]){const _0x4639b7=_0x5d7021[0x0][_0x4d2a07(0xf1)]('.');if(_0x4639b7[_0x4d2a07(0x178)]===0x1)_0x23670b=_0x4639b7[0x0];else{if(_0x4639b7[_0x4d2a07(0x178)]===0x2)[_0x23670b,_0x165d1b]=_0x4639b7;else return console[_0x4d2a07(0x115)](_0x4d2a07(0x15b)),0x1;}}try{if(_0x5f5635[_0x4d2a07(0x142)]){if(_0x23670b&&_0x165d1b)console[_0x4d2a07(0x115)](_0x4d2a07(0xec)+_0x23670b+'.'+_0x165d1b);else _0x23670b&&console['error'](_0x4d2a07(0x10a)+_0x23670b);const _0x3184b0=_0x5f5635[_0x4d2a07(0x15d)];_0x3184b0&&console[_0x4d2a07(0x115)](_0x4d2a07(0x111)+_0x3184b0);}const _0x2993d7=await withSpinner('Listing\x20workflow\x20sessions...',()=>_0x1f97fa[_0x4d2a07(0xd7)][_0x4d2a07(0x15e)]({'projectName':_0x23670b,'workflowName':_0x165d1b,'status':_0x5f5635[_0x4d2a07(0x15d)],'fromTime':_0x5f5635['from'],'toTime':_0x5f5635['to'],'limit':_0x5f5635[_0x4d2a07(0x16b)]}),{'verbose':_0x5f5635[_0x4d2a07(0x142)]}),_0x5df41f=_0x2993d7['data'];return console['error'](_0x4d2a07(0xfa)+_0x5df41f['length']+_0x4d2a07(0xda)+(_0x5df41f['length']!==0x1?'s':'')),await handleSDKOutput(_0x5df41f,_0x5f5635),0x0;}catch(_0x3a0b72){if(_0x3a0b72 instanceof SDKError)return console[_0x4d2a07(0x115)]('Error:\x20'+_0x3a0b72['message']),_0x3a0b72['cause']&&console[_0x4d2a07(0x115)](_0x4d2a07(0xeb)+_0x3a0b72[_0x4d2a07(0x167)]),0x1;throw _0x3a0b72;}}}export class WorkflowAttemptsCommand extends BaseCommand{[a42_0x156904(0x16e)]='workflow:attempts';['description']='List\x20workflow\x20attempts';async[a42_0x156904(0xee)](_0x4a50ce){const _0x20fdeb=a42_0x156904,{options:_0x355961,args:_0x42f742,tdx:_0x16bda7}=_0x4a50ce;let _0x3baae9,_0xed6e13;if(_0x42f742[0x0]){const _0x2ce0bb=_0x42f742[0x0]['split']('.');if(_0x2ce0bb[_0x20fdeb(0x178)]===0x1)_0x3baae9=_0x2ce0bb[0x0];else{if(_0x2ce0bb[_0x20fdeb(0x178)]===0x2)[_0x3baae9,_0xed6e13]=_0x2ce0bb;else return console[_0x20fdeb(0x115)](_0x20fdeb(0x15b)),0x1;}}try{const _0x1d1f75=_0x355961[_0x20fdeb(0x145)];if(_0x355961[_0x20fdeb(0x142)]){if(_0x3baae9&&_0xed6e13)console[_0x20fdeb(0x115)](_0x20fdeb(0xec)+_0x3baae9+'.'+_0xed6e13);else _0x3baae9&&console['error']('Filter:\x20project='+_0x3baae9);_0x1d1f75&&console[_0x20fdeb(0x115)](_0x20fdeb(0x166));}const _0x4c76a5=await withSpinner('Listing\x20workflow\x20attempts...',()=>_0x16bda7['workflow'][_0x20fdeb(0xfd)]({'projectName':_0x3baae9,'workflowName':_0xed6e13,'includeRetried':_0x1d1f75,'limit':_0x355961[_0x20fdeb(0x16b)]}),{'verbose':_0x355961['verbose']}),_0x3bb4e8=_0x4c76a5[_0x20fdeb(0x17c)];return console[_0x20fdeb(0x115)](_0x20fdeb(0xfa)+_0x3bb4e8[_0x20fdeb(0x178)]+_0x20fdeb(0x156)+(_0x3bb4e8[_0x20fdeb(0x178)]!==0x1?'s':'')),await handleSDKOutput(_0x3bb4e8,_0x355961),0x0;}catch(_0x4c50a7){if(_0x4c50a7 instanceof SDKError)return console[_0x20fdeb(0x115)](_0x20fdeb(0xef)+_0x4c50a7[_0x20fdeb(0x172)]),_0x4c50a7[_0x20fdeb(0x167)]&&console[_0x20fdeb(0x115)](_0x20fdeb(0xeb)+_0x4c50a7[_0x20fdeb(0x167)]),0x1;throw _0x4c50a7;}}}export class WorkflowAttemptCommand extends BaseCommand{['name']=a42_0x156904(0x132);[a42_0x156904(0xe6)]=a42_0x156904(0x13e);async[a42_0x156904(0xee)](_0x4727df){const _0x5c8c46=a42_0x156904,{options:_0x39bc3a,args:_0x2b3be0,tdx:_0x2efed2}=_0x4727df,_0x83b2a8=_0x2b3be0[0x0];if(!_0x83b2a8)return console[_0x5c8c46(0x115)](_0x5c8c46(0x10f)),0x1;try{_0x39bc3a[_0x5c8c46(0x142)]&&console[_0x5c8c46(0x115)](_0x5c8c46(0x173)+_0x83b2a8);const _0x15bcfc=await withSpinner(_0x5c8c46(0x109),()=>_0x2efed2['workflow'][_0x5c8c46(0xf4)](_0x83b2a8),{'verbose':_0x39bc3a[_0x5c8c46(0x142)]}),_0x31dfbc=_0x15bcfc[_0x5c8c46(0x17c)];let _0x41109d;!_0x31dfbc[_0x5c8c46(0x151)]?_0x41109d=_0x31dfbc[_0x5c8c46(0xed)]?_0x5c8c46(0x119):_0x5c8c46(0x17a):_0x41109d=_0x31dfbc[_0x5c8c46(0x14a)]?_0x5c8c46(0x14a):_0x5c8c46(0x115);let _0x4af5cd;if(_0x31dfbc[_0x5c8c46(0x11b)]&&_0x31dfbc[_0x5c8c46(0x129)]){const _0x51053b=new Date(_0x31dfbc[_0x5c8c46(0x11b)])['getTime'](),_0x3f7539=new Date(_0x31dfbc['finishedAt'])[_0x5c8c46(0x137)]();_0x4af5cd=Math[_0x5c8c46(0x16f)]((_0x3f7539-_0x51053b)/0x3e8);}const _0x116645={'attempt_id':_0x31dfbc['id'],'status':_0x41109d,..._0x31dfbc[_0x5c8c46(0x12c)]!==undefined&&{'index':_0x31dfbc['index']},..._0x31dfbc[_0x5c8c46(0x100)]&&{'project':_0x31dfbc[_0x5c8c46(0x100)][_0x5c8c46(0x16e)]},..._0x31dfbc['workflow']&&{'workflow':_0x31dfbc['workflow'][_0x5c8c46(0x16e)]},..._0x31dfbc['sessionId']&&{'session_id':_0x31dfbc[_0x5c8c46(0x179)]},..._0x31dfbc['sessionTime']&&{'session_time':_0x31dfbc[_0x5c8c46(0xe5)]},..._0x31dfbc[_0x5c8c46(0xfc)]&&{'retry_attempt':_0x31dfbc[_0x5c8c46(0xfc)]},..._0x4af5cd!==undefined&&{'duration_sec':_0x4af5cd},..._0x31dfbc[_0x5c8c46(0x11b)]&&{'created_at':_0x31dfbc[_0x5c8c46(0x11b)]},..._0x31dfbc[_0x5c8c46(0x129)]&&{'finished_at':_0x31dfbc[_0x5c8c46(0x129)]},...Object[_0x5c8c46(0x148)](_0x31dfbc[_0x5c8c46(0x150)])[_0x5c8c46(0x178)]>0x0&&{'params':_0x31dfbc['params']}};return await handleSingleObjectOutput(_0x116645,_0x39bc3a),0x0;}catch(_0x3014cb){if(_0x3014cb instanceof SDKError)return console['error'](_0x5c8c46(0xef)+_0x3014cb[_0x5c8c46(0x172)]),_0x3014cb['cause']&&console[_0x5c8c46(0x115)](_0x5c8c46(0xeb)+_0x3014cb[_0x5c8c46(0x167)]),0x1;throw _0x3014cb;}}}export class WorkflowTasksCommand extends BaseCommand{['name']='workflow:tasks';[a42_0x156904(0xe6)]=a42_0x156904(0x128);async[a42_0x156904(0xee)](_0x525465){const _0xc1c97e=a42_0x156904,{options:_0x514b3b,args:_0x14ec59,tdx:_0x4bc769}=_0x525465,_0x2e2f74=_0x14ec59[0x0];if(!_0x2e2f74)return console[_0xc1c97e(0x115)]('Error:\x20Attempt\x20ID\x20is\x20required'),0x1;try{const _0x7805c6=_0x514b3b[_0xc1c97e(0xf0)];_0x514b3b[_0xc1c97e(0x142)]&&(console[_0xc1c97e(0x115)](_0xc1c97e(0x173)+_0x2e2f74),_0x7805c6&&console[_0xc1c97e(0x115)]('Including\x20subtasks:\x20yes'));const _0x4e6227=await withSpinner(_0xc1c97e(0x176),()=>_0x4bc769[_0xc1c97e(0xd7)][_0xc1c97e(0x113)](_0x2e2f74,_0x7805c6||![]),{'verbose':_0x514b3b[_0xc1c97e(0x142)]}),_0x29b7b7=_0x4e6227[_0xc1c97e(0x17c)];return console[_0xc1c97e(0x115)](_0xc1c97e(0xfa)+_0x29b7b7[_0xc1c97e(0x178)]+_0xc1c97e(0xff)+(_0x29b7b7[_0xc1c97e(0x178)]!==0x1?'s':'')),await handleSDKOutput(_0x29b7b7,_0x514b3b),0x0;}catch(_0x6d3d5f){if(_0x6d3d5f instanceof SDKError)return console[_0xc1c97e(0x115)]('Error:\x20'+_0x6d3d5f['message']),_0x6d3d5f[_0xc1c97e(0x167)]&&console['error'](_0xc1c97e(0xeb)+_0x6d3d5f[_0xc1c97e(0x167)]),0x1;throw _0x6d3d5f;}}}export class WorkflowLogsCommand extends BaseCommand{[a42_0x156904(0x16e)]=a42_0x156904(0x157);[a42_0x156904(0xe6)]=a42_0x156904(0x160);async[a42_0x156904(0xee)](_0x489160){const _0x38ab2e=a42_0x156904,{options:_0x5b486f,args:_0x11f0f9,tdx:_0x4fd6e6}=_0x489160,_0x37d896=_0x11f0f9[0x0];let _0xc2f30b=_0x11f0f9[0x1];if(!_0x37d896)return console[_0x38ab2e(0x115)]('Error:\x20Attempt\x20ID\x20is\x20required'),0x1;try{_0x5b486f[_0x38ab2e(0x142)]&&(console['error']('Attempt\x20ID:\x20'+_0x37d896),_0xc2f30b&&console[_0x38ab2e(0x115)](_0x38ab2e(0x118)+_0xc2f30b));const _0x338697=await withSpinner(_0x38ab2e(0x131),()=>_0x4fd6e6['workflow'][_0x38ab2e(0x121)](_0x37d896,_0xc2f30b),{'verbose':_0x5b486f[_0x38ab2e(0x142)]}),_0x5cfaac=_0x338697[_0x38ab2e(0x17c)];if(_0x5cfaac[_0x38ab2e(0x178)]===0x0)return console[_0x38ab2e(0x115)]('No\x20log\x20files\x20found\x20for\x20this\x20attempt'),0x0;if(!_0xc2f30b&&(_0x5b486f[_0x38ab2e(0x16d)]||_0x5b486f[_0x38ab2e(0xd8)]))return await handleSDKOutput(_0x5cfaac,_0x5b486f),0x0;if(!_0xc2f30b){const _0x5cd6dd=_0x5cfaac[_0x38ab2e(0x120)](_0x741ee3=>({'title':_0x741ee3['taskName']+'\x20('+formatBytes(_0x741ee3[_0x38ab2e(0x104)])+')','value':_0x741ee3['taskName']})),_0x4de044=await a42_0x4a61c9({'type':_0x38ab2e(0xde),'name':_0x38ab2e(0x14e),'message':_0x38ab2e(0x13c),'choices':_0x5cd6dd});if(!_0x4de044['task'])return console['error'](_0x38ab2e(0x14f)),0x0;_0xc2f30b=_0x4de044[_0x38ab2e(0x14e)];}const _0x2f58e5=await withSpinner(_0x38ab2e(0x165),()=>_0x4fd6e6[_0x38ab2e(0xd7)][_0x38ab2e(0xf7)](_0x37d896,_0xc2f30b),{'verbose':_0x5b486f[_0x38ab2e(0x142)]}),_0x3a963=_0x2f58e5[_0x38ab2e(0x17c)];return _0x3a963?console[_0x38ab2e(0xf2)](_0x3a963):console[_0x38ab2e(0x115)](_0x38ab2e(0x101)),0x0;}catch(_0x4a6364){if(_0x4a6364 instanceof SDKError)return console[_0x38ab2e(0x115)](_0x38ab2e(0xef)+_0x4a6364[_0x38ab2e(0x172)]),_0x4a6364[_0x38ab2e(0x167)]&&console[_0x38ab2e(0x115)]('\x20\x20Cause:\x20'+_0x4a6364['cause']),0x1;throw _0x4a6364;}}}export class WorkflowKillCommand extends BaseCommand{[a42_0x156904(0x16e)]=a42_0x156904(0x10b);[a42_0x156904(0xe6)]='Kill\x20a\x20running\x20attempt';async['execute'](_0x5c1a78){const _0x6912b2=a42_0x156904,{options:_0x273d83,args:_0x4251f8,tdx:_0x58af14}=_0x5c1a78,_0x35f8ea=_0x4251f8[0x0];if(!_0x35f8ea)return console[_0x6912b2(0x115)](_0x6912b2(0x10f)),0x1;try{const _0x397b1d=_0x273d83[_0x6912b2(0x171)];_0x273d83[_0x6912b2(0x142)]&&(console[_0x6912b2(0x115)](_0x6912b2(0x173)+_0x35f8ea),_0x397b1d&&console[_0x6912b2(0x115)](_0x6912b2(0x16c)+_0x397b1d));if(!_0x273d83['yes']){const _0x1c6437=await confirm(_0x6912b2(0x12a)+_0x35f8ea+'?');if(!_0x1c6437)return console[_0x6912b2(0x115)](_0x6912b2(0x14f)),0x0;}const _0x3b46c6=await withSpinner(_0x6912b2(0x134),()=>_0x58af14[_0x6912b2(0xd7)][_0x6912b2(0x14b)](_0x35f8ea,_0x397b1d),{'verbose':_0x273d83[_0x6912b2(0x142)]}),_0x386ab2=_0x3b46c6['data'];return console[_0x6912b2(0x115)]('✔\x20'+_0x386ab2),0x0;}catch(_0x12bfcd){if(_0x12bfcd instanceof SDKError)return console['error']('Error:\x20'+_0x12bfcd[_0x6912b2(0x172)]),_0x12bfcd[_0x6912b2(0x167)]&&console[_0x6912b2(0x115)]('\x20\x20Cause:\x20'+_0x12bfcd[_0x6912b2(0x167)]),0x1;throw _0x12bfcd;}}}export class WorkflowRetryCommand extends BaseCommand{[a42_0x156904(0x16e)]=a42_0x156904(0x14c);['description']=a42_0x156904(0x12e);async['execute'](_0xc9f372){const _0x2820b7=a42_0x156904,{options:_0xc4beed,args:_0x328950,tdx:_0x5cd5c9}=_0xc9f372,_0x2980da=_0x328950[0x0];if(!_0x2980da)return console[_0x2820b7(0x115)]('Error:\x20Session\x20ID\x20or\x20attempt\x20ID\x20is\x20required'),console[_0x2820b7(0x115)](_0x2820b7(0x158)),0x1;let _0xad8040=![],_0x186bf1=_0x2980da;if(_0x2980da['startsWith'](_0x2820b7(0x124)))_0xad8040=!![],_0x186bf1=_0x2980da[_0x2820b7(0x13a)](0x8);else{if(_0x2980da[_0x2820b7(0x10d)](_0x2820b7(0xe1)))_0xad8040=![],_0x186bf1=_0x2980da[_0x2820b7(0x13a)](0x8);else return console[_0x2820b7(0x115)](_0x2820b7(0x12b)),console['error'](_0x2820b7(0x158)),0x1;}try{const _0x5138e0=_0xc4beed[_0x2820b7(0x14d)],_0x5f395d=_0xc4beed[_0x2820b7(0x15c)],_0x40c359=_0xc4beed[_0x2820b7(0x150)],_0x7658bb=_0xc4beed[_0x2820b7(0x11e)];_0xc4beed[_0x2820b7(0x142)]&&(console[_0x2820b7(0x115)](_0x2820b7(0x138)+(_0xad8040?'session':_0x2820b7(0xf4))+'\x20'+_0x186bf1),_0x5138e0&&console[_0x2820b7(0x115)]('From\x20task:\x20'+_0x5138e0),_0x5f395d&&console[_0x2820b7(0x115)](_0x2820b7(0x10e)+_0x5f395d),_0x40c359&&console[_0x2820b7(0x115)](_0x2820b7(0xe9)+_0x40c359),_0x7658bb&&console[_0x2820b7(0x115)](_0x2820b7(0x147)));let _0x3a6298;if(_0x40c359)try{if(_0x40c359[_0x2820b7(0x10d)]('@')){const _0x5ef934=await import(_0x2820b7(0x13f)),_0x2b4052=_0x40c359[_0x2820b7(0x13a)](0x1),_0x16db2e=await _0x5ef934[_0x2820b7(0x123)](_0x2b4052,_0x2820b7(0xe0));_0x3a6298=JSON[_0x2820b7(0x13b)](_0x16db2e);}else _0x3a6298=JSON['parse'](_0x40c359);}catch{return console[_0x2820b7(0x115)](_0x2820b7(0x126)),0x1;}if(!_0xc4beed[_0x2820b7(0x122)]){const _0x1de667=await confirm('Are\x20you\x20sure\x20you\x20want\x20to\x20retry\x20'+(_0xad8040?_0x2820b7(0x174):'attempt')+'\x20'+_0x186bf1+'?');if(!_0x1de667)return console['error'](_0x2820b7(0x14f)),0x0;}let _0x190d93;_0xad8040?_0x190d93=await withSpinner('Retrying\x20session...',()=>_0x5cd5c9['workflow'][_0x2820b7(0x106)](_0x186bf1,{'fromTask':_0x5138e0,'retryParams':_0x3a6298}),{'verbose':_0xc4beed[_0x2820b7(0x142)]}):_0x190d93=await withSpinner('Retrying\x20attempt...',()=>_0x5cd5c9[_0x2820b7(0xd7)]['retryAttempt'](_0x186bf1,{'resumeFrom':_0x5f395d,'retryParams':_0x3a6298,'force':_0x7658bb}),{'verbose':_0xc4beed[_0x2820b7(0x142)]});const _0x58af0f=_0x190d93[_0x2820b7(0x17c)];return console['error'](_0x2820b7(0x175)),console[_0x2820b7(0x115)]('\x20\x20New\x20attempt\x20ID:\x20'+_0x58af0f[_0x2820b7(0x110)]),console[_0x2820b7(0x115)]('\x20\x20Session\x20ID:\x20'+_0x58af0f['sessionId']),0x0;}catch(_0x3310d5){if(_0x3310d5 instanceof SDKError)return console[_0x2820b7(0x115)](_0x2820b7(0xef)+_0x3310d5[_0x2820b7(0x172)]),_0x3310d5[_0x2820b7(0x167)]&&console[_0x2820b7(0x115)](_0x2820b7(0xeb)+_0x3310d5[_0x2820b7(0x167)]),0x1;throw _0x3310d5;}}}export class WorkflowRunCommand extends BaseCommand{['name']=a42_0x156904(0x136);[a42_0x156904(0xe6)]='Start\x20a\x20workflow\x20run';async[a42_0x156904(0xee)](_0x4ed008){const _0x1a03c0=a42_0x156904,{options:_0x2b0e11,args:_0x5b5d69,tdx:_0x5c88f0}=_0x4ed008,_0x4b803a=_0x5b5d69[0x0];if(!_0x4b803a)return console[_0x1a03c0(0x115)](_0x1a03c0(0xfe)),console[_0x1a03c0(0x115)]('Usage:\x20workflow\x20run\x20<project.workflow>\x20[options]'),0x1;const _0x3564d4=_0x2b0e11[_0x1a03c0(0xfb)],_0x5a3c41=_0x2b0e11[_0x1a03c0(0xe5)],_0x4a36f0={};if(_0x3564d4&&Array[_0x1a03c0(0x102)](_0x3564d4))for(const _0x512f0f of _0x3564d4){const _0x2e2c76=_0x512f0f[_0x1a03c0(0xe4)]('=');if(_0x2e2c76===-0x1)return console['error'](_0x1a03c0(0x13d)+_0x512f0f),console['error'](_0x1a03c0(0xd9)),0x1;const _0x550674=_0x512f0f[_0x1a03c0(0x13a)](0x0,_0x2e2c76),_0x14465f=_0x512f0f[_0x1a03c0(0x13a)](_0x2e2c76+0x1);try{_0x4a36f0[_0x550674]=JSON['parse'](_0x14465f);}catch{_0x4a36f0[_0x550674]=_0x14465f;}}_0x2b0e11[_0x1a03c0(0x142)]&&(console[_0x1a03c0(0x115)](_0x1a03c0(0xf9)+_0x4b803a),Object[_0x1a03c0(0x148)](_0x4a36f0)[_0x1a03c0(0x178)]>0x0&&console[_0x1a03c0(0x115)]('Parameters:\x20'+JSON[_0x1a03c0(0x133)](_0x4a36f0)),_0x5a3c41&&console[_0x1a03c0(0x115)]('Session\x20time:\x20'+_0x5a3c41));const _0x466e32=await withSpinner(_0x1a03c0(0x15f),()=>_0x5c88f0['workflow'][_0x1a03c0(0xf8)](_0x4b803a,_0x4a36f0,{'sessionTime':_0x5a3c41}),{'verbose':_0x2b0e11['verbose']}),_0x497e55=_0x466e32['data'];return console[_0x1a03c0(0x115)]('✔\x20Workflow\x20run\x20started'),console[_0x1a03c0(0x115)](_0x1a03c0(0x169)+_0x497e55['id']),console[_0x1a03c0(0x115)](_0x1a03c0(0x105)+_0x497e55[_0x1a03c0(0x179)]),console[_0x1a03c0(0x115)](_0x1a03c0(0x127)+_0x497e55['project']?.[_0x1a03c0(0x16e)]),console[_0x1a03c0(0x115)]('\x20\x20Workflow:\x20'+_0x497e55[_0x1a03c0(0xd7)]?.[_0x1a03c0(0x16e)]),0x0;}}function a42_0x21bc(){const _0x46a2e4=['workflow:kill','131258iARuOx','startsWith','Resume\x20from:\x20','Error:\x20Attempt\x20ID\x20is\x20required','attemptId','Status:\x20','projects','tasks','6mSruOA','error','Push\x20workflow\x20project\x20to\x20Treasure\x20Data','\x20\x20Revision:\x20','Task\x20name:\x20','canceling','133674nGoqNF','createdAt','664ZFCEZF','Usage:\x20workflow:delete\x20<project-name-or-id>','force','378vKATZq','map','logFiles','yes','readFile','session:','\x20workflow','Error:\x20Invalid\x20JSON\x20in\x20--params','\x20\x20Project:\x20','Show\x20tasks\x20for\x20an\x20attempt','finishedAt','Are\x20you\x20sure\x20you\x20want\x20to\x20kill\x20attempt\x20','Error:\x20Target\x20must\x20be\x20prefixed\x20with\x20\x22session:\x22\x20or\x20\x22attempt:\x22','index','skipValidation','Retry\x20a\x20session\x20or\x20attempt','Pattern:\x20','43990nxhdfw','Fetching\x20log\x20files...','workflow:attempt','stringify','Killing\x20attempt...','workflow:sessions','workflow:run','getTime','Target:\x20','projectName','substring','parse','Select\x20a\x20task\x20to\x20view\x20logs:','Error:\x20Invalid\x20parameter\x20format:\x20','Show\x20specific\x20attempt\x20details','fs/promises','✔\x20Pushed\x20','1068265XVXdcy','verbose','revision','4kgneVh','includeRetried','1194402KEFcqh','Force:\x20yes','keys','workflow:push','success','kill','workflow:retry','fromTask','task','Cancelled','params','done','Pushing\x20workflow\x20project...','filesExtracted','Revision:\x20','projectId','\x20attempt','workflow:logs','Usage:\x20workflow\x20retry\x20session:<id>\x20or\x20workflow\x20retry\x20attempt:<id>','10073jonwfj','Output\x20directory:\x20','Error:\x20Invalid\x20pattern.\x20Use\x20format:\x20project\x20or\x20project.workflow','resumeFrom','status','sessions','Starting\x20workflow\x20run...','Show\x20logs\x20for\x20a\x20workflow\x20attempt','isDirectory','List\x20workflows','✔\x20Downloaded\x20','342860yPZloA','Downloading\x20logs...','Include\x20retried:\x20yes','cause','Validation:\x20skipped','\x20\x20Attempt\x20ID:\x20','✔\x20Deleted\x20project\x20','limit','Reason:\x20','json','name','round','workflow:download','reason','message','Attempt\x20ID:\x20','session','✔\x20Retry\x20started','Getting\x20attempt\x20tasks...','Download\x20workflow\x20project\x20from\x20Treasure\x20Data','length','sessionId','running','\x20project','data','workflow','format','Expected\x20format:\x20--param\x20key=value','\x20session','Usage:\x20workflow:download\x20<project-name>\x20[output-dir]','Error:\x20Project\x20name\x20or\x20ID\x20is\x20required','Project\x20name:\x20','select','\x20\x20Project\x20ID:\x20','utf-8','attempt:','\x22?\x20This\x20cannot\x20be\x20undone.','Project\x20filter:\x20','indexOf','sessionTime','description','workflow:delete','delete','Params:\x20','Error:\x20Project\x20name\x20is\x20required','\x20\x20Cause:\x20','Filter:\x20','cancelRequested','execute','Error:\x20','includeSubtasks','split','log','stat','attempt','Project:\x20','\x20\x20Location:\x20','logs','run','Workflow:\x20','✔\x20Found\x20','param','retryAttemptName','attempts','Error:\x20Workflow\x20identifier\x20is\x20required','\x20task','project','No\x20log\x20content\x20found','isArray','Project\x20directory:\x20','fileSize','\x20\x20Session\x20ID:\x20','retrySession','Delete\x20workflow\x20project\x20from\x20Treasure\x20Data','Downloading\x20project\x20','Getting\x20attempt\x20details...','Filter:\x20project='];a42_0x21bc=function(){return _0x46a2e4;};return a42_0x21bc();}export class WorkflowDownloadCommand extends BaseCommand{['name']=a42_0x156904(0x170);[a42_0x156904(0xe6)]=a42_0x156904(0x177);async['execute'](_0x186bb6){const _0x458228=a42_0x156904,{options:_0x217e57,args:_0x1131e3,tdx:_0x26bb66}=_0x186bb6,_0x3345bf=_0x1131e3[0x0],_0x357208=_0x1131e3[0x1]||'.';if(!_0x3345bf)return console[_0x458228(0x115)](_0x458228(0xea)),console[_0x458228(0x115)](_0x458228(0xdb)),0x1;const _0x4fdc9f=_0x217e57[_0x458228(0x143)];_0x217e57[_0x458228(0x142)]&&(console[_0x458228(0x115)](_0x458228(0xf5)+_0x3345bf),console['error'](_0x458228(0x15a)+_0x357208),_0x4fdc9f&&console['error'](_0x458228(0x154)+_0x4fdc9f));const _0x452d24=await withSpinner(_0x458228(0x108)+_0x3345bf+'...',()=>_0x26bb66[_0x458228(0xd7)]['download'](_0x3345bf,_0x357208,{'revision':_0x4fdc9f}),{'verbose':_0x217e57[_0x458228(0x142)]}),_0x17c1c4=_0x452d24[_0x458228(0x17c)];return console[_0x458228(0x115)](_0x458228(0x163)+_0x17c1c4[_0x458228(0x139)]),console[_0x458228(0x115)](_0x458228(0x117)+_0x17c1c4[_0x458228(0x143)]),console[_0x458228(0x115)]('\x20\x20Files\x20extracted:\x20'+_0x17c1c4[_0x458228(0x153)]),console[_0x458228(0x115)](_0x458228(0xf6)+_0x357208+'/'+_0x17c1c4[_0x458228(0x139)]),0x0;}}export class WorkflowPushCommand extends BaseCommand{['name']=a42_0x156904(0x149);[a42_0x156904(0xe6)]=a42_0x156904(0x116);async[a42_0x156904(0xee)](_0x1731d7){const _0xc77304=a42_0x156904,{options:_0x48223d,args:_0x2ac8d7,tdx:_0x440153}=_0x1731d7;let _0x28a560='.',_0x2792d8=_0x48223d[_0xc77304(0x16e)];if(_0x2ac8d7[0x0]){const {promises:_0x1e2150}=await import('fs');try{const _0x48cfa4=await _0x1e2150[_0xc77304(0xf3)](_0x2ac8d7[0x0]);if(_0x48cfa4[_0xc77304(0x161)]())_0x28a560=_0x2ac8d7[0x0];else return console['error'](_0xc77304(0xef)+_0x2ac8d7[0x0]+'\x20is\x20not\x20a\x20directory'),0x1;}catch{_0x2792d8=_0x2ac8d7[0x0],_0x28a560='.';}}const _0x39798a=_0x48223d[_0xc77304(0x143)],_0x51d6b6=_0x48223d[_0xc77304(0x12d)];_0x48223d[_0xc77304(0x142)]&&(console[_0xc77304(0x115)](_0xc77304(0x103)+_0x28a560),_0x2792d8&&console[_0xc77304(0x115)](_0xc77304(0xdd)+_0x2792d8),_0x39798a&&console[_0xc77304(0x115)]('Revision:\x20'+_0x39798a),_0x51d6b6&&console[_0xc77304(0x115)](_0xc77304(0x168)));const _0x2185dc=await withSpinner(_0xc77304(0x152),()=>_0x440153[_0xc77304(0xd7)]['push'](_0x28a560,{'projectName':_0x2792d8,'revision':_0x39798a,'skipValidation':_0x51d6b6}),{'verbose':_0x48223d[_0xc77304(0x142)]}),_0x308212=_0x2185dc[_0xc77304(0x17c)];return console[_0xc77304(0x115)](_0xc77304(0x140)+_0x308212[_0xc77304(0x139)]),console['error'](_0xc77304(0xdf)+_0x308212['projectId']),console[_0xc77304(0x115)](_0xc77304(0x117)+_0x308212[_0xc77304(0x143)]),0x0;}}export class WorkflowDeleteCommand extends BaseCommand{[a42_0x156904(0x16e)]=a42_0x156904(0xe7);[a42_0x156904(0xe6)]=a42_0x156904(0x107);async[a42_0x156904(0xee)](_0x5d2ca3){const _0x4e969b=a42_0x156904,{options:_0x44270d,args:_0x47bca9,tdx:_0x11e1f3}=_0x5d2ca3,_0x279ee3=_0x47bca9[0x0];if(!_0x279ee3)return console[_0x4e969b(0x115)](_0x4e969b(0xdc)),console[_0x4e969b(0x115)](_0x4e969b(0x11d)),0x1;_0x44270d[_0x4e969b(0x142)]&&console[_0x4e969b(0x115)]('Project:\x20'+_0x279ee3);if(!_0x44270d[_0x4e969b(0x122)]){const _0xf69cab=await confirm('Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20project\x20\x22'+_0x279ee3+_0x4e969b(0xe2));if(!_0xf69cab)return console['error'](_0x4e969b(0x14f)),0x0;}const _0x2051e1=await withSpinner('Deleting\x20project\x20'+_0x279ee3+'...',()=>_0x11e1f3[_0x4e969b(0xd7)][_0x4e969b(0xe8)](_0x279ee3),{'verbose':_0x44270d[_0x4e969b(0x142)]}),_0x213d5f=_0x2051e1[_0x4e969b(0x17c)];return console[_0x4e969b(0x115)](_0x4e969b(0x16a)+_0x213d5f[_0x4e969b(0x139)]),console['error'](_0x4e969b(0xdf)+_0x213d5f[_0x4e969b(0x155)]),0x0;}}
package/dist/core/auth.js CHANGED
@@ -1 +1 @@
1
- (function(_0x55111e,_0x598f4e){const _0x549713=a43_0x3bda,_0x2bcb1f=_0x55111e();while(!![]){try{const _0xfbe9b3=parseInt(_0x549713(0x127))/0x1*(parseInt(_0x549713(0x126))/0x2)+parseInt(_0x549713(0x12b))/0x3+parseInt(_0x549713(0x129))/0x4+-parseInt(_0x549713(0x12c))/0x5*(-parseInt(_0x549713(0x130))/0x6)+-parseInt(_0x549713(0x12a))/0x7*(parseInt(_0x549713(0x11f))/0x8)+parseInt(_0x549713(0x12e))/0x9+-parseInt(_0x549713(0x121))/0xa;if(_0xfbe9b3===_0x598f4e)break;else _0x2bcb1f['push'](_0x2bcb1f['shift']());}catch(_0x4a4b38){_0x2bcb1f['push'](_0x2bcb1f['shift']());}}}(a43_0x20de,0x9814c));function a43_0x20de(){const _0x51d29b=['TD1\x20','tdx',';\x20node/','6WBoTwr','75623pwQHlk','utf-8','2846880enndIP','413nzbsWR','2435805dFLglx','15760apHKVr','X-Trino-User','5576625DKrzza','parse','1128LsyCQW','replace','0.0.0','Authorization','113832DUPaXu','version','15002900qYZYsG','length'];a43_0x20de=function(){return _0x51d29b;};return a43_0x20de();}import{platform}from'os';function a43_0x3bda(_0x2d57c3,_0x349487){_0x2d57c3=_0x2d57c3-0x11c;const _0x20de76=a43_0x20de();let _0x3bda49=_0x20de76[_0x2d57c3];return _0x3bda49;}import{readFileSync}from'fs';import{fileURLToPath}from'url';import{dirname,join}from'path';import{getAPIKey}from'./config.js';export function getVersion(){const _0x4877cd=a43_0x3bda;try{const _0x56b54d=fileURLToPath(import.meta.url),_0x1db686=dirname(_0x56b54d),_0x548920=join(_0x1db686,'../../package.json'),_0x4ff840=JSON[_0x4877cd(0x12f)](readFileSync(_0x548920,_0x4877cd(0x128)));return _0x4ff840[_0x4877cd(0x120)];}catch{return _0x4877cd(0x11d);}}export function getUserAgent(){const _0x3d0efa=a43_0x3bda,_0x48f22b=getVersion(),_0x5b8b60=platform(),_0x162abd=process[_0x3d0efa(0x120)][_0x3d0efa(0x11c)]('v','');return'tdx/'+_0x48f22b+'\x20('+_0x5b8b60+_0x3d0efa(0x125)+_0x162abd+')';}export function getAuthHeaders(_0x4e009e,_0x55dd72){const _0x1defad=a43_0x3bda,_0x4e8032=getVersion(),_0x3762b2={'User-Agent':getUserAgent(),'X-TD-Client':_0x1defad(0x124),'X-TD-Client-Version':_0x4e8032};return _0x55dd72&&(_0x3762b2[_0x1defad(0x11e)]=_0x1defad(0x123)+_0x55dd72),_0x3762b2;}export function toHeaderRecord(_0x24440c){const _0x274d62={};for(const [_0x306daf,_0x516aa2]of Object['entries'](_0x24440c)){_0x516aa2!==undefined&&(_0x274d62[_0x306daf]=_0x516aa2);}return _0x274d62;}export function getTrinoHeaders(_0x5b4636,_0x34625b){const _0x4e2c1e=a43_0x3bda,_0x4c40cf=getAuthHeaders(_0x5b4636,_0x34625b),_0x10dca9=toHeaderRecord(_0x4c40cf);return delete _0x10dca9[_0x4e2c1e(0x11e)],_0x34625b&&(_0x10dca9[_0x4e2c1e(0x12d)]=_0x34625b),_0x10dca9;}export function hasAPIKey(_0x13be82){const _0x275fce=a43_0x3bda,_0x3879fa=getAPIKey(_0x13be82);return _0x3879fa!==undefined&&_0x3879fa[_0x275fce(0x122)]>0x0;}
1
+ (function(_0x1ab9d4,_0x2b4812){const _0x10f8c4=a43_0x3427,_0x4fad36=_0x1ab9d4();while(!![]){try{const _0x1634f7=parseInt(_0x10f8c4(0x14a))/0x1+parseInt(_0x10f8c4(0x151))/0x2+parseInt(_0x10f8c4(0x153))/0x3*(parseInt(_0x10f8c4(0x14c))/0x4)+parseInt(_0x10f8c4(0x14d))/0x5*(parseInt(_0x10f8c4(0x158))/0x6)+parseInt(_0x10f8c4(0x157))/0x7*(-parseInt(_0x10f8c4(0x156))/0x8)+parseInt(_0x10f8c4(0x146))/0x9*(-parseInt(_0x10f8c4(0x14f))/0xa)+-parseInt(_0x10f8c4(0x144))/0xb*(-parseInt(_0x10f8c4(0x154))/0xc);if(_0x1634f7===_0x2b4812)break;else _0x4fad36['push'](_0x4fad36['shift']());}catch(_0x389f81){_0x4fad36['push'](_0x4fad36['shift']());}}}(a43_0x40ad,0x9d51f));import{platform}from'os';function a43_0x3427(_0x1f8df5,_0x23ba69){_0x1f8df5=_0x1f8df5-0x144;const _0x40ad40=a43_0x40ad();let _0x342704=_0x40ad40[_0x1f8df5];return _0x342704;}import{readFileSync}from'fs';import{fileURLToPath}from'url';import{dirname,join}from'path';import{getAPIKey}from'./config.js';export function getVersion(){const _0x4cf2e1=a43_0x3427;try{const _0x5fe0b1=fileURLToPath(import.meta.url),_0x96f38=dirname(_0x5fe0b1),_0x2d49dd=join(_0x96f38,_0x4cf2e1(0x159)),_0x404471=JSON[_0x4cf2e1(0x147)](readFileSync(_0x2d49dd,_0x4cf2e1(0x148)));return _0x404471[_0x4cf2e1(0x152)];}catch{return'0.0.0';}}export function getUserAgent(){const _0x37f526=a43_0x3427,_0x376d2f=getVersion(),_0x5f0f10=platform(),_0x2cbf0f=process[_0x37f526(0x152)][_0x37f526(0x14e)]('v','');return _0x37f526(0x149)+_0x376d2f+'\x20('+_0x5f0f10+_0x37f526(0x150)+_0x2cbf0f+')';}function a43_0x40ad(){const _0x108ded=['1125685MezWFE','entries','3028IwgPzF','1503195jBcsUp','replace','4670OkEaIq',';\x20node/','334064DTMOaN','version','1011KgzWcN','14604iaaRNl','X-Trino-User','4913464OiXeKM','7aDCoFO','6wdGpcC','../../package.json','length','2629eNIAmb','Authorization','16974RmytTD','parse','utf-8','tdx/'];a43_0x40ad=function(){return _0x108ded;};return a43_0x40ad();}export function getAuthHeaders(_0x2111a4,_0x19b8c7){const _0x5e3332=a43_0x3427,_0x2af36e=getVersion(),_0xb28cfa={'User-Agent':getUserAgent(),'X-TD-Client':'tdx','X-TD-Client-Version':_0x2af36e};return _0x19b8c7&&(_0xb28cfa[_0x5e3332(0x145)]='TD1\x20'+_0x19b8c7),_0xb28cfa;}export function toHeaderRecord(_0x22cc17){const _0x22931e=a43_0x3427,_0x3bb9c5={};for(const [_0x4c61cf,_0x29ee5c]of Object[_0x22931e(0x14b)](_0x22cc17)){_0x29ee5c!==undefined&&(_0x3bb9c5[_0x4c61cf]=_0x29ee5c);}return _0x3bb9c5;}export function getTrinoHeaders(_0x53ca7a,_0x1dc4d0){const _0x1aabcf=a43_0x3427,_0x1f4e0f=getAuthHeaders(_0x53ca7a,_0x1dc4d0),_0x2e5216=toHeaderRecord(_0x1f4e0f);return delete _0x2e5216[_0x1aabcf(0x145)],_0x1dc4d0&&(_0x2e5216[_0x1aabcf(0x155)]=_0x1dc4d0),_0x2e5216;}export function hasAPIKey(_0x46d44f){const _0x115a1d=a43_0x3427,_0x131c15=getAPIKey(_0x46d44f);return _0x131c15!==undefined&&_0x131c15[_0x115a1d(0x15a)]>0x0;}
@@ -1 +1 @@
1
- (function(_0x1d2129,_0x22241c){const _0x22846b=a44_0x2cba,_0x2a8ce8=_0x1d2129();while(!![]){try{const _0x13b98a=-parseInt(_0x22846b(0x105))/0x1*(parseInt(_0x22846b(0x110))/0x2)+parseInt(_0x22846b(0x146))/0x3+-parseInt(_0x22846b(0x119))/0x4*(parseInt(_0x22846b(0x144))/0x5)+-parseInt(_0x22846b(0x135))/0x6+-parseInt(_0x22846b(0x133))/0x7*(-parseInt(_0x22846b(0x145))/0x8)+parseInt(_0x22846b(0x124))/0x9+-parseInt(_0x22846b(0x14c))/0xa*(-parseInt(_0x22846b(0x116))/0xb);if(_0x13b98a===_0x22241c)break;else _0x2a8ce8['push'](_0x2a8ce8['shift']());}catch(_0x44ff2b){_0x2a8ce8['push'](_0x2a8ce8['shift']());}}}(a44_0x16ef,0xc3771));import{homedir}from'os';import{join}from'path';function a44_0x2cba(_0x526573,_0x51c6c4){_0x526573=_0x526573-0x101;const _0x16efc4=a44_0x16ef();let _0x2cba21=_0x16efc4[_0x526573];return _0x2cba21;}import{existsSync,readFileSync,writeFileSync,mkdirSync,unlinkSync}from'fs';import*as a44_0x49280f from'node:fs';import*as a44_0x4cac25 from'node:path';import{SITE_ALIASES}from'../types/index.js';import{validateSecureFilePermissions}from'../utils/file-permissions.js';import{getKeychainAPIKey,saveKeychainAPIKey,isKeychainAvailable}from'./keychain.js';import{getCachedCredential,setCachedCredential}from'./credential-cache.js';import a44_0x5e5e1a from'chalk';export function getConfigDir(){const _0x141081=a44_0x2cba;return process[_0x141081(0x11f)][_0x141081(0x13a)]||join(homedir(),_0x141081(0x10d),'tdx');}export function getConfigFile(){const _0x1fb67f=a44_0x2cba;return join(getConfigDir(),_0x1fb67f(0x118));}export function getConfigFilePath(_0xf304ef){const _0x2305d7=a44_0x2cba,_0x5ae963=getConfigDir();return _0xf304ef?a44_0x4cac25[_0x2305d7(0x140)](_0x5ae963,_0x2305d7(0x12d)+_0xf304ef):getConfigFile();}export function getCacheDir(){const _0x537d34=a44_0x2cba;return process[_0x537d34(0x11f)][_0x537d34(0x14f)]||join(homedir(),_0x537d34(0x134),'tdx');}export function getLLMProjectCacheFile(_0x3cdddf){const _0x42a46a=a44_0x2cba,_0x2903f5=_0x3cdddf?_0x42a46a(0x128)+_0x3cdddf:'llm_default_project';return join(getCacheDir(),_0x2903f5);}export function readCachedLLMProject(_0x5ff560){const _0xcd6c01=a44_0x2cba;try{const _0x4f23e1=getLLMProjectCacheFile(_0x5ff560);if(!existsSync(_0x4f23e1))return null;const _0x981ded=readFileSync(_0x4f23e1,_0xcd6c01(0x149))['trim']();try{const _0x2a60cc=JSON[_0xcd6c01(0x139)](_0x981ded);if(_0x2a60cc&&typeof _0x2a60cc['id']==='string'&&typeof _0x2a60cc['name']===_0xcd6c01(0x12a))return _0x2a60cc;}catch{}return null;}catch{return null;}}export function writeCachedLLMProject(_0x5cdddc,_0x4ceb84,_0x175b3c){const _0x52fedf=a44_0x2cba;try{const _0x3e5e2d=getCacheDir(),_0x244cc9=getLLMProjectCacheFile(_0x175b3c);!existsSync(_0x3e5e2d)&&mkdirSync(_0x3e5e2d,{'recursive':!![]});const _0x122175={'name':_0x5cdddc,'id':_0x4ceb84};writeFileSync(_0x244cc9,JSON[_0x52fedf(0x148)](_0x122175),_0x52fedf(0x149));}catch{}}export function getAccountInfoCacheFile(_0x12c209){const _0x4b16cd=a44_0x2cba,_0x19be3e=_0x12c209?_0x4b16cd(0x142)+_0x12c209+'.json':_0x4b16cd(0x115);return join(getCacheDir(),_0x19be3e);}export function readCachedAccountInfo(_0x2ee4f2){const _0x5081b8=a44_0x2cba;try{const _0x4d9f22=getAccountInfoCacheFile(_0x2ee4f2);if(!existsSync(_0x4d9f22))return null;const _0x1d1bac=readFileSync(_0x4d9f22,_0x5081b8(0x149))[_0x5081b8(0x111)](),_0x3cab37=JSON[_0x5081b8(0x139)](_0x1d1bac);if(_0x3cab37&&typeof _0x3cab37[_0x5081b8(0x12e)]===_0x5081b8(0x12a)&&typeof _0x3cab37[_0x5081b8(0x12c)]==='number')return _0x3cab37;return null;}catch{return null;}}export function writeCachedAccountInfo(_0x277389,_0x4ce40d,_0x528206){const _0x5f3fe1=a44_0x2cba;try{const _0x17a003=getCacheDir(),_0xb1e107=getAccountInfoCacheFile(_0x528206);!existsSync(_0x17a003)&&mkdirSync(_0x17a003,{'recursive':!![]});const _0x1eff0b={'site':_0x277389,'accountId':_0x4ce40d,'cachedAt':new Date()[_0x5f3fe1(0x137)]()};writeFileSync(_0xb1e107,JSON[_0x5f3fe1(0x148)](_0x1eff0b),_0x5f3fe1(0x149));}catch{}}export function parseEnvFile(_0x15f899){const _0x39bdeb=a44_0x2cba,_0x1ba2dc={};for(const _0x5ea350 of _0x15f899[_0x39bdeb(0x11a)]('\x0a')){const _0x3a3eb6=_0x5ea350[_0x39bdeb(0x111)]();if(!_0x3a3eb6||_0x3a3eb6[_0x39bdeb(0x143)]('#'))continue;const _0x1c2dd5=_0x3a3eb6[_0x39bdeb(0x117)](/^([^=]+)=(.*)$/);if(_0x1c2dd5){const _0x1d49be=_0x1c2dd5[0x1][_0x39bdeb(0x111)]();let _0x3cd321=_0x1c2dd5[0x2]['trim']();(_0x3cd321[_0x39bdeb(0x143)]('\x22')&&_0x3cd321['endsWith']('\x22')||_0x3cd321[_0x39bdeb(0x143)]('\x27')&&_0x3cd321[_0x39bdeb(0x129)]('\x27'))&&(_0x3cd321=_0x3cd321[_0x39bdeb(0x101)](0x1,-0x1)),_0x1ba2dc[_0x1d49be]=_0x3cd321;}}return _0x1ba2dc;}export function readUserConfig(){const _0xc1f757=a44_0x2cba,_0x117543=getConfigFile();if(!existsSync(_0x117543))return{};try{const _0x374578=readFileSync(_0x117543,'utf-8');return parseEnvFile(_0x374578);}catch(_0x12ed3c){return console['warn'](_0xc1f757(0x108)+_0x117543+':',_0x12ed3c),{};}}export function resolveSite(_0x5012f2){const _0x57d9c9=a44_0x2cba,_0x55b7ee=['us01',_0x57d9c9(0x132),_0x57d9c9(0x14b),_0x57d9c9(0x13b),_0x57d9c9(0x136),_0x57d9c9(0x10c),'dev-eu01',_0x57d9c9(0x11b),_0x57d9c9(0x107),'stg-ap03'];if(_0x55b7ee[_0x57d9c9(0x122)](_0x5012f2))return _0x5012f2;if(_0x5012f2 in SITE_ALIASES)return SITE_ALIASES[_0x5012f2];return console[_0x57d9c9(0x138)](_0x57d9c9(0x112)+_0x5012f2+_0x57d9c9(0x13f)),_0x57d9c9(0x10a);}let cachedUserConfig=null;export function loadUserConfigOnce(){return cachedUserConfig===null&&(cachedUserConfig=readUserConfig()),cachedUserConfig;}export function clearConfigCache(){cachedUserConfig=null;}export function getAPIKey(_0x4c6fa6,_0x1638cf){const _0x30568d=a44_0x2cba,_0xd17bbd=_0x1638cf||getActiveProfileName();if(_0xd17bbd){const _0x4894c7=_0x30568d(0x12f)+normalizeProfileForEnvVar(_0xd17bbd);if(process[_0x30568d(0x11f)][_0x4894c7])return process[_0x30568d(0x11f)][_0x4894c7];}if(process[_0x30568d(0x11f)]['TDX_API_KEY'])return process[_0x30568d(0x11f)][_0x30568d(0x10b)];if(process[_0x30568d(0x11f)][_0x30568d(0x14e)])return process[_0x30568d(0x11f)][_0x30568d(0x14e)];const _0x3caf5b=_0x4c6fa6[_0x30568d(0x10f)]()[_0x30568d(0x106)](/-/g,'_'),_0xbee777=_0x30568d(0x131)+_0x3caf5b;if(_0xd17bbd){const _0x3c3b81=loadProfileEnv(_0xd17bbd);if(_0x3c3b81){if(_0x3c3b81[_0xbee777])return _0x3c3b81[_0xbee777];if(_0x3c3b81[_0x30568d(0x14e)])return _0x3c3b81[_0x30568d(0x14e)];}}const _0x2d4f9a=loadUserConfigOnce();if(_0x2d4f9a[_0xbee777])return _0x2d4f9a[_0xbee777];if(_0x2d4f9a[_0x30568d(0x14e)])return _0x2d4f9a[_0x30568d(0x14e)];return undefined;}export function normalizeProfileForEnvVar(_0x22118f){const _0x1e0665=a44_0x2cba;return _0x22118f[_0x1e0665(0x10f)]()['replace'](/[^A-Z0-9]/g,'_');}export async function resolveAPIKeyAsync(_0x551329,_0x219906){const _0x17373d=a44_0x2cba,_0x212fcb=_0x219906||getActiveProfileName()||undefined;if(_0x212fcb){const _0x702796=_0x17373d(0x12f)+normalizeProfileForEnvVar(_0x212fcb);if(process[_0x17373d(0x11f)][_0x702796])return{'apiKey':process['env'][_0x702796],'source':_0x702796+'\x20env\x20var','isDeprecated':![]};const _0xf496ec=getCachedCredential(_0x551329,_0x212fcb);if(_0xf496ec)return{'apiKey':_0xf496ec,'source':'keychain\x20(profile:\x20'+_0x212fcb+')','isDeprecated':![]};const _0x15266f=await getKeychainAPIKey(_0x212fcb);if(_0x15266f)return setCachedCredential(_0x15266f,_0x551329,_0x212fcb),{'apiKey':_0x15266f,'source':_0x17373d(0x147)+_0x212fcb+')','isDeprecated':![]};}if(process[_0x17373d(0x11f)][_0x17373d(0x10b)])return{'apiKey':process[_0x17373d(0x11f)][_0x17373d(0x10b)],'source':'TDX_API_KEY\x20env\x20var','isDeprecated':![]};if(!_0x212fcb){const _0x581664=getCachedCredential(_0x551329,undefined);if(_0x581664)return{'apiKey':_0x581664,'source':_0x17373d(0x126),'isDeprecated':![]};const _0x459bb9=await getKeychainAPIKey(undefined);if(_0x459bb9)return setCachedCredential(_0x459bb9,_0x551329,undefined),{'apiKey':_0x459bb9,'source':_0x17373d(0x126),'isDeprecated':![]};}if(process[_0x17373d(0x11f)]['TD_API_KEY'])return{'apiKey':process[_0x17373d(0x11f)]['TD_API_KEY'],'source':_0x17373d(0x130),'isDeprecated':!![]};const _0x4f005b=getLegacyEnvAPIKey(_0x551329,_0x212fcb);if(_0x4f005b){const _0x3ec9f3=await isKeychainAvailable();if(_0x3ec9f3)try{await saveKeychainAPIKey(_0x4f005b,_0x212fcb),setCachedCredential(_0x4f005b,_0x551329,_0x212fcb);const _0x207eae=getConfigFilePath(_0x212fcb);cleanupLegacyEnvFile(_0x207eae)&&console[_0x17373d(0x138)](a44_0x5e5e1a[_0x17373d(0x11c)]('⚠\x20Migrated\x20API\x20key\x20from\x20.env\x20to\x20secure\x20keychain\x20storage'));}catch(_0x50f9b2){console[_0x17373d(0x138)](a44_0x5e5e1a[_0x17373d(0x11c)](_0x17373d(0x14a)+_0x50f9b2));}const _0x9e4f1b=_0x212fcb?_0x17373d(0x113)+_0x212fcb+')':_0x17373d(0x12b);return{'apiKey':_0x4f005b,'source':_0x9e4f1b,'isDeprecated':!![]};}return null;}export async function getAPIKeyAsync(_0xe6e5e7,_0x16b30a,_0x4172d7=!![]){const _0x2b366b=a44_0x2cba,_0x5d63ae=await resolveAPIKeyAsync(_0xe6e5e7,_0x16b30a);if(!_0x5d63ae)return undefined;if(_0x4172d7&&_0x5d63ae[_0x2b366b(0x121)]&&_0x5d63ae[_0x2b366b(0x123)][_0x2b366b(0x122)](_0x2b366b(0x14e))){const _0x5ae047=_0x16b30a||getActiveProfileName()||undefined,_0x3a9bae=_0x5ae047?'TDX_API_KEY_'+normalizeProfileForEnvVar(_0x5ae047):_0x2b366b(0x14d);console[_0x2b366b(0x138)](a44_0x5e5e1a['yellow'](_0x2b366b(0x114)+(_0x2b366b(0x109)+_0x3a9bae+').')));}return _0x5d63ae[_0x2b366b(0x11e)];}function getLegacyEnvAPIKey(_0x364a1f,_0x43422b){const _0x423f58=a44_0x2cba,_0x5acabe=_0x364a1f[_0x423f58(0x10f)]()[_0x423f58(0x106)](/-/g,'_'),_0x3203eb=_0x423f58(0x131)+_0x5acabe;if(_0x43422b){const _0x409a3f=loadProfileEnv(_0x43422b);if(_0x409a3f){if(_0x409a3f[_0x3203eb])return _0x409a3f[_0x3203eb];if(_0x409a3f[_0x423f58(0x14e)])return _0x409a3f[_0x423f58(0x14e)];}}const _0x5a68d8=loadUserConfigOnce();if(_0x5a68d8[_0x3203eb])return _0x5a68d8[_0x3203eb];if(_0x5a68d8['TD_API_KEY'])return _0x5a68d8[_0x423f58(0x14e)];return undefined;}function cleanupLegacyEnvFile(_0x276dd9){const _0x20440c=a44_0x2cba;if(!existsSync(_0x276dd9))return![];try{const _0xee5a22=readFileSync(_0x276dd9,_0x20440c(0x149)),_0x49d7fa=_0xee5a22[_0x20440c(0x11a)]('\x0a'),_0x4bce7c=_0x49d7fa[_0x20440c(0x10e)](_0x3dacc2=>{const _0x49f7dc=_0x20440c,_0xc4ce80=_0x3dacc2['trim']();if(!_0xc4ce80||_0xc4ce80[_0x49f7dc(0x143)]('#'))return!![];const [_0x13aeb6]=_0xc4ce80[_0x49f7dc(0x11a)]('=');return!_0x13aeb6[_0x49f7dc(0x143)](_0x49f7dc(0x14e));}),_0x117b27=_0x4bce7c[_0x20440c(0x102)](_0x454999=>{const _0x3c6638=_0x20440c,_0x2d5d20=_0x454999[_0x3c6638(0x111)]();return _0x2d5d20&&!_0x2d5d20[_0x3c6638(0x143)]('#');});if(!_0x117b27)return unlinkSync(_0x276dd9),!![];return writeFileSync(_0x276dd9,_0x4bce7c[_0x20440c(0x140)]('\x0a'),{'mode':0x180}),!![];}catch{return![];}}function loadProfileEnv(_0x4cdba8){const _0x4a89d0=a44_0x2cba,_0x651b40=a44_0x4cac25[_0x4a89d0(0x140)](getConfigDir(),'.env.'+_0x4cdba8);if(a44_0x49280f['existsSync'](_0x651b40)){validateSecureFilePermissions(_0x651b40);try{const _0x423694=a44_0x49280f[_0x4a89d0(0x103)](_0x651b40,_0x4a89d0(0x149));return parseEnvFile(_0x423694);}catch(_0x244a70){console['warn'](_0x4a89d0(0x127)+_0x651b40+':\x20'+_0x244a70);}}const _0x31de21=a44_0x4cac25[_0x4a89d0(0x140)](getConfigDir(),_0x4a89d0(0x13d),_0x4cdba8,_0x4a89d0(0x118));if(a44_0x49280f[_0x4a89d0(0x141)](_0x31de21)){validateSecureFilePermissions(_0x31de21);try{const _0x484817=a44_0x49280f['readFileSync'](_0x31de21,'utf-8');return parseEnvFile(_0x484817);}catch(_0xf69764){return console[_0x4a89d0(0x138)](_0x4a89d0(0x127)+_0x31de21+':\x20'+_0xf69764),null;}}return null;}function getActiveProfileName(){const _0x4e0c71=a44_0x2cba,_0x27f871=a44_0x4cac25['join'](getConfigDir(),'tdx.json');if(!a44_0x49280f[_0x4e0c71(0x141)](_0x27f871))return null;try{const _0x3a3960=a44_0x49280f['readFileSync'](_0x27f871,_0x4e0c71(0x149)),_0x29cafe=JSON['parse'](_0x3a3960);return _0x29cafe[_0x4e0c71(0x104)]||null;}catch{return null;}}function a44_0x16ef(){const _0x1d8e70=['site','TDX_API_KEY_','TD_API_KEY\x20env\x20var\x20(deprecated)','TD_API_KEY_','jp01','9849133OLnKxe','.cache','7858224BNhHIT','ap03','toISOString','warn','parse','TDX_CONFIG_DIR','ap02','apiKeys','profiles','entries','\x27,\x20defaulting\x20to\x20us01','join','existsSync','account_info.','startsWith','694725rNTPik','8vGerro','229173aLxJZs','keychain\x20(profile:\x20','stringify','utf-8','⚠\x20Failed\x20to\x20migrate\x20API\x20key\x20to\x20keychain:\x20','eu01','3750CLAudg','TDX_API_KEY_<PROFILE>','TD_API_KEY','TDX_CACHE_DIR','slice','some','readFileSync','profile','2FHwzje','replace','stg-jp01','Warning:\x20Failed\x20to\x20read\x20config\x20file\x20','\x20\x20For\x20profile-specific\x20keys,\x20use\x20TDX_API_KEY_<PROFILE>\x20(e.g.,\x20','us01','TDX_API_KEY','dev-us01','.config','filter','toUpperCase','471202mviChK','trim','Warning:\x20Unknown\x20site\x20\x27','legacy\x20.env\x20file\x20(profile:\x20','Warning:\x20Using\x20TD_API_KEY\x20is\x20deprecated.\x20Please\x20use\x20TDX_API_KEY\x20instead.\x0a','account_info.json','836YAeXEU','match','.env','4LnLCAC','split','stg-us01','yellow','dev-eu01','apiKey','env','map','isDeprecated','includes','source','10877094WwEscQ','⚠\x20Cleaned\x20up\x20API\x20keys\x20from\x20legacy\x20.env\x20file','keychain','Warning:\x20Failed\x20to\x20load\x20','llm_default_project.','endsWith','string','legacy\x20.env\x20file','accountId','.env.'];a44_0x16ef=function(){return _0x1d8e70;};return a44_0x16ef();}export function saveAPIKey(_0xcf2c67,_0xbef4f0,_0x5b48dd){const _0x27fec8=a44_0x2cba,_0x448d22=getConfigDir(),_0x234fc7=getConfigFilePath(_0x5b48dd);!existsSync(_0x448d22)&&mkdirSync(_0x448d22,{'recursive':!![],'mode':0x1c0});let _0x2319e7={};if(existsSync(_0x234fc7))try{const _0x9bfe99=readFileSync(_0x234fc7,_0x27fec8(0x149));_0x2319e7=parseEnvFile(_0x9bfe99);}catch(_0x1c4895){console[_0x27fec8(0x138)]('Warning:\x20Failed\x20to\x20read\x20'+_0x234fc7+':',_0x1c4895);}const _0x313f60=_0xcf2c67['toUpperCase']()[_0x27fec8(0x106)](/-/g,'_');_0x2319e7[_0x27fec8(0x131)+_0x313f60]=_0xbef4f0;const _0x522e1f=Object[_0x27fec8(0x13e)](_0x2319e7)[_0x27fec8(0x120)](([_0x4b04dc,_0xf399bc])=>_0x4b04dc+'='+_0xf399bc);writeFileSync(_0x234fc7,_0x522e1f[_0x27fec8(0x140)]('\x0a')+'\x0a',{'mode':0x180});}export async function saveAPIKeyAsync(_0xef2aab,_0x3d0058,_0x4822f8){const _0x155065=a44_0x2cba;await saveKeychainAPIKey(_0xef2aab,_0x4822f8),setCachedCredential(_0xef2aab,_0x3d0058,_0x4822f8);const _0xe0d519=getConfigFilePath(_0x4822f8);cleanupLegacyEnvFile(_0xe0d519)&&console[_0x155065(0x138)](a44_0x5e5e1a[_0x155065(0x11c)](_0x155065(0x125)));}export function loadConfig(){const _0x332529=a44_0x2cba,_0x5d9bb0={'apiKeys':{},'defaultSite':_0x332529(0x10a)},_0x476c7d=[_0x332529(0x10a),_0x332529(0x132),'eu01',_0x332529(0x13b),_0x332529(0x136),_0x332529(0x10c),_0x332529(0x11d),_0x332529(0x11b),'stg-jp01','stg-ap03'];for(const _0x364713 of _0x476c7d){const _0x36c5d9=getAPIKey(_0x364713);_0x36c5d9&&(_0x5d9bb0[_0x332529(0x13c)][_0x364713]=_0x36c5d9);}return _0x5d9bb0;}
1
+ (function(_0x212435,_0x3a6a4a){const _0x262874=a44_0x5c04,_0x1b1541=_0x212435();while(!![]){try{const _0x2b6091=-parseInt(_0x262874(0x133))/0x1*(-parseInt(_0x262874(0x150))/0x2)+-parseInt(_0x262874(0x13e))/0x3+parseInt(_0x262874(0x10e))/0x4*(-parseInt(_0x262874(0x112))/0x5)+parseInt(_0x262874(0x149))/0x6+parseInt(_0x262874(0x14a))/0x7+-parseInt(_0x262874(0x129))/0x8*(parseInt(_0x262874(0x144))/0x9)+-parseInt(_0x262874(0x115))/0xa;if(_0x2b6091===_0x3a6a4a)break;else _0x1b1541['push'](_0x1b1541['shift']());}catch(_0x35b532){_0x1b1541['push'](_0x1b1541['shift']());}}}(a44_0x360e,0x303ff));import{homedir}from'os';import{join}from'path';import{existsSync,readFileSync,writeFileSync,mkdirSync,unlinkSync}from'fs';import*as a44_0x22665a from'node:fs';import*as a44_0x4a9945 from'node:path';import{SITE_ALIASES}from'../types/index.js';import{validateSecureFilePermissions}from'../utils/file-permissions.js';import{getKeychainAPIKey,saveKeychainAPIKey,isKeychainAvailable}from'./keychain.js';import{getCachedCredential,setCachedCredential}from'./credential-cache.js';import a44_0x73ef6f from'chalk';export function getConfigDir(){const _0x59a4c0=a44_0x5c04;return process['env'][_0x59a4c0(0x14c)]||join(homedir(),'.config',_0x59a4c0(0x146));}function a44_0x5c04(_0x58a07e,_0x3733c9){_0x58a07e=_0x58a07e-0x10a;const _0x360ea7=a44_0x360e();let _0x5c048f=_0x360ea7[_0x58a07e];return _0x5c048f;}export function getConfigFile(){const _0x446b4b=a44_0x5c04;return join(getConfigDir(),_0x446b4b(0x14e));}export function getConfigFilePath(_0x1b28ad){const _0x131826=getConfigDir();return _0x1b28ad?a44_0x4a9945['join'](_0x131826,'.env.'+_0x1b28ad):getConfigFile();}export function getCacheDir(){const _0x3ff32f=a44_0x5c04;return process[_0x3ff32f(0x145)]['TDX_CACHE_DIR']||join(homedir(),_0x3ff32f(0x116),_0x3ff32f(0x146));}export function getLLMProjectCacheFile(_0x22bd7e){const _0x2a1da3=a44_0x5c04,_0x1f6859=_0x22bd7e?_0x2a1da3(0x111)+_0x22bd7e:_0x2a1da3(0x138);return join(getCacheDir(),_0x1f6859);}export function readCachedLLMProject(_0x59d84e){const _0x5ab48b=a44_0x5c04;try{const _0x3885d1=getLLMProjectCacheFile(_0x59d84e);if(!existsSync(_0x3885d1))return null;const _0x27e772=readFileSync(_0x3885d1,_0x5ab48b(0x139))['trim']();try{const _0x20faed=JSON[_0x5ab48b(0x126)](_0x27e772);if(_0x20faed&&typeof _0x20faed['id']===_0x5ab48b(0x13b)&&typeof _0x20faed['name']===_0x5ab48b(0x13b))return _0x20faed;}catch{}return null;}catch{return null;}}export function writeCachedLLMProject(_0x4faa55,_0x2ab7b8,_0x39849c){const _0x52cfda=a44_0x5c04;try{const _0xbac300=getCacheDir(),_0x22ce46=getLLMProjectCacheFile(_0x39849c);!existsSync(_0xbac300)&&mkdirSync(_0xbac300,{'recursive':!![]});const _0x2a1297={'name':_0x4faa55,'id':_0x2ab7b8};writeFileSync(_0x22ce46,JSON[_0x52cfda(0x10b)](_0x2a1297),'utf-8');}catch{}}export function getAccountInfoCacheFile(_0x19a775){const _0x4a6f64=a44_0x5c04,_0x1ca38f=_0x19a775?_0x4a6f64(0x12e)+_0x19a775+'.json':_0x4a6f64(0x121);return join(getCacheDir(),_0x1ca38f);}export function readCachedAccountInfo(_0x1e0aa2){const _0x13349e=a44_0x5c04;try{const _0x32abf7=getAccountInfoCacheFile(_0x1e0aa2);if(!existsSync(_0x32abf7))return null;const _0x121956=readFileSync(_0x32abf7,_0x13349e(0x139))[_0x13349e(0x117)](),_0x14121c=JSON['parse'](_0x121956);if(_0x14121c&&typeof _0x14121c[_0x13349e(0x114)]==='string'&&typeof _0x14121c[_0x13349e(0x122)]===_0x13349e(0x152))return _0x14121c;return null;}catch{return null;}}export function writeCachedAccountInfo(_0x1da3a7,_0x48b8b0,_0x32db6d){const _0x3bdb29=a44_0x5c04;try{const _0x20ee96=getCacheDir(),_0x331ecf=getAccountInfoCacheFile(_0x32db6d);!existsSync(_0x20ee96)&&mkdirSync(_0x20ee96,{'recursive':!![]});const _0x58943f={'site':_0x1da3a7,'accountId':_0x48b8b0,'cachedAt':new Date()[_0x3bdb29(0x11c)]()};writeFileSync(_0x331ecf,JSON['stringify'](_0x58943f),_0x3bdb29(0x139));}catch{}}export function parseEnvFile(_0x5ad1f9){const _0x483f98=a44_0x5c04,_0x4ee6b1={};for(const _0x335211 of _0x5ad1f9[_0x483f98(0x14d)]('\x0a')){const _0x814cae=_0x335211[_0x483f98(0x117)]();if(!_0x814cae||_0x814cae[_0x483f98(0x13a)]('#'))continue;const _0x3fa316=_0x814cae[_0x483f98(0x11a)](/^([^=]+)=(.*)$/);if(_0x3fa316){const _0x22f9ee=_0x3fa316[0x1][_0x483f98(0x117)]();let _0xd95fcc=_0x3fa316[0x2][_0x483f98(0x117)]();(_0xd95fcc['startsWith']('\x22')&&_0xd95fcc['endsWith']('\x22')||_0xd95fcc[_0x483f98(0x13a)]('\x27')&&_0xd95fcc[_0x483f98(0x13f)]('\x27'))&&(_0xd95fcc=_0xd95fcc['slice'](0x1,-0x1)),_0x4ee6b1[_0x22f9ee]=_0xd95fcc;}}return _0x4ee6b1;}export function readUserConfig(){const _0x157de3=a44_0x5c04,_0x3ad9a9=getConfigFile();if(!existsSync(_0x3ad9a9))return{};try{const _0x5a90b5=readFileSync(_0x3ad9a9,_0x157de3(0x139));return parseEnvFile(_0x5a90b5);}catch(_0xef6218){return console[_0x157de3(0x10a)]('Warning:\x20Failed\x20to\x20read\x20config\x20file\x20'+_0x3ad9a9+':',_0xef6218),{};}}export function resolveSite(_0x39b4a0){const _0x539ec7=a44_0x5c04,_0x424196=[_0x539ec7(0x110),_0x539ec7(0x10d),_0x539ec7(0x125),_0x539ec7(0x142),_0x539ec7(0x12b),'dev-us01','dev-eu01',_0x539ec7(0x124),'stg-jp01','stg-ap03'];if(_0x424196[_0x539ec7(0x151)](_0x39b4a0))return _0x39b4a0;if(_0x39b4a0 in SITE_ALIASES)return SITE_ALIASES[_0x39b4a0];return console[_0x539ec7(0x10a)](_0x539ec7(0x13d)+_0x39b4a0+'\x27,\x20defaulting\x20to\x20us01'),_0x539ec7(0x110);}let cachedUserConfig=null;export function loadUserConfigOnce(){return cachedUserConfig===null&&(cachedUserConfig=readUserConfig()),cachedUserConfig;}export function clearConfigCache(){cachedUserConfig=null;}export function getAPIKey(_0x59b5be,_0x395827){const _0x593ad3=a44_0x5c04,_0x53ce23=_0x395827||getActiveProfileName();if(_0x53ce23){const _0x35f512=_0x593ad3(0x119)+normalizeProfileForEnvVar(_0x53ce23);if(process[_0x593ad3(0x145)][_0x35f512])return process[_0x593ad3(0x145)][_0x35f512];}if(process[_0x593ad3(0x145)][_0x593ad3(0x11d)])return process[_0x593ad3(0x145)][_0x593ad3(0x11d)];if(process[_0x593ad3(0x145)][_0x593ad3(0x113)])return process['env']['TD_API_KEY'];const _0x43b1f6=_0x59b5be[_0x593ad3(0x137)]()[_0x593ad3(0x12f)](/-/g,'_'),_0x175777='TD_API_KEY_'+_0x43b1f6;if(_0x53ce23){const _0x501163=loadProfileEnv(_0x53ce23);if(_0x501163){if(_0x501163[_0x175777])return _0x501163[_0x175777];if(_0x501163[_0x593ad3(0x113)])return _0x501163[_0x593ad3(0x113)];}}const _0x5e68d6=loadUserConfigOnce();if(_0x5e68d6[_0x175777])return _0x5e68d6[_0x175777];if(_0x5e68d6[_0x593ad3(0x113)])return _0x5e68d6['TD_API_KEY'];return undefined;}export function normalizeProfileForEnvVar(_0x4e306c){const _0x456167=a44_0x5c04;return _0x4e306c[_0x456167(0x137)]()[_0x456167(0x12f)](/[^A-Z0-9]/g,'_');}export async function resolveAPIKeyAsync(_0x31a9e3,_0x92b62c){const _0x17d2ff=a44_0x5c04,_0x28c3ae=_0x92b62c||getActiveProfileName()||undefined;if(_0x28c3ae){const _0x12c143=_0x17d2ff(0x119)+normalizeProfileForEnvVar(_0x28c3ae);if(process[_0x17d2ff(0x145)][_0x12c143])return{'apiKey':process[_0x17d2ff(0x145)][_0x12c143],'source':_0x12c143+_0x17d2ff(0x147),'isDeprecated':![]};const _0x2d18a4=getCachedCredential(_0x31a9e3,_0x28c3ae);if(_0x2d18a4)return{'apiKey':_0x2d18a4,'source':_0x17d2ff(0x11f)+_0x28c3ae+')','isDeprecated':![]};const _0x51fcd2=await getKeychainAPIKey(_0x28c3ae);if(_0x51fcd2)return setCachedCredential(_0x51fcd2,_0x31a9e3,_0x28c3ae),{'apiKey':_0x51fcd2,'source':_0x17d2ff(0x11f)+_0x28c3ae+')','isDeprecated':![]};}if(process['env'][_0x17d2ff(0x11d)])return{'apiKey':process[_0x17d2ff(0x145)][_0x17d2ff(0x11d)],'source':'TDX_API_KEY\x20env\x20var','isDeprecated':![]};if(!_0x28c3ae){const _0x4f7dc6=getCachedCredential(_0x31a9e3,undefined);if(_0x4f7dc6)return{'apiKey':_0x4f7dc6,'source':_0x17d2ff(0x12a),'isDeprecated':![]};const _0x18bed5=await getKeychainAPIKey(undefined);if(_0x18bed5)return setCachedCredential(_0x18bed5,_0x31a9e3,undefined),{'apiKey':_0x18bed5,'source':_0x17d2ff(0x12a),'isDeprecated':![]};}if(process[_0x17d2ff(0x145)][_0x17d2ff(0x113)])return{'apiKey':process[_0x17d2ff(0x145)]['TD_API_KEY'],'source':_0x17d2ff(0x12d),'isDeprecated':!![]};const _0x373cd2=getLegacyEnvAPIKey(_0x31a9e3,_0x28c3ae);if(_0x373cd2){const _0x595a37=await isKeychainAvailable();if(_0x595a37)try{await saveKeychainAPIKey(_0x373cd2,_0x28c3ae),setCachedCredential(_0x373cd2,_0x31a9e3,_0x28c3ae);const _0x4debcf=getConfigFilePath(_0x28c3ae);cleanupLegacyEnvFile(_0x4debcf)&&console[_0x17d2ff(0x10a)](a44_0x73ef6f[_0x17d2ff(0x140)](_0x17d2ff(0x10c)));}catch(_0x3f240e){console[_0x17d2ff(0x10a)](a44_0x73ef6f['yellow']('⚠\x20Failed\x20to\x20migrate\x20API\x20key\x20to\x20keychain:\x20'+_0x3f240e));}const _0x11e73f=_0x28c3ae?_0x17d2ff(0x130)+_0x28c3ae+')':_0x17d2ff(0x123);return{'apiKey':_0x373cd2,'source':_0x11e73f,'isDeprecated':!![]};}return null;}export async function getAPIKeyAsync(_0x28c9eb,_0x5418cd,_0xbae211=!![]){const _0x4c2ad1=a44_0x5c04,_0x52cd31=await resolveAPIKeyAsync(_0x28c9eb,_0x5418cd);if(!_0x52cd31)return undefined;if(_0xbae211&&_0x52cd31[_0x4c2ad1(0x14b)]&&_0x52cd31['source']['includes'](_0x4c2ad1(0x113))){const _0x43303e=_0x5418cd||getActiveProfileName()||undefined,_0x41e42e=_0x43303e?_0x4c2ad1(0x119)+normalizeProfileForEnvVar(_0x43303e):_0x4c2ad1(0x12c);console[_0x4c2ad1(0x10a)](a44_0x73ef6f[_0x4c2ad1(0x140)](_0x4c2ad1(0x148)+('\x20\x20For\x20profile-specific\x20keys,\x20use\x20TDX_API_KEY_<PROFILE>\x20(e.g.,\x20'+_0x41e42e+').')));}return _0x52cd31[_0x4c2ad1(0x135)];}function getLegacyEnvAPIKey(_0x25fdfc,_0x41f8f9){const _0x50552c=a44_0x5c04,_0x410991=_0x25fdfc[_0x50552c(0x137)]()['replace'](/-/g,'_'),_0x227dea=_0x50552c(0x136)+_0x410991;if(_0x41f8f9){const _0x5107da=loadProfileEnv(_0x41f8f9);if(_0x5107da){if(_0x5107da[_0x227dea])return _0x5107da[_0x227dea];if(_0x5107da[_0x50552c(0x113)])return _0x5107da[_0x50552c(0x113)];}}const _0x19b04e=loadUserConfigOnce();if(_0x19b04e[_0x227dea])return _0x19b04e[_0x227dea];if(_0x19b04e['TD_API_KEY'])return _0x19b04e['TD_API_KEY'];return undefined;}function cleanupLegacyEnvFile(_0x366408){const _0x105885=a44_0x5c04;if(!existsSync(_0x366408))return![];try{const _0x4fc30b=readFileSync(_0x366408,'utf-8'),_0x549b3d=_0x4fc30b['split']('\x0a'),_0x2180a1=_0x549b3d['filter'](_0x487757=>{const _0x5e31a5=a44_0x5c04,_0x53a5e0=_0x487757[_0x5e31a5(0x117)]();if(!_0x53a5e0||_0x53a5e0['startsWith']('#'))return!![];const [_0x94a9ba]=_0x53a5e0['split']('=');return!_0x94a9ba[_0x5e31a5(0x13a)](_0x5e31a5(0x113));}),_0x13343d=_0x2180a1[_0x105885(0x143)](_0x1acaae=>{const _0x42889a=_0x105885,_0x4d7e25=_0x1acaae[_0x42889a(0x117)]();return _0x4d7e25&&!_0x4d7e25['startsWith']('#');});if(!_0x13343d)return unlinkSync(_0x366408),!![];return writeFileSync(_0x366408,_0x2180a1[_0x105885(0x128)]('\x0a'),{'mode':0x180}),!![];}catch{return![];}}function a44_0x360e(){const _0x1c6cb9=['TD_API_KEY','site','264240UyKlMq','.cache','trim','existsSync','TDX_API_KEY_','match','map','toISOString','TDX_API_KEY','dev-eu01','keychain\x20(profile:\x20','Warning:\x20Failed\x20to\x20load\x20','account_info.json','accountId','legacy\x20.env\x20file','stg-us01','eu01','parse','tdx.json','join','25768TqxFiH','keychain','ap03','TDX_API_KEY_<PROFILE>','TD_API_KEY\x20env\x20var\x20(deprecated)','account_info.','replace','legacy\x20.env\x20file\x20(profile:\x20','⚠\x20Cleaned\x20up\x20API\x20keys\x20from\x20legacy\x20.env\x20file','profiles','2HvHcYL','profile','apiKey','TD_API_KEY_','toUpperCase','llm_default_project','utf-8','startsWith','string','apiKeys','Warning:\x20Unknown\x20site\x20\x27','686403djQBCI','endsWith','yellow','readFileSync','ap02','some','198FTvJJp','env','tdx','\x20env\x20var','Warning:\x20Using\x20TD_API_KEY\x20is\x20deprecated.\x20Please\x20use\x20TDX_API_KEY\x20instead.\x0a','1764336xVwmOD','2062620hHLVwp','isDeprecated','TDX_CONFIG_DIR','split','.env','.env.','135242zhlgPG','includes','number','warn','stringify','⚠\x20Migrated\x20API\x20key\x20from\x20.env\x20to\x20secure\x20keychain\x20storage','jp01','40048uCIHIw','entries','us01','llm_default_project.','100xzifKC'];a44_0x360e=function(){return _0x1c6cb9;};return a44_0x360e();}function loadProfileEnv(_0x1bd0a7){const _0x4558ea=a44_0x5c04,_0x34b099=a44_0x4a9945[_0x4558ea(0x128)](getConfigDir(),_0x4558ea(0x14f)+_0x1bd0a7);if(a44_0x22665a['existsSync'](_0x34b099)){validateSecureFilePermissions(_0x34b099);try{const _0xf8117a=a44_0x22665a[_0x4558ea(0x141)](_0x34b099,_0x4558ea(0x139));return parseEnvFile(_0xf8117a);}catch(_0x4d696c){console['warn'](_0x4558ea(0x120)+_0x34b099+':\x20'+_0x4d696c);}}const _0x37463a=a44_0x4a9945['join'](getConfigDir(),_0x4558ea(0x132),_0x1bd0a7,_0x4558ea(0x14e));if(a44_0x22665a[_0x4558ea(0x118)](_0x37463a)){validateSecureFilePermissions(_0x37463a);try{const _0x35e17f=a44_0x22665a[_0x4558ea(0x141)](_0x37463a,_0x4558ea(0x139));return parseEnvFile(_0x35e17f);}catch(_0x54c061){return console['warn'](_0x4558ea(0x120)+_0x37463a+':\x20'+_0x54c061),null;}}return null;}function getActiveProfileName(){const _0x359101=a44_0x5c04,_0x5974dd=a44_0x4a9945[_0x359101(0x128)](getConfigDir(),_0x359101(0x127));if(!a44_0x22665a[_0x359101(0x118)](_0x5974dd))return null;try{const _0x221742=a44_0x22665a[_0x359101(0x141)](_0x5974dd,_0x359101(0x139)),_0x5ba67b=JSON['parse'](_0x221742);return _0x5ba67b[_0x359101(0x134)]||null;}catch{return null;}}export function saveAPIKey(_0x2f590b,_0x58b6ca,_0x207b3d){const _0x349ca3=a44_0x5c04,_0xfa70d0=getConfigDir(),_0x2ddf15=getConfigFilePath(_0x207b3d);!existsSync(_0xfa70d0)&&mkdirSync(_0xfa70d0,{'recursive':!![],'mode':0x1c0});let _0x1c0b03={};if(existsSync(_0x2ddf15))try{const _0x2df91c=readFileSync(_0x2ddf15,_0x349ca3(0x139));_0x1c0b03=parseEnvFile(_0x2df91c);}catch(_0xe91c9a){console['warn']('Warning:\x20Failed\x20to\x20read\x20'+_0x2ddf15+':',_0xe91c9a);}const _0x3fc4d4=_0x2f590b[_0x349ca3(0x137)]()[_0x349ca3(0x12f)](/-/g,'_');_0x1c0b03[_0x349ca3(0x136)+_0x3fc4d4]=_0x58b6ca;const _0x4bc6ba=Object[_0x349ca3(0x10f)](_0x1c0b03)[_0x349ca3(0x11b)](([_0xc95e83,_0x34001a])=>_0xc95e83+'='+_0x34001a);writeFileSync(_0x2ddf15,_0x4bc6ba[_0x349ca3(0x128)]('\x0a')+'\x0a',{'mode':0x180});}export async function saveAPIKeyAsync(_0x15cfe5,_0x2a83af,_0x3c7a8d){const _0x492c4c=a44_0x5c04;await saveKeychainAPIKey(_0x15cfe5,_0x3c7a8d),setCachedCredential(_0x15cfe5,_0x2a83af,_0x3c7a8d);const _0x296d11=getConfigFilePath(_0x3c7a8d);cleanupLegacyEnvFile(_0x296d11)&&console[_0x492c4c(0x10a)](a44_0x73ef6f[_0x492c4c(0x140)](_0x492c4c(0x131)));}export function loadConfig(){const _0x2366cd=a44_0x5c04,_0x2be9e4={'apiKeys':{},'defaultSite':_0x2366cd(0x110)},_0x5171f0=[_0x2366cd(0x110),'jp01',_0x2366cd(0x125),_0x2366cd(0x142),'ap03','dev-us01',_0x2366cd(0x11e),_0x2366cd(0x124),'stg-jp01','stg-ap03'];for(const _0x289a44 of _0x5171f0){const _0x2b4555=getAPIKey(_0x289a44);_0x2b4555&&(_0x2be9e4[_0x2366cd(0x13c)][_0x289a44]=_0x2b4555);}return _0x2be9e4;}