@treasuredata/tdx 0.1.19 → 0.1.20

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 (87) hide show
  1. package/README.md +1 -1
  2. package/dist/cli.js +1 -1
  3. package/dist/cli.js.map +1 -1
  4. package/dist/client/cdp-client.js +1 -1
  5. package/dist/client/http-client.js +1 -1
  6. package/dist/client/llm-client.js +1 -1
  7. package/dist/client/rate-limiter.js +1 -1
  8. package/dist/client/td-client.js +1 -1
  9. package/dist/client/trino-client.js +1 -1
  10. package/dist/client/workflow-client.js +1 -1
  11. package/dist/commands/activations.js +1 -1
  12. package/dist/commands/api-command.js +1 -1
  13. package/dist/commands/chat-command.js +1 -1
  14. package/dist/commands/claude-command.js +1 -1
  15. package/dist/commands/command.js +1 -1
  16. package/dist/commands/context-command.js +1 -1
  17. package/dist/commands/databases.js +1 -1
  18. package/dist/commands/describe.js +1 -1
  19. package/dist/commands/job-command.js +1 -1
  20. package/dist/commands/llm-command.js +1 -1
  21. package/dist/commands/llm-proxy.js +1 -1
  22. package/dist/commands/parent-segment-command.js +1 -1
  23. package/dist/commands/profiles-command.js +1 -1
  24. package/dist/commands/query-command.js +1 -1
  25. package/dist/commands/segment-command.js +1 -1
  26. package/dist/commands/segment-create-command.js +1 -1
  27. package/dist/commands/segment-fields-command.js +1 -1
  28. package/dist/commands/segment-pwd-command.js +1 -1
  29. package/dist/commands/segment-update-command.js +1 -1
  30. package/dist/commands/segment-use-command.js +1 -1
  31. package/dist/commands/segments.js +1 -1
  32. package/dist/commands/show.js +1 -1
  33. package/dist/commands/tables.js +1 -1
  34. package/dist/commands/use-command.js +1 -1
  35. package/dist/commands/workflow-command.js +1 -1
  36. package/dist/core/auth.js +1 -1
  37. package/dist/core/config.js +1 -1
  38. package/dist/core/global-context.js +1 -1
  39. package/dist/core/profile.js +1 -1
  40. package/dist/core/project-config.js +1 -1
  41. package/dist/core/session.js +1 -1
  42. package/dist/index.js +1 -1
  43. package/dist/proxy/anthropic-adapter.d.ts.map +1 -1
  44. package/dist/proxy/anthropic-adapter.js +1 -1
  45. package/dist/proxy/anthropic-adapter.js.map +1 -1
  46. package/dist/proxy/server.d.ts.map +1 -1
  47. package/dist/proxy/server.js +1 -1
  48. package/dist/proxy/server.js.map +1 -1
  49. package/dist/sdk/api.js +1 -1
  50. package/dist/sdk/database.js +1 -1
  51. package/dist/sdk/errors.d.ts +3 -1
  52. package/dist/sdk/errors.d.ts.map +1 -1
  53. package/dist/sdk/errors.js +1 -1
  54. package/dist/sdk/errors.js.map +1 -1
  55. package/dist/sdk/index.js +1 -1
  56. package/dist/sdk/job.js +1 -1
  57. package/dist/sdk/llm.js +1 -1
  58. package/dist/sdk/query.js +1 -1
  59. package/dist/sdk/segment.js +1 -1
  60. package/dist/sdk/table.js +1 -1
  61. package/dist/sdk/workflow.js +1 -1
  62. package/dist/types/endpoints.js +1 -1
  63. package/dist/types/index.js +1 -1
  64. package/dist/utils/agent-ref-parser.js +1 -1
  65. package/dist/utils/chat-cache.js +1 -1
  66. package/dist/utils/colors.js +1 -1
  67. package/dist/utils/command-output.js +1 -1
  68. package/dist/utils/file-permissions.js +1 -1
  69. package/dist/utils/format-detector.js +1 -1
  70. package/dist/utils/formatters.js +1 -1
  71. package/dist/utils/json-loader.js +1 -1
  72. package/dist/utils/model-aliases.js +1 -1
  73. package/dist/utils/option-validation.js +1 -1
  74. package/dist/utils/port.js +1 -1
  75. package/dist/utils/process.js +1 -1
  76. package/dist/utils/prompt.js +1 -1
  77. package/dist/utils/segment-path-parser.js +1 -1
  78. package/dist/utils/segment-ref-parser.js +1 -1
  79. package/dist/utils/spinner.js +1 -1
  80. package/dist/utils/sql-parser.js +1 -1
  81. package/dist/utils/sse-parser.js +1 -1
  82. package/dist/utils/string-utils.js +1 -1
  83. package/dist/utils/table-ref-parser.js +1 -1
  84. package/dist/utils/tree-formatter.js +1 -1
  85. package/dist/utils/version-check.js +1 -1
  86. package/dist/utils/workflow-utils.js +1 -1
  87. package/package.json +1 -1
