@treasuredata/tdx 0.4.1 → 0.4.3

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 (104) hide show
  1. package/dist/build-info.json +2 -2
  2. package/dist/cli.js +1 -1
  3. package/dist/cli.js.map +1 -1
  4. package/dist/client/cdp-api-client.js +1 -1
  5. package/dist/client/http-client.js +1 -1
  6. package/dist/client/llm-api-client.d.ts +129 -1
  7. package/dist/client/llm-api-client.d.ts.map +1 -1
  8. package/dist/client/llm-api-client.js +1 -1
  9. package/dist/client/llm-api-client.js.map +1 -1
  10. package/dist/client/rate-limiter.js +1 -1
  11. package/dist/client/td-api-client.js +1 -1
  12. package/dist/client/trino-api-client.js +1 -1
  13. package/dist/client/workflow-client.js +1 -1
  14. package/dist/commands/activations.js +1 -1
  15. package/dist/commands/api-command.js +1 -1
  16. package/dist/commands/auth-command.js +1 -1
  17. package/dist/commands/chat-command.js +1 -1
  18. package/dist/commands/claude-command.js +1 -1
  19. package/dist/commands/command.js +1 -1
  20. package/dist/commands/context-command.js +1 -1
  21. package/dist/commands/databases.js +1 -1
  22. package/dist/commands/describe.js +1 -1
  23. package/dist/commands/job-command.js +1 -1
  24. package/dist/commands/llm-command.d.ts +18 -0
  25. package/dist/commands/llm-command.d.ts.map +1 -1
  26. package/dist/commands/llm-command.js +1 -1
  27. package/dist/commands/llm-command.js.map +1 -1
  28. package/dist/commands/llm-proxy.js +1 -1
  29. package/dist/commands/parent-segment-command.js +1 -1
  30. package/dist/commands/profiles-command.js +1 -1
  31. package/dist/commands/query-command.js +1 -1
  32. package/dist/commands/segment-command.js +1 -1
  33. package/dist/commands/segment-create-command.js +1 -1
  34. package/dist/commands/segment-fields-command.js +1 -1
  35. package/dist/commands/segment-pwd-command.js +1 -1
  36. package/dist/commands/segment-update-command.js +1 -1
  37. package/dist/commands/segment-use-command.js +1 -1
  38. package/dist/commands/segments.js +1 -1
  39. package/dist/commands/show.js +1 -1
  40. package/dist/commands/tables.js +1 -1
  41. package/dist/commands/use-command.js +1 -1
  42. package/dist/commands/workflow-command.js +1 -1
  43. package/dist/core/auth.js +1 -1
  44. package/dist/core/config.js +1 -1
  45. package/dist/core/credential-cache.js +1 -1
  46. package/dist/core/global-context.js +1 -1
  47. package/dist/core/keychain.d.ts +19 -0
  48. package/dist/core/keychain.d.ts.map +1 -1
  49. package/dist/core/keychain.js +1 -1
  50. package/dist/core/keychain.js.map +1 -1
  51. package/dist/core/profile.js +1 -1
  52. package/dist/core/project-config.js +1 -1
  53. package/dist/core/session.js +1 -1
  54. package/dist/index.js +1 -1
  55. package/dist/proxy/anthropic-adapter.js +1 -1
  56. package/dist/proxy/server.js +1 -1
  57. package/dist/proxy/session-cache.js +1 -1
  58. package/dist/sdk/api.js +1 -1
  59. package/dist/sdk/errors.js +1 -1
  60. package/dist/sdk/index.js +1 -1
  61. package/dist/sdk/job.js +1 -1
  62. package/dist/sdk/llm.d.ts +90 -1
  63. package/dist/sdk/llm.d.ts.map +1 -1
  64. package/dist/sdk/llm.js +1 -1
  65. package/dist/sdk/llm.js.map +1 -1
  66. package/dist/sdk/query.js +1 -1
  67. package/dist/sdk/segment.js +1 -1
  68. package/dist/sdk/workflow.js +1 -1
  69. package/dist/types/endpoints.js +1 -1
  70. package/dist/types/index.d.ts +1 -1
  71. package/dist/types/index.d.ts.map +1 -1
  72. package/dist/types/index.js +1 -1
  73. package/dist/types/llm.d.ts +241 -0
  74. package/dist/types/llm.d.ts.map +1 -1
  75. package/dist/utils/agent-ref-parser.js +1 -1
  76. package/dist/utils/chat-cache.js +1 -1
  77. package/dist/utils/colors.js +1 -1
  78. package/dist/utils/command-output.js +1 -1
  79. package/dist/utils/constants.js +1 -1
  80. package/dist/utils/file-permissions.js +1 -1
  81. package/dist/utils/format-detector.js +1 -1
  82. package/dist/utils/formatters.js +1 -1
  83. package/dist/utils/json-loader.js +1 -1
  84. package/dist/utils/llm-backup-utils.d.ts +37 -0
  85. package/dist/utils/llm-backup-utils.d.ts.map +1 -0
  86. package/dist/utils/llm-backup-utils.js +1 -0
  87. package/dist/utils/llm-backup-utils.js.map +1 -0
  88. package/dist/utils/model-aliases.js +1 -1
  89. package/dist/utils/option-validation.js +1 -1
  90. package/dist/utils/port.js +1 -1
  91. package/dist/utils/process.js +1 -1
  92. package/dist/utils/prompt.js +1 -1
  93. package/dist/utils/segment-path-parser.js +1 -1
  94. package/dist/utils/segment-ref-parser.js +1 -1
  95. package/dist/utils/spinner.js +1 -1
  96. package/dist/utils/sql-parser.js +1 -1
  97. package/dist/utils/sse-parser.js +1 -1
  98. package/dist/utils/string-utils.js +1 -1
  99. package/dist/utils/table-ref-parser.js +1 -1
  100. package/dist/utils/tdx-logger.js +1 -1
  101. package/dist/utils/tree-formatter.js +1 -1
  102. package/dist/utils/version-check.js +1 -1
  103. package/dist/utils/workflow-utils.js +1 -1
  104. package/package.json +1 -1
