@treasuredata/tdx 0.7.3 → 0.7.4

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 (108) hide show
  1. package/dist/bin.js +1 -1
  2. package/dist/build-info.json +2 -2
  3. package/dist/cli-categories.js +1 -1
  4. package/dist/cli.js +1 -1
  5. package/dist/client/cdp-api-client.d.ts +20 -1
  6. package/dist/client/cdp-api-client.d.ts.map +1 -1
  7. package/dist/client/cdp-api-client.js +1 -1
  8. package/dist/client/cdp-api-client.js.map +1 -1
  9. package/dist/client/engage-api-client.js +1 -1
  10. package/dist/client/http-client.js +1 -1
  11. package/dist/client/llm-api-client.js +1 -1
  12. package/dist/client/rate-limiter.js +1 -1
  13. package/dist/client/td-api-client.js +1 -1
  14. package/dist/client/trino-api-client.js +1 -1
  15. package/dist/client/workflow-client.js +1 -1
  16. package/dist/commands/activations.js +1 -1
  17. package/dist/commands/api-command.js +1 -1
  18. package/dist/commands/auth-command.js +1 -1
  19. package/dist/commands/chat-command.js +1 -1
  20. package/dist/commands/claude-command.js +1 -1
  21. package/dist/commands/claude-statusline-command.js +1 -1
  22. package/dist/commands/claude-usage-command.js +1 -1
  23. package/dist/commands/command.js +1 -1
  24. package/dist/commands/context-command.js +1 -1
  25. package/dist/commands/databases.js +1 -1
  26. package/dist/commands/describe.js +1 -1
  27. package/dist/commands/engage-command.js +1 -1
  28. package/dist/commands/job-command.js +1 -1
  29. package/dist/commands/llm-command.js +1 -1
  30. package/dist/commands/llm-proxy.js +1 -1
  31. package/dist/commands/parent-segment-command.js +1 -1
  32. package/dist/commands/profiles-command.js +1 -1
  33. package/dist/commands/query-command.js +1 -1
  34. package/dist/commands/segment-command.js +1 -1
  35. package/dist/commands/segment-create-command.js +1 -1
  36. package/dist/commands/segment-fields-command.js +1 -1
  37. package/dist/commands/segment-pwd-command.js +1 -1
  38. package/dist/commands/segment-update-command.js +1 -1
  39. package/dist/commands/segment-use-command.js +1 -1
  40. package/dist/commands/segments.js +1 -1
  41. package/dist/commands/show.js +1 -1
  42. package/dist/commands/tables.js +1 -1
  43. package/dist/commands/use-command.js +1 -1
  44. package/dist/commands/workflow-command.js +1 -1
  45. package/dist/core/auth.js +1 -1
  46. package/dist/core/config.js +1 -1
  47. package/dist/core/credential-cache.js +1 -1
  48. package/dist/core/global-context.js +1 -1
  49. package/dist/core/keychain.js +1 -1
  50. package/dist/core/profile.js +1 -1
  51. package/dist/core/project-config.js +1 -1
  52. package/dist/core/session.js +1 -1
  53. package/dist/index.js +1 -1
  54. package/dist/proxy/anthropic-adapter.js +1 -1
  55. package/dist/proxy/claude-usage-tracker.js +1 -1
  56. package/dist/proxy/context-signature.js +1 -1
  57. package/dist/proxy/conversation-utils.js +1 -1
  58. package/dist/proxy/server.js +1 -1
  59. package/dist/proxy/session-cache.js +1 -1
  60. package/dist/sdk/api.js +1 -1
  61. package/dist/sdk/engage.js +1 -1
  62. package/dist/sdk/errors.js +1 -1
  63. package/dist/sdk/index.js +1 -1
  64. package/dist/sdk/job.js +1 -1
  65. package/dist/sdk/llm.js +1 -1
  66. package/dist/sdk/query.js +1 -1
  67. package/dist/sdk/segment/parent-segment-preview.js +1 -1
  68. package/dist/sdk/segment/parent-segment-yaml.js +1 -1
  69. package/dist/sdk/segment.d.ts.map +1 -1
  70. package/dist/sdk/segment.js +1 -1
  71. package/dist/sdk/segment.js.map +1 -1
  72. package/dist/sdk/workflow.js +1 -1
  73. package/dist/types/cdp.d.ts +58 -0
  74. package/dist/types/cdp.d.ts.map +1 -1
  75. package/dist/types/endpoints.js +1 -1
  76. package/dist/types/index.d.ts +1 -1
  77. package/dist/types/index.d.ts.map +1 -1
  78. package/dist/types/index.js +1 -1
  79. package/dist/utils/agent-ref-parser.js +1 -1
  80. package/dist/utils/chat-cache.js +1 -1
  81. package/dist/utils/colors.js +1 -1
  82. package/dist/utils/command-output.js +1 -1
  83. package/dist/utils/constants.js +1 -1
  84. package/dist/utils/diff.js +1 -1
  85. package/dist/utils/fields-display.js +1 -1
  86. package/dist/utils/file-permissions.js +1 -1
  87. package/dist/utils/format-detector.js +1 -1
  88. package/dist/utils/formatters.js +1 -1
  89. package/dist/utils/json-loader.js +1 -1
  90. package/dist/utils/llm-backup-utils.js +1 -1
  91. package/dist/utils/model-aliases.js +1 -1
  92. package/dist/utils/model-factors.js +1 -1
  93. package/dist/utils/option-validation.js +1 -1
  94. package/dist/utils/port.js +1 -1
  95. package/dist/utils/process.js +1 -1
  96. package/dist/utils/prompt.js +1 -1
  97. package/dist/utils/segment-path-parser.js +1 -1
  98. package/dist/utils/segment-ref-parser.js +1 -1
  99. package/dist/utils/spinner.js +1 -1
  100. package/dist/utils/sql-parser.js +1 -1
  101. package/dist/utils/sse-parser.js +1 -1
  102. package/dist/utils/string-utils.js +1 -1
  103. package/dist/utils/table-ref-parser.js +1 -1
  104. package/dist/utils/tdx-logger.js +1 -1
  105. package/dist/utils/tree-formatter.js +1 -1
  106. package/dist/utils/version-check.js +1 -1
  107. package/dist/utils/workflow-utils.js +1 -1
  108. package/package.json +1 -1
