@treasuredata/tdx 0.3.3 → 0.3.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 (81) hide show
  1. package/dist/build-info.json +2 -2
  2. package/dist/cli.js +1 -1
  3. package/dist/client/cdp-api-client.js +1 -1
  4. package/dist/client/http-client.js +1 -1
  5. package/dist/client/llm-api-client.js +1 -1
  6. package/dist/client/rate-limiter.js +1 -1
  7. package/dist/client/td-api-client.js +1 -1
  8. package/dist/client/trino-api-client.js +1 -1
  9. package/dist/client/workflow-client.js +1 -1
  10. package/dist/commands/activations.js +1 -1
  11. package/dist/commands/api-command.js +1 -1
  12. package/dist/commands/auth-command.js +1 -1
  13. package/dist/commands/chat-command.js +1 -1
  14. package/dist/commands/claude-command.js +1 -1
  15. package/dist/commands/command.js +1 -1
  16. package/dist/commands/context-command.js +1 -1
  17. package/dist/commands/databases.js +1 -1
  18. package/dist/commands/describe.js +1 -1
  19. package/dist/commands/job-command.js +1 -1
  20. package/dist/commands/llm-command.js +1 -1
  21. package/dist/commands/llm-proxy.js +1 -1
  22. package/dist/commands/parent-segment-command.js +1 -1
  23. package/dist/commands/profiles-command.js +1 -1
  24. package/dist/commands/query-command.js +1 -1
  25. package/dist/commands/segment-command.js +1 -1
  26. package/dist/commands/segment-create-command.js +1 -1
  27. package/dist/commands/segment-fields-command.js +1 -1
  28. package/dist/commands/segment-pwd-command.js +1 -1
  29. package/dist/commands/segment-update-command.js +1 -1
  30. package/dist/commands/segment-use-command.js +1 -1
  31. package/dist/commands/segments.js +1 -1
  32. package/dist/commands/show.js +1 -1
  33. package/dist/commands/tables.js +1 -1
  34. package/dist/commands/use-command.js +1 -1
  35. package/dist/commands/workflow-command.js +1 -1
  36. package/dist/core/auth.js +1 -1
  37. package/dist/core/config.js +1 -1
  38. package/dist/core/global-context.js +1 -1
  39. package/dist/core/profile.js +1 -1
  40. package/dist/core/project-config.js +1 -1
  41. package/dist/core/session.js +1 -1
  42. package/dist/index.js +1 -1
  43. package/dist/proxy/anthropic-adapter.js +1 -1
  44. package/dist/proxy/server.js +1 -1
  45. package/dist/proxy/session-cache.js +1 -1
  46. package/dist/sdk/api.js +1 -1
  47. package/dist/sdk/errors.js +1 -1
  48. package/dist/sdk/index.js +1 -1
  49. package/dist/sdk/job.js +1 -1
  50. package/dist/sdk/llm.js +1 -1
  51. package/dist/sdk/query.js +1 -1
  52. package/dist/sdk/segment.js +1 -1
  53. package/dist/sdk/workflow.js +1 -1
  54. package/dist/types/endpoints.js +1 -1
  55. package/dist/types/index.js +1 -1
  56. package/dist/utils/agent-ref-parser.js +1 -1
  57. package/dist/utils/chat-cache.js +1 -1
  58. package/dist/utils/colors.js +1 -1
  59. package/dist/utils/command-output.js +1 -1
  60. package/dist/utils/constants.js +1 -1
  61. package/dist/utils/file-permissions.js +1 -1
  62. package/dist/utils/format-detector.js +1 -1
  63. package/dist/utils/formatters.js +1 -1
  64. package/dist/utils/json-loader.js +1 -1
  65. package/dist/utils/model-aliases.js +1 -1
  66. package/dist/utils/option-validation.js +1 -1
  67. package/dist/utils/port.js +1 -1
  68. package/dist/utils/process.js +1 -1
  69. package/dist/utils/prompt.js +1 -1
  70. package/dist/utils/segment-path-parser.js +1 -1
  71. package/dist/utils/segment-ref-parser.js +1 -1
  72. package/dist/utils/spinner.js +1 -1
  73. package/dist/utils/sql-parser.js +1 -1
  74. package/dist/utils/sse-parser.js +1 -1
  75. package/dist/utils/string-utils.js +1 -1
  76. package/dist/utils/table-ref-parser.js +1 -1
  77. package/dist/utils/tdx-logger.js +1 -1
  78. package/dist/utils/tree-formatter.js +1 -1
  79. package/dist/utils/version-check.js +1 -1
  80. package/dist/utils/workflow-utils.js +1 -1
  81. package/package.json +1 -1