@@ -1 +1 @@
1
- const a24_0x50d866=a24_0x319d;(function(_0x461cd6,_0x152f3c){const _0x17addc=a24_0x319d,_0x33e166=_0x461cd6();while(!![]){try{const _0x340cec=-parseInt(_0x17addc(0x17e))/0x1+-parseInt(_0x17addc(0x1a4))/0x2*(parseInt(_0x17addc(0x1a6))/0x3)+parseInt(_0x17addc(0x1b1))/0x4*(parseInt(_0x17addc(0x1b2))/0x5)+-parseInt(_0x17addc(0x195))/0x6*(-parseInt(_0x17addc(0x1b5))/0x7)+-parseInt(_0x17addc(0x192))/0x8*(parseInt(_0x17addc(0x1a9))/0x9)+parseInt(_0x17addc(0x182))/0xa*(parseInt(_0x17addc(0x183))/0xb)+parseInt(_0x17addc(0x188))/0xc;if(_0x340cec===_0x152f3c)break;else _0x33e166['push'](_0x33e166['shift']());}catch(_0x12696b){_0x33e166['push'](_0x33e166['shift']());}}}(a24_0x3219,0x61da4));function a24_0x319d(_0x33d713,_0xb5a70c){const _0x321902=a24_0x3219();return a24_0x319d=function(_0x319dff,_0x47a97d){_0x319dff=_0x319dff-0x17c;let _0x442458=_0x321902[_0x319dff];return _0x442458;},a24_0x319d(_0x33d713,_0xb5a70c);}import{BaseCommand}from'./command.js';import{handleSDKOutput}from'../utils/command-output.js';function a24_0x3219(){const _0x2ec05e=['rule','Error:\x20Full\x20path\x20required\x20(parent/segment_name\x20or\x20parent/folder/segment_name)','4877724CCgfob','Create\x20child\x20segment\x20with\x20filtering\x20rules','createSegment','name','✔\x20Created\x20segment\x20\x27','error','segment:create','noCountPopulation','segment','Resolving\x20parent\x20segment\x20\x27','1222496XexzPa','Resolving\x20folder\x20\x27','Examples:','1212654HkmPxB','Resolved\x20folder\x20ID:\x20','Target\x20path:\x20','Parent:\x20','parent','Site:\x20','type','segmentPath','length','Creating\x20segment\x20\x27','Error:\x20Cannot\x20create\x20segment\x20in\x20a\x20segment.\x20Parent\x20path\x20must\x20be\x20a\x20folder\x20or\x20parent.','Resolving\x20folder\x20path\x20\x27','\x27...','segments','folder','2LQfLAQ','ruleFile','2035953IWFPRB','folderId','resolveFolderId','45QDOcic','resolvePathToResource','data','site','kind','verbose','\x20\x20tdx\x20segment\x20create\x20\x22My\x20Audience/High\x20Value\x22\x20--rule\x20\x27...\x27','\x20\x20tdx\x20segment\x20create\x20\x22Premium\x22\x20--rule\x20\x27...\x27\x20\x20#\x20Relative\x20to\x20context','4328pDyRZE','1770jHvncF','\x27\x20with\x20ID:\x20','execute','14SnGUDs','Parent\x20path:\x20','includes','129460WdBibF','Usage:\x20tdx\x20segment\x20create\x20<parent/segment_name>\x20[options]','resolveParentId','Error:\x20Segment\x20path\x20or\x20name\x20is\x20required','10VtRqHB','8571772gpmGAz','Resolved\x20relative\x20path\x20to:\x20','description'];a24_0x3219=function(){return _0x2ec05e;};return a24_0x3219();}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_0x50d866(0x18b)]=a24_0x50d866(0x18e);[a24_0x50d866(0x185)]=a24_0x50d866(0x189);async[a24_0x50d866(0x1b4)](_0x210c25){const _0x458988=a24_0x50d866,{options:_0x22cd1a,args:_0x1f8c95,tdx:_0x1023de}=_0x210c25,_0x11af01=_0x22cd1a;if(_0x1f8c95[_0x458988(0x19d)]===0x0)return console[_0x458988(0x18d)](_0x458988(0x181)),console[_0x458988(0x18d)]('Usage:\x20tdx\x20segment\x20create\x20<path>\x20[options]'),console[_0x458988(0x18d)](_0x458988(0x194)),console[_0x458988(0x18d)](_0x458988(0x1af)),console[_0x458988(0x18d)]('\x20\x20tdx\x20segment\x20create\x20\x22My\x20Audience/Marketing/Premium\x22\x20--rule\x20\x27...\x27'),console['error'](_0x458988(0x1b0)),0x1;const _0x104523=_0x1f8c95[0x0],_0x46110f=_0x22cd1a[_0x458988(0x19c)];let _0x153951=_0x104523;_0x46110f&&!_0x104523[_0x458988(0x17d)]('/')&&(_0x153951=_0x46110f+'/'+_0x104523,_0x11af01[_0x458988(0x1ae)]&&console[_0x458988(0x18d)](_0x458988(0x184)+_0x153951));const _0x182011=parsePath(_0x153951);if(_0x182011[_0x458988(0x1a2)][_0x458988(0x19d)]<0x2)return console[_0x458988(0x18d)](_0x458988(0x187)),console[_0x458988(0x18d)](_0x458988(0x17f)),0x1;const _0x502f7f=_0x182011[_0x458988(0x1a2)][0x0],_0x2571c8=getBaseName(_0x153951),_0x5543ff=getParentPath(_0x153951);_0x11af01['verbose']&&(console['error'](_0x458988(0x19a)+_0x11af01[_0x458988(0x1ac)]),console[_0x458988(0x18d)](_0x458988(0x197)+_0x153951),console[_0x458988(0x18d)](_0x458988(0x198)+_0x502f7f),console[_0x458988(0x18d)]('Segment\x20name:\x20'+_0x2571c8),console['error'](_0x458988(0x17c)+_0x5543ff));const _0x519d40=await withSpinner(_0x458988(0x191)+_0x502f7f+_0x458988(0x1a1),()=>_0x1023de[_0x458988(0x190)][_0x458988(0x180)](_0x502f7f),{'verbose':_0x11af01[_0x458988(0x1ae)]}),_0x3a9792=_0x519d40['data'];let _0x2254db;if(_0x182011['segments']['length']>0x2){const _0x1141cc=await withSpinner(_0x458988(0x1a0)+_0x5543ff+_0x458988(0x1a1),()=>_0x1023de[_0x458988(0x190)][_0x458988(0x1aa)](_0x5543ff),{'verbose':_0x11af01['verbose']}),_0x4c270e=_0x1141cc[_0x458988(0x1ab)];if(_0x4c270e[_0x458988(0x19b)]!==_0x458988(0x1a3)&&_0x4c270e[_0x458988(0x19b)]!==_0x458988(0x199))return console[_0x458988(0x18d)](_0x458988(0x19f)),0x1;_0x2254db=_0x4c270e[_0x458988(0x1a7)];}else{if(_0x11af01[_0x458988(0x1a3)]){const _0x17d564=await withSpinner(_0x458988(0x193)+_0x11af01[_0x458988(0x1a3)]+_0x458988(0x1a1),()=>_0x1023de[_0x458988(0x190)][_0x458988(0x1a8)](_0x3a9792,_0x11af01['folder']),{'verbose':_0x11af01[_0x458988(0x1ae)]});_0x2254db=_0x17d564[_0x458988(0x1ab)];}}_0x11af01[_0x458988(0x1ae)]&&_0x2254db&&console[_0x458988(0x18d)](_0x458988(0x196)+_0x2254db);const _0x4031c0=await loadJSONFromOptions(_0x11af01[_0x458988(0x186)],_0x11af01[_0x458988(0x1a5)]),_0x42855e={'name':_0x2571c8,'description':_0x11af01[_0x458988(0x185)],'rule':_0x4031c0,'kind':_0x11af01['kind']!==undefined?parseInt(_0x11af01[_0x458988(0x1ad)],0xa):undefined,'isVisible':_0x11af01['invisible']?![]:undefined,'segmentFolderId':_0x2254db,'countPopulation':_0x11af01[_0x458988(0x18f)]?![]:undefined},_0x969f1f=await withSpinner(_0x458988(0x19e)+_0x2571c8+_0x458988(0x1a1),()=>_0x1023de[_0x458988(0x190)][_0x458988(0x18a)](_0x3a9792,_0x42855e),{'verbose':_0x11af01[_0x458988(0x1ae)]}),_0x104a4a=_0x969f1f[_0x458988(0x1ab)];return console[_0x458988(0x18d)](_0x458988(0x18c)+_0x104a4a[_0x458988(0x18b)]+_0x458988(0x1b3)+_0x104a4a['id']),_0x153951!==_0x104523&&console[_0x458988(0x18d)]('\x20\x20\x20Path:\x20'+_0x153951),await handleSDKOutput([_0x104a4a],_0x11af01),0x0;}}
1
+ const a24_0x39026f=a24_0x3924;(function(_0xac719d,_0xab3466){const _0x6e32ac=a24_0x3924,_0x43fc98=_0xac719d();while(!![]){try{const _0x482103=-parseInt(_0x6e32ac(0x15a))/0x1+-parseInt(_0x6e32ac(0x170))/0x2*(parseInt(_0x6e32ac(0x187))/0x3)+parseInt(_0x6e32ac(0x161))/0x4+-parseInt(_0x6e32ac(0x17c))/0x5+-parseInt(_0x6e32ac(0x15f))/0x6*(-parseInt(_0x6e32ac(0x177))/0x7)+parseInt(_0x6e32ac(0x181))/0x8*(-parseInt(_0x6e32ac(0x17d))/0x9)+-parseInt(_0x6e32ac(0x16e))/0xa*(-parseInt(_0x6e32ac(0x183))/0xb);if(_0x482103===_0xab3466)break;else _0x43fc98['push'](_0x43fc98['shift']());}catch(_0x308c37){_0x43fc98['push'](_0x43fc98['shift']());}}}(a24_0x8107,0x6bbc7));function a24_0x3924(_0x5e5fb3,_0x2e81db){const _0x810753=a24_0x8107();return a24_0x3924=function(_0x3924c5,_0x3afd43){_0x3924c5=_0x3924c5-0x15a;let _0x1114ae=_0x810753[_0x3924c5];return _0x1114ae;},a24_0x3924(_0x5e5fb3,_0x2e81db);}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';function a24_0x8107(){const _0x48700b=['Parent\x20path:\x20','45660RyTqbj','\x20\x20\x20Path:\x20','1306732lBTHMd','site','Parent:\x20','Error:\x20Segment\x20path\x20or\x20name\x20is\x20required','Resolved\x20folder\x20ID:\x20','folder','noCountPopulation','data','\x27...','type','Usage:\x20tdx\x20segment\x20create\x20<parent/segment_name>\x20[options]','\x20\x20tdx\x20segment\x20create\x20\x22My\x20Audience/Marketing/Premium\x22\x20--rule\x20\x27...\x27','Site:\x20','610860UqtfKA','Error:\x20Full\x20path\x20required\x20(parent/segment_name\x20or\x20parent/folder/segment_name)','3316PPnFBo','verbose','Segment\x20name:\x20','\x27\x20with\x20ID:\x20','folderId','segments','Resolving\x20folder\x20\x27','35pZIoUY','Error:\x20Cannot\x20create\x20segment\x20in\x20a\x20segment.\x20Parent\x20path\x20must\x20be\x20a\x20folder\x20or\x20parent.','ruleFile','error','Resolving\x20parent\x20segment\x20\x27','3263515psQFCa','45ttgOyP','invisible','name','resolveParentId','134560uDEwVp','segment:create','231khYXJo','Usage:\x20tdx\x20segment\x20create\x20<path>\x20[options]','resolveFolderId','length','288FkYzzw','segment','\x20\x20tdx\x20segment\x20create\x20\x22Premium\x22\x20--rule\x20\x27...\x27\x20\x20#\x20Relative\x20to\x20context','310281OuzYfF','kind','Creating\x20segment\x20\x27','description'];a24_0x8107=function(){return _0x48700b;};return a24_0x8107();}export class SegmentCreateCommand extends BaseCommand{[a24_0x39026f(0x17f)]=a24_0x39026f(0x182);['description']='Create\x20child\x20segment\x20with\x20filtering\x20rules';async['execute'](_0x5d16cc){const _0x532881=a24_0x39026f,{options:_0x3c7b65,args:_0x51a72f,tdx:_0x235a33}=_0x5d16cc,_0x279338=_0x3c7b65;if(_0x51a72f[_0x532881(0x186)]===0x0)return console['error'](_0x532881(0x164)),console[_0x532881(0x17a)](_0x532881(0x184)),console[_0x532881(0x17a)]('Examples:'),console[_0x532881(0x17a)]('\x20\x20tdx\x20segment\x20create\x20\x22My\x20Audience/High\x20Value\x22\x20--rule\x20\x27...\x27'),console[_0x532881(0x17a)](_0x532881(0x16c)),console[_0x532881(0x17a)](_0x532881(0x189)),0x1;const _0x2119e6=_0x51a72f[0x0],_0x22f067=_0x3c7b65['segmentPath'];let _0xb48b10=_0x2119e6;_0x22f067&&!_0x2119e6['includes']('/')&&(_0xb48b10=_0x22f067+'/'+_0x2119e6,_0x279338[_0x532881(0x171)]&&console[_0x532881(0x17a)]('Resolved\x20relative\x20path\x20to:\x20'+_0xb48b10));const _0x407350=parsePath(_0xb48b10);if(_0x407350[_0x532881(0x175)][_0x532881(0x186)]<0x2)return console[_0x532881(0x17a)](_0x532881(0x16f)),console[_0x532881(0x17a)](_0x532881(0x16b)),0x1;const _0x1e9048=_0x407350['segments'][0x0],_0x17e1d0=getBaseName(_0xb48b10),_0x2339db=getParentPath(_0xb48b10);_0x279338['verbose']&&(console['error'](_0x532881(0x16d)+_0x279338[_0x532881(0x162)]),console[_0x532881(0x17a)]('Target\x20path:\x20'+_0xb48b10),console[_0x532881(0x17a)](_0x532881(0x163)+_0x1e9048),console[_0x532881(0x17a)](_0x532881(0x172)+_0x17e1d0),console['error'](_0x532881(0x15e)+_0x2339db));const _0x1ba771=await withSpinner(_0x532881(0x17b)+_0x1e9048+'\x27...',()=>_0x235a33[_0x532881(0x188)][_0x532881(0x180)](_0x1e9048),{'verbose':_0x279338[_0x532881(0x171)]}),_0x3adf59=_0x1ba771[_0x532881(0x168)];let _0x5a12c8;if(_0x407350['segments'][_0x532881(0x186)]>0x2){const _0x3f06e1=await withSpinner('Resolving\x20folder\x20path\x20\x27'+_0x2339db+_0x532881(0x169),()=>_0x235a33[_0x532881(0x188)]['resolvePathToResource'](_0x2339db),{'verbose':_0x279338[_0x532881(0x171)]}),_0x3fb819=_0x3f06e1['data'];if(_0x3fb819['type']!==_0x532881(0x166)&&_0x3fb819[_0x532881(0x16a)]!=='parent')return console[_0x532881(0x17a)](_0x532881(0x178)),0x1;_0x5a12c8=_0x3fb819[_0x532881(0x174)];}else{if(_0x279338['folder']){const _0x3d7518=await withSpinner(_0x532881(0x176)+_0x279338[_0x532881(0x166)]+'\x27...',()=>_0x235a33[_0x532881(0x188)][_0x532881(0x185)](_0x3adf59,_0x279338[_0x532881(0x166)]),{'verbose':_0x279338['verbose']});_0x5a12c8=_0x3d7518[_0x532881(0x168)];}}_0x279338['verbose']&&_0x5a12c8&&console[_0x532881(0x17a)](_0x532881(0x165)+_0x5a12c8);const _0x1cb41e=await loadJSONFromOptions(_0x279338['rule'],_0x279338[_0x532881(0x179)]),_0x39ba96={'name':_0x17e1d0,'description':_0x279338[_0x532881(0x15d)],'rule':_0x1cb41e,'kind':_0x279338['kind']!==undefined?parseInt(_0x279338[_0x532881(0x15b)],0xa):undefined,'isVisible':_0x279338[_0x532881(0x17e)]?![]:undefined,'segmentFolderId':_0x5a12c8,'countPopulation':_0x279338[_0x532881(0x167)]?![]:undefined},_0xe5a8b1=await withSpinner(_0x532881(0x15c)+_0x17e1d0+'\x27...',()=>_0x235a33['segment']['createSegment'](_0x3adf59,_0x39ba96),{'verbose':_0x279338[_0x532881(0x171)]}),_0x460cd7=_0xe5a8b1[_0x532881(0x168)];return console[_0x532881(0x17a)]('✔\x20Created\x20segment\x20\x27'+_0x460cd7[_0x532881(0x17f)]+_0x532881(0x173)+_0x460cd7['id']),_0xb48b10!==_0x2119e6&&console[_0x532881(0x17a)](_0x532881(0x160)+_0xb48b10),await handleSDKOutput([_0x460cd7],_0x279338),0x0;}}
@@ -1 +1 @@
1
- function a25_0x1dbd(){const _0x40ef04=['Site:\x20','List\x20available\x20fields\x20for\x20segmentation','execute','9050dYTyDl','2837810Djatfn','listFields','6WQhfsu','✔\x20Found\x20','site','segment','661223OORels','Parent\x20segment:\x20','3032iOhbxo','336GEjZnD','Listing\x20fields\x20for\x20\x27','data','parentSegment','description','7458619tGgYHW','length','259491snNJQw','\x20\x20Or\x20set\x20context:\x20tdx\x20use\x20parent_segment\x20<name>','Usage:\x20tdx\x20segment\x20fields\x20<parent_name>','name','segment:fields','error','7699310HiEbss','259497VZnAgc'];a25_0x1dbd=function(){return _0x40ef04;};return a25_0x1dbd();}const a25_0x318129=a25_0x41fa;(function(_0x5e0e70,_0x5e2991){const _0x5cc8a9=a25_0x41fa,_0x2286e1=_0x5e0e70();while(!![]){try{const _0x59774a=-parseInt(_0x5cc8a9(0x1d8))/0x1+-parseInt(_0x5cc8a9(0x1ee))/0x2+-parseInt(_0x5cc8a9(0x1e2))/0x3+-parseInt(_0x5cc8a9(0x1da))/0x4*(-parseInt(_0x5cc8a9(0x1ed))/0x5)+-parseInt(_0x5cc8a9(0x1d4))/0x6*(-parseInt(_0x5cc8a9(0x1e0))/0x7)+-parseInt(_0x5cc8a9(0x1db))/0x8*(-parseInt(_0x5cc8a9(0x1e9))/0x9)+-parseInt(_0x5cc8a9(0x1e8))/0xa;if(_0x59774a===_0x5e2991)break;else _0x2286e1['push'](_0x2286e1['shift']());}catch(_0x5cb4a5){_0x2286e1['push'](_0x2286e1['shift']());}}}(a25_0x1dbd,0xadcf7));import{BaseCommand}from'./command.js';import{handleSDKOutput}from'../utils/command-output.js';import{withSpinner}from'../utils/spinner.js';function a25_0x41fa(_0x2c7ac8,_0x1f46df){const _0x1dbdef=a25_0x1dbd();return a25_0x41fa=function(_0x41faf0,_0x43fdf0){_0x41faf0=_0x41faf0-0x1d4;let _0x1651f7=_0x1dbdef[_0x41faf0];return _0x1651f7;},a25_0x41fa(_0x2c7ac8,_0x1f46df);}export class SegmentFieldsCommand extends BaseCommand{[a25_0x318129(0x1e5)]=a25_0x318129(0x1e6);[a25_0x318129(0x1df)]=a25_0x318129(0x1eb);async[a25_0x318129(0x1ec)](_0x1da4b6){const _0x160328=a25_0x318129,{options:_0x18d129,args:_0x18cda7,tdx:_0x2b1ac5}=_0x1da4b6,_0x154dcd=_0x18cda7[0x0]||_0x18d129[_0x160328(0x1de)];if(!_0x154dcd)return console[_0x160328(0x1e7)]('Error:\x20Parent\x20segment\x20name\x20is\x20required'),console['error'](_0x160328(0x1e4)),console['error'](_0x160328(0x1e3)),0x1;_0x18d129['verbose']&&(console[_0x160328(0x1e7)](_0x160328(0x1ea)+_0x18d129[_0x160328(0x1d6)]),console[_0x160328(0x1e7)](_0x160328(0x1d9)+_0x154dcd));const _0x1f3e12=await withSpinner(_0x160328(0x1dc)+_0x154dcd+'\x27...',()=>_0x2b1ac5[_0x160328(0x1d7)][_0x160328(0x1ef)](_0x154dcd),{'verbose':_0x18d129['verbose']}),_0x168a5c=_0x1f3e12[_0x160328(0x1dd)];return console[_0x160328(0x1e7)](_0x160328(0x1d5)+_0x168a5c[_0x160328(0x1e1)]+'\x20field'+(_0x168a5c[_0x160328(0x1e1)]!==0x1?'s':'')),await handleSDKOutput(_0x168a5c,_0x18d129),0x0;}}
1
+ function a25_0x10b3(_0x13b197,_0x3744b5){const _0x176eff=a25_0x176e();return a25_0x10b3=function(_0x10b36b,_0x2a5e94){_0x10b36b=_0x10b36b-0x189;let _0x15561f=_0x176eff[_0x10b36b];return _0x15561f;},a25_0x10b3(_0x13b197,_0x3744b5);}const a25_0xb97ffd=a25_0x10b3;(function(_0x187dbb,_0x5008a8){const _0x24699d=a25_0x10b3,_0x39a604=_0x187dbb();while(!![]){try{const _0x48a188=parseInt(_0x24699d(0x18d))/0x1+-parseInt(_0x24699d(0x199))/0x2*(parseInt(_0x24699d(0x197))/0x3)+parseInt(_0x24699d(0x1a1))/0x4+-parseInt(_0x24699d(0x18c))/0x5+parseInt(_0x24699d(0x1a4))/0x6*(-parseInt(_0x24699d(0x1a7))/0x7)+-parseInt(_0x24699d(0x189))/0x8+-parseInt(_0x24699d(0x194))/0x9*(-parseInt(_0x24699d(0x190))/0xa);if(_0x48a188===_0x5008a8)break;else _0x39a604['push'](_0x39a604['shift']());}catch(_0x40a73c){_0x39a604['push'](_0x39a604['shift']());}}}(a25_0x176e,0xb1ac2));import{BaseCommand}from'./command.js';import{handleSDKOutput}from'../utils/command-output.js';function a25_0x176e(){const _0x40186a=['execute','length','1479770GXfKiI','verbose','✔\x20Found\x20','segment','9LeUncq','data','\x20field','3KxWmcX','Site:\x20','1792542XaNHyf','\x27...','error','site','listFields','Usage:\x20tdx\x20segment\x20fields\x20<parent_name>','segment:fields','\x20\x20Or\x20set\x20context:\x20tdx\x20use\x20parent_segment\x20<name>','5452344sRocFM','List\x20available\x20fields\x20for\x20segmentation','description','3784020gggLcF','Listing\x20fields\x20for\x20\x27','parentSegment','7kDhbXX','242992ZHJWow','Error:\x20Parent\x20segment\x20name\x20is\x20required','name','389725ZoXaMF','851943kKCXqG'];a25_0x176e=function(){return _0x40186a;};return a25_0x176e();}import{withSpinner}from'../utils/spinner.js';export class SegmentFieldsCommand extends BaseCommand{[a25_0xb97ffd(0x18b)]=a25_0xb97ffd(0x19f);[a25_0xb97ffd(0x1a3)]=a25_0xb97ffd(0x1a2);async[a25_0xb97ffd(0x18e)](_0x5b76e9){const _0x584f6a=a25_0xb97ffd,{options:_0xb5f8be,args:_0x5ac79f,tdx:_0x1d3da5}=_0x5b76e9,_0x3a7384=_0x5ac79f[0x0]||_0xb5f8be[_0x584f6a(0x1a6)];if(!_0x3a7384)return console['error'](_0x584f6a(0x18a)),console['error'](_0x584f6a(0x19e)),console[_0x584f6a(0x19b)](_0x584f6a(0x1a0)),0x1;_0xb5f8be[_0x584f6a(0x191)]&&(console[_0x584f6a(0x19b)](_0x584f6a(0x198)+_0xb5f8be[_0x584f6a(0x19c)]),console['error']('Parent\x20segment:\x20'+_0x3a7384));const _0x54ebbd=await withSpinner(_0x584f6a(0x1a5)+_0x3a7384+_0x584f6a(0x19a),()=>_0x1d3da5[_0x584f6a(0x193)][_0x584f6a(0x19d)](_0x3a7384),{'verbose':_0xb5f8be['verbose']}),_0xc6c047=_0x54ebbd[_0x584f6a(0x195)];return console[_0x584f6a(0x19b)](_0x584f6a(0x192)+_0xc6c047[_0x584f6a(0x18f)]+_0x584f6a(0x196)+(_0xc6c047['length']!==0x1?'s':'')),await handleSDKOutput(_0xc6c047,_0xb5f8be),0x0;}}
@@ -1 +1 @@
1
- function a26_0x1659(){const _0x3748a2=['170060xYkfIM','1429332fMrsaT','jsonl','3543FmXLEp','stringify','32mFmJFF','Context\x20details:','21jXnPBP','6289850yloPQV','9qKTmYD','5218895XaoBum','segmentPath','1278375whOTJb','log','segment:pwd','\x20\x20Path:\x20','execute','name','json','2291960WuHbBs','error','description','356PsaDAW','format'];a26_0x1659=function(){return _0x3748a2;};return a26_0x1659();}const a26_0x37ea7e=a26_0x12fd;(function(_0x233d20,_0x152cf6){const _0x34afe4=a26_0x12fd,_0x1a4e03=_0x233d20();while(!![]){try{const _0x14aba4=-parseInt(_0x34afe4(0xaa))/0x1*(-parseInt(_0x34afe4(0xa5))/0x2)+parseInt(_0x34afe4(0x9b))/0x3+parseInt(_0x34afe4(0x94))/0x4*(-parseInt(_0x34afe4(0xa7))/0x5)+-parseInt(_0x34afe4(0xa8))/0x6*(parseInt(_0x34afe4(0x96))/0x7)+parseInt(_0x34afe4(0xa2))/0x8+parseInt(_0x34afe4(0x98))/0x9*(parseInt(_0x34afe4(0x97))/0xa)+-parseInt(_0x34afe4(0x99))/0xb;if(_0x14aba4===_0x152cf6)break;else _0x1a4e03['push'](_0x1a4e03['shift']());}catch(_0x38193a){_0x1a4e03['push'](_0x1a4e03['shift']());}}}(a26_0x1659,0x7cc4c));import{BaseCommand}from'./command.js';function a26_0x12fd(_0x4e2cc8,_0x57be92){const _0x1659e3=a26_0x1659();return a26_0x12fd=function(_0x12fd6d,_0x14e508){_0x12fd6d=_0x12fd6d-0x93;let _0x36f71e=_0x1659e3[_0x12fd6d];return _0x36f71e;},a26_0x12fd(_0x4e2cc8,_0x57be92);}export class SegmentPwdCommand extends BaseCommand{[a26_0x37ea7e(0xa0)]=a26_0x37ea7e(0x9d);[a26_0x37ea7e(0xa4)]='Show\x20current\x20segment/folder\x20context';async[a26_0x37ea7e(0x9f)](_0x30be61){const _0x5db930=a26_0x37ea7e,{options:_0x3dec8f}=_0x30be61;try{const _0x1c493a=_0x3dec8f[_0x5db930(0x9a)];if(!_0x1c493a)return _0x3dec8f['format']===_0x5db930(0xa1)||_0x3dec8f[_0x5db930(0xa6)]==='jsonl'?console[_0x5db930(0x9c)](JSON[_0x5db930(0x93)]({'path':'/','type':'root'})):console[_0x5db930(0x9c)]('/'),0x0;if(_0x3dec8f[_0x5db930(0xa6)]===_0x5db930(0xa1)||_0x3dec8f['format']===_0x5db930(0xa9)){const _0xa79fef={'path':_0x1c493a};console['log'](JSON[_0x5db930(0x93)](_0xa79fef));}else console['log'](_0x1c493a),_0x3dec8f['verbose']&&(console[_0x5db930(0xa3)](''),console[_0x5db930(0xa3)](_0x5db930(0x95)),console[_0x5db930(0xa3)](_0x5db930(0x9e)+_0x1c493a),console[_0x5db930(0xa3)](''),console['error']('Use\x20\x22tdx\x20context\x22\x20to\x20see\x20all\x20context\x20parameters'),console['error']('Use\x20\x22tdx\x20context\x20--debug\x22\x20to\x20see\x20context\x20sources'));return 0x0;}catch(_0x45a209){throw _0x45a209;}}}
1
+ const a26_0x2db883=a26_0x28cb;(function(_0x50d1b1,_0xb8e3b8){const _0x4f90c5=a26_0x28cb,_0x3a8565=_0x50d1b1();while(!![]){try{const _0x37b64e=-parseInt(_0x4f90c5(0xc8))/0x1*(parseInt(_0x4f90c5(0xce))/0x2)+parseInt(_0x4f90c5(0xcb))/0x3+-parseInt(_0x4f90c5(0xd7))/0x4*(parseInt(_0x4f90c5(0xd0))/0x5)+parseInt(_0x4f90c5(0xde))/0x6+-parseInt(_0x4f90c5(0xda))/0x7*(-parseInt(_0x4f90c5(0xdc))/0x8)+-parseInt(_0x4f90c5(0xdd))/0x9+-parseInt(_0x4f90c5(0xd6))/0xa*(-parseInt(_0x4f90c5(0xcc))/0xb);if(_0x37b64e===_0xb8e3b8)break;else _0x3a8565['push'](_0x3a8565['shift']());}catch(_0x490b30){_0x3a8565['push'](_0x3a8565['shift']());}}}(a26_0x1a02,0x4a46f));import{BaseCommand}from'./command.js';export class SegmentPwdCommand extends BaseCommand{[a26_0x2db883(0xd3)]=a26_0x2db883(0xdb);[a26_0x2db883(0xd1)]=a26_0x2db883(0xca);async[a26_0x2db883(0xc9)](_0x234f76){const _0x57afc0=a26_0x2db883,{options:_0x8a373f}=_0x234f76;try{const _0x33252b=_0x8a373f[_0x57afc0(0xd5)];if(!_0x33252b)return _0x8a373f[_0x57afc0(0xd2)]===_0x57afc0(0xcd)||_0x8a373f[_0x57afc0(0xd2)]===_0x57afc0(0xd9)?console[_0x57afc0(0xd8)](JSON[_0x57afc0(0xd4)]({'path':'/','type':'root'})):console[_0x57afc0(0xd8)]('/'),0x0;if(_0x8a373f['format']===_0x57afc0(0xcd)||_0x8a373f[_0x57afc0(0xd2)]==='jsonl'){const _0x5af748={'path':_0x33252b};console[_0x57afc0(0xd8)](JSON[_0x57afc0(0xd4)](_0x5af748));}else console[_0x57afc0(0xd8)](_0x33252b),_0x8a373f['verbose']&&(console[_0x57afc0(0xc7)](''),console['error'](_0x57afc0(0xcf)),console[_0x57afc0(0xc7)]('\x20\x20Path:\x20'+_0x33252b),console['error'](''),console[_0x57afc0(0xc7)]('Use\x20\x22tdx\x20context\x22\x20to\x20see\x20all\x20context\x20parameters'),console[_0x57afc0(0xc7)]('Use\x20\x22tdx\x20context\x20--debug\x22\x20to\x20see\x20context\x20sources'));return 0x0;}catch(_0x56863f){throw _0x56863f;}}}function a26_0x28cb(_0xed4b0d,_0x404cd5){const _0x1a02a6=a26_0x1a02();return a26_0x28cb=function(_0x28cb5f,_0x1b9ddb){_0x28cb5f=_0x28cb5f-0xc7;let _0x209284=_0x1a02a6[_0x28cb5f];return _0x209284;},a26_0x28cb(_0xed4b0d,_0x404cd5);}function a26_0x1a02(){const _0x18dc32=['execute','Show\x20current\x20segment/folder\x20context','1479588gIxhAf','187YYdCVp','json','420482WtCsZE','Context\x20details:','18750mLEycG','description','format','name','stringify','segmentPath','220970dZSacP','344UTFAxY','log','jsonl','3129fVcFrx','segment:pwd','368QXGSsr','3623301ONnZhF','2100972lSMxSF','error','1DJkTmH'];a26_0x1a02=function(){return _0x18dc32;};return a26_0x1a02();}
@@ -1 +1 @@
1
- const a27_0x447bd6=a27_0x53d8;function a27_0x53d8(_0x246904,_0x1382c6){const _0x5aed29=a27_0x5aed();return a27_0x53d8=function(_0x53d86e,_0x140981){_0x53d86e=_0x53d86e-0xab;let _0x53209f=_0x5aed29[_0x53d86e];return _0x53209f;},a27_0x53d8(_0x246904,_0x1382c6);}(function(_0x478049,_0x14ad0d){const _0x1451e0=a27_0x53d8,_0x1d617a=_0x478049();while(!![]){try{const _0x358c09=-parseInt(_0x1451e0(0xc9))/0x1*(-parseInt(_0x1451e0(0xd3))/0x2)+parseInt(_0x1451e0(0xcc))/0x3*(parseInt(_0x1451e0(0xc8))/0x4)+-parseInt(_0x1451e0(0xbd))/0x5+-parseInt(_0x1451e0(0xb4))/0x6+-parseInt(_0x1451e0(0xba))/0x7+parseInt(_0x1451e0(0xb0))/0x8+parseInt(_0x1451e0(0xb9))/0x9*(-parseInt(_0x1451e0(0xd0))/0xa);if(_0x358c09===_0x14ad0d)break;else _0x1d617a['push'](_0x1d617a['shift']());}catch(_0x3f58bf){_0x1d617a['push'](_0x1d617a['shift']());}}}(a27_0x5aed,0x4a71e));import{BaseCommand}from'./command.js';import{handleSDKOutput}from'../utils/command-output.js';import{withSpinner}from'../utils/spinner.js';function a27_0x5aed(){const _0x2b683e=['\x27...','1385286azwHuJ','Segment\x20ID:\x20','Resolved\x20type:\x20','segmentName','segment:update','423QQRFcl','2085783uAxRsm','resolvePathToResource','Resolved\x20relative\x20path\x20to:\x20','236685syDRwe','INTERNAL','Error:\x20Cannot\x20update\x20','segmentId','parentId','segmentPath','Resolving\x20folder\x20\x27','\x20\x20tdx\x20segment\x20update\x20\x22High\x20Value\x22\x20--rule\x20\x27...\x27\x20\x20#\x20Relative\x20to\x20context','Parent\x20ID:\x20','Updating\x20segment\x20\x27','folder','440932DwdSsw','39157NNOHqZ','ruleFile','rule','3QgsEOd','Resolving\x20path\x20\x27','kind','Use:\x20tdx\x20segment\x20update\x20<path_to_segment>\x20[options]','50860qpMmek','Resolved\x20folder\x20ID:\x20','verbose','22BfKvkr','\x20\x20\x20Path:\x20','segment','.\x20Only\x20child\x20segments\x20can\x20be\x20updated.','name','data','type','Usage:\x20tdx\x20segment\x20update\x20<path>\x20[options]','\x20\x20tdx\x20segment\x20update\x20\x22My\x20Audience/High\x20Value\x22\x20--description\x20\x22...\x22','includes','✔\x20Updated\x20segment\x20\x27','description','resolveFolderId','4633560aqzuqq','Examples:','error'];a27_0x5aed=function(){return _0x2b683e;};return a27_0x5aed();}import{loadJSONFromOptions}from'../utils/json-loader.js';import{SDKError,ErrorCode}from'../sdk/index.js';export class SegmentUpdateCommand extends BaseCommand{[a27_0x447bd6(0xd7)]=a27_0x447bd6(0xb8);[a27_0x447bd6(0xae)]='Update\x20existing\x20child\x20segment';async['execute'](_0x42a3c3){const _0x53f53d=a27_0x447bd6,{options:_0xcee2a6,args:_0x2310d6,tdx:_0x155998}=_0x42a3c3,_0x441a4f=_0xcee2a6;if(_0x2310d6['length']===0x0)return console['error']('Error:\x20Segment\x20path\x20or\x20name\x20is\x20required'),console[_0x53f53d(0xb2)](_0x53f53d(0xda)),console[_0x53f53d(0xb2)](_0x53f53d(0xb1)),console[_0x53f53d(0xb2)](_0x53f53d(0xab)),console[_0x53f53d(0xb2)](_0x53f53d(0xc4)),0x1;const _0x502607=_0x2310d6[0x0],_0x501edd=_0xcee2a6[_0x53f53d(0xc2)];let _0x1eca6c=_0x502607;_0x501edd&&!_0x502607[_0x53f53d(0xac)]('/')&&(_0x1eca6c=_0x501edd+'/'+_0x502607,_0x441a4f['verbose']&&console[_0x53f53d(0xb2)](_0x53f53d(0xbc)+_0x1eca6c));const _0x30c46f=await withSpinner(_0x53f53d(0xcd)+_0x1eca6c+_0x53f53d(0xb3),()=>_0x155998[_0x53f53d(0xd5)][_0x53f53d(0xbb)](_0x1eca6c),{'verbose':_0x441a4f[_0x53f53d(0xd2)]}),_0x95c1c2=_0x30c46f['data'];_0x441a4f['verbose']&&console['error'](_0x53f53d(0xb6)+_0x95c1c2[_0x53f53d(0xd9)]);if(_0x95c1c2[_0x53f53d(0xd9)]!==_0x53f53d(0xd5))return console[_0x53f53d(0xb2)](_0x53f53d(0xbf)+_0x95c1c2[_0x53f53d(0xd9)]+_0x53f53d(0xd6)),console[_0x53f53d(0xb2)](_0x53f53d(0xcf)),0x1;if(!_0x95c1c2[_0x53f53d(0xc0)])throw new SDKError(ErrorCode[_0x53f53d(0xbe)],'Segment\x20ID\x20missing\x20from\x20resolved\x20path');const _0x1cbbcb=_0x95c1c2[_0x53f53d(0xc1)],_0x4fef88=_0x95c1c2[_0x53f53d(0xc0)];_0x441a4f[_0x53f53d(0xd2)]&&(console['error'](_0x53f53d(0xc5)+_0x1cbbcb),console[_0x53f53d(0xb2)](_0x53f53d(0xb5)+_0x4fef88));let _0x21ff17;if(_0x441a4f[_0x53f53d(0xc7)]){const _0x25af98=_0x441a4f[_0x53f53d(0xc7)],_0x32eb10=await withSpinner(_0x53f53d(0xc3)+_0x25af98+_0x53f53d(0xb3),()=>_0x155998[_0x53f53d(0xd5)][_0x53f53d(0xaf)](_0x1cbbcb,_0x25af98),{'verbose':_0x441a4f[_0x53f53d(0xd2)]});_0x21ff17=parseInt(_0x32eb10[_0x53f53d(0xd8)],0xa),_0x441a4f['verbose']&&console[_0x53f53d(0xb2)](_0x53f53d(0xd1)+_0x21ff17);}const _0x3ce4b1=await loadJSONFromOptions(_0x441a4f[_0x53f53d(0xcb)],_0x441a4f[_0x53f53d(0xca)]),_0x7e3289={'name':_0x441a4f[_0x53f53d(0xd7)],'description':_0x441a4f['description'],'rule':_0x3ce4b1,'kind':_0x441a4f[_0x53f53d(0xce)]!==undefined?parseInt(_0x441a4f[_0x53f53d(0xce)],0xa):undefined,'segmentFolderId':_0x21ff17},_0x5a1912=await withSpinner(_0x53f53d(0xc6)+_0x95c1c2[_0x53f53d(0xb7)]+_0x53f53d(0xb3),()=>_0x155998[_0x53f53d(0xd5)]['updateSegmentById'](_0x1cbbcb,_0x4fef88,_0x7e3289),{'verbose':_0x441a4f[_0x53f53d(0xd2)]}),_0x3b5dc3=_0x5a1912[_0x53f53d(0xd8)];return console['error'](_0x53f53d(0xad)+_0x3b5dc3['name']+'\x27'),_0x1eca6c!==_0x502607&&console['error'](_0x53f53d(0xd4)+_0x1eca6c),await handleSDKOutput([_0x3b5dc3],_0x441a4f),0x0;}}
1
+ const a27_0x4ea326=a27_0x4f26;(function(_0x47f1f5,_0x7c0191){const _0x17302c=a27_0x4f26,_0x158d0b=_0x47f1f5();while(!![]){try{const _0x4776b0=-parseInt(_0x17302c(0x154))/0x1+parseInt(_0x17302c(0x150))/0x2+-parseInt(_0x17302c(0x157))/0x3+parseInt(_0x17302c(0x14b))/0x4*(-parseInt(_0x17302c(0x14e))/0x5)+parseInt(_0x17302c(0x145))/0x6*(parseInt(_0x17302c(0x149))/0x7)+parseInt(_0x17302c(0x169))/0x8+parseInt(_0x17302c(0x147))/0x9;if(_0x4776b0===_0x7c0191)break;else _0x158d0b['push'](_0x158d0b['shift']());}catch(_0x337799){_0x158d0b['push'](_0x158d0b['shift']());}}}(a27_0xef06,0xbb63c));import{BaseCommand}from'./command.js';import{handleSDKOutput}from'../utils/command-output.js';function a27_0x4f26(_0x35cc63,_0x2b0667){const _0xef06eb=a27_0xef06();return a27_0x4f26=function(_0x4f26da,_0xb9c0aa){_0x4f26da=_0x4f26da-0x145;let _0x5f41ee=_0xef06eb[_0x4f26da];return _0x5f41ee;},a27_0x4f26(_0x35cc63,_0x2b0667);}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_0x4ea326(0x15d);[a27_0x4ea326(0x148)]=a27_0x4ea326(0x161);async['execute'](_0x3c2585){const _0x5ec769=a27_0x4ea326,{options:_0x15beb3,args:_0x3ee667,tdx:_0x54ee85}=_0x3c2585,_0x5ec885=_0x15beb3;if(_0x3ee667['length']===0x0)return console[_0x5ec769(0x151)](_0x5ec769(0x16a)),console[_0x5ec769(0x151)]('Usage:\x20tdx\x20segment\x20update\x20<path>\x20[options]'),console[_0x5ec769(0x151)](_0x5ec769(0x15a)),console[_0x5ec769(0x151)](_0x5ec769(0x14f)),console[_0x5ec769(0x151)](_0x5ec769(0x16c)),0x1;const _0xaa977f=_0x3ee667[0x0],_0x43261c=_0x15beb3[_0x5ec769(0x15b)];let _0x216c69=_0xaa977f;_0x43261c&&!_0xaa977f[_0x5ec769(0x16e)]('/')&&(_0x216c69=_0x43261c+'/'+_0xaa977f,_0x5ec885[_0x5ec769(0x163)]&&console[_0x5ec769(0x151)](_0x5ec769(0x146)+_0x216c69));const _0x1cda58=await withSpinner(_0x5ec769(0x164)+_0x216c69+_0x5ec769(0x171),()=>_0x54ee85[_0x5ec769(0x159)][_0x5ec769(0x15f)](_0x216c69),{'verbose':_0x5ec885[_0x5ec769(0x163)]}),_0x3f9225=_0x1cda58['data'];_0x5ec885[_0x5ec769(0x163)]&&console[_0x5ec769(0x151)](_0x5ec769(0x15c)+_0x3f9225[_0x5ec769(0x14a)]);if(_0x3f9225[_0x5ec769(0x14a)]!==_0x5ec769(0x159))return console[_0x5ec769(0x151)](_0x5ec769(0x153)+_0x3f9225[_0x5ec769(0x14a)]+_0x5ec769(0x152)),console[_0x5ec769(0x151)]('Use:\x20tdx\x20segment\x20update\x20<path_to_segment>\x20[options]'),0x1;if(!_0x3f9225[_0x5ec769(0x14d)])throw new SDKError(ErrorCode[_0x5ec769(0x16b)],_0x5ec769(0x168));const _0xf38fc3=_0x3f9225[_0x5ec769(0x15e)],_0x23f6bb=_0x3f9225[_0x5ec769(0x14d)];_0x5ec885[_0x5ec769(0x163)]&&(console['error']('Parent\x20ID:\x20'+_0xf38fc3),console[_0x5ec769(0x151)]('Segment\x20ID:\x20'+_0x23f6bb));let _0x126a3b;if(_0x5ec885['folder']){const _0x18f7e0=_0x5ec885[_0x5ec769(0x162)],_0x1670c8=await withSpinner(_0x5ec769(0x167)+_0x18f7e0+_0x5ec769(0x171),()=>_0x54ee85[_0x5ec769(0x159)][_0x5ec769(0x166)](_0xf38fc3,_0x18f7e0),{'verbose':_0x5ec885[_0x5ec769(0x163)]});_0x126a3b=parseInt(_0x1670c8[_0x5ec769(0x155)],0xa),_0x5ec885[_0x5ec769(0x163)]&&console[_0x5ec769(0x151)](_0x5ec769(0x165)+_0x126a3b);}const _0x245444=await loadJSONFromOptions(_0x5ec885[_0x5ec769(0x160)],_0x5ec885[_0x5ec769(0x14c)]),_0x31ed1f={'name':_0x5ec885[_0x5ec769(0x158)],'description':_0x5ec885[_0x5ec769(0x148)],'rule':_0x245444,'kind':_0x5ec885[_0x5ec769(0x170)]!==undefined?parseInt(_0x5ec885[_0x5ec769(0x170)],0xa):undefined,'segmentFolderId':_0x126a3b},_0x261458=await withSpinner(_0x5ec769(0x156)+_0x3f9225[_0x5ec769(0x16d)]+_0x5ec769(0x171),()=>_0x54ee85[_0x5ec769(0x159)]['updateSegmentById'](_0xf38fc3,_0x23f6bb,_0x31ed1f),{'verbose':_0x5ec885['verbose']}),_0x3bd63d=_0x261458[_0x5ec769(0x155)];return console[_0x5ec769(0x151)](_0x5ec769(0x16f)+_0x3bd63d[_0x5ec769(0x158)]+'\x27'),_0x216c69!==_0xaa977f&&console['error']('\x20\x20\x20Path:\x20'+_0x216c69),await handleSDKOutput([_0x3bd63d],_0x5ec885),0x0;}}function a27_0xef06(){const _0x578ac0=['data','Updating\x20segment\x20\x27','3088119vtOLzX','name','segment','Examples:','segmentPath','Resolved\x20type:\x20','segment:update','parentId','resolvePathToResource','rule','Update\x20existing\x20child\x20segment','folder','verbose','Resolving\x20path\x20\x27','Resolved\x20folder\x20ID:\x20','resolveFolderId','Resolving\x20folder\x20\x27','Segment\x20ID\x20missing\x20from\x20resolved\x20path','5966048QSHvyL','Error:\x20Segment\x20path\x20or\x20name\x20is\x20required','INTERNAL','\x20\x20tdx\x20segment\x20update\x20\x22High\x20Value\x22\x20--rule\x20\x27...\x27\x20\x20#\x20Relative\x20to\x20context','segmentName','includes','✔\x20Updated\x20segment\x20\x27','kind','\x27...','2224758akkpBn','Resolved\x20relative\x20path\x20to:\x20','11031021OcrYwN','description','14iBbDrv','type','656pEtBAi','ruleFile','segmentId','23515daKsSF','\x20\x20tdx\x20segment\x20update\x20\x22My\x20Audience/High\x20Value\x22\x20--description\x20\x22...\x22','487912CzCARl','error','.\x20Only\x20child\x20segments\x20can\x20be\x20updated.','Error:\x20Cannot\x20update\x20','388754UyGyCJ'];a27_0xef06=function(){return _0x578ac0;};return a27_0xef06();}
@@ -1 +1 @@
1
- const a28_0x2f0775=a28_0x384f;function a28_0x384f(_0x685bd0,_0x103ba7){const _0x164b23=a28_0x164b();return a28_0x384f=function(_0x384f63,_0x4ff288){_0x384f63=_0x384f63-0x1ed;let _0x235a49=_0x164b23[_0x384f63];return _0x235a49;},a28_0x384f(_0x685bd0,_0x103ba7);}(function(_0xa65ca8,_0x51bb63){const _0x245d5c=a28_0x384f,_0x402947=_0xa65ca8();while(!![]){try{const _0x1f8a8c=parseInt(_0x245d5c(0x204))/0x1+-parseInt(_0x245d5c(0x202))/0x2+parseInt(_0x245d5c(0x1f9))/0x3*(parseInt(_0x245d5c(0x21d))/0x4)+-parseInt(_0x245d5c(0x21c))/0x5*(-parseInt(_0x245d5c(0x20f))/0x6)+parseInt(_0x245d5c(0x1f3))/0x7*(parseInt(_0x245d5c(0x214))/0x8)+parseInt(_0x245d5c(0x21f))/0x9*(parseInt(_0x245d5c(0x1f5))/0xa)+-parseInt(_0x245d5c(0x21a))/0xb;if(_0x1f8a8c===_0x51bb63)break;else _0x402947['push'](_0x402947['shift']());}catch(_0xc06f26){_0x402947['push'](_0x402947['shift']());}}}(a28_0x164b,0x51a5f));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_0x2f0775(0x208);[a28_0x2f0775(0x1fe)]=a28_0x2f0775(0x213);async[a28_0x2f0775(0x212)](_0xed9f2b){const _0x2fc927=a28_0x2f0775,{options:_0x4f8fc5,args:_0x358652,tdx:_0x138f58}=_0xed9f2b;if(_0x358652[_0x2fc927(0x1ed)]===0x0)return console[_0x2fc927(0x206)]('Error:\x20Path\x20is\x20required'),console[_0x2fc927(0x206)](_0x2fc927(0x215)),console[_0x2fc927(0x206)]('Examples:'),console[_0x2fc927(0x206)]('\x20\x20tdx\x20segment\x20use\x20\x22My\x20Audience\x22'),console[_0x2fc927(0x206)]('\x20\x20tdx\x20segment\x20use\x20\x22My\x20Audience/Marketing\x22'),console['error'](_0x2fc927(0x1ef)),console[_0x2fc927(0x206)](_0x2fc927(0x20a)),0x1;const _0x9e487=_0x358652[0x0],_0x1097fc=_0x4f8fc5[_0x2fc927(0x211)];try{if(_0x9e487==='/')return saveSessionContext({'segment_path':undefined},_0x1097fc),console[_0x2fc927(0x21b)](_0x2fc927(0x209)),0x0;const _0x4c31e8=_0x4f8fc5['segmentPath'];let _0x32c0eb=_0x9e487;const _0x23693d=parsePath(_0x9e487);if(!_0x23693d[_0x2fc927(0x220)]){if(!_0x4c31e8)return console['error'](_0x2fc927(0x1f6)),console[_0x2fc927(0x206)](_0x2fc927(0x1f1)),0x1;if(_0x9e487==='..'){const _0x98a45c=_0x4c31e8[_0x2fc927(0x217)]('/')['slice'](0x0,-0x1)[_0x2fc927(0x1f4)]('/');_0x32c0eb=_0x98a45c||'/';}else _0x9e487==='.'?_0x32c0eb=_0x4c31e8:_0x32c0eb=_0x4c31e8+'/'+_0x9e487;_0x4f8fc5[_0x2fc927(0x1fb)]&&console['error'](_0x2fc927(0x1f8)+_0x32c0eb);}if(_0x32c0eb==='/'||_0x32c0eb==='')return saveSessionContext({'segment_path':undefined},_0x1097fc),console[_0x2fc927(0x21b)](_0x2fc927(0x209)),0x0;_0x32c0eb=normalizePath(_0x32c0eb);const _0x5c4889=parsePath(_0x32c0eb)[_0x2fc927(0x1fc)];if(_0x5c4889['length']===0x0)return saveSessionContext({'segment_path':undefined},_0x1097fc),console[_0x2fc927(0x21b)](_0x2fc927(0x209)),0x0;_0x4f8fc5['verbose']&&(console[_0x2fc927(0x206)](_0x2fc927(0x218)+_0x4f8fc5[_0x2fc927(0x1fd)]),console['error'](_0x2fc927(0x205)+_0x32c0eb));const _0x36c56e=await withSpinner(_0x2fc927(0x207)+_0x32c0eb+_0x2fc927(0x1ee),()=>_0x138f58[_0x2fc927(0x1f2)][_0x2fc927(0x1f7)](_0x32c0eb),{'verbose':_0x4f8fc5[_0x2fc927(0x1fb)]}),_0x2fb638=_0x36c56e[_0x2fc927(0x216)];_0x4f8fc5['verbose']&&(console[_0x2fc927(0x206)](_0x2fc927(0x200)+_0x2fb638[_0x2fc927(0x201)]),console['error'](_0x2fc927(0x20c)+_0x2fb638['parentId']),_0x2fb638[_0x2fc927(0x21e)]&&console[_0x2fc927(0x206)](_0x2fc927(0x219)+_0x2fb638[_0x2fc927(0x21e)]));if(_0x2fb638['type']===_0x2fc927(0x1f2))return console[_0x2fc927(0x206)](_0x2fc927(0x1f0)),console['error'](_0x2fc927(0x210)),console[_0x2fc927(0x206)](_0x2fc927(0x1fa)+_0x2fb638[_0x2fc927(0x20d)]+(_0x2fb638[_0x2fc927(0x203)]?'/'+_0x2fb638[_0x2fc927(0x203)][_0x2fc927(0x1f4)]('/'):'')),0x1;return saveSessionContext({'segment_path':_0x2fb638['fullPath'],'parent_segment':_0x2fb638['parentName']},_0x1097fc),console['log']('Context\x20set\x20to:\x20'+_0x2fb638[_0x2fc927(0x20e)]),_0x4f8fc5[_0x2fc927(0x1fb)]&&(console[_0x2fc927(0x206)](_0x2fc927(0x20b)),console[_0x2fc927(0x206)](_0x2fc927(0x1ff)),console[_0x2fc927(0x206)]('Use\x20\x22tdx\x20context\x22\x20to\x20see\x20all\x20context\x20parameters')),0x0;}catch(_0x1ee2dd){throw _0x1ee2dd;}}}function a28_0x164b(){const _0x58551e=['Parent\x20ID:\x20','parentName','fullPath','1222818BobjrF','Context\x20can\x20only\x20be\x20set\x20to\x20a\x20parent\x20segment\x20or\x20folder.','session','execute','Set\x20current\x20segment/folder\x20context\x20for\x20navigation','16KGkAQG','Usage:\x20tdx\x20segment\x20use\x20<path>','data','split','Site:\x20','Folder\x20ID:\x20','17866893LivnAx','log','5vZJebj','188616xDNHgM','folderId','1156698EaSizP','isAbsolute','length','\x27...','\x20\x20tdx\x20segment\x20use\x20/\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Clear\x20context','Error:\x20Cannot\x20set\x20context\x20to\x20a\x20segment.','Use\x20an\x20absolute\x20path\x20or\x20set\x20context\x20with:\x20tdx\x20segment\x20use\x20<parent_name>','segment','930286BmgZmC','join','40wnJENQ','Error:\x20No\x20context\x20set.\x20Cannot\x20use\x20relative\x20path.','resolvePathToResource','Resolved\x20relative\x20path\x20to:\x20','42MqMIRD','Use:\x20tdx\x20segment\x20use\x20','verbose','segments','site','description','Use\x20\x22tdx\x20segment\x20pwd\x22\x20to\x20show\x20current\x20context','Resolved\x20path\x20type:\x20','type','368620fgYpiS','folderPath','499161CzQNyu','Target\x20path:\x20','error','Resolving\x20path\x20\x27','segment:use','Context\x20cleared.\x20Back\x20to\x20root.','\x20\x20tdx\x20segment\x20use\x20..\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Go\x20to\x20parent','Use\x20\x22tdx\x20segments\x22\x20to\x20list\x20contents\x20in\x20this\x20context'];a28_0x164b=function(){return _0x58551e;};return a28_0x164b();}
1
+ const a28_0x4d9f16=a28_0x37e1;function a28_0x37e1(_0x7c8dbf,_0xeb48fc){const _0x2fe9e3=a28_0x2fe9();return a28_0x37e1=function(_0x37e1cd,_0x3f067a){_0x37e1cd=_0x37e1cd-0x15f;let _0x896ae1=_0x2fe9e3[_0x37e1cd];return _0x896ae1;},a28_0x37e1(_0x7c8dbf,_0xeb48fc);}(function(_0x57ad55,_0x193d35){const _0x1f38f6=a28_0x37e1,_0x291c45=_0x57ad55();while(!![]){try{const _0x882518=parseInt(_0x1f38f6(0x160))/0x1*(-parseInt(_0x1f38f6(0x17c))/0x2)+parseInt(_0x1f38f6(0x17a))/0x3+parseInt(_0x1f38f6(0x17b))/0x4*(parseInt(_0x1f38f6(0x180))/0x5)+parseInt(_0x1f38f6(0x16b))/0x6*(-parseInt(_0x1f38f6(0x161))/0x7)+-parseInt(_0x1f38f6(0x169))/0x8+-parseInt(_0x1f38f6(0x18a))/0x9*(parseInt(_0x1f38f6(0x171))/0xa)+parseInt(_0x1f38f6(0x189))/0xb;if(_0x882518===_0x193d35)break;else _0x291c45['push'](_0x291c45['shift']());}catch(_0x2d1063){_0x291c45['push'](_0x291c45['shift']());}}}(a28_0x2fe9,0x2652c));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_0x4d9f16(0x18d);[a28_0x4d9f16(0x167)]=a28_0x4d9f16(0x17d);async[a28_0x4d9f16(0x183)](_0xebed9b){const _0x2cce9f=a28_0x4d9f16,{options:_0x25d644,args:_0x233e23,tdx:_0x1de6be}=_0xebed9b;if(_0x233e23[_0x2cce9f(0x175)]===0x0)return console[_0x2cce9f(0x16a)](_0x2cce9f(0x16c)),console[_0x2cce9f(0x16a)](_0x2cce9f(0x162)),console[_0x2cce9f(0x16a)](_0x2cce9f(0x16e)),console[_0x2cce9f(0x16a)](_0x2cce9f(0x18f)),console[_0x2cce9f(0x16a)]('\x20\x20tdx\x20segment\x20use\x20\x22My\x20Audience/Marketing\x22'),console['error'](_0x2cce9f(0x192)),console['error'](_0x2cce9f(0x178)),0x1;const _0x27372b=_0x233e23[0x0],_0x1720ad=_0x25d644['session'];try{if(_0x27372b==='/')return saveSessionContext({'segment_path':undefined},_0x1720ad),console[_0x2cce9f(0x18c)]('Context\x20cleared.\x20Back\x20to\x20root.'),0x0;const _0x52c470=_0x25d644[_0x2cce9f(0x181)];let _0x23431b=_0x27372b;const _0x26ddd6=parsePath(_0x27372b);if(!_0x26ddd6[_0x2cce9f(0x173)]){if(!_0x52c470)return console[_0x2cce9f(0x16a)](_0x2cce9f(0x172)),console[_0x2cce9f(0x16a)](_0x2cce9f(0x174)),0x1;if(_0x27372b==='..'){const _0x35fae8=_0x52c470[_0x2cce9f(0x170)]('/')[_0x2cce9f(0x190)](0x0,-0x1)[_0x2cce9f(0x179)]('/');_0x23431b=_0x35fae8||'/';}else _0x27372b==='.'?_0x23431b=_0x52c470:_0x23431b=_0x52c470+'/'+_0x27372b;_0x25d644[_0x2cce9f(0x166)]&&console['error'](_0x2cce9f(0x191)+_0x23431b);}if(_0x23431b==='/'||_0x23431b==='')return saveSessionContext({'segment_path':undefined},_0x1720ad),console[_0x2cce9f(0x18c)]('Context\x20cleared.\x20Back\x20to\x20root.'),0x0;_0x23431b=normalizePath(_0x23431b);const _0x2723cb=parsePath(_0x23431b)[_0x2cce9f(0x188)];if(_0x2723cb[_0x2cce9f(0x175)]===0x0)return saveSessionContext({'segment_path':undefined},_0x1720ad),console[_0x2cce9f(0x18c)]('Context\x20cleared.\x20Back\x20to\x20root.'),0x0;_0x25d644['verbose']&&(console[_0x2cce9f(0x16a)]('Site:\x20'+_0x25d644['site']),console['error']('Target\x20path:\x20'+_0x23431b));const _0x109f1e=await withSpinner(_0x2cce9f(0x185)+_0x23431b+_0x2cce9f(0x184),()=>_0x1de6be[_0x2cce9f(0x17f)][_0x2cce9f(0x16d)](_0x23431b),{'verbose':_0x25d644['verbose']}),_0x262cf9=_0x109f1e[_0x2cce9f(0x182)];_0x25d644['verbose']&&(console['error'](_0x2cce9f(0x18b)+_0x262cf9[_0x2cce9f(0x17e)]),console[_0x2cce9f(0x16a)](_0x2cce9f(0x176)+_0x262cf9['parentId']),_0x262cf9[_0x2cce9f(0x186)]&&console[_0x2cce9f(0x16a)](_0x2cce9f(0x177)+_0x262cf9['folderId']));if(_0x262cf9[_0x2cce9f(0x17e)]==='segment')return console[_0x2cce9f(0x16a)](_0x2cce9f(0x164)),console[_0x2cce9f(0x16a)](_0x2cce9f(0x18e)),console[_0x2cce9f(0x16a)]('Use:\x20tdx\x20segment\x20use\x20'+_0x262cf9['parentName']+(_0x262cf9[_0x2cce9f(0x16f)]?'/'+_0x262cf9[_0x2cce9f(0x16f)]['join']('/'):'')),0x1;return saveSessionContext({'segment_path':_0x262cf9['fullPath'],'parent_segment':_0x262cf9[_0x2cce9f(0x168)]},_0x1720ad),console['log'](_0x2cce9f(0x187)+_0x262cf9[_0x2cce9f(0x15f)]),_0x25d644['verbose']&&(console['error'](_0x2cce9f(0x163)),console[_0x2cce9f(0x16a)](_0x2cce9f(0x165)),console['error'](_0x2cce9f(0x193))),0x0;}catch(_0xcdc2b9){throw _0xcdc2b9;}}}function a28_0x2fe9(){const _0x277013=['type','segment','105FBLUMr','segmentPath','data','execute','\x27...','Resolving\x20path\x20\x27','folderId','Context\x20set\x20to:\x20','segments','5544143YBPAtF','130581aORrKX','Resolved\x20path\x20type:\x20','log','segment:use','Context\x20can\x20only\x20be\x20set\x20to\x20a\x20parent\x20segment\x20or\x20folder.','\x20\x20tdx\x20segment\x20use\x20\x22My\x20Audience\x22','slice','Resolved\x20relative\x20path\x20to:\x20','\x20\x20tdx\x20segment\x20use\x20/\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Clear\x20context','Use\x20\x22tdx\x20context\x22\x20to\x20see\x20all\x20context\x20parameters','fullPath','139KgfEXz','13069CaFrkv','Usage:\x20tdx\x20segment\x20use\x20<path>','Use\x20\x22tdx\x20segments\x22\x20to\x20list\x20contents\x20in\x20this\x20context','Error:\x20Cannot\x20set\x20context\x20to\x20a\x20segment.','Use\x20\x22tdx\x20segment\x20pwd\x22\x20to\x20show\x20current\x20context','verbose','description','parentName','781904YcCtqL','error','774dqGTzY','Error:\x20Path\x20is\x20required','resolvePathToResource','Examples:','folderPath','split','140mXcoxp','Error:\x20No\x20context\x20set.\x20Cannot\x20use\x20relative\x20path.','isAbsolute','Use\x20an\x20absolute\x20path\x20or\x20set\x20context\x20with:\x20tdx\x20segment\x20use\x20<parent_name>','length','Parent\x20ID:\x20','Folder\x20ID:\x20','\x20\x20tdx\x20segment\x20use\x20..\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Go\x20to\x20parent','join','254322oNyOlP','54636RbdbFc','2546qRvESL','Set\x20current\x20segment/folder\x20context\x20for\x20navigation'];a28_0x2fe9=function(){return _0x277013;};return a28_0x2fe9();}
@@ -1 +1 @@
1
- const a29_0x14450f=a29_0xa94b;(function(_0x339c30,_0x254bdb){const _0x20d466=a29_0xa94b,_0x46cdfe=_0x339c30();while(!![]){try{const _0x2e978e=-parseInt(_0x20d466(0xeb))/0x1*(-parseInt(_0x20d466(0xd1))/0x2)+parseInt(_0x20d466(0xbd))/0x3*(-parseInt(_0x20d466(0xc6))/0x4)+-parseInt(_0x20d466(0xec))/0x5+parseInt(_0x20d466(0xe2))/0x6*(-parseInt(_0x20d466(0xfe))/0x7)+-parseInt(_0x20d466(0xf1))/0x8+-parseInt(_0x20d466(0xd6))/0x9*(-parseInt(_0x20d466(0xff))/0xa)+parseInt(_0x20d466(0xc4))/0xb;if(_0x2e978e===_0x254bdb)break;else _0x46cdfe['push'](_0x46cdfe['shift']());}catch(_0x4c081a){_0x46cdfe['push'](_0x46cdfe['shift']());}}}(a29_0x1269,0xdfbb7));import{BaseCommand}from'./command.js';function a29_0xa94b(_0x2f3dcb,_0x410338){const _0x12691b=a29_0x1269();return a29_0xa94b=function(_0xa94b07,_0x248a6b){_0xa94b07=_0xa94b07-0xbc;let _0x141417=_0x12691b[_0xa94b07];return _0x141417;},a29_0xa94b(_0x2f3dcb,_0x410338);}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_0x284e1c from'chalk';export class SegmentsCommand extends BaseCommand{[a29_0x14450f(0xd9)]=a29_0x14450f(0xfa);[a29_0x14450f(0xee)]=a29_0x14450f(0xc9);async[a29_0x14450f(0xd2)](_0x752269){const _0x374b32=a29_0x14450f,{options:_0x151ce4,args:_0x4c6ab3}=_0x752269,_0x40dd93=_0x151ce4[_0x374b32(0xf9)],_0x4f374d=_0x4c6ab3[0x0];try{const _0x3da6c7=_0x151ce4[_0x374b32(0xe9)];_0x151ce4[_0x374b32(0xf5)]&&(console[_0x374b32(0xd8)]('Site:\x20'+_0x151ce4['site']),console[_0x374b32(0xd8)](_0x374b32(0xdf)+(_0x3da6c7||'/')),_0x4f374d&&console[_0x374b32(0xd8)]('Path/pattern\x20arg:\x20'+_0x4f374d),_0x40dd93&&console['error'](_0x374b32(0xe1)));if(_0x4f374d){const _0x25750c=_0x4f374d[_0x374b32(0xe6)]('*')||_0x4f374d[_0x374b32(0xe6)]('?');if(_0x25750c&&!_0x3da6c7)return await this[_0x374b32(0xea)](_0x752269,_0x4f374d);else return _0x25750c?(console[_0x374b32(0xd8)](_0x374b32(0xcb)),console[_0x374b32(0xd8)](_0x374b32(0xef)),0x1):_0x40dd93?await this[_0x374b32(0xd5)](_0x752269,_0x4f374d):await this[_0x374b32(0xfb)](_0x752269,_0x4f374d);}if(!_0x3da6c7)return await this['listParents'](_0x752269);return _0x40dd93?await this[_0x374b32(0xd5)](_0x752269,_0x3da6c7):await this['listUnified'](_0x752269,_0x3da6c7);}catch(_0x2fd2b2){if(_0x2fd2b2 instanceof SDKError)return console[_0x374b32(0xd8)](_0x374b32(0xd3)+_0x2fd2b2[_0x374b32(0xe4)]),_0x2fd2b2[_0x374b32(0xd4)]&&console[_0x374b32(0xd8)]('\x20\x20Cause:\x20'+_0x2fd2b2[_0x374b32(0xd4)]),0x1;throw _0x2fd2b2;}}async[a29_0x14450f(0xea)](_0x4d7903,_0x1ac252){const _0x5408f2=a29_0x14450f,{options:_0x28e28c,tdx:_0x655976}=_0x4d7903,_0x448f8d=await withSpinner('Listing\x20parent\x20segments\x20matching\x20\x27'+_0x1ac252+_0x5408f2(0xf0),()=>_0x655976[_0x5408f2(0xe8)][_0x5408f2(0xcc)](),{'verbose':_0x28e28c['verbose']}),_0xa8219d=_0x448f8d[_0x5408f2(0xbc)],_0x378bca=_0x1ac252[_0x5408f2(0xbf)](/[.+^${}()|[\]\\]/g,_0x5408f2(0xc3))[_0x5408f2(0xbf)](/\*/g,'.*')[_0x5408f2(0xbf)](/\?/g,'.'),_0x42487b=new RegExp('^'+_0x378bca+'$','i'),_0x10cc19=_0xa8219d['filter'](_0x2df549=>_0x42487b[_0x5408f2(0xed)](_0x2df549[_0x5408f2(0xc0)][_0x5408f2(0xd9)]));console[_0x5408f2(0xd8)]('✔\x20Found\x20'+_0x10cc19['length']+_0x5408f2(0xda)+(_0x10cc19[_0x5408f2(0xce)]!==0x1?'s':'')+'\x20matching\x20\x27'+_0x1ac252+'\x27');if(_0x28e28c[_0x5408f2(0xf8)]===_0x5408f2(0xdd)||_0x28e28c[_0x5408f2(0xf8)]===_0x5408f2(0xbe))await handleSDKOutput(_0x10cc19,_0x28e28c);else{if(_0x10cc19['length']===0x0)console['log'](_0x5408f2(0xc2)+_0x1ac252);else{console[_0x5408f2(0xf2)](_0x5408f2(0xde));for(const _0x415dbf of _0x10cc19){const _0xf308aa=_0x415dbf['attributes']['population']?a29_0x284e1c[_0x5408f2(0xd7)]('\x20('+formatRows(_0x415dbf[_0x5408f2(0xc0)][_0x5408f2(0xf6)])+')'):'';console[_0x5408f2(0xf2)](_0x5408f2(0xdc)+_0x415dbf[_0x5408f2(0xc0)]['name']+_0xf308aa);}}}return 0x0;}async[a29_0x14450f(0xcc)](_0x52ef2e){const _0x5a03af=a29_0x14450f,{options:_0x501bc6,tdx:_0x120251}=_0x52ef2e,_0x366655=await withSpinner(_0x5a03af(0xe3),()=>_0x120251[_0x5a03af(0xe8)][_0x5a03af(0xcc)](),{'verbose':_0x501bc6[_0x5a03af(0xf5)]}),_0x6027b2=_0x366655[_0x5a03af(0xbc)];console[_0x5a03af(0xd8)](_0x5a03af(0xc7)+_0x6027b2[_0x5a03af(0xce)]+_0x5a03af(0xda)+(_0x6027b2[_0x5a03af(0xce)]!==0x1?'s':''));if(_0x501bc6[_0x5a03af(0xf8)]===_0x5a03af(0xdd)||_0x501bc6[_0x5a03af(0xf8)]===_0x5a03af(0xbe))await handleSDKOutput(_0x6027b2,_0x501bc6);else{console['log'](_0x5a03af(0xde));for(const _0x41c34e of _0x6027b2){const _0x394d25=_0x41c34e[_0x5a03af(0xc0)][_0x5a03af(0xf6)]?a29_0x284e1c[_0x5a03af(0xd7)]('\x20('+formatRows(_0x41c34e[_0x5a03af(0xc0)][_0x5a03af(0xf6)])+')'):'';console[_0x5a03af(0xf2)](_0x5a03af(0xdc)+_0x41c34e[_0x5a03af(0xc0)][_0x5a03af(0xd9)]+_0x394d25);}}return 0x0;}async[a29_0x14450f(0xfb)](_0x31f1e3,_0x3d5737){const _0x47cad7=a29_0x14450f,{options:_0x11c502,tdx:_0x4a40ec}=_0x31f1e3,_0x4fb899=await withSpinner(_0x47cad7(0xcd)+_0x3d5737+_0x47cad7(0xf0),()=>_0x4a40ec[_0x47cad7(0xe8)][_0x47cad7(0xcf)](_0x3d5737),{'verbose':_0x11c502['verbose']}),_0x36ffb4=_0x4fb899[_0x47cad7(0xbc)];_0x11c502[_0x47cad7(0xf5)]&&(console[_0x47cad7(0xd8)](_0x47cad7(0xfc)+_0x36ffb4[_0x47cad7(0xf3)]),_0x36ffb4[_0x47cad7(0xe5)]&&console[_0x47cad7(0xd8)](_0x47cad7(0xc5)+_0x36ffb4['folderId']));const _0x2e79f7=await withSpinner(_0x47cad7(0x101),()=>_0x4a40ec[_0x47cad7(0xe8)][_0x47cad7(0xfb)](_0x36ffb4['parentId'],_0x36ffb4[_0x47cad7(0xe5)]),{'verbose':_0x11c502[_0x47cad7(0xf5)]}),{folders:_0x35d7b7,segments:_0xedd0a0}=_0x2e79f7['data'],_0x3fb26b=_0x35d7b7['length']+_0xedd0a0[_0x47cad7(0xce)];console['error'](_0x47cad7(0xc7)+_0x35d7b7[_0x47cad7(0xce)]+_0x47cad7(0xe7)+(_0x35d7b7[_0x47cad7(0xce)]!==0x1?'s':'')+_0x47cad7(0xe0)+_0xedd0a0['length']+_0x47cad7(0xdb)+(_0xedd0a0[_0x47cad7(0xce)]!==0x1?'s':''));if(_0x11c502[_0x47cad7(0xf8)]==='json'||_0x11c502[_0x47cad7(0xf8)]===_0x47cad7(0xbe)){const _0x67c079=[..._0x35d7b7[_0x47cad7(0xc8)](_0x1dcf9c=>({..._0x1dcf9c,'type':_0x47cad7(0xfd)})),..._0xedd0a0[_0x47cad7(0xc8)](_0x41f3e7=>({..._0x41f3e7,'type':_0x47cad7(0xe8)}))]['sort']((_0x41bcaf,_0x27b8f3)=>_0x41bcaf[_0x47cad7(0xd9)][_0x47cad7(0xca)](_0x27b8f3['name']));await handleSDKOutput(_0x67c079,_0x11c502);}else{if(_0x3fb26b===0x0)console['log'](a29_0x284e1c[_0x47cad7(0xd7)]('[/'+_0x3d5737+']')),console[_0x47cad7(0xf2)](_0x47cad7(0xc1));else{console['log'](a29_0x284e1c[_0x47cad7(0xd7)]('[/'+_0x3d5737+']'));const _0x31e738=formatFlatList(_0x35d7b7,_0xedd0a0,{'showMetadata':!![]});console['log'](_0x31e738);}}return 0x0;}async['listRecursive'](_0x455718,_0x1ee32b){const _0x328e2b=a29_0x14450f,{options:_0x5df640,tdx:_0x210a50}=_0x455718,_0x29c99b=await withSpinner('Resolving\x20context\x20path\x20\x27'+_0x1ee32b+'\x27...',()=>_0x210a50[_0x328e2b(0xe8)][_0x328e2b(0xcf)](_0x1ee32b),{'verbose':_0x5df640[_0x328e2b(0xf5)]}),_0x3fe0ba=_0x29c99b[_0x328e2b(0xbc)];_0x5df640[_0x328e2b(0xf5)]&&(console[_0x328e2b(0xd8)](_0x328e2b(0xfc)+_0x3fe0ba['parentId']),_0x3fe0ba['folderId']&&console[_0x328e2b(0xd8)](_0x328e2b(0xc5)+_0x3fe0ba[_0x328e2b(0xe5)]));const _0x33d1f8=_0x5df640[_0x328e2b(0xf7)]||0xa,_0x4faa12=await withSpinner(_0x328e2b(0xf4),()=>_0x210a50[_0x328e2b(0xe8)][_0x328e2b(0xd5)](_0x3fe0ba[_0x328e2b(0xf3)],_0x3fe0ba['folderId'],0x0,_0x33d1f8),{'verbose':_0x5df640[_0x328e2b(0xf5)]}),_0x1df6dd=_0x4faa12[_0x328e2b(0xbc)];console[_0x328e2b(0xd8)](_0x328e2b(0x100)+_0x1df6dd[_0x328e2b(0xce)]+_0x328e2b(0xd0));if(_0x5df640['format']===_0x328e2b(0xdd)||_0x5df640[_0x328e2b(0xf8)]===_0x328e2b(0xbe))await handleSDKOutput(_0x1df6dd,_0x5df640);else{console['log'](a29_0x284e1c['dim']('[/'+_0x1ee32b+']'));const _0x557b85=formatTree(_0x1df6dd,{'showMetadata':!![]});console[_0x328e2b(0xf2)](_0x557b85);}return 0x0;}}function a29_0x1269(){const _0x10790e=['576580CiGHUy','✔\x20Built\x20tree\x20with\x20','Listing\x20folders\x20and\x20segments...','data','1496643zcVdaq','jsonl','replace','attributes','(empty)','No\x20parent\x20segments\x20match\x20pattern:\x20','\x5c$&','26014197EkHuvd','Folder\x20ID:\x20','4hwOctb','✔\x20Found\x20','map','List\x20parent\x20segments,\x20folders,\x20and\x20child\x20segments','localeCompare','Error:\x20Pattern\x20matching\x20is\x20only\x20supported\x20at\x20root\x20level\x20(no\x20context\x20set).','listParents','Resolving\x20context\x20path\x20\x27','length','resolvePathToResource','\x20top-level\x20items','34uIgQcL','execute','Error:\x20','cause','listRecursive','279mIqZYC','dim','error','name','\x20parent\x20segment','\x20segment','👥\x20','json','[parent\x20segments]','Current\x20context:\x20','\x20and\x20','Recursive\x20mode:\x20enabled','1598244iDLuxp','Listing\x20parent\x20segments...','message','folderId','includes','\x20folder','segment','segmentPath','listParentsWithPattern','57764HQWazk','3115490rQDmpq','test','description','Clear\x20context\x20with:\x20tdx\x20segment\x20use\x20/','\x27...','14112456RKGKCI','log','parentId','Building\x20hierarchy\x20tree...','verbose','population','maxDepth','format','recursive','segments','listUnified','Parent\x20ID:\x20','folder','35xwQsbb'];a29_0x1269=function(){return _0x10790e;};return a29_0x1269();}
1
+ const a29_0xf84c78=a29_0x80df;(function(_0x5f22ce,_0x567c60){const _0x425bcc=a29_0x80df,_0x1bb071=_0x5f22ce();while(!![]){try{const _0x148448=-parseInt(_0x425bcc(0x165))/0x1*(parseInt(_0x425bcc(0x175))/0x2)+-parseInt(_0x425bcc(0x15c))/0x3+parseInt(_0x425bcc(0x171))/0x4*(parseInt(_0x425bcc(0x142))/0x5)+-parseInt(_0x425bcc(0x14b))/0x6*(parseInt(_0x425bcc(0x148))/0x7)+parseInt(_0x425bcc(0x178))/0x8+parseInt(_0x425bcc(0x153))/0x9+parseInt(_0x425bcc(0x149))/0xa;if(_0x148448===_0x567c60)break;else _0x1bb071['push'](_0x1bb071['shift']());}catch(_0x18b141){_0x1bb071['push'](_0x1bb071['shift']());}}}(a29_0x2907,0xf347d));function a29_0x80df(_0x4937e3,_0x7cbc5f){const _0x2907ca=a29_0x2907();return a29_0x80df=function(_0x80dfcd,_0x3baaaf){_0x80dfcd=_0x80dfcd-0x140;let _0x3f0f7e=_0x2907ca[_0x80dfcd];return _0x3f0f7e;},a29_0x80df(_0x4937e3,_0x7cbc5f);}import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleSDKOutput}from'../utils/command-output.js';import{withSpinner}from'../utils/spinner.js';import{formatFlatList,formatTree}from'../utils/tree-formatter.js';import{formatRows}from'../utils/formatters.js';function a29_0x2907(){const _0x25f8bc=['Folder\x20ID:\x20','log','Error:\x20Pattern\x20matching\x20is\x20only\x20supported\x20at\x20root\x20level\x20(no\x20context\x20set).','42pikVBK','13477020xqpmum','No\x20parent\x20segments\x20match\x20pattern:\x20','797058ZLErAj','error','map','\x20parent\x20segment','listUnified','\x20segment','cause','localeCompare','5730579fzXXRp','replace','description','recursive','Listing\x20parent\x20segments...','Recursive\x20mode:\x20enabled','(empty)','Clear\x20context\x20with:\x20tdx\x20segment\x20use\x20/','site','1915956gavIbJ','sort','resolvePathToResource','folder','folderId','Listing\x20folders\x20and\x20segments...','segment','parentId','Listing\x20parent\x20segments\x20matching\x20\x27','7177KbNYGU','Building\x20hierarchy\x20tree...','verbose','listParents','✔\x20Built\x20tree\x20with\x20','Parent\x20ID:\x20','message','\x20matching\x20\x27','✔\x20Found\x20','Path/pattern\x20arg:\x20','json','listRecursive','12ARfVaJ','Resolving\x20context\x20path\x20\x27','data','segmentPath','76ookmQT','test','dim','2537088NPxiZR','listParentsWithPattern','execute','length','\x27...','population','👥\x20','jsonl','attributes','Error:\x20','[parent\x20segments]','name','672240nkxlRR','includes','format'];a29_0x2907=function(){return _0x25f8bc;};return a29_0x2907();}import a29_0x31bb3b from'chalk';export class SegmentsCommand extends BaseCommand{[a29_0xf84c78(0x141)]='segments';[a29_0xf84c78(0x155)]='List\x20parent\x20segments,\x20folders,\x20and\x20child\x20segments';async[a29_0xf84c78(0x17a)](_0x35932b){const _0x298757=a29_0xf84c78,{options:_0x2e3d50,args:_0x516794}=_0x35932b,_0x4d7ac2=_0x2e3d50[_0x298757(0x156)],_0x22a0b2=_0x516794[0x0];try{const _0x3b6876=_0x2e3d50[_0x298757(0x174)];_0x2e3d50[_0x298757(0x167)]&&(console['error']('Site:\x20'+_0x2e3d50[_0x298757(0x15b)]),console[_0x298757(0x14c)]('Current\x20context:\x20'+(_0x3b6876||'/')),_0x22a0b2&&console[_0x298757(0x14c)](_0x298757(0x16e)+_0x22a0b2),_0x4d7ac2&&console[_0x298757(0x14c)](_0x298757(0x158)));if(_0x22a0b2){const _0x508ffb=_0x22a0b2[_0x298757(0x143)]('*')||_0x22a0b2[_0x298757(0x143)]('?');if(_0x508ffb&&!_0x3b6876)return await this[_0x298757(0x179)](_0x35932b,_0x22a0b2);else return _0x508ffb?(console['error'](_0x298757(0x147)),console[_0x298757(0x14c)](_0x298757(0x15a)),0x1):_0x4d7ac2?await this['listRecursive'](_0x35932b,_0x22a0b2):await this[_0x298757(0x14f)](_0x35932b,_0x22a0b2);}if(!_0x3b6876)return await this[_0x298757(0x168)](_0x35932b);return _0x4d7ac2?await this[_0x298757(0x170)](_0x35932b,_0x3b6876):await this['listUnified'](_0x35932b,_0x3b6876);}catch(_0x12d0a0){if(_0x12d0a0 instanceof SDKError)return console[_0x298757(0x14c)](_0x298757(0x181)+_0x12d0a0[_0x298757(0x16b)]),_0x12d0a0[_0x298757(0x151)]&&console['error']('\x20\x20Cause:\x20'+_0x12d0a0[_0x298757(0x151)]),0x1;throw _0x12d0a0;}}async[a29_0xf84c78(0x179)](_0x542cd3,_0x575c69){const _0x2cc558=a29_0xf84c78,{options:_0x1b73c7,tdx:_0x169208}=_0x542cd3,_0x4ae15b=await withSpinner(_0x2cc558(0x164)+_0x575c69+'\x27...',()=>_0x169208[_0x2cc558(0x162)][_0x2cc558(0x168)](),{'verbose':_0x1b73c7['verbose']}),_0x580af9=_0x4ae15b[_0x2cc558(0x173)],_0x58abcc=_0x575c69['replace'](/[.+^${}()|[\]\\]/g,'\x5c$&')['replace'](/\*/g,'.*')[_0x2cc558(0x154)](/\?/g,'.'),_0x5d7f7b=new RegExp('^'+_0x58abcc+'$','i'),_0x9d1c20=_0x580af9['filter'](_0x494d78=>_0x5d7f7b[_0x2cc558(0x176)](_0x494d78['attributes']['name']));console[_0x2cc558(0x14c)](_0x2cc558(0x16d)+_0x9d1c20[_0x2cc558(0x17b)]+_0x2cc558(0x14e)+(_0x9d1c20[_0x2cc558(0x17b)]!==0x1?'s':'')+_0x2cc558(0x16c)+_0x575c69+'\x27');if(_0x1b73c7[_0x2cc558(0x144)]==='json'||_0x1b73c7[_0x2cc558(0x144)]==='jsonl')await handleSDKOutput(_0x9d1c20,_0x1b73c7);else{if(_0x9d1c20[_0x2cc558(0x17b)]===0x0)console['log'](_0x2cc558(0x14a)+_0x575c69);else{console['log'](_0x2cc558(0x140));for(const _0x4bb183 of _0x9d1c20){const _0x4288e8=_0x4bb183['attributes'][_0x2cc558(0x17d)]?a29_0x31bb3b[_0x2cc558(0x177)]('\x20('+formatRows(_0x4bb183[_0x2cc558(0x180)]['population'])+')'):'';console[_0x2cc558(0x146)](_0x2cc558(0x17e)+_0x4bb183[_0x2cc558(0x180)][_0x2cc558(0x141)]+_0x4288e8);}}}return 0x0;}async[a29_0xf84c78(0x168)](_0x57a3b7){const _0x545582=a29_0xf84c78,{options:_0x4c5534,tdx:_0x16ae57}=_0x57a3b7,_0x8eaba5=await withSpinner(_0x545582(0x157),()=>_0x16ae57[_0x545582(0x162)][_0x545582(0x168)](),{'verbose':_0x4c5534[_0x545582(0x167)]}),_0x5093d3=_0x8eaba5[_0x545582(0x173)];console[_0x545582(0x14c)](_0x545582(0x16d)+_0x5093d3[_0x545582(0x17b)]+'\x20parent\x20segment'+(_0x5093d3[_0x545582(0x17b)]!==0x1?'s':''));if(_0x4c5534[_0x545582(0x144)]===_0x545582(0x16f)||_0x4c5534[_0x545582(0x144)]===_0x545582(0x17f))await handleSDKOutput(_0x5093d3,_0x4c5534);else{console[_0x545582(0x146)](_0x545582(0x140));for(const _0x3ce9a4 of _0x5093d3){const _0x550058=_0x3ce9a4[_0x545582(0x180)]['population']?a29_0x31bb3b[_0x545582(0x177)]('\x20('+formatRows(_0x3ce9a4['attributes'][_0x545582(0x17d)])+')'):'';console[_0x545582(0x146)](_0x545582(0x17e)+_0x3ce9a4[_0x545582(0x180)][_0x545582(0x141)]+_0x550058);}}return 0x0;}async[a29_0xf84c78(0x14f)](_0x655df9,_0x48a473){const _0x545d08=a29_0xf84c78,{options:_0x237186,tdx:_0x832194}=_0x655df9,_0x144a87=await withSpinner(_0x545d08(0x172)+_0x48a473+'\x27...',()=>_0x832194[_0x545d08(0x162)][_0x545d08(0x15e)](_0x48a473),{'verbose':_0x237186['verbose']}),_0x39cdd3=_0x144a87[_0x545d08(0x173)];_0x237186['verbose']&&(console[_0x545d08(0x14c)](_0x545d08(0x16a)+_0x39cdd3[_0x545d08(0x163)]),_0x39cdd3['folderId']&&console[_0x545d08(0x14c)](_0x545d08(0x145)+_0x39cdd3[_0x545d08(0x160)]));const _0x509565=await withSpinner(_0x545d08(0x161),()=>_0x832194['segment'][_0x545d08(0x14f)](_0x39cdd3[_0x545d08(0x163)],_0x39cdd3['folderId']),{'verbose':_0x237186[_0x545d08(0x167)]}),{folders:_0x58ec9c,segments:_0xd45f12}=_0x509565[_0x545d08(0x173)],_0x5c1c49=_0x58ec9c['length']+_0xd45f12[_0x545d08(0x17b)];console['error'](_0x545d08(0x16d)+_0x58ec9c[_0x545d08(0x17b)]+'\x20folder'+(_0x58ec9c[_0x545d08(0x17b)]!==0x1?'s':'')+'\x20and\x20'+_0xd45f12['length']+_0x545d08(0x150)+(_0xd45f12['length']!==0x1?'s':''));if(_0x237186['format']===_0x545d08(0x16f)||_0x237186[_0x545d08(0x144)]===_0x545d08(0x17f)){const _0x15d6fb=[..._0x58ec9c[_0x545d08(0x14d)](_0x34da7a=>({..._0x34da7a,'type':_0x545d08(0x15f)})),..._0xd45f12['map'](_0x4ac27d=>({..._0x4ac27d,'type':_0x545d08(0x162)}))][_0x545d08(0x15d)]((_0x3a4699,_0x37715f)=>_0x3a4699[_0x545d08(0x141)][_0x545d08(0x152)](_0x37715f[_0x545d08(0x141)]));await handleSDKOutput(_0x15d6fb,_0x237186);}else{if(_0x5c1c49===0x0)console[_0x545d08(0x146)](a29_0x31bb3b[_0x545d08(0x177)]('[/'+_0x48a473+']')),console[_0x545d08(0x146)](_0x545d08(0x159));else{console[_0x545d08(0x146)](a29_0x31bb3b[_0x545d08(0x177)]('[/'+_0x48a473+']'));const _0xeede00=formatFlatList(_0x58ec9c,_0xd45f12,{'showMetadata':!![]});console[_0x545d08(0x146)](_0xeede00);}}return 0x0;}async['listRecursive'](_0x5bb62e,_0x427637){const _0x40c732=a29_0xf84c78,{options:_0x4a5b33,tdx:_0x1ae9ad}=_0x5bb62e,_0x25e233=await withSpinner(_0x40c732(0x172)+_0x427637+_0x40c732(0x17c),()=>_0x1ae9ad[_0x40c732(0x162)]['resolvePathToResource'](_0x427637),{'verbose':_0x4a5b33[_0x40c732(0x167)]}),_0x251f67=_0x25e233['data'];_0x4a5b33[_0x40c732(0x167)]&&(console['error'](_0x40c732(0x16a)+_0x251f67[_0x40c732(0x163)]),_0x251f67[_0x40c732(0x160)]&&console[_0x40c732(0x14c)](_0x40c732(0x145)+_0x251f67['folderId']));const _0x3279c6=_0x4a5b33['maxDepth']||0xa,_0x59d7d9=await withSpinner(_0x40c732(0x166),()=>_0x1ae9ad[_0x40c732(0x162)][_0x40c732(0x170)](_0x251f67['parentId'],_0x251f67['folderId'],0x0,_0x3279c6),{'verbose':_0x4a5b33[_0x40c732(0x167)]}),_0x3faf71=_0x59d7d9[_0x40c732(0x173)];console[_0x40c732(0x14c)](_0x40c732(0x169)+_0x3faf71[_0x40c732(0x17b)]+'\x20top-level\x20items');if(_0x4a5b33[_0x40c732(0x144)]===_0x40c732(0x16f)||_0x4a5b33[_0x40c732(0x144)]===_0x40c732(0x17f))await handleSDKOutput(_0x3faf71,_0x4a5b33);else{console[_0x40c732(0x146)](a29_0x31bb3b[_0x40c732(0x177)]('[/'+_0x427637+']'));const _0x40d2f9=formatTree(_0x3faf71,{'showMetadata':!![]});console[_0x40c732(0x146)](_0x40d2f9);}return 0x0;}}
@@ -1 +1 @@
1
- const a30_0x385d93=a30_0x245d;(function(_0xffef0e,_0x1586ab){const _0x38ac02=a30_0x245d,_0x2fe582=_0xffef0e();while(!![]){try{const _0x3b9f64=-parseInt(_0x38ac02(0x16a))/0x1*(-parseInt(_0x38ac02(0x17c))/0x2)+-parseInt(_0x38ac02(0x166))/0x3+-parseInt(_0x38ac02(0x16d))/0x4+parseInt(_0x38ac02(0x181))/0x5+-parseInt(_0x38ac02(0x171))/0x6+parseInt(_0x38ac02(0x176))/0x7+-parseInt(_0x38ac02(0x17e))/0x8*(parseInt(_0x38ac02(0x169))/0x9);if(_0x3b9f64===_0x1586ab)break;else _0x2fe582['push'](_0x2fe582['shift']());}catch(_0x561fe4){_0x2fe582['push'](_0x2fe582['shift']());}}}(a30_0x5bda,0xc9338));import{BaseCommand}from'./command.js';function a30_0x245d(_0x1d4863,_0x1e3db0){const _0x5bda52=a30_0x5bda();return a30_0x245d=function(_0x245d6b,_0x413a19){_0x245d6b=_0x245d6b-0x15f;let _0x4910c7=_0x5bda52[_0x245d6b];return _0x4910c7;},a30_0x245d(_0x1d4863,_0x1e3db0);}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_0x385d93(0x170)]=a30_0x385d93(0x185);[a30_0x385d93(0x163)]='Show\x20table\x20contents';async[a30_0x385d93(0x183)](_0x1e6790){const _0x92bdcd=a30_0x385d93;return this[_0x92bdcd(0x17b)](_0x1e6790);}async[a30_0x385d93(0x17b)](_0x361dc6){const _0x330c7d=a30_0x385d93,{options:_0x33ff18,args:_0x3b2a66,tdx:_0x2e4e9b}=_0x361dc6;let _0x10a328;try{_0x10a328=parseTableReference(_0x3b2a66[0x0]);const _0x2c6520=_0x33ff18['database'];!_0x10a328[_0x330c7d(0x17d)]&&_0x2c6520&&(_0x10a328[_0x330c7d(0x17d)]=_0x2c6520);const _0x27d9e1=validateTableDescribeReference(_0x10a328);if(_0x27d9e1)return console[_0x330c7d(0x173)]('Error:\x20'+_0x27d9e1),console[_0x330c7d(0x173)](_0x330c7d(0x182)),console[_0x330c7d(0x173)](_0x330c7d(0x17a)),console[_0x330c7d(0x173)](_0x330c7d(0x167)),0x1;}catch(_0x1ab3ab){return console[_0x330c7d(0x173)](_0x330c7d(0x161)+_0x1ab3ab['message']),console[_0x330c7d(0x173)]('Usage:\x20tdx\x20show\x20<database.table>'),console['error'](_0x330c7d(0x17a)),console[_0x330c7d(0x173)](_0x330c7d(0x167)),0x1;}const _0x48995b=_0x10a328['catalog'],_0x11daf1=_0x10a328[_0x330c7d(0x17d)],_0x4f6523=_0x10a328[_0x330c7d(0x179)],_0x32d7e4=resolveLimit(_0x33ff18[_0x330c7d(0x178)],DEFAULT_DISPLAY_LIMIT);try{_0x33ff18['verbose']&&(console[_0x330c7d(0x173)](_0x330c7d(0x16c)+_0x33ff18[_0x330c7d(0x175)]),_0x48995b&&console[_0x330c7d(0x173)](_0x330c7d(0x16b)+_0x48995b),console[_0x330c7d(0x173)]('Database:\x20'+_0x11daf1),console[_0x330c7d(0x173)](_0x330c7d(0x162)+_0x4f6523),console['error']('Limit:\x20'+_0x32d7e4));const _0x3fa496=_0x48995b?_0x48995b+'.'+_0x11daf1+'.'+_0x4f6523:_0x11daf1+'.'+_0x4f6523,_0x300b3f=await withSpinner(_0x330c7d(0x15f)+_0x3fa496+_0x330c7d(0x164),()=>_0x2e4e9b['query'][_0x330c7d(0x17b)](_0x11daf1,_0x4f6523,_0x32d7e4,_0x48995b),{'verbose':_0x33ff18[_0x330c7d(0x174)]}),_0x17bd54=_0x300b3f['data'],_0x44d263=_0x17bd54[_0x330c7d(0x168)];return _0x44d263['length']===0x0?console[_0x330c7d(0x173)]('✔\x20Query\x20successful\x20-\x200\x20rows\x20returned'):console[_0x330c7d(0x173)]('✔\x20Retrieved\x20'+_0x44d263['length']+_0x330c7d(0x16f)+(_0x44d263['length']!==0x1?'s':'')+'\x20from\x20'+_0x3fa496),await handleSDKOutput(_0x44d263,_0x33ff18),0x0;}catch(_0x3de0d7){if(_0x3de0d7 instanceof SDKError)return console['error'](_0x330c7d(0x161)+_0x3de0d7[_0x330c7d(0x160)]),_0x3de0d7[_0x330c7d(0x165)]&&console[_0x330c7d(0x173)](_0x330c7d(0x184)+_0x3de0d7[_0x330c7d(0x165)]),0x1;throw _0x3de0d7;}}[a30_0x385d93(0x16e)](_0x1e2974){const _0x3402ab=a30_0x385d93;if(_0x1e2974[_0x3402ab(0x172)][_0x3402ab(0x180)]===0x0)return _0x3402ab(0x177);if(_0x1e2974[_0x3402ab(0x172)]['length']>0x1)return _0x3402ab(0x17f);return undefined;}}function a30_0x5bda(){const _0x28c86d=['cause','16770TSRWfA','\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--database\x20<database>','data','6192MXgMlx','1164tFSQqc','Catalog:\x20','Site:\x20','2405416eiMjCJ','validate','\x20row','name','2877846WvRTEW','args','error','verbose','site','9908045eggxHc','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','limit','table','\x20\x20\x20or:\x20tdx\x20show\x20<catalog.database.table>','showTable','1572ShopdQ','database','21552YxYFGi','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','7169190oymSDj','Usage:\x20tdx\x20show\x20<database.table>','execute','\x20\x20Cause:\x20','show','Querying\x20','message','Error:\x20','Table:\x20','description','...'];a30_0x5bda=function(){return _0x28c86d;};return a30_0x5bda();}
1
+ const a30_0x27b6a9=a30_0x1bbd;(function(_0x502da1,_0x1b1702){const _0x188db0=a30_0x1bbd,_0x31228b=_0x502da1();while(!![]){try{const _0x3ef125=-parseInt(_0x188db0(0xbc))/0x1+parseInt(_0x188db0(0xb6))/0x2*(-parseInt(_0x188db0(0xca))/0x3)+parseInt(_0x188db0(0xc2))/0x4+parseInt(_0x188db0(0xb1))/0x5+parseInt(_0x188db0(0xcf))/0x6*(-parseInt(_0x188db0(0xc6))/0x7)+parseInt(_0x188db0(0xb2))/0x8+-parseInt(_0x188db0(0xbb))/0x9*(-parseInt(_0x188db0(0xc7))/0xa);if(_0x3ef125===_0x1b1702)break;else _0x31228b['push'](_0x31228b['shift']());}catch(_0x43a616){_0x31228b['push'](_0x31228b['shift']());}}}(a30_0x96ea,0x65c32));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleSDKOutput}from'../utils/command-output.js';function a30_0x96ea(){const _0x1c6314=['✔\x20Query\x20successful\x20-\x200\x20rows\x20returned','33692lTQnJW','Site:\x20','site','execute','name','67950akNNNm','656366WnVSTF','table','\x20\x20Cause:\x20','Show\x20table\x20contents','error','args','2798792ENNynp','\x20\x20\x20or:\x20tdx\x20show\x20<catalog.database.table>','data','✔\x20Retrieved\x20','21CvgEJs','1440BxVpfD','message','cause','105hOdyEc','Usage:\x20tdx\x20show\x20<database.table>','\x20row','show','showTable','1604838ZYUMgA','Catalog:\x20','...','Too\x20many\x20arguments\x0aUsage:\x20tdx\x20show\x20<database.table>\x0a\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--database\x20<database>\x0a\x0aRun\x20\x27tdx\x20show\x20--help\x27\x20for\x20more\x20options','database','Error:\x20','length','1233580hciASi','3452792KquALt','\x20from\x20','Querying\x20'];a30_0x96ea=function(){return _0x1c6314;};return a30_0x96ea();}function a30_0x1bbd(_0x11d40d,_0x3796db){const _0x96ea17=a30_0x96ea();return a30_0x1bbd=function(_0x1bbd77,_0x26ff0b){_0x1bbd77=_0x1bbd77-0xab;let _0x53a665=_0x96ea17[_0x1bbd77];return _0x53a665;},a30_0x1bbd(_0x11d40d,_0x3796db);}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_0x27b6a9(0xba)]=a30_0x27b6a9(0xcd);['description']=a30_0x27b6a9(0xbf);async[a30_0x27b6a9(0xb9)](_0x48d375){return this['showTable'](_0x48d375);}async[a30_0x27b6a9(0xce)](_0x336e98){const _0x2ea7e2=a30_0x27b6a9,{options:_0x559687,args:_0x3cc433,tdx:_0x52a9db}=_0x336e98;let _0x862563;try{_0x862563=parseTableReference(_0x3cc433[0x0]);const _0x16fa75=_0x559687[_0x2ea7e2(0xae)];!_0x862563[_0x2ea7e2(0xae)]&&_0x16fa75&&(_0x862563[_0x2ea7e2(0xae)]=_0x16fa75);const _0x9e819b=validateTableDescribeReference(_0x862563);if(_0x9e819b)return console[_0x2ea7e2(0xc0)](_0x2ea7e2(0xaf)+_0x9e819b),console[_0x2ea7e2(0xc0)](_0x2ea7e2(0xcb)),console['error']('\x20\x20\x20or:\x20tdx\x20show\x20<catalog.database.table>'),console[_0x2ea7e2(0xc0)]('\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--database\x20<database>'),0x1;}catch(_0x4baa9b){return console[_0x2ea7e2(0xc0)]('Error:\x20'+_0x4baa9b[_0x2ea7e2(0xc8)]),console[_0x2ea7e2(0xc0)](_0x2ea7e2(0xcb)),console[_0x2ea7e2(0xc0)](_0x2ea7e2(0xc3)),console[_0x2ea7e2(0xc0)]('\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--database\x20<database>'),0x1;}const _0x2fb66d=_0x862563['catalog'],_0x96c9ed=_0x862563[_0x2ea7e2(0xae)],_0x42df2d=_0x862563[_0x2ea7e2(0xbd)],_0x473758=resolveLimit(_0x559687['limit'],DEFAULT_DISPLAY_LIMIT);try{_0x559687['verbose']&&(console[_0x2ea7e2(0xc0)](_0x2ea7e2(0xb7)+_0x559687[_0x2ea7e2(0xb8)]),_0x2fb66d&&console[_0x2ea7e2(0xc0)](_0x2ea7e2(0xab)+_0x2fb66d),console[_0x2ea7e2(0xc0)]('Database:\x20'+_0x96c9ed),console[_0x2ea7e2(0xc0)]('Table:\x20'+_0x42df2d),console[_0x2ea7e2(0xc0)]('Limit:\x20'+_0x473758));const _0x3d8619=_0x2fb66d?_0x2fb66d+'.'+_0x96c9ed+'.'+_0x42df2d:_0x96c9ed+'.'+_0x42df2d,_0xc6fca3=await withSpinner(_0x2ea7e2(0xb4)+_0x3d8619+_0x2ea7e2(0xac),()=>_0x52a9db['query'][_0x2ea7e2(0xce)](_0x96c9ed,_0x42df2d,_0x473758,_0x2fb66d),{'verbose':_0x559687['verbose']}),_0x2fbacd=_0xc6fca3[_0x2ea7e2(0xc4)],_0x3dfe09=_0x2fbacd[_0x2ea7e2(0xc4)];return _0x3dfe09[_0x2ea7e2(0xb0)]===0x0?console[_0x2ea7e2(0xc0)](_0x2ea7e2(0xb5)):console[_0x2ea7e2(0xc0)](_0x2ea7e2(0xc5)+_0x3dfe09['length']+_0x2ea7e2(0xcc)+(_0x3dfe09[_0x2ea7e2(0xb0)]!==0x1?'s':'')+_0x2ea7e2(0xb3)+_0x3d8619),await handleSDKOutput(_0x3dfe09,_0x559687),0x0;}catch(_0x21d4f4){if(_0x21d4f4 instanceof SDKError)return console[_0x2ea7e2(0xc0)](_0x2ea7e2(0xaf)+_0x21d4f4[_0x2ea7e2(0xc8)]),_0x21d4f4[_0x2ea7e2(0xc9)]&&console[_0x2ea7e2(0xc0)](_0x2ea7e2(0xbe)+_0x21d4f4[_0x2ea7e2(0xc9)]),0x1;throw _0x21d4f4;}}['validate'](_0x20a777){const _0x18f656=a30_0x27b6a9;if(_0x20a777['args']['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(_0x20a777[_0x18f656(0xc1)]['length']>0x1)return _0x18f656(0xad);return undefined;}}
@@ -1 +1 @@
1
- function a31_0x4a0b(_0x4c63f1,_0x41824e){const _0x3c80b8=a31_0x3c80();return a31_0x4a0b=function(_0x4a0bbf,_0x4d6ff3){_0x4a0bbf=_0x4a0bbf-0xe1;let _0x3dbc91=_0x3c80b8[_0x4a0bbf];return _0x3dbc91;},a31_0x4a0b(_0x4c63f1,_0x41824e);}function a31_0x3c80(){const _0x423d82=['\x20\x20tdx\x20tables\x20\x22mydb.*\x22\x20\x20\x20\x20\x20\x20\x20\x20->\x20all\x20tables\x20from\x20mydb','database','Error:\x20','\x27\x20may\x20not\x20exist\x20or\x20contains\x20no\x20tables','\x20\x20Or:\x20\x20tdx\x20tables\x20--database\x20','Error:\x20Too\x20many\x20arguments.\x20Use\x20single\x20argument:','43723485TtZBuS','.*\x22','message','includes','cause','table','site','✔\x20Found\x20','data','error','290269niIqiQ','Or\x20use\x20--in\x20flag:','3092784rRyZLM','length','3014762AqgPIf','1273818pSWmyx','Did\x20you\x20mean\x20to\x20list\x20all\x20tables\x20from\x20database\x20\x27','Table\x20pattern:\x20','verbose','\x20\x20tdx\x20tables\x20--in\x20mydb\x20\x20\x20\x20\x20\x20\x20->\x20all\x20tables\x20from\x20mydb','159415DYWPKF','limit','\x20\x20Or:\x20\x20tdx\x20tables\x20--in\x20','\x20table','\x20\x20Cause:\x20','376mNbTqu','query','Database\x20pattern:\x20','✖\x20No\x20tables\x20found','\x27\x20is\x20ambiguous.','Listing\x20tables...','4316868ChNpeR','\x20\x20tdx\x20tables\x20users\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20->\x20table\x20\x22users\x22\x20across\x20all\x20databases','136nUyTSM','\x27\x20across\x20all\x20databases.','\x20\x20tdx\x20tables\x20\x22mydb.users\x22\x20\x20\x20\x20->\x20table\x20\x22users\x22\x20in\x20database\x20mydb','\x20\x20Use:\x20tdx\x20tables\x20\x22','Site:\x20','Note:\x20\x27','Database:\x20','validate'];a31_0x3c80=function(){return _0x423d82;};return a31_0x3c80();}const a31_0x4154ed=a31_0x4a0b;(function(_0x977a33,_0x3bed68){const _0x29be07=a31_0x4a0b,_0x20c252=_0x977a33();while(!![]){try{const _0x44bea6=-parseInt(_0x29be07(0xe6))/0x1+-parseInt(_0x29be07(0xe5))/0x2+parseInt(_0x29be07(0xf6))/0x3+parseInt(_0x29be07(0xf8))/0x4*(-parseInt(_0x29be07(0xeb))/0x5)+parseInt(_0x29be07(0xe3))/0x6+parseInt(_0x29be07(0xe1))/0x7*(-parseInt(_0x29be07(0xf0))/0x8)+parseInt(_0x29be07(0x106))/0x9;if(_0x44bea6===_0x3bed68)break;else _0x20c252['push'](_0x20c252['shift']());}catch(_0x30d91d){_0x20c252['push'](_0x20c252['shift']());}}}(a31_0x3c80,0xf3c0f));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleSDKOutput}from'../utils/command-output.js';import{parseTableReference}from'../utils/table-ref-parser.js';import{DEFAULT_LISTING_LIMIT,resolveLimit}from'../utils/constants.js';import{withSpinner}from'../utils/spinner.js';export class TablesCommand extends BaseCommand{['name']='tables';['description']='List\x20tables\x20in\x20a\x20database';async['execute'](_0x54e5c4){const _0xa7f302=a31_0x4a0b,{options:_0x519b5a,args:_0x5db910,tdx:_0x1ac5c8}=_0x54e5c4;let _0x64e30b;if(_0x5db910[_0xa7f302(0xe4)]===0x0)_0x64e30b={'database':undefined,'table':undefined,'original':''};else{if(_0x5db910[_0xa7f302(0xe4)]===0x1)try{_0x64e30b=parseTableReference(_0x5db910[0x0]);if(_0x64e30b[_0xa7f302(0x10b)]&&!_0x64e30b[_0xa7f302(0x101)]&&!_0x64e30b[_0xa7f302(0x10b)][_0xa7f302(0x109)]('*')&&!_0x64e30b[_0xa7f302(0x10b)][_0xa7f302(0x109)]('?'))return console[_0xa7f302(0x10f)]('Error:\x20Pattern\x20\x27'+_0x5db910[0x0]+_0xa7f302(0xf4)),console['error'](_0xa7f302(0xe7)+_0x64e30b['table']+'\x27?'),console[_0xa7f302(0x10f)](_0xa7f302(0xfb)+_0x64e30b[_0xa7f302(0x10b)]+_0xa7f302(0x107)),console[_0xa7f302(0x10f)](_0xa7f302(0xed)+_0x64e30b[_0xa7f302(0x10b)]),console[_0xa7f302(0x10f)](_0xa7f302(0x104)+_0x64e30b['table']),console[_0xa7f302(0x10f)](''),console[_0xa7f302(0x10f)](_0xa7f302(0xfd)+_0x5db910[0x0]+'\x27\x20without\x20wildcards\x20would\x20search\x20for\x20tables\x20named\x20\x27'+_0x64e30b[_0xa7f302(0x10b)]+_0xa7f302(0xf9)),0x1;}catch(_0x3c5d0b){return console[_0xa7f302(0x10f)](_0xa7f302(0x102)+_0x3c5d0b[_0xa7f302(0x108)]),0x1;}else return console['error'](_0xa7f302(0x105)),console[_0xa7f302(0x10f)](_0xa7f302(0xf7)),console['error'](_0xa7f302(0x100)),console[_0xa7f302(0x10f)](_0xa7f302(0xfa)),console['error']('\x20\x20tdx\x20tables\x20\x22*.user*\x22\x20\x20\x20\x20\x20\x20\x20->\x20tables\x20matching\x20user*\x20across\x20databases'),console[_0xa7f302(0x10f)](_0xa7f302(0xe2)),console[_0xa7f302(0x10f)](_0xa7f302(0xea)),0x1;}const _0x11af51=_0x519b5a[_0xa7f302(0x101)];!_0x64e30b[_0xa7f302(0x101)]&&_0x11af51&&(_0x64e30b['database']=_0x11af51);try{const _0x14f514=_0x17ef56=>_0x17ef56&&(_0x17ef56[_0xa7f302(0x109)]('*')||_0x17ef56[_0xa7f302(0x109)]('?')),_0x3ca341=_0x14f514(_0x64e30b[_0xa7f302(0x101)]);_0x519b5a[_0xa7f302(0xe9)]&&(console[_0xa7f302(0x10f)](_0xa7f302(0xfc)+_0x519b5a[_0xa7f302(0x10c)]),_0x64e30b[_0xa7f302(0x101)]?_0x3ca341?console[_0xa7f302(0x10f)](_0xa7f302(0xf2)+_0x64e30b[_0xa7f302(0x101)]):console[_0xa7f302(0x10f)](_0xa7f302(0xfe)+_0x64e30b[_0xa7f302(0x101)]):console[_0xa7f302(0x10f)]('Database:\x20all'),_0x64e30b[_0xa7f302(0x10b)]&&console[_0xa7f302(0x10f)](_0xa7f302(0xe8)+_0x64e30b['table']));const _0x1062b0=_0x64e30b[_0xa7f302(0x101)]&&!_0x3ca341?_0x64e30b[_0xa7f302(0x101)]:undefined,_0x1c14ae=_0x3ca341?_0x64e30b[_0xa7f302(0x101)]:undefined,_0x2d9337=_0x64e30b[_0xa7f302(0x10b)],_0x548632=resolveLimit(_0x519b5a[_0xa7f302(0xec)],DEFAULT_LISTING_LIMIT),_0x2c91eb=await withSpinner(_0xa7f302(0xf5),()=>_0x1ac5c8[_0xa7f302(0xf1)]['listTables'](_0x1062b0,_0x2d9337,_0x1c14ae,_0x548632),{'verbose':_0x519b5a[_0xa7f302(0xe9)]}),_0x475310=_0x2c91eb[_0xa7f302(0x10e)];if(_0x475310[_0xa7f302(0xe4)]===0x0&&_0x64e30b[_0xa7f302(0x101)]&&!_0x3ca341)return console[_0xa7f302(0x10f)](_0xa7f302(0xf3)),console[_0xa7f302(0x10f)]('Database\x20\x27'+_0x64e30b[_0xa7f302(0x101)]+_0xa7f302(0x103)),0x1;return console[_0xa7f302(0x10f)](_0xa7f302(0x10d)+_0x475310[_0xa7f302(0xe4)]+_0xa7f302(0xee)+(_0x475310[_0xa7f302(0xe4)]!==0x1?'s':'')),await handleSDKOutput(_0x475310,{..._0x519b5a,'limit':_0x548632}),0x0;}catch(_0x589024){if(_0x589024 instanceof SDKError)return console['error'](_0xa7f302(0x102)+_0x589024[_0xa7f302(0x108)]),_0x589024[_0xa7f302(0x10a)]&&console[_0xa7f302(0x10f)](_0xa7f302(0xef)+_0x589024[_0xa7f302(0x10a)]),0x1;throw _0x589024;}}[a31_0x4154ed(0xff)](_0x136759){return undefined;}}
1
+ const a31_0x50aa3c=a31_0xface;(function(_0x9e0b0,_0x1dd120){const _0x1ac5bd=a31_0xface,_0x39ec5f=_0x9e0b0();while(!![]){try{const _0x3818ef=parseInt(_0x1ac5bd(0x8f))/0x1+parseInt(_0x1ac5bd(0x8a))/0x2+parseInt(_0x1ac5bd(0x94))/0x3+-parseInt(_0x1ac5bd(0x9e))/0x4*(parseInt(_0x1ac5bd(0x92))/0x5)+parseInt(_0x1ac5bd(0x9f))/0x6*(parseInt(_0x1ac5bd(0xae))/0x7)+parseInt(_0x1ac5bd(0xa1))/0x8*(-parseInt(_0x1ac5bd(0xb8))/0x9)+parseInt(_0x1ac5bd(0x95))/0xa;if(_0x3818ef===_0x1dd120)break;else _0x39ec5f['push'](_0x39ec5f['shift']());}catch(_0x16cf00){_0x39ec5f['push'](_0x39ec5f['shift']());}}}(a31_0x53d6,0xe67d7));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleSDKOutput}from'../utils/command-output.js';import{parseTableReference}from'../utils/table-ref-parser.js';function a31_0x53d6(){const _0x42254e=['Did\x20you\x20mean\x20to\x20list\x20all\x20tables\x20from\x20database\x20\x27','\x20\x20tdx\x20tables\x20users\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20->\x20table\x20\x22users\x22\x20across\x20all\x20databases','database','limit','\x20\x20tdx\x20tables\x20\x22mydb.users\x22\x20\x20\x20\x20->\x20table\x20\x22users\x22\x20in\x20database\x20mydb','.*\x22','✖\x20No\x20tables\x20found','Error:\x20Too\x20many\x20arguments.\x20Use\x20single\x20argument:','Database\x20\x27','1779001sBHsWS','Error:\x20Pattern\x20\x27','listTables','Database:\x20all','table','\x20\x20tdx\x20tables\x20\x22*.user*\x22\x20\x20\x20\x20\x20\x20\x20->\x20tables\x20matching\x20user*\x20across\x20databases','Site:\x20','\x20\x20Use:\x20tdx\x20tables\x20\x22','\x27\x20is\x20ambiguous.','\x20\x20Or:\x20\x20tdx\x20tables\x20--database\x20','14103486dpqMOY','114406rmTVZm','site','cause','✔\x20Found\x20','Listing\x20tables...','422194XncjOe','execute','\x20\x20Or:\x20\x20tdx\x20tables\x20--in\x20','32105qeDhWa','List\x20tables\x20in\x20a\x20database','5562633gPrTfq','12231290qVOgqF','\x20\x20tdx\x20tables\x20--in\x20mydb\x20\x20\x20\x20\x20\x20\x20->\x20all\x20tables\x20from\x20mydb','Error:\x20','Or\x20use\x20--in\x20flag:','data','message','includes','Table\x20pattern:\x20','verbose','968EtBsos','12AkyrDT','description','8DYSouh','error','length','name'];a31_0x53d6=function(){return _0x42254e;};return a31_0x53d6();}import{DEFAULT_LISTING_LIMIT,resolveLimit}from'../utils/constants.js';function a31_0xface(_0x415ec7,_0x5387ec){const _0x53d618=a31_0x53d6();return a31_0xface=function(_0xface7d,_0x39c5ae){_0xface7d=_0xface7d-0x8a;let _0x3f9806=_0x53d618[_0xface7d];return _0x3f9806;},a31_0xface(_0x415ec7,_0x5387ec);}import{withSpinner}from'../utils/spinner.js';export class TablesCommand extends BaseCommand{[a31_0x50aa3c(0xa4)]='tables';[a31_0x50aa3c(0xa0)]=a31_0x50aa3c(0x93);async[a31_0x50aa3c(0x90)](_0x37cfa4){const _0x31cad6=a31_0x50aa3c,{options:_0x1315b1,args:_0x55dcee,tdx:_0x5f52a9}=_0x37cfa4;let _0x266494;if(_0x55dcee[_0x31cad6(0xa3)]===0x0)_0x266494={'database':undefined,'table':undefined,'original':''};else{if(_0x55dcee[_0x31cad6(0xa3)]===0x1)try{_0x266494=parseTableReference(_0x55dcee[0x0]);if(_0x266494[_0x31cad6(0xb2)]&&!_0x266494[_0x31cad6(0xa7)]&&!_0x266494[_0x31cad6(0xb2)][_0x31cad6(0x9b)]('*')&&!_0x266494[_0x31cad6(0xb2)][_0x31cad6(0x9b)]('?'))return console['error'](_0x31cad6(0xaf)+_0x55dcee[0x0]+_0x31cad6(0xb6)),console[_0x31cad6(0xa2)](_0x31cad6(0xa5)+_0x266494[_0x31cad6(0xb2)]+'\x27?'),console[_0x31cad6(0xa2)](_0x31cad6(0xb5)+_0x266494[_0x31cad6(0xb2)]+_0x31cad6(0xaa)),console[_0x31cad6(0xa2)](_0x31cad6(0x91)+_0x266494[_0x31cad6(0xb2)]),console[_0x31cad6(0xa2)](_0x31cad6(0xb7)+_0x266494['table']),console['error'](''),console[_0x31cad6(0xa2)]('Note:\x20\x27'+_0x55dcee[0x0]+'\x27\x20without\x20wildcards\x20would\x20search\x20for\x20tables\x20named\x20\x27'+_0x266494['table']+'\x27\x20across\x20all\x20databases.'),0x1;}catch(_0x381f49){return console[_0x31cad6(0xa2)]('Error:\x20'+_0x381f49[_0x31cad6(0x9a)]),0x1;}else return console[_0x31cad6(0xa2)](_0x31cad6(0xac)),console[_0x31cad6(0xa2)](_0x31cad6(0xa6)),console[_0x31cad6(0xa2)]('\x20\x20tdx\x20tables\x20\x22mydb.*\x22\x20\x20\x20\x20\x20\x20\x20\x20->\x20all\x20tables\x20from\x20mydb'),console['error'](_0x31cad6(0xa9)),console[_0x31cad6(0xa2)](_0x31cad6(0xb3)),console[_0x31cad6(0xa2)](_0x31cad6(0x98)),console[_0x31cad6(0xa2)](_0x31cad6(0x96)),0x1;}const _0x22afcd=_0x1315b1[_0x31cad6(0xa7)];!_0x266494[_0x31cad6(0xa7)]&&_0x22afcd&&(_0x266494[_0x31cad6(0xa7)]=_0x22afcd);try{const _0x12cb1c=_0x272d7e=>_0x272d7e&&(_0x272d7e['includes']('*')||_0x272d7e[_0x31cad6(0x9b)]('?')),_0x2473bf=_0x12cb1c(_0x266494[_0x31cad6(0xa7)]);_0x1315b1[_0x31cad6(0x9d)]&&(console[_0x31cad6(0xa2)](_0x31cad6(0xb4)+_0x1315b1[_0x31cad6(0x8b)]),_0x266494[_0x31cad6(0xa7)]?_0x2473bf?console[_0x31cad6(0xa2)]('Database\x20pattern:\x20'+_0x266494[_0x31cad6(0xa7)]):console[_0x31cad6(0xa2)]('Database:\x20'+_0x266494[_0x31cad6(0xa7)]):console['error'](_0x31cad6(0xb1)),_0x266494['table']&&console[_0x31cad6(0xa2)](_0x31cad6(0x9c)+_0x266494['table']));const _0x3217e7=_0x266494['database']&&!_0x2473bf?_0x266494[_0x31cad6(0xa7)]:undefined,_0x17b7e6=_0x2473bf?_0x266494[_0x31cad6(0xa7)]:undefined,_0x5362c8=_0x266494['table'],_0xb9b217=resolveLimit(_0x1315b1[_0x31cad6(0xa8)],DEFAULT_LISTING_LIMIT),_0x1c75e8=await withSpinner(_0x31cad6(0x8e),()=>_0x5f52a9['query'][_0x31cad6(0xb0)](_0x3217e7,_0x5362c8,_0x17b7e6,_0xb9b217),{'verbose':_0x1315b1[_0x31cad6(0x9d)]}),_0x47e065=_0x1c75e8[_0x31cad6(0x99)];if(_0x47e065[_0x31cad6(0xa3)]===0x0&&_0x266494[_0x31cad6(0xa7)]&&!_0x2473bf)return console[_0x31cad6(0xa2)](_0x31cad6(0xab)),console[_0x31cad6(0xa2)](_0x31cad6(0xad)+_0x266494[_0x31cad6(0xa7)]+'\x27\x20may\x20not\x20exist\x20or\x20contains\x20no\x20tables'),0x1;return console['error'](_0x31cad6(0x8d)+_0x47e065[_0x31cad6(0xa3)]+'\x20table'+(_0x47e065[_0x31cad6(0xa3)]!==0x1?'s':'')),await handleSDKOutput(_0x47e065,{..._0x1315b1,'limit':_0xb9b217}),0x0;}catch(_0x3eb98b){if(_0x3eb98b instanceof SDKError)return console[_0x31cad6(0xa2)](_0x31cad6(0x97)+_0x3eb98b['message']),_0x3eb98b['cause']&&console[_0x31cad6(0xa2)]('\x20\x20Cause:\x20'+_0x3eb98b[_0x31cad6(0x8c)]),0x1;throw _0x3eb98b;}}['validate'](_0x36fbf0){return undefined;}}
@@ -1 +1 @@
1
- const a32_0x26467d=a32_0x37d5;function a32_0x37d5(_0x39eacd,_0x3f8c0f){const _0x352842=a32_0x3528();return a32_0x37d5=function(_0x37d593,_0x3386fc){_0x37d593=_0x37d593-0x13a;let _0x20cced=_0x352842[_0x37d593];return _0x20cced;},a32_0x37d5(_0x39eacd,_0x3f8c0f);}(function(_0x3b5d6b,_0xae8c20){const _0x1bd506=a32_0x37d5,_0x44994e=_0x3b5d6b();while(!![]){try{const _0x25eec2=-parseInt(_0x1bd506(0x15e))/0x1+parseInt(_0x1bd506(0x154))/0x2+-parseInt(_0x1bd506(0x151))/0x3+-parseInt(_0x1bd506(0x143))/0x4+-parseInt(_0x1bd506(0x149))/0x5+-parseInt(_0x1bd506(0x145))/0x6+-parseInt(_0x1bd506(0x15b))/0x7*(-parseInt(_0x1bd506(0x144))/0x8);if(_0x25eec2===_0xae8c20)break;else _0x44994e['push'](_0x44994e['shift']());}catch(_0x540239){_0x44994e['push'](_0x44994e['shift']());}}}(a32_0x3528,0x4ed63));function a32_0x3528(){const _0xbe3cc6=['toString','Set\x20session-level\x20context','session','\x0aRun\x20\x27tdx\x20use\x20--help\x27\x20for\x20more\x20options','join','length','1179999nHNfrK','log','Or\x20use:\x20tdx\x20context\x20--clear\x20to\x20clear\x20session\x20context\x0a','638380mhBfth','error','Session\x20llm_project\x20set\x20to:\x20','\x20(session:\x20','parent_segment','includes','Session\x20database\x20set\x20to:\x20','10428103gopGFt','use','name','95774CuxsnA','execute','Error:\x20','database','validate','.\x20Must\x20be\x20one\x20of:\x20','Resources:\x20database,\x20parent_segment,\x20llm_project,\x20profile\x0a','message','Invalid\x20resource:\x20','profile','1394476UxyNmw','8zNNnfT','766548JovzpT','\x0aTip:\x20Use\x20\x27tdx\x20context\x20--clear\x27\x20to\x20clear\x20session\x20overrides','description','llm_project','2602600zLsADT','Error:\x20Profile\x20\x27'];a32_0x3528=function(){return _0xbe3cc6;};return a32_0x3528();}import{BaseCommand}from'./command.js';import{saveSessionContext,getCurrentSessionPID}from'../core/session.js';import{profileExists}from'../core/profile.js';export class UseCommand extends BaseCommand{[a32_0x26467d(0x15d)]=a32_0x26467d(0x15c);[a32_0x26467d(0x147)]=a32_0x26467d(0x14c);[a32_0x26467d(0x13d)](_0x3c3a9f){const _0x41f03d=a32_0x26467d,{args:_0x2d0de5}=_0x3c3a9f;if(_0x2d0de5[_0x41f03d(0x150)]<0x2)return'Usage:\x20tdx\x20use\x20<resource>\x20<value>\x0a'+_0x41f03d(0x13f)+_0x41f03d(0x153)+_0x41f03d(0x14e);const _0xf73aea=_0x2d0de5[0x0],_0x1fdf74=[_0x41f03d(0x13c),_0x41f03d(0x158),_0x41f03d(0x148),_0x41f03d(0x142)];if(!_0x1fdf74[_0x41f03d(0x159)](_0xf73aea))return _0x41f03d(0x141)+_0xf73aea+_0x41f03d(0x13e)+_0x1fdf74[_0x41f03d(0x14f)](',\x20');return undefined;}async[a32_0x26467d(0x13a)](_0x1e518e){const _0x526079=a32_0x26467d,{args:_0x449241,options:_0x364444}=_0x1e518e;try{const _0x584d20=_0x449241[0x0],_0x29aefd=_0x449241[0x1];if(_0x584d20===_0x526079(0x142)){if(!profileExists(_0x29aefd))return console['error'](_0x526079(0x14a)+_0x29aefd+'\x27\x20does\x20not\x20exist'),console['error']('\x0aUse\x20\x27tdx\x20profiles\x27\x20to\x20see\x20available\x20profiles'),0x1;const _0x339a87=_0x364444[_0x526079(0x14d)]||getCurrentSessionPID()[_0x526079(0x14b)]();return saveSessionContext({'profile':_0x29aefd},_0x364444['session']),console[_0x526079(0x152)]('Session\x20profile\x20set\x20to:\x20'+_0x29aefd+_0x526079(0x157)+_0x339a87+')'),console[_0x526079(0x152)](_0x526079(0x146)),0x0;}const _0x142ebe={},_0xa96924=_0x364444[_0x526079(0x14d)]||getCurrentSessionPID()['toString']();switch(_0x584d20){case'database':_0x142ebe[_0x526079(0x13c)]=_0x29aefd,console[_0x526079(0x152)](_0x526079(0x15a)+_0x29aefd+_0x526079(0x157)+_0xa96924+')');break;case'parent_segment':_0x142ebe[_0x526079(0x158)]=_0x29aefd,console[_0x526079(0x152)]('Session\x20parent_segment\x20set\x20to:\x20'+_0x29aefd+_0x526079(0x157)+_0xa96924+')');break;case'llm_project':_0x142ebe[_0x526079(0x148)]=_0x29aefd,console['log'](_0x526079(0x156)+_0x29aefd+'\x20(session:\x20'+_0xa96924+')');break;}return saveSessionContext(_0x142ebe,_0x364444[_0x526079(0x14d)]),console[_0x526079(0x152)](_0x526079(0x146)),0x0;}catch(_0x45faf4){return _0x45faf4 instanceof Error&&console[_0x526079(0x155)](_0x526079(0x13b)+_0x45faf4[_0x526079(0x140)]),0x1;}}}
1
+ function a32_0x5830(_0x1bbeaf,_0x1d3458){const _0x5a4526=a32_0x5a45();return a32_0x5830=function(_0x583086,_0x3fe8d7){_0x583086=_0x583086-0xac;let _0x4e446a=_0x5a4526[_0x583086];return _0x4e446a;},a32_0x5830(_0x1bbeaf,_0x1d3458);}const a32_0xae3c99=a32_0x5830;function a32_0x5a45(){const _0x4003e3=['join','database','execute','Session\x20llm_project\x20set\x20to:\x20','\x27\x20does\x20not\x20exist','\x0aTip:\x20Use\x20\x27tdx\x20context\x20--clear\x27\x20to\x20clear\x20session\x20overrides','Or\x20use:\x20tdx\x20context\x20--clear\x20to\x20clear\x20session\x20context\x0a','\x0aUse\x20\x27tdx\x20profiles\x27\x20to\x20see\x20available\x20profiles','length','763978woypLJ','8kOJwdU','Session\x20parent_segment\x20set\x20to:\x20','log','\x20(session:\x20','5312916dIRfCW','error','291TCPRTq','Usage:\x20tdx\x20use\x20<resource>\x20<value>\x0a','profile','1606ahmszn','name','139454fgwRTn','Invalid\x20resource:\x20','session','155276eErmGP','Error:\x20Profile\x20\x27','Session\x20database\x20set\x20to:\x20','parent_segment','toString','2912904WlsHLf','12954700doNBPZ','Resources:\x20database,\x20parent_segment,\x20llm_project,\x20profile\x0a','llm_project','15KBvqEx','.\x20Must\x20be\x20one\x20of:\x20'];a32_0x5a45=function(){return _0x4003e3;};return a32_0x5a45();}(function(_0x35fb66,_0x5a1a06){const _0x56c582=a32_0x5830,_0x57d8f6=_0x35fb66();while(!![]){try{const _0x392bd5=parseInt(_0x56c582(0xcc))/0x1+parseInt(_0x56c582(0xb3))/0x2*(-parseInt(_0x56c582(0xb0))/0x3)+-parseInt(_0x56c582(0xb8))/0x4*(parseInt(_0x56c582(0xc1))/0x5)+parseInt(_0x56c582(0xae))/0x6+parseInt(_0x56c582(0xb5))/0x7*(-parseInt(_0x56c582(0xcd))/0x8)+parseInt(_0x56c582(0xbd))/0x9+-parseInt(_0x56c582(0xbe))/0xa;if(_0x392bd5===_0x5a1a06)break;else _0x57d8f6['push'](_0x57d8f6['shift']());}catch(_0x4519d4){_0x57d8f6['push'](_0x57d8f6['shift']());}}}(a32_0x5a45,0x71214));import{BaseCommand}from'./command.js';import{saveSessionContext,getCurrentSessionPID}from'../core/session.js';import{profileExists}from'../core/profile.js';export class UseCommand extends BaseCommand{[a32_0xae3c99(0xb4)]='use';['description']='Set\x20session-level\x20context';['validate'](_0x1e094c){const _0x2ec330=a32_0xae3c99,{args:_0x46339e}=_0x1e094c;if(_0x46339e[_0x2ec330(0xcb)]<0x2)return _0x2ec330(0xb1)+_0x2ec330(0xbf)+_0x2ec330(0xc9)+'\x0aRun\x20\x27tdx\x20use\x20--help\x27\x20for\x20more\x20options';const _0x27411f=_0x46339e[0x0],_0x1fbad1=[_0x2ec330(0xc4),_0x2ec330(0xbb),_0x2ec330(0xc0),'profile'];if(!_0x1fbad1['includes'](_0x27411f))return _0x2ec330(0xb6)+_0x27411f+_0x2ec330(0xc2)+_0x1fbad1[_0x2ec330(0xc3)](',\x20');return undefined;}async[a32_0xae3c99(0xc5)](_0x24a3d6){const _0x1c498c=a32_0xae3c99,{args:_0x10de50,options:_0x292726}=_0x24a3d6;try{const _0x5cc847=_0x10de50[0x0],_0x3eec8e=_0x10de50[0x1];if(_0x5cc847===_0x1c498c(0xb2)){if(!profileExists(_0x3eec8e))return console['error'](_0x1c498c(0xb9)+_0x3eec8e+_0x1c498c(0xc7)),console[_0x1c498c(0xaf)](_0x1c498c(0xca)),0x1;const _0x4b7329=_0x292726[_0x1c498c(0xb7)]||getCurrentSessionPID()[_0x1c498c(0xbc)]();return saveSessionContext({'profile':_0x3eec8e},_0x292726['session']),console['log']('Session\x20profile\x20set\x20to:\x20'+_0x3eec8e+_0x1c498c(0xad)+_0x4b7329+')'),console[_0x1c498c(0xac)](_0x1c498c(0xc8)),0x0;}const _0x50344d={},_0x45936d=_0x292726['session']||getCurrentSessionPID()[_0x1c498c(0xbc)]();switch(_0x5cc847){case _0x1c498c(0xc4):_0x50344d[_0x1c498c(0xc4)]=_0x3eec8e,console[_0x1c498c(0xac)](_0x1c498c(0xba)+_0x3eec8e+_0x1c498c(0xad)+_0x45936d+')');break;case _0x1c498c(0xbb):_0x50344d['parent_segment']=_0x3eec8e,console[_0x1c498c(0xac)](_0x1c498c(0xce)+_0x3eec8e+_0x1c498c(0xad)+_0x45936d+')');break;case'llm_project':_0x50344d['llm_project']=_0x3eec8e,console[_0x1c498c(0xac)](_0x1c498c(0xc6)+_0x3eec8e+_0x1c498c(0xad)+_0x45936d+')');break;}return saveSessionContext(_0x50344d,_0x292726[_0x1c498c(0xb7)]),console[_0x1c498c(0xac)]('\x0aTip:\x20Use\x20\x27tdx\x20context\x20--clear\x27\x20to\x20clear\x20session\x20overrides'),0x0;}catch(_0x414d8d){return _0x414d8d instanceof Error&&console['error']('Error:\x20'+_0x414d8d['message']),0x1;}}}
@@ -1 +1 @@
1
- const a33_0x335918=a33_0x5642;(function(_0x610051,_0x3ff214){const _0x2163f4=a33_0x5642,_0x1a04fc=_0x610051();while(!![]){try{const _0x74845e=parseInt(_0x2163f4(0x193))/0x1*(-parseInt(_0x2163f4(0x16b))/0x2)+-parseInt(_0x2163f4(0x18d))/0x3+-parseInt(_0x2163f4(0x1fb))/0x4*(parseInt(_0x2163f4(0x1d6))/0x5)+-parseInt(_0x2163f4(0x1c8))/0x6*(parseInt(_0x2163f4(0x1fd))/0x7)+parseInt(_0x2163f4(0x1a3))/0x8+parseInt(_0x2163f4(0x1a9))/0x9*(parseInt(_0x2163f4(0x1cf))/0xa)+parseInt(_0x2163f4(0x16e))/0xb;if(_0x74845e===_0x3ff214)break;else _0x1a04fc['push'](_0x1a04fc['shift']());}catch(_0x369fcf){_0x1a04fc['push'](_0x1a04fc['shift']());}}}(a33_0x4083,0x66fe4));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleSDKOutput,handleSingleObjectOutput}from'../utils/command-output.js';import{withSpinner}from'../utils/spinner.js';import{confirm}from'../utils/prompt.js';import{formatBytes}from'../utils/formatters.js';import a33_0x49ae89 from'prompts';export class WorkflowProjectsCommand extends BaseCommand{[a33_0x335918(0x162)]=a33_0x335918(0x208);[a33_0x335918(0x184)]=a33_0x335918(0x20e);async[a33_0x335918(0x1ee)](_0x3519a3){const _0x4a0770=a33_0x335918,{options:_0x5ae82b,args:_0x27616b,tdx:_0x2f81bb}=_0x3519a3,_0x40cbbe=_0x27616b[0x0];try{_0x5ae82b[_0x4a0770(0x1ef)]&&_0x40cbbe&&console[_0x4a0770(0x205)](_0x4a0770(0x1c5)+_0x40cbbe);const _0x3d1580=await withSpinner(_0x4a0770(0x1bb),()=>_0x2f81bb['workflow']['projects'](_0x40cbbe,{'limit':_0x5ae82b['limit']}),{'verbose':_0x5ae82b['verbose']}),_0x5eabc5=_0x3d1580['data'];return console[_0x4a0770(0x205)](_0x4a0770(0x1ea)+_0x5eabc5[_0x4a0770(0x1f3)]+_0x4a0770(0x17c)+(_0x5eabc5['length']!==0x1?'s':'')),await handleSDKOutput(_0x5eabc5,_0x5ae82b),0x0;}catch(_0xc71252){if(_0xc71252 instanceof SDKError)return console['error'](_0x4a0770(0x18a)+_0xc71252['message']),_0xc71252[_0x4a0770(0x18e)]&&console[_0x4a0770(0x205)](_0x4a0770(0x165)+_0xc71252[_0x4a0770(0x18e)]),0x1;throw _0xc71252;}}}export class WorkflowWorkflowsCommand extends BaseCommand{[a33_0x335918(0x162)]=a33_0x335918(0x179);['description']=a33_0x335918(0x18f);async[a33_0x335918(0x1ee)](_0x446654){const _0x1be236=a33_0x335918,{options:_0x68f4c1,args:_0x32f9c9,tdx:_0x47bb8e}=_0x446654,_0x7b3faf=_0x32f9c9[0x0];try{_0x68f4c1['verbose']&&_0x7b3faf&&console[_0x1be236(0x205)](_0x1be236(0x180)+_0x7b3faf);const _0x1d8574=await withSpinner(_0x1be236(0x177),()=>_0x47bb8e[_0x1be236(0x1dc)][_0x1be236(0x191)](_0x7b3faf,{'limit':_0x68f4c1[_0x1be236(0x173)]}),{'verbose':_0x68f4c1[_0x1be236(0x1ef)]}),_0x5e542a=_0x1d8574['data'];return console[_0x1be236(0x205)]('✔\x20Found\x20'+_0x5e542a[_0x1be236(0x1f3)]+_0x1be236(0x1ca)+(_0x5e542a[_0x1be236(0x1f3)]!==0x1?'s':'')),await handleSDKOutput(_0x5e542a,_0x68f4c1),0x0;}catch(_0x156f8e){if(_0x156f8e instanceof SDKError)return console[_0x1be236(0x205)](_0x1be236(0x18a)+_0x156f8e[_0x1be236(0x1e8)]),_0x156f8e['cause']&&console[_0x1be236(0x205)](_0x1be236(0x165)+_0x156f8e[_0x1be236(0x18e)]),0x1;throw _0x156f8e;}}}export class WorkflowSessionsCommand extends BaseCommand{[a33_0x335918(0x162)]=a33_0x335918(0x15e);[a33_0x335918(0x184)]=a33_0x335918(0x183);async[a33_0x335918(0x1ee)](_0x5372ba){const _0x34e867=a33_0x335918,{options:_0x555349,args:_0x1649d1,tdx:_0x3deebe}=_0x5372ba;let _0x564ca4,_0x2f6bc2;if(_0x1649d1[0x0]){const _0x2cbdd7=_0x1649d1[0x0][_0x34e867(0x1ba)]('.');if(_0x2cbdd7[_0x34e867(0x1f3)]===0x1)_0x564ca4=_0x2cbdd7[0x0];else{if(_0x2cbdd7['length']===0x2)[_0x564ca4,_0x2f6bc2]=_0x2cbdd7;else return console[_0x34e867(0x205)](_0x34e867(0x190)),0x1;}}try{if(_0x555349[_0x34e867(0x1ef)]){if(_0x564ca4&&_0x2f6bc2)console['error'](_0x34e867(0x1af)+_0x564ca4+'.'+_0x2f6bc2);else _0x564ca4&&console[_0x34e867(0x205)](_0x34e867(0x186)+_0x564ca4);const _0x300e5e=_0x555349[_0x34e867(0x1f8)];_0x300e5e&&console['error'](_0x34e867(0x1df)+_0x300e5e);}const _0x548cc6=await withSpinner(_0x34e867(0x160),()=>_0x3deebe[_0x34e867(0x1dc)]['sessions']({'projectName':_0x564ca4,'workflowName':_0x2f6bc2,'status':_0x555349[_0x34e867(0x1f8)],'fromTime':_0x555349[_0x34e867(0x1f0)],'toTime':_0x555349['to'],'limit':_0x555349['limit']}),{'verbose':_0x555349[_0x34e867(0x1ef)]}),_0x182c2c=_0x548cc6[_0x34e867(0x1bd)];return console['error'](_0x34e867(0x1ea)+_0x182c2c[_0x34e867(0x1f3)]+_0x34e867(0x210)+(_0x182c2c[_0x34e867(0x1f3)]!==0x1?'s':'')),await handleSDKOutput(_0x182c2c,_0x555349),0x0;}catch(_0x1b99e3){if(_0x1b99e3 instanceof SDKError)return console[_0x34e867(0x205)](_0x34e867(0x18a)+_0x1b99e3['message']),_0x1b99e3[_0x34e867(0x18e)]&&console['error']('\x20\x20Cause:\x20'+_0x1b99e3[_0x34e867(0x18e)]),0x1;throw _0x1b99e3;}}}export class WorkflowAttemptsCommand extends BaseCommand{['name']=a33_0x335918(0x164);[a33_0x335918(0x184)]=a33_0x335918(0x1c4);async['execute'](_0x3d3a5a){const _0x430406=a33_0x335918,{options:_0x5c80e7,args:_0x286ba2,tdx:_0x120665}=_0x3d3a5a;let _0x57df5a,_0x3fd032;if(_0x286ba2[0x0]){const _0x1c61e7=_0x286ba2[0x0][_0x430406(0x1ba)]('.');if(_0x1c61e7[_0x430406(0x1f3)]===0x1)_0x57df5a=_0x1c61e7[0x0];else{if(_0x1c61e7['length']===0x2)[_0x57df5a,_0x3fd032]=_0x1c61e7;else return console[_0x430406(0x205)]('Error:\x20Invalid\x20pattern.\x20Use\x20format:\x20project\x20or\x20project.workflow'),0x1;}}try{const _0x497040=_0x5c80e7[_0x430406(0x1ec)];if(_0x5c80e7[_0x430406(0x1ef)]){if(_0x57df5a&&_0x3fd032)console[_0x430406(0x205)](_0x430406(0x1af)+_0x57df5a+'.'+_0x3fd032);else _0x57df5a&&console['error']('Filter:\x20project='+_0x57df5a);_0x497040&&console[_0x430406(0x205)](_0x430406(0x1c9));}const _0x4698c2=await withSpinner(_0x430406(0x1a4),()=>_0x120665[_0x430406(0x1dc)][_0x430406(0x1e5)]({'projectName':_0x57df5a,'workflowName':_0x3fd032,'includeRetried':_0x497040,'limit':_0x5c80e7[_0x430406(0x173)]}),{'verbose':_0x5c80e7[_0x430406(0x1ef)]}),_0x37032d=_0x4698c2[_0x430406(0x1bd)];return console[_0x430406(0x205)]('✔\x20Found\x20'+_0x37032d[_0x430406(0x1f3)]+_0x430406(0x1d1)+(_0x37032d[_0x430406(0x1f3)]!==0x1?'s':'')),await handleSDKOutput(_0x37032d,_0x5c80e7),0x0;}catch(_0x8a56a8){if(_0x8a56a8 instanceof SDKError)return console[_0x430406(0x205)]('Error:\x20'+_0x8a56a8[_0x430406(0x1e8)]),_0x8a56a8[_0x430406(0x18e)]&&console[_0x430406(0x205)](_0x430406(0x165)+_0x8a56a8[_0x430406(0x18e)]),0x1;throw _0x8a56a8;}}}export class WorkflowAttemptCommand extends BaseCommand{['name']=a33_0x335918(0x178);[a33_0x335918(0x184)]='Show\x20specific\x20attempt\x20details';async[a33_0x335918(0x1ee)](_0xa595b5){const _0x2e426f=a33_0x335918,{options:_0x24e174,args:_0x11eb6c,tdx:_0x2cfda0}=_0xa595b5,_0x1c546a=_0x11eb6c[0x0];if(!_0x1c546a)return console[_0x2e426f(0x205)](_0x2e426f(0x1d4)),0x1;try{_0x24e174[_0x2e426f(0x1ef)]&&console[_0x2e426f(0x205)](_0x2e426f(0x17d)+_0x1c546a);const _0x9b3e70=await withSpinner(_0x2e426f(0x166),()=>_0x2cfda0[_0x2e426f(0x1dc)][_0x2e426f(0x16f)](_0x1c546a),{'verbose':_0x24e174['verbose']}),_0x3b4e14=_0x9b3e70[_0x2e426f(0x1bd)];let _0x567ec9;!_0x3b4e14[_0x2e426f(0x196)]?_0x567ec9=_0x3b4e14[_0x2e426f(0x1c1)]?_0x2e426f(0x1a1):'running':_0x567ec9=_0x3b4e14[_0x2e426f(0x19a)]?_0x2e426f(0x19a):_0x2e426f(0x205);let _0x1da338;if(_0x3b4e14[_0x2e426f(0x15f)]&&_0x3b4e14[_0x2e426f(0x1ad)]){const _0x259982=new Date(_0x3b4e14['createdAt'])['getTime'](),_0x593161=new Date(_0x3b4e14[_0x2e426f(0x1ad)])[_0x2e426f(0x19c)]();_0x1da338=Math[_0x2e426f(0x188)]((_0x593161-_0x259982)/0x3e8);}const _0xe6420a={'attempt_id':_0x3b4e14['id'],'status':_0x567ec9,..._0x3b4e14[_0x2e426f(0x200)]!==undefined&&{'index':_0x3b4e14[_0x2e426f(0x200)]},..._0x3b4e14[_0x2e426f(0x169)]&&{'project':_0x3b4e14['project'][_0x2e426f(0x162)]},..._0x3b4e14[_0x2e426f(0x1dc)]&&{'workflow':_0x3b4e14['workflow'][_0x2e426f(0x162)]},..._0x3b4e14[_0x2e426f(0x1e6)]&&{'session_id':_0x3b4e14[_0x2e426f(0x1e6)]},..._0x3b4e14[_0x2e426f(0x187)]&&{'session_time':_0x3b4e14[_0x2e426f(0x187)]},..._0x3b4e14[_0x2e426f(0x1da)]&&{'retry_attempt':_0x3b4e14[_0x2e426f(0x1da)]},..._0x1da338!==undefined&&{'duration_sec':_0x1da338},..._0x3b4e14['createdAt']&&{'created_at':_0x3b4e14[_0x2e426f(0x15f)]},..._0x3b4e14[_0x2e426f(0x1ad)]&&{'finished_at':_0x3b4e14[_0x2e426f(0x1ad)]},...Object[_0x2e426f(0x211)](_0x3b4e14[_0x2e426f(0x20b)])[_0x2e426f(0x1f3)]>0x0&&{'params':_0x3b4e14[_0x2e426f(0x20b)]}};return await handleSingleObjectOutput(_0xe6420a,_0x24e174),0x0;}catch(_0x3494e3){if(_0x3494e3 instanceof SDKError)return console['error'](_0x2e426f(0x18a)+_0x3494e3['message']),_0x3494e3[_0x2e426f(0x18e)]&&console[_0x2e426f(0x205)]('\x20\x20Cause:\x20'+_0x3494e3[_0x2e426f(0x18e)]),0x1;throw _0x3494e3;}}}export class WorkflowTasksCommand extends BaseCommand{['name']=a33_0x335918(0x1cd);[a33_0x335918(0x184)]=a33_0x335918(0x185);async['execute'](_0xfd0bb8){const _0x27868f=a33_0x335918,{options:_0xfb9671,args:_0x1761de,tdx:_0x1df6fe}=_0xfd0bb8,_0x5a7bf6=_0x1761de[0x0];if(!_0x5a7bf6)return console[_0x27868f(0x205)](_0x27868f(0x1d4)),0x1;try{const _0x2acacf=_0xfb9671['includeSubtasks'];_0xfb9671['verbose']&&(console[_0x27868f(0x205)]('Attempt\x20ID:\x20'+_0x5a7bf6),_0x2acacf&&console[_0x27868f(0x205)]('Including\x20subtasks:\x20yes'));const _0x66897d=await withSpinner('Getting\x20attempt\x20tasks...',()=>_0x1df6fe[_0x27868f(0x1dc)][_0x27868f(0x1e1)](_0x5a7bf6,_0x2acacf||![]),{'verbose':_0xfb9671[_0x27868f(0x1ef)]}),_0xd031d6=_0x66897d['data'];return console[_0x27868f(0x205)](_0x27868f(0x1ea)+_0xd031d6[_0x27868f(0x1f3)]+'\x20task'+(_0xd031d6[_0x27868f(0x1f3)]!==0x1?'s':'')),await handleSDKOutput(_0xd031d6,_0xfb9671),0x0;}catch(_0x53ad32){if(_0x53ad32 instanceof SDKError)return console[_0x27868f(0x205)](_0x27868f(0x18a)+_0x53ad32['message']),_0x53ad32[_0x27868f(0x18e)]&&console['error'](_0x27868f(0x165)+_0x53ad32[_0x27868f(0x18e)]),0x1;throw _0x53ad32;}}}export class WorkflowLogsCommand extends BaseCommand{[a33_0x335918(0x162)]=a33_0x335918(0x18c);[a33_0x335918(0x184)]=a33_0x335918(0x168);async[a33_0x335918(0x1ee)](_0xd1ff7a){const _0x25ebca=a33_0x335918,{options:_0x3e2bdf,args:_0xf67cb1,tdx:_0x294ac5}=_0xd1ff7a,_0x9bd09f=_0xf67cb1[0x0];let _0x5c5527=_0xf67cb1[0x1];if(!_0x9bd09f)return console[_0x25ebca(0x205)](_0x25ebca(0x1d4)),0x1;try{_0x3e2bdf['verbose']&&(console[_0x25ebca(0x205)](_0x25ebca(0x17d)+_0x9bd09f),_0x5c5527&&console[_0x25ebca(0x205)](_0x25ebca(0x1b3)+_0x5c5527));const _0xc5c2ee=await withSpinner(_0x25ebca(0x1a7),()=>_0x294ac5[_0x25ebca(0x1dc)][_0x25ebca(0x1ae)](_0x9bd09f,_0x5c5527),{'verbose':_0x3e2bdf[_0x25ebca(0x1ef)]}),_0x82a12=_0xc5c2ee[_0x25ebca(0x1bd)];if(_0x82a12[_0x25ebca(0x1f3)]===0x0)return console['error'](_0x25ebca(0x16d)),0x0;if(!_0x5c5527&&(_0x3e2bdf[_0x25ebca(0x17f)]||_0x3e2bdf[_0x25ebca(0x1a0)]))return await handleSDKOutput(_0x82a12,_0x3e2bdf),0x0;if(!_0x5c5527){const _0x31ed40=_0x82a12['map'](_0x173f70=>({'title':_0x173f70[_0x25ebca(0x174)]+'\x20('+formatBytes(_0x173f70[_0x25ebca(0x202)])+')','value':_0x173f70['taskName']})),_0x1e9f24=await a33_0x49ae89({'type':_0x25ebca(0x1fc),'name':_0x25ebca(0x1a8),'message':_0x25ebca(0x1ac),'choices':_0x31ed40});if(!_0x1e9f24[_0x25ebca(0x1a8)])return console['error'](_0x25ebca(0x1b8)),0x0;_0x5c5527=_0x1e9f24[_0x25ebca(0x1a8)];}const _0x5ea925=await withSpinner(_0x25ebca(0x171),()=>_0x294ac5[_0x25ebca(0x1dc)][_0x25ebca(0x1aa)](_0x9bd09f,_0x5c5527),{'verbose':_0x3e2bdf[_0x25ebca(0x1ef)]}),_0x29c156=_0x5ea925[_0x25ebca(0x1bd)];return _0x29c156?console[_0x25ebca(0x1e9)](_0x29c156):console['error'](_0x25ebca(0x1a2)),0x0;}catch(_0x129de5){if(_0x129de5 instanceof SDKError)return console[_0x25ebca(0x205)](_0x25ebca(0x18a)+_0x129de5[_0x25ebca(0x1e8)]),_0x129de5[_0x25ebca(0x18e)]&&console['error'](_0x25ebca(0x165)+_0x129de5['cause']),0x1;throw _0x129de5;}}}export class WorkflowKillCommand extends BaseCommand{[a33_0x335918(0x162)]=a33_0x335918(0x1f5);[a33_0x335918(0x184)]=a33_0x335918(0x1e3);async[a33_0x335918(0x1ee)](_0x42b35e){const _0x15b81e=a33_0x335918,{options:_0x22dcc8,args:_0x4d0e54,tdx:_0x5cd776}=_0x42b35e,_0x1afaf6=_0x4d0e54[0x0];if(!_0x1afaf6)return console['error'](_0x15b81e(0x1d4)),0x1;try{const _0x54672e=_0x22dcc8[_0x15b81e(0x181)];_0x22dcc8['verbose']&&(console['error'](_0x15b81e(0x17d)+_0x1afaf6),_0x54672e&&console['error'](_0x15b81e(0x1d5)+_0x54672e));if(!_0x22dcc8[_0x15b81e(0x1f9)]){const _0x4c5e5b=await confirm(_0x15b81e(0x197)+_0x1afaf6+'?');if(!_0x4c5e5b)return console[_0x15b81e(0x205)]('Cancelled'),0x0;}const _0x5229cc=await withSpinner(_0x15b81e(0x182),()=>_0x5cd776[_0x15b81e(0x1dc)]['kill'](_0x1afaf6,_0x54672e),{'verbose':_0x22dcc8[_0x15b81e(0x1ef)]}),_0x3f77e5=_0x5229cc[_0x15b81e(0x1bd)];return console[_0x15b81e(0x205)]('✔\x20'+_0x3f77e5),0x0;}catch(_0x2376ee){if(_0x2376ee instanceof SDKError)return console['error']('Error:\x20'+_0x2376ee[_0x15b81e(0x1e8)]),_0x2376ee['cause']&&console[_0x15b81e(0x205)](_0x15b81e(0x165)+_0x2376ee[_0x15b81e(0x18e)]),0x1;throw _0x2376ee;}}}export class WorkflowRetryCommand extends BaseCommand{[a33_0x335918(0x162)]='workflow:retry';[a33_0x335918(0x184)]=a33_0x335918(0x1c6);async['execute'](_0x59a715){const _0x58584c=a33_0x335918,{options:_0x2c3b09,args:_0x16df5f,tdx:_0x48620f}=_0x59a715,_0x1c972f=_0x16df5f[0x0];if(!_0x1c972f)return console['error'](_0x58584c(0x1c0)),console[_0x58584c(0x205)](_0x58584c(0x1bc)),0x1;let _0x231612=![],_0x5117a1=_0x1c972f;if(_0x1c972f['startsWith'](_0x58584c(0x1d9)))_0x231612=!![],_0x5117a1=_0x1c972f[_0x58584c(0x1b1)](0x8);else{if(_0x1c972f['startsWith']('attempt:'))_0x231612=![],_0x5117a1=_0x1c972f[_0x58584c(0x1b1)](0x8);else return console[_0x58584c(0x205)](_0x58584c(0x16a)),console[_0x58584c(0x205)]('Usage:\x20workflow\x20retry\x20session:<id>\x20or\x20workflow\x20retry\x20attempt:<id>'),0x1;}try{const _0x527f27=_0x2c3b09[_0x58584c(0x1fa)],_0x4ead84=_0x2c3b09['resumeFrom'],_0x24bca2=_0x2c3b09['params'],_0x51caa9=_0x2c3b09[_0x58584c(0x1b0)];_0x2c3b09[_0x58584c(0x1ef)]&&(console[_0x58584c(0x205)](_0x58584c(0x19d)+(_0x231612?'session':'attempt')+'\x20'+_0x5117a1),_0x527f27&&console[_0x58584c(0x205)](_0x58584c(0x206)+_0x527f27),_0x4ead84&&console['error']('Resume\x20from:\x20'+_0x4ead84),_0x24bca2&&console[_0x58584c(0x205)](_0x58584c(0x1e7)+_0x24bca2),_0x51caa9&&console[_0x58584c(0x205)](_0x58584c(0x176)));let _0x1421a7;if(_0x24bca2)try{if(_0x24bca2[_0x58584c(0x20a)]('@')){const _0x5357bd=await import(_0x58584c(0x1fe)),_0xf11f50=_0x24bca2[_0x58584c(0x1b1)](0x1),_0x4a9cc8=await _0x5357bd[_0x58584c(0x1c2)](_0xf11f50,'utf-8');_0x1421a7=JSON[_0x58584c(0x20d)](_0x4a9cc8);}else _0x1421a7=JSON[_0x58584c(0x20d)](_0x24bca2);}catch{return console[_0x58584c(0x205)]('Error:\x20Invalid\x20JSON\x20in\x20--params'),0x1;}if(!_0x2c3b09[_0x58584c(0x1f9)]){const _0x15da94=await confirm(_0x58584c(0x207)+(_0x231612?_0x58584c(0x209):_0x58584c(0x16f))+'\x20'+_0x5117a1+'?');if(!_0x15da94)return console['error']('Cancelled'),0x0;}let _0x361b4e;_0x231612?_0x361b4e=await withSpinner(_0x58584c(0x1b7),()=>_0x48620f[_0x58584c(0x1dc)][_0x58584c(0x20f)](_0x5117a1,{'fromTask':_0x527f27,'retryParams':_0x1421a7}),{'verbose':_0x2c3b09[_0x58584c(0x1ef)]}):_0x361b4e=await withSpinner(_0x58584c(0x1f4),()=>_0x48620f[_0x58584c(0x1dc)][_0x58584c(0x20c)](_0x5117a1,{'resumeFrom':_0x4ead84,'retryParams':_0x1421a7,'force':_0x51caa9}),{'verbose':_0x2c3b09[_0x58584c(0x1ef)]});const _0x40f3fa=_0x361b4e[_0x58584c(0x1bd)];return console[_0x58584c(0x205)]('✔\x20Retry\x20started'),console[_0x58584c(0x205)](_0x58584c(0x192)+_0x40f3fa[_0x58584c(0x199)]),console[_0x58584c(0x205)](_0x58584c(0x1d3)+_0x40f3fa[_0x58584c(0x1e6)]),0x0;}catch(_0x29a250){if(_0x29a250 instanceof SDKError)return console[_0x58584c(0x205)](_0x58584c(0x18a)+_0x29a250['message']),_0x29a250[_0x58584c(0x18e)]&&console[_0x58584c(0x205)](_0x58584c(0x165)+_0x29a250[_0x58584c(0x18e)]),0x1;throw _0x29a250;}}}function a33_0x5642(_0x4e8248,_0x16b33c){const _0x408360=a33_0x4083();return a33_0x5642=function(_0x5642e4,_0xf19ca2){_0x5642e4=_0x5642e4-0x15e;let _0x54ec72=_0x408360[_0x5642e4];return _0x54ec72;},a33_0x5642(_0x4e8248,_0x16b33c);}export class WorkflowRunCommand extends BaseCommand{[a33_0x335918(0x162)]=a33_0x335918(0x161);['description']=a33_0x335918(0x1b5);async[a33_0x335918(0x1ee)](_0x3a4d03){const _0x4e8a1d=a33_0x335918,{options:_0x19f5f7,args:_0xbde216,tdx:_0x30e32e}=_0x3a4d03,_0x451b5e=_0xbde216[0x0];if(!_0x451b5e)return console['error'](_0x4e8a1d(0x198)),console[_0x4e8a1d(0x205)](_0x4e8a1d(0x1c7)),0x1;const _0x255e68=_0x19f5f7[_0x4e8a1d(0x1bf)],_0x244884=_0x19f5f7[_0x4e8a1d(0x187)],_0x2ef51a={};if(_0x255e68&&Array[_0x4e8a1d(0x17a)](_0x255e68))for(const _0x51fd84 of _0x255e68){const _0x4fc00a=_0x51fd84[_0x4e8a1d(0x1f1)]('=');if(_0x4fc00a===-0x1)return console['error'](_0x4e8a1d(0x1eb)+_0x51fd84),console[_0x4e8a1d(0x205)]('Expected\x20format:\x20--param\x20key=value'),0x1;const _0x54ae25=_0x51fd84[_0x4e8a1d(0x1b1)](0x0,_0x4fc00a),_0xbe859f=_0x51fd84[_0x4e8a1d(0x1b1)](_0x4fc00a+0x1);try{_0x2ef51a[_0x54ae25]=JSON[_0x4e8a1d(0x20d)](_0xbe859f);}catch{_0x2ef51a[_0x54ae25]=_0xbe859f;}}_0x19f5f7[_0x4e8a1d(0x1ef)]&&(console[_0x4e8a1d(0x205)](_0x4e8a1d(0x201)+_0x451b5e),Object[_0x4e8a1d(0x211)](_0x2ef51a)[_0x4e8a1d(0x1f3)]>0x0&&console[_0x4e8a1d(0x205)](_0x4e8a1d(0x1d2)+JSON[_0x4e8a1d(0x1dd)](_0x2ef51a)),_0x244884&&console[_0x4e8a1d(0x205)](_0x4e8a1d(0x1e2)+_0x244884));const _0x401219=await withSpinner(_0x4e8a1d(0x1d7),()=>_0x30e32e[_0x4e8a1d(0x1dc)][_0x4e8a1d(0x1f2)](_0x451b5e,_0x2ef51a,{'sessionTime':_0x244884}),{'verbose':_0x19f5f7[_0x4e8a1d(0x1ef)]}),_0x3bb4ab=_0x401219[_0x4e8a1d(0x1bd)];return console[_0x4e8a1d(0x205)](_0x4e8a1d(0x1f6)),console[_0x4e8a1d(0x205)]('\x20\x20Attempt\x20ID:\x20'+_0x3bb4ab['id']),console[_0x4e8a1d(0x205)](_0x4e8a1d(0x1d3)+_0x3bb4ab['sessionId']),console[_0x4e8a1d(0x205)]('\x20\x20Project:\x20'+_0x3bb4ab['project']?.[_0x4e8a1d(0x162)]),console[_0x4e8a1d(0x205)](_0x4e8a1d(0x195)+_0x3bb4ab[_0x4e8a1d(0x1dc)]?.['name']),0x0;}}export class WorkflowDownloadCommand extends BaseCommand{[a33_0x335918(0x162)]=a33_0x335918(0x1cc);[a33_0x335918(0x184)]=a33_0x335918(0x19b);async[a33_0x335918(0x1ee)](_0x1378c8){const _0x2bc3a5=a33_0x335918,{options:_0x5cbba0,args:_0x216988,tdx:_0x575111}=_0x1378c8,_0x5343ad=_0x216988[0x0],_0x107a37=_0x216988[0x1]||'.';if(!_0x5343ad)return console[_0x2bc3a5(0x205)](_0x2bc3a5(0x163)),console[_0x2bc3a5(0x205)](_0x2bc3a5(0x1b6)),0x1;const _0x424470=_0x5cbba0[_0x2bc3a5(0x1ff)];_0x5cbba0[_0x2bc3a5(0x1ef)]&&(console[_0x2bc3a5(0x205)](_0x2bc3a5(0x1c3)+_0x5343ad),console[_0x2bc3a5(0x205)](_0x2bc3a5(0x1de)+_0x107a37),_0x424470&&console[_0x2bc3a5(0x205)](_0x2bc3a5(0x1b4)+_0x424470));const _0x33be81=await withSpinner('Downloading\x20project\x20'+_0x5343ad+_0x2bc3a5(0x1a6),()=>_0x575111['workflow'][_0x2bc3a5(0x1db)](_0x5343ad,_0x107a37,{'revision':_0x424470}),{'verbose':_0x5cbba0['verbose']}),_0xbc5f50=_0x33be81[_0x2bc3a5(0x1bd)];return console[_0x2bc3a5(0x205)](_0x2bc3a5(0x1ed)+_0xbc5f50[_0x2bc3a5(0x1b2)]),console[_0x2bc3a5(0x205)](_0x2bc3a5(0x1d0)+_0xbc5f50[_0x2bc3a5(0x1ff)]),console[_0x2bc3a5(0x205)]('\x20\x20Files\x20extracted:\x20'+_0xbc5f50[_0x2bc3a5(0x1e0)]),console[_0x2bc3a5(0x205)](_0x2bc3a5(0x170)+_0x107a37+'/'+_0xbc5f50['projectName']),0x0;}}function a33_0x4083(){const _0x59f8a2=['force','substring','projectName','Task\x20name:\x20','Revision:\x20','Start\x20a\x20workflow\x20run','Usage:\x20workflow:download\x20<project-name>\x20[output-dir]','Retrying\x20session...','Cancelled','Validation:\x20skipped','split','Listing\x20workflow\x20projects...','Usage:\x20workflow\x20retry\x20session:<id>\x20or\x20workflow\x20retry\x20attempt:<id>','data','Error:\x20Project\x20name\x20or\x20ID\x20is\x20required','param','Error:\x20Session\x20ID\x20or\x20attempt\x20ID\x20is\x20required','cancelRequested','readFile','Project:\x20','List\x20workflow\x20attempts','Pattern:\x20','Retry\x20a\x20session\x20or\x20attempt','Usage:\x20workflow\x20run\x20<project.workflow>\x20[options]','6PshsVO','Include\x20retried:\x20yes','\x20workflow','\x20\x20Project\x20ID:\x20','workflow:download','workflow:tasks','push','13210jBGCrZ','\x20\x20Revision:\x20','\x20attempt','Parameters:\x20','\x20\x20Session\x20ID:\x20','Error:\x20Attempt\x20ID\x20is\x20required','Reason:\x20','5LBypHj','Starting\x20workflow\x20run...','Push\x20workflow\x20project\x20to\x20Treasure\x20Data','session:','retryAttemptName','download','workflow','stringify','Output\x20directory:\x20','Status:\x20','filesExtracted','tasks','Session\x20time:\x20','Kill\x20a\x20running\x20attempt','projectId','attempts','sessionId','Params:\x20','message','log','✔\x20Found\x20','Error:\x20Invalid\x20parameter\x20format:\x20','includeRetried','✔\x20Downloaded\x20','execute','verbose','from','indexOf','run','length','Retrying\x20attempt...','workflow:kill','✔\x20Workflow\x20run\x20started','✔\x20Deleted\x20project\x20','status','yes','fromTask','3174332RzzcNu','select','4147087BPTbOu','fs/promises','revision','index','Workflow:\x20','fileSize','✔\x20Pushed\x20','skipValidation','error','From\x20task:\x20','Are\x20you\x20sure\x20you\x20want\x20to\x20retry\x20','workflow:projects','session','startsWith','params','retryAttempt','parse','List\x20all\x20workflow\x20projects','retrySession','\x20session','keys','workflow:sessions','createdAt','Listing\x20workflow\x20sessions...','workflow:run','name','Error:\x20Project\x20name\x20is\x20required','workflow:attempts','\x20\x20Cause:\x20','Getting\x20attempt\x20details...','Pushing\x20workflow\x20project...','Show\x20logs\x20for\x20a\x20workflow\x20attempt','project','Error:\x20Target\x20must\x20be\x20prefixed\x20with\x20\x22session:\x22\x20or\x20\x22attempt:\x22','22mREPOJ','\x22?\x20This\x20cannot\x20be\x20undone.','No\x20log\x20files\x20found\x20for\x20this\x20attempt','16882734PcMfYL','attempt','\x20\x20Location:\x20','Downloading\x20logs...','isDirectory','limit','taskName','Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20project\x20\x22','Force:\x20yes','Listing\x20workflows...','workflow:attempt','workflow:workflows','isArray','Project\x20directory:\x20','\x20project','Attempt\x20ID:\x20','stat','json','Project\x20filter:\x20','reason','Killing\x20attempt...','List\x20workflow\x20execution\x20sessions','description','Show\x20tasks\x20for\x20an\x20attempt','Filter:\x20project=','sessionTime','round','\x20is\x20not\x20a\x20directory','Error:\x20','Delete\x20workflow\x20project\x20from\x20Treasure\x20Data','workflow:logs','323568YrEGqG','cause','List\x20workflows','Error:\x20Invalid\x20pattern.\x20Use\x20format:\x20project\x20or\x20project.workflow','workflows','\x20\x20New\x20attempt\x20ID:\x20','31933twQFyU','Usage:\x20workflow:delete\x20<project-name-or-id>','\x20\x20Workflow:\x20','done','Are\x20you\x20sure\x20you\x20want\x20to\x20kill\x20attempt\x20','Error:\x20Workflow\x20identifier\x20is\x20required','attemptId','success','Download\x20workflow\x20project\x20from\x20Treasure\x20Data','getTime','Target:\x20','Deleting\x20project\x20','Project\x20name:\x20','format','canceling','No\x20log\x20content\x20found','2888064iOvNRR','Listing\x20workflow\x20attempts...','workflow:push','...','Fetching\x20log\x20files...','task','2529qryGOS','logs','delete','Select\x20a\x20task\x20to\x20view\x20logs:','finishedAt','logFiles','Filter:\x20'];a33_0x4083=function(){return _0x59f8a2;};return a33_0x4083();}export class WorkflowPushCommand extends BaseCommand{[a33_0x335918(0x162)]=a33_0x335918(0x1a5);['description']=a33_0x335918(0x1d8);async[a33_0x335918(0x1ee)](_0x222c55){const _0x283054=a33_0x335918,{options:_0x297887,args:_0x51f923,tdx:_0x1a61d1}=_0x222c55;let _0x2fd983='.',_0x10a30c=_0x297887[_0x283054(0x162)];if(_0x51f923[0x0]){const {promises:_0x3158df}=await import('fs');try{const _0x382dd3=await _0x3158df[_0x283054(0x17e)](_0x51f923[0x0]);if(_0x382dd3[_0x283054(0x172)]())_0x2fd983=_0x51f923[0x0];else return console[_0x283054(0x205)]('Error:\x20'+_0x51f923[0x0]+_0x283054(0x189)),0x1;}catch{_0x10a30c=_0x51f923[0x0],_0x2fd983='.';}}const _0x29aa50=_0x297887[_0x283054(0x1ff)],_0x1cd157=_0x297887[_0x283054(0x204)];_0x297887[_0x283054(0x1ef)]&&(console[_0x283054(0x205)](_0x283054(0x17b)+_0x2fd983),_0x10a30c&&console[_0x283054(0x205)](_0x283054(0x19f)+_0x10a30c),_0x29aa50&&console[_0x283054(0x205)](_0x283054(0x1b4)+_0x29aa50),_0x1cd157&&console[_0x283054(0x205)](_0x283054(0x1b9)));const _0x691620=await withSpinner(_0x283054(0x167),()=>_0x1a61d1[_0x283054(0x1dc)][_0x283054(0x1ce)](_0x2fd983,{'projectName':_0x10a30c,'revision':_0x29aa50,'skipValidation':_0x1cd157}),{'verbose':_0x297887[_0x283054(0x1ef)]}),_0x160665=_0x691620[_0x283054(0x1bd)];return console[_0x283054(0x205)](_0x283054(0x203)+_0x160665['projectName']),console['error'](_0x283054(0x1cb)+_0x160665[_0x283054(0x1e4)]),console[_0x283054(0x205)](_0x283054(0x1d0)+_0x160665['revision']),0x0;}}export class WorkflowDeleteCommand extends BaseCommand{[a33_0x335918(0x162)]='workflow:delete';[a33_0x335918(0x184)]=a33_0x335918(0x18b);async[a33_0x335918(0x1ee)](_0x115fdf){const _0x3f67a6=a33_0x335918,{options:_0x525ad0,args:_0xb4b87,tdx:_0x4bcff3}=_0x115fdf,_0x259e0e=_0xb4b87[0x0];if(!_0x259e0e)return console['error'](_0x3f67a6(0x1be)),console['error'](_0x3f67a6(0x194)),0x1;_0x525ad0[_0x3f67a6(0x1ef)]&&console[_0x3f67a6(0x205)]('Project:\x20'+_0x259e0e);if(!_0x525ad0['yes']){const _0x2c7c03=await confirm(_0x3f67a6(0x175)+_0x259e0e+_0x3f67a6(0x16c));if(!_0x2c7c03)return console['error']('Cancelled'),0x0;}const _0x58b6ca=await withSpinner(_0x3f67a6(0x19e)+_0x259e0e+'...',()=>_0x4bcff3[_0x3f67a6(0x1dc)][_0x3f67a6(0x1ab)](_0x259e0e),{'verbose':_0x525ad0[_0x3f67a6(0x1ef)]}),_0xec121e=_0x58b6ca[_0x3f67a6(0x1bd)];return console[_0x3f67a6(0x205)](_0x3f67a6(0x1f7)+_0xec121e[_0x3f67a6(0x1b2)]),console[_0x3f67a6(0x205)](_0x3f67a6(0x1cb)+_0xec121e[_0x3f67a6(0x1e4)]),0x0;}}
1
+ const a33_0x48c3d9=a33_0x305a;(function(_0x3ee415,_0x248ee3){const _0x5aaee9=a33_0x305a,_0xb49bbc=_0x3ee415();while(!![]){try{const _0x202d61=parseInt(_0x5aaee9(0xc1))/0x1+-parseInt(_0x5aaee9(0x136))/0x2*(-parseInt(_0x5aaee9(0x103))/0x3)+parseInt(_0x5aaee9(0xb7))/0x4*(parseInt(_0x5aaee9(0xf1))/0x5)+-parseInt(_0x5aaee9(0x113))/0x6+-parseInt(_0x5aaee9(0xdd))/0x7+parseInt(_0x5aaee9(0xee))/0x8+parseInt(_0x5aaee9(0xa6))/0x9;if(_0x202d61===_0x248ee3)break;else _0xb49bbc['push'](_0xb49bbc['shift']());}catch(_0x12a791){_0xb49bbc['push'](_0xb49bbc['shift']());}}}(a33_0xfa05,0x93ec0));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';function a33_0xfa05(){const _0x1f1334=['Getting\x20attempt\x20details...','taskName','\x20\x20Cause:\x20','attempt:','Are\x20you\x20sure\x20you\x20want\x20to\x20kill\x20attempt\x20','stat','sessions','18868HJBGmt','Attempt\x20ID:\x20','Cancelled','✔\x20Found\x20','index','Error:\x20Invalid\x20pattern.\x20Use\x20format:\x20project\x20or\x20project.workflow','Kill\x20a\x20running\x20attempt','workflow:download','sessionTime','Output\x20directory:\x20','727911sbdRNO','isArray','Session\x20time:\x20','logs','workflow:retry','limit','logFiles','includeSubtasks','\x20\x20Project:\x20','Status:\x20','from','params','Project\x20directory:\x20','fromTask','workflow:logs','\x20\x20New\x20attempt\x20ID:\x20','Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20project\x20\x22','Error:\x20','name','keys','execute','select','filesExtracted','\x20\x20Files\x20extracted:\x20','Resume\x20from:\x20','✔\x20Retry\x20started','✔\x20Deleted\x20project\x20','retrySession','3062157CywKJA','workflow:sessions','Getting\x20attempt\x20tasks...','running','log','Start\x20a\x20workflow\x20run','\x20attempt','format','parse','List\x20workflow\x20attempts','\x20session','Select\x20a\x20task\x20to\x20view\x20logs:','utf-8','Filter:\x20project=','\x20\x20Attempt\x20ID:\x20','done','canceling','3853712BKBfoA','\x20\x20Location:\x20','Error:\x20Target\x20must\x20be\x20prefixed\x20with\x20\x22session:\x22\x20or\x20\x22attempt:\x22','40YSYpDw','Show\x20tasks\x20for\x20an\x20attempt','Pushing\x20workflow\x20project...','Parameters:\x20','task','List\x20all\x20workflow\x20projects','\x20project','revision','Error:\x20Invalid\x20JSON\x20in\x20--params','projectId','No\x20log\x20content\x20found','workflow','retryAttemptName','Usage:\x20workflow:delete\x20<project-name-or-id>','Are\x20you\x20sure\x20you\x20want\x20to\x20retry\x20','Retrying\x20session...','round','status','6EeNoDT','\x20is\x20not\x20a\x20directory','split','push','success','Pattern:\x20','✔\x20Workflow\x20run\x20started','projects','Listing\x20workflow\x20sessions...','workflow:push','session','workflow:attempts','param','run','workflow:run','readFile','5916684Lbtxgr','project','Usage:\x20workflow\x20retry\x20session:<id>\x20or\x20workflow\x20retry\x20attempt:<id>','\x20\x20Session\x20ID:\x20','Revision:\x20','List\x20workflows','finishedAt','substring','Downloading\x20project\x20','sessionId','✔\x20Pushed\x20','Error:\x20Workflow\x20identifier\x20is\x20required','yes','Show\x20logs\x20for\x20a\x20workflow\x20attempt','length','cause','Usage:\x20workflow:download\x20<project-name>\x20[output-dir]','workflow:workflows','Including\x20subtasks:\x20yes','Error:\x20Attempt\x20ID\x20is\x20required','Deleting\x20project\x20','List\x20workflow\x20execution\x20sessions','Show\x20specific\x20attempt\x20details','verbose','message','Filter:\x20','Starting\x20workflow\x20run...','Expected\x20format:\x20--param\x20key=value','description','Task\x20name:\x20','Listing\x20workflow\x20projects...','error','Validation:\x20skipped','Reason:\x20','attempts','429874yJZJcz','isDirectory','data','Killing\x20attempt...','\x20\x20Revision:\x20','skipValidation','Listing\x20workflows...','No\x20log\x20files\x20found\x20for\x20this\x20attempt','Listing\x20workflow\x20attempts...','Delete\x20workflow\x20project\x20from\x20Treasure\x20Data','tasks','\x20workflow','getTime','startsWith','workflows','Retrying\x20attempt...','projectName','delete','json','attempt','workflow:delete','...','\x20\x20Project\x20ID:\x20','3169962JTttsj','kill','Project\x20filter:\x20','Error:\x20Project\x20name\x20or\x20ID\x20is\x20required','workflow:projects','Downloading\x20logs...','createdAt','fs/promises','resumeFrom','\x20\x20Workflow:\x20'];a33_0xfa05=function(){return _0x1f1334;};return a33_0xfa05();}import{handleSDKOutput,handleSingleObjectOutput}from'../utils/command-output.js';import{withSpinner}from'../utils/spinner.js';import{confirm}from'../utils/prompt.js';import{formatBytes}from'../utils/formatters.js';import a33_0x1168db from'prompts';export class WorkflowProjectsCommand extends BaseCommand{[a33_0x48c3d9(0xd3)]=a33_0x48c3d9(0xaa);[a33_0x48c3d9(0x12f)]=a33_0x48c3d9(0xf6);async[a33_0x48c3d9(0xd5)](_0x588de8){const _0x3620fc=a33_0x48c3d9,{options:_0x3549ef,args:_0x55beb5,tdx:_0x170dff}=_0x588de8,_0x5a12f9=_0x55beb5[0x0];try{_0x3549ef['verbose']&&_0x5a12f9&&console[_0x3620fc(0x132)](_0x3620fc(0x108)+_0x5a12f9);const _0x57b8a5=await withSpinner(_0x3620fc(0x131),()=>_0x170dff[_0x3620fc(0xfc)][_0x3620fc(0x10a)](_0x5a12f9,{'limit':_0x3549ef[_0x3620fc(0xc6)]}),{'verbose':_0x3549ef['verbose']}),_0x284b20=_0x57b8a5[_0x3620fc(0x138)];return console['error'](_0x3620fc(0xba)+_0x284b20['length']+_0x3620fc(0xf7)+(_0x284b20[_0x3620fc(0x121)]!==0x1?'s':'')),await handleSDKOutput(_0x284b20,_0x3549ef),0x0;}catch(_0x5dbd3d){if(_0x5dbd3d instanceof SDKError)return console[_0x3620fc(0x132)](_0x3620fc(0xd2)+_0x5dbd3d['message']),_0x5dbd3d[_0x3620fc(0x122)]&&console[_0x3620fc(0x132)](_0x3620fc(0xb2)+_0x5dbd3d[_0x3620fc(0x122)]),0x1;throw _0x5dbd3d;}}}export class WorkflowWorkflowsCommand extends BaseCommand{[a33_0x48c3d9(0xd3)]=a33_0x48c3d9(0x124);[a33_0x48c3d9(0x12f)]=a33_0x48c3d9(0x118);async[a33_0x48c3d9(0xd5)](_0x577329){const _0x433e26=a33_0x48c3d9,{options:_0x5b456a,args:_0x58e365,tdx:_0x35dd53}=_0x577329,_0x46a6d3=_0x58e365[0x0];try{_0x5b456a[_0x433e26(0x12a)]&&_0x46a6d3&&console[_0x433e26(0x132)](_0x433e26(0xa8)+_0x46a6d3);const _0x3d510f=await withSpinner(_0x433e26(0x13c),()=>_0x35dd53['workflow'][_0x433e26(0x144)](_0x46a6d3,{'limit':_0x5b456a[_0x433e26(0xc6)]}),{'verbose':_0x5b456a[_0x433e26(0x12a)]}),_0x5a92a6=_0x3d510f[_0x433e26(0x138)];return console[_0x433e26(0x132)]('✔\x20Found\x20'+_0x5a92a6[_0x433e26(0x121)]+_0x433e26(0x141)+(_0x5a92a6[_0x433e26(0x121)]!==0x1?'s':'')),await handleSDKOutput(_0x5a92a6,_0x5b456a),0x0;}catch(_0x5f033a){if(_0x5f033a instanceof SDKError)return console[_0x433e26(0x132)](_0x433e26(0xd2)+_0x5f033a[_0x433e26(0x12b)]),_0x5f033a[_0x433e26(0x122)]&&console['error'](_0x433e26(0xb2)+_0x5f033a[_0x433e26(0x122)]),0x1;throw _0x5f033a;}}}export class WorkflowSessionsCommand extends BaseCommand{['name']=a33_0x48c3d9(0xde);[a33_0x48c3d9(0x12f)]=a33_0x48c3d9(0x128);async[a33_0x48c3d9(0xd5)](_0x17a850){const _0x1e20dc=a33_0x48c3d9,{options:_0x5f1fbc,args:_0x190c3c,tdx:_0x3d3787}=_0x17a850;let _0x589c76,_0x567512;if(_0x190c3c[0x0]){const _0x3b203e=_0x190c3c[0x0][_0x1e20dc(0x105)]('.');if(_0x3b203e['length']===0x1)_0x589c76=_0x3b203e[0x0];else{if(_0x3b203e[_0x1e20dc(0x121)]===0x2)[_0x589c76,_0x567512]=_0x3b203e;else return console['error'](_0x1e20dc(0xbc)),0x1;}}try{if(_0x5f1fbc[_0x1e20dc(0x12a)]){if(_0x589c76&&_0x567512)console[_0x1e20dc(0x132)](_0x1e20dc(0x12c)+_0x589c76+'.'+_0x567512);else _0x589c76&&console['error'](_0x1e20dc(0xea)+_0x589c76);const _0x5e6066=_0x5f1fbc[_0x1e20dc(0x102)];_0x5e6066&&console['error'](_0x1e20dc(0xca)+_0x5e6066);}const _0x2020ab=await withSpinner(_0x1e20dc(0x10b),()=>_0x3d3787[_0x1e20dc(0xfc)][_0x1e20dc(0xb6)]({'projectName':_0x589c76,'workflowName':_0x567512,'status':_0x5f1fbc[_0x1e20dc(0x102)],'fromTime':_0x5f1fbc[_0x1e20dc(0xcb)],'toTime':_0x5f1fbc['to'],'limit':_0x5f1fbc[_0x1e20dc(0xc6)]}),{'verbose':_0x5f1fbc[_0x1e20dc(0x12a)]}),_0x5a4aeb=_0x2020ab['data'];return console[_0x1e20dc(0x132)](_0x1e20dc(0xba)+_0x5a4aeb['length']+_0x1e20dc(0xe7)+(_0x5a4aeb['length']!==0x1?'s':'')),await handleSDKOutput(_0x5a4aeb,_0x5f1fbc),0x0;}catch(_0x16e0bb){if(_0x16e0bb instanceof SDKError)return console[_0x1e20dc(0x132)](_0x1e20dc(0xd2)+_0x16e0bb['message']),_0x16e0bb[_0x1e20dc(0x122)]&&console[_0x1e20dc(0x132)](_0x1e20dc(0xb2)+_0x16e0bb[_0x1e20dc(0x122)]),0x1;throw _0x16e0bb;}}}export class WorkflowAttemptsCommand extends BaseCommand{[a33_0x48c3d9(0xd3)]=a33_0x48c3d9(0x10e);[a33_0x48c3d9(0x12f)]=a33_0x48c3d9(0xe6);async[a33_0x48c3d9(0xd5)](_0xed4504){const _0x5d0b64=a33_0x48c3d9,{options:_0x21cbdf,args:_0x484ba7,tdx:_0x14ea71}=_0xed4504;let _0x3b9699,_0x1a3204;if(_0x484ba7[0x0]){const _0x4dcac1=_0x484ba7[0x0]['split']('.');if(_0x4dcac1[_0x5d0b64(0x121)]===0x1)_0x3b9699=_0x4dcac1[0x0];else{if(_0x4dcac1[_0x5d0b64(0x121)]===0x2)[_0x3b9699,_0x1a3204]=_0x4dcac1;else return console[_0x5d0b64(0x132)](_0x5d0b64(0xbc)),0x1;}}try{const _0x382568=_0x21cbdf['includeRetried'];if(_0x21cbdf[_0x5d0b64(0x12a)]){if(_0x3b9699&&_0x1a3204)console[_0x5d0b64(0x132)](_0x5d0b64(0x12c)+_0x3b9699+'.'+_0x1a3204);else _0x3b9699&&console[_0x5d0b64(0x132)](_0x5d0b64(0xea)+_0x3b9699);_0x382568&&console[_0x5d0b64(0x132)]('Include\x20retried:\x20yes');}const _0x54575d=await withSpinner(_0x5d0b64(0x13e),()=>_0x14ea71[_0x5d0b64(0xfc)][_0x5d0b64(0x135)]({'projectName':_0x3b9699,'workflowName':_0x1a3204,'includeRetried':_0x382568,'limit':_0x21cbdf['limit']}),{'verbose':_0x21cbdf['verbose']}),_0x2804e7=_0x54575d[_0x5d0b64(0x138)];return console[_0x5d0b64(0x132)](_0x5d0b64(0xba)+_0x2804e7['length']+_0x5d0b64(0xe3)+(_0x2804e7['length']!==0x1?'s':'')),await handleSDKOutput(_0x2804e7,_0x21cbdf),0x0;}catch(_0x2801fc){if(_0x2801fc instanceof SDKError)return console[_0x5d0b64(0x132)](_0x5d0b64(0xd2)+_0x2801fc[_0x5d0b64(0x12b)]),_0x2801fc['cause']&&console[_0x5d0b64(0x132)](_0x5d0b64(0xb2)+_0x2801fc[_0x5d0b64(0x122)]),0x1;throw _0x2801fc;}}}export class WorkflowAttemptCommand extends BaseCommand{['name']='workflow:attempt';['description']=a33_0x48c3d9(0x129);async[a33_0x48c3d9(0xd5)](_0x1332aa){const _0x219213=a33_0x48c3d9,{options:_0x335465,args:_0x2679c0,tdx:_0x2a2bef}=_0x1332aa,_0x17973f=_0x2679c0[0x0];if(!_0x17973f)return console['error'](_0x219213(0x126)),0x1;try{_0x335465[_0x219213(0x12a)]&&console['error'](_0x219213(0xb8)+_0x17973f);const _0x77eae9=await withSpinner(_0x219213(0xb0),()=>_0x2a2bef[_0x219213(0xfc)][_0x219213(0xa2)](_0x17973f),{'verbose':_0x335465[_0x219213(0x12a)]}),_0x152a16=_0x77eae9[_0x219213(0x138)];let _0x206178;!_0x152a16[_0x219213(0xec)]?_0x206178=_0x152a16['cancelRequested']?_0x219213(0xed):_0x219213(0xe0):_0x206178=_0x152a16[_0x219213(0x107)]?'success':_0x219213(0x132);let _0x48f20a;if(_0x152a16[_0x219213(0xac)]&&_0x152a16[_0x219213(0x119)]){const _0x5a9c9f=new Date(_0x152a16[_0x219213(0xac)])['getTime'](),_0x3fd334=new Date(_0x152a16['finishedAt'])[_0x219213(0x142)]();_0x48f20a=Math[_0x219213(0x101)]((_0x3fd334-_0x5a9c9f)/0x3e8);}const _0xbc3869={'attempt_id':_0x152a16['id'],'status':_0x206178,..._0x152a16[_0x219213(0xbb)]!==undefined&&{'index':_0x152a16[_0x219213(0xbb)]},..._0x152a16['project']&&{'project':_0x152a16[_0x219213(0x114)]['name']},..._0x152a16['workflow']&&{'workflow':_0x152a16['workflow'][_0x219213(0xd3)]},..._0x152a16[_0x219213(0x11c)]&&{'session_id':_0x152a16[_0x219213(0x11c)]},..._0x152a16[_0x219213(0xbf)]&&{'session_time':_0x152a16[_0x219213(0xbf)]},..._0x152a16[_0x219213(0xfd)]&&{'retry_attempt':_0x152a16[_0x219213(0xfd)]},..._0x48f20a!==undefined&&{'duration_sec':_0x48f20a},..._0x152a16['createdAt']&&{'created_at':_0x152a16[_0x219213(0xac)]},..._0x152a16[_0x219213(0x119)]&&{'finished_at':_0x152a16[_0x219213(0x119)]},...Object[_0x219213(0xd4)](_0x152a16[_0x219213(0xcc)])[_0x219213(0x121)]>0x0&&{'params':_0x152a16[_0x219213(0xcc)]}};return await handleSingleObjectOutput(_0xbc3869,_0x335465),0x0;}catch(_0x47e241){if(_0x47e241 instanceof SDKError)return console[_0x219213(0x132)](_0x219213(0xd2)+_0x47e241[_0x219213(0x12b)]),_0x47e241['cause']&&console[_0x219213(0x132)](_0x219213(0xb2)+_0x47e241[_0x219213(0x122)]),0x1;throw _0x47e241;}}}export class WorkflowTasksCommand extends BaseCommand{[a33_0x48c3d9(0xd3)]='workflow:tasks';[a33_0x48c3d9(0x12f)]=a33_0x48c3d9(0xf2);async[a33_0x48c3d9(0xd5)](_0x1fadd5){const _0x57a1d5=a33_0x48c3d9,{options:_0x1aa160,args:_0x14ea4c,tdx:_0x3cf404}=_0x1fadd5,_0x218ec1=_0x14ea4c[0x0];if(!_0x218ec1)return console[_0x57a1d5(0x132)](_0x57a1d5(0x126)),0x1;try{const _0x265350=_0x1aa160[_0x57a1d5(0xc8)];_0x1aa160[_0x57a1d5(0x12a)]&&(console[_0x57a1d5(0x132)]('Attempt\x20ID:\x20'+_0x218ec1),_0x265350&&console['error'](_0x57a1d5(0x125)));const _0x275ab6=await withSpinner(_0x57a1d5(0xdf),()=>_0x3cf404[_0x57a1d5(0xfc)][_0x57a1d5(0x140)](_0x218ec1,_0x265350||![]),{'verbose':_0x1aa160[_0x57a1d5(0x12a)]}),_0x39ac4a=_0x275ab6[_0x57a1d5(0x138)];return console['error']('✔\x20Found\x20'+_0x39ac4a[_0x57a1d5(0x121)]+'\x20task'+(_0x39ac4a[_0x57a1d5(0x121)]!==0x1?'s':'')),await handleSDKOutput(_0x39ac4a,_0x1aa160),0x0;}catch(_0x2add6f){if(_0x2add6f instanceof SDKError)return console['error'](_0x57a1d5(0xd2)+_0x2add6f[_0x57a1d5(0x12b)]),_0x2add6f['cause']&&console['error'](_0x57a1d5(0xb2)+_0x2add6f['cause']),0x1;throw _0x2add6f;}}}export class WorkflowLogsCommand extends BaseCommand{[a33_0x48c3d9(0xd3)]=a33_0x48c3d9(0xcf);[a33_0x48c3d9(0x12f)]=a33_0x48c3d9(0x120);async[a33_0x48c3d9(0xd5)](_0x3a1c65){const _0x505d17=a33_0x48c3d9,{options:_0x12e3e3,args:_0x57f56e,tdx:_0x3a6022}=_0x3a1c65,_0x280573=_0x57f56e[0x0];let _0x279987=_0x57f56e[0x1];if(!_0x280573)return console[_0x505d17(0x132)](_0x505d17(0x126)),0x1;try{_0x12e3e3['verbose']&&(console[_0x505d17(0x132)]('Attempt\x20ID:\x20'+_0x280573),_0x279987&&console[_0x505d17(0x132)](_0x505d17(0x130)+_0x279987));const _0x49414b=await withSpinner('Fetching\x20log\x20files...',()=>_0x3a6022['workflow'][_0x505d17(0xc7)](_0x280573,_0x279987),{'verbose':_0x12e3e3[_0x505d17(0x12a)]}),_0x399b2a=_0x49414b[_0x505d17(0x138)];if(_0x399b2a['length']===0x0)return console[_0x505d17(0x132)](_0x505d17(0x13d)),0x0;if(!_0x279987&&(_0x12e3e3[_0x505d17(0xa1)]||_0x12e3e3[_0x505d17(0xe4)]))return await handleSDKOutput(_0x399b2a,_0x12e3e3),0x0;if(!_0x279987){const _0x8e0e04=_0x399b2a['map'](_0x547490=>({'title':_0x547490[_0x505d17(0xb1)]+'\x20('+formatBytes(_0x547490['fileSize'])+')','value':_0x547490[_0x505d17(0xb1)]})),_0x40db2d=await a33_0x1168db({'type':_0x505d17(0xd6),'name':_0x505d17(0xf5),'message':_0x505d17(0xe8),'choices':_0x8e0e04});if(!_0x40db2d[_0x505d17(0xf5)])return console[_0x505d17(0x132)](_0x505d17(0xb9)),0x0;_0x279987=_0x40db2d[_0x505d17(0xf5)];}const _0x44d221=await withSpinner(_0x505d17(0xab),()=>_0x3a6022[_0x505d17(0xfc)][_0x505d17(0xc4)](_0x280573,_0x279987),{'verbose':_0x12e3e3['verbose']}),_0x44ef3c=_0x44d221[_0x505d17(0x138)];return _0x44ef3c?console[_0x505d17(0xe1)](_0x44ef3c):console['error'](_0x505d17(0xfb)),0x0;}catch(_0x47f371){if(_0x47f371 instanceof SDKError)return console['error'](_0x505d17(0xd2)+_0x47f371[_0x505d17(0x12b)]),_0x47f371[_0x505d17(0x122)]&&console['error'](_0x505d17(0xb2)+_0x47f371['cause']),0x1;throw _0x47f371;}}}export class WorkflowKillCommand extends BaseCommand{[a33_0x48c3d9(0xd3)]='workflow:kill';[a33_0x48c3d9(0x12f)]=a33_0x48c3d9(0xbd);async[a33_0x48c3d9(0xd5)](_0x5b4ad9){const _0x52b8d2=a33_0x48c3d9,{options:_0xfa7999,args:_0x33f995,tdx:_0x1ab792}=_0x5b4ad9,_0x5bc8d3=_0x33f995[0x0];if(!_0x5bc8d3)return console[_0x52b8d2(0x132)](_0x52b8d2(0x126)),0x1;try{const _0x4be424=_0xfa7999['reason'];_0xfa7999[_0x52b8d2(0x12a)]&&(console[_0x52b8d2(0x132)](_0x52b8d2(0xb8)+_0x5bc8d3),_0x4be424&&console[_0x52b8d2(0x132)](_0x52b8d2(0x134)+_0x4be424));if(!_0xfa7999[_0x52b8d2(0x11f)]){const _0x1bebe7=await confirm(_0x52b8d2(0xb4)+_0x5bc8d3+'?');if(!_0x1bebe7)return console['error'](_0x52b8d2(0xb9)),0x0;}const _0x50ebf0=await withSpinner(_0x52b8d2(0x139),()=>_0x1ab792[_0x52b8d2(0xfc)][_0x52b8d2(0xa7)](_0x5bc8d3,_0x4be424),{'verbose':_0xfa7999[_0x52b8d2(0x12a)]}),_0x131291=_0x50ebf0['data'];return console[_0x52b8d2(0x132)]('✔\x20'+_0x131291),0x0;}catch(_0x101b89){if(_0x101b89 instanceof SDKError)return console['error'](_0x52b8d2(0xd2)+_0x101b89[_0x52b8d2(0x12b)]),_0x101b89[_0x52b8d2(0x122)]&&console[_0x52b8d2(0x132)](_0x52b8d2(0xb2)+_0x101b89[_0x52b8d2(0x122)]),0x1;throw _0x101b89;}}}export class WorkflowRetryCommand extends BaseCommand{[a33_0x48c3d9(0xd3)]=a33_0x48c3d9(0xc5);[a33_0x48c3d9(0x12f)]='Retry\x20a\x20session\x20or\x20attempt';async['execute'](_0x1ca467){const _0x5e6e09=a33_0x48c3d9,{options:_0x278a46,args:_0x3a8a69,tdx:_0x59ba07}=_0x1ca467,_0x620549=_0x3a8a69[0x0];if(!_0x620549)return console['error']('Error:\x20Session\x20ID\x20or\x20attempt\x20ID\x20is\x20required'),console[_0x5e6e09(0x132)](_0x5e6e09(0x115)),0x1;let _0x5234f9=![],_0x21397a=_0x620549;if(_0x620549[_0x5e6e09(0x143)]('session:'))_0x5234f9=!![],_0x21397a=_0x620549['substring'](0x8);else{if(_0x620549[_0x5e6e09(0x143)](_0x5e6e09(0xb3)))_0x5234f9=![],_0x21397a=_0x620549[_0x5e6e09(0x11a)](0x8);else return console[_0x5e6e09(0x132)](_0x5e6e09(0xf0)),console[_0x5e6e09(0x132)](_0x5e6e09(0x115)),0x1;}try{const _0x287825=_0x278a46[_0x5e6e09(0xce)],_0x2b2980=_0x278a46[_0x5e6e09(0xae)],_0x21c983=_0x278a46[_0x5e6e09(0xcc)],_0x19f7e1=_0x278a46['force'];_0x278a46[_0x5e6e09(0x12a)]&&(console[_0x5e6e09(0x132)]('Target:\x20'+(_0x5234f9?_0x5e6e09(0x10d):_0x5e6e09(0xa2))+'\x20'+_0x21397a),_0x287825&&console['error']('From\x20task:\x20'+_0x287825),_0x2b2980&&console[_0x5e6e09(0x132)](_0x5e6e09(0xd9)+_0x2b2980),_0x21c983&&console['error']('Params:\x20'+_0x21c983),_0x19f7e1&&console[_0x5e6e09(0x132)]('Force:\x20yes'));let _0x517df1;if(_0x21c983)try{if(_0x21c983[_0x5e6e09(0x143)]('@')){const _0x33069a=await import(_0x5e6e09(0xad)),_0x39a851=_0x21c983[_0x5e6e09(0x11a)](0x1),_0x1aafe8=await _0x33069a[_0x5e6e09(0x112)](_0x39a851,_0x5e6e09(0xe9));_0x517df1=JSON[_0x5e6e09(0xe5)](_0x1aafe8);}else _0x517df1=JSON[_0x5e6e09(0xe5)](_0x21c983);}catch{return console[_0x5e6e09(0x132)](_0x5e6e09(0xf9)),0x1;}if(!_0x278a46[_0x5e6e09(0x11f)]){const _0x4e4750=await confirm(_0x5e6e09(0xff)+(_0x5234f9?_0x5e6e09(0x10d):'attempt')+'\x20'+_0x21397a+'?');if(!_0x4e4750)return console[_0x5e6e09(0x132)](_0x5e6e09(0xb9)),0x0;}let _0x5aba2e;_0x5234f9?_0x5aba2e=await withSpinner(_0x5e6e09(0x100),()=>_0x59ba07['workflow'][_0x5e6e09(0xdc)](_0x21397a,{'fromTask':_0x287825,'retryParams':_0x517df1}),{'verbose':_0x278a46['verbose']}):_0x5aba2e=await withSpinner(_0x5e6e09(0x9e),()=>_0x59ba07[_0x5e6e09(0xfc)]['retryAttempt'](_0x21397a,{'resumeFrom':_0x2b2980,'retryParams':_0x517df1,'force':_0x19f7e1}),{'verbose':_0x278a46['verbose']});const _0x5f4021=_0x5aba2e['data'];return console[_0x5e6e09(0x132)](_0x5e6e09(0xda)),console['error'](_0x5e6e09(0xd0)+_0x5f4021['attemptId']),console[_0x5e6e09(0x132)](_0x5e6e09(0x116)+_0x5f4021['sessionId']),0x0;}catch(_0x18e5ed){if(_0x18e5ed instanceof SDKError)return console[_0x5e6e09(0x132)](_0x5e6e09(0xd2)+_0x18e5ed[_0x5e6e09(0x12b)]),_0x18e5ed[_0x5e6e09(0x122)]&&console[_0x5e6e09(0x132)](_0x5e6e09(0xb2)+_0x18e5ed[_0x5e6e09(0x122)]),0x1;throw _0x18e5ed;}}}export class WorkflowRunCommand extends BaseCommand{[a33_0x48c3d9(0xd3)]=a33_0x48c3d9(0x111);[a33_0x48c3d9(0x12f)]=a33_0x48c3d9(0xe2);async[a33_0x48c3d9(0xd5)](_0x4dc74c){const _0x3050d6=a33_0x48c3d9,{options:_0x51f998,args:_0x1be16e,tdx:_0x29f903}=_0x4dc74c,_0x4127a3=_0x1be16e[0x0];if(!_0x4127a3)return console[_0x3050d6(0x132)](_0x3050d6(0x11e)),console['error']('Usage:\x20workflow\x20run\x20<project.workflow>\x20[options]'),0x1;const _0xee8cde=_0x51f998[_0x3050d6(0x10f)],_0x3691e3=_0x51f998[_0x3050d6(0xbf)],_0x27142a={};if(_0xee8cde&&Array[_0x3050d6(0xc2)](_0xee8cde))for(const _0x5a61a7 of _0xee8cde){const _0x263c7b=_0x5a61a7['indexOf']('=');if(_0x263c7b===-0x1)return console[_0x3050d6(0x132)]('Error:\x20Invalid\x20parameter\x20format:\x20'+_0x5a61a7),console[_0x3050d6(0x132)](_0x3050d6(0x12e)),0x1;const _0x251000=_0x5a61a7[_0x3050d6(0x11a)](0x0,_0x263c7b),_0x166821=_0x5a61a7[_0x3050d6(0x11a)](_0x263c7b+0x1);try{_0x27142a[_0x251000]=JSON[_0x3050d6(0xe5)](_0x166821);}catch{_0x27142a[_0x251000]=_0x166821;}}_0x51f998['verbose']&&(console['error']('Workflow:\x20'+_0x4127a3),Object[_0x3050d6(0xd4)](_0x27142a)[_0x3050d6(0x121)]>0x0&&console['error'](_0x3050d6(0xf4)+JSON['stringify'](_0x27142a)),_0x3691e3&&console[_0x3050d6(0x132)](_0x3050d6(0xc3)+_0x3691e3));const _0x5725fc=await withSpinner(_0x3050d6(0x12d),()=>_0x29f903['workflow'][_0x3050d6(0x110)](_0x4127a3,_0x27142a,{'sessionTime':_0x3691e3}),{'verbose':_0x51f998[_0x3050d6(0x12a)]}),_0x15426b=_0x5725fc[_0x3050d6(0x138)];return console[_0x3050d6(0x132)](_0x3050d6(0x109)),console[_0x3050d6(0x132)](_0x3050d6(0xeb)+_0x15426b['id']),console[_0x3050d6(0x132)]('\x20\x20Session\x20ID:\x20'+_0x15426b['sessionId']),console[_0x3050d6(0x132)](_0x3050d6(0xc9)+_0x15426b[_0x3050d6(0x114)]?.['name']),console[_0x3050d6(0x132)](_0x3050d6(0xaf)+_0x15426b[_0x3050d6(0xfc)]?.[_0x3050d6(0xd3)]),0x0;}}function a33_0x305a(_0x3718da,_0x438f1c){const _0xfa050e=a33_0xfa05();return a33_0x305a=function(_0x305a52,_0xe83703){_0x305a52=_0x305a52-0x9e;let _0xc6fd85=_0xfa050e[_0x305a52];return _0xc6fd85;},a33_0x305a(_0x3718da,_0x438f1c);}export class WorkflowDownloadCommand extends BaseCommand{[a33_0x48c3d9(0xd3)]=a33_0x48c3d9(0xbe);['description']='Download\x20workflow\x20project\x20from\x20Treasure\x20Data';async[a33_0x48c3d9(0xd5)](_0x597f83){const _0x5f4278=a33_0x48c3d9,{options:_0x470812,args:_0x95f041,tdx:_0x3e5880}=_0x597f83,_0x4b71bc=_0x95f041[0x0],_0x43c34a=_0x95f041[0x1]||'.';if(!_0x4b71bc)return console[_0x5f4278(0x132)]('Error:\x20Project\x20name\x20is\x20required'),console[_0x5f4278(0x132)](_0x5f4278(0x123)),0x1;const _0x31be0a=_0x470812[_0x5f4278(0xf8)];_0x470812['verbose']&&(console[_0x5f4278(0x132)]('Project:\x20'+_0x4b71bc),console['error'](_0x5f4278(0xc0)+_0x43c34a),_0x31be0a&&console[_0x5f4278(0x132)](_0x5f4278(0x117)+_0x31be0a));const _0x438fb2=await withSpinner(_0x5f4278(0x11b)+_0x4b71bc+_0x5f4278(0xa4),()=>_0x3e5880['workflow']['download'](_0x4b71bc,_0x43c34a,{'revision':_0x31be0a}),{'verbose':_0x470812[_0x5f4278(0x12a)]}),_0x1fc01d=_0x438fb2['data'];return console[_0x5f4278(0x132)]('✔\x20Downloaded\x20'+_0x1fc01d[_0x5f4278(0x9f)]),console[_0x5f4278(0x132)](_0x5f4278(0x13a)+_0x1fc01d['revision']),console[_0x5f4278(0x132)](_0x5f4278(0xd8)+_0x1fc01d[_0x5f4278(0xd7)]),console['error'](_0x5f4278(0xef)+_0x43c34a+'/'+_0x1fc01d[_0x5f4278(0x9f)]),0x0;}}export class WorkflowPushCommand extends BaseCommand{[a33_0x48c3d9(0xd3)]=a33_0x48c3d9(0x10c);[a33_0x48c3d9(0x12f)]='Push\x20workflow\x20project\x20to\x20Treasure\x20Data';async[a33_0x48c3d9(0xd5)](_0x31d51f){const _0x35fdb2=a33_0x48c3d9,{options:_0x5b78e7,args:_0x34c444,tdx:_0x4425ca}=_0x31d51f;let _0x66505='.',_0x47b163=_0x5b78e7['name'];if(_0x34c444[0x0]){const {promises:_0x7615f}=await import('fs');try{const _0x1c4743=await _0x7615f[_0x35fdb2(0xb5)](_0x34c444[0x0]);if(_0x1c4743[_0x35fdb2(0x137)]())_0x66505=_0x34c444[0x0];else return console['error'](_0x35fdb2(0xd2)+_0x34c444[0x0]+_0x35fdb2(0x104)),0x1;}catch{_0x47b163=_0x34c444[0x0],_0x66505='.';}}const _0x36bf69=_0x5b78e7[_0x35fdb2(0xf8)],_0x3ff6aa=_0x5b78e7[_0x35fdb2(0x13b)];_0x5b78e7[_0x35fdb2(0x12a)]&&(console['error'](_0x35fdb2(0xcd)+_0x66505),_0x47b163&&console[_0x35fdb2(0x132)]('Project\x20name:\x20'+_0x47b163),_0x36bf69&&console[_0x35fdb2(0x132)](_0x35fdb2(0x117)+_0x36bf69),_0x3ff6aa&&console['error'](_0x35fdb2(0x133)));const _0x3501b0=await withSpinner(_0x35fdb2(0xf3),()=>_0x4425ca[_0x35fdb2(0xfc)][_0x35fdb2(0x106)](_0x66505,{'projectName':_0x47b163,'revision':_0x36bf69,'skipValidation':_0x3ff6aa}),{'verbose':_0x5b78e7[_0x35fdb2(0x12a)]}),_0xc1b913=_0x3501b0['data'];return console[_0x35fdb2(0x132)](_0x35fdb2(0x11d)+_0xc1b913[_0x35fdb2(0x9f)]),console[_0x35fdb2(0x132)]('\x20\x20Project\x20ID:\x20'+_0xc1b913['projectId']),console[_0x35fdb2(0x132)](_0x35fdb2(0x13a)+_0xc1b913[_0x35fdb2(0xf8)]),0x0;}}export class WorkflowDeleteCommand extends BaseCommand{['name']=a33_0x48c3d9(0xa3);['description']=a33_0x48c3d9(0x13f);async[a33_0x48c3d9(0xd5)](_0x2906a6){const _0x251bb3=a33_0x48c3d9,{options:_0x486199,args:_0x3f7fa2,tdx:_0x4995d6}=_0x2906a6,_0x3f3c67=_0x3f7fa2[0x0];if(!_0x3f3c67)return console['error'](_0x251bb3(0xa9)),console['error'](_0x251bb3(0xfe)),0x1;_0x486199['verbose']&&console['error']('Project:\x20'+_0x3f3c67);if(!_0x486199[_0x251bb3(0x11f)]){const _0x1d35ab=await confirm(_0x251bb3(0xd1)+_0x3f3c67+'\x22?\x20This\x20cannot\x20be\x20undone.');if(!_0x1d35ab)return console[_0x251bb3(0x132)]('Cancelled'),0x0;}const _0xf68021=await withSpinner(_0x251bb3(0x127)+_0x3f3c67+_0x251bb3(0xa4),()=>_0x4995d6[_0x251bb3(0xfc)][_0x251bb3(0xa0)](_0x3f3c67),{'verbose':_0x486199[_0x251bb3(0x12a)]}),_0x512199=_0xf68021['data'];return console[_0x251bb3(0x132)](_0x251bb3(0xdb)+_0x512199[_0x251bb3(0x9f)]),console['error'](_0x251bb3(0xa5)+_0x512199[_0x251bb3(0xfa)]),0x0;}}
package/dist/core/auth.js CHANGED
@@ -1 +1 @@
1
- (function(_0x28ae81,_0x363b9a){const _0x3980bb=a34_0x121f,_0x454eb5=_0x28ae81();while(!![]){try{const _0xab65fd=parseInt(_0x3980bb(0x10b))/0x1+-parseInt(_0x3980bb(0xfd))/0x2*(-parseInt(_0x3980bb(0x105))/0x3)+parseInt(_0x3980bb(0xfb))/0x4+parseInt(_0x3980bb(0xfe))/0x5*(-parseInt(_0x3980bb(0x106))/0x6)+parseInt(_0x3980bb(0x109))/0x7*(parseInt(_0x3980bb(0x107))/0x8)+-parseInt(_0x3980bb(0x10a))/0x9+-parseInt(_0x3980bb(0xfa))/0xa;if(_0xab65fd===_0x363b9a)break;else _0x454eb5['push'](_0x454eb5['shift']());}catch(_0x3065a1){_0x454eb5['push'](_0x454eb5['shift']());}}}(a34_0x5a67,0xaa5b6));import{platform}from'os';function a34_0x5a67(){const _0x56f0ff=['16222YvnImT','212885uGegNR','../../package.json','entries','url','replace','length','version','90RcOKLy','102YcmhoC','40DgBzit','utf-8','1780555KZeBbu','9593037pxDeAc','1015745dmYjSE','X-Trino-User','Authorization','parse','TD1\x20','4291240XChXXb','1542832RMNpgR','tdx'];a34_0x5a67=function(){return _0x56f0ff;};return a34_0x5a67();}import{readFileSync}from'fs';import{fileURLToPath}from'url';function a34_0x121f(_0x51a9bf,_0x306fff){const _0x5a6787=a34_0x5a67();return a34_0x121f=function(_0x121f90,_0x5b7268){_0x121f90=_0x121f90-0xf9;let _0x53c2a9=_0x5a6787[_0x121f90];return _0x53c2a9;},a34_0x121f(_0x51a9bf,_0x306fff);}import{dirname,join}from'path';import{getAPIKey}from'./config.js';export function getVersion(){const _0x30c511=a34_0x121f;try{const _0x1f970b=fileURLToPath(import.meta[_0x30c511(0x101)]),_0x7867c9=dirname(_0x1f970b),_0x365254=join(_0x7867c9,_0x30c511(0xff)),_0x211a98=JSON[_0x30c511(0x10e)](readFileSync(_0x365254,_0x30c511(0x108)));return _0x211a98[_0x30c511(0x104)];}catch{return'0.0.0';}}export function getUserAgent(){const _0xc93d49=a34_0x121f,_0x34c844=getVersion(),_0x5e5148=platform(),_0x324fa9=process[_0xc93d49(0x104)][_0xc93d49(0x102)]('v','');return'tdx/'+_0x34c844+'\x20('+_0x5e5148+';\x20node/'+_0x324fa9+')';}export function getAuthHeaders(_0x21fcf5,_0x40ae4b){const _0x5d0a91=a34_0x121f,_0x4ce974=getVersion(),_0x180ab9={'User-Agent':getUserAgent(),'X-TD-Client':_0x5d0a91(0xfc),'X-TD-Client-Version':_0x4ce974};return _0x40ae4b&&(_0x180ab9['Authorization']=_0x5d0a91(0xf9)+_0x40ae4b),_0x180ab9;}export function toHeaderRecord(_0x1af5d7){const _0x5a937c=a34_0x121f,_0x2f539b={};for(const [_0x52520c,_0x76d6e0]of Object[_0x5a937c(0x100)](_0x1af5d7)){_0x76d6e0!==undefined&&(_0x2f539b[_0x52520c]=_0x76d6e0);}return _0x2f539b;}export function getTrinoHeaders(_0x5de150,_0x385e9b){const _0x4ecb38=a34_0x121f,_0x47d47d=getAuthHeaders(_0x5de150,_0x385e9b),_0x1baa90=toHeaderRecord(_0x47d47d);return delete _0x1baa90[_0x4ecb38(0x10d)],_0x385e9b&&(_0x1baa90[_0x4ecb38(0x10c)]=_0x385e9b),_0x1baa90;}export function hasAPIKey(_0x2b388c){const _0x451050=a34_0x121f,_0x3bad6f=getAPIKey(_0x2b388c);return _0x3bad6f!==undefined&&_0x3bad6f[_0x451050(0x103)]>0x0;}
1
+ (function(_0x8de3,_0x5c8269){const _0x4d8651=a34_0x3d75,_0x4dbaed=_0x8de3();while(!![]){try{const _0x13e9a6=-parseInt(_0x4d8651(0x95))/0x1*(-parseInt(_0x4d8651(0x99))/0x2)+-parseInt(_0x4d8651(0xa4))/0x3+-parseInt(_0x4d8651(0x97))/0x4*(-parseInt(_0x4d8651(0x92))/0x5)+-parseInt(_0x4d8651(0x9b))/0x6*(parseInt(_0x4d8651(0x9d))/0x7)+parseInt(_0x4d8651(0x98))/0x8+-parseInt(_0x4d8651(0xa7))/0x9+parseInt(_0x4d8651(0xa0))/0xa*(parseInt(_0x4d8651(0x91))/0xb);if(_0x13e9a6===_0x5c8269)break;else _0x4dbaed['push'](_0x4dbaed['shift']());}catch(_0x16d2df){_0x4dbaed['push'](_0x4dbaed['shift']());}}}(a34_0x55f5,0x79293));function a34_0x55f5(){const _0x4ca923=['version','tdx/','7LcgGwg','parse','976264cQkeNr','246640QSOSpr','197000RkMyoq','url','54LUxJFB','utf-8','46347EbuxGF','../../package.json','TD1\x20','230WQJxci',';\x20node/','replace','Authorization','1925373IjzRJr','entries','0.0.0','7730271slPnZk','522346gZuPwe','5dQMBHX'];a34_0x55f5=function(){return _0x4ca923;};return a34_0x55f5();}import{platform}from'os';function a34_0x3d75(_0x5e2daf,_0x4ebbbf){const _0x55f543=a34_0x55f5();return a34_0x3d75=function(_0x3d75e5,_0x5e4a4e){_0x3d75e5=_0x3d75e5-0x91;let _0x579231=_0x55f543[_0x3d75e5];return _0x579231;},a34_0x3d75(_0x5e2daf,_0x4ebbbf);}import{readFileSync}from'fs';import{fileURLToPath}from'url';import{dirname,join}from'path';import{getAPIKey}from'./config.js';export function getVersion(){const _0x187c8b=a34_0x3d75;try{const _0x41fdcd=fileURLToPath(import.meta[_0x187c8b(0x9a)]),_0x436639=dirname(_0x41fdcd),_0x47c047=join(_0x436639,_0x187c8b(0x9e)),_0x18de1c=JSON[_0x187c8b(0x96)](readFileSync(_0x47c047,_0x187c8b(0x9c)));return _0x18de1c[_0x187c8b(0x93)];}catch{return _0x187c8b(0xa6);}}export function getUserAgent(){const _0x49b379=a34_0x3d75,_0x53ecda=getVersion(),_0x293b50=platform(),_0xf07140=process[_0x49b379(0x93)][_0x49b379(0xa2)]('v','');return _0x49b379(0x94)+_0x53ecda+'\x20('+_0x293b50+_0x49b379(0xa1)+_0xf07140+')';}export function getAuthHeaders(_0x17a392,_0x58c2f7){const _0x321ccb=a34_0x3d75,_0x2619f7=getVersion(),_0x5af15a={'User-Agent':getUserAgent(),'X-TD-Client':'tdx','X-TD-Client-Version':_0x2619f7};return _0x58c2f7&&(_0x5af15a[_0x321ccb(0xa3)]=_0x321ccb(0x9f)+_0x58c2f7),_0x5af15a;}export function toHeaderRecord(_0x39575b){const _0x7cc04c=a34_0x3d75,_0x30b3c0={};for(const [_0x4332f6,_0xd89715]of Object[_0x7cc04c(0xa5)](_0x39575b)){_0xd89715!==undefined&&(_0x30b3c0[_0x4332f6]=_0xd89715);}return _0x30b3c0;}export function getTrinoHeaders(_0x3a89e1,_0x5e0493){const _0x48812e=a34_0x3d75,_0x354580=getAuthHeaders(_0x3a89e1,_0x5e0493),_0x62b5cd=toHeaderRecord(_0x354580);return delete _0x62b5cd[_0x48812e(0xa3)],_0x5e0493&&(_0x62b5cd['X-Trino-User']=_0x5e0493),_0x62b5cd;}export function hasAPIKey(_0x2b3cec){const _0x373966=getAPIKey(_0x2b3cec);return _0x373966!==undefined&&_0x373966['length']>0x0;}