@treasuredata/tdx 0.4.6 → 0.5.0

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 (116) hide show
  1. package/README.md +0 -4
  2. package/dist/build-info.json +2 -2
  3. package/dist/cli.js +1 -1
  4. package/dist/cli.js.map +1 -1
  5. package/dist/client/cdp-api-client.js +1 -1
  6. package/dist/client/engage-api-client.js +1 -1
  7. package/dist/client/http-client.js +1 -1
  8. package/dist/client/llm-api-client.js +1 -1
  9. package/dist/client/rate-limiter.js +1 -1
  10. package/dist/client/td-api-client.js +1 -1
  11. package/dist/client/trino-api-client.js +1 -1
  12. package/dist/client/workflow-client.js +1 -1
  13. package/dist/commands/activations.js +1 -1
  14. package/dist/commands/api-command.js +1 -1
  15. package/dist/commands/auth-command.js +1 -1
  16. package/dist/commands/chat-command.js +1 -1
  17. package/dist/commands/claude-command.d.ts +1 -1
  18. package/dist/commands/claude-command.d.ts.map +1 -1
  19. package/dist/commands/claude-command.js +1 -1
  20. package/dist/commands/claude-command.js.map +1 -1
  21. package/dist/commands/claude-statusline-command.d.ts +23 -0
  22. package/dist/commands/claude-statusline-command.d.ts.map +1 -0
  23. package/dist/commands/claude-statusline-command.js +1 -0
  24. package/dist/commands/claude-statusline-command.js.map +1 -0
  25. package/dist/commands/claude-usage-command.d.ts +22 -0
  26. package/dist/commands/claude-usage-command.d.ts.map +1 -0
  27. package/dist/commands/claude-usage-command.js +1 -0
  28. package/dist/commands/claude-usage-command.js.map +1 -0
  29. package/dist/commands/command.js +1 -1
  30. package/dist/commands/context-command.js +1 -1
  31. package/dist/commands/databases.js +1 -1
  32. package/dist/commands/describe.js +1 -1
  33. package/dist/commands/engage-command.js +1 -1
  34. package/dist/commands/job-command.js +1 -1
  35. package/dist/commands/llm-command.js +1 -1
  36. package/dist/commands/llm-proxy.js +1 -1
  37. package/dist/commands/parent-segment-command.js +1 -1
  38. package/dist/commands/profiles-command.js +1 -1
  39. package/dist/commands/query-command.js +1 -1
  40. package/dist/commands/segment-command.js +1 -1
  41. package/dist/commands/segment-create-command.js +1 -1
  42. package/dist/commands/segment-fields-command.js +1 -1
  43. package/dist/commands/segment-pwd-command.js +1 -1
  44. package/dist/commands/segment-update-command.js +1 -1
  45. package/dist/commands/segment-use-command.js +1 -1
  46. package/dist/commands/segments.js +1 -1
  47. package/dist/commands/show.js +1 -1
  48. package/dist/commands/tables.js +1 -1
  49. package/dist/commands/use-command.js +1 -1
  50. package/dist/commands/workflow-command.js +1 -1
  51. package/dist/core/auth.js +1 -1
  52. package/dist/core/config.js +1 -1
  53. package/dist/core/credential-cache.js +1 -1
  54. package/dist/core/global-context.d.ts +1 -0
  55. package/dist/core/global-context.d.ts.map +1 -1
  56. package/dist/core/global-context.js +1 -1
  57. package/dist/core/global-context.js.map +1 -1
  58. package/dist/core/keychain.js +1 -1
  59. package/dist/core/profile.js +1 -1
  60. package/dist/core/project-config.js +1 -1
  61. package/dist/core/session.js +1 -1
  62. package/dist/index.js +1 -1
  63. package/dist/proxy/anthropic-adapter.js +1 -1
  64. package/dist/proxy/server.d.ts.map +1 -1
  65. package/dist/proxy/server.js +1 -1
  66. package/dist/proxy/server.js.map +1 -1
  67. package/dist/proxy/session-cache.js +1 -1
  68. package/dist/sdk/api.js +1 -1
  69. package/dist/sdk/engage.js +1 -1
  70. package/dist/sdk/errors.js +1 -1
  71. package/dist/sdk/index.d.ts +10 -0
  72. package/dist/sdk/index.d.ts.map +1 -1
  73. package/dist/sdk/index.js +1 -1
  74. package/dist/sdk/index.js.map +1 -1
  75. package/dist/sdk/job.js +1 -1
  76. package/dist/sdk/llm.js +1 -1
  77. package/dist/sdk/query.js +1 -1
  78. package/dist/sdk/segment.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/chat-cache.js +1 -1
  84. package/dist/utils/claude-usage-tracker.d.ts +124 -0
  85. package/dist/utils/claude-usage-tracker.d.ts.map +1 -0
  86. package/dist/utils/claude-usage-tracker.js +1 -0
  87. package/dist/utils/claude-usage-tracker.js.map +1 -0
  88. package/dist/utils/colors.js +1 -1
  89. package/dist/utils/command-output.js +1 -1
  90. package/dist/utils/constants.js +1 -1
  91. package/dist/utils/file-permissions.js +1 -1
  92. package/dist/utils/format-detector.js +1 -1
  93. package/dist/utils/formatters.js +1 -1
  94. package/dist/utils/json-loader.js +1 -1
  95. package/dist/utils/llm-backup-utils.js +1 -1
  96. package/dist/utils/model-aliases.js +1 -1
  97. package/dist/utils/model-factors.d.ts +52 -0
  98. package/dist/utils/model-factors.d.ts.map +1 -0
  99. package/dist/utils/model-factors.js +1 -0
  100. package/dist/utils/model-factors.js.map +1 -0
  101. package/dist/utils/option-validation.js +1 -1
  102. package/dist/utils/port.js +1 -1
  103. package/dist/utils/process.js +1 -1
  104. package/dist/utils/prompt.js +1 -1
  105. package/dist/utils/segment-path-parser.js +1 -1
  106. package/dist/utils/segment-ref-parser.js +1 -1
  107. package/dist/utils/spinner.js +1 -1
  108. package/dist/utils/sql-parser.js +1 -1
  109. package/dist/utils/sse-parser.js +1 -1
  110. package/dist/utils/string-utils.js +1 -1
  111. package/dist/utils/table-ref-parser.js +1 -1
  112. package/dist/utils/tdx-logger.js +1 -1
  113. package/dist/utils/tree-formatter.js +1 -1
  114. package/dist/utils/version-check.js +1 -1
  115. package/dist/utils/workflow-utils.js +1 -1
  116. package/package.json +6 -6