@@ -1 +1 @@
1
- function a32_0x2fd2(_0x35f29c,_0x47d970){const _0xb7b481=a32_0xb7b4();return a32_0x2fd2=function(_0x2fd2f0,_0x5673af){_0x2fd2f0=_0x2fd2f0-0x1cc;let _0x126054=_0xb7b481[_0x2fd2f0];return _0x126054;},a32_0x2fd2(_0x35f29c,_0x47d970);}function a32_0xb7b4(){const _0x348176=['5928jfippd','log','segmentPath','description','365065sLWzHc','root','897YOrsVG','6pDvZCK','jsonl','5054820aDgpZX','name','126oFUXbz','format','854185sAJhMH','39103845KEyVYM','268728ftUmoJ','5937946gjgEzB','Use\x20\x22tdx\x20context\x20--debug\x22\x20to\x20see\x20context\x20sources','execute','json','error','stringify','2ZQkvHp','segment:pwd','verbose'];a32_0xb7b4=function(){return _0x348176;};return a32_0xb7b4();}const a32_0x52da2b=a32_0x2fd2;(function(_0x1c3933,_0x353ba6){const _0x4e0b98=a32_0x2fd2,_0x2d2583=_0x1c3933();while(!![]){try{const _0x3716c2=parseInt(_0x4e0b98(0x1e1))/0x1*(-parseInt(_0x4e0b98(0x1d1))/0x2)+parseInt(_0x4e0b98(0x1da))/0x3*(-parseInt(_0x4e0b98(0x1d4))/0x4)+parseInt(_0x4e0b98(0x1d8))/0x5*(parseInt(_0x4e0b98(0x1db))/0x6)+-parseInt(_0x4e0b98(0x1e4))/0x7+-parseInt(_0x4e0b98(0x1e3))/0x8*(parseInt(_0x4e0b98(0x1df))/0x9)+-parseInt(_0x4e0b98(0x1dd))/0xa+parseInt(_0x4e0b98(0x1e2))/0xb;if(_0x3716c2===_0x353ba6)break;else _0x2d2583['push'](_0x2d2583['shift']());}catch(_0xcb8a9c){_0x2d2583['push'](_0x2d2583['shift']());}}}(a32_0xb7b4,0x7bacb));import{BaseCommand}from'./command.js';export class SegmentPwdCommand extends BaseCommand{[a32_0x52da2b(0x1de)]=a32_0x52da2b(0x1d2);[a32_0x52da2b(0x1d7)]='Show\x20current\x20segment/folder\x20context';async[a32_0x52da2b(0x1cd)](_0x4a121a){const _0x39c4a3=a32_0x52da2b,{options:_0x2af251}=_0x4a121a;try{const _0x1e1e4e=_0x2af251[_0x39c4a3(0x1d6)];if(!_0x1e1e4e)return _0x2af251[_0x39c4a3(0x1e0)]==='json'||_0x2af251[_0x39c4a3(0x1e0)]==='jsonl'?console[_0x39c4a3(0x1d5)](JSON[_0x39c4a3(0x1d0)]({'path':'/','type':_0x39c4a3(0x1d9)})):console['log']('/'),0x0;if(_0x2af251[_0x39c4a3(0x1e0)]===_0x39c4a3(0x1ce)||_0x2af251[_0x39c4a3(0x1e0)]===_0x39c4a3(0x1dc)){const _0x228bfc={'path':_0x1e1e4e};console[_0x39c4a3(0x1d5)](JSON[_0x39c4a3(0x1d0)](_0x228bfc));}else console['log'](_0x1e1e4e),_0x2af251[_0x39c4a3(0x1d3)]&&(console[_0x39c4a3(0x1cf)](''),console[_0x39c4a3(0x1cf)]('Context\x20details:'),console[_0x39c4a3(0x1cf)]('\x20\x20Path:\x20'+_0x1e1e4e),console[_0x39c4a3(0x1cf)](''),console[_0x39c4a3(0x1cf)]('Use\x20\x22tdx\x20context\x22\x20to\x20see\x20all\x20context\x20parameters'),console['error'](_0x39c4a3(0x1cc)));return 0x0;}catch(_0x42ca9b){throw _0x42ca9b;}}}
1
+ function a32_0x4c3d(_0xd330e8,_0x4519c3){const _0x3b84a8=a32_0x3b84();return a32_0x4c3d=function(_0x4c3ddc,_0x45affe){_0x4c3ddc=_0x4c3ddc-0xb5;let _0x42567c=_0x3b84a8[_0x4c3ddc];return _0x42567c;},a32_0x4c3d(_0xd330e8,_0x4519c3);}const a32_0x1050dc=a32_0x4c3d;(function(_0x4529f8,_0x39b3ac){const _0x443375=a32_0x4c3d,_0x5a1bd3=_0x4529f8();while(!![]){try{const _0x427107=-parseInt(_0x443375(0xb5))/0x1+parseInt(_0x443375(0xbf))/0x2*(-parseInt(_0x443375(0xc7))/0x3)+-parseInt(_0x443375(0xb8))/0x4*(parseInt(_0x443375(0xc0))/0x5)+parseInt(_0x443375(0xbe))/0x6+parseInt(_0x443375(0xbd))/0x7*(parseInt(_0x443375(0xb9))/0x8)+-parseInt(_0x443375(0xb6))/0x9*(parseInt(_0x443375(0xbc))/0xa)+parseInt(_0x443375(0xba))/0xb;if(_0x427107===_0x39b3ac)break;else _0x5a1bd3['push'](_0x5a1bd3['shift']());}catch(_0x8f78f7){_0x5a1bd3['push'](_0x5a1bd3['shift']());}}}(a32_0x3b84,0xb5031));import{BaseCommand}from'./command.js';export class SegmentPwdCommand extends BaseCommand{[a32_0x1050dc(0xb7)]=a32_0x1050dc(0xc8);['description']='Show\x20current\x20segment/folder\x20context';async[a32_0x1050dc(0xc3)](_0x3a7ce9){const _0x27d603=a32_0x1050dc,{options:_0x221584}=_0x3a7ce9;try{const _0x39b414=_0x221584['segmentPath'];if(!_0x39b414)return _0x221584['format']===_0x27d603(0xc2)||_0x221584[_0x27d603(0xcb)]===_0x27d603(0xca)?console[_0x27d603(0xc9)](JSON[_0x27d603(0xbb)]({'path':'/','type':_0x27d603(0xc4)})):console['log']('/'),0x0;if(_0x221584['format']==='json'||_0x221584[_0x27d603(0xcb)]===_0x27d603(0xca)){const _0x23fd05={'path':_0x39b414};console[_0x27d603(0xc9)](JSON[_0x27d603(0xbb)](_0x23fd05));}else console[_0x27d603(0xc9)](_0x39b414),_0x221584[_0x27d603(0xc5)]&&(console[_0x27d603(0xc6)](''),console[_0x27d603(0xc6)]('Context\x20details:'),console[_0x27d603(0xc6)]('\x20\x20Path:\x20'+_0x39b414),console[_0x27d603(0xc6)](''),console[_0x27d603(0xc6)]('Use\x20\x22tdx\x20context\x22\x20to\x20see\x20all\x20context\x20parameters'),console[_0x27d603(0xc6)](_0x27d603(0xc1)));return 0x0;}catch(_0x97b1c4){throw _0x97b1c4;}}}function a32_0x3b84(){const _0x4c9178=['43363012fgSdiF','stringify','1325910ipdpEQ','7zlGuQz','79770epEjcU','2053372FwmrVU','5SLxGwK','Use\x20\x22tdx\x20context\x20--debug\x22\x20to\x20see\x20context\x20sources','json','execute','root','verbose','error','3xOkSSX','segment:pwd','log','jsonl','format','1198798NwGtBn','99zbsXSE','name','1538536vMuQWa','6837256jdeimp'];a32_0x3b84=function(){return _0x4c9178;};return a32_0x3b84();}
@@ -1 +1 @@
1
- const a33_0x5bb845=a33_0x2bf8;function a33_0x2bf8(_0x903029,_0x1e256e){const _0x125370=a33_0x1253();return a33_0x2bf8=function(_0x2bf8f8,_0x5aab77){_0x2bf8f8=_0x2bf8f8-0xdf;let _0xd62241=_0x125370[_0x2bf8f8];return _0xd62241;},a33_0x2bf8(_0x903029,_0x1e256e);}(function(_0x492bfb,_0x23265a){const _0x23f550=a33_0x2bf8,_0x1f7b41=_0x492bfb();while(!![]){try{const _0x377e46=parseInt(_0x23f550(0xe8))/0x1+-parseInt(_0x23f550(0xfb))/0x2+-parseInt(_0x23f550(0xf9))/0x3*(parseInt(_0x23f550(0x102))/0x4)+parseInt(_0x23f550(0x100))/0x5+-parseInt(_0x23f550(0xf5))/0x6+parseInt(_0x23f550(0xef))/0x7+parseInt(_0x23f550(0xfe))/0x8;if(_0x377e46===_0x23265a)break;else _0x1f7b41['push'](_0x1f7b41['shift']());}catch(_0x328b21){_0x1f7b41['push'](_0x1f7b41['shift']());}}}(a33_0x1253,0x25aec));import{BaseCommand}from'./command.js';import{handleSDKOutput}from'../utils/command-output.js';function a33_0x1253(){const _0x30eba8=['\x20\x20tdx\x20segment\x20update\x20\x22High\x20Value\x22\x20--rule\x20\x27...\x27\x20\x20#\x20Relative\x20to\x20context','rule','9627OMPerN','Resolving\x20folder\x20\x27','298182UxLDzF','segmentId','Parent\x20ID:\x20','1057096XsNGlO','segmentName','295155rawYBJ','\x20\x20tdx\x20segment\x20update\x20\x22My\x20Audience/High\x20Value\x22\x20--description\x20\x22...\x22','156CyZWRy','Error:\x20Segment\x20path\x20or\x20name\x20is\x20required','verbose','Updating\x20segment\x20\x27','Resolved\x20folder\x20ID:\x20','.\x20Only\x20child\x20segments\x20can\x20be\x20updated.','Segment\x20ID\x20missing\x20from\x20resolved\x20path','type','Error:\x20Cannot\x20update\x20','\x27...','name','\x20\x20\x20Path:\x20','Update\x20existing\x20child\x20segment','includes','folder','error','261969GQwnCu','segment','data','segmentPath','execute','parentId','description','1443071LKFOfo','Resolved\x20type:\x20','INTERNAL','resolvePathToResource','updateSegmentById','kind','1384200AFfOfe','Use:\x20tdx\x20segment\x20update\x20<path_to_segment>\x20[options]'];a33_0x1253=function(){return _0x30eba8;};return a33_0x1253();}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{['name']='segment:update';[a33_0x5bb845(0xee)]=a33_0x5bb845(0xe4);async[a33_0x5bb845(0xec)](_0x1ad8d4){const _0x3e89c3=a33_0x5bb845,{options:_0x5a43ee,args:_0x313dd1,tdx:_0x50fe4a}=_0x1ad8d4,_0x1382ac=_0x5a43ee;if(_0x313dd1['length']===0x0)return console['error'](_0x3e89c3(0x103)),console[_0x3e89c3(0xe7)]('Usage:\x20tdx\x20segment\x20update\x20<path>\x20[options]'),console['error']('Examples:'),console[_0x3e89c3(0xe7)](_0x3e89c3(0x101)),console['error'](_0x3e89c3(0xf7)),0x1;const _0x50b2d1=_0x313dd1[0x0],_0x2a2f5e=_0x5a43ee[_0x3e89c3(0xeb)];let _0x1a804a=_0x50b2d1;_0x2a2f5e&&!_0x50b2d1[_0x3e89c3(0xe5)]('/')&&(_0x1a804a=_0x2a2f5e+'/'+_0x50b2d1,_0x1382ac[_0x3e89c3(0x104)]&&console[_0x3e89c3(0xe7)]('Resolved\x20relative\x20path\x20to:\x20'+_0x1a804a));const _0x8f3cb7=await withSpinner('Resolving\x20path\x20\x27'+_0x1a804a+'\x27...',()=>_0x50fe4a[_0x3e89c3(0xe9)][_0x3e89c3(0xf2)](_0x1a804a),{'verbose':_0x1382ac[_0x3e89c3(0x104)]}),_0x17523c=_0x8f3cb7[_0x3e89c3(0xea)];_0x1382ac[_0x3e89c3(0x104)]&&console[_0x3e89c3(0xe7)](_0x3e89c3(0xf0)+_0x17523c[_0x3e89c3(0xdf)]);if(_0x17523c[_0x3e89c3(0xdf)]!=='segment')return console[_0x3e89c3(0xe7)](_0x3e89c3(0xe0)+_0x17523c[_0x3e89c3(0xdf)]+_0x3e89c3(0x107)),console['error'](_0x3e89c3(0xf6)),0x1;if(!_0x17523c[_0x3e89c3(0xfc)])throw new SDKError(ErrorCode[_0x3e89c3(0xf1)],_0x3e89c3(0x108));const _0x387ff1=_0x17523c[_0x3e89c3(0xed)],_0x36ea38=_0x17523c[_0x3e89c3(0xfc)];_0x1382ac[_0x3e89c3(0x104)]&&(console[_0x3e89c3(0xe7)](_0x3e89c3(0xfd)+_0x387ff1),console[_0x3e89c3(0xe7)]('Segment\x20ID:\x20'+_0x36ea38));let _0x2695e5;if(_0x1382ac[_0x3e89c3(0xe6)]){const _0x293d53=_0x1382ac[_0x3e89c3(0xe6)],_0x2e200f=await withSpinner(_0x3e89c3(0xfa)+_0x293d53+_0x3e89c3(0xe1),()=>_0x50fe4a[_0x3e89c3(0xe9)]['resolveFolderId'](_0x387ff1,_0x293d53),{'verbose':_0x1382ac[_0x3e89c3(0x104)]});_0x2695e5=parseInt(_0x2e200f[_0x3e89c3(0xea)],0xa),_0x1382ac['verbose']&&console[_0x3e89c3(0xe7)](_0x3e89c3(0x106)+_0x2695e5);}const _0x4ab9ee=await loadJSONFromOptions(_0x1382ac[_0x3e89c3(0xf8)],_0x1382ac['ruleFile']),_0x2cc0dd={'name':_0x1382ac[_0x3e89c3(0xe2)],'description':_0x1382ac[_0x3e89c3(0xee)],'rule':_0x4ab9ee,'kind':_0x1382ac[_0x3e89c3(0xf4)]!==undefined?parseInt(_0x1382ac[_0x3e89c3(0xf4)],0xa):undefined,'segmentFolderId':_0x2695e5},_0x578c26=await withSpinner(_0x3e89c3(0x105)+_0x17523c[_0x3e89c3(0xff)]+_0x3e89c3(0xe1),()=>_0x50fe4a[_0x3e89c3(0xe9)][_0x3e89c3(0xf3)](_0x387ff1,_0x36ea38,_0x2cc0dd),{'verbose':_0x1382ac[_0x3e89c3(0x104)]}),_0x2c6943=_0x578c26[_0x3e89c3(0xea)];return console['error']('✔\x20Updated\x20segment\x20\x27'+_0x2c6943[_0x3e89c3(0xe2)]+'\x27'),_0x1a804a!==_0x50b2d1&&console[_0x3e89c3(0xe7)](_0x3e89c3(0xe3)+_0x1a804a),await handleSDKOutput([_0x2c6943],_0x1382ac),0x0;}}
1
+ function a33_0x4dae(){const _0x25576b=['segment','segmentName','\x27...','type','INTERNAL','Segment\x20ID:\x20','Resolved\x20folder\x20ID:\x20','kind','ruleFile','Segment\x20ID\x20missing\x20from\x20resolved\x20path','1542510TTypIO','7IFGRHV','1855285oZDDcn','.\x20Only\x20child\x20segments\x20can\x20be\x20updated.','Parent\x20ID:\x20','Resolved\x20type:\x20','\x20\x20tdx\x20segment\x20update\x20\x22High\x20Value\x22\x20--rule\x20\x27...\x27\x20\x20#\x20Relative\x20to\x20context','error','description','\x20\x20tdx\x20segment\x20update\x20\x22My\x20Audience/High\x20Value\x22\x20--description\x20\x22...\x22','name','Update\x20existing\x20child\x20segment','updateSegmentById','resolvePathToResource','Examples:','verbose','folder','segmentId','4950992YtBJza','Updating\x20segment\x20\x27','Resolved\x20relative\x20path\x20to:\x20','208462MIxxZs','3577848TNvCUZ','parentId','Resolving\x20path\x20\x27','data','\x20\x20\x20Path:\x20','segmentPath','2025618XteNdw','Resolving\x20folder\x20\x27','516796KRhjWe','2XGubCf','includes'];a33_0x4dae=function(){return _0x25576b;};return a33_0x4dae();}const a33_0x7e638c=a33_0xb437;(function(_0x45eee8,_0x18c053){const _0x5774b4=a33_0xb437,_0x2b98e4=_0x45eee8();while(!![]){try{const _0x167222=parseInt(_0x5774b4(0xb8))/0x1*(parseInt(_0x5774b4(0xae))/0x2)+parseInt(_0x5774b4(0xb5))/0x3+parseInt(_0x5774b4(0xb7))/0x4+parseInt(_0x5774b4(0x9b))/0x5+parseInt(_0x5774b4(0xaf))/0x6*(-parseInt(_0x5774b4(0x9a))/0x7)+-parseInt(_0x5774b4(0xab))/0x8+parseInt(_0x5774b4(0x99))/0x9;if(_0x167222===_0x18c053)break;else _0x2b98e4['push'](_0x2b98e4['shift']());}catch(_0x2479c6){_0x2b98e4['push'](_0x2b98e4['shift']());}}}(a33_0x4dae,0x530a4));import{BaseCommand}from'./command.js';function a33_0xb437(_0xdddfc9,_0x2291ae){const _0x4daef0=a33_0x4dae();return a33_0xb437=function(_0xb4379f,_0x5240c5){_0xb4379f=_0xb4379f-0x91;let _0x3ec725=_0x4daef0[_0xb4379f];return _0x3ec725;},a33_0xb437(_0xdddfc9,_0x2291ae);}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{[a33_0x7e638c(0xa3)]='segment:update';[a33_0x7e638c(0xa1)]=a33_0x7e638c(0xa4);async['execute'](_0x5bb596){const _0x79ff3e=a33_0x7e638c,{options:_0x20c320,args:_0x85fa80,tdx:_0x5f5850}=_0x5bb596,_0x32ec2b=_0x20c320;if(_0x85fa80['length']===0x0)return console[_0x79ff3e(0xa0)]('Error:\x20Segment\x20path\x20or\x20name\x20is\x20required'),console[_0x79ff3e(0xa0)]('Usage:\x20tdx\x20segment\x20update\x20<path>\x20[options]'),console[_0x79ff3e(0xa0)](_0x79ff3e(0xa7)),console[_0x79ff3e(0xa0)](_0x79ff3e(0xa2)),console[_0x79ff3e(0xa0)](_0x79ff3e(0x9f)),0x1;const _0x3fb18b=_0x85fa80[0x0],_0x3d7c0f=_0x20c320[_0x79ff3e(0xb4)];let _0x152f71=_0x3fb18b;_0x3d7c0f&&!_0x3fb18b[_0x79ff3e(0xb9)]('/')&&(_0x152f71=_0x3d7c0f+'/'+_0x3fb18b,_0x32ec2b['verbose']&&console[_0x79ff3e(0xa0)](_0x79ff3e(0xad)+_0x152f71));const _0x3f4f06=await withSpinner(_0x79ff3e(0xb1)+_0x152f71+'\x27...',()=>_0x5f5850[_0x79ff3e(0xba)][_0x79ff3e(0xa6)](_0x152f71),{'verbose':_0x32ec2b[_0x79ff3e(0xa8)]}),_0x38f703=_0x3f4f06[_0x79ff3e(0xb2)];_0x32ec2b['verbose']&&console[_0x79ff3e(0xa0)](_0x79ff3e(0x9e)+_0x38f703[_0x79ff3e(0x92)]);if(_0x38f703['type']!=='segment')return console[_0x79ff3e(0xa0)]('Error:\x20Cannot\x20update\x20'+_0x38f703[_0x79ff3e(0x92)]+_0x79ff3e(0x9c)),console[_0x79ff3e(0xa0)]('Use:\x20tdx\x20segment\x20update\x20<path_to_segment>\x20[options]'),0x1;if(!_0x38f703[_0x79ff3e(0xaa)])throw new SDKError(ErrorCode[_0x79ff3e(0x93)],_0x79ff3e(0x98));const _0x50a77b=_0x38f703[_0x79ff3e(0xb0)],_0x338378=_0x38f703[_0x79ff3e(0xaa)];_0x32ec2b[_0x79ff3e(0xa8)]&&(console['error'](_0x79ff3e(0x9d)+_0x50a77b),console['error'](_0x79ff3e(0x94)+_0x338378));let _0x181cad;if(_0x32ec2b['folder']){const _0x180545=_0x32ec2b[_0x79ff3e(0xa9)],_0x34ef25=await withSpinner(_0x79ff3e(0xb6)+_0x180545+_0x79ff3e(0x91),()=>_0x5f5850[_0x79ff3e(0xba)]['resolveFolderId'](_0x50a77b,_0x180545),{'verbose':_0x32ec2b[_0x79ff3e(0xa8)]});_0x181cad=parseInt(_0x34ef25[_0x79ff3e(0xb2)],0xa),_0x32ec2b['verbose']&&console[_0x79ff3e(0xa0)](_0x79ff3e(0x95)+_0x181cad);}const _0x103204=await loadJSONFromOptions(_0x32ec2b['rule'],_0x32ec2b[_0x79ff3e(0x97)]),_0x46cd13={'name':_0x32ec2b['name'],'description':_0x32ec2b[_0x79ff3e(0xa1)],'rule':_0x103204,'kind':_0x32ec2b[_0x79ff3e(0x96)]!==undefined?parseInt(_0x32ec2b[_0x79ff3e(0x96)],0xa):undefined,'segmentFolderId':_0x181cad},_0x28a5a0=await withSpinner(_0x79ff3e(0xac)+_0x38f703[_0x79ff3e(0xbb)]+_0x79ff3e(0x91),()=>_0x5f5850[_0x79ff3e(0xba)][_0x79ff3e(0xa5)](_0x50a77b,_0x338378,_0x46cd13),{'verbose':_0x32ec2b['verbose']}),_0x1af71f=_0x28a5a0[_0x79ff3e(0xb2)];return console[_0x79ff3e(0xa0)]('✔\x20Updated\x20segment\x20\x27'+_0x1af71f[_0x79ff3e(0xa3)]+'\x27'),_0x152f71!==_0x3fb18b&&console['error'](_0x79ff3e(0xb3)+_0x152f71),await handleSDKOutput([_0x1af71f],_0x32ec2b),0x0;}}
@@ -1 +1 @@
1
- const a34_0x248d73=a34_0x2b43;function a34_0x5ebb(){const _0x86c964=['713503lWsgvB','7550jSwbgy','Parent\x20ID:\x20','slice','Context\x20cleared.\x20Back\x20to\x20root.','split','36130DhDkni','type','parentName','\x20\x20tdx\x20segment\x20use\x20\x22My\x20Audience\x22','Use\x20an\x20absolute\x20path\x20or\x20set\x20context\x20with:\x20tdx\x20segment\x20use\x20<parent_name>','segments','Context\x20can\x20only\x20be\x20set\x20to\x20a\x20parent\x20segment\x20or\x20folder.','Context\x20set\x20to:\x20','\x20\x20tdx\x20segment\x20use\x20/\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Clear\x20context','Usage:\x20tdx\x20segment\x20use\x20<path>','Use:\x20tdx\x20segment\x20use\x20','description','Error:\x20Cannot\x20set\x20context\x20to\x20a\x20segment.','log','1203594WVqURN','segment','3566136iysYZG','isAbsolute','error','20THMwGc','Use\x20\x22tdx\x20segments\x22\x20to\x20list\x20contents\x20in\x20this\x20context','Folder\x20ID:\x20','resolvePathToResource','\x20\x20tdx\x20segment\x20use\x20..\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Go\x20to\x20parent','name','verbose','fullPath','4708045xMWLZE','16542ffPEKZ','segment:use','Target\x20path:\x20','join','session','Error:\x20No\x20context\x20set.\x20Cannot\x20use\x20relative\x20path.','folderPath','parentId','\x20\x20tdx\x20segment\x20use\x20\x22My\x20Audience/Marketing\x22','segmentPath','40QiGODO','4009592XZnjOq','Site:\x20','length','Error:\x20Path\x20is\x20required'];a34_0x5ebb=function(){return _0x86c964;};return a34_0x5ebb();}function a34_0x2b43(_0x1d0dd3,_0x4e5101){const _0x5ebb38=a34_0x5ebb();return a34_0x2b43=function(_0x2b431f,_0x2658d9){_0x2b431f=_0x2b431f-0x10c;let _0x3cac67=_0x5ebb38[_0x2b431f];return _0x3cac67;},a34_0x2b43(_0x1d0dd3,_0x4e5101);}(function(_0x5ebd94,_0x579af3){const _0x12c906=a34_0x2b43,_0x398543=_0x5ebd94();while(!![]){try{const _0x30e8a8=-parseInt(_0x12c906(0x12d))/0x1*(-parseInt(_0x12c906(0x11a))/0x2)+-parseInt(_0x12c906(0x128))/0x3+parseInt(_0x12c906(0x110))/0x4+parseInt(_0x12c906(0x135))/0x5+parseInt(_0x12c906(0x12a))/0x6+-parseInt(_0x12c906(0x114))/0x7*(parseInt(_0x12c906(0x10f))/0x8)+-parseInt(_0x12c906(0x136))/0x9*(parseInt(_0x12c906(0x115))/0xa);if(_0x30e8a8===_0x579af3)break;else _0x398543['push'](_0x398543['shift']());}catch(_0x4fa3c5){_0x398543['push'](_0x398543['shift']());}}}(a34_0x5ebb,0x92c2a));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{[a34_0x248d73(0x132)]=a34_0x248d73(0x137);[a34_0x248d73(0x125)]='Set\x20current\x20segment/folder\x20context\x20for\x20navigation';async['execute'](_0xc306e9){const _0x791372=a34_0x248d73,{options:_0x4d4fde,args:_0x15ae9a,tdx:_0x28a5d7}=_0xc306e9;if(_0x15ae9a[_0x791372(0x112)]===0x0)return console['error'](_0x791372(0x113)),console['error'](_0x791372(0x123)),console[_0x791372(0x12c)]('Examples:'),console[_0x791372(0x12c)](_0x791372(0x11d)),console['error'](_0x791372(0x10d)),console[_0x791372(0x12c)](_0x791372(0x122)),console[_0x791372(0x12c)](_0x791372(0x131)),0x1;const _0x3bfd19=_0x15ae9a[0x0],_0x37815d=_0x4d4fde[_0x791372(0x13a)];try{if(_0x3bfd19==='/')return saveSessionContext({'segment_path':undefined},_0x37815d),console['log'](_0x791372(0x118)),0x0;const _0x5cac69=_0x4d4fde[_0x791372(0x10e)];let _0xebd14=_0x3bfd19;const _0x370467=parsePath(_0x3bfd19);if(!_0x370467[_0x791372(0x12b)]){if(!_0x5cac69)return console['error'](_0x791372(0x13b)),console[_0x791372(0x12c)](_0x791372(0x11e)),0x1;if(_0x3bfd19==='..'){const _0x1864e8=_0x5cac69[_0x791372(0x119)]('/')[_0x791372(0x117)](0x0,-0x1)['join']('/');_0xebd14=_0x1864e8||'/';}else _0x3bfd19==='.'?_0xebd14=_0x5cac69:_0xebd14=_0x5cac69+'/'+_0x3bfd19;_0x4d4fde[_0x791372(0x133)]&&console[_0x791372(0x12c)]('Resolved\x20relative\x20path\x20to:\x20'+_0xebd14);}if(_0xebd14==='/'||_0xebd14==='')return saveSessionContext({'segment_path':undefined},_0x37815d),console[_0x791372(0x127)]('Context\x20cleared.\x20Back\x20to\x20root.'),0x0;_0xebd14=normalizePath(_0xebd14);const _0x376a81=parsePath(_0xebd14)[_0x791372(0x11f)];if(_0x376a81['length']===0x0)return saveSessionContext({'segment_path':undefined},_0x37815d),console[_0x791372(0x127)](_0x791372(0x118)),0x0;_0x4d4fde[_0x791372(0x133)]&&(console[_0x791372(0x12c)](_0x791372(0x111)+_0x4d4fde['site']),console[_0x791372(0x12c)](_0x791372(0x138)+_0xebd14));const _0x2f9c38=await withSpinner('Resolving\x20path\x20\x27'+_0xebd14+'\x27...',()=>_0x28a5d7[_0x791372(0x129)][_0x791372(0x130)](_0xebd14),{'verbose':_0x4d4fde[_0x791372(0x133)]}),_0x297d3f=_0x2f9c38['data'];_0x4d4fde[_0x791372(0x133)]&&(console[_0x791372(0x12c)]('Resolved\x20path\x20type:\x20'+_0x297d3f[_0x791372(0x11b)]),console[_0x791372(0x12c)](_0x791372(0x116)+_0x297d3f[_0x791372(0x10c)]),_0x297d3f['folderId']&&console[_0x791372(0x12c)](_0x791372(0x12f)+_0x297d3f['folderId']));if(_0x297d3f['type']===_0x791372(0x129))return console['error'](_0x791372(0x126)),console[_0x791372(0x12c)](_0x791372(0x120)),console[_0x791372(0x12c)](_0x791372(0x124)+_0x297d3f['parentName']+(_0x297d3f[_0x791372(0x13c)]?'/'+_0x297d3f[_0x791372(0x13c)][_0x791372(0x139)]('/'):'')),0x1;return saveSessionContext({'segment_path':_0x297d3f[_0x791372(0x134)],'parent_segment':_0x297d3f[_0x791372(0x11c)]},_0x37815d),console[_0x791372(0x127)](_0x791372(0x121)+_0x297d3f[_0x791372(0x134)]),_0x4d4fde['verbose']&&(console[_0x791372(0x12c)](_0x791372(0x12e)),console[_0x791372(0x12c)]('Use\x20\x22tdx\x20segment\x20pwd\x22\x20to\x20show\x20current\x20context'),console[_0x791372(0x12c)]('Use\x20\x22tdx\x20context\x22\x20to\x20see\x20all\x20context\x20parameters')),0x0;}catch(_0xb13ebc){throw _0xb13ebc;}}}
1
+ const a34_0x4f448f=a34_0x2cf4;(function(_0x396a17,_0xbdaf50){const _0xdd1390=a34_0x2cf4,_0x38e45c=_0x396a17();while(!![]){try{const _0x19ec64=-parseInt(_0xdd1390(0x1e0))/0x1*(-parseInt(_0xdd1390(0x1cf))/0x2)+parseInt(_0xdd1390(0x1e2))/0x3+-parseInt(_0xdd1390(0x1f8))/0x4+parseInt(_0xdd1390(0x1d0))/0x5+-parseInt(_0xdd1390(0x1df))/0x6*(parseInt(_0xdd1390(0x1c6))/0x7)+-parseInt(_0xdd1390(0x1ee))/0x8*(-parseInt(_0xdd1390(0x1cd))/0x9)+-parseInt(_0xdd1390(0x1cc))/0xa;if(_0x19ec64===_0xbdaf50)break;else _0x38e45c['push'](_0x38e45c['shift']());}catch(_0x2d627e){_0x38e45c['push'](_0x38e45c['shift']());}}}(a34_0x303c,0x6e684));import{BaseCommand}from'./command.js';import{saveSessionContext}from'../core/session.js';function a34_0x303c(){const _0x513012=['fullPath','resolvePathToResource','session','type','1661860nyqLYP','Context\x20cleared.\x20Back\x20to\x20root.','\x20\x20tdx\x20segment\x20use\x20/\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Clear\x20context','parentId','folderPath','error','63LIayRc','Use\x20an\x20absolute\x20path\x20or\x20set\x20context\x20with:\x20tdx\x20segment\x20use\x20<parent_name>','Context\x20set\x20to:\x20','verbose','\x27...','site','1804220ljkVKd','3879qnNmTt','Examples:','1258hKIegn','99005fmFYvf','\x20\x20tdx\x20segment\x20use\x20\x22My\x20Audience/Marketing\x22','segment:use','length','Folder\x20ID:\x20','Set\x20current\x20segment/folder\x20context\x20for\x20navigation','Parent\x20ID:\x20','Use\x20\x22tdx\x20context\x22\x20to\x20see\x20all\x20context\x20parameters','folderId','isAbsolute','Resolving\x20path\x20\x27','Resolved\x20relative\x20path\x20to:\x20','Target\x20path:\x20','\x20\x20tdx\x20segment\x20use\x20..\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Go\x20to\x20parent','Use\x20\x22tdx\x20segment\x20pwd\x22\x20to\x20show\x20current\x20context','325782xoxPXb','1243FSaPyv','join','112053FtpZCI','Use\x20\x22tdx\x20segments\x22\x20to\x20list\x20contents\x20in\x20this\x20context','parentName','\x20\x20tdx\x20segment\x20use\x20\x22My\x20Audience\x22','Error:\x20Path\x20is\x20required','slice','log','Usage:\x20tdx\x20segment\x20use\x20<path>','Use:\x20tdx\x20segment\x20use\x20','Site:\x20','split','name','12952TlqCcA','segment','description','segmentPath','segments','Context\x20can\x20only\x20be\x20set\x20to\x20a\x20parent\x20segment\x20or\x20folder.'];a34_0x303c=function(){return _0x513012;};return a34_0x303c();}import{withSpinner}from'../utils/spinner.js';import{parsePath,normalizePath}from'../utils/segment-path-parser.js';function a34_0x2cf4(_0x2f0bd2,_0x28d5a5){const _0x303ce0=a34_0x303c();return a34_0x2cf4=function(_0x2cf4bb,_0x4fbc2c){_0x2cf4bb=_0x2cf4bb-0x1c6;let _0x26953a=_0x303ce0[_0x2cf4bb];return _0x26953a;},a34_0x2cf4(_0x2f0bd2,_0x28d5a5);}export class SegmentUseCommand extends BaseCommand{[a34_0x4f448f(0x1ed)]=a34_0x4f448f(0x1d2);[a34_0x4f448f(0x1f0)]=a34_0x4f448f(0x1d5);async['execute'](_0x8b72e6){const _0x1e1850=a34_0x4f448f,{options:_0x26f336,args:_0x2be8f8,tdx:_0x5c8530}=_0x8b72e6;if(_0x2be8f8[_0x1e1850(0x1d3)]===0x0)return console[_0x1e1850(0x1fd)](_0x1e1850(0x1e6)),console['error'](_0x1e1850(0x1e9)),console[_0x1e1850(0x1fd)](_0x1e1850(0x1ce)),console[_0x1e1850(0x1fd)](_0x1e1850(0x1e5)),console[_0x1e1850(0x1fd)](_0x1e1850(0x1d1)),console[_0x1e1850(0x1fd)](_0x1e1850(0x1fa)),console[_0x1e1850(0x1fd)](_0x1e1850(0x1dd)),0x1;const _0x325ed0=_0x2be8f8[0x0],_0x8c6a6d=_0x26f336[_0x1e1850(0x1f6)];try{if(_0x325ed0==='/')return saveSessionContext({'segment_path':undefined},_0x8c6a6d),console[_0x1e1850(0x1e8)](_0x1e1850(0x1f9)),0x0;const _0x375190=_0x26f336[_0x1e1850(0x1f1)];let _0x5eca58=_0x325ed0;const _0x3254e7=parsePath(_0x325ed0);if(!_0x3254e7[_0x1e1850(0x1d9)]){if(!_0x375190)return console[_0x1e1850(0x1fd)]('Error:\x20No\x20context\x20set.\x20Cannot\x20use\x20relative\x20path.'),console['error'](_0x1e1850(0x1c7)),0x1;if(_0x325ed0==='..'){const _0x48bc60=_0x375190[_0x1e1850(0x1ec)]('/')[_0x1e1850(0x1e7)](0x0,-0x1)[_0x1e1850(0x1e1)]('/');_0x5eca58=_0x48bc60||'/';}else _0x325ed0==='.'?_0x5eca58=_0x375190:_0x5eca58=_0x375190+'/'+_0x325ed0;_0x26f336[_0x1e1850(0x1c9)]&&console['error'](_0x1e1850(0x1db)+_0x5eca58);}if(_0x5eca58==='/'||_0x5eca58==='')return saveSessionContext({'segment_path':undefined},_0x8c6a6d),console[_0x1e1850(0x1e8)](_0x1e1850(0x1f9)),0x0;_0x5eca58=normalizePath(_0x5eca58);const _0x18dd72=parsePath(_0x5eca58)[_0x1e1850(0x1f2)];if(_0x18dd72[_0x1e1850(0x1d3)]===0x0)return saveSessionContext({'segment_path':undefined},_0x8c6a6d),console[_0x1e1850(0x1e8)](_0x1e1850(0x1f9)),0x0;_0x26f336[_0x1e1850(0x1c9)]&&(console[_0x1e1850(0x1fd)](_0x1e1850(0x1eb)+_0x26f336[_0x1e1850(0x1cb)]),console[_0x1e1850(0x1fd)](_0x1e1850(0x1dc)+_0x5eca58));const _0x2a8d77=await withSpinner(_0x1e1850(0x1da)+_0x5eca58+_0x1e1850(0x1ca),()=>_0x5c8530[_0x1e1850(0x1ef)][_0x1e1850(0x1f5)](_0x5eca58),{'verbose':_0x26f336[_0x1e1850(0x1c9)]}),_0x1caee8=_0x2a8d77['data'];_0x26f336[_0x1e1850(0x1c9)]&&(console[_0x1e1850(0x1fd)]('Resolved\x20path\x20type:\x20'+_0x1caee8[_0x1e1850(0x1f7)]),console[_0x1e1850(0x1fd)](_0x1e1850(0x1d6)+_0x1caee8[_0x1e1850(0x1fb)]),_0x1caee8['folderId']&&console[_0x1e1850(0x1fd)](_0x1e1850(0x1d4)+_0x1caee8[_0x1e1850(0x1d8)]));if(_0x1caee8[_0x1e1850(0x1f7)]==='segment')return console['error']('Error:\x20Cannot\x20set\x20context\x20to\x20a\x20segment.'),console[_0x1e1850(0x1fd)](_0x1e1850(0x1f3)),console[_0x1e1850(0x1fd)](_0x1e1850(0x1ea)+_0x1caee8[_0x1e1850(0x1e4)]+(_0x1caee8[_0x1e1850(0x1fc)]?'/'+_0x1caee8['folderPath'][_0x1e1850(0x1e1)]('/'):'')),0x1;return saveSessionContext({'segment_path':_0x1caee8[_0x1e1850(0x1f4)],'parent_segment':_0x1caee8[_0x1e1850(0x1e4)]},_0x8c6a6d),console[_0x1e1850(0x1e8)](_0x1e1850(0x1c8)+_0x1caee8['fullPath']),_0x26f336['verbose']&&(console['error'](_0x1e1850(0x1e3)),console[_0x1e1850(0x1fd)](_0x1e1850(0x1de)),console[_0x1e1850(0x1fd)](_0x1e1850(0x1d7))),0x0;}catch(_0x2d202d){throw _0x2d202d;}}}
@@ -1 +1 @@
1
- const a35_0x3e2f03=a35_0x1431;(function(_0x3034e9,_0x1bd188){const _0x4d4997=a35_0x1431,_0x1f85e7=_0x3034e9();while(!![]){try{const _0x29c6a1=parseInt(_0x4d4997(0x196))/0x1*(parseInt(_0x4d4997(0x198))/0x2)+parseInt(_0x4d4997(0x194))/0x3+-parseInt(_0x4d4997(0x1a3))/0x4+parseInt(_0x4d4997(0x1a5))/0x5+parseInt(_0x4d4997(0x192))/0x6*(parseInt(_0x4d4997(0x1a1))/0x7)+-parseInt(_0x4d4997(0x1a6))/0x8*(-parseInt(_0x4d4997(0x1cb))/0x9)+parseInt(_0x4d4997(0x1cd))/0xa*(-parseInt(_0x4d4997(0x1a9))/0xb);if(_0x29c6a1===_0x1bd188)break;else _0x1f85e7['push'](_0x1f85e7['shift']());}catch(_0x6fb4b){_0x1f85e7['push'](_0x1f85e7['shift']());}}}(a35_0x3dce,0x62048));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleSDKOutput}from'../utils/command-output.js';function a35_0x1431(_0x1b6c95,_0x5c260b){const _0x3dce59=a35_0x3dce();return a35_0x1431=function(_0x143131,_0x1b313e){_0x143131=_0x143131-0x18e;let _0x18bb5d=_0x3dce59[_0x143131];return _0x18bb5d;},a35_0x1431(_0x1b6c95,_0x5c260b);}function a35_0x3dce(){const _0x1d7d7e=['7PcWQwv','\x20folder','2608320Btmvhe','map','1299495IJDFbu','6360nsFneP','Parent\x20ID:\x20','Error:\x20Pattern\x20matching\x20is\x20only\x20supported\x20at\x20root\x20level\x20(no\x20context\x20set).','33bvUfUI','population','✔\x20Found\x20','Listing\x20parent\x20segments...','\x20matching\x20\x27','jsonl','\x27...','format','length','error','recursive','sort','listParentsWithPattern','resolvePathToResource','Folder\x20ID:\x20','localeCompare','dim','Error:\x20','data','name','includes','Listing\x20folders\x20and\x20segments...','[parent\x20segments]','Resolving\x20context\x20path\x20\x27','👥\x20','\x20\x20Cause:\x20','Building\x20hierarchy\x20tree...','listRecursive','folder','Clear\x20context\x20with:\x20tdx\x20segment\x20use\x20/','(empty)','listUnified','Recursive\x20mode:\x20enabled','cause','2466KNTDFA','test','3412770VqeHOu','log','filter','Current\x20context:\x20','execute','listParents','4002756DeXHfX','Path/pattern\x20arg:\x20','1153983AlFcuC','\x20parent\x20segment','547875CwguQJ','site','2ceuutm','attributes','replace','parentId','verbose','segment','folderId','Listing\x20parent\x20segments\x20matching\x20\x27','json'];a35_0x3dce=function(){return _0x1d7d7e;};return a35_0x3dce();}import{withSpinner}from'../utils/spinner.js';import{formatFlatList,formatTree}from'../utils/tree-formatter.js';import{formatRows}from'../utils/formatters.js';import a35_0x348837 from'chalk';export class SegmentsCommand extends BaseCommand{['name']='segments';['description']='List\x20parent\x20segments,\x20folders,\x20and\x20child\x20segments';async[a35_0x3e2f03(0x190)](_0xd6fc57){const _0x1bf110=a35_0x3e2f03,{options:_0x37778f,args:_0x224e74}=_0xd6fc57,_0x4d117d=_0x37778f[_0x1bf110(0x1b3)],_0x355bad=_0x224e74[0x0];try{const _0x319b2c=_0x37778f['segmentPath'];_0x37778f[_0x1bf110(0x19c)]&&(console[_0x1bf110(0x1b2)]('Site:\x20'+_0x37778f[_0x1bf110(0x197)]),console['error'](_0x1bf110(0x18f)+(_0x319b2c||'/')),_0x355bad&&console[_0x1bf110(0x1b2)](_0x1bf110(0x193)+_0x355bad),_0x4d117d&&console['error'](_0x1bf110(0x1c9)));if(_0x355bad){const _0x3afc13=_0x355bad['includes']('*')||_0x355bad[_0x1bf110(0x1bd)]('?');if(_0x3afc13&&!_0x319b2c)return await this[_0x1bf110(0x1b5)](_0xd6fc57,_0x355bad);else return _0x3afc13?(console[_0x1bf110(0x1b2)](_0x1bf110(0x1a8)),console[_0x1bf110(0x1b2)](_0x1bf110(0x1c6)),0x1):_0x4d117d?await this[_0x1bf110(0x1c4)](_0xd6fc57,_0x355bad):await this['listUnified'](_0xd6fc57,_0x355bad);}if(!_0x319b2c)return await this[_0x1bf110(0x191)](_0xd6fc57);return _0x4d117d?await this[_0x1bf110(0x1c4)](_0xd6fc57,_0x319b2c):await this[_0x1bf110(0x1c8)](_0xd6fc57,_0x319b2c);}catch(_0x216d30){if(_0x216d30 instanceof SDKError)return console[_0x1bf110(0x1b2)](_0x1bf110(0x1ba)+_0x216d30['message']),_0x216d30[_0x1bf110(0x1ca)]&&console[_0x1bf110(0x1b2)](_0x1bf110(0x1c2)+_0x216d30[_0x1bf110(0x1ca)]),0x1;throw _0x216d30;}}async['listParentsWithPattern'](_0x3df1f7,_0x401f3f){const _0x36fb0e=a35_0x3e2f03,{options:_0x446146,tdx:_0x3caed8}=_0x3df1f7,_0xc25f02=await withSpinner(_0x36fb0e(0x19f)+_0x401f3f+'\x27...',()=>_0x3caed8[_0x36fb0e(0x19d)][_0x36fb0e(0x191)](),{'verbose':_0x446146[_0x36fb0e(0x19c)]}),_0x231d58=_0xc25f02[_0x36fb0e(0x1bb)],_0xd24145=_0x401f3f['replace'](/[.+^${}()|[\]\\]/g,'\x5c$&')['replace'](/\*/g,'.*')[_0x36fb0e(0x19a)](/\?/g,'.'),_0x46d272=new RegExp('^'+_0xd24145+'$','i'),_0x784e5b=_0x231d58[_0x36fb0e(0x18e)](_0xddb1e4=>_0x46d272[_0x36fb0e(0x1cc)](_0xddb1e4[_0x36fb0e(0x199)][_0x36fb0e(0x1bc)]));console[_0x36fb0e(0x1b2)](_0x36fb0e(0x1ab)+_0x784e5b[_0x36fb0e(0x1b1)]+_0x36fb0e(0x195)+(_0x784e5b[_0x36fb0e(0x1b1)]!==0x1?'s':'')+_0x36fb0e(0x1ad)+_0x401f3f+'\x27');if(_0x446146[_0x36fb0e(0x1b0)]===_0x36fb0e(0x1a0)||_0x446146[_0x36fb0e(0x1b0)]===_0x36fb0e(0x1ae))await handleSDKOutput(_0x784e5b,_0x446146);else{if(_0x784e5b[_0x36fb0e(0x1b1)]===0x0)console[_0x36fb0e(0x1ce)]('No\x20parent\x20segments\x20match\x20pattern:\x20'+_0x401f3f);else{console['log'](_0x36fb0e(0x1bf));for(const _0x45ae1a of _0x784e5b){const _0x50ae67=_0x45ae1a['attributes'][_0x36fb0e(0x1aa)]?a35_0x348837[_0x36fb0e(0x1b9)]('\x20('+formatRows(_0x45ae1a[_0x36fb0e(0x199)][_0x36fb0e(0x1aa)])+')'):'';console[_0x36fb0e(0x1ce)](_0x36fb0e(0x1c1)+_0x45ae1a[_0x36fb0e(0x199)][_0x36fb0e(0x1bc)]+_0x50ae67);}}}return 0x0;}async[a35_0x3e2f03(0x191)](_0x30f432){const _0x80e441=a35_0x3e2f03,{options:_0x18e455,tdx:_0x49548f}=_0x30f432,_0x1b1f76=await withSpinner(_0x80e441(0x1ac),()=>_0x49548f['segment'][_0x80e441(0x191)](),{'verbose':_0x18e455[_0x80e441(0x19c)]}),_0x16ac2a=_0x1b1f76[_0x80e441(0x1bb)];console['error'](_0x80e441(0x1ab)+_0x16ac2a['length']+_0x80e441(0x195)+(_0x16ac2a[_0x80e441(0x1b1)]!==0x1?'s':''));if(_0x18e455[_0x80e441(0x1b0)]===_0x80e441(0x1a0)||_0x18e455[_0x80e441(0x1b0)]===_0x80e441(0x1ae))await handleSDKOutput(_0x16ac2a,_0x18e455);else{console['log'](_0x80e441(0x1bf));for(const _0x43972c of _0x16ac2a){const _0x47ac17=_0x43972c['attributes'][_0x80e441(0x1aa)]?a35_0x348837[_0x80e441(0x1b9)]('\x20('+formatRows(_0x43972c[_0x80e441(0x199)][_0x80e441(0x1aa)])+')'):'';console['log'](_0x80e441(0x1c1)+_0x43972c[_0x80e441(0x199)][_0x80e441(0x1bc)]+_0x47ac17);}}return 0x0;}async[a35_0x3e2f03(0x1c8)](_0x591190,_0x5b139d){const _0x136410=a35_0x3e2f03,{options:_0x298eb2,tdx:_0x317cf8}=_0x591190,_0x356612=await withSpinner('Resolving\x20context\x20path\x20\x27'+_0x5b139d+_0x136410(0x1af),()=>_0x317cf8['segment'][_0x136410(0x1b6)](_0x5b139d),{'verbose':_0x298eb2['verbose']}),_0x340740=_0x356612[_0x136410(0x1bb)];_0x298eb2[_0x136410(0x19c)]&&(console[_0x136410(0x1b2)]('Parent\x20ID:\x20'+_0x340740[_0x136410(0x19b)]),_0x340740[_0x136410(0x19e)]&&console[_0x136410(0x1b2)](_0x136410(0x1b7)+_0x340740[_0x136410(0x19e)]));const _0x4923d0=await withSpinner(_0x136410(0x1be),()=>_0x317cf8[_0x136410(0x19d)]['listUnified'](_0x340740[_0x136410(0x19b)],_0x340740[_0x136410(0x19e)]),{'verbose':_0x298eb2[_0x136410(0x19c)]}),{folders:_0xef5518,segments:_0x4f1478}=_0x4923d0[_0x136410(0x1bb)],_0x46bd44=_0xef5518[_0x136410(0x1b1)]+_0x4f1478[_0x136410(0x1b1)];console[_0x136410(0x1b2)](_0x136410(0x1ab)+_0xef5518[_0x136410(0x1b1)]+_0x136410(0x1a2)+(_0xef5518['length']!==0x1?'s':'')+'\x20and\x20'+_0x4f1478['length']+'\x20segment'+(_0x4f1478[_0x136410(0x1b1)]!==0x1?'s':''));if(_0x298eb2[_0x136410(0x1b0)]==='json'||_0x298eb2['format']===_0x136410(0x1ae)){const _0x4cdbb5=[..._0xef5518['map'](_0x316f09=>({..._0x316f09,'type':_0x136410(0x1c5)})),..._0x4f1478[_0x136410(0x1a4)](_0x317db1=>({..._0x317db1,'type':_0x136410(0x19d)}))][_0x136410(0x1b4)]((_0x43107f,_0x3e78fc)=>_0x43107f['name'][_0x136410(0x1b8)](_0x3e78fc[_0x136410(0x1bc)]));await handleSDKOutput(_0x4cdbb5,_0x298eb2);}else{if(_0x46bd44===0x0)console[_0x136410(0x1ce)](a35_0x348837[_0x136410(0x1b9)]('[/'+_0x5b139d+']')),console[_0x136410(0x1ce)](_0x136410(0x1c7));else{console['log'](a35_0x348837[_0x136410(0x1b9)]('[/'+_0x5b139d+']'));const _0x4bc453=formatFlatList(_0xef5518,_0x4f1478,{'showMetadata':!![]});console[_0x136410(0x1ce)](_0x4bc453);}}return 0x0;}async['listRecursive'](_0x40d80d,_0x465048){const _0x4adfc6=a35_0x3e2f03,{options:_0x5def86,tdx:_0x49c364}=_0x40d80d,_0x20ee31=await withSpinner(_0x4adfc6(0x1c0)+_0x465048+_0x4adfc6(0x1af),()=>_0x49c364[_0x4adfc6(0x19d)][_0x4adfc6(0x1b6)](_0x465048),{'verbose':_0x5def86['verbose']}),_0x74f388=_0x20ee31[_0x4adfc6(0x1bb)];_0x5def86[_0x4adfc6(0x19c)]&&(console[_0x4adfc6(0x1b2)](_0x4adfc6(0x1a7)+_0x74f388[_0x4adfc6(0x19b)]),_0x74f388['folderId']&&console[_0x4adfc6(0x1b2)](_0x4adfc6(0x1b7)+_0x74f388[_0x4adfc6(0x19e)]));const _0x519ca1=_0x5def86['maxDepth']||0xa,_0x2d8a9a=await withSpinner(_0x4adfc6(0x1c3),()=>_0x49c364[_0x4adfc6(0x19d)][_0x4adfc6(0x1c4)](_0x74f388[_0x4adfc6(0x19b)],_0x74f388[_0x4adfc6(0x19e)],0x0,_0x519ca1),{'verbose':_0x5def86[_0x4adfc6(0x19c)]}),_0x6bdeb3=_0x2d8a9a['data'];console[_0x4adfc6(0x1b2)]('✔\x20Built\x20tree\x20with\x20'+_0x6bdeb3[_0x4adfc6(0x1b1)]+'\x20top-level\x20items');if(_0x5def86[_0x4adfc6(0x1b0)]==='json'||_0x5def86[_0x4adfc6(0x1b0)]===_0x4adfc6(0x1ae))await handleSDKOutput(_0x6bdeb3,_0x5def86);else{console[_0x4adfc6(0x1ce)](a35_0x348837[_0x4adfc6(0x1b9)]('[/'+_0x465048+']'));const _0x5a1ff3=formatTree(_0x6bdeb3,{'showMetadata':!![]});console[_0x4adfc6(0x1ce)](_0x5a1ff3);}return 0x0;}}
1
+ const a35_0x2ae4f1=a35_0x16bc;(function(_0x390e08,_0x300459){const _0x3fe97b=a35_0x16bc,_0x46c79a=_0x390e08();while(!![]){try{const _0x2b502a=-parseInt(_0x3fe97b(0xdb))/0x1*(-parseInt(_0x3fe97b(0xad))/0x2)+parseInt(_0x3fe97b(0xd0))/0x3+parseInt(_0x3fe97b(0xc3))/0x4+parseInt(_0x3fe97b(0xe1))/0x5*(parseInt(_0x3fe97b(0xe2))/0x6)+-parseInt(_0x3fe97b(0xe6))/0x7*(-parseInt(_0x3fe97b(0xd2))/0x8)+parseInt(_0x3fe97b(0xcd))/0x9*(-parseInt(_0x3fe97b(0xba))/0xa)+-parseInt(_0x3fe97b(0xdd))/0xb*(parseInt(_0x3fe97b(0xd7))/0xc);if(_0x2b502a===_0x300459)break;else _0x46c79a['push'](_0x46c79a['shift']());}catch(_0x1b73f3){_0x46c79a['push'](_0x46c79a['shift']());}}}(a35_0x2f4d,0x1ae7a));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';function a35_0x16bc(_0x4849b2,_0x4b6c04){const _0x2f4dcd=a35_0x2f4d();return a35_0x16bc=function(_0x16bcb7,_0x5af95f){_0x16bcb7=_0x16bcb7-0xab;let _0x2cb8d0=_0x2f4dcd[_0x16bcb7];return _0x2cb8d0;},a35_0x16bc(_0x4849b2,_0x4b6c04);}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 a35_0x459f2b from'chalk';export class SegmentsCommand extends BaseCommand{[a35_0x2ae4f1(0xe5)]='segments';[a35_0x2ae4f1(0xc8)]='List\x20parent\x20segments,\x20folders,\x20and\x20child\x20segments';async[a35_0x2ae4f1(0xe0)](_0x2d56c5){const _0x55acaf=a35_0x2ae4f1,{options:_0x3d7009,args:_0x1222a7}=_0x2d56c5,_0x325e0b=_0x3d7009['recursive'],_0x4e79f0=_0x1222a7[0x0];try{const _0x4cd560=_0x3d7009[_0x55acaf(0xe4)];_0x3d7009[_0x55acaf(0xe9)]&&(console[_0x55acaf(0xde)](_0x55acaf(0xb5)+_0x3d7009['site']),console[_0x55acaf(0xde)](_0x55acaf(0xcc)+(_0x4cd560||'/')),_0x4e79f0&&console[_0x55acaf(0xde)](_0x55acaf(0xb1)+_0x4e79f0),_0x325e0b&&console[_0x55acaf(0xde)](_0x55acaf(0xbf)));if(_0x4e79f0){const _0x402219=_0x4e79f0[_0x55acaf(0xc1)]('*')||_0x4e79f0[_0x55acaf(0xc1)]('?');if(_0x402219&&!_0x4cd560)return await this[_0x55acaf(0xac)](_0x2d56c5,_0x4e79f0);else return _0x402219?(console[_0x55acaf(0xde)]('Error:\x20Pattern\x20matching\x20is\x20only\x20supported\x20at\x20root\x20level\x20(no\x20context\x20set).'),console[_0x55acaf(0xde)]('Clear\x20context\x20with:\x20tdx\x20segment\x20use\x20/'),0x1):_0x325e0b?await this[_0x55acaf(0xda)](_0x2d56c5,_0x4e79f0):await this['listUnified'](_0x2d56c5,_0x4e79f0);}if(!_0x4cd560)return await this[_0x55acaf(0xd9)](_0x2d56c5);return _0x325e0b?await this[_0x55acaf(0xda)](_0x2d56c5,_0x4cd560):await this['listUnified'](_0x2d56c5,_0x4cd560);}catch(_0x1a2d8f){if(_0x1a2d8f instanceof SDKError)return console[_0x55acaf(0xde)]('Error:\x20'+_0x1a2d8f[_0x55acaf(0xbe)]),_0x1a2d8f[_0x55acaf(0xc7)]&&console['error'](_0x55acaf(0xb0)+_0x1a2d8f[_0x55acaf(0xc7)]),0x1;throw _0x1a2d8f;}}async[a35_0x2ae4f1(0xac)](_0x5acfc0,_0x2f4685){const _0x455bdb=a35_0x2ae4f1,{options:_0x30d5f0,tdx:_0x43442a}=_0x5acfc0,_0x595ee6=await withSpinner('Listing\x20parent\x20segments\x20matching\x20\x27'+_0x2f4685+_0x455bdb(0xaf),()=>_0x43442a[_0x455bdb(0xd4)][_0x455bdb(0xd9)](),{'verbose':_0x30d5f0[_0x455bdb(0xe9)]}),_0x304889=_0x595ee6['data'],_0x412851=_0x2f4685[_0x455bdb(0xc0)](/[.+^${}()|[\]\\]/g,'\x5c$&')[_0x455bdb(0xc0)](/\*/g,'.*')[_0x455bdb(0xc0)](/\?/g,'.'),_0x188e37=new RegExp('^'+_0x412851+'$','i'),_0x2caeee=_0x304889[_0x455bdb(0xb4)](_0x2d17ab=>_0x188e37[_0x455bdb(0xe8)](_0x2d17ab[_0x455bdb(0xbc)][_0x455bdb(0xe5)]));console['error'](_0x455bdb(0xce)+_0x2caeee[_0x455bdb(0xca)]+_0x455bdb(0xcf)+(_0x2caeee[_0x455bdb(0xca)]!==0x1?'s':'')+_0x455bdb(0xd5)+_0x2f4685+'\x27');if(_0x30d5f0[_0x455bdb(0xc5)]===_0x455bdb(0xb9)||_0x30d5f0[_0x455bdb(0xc5)]==='jsonl')await handleSDKOutput(_0x2caeee,_0x30d5f0);else{if(_0x2caeee['length']===0x0)console[_0x455bdb(0xbd)]('No\x20parent\x20segments\x20match\x20pattern:\x20'+_0x2f4685);else{console[_0x455bdb(0xbd)](_0x455bdb(0xe3));for(const _0x3b52a5 of _0x2caeee){const _0x52575e=_0x3b52a5[_0x455bdb(0xbc)][_0x455bdb(0xb2)]?a35_0x459f2b[_0x455bdb(0xb7)]('\x20('+formatRows(_0x3b52a5[_0x455bdb(0xbc)][_0x455bdb(0xb2)])+')'):'';console[_0x455bdb(0xbd)](_0x455bdb(0xcb)+_0x3b52a5['attributes'][_0x455bdb(0xe5)]+_0x52575e);}}}return 0x0;}async[a35_0x2ae4f1(0xd9)](_0x2fba59){const _0xd2f9f=a35_0x2ae4f1,{options:_0x340da4,tdx:_0x55c7c5}=_0x2fba59,_0x1dd8ad=await withSpinner(_0xd2f9f(0xc6),()=>_0x55c7c5['segment']['listParents'](),{'verbose':_0x340da4[_0xd2f9f(0xe9)]}),_0x4f5542=_0x1dd8ad[_0xd2f9f(0xbb)];console['error']('✔\x20Found\x20'+_0x4f5542['length']+'\x20parent\x20segment'+(_0x4f5542[_0xd2f9f(0xca)]!==0x1?'s':''));if(_0x340da4[_0xd2f9f(0xc5)]===_0xd2f9f(0xb9)||_0x340da4[_0xd2f9f(0xc5)]==='jsonl')await handleSDKOutput(_0x4f5542,_0x340da4);else{console[_0xd2f9f(0xbd)](_0xd2f9f(0xe3));for(const _0xdc3f05 of _0x4f5542){const _0x349f28=_0xdc3f05[_0xd2f9f(0xbc)][_0xd2f9f(0xb2)]?a35_0x459f2b[_0xd2f9f(0xb7)]('\x20('+formatRows(_0xdc3f05[_0xd2f9f(0xbc)][_0xd2f9f(0xb2)])+')'):'';console[_0xd2f9f(0xbd)](_0xd2f9f(0xcb)+_0xdc3f05[_0xd2f9f(0xbc)][_0xd2f9f(0xe5)]+_0x349f28);}}return 0x0;}async[a35_0x2ae4f1(0xab)](_0x35ef45,_0x4201f3){const _0x1f38dc=a35_0x2ae4f1,{options:_0x1dfcdd,tdx:_0x385099}=_0x35ef45,_0x5c659e=await withSpinner(_0x1f38dc(0xd8)+_0x4201f3+_0x1f38dc(0xaf),()=>_0x385099[_0x1f38dc(0xd4)]['resolvePathToResource'](_0x4201f3),{'verbose':_0x1dfcdd[_0x1f38dc(0xe9)]}),_0x44490a=_0x5c659e[_0x1f38dc(0xbb)];_0x1dfcdd['verbose']&&(console[_0x1f38dc(0xde)](_0x1f38dc(0xe7)+_0x44490a['parentId']),_0x44490a['folderId']&&console[_0x1f38dc(0xde)]('Folder\x20ID:\x20'+_0x44490a[_0x1f38dc(0xae)]));const _0x73da19=await withSpinner(_0x1f38dc(0xc4),()=>_0x385099['segment']['listUnified'](_0x44490a['parentId'],_0x44490a[_0x1f38dc(0xae)]),{'verbose':_0x1dfcdd[_0x1f38dc(0xe9)]}),{folders:_0x36fa35,segments:_0x4d4ff9}=_0x73da19[_0x1f38dc(0xbb)],_0x1252c3=_0x36fa35[_0x1f38dc(0xca)]+_0x4d4ff9['length'];console['error'](_0x1f38dc(0xce)+_0x36fa35['length']+'\x20folder'+(_0x36fa35[_0x1f38dc(0xca)]!==0x1?'s':'')+'\x20and\x20'+_0x4d4ff9['length']+'\x20segment'+(_0x4d4ff9['length']!==0x1?'s':''));if(_0x1dfcdd['format']===_0x1f38dc(0xb9)||_0x1dfcdd['format']==='jsonl'){const _0x27077d=[..._0x36fa35[_0x1f38dc(0xd6)](_0x5b4371=>({..._0x5b4371,'type':_0x1f38dc(0xc2)})),..._0x4d4ff9[_0x1f38dc(0xd6)](_0x40e934=>({..._0x40e934,'type':_0x1f38dc(0xd4)}))]['sort']((_0x11c478,_0x479fa8)=>_0x11c478[_0x1f38dc(0xe5)][_0x1f38dc(0xb3)](_0x479fa8['name']));await handleSDKOutput(_0x27077d,_0x1dfcdd);}else{if(_0x1252c3===0x0)console[_0x1f38dc(0xbd)](a35_0x459f2b[_0x1f38dc(0xb7)]('[/'+_0x4201f3+']')),console['log'](_0x1f38dc(0xd1));else{console['log'](a35_0x459f2b[_0x1f38dc(0xb7)]('[/'+_0x4201f3+']'));const _0x1c58df=formatFlatList(_0x36fa35,_0x4d4ff9,{'showMetadata':!![]});console[_0x1f38dc(0xbd)](_0x1c58df);}}return 0x0;}async[a35_0x2ae4f1(0xda)](_0x2bfe6d,_0x221155){const _0x51f185=a35_0x2ae4f1,{options:_0x2c2004,tdx:_0x3496aa}=_0x2bfe6d,_0x178ba3=await withSpinner(_0x51f185(0xd8)+_0x221155+'\x27...',()=>_0x3496aa['segment'][_0x51f185(0xb8)](_0x221155),{'verbose':_0x2c2004[_0x51f185(0xe9)]}),_0x922224=_0x178ba3[_0x51f185(0xbb)];_0x2c2004['verbose']&&(console[_0x51f185(0xde)](_0x51f185(0xe7)+_0x922224['parentId']),_0x922224[_0x51f185(0xae)]&&console[_0x51f185(0xde)](_0x51f185(0xdf)+_0x922224[_0x51f185(0xae)]));const _0x55e4b5=_0x2c2004[_0x51f185(0xdc)]||0xa,_0x4179ab=await withSpinner(_0x51f185(0xb6),()=>_0x3496aa['segment'][_0x51f185(0xda)](_0x922224[_0x51f185(0xc9)],_0x922224[_0x51f185(0xae)],0x0,_0x55e4b5),{'verbose':_0x2c2004[_0x51f185(0xe9)]}),_0x58250e=_0x4179ab[_0x51f185(0xbb)];console[_0x51f185(0xde)]('✔\x20Built\x20tree\x20with\x20'+_0x58250e[_0x51f185(0xca)]+'\x20top-level\x20items');if(_0x2c2004[_0x51f185(0xc5)]==='json'||_0x2c2004[_0x51f185(0xc5)]===_0x51f185(0xd3))await handleSDKOutput(_0x58250e,_0x2c2004);else{console[_0x51f185(0xbd)](a35_0x459f2b[_0x51f185(0xb7)]('[/'+_0x221155+']'));const _0x533b94=formatTree(_0x58250e,{'showMetadata':!![]});console[_0x51f185(0xbd)](_0x533b94);}return 0x0;}}function a35_0x2f4d(){const _0x2ff546=['filter','Site:\x20','Building\x20hierarchy\x20tree...','dim','resolvePathToResource','json','350yWCGRf','data','attributes','log','message','Recursive\x20mode:\x20enabled','replace','includes','folder','528496PmwndZ','Listing\x20folders\x20and\x20segments...','format','Listing\x20parent\x20segments...','cause','description','parentId','length','👥\x20','Current\x20context:\x20','21789OxHzWf','✔\x20Found\x20','\x20parent\x20segment','44712mqeODr','(empty)','32DWHgzI','jsonl','segment','\x20matching\x20\x27','map','1102716xnwUPK','Resolving\x20context\x20path\x20\x27','listParents','listRecursive','19BGQKJh','maxDepth','33ZagFxc','error','Folder\x20ID:\x20','execute','5GOQKrc','129378JQPjOL','[parent\x20segments]','segmentPath','name','351155ATGVND','Parent\x20ID:\x20','test','verbose','listUnified','listParentsWithPattern','10670pCAqgs','folderId','\x27...','\x20\x20Cause:\x20','Path/pattern\x20arg:\x20','population','localeCompare'];a35_0x2f4d=function(){return _0x2ff546;};return a35_0x2f4d();}
@@ -1 +1 @@
1
- const a36_0x442f59=a36_0x24a8;(function(_0x91a2e2,_0x56b0f1){const _0x689cdd=a36_0x24a8,_0x476f63=_0x91a2e2();while(!![]){try{const _0x1fa2d6=-parseInt(_0x689cdd(0xa4))/0x1*(parseInt(_0x689cdd(0x8f))/0x2)+-parseInt(_0x689cdd(0x8d))/0x3*(parseInt(_0x689cdd(0x99))/0x4)+parseInt(_0x689cdd(0xab))/0x5+-parseInt(_0x689cdd(0x94))/0x6+parseInt(_0x689cdd(0xaa))/0x7*(parseInt(_0x689cdd(0xa1))/0x8)+parseInt(_0x689cdd(0x92))/0x9+parseInt(_0x689cdd(0x90))/0xa;if(_0x1fa2d6===_0x56b0f1)break;else _0x476f63['push'](_0x476f63['shift']());}catch(_0x3340ba){_0x476f63['push'](_0x476f63['shift']());}}}(a36_0x3575,0x7ccd2));function a36_0x3575(){const _0x21a90d=['1734YvTgCY','verbose','346NDclLr','6023760HqyyZh','database','5039937IYpQZx','Usage:\x20tdx\x20show\x20<database.table>','5738400PVFgxJ','error','Querying\x20','table','validate','1844TalrND','length','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','\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--database\x20<database>','Table:\x20','show','catalog','Database:\x20','1048YGZXnJ','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','Limit:\x20','2591vWSGuz','cause','\x20\x20\x20or:\x20tdx\x20show\x20<catalog.database.table>','\x20\x20Cause:\x20','args','Catalog:\x20','8141ciXUuZ','4337825fkqzEl','Show\x20table\x20contents','showTable','query','data','Error:\x20','message','execute','site'];a36_0x3575=function(){return _0x21a90d;};return a36_0x3575();}import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';function a36_0x24a8(_0x7561ea,_0x48c467){const _0x3575b9=a36_0x3575();return a36_0x24a8=function(_0x24a8a3,_0x5ab2f0){_0x24a8a3=_0x24a8a3-0x8d;let _0x33d951=_0x3575b9[_0x24a8a3];return _0x33d951;},a36_0x24a8(_0x7561ea,_0x48c467);}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{['name']=a36_0x442f59(0x9e);['description']=a36_0x442f59(0xac);async[a36_0x442f59(0xb2)](_0x15b7f3){const _0x20920f=a36_0x442f59;return this[_0x20920f(0xad)](_0x15b7f3);}async['showTable'](_0x470d08){const _0x575899=a36_0x442f59,{options:_0x4e031d,args:_0x309a5f,tdx:_0xc2430b}=_0x470d08;let _0x42cdf9;try{_0x42cdf9=parseTableReference(_0x309a5f[0x0]);const _0xc1e0d9=_0x4e031d[_0x575899(0x91)];!_0x42cdf9['database']&&_0xc1e0d9&&(_0x42cdf9['database']=_0xc1e0d9);const _0x3ffa81=validateTableDescribeReference(_0x42cdf9);if(_0x3ffa81)return console[_0x575899(0x95)](_0x575899(0xb0)+_0x3ffa81),console[_0x575899(0x95)]('Usage:\x20tdx\x20show\x20<database.table>'),console[_0x575899(0x95)](_0x575899(0xa6)),console['error'](_0x575899(0x9c)),0x1;}catch(_0x4d99b3){return console[_0x575899(0x95)](_0x575899(0xb0)+_0x4d99b3[_0x575899(0xb1)]),console[_0x575899(0x95)](_0x575899(0x93)),console[_0x575899(0x95)](_0x575899(0xa6)),console[_0x575899(0x95)](_0x575899(0x9c)),0x1;}const _0x352ba5=_0x42cdf9[_0x575899(0x9f)],_0x2888d2=_0x42cdf9[_0x575899(0x91)],_0x385f11=_0x42cdf9[_0x575899(0x97)],_0x309266=resolveLimit(_0x4e031d['limit'],DEFAULT_DISPLAY_LIMIT);try{_0x4e031d[_0x575899(0x8e)]&&(console['error']('Site:\x20'+_0x4e031d[_0x575899(0xb3)]),_0x352ba5&&console['error'](_0x575899(0xa9)+_0x352ba5),console[_0x575899(0x95)](_0x575899(0xa0)+_0x2888d2),console[_0x575899(0x95)](_0x575899(0x9d)+_0x385f11),console['error'](_0x575899(0xa3)+_0x309266));const _0x4eeb08=_0x352ba5?_0x352ba5+'.'+_0x2888d2+'.'+_0x385f11:_0x2888d2+'.'+_0x385f11,_0x1f3e3e=await withSpinner(_0x575899(0x96)+_0x4eeb08+'...',()=>_0xc2430b[_0x575899(0xae)][_0x575899(0xad)](_0x2888d2,_0x385f11,_0x309266,_0x352ba5),{'verbose':_0x4e031d[_0x575899(0x8e)]}),_0x1facac=_0x1f3e3e[_0x575899(0xaf)],_0x128fbd=_0x1facac[_0x575899(0xaf)];return _0x128fbd[_0x575899(0x9a)]===0x0?console[_0x575899(0x95)]('✔\x20Query\x20successful\x20-\x200\x20rows\x20returned'):console[_0x575899(0x95)]('✔\x20Retrieved\x20'+_0x128fbd[_0x575899(0x9a)]+'\x20row'+(_0x128fbd[_0x575899(0x9a)]!==0x1?'s':'')+'\x20from\x20'+_0x4eeb08),await handleSDKOutput(_0x128fbd,_0x4e031d),0x0;}catch(_0x337053){if(_0x337053 instanceof SDKError)return console[_0x575899(0x95)](_0x575899(0xb0)+_0x337053['message']),_0x337053[_0x575899(0xa5)]&&console['error'](_0x575899(0xa7)+_0x337053[_0x575899(0xa5)]),0x1;throw _0x337053;}}[a36_0x442f59(0x98)](_0x295072){const _0x2022c0=a36_0x442f59;if(_0x295072[_0x2022c0(0xa8)][_0x2022c0(0x9a)]===0x0)return _0x2022c0(0x9b);if(_0x295072['args'][_0x2022c0(0x9a)]>0x1)return _0x2022c0(0xa2);return undefined;}}
1
+ const a36_0x2a5f33=a36_0x3905;(function(_0x5f5be3,_0x1109b1){const _0x1b0189=a36_0x3905,_0x2d5c24=_0x5f5be3();while(!![]){try{const _0x4a3d79=parseInt(_0x1b0189(0x87))/0x1+parseInt(_0x1b0189(0x85))/0x2+-parseInt(_0x1b0189(0xa8))/0x3*(-parseInt(_0x1b0189(0x99))/0x4)+parseInt(_0x1b0189(0x91))/0x5+-parseInt(_0x1b0189(0xa2))/0x6*(-parseInt(_0x1b0189(0x92))/0x7)+-parseInt(_0x1b0189(0x93))/0x8*(-parseInt(_0x1b0189(0x97))/0x9)+-parseInt(_0x1b0189(0xa3))/0xa;if(_0x4a3d79===_0x1109b1)break;else _0x2d5c24['push'](_0x2d5c24['shift']());}catch(_0x2e923b){_0x2d5c24['push'](_0x2d5c24['shift']());}}}(a36_0x3bbb,0x6e2b8));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';function a36_0x3905(_0x25db16,_0x26b035){const _0x3bbb26=a36_0x3bbb();return a36_0x3905=function(_0x39054b,_0x33daa9){_0x39054b=_0x39054b-0x80;let _0x2f4fc6=_0x3bbb26[_0x39054b];return _0x2f4fc6;},a36_0x3905(_0x25db16,_0x26b035);}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';function a36_0x3bbb(){const _0x168bc1=['\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--database\x20<database>','show','length','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','6SCfxcj','16000340njJgKj','args','...','\x20\x20\x20or:\x20tdx\x20show\x20<catalog.database.table>','data','6WEnyYi','Database:\x20','\x20row','Table:\x20','limit','✔\x20Retrieved\x20','587246WbZvPt','validate','272863HDNqmV','cause','database','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','description','message','Limit:\x20','error','execute','verbose','390365JLcENx','5698301GLFIRC','144HeoXDf','Usage:\x20tdx\x20show\x20<database.table>','Querying\x20','showTable','218223YuWPTU','Error:\x20','312484lzHKIv','✔\x20Query\x20successful\x20-\x200\x20rows\x20returned','query','Show\x20table\x20contents','table'];a36_0x3bbb=function(){return _0x168bc1;};return a36_0x3bbb();}export class ShowCommand extends BaseCommand{['name']=a36_0x2a5f33(0x9f);[a36_0x2a5f33(0x8b)]=a36_0x2a5f33(0x9c);async[a36_0x2a5f33(0x8f)](_0x4b4b19){const _0x35202b=a36_0x2a5f33;return this[_0x35202b(0x96)](_0x4b4b19);}async[a36_0x2a5f33(0x96)](_0xcfd911){const _0x5dc89d=a36_0x2a5f33,{options:_0x3e54e8,args:_0xf49fd8,tdx:_0x31a985}=_0xcfd911;let _0x1543fc;try{_0x1543fc=parseTableReference(_0xf49fd8[0x0]);const _0x58e2c1=_0x3e54e8['database'];!_0x1543fc['database']&&_0x58e2c1&&(_0x1543fc[_0x5dc89d(0x89)]=_0x58e2c1);const _0x168a95=validateTableDescribeReference(_0x1543fc);if(_0x168a95)return console[_0x5dc89d(0x8e)](_0x5dc89d(0x98)+_0x168a95),console[_0x5dc89d(0x8e)](_0x5dc89d(0x94)),console[_0x5dc89d(0x8e)](_0x5dc89d(0xa6)),console[_0x5dc89d(0x8e)](_0x5dc89d(0x9e)),0x1;}catch(_0x515bf4){return console[_0x5dc89d(0x8e)](_0x5dc89d(0x98)+_0x515bf4[_0x5dc89d(0x8c)]),console['error']('Usage:\x20tdx\x20show\x20<database.table>'),console['error']('\x20\x20\x20or:\x20tdx\x20show\x20<catalog.database.table>'),console[_0x5dc89d(0x8e)](_0x5dc89d(0x9e)),0x1;}const _0x111b19=_0x1543fc['catalog'],_0x426254=_0x1543fc['database'],_0x3fb0bd=_0x1543fc[_0x5dc89d(0x9d)],_0x378041=resolveLimit(_0x3e54e8[_0x5dc89d(0x83)],DEFAULT_DISPLAY_LIMIT);try{_0x3e54e8[_0x5dc89d(0x90)]&&(console['error']('Site:\x20'+_0x3e54e8['site']),_0x111b19&&console[_0x5dc89d(0x8e)]('Catalog:\x20'+_0x111b19),console[_0x5dc89d(0x8e)](_0x5dc89d(0x80)+_0x426254),console['error'](_0x5dc89d(0x82)+_0x3fb0bd),console['error'](_0x5dc89d(0x8d)+_0x378041));const _0x25470c=_0x111b19?_0x111b19+'.'+_0x426254+'.'+_0x3fb0bd:_0x426254+'.'+_0x3fb0bd,_0x4fb4fe=await withSpinner(_0x5dc89d(0x95)+_0x25470c+_0x5dc89d(0xa5),()=>_0x31a985[_0x5dc89d(0x9b)][_0x5dc89d(0x96)](_0x426254,_0x3fb0bd,_0x378041,_0x111b19),{'verbose':_0x3e54e8['verbose']}),_0x55cd7a=_0x4fb4fe[_0x5dc89d(0xa7)],_0x55a941=_0x55cd7a['data'];return _0x55a941['length']===0x0?console[_0x5dc89d(0x8e)](_0x5dc89d(0x9a)):console[_0x5dc89d(0x8e)](_0x5dc89d(0x84)+_0x55a941['length']+_0x5dc89d(0x81)+(_0x55a941[_0x5dc89d(0xa0)]!==0x1?'s':'')+'\x20from\x20'+_0x25470c),await handleSDKOutput(_0x55a941,_0x3e54e8),0x0;}catch(_0x665b0){if(_0x665b0 instanceof SDKError)return console[_0x5dc89d(0x8e)](_0x5dc89d(0x98)+_0x665b0[_0x5dc89d(0x8c)]),_0x665b0[_0x5dc89d(0x88)]&&console['error']('\x20\x20Cause:\x20'+_0x665b0[_0x5dc89d(0x88)]),0x1;throw _0x665b0;}}[a36_0x2a5f33(0x86)](_0x43efbf){const _0x25de67=a36_0x2a5f33;if(_0x43efbf[_0x25de67(0xa4)][_0x25de67(0xa0)]===0x0)return _0x25de67(0xa1);if(_0x43efbf[_0x25de67(0xa4)][_0x25de67(0xa0)]>0x1)return _0x25de67(0x8a);return undefined;}}
@@ -1 +1 @@
1
- const a37_0x5cc661=a37_0x1878;(function(_0x142b20,_0x54dbda){const _0x41fc2a=a37_0x1878,_0xcefa25=_0x142b20();while(!![]){try{const _0x593e59=-parseInt(_0x41fc2a(0x124))/0x1+-parseInt(_0x41fc2a(0x122))/0x2*(-parseInt(_0x41fc2a(0x123))/0x3)+-parseInt(_0x41fc2a(0x11f))/0x4+-parseInt(_0x41fc2a(0x10f))/0x5*(parseInt(_0x41fc2a(0x129))/0x6)+-parseInt(_0x41fc2a(0x105))/0x7*(parseInt(_0x41fc2a(0x110))/0x8)+-parseInt(_0x41fc2a(0x120))/0x9*(-parseInt(_0x41fc2a(0x11c))/0xa)+parseInt(_0x41fc2a(0x12d))/0xb;if(_0x593e59===_0x54dbda)break;else _0xcefa25['push'](_0xcefa25['shift']());}catch(_0x41597e){_0xcefa25['push'](_0xcefa25['shift']());}}}(a37_0x48c9,0xd3af8));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 a37_0x48c9(){const _0x193396=['18729645uyHKDX','cause','Table\x20pattern:\x20','Error:\x20Too\x20many\x20arguments.\x20Use\x20single\x20argument:','\x27\x20may\x20not\x20exist\x20or\x20contains\x20no\x20tables','.*\x22','\x20\x20tdx\x20tables\x20\x22*.user*\x22\x20\x20\x20\x20\x20\x20\x20->\x20tables\x20matching\x20user*\x20across\x20databases','\x20\x20tdx\x20tables\x20--in\x20mydb\x20\x20\x20\x20\x20\x20\x20->\x20all\x20tables\x20from\x20mydb','\x20\x20Cause:\x20','\x20\x20Or:\x20\x20tdx\x20tables\x20--database\x20','site','\x20table','178262SoBejD','table','error','Database:\x20all','✖\x20No\x20tables\x20found','Listing\x20tables...','limit','Note:\x20\x27','listTables','Database\x20\x27','15GYmmcf','264XPnwEL','query','Database:\x20','Did\x20you\x20mean\x20to\x20list\x20all\x20tables\x20from\x20database\x20\x27','\x20\x20tdx\x20tables\x20\x22mydb.*\x22\x20\x20\x20\x20\x20\x20\x20\x20->\x20all\x20tables\x20from\x20mydb','Error:\x20','execute','message','\x27\x20without\x20wildcards\x20would\x20search\x20for\x20tables\x20named\x20\x27','verbose','length','Or\x20use\x20--in\x20flag:','120GLPtPb','Error:\x20Pattern\x20\x27','\x27\x20is\x20ambiguous.','196012IOvjME','71163TfomEO','tables','14qUwMyV','433737gTATGX','920992szRBQF','✔\x20Found\x20','database','\x27\x20across\x20all\x20databases.','data','264390ppvvik','name','includes','\x20\x20Use:\x20tdx\x20tables\x20\x22'];a37_0x48c9=function(){return _0x193396;};return a37_0x48c9();}function a37_0x1878(_0x2630f5,_0x48d835){const _0x48c9ab=a37_0x48c9();return a37_0x1878=function(_0x187891,_0x3af66b){_0x187891=_0x187891-0x102;let _0x39cc17=_0x48c9ab[_0x187891];return _0x39cc17;},a37_0x1878(_0x2630f5,_0x48d835);}export class TablesCommand extends BaseCommand{[a37_0x5cc661(0x12a)]=a37_0x5cc661(0x121);['description']='List\x20tables\x20in\x20a\x20database';async[a37_0x5cc661(0x116)](_0x1769f0){const _0x5efe05=a37_0x5cc661,{options:_0x5d6210,args:_0x31f77c,tdx:_0x1ebc34}=_0x1769f0;let _0x11fc74;if(_0x31f77c[_0x5efe05(0x11a)]===0x0)_0x11fc74={'database':undefined,'table':undefined,'original':''};else{if(_0x31f77c[_0x5efe05(0x11a)]===0x1)try{_0x11fc74=parseTableReference(_0x31f77c[0x0]);if(_0x11fc74['table']&&!_0x11fc74[_0x5efe05(0x126)]&&!_0x11fc74[_0x5efe05(0x106)]['includes']('*')&&!_0x11fc74['table'][_0x5efe05(0x12b)]('?'))return console[_0x5efe05(0x107)](_0x5efe05(0x11d)+_0x31f77c[0x0]+_0x5efe05(0x11e)),console[_0x5efe05(0x107)](_0x5efe05(0x113)+_0x11fc74[_0x5efe05(0x106)]+'\x27?'),console[_0x5efe05(0x107)](_0x5efe05(0x12c)+_0x11fc74[_0x5efe05(0x106)]+_0x5efe05(0x132)),console[_0x5efe05(0x107)]('\x20\x20Or:\x20\x20tdx\x20tables\x20--in\x20'+_0x11fc74['table']),console[_0x5efe05(0x107)](_0x5efe05(0x102)+_0x11fc74[_0x5efe05(0x106)]),console[_0x5efe05(0x107)](''),console[_0x5efe05(0x107)](_0x5efe05(0x10c)+_0x31f77c[0x0]+_0x5efe05(0x118)+_0x11fc74[_0x5efe05(0x106)]+_0x5efe05(0x127)),0x1;}catch(_0x89a29b){return console['error'](_0x5efe05(0x115)+_0x89a29b[_0x5efe05(0x117)]),0x1;}else return console[_0x5efe05(0x107)](_0x5efe05(0x130)),console[_0x5efe05(0x107)]('\x20\x20tdx\x20tables\x20users\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20->\x20table\x20\x22users\x22\x20across\x20all\x20databases'),console[_0x5efe05(0x107)](_0x5efe05(0x114)),console[_0x5efe05(0x107)]('\x20\x20tdx\x20tables\x20\x22mydb.users\x22\x20\x20\x20\x20->\x20table\x20\x22users\x22\x20in\x20database\x20mydb'),console[_0x5efe05(0x107)](_0x5efe05(0x133)),console[_0x5efe05(0x107)](_0x5efe05(0x11b)),console[_0x5efe05(0x107)](_0x5efe05(0x134)),0x1;}const _0x4e2ea6=_0x5d6210['database'];!_0x11fc74[_0x5efe05(0x126)]&&_0x4e2ea6&&(_0x11fc74['database']=_0x4e2ea6);try{const _0x526f54=_0x430517=>_0x430517&&(_0x430517[_0x5efe05(0x12b)]('*')||_0x430517[_0x5efe05(0x12b)]('?')),_0x2229a3=_0x526f54(_0x11fc74[_0x5efe05(0x126)]);_0x5d6210[_0x5efe05(0x119)]&&(console[_0x5efe05(0x107)]('Site:\x20'+_0x5d6210[_0x5efe05(0x103)]),_0x11fc74[_0x5efe05(0x126)]?_0x2229a3?console[_0x5efe05(0x107)]('Database\x20pattern:\x20'+_0x11fc74[_0x5efe05(0x126)]):console['error'](_0x5efe05(0x112)+_0x11fc74['database']):console[_0x5efe05(0x107)](_0x5efe05(0x108)),_0x11fc74[_0x5efe05(0x106)]&&console[_0x5efe05(0x107)](_0x5efe05(0x12f)+_0x11fc74[_0x5efe05(0x106)]));const _0x1d5871=_0x11fc74[_0x5efe05(0x126)]&&!_0x2229a3?_0x11fc74[_0x5efe05(0x126)]:undefined,_0xb4e708=_0x2229a3?_0x11fc74[_0x5efe05(0x126)]:undefined,_0x2d9f7a=_0x11fc74[_0x5efe05(0x106)],_0x548800=resolveLimit(_0x5d6210[_0x5efe05(0x10b)],DEFAULT_LISTING_LIMIT),_0x42404e=await withSpinner(_0x5efe05(0x10a),()=>_0x1ebc34[_0x5efe05(0x111)][_0x5efe05(0x10d)](_0x1d5871,_0x2d9f7a,_0xb4e708,_0x548800),{'verbose':_0x5d6210[_0x5efe05(0x119)]}),_0x31e01f=_0x42404e[_0x5efe05(0x128)];if(_0x31e01f['length']===0x0&&_0x11fc74[_0x5efe05(0x126)]&&!_0x2229a3)return console[_0x5efe05(0x107)](_0x5efe05(0x109)),console[_0x5efe05(0x107)](_0x5efe05(0x10e)+_0x11fc74[_0x5efe05(0x126)]+_0x5efe05(0x131)),0x1;return console['error'](_0x5efe05(0x125)+_0x31e01f[_0x5efe05(0x11a)]+_0x5efe05(0x104)+(_0x31e01f[_0x5efe05(0x11a)]!==0x1?'s':'')),await handleSDKOutput(_0x31e01f,{..._0x5d6210,'limit':_0x548800}),0x0;}catch(_0x8d8d3e){if(_0x8d8d3e instanceof SDKError)return console[_0x5efe05(0x107)](_0x5efe05(0x115)+_0x8d8d3e[_0x5efe05(0x117)]),_0x8d8d3e[_0x5efe05(0x12e)]&&console[_0x5efe05(0x107)](_0x5efe05(0x135)+_0x8d8d3e[_0x5efe05(0x12e)]),0x1;throw _0x8d8d3e;}}['validate'](_0x99e6df){return undefined;}}
1
+ const a37_0x27df97=a37_0x3d89;(function(_0x3b6b70,_0x51e088){const _0x1c243c=a37_0x3d89,_0x351563=_0x3b6b70();while(!![]){try{const _0xf8bffa=parseInt(_0x1c243c(0xa7))/0x1+-parseInt(_0x1c243c(0xb0))/0x2*(-parseInt(_0x1c243c(0xa2))/0x3)+parseInt(_0x1c243c(0x96))/0x4+parseInt(_0x1c243c(0x99))/0x5*(parseInt(_0x1c243c(0xb1))/0x6)+parseInt(_0x1c243c(0xaf))/0x7+parseInt(_0x1c243c(0x9f))/0x8*(-parseInt(_0x1c243c(0xb7))/0x9)+parseInt(_0x1c243c(0xae))/0xa*(-parseInt(_0x1c243c(0x98))/0xb);if(_0xf8bffa===_0x51e088)break;else _0x351563['push'](_0x351563['shift']());}catch(_0x54729a){_0x351563['push'](_0x351563['shift']());}}}(a37_0x25b1,0x59bbc));import{BaseCommand}from'./command.js';function a37_0x3d89(_0x955b97,_0x45a2be){const _0x25b15a=a37_0x25b1();return a37_0x3d89=function(_0x3d8952,_0x9fb214){_0x3d8952=_0x3d8952-0x94;let _0x4b3d8d=_0x25b15a[_0x3d8952];return _0x4b3d8d;},a37_0x3d89(_0x955b97,_0x45a2be);}import{SDKError}from'../sdk/index.js';import{handleSDKOutput}from'../utils/command-output.js';function a37_0x25b1(){const _0x2abf47=['listTables','execute','674180gZRFMG','\x27\x20across\x20all\x20databases.','781BYTMKZ','3230635KdwgIU','\x20\x20Or:\x20\x20tdx\x20tables\x20--database\x20','List\x20tables\x20in\x20a\x20database','Error:\x20','Error:\x20Pattern\x20\x27','Database:\x20all','180808xxzcRW','description','✔\x20Found\x20','84gUwNZJ','cause','Did\x20you\x20mean\x20to\x20list\x20all\x20tables\x20from\x20database\x20\x27','message','name','35364Yzrtuj','Database\x20pattern:\x20','\x27\x20without\x20wildcards\x20would\x20search\x20for\x20tables\x20named\x20\x27','includes','data','\x20\x20tdx\x20tables\x20\x22mydb.users\x22\x20\x20\x20\x20->\x20table\x20\x22users\x22\x20in\x20database\x20mydb','\x27\x20is\x20ambiguous.','187710rFKnuD','4711280zWCbUj','30416CefECm','6uKlzpM','limit','length','.*\x22','Or\x20use\x20--in\x20flag:','verbose','99BVjFXA','tables','error','table','database','\x20\x20tdx\x20tables\x20\x22*.user*\x22\x20\x20\x20\x20\x20\x20\x20->\x20tables\x20matching\x20user*\x20across\x20databases','Database\x20\x27','✖\x20No\x20tables\x20found','Listing\x20tables...','site','Note:\x20\x27','Site:\x20'];a37_0x25b1=function(){return _0x2abf47;};return a37_0x25b1();}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{[a37_0x27df97(0xa6)]=a37_0x27df97(0xb8);[a37_0x27df97(0xa0)]=a37_0x27df97(0x9b);async[a37_0x27df97(0x95)](_0x8b347f){const _0x2de57d=a37_0x27df97,{options:_0x4dd8a1,args:_0x546bfb,tdx:_0x1d27b0}=_0x8b347f;let _0x55c96d;if(_0x546bfb[_0x2de57d(0xb3)]===0x0)_0x55c96d={'database':undefined,'table':undefined,'original':''};else{if(_0x546bfb[_0x2de57d(0xb3)]===0x1)try{_0x55c96d=parseTableReference(_0x546bfb[0x0]);if(_0x55c96d[_0x2de57d(0xba)]&&!_0x55c96d[_0x2de57d(0xbb)]&&!_0x55c96d[_0x2de57d(0xba)][_0x2de57d(0xaa)]('*')&&!_0x55c96d[_0x2de57d(0xba)][_0x2de57d(0xaa)]('?'))return console['error'](_0x2de57d(0x9d)+_0x546bfb[0x0]+_0x2de57d(0xad)),console['error'](_0x2de57d(0xa4)+_0x55c96d[_0x2de57d(0xba)]+'\x27?'),console[_0x2de57d(0xb9)]('\x20\x20Use:\x20tdx\x20tables\x20\x22'+_0x55c96d['table']+_0x2de57d(0xb4)),console['error']('\x20\x20Or:\x20\x20tdx\x20tables\x20--in\x20'+_0x55c96d[_0x2de57d(0xba)]),console['error'](_0x2de57d(0x9a)+_0x55c96d['table']),console['error'](''),console['error'](_0x2de57d(0xc1)+_0x546bfb[0x0]+_0x2de57d(0xa9)+_0x55c96d['table']+_0x2de57d(0x97)),0x1;}catch(_0x33d933){return console['error'](_0x2de57d(0x9c)+_0x33d933[_0x2de57d(0xa5)]),0x1;}else return console[_0x2de57d(0xb9)]('Error:\x20Too\x20many\x20arguments.\x20Use\x20single\x20argument:'),console[_0x2de57d(0xb9)]('\x20\x20tdx\x20tables\x20users\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20->\x20table\x20\x22users\x22\x20across\x20all\x20databases'),console['error']('\x20\x20tdx\x20tables\x20\x22mydb.*\x22\x20\x20\x20\x20\x20\x20\x20\x20->\x20all\x20tables\x20from\x20mydb'),console[_0x2de57d(0xb9)](_0x2de57d(0xac)),console[_0x2de57d(0xb9)](_0x2de57d(0xbc)),console[_0x2de57d(0xb9)](_0x2de57d(0xb5)),console[_0x2de57d(0xb9)]('\x20\x20tdx\x20tables\x20--in\x20mydb\x20\x20\x20\x20\x20\x20\x20->\x20all\x20tables\x20from\x20mydb'),0x1;}const _0x4788d1=_0x4dd8a1['database'];!_0x55c96d[_0x2de57d(0xbb)]&&_0x4788d1&&(_0x55c96d[_0x2de57d(0xbb)]=_0x4788d1);try{const _0x4db6ad=_0x243ac0=>_0x243ac0&&(_0x243ac0[_0x2de57d(0xaa)]('*')||_0x243ac0[_0x2de57d(0xaa)]('?')),_0x519144=_0x4db6ad(_0x55c96d[_0x2de57d(0xbb)]);_0x4dd8a1[_0x2de57d(0xb6)]&&(console[_0x2de57d(0xb9)](_0x2de57d(0xc2)+_0x4dd8a1[_0x2de57d(0xc0)]),_0x55c96d[_0x2de57d(0xbb)]?_0x519144?console['error'](_0x2de57d(0xa8)+_0x55c96d[_0x2de57d(0xbb)]):console[_0x2de57d(0xb9)]('Database:\x20'+_0x55c96d[_0x2de57d(0xbb)]):console[_0x2de57d(0xb9)](_0x2de57d(0x9e)),_0x55c96d['table']&&console[_0x2de57d(0xb9)]('Table\x20pattern:\x20'+_0x55c96d[_0x2de57d(0xba)]));const _0x315dc7=_0x55c96d[_0x2de57d(0xbb)]&&!_0x519144?_0x55c96d['database']:undefined,_0x12994b=_0x519144?_0x55c96d[_0x2de57d(0xbb)]:undefined,_0x4d6a0e=_0x55c96d[_0x2de57d(0xba)],_0x2a4ac1=resolveLimit(_0x4dd8a1[_0x2de57d(0xb2)],DEFAULT_LISTING_LIMIT),_0xb1fdfc=await withSpinner(_0x2de57d(0xbf),()=>_0x1d27b0['query'][_0x2de57d(0x94)](_0x315dc7,_0x4d6a0e,_0x12994b,_0x2a4ac1),{'verbose':_0x4dd8a1['verbose']}),_0x5e764e=_0xb1fdfc[_0x2de57d(0xab)];if(_0x5e764e[_0x2de57d(0xb3)]===0x0&&_0x55c96d['database']&&!_0x519144)return console[_0x2de57d(0xb9)](_0x2de57d(0xbe)),console['error'](_0x2de57d(0xbd)+_0x55c96d[_0x2de57d(0xbb)]+'\x27\x20may\x20not\x20exist\x20or\x20contains\x20no\x20tables'),0x1;return console[_0x2de57d(0xb9)](_0x2de57d(0xa1)+_0x5e764e[_0x2de57d(0xb3)]+'\x20table'+(_0x5e764e['length']!==0x1?'s':'')),await handleSDKOutput(_0x5e764e,{..._0x4dd8a1,'limit':_0x2a4ac1}),0x0;}catch(_0x4d76d3){if(_0x4d76d3 instanceof SDKError)return console[_0x2de57d(0xb9)]('Error:\x20'+_0x4d76d3['message']),_0x4d76d3[_0x2de57d(0xa3)]&&console[_0x2de57d(0xb9)]('\x20\x20Cause:\x20'+_0x4d76d3['cause']),0x1;throw _0x4d76d3;}}['validate'](_0xd3cf4f){return undefined;}}
@@ -1 +1 @@
1
- const a38_0x51b6cd=a38_0x47a2;(function(_0x57716b,_0x4097e3){const _0x76f8e3=a38_0x47a2,_0x1b2242=_0x57716b();while(!![]){try{const _0x5cc1fe=parseInt(_0x76f8e3(0x118))/0x1+parseInt(_0x76f8e3(0x123))/0x2*(-parseInt(_0x76f8e3(0x149))/0x3)+parseInt(_0x76f8e3(0x144))/0x4*(-parseInt(_0x76f8e3(0x12b))/0x5)+parseInt(_0x76f8e3(0x139))/0x6*(parseInt(_0x76f8e3(0x134))/0x7)+-parseInt(_0x76f8e3(0x13a))/0x8+-parseInt(_0x76f8e3(0x14a))/0x9*(parseInt(_0x76f8e3(0x117))/0xa)+parseInt(_0x76f8e3(0x142))/0xb;if(_0x5cc1fe===_0x4097e3)break;else _0x1b2242['push'](_0x1b2242['shift']());}catch(_0x2e359b){_0x1b2242['push'](_0x1b2242['shift']());}}}(a38_0x305c,0x8ecc8));import{BaseCommand}from'./command.js';import{saveSessionContext,getCurrentSessionPID,cleanExpiredSessions,clearSessionContext}from'../core/session.js';import{profileExists}from'../core/profile.js';import{GlobalContext}from'../core/global-context.js';import a38_0x339b25 from'chalk';function a38_0x47a2(_0x5a5596,_0x4ae614){const _0x305c32=a38_0x305c();return a38_0x47a2=function(_0x47a276,_0x2d2dab){_0x47a276=_0x47a276-0x117;let _0x206bfb=_0x305c32[_0x47a276];return _0x206bfb;},a38_0x47a2(_0x5a5596,_0x4ae614);}function a38_0x305c(){const _0x4132f3=['dim','\x0aRun\x20\x27tdx\x20use\x20--help\x27\x20for\x20more\x20options','2nHtBrC','Usage:\x20tdx\x20use\x20<resource>\x20<value>\x0a','\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20--clear\x20\x20\x20\x20\x20\x20#\x20Clear\x20session\x20context\x0a','\x0aTip:\x20Use\x20\x27tdx\x20use\x20--clear\x27\x20to\x20clear\x20session\x20overrides','Session\x20database\x20set\x20to:\x20','validate','cleared','green','5mHQUrs','display','Session\x20profile\x20set\x20to:\x20','clear','\x0aUse\x20\x27tdx\x20profiles\x27\x20to\x20see\x20available\x20profiles','execute','message','Session\x20llm_project\x20set\x20to:\x20','Resources:\x20database,\x20parent_segment,\x20llm_project,\x20profile,\x20engage_workspace','217NuDtvs','use','database','error','\x0aSet\x20context:\x20tdx\x20use\x20<resource>\x20<value>','206580zxlzdV','5162936WoBEAx','Session\x20engage_workspace\x20set\x20to:\x20','includes','displayWithSources','llm_project','Error:\x20Profile\x20\x27','toString','log','8052880YXfwNr','(session:\x20','757608ePqZmd','name','description','parent_segment','\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20current\x20context\x0a','3049323vsYJhs','61434xxWnBc','530cROtoi','998482wsRzMM','length','join','Error:\x20','Session\x20context\x20','\x0aResources:\x20database,\x20parent_segment,\x20llm_project,\x20profile,\x20engage_workspace\x0a','engage_workspace','profile','session'];a38_0x305c=function(){return _0x4132f3;};return a38_0x305c();}export class UseCommand extends BaseCommand{[a38_0x51b6cd(0x145)]=a38_0x51b6cd(0x135);[a38_0x51b6cd(0x146)]='Set\x20session-level\x20context';[a38_0x51b6cd(0x128)](_0x3207ee){const _0x68015e=a38_0x51b6cd,{args:_0x29bc7d}=_0x3207ee;if(_0x29bc7d[_0x68015e(0x119)]===0x0)return undefined;if(_0x29bc7d[_0x68015e(0x119)]===0x1)return _0x68015e(0x124)+_0x68015e(0x148)+_0x68015e(0x125)+_0x68015e(0x11d)+_0x68015e(0x122);const _0x108bda=_0x29bc7d[0x0],_0x2d93b5=[_0x68015e(0x136),_0x68015e(0x147),_0x68015e(0x13e),_0x68015e(0x11f),'engage_workspace'];if(!_0x2d93b5[_0x68015e(0x13c)](_0x108bda))return'Invalid\x20resource:\x20'+_0x108bda+'.\x20Must\x20be\x20one\x20of:\x20'+_0x2d93b5[_0x68015e(0x11a)](',\x20');return undefined;}async[a38_0x51b6cd(0x130)](_0x35d496){const _0x1183a9=a38_0x51b6cd,{args:_0x28194f,options:_0x207d7e}=_0x35d496,_0x5c1eb2=_0x207d7e['debug'],_0x121d9f=_0x207d7e[_0x1183a9(0x12e)];cleanExpiredSessions();try{if(_0x121d9f){clearSessionContext(_0x207d7e[_0x1183a9(0x120)]);const _0x2eeee3=_0x207d7e['session']||getCurrentSessionPID()[_0x1183a9(0x140)]();return console['log'](_0x1183a9(0x11c)+a38_0x339b25[_0x1183a9(0x12a)](_0x1183a9(0x129))+'\x20'+a38_0x339b25[_0x1183a9(0x121)](_0x1183a9(0x143)+_0x2eeee3+')')),0x0;}if(_0x28194f['length']===0x0){const _0xe8b380=new GlobalContext(_0x207d7e);return _0x5c1eb2?_0xe8b380[_0x1183a9(0x13d)]():_0xe8b380[_0x1183a9(0x12c)](),console[_0x1183a9(0x141)](a38_0x339b25[_0x1183a9(0x121)](_0x1183a9(0x138))),console[_0x1183a9(0x141)](a38_0x339b25[_0x1183a9(0x121)](_0x1183a9(0x133))),0x0;}const _0x3dc197=_0x28194f[0x0],_0x299566=_0x28194f[0x1];if(_0x3dc197===_0x1183a9(0x11f)){if(!profileExists(_0x299566))return console[_0x1183a9(0x137)](_0x1183a9(0x13f)+_0x299566+'\x27\x20does\x20not\x20exist'),console[_0x1183a9(0x137)](_0x1183a9(0x12f)),0x1;const _0x1450ad=_0x207d7e[_0x1183a9(0x120)]||getCurrentSessionPID()['toString']();return saveSessionContext({'profile':_0x299566},_0x207d7e['session']),console[_0x1183a9(0x141)](_0x1183a9(0x12d)+a38_0x339b25[_0x1183a9(0x12a)](_0x299566)+'\x20'+a38_0x339b25[_0x1183a9(0x121)](_0x1183a9(0x143)+_0x1450ad+')')),console[_0x1183a9(0x141)](a38_0x339b25['dim'](_0x1183a9(0x126))),0x0;}const _0x4acc45={},_0xc3a4ee=_0x207d7e[_0x1183a9(0x120)]||getCurrentSessionPID()[_0x1183a9(0x140)]();switch(_0x3dc197){case _0x1183a9(0x136):_0x4acc45['database']=_0x299566,console[_0x1183a9(0x141)](_0x1183a9(0x127)+a38_0x339b25[_0x1183a9(0x12a)](_0x299566)+'\x20'+a38_0x339b25[_0x1183a9(0x121)](_0x1183a9(0x143)+_0xc3a4ee+')'));break;case _0x1183a9(0x147):_0x4acc45[_0x1183a9(0x147)]=_0x299566,console[_0x1183a9(0x141)]('Session\x20parent_segment\x20set\x20to:\x20'+a38_0x339b25[_0x1183a9(0x12a)](_0x299566)+'\x20'+a38_0x339b25[_0x1183a9(0x121)](_0x1183a9(0x143)+_0xc3a4ee+')'));break;case _0x1183a9(0x13e):_0x4acc45['llm_project']=_0x299566,console[_0x1183a9(0x141)](_0x1183a9(0x132)+a38_0x339b25['green'](_0x299566)+'\x20'+a38_0x339b25[_0x1183a9(0x121)](_0x1183a9(0x143)+_0xc3a4ee+')'));break;case _0x1183a9(0x11e):_0x4acc45[_0x1183a9(0x11e)]=_0x299566,console[_0x1183a9(0x141)](_0x1183a9(0x13b)+a38_0x339b25[_0x1183a9(0x12a)](_0x299566)+'\x20'+a38_0x339b25[_0x1183a9(0x121)](_0x1183a9(0x143)+_0xc3a4ee+')'));break;}return saveSessionContext(_0x4acc45,_0x207d7e[_0x1183a9(0x120)]),console[_0x1183a9(0x141)](a38_0x339b25[_0x1183a9(0x121)](_0x1183a9(0x126))),0x0;}catch(_0x3d88e0){return _0x3d88e0 instanceof Error&&console['error'](_0x1183a9(0x11b)+_0x3d88e0[_0x1183a9(0x131)]),0x1;}}}
1
+ const a38_0x302600=a38_0x35eb;(function(_0x174dad,_0x1cf40a){const _0x189951=a38_0x35eb,_0x2b1c7d=_0x174dad();while(!![]){try{const _0x332762=-parseInt(_0x189951(0x119))/0x1+-parseInt(_0x189951(0x11b))/0x2*(-parseInt(_0x189951(0x102))/0x3)+-parseInt(_0x189951(0x11f))/0x4+parseInt(_0x189951(0x124))/0x5*(parseInt(_0x189951(0x109))/0x6)+parseInt(_0x189951(0x127))/0x7*(-parseInt(_0x189951(0x128))/0x8)+parseInt(_0x189951(0x123))/0x9*(-parseInt(_0x189951(0xfc))/0xa)+parseInt(_0x189951(0x111))/0xb*(parseInt(_0x189951(0x110))/0xc);if(_0x332762===_0x1cf40a)break;else _0x2b1c7d['push'](_0x2b1c7d['shift']());}catch(_0x489e88){_0x2b1c7d['push'](_0x2b1c7d['shift']());}}}(a38_0x6ab4,0x6830f));import{BaseCommand}from'./command.js';import{saveSessionContext,getCurrentSessionPID,cleanExpiredSessions,clearSessionContext}from'../core/session.js';function a38_0x35eb(_0x279e04,_0x1b628b){const _0x6ab498=a38_0x6ab4();return a38_0x35eb=function(_0x35eb55,_0x31d95d){_0x35eb55=_0x35eb55-0xfa;let _0x2e4476=_0x6ab498[_0x35eb55];return _0x2e4476;},a38_0x35eb(_0x279e04,_0x1b628b);}import{profileExists}from'../core/profile.js';import{GlobalContext}from'../core/global-context.js';import a38_0xfcca43 from'chalk';function a38_0x6ab4(){const _0x57cf4f=['execute','Error:\x20','\x27\x20does\x20not\x20exist','2921356xeVkZQ','\x0aUse\x20\x27tdx\x20profiles\x27\x20to\x20see\x20available\x20profiles','database','engage_workspace','4986099LauDzD','7540zcHHmn','Session\x20engage_workspace\x20set\x20to:\x20','\x0aTip:\x20Use\x20\x27tdx\x20use\x20--clear\x27\x20to\x20clear\x20session\x20overrides','21RkpNnx','2012448uzXTUZ','validate','Session\x20parent_segment\x20set\x20to:\x20','Set\x20session-level\x20context','debug','\x0aRun\x20\x27tdx\x20use\x20--help\x27\x20for\x20more\x20options','Resources:\x20database,\x20parent_segment,\x20llm_project,\x20profile,\x20engage_workspace','join','name','profile','10CCEfyg','cleared','session','\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20current\x20context\x0a','(session:\x20','error','1551UxMMLJ','Session\x20profile\x20set\x20to:\x20','length','includes','Session\x20llm_project\x20set\x20to:\x20','parent_segment','Session\x20database\x20set\x20to:\x20','1086muNchV','.\x20Must\x20be\x20one\x20of:\x20','Invalid\x20resource:\x20','\x0aResources:\x20database,\x20parent_segment,\x20llm_project,\x20profile,\x20engage_workspace\x0a','\x0aSet\x20context:\x20tdx\x20use\x20<resource>\x20<value>','description','toString','156CtXcmd','1970188JtoryS','llm_project','green','Usage:\x20tdx\x20use\x20<resource>\x20<value>\x0a','\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20--clear\x20\x20\x20\x20\x20\x20#\x20Clear\x20session\x20context\x0a','Session\x20context\x20','log','display','684621ifErSC','dim','2124RfYkLX'];a38_0x6ab4=function(){return _0x57cf4f;};return a38_0x6ab4();}export class UseCommand extends BaseCommand{[a38_0x302600(0xfa)]='use';[a38_0x302600(0x10e)]=a38_0x302600(0x12b);[a38_0x302600(0x129)](_0x1fd228){const _0xc76a54=a38_0x302600,{args:_0x34740b}=_0x1fd228;if(_0x34740b['length']===0x0)return undefined;if(_0x34740b['length']===0x1)return _0xc76a54(0x114)+_0xc76a54(0xff)+_0xc76a54(0x115)+_0xc76a54(0x10c)+_0xc76a54(0x12d);const _0xb2d326=_0x34740b[0x0],_0x3d0cee=[_0xc76a54(0x121),_0xc76a54(0x107),_0xc76a54(0x112),_0xc76a54(0xfb),_0xc76a54(0x122)];if(!_0x3d0cee[_0xc76a54(0x105)](_0xb2d326))return _0xc76a54(0x10b)+_0xb2d326+_0xc76a54(0x10a)+_0x3d0cee[_0xc76a54(0x12f)](',\x20');return undefined;}async[a38_0x302600(0x11c)](_0x3e5fe5){const _0x44e8e4=a38_0x302600,{args:_0x362e30,options:_0x152baf}=_0x3e5fe5,_0x2dfc1d=_0x152baf[_0x44e8e4(0x12c)],_0x49f107=_0x152baf['clear'];cleanExpiredSessions();try{if(_0x49f107){clearSessionContext(_0x152baf['session']);const _0x172931=_0x152baf[_0x44e8e4(0xfe)]||getCurrentSessionPID()['toString']();return console[_0x44e8e4(0x117)](_0x44e8e4(0x116)+a38_0xfcca43[_0x44e8e4(0x113)](_0x44e8e4(0xfd))+'\x20'+a38_0xfcca43['dim'](_0x44e8e4(0x100)+_0x172931+')')),0x0;}if(_0x362e30[_0x44e8e4(0x104)]===0x0){const _0x6c5d2f=new GlobalContext(_0x152baf);return _0x2dfc1d?_0x6c5d2f['displayWithSources']():_0x6c5d2f[_0x44e8e4(0x118)](),console[_0x44e8e4(0x117)](a38_0xfcca43[_0x44e8e4(0x11a)](_0x44e8e4(0x10d))),console[_0x44e8e4(0x117)](a38_0xfcca43[_0x44e8e4(0x11a)](_0x44e8e4(0x12e))),0x0;}const _0x354103=_0x362e30[0x0],_0x5cca6d=_0x362e30[0x1];if(_0x354103===_0x44e8e4(0xfb)){if(!profileExists(_0x5cca6d))return console[_0x44e8e4(0x101)]('Error:\x20Profile\x20\x27'+_0x5cca6d+_0x44e8e4(0x11e)),console[_0x44e8e4(0x101)](_0x44e8e4(0x120)),0x1;const _0x3ff1ac=_0x152baf[_0x44e8e4(0xfe)]||getCurrentSessionPID()[_0x44e8e4(0x10f)]();return saveSessionContext({'profile':_0x5cca6d},_0x152baf[_0x44e8e4(0xfe)]),console['log'](_0x44e8e4(0x103)+a38_0xfcca43['green'](_0x5cca6d)+'\x20'+a38_0xfcca43[_0x44e8e4(0x11a)]('(session:\x20'+_0x3ff1ac+')')),console[_0x44e8e4(0x117)](a38_0xfcca43['dim'](_0x44e8e4(0x126))),0x0;}const _0x340304={},_0x52b9fe=_0x152baf[_0x44e8e4(0xfe)]||getCurrentSessionPID()[_0x44e8e4(0x10f)]();switch(_0x354103){case _0x44e8e4(0x121):_0x340304[_0x44e8e4(0x121)]=_0x5cca6d,console[_0x44e8e4(0x117)](_0x44e8e4(0x108)+a38_0xfcca43[_0x44e8e4(0x113)](_0x5cca6d)+'\x20'+a38_0xfcca43[_0x44e8e4(0x11a)](_0x44e8e4(0x100)+_0x52b9fe+')'));break;case'parent_segment':_0x340304[_0x44e8e4(0x107)]=_0x5cca6d,console['log'](_0x44e8e4(0x12a)+a38_0xfcca43['green'](_0x5cca6d)+'\x20'+a38_0xfcca43[_0x44e8e4(0x11a)](_0x44e8e4(0x100)+_0x52b9fe+')'));break;case _0x44e8e4(0x112):_0x340304[_0x44e8e4(0x112)]=_0x5cca6d,console[_0x44e8e4(0x117)](_0x44e8e4(0x106)+a38_0xfcca43[_0x44e8e4(0x113)](_0x5cca6d)+'\x20'+a38_0xfcca43['dim'](_0x44e8e4(0x100)+_0x52b9fe+')'));break;case'engage_workspace':_0x340304[_0x44e8e4(0x122)]=_0x5cca6d,console['log'](_0x44e8e4(0x125)+a38_0xfcca43[_0x44e8e4(0x113)](_0x5cca6d)+'\x20'+a38_0xfcca43[_0x44e8e4(0x11a)]('(session:\x20'+_0x52b9fe+')'));break;}return saveSessionContext(_0x340304,_0x152baf[_0x44e8e4(0xfe)]),console[_0x44e8e4(0x117)](a38_0xfcca43[_0x44e8e4(0x11a)](_0x44e8e4(0x126))),0x0;}catch(_0x344d39){return _0x344d39 instanceof Error&&console[_0x44e8e4(0x101)](_0x44e8e4(0x11d)+_0x344d39['message']),0x1;}}}
@@ -1 +1 @@
1
- const a39_0x4e4c1b=a39_0x5e09;(function(_0x2b66e2,_0x4b0832){const _0x2897e6=a39_0x5e09,_0x2d4fce=_0x2b66e2();while(!![]){try{const _0x5ca42d=parseInt(_0x2897e6(0xee))/0x1*(parseInt(_0x2897e6(0xc7))/0x2)+parseInt(_0x2897e6(0xe7))/0x3+-parseInt(_0x2897e6(0x100))/0x4+-parseInt(_0x2897e6(0xbe))/0x5*(-parseInt(_0x2897e6(0x124))/0x6)+parseInt(_0x2897e6(0x119))/0x7+-parseInt(_0x2897e6(0xbd))/0x8+parseInt(_0x2897e6(0x116))/0x9;if(_0x5ca42d===_0x4b0832)break;else _0x2d4fce['push'](_0x2d4fce['shift']());}catch(_0x30b4cc){_0x2d4fce['push'](_0x2d4fce['shift']());}}}(a39_0x5dd6,0x892ba));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 a39_0x34e1af from'prompts';export class WorkflowProjectsCommand extends BaseCommand{[a39_0x4e4c1b(0xd5)]=a39_0x4e4c1b(0x10f);[a39_0x4e4c1b(0xb0)]=a39_0x4e4c1b(0x12d);async['execute'](_0x4265f7){const _0x30590c=a39_0x4e4c1b,{options:_0x4bda16,args:_0x143001,tdx:_0x43b51c}=_0x4265f7,_0x42c87b=_0x143001[0x0];try{_0x4bda16[_0x30590c(0xcc)]&&_0x42c87b&&console[_0x30590c(0x110)]('Pattern:\x20'+_0x42c87b);const _0x463eee=await withSpinner(_0x30590c(0x122),()=>_0x43b51c[_0x30590c(0x103)][_0x30590c(0xe3)](_0x42c87b,{'limit':_0x4bda16['limit']}),{'verbose':_0x4bda16[_0x30590c(0xcc)]}),_0x1c03c0=_0x463eee[_0x30590c(0x109)];return console[_0x30590c(0x110)](_0x30590c(0xb3)+_0x1c03c0['length']+_0x30590c(0x149)+(_0x1c03c0[_0x30590c(0x10b)]!==0x1?'s':'')),await handleSDKOutput(_0x1c03c0,_0x4bda16),0x0;}catch(_0x48eaea){if(_0x48eaea instanceof SDKError)return console[_0x30590c(0x110)](_0x30590c(0x118)+_0x48eaea[_0x30590c(0x11f)]),_0x48eaea[_0x30590c(0x102)]&&console[_0x30590c(0x110)](_0x30590c(0xc3)+_0x48eaea[_0x30590c(0x102)]),0x1;throw _0x48eaea;}}}export class WorkflowWorkflowsCommand extends BaseCommand{[a39_0x4e4c1b(0xd5)]=a39_0x4e4c1b(0xf2);[a39_0x4e4c1b(0xb0)]=a39_0x4e4c1b(0xfb);async[a39_0x4e4c1b(0xe6)](_0x59c7e6){const _0x218c0f=a39_0x4e4c1b,{options:_0x10bc76,args:_0x2d4f29,tdx:_0x2331ba}=_0x59c7e6,_0x12683f=_0x2d4f29[0x0];try{_0x10bc76[_0x218c0f(0xcc)]&&_0x12683f&&console[_0x218c0f(0x110)](_0x218c0f(0xd6)+_0x12683f);const _0x20ba1=await withSpinner('Listing\x20workflows...',()=>_0x2331ba[_0x218c0f(0x103)][_0x218c0f(0xae)](_0x12683f,{'limit':_0x10bc76[_0x218c0f(0x12b)]}),{'verbose':_0x10bc76[_0x218c0f(0xcc)]}),_0x550718=_0x20ba1[_0x218c0f(0x109)];return console[_0x218c0f(0x110)](_0x218c0f(0xb3)+_0x550718[_0x218c0f(0x10b)]+_0x218c0f(0xb5)+(_0x550718[_0x218c0f(0x10b)]!==0x1?'s':'')),await handleSDKOutput(_0x550718,_0x10bc76),0x0;}catch(_0x167703){if(_0x167703 instanceof SDKError)return console[_0x218c0f(0x110)](_0x218c0f(0x118)+_0x167703[_0x218c0f(0x11f)]),_0x167703[_0x218c0f(0x102)]&&console[_0x218c0f(0x110)](_0x218c0f(0xc3)+_0x167703[_0x218c0f(0x102)]),0x1;throw _0x167703;}}}export class WorkflowSessionsCommand extends BaseCommand{['name']=a39_0x4e4c1b(0x143);[a39_0x4e4c1b(0xb0)]=a39_0x4e4c1b(0x13a);async[a39_0x4e4c1b(0xe6)](_0x2279ed){const _0x2228d9=a39_0x4e4c1b,{options:_0x186f10,args:_0x1b3763,tdx:_0xfff9b5}=_0x2279ed;let _0x289230,_0x295577;if(_0x1b3763[0x0]){const _0x26412c=_0x1b3763[0x0][_0x2228d9(0x108)]('.');if(_0x26412c['length']===0x1)_0x289230=_0x26412c[0x0];else{if(_0x26412c[_0x2228d9(0x10b)]===0x2)[_0x289230,_0x295577]=_0x26412c;else return console[_0x2228d9(0x110)]('Error:\x20Invalid\x20pattern.\x20Use\x20format:\x20project\x20or\x20project.workflow'),0x1;}}try{if(_0x186f10[_0x2228d9(0xcc)]){if(_0x289230&&_0x295577)console[_0x2228d9(0x110)](_0x2228d9(0xe1)+_0x289230+'.'+_0x295577);else _0x289230&&console[_0x2228d9(0x110)](_0x2228d9(0xc6)+_0x289230);const _0x36ad6e=_0x186f10[_0x2228d9(0xff)];_0x36ad6e&&console[_0x2228d9(0x110)]('Status:\x20'+_0x36ad6e);}const _0x8858e7=await withSpinner('Listing\x20workflow\x20sessions...',()=>_0xfff9b5[_0x2228d9(0x103)][_0x2228d9(0x13e)]({'projectName':_0x289230,'workflowName':_0x295577,'status':_0x186f10['status'],'fromTime':_0x186f10[_0x2228d9(0x135)],'toTime':_0x186f10['to'],'limit':_0x186f10[_0x2228d9(0x12b)]}),{'verbose':_0x186f10[_0x2228d9(0xcc)]}),_0x306190=_0x8858e7['data'];return console['error'](_0x2228d9(0xb3)+_0x306190[_0x2228d9(0x10b)]+'\x20session'+(_0x306190[_0x2228d9(0x10b)]!==0x1?'s':'')),await handleSDKOutput(_0x306190,_0x186f10),0x0;}catch(_0x56616d){if(_0x56616d instanceof SDKError)return console[_0x2228d9(0x110)](_0x2228d9(0x118)+_0x56616d[_0x2228d9(0x11f)]),_0x56616d[_0x2228d9(0x102)]&&console['error']('\x20\x20Cause:\x20'+_0x56616d[_0x2228d9(0x102)]),0x1;throw _0x56616d;}}}export class WorkflowAttemptsCommand extends BaseCommand{['name']=a39_0x4e4c1b(0x147);[a39_0x4e4c1b(0xb0)]='List\x20workflow\x20attempts';async[a39_0x4e4c1b(0xe6)](_0x590086){const _0x4d7f2f=a39_0x4e4c1b,{options:_0x43b478,args:_0x19e5d6,tdx:_0x26dc7f}=_0x590086;let _0xb6af3e,_0x5e694e;if(_0x19e5d6[0x0]){const _0x4f221d=_0x19e5d6[0x0][_0x4d7f2f(0x108)]('.');if(_0x4f221d['length']===0x1)_0xb6af3e=_0x4f221d[0x0];else{if(_0x4f221d[_0x4d7f2f(0x10b)]===0x2)[_0xb6af3e,_0x5e694e]=_0x4f221d;else return console[_0x4d7f2f(0x110)](_0x4d7f2f(0x132)),0x1;}}try{const _0x45b590=_0x43b478[_0x4d7f2f(0x133)];if(_0x43b478[_0x4d7f2f(0xcc)]){if(_0xb6af3e&&_0x5e694e)console['error'](_0x4d7f2f(0xe1)+_0xb6af3e+'.'+_0x5e694e);else _0xb6af3e&&console[_0x4d7f2f(0x110)](_0x4d7f2f(0xc6)+_0xb6af3e);_0x45b590&&console['error'](_0x4d7f2f(0x12e));}const _0x1bf344=await withSpinner(_0x4d7f2f(0xb2),()=>_0x26dc7f['workflow'][_0x4d7f2f(0x107)]({'projectName':_0xb6af3e,'workflowName':_0x5e694e,'includeRetried':_0x45b590,'limit':_0x43b478[_0x4d7f2f(0x12b)]}),{'verbose':_0x43b478[_0x4d7f2f(0xcc)]}),_0x25c99e=_0x1bf344[_0x4d7f2f(0x109)];return console['error'](_0x4d7f2f(0xb3)+_0x25c99e['length']+_0x4d7f2f(0xab)+(_0x25c99e[_0x4d7f2f(0x10b)]!==0x1?'s':'')),await handleSDKOutput(_0x25c99e,_0x43b478),0x0;}catch(_0x50d800){if(_0x50d800 instanceof SDKError)return console[_0x4d7f2f(0x110)]('Error:\x20'+_0x50d800[_0x4d7f2f(0x11f)]),_0x50d800['cause']&&console[_0x4d7f2f(0x110)](_0x4d7f2f(0xc3)+_0x50d800[_0x4d7f2f(0x102)]),0x1;throw _0x50d800;}}}export class WorkflowAttemptCommand extends BaseCommand{[a39_0x4e4c1b(0xd5)]=a39_0x4e4c1b(0xeb);[a39_0x4e4c1b(0xb0)]=a39_0x4e4c1b(0xbf);async[a39_0x4e4c1b(0xe6)](_0x1afaf4){const _0x6b57d7=a39_0x4e4c1b,{options:_0x19043f,args:_0x36c1ad,tdx:_0x27132c}=_0x1afaf4,_0x2c288f=_0x36c1ad[0x0];if(!_0x2c288f)return console[_0x6b57d7(0x110)](_0x6b57d7(0xd2)),0x1;try{_0x19043f['verbose']&&console[_0x6b57d7(0x110)](_0x6b57d7(0xad)+_0x2c288f);const _0x3571b6=await withSpinner('Getting\x20attempt\x20details...',()=>_0x27132c[_0x6b57d7(0x103)][_0x6b57d7(0x10a)](_0x2c288f),{'verbose':_0x19043f['verbose']}),_0x40c9ec=_0x3571b6[_0x6b57d7(0x109)];let _0x55b5bd;!_0x40c9ec[_0x6b57d7(0x125)]?_0x55b5bd=_0x40c9ec['cancelRequested']?_0x6b57d7(0xba):'running':_0x55b5bd=_0x40c9ec[_0x6b57d7(0x13f)]?'success':_0x6b57d7(0x110);let _0x565ab9;if(_0x40c9ec[_0x6b57d7(0xf0)]&&_0x40c9ec[_0x6b57d7(0xc4)]){const _0x1ae6f9=new Date(_0x40c9ec[_0x6b57d7(0xf0)])[_0x6b57d7(0x128)](),_0x500497=new Date(_0x40c9ec[_0x6b57d7(0xc4)])['getTime']();_0x565ab9=Math[_0x6b57d7(0x146)]((_0x500497-_0x1ae6f9)/0x3e8);}const _0x13ba41={'attempt_id':_0x40c9ec['id'],'status':_0x55b5bd,..._0x40c9ec[_0x6b57d7(0x127)]!==undefined&&{'index':_0x40c9ec[_0x6b57d7(0x127)]},..._0x40c9ec[_0x6b57d7(0xdc)]&&{'project':_0x40c9ec[_0x6b57d7(0xdc)][_0x6b57d7(0xd5)]},..._0x40c9ec[_0x6b57d7(0x103)]&&{'workflow':_0x40c9ec[_0x6b57d7(0x103)]['name']},..._0x40c9ec[_0x6b57d7(0xf1)]&&{'session_id':_0x40c9ec[_0x6b57d7(0xf1)]},..._0x40c9ec['sessionTime']&&{'session_time':_0x40c9ec['sessionTime']},..._0x40c9ec[_0x6b57d7(0x141)]&&{'retry_attempt':_0x40c9ec[_0x6b57d7(0x141)]},..._0x565ab9!==undefined&&{'duration_sec':_0x565ab9},..._0x40c9ec[_0x6b57d7(0xf0)]&&{'created_at':_0x40c9ec[_0x6b57d7(0xf0)]},..._0x40c9ec[_0x6b57d7(0xc4)]&&{'finished_at':_0x40c9ec[_0x6b57d7(0xc4)]},...Object[_0x6b57d7(0xe0)](_0x40c9ec['params'])[_0x6b57d7(0x10b)]>0x0&&{'params':_0x40c9ec[_0x6b57d7(0x11e)]}};return await handleSingleObjectOutput(_0x13ba41,_0x19043f),0x0;}catch(_0x30c515){if(_0x30c515 instanceof SDKError)return console[_0x6b57d7(0x110)](_0x6b57d7(0x118)+_0x30c515[_0x6b57d7(0x11f)]),_0x30c515[_0x6b57d7(0x102)]&&console[_0x6b57d7(0x110)](_0x6b57d7(0xc3)+_0x30c515['cause']),0x1;throw _0x30c515;}}}export class WorkflowTasksCommand extends BaseCommand{[a39_0x4e4c1b(0xd5)]=a39_0x4e4c1b(0xcd);[a39_0x4e4c1b(0xb0)]=a39_0x4e4c1b(0x152);async[a39_0x4e4c1b(0xe6)](_0x4f3ac6){const _0x462f86=a39_0x4e4c1b,{options:_0x395c14,args:_0x11db3a,tdx:_0x1e5f7e}=_0x4f3ac6,_0x229daf=_0x11db3a[0x0];if(!_0x229daf)return console[_0x462f86(0x110)](_0x462f86(0xd2)),0x1;try{const _0x31ba70=_0x395c14[_0x462f86(0x12c)];_0x395c14[_0x462f86(0xcc)]&&(console['error'](_0x462f86(0xad)+_0x229daf),_0x31ba70&&console['error'](_0x462f86(0x137)));const _0xae374c=await withSpinner(_0x462f86(0xc2),()=>_0x1e5f7e['workflow'][_0x462f86(0xd8)](_0x229daf,_0x31ba70||![]),{'verbose':_0x395c14[_0x462f86(0xcc)]}),_0x16a5eb=_0xae374c[_0x462f86(0x109)];return console[_0x462f86(0x110)](_0x462f86(0xb3)+_0x16a5eb['length']+_0x462f86(0x13b)+(_0x16a5eb['length']!==0x1?'s':'')),await handleSDKOutput(_0x16a5eb,_0x395c14),0x0;}catch(_0x4cb708){if(_0x4cb708 instanceof SDKError)return console[_0x462f86(0x110)](_0x462f86(0x118)+_0x4cb708[_0x462f86(0x11f)]),_0x4cb708[_0x462f86(0x102)]&&console[_0x462f86(0x110)](_0x462f86(0xc3)+_0x4cb708[_0x462f86(0x102)]),0x1;throw _0x4cb708;}}}export class WorkflowLogsCommand extends BaseCommand{[a39_0x4e4c1b(0xd5)]=a39_0x4e4c1b(0xd9);[a39_0x4e4c1b(0xb0)]=a39_0x4e4c1b(0x140);async[a39_0x4e4c1b(0xe6)](_0x1b5e60){const _0x466bc3=a39_0x4e4c1b,{options:_0x324539,args:_0x2baf15,tdx:_0x541b73}=_0x1b5e60,_0x145e04=_0x2baf15[0x0];let _0x1f1802=_0x2baf15[0x1];if(!_0x145e04)return console[_0x466bc3(0x110)](_0x466bc3(0xd2)),0x1;try{_0x324539[_0x466bc3(0xcc)]&&(console['error']('Attempt\x20ID:\x20'+_0x145e04),_0x1f1802&&console['error'](_0x466bc3(0x12f)+_0x1f1802));const _0x27eca8=await withSpinner(_0x466bc3(0x14d),()=>_0x541b73[_0x466bc3(0x103)][_0x466bc3(0xd3)](_0x145e04,_0x1f1802),{'verbose':_0x324539[_0x466bc3(0xcc)]}),_0x17af9c=_0x27eca8['data'];if(_0x17af9c[_0x466bc3(0x10b)]===0x0)return console[_0x466bc3(0x110)](_0x466bc3(0xc1)),0x0;if(!_0x1f1802&&(_0x324539[_0x466bc3(0xcb)]||_0x324539[_0x466bc3(0xdf)]))return await handleSDKOutput(_0x17af9c,_0x324539),0x0;if(!_0x1f1802){const _0x382e77=_0x17af9c['map'](_0x11b21d=>({'title':_0x11b21d[_0x466bc3(0xb9)]+'\x20('+formatBytes(_0x11b21d['fileSize'])+')','value':_0x11b21d['taskName']})),_0x1f1c16=await a39_0x34e1af({'type':'select','name':_0x466bc3(0xde),'message':_0x466bc3(0xb1),'choices':_0x382e77});if(!_0x1f1c16[_0x466bc3(0xde)])return console[_0x466bc3(0x110)](_0x466bc3(0xb6)),0x0;_0x1f1802=_0x1f1c16[_0x466bc3(0xde)];}const _0x374118=await withSpinner(_0x466bc3(0x129),()=>_0x541b73['workflow']['logs'](_0x145e04,_0x1f1802),{'verbose':_0x324539[_0x466bc3(0xcc)]}),_0x1d09a1=_0x374118[_0x466bc3(0x109)];return _0x1d09a1?console[_0x466bc3(0x14e)](_0x1d09a1):console[_0x466bc3(0x110)](_0x466bc3(0x144)),0x0;}catch(_0x36f0c1){if(_0x36f0c1 instanceof SDKError)return console[_0x466bc3(0x110)](_0x466bc3(0x118)+_0x36f0c1['message']),_0x36f0c1[_0x466bc3(0x102)]&&console[_0x466bc3(0x110)]('\x20\x20Cause:\x20'+_0x36f0c1[_0x466bc3(0x102)]),0x1;throw _0x36f0c1;}}}function a39_0x5e09(_0x36fcc6,_0x4ac9a1){const _0x5dd61c=a39_0x5dd6();return a39_0x5e09=function(_0x5e0985,_0xd3e7c){_0x5e0985=_0x5e0985-0xa9;let _0x2e7616=_0x5dd61c[_0x5e0985];return _0x2e7616;},a39_0x5e09(_0x36fcc6,_0x4ac9a1);}export class WorkflowKillCommand extends BaseCommand{['name']=a39_0x4e4c1b(0x142);['description']=a39_0x4e4c1b(0xc5);async[a39_0x4e4c1b(0xe6)](_0x4eb38e){const _0xc77a65=a39_0x4e4c1b,{options:_0x324fd5,args:_0x3a8993,tdx:_0x4dc401}=_0x4eb38e,_0x4586a2=_0x3a8993[0x0];if(!_0x4586a2)return console['error']('Error:\x20Attempt\x20ID\x20is\x20required'),0x1;try{const _0x94166c=_0x324fd5[_0xc77a65(0xa9)];_0x324fd5[_0xc77a65(0xcc)]&&(console[_0xc77a65(0x110)]('Attempt\x20ID:\x20'+_0x4586a2),_0x94166c&&console[_0xc77a65(0x110)](_0xc77a65(0x145)+_0x94166c));if(!_0x324fd5['yes']){const _0x2e533c=await confirm('Are\x20you\x20sure\x20you\x20want\x20to\x20kill\x20attempt\x20'+_0x4586a2+'?');if(!_0x2e533c)return console[_0xc77a65(0x110)](_0xc77a65(0xb6)),0x0;}const _0x4cbca7=await withSpinner(_0xc77a65(0xb4),()=>_0x4dc401[_0xc77a65(0x103)][_0xc77a65(0x14b)](_0x4586a2,_0x94166c),{'verbose':_0x324fd5['verbose']}),_0x2986f9=_0x4cbca7['data'];return console[_0xc77a65(0x110)]('✔\x20'+_0x2986f9),0x0;}catch(_0x20dd87){if(_0x20dd87 instanceof SDKError)return console['error'](_0xc77a65(0x118)+_0x20dd87[_0xc77a65(0x11f)]),_0x20dd87[_0xc77a65(0x102)]&&console[_0xc77a65(0x110)]('\x20\x20Cause:\x20'+_0x20dd87[_0xc77a65(0x102)]),0x1;throw _0x20dd87;}}}export class WorkflowRetryCommand extends BaseCommand{[a39_0x4e4c1b(0xd5)]='workflow:retry';[a39_0x4e4c1b(0xb0)]=a39_0x4e4c1b(0x11c);async[a39_0x4e4c1b(0xe6)](_0x2360c0){const _0x274594=a39_0x4e4c1b,{options:_0x231983,args:_0x3a45f9,tdx:_0x27e98f}=_0x2360c0,_0x356a68=_0x3a45f9[0x0];if(!_0x356a68)return console[_0x274594(0x110)](_0x274594(0x111)),console[_0x274594(0x110)](_0x274594(0x123)),0x1;let _0x13595e=![],_0x3eb9c6=_0x356a68;if(_0x356a68[_0x274594(0x120)]('session:'))_0x13595e=!![],_0x3eb9c6=_0x356a68[_0x274594(0x136)](0x8);else{if(_0x356a68[_0x274594(0x120)](_0x274594(0xac)))_0x13595e=![],_0x3eb9c6=_0x356a68['substring'](0x8);else return console[_0x274594(0x110)]('Error:\x20Target\x20must\x20be\x20prefixed\x20with\x20\x22session:\x22\x20or\x20\x22attempt:\x22'),console[_0x274594(0x110)](_0x274594(0x123)),0x1;}try{const _0x5a44b8=_0x231983[_0x274594(0x126)],_0x5acf5a=_0x231983[_0x274594(0xea)],_0x2e3e7a=_0x231983[_0x274594(0x11e)],_0x242d27=_0x231983[_0x274594(0xaf)];_0x231983[_0x274594(0xcc)]&&(console[_0x274594(0x110)](_0x274594(0x14f)+(_0x13595e?_0x274594(0x153):_0x274594(0x10a))+'\x20'+_0x3eb9c6),_0x5a44b8&&console[_0x274594(0x110)](_0x274594(0xf7)+_0x5a44b8),_0x5acf5a&&console['error'](_0x274594(0xb7)+_0x5acf5a),_0x2e3e7a&&console['error'](_0x274594(0xbc)+_0x2e3e7a),_0x242d27&&console[_0x274594(0x110)](_0x274594(0xf8)));let _0x4ff72d;if(_0x2e3e7a)try{if(_0x2e3e7a[_0x274594(0x120)]('@')){const _0x22e8f2=await import(_0x274594(0x139)),_0x504dee=_0x2e3e7a[_0x274594(0x136)](0x1),_0x2ed75c=await _0x22e8f2[_0x274594(0x130)](_0x504dee,_0x274594(0xd7));_0x4ff72d=JSON[_0x274594(0xc8)](_0x2ed75c);}else _0x4ff72d=JSON[_0x274594(0xc8)](_0x2e3e7a);}catch{return console[_0x274594(0x110)]('Error:\x20Invalid\x20JSON\x20in\x20--params'),0x1;}if(!_0x231983[_0x274594(0xcf)]){const _0x208ea9=await confirm(_0x274594(0xce)+(_0x13595e?_0x274594(0x153):_0x274594(0x10a))+'\x20'+_0x3eb9c6+'?');if(!_0x208ea9)return console[_0x274594(0x110)](_0x274594(0xb6)),0x0;}let _0x3e1780;_0x13595e?_0x3e1780=await withSpinner(_0x274594(0x13d),()=>_0x27e98f['workflow'][_0x274594(0x104)](_0x3eb9c6,{'fromTask':_0x5a44b8,'retryParams':_0x4ff72d}),{'verbose':_0x231983[_0x274594(0xcc)]}):_0x3e1780=await withSpinner(_0x274594(0xd0),()=>_0x27e98f[_0x274594(0x103)][_0x274594(0xfa)](_0x3eb9c6,{'resumeFrom':_0x5acf5a,'retryParams':_0x4ff72d,'force':_0x242d27}),{'verbose':_0x231983[_0x274594(0xcc)]});const _0x424f15=_0x3e1780[_0x274594(0x109)];return console[_0x274594(0x110)]('✔\x20Retry\x20started'),console[_0x274594(0x110)](_0x274594(0x10c)+_0x424f15[_0x274594(0x14a)]),console[_0x274594(0x110)](_0x274594(0xed)+_0x424f15[_0x274594(0xf1)]),0x0;}catch(_0x9b8118){if(_0x9b8118 instanceof SDKError)return console[_0x274594(0x110)](_0x274594(0x118)+_0x9b8118[_0x274594(0x11f)]),_0x9b8118[_0x274594(0x102)]&&console['error'](_0x274594(0xc3)+_0x9b8118[_0x274594(0x102)]),0x1;throw _0x9b8118;}}}export class WorkflowRunCommand extends BaseCommand{[a39_0x4e4c1b(0xd5)]='workflow:run';[a39_0x4e4c1b(0xb0)]=a39_0x4e4c1b(0x138);async[a39_0x4e4c1b(0xe6)](_0x55ec11){const _0x32e847=a39_0x4e4c1b,{options:_0x518a52,args:_0x2ceb55,tdx:_0x48ec82}=_0x55ec11,_0x45f675=_0x2ceb55[0x0];if(!_0x45f675)return console[_0x32e847(0x110)](_0x32e847(0x105)),console[_0x32e847(0x110)](_0x32e847(0x13c)),0x1;const _0xa88616=_0x518a52[_0x32e847(0xda)],_0x4e5fa6=_0x518a52[_0x32e847(0x10e)],_0x298509={};if(_0xa88616&&Array[_0x32e847(0xf3)](_0xa88616))for(const _0x115fa3 of _0xa88616){const _0x5c0b3d=_0x115fa3[_0x32e847(0xf5)]('=');if(_0x5c0b3d===-0x1)return console[_0x32e847(0x110)](_0x32e847(0xd1)+_0x115fa3),console['error']('Expected\x20format:\x20--param\x20key=value'),0x1;const _0x1b49c2=_0x115fa3[_0x32e847(0x136)](0x0,_0x5c0b3d),_0x546294=_0x115fa3['substring'](_0x5c0b3d+0x1);try{_0x298509[_0x1b49c2]=JSON[_0x32e847(0xc8)](_0x546294);}catch{_0x298509[_0x1b49c2]=_0x546294;}}_0x518a52[_0x32e847(0xcc)]&&(console[_0x32e847(0x110)](_0x32e847(0xe9)+_0x45f675),Object[_0x32e847(0xe0)](_0x298509)[_0x32e847(0x10b)]>0x0&&console[_0x32e847(0x110)](_0x32e847(0x11a)+JSON[_0x32e847(0x150)](_0x298509)),_0x4e5fa6&&console[_0x32e847(0x110)]('Session\x20time:\x20'+_0x4e5fa6));const _0x594f44=await withSpinner('Starting\x20workflow\x20run...',()=>_0x48ec82[_0x32e847(0x103)][_0x32e847(0x131)](_0x45f675,_0x298509,{'sessionTime':_0x4e5fa6}),{'verbose':_0x518a52[_0x32e847(0xcc)]}),_0x1f8b99=_0x594f44[_0x32e847(0x109)];return console[_0x32e847(0x110)](_0x32e847(0x113)),console[_0x32e847(0x110)](_0x32e847(0xfc)+_0x1f8b99['id']),console[_0x32e847(0x110)]('\x20\x20Session\x20ID:\x20'+_0x1f8b99[_0x32e847(0xf1)]),console['error'](_0x32e847(0xc0)+_0x1f8b99[_0x32e847(0xdc)]?.[_0x32e847(0xd5)]),console[_0x32e847(0x110)]('\x20\x20Workflow:\x20'+_0x1f8b99[_0x32e847(0x103)]?.['name']),0x0;}}export class WorkflowDownloadCommand extends BaseCommand{['name']=a39_0x4e4c1b(0x134);[a39_0x4e4c1b(0xb0)]=a39_0x4e4c1b(0x14c);async[a39_0x4e4c1b(0xe6)](_0x442b0f){const _0x5924ff=a39_0x4e4c1b,{options:_0x425a89,args:_0x57afea,tdx:_0xc122be}=_0x442b0f,_0x390742=_0x57afea[0x0],_0x589c2c=_0x57afea[0x1]||'.';if(!_0x390742)return console[_0x5924ff(0x110)]('Error:\x20Project\x20name\x20is\x20required'),console[_0x5924ff(0x110)](_0x5924ff(0xaa)),0x1;const _0x5454da=_0x425a89['revision'];_0x425a89[_0x5924ff(0xcc)]&&(console[_0x5924ff(0x110)](_0x5924ff(0xca)+_0x390742),console[_0x5924ff(0x110)](_0x5924ff(0xd4)+_0x589c2c),_0x5454da&&console[_0x5924ff(0x110)](_0x5924ff(0xf6)+_0x5454da));const _0x169095=await withSpinner(_0x5924ff(0xfe)+_0x390742+_0x5924ff(0xdd),()=>_0xc122be[_0x5924ff(0x103)][_0x5924ff(0xfd)](_0x390742,_0x589c2c,{'revision':_0x5454da}),{'verbose':_0x425a89[_0x5924ff(0xcc)]}),_0x4f6cd0=_0x169095['data'];return console['error'](_0x5924ff(0x11d)+_0x4f6cd0[_0x5924ff(0x115)]),console[_0x5924ff(0x110)]('\x20\x20Revision:\x20'+_0x4f6cd0[_0x5924ff(0x12a)]),console['error']('\x20\x20Files\x20extracted:\x20'+_0x4f6cd0[_0x5924ff(0xe8)]),console[_0x5924ff(0x110)](_0x5924ff(0xef)+_0x589c2c+'/'+_0x4f6cd0['projectName']),0x0;}}export class WorkflowPushCommand extends BaseCommand{[a39_0x4e4c1b(0xd5)]=a39_0x4e4c1b(0x117);['description']='Push\x20workflow\x20project\x20to\x20Treasure\x20Data';async['execute'](_0x209283){const _0x5a5c25=a39_0x4e4c1b,{options:_0x2c041d,args:_0x148e80,tdx:_0x306639}=_0x209283;let _0x244dc8='.',_0x131857=_0x2c041d[_0x5a5c25(0xd5)];if(_0x148e80[0x0]){const {promises:_0x9eb4cf}=await import('fs');try{const _0x4d43a0=await _0x9eb4cf[_0x5a5c25(0x106)](_0x148e80[0x0]);if(_0x4d43a0[_0x5a5c25(0xe4)]())_0x244dc8=_0x148e80[0x0];else return console['error'](_0x5a5c25(0x118)+_0x148e80[0x0]+_0x5a5c25(0xe2)),0x1;}catch{_0x131857=_0x148e80[0x0],_0x244dc8='.';}}const _0x6ffbcc=_0x2c041d['revision'],_0x4668be=_0x2c041d[_0x5a5c25(0x114)];_0x2c041d[_0x5a5c25(0xcc)]&&(console[_0x5a5c25(0x110)](_0x5a5c25(0xe5)+_0x244dc8),_0x131857&&console[_0x5a5c25(0x110)](_0x5a5c25(0xec)+_0x131857),_0x6ffbcc&&console[_0x5a5c25(0x110)](_0x5a5c25(0xf6)+_0x6ffbcc),_0x4668be&&console[_0x5a5c25(0x110)](_0x5a5c25(0x101)));const _0x12d2fe=await withSpinner(_0x5a5c25(0x121),()=>_0x306639['workflow'][_0x5a5c25(0x112)](_0x244dc8,{'projectName':_0x131857,'revision':_0x6ffbcc,'skipValidation':_0x4668be}),{'verbose':_0x2c041d[_0x5a5c25(0xcc)]}),_0x595090=_0x12d2fe['data'];return console[_0x5a5c25(0x110)]('✔\x20Pushed\x20'+_0x595090['projectName']),console[_0x5a5c25(0x110)](_0x5a5c25(0xdb)+_0x595090[_0x5a5c25(0xbb)]),console['error'](_0x5a5c25(0xf9)+_0x595090['revision']),0x0;}}function a39_0x5dd6(){const _0x129b77=['Error:\x20Workflow\x20identifier\x20is\x20required','stat','attempts','split','data','attempt','length','\x20\x20New\x20attempt\x20ID:\x20','\x22?\x20This\x20cannot\x20be\x20undone.','sessionTime','workflow:projects','error','Error:\x20Session\x20ID\x20or\x20attempt\x20ID\x20is\x20required','push','✔\x20Workflow\x20run\x20started','skipValidation','projectName','415809KbezRq','workflow:push','Error:\x20','6505702ZeVzzn','Parameters:\x20','Delete\x20workflow\x20project\x20from\x20Treasure\x20Data','Retry\x20a\x20session\x20or\x20attempt','✔\x20Downloaded\x20','params','message','startsWith','Pushing\x20workflow\x20project...','Listing\x20workflow\x20projects...','Usage:\x20workflow\x20retry\x20session:<id>\x20or\x20workflow\x20retry\x20attempt:<id>','57642RFdebj','done','fromTask','index','getTime','Downloading\x20logs...','revision','limit','includeSubtasks','List\x20all\x20workflow\x20projects','Include\x20retried:\x20yes','Task\x20name:\x20','readFile','run','Error:\x20Invalid\x20pattern.\x20Use\x20format:\x20project\x20or\x20project.workflow','includeRetried','workflow:download','from','substring','Including\x20subtasks:\x20yes','Start\x20a\x20workflow\x20run','fs/promises','List\x20workflow\x20execution\x20sessions','\x20task','Usage:\x20workflow\x20run\x20<project.workflow>\x20[options]','Retrying\x20session...','sessions','success','Show\x20logs\x20for\x20a\x20workflow\x20attempt','retryAttemptName','workflow:kill','workflow:sessions','No\x20log\x20content\x20found','Reason:\x20','round','workflow:attempts','delete','\x20project','attemptId','kill','Download\x20workflow\x20project\x20from\x20Treasure\x20Data','Fetching\x20log\x20files...','log','Target:\x20','stringify','Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20project\x20\x22','Show\x20tasks\x20for\x20an\x20attempt','session','reason','Usage:\x20workflow:download\x20<project-name>\x20[output-dir]','\x20attempt','attempt:','Attempt\x20ID:\x20','workflows','force','description','Select\x20a\x20task\x20to\x20view\x20logs:','Listing\x20workflow\x20attempts...','✔\x20Found\x20','Killing\x20attempt...','\x20workflow','Cancelled','Resume\x20from:\x20','Error:\x20Project\x20name\x20or\x20ID\x20is\x20required','taskName','canceling','projectId','Params:\x20','7696472YFdQfI','75WVtImN','Show\x20specific\x20attempt\x20details','\x20\x20Project:\x20','No\x20log\x20files\x20found\x20for\x20this\x20attempt','Getting\x20attempt\x20tasks...','\x20\x20Cause:\x20','finishedAt','Kill\x20a\x20running\x20attempt','Filter:\x20project=','1321034ffwjin','parse','workflow:delete','Project:\x20','json','verbose','workflow:tasks','Are\x20you\x20sure\x20you\x20want\x20to\x20retry\x20','yes','Retrying\x20attempt...','Error:\x20Invalid\x20parameter\x20format:\x20','Error:\x20Attempt\x20ID\x20is\x20required','logFiles','Output\x20directory:\x20','name','Project\x20filter:\x20','utf-8','tasks','workflow:logs','param','\x20\x20Project\x20ID:\x20','project','...','task','format','keys','Filter:\x20','\x20is\x20not\x20a\x20directory','projects','isDirectory','Project\x20directory:\x20','execute','2124708arloxK','filesExtracted','Workflow:\x20','resumeFrom','workflow:attempt','Project\x20name:\x20','\x20\x20Session\x20ID:\x20','1giXXzZ','\x20\x20Location:\x20','createdAt','sessionId','workflow:workflows','isArray','Usage:\x20workflow:delete\x20<project-name-or-id>','indexOf','Revision:\x20','From\x20task:\x20','Force:\x20yes','\x20\x20Revision:\x20','retryAttempt','List\x20workflows','\x20\x20Attempt\x20ID:\x20','download','Downloading\x20project\x20','status','3858144rLixOf','Validation:\x20skipped','cause','workflow','retrySession'];a39_0x5dd6=function(){return _0x129b77;};return a39_0x5dd6();}export class WorkflowDeleteCommand extends BaseCommand{[a39_0x4e4c1b(0xd5)]=a39_0x4e4c1b(0xc9);[a39_0x4e4c1b(0xb0)]=a39_0x4e4c1b(0x11b);async[a39_0x4e4c1b(0xe6)](_0x95820b){const _0x2a5599=a39_0x4e4c1b,{options:_0x34f149,args:_0x4136d2,tdx:_0x4eae24}=_0x95820b,_0x5cda63=_0x4136d2[0x0];if(!_0x5cda63)return console['error'](_0x2a5599(0xb8)),console['error'](_0x2a5599(0xf4)),0x1;_0x34f149['verbose']&&console[_0x2a5599(0x110)](_0x2a5599(0xca)+_0x5cda63);if(!_0x34f149['yes']){const _0x540e5f=await confirm(_0x2a5599(0x151)+_0x5cda63+_0x2a5599(0x10d));if(!_0x540e5f)return console[_0x2a5599(0x110)](_0x2a5599(0xb6)),0x0;}const _0x247118=await withSpinner('Deleting\x20project\x20'+_0x5cda63+_0x2a5599(0xdd),()=>_0x4eae24[_0x2a5599(0x103)][_0x2a5599(0x148)](_0x5cda63),{'verbose':_0x34f149[_0x2a5599(0xcc)]}),_0x5c3aa3=_0x247118[_0x2a5599(0x109)];return console['error']('✔\x20Deleted\x20project\x20'+_0x5c3aa3[_0x2a5599(0x115)]),console['error'](_0x2a5599(0xdb)+_0x5c3aa3['projectId']),0x0;}}
1
+ const a39_0x45ce2a=a39_0x98fb;(function(_0x1af532,_0xb7412b){const _0x54a122=a39_0x98fb,_0x1b093c=_0x1af532();while(!![]){try{const _0x446acd=parseInt(_0x54a122(0x12a))/0x1+parseInt(_0x54a122(0x1a2))/0x2+-parseInt(_0x54a122(0x16a))/0x3*(-parseInt(_0x54a122(0x1a1))/0x4)+-parseInt(_0x54a122(0x19e))/0x5*(parseInt(_0x54a122(0x109))/0x6)+parseInt(_0x54a122(0x125))/0x7*(parseInt(_0x54a122(0x16e))/0x8)+parseInt(_0x54a122(0x115))/0x9*(-parseInt(_0x54a122(0x19a))/0xa)+-parseInt(_0x54a122(0x102))/0xb;if(_0x446acd===_0xb7412b)break;else _0x1b093c['push'](_0x1b093c['shift']());}catch(_0x1540e7){_0x1b093c['push'](_0x1b093c['shift']());}}}(a39_0x4d22,0x9ed85));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 a39_0xd55755 from'prompts';export class WorkflowProjectsCommand extends BaseCommand{[a39_0x45ce2a(0x100)]=a39_0x45ce2a(0x12b);['description']=a39_0x45ce2a(0x17d);async[a39_0x45ce2a(0x10d)](_0x59ff6e){const _0x218bf9=a39_0x45ce2a,{options:_0x34f558,args:_0x8e3b4e,tdx:_0xee7d0a}=_0x59ff6e,_0x8c6655=_0x8e3b4e[0x0];try{_0x34f558[_0x218bf9(0x13d)]&&_0x8c6655&&console[_0x218bf9(0x144)](_0x218bf9(0x190)+_0x8c6655);const _0x3b6a5c=await withSpinner(_0x218bf9(0x189),()=>_0xee7d0a[_0x218bf9(0x106)]['projects'](_0x8c6655,{'limit':_0x34f558[_0x218bf9(0x10c)]}),{'verbose':_0x34f558['verbose']}),_0x545e56=_0x3b6a5c[_0x218bf9(0x17c)];return console['error']('✔\x20Found\x20'+_0x545e56[_0x218bf9(0x181)]+_0x218bf9(0x18c)+(_0x545e56[_0x218bf9(0x181)]!==0x1?'s':'')),await handleSDKOutput(_0x545e56,_0x34f558),0x0;}catch(_0x321c36){if(_0x321c36 instanceof SDKError)return console[_0x218bf9(0x144)](_0x218bf9(0x10a)+_0x321c36[_0x218bf9(0x122)]),_0x321c36[_0x218bf9(0x117)]&&console['error'](_0x218bf9(0x120)+_0x321c36[_0x218bf9(0x117)]),0x1;throw _0x321c36;}}}export class WorkflowWorkflowsCommand extends BaseCommand{['name']=a39_0x45ce2a(0x18a);['description']=a39_0x45ce2a(0x14d);async[a39_0x45ce2a(0x10d)](_0x208806){const _0x323796=a39_0x45ce2a,{options:_0x2a0c5e,args:_0x17d2bd,tdx:_0x22e33f}=_0x208806,_0x5735f1=_0x17d2bd[0x0];try{_0x2a0c5e['verbose']&&_0x5735f1&&console[_0x323796(0x144)](_0x323796(0x14c)+_0x5735f1);const _0x20bfab=await withSpinner('Listing\x20workflows...',()=>_0x22e33f[_0x323796(0x106)][_0x323796(0x194)](_0x5735f1,{'limit':_0x2a0c5e[_0x323796(0x10c)]}),{'verbose':_0x2a0c5e[_0x323796(0x13d)]}),_0xc77606=_0x20bfab[_0x323796(0x17c)];return console[_0x323796(0x144)](_0x323796(0x128)+_0xc77606['length']+_0x323796(0x107)+(_0xc77606[_0x323796(0x181)]!==0x1?'s':'')),await handleSDKOutput(_0xc77606,_0x2a0c5e),0x0;}catch(_0x3ba44a){if(_0x3ba44a instanceof SDKError)return console[_0x323796(0x144)](_0x323796(0x10a)+_0x3ba44a['message']),_0x3ba44a[_0x323796(0x117)]&&console[_0x323796(0x144)](_0x323796(0x120)+_0x3ba44a[_0x323796(0x117)]),0x1;throw _0x3ba44a;}}}export class WorkflowSessionsCommand extends BaseCommand{[a39_0x45ce2a(0x100)]=a39_0x45ce2a(0x112);[a39_0x45ce2a(0x137)]=a39_0x45ce2a(0x10f);async[a39_0x45ce2a(0x10d)](_0x2e64ec){const _0x365792=a39_0x45ce2a,{options:_0x2ec956,args:_0xd220ab,tdx:_0x4f55f8}=_0x2e64ec;let _0x248e41,_0x373f63;if(_0xd220ab[0x0]){const _0x109afa=_0xd220ab[0x0][_0x365792(0x14b)]('.');if(_0x109afa['length']===0x1)_0x248e41=_0x109afa[0x0];else{if(_0x109afa[_0x365792(0x181)]===0x2)[_0x248e41,_0x373f63]=_0x109afa;else return console[_0x365792(0x144)](_0x365792(0x152)),0x1;}}try{if(_0x2ec956[_0x365792(0x13d)]){if(_0x248e41&&_0x373f63)console[_0x365792(0x144)](_0x365792(0x155)+_0x248e41+'.'+_0x373f63);else _0x248e41&&console[_0x365792(0x144)](_0x365792(0x150)+_0x248e41);const _0x2f4ce5=_0x2ec956[_0x365792(0x14a)];_0x2f4ce5&&console[_0x365792(0x144)](_0x365792(0x134)+_0x2f4ce5);}const _0x59d68f=await withSpinner(_0x365792(0x103),()=>_0x4f55f8['workflow']['sessions']({'projectName':_0x248e41,'workflowName':_0x373f63,'status':_0x2ec956[_0x365792(0x14a)],'fromTime':_0x2ec956[_0x365792(0x158)],'toTime':_0x2ec956['to'],'limit':_0x2ec956[_0x365792(0x10c)]}),{'verbose':_0x2ec956[_0x365792(0x13d)]}),_0x4edd0c=_0x59d68f[_0x365792(0x17c)];return console[_0x365792(0x144)]('✔\x20Found\x20'+_0x4edd0c[_0x365792(0x181)]+_0x365792(0x124)+(_0x4edd0c[_0x365792(0x181)]!==0x1?'s':'')),await handleSDKOutput(_0x4edd0c,_0x2ec956),0x0;}catch(_0x2953fc){if(_0x2953fc instanceof SDKError)return console[_0x365792(0x144)](_0x365792(0x10a)+_0x2953fc['message']),_0x2953fc[_0x365792(0x117)]&&console[_0x365792(0x144)](_0x365792(0x120)+_0x2953fc[_0x365792(0x117)]),0x1;throw _0x2953fc;}}}function a39_0x4d22(){const _0xaeda09=['Error:\x20','session:','limit','execute','substring','List\x20workflow\x20execution\x20sessions','attempt','json','workflow:sessions','map','logs','3311631WZsyKi','Select\x20a\x20task\x20to\x20view\x20logs:','cause','workflow:attempt','Killing\x20attempt...','\x20\x20Workflow:\x20','Project:\x20','Usage:\x20workflow\x20retry\x20session:<id>\x20or\x20workflow\x20retry\x20attempt:<id>','Include\x20retried:\x20yes','Revision:\x20','createdAt','\x20\x20Cause:\x20','attempt:','message','workflow:kill','\x20session','40943MhYiLo','Getting\x20attempt\x20details...','sessionTime','✔\x20Found\x20','download','755570mcIpxp','workflow:projects','Kill\x20a\x20running\x20attempt','startsWith','Resume\x20from:\x20','projectId','includeRetried','select','Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20project\x20\x22','run','Status:\x20','Deleting\x20project\x20','✔\x20Downloaded\x20','description','Cancelled','Attempt\x20ID:\x20','Usage:\x20workflow\x20run\x20<project.workflow>\x20[options]','Fetching\x20log\x20files...','Target:\x20','verbose','session','isArray','Session\x20time:\x20','utf-8','workflow:retry','readFile','error','delete','tasks','Listing\x20workflow\x20attempts...','fromTask','running','status','split','Project\x20filter:\x20','List\x20workflows','Parameters:\x20','✔\x20Retry\x20started','Filter:\x20project=','Task\x20name:\x20','Error:\x20Invalid\x20pattern.\x20Use\x20format:\x20project\x20or\x20project.workflow','Retry\x20a\x20session\x20or\x20attempt','\x20task','Filter:\x20','List\x20workflow\x20attempts','retryAttempt','from','indexOf','Error:\x20Invalid\x20parameter\x20format:\x20','Error:\x20Session\x20ID\x20or\x20attempt\x20ID\x20is\x20required','projectName','No\x20log\x20content\x20found','Error:\x20Project\x20name\x20or\x20ID\x20is\x20required','Output\x20directory:\x20','\x22?\x20This\x20cannot\x20be\x20undone.','Show\x20tasks\x20for\x20an\x20attempt','stat','filesExtracted','round','✔\x20Workflow\x20run\x20started','attempts','project','Project\x20directory:\x20','workflow:run','12iGodrI','retrySession','taskName','workflow:delete','1688PnJDgV','success','Are\x20you\x20sure\x20you\x20want\x20to\x20kill\x20attempt\x20','logFiles','\x20\x20Revision:\x20','keys','\x20\x20Project\x20ID:\x20','Start\x20a\x20workflow\x20run','Validation:\x20skipped','Retrying\x20session...','Retrying\x20attempt...','Push\x20workflow\x20project\x20to\x20Treasure\x20Data','Reason:\x20','\x20\x20New\x20attempt\x20ID:\x20','data','List\x20all\x20workflow\x20projects','Show\x20specific\x20attempt\x20details','Including\x20subtasks:\x20yes','params','length','yes','From\x20task:\x20','force','cancelRequested','param','revision','task','Listing\x20workflow\x20projects...','workflow:workflows','kill','\x20project','done','push','index','Pattern:\x20','Error:\x20Workflow\x20identifier\x20is\x20required','\x20is\x20not\x20a\x20directory','No\x20log\x20files\x20found\x20for\x20this\x20attempt','workflows','workflow:push','Error:\x20Target\x20must\x20be\x20prefixed\x20with\x20\x22session:\x22\x20or\x20\x22attempt:\x22','Usage:\x20workflow:download\x20<project-name>\x20[output-dir]','...','\x20attempt','30FrpTMo','format','stringify','Getting\x20attempt\x20tasks...','46685FozRhu','finishedAt','sessionId','503176FYknzM','2195288FQtwxU','Error:\x20Project\x20name\x20is\x20required','parse','reason','✔\x20Deleted\x20project\x20','retryAttemptName','Error:\x20Attempt\x20ID\x20is\x20required','\x20\x20Session\x20ID:\x20','name','attemptId','11671572FluBKC','Listing\x20workflow\x20sessions...','Downloading\x20project\x20','Expected\x20format:\x20--param\x20key=value','workflow','\x20workflow','workflow:logs','498GBOwAp'];a39_0x4d22=function(){return _0xaeda09;};return a39_0x4d22();}export class WorkflowAttemptsCommand extends BaseCommand{['name']='workflow:attempts';[a39_0x45ce2a(0x137)]=a39_0x45ce2a(0x156);async['execute'](_0x1693ec){const _0x11ba31=a39_0x45ce2a,{options:_0x48f1f8,args:_0x3b3c88,tdx:_0x5e241c}=_0x1693ec;let _0x3255e4,_0x3b6b36;if(_0x3b3c88[0x0]){const _0x289673=_0x3b3c88[0x0][_0x11ba31(0x14b)]('.');if(_0x289673['length']===0x1)_0x3255e4=_0x289673[0x0];else{if(_0x289673[_0x11ba31(0x181)]===0x2)[_0x3255e4,_0x3b6b36]=_0x289673;else return console[_0x11ba31(0x144)](_0x11ba31(0x152)),0x1;}}try{const _0x21b27a=_0x48f1f8[_0x11ba31(0x130)];if(_0x48f1f8[_0x11ba31(0x13d)]){if(_0x3255e4&&_0x3b6b36)console[_0x11ba31(0x144)]('Filter:\x20'+_0x3255e4+'.'+_0x3b6b36);else _0x3255e4&&console[_0x11ba31(0x144)](_0x11ba31(0x150)+_0x3255e4);_0x21b27a&&console[_0x11ba31(0x144)](_0x11ba31(0x11d));}const _0x490cdb=await withSpinner(_0x11ba31(0x147),()=>_0x5e241c[_0x11ba31(0x106)][_0x11ba31(0x166)]({'projectName':_0x3255e4,'workflowName':_0x3b6b36,'includeRetried':_0x21b27a,'limit':_0x48f1f8[_0x11ba31(0x10c)]}),{'verbose':_0x48f1f8[_0x11ba31(0x13d)]}),_0x542956=_0x490cdb[_0x11ba31(0x17c)];return console[_0x11ba31(0x144)](_0x11ba31(0x128)+_0x542956[_0x11ba31(0x181)]+_0x11ba31(0x199)+(_0x542956[_0x11ba31(0x181)]!==0x1?'s':'')),await handleSDKOutput(_0x542956,_0x48f1f8),0x0;}catch(_0xdaca94){if(_0xdaca94 instanceof SDKError)return console[_0x11ba31(0x144)]('Error:\x20'+_0xdaca94[_0x11ba31(0x122)]),_0xdaca94[_0x11ba31(0x117)]&&console[_0x11ba31(0x144)](_0x11ba31(0x120)+_0xdaca94[_0x11ba31(0x117)]),0x1;throw _0xdaca94;}}}export class WorkflowAttemptCommand extends BaseCommand{[a39_0x45ce2a(0x100)]=a39_0x45ce2a(0x118);[a39_0x45ce2a(0x137)]=a39_0x45ce2a(0x17e);async[a39_0x45ce2a(0x10d)](_0x58c6db){const _0x79e973=a39_0x45ce2a,{options:_0x3eafef,args:_0x5310d2,tdx:_0x5da6c5}=_0x58c6db,_0x1bddcc=_0x5310d2[0x0];if(!_0x1bddcc)return console[_0x79e973(0x144)]('Error:\x20Attempt\x20ID\x20is\x20required'),0x1;try{_0x3eafef['verbose']&&console[_0x79e973(0x144)](_0x79e973(0x139)+_0x1bddcc);const _0x97bbc9=await withSpinner(_0x79e973(0x126),()=>_0x5da6c5[_0x79e973(0x106)][_0x79e973(0x110)](_0x1bddcc),{'verbose':_0x3eafef['verbose']}),_0x3559e5=_0x97bbc9[_0x79e973(0x17c)];let _0x1ecb9f;!_0x3559e5[_0x79e973(0x18d)]?_0x1ecb9f=_0x3559e5[_0x79e973(0x185)]?'canceling':_0x79e973(0x149):_0x1ecb9f=_0x3559e5[_0x79e973(0x16f)]?_0x79e973(0x16f):_0x79e973(0x144);let _0x2d7c4a;if(_0x3559e5[_0x79e973(0x11f)]&&_0x3559e5[_0x79e973(0x19f)]){const _0x5e82bb=new Date(_0x3559e5[_0x79e973(0x11f)])['getTime'](),_0x1d115f=new Date(_0x3559e5[_0x79e973(0x19f)])['getTime']();_0x2d7c4a=Math[_0x79e973(0x164)]((_0x1d115f-_0x5e82bb)/0x3e8);}const _0x42f98e={'attempt_id':_0x3559e5['id'],'status':_0x1ecb9f,..._0x3559e5[_0x79e973(0x18f)]!==undefined&&{'index':_0x3559e5[_0x79e973(0x18f)]},..._0x3559e5['project']&&{'project':_0x3559e5[_0x79e973(0x167)][_0x79e973(0x100)]},..._0x3559e5[_0x79e973(0x106)]&&{'workflow':_0x3559e5[_0x79e973(0x106)][_0x79e973(0x100)]},..._0x3559e5[_0x79e973(0x1a0)]&&{'session_id':_0x3559e5[_0x79e973(0x1a0)]},..._0x3559e5[_0x79e973(0x127)]&&{'session_time':_0x3559e5['sessionTime']},..._0x3559e5[_0x79e973(0xfd)]&&{'retry_attempt':_0x3559e5[_0x79e973(0xfd)]},..._0x2d7c4a!==undefined&&{'duration_sec':_0x2d7c4a},..._0x3559e5[_0x79e973(0x11f)]&&{'created_at':_0x3559e5[_0x79e973(0x11f)]},..._0x3559e5[_0x79e973(0x19f)]&&{'finished_at':_0x3559e5[_0x79e973(0x19f)]},...Object[_0x79e973(0x173)](_0x3559e5[_0x79e973(0x180)])[_0x79e973(0x181)]>0x0&&{'params':_0x3559e5[_0x79e973(0x180)]}};return await handleSingleObjectOutput(_0x42f98e,_0x3eafef),0x0;}catch(_0x595ece){if(_0x595ece instanceof SDKError)return console[_0x79e973(0x144)](_0x79e973(0x10a)+_0x595ece[_0x79e973(0x122)]),_0x595ece[_0x79e973(0x117)]&&console[_0x79e973(0x144)](_0x79e973(0x120)+_0x595ece[_0x79e973(0x117)]),0x1;throw _0x595ece;}}}export class WorkflowTasksCommand extends BaseCommand{[a39_0x45ce2a(0x100)]='workflow:tasks';[a39_0x45ce2a(0x137)]=a39_0x45ce2a(0x161);async[a39_0x45ce2a(0x10d)](_0x1fcf68){const _0x301c52=a39_0x45ce2a,{options:_0x44ee02,args:_0x4fec7e,tdx:_0x313b0d}=_0x1fcf68,_0x21433a=_0x4fec7e[0x0];if(!_0x21433a)return console[_0x301c52(0x144)](_0x301c52(0xfe)),0x1;try{const _0x58a69c=_0x44ee02['includeSubtasks'];_0x44ee02[_0x301c52(0x13d)]&&(console['error'](_0x301c52(0x139)+_0x21433a),_0x58a69c&&console[_0x301c52(0x144)](_0x301c52(0x17f)));const _0x5ee804=await withSpinner(_0x301c52(0x19d),()=>_0x313b0d[_0x301c52(0x106)][_0x301c52(0x146)](_0x21433a,_0x58a69c||![]),{'verbose':_0x44ee02[_0x301c52(0x13d)]}),_0x41af19=_0x5ee804[_0x301c52(0x17c)];return console[_0x301c52(0x144)](_0x301c52(0x128)+_0x41af19[_0x301c52(0x181)]+_0x301c52(0x154)+(_0x41af19[_0x301c52(0x181)]!==0x1?'s':'')),await handleSDKOutput(_0x41af19,_0x44ee02),0x0;}catch(_0xa1ed8f){if(_0xa1ed8f instanceof SDKError)return console['error']('Error:\x20'+_0xa1ed8f[_0x301c52(0x122)]),_0xa1ed8f[_0x301c52(0x117)]&&console[_0x301c52(0x144)](_0x301c52(0x120)+_0xa1ed8f['cause']),0x1;throw _0xa1ed8f;}}}export class WorkflowLogsCommand extends BaseCommand{[a39_0x45ce2a(0x100)]=a39_0x45ce2a(0x108);[a39_0x45ce2a(0x137)]='Show\x20logs\x20for\x20a\x20workflow\x20attempt';async['execute'](_0x2f2680){const _0x3a9fee=a39_0x45ce2a,{options:_0x379084,args:_0x378729,tdx:_0x4f2e61}=_0x2f2680,_0x16849f=_0x378729[0x0];let _0x1c3936=_0x378729[0x1];if(!_0x16849f)return console['error'](_0x3a9fee(0xfe)),0x1;try{_0x379084[_0x3a9fee(0x13d)]&&(console[_0x3a9fee(0x144)](_0x3a9fee(0x139)+_0x16849f),_0x1c3936&&console['error'](_0x3a9fee(0x151)+_0x1c3936));const _0x179bde=await withSpinner(_0x3a9fee(0x13b),()=>_0x4f2e61[_0x3a9fee(0x106)][_0x3a9fee(0x171)](_0x16849f,_0x1c3936),{'verbose':_0x379084[_0x3a9fee(0x13d)]}),_0x4b40f9=_0x179bde[_0x3a9fee(0x17c)];if(_0x4b40f9[_0x3a9fee(0x181)]===0x0)return console[_0x3a9fee(0x144)](_0x3a9fee(0x193)),0x0;if(!_0x1c3936&&(_0x379084[_0x3a9fee(0x111)]||_0x379084[_0x3a9fee(0x19b)]))return await handleSDKOutput(_0x4b40f9,_0x379084),0x0;if(!_0x1c3936){const _0x557e1b=_0x4b40f9[_0x3a9fee(0x113)](_0xe5e24d=>({'title':_0xe5e24d['taskName']+'\x20('+formatBytes(_0xe5e24d['fileSize'])+')','value':_0xe5e24d[_0x3a9fee(0x16c)]})),_0x147bae=await a39_0xd55755({'type':_0x3a9fee(0x131),'name':'task','message':_0x3a9fee(0x116),'choices':_0x557e1b});if(!_0x147bae[_0x3a9fee(0x188)])return console['error'](_0x3a9fee(0x138)),0x0;_0x1c3936=_0x147bae[_0x3a9fee(0x188)];}const _0x75cf4b=await withSpinner('Downloading\x20logs...',()=>_0x4f2e61[_0x3a9fee(0x106)][_0x3a9fee(0x114)](_0x16849f,_0x1c3936),{'verbose':_0x379084[_0x3a9fee(0x13d)]}),_0x4377cb=_0x75cf4b[_0x3a9fee(0x17c)];return _0x4377cb?console['log'](_0x4377cb):console[_0x3a9fee(0x144)](_0x3a9fee(0x15d)),0x0;}catch(_0x446d4d){if(_0x446d4d instanceof SDKError)return console['error'](_0x3a9fee(0x10a)+_0x446d4d['message']),_0x446d4d[_0x3a9fee(0x117)]&&console[_0x3a9fee(0x144)]('\x20\x20Cause:\x20'+_0x446d4d['cause']),0x1;throw _0x446d4d;}}}export class WorkflowKillCommand extends BaseCommand{[a39_0x45ce2a(0x100)]=a39_0x45ce2a(0x123);[a39_0x45ce2a(0x137)]=a39_0x45ce2a(0x12c);async[a39_0x45ce2a(0x10d)](_0x2a2b00){const _0x560501=a39_0x45ce2a,{options:_0x4fe925,args:_0x588606,tdx:_0x3ac4cc}=_0x2a2b00,_0x112a82=_0x588606[0x0];if(!_0x112a82)return console['error'](_0x560501(0xfe)),0x1;try{const _0x5c6fee=_0x4fe925[_0x560501(0xfb)];_0x4fe925['verbose']&&(console[_0x560501(0x144)](_0x560501(0x139)+_0x112a82),_0x5c6fee&&console[_0x560501(0x144)](_0x560501(0x17a)+_0x5c6fee));if(!_0x4fe925[_0x560501(0x182)]){const _0x3ebb6a=await confirm(_0x560501(0x170)+_0x112a82+'?');if(!_0x3ebb6a)return console[_0x560501(0x144)]('Cancelled'),0x0;}const _0x24c53a=await withSpinner(_0x560501(0x119),()=>_0x3ac4cc[_0x560501(0x106)][_0x560501(0x18b)](_0x112a82,_0x5c6fee),{'verbose':_0x4fe925['verbose']}),_0x2a6590=_0x24c53a[_0x560501(0x17c)];return console[_0x560501(0x144)]('✔\x20'+_0x2a6590),0x0;}catch(_0x475b49){if(_0x475b49 instanceof SDKError)return console['error'](_0x560501(0x10a)+_0x475b49['message']),_0x475b49[_0x560501(0x117)]&&console[_0x560501(0x144)]('\x20\x20Cause:\x20'+_0x475b49[_0x560501(0x117)]),0x1;throw _0x475b49;}}}export class WorkflowRetryCommand extends BaseCommand{[a39_0x45ce2a(0x100)]=a39_0x45ce2a(0x142);[a39_0x45ce2a(0x137)]=a39_0x45ce2a(0x153);async[a39_0x45ce2a(0x10d)](_0x465286){const _0x1e88e7=a39_0x45ce2a,{options:_0x2ea6ea,args:_0x2a7838,tdx:_0x466012}=_0x465286,_0x2f214a=_0x2a7838[0x0];if(!_0x2f214a)return console[_0x1e88e7(0x144)](_0x1e88e7(0x15b)),console[_0x1e88e7(0x144)](_0x1e88e7(0x11c)),0x1;let _0x152624=![],_0xd97149=_0x2f214a;if(_0x2f214a[_0x1e88e7(0x12d)](_0x1e88e7(0x10b)))_0x152624=!![],_0xd97149=_0x2f214a['substring'](0x8);else{if(_0x2f214a[_0x1e88e7(0x12d)](_0x1e88e7(0x121)))_0x152624=![],_0xd97149=_0x2f214a['substring'](0x8);else return console[_0x1e88e7(0x144)](_0x1e88e7(0x196)),console[_0x1e88e7(0x144)](_0x1e88e7(0x11c)),0x1;}try{const _0x3a7937=_0x2ea6ea[_0x1e88e7(0x148)],_0x13c0d1=_0x2ea6ea['resumeFrom'],_0x3a5738=_0x2ea6ea[_0x1e88e7(0x180)],_0x4a8b02=_0x2ea6ea[_0x1e88e7(0x184)];_0x2ea6ea['verbose']&&(console[_0x1e88e7(0x144)](_0x1e88e7(0x13c)+(_0x152624?_0x1e88e7(0x13e):_0x1e88e7(0x110))+'\x20'+_0xd97149),_0x3a7937&&console[_0x1e88e7(0x144)](_0x1e88e7(0x183)+_0x3a7937),_0x13c0d1&&console[_0x1e88e7(0x144)](_0x1e88e7(0x12e)+_0x13c0d1),_0x3a5738&&console[_0x1e88e7(0x144)]('Params:\x20'+_0x3a5738),_0x4a8b02&&console['error']('Force:\x20yes'));let _0x1d22c4;if(_0x3a5738)try{if(_0x3a5738[_0x1e88e7(0x12d)]('@')){const _0x4ff6d6=await import('fs/promises'),_0x42d61b=_0x3a5738[_0x1e88e7(0x10e)](0x1),_0x217dfa=await _0x4ff6d6[_0x1e88e7(0x143)](_0x42d61b,_0x1e88e7(0x141));_0x1d22c4=JSON[_0x1e88e7(0x1a4)](_0x217dfa);}else _0x1d22c4=JSON['parse'](_0x3a5738);}catch{return console['error']('Error:\x20Invalid\x20JSON\x20in\x20--params'),0x1;}if(!_0x2ea6ea[_0x1e88e7(0x182)]){const _0x401b38=await confirm('Are\x20you\x20sure\x20you\x20want\x20to\x20retry\x20'+(_0x152624?_0x1e88e7(0x13e):'attempt')+'\x20'+_0xd97149+'?');if(!_0x401b38)return console[_0x1e88e7(0x144)]('Cancelled'),0x0;}let _0x5e2bac;_0x152624?_0x5e2bac=await withSpinner(_0x1e88e7(0x177),()=>_0x466012[_0x1e88e7(0x106)][_0x1e88e7(0x16b)](_0xd97149,{'fromTask':_0x3a7937,'retryParams':_0x1d22c4}),{'verbose':_0x2ea6ea[_0x1e88e7(0x13d)]}):_0x5e2bac=await withSpinner(_0x1e88e7(0x178),()=>_0x466012[_0x1e88e7(0x106)][_0x1e88e7(0x157)](_0xd97149,{'resumeFrom':_0x13c0d1,'retryParams':_0x1d22c4,'force':_0x4a8b02}),{'verbose':_0x2ea6ea[_0x1e88e7(0x13d)]});const _0x42b784=_0x5e2bac[_0x1e88e7(0x17c)];return console[_0x1e88e7(0x144)](_0x1e88e7(0x14f)),console[_0x1e88e7(0x144)](_0x1e88e7(0x17b)+_0x42b784[_0x1e88e7(0x101)]),console['error'](_0x1e88e7(0xff)+_0x42b784[_0x1e88e7(0x1a0)]),0x0;}catch(_0x4b9c97){if(_0x4b9c97 instanceof SDKError)return console[_0x1e88e7(0x144)](_0x1e88e7(0x10a)+_0x4b9c97[_0x1e88e7(0x122)]),_0x4b9c97['cause']&&console[_0x1e88e7(0x144)](_0x1e88e7(0x120)+_0x4b9c97[_0x1e88e7(0x117)]),0x1;throw _0x4b9c97;}}}function a39_0x98fb(_0x28c68d,_0x353cc1){const _0x4d225b=a39_0x4d22();return a39_0x98fb=function(_0x98fbfe,_0x225509){_0x98fbfe=_0x98fbfe-0xfb;let _0x50faf4=_0x4d225b[_0x98fbfe];return _0x50faf4;},a39_0x98fb(_0x28c68d,_0x353cc1);}export class WorkflowRunCommand extends BaseCommand{[a39_0x45ce2a(0x100)]=a39_0x45ce2a(0x169);['description']=a39_0x45ce2a(0x175);async[a39_0x45ce2a(0x10d)](_0x1bc5ee){const _0x24b836=a39_0x45ce2a,{options:_0x1ae8a8,args:_0x3a7dab,tdx:_0x3ecc45}=_0x1bc5ee,_0x37bd30=_0x3a7dab[0x0];if(!_0x37bd30)return console[_0x24b836(0x144)](_0x24b836(0x191)),console['error'](_0x24b836(0x13a)),0x1;const _0x2474be=_0x1ae8a8[_0x24b836(0x186)],_0x17f19a=_0x1ae8a8[_0x24b836(0x127)],_0x116fd2={};if(_0x2474be&&Array[_0x24b836(0x13f)](_0x2474be))for(const _0x15deb6 of _0x2474be){const _0x1db8dd=_0x15deb6[_0x24b836(0x159)]('=');if(_0x1db8dd===-0x1)return console[_0x24b836(0x144)](_0x24b836(0x15a)+_0x15deb6),console[_0x24b836(0x144)](_0x24b836(0x105)),0x1;const _0x269af6=_0x15deb6[_0x24b836(0x10e)](0x0,_0x1db8dd),_0x9f9a81=_0x15deb6[_0x24b836(0x10e)](_0x1db8dd+0x1);try{_0x116fd2[_0x269af6]=JSON[_0x24b836(0x1a4)](_0x9f9a81);}catch{_0x116fd2[_0x269af6]=_0x9f9a81;}}_0x1ae8a8[_0x24b836(0x13d)]&&(console[_0x24b836(0x144)]('Workflow:\x20'+_0x37bd30),Object[_0x24b836(0x173)](_0x116fd2)[_0x24b836(0x181)]>0x0&&console[_0x24b836(0x144)](_0x24b836(0x14e)+JSON[_0x24b836(0x19c)](_0x116fd2)),_0x17f19a&&console[_0x24b836(0x144)](_0x24b836(0x140)+_0x17f19a));const _0x29dd01=await withSpinner('Starting\x20workflow\x20run...',()=>_0x3ecc45[_0x24b836(0x106)][_0x24b836(0x133)](_0x37bd30,_0x116fd2,{'sessionTime':_0x17f19a}),{'verbose':_0x1ae8a8['verbose']}),_0x5798fe=_0x29dd01['data'];return console['error'](_0x24b836(0x165)),console[_0x24b836(0x144)]('\x20\x20Attempt\x20ID:\x20'+_0x5798fe['id']),console[_0x24b836(0x144)](_0x24b836(0xff)+_0x5798fe[_0x24b836(0x1a0)]),console[_0x24b836(0x144)]('\x20\x20Project:\x20'+_0x5798fe['project']?.[_0x24b836(0x100)]),console[_0x24b836(0x144)](_0x24b836(0x11a)+_0x5798fe['workflow']?.[_0x24b836(0x100)]),0x0;}}export class WorkflowDownloadCommand extends BaseCommand{[a39_0x45ce2a(0x100)]='workflow:download';[a39_0x45ce2a(0x137)]='Download\x20workflow\x20project\x20from\x20Treasure\x20Data';async['execute'](_0x19feac){const _0x2a9cb9=a39_0x45ce2a,{options:_0x5f1a4d,args:_0x1615ce,tdx:_0x25b3ca}=_0x19feac,_0x2c405d=_0x1615ce[0x0],_0xdbc244=_0x1615ce[0x1]||'.';if(!_0x2c405d)return console['error'](_0x2a9cb9(0x1a3)),console[_0x2a9cb9(0x144)](_0x2a9cb9(0x197)),0x1;const _0x392e60=_0x5f1a4d[_0x2a9cb9(0x187)];_0x5f1a4d[_0x2a9cb9(0x13d)]&&(console[_0x2a9cb9(0x144)](_0x2a9cb9(0x11b)+_0x2c405d),console['error'](_0x2a9cb9(0x15f)+_0xdbc244),_0x392e60&&console[_0x2a9cb9(0x144)](_0x2a9cb9(0x11e)+_0x392e60));const _0x3249cc=await withSpinner(_0x2a9cb9(0x104)+_0x2c405d+_0x2a9cb9(0x198),()=>_0x25b3ca[_0x2a9cb9(0x106)][_0x2a9cb9(0x129)](_0x2c405d,_0xdbc244,{'revision':_0x392e60}),{'verbose':_0x5f1a4d['verbose']}),_0xf7d96e=_0x3249cc[_0x2a9cb9(0x17c)];return console[_0x2a9cb9(0x144)](_0x2a9cb9(0x136)+_0xf7d96e[_0x2a9cb9(0x15c)]),console[_0x2a9cb9(0x144)](_0x2a9cb9(0x172)+_0xf7d96e['revision']),console[_0x2a9cb9(0x144)]('\x20\x20Files\x20extracted:\x20'+_0xf7d96e[_0x2a9cb9(0x163)]),console[_0x2a9cb9(0x144)]('\x20\x20Location:\x20'+_0xdbc244+'/'+_0xf7d96e[_0x2a9cb9(0x15c)]),0x0;}}export class WorkflowPushCommand extends BaseCommand{[a39_0x45ce2a(0x100)]=a39_0x45ce2a(0x195);[a39_0x45ce2a(0x137)]=a39_0x45ce2a(0x179);async[a39_0x45ce2a(0x10d)](_0x1bb7fb){const _0x1f23c9=a39_0x45ce2a,{options:_0x50f872,args:_0x1ae0ca,tdx:_0x536fc0}=_0x1bb7fb;let _0x281777='.',_0x278a24=_0x50f872['name'];if(_0x1ae0ca[0x0]){const {promises:_0x590158}=await import('fs');try{const _0x898bd1=await _0x590158[_0x1f23c9(0x162)](_0x1ae0ca[0x0]);if(_0x898bd1['isDirectory']())_0x281777=_0x1ae0ca[0x0];else return console[_0x1f23c9(0x144)](_0x1f23c9(0x10a)+_0x1ae0ca[0x0]+_0x1f23c9(0x192)),0x1;}catch{_0x278a24=_0x1ae0ca[0x0],_0x281777='.';}}const _0x53a532=_0x50f872[_0x1f23c9(0x187)],_0x50cb54=_0x50f872['skipValidation'];_0x50f872[_0x1f23c9(0x13d)]&&(console[_0x1f23c9(0x144)](_0x1f23c9(0x168)+_0x281777),_0x278a24&&console['error']('Project\x20name:\x20'+_0x278a24),_0x53a532&&console[_0x1f23c9(0x144)](_0x1f23c9(0x11e)+_0x53a532),_0x50cb54&&console[_0x1f23c9(0x144)](_0x1f23c9(0x176)));const _0x385d7e=await withSpinner('Pushing\x20workflow\x20project...',()=>_0x536fc0['workflow'][_0x1f23c9(0x18e)](_0x281777,{'projectName':_0x278a24,'revision':_0x53a532,'skipValidation':_0x50cb54}),{'verbose':_0x50f872['verbose']}),_0x4d2098=_0x385d7e[_0x1f23c9(0x17c)];return console[_0x1f23c9(0x144)]('✔\x20Pushed\x20'+_0x4d2098[_0x1f23c9(0x15c)]),console[_0x1f23c9(0x144)]('\x20\x20Project\x20ID:\x20'+_0x4d2098[_0x1f23c9(0x12f)]),console[_0x1f23c9(0x144)]('\x20\x20Revision:\x20'+_0x4d2098[_0x1f23c9(0x187)]),0x0;}}export class WorkflowDeleteCommand extends BaseCommand{['name']=a39_0x45ce2a(0x16d);[a39_0x45ce2a(0x137)]='Delete\x20workflow\x20project\x20from\x20Treasure\x20Data';async[a39_0x45ce2a(0x10d)](_0x1276dd){const _0x38166a=a39_0x45ce2a,{options:_0x196661,args:_0x385547,tdx:_0x5a5adb}=_0x1276dd,_0xe4ddcd=_0x385547[0x0];if(!_0xe4ddcd)return console[_0x38166a(0x144)](_0x38166a(0x15e)),console['error']('Usage:\x20workflow:delete\x20<project-name-or-id>'),0x1;_0x196661[_0x38166a(0x13d)]&&console['error'](_0x38166a(0x11b)+_0xe4ddcd);if(!_0x196661[_0x38166a(0x182)]){const _0xea6c38=await confirm(_0x38166a(0x132)+_0xe4ddcd+_0x38166a(0x160));if(!_0xea6c38)return console[_0x38166a(0x144)](_0x38166a(0x138)),0x0;}const _0x12c042=await withSpinner(_0x38166a(0x135)+_0xe4ddcd+_0x38166a(0x198),()=>_0x5a5adb[_0x38166a(0x106)][_0x38166a(0x145)](_0xe4ddcd),{'verbose':_0x196661[_0x38166a(0x13d)]}),_0x349199=_0x12c042['data'];return console[_0x38166a(0x144)](_0x38166a(0xfc)+_0x349199[_0x38166a(0x15c)]),console[_0x38166a(0x144)](_0x38166a(0x174)+_0x349199[_0x38166a(0x12f)]),0x0;}}
package/dist/core/auth.js CHANGED
@@ -1 +1 @@
1
- function a40_0x1ec9(_0x11063d,_0x4a468b){const _0x4a5074=a40_0x4a50();return a40_0x1ec9=function(_0x1ec982,_0x3f3c92){_0x1ec982=_0x1ec982-0xa7;let _0x76640c=_0x4a5074[_0x1ec982];return _0x76640c;},a40_0x1ec9(_0x11063d,_0x4a468b);}(function(_0x2f1e7b,_0x1359dd){const _0x22bceb=a40_0x1ec9,_0x4fbee7=_0x2f1e7b();while(!![]){try{const _0x2b947a=parseInt(_0x22bceb(0xab))/0x1*(-parseInt(_0x22bceb(0xb7))/0x2)+-parseInt(_0x22bceb(0xbf))/0x3*(parseInt(_0x22bceb(0xae))/0x4)+parseInt(_0x22bceb(0xbb))/0x5*(-parseInt(_0x22bceb(0xb8))/0x6)+parseInt(_0x22bceb(0xad))/0x7+parseInt(_0x22bceb(0xb3))/0x8*(parseInt(_0x22bceb(0xbe))/0x9)+-parseInt(_0x22bceb(0xbc))/0xa*(parseInt(_0x22bceb(0xba))/0xb)+parseInt(_0x22bceb(0xb5))/0xc*(parseInt(_0x22bceb(0xaf))/0xd);if(_0x2b947a===_0x1359dd)break;else _0x4fbee7['push'](_0x4fbee7['shift']());}catch(_0x465b47){_0x4fbee7['push'](_0x4fbee7['shift']());}}}(a40_0x4a50,0x9e634));import{platform}from'os';import{readFileSync}from'fs';import{fileURLToPath}from'url';function a40_0x4a50(){const _0x344625=['1638455DeVlFI','787292HMjaoj','38357007APFcHL',';\x20node/','utf-8','TD1\x20','9816qqLXUP','../../package.json','12jqvjSg','Authorization','1257518ZyPNSJ','4441542tcRIAo','replace','1353nuXdBy','5mTsFqP','81950PPZqBX','length','7497HhxkqX','18wSaFRP','version','X-Trino-User','0.0.0','tdx','1sbCHmf','parse'];a40_0x4a50=function(){return _0x344625;};return a40_0x4a50();}import{dirname,join}from'path';import{getAPIKey}from'./config.js';export function getVersion(){const _0x3c2c86=a40_0x1ec9;try{const _0x3e0b7b=fileURLToPath(import.meta['url']),_0x53b0a0=dirname(_0x3e0b7b),_0x3798a7=join(_0x53b0a0,_0x3c2c86(0xb4)),_0x46e819=JSON[_0x3c2c86(0xac)](readFileSync(_0x3798a7,_0x3c2c86(0xb1)));return _0x46e819[_0x3c2c86(0xa7)];}catch{return _0x3c2c86(0xa9);}}export function getUserAgent(){const _0x364365=a40_0x1ec9,_0x373dc0=getVersion(),_0x1d904b=platform(),_0x8fb5c8=process[_0x364365(0xa7)][_0x364365(0xb9)]('v','');return'tdx/'+_0x373dc0+'\x20('+_0x1d904b+_0x364365(0xb0)+_0x8fb5c8+')';}export function getAuthHeaders(_0x27da04,_0x5610cf){const _0x2b8619=a40_0x1ec9,_0x479352=getVersion(),_0x41eaa8={'User-Agent':getUserAgent(),'X-TD-Client':_0x2b8619(0xaa),'X-TD-Client-Version':_0x479352};return _0x5610cf&&(_0x41eaa8[_0x2b8619(0xb6)]=_0x2b8619(0xb2)+_0x5610cf),_0x41eaa8;}export function toHeaderRecord(_0x44612b){const _0x5c3255={};for(const [_0x3afad0,_0x3487a5]of Object['entries'](_0x44612b)){_0x3487a5!==undefined&&(_0x5c3255[_0x3afad0]=_0x3487a5);}return _0x5c3255;}export function getTrinoHeaders(_0x5209ef,_0xafa042){const _0x303430=a40_0x1ec9,_0xdc9535=getAuthHeaders(_0x5209ef,_0xafa042),_0x5eb84b=toHeaderRecord(_0xdc9535);return delete _0x5eb84b[_0x303430(0xb6)],_0xafa042&&(_0x5eb84b[_0x303430(0xa8)]=_0xafa042),_0x5eb84b;}export function hasAPIKey(_0x3afd89){const _0x312126=a40_0x1ec9,_0x5dc949=getAPIKey(_0x3afd89);return _0x5dc949!==undefined&&_0x5dc949[_0x312126(0xbd)]>0x0;}
1
+ (function(_0x50be89,_0x2db1ff){const _0x40b9f6=a40_0x4b6d,_0xca5c0f=_0x50be89();while(!![]){try{const _0xf49faf=-parseInt(_0x40b9f6(0xec))/0x1*(parseInt(_0x40b9f6(0xee))/0x2)+-parseInt(_0x40b9f6(0xdb))/0x3*(parseInt(_0x40b9f6(0xe7))/0x4)+-parseInt(_0x40b9f6(0xe1))/0x5+-parseInt(_0x40b9f6(0xe4))/0x6*(parseInt(_0x40b9f6(0xdd))/0x7)+parseInt(_0x40b9f6(0xe6))/0x8+-parseInt(_0x40b9f6(0xdf))/0x9*(-parseInt(_0x40b9f6(0xef))/0xa)+-parseInt(_0x40b9f6(0xde))/0xb*(-parseInt(_0x40b9f6(0xeb))/0xc);if(_0xf49faf===_0x2db1ff)break;else _0xca5c0f['push'](_0xca5c0f['shift']());}catch(_0x4ab72c){_0xca5c0f['push'](_0xca5c0f['shift']());}}}(a40_0x2dd3,0xa2cd3));import{platform}from'os';import{readFileSync}from'fs';import{fileURLToPath}from'url';import{dirname,join}from'path';import{getAPIKey}from'./config.js';function a40_0x4b6d(_0x587cee,_0x264bc0){const _0x2dd39a=a40_0x2dd3();return a40_0x4b6d=function(_0x4b6d32,_0x36172d){_0x4b6d32=_0x4b6d32-0xda;let _0x231c9f=_0x2dd39a[_0x4b6d32];return _0x231c9f;},a40_0x4b6d(_0x587cee,_0x264bc0);}export function getVersion(){const _0x712df4=a40_0x4b6d;try{const _0x4c97be=fileURLToPath(import.meta[_0x712df4(0xea)]),_0x2889e2=dirname(_0x4c97be),_0x4a9758=join(_0x2889e2,_0x712df4(0xed)),_0x5c18bc=JSON['parse'](readFileSync(_0x4a9758,_0x712df4(0xe5)));return _0x5c18bc['version'];}catch{return _0x712df4(0xe3);}}export function getUserAgent(){const _0x501190=a40_0x4b6d,_0x9e5b95=getVersion(),_0x2e6500=platform(),_0x3dfc2c=process[_0x501190(0xe8)][_0x501190(0xe9)]('v','');return _0x501190(0xdc)+_0x9e5b95+'\x20('+_0x2e6500+_0x501190(0xda)+_0x3dfc2c+')';}function a40_0x2dd3(){const _0x4b90a9=['version','replace','url','48XcsUKQ','1471nOlhqZ','../../package.json','1658PPGAKr','13370QGdNpz',';\x20node/','78519zuJlrs','tdx/','5194cnrQFu','6892325qFSNpf','7848csMBYX','TD1\x20','5680975nhMhNT','tdx','0.0.0','1974KLWprs','utf-8','1990144NytURS','100ZNgHhP'];a40_0x2dd3=function(){return _0x4b90a9;};return a40_0x2dd3();}export function getAuthHeaders(_0x1f5d46,_0x3fda2e){const _0x1e4476=a40_0x4b6d,_0x912be3=getVersion(),_0x179128={'User-Agent':getUserAgent(),'X-TD-Client':_0x1e4476(0xe2),'X-TD-Client-Version':_0x912be3};return _0x3fda2e&&(_0x179128['Authorization']=_0x1e4476(0xe0)+_0x3fda2e),_0x179128;}export function toHeaderRecord(_0x5e2286){const _0x44e570={};for(const [_0x3c8b90,_0x3a4824]of Object['entries'](_0x5e2286)){_0x3a4824!==undefined&&(_0x44e570[_0x3c8b90]=_0x3a4824);}return _0x44e570;}export function getTrinoHeaders(_0x5ab16d,_0x28c7d7){const _0x517fdd=getAuthHeaders(_0x5ab16d,_0x28c7d7),_0x4bdc1f=toHeaderRecord(_0x517fdd);return delete _0x4bdc1f['Authorization'],_0x28c7d7&&(_0x4bdc1f['X-Trino-User']=_0x28c7d7),_0x4bdc1f;}export function hasAPIKey(_0x22ab61){const _0x39fd5b=getAPIKey(_0x22ab61);return _0x39fd5b!==undefined&&_0x39fd5b['length']>0x0;}