@@ -1 +1 @@
1
- function a23_0x2a18(_0x184c67,_0x54b034){const _0x9a2c83=a23_0x9a2c();return a23_0x2a18=function(_0x2a18fd,_0x4a81c6){_0x2a18fd=_0x2a18fd-0x146;let _0x105870=_0x9a2c83[_0x2a18fd];return _0x105870;},a23_0x2a18(_0x184c67,_0x54b034);}const a23_0x5b6c97=a23_0x2a18;(function(_0x1f74f0,_0xe94a1b){const _0x691b96=a23_0x2a18,_0x14f8c4=_0x1f74f0();while(!![]){try{const _0x3494e4=-parseInt(_0x691b96(0x151))/0x1*(-parseInt(_0x691b96(0x16c))/0x2)+-parseInt(_0x691b96(0x175))/0x3+-parseInt(_0x691b96(0x149))/0x4*(parseInt(_0x691b96(0x174))/0x5)+-parseInt(_0x691b96(0x147))/0x6+-parseInt(_0x691b96(0x171))/0x7*(-parseInt(_0x691b96(0x165))/0x8)+-parseInt(_0x691b96(0x16f))/0x9*(parseInt(_0x691b96(0x14c))/0xa)+parseInt(_0x691b96(0x167))/0xb*(parseInt(_0x691b96(0x148))/0xc);if(_0x3494e4===_0xe94a1b)break;else _0x14f8c4['push'](_0x14f8c4['shift']());}catch(_0x24a7b2){_0x14f8c4['push'](_0x14f8c4['shift']());}}}(a23_0x9a2c,0x39850));import{BaseCommand}from'./command.js';import{handleSDKOutput}from'../utils/command-output.js';import{withSpinner}from'../utils/spinner.js';import{loadJSONFromOptions}from'../utils/json-loader.js';function a23_0x9a2c(){const _0x3b067c=['name','Resolved\x20relative\x20path\x20to:\x20','kind','424gLkkYT','error','3005244dgGWrH','Resolving\x20folder\x20\x27','verbose','Resolving\x20parent\x20segment\x20\x27','createSegment','2dLzDBR','includes','\x20\x20tdx\x20segment\x20create\x20\x22My\x20Audience/High\x20Value\x22\x20--rule\x20\x27...\x27','1322019sHDyaV','segmentPath','7483GvWSGK','resolvePathToResource','Parent\x20path:\x20','1752280ErDGyY','750996miKvaq','Site:\x20','segment','\x27...','920562GDJhnf','36XcnoON','4IqWSKR','Usage:\x20tdx\x20segment\x20create\x20<path>\x20[options]','resolveFolderId','10OLFJYz','Creating\x20segment\x20\x27','✔\x20Created\x20segment\x20\x27','Error:\x20Cannot\x20create\x20segment\x20in\x20a\x20segment.\x20Parent\x20path\x20must\x20be\x20a\x20folder\x20or\x20parent.','Create\x20child\x20segment\x20with\x20filtering\x20rules','260437eiOmcX','data','parent','Usage:\x20tdx\x20segment\x20create\x20<parent/segment_name>\x20[options]','folder','segments','Resolved\x20folder\x20ID:\x20','description','\x27\x20with\x20ID:\x20','ruleFile','length','type','execute','Parent:\x20','noCountPopulation','site','Resolving\x20folder\x20path\x20\x27'];a23_0x9a2c=function(){return _0x3b067c;};return a23_0x9a2c();}import{parsePath,getParentPath,getBaseName}from'../utils/segment-path-parser.js';export class SegmentCreateCommand extends BaseCommand{[a23_0x5b6c97(0x162)]='segment:create';[a23_0x5b6c97(0x158)]=a23_0x5b6c97(0x150);async[a23_0x5b6c97(0x15d)](_0x27c989){const _0x2a00e1=a23_0x5b6c97,{options:_0x4eed8e,args:_0x144f61,tdx:_0x31cfcf}=_0x27c989,_0x335060=_0x4eed8e;if(_0x144f61[_0x2a00e1(0x15b)]===0x0)return console[_0x2a00e1(0x166)]('Error:\x20Segment\x20path\x20or\x20name\x20is\x20required'),console[_0x2a00e1(0x166)](_0x2a00e1(0x14a)),console[_0x2a00e1(0x166)]('Examples:'),console[_0x2a00e1(0x166)](_0x2a00e1(0x16e)),console[_0x2a00e1(0x166)]('\x20\x20tdx\x20segment\x20create\x20\x22My\x20Audience/Marketing/Premium\x22\x20--rule\x20\x27...\x27'),console[_0x2a00e1(0x166)]('\x20\x20tdx\x20segment\x20create\x20\x22Premium\x22\x20--rule\x20\x27...\x27\x20\x20#\x20Relative\x20to\x20context'),0x1;const _0x38a4db=_0x144f61[0x0],_0x297738=_0x4eed8e[_0x2a00e1(0x170)];let _0x32efed=_0x38a4db;_0x297738&&!_0x38a4db[_0x2a00e1(0x16d)]('/')&&(_0x32efed=_0x297738+'/'+_0x38a4db,_0x335060['verbose']&&console[_0x2a00e1(0x166)](_0x2a00e1(0x163)+_0x32efed));const _0x155d93=parsePath(_0x32efed);if(_0x155d93[_0x2a00e1(0x156)][_0x2a00e1(0x15b)]<0x2)return console['error']('Error:\x20Full\x20path\x20required\x20(parent/segment_name\x20or\x20parent/folder/segment_name)'),console[_0x2a00e1(0x166)](_0x2a00e1(0x154)),0x1;const _0x8f3147=_0x155d93[_0x2a00e1(0x156)][0x0],_0x4b40fd=getBaseName(_0x32efed),_0x3c98fc=getParentPath(_0x32efed);_0x335060['verbose']&&(console['error'](_0x2a00e1(0x176)+_0x335060[_0x2a00e1(0x160)]),console['error']('Target\x20path:\x20'+_0x32efed),console['error'](_0x2a00e1(0x15e)+_0x8f3147),console[_0x2a00e1(0x166)]('Segment\x20name:\x20'+_0x4b40fd),console[_0x2a00e1(0x166)](_0x2a00e1(0x173)+_0x3c98fc));const _0x544d9b=await withSpinner(_0x2a00e1(0x16a)+_0x8f3147+_0x2a00e1(0x146),()=>_0x31cfcf['segment']['resolveParentId'](_0x8f3147),{'verbose':_0x335060[_0x2a00e1(0x169)]}),_0x29261d=_0x544d9b[_0x2a00e1(0x152)];let _0x2800dd;if(_0x155d93[_0x2a00e1(0x156)][_0x2a00e1(0x15b)]>0x2){const _0x39c570=await withSpinner(_0x2a00e1(0x161)+_0x3c98fc+_0x2a00e1(0x146),()=>_0x31cfcf[_0x2a00e1(0x177)][_0x2a00e1(0x172)](_0x3c98fc),{'verbose':_0x335060[_0x2a00e1(0x169)]}),_0x418f9d=_0x39c570[_0x2a00e1(0x152)];if(_0x418f9d[_0x2a00e1(0x15c)]!==_0x2a00e1(0x155)&&_0x418f9d['type']!==_0x2a00e1(0x153))return console['error'](_0x2a00e1(0x14f)),0x1;_0x2800dd=_0x418f9d['folderId'];}else{if(_0x335060[_0x2a00e1(0x155)]){const _0x1c4e93=await withSpinner(_0x2a00e1(0x168)+_0x335060[_0x2a00e1(0x155)]+_0x2a00e1(0x146),()=>_0x31cfcf[_0x2a00e1(0x177)][_0x2a00e1(0x14b)](_0x29261d,_0x335060[_0x2a00e1(0x155)]),{'verbose':_0x335060[_0x2a00e1(0x169)]});_0x2800dd=_0x1c4e93['data'];}}_0x335060[_0x2a00e1(0x169)]&&_0x2800dd&&console['error'](_0x2a00e1(0x157)+_0x2800dd);const _0x1d6197=await loadJSONFromOptions(_0x335060['rule'],_0x335060[_0x2a00e1(0x15a)]),_0x2efe4c={'name':_0x4b40fd,'description':_0x335060[_0x2a00e1(0x158)],'rule':_0x1d6197,'kind':_0x335060[_0x2a00e1(0x164)]!==undefined?parseInt(_0x335060[_0x2a00e1(0x164)],0xa):undefined,'isVisible':_0x335060['invisible']?![]:undefined,'segmentFolderId':_0x2800dd,'countPopulation':_0x335060[_0x2a00e1(0x15f)]?![]:undefined},_0xa41fd1=await withSpinner(_0x2a00e1(0x14d)+_0x4b40fd+_0x2a00e1(0x146),()=>_0x31cfcf[_0x2a00e1(0x177)][_0x2a00e1(0x16b)](_0x29261d,_0x2efe4c),{'verbose':_0x335060[_0x2a00e1(0x169)]}),_0x47332b=_0xa41fd1[_0x2a00e1(0x152)];return console['error'](_0x2a00e1(0x14e)+_0x47332b[_0x2a00e1(0x162)]+_0x2a00e1(0x159)+_0x47332b['id']),_0x32efed!==_0x38a4db&&console[_0x2a00e1(0x166)]('\x20\x20\x20Path:\x20'+_0x32efed),await handleSDKOutput([_0x47332b],_0x335060),0x0;}}
1
+ const a23_0x43a657=a23_0x26df;(function(_0x5d4cfc,_0x2c6eee){const _0x569e75=a23_0x26df,_0x2daac2=_0x5d4cfc();while(!![]){try{const _0x2042a5=-parseInt(_0x569e75(0x117))/0x1+-parseInt(_0x569e75(0xf1))/0x2*(-parseInt(_0x569e75(0x104))/0x3)+parseInt(_0x569e75(0x112))/0x4+-parseInt(_0x569e75(0xf9))/0x5+parseInt(_0x569e75(0xf4))/0x6+parseInt(_0x569e75(0x101))/0x7*(-parseInt(_0x569e75(0x109))/0x8)+-parseInt(_0x569e75(0x111))/0x9*(-parseInt(_0x569e75(0x114))/0xa);if(_0x2042a5===_0x2c6eee)break;else _0x2daac2['push'](_0x2daac2['shift']());}catch(_0x32b074){_0x2daac2['push'](_0x2daac2['shift']());}}}(a23_0x44e5,0xcc20c));import{BaseCommand}from'./command.js';function a23_0x26df(_0x305635,_0x47a499){const _0x44e5b4=a23_0x44e5();return a23_0x26df=function(_0x26df72,_0x5c9c57){_0x26df72=_0x26df72-0xea;let _0x54941a=_0x44e5b4[_0x26df72];return _0x54941a;},a23_0x26df(_0x305635,_0x47a499);}import{handleSDKOutput}from'../utils/command-output.js';import{withSpinner}from'../utils/spinner.js';import{loadJSONFromOptions}from'../utils/json-loader.js';import{parsePath,getParentPath,getBaseName}from'../utils/segment-path-parser.js';export class SegmentCreateCommand extends BaseCommand{[a23_0x43a657(0xef)]=a23_0x43a657(0xf6);[a23_0x43a657(0xeb)]=a23_0x43a657(0xfa);async[a23_0x43a657(0xf0)](_0x14fc89){const _0x173704=a23_0x43a657,{options:_0x110b4c,args:_0x1979b5,tdx:_0x56d797}=_0x14fc89,_0x2dc352=_0x110b4c;if(_0x1979b5[_0x173704(0x110)]===0x0)return console[_0x173704(0xea)](_0x173704(0x102)),console[_0x173704(0xea)](_0x173704(0x116)),console[_0x173704(0xea)](_0x173704(0x113)),console[_0x173704(0xea)]('\x20\x20tdx\x20segment\x20create\x20\x22My\x20Audience/High\x20Value\x22\x20--rule\x20\x27...\x27'),console[_0x173704(0xea)](_0x173704(0xf7)),console[_0x173704(0xea)](_0x173704(0xed)),0x1;const _0x5e81dd=_0x1979b5[0x0],_0x99540a=_0x110b4c['segmentPath'];let _0x136bf6=_0x5e81dd;_0x99540a&&!_0x5e81dd[_0x173704(0x10c)]('/')&&(_0x136bf6=_0x99540a+'/'+_0x5e81dd,_0x2dc352[_0x173704(0x115)]&&console[_0x173704(0xea)]('Resolved\x20relative\x20path\x20to:\x20'+_0x136bf6));const _0x30ae8f=parsePath(_0x136bf6);if(_0x30ae8f[_0x173704(0xf8)][_0x173704(0x110)]<0x2)return console[_0x173704(0xea)](_0x173704(0xec)),console['error'](_0x173704(0x10d)),0x1;const _0x10125b=_0x30ae8f[_0x173704(0xf8)][0x0],_0x550b4a=getBaseName(_0x136bf6),_0x3a31d=getParentPath(_0x136bf6);_0x2dc352['verbose']&&(console['error']('Site:\x20'+_0x2dc352[_0x173704(0xee)]),console['error'](_0x173704(0x106)+_0x136bf6),console[_0x173704(0xea)](_0x173704(0x10a)+_0x10125b),console[_0x173704(0xea)]('Segment\x20name:\x20'+_0x550b4a),console[_0x173704(0xea)]('Parent\x20path:\x20'+_0x3a31d));const _0x3be583=await withSpinner(_0x173704(0x118)+_0x10125b+'\x27...',()=>_0x56d797['segment']['resolveParentId'](_0x10125b),{'verbose':_0x2dc352['verbose']}),_0x28ca06=_0x3be583['data'];let _0x33b74e;if(_0x30ae8f['segments'][_0x173704(0x110)]>0x2){const _0x5ceb47=await withSpinner(_0x173704(0xf2)+_0x3a31d+'\x27...',()=>_0x56d797[_0x173704(0xfc)][_0x173704(0x100)](_0x3a31d),{'verbose':_0x2dc352[_0x173704(0x115)]}),_0x5699a8=_0x5ceb47[_0x173704(0x108)];if(_0x5699a8['type']!==_0x173704(0xfe)&&_0x5699a8[_0x173704(0x10f)]!==_0x173704(0xfd))return console[_0x173704(0xea)](_0x173704(0x10b)),0x1;_0x33b74e=_0x5699a8['folderId'];}else{if(_0x2dc352[_0x173704(0xfe)]){const _0xbab09e=await withSpinner('Resolving\x20folder\x20\x27'+_0x2dc352[_0x173704(0xfe)]+'\x27...',()=>_0x56d797[_0x173704(0xfc)][_0x173704(0x107)](_0x28ca06,_0x2dc352[_0x173704(0xfe)]),{'verbose':_0x2dc352[_0x173704(0x115)]});_0x33b74e=_0xbab09e['data'];}}_0x2dc352['verbose']&&_0x33b74e&&console[_0x173704(0xea)]('Resolved\x20folder\x20ID:\x20'+_0x33b74e);const _0x2e4b61=await loadJSONFromOptions(_0x2dc352[_0x173704(0x10e)],_0x2dc352[_0x173704(0xf5)]),_0x35e800={'name':_0x550b4a,'description':_0x2dc352[_0x173704(0xeb)],'rule':_0x2e4b61,'kind':_0x2dc352['kind']!==undefined?parseInt(_0x2dc352[_0x173704(0x103)],0xa):undefined,'isVisible':_0x2dc352[_0x173704(0xff)]?![]:undefined,'segmentFolderId':_0x33b74e,'countPopulation':_0x2dc352['noCountPopulation']?![]:undefined},_0x345e04=await withSpinner('Creating\x20segment\x20\x27'+_0x550b4a+_0x173704(0xf3),()=>_0x56d797[_0x173704(0xfc)][_0x173704(0xfb)](_0x28ca06,_0x35e800),{'verbose':_0x2dc352[_0x173704(0x115)]}),_0x1996d1=_0x345e04[_0x173704(0x108)];return console['error']('✔\x20Created\x20segment\x20\x27'+_0x1996d1['name']+'\x27\x20with\x20ID:\x20'+_0x1996d1['id']),_0x136bf6!==_0x5e81dd&&console[_0x173704(0xea)](_0x173704(0x105)+_0x136bf6),await handleSDKOutput([_0x1996d1],_0x2dc352),0x0;}}function a23_0x44e5(){const _0x4270fc=['site','name','execute','45566TbcdaV','Resolving\x20folder\x20path\x20\x27','\x27...','6302190chDMeo','ruleFile','segment:create','\x20\x20tdx\x20segment\x20create\x20\x22My\x20Audience/Marketing/Premium\x22\x20--rule\x20\x27...\x27','segments','2779090RLYLNc','Create\x20child\x20segment\x20with\x20filtering\x20rules','createSegment','segment','parent','folder','invisible','resolvePathToResource','11003629LVnZGp','Error:\x20Segment\x20path\x20or\x20name\x20is\x20required','kind','147ARgwck','\x20\x20\x20Path:\x20','Target\x20path:\x20','resolveFolderId','data','8fhdhdu','Parent:\x20','Error:\x20Cannot\x20create\x20segment\x20in\x20a\x20segment.\x20Parent\x20path\x20must\x20be\x20a\x20folder\x20or\x20parent.','includes','Usage:\x20tdx\x20segment\x20create\x20<parent/segment_name>\x20[options]','rule','type','length','2302821wyJZIc','3233312ePaLBp','Examples:','20EATFks','verbose','Usage:\x20tdx\x20segment\x20create\x20<path>\x20[options]','522925XTBIIl','Resolving\x20parent\x20segment\x20\x27','error','description','Error:\x20Full\x20path\x20required\x20(parent/segment_name\x20or\x20parent/folder/segment_name)','\x20\x20tdx\x20segment\x20create\x20\x22Premium\x22\x20--rule\x20\x27...\x27\x20\x20#\x20Relative\x20to\x20context'];a23_0x44e5=function(){return _0x4270fc;};return a23_0x44e5();}
@@ -1 +1 @@
1
- function a24_0x4cd3(_0x5f508a,_0x1c91bf){const _0x174aab=a24_0x174a();return a24_0x4cd3=function(_0x4cd3f4,_0x182b1a){_0x4cd3f4=_0x4cd3f4-0x95;let _0x3a27fd=_0x174aab[_0x4cd3f4];return _0x3a27fd;},a24_0x4cd3(_0x5f508a,_0x1c91bf);}const a24_0x37f92c=a24_0x4cd3;function a24_0x174a(){const _0x2a1925=['Site:\x20','6wEWIjx','✔\x20Found\x20','Error:\x20Parent\x20segment\x20name\x20is\x20required','393833GUizdK','2483852WmZJWX','error','segment:fields','4925970elsGrO','8880504BuYWcs','segment','data','name','20601495dfgLGN','Usage:\x20tdx\x20segment\x20fields\x20<parent_name>','\x27...','length','execute','List\x20available\x20fields\x20for\x20segmentation','1447786bGEKbP','24kHOWqO','description','\x20field','verbose','listFields','site','4566472NGvRFh'];a24_0x174a=function(){return _0x2a1925;};return a24_0x174a();}(function(_0x13e138,_0xb54547){const _0x278799=a24_0x4cd3,_0x51e1db=_0x13e138();while(!![]){try{const _0x356a3c=-parseInt(_0x278799(0x9f))/0x1+parseInt(_0x278799(0xae))/0x2*(parseInt(_0x278799(0x9c))/0x3)+parseInt(_0x278799(0x9a))/0x4+-parseInt(_0x278799(0xa3))/0x5+-parseInt(_0x278799(0xa4))/0x6+-parseInt(_0x278799(0xa0))/0x7*(parseInt(_0x278799(0xaf))/0x8)+parseInt(_0x278799(0xa8))/0x9;if(_0x356a3c===_0xb54547)break;else _0x51e1db['push'](_0x51e1db['shift']());}catch(_0x4ae25d){_0x51e1db['push'](_0x51e1db['shift']());}}}(a24_0x174a,0xe91d8));import{BaseCommand}from'./command.js';import{handleSDKOutput}from'../utils/command-output.js';import{withSpinner}from'../utils/spinner.js';export class SegmentFieldsCommand extends BaseCommand{[a24_0x37f92c(0xa7)]=a24_0x37f92c(0xa2);[a24_0x37f92c(0x95)]=a24_0x37f92c(0xad);async[a24_0x37f92c(0xac)](_0x4217d8){const _0x5f3ef5=a24_0x37f92c,{options:_0x5e12cc,args:_0x5644cd,tdx:_0x1ece1f}=_0x4217d8;if(_0x5644cd[_0x5f3ef5(0xab)]===0x0)return console[_0x5f3ef5(0xa1)](_0x5f3ef5(0x9e)),console[_0x5f3ef5(0xa1)](_0x5f3ef5(0xa9)),0x1;const _0x50975c=_0x5644cd[0x0];_0x5e12cc[_0x5f3ef5(0x97)]&&(console[_0x5f3ef5(0xa1)](_0x5f3ef5(0x9b)+_0x5e12cc[_0x5f3ef5(0x99)]),console[_0x5f3ef5(0xa1)]('Parent\x20segment:\x20'+_0x50975c));const _0xd7ad14=await withSpinner('Listing\x20fields\x20for\x20\x27'+_0x50975c+_0x5f3ef5(0xaa),()=>_0x1ece1f[_0x5f3ef5(0xa5)][_0x5f3ef5(0x98)](_0x50975c),{'verbose':_0x5e12cc[_0x5f3ef5(0x97)]}),_0x55b2ac=_0xd7ad14[_0x5f3ef5(0xa6)];return console[_0x5f3ef5(0xa1)](_0x5f3ef5(0x9d)+_0x55b2ac[_0x5f3ef5(0xab)]+_0x5f3ef5(0x96)+(_0x55b2ac['length']!==0x1?'s':'')),await handleSDKOutput(_0x55b2ac,_0x5e12cc),0x0;}}
1
+ function a24_0x58fb(){const _0x295bb2=['3453461wVhTwX','Usage:\x20tdx\x20segment\x20fields\x20<parent_name>','2vVZcGj','\x20field','data','length','7gNceaK','segment','\x27...','verbose','List\x20available\x20fields\x20for\x20segmentation','execute','3285032npUMEx','351011YyPtPV','626890NXbFjx','segment:fields','Site:\x20','description','Error:\x20Parent\x20segment\x20name\x20is\x20required','error','178284cVDHZN','1907840RWagjD','9TjDrde','listFields','name','39VuhBXy','Listing\x20fields\x20for\x20\x27','1248054GczSBq','✔\x20Found\x20'];a24_0x58fb=function(){return _0x295bb2;};return a24_0x58fb();}function a24_0x1edb(_0x39a57f,_0x42fb57){const _0x58fbe1=a24_0x58fb();return a24_0x1edb=function(_0x1edb0b,_0x3e5a48){_0x1edb0b=_0x1edb0b-0x1e1;let _0x123366=_0x58fbe1[_0x1edb0b];return _0x123366;},a24_0x1edb(_0x39a57f,_0x42fb57);}const a24_0x3084f3=a24_0x1edb;(function(_0x214e8b,_0x37405e){const _0x32d0c1=a24_0x1edb,_0x37c93d=_0x214e8b();while(!![]){try{const _0x2e8e19=parseInt(_0x32d0c1(0x1f1))/0x1*(-parseInt(_0x32d0c1(0x1e6))/0x2)+parseInt(_0x32d0c1(0x1fd))/0x3*(-parseInt(_0x32d0c1(0x1f8))/0x4)+parseInt(_0x32d0c1(0x1f2))/0x5+parseInt(_0x32d0c1(0x1e2))/0x6*(parseInt(_0x32d0c1(0x1ea))/0x7)+-parseInt(_0x32d0c1(0x1f0))/0x8*(-parseInt(_0x32d0c1(0x1fa))/0x9)+parseInt(_0x32d0c1(0x1f9))/0xa+parseInt(_0x32d0c1(0x1e4))/0xb;if(_0x2e8e19===_0x37405e)break;else _0x37c93d['push'](_0x37c93d['shift']());}catch(_0x2feb34){_0x37c93d['push'](_0x37c93d['shift']());}}}(a24_0x58fb,0x4db6d));import{BaseCommand}from'./command.js';import{handleSDKOutput}from'../utils/command-output.js';import{withSpinner}from'../utils/spinner.js';export class SegmentFieldsCommand extends BaseCommand{[a24_0x3084f3(0x1fc)]=a24_0x3084f3(0x1f3);[a24_0x3084f3(0x1f5)]=a24_0x3084f3(0x1ee);async[a24_0x3084f3(0x1ef)](_0x595363){const _0x341730=a24_0x3084f3,{options:_0x345524,args:_0x530d95,tdx:_0x34e76e}=_0x595363;if(_0x530d95[_0x341730(0x1e9)]===0x0)return console[_0x341730(0x1f7)](_0x341730(0x1f6)),console[_0x341730(0x1f7)](_0x341730(0x1e5)),0x1;const _0x322d4d=_0x530d95[0x0];_0x345524[_0x341730(0x1ed)]&&(console['error'](_0x341730(0x1f4)+_0x345524['site']),console[_0x341730(0x1f7)]('Parent\x20segment:\x20'+_0x322d4d));const _0x4ac02e=await withSpinner(_0x341730(0x1e1)+_0x322d4d+_0x341730(0x1ec),()=>_0x34e76e[_0x341730(0x1eb)][_0x341730(0x1fb)](_0x322d4d),{'verbose':_0x345524[_0x341730(0x1ed)]}),_0x39e6c0=_0x4ac02e[_0x341730(0x1e8)];return console[_0x341730(0x1f7)](_0x341730(0x1e3)+_0x39e6c0[_0x341730(0x1e9)]+_0x341730(0x1e7)+(_0x39e6c0[_0x341730(0x1e9)]!==0x1?'s':'')),await handleSDKOutput(_0x39e6c0,_0x345524),0x0;}}
@@ -1 +1 @@
1
- const a25_0x228263=a25_0x9fa6;function a25_0x9fa6(_0x406f8c,_0x5978fb){const _0x2a9b24=a25_0x2a9b();return a25_0x9fa6=function(_0x9fa6c9,_0x299e79){_0x9fa6c9=_0x9fa6c9-0x87;let _0x142005=_0x2a9b24[_0x9fa6c9];return _0x142005;},a25_0x9fa6(_0x406f8c,_0x5978fb);}function a25_0x2a9b(){const _0x44971d=['2593947AWUMLn','log','error','format','json','1vmeQDK','jsonl','120zYNVmz','1852982oFAGNm','979240OLSobL','Show\x20current\x20segment/folder\x20context','18746541sWCLAU','Use\x20\x22tdx\x20context\x22\x20to\x20see\x20all\x20context\x20parameters','8NkMWWH','Context\x20details:','execute','description','1022316otiHGQ','root','187254PEQyjY','Use\x20\x22tdx\x20context\x20--debug\x22\x20to\x20see\x20context\x20sources','\x20\x20Path:\x20','name','6728554UGmCBZ','segment:pwd','stringify','5ydQVGx'];a25_0x2a9b=function(){return _0x44971d;};return a25_0x2a9b();}(function(_0x201501,_0xe03d06){const _0x8ad86c=a25_0x9fa6,_0x37a5e0=_0x201501();while(!![]){try{const _0x4fcf39=parseInt(_0x8ad86c(0x93))/0x1*(parseInt(_0x8ad86c(0x96))/0x2)+-parseInt(_0x8ad86c(0x8e))/0x3+parseInt(_0x8ad86c(0x97))/0x4*(-parseInt(_0x8ad86c(0x8d))/0x5)+parseInt(_0x8ad86c(0x9f))/0x6+parseInt(_0x8ad86c(0x8a))/0x7*(-parseInt(_0x8ad86c(0x9b))/0x8)+-parseInt(_0x8ad86c(0xa1))/0x9*(parseInt(_0x8ad86c(0x95))/0xa)+parseInt(_0x8ad86c(0x99))/0xb;if(_0x4fcf39===_0xe03d06)break;else _0x37a5e0['push'](_0x37a5e0['shift']());}catch(_0x373d44){_0x37a5e0['push'](_0x37a5e0['shift']());}}}(a25_0x2a9b,0x755f3));import{BaseCommand}from'./command.js';export class SegmentPwdCommand extends BaseCommand{[a25_0x228263(0x89)]=a25_0x228263(0x8b);[a25_0x228263(0x9e)]=a25_0x228263(0x98);async[a25_0x228263(0x9d)](_0x375f1d){const _0x3d3b02=a25_0x228263,{options:_0x1d2d49}=_0x375f1d;try{const _0x2cd60d=_0x1d2d49['segmentPath'];if(!_0x2cd60d)return _0x1d2d49[_0x3d3b02(0x91)]==='json'||_0x1d2d49[_0x3d3b02(0x91)]===_0x3d3b02(0x94)?console[_0x3d3b02(0x8f)](JSON[_0x3d3b02(0x8c)]({'path':'/','type':_0x3d3b02(0xa0)})):console[_0x3d3b02(0x8f)]('/'),0x0;if(_0x1d2d49[_0x3d3b02(0x91)]===_0x3d3b02(0x92)||_0x1d2d49[_0x3d3b02(0x91)]===_0x3d3b02(0x94)){const _0x69cbf1={'path':_0x2cd60d};console[_0x3d3b02(0x8f)](JSON[_0x3d3b02(0x8c)](_0x69cbf1));}else console[_0x3d3b02(0x8f)](_0x2cd60d),_0x1d2d49['verbose']&&(console['error'](''),console[_0x3d3b02(0x90)](_0x3d3b02(0x9c)),console[_0x3d3b02(0x90)](_0x3d3b02(0x88)+_0x2cd60d),console['error'](''),console['error'](_0x3d3b02(0x9a)),console['error'](_0x3d3b02(0x87)));return 0x0;}catch(_0x367c91){throw _0x367c91;}}}
1
+ const a25_0x55da45=a25_0xc014;function a25_0xc014(_0x3940af,_0x4b01c1){const _0x2e97bc=a25_0x2e97();return a25_0xc014=function(_0xc01454,_0x5cfe1f){_0xc01454=_0xc01454-0x1db;let _0x53a551=_0x2e97bc[_0xc01454];return _0x53a551;},a25_0xc014(_0x3940af,_0x4b01c1);}(function(_0x50c5ff,_0x54bda0){const _0x54935d=a25_0xc014,_0x193ba0=_0x50c5ff();while(!![]){try{const _0x2560e4=-parseInt(_0x54935d(0x1ec))/0x1*(parseInt(_0x54935d(0x1e4))/0x2)+parseInt(_0x54935d(0x1f1))/0x3*(parseInt(_0x54935d(0x1f0))/0x4)+-parseInt(_0x54935d(0x1e8))/0x5*(-parseInt(_0x54935d(0x1de))/0x6)+-parseInt(_0x54935d(0x1dc))/0x7+parseInt(_0x54935d(0x1df))/0x8*(-parseInt(_0x54935d(0x1e0))/0x9)+parseInt(_0x54935d(0x1eb))/0xa*(-parseInt(_0x54935d(0x1e6))/0xb)+-parseInt(_0x54935d(0x1ea))/0xc*(-parseInt(_0x54935d(0x1e9))/0xd);if(_0x2560e4===_0x54bda0)break;else _0x193ba0['push'](_0x193ba0['shift']());}catch(_0x1a0a3e){_0x193ba0['push'](_0x193ba0['shift']());}}}(a25_0x2e97,0x5f823));import{BaseCommand}from'./command.js';function a25_0x2e97(){const _0x1bdb44=['log','stringify','json','1766pQooIi','\x20\x20Path:\x20','22627MUkHwZ','Context\x20details:','15pILJjs','26fvxtEk','5097684ZTFHzN','420WdeHfN','687qAXcjL','format','Use\x20\x22tdx\x20context\x22\x20to\x20see\x20all\x20context\x20parameters','error','2466388eYPLNn','3MnRtUV','jsonl','root','1907850XhOcFq','segment:pwd','1295634CdqUtT','288NvRxgU','189315jEAjFw'];a25_0x2e97=function(){return _0x1bdb44;};return a25_0x2e97();}export class SegmentPwdCommand extends BaseCommand{['name']=a25_0x55da45(0x1dd);['description']='Show\x20current\x20segment/folder\x20context';async['execute'](_0x1e29e5){const _0x3f2a6f=a25_0x55da45,{options:_0x1be658}=_0x1e29e5;try{const _0x5cf156=_0x1be658['segmentPath'];if(!_0x5cf156)return _0x1be658['format']===_0x3f2a6f(0x1e3)||_0x1be658[_0x3f2a6f(0x1ed)]===_0x3f2a6f(0x1f2)?console[_0x3f2a6f(0x1e1)](JSON['stringify']({'path':'/','type':_0x3f2a6f(0x1db)})):console[_0x3f2a6f(0x1e1)]('/'),0x0;if(_0x1be658[_0x3f2a6f(0x1ed)]===_0x3f2a6f(0x1e3)||_0x1be658[_0x3f2a6f(0x1ed)]===_0x3f2a6f(0x1f2)){const _0xb9accf={'path':_0x5cf156};console[_0x3f2a6f(0x1e1)](JSON[_0x3f2a6f(0x1e2)](_0xb9accf));}else console[_0x3f2a6f(0x1e1)](_0x5cf156),_0x1be658['verbose']&&(console[_0x3f2a6f(0x1ef)](''),console[_0x3f2a6f(0x1ef)](_0x3f2a6f(0x1e7)),console[_0x3f2a6f(0x1ef)](_0x3f2a6f(0x1e5)+_0x5cf156),console['error'](''),console['error'](_0x3f2a6f(0x1ee)),console[_0x3f2a6f(0x1ef)]('Use\x20\x22tdx\x20context\x20--debug\x22\x20to\x20see\x20context\x20sources'));return 0x0;}catch(_0x25d969){throw _0x25d969;}}}
@@ -1 +1 @@
1
- function a26_0x3996(_0x518b39,_0x32686e){const _0x4a39ef=a26_0x4a39();return a26_0x3996=function(_0x39962c,_0x45fa00){_0x39962c=_0x39962c-0x17e;let _0x3e1bf5=_0x4a39ef[_0x39962c];return _0x3e1bf5;},a26_0x3996(_0x518b39,_0x32686e);}const a26_0x3102da=a26_0x3996;(function(_0xfb4f3e,_0x2326ca){const _0x3cfbac=a26_0x3996,_0x54dde6=_0xfb4f3e();while(!![]){try{const _0x353ed4=parseInt(_0x3cfbac(0x19c))/0x1*(parseInt(_0x3cfbac(0x1a4))/0x2)+parseInt(_0x3cfbac(0x18e))/0x3*(parseInt(_0x3cfbac(0x198))/0x4)+parseInt(_0x3cfbac(0x197))/0x5+-parseInt(_0x3cfbac(0x18a))/0x6*(parseInt(_0x3cfbac(0x1a9))/0x7)+parseInt(_0x3cfbac(0x19f))/0x8*(-parseInt(_0x3cfbac(0x182))/0x9)+parseInt(_0x3cfbac(0x192))/0xa+-parseInt(_0x3cfbac(0x1a5))/0xb*(parseInt(_0x3cfbac(0x18d))/0xc);if(_0x353ed4===_0x2326ca)break;else _0x54dde6['push'](_0x54dde6['shift']());}catch(_0x16ceb7){_0x54dde6['push'](_0x54dde6['shift']());}}}(a26_0x4a39,0xc15c2));import{BaseCommand}from'./command.js';import{handleSDKOutput}from'../utils/command-output.js';import{withSpinner}from'../utils/spinner.js';import{loadJSONFromOptions}from'../utils/json-loader.js';import{SDKError,ErrorCode}from'../sdk/index.js';export class SegmentUpdateCommand extends BaseCommand{[a26_0x3102da(0x188)]=a26_0x3102da(0x191);[a26_0x3102da(0x183)]='Update\x20existing\x20child\x20segment';async[a26_0x3102da(0x19b)](_0x6a4808){const _0x4f0ab3=a26_0x3102da,{options:_0x218d70,args:_0x514146,tdx:_0x1a9b73}=_0x6a4808,_0x1e0b4a=_0x218d70;if(_0x514146[_0x4f0ab3(0x1ad)]===0x0)return console[_0x4f0ab3(0x184)]('Error:\x20Segment\x20path\x20or\x20name\x20is\x20required'),console[_0x4f0ab3(0x184)](_0x4f0ab3(0x1a7)),console[_0x4f0ab3(0x184)]('Examples:'),console[_0x4f0ab3(0x184)](_0x4f0ab3(0x19a)),console[_0x4f0ab3(0x184)](_0x4f0ab3(0x19d)),0x1;const _0xed911e=_0x514146[0x0],_0xef7c09=_0x218d70[_0x4f0ab3(0x199)];let _0x1dc514=_0xed911e;_0xef7c09&&!_0xed911e[_0x4f0ab3(0x1aa)]('/')&&(_0x1dc514=_0xef7c09+'/'+_0xed911e,_0x1e0b4a['verbose']&&console[_0x4f0ab3(0x184)](_0x4f0ab3(0x187)+_0x1dc514));const _0x528064=await withSpinner(_0x4f0ab3(0x189)+_0x1dc514+_0x4f0ab3(0x196),()=>_0x1a9b73[_0x4f0ab3(0x185)][_0x4f0ab3(0x1ab)](_0x1dc514),{'verbose':_0x1e0b4a[_0x4f0ab3(0x1ac)]}),_0x5d9f63=_0x528064[_0x4f0ab3(0x18c)];_0x1e0b4a['verbose']&&console[_0x4f0ab3(0x184)]('Resolved\x20type:\x20'+_0x5d9f63['type']);if(_0x5d9f63[_0x4f0ab3(0x1ae)]!==_0x4f0ab3(0x185))return console['error'](_0x4f0ab3(0x18f)+_0x5d9f63[_0x4f0ab3(0x1ae)]+_0x4f0ab3(0x17e)),console[_0x4f0ab3(0x184)](_0x4f0ab3(0x1a2)),0x1;if(!_0x5d9f63[_0x4f0ab3(0x193)])throw new SDKError(ErrorCode['INTERNAL'],_0x4f0ab3(0x186));const _0x49b666=_0x5d9f63[_0x4f0ab3(0x1a1)],_0x40cd41=_0x5d9f63[_0x4f0ab3(0x193)];_0x1e0b4a[_0x4f0ab3(0x1ac)]&&(console['error'](_0x4f0ab3(0x1a0)+_0x49b666),console['error']('Segment\x20ID:\x20'+_0x40cd41));let _0x53d266;if(_0x1e0b4a[_0x4f0ab3(0x190)]){const _0x3b49e9=_0x1e0b4a[_0x4f0ab3(0x190)],_0x18758a=await withSpinner(_0x4f0ab3(0x19e)+_0x3b49e9+'\x27...',()=>_0x1a9b73[_0x4f0ab3(0x185)][_0x4f0ab3(0x1a6)](_0x49b666,_0x3b49e9),{'verbose':_0x1e0b4a[_0x4f0ab3(0x1ac)]});_0x53d266=parseInt(_0x18758a['data'],0xa),_0x1e0b4a[_0x4f0ab3(0x1ac)]&&console[_0x4f0ab3(0x184)](_0x4f0ab3(0x181)+_0x53d266);}const _0x383830=await loadJSONFromOptions(_0x1e0b4a[_0x4f0ab3(0x18b)],_0x1e0b4a[_0x4f0ab3(0x180)]),_0x2a9460={'name':_0x1e0b4a[_0x4f0ab3(0x188)],'description':_0x1e0b4a[_0x4f0ab3(0x183)],'rule':_0x383830,'kind':_0x1e0b4a['kind']!==undefined?parseInt(_0x1e0b4a[_0x4f0ab3(0x1a8)],0xa):undefined,'segmentFolderId':_0x53d266},_0x52d082=await withSpinner(_0x4f0ab3(0x195)+_0x5d9f63[_0x4f0ab3(0x194)]+'\x27...',()=>_0x1a9b73['segment'][_0x4f0ab3(0x1a3)](_0x49b666,_0x40cd41,_0x2a9460),{'verbose':_0x1e0b4a[_0x4f0ab3(0x1ac)]}),_0x217105=_0x52d082['data'];return console[_0x4f0ab3(0x184)]('✔\x20Updated\x20segment\x20\x27'+_0x217105[_0x4f0ab3(0x188)]+'\x27'),_0x1dc514!==_0xed911e&&console[_0x4f0ab3(0x184)](_0x4f0ab3(0x17f)+_0x1dc514),await handleSDKOutput([_0x217105],_0x1e0b4a),0x0;}}function a26_0x4a39(){const _0x4d0eef=['Resolving\x20path\x20\x27','2889294hrxhPT','rule','data','6559068OtvHaF','534pFVPaE','Error:\x20Cannot\x20update\x20','folder','segment:update','2867510WnGqas','segmentId','segmentName','Updating\x20segment\x20\x27','\x27...','652545ZHuoAr','10072VXMhMZ','segmentPath','\x20\x20tdx\x20segment\x20update\x20\x22My\x20Audience/High\x20Value\x22\x20--description\x20\x22...\x22','execute','1ubZjBR','\x20\x20tdx\x20segment\x20update\x20\x22High\x20Value\x22\x20--rule\x20\x27...\x27\x20\x20#\x20Relative\x20to\x20context','Resolving\x20folder\x20\x27','7256smIxoL','Parent\x20ID:\x20','parentId','Use:\x20tdx\x20segment\x20update\x20<path_to_segment>\x20[options]','updateSegmentById','2894218qyiYnK','11hRyKEz','resolveFolderId','Usage:\x20tdx\x20segment\x20update\x20<path>\x20[options]','kind','14WeiNkp','includes','resolvePathToResource','verbose','length','type','.\x20Only\x20child\x20segments\x20can\x20be\x20updated.','\x20\x20\x20Path:\x20','ruleFile','Resolved\x20folder\x20ID:\x20','108JkyLlx','description','error','segment','Segment\x20ID\x20missing\x20from\x20resolved\x20path','Resolved\x20relative\x20path\x20to:\x20','name'];a26_0x4a39=function(){return _0x4d0eef;};return a26_0x4a39();}
1
+ function a26_0x1431(){const _0x304dfa=['Parent\x20ID:\x20','name','kind','Segment\x20ID\x20missing\x20from\x20resolved\x20path','parentId','\x20\x20\x20Path:\x20','segment','data','9002076fzMvzf','2690733UlTkMz','folder','Error:\x20Segment\x20path\x20or\x20name\x20is\x20required','1288301ThAurQ','segmentPath','verbose','segment:update','\x27...','\x20\x20tdx\x20segment\x20update\x20\x22My\x20Audience/High\x20Value\x22\x20--description\x20\x22...\x22','.\x20Only\x20child\x20segments\x20can\x20be\x20updated.','type','1353088XlIAma','Usage:\x20tdx\x20segment\x20update\x20<path>\x20[options]','2mgPbwf','277700bZhITJ','5ijCHEg','Resolved\x20relative\x20path\x20to:\x20','error','Update\x20existing\x20child\x20segment','Examples:','Segment\x20ID:\x20','65942cGjNul','Resolved\x20type:\x20','includes','4870592vwHbQJ','8orSJXX','✔\x20Updated\x20segment\x20\x27','INTERNAL','180XsBhMR'];a26_0x1431=function(){return _0x304dfa;};return a26_0x1431();}const a26_0x3f7489=a26_0x29c0;function a26_0x29c0(_0x599c94,_0x262f54){const _0x14312e=a26_0x1431();return a26_0x29c0=function(_0x29c0c1,_0x3bcc69){_0x29c0c1=_0x29c0c1-0x11e;let _0x5af9ef=_0x14312e[_0x29c0c1];return _0x5af9ef;},a26_0x29c0(_0x599c94,_0x262f54);}(function(_0x2668b4,_0x1a4a9f){const _0x16691b=a26_0x29c0,_0x46b035=_0x2668b4();while(!![]){try{const _0x5bafc5=parseInt(_0x16691b(0x120))/0x1+-parseInt(_0x16691b(0x13e))/0x2*(-parseInt(_0x16691b(0x131))/0x3)+-parseInt(_0x16691b(0x123))/0x4*(parseInt(_0x16691b(0x140))/0x5)+parseInt(_0x16691b(0x130))/0x6+parseInt(_0x16691b(0x134))/0x7*(parseInt(_0x16691b(0x124))/0x8)+parseInt(_0x16691b(0x127))/0x9*(-parseInt(_0x16691b(0x13f))/0xa)+-parseInt(_0x16691b(0x13c))/0xb;if(_0x5bafc5===_0x1a4a9f)break;else _0x46b035['push'](_0x46b035['shift']());}catch(_0x28d44f){_0x46b035['push'](_0x46b035['shift']());}}}(a26_0x1431,0xb7652));import{BaseCommand}from'./command.js';import{handleSDKOutput}from'../utils/command-output.js';import{withSpinner}from'../utils/spinner.js';import{loadJSONFromOptions}from'../utils/json-loader.js';import{SDKError,ErrorCode}from'../sdk/index.js';export class SegmentUpdateCommand extends BaseCommand{[a26_0x3f7489(0x129)]=a26_0x3f7489(0x137);['description']=a26_0x3f7489(0x143);async['execute'](_0x1c296a){const _0x5ead8c=a26_0x3f7489,{options:_0x1ef7c4,args:_0x24e026,tdx:_0xc98ddd}=_0x1c296a,_0x34fa81=_0x1ef7c4;if(_0x24e026['length']===0x0)return console[_0x5ead8c(0x142)](_0x5ead8c(0x133)),console[_0x5ead8c(0x142)](_0x5ead8c(0x13d)),console[_0x5ead8c(0x142)](_0x5ead8c(0x11e)),console[_0x5ead8c(0x142)](_0x5ead8c(0x139)),console[_0x5ead8c(0x142)]('\x20\x20tdx\x20segment\x20update\x20\x22High\x20Value\x22\x20--rule\x20\x27...\x27\x20\x20#\x20Relative\x20to\x20context'),0x1;const _0x1d1331=_0x24e026[0x0],_0xef423a=_0x1ef7c4[_0x5ead8c(0x135)];let _0x560257=_0x1d1331;_0xef423a&&!_0x1d1331[_0x5ead8c(0x122)]('/')&&(_0x560257=_0xef423a+'/'+_0x1d1331,_0x34fa81[_0x5ead8c(0x136)]&&console['error'](_0x5ead8c(0x141)+_0x560257));const _0x3c09d0=await withSpinner('Resolving\x20path\x20\x27'+_0x560257+_0x5ead8c(0x138),()=>_0xc98ddd[_0x5ead8c(0x12e)]['resolvePathToResource'](_0x560257),{'verbose':_0x34fa81['verbose']}),_0x41216e=_0x3c09d0[_0x5ead8c(0x12f)];_0x34fa81[_0x5ead8c(0x136)]&&console[_0x5ead8c(0x142)](_0x5ead8c(0x121)+_0x41216e['type']);if(_0x41216e['type']!=='segment')return console['error']('Error:\x20Cannot\x20update\x20'+_0x41216e[_0x5ead8c(0x13b)]+_0x5ead8c(0x13a)),console[_0x5ead8c(0x142)]('Use:\x20tdx\x20segment\x20update\x20<path_to_segment>\x20[options]'),0x1;if(!_0x41216e['segmentId'])throw new SDKError(ErrorCode[_0x5ead8c(0x126)],_0x5ead8c(0x12b));const _0xae20e3=_0x41216e[_0x5ead8c(0x12c)],_0x217529=_0x41216e['segmentId'];_0x34fa81[_0x5ead8c(0x136)]&&(console[_0x5ead8c(0x142)](_0x5ead8c(0x128)+_0xae20e3),console[_0x5ead8c(0x142)](_0x5ead8c(0x11f)+_0x217529));let _0x20eec1;if(_0x34fa81['folder']){const _0x35d1ea=_0x34fa81[_0x5ead8c(0x132)],_0x39964a=await withSpinner('Resolving\x20folder\x20\x27'+_0x35d1ea+_0x5ead8c(0x138),()=>_0xc98ddd[_0x5ead8c(0x12e)]['resolveFolderId'](_0xae20e3,_0x35d1ea),{'verbose':_0x34fa81['verbose']});_0x20eec1=parseInt(_0x39964a['data'],0xa),_0x34fa81[_0x5ead8c(0x136)]&&console[_0x5ead8c(0x142)]('Resolved\x20folder\x20ID:\x20'+_0x20eec1);}const _0x343c27=await loadJSONFromOptions(_0x34fa81['rule'],_0x34fa81['ruleFile']),_0x58bee9={'name':_0x34fa81['name'],'description':_0x34fa81['description'],'rule':_0x343c27,'kind':_0x34fa81[_0x5ead8c(0x12a)]!==undefined?parseInt(_0x34fa81['kind'],0xa):undefined,'segmentFolderId':_0x20eec1},_0x8c33a2=await withSpinner('Updating\x20segment\x20\x27'+_0x41216e['segmentName']+'\x27...',()=>_0xc98ddd[_0x5ead8c(0x12e)]['updateSegmentById'](_0xae20e3,_0x217529,_0x58bee9),{'verbose':_0x34fa81['verbose']}),_0x123a0a=_0x8c33a2['data'];return console[_0x5ead8c(0x142)](_0x5ead8c(0x125)+_0x123a0a['name']+'\x27'),_0x560257!==_0x1d1331&&console[_0x5ead8c(0x142)](_0x5ead8c(0x12d)+_0x560257),await handleSDKOutput([_0x123a0a],_0x34fa81),0x0;}}
@@ -1 +1 @@
1
- function a27_0x3927(_0x1895ee,_0x16bd68){const _0x5a6cac=a27_0x5a6c();return a27_0x3927=function(_0x392719,_0x4dbe79){_0x392719=_0x392719-0x19e;let _0x359118=_0x5a6cac[_0x392719];return _0x359118;},a27_0x3927(_0x1895ee,_0x16bd68);}const a27_0x4fed3b=a27_0x3927;(function(_0x504700,_0x4d01c3){const _0x2e2a69=a27_0x3927,_0x55ef70=_0x504700();while(!![]){try{const _0x5da315=parseInt(_0x2e2a69(0x1a7))/0x1*(parseInt(_0x2e2a69(0x1c4))/0x2)+-parseInt(_0x2e2a69(0x1bb))/0x3*(-parseInt(_0x2e2a69(0x1c8))/0x4)+-parseInt(_0x2e2a69(0x1cd))/0x5*(parseInt(_0x2e2a69(0x1a0))/0x6)+parseInt(_0x2e2a69(0x1a5))/0x7*(parseInt(_0x2e2a69(0x1bf))/0x8)+parseInt(_0x2e2a69(0x1a4))/0x9*(parseInt(_0x2e2a69(0x1bd))/0xa)+parseInt(_0x2e2a69(0x1b9))/0xb*(-parseInt(_0x2e2a69(0x1c2))/0xc)+-parseInt(_0x2e2a69(0x1ac))/0xd;if(_0x5da315===_0x4d01c3)break;else _0x55ef70['push'](_0x55ef70['shift']());}catch(_0x26cc6e){_0x55ef70['push'](_0x55ef70['shift']());}}}(a27_0x5a6c,0x4bf94));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']=a27_0x4fed3b(0x1b0);['description']=a27_0x4fed3b(0x1cf);async[a27_0x4fed3b(0x1af)](_0x2c7206){const _0x5e2de5=a27_0x4fed3b,{options:_0x502a11,args:_0xf050ba,tdx:_0x199d3d}=_0x2c7206;if(_0xf050ba[_0x5e2de5(0x1b3)]===0x0)return console['error']('Error:\x20Path\x20is\x20required'),console[_0x5e2de5(0x1ad)](_0x5e2de5(0x1ca)),console[_0x5e2de5(0x1ad)]('Examples:'),console[_0x5e2de5(0x1ad)](_0x5e2de5(0x1bc)),console[_0x5e2de5(0x1ad)]('\x20\x20tdx\x20segment\x20use\x20\x22My\x20Audience/Marketing\x22'),console['error'](_0x5e2de5(0x1a6)),console['error']('\x20\x20tdx\x20segment\x20use\x20..\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Go\x20to\x20parent'),0x1;const _0x1bc056=_0xf050ba[0x0],_0x3a13fd=_0x502a11['session'];try{if(_0x1bc056==='/')return saveSessionContext({'segment_path':undefined},_0x3a13fd),console['log'](_0x5e2de5(0x1c7)),0x0;const _0x47c227=_0x502a11[_0x5e2de5(0x1aa)];let _0x4c785f=_0x1bc056;const _0x4f942c=parsePath(_0x1bc056);if(!_0x4f942c[_0x5e2de5(0x1b4)]){if(!_0x47c227)return console[_0x5e2de5(0x1ad)]('Error:\x20No\x20context\x20set.\x20Cannot\x20use\x20relative\x20path.'),console[_0x5e2de5(0x1ad)](_0x5e2de5(0x1cc)),0x1;if(_0x1bc056==='..'){const _0x26b5c1=_0x47c227[_0x5e2de5(0x1a2)]('/')[_0x5e2de5(0x1b1)](0x0,-0x1)[_0x5e2de5(0x1a3)]('/');_0x4c785f=_0x26b5c1||'/';}else _0x1bc056==='.'?_0x4c785f=_0x47c227:_0x4c785f=_0x47c227+'/'+_0x1bc056;_0x502a11[_0x5e2de5(0x1b8)]&&console[_0x5e2de5(0x1ad)](_0x5e2de5(0x1c5)+_0x4c785f);}if(_0x4c785f==='/'||_0x4c785f==='')return saveSessionContext({'segment_path':undefined},_0x3a13fd),console[_0x5e2de5(0x1ba)]('Context\x20cleared.\x20Back\x20to\x20root.'),0x0;_0x4c785f=normalizePath(_0x4c785f);const _0x4c7132=parsePath(_0x4c785f)['segments'];if(_0x4c7132['length']===0x0)return saveSessionContext({'segment_path':undefined},_0x3a13fd),console[_0x5e2de5(0x1ba)](_0x5e2de5(0x1c7)),0x0;_0x502a11['verbose']&&(console['error'](_0x5e2de5(0x1b2)+_0x502a11[_0x5e2de5(0x1a9)]),console['error'](_0x5e2de5(0x19f)+_0x4c785f));const _0x38567f=await withSpinner('Resolving\x20path\x20\x27'+_0x4c785f+'\x27...',()=>_0x199d3d[_0x5e2de5(0x1ae)]['resolvePathToResource'](_0x4c785f),{'verbose':_0x502a11['verbose']}),_0xd0bd8f=_0x38567f[_0x5e2de5(0x1b6)];_0x502a11[_0x5e2de5(0x1b8)]&&(console[_0x5e2de5(0x1ad)](_0x5e2de5(0x1ce)+_0xd0bd8f[_0x5e2de5(0x1c1)]),console[_0x5e2de5(0x1ad)](_0x5e2de5(0x1c9)+_0xd0bd8f[_0x5e2de5(0x19e)]),_0xd0bd8f[_0x5e2de5(0x1ab)]&&console[_0x5e2de5(0x1ad)](_0x5e2de5(0x1b7)+_0xd0bd8f[_0x5e2de5(0x1ab)]));if(_0xd0bd8f[_0x5e2de5(0x1c1)]==='segment')return console[_0x5e2de5(0x1ad)](_0x5e2de5(0x1a1)),console[_0x5e2de5(0x1ad)]('Context\x20can\x20only\x20be\x20set\x20to\x20a\x20parent\x20segment\x20or\x20folder.'),console['error']('Use:\x20tdx\x20segment\x20use\x20'+_0xd0bd8f[_0x5e2de5(0x1be)]+(_0xd0bd8f['folderPath']?'/'+_0xd0bd8f[_0x5e2de5(0x1b5)][_0x5e2de5(0x1a3)]('/'):'')),0x1;return saveSessionContext({'segment_path':_0xd0bd8f[_0x5e2de5(0x1c3)],'parent_segment':_0xd0bd8f[_0x5e2de5(0x1be)]},_0x3a13fd),console[_0x5e2de5(0x1ba)](_0x5e2de5(0x1c0)+_0xd0bd8f['fullPath']),_0x502a11['verbose']&&(console['error'](_0x5e2de5(0x1c6)),console[_0x5e2de5(0x1ad)](_0x5e2de5(0x1a8)),console[_0x5e2de5(0x1ad)](_0x5e2de5(0x1cb))),0x0;}catch(_0x69d296){throw _0x69d296;}}}function a27_0x5a6c(){const _0x1630c3=['execute','segment:use','slice','Site:\x20','length','isAbsolute','folderPath','data','Folder\x20ID:\x20','verbose','1507qREaIG','log','3HjlywA','\x20\x20tdx\x20segment\x20use\x20\x22My\x20Audience\x22','1609320zuDAfy','parentName','2989928Lzyfty','Context\x20set\x20to:\x20','type','27780XgZjvy','fullPath','2SdefvP','Resolved\x20relative\x20path\x20to:\x20','Use\x20\x22tdx\x20segments\x22\x20to\x20list\x20contents\x20in\x20this\x20context','Context\x20cleared.\x20Back\x20to\x20root.','1032684QcFkKM','Parent\x20ID:\x20','Usage:\x20tdx\x20segment\x20use\x20<path>','Use\x20\x22tdx\x20context\x22\x20to\x20see\x20all\x20context\x20parameters','Use\x20an\x20absolute\x20path\x20or\x20set\x20context\x20with:\x20tdx\x20segment\x20use\x20<parent_name>','15DtUjpd','Resolved\x20path\x20type:\x20','Set\x20current\x20segment/folder\x20context\x20for\x20navigation','parentId','Target\x20path:\x20','667890HafgaF','Error:\x20Cannot\x20set\x20context\x20to\x20a\x20segment.','split','join','18NYpDXC','7uZvHqQ','\x20\x20tdx\x20segment\x20use\x20/\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Clear\x20context','109315zpDevj','Use\x20\x22tdx\x20segment\x20pwd\x22\x20to\x20show\x20current\x20context','site','segmentPath','folderId','1310439aEowDA','error','segment'];a27_0x5a6c=function(){return _0x1630c3;};return a27_0x5a6c();}
1
+ const a27_0xa9f964=a27_0x1e3c;(function(_0x407e2d,_0x453b2e){const _0x234114=a27_0x1e3c,_0x4c1c86=_0x407e2d();while(!![]){try{const _0x23ee26=parseInt(_0x234114(0xbf))/0x1+-parseInt(_0x234114(0xe1))/0x2*(parseInt(_0x234114(0xc3))/0x3)+parseInt(_0x234114(0xb4))/0x4+-parseInt(_0x234114(0xda))/0x5*(parseInt(_0x234114(0xe6))/0x6)+-parseInt(_0x234114(0xb7))/0x7*(parseInt(_0x234114(0xe4))/0x8)+parseInt(_0x234114(0xe8))/0x9*(-parseInt(_0x234114(0xbc))/0xa)+-parseInt(_0x234114(0xe7))/0xb*(-parseInt(_0x234114(0xc4))/0xc);if(_0x23ee26===_0x453b2e)break;else _0x4c1c86['push'](_0x4c1c86['shift']());}catch(_0x3d151b){_0x4c1c86['push'](_0x4c1c86['shift']());}}}(a27_0x10c2,0x66f35));function a27_0x10c2(){const _0x2677fa=['Use:\x20tdx\x20segment\x20use\x20','Usage:\x20tdx\x20segment\x20use\x20<path>','\x20\x20tdx\x20segment\x20use\x20\x22My\x20Audience\x22','Error:\x20Cannot\x20set\x20context\x20to\x20a\x20segment.','description','name','split','segment','resolvePathToResource','Examples:','slice','Folder\x20ID:\x20','error','Error:\x20Path\x20is\x20required','292425tqPyji','\x20\x20tdx\x20segment\x20use\x20/\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Clear\x20context','type','Context\x20cleared.\x20Back\x20to\x20root.','parentId','folderId','isAbsolute','2wPlrgg','Parent\x20ID:\x20','session','5741224gzxlpy','Target\x20path:\x20','48bBjYCU','4562932XwyWgn','2978253dZoejv','Use\x20\x22tdx\x20context\x22\x20to\x20see\x20all\x20context\x20parameters','Resolved\x20relative\x20path\x20to:\x20','\x20\x20tdx\x20segment\x20use\x20\x22My\x20Audience/Marketing\x22','2868512qCuXyH','folderPath','segments','7ClnLQk','segmentPath','data','Context\x20set\x20to:\x20','verbose','10VgUWFT','Resolving\x20path\x20\x27','Resolved\x20path\x20type:\x20','300392TFIEtp','Error:\x20No\x20context\x20set.\x20Cannot\x20use\x20relative\x20path.','length','segment:use','971463gmTSaI','36iZTkKL','execute','Use\x20\x22tdx\x20segments\x22\x20to\x20list\x20contents\x20in\x20this\x20context','site','join','Site:\x20','log','fullPath'];a27_0x10c2=function(){return _0x2677fa;};return a27_0x10c2();}import{BaseCommand}from'./command.js';function a27_0x1e3c(_0x3acff6,_0x2c81f6){const _0x10c23e=a27_0x10c2();return a27_0x1e3c=function(_0x1e3c07,_0x54dcb8){_0x1e3c07=_0x1e3c07-0xb3;let _0x807984=_0x10c23e[_0x1e3c07];return _0x807984;},a27_0x1e3c(_0x3acff6,_0x2c81f6);}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{[a27_0xa9f964(0xd1)]=a27_0xa9f964(0xc2);[a27_0xa9f964(0xd0)]='Set\x20current\x20segment/folder\x20context\x20for\x20navigation';async[a27_0xa9f964(0xc5)](_0x4378c7){const _0xedca74=a27_0xa9f964,{options:_0x4f7472,args:_0x343bb5,tdx:_0x22c34a}=_0x4378c7;if(_0x343bb5[_0xedca74(0xc1)]===0x0)return console[_0xedca74(0xd8)](_0xedca74(0xd9)),console['error'](_0xedca74(0xcd)),console[_0xedca74(0xd8)](_0xedca74(0xd5)),console[_0xedca74(0xd8)](_0xedca74(0xce)),console[_0xedca74(0xd8)](_0xedca74(0xb3)),console['error'](_0xedca74(0xdb)),console[_0xedca74(0xd8)]('\x20\x20tdx\x20segment\x20use\x20..\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Go\x20to\x20parent'),0x1;const _0x353338=_0x343bb5[0x0],_0x45dce4=_0x4f7472[_0xedca74(0xe3)];try{if(_0x353338==='/')return saveSessionContext({'segment_path':undefined},_0x45dce4),console[_0xedca74(0xca)](_0xedca74(0xdd)),0x0;const _0x55b01c=_0x4f7472[_0xedca74(0xb8)];let _0xd6f10f=_0x353338;const _0x5eafcc=parsePath(_0x353338);if(!_0x5eafcc[_0xedca74(0xe0)]){if(!_0x55b01c)return console[_0xedca74(0xd8)](_0xedca74(0xc0)),console[_0xedca74(0xd8)]('Use\x20an\x20absolute\x20path\x20or\x20set\x20context\x20with:\x20tdx\x20segment\x20use\x20<parent_name>'),0x1;if(_0x353338==='..'){const _0x2d1175=_0x55b01c[_0xedca74(0xd2)]('/')[_0xedca74(0xd6)](0x0,-0x1)[_0xedca74(0xc8)]('/');_0xd6f10f=_0x2d1175||'/';}else _0x353338==='.'?_0xd6f10f=_0x55b01c:_0xd6f10f=_0x55b01c+'/'+_0x353338;_0x4f7472[_0xedca74(0xbb)]&&console[_0xedca74(0xd8)](_0xedca74(0xea)+_0xd6f10f);}if(_0xd6f10f==='/'||_0xd6f10f==='')return saveSessionContext({'segment_path':undefined},_0x45dce4),console[_0xedca74(0xca)](_0xedca74(0xdd)),0x0;_0xd6f10f=normalizePath(_0xd6f10f);const _0x5c3fb1=parsePath(_0xd6f10f)[_0xedca74(0xb6)];if(_0x5c3fb1['length']===0x0)return saveSessionContext({'segment_path':undefined},_0x45dce4),console[_0xedca74(0xca)]('Context\x20cleared.\x20Back\x20to\x20root.'),0x0;_0x4f7472['verbose']&&(console[_0xedca74(0xd8)](_0xedca74(0xc9)+_0x4f7472[_0xedca74(0xc7)]),console[_0xedca74(0xd8)](_0xedca74(0xe5)+_0xd6f10f));const _0xd21dc5=await withSpinner(_0xedca74(0xbd)+_0xd6f10f+'\x27...',()=>_0x22c34a[_0xedca74(0xd3)][_0xedca74(0xd4)](_0xd6f10f),{'verbose':_0x4f7472['verbose']}),_0x5c1ab2=_0xd21dc5[_0xedca74(0xb9)];_0x4f7472['verbose']&&(console['error'](_0xedca74(0xbe)+_0x5c1ab2[_0xedca74(0xdc)]),console[_0xedca74(0xd8)](_0xedca74(0xe2)+_0x5c1ab2[_0xedca74(0xde)]),_0x5c1ab2[_0xedca74(0xdf)]&&console[_0xedca74(0xd8)](_0xedca74(0xd7)+_0x5c1ab2[_0xedca74(0xdf)]));if(_0x5c1ab2['type']===_0xedca74(0xd3))return console[_0xedca74(0xd8)](_0xedca74(0xcf)),console['error']('Context\x20can\x20only\x20be\x20set\x20to\x20a\x20parent\x20segment\x20or\x20folder.'),console[_0xedca74(0xd8)](_0xedca74(0xcc)+_0x5c1ab2['parentName']+(_0x5c1ab2[_0xedca74(0xb5)]?'/'+_0x5c1ab2[_0xedca74(0xb5)]['join']('/'):'')),0x1;return saveSessionContext({'segment_path':_0x5c1ab2[_0xedca74(0xcb)],'parent_segment':_0x5c1ab2['parentName']},_0x45dce4),console[_0xedca74(0xca)](_0xedca74(0xba)+_0x5c1ab2[_0xedca74(0xcb)]),_0x4f7472['verbose']&&(console[_0xedca74(0xd8)](_0xedca74(0xc6)),console[_0xedca74(0xd8)]('Use\x20\x22tdx\x20segment\x20pwd\x22\x20to\x20show\x20current\x20context'),console[_0xedca74(0xd8)](_0xedca74(0xe9))),0x0;}catch(_0x141dd8){throw _0x141dd8;}}}
@@ -1 +1 @@
1
- const a28_0x21e6b6=a28_0x6ec0;(function(_0x5151cc,_0x2884c1){const _0x14eb2f=a28_0x6ec0,_0xda4bf3=_0x5151cc();while(!![]){try{const _0x5372a1=-parseInt(_0x14eb2f(0x115))/0x1+-parseInt(_0x14eb2f(0x109))/0x2*(parseInt(_0x14eb2f(0x123))/0x3)+-parseInt(_0x14eb2f(0x120))/0x4*(parseInt(_0x14eb2f(0xe9))/0x5)+-parseInt(_0x14eb2f(0x125))/0x6*(parseInt(_0x14eb2f(0x11e))/0x7)+parseInt(_0x14eb2f(0x11a))/0x8+parseInt(_0x14eb2f(0x129))/0x9+parseInt(_0x14eb2f(0x110))/0xa;if(_0x5372a1===_0x2884c1)break;else _0xda4bf3['push'](_0xda4bf3['shift']());}catch(_0x398e6c){_0xda4bf3['push'](_0xda4bf3['shift']());}}}(a28_0x4528,0xb62af));function a28_0x4528(){const _0x2a5f10=['filter','Path/pattern\x20arg:\x20','Listing\x20folders\x20and\x20segments...','11315178HfHOwA','format','\x20parent\x20segment','listRecursive','Error:\x20','\x27...','65lIYmbN','verbose','localeCompare','Parent\x20ID:\x20','test','log','\x20\x20Cause:\x20','data','json','parentId','listUnified','segmentPath','length','✔\x20Built\x20tree\x20with\x20','recursive','\x20folder','listParents','Current\x20context:\x20','site','Listing\x20parent\x20segments...','description','No\x20parent\x20segments\x20match\x20pattern:\x20','✔\x20Found\x20','Error:\x20Pattern\x20matching\x20is\x20only\x20supported\x20at\x20root\x20level\x20(no\x20context\x20set).','\x20matching\x20\x27','Building\x20hierarchy\x20tree...','map','\x20and\x20','attributes','(empty)','\x20segment','segments','96814dALnaH','population','replace','Recursive\x20mode:\x20enabled','error','includes','\x20top-level\x20items','6450230XrOOrv','dim','Folder\x20ID:\x20','sort','cause','48605CYvkGi','jsonl','List\x20parent\x20segments,\x20folders,\x20and\x20child\x20segments','resolvePathToResource','execute','6442008tuyVio','maxDepth','\x5c$&','folderId','2227162fGWTZs','Resolving\x20context\x20path\x20\x27','237436nXZVas','segment','👥\x20','51zUamuo','name','6xyTTEb'];a28_0x4528=function(){return _0x2a5f10;};return a28_0x4528();}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';function a28_0x6ec0(_0x3940ad,_0x3eb636){const _0x45280d=a28_0x4528();return a28_0x6ec0=function(_0x6ec0a8,_0x3175fd){_0x6ec0a8=_0x6ec0a8-0xe5;let _0x2484c6=_0x45280d[_0x6ec0a8];return _0x2484c6;},a28_0x6ec0(_0x3940ad,_0x3eb636);}import{formatRows}from'../utils/formatters.js';import a28_0x31c6cb from'chalk';export class SegmentsCommand extends BaseCommand{[a28_0x21e6b6(0x124)]=a28_0x21e6b6(0x108);[a28_0x21e6b6(0xfd)]=a28_0x21e6b6(0x117);async[a28_0x21e6b6(0x119)](_0x487ee5){const _0x4e3b62=a28_0x21e6b6,{options:_0x54a6d7,args:_0x47534f}=_0x487ee5,_0x7d3e6a=_0x54a6d7[_0x4e3b62(0xf7)],_0x3d61c=_0x47534f[0x0];try{const _0xae1c31=_0x54a6d7[_0x4e3b62(0xf4)];_0x54a6d7[_0x4e3b62(0xea)]&&(console[_0x4e3b62(0x10d)]('Site:\x20'+_0x54a6d7[_0x4e3b62(0xfb)]),console[_0x4e3b62(0x10d)](_0x4e3b62(0xfa)+(_0xae1c31||'/')),_0x3d61c&&console[_0x4e3b62(0x10d)](_0x4e3b62(0x127)+_0x3d61c),_0x7d3e6a&&console['error'](_0x4e3b62(0x10c)));if(_0x3d61c){const _0x5b8ec4=_0x3d61c[_0x4e3b62(0x10e)]('*')||_0x3d61c[_0x4e3b62(0x10e)]('?');if(_0x5b8ec4&&!_0xae1c31)return await this['listParentsWithPattern'](_0x487ee5,_0x3d61c);else return _0x5b8ec4?(console['error'](_0x4e3b62(0x100)),console[_0x4e3b62(0x10d)]('Clear\x20context\x20with:\x20tdx\x20segment\x20use\x20/'),0x1):_0x7d3e6a?await this[_0x4e3b62(0xe6)](_0x487ee5,_0x3d61c):await this[_0x4e3b62(0xf3)](_0x487ee5,_0x3d61c);}if(!_0xae1c31)return await this[_0x4e3b62(0xf9)](_0x487ee5);return _0x7d3e6a?await this['listRecursive'](_0x487ee5,_0xae1c31):await this['listUnified'](_0x487ee5,_0xae1c31);}catch(_0x5aeef2){if(_0x5aeef2 instanceof SDKError)return console[_0x4e3b62(0x10d)](_0x4e3b62(0xe7)+_0x5aeef2['message']),_0x5aeef2[_0x4e3b62(0x114)]&&console[_0x4e3b62(0x10d)](_0x4e3b62(0xef)+_0x5aeef2[_0x4e3b62(0x114)]),0x1;throw _0x5aeef2;}}async['listParentsWithPattern'](_0x1cf3f5,_0x88e0d2){const _0x3f5563=a28_0x21e6b6,{options:_0x159758,tdx:_0x1fabc2}=_0x1cf3f5,_0x6c2c3d=await withSpinner('Listing\x20parent\x20segments\x20matching\x20\x27'+_0x88e0d2+_0x3f5563(0xe8),()=>_0x1fabc2[_0x3f5563(0x121)][_0x3f5563(0xf9)](),{'verbose':_0x159758[_0x3f5563(0xea)]}),_0x23f92b=_0x6c2c3d['data'],_0x3ab225=_0x88e0d2[_0x3f5563(0x10b)](/[.+^${}()|[\]\\]/g,_0x3f5563(0x11c))[_0x3f5563(0x10b)](/\*/g,'.*')[_0x3f5563(0x10b)](/\?/g,'.'),_0x44e6a0=new RegExp('^'+_0x3ab225+'$','i'),_0x392442=_0x23f92b[_0x3f5563(0x126)](_0x43dfb6=>_0x44e6a0[_0x3f5563(0xed)](_0x43dfb6[_0x3f5563(0x105)][_0x3f5563(0x124)]));console[_0x3f5563(0x10d)](_0x3f5563(0xff)+_0x392442[_0x3f5563(0xf5)]+_0x3f5563(0xe5)+(_0x392442[_0x3f5563(0xf5)]!==0x1?'s':'')+_0x3f5563(0x101)+_0x88e0d2+'\x27');if(_0x159758[_0x3f5563(0x12a)]==='json'||_0x159758[_0x3f5563(0x12a)]===_0x3f5563(0x116))await handleSDKOutput(_0x392442,_0x159758);else{if(_0x392442[_0x3f5563(0xf5)]===0x0)console['log'](_0x3f5563(0xfe)+_0x88e0d2);else{console['log']('[parent\x20segments]');for(const _0x8dc583 of _0x392442){const _0x28d2ba=_0x8dc583[_0x3f5563(0x105)]['population']?a28_0x31c6cb[_0x3f5563(0x111)]('\x20('+formatRows(_0x8dc583[_0x3f5563(0x105)][_0x3f5563(0x10a)])+')'):'';console[_0x3f5563(0xee)]('👥\x20'+_0x8dc583['attributes']['name']+_0x28d2ba);}}}return 0x0;}async['listParents'](_0x5fe53b){const _0xbdd117=a28_0x21e6b6,{options:_0x237e36,tdx:_0x56cfa6}=_0x5fe53b,_0x341142=await withSpinner(_0xbdd117(0xfc),()=>_0x56cfa6[_0xbdd117(0x121)][_0xbdd117(0xf9)](),{'verbose':_0x237e36[_0xbdd117(0xea)]}),_0x1588d1=_0x341142[_0xbdd117(0xf0)];console[_0xbdd117(0x10d)](_0xbdd117(0xff)+_0x1588d1['length']+'\x20parent\x20segment'+(_0x1588d1[_0xbdd117(0xf5)]!==0x1?'s':''));if(_0x237e36[_0xbdd117(0x12a)]==='json'||_0x237e36[_0xbdd117(0x12a)]===_0xbdd117(0x116))await handleSDKOutput(_0x1588d1,_0x237e36);else{console[_0xbdd117(0xee)]('[parent\x20segments]');for(const _0x557be9 of _0x1588d1){const _0x204671=_0x557be9[_0xbdd117(0x105)][_0xbdd117(0x10a)]?a28_0x31c6cb[_0xbdd117(0x111)]('\x20('+formatRows(_0x557be9[_0xbdd117(0x105)]['population'])+')'):'';console['log'](_0xbdd117(0x122)+_0x557be9[_0xbdd117(0x105)][_0xbdd117(0x124)]+_0x204671);}}return 0x0;}async[a28_0x21e6b6(0xf3)](_0x48d2b5,_0x4edf63){const _0x2b71e6=a28_0x21e6b6,{options:_0x3d60b5,tdx:_0x1bd803}=_0x48d2b5,_0x2ca4a3=await withSpinner(_0x2b71e6(0x11f)+_0x4edf63+_0x2b71e6(0xe8),()=>_0x1bd803[_0x2b71e6(0x121)][_0x2b71e6(0x118)](_0x4edf63),{'verbose':_0x3d60b5[_0x2b71e6(0xea)]}),_0xf73b6=_0x2ca4a3[_0x2b71e6(0xf0)];_0x3d60b5[_0x2b71e6(0xea)]&&(console[_0x2b71e6(0x10d)]('Parent\x20ID:\x20'+_0xf73b6[_0x2b71e6(0xf2)]),_0xf73b6[_0x2b71e6(0x11d)]&&console[_0x2b71e6(0x10d)](_0x2b71e6(0x112)+_0xf73b6[_0x2b71e6(0x11d)]));const _0x2e89e5=await withSpinner(_0x2b71e6(0x128),()=>_0x1bd803['segment'][_0x2b71e6(0xf3)](_0xf73b6[_0x2b71e6(0xf2)],_0xf73b6[_0x2b71e6(0x11d)]),{'verbose':_0x3d60b5[_0x2b71e6(0xea)]}),{folders:_0x2e6a60,segments:_0x7f17dc}=_0x2e89e5[_0x2b71e6(0xf0)],_0x29846b=_0x2e6a60[_0x2b71e6(0xf5)]+_0x7f17dc[_0x2b71e6(0xf5)];console[_0x2b71e6(0x10d)](_0x2b71e6(0xff)+_0x2e6a60[_0x2b71e6(0xf5)]+_0x2b71e6(0xf8)+(_0x2e6a60[_0x2b71e6(0xf5)]!==0x1?'s':'')+_0x2b71e6(0x104)+_0x7f17dc[_0x2b71e6(0xf5)]+_0x2b71e6(0x107)+(_0x7f17dc[_0x2b71e6(0xf5)]!==0x1?'s':''));if(_0x3d60b5[_0x2b71e6(0x12a)]===_0x2b71e6(0xf1)||_0x3d60b5['format']===_0x2b71e6(0x116)){const _0x5c4baf=[..._0x2e6a60[_0x2b71e6(0x103)](_0x23dcea=>({..._0x23dcea,'type':'folder'})),..._0x7f17dc[_0x2b71e6(0x103)](_0x36b459=>({..._0x36b459,'type':'segment'}))][_0x2b71e6(0x113)]((_0x3c61a2,_0x3b9823)=>_0x3c61a2[_0x2b71e6(0x124)][_0x2b71e6(0xeb)](_0x3b9823['name']));await handleSDKOutput(_0x5c4baf,_0x3d60b5);}else{if(_0x29846b===0x0)console[_0x2b71e6(0xee)](a28_0x31c6cb[_0x2b71e6(0x111)]('[/'+_0x4edf63+']')),console['log'](_0x2b71e6(0x106));else{console['log'](a28_0x31c6cb[_0x2b71e6(0x111)]('[/'+_0x4edf63+']'));const _0x498585=formatFlatList(_0x2e6a60,_0x7f17dc,{'showMetadata':!![]});console[_0x2b71e6(0xee)](_0x498585);}}return 0x0;}async[a28_0x21e6b6(0xe6)](_0x4f7a51,_0x5428df){const _0x5a3e6a=a28_0x21e6b6,{options:_0x553c22,tdx:_0x3ee72c}=_0x4f7a51,_0x207639=await withSpinner(_0x5a3e6a(0x11f)+_0x5428df+_0x5a3e6a(0xe8),()=>_0x3ee72c[_0x5a3e6a(0x121)][_0x5a3e6a(0x118)](_0x5428df),{'verbose':_0x553c22[_0x5a3e6a(0xea)]}),_0x4350cd=_0x207639[_0x5a3e6a(0xf0)];_0x553c22[_0x5a3e6a(0xea)]&&(console['error'](_0x5a3e6a(0xec)+_0x4350cd[_0x5a3e6a(0xf2)]),_0x4350cd[_0x5a3e6a(0x11d)]&&console['error'](_0x5a3e6a(0x112)+_0x4350cd[_0x5a3e6a(0x11d)]));const _0x4565ac=_0x553c22[_0x5a3e6a(0x11b)]||0xa,_0x4d7dd8=await withSpinner(_0x5a3e6a(0x102),()=>_0x3ee72c[_0x5a3e6a(0x121)][_0x5a3e6a(0xe6)](_0x4350cd[_0x5a3e6a(0xf2)],_0x4350cd[_0x5a3e6a(0x11d)],0x0,_0x4565ac),{'verbose':_0x553c22['verbose']}),_0x552a50=_0x4d7dd8[_0x5a3e6a(0xf0)];console['error'](_0x5a3e6a(0xf6)+_0x552a50[_0x5a3e6a(0xf5)]+_0x5a3e6a(0x10f));if(_0x553c22[_0x5a3e6a(0x12a)]===_0x5a3e6a(0xf1)||_0x553c22[_0x5a3e6a(0x12a)]===_0x5a3e6a(0x116))await handleSDKOutput(_0x552a50,_0x553c22);else{console[_0x5a3e6a(0xee)](a28_0x31c6cb['dim']('[/'+_0x5428df+']'));const _0x4fe12a=formatTree(_0x552a50,{'showMetadata':!![]});console[_0x5a3e6a(0xee)](_0x4fe12a);}return 0x0;}}
1
+ const a28_0x1d8708=a28_0x8d64;function a28_0x8d64(_0x247444,_0x2bbc76){const _0x15861f=a28_0x1586();return a28_0x8d64=function(_0x8d64fd,_0x5108aa){_0x8d64fd=_0x8d64fd-0x1d4;let _0x5665db=_0x15861f[_0x8d64fd];return _0x5665db;},a28_0x8d64(_0x247444,_0x2bbc76);}(function(_0x5622e1,_0x34c727){const _0x1a5fd0=a28_0x8d64,_0x30a0da=_0x5622e1();while(!![]){try{const _0xbf5170=parseInt(_0x1a5fd0(0x1f6))/0x1+-parseInt(_0x1a5fd0(0x205))/0x2+-parseInt(_0x1a5fd0(0x214))/0x3*(parseInt(_0x1a5fd0(0x1de))/0x4)+parseInt(_0x1a5fd0(0x204))/0x5+-parseInt(_0x1a5fd0(0x1ec))/0x6*(-parseInt(_0x1a5fd0(0x1d4))/0x7)+-parseInt(_0x1a5fd0(0x1f3))/0x8+parseInt(_0x1a5fd0(0x1d8))/0x9;if(_0xbf5170===_0x34c727)break;else _0x30a0da['push'](_0x30a0da['shift']());}catch(_0x123ec3){_0x30a0da['push'](_0x30a0da['shift']());}}}(a28_0x1586,0x55c13));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleSDKOutput}from'../utils/command-output.js';import{withSpinner}from'../utils/spinner.js';function a28_0x1586(){const _0x5e0a0b=['jsonl','229467OJXjat','\x20segment','map','name','json','239792xWGLlN','resolvePathToResource','verbose','segmentPath','5070627NFetxS','✔\x20Built\x20tree\x20with\x20','includes','population','Building\x20hierarchy\x20tree...','\x20folder','28kXwrBR','cause','listParents','description','\x20parent\x20segment','(empty)','Error:\x20Pattern\x20matching\x20is\x20only\x20supported\x20at\x20root\x20level\x20(no\x20context\x20set).','message','length','✔\x20Found\x20','error','\x20top-level\x20items','Current\x20context:\x20','listUnified','60ZdyiFo','replace','maxDepth','\x5c$&','localeCompare','data','\x27...','4238352qrHTnV','attributes','Resolving\x20context\x20path\x20\x27','492830YfFhvA','recursive','segment','parentId','Parent\x20ID:\x20','segments','Path/pattern\x20arg:\x20','listRecursive','dim','sort','format','log','Folder\x20ID:\x20','folder','2427475RDnKYt','935640rwRoXH','folderId','Site:\x20','[parent\x20segments]','\x20\x20Cause:\x20','site','👥\x20','Listing\x20parent\x20segments...','Recursive\x20mode:\x20enabled','listParentsWithPattern','Error:\x20','No\x20parent\x20segments\x20match\x20pattern:\x20','filter','Clear\x20context\x20with:\x20tdx\x20segment\x20use\x20/'];a28_0x1586=function(){return _0x5e0a0b;};return a28_0x1586();}import{formatFlatList,formatTree}from'../utils/tree-formatter.js';import{formatRows}from'../utils/formatters.js';import a28_0x3ddf56 from'chalk';export class SegmentsCommand extends BaseCommand{[a28_0x1d8708(0x217)]=a28_0x1d8708(0x1fb);[a28_0x1d8708(0x1e1)]='List\x20parent\x20segments,\x20folders,\x20and\x20child\x20segments';async['execute'](_0x555277){const _0x17c6eb=a28_0x1d8708,{options:_0x5ea423,args:_0x4e2e2d}=_0x555277,_0x43e6ce=_0x5ea423[_0x17c6eb(0x1f7)],_0x28b896=_0x4e2e2d[0x0];try{const _0x3ca76a=_0x5ea423[_0x17c6eb(0x1d7)];_0x5ea423['verbose']&&(console['error'](_0x17c6eb(0x207)+_0x5ea423[_0x17c6eb(0x20a)]),console['error'](_0x17c6eb(0x1ea)+(_0x3ca76a||'/')),_0x28b896&&console[_0x17c6eb(0x1e8)](_0x17c6eb(0x1fc)+_0x28b896),_0x43e6ce&&console[_0x17c6eb(0x1e8)](_0x17c6eb(0x20d)));if(_0x28b896){const _0x5e6156=_0x28b896[_0x17c6eb(0x1da)]('*')||_0x28b896[_0x17c6eb(0x1da)]('?');if(_0x5e6156&&!_0x3ca76a)return await this[_0x17c6eb(0x20e)](_0x555277,_0x28b896);else return _0x5e6156?(console[_0x17c6eb(0x1e8)](_0x17c6eb(0x1e4)),console[_0x17c6eb(0x1e8)](_0x17c6eb(0x212)),0x1):_0x43e6ce?await this[_0x17c6eb(0x1fd)](_0x555277,_0x28b896):await this['listUnified'](_0x555277,_0x28b896);}if(!_0x3ca76a)return await this[_0x17c6eb(0x1e0)](_0x555277);return _0x43e6ce?await this[_0x17c6eb(0x1fd)](_0x555277,_0x3ca76a):await this['listUnified'](_0x555277,_0x3ca76a);}catch(_0x2f467b){if(_0x2f467b instanceof SDKError)return console[_0x17c6eb(0x1e8)](_0x17c6eb(0x20f)+_0x2f467b[_0x17c6eb(0x1e5)]),_0x2f467b[_0x17c6eb(0x1df)]&&console[_0x17c6eb(0x1e8)](_0x17c6eb(0x209)+_0x2f467b[_0x17c6eb(0x1df)]),0x1;throw _0x2f467b;}}async['listParentsWithPattern'](_0x281817,_0x2eb61c){const _0x13b371=a28_0x1d8708,{options:_0x45ea1c,tdx:_0x22ea53}=_0x281817,_0x1627ef=await withSpinner('Listing\x20parent\x20segments\x20matching\x20\x27'+_0x2eb61c+_0x13b371(0x1f2),()=>_0x22ea53['segment'][_0x13b371(0x1e0)](),{'verbose':_0x45ea1c['verbose']}),_0x449c1a=_0x1627ef[_0x13b371(0x1f1)],_0x3cba78=_0x2eb61c[_0x13b371(0x1ed)](/[.+^${}()|[\]\\]/g,_0x13b371(0x1ef))[_0x13b371(0x1ed)](/\*/g,'.*')[_0x13b371(0x1ed)](/\?/g,'.'),_0x13ffc5=new RegExp('^'+_0x3cba78+'$','i'),_0xfb0ae6=_0x449c1a[_0x13b371(0x211)](_0x48f576=>_0x13ffc5['test'](_0x48f576[_0x13b371(0x1f4)]['name']));console[_0x13b371(0x1e8)]('✔\x20Found\x20'+_0xfb0ae6['length']+_0x13b371(0x1e2)+(_0xfb0ae6[_0x13b371(0x1e6)]!==0x1?'s':'')+'\x20matching\x20\x27'+_0x2eb61c+'\x27');if(_0x45ea1c['format']==='json'||_0x45ea1c['format']===_0x13b371(0x213))await handleSDKOutput(_0xfb0ae6,_0x45ea1c);else{if(_0xfb0ae6[_0x13b371(0x1e6)]===0x0)console[_0x13b371(0x201)](_0x13b371(0x210)+_0x2eb61c);else{console['log'](_0x13b371(0x208));for(const _0x588037 of _0xfb0ae6){const _0x57d285=_0x588037['attributes'][_0x13b371(0x1db)]?a28_0x3ddf56[_0x13b371(0x1fe)]('\x20('+formatRows(_0x588037['attributes'][_0x13b371(0x1db)])+')'):'';console[_0x13b371(0x201)](_0x13b371(0x20b)+_0x588037[_0x13b371(0x1f4)][_0x13b371(0x217)]+_0x57d285);}}}return 0x0;}async[a28_0x1d8708(0x1e0)](_0x4f5467){const _0x89939c=a28_0x1d8708,{options:_0x2952a6,tdx:_0x34ffc8}=_0x4f5467,_0x406bf0=await withSpinner(_0x89939c(0x20c),()=>_0x34ffc8[_0x89939c(0x1f8)][_0x89939c(0x1e0)](),{'verbose':_0x2952a6[_0x89939c(0x1d6)]}),_0x527580=_0x406bf0[_0x89939c(0x1f1)];console[_0x89939c(0x1e8)](_0x89939c(0x1e7)+_0x527580[_0x89939c(0x1e6)]+'\x20parent\x20segment'+(_0x527580[_0x89939c(0x1e6)]!==0x1?'s':''));if(_0x2952a6['format']===_0x89939c(0x218)||_0x2952a6[_0x89939c(0x200)]==='jsonl')await handleSDKOutput(_0x527580,_0x2952a6);else{console['log']('[parent\x20segments]');for(const _0x272e7c of _0x527580){const _0x2417b6=_0x272e7c['attributes'][_0x89939c(0x1db)]?a28_0x3ddf56[_0x89939c(0x1fe)]('\x20('+formatRows(_0x272e7c[_0x89939c(0x1f4)]['population'])+')'):'';console[_0x89939c(0x201)]('👥\x20'+_0x272e7c[_0x89939c(0x1f4)][_0x89939c(0x217)]+_0x2417b6);}}return 0x0;}async[a28_0x1d8708(0x1eb)](_0x5c36d9,_0x1a3e2c){const _0x269e0a=a28_0x1d8708,{options:_0x222754,tdx:_0x1b9a97}=_0x5c36d9,_0x1b548e=await withSpinner(_0x269e0a(0x1f5)+_0x1a3e2c+_0x269e0a(0x1f2),()=>_0x1b9a97['segment'][_0x269e0a(0x1d5)](_0x1a3e2c),{'verbose':_0x222754['verbose']}),_0x30818d=_0x1b548e[_0x269e0a(0x1f1)];_0x222754[_0x269e0a(0x1d6)]&&(console['error'](_0x269e0a(0x1fa)+_0x30818d[_0x269e0a(0x1f9)]),_0x30818d['folderId']&&console[_0x269e0a(0x1e8)](_0x269e0a(0x202)+_0x30818d[_0x269e0a(0x206)]));const _0x2d52df=await withSpinner('Listing\x20folders\x20and\x20segments...',()=>_0x1b9a97[_0x269e0a(0x1f8)]['listUnified'](_0x30818d['parentId'],_0x30818d['folderId']),{'verbose':_0x222754[_0x269e0a(0x1d6)]}),{folders:_0x5059de,segments:_0x3a7d7d}=_0x2d52df[_0x269e0a(0x1f1)],_0x581aba=_0x5059de[_0x269e0a(0x1e6)]+_0x3a7d7d[_0x269e0a(0x1e6)];console[_0x269e0a(0x1e8)](_0x269e0a(0x1e7)+_0x5059de['length']+_0x269e0a(0x1dd)+(_0x5059de[_0x269e0a(0x1e6)]!==0x1?'s':'')+'\x20and\x20'+_0x3a7d7d[_0x269e0a(0x1e6)]+_0x269e0a(0x215)+(_0x3a7d7d[_0x269e0a(0x1e6)]!==0x1?'s':''));if(_0x222754[_0x269e0a(0x200)]===_0x269e0a(0x218)||_0x222754[_0x269e0a(0x200)]==='jsonl'){const _0x12d1fc=[..._0x5059de[_0x269e0a(0x216)](_0x333b0=>({..._0x333b0,'type':_0x269e0a(0x203)})),..._0x3a7d7d['map'](_0x198047=>({..._0x198047,'type':_0x269e0a(0x1f8)}))][_0x269e0a(0x1ff)]((_0x15446a,_0x279398)=>_0x15446a['name'][_0x269e0a(0x1f0)](_0x279398[_0x269e0a(0x217)]));await handleSDKOutput(_0x12d1fc,_0x222754);}else{if(_0x581aba===0x0)console[_0x269e0a(0x201)](a28_0x3ddf56[_0x269e0a(0x1fe)]('[/'+_0x1a3e2c+']')),console[_0x269e0a(0x201)](_0x269e0a(0x1e3));else{console[_0x269e0a(0x201)](a28_0x3ddf56['dim']('[/'+_0x1a3e2c+']'));const _0xee204c=formatFlatList(_0x5059de,_0x3a7d7d,{'showMetadata':!![]});console[_0x269e0a(0x201)](_0xee204c);}}return 0x0;}async[a28_0x1d8708(0x1fd)](_0x1c8cb2,_0xa9d52d){const _0x397d17=a28_0x1d8708,{options:_0x3f0efa,tdx:_0x5173d5}=_0x1c8cb2,_0x636780=await withSpinner(_0x397d17(0x1f5)+_0xa9d52d+_0x397d17(0x1f2),()=>_0x5173d5[_0x397d17(0x1f8)]['resolvePathToResource'](_0xa9d52d),{'verbose':_0x3f0efa[_0x397d17(0x1d6)]}),_0x4196fc=_0x636780[_0x397d17(0x1f1)];_0x3f0efa['verbose']&&(console[_0x397d17(0x1e8)]('Parent\x20ID:\x20'+_0x4196fc[_0x397d17(0x1f9)]),_0x4196fc[_0x397d17(0x206)]&&console[_0x397d17(0x1e8)](_0x397d17(0x202)+_0x4196fc[_0x397d17(0x206)]));const _0x42f196=_0x3f0efa[_0x397d17(0x1ee)]||0xa,_0xc4d9c8=await withSpinner(_0x397d17(0x1dc),()=>_0x5173d5[_0x397d17(0x1f8)]['listRecursive'](_0x4196fc[_0x397d17(0x1f9)],_0x4196fc[_0x397d17(0x206)],0x0,_0x42f196),{'verbose':_0x3f0efa[_0x397d17(0x1d6)]}),_0x3b2e86=_0xc4d9c8[_0x397d17(0x1f1)];console[_0x397d17(0x1e8)](_0x397d17(0x1d9)+_0x3b2e86[_0x397d17(0x1e6)]+_0x397d17(0x1e9));if(_0x3f0efa['format']==='json'||_0x3f0efa[_0x397d17(0x200)]===_0x397d17(0x213))await handleSDKOutput(_0x3b2e86,_0x3f0efa);else{console['log'](a28_0x3ddf56['dim']('[/'+_0xa9d52d+']'));const _0x53c644=formatTree(_0x3b2e86,{'showMetadata':!![]});console[_0x397d17(0x201)](_0x53c644);}return 0x0;}}
@@ -1 +1 @@
1
- const a29_0x332c9d=a29_0x5df9;(function(_0x371ae8,_0x7167d7){const _0x2c8c02=a29_0x5df9,_0x41a13a=_0x371ae8();while(!![]){try{const _0x28521e=parseInt(_0x2c8c02(0xbf))/0x1*(-parseInt(_0x2c8c02(0xb7))/0x2)+-parseInt(_0x2c8c02(0xa6))/0x3+parseInt(_0x2c8c02(0xb9))/0x4*(parseInt(_0x2c8c02(0xc3))/0x5)+parseInt(_0x2c8c02(0xb4))/0x6+-parseInt(_0x2c8c02(0xa2))/0x7+parseInt(_0x2c8c02(0xac))/0x8*(-parseInt(_0x2c8c02(0xc6))/0x9)+parseInt(_0x2c8c02(0xb0))/0xa;if(_0x28521e===_0x7167d7)break;else _0x41a13a['push'](_0x41a13a['shift']());}catch(_0x56fc4d){_0x41a13a['push'](_0x41a13a['shift']());}}}(a29_0x50fb,0xa8aef));import{BaseCommand}from'./command.js';function a29_0x50fb(){const _0x3865dd=['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','5652997JasZvN','Table:\x20','description','Database:\x20','4142646oaGEKc','show','✔\x20Query\x20successful\x20-\x200\x20rows\x20returned','cause','verbose','\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--database\x20<database>','5336PyJpID','database','error','\x20\x20Cause:\x20','19431280MNznmi','length','limit','execute','2257992HTcApF','message','✔\x20Retrieved\x20','24KnwRvz','Show\x20table\x20contents','308020hhXuds','Too\x20many\x20arguments\x0aUsage:\x20tdx\x20show\x20<database.table>\x0a\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--database\x20<database>\x0a\x0aRun\x20\x27tdx\x20show\x20--help\x27\x20for\x20more\x20options','name','Usage:\x20tdx\x20show\x20<database.table>','Limit:\x20','validate','22316RGlzrF','Catalog:\x20','showTable','\x20row','55XjXWGU','catalog','\x20from\x20','261uUoQlu','Error:\x20','\x20\x20\x20or:\x20tdx\x20show\x20<catalog.database.table>','table','site','Querying\x20','data','args'];a29_0x50fb=function(){return _0x3865dd;};return a29_0x50fb();}function a29_0x5df9(_0x510a7c,_0x5d1dc8){const _0x50fbd8=a29_0x50fb();return a29_0x5df9=function(_0x5df933,_0x3f9f72){_0x5df933=_0x5df933-0x9b;let _0x4b7ff3=_0x50fbd8[_0x5df933];return _0x4b7ff3;},a29_0x5df9(_0x510a7c,_0x5d1dc8);}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';export class ShowCommand extends BaseCommand{[a29_0x332c9d(0xbb)]='show';[a29_0x332c9d(0xa4)]=a29_0x332c9d(0xb8);async[a29_0x332c9d(0xb3)](_0x2e607f){return this['showTable'](_0x2e607f);}async[a29_0x332c9d(0xc1)](_0x3f4e31){const _0x51e1e9=a29_0x332c9d,{options:_0x4d827d,args:_0x316376,tdx:_0x4e5942}=_0x3f4e31;let _0x1a2ecc;try{_0x1a2ecc=parseTableReference(_0x316376[0x0]);const _0x5bf890=_0x4d827d[_0x51e1e9(0xad)];!_0x1a2ecc[_0x51e1e9(0xad)]&&_0x5bf890&&(_0x1a2ecc[_0x51e1e9(0xad)]=_0x5bf890);const _0x255b1d=validateTableDescribeReference(_0x1a2ecc);if(_0x255b1d)return console[_0x51e1e9(0xae)]('Error:\x20'+_0x255b1d),console[_0x51e1e9(0xae)]('Usage:\x20tdx\x20show\x20<database.table>'),console[_0x51e1e9(0xae)]('\x20\x20\x20or:\x20tdx\x20show\x20<catalog.database.table>'),console[_0x51e1e9(0xae)](_0x51e1e9(0xab)),0x1;}catch(_0x58b88a){return console[_0x51e1e9(0xae)](_0x51e1e9(0xc7)+_0x58b88a[_0x51e1e9(0xb5)]),console[_0x51e1e9(0xae)](_0x51e1e9(0xbc)),console[_0x51e1e9(0xae)](_0x51e1e9(0x9b)),console['error'](_0x51e1e9(0xab)),0x1;}const _0x413100=_0x1a2ecc[_0x51e1e9(0xc4)],_0x4c847d=_0x1a2ecc[_0x51e1e9(0xad)],_0x91b43f=_0x1a2ecc[_0x51e1e9(0x9c)],_0x118443=_0x4d827d[_0x51e1e9(0xb2)];try{_0x4d827d[_0x51e1e9(0xaa)]&&(console[_0x51e1e9(0xae)]('Site:\x20'+_0x4d827d[_0x51e1e9(0x9d)]),_0x413100&&console['error'](_0x51e1e9(0xc0)+_0x413100),console['error'](_0x51e1e9(0xa5)+_0x4c847d),console[_0x51e1e9(0xae)](_0x51e1e9(0xa3)+_0x91b43f),console[_0x51e1e9(0xae)](_0x51e1e9(0xbd)+_0x118443));const _0x203614=_0x413100?_0x413100+'.'+_0x4c847d+'.'+_0x91b43f:_0x4c847d+'.'+_0x91b43f,_0x130d0c=await withSpinner(_0x51e1e9(0x9e)+_0x203614+'...',()=>_0x4e5942[_0x51e1e9(0x9c)][_0x51e1e9(0xa7)](_0x4c847d,_0x91b43f,_0x118443,_0x413100),{'verbose':_0x4d827d[_0x51e1e9(0xaa)]}),_0x3b3508=_0x130d0c[_0x51e1e9(0x9f)],_0x319ceb=_0x3b3508['data'];return _0x319ceb['length']===0x0?console[_0x51e1e9(0xae)](_0x51e1e9(0xa8)):console['error'](_0x51e1e9(0xb6)+_0x319ceb[_0x51e1e9(0xb1)]+_0x51e1e9(0xc2)+(_0x319ceb['length']!==0x1?'s':'')+_0x51e1e9(0xc5)+_0x203614),await handleSDKOutput(_0x319ceb,_0x4d827d),0x0;}catch(_0x108b34){if(_0x108b34 instanceof SDKError)return console[_0x51e1e9(0xae)]('Error:\x20'+_0x108b34[_0x51e1e9(0xb5)]),_0x108b34['cause']&&console['error'](_0x51e1e9(0xaf)+_0x108b34[_0x51e1e9(0xa9)]),0x1;throw _0x108b34;}}[a29_0x332c9d(0xbe)](_0x50e071){const _0x54e01e=a29_0x332c9d;if(_0x50e071[_0x54e01e(0xa0)][_0x54e01e(0xb1)]===0x0)return _0x54e01e(0xa1);if(_0x50e071[_0x54e01e(0xa0)][_0x54e01e(0xb1)]>0x1)return _0x54e01e(0xba);return undefined;}}
1
+ const a29_0x2ed005=a29_0x45da;(function(_0x366bc0,_0x41cb5e){const _0x400166=a29_0x45da,_0x48c37a=_0x366bc0();while(!![]){try{const _0x5ca2da=parseInt(_0x400166(0xef))/0x1*(parseInt(_0x400166(0xce))/0x2)+parseInt(_0x400166(0xde))/0x3+-parseInt(_0x400166(0xf6))/0x4*(-parseInt(_0x400166(0xd1))/0x5)+-parseInt(_0x400166(0xe1))/0x6+-parseInt(_0x400166(0xe4))/0x7*(parseInt(_0x400166(0xe7))/0x8)+parseInt(_0x400166(0xd7))/0x9+parseInt(_0x400166(0xe3))/0xa*(-parseInt(_0x400166(0xe0))/0xb);if(_0x5ca2da===_0x41cb5e)break;else _0x48c37a['push'](_0x48c37a['shift']());}catch(_0x4475f4){_0x48c37a['push'](_0x48c37a['shift']());}}}(a29_0x129b,0x64247));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleSDKOutput}from'../utils/command-output.js';function a29_0x129b(){const _0x515a6a=['20992VymsEy','\x20from\x20','validate','4050845wUYVHM','site','showTable','Catalog:\x20','length','\x20\x20Cause:\x20','1136070kOSqCu','args','description','verbose','execute','cause','error','1758132qfYget','message','11aYWYSj','2245890wWdREC','Table:\x20','12790220IVCWFg','287qYNQAg','show','limit','19352BhSOUL','\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--database\x20<database>','✔\x20Query\x20successful\x20-\x200\x20rows\x20returned','Limit:\x20','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','...','\x20row','data','61bThTpG','\x20\x20\x20or:\x20tdx\x20show\x20<catalog.database.table>','Querying\x20','Error:\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','name','4wbsNFO','Show\x20table\x20contents','Usage:\x20tdx\x20show\x20<database.table>'];a29_0x129b=function(){return _0x515a6a;};return a29_0x129b();}function a29_0x45da(_0x5768fc,_0x37d803){const _0x129b8b=a29_0x129b();return a29_0x45da=function(_0x45da4b,_0x595d81){_0x45da4b=_0x45da4b-0xcc;let _0x2b2c2a=_0x129b8b[_0x45da4b];return _0x2b2c2a;},a29_0x45da(_0x5768fc,_0x37d803);}import{parseTableReference,validateTableDescribeReference}from'../utils/table-ref-parser.js';import{withSpinner}from'../utils/spinner.js';export class ShowCommand extends BaseCommand{[a29_0x2ed005(0xf5)]=a29_0x2ed005(0xe5);[a29_0x2ed005(0xd9)]=a29_0x2ed005(0xcc);async[a29_0x2ed005(0xdb)](_0x1a9b4e){const _0x1881e3=a29_0x2ed005;return this[_0x1881e3(0xd3)](_0x1a9b4e);}async['showTable'](_0x417e38){const _0xc7b28a=a29_0x2ed005,{options:_0x57eb8e,args:_0x312e2a,tdx:_0x5878e4}=_0x417e38;let _0x3f6029;try{_0x3f6029=parseTableReference(_0x312e2a[0x0]);const _0x245aa2=_0x57eb8e[_0xc7b28a(0xf4)];!_0x3f6029[_0xc7b28a(0xf4)]&&_0x245aa2&&(_0x3f6029[_0xc7b28a(0xf4)]=_0x245aa2);const _0x1c9f39=validateTableDescribeReference(_0x3f6029);if(_0x1c9f39)return console[_0xc7b28a(0xdd)](_0xc7b28a(0xf2)+_0x1c9f39),console[_0xc7b28a(0xdd)](_0xc7b28a(0xcd)),console[_0xc7b28a(0xdd)](_0xc7b28a(0xf0)),console[_0xc7b28a(0xdd)](_0xc7b28a(0xe8)),0x1;}catch(_0x113032){return console[_0xc7b28a(0xdd)](_0xc7b28a(0xf2)+_0x113032[_0xc7b28a(0xdf)]),console[_0xc7b28a(0xdd)]('Usage:\x20tdx\x20show\x20<database.table>'),console[_0xc7b28a(0xdd)]('\x20\x20\x20or:\x20tdx\x20show\x20<catalog.database.table>'),console[_0xc7b28a(0xdd)](_0xc7b28a(0xe8)),0x1;}const _0x57ed77=_0x3f6029['catalog'],_0x403a72=_0x3f6029[_0xc7b28a(0xf4)],_0x34eba1=_0x3f6029['table'],_0x326ff7=_0x57eb8e[_0xc7b28a(0xe6)];try{_0x57eb8e[_0xc7b28a(0xda)]&&(console[_0xc7b28a(0xdd)]('Site:\x20'+_0x57eb8e[_0xc7b28a(0xd2)]),_0x57ed77&&console[_0xc7b28a(0xdd)](_0xc7b28a(0xd4)+_0x57ed77),console[_0xc7b28a(0xdd)]('Database:\x20'+_0x403a72),console[_0xc7b28a(0xdd)](_0xc7b28a(0xe2)+_0x34eba1),console[_0xc7b28a(0xdd)](_0xc7b28a(0xea)+_0x326ff7));const _0x3c01c3=_0x57ed77?_0x57ed77+'.'+_0x403a72+'.'+_0x34eba1:_0x403a72+'.'+_0x34eba1,_0x4190a7=await withSpinner(_0xc7b28a(0xf1)+_0x3c01c3+_0xc7b28a(0xec),()=>_0x5878e4['table'][_0xc7b28a(0xe5)](_0x403a72,_0x34eba1,_0x326ff7,_0x57ed77),{'verbose':_0x57eb8e[_0xc7b28a(0xda)]}),_0x470334=_0x4190a7[_0xc7b28a(0xee)],_0x256a34=_0x470334[_0xc7b28a(0xee)];return _0x256a34[_0xc7b28a(0xd5)]===0x0?console[_0xc7b28a(0xdd)](_0xc7b28a(0xe9)):console['error']('✔\x20Retrieved\x20'+_0x256a34[_0xc7b28a(0xd5)]+_0xc7b28a(0xed)+(_0x256a34['length']!==0x1?'s':'')+_0xc7b28a(0xcf)+_0x3c01c3),await handleSDKOutput(_0x256a34,_0x57eb8e),0x0;}catch(_0x56c664){if(_0x56c664 instanceof SDKError)return console['error']('Error:\x20'+_0x56c664[_0xc7b28a(0xdf)]),_0x56c664[_0xc7b28a(0xdc)]&&console['error'](_0xc7b28a(0xd6)+_0x56c664['cause']),0x1;throw _0x56c664;}}[a29_0x2ed005(0xd0)](_0x18d4a9){const _0xc8b005=a29_0x2ed005;if(_0x18d4a9[_0xc8b005(0xd8)]['length']===0x0)return _0xc8b005(0xeb);if(_0x18d4a9[_0xc8b005(0xd8)][_0xc8b005(0xd5)]>0x1)return _0xc8b005(0xf3);return undefined;}}
@@ -1 +1 @@
1
- const a30_0x4dc40f=a30_0x4bd0;(function(_0x4c78c6,_0x1b6fdd){const _0xc9c537=a30_0x4bd0,_0x3c26e6=_0x4c78c6();while(!![]){try{const _0x1b4d84=parseInt(_0xc9c537(0xd0))/0x1+-parseInt(_0xc9c537(0xf8))/0x2+parseInt(_0xc9c537(0xe8))/0x3+parseInt(_0xc9c537(0xd5))/0x4+-parseInt(_0xc9c537(0xf3))/0x5*(parseInt(_0xc9c537(0xd4))/0x6)+parseInt(_0xc9c537(0xde))/0x7*(-parseInt(_0xc9c537(0xe1))/0x8)+-parseInt(_0xc9c537(0xeb))/0x9*(-parseInt(_0xc9c537(0xdb))/0xa);if(_0x1b4d84===_0x1b6fdd)break;else _0x3c26e6['push'](_0x3c26e6['shift']());}catch(_0x2591ab){_0x3c26e6['push'](_0x3c26e6['shift']());}}}(a30_0x1a19,0x18c3f));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';function a30_0x4bd0(_0x26d03c,_0x326752){const _0x1a1906=a30_0x1a19();return a30_0x4bd0=function(_0x4bd08c,_0x14f2dc){_0x4bd08c=_0x4bd08c-0xd0;let _0x40b0e0=_0x1a1906[_0x4bd08c];return _0x40b0e0;},a30_0x4bd0(_0x26d03c,_0x326752);}import{handleSDKOutput}from'../utils/command-output.js';import{parseTableReference}from'../utils/table-ref-parser.js';import{withSpinner}from'../utils/spinner.js';function a30_0x1a19(){const _0x5a6954=['.*\x22','description','data','\x27\x20may\x20not\x20exist\x20or\x20contains\x20no\x20tables','Database\x20\x27','406615NMIUMK','length','\x20\x20tdx\x20tables\x20users\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20->\x20table\x20\x22users\x22\x20across\x20all\x20databases','✔\x20Found\x20','table','43304jYoJCw','Site:\x20','Note:\x20\x27','\x20\x20Or:\x20\x20tdx\x20tables\x20--in\x20','Error:\x20Pattern\x20\x27','verbose','execute','107822jXpUFu','validate','✖\x20No\x20tables\x20found','cause','12qvhZZf','435792xDiKjP','message','includes','error','Database\x20pattern:\x20','\x20\x20tdx\x20tables\x20\x22*.user*\x22\x20\x20\x20\x20\x20\x20\x20->\x20tables\x20matching\x20user*\x20across\x20databases','30lSAGGM','list','Error:\x20','70QwVWZG','\x20\x20tdx\x20tables\x20\x22mydb.*\x22\x20\x20\x20\x20\x20\x20\x20\x20->\x20all\x20tables\x20from\x20mydb','\x20\x20Or:\x20\x20tdx\x20tables\x20--database\x20','33656wkWPSy','database','Table\x20pattern:\x20','\x27\x20without\x20wildcards\x20would\x20search\x20for\x20tables\x20named\x20\x27','List\x20tables\x20in\x20a\x20database','Or\x20use\x20--in\x20flag:','Listing\x20tables...','46164EsMVJj','tables','\x20\x20Cause:\x20','286947NOwInO','site','\x20\x20tdx\x20tables\x20--in\x20mydb\x20\x20\x20\x20\x20\x20\x20->\x20all\x20tables\x20from\x20mydb'];a30_0x1a19=function(){return _0x5a6954;};return a30_0x1a19();}export class TablesCommand extends BaseCommand{['name']=a30_0x4dc40f(0xe9);[a30_0x4dc40f(0xef)]=a30_0x4dc40f(0xe5);async[a30_0x4dc40f(0xfe)](_0x16f2dd){const _0x1c4781=a30_0x4dc40f,{options:_0x3ab05a,args:_0x49e677,tdx:_0x3b496d}=_0x16f2dd;let _0x56ab4b;if(_0x49e677[_0x1c4781(0xf4)]===0x0)_0x56ab4b={'database':undefined,'table':undefined,'original':''};else{if(_0x49e677[_0x1c4781(0xf4)]===0x1)try{_0x56ab4b=parseTableReference(_0x49e677[0x0]);if(_0x56ab4b[_0x1c4781(0xf7)]&&!_0x56ab4b[_0x1c4781(0xe2)]&&!_0x56ab4b[_0x1c4781(0xf7)][_0x1c4781(0xd7)]('*')&&!_0x56ab4b[_0x1c4781(0xf7)][_0x1c4781(0xd7)]('?'))return console['error'](_0x1c4781(0xfc)+_0x49e677[0x0]+'\x27\x20is\x20ambiguous.'),console['error']('Did\x20you\x20mean\x20to\x20list\x20all\x20tables\x20from\x20database\x20\x27'+_0x56ab4b[_0x1c4781(0xf7)]+'\x27?'),console['error']('\x20\x20Use:\x20tdx\x20tables\x20\x22'+_0x56ab4b[_0x1c4781(0xf7)]+_0x1c4781(0xee)),console[_0x1c4781(0xd8)](_0x1c4781(0xfb)+_0x56ab4b[_0x1c4781(0xf7)]),console['error'](_0x1c4781(0xe0)+_0x56ab4b[_0x1c4781(0xf7)]),console[_0x1c4781(0xd8)](''),console[_0x1c4781(0xd8)](_0x1c4781(0xfa)+_0x49e677[0x0]+_0x1c4781(0xe4)+_0x56ab4b[_0x1c4781(0xf7)]+'\x27\x20across\x20all\x20databases.'),0x1;}catch(_0x52226f){return console[_0x1c4781(0xd8)](_0x1c4781(0xdd)+_0x52226f[_0x1c4781(0xd6)]),0x1;}else return console[_0x1c4781(0xd8)]('Error:\x20Too\x20many\x20arguments.\x20Use\x20single\x20argument:'),console[_0x1c4781(0xd8)](_0x1c4781(0xf5)),console[_0x1c4781(0xd8)](_0x1c4781(0xdf)),console[_0x1c4781(0xd8)]('\x20\x20tdx\x20tables\x20\x22mydb.users\x22\x20\x20\x20\x20->\x20table\x20\x22users\x22\x20in\x20database\x20mydb'),console['error'](_0x1c4781(0xda)),console[_0x1c4781(0xd8)](_0x1c4781(0xe6)),console[_0x1c4781(0xd8)](_0x1c4781(0xed)),0x1;}const _0x124d83=_0x3ab05a[_0x1c4781(0xe2)];!_0x56ab4b[_0x1c4781(0xe2)]&&_0x124d83&&(_0x56ab4b[_0x1c4781(0xe2)]=_0x124d83);try{const _0xf64a06=_0x1e396c=>_0x1e396c&&(_0x1e396c[_0x1c4781(0xd7)]('*')||_0x1e396c[_0x1c4781(0xd7)]('?')),_0x346813=_0xf64a06(_0x56ab4b[_0x1c4781(0xe2)]);_0x3ab05a[_0x1c4781(0xfd)]&&(console[_0x1c4781(0xd8)](_0x1c4781(0xf9)+_0x3ab05a[_0x1c4781(0xec)]),_0x56ab4b[_0x1c4781(0xe2)]?_0x346813?console[_0x1c4781(0xd8)](_0x1c4781(0xd9)+_0x56ab4b['database']):console[_0x1c4781(0xd8)]('Database:\x20'+_0x56ab4b['database']):console[_0x1c4781(0xd8)]('Database:\x20all'),_0x56ab4b[_0x1c4781(0xf7)]&&console['error'](_0x1c4781(0xe3)+_0x56ab4b['table']));const _0x433f45=_0x56ab4b[_0x1c4781(0xe2)]&&!_0x346813?_0x56ab4b[_0x1c4781(0xe2)]:undefined,_0x400562=_0x346813?_0x56ab4b['database']:undefined,_0x1241c5=_0x56ab4b['table'],_0x59005b=await withSpinner(_0x1c4781(0xe7),()=>_0x3b496d[_0x1c4781(0xf7)][_0x1c4781(0xdc)](_0x433f45,_0x1241c5,_0x400562),{'verbose':_0x3ab05a[_0x1c4781(0xfd)]}),_0x287dce=_0x59005b[_0x1c4781(0xf0)];if(_0x287dce['length']===0x0&&_0x56ab4b[_0x1c4781(0xe2)]&&!_0x346813)return console['error'](_0x1c4781(0xd2)),console['error'](_0x1c4781(0xf2)+_0x56ab4b[_0x1c4781(0xe2)]+_0x1c4781(0xf1)),0x1;return console[_0x1c4781(0xd8)](_0x1c4781(0xf6)+_0x287dce[_0x1c4781(0xf4)]+'\x20table'+(_0x287dce['length']!==0x1?'s':'')),await handleSDKOutput(_0x287dce,_0x3ab05a),0x0;}catch(_0x52e4b7){if(_0x52e4b7 instanceof SDKError)return console[_0x1c4781(0xd8)](_0x1c4781(0xdd)+_0x52e4b7[_0x1c4781(0xd6)]),_0x52e4b7[_0x1c4781(0xd3)]&&console[_0x1c4781(0xd8)](_0x1c4781(0xea)+_0x52e4b7['cause']),0x1;throw _0x52e4b7;}}[a30_0x4dc40f(0xd1)](_0x1b96de){return undefined;}}
1
+ const a30_0x57ce4f=a30_0x66f7;(function(_0x4fb914,_0x3b4879){const _0x440eb3=a30_0x66f7,_0x177ee0=_0x4fb914();while(!![]){try{const _0x57524e=-parseInt(_0x440eb3(0x1e5))/0x1*(-parseInt(_0x440eb3(0x20a))/0x2)+parseInt(_0x440eb3(0x1fb))/0x3+-parseInt(_0x440eb3(0x1f5))/0x4*(parseInt(_0x440eb3(0x1eb))/0x5)+-parseInt(_0x440eb3(0x1dd))/0x6*(-parseInt(_0x440eb3(0x1f4))/0x7)+parseInt(_0x440eb3(0x1e9))/0x8*(-parseInt(_0x440eb3(0x1ec))/0x9)+-parseInt(_0x440eb3(0x1f7))/0xa+parseInt(_0x440eb3(0x1fa))/0xb*(parseInt(_0x440eb3(0x1ff))/0xc);if(_0x57524e===_0x3b4879)break;else _0x177ee0['push'](_0x177ee0['shift']());}catch(_0x3bbc0c){_0x177ee0['push'](_0x177ee0['shift']());}}}(a30_0x3843,0x7fb0b));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';function a30_0x66f7(_0x1adf66,_0x199bef){const _0x3843eb=a30_0x3843();return a30_0x66f7=function(_0x66f787,_0x10d051){_0x66f787=_0x66f787-0x1dc;let _0x12d822=_0x3843eb[_0x66f787];return _0x12d822;},a30_0x66f7(_0x1adf66,_0x199bef);}function a30_0x3843(){const _0x40fdd9=['6712gNGSAD','Error:\x20','470580aLmLIt','6219EzzUOa','\x20\x20tdx\x20tables\x20\x22mydb.users\x22\x20\x20\x20\x20->\x20table\x20\x22users\x22\x20in\x20database\x20mydb','error','Database:\x20','verbose','List\x20tables\x20in\x20a\x20database','list','length','189JEazLb','44OEfIxg','\x20table','2979870ixckPV','\x20\x20tdx\x20tables\x20\x22*.user*\x22\x20\x20\x20\x20\x20\x20\x20->\x20tables\x20matching\x20user*\x20across\x20databases','\x27\x20across\x20all\x20databases.','33flXInI','1225131dQsRUx','execute','database','Did\x20you\x20mean\x20to\x20list\x20all\x20tables\x20from\x20database\x20\x27','4161408OqbIzd','message','includes','table','\x20\x20tdx\x20tables\x20\x22mydb.*\x22\x20\x20\x20\x20\x20\x20\x20\x20->\x20all\x20tables\x20from\x20mydb','✖\x20No\x20tables\x20found','tables','data','\x27\x20is\x20ambiguous.','\x27\x20may\x20not\x20exist\x20or\x20contains\x20no\x20tables','\x20\x20Or:\x20\x20tdx\x20tables\x20--in\x20','34welyso','Or\x20use\x20--in\x20flag:','113430wRpiwo','cause','Site:\x20','Error:\x20Too\x20many\x20arguments.\x20Use\x20single\x20argument:','\x20\x20Cause:\x20','\x20\x20tdx\x20tables\x20users\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20->\x20table\x20\x22users\x22\x20across\x20all\x20databases','\x20\x20Or:\x20\x20tdx\x20tables\x20--database\x20','validate','28051JOJrya','Listing\x20tables...','\x20\x20Use:\x20tdx\x20tables\x20\x22','name'];a30_0x3843=function(){return _0x40fdd9;};return a30_0x3843();}import{handleSDKOutput}from'../utils/command-output.js';import{parseTableReference}from'../utils/table-ref-parser.js';import{withSpinner}from'../utils/spinner.js';export class TablesCommand extends BaseCommand{[a30_0x57ce4f(0x1e8)]=a30_0x57ce4f(0x205);['description']=a30_0x57ce4f(0x1f1);async[a30_0x57ce4f(0x1fc)](_0x36511f){const _0x2b99b5=a30_0x57ce4f,{options:_0x299824,args:_0x12ef74,tdx:_0x270f70}=_0x36511f;let _0x10bf38;if(_0x12ef74[_0x2b99b5(0x1f3)]===0x0)_0x10bf38={'database':undefined,'table':undefined,'original':''};else{if(_0x12ef74['length']===0x1)try{_0x10bf38=parseTableReference(_0x12ef74[0x0]);if(_0x10bf38[_0x2b99b5(0x202)]&&!_0x10bf38[_0x2b99b5(0x1fd)]&&!_0x10bf38['table'][_0x2b99b5(0x201)]('*')&&!_0x10bf38[_0x2b99b5(0x202)][_0x2b99b5(0x201)]('?'))return console[_0x2b99b5(0x1ee)]('Error:\x20Pattern\x20\x27'+_0x12ef74[0x0]+_0x2b99b5(0x207)),console[_0x2b99b5(0x1ee)](_0x2b99b5(0x1fe)+_0x10bf38['table']+'\x27?'),console[_0x2b99b5(0x1ee)](_0x2b99b5(0x1e7)+_0x10bf38[_0x2b99b5(0x202)]+'.*\x22'),console[_0x2b99b5(0x1ee)](_0x2b99b5(0x209)+_0x10bf38[_0x2b99b5(0x202)]),console[_0x2b99b5(0x1ee)](_0x2b99b5(0x1e3)+_0x10bf38[_0x2b99b5(0x202)]),console[_0x2b99b5(0x1ee)](''),console['error']('Note:\x20\x27'+_0x12ef74[0x0]+'\x27\x20without\x20wildcards\x20would\x20search\x20for\x20tables\x20named\x20\x27'+_0x10bf38[_0x2b99b5(0x202)]+_0x2b99b5(0x1f9)),0x1;}catch(_0x258a29){return console[_0x2b99b5(0x1ee)]('Error:\x20'+_0x258a29[_0x2b99b5(0x200)]),0x1;}else return console['error'](_0x2b99b5(0x1e0)),console[_0x2b99b5(0x1ee)](_0x2b99b5(0x1e2)),console[_0x2b99b5(0x1ee)](_0x2b99b5(0x203)),console[_0x2b99b5(0x1ee)](_0x2b99b5(0x1ed)),console['error'](_0x2b99b5(0x1f8)),console[_0x2b99b5(0x1ee)](_0x2b99b5(0x1dc)),console[_0x2b99b5(0x1ee)]('\x20\x20tdx\x20tables\x20--in\x20mydb\x20\x20\x20\x20\x20\x20\x20->\x20all\x20tables\x20from\x20mydb'),0x1;}const _0x463c0b=_0x299824['database'];!_0x10bf38['database']&&_0x463c0b&&(_0x10bf38[_0x2b99b5(0x1fd)]=_0x463c0b);try{const _0x2a8625=_0x49649e=>_0x49649e&&(_0x49649e[_0x2b99b5(0x201)]('*')||_0x49649e[_0x2b99b5(0x201)]('?')),_0x406835=_0x2a8625(_0x10bf38[_0x2b99b5(0x1fd)]);_0x299824[_0x2b99b5(0x1f0)]&&(console['error'](_0x2b99b5(0x1df)+_0x299824['site']),_0x10bf38['database']?_0x406835?console[_0x2b99b5(0x1ee)]('Database\x20pattern:\x20'+_0x10bf38['database']):console[_0x2b99b5(0x1ee)](_0x2b99b5(0x1ef)+_0x10bf38[_0x2b99b5(0x1fd)]):console['error']('Database:\x20all'),_0x10bf38[_0x2b99b5(0x202)]&&console[_0x2b99b5(0x1ee)]('Table\x20pattern:\x20'+_0x10bf38[_0x2b99b5(0x202)]));const _0x1b1f44=_0x10bf38[_0x2b99b5(0x1fd)]&&!_0x406835?_0x10bf38[_0x2b99b5(0x1fd)]:undefined,_0x136fff=_0x406835?_0x10bf38[_0x2b99b5(0x1fd)]:undefined,_0x1380ae=_0x10bf38[_0x2b99b5(0x202)],_0x11ace5=await withSpinner(_0x2b99b5(0x1e6),()=>_0x270f70[_0x2b99b5(0x202)][_0x2b99b5(0x1f2)](_0x1b1f44,_0x1380ae,_0x136fff),{'verbose':_0x299824[_0x2b99b5(0x1f0)]}),_0x342b37=_0x11ace5[_0x2b99b5(0x206)];if(_0x342b37[_0x2b99b5(0x1f3)]===0x0&&_0x10bf38[_0x2b99b5(0x1fd)]&&!_0x406835)return console[_0x2b99b5(0x1ee)](_0x2b99b5(0x204)),console[_0x2b99b5(0x1ee)]('Database\x20\x27'+_0x10bf38[_0x2b99b5(0x1fd)]+_0x2b99b5(0x208)),0x1;return console[_0x2b99b5(0x1ee)]('✔\x20Found\x20'+_0x342b37[_0x2b99b5(0x1f3)]+_0x2b99b5(0x1f6)+(_0x342b37[_0x2b99b5(0x1f3)]!==0x1?'s':'')),await handleSDKOutput(_0x342b37,_0x299824),0x0;}catch(_0x533898){if(_0x533898 instanceof SDKError)return console[_0x2b99b5(0x1ee)](_0x2b99b5(0x1ea)+_0x533898[_0x2b99b5(0x200)]),_0x533898[_0x2b99b5(0x1de)]&&console[_0x2b99b5(0x1ee)](_0x2b99b5(0x1e1)+_0x533898[_0x2b99b5(0x1de)]),0x1;throw _0x533898;}}[a30_0x57ce4f(0x1e4)](_0xd6b237){return undefined;}}
@@ -1 +1 @@
1
- const a31_0x586624=a31_0x3239;(function(_0x3d7d4c,_0x2dc0af){const _0x51a0a8=a31_0x3239,_0x316559=_0x3d7d4c();while(!![]){try{const _0x49bdfa=parseInt(_0x51a0a8(0x17e))/0x1*(-parseInt(_0x51a0a8(0x16e))/0x2)+parseInt(_0x51a0a8(0x171))/0x3*(-parseInt(_0x51a0a8(0x17f))/0x4)+-parseInt(_0x51a0a8(0x184))/0x5*(parseInt(_0x51a0a8(0x186))/0x6)+parseInt(_0x51a0a8(0x192))/0x7*(-parseInt(_0x51a0a8(0x18f))/0x8)+-parseInt(_0x51a0a8(0x18b))/0x9+-parseInt(_0x51a0a8(0x16c))/0xa+-parseInt(_0x51a0a8(0x16d))/0xb*(-parseInt(_0x51a0a8(0x172))/0xc);if(_0x49bdfa===_0x2dc0af)break;else _0x316559['push'](_0x316559['shift']());}catch(_0x96ffbc){_0x316559['push'](_0x316559['shift']());}}}(a31_0x2123,0xf1d8f));function a31_0x3239(_0x2e802f,_0x1c124b){const _0x2123a8=a31_0x2123();return a31_0x3239=function(_0x323953,_0x205988){_0x323953=_0x323953-0x16b;let _0x4fd856=_0x2123a8[_0x323953];return _0x4fd856;},a31_0x3239(_0x2e802f,_0x1c124b);}import{BaseCommand}from'./command.js';import{saveSessionContext,getCurrentSessionPID}from'../core/session.js';import{profileExists}from'../core/profile.js';function a31_0x2123(){const _0x10e509=['description','name','Session\x20parent_segment\x20set\x20to:\x20','Set\x20session-level\x20context','\x0aUse\x20\x27tdx\x20profiles\x27\x20to\x20see\x20available\x20profiles','1RfkGZo','16kGYPoE','\x0aTip:\x20Use\x20\x27tdx\x20context\x20--clear\x27\x20to\x20clear\x20session\x20overrides','log','\x20(session:\x20','toString','5kcOBTa','validate','9962898XZPEtf','error','Error:\x20','execute','Usage:\x20tdx\x20use\x20<resource>\x20<value>\x0a','15939891jbndKl','llm_project','database','parent_segment','24MNDIoA','Invalid\x20resource:\x20','session','407967KEWzIu','join','message','6612730NPmzzG','16766882ToPZrw','2672722rwcYGa','Session\x20llm_project\x20set\x20to:\x20','.\x20Must\x20be\x20one\x20of:\x20','769983wKmZbR','60GQGovO','Or\x20use:\x20tdx\x20context\x20--clear\x20to\x20clear\x20session\x20context\x0a','profile','length','includes','use','Error:\x20Profile\x20\x27'];a31_0x2123=function(){return _0x10e509;};return a31_0x2123();}export class UseCommand extends BaseCommand{[a31_0x586624(0x17a)]=a31_0x586624(0x177);[a31_0x586624(0x179)]=a31_0x586624(0x17c);[a31_0x586624(0x185)](_0x53c7ca){const _0x4c7803=a31_0x586624,{args:_0x5c1c16}=_0x53c7ca;if(_0x5c1c16[_0x4c7803(0x175)]<0x2)return _0x4c7803(0x18a)+'Resources:\x20database,\x20parent_segment,\x20llm_project,\x20profile\x0a'+_0x4c7803(0x173)+'\x0aRun\x20\x27tdx\x20use\x20--help\x27\x20for\x20more\x20options';const _0x1da688=_0x5c1c16[0x0],_0x29ef61=[_0x4c7803(0x18d),_0x4c7803(0x18e),'llm_project',_0x4c7803(0x174)];if(!_0x29ef61[_0x4c7803(0x176)](_0x1da688))return _0x4c7803(0x190)+_0x1da688+_0x4c7803(0x170)+_0x29ef61[_0x4c7803(0x193)](',\x20');return undefined;}async[a31_0x586624(0x189)](_0x3f08af){const _0x24a1b8=a31_0x586624,{args:_0x2a9cf9,options:_0x1fbc4a}=_0x3f08af;try{const _0x4e11cc=_0x2a9cf9[0x0],_0x2ba841=_0x2a9cf9[0x1];if(_0x4e11cc===_0x24a1b8(0x174)){if(!profileExists(_0x2ba841))return console['error'](_0x24a1b8(0x178)+_0x2ba841+'\x27\x20does\x20not\x20exist'),console[_0x24a1b8(0x187)](_0x24a1b8(0x17d)),0x1;const _0x434796=_0x1fbc4a[_0x24a1b8(0x191)]||getCurrentSessionPID()['toString']();return saveSessionContext({'profile':_0x2ba841},_0x1fbc4a[_0x24a1b8(0x191)]),console[_0x24a1b8(0x181)]('Session\x20profile\x20set\x20to:\x20'+_0x2ba841+_0x24a1b8(0x182)+_0x434796+')'),console[_0x24a1b8(0x181)](_0x24a1b8(0x180)),0x0;}const _0x1765b4={},_0x4bb27f=_0x1fbc4a[_0x24a1b8(0x191)]||getCurrentSessionPID()[_0x24a1b8(0x183)]();switch(_0x4e11cc){case _0x24a1b8(0x18d):_0x1765b4[_0x24a1b8(0x18d)]=_0x2ba841,console[_0x24a1b8(0x181)]('Session\x20database\x20set\x20to:\x20'+_0x2ba841+_0x24a1b8(0x182)+_0x4bb27f+')');break;case _0x24a1b8(0x18e):_0x1765b4[_0x24a1b8(0x18e)]=_0x2ba841,console[_0x24a1b8(0x181)](_0x24a1b8(0x17b)+_0x2ba841+_0x24a1b8(0x182)+_0x4bb27f+')');break;case _0x24a1b8(0x18c):_0x1765b4[_0x24a1b8(0x18c)]=_0x2ba841,console[_0x24a1b8(0x181)](_0x24a1b8(0x16f)+_0x2ba841+_0x24a1b8(0x182)+_0x4bb27f+')');break;}return saveSessionContext(_0x1765b4,_0x1fbc4a['session']),console['log'](_0x24a1b8(0x180)),0x0;}catch(_0x1ee12d){return _0x1ee12d instanceof Error&&console[_0x24a1b8(0x187)](_0x24a1b8(0x188)+_0x1ee12d[_0x24a1b8(0x16b)]),0x1;}}}
1
+ function a31_0x44d7(){const _0x59ae44=['includes','log','use','9952QfqHaA','6396840jrPHVn','length','database','40611ERWCXx','Session\x20database\x20set\x20to:\x20','Or\x20use:\x20tdx\x20context\x20--clear\x20to\x20clear\x20session\x20context\x0a','Invalid\x20resource:\x20','Resources:\x20database,\x20parent_segment,\x20llm_project,\x20profile\x0a','8yKuCgy','toString','\x0aRun\x20\x27tdx\x20use\x20--help\x27\x20for\x20more\x20options','description','validate','parent_segment','23480ATCwVj','18pJyAju','message','profile','\x20(session:\x20','execute','495890ZbdZxx','166329wtekMo','776044nZotsV','error','\x27\x20does\x20not\x20exist','Usage:\x20tdx\x20use\x20<resource>\x20<value>\x0a','\x0aTip:\x20Use\x20\x27tdx\x20context\x20--clear\x27\x20to\x20clear\x20session\x20overrides','56ljHYiI','session','join','3916cocIwo','llm_project'];a31_0x44d7=function(){return _0x59ae44;};return a31_0x44d7();}const a31_0x28a7c0=a31_0x4895;(function(_0x296314,_0x313378){const _0x4212c2=a31_0x4895,_0x48c865=_0x296314();while(!![]){try{const _0x40eedf=parseInt(_0x4212c2(0x186))/0x1+parseInt(_0x4212c2(0x19d))/0x2*(-parseInt(_0x4212c2(0x198))/0x3)+parseInt(_0x4212c2(0x187))/0x4+parseInt(_0x4212c2(0x1a9))/0x5*(parseInt(_0x4212c2(0x1a4))/0x6)+parseInt(_0x4212c2(0x18c))/0x7*(parseInt(_0x4212c2(0x194))/0x8)+parseInt(_0x4212c2(0x195))/0x9+parseInt(_0x4212c2(0x1a3))/0xa*(-parseInt(_0x4212c2(0x18f))/0xb);if(_0x40eedf===_0x313378)break;else _0x48c865['push'](_0x48c865['shift']());}catch(_0x276242){_0x48c865['push'](_0x48c865['shift']());}}}(a31_0x44d7,0x77466));import{BaseCommand}from'./command.js';import{saveSessionContext,getCurrentSessionPID}from'../core/session.js';function a31_0x4895(_0x2ca8d7,_0x473e04){const _0x44d782=a31_0x44d7();return a31_0x4895=function(_0x48956f,_0x1058fa){_0x48956f=_0x48956f-0x186;let _0x57ad4=_0x44d782[_0x48956f];return _0x57ad4;},a31_0x4895(_0x2ca8d7,_0x473e04);}import{profileExists}from'../core/profile.js';export class UseCommand extends BaseCommand{['name']=a31_0x28a7c0(0x193);[a31_0x28a7c0(0x1a0)]='Set\x20session-level\x20context';[a31_0x28a7c0(0x1a1)](_0x37af02){const _0x5a8e9c=a31_0x28a7c0,{args:_0x5a019e}=_0x37af02;if(_0x5a019e[_0x5a8e9c(0x196)]<0x2)return _0x5a8e9c(0x18a)+_0x5a8e9c(0x19c)+_0x5a8e9c(0x19a)+_0x5a8e9c(0x19f);const _0x14fa7b=_0x5a019e[0x0],_0x3a21f1=['database','parent_segment',_0x5a8e9c(0x190),_0x5a8e9c(0x1a6)];if(!_0x3a21f1[_0x5a8e9c(0x191)](_0x14fa7b))return _0x5a8e9c(0x19b)+_0x14fa7b+'.\x20Must\x20be\x20one\x20of:\x20'+_0x3a21f1[_0x5a8e9c(0x18e)](',\x20');return undefined;}async[a31_0x28a7c0(0x1a8)](_0x2678c2){const _0x2da156=a31_0x28a7c0,{args:_0xc4f6c5,options:_0x2598dc}=_0x2678c2;try{const _0x326bab=_0xc4f6c5[0x0],_0x10fe52=_0xc4f6c5[0x1];if(_0x326bab===_0x2da156(0x1a6)){if(!profileExists(_0x10fe52))return console[_0x2da156(0x188)]('Error:\x20Profile\x20\x27'+_0x10fe52+_0x2da156(0x189)),console[_0x2da156(0x188)]('\x0aUse\x20\x27tdx\x20profiles\x27\x20to\x20see\x20available\x20profiles'),0x1;const _0x3374a8=_0x2598dc[_0x2da156(0x18d)]||getCurrentSessionPID()[_0x2da156(0x19e)]();return saveSessionContext({'profile':_0x10fe52},_0x2598dc[_0x2da156(0x18d)]),console[_0x2da156(0x192)]('Session\x20profile\x20set\x20to:\x20'+_0x10fe52+_0x2da156(0x1a7)+_0x3374a8+')'),console['log'](_0x2da156(0x18b)),0x0;}const _0x5cc6ec={},_0x1f9cfc=_0x2598dc[_0x2da156(0x18d)]||getCurrentSessionPID()[_0x2da156(0x19e)]();switch(_0x326bab){case _0x2da156(0x197):_0x5cc6ec['database']=_0x10fe52,console[_0x2da156(0x192)](_0x2da156(0x199)+_0x10fe52+'\x20(session:\x20'+_0x1f9cfc+')');break;case _0x2da156(0x1a2):_0x5cc6ec[_0x2da156(0x1a2)]=_0x10fe52,console[_0x2da156(0x192)]('Session\x20parent_segment\x20set\x20to:\x20'+_0x10fe52+_0x2da156(0x1a7)+_0x1f9cfc+')');break;case _0x2da156(0x190):_0x5cc6ec[_0x2da156(0x190)]=_0x10fe52,console['log']('Session\x20llm_project\x20set\x20to:\x20'+_0x10fe52+'\x20(session:\x20'+_0x1f9cfc+')');break;}return saveSessionContext(_0x5cc6ec,_0x2598dc['session']),console[_0x2da156(0x192)](_0x2da156(0x18b)),0x0;}catch(_0x195e86){return _0x195e86 instanceof Error&&console[_0x2da156(0x188)]('Error:\x20'+_0x195e86[_0x2da156(0x1a5)]),0x1;}}}
@@ -1 +1 @@
1
- const a32_0x13ff80=a32_0x5a7c;function a32_0x5650(){const _0x239ed5=['1808004FulWes','filesExtracted','Downloading\x20project\x20','stat','...','workflow:retry','attemptId','Validation:\x20skipped','532HfWQDg','workflow:kill','3082408KmOBAi','Listing\x20workflow\x20sessions...','session:','startsWith','includeSubtasks','fromTask','\x20log\x20entr','✔\x20Deleted\x20project\x20','Error:\x20Attempt\x20ID\x20and\x20task\x20name\x20are\x20required','workflow:sessions','61554DZgkQR','attempts','1gOtmpy','attempt','workflow:logs','length','session','retrySession','Killing\x20attempt...','\x20\x20Files\x20extracted:\x20','error','from','includeRetried','Cancelled','\x20session','logs','name','6720420qjNbXg','Attempt\x20ID:\x20','Retry\x20a\x20session\x20or\x20attempt','workflow:push','15hfhVpu','cause','workflow:projects','Error:\x20Invalid\x20pattern.\x20Use\x20format:\x20project\x20or\x20project.workflow','split','Task\x20name:\x20','Params:\x20','\x20\x20Cause:\x20','List\x20workflow\x20execution\x20sessions','Show\x20tasks\x20for\x20an\x20attempt','Error:\x20Project\x20name\x20or\x20ID\x20is\x20required','Are\x20you\x20sure\x20you\x20want\x20to\x20kill\x20attempt\x20','data','fs/promises','skipValidation','Filter:\x20','Are\x20you\x20sure\x20you\x20want\x20to\x20retry\x20','Project\x20directory:\x20','limit','Pattern:\x20','Error:\x20','projectId','\x20is\x20not\x20a\x20directory','reason','Kill\x20a\x20running\x20attempt','Listing\x20workflows...','delete','workflow:download','ies','projects','Project\x20name:\x20','Usage:\x20workflow\x20retry\x20session:<id>\x20or\x20workflow\x20retry\x20attempt:<id>','From\x20task:\x20','verbose','Revision:\x20','params','execute','Including\x20subtasks:\x20yes','Error:\x20Session\x20ID\x20or\x20attempt\x20ID\x20is\x20required','yes','retryAttempt','Usage:\x20workflow:delete\x20<project-name-or-id>','\x20\x20New\x20attempt\x20ID:\x20','Listing\x20workflow\x20attempts...','substring','Getting\x20attempt\x20details...','✔\x20Retry\x20started','Delete\x20workflow\x20project\x20from\x20Treasure\x20Data','3952201SSTboB','workflow','178348YxHapD','Usage:\x20workflow:download\x20<project-name>\x20[output-dir]','workflow:attempts','revision','parse','Filter:\x20project=','9XjZyrE','List\x20workflow\x20attempts','projectName','Listing\x20workflow\x20projects...','workflow:attempt','Error:\x20Attempt\x20ID\x20is\x20required','Getting\x20attempt\x20tasks...','\x20\x20Project\x20ID:\x20','Push\x20workflow\x20project\x20to\x20Treasure\x20Data','Getting\x20task\x20logs...','\x20\x20Location:\x20','✔\x20Found\x20','Project:\x20','sessionId','status','Deleting\x20project\x20','Include\x20retried:\x20yes','readFile','workflow:tasks','Resume\x20from:\x20','workflows','Target:\x20','Reason:\x20','Show\x20logs\x20for\x20a\x20specific\x20task','\x20\x20Session\x20ID:\x20','message','\x20workflow','description','\x22?\x20This\x20cannot\x20be\x20undone.','\x20task','Output\x20directory:\x20','8330440SWjJBP','workflow:workflows','offset'];a32_0x5650=function(){return _0x239ed5;};return a32_0x5650();}(function(_0x38fc14,_0x320c5b){const _0x4d5dd8=a32_0x5a7c,_0x27c79c=_0x38fc14();while(!![]){try{const _0x31442c=-parseInt(_0x4d5dd8(0x111))/0x1*(-parseInt(_0x4d5dd8(0xfb))/0x2)+parseInt(_0x4d5dd8(0x124))/0x3*(parseInt(_0x4d5dd8(0x156))/0x4)+parseInt(_0x4d5dd8(0x120))/0x5+-parseInt(_0x4d5dd8(0x10f))/0x6*(parseInt(_0x4d5dd8(0x103))/0x7)+-parseInt(_0x4d5dd8(0x105))/0x8+parseInt(_0x4d5dd8(0x15c))/0x9*(-parseInt(_0x4d5dd8(0xf8))/0xa)+parseInt(_0x4d5dd8(0x154))/0xb;if(_0x31442c===_0x320c5b)break;else _0x27c79c['push'](_0x27c79c['shift']());}catch(_0x1ca565){_0x27c79c['push'](_0x27c79c['shift']());}}}(a32_0x5650,0xcb31b));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{confirm}from'../utils/prompt.js';export class WorkflowProjectsCommand extends BaseCommand{[a32_0x13ff80(0x11f)]=a32_0x13ff80(0x126);[a32_0x13ff80(0xf4)]='List\x20all\x20workflow\x20projects';async[a32_0x13ff80(0x148)](_0x1ae513){const _0x8a1b40=a32_0x13ff80,{options:_0x3794aa,args:_0xb24461,tdx:_0xc37ca}=_0x1ae513,_0x4c8a83=_0xb24461[0x0];try{_0x3794aa[_0x8a1b40(0x145)]&&_0x4c8a83&&console[_0x8a1b40(0x119)](_0x8a1b40(0x137)+_0x4c8a83);const _0x50b48a=await withSpinner(_0x8a1b40(0x15f),()=>_0xc37ca[_0x8a1b40(0x155)][_0x8a1b40(0x141)](_0x4c8a83,{'limit':_0x3794aa[_0x8a1b40(0x136)]}),{'verbose':_0x3794aa[_0x8a1b40(0x145)]}),_0x3c7808=_0x50b48a[_0x8a1b40(0x130)];return console[_0x8a1b40(0x119)](_0x8a1b40(0x167)+_0x3c7808[_0x8a1b40(0x114)]+'\x20project'+(_0x3c7808[_0x8a1b40(0x114)]!==0x1?'s':'')),await handleSDKOutput(_0x3c7808,_0x3794aa),0x0;}catch(_0x4e6155){if(_0x4e6155 instanceof SDKError)return console[_0x8a1b40(0x119)](_0x8a1b40(0x138)+_0x4e6155['message']),_0x4e6155['cause']&&console['error'](_0x8a1b40(0x12b)+_0x4e6155[_0x8a1b40(0x125)]),0x1;throw _0x4e6155;}}}export class WorkflowWorkflowsCommand extends BaseCommand{[a32_0x13ff80(0x11f)]=a32_0x13ff80(0xf9);[a32_0x13ff80(0xf4)]='List\x20workflows';async[a32_0x13ff80(0x148)](_0x218d40){const _0x35a413=a32_0x13ff80,{options:_0x1c213e,args:_0x32c627,tdx:_0x5e2cd4}=_0x218d40,_0x510e4d=_0x32c627[0x0];try{_0x1c213e[_0x35a413(0x145)]&&_0x510e4d&&console[_0x35a413(0x119)]('Project\x20filter:\x20'+_0x510e4d);const _0x118bfe=await withSpinner(_0x35a413(0x13d),()=>_0x5e2cd4[_0x35a413(0x155)][_0x35a413(0xed)](_0x510e4d,{'limit':_0x1c213e[_0x35a413(0x136)]}),{'verbose':_0x1c213e[_0x35a413(0x145)]}),_0x1e67fe=_0x118bfe['data'];return console[_0x35a413(0x119)]('✔\x20Found\x20'+_0x1e67fe['length']+_0x35a413(0xf3)+(_0x1e67fe[_0x35a413(0x114)]!==0x1?'s':'')),await handleSDKOutput(_0x1e67fe,_0x1c213e),0x0;}catch(_0x5ecb87){if(_0x5ecb87 instanceof SDKError)return console[_0x35a413(0x119)](_0x35a413(0x138)+_0x5ecb87['message']),_0x5ecb87[_0x35a413(0x125)]&&console['error'](_0x35a413(0x12b)+_0x5ecb87[_0x35a413(0x125)]),0x1;throw _0x5ecb87;}}}export class WorkflowSessionsCommand extends BaseCommand{[a32_0x13ff80(0x11f)]=a32_0x13ff80(0x10e);[a32_0x13ff80(0xf4)]=a32_0x13ff80(0x12c);async[a32_0x13ff80(0x148)](_0xaf36fc){const _0x28725c=a32_0x13ff80,{options:_0x5c90a0,args:_0x136d07,tdx:_0x408895}=_0xaf36fc;let _0x47c1e0,_0x20ad01;if(_0x136d07[0x0]){const _0x13e519=_0x136d07[0x0]['split']('.');if(_0x13e519['length']===0x1)_0x47c1e0=_0x13e519[0x0];else{if(_0x13e519['length']===0x2)[_0x47c1e0,_0x20ad01]=_0x13e519;else return console['error']('Error:\x20Invalid\x20pattern.\x20Use\x20format:\x20project\x20or\x20project.workflow'),0x1;}}try{if(_0x5c90a0[_0x28725c(0x145)]){if(_0x47c1e0&&_0x20ad01)console[_0x28725c(0x119)](_0x28725c(0x133)+_0x47c1e0+'.'+_0x20ad01);else _0x47c1e0&&console[_0x28725c(0x119)](_0x28725c(0x15b)+_0x47c1e0);const _0x198866=_0x5c90a0['status'];_0x198866&&console[_0x28725c(0x119)]('Status:\x20'+_0x198866);}const _0x3c0cd1=await withSpinner(_0x28725c(0x106),()=>_0x408895[_0x28725c(0x155)]['sessions']({'projectName':_0x47c1e0,'workflowName':_0x20ad01,'status':_0x5c90a0[_0x28725c(0xe7)],'fromTime':_0x5c90a0[_0x28725c(0x11a)],'toTime':_0x5c90a0['to'],'limit':_0x5c90a0[_0x28725c(0x136)]}),{'verbose':_0x5c90a0[_0x28725c(0x145)]}),_0x5ad890=_0x3c0cd1['data'];return console['error'](_0x28725c(0x167)+_0x5ad890[_0x28725c(0x114)]+_0x28725c(0x11d)+(_0x5ad890[_0x28725c(0x114)]!==0x1?'s':'')),await handleSDKOutput(_0x5ad890,_0x5c90a0),0x0;}catch(_0x380fef){if(_0x380fef instanceof SDKError)return console[_0x28725c(0x119)](_0x28725c(0x138)+_0x380fef[_0x28725c(0xf2)]),_0x380fef[_0x28725c(0x125)]&&console[_0x28725c(0x119)](_0x28725c(0x12b)+_0x380fef[_0x28725c(0x125)]),0x1;throw _0x380fef;}}}export class WorkflowAttemptsCommand extends BaseCommand{[a32_0x13ff80(0x11f)]=a32_0x13ff80(0x158);[a32_0x13ff80(0xf4)]=a32_0x13ff80(0x15d);async[a32_0x13ff80(0x148)](_0x4c98a6){const _0x58e37c=a32_0x13ff80,{options:_0x355e9b,args:_0x107bf8,tdx:_0x56cd15}=_0x4c98a6;let _0x75b718,_0x48a118;if(_0x107bf8[0x0]){const _0xf53be2=_0x107bf8[0x0][_0x58e37c(0x128)]('.');if(_0xf53be2['length']===0x1)_0x75b718=_0xf53be2[0x0];else{if(_0xf53be2['length']===0x2)[_0x75b718,_0x48a118]=_0xf53be2;else return console[_0x58e37c(0x119)](_0x58e37c(0x127)),0x1;}}try{const _0x5408eb=_0x355e9b[_0x58e37c(0x11b)];if(_0x355e9b[_0x58e37c(0x145)]){if(_0x75b718&&_0x48a118)console[_0x58e37c(0x119)](_0x58e37c(0x133)+_0x75b718+'.'+_0x48a118);else _0x75b718&&console['error'](_0x58e37c(0x15b)+_0x75b718);_0x5408eb&&console[_0x58e37c(0x119)](_0x58e37c(0xe9));}const _0x1d3fb0=await withSpinner(_0x58e37c(0x14f),()=>_0x56cd15[_0x58e37c(0x155)][_0x58e37c(0x110)]({'projectName':_0x75b718,'workflowName':_0x48a118,'includeRetried':_0x5408eb,'limit':_0x355e9b[_0x58e37c(0x136)]}),{'verbose':_0x355e9b[_0x58e37c(0x145)]}),_0x2a381a=_0x1d3fb0[_0x58e37c(0x130)];return console[_0x58e37c(0x119)](_0x58e37c(0x167)+_0x2a381a[_0x58e37c(0x114)]+'\x20attempt'+(_0x2a381a['length']!==0x1?'s':'')),await handleSDKOutput(_0x2a381a,_0x355e9b),0x0;}catch(_0x36b994){if(_0x36b994 instanceof SDKError)return console[_0x58e37c(0x119)](_0x58e37c(0x138)+_0x36b994[_0x58e37c(0xf2)]),_0x36b994[_0x58e37c(0x125)]&&console[_0x58e37c(0x119)](_0x58e37c(0x12b)+_0x36b994[_0x58e37c(0x125)]),0x1;throw _0x36b994;}}}function a32_0x5a7c(_0x17f220,_0x46dd2a){const _0x565092=a32_0x5650();return a32_0x5a7c=function(_0x5a7cd3,_0x2aed99){_0x5a7cd3=_0x5a7cd3-0xe7;let _0x288da4=_0x565092[_0x5a7cd3];return _0x288da4;},a32_0x5a7c(_0x17f220,_0x46dd2a);}export class WorkflowAttemptCommand extends BaseCommand{[a32_0x13ff80(0x11f)]=a32_0x13ff80(0x160);['description']='Show\x20specific\x20attempt\x20details';async[a32_0x13ff80(0x148)](_0x4eada8){const _0x3d970f=a32_0x13ff80,{options:_0x3d4748,args:_0x43f41b,tdx:_0xb3d9aa}=_0x4eada8,_0x151153=_0x43f41b[0x0];if(!_0x151153)return console['error'](_0x3d970f(0x161)),0x1;try{_0x3d4748[_0x3d970f(0x145)]&&console[_0x3d970f(0x119)](_0x3d970f(0x121)+_0x151153);const _0x1b0957=await withSpinner(_0x3d970f(0x151),()=>_0xb3d9aa['workflow'][_0x3d970f(0x112)](_0x151153),{'verbose':_0x3d4748[_0x3d970f(0x145)]}),_0x244aef=_0x1b0957[_0x3d970f(0x130)];return await handleSDKOutput([_0x244aef],_0x3d4748),0x0;}catch(_0x55e1cb){if(_0x55e1cb instanceof SDKError)return console['error'](_0x3d970f(0x138)+_0x55e1cb[_0x3d970f(0xf2)]),_0x55e1cb[_0x3d970f(0x125)]&&console[_0x3d970f(0x119)](_0x3d970f(0x12b)+_0x55e1cb[_0x3d970f(0x125)]),0x1;throw _0x55e1cb;}}}export class WorkflowTasksCommand extends BaseCommand{['name']=a32_0x13ff80(0xeb);[a32_0x13ff80(0xf4)]=a32_0x13ff80(0x12d);async[a32_0x13ff80(0x148)](_0x411203){const _0x111478=a32_0x13ff80,{options:_0x302353,args:_0x385396,tdx:_0xc9feaa}=_0x411203,_0x248ccf=_0x385396[0x0];if(!_0x248ccf)return console[_0x111478(0x119)]('Error:\x20Attempt\x20ID\x20is\x20required'),0x1;try{const _0x479ac0=_0x302353[_0x111478(0x109)];_0x302353[_0x111478(0x145)]&&(console[_0x111478(0x119)]('Attempt\x20ID:\x20'+_0x248ccf),_0x479ac0&&console[_0x111478(0x119)](_0x111478(0x149)));const _0x46ab0f=await withSpinner(_0x111478(0x162),()=>_0xc9feaa[_0x111478(0x155)]['tasks'](_0x248ccf,_0x479ac0||![]),{'verbose':_0x302353['verbose']}),_0x565b78=_0x46ab0f[_0x111478(0x130)];return console[_0x111478(0x119)](_0x111478(0x167)+_0x565b78[_0x111478(0x114)]+_0x111478(0xf6)+(_0x565b78[_0x111478(0x114)]!==0x1?'s':'')),await handleSDKOutput(_0x565b78,_0x302353),0x0;}catch(_0xcf9d32){if(_0xcf9d32 instanceof SDKError)return console[_0x111478(0x119)](_0x111478(0x138)+_0xcf9d32[_0x111478(0xf2)]),_0xcf9d32['cause']&&console[_0x111478(0x119)](_0x111478(0x12b)+_0xcf9d32[_0x111478(0x125)]),0x1;throw _0xcf9d32;}}}export class WorkflowLogsCommand extends BaseCommand{[a32_0x13ff80(0x11f)]=a32_0x13ff80(0x113);['description']=a32_0x13ff80(0xf0);async[a32_0x13ff80(0x148)](_0x46ba21){const _0x189977=a32_0x13ff80,{options:_0x23aebc,args:_0x15791d,tdx:_0x319b1b}=_0x46ba21,_0x5f4048=_0x15791d[0x0],_0x1005d7=_0x15791d[0x1];if(!_0x5f4048||!_0x1005d7)return console['error'](_0x189977(0x10d)),0x1;try{_0x23aebc[_0x189977(0x145)]&&(console[_0x189977(0x119)](_0x189977(0x121)+_0x5f4048),console[_0x189977(0x119)](_0x189977(0x129)+_0x1005d7));const _0x2c2c22=_0x23aebc[_0x189977(0xfa)],_0x3e2e39=await withSpinner(_0x189977(0x165),()=>_0x319b1b[_0x189977(0x155)][_0x189977(0x11e)](_0x5f4048,_0x1005d7,{'offset':_0x2c2c22,'limit':_0x23aebc[_0x189977(0x136)]}),{'verbose':_0x23aebc[_0x189977(0x145)]}),_0x457f02=_0x3e2e39[_0x189977(0x130)];return console[_0x189977(0x119)](_0x189977(0x167)+_0x457f02[_0x189977(0x114)]+_0x189977(0x10b)+(_0x457f02[_0x189977(0x114)]!==0x1?_0x189977(0x140):'y')),await handleSDKOutput(_0x457f02,_0x23aebc),0x0;}catch(_0x57e868){if(_0x57e868 instanceof SDKError)return console[_0x189977(0x119)](_0x189977(0x138)+_0x57e868[_0x189977(0xf2)]),_0x57e868['cause']&&console[_0x189977(0x119)](_0x189977(0x12b)+_0x57e868['cause']),0x1;throw _0x57e868;}}}export class WorkflowKillCommand extends BaseCommand{[a32_0x13ff80(0x11f)]=a32_0x13ff80(0x104);[a32_0x13ff80(0xf4)]=a32_0x13ff80(0x13c);async[a32_0x13ff80(0x148)](_0x291f6c){const _0x20bf25=a32_0x13ff80,{options:_0xad14f5,args:_0x18e9cb,tdx:_0x1ab9ef}=_0x291f6c,_0x1fc624=_0x18e9cb[0x0];if(!_0x1fc624)return console[_0x20bf25(0x119)](_0x20bf25(0x161)),0x1;try{const _0x302565=_0xad14f5[_0x20bf25(0x13b)];_0xad14f5[_0x20bf25(0x145)]&&(console[_0x20bf25(0x119)](_0x20bf25(0x121)+_0x1fc624),_0x302565&&console['error'](_0x20bf25(0xef)+_0x302565));if(!_0xad14f5['yes']){const _0x3d7018=await confirm(_0x20bf25(0x12f)+_0x1fc624+'?');if(!_0x3d7018)return console['error']('Cancelled'),0x0;}const _0x498b51=await withSpinner(_0x20bf25(0x117),()=>_0x1ab9ef['workflow']['kill'](_0x1fc624,_0x302565),{'verbose':_0xad14f5[_0x20bf25(0x145)]}),_0x2a5d24=_0x498b51[_0x20bf25(0x130)];return console[_0x20bf25(0x119)]('✔\x20'+_0x2a5d24),0x0;}catch(_0x244f53){if(_0x244f53 instanceof SDKError)return console[_0x20bf25(0x119)](_0x20bf25(0x138)+_0x244f53[_0x20bf25(0xf2)]),_0x244f53[_0x20bf25(0x125)]&&console[_0x20bf25(0x119)](_0x20bf25(0x12b)+_0x244f53['cause']),0x1;throw _0x244f53;}}}export class WorkflowRetryCommand extends BaseCommand{[a32_0x13ff80(0x11f)]=a32_0x13ff80(0x100);[a32_0x13ff80(0xf4)]=a32_0x13ff80(0x122);async[a32_0x13ff80(0x148)](_0x3a5c9d){const _0x23fe0c=a32_0x13ff80,{options:_0x4d3ab2,args:_0x56c616,tdx:_0x6ec883}=_0x3a5c9d,_0x35135b=_0x56c616[0x0];if(!_0x35135b)return console[_0x23fe0c(0x119)](_0x23fe0c(0x14a)),console[_0x23fe0c(0x119)](_0x23fe0c(0x143)),0x1;let _0x7c7eb4=![],_0x1c7b4b=_0x35135b;if(_0x35135b[_0x23fe0c(0x108)](_0x23fe0c(0x107)))_0x7c7eb4=!![],_0x1c7b4b=_0x35135b[_0x23fe0c(0x150)](0x8);else{if(_0x35135b[_0x23fe0c(0x108)]('attempt:'))_0x7c7eb4=![],_0x1c7b4b=_0x35135b[_0x23fe0c(0x150)](0x8);else return console[_0x23fe0c(0x119)]('Error:\x20Target\x20must\x20be\x20prefixed\x20with\x20\x22session:\x22\x20or\x20\x22attempt:\x22'),console['error']('Usage:\x20workflow\x20retry\x20session:<id>\x20or\x20workflow\x20retry\x20attempt:<id>'),0x1;}try{const _0x53b80f=_0x4d3ab2[_0x23fe0c(0x10a)],_0x26dfd7=_0x4d3ab2['resumeFrom'],_0x4f2d6f=_0x4d3ab2[_0x23fe0c(0x147)],_0xf664e8=_0x4d3ab2['force'];_0x4d3ab2[_0x23fe0c(0x145)]&&(console[_0x23fe0c(0x119)](_0x23fe0c(0xee)+(_0x7c7eb4?'session':_0x23fe0c(0x112))+'\x20'+_0x1c7b4b),_0x53b80f&&console['error'](_0x23fe0c(0x144)+_0x53b80f),_0x26dfd7&&console[_0x23fe0c(0x119)](_0x23fe0c(0xec)+_0x26dfd7),_0x4f2d6f&&console[_0x23fe0c(0x119)](_0x23fe0c(0x12a)+_0x4f2d6f),_0xf664e8&&console[_0x23fe0c(0x119)]('Force:\x20yes'));let _0x529e18;if(_0x4f2d6f)try{if(_0x4f2d6f[_0x23fe0c(0x108)]('@')){const _0x481a5c=await import(_0x23fe0c(0x131)),_0x2032f0=_0x4f2d6f[_0x23fe0c(0x150)](0x1),_0x299c2b=await _0x481a5c[_0x23fe0c(0xea)](_0x2032f0,'utf-8');_0x529e18=JSON['parse'](_0x299c2b);}else _0x529e18=JSON[_0x23fe0c(0x15a)](_0x4f2d6f);}catch{return console[_0x23fe0c(0x119)]('Error:\x20Invalid\x20JSON\x20in\x20--params'),0x1;}if(!_0x4d3ab2[_0x23fe0c(0x14b)]){const _0x3afedf=await confirm(_0x23fe0c(0x134)+(_0x7c7eb4?_0x23fe0c(0x115):_0x23fe0c(0x112))+'\x20'+_0x1c7b4b+'?');if(!_0x3afedf)return console[_0x23fe0c(0x119)](_0x23fe0c(0x11c)),0x0;}let _0x10fa48;_0x7c7eb4?_0x10fa48=await withSpinner('Retrying\x20session...',()=>_0x6ec883[_0x23fe0c(0x155)][_0x23fe0c(0x116)](_0x1c7b4b,{'fromTask':_0x53b80f,'retryParams':_0x529e18}),{'verbose':_0x4d3ab2[_0x23fe0c(0x145)]}):_0x10fa48=await withSpinner('Retrying\x20attempt...',()=>_0x6ec883['workflow'][_0x23fe0c(0x14c)](_0x1c7b4b,{'resumeFrom':_0x26dfd7,'retryParams':_0x529e18,'force':_0xf664e8}),{'verbose':_0x4d3ab2['verbose']});const _0x273fbb=_0x10fa48['data'];return console[_0x23fe0c(0x119)](_0x23fe0c(0x152)),console[_0x23fe0c(0x119)](_0x23fe0c(0x14e)+_0x273fbb[_0x23fe0c(0x101)]),console[_0x23fe0c(0x119)](_0x23fe0c(0xf1)+_0x273fbb[_0x23fe0c(0x169)]),0x0;}catch(_0x3c068a){if(_0x3c068a instanceof SDKError)return console[_0x23fe0c(0x119)](_0x23fe0c(0x138)+_0x3c068a[_0x23fe0c(0xf2)]),_0x3c068a['cause']&&console['error'](_0x23fe0c(0x12b)+_0x3c068a[_0x23fe0c(0x125)]),0x1;throw _0x3c068a;}}}export class WorkflowDownloadCommand extends BaseCommand{['name']=a32_0x13ff80(0x13f);[a32_0x13ff80(0xf4)]='Download\x20workflow\x20project\x20from\x20Treasure\x20Data';async[a32_0x13ff80(0x148)](_0x569239){const _0x12cd62=a32_0x13ff80,{options:_0x42c0e7,args:_0xc604cb,tdx:_0x3f3c4a}=_0x569239,_0x2cbfa5=_0xc604cb[0x0],_0x3cce60=_0xc604cb[0x1]||'.';if(!_0x2cbfa5)return console['error']('Error:\x20Project\x20name\x20is\x20required'),console['error'](_0x12cd62(0x157)),0x1;const _0x1ad6a7=_0x42c0e7[_0x12cd62(0x159)];_0x42c0e7[_0x12cd62(0x145)]&&(console[_0x12cd62(0x119)](_0x12cd62(0x168)+_0x2cbfa5),console['error'](_0x12cd62(0xf7)+_0x3cce60),_0x1ad6a7&&console['error']('Revision:\x20'+_0x1ad6a7));const _0x30aedd=await withSpinner(_0x12cd62(0xfd)+_0x2cbfa5+_0x12cd62(0xff),()=>_0x3f3c4a[_0x12cd62(0x155)]['download'](_0x2cbfa5,_0x3cce60,{'revision':_0x1ad6a7}),{'verbose':_0x42c0e7[_0x12cd62(0x145)]}),_0x5df2f0=_0x30aedd['data'];return console[_0x12cd62(0x119)]('✔\x20Downloaded\x20'+_0x5df2f0['projectName']),console[_0x12cd62(0x119)]('\x20\x20Revision:\x20'+_0x5df2f0[_0x12cd62(0x159)]),console[_0x12cd62(0x119)](_0x12cd62(0x118)+_0x5df2f0[_0x12cd62(0xfc)]),console[_0x12cd62(0x119)](_0x12cd62(0x166)+_0x3cce60+'/'+_0x5df2f0['projectName']),0x0;}}export class WorkflowPushCommand extends BaseCommand{['name']=a32_0x13ff80(0x123);[a32_0x13ff80(0xf4)]=a32_0x13ff80(0x164);async['execute'](_0x15a28a){const _0x371bde=a32_0x13ff80,{options:_0x292120,args:_0x389934,tdx:_0x553069}=_0x15a28a;let _0xb02b5d='.',_0x301b63=_0x292120[_0x371bde(0x11f)];if(_0x389934[0x0]){const {promises:_0x34381f}=await import('fs');try{const _0x90c398=await _0x34381f[_0x371bde(0xfe)](_0x389934[0x0]);if(_0x90c398['isDirectory']())_0xb02b5d=_0x389934[0x0];else return console[_0x371bde(0x119)](_0x371bde(0x138)+_0x389934[0x0]+_0x371bde(0x13a)),0x1;}catch{_0x301b63=_0x389934[0x0],_0xb02b5d='.';}}const _0x598583=_0x292120['revision'],_0x4d0813=_0x292120[_0x371bde(0x132)];_0x292120[_0x371bde(0x145)]&&(console[_0x371bde(0x119)](_0x371bde(0x135)+_0xb02b5d),_0x301b63&&console[_0x371bde(0x119)](_0x371bde(0x142)+_0x301b63),_0x598583&&console[_0x371bde(0x119)](_0x371bde(0x146)+_0x598583),_0x4d0813&&console['error'](_0x371bde(0x102)));const _0x2ce089=await withSpinner('Pushing\x20workflow\x20project...',()=>_0x553069['workflow']['push'](_0xb02b5d,{'projectName':_0x301b63,'revision':_0x598583,'skipValidation':_0x4d0813}),{'verbose':_0x292120[_0x371bde(0x145)]}),_0x24ec96=_0x2ce089['data'];return console[_0x371bde(0x119)]('✔\x20Pushed\x20'+_0x24ec96[_0x371bde(0x15e)]),console[_0x371bde(0x119)](_0x371bde(0x163)+_0x24ec96[_0x371bde(0x139)]),console[_0x371bde(0x119)]('\x20\x20Revision:\x20'+_0x24ec96['revision']),0x0;}}export class WorkflowDeleteCommand extends BaseCommand{[a32_0x13ff80(0x11f)]='workflow:delete';[a32_0x13ff80(0xf4)]=a32_0x13ff80(0x153);async[a32_0x13ff80(0x148)](_0xe45c45){const _0x4193ea=a32_0x13ff80,{options:_0x1518c2,args:_0x1c3784,tdx:_0x4620b9}=_0xe45c45,_0x2804e8=_0x1c3784[0x0];if(!_0x2804e8)return console['error'](_0x4193ea(0x12e)),console[_0x4193ea(0x119)](_0x4193ea(0x14d)),0x1;_0x1518c2[_0x4193ea(0x145)]&&console[_0x4193ea(0x119)]('Project:\x20'+_0x2804e8);if(!_0x1518c2['yes']){const _0x1eb0a5=await confirm('Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20project\x20\x22'+_0x2804e8+_0x4193ea(0xf5));if(!_0x1eb0a5)return console[_0x4193ea(0x119)](_0x4193ea(0x11c)),0x0;}const _0x205c8f=await withSpinner(_0x4193ea(0xe8)+_0x2804e8+_0x4193ea(0xff),()=>_0x4620b9[_0x4193ea(0x155)][_0x4193ea(0x13e)](_0x2804e8),{'verbose':_0x1518c2['verbose']}),_0x2bac2a=_0x205c8f[_0x4193ea(0x130)];return console[_0x4193ea(0x119)](_0x4193ea(0x10c)+_0x2bac2a[_0x4193ea(0x15e)]),console[_0x4193ea(0x119)]('\x20\x20Project\x20ID:\x20'+_0x2bac2a[_0x4193ea(0x139)]),0x0;}}
1
+ const a32_0x5b5461=a32_0xe2d5;(function(_0x3485a8,_0x25379c){const _0x22b278=a32_0xe2d5,_0x2820d8=_0x3485a8();while(!![]){try{const _0x544298=-parseInt(_0x22b278(0xf4))/0x1+parseInt(_0x22b278(0xf3))/0x2*(-parseInt(_0x22b278(0x113))/0x3)+parseInt(_0x22b278(0x131))/0x4+parseInt(_0x22b278(0xf1))/0x5*(parseInt(_0x22b278(0xe2))/0x6)+parseInt(_0x22b278(0xfe))/0x7+-parseInt(_0x22b278(0xd7))/0x8*(-parseInt(_0x22b278(0xde))/0x9)+-parseInt(_0x22b278(0x10c))/0xa;if(_0x544298===_0x25379c)break;else _0x2820d8['push'](_0x2820d8['shift']());}catch(_0x7ce750){_0x2820d8['push'](_0x2820d8['shift']());}}}(a32_0x2d8f,0x9515e));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{confirm}from'../utils/prompt.js';export class WorkflowProjectsCommand extends BaseCommand{['name']=a32_0x5b5461(0x12d);['description']=a32_0x5b5461(0xd6);async['execute'](_0x5bd498){const _0x596ef1=a32_0x5b5461,{options:_0x108ffe,args:_0x579e0d,tdx:_0x2572d9}=_0x5bd498,_0x30e5bd=_0x579e0d[0x0];try{_0x108ffe[_0x596ef1(0x108)]&&_0x30e5bd&&console[_0x596ef1(0x12a)](_0x596ef1(0xd5)+_0x30e5bd);const _0x1ff21b=await withSpinner(_0x596ef1(0xcf),()=>_0x2572d9[_0x596ef1(0xd1)][_0x596ef1(0xed)](_0x30e5bd,{'limit':_0x108ffe[_0x596ef1(0x120)]}),{'verbose':_0x108ffe['verbose']}),_0x39dfe7=_0x1ff21b[_0x596ef1(0x13f)];return console[_0x596ef1(0x12a)](_0x596ef1(0x121)+_0x39dfe7[_0x596ef1(0x130)]+_0x596ef1(0x142)+(_0x39dfe7[_0x596ef1(0x130)]!==0x1?'s':'')),await handleSDKOutput(_0x39dfe7,_0x108ffe),0x0;}catch(_0x296d7a){if(_0x296d7a instanceof SDKError)return console['error'](_0x596ef1(0xdd)+_0x296d7a['message']),_0x296d7a[_0x596ef1(0x135)]&&console[_0x596ef1(0x12a)](_0x596ef1(0x102)+_0x296d7a['cause']),0x1;throw _0x296d7a;}}}export class WorkflowWorkflowsCommand extends BaseCommand{[a32_0x5b5461(0x126)]='workflow:workflows';[a32_0x5b5461(0x123)]=a32_0x5b5461(0x103);async[a32_0x5b5461(0x101)](_0x32483b){const _0x498118=a32_0x5b5461,{options:_0x25a848,args:_0x5ed856,tdx:_0x358239}=_0x32483b,_0x314694=_0x5ed856[0x0];try{_0x25a848[_0x498118(0x108)]&&_0x314694&&console[_0x498118(0x12a)](_0x498118(0xfb)+_0x314694);const _0xdda83d=await withSpinner(_0x498118(0xf8),()=>_0x358239[_0x498118(0xd1)][_0x498118(0xea)](_0x314694,{'limit':_0x25a848['limit']}),{'verbose':_0x25a848[_0x498118(0x108)]}),_0x4679fc=_0xdda83d[_0x498118(0x13f)];return console['error'](_0x498118(0x121)+_0x4679fc[_0x498118(0x130)]+_0x498118(0x128)+(_0x4679fc[_0x498118(0x130)]!==0x1?'s':'')),await handleSDKOutput(_0x4679fc,_0x25a848),0x0;}catch(_0x2c57b5){if(_0x2c57b5 instanceof SDKError)return console['error'](_0x498118(0xdd)+_0x2c57b5[_0x498118(0xd8)]),_0x2c57b5['cause']&&console[_0x498118(0x12a)]('\x20\x20Cause:\x20'+_0x2c57b5[_0x498118(0x135)]),0x1;throw _0x2c57b5;}}}export class WorkflowSessionsCommand extends BaseCommand{[a32_0x5b5461(0x126)]=a32_0x5b5461(0xf6);['description']=a32_0x5b5461(0x116);async[a32_0x5b5461(0x101)](_0x32fa05){const _0x5d0f96=a32_0x5b5461,{options:_0x2c413d,args:_0x30df00,tdx:_0x5850c8}=_0x32fa05;let _0x26e0c8,_0x535b00;if(_0x30df00[0x0]){const _0x5622ba=_0x30df00[0x0][_0x5d0f96(0xe8)]('.');if(_0x5622ba[_0x5d0f96(0x130)]===0x1)_0x26e0c8=_0x5622ba[0x0];else{if(_0x5622ba[_0x5d0f96(0x130)]===0x2)[_0x26e0c8,_0x535b00]=_0x5622ba;else return console[_0x5d0f96(0x12a)](_0x5d0f96(0x132)),0x1;}}try{if(_0x2c413d[_0x5d0f96(0x108)]){if(_0x26e0c8&&_0x535b00)console[_0x5d0f96(0x12a)](_0x5d0f96(0x148)+_0x26e0c8+'.'+_0x535b00);else _0x26e0c8&&console[_0x5d0f96(0x12a)]('Filter:\x20project='+_0x26e0c8);const _0x5d6280=_0x2c413d[_0x5d0f96(0xcd)];_0x5d6280&&console['error'](_0x5d0f96(0xf0)+_0x5d6280);}const _0x2eeab0=await withSpinner('Listing\x20workflow\x20sessions...',()=>_0x5850c8[_0x5d0f96(0xd1)][_0x5d0f96(0xd0)]({'projectName':_0x26e0c8,'workflowName':_0x535b00,'status':_0x2c413d[_0x5d0f96(0xcd)],'fromTime':_0x2c413d[_0x5d0f96(0x11c)],'toTime':_0x2c413d['to'],'limit':_0x2c413d[_0x5d0f96(0x120)]}),{'verbose':_0x2c413d[_0x5d0f96(0x108)]}),_0x278f38=_0x2eeab0['data'];return console['error'](_0x5d0f96(0x121)+_0x278f38[_0x5d0f96(0x130)]+_0x5d0f96(0x12c)+(_0x278f38[_0x5d0f96(0x130)]!==0x1?'s':'')),await handleSDKOutput(_0x278f38,_0x2c413d),0x0;}catch(_0x3af399){if(_0x3af399 instanceof SDKError)return console[_0x5d0f96(0x12a)]('Error:\x20'+_0x3af399[_0x5d0f96(0xd8)]),_0x3af399[_0x5d0f96(0x135)]&&console[_0x5d0f96(0x12a)](_0x5d0f96(0x102)+_0x3af399[_0x5d0f96(0x135)]),0x1;throw _0x3af399;}}}export class WorkflowAttemptsCommand extends BaseCommand{['name']=a32_0x5b5461(0x109);[a32_0x5b5461(0x123)]=a32_0x5b5461(0xcb);async[a32_0x5b5461(0x101)](_0x4a4db3){const _0x259d58=a32_0x5b5461,{options:_0x2676d2,args:_0x4c4857,tdx:_0xe63ab7}=_0x4a4db3;let _0xf92844,_0x20b103;if(_0x4c4857[0x0]){const _0x2115d3=_0x4c4857[0x0][_0x259d58(0xe8)]('.');if(_0x2115d3[_0x259d58(0x130)]===0x1)_0xf92844=_0x2115d3[0x0];else{if(_0x2115d3[_0x259d58(0x130)]===0x2)[_0xf92844,_0x20b103]=_0x2115d3;else return console[_0x259d58(0x12a)](_0x259d58(0x132)),0x1;}}try{const _0x207b27=_0x2676d2[_0x259d58(0x11a)];if(_0x2676d2[_0x259d58(0x108)]){if(_0xf92844&&_0x20b103)console[_0x259d58(0x12a)](_0x259d58(0x148)+_0xf92844+'.'+_0x20b103);else _0xf92844&&console[_0x259d58(0x12a)](_0x259d58(0xd9)+_0xf92844);_0x207b27&&console[_0x259d58(0x12a)](_0x259d58(0x111));}const _0x52656f=await withSpinner('Listing\x20workflow\x20attempts...',()=>_0xe63ab7[_0x259d58(0xd1)]['attempts']({'projectName':_0xf92844,'workflowName':_0x20b103,'includeRetried':_0x207b27,'limit':_0x2676d2[_0x259d58(0x120)]}),{'verbose':_0x2676d2['verbose']}),_0x267007=_0x52656f[_0x259d58(0x13f)];return console[_0x259d58(0x12a)](_0x259d58(0x121)+_0x267007[_0x259d58(0x130)]+'\x20attempt'+(_0x267007[_0x259d58(0x130)]!==0x1?'s':'')),await handleSDKOutput(_0x267007,_0x2676d2),0x0;}catch(_0x272463){if(_0x272463 instanceof SDKError)return console[_0x259d58(0x12a)](_0x259d58(0xdd)+_0x272463['message']),_0x272463[_0x259d58(0x135)]&&console[_0x259d58(0x12a)](_0x259d58(0x102)+_0x272463[_0x259d58(0x135)]),0x1;throw _0x272463;}}}export class WorkflowAttemptCommand extends BaseCommand{[a32_0x5b5461(0x126)]='workflow:attempt';[a32_0x5b5461(0x123)]=a32_0x5b5461(0x125);async[a32_0x5b5461(0x101)](_0x5f2558){const _0x4eecc0=a32_0x5b5461,{options:_0x132e38,args:_0x845f9b,tdx:_0x40e17a}=_0x5f2558,_0x5e030c=_0x845f9b[0x0];if(!_0x5e030c)return console[_0x4eecc0(0x12a)]('Error:\x20Attempt\x20ID\x20is\x20required'),0x1;try{_0x132e38['verbose']&&console[_0x4eecc0(0x12a)](_0x4eecc0(0x115)+_0x5e030c);const _0x268cd0=await withSpinner('Getting\x20attempt\x20details...',()=>_0x40e17a[_0x4eecc0(0xd1)][_0x4eecc0(0xd3)](_0x5e030c),{'verbose':_0x132e38[_0x4eecc0(0x108)]}),_0x271bef=_0x268cd0['data'];return await handleSDKOutput([_0x271bef],_0x132e38),0x0;}catch(_0x1b647e){if(_0x1b647e instanceof SDKError)return console[_0x4eecc0(0x12a)](_0x4eecc0(0xdd)+_0x1b647e[_0x4eecc0(0xd8)]),_0x1b647e[_0x4eecc0(0x135)]&&console['error'](_0x4eecc0(0x102)+_0x1b647e[_0x4eecc0(0x135)]),0x1;throw _0x1b647e;}}}export class WorkflowTasksCommand extends BaseCommand{[a32_0x5b5461(0x126)]=a32_0x5b5461(0x13a);[a32_0x5b5461(0x123)]='Show\x20tasks\x20for\x20an\x20attempt';async[a32_0x5b5461(0x101)](_0x3193b0){const _0x59cf73=a32_0x5b5461,{options:_0x5634a2,args:_0x2e7e32,tdx:_0x4eb8f0}=_0x3193b0,_0x39ab5e=_0x2e7e32[0x0];if(!_0x39ab5e)return console['error']('Error:\x20Attempt\x20ID\x20is\x20required'),0x1;try{const _0x41f35e=_0x5634a2['includeSubtasks'];_0x5634a2['verbose']&&(console[_0x59cf73(0x12a)](_0x59cf73(0x115)+_0x39ab5e),_0x41f35e&&console['error']('Including\x20subtasks:\x20yes'));const _0x284ae2=await withSpinner(_0x59cf73(0xdc),()=>_0x4eb8f0[_0x59cf73(0xd1)][_0x59cf73(0xf9)](_0x39ab5e,_0x41f35e||![]),{'verbose':_0x5634a2['verbose']}),_0xf08d6=_0x284ae2[_0x59cf73(0x13f)];return console[_0x59cf73(0x12a)](_0x59cf73(0x121)+_0xf08d6[_0x59cf73(0x130)]+'\x20task'+(_0xf08d6['length']!==0x1?'s':'')),await handleSDKOutput(_0xf08d6,_0x5634a2),0x0;}catch(_0x46bc9b){if(_0x46bc9b instanceof SDKError)return console[_0x59cf73(0x12a)](_0x59cf73(0xdd)+_0x46bc9b[_0x59cf73(0xd8)]),_0x46bc9b[_0x59cf73(0x135)]&&console[_0x59cf73(0x12a)](_0x59cf73(0x102)+_0x46bc9b['cause']),0x1;throw _0x46bc9b;}}}function a32_0x2d8f(){const _0x50b2dc=['Usage:\x20workflow:delete\x20<project-name-or-id>','From\x20task:\x20','length','3125564sWmZHm','Error:\x20Invalid\x20pattern.\x20Use\x20format:\x20project\x20or\x20project.workflow','workflow:retry','Output\x20directory:\x20','cause','Error:\x20Project\x20name\x20is\x20required','readFile','Error:\x20Project\x20name\x20or\x20ID\x20is\x20required','attemptId','workflow:tasks','revision','Task\x20name:\x20','\x22?\x20This\x20cannot\x20be\x20undone.','Error:\x20Target\x20must\x20be\x20prefixed\x20with\x20\x22session:\x22\x20or\x20\x22attempt:\x22','data','Error:\x20Invalid\x20JSON\x20in\x20--params','parse','\x20project','✔\x20Pushed\x20','Delete\x20workflow\x20project\x20from\x20Treasure\x20Data','Deleting\x20project\x20','✔\x20Retry\x20started','Are\x20you\x20sure\x20you\x20want\x20to\x20retry\x20','Filter:\x20','Killing\x20attempt...','projectId','Show\x20logs\x20for\x20a\x20specific\x20task','List\x20workflow\x20attempts','Push\x20workflow\x20project\x20to\x20Treasure\x20Data','status','\x20\x20Revision:\x20','Listing\x20workflow\x20projects...','sessions','workflow','...','attempt','skipValidation','Pattern:\x20','List\x20all\x20workflow\x20projects','144VhItmW','message','Filter:\x20project=','offset','Validation:\x20skipped','Getting\x20attempt\x20tasks...','Error:\x20','74133nwQKEj','Error:\x20Session\x20ID\x20or\x20attempt\x20ID\x20is\x20required','startsWith','Download\x20workflow\x20project\x20from\x20Treasure\x20Data','1842phZvLX','retryAttempt','ies','session','filesExtracted','\x20\x20Project\x20ID:\x20','split','\x20\x20New\x20attempt\x20ID:\x20','workflows','retrySession','resumeFrom','projects','sessionId','isDirectory','Status:\x20','18110vUZmjd','session:','34PqSbBa','813269ohAyYx','params','workflow:sessions','Cancelled','Listing\x20workflows...','tasks','workflow:delete','Project\x20filter:\x20','reason','Error:\x20Attempt\x20ID\x20is\x20required','6541423SdWKak','\x20\x20Files\x20extracted:\x20','projectName','execute','\x20\x20Cause:\x20','List\x20workflows','attempt:','Error:\x20Attempt\x20ID\x20and\x20task\x20name\x20are\x20required','delete','Downloading\x20project\x20','verbose','workflow:attempts','\x20\x20Session\x20ID:\x20','workflow:download','9398200ZLsjAu','Usage:\x20workflow:download\x20<project-name>\x20[output-dir]','yes','✔\x20Deleted\x20project\x20','Force:\x20yes','Include\x20retried:\x20yes','Project:\x20','108063WxKEAF','fromTask','Attempt\x20ID:\x20','List\x20workflow\x20execution\x20sessions','Reason:\x20','Getting\x20task\x20logs...','push','includeRetried','Usage:\x20workflow\x20retry\x20session:<id>\x20or\x20workflow\x20retry\x20attempt:<id>','from','substring','workflow:logs','Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20project\x20\x22','limit','✔\x20Found\x20','Retrying\x20attempt...','description','Are\x20you\x20sure\x20you\x20want\x20to\x20kill\x20attempt\x20','Show\x20specific\x20attempt\x20details','name','Revision:\x20','\x20workflow','stat','error','Resume\x20from:\x20','\x20session','workflow:projects'];a32_0x2d8f=function(){return _0x50b2dc;};return a32_0x2d8f();}export class WorkflowLogsCommand extends BaseCommand{[a32_0x5b5461(0x126)]=a32_0x5b5461(0x11e);[a32_0x5b5461(0x123)]=a32_0x5b5461(0x14b);async[a32_0x5b5461(0x101)](_0x53888a){const _0x2d77b3=a32_0x5b5461,{options:_0x508472,args:_0x189840,tdx:_0x1e9df3}=_0x53888a,_0x117754=_0x189840[0x0],_0x46194=_0x189840[0x1];if(!_0x117754||!_0x46194)return console[_0x2d77b3(0x12a)](_0x2d77b3(0x105)),0x1;try{_0x508472[_0x2d77b3(0x108)]&&(console[_0x2d77b3(0x12a)](_0x2d77b3(0x115)+_0x117754),console[_0x2d77b3(0x12a)](_0x2d77b3(0x13c)+_0x46194));const _0x4cef2d=_0x508472[_0x2d77b3(0xda)],_0x50b1f4=await withSpinner(_0x2d77b3(0x118),()=>_0x1e9df3['workflow']['logs'](_0x117754,_0x46194,{'offset':_0x4cef2d,'limit':_0x508472[_0x2d77b3(0x120)]}),{'verbose':_0x508472['verbose']}),_0x800e72=_0x50b1f4['data'];return console[_0x2d77b3(0x12a)](_0x2d77b3(0x121)+_0x800e72['length']+'\x20log\x20entr'+(_0x800e72[_0x2d77b3(0x130)]!==0x1?_0x2d77b3(0xe4):'y')),await handleSDKOutput(_0x800e72,_0x508472),0x0;}catch(_0x3c7f9d){if(_0x3c7f9d instanceof SDKError)return console[_0x2d77b3(0x12a)](_0x2d77b3(0xdd)+_0x3c7f9d[_0x2d77b3(0xd8)]),_0x3c7f9d[_0x2d77b3(0x135)]&&console[_0x2d77b3(0x12a)](_0x2d77b3(0x102)+_0x3c7f9d['cause']),0x1;throw _0x3c7f9d;}}}export class WorkflowKillCommand extends BaseCommand{[a32_0x5b5461(0x126)]='workflow:kill';[a32_0x5b5461(0x123)]='Kill\x20a\x20running\x20attempt';async['execute'](_0x5db412){const _0x10e89e=a32_0x5b5461,{options:_0x4398ce,args:_0x2f6697,tdx:_0x200867}=_0x5db412,_0x2d92b9=_0x2f6697[0x0];if(!_0x2d92b9)return console[_0x10e89e(0x12a)](_0x10e89e(0xfd)),0x1;try{const _0x52ac7d=_0x4398ce[_0x10e89e(0xfc)];_0x4398ce[_0x10e89e(0x108)]&&(console[_0x10e89e(0x12a)]('Attempt\x20ID:\x20'+_0x2d92b9),_0x52ac7d&&console['error'](_0x10e89e(0x117)+_0x52ac7d));if(!_0x4398ce['yes']){const _0xbe267a=await confirm(_0x10e89e(0x124)+_0x2d92b9+'?');if(!_0xbe267a)return console[_0x10e89e(0x12a)](_0x10e89e(0xf7)),0x0;}const _0x1ca29a=await withSpinner(_0x10e89e(0x149),()=>_0x200867[_0x10e89e(0xd1)]['kill'](_0x2d92b9,_0x52ac7d),{'verbose':_0x4398ce['verbose']}),_0x49622e=_0x1ca29a['data'];return console[_0x10e89e(0x12a)]('✔\x20'+_0x49622e),0x0;}catch(_0x2c28b0){if(_0x2c28b0 instanceof SDKError)return console[_0x10e89e(0x12a)](_0x10e89e(0xdd)+_0x2c28b0[_0x10e89e(0xd8)]),_0x2c28b0[_0x10e89e(0x135)]&&console[_0x10e89e(0x12a)](_0x10e89e(0x102)+_0x2c28b0['cause']),0x1;throw _0x2c28b0;}}}export class WorkflowRetryCommand extends BaseCommand{['name']=a32_0x5b5461(0x133);['description']='Retry\x20a\x20session\x20or\x20attempt';async[a32_0x5b5461(0x101)](_0x3fb1ba){const _0x33dd78=a32_0x5b5461,{options:_0x5e15d1,args:_0x156af1,tdx:_0x2953a0}=_0x3fb1ba,_0x4430cc=_0x156af1[0x0];if(!_0x4430cc)return console['error'](_0x33dd78(0xdf)),console[_0x33dd78(0x12a)]('Usage:\x20workflow\x20retry\x20session:<id>\x20or\x20workflow\x20retry\x20attempt:<id>'),0x1;let _0x14ac69=![],_0x351e35=_0x4430cc;if(_0x4430cc[_0x33dd78(0xe0)](_0x33dd78(0xf2)))_0x14ac69=!![],_0x351e35=_0x4430cc['substring'](0x8);else{if(_0x4430cc[_0x33dd78(0xe0)](_0x33dd78(0x104)))_0x14ac69=![],_0x351e35=_0x4430cc[_0x33dd78(0x11d)](0x8);else return console[_0x33dd78(0x12a)](_0x33dd78(0x13e)),console[_0x33dd78(0x12a)](_0x33dd78(0x11b)),0x1;}try{const _0x360263=_0x5e15d1[_0x33dd78(0x114)],_0x5d1623=_0x5e15d1[_0x33dd78(0xec)],_0x55b610=_0x5e15d1[_0x33dd78(0xf5)],_0x57f378=_0x5e15d1['force'];_0x5e15d1[_0x33dd78(0x108)]&&(console[_0x33dd78(0x12a)]('Target:\x20'+(_0x14ac69?_0x33dd78(0xe5):_0x33dd78(0xd3))+'\x20'+_0x351e35),_0x360263&&console[_0x33dd78(0x12a)](_0x33dd78(0x12f)+_0x360263),_0x5d1623&&console['error'](_0x33dd78(0x12b)+_0x5d1623),_0x55b610&&console[_0x33dd78(0x12a)]('Params:\x20'+_0x55b610),_0x57f378&&console[_0x33dd78(0x12a)](_0x33dd78(0x110)));let _0x401235;if(_0x55b610)try{if(_0x55b610['startsWith']('@')){const _0x4a8f06=await import('fs/promises'),_0x9bd2f5=_0x55b610[_0x33dd78(0x11d)](0x1),_0x37ad23=await _0x4a8f06[_0x33dd78(0x137)](_0x9bd2f5,'utf-8');_0x401235=JSON[_0x33dd78(0x141)](_0x37ad23);}else _0x401235=JSON[_0x33dd78(0x141)](_0x55b610);}catch{return console[_0x33dd78(0x12a)](_0x33dd78(0x140)),0x1;}if(!_0x5e15d1['yes']){const _0x8c3740=await confirm(_0x33dd78(0x147)+(_0x14ac69?'session':_0x33dd78(0xd3))+'\x20'+_0x351e35+'?');if(!_0x8c3740)return console['error'](_0x33dd78(0xf7)),0x0;}let _0xa02ee5;_0x14ac69?_0xa02ee5=await withSpinner('Retrying\x20session...',()=>_0x2953a0['workflow'][_0x33dd78(0xeb)](_0x351e35,{'fromTask':_0x360263,'retryParams':_0x401235}),{'verbose':_0x5e15d1[_0x33dd78(0x108)]}):_0xa02ee5=await withSpinner(_0x33dd78(0x122),()=>_0x2953a0['workflow'][_0x33dd78(0xe3)](_0x351e35,{'resumeFrom':_0x5d1623,'retryParams':_0x401235,'force':_0x57f378}),{'verbose':_0x5e15d1['verbose']});const _0x16d256=_0xa02ee5['data'];return console[_0x33dd78(0x12a)](_0x33dd78(0x146)),console[_0x33dd78(0x12a)](_0x33dd78(0xe9)+_0x16d256[_0x33dd78(0x139)]),console[_0x33dd78(0x12a)](_0x33dd78(0x10a)+_0x16d256[_0x33dd78(0xee)]),0x0;}catch(_0x520c7e){if(_0x520c7e instanceof SDKError)return console[_0x33dd78(0x12a)]('Error:\x20'+_0x520c7e[_0x33dd78(0xd8)]),_0x520c7e[_0x33dd78(0x135)]&&console['error'](_0x33dd78(0x102)+_0x520c7e['cause']),0x1;throw _0x520c7e;}}}export class WorkflowDownloadCommand extends BaseCommand{[a32_0x5b5461(0x126)]=a32_0x5b5461(0x10b);['description']=a32_0x5b5461(0xe1);async[a32_0x5b5461(0x101)](_0x14785e){const _0x180417=a32_0x5b5461,{options:_0x2279d9,args:_0x3e2cec,tdx:_0xac173d}=_0x14785e,_0x5b9755=_0x3e2cec[0x0],_0x525ac9=_0x3e2cec[0x1]||'.';if(!_0x5b9755)return console['error'](_0x180417(0x136)),console['error'](_0x180417(0x10d)),0x1;const _0x2ca220=_0x2279d9['revision'];_0x2279d9[_0x180417(0x108)]&&(console['error'](_0x180417(0x112)+_0x5b9755),console[_0x180417(0x12a)](_0x180417(0x134)+_0x525ac9),_0x2ca220&&console['error'](_0x180417(0x127)+_0x2ca220));const _0xa4eafb=await withSpinner(_0x180417(0x107)+_0x5b9755+'...',()=>_0xac173d[_0x180417(0xd1)]['download'](_0x5b9755,_0x525ac9,{'revision':_0x2ca220}),{'verbose':_0x2279d9[_0x180417(0x108)]}),_0x1eae64=_0xa4eafb[_0x180417(0x13f)];return console[_0x180417(0x12a)]('✔\x20Downloaded\x20'+_0x1eae64[_0x180417(0x100)]),console[_0x180417(0x12a)](_0x180417(0xce)+_0x1eae64[_0x180417(0x13b)]),console[_0x180417(0x12a)](_0x180417(0xff)+_0x1eae64[_0x180417(0xe6)]),console['error']('\x20\x20Location:\x20'+_0x525ac9+'/'+_0x1eae64['projectName']),0x0;}}export class WorkflowPushCommand extends BaseCommand{['name']='workflow:push';['description']=a32_0x5b5461(0xcc);async[a32_0x5b5461(0x101)](_0x564029){const _0x172551=a32_0x5b5461,{options:_0x523c06,args:_0x1a641f,tdx:_0x248290}=_0x564029;let _0x45750d='.',_0x4e7c19=_0x523c06[_0x172551(0x126)];if(_0x1a641f[0x0]){const {promises:_0x3b7d53}=await import('fs');try{const _0x337112=await _0x3b7d53[_0x172551(0x129)](_0x1a641f[0x0]);if(_0x337112[_0x172551(0xef)]())_0x45750d=_0x1a641f[0x0];else return console[_0x172551(0x12a)]('Error:\x20'+_0x1a641f[0x0]+'\x20is\x20not\x20a\x20directory'),0x1;}catch{_0x4e7c19=_0x1a641f[0x0],_0x45750d='.';}}const _0x434fb4=_0x523c06[_0x172551(0x13b)],_0x2ea97a=_0x523c06[_0x172551(0xd4)];_0x523c06[_0x172551(0x108)]&&(console[_0x172551(0x12a)]('Project\x20directory:\x20'+_0x45750d),_0x4e7c19&&console['error']('Project\x20name:\x20'+_0x4e7c19),_0x434fb4&&console[_0x172551(0x12a)]('Revision:\x20'+_0x434fb4),_0x2ea97a&&console[_0x172551(0x12a)](_0x172551(0xdb)));const _0x51a75c=await withSpinner('Pushing\x20workflow\x20project...',()=>_0x248290[_0x172551(0xd1)][_0x172551(0x119)](_0x45750d,{'projectName':_0x4e7c19,'revision':_0x434fb4,'skipValidation':_0x2ea97a}),{'verbose':_0x523c06[_0x172551(0x108)]}),_0x5909bf=_0x51a75c[_0x172551(0x13f)];return console['error'](_0x172551(0x143)+_0x5909bf[_0x172551(0x100)]),console[_0x172551(0x12a)](_0x172551(0xe7)+_0x5909bf['projectId']),console[_0x172551(0x12a)](_0x172551(0xce)+_0x5909bf[_0x172551(0x13b)]),0x0;}}function a32_0xe2d5(_0x4aa0ca,_0x33417d){const _0x2d8ff1=a32_0x2d8f();return a32_0xe2d5=function(_0xe2d5ac,_0x4dd646){_0xe2d5ac=_0xe2d5ac-0xcb;let _0x1d23d0=_0x2d8ff1[_0xe2d5ac];return _0x1d23d0;},a32_0xe2d5(_0x4aa0ca,_0x33417d);}export class WorkflowDeleteCommand extends BaseCommand{[a32_0x5b5461(0x126)]=a32_0x5b5461(0xfa);[a32_0x5b5461(0x123)]=a32_0x5b5461(0x144);async['execute'](_0x55af6f){const _0x5ea8f3=a32_0x5b5461,{options:_0xf78f2f,args:_0x1cf046,tdx:_0x441f4b}=_0x55af6f,_0x4daff0=_0x1cf046[0x0];if(!_0x4daff0)return console[_0x5ea8f3(0x12a)](_0x5ea8f3(0x138)),console['error'](_0x5ea8f3(0x12e)),0x1;_0xf78f2f['verbose']&&console[_0x5ea8f3(0x12a)]('Project:\x20'+_0x4daff0);if(!_0xf78f2f[_0x5ea8f3(0x10e)]){const _0x205d70=await confirm(_0x5ea8f3(0x11f)+_0x4daff0+_0x5ea8f3(0x13d));if(!_0x205d70)return console[_0x5ea8f3(0x12a)](_0x5ea8f3(0xf7)),0x0;}const _0x4cb097=await withSpinner(_0x5ea8f3(0x145)+_0x4daff0+_0x5ea8f3(0xd2),()=>_0x441f4b[_0x5ea8f3(0xd1)][_0x5ea8f3(0x106)](_0x4daff0),{'verbose':_0xf78f2f[_0x5ea8f3(0x108)]}),_0x472af6=_0x4cb097[_0x5ea8f3(0x13f)];return console['error'](_0x5ea8f3(0x10f)+_0x472af6[_0x5ea8f3(0x100)]),console['error'](_0x5ea8f3(0xe7)+_0x472af6[_0x5ea8f3(0x14a)]),0x0;}}
package/dist/core/auth.js CHANGED
@@ -1 +1 @@
1
- (function(_0x51491f,_0xb6c1a1){const _0x50506a=a33_0x2703,_0x1ab7d0=_0x51491f();while(!![]){try{const _0x202a97=parseInt(_0x50506a(0x74))/0x1+-parseInt(_0x50506a(0x80))/0x2+-parseInt(_0x50506a(0x75))/0x3+parseInt(_0x50506a(0x85))/0x4*(-parseInt(_0x50506a(0x79))/0x5)+parseInt(_0x50506a(0x7b))/0x6+parseInt(_0x50506a(0x7e))/0x7*(parseInt(_0x50506a(0x76))/0x8)+-parseInt(_0x50506a(0x82))/0x9;if(_0x202a97===_0xb6c1a1)break;else _0x1ab7d0['push'](_0x1ab7d0['shift']());}catch(_0x26801d){_0x1ab7d0['push'](_0x1ab7d0['shift']());}}}(a33_0x9b54,0xae672));import{platform}from'os';function a33_0x2703(_0x115401,_0x26ca7d){const _0x9b54aa=a33_0x9b54();return a33_0x2703=function(_0x270388,_0x164471){_0x270388=_0x270388-0x72;let _0x3d5c66=_0x9b54aa[_0x270388];return _0x3d5c66;},a33_0x2703(_0x115401,_0x26ca7d);}import{readFileSync}from'fs';function a33_0x9b54(){const _0x1f5366=['5157576LHGDDH','replace','parse','381724ZQIrAC','TD1\x20','tdx','tdx/','1202956FdSitZ','196674qbYtXs','10875688IYxAEd','version','X-Trino-User','55VOJyhU','../../package.json','789888YeXWWn',';\x20node/','0.0.0','7iPrqpO','entries','582696GiLWyN','Authorization'];a33_0x9b54=function(){return _0x1f5366;};return a33_0x9b54();}import{fileURLToPath}from'url';import{dirname,join}from'path';import{getAPIKey}from'./config.js';export function getVersion(){const _0x34a74f=a33_0x2703;try{const _0x23754d=fileURLToPath(import.meta['url']),_0x50f3b7=dirname(_0x23754d),_0x43ac12=join(_0x50f3b7,_0x34a74f(0x7a)),_0x12c26b=JSON[_0x34a74f(0x84)](readFileSync(_0x43ac12,'utf-8'));return _0x12c26b[_0x34a74f(0x77)];}catch{return _0x34a74f(0x7d);}}export function getUserAgent(){const _0x131b69=a33_0x2703,_0x199064=getVersion(),_0x179aa8=platform(),_0x45da9e=process[_0x131b69(0x77)][_0x131b69(0x83)]('v','');return _0x131b69(0x73)+_0x199064+'\x20('+_0x179aa8+_0x131b69(0x7c)+_0x45da9e+')';}export function getAuthHeaders(_0x1fd158,_0x2dd082){const _0x262b1a=a33_0x2703,_0x5eed6e=getVersion(),_0x26d7e2={'User-Agent':getUserAgent(),'X-TD-Client':_0x262b1a(0x72),'X-TD-Client-Version':_0x5eed6e};return _0x2dd082&&(_0x26d7e2[_0x262b1a(0x81)]=_0x262b1a(0x86)+_0x2dd082),_0x26d7e2;}export function toHeaderRecord(_0x1c71e6){const _0x59b7c8=a33_0x2703,_0x160c3c={};for(const [_0x90bbb8,_0x557883]of Object[_0x59b7c8(0x7f)](_0x1c71e6)){_0x557883!==undefined&&(_0x160c3c[_0x90bbb8]=_0x557883);}return _0x160c3c;}export function getTrinoHeaders(_0xe12c77,_0x50ea2){const _0x55e0e2=a33_0x2703,_0x4bd014=getAuthHeaders(_0xe12c77,_0x50ea2),_0x2b66f3=toHeaderRecord(_0x4bd014);return delete _0x2b66f3['Authorization'],_0x50ea2&&(_0x2b66f3[_0x55e0e2(0x78)]=_0x50ea2),_0x2b66f3;}export function hasAPIKey(_0x3bcda8){const _0x2dffc4=getAPIKey(_0x3bcda8);return _0x2dffc4!==undefined&&_0x2dffc4['length']>0x0;}
1
+ (function(_0x29fa8d,_0x5c06a4){const _0x102387=a33_0x732b,_0x187463=_0x29fa8d();while(!![]){try{const _0x1a2b0d=-parseInt(_0x102387(0x1cf))/0x1+parseInt(_0x102387(0x1dc))/0x2*(parseInt(_0x102387(0x1d8))/0x3)+-parseInt(_0x102387(0x1d2))/0x4*(-parseInt(_0x102387(0x1d9))/0x5)+-parseInt(_0x102387(0x1d0))/0x6*(parseInt(_0x102387(0x1d7))/0x7)+parseInt(_0x102387(0x1cb))/0x8+-parseInt(_0x102387(0x1da))/0x9*(parseInt(_0x102387(0x1d4))/0xa)+-parseInt(_0x102387(0x1cd))/0xb*(parseInt(_0x102387(0x1d6))/0xc);if(_0x1a2b0d===_0x5c06a4)break;else _0x187463['push'](_0x187463['shift']());}catch(_0x2517d1){_0x187463['push'](_0x187463['shift']());}}}(a33_0x3524,0x4cc21));import{platform}from'os';function a33_0x732b(_0x3372cc,_0xf3d538){const _0x3524d4=a33_0x3524();return a33_0x732b=function(_0x732b09,_0x3cde92){_0x732b09=_0x732b09-0x1c8;let _0x3e0f94=_0x3524d4[_0x732b09];return _0x3e0f94;},a33_0x732b(_0x3372cc,_0xf3d538);}import{readFileSync}from'fs';import{fileURLToPath}from'url';import{dirname,join}from'path';function a33_0x3524(){const _0x192dc2=['350PnkQIz','18ruCgVJ',';\x20node/','268TRWNtd','Authorization','0.0.0','utf-8','tdx','3523616SokCrt','X-Trino-User','14806cawlvF','parse','185916YqAJWc','917646sQETWm','version','35408UPEKMy','TD1\x20','2404210ozKiZW','entries','2868lqpOFt','7ZiUaVl','8859aAdAxi'];a33_0x3524=function(){return _0x192dc2;};return a33_0x3524();}import{getAPIKey}from'./config.js';export function getVersion(){const _0x3f7052=a33_0x732b;try{const _0x429521=fileURLToPath(import.meta['url']),_0x383889=dirname(_0x429521),_0x495f10=join(_0x383889,'../../package.json'),_0x3bbcf1=JSON[_0x3f7052(0x1ce)](readFileSync(_0x495f10,_0x3f7052(0x1c9)));return _0x3bbcf1[_0x3f7052(0x1d1)];}catch{return _0x3f7052(0x1c8);}}export function getUserAgent(){const _0x1f9edc=a33_0x732b,_0x2d87e4=getVersion(),_0x4f463d=platform(),_0x356da9=process[_0x1f9edc(0x1d1)]['replace']('v','');return'tdx/'+_0x2d87e4+'\x20('+_0x4f463d+_0x1f9edc(0x1db)+_0x356da9+')';}export function getAuthHeaders(_0x573404,_0x30c2ec){const _0x4c198d=a33_0x732b,_0x20aa10=getVersion(),_0x1cd34b={'User-Agent':getUserAgent(),'X-TD-Client':_0x4c198d(0x1ca),'X-TD-Client-Version':_0x20aa10};return _0x30c2ec&&(_0x1cd34b[_0x4c198d(0x1dd)]=_0x4c198d(0x1d3)+_0x30c2ec),_0x1cd34b;}export function toHeaderRecord(_0x3baf30){const _0x55b7bc=a33_0x732b,_0x535d3d={};for(const [_0x2674df,_0x247de7]of Object[_0x55b7bc(0x1d5)](_0x3baf30)){_0x247de7!==undefined&&(_0x535d3d[_0x2674df]=_0x247de7);}return _0x535d3d;}export function getTrinoHeaders(_0x271c9f,_0xdf354){const _0xde2d69=a33_0x732b,_0x136dbd=getAuthHeaders(_0x271c9f,_0xdf354),_0x54f389=toHeaderRecord(_0x136dbd);return delete _0x54f389[_0xde2d69(0x1dd)],_0xdf354&&(_0x54f389[_0xde2d69(0x1cc)]=_0xdf354),_0x54f389;}export function hasAPIKey(_0x5060f9){const _0x2381d1=getAPIKey(_0x5060f9);return _0x2381d1!==undefined&&_0x2381d1['length']>0x0;}