@@ -1 +1 @@
1
- const a29_0x49413e=a29_0xb9dc;(function(_0x3745c4,_0x102cd9){const _0x1f75f7=a29_0xb9dc,_0x2cfda4=_0x3745c4();while(!![]){try{const _0x9f4190=parseInt(_0x1f75f7(0x18d))/0x1*(parseInt(_0x1f75f7(0x193))/0x2)+-parseInt(_0x1f75f7(0x191))/0x3+-parseInt(_0x1f75f7(0x1b7))/0x4+-parseInt(_0x1f75f7(0x1b9))/0x5*(-parseInt(_0x1f75f7(0x18f))/0x6)+parseInt(_0x1f75f7(0x190))/0x7*(parseInt(_0x1f75f7(0x19e))/0x8)+-parseInt(_0x1f75f7(0x1a3))/0x9*(-parseInt(_0x1f75f7(0x18e))/0xa)+-parseInt(_0x1f75f7(0x196))/0xb;if(_0x9f4190===_0x102cd9)break;else _0x2cfda4['push'](_0x2cfda4['shift']());}catch(_0x4c7fe7){_0x2cfda4['push'](_0x2cfda4['shift']());}}}(a29_0x1301,0xcfd15));import{BaseCommand}from'./command.js';function a29_0x1301(){const _0x1d9799=['39714GcrSKd','7fupAJS','3488319dqaCag','segment','177358aPGjIp','name','\x20\x20\x20Path:\x20','7927260dSfosU','Parent\x20ID:\x20','Error:\x20Cannot\x20update\x20','\x20\x20tdx\x20segment\x20update\x20\x22My\x20Audience/High\x20Value\x22\x20--description\x20\x22...\x22','Resolving\x20folder\x20\x27','length','resolvePathToResource','Segment\x20ID\x20missing\x20from\x20resolved\x20path','3997048pgNwJN','type','verbose','folder','.\x20Only\x20child\x20segments\x20can\x20be\x20updated.','3942ifCAPD','Use:\x20tdx\x20segment\x20update\x20<path_to_segment>\x20[options]','rule','includes','resolveFolderId','Resolved\x20type:\x20','parentId','\x20\x20tdx\x20segment\x20update\x20\x22High\x20Value\x22\x20--rule\x20\x27...\x27\x20\x20#\x20Relative\x20to\x20context','INTERNAL','Update\x20existing\x20child\x20segment','segmentName','segmentPath','ruleFile','Usage:\x20tdx\x20segment\x20update\x20<path>\x20[options]','kind','✔\x20Updated\x20segment\x20\x27','data','Resolved\x20folder\x20ID:\x20','Error:\x20Segment\x20path\x20or\x20name\x20is\x20required','description','2577004zatifD','error','665BfuRkd','Updating\x20segment\x20\x27','segmentId','\x27...','Examples:','updateSegmentById','19VkIdPo','7170bJRHCI'];a29_0x1301=function(){return _0x1d9799;};return a29_0x1301();}function a29_0xb9dc(_0x5c4c61,_0x1cb9e7){const _0x130184=a29_0x1301();return a29_0xb9dc=function(_0xb9dcaa,_0x1a2438){_0xb9dcaa=_0xb9dcaa-0x18d;let _0x271391=_0x130184[_0xb9dcaa];return _0x271391;},a29_0xb9dc(_0x5c4c61,_0x1cb9e7);}import{handleSDKOutput}from'../utils/command-output.js';import{withSpinner}from'../utils/spinner.js';import{loadJSONFromOptions}from'../utils/json-loader.js';import{SDKError,ErrorCode}from'../sdk/index.js';export class SegmentUpdateCommand extends BaseCommand{[a29_0x49413e(0x194)]='segment:update';['description']=a29_0x49413e(0x1ac);async['execute'](_0x5d35fe){const _0x1e056f=a29_0x49413e,{options:_0x44441b,args:_0x14ffe8,tdx:_0x49f6a3}=_0x5d35fe,_0x593835=_0x44441b;if(_0x14ffe8[_0x1e056f(0x19b)]===0x0)return console[_0x1e056f(0x1b8)](_0x1e056f(0x1b5)),console[_0x1e056f(0x1b8)](_0x1e056f(0x1b0)),console[_0x1e056f(0x1b8)](_0x1e056f(0x1bd)),console[_0x1e056f(0x1b8)](_0x1e056f(0x199)),console[_0x1e056f(0x1b8)](_0x1e056f(0x1aa)),0x1;const _0x849b93=_0x14ffe8[0x0],_0x38131f=_0x44441b[_0x1e056f(0x1ae)];let _0x2b21a1=_0x849b93;_0x38131f&&!_0x849b93[_0x1e056f(0x1a6)]('/')&&(_0x2b21a1=_0x38131f+'/'+_0x849b93,_0x593835[_0x1e056f(0x1a0)]&&console['error']('Resolved\x20relative\x20path\x20to:\x20'+_0x2b21a1));const _0x31f294=await withSpinner('Resolving\x20path\x20\x27'+_0x2b21a1+_0x1e056f(0x1bc),()=>_0x49f6a3[_0x1e056f(0x192)][_0x1e056f(0x19c)](_0x2b21a1),{'verbose':_0x593835['verbose']}),_0x3ab269=_0x31f294[_0x1e056f(0x1b3)];_0x593835[_0x1e056f(0x1a0)]&&console['error'](_0x1e056f(0x1a8)+_0x3ab269[_0x1e056f(0x19f)]);if(_0x3ab269['type']!==_0x1e056f(0x192))return console[_0x1e056f(0x1b8)](_0x1e056f(0x198)+_0x3ab269['type']+_0x1e056f(0x1a2)),console[_0x1e056f(0x1b8)](_0x1e056f(0x1a4)),0x1;if(!_0x3ab269[_0x1e056f(0x1bb)])throw new SDKError(ErrorCode[_0x1e056f(0x1ab)],_0x1e056f(0x19d));const _0x54c37d=_0x3ab269[_0x1e056f(0x1a9)],_0x442160=_0x3ab269[_0x1e056f(0x1bb)];_0x593835[_0x1e056f(0x1a0)]&&(console[_0x1e056f(0x1b8)](_0x1e056f(0x197)+_0x54c37d),console[_0x1e056f(0x1b8)]('Segment\x20ID:\x20'+_0x442160));let _0xc5d3e;if(_0x593835[_0x1e056f(0x1a1)]){const _0x54579e=_0x593835[_0x1e056f(0x1a1)],_0x2961fb=await withSpinner(_0x1e056f(0x19a)+_0x54579e+_0x1e056f(0x1bc),()=>_0x49f6a3[_0x1e056f(0x192)][_0x1e056f(0x1a7)](_0x54c37d,_0x54579e),{'verbose':_0x593835[_0x1e056f(0x1a0)]});_0xc5d3e=parseInt(_0x2961fb['data'],0xa),_0x593835[_0x1e056f(0x1a0)]&&console[_0x1e056f(0x1b8)](_0x1e056f(0x1b4)+_0xc5d3e);}const _0x148ee8=await loadJSONFromOptions(_0x593835[_0x1e056f(0x1a5)],_0x593835[_0x1e056f(0x1af)]),_0x1c982d={'name':_0x593835[_0x1e056f(0x194)],'description':_0x593835[_0x1e056f(0x1b6)],'rule':_0x148ee8,'kind':_0x593835[_0x1e056f(0x1b1)]!==undefined?parseInt(_0x593835[_0x1e056f(0x1b1)],0xa):undefined,'segmentFolderId':_0xc5d3e},_0xc441bd=await withSpinner(_0x1e056f(0x1ba)+_0x3ab269[_0x1e056f(0x1ad)]+_0x1e056f(0x1bc),()=>_0x49f6a3[_0x1e056f(0x192)][_0x1e056f(0x1be)](_0x54c37d,_0x442160,_0x1c982d),{'verbose':_0x593835[_0x1e056f(0x1a0)]}),_0x4de48f=_0xc441bd[_0x1e056f(0x1b3)];return console[_0x1e056f(0x1b8)](_0x1e056f(0x1b2)+_0x4de48f[_0x1e056f(0x194)]+'\x27'),_0x2b21a1!==_0x849b93&&console[_0x1e056f(0x1b8)](_0x1e056f(0x195)+_0x2b21a1),await handleSDKOutput([_0x4de48f],_0x593835),0x0;}}
1
+ const a31_0x57de1a=a31_0x4f17;(function(_0x369a68,_0x366d73){const _0x5176f4=a31_0x4f17,_0x69c80d=_0x369a68();while(!![]){try{const _0xac8a32=-parseInt(_0x5176f4(0x7f))/0x1*(parseInt(_0x5176f4(0x99))/0x2)+parseInt(_0x5176f4(0x85))/0x3+-parseInt(_0x5176f4(0x8d))/0x4+-parseInt(_0x5176f4(0x9f))/0x5*(-parseInt(_0x5176f4(0x8a))/0x6)+-parseInt(_0x5176f4(0x81))/0x7+-parseInt(_0x5176f4(0x93))/0x8*(-parseInt(_0x5176f4(0x92))/0x9)+parseInt(_0x5176f4(0x95))/0xa;if(_0xac8a32===_0x366d73)break;else _0x69c80d['push'](_0x69c80d['shift']());}catch(_0x2d7e80){_0x69c80d['push'](_0x69c80d['shift']());}}}(a31_0x2a86,0x81f4e));import{BaseCommand}from'./command.js';import{handleSDKOutput}from'../utils/command-output.js';function a31_0x2a86(){const _0x4cd8ed=['.\x20Only\x20child\x20segments\x20can\x20be\x20updated.','\x27...','segmentId','2893420nqALOI','Segment\x20ID:\x20','name','ruleFile','segmentName','✔\x20Updated\x20segment\x20\x27','Updating\x20segment\x20\x27','includes','Resolving\x20path\x20\x27','updateSegmentById','type','verbose','117709GCBXyG','Resolved\x20folder\x20ID:\x20','5841409yhLzyG','Resolving\x20folder\x20\x27','resolveFolderId','folder','593064mOQyEj','Segment\x20ID\x20missing\x20from\x20resolved\x20path','Examples:','parentId','Error:\x20Segment\x20path\x20or\x20name\x20is\x20required','6reZGiR','resolvePathToResource','Resolved\x20type:\x20','433556LIwVWi','segment','kind','Parent\x20ID:\x20','error','4058217uINXHM','16gPOHvl','execute','3855250RUvTOc','rule','\x20\x20tdx\x20segment\x20update\x20\x22High\x20Value\x22\x20--rule\x20\x27...\x27\x20\x20#\x20Relative\x20to\x20context','description','10lQggBD','Use:\x20tdx\x20segment\x20update\x20<path_to_segment>\x20[options]','length'];a31_0x2a86=function(){return _0x4cd8ed;};return a31_0x2a86();}import{withSpinner}from'../utils/spinner.js';function a31_0x4f17(_0x236c0d,_0x1defcf){const _0x2a8639=a31_0x2a86();return a31_0x4f17=function(_0x4f17b8,_0x2358b6){_0x4f17b8=_0x4f17b8-0x7c;let _0x54d7a1=_0x2a8639[_0x4f17b8];return _0x54d7a1;},a31_0x4f17(_0x236c0d,_0x1defcf);}import{loadJSONFromOptions}from'../utils/json-loader.js';import{SDKError,ErrorCode}from'../sdk/index.js';export class SegmentUpdateCommand extends BaseCommand{['name']='segment:update';['description']='Update\x20existing\x20child\x20segment';async[a31_0x57de1a(0x94)](_0x50a668){const _0x3875e5=a31_0x57de1a,{options:_0x44db19,args:_0x5589a8,tdx:_0x3a6e6a}=_0x50a668,_0x1bf2ca=_0x44db19;if(_0x5589a8[_0x3875e5(0x9b)]===0x0)return console[_0x3875e5(0x91)](_0x3875e5(0x89)),console[_0x3875e5(0x91)]('Usage:\x20tdx\x20segment\x20update\x20<path>\x20[options]'),console[_0x3875e5(0x91)](_0x3875e5(0x87)),console['error']('\x20\x20tdx\x20segment\x20update\x20\x22My\x20Audience/High\x20Value\x22\x20--description\x20\x22...\x22'),console[_0x3875e5(0x91)](_0x3875e5(0x97)),0x1;const _0x3450c8=_0x5589a8[0x0],_0x5acff9=_0x44db19['segmentPath'];let _0x4f2fb5=_0x3450c8;_0x5acff9&&!_0x3450c8[_0x3875e5(0xa6)]('/')&&(_0x4f2fb5=_0x5acff9+'/'+_0x3450c8,_0x1bf2ca['verbose']&&console[_0x3875e5(0x91)]('Resolved\x20relative\x20path\x20to:\x20'+_0x4f2fb5));const _0x35afa3=await withSpinner(_0x3875e5(0xa7)+_0x4f2fb5+_0x3875e5(0x9d),()=>_0x3a6e6a[_0x3875e5(0x8e)][_0x3875e5(0x8b)](_0x4f2fb5),{'verbose':_0x1bf2ca[_0x3875e5(0x7e)]}),_0x6c6a92=_0x35afa3['data'];_0x1bf2ca[_0x3875e5(0x7e)]&&console[_0x3875e5(0x91)](_0x3875e5(0x8c)+_0x6c6a92[_0x3875e5(0x7d)]);if(_0x6c6a92[_0x3875e5(0x7d)]!==_0x3875e5(0x8e))return console['error']('Error:\x20Cannot\x20update\x20'+_0x6c6a92[_0x3875e5(0x7d)]+_0x3875e5(0x9c)),console[_0x3875e5(0x91)](_0x3875e5(0x9a)),0x1;if(!_0x6c6a92[_0x3875e5(0x9e)])throw new SDKError(ErrorCode['INTERNAL'],_0x3875e5(0x86));const _0x386e12=_0x6c6a92[_0x3875e5(0x88)],_0x1c04d0=_0x6c6a92[_0x3875e5(0x9e)];_0x1bf2ca[_0x3875e5(0x7e)]&&(console['error'](_0x3875e5(0x90)+_0x386e12),console[_0x3875e5(0x91)](_0x3875e5(0xa0)+_0x1c04d0));let _0x18eb8f;if(_0x1bf2ca[_0x3875e5(0x84)]){const _0x33ea65=_0x1bf2ca[_0x3875e5(0x84)],_0x81e871=await withSpinner(_0x3875e5(0x82)+_0x33ea65+'\x27...',()=>_0x3a6e6a[_0x3875e5(0x8e)][_0x3875e5(0x83)](_0x386e12,_0x33ea65),{'verbose':_0x1bf2ca[_0x3875e5(0x7e)]});_0x18eb8f=parseInt(_0x81e871['data'],0xa),_0x1bf2ca[_0x3875e5(0x7e)]&&console[_0x3875e5(0x91)](_0x3875e5(0x80)+_0x18eb8f);}const _0x2deabd=await loadJSONFromOptions(_0x1bf2ca[_0x3875e5(0x96)],_0x1bf2ca[_0x3875e5(0xa2)]),_0x29ef7e={'name':_0x1bf2ca[_0x3875e5(0xa1)],'description':_0x1bf2ca[_0x3875e5(0x98)],'rule':_0x2deabd,'kind':_0x1bf2ca[_0x3875e5(0x8f)]!==undefined?parseInt(_0x1bf2ca[_0x3875e5(0x8f)],0xa):undefined,'segmentFolderId':_0x18eb8f},_0x465760=await withSpinner(_0x3875e5(0xa5)+_0x6c6a92[_0x3875e5(0xa3)]+_0x3875e5(0x9d),()=>_0x3a6e6a[_0x3875e5(0x8e)][_0x3875e5(0x7c)](_0x386e12,_0x1c04d0,_0x29ef7e),{'verbose':_0x1bf2ca[_0x3875e5(0x7e)]}),_0x3c2ceb=_0x465760['data'];return console[_0x3875e5(0x91)](_0x3875e5(0xa4)+_0x3c2ceb[_0x3875e5(0xa1)]+'\x27'),_0x4f2fb5!==_0x3450c8&&console[_0x3875e5(0x91)]('\x20\x20\x20Path:\x20'+_0x4f2fb5),await handleSDKOutput([_0x3c2ceb],_0x1bf2ca),0x0;}}
@@ -1 +1 @@
1
- const a30_0x4c5c1c=a30_0xc054;function a30_0x2564(){const _0x517be2=['Examples:','Context\x20cleared.\x20Back\x20to\x20root.','Error:\x20Path\x20is\x20required','Usage:\x20tdx\x20segment\x20use\x20<path>','12IRIMnv','Error:\x20Cannot\x20set\x20context\x20to\x20a\x20segment.','Resolving\x20path\x20\x27','segment','log','site','join','Use\x20\x22tdx\x20segment\x20pwd\x22\x20to\x20show\x20current\x20context','\x20\x20tdx\x20segment\x20use\x20/\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Clear\x20context','parentId','350553rXftbG','Use\x20an\x20absolute\x20path\x20or\x20set\x20context\x20with:\x20tdx\x20segment\x20use\x20<parent_name>','\x27...','isAbsolute','209055DkfYDp','250rOjMro','folderId','8069397zKvwEu','\x20\x20tdx\x20segment\x20use\x20\x22My\x20Audience\x22','Error:\x20No\x20context\x20set.\x20Cannot\x20use\x20relative\x20path.','verbose','length','8JVBilp','84lpZssL','Context\x20can\x20only\x20be\x20set\x20to\x20a\x20parent\x20segment\x20or\x20folder.','Context\x20set\x20to:\x20','\x20\x20tdx\x20segment\x20use\x20\x22My\x20Audience/Marketing\x22','execute','fullPath','Parent\x20ID:\x20','resolvePathToResource','segments','description','type','Target\x20path:\x20','parentName','Resolved\x20path\x20type:\x20','1963750cavnKy','2696968rwNCQU','2532194juVTdR','249912xQCVUY','Set\x20current\x20segment/folder\x20context\x20for\x20navigation','Site:\x20','segmentPath','error','data','split','Use\x20\x22tdx\x20segments\x22\x20to\x20list\x20contents\x20in\x20this\x20context','Use:\x20tdx\x20segment\x20use\x20','1BBacCX'];a30_0x2564=function(){return _0x517be2;};return a30_0x2564();}(function(_0x3780f8,_0x2ad34a){const _0x141da0=a30_0xc054,_0x2988d2=_0x3780f8();while(!![]){try{const _0x51f337=-parseInt(_0x141da0(0x168))/0x1*(-parseInt(_0x141da0(0x15e))/0x2)+-parseInt(_0x141da0(0x141))/0x3+parseInt(_0x141da0(0x15d))/0x4+-parseInt(_0x141da0(0x15c))/0x5*(parseInt(_0x141da0(0x137))/0x6)+parseInt(_0x141da0(0x148))/0x7*(-parseInt(_0x141da0(0x14d))/0x8)+-parseInt(_0x141da0(0x15f))/0x9*(-parseInt(_0x141da0(0x146))/0xa)+-parseInt(_0x141da0(0x145))/0xb*(-parseInt(_0x141da0(0x14e))/0xc);if(_0x51f337===_0x2ad34a)break;else _0x2988d2['push'](_0x2988d2['shift']());}catch(_0x8b780){_0x2988d2['push'](_0x2988d2['shift']());}}}(a30_0x2564,0xadf04));function a30_0xc054(_0x360a71,_0x5ef088){const _0x256463=a30_0x2564();return a30_0xc054=function(_0xc0543e,_0x97bfb3){_0xc0543e=_0xc0543e-0x136;let _0x4c8099=_0x256463[_0xc0543e];return _0x4c8099;},a30_0xc054(_0x360a71,_0x5ef088);}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';export class SegmentUseCommand extends BaseCommand{['name']='segment:use';[a30_0x4c5c1c(0x157)]=a30_0x4c5c1c(0x160);async[a30_0x4c5c1c(0x152)](_0x4280ce){const _0x528527=a30_0x4c5c1c,{options:_0x541c65,args:_0x387157,tdx:_0x76b8b3}=_0x4280ce;if(_0x387157['length']===0x0)return console['error'](_0x528527(0x16b)),console[_0x528527(0x163)](_0x528527(0x136)),console[_0x528527(0x163)](_0x528527(0x169)),console[_0x528527(0x163)](_0x528527(0x149)),console['error'](_0x528527(0x151)),console[_0x528527(0x163)](_0x528527(0x13f)),console['error']('\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 _0x2b2e91=_0x387157[0x0],_0x10d870=_0x541c65['session'];try{if(_0x2b2e91==='/')return saveSessionContext({'segment_path':undefined},_0x10d870),console[_0x528527(0x13b)](_0x528527(0x16a)),0x0;const _0x5d4086=_0x541c65[_0x528527(0x162)];let _0x553f0a=_0x2b2e91;const _0x150e08=parsePath(_0x2b2e91);if(!_0x150e08[_0x528527(0x144)]){if(!_0x5d4086)return console[_0x528527(0x163)](_0x528527(0x14a)),console[_0x528527(0x163)](_0x528527(0x142)),0x1;if(_0x2b2e91==='..'){const _0x353551=_0x5d4086[_0x528527(0x165)]('/')['slice'](0x0,-0x1)[_0x528527(0x13d)]('/');_0x553f0a=_0x353551||'/';}else _0x2b2e91==='.'?_0x553f0a=_0x5d4086:_0x553f0a=_0x5d4086+'/'+_0x2b2e91;_0x541c65[_0x528527(0x14b)]&&console['error']('Resolved\x20relative\x20path\x20to:\x20'+_0x553f0a);}if(_0x553f0a==='/'||_0x553f0a==='')return saveSessionContext({'segment_path':undefined},_0x10d870),console['log'](_0x528527(0x16a)),0x0;_0x553f0a=normalizePath(_0x553f0a);const _0x2b2cd1=parsePath(_0x553f0a)[_0x528527(0x156)];if(_0x2b2cd1[_0x528527(0x14c)]===0x0)return saveSessionContext({'segment_path':undefined},_0x10d870),console[_0x528527(0x13b)](_0x528527(0x16a)),0x0;_0x541c65[_0x528527(0x14b)]&&(console[_0x528527(0x163)](_0x528527(0x161)+_0x541c65[_0x528527(0x13c)]),console[_0x528527(0x163)](_0x528527(0x159)+_0x553f0a));const _0x5375bd=await withSpinner(_0x528527(0x139)+_0x553f0a+_0x528527(0x143),()=>_0x76b8b3[_0x528527(0x13a)][_0x528527(0x155)](_0x553f0a),{'verbose':_0x541c65[_0x528527(0x14b)]}),_0x221ff0=_0x5375bd[_0x528527(0x164)];_0x541c65[_0x528527(0x14b)]&&(console[_0x528527(0x163)](_0x528527(0x15b)+_0x221ff0[_0x528527(0x158)]),console[_0x528527(0x163)](_0x528527(0x154)+_0x221ff0[_0x528527(0x140)]),_0x221ff0[_0x528527(0x147)]&&console[_0x528527(0x163)]('Folder\x20ID:\x20'+_0x221ff0[_0x528527(0x147)]));if(_0x221ff0[_0x528527(0x158)]==='segment')return console['error'](_0x528527(0x138)),console[_0x528527(0x163)](_0x528527(0x14f)),console['error'](_0x528527(0x167)+_0x221ff0[_0x528527(0x15a)]+(_0x221ff0['folderPath']?'/'+_0x221ff0['folderPath'][_0x528527(0x13d)]('/'):'')),0x1;return saveSessionContext({'segment_path':_0x221ff0['fullPath'],'parent_segment':_0x221ff0[_0x528527(0x15a)]},_0x10d870),console[_0x528527(0x13b)](_0x528527(0x150)+_0x221ff0[_0x528527(0x153)]),_0x541c65[_0x528527(0x14b)]&&(console['error'](_0x528527(0x166)),console['error'](_0x528527(0x13e)),console[_0x528527(0x163)]('Use\x20\x22tdx\x20context\x22\x20to\x20see\x20all\x20context\x20parameters')),0x0;}catch(_0x42e149){throw _0x42e149;}}}
1
+ function a32_0x3804(_0x567e8f,_0x5eba8c){const _0x1e4aec=a32_0x1e4a();return a32_0x3804=function(_0x38049d,_0x106967){_0x38049d=_0x38049d-0x1c4;let _0x5113ed=_0x1e4aec[_0x38049d];return _0x5113ed;},a32_0x3804(_0x567e8f,_0x5eba8c);}function a32_0x1e4a(){const _0x4fb647=['10CHVRcb','folderId','Use:\x20tdx\x20segment\x20use\x20','Use\x20\x22tdx\x20segment\x20pwd\x22\x20to\x20show\x20current\x20context','segmentPath','length','Target\x20path:\x20','type','segment:use','Context\x20set\x20to:\x20','Resolved\x20path\x20type:\x20','segment','segments','slice','Resolving\x20path\x20\x27','Use\x20an\x20absolute\x20path\x20or\x20set\x20context\x20with:\x20tdx\x20segment\x20use\x20<parent_name>','Set\x20current\x20segment/folder\x20context\x20for\x20navigation','Context\x20can\x20only\x20be\x20set\x20to\x20a\x20parent\x20segment\x20or\x20folder.','1369902UTKVYg','session','parentId','\x20\x20tdx\x20segment\x20use\x20..\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Go\x20to\x20parent','isAbsolute','1670184lslQtu','error','parentName','join','data','fullPath','Usage:\x20tdx\x20segment\x20use\x20<path>','folderPath','site','log','4989447txiDZp','458620iGOGuJ','Use\x20\x22tdx\x20segments\x22\x20to\x20list\x20contents\x20in\x20this\x20context','1804105AJcFLA','Context\x20cleared.\x20Back\x20to\x20root.','Site:\x20','\x20\x20tdx\x20segment\x20use\x20/\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Clear\x20context','\x20\x20tdx\x20segment\x20use\x20\x22My\x20Audience/Marketing\x22','2053940NaMIWa','Parent\x20ID:\x20','Error:\x20Path\x20is\x20required','Folder\x20ID:\x20','\x20\x20tdx\x20segment\x20use\x20\x22My\x20Audience\x22','name','\x27...','3ICjVRV','resolvePathToResource','2tEqjWn','151483bjiLpR','Error:\x20No\x20context\x20set.\x20Cannot\x20use\x20relative\x20path.','verbose'];a32_0x1e4a=function(){return _0x4fb647;};return a32_0x1e4a();}const a32_0x19e94f=a32_0x3804;(function(_0x4a36a6,_0x331b7e){const _0x139bb4=a32_0x3804,_0x1a2ef8=_0x4a36a6();while(!![]){try{const _0x50f377=parseInt(_0x139bb4(0x1e6))/0x1*(parseInt(_0x139bb4(0x1e5))/0x2)+parseInt(_0x139bb4(0x1e3))/0x3*(parseInt(_0x139bb4(0x1d5))/0x4)+parseInt(_0x139bb4(0x1d7))/0x5+parseInt(_0x139bb4(0x1c5))/0x6+-parseInt(_0x139bb4(0x1dc))/0x7+parseInt(_0x139bb4(0x1ca))/0x8+-parseInt(_0x139bb4(0x1d4))/0x9*(parseInt(_0x139bb4(0x1e9))/0xa);if(_0x50f377===_0x331b7e)break;else _0x1a2ef8['push'](_0x1a2ef8['shift']());}catch(_0x8969ff){_0x1a2ef8['push'](_0x1a2ef8['shift']());}}}(a32_0x1e4a,0x34cb6));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';export class SegmentUseCommand extends BaseCommand{[a32_0x19e94f(0x1e1)]=a32_0x19e94f(0x1f1);['description']=a32_0x19e94f(0x1f9);async['execute'](_0x8b5bd7){const _0x38124d=a32_0x19e94f,{options:_0x5b8f70,args:_0x17987c,tdx:_0x4d83fe}=_0x8b5bd7;if(_0x17987c[_0x38124d(0x1ee)]===0x0)return console[_0x38124d(0x1cb)](_0x38124d(0x1de)),console['error'](_0x38124d(0x1d0)),console[_0x38124d(0x1cb)]('Examples:'),console[_0x38124d(0x1cb)](_0x38124d(0x1e0)),console[_0x38124d(0x1cb)](_0x38124d(0x1db)),console[_0x38124d(0x1cb)](_0x38124d(0x1da)),console[_0x38124d(0x1cb)](_0x38124d(0x1c8)),0x1;const _0x292fa3=_0x17987c[0x0],_0x4b502e=_0x5b8f70[_0x38124d(0x1c6)];try{if(_0x292fa3==='/')return saveSessionContext({'segment_path':undefined},_0x4b502e),console['log'](_0x38124d(0x1d8)),0x0;const _0x1d0c09=_0x5b8f70[_0x38124d(0x1ed)];let _0x7c1a90=_0x292fa3;const _0x22ac11=parsePath(_0x292fa3);if(!_0x22ac11[_0x38124d(0x1c9)]){if(!_0x1d0c09)return console[_0x38124d(0x1cb)](_0x38124d(0x1e7)),console[_0x38124d(0x1cb)](_0x38124d(0x1f8)),0x1;if(_0x292fa3==='..'){const _0x4bb992=_0x1d0c09['split']('/')[_0x38124d(0x1f6)](0x0,-0x1)[_0x38124d(0x1cd)]('/');_0x7c1a90=_0x4bb992||'/';}else _0x292fa3==='.'?_0x7c1a90=_0x1d0c09:_0x7c1a90=_0x1d0c09+'/'+_0x292fa3;_0x5b8f70[_0x38124d(0x1e8)]&&console['error']('Resolved\x20relative\x20path\x20to:\x20'+_0x7c1a90);}if(_0x7c1a90==='/'||_0x7c1a90==='')return saveSessionContext({'segment_path':undefined},_0x4b502e),console[_0x38124d(0x1d3)](_0x38124d(0x1d8)),0x0;_0x7c1a90=normalizePath(_0x7c1a90);const _0x2043cb=parsePath(_0x7c1a90)[_0x38124d(0x1f5)];if(_0x2043cb[_0x38124d(0x1ee)]===0x0)return saveSessionContext({'segment_path':undefined},_0x4b502e),console['log'](_0x38124d(0x1d8)),0x0;_0x5b8f70[_0x38124d(0x1e8)]&&(console[_0x38124d(0x1cb)](_0x38124d(0x1d9)+_0x5b8f70[_0x38124d(0x1d2)]),console[_0x38124d(0x1cb)](_0x38124d(0x1ef)+_0x7c1a90));const _0x5e7b67=await withSpinner(_0x38124d(0x1f7)+_0x7c1a90+_0x38124d(0x1e2),()=>_0x4d83fe[_0x38124d(0x1f4)][_0x38124d(0x1e4)](_0x7c1a90),{'verbose':_0x5b8f70[_0x38124d(0x1e8)]}),_0x33b094=_0x5e7b67[_0x38124d(0x1ce)];_0x5b8f70[_0x38124d(0x1e8)]&&(console[_0x38124d(0x1cb)](_0x38124d(0x1f3)+_0x33b094[_0x38124d(0x1f0)]),console[_0x38124d(0x1cb)](_0x38124d(0x1dd)+_0x33b094[_0x38124d(0x1c7)]),_0x33b094['folderId']&&console[_0x38124d(0x1cb)](_0x38124d(0x1df)+_0x33b094[_0x38124d(0x1ea)]));if(_0x33b094[_0x38124d(0x1f0)]===_0x38124d(0x1f4))return console[_0x38124d(0x1cb)]('Error:\x20Cannot\x20set\x20context\x20to\x20a\x20segment.'),console[_0x38124d(0x1cb)](_0x38124d(0x1c4)),console[_0x38124d(0x1cb)](_0x38124d(0x1eb)+_0x33b094[_0x38124d(0x1cc)]+(_0x33b094[_0x38124d(0x1d1)]?'/'+_0x33b094['folderPath'][_0x38124d(0x1cd)]('/'):'')),0x1;return saveSessionContext({'segment_path':_0x33b094[_0x38124d(0x1cf)],'parent_segment':_0x33b094[_0x38124d(0x1cc)]},_0x4b502e),console[_0x38124d(0x1d3)](_0x38124d(0x1f2)+_0x33b094[_0x38124d(0x1cf)]),_0x5b8f70['verbose']&&(console[_0x38124d(0x1cb)](_0x38124d(0x1d6)),console['error'](_0x38124d(0x1ec)),console[_0x38124d(0x1cb)]('Use\x20\x22tdx\x20context\x22\x20to\x20see\x20all\x20context\x20parameters')),0x0;}catch(_0x3b597c){throw _0x3b597c;}}}
@@ -1 +1 @@
1
- const a31_0x3a866c=a31_0x1929;(function(_0x1116be,_0x359379){const _0x36bb5a=a31_0x1929,_0x536e16=_0x1116be();while(!![]){try{const _0x567323=parseInt(_0x36bb5a(0xfd))/0x1*(-parseInt(_0x36bb5a(0xbb))/0x2)+-parseInt(_0x36bb5a(0xdb))/0x3+parseInt(_0x36bb5a(0xcc))/0x4+-parseInt(_0x36bb5a(0xe9))/0x5+-parseInt(_0x36bb5a(0xe2))/0x6*(parseInt(_0x36bb5a(0xe0))/0x7)+parseInt(_0x36bb5a(0xf6))/0x8*(-parseInt(_0x36bb5a(0xd0))/0x9)+parseInt(_0x36bb5a(0xbd))/0xa;if(_0x567323===_0x359379)break;else _0x536e16['push'](_0x536e16['shift']());}catch(_0x4f55d7){_0x536e16['push'](_0x536e16['shift']());}}}(a31_0x1b22,0x28214));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';function a31_0x1929(_0x2dc12e,_0x2d90e3){const _0x1b22b1=a31_0x1b22();return a31_0x1929=function(_0x192909,_0x4a2859){_0x192909=_0x192909-0xbb;let _0x1004f2=_0x1b22b1[_0x192909];return _0x1004f2;},a31_0x1929(_0x2dc12e,_0x2d90e3);}function a31_0x1b22(){const _0x576373=['Building\x20hierarchy\x20tree...','No\x20parent\x20segments\x20match\x20pattern:\x20','Listing\x20parent\x20segments\x20matching\x20\x27','Resolving\x20context\x20path\x20\x27','listUnified','site','json','population','👥\x20','jsonl','8glLpGs','parentId','name','[parent\x20segments]','replace','attributes','format','1jzIUli','✔\x20Found\x20','description','\x20and\x20','message','384586GjaoBw','map','8230670IDylnj','dim','\x20folder','length','sort','\x27...','log','error','verbose','Error:\x20','Current\x20context:\x20','(empty)','\x20top-level\x20items','\x20\x20Cause:\x20','\x20segment','895556oyZkzG','folder','execute','data','116856vwFdVd','includes','Listing\x20parent\x20segments...','✔\x20Built\x20tree\x20with\x20','\x20parent\x20segment','resolvePathToResource','listParentsWithPattern','segment','Folder\x20ID:\x20','Path/pattern\x20arg:\x20','\x20matching\x20\x27','912495OcahQo','segmentPath','recursive','List\x20parent\x20segments,\x20folders,\x20and\x20child\x20segments','Parent\x20ID:\x20','53753PRwnPJ','Listing\x20folders\x20and\x20segments...','186PMChwn','localeCompare','listRecursive','Error:\x20Pattern\x20matching\x20is\x20only\x20supported\x20at\x20root\x20level\x20(no\x20context\x20set).','cause','folderId','segments','675465atfsTP','listParents','filter'];a31_0x1b22=function(){return _0x576373;};return a31_0x1b22();}import{handleSDKOutput}from'../utils/command-output.js';import{withSpinner}from'../utils/spinner.js';import{formatFlatList,formatTree}from'../utils/tree-formatter.js';import{formatRows}from'../utils/formatters.js';import a31_0x265af8 from'chalk';export class SegmentsCommand extends BaseCommand{[a31_0x3a866c(0xf8)]=a31_0x3a866c(0xe8);[a31_0x3a866c(0xff)]=a31_0x3a866c(0xde);async[a31_0x3a866c(0xce)](_0x54d841){const _0x4d200a=a31_0x3a866c,{options:_0x4a89af,args:_0x221874}=_0x54d841,_0x28b278=_0x4a89af[_0x4d200a(0xdd)],_0x353207=_0x221874[0x0];try{const _0x4784ee=_0x4a89af[_0x4d200a(0xdc)];_0x4a89af[_0x4d200a(0xc5)]&&(console['error']('Site:\x20'+_0x4a89af[_0x4d200a(0xf1)]),console[_0x4d200a(0xc4)](_0x4d200a(0xc7)+(_0x4784ee||'/')),_0x353207&&console[_0x4d200a(0xc4)](_0x4d200a(0xd9)+_0x353207),_0x28b278&&console[_0x4d200a(0xc4)]('Recursive\x20mode:\x20enabled'));if(_0x353207){const _0xc53a5f=_0x353207[_0x4d200a(0xd1)]('*')||_0x353207['includes']('?');if(_0xc53a5f&&!_0x4784ee)return await this[_0x4d200a(0xd6)](_0x54d841,_0x353207);else return _0xc53a5f?(console[_0x4d200a(0xc4)](_0x4d200a(0xe5)),console['error']('Clear\x20context\x20with:\x20tdx\x20segment\x20use\x20/'),0x1):_0x28b278?await this[_0x4d200a(0xe4)](_0x54d841,_0x353207):await this[_0x4d200a(0xf0)](_0x54d841,_0x353207);}if(!_0x4784ee)return await this[_0x4d200a(0xea)](_0x54d841);return _0x28b278?await this[_0x4d200a(0xe4)](_0x54d841,_0x4784ee):await this[_0x4d200a(0xf0)](_0x54d841,_0x4784ee);}catch(_0x4babe4){if(_0x4babe4 instanceof SDKError)return console[_0x4d200a(0xc4)](_0x4d200a(0xc6)+_0x4babe4[_0x4d200a(0x101)]),_0x4babe4[_0x4d200a(0xe6)]&&console[_0x4d200a(0xc4)](_0x4d200a(0xca)+_0x4babe4[_0x4d200a(0xe6)]),0x1;throw _0x4babe4;}}async[a31_0x3a866c(0xd6)](_0x484135,_0x4dd5c0){const _0x37cf3d=a31_0x3a866c,{options:_0x154890,tdx:_0x41aa99}=_0x484135,_0x483a86=await withSpinner(_0x37cf3d(0xee)+_0x4dd5c0+_0x37cf3d(0xc2),()=>_0x41aa99['segment'][_0x37cf3d(0xea)](),{'verbose':_0x154890['verbose']}),_0x1599cf=_0x483a86[_0x37cf3d(0xcf)],_0x49d799=_0x4dd5c0[_0x37cf3d(0xfa)](/[.+^${}()|[\]\\]/g,'\x5c$&')[_0x37cf3d(0xfa)](/\*/g,'.*')[_0x37cf3d(0xfa)](/\?/g,'.'),_0x25371f=new RegExp('^'+_0x49d799+'$','i'),_0x55c40e=_0x1599cf[_0x37cf3d(0xeb)](_0x57e3be=>_0x25371f['test'](_0x57e3be[_0x37cf3d(0xfb)][_0x37cf3d(0xf8)]));console[_0x37cf3d(0xc4)](_0x37cf3d(0xfe)+_0x55c40e[_0x37cf3d(0xc0)]+'\x20parent\x20segment'+(_0x55c40e[_0x37cf3d(0xc0)]!==0x1?'s':'')+_0x37cf3d(0xda)+_0x4dd5c0+'\x27');if(_0x154890[_0x37cf3d(0xfc)]==='json'||_0x154890[_0x37cf3d(0xfc)]==='jsonl')await handleSDKOutput(_0x55c40e,_0x154890);else{if(_0x55c40e[_0x37cf3d(0xc0)]===0x0)console[_0x37cf3d(0xc3)](_0x37cf3d(0xed)+_0x4dd5c0);else{console[_0x37cf3d(0xc3)](_0x37cf3d(0xf9));for(const _0xef1282 of _0x55c40e){const _0x137fdd=_0xef1282['attributes'][_0x37cf3d(0xf3)]?a31_0x265af8[_0x37cf3d(0xbe)]('\x20('+formatRows(_0xef1282[_0x37cf3d(0xfb)]['population'])+')'):'';console[_0x37cf3d(0xc3)](_0x37cf3d(0xf4)+_0xef1282['attributes'][_0x37cf3d(0xf8)]+_0x137fdd);}}}return 0x0;}async[a31_0x3a866c(0xea)](_0x494688){const _0x1af95e=a31_0x3a866c,{options:_0x1d6e76,tdx:_0x1533b0}=_0x494688,_0x2cab75=await withSpinner(_0x1af95e(0xd2),()=>_0x1533b0[_0x1af95e(0xd7)][_0x1af95e(0xea)](),{'verbose':_0x1d6e76[_0x1af95e(0xc5)]}),_0x1f3d90=_0x2cab75[_0x1af95e(0xcf)];console[_0x1af95e(0xc4)](_0x1af95e(0xfe)+_0x1f3d90['length']+_0x1af95e(0xd4)+(_0x1f3d90['length']!==0x1?'s':''));if(_0x1d6e76['format']==='json'||_0x1d6e76[_0x1af95e(0xfc)]===_0x1af95e(0xf5))await handleSDKOutput(_0x1f3d90,_0x1d6e76);else{console[_0x1af95e(0xc3)](_0x1af95e(0xf9));for(const _0x2d0aa1 of _0x1f3d90){const _0x3d98bc=_0x2d0aa1[_0x1af95e(0xfb)][_0x1af95e(0xf3)]?a31_0x265af8[_0x1af95e(0xbe)]('\x20('+formatRows(_0x2d0aa1[_0x1af95e(0xfb)][_0x1af95e(0xf3)])+')'):'';console['log'](_0x1af95e(0xf4)+_0x2d0aa1['attributes'][_0x1af95e(0xf8)]+_0x3d98bc);}}return 0x0;}async['listUnified'](_0x432855,_0x1ec297){const _0x2fd924=a31_0x3a866c,{options:_0x2104e6,tdx:_0x5c8d49}=_0x432855,_0xd1ad28=await withSpinner(_0x2fd924(0xef)+_0x1ec297+_0x2fd924(0xc2),()=>_0x5c8d49[_0x2fd924(0xd7)][_0x2fd924(0xd5)](_0x1ec297),{'verbose':_0x2104e6['verbose']}),_0x6216af=_0xd1ad28[_0x2fd924(0xcf)];_0x2104e6[_0x2fd924(0xc5)]&&(console[_0x2fd924(0xc4)](_0x2fd924(0xdf)+_0x6216af[_0x2fd924(0xf7)]),_0x6216af[_0x2fd924(0xe7)]&&console[_0x2fd924(0xc4)]('Folder\x20ID:\x20'+_0x6216af['folderId']));const _0x1505fe=await withSpinner(_0x2fd924(0xe1),()=>_0x5c8d49[_0x2fd924(0xd7)]['listUnified'](_0x6216af[_0x2fd924(0xf7)],_0x6216af[_0x2fd924(0xe7)]),{'verbose':_0x2104e6['verbose']}),{folders:_0x2a2f6b,segments:_0x13ff6b}=_0x1505fe[_0x2fd924(0xcf)],_0x585b56=_0x2a2f6b[_0x2fd924(0xc0)]+_0x13ff6b['length'];console[_0x2fd924(0xc4)](_0x2fd924(0xfe)+_0x2a2f6b['length']+_0x2fd924(0xbf)+(_0x2a2f6b[_0x2fd924(0xc0)]!==0x1?'s':'')+_0x2fd924(0x100)+_0x13ff6b['length']+_0x2fd924(0xcb)+(_0x13ff6b['length']!==0x1?'s':''));if(_0x2104e6[_0x2fd924(0xfc)]===_0x2fd924(0xf2)||_0x2104e6[_0x2fd924(0xfc)]===_0x2fd924(0xf5)){const _0x1da45a=[..._0x2a2f6b['map'](_0x107841=>({..._0x107841,'type':_0x2fd924(0xcd)})),..._0x13ff6b[_0x2fd924(0xbc)](_0x9bd33=>({..._0x9bd33,'type':'segment'}))][_0x2fd924(0xc1)]((_0x2e7a76,_0x38c332)=>_0x2e7a76[_0x2fd924(0xf8)][_0x2fd924(0xe3)](_0x38c332[_0x2fd924(0xf8)]));await handleSDKOutput(_0x1da45a,_0x2104e6);}else{if(_0x585b56===0x0)console['log'](a31_0x265af8[_0x2fd924(0xbe)]('[/'+_0x1ec297+']')),console['log'](_0x2fd924(0xc8));else{console['log'](a31_0x265af8[_0x2fd924(0xbe)]('[/'+_0x1ec297+']'));const _0x4806bb=formatFlatList(_0x2a2f6b,_0x13ff6b,{'showMetadata':!![]});console[_0x2fd924(0xc3)](_0x4806bb);}}return 0x0;}async['listRecursive'](_0x4a6142,_0x584686){const _0x2cda3d=a31_0x3a866c,{options:_0xd28628,tdx:_0x2f41d3}=_0x4a6142,_0x52610e=await withSpinner(_0x2cda3d(0xef)+_0x584686+_0x2cda3d(0xc2),()=>_0x2f41d3[_0x2cda3d(0xd7)][_0x2cda3d(0xd5)](_0x584686),{'verbose':_0xd28628[_0x2cda3d(0xc5)]}),_0x3dd461=_0x52610e[_0x2cda3d(0xcf)];_0xd28628['verbose']&&(console['error'](_0x2cda3d(0xdf)+_0x3dd461['parentId']),_0x3dd461[_0x2cda3d(0xe7)]&&console[_0x2cda3d(0xc4)](_0x2cda3d(0xd8)+_0x3dd461[_0x2cda3d(0xe7)]));const _0x564fa9=_0xd28628['maxDepth']||0xa,_0x47d656=await withSpinner(_0x2cda3d(0xec),()=>_0x2f41d3[_0x2cda3d(0xd7)][_0x2cda3d(0xe4)](_0x3dd461[_0x2cda3d(0xf7)],_0x3dd461[_0x2cda3d(0xe7)],0x0,_0x564fa9),{'verbose':_0xd28628[_0x2cda3d(0xc5)]}),_0x3d6295=_0x47d656[_0x2cda3d(0xcf)];console['error'](_0x2cda3d(0xd3)+_0x3d6295[_0x2cda3d(0xc0)]+_0x2cda3d(0xc9));if(_0xd28628[_0x2cda3d(0xfc)]==='json'||_0xd28628['format']===_0x2cda3d(0xf5))await handleSDKOutput(_0x3d6295,_0xd28628);else{console[_0x2cda3d(0xc3)](a31_0x265af8['dim']('[/'+_0x584686+']'));const _0x5340f5=formatTree(_0x3d6295,{'showMetadata':!![]});console[_0x2cda3d(0xc3)](_0x5340f5);}return 0x0;}}
1
+ function a33_0x2c71(){const _0x4d1f99=['listParentsWithPattern','Parent\x20ID:\x20','data','6cEWsHX','jsonl','includes','389074QyoPgO','population','resolvePathToResource','Error:\x20Pattern\x20matching\x20is\x20only\x20supported\x20at\x20root\x20level\x20(no\x20context\x20set).','execute','\x20\x20Cause:\x20','name','maxDepth','\x20folder','Listing\x20folders\x20and\x20segments...','No\x20parent\x20segments\x20match\x20pattern:\x20','9648dNqGmi','localeCompare','✔\x20Found\x20','👥\x20','log','filter','Folder\x20ID:\x20','Error:\x20','recursive','557868IVJSEN','listRecursive','folder','length','[parent\x20segments]','695276XzJAym','1DRtqyv','Listing\x20parent\x20segments\x20matching\x20\x27','12931180vJfswp','\x20and\x20','Listing\x20parent\x20segments...','Path/pattern\x20arg:\x20','Resolving\x20context\x20path\x20\x27','Site:\x20','✔\x20Built\x20tree\x20with\x20','2007YzFWKB','2105135XJvkCB','message','parentId','Clear\x20context\x20with:\x20tdx\x20segment\x20use\x20/','folderId','format','cause','json','attributes','listParents','\x27...','test','\x20matching\x20\x27','\x20parent\x20segment','map','listUnified','Current\x20context:\x20','verbose','segments','description','replace','dim','site','\x5c$&','1318080UjspMl','segment','Building\x20hierarchy\x20tree...','error'];a33_0x2c71=function(){return _0x4d1f99;};return a33_0x2c71();}const a33_0x375287=a33_0x54d8;(function(_0x225559,_0x1008f7){const _0x4dc994=a33_0x54d8,_0x4a25b6=_0x225559();while(!![]){try{const _0x3f12ed=parseInt(_0x4dc994(0xe9))/0x1*(-parseInt(_0x4dc994(0xe8))/0x2)+-parseInt(_0x4dc994(0x129))/0x3+-parseInt(_0x4dc994(0x10b))/0x4+-parseInt(_0x4dc994(0xf3))/0x5+parseInt(_0x4dc994(0x112))/0x6*(-parseInt(_0x4dc994(0x115))/0x7)+-parseInt(_0x4dc994(0x120))/0x8*(-parseInt(_0x4dc994(0xf2))/0x9)+parseInt(_0x4dc994(0xeb))/0xa;if(_0x3f12ed===_0x1008f7)break;else _0x4a25b6['push'](_0x4a25b6['shift']());}catch(_0x3959d9){_0x4a25b6['push'](_0x4a25b6['shift']());}}}(a33_0x2c71,0x3647d));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleSDKOutput}from'../utils/command-output.js';import{withSpinner}from'../utils/spinner.js';import{formatFlatList,formatTree}from'../utils/tree-formatter.js';import{formatRows}from'../utils/formatters.js';import a33_0x890f77 from'chalk';function a33_0x54d8(_0x473280,_0x3b5bb1){const _0x2c7145=a33_0x2c71();return a33_0x54d8=function(_0x54d83b,_0x5c700d){_0x54d83b=_0x54d83b-0xe4;let _0x12bedb=_0x2c7145[_0x54d83b];return _0x12bedb;},a33_0x54d8(_0x473280,_0x3b5bb1);}export class SegmentsCommand extends BaseCommand{[a33_0x375287(0x11b)]=a33_0x375287(0x105);[a33_0x375287(0x106)]='List\x20parent\x20segments,\x20folders,\x20and\x20child\x20segments';async[a33_0x375287(0x119)](_0x231dea){const _0x41fab6=a33_0x375287,{options:_0x122d11,args:_0x3c7ae8}=_0x231dea,_0x274740=_0x122d11[_0x41fab6(0x128)],_0x446fb7=_0x3c7ae8[0x0];try{const _0x48cba0=_0x122d11['segmentPath'];_0x122d11[_0x41fab6(0x104)]&&(console[_0x41fab6(0x10e)](_0x41fab6(0xf0)+_0x122d11[_0x41fab6(0x109)]),console[_0x41fab6(0x10e)](_0x41fab6(0x103)+(_0x48cba0||'/')),_0x446fb7&&console[_0x41fab6(0x10e)](_0x41fab6(0xee)+_0x446fb7),_0x274740&&console[_0x41fab6(0x10e)]('Recursive\x20mode:\x20enabled'));if(_0x446fb7){const _0x10a39b=_0x446fb7['includes']('*')||_0x446fb7[_0x41fab6(0x114)]('?');if(_0x10a39b&&!_0x48cba0)return await this[_0x41fab6(0x10f)](_0x231dea,_0x446fb7);else return _0x10a39b?(console[_0x41fab6(0x10e)](_0x41fab6(0x118)),console['error'](_0x41fab6(0xf6)),0x1):_0x274740?await this['listRecursive'](_0x231dea,_0x446fb7):await this[_0x41fab6(0x102)](_0x231dea,_0x446fb7);}if(!_0x48cba0)return await this[_0x41fab6(0xfc)](_0x231dea);return _0x274740?await this[_0x41fab6(0xe4)](_0x231dea,_0x48cba0):await this[_0x41fab6(0x102)](_0x231dea,_0x48cba0);}catch(_0x3d098c){if(_0x3d098c instanceof SDKError)return console[_0x41fab6(0x10e)](_0x41fab6(0x127)+_0x3d098c[_0x41fab6(0xf4)]),_0x3d098c[_0x41fab6(0xf9)]&&console[_0x41fab6(0x10e)](_0x41fab6(0x11a)+_0x3d098c['cause']),0x1;throw _0x3d098c;}}async['listParentsWithPattern'](_0x1dbcbd,_0x5f1031){const _0xf68ad9=a33_0x375287,{options:_0x35f568,tdx:_0x310250}=_0x1dbcbd,_0x43f9de=await withSpinner(_0xf68ad9(0xea)+_0x5f1031+_0xf68ad9(0xfd),()=>_0x310250['segment'][_0xf68ad9(0xfc)](),{'verbose':_0x35f568[_0xf68ad9(0x104)]}),_0x355fa6=_0x43f9de[_0xf68ad9(0x111)],_0x284436=_0x5f1031[_0xf68ad9(0x107)](/[.+^${}()|[\]\\]/g,_0xf68ad9(0x10a))['replace'](/\*/g,'.*')[_0xf68ad9(0x107)](/\?/g,'.'),_0x4b56b1=new RegExp('^'+_0x284436+'$','i'),_0x5259a9=_0x355fa6[_0xf68ad9(0x125)](_0x43dfd4=>_0x4b56b1[_0xf68ad9(0xfe)](_0x43dfd4[_0xf68ad9(0xfb)][_0xf68ad9(0x11b)]));console['error']('✔\x20Found\x20'+_0x5259a9['length']+'\x20parent\x20segment'+(_0x5259a9[_0xf68ad9(0xe6)]!==0x1?'s':'')+_0xf68ad9(0xff)+_0x5f1031+'\x27');if(_0x35f568[_0xf68ad9(0xf8)]===_0xf68ad9(0xfa)||_0x35f568[_0xf68ad9(0xf8)]==='jsonl')await handleSDKOutput(_0x5259a9,_0x35f568);else{if(_0x5259a9[_0xf68ad9(0xe6)]===0x0)console[_0xf68ad9(0x124)](_0xf68ad9(0x11f)+_0x5f1031);else{console[_0xf68ad9(0x124)]('[parent\x20segments]');for(const _0x2a8010 of _0x5259a9){const _0xb488ab=_0x2a8010[_0xf68ad9(0xfb)][_0xf68ad9(0x116)]?a33_0x890f77[_0xf68ad9(0x108)]('\x20('+formatRows(_0x2a8010[_0xf68ad9(0xfb)][_0xf68ad9(0x116)])+')'):'';console[_0xf68ad9(0x124)](_0xf68ad9(0x123)+_0x2a8010[_0xf68ad9(0xfb)][_0xf68ad9(0x11b)]+_0xb488ab);}}}return 0x0;}async[a33_0x375287(0xfc)](_0x63002b){const _0x2830c5=a33_0x375287,{options:_0x27a0c2,tdx:_0xefe561}=_0x63002b,_0x7519e0=await withSpinner(_0x2830c5(0xed),()=>_0xefe561[_0x2830c5(0x10c)][_0x2830c5(0xfc)](),{'verbose':_0x27a0c2['verbose']}),_0x3bb367=_0x7519e0['data'];console[_0x2830c5(0x10e)](_0x2830c5(0x122)+_0x3bb367[_0x2830c5(0xe6)]+_0x2830c5(0x100)+(_0x3bb367[_0x2830c5(0xe6)]!==0x1?'s':''));if(_0x27a0c2[_0x2830c5(0xf8)]===_0x2830c5(0xfa)||_0x27a0c2[_0x2830c5(0xf8)]===_0x2830c5(0x113))await handleSDKOutput(_0x3bb367,_0x27a0c2);else{console[_0x2830c5(0x124)](_0x2830c5(0xe7));for(const _0x3cc942 of _0x3bb367){const _0x25127e=_0x3cc942[_0x2830c5(0xfb)][_0x2830c5(0x116)]?a33_0x890f77['dim']('\x20('+formatRows(_0x3cc942[_0x2830c5(0xfb)][_0x2830c5(0x116)])+')'):'';console[_0x2830c5(0x124)]('👥\x20'+_0x3cc942['attributes'][_0x2830c5(0x11b)]+_0x25127e);}}return 0x0;}async[a33_0x375287(0x102)](_0x3d35c3,_0x2c08e2){const _0x1fc851=a33_0x375287,{options:_0x82254d,tdx:_0x4dc833}=_0x3d35c3,_0x256e2d=await withSpinner('Resolving\x20context\x20path\x20\x27'+_0x2c08e2+_0x1fc851(0xfd),()=>_0x4dc833[_0x1fc851(0x10c)][_0x1fc851(0x117)](_0x2c08e2),{'verbose':_0x82254d['verbose']}),_0x4b6677=_0x256e2d['data'];_0x82254d['verbose']&&(console[_0x1fc851(0x10e)](_0x1fc851(0x110)+_0x4b6677['parentId']),_0x4b6677[_0x1fc851(0xf7)]&&console[_0x1fc851(0x10e)]('Folder\x20ID:\x20'+_0x4b6677[_0x1fc851(0xf7)]));const _0xa6b7e4=await withSpinner(_0x1fc851(0x11e),()=>_0x4dc833[_0x1fc851(0x10c)][_0x1fc851(0x102)](_0x4b6677[_0x1fc851(0xf5)],_0x4b6677[_0x1fc851(0xf7)]),{'verbose':_0x82254d['verbose']}),{folders:_0x3c20cc,segments:_0x53a84f}=_0xa6b7e4[_0x1fc851(0x111)],_0xc66c23=_0x3c20cc[_0x1fc851(0xe6)]+_0x53a84f['length'];console['error'](_0x1fc851(0x122)+_0x3c20cc[_0x1fc851(0xe6)]+_0x1fc851(0x11d)+(_0x3c20cc[_0x1fc851(0xe6)]!==0x1?'s':'')+_0x1fc851(0xec)+_0x53a84f[_0x1fc851(0xe6)]+'\x20segment'+(_0x53a84f[_0x1fc851(0xe6)]!==0x1?'s':''));if(_0x82254d[_0x1fc851(0xf8)]===_0x1fc851(0xfa)||_0x82254d[_0x1fc851(0xf8)]===_0x1fc851(0x113)){const _0x389576=[..._0x3c20cc[_0x1fc851(0x101)](_0x1c183b=>({..._0x1c183b,'type':_0x1fc851(0xe5)})),..._0x53a84f[_0x1fc851(0x101)](_0x396854=>({..._0x396854,'type':'segment'}))]['sort']((_0x39e36c,_0xfde7bd)=>_0x39e36c['name'][_0x1fc851(0x121)](_0xfde7bd[_0x1fc851(0x11b)]));await handleSDKOutput(_0x389576,_0x82254d);}else{if(_0xc66c23===0x0)console[_0x1fc851(0x124)](a33_0x890f77['dim']('[/'+_0x2c08e2+']')),console[_0x1fc851(0x124)]('(empty)');else{console['log'](a33_0x890f77['dim']('[/'+_0x2c08e2+']'));const _0x1e3d6d=formatFlatList(_0x3c20cc,_0x53a84f,{'showMetadata':!![]});console[_0x1fc851(0x124)](_0x1e3d6d);}}return 0x0;}async[a33_0x375287(0xe4)](_0x338125,_0x106831){const _0x464834=a33_0x375287,{options:_0xddb72d,tdx:_0x2ad819}=_0x338125,_0x13bbba=await withSpinner(_0x464834(0xef)+_0x106831+'\x27...',()=>_0x2ad819[_0x464834(0x10c)]['resolvePathToResource'](_0x106831),{'verbose':_0xddb72d['verbose']}),_0x3df995=_0x13bbba[_0x464834(0x111)];_0xddb72d[_0x464834(0x104)]&&(console[_0x464834(0x10e)](_0x464834(0x110)+_0x3df995[_0x464834(0xf5)]),_0x3df995['folderId']&&console[_0x464834(0x10e)](_0x464834(0x126)+_0x3df995[_0x464834(0xf7)]));const _0x168e17=_0xddb72d[_0x464834(0x11c)]||0xa,_0x3b8250=await withSpinner(_0x464834(0x10d),()=>_0x2ad819[_0x464834(0x10c)][_0x464834(0xe4)](_0x3df995[_0x464834(0xf5)],_0x3df995[_0x464834(0xf7)],0x0,_0x168e17),{'verbose':_0xddb72d[_0x464834(0x104)]}),_0x1cd18b=_0x3b8250['data'];console[_0x464834(0x10e)](_0x464834(0xf1)+_0x1cd18b[_0x464834(0xe6)]+'\x20top-level\x20items');if(_0xddb72d[_0x464834(0xf8)]===_0x464834(0xfa)||_0xddb72d[_0x464834(0xf8)]===_0x464834(0x113))await handleSDKOutput(_0x1cd18b,_0xddb72d);else{console[_0x464834(0x124)](a33_0x890f77[_0x464834(0x108)]('[/'+_0x106831+']'));const _0x226c42=formatTree(_0x1cd18b,{'showMetadata':!![]});console[_0x464834(0x124)](_0x226c42);}return 0x0;}}
@@ -1 +1 @@
1
- const a32_0x46eb0e=a32_0x1a4d;(function(_0x4efa2b,_0x1ad061){const _0x143bc6=a32_0x1a4d,_0x45cc20=_0x4efa2b();while(!![]){try{const _0x2dd0ee=-parseInt(_0x143bc6(0x12f))/0x1+-parseInt(_0x143bc6(0x148))/0x2*(-parseInt(_0x143bc6(0x137))/0x3)+parseInt(_0x143bc6(0x129))/0x4+-parseInt(_0x143bc6(0x13c))/0x5+parseInt(_0x143bc6(0x121))/0x6+parseInt(_0x143bc6(0x127))/0x7*(-parseInt(_0x143bc6(0x134))/0x8)+parseInt(_0x143bc6(0x12d))/0x9;if(_0x2dd0ee===_0x1ad061)break;else _0x45cc20['push'](_0x45cc20['shift']());}catch(_0x6bc262){_0x45cc20['push'](_0x45cc20['shift']());}}}(a32_0x5853,0x368be));import{BaseCommand}from'./command.js';function a32_0x1a4d(_0x40ad4f,_0x34cdad){const _0x5853c3=a32_0x5853();return a32_0x1a4d=function(_0x1a4d98,_0x26fba9){_0x1a4d98=_0x1a4d98-0x11f;let _0x990dd6=_0x5853c3[_0x1a4d98];return _0x990dd6;},a32_0x1a4d(_0x40ad4f,_0x34cdad);}import{SDKError}from'../sdk/index.js';function a32_0x5853(){const _0x8df7b2=['length','\x20\x20Cause:\x20','Limit:\x20','Querying\x20','name','query','\x20\x20\x20or:\x20tdx\x20show\x20<catalog.database.table>','34xNoMKv','table','Error:\x20','554472BjOmfk','error','Show\x20table\x20contents','\x20from\x20','✔\x20Query\x20successful\x20-\x200\x20rows\x20returned','showTable','1381562MptJlT','limit','860984LrtjuJ','validate','args','message','5442255rxqaHp','Usage:\x20tdx\x20show\x20<database.table>','104843CxHDlE','Table:\x20','\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--database\x20<database>','catalog','data','16wFkEfH','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','39909zzLbgP','verbose','site','✔\x20Retrieved\x20','Catalog:\x20','2077535eFkXEb','Site:\x20','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','...','database'];a32_0x5853=function(){return _0x8df7b2;};return a32_0x5853();}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{[a32_0x46eb0e(0x145)]='show';['description']=a32_0x46eb0e(0x123);async['execute'](_0x7c1b60){const _0x7a88f=a32_0x46eb0e;return this[_0x7a88f(0x126)](_0x7c1b60);}async[a32_0x46eb0e(0x126)](_0x17600a){const _0x5f0966=a32_0x46eb0e,{options:_0x428a1b,args:_0x2ece18,tdx:_0x2f3556}=_0x17600a;let _0x4e652e;try{_0x4e652e=parseTableReference(_0x2ece18[0x0]);const _0x5755a6=_0x428a1b[_0x5f0966(0x140)];!_0x4e652e[_0x5f0966(0x140)]&&_0x5755a6&&(_0x4e652e[_0x5f0966(0x140)]=_0x5755a6);const _0x3e02ac=validateTableDescribeReference(_0x4e652e);if(_0x3e02ac)return console[_0x5f0966(0x122)]('Error:\x20'+_0x3e02ac),console['error'](_0x5f0966(0x12e)),console[_0x5f0966(0x122)](_0x5f0966(0x147)),console[_0x5f0966(0x122)](_0x5f0966(0x131)),0x1;}catch(_0x1568a9){return console['error'](_0x5f0966(0x120)+_0x1568a9[_0x5f0966(0x12c)]),console[_0x5f0966(0x122)](_0x5f0966(0x12e)),console[_0x5f0966(0x122)](_0x5f0966(0x147)),console[_0x5f0966(0x122)](_0x5f0966(0x131)),0x1;}const _0x556c79=_0x4e652e[_0x5f0966(0x132)],_0x5cd72b=_0x4e652e[_0x5f0966(0x140)],_0x356965=_0x4e652e[_0x5f0966(0x11f)],_0x37d605=resolveLimit(_0x428a1b[_0x5f0966(0x128)],DEFAULT_DISPLAY_LIMIT);try{_0x428a1b['verbose']&&(console[_0x5f0966(0x122)](_0x5f0966(0x13d)+_0x428a1b[_0x5f0966(0x139)]),_0x556c79&&console['error'](_0x5f0966(0x13b)+_0x556c79),console[_0x5f0966(0x122)]('Database:\x20'+_0x5cd72b),console[_0x5f0966(0x122)](_0x5f0966(0x130)+_0x356965),console[_0x5f0966(0x122)](_0x5f0966(0x143)+_0x37d605));const _0xecfe7e=_0x556c79?_0x556c79+'.'+_0x5cd72b+'.'+_0x356965:_0x5cd72b+'.'+_0x356965,_0x4e9a61=await withSpinner(_0x5f0966(0x144)+_0xecfe7e+_0x5f0966(0x13f),()=>_0x2f3556[_0x5f0966(0x146)][_0x5f0966(0x126)](_0x5cd72b,_0x356965,_0x37d605,_0x556c79),{'verbose':_0x428a1b[_0x5f0966(0x138)]}),_0x27cff4=_0x4e9a61[_0x5f0966(0x133)],_0x49b7a9=_0x27cff4[_0x5f0966(0x133)];return _0x49b7a9['length']===0x0?console[_0x5f0966(0x122)](_0x5f0966(0x125)):console[_0x5f0966(0x122)](_0x5f0966(0x13a)+_0x49b7a9['length']+'\x20row'+(_0x49b7a9[_0x5f0966(0x141)]!==0x1?'s':'')+_0x5f0966(0x124)+_0xecfe7e),await handleSDKOutput(_0x49b7a9,_0x428a1b),0x0;}catch(_0x211af2){if(_0x211af2 instanceof SDKError)return console[_0x5f0966(0x122)]('Error:\x20'+_0x211af2[_0x5f0966(0x12c)]),_0x211af2['cause']&&console[_0x5f0966(0x122)](_0x5f0966(0x142)+_0x211af2[_0x5f0966(0x135)]),0x1;throw _0x211af2;}}[a32_0x46eb0e(0x12a)](_0x72e254){const _0x572837=a32_0x46eb0e;if(_0x72e254[_0x572837(0x12b)]['length']===0x0)return _0x572837(0x136);if(_0x72e254['args'][_0x572837(0x141)]>0x1)return _0x572837(0x13e);return undefined;}}
1
+ const a34_0x4ac922=a34_0x2bb3;(function(_0x2a6661,_0x142b97){const _0x300fac=a34_0x2bb3,_0x135700=_0x2a6661();while(!![]){try{const _0x54b5e6=-parseInt(_0x300fac(0x173))/0x1*(parseInt(_0x300fac(0x14c))/0x2)+-parseInt(_0x300fac(0x148))/0x3+-parseInt(_0x300fac(0x172))/0x4+parseInt(_0x300fac(0x149))/0x5*(-parseInt(_0x300fac(0x15a))/0x6)+-parseInt(_0x300fac(0x15f))/0x7*(-parseInt(_0x300fac(0x155))/0x8)+parseInt(_0x300fac(0x14e))/0x9+-parseInt(_0x300fac(0x158))/0xa*(-parseInt(_0x300fac(0x15d))/0xb);if(_0x54b5e6===_0x142b97)break;else _0x135700['push'](_0x135700['shift']());}catch(_0x348606){_0x135700['push'](_0x135700['shift']());}}}(a34_0x2015,0x351af));function a34_0x2015(){const _0x1ca1f9=['...','223298EIaUbo','Show\x20table\x20contents','1258812BJQzCr','show','description','Catalog:\x20','✔\x20Query\x20successful\x20-\x200\x20rows\x20returned','\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--database\x20<database>','cause','32ZMzxTH','validate','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','87490ilioCn','Error:\x20','2009634pzUfbB','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','Site:\x20','825xiyXFC','error','291872LoDTsy','message','Table:\x20','length','\x20\x20\x20or:\x20tdx\x20show\x20<catalog.database.table>','database','query','verbose','site','name','\x20\x20Cause:\x20','showTable','args','table','Database:\x20','data','\x20row','limit','Usage:\x20tdx\x20show\x20<database.table>','337580bNGmIN','1GDkSsa','642975deEVfd','5zRkxby','catalog'];a34_0x2015=function(){return _0x1ca1f9;};return a34_0x2015();}function a34_0x2bb3(_0x55e1d7,_0x30b495){const _0x20154f=a34_0x2015();return a34_0x2bb3=function(_0x2bb33e,_0x3d63c4){_0x2bb33e=_0x2bb33e-0x148;let _0x2ea764=_0x20154f[_0x2bb33e];return _0x2ea764;},a34_0x2bb3(_0x55e1d7,_0x30b495);}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{[a34_0x4ac922(0x168)]=a34_0x4ac922(0x14f);[a34_0x4ac922(0x150)]=a34_0x4ac922(0x14d);async['execute'](_0x4e3cff){const _0x2e1ce5=a34_0x4ac922;return this[_0x2e1ce5(0x16a)](_0x4e3cff);}async[a34_0x4ac922(0x16a)](_0x11cbac){const _0x53cefc=a34_0x4ac922,{options:_0xf3ef4e,args:_0x2c408e,tdx:_0x32ba68}=_0x11cbac;let _0x2c8cbb;try{_0x2c8cbb=parseTableReference(_0x2c408e[0x0]);const _0xd6d27b=_0xf3ef4e[_0x53cefc(0x164)];!_0x2c8cbb[_0x53cefc(0x164)]&&_0xd6d27b&&(_0x2c8cbb['database']=_0xd6d27b);const _0x3f7d39=validateTableDescribeReference(_0x2c8cbb);if(_0x3f7d39)return console[_0x53cefc(0x15e)](_0x53cefc(0x159)+_0x3f7d39),console[_0x53cefc(0x15e)](_0x53cefc(0x171)),console[_0x53cefc(0x15e)](_0x53cefc(0x163)),console[_0x53cefc(0x15e)](_0x53cefc(0x153)),0x1;}catch(_0x2c9a74){return console['error'](_0x53cefc(0x159)+_0x2c9a74['message']),console[_0x53cefc(0x15e)]('Usage:\x20tdx\x20show\x20<database.table>'),console[_0x53cefc(0x15e)](_0x53cefc(0x163)),console['error'](_0x53cefc(0x153)),0x1;}const _0x4d61bc=_0x2c8cbb[_0x53cefc(0x14a)],_0x5ef4bb=_0x2c8cbb[_0x53cefc(0x164)],_0x2b0579=_0x2c8cbb[_0x53cefc(0x16c)],_0x2b7087=resolveLimit(_0xf3ef4e[_0x53cefc(0x170)],DEFAULT_DISPLAY_LIMIT);try{_0xf3ef4e[_0x53cefc(0x166)]&&(console[_0x53cefc(0x15e)](_0x53cefc(0x15c)+_0xf3ef4e[_0x53cefc(0x167)]),_0x4d61bc&&console[_0x53cefc(0x15e)](_0x53cefc(0x151)+_0x4d61bc),console[_0x53cefc(0x15e)](_0x53cefc(0x16d)+_0x5ef4bb),console[_0x53cefc(0x15e)](_0x53cefc(0x161)+_0x2b0579),console[_0x53cefc(0x15e)]('Limit:\x20'+_0x2b7087));const _0x151c7f=_0x4d61bc?_0x4d61bc+'.'+_0x5ef4bb+'.'+_0x2b0579:_0x5ef4bb+'.'+_0x2b0579,_0x3df78a=await withSpinner('Querying\x20'+_0x151c7f+_0x53cefc(0x14b),()=>_0x32ba68[_0x53cefc(0x165)][_0x53cefc(0x16a)](_0x5ef4bb,_0x2b0579,_0x2b7087,_0x4d61bc),{'verbose':_0xf3ef4e[_0x53cefc(0x166)]}),_0x3952b1=_0x3df78a[_0x53cefc(0x16e)],_0xcefbc9=_0x3952b1[_0x53cefc(0x16e)];return _0xcefbc9['length']===0x0?console[_0x53cefc(0x15e)](_0x53cefc(0x152)):console[_0x53cefc(0x15e)]('✔\x20Retrieved\x20'+_0xcefbc9[_0x53cefc(0x162)]+_0x53cefc(0x16f)+(_0xcefbc9['length']!==0x1?'s':'')+'\x20from\x20'+_0x151c7f),await handleSDKOutput(_0xcefbc9,_0xf3ef4e),0x0;}catch(_0x4f8913){if(_0x4f8913 instanceof SDKError)return console[_0x53cefc(0x15e)]('Error:\x20'+_0x4f8913[_0x53cefc(0x160)]),_0x4f8913['cause']&&console[_0x53cefc(0x15e)](_0x53cefc(0x169)+_0x4f8913[_0x53cefc(0x154)]),0x1;throw _0x4f8913;}}[a34_0x4ac922(0x156)](_0x57f1dc){const _0x3ad9ca=a34_0x4ac922;if(_0x57f1dc[_0x3ad9ca(0x16b)][_0x3ad9ca(0x162)]===0x0)return _0x3ad9ca(0x15b);if(_0x57f1dc['args']['length']>0x1)return _0x3ad9ca(0x157);return undefined;}}
@@ -1 +1 @@
1
- const a33_0x5b9b7b=a33_0x18d8;function a33_0x8550(){const _0x26de10=['\x20\x20tdx\x20tables\x20\x22mydb.*\x22\x20\x20\x20\x20\x20\x20\x20\x20->\x20all\x20tables\x20from\x20mydb','1031217STmtgp','Database:\x20','✔\x20Found\x20','error','\x27\x20across\x20all\x20databases.','Or\x20use\x20--in\x20flag:','\x27\x20without\x20wildcards\x20would\x20search\x20for\x20tables\x20named\x20\x27','validate','6ObgCNU','Error:\x20','name','database','Table\x20pattern:\x20','query','50880kBkSCH','verbose','483556vdfNjf','\x20\x20Or:\x20\x20tdx\x20tables\x20--database\x20','63vRIhlX','\x27\x20is\x20ambiguous.','Database:\x20all','Database\x20\x27','242568wFFVcN','\x20\x20Use:\x20tdx\x20tables\x20\x22','\x20\x20Or:\x20\x20tdx\x20tables\x20--in\x20','128469qCDRsu','tables','description','execute','719411lUURTR','Note:\x20\x27','.*\x22','table','cause','1382064BudLSv','length','includes','Did\x20you\x20mean\x20to\x20list\x20all\x20tables\x20from\x20database\x20\x27','data','site','message','\x20\x20tdx\x20tables\x20\x22mydb.users\x22\x20\x20\x20\x20->\x20table\x20\x22users\x22\x20in\x20database\x20mydb','✖\x20No\x20tables\x20found','Site:\x20','Database\x20pattern:\x20'];a33_0x8550=function(){return _0x26de10;};return a33_0x8550();}(function(_0x5ec1f9,_0xd1b881){const _0x3e048a=a33_0x18d8,_0x40e3e7=_0x5ec1f9();while(!![]){try{const _0x53b230=parseInt(_0x3e048a(0x13e))/0x1+-parseInt(_0x3e048a(0x135))/0x2+-parseInt(_0x3e048a(0x125))/0x3+parseInt(_0x3e048a(0x147))/0x4+parseInt(_0x3e048a(0x133))/0x5*(-parseInt(_0x3e048a(0x12d))/0x6)+parseInt(_0x3e048a(0x142))/0x7+-parseInt(_0x3e048a(0x13b))/0x8*(-parseInt(_0x3e048a(0x137))/0x9);if(_0x53b230===_0xd1b881)break;else _0x40e3e7['push'](_0x40e3e7['shift']());}catch(_0xa3932c){_0x40e3e7['push'](_0x40e3e7['shift']());}}}(a33_0x8550,0x2f320));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleSDKOutput}from'../utils/command-output.js';import{parseTableReference}from'../utils/table-ref-parser.js';import{DEFAULT_LISTING_LIMIT,resolveLimit}from'../utils/constants.js';import{withSpinner}from'../utils/spinner.js';function a33_0x18d8(_0x26f590,_0x59a023){const _0x855063=a33_0x8550();return a33_0x18d8=function(_0x18d81c,_0x3c0c35){_0x18d81c=_0x18d81c-0x11e;let _0x4bcdc2=_0x855063[_0x18d81c];return _0x4bcdc2;},a33_0x18d8(_0x26f590,_0x59a023);}export class TablesCommand extends BaseCommand{[a33_0x5b9b7b(0x12f)]=a33_0x5b9b7b(0x13f);[a33_0x5b9b7b(0x140)]='List\x20tables\x20in\x20a\x20database';async[a33_0x5b9b7b(0x141)](_0x246d69){const _0x380b6e=a33_0x5b9b7b,{options:_0x3bbc2a,args:_0x1e0ce5,tdx:_0xbec6b0}=_0x246d69;let _0x328ca7;if(_0x1e0ce5[_0x380b6e(0x148)]===0x0)_0x328ca7={'database':undefined,'table':undefined,'original':''};else{if(_0x1e0ce5[_0x380b6e(0x148)]===0x1)try{_0x328ca7=parseTableReference(_0x1e0ce5[0x0]);if(_0x328ca7[_0x380b6e(0x145)]&&!_0x328ca7[_0x380b6e(0x130)]&&!_0x328ca7[_0x380b6e(0x145)][_0x380b6e(0x149)]('*')&&!_0x328ca7[_0x380b6e(0x145)][_0x380b6e(0x149)]('?'))return console['error']('Error:\x20Pattern\x20\x27'+_0x1e0ce5[0x0]+_0x380b6e(0x138)),console[_0x380b6e(0x128)](_0x380b6e(0x14a)+_0x328ca7[_0x380b6e(0x145)]+'\x27?'),console['error'](_0x380b6e(0x13c)+_0x328ca7[_0x380b6e(0x145)]+_0x380b6e(0x144)),console[_0x380b6e(0x128)](_0x380b6e(0x13d)+_0x328ca7[_0x380b6e(0x145)]),console[_0x380b6e(0x128)](_0x380b6e(0x136)+_0x328ca7['table']),console[_0x380b6e(0x128)](''),console[_0x380b6e(0x128)](_0x380b6e(0x143)+_0x1e0ce5[0x0]+_0x380b6e(0x12b)+_0x328ca7['table']+_0x380b6e(0x129)),0x1;}catch(_0x5bc60f){return console[_0x380b6e(0x128)]('Error:\x20'+_0x5bc60f[_0x380b6e(0x11f)]),0x1;}else return console[_0x380b6e(0x128)]('Error:\x20Too\x20many\x20arguments.\x20Use\x20single\x20argument:'),console[_0x380b6e(0x128)]('\x20\x20tdx\x20tables\x20users\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20->\x20table\x20\x22users\x22\x20across\x20all\x20databases'),console[_0x380b6e(0x128)](_0x380b6e(0x124)),console[_0x380b6e(0x128)](_0x380b6e(0x120)),console[_0x380b6e(0x128)]('\x20\x20tdx\x20tables\x20\x22*.user*\x22\x20\x20\x20\x20\x20\x20\x20->\x20tables\x20matching\x20user*\x20across\x20databases'),console['error'](_0x380b6e(0x12a)),console[_0x380b6e(0x128)]('\x20\x20tdx\x20tables\x20--in\x20mydb\x20\x20\x20\x20\x20\x20\x20->\x20all\x20tables\x20from\x20mydb'),0x1;}const _0xbe853f=_0x3bbc2a[_0x380b6e(0x130)];!_0x328ca7['database']&&_0xbe853f&&(_0x328ca7[_0x380b6e(0x130)]=_0xbe853f);try{const _0xdff1fe=_0x3dc05c=>_0x3dc05c&&(_0x3dc05c[_0x380b6e(0x149)]('*')||_0x3dc05c[_0x380b6e(0x149)]('?')),_0x441cd0=_0xdff1fe(_0x328ca7[_0x380b6e(0x130)]);_0x3bbc2a[_0x380b6e(0x134)]&&(console[_0x380b6e(0x128)](_0x380b6e(0x122)+_0x3bbc2a[_0x380b6e(0x11e)]),_0x328ca7[_0x380b6e(0x130)]?_0x441cd0?console[_0x380b6e(0x128)](_0x380b6e(0x123)+_0x328ca7[_0x380b6e(0x130)]):console['error'](_0x380b6e(0x126)+_0x328ca7[_0x380b6e(0x130)]):console[_0x380b6e(0x128)](_0x380b6e(0x139)),_0x328ca7[_0x380b6e(0x145)]&&console['error'](_0x380b6e(0x131)+_0x328ca7[_0x380b6e(0x145)]));const _0x20fd12=_0x328ca7['database']&&!_0x441cd0?_0x328ca7[_0x380b6e(0x130)]:undefined,_0xd09209=_0x441cd0?_0x328ca7[_0x380b6e(0x130)]:undefined,_0x4a1e9f=_0x328ca7[_0x380b6e(0x145)],_0x47dd5c=resolveLimit(_0x3bbc2a['limit'],DEFAULT_LISTING_LIMIT),_0x6a62f5=await withSpinner('Listing\x20tables...',()=>_0xbec6b0[_0x380b6e(0x132)]['listTables'](_0x20fd12,_0x4a1e9f,_0xd09209,_0x47dd5c),{'verbose':_0x3bbc2a[_0x380b6e(0x134)]}),_0xa7bdd0=_0x6a62f5[_0x380b6e(0x14b)];if(_0xa7bdd0[_0x380b6e(0x148)]===0x0&&_0x328ca7['database']&&!_0x441cd0)return console['error'](_0x380b6e(0x121)),console[_0x380b6e(0x128)](_0x380b6e(0x13a)+_0x328ca7[_0x380b6e(0x130)]+'\x27\x20may\x20not\x20exist\x20or\x20contains\x20no\x20tables'),0x1;return console[_0x380b6e(0x128)](_0x380b6e(0x127)+_0xa7bdd0[_0x380b6e(0x148)]+'\x20table'+(_0xa7bdd0[_0x380b6e(0x148)]!==0x1?'s':'')),await handleSDKOutput(_0xa7bdd0,{..._0x3bbc2a,'limit':_0x47dd5c}),0x0;}catch(_0x78befa){if(_0x78befa instanceof SDKError)return console['error'](_0x380b6e(0x12e)+_0x78befa[_0x380b6e(0x11f)]),_0x78befa[_0x380b6e(0x146)]&&console[_0x380b6e(0x128)]('\x20\x20Cause:\x20'+_0x78befa[_0x380b6e(0x146)]),0x1;throw _0x78befa;}}[a33_0x5b9b7b(0x12c)](_0x491898){return undefined;}}
1
+ function a35_0x29ec(){const _0x289ecc=['\x20table','219200UzBkHB','length','\x27\x20may\x20not\x20exist\x20or\x20contains\x20no\x20tables','519834WxzoLB','Error:\x20','266106ecyvcD','196889vvNcCs','\x20\x20Use:\x20tdx\x20tables\x20\x22','5Antwdq','tables','message','database','Database\x20pattern:\x20','Note:\x20\x27','.*\x22','includes','\x20\x20Or:\x20\x20tdx\x20tables\x20--database\x20','Listing\x20tables...','Site:\x20','\x20\x20Or:\x20\x20tdx\x20tables\x20--in\x20','\x20\x20Cause:\x20','\x27\x20without\x20wildcards\x20would\x20search\x20for\x20tables\x20named\x20\x27','cause','39621cdNDCR','\x20\x20tdx\x20tables\x20--in\x20mydb\x20\x20\x20\x20\x20\x20\x20->\x20all\x20tables\x20from\x20mydb','description','334990OTduDj','error','validate','limit','60HZpWub','verbose','Error:\x20Too\x20many\x20arguments.\x20Use\x20single\x20argument:','site','27IPOdgn','✖\x20No\x20tables\x20found','\x20\x20tdx\x20tables\x20\x22mydb.*\x22\x20\x20\x20\x20\x20\x20\x20\x20->\x20all\x20tables\x20from\x20mydb','16VGdvxm','207645XUlHes','Table\x20pattern:\x20','table','\x27\x20across\x20all\x20databases.','\x20\x20tdx\x20tables\x20\x22*.user*\x22\x20\x20\x20\x20\x20\x20\x20->\x20tables\x20matching\x20user*\x20across\x20databases','\x27\x20is\x20ambiguous.'];a35_0x29ec=function(){return _0x289ecc;};return a35_0x29ec();}function a35_0x3ea9(_0x1028b6,_0x48c5f2){const _0x29ec57=a35_0x29ec();return a35_0x3ea9=function(_0x3ea9b0,_0x51fd66){_0x3ea9b0=_0x3ea9b0-0x10d;let _0x5e804b=_0x29ec57[_0x3ea9b0];return _0x5e804b;},a35_0x3ea9(_0x1028b6,_0x48c5f2);}const a35_0x4ce7f7=a35_0x3ea9;(function(_0x5a9866,_0x3496cd){const _0x2e97db=a35_0x3ea9,_0xe55174=_0x5a9866();while(!![]){try{const _0x2c3fc0=parseInt(_0x2e97db(0x10e))/0x1+parseInt(_0x2e97db(0x115))/0x2+parseInt(_0x2e97db(0x12c))/0x3*(-parseInt(_0x2e97db(0x133))/0x4)+-parseInt(_0x2e97db(0x11d))/0x5*(parseInt(_0x2e97db(0x11a))/0x6)+parseInt(_0x2e97db(0x118))/0x7*(parseInt(_0x2e97db(0x10d))/0x8)+-parseInt(_0x2e97db(0x137))/0x9*(parseInt(_0x2e97db(0x12f))/0xa)+-parseInt(_0x2e97db(0x11b))/0xb;if(_0x2c3fc0===_0x3496cd)break;else _0xe55174['push'](_0xe55174['shift']());}catch(_0x1b5831){_0xe55174['push'](_0xe55174['shift']());}}}(a35_0x29ec,0x199d5));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleSDKOutput}from'../utils/command-output.js';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{['name']=a35_0x4ce7f7(0x11e);[a35_0x4ce7f7(0x12e)]='List\x20tables\x20in\x20a\x20database';async['execute'](_0x34ef31){const _0x1e45ba=a35_0x4ce7f7,{options:_0x2378bf,args:_0x5c7137,tdx:_0x112bc5}=_0x34ef31;let _0x53f358;if(_0x5c7137[_0x1e45ba(0x116)]===0x0)_0x53f358={'database':undefined,'table':undefined,'original':''};else{if(_0x5c7137[_0x1e45ba(0x116)]===0x1)try{_0x53f358=parseTableReference(_0x5c7137[0x0]);if(_0x53f358[_0x1e45ba(0x110)]&&!_0x53f358[_0x1e45ba(0x120)]&&!_0x53f358[_0x1e45ba(0x110)][_0x1e45ba(0x124)]('*')&&!_0x53f358[_0x1e45ba(0x110)][_0x1e45ba(0x124)]('?'))return console['error']('Error:\x20Pattern\x20\x27'+_0x5c7137[0x0]+_0x1e45ba(0x113)),console[_0x1e45ba(0x130)]('Did\x20you\x20mean\x20to\x20list\x20all\x20tables\x20from\x20database\x20\x27'+_0x53f358[_0x1e45ba(0x110)]+'\x27?'),console[_0x1e45ba(0x130)](_0x1e45ba(0x11c)+_0x53f358['table']+_0x1e45ba(0x123)),console[_0x1e45ba(0x130)](_0x1e45ba(0x128)+_0x53f358[_0x1e45ba(0x110)]),console[_0x1e45ba(0x130)](_0x1e45ba(0x125)+_0x53f358[_0x1e45ba(0x110)]),console[_0x1e45ba(0x130)](''),console[_0x1e45ba(0x130)](_0x1e45ba(0x122)+_0x5c7137[0x0]+_0x1e45ba(0x12a)+_0x53f358['table']+_0x1e45ba(0x111)),0x1;}catch(_0x4de77f){return console[_0x1e45ba(0x130)]('Error:\x20'+_0x4de77f[_0x1e45ba(0x11f)]),0x1;}else return console[_0x1e45ba(0x130)](_0x1e45ba(0x135)),console['error']('\x20\x20tdx\x20tables\x20users\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20->\x20table\x20\x22users\x22\x20across\x20all\x20databases'),console['error'](_0x1e45ba(0x139)),console[_0x1e45ba(0x130)]('\x20\x20tdx\x20tables\x20\x22mydb.users\x22\x20\x20\x20\x20->\x20table\x20\x22users\x22\x20in\x20database\x20mydb'),console[_0x1e45ba(0x130)](_0x1e45ba(0x112)),console[_0x1e45ba(0x130)]('Or\x20use\x20--in\x20flag:'),console['error'](_0x1e45ba(0x12d)),0x1;}const _0x3e5524=_0x2378bf[_0x1e45ba(0x120)];!_0x53f358['database']&&_0x3e5524&&(_0x53f358[_0x1e45ba(0x120)]=_0x3e5524);try{const _0x3e9895=_0x23f34b=>_0x23f34b&&(_0x23f34b[_0x1e45ba(0x124)]('*')||_0x23f34b['includes']('?')),_0x5753f8=_0x3e9895(_0x53f358[_0x1e45ba(0x120)]);_0x2378bf['verbose']&&(console[_0x1e45ba(0x130)](_0x1e45ba(0x127)+_0x2378bf[_0x1e45ba(0x136)]),_0x53f358[_0x1e45ba(0x120)]?_0x5753f8?console[_0x1e45ba(0x130)](_0x1e45ba(0x121)+_0x53f358[_0x1e45ba(0x120)]):console[_0x1e45ba(0x130)]('Database:\x20'+_0x53f358[_0x1e45ba(0x120)]):console[_0x1e45ba(0x130)]('Database:\x20all'),_0x53f358[_0x1e45ba(0x110)]&&console[_0x1e45ba(0x130)](_0x1e45ba(0x10f)+_0x53f358[_0x1e45ba(0x110)]));const _0x50fdda=_0x53f358[_0x1e45ba(0x120)]&&!_0x5753f8?_0x53f358['database']:undefined,_0x525317=_0x5753f8?_0x53f358[_0x1e45ba(0x120)]:undefined,_0xe8fd33=_0x53f358[_0x1e45ba(0x110)],_0x125662=resolveLimit(_0x2378bf[_0x1e45ba(0x132)],DEFAULT_LISTING_LIMIT),_0x396153=await withSpinner(_0x1e45ba(0x126),()=>_0x112bc5['query']['listTables'](_0x50fdda,_0xe8fd33,_0x525317,_0x125662),{'verbose':_0x2378bf[_0x1e45ba(0x134)]}),_0xf86a08=_0x396153['data'];if(_0xf86a08[_0x1e45ba(0x116)]===0x0&&_0x53f358['database']&&!_0x5753f8)return console[_0x1e45ba(0x130)](_0x1e45ba(0x138)),console[_0x1e45ba(0x130)]('Database\x20\x27'+_0x53f358[_0x1e45ba(0x120)]+_0x1e45ba(0x117)),0x1;return console['error']('✔\x20Found\x20'+_0xf86a08['length']+_0x1e45ba(0x114)+(_0xf86a08[_0x1e45ba(0x116)]!==0x1?'s':'')),await handleSDKOutput(_0xf86a08,{..._0x2378bf,'limit':_0x125662}),0x0;}catch(_0x15f4da){if(_0x15f4da instanceof SDKError)return console[_0x1e45ba(0x130)](_0x1e45ba(0x119)+_0x15f4da['message']),_0x15f4da[_0x1e45ba(0x12b)]&&console[_0x1e45ba(0x130)](_0x1e45ba(0x129)+_0x15f4da[_0x1e45ba(0x12b)]),0x1;throw _0x15f4da;}}[a35_0x4ce7f7(0x131)](_0x2aa291){return undefined;}}
@@ -1 +1 @@
1
- const a34_0x32ce9d=a34_0x1a64;(function(_0x5ffe8e,_0x289c29){const _0x267e52=a34_0x1a64,_0x199e60=_0x5ffe8e();while(!![]){try{const _0x444d0b=-parseInt(_0x267e52(0x134))/0x1*(-parseInt(_0x267e52(0x12d))/0x2)+parseInt(_0x267e52(0x122))/0x3+parseInt(_0x267e52(0x11f))/0x4*(-parseInt(_0x267e52(0x110))/0x5)+-parseInt(_0x267e52(0x129))/0x6*(parseInt(_0x267e52(0x11c))/0x7)+-parseInt(_0x267e52(0x113))/0x8+parseInt(_0x267e52(0x111))/0x9*(parseInt(_0x267e52(0x120))/0xa)+-parseInt(_0x267e52(0x126))/0xb*(-parseInt(_0x267e52(0x130))/0xc);if(_0x444d0b===_0x289c29)break;else _0x199e60['push'](_0x199e60['shift']());}catch(_0x5ed447){_0x199e60['push'](_0x199e60['shift']());}}}(a34_0x2de0,0x9dd9b));import{BaseCommand}from'./command.js';import{saveSessionContext,getCurrentSessionPID}from'../core/session.js';function a34_0x1a64(_0x366c60,_0xcb2cd3){const _0x2de04c=a34_0x2de0();return a34_0x1a64=function(_0x1a64e6,_0x21f3fc){_0x1a64e6=_0x1a64e6-0x10e;let _0x15a9b3=_0x2de04c[_0x1a64e6];return _0x15a9b3;},a34_0x1a64(_0x366c60,_0xcb2cd3);}import{profileExists}from'../core/profile.js';export class UseCommand extends BaseCommand{['name']='use';[a34_0x32ce9d(0x132)]=a34_0x32ce9d(0x116);[a34_0x32ce9d(0x12a)](_0x45161f){const _0x3816ad=a34_0x32ce9d,{args:_0x53054b}=_0x45161f;if(_0x53054b['length']<0x2)return _0x3816ad(0x11e)+_0x3816ad(0x127)+_0x3816ad(0x11a)+_0x3816ad(0x12c);const _0x21f7db=_0x53054b[0x0],_0x5236e9=[_0x3816ad(0x125),_0x3816ad(0x117),_0x3816ad(0x112),_0x3816ad(0x131),_0x3816ad(0x118)];if(!_0x5236e9[_0x3816ad(0x124)](_0x21f7db))return'Invalid\x20resource:\x20'+_0x21f7db+_0x3816ad(0x133)+_0x5236e9[_0x3816ad(0x115)](',\x20');return undefined;}async[a34_0x32ce9d(0x135)](_0x57be73){const _0x4a226e=a34_0x32ce9d,{args:_0x21b640,options:_0x2ba6b9}=_0x57be73;try{const _0x3f8b3e=_0x21b640[0x0],_0x3b247b=_0x21b640[0x1];if(_0x3f8b3e===_0x4a226e(0x131)){if(!profileExists(_0x3b247b))return console[_0x4a226e(0x12e)](_0x4a226e(0x12f)+_0x3b247b+_0x4a226e(0x123)),console[_0x4a226e(0x12e)]('\x0aUse\x20\x27tdx\x20profiles\x27\x20to\x20see\x20available\x20profiles'),0x1;const _0x113b4d=_0x2ba6b9[_0x4a226e(0x121)]||getCurrentSessionPID()[_0x4a226e(0x12b)]();return saveSessionContext({'profile':_0x3b247b},_0x2ba6b9[_0x4a226e(0x121)]),console[_0x4a226e(0x10e)](_0x4a226e(0x119)+_0x3b247b+_0x4a226e(0x114)+_0x113b4d+')'),console['log'](_0x4a226e(0x11d)),0x0;}const _0x5703ec={},_0x4c64c7=_0x2ba6b9[_0x4a226e(0x121)]||getCurrentSessionPID()[_0x4a226e(0x12b)]();switch(_0x3f8b3e){case _0x4a226e(0x125):_0x5703ec['database']=_0x3b247b,console['log']('Session\x20database\x20set\x20to:\x20'+_0x3b247b+'\x20(session:\x20'+_0x4c64c7+')');break;case _0x4a226e(0x117):_0x5703ec['parent_segment']=_0x3b247b,console['log'](_0x4a226e(0x128)+_0x3b247b+_0x4a226e(0x114)+_0x4c64c7+')');break;case _0x4a226e(0x112):_0x5703ec[_0x4a226e(0x112)]=_0x3b247b,console[_0x4a226e(0x10e)]('Session\x20llm_project\x20set\x20to:\x20'+_0x3b247b+'\x20(session:\x20'+_0x4c64c7+')');break;case _0x4a226e(0x118):_0x5703ec[_0x4a226e(0x118)]=_0x3b247b,console[_0x4a226e(0x10e)](_0x4a226e(0x10f)+_0x3b247b+'\x20(session:\x20'+_0x4c64c7+')');break;}return saveSessionContext(_0x5703ec,_0x2ba6b9[_0x4a226e(0x121)]),console[_0x4a226e(0x10e)](_0x4a226e(0x11d)),0x0;}catch(_0x39d5ac){return _0x39d5ac instanceof Error&&console[_0x4a226e(0x12e)](_0x4a226e(0x11b)+_0x39d5ac['message']),0x1;}}}function a34_0x2de0(){const _0x3e73e3=['Error:\x20Profile\x20\x27','37788BIMdWl','profile','description','.\x20Must\x20be\x20one\x20of:\x20','442324lOgKzO','execute','log','Session\x20engage_workspace\x20set\x20to:\x20','365nLszFh','4203VugKYX','llm_project','9465896wdNwaU','\x20(session:\x20','join','Set\x20session-level\x20context','parent_segment','engage_workspace','Session\x20profile\x20set\x20to:\x20','Or\x20use:\x20tdx\x20context\x20--clear\x20to\x20clear\x20session\x20context\x0a','Error:\x20','175tgqyoo','\x0aTip:\x20Use\x20\x27tdx\x20context\x20--clear\x27\x20to\x20clear\x20session\x20overrides','Usage:\x20tdx\x20use\x20<resource>\x20<value>\x0a','11596lashdD','12290CgIsuW','session','1161105ExCnWT','\x27\x20does\x20not\x20exist','includes','database','5027oeXAXR','Resources:\x20database,\x20parent_segment,\x20llm_project,\x20profile\x0a','Session\x20parent_segment\x20set\x20to:\x20','298392OFJdDK','validate','toString','\x0aRun\x20\x27tdx\x20use\x20--help\x27\x20for\x20more\x20options','4FHUGUG','error'];a34_0x2de0=function(){return _0x3e73e3;};return a34_0x2de0();}
1
+ const a36_0x19574c=a36_0x32e7;(function(_0x120912,_0x87da02){const _0x329556=a36_0x32e7,_0x255dc2=_0x120912();while(!![]){try{const _0x3adb17=parseInt(_0x329556(0x112))/0x1+-parseInt(_0x329556(0xfa))/0x2+-parseInt(_0x329556(0x109))/0x3*(-parseInt(_0x329556(0x117))/0x4)+parseInt(_0x329556(0x10e))/0x5+parseInt(_0x329556(0x11f))/0x6*(parseInt(_0x329556(0x108))/0x7)+-parseInt(_0x329556(0x11e))/0x8*(-parseInt(_0x329556(0x118))/0x9)+parseInt(_0x329556(0x10b))/0xa*(-parseInt(_0x329556(0x100))/0xb);if(_0x3adb17===_0x87da02)break;else _0x255dc2['push'](_0x255dc2['shift']());}catch(_0x5ecd0f){_0x255dc2['push'](_0x255dc2['shift']());}}}(a36_0x4d1e,0xa9d67));import{BaseCommand}from'./command.js';import{saveSessionContext,getCurrentSessionPID}from'../core/session.js';import{profileExists}from'../core/profile.js';function a36_0x32e7(_0x5e0ded,_0x2af2f6){const _0x4d1e70=a36_0x4d1e();return a36_0x32e7=function(_0x32e79b,_0x1599c3){_0x32e79b=_0x32e79b-0xf9;let _0x599d46=_0x4d1e70[_0x32e79b];return _0x599d46;},a36_0x32e7(_0x5e0ded,_0x2af2f6);}export class UseCommand extends BaseCommand{[a36_0x19574c(0xfc)]='use';[a36_0x19574c(0x105)]=a36_0x19574c(0x116);[a36_0x19574c(0x114)](_0x1bc2e7){const _0x54d52f=a36_0x19574c,{args:_0x2f10b1}=_0x1bc2e7;if(_0x2f10b1[_0x54d52f(0x110)]<0x2)return _0x54d52f(0x10d)+'Resources:\x20database,\x20parent_segment,\x20llm_project,\x20profile\x0a'+_0x54d52f(0x121)+_0x54d52f(0x10c);const _0x374089=_0x2f10b1[0x0],_0x3fa1cb=[_0x54d52f(0x115),_0x54d52f(0xff),_0x54d52f(0x111),'profile',_0x54d52f(0x119)];if(!_0x3fa1cb[_0x54d52f(0x11a)](_0x374089))return'Invalid\x20resource:\x20'+_0x374089+_0x54d52f(0x107)+_0x3fa1cb[_0x54d52f(0x10a)](',\x20');return undefined;}async[a36_0x19574c(0x10f)](_0x1c4186){const _0x1f2d69=a36_0x19574c,{args:_0x1a5f46,options:_0x542430}=_0x1c4186;try{const _0x4634f5=_0x1a5f46[0x0],_0x3e4bca=_0x1a5f46[0x1];if(_0x4634f5==='profile'){if(!profileExists(_0x3e4bca))return console[_0x1f2d69(0xfd)](_0x1f2d69(0xf9)+_0x3e4bca+_0x1f2d69(0x101)),console['error']('\x0aUse\x20\x27tdx\x20profiles\x27\x20to\x20see\x20available\x20profiles'),0x1;const _0x4718c7=_0x542430[_0x1f2d69(0xfb)]||getCurrentSessionPID()[_0x1f2d69(0x11b)]();return saveSessionContext({'profile':_0x3e4bca},_0x542430[_0x1f2d69(0xfb)]),console['log'](_0x1f2d69(0x104)+_0x3e4bca+'\x20(session:\x20'+_0x4718c7+')'),console[_0x1f2d69(0xfe)]('\x0aTip:\x20Use\x20\x27tdx\x20context\x20--clear\x27\x20to\x20clear\x20session\x20overrides'),0x0;}const _0x2e3345={},_0x139581=_0x542430[_0x1f2d69(0xfb)]||getCurrentSessionPID()[_0x1f2d69(0x11b)]();switch(_0x4634f5){case'database':_0x2e3345[_0x1f2d69(0x115)]=_0x3e4bca,console[_0x1f2d69(0xfe)](_0x1f2d69(0x11d)+_0x3e4bca+_0x1f2d69(0x102)+_0x139581+')');break;case _0x1f2d69(0xff):_0x2e3345[_0x1f2d69(0xff)]=_0x3e4bca,console[_0x1f2d69(0xfe)](_0x1f2d69(0x113)+_0x3e4bca+_0x1f2d69(0x102)+_0x139581+')');break;case _0x1f2d69(0x111):_0x2e3345[_0x1f2d69(0x111)]=_0x3e4bca,console[_0x1f2d69(0xfe)](_0x1f2d69(0x120)+_0x3e4bca+_0x1f2d69(0x102)+_0x139581+')');break;case _0x1f2d69(0x119):_0x2e3345[_0x1f2d69(0x119)]=_0x3e4bca,console[_0x1f2d69(0xfe)](_0x1f2d69(0x106)+_0x3e4bca+_0x1f2d69(0x102)+_0x139581+')');break;}return saveSessionContext(_0x2e3345,_0x542430[_0x1f2d69(0xfb)]),console[_0x1f2d69(0xfe)]('\x0aTip:\x20Use\x20\x27tdx\x20context\x20--clear\x27\x20to\x20clear\x20session\x20overrides'),0x0;}catch(_0x365f9e){return _0x365f9e instanceof Error&&console[_0x1f2d69(0xfd)](_0x1f2d69(0x11c)+_0x365f9e[_0x1f2d69(0x103)]),0x1;}}}function a36_0x4d1e(){const _0x2e36ca=['length','llm_project','1165396tUqzcS','Session\x20parent_segment\x20set\x20to:\x20','validate','database','Set\x20session-level\x20context','40pdpUsd','1132938AZxoij','engage_workspace','includes','toString','Error:\x20','Session\x20database\x20set\x20to:\x20','8NwpFzB','6eVxeXO','Session\x20llm_project\x20set\x20to:\x20','Or\x20use:\x20tdx\x20context\x20--clear\x20to\x20clear\x20session\x20context\x0a','Error:\x20Profile\x20\x27','902874lnItfd','session','name','error','log','parent_segment','11cjeAJk','\x27\x20does\x20not\x20exist','\x20(session:\x20','message','Session\x20profile\x20set\x20to:\x20','description','Session\x20engage_workspace\x20set\x20to:\x20','.\x20Must\x20be\x20one\x20of:\x20','3343942vQYptB','177789VTKESF','join','22202300XQrdgb','\x0aRun\x20\x27tdx\x20use\x20--help\x27\x20for\x20more\x20options','Usage:\x20tdx\x20use\x20<resource>\x20<value>\x0a','5028540MNwKIh','execute'];a36_0x4d1e=function(){return _0x2e36ca;};return a36_0x4d1e();}
@@ -1 +1 @@
1
- const a35_0x254837=a35_0x4aad;function a35_0x4aad(_0xa72fa5,_0x5485d8){const _0x4dce67=a35_0x4dce();return a35_0x4aad=function(_0x4aad6e,_0x3fffce){_0x4aad6e=_0x4aad6e-0x17e;let _0x224aca=_0x4dce67[_0x4aad6e];return _0x224aca;},a35_0x4aad(_0xa72fa5,_0x5485d8);}(function(_0x51ebdb,_0x3d6d5b){const _0x1f38be=a35_0x4aad,_0x4d40e9=_0x51ebdb();while(!![]){try{const _0x49981e=-parseInt(_0x1f38be(0x19c))/0x1*(-parseInt(_0x1f38be(0x199))/0x2)+parseInt(_0x1f38be(0x214))/0x3+parseInt(_0x1f38be(0x1b5))/0x4*(parseInt(_0x1f38be(0x1e8))/0x5)+parseInt(_0x1f38be(0x209))/0x6*(-parseInt(_0x1f38be(0x21e))/0x7)+-parseInt(_0x1f38be(0x1a4))/0x8*(-parseInt(_0x1f38be(0x1f3))/0x9)+-parseInt(_0x1f38be(0x1f5))/0xa+parseInt(_0x1f38be(0x1ad))/0xb*(parseInt(_0x1f38be(0x1f9))/0xc);if(_0x49981e===_0x3d6d5b)break;else _0x4d40e9['push'](_0x4d40e9['shift']());}catch(_0x1837ff){_0x4d40e9['push'](_0x4d40e9['shift']());}}}(a35_0x4dce,0x96771));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 a35_0x32181b from'prompts';function a35_0x4dce(){const _0x180e04=['Project\x20directory:\x20','\x22?\x20This\x20cannot\x20be\x20undone.','stat','error','✔\x20Found\x20','fileSize','stringify','workflow:projects','map','List\x20all\x20workflow\x20projects','\x20attempt','startsWith','Kill\x20a\x20running\x20attempt','round','data','Push\x20workflow\x20project\x20to\x20Treasure\x20Data','\x20project','Error:\x20Project\x20name\x20is\x20required','workflow:workflows','json','session:','Delete\x20workflow\x20project\x20from\x20Treasure\x20Data','logFiles','Show\x20logs\x20for\x20a\x20workflow\x20attempt','Listing\x20workflow\x20attempts...','✔\x20Pushed\x20','Usage:\x20workflow\x20retry\x20session:<id>\x20or\x20workflow\x20retry\x20attempt:<id>','workflow:logs','isArray','format','Retrying\x20session...','901245LuHuft','Start\x20a\x20workflow\x20run','Including\x20subtasks:\x20yes','Project\x20name:\x20','verbose','workflows','reason','canceling','createdAt','push','workflow','216819reImFA','tasks','12243600tzIMYS','Getting\x20attempt\x20details...','Status:\x20','readFile','60KrcMmr','workflow:delete','\x20\x20Attempt\x20ID:\x20','Error:\x20Invalid\x20JSON\x20in\x20--params','filesExtracted','Target:\x20','Error:\x20Session\x20ID\x20or\x20attempt\x20ID\x20is\x20required','sessionTime','No\x20log\x20files\x20found\x20for\x20this\x20attempt','\x20\x20Project\x20ID:\x20','\x20session','getTime','\x20\x20Files\x20extracted:\x20','Pushing\x20workflow\x20project...','Filter:\x20project=','Are\x20you\x20sure\x20you\x20want\x20to\x20retry\x20','438AaXHDS','Download\x20workflow\x20project\x20from\x20Treasure\x20Data','download','Session\x20time:\x20','✔\x20Retry\x20started','limit','\x20\x20Project:\x20','Project:\x20','split','\x20\x20Cause:\x20','keys','1142202oCFxqb','includeRetried','...','attemptId','Error:\x20Attempt\x20ID\x20is\x20required','fromTask','substring','Cancelled','session','resumeFrom','115976poOhBJ','Include\x20retried:\x20yes','description','\x20\x20Session\x20ID:\x20','Listing\x20workflow\x20projects...','Params:\x20','status','select','project','execute','\x20\x20Location:\x20','attempt:','from','includeSubtasks','\x20\x20New\x20attempt\x20ID:\x20','utf-8','Revision:\x20','Error:\x20','running','workflow:attempt','skipValidation','taskName','log','Starting\x20workflow\x20run...','Listing\x20workflows...','force','workflow:download','Validation:\x20skipped','workflow:kill','projectId','\x20task','Deleting\x20project\x20','Expected\x20format:\x20--param\x20key=value','workflow:sessions','16958zMZCtM','Killing\x20attempt...','task','36CkVQGZ','params','message','cause','retrySession','success','Error:\x20Workflow\x20identifier\x20is\x20required','finishedAt','296dcmwEj','✔\x20Downloaded\x20','Retrying\x20attempt...','Force:\x20yes','Resume\x20from:\x20','Error:\x20Invalid\x20pattern.\x20Use\x20format:\x20project\x20or\x20project.workflow','projects','List\x20workflow\x20attempts','Task\x20name:\x20','2843577zzABJj','retryAttemptName','Parameters:\x20','param','workflow:attempts','revision','parse','projectName','4cCpHrX','delete','attempt','Listing\x20workflow\x20sessions...','Pattern:\x20','Getting\x20attempt\x20tasks...','sessionId','Usage:\x20workflow:delete\x20<project-name-or-id>','Are\x20you\x20sure\x20you\x20want\x20to\x20kill\x20attempt\x20','name','done','\x20\x20Revision:\x20','yes','List\x20workflows','Usage:\x20workflow\x20run\x20<project.workflow>\x20[options]','kill','workflow:retry','length','Attempt\x20ID:\x20','sessions'];a35_0x4dce=function(){return _0x180e04;};return a35_0x4dce();}export class WorkflowProjectsCommand extends BaseCommand{[a35_0x254837(0x1be)]=a35_0x254837(0x1d0);[a35_0x254837(0x220)]=a35_0x254837(0x1d2);async[a35_0x254837(0x180)](_0x5ff385){const _0x48fcdb=a35_0x254837,{options:_0x19f2f5,args:_0x114943,tdx:_0x386b00}=_0x5ff385,_0x25c07b=_0x114943[0x0];try{_0x19f2f5[_0x48fcdb(0x1ec)]&&_0x25c07b&&console[_0x48fcdb(0x1cc)](_0x48fcdb(0x1b9)+_0x25c07b);const _0x1f1105=await withSpinner(_0x48fcdb(0x222),()=>_0x386b00[_0x48fcdb(0x1f2)][_0x48fcdb(0x1aa)](_0x25c07b,{'limit':_0x19f2f5['limit']}),{'verbose':_0x19f2f5[_0x48fcdb(0x1ec)]}),_0x503483=_0x1f1105[_0x48fcdb(0x1d7)];return console['error'](_0x48fcdb(0x1cd)+_0x503483[_0x48fcdb(0x1c6)]+_0x48fcdb(0x1d9)+(_0x503483[_0x48fcdb(0x1c6)]!==0x1?'s':'')),await handleSDKOutput(_0x503483,_0x19f2f5),0x0;}catch(_0x519a2e){if(_0x519a2e instanceof SDKError)return console['error'](_0x48fcdb(0x188)+_0x519a2e[_0x48fcdb(0x19e)]),_0x519a2e[_0x48fcdb(0x19f)]&&console[_0x48fcdb(0x1cc)](_0x48fcdb(0x212)+_0x519a2e[_0x48fcdb(0x19f)]),0x1;throw _0x519a2e;}}}export class WorkflowWorkflowsCommand extends BaseCommand{[a35_0x254837(0x1be)]=a35_0x254837(0x1db);[a35_0x254837(0x220)]=a35_0x254837(0x1c2);async[a35_0x254837(0x180)](_0x204b2e){const _0x25f62c=a35_0x254837,{options:_0x55bb8c,args:_0x147c56,tdx:_0x5ebf68}=_0x204b2e,_0x3f5538=_0x147c56[0x0];try{_0x55bb8c[_0x25f62c(0x1ec)]&&_0x3f5538&&console[_0x25f62c(0x1cc)]('Project\x20filter:\x20'+_0x3f5538);const _0x6a9705=await withSpinner(_0x25f62c(0x18f),()=>_0x5ebf68[_0x25f62c(0x1f2)][_0x25f62c(0x1ed)](_0x3f5538,{'limit':_0x55bb8c[_0x25f62c(0x20e)]}),{'verbose':_0x55bb8c['verbose']}),_0x5808c1=_0x6a9705[_0x25f62c(0x1d7)];return console['error'](_0x25f62c(0x1cd)+_0x5808c1[_0x25f62c(0x1c6)]+'\x20workflow'+(_0x5808c1['length']!==0x1?'s':'')),await handleSDKOutput(_0x5808c1,_0x55bb8c),0x0;}catch(_0x3c8c37){if(_0x3c8c37 instanceof SDKError)return console['error'](_0x25f62c(0x188)+_0x3c8c37[_0x25f62c(0x19e)]),_0x3c8c37['cause']&&console[_0x25f62c(0x1cc)]('\x20\x20Cause:\x20'+_0x3c8c37[_0x25f62c(0x19f)]),0x1;throw _0x3c8c37;}}}export class WorkflowSessionsCommand extends BaseCommand{[a35_0x254837(0x1be)]=a35_0x254837(0x198);['description']='List\x20workflow\x20execution\x20sessions';async[a35_0x254837(0x180)](_0x29ac63){const _0x1300c2=a35_0x254837,{options:_0x9b7fc0,args:_0x40dc35,tdx:_0x5e661b}=_0x29ac63;let _0x47f05a,_0x401375;if(_0x40dc35[0x0]){const _0x1849bf=_0x40dc35[0x0]['split']('.');if(_0x1849bf[_0x1300c2(0x1c6)]===0x1)_0x47f05a=_0x1849bf[0x0];else{if(_0x1849bf['length']===0x2)[_0x47f05a,_0x401375]=_0x1849bf;else return console[_0x1300c2(0x1cc)](_0x1300c2(0x1a9)),0x1;}}try{if(_0x9b7fc0['verbose']){if(_0x47f05a&&_0x401375)console['error']('Filter:\x20'+_0x47f05a+'.'+_0x401375);else _0x47f05a&&console[_0x1300c2(0x1cc)](_0x1300c2(0x207)+_0x47f05a);const _0x59cb81=_0x9b7fc0[_0x1300c2(0x224)];_0x59cb81&&console[_0x1300c2(0x1cc)](_0x1300c2(0x1f7)+_0x59cb81);}const _0x5791c0=await withSpinner(_0x1300c2(0x1b8),()=>_0x5e661b[_0x1300c2(0x1f2)][_0x1300c2(0x1c8)]({'projectName':_0x47f05a,'workflowName':_0x401375,'status':_0x9b7fc0[_0x1300c2(0x224)],'fromTime':_0x9b7fc0[_0x1300c2(0x183)],'toTime':_0x9b7fc0['to'],'limit':_0x9b7fc0[_0x1300c2(0x20e)]}),{'verbose':_0x9b7fc0[_0x1300c2(0x1ec)]}),_0x37354e=_0x5791c0[_0x1300c2(0x1d7)];return console[_0x1300c2(0x1cc)](_0x1300c2(0x1cd)+_0x37354e[_0x1300c2(0x1c6)]+_0x1300c2(0x203)+(_0x37354e['length']!==0x1?'s':'')),await handleSDKOutput(_0x37354e,_0x9b7fc0),0x0;}catch(_0x4bc068){if(_0x4bc068 instanceof SDKError)return console[_0x1300c2(0x1cc)](_0x1300c2(0x188)+_0x4bc068['message']),_0x4bc068['cause']&&console[_0x1300c2(0x1cc)]('\x20\x20Cause:\x20'+_0x4bc068[_0x1300c2(0x19f)]),0x1;throw _0x4bc068;}}}export class WorkflowAttemptsCommand extends BaseCommand{['name']=a35_0x254837(0x1b1);['description']=a35_0x254837(0x1ab);async['execute'](_0x2f12b6){const _0x4962d4=a35_0x254837,{options:_0x55f6e5,args:_0x4afd5c,tdx:_0x58fb81}=_0x2f12b6;let _0x2a6143,_0x43f0f8;if(_0x4afd5c[0x0]){const _0x225886=_0x4afd5c[0x0][_0x4962d4(0x211)]('.');if(_0x225886[_0x4962d4(0x1c6)]===0x1)_0x2a6143=_0x225886[0x0];else{if(_0x225886['length']===0x2)[_0x2a6143,_0x43f0f8]=_0x225886;else return console[_0x4962d4(0x1cc)](_0x4962d4(0x1a9)),0x1;}}try{const _0x22fced=_0x55f6e5[_0x4962d4(0x215)];if(_0x55f6e5[_0x4962d4(0x1ec)]){if(_0x2a6143&&_0x43f0f8)console[_0x4962d4(0x1cc)]('Filter:\x20'+_0x2a6143+'.'+_0x43f0f8);else _0x2a6143&&console['error'](_0x4962d4(0x207)+_0x2a6143);_0x22fced&&console['error'](_0x4962d4(0x21f));}const _0x1a3cfb=await withSpinner(_0x4962d4(0x1e1),()=>_0x58fb81[_0x4962d4(0x1f2)]['attempts']({'projectName':_0x2a6143,'workflowName':_0x43f0f8,'includeRetried':_0x22fced,'limit':_0x55f6e5[_0x4962d4(0x20e)]}),{'verbose':_0x55f6e5[_0x4962d4(0x1ec)]}),_0x3d6ddd=_0x1a3cfb[_0x4962d4(0x1d7)];return console[_0x4962d4(0x1cc)]('✔\x20Found\x20'+_0x3d6ddd[_0x4962d4(0x1c6)]+_0x4962d4(0x1d3)+(_0x3d6ddd[_0x4962d4(0x1c6)]!==0x1?'s':'')),await handleSDKOutput(_0x3d6ddd,_0x55f6e5),0x0;}catch(_0x553288){if(_0x553288 instanceof SDKError)return console[_0x4962d4(0x1cc)]('Error:\x20'+_0x553288['message']),_0x553288[_0x4962d4(0x19f)]&&console[_0x4962d4(0x1cc)](_0x4962d4(0x212)+_0x553288[_0x4962d4(0x19f)]),0x1;throw _0x553288;}}}export class WorkflowAttemptCommand extends BaseCommand{[a35_0x254837(0x1be)]=a35_0x254837(0x18a);['description']='Show\x20specific\x20attempt\x20details';async[a35_0x254837(0x180)](_0x1adbb8){const _0x5f9fe=a35_0x254837,{options:_0x2dbbda,args:_0x103d14,tdx:_0x55d624}=_0x1adbb8,_0x341980=_0x103d14[0x0];if(!_0x341980)return console[_0x5f9fe(0x1cc)]('Error:\x20Attempt\x20ID\x20is\x20required'),0x1;try{_0x2dbbda[_0x5f9fe(0x1ec)]&&console['error']('Attempt\x20ID:\x20'+_0x341980);const _0x560984=await withSpinner(_0x5f9fe(0x1f6),()=>_0x55d624[_0x5f9fe(0x1f2)][_0x5f9fe(0x1b7)](_0x341980),{'verbose':_0x2dbbda[_0x5f9fe(0x1ec)]}),_0x1a1587=_0x560984[_0x5f9fe(0x1d7)];let _0x4cc04c;!_0x1a1587[_0x5f9fe(0x1bf)]?_0x4cc04c=_0x1a1587['cancelRequested']?_0x5f9fe(0x1ef):_0x5f9fe(0x189):_0x4cc04c=_0x1a1587[_0x5f9fe(0x1a1)]?'success':'error';let _0x31f172;if(_0x1a1587[_0x5f9fe(0x1f0)]&&_0x1a1587[_0x5f9fe(0x1a3)]){const _0x5dbbe8=new Date(_0x1a1587[_0x5f9fe(0x1f0)])['getTime'](),_0x102d6c=new Date(_0x1a1587[_0x5f9fe(0x1a3)])[_0x5f9fe(0x204)]();_0x31f172=Math[_0x5f9fe(0x1d6)]((_0x102d6c-_0x5dbbe8)/0x3e8);}const _0x46587a={'attempt_id':_0x1a1587['id'],'status':_0x4cc04c,..._0x1a1587['index']!==undefined&&{'index':_0x1a1587['index']},..._0x1a1587['project']&&{'project':_0x1a1587[_0x5f9fe(0x17f)][_0x5f9fe(0x1be)]},..._0x1a1587[_0x5f9fe(0x1f2)]&&{'workflow':_0x1a1587[_0x5f9fe(0x1f2)][_0x5f9fe(0x1be)]},..._0x1a1587[_0x5f9fe(0x1bb)]&&{'session_id':_0x1a1587[_0x5f9fe(0x1bb)]},..._0x1a1587[_0x5f9fe(0x200)]&&{'session_time':_0x1a1587[_0x5f9fe(0x200)]},..._0x1a1587[_0x5f9fe(0x1ae)]&&{'retry_attempt':_0x1a1587[_0x5f9fe(0x1ae)]},..._0x31f172!==undefined&&{'duration_sec':_0x31f172},..._0x1a1587['createdAt']&&{'created_at':_0x1a1587[_0x5f9fe(0x1f0)]},..._0x1a1587['finishedAt']&&{'finished_at':_0x1a1587[_0x5f9fe(0x1a3)]},...Object[_0x5f9fe(0x213)](_0x1a1587[_0x5f9fe(0x19d)])['length']>0x0&&{'params':_0x1a1587[_0x5f9fe(0x19d)]}};return await handleSingleObjectOutput(_0x46587a,_0x2dbbda),0x0;}catch(_0x46494c){if(_0x46494c instanceof SDKError)return console[_0x5f9fe(0x1cc)](_0x5f9fe(0x188)+_0x46494c[_0x5f9fe(0x19e)]),_0x46494c[_0x5f9fe(0x19f)]&&console[_0x5f9fe(0x1cc)]('\x20\x20Cause:\x20'+_0x46494c['cause']),0x1;throw _0x46494c;}}}export class WorkflowTasksCommand extends BaseCommand{[a35_0x254837(0x1be)]='workflow:tasks';['description']='Show\x20tasks\x20for\x20an\x20attempt';async[a35_0x254837(0x180)](_0x5c8c01){const _0xdf8ea2=a35_0x254837,{options:_0x2afe7d,args:_0x64a30f,tdx:_0x488659}=_0x5c8c01,_0x5abd91=_0x64a30f[0x0];if(!_0x5abd91)return console['error'](_0xdf8ea2(0x218)),0x1;try{const _0x2f0aea=_0x2afe7d[_0xdf8ea2(0x184)];_0x2afe7d[_0xdf8ea2(0x1ec)]&&(console['error'](_0xdf8ea2(0x1c7)+_0x5abd91),_0x2f0aea&&console[_0xdf8ea2(0x1cc)](_0xdf8ea2(0x1ea)));const _0x2d8f65=await withSpinner(_0xdf8ea2(0x1ba),()=>_0x488659[_0xdf8ea2(0x1f2)][_0xdf8ea2(0x1f4)](_0x5abd91,_0x2f0aea||![]),{'verbose':_0x2afe7d[_0xdf8ea2(0x1ec)]}),_0x51dbea=_0x2d8f65[_0xdf8ea2(0x1d7)];return console[_0xdf8ea2(0x1cc)](_0xdf8ea2(0x1cd)+_0x51dbea[_0xdf8ea2(0x1c6)]+_0xdf8ea2(0x195)+(_0x51dbea[_0xdf8ea2(0x1c6)]!==0x1?'s':'')),await handleSDKOutput(_0x51dbea,_0x2afe7d),0x0;}catch(_0x383b42){if(_0x383b42 instanceof SDKError)return console['error'](_0xdf8ea2(0x188)+_0x383b42['message']),_0x383b42['cause']&&console[_0xdf8ea2(0x1cc)](_0xdf8ea2(0x212)+_0x383b42[_0xdf8ea2(0x19f)]),0x1;throw _0x383b42;}}}export class WorkflowLogsCommand extends BaseCommand{['name']=a35_0x254837(0x1e4);[a35_0x254837(0x220)]=a35_0x254837(0x1e0);async[a35_0x254837(0x180)](_0x285548){const _0x5a31a2=a35_0x254837,{options:_0x17a17d,args:_0x270444,tdx:_0x1d9b59}=_0x285548,_0x4bb2d9=_0x270444[0x0];let _0x38d346=_0x270444[0x1];if(!_0x4bb2d9)return console[_0x5a31a2(0x1cc)]('Error:\x20Attempt\x20ID\x20is\x20required'),0x1;try{_0x17a17d[_0x5a31a2(0x1ec)]&&(console[_0x5a31a2(0x1cc)](_0x5a31a2(0x1c7)+_0x4bb2d9),_0x38d346&&console['error'](_0x5a31a2(0x1ac)+_0x38d346));const _0x4f94f9=await withSpinner('Fetching\x20log\x20files...',()=>_0x1d9b59[_0x5a31a2(0x1f2)][_0x5a31a2(0x1df)](_0x4bb2d9,_0x38d346),{'verbose':_0x17a17d[_0x5a31a2(0x1ec)]}),_0xef2837=_0x4f94f9['data'];if(_0xef2837[_0x5a31a2(0x1c6)]===0x0)return console[_0x5a31a2(0x1cc)](_0x5a31a2(0x201)),0x0;if(!_0x38d346&&(_0x17a17d[_0x5a31a2(0x1dc)]||_0x17a17d[_0x5a31a2(0x1e6)]))return await handleSDKOutput(_0xef2837,_0x17a17d),0x0;if(!_0x38d346){const _0x525373=_0xef2837[_0x5a31a2(0x1d1)](_0x21d1af=>({'title':_0x21d1af[_0x5a31a2(0x18c)]+'\x20('+formatBytes(_0x21d1af[_0x5a31a2(0x1ce)])+')','value':_0x21d1af['taskName']})),_0x3b110b=await a35_0x32181b({'type':_0x5a31a2(0x17e),'name':_0x5a31a2(0x19b),'message':'Select\x20a\x20task\x20to\x20view\x20logs:','choices':_0x525373});if(!_0x3b110b['task'])return console[_0x5a31a2(0x1cc)](_0x5a31a2(0x21b)),0x0;_0x38d346=_0x3b110b[_0x5a31a2(0x19b)];}const _0x5b72db=await withSpinner('Downloading\x20logs...',()=>_0x1d9b59[_0x5a31a2(0x1f2)]['logs'](_0x4bb2d9,_0x38d346),{'verbose':_0x17a17d[_0x5a31a2(0x1ec)]}),_0x438a4d=_0x5b72db['data'];return _0x438a4d?console[_0x5a31a2(0x18d)](_0x438a4d):console['error']('No\x20log\x20content\x20found'),0x0;}catch(_0x579df7){if(_0x579df7 instanceof SDKError)return console[_0x5a31a2(0x1cc)](_0x5a31a2(0x188)+_0x579df7[_0x5a31a2(0x19e)]),_0x579df7[_0x5a31a2(0x19f)]&&console['error'](_0x5a31a2(0x212)+_0x579df7[_0x5a31a2(0x19f)]),0x1;throw _0x579df7;}}}export class WorkflowKillCommand extends BaseCommand{[a35_0x254837(0x1be)]=a35_0x254837(0x193);[a35_0x254837(0x220)]=a35_0x254837(0x1d5);async[a35_0x254837(0x180)](_0x5dea77){const _0xdff6fb=a35_0x254837,{options:_0x1edc88,args:_0x3b8f41,tdx:_0x349d12}=_0x5dea77,_0x1696b0=_0x3b8f41[0x0];if(!_0x1696b0)return console[_0xdff6fb(0x1cc)](_0xdff6fb(0x218)),0x1;try{const _0x4d6d70=_0x1edc88[_0xdff6fb(0x1ee)];_0x1edc88[_0xdff6fb(0x1ec)]&&(console['error']('Attempt\x20ID:\x20'+_0x1696b0),_0x4d6d70&&console['error']('Reason:\x20'+_0x4d6d70));if(!_0x1edc88[_0xdff6fb(0x1c1)]){const _0x4db6ca=await confirm(_0xdff6fb(0x1bd)+_0x1696b0+'?');if(!_0x4db6ca)return console[_0xdff6fb(0x1cc)](_0xdff6fb(0x21b)),0x0;}const _0x14c41b=await withSpinner(_0xdff6fb(0x19a),()=>_0x349d12[_0xdff6fb(0x1f2)][_0xdff6fb(0x1c4)](_0x1696b0,_0x4d6d70),{'verbose':_0x1edc88[_0xdff6fb(0x1ec)]}),_0x4342d6=_0x14c41b['data'];return console[_0xdff6fb(0x1cc)]('✔\x20'+_0x4342d6),0x0;}catch(_0x54fb36){if(_0x54fb36 instanceof SDKError)return console[_0xdff6fb(0x1cc)](_0xdff6fb(0x188)+_0x54fb36[_0xdff6fb(0x19e)]),_0x54fb36['cause']&&console[_0xdff6fb(0x1cc)](_0xdff6fb(0x212)+_0x54fb36[_0xdff6fb(0x19f)]),0x1;throw _0x54fb36;}}}export class WorkflowRetryCommand extends BaseCommand{[a35_0x254837(0x1be)]=a35_0x254837(0x1c5);['description']='Retry\x20a\x20session\x20or\x20attempt';async[a35_0x254837(0x180)](_0x26816c){const _0x2f5dd2=a35_0x254837,{options:_0x131be2,args:_0x73cc77,tdx:_0x3794f0}=_0x26816c,_0xb470b9=_0x73cc77[0x0];if(!_0xb470b9)return console[_0x2f5dd2(0x1cc)](_0x2f5dd2(0x1ff)),console[_0x2f5dd2(0x1cc)]('Usage:\x20workflow\x20retry\x20session:<id>\x20or\x20workflow\x20retry\x20attempt:<id>'),0x1;let _0x4cf609=![],_0x2485a9=_0xb470b9;if(_0xb470b9[_0x2f5dd2(0x1d4)](_0x2f5dd2(0x1dd)))_0x4cf609=!![],_0x2485a9=_0xb470b9['substring'](0x8);else{if(_0xb470b9[_0x2f5dd2(0x1d4)](_0x2f5dd2(0x182)))_0x4cf609=![],_0x2485a9=_0xb470b9[_0x2f5dd2(0x21a)](0x8);else return console['error']('Error:\x20Target\x20must\x20be\x20prefixed\x20with\x20\x22session:\x22\x20or\x20\x22attempt:\x22'),console[_0x2f5dd2(0x1cc)](_0x2f5dd2(0x1e3)),0x1;}try{const _0x3f7c26=_0x131be2[_0x2f5dd2(0x219)],_0x171dde=_0x131be2[_0x2f5dd2(0x21d)],_0x4fc5f4=_0x131be2[_0x2f5dd2(0x19d)],_0x438d04=_0x131be2[_0x2f5dd2(0x190)];_0x131be2[_0x2f5dd2(0x1ec)]&&(console['error'](_0x2f5dd2(0x1fe)+(_0x4cf609?'session':_0x2f5dd2(0x1b7))+'\x20'+_0x2485a9),_0x3f7c26&&console[_0x2f5dd2(0x1cc)]('From\x20task:\x20'+_0x3f7c26),_0x171dde&&console[_0x2f5dd2(0x1cc)](_0x2f5dd2(0x1a8)+_0x171dde),_0x4fc5f4&&console[_0x2f5dd2(0x1cc)](_0x2f5dd2(0x223)+_0x4fc5f4),_0x438d04&&console[_0x2f5dd2(0x1cc)](_0x2f5dd2(0x1a7)));let _0x2efbf0;if(_0x4fc5f4)try{if(_0x4fc5f4[_0x2f5dd2(0x1d4)]('@')){const _0x331bf4=await import('fs/promises'),_0x320151=_0x4fc5f4[_0x2f5dd2(0x21a)](0x1),_0x124bbb=await _0x331bf4[_0x2f5dd2(0x1f8)](_0x320151,_0x2f5dd2(0x186));_0x2efbf0=JSON[_0x2f5dd2(0x1b3)](_0x124bbb);}else _0x2efbf0=JSON[_0x2f5dd2(0x1b3)](_0x4fc5f4);}catch{return console[_0x2f5dd2(0x1cc)](_0x2f5dd2(0x1fc)),0x1;}if(!_0x131be2[_0x2f5dd2(0x1c1)]){const _0x16f37d=await confirm(_0x2f5dd2(0x208)+(_0x4cf609?_0x2f5dd2(0x21c):_0x2f5dd2(0x1b7))+'\x20'+_0x2485a9+'?');if(!_0x16f37d)return console[_0x2f5dd2(0x1cc)](_0x2f5dd2(0x21b)),0x0;}let _0x3771fd;_0x4cf609?_0x3771fd=await withSpinner(_0x2f5dd2(0x1e7),()=>_0x3794f0[_0x2f5dd2(0x1f2)][_0x2f5dd2(0x1a0)](_0x2485a9,{'fromTask':_0x3f7c26,'retryParams':_0x2efbf0}),{'verbose':_0x131be2[_0x2f5dd2(0x1ec)]}):_0x3771fd=await withSpinner(_0x2f5dd2(0x1a6),()=>_0x3794f0[_0x2f5dd2(0x1f2)]['retryAttempt'](_0x2485a9,{'resumeFrom':_0x171dde,'retryParams':_0x2efbf0,'force':_0x438d04}),{'verbose':_0x131be2[_0x2f5dd2(0x1ec)]});const _0xa8ec85=_0x3771fd[_0x2f5dd2(0x1d7)];return console['error'](_0x2f5dd2(0x20d)),console[_0x2f5dd2(0x1cc)](_0x2f5dd2(0x185)+_0xa8ec85[_0x2f5dd2(0x217)]),console[_0x2f5dd2(0x1cc)](_0x2f5dd2(0x221)+_0xa8ec85[_0x2f5dd2(0x1bb)]),0x0;}catch(_0xd2e690){if(_0xd2e690 instanceof SDKError)return console['error'](_0x2f5dd2(0x188)+_0xd2e690['message']),_0xd2e690[_0x2f5dd2(0x19f)]&&console[_0x2f5dd2(0x1cc)](_0x2f5dd2(0x212)+_0xd2e690['cause']),0x1;throw _0xd2e690;}}}export class WorkflowRunCommand extends BaseCommand{['name']='workflow:run';[a35_0x254837(0x220)]=a35_0x254837(0x1e9);async[a35_0x254837(0x180)](_0x2071ff){const _0x436073=a35_0x254837,{options:_0x1f8f33,args:_0x3c06ab,tdx:_0x28c72d}=_0x2071ff,_0xca1b62=_0x3c06ab[0x0];if(!_0xca1b62)return console[_0x436073(0x1cc)](_0x436073(0x1a2)),console[_0x436073(0x1cc)](_0x436073(0x1c3)),0x1;const _0x280074=_0x1f8f33[_0x436073(0x1b0)],_0xd83aab=_0x1f8f33[_0x436073(0x200)],_0x568e3d={};if(_0x280074&&Array[_0x436073(0x1e5)](_0x280074))for(const _0x8194c7 of _0x280074){const _0x450991=_0x8194c7['indexOf']('=');if(_0x450991===-0x1)return console[_0x436073(0x1cc)]('Error:\x20Invalid\x20parameter\x20format:\x20'+_0x8194c7),console['error'](_0x436073(0x197)),0x1;const _0x295cf2=_0x8194c7[_0x436073(0x21a)](0x0,_0x450991),_0x3db56e=_0x8194c7['substring'](_0x450991+0x1);try{_0x568e3d[_0x295cf2]=JSON[_0x436073(0x1b3)](_0x3db56e);}catch{_0x568e3d[_0x295cf2]=_0x3db56e;}}_0x1f8f33[_0x436073(0x1ec)]&&(console[_0x436073(0x1cc)]('Workflow:\x20'+_0xca1b62),Object['keys'](_0x568e3d)[_0x436073(0x1c6)]>0x0&&console['error'](_0x436073(0x1af)+JSON[_0x436073(0x1cf)](_0x568e3d)),_0xd83aab&&console[_0x436073(0x1cc)](_0x436073(0x20c)+_0xd83aab));const _0x672b76=await withSpinner(_0x436073(0x18e),()=>_0x28c72d[_0x436073(0x1f2)]['run'](_0xca1b62,_0x568e3d,{'sessionTime':_0xd83aab}),{'verbose':_0x1f8f33['verbose']}),_0x4c51e6=_0x672b76[_0x436073(0x1d7)];return console[_0x436073(0x1cc)]('✔\x20Workflow\x20run\x20started'),console[_0x436073(0x1cc)](_0x436073(0x1fb)+_0x4c51e6['id']),console[_0x436073(0x1cc)](_0x436073(0x221)+_0x4c51e6[_0x436073(0x1bb)]),console['error'](_0x436073(0x20f)+_0x4c51e6[_0x436073(0x17f)]?.['name']),console[_0x436073(0x1cc)]('\x20\x20Workflow:\x20'+_0x4c51e6[_0x436073(0x1f2)]?.[_0x436073(0x1be)]),0x0;}}export class WorkflowDownloadCommand extends BaseCommand{[a35_0x254837(0x1be)]=a35_0x254837(0x191);['description']=a35_0x254837(0x20a);async[a35_0x254837(0x180)](_0x229248){const _0x192db6=a35_0x254837,{options:_0x2789c8,args:_0x398319,tdx:_0x5eb52e}=_0x229248,_0x52094a=_0x398319[0x0],_0x306ea4=_0x398319[0x1]||'.';if(!_0x52094a)return console[_0x192db6(0x1cc)](_0x192db6(0x1da)),console['error']('Usage:\x20workflow:download\x20<project-name>\x20[output-dir]'),0x1;const _0x5c1177=_0x2789c8[_0x192db6(0x1b2)];_0x2789c8[_0x192db6(0x1ec)]&&(console[_0x192db6(0x1cc)]('Project:\x20'+_0x52094a),console[_0x192db6(0x1cc)]('Output\x20directory:\x20'+_0x306ea4),_0x5c1177&&console[_0x192db6(0x1cc)](_0x192db6(0x187)+_0x5c1177));const _0x1339b8=await withSpinner('Downloading\x20project\x20'+_0x52094a+_0x192db6(0x216),()=>_0x5eb52e['workflow'][_0x192db6(0x20b)](_0x52094a,_0x306ea4,{'revision':_0x5c1177}),{'verbose':_0x2789c8['verbose']}),_0x1188ca=_0x1339b8[_0x192db6(0x1d7)];return console[_0x192db6(0x1cc)](_0x192db6(0x1a5)+_0x1188ca['projectName']),console[_0x192db6(0x1cc)](_0x192db6(0x1c0)+_0x1188ca[_0x192db6(0x1b2)]),console[_0x192db6(0x1cc)](_0x192db6(0x205)+_0x1188ca[_0x192db6(0x1fd)]),console[_0x192db6(0x1cc)](_0x192db6(0x181)+_0x306ea4+'/'+_0x1188ca[_0x192db6(0x1b4)]),0x0;}}export class WorkflowPushCommand extends BaseCommand{[a35_0x254837(0x1be)]='workflow:push';['description']=a35_0x254837(0x1d8);async[a35_0x254837(0x180)](_0x528b90){const _0x2e42f4=a35_0x254837,{options:_0x15769b,args:_0xb795c2,tdx:_0x2e5a79}=_0x528b90;let _0x4cfaa8='.',_0x16f059=_0x15769b[_0x2e42f4(0x1be)];if(_0xb795c2[0x0]){const {promises:_0x3f7f1e}=await import('fs');try{const _0x19638d=await _0x3f7f1e[_0x2e42f4(0x1cb)](_0xb795c2[0x0]);if(_0x19638d['isDirectory']())_0x4cfaa8=_0xb795c2[0x0];else return console['error'](_0x2e42f4(0x188)+_0xb795c2[0x0]+'\x20is\x20not\x20a\x20directory'),0x1;}catch{_0x16f059=_0xb795c2[0x0],_0x4cfaa8='.';}}const _0x30da61=_0x15769b[_0x2e42f4(0x1b2)],_0x14a7b4=_0x15769b[_0x2e42f4(0x18b)];_0x15769b[_0x2e42f4(0x1ec)]&&(console[_0x2e42f4(0x1cc)](_0x2e42f4(0x1c9)+_0x4cfaa8),_0x16f059&&console[_0x2e42f4(0x1cc)](_0x2e42f4(0x1eb)+_0x16f059),_0x30da61&&console['error']('Revision:\x20'+_0x30da61),_0x14a7b4&&console[_0x2e42f4(0x1cc)](_0x2e42f4(0x192)));const _0x5dd65a=await withSpinner(_0x2e42f4(0x206),()=>_0x2e5a79[_0x2e42f4(0x1f2)][_0x2e42f4(0x1f1)](_0x4cfaa8,{'projectName':_0x16f059,'revision':_0x30da61,'skipValidation':_0x14a7b4}),{'verbose':_0x15769b[_0x2e42f4(0x1ec)]}),_0x797ca0=_0x5dd65a[_0x2e42f4(0x1d7)];return console[_0x2e42f4(0x1cc)](_0x2e42f4(0x1e2)+_0x797ca0[_0x2e42f4(0x1b4)]),console[_0x2e42f4(0x1cc)](_0x2e42f4(0x202)+_0x797ca0['projectId']),console['error'](_0x2e42f4(0x1c0)+_0x797ca0['revision']),0x0;}}export class WorkflowDeleteCommand extends BaseCommand{[a35_0x254837(0x1be)]=a35_0x254837(0x1fa);[a35_0x254837(0x220)]=a35_0x254837(0x1de);async[a35_0x254837(0x180)](_0x43ec05){const _0x55a3a9=a35_0x254837,{options:_0x4676f3,args:_0x4cb46c,tdx:_0x3eb0fb}=_0x43ec05,_0x3e4df5=_0x4cb46c[0x0];if(!_0x3e4df5)return console[_0x55a3a9(0x1cc)]('Error:\x20Project\x20name\x20or\x20ID\x20is\x20required'),console[_0x55a3a9(0x1cc)](_0x55a3a9(0x1bc)),0x1;_0x4676f3['verbose']&&console[_0x55a3a9(0x1cc)](_0x55a3a9(0x210)+_0x3e4df5);if(!_0x4676f3['yes']){const _0x24d22a=await confirm('Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20project\x20\x22'+_0x3e4df5+_0x55a3a9(0x1ca));if(!_0x24d22a)return console[_0x55a3a9(0x1cc)]('Cancelled'),0x0;}const _0x57ddff=await withSpinner(_0x55a3a9(0x196)+_0x3e4df5+_0x55a3a9(0x216),()=>_0x3eb0fb[_0x55a3a9(0x1f2)][_0x55a3a9(0x1b6)](_0x3e4df5),{'verbose':_0x4676f3[_0x55a3a9(0x1ec)]}),_0x39a0e0=_0x57ddff[_0x55a3a9(0x1d7)];return console[_0x55a3a9(0x1cc)]('✔\x20Deleted\x20project\x20'+_0x39a0e0[_0x55a3a9(0x1b4)]),console['error'](_0x55a3a9(0x202)+_0x39a0e0[_0x55a3a9(0x194)]),0x0;}}
1
+ const a37_0x4af247=a37_0x50b4;(function(_0x59b00b,_0xc54ef){const _0x360ea6=a37_0x50b4,_0x4697e8=_0x59b00b();while(!![]){try{const _0x4a9b74=parseInt(_0x360ea6(0xbc))/0x1*(-parseInt(_0x360ea6(0xa4))/0x2)+parseInt(_0x360ea6(0x8e))/0x3+parseInt(_0x360ea6(0x11f))/0x4+-parseInt(_0x360ea6(0xca))/0x5*(parseInt(_0x360ea6(0x117))/0x6)+parseInt(_0x360ea6(0xa6))/0x7*(-parseInt(_0x360ea6(0xef))/0x8)+-parseInt(_0x360ea6(0xd9))/0x9+parseInt(_0x360ea6(0xac))/0xa*(parseInt(_0x360ea6(0xc6))/0xb);if(_0x4a9b74===_0xc54ef)break;else _0x4697e8['push'](_0x4697e8['shift']());}catch(_0x3907c2){_0x4697e8['push'](_0x4697e8['shift']());}}}(a37_0x1436,0x96894));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 a37_0x12b109 from'prompts';export class WorkflowProjectsCommand extends BaseCommand{[a37_0x4af247(0xfa)]=a37_0x4af247(0xf4);[a37_0x4af247(0xea)]=a37_0x4af247(0xd7);async[a37_0x4af247(0x118)](_0x4420b3){const _0x161d8c=a37_0x4af247,{options:_0x43cfa9,args:_0xb9506f,tdx:_0x4fc3f8}=_0x4420b3,_0x2a5040=_0xb9506f[0x0];try{_0x43cfa9[_0x161d8c(0xa2)]&&_0x2a5040&&console[_0x161d8c(0x10a)]('Pattern:\x20'+_0x2a5040);const _0xc4e598=await withSpinner(_0x161d8c(0x11c),()=>_0x4fc3f8[_0x161d8c(0xb8)][_0x161d8c(0x85)](_0x2a5040,{'limit':_0x43cfa9[_0x161d8c(0x8d)]}),{'verbose':_0x43cfa9['verbose']}),_0x51389a=_0xc4e598['data'];return console[_0x161d8c(0x10a)](_0x161d8c(0x102)+_0x51389a[_0x161d8c(0xdc)]+_0x161d8c(0xe4)+(_0x51389a['length']!==0x1?'s':'')),await handleSDKOutput(_0x51389a,_0x43cfa9),0x0;}catch(_0x50a6a7){if(_0x50a6a7 instanceof SDKError)return console['error'](_0x161d8c(0x11d)+_0x50a6a7['message']),_0x50a6a7[_0x161d8c(0x101)]&&console[_0x161d8c(0x10a)](_0x161d8c(0xb3)+_0x50a6a7[_0x161d8c(0x101)]),0x1;throw _0x50a6a7;}}}export class WorkflowWorkflowsCommand extends BaseCommand{[a37_0x4af247(0xfa)]=a37_0x4af247(0xdd);[a37_0x4af247(0xea)]='List\x20workflows';async[a37_0x4af247(0x118)](_0x169585){const _0x33cb4b=a37_0x4af247,{options:_0x14100d,args:_0x3c9bac,tdx:_0x2cc69a}=_0x169585,_0x440381=_0x3c9bac[0x0];try{_0x14100d['verbose']&&_0x440381&&console['error'](_0x33cb4b(0xa5)+_0x440381);const _0x22cb54=await withSpinner(_0x33cb4b(0x96),()=>_0x2cc69a[_0x33cb4b(0xb8)]['workflows'](_0x440381,{'limit':_0x14100d['limit']}),{'verbose':_0x14100d[_0x33cb4b(0xa2)]}),_0xe3ca21=_0x22cb54[_0x33cb4b(0xf9)];return console[_0x33cb4b(0x10a)]('✔\x20Found\x20'+_0xe3ca21[_0x33cb4b(0xdc)]+_0x33cb4b(0xe5)+(_0xe3ca21[_0x33cb4b(0xdc)]!==0x1?'s':'')),await handleSDKOutput(_0xe3ca21,_0x14100d),0x0;}catch(_0x311ff0){if(_0x311ff0 instanceof SDKError)return console[_0x33cb4b(0x10a)](_0x33cb4b(0x11d)+_0x311ff0[_0x33cb4b(0xbe)]),_0x311ff0['cause']&&console[_0x33cb4b(0x10a)](_0x33cb4b(0xb3)+_0x311ff0[_0x33cb4b(0x101)]),0x1;throw _0x311ff0;}}}export class WorkflowSessionsCommand extends BaseCommand{[a37_0x4af247(0xfa)]=a37_0x4af247(0x97);[a37_0x4af247(0xea)]=a37_0x4af247(0x105);async[a37_0x4af247(0x118)](_0x4a0514){const _0x1ea6f1=a37_0x4af247,{options:_0x5bcf5e,args:_0x185593,tdx:_0x41c9c5}=_0x4a0514;let _0x2ab7b5,_0x2c64e3;if(_0x185593[0x0]){const _0x42d423=_0x185593[0x0][_0x1ea6f1(0xc8)]('.');if(_0x42d423[_0x1ea6f1(0xdc)]===0x1)_0x2ab7b5=_0x42d423[0x0];else{if(_0x42d423[_0x1ea6f1(0xdc)]===0x2)[_0x2ab7b5,_0x2c64e3]=_0x42d423;else return console[_0x1ea6f1(0x10a)]('Error:\x20Invalid\x20pattern.\x20Use\x20format:\x20project\x20or\x20project.workflow'),0x1;}}try{if(_0x5bcf5e[_0x1ea6f1(0xa2)]){if(_0x2ab7b5&&_0x2c64e3)console['error'](_0x1ea6f1(0x89)+_0x2ab7b5+'.'+_0x2c64e3);else _0x2ab7b5&&console[_0x1ea6f1(0x10a)](_0x1ea6f1(0xf5)+_0x2ab7b5);const _0x5dff8a=_0x5bcf5e['status'];_0x5dff8a&&console[_0x1ea6f1(0x10a)](_0x1ea6f1(0xdb)+_0x5dff8a);}const _0x222aa6=await withSpinner(_0x1ea6f1(0x9d),()=>_0x41c9c5[_0x1ea6f1(0xb8)][_0x1ea6f1(0xf3)]({'projectName':_0x2ab7b5,'workflowName':_0x2c64e3,'status':_0x5bcf5e['status'],'fromTime':_0x5bcf5e[_0x1ea6f1(0x9a)],'toTime':_0x5bcf5e['to'],'limit':_0x5bcf5e['limit']}),{'verbose':_0x5bcf5e[_0x1ea6f1(0xa2)]}),_0x26712a=_0x222aa6[_0x1ea6f1(0xf9)];return console[_0x1ea6f1(0x10a)](_0x1ea6f1(0x102)+_0x26712a[_0x1ea6f1(0xdc)]+_0x1ea6f1(0x93)+(_0x26712a[_0x1ea6f1(0xdc)]!==0x1?'s':'')),await handleSDKOutput(_0x26712a,_0x5bcf5e),0x0;}catch(_0x55440b){if(_0x55440b instanceof SDKError)return console[_0x1ea6f1(0x10a)](_0x1ea6f1(0x11d)+_0x55440b['message']),_0x55440b['cause']&&console[_0x1ea6f1(0x10a)](_0x1ea6f1(0xb3)+_0x55440b['cause']),0x1;throw _0x55440b;}}}export class WorkflowAttemptsCommand extends BaseCommand{['name']=a37_0x4af247(0x8c);[a37_0x4af247(0xea)]='List\x20workflow\x20attempts';async[a37_0x4af247(0x118)](_0x136926){const _0x2f09ff=a37_0x4af247,{options:_0x1b5cf0,args:_0x32360f,tdx:_0x1ea2a4}=_0x136926;let _0x5a23d5,_0xd48ae8;if(_0x32360f[0x0]){const _0x89e91b=_0x32360f[0x0][_0x2f09ff(0xc8)]('.');if(_0x89e91b[_0x2f09ff(0xdc)]===0x1)_0x5a23d5=_0x89e91b[0x0];else{if(_0x89e91b[_0x2f09ff(0xdc)]===0x2)[_0x5a23d5,_0xd48ae8]=_0x89e91b;else return console[_0x2f09ff(0x10a)](_0x2f09ff(0xeb)),0x1;}}try{const _0x38ae33=_0x1b5cf0[_0x2f09ff(0xae)];if(_0x1b5cf0[_0x2f09ff(0xa2)]){if(_0x5a23d5&&_0xd48ae8)console[_0x2f09ff(0x10a)](_0x2f09ff(0x89)+_0x5a23d5+'.'+_0xd48ae8);else _0x5a23d5&&console[_0x2f09ff(0x10a)](_0x2f09ff(0xf5)+_0x5a23d5);_0x38ae33&&console[_0x2f09ff(0x10a)](_0x2f09ff(0x9c));}const _0xfe62b9=await withSpinner(_0x2f09ff(0x109),()=>_0x1ea2a4[_0x2f09ff(0xb8)][_0x2f09ff(0x108)]({'projectName':_0x5a23d5,'workflowName':_0xd48ae8,'includeRetried':_0x38ae33,'limit':_0x1b5cf0['limit']}),{'verbose':_0x1b5cf0[_0x2f09ff(0xa2)]}),_0x34a2c1=_0xfe62b9[_0x2f09ff(0xf9)];return console['error'](_0x2f09ff(0x102)+_0x34a2c1['length']+'\x20attempt'+(_0x34a2c1['length']!==0x1?'s':'')),await handleSDKOutput(_0x34a2c1,_0x1b5cf0),0x0;}catch(_0x4aa527){if(_0x4aa527 instanceof SDKError)return console[_0x2f09ff(0x10a)](_0x2f09ff(0x11d)+_0x4aa527[_0x2f09ff(0xbe)]),_0x4aa527[_0x2f09ff(0x101)]&&console[_0x2f09ff(0x10a)](_0x2f09ff(0xb3)+_0x4aa527[_0x2f09ff(0x101)]),0x1;throw _0x4aa527;}}}function a37_0x50b4(_0x7436a7,_0x318a2f){const _0x1436a2=a37_0x1436();return a37_0x50b4=function(_0x50b439,_0x4323b8){_0x50b439=_0x50b439-0x7c;let _0x13d544=_0x1436a2[_0x50b439];return _0x13d544;},a37_0x50b4(_0x7436a7,_0x318a2f);}export class WorkflowAttemptCommand extends BaseCommand{['name']=a37_0x4af247(0xba);['description']=a37_0x4af247(0x8f);async[a37_0x4af247(0x118)](_0x428190){const _0xa0368b=a37_0x4af247,{options:_0x3dc3ea,args:_0x324178,tdx:_0x346b39}=_0x428190,_0x4ebc85=_0x324178[0x0];if(!_0x4ebc85)return console['error']('Error:\x20Attempt\x20ID\x20is\x20required'),0x1;try{_0x3dc3ea['verbose']&&console[_0xa0368b(0x10a)]('Attempt\x20ID:\x20'+_0x4ebc85);const _0x392374=await withSpinner('Getting\x20attempt\x20details...',()=>_0x346b39[_0xa0368b(0xb8)][_0xa0368b(0xbb)](_0x4ebc85),{'verbose':_0x3dc3ea[_0xa0368b(0xa2)]}),_0x3d12dd=_0x392374[_0xa0368b(0xf9)];let _0x4241d1;!_0x3d12dd[_0xa0368b(0x110)]?_0x4241d1=_0x3d12dd[_0xa0368b(0x11b)]?_0xa0368b(0xb0):_0xa0368b(0x120):_0x4241d1=_0x3d12dd[_0xa0368b(0xd3)]?_0xa0368b(0xd3):_0xa0368b(0x10a);let _0x585926;if(_0x3d12dd[_0xa0368b(0xd6)]&&_0x3d12dd[_0xa0368b(0xf7)]){const _0x363f66=new Date(_0x3d12dd[_0xa0368b(0xd6)])[_0xa0368b(0x111)](),_0x2bbe3f=new Date(_0x3d12dd[_0xa0368b(0xf7)])['getTime']();_0x585926=Math[_0xa0368b(0xbd)]((_0x2bbe3f-_0x363f66)/0x3e8);}const _0x13a9dc={'attempt_id':_0x3d12dd['id'],'status':_0x4241d1,..._0x3d12dd[_0xa0368b(0xb5)]!==undefined&&{'index':_0x3d12dd['index']},..._0x3d12dd[_0xa0368b(0x11a)]&&{'project':_0x3d12dd['project'][_0xa0368b(0xfa)]},..._0x3d12dd['workflow']&&{'workflow':_0x3d12dd[_0xa0368b(0xb8)]['name']},..._0x3d12dd['sessionId']&&{'session_id':_0x3d12dd[_0xa0368b(0x80)]},..._0x3d12dd[_0xa0368b(0x8b)]&&{'session_time':_0x3d12dd[_0xa0368b(0x8b)]},..._0x3d12dd[_0xa0368b(0xee)]&&{'retry_attempt':_0x3d12dd[_0xa0368b(0xee)]},..._0x585926!==undefined&&{'duration_sec':_0x585926},..._0x3d12dd[_0xa0368b(0xd6)]&&{'created_at':_0x3d12dd['createdAt']},..._0x3d12dd[_0xa0368b(0xf7)]&&{'finished_at':_0x3d12dd[_0xa0368b(0xf7)]},...Object[_0xa0368b(0xe2)](_0x3d12dd['params'])['length']>0x0&&{'params':_0x3d12dd[_0xa0368b(0x91)]}};return await handleSingleObjectOutput(_0x13a9dc,_0x3dc3ea),0x0;}catch(_0x2c1c8d){if(_0x2c1c8d instanceof SDKError)return console['error'](_0xa0368b(0x11d)+_0x2c1c8d[_0xa0368b(0xbe)]),_0x2c1c8d[_0xa0368b(0x101)]&&console[_0xa0368b(0x10a)](_0xa0368b(0xb3)+_0x2c1c8d[_0xa0368b(0x101)]),0x1;throw _0x2c1c8d;}}}export class WorkflowTasksCommand extends BaseCommand{[a37_0x4af247(0xfa)]=a37_0x4af247(0xc7);[a37_0x4af247(0xea)]=a37_0x4af247(0xd1);async[a37_0x4af247(0x118)](_0x4789dc){const _0x56003e=a37_0x4af247,{options:_0x34ec2d,args:_0x18261e,tdx:_0x698a9e}=_0x4789dc,_0x424451=_0x18261e[0x0];if(!_0x424451)return console[_0x56003e(0x10a)]('Error:\x20Attempt\x20ID\x20is\x20required'),0x1;try{const _0x49d02c=_0x34ec2d[_0x56003e(0xc4)];_0x34ec2d[_0x56003e(0xa2)]&&(console[_0x56003e(0x10a)](_0x56003e(0xb1)+_0x424451),_0x49d02c&&console[_0x56003e(0x10a)](_0x56003e(0xf1)));const _0x2eff4e=await withSpinner(_0x56003e(0xb9),()=>_0x698a9e['workflow'][_0x56003e(0x90)](_0x424451,_0x49d02c||![]),{'verbose':_0x34ec2d[_0x56003e(0xa2)]}),_0x1fd013=_0x2eff4e[_0x56003e(0xf9)];return console[_0x56003e(0x10a)]('✔\x20Found\x20'+_0x1fd013[_0x56003e(0xdc)]+_0x56003e(0x116)+(_0x1fd013[_0x56003e(0xdc)]!==0x1?'s':'')),await handleSDKOutput(_0x1fd013,_0x34ec2d),0x0;}catch(_0x475021){if(_0x475021 instanceof SDKError)return console[_0x56003e(0x10a)]('Error:\x20'+_0x475021[_0x56003e(0xbe)]),_0x475021['cause']&&console['error'](_0x56003e(0xb3)+_0x475021[_0x56003e(0x101)]),0x1;throw _0x475021;}}}function a37_0x1436(){const _0x2117c0=['Listing\x20workflow\x20sessions...','✔\x20Workflow\x20run\x20started','Error:\x20Project\x20name\x20is\x20required','\x20\x20Attempt\x20ID:\x20','param','verbose','filesExtracted','1156DhwtSj','Project\x20filter:\x20','2359406XjrFuX','readFile','Download\x20workflow\x20project\x20from\x20Treasure\x20Data','\x22?\x20This\x20cannot\x20be\x20undone.','Usage:\x20workflow:download\x20<project-name>\x20[output-dir]','Kill\x20a\x20running\x20attempt','9707930FYLGkg','workflow:push','includeRetried','Usage:\x20workflow:delete\x20<project-name-or-id>','canceling','Attempt\x20ID:\x20','Session\x20time:\x20','\x20\x20Cause:\x20','utf-8','index','Error:\x20Invalid\x20JSON\x20in\x20--params','format','workflow','Getting\x20attempt\x20tasks...','workflow:attempt','attempt','631sDfrQh','round','message','Expected\x20format:\x20--param\x20key=value','delete','projectName','stringify','\x20\x20New\x20attempt\x20ID:\x20','includeSubtasks','parse','22uNHQcw','workflow:tasks','split','Retry\x20a\x20session\x20or\x20attempt','1305rLVWAy','\x20is\x20not\x20a\x20directory','\x20\x20Project:\x20','Start\x20a\x20workflow\x20run','...','Retrying\x20attempt...','stat','Show\x20tasks\x20for\x20an\x20attempt','fileSize','success','Delete\x20workflow\x20project\x20from\x20Treasure\x20Data','✔\x20Deleted\x20project\x20','createdAt','List\x20all\x20workflow\x20projects','workflow:run','10141506roSNnw','resumeFrom','Status:\x20','length','workflow:workflows','\x20\x20Workflow:\x20','Output\x20directory:\x20','✔\x20Downloaded\x20','map','keys','retrySession','\x20project','\x20workflow','retryAttempt','push','session:','Project\x20directory:\x20','description','Error:\x20Invalid\x20pattern.\x20Use\x20format:\x20project\x20or\x20project.workflow','run','No\x20log\x20files\x20found\x20for\x20this\x20attempt','retryAttemptName','16MrLFqT','Push\x20workflow\x20project\x20to\x20Treasure\x20Data','Including\x20subtasks:\x20yes','Revision:\x20','sessions','workflow:projects','Filter:\x20project=','workflow:kill','finishedAt','substring','data','name','Usage:\x20workflow\x20retry\x20session:<id>\x20or\x20workflow\x20retry\x20attempt:<id>','✔\x20Retry\x20started','Reason:\x20','json','Validation:\x20skipped','Downloading\x20logs...','cause','✔\x20Found\x20','Usage:\x20workflow\x20run\x20<project.workflow>\x20[options]','task','List\x20workflow\x20execution\x20sessions','Workflow:\x20','kill','attempts','Listing\x20workflow\x20attempts...','error','Resume\x20from:\x20','Fetching\x20log\x20files...','Parameters:\x20','startsWith','\x20\x20Session\x20ID:\x20','done','getTime','Pushing\x20workflow\x20project...','Error:\x20Session\x20ID\x20or\x20attempt\x20ID\x20is\x20required','Are\x20you\x20sure\x20you\x20want\x20to\x20kill\x20attempt\x20','Error:\x20Invalid\x20parameter\x20format:\x20','\x20task','27954oGDqlV','execute','From\x20task:\x20','project','cancelRequested','Listing\x20workflow\x20projects...','Error:\x20','fromTask','4640928iCCjFm','running','\x20\x20Location:\x20','workflow:delete','Starting\x20workflow\x20run...','attemptId','Cancelled','Downloading\x20project\x20','attempt:','sessionId','session','Error:\x20Project\x20name\x20or\x20ID\x20is\x20required','Project:\x20','select','projects','✔\x20Pushed\x20','download','Retrying\x20session...','Filter:\x20','Error:\x20Attempt\x20ID\x20is\x20required','sessionTime','workflow:attempts','limit','2689335USTwmu','Show\x20specific\x20attempt\x20details','tasks','params','workflow:download','\x20session','yes','projectId','Listing\x20workflows...','workflow:sessions','revision','Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20project\x20\x22','from','Error:\x20Target\x20must\x20be\x20prefixed\x20with\x20\x22session:\x22\x20or\x20\x22attempt:\x22','Include\x20retried:\x20yes'];a37_0x1436=function(){return _0x2117c0;};return a37_0x1436();}export class WorkflowLogsCommand extends BaseCommand{[a37_0x4af247(0xfa)]='workflow:logs';[a37_0x4af247(0xea)]='Show\x20logs\x20for\x20a\x20workflow\x20attempt';async[a37_0x4af247(0x118)](_0x48178d){const _0xfed8dd=a37_0x4af247,{options:_0x1c6a47,args:_0x55c4cf,tdx:_0x576386}=_0x48178d,_0x5d78f0=_0x55c4cf[0x0];let _0x844715=_0x55c4cf[0x1];if(!_0x5d78f0)return console['error'](_0xfed8dd(0x8a)),0x1;try{_0x1c6a47[_0xfed8dd(0xa2)]&&(console[_0xfed8dd(0x10a)]('Attempt\x20ID:\x20'+_0x5d78f0),_0x844715&&console[_0xfed8dd(0x10a)]('Task\x20name:\x20'+_0x844715));const _0x5b35a9=await withSpinner(_0xfed8dd(0x10c),()=>_0x576386[_0xfed8dd(0xb8)]['logFiles'](_0x5d78f0,_0x844715),{'verbose':_0x1c6a47[_0xfed8dd(0xa2)]}),_0x4ab443=_0x5b35a9[_0xfed8dd(0xf9)];if(_0x4ab443[_0xfed8dd(0xdc)]===0x0)return console[_0xfed8dd(0x10a)](_0xfed8dd(0xed)),0x0;if(!_0x844715&&(_0x1c6a47[_0xfed8dd(0xfe)]||_0x1c6a47[_0xfed8dd(0xb7)]))return await handleSDKOutput(_0x4ab443,_0x1c6a47),0x0;if(!_0x844715){const _0x10482d=_0x4ab443[_0xfed8dd(0xe1)](_0x5ddecc=>({'title':_0x5ddecc['taskName']+'\x20('+formatBytes(_0x5ddecc[_0xfed8dd(0xd2)])+')','value':_0x5ddecc['taskName']})),_0x26a48c=await a37_0x12b109({'type':_0xfed8dd(0x84),'name':'task','message':'Select\x20a\x20task\x20to\x20view\x20logs:','choices':_0x10482d});if(!_0x26a48c[_0xfed8dd(0x104)])return console[_0xfed8dd(0x10a)](_0xfed8dd(0x7d)),0x0;_0x844715=_0x26a48c[_0xfed8dd(0x104)];}const _0x34e0fb=await withSpinner(_0xfed8dd(0x100),()=>_0x576386[_0xfed8dd(0xb8)]['logs'](_0x5d78f0,_0x844715),{'verbose':_0x1c6a47[_0xfed8dd(0xa2)]}),_0x42f898=_0x34e0fb[_0xfed8dd(0xf9)];return _0x42f898?console['log'](_0x42f898):console['error']('No\x20log\x20content\x20found'),0x0;}catch(_0xda3f5a){if(_0xda3f5a instanceof SDKError)return console[_0xfed8dd(0x10a)]('Error:\x20'+_0xda3f5a[_0xfed8dd(0xbe)]),_0xda3f5a['cause']&&console[_0xfed8dd(0x10a)](_0xfed8dd(0xb3)+_0xda3f5a['cause']),0x1;throw _0xda3f5a;}}}export class WorkflowKillCommand extends BaseCommand{[a37_0x4af247(0xfa)]=a37_0x4af247(0xf6);['description']=a37_0x4af247(0xab);async[a37_0x4af247(0x118)](_0x508807){const _0x47cdc5=a37_0x4af247,{options:_0x4b9617,args:_0x437cbb,tdx:_0x379550}=_0x508807,_0x265d01=_0x437cbb[0x0];if(!_0x265d01)return console[_0x47cdc5(0x10a)](_0x47cdc5(0x8a)),0x1;try{const _0x577f37=_0x4b9617['reason'];_0x4b9617['verbose']&&(console['error'](_0x47cdc5(0xb1)+_0x265d01),_0x577f37&&console[_0x47cdc5(0x10a)](_0x47cdc5(0xfd)+_0x577f37));if(!_0x4b9617[_0x47cdc5(0x94)]){const _0x126075=await confirm(_0x47cdc5(0x114)+_0x265d01+'?');if(!_0x126075)return console[_0x47cdc5(0x10a)]('Cancelled'),0x0;}const _0x257c88=await withSpinner('Killing\x20attempt...',()=>_0x379550[_0x47cdc5(0xb8)][_0x47cdc5(0x107)](_0x265d01,_0x577f37),{'verbose':_0x4b9617[_0x47cdc5(0xa2)]}),_0xa4a8a1=_0x257c88[_0x47cdc5(0xf9)];return console[_0x47cdc5(0x10a)]('✔\x20'+_0xa4a8a1),0x0;}catch(_0x3dde78){if(_0x3dde78 instanceof SDKError)return console[_0x47cdc5(0x10a)](_0x47cdc5(0x11d)+_0x3dde78[_0x47cdc5(0xbe)]),_0x3dde78['cause']&&console[_0x47cdc5(0x10a)](_0x47cdc5(0xb3)+_0x3dde78[_0x47cdc5(0x101)]),0x1;throw _0x3dde78;}}}export class WorkflowRetryCommand extends BaseCommand{[a37_0x4af247(0xfa)]='workflow:retry';[a37_0x4af247(0xea)]=a37_0x4af247(0xc9);async[a37_0x4af247(0x118)](_0x2fd264){const _0x5162a1=a37_0x4af247,{options:_0x4167cf,args:_0x3884eb,tdx:_0xed22a2}=_0x2fd264,_0x2ebf4a=_0x3884eb[0x0];if(!_0x2ebf4a)return console[_0x5162a1(0x10a)](_0x5162a1(0x113)),console[_0x5162a1(0x10a)]('Usage:\x20workflow\x20retry\x20session:<id>\x20or\x20workflow\x20retry\x20attempt:<id>'),0x1;let _0x3b457c=![],_0x3f519a=_0x2ebf4a;if(_0x2ebf4a[_0x5162a1(0x10e)](_0x5162a1(0xe8)))_0x3b457c=!![],_0x3f519a=_0x2ebf4a[_0x5162a1(0xf8)](0x8);else{if(_0x2ebf4a['startsWith'](_0x5162a1(0x7f)))_0x3b457c=![],_0x3f519a=_0x2ebf4a[_0x5162a1(0xf8)](0x8);else return console[_0x5162a1(0x10a)](_0x5162a1(0x9b)),console[_0x5162a1(0x10a)](_0x5162a1(0xfb)),0x1;}try{const _0x487d6e=_0x4167cf[_0x5162a1(0x11e)],_0x37df90=_0x4167cf[_0x5162a1(0xda)],_0x535594=_0x4167cf[_0x5162a1(0x91)],_0x5aede9=_0x4167cf['force'];_0x4167cf[_0x5162a1(0xa2)]&&(console[_0x5162a1(0x10a)]('Target:\x20'+(_0x3b457c?_0x5162a1(0x81):_0x5162a1(0xbb))+'\x20'+_0x3f519a),_0x487d6e&&console[_0x5162a1(0x10a)](_0x5162a1(0x119)+_0x487d6e),_0x37df90&&console['error'](_0x5162a1(0x10b)+_0x37df90),_0x535594&&console[_0x5162a1(0x10a)]('Params:\x20'+_0x535594),_0x5aede9&&console[_0x5162a1(0x10a)]('Force:\x20yes'));let _0x14a71e;if(_0x535594)try{if(_0x535594[_0x5162a1(0x10e)]('@')){const _0x1a141a=await import('fs/promises'),_0x25c510=_0x535594['substring'](0x1),_0x5ddc7=await _0x1a141a[_0x5162a1(0xa7)](_0x25c510,_0x5162a1(0xb4));_0x14a71e=JSON[_0x5162a1(0xc5)](_0x5ddc7);}else _0x14a71e=JSON[_0x5162a1(0xc5)](_0x535594);}catch{return console[_0x5162a1(0x10a)](_0x5162a1(0xb6)),0x1;}if(!_0x4167cf[_0x5162a1(0x94)]){const _0x4f7fad=await confirm('Are\x20you\x20sure\x20you\x20want\x20to\x20retry\x20'+(_0x3b457c?_0x5162a1(0x81):_0x5162a1(0xbb))+'\x20'+_0x3f519a+'?');if(!_0x4f7fad)return console[_0x5162a1(0x10a)](_0x5162a1(0x7d)),0x0;}let _0x460d60;_0x3b457c?_0x460d60=await withSpinner(_0x5162a1(0x88),()=>_0xed22a2[_0x5162a1(0xb8)][_0x5162a1(0xe3)](_0x3f519a,{'fromTask':_0x487d6e,'retryParams':_0x14a71e}),{'verbose':_0x4167cf[_0x5162a1(0xa2)]}):_0x460d60=await withSpinner(_0x5162a1(0xcf),()=>_0xed22a2[_0x5162a1(0xb8)][_0x5162a1(0xe6)](_0x3f519a,{'resumeFrom':_0x37df90,'retryParams':_0x14a71e,'force':_0x5aede9}),{'verbose':_0x4167cf[_0x5162a1(0xa2)]});const _0x5ac7ae=_0x460d60['data'];return console[_0x5162a1(0x10a)](_0x5162a1(0xfc)),console[_0x5162a1(0x10a)](_0x5162a1(0xc3)+_0x5ac7ae[_0x5162a1(0x7c)]),console[_0x5162a1(0x10a)](_0x5162a1(0x10f)+_0x5ac7ae[_0x5162a1(0x80)]),0x0;}catch(_0x3146ae){if(_0x3146ae instanceof SDKError)return console[_0x5162a1(0x10a)](_0x5162a1(0x11d)+_0x3146ae['message']),_0x3146ae['cause']&&console['error'](_0x5162a1(0xb3)+_0x3146ae[_0x5162a1(0x101)]),0x1;throw _0x3146ae;}}}export class WorkflowRunCommand extends BaseCommand{[a37_0x4af247(0xfa)]=a37_0x4af247(0xd8);[a37_0x4af247(0xea)]=a37_0x4af247(0xcd);async[a37_0x4af247(0x118)](_0x4bcc53){const _0x1d3862=a37_0x4af247,{options:_0x3df5b5,args:_0x1616b3,tdx:_0x340dc9}=_0x4bcc53,_0x403c4a=_0x1616b3[0x0];if(!_0x403c4a)return console['error']('Error:\x20Workflow\x20identifier\x20is\x20required'),console[_0x1d3862(0x10a)](_0x1d3862(0x103)),0x1;const _0x5ad0bf=_0x3df5b5[_0x1d3862(0xa1)],_0x40e8da=_0x3df5b5[_0x1d3862(0x8b)],_0x5c312d={};if(_0x5ad0bf&&Array['isArray'](_0x5ad0bf))for(const _0x506210 of _0x5ad0bf){const _0x42bba8=_0x506210['indexOf']('=');if(_0x42bba8===-0x1)return console[_0x1d3862(0x10a)](_0x1d3862(0x115)+_0x506210),console[_0x1d3862(0x10a)](_0x1d3862(0xbf)),0x1;const _0x26157d=_0x506210[_0x1d3862(0xf8)](0x0,_0x42bba8),_0x5824f1=_0x506210[_0x1d3862(0xf8)](_0x42bba8+0x1);try{_0x5c312d[_0x26157d]=JSON['parse'](_0x5824f1);}catch{_0x5c312d[_0x26157d]=_0x5824f1;}}_0x3df5b5[_0x1d3862(0xa2)]&&(console[_0x1d3862(0x10a)](_0x1d3862(0x106)+_0x403c4a),Object[_0x1d3862(0xe2)](_0x5c312d)[_0x1d3862(0xdc)]>0x0&&console[_0x1d3862(0x10a)](_0x1d3862(0x10d)+JSON[_0x1d3862(0xc2)](_0x5c312d)),_0x40e8da&&console['error'](_0x1d3862(0xb2)+_0x40e8da));const _0x57e50a=await withSpinner(_0x1d3862(0x123),()=>_0x340dc9[_0x1d3862(0xb8)][_0x1d3862(0xec)](_0x403c4a,_0x5c312d,{'sessionTime':_0x40e8da}),{'verbose':_0x3df5b5[_0x1d3862(0xa2)]}),_0xbe16ed=_0x57e50a[_0x1d3862(0xf9)];return console[_0x1d3862(0x10a)](_0x1d3862(0x9e)),console[_0x1d3862(0x10a)](_0x1d3862(0xa0)+_0xbe16ed['id']),console[_0x1d3862(0x10a)](_0x1d3862(0x10f)+_0xbe16ed['sessionId']),console[_0x1d3862(0x10a)](_0x1d3862(0xcc)+_0xbe16ed[_0x1d3862(0x11a)]?.[_0x1d3862(0xfa)]),console[_0x1d3862(0x10a)](_0x1d3862(0xde)+_0xbe16ed[_0x1d3862(0xb8)]?.[_0x1d3862(0xfa)]),0x0;}}export class WorkflowDownloadCommand extends BaseCommand{['name']=a37_0x4af247(0x92);[a37_0x4af247(0xea)]=a37_0x4af247(0xa8);async['execute'](_0x356606){const _0x1133ff=a37_0x4af247,{options:_0x540f71,args:_0x735013,tdx:_0x244064}=_0x356606,_0x29cd5a=_0x735013[0x0],_0x2db136=_0x735013[0x1]||'.';if(!_0x29cd5a)return console[_0x1133ff(0x10a)](_0x1133ff(0x9f)),console[_0x1133ff(0x10a)](_0x1133ff(0xaa)),0x1;const _0x8bd133=_0x540f71[_0x1133ff(0x98)];_0x540f71[_0x1133ff(0xa2)]&&(console[_0x1133ff(0x10a)](_0x1133ff(0x83)+_0x29cd5a),console['error'](_0x1133ff(0xdf)+_0x2db136),_0x8bd133&&console[_0x1133ff(0x10a)]('Revision:\x20'+_0x8bd133));const _0x25aaf5=await withSpinner(_0x1133ff(0x7e)+_0x29cd5a+_0x1133ff(0xce),()=>_0x244064[_0x1133ff(0xb8)][_0x1133ff(0x87)](_0x29cd5a,_0x2db136,{'revision':_0x8bd133}),{'verbose':_0x540f71[_0x1133ff(0xa2)]}),_0x4571ca=_0x25aaf5[_0x1133ff(0xf9)];return console['error'](_0x1133ff(0xe0)+_0x4571ca[_0x1133ff(0xc1)]),console['error']('\x20\x20Revision:\x20'+_0x4571ca[_0x1133ff(0x98)]),console[_0x1133ff(0x10a)]('\x20\x20Files\x20extracted:\x20'+_0x4571ca[_0x1133ff(0xa3)]),console[_0x1133ff(0x10a)](_0x1133ff(0x121)+_0x2db136+'/'+_0x4571ca[_0x1133ff(0xc1)]),0x0;}}export class WorkflowPushCommand extends BaseCommand{['name']=a37_0x4af247(0xad);[a37_0x4af247(0xea)]=a37_0x4af247(0xf0);async[a37_0x4af247(0x118)](_0xc7c50e){const _0xd66c9e=a37_0x4af247,{options:_0x113f17,args:_0x30f5d5,tdx:_0xfc93e7}=_0xc7c50e;let _0x2397b6='.',_0x865781=_0x113f17[_0xd66c9e(0xfa)];if(_0x30f5d5[0x0]){const {promises:_0x583302}=await import('fs');try{const _0x45511a=await _0x583302[_0xd66c9e(0xd0)](_0x30f5d5[0x0]);if(_0x45511a['isDirectory']())_0x2397b6=_0x30f5d5[0x0];else return console[_0xd66c9e(0x10a)]('Error:\x20'+_0x30f5d5[0x0]+_0xd66c9e(0xcb)),0x1;}catch{_0x865781=_0x30f5d5[0x0],_0x2397b6='.';}}const _0x590287=_0x113f17[_0xd66c9e(0x98)],_0x5ecb45=_0x113f17['skipValidation'];_0x113f17[_0xd66c9e(0xa2)]&&(console[_0xd66c9e(0x10a)](_0xd66c9e(0xe9)+_0x2397b6),_0x865781&&console[_0xd66c9e(0x10a)]('Project\x20name:\x20'+_0x865781),_0x590287&&console['error'](_0xd66c9e(0xf2)+_0x590287),_0x5ecb45&&console['error'](_0xd66c9e(0xff)));const _0x20db9a=await withSpinner(_0xd66c9e(0x112),()=>_0xfc93e7[_0xd66c9e(0xb8)][_0xd66c9e(0xe7)](_0x2397b6,{'projectName':_0x865781,'revision':_0x590287,'skipValidation':_0x5ecb45}),{'verbose':_0x113f17[_0xd66c9e(0xa2)]}),_0x526b7d=_0x20db9a[_0xd66c9e(0xf9)];return console[_0xd66c9e(0x10a)](_0xd66c9e(0x86)+_0x526b7d[_0xd66c9e(0xc1)]),console[_0xd66c9e(0x10a)]('\x20\x20Project\x20ID:\x20'+_0x526b7d[_0xd66c9e(0x95)]),console['error']('\x20\x20Revision:\x20'+_0x526b7d[_0xd66c9e(0x98)]),0x0;}}export class WorkflowDeleteCommand extends BaseCommand{[a37_0x4af247(0xfa)]=a37_0x4af247(0x122);[a37_0x4af247(0xea)]=a37_0x4af247(0xd4);async['execute'](_0x5479ec){const _0x5998a9=a37_0x4af247,{options:_0x3cbfd5,args:_0x1fb04f,tdx:_0x4e061b}=_0x5479ec,_0x2d965c=_0x1fb04f[0x0];if(!_0x2d965c)return console['error'](_0x5998a9(0x82)),console[_0x5998a9(0x10a)](_0x5998a9(0xaf)),0x1;_0x3cbfd5[_0x5998a9(0xa2)]&&console['error'](_0x5998a9(0x83)+_0x2d965c);if(!_0x3cbfd5['yes']){const _0x3869b8=await confirm(_0x5998a9(0x99)+_0x2d965c+_0x5998a9(0xa9));if(!_0x3869b8)return console[_0x5998a9(0x10a)](_0x5998a9(0x7d)),0x0;}const _0x5929cb=await withSpinner('Deleting\x20project\x20'+_0x2d965c+_0x5998a9(0xce),()=>_0x4e061b[_0x5998a9(0xb8)][_0x5998a9(0xc0)](_0x2d965c),{'verbose':_0x3cbfd5[_0x5998a9(0xa2)]}),_0x880fda=_0x5929cb[_0x5998a9(0xf9)];return console[_0x5998a9(0x10a)](_0x5998a9(0xd5)+_0x880fda[_0x5998a9(0xc1)]),console['error']('\x20\x20Project\x20ID:\x20'+_0x880fda[_0x5998a9(0x95)]),0x0;}}
package/dist/core/auth.js CHANGED
@@ -1 +1 @@
1
- (function(_0xb550ff,_0x156bc9){const _0x4b8d3e=a36_0x1804,_0x4e6c08=_0xb550ff();while(!![]){try{const _0x1eef34=-parseInt(_0x4b8d3e(0xdf))/0x1*(parseInt(_0x4b8d3e(0xef))/0x2)+-parseInt(_0x4b8d3e(0xf3))/0x3*(-parseInt(_0x4b8d3e(0xea))/0x4)+-parseInt(_0x4b8d3e(0xe6))/0x5+-parseInt(_0x4b8d3e(0xe4))/0x6*(-parseInt(_0x4b8d3e(0xde))/0x7)+-parseInt(_0x4b8d3e(0xf1))/0x8+-parseInt(_0x4b8d3e(0xe0))/0x9+parseInt(_0x4b8d3e(0xe8))/0xa*(parseInt(_0x4b8d3e(0xf0))/0xb);if(_0x1eef34===_0x156bc9)break;else _0x4e6c08['push'](_0x4e6c08['shift']());}catch(_0x2b60ae){_0x4e6c08['push'](_0x4e6c08['shift']());}}}(a36_0x1b63,0xbc279));import{platform}from'os';import{readFileSync}from'fs';import{fileURLToPath}from'url';function a36_0x1804(_0x4e583,_0x2b8f08){const _0x1b6338=a36_0x1b63();return a36_0x1804=function(_0x180424,_0x16b7a1){_0x180424=_0x180424-0xdc;let _0x308e7e=_0x1b6338[_0x180424];return _0x308e7e;},a36_0x1804(_0x4e583,_0x2b8f08);}import{dirname,join}from'path';import{getAPIKey}from'./config.js';export function getVersion(){const _0x311d43=a36_0x1804;try{const _0x238509=fileURLToPath(import.meta[_0x311d43(0xe3)]),_0x146577=dirname(_0x238509),_0x5f1e07=join(_0x146577,_0x311d43(0xec)),_0x7eba9f=JSON[_0x311d43(0xe1)](readFileSync(_0x5f1e07,_0x311d43(0xdd)));return _0x7eba9f[_0x311d43(0xed)];}catch{return _0x311d43(0xe7);}}export function getUserAgent(){const _0x2592b2=a36_0x1804,_0x1ec14a=getVersion(),_0x286b18=platform(),_0x23d8e1=process['version']['replace']('v','');return _0x2592b2(0xe2)+_0x1ec14a+'\x20('+_0x286b18+_0x2592b2(0xeb)+_0x23d8e1+')';}export function getAuthHeaders(_0x37abfd,_0x47a671){const _0x5a6e96=a36_0x1804,_0x24dd2c=getVersion(),_0x1aabfc={'User-Agent':getUserAgent(),'X-TD-Client':'tdx','X-TD-Client-Version':_0x24dd2c};return _0x47a671&&(_0x1aabfc[_0x5a6e96(0xee)]=_0x5a6e96(0xe9)+_0x47a671),_0x1aabfc;}export function toHeaderRecord(_0x3e6843){const _0x37635d=a36_0x1804,_0x2fd1ae={};for(const [_0x25b032,_0x4c670e]of Object[_0x37635d(0xdc)](_0x3e6843)){_0x4c670e!==undefined&&(_0x2fd1ae[_0x25b032]=_0x4c670e);}return _0x2fd1ae;}export function getTrinoHeaders(_0x5d6202,_0x3ed3da){const _0x16f7bf=a36_0x1804,_0x5149ba=getAuthHeaders(_0x5d6202,_0x3ed3da),_0x39ae1e=toHeaderRecord(_0x5149ba);return delete _0x39ae1e[_0x16f7bf(0xee)],_0x3ed3da&&(_0x39ae1e[_0x16f7bf(0xf2)]=_0x3ed3da),_0x39ae1e;}export function hasAPIKey(_0x5de1b7){const _0x474c5e=a36_0x1804,_0x5330d9=getAPIKey(_0x5de1b7);return _0x5330d9!==undefined&&_0x5330d9[_0x474c5e(0xe5)]>0x0;}function a36_0x1b63(){const _0x573de4=['TD1\x20','16AQDmie',';\x20node/','../../package.json','version','Authorization','92802XYfiIh','3452196deSbjI','5997008tRchRN','X-Trino-User','127761JBnSfd','entries','utf-8','290269HkBLMr','3hyRDWt','12452562uFfYoP','parse','tdx/','url','30pWCatK','length','3933755nbnxVO','0.0.0','110dcEGEW'];a36_0x1b63=function(){return _0x573de4;};return a36_0x1b63();}
1
+ (function(_0x536b17,_0x4217e1){const _0x36c143=a38_0x40fc,_0x26b741=_0x536b17();while(!![]){try{const _0x31a3e1=-parseInt(_0x36c143(0x180))/0x1*(parseInt(_0x36c143(0x17f))/0x2)+parseInt(_0x36c143(0x17d))/0x3+parseInt(_0x36c143(0x185))/0x4+parseInt(_0x36c143(0x186))/0x5*(-parseInt(_0x36c143(0x17e))/0x6)+-parseInt(_0x36c143(0x183))/0x7*(parseInt(_0x36c143(0x184))/0x8)+parseInt(_0x36c143(0x187))/0x9+-parseInt(_0x36c143(0x18f))/0xa;if(_0x31a3e1===_0x4217e1)break;else _0x26b741['push'](_0x26b741['shift']());}catch(_0x531e63){_0x26b741['push'](_0x26b741['shift']());}}}(a38_0x1f56,0xc3abc));import{platform}from'os';import{readFileSync}from'fs';function a38_0x1f56(){const _0x3e3b10=['248423aXLIrf','328ZSAXce','3890456rWrkLl','4020910LZeTEj','13583709IOPdrX','X-Trino-User','version','length','TD1\x20','0.0.0','Authorization','entries','4277460GABxOJ','3687228ABszBn','6fhmYxg','5116jDQntX','87Ssuklv','../../package.json','tdx/'];a38_0x1f56=function(){return _0x3e3b10;};return a38_0x1f56();}import{fileURLToPath}from'url';import{dirname,join}from'path';import{getAPIKey}from'./config.js';function a38_0x40fc(_0x4ef0fe,_0x24c49a){const _0x1f5632=a38_0x1f56();return a38_0x40fc=function(_0x40fcc0,_0x332e58){_0x40fcc0=_0x40fcc0-0x17d;let _0x3f968f=_0x1f5632[_0x40fcc0];return _0x3f968f;},a38_0x40fc(_0x4ef0fe,_0x24c49a);}export function getVersion(){const _0x54805d=a38_0x40fc;try{const _0x4c08f5=fileURLToPath(import.meta['url']),_0x5e615d=dirname(_0x4c08f5),_0x132a1f=join(_0x5e615d,_0x54805d(0x181)),_0x256481=JSON['parse'](readFileSync(_0x132a1f,'utf-8'));return _0x256481[_0x54805d(0x189)];}catch{return _0x54805d(0x18c);}}export function getUserAgent(){const _0x3cfd25=a38_0x40fc,_0x3862c7=getVersion(),_0x3d3b8b=platform(),_0x141f2a=process[_0x3cfd25(0x189)]['replace']('v','');return _0x3cfd25(0x182)+_0x3862c7+'\x20('+_0x3d3b8b+';\x20node/'+_0x141f2a+')';}export function getAuthHeaders(_0xe34992,_0x31efcb){const _0x148379=a38_0x40fc,_0x47ac4f=getVersion(),_0x169bc0={'User-Agent':getUserAgent(),'X-TD-Client':'tdx','X-TD-Client-Version':_0x47ac4f};return _0x31efcb&&(_0x169bc0[_0x148379(0x18d)]=_0x148379(0x18b)+_0x31efcb),_0x169bc0;}export function toHeaderRecord(_0x59b211){const _0x57b4fa=a38_0x40fc,_0x188b90={};for(const [_0xeb6e1d,_0x1fef40]of Object[_0x57b4fa(0x18e)](_0x59b211)){_0x1fef40!==undefined&&(_0x188b90[_0xeb6e1d]=_0x1fef40);}return _0x188b90;}export function getTrinoHeaders(_0x189f1d,_0x129636){const _0x529275=a38_0x40fc,_0x5fca3e=getAuthHeaders(_0x189f1d,_0x129636),_0x3a16bb=toHeaderRecord(_0x5fca3e);return delete _0x3a16bb[_0x529275(0x18d)],_0x129636&&(_0x3a16bb[_0x529275(0x188)]=_0x129636),_0x3a16bb;}export function hasAPIKey(_0x427eb5){const _0x331136=a38_0x40fc,_0x1443b2=getAPIKey(_0x427eb5);return _0x1443b2!==undefined&&_0x1443b2[_0x331136(0x18a)]>0x0;}
@@ -1 +1 @@
1
- (function(_0xe3308f,_0x34f7af){const _0x4235e0=a37_0x5ec0,_0x397029=_0xe3308f();while(!![]){try{const _0x4f21a4=parseInt(_0x4235e0(0xcc))/0x1+parseInt(_0x4235e0(0xb7))/0x2*(parseInt(_0x4235e0(0xb0))/0x3)+-parseInt(_0x4235e0(0xcd))/0x4+-parseInt(_0x4235e0(0xb4))/0x5*(-parseInt(_0x4235e0(0xc4))/0x6)+-parseInt(_0x4235e0(0xa5))/0x7+parseInt(_0x4235e0(0xbb))/0x8+parseInt(_0x4235e0(0xaa))/0x9*(-parseInt(_0x4235e0(0xa6))/0xa);if(_0x4f21a4===_0x34f7af)break;else _0x397029['push'](_0x397029['shift']());}catch(_0x4d6959){_0x397029['push'](_0x397029['shift']());}}}(a37_0x371e,0x38584));import{homedir}from'os';function a37_0x371e(){const _0x1746a2=['split','ap03','toUpperCase','existsSync','tdx','.cache','startsWith','entries','TD_API_KEY_','join','⚠\x20Cleaned\x20up\x20API\x20keys\x20from\x20legacy\x20.env\x20file','error','3226734TEzNEm','8890HFvVYz','ap02','Warning:\x20Failed\x20to\x20read\x20config\x20file\x20','llm_default_project','3906UUTDNA','trim','\x20(TD_API_KEY)','parse','jp01','us01','103470xNtiBA','profile','env','⚠\x20Failed\x20to\x20migrate\x20API\x20key\x20to\x20keychain:\x20','4145MpADND','utf-8','TDX_CACHE_DIR','18AgWqBm','map','includes','stg-ap03','2406872jELcEp','.env.','.config','yellow','stg-jp01','replace','stg-us01','Warning:\x20Failed\x20to\x20read\x20','.env','1524fuHTtt','⚠\x20Migrated\x20API\x20key\x20from\x20.env\x20to\x20secure\x20keychain\x20storage','tdx.json','Warning:\x20Failed\x20to\x20load\x20','match','TD_API_KEY','eu01','apiKeys','440563tAXasp','739288oSKqeS','profiles','Warning:\x20Failed\x20to\x20cache\x20LLM\x20project\x20name:','global:\x20','\x27,\x20defaulting\x20to\x20us01','readFileSync','dev-eu01','warn','slice'];a37_0x371e=function(){return _0x1746a2;};return a37_0x371e();}import{join}from'path';import{existsSync,readFileSync,writeFileSync,mkdirSync,unlinkSync}from'fs';import*as a37_0x328f52 from'node:fs';import*as a37_0x4a6338 from'node:path';import{SITE_ALIASES}from'../types/index.js';import{validateSecureFilePermissions}from'../utils/file-permissions.js';import{getKeychainAPIKey,saveKeychainAPIKey,isKeychainAvailable}from'./keychain.js';function a37_0x5ec0(_0x82cceb,_0x2a9b5a){const _0x371efc=a37_0x371e();return a37_0x5ec0=function(_0x5ec0b5,_0x237f4c){_0x5ec0b5=_0x5ec0b5-0x9b;let _0x1c9522=_0x371efc[_0x5ec0b5];return _0x1c9522;},a37_0x5ec0(_0x82cceb,_0x2a9b5a);}import{getCachedCredential,setCachedCredential}from'./credential-cache.js';import a37_0x3cb57c from'chalk';export function getConfigDir(){const _0x281eb5=a37_0x5ec0;return process[_0x281eb5(0xb2)]['TDX_CONFIG_DIR']||join(homedir(),_0x281eb5(0xbd),'tdx');}export function getConfigFile(){return join(getConfigDir(),'.env');}export function getConfigFilePath(_0x580da6){const _0xce3052=a37_0x5ec0,_0x7089aa=getConfigDir();return _0x580da6?a37_0x4a6338[_0xce3052(0xa2)](_0x7089aa,_0xce3052(0xbc)+_0x580da6):getConfigFile();}export function getCacheDir(){const _0xe4d130=a37_0x5ec0;return process['env'][_0xe4d130(0xb6)]||join(homedir(),_0xe4d130(0x9e),_0xe4d130(0x9d));}export function getLLMProjectCacheFile(){const _0x578d30=a37_0x5ec0;return join(getCacheDir(),_0x578d30(0xa9));}export function readCachedLLMProject(){const _0x1c1b0d=a37_0x5ec0;try{const _0x992422=getLLMProjectCacheFile();if(!existsSync(_0x992422))return null;return readFileSync(_0x992422,_0x1c1b0d(0xb5))[_0x1c1b0d(0xab)]();}catch{return null;}}export function writeCachedLLMProject(_0x5a1960){const _0x1c6ba2=a37_0x5ec0;try{const _0x18cdaa=getCacheDir(),_0x3e35dc=getLLMProjectCacheFile();!existsSync(_0x18cdaa)&&mkdirSync(_0x18cdaa,{'recursive':!![]}),writeFileSync(_0x3e35dc,_0x5a1960,_0x1c6ba2(0xb5));}catch(_0x1c2831){console[_0x1c6ba2(0xa4)](_0x1c6ba2(0xcf),_0x1c2831);}}export function parseEnvFile(_0x2b5674){const _0x42334e=a37_0x5ec0,_0x388322={};for(const _0x2a1412 of _0x2b5674[_0x42334e(0xd6)]('\x0a')){const _0x44a531=_0x2a1412['trim']();if(!_0x44a531||_0x44a531['startsWith']('#'))continue;const _0x15e8da=_0x44a531[_0x42334e(0xc8)](/^([^=]+)=(.*)$/);if(_0x15e8da){const _0x2f8bfc=_0x15e8da[0x1][_0x42334e(0xab)]();let _0x46fc64=_0x15e8da[0x2][_0x42334e(0xab)]();(_0x46fc64['startsWith']('\x22')&&_0x46fc64['endsWith']('\x22')||_0x46fc64['startsWith']('\x27')&&_0x46fc64['endsWith']('\x27'))&&(_0x46fc64=_0x46fc64[_0x42334e(0xd5)](0x1,-0x1)),_0x388322[_0x2f8bfc]=_0x46fc64;}}return _0x388322;}export function readUserConfig(){const _0x2c820a=a37_0x5ec0,_0xaa6e94=getConfigFile();if(!existsSync(_0xaa6e94))return{};try{const _0x3db294=readFileSync(_0xaa6e94,_0x2c820a(0xb5));return parseEnvFile(_0x3db294);}catch(_0x3aa655){return console[_0x2c820a(0xd4)](_0x2c820a(0xa8)+_0xaa6e94+':',_0x3aa655),{};}}export function resolveSite(_0x53890c){const _0x187b0f=a37_0x5ec0,_0x3d0067=[_0x187b0f(0xaf),_0x187b0f(0xae),_0x187b0f(0xca),_0x187b0f(0xa7),_0x187b0f(0xd7),'dev-us01',_0x187b0f(0xd3),_0x187b0f(0xc1),_0x187b0f(0xbf),_0x187b0f(0xba)];if(_0x3d0067[_0x187b0f(0xb9)](_0x53890c))return _0x53890c;if(_0x53890c in SITE_ALIASES)return SITE_ALIASES[_0x53890c];return console['warn']('Warning:\x20Unknown\x20site\x20\x27'+_0x53890c+_0x187b0f(0xd1)),_0x187b0f(0xaf);}let cachedUserConfig=null;export function loadUserConfigOnce(){return cachedUserConfig===null&&(cachedUserConfig=readUserConfig()),cachedUserConfig;}export function clearConfigCache(){cachedUserConfig=null;}export function getAPIKey(_0x3afb4a,_0x1e1175){const _0x8c5483=a37_0x5ec0,_0x19975e=_0x3afb4a[_0x8c5483(0x9b)]()[_0x8c5483(0xc0)](/-/g,'_'),_0x352e7c='TD_API_KEY_'+_0x19975e;if(process[_0x8c5483(0xb2)][_0x352e7c])return process[_0x8c5483(0xb2)][_0x352e7c];if(process['env'][_0x8c5483(0xc9)])return process[_0x8c5483(0xb2)][_0x8c5483(0xc9)];const _0x1e67cd=_0x1e1175||getActiveProfileName();if(_0x1e67cd){const _0x426dbc=loadProfileEnv(_0x1e67cd);if(_0x426dbc){if(_0x426dbc[_0x352e7c])return _0x426dbc[_0x352e7c];if(_0x426dbc['TD_API_KEY'])return _0x426dbc[_0x8c5483(0xc9)];}}const _0x4965d2=loadUserConfigOnce();if(_0x4965d2[_0x352e7c])return _0x4965d2[_0x352e7c];if(_0x4965d2['TD_API_KEY'])return _0x4965d2[_0x8c5483(0xc9)];return undefined;}export async function getAPIKeyAsync(_0x5d8d8f,_0x59eb09){const _0x3658e9=a37_0x5ec0,_0x24d48c=_0x5d8d8f[_0x3658e9(0x9b)]()[_0x3658e9(0xc0)](/-/g,'_'),_0xb35e02='TD_API_KEY_'+_0x24d48c;if(process[_0x3658e9(0xb2)][_0xb35e02])return process[_0x3658e9(0xb2)][_0xb35e02];if(process[_0x3658e9(0xb2)][_0x3658e9(0xc9)])return process['env'][_0x3658e9(0xc9)];const _0x256364=_0x59eb09||getActiveProfileName()||undefined,_0x1da34b=getCachedCredential(_0x5d8d8f,_0x256364);if(_0x1da34b)return _0x1da34b;const _0x33b958=await getKeychainAPIKey(_0x256364);if(_0x33b958)return setCachedCredential(_0x33b958,_0x5d8d8f,_0x256364),_0x33b958;const _0x5ef4fc=getLegacyEnvAPIKey(_0x5d8d8f,_0x256364);if(_0x5ef4fc){const _0x21c76c=await isKeychainAvailable();if(_0x21c76c)try{await saveKeychainAPIKey(_0x5ef4fc,_0x256364),setCachedCredential(_0x5ef4fc,_0x5d8d8f,_0x256364);const _0x4dbc73=getConfigFilePath(_0x256364);cleanupLegacyEnvFile(_0x4dbc73)&&console[_0x3658e9(0xd4)](a37_0x3cb57c[_0x3658e9(0xbe)](_0x3658e9(0xc5)));}catch(_0x193888){console[_0x3658e9(0xd4)](a37_0x3cb57c[_0x3658e9(0xbe)](_0x3658e9(0xb3)+_0x193888));}return _0x5ef4fc;}return undefined;}function getLegacyEnvAPIKey(_0x117ea3,_0x3988e3){const _0x34b30d=a37_0x5ec0,_0x53bce4=_0x117ea3['toUpperCase']()['replace'](/-/g,'_'),_0x2825fd='TD_API_KEY_'+_0x53bce4;if(_0x3988e3){const _0x28752b=loadProfileEnv(_0x3988e3);if(_0x28752b){if(_0x28752b[_0x2825fd])return _0x28752b[_0x2825fd];if(_0x28752b[_0x34b30d(0xc9)])return _0x28752b['TD_API_KEY'];}}const _0x25c763=loadUserConfigOnce();if(_0x25c763[_0x2825fd])return _0x25c763[_0x2825fd];if(_0x25c763['TD_API_KEY'])return _0x25c763[_0x34b30d(0xc9)];return undefined;}function cleanupLegacyEnvFile(_0x1aa593){const _0x159960=a37_0x5ec0;if(!existsSync(_0x1aa593))return![];try{const _0x4ef93e=readFileSync(_0x1aa593,_0x159960(0xb5)),_0x41d8db=_0x4ef93e[_0x159960(0xd6)]('\x0a'),_0xc7513e=_0x41d8db['filter'](_0x1eb3ea=>{const _0x3b15d2=_0x159960,_0x6033a=_0x1eb3ea[_0x3b15d2(0xab)]();if(!_0x6033a||_0x6033a[_0x3b15d2(0x9f)]('#'))return!![];const [_0x1161bd]=_0x6033a[_0x3b15d2(0xd6)]('=');return!_0x1161bd['startsWith']('TD_API_KEY');}),_0x21cdb4=_0xc7513e['some'](_0x3b786e=>{const _0x3c3011=_0x159960,_0x5afbc5=_0x3b786e[_0x3c3011(0xab)]();return _0x5afbc5&&!_0x5afbc5[_0x3c3011(0x9f)]('#');});if(!_0x21cdb4)return unlinkSync(_0x1aa593),!![];return writeFileSync(_0x1aa593,_0xc7513e['join']('\x0a'),{'mode':0x180}),!![];}catch{return![];}}export function getAPIKeySource(_0x1e31c4,_0x440a72){const _0x521a52=a37_0x5ec0,_0x55f58c=_0x521a52(0xa1)+_0x1e31c4[_0x521a52(0x9b)]()[_0x521a52(0xc0)](/-/g,'_');if(process[_0x521a52(0xb2)][_0x55f58c])return'env:\x20'+_0x55f58c;if(process[_0x521a52(0xb2)][_0x521a52(0xc9)])return'env:\x20TD_API_KEY';const _0x48e0d9=_0x440a72||getActiveProfileName();if(_0x48e0d9){const _0x4502cc=loadProfileEnv(_0x48e0d9);if(_0x4502cc){if(_0x4502cc[_0x55f58c])return'profile:\x20'+_0x48e0d9+'\x20('+_0x55f58c+')';if(_0x4502cc['TD_API_KEY'])return'profile:\x20'+_0x48e0d9+_0x521a52(0xac);}}const _0x46700c=loadUserConfigOnce(),_0x39f933=getConfigFile();if(_0x46700c[_0x55f58c])return _0x521a52(0xd0)+_0x39f933+'\x20('+_0x55f58c+')';if(_0x46700c[_0x521a52(0xc9)])return _0x521a52(0xd0)+_0x39f933+'\x20(TD_API_KEY)';return null;}function loadProfileEnv(_0x18fe10){const _0x313020=a37_0x5ec0,_0x356e2e=a37_0x4a6338[_0x313020(0xa2)](getConfigDir(),_0x313020(0xbc)+_0x18fe10);if(a37_0x328f52[_0x313020(0x9c)](_0x356e2e)){validateSecureFilePermissions(_0x356e2e);try{const _0x31d398=a37_0x328f52[_0x313020(0xd2)](_0x356e2e,_0x313020(0xb5));return parseEnvFile(_0x31d398);}catch(_0x177c1d){console['warn'](_0x313020(0xc7)+_0x356e2e+':\x20'+_0x177c1d);}}const _0x49fc37=a37_0x4a6338['join'](getConfigDir(),_0x313020(0xce),_0x18fe10,_0x313020(0xc3));if(a37_0x328f52[_0x313020(0x9c)](_0x49fc37)){validateSecureFilePermissions(_0x49fc37);try{const _0x14a343=a37_0x328f52[_0x313020(0xd2)](_0x49fc37,_0x313020(0xb5));return parseEnvFile(_0x14a343);}catch(_0x1b2c8c){return console[_0x313020(0xd4)](_0x313020(0xc7)+_0x49fc37+':\x20'+_0x1b2c8c),null;}}return null;}function getActiveProfileName(){const _0x38bad4=a37_0x5ec0,_0x4ac43f=a37_0x4a6338[_0x38bad4(0xa2)](getConfigDir(),_0x38bad4(0xc6));if(!a37_0x328f52[_0x38bad4(0x9c)](_0x4ac43f))return null;try{const _0x1ad77a=a37_0x328f52[_0x38bad4(0xd2)](_0x4ac43f,'utf-8'),_0x24f500=JSON[_0x38bad4(0xad)](_0x1ad77a);return _0x24f500[_0x38bad4(0xb1)]||null;}catch{return null;}}export function saveAPIKey(_0x219a05,_0x5e3e16,_0x471db8){const _0x5b7e43=a37_0x5ec0,_0x34c355=getConfigDir(),_0x450b01=getConfigFilePath(_0x471db8);!existsSync(_0x34c355)&&mkdirSync(_0x34c355,{'recursive':!![],'mode':0x1c0});let _0x14cc28={};if(existsSync(_0x450b01))try{const _0x4206d5=readFileSync(_0x450b01,_0x5b7e43(0xb5));_0x14cc28=parseEnvFile(_0x4206d5);}catch(_0x8a3845){console[_0x5b7e43(0xd4)](_0x5b7e43(0xc2)+_0x450b01+':',_0x8a3845);}const _0x369259=_0x219a05[_0x5b7e43(0x9b)]()[_0x5b7e43(0xc0)](/-/g,'_');_0x14cc28['TD_API_KEY_'+_0x369259]=_0x5e3e16;const _0x47f9d9=Object[_0x5b7e43(0xa0)](_0x14cc28)[_0x5b7e43(0xb8)](([_0x264c3b,_0x51e2dd])=>_0x264c3b+'='+_0x51e2dd);writeFileSync(_0x450b01,_0x47f9d9['join']('\x0a')+'\x0a',{'mode':0x180});}export async function saveAPIKeyAsync(_0x33bc99,_0x32049f,_0x395e0f){const _0x4ed20a=a37_0x5ec0;await saveKeychainAPIKey(_0x33bc99,_0x395e0f),setCachedCredential(_0x33bc99,_0x32049f,_0x395e0f);const _0x214a21=getConfigFilePath(_0x395e0f);cleanupLegacyEnvFile(_0x214a21)&&console[_0x4ed20a(0xd4)](a37_0x3cb57c[_0x4ed20a(0xbe)](_0x4ed20a(0xa3)));}export function loadConfig(){const _0x15d7f6=a37_0x5ec0,_0x5c9fe6={'apiKeys':{},'defaultSite':_0x15d7f6(0xaf)},_0x116270=[_0x15d7f6(0xaf),_0x15d7f6(0xae),_0x15d7f6(0xca),_0x15d7f6(0xa7),_0x15d7f6(0xd7),'dev-us01',_0x15d7f6(0xd3),_0x15d7f6(0xc1),_0x15d7f6(0xbf),_0x15d7f6(0xba)];for(const _0x15979b of _0x116270){const _0x238129=getAPIKey(_0x15979b);_0x238129&&(_0x5c9fe6[_0x15d7f6(0xcb)][_0x15979b]=_0x238129);}return _0x5c9fe6;}
1
+ (function(_0x48b1a5,_0x5f14c3){const _0x2c4c77=a39_0x48f5,_0x4f3f6b=_0x48b1a5();while(!![]){try{const _0x49bc3b=parseInt(_0x2c4c77(0x205))/0x1*(-parseInt(_0x2c4c77(0x1f6))/0x2)+parseInt(_0x2c4c77(0x1d4))/0x3*(parseInt(_0x2c4c77(0x1de))/0x4)+parseInt(_0x2c4c77(0x1e3))/0x5*(parseInt(_0x2c4c77(0x1d5))/0x6)+parseInt(_0x2c4c77(0x1f7))/0x7+-parseInt(_0x2c4c77(0x1f1))/0x8+-parseInt(_0x2c4c77(0x1d9))/0x9*(-parseInt(_0x2c4c77(0x1f4))/0xa)+-parseInt(_0x2c4c77(0x1e8))/0xb*(-parseInt(_0x2c4c77(0x1d1))/0xc);if(_0x49bc3b===_0x5f14c3)break;else _0x4f3f6b['push'](_0x4f3f6b['shift']());}catch(_0x37e87a){_0x4f3f6b['push'](_0x4f3f6b['shift']());}}}(a39_0x3101,0x90084));import{homedir}from'os';import{join}from'path';import{existsSync,readFileSync,writeFileSync,mkdirSync,unlinkSync}from'fs';import*as a39_0x2617aa from'node:fs';import*as a39_0x28cafd from'node:path';import{SITE_ALIASES}from'../types/index.js';import{validateSecureFilePermissions}from'../utils/file-permissions.js';function a39_0x48f5(_0x3ff48b,_0x331733){const _0x3101b6=a39_0x3101();return a39_0x48f5=function(_0x48f503,_0x2345de){_0x48f503=_0x48f503-0x1cf;let _0x1144f0=_0x3101b6[_0x48f503];return _0x1144f0;},a39_0x48f5(_0x3ff48b,_0x331733);}import{getKeychainAPIKey,saveKeychainAPIKey,isKeychainAvailable}from'./keychain.js';import{getCachedCredential,setCachedCredential}from'./credential-cache.js';import a39_0x548bff from'chalk';export function getConfigDir(){const _0x4892a7=a39_0x48f5;return process[_0x4892a7(0x1fe)][_0x4892a7(0x1f9)]||join(homedir(),'.config',_0x4892a7(0x1e4));}export function getConfigFile(){const _0x5d37b6=a39_0x48f5;return join(getConfigDir(),_0x5d37b6(0x1fb));}export function getConfigFilePath(_0x2f7424){const _0x1699f9=getConfigDir();return _0x2f7424?a39_0x28cafd['join'](_0x1699f9,'.env.'+_0x2f7424):getConfigFile();}export function getCacheDir(){const _0x5ccc7d=a39_0x48f5;return process[_0x5ccc7d(0x1fe)][_0x5ccc7d(0x1f2)]||join(homedir(),_0x5ccc7d(0x1eb),_0x5ccc7d(0x1e4));}export function getLLMProjectCacheFile(){const _0x20ae27=a39_0x48f5;return join(getCacheDir(),_0x20ae27(0x201));}export function readCachedLLMProject(){const _0xc87b2f=a39_0x48f5;try{const _0x4878ca=getLLMProjectCacheFile();if(!existsSync(_0x4878ca))return null;return readFileSync(_0x4878ca,_0xc87b2f(0x1ee))[_0xc87b2f(0x1e1)]();}catch{return null;}}export function writeCachedLLMProject(_0x16a6de){const _0x38b240=a39_0x48f5;try{const _0x19fcea=getCacheDir(),_0x5de3d1=getLLMProjectCacheFile();!existsSync(_0x19fcea)&&mkdirSync(_0x19fcea,{'recursive':!![]}),writeFileSync(_0x5de3d1,_0x16a6de,_0x38b240(0x1ee));}catch(_0x28b8ad){console[_0x38b240(0x1dc)]('Warning:\x20Failed\x20to\x20cache\x20LLM\x20project\x20name:',_0x28b8ad);}}export function parseEnvFile(_0x29a1c4){const _0x1e9d47=a39_0x48f5,_0x55a58c={};for(const _0x40e3e of _0x29a1c4[_0x1e9d47(0x1e5)]('\x0a')){const _0x3e7701=_0x40e3e[_0x1e9d47(0x1e1)]();if(!_0x3e7701||_0x3e7701[_0x1e9d47(0x1da)]('#'))continue;const _0x57c2b5=_0x3e7701['match'](/^([^=]+)=(.*)$/);if(_0x57c2b5){const _0x391f7a=_0x57c2b5[0x1][_0x1e9d47(0x1e1)]();let _0x472d79=_0x57c2b5[0x2][_0x1e9d47(0x1e1)]();(_0x472d79[_0x1e9d47(0x1da)]('\x22')&&_0x472d79[_0x1e9d47(0x20d)]('\x22')||_0x472d79[_0x1e9d47(0x1da)]('\x27')&&_0x472d79[_0x1e9d47(0x20d)]('\x27'))&&(_0x472d79=_0x472d79['slice'](0x1,-0x1)),_0x55a58c[_0x391f7a]=_0x472d79;}}return _0x55a58c;}export function readUserConfig(){const _0x354ef8=a39_0x48f5,_0x58de93=getConfigFile();if(!existsSync(_0x58de93))return{};try{const _0x1e28a3=readFileSync(_0x58de93,_0x354ef8(0x1ee));return parseEnvFile(_0x1e28a3);}catch(_0xf925a1){return console[_0x354ef8(0x1d0)](_0x354ef8(0x1e7)+_0x58de93+':',_0xf925a1),{};}}export function resolveSite(_0x43bfc7){const _0x412bb1=a39_0x48f5,_0x3b6ccc=['us01',_0x412bb1(0x1fa),_0x412bb1(0x1f0),'ap02',_0x412bb1(0x208),_0x412bb1(0x1dd),_0x412bb1(0x202),'stg-us01',_0x412bb1(0x1fc),_0x412bb1(0x20f)];if(_0x3b6ccc[_0x412bb1(0x1d7)](_0x43bfc7))return _0x43bfc7;if(_0x43bfc7 in SITE_ALIASES)return SITE_ALIASES[_0x43bfc7];return console[_0x412bb1(0x1d0)](_0x412bb1(0x1ea)+_0x43bfc7+_0x412bb1(0x1f8)),'us01';}let cachedUserConfig=null;export function loadUserConfigOnce(){return cachedUserConfig===null&&(cachedUserConfig=readUserConfig()),cachedUserConfig;}export function clearConfigCache(){cachedUserConfig=null;}export function getAPIKey(_0x542a23,_0x2d49e1){const _0x5d607=a39_0x48f5,_0xca2a52=_0x542a23['toUpperCase']()[_0x5d607(0x1d2)](/-/g,'_'),_0x395cf1=_0x5d607(0x1df)+_0xca2a52;if(process[_0x5d607(0x1fe)][_0x395cf1])return process[_0x5d607(0x1fe)][_0x395cf1];if(process[_0x5d607(0x1fe)][_0x5d607(0x1cf)])return process[_0x5d607(0x1fe)][_0x5d607(0x1cf)];const _0x4de2b8=_0x2d49e1||getActiveProfileName();if(_0x4de2b8){const _0x240b88=loadProfileEnv(_0x4de2b8);if(_0x240b88){if(_0x240b88[_0x395cf1])return _0x240b88[_0x395cf1];if(_0x240b88[_0x5d607(0x1cf)])return _0x240b88[_0x5d607(0x1cf)];}}const _0x1fe5b1=loadUserConfigOnce();if(_0x1fe5b1[_0x395cf1])return _0x1fe5b1[_0x395cf1];if(_0x1fe5b1[_0x5d607(0x1cf)])return _0x1fe5b1[_0x5d607(0x1cf)];return undefined;}export async function getAPIKeyAsync(_0x430afe,_0x256461){const _0x1e22f7=a39_0x48f5,_0x408627=_0x430afe['toUpperCase']()[_0x1e22f7(0x1d2)](/-/g,'_'),_0x2f57e1=_0x1e22f7(0x1df)+_0x408627;if(process[_0x1e22f7(0x1fe)][_0x2f57e1])return process[_0x1e22f7(0x1fe)][_0x2f57e1];if(process[_0x1e22f7(0x1fe)][_0x1e22f7(0x1cf)])return process[_0x1e22f7(0x1fe)][_0x1e22f7(0x1cf)];const _0x3b1739=_0x256461||getActiveProfileName()||undefined,_0x16e7b8=getCachedCredential(_0x430afe,_0x3b1739);if(_0x16e7b8)return _0x16e7b8;const _0x47939c=await getKeychainAPIKey(_0x3b1739);if(_0x47939c)return setCachedCredential(_0x47939c,_0x430afe,_0x3b1739),_0x47939c;const _0x1e3718=getLegacyEnvAPIKey(_0x430afe,_0x3b1739);if(_0x1e3718){const _0x3aa87b=await isKeychainAvailable();if(_0x3aa87b)try{await saveKeychainAPIKey(_0x1e3718,_0x3b1739),setCachedCredential(_0x1e3718,_0x430afe,_0x3b1739);const _0x191145=getConfigFilePath(_0x3b1739);cleanupLegacyEnvFile(_0x191145)&&console[_0x1e22f7(0x1d0)](a39_0x548bff[_0x1e22f7(0x1fd)](_0x1e22f7(0x1db)));}catch(_0x3dc1ab){console[_0x1e22f7(0x1d0)](a39_0x548bff[_0x1e22f7(0x1fd)](_0x1e22f7(0x206)+_0x3dc1ab));}return _0x1e3718;}return undefined;}function getLegacyEnvAPIKey(_0x28c1e2,_0x3fa950){const _0x37e9e0=a39_0x48f5,_0x2dc9b5=_0x28c1e2[_0x37e9e0(0x1ec)]()['replace'](/-/g,'_'),_0x21d94e=_0x37e9e0(0x1df)+_0x2dc9b5;if(_0x3fa950){const _0x3f61db=loadProfileEnv(_0x3fa950);if(_0x3f61db){if(_0x3f61db[_0x21d94e])return _0x3f61db[_0x21d94e];if(_0x3f61db['TD_API_KEY'])return _0x3f61db[_0x37e9e0(0x1cf)];}}const _0x13c409=loadUserConfigOnce();if(_0x13c409[_0x21d94e])return _0x13c409[_0x21d94e];if(_0x13c409['TD_API_KEY'])return _0x13c409[_0x37e9e0(0x1cf)];return undefined;}function a39_0x3101(){const _0x184e44=['yellow','env','filter','stg-us01','llm_default_project','dev-eu01','profile:\x20','\x20(TD_API_KEY)','9557euRETB','⚠\x20Failed\x20to\x20migrate\x20API\x20key\x20to\x20keychain:\x20','ap02','ap03','global:\x20','profile','some','parse','endsWith','profiles','stg-ap03','TD_API_KEY','warn','12jsMHrA','replace','.env.','1135263jtNyfq','1812xbTFOT','existsSync','includes','Warning:\x20Failed\x20to\x20load\x20','585ozXdRf','startsWith','⚠\x20Migrated\x20API\x20key\x20from\x20.env\x20to\x20secure\x20keychain\x20storage','error','dev-us01','4dQcUOf','TD_API_KEY_','env:\x20TD_API_KEY','trim','map','2910FpsgHb','tdx','split','env:\x20','Warning:\x20Failed\x20to\x20read\x20config\x20file\x20','2047133WUunPi','join','Warning:\x20Unknown\x20site\x20\x27','.cache','toUpperCase','us01','utf-8','apiKeys','eu01','9099872RDNwnv','TDX_CACHE_DIR','readFileSync','62470fBfkLT','Warning:\x20Failed\x20to\x20read\x20','50iTWRxn','5740154jhsEoR','\x27,\x20defaulting\x20to\x20us01','TDX_CONFIG_DIR','jp01','.env','stg-jp01'];a39_0x3101=function(){return _0x184e44;};return a39_0x3101();}function cleanupLegacyEnvFile(_0x513ad9){const _0x59ed27=a39_0x48f5;if(!existsSync(_0x513ad9))return![];try{const _0x507be6=readFileSync(_0x513ad9,'utf-8'),_0x4ed6e6=_0x507be6['split']('\x0a'),_0x51d88b=_0x4ed6e6[_0x59ed27(0x1ff)](_0x2730b9=>{const _0x20932f=_0x59ed27,_0x11989b=_0x2730b9[_0x20932f(0x1e1)]();if(!_0x11989b||_0x11989b[_0x20932f(0x1da)]('#'))return!![];const [_0x51d141]=_0x11989b['split']('=');return!_0x51d141[_0x20932f(0x1da)]('TD_API_KEY');}),_0x2167f0=_0x51d88b[_0x59ed27(0x20b)](_0x3a98b5=>{const _0x37eefc=_0x59ed27,_0x57a6df=_0x3a98b5[_0x37eefc(0x1e1)]();return _0x57a6df&&!_0x57a6df[_0x37eefc(0x1da)]('#');});if(!_0x2167f0)return unlinkSync(_0x513ad9),!![];return writeFileSync(_0x513ad9,_0x51d88b[_0x59ed27(0x1e9)]('\x0a'),{'mode':0x180}),!![];}catch{return![];}}export function getAPIKeySource(_0x12e47a,_0x53830a){const _0x275d9b=a39_0x48f5,_0x5cfb9b='TD_API_KEY_'+_0x12e47a['toUpperCase']()[_0x275d9b(0x1d2)](/-/g,'_');if(process[_0x275d9b(0x1fe)][_0x5cfb9b])return _0x275d9b(0x1e6)+_0x5cfb9b;if(process[_0x275d9b(0x1fe)]['TD_API_KEY'])return _0x275d9b(0x1e0);const _0x5f370f=_0x53830a||getActiveProfileName();if(_0x5f370f){const _0x1cba31=loadProfileEnv(_0x5f370f);if(_0x1cba31){if(_0x1cba31[_0x5cfb9b])return _0x275d9b(0x203)+_0x5f370f+'\x20('+_0x5cfb9b+')';if(_0x1cba31[_0x275d9b(0x1cf)])return'profile:\x20'+_0x5f370f+_0x275d9b(0x204);}}const _0x472919=loadUserConfigOnce(),_0x57b758=getConfigFile();if(_0x472919[_0x5cfb9b])return _0x275d9b(0x209)+_0x57b758+'\x20('+_0x5cfb9b+')';if(_0x472919[_0x275d9b(0x1cf)])return _0x275d9b(0x209)+_0x57b758+_0x275d9b(0x204);return null;}function loadProfileEnv(_0x49137e){const _0x6ff2a9=a39_0x48f5,_0x27e4c0=a39_0x28cafd[_0x6ff2a9(0x1e9)](getConfigDir(),_0x6ff2a9(0x1d3)+_0x49137e);if(a39_0x2617aa['existsSync'](_0x27e4c0)){validateSecureFilePermissions(_0x27e4c0);try{const _0x1d7dd2=a39_0x2617aa[_0x6ff2a9(0x1f3)](_0x27e4c0,_0x6ff2a9(0x1ee));return parseEnvFile(_0x1d7dd2);}catch(_0x73caf){console[_0x6ff2a9(0x1d0)](_0x6ff2a9(0x1d8)+_0x27e4c0+':\x20'+_0x73caf);}}const _0x403dda=a39_0x28cafd[_0x6ff2a9(0x1e9)](getConfigDir(),_0x6ff2a9(0x20e),_0x49137e,_0x6ff2a9(0x1fb));if(a39_0x2617aa[_0x6ff2a9(0x1d6)](_0x403dda)){validateSecureFilePermissions(_0x403dda);try{const _0x5e7ac9=a39_0x2617aa[_0x6ff2a9(0x1f3)](_0x403dda,_0x6ff2a9(0x1ee));return parseEnvFile(_0x5e7ac9);}catch(_0x600311){return console[_0x6ff2a9(0x1d0)](_0x6ff2a9(0x1d8)+_0x403dda+':\x20'+_0x600311),null;}}return null;}function getActiveProfileName(){const _0x1e2671=a39_0x48f5,_0x4983a7=a39_0x28cafd[_0x1e2671(0x1e9)](getConfigDir(),'tdx.json');if(!a39_0x2617aa[_0x1e2671(0x1d6)](_0x4983a7))return null;try{const _0x323ec1=a39_0x2617aa[_0x1e2671(0x1f3)](_0x4983a7,_0x1e2671(0x1ee)),_0x4ce806=JSON[_0x1e2671(0x20c)](_0x323ec1);return _0x4ce806[_0x1e2671(0x20a)]||null;}catch{return null;}}export function saveAPIKey(_0x448d86,_0x2bd28a,_0x1e9701){const _0x4ac019=a39_0x48f5,_0x28e821=getConfigDir(),_0x5c3c78=getConfigFilePath(_0x1e9701);!existsSync(_0x28e821)&&mkdirSync(_0x28e821,{'recursive':!![],'mode':0x1c0});let _0x48550a={};if(existsSync(_0x5c3c78))try{const _0x9b791e=readFileSync(_0x5c3c78,_0x4ac019(0x1ee));_0x48550a=parseEnvFile(_0x9b791e);}catch(_0x5cd683){console['warn'](_0x4ac019(0x1f5)+_0x5c3c78+':',_0x5cd683);}const _0x24adba=_0x448d86[_0x4ac019(0x1ec)]()[_0x4ac019(0x1d2)](/-/g,'_');_0x48550a[_0x4ac019(0x1df)+_0x24adba]=_0x2bd28a;const _0x4803a1=Object['entries'](_0x48550a)[_0x4ac019(0x1e2)](([_0x276976,_0x536ea0])=>_0x276976+'='+_0x536ea0);writeFileSync(_0x5c3c78,_0x4803a1['join']('\x0a')+'\x0a',{'mode':0x180});}export async function saveAPIKeyAsync(_0x4c60ad,_0x4f518e,_0x1ad57c){const _0x561bab=a39_0x48f5;await saveKeychainAPIKey(_0x4c60ad,_0x1ad57c),setCachedCredential(_0x4c60ad,_0x4f518e,_0x1ad57c);const _0x316b82=getConfigFilePath(_0x1ad57c);cleanupLegacyEnvFile(_0x316b82)&&console[_0x561bab(0x1d0)](a39_0x548bff['yellow']('⚠\x20Cleaned\x20up\x20API\x20keys\x20from\x20legacy\x20.env\x20file'));}export function loadConfig(){const _0x311c10=a39_0x48f5,_0x40983a={'apiKeys':{},'defaultSite':_0x311c10(0x1ed)},_0x46c83c=[_0x311c10(0x1ed),_0x311c10(0x1fa),_0x311c10(0x1f0),_0x311c10(0x207),_0x311c10(0x208),_0x311c10(0x1dd),'dev-eu01',_0x311c10(0x200),_0x311c10(0x1fc),_0x311c10(0x20f)];for(const _0x2f9d5c of _0x46c83c){const _0x89520c=getAPIKey(_0x2f9d5c);_0x89520c&&(_0x40983a[_0x311c10(0x1ef)][_0x2f9d5c]=_0x89520c);}return _0x40983a;}
@@ -1 +1 @@
1
- (function(_0x3cc236,_0x2592b9){const _0x236db1=a38_0x292f,_0x13f368=_0x3cc236();while(!![]){try{const _0x422a18=-parseInt(_0x236db1(0xb6))/0x1*(parseInt(_0x236db1(0xb7))/0x2)+-parseInt(_0x236db1(0xbf))/0x3*(-parseInt(_0x236db1(0xbb))/0x4)+parseInt(_0x236db1(0xbc))/0x5+-parseInt(_0x236db1(0xb3))/0x6*(-parseInt(_0x236db1(0xb5))/0x7)+-parseInt(_0x236db1(0xb9))/0x8+parseInt(_0x236db1(0xc0))/0x9+-parseInt(_0x236db1(0xb2))/0xa;if(_0x422a18===_0x2592b9)break;else _0x13f368['push'](_0x13f368['shift']());}catch(_0x13ee1a){_0x13f368['push'](_0x13f368['shift']());}}}(a38_0xa8d7,0x2efcc));function a38_0xa8d7(){const _0x4dcdd3=['clear','12OXDoQg','2840931rXVZpU','5735770ZxkoYy','807102frHVgp','now','14UClWNo','1wzVeyW','341344bqSQFN','delete','1386080OBHCyy','loadedAt','179572sLeTlY','1728520lOHXIY','__default_profile__'];a38_0xa8d7=function(){return _0x4dcdd3;};return a38_0xa8d7();}const cache=new Map(),CACHE_TTL_MS=0x5*0x3c*0x3e8;function getCacheKey(_0x1fa8e5,_0x3636de){const _0x58196a=a38_0x292f,_0x4b25c5=_0x1fa8e5||'__default_site__',_0x337a08=_0x3636de||_0x58196a(0xbd);return _0x4b25c5+':'+_0x337a08;}function a38_0x292f(_0x4398bd,_0x11e5f3){const _0xa8d787=a38_0xa8d7();return a38_0x292f=function(_0x292f99,_0x44144f){_0x292f99=_0x292f99-0xb2;let _0x3dcc13=_0xa8d787[_0x292f99];return _0x3dcc13;},a38_0x292f(_0x4398bd,_0x11e5f3);}export function getCachedCredential(_0x581ea6,_0x37f479){const _0xad968a=a38_0x292f,_0x4650cc=getCacheKey(_0x581ea6,_0x37f479),_0x5818c7=cache['get'](_0x4650cc);if(!_0x5818c7)return null;if(Date[_0xad968a(0xb4)]()-_0x5818c7[_0xad968a(0xba)]>CACHE_TTL_MS)return cache[_0xad968a(0xb8)](_0x4650cc),null;return _0x5818c7['apiKey'];}export function setCachedCredential(_0x59185a,_0x2aba41,_0x597508){const _0x969e64=a38_0x292f,_0x1503d2=getCacheKey(_0x2aba41,_0x597508);cache['set'](_0x1503d2,{'apiKey':_0x59185a,'loadedAt':Date[_0x969e64(0xb4)]()});}export function clearCredentialCache(){const _0x58f227=a38_0x292f;cache[_0x58f227(0xbe)]();}export function clearCachedCredential(_0x28b5d1,_0x446371){const _0x367ad9=a38_0x292f,_0x5d6375=getCacheKey(_0x28b5d1,_0x446371);cache[_0x367ad9(0xb8)](_0x5d6375);}
1
+ (function(_0x5aa8e8,_0x55f26a){const _0x13cf3a=a40_0x2276,_0x40706a=_0x5aa8e8();while(!![]){try{const _0x212bd9=-parseInt(_0x13cf3a(0x1ca))/0x1+parseInt(_0x13cf3a(0x1cf))/0x2*(-parseInt(_0x13cf3a(0x1cd))/0x3)+-parseInt(_0x13cf3a(0x1cc))/0x4*(parseInt(_0x13cf3a(0x1d3))/0x5)+parseInt(_0x13cf3a(0x1c7))/0x6*(parseInt(_0x13cf3a(0x1d0))/0x7)+-parseInt(_0x13cf3a(0x1c6))/0x8+parseInt(_0x13cf3a(0x1cb))/0x9*(parseInt(_0x13cf3a(0x1c5))/0xa)+-parseInt(_0x13cf3a(0x1d2))/0xb*(-parseInt(_0x13cf3a(0x1c9))/0xc);if(_0x212bd9===_0x55f26a)break;else _0x40706a['push'](_0x40706a['shift']());}catch(_0x358d8a){_0x40706a['push'](_0x40706a['shift']());}}}(a40_0x5e44,0x504c0));const cache=new Map(),CACHE_TTL_MS=0x5*0x3c*0x3e8;function getCacheKey(_0x46303e,_0x49b518){const _0x28697d=a40_0x2276,_0x18d6e6=_0x46303e||_0x28697d(0x1c8),_0xaaa079=_0x49b518||_0x28697d(0x1ce);return _0x18d6e6+':'+_0xaaa079;}export function getCachedCredential(_0x31a525,_0x1e4bdb){const _0x1d3230=a40_0x2276,_0x4de19d=getCacheKey(_0x31a525,_0x1e4bdb),_0x339884=cache['get'](_0x4de19d);if(!_0x339884)return null;if(Date[_0x1d3230(0x1c3)]()-_0x339884[_0x1d3230(0x1c0)]>CACHE_TTL_MS)return cache[_0x1d3230(0x1c2)](_0x4de19d),null;return _0x339884[_0x1d3230(0x1c1)];}function a40_0x5e44(){const _0x57749f=['delete','now','clear','250XphKew','4872128nOunSZ','234NYfKSv','__default_site__','432jYGGBB','70026OBMFUt','53550sFkOpj','32rwkOig','687mchHSL','__default_profile__','1802wyOznJ','82397UsdzZX','set','286154XTjILZ','206285CKlQyH','loadedAt','apiKey'];a40_0x5e44=function(){return _0x57749f;};return a40_0x5e44();}export function setCachedCredential(_0x54acdd,_0x3e5874,_0x1371ed){const _0x4a57e1=a40_0x2276,_0x3fa427=getCacheKey(_0x3e5874,_0x1371ed);cache[_0x4a57e1(0x1d1)](_0x3fa427,{'apiKey':_0x54acdd,'loadedAt':Date[_0x4a57e1(0x1c3)]()});}export function clearCredentialCache(){const _0x2023a7=a40_0x2276;cache[_0x2023a7(0x1c4)]();}function a40_0x2276(_0x9d31b7,_0x4bb7e8){const _0x5e4472=a40_0x5e44();return a40_0x2276=function(_0x227664,_0x273a90){_0x227664=_0x227664-0x1c0;let _0x249d66=_0x5e4472[_0x227664];return _0x249d66;},a40_0x2276(_0x9d31b7,_0x4bb7e8);}export function clearCachedCredential(_0x2ba4fb,_0x350d58){const _0x5389b5=a40_0x2276,_0x1763ee=getCacheKey(_0x2ba4fb,_0x350d58);cache[_0x5389b5(0x1c2)](_0x1763ee);}
@@ -16,6 +16,7 @@ export declare class GlobalContext {
16
16
  apiKey?: string;
17
17
  verbose: boolean;
18
18
  logLevel: LogLevel;
19
+ profile?: string;
19
20
  private layers;
20
21
  private activeProfile;
21
22
  private sessionId;