@@ -1 +1 @@
1
- function a24_0x4389(_0x54be1c,_0x2dd73f){const _0x30f35f=a24_0x30f3();return a24_0x4389=function(_0x4389a4,_0x57101b){_0x4389a4=_0x4389a4-0x78;let _0x110305=_0x30f35f[_0x4389a4];return _0x110305;},a24_0x4389(_0x54be1c,_0x2dd73f);}const a24_0x1d0eb3=a24_0x4389;(function(_0xed5ec8,_0x2eee77){const _0x146548=a24_0x4389,_0x206c81=_0xed5ec8();while(!![]){try{const _0x1ece72=-parseInt(_0x146548(0x7d))/0x1+-parseInt(_0x146548(0x8b))/0x2+parseInt(_0x146548(0x88))/0x3+-parseInt(_0x146548(0x94))/0x4*(-parseInt(_0x146548(0x91))/0x5)+-parseInt(_0x146548(0x95))/0x6*(-parseInt(_0x146548(0x98))/0x7)+parseInt(_0x146548(0x7f))/0x8+-parseInt(_0x146548(0x79))/0x9;if(_0x1ece72===_0x2eee77)break;else _0x206c81['push'](_0x206c81['shift']());}catch(_0x4fc025){_0x206c81['push'](_0x206c81['shift']());}}}(a24_0x30f3,0x88978));function a24_0x30f3(){const _0x3313b7=['verbose','site','Usage:\x20tdx\x20segment\x20create\x20<parent/segment_name>\x20[options]','208076fQeqTA','Error:\x20Cannot\x20create\x20segment\x20in\x20a\x20segment.\x20Parent\x20path\x20must\x20be\x20a\x20folder\x20or\x20parent.','2515712fpWgif','\x20\x20\x20Path:\x20','kind','createSegment','segment','error','Resolved\x20folder\x20ID:\x20','resolveParentId','resolvePathToResource','1689921QqhJiH','Resolving\x20folder\x20path\x20\x27','Site:\x20','1785390xVmGSk','Resolved\x20relative\x20path\x20to:\x20','description','data','Create\x20child\x20segment\x20with\x20filtering\x20rules','type','10PRZQEL','Error:\x20Segment\x20path\x20or\x20name\x20is\x20required','invisible','650728NgpwlW','478296RTfSPB','\x20\x20tdx\x20segment\x20create\x20\x22My\x20Audience/High\x20Value\x22\x20--rule\x20\x27...\x27','segmentPath','70toYkbN','ruleFile','\x27\x20with\x20ID:\x20','Parent\x20path:\x20','\x20\x20tdx\x20segment\x20create\x20\x22Premium\x22\x20--rule\x20\x27...\x27\x20\x20#\x20Relative\x20to\x20context','name','Resolving\x20folder\x20\x27','\x27...','Resolving\x20parent\x20segment\x20\x27','rule','length','segment:create','folder','Error:\x20Full\x20path\x20required\x20(parent/segment_name\x20or\x20parent/folder/segment_name)','segments','includes','3060396wiFSdx'];a24_0x30f3=function(){return _0x3313b7;};return a24_0x30f3();}import{BaseCommand}from'./command.js';import{handleSDKOutput}from'../utils/command-output.js';import{withSpinner}from'../utils/spinner.js';import{loadJSONFromOptions}from'../utils/json-loader.js';import{parsePath,getParentPath,getBaseName}from'../utils/segment-path-parser.js';export class SegmentCreateCommand extends BaseCommand{[a24_0x1d0eb3(0x9d)]=a24_0x1d0eb3(0xa3);[a24_0x1d0eb3(0x8d)]=a24_0x1d0eb3(0x8f);async['execute'](_0x17d510){const _0x10a400=a24_0x1d0eb3,{options:_0x250648,args:_0xe3ec74,tdx:_0x50715c}=_0x17d510,_0x42cf2a=_0x250648;if(_0xe3ec74[_0x10a400(0xa2)]===0x0)return console['error'](_0x10a400(0x92)),console[_0x10a400(0x84)]('Usage:\x20tdx\x20segment\x20create\x20<path>\x20[options]'),console[_0x10a400(0x84)]('Examples:'),console['error'](_0x10a400(0x96)),console[_0x10a400(0x84)]('\x20\x20tdx\x20segment\x20create\x20\x22My\x20Audience/Marketing/Premium\x22\x20--rule\x20\x27...\x27'),console[_0x10a400(0x84)](_0x10a400(0x9c)),0x1;const _0x723541=_0xe3ec74[0x0],_0x215608=_0x250648[_0x10a400(0x97)];let _0x29c2b5=_0x723541;_0x215608&&!_0x723541[_0x10a400(0x78)]('/')&&(_0x29c2b5=_0x215608+'/'+_0x723541,_0x42cf2a[_0x10a400(0x7a)]&&console[_0x10a400(0x84)](_0x10a400(0x8c)+_0x29c2b5));const _0x4035ff=parsePath(_0x29c2b5);if(_0x4035ff[_0x10a400(0xa6)][_0x10a400(0xa2)]<0x2)return console['error'](_0x10a400(0xa5)),console[_0x10a400(0x84)](_0x10a400(0x7c)),0x1;const _0x46e62b=_0x4035ff[_0x10a400(0xa6)][0x0],_0x37a615=getBaseName(_0x29c2b5),_0x205463=getParentPath(_0x29c2b5);_0x42cf2a[_0x10a400(0x7a)]&&(console['error'](_0x10a400(0x8a)+_0x42cf2a[_0x10a400(0x7b)]),console['error']('Target\x20path:\x20'+_0x29c2b5),console[_0x10a400(0x84)]('Parent:\x20'+_0x46e62b),console[_0x10a400(0x84)]('Segment\x20name:\x20'+_0x37a615),console[_0x10a400(0x84)](_0x10a400(0x9b)+_0x205463));const _0xa39a7b=await withSpinner(_0x10a400(0xa0)+_0x46e62b+_0x10a400(0x9f),()=>_0x50715c[_0x10a400(0x83)][_0x10a400(0x86)](_0x46e62b),{'verbose':_0x42cf2a[_0x10a400(0x7a)]}),_0x410a4f=_0xa39a7b[_0x10a400(0x8e)];let _0x4ca677;if(_0x4035ff[_0x10a400(0xa6)][_0x10a400(0xa2)]>0x2){const _0x3251e1=await withSpinner(_0x10a400(0x89)+_0x205463+'\x27...',()=>_0x50715c['segment'][_0x10a400(0x87)](_0x205463),{'verbose':_0x42cf2a[_0x10a400(0x7a)]}),_0x4b393e=_0x3251e1[_0x10a400(0x8e)];if(_0x4b393e['type']!=='folder'&&_0x4b393e[_0x10a400(0x90)]!=='parent')return console[_0x10a400(0x84)](_0x10a400(0x7e)),0x1;_0x4ca677=_0x4b393e['folderId'];}else{if(_0x42cf2a[_0x10a400(0xa4)]){const _0x429920=await withSpinner(_0x10a400(0x9e)+_0x42cf2a[_0x10a400(0xa4)]+_0x10a400(0x9f),()=>_0x50715c['segment']['resolveFolderId'](_0x410a4f,_0x42cf2a[_0x10a400(0xa4)]),{'verbose':_0x42cf2a[_0x10a400(0x7a)]});_0x4ca677=_0x429920[_0x10a400(0x8e)];}}_0x42cf2a['verbose']&&_0x4ca677&&console[_0x10a400(0x84)](_0x10a400(0x85)+_0x4ca677);const _0x273ffb=await loadJSONFromOptions(_0x42cf2a[_0x10a400(0xa1)],_0x42cf2a[_0x10a400(0x99)]),_0x29ebbf={'name':_0x37a615,'description':_0x42cf2a[_0x10a400(0x8d)],'rule':_0x273ffb,'kind':_0x42cf2a[_0x10a400(0x81)]!==undefined?parseInt(_0x42cf2a[_0x10a400(0x81)],0xa):undefined,'isVisible':_0x42cf2a[_0x10a400(0x93)]?![]:undefined,'segmentFolderId':_0x4ca677,'countPopulation':_0x42cf2a['noCountPopulation']?![]:undefined},_0x22d7e7=await withSpinner('Creating\x20segment\x20\x27'+_0x37a615+'\x27...',()=>_0x50715c[_0x10a400(0x83)][_0x10a400(0x82)](_0x410a4f,_0x29ebbf),{'verbose':_0x42cf2a[_0x10a400(0x7a)]}),_0xbfa5ea=_0x22d7e7['data'];return console['error']('✔\x20Created\x20segment\x20\x27'+_0xbfa5ea[_0x10a400(0x9d)]+_0x10a400(0x9a)+_0xbfa5ea['id']),_0x29c2b5!==_0x723541&&console['error'](_0x10a400(0x80)+_0x29c2b5),await handleSDKOutput([_0xbfa5ea],_0x42cf2a),0x0;}}
1
+ const a24_0x1b4b21=a24_0x511a;(function(_0x824870,_0x4f9e4f){const _0x304fc7=a24_0x511a,_0x43a3d5=_0x824870();while(!![]){try{const _0x547e98=-parseInt(_0x304fc7(0x8a))/0x1*(-parseInt(_0x304fc7(0x87))/0x2)+-parseInt(_0x304fc7(0x93))/0x3*(parseInt(_0x304fc7(0x77))/0x4)+parseInt(_0x304fc7(0x9a))/0x5+parseInt(_0x304fc7(0x94))/0x6*(-parseInt(_0x304fc7(0xa1))/0x7)+-parseInt(_0x304fc7(0x98))/0x8*(parseInt(_0x304fc7(0x91))/0x9)+-parseInt(_0x304fc7(0x80))/0xa+-parseInt(_0x304fc7(0x8f))/0xb*(-parseInt(_0x304fc7(0x86))/0xc);if(_0x547e98===_0x4f9e4f)break;else _0x43a3d5['push'](_0x43a3d5['shift']());}catch(_0x4fcf79){_0x43a3d5['push'](_0x43a3d5['shift']());}}}(a24_0x57ce,0x27ac4));import{BaseCommand}from'./command.js';import{handleSDKOutput}from'../utils/command-output.js';import{withSpinner}from'../utils/spinner.js';import{loadJSONFromOptions}from'../utils/json-loader.js';function a24_0x511a(_0x4f2bc6,_0x59ff19){const _0x57ce3e=a24_0x57ce();return a24_0x511a=function(_0x511ac4,_0x13af6b){_0x511ac4=_0x511ac4-0x6c;let _0x4d1685=_0x57ce3e[_0x511ac4];return _0x4d1685;},a24_0x511a(_0x4f2bc6,_0x59ff19);}function a24_0x57ce(){const _0x55e3f0=['Error:\x20Cannot\x20create\x20segment\x20in\x20a\x20segment.\x20Parent\x20path\x20must\x20be\x20a\x20folder\x20or\x20parent.','Usage:\x20tdx\x20segment\x20create\x20<parent/segment_name>\x20[options]','Segment\x20name:\x20','Site:\x20','length','8kyREOj','noCountPopulation','✔\x20Created\x20segment\x20\x27','segment','kind','site','data','execute','verbose','202390rUpIJb','Examples:','error','Resolving\x20folder\x20\x27','segmentPath','Usage:\x20tdx\x20segment\x20create\x20<path>\x20[options]','333708birska','113858gdWJyy','parent','\x27...','4NpQrpA','includes','\x27\x20with\x20ID:\x20','Error:\x20Full\x20path\x20required\x20(parent/segment_name\x20or\x20parent/folder/segment_name)','\x20\x20tdx\x20segment\x20create\x20\x22My\x20Audience/High\x20Value\x22\x20--rule\x20\x27...\x27','187pbZEVS','Parent:\x20','437841ydnRtD','Error:\x20Segment\x20path\x20or\x20name\x20is\x20required','466050eZDfiH','474smZtEy','folderId','name','resolvePathToResource','16nSsHDG','resolveFolderId','496510fsKjVB','folder','Resolved\x20relative\x20path\x20to:\x20','description','Create\x20child\x20segment\x20with\x20filtering\x20rules','Target\x20path:\x20','Resolving\x20parent\x20segment\x20\x27','18522TVkuVo','\x20\x20\x20Path:\x20','resolveParentId','rule','createSegment','segments','invisible'];a24_0x57ce=function(){return _0x55e3f0;};return a24_0x57ce();}import{parsePath,getParentPath,getBaseName}from'../utils/segment-path-parser.js';export class SegmentCreateCommand extends BaseCommand{['name']='segment:create';[a24_0x1b4b21(0x9d)]=a24_0x1b4b21(0x9e);async[a24_0x1b4b21(0x7e)](_0x185b44){const _0x5d01be=a24_0x1b4b21,{options:_0x34242e,args:_0x4ef2dd,tdx:_0x5d9ad8}=_0x185b44,_0x2c7830=_0x34242e;if(_0x4ef2dd[_0x5d01be(0x76)]===0x0)return console[_0x5d01be(0x82)](_0x5d01be(0x92)),console[_0x5d01be(0x82)](_0x5d01be(0x85)),console[_0x5d01be(0x82)](_0x5d01be(0x81)),console[_0x5d01be(0x82)](_0x5d01be(0x8e)),console[_0x5d01be(0x82)]('\x20\x20tdx\x20segment\x20create\x20\x22My\x20Audience/Marketing/Premium\x22\x20--rule\x20\x27...\x27'),console['error']('\x20\x20tdx\x20segment\x20create\x20\x22Premium\x22\x20--rule\x20\x27...\x27\x20\x20#\x20Relative\x20to\x20context'),0x1;const _0x48d154=_0x4ef2dd[0x0],_0x556f5d=_0x34242e[_0x5d01be(0x84)];let _0x1dc459=_0x48d154;_0x556f5d&&!_0x48d154[_0x5d01be(0x8b)]('/')&&(_0x1dc459=_0x556f5d+'/'+_0x48d154,_0x2c7830['verbose']&&console[_0x5d01be(0x82)](_0x5d01be(0x9c)+_0x1dc459));const _0x54f92b=parsePath(_0x1dc459);if(_0x54f92b[_0x5d01be(0x70)][_0x5d01be(0x76)]<0x2)return console[_0x5d01be(0x82)](_0x5d01be(0x8d)),console[_0x5d01be(0x82)](_0x5d01be(0x73)),0x1;const _0x4d05e3=_0x54f92b[_0x5d01be(0x70)][0x0],_0xedc836=getBaseName(_0x1dc459),_0x385c6b=getParentPath(_0x1dc459);_0x2c7830[_0x5d01be(0x7f)]&&(console[_0x5d01be(0x82)](_0x5d01be(0x75)+_0x2c7830[_0x5d01be(0x7c)]),console[_0x5d01be(0x82)](_0x5d01be(0x9f)+_0x1dc459),console[_0x5d01be(0x82)](_0x5d01be(0x90)+_0x4d05e3),console[_0x5d01be(0x82)](_0x5d01be(0x74)+_0xedc836),console['error']('Parent\x20path:\x20'+_0x385c6b));const _0x3af35a=await withSpinner(_0x5d01be(0xa0)+_0x4d05e3+_0x5d01be(0x89),()=>_0x5d9ad8['segment'][_0x5d01be(0x6d)](_0x4d05e3),{'verbose':_0x2c7830[_0x5d01be(0x7f)]}),_0xd33ba6=_0x3af35a[_0x5d01be(0x7d)];let _0x3a7950;if(_0x54f92b[_0x5d01be(0x70)][_0x5d01be(0x76)]>0x2){const _0x37f562=await withSpinner('Resolving\x20folder\x20path\x20\x27'+_0x385c6b+_0x5d01be(0x89),()=>_0x5d9ad8[_0x5d01be(0x7a)][_0x5d01be(0x97)](_0x385c6b),{'verbose':_0x2c7830['verbose']}),_0x3ec5cd=_0x37f562[_0x5d01be(0x7d)];if(_0x3ec5cd['type']!==_0x5d01be(0x9b)&&_0x3ec5cd['type']!==_0x5d01be(0x88))return console[_0x5d01be(0x82)](_0x5d01be(0x72)),0x1;_0x3a7950=_0x3ec5cd[_0x5d01be(0x95)];}else{if(_0x2c7830['folder']){const _0x37d6e9=await withSpinner(_0x5d01be(0x83)+_0x2c7830[_0x5d01be(0x9b)]+_0x5d01be(0x89),()=>_0x5d9ad8[_0x5d01be(0x7a)][_0x5d01be(0x99)](_0xd33ba6,_0x2c7830[_0x5d01be(0x9b)]),{'verbose':_0x2c7830[_0x5d01be(0x7f)]});_0x3a7950=_0x37d6e9['data'];}}_0x2c7830['verbose']&&_0x3a7950&&console[_0x5d01be(0x82)]('Resolved\x20folder\x20ID:\x20'+_0x3a7950);const _0x3e11e7=await loadJSONFromOptions(_0x2c7830[_0x5d01be(0x6e)],_0x2c7830['ruleFile']),_0x1e8aa1={'name':_0xedc836,'description':_0x2c7830['description'],'rule':_0x3e11e7,'kind':_0x2c7830[_0x5d01be(0x7b)]!==undefined?parseInt(_0x2c7830[_0x5d01be(0x7b)],0xa):undefined,'isVisible':_0x2c7830[_0x5d01be(0x71)]?![]:undefined,'segmentFolderId':_0x3a7950,'countPopulation':_0x2c7830[_0x5d01be(0x78)]?![]:undefined},_0x15601d=await withSpinner('Creating\x20segment\x20\x27'+_0xedc836+_0x5d01be(0x89),()=>_0x5d9ad8[_0x5d01be(0x7a)][_0x5d01be(0x6f)](_0xd33ba6,_0x1e8aa1),{'verbose':_0x2c7830[_0x5d01be(0x7f)]}),_0x44ed0a=_0x15601d['data'];return console['error'](_0x5d01be(0x79)+_0x44ed0a[_0x5d01be(0x96)]+_0x5d01be(0x8c)+_0x44ed0a['id']),_0x1dc459!==_0x48d154&&console[_0x5d01be(0x82)](_0x5d01be(0x6c)+_0x1dc459),await handleSDKOutput([_0x44ed0a],_0x2c7830),0x0;}}
@@ -1 +1 @@
1
- const a25_0x3c5d29=a25_0x3dbc;function a25_0x3dbc(_0x2fbafd,_0x377d1f){const _0x3b47b7=a25_0x3b47();return a25_0x3dbc=function(_0x3dbc96,_0x39d720){_0x3dbc96=_0x3dbc96-0x173;let _0x143568=_0x3b47b7[_0x3dbc96];return _0x143568;},a25_0x3dbc(_0x2fbafd,_0x377d1f);}function a25_0x3b47(){const _0x1df7d3=['length','511304rHYZXY','35KULJwa','\x27...','171mxjBsk','segment','Error:\x20Parent\x20segment\x20name\x20is\x20required','166062ubXkrV','List\x20available\x20fields\x20for\x20segmentation','verbose','133128BMPeAM','site','Parent\x20segment:\x20','✔\x20Found\x20','data','\x20field','description','14bnsZtQ','listFields','161034bZrDif','194230PwBENG','104978JjrUda','732092NkYpya','error','name','execute','Site:\x20'];a25_0x3b47=function(){return _0x1df7d3;};return a25_0x3b47();}(function(_0x7143fe,_0x1f1a2b){const _0x35586a=a25_0x3dbc,_0x201b01=_0x7143fe();while(!![]){try{const _0x54aa53=parseInt(_0x35586a(0x178))/0x1+parseInt(_0x35586a(0x185))/0x2+parseInt(_0x35586a(0x188))/0x3+-parseInt(_0x35586a(0x179))/0x4+parseInt(_0x35586a(0x180))/0x5*(-parseInt(_0x35586a(0x176))/0x6)+parseInt(_0x35586a(0x174))/0x7*(-parseInt(_0x35586a(0x17f))/0x8)+parseInt(_0x35586a(0x182))/0x9*(parseInt(_0x35586a(0x177))/0xa);if(_0x54aa53===_0x1f1a2b)break;else _0x201b01['push'](_0x201b01['shift']());}catch(_0xfb9aff){_0x201b01['push'](_0x201b01['shift']());}}}(a25_0x3b47,0x1912c));import{BaseCommand}from'./command.js';import{handleSDKOutput}from'../utils/command-output.js';import{withSpinner}from'../utils/spinner.js';export class SegmentFieldsCommand extends BaseCommand{[a25_0x3c5d29(0x17b)]='segment:fields';[a25_0x3c5d29(0x173)]=a25_0x3c5d29(0x186);async[a25_0x3c5d29(0x17c)](_0x17644c){const _0x2bcb70=a25_0x3c5d29,{options:_0x1eedcc,args:_0x435f2c,tdx:_0x1722d3}=_0x17644c;if(_0x435f2c['length']===0x0)return console[_0x2bcb70(0x17a)](_0x2bcb70(0x184)),console[_0x2bcb70(0x17a)]('Usage:\x20tdx\x20segment\x20fields\x20<parent_name>'),0x1;const _0x4a1085=_0x435f2c[0x0];_0x1eedcc[_0x2bcb70(0x187)]&&(console[_0x2bcb70(0x17a)](_0x2bcb70(0x17d)+_0x1eedcc[_0x2bcb70(0x189)]),console[_0x2bcb70(0x17a)](_0x2bcb70(0x18a)+_0x4a1085));const _0x47e3d4=await withSpinner('Listing\x20fields\x20for\x20\x27'+_0x4a1085+_0x2bcb70(0x181),()=>_0x1722d3[_0x2bcb70(0x183)][_0x2bcb70(0x175)](_0x4a1085),{'verbose':_0x1eedcc['verbose']}),_0x5c4f2e=_0x47e3d4[_0x2bcb70(0x18c)];return console[_0x2bcb70(0x17a)](_0x2bcb70(0x18b)+_0x5c4f2e[_0x2bcb70(0x17e)]+_0x2bcb70(0x18d)+(_0x5c4f2e['length']!==0x1?'s':'')),await handleSDKOutput(_0x5c4f2e,_0x1eedcc),0x0;}}
1
+ const a25_0x43c92d=a25_0xca2a;function a25_0xca2a(_0xa0095d,_0x37ab4a){const _0x5a911d=a25_0x5a91();return a25_0xca2a=function(_0xca2a5b,_0x23ce8){_0xca2a5b=_0xca2a5b-0x122;let _0x35a1e0=_0x5a911d[_0xca2a5b];return _0x35a1e0;},a25_0xca2a(_0xa0095d,_0x37ab4a);}(function(_0x4f7ed3,_0x479622){const _0x2c599d=a25_0xca2a,_0x43f235=_0x4f7ed3();while(!![]){try{const _0x7f1eaf=parseInt(_0x2c599d(0x137))/0x1+parseInt(_0x2c599d(0x123))/0x2*(-parseInt(_0x2c599d(0x12a))/0x3)+-parseInt(_0x2c599d(0x131))/0x4*(-parseInt(_0x2c599d(0x127))/0x5)+-parseInt(_0x2c599d(0x125))/0x6+-parseInt(_0x2c599d(0x129))/0x7+-parseInt(_0x2c599d(0x12e))/0x8+parseInt(_0x2c599d(0x136))/0x9;if(_0x7f1eaf===_0x479622)break;else _0x43f235['push'](_0x43f235['shift']());}catch(_0x438f33){_0x43f235['push'](_0x43f235['shift']());}}}(a25_0x5a91,0x6378c));import{BaseCommand}from'./command.js';import{handleSDKOutput}from'../utils/command-output.js';import{withSpinner}from'../utils/spinner.js';export class SegmentFieldsCommand extends BaseCommand{['name']=a25_0x43c92d(0x12b);[a25_0x43c92d(0x126)]=a25_0x43c92d(0x128);async[a25_0x43c92d(0x132)](_0xd4a55d){const _0x5f74fc=a25_0x43c92d,{options:_0x175aec,args:_0x363946,tdx:_0x13d524}=_0xd4a55d;if(_0x363946[_0x5f74fc(0x12c)]===0x0)return console[_0x5f74fc(0x12f)]('Error:\x20Parent\x20segment\x20name\x20is\x20required'),console['error'](_0x5f74fc(0x130)),0x1;const _0x52c26f=_0x363946[0x0];_0x175aec[_0x5f74fc(0x122)]&&(console[_0x5f74fc(0x12f)](_0x5f74fc(0x134)+_0x175aec['site']),console['error']('Parent\x20segment:\x20'+_0x52c26f));const _0x1ae501=await withSpinner(_0x5f74fc(0x124)+_0x52c26f+'\x27...',()=>_0x13d524[_0x5f74fc(0x135)]['listFields'](_0x52c26f),{'verbose':_0x175aec['verbose']}),_0x3e2c38=_0x1ae501[_0x5f74fc(0x12d)];return console[_0x5f74fc(0x12f)](_0x5f74fc(0x133)+_0x3e2c38[_0x5f74fc(0x12c)]+'\x20field'+(_0x3e2c38[_0x5f74fc(0x12c)]!==0x1?'s':'')),await handleSDKOutput(_0x3e2c38,_0x175aec),0x0;}}function a25_0x5a91(){const _0x2c6791=['538454bMEApu','3acOrml','segment:fields','length','data','5166552SsbfIu','error','Usage:\x20tdx\x20segment\x20fields\x20<parent_name>','360uwLJLG','execute','✔\x20Found\x20','Site:\x20','segment','9324036XUsOba','326984anGfcx','verbose','984564yoHziU','Listing\x20fields\x20for\x20\x27','287274eauQXP','description','17075TYqvea','List\x20available\x20fields\x20for\x20segmentation'];a25_0x5a91=function(){return _0x2c6791;};return a25_0x5a91();}
@@ -1 +1 @@
1
- const a26_0x128061=a26_0x31b9;function a26_0x31b9(_0x26e2ca,_0x3040e8){const _0x3b0a99=a26_0x3b0a();return a26_0x31b9=function(_0x31b997,_0x2de440){_0x31b997=_0x31b997-0x90;let _0x114bdb=_0x3b0a99[_0x31b997];return _0x114bdb;},a26_0x31b9(_0x26e2ca,_0x3040e8);}(function(_0x4b0877,_0x1c85ce){const _0x1ec776=a26_0x31b9,_0x59fe62=_0x4b0877();while(!![]){try{const _0x2d8f51=parseInt(_0x1ec776(0xa2))/0x1+parseInt(_0x1ec776(0xa4))/0x2+-parseInt(_0x1ec776(0xa6))/0x3*(-parseInt(_0x1ec776(0x9f))/0x4)+parseInt(_0x1ec776(0x91))/0x5+-parseInt(_0x1ec776(0xa7))/0x6*(-parseInt(_0x1ec776(0x90))/0x7)+parseInt(_0x1ec776(0x96))/0x8*(-parseInt(_0x1ec776(0x98))/0x9)+-parseInt(_0x1ec776(0x9c))/0xa*(parseInt(_0x1ec776(0x92))/0xb);if(_0x2d8f51===_0x1c85ce)break;else _0x59fe62['push'](_0x59fe62['shift']());}catch(_0x3ebf0e){_0x59fe62['push'](_0x59fe62['shift']());}}}(a26_0x3b0a,0xe6435));function a26_0x3b0a(){const _0x417798=['9363190DvFtBM','55XfpqNf','name','error','Use\x20\x22tdx\x20context\x20--debug\x22\x20to\x20see\x20context\x20sources','337128aMSHIN','Context\x20details:','261BbRdIY','segmentPath','format','json','3173050OndYQJ','Show\x20current\x20segment/folder\x20context','stringify','1700164CdtJwn','log','execute','300949OFqkzX','verbose','1446686bwTGjT','\x20\x20Path:\x20','3QQbncw','73680RjZHfr','segment:pwd','jsonl','245ZbFqKC'];a26_0x3b0a=function(){return _0x417798;};return a26_0x3b0a();}import{BaseCommand}from'./command.js';export class SegmentPwdCommand extends BaseCommand{[a26_0x128061(0x93)]=a26_0x128061(0xa8);['description']=a26_0x128061(0x9d);async[a26_0x128061(0xa1)](_0x5ae4a0){const _0x66ec81=a26_0x128061,{options:_0x5c5167}=_0x5ae4a0;try{const _0x1dda7a=_0x5c5167[_0x66ec81(0x99)];if(!_0x1dda7a)return _0x5c5167['format']==='json'||_0x5c5167['format']==='jsonl'?console[_0x66ec81(0xa0)](JSON[_0x66ec81(0x9e)]({'path':'/','type':'root'})):console[_0x66ec81(0xa0)]('/'),0x0;if(_0x5c5167[_0x66ec81(0x9a)]===_0x66ec81(0x9b)||_0x5c5167[_0x66ec81(0x9a)]===_0x66ec81(0xa9)){const _0xfcba51={'path':_0x1dda7a};console['log'](JSON[_0x66ec81(0x9e)](_0xfcba51));}else console[_0x66ec81(0xa0)](_0x1dda7a),_0x5c5167[_0x66ec81(0xa3)]&&(console['error'](''),console['error'](_0x66ec81(0x97)),console[_0x66ec81(0x94)](_0x66ec81(0xa5)+_0x1dda7a),console['error'](''),console[_0x66ec81(0x94)]('Use\x20\x22tdx\x20context\x22\x20to\x20see\x20all\x20context\x20parameters'),console[_0x66ec81(0x94)](_0x66ec81(0x95)));return 0x0;}catch(_0x3a1993){throw _0x3a1993;}}}
1
+ const a26_0x59b2e1=a26_0x1406;function a26_0x1406(_0x31620e,_0x4d92db){const _0x34d355=a26_0x34d3();return a26_0x1406=function(_0x1406f1,_0x290925){_0x1406f1=_0x1406f1-0x13e;let _0xe95d90=_0x34d355[_0x1406f1];return _0xe95d90;},a26_0x1406(_0x31620e,_0x4d92db);}(function(_0x351f12,_0x17e57e){const _0x17e786=a26_0x1406,_0x238cac=_0x351f12();while(!![]){try{const _0x4ab661=-parseInt(_0x17e786(0x14d))/0x1+parseInt(_0x17e786(0x13e))/0x2+-parseInt(_0x17e786(0x152))/0x3*(-parseInt(_0x17e786(0x146))/0x4)+parseInt(_0x17e786(0x14c))/0x5+-parseInt(_0x17e786(0x149))/0x6+-parseInt(_0x17e786(0x14b))/0x7*(parseInt(_0x17e786(0x151))/0x8)+parseInt(_0x17e786(0x150))/0x9;if(_0x4ab661===_0x17e57e)break;else _0x238cac['push'](_0x238cac['shift']());}catch(_0xc2ffbe){_0x238cac['push'](_0x238cac['shift']());}}}(a26_0x34d3,0x89eb9));import{BaseCommand}from'./command.js';function a26_0x34d3(){const _0x6bb374=['2346720PMMwCg','341359xvcPHw','execute','\x20\x20Path:\x20','14872338BiyYkB','8oscIuc','18dvbyAT','658292DQnmjH','json','log','error','stringify','format','Use\x20\x22tdx\x20context\x20--debug\x22\x20to\x20see\x20context\x20sources','description','398572uxabCJ','Context\x20details:','Show\x20current\x20segment/folder\x20context','6618006TUgvwi','jsonl','7276843PaIjZf'];a26_0x34d3=function(){return _0x6bb374;};return a26_0x34d3();}export class SegmentPwdCommand extends BaseCommand{['name']='segment:pwd';[a26_0x59b2e1(0x145)]=a26_0x59b2e1(0x148);async[a26_0x59b2e1(0x14e)](_0xd859b1){const _0x57d617=a26_0x59b2e1,{options:_0x49a56e}=_0xd859b1;try{const _0x4db1ba=_0x49a56e['segmentPath'];if(!_0x4db1ba)return _0x49a56e[_0x57d617(0x143)]===_0x57d617(0x13f)||_0x49a56e[_0x57d617(0x143)]===_0x57d617(0x14a)?console[_0x57d617(0x140)](JSON[_0x57d617(0x142)]({'path':'/','type':'root'})):console[_0x57d617(0x140)]('/'),0x0;if(_0x49a56e[_0x57d617(0x143)]===_0x57d617(0x13f)||_0x49a56e[_0x57d617(0x143)]===_0x57d617(0x14a)){const _0x528c95={'path':_0x4db1ba};console[_0x57d617(0x140)](JSON[_0x57d617(0x142)](_0x528c95));}else console[_0x57d617(0x140)](_0x4db1ba),_0x49a56e['verbose']&&(console[_0x57d617(0x141)](''),console[_0x57d617(0x141)](_0x57d617(0x147)),console[_0x57d617(0x141)](_0x57d617(0x14f)+_0x4db1ba),console['error'](''),console[_0x57d617(0x141)]('Use\x20\x22tdx\x20context\x22\x20to\x20see\x20all\x20context\x20parameters'),console[_0x57d617(0x141)](_0x57d617(0x144)));return 0x0;}catch(_0x213782){throw _0x213782;}}}
@@ -1 +1 @@
1
- const a27_0x51cf5c=a27_0x12cd;function a27_0x12cd(_0xd48412,_0x36eff4){const _0x47703a=a27_0x4770();return a27_0x12cd=function(_0x12cde2,_0x40622d){_0x12cde2=_0x12cde2-0x131;let _0x40a3b4=_0x47703a[_0x12cde2];return _0x40a3b4;},a27_0x12cd(_0xd48412,_0x36eff4);}(function(_0x35cc06,_0x4ac389){const _0x58cdbb=a27_0x12cd,_0x2b65eb=_0x35cc06();while(!![]){try{const _0x52a7aa=-parseInt(_0x58cdbb(0x139))/0x1*(-parseInt(_0x58cdbb(0x150))/0x2)+parseInt(_0x58cdbb(0x14b))/0x3+-parseInt(_0x58cdbb(0x14a))/0x4+parseInt(_0x58cdbb(0x13e))/0x5*(-parseInt(_0x58cdbb(0x155))/0x6)+parseInt(_0x58cdbb(0x13c))/0x7+parseInt(_0x58cdbb(0x15b))/0x8*(parseInt(_0x58cdbb(0x144))/0x9)+parseInt(_0x58cdbb(0x159))/0xa*(-parseInt(_0x58cdbb(0x134))/0xb);if(_0x52a7aa===_0x4ac389)break;else _0x2b65eb['push'](_0x2b65eb['shift']());}catch(_0x238897){_0x2b65eb['push'](_0x2b65eb['shift']());}}}(a27_0x4770,0xc4267));import{BaseCommand}from'./command.js';import{handleSDKOutput}from'../utils/command-output.js';function a27_0x4770(){const _0x26756d=['703415cZTbkE','segment:update','Segment\x20ID:\x20','parentId','verbose','Resolved\x20type:\x20','3609OoTBBi','segmentPath','data','Resolving\x20path\x20\x27','Error:\x20Segment\x20path\x20or\x20name\x20is\x20required','Resolved\x20folder\x20ID:\x20','632188ZJjksB','916146DEqwqi','\x20\x20\x20Path:\x20','segment','Resolving\x20folder\x20\x27','error','2XQsxpa','execute','Update\x20existing\x20child\x20segment','Parent\x20ID:\x20','rule','6LiYDHV','\x20\x20tdx\x20segment\x20update\x20\x22High\x20Value\x22\x20--rule\x20\x27...\x27\x20\x20#\x20Relative\x20to\x20context','\x27...','description','1510dSraVK','Usage:\x20tdx\x20segment\x20update\x20<path>\x20[options]','13096IYhrNl','includes','folder','segmentName','resolvePathToResource','kind','resolveFolderId','ruleFile','Examples:','115027hVfMtp','updateSegmentById','Use:\x20tdx\x20segment\x20update\x20<path_to_segment>\x20[options]','segmentId','type','1154035kgvAyW','Updating\x20segment\x20\x27','name','3957198KTVEsm','✔\x20Updated\x20segment\x20\x27'];a27_0x4770=function(){return _0x26756d;};return a27_0x4770();}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']=a27_0x51cf5c(0x13f);['description']=a27_0x51cf5c(0x152);async[a27_0x51cf5c(0x151)](_0x48135){const _0x2323ad=a27_0x51cf5c,{options:_0x3e9ff5,args:_0x2af222,tdx:_0x428484}=_0x48135,_0x4715b7=_0x3e9ff5;if(_0x2af222['length']===0x0)return console[_0x2323ad(0x14f)](_0x2323ad(0x148)),console[_0x2323ad(0x14f)](_0x2323ad(0x15a)),console['error'](_0x2323ad(0x133)),console['error']('\x20\x20tdx\x20segment\x20update\x20\x22My\x20Audience/High\x20Value\x22\x20--description\x20\x22...\x22'),console['error'](_0x2323ad(0x156)),0x1;const _0x136f23=_0x2af222[0x0],_0x3f307c=_0x3e9ff5[_0x2323ad(0x145)];let _0x5f57f8=_0x136f23;_0x3f307c&&!_0x136f23[_0x2323ad(0x15c)]('/')&&(_0x5f57f8=_0x3f307c+'/'+_0x136f23,_0x4715b7[_0x2323ad(0x142)]&&console[_0x2323ad(0x14f)]('Resolved\x20relative\x20path\x20to:\x20'+_0x5f57f8));const _0x164c62=await withSpinner(_0x2323ad(0x147)+_0x5f57f8+_0x2323ad(0x157),()=>_0x428484[_0x2323ad(0x14d)][_0x2323ad(0x15f)](_0x5f57f8),{'verbose':_0x4715b7[_0x2323ad(0x142)]}),_0x850af1=_0x164c62[_0x2323ad(0x146)];_0x4715b7[_0x2323ad(0x142)]&&console[_0x2323ad(0x14f)](_0x2323ad(0x143)+_0x850af1['type']);if(_0x850af1[_0x2323ad(0x138)]!==_0x2323ad(0x14d))return console[_0x2323ad(0x14f)]('Error:\x20Cannot\x20update\x20'+_0x850af1[_0x2323ad(0x138)]+'.\x20Only\x20child\x20segments\x20can\x20be\x20updated.'),console['error'](_0x2323ad(0x136)),0x1;if(!_0x850af1[_0x2323ad(0x137)])throw new SDKError(ErrorCode['INTERNAL'],'Segment\x20ID\x20missing\x20from\x20resolved\x20path');const _0xd917e0=_0x850af1[_0x2323ad(0x141)],_0x5166c7=_0x850af1['segmentId'];_0x4715b7[_0x2323ad(0x142)]&&(console[_0x2323ad(0x14f)](_0x2323ad(0x153)+_0xd917e0),console[_0x2323ad(0x14f)](_0x2323ad(0x140)+_0x5166c7));let _0x2c5cf0;if(_0x4715b7['folder']){const _0x245b76=_0x4715b7[_0x2323ad(0x15d)],_0x45ecdc=await withSpinner(_0x2323ad(0x14e)+_0x245b76+_0x2323ad(0x157),()=>_0x428484[_0x2323ad(0x14d)][_0x2323ad(0x131)](_0xd917e0,_0x245b76),{'verbose':_0x4715b7['verbose']});_0x2c5cf0=parseInt(_0x45ecdc['data'],0xa),_0x4715b7[_0x2323ad(0x142)]&&console[_0x2323ad(0x14f)](_0x2323ad(0x149)+_0x2c5cf0);}const _0x55750e=await loadJSONFromOptions(_0x4715b7[_0x2323ad(0x154)],_0x4715b7[_0x2323ad(0x132)]),_0xf7737={'name':_0x4715b7[_0x2323ad(0x13b)],'description':_0x4715b7[_0x2323ad(0x158)],'rule':_0x55750e,'kind':_0x4715b7[_0x2323ad(0x160)]!==undefined?parseInt(_0x4715b7[_0x2323ad(0x160)],0xa):undefined,'segmentFolderId':_0x2c5cf0},_0x2fb761=await withSpinner(_0x2323ad(0x13a)+_0x850af1[_0x2323ad(0x15e)]+_0x2323ad(0x157),()=>_0x428484[_0x2323ad(0x14d)][_0x2323ad(0x135)](_0xd917e0,_0x5166c7,_0xf7737),{'verbose':_0x4715b7['verbose']}),_0x530a11=_0x2fb761[_0x2323ad(0x146)];return console['error'](_0x2323ad(0x13d)+_0x530a11[_0x2323ad(0x13b)]+'\x27'),_0x5f57f8!==_0x136f23&&console[_0x2323ad(0x14f)](_0x2323ad(0x14c)+_0x5f57f8),await handleSDKOutput([_0x530a11],_0x4715b7),0x0;}}
1
+ const a27_0x345b10=a27_0x1e3d;(function(_0x13622e,_0x5d642a){const _0x50b126=a27_0x1e3d,_0x57fb90=_0x13622e();while(!![]){try{const _0x334027=-parseInt(_0x50b126(0xd7))/0x1+-parseInt(_0x50b126(0xe5))/0x2+-parseInt(_0x50b126(0xd5))/0x3+-parseInt(_0x50b126(0xe3))/0x4+-parseInt(_0x50b126(0xef))/0x5*(parseInt(_0x50b126(0xdb))/0x6)+-parseInt(_0x50b126(0xf3))/0x7+parseInt(_0x50b126(0xf4))/0x8*(parseInt(_0x50b126(0xd4))/0x9);if(_0x334027===_0x5d642a)break;else _0x57fb90['push'](_0x57fb90['shift']());}catch(_0x56136d){_0x57fb90['push'](_0x57fb90['shift']());}}}(a27_0xdfb6,0xabbec));function a27_0x1e3d(_0xb737ff,_0x526a3){const _0xdfb60=a27_0xdfb6();return a27_0x1e3d=function(_0x1e3da8,_0x5038bc){_0x1e3da8=_0x1e3da8-0xcb;let _0x14ce1d=_0xdfb60[_0x1e3da8];return _0x14ce1d;},a27_0x1e3d(_0xb737ff,_0x526a3);}import{BaseCommand}from'./command.js';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{['name']=a27_0x345b10(0xea);[a27_0x345b10(0xf9)]=a27_0x345b10(0xcf);async[a27_0x345b10(0xe9)](_0x4799b8){const _0x175041=a27_0x345b10,{options:_0x1070cf,args:_0x1d5952,tdx:_0x6c8303}=_0x4799b8,_0x23c0b=_0x1070cf;if(_0x1d5952[_0x175041(0xfc)]===0x0)return console[_0x175041(0xd3)]('Error:\x20Segment\x20path\x20or\x20name\x20is\x20required'),console[_0x175041(0xd3)](_0x175041(0xf8)),console['error'](_0x175041(0xde)),console[_0x175041(0xd3)](_0x175041(0xdf)),console[_0x175041(0xd3)](_0x175041(0xf2)),0x1;const _0x111915=_0x1d5952[0x0],_0x14b051=_0x1070cf[_0x175041(0xda)];let _0x75d171=_0x111915;_0x14b051&&!_0x111915[_0x175041(0xe6)]('/')&&(_0x75d171=_0x14b051+'/'+_0x111915,_0x23c0b[_0x175041(0xdd)]&&console[_0x175041(0xd3)](_0x175041(0xd6)+_0x75d171));const _0x3516d9=await withSpinner(_0x175041(0xf0)+_0x75d171+_0x175041(0xe1),()=>_0x6c8303['segment'][_0x175041(0xce)](_0x75d171),{'verbose':_0x23c0b[_0x175041(0xdd)]}),_0x5a85d6=_0x3516d9['data'];_0x23c0b[_0x175041(0xdd)]&&console[_0x175041(0xd3)](_0x175041(0xcb)+_0x5a85d6[_0x175041(0xf7)]);if(_0x5a85d6[_0x175041(0xf7)]!=='segment')return console['error'](_0x175041(0xd0)+_0x5a85d6['type']+_0x175041(0xe0)),console[_0x175041(0xd3)](_0x175041(0xf1)),0x1;if(!_0x5a85d6[_0x175041(0xcc)])throw new SDKError(ErrorCode[_0x175041(0xd9)],_0x175041(0xf6));const _0x2cdad6=_0x5a85d6['parentId'],_0x4903de=_0x5a85d6[_0x175041(0xcc)];_0x23c0b['verbose']&&(console[_0x175041(0xd3)](_0x175041(0xdc)+_0x2cdad6),console[_0x175041(0xd3)](_0x175041(0xed)+_0x4903de));let _0x4ce3e9;if(_0x23c0b['folder']){const _0x2497dd=_0x23c0b[_0x175041(0xd8)],_0x3212cd=await withSpinner(_0x175041(0xf5)+_0x2497dd+_0x175041(0xe1),()=>_0x6c8303[_0x175041(0xfa)][_0x175041(0xe8)](_0x2cdad6,_0x2497dd),{'verbose':_0x23c0b[_0x175041(0xdd)]});_0x4ce3e9=parseInt(_0x3212cd[_0x175041(0xfb)],0xa),_0x23c0b[_0x175041(0xdd)]&&console[_0x175041(0xd3)](_0x175041(0xeb)+_0x4ce3e9);}const _0x3654f0=await loadJSONFromOptions(_0x23c0b[_0x175041(0xe7)],_0x23c0b['ruleFile']),_0x1ca825={'name':_0x23c0b[_0x175041(0xec)],'description':_0x23c0b[_0x175041(0xf9)],'rule':_0x3654f0,'kind':_0x23c0b[_0x175041(0xd1)]!==undefined?parseInt(_0x23c0b['kind'],0xa):undefined,'segmentFolderId':_0x4ce3e9},_0x2273a8=await withSpinner(_0x175041(0xe4)+_0x5a85d6[_0x175041(0xee)]+_0x175041(0xe1),()=>_0x6c8303['segment'][_0x175041(0xd2)](_0x2cdad6,_0x4903de,_0x1ca825),{'verbose':_0x23c0b[_0x175041(0xdd)]}),_0x5331de=_0x2273a8[_0x175041(0xfb)];return console['error'](_0x175041(0xe2)+_0x5331de['name']+'\x27'),_0x75d171!==_0x111915&&console[_0x175041(0xd3)](_0x175041(0xcd)+_0x75d171),await handleSDKOutput([_0x5331de],_0x23c0b),0x0;}}function a27_0xdfb6(){const _0x5679a5=['updateSegmentById','error','117aSPTVA','2912157ZLCWUn','Resolved\x20relative\x20path\x20to:\x20','778631cWgTrI','folder','INTERNAL','segmentPath','1848IrKWgW','Parent\x20ID:\x20','verbose','Examples:','\x20\x20tdx\x20segment\x20update\x20\x22My\x20Audience/High\x20Value\x22\x20--description\x20\x22...\x22','.\x20Only\x20child\x20segments\x20can\x20be\x20updated.','\x27...','✔\x20Updated\x20segment\x20\x27','1958012JkGikq','Updating\x20segment\x20\x27','702246SIWCFy','includes','rule','resolveFolderId','execute','segment:update','Resolved\x20folder\x20ID:\x20','name','Segment\x20ID:\x20','segmentName','12785GdHrbP','Resolving\x20path\x20\x27','Use:\x20tdx\x20segment\x20update\x20<path_to_segment>\x20[options]','\x20\x20tdx\x20segment\x20update\x20\x22High\x20Value\x22\x20--rule\x20\x27...\x27\x20\x20#\x20Relative\x20to\x20context','1409583oEEotX','2635304RWuFgI','Resolving\x20folder\x20\x27','Segment\x20ID\x20missing\x20from\x20resolved\x20path','type','Usage:\x20tdx\x20segment\x20update\x20<path>\x20[options]','description','segment','data','length','Resolved\x20type:\x20','segmentId','\x20\x20\x20Path:\x20','resolvePathToResource','Update\x20existing\x20child\x20segment','Error:\x20Cannot\x20update\x20','kind'];a27_0xdfb6=function(){return _0x5679a5;};return a27_0xdfb6();}
@@ -1 +1 @@
1
- const a28_0x569401=a28_0xe759;(function(_0x44679e,_0x14b229){const _0xc83485=a28_0xe759,_0x501226=_0x44679e();while(!![]){try{const _0x557416=parseInt(_0xc83485(0x1cb))/0x1*(-parseInt(_0xc83485(0x1e7))/0x2)+parseInt(_0xc83485(0x1be))/0x3*(parseInt(_0xc83485(0x1ed))/0x4)+-parseInt(_0xc83485(0x1eb))/0x5*(-parseInt(_0xc83485(0x1e1))/0x6)+-parseInt(_0xc83485(0x1d7))/0x7+parseInt(_0xc83485(0x1d5))/0x8+-parseInt(_0xc83485(0x1cd))/0x9+-parseInt(_0xc83485(0x1d1))/0xa*(-parseInt(_0xc83485(0x1db))/0xb);if(_0x557416===_0x14b229)break;else _0x501226['push'](_0x501226['shift']());}catch(_0x5e64fb){_0x501226['push'](_0x501226['shift']());}}}(a28_0x3800,0xd3ee6));import{BaseCommand}from'./command.js';function a28_0xe759(_0x3c592a,_0xa7d8db){const _0x380075=a28_0x3800();return a28_0xe759=function(_0xe7592b,_0xf820c){_0xe7592b=_0xe7592b-0x1bb;let _0x48e269=_0x380075[_0xe7592b];return _0x48e269;},a28_0xe759(_0x3c592a,_0xa7d8db);}import{saveSessionContext}from'../core/session.js';import{withSpinner}from'../utils/spinner.js';import{parsePath,normalizePath}from'../utils/segment-path-parser.js';function a28_0x3800(){const _0x47532a=['Context\x20cleared.\x20Back\x20to\x20root.','folderPath','2415960fNrYSi','segment','8017758fjpITF','Parent\x20ID:\x20','data','Context\x20can\x20only\x20be\x20set\x20to\x20a\x20parent\x20segment\x20or\x20folder.','11XiqpEf','Use\x20\x22tdx\x20context\x22\x20to\x20see\x20all\x20context\x20parameters','Use\x20\x22tdx\x20segment\x20pwd\x22\x20to\x20show\x20current\x20context','join','fullPath','Use\x20an\x20absolute\x20path\x20or\x20set\x20context\x20with:\x20tdx\x20segment\x20use\x20<parent_name>','3022902WBEhAF','folderId','parentName','segmentPath','Target\x20path:\x20','Set\x20current\x20segment/folder\x20context\x20for\x20navigation','17642qUTpBJ','\x20\x20tdx\x20segment\x20use\x20/\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Clear\x20context','resolvePathToResource','\x20\x20tdx\x20segment\x20use\x20\x22My\x20Audience/Marketing\x22','5BfcXJR','split','4SKWBsS','isAbsolute','error','execute','273342gehLNb','Use:\x20tdx\x20segment\x20use\x20','Resolving\x20path\x20\x27','length','Use\x20\x22tdx\x20segments\x22\x20to\x20list\x20contents\x20in\x20this\x20context','session','Error:\x20Cannot\x20set\x20context\x20to\x20a\x20segment.','\x27...','description','Site:\x20','Context\x20set\x20to:\x20','log','segment:use','53irlUvL','name','9452295MdJpmf','verbose','\x20\x20tdx\x20segment\x20use\x20..\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Go\x20to\x20parent','Examples:','26343060usqbGi','Error:\x20No\x20context\x20set.\x20Cannot\x20use\x20relative\x20path.'];a28_0x3800=function(){return _0x47532a;};return a28_0x3800();}export class SegmentUseCommand extends BaseCommand{[a28_0x569401(0x1cc)]=a28_0x569401(0x1ca);[a28_0x569401(0x1c6)]=a28_0x569401(0x1e6);async[a28_0x569401(0x1bd)](_0x2e40a5){const _0x14d11c=a28_0x569401,{options:_0x583ff1,args:_0x35b85d,tdx:_0x3a9d83}=_0x2e40a5;if(_0x35b85d[_0x14d11c(0x1c1)]===0x0)return console['error']('Error:\x20Path\x20is\x20required'),console[_0x14d11c(0x1bc)]('Usage:\x20tdx\x20segment\x20use\x20<path>'),console[_0x14d11c(0x1bc)](_0x14d11c(0x1d0)),console[_0x14d11c(0x1bc)]('\x20\x20tdx\x20segment\x20use\x20\x22My\x20Audience\x22'),console[_0x14d11c(0x1bc)](_0x14d11c(0x1ea)),console['error'](_0x14d11c(0x1e8)),console[_0x14d11c(0x1bc)](_0x14d11c(0x1cf)),0x1;const _0x1de7a8=_0x35b85d[0x0],_0xedc921=_0x583ff1[_0x14d11c(0x1c3)];try{if(_0x1de7a8==='/')return saveSessionContext({'segment_path':undefined},_0xedc921),console['log']('Context\x20cleared.\x20Back\x20to\x20root.'),0x0;const _0x2bdc7f=_0x583ff1[_0x14d11c(0x1e4)];let _0x30b05d=_0x1de7a8;const _0x80eac0=parsePath(_0x1de7a8);if(!_0x80eac0[_0x14d11c(0x1bb)]){if(!_0x2bdc7f)return console[_0x14d11c(0x1bc)](_0x14d11c(0x1d2)),console[_0x14d11c(0x1bc)](_0x14d11c(0x1e0)),0x1;if(_0x1de7a8==='..'){const _0xc8f93c=_0x2bdc7f[_0x14d11c(0x1ec)]('/')['slice'](0x0,-0x1)[_0x14d11c(0x1de)]('/');_0x30b05d=_0xc8f93c||'/';}else _0x1de7a8==='.'?_0x30b05d=_0x2bdc7f:_0x30b05d=_0x2bdc7f+'/'+_0x1de7a8;_0x583ff1[_0x14d11c(0x1ce)]&&console['error']('Resolved\x20relative\x20path\x20to:\x20'+_0x30b05d);}if(_0x30b05d==='/'||_0x30b05d==='')return saveSessionContext({'segment_path':undefined},_0xedc921),console[_0x14d11c(0x1c9)](_0x14d11c(0x1d3)),0x0;_0x30b05d=normalizePath(_0x30b05d);const _0x543aed=parsePath(_0x30b05d)['segments'];if(_0x543aed[_0x14d11c(0x1c1)]===0x0)return saveSessionContext({'segment_path':undefined},_0xedc921),console[_0x14d11c(0x1c9)](_0x14d11c(0x1d3)),0x0;_0x583ff1[_0x14d11c(0x1ce)]&&(console[_0x14d11c(0x1bc)](_0x14d11c(0x1c7)+_0x583ff1['site']),console['error'](_0x14d11c(0x1e5)+_0x30b05d));const _0x1b164e=await withSpinner(_0x14d11c(0x1c0)+_0x30b05d+_0x14d11c(0x1c5),()=>_0x3a9d83[_0x14d11c(0x1d6)][_0x14d11c(0x1e9)](_0x30b05d),{'verbose':_0x583ff1[_0x14d11c(0x1ce)]}),_0x42a4af=_0x1b164e[_0x14d11c(0x1d9)];_0x583ff1[_0x14d11c(0x1ce)]&&(console[_0x14d11c(0x1bc)]('Resolved\x20path\x20type:\x20'+_0x42a4af['type']),console[_0x14d11c(0x1bc)](_0x14d11c(0x1d8)+_0x42a4af['parentId']),_0x42a4af[_0x14d11c(0x1e2)]&&console[_0x14d11c(0x1bc)]('Folder\x20ID:\x20'+_0x42a4af[_0x14d11c(0x1e2)]));if(_0x42a4af['type']===_0x14d11c(0x1d6))return console[_0x14d11c(0x1bc)](_0x14d11c(0x1c4)),console[_0x14d11c(0x1bc)](_0x14d11c(0x1da)),console[_0x14d11c(0x1bc)](_0x14d11c(0x1bf)+_0x42a4af[_0x14d11c(0x1e3)]+(_0x42a4af[_0x14d11c(0x1d4)]?'/'+_0x42a4af[_0x14d11c(0x1d4)][_0x14d11c(0x1de)]('/'):'')),0x1;return saveSessionContext({'segment_path':_0x42a4af[_0x14d11c(0x1df)],'parent_segment':_0x42a4af[_0x14d11c(0x1e3)]},_0xedc921),console[_0x14d11c(0x1c9)](_0x14d11c(0x1c8)+_0x42a4af[_0x14d11c(0x1df)]),_0x583ff1['verbose']&&(console[_0x14d11c(0x1bc)](_0x14d11c(0x1c2)),console[_0x14d11c(0x1bc)](_0x14d11c(0x1dd)),console[_0x14d11c(0x1bc)](_0x14d11c(0x1dc))),0x0;}catch(_0x147880){throw _0x147880;}}}
1
+ const a28_0x434dc4=a28_0x37f1;(function(_0x12274b,_0x3981f1){const _0x489874=a28_0x37f1,_0x47ada6=_0x12274b();while(!![]){try{const _0x42c5c0=-parseInt(_0x489874(0x78))/0x1*(-parseInt(_0x489874(0x95))/0x2)+parseInt(_0x489874(0x83))/0x3*(parseInt(_0x489874(0x72))/0x4)+parseInt(_0x489874(0x67))/0x5+parseInt(_0x489874(0x68))/0x6*(parseInt(_0x489874(0x6e))/0x7)+parseInt(_0x489874(0x71))/0x8*(parseInt(_0x489874(0x80))/0x9)+parseInt(_0x489874(0x69))/0xa*(-parseInt(_0x489874(0x66))/0xb)+parseInt(_0x489874(0x94))/0xc*(-parseInt(_0x489874(0x86))/0xd);if(_0x42c5c0===_0x3981f1)break;else _0x47ada6['push'](_0x47ada6['shift']());}catch(_0x462f70){_0x47ada6['push'](_0x47ada6['shift']());}}}(a28_0x4b49,0xc423e));function a28_0x37f1(_0x55ff9e,_0x3a5d67){const _0x4b49e8=a28_0x4b49();return a28_0x37f1=function(_0x37f195,_0x4d6615){_0x37f195=_0x37f195-0x64;let _0x218158=_0x4b49e8[_0x37f195];return _0x218158;},a28_0x37f1(_0x55ff9e,_0x3a5d67);}import{BaseCommand}from'./command.js';import{saveSessionContext}from'../core/session.js';import{withSpinner}from'../utils/spinner.js';import{parsePath,normalizePath}from'../utils/segment-path-parser.js';export class SegmentUseCommand extends BaseCommand{['name']=a28_0x434dc4(0x6f);[a28_0x434dc4(0x99)]=a28_0x434dc4(0x8d);async[a28_0x434dc4(0x85)](_0x48ec6b){const _0x1d2301=a28_0x434dc4,{options:_0x465a27,args:_0x340f00,tdx:_0x252539}=_0x48ec6b;if(_0x340f00[_0x1d2301(0x65)]===0x0)return console[_0x1d2301(0x93)](_0x1d2301(0x7b)),console['error'](_0x1d2301(0x7a)),console['error']('Examples:'),console[_0x1d2301(0x93)](_0x1d2301(0x70)),console[_0x1d2301(0x93)](_0x1d2301(0x89)),console[_0x1d2301(0x93)](_0x1d2301(0x7d)),console[_0x1d2301(0x93)](_0x1d2301(0x8c)),0x1;const _0x3bf99f=_0x340f00[0x0],_0x3ab212=_0x465a27['session'];try{if(_0x3bf99f==='/')return saveSessionContext({'segment_path':undefined},_0x3ab212),console[_0x1d2301(0x6d)](_0x1d2301(0x97)),0x0;const _0x13de47=_0x465a27[_0x1d2301(0x76)];let _0x5dfec1=_0x3bf99f;const _0x45e030=parsePath(_0x3bf99f);if(!_0x45e030[_0x1d2301(0x88)]){if(!_0x13de47)return console[_0x1d2301(0x93)](_0x1d2301(0x77)),console[_0x1d2301(0x93)](_0x1d2301(0x8b)),0x1;if(_0x3bf99f==='..'){const _0x4ab308=_0x13de47[_0x1d2301(0x6b)]('/')[_0x1d2301(0x8a)](0x0,-0x1)[_0x1d2301(0x91)]('/');_0x5dfec1=_0x4ab308||'/';}else _0x3bf99f==='.'?_0x5dfec1=_0x13de47:_0x5dfec1=_0x13de47+'/'+_0x3bf99f;_0x465a27[_0x1d2301(0x92)]&&console[_0x1d2301(0x93)](_0x1d2301(0x90)+_0x5dfec1);}if(_0x5dfec1==='/'||_0x5dfec1==='')return saveSessionContext({'segment_path':undefined},_0x3ab212),console[_0x1d2301(0x6d)](_0x1d2301(0x97)),0x0;_0x5dfec1=normalizePath(_0x5dfec1);const _0x3b4988=parsePath(_0x5dfec1)['segments'];if(_0x3b4988['length']===0x0)return saveSessionContext({'segment_path':undefined},_0x3ab212),console['log'](_0x1d2301(0x97)),0x0;_0x465a27[_0x1d2301(0x92)]&&(console[_0x1d2301(0x93)]('Site:\x20'+_0x465a27[_0x1d2301(0x7c)]),console[_0x1d2301(0x93)](_0x1d2301(0x84)+_0x5dfec1));const _0x48fd53=await withSpinner(_0x1d2301(0x7e)+_0x5dfec1+_0x1d2301(0x8e),()=>_0x252539[_0x1d2301(0x79)][_0x1d2301(0x82)](_0x5dfec1),{'verbose':_0x465a27[_0x1d2301(0x92)]}),_0x37ef4f=_0x48fd53['data'];_0x465a27[_0x1d2301(0x92)]&&(console[_0x1d2301(0x93)](_0x1d2301(0x98)+_0x37ef4f['type']),console['error'](_0x1d2301(0x74)+_0x37ef4f['parentId']),_0x37ef4f[_0x1d2301(0x87)]&&console[_0x1d2301(0x93)]('Folder\x20ID:\x20'+_0x37ef4f[_0x1d2301(0x87)]));if(_0x37ef4f[_0x1d2301(0x8f)]===_0x1d2301(0x79))return console[_0x1d2301(0x93)](_0x1d2301(0x64)),console[_0x1d2301(0x93)]('Context\x20can\x20only\x20be\x20set\x20to\x20a\x20parent\x20segment\x20or\x20folder.'),console[_0x1d2301(0x93)](_0x1d2301(0x73)+_0x37ef4f['parentName']+(_0x37ef4f['folderPath']?'/'+_0x37ef4f[_0x1d2301(0x6a)][_0x1d2301(0x91)]('/'):'')),0x1;return saveSessionContext({'segment_path':_0x37ef4f[_0x1d2301(0x81)],'parent_segment':_0x37ef4f[_0x1d2301(0x75)]},_0x3ab212),console[_0x1d2301(0x6d)](_0x1d2301(0x96)+_0x37ef4f[_0x1d2301(0x81)]),_0x465a27[_0x1d2301(0x92)]&&(console['error']('Use\x20\x22tdx\x20segments\x22\x20to\x20list\x20contents\x20in\x20this\x20context'),console['error'](_0x1d2301(0x6c)),console['error'](_0x1d2301(0x7f))),0x0;}catch(_0x50f782){throw _0x50f782;}}}function a28_0x4b49(){const _0xfd9084=['11035277iVhBSG','6479280mlGYGf','6gdGaXo','10MjOHOH','folderPath','split','Use\x20\x22tdx\x20segment\x20pwd\x22\x20to\x20show\x20current\x20context','log','4081609TBQGTb','segment:use','\x20\x20tdx\x20segment\x20use\x20\x22My\x20Audience\x22','16PiRNzy','4OnxqfW','Use:\x20tdx\x20segment\x20use\x20','Parent\x20ID:\x20','parentName','segmentPath','Error:\x20No\x20context\x20set.\x20Cannot\x20use\x20relative\x20path.','668611AuQaCU','segment','Usage:\x20tdx\x20segment\x20use\x20<path>','Error:\x20Path\x20is\x20required','site','\x20\x20tdx\x20segment\x20use\x20/\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Clear\x20context','Resolving\x20path\x20\x27','Use\x20\x22tdx\x20context\x22\x20to\x20see\x20all\x20context\x20parameters','2778129HnNAQM','fullPath','resolvePathToResource','1427577JKcRQV','Target\x20path:\x20','execute','23844314irBRwC','folderId','isAbsolute','\x20\x20tdx\x20segment\x20use\x20\x22My\x20Audience/Marketing\x22','slice','Use\x20an\x20absolute\x20path\x20or\x20set\x20context\x20with:\x20tdx\x20segment\x20use\x20<parent_name>','\x20\x20tdx\x20segment\x20use\x20..\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Go\x20to\x20parent','Set\x20current\x20segment/folder\x20context\x20for\x20navigation','\x27...','type','Resolved\x20relative\x20path\x20to:\x20','join','verbose','error','12PGbmuB','2ytyaNg','Context\x20set\x20to:\x20','Context\x20cleared.\x20Back\x20to\x20root.','Resolved\x20path\x20type:\x20','description','Error:\x20Cannot\x20set\x20context\x20to\x20a\x20segment.','length'];a28_0x4b49=function(){return _0xfd9084;};return a28_0x4b49();}
@@ -1 +1 @@
1
- function a29_0x1af6(){const _0x320010=['40loEfYh','No\x20parent\x20segments\x20match\x20pattern:\x20','Clear\x20context\x20with:\x20tdx\x20segment\x20use\x20/','error','includes','format','Building\x20hierarchy\x20tree...','13840ipEydz','39565920rnsWqF','segment','(empty)','execute','288039yGqTis','population','\x20matching\x20\x27','\x20folder','sort','folderId','Error:\x20Pattern\x20matching\x20is\x20only\x20supported\x20at\x20root\x20level\x20(no\x20context\x20set).','\x20segment','jsonl','log','Parent\x20ID:\x20','name','maxDepth','✔\x20Built\x20tree\x20with\x20','300jpPpIi','listRecursive','cause','3615405zUVmvD','1476QaIjyp','Folder\x20ID:\x20','verbose','\x20and\x20','localeCompare','folder','Listing\x20parent\x20segments...','\x5c$&','Recursive\x20mode:\x20enabled','listParents','Site:\x20','data','Current\x20context:\x20','replace','[parent\x20segments]','30RLfyHH','Resolving\x20context\x20path\x20\x27','filter','329989EgNtXP','\x20\x20Cause:\x20','Listing\x20folders\x20and\x20segments...','test','Path/pattern\x20arg:\x20','✔\x20Found\x20','length','\x20parent\x20segment','site','listParentsWithPattern','resolvePathToResource','parentId','json','message','919dvlkcX','Listing\x20parent\x20segments\x20matching\x20\x27','description','\x27...','attributes','map','listUnified','1674281DjKmYj','70AFulzU','👥\x20','segments','List\x20parent\x20segments,\x20folders,\x20and\x20child\x20segments','recursive','dim'];a29_0x1af6=function(){return _0x320010;};return a29_0x1af6();}const a29_0x4166a1=a29_0x3ffe;(function(_0x429873,_0x1af4b0){const _0xa1fdc5=a29_0x3ffe,_0x3babee=_0x429873();while(!![]){try{const _0x3748db=parseInt(_0xa1fdc5(0x126))/0x1*(parseInt(_0xa1fdc5(0x102))/0x2)+-parseInt(_0xa1fdc5(0xf4))/0x3*(parseInt(_0xa1fdc5(0xe8))/0x4)+-parseInt(_0xa1fdc5(0x105))/0x5+parseInt(_0xa1fdc5(0x115))/0x6*(-parseInt(_0xa1fdc5(0x12d))/0x7)+-parseInt(_0xa1fdc5(0xef))/0x8*(-parseInt(_0xa1fdc5(0x106))/0x9)+-parseInt(_0xa1fdc5(0x12e))/0xa*(parseInt(_0xa1fdc5(0x118))/0xb)+parseInt(_0xa1fdc5(0xf0))/0xc;if(_0x3748db===_0x1af4b0)break;else _0x3babee['push'](_0x3babee['shift']());}catch(_0x1fb14d){_0x3babee['push'](_0x3babee['shift']());}}}(a29_0x1af6,0x99b6b));import{BaseCommand}from'./command.js';function a29_0x3ffe(_0x9d6062,_0x3b46e3){const _0x1af65a=a29_0x1af6();return a29_0x3ffe=function(_0x3ffe6a,_0x37cbb){_0x3ffe6a=_0x3ffe6a-0xe5;let _0x160dc6=_0x1af65a[_0x3ffe6a];return _0x160dc6;},a29_0x3ffe(_0x9d6062,_0x3b46e3);}import{SDKError}from'../sdk/index.js';import{handleSDKOutput}from'../utils/command-output.js';import{withSpinner}from'../utils/spinner.js';import{formatFlatList,formatTree}from'../utils/tree-formatter.js';import{formatRows}from'../utils/formatters.js';import a29_0x119a9c from'chalk';export class SegmentsCommand extends BaseCommand{[a29_0x4166a1(0xff)]=a29_0x4166a1(0x130);[a29_0x4166a1(0x128)]=a29_0x4166a1(0xe5);async[a29_0x4166a1(0xf3)](_0x306c98){const _0xffb84a=a29_0x4166a1,{options:_0x9082af,args:_0x40d818}=_0x306c98,_0xb67c75=_0x9082af[_0xffb84a(0xe6)],_0x14c4da=_0x40d818[0x0];try{const _0x594a27=_0x9082af['segmentPath'];_0x9082af[_0xffb84a(0x108)]&&(console[_0xffb84a(0xeb)](_0xffb84a(0x110)+_0x9082af[_0xffb84a(0x120)]),console['error'](_0xffb84a(0x112)+(_0x594a27||'/')),_0x14c4da&&console[_0xffb84a(0xeb)](_0xffb84a(0x11c)+_0x14c4da),_0xb67c75&&console[_0xffb84a(0xeb)](_0xffb84a(0x10e)));if(_0x14c4da){const _0x101bac=_0x14c4da[_0xffb84a(0xec)]('*')||_0x14c4da[_0xffb84a(0xec)]('?');if(_0x101bac&&!_0x594a27)return await this[_0xffb84a(0x121)](_0x306c98,_0x14c4da);else return _0x101bac?(console[_0xffb84a(0xeb)](_0xffb84a(0xfa)),console['error'](_0xffb84a(0xea)),0x1):_0xb67c75?await this[_0xffb84a(0x103)](_0x306c98,_0x14c4da):await this['listUnified'](_0x306c98,_0x14c4da);}if(!_0x594a27)return await this[_0xffb84a(0x10f)](_0x306c98);return _0xb67c75?await this[_0xffb84a(0x103)](_0x306c98,_0x594a27):await this[_0xffb84a(0x12c)](_0x306c98,_0x594a27);}catch(_0x107f54){if(_0x107f54 instanceof SDKError)return console[_0xffb84a(0xeb)]('Error:\x20'+_0x107f54[_0xffb84a(0x125)]),_0x107f54[_0xffb84a(0x104)]&&console[_0xffb84a(0xeb)](_0xffb84a(0x119)+_0x107f54[_0xffb84a(0x104)]),0x1;throw _0x107f54;}}async[a29_0x4166a1(0x121)](_0x29534e,_0x5aefa9){const _0x5034de=a29_0x4166a1,{options:_0x4a7d8a,tdx:_0x10c439}=_0x29534e,_0x54992b=await withSpinner(_0x5034de(0x127)+_0x5aefa9+_0x5034de(0x129),()=>_0x10c439[_0x5034de(0xf1)][_0x5034de(0x10f)](),{'verbose':_0x4a7d8a['verbose']}),_0x2e1c34=_0x54992b['data'],_0x2fb4f7=_0x5aefa9[_0x5034de(0x113)](/[.+^${}()|[\]\\]/g,_0x5034de(0x10d))[_0x5034de(0x113)](/\*/g,'.*')[_0x5034de(0x113)](/\?/g,'.'),_0x2a6b46=new RegExp('^'+_0x2fb4f7+'$','i'),_0x4712c1=_0x2e1c34[_0x5034de(0x117)](_0x97f28f=>_0x2a6b46[_0x5034de(0x11b)](_0x97f28f[_0x5034de(0x12a)][_0x5034de(0xff)]));console['error'](_0x5034de(0x11d)+_0x4712c1[_0x5034de(0x11e)]+_0x5034de(0x11f)+(_0x4712c1[_0x5034de(0x11e)]!==0x1?'s':'')+_0x5034de(0xf6)+_0x5aefa9+'\x27');if(_0x4a7d8a['format']===_0x5034de(0x124)||_0x4a7d8a[_0x5034de(0xed)]===_0x5034de(0xfc))await handleSDKOutput(_0x4712c1,_0x4a7d8a);else{if(_0x4712c1['length']===0x0)console['log'](_0x5034de(0xe9)+_0x5aefa9);else{console[_0x5034de(0xfd)](_0x5034de(0x114));for(const _0x228e65 of _0x4712c1){const _0x2e50c1=_0x228e65['attributes'][_0x5034de(0xf5)]?a29_0x119a9c[_0x5034de(0xe7)]('\x20('+formatRows(_0x228e65[_0x5034de(0x12a)]['population'])+')'):'';console['log'](_0x5034de(0x12f)+_0x228e65[_0x5034de(0x12a)][_0x5034de(0xff)]+_0x2e50c1);}}}return 0x0;}async[a29_0x4166a1(0x10f)](_0x46f627){const _0x4ed81f=a29_0x4166a1,{options:_0x498f1d,tdx:_0x14234b}=_0x46f627,_0x13da2a=await withSpinner(_0x4ed81f(0x10c),()=>_0x14234b[_0x4ed81f(0xf1)][_0x4ed81f(0x10f)](),{'verbose':_0x498f1d[_0x4ed81f(0x108)]}),_0x5053cd=_0x13da2a['data'];console[_0x4ed81f(0xeb)](_0x4ed81f(0x11d)+_0x5053cd[_0x4ed81f(0x11e)]+'\x20parent\x20segment'+(_0x5053cd[_0x4ed81f(0x11e)]!==0x1?'s':''));if(_0x498f1d[_0x4ed81f(0xed)]==='json'||_0x498f1d[_0x4ed81f(0xed)]==='jsonl')await handleSDKOutput(_0x5053cd,_0x498f1d);else{console['log'](_0x4ed81f(0x114));for(const _0x2f8c95 of _0x5053cd){const _0x3cdc8d=_0x2f8c95[_0x4ed81f(0x12a)][_0x4ed81f(0xf5)]?a29_0x119a9c[_0x4ed81f(0xe7)]('\x20('+formatRows(_0x2f8c95[_0x4ed81f(0x12a)][_0x4ed81f(0xf5)])+')'):'';console[_0x4ed81f(0xfd)](_0x4ed81f(0x12f)+_0x2f8c95[_0x4ed81f(0x12a)][_0x4ed81f(0xff)]+_0x3cdc8d);}}return 0x0;}async[a29_0x4166a1(0x12c)](_0x35d4b6,_0x3bbea8){const _0x3727ed=a29_0x4166a1,{options:_0x6d7a5d,tdx:_0x38ab0c}=_0x35d4b6,_0x560637=await withSpinner(_0x3727ed(0x116)+_0x3bbea8+_0x3727ed(0x129),()=>_0x38ab0c['segment'][_0x3727ed(0x122)](_0x3bbea8),{'verbose':_0x6d7a5d['verbose']}),_0x53741a=_0x560637[_0x3727ed(0x111)];_0x6d7a5d[_0x3727ed(0x108)]&&(console[_0x3727ed(0xeb)](_0x3727ed(0xfe)+_0x53741a['parentId']),_0x53741a[_0x3727ed(0xf9)]&&console[_0x3727ed(0xeb)]('Folder\x20ID:\x20'+_0x53741a[_0x3727ed(0xf9)]));const _0x26ba48=await withSpinner(_0x3727ed(0x11a),()=>_0x38ab0c[_0x3727ed(0xf1)][_0x3727ed(0x12c)](_0x53741a['parentId'],_0x53741a['folderId']),{'verbose':_0x6d7a5d[_0x3727ed(0x108)]}),{folders:_0x3069a8,segments:_0x93e8e8}=_0x26ba48[_0x3727ed(0x111)],_0x152ecf=_0x3069a8[_0x3727ed(0x11e)]+_0x93e8e8[_0x3727ed(0x11e)];console['error'](_0x3727ed(0x11d)+_0x3069a8[_0x3727ed(0x11e)]+_0x3727ed(0xf7)+(_0x3069a8[_0x3727ed(0x11e)]!==0x1?'s':'')+_0x3727ed(0x109)+_0x93e8e8[_0x3727ed(0x11e)]+_0x3727ed(0xfb)+(_0x93e8e8['length']!==0x1?'s':''));if(_0x6d7a5d[_0x3727ed(0xed)]==='json'||_0x6d7a5d[_0x3727ed(0xed)]==='jsonl'){const _0x222e99=[..._0x3069a8[_0x3727ed(0x12b)](_0x5d0955=>({..._0x5d0955,'type':_0x3727ed(0x10b)})),..._0x93e8e8[_0x3727ed(0x12b)](_0x5be29e=>({..._0x5be29e,'type':_0x3727ed(0xf1)}))][_0x3727ed(0xf8)]((_0x347301,_0x179541)=>_0x347301[_0x3727ed(0xff)][_0x3727ed(0x10a)](_0x179541[_0x3727ed(0xff)]));await handleSDKOutput(_0x222e99,_0x6d7a5d);}else{if(_0x152ecf===0x0)console[_0x3727ed(0xfd)](a29_0x119a9c[_0x3727ed(0xe7)]('[/'+_0x3bbea8+']')),console[_0x3727ed(0xfd)](_0x3727ed(0xf2));else{console['log'](a29_0x119a9c['dim']('[/'+_0x3bbea8+']'));const _0x4009b1=formatFlatList(_0x3069a8,_0x93e8e8,{'showMetadata':!![]});console[_0x3727ed(0xfd)](_0x4009b1);}}return 0x0;}async[a29_0x4166a1(0x103)](_0x352817,_0x22e37a){const _0xffe6fc=a29_0x4166a1,{options:_0x44ced7,tdx:_0x4876c0}=_0x352817,_0x33f165=await withSpinner('Resolving\x20context\x20path\x20\x27'+_0x22e37a+_0xffe6fc(0x129),()=>_0x4876c0[_0xffe6fc(0xf1)][_0xffe6fc(0x122)](_0x22e37a),{'verbose':_0x44ced7[_0xffe6fc(0x108)]}),_0x2ac9a8=_0x33f165[_0xffe6fc(0x111)];_0x44ced7[_0xffe6fc(0x108)]&&(console[_0xffe6fc(0xeb)]('Parent\x20ID:\x20'+_0x2ac9a8[_0xffe6fc(0x123)]),_0x2ac9a8['folderId']&&console[_0xffe6fc(0xeb)](_0xffe6fc(0x107)+_0x2ac9a8['folderId']));const _0x1e613e=_0x44ced7[_0xffe6fc(0x100)]||0xa,_0x2c10b5=await withSpinner(_0xffe6fc(0xee),()=>_0x4876c0[_0xffe6fc(0xf1)][_0xffe6fc(0x103)](_0x2ac9a8[_0xffe6fc(0x123)],_0x2ac9a8[_0xffe6fc(0xf9)],0x0,_0x1e613e),{'verbose':_0x44ced7[_0xffe6fc(0x108)]}),_0x4b1d83=_0x2c10b5[_0xffe6fc(0x111)];console[_0xffe6fc(0xeb)](_0xffe6fc(0x101)+_0x4b1d83[_0xffe6fc(0x11e)]+'\x20top-level\x20items');if(_0x44ced7[_0xffe6fc(0xed)]===_0xffe6fc(0x124)||_0x44ced7[_0xffe6fc(0xed)]===_0xffe6fc(0xfc))await handleSDKOutput(_0x4b1d83,_0x44ced7);else{console[_0xffe6fc(0xfd)](a29_0x119a9c[_0xffe6fc(0xe7)]('[/'+_0x22e37a+']'));const _0x30cff3=formatTree(_0x4b1d83,{'showMetadata':!![]});console['log'](_0x30cff3);}return 0x0;}}
1
+ const a29_0x2d727a=a29_0x32d5;(function(_0x4b8ac8,_0x1e1069){const _0x2af43c=a29_0x32d5,_0xd02276=_0x4b8ac8();while(!![]){try{const _0x120197=parseInt(_0x2af43c(0xd3))/0x1*(-parseInt(_0x2af43c(0x103))/0x2)+parseInt(_0x2af43c(0xca))/0x3*(-parseInt(_0x2af43c(0xbe))/0x4)+-parseInt(_0x2af43c(0xc4))/0x5+-parseInt(_0x2af43c(0xd5))/0x6+-parseInt(_0x2af43c(0xda))/0x7*(parseInt(_0x2af43c(0xf5))/0x8)+-parseInt(_0x2af43c(0x104))/0x9+parseInt(_0x2af43c(0xc0))/0xa*(parseInt(_0x2af43c(0xf7))/0xb);if(_0x120197===_0x1e1069)break;else _0xd02276['push'](_0xd02276['shift']());}catch(_0x37d4a4){_0xd02276['push'](_0xd02276['shift']());}}}(a29_0x46b8,0xd9033));import{BaseCommand}from'./command.js';function a29_0x46b8(){const _0x397f6d=['50490VuDqlO','test','length','filter','recursive','\x20segment','384342UjVLwA','site','verbose','Listing\x20parent\x20segments...','👥\x20','\x20folder','name','jsonl','listParents','1bMbdzE','map','8778090idbHyP','sort','folder','✔\x20Found\x20','message','4305mSMgWL','Listing\x20parent\x20segments\x20matching\x20\x27','Error:\x20Pattern\x20matching\x20is\x20only\x20supported\x20at\x20root\x20level\x20(no\x20context\x20set).','log','maxDepth','Error:\x20','Listing\x20folders\x20and\x20segments...','description','replace','\x20top-level\x20items','Resolving\x20context\x20path\x20\x27','cause','\x5c$&','\x20and\x20','Path/pattern\x20arg:\x20','Parent\x20ID:\x20','execute','\x27...','data','json','segments','(empty)','segment','format','segmentPath','resolvePathToResource','No\x20parent\x20segments\x20match\x20pattern:\x20','1128RHxImR','population','44eEpXyU','Current\x20context:\x20','\x20\x20Cause:\x20','Building\x20hierarchy\x20tree...','✔\x20Built\x20tree\x20with\x20','Site:\x20','localeCompare','listUnified','attributes','folderId','dim','includes','1257586sxrXiS','739044wTEMmJ','parentId','error','listRecursive','Clear\x20context\x20with:\x20tdx\x20segment\x20use\x20/','16tNwjkB','[parent\x20segments]','9180190zszPYC','Folder\x20ID:\x20','List\x20parent\x20segments,\x20folders,\x20and\x20child\x20segments','\x20parent\x20segment'];a29_0x46b8=function(){return _0x397f6d;};return a29_0x46b8();}import{SDKError}from'../sdk/index.js';import{handleSDKOutput}from'../utils/command-output.js';import{withSpinner}from'../utils/spinner.js';import{formatFlatList,formatTree}from'../utils/tree-formatter.js';function a29_0x32d5(_0x21d354,_0x5d1924){const _0x46b8a6=a29_0x46b8();return a29_0x32d5=function(_0x32d552,_0x414abb){_0x32d552=_0x32d552-0xbd;let _0x5a6c49=_0x46b8a6[_0x32d552];return _0x5a6c49;},a29_0x32d5(_0x21d354,_0x5d1924);}import{formatRows}from'../utils/formatters.js';import a29_0x547f0a from'chalk';export class SegmentsCommand extends BaseCommand{[a29_0x2d727a(0xd0)]=a29_0x2d727a(0xee);[a29_0x2d727a(0xe1)]=a29_0x2d727a(0xc2);async[a29_0x2d727a(0xea)](_0xd1135f){const _0x3b8397=a29_0x2d727a,{options:_0x3a62be,args:_0x4ca2ff}=_0xd1135f,_0x44ef8b=_0x3a62be[_0x3b8397(0xc8)],_0x182cb9=_0x4ca2ff[0x0];try{const _0x37fa00=_0x3a62be[_0x3b8397(0xf2)];_0x3a62be[_0x3b8397(0xcc)]&&(console[_0x3b8397(0x106)](_0x3b8397(0xfc)+_0x3a62be[_0x3b8397(0xcb)]),console[_0x3b8397(0x106)](_0x3b8397(0xf8)+(_0x37fa00||'/')),_0x182cb9&&console['error'](_0x3b8397(0xe8)+_0x182cb9),_0x44ef8b&&console[_0x3b8397(0x106)]('Recursive\x20mode:\x20enabled'));if(_0x182cb9){const _0x2d651a=_0x182cb9[_0x3b8397(0x102)]('*')||_0x182cb9['includes']('?');if(_0x2d651a&&!_0x37fa00)return await this['listParentsWithPattern'](_0xd1135f,_0x182cb9);else return _0x2d651a?(console[_0x3b8397(0x106)](_0x3b8397(0xdc)),console[_0x3b8397(0x106)](_0x3b8397(0xbd)),0x1):_0x44ef8b?await this[_0x3b8397(0x107)](_0xd1135f,_0x182cb9):await this['listUnified'](_0xd1135f,_0x182cb9);}if(!_0x37fa00)return await this[_0x3b8397(0xd2)](_0xd1135f);return _0x44ef8b?await this[_0x3b8397(0x107)](_0xd1135f,_0x37fa00):await this['listUnified'](_0xd1135f,_0x37fa00);}catch(_0x2cddc3){if(_0x2cddc3 instanceof SDKError)return console[_0x3b8397(0x106)](_0x3b8397(0xdf)+_0x2cddc3[_0x3b8397(0xd9)]),_0x2cddc3[_0x3b8397(0xe5)]&&console[_0x3b8397(0x106)](_0x3b8397(0xf9)+_0x2cddc3['cause']),0x1;throw _0x2cddc3;}}async['listParentsWithPattern'](_0x525e1b,_0x13b428){const _0x55226e=a29_0x2d727a,{options:_0x3b3681,tdx:_0x6f8719}=_0x525e1b,_0x4a0fdd=await withSpinner(_0x55226e(0xdb)+_0x13b428+'\x27...',()=>_0x6f8719[_0x55226e(0xf0)][_0x55226e(0xd2)](),{'verbose':_0x3b3681[_0x55226e(0xcc)]}),_0x25e590=_0x4a0fdd['data'],_0x46736e=_0x13b428['replace'](/[.+^${}()|[\]\\]/g,_0x55226e(0xe6))[_0x55226e(0xe2)](/\*/g,'.*')[_0x55226e(0xe2)](/\?/g,'.'),_0x592b84=new RegExp('^'+_0x46736e+'$','i'),_0x461599=_0x25e590[_0x55226e(0xc7)](_0x406fb8=>_0x592b84[_0x55226e(0xc5)](_0x406fb8[_0x55226e(0xff)][_0x55226e(0xd0)]));console[_0x55226e(0x106)](_0x55226e(0xd8)+_0x461599['length']+_0x55226e(0xc3)+(_0x461599[_0x55226e(0xc6)]!==0x1?'s':'')+'\x20matching\x20\x27'+_0x13b428+'\x27');if(_0x3b3681['format']===_0x55226e(0xed)||_0x3b3681[_0x55226e(0xf1)]===_0x55226e(0xd1))await handleSDKOutput(_0x461599,_0x3b3681);else{if(_0x461599[_0x55226e(0xc6)]===0x0)console[_0x55226e(0xdd)](_0x55226e(0xf4)+_0x13b428);else{console['log'](_0x55226e(0xbf));for(const _0x358778 of _0x461599){const _0x490cba=_0x358778[_0x55226e(0xff)][_0x55226e(0xf6)]?a29_0x547f0a[_0x55226e(0x101)]('\x20('+formatRows(_0x358778[_0x55226e(0xff)][_0x55226e(0xf6)])+')'):'';console[_0x55226e(0xdd)](_0x55226e(0xce)+_0x358778['attributes'][_0x55226e(0xd0)]+_0x490cba);}}}return 0x0;}async[a29_0x2d727a(0xd2)](_0x3393bb){const _0x47b7a7=a29_0x2d727a,{options:_0x139af4,tdx:_0x39a223}=_0x3393bb,_0x4c367a=await withSpinner(_0x47b7a7(0xcd),()=>_0x39a223[_0x47b7a7(0xf0)][_0x47b7a7(0xd2)](),{'verbose':_0x139af4['verbose']}),_0x5404d0=_0x4c367a['data'];console['error'](_0x47b7a7(0xd8)+_0x5404d0[_0x47b7a7(0xc6)]+'\x20parent\x20segment'+(_0x5404d0[_0x47b7a7(0xc6)]!==0x1?'s':''));if(_0x139af4[_0x47b7a7(0xf1)]===_0x47b7a7(0xed)||_0x139af4[_0x47b7a7(0xf1)]===_0x47b7a7(0xd1))await handleSDKOutput(_0x5404d0,_0x139af4);else{console[_0x47b7a7(0xdd)]('[parent\x20segments]');for(const _0x4ea71e of _0x5404d0){const _0xdab95d=_0x4ea71e['attributes'][_0x47b7a7(0xf6)]?a29_0x547f0a[_0x47b7a7(0x101)]('\x20('+formatRows(_0x4ea71e[_0x47b7a7(0xff)][_0x47b7a7(0xf6)])+')'):'';console[_0x47b7a7(0xdd)](_0x47b7a7(0xce)+_0x4ea71e[_0x47b7a7(0xff)][_0x47b7a7(0xd0)]+_0xdab95d);}}return 0x0;}async[a29_0x2d727a(0xfe)](_0x59d890,_0x4f5120){const _0x1ba0bc=a29_0x2d727a,{options:_0x1e462e,tdx:_0x43a40d}=_0x59d890,_0x37f54b=await withSpinner(_0x1ba0bc(0xe4)+_0x4f5120+_0x1ba0bc(0xeb),()=>_0x43a40d['segment'][_0x1ba0bc(0xf3)](_0x4f5120),{'verbose':_0x1e462e['verbose']}),_0x3f474f=_0x37f54b[_0x1ba0bc(0xec)];_0x1e462e['verbose']&&(console[_0x1ba0bc(0x106)](_0x1ba0bc(0xe9)+_0x3f474f[_0x1ba0bc(0x105)]),_0x3f474f['folderId']&&console['error'](_0x1ba0bc(0xc1)+_0x3f474f[_0x1ba0bc(0x100)]));const _0xf47cf9=await withSpinner(_0x1ba0bc(0xe0),()=>_0x43a40d[_0x1ba0bc(0xf0)]['listUnified'](_0x3f474f[_0x1ba0bc(0x105)],_0x3f474f['folderId']),{'verbose':_0x1e462e[_0x1ba0bc(0xcc)]}),{folders:_0x5a3a4c,segments:_0x28a49d}=_0xf47cf9[_0x1ba0bc(0xec)],_0x445898=_0x5a3a4c[_0x1ba0bc(0xc6)]+_0x28a49d[_0x1ba0bc(0xc6)];console[_0x1ba0bc(0x106)](_0x1ba0bc(0xd8)+_0x5a3a4c[_0x1ba0bc(0xc6)]+_0x1ba0bc(0xcf)+(_0x5a3a4c['length']!==0x1?'s':'')+_0x1ba0bc(0xe7)+_0x28a49d[_0x1ba0bc(0xc6)]+_0x1ba0bc(0xc9)+(_0x28a49d[_0x1ba0bc(0xc6)]!==0x1?'s':''));if(_0x1e462e[_0x1ba0bc(0xf1)]==='json'||_0x1e462e[_0x1ba0bc(0xf1)]===_0x1ba0bc(0xd1)){const _0x29318d=[..._0x5a3a4c['map'](_0x50b538=>({..._0x50b538,'type':_0x1ba0bc(0xd7)})),..._0x28a49d[_0x1ba0bc(0xd4)](_0x4970a2=>({..._0x4970a2,'type':_0x1ba0bc(0xf0)}))][_0x1ba0bc(0xd6)]((_0x4eb8ed,_0x492479)=>_0x4eb8ed[_0x1ba0bc(0xd0)][_0x1ba0bc(0xfd)](_0x492479['name']));await handleSDKOutput(_0x29318d,_0x1e462e);}else{if(_0x445898===0x0)console[_0x1ba0bc(0xdd)](a29_0x547f0a['dim']('[/'+_0x4f5120+']')),console[_0x1ba0bc(0xdd)](_0x1ba0bc(0xef));else{console['log'](a29_0x547f0a['dim']('[/'+_0x4f5120+']'));const _0x2c5b0e=formatFlatList(_0x5a3a4c,_0x28a49d,{'showMetadata':!![]});console['log'](_0x2c5b0e);}}return 0x0;}async[a29_0x2d727a(0x107)](_0x41a87c,_0x58188c){const _0x44ff96=a29_0x2d727a,{options:_0x25b2ac,tdx:_0x38ec0e}=_0x41a87c,_0xf8e90b=await withSpinner(_0x44ff96(0xe4)+_0x58188c+'\x27...',()=>_0x38ec0e[_0x44ff96(0xf0)][_0x44ff96(0xf3)](_0x58188c),{'verbose':_0x25b2ac[_0x44ff96(0xcc)]}),_0x4704c4=_0xf8e90b['data'];_0x25b2ac[_0x44ff96(0xcc)]&&(console[_0x44ff96(0x106)](_0x44ff96(0xe9)+_0x4704c4[_0x44ff96(0x105)]),_0x4704c4[_0x44ff96(0x100)]&&console[_0x44ff96(0x106)](_0x44ff96(0xc1)+_0x4704c4[_0x44ff96(0x100)]));const _0x4b32fb=_0x25b2ac[_0x44ff96(0xde)]||0xa,_0x47c1b8=await withSpinner(_0x44ff96(0xfa),()=>_0x38ec0e['segment'][_0x44ff96(0x107)](_0x4704c4[_0x44ff96(0x105)],_0x4704c4[_0x44ff96(0x100)],0x0,_0x4b32fb),{'verbose':_0x25b2ac[_0x44ff96(0xcc)]}),_0x28700d=_0x47c1b8[_0x44ff96(0xec)];console['error'](_0x44ff96(0xfb)+_0x28700d['length']+_0x44ff96(0xe3));if(_0x25b2ac[_0x44ff96(0xf1)]===_0x44ff96(0xed)||_0x25b2ac[_0x44ff96(0xf1)]===_0x44ff96(0xd1))await handleSDKOutput(_0x28700d,_0x25b2ac);else{console['log'](a29_0x547f0a[_0x44ff96(0x101)]('[/'+_0x58188c+']'));const _0x38a90e=formatTree(_0x28700d,{'showMetadata':!![]});console['log'](_0x38a90e);}return 0x0;}}
@@ -1 +1 @@
1
- const a30_0x437caf=a30_0x5311;(function(_0x186618,_0x19c300){const _0x69ef3e=a30_0x5311,_0x2c4f10=_0x186618();while(!![]){try{const _0x2c7cec=parseInt(_0x69ef3e(0x17a))/0x1+-parseInt(_0x69ef3e(0x16b))/0x2*(parseInt(_0x69ef3e(0x189))/0x3)+parseInt(_0x69ef3e(0x187))/0x4+parseInt(_0x69ef3e(0x17b))/0x5*(parseInt(_0x69ef3e(0x166))/0x6)+parseInt(_0x69ef3e(0x16a))/0x7+parseInt(_0x69ef3e(0x184))/0x8*(-parseInt(_0x69ef3e(0x171))/0x9)+parseInt(_0x69ef3e(0x173))/0xa;if(_0x2c7cec===_0x19c300)break;else _0x2c4f10['push'](_0x2c4f10['shift']());}catch(_0xca78a8){_0x2c4f10['push'](_0x2c4f10['shift']());}}}(a30_0x8c5a,0xb0e09));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleSDKOutput}from'../utils/command-output.js';function a30_0x8c5a(){const _0x7b6488=['500396KYEIwh','length','146031pRkMAR','cause','Querying\x20','verbose','showTable','site','description','3764784fjOjFZ','\x20row','Table:\x20','Limit:\x20','944517quZnHD','22STEaOv','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','query','limit','args','error','18jShVAe','...','6089230SorHQi','Catalog:\x20','database','\x20from\x20','execute','table','Error:\x20','417641YWhbNv','10tIUXxU','✔\x20Query\x20successful\x20-\x200\x20rows\x20returned','Site:\x20','data','Usage:\x20tdx\x20show\x20<database.table>','\x20\x20\x20or:\x20tdx\x20show\x20<catalog.database.table>','catalog','show','message','5126344TUSenU','\x20\x20Cause:\x20','validate'];a30_0x8c5a=function(){return _0x7b6488;};return a30_0x8c5a();}import{parseTableReference,validateTableDescribeReference}from'../utils/table-ref-parser.js';import{withSpinner}from'../utils/spinner.js';function a30_0x5311(_0x4b825d,_0x13bb2d){const _0x8c5aa5=a30_0x8c5a();return a30_0x5311=function(_0x531120,_0x2299ac){_0x531120=_0x531120-0x163;let _0x10bf9a=_0x8c5aa5[_0x531120];return _0x10bf9a;},a30_0x5311(_0x4b825d,_0x13bb2d);}import{DEFAULT_DISPLAY_LIMIT,resolveLimit}from'../utils/constants.js';export class ShowCommand extends BaseCommand{['name']=a30_0x437caf(0x182);[a30_0x437caf(0x165)]='Show\x20table\x20contents';async[a30_0x437caf(0x177)](_0x4f5f6d){return this['showTable'](_0x4f5f6d);}async[a30_0x437caf(0x163)](_0x5b2077){const _0x52d058=a30_0x437caf,{options:_0x2bf801,args:_0x13a70d,tdx:_0x4d1462}=_0x5b2077;let _0x23f79e;try{_0x23f79e=parseTableReference(_0x13a70d[0x0]);const _0x1e18eb=_0x2bf801[_0x52d058(0x175)];!_0x23f79e[_0x52d058(0x175)]&&_0x1e18eb&&(_0x23f79e[_0x52d058(0x175)]=_0x1e18eb);const _0x393645=validateTableDescribeReference(_0x23f79e);if(_0x393645)return console[_0x52d058(0x170)](_0x52d058(0x179)+_0x393645),console[_0x52d058(0x170)](_0x52d058(0x17f)),console['error'](_0x52d058(0x180)),console['error']('\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--database\x20<database>'),0x1;}catch(_0x2b7be2){return console[_0x52d058(0x170)](_0x52d058(0x179)+_0x2b7be2[_0x52d058(0x183)]),console['error'](_0x52d058(0x17f)),console[_0x52d058(0x170)](_0x52d058(0x180)),console[_0x52d058(0x170)]('\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--database\x20<database>'),0x1;}const _0x41ea11=_0x23f79e[_0x52d058(0x181)],_0x28a26c=_0x23f79e[_0x52d058(0x175)],_0x14468e=_0x23f79e[_0x52d058(0x178)],_0x551535=resolveLimit(_0x2bf801[_0x52d058(0x16e)],DEFAULT_DISPLAY_LIMIT);try{_0x2bf801['verbose']&&(console['error'](_0x52d058(0x17d)+_0x2bf801[_0x52d058(0x164)]),_0x41ea11&&console[_0x52d058(0x170)](_0x52d058(0x174)+_0x41ea11),console[_0x52d058(0x170)]('Database:\x20'+_0x28a26c),console[_0x52d058(0x170)](_0x52d058(0x168)+_0x14468e),console[_0x52d058(0x170)](_0x52d058(0x169)+_0x551535));const _0x578f71=_0x41ea11?_0x41ea11+'.'+_0x28a26c+'.'+_0x14468e:_0x28a26c+'.'+_0x14468e,_0x3cb813=await withSpinner(_0x52d058(0x18b)+_0x578f71+_0x52d058(0x172),()=>_0x4d1462[_0x52d058(0x16d)][_0x52d058(0x163)](_0x28a26c,_0x14468e,_0x551535,_0x41ea11),{'verbose':_0x2bf801[_0x52d058(0x18c)]}),_0x563020=_0x3cb813[_0x52d058(0x17e)],_0x18c0a1=_0x563020[_0x52d058(0x17e)];return _0x18c0a1['length']===0x0?console[_0x52d058(0x170)](_0x52d058(0x17c)):console['error']('✔\x20Retrieved\x20'+_0x18c0a1['length']+_0x52d058(0x167)+(_0x18c0a1['length']!==0x1?'s':'')+_0x52d058(0x176)+_0x578f71),await handleSDKOutput(_0x18c0a1,_0x2bf801),0x0;}catch(_0x1c6df0){if(_0x1c6df0 instanceof SDKError)return console[_0x52d058(0x170)]('Error:\x20'+_0x1c6df0[_0x52d058(0x183)]),_0x1c6df0[_0x52d058(0x18a)]&&console['error'](_0x52d058(0x185)+_0x1c6df0[_0x52d058(0x18a)]),0x1;throw _0x1c6df0;}}[a30_0x437caf(0x186)](_0x261d57){const _0x3404a7=a30_0x437caf;if(_0x261d57[_0x3404a7(0x16f)][_0x3404a7(0x188)]===0x0)return'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';if(_0x261d57[_0x3404a7(0x16f)][_0x3404a7(0x188)]>0x1)return _0x3404a7(0x16c);return undefined;}}
1
+ const a30_0x43d28f=a30_0x3bb4;function a30_0x3f00(){const _0x410add=['315tecBOQ','10274960vfVTFI','9oNFoco','catalog','\x20\x20\x20or:\x20tdx\x20show\x20<catalog.database.table>','limit','query','Limit:\x20','cause','15767700PtjaJA','Querying\x20','✔\x20Retrieved\x20','Site:\x20','Show\x20table\x20contents','\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--database\x20<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','length','\x20from\x20','654ctXIBO','validate','showTable','table','72478AKYWDq','108283yVvKtW','1379409jCJSUx','error','...','database','\x20\x20Cause:\x20','Error:\x20','name','show','60212JNnJKx','message','55304469RQrxTb','✔\x20Query\x20successful\x20-\x200\x20rows\x20returned','Usage:\x20tdx\x20show\x20<database.table>','args','execute','verbose','data','24IjohIX','Database:\x20','description'];a30_0x3f00=function(){return _0x410add;};return a30_0x3f00();}(function(_0x4951cb,_0x803128){const _0x33984d=a30_0x3bb4,_0x4f1074=_0x4951cb();while(!![]){try{const _0x2a8a92=-parseInt(_0x33984d(0xcd))/0x1*(-parseInt(_0x33984d(0xe6))/0x2)+-parseInt(_0x33984d(0xe8))/0x3+parseInt(_0x33984d(0xf0))/0x4*(parseInt(_0x33984d(0xd0))/0x5)+-parseInt(_0x33984d(0xe2))/0x6*(-parseInt(_0x33984d(0xe7))/0x7)+-parseInt(_0x33984d(0xd1))/0x8*(-parseInt(_0x33984d(0xd2))/0x9)+parseInt(_0x33984d(0xd9))/0xa+-parseInt(_0x33984d(0xc6))/0xb;if(_0x2a8a92===_0x803128)break;else _0x4f1074['push'](_0x4f1074['shift']());}catch(_0x354602){_0x4f1074['push'](_0x4f1074['shift']());}}}(a30_0x3f00,0xd651e));import{BaseCommand}from'./command.js';function a30_0x3bb4(_0x2486c2,_0x1254ff){const _0x3f0085=a30_0x3f00();return a30_0x3bb4=function(_0x3bb4fb,_0x9e1444){_0x3bb4fb=_0x3bb4fb-0xc5;let _0xd28f35=_0x3f0085[_0x3bb4fb];return _0xd28f35;},a30_0x3bb4(_0x2486c2,_0x1254ff);}import{SDKError}from'../sdk/index.js';import{handleSDKOutput}from'../utils/command-output.js';import{parseTableReference,validateTableDescribeReference}from'../utils/table-ref-parser.js';import{withSpinner}from'../utils/spinner.js';import{DEFAULT_DISPLAY_LIMIT,resolveLimit}from'../utils/constants.js';export class ShowCommand extends BaseCommand{[a30_0x43d28f(0xee)]=a30_0x43d28f(0xef);[a30_0x43d28f(0xcf)]=a30_0x43d28f(0xdd);async[a30_0x43d28f(0xca)](_0x5caa81){const _0x239b99=a30_0x43d28f;return this[_0x239b99(0xe4)](_0x5caa81);}async[a30_0x43d28f(0xe4)](_0x147bfb){const _0x1f07e1=a30_0x43d28f,{options:_0x66f908,args:_0x953647,tdx:_0xdaf8a2}=_0x147bfb;let _0x4a6547;try{_0x4a6547=parseTableReference(_0x953647[0x0]);const _0x320f3a=_0x66f908[_0x1f07e1(0xeb)];!_0x4a6547[_0x1f07e1(0xeb)]&&_0x320f3a&&(_0x4a6547[_0x1f07e1(0xeb)]=_0x320f3a);const _0x570bb4=validateTableDescribeReference(_0x4a6547);if(_0x570bb4)return console[_0x1f07e1(0xe9)](_0x1f07e1(0xed)+_0x570bb4),console[_0x1f07e1(0xe9)](_0x1f07e1(0xc8)),console['error'](_0x1f07e1(0xd4)),console['error'](_0x1f07e1(0xde)),0x1;}catch(_0x100d80){return console['error']('Error:\x20'+_0x100d80[_0x1f07e1(0xc5)]),console[_0x1f07e1(0xe9)](_0x1f07e1(0xc8)),console[_0x1f07e1(0xe9)](_0x1f07e1(0xd4)),console['error'](_0x1f07e1(0xde)),0x1;}const _0x3dea45=_0x4a6547[_0x1f07e1(0xd3)],_0x33c144=_0x4a6547[_0x1f07e1(0xeb)],_0x21764b=_0x4a6547[_0x1f07e1(0xe5)],_0x4f3ca6=resolveLimit(_0x66f908[_0x1f07e1(0xd5)],DEFAULT_DISPLAY_LIMIT);try{_0x66f908[_0x1f07e1(0xcb)]&&(console[_0x1f07e1(0xe9)](_0x1f07e1(0xdc)+_0x66f908['site']),_0x3dea45&&console[_0x1f07e1(0xe9)]('Catalog:\x20'+_0x3dea45),console[_0x1f07e1(0xe9)](_0x1f07e1(0xce)+_0x33c144),console[_0x1f07e1(0xe9)]('Table:\x20'+_0x21764b),console[_0x1f07e1(0xe9)](_0x1f07e1(0xd7)+_0x4f3ca6));const _0x3bc7b5=_0x3dea45?_0x3dea45+'.'+_0x33c144+'.'+_0x21764b:_0x33c144+'.'+_0x21764b,_0x2d0e14=await withSpinner(_0x1f07e1(0xda)+_0x3bc7b5+_0x1f07e1(0xea),()=>_0xdaf8a2[_0x1f07e1(0xd6)][_0x1f07e1(0xe4)](_0x33c144,_0x21764b,_0x4f3ca6,_0x3dea45),{'verbose':_0x66f908[_0x1f07e1(0xcb)]}),_0x3a9cc8=_0x2d0e14[_0x1f07e1(0xcc)],_0x35bab2=_0x3a9cc8[_0x1f07e1(0xcc)];return _0x35bab2[_0x1f07e1(0xe0)]===0x0?console[_0x1f07e1(0xe9)](_0x1f07e1(0xc7)):console[_0x1f07e1(0xe9)](_0x1f07e1(0xdb)+_0x35bab2[_0x1f07e1(0xe0)]+'\x20row'+(_0x35bab2[_0x1f07e1(0xe0)]!==0x1?'s':'')+_0x1f07e1(0xe1)+_0x3bc7b5),await handleSDKOutput(_0x35bab2,_0x66f908),0x0;}catch(_0x57e55f){if(_0x57e55f instanceof SDKError)return console[_0x1f07e1(0xe9)]('Error:\x20'+_0x57e55f[_0x1f07e1(0xc5)]),_0x57e55f['cause']&&console[_0x1f07e1(0xe9)](_0x1f07e1(0xec)+_0x57e55f[_0x1f07e1(0xd8)]),0x1;throw _0x57e55f;}}[a30_0x43d28f(0xe3)](_0x30e09c){const _0x13ff48=a30_0x43d28f;if(_0x30e09c[_0x13ff48(0xc9)]['length']===0x0)return'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';if(_0x30e09c[_0x13ff48(0xc9)][_0x13ff48(0xe0)]>0x1)return _0x13ff48(0xdf);return undefined;}}
@@ -1 +1 @@
1
- function a31_0x1264(_0x385df0,_0x18b90d){const _0x55a162=a31_0x55a1();return a31_0x1264=function(_0x12647a,_0x387f14){_0x12647a=_0x12647a-0x17e;let _0x183d99=_0x55a162[_0x12647a];return _0x183d99;},a31_0x1264(_0x385df0,_0x18b90d);}const a31_0x456647=a31_0x1264;(function(_0x22e36e,_0x391550){const _0xa8c9fa=a31_0x1264,_0xd4b1d2=_0x22e36e();while(!![]){try{const _0x32b96a=parseInt(_0xa8c9fa(0x18a))/0x1+-parseInt(_0xa8c9fa(0x198))/0x2*(-parseInt(_0xa8c9fa(0x1a4))/0x3)+parseInt(_0xa8c9fa(0x1ae))/0x4+-parseInt(_0xa8c9fa(0x19b))/0x5*(parseInt(_0xa8c9fa(0x1ac))/0x6)+parseInt(_0xa8c9fa(0x1a3))/0x7*(-parseInt(_0xa8c9fa(0x1aa))/0x8)+-parseInt(_0xa8c9fa(0x1b0))/0x9*(-parseInt(_0xa8c9fa(0x183))/0xa)+parseInt(_0xa8c9fa(0x1b1))/0xb;if(_0x32b96a===_0x391550)break;else _0xd4b1d2['push'](_0xd4b1d2['shift']());}catch(_0x101a80){_0xd4b1d2['push'](_0xd4b1d2['shift']());}}}(a31_0x55a1,0x4da11));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';function a31_0x55a1(){const _0x1a1777=['\x20\x20Or:\x20\x20tdx\x20tables\x20--database\x20','table','site','\x20\x20Or:\x20\x20tdx\x20tables\x20--in\x20','validate','name','cause','68789BrXLAS','552OiriYW','includes','\x20\x20tdx\x20tables\x20users\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20->\x20table\x20\x22users\x22\x20across\x20all\x20databases','Database:\x20','database','Error:\x20','368obAewi','Table\x20pattern:\x20','42552SwzsPd','Error:\x20Pattern\x20\x27','287628PgyeKL','\x27\x20without\x20wildcards\x20would\x20search\x20for\x20tables\x20named\x20\x27','9Cotjrj','4487648UPkdOT','\x20\x20tdx\x20tables\x20\x22mydb.users\x22\x20\x20\x20\x20->\x20table\x20\x22users\x22\x20in\x20database\x20mydb','verbose','\x20table','\x20\x20Use:\x20tdx\x20tables\x20\x22','Or\x20use\x20--in\x20flag:','tables','\x20\x20Cause:\x20','2439150ysFBBh','Error:\x20Too\x20many\x20arguments.\x20Use\x20single\x20argument:','\x27\x20across\x20all\x20databases.','\x27\x20is\x20ambiguous.','description','\x27\x20may\x20not\x20exist\x20or\x20contains\x20no\x20tables','Database\x20pattern:\x20','456785KoJcuz','error','Listing\x20tables...','listTables','Note:\x20\x27','\x20\x20tdx\x20tables\x20\x22*.user*\x22\x20\x20\x20\x20\x20\x20\x20->\x20tables\x20matching\x20user*\x20across\x20databases','Database:\x20all','length','limit','query','✖\x20No\x20tables\x20found','data','message','Did\x20you\x20mean\x20to\x20list\x20all\x20tables\x20from\x20database\x20\x27','548LykbdV','execute','.*\x22','325hRyLBx'];a31_0x55a1=function(){return _0x1a1777;};return a31_0x55a1();}import{handleSDKOutput}from'../utils/command-output.js';import{parseTableReference}from'../utils/table-ref-parser.js';import{DEFAULT_LISTING_LIMIT,resolveLimit}from'../utils/constants.js';import{withSpinner}from'../utils/spinner.js';export class TablesCommand extends BaseCommand{[a31_0x456647(0x1a1)]=a31_0x456647(0x181);[a31_0x456647(0x187)]='List\x20tables\x20in\x20a\x20database';async[a31_0x456647(0x199)](_0x16cf28){const _0x12dafb=a31_0x456647,{options:_0x1cbd5a,args:_0xe38ad0,tdx:_0x4710ec}=_0x16cf28;let _0x8254e0;if(_0xe38ad0['length']===0x0)_0x8254e0={'database':undefined,'table':undefined,'original':''};else{if(_0xe38ad0['length']===0x1)try{_0x8254e0=parseTableReference(_0xe38ad0[0x0]);if(_0x8254e0[_0x12dafb(0x19d)]&&!_0x8254e0['database']&&!_0x8254e0[_0x12dafb(0x19d)][_0x12dafb(0x1a5)]('*')&&!_0x8254e0[_0x12dafb(0x19d)][_0x12dafb(0x1a5)]('?'))return console[_0x12dafb(0x18b)](_0x12dafb(0x1ad)+_0xe38ad0[0x0]+_0x12dafb(0x186)),console[_0x12dafb(0x18b)](_0x12dafb(0x197)+_0x8254e0[_0x12dafb(0x19d)]+'\x27?'),console['error'](_0x12dafb(0x17f)+_0x8254e0[_0x12dafb(0x19d)]+_0x12dafb(0x19a)),console['error'](_0x12dafb(0x19f)+_0x8254e0[_0x12dafb(0x19d)]),console['error'](_0x12dafb(0x19c)+_0x8254e0['table']),console[_0x12dafb(0x18b)](''),console['error'](_0x12dafb(0x18e)+_0xe38ad0[0x0]+_0x12dafb(0x1af)+_0x8254e0[_0x12dafb(0x19d)]+_0x12dafb(0x185)),0x1;}catch(_0x1c9fa0){return console[_0x12dafb(0x18b)](_0x12dafb(0x1a9)+_0x1c9fa0[_0x12dafb(0x196)]),0x1;}else return console[_0x12dafb(0x18b)](_0x12dafb(0x184)),console['error'](_0x12dafb(0x1a6)),console['error']('\x20\x20tdx\x20tables\x20\x22mydb.*\x22\x20\x20\x20\x20\x20\x20\x20\x20->\x20all\x20tables\x20from\x20mydb'),console['error'](_0x12dafb(0x1b2)),console[_0x12dafb(0x18b)](_0x12dafb(0x18f)),console['error'](_0x12dafb(0x180)),console[_0x12dafb(0x18b)]('\x20\x20tdx\x20tables\x20--in\x20mydb\x20\x20\x20\x20\x20\x20\x20->\x20all\x20tables\x20from\x20mydb'),0x1;}const _0x5be292=_0x1cbd5a[_0x12dafb(0x1a8)];!_0x8254e0['database']&&_0x5be292&&(_0x8254e0[_0x12dafb(0x1a8)]=_0x5be292);try{const _0x5afc3d=_0x486edb=>_0x486edb&&(_0x486edb['includes']('*')||_0x486edb[_0x12dafb(0x1a5)]('?')),_0x2c7ab7=_0x5afc3d(_0x8254e0[_0x12dafb(0x1a8)]);_0x1cbd5a[_0x12dafb(0x1b3)]&&(console[_0x12dafb(0x18b)]('Site:\x20'+_0x1cbd5a[_0x12dafb(0x19e)]),_0x8254e0[_0x12dafb(0x1a8)]?_0x2c7ab7?console[_0x12dafb(0x18b)](_0x12dafb(0x189)+_0x8254e0[_0x12dafb(0x1a8)]):console[_0x12dafb(0x18b)](_0x12dafb(0x1a7)+_0x8254e0['database']):console[_0x12dafb(0x18b)](_0x12dafb(0x190)),_0x8254e0[_0x12dafb(0x19d)]&&console[_0x12dafb(0x18b)](_0x12dafb(0x1ab)+_0x8254e0[_0x12dafb(0x19d)]));const _0x393c5e=_0x8254e0['database']&&!_0x2c7ab7?_0x8254e0[_0x12dafb(0x1a8)]:undefined,_0xae37f6=_0x2c7ab7?_0x8254e0['database']:undefined,_0x3ec76a=_0x8254e0[_0x12dafb(0x19d)],_0x2b1c94=resolveLimit(_0x1cbd5a[_0x12dafb(0x192)],DEFAULT_LISTING_LIMIT),_0x31ee0f=await withSpinner(_0x12dafb(0x18c),()=>_0x4710ec[_0x12dafb(0x193)][_0x12dafb(0x18d)](_0x393c5e,_0x3ec76a,_0xae37f6,_0x2b1c94),{'verbose':_0x1cbd5a[_0x12dafb(0x1b3)]}),_0x23c359=_0x31ee0f[_0x12dafb(0x195)];if(_0x23c359[_0x12dafb(0x191)]===0x0&&_0x8254e0[_0x12dafb(0x1a8)]&&!_0x2c7ab7)return console['error'](_0x12dafb(0x194)),console[_0x12dafb(0x18b)]('Database\x20\x27'+_0x8254e0[_0x12dafb(0x1a8)]+_0x12dafb(0x188)),0x1;return console[_0x12dafb(0x18b)]('✔\x20Found\x20'+_0x23c359[_0x12dafb(0x191)]+_0x12dafb(0x17e)+(_0x23c359['length']!==0x1?'s':'')),await handleSDKOutput(_0x23c359,{..._0x1cbd5a,'limit':_0x2b1c94}),0x0;}catch(_0x57c385){if(_0x57c385 instanceof SDKError)return console[_0x12dafb(0x18b)]('Error:\x20'+_0x57c385[_0x12dafb(0x196)]),_0x57c385[_0x12dafb(0x1a2)]&&console['error'](_0x12dafb(0x182)+_0x57c385[_0x12dafb(0x1a2)]),0x1;throw _0x57c385;}}[a31_0x456647(0x1a0)](_0x17d777){return undefined;}}
1
+ const a31_0x42384c=a31_0x1864;(function(_0x40442f,_0x1f0125){const _0x490d0a=a31_0x1864,_0x24a0b6=_0x40442f();while(!![]){try{const _0x21e392=parseInt(_0x490d0a(0x185))/0x1+parseInt(_0x490d0a(0x17b))/0x2*(parseInt(_0x490d0a(0x176))/0x3)+-parseInt(_0x490d0a(0x174))/0x4*(-parseInt(_0x490d0a(0x169))/0x5)+parseInt(_0x490d0a(0x183))/0x6*(parseInt(_0x490d0a(0x194))/0x7)+-parseInt(_0x490d0a(0x189))/0x8*(-parseInt(_0x490d0a(0x187))/0x9)+-parseInt(_0x490d0a(0x170))/0xa+-parseInt(_0x490d0a(0x193))/0xb*(parseInt(_0x490d0a(0x190))/0xc);if(_0x21e392===_0x1f0125)break;else _0x24a0b6['push'](_0x24a0b6['shift']());}catch(_0x4b59ce){_0x24a0b6['push'](_0x24a0b6['shift']());}}}(a31_0xd63d,0x22b36));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';function a31_0xd63d(){const _0x10ed19=['includes','name','site','2168UKaIuI','\x27\x20without\x20wildcards\x20would\x20search\x20for\x20tables\x20named\x20\x27','62574jIdRRJ','listTables','\x20\x20Cause:\x20','database','message','16FtaUIN','\x20\x20tdx\x20tables\x20\x22mydb.users\x22\x20\x20\x20\x20->\x20table\x20\x22users\x22\x20in\x20database\x20mydb','data','length','\x20\x20Or:\x20\x20tdx\x20tables\x20--database\x20','Database:\x20','\x27\x20across\x20all\x20databases.','verbose','726dcJMeU','\x20\x20tdx\x20tables\x20\x22mydb.*\x22\x20\x20\x20\x20\x20\x20\x20\x20->\x20all\x20tables\x20from\x20mydb','200668vnvCkc','.*\x22','9cVwYMb','Listing\x20tables...','1697048pUquMx','\x20\x20tdx\x20tables\x20users\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20->\x20table\x20\x22users\x22\x20across\x20all\x20databases','table','cause','Site:\x20','\x27\x20is\x20ambiguous.','Database:\x20all','6792NhfolA','\x20\x20Or:\x20\x20tdx\x20tables\x20--in\x20','tables','11363oOxbLD','8729bqDBfX','Error:\x20Too\x20many\x20arguments.\x20Use\x20single\x20argument:','description','\x20\x20tdx\x20tables\x20--in\x20mydb\x20\x20\x20\x20\x20\x20\x20->\x20all\x20tables\x20from\x20mydb','execute','\x20\x20Use:\x20tdx\x20tables\x20\x22','\x20\x20tdx\x20tables\x20\x22*.user*\x22\x20\x20\x20\x20\x20\x20\x20->\x20tables\x20matching\x20user*\x20across\x20databases','validate','\x27\x20may\x20not\x20exist\x20or\x20contains\x20no\x20tables','Error:\x20','1445KCpvwQ','Note:\x20\x27','\x20table','error','limit','Table\x20pattern:\x20','List\x20tables\x20in\x20a\x20database','1603760NYXigj'];a31_0xd63d=function(){return _0x10ed19;};return a31_0xd63d();}import{handleSDKOutput}from'../utils/command-output.js';import{parseTableReference}from'../utils/table-ref-parser.js';import{DEFAULT_LISTING_LIMIT,resolveLimit}from'../utils/constants.js';function a31_0x1864(_0x259cd4,_0x478bcc){const _0xd63d32=a31_0xd63d();return a31_0x1864=function(_0x186463,_0x546b27){_0x186463=_0x186463-0x161;let _0x4f1396=_0xd63d32[_0x186463];return _0x4f1396;},a31_0x1864(_0x259cd4,_0x478bcc);}import{withSpinner}from'../utils/spinner.js';export class TablesCommand extends BaseCommand{[a31_0x42384c(0x172)]=a31_0x42384c(0x192);[a31_0x42384c(0x161)]=a31_0x42384c(0x16f);async[a31_0x42384c(0x163)](_0x4879dc){const _0x410931=a31_0x42384c,{options:_0x4bba7d,args:_0x4f98cf,tdx:_0x59253c}=_0x4879dc;let _0x58b250;if(_0x4f98cf['length']===0x0)_0x58b250={'database':undefined,'table':undefined,'original':''};else{if(_0x4f98cf[_0x410931(0x17e)]===0x1)try{_0x58b250=parseTableReference(_0x4f98cf[0x0]);if(_0x58b250['table']&&!_0x58b250[_0x410931(0x179)]&&!_0x58b250[_0x410931(0x18b)][_0x410931(0x171)]('*')&&!_0x58b250['table']['includes']('?'))return console[_0x410931(0x16c)]('Error:\x20Pattern\x20\x27'+_0x4f98cf[0x0]+_0x410931(0x18e)),console[_0x410931(0x16c)]('Did\x20you\x20mean\x20to\x20list\x20all\x20tables\x20from\x20database\x20\x27'+_0x58b250[_0x410931(0x18b)]+'\x27?'),console[_0x410931(0x16c)](_0x410931(0x164)+_0x58b250[_0x410931(0x18b)]+_0x410931(0x186)),console[_0x410931(0x16c)](_0x410931(0x191)+_0x58b250[_0x410931(0x18b)]),console['error'](_0x410931(0x17f)+_0x58b250[_0x410931(0x18b)]),console[_0x410931(0x16c)](''),console[_0x410931(0x16c)](_0x410931(0x16a)+_0x4f98cf[0x0]+_0x410931(0x175)+_0x58b250[_0x410931(0x18b)]+_0x410931(0x181)),0x1;}catch(_0x38a6e8){return console[_0x410931(0x16c)](_0x410931(0x168)+_0x38a6e8['message']),0x1;}else return console[_0x410931(0x16c)](_0x410931(0x195)),console['error'](_0x410931(0x18a)),console[_0x410931(0x16c)](_0x410931(0x184)),console[_0x410931(0x16c)](_0x410931(0x17c)),console[_0x410931(0x16c)](_0x410931(0x165)),console[_0x410931(0x16c)]('Or\x20use\x20--in\x20flag:'),console[_0x410931(0x16c)](_0x410931(0x162)),0x1;}const _0x538d2a=_0x4bba7d[_0x410931(0x179)];!_0x58b250[_0x410931(0x179)]&&_0x538d2a&&(_0x58b250[_0x410931(0x179)]=_0x538d2a);try{const _0x330e5e=_0x30da6f=>_0x30da6f&&(_0x30da6f[_0x410931(0x171)]('*')||_0x30da6f[_0x410931(0x171)]('?')),_0x1ce00b=_0x330e5e(_0x58b250[_0x410931(0x179)]);_0x4bba7d['verbose']&&(console['error'](_0x410931(0x18d)+_0x4bba7d[_0x410931(0x173)]),_0x58b250[_0x410931(0x179)]?_0x1ce00b?console[_0x410931(0x16c)]('Database\x20pattern:\x20'+_0x58b250[_0x410931(0x179)]):console['error'](_0x410931(0x180)+_0x58b250[_0x410931(0x179)]):console[_0x410931(0x16c)](_0x410931(0x18f)),_0x58b250['table']&&console[_0x410931(0x16c)](_0x410931(0x16e)+_0x58b250[_0x410931(0x18b)]));const _0x1f47eb=_0x58b250[_0x410931(0x179)]&&!_0x1ce00b?_0x58b250[_0x410931(0x179)]:undefined,_0x2277b3=_0x1ce00b?_0x58b250[_0x410931(0x179)]:undefined,_0x15c02b=_0x58b250[_0x410931(0x18b)],_0x21d9b8=resolveLimit(_0x4bba7d[_0x410931(0x16d)],DEFAULT_LISTING_LIMIT),_0x29bbf3=await withSpinner(_0x410931(0x188),()=>_0x59253c['query'][_0x410931(0x177)](_0x1f47eb,_0x15c02b,_0x2277b3,_0x21d9b8),{'verbose':_0x4bba7d[_0x410931(0x182)]}),_0xe4185e=_0x29bbf3[_0x410931(0x17d)];if(_0xe4185e[_0x410931(0x17e)]===0x0&&_0x58b250['database']&&!_0x1ce00b)return console[_0x410931(0x16c)]('✖\x20No\x20tables\x20found'),console[_0x410931(0x16c)]('Database\x20\x27'+_0x58b250[_0x410931(0x179)]+_0x410931(0x167)),0x1;return console[_0x410931(0x16c)]('✔\x20Found\x20'+_0xe4185e[_0x410931(0x17e)]+_0x410931(0x16b)+(_0xe4185e[_0x410931(0x17e)]!==0x1?'s':'')),await handleSDKOutput(_0xe4185e,{..._0x4bba7d,'limit':_0x21d9b8}),0x0;}catch(_0x974726){if(_0x974726 instanceof SDKError)return console[_0x410931(0x16c)](_0x410931(0x168)+_0x974726[_0x410931(0x17a)]),_0x974726[_0x410931(0x18c)]&&console[_0x410931(0x16c)](_0x410931(0x178)+_0x974726[_0x410931(0x18c)]),0x1;throw _0x974726;}}[a31_0x42384c(0x166)](_0xf1db6a){return undefined;}}
@@ -1 +1 @@
1
- function a32_0x51d2(_0x5afc95,_0x347262){const _0x441b2d=a32_0x441b();return a32_0x51d2=function(_0x51d209,_0x27e9b6){_0x51d209=_0x51d209-0x96;let _0x50c7f4=_0x441b2d[_0x51d209];return _0x50c7f4;},a32_0x51d2(_0x5afc95,_0x347262);}const a32_0x2f7c2f=a32_0x51d2;(function(_0x20b611,_0x3adf93){const _0x4d3b61=a32_0x51d2,_0x5af15f=_0x20b611();while(!![]){try{const _0x3863a0=-parseInt(_0x4d3b61(0xb6))/0x1+-parseInt(_0x4d3b61(0x96))/0x2*(-parseInt(_0x4d3b61(0xb3))/0x3)+-parseInt(_0x4d3b61(0xa6))/0x4*(parseInt(_0x4d3b61(0xa0))/0x5)+parseInt(_0x4d3b61(0xb0))/0x6+-parseInt(_0x4d3b61(0xb9))/0x7+-parseInt(_0x4d3b61(0xbb))/0x8+parseInt(_0x4d3b61(0xb8))/0x9;if(_0x3863a0===_0x3adf93)break;else _0x5af15f['push'](_0x5af15f['shift']());}catch(_0x2b78db){_0x5af15f['push'](_0x5af15f['shift']());}}}(a32_0x441b,0x35f88));function a32_0x441b(){const _0x1fcfb4=['llm_project','Or\x20use:\x20tdx\x20context\x20--clear\x20to\x20clear\x20session\x20context\x0a','join','\x27\x20does\x20not\x20exist','733456zIVzwb','toString','validate','use','Error:\x20Profile\x20\x27','Error:\x20','\x0aUse\x20\x27tdx\x20profiles\x27\x20to\x20see\x20available\x20profiles','\x0aTip:\x20Use\x20\x27tdx\x20context\x20--clear\x27\x20to\x20clear\x20session\x20overrides','Session\x20database\x20set\x20to:\x20','parent_segment','862710KXluID','Usage:\x20tdx\x20use\x20<resource>\x20<value>\x0a','profile','294iJPKkR','message','description','238117PprwSi','length','6344658ostjlZ','1549870MKvqID','database','1599168dFxwUG','8132xYEWLg','Resources:\x20database,\x20parent_segment,\x20llm_project,\x20profile\x0a','error','Invalid\x20resource:\x20','log','session','includes','Session\x20profile\x20set\x20to:\x20','Session\x20llm_project\x20set\x20to:\x20','.\x20Must\x20be\x20one\x20of:\x20','10MwxPZE','\x20(session:\x20'];a32_0x441b=function(){return _0x1fcfb4;};return a32_0x441b();}import{BaseCommand}from'./command.js';import{saveSessionContext,getCurrentSessionPID}from'../core/session.js';import{profileExists}from'../core/profile.js';export class UseCommand extends BaseCommand{['name']=a32_0x2f7c2f(0xa9);[a32_0x2f7c2f(0xb5)]='Set\x20session-level\x20context';[a32_0x2f7c2f(0xa8)](_0x107418){const _0x3e7a4b=a32_0x2f7c2f,{args:_0x19398c}=_0x107418;if(_0x19398c[_0x3e7a4b(0xb7)]<0x2)return _0x3e7a4b(0xb1)+_0x3e7a4b(0x97)+_0x3e7a4b(0xa3)+'\x0aRun\x20\x27tdx\x20use\x20--help\x27\x20for\x20more\x20options';const _0x54c39c=_0x19398c[0x0],_0x3bd0b6=[_0x3e7a4b(0xba),_0x3e7a4b(0xaf),_0x3e7a4b(0xa2),_0x3e7a4b(0xb2)];if(!_0x3bd0b6[_0x3e7a4b(0x9c)](_0x54c39c))return _0x3e7a4b(0x99)+_0x54c39c+_0x3e7a4b(0x9f)+_0x3bd0b6[_0x3e7a4b(0xa4)](',\x20');return undefined;}async['execute'](_0x3ec202){const _0x6eac5d=a32_0x2f7c2f,{args:_0x193e82,options:_0x1aa6e6}=_0x3ec202;try{const _0x5c8ebc=_0x193e82[0x0],_0x57fd62=_0x193e82[0x1];if(_0x5c8ebc==='profile'){if(!profileExists(_0x57fd62))return console[_0x6eac5d(0x98)](_0x6eac5d(0xaa)+_0x57fd62+_0x6eac5d(0xa5)),console[_0x6eac5d(0x98)](_0x6eac5d(0xac)),0x1;const _0x321bd3=_0x1aa6e6[_0x6eac5d(0x9b)]||getCurrentSessionPID()[_0x6eac5d(0xa7)]();return saveSessionContext({'profile':_0x57fd62},_0x1aa6e6[_0x6eac5d(0x9b)]),console[_0x6eac5d(0x9a)](_0x6eac5d(0x9d)+_0x57fd62+_0x6eac5d(0xa1)+_0x321bd3+')'),console[_0x6eac5d(0x9a)](_0x6eac5d(0xad)),0x0;}const _0x4e6eaa={},_0x26b9fb=_0x1aa6e6[_0x6eac5d(0x9b)]||getCurrentSessionPID()[_0x6eac5d(0xa7)]();switch(_0x5c8ebc){case _0x6eac5d(0xba):_0x4e6eaa[_0x6eac5d(0xba)]=_0x57fd62,console['log'](_0x6eac5d(0xae)+_0x57fd62+_0x6eac5d(0xa1)+_0x26b9fb+')');break;case _0x6eac5d(0xaf):_0x4e6eaa[_0x6eac5d(0xaf)]=_0x57fd62,console[_0x6eac5d(0x9a)]('Session\x20parent_segment\x20set\x20to:\x20'+_0x57fd62+_0x6eac5d(0xa1)+_0x26b9fb+')');break;case'llm_project':_0x4e6eaa['llm_project']=_0x57fd62,console[_0x6eac5d(0x9a)](_0x6eac5d(0x9e)+_0x57fd62+_0x6eac5d(0xa1)+_0x26b9fb+')');break;}return saveSessionContext(_0x4e6eaa,_0x1aa6e6[_0x6eac5d(0x9b)]),console[_0x6eac5d(0x9a)](_0x6eac5d(0xad)),0x0;}catch(_0x2592dd){return _0x2592dd instanceof Error&&console['error'](_0x6eac5d(0xab)+_0x2592dd[_0x6eac5d(0xb4)]),0x1;}}}
1
+ const a32_0x1e2d02=a32_0x25ed;(function(_0x152599,_0xb30cf7){const _0x4d0ba3=a32_0x25ed,_0x27809d=_0x152599();while(!![]){try{const _0x348ed5=-parseInt(_0x4d0ba3(0x145))/0x1*(-parseInt(_0x4d0ba3(0x125))/0x2)+parseInt(_0x4d0ba3(0x12b))/0x3*(parseInt(_0x4d0ba3(0x13d))/0x4)+-parseInt(_0x4d0ba3(0x14a))/0x5*(parseInt(_0x4d0ba3(0x135))/0x6)+-parseInt(_0x4d0ba3(0x146))/0x7+parseInt(_0x4d0ba3(0x132))/0x8+parseInt(_0x4d0ba3(0x137))/0x9*(parseInt(_0x4d0ba3(0x129))/0xa)+parseInt(_0x4d0ba3(0x128))/0xb*(-parseInt(_0x4d0ba3(0x12a))/0xc);if(_0x348ed5===_0xb30cf7)break;else _0x27809d['push'](_0x27809d['shift']());}catch(_0x3b612c){_0x27809d['push'](_0x27809d['shift']());}}}(a32_0x1ef3,0x6b849));import{BaseCommand}from'./command.js';function a32_0x1ef3(){const _0x3cab1f=['\x20(session:\x20','3MvFFzo','4335884kiQBqd','Resources:\x20database,\x20parent_segment,\x20llm_project,\x20profile\x0a','error','message','3629870YcXOJc','length','329150rXPMPT','parent_segment','session','22cPsTch','40cHZQfh','1552956vxCVSe','1929813gynFSw','log','Set\x20session-level\x20context','\x0aTip:\x20Use\x20\x27tdx\x20context\x20--clear\x27\x20to\x20clear\x20session\x20overrides','includes','llm_project','Or\x20use:\x20tdx\x20context\x20--clear\x20to\x20clear\x20session\x20context\x0a','6193224sjRAtB','profile','Session\x20parent_segment\x20set\x20to:\x20','6MBjPPx','toString','300276jUWQgW','Usage:\x20tdx\x20use\x20<resource>\x20<value>\x0a','\x0aRun\x20\x27tdx\x20use\x20--help\x27\x20for\x20more\x20options','Session\x20profile\x20set\x20to:\x20','database','\x27\x20does\x20not\x20exist','4FCEMCP','Error:\x20','validate','use','name','join','.\x20Must\x20be\x20one\x20of:\x20'];a32_0x1ef3=function(){return _0x3cab1f;};return a32_0x1ef3();}import{saveSessionContext,getCurrentSessionPID}from'../core/session.js';function a32_0x25ed(_0x15755f,_0x4bc920){const _0x1ef3aa=a32_0x1ef3();return a32_0x25ed=function(_0x25ed95,_0x29c2cd){_0x25ed95=_0x25ed95-0x125;let _0x4f48af=_0x1ef3aa[_0x25ed95];return _0x4f48af;},a32_0x25ed(_0x15755f,_0x4bc920);}import{profileExists}from'../core/profile.js';export class UseCommand extends BaseCommand{[a32_0x1e2d02(0x141)]=a32_0x1e2d02(0x140);['description']=a32_0x1e2d02(0x12d);[a32_0x1e2d02(0x13f)](_0x22549b){const _0x224565=a32_0x1e2d02,{args:_0x78891e}=_0x22549b;if(_0x78891e[_0x224565(0x14b)]<0x2)return _0x224565(0x138)+_0x224565(0x147)+_0x224565(0x131)+_0x224565(0x139);const _0x318723=_0x78891e[0x0],_0x23ec99=[_0x224565(0x13b),_0x224565(0x126),_0x224565(0x130),'profile'];if(!_0x23ec99[_0x224565(0x12f)](_0x318723))return'Invalid\x20resource:\x20'+_0x318723+_0x224565(0x143)+_0x23ec99[_0x224565(0x142)](',\x20');return undefined;}async['execute'](_0x23f6d9){const _0x4cde9d=a32_0x1e2d02,{args:_0x1ebdd8,options:_0x18a83a}=_0x23f6d9;try{const _0x5cefe1=_0x1ebdd8[0x0],_0x4cd752=_0x1ebdd8[0x1];if(_0x5cefe1===_0x4cde9d(0x133)){if(!profileExists(_0x4cd752))return console['error']('Error:\x20Profile\x20\x27'+_0x4cd752+_0x4cde9d(0x13c)),console[_0x4cde9d(0x148)]('\x0aUse\x20\x27tdx\x20profiles\x27\x20to\x20see\x20available\x20profiles'),0x1;const _0x314deb=_0x18a83a[_0x4cde9d(0x127)]||getCurrentSessionPID()[_0x4cde9d(0x136)]();return saveSessionContext({'profile':_0x4cd752},_0x18a83a['session']),console[_0x4cde9d(0x12c)](_0x4cde9d(0x13a)+_0x4cd752+_0x4cde9d(0x144)+_0x314deb+')'),console['log'](_0x4cde9d(0x12e)),0x0;}const _0x16b21a={},_0x4c67c9=_0x18a83a[_0x4cde9d(0x127)]||getCurrentSessionPID()[_0x4cde9d(0x136)]();switch(_0x5cefe1){case'database':_0x16b21a[_0x4cde9d(0x13b)]=_0x4cd752,console[_0x4cde9d(0x12c)]('Session\x20database\x20set\x20to:\x20'+_0x4cd752+'\x20(session:\x20'+_0x4c67c9+')');break;case _0x4cde9d(0x126):_0x16b21a[_0x4cde9d(0x126)]=_0x4cd752,console[_0x4cde9d(0x12c)](_0x4cde9d(0x134)+_0x4cd752+'\x20(session:\x20'+_0x4c67c9+')');break;case'llm_project':_0x16b21a[_0x4cde9d(0x130)]=_0x4cd752,console[_0x4cde9d(0x12c)]('Session\x20llm_project\x20set\x20to:\x20'+_0x4cd752+'\x20(session:\x20'+_0x4c67c9+')');break;}return saveSessionContext(_0x16b21a,_0x18a83a[_0x4cde9d(0x127)]),console[_0x4cde9d(0x12c)]('\x0aTip:\x20Use\x20\x27tdx\x20context\x20--clear\x27\x20to\x20clear\x20session\x20overrides'),0x0;}catch(_0x5c2996){return _0x5c2996 instanceof Error&&console[_0x4cde9d(0x148)](_0x4cde9d(0x13e)+_0x5c2996[_0x4cde9d(0x149)]),0x1;}}}
@@ -1 +1 @@
1
- const a33_0x47e5ec=a33_0x11c0;(function(_0x396042,_0x365320){const _0x2075c8=a33_0x11c0,_0x42696c=_0x396042();while(!![]){try{const _0x4ee476=parseInt(_0x2075c8(0x1f5))/0x1+-parseInt(_0x2075c8(0x1e1))/0x2*(-parseInt(_0x2075c8(0x1cc))/0x3)+parseInt(_0x2075c8(0x1b4))/0x4+parseInt(_0x2075c8(0x21d))/0x5+parseInt(_0x2075c8(0x1dd))/0x6*(parseInt(_0x2075c8(0x1eb))/0x7)+-parseInt(_0x2075c8(0x1ed))/0x8+-parseInt(_0x2075c8(0x204))/0x9;if(_0x4ee476===_0x365320)break;else _0x42696c['push'](_0x42696c['shift']());}catch(_0x162c34){_0x42696c['push'](_0x42696c['shift']());}}}(a33_0x5b00,0x9d368));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleSDKOutput}from'../utils/command-output.js';import{withSpinner}from'../utils/spinner.js';function a33_0x5b00(){const _0x5e771a=['\x20attempt','length','cause','fromTask','substring','kill','From\x20task:\x20','Attempt\x20ID:\x20','attempt:','Project\x20directory:\x20','attempt','Are\x20you\x20sure\x20you\x20want\x20to\x20kill\x20attempt\x20','\x22?\x20This\x20cannot\x20be\x20undone.','workflow:sessions','status','Listing\x20workflow\x20projects...','parse','retrySession','reason','Retrying\x20session...','1749705dxdllv','✔\x20Found\x20','error','download','Killing\x20attempt...','Error:\x20Attempt\x20ID\x20is\x20required','Validation:\x20skipped','workflow:workflows','...','Error:\x20Session\x20ID\x20or\x20attempt\x20ID\x20is\x20required','workflow','Error:\x20Attempt\x20ID\x20and\x20task\x20name\x20are\x20required','delete','readFile','session:','Error:\x20','List\x20workflows','Are\x20you\x20sure\x20you\x20want\x20to\x20retry\x20','\x20\x20Project\x20ID:\x20','startsWith','message','Listing\x20workflow\x20attempts...','Output\x20directory:\x20','workflow:tasks','workflows','885320udhrMS','\x20project','fs/promises','projectId','Retrying\x20attempt...','data','Usage:\x20workflow:download\x20<project-name>\x20[output-dir]','Project:\x20','Error:\x20Invalid\x20pattern.\x20Use\x20format:\x20project\x20or\x20project.workflow','projects','Error:\x20Project\x20name\x20or\x20ID\x20is\x20required','Task\x20name:\x20','description','tasks','\x20\x20Session\x20ID:\x20','List\x20workflow\x20attempts','limit','Filter:\x20','Kill\x20a\x20running\x20attempt','Deleting\x20project\x20','includeRetried','sessionId','Show\x20tasks\x20for\x20an\x20attempt','Show\x20logs\x20for\x20a\x20specific\x20task','327lbEzbb','Delete\x20workflow\x20project\x20from\x20Treasure\x20Data','\x20session','Project\x20name:\x20','Filter:\x20project=','\x20task','Getting\x20attempt\x20details...','workflow:kill','force','\x20log\x20entr','List\x20workflow\x20execution\x20sessions','from','Project\x20filter:\x20','Push\x20workflow\x20project\x20to\x20Treasure\x20Data','Error:\x20Project\x20name\x20is\x20required','workflow:delete','Including\x20subtasks:\x20yes','36108AsLtmI','\x20\x20Cause:\x20','Status:\x20','projectName','8828eebfHx','✔\x20Downloaded\x20','filesExtracted','Params:\x20','Getting\x20attempt\x20tasks...','\x20workflow','Reason:\x20','params','workflow:attempt','Error:\x20Target\x20must\x20be\x20prefixed\x20with\x20\x22session:\x22\x20or\x20\x22attempt:\x22','1127QlEKbg','workflow:projects','1627280wWkgwE','List\x20all\x20workflow\x20projects','yes','verbose','name','✔\x20Pushed\x20','✔\x20Deleted\x20project\x20','session','968352VJWEdw','Cancelled','Revision:\x20','logs','workflow:push','retryAttempt','revision','sessions','attemptId','execute','workflow:logs','attempts','stat','workflow:download','Listing\x20workflow\x20sessions...','19280637TfxsQg','split','\x20\x20Location:\x20','Target:\x20','offset'];a33_0x5b00=function(){return _0x5e771a;};return a33_0x5b00();}import{confirm}from'../utils/prompt.js';export class WorkflowProjectsCommand extends BaseCommand{['name']=a33_0x47e5ec(0x1ec);[a33_0x47e5ec(0x1c0)]=a33_0x47e5ec(0x1ee);async[a33_0x47e5ec(0x1fe)](_0x51ecb9){const _0x594276=a33_0x47e5ec,{options:_0x3b4b5d,args:_0x47c3b0,tdx:_0x54f2e7}=_0x51ecb9,_0x3b8714=_0x47c3b0[0x0];try{_0x3b4b5d['verbose']&&_0x3b8714&&console[_0x594276(0x21f)]('Pattern:\x20'+_0x3b8714);const _0x2e6413=await withSpinner(_0x594276(0x218),()=>_0x54f2e7[_0x594276(0x227)][_0x594276(0x1bd)](_0x3b8714,{'limit':_0x3b4b5d[_0x594276(0x1c4)]}),{'verbose':_0x3b4b5d[_0x594276(0x1f0)]}),_0x1b215d=_0x2e6413[_0x594276(0x1b9)];return console[_0x594276(0x21f)](_0x594276(0x21e)+_0x1b215d[_0x594276(0x20a)]+_0x594276(0x1b5)+(_0x1b215d[_0x594276(0x20a)]!==0x1?'s':'')),await handleSDKOutput(_0x1b215d,_0x3b4b5d),0x0;}catch(_0x42fbb3){if(_0x42fbb3 instanceof SDKError)return console[_0x594276(0x21f)](_0x594276(0x1aa)+_0x42fbb3['message']),_0x42fbb3['cause']&&console['error']('\x20\x20Cause:\x20'+_0x42fbb3['cause']),0x1;throw _0x42fbb3;}}}export class WorkflowWorkflowsCommand extends BaseCommand{['name']=a33_0x47e5ec(0x224);[a33_0x47e5ec(0x1c0)]=a33_0x47e5ec(0x1ab);async[a33_0x47e5ec(0x1fe)](_0x485698){const _0x374ff1=a33_0x47e5ec,{options:_0x14fc0c,args:_0xbb0606,tdx:_0x2ffb94}=_0x485698,_0x286959=_0xbb0606[0x0];try{_0x14fc0c[_0x374ff1(0x1f0)]&&_0x286959&&console[_0x374ff1(0x21f)](_0x374ff1(0x1d8)+_0x286959);const _0x17823d=await withSpinner('Listing\x20workflows...',()=>_0x2ffb94['workflow'][_0x374ff1(0x1b3)](_0x286959,{'limit':_0x14fc0c[_0x374ff1(0x1c4)]}),{'verbose':_0x14fc0c[_0x374ff1(0x1f0)]}),_0x5f5180=_0x17823d[_0x374ff1(0x1b9)];return console[_0x374ff1(0x21f)](_0x374ff1(0x21e)+_0x5f5180[_0x374ff1(0x20a)]+_0x374ff1(0x1e6)+(_0x5f5180[_0x374ff1(0x20a)]!==0x1?'s':'')),await handleSDKOutput(_0x5f5180,_0x14fc0c),0x0;}catch(_0x5ab76e){if(_0x5ab76e instanceof SDKError)return console['error'](_0x374ff1(0x1aa)+_0x5ab76e['message']),_0x5ab76e[_0x374ff1(0x20b)]&&console['error']('\x20\x20Cause:\x20'+_0x5ab76e['cause']),0x1;throw _0x5ab76e;}}}export class WorkflowSessionsCommand extends BaseCommand{[a33_0x47e5ec(0x1f1)]=a33_0x47e5ec(0x216);['description']=a33_0x47e5ec(0x1d6);async[a33_0x47e5ec(0x1fe)](_0x50e19d){const _0x1d20c9=a33_0x47e5ec,{options:_0x5038fe,args:_0x4bdbfa,tdx:_0x3677fb}=_0x50e19d;let _0xfa24d2,_0x74de72;if(_0x4bdbfa[0x0]){const _0x2520f9=_0x4bdbfa[0x0][_0x1d20c9(0x205)]('.');if(_0x2520f9[_0x1d20c9(0x20a)]===0x1)_0xfa24d2=_0x2520f9[0x0];else{if(_0x2520f9[_0x1d20c9(0x20a)]===0x2)[_0xfa24d2,_0x74de72]=_0x2520f9;else return console[_0x1d20c9(0x21f)](_0x1d20c9(0x1bc)),0x1;}}try{if(_0x5038fe[_0x1d20c9(0x1f0)]){if(_0xfa24d2&&_0x74de72)console[_0x1d20c9(0x21f)]('Filter:\x20'+_0xfa24d2+'.'+_0x74de72);else _0xfa24d2&&console['error'](_0x1d20c9(0x1d0)+_0xfa24d2);const _0xcc41d7=_0x5038fe['status'];_0xcc41d7&&console[_0x1d20c9(0x21f)](_0x1d20c9(0x1df)+_0xcc41d7);}const _0x2ca66b=await withSpinner(_0x1d20c9(0x203),()=>_0x3677fb['workflow'][_0x1d20c9(0x1fc)]({'projectName':_0xfa24d2,'workflowName':_0x74de72,'status':_0x5038fe[_0x1d20c9(0x217)],'fromTime':_0x5038fe[_0x1d20c9(0x1d7)],'toTime':_0x5038fe['to'],'limit':_0x5038fe[_0x1d20c9(0x1c4)]}),{'verbose':_0x5038fe[_0x1d20c9(0x1f0)]}),_0x4fb698=_0x2ca66b['data'];return console[_0x1d20c9(0x21f)](_0x1d20c9(0x21e)+_0x4fb698['length']+_0x1d20c9(0x1ce)+(_0x4fb698[_0x1d20c9(0x20a)]!==0x1?'s':'')),await handleSDKOutput(_0x4fb698,_0x5038fe),0x0;}catch(_0x23d27b){if(_0x23d27b instanceof SDKError)return console[_0x1d20c9(0x21f)](_0x1d20c9(0x1aa)+_0x23d27b[_0x1d20c9(0x1af)]),_0x23d27b[_0x1d20c9(0x20b)]&&console['error'](_0x1d20c9(0x1de)+_0x23d27b[_0x1d20c9(0x20b)]),0x1;throw _0x23d27b;}}}export class WorkflowAttemptsCommand extends BaseCommand{['name']='workflow:attempts';[a33_0x47e5ec(0x1c0)]=a33_0x47e5ec(0x1c3);async[a33_0x47e5ec(0x1fe)](_0x48f1d9){const _0x54902b=a33_0x47e5ec,{options:_0x64f6bc,args:_0x3903c0,tdx:_0x2e9d23}=_0x48f1d9;let _0x5e69a6,_0x3ccf6d;if(_0x3903c0[0x0]){const _0x1c2448=_0x3903c0[0x0][_0x54902b(0x205)]('.');if(_0x1c2448[_0x54902b(0x20a)]===0x1)_0x5e69a6=_0x1c2448[0x0];else{if(_0x1c2448[_0x54902b(0x20a)]===0x2)[_0x5e69a6,_0x3ccf6d]=_0x1c2448;else return console['error'](_0x54902b(0x1bc)),0x1;}}try{const _0x2425ea=_0x64f6bc[_0x54902b(0x1c8)];if(_0x64f6bc[_0x54902b(0x1f0)]){if(_0x5e69a6&&_0x3ccf6d)console['error'](_0x54902b(0x1c5)+_0x5e69a6+'.'+_0x3ccf6d);else _0x5e69a6&&console['error']('Filter:\x20project='+_0x5e69a6);_0x2425ea&&console['error']('Include\x20retried:\x20yes');}const _0x3830e7=await withSpinner(_0x54902b(0x1b0),()=>_0x2e9d23['workflow'][_0x54902b(0x200)]({'projectName':_0x5e69a6,'workflowName':_0x3ccf6d,'includeRetried':_0x2425ea,'limit':_0x64f6bc[_0x54902b(0x1c4)]}),{'verbose':_0x64f6bc[_0x54902b(0x1f0)]}),_0x20520b=_0x3830e7[_0x54902b(0x1b9)];return console['error'](_0x54902b(0x21e)+_0x20520b[_0x54902b(0x20a)]+_0x54902b(0x209)+(_0x20520b[_0x54902b(0x20a)]!==0x1?'s':'')),await handleSDKOutput(_0x20520b,_0x64f6bc),0x0;}catch(_0x49abc2){if(_0x49abc2 instanceof SDKError)return console[_0x54902b(0x21f)](_0x54902b(0x1aa)+_0x49abc2['message']),_0x49abc2[_0x54902b(0x20b)]&&console['error']('\x20\x20Cause:\x20'+_0x49abc2[_0x54902b(0x20b)]),0x1;throw _0x49abc2;}}}export class WorkflowAttemptCommand extends BaseCommand{[a33_0x47e5ec(0x1f1)]=a33_0x47e5ec(0x1e9);[a33_0x47e5ec(0x1c0)]='Show\x20specific\x20attempt\x20details';async[a33_0x47e5ec(0x1fe)](_0x5c1c43){const _0x345a64=a33_0x47e5ec,{options:_0x2b8b87,args:_0x227f2d,tdx:_0x3e1224}=_0x5c1c43,_0x1535a0=_0x227f2d[0x0];if(!_0x1535a0)return console['error'](_0x345a64(0x222)),0x1;try{_0x2b8b87[_0x345a64(0x1f0)]&&console[_0x345a64(0x21f)](_0x345a64(0x210)+_0x1535a0);const _0x3950c9=await withSpinner(_0x345a64(0x1d2),()=>_0x3e1224[_0x345a64(0x227)][_0x345a64(0x213)](_0x1535a0),{'verbose':_0x2b8b87[_0x345a64(0x1f0)]}),_0x447e96=_0x3950c9[_0x345a64(0x1b9)];return await handleSDKOutput([_0x447e96],_0x2b8b87),0x0;}catch(_0x42bd64){if(_0x42bd64 instanceof SDKError)return console[_0x345a64(0x21f)](_0x345a64(0x1aa)+_0x42bd64[_0x345a64(0x1af)]),_0x42bd64['cause']&&console['error'](_0x345a64(0x1de)+_0x42bd64[_0x345a64(0x20b)]),0x1;throw _0x42bd64;}}}function a33_0x11c0(_0x58366d,_0x36ce15){const _0x5b00fb=a33_0x5b00();return a33_0x11c0=function(_0x11c0d5,_0x705c98){_0x11c0d5=_0x11c0d5-0x1aa;let _0x18694a=_0x5b00fb[_0x11c0d5];return _0x18694a;},a33_0x11c0(_0x58366d,_0x36ce15);}export class WorkflowTasksCommand extends BaseCommand{['name']=a33_0x47e5ec(0x1b2);[a33_0x47e5ec(0x1c0)]=a33_0x47e5ec(0x1ca);async[a33_0x47e5ec(0x1fe)](_0x2c2591){const _0x28ed27=a33_0x47e5ec,{options:_0xa1d50,args:_0x3cc29b,tdx:_0x2442a7}=_0x2c2591,_0x3e9e83=_0x3cc29b[0x0];if(!_0x3e9e83)return console[_0x28ed27(0x21f)](_0x28ed27(0x222)),0x1;try{const _0x27e66a=_0xa1d50['includeSubtasks'];_0xa1d50[_0x28ed27(0x1f0)]&&(console['error'](_0x28ed27(0x210)+_0x3e9e83),_0x27e66a&&console[_0x28ed27(0x21f)](_0x28ed27(0x1dc)));const _0x4b094b=await withSpinner(_0x28ed27(0x1e5),()=>_0x2442a7['workflow'][_0x28ed27(0x1c1)](_0x3e9e83,_0x27e66a||![]),{'verbose':_0xa1d50[_0x28ed27(0x1f0)]}),_0x1f39d1=_0x4b094b[_0x28ed27(0x1b9)];return console[_0x28ed27(0x21f)](_0x28ed27(0x21e)+_0x1f39d1[_0x28ed27(0x20a)]+_0x28ed27(0x1d1)+(_0x1f39d1['length']!==0x1?'s':'')),await handleSDKOutput(_0x1f39d1,_0xa1d50),0x0;}catch(_0x435f4e){if(_0x435f4e instanceof SDKError)return console[_0x28ed27(0x21f)]('Error:\x20'+_0x435f4e[_0x28ed27(0x1af)]),_0x435f4e['cause']&&console[_0x28ed27(0x21f)]('\x20\x20Cause:\x20'+_0x435f4e['cause']),0x1;throw _0x435f4e;}}}export class WorkflowLogsCommand extends BaseCommand{[a33_0x47e5ec(0x1f1)]=a33_0x47e5ec(0x1ff);[a33_0x47e5ec(0x1c0)]=a33_0x47e5ec(0x1cb);async[a33_0x47e5ec(0x1fe)](_0x2b3d5f){const _0x4ef17a=a33_0x47e5ec,{options:_0x194638,args:_0x44e760,tdx:_0x5cc9a9}=_0x2b3d5f,_0x2e8739=_0x44e760[0x0],_0x342fc0=_0x44e760[0x1];if(!_0x2e8739||!_0x342fc0)return console[_0x4ef17a(0x21f)](_0x4ef17a(0x228)),0x1;try{_0x194638['verbose']&&(console[_0x4ef17a(0x21f)](_0x4ef17a(0x210)+_0x2e8739),console[_0x4ef17a(0x21f)](_0x4ef17a(0x1bf)+_0x342fc0));const _0xd94e15=_0x194638[_0x4ef17a(0x208)],_0xb4294b=await withSpinner('Getting\x20task\x20logs...',()=>_0x5cc9a9[_0x4ef17a(0x227)][_0x4ef17a(0x1f8)](_0x2e8739,_0x342fc0,{'offset':_0xd94e15,'limit':_0x194638[_0x4ef17a(0x1c4)]}),{'verbose':_0x194638[_0x4ef17a(0x1f0)]}),_0x4427ad=_0xb4294b[_0x4ef17a(0x1b9)];return console[_0x4ef17a(0x21f)]('✔\x20Found\x20'+_0x4427ad[_0x4ef17a(0x20a)]+_0x4ef17a(0x1d5)+(_0x4427ad[_0x4ef17a(0x20a)]!==0x1?'ies':'y')),await handleSDKOutput(_0x4427ad,_0x194638),0x0;}catch(_0x5956aa){if(_0x5956aa instanceof SDKError)return console[_0x4ef17a(0x21f)](_0x4ef17a(0x1aa)+_0x5956aa['message']),_0x5956aa[_0x4ef17a(0x20b)]&&console['error']('\x20\x20Cause:\x20'+_0x5956aa[_0x4ef17a(0x20b)]),0x1;throw _0x5956aa;}}}export class WorkflowKillCommand extends BaseCommand{[a33_0x47e5ec(0x1f1)]=a33_0x47e5ec(0x1d3);[a33_0x47e5ec(0x1c0)]=a33_0x47e5ec(0x1c6);async['execute'](_0x3d6464){const _0x49e97e=a33_0x47e5ec,{options:_0x2b7d09,args:_0x40f930,tdx:_0x7303e6}=_0x3d6464,_0x54e24d=_0x40f930[0x0];if(!_0x54e24d)return console[_0x49e97e(0x21f)](_0x49e97e(0x222)),0x1;try{const _0x27b6c8=_0x2b7d09[_0x49e97e(0x21b)];_0x2b7d09[_0x49e97e(0x1f0)]&&(console[_0x49e97e(0x21f)](_0x49e97e(0x210)+_0x54e24d),_0x27b6c8&&console[_0x49e97e(0x21f)](_0x49e97e(0x1e7)+_0x27b6c8));if(!_0x2b7d09[_0x49e97e(0x1ef)]){const _0x11564c=await confirm(_0x49e97e(0x214)+_0x54e24d+'?');if(!_0x11564c)return console[_0x49e97e(0x21f)]('Cancelled'),0x0;}const _0x5e25a2=await withSpinner(_0x49e97e(0x221),()=>_0x7303e6[_0x49e97e(0x227)][_0x49e97e(0x20e)](_0x54e24d,_0x27b6c8),{'verbose':_0x2b7d09[_0x49e97e(0x1f0)]}),_0x45b43c=_0x5e25a2[_0x49e97e(0x1b9)];return console[_0x49e97e(0x21f)]('✔\x20'+_0x45b43c),0x0;}catch(_0x2be95f){if(_0x2be95f instanceof SDKError)return console['error'](_0x49e97e(0x1aa)+_0x2be95f[_0x49e97e(0x1af)]),_0x2be95f['cause']&&console[_0x49e97e(0x21f)](_0x49e97e(0x1de)+_0x2be95f[_0x49e97e(0x20b)]),0x1;throw _0x2be95f;}}}export class WorkflowRetryCommand extends BaseCommand{[a33_0x47e5ec(0x1f1)]='workflow:retry';[a33_0x47e5ec(0x1c0)]='Retry\x20a\x20session\x20or\x20attempt';async[a33_0x47e5ec(0x1fe)](_0x5dfcd9){const _0x37439a=a33_0x47e5ec,{options:_0x468e09,args:_0x33bd7b,tdx:_0x4fa3fd}=_0x5dfcd9,_0x3c42f5=_0x33bd7b[0x0];if(!_0x3c42f5)return console[_0x37439a(0x21f)](_0x37439a(0x226)),console[_0x37439a(0x21f)]('Usage:\x20workflow\x20retry\x20session:<id>\x20or\x20workflow\x20retry\x20attempt:<id>'),0x1;let _0xdf8b71=![],_0x5a20c0=_0x3c42f5;if(_0x3c42f5[_0x37439a(0x1ae)](_0x37439a(0x22b)))_0xdf8b71=!![],_0x5a20c0=_0x3c42f5[_0x37439a(0x20d)](0x8);else{if(_0x3c42f5[_0x37439a(0x1ae)](_0x37439a(0x211)))_0xdf8b71=![],_0x5a20c0=_0x3c42f5['substring'](0x8);else return console[_0x37439a(0x21f)](_0x37439a(0x1ea)),console[_0x37439a(0x21f)]('Usage:\x20workflow\x20retry\x20session:<id>\x20or\x20workflow\x20retry\x20attempt:<id>'),0x1;}try{const _0x21fdc2=_0x468e09[_0x37439a(0x20c)],_0x226bee=_0x468e09['resumeFrom'],_0x196341=_0x468e09[_0x37439a(0x1e8)],_0x295868=_0x468e09[_0x37439a(0x1d4)];_0x468e09[_0x37439a(0x1f0)]&&(console[_0x37439a(0x21f)](_0x37439a(0x207)+(_0xdf8b71?_0x37439a(0x1f4):'attempt')+'\x20'+_0x5a20c0),_0x21fdc2&&console['error'](_0x37439a(0x20f)+_0x21fdc2),_0x226bee&&console['error']('Resume\x20from:\x20'+_0x226bee),_0x196341&&console[_0x37439a(0x21f)](_0x37439a(0x1e4)+_0x196341),_0x295868&&console[_0x37439a(0x21f)]('Force:\x20yes'));let _0x19e8c0;if(_0x196341)try{if(_0x196341['startsWith']('@')){const _0x22e6a7=await import(_0x37439a(0x1b6)),_0x2229aa=_0x196341[_0x37439a(0x20d)](0x1),_0x363b55=await _0x22e6a7[_0x37439a(0x22a)](_0x2229aa,'utf-8');_0x19e8c0=JSON[_0x37439a(0x219)](_0x363b55);}else _0x19e8c0=JSON['parse'](_0x196341);}catch{return console[_0x37439a(0x21f)]('Error:\x20Invalid\x20JSON\x20in\x20--params'),0x1;}if(!_0x468e09[_0x37439a(0x1ef)]){const _0xabaf7c=await confirm(_0x37439a(0x1ac)+(_0xdf8b71?'session':_0x37439a(0x213))+'\x20'+_0x5a20c0+'?');if(!_0xabaf7c)return console[_0x37439a(0x21f)](_0x37439a(0x1f6)),0x0;}let _0x41bed3;_0xdf8b71?_0x41bed3=await withSpinner(_0x37439a(0x21c),()=>_0x4fa3fd[_0x37439a(0x227)][_0x37439a(0x21a)](_0x5a20c0,{'fromTask':_0x21fdc2,'retryParams':_0x19e8c0}),{'verbose':_0x468e09['verbose']}):_0x41bed3=await withSpinner(_0x37439a(0x1b8),()=>_0x4fa3fd[_0x37439a(0x227)][_0x37439a(0x1fa)](_0x5a20c0,{'resumeFrom':_0x226bee,'retryParams':_0x19e8c0,'force':_0x295868}),{'verbose':_0x468e09['verbose']});const _0x132ec1=_0x41bed3[_0x37439a(0x1b9)];return console['error']('✔\x20Retry\x20started'),console['error']('\x20\x20New\x20attempt\x20ID:\x20'+_0x132ec1[_0x37439a(0x1fd)]),console[_0x37439a(0x21f)](_0x37439a(0x1c2)+_0x132ec1[_0x37439a(0x1c9)]),0x0;}catch(_0x3e79c7){if(_0x3e79c7 instanceof SDKError)return console[_0x37439a(0x21f)](_0x37439a(0x1aa)+_0x3e79c7[_0x37439a(0x1af)]),_0x3e79c7[_0x37439a(0x20b)]&&console[_0x37439a(0x21f)](_0x37439a(0x1de)+_0x3e79c7[_0x37439a(0x20b)]),0x1;throw _0x3e79c7;}}}export class WorkflowDownloadCommand extends BaseCommand{[a33_0x47e5ec(0x1f1)]=a33_0x47e5ec(0x202);['description']='Download\x20workflow\x20project\x20from\x20Treasure\x20Data';async[a33_0x47e5ec(0x1fe)](_0x1596dd){const _0xf4a2e5=a33_0x47e5ec,{options:_0x5a6b6a,args:_0x456bbd,tdx:_0x5703b3}=_0x1596dd,_0x3f4399=_0x456bbd[0x0],_0x12d030=_0x456bbd[0x1]||'.';if(!_0x3f4399)return console[_0xf4a2e5(0x21f)](_0xf4a2e5(0x1da)),console['error'](_0xf4a2e5(0x1ba)),0x1;const _0x2456a6=_0x5a6b6a[_0xf4a2e5(0x1fb)];_0x5a6b6a[_0xf4a2e5(0x1f0)]&&(console[_0xf4a2e5(0x21f)](_0xf4a2e5(0x1bb)+_0x3f4399),console[_0xf4a2e5(0x21f)](_0xf4a2e5(0x1b1)+_0x12d030),_0x2456a6&&console[_0xf4a2e5(0x21f)](_0xf4a2e5(0x1f7)+_0x2456a6));const _0x1d33c3=await withSpinner('Downloading\x20project\x20'+_0x3f4399+_0xf4a2e5(0x225),()=>_0x5703b3['workflow'][_0xf4a2e5(0x220)](_0x3f4399,_0x12d030,{'revision':_0x2456a6}),{'verbose':_0x5a6b6a[_0xf4a2e5(0x1f0)]}),_0x2a5537=_0x1d33c3['data'];return console[_0xf4a2e5(0x21f)](_0xf4a2e5(0x1e2)+_0x2a5537[_0xf4a2e5(0x1e0)]),console['error']('\x20\x20Revision:\x20'+_0x2a5537['revision']),console['error']('\x20\x20Files\x20extracted:\x20'+_0x2a5537[_0xf4a2e5(0x1e3)]),console[_0xf4a2e5(0x21f)](_0xf4a2e5(0x206)+_0x12d030+'/'+_0x2a5537['projectName']),0x0;}}export class WorkflowPushCommand extends BaseCommand{['name']=a33_0x47e5ec(0x1f9);['description']=a33_0x47e5ec(0x1d9);async[a33_0x47e5ec(0x1fe)](_0x5e7de9){const _0x308b48=a33_0x47e5ec,{options:_0x5af2cd,args:_0x5ed8c0,tdx:_0xc2d1ef}=_0x5e7de9;let _0x33a223='.',_0x3e50ac=_0x5af2cd['name'];if(_0x5ed8c0[0x0]){const {promises:_0x52624a}=await import('fs');try{const _0xa8d989=await _0x52624a[_0x308b48(0x201)](_0x5ed8c0[0x0]);if(_0xa8d989['isDirectory']())_0x33a223=_0x5ed8c0[0x0];else return console[_0x308b48(0x21f)](_0x308b48(0x1aa)+_0x5ed8c0[0x0]+'\x20is\x20not\x20a\x20directory'),0x1;}catch{_0x3e50ac=_0x5ed8c0[0x0],_0x33a223='.';}}const _0x1b1f2e=_0x5af2cd[_0x308b48(0x1fb)],_0x31239f=_0x5af2cd['skipValidation'];_0x5af2cd[_0x308b48(0x1f0)]&&(console[_0x308b48(0x21f)](_0x308b48(0x212)+_0x33a223),_0x3e50ac&&console[_0x308b48(0x21f)](_0x308b48(0x1cf)+_0x3e50ac),_0x1b1f2e&&console[_0x308b48(0x21f)]('Revision:\x20'+_0x1b1f2e),_0x31239f&&console[_0x308b48(0x21f)](_0x308b48(0x223)));const _0x3c1807=await withSpinner('Pushing\x20workflow\x20project...',()=>_0xc2d1ef[_0x308b48(0x227)]['push'](_0x33a223,{'projectName':_0x3e50ac,'revision':_0x1b1f2e,'skipValidation':_0x31239f}),{'verbose':_0x5af2cd[_0x308b48(0x1f0)]}),_0x389c8a=_0x3c1807['data'];return console['error'](_0x308b48(0x1f2)+_0x389c8a['projectName']),console[_0x308b48(0x21f)](_0x308b48(0x1ad)+_0x389c8a[_0x308b48(0x1b7)]),console[_0x308b48(0x21f)]('\x20\x20Revision:\x20'+_0x389c8a[_0x308b48(0x1fb)]),0x0;}}export class WorkflowDeleteCommand extends BaseCommand{[a33_0x47e5ec(0x1f1)]=a33_0x47e5ec(0x1db);[a33_0x47e5ec(0x1c0)]=a33_0x47e5ec(0x1cd);async[a33_0x47e5ec(0x1fe)](_0x565609){const _0x1c26a5=a33_0x47e5ec,{options:_0x476f50,args:_0x3509b7,tdx:_0x27c811}=_0x565609,_0x2f83c9=_0x3509b7[0x0];if(!_0x2f83c9)return console[_0x1c26a5(0x21f)](_0x1c26a5(0x1be)),console[_0x1c26a5(0x21f)]('Usage:\x20workflow:delete\x20<project-name-or-id>'),0x1;_0x476f50[_0x1c26a5(0x1f0)]&&console['error'](_0x1c26a5(0x1bb)+_0x2f83c9);if(!_0x476f50[_0x1c26a5(0x1ef)]){const _0x21fa77=await confirm('Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20project\x20\x22'+_0x2f83c9+_0x1c26a5(0x215));if(!_0x21fa77)return console[_0x1c26a5(0x21f)](_0x1c26a5(0x1f6)),0x0;}const _0x2ee61c=await withSpinner(_0x1c26a5(0x1c7)+_0x2f83c9+_0x1c26a5(0x225),()=>_0x27c811[_0x1c26a5(0x227)][_0x1c26a5(0x229)](_0x2f83c9),{'verbose':_0x476f50[_0x1c26a5(0x1f0)]}),_0x1c4a1f=_0x2ee61c['data'];return console['error'](_0x1c26a5(0x1f3)+_0x1c4a1f[_0x1c26a5(0x1e0)]),console[_0x1c26a5(0x21f)]('\x20\x20Project\x20ID:\x20'+_0x1c4a1f['projectId']),0x0;}}
1
+ const a33_0x21671f=a33_0x4942;(function(_0x46fce9,_0x338ede){const _0x1b7e68=a33_0x4942,_0x221a9e=_0x46fce9();while(!![]){try{const _0x337788=-parseInt(_0x1b7e68(0x1a8))/0x1*(-parseInt(_0x1b7e68(0x217))/0x2)+-parseInt(_0x1b7e68(0x1ed))/0x3+parseInt(_0x1b7e68(0x1ea))/0x4*(parseInt(_0x1b7e68(0x1cf))/0x5)+-parseInt(_0x1b7e68(0x19f))/0x6+-parseInt(_0x1b7e68(0x1a6))/0x7+parseInt(_0x1b7e68(0x1a4))/0x8*(parseInt(_0x1b7e68(0x201))/0x9)+-parseInt(_0x1b7e68(0x1df))/0xa*(-parseInt(_0x1b7e68(0x1fa))/0xb);if(_0x337788===_0x338ede)break;else _0x221a9e['push'](_0x221a9e['shift']());}catch(_0x40487f){_0x221a9e['push'](_0x221a9e['shift']());}}}(a33_0x3af4,0xf024e));import{BaseCommand}from'./command.js';function a33_0x3af4(){const _0x720c0b=['\x20\x20Project\x20ID:\x20','\x20\x20Cause:\x20','8352858WNFEDR','workflow:sessions','sessions','attempts','\x20session','195256mEQxnH','Error:\x20Target\x20must\x20be\x20prefixed\x20with\x20\x22session:\x22\x20or\x20\x22attempt:\x22','6563249VpYLkV','Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20project\x20\x22','21GfpXQl','workflow:push','...','workflow:delete','Error:\x20Project\x20name\x20or\x20ID\x20is\x20required','Filter:\x20project=','retryAttempt','params','Project\x20directory:\x20','projectId','startsWith','execute','workflow:attempts','Cancelled','Reason:\x20','yes','\x20attempt','Attempt\x20ID:\x20','Include\x20retried:\x20yes','Error:\x20Session\x20ID\x20or\x20attempt\x20ID\x20is\x20required','Including\x20subtasks:\x20yes','Retrying\x20attempt...','utf-8','parse','Error:\x20Project\x20name\x20is\x20required','status','From\x20task:\x20','\x20workflow','workflow:tasks','Push\x20workflow\x20project\x20to\x20Treasure\x20Data','Filter:\x20','Status:\x20','Error:\x20','\x20log\x20entr','limit','Resume\x20from:\x20','name','Output\x20directory:\x20','attempt','3055oLzPyj','Download\x20workflow\x20project\x20from\x20Treasure\x20Data','Revision:\x20','workflows','\x20\x20Files\x20extracted:\x20','✔\x20Found\x20','includeSubtasks','Pushing\x20workflow\x20project...','✔\x20Retry\x20started','length','workflow','\x20\x20New\x20attempt\x20ID:\x20','List\x20workflow\x20attempts','session','Getting\x20task\x20logs...','substring','22972910qNsmWg','logs','tasks','Error:\x20Invalid\x20pattern.\x20Use\x20format:\x20project\x20or\x20project.workflow','✔\x20Deleted\x20project\x20','projectName','isDirectory','session:','stat','error','resumeFrom','4484rLsxZG','workflow:retry','workflow:kill','2649768ltTpLS','\x20task','readFile','Getting\x20attempt\x20details...','verbose','✔\x20Downloaded\x20','attempt:','\x20\x20Location:\x20','Usage:\x20workflow:download\x20<project-name>\x20[output-dir]','Params:\x20','delete','Force:\x20yes','data','11xcPVFJ','retrySession','\x20\x20Session\x20ID:\x20','Are\x20you\x20sure\x20you\x20want\x20to\x20kill\x20attempt\x20','cause','split','workflow:download','9CceYsj','Usage:\x20workflow\x20retry\x20session:<id>\x20or\x20workflow\x20retry\x20attempt:<id>','Deleting\x20project\x20','Error:\x20Attempt\x20ID\x20is\x20required','Project:\x20','revision','force','Target:\x20','Are\x20you\x20sure\x20you\x20want\x20to\x20retry\x20','List\x20workflow\x20execution\x20sessions','\x20is\x20not\x20a\x20directory','from','download','message','workflow:projects','includeRetried','Usage:\x20workflow:delete\x20<project-name-or-id>','Task\x20name:\x20','description','List\x20all\x20workflow\x20projects','Delete\x20workflow\x20project\x20from\x20Treasure\x20Data','\x20\x20Revision:\x20','113334CkCkYY','offset'];a33_0x3af4=function(){return _0x720c0b;};return a33_0x3af4();}import{SDKError}from'../sdk/index.js';import{handleSDKOutput}from'../utils/command-output.js';import{withSpinner}from'../utils/spinner.js';import{confirm}from'../utils/prompt.js';export class WorkflowProjectsCommand extends BaseCommand{[a33_0x21671f(0x1cc)]=a33_0x21671f(0x20f);[a33_0x21671f(0x213)]=a33_0x21671f(0x214);async['execute'](_0x5afccd){const _0x9ed574=a33_0x21671f,{options:_0x3c1158,args:_0xe2bd20,tdx:_0x2bdac0}=_0x5afccd,_0x34ec8f=_0xe2bd20[0x0];try{_0x3c1158[_0x9ed574(0x1f1)]&&_0x34ec8f&&console['error']('Pattern:\x20'+_0x34ec8f);const _0x4059f9=await withSpinner('Listing\x20workflow\x20projects...',()=>_0x2bdac0[_0x9ed574(0x1d9)]['projects'](_0x34ec8f,{'limit':_0x3c1158[_0x9ed574(0x1ca)]}),{'verbose':_0x3c1158[_0x9ed574(0x1f1)]}),_0x9796fa=_0x4059f9[_0x9ed574(0x1f9)];return console[_0x9ed574(0x1e8)]('✔\x20Found\x20'+_0x9796fa[_0x9ed574(0x1d8)]+'\x20project'+(_0x9796fa['length']!==0x1?'s':'')),await handleSDKOutput(_0x9796fa,_0x3c1158),0x0;}catch(_0x2cf681){if(_0x2cf681 instanceof SDKError)return console['error']('Error:\x20'+_0x2cf681['message']),_0x2cf681[_0x9ed574(0x1fe)]&&console['error']('\x20\x20Cause:\x20'+_0x2cf681[_0x9ed574(0x1fe)]),0x1;throw _0x2cf681;}}}export class WorkflowWorkflowsCommand extends BaseCommand{[a33_0x21671f(0x1cc)]='workflow:workflows';[a33_0x21671f(0x213)]='List\x20workflows';async['execute'](_0x502775){const _0xea939a=a33_0x21671f,{options:_0x9495bf,args:_0x1e895d,tdx:_0x5b18fb}=_0x502775,_0x36221a=_0x1e895d[0x0];try{_0x9495bf[_0xea939a(0x1f1)]&&_0x36221a&&console['error']('Project\x20filter:\x20'+_0x36221a);const _0x40f991=await withSpinner('Listing\x20workflows...',()=>_0x5b18fb[_0xea939a(0x1d9)][_0xea939a(0x1d2)](_0x36221a,{'limit':_0x9495bf[_0xea939a(0x1ca)]}),{'verbose':_0x9495bf['verbose']}),_0x47f572=_0x40f991['data'];return console[_0xea939a(0x1e8)](_0xea939a(0x1d4)+_0x47f572['length']+_0xea939a(0x1c3)+(_0x47f572['length']!==0x1?'s':'')),await handleSDKOutput(_0x47f572,_0x9495bf),0x0;}catch(_0x3f4a98){if(_0x3f4a98 instanceof SDKError)return console[_0xea939a(0x1e8)](_0xea939a(0x1c8)+_0x3f4a98[_0xea939a(0x20e)]),_0x3f4a98[_0xea939a(0x1fe)]&&console['error'](_0xea939a(0x21a)+_0x3f4a98[_0xea939a(0x1fe)]),0x1;throw _0x3f4a98;}}}export class WorkflowSessionsCommand extends BaseCommand{[a33_0x21671f(0x1cc)]=a33_0x21671f(0x1a0);[a33_0x21671f(0x213)]=a33_0x21671f(0x20a);async[a33_0x21671f(0x1b3)](_0x20800c){const _0x596a26=a33_0x21671f,{options:_0x3bd32f,args:_0x5e722f,tdx:_0x30fb29}=_0x20800c;let _0x80181,_0x1b8510;if(_0x5e722f[0x0]){const _0x1fa543=_0x5e722f[0x0][_0x596a26(0x1ff)]('.');if(_0x1fa543['length']===0x1)_0x80181=_0x1fa543[0x0];else{if(_0x1fa543['length']===0x2)[_0x80181,_0x1b8510]=_0x1fa543;else return console[_0x596a26(0x1e8)](_0x596a26(0x1e2)),0x1;}}try{if(_0x3bd32f[_0x596a26(0x1f1)]){if(_0x80181&&_0x1b8510)console['error'](_0x596a26(0x1c6)+_0x80181+'.'+_0x1b8510);else _0x80181&&console['error'](_0x596a26(0x1ad)+_0x80181);const _0xaa8de=_0x3bd32f[_0x596a26(0x1c1)];_0xaa8de&&console[_0x596a26(0x1e8)](_0x596a26(0x1c7)+_0xaa8de);}const _0x3bfe4a=await withSpinner('Listing\x20workflow\x20sessions...',()=>_0x30fb29[_0x596a26(0x1d9)][_0x596a26(0x1a1)]({'projectName':_0x80181,'workflowName':_0x1b8510,'status':_0x3bd32f[_0x596a26(0x1c1)],'fromTime':_0x3bd32f[_0x596a26(0x20c)],'toTime':_0x3bd32f['to'],'limit':_0x3bd32f[_0x596a26(0x1ca)]}),{'verbose':_0x3bd32f['verbose']}),_0x48ba22=_0x3bfe4a[_0x596a26(0x1f9)];return console[_0x596a26(0x1e8)](_0x596a26(0x1d4)+_0x48ba22[_0x596a26(0x1d8)]+_0x596a26(0x1a3)+(_0x48ba22[_0x596a26(0x1d8)]!==0x1?'s':'')),await handleSDKOutput(_0x48ba22,_0x3bd32f),0x0;}catch(_0x4accb4){if(_0x4accb4 instanceof SDKError)return console['error'](_0x596a26(0x1c8)+_0x4accb4[_0x596a26(0x20e)]),_0x4accb4[_0x596a26(0x1fe)]&&console[_0x596a26(0x1e8)](_0x596a26(0x21a)+_0x4accb4[_0x596a26(0x1fe)]),0x1;throw _0x4accb4;}}}export class WorkflowAttemptsCommand extends BaseCommand{[a33_0x21671f(0x1cc)]=a33_0x21671f(0x1b4);[a33_0x21671f(0x213)]=a33_0x21671f(0x1db);async[a33_0x21671f(0x1b3)](_0x3d97e8){const _0x180dfd=a33_0x21671f,{options:_0x37896a,args:_0xd648b4,tdx:_0x15ebef}=_0x3d97e8;let _0x4adc72,_0x302d02;if(_0xd648b4[0x0]){const _0x4b2db0=_0xd648b4[0x0][_0x180dfd(0x1ff)]('.');if(_0x4b2db0[_0x180dfd(0x1d8)]===0x1)_0x4adc72=_0x4b2db0[0x0];else{if(_0x4b2db0[_0x180dfd(0x1d8)]===0x2)[_0x4adc72,_0x302d02]=_0x4b2db0;else return console[_0x180dfd(0x1e8)](_0x180dfd(0x1e2)),0x1;}}try{const _0x3a63c7=_0x37896a[_0x180dfd(0x210)];if(_0x37896a[_0x180dfd(0x1f1)]){if(_0x4adc72&&_0x302d02)console[_0x180dfd(0x1e8)](_0x180dfd(0x1c6)+_0x4adc72+'.'+_0x302d02);else _0x4adc72&&console[_0x180dfd(0x1e8)](_0x180dfd(0x1ad)+_0x4adc72);_0x3a63c7&&console[_0x180dfd(0x1e8)](_0x180dfd(0x1ba));}const _0x3c291c=await withSpinner('Listing\x20workflow\x20attempts...',()=>_0x15ebef[_0x180dfd(0x1d9)][_0x180dfd(0x1a2)]({'projectName':_0x4adc72,'workflowName':_0x302d02,'includeRetried':_0x3a63c7,'limit':_0x37896a[_0x180dfd(0x1ca)]}),{'verbose':_0x37896a[_0x180dfd(0x1f1)]}),_0x480932=_0x3c291c[_0x180dfd(0x1f9)];return console[_0x180dfd(0x1e8)](_0x180dfd(0x1d4)+_0x480932[_0x180dfd(0x1d8)]+_0x180dfd(0x1b8)+(_0x480932[_0x180dfd(0x1d8)]!==0x1?'s':'')),await handleSDKOutput(_0x480932,_0x37896a),0x0;}catch(_0x24807b){if(_0x24807b instanceof SDKError)return console[_0x180dfd(0x1e8)](_0x180dfd(0x1c8)+_0x24807b[_0x180dfd(0x20e)]),_0x24807b['cause']&&console[_0x180dfd(0x1e8)](_0x180dfd(0x21a)+_0x24807b[_0x180dfd(0x1fe)]),0x1;throw _0x24807b;}}}export class WorkflowAttemptCommand extends BaseCommand{['name']='workflow:attempt';[a33_0x21671f(0x213)]='Show\x20specific\x20attempt\x20details';async['execute'](_0x574bb4){const _0xd5ed73=a33_0x21671f,{options:_0x1e22a3,args:_0x3bfaed,tdx:_0xd91528}=_0x574bb4,_0x48c9ef=_0x3bfaed[0x0];if(!_0x48c9ef)return console[_0xd5ed73(0x1e8)](_0xd5ed73(0x204)),0x1;try{_0x1e22a3[_0xd5ed73(0x1f1)]&&console[_0xd5ed73(0x1e8)](_0xd5ed73(0x1b9)+_0x48c9ef);const _0x14b8ba=await withSpinner(_0xd5ed73(0x1f0),()=>_0xd91528[_0xd5ed73(0x1d9)][_0xd5ed73(0x1ce)](_0x48c9ef),{'verbose':_0x1e22a3[_0xd5ed73(0x1f1)]}),_0x3da943=_0x14b8ba[_0xd5ed73(0x1f9)];return await handleSDKOutput([_0x3da943],_0x1e22a3),0x0;}catch(_0x3bbc70){if(_0x3bbc70 instanceof SDKError)return console[_0xd5ed73(0x1e8)](_0xd5ed73(0x1c8)+_0x3bbc70['message']),_0x3bbc70[_0xd5ed73(0x1fe)]&&console[_0xd5ed73(0x1e8)](_0xd5ed73(0x21a)+_0x3bbc70[_0xd5ed73(0x1fe)]),0x1;throw _0x3bbc70;}}}export class WorkflowTasksCommand extends BaseCommand{[a33_0x21671f(0x1cc)]=a33_0x21671f(0x1c4);[a33_0x21671f(0x213)]='Show\x20tasks\x20for\x20an\x20attempt';async[a33_0x21671f(0x1b3)](_0x39b892){const _0x973ff4=a33_0x21671f,{options:_0x49fe7e,args:_0x478b72,tdx:_0x15139d}=_0x39b892,_0xf7713a=_0x478b72[0x0];if(!_0xf7713a)return console[_0x973ff4(0x1e8)](_0x973ff4(0x204)),0x1;try{const _0x2ad9b7=_0x49fe7e[_0x973ff4(0x1d5)];_0x49fe7e[_0x973ff4(0x1f1)]&&(console[_0x973ff4(0x1e8)]('Attempt\x20ID:\x20'+_0xf7713a),_0x2ad9b7&&console[_0x973ff4(0x1e8)](_0x973ff4(0x1bc)));const _0x14655d=await withSpinner('Getting\x20attempt\x20tasks...',()=>_0x15139d[_0x973ff4(0x1d9)][_0x973ff4(0x1e1)](_0xf7713a,_0x2ad9b7||![]),{'verbose':_0x49fe7e[_0x973ff4(0x1f1)]}),_0x2ff576=_0x14655d[_0x973ff4(0x1f9)];return console[_0x973ff4(0x1e8)](_0x973ff4(0x1d4)+_0x2ff576[_0x973ff4(0x1d8)]+_0x973ff4(0x1ee)+(_0x2ff576['length']!==0x1?'s':'')),await handleSDKOutput(_0x2ff576,_0x49fe7e),0x0;}catch(_0x45050f){if(_0x45050f instanceof SDKError)return console[_0x973ff4(0x1e8)](_0x973ff4(0x1c8)+_0x45050f['message']),_0x45050f[_0x973ff4(0x1fe)]&&console['error'](_0x973ff4(0x21a)+_0x45050f['cause']),0x1;throw _0x45050f;}}}export class WorkflowLogsCommand extends BaseCommand{[a33_0x21671f(0x1cc)]='workflow:logs';['description']='Show\x20logs\x20for\x20a\x20specific\x20task';async[a33_0x21671f(0x1b3)](_0x1982e9){const _0x384c62=a33_0x21671f,{options:_0x38a8e3,args:_0x44af49,tdx:_0x567b8d}=_0x1982e9,_0x1bb46b=_0x44af49[0x0],_0x5ad315=_0x44af49[0x1];if(!_0x1bb46b||!_0x5ad315)return console[_0x384c62(0x1e8)]('Error:\x20Attempt\x20ID\x20and\x20task\x20name\x20are\x20required'),0x1;try{_0x38a8e3[_0x384c62(0x1f1)]&&(console['error'](_0x384c62(0x1b9)+_0x1bb46b),console[_0x384c62(0x1e8)](_0x384c62(0x212)+_0x5ad315));const _0x3de47a=_0x38a8e3[_0x384c62(0x218)],_0x386964=await withSpinner(_0x384c62(0x1dd),()=>_0x567b8d[_0x384c62(0x1d9)][_0x384c62(0x1e0)](_0x1bb46b,_0x5ad315,{'offset':_0x3de47a,'limit':_0x38a8e3['limit']}),{'verbose':_0x38a8e3[_0x384c62(0x1f1)]}),_0x235774=_0x386964['data'];return console[_0x384c62(0x1e8)](_0x384c62(0x1d4)+_0x235774[_0x384c62(0x1d8)]+_0x384c62(0x1c9)+(_0x235774[_0x384c62(0x1d8)]!==0x1?'ies':'y')),await handleSDKOutput(_0x235774,_0x38a8e3),0x0;}catch(_0x9d1138){if(_0x9d1138 instanceof SDKError)return console['error'](_0x384c62(0x1c8)+_0x9d1138[_0x384c62(0x20e)]),_0x9d1138['cause']&&console['error'](_0x384c62(0x21a)+_0x9d1138[_0x384c62(0x1fe)]),0x1;throw _0x9d1138;}}}export class WorkflowKillCommand extends BaseCommand{[a33_0x21671f(0x1cc)]=a33_0x21671f(0x1ec);['description']='Kill\x20a\x20running\x20attempt';async[a33_0x21671f(0x1b3)](_0x135c7a){const _0x4bc309=a33_0x21671f,{options:_0x3c0928,args:_0x5a368a,tdx:_0x33b6be}=_0x135c7a,_0x12b394=_0x5a368a[0x0];if(!_0x12b394)return console[_0x4bc309(0x1e8)](_0x4bc309(0x204)),0x1;try{const _0x22d1ef=_0x3c0928['reason'];_0x3c0928[_0x4bc309(0x1f1)]&&(console[_0x4bc309(0x1e8)](_0x4bc309(0x1b9)+_0x12b394),_0x22d1ef&&console[_0x4bc309(0x1e8)](_0x4bc309(0x1b6)+_0x22d1ef));if(!_0x3c0928[_0x4bc309(0x1b7)]){const _0x29e285=await confirm(_0x4bc309(0x1fd)+_0x12b394+'?');if(!_0x29e285)return console[_0x4bc309(0x1e8)](_0x4bc309(0x1b5)),0x0;}const _0x4965f6=await withSpinner('Killing\x20attempt...',()=>_0x33b6be[_0x4bc309(0x1d9)]['kill'](_0x12b394,_0x22d1ef),{'verbose':_0x3c0928[_0x4bc309(0x1f1)]}),_0x2c59ed=_0x4965f6[_0x4bc309(0x1f9)];return console[_0x4bc309(0x1e8)]('✔\x20'+_0x2c59ed),0x0;}catch(_0x1aa578){if(_0x1aa578 instanceof SDKError)return console[_0x4bc309(0x1e8)]('Error:\x20'+_0x1aa578[_0x4bc309(0x20e)]),_0x1aa578[_0x4bc309(0x1fe)]&&console[_0x4bc309(0x1e8)](_0x4bc309(0x21a)+_0x1aa578['cause']),0x1;throw _0x1aa578;}}}export class WorkflowRetryCommand extends BaseCommand{['name']=a33_0x21671f(0x1eb);[a33_0x21671f(0x213)]='Retry\x20a\x20session\x20or\x20attempt';async[a33_0x21671f(0x1b3)](_0x3b5e18){const _0x104b75=a33_0x21671f,{options:_0x562815,args:_0x270ce8,tdx:_0x1b75c3}=_0x3b5e18,_0x11058d=_0x270ce8[0x0];if(!_0x11058d)return console[_0x104b75(0x1e8)](_0x104b75(0x1bb)),console[_0x104b75(0x1e8)]('Usage:\x20workflow\x20retry\x20session:<id>\x20or\x20workflow\x20retry\x20attempt:<id>'),0x1;let _0x42782e=![],_0x467491=_0x11058d;if(_0x11058d[_0x104b75(0x1b2)](_0x104b75(0x1e6)))_0x42782e=!![],_0x467491=_0x11058d[_0x104b75(0x1de)](0x8);else{if(_0x11058d[_0x104b75(0x1b2)](_0x104b75(0x1f3)))_0x42782e=![],_0x467491=_0x11058d[_0x104b75(0x1de)](0x8);else return console[_0x104b75(0x1e8)](_0x104b75(0x1a5)),console['error'](_0x104b75(0x202)),0x1;}try{const _0xafe06e=_0x562815['fromTask'],_0x51f1ab=_0x562815[_0x104b75(0x1e9)],_0x172583=_0x562815[_0x104b75(0x1af)],_0x180f98=_0x562815[_0x104b75(0x207)];_0x562815[_0x104b75(0x1f1)]&&(console[_0x104b75(0x1e8)](_0x104b75(0x208)+(_0x42782e?_0x104b75(0x1dc):_0x104b75(0x1ce))+'\x20'+_0x467491),_0xafe06e&&console['error'](_0x104b75(0x1c2)+_0xafe06e),_0x51f1ab&&console[_0x104b75(0x1e8)](_0x104b75(0x1cb)+_0x51f1ab),_0x172583&&console[_0x104b75(0x1e8)](_0x104b75(0x1f6)+_0x172583),_0x180f98&&console[_0x104b75(0x1e8)](_0x104b75(0x1f8)));let _0x13f98f;if(_0x172583)try{if(_0x172583[_0x104b75(0x1b2)]('@')){const _0x4e44e0=await import('fs/promises'),_0x43ddb2=_0x172583[_0x104b75(0x1de)](0x1),_0x4f7a40=await _0x4e44e0[_0x104b75(0x1ef)](_0x43ddb2,_0x104b75(0x1be));_0x13f98f=JSON[_0x104b75(0x1bf)](_0x4f7a40);}else _0x13f98f=JSON[_0x104b75(0x1bf)](_0x172583);}catch{return console[_0x104b75(0x1e8)]('Error:\x20Invalid\x20JSON\x20in\x20--params'),0x1;}if(!_0x562815[_0x104b75(0x1b7)]){const _0x557c7f=await confirm(_0x104b75(0x209)+(_0x42782e?_0x104b75(0x1dc):'attempt')+'\x20'+_0x467491+'?');if(!_0x557c7f)return console['error'](_0x104b75(0x1b5)),0x0;}let _0x299aec;_0x42782e?_0x299aec=await withSpinner('Retrying\x20session...',()=>_0x1b75c3[_0x104b75(0x1d9)][_0x104b75(0x1fb)](_0x467491,{'fromTask':_0xafe06e,'retryParams':_0x13f98f}),{'verbose':_0x562815[_0x104b75(0x1f1)]}):_0x299aec=await withSpinner(_0x104b75(0x1bd),()=>_0x1b75c3[_0x104b75(0x1d9)][_0x104b75(0x1ae)](_0x467491,{'resumeFrom':_0x51f1ab,'retryParams':_0x13f98f,'force':_0x180f98}),{'verbose':_0x562815[_0x104b75(0x1f1)]});const _0x186d3a=_0x299aec[_0x104b75(0x1f9)];return console[_0x104b75(0x1e8)](_0x104b75(0x1d7)),console[_0x104b75(0x1e8)](_0x104b75(0x1da)+_0x186d3a['attemptId']),console[_0x104b75(0x1e8)](_0x104b75(0x1fc)+_0x186d3a['sessionId']),0x0;}catch(_0x49c92f){if(_0x49c92f instanceof SDKError)return console[_0x104b75(0x1e8)](_0x104b75(0x1c8)+_0x49c92f['message']),_0x49c92f[_0x104b75(0x1fe)]&&console[_0x104b75(0x1e8)](_0x104b75(0x21a)+_0x49c92f[_0x104b75(0x1fe)]),0x1;throw _0x49c92f;}}}function a33_0x4942(_0x97ec9,_0x4fbf24){const _0x3af45b=a33_0x3af4();return a33_0x4942=function(_0x494213,_0x1395a4){_0x494213=_0x494213-0x19f;let _0x111e69=_0x3af45b[_0x494213];return _0x111e69;},a33_0x4942(_0x97ec9,_0x4fbf24);}export class WorkflowDownloadCommand extends BaseCommand{[a33_0x21671f(0x1cc)]=a33_0x21671f(0x200);[a33_0x21671f(0x213)]=a33_0x21671f(0x1d0);async[a33_0x21671f(0x1b3)](_0x4c4dd8){const _0x5d6c36=a33_0x21671f,{options:_0x2b580e,args:_0x3fe8a2,tdx:_0x532d83}=_0x4c4dd8,_0x4f5af0=_0x3fe8a2[0x0],_0x41fd61=_0x3fe8a2[0x1]||'.';if(!_0x4f5af0)return console[_0x5d6c36(0x1e8)](_0x5d6c36(0x1c0)),console[_0x5d6c36(0x1e8)](_0x5d6c36(0x1f5)),0x1;const _0x232fa9=_0x2b580e[_0x5d6c36(0x206)];_0x2b580e[_0x5d6c36(0x1f1)]&&(console[_0x5d6c36(0x1e8)](_0x5d6c36(0x205)+_0x4f5af0),console[_0x5d6c36(0x1e8)](_0x5d6c36(0x1cd)+_0x41fd61),_0x232fa9&&console[_0x5d6c36(0x1e8)](_0x5d6c36(0x1d1)+_0x232fa9));const _0x22b841=await withSpinner('Downloading\x20project\x20'+_0x4f5af0+'...',()=>_0x532d83[_0x5d6c36(0x1d9)][_0x5d6c36(0x20d)](_0x4f5af0,_0x41fd61,{'revision':_0x232fa9}),{'verbose':_0x2b580e[_0x5d6c36(0x1f1)]}),_0x4f3485=_0x22b841[_0x5d6c36(0x1f9)];return console[_0x5d6c36(0x1e8)](_0x5d6c36(0x1f2)+_0x4f3485[_0x5d6c36(0x1e4)]),console['error']('\x20\x20Revision:\x20'+_0x4f3485[_0x5d6c36(0x206)]),console[_0x5d6c36(0x1e8)](_0x5d6c36(0x1d3)+_0x4f3485['filesExtracted']),console[_0x5d6c36(0x1e8)](_0x5d6c36(0x1f4)+_0x41fd61+'/'+_0x4f3485[_0x5d6c36(0x1e4)]),0x0;}}export class WorkflowPushCommand extends BaseCommand{[a33_0x21671f(0x1cc)]=a33_0x21671f(0x1a9);['description']=a33_0x21671f(0x1c5);async['execute'](_0x4cce43){const _0x20d7a4=a33_0x21671f,{options:_0x1a2317,args:_0x3123a9,tdx:_0xe414b2}=_0x4cce43;let _0x384e03='.',_0x4e375a=_0x1a2317[_0x20d7a4(0x1cc)];if(_0x3123a9[0x0]){const {promises:_0x5184c3}=await import('fs');try{const _0x21f2c2=await _0x5184c3[_0x20d7a4(0x1e7)](_0x3123a9[0x0]);if(_0x21f2c2[_0x20d7a4(0x1e5)]())_0x384e03=_0x3123a9[0x0];else return console[_0x20d7a4(0x1e8)](_0x20d7a4(0x1c8)+_0x3123a9[0x0]+_0x20d7a4(0x20b)),0x1;}catch{_0x4e375a=_0x3123a9[0x0],_0x384e03='.';}}const _0x2fd4ad=_0x1a2317['revision'],_0x3c4c7e=_0x1a2317['skipValidation'];_0x1a2317[_0x20d7a4(0x1f1)]&&(console[_0x20d7a4(0x1e8)](_0x20d7a4(0x1b0)+_0x384e03),_0x4e375a&&console[_0x20d7a4(0x1e8)]('Project\x20name:\x20'+_0x4e375a),_0x2fd4ad&&console['error']('Revision:\x20'+_0x2fd4ad),_0x3c4c7e&&console[_0x20d7a4(0x1e8)]('Validation:\x20skipped'));const _0x3d9c23=await withSpinner(_0x20d7a4(0x1d6),()=>_0xe414b2[_0x20d7a4(0x1d9)]['push'](_0x384e03,{'projectName':_0x4e375a,'revision':_0x2fd4ad,'skipValidation':_0x3c4c7e}),{'verbose':_0x1a2317['verbose']}),_0x514b68=_0x3d9c23[_0x20d7a4(0x1f9)];return console[_0x20d7a4(0x1e8)]('✔\x20Pushed\x20'+_0x514b68['projectName']),console[_0x20d7a4(0x1e8)](_0x20d7a4(0x219)+_0x514b68[_0x20d7a4(0x1b1)]),console[_0x20d7a4(0x1e8)](_0x20d7a4(0x216)+_0x514b68['revision']),0x0;}}export class WorkflowDeleteCommand extends BaseCommand{[a33_0x21671f(0x1cc)]=a33_0x21671f(0x1ab);['description']=a33_0x21671f(0x215);async[a33_0x21671f(0x1b3)](_0x43402a){const _0xf2b8a5=a33_0x21671f,{options:_0x207485,args:_0x21d801,tdx:_0x28ac1c}=_0x43402a,_0x384888=_0x21d801[0x0];if(!_0x384888)return console[_0xf2b8a5(0x1e8)](_0xf2b8a5(0x1ac)),console['error'](_0xf2b8a5(0x211)),0x1;_0x207485[_0xf2b8a5(0x1f1)]&&console[_0xf2b8a5(0x1e8)](_0xf2b8a5(0x205)+_0x384888);if(!_0x207485[_0xf2b8a5(0x1b7)]){const _0x39ada0=await confirm(_0xf2b8a5(0x1a7)+_0x384888+'\x22?\x20This\x20cannot\x20be\x20undone.');if(!_0x39ada0)return console[_0xf2b8a5(0x1e8)](_0xf2b8a5(0x1b5)),0x0;}const _0x41d3d7=await withSpinner(_0xf2b8a5(0x203)+_0x384888+_0xf2b8a5(0x1aa),()=>_0x28ac1c[_0xf2b8a5(0x1d9)][_0xf2b8a5(0x1f7)](_0x384888),{'verbose':_0x207485[_0xf2b8a5(0x1f1)]}),_0x237a13=_0x41d3d7[_0xf2b8a5(0x1f9)];return console[_0xf2b8a5(0x1e8)](_0xf2b8a5(0x1e3)+_0x237a13['projectName']),console[_0xf2b8a5(0x1e8)](_0xf2b8a5(0x219)+_0x237a13[_0xf2b8a5(0x1b1)]),0x0;}}
package/dist/core/auth.js CHANGED
@@ -1 +1 @@
1
- (function(_0x3f854b,_0x4ed6de){const _0x440207=a34_0xe635,_0x2c56e6=_0x3f854b();while(!![]){try{const _0x2651cd=-parseInt(_0x440207(0x74))/0x1+-parseInt(_0x440207(0x73))/0x2+parseInt(_0x440207(0x7f))/0x3+-parseInt(_0x440207(0x7b))/0x4+parseInt(_0x440207(0x80))/0x5+-parseInt(_0x440207(0x7e))/0x6+-parseInt(_0x440207(0x76))/0x7*(-parseInt(_0x440207(0x6c))/0x8);if(_0x2651cd===_0x4ed6de)break;else _0x2c56e6['push'](_0x2c56e6['shift']());}catch(_0x4212a6){_0x2c56e6['push'](_0x2c56e6['shift']());}}}(a34_0x1e74,0xe23e3));import{platform}from'os';import{readFileSync}from'fs';import{fileURLToPath}from'url';import{dirname,join}from'path';import{getAPIKey}from'./config.js';export function getVersion(){const _0x47e49c=a34_0xe635;try{const _0x44fd5c=fileURLToPath(import.meta[_0x47e49c(0x6f)]),_0x4bbcb0=dirname(_0x44fd5c),_0x15103=join(_0x4bbcb0,_0x47e49c(0x79)),_0xa821ef=JSON[_0x47e49c(0x72)](readFileSync(_0x15103,_0x47e49c(0x7c)));return _0xa821ef[_0x47e49c(0x78)];}catch{return'0.0.0';}}export function getUserAgent(){const _0x570fbc=a34_0xe635,_0x2eebe4=getVersion(),_0x182e25=platform(),_0x420e4a=process['version'][_0x570fbc(0x7a)]('v','');return _0x570fbc(0x77)+_0x2eebe4+'\x20('+_0x182e25+_0x570fbc(0x7d)+_0x420e4a+')';}function a34_0x1e74(){const _0x125ce1=[';\x20node/','5894754HroLpI','5187222qiyvHS','6491870XZNYrA','6376QDXVuI','length','Authorization','url','TD1\x20','entries','parse','1442742Hqnhkl','1091116IdDJhn','X-Trino-User','20419pfKtaG','tdx/','version','../../package.json','replace','6522640ookVvo','utf-8'];a34_0x1e74=function(){return _0x125ce1;};return a34_0x1e74();}function a34_0xe635(_0x15ccbf,_0x3c0482){const _0x1e74fc=a34_0x1e74();return a34_0xe635=function(_0xe635cf,_0x105f38){_0xe635cf=_0xe635cf-0x6c;let _0x3d2e07=_0x1e74fc[_0xe635cf];return _0x3d2e07;},a34_0xe635(_0x15ccbf,_0x3c0482);}export function getAuthHeaders(_0x2c0d97,_0x49dd97){const _0x3ebd25=a34_0xe635,_0x342679=getVersion(),_0x16a0f2={'User-Agent':getUserAgent(),'X-TD-Client':'tdx','X-TD-Client-Version':_0x342679};return _0x49dd97&&(_0x16a0f2[_0x3ebd25(0x6e)]=_0x3ebd25(0x70)+_0x49dd97),_0x16a0f2;}export function toHeaderRecord(_0x3617c9){const _0x304e16=a34_0xe635,_0x25833f={};for(const [_0x544014,_0x4b9e0e]of Object[_0x304e16(0x71)](_0x3617c9)){_0x4b9e0e!==undefined&&(_0x25833f[_0x544014]=_0x4b9e0e);}return _0x25833f;}export function getTrinoHeaders(_0x3b8531,_0x53396b){const _0x8d84dc=a34_0xe635,_0x21ebc9=getAuthHeaders(_0x3b8531,_0x53396b),_0x446df1=toHeaderRecord(_0x21ebc9);return delete _0x446df1[_0x8d84dc(0x6e)],_0x53396b&&(_0x446df1[_0x8d84dc(0x75)]=_0x53396b),_0x446df1;}export function hasAPIKey(_0x44789a){const _0x5bb1d3=a34_0xe635,_0x366819=getAPIKey(_0x44789a);return _0x366819!==undefined&&_0x366819[_0x5bb1d3(0x6d)]>0x0;}
1
+ (function(_0x10ac93,_0xfcbf1d){const _0x410461=a34_0xf4de,_0x39de15=_0x10ac93();while(!![]){try{const _0x544560=-parseInt(_0x410461(0x10b))/0x1*(parseInt(_0x410461(0x10f))/0x2)+-parseInt(_0x410461(0x117))/0x3+parseInt(_0x410461(0x108))/0x4*(parseInt(_0x410461(0x113))/0x5)+parseInt(_0x410461(0x10d))/0x6*(-parseInt(_0x410461(0x115))/0x7)+parseInt(_0x410461(0x106))/0x8+-parseInt(_0x410461(0x112))/0x9*(-parseInt(_0x410461(0x10c))/0xa)+-parseInt(_0x410461(0x104))/0xb*(-parseInt(_0x410461(0x114))/0xc);if(_0x544560===_0xfcbf1d)break;else _0x39de15['push'](_0x39de15['shift']());}catch(_0x169c5d){_0x39de15['push'](_0x39de15['shift']());}}}(a34_0x42c6,0x40ebb));import{platform}from'os';import{readFileSync}from'fs';import{fileURLToPath}from'url';import{dirname,join}from'path';function a34_0xf4de(_0x1b72e1,_0x4166d9){const _0x42c6f7=a34_0x42c6();return a34_0xf4de=function(_0xf4dec3,_0x5ac2b1){_0xf4dec3=_0xf4dec3-0x102;let _0x5289ce=_0x42c6f7[_0xf4dec3];return _0x5289ce;},a34_0xf4de(_0x1b72e1,_0x4166d9);}import{getAPIKey}from'./config.js';export function getVersion(){const _0x480fc2=a34_0xf4de;try{const _0x25f6c5=fileURLToPath(import.meta[_0x480fc2(0x10a)]),_0x401dd7=dirname(_0x25f6c5),_0x51dfae=join(_0x401dd7,_0x480fc2(0x107)),_0x515fad=JSON[_0x480fc2(0x109)](readFileSync(_0x51dfae,'utf-8'));return _0x515fad[_0x480fc2(0x103)];}catch{return'0.0.0';}}function a34_0x42c6(){const _0x4d564f=['5465eNyNUs','1700zugFtn','673278BgBlkH',';\x20node/','178KJCAGH','Authorization','tdx','18009TtPItp','563215qBsYuj','72OJkXhE','21WKwraN','X-Trino-User','1336155Wscjxp','entries','replace','version','1672660bBfZYl','TD1\x20','1353208wDgyxB','../../package.json','4lNzBpx','parse','url'];a34_0x42c6=function(){return _0x4d564f;};return a34_0x42c6();}export function getUserAgent(){const _0x418cf4=a34_0xf4de,_0x460a6f=getVersion(),_0x92ffac=platform(),_0x38990a=process[_0x418cf4(0x103)][_0x418cf4(0x102)]('v','');return'tdx/'+_0x460a6f+'\x20('+_0x92ffac+_0x418cf4(0x10e)+_0x38990a+')';}export function getAuthHeaders(_0x3e090a,_0x343db8){const _0x471671=a34_0xf4de,_0x2a55a4=getVersion(),_0x368d31={'User-Agent':getUserAgent(),'X-TD-Client':_0x471671(0x111),'X-TD-Client-Version':_0x2a55a4};return _0x343db8&&(_0x368d31[_0x471671(0x110)]=_0x471671(0x105)+_0x343db8),_0x368d31;}export function toHeaderRecord(_0x399e9c){const _0x4262db=a34_0xf4de,_0x3b91bd={};for(const [_0x3972a2,_0x23a7f6]of Object[_0x4262db(0x118)](_0x399e9c)){_0x23a7f6!==undefined&&(_0x3b91bd[_0x3972a2]=_0x23a7f6);}return _0x3b91bd;}export function getTrinoHeaders(_0x58c45e,_0x49d48a){const _0x8c2ce5=a34_0xf4de,_0xa7b05c=getAuthHeaders(_0x58c45e,_0x49d48a),_0x3f69c0=toHeaderRecord(_0xa7b05c);return delete _0x3f69c0[_0x8c2ce5(0x110)],_0x49d48a&&(_0x3f69c0[_0x8c2ce5(0x116)]=_0x49d48a),_0x3f69c0;}export function hasAPIKey(_0x205301){const _0x5c49e6=getAPIKey(_0x205301);return _0x5c49e6!==undefined&&_0x5c49e6['length']>0x0;}