@treasuredata/tdx 0.5.0 → 0.5.2

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 (129) hide show
  1. package/dist/bin.d.ts +9 -0
  2. package/dist/bin.d.ts.map +1 -0
  3. package/dist/bin.js +2 -0
  4. package/dist/bin.js.map +1 -0
  5. package/dist/build-info.json +2 -2
  6. package/dist/cli-categories.d.ts +35 -0
  7. package/dist/cli-categories.d.ts.map +1 -0
  8. package/dist/cli-categories.js +1 -0
  9. package/dist/cli-categories.js.map +1 -0
  10. package/dist/cli.d.ts +12 -3
  11. package/dist/cli.d.ts.map +1 -1
  12. package/dist/cli.js +1 -2
  13. package/dist/cli.js.map +1 -1
  14. package/dist/client/cdp-api-client.js +1 -1
  15. package/dist/client/engage-api-client.js +1 -1
  16. package/dist/client/http-client.js +1 -1
  17. package/dist/client/llm-api-client.js +1 -1
  18. package/dist/client/rate-limiter.js +1 -1
  19. package/dist/client/td-api-client.js +1 -1
  20. package/dist/client/trino-api-client.js +1 -1
  21. package/dist/client/workflow-client.js +1 -1
  22. package/dist/commands/activations.js +1 -1
  23. package/dist/commands/api-command.js +1 -1
  24. package/dist/commands/auth-command.js +1 -1
  25. package/dist/commands/chat-command.js +1 -1
  26. package/dist/commands/claude-command.d.ts.map +1 -1
  27. package/dist/commands/claude-command.js +1 -1
  28. package/dist/commands/claude-command.js.map +1 -1
  29. package/dist/commands/claude-statusline-command.js +1 -1
  30. package/dist/commands/claude-usage-command.js +1 -1
  31. package/dist/commands/command.js +1 -1
  32. package/dist/commands/context-command.js +1 -1
  33. package/dist/commands/databases.js +1 -1
  34. package/dist/commands/describe.js +1 -1
  35. package/dist/commands/engage-command.js +1 -1
  36. package/dist/commands/job-command.js +1 -1
  37. package/dist/commands/llm-command.d.ts +13 -0
  38. package/dist/commands/llm-command.d.ts.map +1 -1
  39. package/dist/commands/llm-command.js +1 -1
  40. package/dist/commands/llm-command.js.map +1 -1
  41. package/dist/commands/llm-proxy.js +1 -1
  42. package/dist/commands/parent-segment-command.js +1 -1
  43. package/dist/commands/profiles-command.js +1 -1
  44. package/dist/commands/query-command.js +1 -1
  45. package/dist/commands/segment-command.js +1 -1
  46. package/dist/commands/segment-create-command.js +1 -1
  47. package/dist/commands/segment-fields-command.js +1 -1
  48. package/dist/commands/segment-pwd-command.js +1 -1
  49. package/dist/commands/segment-update-command.js +1 -1
  50. package/dist/commands/segment-use-command.js +1 -1
  51. package/dist/commands/segments.js +1 -1
  52. package/dist/commands/show.js +1 -1
  53. package/dist/commands/tables.js +1 -1
  54. package/dist/commands/use-command.js +1 -1
  55. package/dist/commands/workflow-command.js +1 -1
  56. package/dist/core/auth.js +1 -1
  57. package/dist/core/config.js +1 -1
  58. package/dist/core/credential-cache.js +1 -1
  59. package/dist/core/global-context.js +1 -1
  60. package/dist/core/keychain.js +1 -1
  61. package/dist/core/profile.js +1 -1
  62. package/dist/core/project-config.js +1 -1
  63. package/dist/core/session.js +1 -1
  64. package/dist/index.js +1 -1
  65. package/dist/proxy/anthropic-adapter.d.ts +2 -5
  66. package/dist/proxy/anthropic-adapter.d.ts.map +1 -1
  67. package/dist/proxy/anthropic-adapter.js +1 -1
  68. package/dist/proxy/anthropic-adapter.js.map +1 -1
  69. package/dist/{utils → proxy}/claude-usage-tracker.d.ts +1 -0
  70. package/dist/proxy/claude-usage-tracker.d.ts.map +1 -0
  71. package/dist/proxy/claude-usage-tracker.js +1 -0
  72. package/dist/{utils → proxy}/claude-usage-tracker.js.map +1 -1
  73. package/dist/proxy/context-signature.d.ts +17 -0
  74. package/dist/proxy/context-signature.d.ts.map +1 -0
  75. package/dist/proxy/context-signature.js +1 -0
  76. package/dist/proxy/context-signature.js.map +1 -0
  77. package/dist/proxy/conversation-utils.d.ts +48 -0
  78. package/dist/proxy/conversation-utils.d.ts.map +1 -0
  79. package/dist/proxy/conversation-utils.js +1 -0
  80. package/dist/proxy/conversation-utils.js.map +1 -0
  81. package/dist/proxy/server.d.ts +3 -2
  82. package/dist/proxy/server.d.ts.map +1 -1
  83. package/dist/proxy/server.js +1 -1
  84. package/dist/proxy/server.js.map +1 -1
  85. package/dist/proxy/session-cache.js +1 -1
  86. package/dist/sdk/api.js +1 -1
  87. package/dist/sdk/engage.js +1 -1
  88. package/dist/sdk/errors.d.ts +4 -0
  89. package/dist/sdk/errors.d.ts.map +1 -1
  90. package/dist/sdk/errors.js +1 -1
  91. package/dist/sdk/errors.js.map +1 -1
  92. package/dist/sdk/index.js +1 -1
  93. package/dist/sdk/job.js +1 -1
  94. package/dist/sdk/llm.js +1 -1
  95. package/dist/sdk/query.js +1 -1
  96. package/dist/sdk/segment.js +1 -1
  97. package/dist/sdk/workflow.js +1 -1
  98. package/dist/types/endpoints.js +1 -1
  99. package/dist/types/index.js +1 -1
  100. package/dist/utils/agent-ref-parser.js +1 -1
  101. package/dist/utils/chat-cache.js +1 -1
  102. package/dist/utils/colors.js +1 -1
  103. package/dist/utils/command-output.js +1 -1
  104. package/dist/utils/constants.js +1 -1
  105. package/dist/utils/file-permissions.js +1 -1
  106. package/dist/utils/format-detector.js +1 -1
  107. package/dist/utils/formatters.js +1 -1
  108. package/dist/utils/json-loader.js +1 -1
  109. package/dist/utils/llm-backup-utils.js +1 -1
  110. package/dist/utils/model-aliases.js +1 -1
  111. package/dist/utils/model-factors.js +1 -1
  112. package/dist/utils/option-validation.js +1 -1
  113. package/dist/utils/port.js +1 -1
  114. package/dist/utils/process.js +1 -1
  115. package/dist/utils/prompt.js +1 -1
  116. package/dist/utils/segment-path-parser.js +1 -1
  117. package/dist/utils/segment-ref-parser.js +1 -1
  118. package/dist/utils/spinner.js +1 -1
  119. package/dist/utils/sql-parser.js +1 -1
  120. package/dist/utils/sse-parser.js +1 -1
  121. package/dist/utils/string-utils.js +1 -1
  122. package/dist/utils/table-ref-parser.js +1 -1
  123. package/dist/utils/tdx-logger.js +1 -1
  124. package/dist/utils/tree-formatter.js +1 -1
  125. package/dist/utils/version-check.js +1 -1
  126. package/dist/utils/workflow-utils.js +1 -1
  127. package/package.json +4 -4
  128. package/dist/utils/claude-usage-tracker.d.ts.map +0 -1
  129. package/dist/utils/claude-usage-tracker.js +0 -1
@@ -1 +1 @@
1
- const a28_0x590336=a28_0xceb6;function a28_0x104b(){const _0x485f3b=['\x20\x20tdx\x20segment\x20create\x20\x22My\x20Audience/Marketing/Premium\x22\x20--rule\x20\x27...\x27','resolveParentId','Usage:\x20tdx\x20segment\x20create\x20<parent/segment_name>\x20[options]','1tzgoIQ','Creating\x20segment\x20\x27','description','\x20\x20tdx\x20segment\x20create\x20\x22Premium\x22\x20--rule\x20\x27...\x27\x20\x20#\x20Relative\x20to\x20context','1093560esjJFD','4642740kEVyQL','ruleFile','verbose','createSegment','resolveFolderId','execute','data','Examples:','355ItVBUu','Create\x20child\x20segment\x20with\x20filtering\x20rules','Resolved\x20folder\x20ID:\x20','Segment\x20name:\x20','10820oAlrZy','segments','Resolving\x20parent\x20segment\x20\x27','Resolving\x20folder\x20path\x20\x27','Error:\x20Full\x20path\x20required\x20(parent/segment_name\x20or\x20parent/folder/segment_name)','2064755zljvQp','15qorRcx','\x20\x20tdx\x20segment\x20create\x20\x22My\x20Audience/High\x20Value\x22\x20--rule\x20\x27...\x27','Parent\x20path:\x20','length','invisible','segment:create','parent','Resolving\x20folder\x20\x27','segment','24FGzRhS','includes','\x27...','resolvePathToResource','name','kind','Usage:\x20tdx\x20segment\x20create\x20<path>\x20[options]','Error:\x20Segment\x20path\x20or\x20name\x20is\x20required','noCountPopulation','965570brYETQ','folder','Parent:\x20','Target\x20path:\x20','8426GaVPnd','error','250552UosoJk','23982uTSQCp','folderId','Error:\x20Cannot\x20create\x20segment\x20in\x20a\x20segment.\x20Parent\x20path\x20must\x20be\x20a\x20folder\x20or\x20parent.','\x27\x20with\x20ID:\x20','\x20\x20\x20Path:\x20','rule','8Jwsuva','type','site','Resolved\x20relative\x20path\x20to:\x20','segmentPath'];a28_0x104b=function(){return _0x485f3b;};return a28_0x104b();}(function(_0x1582a5,_0x653196){const _0x4e7c84=a28_0xceb6,_0x1f1ba1=_0x1582a5();while(!![]){try{const _0x5e4dd9=parseInt(_0x4e7c84(0x122))/0x1*(parseInt(_0x4e7c84(0x10d))/0x2)+-parseInt(_0x4e7c84(0x139))/0x3*(-parseInt(_0x4e7c84(0x113))/0x4)+-parseInt(_0x4e7c84(0x12f))/0x5*(parseInt(_0x4e7c84(0x114))/0x6)+parseInt(_0x4e7c84(0x138))/0x7+-parseInt(_0x4e7c84(0x11a))/0x8*(-parseInt(_0x4e7c84(0x127))/0x9)+-parseInt(_0x4e7c84(0x133))/0xa*(parseInt(_0x4e7c84(0x111))/0xb)+-parseInt(_0x4e7c84(0x104))/0xc*(-parseInt(_0x4e7c84(0x126))/0xd);if(_0x5e4dd9===_0x653196)break;else _0x1f1ba1['push'](_0x1f1ba1['shift']());}catch(_0x115591){_0x1f1ba1['push'](_0x1f1ba1['shift']());}}}(a28_0x104b,0xa1ba9));import{BaseCommand}from'./command.js';import{handleSDKOutput}from'../utils/command-output.js';import{withSpinner}from'../utils/spinner.js';function a28_0xceb6(_0x46c348,_0x11b968){const _0x104b64=a28_0x104b();return a28_0xceb6=function(_0xceb6a0,_0x4f019c){_0xceb6a0=_0xceb6a0-0xfd;let _0x550338=_0x104b64[_0xceb6a0];return _0x550338;},a28_0xceb6(_0x46c348,_0x11b968);}import{loadJSONFromOptions}from'../utils/json-loader.js';import{parsePath,getParentPath,getBaseName}from'../utils/segment-path-parser.js';export class SegmentCreateCommand extends BaseCommand{['name']=a28_0x590336(0x100);[a28_0x590336(0x124)]=a28_0x590336(0x130);async[a28_0x590336(0x12c)](_0x291282){const _0x147e8c=a28_0x590336,{options:_0x4809aa,args:_0x128da6,tdx:_0x4dce54}=_0x291282,_0x2681d9=_0x4809aa;if(_0x128da6[_0x147e8c(0xfe)]===0x0)return console[_0x147e8c(0x112)](_0x147e8c(0x10b)),console[_0x147e8c(0x112)](_0x147e8c(0x10a)),console[_0x147e8c(0x112)](_0x147e8c(0x12e)),console[_0x147e8c(0x112)](_0x147e8c(0x13a)),console[_0x147e8c(0x112)](_0x147e8c(0x11f)),console[_0x147e8c(0x112)](_0x147e8c(0x125)),0x1;const _0x544c0b=_0x128da6[0x0],_0xc66312=_0x4809aa[_0x147e8c(0x11e)];let _0x18663f=_0x544c0b;_0xc66312&&!_0x544c0b[_0x147e8c(0x105)]('/')&&(_0x18663f=_0xc66312+'/'+_0x544c0b,_0x2681d9['verbose']&&console[_0x147e8c(0x112)](_0x147e8c(0x11d)+_0x18663f));const _0x286e5e=parsePath(_0x18663f);if(_0x286e5e[_0x147e8c(0x134)][_0x147e8c(0xfe)]<0x2)return console[_0x147e8c(0x112)](_0x147e8c(0x137)),console[_0x147e8c(0x112)](_0x147e8c(0x121)),0x1;const _0x3637fc=_0x286e5e['segments'][0x0],_0x48f861=getBaseName(_0x18663f),_0x37f58a=getParentPath(_0x18663f);_0x2681d9[_0x147e8c(0x129)]&&(console['error']('Site:\x20'+_0x2681d9[_0x147e8c(0x11c)]),console[_0x147e8c(0x112)](_0x147e8c(0x110)+_0x18663f),console[_0x147e8c(0x112)](_0x147e8c(0x10f)+_0x3637fc),console[_0x147e8c(0x112)](_0x147e8c(0x132)+_0x48f861),console[_0x147e8c(0x112)](_0x147e8c(0xfd)+_0x37f58a));const _0x583350=await withSpinner(_0x147e8c(0x135)+_0x3637fc+_0x147e8c(0x106),()=>_0x4dce54[_0x147e8c(0x103)][_0x147e8c(0x120)](_0x3637fc),{'verbose':_0x2681d9[_0x147e8c(0x129)]}),_0x3e76ba=_0x583350[_0x147e8c(0x12d)];let _0xb1667b;if(_0x286e5e['segments'][_0x147e8c(0xfe)]>0x2){const _0x4c14dd=await withSpinner(_0x147e8c(0x136)+_0x37f58a+_0x147e8c(0x106),()=>_0x4dce54['segment'][_0x147e8c(0x107)](_0x37f58a),{'verbose':_0x2681d9[_0x147e8c(0x129)]}),_0x48e5e7=_0x4c14dd[_0x147e8c(0x12d)];if(_0x48e5e7[_0x147e8c(0x11b)]!==_0x147e8c(0x10e)&&_0x48e5e7[_0x147e8c(0x11b)]!==_0x147e8c(0x101))return console[_0x147e8c(0x112)](_0x147e8c(0x116)),0x1;_0xb1667b=_0x48e5e7[_0x147e8c(0x115)];}else{if(_0x2681d9[_0x147e8c(0x10e)]){const _0x8c5024=await withSpinner(_0x147e8c(0x102)+_0x2681d9['folder']+_0x147e8c(0x106),()=>_0x4dce54[_0x147e8c(0x103)][_0x147e8c(0x12b)](_0x3e76ba,_0x2681d9[_0x147e8c(0x10e)]),{'verbose':_0x2681d9[_0x147e8c(0x129)]});_0xb1667b=_0x8c5024[_0x147e8c(0x12d)];}}_0x2681d9[_0x147e8c(0x129)]&&_0xb1667b&&console['error'](_0x147e8c(0x131)+_0xb1667b);const _0xc7867b=await loadJSONFromOptions(_0x2681d9[_0x147e8c(0x119)],_0x2681d9[_0x147e8c(0x128)]),_0xcfcbd9={'name':_0x48f861,'description':_0x2681d9['description'],'rule':_0xc7867b,'kind':_0x2681d9[_0x147e8c(0x109)]!==undefined?parseInt(_0x2681d9[_0x147e8c(0x109)],0xa):undefined,'isVisible':_0x2681d9[_0x147e8c(0xff)]?![]:undefined,'segmentFolderId':_0xb1667b,'countPopulation':_0x2681d9[_0x147e8c(0x10c)]?![]:undefined},_0x507fb3=await withSpinner(_0x147e8c(0x123)+_0x48f861+_0x147e8c(0x106),()=>_0x4dce54[_0x147e8c(0x103)][_0x147e8c(0x12a)](_0x3e76ba,_0xcfcbd9),{'verbose':_0x2681d9[_0x147e8c(0x129)]}),_0x33bcb5=_0x507fb3['data'];return console['error']('✔\x20Created\x20segment\x20\x27'+_0x33bcb5[_0x147e8c(0x108)]+_0x147e8c(0x117)+_0x33bcb5['id']),_0x18663f!==_0x544c0b&&console[_0x147e8c(0x112)](_0x147e8c(0x118)+_0x18663f),await handleSDKOutput([_0x33bcb5],_0x2681d9),0x0;}}
1
+ const a30_0x541069=a30_0x33f1;(function(_0x36935f,_0x322357){const _0x6cb695=a30_0x33f1,_0x12173b=_0x36935f();while(!![]){try{const _0x1068ef=-parseInt(_0x6cb695(0x8e))/0x1*(-parseInt(_0x6cb695(0x72))/0x2)+-parseInt(_0x6cb695(0x70))/0x3+-parseInt(_0x6cb695(0x93))/0x4+parseInt(_0x6cb695(0x7b))/0x5*(-parseInt(_0x6cb695(0x96))/0x6)+-parseInt(_0x6cb695(0xa1))/0x7+parseInt(_0x6cb695(0x88))/0x8*(-parseInt(_0x6cb695(0x9d))/0x9)+parseInt(_0x6cb695(0x98))/0xa*(parseInt(_0x6cb695(0x89))/0xb);if(_0x1068ef===_0x322357)break;else _0x12173b['push'](_0x12173b['shift']());}catch(_0x45daf6){_0x12173b['push'](_0x12173b['shift']());}}}(a30_0x4295,0xb5437));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 a30_0x33f1(_0x346e55,_0x37e83a){const _0x42953d=a30_0x4295();return a30_0x33f1=function(_0x33f1ff,_0x1d291e){_0x33f1ff=_0x33f1ff-0x6c;let _0x46c3f7=_0x42953d[_0x33f1ff];return _0x46c3f7;},a30_0x33f1(_0x346e55,_0x37e83a);}function a30_0x4295(){const _0x5e9732=['Parent:\x20','verbose','kind','3213936vHHcXc','segments','Usage:\x20tdx\x20segment\x20create\x20<path>\x20[options]','6LnhfQn','resolveParentId','1270JtJzPG','segmentPath','rule','resolvePathToResource','length','342KdwqDF','\x20\x20tdx\x20segment\x20create\x20\x22Premium\x22\x20--rule\x20\x27...\x27\x20\x20#\x20Relative\x20to\x20context','✔\x20Created\x20segment\x20\x27','name','5785948EqbVzC','site','Resolving\x20parent\x20segment\x20\x27','Error:\x20Segment\x20path\x20or\x20name\x20is\x20required','Error:\x20Cannot\x20create\x20segment\x20in\x20a\x20segment.\x20Parent\x20path\x20must\x20be\x20a\x20folder\x20or\x20parent.','4211466nrxEvC','data','10ykJByL','execute','\x20\x20tdx\x20segment\x20create\x20\x22My\x20Audience/High\x20Value\x22\x20--rule\x20\x27...\x27','Create\x20child\x20segment\x20with\x20filtering\x20rules','\x20\x20tdx\x20segment\x20create\x20\x22My\x20Audience/Marketing/Premium\x22\x20--rule\x20\x27...\x27','\x27\x20with\x20ID:\x20','createSegment','\x20\x20\x20Path:\x20','folder','7285555UauGcW','type','Usage:\x20tdx\x20segment\x20create\x20<parent/segment_name>\x20[options]','segment:create','Error:\x20Full\x20path\x20required\x20(parent/segment_name\x20or\x20parent/folder/segment_name)','\x27...','noCountPopulation','Parent\x20path:\x20','ruleFile','Site:\x20','folderId','includes','error','105208bgGnCc','375727AhVxuv','Target\x20path:\x20','parent','Resolved\x20relative\x20path\x20to:\x20','segment','279047toMaIW','Creating\x20segment\x20\x27'];a30_0x4295=function(){return _0x5e9732;};return a30_0x4295();}import{parsePath,getParentPath,getBaseName}from'../utils/segment-path-parser.js';export class SegmentCreateCommand extends BaseCommand{[a30_0x541069(0xa0)]=a30_0x541069(0x7e);['description']=a30_0x541069(0x75);async[a30_0x541069(0x73)](_0x430bcc){const _0x8ab79b=a30_0x541069,{options:_0x43ff27,args:_0x48a518,tdx:_0x1076e8}=_0x430bcc,_0xbbb10a=_0x43ff27;if(_0x48a518[_0x8ab79b(0x9c)]===0x0)return console['error'](_0x8ab79b(0x6e)),console[_0x8ab79b(0x87)](_0x8ab79b(0x95)),console[_0x8ab79b(0x87)]('Examples:'),console['error'](_0x8ab79b(0x74)),console[_0x8ab79b(0x87)](_0x8ab79b(0x76)),console['error'](_0x8ab79b(0x9e)),0x1;const _0x5286dc=_0x48a518[0x0],_0x5349c2=_0x43ff27[_0x8ab79b(0x99)];let _0x43013d=_0x5286dc;_0x5349c2&&!_0x5286dc[_0x8ab79b(0x86)]('/')&&(_0x43013d=_0x5349c2+'/'+_0x5286dc,_0xbbb10a['verbose']&&console[_0x8ab79b(0x87)](_0x8ab79b(0x8c)+_0x43013d));const _0x23ccd4=parsePath(_0x43013d);if(_0x23ccd4[_0x8ab79b(0x94)][_0x8ab79b(0x9c)]<0x2)return console[_0x8ab79b(0x87)](_0x8ab79b(0x7f)),console[_0x8ab79b(0x87)](_0x8ab79b(0x7d)),0x1;const _0x5582cb=_0x23ccd4[_0x8ab79b(0x94)][0x0],_0x3f3b29=getBaseName(_0x43013d),_0x434e9f=getParentPath(_0x43013d);_0xbbb10a[_0x8ab79b(0x91)]&&(console[_0x8ab79b(0x87)](_0x8ab79b(0x84)+_0xbbb10a[_0x8ab79b(0x6c)]),console[_0x8ab79b(0x87)](_0x8ab79b(0x8a)+_0x43013d),console[_0x8ab79b(0x87)](_0x8ab79b(0x90)+_0x5582cb),console['error']('Segment\x20name:\x20'+_0x3f3b29),console[_0x8ab79b(0x87)](_0x8ab79b(0x82)+_0x434e9f));const _0x1a2c5e=await withSpinner(_0x8ab79b(0x6d)+_0x5582cb+_0x8ab79b(0x80),()=>_0x1076e8[_0x8ab79b(0x8d)][_0x8ab79b(0x97)](_0x5582cb),{'verbose':_0xbbb10a[_0x8ab79b(0x91)]}),_0x509a17=_0x1a2c5e['data'];let _0x3f9d11;if(_0x23ccd4[_0x8ab79b(0x94)][_0x8ab79b(0x9c)]>0x2){const _0x22b513=await withSpinner('Resolving\x20folder\x20path\x20\x27'+_0x434e9f+'\x27...',()=>_0x1076e8[_0x8ab79b(0x8d)][_0x8ab79b(0x9b)](_0x434e9f),{'verbose':_0xbbb10a[_0x8ab79b(0x91)]}),_0x4666e5=_0x22b513[_0x8ab79b(0x71)];if(_0x4666e5[_0x8ab79b(0x7c)]!==_0x8ab79b(0x7a)&&_0x4666e5[_0x8ab79b(0x7c)]!==_0x8ab79b(0x8b))return console[_0x8ab79b(0x87)](_0x8ab79b(0x6f)),0x1;_0x3f9d11=_0x4666e5[_0x8ab79b(0x85)];}else{if(_0xbbb10a[_0x8ab79b(0x7a)]){const _0x18e504=await withSpinner('Resolving\x20folder\x20\x27'+_0xbbb10a[_0x8ab79b(0x7a)]+_0x8ab79b(0x80),()=>_0x1076e8[_0x8ab79b(0x8d)]['resolveFolderId'](_0x509a17,_0xbbb10a['folder']),{'verbose':_0xbbb10a['verbose']});_0x3f9d11=_0x18e504[_0x8ab79b(0x71)];}}_0xbbb10a[_0x8ab79b(0x91)]&&_0x3f9d11&&console[_0x8ab79b(0x87)]('Resolved\x20folder\x20ID:\x20'+_0x3f9d11);const _0x4888ef=await loadJSONFromOptions(_0xbbb10a[_0x8ab79b(0x9a)],_0xbbb10a[_0x8ab79b(0x83)]),_0x1cfb4b={'name':_0x3f3b29,'description':_0xbbb10a['description'],'rule':_0x4888ef,'kind':_0xbbb10a[_0x8ab79b(0x92)]!==undefined?parseInt(_0xbbb10a[_0x8ab79b(0x92)],0xa):undefined,'isVisible':_0xbbb10a['invisible']?![]:undefined,'segmentFolderId':_0x3f9d11,'countPopulation':_0xbbb10a[_0x8ab79b(0x81)]?![]:undefined},_0x23a409=await withSpinner(_0x8ab79b(0x8f)+_0x3f3b29+_0x8ab79b(0x80),()=>_0x1076e8['segment'][_0x8ab79b(0x78)](_0x509a17,_0x1cfb4b),{'verbose':_0xbbb10a[_0x8ab79b(0x91)]}),_0x613ae2=_0x23a409[_0x8ab79b(0x71)];return console[_0x8ab79b(0x87)](_0x8ab79b(0x9f)+_0x613ae2[_0x8ab79b(0xa0)]+_0x8ab79b(0x77)+_0x613ae2['id']),_0x43013d!==_0x5286dc&&console[_0x8ab79b(0x87)](_0x8ab79b(0x79)+_0x43013d),await handleSDKOutput([_0x613ae2],_0xbbb10a),0x0;}}
@@ -1 +1 @@
1
- const a29_0x2ef354=a29_0x2c55;(function(_0x1f06c0,_0x3b6a2b){const _0x1455be=a29_0x2c55,_0x4cb512=_0x1f06c0();while(!![]){try{const _0x199362=parseInt(_0x1455be(0x1eb))/0x1+-parseInt(_0x1455be(0x1e2))/0x2+-parseInt(_0x1455be(0x1e4))/0x3+parseInt(_0x1455be(0x1e5))/0x4+-parseInt(_0x1455be(0x1e8))/0x5+-parseInt(_0x1455be(0x1ed))/0x6+-parseInt(_0x1455be(0x1f5))/0x7*(-parseInt(_0x1455be(0x1f3))/0x8);if(_0x199362===_0x3b6a2b)break;else _0x4cb512['push'](_0x4cb512['shift']());}catch(_0x5f2c94){_0x4cb512['push'](_0x4cb512['shift']());}}}(a29_0x2898,0xca9f2));import{BaseCommand}from'./command.js';import{handleSDKOutput}from'../utils/command-output.js';import{withSpinner}from'../utils/spinner.js';function a29_0x2c55(_0x26918d,_0x494602){const _0x28987f=a29_0x2898();return a29_0x2c55=function(_0x2c55f0,_0x2e3211){_0x2c55f0=_0x2c55f0-0x1df;let _0x20eb02=_0x28987f[_0x2c55f0];return _0x20eb02;},a29_0x2c55(_0x26918d,_0x494602);}export class SegmentFieldsCommand extends BaseCommand{['name']=a29_0x2ef354(0x1f0);[a29_0x2ef354(0x1ee)]=a29_0x2ef354(0x1f1);async['execute'](_0x147a0f){const _0x4fc79c=a29_0x2ef354,{options:_0x3b0d04,args:_0x21490c,tdx:_0x547b8e}=_0x147a0f,_0x13ab18=_0x21490c[0x0]||_0x3b0d04[_0x4fc79c(0x1e6)];if(!_0x13ab18)return console[_0x4fc79c(0x1ef)](_0x4fc79c(0x1e9)),console[_0x4fc79c(0x1ef)](_0x4fc79c(0x1f4)),console['error'](_0x4fc79c(0x1f2)),0x1;_0x3b0d04['verbose']&&(console['error'](_0x4fc79c(0x1f6)+_0x3b0d04['site']),console[_0x4fc79c(0x1ef)](_0x4fc79c(0x1e1)+_0x13ab18));const _0x5d6e4a=await withSpinner(_0x4fc79c(0x1e7)+_0x13ab18+_0x4fc79c(0x1ec),()=>_0x547b8e[_0x4fc79c(0x1df)]['listFields'](_0x13ab18),{'verbose':_0x3b0d04[_0x4fc79c(0x1ea)]}),_0x4cd566=_0x5d6e4a['data'];return console[_0x4fc79c(0x1ef)](_0x4fc79c(0x1e3)+_0x4cd566[_0x4fc79c(0x1e0)]+'\x20field'+(_0x4cd566['length']!==0x1?'s':'')),await handleSDKOutput(_0x4cd566,_0x3b0d04),0x0;}}function a29_0x2898(){const _0x4559ba=['1612286cbrNZO','✔\x20Found\x20','2102694KfPNlV','6173144rOtlih','parentSegment','Listing\x20fields\x20for\x20\x27','1514630TeHwKx','Error:\x20Parent\x20segment\x20name\x20is\x20required','verbose','731453eRCVmB','\x27...','9483276pGonpA','description','error','segment:fields','List\x20available\x20fields\x20for\x20segmentation','\x20\x20Or\x20set\x20context:\x20tdx\x20use\x20parent_segment\x20<name>','15565696fRGdzs','Usage:\x20tdx\x20segment\x20fields\x20<parent_name>','7fCfNeP','Site:\x20','segment','length','Parent\x20segment:\x20'];a29_0x2898=function(){return _0x4559ba;};return a29_0x2898();}
1
+ const a31_0x56ae0d=a31_0x1bbb;function a31_0x4cbb(){const _0x3783a9=['18psLJkx','✔\x20Found\x20','2028YdTxnO','119581CetlgJ','3881129cRegqk','\x20field','269007WvImgZ','data','212297vBcgms','Error:\x20Parent\x20segment\x20name\x20is\x20required','Usage:\x20tdx\x20segment\x20fields\x20<parent_name>','8qnGVtB','error','verbose','segment','2136712HiCqmX','execute','12zIyyTj','Parent\x20segment:\x20','1582180xwPTwS','site','6oTgVnZ','1689335rAahiC','length','List\x20available\x20fields\x20for\x20segmentation','Listing\x20fields\x20for\x20\x27','description'];a31_0x4cbb=function(){return _0x3783a9;};return a31_0x4cbb();}(function(_0x324823,_0x1aafde){const _0x59d891=a31_0x1bbb,_0x1f60b7=_0x324823();while(!![]){try{const _0x5d36e4=parseInt(_0x59d891(0x14d))/0x1+parseInt(_0x59d891(0x13f))/0x2*(parseInt(_0x59d891(0x14b))/0x3)+parseInt(_0x59d891(0x139))/0x4+parseInt(_0x59d891(0x140))/0x5*(parseInt(_0x59d891(0x13b))/0x6)+-parseInt(_0x59d891(0x149))/0x7*(-parseInt(_0x59d891(0x150))/0x8)+parseInt(_0x59d891(0x145))/0x9*(parseInt(_0x59d891(0x13d))/0xa)+-parseInt(_0x59d891(0x148))/0xb*(parseInt(_0x59d891(0x147))/0xc);if(_0x5d36e4===_0x1aafde)break;else _0x1f60b7['push'](_0x1f60b7['shift']());}catch(_0xbf9998){_0x1f60b7['push'](_0x1f60b7['shift']());}}}(a31_0x4cbb,0xb0fa4));import{BaseCommand}from'./command.js';import{handleSDKOutput}from'../utils/command-output.js';function a31_0x1bbb(_0x207a94,_0x322cc9){const _0x4cbbaf=a31_0x4cbb();return a31_0x1bbb=function(_0x1bbb00,_0x279849){_0x1bbb00=_0x1bbb00-0x139;let _0xad6313=_0x4cbbaf[_0x1bbb00];return _0xad6313;},a31_0x1bbb(_0x207a94,_0x322cc9);}import{withSpinner}from'../utils/spinner.js';export class SegmentFieldsCommand extends BaseCommand{['name']='segment:fields';[a31_0x56ae0d(0x144)]=a31_0x56ae0d(0x142);async[a31_0x56ae0d(0x13a)](_0x281bd1){const _0x1de29d=a31_0x56ae0d,{options:_0x3e6a4d,args:_0xeba30c,tdx:_0x415c18}=_0x281bd1,_0x4a61b0=_0xeba30c[0x0]||_0x3e6a4d['parentSegment'];if(!_0x4a61b0)return console[_0x1de29d(0x151)](_0x1de29d(0x14e)),console[_0x1de29d(0x151)](_0x1de29d(0x14f)),console[_0x1de29d(0x151)]('\x20\x20Or\x20set\x20context:\x20tdx\x20use\x20parent_segment\x20<name>'),0x1;_0x3e6a4d[_0x1de29d(0x152)]&&(console['error']('Site:\x20'+_0x3e6a4d[_0x1de29d(0x13e)]),console['error'](_0x1de29d(0x13c)+_0x4a61b0));const _0x455fd3=await withSpinner(_0x1de29d(0x143)+_0x4a61b0+'\x27...',()=>_0x415c18[_0x1de29d(0x153)]['listFields'](_0x4a61b0),{'verbose':_0x3e6a4d['verbose']}),_0x2cac00=_0x455fd3[_0x1de29d(0x14c)];return console[_0x1de29d(0x151)](_0x1de29d(0x146)+_0x2cac00['length']+_0x1de29d(0x14a)+(_0x2cac00[_0x1de29d(0x141)]!==0x1?'s':'')),await handleSDKOutput(_0x2cac00,_0x3e6a4d),0x0;}}
@@ -1 +1 @@
1
- function a30_0x405b(_0x17116d,_0x298ba5){const _0x291375=a30_0x2913();return a30_0x405b=function(_0x405b50,_0x3960ed){_0x405b50=_0x405b50-0x1b5;let _0x32958f=_0x291375[_0x405b50];return _0x32958f;},a30_0x405b(_0x17116d,_0x298ba5);}function a30_0x2913(){const _0x3dfa12=['9GYctBn','4ysmCJl','1166bRAZLk','description','Use\x20\x22tdx\x20context\x20--debug\x22\x20to\x20see\x20context\x20sources','449896UEAubQ','1566020gjGTFM','Context\x20details:','Use\x20\x22tdx\x20context\x22\x20to\x20see\x20all\x20context\x20parameters','error','34671hJtlYI','526530TtKWcL','root','name','210uOBZIO','segment:pwd','format','jsonl','1652KeGnkc','log','\x20\x20Path:\x20','368072ClYnQh','segmentPath','json','Show\x20current\x20segment/folder\x20context','36jjoWKm','73428UoAlIn'];a30_0x2913=function(){return _0x3dfa12;};return a30_0x2913();}const a30_0x8a1c12=a30_0x405b;(function(_0x3594ec,_0x2c1c6e){const _0x5ef3d6=a30_0x405b,_0x3b1b53=_0x3594ec();while(!![]){try{const _0xb02987=-parseInt(_0x5ef3d6(0x1cc))/0x1+parseInt(_0x5ef3d6(0x1be))/0x2*(-parseInt(_0x5ef3d6(0x1c7))/0x3)+parseInt(_0x5ef3d6(0x1c8))/0x4*(-parseInt(_0x5ef3d6(0x1b7))/0x5)+-parseInt(_0x5ef3d6(0x1ba))/0x6*(parseInt(_0x5ef3d6(0x1b6))/0x7)+-parseInt(_0x5ef3d6(0x1c1))/0x8*(-parseInt(_0x5ef3d6(0x1c5))/0x9)+parseInt(_0x5ef3d6(0x1cd))/0xa+-parseInt(_0x5ef3d6(0x1c9))/0xb*(-parseInt(_0x5ef3d6(0x1c6))/0xc);if(_0xb02987===_0x2c1c6e)break;else _0x3b1b53['push'](_0x3b1b53['shift']());}catch(_0x4a796f){_0x3b1b53['push'](_0x3b1b53['shift']());}}}(a30_0x2913,0x3f0a9));import{BaseCommand}from'./command.js';export class SegmentPwdCommand extends BaseCommand{[a30_0x8a1c12(0x1b9)]=a30_0x8a1c12(0x1bb);[a30_0x8a1c12(0x1ca)]=a30_0x8a1c12(0x1c4);async['execute'](_0x5bf1d8){const _0x33e072=a30_0x8a1c12,{options:_0x50a8b9}=_0x5bf1d8;try{const _0x412c59=_0x50a8b9[_0x33e072(0x1c2)];if(!_0x412c59)return _0x50a8b9['format']===_0x33e072(0x1c3)||_0x50a8b9[_0x33e072(0x1bc)]===_0x33e072(0x1bd)?console['log'](JSON['stringify']({'path':'/','type':_0x33e072(0x1b8)})):console[_0x33e072(0x1bf)]('/'),0x0;if(_0x50a8b9[_0x33e072(0x1bc)]==='json'||_0x50a8b9[_0x33e072(0x1bc)]===_0x33e072(0x1bd)){const _0x4e1454={'path':_0x412c59};console[_0x33e072(0x1bf)](JSON['stringify'](_0x4e1454));}else console[_0x33e072(0x1bf)](_0x412c59),_0x50a8b9['verbose']&&(console[_0x33e072(0x1b5)](''),console[_0x33e072(0x1b5)](_0x33e072(0x1ce)),console[_0x33e072(0x1b5)](_0x33e072(0x1c0)+_0x412c59),console[_0x33e072(0x1b5)](''),console[_0x33e072(0x1b5)](_0x33e072(0x1cf)),console['error'](_0x33e072(0x1cb)));return 0x0;}catch(_0x25257a){throw _0x25257a;}}}
1
+ const a32_0x47ccd7=a32_0x4c0d;(function(_0x4fc786,_0x2f74be){const _0x447fb6=a32_0x4c0d,_0xaecf3=_0x4fc786();while(!![]){try{const _0x1b291c=parseInt(_0x447fb6(0x80))/0x1+parseInt(_0x447fb6(0x94))/0x2+-parseInt(_0x447fb6(0x93))/0x3+parseInt(_0x447fb6(0x8c))/0x4*(-parseInt(_0x447fb6(0x7f))/0x5)+-parseInt(_0x447fb6(0x86))/0x6*(parseInt(_0x447fb6(0x85))/0x7)+parseInt(_0x447fb6(0x91))/0x8+parseInt(_0x447fb6(0x81))/0x9*(parseInt(_0x447fb6(0x88))/0xa);if(_0x1b291c===_0x2f74be)break;else _0xaecf3['push'](_0xaecf3['shift']());}catch(_0x15454c){_0xaecf3['push'](_0xaecf3['shift']());}}}(a32_0x2c11,0x80f6b));import{BaseCommand}from'./command.js';function a32_0x4c0d(_0x480da8,_0x4ba2ca){const _0x2c1163=a32_0x2c11();return a32_0x4c0d=function(_0x4c0ddc,_0x4103ca){_0x4c0ddc=_0x4c0ddc-0x7f;let _0x1df83e=_0x2c1163[_0x4c0ddc];return _0x1df83e;},a32_0x4c0d(_0x480da8,_0x4ba2ca);}export class SegmentPwdCommand extends BaseCommand{[a32_0x47ccd7(0x8d)]=a32_0x47ccd7(0x97);[a32_0x47ccd7(0x82)]='Show\x20current\x20segment/folder\x20context';async[a32_0x47ccd7(0x8f)](_0x3ec6d5){const _0x149b63=a32_0x47ccd7,{options:_0x244ec8}=_0x3ec6d5;try{const _0x9726a4=_0x244ec8['segmentPath'];if(!_0x9726a4)return _0x244ec8[_0x149b63(0x8e)]==='json'||_0x244ec8[_0x149b63(0x8e)]==='jsonl'?console['log'](JSON[_0x149b63(0x90)]({'path':'/','type':_0x149b63(0x83)})):console['log']('/'),0x0;if(_0x244ec8[_0x149b63(0x8e)]===_0x149b63(0x95)||_0x244ec8[_0x149b63(0x8e)]===_0x149b63(0x89)){const _0x38836b={'path':_0x9726a4};console[_0x149b63(0x8b)](JSON['stringify'](_0x38836b));}else console['log'](_0x9726a4),_0x244ec8[_0x149b63(0x8a)]&&(console[_0x149b63(0x87)](''),console['error'](_0x149b63(0x84)),console[_0x149b63(0x87)](_0x149b63(0x92)+_0x9726a4),console['error'](''),console[_0x149b63(0x87)]('Use\x20\x22tdx\x20context\x22\x20to\x20see\x20all\x20context\x20parameters'),console[_0x149b63(0x87)](_0x149b63(0x96)));return 0x0;}catch(_0x3d47a4){throw _0x3d47a4;}}}function a32_0x2c11(){const _0x48ea1c=['\x20\x20Path:\x20','3107712ffWBNc','633002itijjY','json','Use\x20\x22tdx\x20context\x20--debug\x22\x20to\x20see\x20context\x20sources','segment:pwd','15vaODqZ','789722UvdZxO','10612557SLdLHr','description','root','Context\x20details:','34447tJgReA','930cilItL','error','10obpefI','jsonl','verbose','log','508124WREzAw','name','format','execute','stringify','3380728cNqQxh'];a32_0x2c11=function(){return _0x48ea1c;};return a32_0x2c11();}
@@ -1 +1 @@
1
- const a31_0x57de1a=a31_0x4f17;(function(_0x369a68,_0x366d73){const _0x5176f4=a31_0x4f17,_0x69c80d=_0x369a68();while(!![]){try{const _0xac8a32=-parseInt(_0x5176f4(0x7f))/0x1*(parseInt(_0x5176f4(0x99))/0x2)+parseInt(_0x5176f4(0x85))/0x3+-parseInt(_0x5176f4(0x8d))/0x4+-parseInt(_0x5176f4(0x9f))/0x5*(-parseInt(_0x5176f4(0x8a))/0x6)+-parseInt(_0x5176f4(0x81))/0x7+-parseInt(_0x5176f4(0x93))/0x8*(-parseInt(_0x5176f4(0x92))/0x9)+parseInt(_0x5176f4(0x95))/0xa;if(_0xac8a32===_0x366d73)break;else _0x69c80d['push'](_0x69c80d['shift']());}catch(_0x2d7e80){_0x69c80d['push'](_0x69c80d['shift']());}}}(a31_0x2a86,0x81f4e));import{BaseCommand}from'./command.js';import{handleSDKOutput}from'../utils/command-output.js';function a31_0x2a86(){const _0x4cd8ed=['.\x20Only\x20child\x20segments\x20can\x20be\x20updated.','\x27...','segmentId','2893420nqALOI','Segment\x20ID:\x20','name','ruleFile','segmentName','✔\x20Updated\x20segment\x20\x27','Updating\x20segment\x20\x27','includes','Resolving\x20path\x20\x27','updateSegmentById','type','verbose','117709GCBXyG','Resolved\x20folder\x20ID:\x20','5841409yhLzyG','Resolving\x20folder\x20\x27','resolveFolderId','folder','593064mOQyEj','Segment\x20ID\x20missing\x20from\x20resolved\x20path','Examples:','parentId','Error:\x20Segment\x20path\x20or\x20name\x20is\x20required','6reZGiR','resolvePathToResource','Resolved\x20type:\x20','433556LIwVWi','segment','kind','Parent\x20ID:\x20','error','4058217uINXHM','16gPOHvl','execute','3855250RUvTOc','rule','\x20\x20tdx\x20segment\x20update\x20\x22High\x20Value\x22\x20--rule\x20\x27...\x27\x20\x20#\x20Relative\x20to\x20context','description','10lQggBD','Use:\x20tdx\x20segment\x20update\x20<path_to_segment>\x20[options]','length'];a31_0x2a86=function(){return _0x4cd8ed;};return a31_0x2a86();}import{withSpinner}from'../utils/spinner.js';function a31_0x4f17(_0x236c0d,_0x1defcf){const _0x2a8639=a31_0x2a86();return a31_0x4f17=function(_0x4f17b8,_0x2358b6){_0x4f17b8=_0x4f17b8-0x7c;let _0x54d7a1=_0x2a8639[_0x4f17b8];return _0x54d7a1;},a31_0x4f17(_0x236c0d,_0x1defcf);}import{loadJSONFromOptions}from'../utils/json-loader.js';import{SDKError,ErrorCode}from'../sdk/index.js';export class SegmentUpdateCommand extends BaseCommand{['name']='segment:update';['description']='Update\x20existing\x20child\x20segment';async[a31_0x57de1a(0x94)](_0x50a668){const _0x3875e5=a31_0x57de1a,{options:_0x44db19,args:_0x5589a8,tdx:_0x3a6e6a}=_0x50a668,_0x1bf2ca=_0x44db19;if(_0x5589a8[_0x3875e5(0x9b)]===0x0)return console[_0x3875e5(0x91)](_0x3875e5(0x89)),console[_0x3875e5(0x91)]('Usage:\x20tdx\x20segment\x20update\x20<path>\x20[options]'),console[_0x3875e5(0x91)](_0x3875e5(0x87)),console['error']('\x20\x20tdx\x20segment\x20update\x20\x22My\x20Audience/High\x20Value\x22\x20--description\x20\x22...\x22'),console[_0x3875e5(0x91)](_0x3875e5(0x97)),0x1;const _0x3450c8=_0x5589a8[0x0],_0x5acff9=_0x44db19['segmentPath'];let _0x4f2fb5=_0x3450c8;_0x5acff9&&!_0x3450c8[_0x3875e5(0xa6)]('/')&&(_0x4f2fb5=_0x5acff9+'/'+_0x3450c8,_0x1bf2ca['verbose']&&console[_0x3875e5(0x91)]('Resolved\x20relative\x20path\x20to:\x20'+_0x4f2fb5));const _0x35afa3=await withSpinner(_0x3875e5(0xa7)+_0x4f2fb5+_0x3875e5(0x9d),()=>_0x3a6e6a[_0x3875e5(0x8e)][_0x3875e5(0x8b)](_0x4f2fb5),{'verbose':_0x1bf2ca[_0x3875e5(0x7e)]}),_0x6c6a92=_0x35afa3['data'];_0x1bf2ca[_0x3875e5(0x7e)]&&console[_0x3875e5(0x91)](_0x3875e5(0x8c)+_0x6c6a92[_0x3875e5(0x7d)]);if(_0x6c6a92[_0x3875e5(0x7d)]!==_0x3875e5(0x8e))return console['error']('Error:\x20Cannot\x20update\x20'+_0x6c6a92[_0x3875e5(0x7d)]+_0x3875e5(0x9c)),console[_0x3875e5(0x91)](_0x3875e5(0x9a)),0x1;if(!_0x6c6a92[_0x3875e5(0x9e)])throw new SDKError(ErrorCode['INTERNAL'],_0x3875e5(0x86));const _0x386e12=_0x6c6a92[_0x3875e5(0x88)],_0x1c04d0=_0x6c6a92[_0x3875e5(0x9e)];_0x1bf2ca[_0x3875e5(0x7e)]&&(console['error'](_0x3875e5(0x90)+_0x386e12),console[_0x3875e5(0x91)](_0x3875e5(0xa0)+_0x1c04d0));let _0x18eb8f;if(_0x1bf2ca[_0x3875e5(0x84)]){const _0x33ea65=_0x1bf2ca[_0x3875e5(0x84)],_0x81e871=await withSpinner(_0x3875e5(0x82)+_0x33ea65+'\x27...',()=>_0x3a6e6a[_0x3875e5(0x8e)][_0x3875e5(0x83)](_0x386e12,_0x33ea65),{'verbose':_0x1bf2ca[_0x3875e5(0x7e)]});_0x18eb8f=parseInt(_0x81e871['data'],0xa),_0x1bf2ca[_0x3875e5(0x7e)]&&console[_0x3875e5(0x91)](_0x3875e5(0x80)+_0x18eb8f);}const _0x2deabd=await loadJSONFromOptions(_0x1bf2ca[_0x3875e5(0x96)],_0x1bf2ca[_0x3875e5(0xa2)]),_0x29ef7e={'name':_0x1bf2ca[_0x3875e5(0xa1)],'description':_0x1bf2ca[_0x3875e5(0x98)],'rule':_0x2deabd,'kind':_0x1bf2ca[_0x3875e5(0x8f)]!==undefined?parseInt(_0x1bf2ca[_0x3875e5(0x8f)],0xa):undefined,'segmentFolderId':_0x18eb8f},_0x465760=await withSpinner(_0x3875e5(0xa5)+_0x6c6a92[_0x3875e5(0xa3)]+_0x3875e5(0x9d),()=>_0x3a6e6a[_0x3875e5(0x8e)][_0x3875e5(0x7c)](_0x386e12,_0x1c04d0,_0x29ef7e),{'verbose':_0x1bf2ca[_0x3875e5(0x7e)]}),_0x3c2ceb=_0x465760['data'];return console[_0x3875e5(0x91)](_0x3875e5(0xa4)+_0x3c2ceb[_0x3875e5(0xa1)]+'\x27'),_0x4f2fb5!==_0x3450c8&&console[_0x3875e5(0x91)]('\x20\x20\x20Path:\x20'+_0x4f2fb5),await handleSDKOutput([_0x3c2ceb],_0x1bf2ca),0x0;}}
1
+ const a33_0x5b03c7=a33_0x5286;(function(_0x2c4a0e,_0x89a59e){const _0x41cf79=a33_0x5286,_0x417a94=_0x2c4a0e();while(!![]){try{const _0x538f9d=-parseInt(_0x41cf79(0x17b))/0x1*(-parseInt(_0x41cf79(0x182))/0x2)+-parseInt(_0x41cf79(0x15a))/0x3*(-parseInt(_0x41cf79(0x17d))/0x4)+-parseInt(_0x41cf79(0x179))/0x5+parseInt(_0x41cf79(0x167))/0x6*(parseInt(_0x41cf79(0x186))/0x7)+parseInt(_0x41cf79(0x180))/0x8+parseInt(_0x41cf79(0x15b))/0x9+-parseInt(_0x41cf79(0x165))/0xa;if(_0x538f9d===_0x89a59e)break;else _0x417a94['push'](_0x417a94['shift']());}catch(_0xeac73c){_0x417a94['push'](_0x417a94['shift']());}}}(a33_0x2434,0x6a056));function a33_0x5286(_0x444542,_0x4556cc){const _0x2434c2=a33_0x2434();return a33_0x5286=function(_0x528643,_0x589e74){_0x528643=_0x528643-0x15a;let _0x21e425=_0x2434c2[_0x528643];return _0x21e425;},a33_0x5286(_0x444542,_0x4556cc);}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 a33_0x2434(){const _0x41720e=['Resolved\x20relative\x20path\x20to:\x20','parentId','segmentName','Error:\x20Cannot\x20update\x20','folder','Examples:','Updating\x20segment\x20\x27','Resolving\x20path\x20\x27','Usage:\x20tdx\x20segment\x20update\x20<path>\x20[options]','11703580QvrDCB','✔\x20Updated\x20segment\x20\x27','6sdOyZj','resolvePathToResource','Resolving\x20folder\x20\x27','includes','\x20\x20tdx\x20segment\x20update\x20\x22High\x20Value\x22\x20--rule\x20\x27...\x27\x20\x20#\x20Relative\x20to\x20context','Use:\x20tdx\x20segment\x20update\x20<path_to_segment>\x20[options]','.\x20Only\x20child\x20segments\x20can\x20be\x20updated.','Parent\x20ID:\x20','segmentId','rule','segment','Resolved\x20type:\x20','error','description','type','Update\x20existing\x20child\x20segment','name','segmentPath','3317610LPtbYD','kind','7451ZGEuYY','\x20\x20\x20Path:\x20','164AEWfKC','Error:\x20Segment\x20path\x20or\x20name\x20is\x20required','\x20\x20tdx\x20segment\x20update\x20\x22My\x20Audience/High\x20Value\x22\x20--description\x20\x22...\x22','5613936hFJvqB','verbose','218WAtkLF','data','\x27...','execute','369383loaPZp','INTERNAL','Segment\x20ID\x20missing\x20from\x20resolved\x20path','13083weJXmD','4704039xJctfu'];a33_0x2434=function(){return _0x41720e;};return a33_0x2434();}import{SDKError,ErrorCode}from'../sdk/index.js';export class SegmentUpdateCommand extends BaseCommand{['name']='segment:update';['description']=a33_0x5b03c7(0x176);async[a33_0x5b03c7(0x185)](_0x5968b6){const _0x71a443=a33_0x5b03c7,{options:_0x422bcb,args:_0x3c32b8,tdx:_0x30dcf9}=_0x5968b6,_0x3ef725=_0x422bcb;if(_0x3c32b8['length']===0x0)return console['error'](_0x71a443(0x17e)),console[_0x71a443(0x173)](_0x71a443(0x164)),console['error'](_0x71a443(0x161)),console[_0x71a443(0x173)](_0x71a443(0x17f)),console[_0x71a443(0x173)](_0x71a443(0x16b)),0x1;const _0x4514a2=_0x3c32b8[0x0],_0x4145d1=_0x422bcb[_0x71a443(0x178)];let _0x3762ae=_0x4514a2;_0x4145d1&&!_0x4514a2[_0x71a443(0x16a)]('/')&&(_0x3762ae=_0x4145d1+'/'+_0x4514a2,_0x3ef725[_0x71a443(0x181)]&&console[_0x71a443(0x173)](_0x71a443(0x15c)+_0x3762ae));const _0x10f093=await withSpinner(_0x71a443(0x163)+_0x3762ae+_0x71a443(0x184),()=>_0x30dcf9[_0x71a443(0x171)][_0x71a443(0x168)](_0x3762ae),{'verbose':_0x3ef725[_0x71a443(0x181)]}),_0x5bc475=_0x10f093[_0x71a443(0x183)];_0x3ef725[_0x71a443(0x181)]&&console[_0x71a443(0x173)](_0x71a443(0x172)+_0x5bc475[_0x71a443(0x175)]);if(_0x5bc475['type']!==_0x71a443(0x171))return console[_0x71a443(0x173)](_0x71a443(0x15f)+_0x5bc475[_0x71a443(0x175)]+_0x71a443(0x16d)),console[_0x71a443(0x173)](_0x71a443(0x16c)),0x1;if(!_0x5bc475[_0x71a443(0x16f)])throw new SDKError(ErrorCode[_0x71a443(0x187)],_0x71a443(0x188));const _0x494b63=_0x5bc475[_0x71a443(0x15d)],_0x5128b8=_0x5bc475[_0x71a443(0x16f)];_0x3ef725[_0x71a443(0x181)]&&(console[_0x71a443(0x173)](_0x71a443(0x16e)+_0x494b63),console['error']('Segment\x20ID:\x20'+_0x5128b8));let _0x2409a9;if(_0x3ef725[_0x71a443(0x160)]){const _0x717ad9=_0x3ef725[_0x71a443(0x160)],_0x245248=await withSpinner(_0x71a443(0x169)+_0x717ad9+_0x71a443(0x184),()=>_0x30dcf9[_0x71a443(0x171)]['resolveFolderId'](_0x494b63,_0x717ad9),{'verbose':_0x3ef725[_0x71a443(0x181)]});_0x2409a9=parseInt(_0x245248[_0x71a443(0x183)],0xa),_0x3ef725['verbose']&&console[_0x71a443(0x173)]('Resolved\x20folder\x20ID:\x20'+_0x2409a9);}const _0x475745=await loadJSONFromOptions(_0x3ef725[_0x71a443(0x170)],_0x3ef725['ruleFile']),_0xc60f3={'name':_0x3ef725[_0x71a443(0x177)],'description':_0x3ef725[_0x71a443(0x174)],'rule':_0x475745,'kind':_0x3ef725[_0x71a443(0x17a)]!==undefined?parseInt(_0x3ef725['kind'],0xa):undefined,'segmentFolderId':_0x2409a9},_0x5f02fd=await withSpinner(_0x71a443(0x162)+_0x5bc475[_0x71a443(0x15e)]+_0x71a443(0x184),()=>_0x30dcf9[_0x71a443(0x171)]['updateSegmentById'](_0x494b63,_0x5128b8,_0xc60f3),{'verbose':_0x3ef725[_0x71a443(0x181)]}),_0x3ab508=_0x5f02fd[_0x71a443(0x183)];return console[_0x71a443(0x173)](_0x71a443(0x166)+_0x3ab508[_0x71a443(0x177)]+'\x27'),_0x3762ae!==_0x4514a2&&console[_0x71a443(0x173)](_0x71a443(0x17c)+_0x3762ae),await handleSDKOutput([_0x3ab508],_0x3ef725),0x0;}}
@@ -1 +1 @@
1
- function a32_0x3804(_0x567e8f,_0x5eba8c){const _0x1e4aec=a32_0x1e4a();return a32_0x3804=function(_0x38049d,_0x106967){_0x38049d=_0x38049d-0x1c4;let _0x5113ed=_0x1e4aec[_0x38049d];return _0x5113ed;},a32_0x3804(_0x567e8f,_0x5eba8c);}function a32_0x1e4a(){const _0x4fb647=['10CHVRcb','folderId','Use:\x20tdx\x20segment\x20use\x20','Use\x20\x22tdx\x20segment\x20pwd\x22\x20to\x20show\x20current\x20context','segmentPath','length','Target\x20path:\x20','type','segment:use','Context\x20set\x20to:\x20','Resolved\x20path\x20type:\x20','segment','segments','slice','Resolving\x20path\x20\x27','Use\x20an\x20absolute\x20path\x20or\x20set\x20context\x20with:\x20tdx\x20segment\x20use\x20<parent_name>','Set\x20current\x20segment/folder\x20context\x20for\x20navigation','Context\x20can\x20only\x20be\x20set\x20to\x20a\x20parent\x20segment\x20or\x20folder.','1369902UTKVYg','session','parentId','\x20\x20tdx\x20segment\x20use\x20..\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Go\x20to\x20parent','isAbsolute','1670184lslQtu','error','parentName','join','data','fullPath','Usage:\x20tdx\x20segment\x20use\x20<path>','folderPath','site','log','4989447txiDZp','458620iGOGuJ','Use\x20\x22tdx\x20segments\x22\x20to\x20list\x20contents\x20in\x20this\x20context','1804105AJcFLA','Context\x20cleared.\x20Back\x20to\x20root.','Site:\x20','\x20\x20tdx\x20segment\x20use\x20/\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Clear\x20context','\x20\x20tdx\x20segment\x20use\x20\x22My\x20Audience/Marketing\x22','2053940NaMIWa','Parent\x20ID:\x20','Error:\x20Path\x20is\x20required','Folder\x20ID:\x20','\x20\x20tdx\x20segment\x20use\x20\x22My\x20Audience\x22','name','\x27...','3ICjVRV','resolvePathToResource','2tEqjWn','151483bjiLpR','Error:\x20No\x20context\x20set.\x20Cannot\x20use\x20relative\x20path.','verbose'];a32_0x1e4a=function(){return _0x4fb647;};return a32_0x1e4a();}const a32_0x19e94f=a32_0x3804;(function(_0x4a36a6,_0x331b7e){const _0x139bb4=a32_0x3804,_0x1a2ef8=_0x4a36a6();while(!![]){try{const _0x50f377=parseInt(_0x139bb4(0x1e6))/0x1*(parseInt(_0x139bb4(0x1e5))/0x2)+parseInt(_0x139bb4(0x1e3))/0x3*(parseInt(_0x139bb4(0x1d5))/0x4)+parseInt(_0x139bb4(0x1d7))/0x5+parseInt(_0x139bb4(0x1c5))/0x6+-parseInt(_0x139bb4(0x1dc))/0x7+parseInt(_0x139bb4(0x1ca))/0x8+-parseInt(_0x139bb4(0x1d4))/0x9*(parseInt(_0x139bb4(0x1e9))/0xa);if(_0x50f377===_0x331b7e)break;else _0x1a2ef8['push'](_0x1a2ef8['shift']());}catch(_0x8969ff){_0x1a2ef8['push'](_0x1a2ef8['shift']());}}}(a32_0x1e4a,0x34cb6));import{BaseCommand}from'./command.js';import{saveSessionContext}from'../core/session.js';import{withSpinner}from'../utils/spinner.js';import{parsePath,normalizePath}from'../utils/segment-path-parser.js';export class SegmentUseCommand extends BaseCommand{[a32_0x19e94f(0x1e1)]=a32_0x19e94f(0x1f1);['description']=a32_0x19e94f(0x1f9);async['execute'](_0x8b5bd7){const _0x38124d=a32_0x19e94f,{options:_0x5b8f70,args:_0x17987c,tdx:_0x4d83fe}=_0x8b5bd7;if(_0x17987c[_0x38124d(0x1ee)]===0x0)return console[_0x38124d(0x1cb)](_0x38124d(0x1de)),console['error'](_0x38124d(0x1d0)),console[_0x38124d(0x1cb)]('Examples:'),console[_0x38124d(0x1cb)](_0x38124d(0x1e0)),console[_0x38124d(0x1cb)](_0x38124d(0x1db)),console[_0x38124d(0x1cb)](_0x38124d(0x1da)),console[_0x38124d(0x1cb)](_0x38124d(0x1c8)),0x1;const _0x292fa3=_0x17987c[0x0],_0x4b502e=_0x5b8f70[_0x38124d(0x1c6)];try{if(_0x292fa3==='/')return saveSessionContext({'segment_path':undefined},_0x4b502e),console['log'](_0x38124d(0x1d8)),0x0;const _0x1d0c09=_0x5b8f70[_0x38124d(0x1ed)];let _0x7c1a90=_0x292fa3;const _0x22ac11=parsePath(_0x292fa3);if(!_0x22ac11[_0x38124d(0x1c9)]){if(!_0x1d0c09)return console[_0x38124d(0x1cb)](_0x38124d(0x1e7)),console[_0x38124d(0x1cb)](_0x38124d(0x1f8)),0x1;if(_0x292fa3==='..'){const _0x4bb992=_0x1d0c09['split']('/')[_0x38124d(0x1f6)](0x0,-0x1)[_0x38124d(0x1cd)]('/');_0x7c1a90=_0x4bb992||'/';}else _0x292fa3==='.'?_0x7c1a90=_0x1d0c09:_0x7c1a90=_0x1d0c09+'/'+_0x292fa3;_0x5b8f70[_0x38124d(0x1e8)]&&console['error']('Resolved\x20relative\x20path\x20to:\x20'+_0x7c1a90);}if(_0x7c1a90==='/'||_0x7c1a90==='')return saveSessionContext({'segment_path':undefined},_0x4b502e),console[_0x38124d(0x1d3)](_0x38124d(0x1d8)),0x0;_0x7c1a90=normalizePath(_0x7c1a90);const _0x2043cb=parsePath(_0x7c1a90)[_0x38124d(0x1f5)];if(_0x2043cb[_0x38124d(0x1ee)]===0x0)return saveSessionContext({'segment_path':undefined},_0x4b502e),console['log'](_0x38124d(0x1d8)),0x0;_0x5b8f70[_0x38124d(0x1e8)]&&(console[_0x38124d(0x1cb)](_0x38124d(0x1d9)+_0x5b8f70[_0x38124d(0x1d2)]),console[_0x38124d(0x1cb)](_0x38124d(0x1ef)+_0x7c1a90));const _0x5e7b67=await withSpinner(_0x38124d(0x1f7)+_0x7c1a90+_0x38124d(0x1e2),()=>_0x4d83fe[_0x38124d(0x1f4)][_0x38124d(0x1e4)](_0x7c1a90),{'verbose':_0x5b8f70[_0x38124d(0x1e8)]}),_0x33b094=_0x5e7b67[_0x38124d(0x1ce)];_0x5b8f70[_0x38124d(0x1e8)]&&(console[_0x38124d(0x1cb)](_0x38124d(0x1f3)+_0x33b094[_0x38124d(0x1f0)]),console[_0x38124d(0x1cb)](_0x38124d(0x1dd)+_0x33b094[_0x38124d(0x1c7)]),_0x33b094['folderId']&&console[_0x38124d(0x1cb)](_0x38124d(0x1df)+_0x33b094[_0x38124d(0x1ea)]));if(_0x33b094[_0x38124d(0x1f0)]===_0x38124d(0x1f4))return console[_0x38124d(0x1cb)]('Error:\x20Cannot\x20set\x20context\x20to\x20a\x20segment.'),console[_0x38124d(0x1cb)](_0x38124d(0x1c4)),console[_0x38124d(0x1cb)](_0x38124d(0x1eb)+_0x33b094[_0x38124d(0x1cc)]+(_0x33b094[_0x38124d(0x1d1)]?'/'+_0x33b094['folderPath'][_0x38124d(0x1cd)]('/'):'')),0x1;return saveSessionContext({'segment_path':_0x33b094[_0x38124d(0x1cf)],'parent_segment':_0x33b094[_0x38124d(0x1cc)]},_0x4b502e),console[_0x38124d(0x1d3)](_0x38124d(0x1f2)+_0x33b094[_0x38124d(0x1cf)]),_0x5b8f70['verbose']&&(console[_0x38124d(0x1cb)](_0x38124d(0x1d6)),console['error'](_0x38124d(0x1ec)),console[_0x38124d(0x1cb)]('Use\x20\x22tdx\x20context\x22\x20to\x20see\x20all\x20context\x20parameters')),0x0;}catch(_0x3b597c){throw _0x3b597c;}}}
1
+ const a34_0x2ea5d6=a34_0x440c;(function(_0x465ecd,_0x36fb8d){const _0xd235d9=a34_0x440c,_0x141fae=_0x465ecd();while(!![]){try{const _0x1d3547=-parseInt(_0xd235d9(0x19e))/0x1+-parseInt(_0xd235d9(0x18f))/0x2+parseInt(_0xd235d9(0x190))/0x3+parseInt(_0xd235d9(0x19b))/0x4+-parseInt(_0xd235d9(0x196))/0x5*(parseInt(_0xd235d9(0x192))/0x6)+-parseInt(_0xd235d9(0x176))/0x7*(-parseInt(_0xd235d9(0x189))/0x8)+parseInt(_0xd235d9(0x1a2))/0x9*(-parseInt(_0xd235d9(0x186))/0xa);if(_0x1d3547===_0x36fb8d)break;else _0x141fae['push'](_0x141fae['shift']());}catch(_0x170716){_0x141fae['push'](_0x141fae['shift']());}}}(a34_0x2885,0xbc663));import{BaseCommand}from'./command.js';import{saveSessionContext}from'../core/session.js';import{withSpinner}from'../utils/spinner.js';function a34_0x440c(_0x464e94,_0x2216cd){const _0x2885ce=a34_0x2885();return a34_0x440c=function(_0x440cbc,_0xd58f48){_0x440cbc=_0x440cbc-0x170;let _0x494a50=_0x2885ce[_0x440cbc];return _0x494a50;},a34_0x440c(_0x464e94,_0x2216cd);}import{parsePath,normalizePath}from'../utils/segment-path-parser.js';export class SegmentUseCommand extends BaseCommand{[a34_0x2ea5d6(0x199)]=a34_0x2ea5d6(0x170);[a34_0x2ea5d6(0x173)]=a34_0x2ea5d6(0x193);async[a34_0x2ea5d6(0x17e)](_0x18d4b5){const _0x594406=a34_0x2ea5d6,{options:_0x471ee0,args:_0xe995ba,tdx:_0x59f583}=_0x18d4b5;if(_0xe995ba[_0x594406(0x194)]===0x0)return console[_0x594406(0x17d)](_0x594406(0x18d)),console[_0x594406(0x17d)](_0x594406(0x17c)),console[_0x594406(0x17d)]('Examples:'),console[_0x594406(0x17d)](_0x594406(0x18b)),console['error'](_0x594406(0x181)),console['error'](_0x594406(0x188)),console[_0x594406(0x17d)](_0x594406(0x183)),0x1;const _0x25c772=_0xe995ba[0x0],_0x3151ab=_0x471ee0[_0x594406(0x19a)];try{if(_0x25c772==='/')return saveSessionContext({'segment_path':undefined},_0x3151ab),console['log'](_0x594406(0x187)),0x0;const _0x49c0dd=_0x471ee0[_0x594406(0x177)];let _0x42b274=_0x25c772;const _0x568244=parsePath(_0x25c772);if(!_0x568244['isAbsolute']){if(!_0x49c0dd)return console[_0x594406(0x17d)]('Error:\x20No\x20context\x20set.\x20Cannot\x20use\x20relative\x20path.'),console['error'](_0x594406(0x19c)),0x1;if(_0x25c772==='..'){const _0x888f3e=_0x49c0dd[_0x594406(0x198)]('/')[_0x594406(0x195)](0x0,-0x1)['join']('/');_0x42b274=_0x888f3e||'/';}else _0x25c772==='.'?_0x42b274=_0x49c0dd:_0x42b274=_0x49c0dd+'/'+_0x25c772;_0x471ee0['verbose']&&console['error'](_0x594406(0x178)+_0x42b274);}if(_0x42b274==='/'||_0x42b274==='')return saveSessionContext({'segment_path':undefined},_0x3151ab),console[_0x594406(0x17a)](_0x594406(0x187)),0x0;_0x42b274=normalizePath(_0x42b274);const _0x3cf025=parsePath(_0x42b274)[_0x594406(0x179)];if(_0x3cf025['length']===0x0)return saveSessionContext({'segment_path':undefined},_0x3151ab),console[_0x594406(0x17a)]('Context\x20cleared.\x20Back\x20to\x20root.'),0x0;_0x471ee0[_0x594406(0x17b)]&&(console['error'](_0x594406(0x17f)+_0x471ee0['site']),console[_0x594406(0x17d)](_0x594406(0x18e)+_0x42b274));const _0x2fd319=await withSpinner('Resolving\x20path\x20\x27'+_0x42b274+_0x594406(0x1a0),()=>_0x59f583['segment']['resolvePathToResource'](_0x42b274),{'verbose':_0x471ee0[_0x594406(0x17b)]}),_0x273672=_0x2fd319[_0x594406(0x19f)];_0x471ee0[_0x594406(0x17b)]&&(console[_0x594406(0x17d)](_0x594406(0x172)+_0x273672[_0x594406(0x184)]),console['error'](_0x594406(0x182)+_0x273672['parentId']),_0x273672[_0x594406(0x175)]&&console[_0x594406(0x17d)](_0x594406(0x180)+_0x273672[_0x594406(0x175)]));if(_0x273672[_0x594406(0x184)]===_0x594406(0x174))return console[_0x594406(0x17d)](_0x594406(0x197)),console[_0x594406(0x17d)]('Context\x20can\x20only\x20be\x20set\x20to\x20a\x20parent\x20segment\x20or\x20folder.'),console[_0x594406(0x17d)](_0x594406(0x1a1)+_0x273672['parentName']+(_0x273672[_0x594406(0x171)]?'/'+_0x273672['folderPath'][_0x594406(0x185)]('/'):'')),0x1;return saveSessionContext({'segment_path':_0x273672[_0x594406(0x191)],'parent_segment':_0x273672[_0x594406(0x18c)]},_0x3151ab),console[_0x594406(0x17a)](_0x594406(0x18a)+_0x273672[_0x594406(0x191)]),_0x471ee0['verbose']&&(console[_0x594406(0x17d)](_0x594406(0x19d)),console[_0x594406(0x17d)]('Use\x20\x22tdx\x20segment\x20pwd\x22\x20to\x20show\x20current\x20context'),console[_0x594406(0x17d)]('Use\x20\x22tdx\x20context\x22\x20to\x20see\x20all\x20context\x20parameters')),0x0;}catch(_0x59d4bf){throw _0x59d4bf;}}}function a34_0x2885(){const _0x4d847f=['6HgzvhJ','Set\x20current\x20segment/folder\x20context\x20for\x20navigation','length','slice','1179385gctYzu','Error:\x20Cannot\x20set\x20context\x20to\x20a\x20segment.','split','name','session','4631500QTktdh','Use\x20an\x20absolute\x20path\x20or\x20set\x20context\x20with:\x20tdx\x20segment\x20use\x20<parent_name>','Use\x20\x22tdx\x20segments\x22\x20to\x20list\x20contents\x20in\x20this\x20context','434102xTshOj','data','\x27...','Use:\x20tdx\x20segment\x20use\x20','54eDjMLA','segment:use','folderPath','Resolved\x20path\x20type:\x20','description','segment','folderId','7qHRXmJ','segmentPath','Resolved\x20relative\x20path\x20to:\x20','segments','log','verbose','Usage:\x20tdx\x20segment\x20use\x20<path>','error','execute','Site:\x20','Folder\x20ID:\x20','\x20\x20tdx\x20segment\x20use\x20\x22My\x20Audience/Marketing\x22','Parent\x20ID:\x20','\x20\x20tdx\x20segment\x20use\x20..\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Go\x20to\x20parent','type','join','3033370QQbgBz','Context\x20cleared.\x20Back\x20to\x20root.','\x20\x20tdx\x20segment\x20use\x20/\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Clear\x20context','11170584vNlgxj','Context\x20set\x20to:\x20','\x20\x20tdx\x20segment\x20use\x20\x22My\x20Audience\x22','parentName','Error:\x20Path\x20is\x20required','Target\x20path:\x20','1359868jEtDgu','4162260ngoxcq','fullPath'];a34_0x2885=function(){return _0x4d847f;};return a34_0x2885();}
@@ -1 +1 @@
1
- function a33_0x2c71(){const _0x4d1f99=['listParentsWithPattern','Parent\x20ID:\x20','data','6cEWsHX','jsonl','includes','389074QyoPgO','population','resolvePathToResource','Error:\x20Pattern\x20matching\x20is\x20only\x20supported\x20at\x20root\x20level\x20(no\x20context\x20set).','execute','\x20\x20Cause:\x20','name','maxDepth','\x20folder','Listing\x20folders\x20and\x20segments...','No\x20parent\x20segments\x20match\x20pattern:\x20','9648dNqGmi','localeCompare','✔\x20Found\x20','👥\x20','log','filter','Folder\x20ID:\x20','Error:\x20','recursive','557868IVJSEN','listRecursive','folder','length','[parent\x20segments]','695276XzJAym','1DRtqyv','Listing\x20parent\x20segments\x20matching\x20\x27','12931180vJfswp','\x20and\x20','Listing\x20parent\x20segments...','Path/pattern\x20arg:\x20','Resolving\x20context\x20path\x20\x27','Site:\x20','✔\x20Built\x20tree\x20with\x20','2007YzFWKB','2105135XJvkCB','message','parentId','Clear\x20context\x20with:\x20tdx\x20segment\x20use\x20/','folderId','format','cause','json','attributes','listParents','\x27...','test','\x20matching\x20\x27','\x20parent\x20segment','map','listUnified','Current\x20context:\x20','verbose','segments','description','replace','dim','site','\x5c$&','1318080UjspMl','segment','Building\x20hierarchy\x20tree...','error'];a33_0x2c71=function(){return _0x4d1f99;};return a33_0x2c71();}const a33_0x375287=a33_0x54d8;(function(_0x225559,_0x1008f7){const _0x4dc994=a33_0x54d8,_0x4a25b6=_0x225559();while(!![]){try{const _0x3f12ed=parseInt(_0x4dc994(0xe9))/0x1*(-parseInt(_0x4dc994(0xe8))/0x2)+-parseInt(_0x4dc994(0x129))/0x3+-parseInt(_0x4dc994(0x10b))/0x4+-parseInt(_0x4dc994(0xf3))/0x5+parseInt(_0x4dc994(0x112))/0x6*(-parseInt(_0x4dc994(0x115))/0x7)+-parseInt(_0x4dc994(0x120))/0x8*(-parseInt(_0x4dc994(0xf2))/0x9)+parseInt(_0x4dc994(0xeb))/0xa;if(_0x3f12ed===_0x1008f7)break;else _0x4a25b6['push'](_0x4a25b6['shift']());}catch(_0x3959d9){_0x4a25b6['push'](_0x4a25b6['shift']());}}}(a33_0x2c71,0x3647d));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleSDKOutput}from'../utils/command-output.js';import{withSpinner}from'../utils/spinner.js';import{formatFlatList,formatTree}from'../utils/tree-formatter.js';import{formatRows}from'../utils/formatters.js';import a33_0x890f77 from'chalk';function a33_0x54d8(_0x473280,_0x3b5bb1){const _0x2c7145=a33_0x2c71();return a33_0x54d8=function(_0x54d83b,_0x5c700d){_0x54d83b=_0x54d83b-0xe4;let _0x12bedb=_0x2c7145[_0x54d83b];return _0x12bedb;},a33_0x54d8(_0x473280,_0x3b5bb1);}export class SegmentsCommand extends BaseCommand{[a33_0x375287(0x11b)]=a33_0x375287(0x105);[a33_0x375287(0x106)]='List\x20parent\x20segments,\x20folders,\x20and\x20child\x20segments';async[a33_0x375287(0x119)](_0x231dea){const _0x41fab6=a33_0x375287,{options:_0x122d11,args:_0x3c7ae8}=_0x231dea,_0x274740=_0x122d11[_0x41fab6(0x128)],_0x446fb7=_0x3c7ae8[0x0];try{const _0x48cba0=_0x122d11['segmentPath'];_0x122d11[_0x41fab6(0x104)]&&(console[_0x41fab6(0x10e)](_0x41fab6(0xf0)+_0x122d11[_0x41fab6(0x109)]),console[_0x41fab6(0x10e)](_0x41fab6(0x103)+(_0x48cba0||'/')),_0x446fb7&&console[_0x41fab6(0x10e)](_0x41fab6(0xee)+_0x446fb7),_0x274740&&console[_0x41fab6(0x10e)]('Recursive\x20mode:\x20enabled'));if(_0x446fb7){const _0x10a39b=_0x446fb7['includes']('*')||_0x446fb7[_0x41fab6(0x114)]('?');if(_0x10a39b&&!_0x48cba0)return await this[_0x41fab6(0x10f)](_0x231dea,_0x446fb7);else return _0x10a39b?(console[_0x41fab6(0x10e)](_0x41fab6(0x118)),console['error'](_0x41fab6(0xf6)),0x1):_0x274740?await this['listRecursive'](_0x231dea,_0x446fb7):await this[_0x41fab6(0x102)](_0x231dea,_0x446fb7);}if(!_0x48cba0)return await this[_0x41fab6(0xfc)](_0x231dea);return _0x274740?await this[_0x41fab6(0xe4)](_0x231dea,_0x48cba0):await this[_0x41fab6(0x102)](_0x231dea,_0x48cba0);}catch(_0x3d098c){if(_0x3d098c instanceof SDKError)return console[_0x41fab6(0x10e)](_0x41fab6(0x127)+_0x3d098c[_0x41fab6(0xf4)]),_0x3d098c[_0x41fab6(0xf9)]&&console[_0x41fab6(0x10e)](_0x41fab6(0x11a)+_0x3d098c['cause']),0x1;throw _0x3d098c;}}async['listParentsWithPattern'](_0x1dbcbd,_0x5f1031){const _0xf68ad9=a33_0x375287,{options:_0x35f568,tdx:_0x310250}=_0x1dbcbd,_0x43f9de=await withSpinner(_0xf68ad9(0xea)+_0x5f1031+_0xf68ad9(0xfd),()=>_0x310250['segment'][_0xf68ad9(0xfc)](),{'verbose':_0x35f568[_0xf68ad9(0x104)]}),_0x355fa6=_0x43f9de[_0xf68ad9(0x111)],_0x284436=_0x5f1031[_0xf68ad9(0x107)](/[.+^${}()|[\]\\]/g,_0xf68ad9(0x10a))['replace'](/\*/g,'.*')[_0xf68ad9(0x107)](/\?/g,'.'),_0x4b56b1=new RegExp('^'+_0x284436+'$','i'),_0x5259a9=_0x355fa6[_0xf68ad9(0x125)](_0x43dfd4=>_0x4b56b1[_0xf68ad9(0xfe)](_0x43dfd4[_0xf68ad9(0xfb)][_0xf68ad9(0x11b)]));console['error']('✔\x20Found\x20'+_0x5259a9['length']+'\x20parent\x20segment'+(_0x5259a9[_0xf68ad9(0xe6)]!==0x1?'s':'')+_0xf68ad9(0xff)+_0x5f1031+'\x27');if(_0x35f568[_0xf68ad9(0xf8)]===_0xf68ad9(0xfa)||_0x35f568[_0xf68ad9(0xf8)]==='jsonl')await handleSDKOutput(_0x5259a9,_0x35f568);else{if(_0x5259a9[_0xf68ad9(0xe6)]===0x0)console[_0xf68ad9(0x124)](_0xf68ad9(0x11f)+_0x5f1031);else{console[_0xf68ad9(0x124)]('[parent\x20segments]');for(const _0x2a8010 of _0x5259a9){const _0xb488ab=_0x2a8010[_0xf68ad9(0xfb)][_0xf68ad9(0x116)]?a33_0x890f77[_0xf68ad9(0x108)]('\x20('+formatRows(_0x2a8010[_0xf68ad9(0xfb)][_0xf68ad9(0x116)])+')'):'';console[_0xf68ad9(0x124)](_0xf68ad9(0x123)+_0x2a8010[_0xf68ad9(0xfb)][_0xf68ad9(0x11b)]+_0xb488ab);}}}return 0x0;}async[a33_0x375287(0xfc)](_0x63002b){const _0x2830c5=a33_0x375287,{options:_0x27a0c2,tdx:_0xefe561}=_0x63002b,_0x7519e0=await withSpinner(_0x2830c5(0xed),()=>_0xefe561[_0x2830c5(0x10c)][_0x2830c5(0xfc)](),{'verbose':_0x27a0c2['verbose']}),_0x3bb367=_0x7519e0['data'];console[_0x2830c5(0x10e)](_0x2830c5(0x122)+_0x3bb367[_0x2830c5(0xe6)]+_0x2830c5(0x100)+(_0x3bb367[_0x2830c5(0xe6)]!==0x1?'s':''));if(_0x27a0c2[_0x2830c5(0xf8)]===_0x2830c5(0xfa)||_0x27a0c2[_0x2830c5(0xf8)]===_0x2830c5(0x113))await handleSDKOutput(_0x3bb367,_0x27a0c2);else{console[_0x2830c5(0x124)](_0x2830c5(0xe7));for(const _0x3cc942 of _0x3bb367){const _0x25127e=_0x3cc942[_0x2830c5(0xfb)][_0x2830c5(0x116)]?a33_0x890f77['dim']('\x20('+formatRows(_0x3cc942[_0x2830c5(0xfb)][_0x2830c5(0x116)])+')'):'';console[_0x2830c5(0x124)]('👥\x20'+_0x3cc942['attributes'][_0x2830c5(0x11b)]+_0x25127e);}}return 0x0;}async[a33_0x375287(0x102)](_0x3d35c3,_0x2c08e2){const _0x1fc851=a33_0x375287,{options:_0x82254d,tdx:_0x4dc833}=_0x3d35c3,_0x256e2d=await withSpinner('Resolving\x20context\x20path\x20\x27'+_0x2c08e2+_0x1fc851(0xfd),()=>_0x4dc833[_0x1fc851(0x10c)][_0x1fc851(0x117)](_0x2c08e2),{'verbose':_0x82254d['verbose']}),_0x4b6677=_0x256e2d['data'];_0x82254d['verbose']&&(console[_0x1fc851(0x10e)](_0x1fc851(0x110)+_0x4b6677['parentId']),_0x4b6677[_0x1fc851(0xf7)]&&console[_0x1fc851(0x10e)]('Folder\x20ID:\x20'+_0x4b6677[_0x1fc851(0xf7)]));const _0xa6b7e4=await withSpinner(_0x1fc851(0x11e),()=>_0x4dc833[_0x1fc851(0x10c)][_0x1fc851(0x102)](_0x4b6677[_0x1fc851(0xf5)],_0x4b6677[_0x1fc851(0xf7)]),{'verbose':_0x82254d['verbose']}),{folders:_0x3c20cc,segments:_0x53a84f}=_0xa6b7e4[_0x1fc851(0x111)],_0xc66c23=_0x3c20cc[_0x1fc851(0xe6)]+_0x53a84f['length'];console['error'](_0x1fc851(0x122)+_0x3c20cc[_0x1fc851(0xe6)]+_0x1fc851(0x11d)+(_0x3c20cc[_0x1fc851(0xe6)]!==0x1?'s':'')+_0x1fc851(0xec)+_0x53a84f[_0x1fc851(0xe6)]+'\x20segment'+(_0x53a84f[_0x1fc851(0xe6)]!==0x1?'s':''));if(_0x82254d[_0x1fc851(0xf8)]===_0x1fc851(0xfa)||_0x82254d[_0x1fc851(0xf8)]===_0x1fc851(0x113)){const _0x389576=[..._0x3c20cc[_0x1fc851(0x101)](_0x1c183b=>({..._0x1c183b,'type':_0x1fc851(0xe5)})),..._0x53a84f[_0x1fc851(0x101)](_0x396854=>({..._0x396854,'type':'segment'}))]['sort']((_0x39e36c,_0xfde7bd)=>_0x39e36c['name'][_0x1fc851(0x121)](_0xfde7bd[_0x1fc851(0x11b)]));await handleSDKOutput(_0x389576,_0x82254d);}else{if(_0xc66c23===0x0)console[_0x1fc851(0x124)](a33_0x890f77['dim']('[/'+_0x2c08e2+']')),console[_0x1fc851(0x124)]('(empty)');else{console['log'](a33_0x890f77['dim']('[/'+_0x2c08e2+']'));const _0x1e3d6d=formatFlatList(_0x3c20cc,_0x53a84f,{'showMetadata':!![]});console[_0x1fc851(0x124)](_0x1e3d6d);}}return 0x0;}async[a33_0x375287(0xe4)](_0x338125,_0x106831){const _0x464834=a33_0x375287,{options:_0xddb72d,tdx:_0x2ad819}=_0x338125,_0x13bbba=await withSpinner(_0x464834(0xef)+_0x106831+'\x27...',()=>_0x2ad819[_0x464834(0x10c)]['resolvePathToResource'](_0x106831),{'verbose':_0xddb72d['verbose']}),_0x3df995=_0x13bbba[_0x464834(0x111)];_0xddb72d[_0x464834(0x104)]&&(console[_0x464834(0x10e)](_0x464834(0x110)+_0x3df995[_0x464834(0xf5)]),_0x3df995['folderId']&&console[_0x464834(0x10e)](_0x464834(0x126)+_0x3df995[_0x464834(0xf7)]));const _0x168e17=_0xddb72d[_0x464834(0x11c)]||0xa,_0x3b8250=await withSpinner(_0x464834(0x10d),()=>_0x2ad819[_0x464834(0x10c)][_0x464834(0xe4)](_0x3df995[_0x464834(0xf5)],_0x3df995[_0x464834(0xf7)],0x0,_0x168e17),{'verbose':_0xddb72d[_0x464834(0x104)]}),_0x1cd18b=_0x3b8250['data'];console[_0x464834(0x10e)](_0x464834(0xf1)+_0x1cd18b[_0x464834(0xe6)]+'\x20top-level\x20items');if(_0xddb72d[_0x464834(0xf8)]===_0x464834(0xfa)||_0xddb72d[_0x464834(0xf8)]===_0x464834(0x113))await handleSDKOutput(_0x1cd18b,_0xddb72d);else{console[_0x464834(0x124)](a33_0x890f77[_0x464834(0x108)]('[/'+_0x106831+']'));const _0x226c42=formatTree(_0x1cd18b,{'showMetadata':!![]});console[_0x464834(0x124)](_0x226c42);}return 0x0;}}
1
+ const a35_0x2cd70d=a35_0x38a7;(function(_0x490ca8,_0x30abc4){const _0xc3bcb6=a35_0x38a7,_0x385b92=_0x490ca8();while(!![]){try{const _0xd574e2=parseInt(_0xc3bcb6(0x13c))/0x1+-parseInt(_0xc3bcb6(0x167))/0x2*(-parseInt(_0xc3bcb6(0x16c))/0x3)+parseInt(_0xc3bcb6(0x156))/0x4*(parseInt(_0xc3bcb6(0x171))/0x5)+-parseInt(_0xc3bcb6(0x13d))/0x6*(parseInt(_0xc3bcb6(0x16f))/0x7)+parseInt(_0xc3bcb6(0x16b))/0x8*(parseInt(_0xc3bcb6(0x173))/0x9)+parseInt(_0xc3bcb6(0x147))/0xa*(-parseInt(_0xc3bcb6(0x14d))/0xb)+-parseInt(_0xc3bcb6(0x13b))/0xc*(-parseInt(_0xc3bcb6(0x176))/0xd);if(_0xd574e2===_0x30abc4)break;else _0x385b92['push'](_0x385b92['shift']());}catch(_0x2a8097){_0x385b92['push'](_0x385b92['shift']());}}}(a35_0xb337,0xc2bee));import{BaseCommand}from'./command.js';function a35_0xb337(){const _0x5ce687=['folderId','Building\x20hierarchy\x20tree...','filter','👥\x20','46108bwaGNE','\x20top-level\x20items','replace','length','No\x20parent\x20segments\x20match\x20pattern:\x20','\x20matching\x20\x27','log','json','name','listParentsWithPattern','verbose','\x5c$&','Site:\x20','Listing\x20parent\x20segments\x20matching\x20\x27','Folder\x20ID:\x20','map','cause','2cLKbOk','✔\x20Found\x20','[parent\x20segments]','folder','8872lTeOQr','2790321jgrZKZ','data','dim','63392Xmlxgf','includes','5dPlACf','Parent\x20ID:\x20','11826HJxFRw','Recursive\x20mode:\x20enabled','\x20parent\x20segment','4716517vStRZW','Current\x20context:\x20','\x27...','message','\x20segment','Error:\x20','Listing\x20folders\x20and\x20segments...','test','site','Resolving\x20context\x20path\x20\x27','List\x20parent\x20segments,\x20folders,\x20and\x20child\x20segments','jsonl','segmentPath','12qKHgWH','31120EznOwx','468wlYNsD','error','Listing\x20parent\x20segments...','Clear\x20context\x20with:\x20tdx\x20segment\x20use\x20/','population','attributes','format','segment','execute','listRecursive','12887430RBnpvA','description','localeCompare','(empty)','\x20\x20Cause:\x20','listUnified','11ZxLGni','parentId','resolvePathToResource','listParents','segments'];a35_0xb337=function(){return _0x5ce687;};return a35_0xb337();}import{SDKError}from'../sdk/index.js';import{handleSDKOutput}from'../utils/command-output.js';import{withSpinner}from'../utils/spinner.js';import{formatFlatList,formatTree}from'../utils/tree-formatter.js';import{formatRows}from'../utils/formatters.js';import a35_0x517637 from'chalk';function a35_0x38a7(_0x592f64,_0x153a32){const _0xb3371=a35_0xb337();return a35_0x38a7=function(_0x38a760,_0x984b5b){_0x38a760=_0x38a760-0x132;let _0x28a995=_0xb3371[_0x38a760];return _0x28a995;},a35_0x38a7(_0x592f64,_0x153a32);}export class SegmentsCommand extends BaseCommand{[a35_0x2cd70d(0x15e)]=a35_0x2cd70d(0x151);[a35_0x2cd70d(0x148)]=a35_0x2cd70d(0x138);async[a35_0x2cd70d(0x145)](_0x32c079){const _0x2f4d56=a35_0x2cd70d,{options:_0x8d3bf1,args:_0x4b9250}=_0x32c079,_0x14c8be=_0x8d3bf1['recursive'],_0x5587a1=_0x4b9250[0x0];try{const _0x8bcbff=_0x8d3bf1[_0x2f4d56(0x13a)];_0x8d3bf1['verbose']&&(console['error'](_0x2f4d56(0x162)+_0x8d3bf1[_0x2f4d56(0x136)]),console[_0x2f4d56(0x13e)](_0x2f4d56(0x177)+(_0x8bcbff||'/')),_0x5587a1&&console[_0x2f4d56(0x13e)]('Path/pattern\x20arg:\x20'+_0x5587a1),_0x14c8be&&console[_0x2f4d56(0x13e)](_0x2f4d56(0x174)));if(_0x5587a1){const _0x417d8a=_0x5587a1[_0x2f4d56(0x170)]('*')||_0x5587a1[_0x2f4d56(0x170)]('?');if(_0x417d8a&&!_0x8bcbff)return await this['listParentsWithPattern'](_0x32c079,_0x5587a1);else return _0x417d8a?(console['error']('Error:\x20Pattern\x20matching\x20is\x20only\x20supported\x20at\x20root\x20level\x20(no\x20context\x20set).'),console[_0x2f4d56(0x13e)](_0x2f4d56(0x140)),0x1):_0x14c8be?await this[_0x2f4d56(0x146)](_0x32c079,_0x5587a1):await this[_0x2f4d56(0x14c)](_0x32c079,_0x5587a1);}if(!_0x8bcbff)return await this[_0x2f4d56(0x150)](_0x32c079);return _0x14c8be?await this[_0x2f4d56(0x146)](_0x32c079,_0x8bcbff):await this[_0x2f4d56(0x14c)](_0x32c079,_0x8bcbff);}catch(_0x1f2480){if(_0x1f2480 instanceof SDKError)return console[_0x2f4d56(0x13e)](_0x2f4d56(0x133)+_0x1f2480[_0x2f4d56(0x179)]),_0x1f2480[_0x2f4d56(0x166)]&&console['error'](_0x2f4d56(0x14b)+_0x1f2480['cause']),0x1;throw _0x1f2480;}}async[a35_0x2cd70d(0x15f)](_0x2f4c84,_0x53f5e3){const _0x22067d=a35_0x2cd70d,{options:_0x4641e4,tdx:_0x3a87a1}=_0x2f4c84,_0x5b1c52=await withSpinner(_0x22067d(0x163)+_0x53f5e3+_0x22067d(0x178),()=>_0x3a87a1['segment']['listParents'](),{'verbose':_0x4641e4[_0x22067d(0x160)]}),_0x3972d8=_0x5b1c52[_0x22067d(0x16d)],_0x3e59a7=_0x53f5e3['replace'](/[.+^${}()|[\]\\]/g,_0x22067d(0x161))[_0x22067d(0x158)](/\*/g,'.*')['replace'](/\?/g,'.'),_0x125ab6=new RegExp('^'+_0x3e59a7+'$','i'),_0x4ace1d=_0x3972d8[_0x22067d(0x154)](_0x364745=>_0x125ab6[_0x22067d(0x135)](_0x364745['attributes'][_0x22067d(0x15e)]));console[_0x22067d(0x13e)](_0x22067d(0x168)+_0x4ace1d[_0x22067d(0x159)]+'\x20parent\x20segment'+(_0x4ace1d[_0x22067d(0x159)]!==0x1?'s':'')+_0x22067d(0x15b)+_0x53f5e3+'\x27');if(_0x4641e4[_0x22067d(0x143)]==='json'||_0x4641e4[_0x22067d(0x143)]===_0x22067d(0x139))await handleSDKOutput(_0x4ace1d,_0x4641e4);else{if(_0x4ace1d[_0x22067d(0x159)]===0x0)console[_0x22067d(0x15c)](_0x22067d(0x15a)+_0x53f5e3);else{console[_0x22067d(0x15c)](_0x22067d(0x169));for(const _0x30403e of _0x4ace1d){const _0x245571=_0x30403e[_0x22067d(0x142)][_0x22067d(0x141)]?a35_0x517637[_0x22067d(0x16e)]('\x20('+formatRows(_0x30403e['attributes'][_0x22067d(0x141)])+')'):'';console[_0x22067d(0x15c)](_0x22067d(0x155)+_0x30403e[_0x22067d(0x142)][_0x22067d(0x15e)]+_0x245571);}}}return 0x0;}async[a35_0x2cd70d(0x150)](_0xedbe8){const _0x33ac11=a35_0x2cd70d,{options:_0x5f37c5,tdx:_0x44ca54}=_0xedbe8,_0x31cfdf=await withSpinner(_0x33ac11(0x13f),()=>_0x44ca54['segment'][_0x33ac11(0x150)](),{'verbose':_0x5f37c5[_0x33ac11(0x160)]}),_0x28c788=_0x31cfdf[_0x33ac11(0x16d)];console['error'](_0x33ac11(0x168)+_0x28c788['length']+_0x33ac11(0x175)+(_0x28c788['length']!==0x1?'s':''));if(_0x5f37c5[_0x33ac11(0x143)]===_0x33ac11(0x15d)||_0x5f37c5['format']===_0x33ac11(0x139))await handleSDKOutput(_0x28c788,_0x5f37c5);else{console[_0x33ac11(0x15c)](_0x33ac11(0x169));for(const _0x43e477 of _0x28c788){const _0x895312=_0x43e477[_0x33ac11(0x142)][_0x33ac11(0x141)]?a35_0x517637['dim']('\x20('+formatRows(_0x43e477[_0x33ac11(0x142)][_0x33ac11(0x141)])+')'):'';console[_0x33ac11(0x15c)](_0x33ac11(0x155)+_0x43e477[_0x33ac11(0x142)][_0x33ac11(0x15e)]+_0x895312);}}return 0x0;}async[a35_0x2cd70d(0x14c)](_0xde92e1,_0x3a434c){const _0x26d10c=a35_0x2cd70d,{options:_0x40c8fc,tdx:_0x5de674}=_0xde92e1,_0x36c382=await withSpinner(_0x26d10c(0x137)+_0x3a434c+'\x27...',()=>_0x5de674[_0x26d10c(0x144)][_0x26d10c(0x14f)](_0x3a434c),{'verbose':_0x40c8fc[_0x26d10c(0x160)]}),_0x1cfb36=_0x36c382[_0x26d10c(0x16d)];_0x40c8fc[_0x26d10c(0x160)]&&(console[_0x26d10c(0x13e)](_0x26d10c(0x172)+_0x1cfb36['parentId']),_0x1cfb36[_0x26d10c(0x152)]&&console[_0x26d10c(0x13e)](_0x26d10c(0x164)+_0x1cfb36[_0x26d10c(0x152)]));const _0xa17f51=await withSpinner(_0x26d10c(0x134),()=>_0x5de674[_0x26d10c(0x144)][_0x26d10c(0x14c)](_0x1cfb36[_0x26d10c(0x14e)],_0x1cfb36['folderId']),{'verbose':_0x40c8fc[_0x26d10c(0x160)]}),{folders:_0x2ff21b,segments:_0x2014a2}=_0xa17f51['data'],_0x424232=_0x2ff21b['length']+_0x2014a2[_0x26d10c(0x159)];console[_0x26d10c(0x13e)](_0x26d10c(0x168)+_0x2ff21b[_0x26d10c(0x159)]+'\x20folder'+(_0x2ff21b['length']!==0x1?'s':'')+'\x20and\x20'+_0x2014a2[_0x26d10c(0x159)]+_0x26d10c(0x132)+(_0x2014a2[_0x26d10c(0x159)]!==0x1?'s':''));if(_0x40c8fc['format']===_0x26d10c(0x15d)||_0x40c8fc[_0x26d10c(0x143)]===_0x26d10c(0x139)){const _0x58fa95=[..._0x2ff21b[_0x26d10c(0x165)](_0x302f2a=>({..._0x302f2a,'type':_0x26d10c(0x16a)})),..._0x2014a2['map'](_0x52e2bb=>({..._0x52e2bb,'type':_0x26d10c(0x144)}))]['sort']((_0x5c3322,_0x106666)=>_0x5c3322[_0x26d10c(0x15e)][_0x26d10c(0x149)](_0x106666[_0x26d10c(0x15e)]));await handleSDKOutput(_0x58fa95,_0x40c8fc);}else{if(_0x424232===0x0)console['log'](a35_0x517637[_0x26d10c(0x16e)]('[/'+_0x3a434c+']')),console[_0x26d10c(0x15c)](_0x26d10c(0x14a));else{console['log'](a35_0x517637['dim']('[/'+_0x3a434c+']'));const _0x1069b8=formatFlatList(_0x2ff21b,_0x2014a2,{'showMetadata':!![]});console[_0x26d10c(0x15c)](_0x1069b8);}}return 0x0;}async['listRecursive'](_0x55f412,_0x2f7913){const _0x446b8a=a35_0x2cd70d,{options:_0x588eec,tdx:_0x3f6a9e}=_0x55f412,_0x241967=await withSpinner(_0x446b8a(0x137)+_0x2f7913+'\x27...',()=>_0x3f6a9e[_0x446b8a(0x144)][_0x446b8a(0x14f)](_0x2f7913),{'verbose':_0x588eec[_0x446b8a(0x160)]}),_0x4b203d=_0x241967['data'];_0x588eec[_0x446b8a(0x160)]&&(console['error'](_0x446b8a(0x172)+_0x4b203d[_0x446b8a(0x14e)]),_0x4b203d[_0x446b8a(0x152)]&&console[_0x446b8a(0x13e)](_0x446b8a(0x164)+_0x4b203d[_0x446b8a(0x152)]));const _0x34babb=_0x588eec['maxDepth']||0xa,_0x5e1587=await withSpinner(_0x446b8a(0x153),()=>_0x3f6a9e[_0x446b8a(0x144)][_0x446b8a(0x146)](_0x4b203d[_0x446b8a(0x14e)],_0x4b203d[_0x446b8a(0x152)],0x0,_0x34babb),{'verbose':_0x588eec[_0x446b8a(0x160)]}),_0x4a6491=_0x5e1587['data'];console[_0x446b8a(0x13e)]('✔\x20Built\x20tree\x20with\x20'+_0x4a6491[_0x446b8a(0x159)]+_0x446b8a(0x157));if(_0x588eec[_0x446b8a(0x143)]===_0x446b8a(0x15d)||_0x588eec[_0x446b8a(0x143)]===_0x446b8a(0x139))await handleSDKOutput(_0x4a6491,_0x588eec);else{console[_0x446b8a(0x15c)](a35_0x517637['dim']('[/'+_0x2f7913+']'));const _0x5158b2=formatTree(_0x4a6491,{'showMetadata':!![]});console['log'](_0x5158b2);}return 0x0;}}
@@ -1 +1 @@
1
- const a34_0x4ac922=a34_0x2bb3;(function(_0x2a6661,_0x142b97){const _0x300fac=a34_0x2bb3,_0x135700=_0x2a6661();while(!![]){try{const _0x54b5e6=-parseInt(_0x300fac(0x173))/0x1*(parseInt(_0x300fac(0x14c))/0x2)+-parseInt(_0x300fac(0x148))/0x3+-parseInt(_0x300fac(0x172))/0x4+parseInt(_0x300fac(0x149))/0x5*(-parseInt(_0x300fac(0x15a))/0x6)+-parseInt(_0x300fac(0x15f))/0x7*(-parseInt(_0x300fac(0x155))/0x8)+parseInt(_0x300fac(0x14e))/0x9+-parseInt(_0x300fac(0x158))/0xa*(-parseInt(_0x300fac(0x15d))/0xb);if(_0x54b5e6===_0x142b97)break;else _0x135700['push'](_0x135700['shift']());}catch(_0x348606){_0x135700['push'](_0x135700['shift']());}}}(a34_0x2015,0x351af));function a34_0x2015(){const _0x1ca1f9=['...','223298EIaUbo','Show\x20table\x20contents','1258812BJQzCr','show','description','Catalog:\x20','✔\x20Query\x20successful\x20-\x200\x20rows\x20returned','\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--database\x20<database>','cause','32ZMzxTH','validate','Too\x20many\x20arguments\x0aUsage:\x20tdx\x20show\x20<database.table>\x0a\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--database\x20<database>\x0a\x0aRun\x20\x27tdx\x20show\x20--help\x27\x20for\x20more\x20options','87490ilioCn','Error:\x20','2009634pzUfbB','Usage:\x20tdx\x20show\x20<database.table>\x0a\x20\x20\x20or:\x20tdx\x20show\x20<catalog.database.table>\x0a\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--database\x20<database>\x0a\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--in\x20<database>\x0a\x0aRun\x20\x27tdx\x20show\x20--help\x27\x20for\x20more\x20options','Site:\x20','825xiyXFC','error','291872LoDTsy','message','Table:\x20','length','\x20\x20\x20or:\x20tdx\x20show\x20<catalog.database.table>','database','query','verbose','site','name','\x20\x20Cause:\x20','showTable','args','table','Database:\x20','data','\x20row','limit','Usage:\x20tdx\x20show\x20<database.table>','337580bNGmIN','1GDkSsa','642975deEVfd','5zRkxby','catalog'];a34_0x2015=function(){return _0x1ca1f9;};return a34_0x2015();}function a34_0x2bb3(_0x55e1d7,_0x30b495){const _0x20154f=a34_0x2015();return a34_0x2bb3=function(_0x2bb33e,_0x3d63c4){_0x2bb33e=_0x2bb33e-0x148;let _0x2ea764=_0x20154f[_0x2bb33e];return _0x2ea764;},a34_0x2bb3(_0x55e1d7,_0x30b495);}import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleSDKOutput}from'../utils/command-output.js';import{parseTableReference,validateTableDescribeReference}from'../utils/table-ref-parser.js';import{withSpinner}from'../utils/spinner.js';import{DEFAULT_DISPLAY_LIMIT,resolveLimit}from'../utils/constants.js';export class ShowCommand extends BaseCommand{[a34_0x4ac922(0x168)]=a34_0x4ac922(0x14f);[a34_0x4ac922(0x150)]=a34_0x4ac922(0x14d);async['execute'](_0x4e3cff){const _0x2e1ce5=a34_0x4ac922;return this[_0x2e1ce5(0x16a)](_0x4e3cff);}async[a34_0x4ac922(0x16a)](_0x11cbac){const _0x53cefc=a34_0x4ac922,{options:_0xf3ef4e,args:_0x2c408e,tdx:_0x32ba68}=_0x11cbac;let _0x2c8cbb;try{_0x2c8cbb=parseTableReference(_0x2c408e[0x0]);const _0xd6d27b=_0xf3ef4e[_0x53cefc(0x164)];!_0x2c8cbb[_0x53cefc(0x164)]&&_0xd6d27b&&(_0x2c8cbb['database']=_0xd6d27b);const _0x3f7d39=validateTableDescribeReference(_0x2c8cbb);if(_0x3f7d39)return console[_0x53cefc(0x15e)](_0x53cefc(0x159)+_0x3f7d39),console[_0x53cefc(0x15e)](_0x53cefc(0x171)),console[_0x53cefc(0x15e)](_0x53cefc(0x163)),console[_0x53cefc(0x15e)](_0x53cefc(0x153)),0x1;}catch(_0x2c9a74){return console['error'](_0x53cefc(0x159)+_0x2c9a74['message']),console[_0x53cefc(0x15e)]('Usage:\x20tdx\x20show\x20<database.table>'),console[_0x53cefc(0x15e)](_0x53cefc(0x163)),console['error'](_0x53cefc(0x153)),0x1;}const _0x4d61bc=_0x2c8cbb[_0x53cefc(0x14a)],_0x5ef4bb=_0x2c8cbb[_0x53cefc(0x164)],_0x2b0579=_0x2c8cbb[_0x53cefc(0x16c)],_0x2b7087=resolveLimit(_0xf3ef4e[_0x53cefc(0x170)],DEFAULT_DISPLAY_LIMIT);try{_0xf3ef4e[_0x53cefc(0x166)]&&(console[_0x53cefc(0x15e)](_0x53cefc(0x15c)+_0xf3ef4e[_0x53cefc(0x167)]),_0x4d61bc&&console[_0x53cefc(0x15e)](_0x53cefc(0x151)+_0x4d61bc),console[_0x53cefc(0x15e)](_0x53cefc(0x16d)+_0x5ef4bb),console[_0x53cefc(0x15e)](_0x53cefc(0x161)+_0x2b0579),console[_0x53cefc(0x15e)]('Limit:\x20'+_0x2b7087));const _0x151c7f=_0x4d61bc?_0x4d61bc+'.'+_0x5ef4bb+'.'+_0x2b0579:_0x5ef4bb+'.'+_0x2b0579,_0x3df78a=await withSpinner('Querying\x20'+_0x151c7f+_0x53cefc(0x14b),()=>_0x32ba68[_0x53cefc(0x165)][_0x53cefc(0x16a)](_0x5ef4bb,_0x2b0579,_0x2b7087,_0x4d61bc),{'verbose':_0xf3ef4e[_0x53cefc(0x166)]}),_0x3952b1=_0x3df78a[_0x53cefc(0x16e)],_0xcefbc9=_0x3952b1[_0x53cefc(0x16e)];return _0xcefbc9['length']===0x0?console[_0x53cefc(0x15e)](_0x53cefc(0x152)):console[_0x53cefc(0x15e)]('✔\x20Retrieved\x20'+_0xcefbc9[_0x53cefc(0x162)]+_0x53cefc(0x16f)+(_0xcefbc9['length']!==0x1?'s':'')+'\x20from\x20'+_0x151c7f),await handleSDKOutput(_0xcefbc9,_0xf3ef4e),0x0;}catch(_0x4f8913){if(_0x4f8913 instanceof SDKError)return console[_0x53cefc(0x15e)]('Error:\x20'+_0x4f8913[_0x53cefc(0x160)]),_0x4f8913['cause']&&console[_0x53cefc(0x15e)](_0x53cefc(0x169)+_0x4f8913[_0x53cefc(0x154)]),0x1;throw _0x4f8913;}}[a34_0x4ac922(0x156)](_0x57f1dc){const _0x3ad9ca=a34_0x4ac922;if(_0x57f1dc[_0x3ad9ca(0x16b)][_0x3ad9ca(0x162)]===0x0)return _0x3ad9ca(0x15b);if(_0x57f1dc['args']['length']>0x1)return _0x3ad9ca(0x157);return undefined;}}
1
+ function a36_0x4a36(){const _0x3dba42=['showTable','description','execute','message','error','database','\x20\x20Cause:\x20','Site:\x20','3064965tqeutK','limit','data','Error:\x20','Table:\x20','args','name','2414154dxeXYP','✔\x20Retrieved\x20','1053634QmqUfb','length','7ulpbbJ','...','2329268FwFvBa','\x20\x20\x20or:\x20tdx\x20show\x20<catalog.database.table>','1739600lirvbO','validate','5eiJZGx','Usage:\x20tdx\x20show\x20<database.table>','Database:\x20','Limit:\x20','Catalog:\x20','show','site','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','cause','catalog','verbose','14540418nhxULp','✔\x20Query\x20successful\x20-\x200\x20rows\x20returned','7011432ZeiNnP','\x20row'];a36_0x4a36=function(){return _0x3dba42;};return a36_0x4a36();}const a36_0x2a7532=a36_0x2860;(function(_0x298647,_0xb35a72){const _0x2324fb=a36_0x2860,_0x3a789d=_0x298647();while(!![]){try{const _0x521fce=-parseInt(_0x2324fb(0x17d))/0x1+parseInt(_0x2324fb(0x183))/0x2+parseInt(_0x2324fb(0x174))/0x3+parseInt(_0x2324fb(0x181))/0x4*(-parseInt(_0x2324fb(0x15d))/0x5)+-parseInt(_0x2324fb(0x17b))/0x6*(parseInt(_0x2324fb(0x17f))/0x7)+-parseInt(_0x2324fb(0x16a))/0x8+parseInt(_0x2324fb(0x168))/0x9;if(_0x521fce===_0xb35a72)break;else _0x3a789d['push'](_0x3a789d['shift']());}catch(_0x8e3d93){_0x3a789d['push'](_0x3a789d['shift']());}}}(a36_0x4a36,0x909be));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleSDKOutput}from'../utils/command-output.js';function a36_0x2860(_0x22d2e7,_0x9ca8ca){const _0x4a36ec=a36_0x4a36();return a36_0x2860=function(_0x28601f,_0x4528cf){_0x28601f=_0x28601f-0x15c;let _0x245cde=_0x4a36ec[_0x28601f];return _0x245cde;},a36_0x2860(_0x22d2e7,_0x9ca8ca);}import{parseTableReference,validateTableDescribeReference}from'../utils/table-ref-parser.js';import{withSpinner}from'../utils/spinner.js';import{DEFAULT_DISPLAY_LIMIT,resolveLimit}from'../utils/constants.js';export class ShowCommand extends BaseCommand{[a36_0x2a7532(0x17a)]=a36_0x2a7532(0x162);[a36_0x2a7532(0x16d)]='Show\x20table\x20contents';async[a36_0x2a7532(0x16e)](_0x4c5b0e){return this['showTable'](_0x4c5b0e);}async[a36_0x2a7532(0x16c)](_0x42844b){const _0xf9103b=a36_0x2a7532,{options:_0x5ace61,args:_0x4fa4eb,tdx:_0x2c3e3c}=_0x42844b;let _0x44b6c4;try{_0x44b6c4=parseTableReference(_0x4fa4eb[0x0]);const _0x552724=_0x5ace61[_0xf9103b(0x171)];!_0x44b6c4[_0xf9103b(0x171)]&&_0x552724&&(_0x44b6c4[_0xf9103b(0x171)]=_0x552724);const _0x47f365=validateTableDescribeReference(_0x44b6c4);if(_0x47f365)return console[_0xf9103b(0x170)](_0xf9103b(0x177)+_0x47f365),console[_0xf9103b(0x170)]('Usage:\x20tdx\x20show\x20<database.table>'),console[_0xf9103b(0x170)]('\x20\x20\x20or:\x20tdx\x20show\x20<catalog.database.table>'),console['error']('\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--database\x20<database>'),0x1;}catch(_0x1ff059){return console[_0xf9103b(0x170)](_0xf9103b(0x177)+_0x1ff059['message']),console['error'](_0xf9103b(0x15e)),console[_0xf9103b(0x170)](_0xf9103b(0x182)),console[_0xf9103b(0x170)]('\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--database\x20<database>'),0x1;}const _0x295268=_0x44b6c4[_0xf9103b(0x166)],_0x42323b=_0x44b6c4[_0xf9103b(0x171)],_0x56bcf1=_0x44b6c4['table'],_0x11a30b=resolveLimit(_0x5ace61[_0xf9103b(0x175)],DEFAULT_DISPLAY_LIMIT);try{_0x5ace61[_0xf9103b(0x167)]&&(console['error'](_0xf9103b(0x173)+_0x5ace61[_0xf9103b(0x163)]),_0x295268&&console[_0xf9103b(0x170)](_0xf9103b(0x161)+_0x295268),console[_0xf9103b(0x170)](_0xf9103b(0x15f)+_0x42323b),console['error'](_0xf9103b(0x178)+_0x56bcf1),console[_0xf9103b(0x170)](_0xf9103b(0x160)+_0x11a30b));const _0x2faa26=_0x295268?_0x295268+'.'+_0x42323b+'.'+_0x56bcf1:_0x42323b+'.'+_0x56bcf1,_0x362534=await withSpinner('Querying\x20'+_0x2faa26+_0xf9103b(0x180),()=>_0x2c3e3c['query']['showTable'](_0x42323b,_0x56bcf1,_0x11a30b,_0x295268),{'verbose':_0x5ace61[_0xf9103b(0x167)]}),_0x457b58=_0x362534[_0xf9103b(0x176)],_0x4b178a=_0x457b58[_0xf9103b(0x176)];return _0x4b178a[_0xf9103b(0x17e)]===0x0?console[_0xf9103b(0x170)](_0xf9103b(0x169)):console[_0xf9103b(0x170)](_0xf9103b(0x17c)+_0x4b178a[_0xf9103b(0x17e)]+_0xf9103b(0x16b)+(_0x4b178a[_0xf9103b(0x17e)]!==0x1?'s':'')+'\x20from\x20'+_0x2faa26),await handleSDKOutput(_0x4b178a,_0x5ace61),0x0;}catch(_0x44e18f){if(_0x44e18f instanceof SDKError)return console['error']('Error:\x20'+_0x44e18f[_0xf9103b(0x16f)]),_0x44e18f[_0xf9103b(0x165)]&&console[_0xf9103b(0x170)](_0xf9103b(0x172)+_0x44e18f[_0xf9103b(0x165)]),0x1;throw _0x44e18f;}}[a36_0x2a7532(0x15c)](_0x458850){const _0x1d5383=a36_0x2a7532;if(_0x458850['args'][_0x1d5383(0x17e)]===0x0)return _0x1d5383(0x164);if(_0x458850[_0x1d5383(0x179)][_0x1d5383(0x17e)]>0x1)return'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';return undefined;}}
@@ -1 +1 @@
1
- function a35_0x29ec(){const _0x289ecc=['\x20table','219200UzBkHB','length','\x27\x20may\x20not\x20exist\x20or\x20contains\x20no\x20tables','519834WxzoLB','Error:\x20','266106ecyvcD','196889vvNcCs','\x20\x20Use:\x20tdx\x20tables\x20\x22','5Antwdq','tables','message','database','Database\x20pattern:\x20','Note:\x20\x27','.*\x22','includes','\x20\x20Or:\x20\x20tdx\x20tables\x20--database\x20','Listing\x20tables...','Site:\x20','\x20\x20Or:\x20\x20tdx\x20tables\x20--in\x20','\x20\x20Cause:\x20','\x27\x20without\x20wildcards\x20would\x20search\x20for\x20tables\x20named\x20\x27','cause','39621cdNDCR','\x20\x20tdx\x20tables\x20--in\x20mydb\x20\x20\x20\x20\x20\x20\x20->\x20all\x20tables\x20from\x20mydb','description','334990OTduDj','error','validate','limit','60HZpWub','verbose','Error:\x20Too\x20many\x20arguments.\x20Use\x20single\x20argument:','site','27IPOdgn','✖\x20No\x20tables\x20found','\x20\x20tdx\x20tables\x20\x22mydb.*\x22\x20\x20\x20\x20\x20\x20\x20\x20->\x20all\x20tables\x20from\x20mydb','16VGdvxm','207645XUlHes','Table\x20pattern:\x20','table','\x27\x20across\x20all\x20databases.','\x20\x20tdx\x20tables\x20\x22*.user*\x22\x20\x20\x20\x20\x20\x20\x20->\x20tables\x20matching\x20user*\x20across\x20databases','\x27\x20is\x20ambiguous.'];a35_0x29ec=function(){return _0x289ecc;};return a35_0x29ec();}function a35_0x3ea9(_0x1028b6,_0x48c5f2){const _0x29ec57=a35_0x29ec();return a35_0x3ea9=function(_0x3ea9b0,_0x51fd66){_0x3ea9b0=_0x3ea9b0-0x10d;let _0x5e804b=_0x29ec57[_0x3ea9b0];return _0x5e804b;},a35_0x3ea9(_0x1028b6,_0x48c5f2);}const a35_0x4ce7f7=a35_0x3ea9;(function(_0x5a9866,_0x3496cd){const _0x2e97db=a35_0x3ea9,_0xe55174=_0x5a9866();while(!![]){try{const _0x2c3fc0=parseInt(_0x2e97db(0x10e))/0x1+parseInt(_0x2e97db(0x115))/0x2+parseInt(_0x2e97db(0x12c))/0x3*(-parseInt(_0x2e97db(0x133))/0x4)+-parseInt(_0x2e97db(0x11d))/0x5*(parseInt(_0x2e97db(0x11a))/0x6)+parseInt(_0x2e97db(0x118))/0x7*(parseInt(_0x2e97db(0x10d))/0x8)+-parseInt(_0x2e97db(0x137))/0x9*(parseInt(_0x2e97db(0x12f))/0xa)+-parseInt(_0x2e97db(0x11b))/0xb;if(_0x2c3fc0===_0x3496cd)break;else _0xe55174['push'](_0xe55174['shift']());}catch(_0x1b5831){_0xe55174['push'](_0xe55174['shift']());}}}(a35_0x29ec,0x199d5));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleSDKOutput}from'../utils/command-output.js';import{parseTableReference}from'../utils/table-ref-parser.js';import{DEFAULT_LISTING_LIMIT,resolveLimit}from'../utils/constants.js';import{withSpinner}from'../utils/spinner.js';export class TablesCommand extends BaseCommand{['name']=a35_0x4ce7f7(0x11e);[a35_0x4ce7f7(0x12e)]='List\x20tables\x20in\x20a\x20database';async['execute'](_0x34ef31){const _0x1e45ba=a35_0x4ce7f7,{options:_0x2378bf,args:_0x5c7137,tdx:_0x112bc5}=_0x34ef31;let _0x53f358;if(_0x5c7137[_0x1e45ba(0x116)]===0x0)_0x53f358={'database':undefined,'table':undefined,'original':''};else{if(_0x5c7137[_0x1e45ba(0x116)]===0x1)try{_0x53f358=parseTableReference(_0x5c7137[0x0]);if(_0x53f358[_0x1e45ba(0x110)]&&!_0x53f358[_0x1e45ba(0x120)]&&!_0x53f358[_0x1e45ba(0x110)][_0x1e45ba(0x124)]('*')&&!_0x53f358[_0x1e45ba(0x110)][_0x1e45ba(0x124)]('?'))return console['error']('Error:\x20Pattern\x20\x27'+_0x5c7137[0x0]+_0x1e45ba(0x113)),console[_0x1e45ba(0x130)]('Did\x20you\x20mean\x20to\x20list\x20all\x20tables\x20from\x20database\x20\x27'+_0x53f358[_0x1e45ba(0x110)]+'\x27?'),console[_0x1e45ba(0x130)](_0x1e45ba(0x11c)+_0x53f358['table']+_0x1e45ba(0x123)),console[_0x1e45ba(0x130)](_0x1e45ba(0x128)+_0x53f358[_0x1e45ba(0x110)]),console[_0x1e45ba(0x130)](_0x1e45ba(0x125)+_0x53f358[_0x1e45ba(0x110)]),console[_0x1e45ba(0x130)](''),console[_0x1e45ba(0x130)](_0x1e45ba(0x122)+_0x5c7137[0x0]+_0x1e45ba(0x12a)+_0x53f358['table']+_0x1e45ba(0x111)),0x1;}catch(_0x4de77f){return console[_0x1e45ba(0x130)]('Error:\x20'+_0x4de77f[_0x1e45ba(0x11f)]),0x1;}else return console[_0x1e45ba(0x130)](_0x1e45ba(0x135)),console['error']('\x20\x20tdx\x20tables\x20users\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20->\x20table\x20\x22users\x22\x20across\x20all\x20databases'),console['error'](_0x1e45ba(0x139)),console[_0x1e45ba(0x130)]('\x20\x20tdx\x20tables\x20\x22mydb.users\x22\x20\x20\x20\x20->\x20table\x20\x22users\x22\x20in\x20database\x20mydb'),console[_0x1e45ba(0x130)](_0x1e45ba(0x112)),console[_0x1e45ba(0x130)]('Or\x20use\x20--in\x20flag:'),console['error'](_0x1e45ba(0x12d)),0x1;}const _0x3e5524=_0x2378bf[_0x1e45ba(0x120)];!_0x53f358['database']&&_0x3e5524&&(_0x53f358[_0x1e45ba(0x120)]=_0x3e5524);try{const _0x3e9895=_0x23f34b=>_0x23f34b&&(_0x23f34b[_0x1e45ba(0x124)]('*')||_0x23f34b['includes']('?')),_0x5753f8=_0x3e9895(_0x53f358[_0x1e45ba(0x120)]);_0x2378bf['verbose']&&(console[_0x1e45ba(0x130)](_0x1e45ba(0x127)+_0x2378bf[_0x1e45ba(0x136)]),_0x53f358[_0x1e45ba(0x120)]?_0x5753f8?console[_0x1e45ba(0x130)](_0x1e45ba(0x121)+_0x53f358[_0x1e45ba(0x120)]):console[_0x1e45ba(0x130)]('Database:\x20'+_0x53f358[_0x1e45ba(0x120)]):console[_0x1e45ba(0x130)]('Database:\x20all'),_0x53f358[_0x1e45ba(0x110)]&&console[_0x1e45ba(0x130)](_0x1e45ba(0x10f)+_0x53f358[_0x1e45ba(0x110)]));const _0x50fdda=_0x53f358[_0x1e45ba(0x120)]&&!_0x5753f8?_0x53f358['database']:undefined,_0x525317=_0x5753f8?_0x53f358[_0x1e45ba(0x120)]:undefined,_0xe8fd33=_0x53f358[_0x1e45ba(0x110)],_0x125662=resolveLimit(_0x2378bf[_0x1e45ba(0x132)],DEFAULT_LISTING_LIMIT),_0x396153=await withSpinner(_0x1e45ba(0x126),()=>_0x112bc5['query']['listTables'](_0x50fdda,_0xe8fd33,_0x525317,_0x125662),{'verbose':_0x2378bf[_0x1e45ba(0x134)]}),_0xf86a08=_0x396153['data'];if(_0xf86a08[_0x1e45ba(0x116)]===0x0&&_0x53f358['database']&&!_0x5753f8)return console[_0x1e45ba(0x130)](_0x1e45ba(0x138)),console[_0x1e45ba(0x130)]('Database\x20\x27'+_0x53f358[_0x1e45ba(0x120)]+_0x1e45ba(0x117)),0x1;return console['error']('✔\x20Found\x20'+_0xf86a08['length']+_0x1e45ba(0x114)+(_0xf86a08[_0x1e45ba(0x116)]!==0x1?'s':'')),await handleSDKOutput(_0xf86a08,{..._0x2378bf,'limit':_0x125662}),0x0;}catch(_0x15f4da){if(_0x15f4da instanceof SDKError)return console[_0x1e45ba(0x130)](_0x1e45ba(0x119)+_0x15f4da['message']),_0x15f4da[_0x1e45ba(0x12b)]&&console[_0x1e45ba(0x130)](_0x1e45ba(0x129)+_0x15f4da[_0x1e45ba(0x12b)]),0x1;throw _0x15f4da;}}[a35_0x4ce7f7(0x131)](_0x2aa291){return undefined;}}
1
+ const a37_0x3e6f87=a37_0x27c7;(function(_0x1d7b2f,_0x4720e5){const _0x51fe2b=a37_0x27c7,_0x618738=_0x1d7b2f();while(!![]){try{const _0x41ad1e=parseInt(_0x51fe2b(0x1aa))/0x1+parseInt(_0x51fe2b(0x1a2))/0x2+-parseInt(_0x51fe2b(0x1ce))/0x3+-parseInt(_0x51fe2b(0x1a1))/0x4*(-parseInt(_0x51fe2b(0x1a6))/0x5)+parseInt(_0x51fe2b(0x1b8))/0x6*(parseInt(_0x51fe2b(0x1b0))/0x7)+parseInt(_0x51fe2b(0x1ca))/0x8+-parseInt(_0x51fe2b(0x1bb))/0x9;if(_0x41ad1e===_0x4720e5)break;else _0x618738['push'](_0x618738['shift']());}catch(_0x5f4444){_0x618738['push'](_0x618738['shift']());}}}(a37_0x1ba3,0xa2fac));function a37_0x27c7(_0x354c23,_0x4f09cf){const _0x1ba373=a37_0x1ba3();return a37_0x27c7=function(_0x27c743,_0x599761){_0x27c743=_0x27c743-0x19f;let _0x3984d0=_0x1ba373[_0x27c743];return _0x3984d0;},a37_0x27c7(_0x354c23,_0x4f09cf);}import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleSDKOutput}from'../utils/command-output.js';import{parseTableReference}from'../utils/table-ref-parser.js';import{DEFAULT_LISTING_LIMIT,resolveLimit}from'../utils/constants.js';import{withSpinner}from'../utils/spinner.js';export class TablesCommand extends BaseCommand{[a37_0x3e6f87(0x1af)]='tables';[a37_0x3e6f87(0x1be)]='List\x20tables\x20in\x20a\x20database';async[a37_0x3e6f87(0x1b5)](_0x5d77a6){const _0x446412=a37_0x3e6f87,{options:_0x1f06e9,args:_0x141231,tdx:_0x573fa3}=_0x5d77a6;let _0x51d1a2;if(_0x141231[_0x446412(0x1ac)]===0x0)_0x51d1a2={'database':undefined,'table':undefined,'original':''};else{if(_0x141231[_0x446412(0x1ac)]===0x1)try{_0x51d1a2=parseTableReference(_0x141231[0x0]);if(_0x51d1a2[_0x446412(0x1b6)]&&!_0x51d1a2[_0x446412(0x1b3)]&&!_0x51d1a2[_0x446412(0x1b6)][_0x446412(0x1c4)]('*')&&!_0x51d1a2['table'][_0x446412(0x1c4)]('?'))return console[_0x446412(0x1b7)](_0x446412(0x1a5)+_0x141231[0x0]+_0x446412(0x1c9)),console[_0x446412(0x1b7)](_0x446412(0x1d0)+_0x51d1a2[_0x446412(0x1b6)]+'\x27?'),console['error'](_0x446412(0x1bc)+_0x51d1a2[_0x446412(0x1b6)]+_0x446412(0x1a9)),console['error'](_0x446412(0x1c3)+_0x51d1a2[_0x446412(0x1b6)]),console[_0x446412(0x1b7)](_0x446412(0x1a3)+_0x51d1a2[_0x446412(0x1b6)]),console[_0x446412(0x1b7)](''),console[_0x446412(0x1b7)]('Note:\x20\x27'+_0x141231[0x0]+_0x446412(0x19f)+_0x51d1a2[_0x446412(0x1b6)]+'\x27\x20across\x20all\x20databases.'),0x1;}catch(_0x1167d1){return console[_0x446412(0x1b7)](_0x446412(0x1ae)+_0x1167d1['message']),0x1;}else return console[_0x446412(0x1b7)](_0x446412(0x1cd)),console[_0x446412(0x1b7)](_0x446412(0x1a4)),console['error']('\x20\x20tdx\x20tables\x20\x22mydb.*\x22\x20\x20\x20\x20\x20\x20\x20\x20->\x20all\x20tables\x20from\x20mydb'),console[_0x446412(0x1b7)](_0x446412(0x1ad)),console['error'](_0x446412(0x1c5)),console[_0x446412(0x1b7)](_0x446412(0x1c7)),console['error'](_0x446412(0x1ba)),0x1;}const _0x2b34c6=_0x1f06e9['database'];!_0x51d1a2[_0x446412(0x1b3)]&&_0x2b34c6&&(_0x51d1a2['database']=_0x2b34c6);try{const _0xa46414=_0x4661b9=>_0x4661b9&&(_0x4661b9[_0x446412(0x1c4)]('*')||_0x4661b9['includes']('?')),_0x3b7d6b=_0xa46414(_0x51d1a2[_0x446412(0x1b3)]);_0x1f06e9['verbose']&&(console['error'](_0x446412(0x1cb)+_0x1f06e9[_0x446412(0x1a8)]),_0x51d1a2[_0x446412(0x1b3)]?_0x3b7d6b?console[_0x446412(0x1b7)](_0x446412(0x1cc)+_0x51d1a2[_0x446412(0x1b3)]):console[_0x446412(0x1b7)](_0x446412(0x1c0)+_0x51d1a2[_0x446412(0x1b3)]):console['error'](_0x446412(0x1bf)),_0x51d1a2['table']&&console[_0x446412(0x1b7)](_0x446412(0x1c2)+_0x51d1a2[_0x446412(0x1b6)]));const _0x2f09b7=_0x51d1a2[_0x446412(0x1b3)]&&!_0x3b7d6b?_0x51d1a2[_0x446412(0x1b3)]:undefined,_0x5f3d29=_0x3b7d6b?_0x51d1a2['database']:undefined,_0x3e9ce1=_0x51d1a2['table'],_0x5a4d33=resolveLimit(_0x1f06e9[_0x446412(0x1c6)],DEFAULT_LISTING_LIMIT),_0x172a44=await withSpinner(_0x446412(0x1d2),()=>_0x573fa3[_0x446412(0x1b2)][_0x446412(0x1a0)](_0x2f09b7,_0x3e9ce1,_0x5f3d29,_0x5a4d33),{'verbose':_0x1f06e9[_0x446412(0x1b1)]}),_0xbd2da7=_0x172a44[_0x446412(0x1b4)];if(_0xbd2da7[_0x446412(0x1ac)]===0x0&&_0x51d1a2[_0x446412(0x1b3)]&&!_0x3b7d6b)return console[_0x446412(0x1b7)](_0x446412(0x1ab)),console[_0x446412(0x1b7)](_0x446412(0x1c1)+_0x51d1a2['database']+_0x446412(0x1a7)),0x1;return console[_0x446412(0x1b7)](_0x446412(0x1cf)+_0xbd2da7[_0x446412(0x1ac)]+_0x446412(0x1d1)+(_0xbd2da7[_0x446412(0x1ac)]!==0x1?'s':'')),await handleSDKOutput(_0xbd2da7,{..._0x1f06e9,'limit':_0x5a4d33}),0x0;}catch(_0x5f2f3d){if(_0x5f2f3d instanceof SDKError)return console['error'](_0x446412(0x1ae)+_0x5f2f3d['message']),_0x5f2f3d['cause']&&console[_0x446412(0x1b7)](_0x446412(0x1bd)+_0x5f2f3d[_0x446412(0x1b9)]),0x1;throw _0x5f2f3d;}}[a37_0x3e6f87(0x1c8)](_0x3bd763){return undefined;}}function a37_0x1ba3(){const _0x14fe7c=['Error:\x20','name','70fsGxOk','verbose','query','database','data','execute','table','error','521970AJGOIo','cause','\x20\x20tdx\x20tables\x20--in\x20mydb\x20\x20\x20\x20\x20\x20\x20->\x20all\x20tables\x20from\x20mydb','20404269qDxZfJ','\x20\x20Use:\x20tdx\x20tables\x20\x22','\x20\x20Cause:\x20','description','Database:\x20all','Database:\x20','Database\x20\x27','Table\x20pattern:\x20','\x20\x20Or:\x20\x20tdx\x20tables\x20--in\x20','includes','\x20\x20tdx\x20tables\x20\x22*.user*\x22\x20\x20\x20\x20\x20\x20\x20->\x20tables\x20matching\x20user*\x20across\x20databases','limit','Or\x20use\x20--in\x20flag:','validate','\x27\x20is\x20ambiguous.','2671464uhQtqn','Site:\x20','Database\x20pattern:\x20','Error:\x20Too\x20many\x20arguments.\x20Use\x20single\x20argument:','989253cyNaWT','✔\x20Found\x20','Did\x20you\x20mean\x20to\x20list\x20all\x20tables\x20from\x20database\x20\x27','\x20table','Listing\x20tables...','\x27\x20without\x20wildcards\x20would\x20search\x20for\x20tables\x20named\x20\x27','listTables','12BWrrde','749804MiuWIP','\x20\x20Or:\x20\x20tdx\x20tables\x20--database\x20','\x20\x20tdx\x20tables\x20users\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20->\x20table\x20\x22users\x22\x20across\x20all\x20databases','Error:\x20Pattern\x20\x27','1001690pPLjhU','\x27\x20may\x20not\x20exist\x20or\x20contains\x20no\x20tables','site','.*\x22','1084657YVMevG','✖\x20No\x20tables\x20found','length','\x20\x20tdx\x20tables\x20\x22mydb.users\x22\x20\x20\x20\x20->\x20table\x20\x22users\x22\x20in\x20database\x20mydb'];a37_0x1ba3=function(){return _0x14fe7c;};return a37_0x1ba3();}
@@ -1 +1 @@
1
- const a36_0x19574c=a36_0x32e7;(function(_0x120912,_0x87da02){const _0x329556=a36_0x32e7,_0x255dc2=_0x120912();while(!![]){try{const _0x3adb17=parseInt(_0x329556(0x112))/0x1+-parseInt(_0x329556(0xfa))/0x2+-parseInt(_0x329556(0x109))/0x3*(-parseInt(_0x329556(0x117))/0x4)+parseInt(_0x329556(0x10e))/0x5+parseInt(_0x329556(0x11f))/0x6*(parseInt(_0x329556(0x108))/0x7)+-parseInt(_0x329556(0x11e))/0x8*(-parseInt(_0x329556(0x118))/0x9)+parseInt(_0x329556(0x10b))/0xa*(-parseInt(_0x329556(0x100))/0xb);if(_0x3adb17===_0x87da02)break;else _0x255dc2['push'](_0x255dc2['shift']());}catch(_0x5ecd0f){_0x255dc2['push'](_0x255dc2['shift']());}}}(a36_0x4d1e,0xa9d67));import{BaseCommand}from'./command.js';import{saveSessionContext,getCurrentSessionPID}from'../core/session.js';import{profileExists}from'../core/profile.js';function a36_0x32e7(_0x5e0ded,_0x2af2f6){const _0x4d1e70=a36_0x4d1e();return a36_0x32e7=function(_0x32e79b,_0x1599c3){_0x32e79b=_0x32e79b-0xf9;let _0x599d46=_0x4d1e70[_0x32e79b];return _0x599d46;},a36_0x32e7(_0x5e0ded,_0x2af2f6);}export class UseCommand extends BaseCommand{[a36_0x19574c(0xfc)]='use';[a36_0x19574c(0x105)]=a36_0x19574c(0x116);[a36_0x19574c(0x114)](_0x1bc2e7){const _0x54d52f=a36_0x19574c,{args:_0x2f10b1}=_0x1bc2e7;if(_0x2f10b1[_0x54d52f(0x110)]<0x2)return _0x54d52f(0x10d)+'Resources:\x20database,\x20parent_segment,\x20llm_project,\x20profile\x0a'+_0x54d52f(0x121)+_0x54d52f(0x10c);const _0x374089=_0x2f10b1[0x0],_0x3fa1cb=[_0x54d52f(0x115),_0x54d52f(0xff),_0x54d52f(0x111),'profile',_0x54d52f(0x119)];if(!_0x3fa1cb[_0x54d52f(0x11a)](_0x374089))return'Invalid\x20resource:\x20'+_0x374089+_0x54d52f(0x107)+_0x3fa1cb[_0x54d52f(0x10a)](',\x20');return undefined;}async[a36_0x19574c(0x10f)](_0x1c4186){const _0x1f2d69=a36_0x19574c,{args:_0x1a5f46,options:_0x542430}=_0x1c4186;try{const _0x4634f5=_0x1a5f46[0x0],_0x3e4bca=_0x1a5f46[0x1];if(_0x4634f5==='profile'){if(!profileExists(_0x3e4bca))return console[_0x1f2d69(0xfd)](_0x1f2d69(0xf9)+_0x3e4bca+_0x1f2d69(0x101)),console['error']('\x0aUse\x20\x27tdx\x20profiles\x27\x20to\x20see\x20available\x20profiles'),0x1;const _0x4718c7=_0x542430[_0x1f2d69(0xfb)]||getCurrentSessionPID()[_0x1f2d69(0x11b)]();return saveSessionContext({'profile':_0x3e4bca},_0x542430[_0x1f2d69(0xfb)]),console['log'](_0x1f2d69(0x104)+_0x3e4bca+'\x20(session:\x20'+_0x4718c7+')'),console[_0x1f2d69(0xfe)]('\x0aTip:\x20Use\x20\x27tdx\x20context\x20--clear\x27\x20to\x20clear\x20session\x20overrides'),0x0;}const _0x2e3345={},_0x139581=_0x542430[_0x1f2d69(0xfb)]||getCurrentSessionPID()[_0x1f2d69(0x11b)]();switch(_0x4634f5){case'database':_0x2e3345[_0x1f2d69(0x115)]=_0x3e4bca,console[_0x1f2d69(0xfe)](_0x1f2d69(0x11d)+_0x3e4bca+_0x1f2d69(0x102)+_0x139581+')');break;case _0x1f2d69(0xff):_0x2e3345[_0x1f2d69(0xff)]=_0x3e4bca,console[_0x1f2d69(0xfe)](_0x1f2d69(0x113)+_0x3e4bca+_0x1f2d69(0x102)+_0x139581+')');break;case _0x1f2d69(0x111):_0x2e3345[_0x1f2d69(0x111)]=_0x3e4bca,console[_0x1f2d69(0xfe)](_0x1f2d69(0x120)+_0x3e4bca+_0x1f2d69(0x102)+_0x139581+')');break;case _0x1f2d69(0x119):_0x2e3345[_0x1f2d69(0x119)]=_0x3e4bca,console[_0x1f2d69(0xfe)](_0x1f2d69(0x106)+_0x3e4bca+_0x1f2d69(0x102)+_0x139581+')');break;}return saveSessionContext(_0x2e3345,_0x542430[_0x1f2d69(0xfb)]),console[_0x1f2d69(0xfe)]('\x0aTip:\x20Use\x20\x27tdx\x20context\x20--clear\x27\x20to\x20clear\x20session\x20overrides'),0x0;}catch(_0x365f9e){return _0x365f9e instanceof Error&&console[_0x1f2d69(0xfd)](_0x1f2d69(0x11c)+_0x365f9e[_0x1f2d69(0x103)]),0x1;}}}function a36_0x4d1e(){const _0x2e36ca=['length','llm_project','1165396tUqzcS','Session\x20parent_segment\x20set\x20to:\x20','validate','database','Set\x20session-level\x20context','40pdpUsd','1132938AZxoij','engage_workspace','includes','toString','Error:\x20','Session\x20database\x20set\x20to:\x20','8NwpFzB','6eVxeXO','Session\x20llm_project\x20set\x20to:\x20','Or\x20use:\x20tdx\x20context\x20--clear\x20to\x20clear\x20session\x20context\x0a','Error:\x20Profile\x20\x27','902874lnItfd','session','name','error','log','parent_segment','11cjeAJk','\x27\x20does\x20not\x20exist','\x20(session:\x20','message','Session\x20profile\x20set\x20to:\x20','description','Session\x20engage_workspace\x20set\x20to:\x20','.\x20Must\x20be\x20one\x20of:\x20','3343942vQYptB','177789VTKESF','join','22202300XQrdgb','\x0aRun\x20\x27tdx\x20use\x20--help\x27\x20for\x20more\x20options','Usage:\x20tdx\x20use\x20<resource>\x20<value>\x0a','5028540MNwKIh','execute'];a36_0x4d1e=function(){return _0x2e36ca;};return a36_0x4d1e();}
1
+ const a38_0x46dbd0=a38_0x53fd;(function(_0x11e4dd,_0x281a42){const _0x1c2e9a=a38_0x53fd,_0x370f95=_0x11e4dd();while(!![]){try{const _0x3c374f=-parseInt(_0x1c2e9a(0xd1))/0x1+-parseInt(_0x1c2e9a(0xdd))/0x2*(parseInt(_0x1c2e9a(0xcb))/0x3)+parseInt(_0x1c2e9a(0xd7))/0x4*(-parseInt(_0x1c2e9a(0xce))/0x5)+parseInt(_0x1c2e9a(0xd5))/0x6*(parseInt(_0x1c2e9a(0xe3))/0x7)+parseInt(_0x1c2e9a(0xea))/0x8*(-parseInt(_0x1c2e9a(0xcf))/0x9)+-parseInt(_0x1c2e9a(0xe2))/0xa*(-parseInt(_0x1c2e9a(0xde))/0xb)+parseInt(_0x1c2e9a(0xeb))/0xc;if(_0x3c374f===_0x281a42)break;else _0x370f95['push'](_0x370f95['shift']());}catch(_0x486421){_0x370f95['push'](_0x370f95['shift']());}}}(a38_0x1024,0x4b7bb));import{BaseCommand}from'./command.js';function a38_0x53fd(_0x354584,_0x10d628){const _0x10246c=a38_0x1024();return a38_0x53fd=function(_0x53fd95,_0x9cb112){_0x53fd95=_0x53fd95-0xc8;let _0x45b233=_0x10246c[_0x53fd95];return _0x45b233;},a38_0x53fd(_0x354584,_0x10d628);}import{saveSessionContext,getCurrentSessionPID}from'../core/session.js';import{profileExists}from'../core/profile.js';export class UseCommand extends BaseCommand{[a38_0x46dbd0(0xec)]=a38_0x46dbd0(0xee);[a38_0x46dbd0(0xd8)]=a38_0x46dbd0(0xd0);[a38_0x46dbd0(0xcd)](_0x20e80b){const _0x934bbd=a38_0x46dbd0,{args:_0xfee644}=_0x20e80b;if(_0xfee644[_0x934bbd(0xd3)]<0x2)return _0x934bbd(0xc9)+_0x934bbd(0xc8)+'Or\x20use:\x20tdx\x20context\x20--clear\x20to\x20clear\x20session\x20context\x0a'+_0x934bbd(0xe4);const _0x5bc808=_0xfee644[0x0],_0x556b44=[_0x934bbd(0xca),'parent_segment',_0x934bbd(0xe9),'profile',_0x934bbd(0xda)];if(!_0x556b44[_0x934bbd(0xe5)](_0x5bc808))return _0x934bbd(0xcc)+_0x5bc808+_0x934bbd(0xdf)+_0x556b44[_0x934bbd(0xef)](',\x20');return undefined;}async['execute'](_0x59e16c){const _0x1733cb=a38_0x46dbd0,{args:_0x2f9fb8,options:_0x4299b7}=_0x59e16c;try{const _0x4ff3fb=_0x2f9fb8[0x0],_0x5f2507=_0x2f9fb8[0x1];if(_0x4ff3fb===_0x1733cb(0xe7)){if(!profileExists(_0x5f2507))return console[_0x1733cb(0xd2)](_0x1733cb(0xe1)+_0x5f2507+'\x27\x20does\x20not\x20exist'),console[_0x1733cb(0xd2)](_0x1733cb(0xdc)),0x1;const _0x171c5f=_0x4299b7[_0x1733cb(0xe8)]||getCurrentSessionPID()['toString']();return saveSessionContext({'profile':_0x5f2507},_0x4299b7['session']),console['log'](_0x1733cb(0xd4)+_0x5f2507+_0x1733cb(0xf1)+_0x171c5f+')'),console['log']('\x0aTip:\x20Use\x20\x27tdx\x20context\x20--clear\x27\x20to\x20clear\x20session\x20overrides'),0x0;}const _0x249155={},_0x3c63c6=_0x4299b7['session']||getCurrentSessionPID()[_0x1733cb(0xd6)]();switch(_0x4ff3fb){case'database':_0x249155[_0x1733cb(0xca)]=_0x5f2507,console['log'](_0x1733cb(0xd9)+_0x5f2507+_0x1733cb(0xf1)+_0x3c63c6+')');break;case'parent_segment':_0x249155[_0x1733cb(0xe0)]=_0x5f2507,console[_0x1733cb(0xdb)]('Session\x20parent_segment\x20set\x20to:\x20'+_0x5f2507+'\x20(session:\x20'+_0x3c63c6+')');break;case'llm_project':_0x249155[_0x1733cb(0xe9)]=_0x5f2507,console[_0x1733cb(0xdb)]('Session\x20llm_project\x20set\x20to:\x20'+_0x5f2507+_0x1733cb(0xf1)+_0x3c63c6+')');break;case _0x1733cb(0xda):_0x249155['engage_workspace']=_0x5f2507,console[_0x1733cb(0xdb)](_0x1733cb(0xe6)+_0x5f2507+_0x1733cb(0xf1)+_0x3c63c6+')');break;}return saveSessionContext(_0x249155,_0x4299b7[_0x1733cb(0xe8)]),console[_0x1733cb(0xdb)](_0x1733cb(0xed)),0x0;}catch(_0x353537){return _0x353537 instanceof Error&&console[_0x1733cb(0xd2)](_0x1733cb(0xf0)+_0x353537['message']),0x1;}}}function a38_0x1024(){const _0x2e5cfc=['Error:\x20Profile\x20\x27','10KZJIaa','7UIGgDp','\x0aRun\x20\x27tdx\x20use\x20--help\x27\x20for\x20more\x20options','includes','Session\x20engage_workspace\x20set\x20to:\x20','profile','session','llm_project','2432MgJKqq','5727216RhYRaK','name','\x0aTip:\x20Use\x20\x27tdx\x20context\x20--clear\x27\x20to\x20clear\x20session\x20overrides','use','join','Error:\x20','\x20(session:\x20','Resources:\x20database,\x20parent_segment,\x20llm_project,\x20profile\x0a','Usage:\x20tdx\x20use\x20<resource>\x20<value>\x0a','database','1649211YLMuKm','Invalid\x20resource:\x20','validate','1038425VucAJV','1701WdTqRL','Set\x20session-level\x20context','284227GTqGks','error','length','Session\x20profile\x20set\x20to:\x20','2426406RRasFB','toString','4URAXHu','description','Session\x20database\x20set\x20to:\x20','engage_workspace','log','\x0aUse\x20\x27tdx\x20profiles\x27\x20to\x20see\x20available\x20profiles','2uPuYFL','5792765Kigiab','.\x20Must\x20be\x20one\x20of:\x20','parent_segment'];a38_0x1024=function(){return _0x2e5cfc;};return a38_0x1024();}
@@ -1 +1 @@
1
- const a37_0x4af247=a37_0x50b4;(function(_0x59b00b,_0xc54ef){const _0x360ea6=a37_0x50b4,_0x4697e8=_0x59b00b();while(!![]){try{const _0x4a9b74=parseInt(_0x360ea6(0xbc))/0x1*(-parseInt(_0x360ea6(0xa4))/0x2)+parseInt(_0x360ea6(0x8e))/0x3+parseInt(_0x360ea6(0x11f))/0x4+-parseInt(_0x360ea6(0xca))/0x5*(parseInt(_0x360ea6(0x117))/0x6)+parseInt(_0x360ea6(0xa6))/0x7*(-parseInt(_0x360ea6(0xef))/0x8)+-parseInt(_0x360ea6(0xd9))/0x9+parseInt(_0x360ea6(0xac))/0xa*(parseInt(_0x360ea6(0xc6))/0xb);if(_0x4a9b74===_0xc54ef)break;else _0x4697e8['push'](_0x4697e8['shift']());}catch(_0x3907c2){_0x4697e8['push'](_0x4697e8['shift']());}}}(a37_0x1436,0x96894));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleSDKOutput,handleSingleObjectOutput}from'../utils/command-output.js';import{withSpinner}from'../utils/spinner.js';import{confirm}from'../utils/prompt.js';import{formatBytes}from'../utils/formatters.js';import a37_0x12b109 from'prompts';export class WorkflowProjectsCommand extends BaseCommand{[a37_0x4af247(0xfa)]=a37_0x4af247(0xf4);[a37_0x4af247(0xea)]=a37_0x4af247(0xd7);async[a37_0x4af247(0x118)](_0x4420b3){const _0x161d8c=a37_0x4af247,{options:_0x43cfa9,args:_0xb9506f,tdx:_0x4fc3f8}=_0x4420b3,_0x2a5040=_0xb9506f[0x0];try{_0x43cfa9[_0x161d8c(0xa2)]&&_0x2a5040&&console[_0x161d8c(0x10a)]('Pattern:\x20'+_0x2a5040);const _0xc4e598=await withSpinner(_0x161d8c(0x11c),()=>_0x4fc3f8[_0x161d8c(0xb8)][_0x161d8c(0x85)](_0x2a5040,{'limit':_0x43cfa9[_0x161d8c(0x8d)]}),{'verbose':_0x43cfa9['verbose']}),_0x51389a=_0xc4e598['data'];return console[_0x161d8c(0x10a)](_0x161d8c(0x102)+_0x51389a[_0x161d8c(0xdc)]+_0x161d8c(0xe4)+(_0x51389a['length']!==0x1?'s':'')),await handleSDKOutput(_0x51389a,_0x43cfa9),0x0;}catch(_0x50a6a7){if(_0x50a6a7 instanceof SDKError)return console['error'](_0x161d8c(0x11d)+_0x50a6a7['message']),_0x50a6a7[_0x161d8c(0x101)]&&console[_0x161d8c(0x10a)](_0x161d8c(0xb3)+_0x50a6a7[_0x161d8c(0x101)]),0x1;throw _0x50a6a7;}}}export class WorkflowWorkflowsCommand extends BaseCommand{[a37_0x4af247(0xfa)]=a37_0x4af247(0xdd);[a37_0x4af247(0xea)]='List\x20workflows';async[a37_0x4af247(0x118)](_0x169585){const _0x33cb4b=a37_0x4af247,{options:_0x14100d,args:_0x3c9bac,tdx:_0x2cc69a}=_0x169585,_0x440381=_0x3c9bac[0x0];try{_0x14100d['verbose']&&_0x440381&&console['error'](_0x33cb4b(0xa5)+_0x440381);const _0x22cb54=await withSpinner(_0x33cb4b(0x96),()=>_0x2cc69a[_0x33cb4b(0xb8)]['workflows'](_0x440381,{'limit':_0x14100d['limit']}),{'verbose':_0x14100d[_0x33cb4b(0xa2)]}),_0xe3ca21=_0x22cb54[_0x33cb4b(0xf9)];return console[_0x33cb4b(0x10a)]('✔\x20Found\x20'+_0xe3ca21[_0x33cb4b(0xdc)]+_0x33cb4b(0xe5)+(_0xe3ca21[_0x33cb4b(0xdc)]!==0x1?'s':'')),await handleSDKOutput(_0xe3ca21,_0x14100d),0x0;}catch(_0x311ff0){if(_0x311ff0 instanceof SDKError)return console[_0x33cb4b(0x10a)](_0x33cb4b(0x11d)+_0x311ff0[_0x33cb4b(0xbe)]),_0x311ff0['cause']&&console[_0x33cb4b(0x10a)](_0x33cb4b(0xb3)+_0x311ff0[_0x33cb4b(0x101)]),0x1;throw _0x311ff0;}}}export class WorkflowSessionsCommand extends BaseCommand{[a37_0x4af247(0xfa)]=a37_0x4af247(0x97);[a37_0x4af247(0xea)]=a37_0x4af247(0x105);async[a37_0x4af247(0x118)](_0x4a0514){const _0x1ea6f1=a37_0x4af247,{options:_0x5bcf5e,args:_0x185593,tdx:_0x41c9c5}=_0x4a0514;let _0x2ab7b5,_0x2c64e3;if(_0x185593[0x0]){const _0x42d423=_0x185593[0x0][_0x1ea6f1(0xc8)]('.');if(_0x42d423[_0x1ea6f1(0xdc)]===0x1)_0x2ab7b5=_0x42d423[0x0];else{if(_0x42d423[_0x1ea6f1(0xdc)]===0x2)[_0x2ab7b5,_0x2c64e3]=_0x42d423;else return console[_0x1ea6f1(0x10a)]('Error:\x20Invalid\x20pattern.\x20Use\x20format:\x20project\x20or\x20project.workflow'),0x1;}}try{if(_0x5bcf5e[_0x1ea6f1(0xa2)]){if(_0x2ab7b5&&_0x2c64e3)console['error'](_0x1ea6f1(0x89)+_0x2ab7b5+'.'+_0x2c64e3);else _0x2ab7b5&&console[_0x1ea6f1(0x10a)](_0x1ea6f1(0xf5)+_0x2ab7b5);const _0x5dff8a=_0x5bcf5e['status'];_0x5dff8a&&console[_0x1ea6f1(0x10a)](_0x1ea6f1(0xdb)+_0x5dff8a);}const _0x222aa6=await withSpinner(_0x1ea6f1(0x9d),()=>_0x41c9c5[_0x1ea6f1(0xb8)][_0x1ea6f1(0xf3)]({'projectName':_0x2ab7b5,'workflowName':_0x2c64e3,'status':_0x5bcf5e['status'],'fromTime':_0x5bcf5e[_0x1ea6f1(0x9a)],'toTime':_0x5bcf5e['to'],'limit':_0x5bcf5e['limit']}),{'verbose':_0x5bcf5e[_0x1ea6f1(0xa2)]}),_0x26712a=_0x222aa6[_0x1ea6f1(0xf9)];return console[_0x1ea6f1(0x10a)](_0x1ea6f1(0x102)+_0x26712a[_0x1ea6f1(0xdc)]+_0x1ea6f1(0x93)+(_0x26712a[_0x1ea6f1(0xdc)]!==0x1?'s':'')),await handleSDKOutput(_0x26712a,_0x5bcf5e),0x0;}catch(_0x55440b){if(_0x55440b instanceof SDKError)return console[_0x1ea6f1(0x10a)](_0x1ea6f1(0x11d)+_0x55440b['message']),_0x55440b['cause']&&console[_0x1ea6f1(0x10a)](_0x1ea6f1(0xb3)+_0x55440b['cause']),0x1;throw _0x55440b;}}}export class WorkflowAttemptsCommand extends BaseCommand{['name']=a37_0x4af247(0x8c);[a37_0x4af247(0xea)]='List\x20workflow\x20attempts';async[a37_0x4af247(0x118)](_0x136926){const _0x2f09ff=a37_0x4af247,{options:_0x1b5cf0,args:_0x32360f,tdx:_0x1ea2a4}=_0x136926;let _0x5a23d5,_0xd48ae8;if(_0x32360f[0x0]){const _0x89e91b=_0x32360f[0x0][_0x2f09ff(0xc8)]('.');if(_0x89e91b[_0x2f09ff(0xdc)]===0x1)_0x5a23d5=_0x89e91b[0x0];else{if(_0x89e91b[_0x2f09ff(0xdc)]===0x2)[_0x5a23d5,_0xd48ae8]=_0x89e91b;else return console[_0x2f09ff(0x10a)](_0x2f09ff(0xeb)),0x1;}}try{const _0x38ae33=_0x1b5cf0[_0x2f09ff(0xae)];if(_0x1b5cf0[_0x2f09ff(0xa2)]){if(_0x5a23d5&&_0xd48ae8)console[_0x2f09ff(0x10a)](_0x2f09ff(0x89)+_0x5a23d5+'.'+_0xd48ae8);else _0x5a23d5&&console[_0x2f09ff(0x10a)](_0x2f09ff(0xf5)+_0x5a23d5);_0x38ae33&&console[_0x2f09ff(0x10a)](_0x2f09ff(0x9c));}const _0xfe62b9=await withSpinner(_0x2f09ff(0x109),()=>_0x1ea2a4[_0x2f09ff(0xb8)][_0x2f09ff(0x108)]({'projectName':_0x5a23d5,'workflowName':_0xd48ae8,'includeRetried':_0x38ae33,'limit':_0x1b5cf0['limit']}),{'verbose':_0x1b5cf0[_0x2f09ff(0xa2)]}),_0x34a2c1=_0xfe62b9[_0x2f09ff(0xf9)];return console['error'](_0x2f09ff(0x102)+_0x34a2c1['length']+'\x20attempt'+(_0x34a2c1['length']!==0x1?'s':'')),await handleSDKOutput(_0x34a2c1,_0x1b5cf0),0x0;}catch(_0x4aa527){if(_0x4aa527 instanceof SDKError)return console[_0x2f09ff(0x10a)](_0x2f09ff(0x11d)+_0x4aa527[_0x2f09ff(0xbe)]),_0x4aa527[_0x2f09ff(0x101)]&&console[_0x2f09ff(0x10a)](_0x2f09ff(0xb3)+_0x4aa527[_0x2f09ff(0x101)]),0x1;throw _0x4aa527;}}}function a37_0x50b4(_0x7436a7,_0x318a2f){const _0x1436a2=a37_0x1436();return a37_0x50b4=function(_0x50b439,_0x4323b8){_0x50b439=_0x50b439-0x7c;let _0x13d544=_0x1436a2[_0x50b439];return _0x13d544;},a37_0x50b4(_0x7436a7,_0x318a2f);}export class WorkflowAttemptCommand extends BaseCommand{['name']=a37_0x4af247(0xba);['description']=a37_0x4af247(0x8f);async[a37_0x4af247(0x118)](_0x428190){const _0xa0368b=a37_0x4af247,{options:_0x3dc3ea,args:_0x324178,tdx:_0x346b39}=_0x428190,_0x4ebc85=_0x324178[0x0];if(!_0x4ebc85)return console['error']('Error:\x20Attempt\x20ID\x20is\x20required'),0x1;try{_0x3dc3ea['verbose']&&console[_0xa0368b(0x10a)]('Attempt\x20ID:\x20'+_0x4ebc85);const _0x392374=await withSpinner('Getting\x20attempt\x20details...',()=>_0x346b39[_0xa0368b(0xb8)][_0xa0368b(0xbb)](_0x4ebc85),{'verbose':_0x3dc3ea[_0xa0368b(0xa2)]}),_0x3d12dd=_0x392374[_0xa0368b(0xf9)];let _0x4241d1;!_0x3d12dd[_0xa0368b(0x110)]?_0x4241d1=_0x3d12dd[_0xa0368b(0x11b)]?_0xa0368b(0xb0):_0xa0368b(0x120):_0x4241d1=_0x3d12dd[_0xa0368b(0xd3)]?_0xa0368b(0xd3):_0xa0368b(0x10a);let _0x585926;if(_0x3d12dd[_0xa0368b(0xd6)]&&_0x3d12dd[_0xa0368b(0xf7)]){const _0x363f66=new Date(_0x3d12dd[_0xa0368b(0xd6)])[_0xa0368b(0x111)](),_0x2bbe3f=new Date(_0x3d12dd[_0xa0368b(0xf7)])['getTime']();_0x585926=Math[_0xa0368b(0xbd)]((_0x2bbe3f-_0x363f66)/0x3e8);}const _0x13a9dc={'attempt_id':_0x3d12dd['id'],'status':_0x4241d1,..._0x3d12dd[_0xa0368b(0xb5)]!==undefined&&{'index':_0x3d12dd['index']},..._0x3d12dd[_0xa0368b(0x11a)]&&{'project':_0x3d12dd['project'][_0xa0368b(0xfa)]},..._0x3d12dd['workflow']&&{'workflow':_0x3d12dd[_0xa0368b(0xb8)]['name']},..._0x3d12dd['sessionId']&&{'session_id':_0x3d12dd[_0xa0368b(0x80)]},..._0x3d12dd[_0xa0368b(0x8b)]&&{'session_time':_0x3d12dd[_0xa0368b(0x8b)]},..._0x3d12dd[_0xa0368b(0xee)]&&{'retry_attempt':_0x3d12dd[_0xa0368b(0xee)]},..._0x585926!==undefined&&{'duration_sec':_0x585926},..._0x3d12dd[_0xa0368b(0xd6)]&&{'created_at':_0x3d12dd['createdAt']},..._0x3d12dd[_0xa0368b(0xf7)]&&{'finished_at':_0x3d12dd[_0xa0368b(0xf7)]},...Object[_0xa0368b(0xe2)](_0x3d12dd['params'])['length']>0x0&&{'params':_0x3d12dd[_0xa0368b(0x91)]}};return await handleSingleObjectOutput(_0x13a9dc,_0x3dc3ea),0x0;}catch(_0x2c1c8d){if(_0x2c1c8d instanceof SDKError)return console['error'](_0xa0368b(0x11d)+_0x2c1c8d[_0xa0368b(0xbe)]),_0x2c1c8d[_0xa0368b(0x101)]&&console[_0xa0368b(0x10a)](_0xa0368b(0xb3)+_0x2c1c8d[_0xa0368b(0x101)]),0x1;throw _0x2c1c8d;}}}export class WorkflowTasksCommand extends BaseCommand{[a37_0x4af247(0xfa)]=a37_0x4af247(0xc7);[a37_0x4af247(0xea)]=a37_0x4af247(0xd1);async[a37_0x4af247(0x118)](_0x4789dc){const _0x56003e=a37_0x4af247,{options:_0x34ec2d,args:_0x18261e,tdx:_0x698a9e}=_0x4789dc,_0x424451=_0x18261e[0x0];if(!_0x424451)return console[_0x56003e(0x10a)]('Error:\x20Attempt\x20ID\x20is\x20required'),0x1;try{const _0x49d02c=_0x34ec2d[_0x56003e(0xc4)];_0x34ec2d[_0x56003e(0xa2)]&&(console[_0x56003e(0x10a)](_0x56003e(0xb1)+_0x424451),_0x49d02c&&console[_0x56003e(0x10a)](_0x56003e(0xf1)));const _0x2eff4e=await withSpinner(_0x56003e(0xb9),()=>_0x698a9e['workflow'][_0x56003e(0x90)](_0x424451,_0x49d02c||![]),{'verbose':_0x34ec2d[_0x56003e(0xa2)]}),_0x1fd013=_0x2eff4e[_0x56003e(0xf9)];return console[_0x56003e(0x10a)]('✔\x20Found\x20'+_0x1fd013[_0x56003e(0xdc)]+_0x56003e(0x116)+(_0x1fd013[_0x56003e(0xdc)]!==0x1?'s':'')),await handleSDKOutput(_0x1fd013,_0x34ec2d),0x0;}catch(_0x475021){if(_0x475021 instanceof SDKError)return console[_0x56003e(0x10a)]('Error:\x20'+_0x475021[_0x56003e(0xbe)]),_0x475021['cause']&&console['error'](_0x56003e(0xb3)+_0x475021[_0x56003e(0x101)]),0x1;throw _0x475021;}}}function a37_0x1436(){const _0x2117c0=['Listing\x20workflow\x20sessions...','✔\x20Workflow\x20run\x20started','Error:\x20Project\x20name\x20is\x20required','\x20\x20Attempt\x20ID:\x20','param','verbose','filesExtracted','1156DhwtSj','Project\x20filter:\x20','2359406XjrFuX','readFile','Download\x20workflow\x20project\x20from\x20Treasure\x20Data','\x22?\x20This\x20cannot\x20be\x20undone.','Usage:\x20workflow:download\x20<project-name>\x20[output-dir]','Kill\x20a\x20running\x20attempt','9707930FYLGkg','workflow:push','includeRetried','Usage:\x20workflow:delete\x20<project-name-or-id>','canceling','Attempt\x20ID:\x20','Session\x20time:\x20','\x20\x20Cause:\x20','utf-8','index','Error:\x20Invalid\x20JSON\x20in\x20--params','format','workflow','Getting\x20attempt\x20tasks...','workflow:attempt','attempt','631sDfrQh','round','message','Expected\x20format:\x20--param\x20key=value','delete','projectName','stringify','\x20\x20New\x20attempt\x20ID:\x20','includeSubtasks','parse','22uNHQcw','workflow:tasks','split','Retry\x20a\x20session\x20or\x20attempt','1305rLVWAy','\x20is\x20not\x20a\x20directory','\x20\x20Project:\x20','Start\x20a\x20workflow\x20run','...','Retrying\x20attempt...','stat','Show\x20tasks\x20for\x20an\x20attempt','fileSize','success','Delete\x20workflow\x20project\x20from\x20Treasure\x20Data','✔\x20Deleted\x20project\x20','createdAt','List\x20all\x20workflow\x20projects','workflow:run','10141506roSNnw','resumeFrom','Status:\x20','length','workflow:workflows','\x20\x20Workflow:\x20','Output\x20directory:\x20','✔\x20Downloaded\x20','map','keys','retrySession','\x20project','\x20workflow','retryAttempt','push','session:','Project\x20directory:\x20','description','Error:\x20Invalid\x20pattern.\x20Use\x20format:\x20project\x20or\x20project.workflow','run','No\x20log\x20files\x20found\x20for\x20this\x20attempt','retryAttemptName','16MrLFqT','Push\x20workflow\x20project\x20to\x20Treasure\x20Data','Including\x20subtasks:\x20yes','Revision:\x20','sessions','workflow:projects','Filter:\x20project=','workflow:kill','finishedAt','substring','data','name','Usage:\x20workflow\x20retry\x20session:<id>\x20or\x20workflow\x20retry\x20attempt:<id>','✔\x20Retry\x20started','Reason:\x20','json','Validation:\x20skipped','Downloading\x20logs...','cause','✔\x20Found\x20','Usage:\x20workflow\x20run\x20<project.workflow>\x20[options]','task','List\x20workflow\x20execution\x20sessions','Workflow:\x20','kill','attempts','Listing\x20workflow\x20attempts...','error','Resume\x20from:\x20','Fetching\x20log\x20files...','Parameters:\x20','startsWith','\x20\x20Session\x20ID:\x20','done','getTime','Pushing\x20workflow\x20project...','Error:\x20Session\x20ID\x20or\x20attempt\x20ID\x20is\x20required','Are\x20you\x20sure\x20you\x20want\x20to\x20kill\x20attempt\x20','Error:\x20Invalid\x20parameter\x20format:\x20','\x20task','27954oGDqlV','execute','From\x20task:\x20','project','cancelRequested','Listing\x20workflow\x20projects...','Error:\x20','fromTask','4640928iCCjFm','running','\x20\x20Location:\x20','workflow:delete','Starting\x20workflow\x20run...','attemptId','Cancelled','Downloading\x20project\x20','attempt:','sessionId','session','Error:\x20Project\x20name\x20or\x20ID\x20is\x20required','Project:\x20','select','projects','✔\x20Pushed\x20','download','Retrying\x20session...','Filter:\x20','Error:\x20Attempt\x20ID\x20is\x20required','sessionTime','workflow:attempts','limit','2689335USTwmu','Show\x20specific\x20attempt\x20details','tasks','params','workflow:download','\x20session','yes','projectId','Listing\x20workflows...','workflow:sessions','revision','Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20project\x20\x22','from','Error:\x20Target\x20must\x20be\x20prefixed\x20with\x20\x22session:\x22\x20or\x20\x22attempt:\x22','Include\x20retried:\x20yes'];a37_0x1436=function(){return _0x2117c0;};return a37_0x1436();}export class WorkflowLogsCommand extends BaseCommand{[a37_0x4af247(0xfa)]='workflow:logs';[a37_0x4af247(0xea)]='Show\x20logs\x20for\x20a\x20workflow\x20attempt';async[a37_0x4af247(0x118)](_0x48178d){const _0xfed8dd=a37_0x4af247,{options:_0x1c6a47,args:_0x55c4cf,tdx:_0x576386}=_0x48178d,_0x5d78f0=_0x55c4cf[0x0];let _0x844715=_0x55c4cf[0x1];if(!_0x5d78f0)return console['error'](_0xfed8dd(0x8a)),0x1;try{_0x1c6a47[_0xfed8dd(0xa2)]&&(console[_0xfed8dd(0x10a)]('Attempt\x20ID:\x20'+_0x5d78f0),_0x844715&&console[_0xfed8dd(0x10a)]('Task\x20name:\x20'+_0x844715));const _0x5b35a9=await withSpinner(_0xfed8dd(0x10c),()=>_0x576386[_0xfed8dd(0xb8)]['logFiles'](_0x5d78f0,_0x844715),{'verbose':_0x1c6a47[_0xfed8dd(0xa2)]}),_0x4ab443=_0x5b35a9[_0xfed8dd(0xf9)];if(_0x4ab443[_0xfed8dd(0xdc)]===0x0)return console[_0xfed8dd(0x10a)](_0xfed8dd(0xed)),0x0;if(!_0x844715&&(_0x1c6a47[_0xfed8dd(0xfe)]||_0x1c6a47[_0xfed8dd(0xb7)]))return await handleSDKOutput(_0x4ab443,_0x1c6a47),0x0;if(!_0x844715){const _0x10482d=_0x4ab443[_0xfed8dd(0xe1)](_0x5ddecc=>({'title':_0x5ddecc['taskName']+'\x20('+formatBytes(_0x5ddecc[_0xfed8dd(0xd2)])+')','value':_0x5ddecc['taskName']})),_0x26a48c=await a37_0x12b109({'type':_0xfed8dd(0x84),'name':'task','message':'Select\x20a\x20task\x20to\x20view\x20logs:','choices':_0x10482d});if(!_0x26a48c[_0xfed8dd(0x104)])return console[_0xfed8dd(0x10a)](_0xfed8dd(0x7d)),0x0;_0x844715=_0x26a48c[_0xfed8dd(0x104)];}const _0x34e0fb=await withSpinner(_0xfed8dd(0x100),()=>_0x576386[_0xfed8dd(0xb8)]['logs'](_0x5d78f0,_0x844715),{'verbose':_0x1c6a47[_0xfed8dd(0xa2)]}),_0x42f898=_0x34e0fb[_0xfed8dd(0xf9)];return _0x42f898?console['log'](_0x42f898):console['error']('No\x20log\x20content\x20found'),0x0;}catch(_0xda3f5a){if(_0xda3f5a instanceof SDKError)return console[_0xfed8dd(0x10a)]('Error:\x20'+_0xda3f5a[_0xfed8dd(0xbe)]),_0xda3f5a['cause']&&console[_0xfed8dd(0x10a)](_0xfed8dd(0xb3)+_0xda3f5a['cause']),0x1;throw _0xda3f5a;}}}export class WorkflowKillCommand extends BaseCommand{[a37_0x4af247(0xfa)]=a37_0x4af247(0xf6);['description']=a37_0x4af247(0xab);async[a37_0x4af247(0x118)](_0x508807){const _0x47cdc5=a37_0x4af247,{options:_0x4b9617,args:_0x437cbb,tdx:_0x379550}=_0x508807,_0x265d01=_0x437cbb[0x0];if(!_0x265d01)return console[_0x47cdc5(0x10a)](_0x47cdc5(0x8a)),0x1;try{const _0x577f37=_0x4b9617['reason'];_0x4b9617['verbose']&&(console['error'](_0x47cdc5(0xb1)+_0x265d01),_0x577f37&&console[_0x47cdc5(0x10a)](_0x47cdc5(0xfd)+_0x577f37));if(!_0x4b9617[_0x47cdc5(0x94)]){const _0x126075=await confirm(_0x47cdc5(0x114)+_0x265d01+'?');if(!_0x126075)return console[_0x47cdc5(0x10a)]('Cancelled'),0x0;}const _0x257c88=await withSpinner('Killing\x20attempt...',()=>_0x379550[_0x47cdc5(0xb8)][_0x47cdc5(0x107)](_0x265d01,_0x577f37),{'verbose':_0x4b9617[_0x47cdc5(0xa2)]}),_0xa4a8a1=_0x257c88[_0x47cdc5(0xf9)];return console[_0x47cdc5(0x10a)]('✔\x20'+_0xa4a8a1),0x0;}catch(_0x3dde78){if(_0x3dde78 instanceof SDKError)return console[_0x47cdc5(0x10a)](_0x47cdc5(0x11d)+_0x3dde78[_0x47cdc5(0xbe)]),_0x3dde78['cause']&&console[_0x47cdc5(0x10a)](_0x47cdc5(0xb3)+_0x3dde78[_0x47cdc5(0x101)]),0x1;throw _0x3dde78;}}}export class WorkflowRetryCommand extends BaseCommand{[a37_0x4af247(0xfa)]='workflow:retry';[a37_0x4af247(0xea)]=a37_0x4af247(0xc9);async[a37_0x4af247(0x118)](_0x2fd264){const _0x5162a1=a37_0x4af247,{options:_0x4167cf,args:_0x3884eb,tdx:_0xed22a2}=_0x2fd264,_0x2ebf4a=_0x3884eb[0x0];if(!_0x2ebf4a)return console[_0x5162a1(0x10a)](_0x5162a1(0x113)),console[_0x5162a1(0x10a)]('Usage:\x20workflow\x20retry\x20session:<id>\x20or\x20workflow\x20retry\x20attempt:<id>'),0x1;let _0x3b457c=![],_0x3f519a=_0x2ebf4a;if(_0x2ebf4a[_0x5162a1(0x10e)](_0x5162a1(0xe8)))_0x3b457c=!![],_0x3f519a=_0x2ebf4a[_0x5162a1(0xf8)](0x8);else{if(_0x2ebf4a['startsWith'](_0x5162a1(0x7f)))_0x3b457c=![],_0x3f519a=_0x2ebf4a[_0x5162a1(0xf8)](0x8);else return console[_0x5162a1(0x10a)](_0x5162a1(0x9b)),console[_0x5162a1(0x10a)](_0x5162a1(0xfb)),0x1;}try{const _0x487d6e=_0x4167cf[_0x5162a1(0x11e)],_0x37df90=_0x4167cf[_0x5162a1(0xda)],_0x535594=_0x4167cf[_0x5162a1(0x91)],_0x5aede9=_0x4167cf['force'];_0x4167cf[_0x5162a1(0xa2)]&&(console[_0x5162a1(0x10a)]('Target:\x20'+(_0x3b457c?_0x5162a1(0x81):_0x5162a1(0xbb))+'\x20'+_0x3f519a),_0x487d6e&&console[_0x5162a1(0x10a)](_0x5162a1(0x119)+_0x487d6e),_0x37df90&&console['error'](_0x5162a1(0x10b)+_0x37df90),_0x535594&&console[_0x5162a1(0x10a)]('Params:\x20'+_0x535594),_0x5aede9&&console[_0x5162a1(0x10a)]('Force:\x20yes'));let _0x14a71e;if(_0x535594)try{if(_0x535594[_0x5162a1(0x10e)]('@')){const _0x1a141a=await import('fs/promises'),_0x25c510=_0x535594['substring'](0x1),_0x5ddc7=await _0x1a141a[_0x5162a1(0xa7)](_0x25c510,_0x5162a1(0xb4));_0x14a71e=JSON[_0x5162a1(0xc5)](_0x5ddc7);}else _0x14a71e=JSON[_0x5162a1(0xc5)](_0x535594);}catch{return console[_0x5162a1(0x10a)](_0x5162a1(0xb6)),0x1;}if(!_0x4167cf[_0x5162a1(0x94)]){const _0x4f7fad=await confirm('Are\x20you\x20sure\x20you\x20want\x20to\x20retry\x20'+(_0x3b457c?_0x5162a1(0x81):_0x5162a1(0xbb))+'\x20'+_0x3f519a+'?');if(!_0x4f7fad)return console[_0x5162a1(0x10a)](_0x5162a1(0x7d)),0x0;}let _0x460d60;_0x3b457c?_0x460d60=await withSpinner(_0x5162a1(0x88),()=>_0xed22a2[_0x5162a1(0xb8)][_0x5162a1(0xe3)](_0x3f519a,{'fromTask':_0x487d6e,'retryParams':_0x14a71e}),{'verbose':_0x4167cf[_0x5162a1(0xa2)]}):_0x460d60=await withSpinner(_0x5162a1(0xcf),()=>_0xed22a2[_0x5162a1(0xb8)][_0x5162a1(0xe6)](_0x3f519a,{'resumeFrom':_0x37df90,'retryParams':_0x14a71e,'force':_0x5aede9}),{'verbose':_0x4167cf[_0x5162a1(0xa2)]});const _0x5ac7ae=_0x460d60['data'];return console[_0x5162a1(0x10a)](_0x5162a1(0xfc)),console[_0x5162a1(0x10a)](_0x5162a1(0xc3)+_0x5ac7ae[_0x5162a1(0x7c)]),console[_0x5162a1(0x10a)](_0x5162a1(0x10f)+_0x5ac7ae[_0x5162a1(0x80)]),0x0;}catch(_0x3146ae){if(_0x3146ae instanceof SDKError)return console[_0x5162a1(0x10a)](_0x5162a1(0x11d)+_0x3146ae['message']),_0x3146ae['cause']&&console['error'](_0x5162a1(0xb3)+_0x3146ae[_0x5162a1(0x101)]),0x1;throw _0x3146ae;}}}export class WorkflowRunCommand extends BaseCommand{[a37_0x4af247(0xfa)]=a37_0x4af247(0xd8);[a37_0x4af247(0xea)]=a37_0x4af247(0xcd);async[a37_0x4af247(0x118)](_0x4bcc53){const _0x1d3862=a37_0x4af247,{options:_0x3df5b5,args:_0x1616b3,tdx:_0x340dc9}=_0x4bcc53,_0x403c4a=_0x1616b3[0x0];if(!_0x403c4a)return console['error']('Error:\x20Workflow\x20identifier\x20is\x20required'),console[_0x1d3862(0x10a)](_0x1d3862(0x103)),0x1;const _0x5ad0bf=_0x3df5b5[_0x1d3862(0xa1)],_0x40e8da=_0x3df5b5[_0x1d3862(0x8b)],_0x5c312d={};if(_0x5ad0bf&&Array['isArray'](_0x5ad0bf))for(const _0x506210 of _0x5ad0bf){const _0x42bba8=_0x506210['indexOf']('=');if(_0x42bba8===-0x1)return console[_0x1d3862(0x10a)](_0x1d3862(0x115)+_0x506210),console[_0x1d3862(0x10a)](_0x1d3862(0xbf)),0x1;const _0x26157d=_0x506210[_0x1d3862(0xf8)](0x0,_0x42bba8),_0x5824f1=_0x506210[_0x1d3862(0xf8)](_0x42bba8+0x1);try{_0x5c312d[_0x26157d]=JSON['parse'](_0x5824f1);}catch{_0x5c312d[_0x26157d]=_0x5824f1;}}_0x3df5b5[_0x1d3862(0xa2)]&&(console[_0x1d3862(0x10a)](_0x1d3862(0x106)+_0x403c4a),Object[_0x1d3862(0xe2)](_0x5c312d)[_0x1d3862(0xdc)]>0x0&&console[_0x1d3862(0x10a)](_0x1d3862(0x10d)+JSON[_0x1d3862(0xc2)](_0x5c312d)),_0x40e8da&&console['error'](_0x1d3862(0xb2)+_0x40e8da));const _0x57e50a=await withSpinner(_0x1d3862(0x123),()=>_0x340dc9[_0x1d3862(0xb8)][_0x1d3862(0xec)](_0x403c4a,_0x5c312d,{'sessionTime':_0x40e8da}),{'verbose':_0x3df5b5[_0x1d3862(0xa2)]}),_0xbe16ed=_0x57e50a[_0x1d3862(0xf9)];return console[_0x1d3862(0x10a)](_0x1d3862(0x9e)),console[_0x1d3862(0x10a)](_0x1d3862(0xa0)+_0xbe16ed['id']),console[_0x1d3862(0x10a)](_0x1d3862(0x10f)+_0xbe16ed['sessionId']),console[_0x1d3862(0x10a)](_0x1d3862(0xcc)+_0xbe16ed[_0x1d3862(0x11a)]?.[_0x1d3862(0xfa)]),console[_0x1d3862(0x10a)](_0x1d3862(0xde)+_0xbe16ed[_0x1d3862(0xb8)]?.[_0x1d3862(0xfa)]),0x0;}}export class WorkflowDownloadCommand extends BaseCommand{['name']=a37_0x4af247(0x92);[a37_0x4af247(0xea)]=a37_0x4af247(0xa8);async['execute'](_0x356606){const _0x1133ff=a37_0x4af247,{options:_0x540f71,args:_0x735013,tdx:_0x244064}=_0x356606,_0x29cd5a=_0x735013[0x0],_0x2db136=_0x735013[0x1]||'.';if(!_0x29cd5a)return console[_0x1133ff(0x10a)](_0x1133ff(0x9f)),console[_0x1133ff(0x10a)](_0x1133ff(0xaa)),0x1;const _0x8bd133=_0x540f71[_0x1133ff(0x98)];_0x540f71[_0x1133ff(0xa2)]&&(console[_0x1133ff(0x10a)](_0x1133ff(0x83)+_0x29cd5a),console['error'](_0x1133ff(0xdf)+_0x2db136),_0x8bd133&&console[_0x1133ff(0x10a)]('Revision:\x20'+_0x8bd133));const _0x25aaf5=await withSpinner(_0x1133ff(0x7e)+_0x29cd5a+_0x1133ff(0xce),()=>_0x244064[_0x1133ff(0xb8)][_0x1133ff(0x87)](_0x29cd5a,_0x2db136,{'revision':_0x8bd133}),{'verbose':_0x540f71[_0x1133ff(0xa2)]}),_0x4571ca=_0x25aaf5[_0x1133ff(0xf9)];return console['error'](_0x1133ff(0xe0)+_0x4571ca[_0x1133ff(0xc1)]),console['error']('\x20\x20Revision:\x20'+_0x4571ca[_0x1133ff(0x98)]),console[_0x1133ff(0x10a)]('\x20\x20Files\x20extracted:\x20'+_0x4571ca[_0x1133ff(0xa3)]),console[_0x1133ff(0x10a)](_0x1133ff(0x121)+_0x2db136+'/'+_0x4571ca[_0x1133ff(0xc1)]),0x0;}}export class WorkflowPushCommand extends BaseCommand{['name']=a37_0x4af247(0xad);[a37_0x4af247(0xea)]=a37_0x4af247(0xf0);async[a37_0x4af247(0x118)](_0xc7c50e){const _0xd66c9e=a37_0x4af247,{options:_0x113f17,args:_0x30f5d5,tdx:_0xfc93e7}=_0xc7c50e;let _0x2397b6='.',_0x865781=_0x113f17[_0xd66c9e(0xfa)];if(_0x30f5d5[0x0]){const {promises:_0x583302}=await import('fs');try{const _0x45511a=await _0x583302[_0xd66c9e(0xd0)](_0x30f5d5[0x0]);if(_0x45511a['isDirectory']())_0x2397b6=_0x30f5d5[0x0];else return console[_0xd66c9e(0x10a)]('Error:\x20'+_0x30f5d5[0x0]+_0xd66c9e(0xcb)),0x1;}catch{_0x865781=_0x30f5d5[0x0],_0x2397b6='.';}}const _0x590287=_0x113f17[_0xd66c9e(0x98)],_0x5ecb45=_0x113f17['skipValidation'];_0x113f17[_0xd66c9e(0xa2)]&&(console[_0xd66c9e(0x10a)](_0xd66c9e(0xe9)+_0x2397b6),_0x865781&&console[_0xd66c9e(0x10a)]('Project\x20name:\x20'+_0x865781),_0x590287&&console['error'](_0xd66c9e(0xf2)+_0x590287),_0x5ecb45&&console['error'](_0xd66c9e(0xff)));const _0x20db9a=await withSpinner(_0xd66c9e(0x112),()=>_0xfc93e7[_0xd66c9e(0xb8)][_0xd66c9e(0xe7)](_0x2397b6,{'projectName':_0x865781,'revision':_0x590287,'skipValidation':_0x5ecb45}),{'verbose':_0x113f17[_0xd66c9e(0xa2)]}),_0x526b7d=_0x20db9a[_0xd66c9e(0xf9)];return console[_0xd66c9e(0x10a)](_0xd66c9e(0x86)+_0x526b7d[_0xd66c9e(0xc1)]),console[_0xd66c9e(0x10a)]('\x20\x20Project\x20ID:\x20'+_0x526b7d[_0xd66c9e(0x95)]),console['error']('\x20\x20Revision:\x20'+_0x526b7d[_0xd66c9e(0x98)]),0x0;}}export class WorkflowDeleteCommand extends BaseCommand{[a37_0x4af247(0xfa)]=a37_0x4af247(0x122);[a37_0x4af247(0xea)]=a37_0x4af247(0xd4);async['execute'](_0x5479ec){const _0x5998a9=a37_0x4af247,{options:_0x3cbfd5,args:_0x1fb04f,tdx:_0x4e061b}=_0x5479ec,_0x2d965c=_0x1fb04f[0x0];if(!_0x2d965c)return console['error'](_0x5998a9(0x82)),console[_0x5998a9(0x10a)](_0x5998a9(0xaf)),0x1;_0x3cbfd5[_0x5998a9(0xa2)]&&console['error'](_0x5998a9(0x83)+_0x2d965c);if(!_0x3cbfd5['yes']){const _0x3869b8=await confirm(_0x5998a9(0x99)+_0x2d965c+_0x5998a9(0xa9));if(!_0x3869b8)return console[_0x5998a9(0x10a)](_0x5998a9(0x7d)),0x0;}const _0x5929cb=await withSpinner('Deleting\x20project\x20'+_0x2d965c+_0x5998a9(0xce),()=>_0x4e061b[_0x5998a9(0xb8)][_0x5998a9(0xc0)](_0x2d965c),{'verbose':_0x3cbfd5[_0x5998a9(0xa2)]}),_0x880fda=_0x5929cb[_0x5998a9(0xf9)];return console[_0x5998a9(0x10a)](_0x5998a9(0xd5)+_0x880fda[_0x5998a9(0xc1)]),console['error']('\x20\x20Project\x20ID:\x20'+_0x880fda[_0x5998a9(0x95)]),0x0;}}
1
+ const a39_0x3c450e=a39_0x7745;(function(_0x541168,_0x37f565){const _0x4400fe=a39_0x7745,_0x5ba092=_0x541168();while(!![]){try{const _0x5221bf=parseInt(_0x4400fe(0x149))/0x1+parseInt(_0x4400fe(0x12b))/0x2*(parseInt(_0x4400fe(0xea))/0x3)+parseInt(_0x4400fe(0x148))/0x4*(parseInt(_0x4400fe(0x10e))/0x5)+parseInt(_0x4400fe(0x10c))/0x6+parseInt(_0x4400fe(0x141))/0x7+-parseInt(_0x4400fe(0xbd))/0x8*(-parseInt(_0x4400fe(0xc5))/0x9)+-parseInt(_0x4400fe(0xff))/0xa;if(_0x5221bf===_0x37f565)break;else _0x5ba092['push'](_0x5ba092['shift']());}catch(_0x5aab48){_0x5ba092['push'](_0x5ba092['shift']());}}}(a39_0x3fe2,0xa5dcd));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleSDKOutput,handleSingleObjectOutput}from'../utils/command-output.js';import{withSpinner}from'../utils/spinner.js';import{confirm}from'../utils/prompt.js';import{formatBytes}from'../utils/formatters.js';import a39_0x28a9f1 from'prompts';export class WorkflowProjectsCommand extends BaseCommand{[a39_0x3c450e(0x113)]=a39_0x3c450e(0xd8);[a39_0x3c450e(0x13f)]=a39_0x3c450e(0x11f);async[a39_0x3c450e(0xd3)](_0x31a1e8){const _0x291c5f=a39_0x3c450e,{options:_0x51c43c,args:_0x1ddf16,tdx:_0x41190a}=_0x31a1e8,_0x57453e=_0x1ddf16[0x0];try{_0x51c43c[_0x291c5f(0x121)]&&_0x57453e&&console['error']('Pattern:\x20'+_0x57453e);const _0x209eaf=await withSpinner(_0x291c5f(0xcc),()=>_0x41190a[_0x291c5f(0xda)]['projects'](_0x57453e,{'limit':_0x51c43c[_0x291c5f(0xab)]}),{'verbose':_0x51c43c[_0x291c5f(0x121)]}),_0xf3ea6d=_0x209eaf[_0x291c5f(0xa9)];return console[_0x291c5f(0xc3)]('✔\x20Found\x20'+_0xf3ea6d[_0x291c5f(0x13c)]+_0x291c5f(0xe9)+(_0xf3ea6d[_0x291c5f(0x13c)]!==0x1?'s':'')),await handleSDKOutput(_0xf3ea6d,_0x51c43c),0x0;}catch(_0x2c829b){if(_0x2c829b instanceof SDKError)return console[_0x291c5f(0xc3)]('Error:\x20'+_0x2c829b[_0x291c5f(0x134)]),_0x2c829b[_0x291c5f(0x143)]&&console['error'](_0x291c5f(0xbf)+_0x2c829b[_0x291c5f(0x143)]),0x1;throw _0x2c829b;}}}export class WorkflowWorkflowsCommand extends BaseCommand{['name']=a39_0x3c450e(0xfc);[a39_0x3c450e(0x13f)]=a39_0x3c450e(0xba);async[a39_0x3c450e(0xd3)](_0x34b19d){const _0x2e5171=a39_0x3c450e,{options:_0x5a8cf9,args:_0x40f590,tdx:_0x3df6f8}=_0x34b19d,_0x49bee4=_0x40f590[0x0];try{_0x5a8cf9[_0x2e5171(0x121)]&&_0x49bee4&&console[_0x2e5171(0xc3)]('Project\x20filter:\x20'+_0x49bee4);const _0x2eb733=await withSpinner(_0x2e5171(0xc2),()=>_0x3df6f8['workflow']['workflows'](_0x49bee4,{'limit':_0x5a8cf9[_0x2e5171(0xab)]}),{'verbose':_0x5a8cf9[_0x2e5171(0x121)]}),_0x3a3f9f=_0x2eb733['data'];return console['error'](_0x2e5171(0xae)+_0x3a3f9f[_0x2e5171(0x13c)]+_0x2e5171(0xf6)+(_0x3a3f9f['length']!==0x1?'s':'')),await handleSDKOutput(_0x3a3f9f,_0x5a8cf9),0x0;}catch(_0x203a02){if(_0x203a02 instanceof SDKError)return console[_0x2e5171(0xc3)]('Error:\x20'+_0x203a02[_0x2e5171(0x134)]),_0x203a02[_0x2e5171(0x143)]&&console['error'](_0x2e5171(0xbf)+_0x203a02['cause']),0x1;throw _0x203a02;}}}export class WorkflowSessionsCommand extends BaseCommand{['name']=a39_0x3c450e(0xf0);[a39_0x3c450e(0x13f)]=a39_0x3c450e(0xe8);async[a39_0x3c450e(0xd3)](_0x71cc96){const _0x24a01c=a39_0x3c450e,{options:_0x41dc1b,args:_0x269514,tdx:_0x133501}=_0x71cc96;let _0x289809,_0x52816e;if(_0x269514[0x0]){const _0x40826d=_0x269514[0x0][_0x24a01c(0x11b)]('.');if(_0x40826d['length']===0x1)_0x289809=_0x40826d[0x0];else{if(_0x40826d[_0x24a01c(0x13c)]===0x2)[_0x289809,_0x52816e]=_0x40826d;else return console[_0x24a01c(0xc3)]('Error:\x20Invalid\x20pattern.\x20Use\x20format:\x20project\x20or\x20project.workflow'),0x1;}}try{if(_0x41dc1b[_0x24a01c(0x121)]){if(_0x289809&&_0x52816e)console[_0x24a01c(0xc3)](_0x24a01c(0x118)+_0x289809+'.'+_0x52816e);else _0x289809&&console[_0x24a01c(0xc3)]('Filter:\x20project='+_0x289809);const _0xe480a3=_0x41dc1b[_0x24a01c(0x122)];_0xe480a3&&console[_0x24a01c(0xc3)](_0x24a01c(0xeb)+_0xe480a3);}const _0x179c11=await withSpinner(_0x24a01c(0x115),()=>_0x133501[_0x24a01c(0xda)][_0x24a01c(0xe0)]({'projectName':_0x289809,'workflowName':_0x52816e,'status':_0x41dc1b['status'],'fromTime':_0x41dc1b[_0x24a01c(0x114)],'toTime':_0x41dc1b['to'],'limit':_0x41dc1b[_0x24a01c(0xab)]}),{'verbose':_0x41dc1b[_0x24a01c(0x121)]}),_0x4993d6=_0x179c11[_0x24a01c(0xa9)];return console[_0x24a01c(0xc3)](_0x24a01c(0xae)+_0x4993d6[_0x24a01c(0x13c)]+_0x24a01c(0xd9)+(_0x4993d6['length']!==0x1?'s':'')),await handleSDKOutput(_0x4993d6,_0x41dc1b),0x0;}catch(_0x1d5f39){if(_0x1d5f39 instanceof SDKError)return console[_0x24a01c(0xc3)](_0x24a01c(0x144)+_0x1d5f39[_0x24a01c(0x134)]),_0x1d5f39['cause']&&console[_0x24a01c(0xc3)](_0x24a01c(0xbf)+_0x1d5f39[_0x24a01c(0x143)]),0x1;throw _0x1d5f39;}}}export class WorkflowAttemptsCommand extends BaseCommand{[a39_0x3c450e(0x113)]=a39_0x3c450e(0x133);[a39_0x3c450e(0x13f)]='List\x20workflow\x20attempts';async[a39_0x3c450e(0xd3)](_0x5ac0e8){const _0x47603c=a39_0x3c450e,{options:_0x235d73,args:_0x49bd5b,tdx:_0x3317ec}=_0x5ac0e8;let _0x3556f7,_0x1863fa;if(_0x49bd5b[0x0]){const _0x317663=_0x49bd5b[0x0]['split']('.');if(_0x317663['length']===0x1)_0x3556f7=_0x317663[0x0];else{if(_0x317663['length']===0x2)[_0x3556f7,_0x1863fa]=_0x317663;else return console[_0x47603c(0xc3)]('Error:\x20Invalid\x20pattern.\x20Use\x20format:\x20project\x20or\x20project.workflow'),0x1;}}try{const _0x2ee1cb=_0x235d73[_0x47603c(0xd2)];if(_0x235d73[_0x47603c(0x121)]){if(_0x3556f7&&_0x1863fa)console['error'](_0x47603c(0x118)+_0x3556f7+'.'+_0x1863fa);else _0x3556f7&&console[_0x47603c(0xc3)](_0x47603c(0xa8)+_0x3556f7);_0x2ee1cb&&console[_0x47603c(0xc3)]('Include\x20retried:\x20yes');}const _0x3e9b3c=await withSpinner('Listing\x20workflow\x20attempts...',()=>_0x3317ec['workflow'][_0x47603c(0xb3)]({'projectName':_0x3556f7,'workflowName':_0x1863fa,'includeRetried':_0x2ee1cb,'limit':_0x235d73[_0x47603c(0xab)]}),{'verbose':_0x235d73['verbose']}),_0x4828c0=_0x3e9b3c['data'];return console[_0x47603c(0xc3)](_0x47603c(0xae)+_0x4828c0[_0x47603c(0x13c)]+_0x47603c(0x129)+(_0x4828c0[_0x47603c(0x13c)]!==0x1?'s':'')),await handleSDKOutput(_0x4828c0,_0x235d73),0x0;}catch(_0x5f03ca){if(_0x5f03ca instanceof SDKError)return console[_0x47603c(0xc3)](_0x47603c(0x144)+_0x5f03ca[_0x47603c(0x134)]),_0x5f03ca[_0x47603c(0x143)]&&console[_0x47603c(0xc3)](_0x47603c(0xbf)+_0x5f03ca[_0x47603c(0x143)]),0x1;throw _0x5f03ca;}}}export class WorkflowAttemptCommand extends BaseCommand{[a39_0x3c450e(0x113)]=a39_0x3c450e(0xdd);['description']=a39_0x3c450e(0xb1);async[a39_0x3c450e(0xd3)](_0x54f11f){const _0x49c84b=a39_0x3c450e,{options:_0x23bf15,args:_0x51e2fe,tdx:_0x3b95f8}=_0x54f11f,_0x261ec7=_0x51e2fe[0x0];if(!_0x261ec7)return console[_0x49c84b(0xc3)](_0x49c84b(0xef)),0x1;try{_0x23bf15[_0x49c84b(0x121)]&&console[_0x49c84b(0xc3)]('Attempt\x20ID:\x20'+_0x261ec7);const _0x474c81=await withSpinner('Getting\x20attempt\x20details...',()=>_0x3b95f8[_0x49c84b(0xda)][_0x49c84b(0xb6)](_0x261ec7),{'verbose':_0x23bf15[_0x49c84b(0x121)]}),_0x3145df=_0x474c81['data'];let _0x5a3e1a;!_0x3145df[_0x49c84b(0x108)]?_0x5a3e1a=_0x3145df[_0x49c84b(0xce)]?_0x49c84b(0xc1):_0x49c84b(0x142):_0x5a3e1a=_0x3145df[_0x49c84b(0xd0)]?_0x49c84b(0xd0):_0x49c84b(0xc3);let _0x4bff19;if(_0x3145df[_0x49c84b(0xaf)]&&_0x3145df[_0x49c84b(0x101)]){const _0x458cbe=new Date(_0x3145df['createdAt'])[_0x49c84b(0xd7)](),_0x8eb221=new Date(_0x3145df[_0x49c84b(0x101)])[_0x49c84b(0xd7)]();_0x4bff19=Math[_0x49c84b(0xd1)]((_0x8eb221-_0x458cbe)/0x3e8);}const _0x437974={'attempt_id':_0x3145df['id'],'status':_0x5a3e1a,..._0x3145df[_0x49c84b(0xf8)]!==undefined&&{'index':_0x3145df['index']},..._0x3145df[_0x49c84b(0xdc)]&&{'project':_0x3145df[_0x49c84b(0xdc)][_0x49c84b(0x113)]},..._0x3145df[_0x49c84b(0xda)]&&{'workflow':_0x3145df[_0x49c84b(0xda)]['name']},..._0x3145df[_0x49c84b(0xad)]&&{'session_id':_0x3145df['sessionId']},..._0x3145df[_0x49c84b(0x13b)]&&{'session_time':_0x3145df[_0x49c84b(0x13b)]},..._0x3145df[_0x49c84b(0xc0)]&&{'retry_attempt':_0x3145df[_0x49c84b(0xc0)]},..._0x4bff19!==undefined&&{'duration_sec':_0x4bff19},..._0x3145df[_0x49c84b(0xaf)]&&{'created_at':_0x3145df['createdAt']},..._0x3145df[_0x49c84b(0x101)]&&{'finished_at':_0x3145df[_0x49c84b(0x101)]},...Object['keys'](_0x3145df[_0x49c84b(0x11d)])['length']>0x0&&{'params':_0x3145df[_0x49c84b(0x11d)]}};return await handleSingleObjectOutput(_0x437974,_0x23bf15),0x0;}catch(_0x1a10f8){if(_0x1a10f8 instanceof SDKError)return console[_0x49c84b(0xc3)](_0x49c84b(0x144)+_0x1a10f8[_0x49c84b(0x134)]),_0x1a10f8[_0x49c84b(0x143)]&&console[_0x49c84b(0xc3)](_0x49c84b(0xbf)+_0x1a10f8['cause']),0x1;throw _0x1a10f8;}}}export class WorkflowTasksCommand extends BaseCommand{[a39_0x3c450e(0x113)]=a39_0x3c450e(0x14c);[a39_0x3c450e(0x13f)]=a39_0x3c450e(0xcd);async[a39_0x3c450e(0xd3)](_0x245bf6){const _0xb5c832=a39_0x3c450e,{options:_0x21515e,args:_0x5de713,tdx:_0x5cb612}=_0x245bf6,_0x3faa15=_0x5de713[0x0];if(!_0x3faa15)return console['error'](_0xb5c832(0xef)),0x1;try{const _0x48b9b6=_0x21515e[_0xb5c832(0x13d)];_0x21515e[_0xb5c832(0x121)]&&(console[_0xb5c832(0xc3)](_0xb5c832(0xb4)+_0x3faa15),_0x48b9b6&&console[_0xb5c832(0xc3)]('Including\x20subtasks:\x20yes'));const _0x34262d=await withSpinner(_0xb5c832(0x125),()=>_0x5cb612[_0xb5c832(0xda)][_0xb5c832(0x140)](_0x3faa15,_0x48b9b6||![]),{'verbose':_0x21515e['verbose']}),_0x11df42=_0x34262d[_0xb5c832(0xa9)];return console[_0xb5c832(0xc3)](_0xb5c832(0xae)+_0x11df42[_0xb5c832(0x13c)]+_0xb5c832(0xdb)+(_0x11df42['length']!==0x1?'s':'')),await handleSDKOutput(_0x11df42,_0x21515e),0x0;}catch(_0x4b6009){if(_0x4b6009 instanceof SDKError)return console['error'](_0xb5c832(0x144)+_0x4b6009[_0xb5c832(0x134)]),_0x4b6009[_0xb5c832(0x143)]&&console[_0xb5c832(0xc3)](_0xb5c832(0xbf)+_0x4b6009[_0xb5c832(0x143)]),0x1;throw _0x4b6009;}}}function a39_0x3fe2(){const _0x51f4be=['Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20project\x20\x22','✔\x20Workflow\x20run\x20started','Resume\x20from:\x20','Push\x20workflow\x20project\x20to\x20Treasure\x20Data','task','attempt:','workflow:attempts','message','param','yes','workflow:logs','force','workflow:push','filesExtracted','sessionTime','length','includeSubtasks','Select\x20a\x20task\x20to\x20view\x20logs:','description','tasks','6664476IfpgIc','running','cause','Error:\x20','session:','...','Retry\x20a\x20session\x20or\x20attempt','36476xKsRAp','66276kHayVR','Error:\x20Invalid\x20JSON\x20in\x20--params','retrySession','workflow:tasks','retryAttempt','Starting\x20workflow\x20run...','Filter:\x20project=','data','resumeFrom','limit','Target:\x20','sessionId','✔\x20Found\x20','createdAt','delete','Show\x20specific\x20attempt\x20details','Project:\x20','attempts','Attempt\x20ID:\x20','projectName','attempt','json','download','From\x20task:\x20','List\x20workflows','Error:\x20Target\x20must\x20be\x20prefixed\x20with\x20\x22session:\x22\x20or\x20\x22attempt:\x22','Downloading\x20logs...','32VjhGNd','projectId','\x20\x20Cause:\x20','retryAttemptName','canceling','Listing\x20workflows...','error','workflow:delete','2833101wLhTlR','utf-8','Usage:\x20workflow\x20run\x20<project.workflow>\x20[options]','Usage:\x20workflow\x20retry\x20session:<id>\x20or\x20workflow\x20retry\x20attempt:<id>','No\x20log\x20files\x20found\x20for\x20this\x20attempt','logs','taskName','Listing\x20workflow\x20projects...','Show\x20tasks\x20for\x20an\x20attempt','cancelRequested','Downloading\x20project\x20','success','round','includeRetried','execute','substring','reason','Are\x20you\x20sure\x20you\x20want\x20to\x20retry\x20','getTime','workflow:projects','\x20session','workflow','\x20task','project','workflow:attempt','Revision:\x20','Error:\x20Invalid\x20parameter\x20format:\x20','sessions','Killing\x20attempt...','✔\x20Downloaded\x20','\x22?\x20This\x20cannot\x20be\x20undone.','workflow:run','Pushing\x20workflow\x20project...','workflow:retry','session','List\x20workflow\x20execution\x20sessions','\x20project','987219PjBhCD','Status:\x20','skipValidation','keys','Delete\x20workflow\x20project\x20from\x20Treasure\x20Data','Error:\x20Attempt\x20ID\x20is\x20required','workflow:sessions','\x20\x20Session\x20ID:\x20','stat','Deleting\x20project\x20','Project\x20directory:\x20','attemptId','\x20workflow','✔\x20Retry\x20started','index','Error:\x20Session\x20ID\x20or\x20attempt\x20ID\x20is\x20required','Fetching\x20log\x20files...','map','workflow:workflows','Kill\x20a\x20running\x20attempt','Retrying\x20attempt...','37827310IBTURR','Download\x20workflow\x20project\x20from\x20Treasure\x20Data','finishedAt','Project\x20name:\x20','Retrying\x20session...','log','✔\x20Pushed\x20','Start\x20a\x20workflow\x20run','\x20\x20Attempt\x20ID:\x20','done','kill','\x20\x20Project:\x20','Workflow:\x20','4512792ktwPfU','\x20\x20Project\x20ID:\x20','605UQKaeg','parse','workflow:kill','Error:\x20Workflow\x20identifier\x20is\x20required','revision','name','from','Listing\x20workflow\x20sessions...','startsWith','Parameters:\x20','Filter:\x20','Are\x20you\x20sure\x20you\x20want\x20to\x20kill\x20attempt\x20','push','split','Force:\x20yes','params','Task\x20name:\x20','List\x20all\x20workflow\x20projects','stringify','verbose','status','Session\x20time:\x20','isArray','Getting\x20attempt\x20tasks...','Validation:\x20skipped','Params:\x20','Usage:\x20workflow:delete\x20<project-name-or-id>','\x20attempt','Cancelled','2PUVVPu','indexOf'];a39_0x3fe2=function(){return _0x51f4be;};return a39_0x3fe2();}export class WorkflowLogsCommand extends BaseCommand{[a39_0x3c450e(0x113)]=a39_0x3c450e(0x137);[a39_0x3c450e(0x13f)]='Show\x20logs\x20for\x20a\x20workflow\x20attempt';async[a39_0x3c450e(0xd3)](_0x425a50){const _0xcb8c18=a39_0x3c450e,{options:_0x246b7a,args:_0x48d80,tdx:_0x5d9d1e}=_0x425a50,_0x1ce1c9=_0x48d80[0x0];let _0x32b86d=_0x48d80[0x1];if(!_0x1ce1c9)return console['error']('Error:\x20Attempt\x20ID\x20is\x20required'),0x1;try{_0x246b7a[_0xcb8c18(0x121)]&&(console[_0xcb8c18(0xc3)](_0xcb8c18(0xb4)+_0x1ce1c9),_0x32b86d&&console[_0xcb8c18(0xc3)](_0xcb8c18(0x11e)+_0x32b86d));const _0x590830=await withSpinner(_0xcb8c18(0xfa),()=>_0x5d9d1e[_0xcb8c18(0xda)]['logFiles'](_0x1ce1c9,_0x32b86d),{'verbose':_0x246b7a['verbose']}),_0x546059=_0x590830['data'];if(_0x546059['length']===0x0)return console[_0xcb8c18(0xc3)](_0xcb8c18(0xc9)),0x0;if(!_0x32b86d&&(_0x246b7a[_0xcb8c18(0xb7)]||_0x246b7a['format']))return await handleSDKOutput(_0x546059,_0x246b7a),0x0;if(!_0x32b86d){const _0x1a974a=_0x546059[_0xcb8c18(0xfb)](_0x38df33=>({'title':_0x38df33[_0xcb8c18(0xcb)]+'\x20('+formatBytes(_0x38df33['fileSize'])+')','value':_0x38df33[_0xcb8c18(0xcb)]})),_0x340d67=await a39_0x28a9f1({'type':'select','name':'task','message':_0xcb8c18(0x13e),'choices':_0x1a974a});if(!_0x340d67[_0xcb8c18(0x131)])return console[_0xcb8c18(0xc3)](_0xcb8c18(0x12a)),0x0;_0x32b86d=_0x340d67[_0xcb8c18(0x131)];}const _0x4f9a2a=await withSpinner(_0xcb8c18(0xbc),()=>_0x5d9d1e['workflow'][_0xcb8c18(0xca)](_0x1ce1c9,_0x32b86d),{'verbose':_0x246b7a[_0xcb8c18(0x121)]}),_0x1b8481=_0x4f9a2a['data'];return _0x1b8481?console[_0xcb8c18(0x104)](_0x1b8481):console[_0xcb8c18(0xc3)]('No\x20log\x20content\x20found'),0x0;}catch(_0xbc3b89){if(_0xbc3b89 instanceof SDKError)return console[_0xcb8c18(0xc3)](_0xcb8c18(0x144)+_0xbc3b89[_0xcb8c18(0x134)]),_0xbc3b89['cause']&&console[_0xcb8c18(0xc3)](_0xcb8c18(0xbf)+_0xbc3b89[_0xcb8c18(0x143)]),0x1;throw _0xbc3b89;}}}export class WorkflowKillCommand extends BaseCommand{['name']=a39_0x3c450e(0x110);[a39_0x3c450e(0x13f)]=a39_0x3c450e(0xfd);async[a39_0x3c450e(0xd3)](_0x4bd777){const _0x2418a8=a39_0x3c450e,{options:_0x4c0424,args:_0x4ea6d3,tdx:_0x13e47b}=_0x4bd777,_0x1ce11e=_0x4ea6d3[0x0];if(!_0x1ce11e)return console[_0x2418a8(0xc3)](_0x2418a8(0xef)),0x1;try{const _0x1e9ac2=_0x4c0424[_0x2418a8(0xd5)];_0x4c0424[_0x2418a8(0x121)]&&(console[_0x2418a8(0xc3)](_0x2418a8(0xb4)+_0x1ce11e),_0x1e9ac2&&console[_0x2418a8(0xc3)]('Reason:\x20'+_0x1e9ac2));if(!_0x4c0424['yes']){const _0x228dd0=await confirm(_0x2418a8(0x119)+_0x1ce11e+'?');if(!_0x228dd0)return console[_0x2418a8(0xc3)](_0x2418a8(0x12a)),0x0;}const _0x1abcc9=await withSpinner(_0x2418a8(0xe1),()=>_0x13e47b[_0x2418a8(0xda)][_0x2418a8(0x109)](_0x1ce11e,_0x1e9ac2),{'verbose':_0x4c0424['verbose']}),_0x5a9242=_0x1abcc9[_0x2418a8(0xa9)];return console[_0x2418a8(0xc3)]('✔\x20'+_0x5a9242),0x0;}catch(_0x3949cd){if(_0x3949cd instanceof SDKError)return console['error'](_0x2418a8(0x144)+_0x3949cd[_0x2418a8(0x134)]),_0x3949cd[_0x2418a8(0x143)]&&console['error'](_0x2418a8(0xbf)+_0x3949cd[_0x2418a8(0x143)]),0x1;throw _0x3949cd;}}}export class WorkflowRetryCommand extends BaseCommand{[a39_0x3c450e(0x113)]=a39_0x3c450e(0xe6);[a39_0x3c450e(0x13f)]=a39_0x3c450e(0x147);async['execute'](_0x36b346){const _0x38bf80=a39_0x3c450e,{options:_0xb0cf9f,args:_0x15f51f,tdx:_0x572a55}=_0x36b346,_0x3e5da8=_0x15f51f[0x0];if(!_0x3e5da8)return console[_0x38bf80(0xc3)](_0x38bf80(0xf9)),console['error'](_0x38bf80(0xc8)),0x1;let _0x43c96d=![],_0xa2a293=_0x3e5da8;if(_0x3e5da8['startsWith'](_0x38bf80(0x145)))_0x43c96d=!![],_0xa2a293=_0x3e5da8['substring'](0x8);else{if(_0x3e5da8[_0x38bf80(0x116)](_0x38bf80(0x132)))_0x43c96d=![],_0xa2a293=_0x3e5da8[_0x38bf80(0xd4)](0x8);else return console[_0x38bf80(0xc3)](_0x38bf80(0xbb)),console['error']('Usage:\x20workflow\x20retry\x20session:<id>\x20or\x20workflow\x20retry\x20attempt:<id>'),0x1;}try{const _0x2037e8=_0xb0cf9f['fromTask'],_0x156de9=_0xb0cf9f[_0x38bf80(0xaa)],_0x4cbb37=_0xb0cf9f[_0x38bf80(0x11d)],_0x401ebe=_0xb0cf9f[_0x38bf80(0x138)];_0xb0cf9f[_0x38bf80(0x121)]&&(console[_0x38bf80(0xc3)](_0x38bf80(0xac)+(_0x43c96d?'session':_0x38bf80(0xb6))+'\x20'+_0xa2a293),_0x2037e8&&console['error'](_0x38bf80(0xb9)+_0x2037e8),_0x156de9&&console[_0x38bf80(0xc3)](_0x38bf80(0x12f)+_0x156de9),_0x4cbb37&&console[_0x38bf80(0xc3)](_0x38bf80(0x127)+_0x4cbb37),_0x401ebe&&console[_0x38bf80(0xc3)](_0x38bf80(0x11c)));let _0x579bcf;if(_0x4cbb37)try{if(_0x4cbb37['startsWith']('@')){const _0x1bbeb0=await import('fs/promises'),_0x250998=_0x4cbb37[_0x38bf80(0xd4)](0x1),_0x40ddf=await _0x1bbeb0['readFile'](_0x250998,_0x38bf80(0xc6));_0x579bcf=JSON[_0x38bf80(0x10f)](_0x40ddf);}else _0x579bcf=JSON['parse'](_0x4cbb37);}catch{return console[_0x38bf80(0xc3)](_0x38bf80(0x14a)),0x1;}if(!_0xb0cf9f[_0x38bf80(0x136)]){const _0x2f8b4d=await confirm(_0x38bf80(0xd6)+(_0x43c96d?_0x38bf80(0xe7):_0x38bf80(0xb6))+'\x20'+_0xa2a293+'?');if(!_0x2f8b4d)return console[_0x38bf80(0xc3)](_0x38bf80(0x12a)),0x0;}let _0x44567f;_0x43c96d?_0x44567f=await withSpinner(_0x38bf80(0x103),()=>_0x572a55[_0x38bf80(0xda)][_0x38bf80(0x14b)](_0xa2a293,{'fromTask':_0x2037e8,'retryParams':_0x579bcf}),{'verbose':_0xb0cf9f[_0x38bf80(0x121)]}):_0x44567f=await withSpinner(_0x38bf80(0xfe),()=>_0x572a55[_0x38bf80(0xda)][_0x38bf80(0x14d)](_0xa2a293,{'resumeFrom':_0x156de9,'retryParams':_0x579bcf,'force':_0x401ebe}),{'verbose':_0xb0cf9f[_0x38bf80(0x121)]});const _0x28bcd8=_0x44567f['data'];return console[_0x38bf80(0xc3)](_0x38bf80(0xf7)),console[_0x38bf80(0xc3)]('\x20\x20New\x20attempt\x20ID:\x20'+_0x28bcd8[_0x38bf80(0xf5)]),console['error'](_0x38bf80(0xf1)+_0x28bcd8[_0x38bf80(0xad)]),0x0;}catch(_0x5b56c3){if(_0x5b56c3 instanceof SDKError)return console[_0x38bf80(0xc3)](_0x38bf80(0x144)+_0x5b56c3[_0x38bf80(0x134)]),_0x5b56c3[_0x38bf80(0x143)]&&console[_0x38bf80(0xc3)](_0x38bf80(0xbf)+_0x5b56c3['cause']),0x1;throw _0x5b56c3;}}}export class WorkflowRunCommand extends BaseCommand{[a39_0x3c450e(0x113)]=a39_0x3c450e(0xe4);[a39_0x3c450e(0x13f)]=a39_0x3c450e(0x106);async[a39_0x3c450e(0xd3)](_0x592084){const _0x206e80=a39_0x3c450e,{options:_0x54c7f9,args:_0x56c13f,tdx:_0x47b837}=_0x592084,_0xac3e22=_0x56c13f[0x0];if(!_0xac3e22)return console['error'](_0x206e80(0x111)),console[_0x206e80(0xc3)](_0x206e80(0xc7)),0x1;const _0x37fc5b=_0x54c7f9[_0x206e80(0x135)],_0x4fa03b=_0x54c7f9['sessionTime'],_0x247563={};if(_0x37fc5b&&Array[_0x206e80(0x124)](_0x37fc5b))for(const _0x200198 of _0x37fc5b){const _0x36c50a=_0x200198[_0x206e80(0x12c)]('=');if(_0x36c50a===-0x1)return console[_0x206e80(0xc3)](_0x206e80(0xdf)+_0x200198),console[_0x206e80(0xc3)]('Expected\x20format:\x20--param\x20key=value'),0x1;const _0x129426=_0x200198[_0x206e80(0xd4)](0x0,_0x36c50a),_0x26ab30=_0x200198['substring'](_0x36c50a+0x1);try{_0x247563[_0x129426]=JSON[_0x206e80(0x10f)](_0x26ab30);}catch{_0x247563[_0x129426]=_0x26ab30;}}_0x54c7f9[_0x206e80(0x121)]&&(console[_0x206e80(0xc3)](_0x206e80(0x10b)+_0xac3e22),Object[_0x206e80(0xed)](_0x247563)[_0x206e80(0x13c)]>0x0&&console[_0x206e80(0xc3)](_0x206e80(0x117)+JSON[_0x206e80(0x120)](_0x247563)),_0x4fa03b&&console[_0x206e80(0xc3)](_0x206e80(0x123)+_0x4fa03b));const _0x2e02a0=await withSpinner(_0x206e80(0x14e),()=>_0x47b837[_0x206e80(0xda)]['run'](_0xac3e22,_0x247563,{'sessionTime':_0x4fa03b}),{'verbose':_0x54c7f9['verbose']}),_0x2ba102=_0x2e02a0[_0x206e80(0xa9)];return console[_0x206e80(0xc3)](_0x206e80(0x12e)),console['error'](_0x206e80(0x107)+_0x2ba102['id']),console[_0x206e80(0xc3)]('\x20\x20Session\x20ID:\x20'+_0x2ba102['sessionId']),console['error'](_0x206e80(0x10a)+_0x2ba102[_0x206e80(0xdc)]?.['name']),console[_0x206e80(0xc3)]('\x20\x20Workflow:\x20'+_0x2ba102[_0x206e80(0xda)]?.[_0x206e80(0x113)]),0x0;}}function a39_0x7745(_0x1efa60,_0x1703ee){const _0x3fe258=a39_0x3fe2();return a39_0x7745=function(_0x77456a,_0x3eb568){_0x77456a=_0x77456a-0xa8;let _0x98f521=_0x3fe258[_0x77456a];return _0x98f521;},a39_0x7745(_0x1efa60,_0x1703ee);}export class WorkflowDownloadCommand extends BaseCommand{[a39_0x3c450e(0x113)]='workflow:download';[a39_0x3c450e(0x13f)]=a39_0x3c450e(0x100);async['execute'](_0xa8a85){const _0x24b83c=a39_0x3c450e,{options:_0xe69e9a,args:_0x3615fc,tdx:_0x341884}=_0xa8a85,_0x3d38ff=_0x3615fc[0x0],_0x562db5=_0x3615fc[0x1]||'.';if(!_0x3d38ff)return console[_0x24b83c(0xc3)]('Error:\x20Project\x20name\x20is\x20required'),console[_0x24b83c(0xc3)]('Usage:\x20workflow:download\x20<project-name>\x20[output-dir]'),0x1;const _0x3a734d=_0xe69e9a[_0x24b83c(0x112)];_0xe69e9a['verbose']&&(console['error'](_0x24b83c(0xb2)+_0x3d38ff),console[_0x24b83c(0xc3)]('Output\x20directory:\x20'+_0x562db5),_0x3a734d&&console[_0x24b83c(0xc3)](_0x24b83c(0xde)+_0x3a734d));const _0x5ca4ba=await withSpinner(_0x24b83c(0xcf)+_0x3d38ff+_0x24b83c(0x146),()=>_0x341884['workflow'][_0x24b83c(0xb8)](_0x3d38ff,_0x562db5,{'revision':_0x3a734d}),{'verbose':_0xe69e9a['verbose']}),_0x2ebb5b=_0x5ca4ba[_0x24b83c(0xa9)];return console[_0x24b83c(0xc3)](_0x24b83c(0xe2)+_0x2ebb5b[_0x24b83c(0xb5)]),console[_0x24b83c(0xc3)]('\x20\x20Revision:\x20'+_0x2ebb5b[_0x24b83c(0x112)]),console[_0x24b83c(0xc3)]('\x20\x20Files\x20extracted:\x20'+_0x2ebb5b[_0x24b83c(0x13a)]),console[_0x24b83c(0xc3)]('\x20\x20Location:\x20'+_0x562db5+'/'+_0x2ebb5b[_0x24b83c(0xb5)]),0x0;}}export class WorkflowPushCommand extends BaseCommand{['name']=a39_0x3c450e(0x139);[a39_0x3c450e(0x13f)]=a39_0x3c450e(0x130);async[a39_0x3c450e(0xd3)](_0x59ded1){const _0x42cf66=a39_0x3c450e,{options:_0x325b6f,args:_0x27e3d0,tdx:_0x4674ed}=_0x59ded1;let _0xbd77f='.',_0x17825f=_0x325b6f[_0x42cf66(0x113)];if(_0x27e3d0[0x0]){const {promises:_0x434aff}=await import('fs');try{const _0x499998=await _0x434aff[_0x42cf66(0xf2)](_0x27e3d0[0x0]);if(_0x499998['isDirectory']())_0xbd77f=_0x27e3d0[0x0];else return console[_0x42cf66(0xc3)](_0x42cf66(0x144)+_0x27e3d0[0x0]+'\x20is\x20not\x20a\x20directory'),0x1;}catch{_0x17825f=_0x27e3d0[0x0],_0xbd77f='.';}}const _0x2c0286=_0x325b6f[_0x42cf66(0x112)],_0x3d4c5f=_0x325b6f[_0x42cf66(0xec)];_0x325b6f[_0x42cf66(0x121)]&&(console['error'](_0x42cf66(0xf4)+_0xbd77f),_0x17825f&&console[_0x42cf66(0xc3)](_0x42cf66(0x102)+_0x17825f),_0x2c0286&&console['error'](_0x42cf66(0xde)+_0x2c0286),_0x3d4c5f&&console[_0x42cf66(0xc3)](_0x42cf66(0x126)));const _0x4f1187=await withSpinner(_0x42cf66(0xe5),()=>_0x4674ed[_0x42cf66(0xda)][_0x42cf66(0x11a)](_0xbd77f,{'projectName':_0x17825f,'revision':_0x2c0286,'skipValidation':_0x3d4c5f}),{'verbose':_0x325b6f[_0x42cf66(0x121)]}),_0x37dbfd=_0x4f1187[_0x42cf66(0xa9)];return console[_0x42cf66(0xc3)](_0x42cf66(0x105)+_0x37dbfd[_0x42cf66(0xb5)]),console[_0x42cf66(0xc3)](_0x42cf66(0x10d)+_0x37dbfd[_0x42cf66(0xbe)]),console[_0x42cf66(0xc3)]('\x20\x20Revision:\x20'+_0x37dbfd[_0x42cf66(0x112)]),0x0;}}export class WorkflowDeleteCommand extends BaseCommand{[a39_0x3c450e(0x113)]=a39_0x3c450e(0xc4);['description']=a39_0x3c450e(0xee);async[a39_0x3c450e(0xd3)](_0x170f57){const _0x5eac27=a39_0x3c450e,{options:_0x2a7867,args:_0x19c99a,tdx:_0x34de81}=_0x170f57,_0x132f04=_0x19c99a[0x0];if(!_0x132f04)return console['error']('Error:\x20Project\x20name\x20or\x20ID\x20is\x20required'),console[_0x5eac27(0xc3)](_0x5eac27(0x128)),0x1;_0x2a7867[_0x5eac27(0x121)]&&console[_0x5eac27(0xc3)](_0x5eac27(0xb2)+_0x132f04);if(!_0x2a7867[_0x5eac27(0x136)]){const _0x2ec0f9=await confirm(_0x5eac27(0x12d)+_0x132f04+_0x5eac27(0xe3));if(!_0x2ec0f9)return console['error']('Cancelled'),0x0;}const _0x1a8f00=await withSpinner(_0x5eac27(0xf3)+_0x132f04+_0x5eac27(0x146),()=>_0x34de81[_0x5eac27(0xda)][_0x5eac27(0xb0)](_0x132f04),{'verbose':_0x2a7867[_0x5eac27(0x121)]}),_0x215a7d=_0x1a8f00['data'];return console['error']('✔\x20Deleted\x20project\x20'+_0x215a7d[_0x5eac27(0xb5)]),console[_0x5eac27(0xc3)](_0x5eac27(0x10d)+_0x215a7d[_0x5eac27(0xbe)]),0x0;}}
package/dist/core/auth.js CHANGED
@@ -1 +1 @@
1
- (function(_0x536b17,_0x4217e1){const _0x36c143=a38_0x40fc,_0x26b741=_0x536b17();while(!![]){try{const _0x31a3e1=-parseInt(_0x36c143(0x180))/0x1*(parseInt(_0x36c143(0x17f))/0x2)+parseInt(_0x36c143(0x17d))/0x3+parseInt(_0x36c143(0x185))/0x4+parseInt(_0x36c143(0x186))/0x5*(-parseInt(_0x36c143(0x17e))/0x6)+-parseInt(_0x36c143(0x183))/0x7*(parseInt(_0x36c143(0x184))/0x8)+parseInt(_0x36c143(0x187))/0x9+-parseInt(_0x36c143(0x18f))/0xa;if(_0x31a3e1===_0x4217e1)break;else _0x26b741['push'](_0x26b741['shift']());}catch(_0x531e63){_0x26b741['push'](_0x26b741['shift']());}}}(a38_0x1f56,0xc3abc));import{platform}from'os';import{readFileSync}from'fs';function a38_0x1f56(){const _0x3e3b10=['248423aXLIrf','328ZSAXce','3890456rWrkLl','4020910LZeTEj','13583709IOPdrX','X-Trino-User','version','length','TD1\x20','0.0.0','Authorization','entries','4277460GABxOJ','3687228ABszBn','6fhmYxg','5116jDQntX','87Ssuklv','../../package.json','tdx/'];a38_0x1f56=function(){return _0x3e3b10;};return a38_0x1f56();}import{fileURLToPath}from'url';import{dirname,join}from'path';import{getAPIKey}from'./config.js';function a38_0x40fc(_0x4ef0fe,_0x24c49a){const _0x1f5632=a38_0x1f56();return a38_0x40fc=function(_0x40fcc0,_0x332e58){_0x40fcc0=_0x40fcc0-0x17d;let _0x3f968f=_0x1f5632[_0x40fcc0];return _0x3f968f;},a38_0x40fc(_0x4ef0fe,_0x24c49a);}export function getVersion(){const _0x54805d=a38_0x40fc;try{const _0x4c08f5=fileURLToPath(import.meta['url']),_0x5e615d=dirname(_0x4c08f5),_0x132a1f=join(_0x5e615d,_0x54805d(0x181)),_0x256481=JSON['parse'](readFileSync(_0x132a1f,'utf-8'));return _0x256481[_0x54805d(0x189)];}catch{return _0x54805d(0x18c);}}export function getUserAgent(){const _0x3cfd25=a38_0x40fc,_0x3862c7=getVersion(),_0x3d3b8b=platform(),_0x141f2a=process[_0x3cfd25(0x189)]['replace']('v','');return _0x3cfd25(0x182)+_0x3862c7+'\x20('+_0x3d3b8b+';\x20node/'+_0x141f2a+')';}export function getAuthHeaders(_0xe34992,_0x31efcb){const _0x148379=a38_0x40fc,_0x47ac4f=getVersion(),_0x169bc0={'User-Agent':getUserAgent(),'X-TD-Client':'tdx','X-TD-Client-Version':_0x47ac4f};return _0x31efcb&&(_0x169bc0[_0x148379(0x18d)]=_0x148379(0x18b)+_0x31efcb),_0x169bc0;}export function toHeaderRecord(_0x59b211){const _0x57b4fa=a38_0x40fc,_0x188b90={};for(const [_0xeb6e1d,_0x1fef40]of Object[_0x57b4fa(0x18e)](_0x59b211)){_0x1fef40!==undefined&&(_0x188b90[_0xeb6e1d]=_0x1fef40);}return _0x188b90;}export function getTrinoHeaders(_0x189f1d,_0x129636){const _0x529275=a38_0x40fc,_0x5fca3e=getAuthHeaders(_0x189f1d,_0x129636),_0x3a16bb=toHeaderRecord(_0x5fca3e);return delete _0x3a16bb[_0x529275(0x18d)],_0x129636&&(_0x3a16bb[_0x529275(0x188)]=_0x129636),_0x3a16bb;}export function hasAPIKey(_0x427eb5){const _0x331136=a38_0x40fc,_0x1443b2=getAPIKey(_0x427eb5);return _0x1443b2!==undefined&&_0x1443b2[_0x331136(0x18a)]>0x0;}
1
+ (function(_0x63309e,_0x2dea2b){const _0x3e662a=a40_0x2123,_0x5f0183=_0x63309e();while(!![]){try{const _0x11abfd=-parseInt(_0x3e662a(0x1ca))/0x1+-parseInt(_0x3e662a(0x1ba))/0x2+parseInt(_0x3e662a(0x1cd))/0x3+parseInt(_0x3e662a(0x1c3))/0x4+parseInt(_0x3e662a(0x1c4))/0x5*(parseInt(_0x3e662a(0x1cc))/0x6)+-parseInt(_0x3e662a(0x1bd))/0x7*(parseInt(_0x3e662a(0x1cb))/0x8)+parseInt(_0x3e662a(0x1c5))/0x9;if(_0x11abfd===_0x2dea2b)break;else _0x5f0183['push'](_0x5f0183['shift']());}catch(_0x149ebe){_0x5f0183['push'](_0x5f0183['shift']());}}}(a40_0x53f9,0x830fa));import{platform}from'os';import{readFileSync}from'fs';import{fileURLToPath}from'url';import{dirname,join}from'path';import{getAPIKey}from'./config.js';export function getVersion(){const _0x1077c4=a40_0x2123;try{const _0x577206=fileURLToPath(import.meta[_0x1077c4(0x1bf)]),_0x4a8d65=dirname(_0x577206),_0x344d90=join(_0x4a8d65,_0x1077c4(0x1c1)),_0x4ccb6d=JSON['parse'](readFileSync(_0x344d90,'utf-8'));return _0x4ccb6d[_0x1077c4(0x1be)];}catch{return _0x1077c4(0x1c8);}}export function getUserAgent(){const _0x2b6a8c=a40_0x2123,_0x17d5b2=getVersion(),_0xcb3457=platform(),_0x98a0f1=process[_0x2b6a8c(0x1be)][_0x2b6a8c(0x1c2)]('v','');return _0x2b6a8c(0x1c9)+_0x17d5b2+'\x20('+_0xcb3457+_0x2b6a8c(0x1c6)+_0x98a0f1+')';}function a40_0x2123(_0x437a95,_0xc02b6d){const _0x53f9c7=a40_0x53f9();return a40_0x2123=function(_0x2123e4,_0x29946e){_0x2123e4=_0x2123e4-0x1b9;let _0x39e187=_0x53f9c7[_0x2123e4];return _0x39e187;},a40_0x2123(_0x437a95,_0xc02b6d);}export function getAuthHeaders(_0x496e90,_0x4956da){const _0x44f1af=a40_0x2123,_0x77b474=getVersion(),_0x512981={'User-Agent':getUserAgent(),'X-TD-Client':_0x44f1af(0x1bb),'X-TD-Client-Version':_0x77b474};return _0x4956da&&(_0x512981[_0x44f1af(0x1c0)]=_0x44f1af(0x1b9)+_0x4956da),_0x512981;}export function toHeaderRecord(_0x3a73f1){const _0x16dd93=a40_0x2123,_0x209b9f={};for(const [_0x39d246,_0x3830b1]of Object[_0x16dd93(0x1bc)](_0x3a73f1)){_0x3830b1!==undefined&&(_0x209b9f[_0x39d246]=_0x3830b1);}return _0x209b9f;}export function getTrinoHeaders(_0x568d9b,_0x239222){const _0x557c42=getAuthHeaders(_0x568d9b,_0x239222),_0x6dd319=toHeaderRecord(_0x557c42);return delete _0x6dd319['Authorization'],_0x239222&&(_0x6dd319['X-Trino-User']=_0x239222),_0x6dd319;}export function hasAPIKey(_0x731ad6){const _0x48548c=a40_0x2123,_0x17284a=getAPIKey(_0x731ad6);return _0x17284a!==undefined&&_0x17284a[_0x48548c(0x1c7)]>0x0;}function a40_0x53f9(){const _0x2f5318=['0.0.0','tdx/','868819eaLetJ','8EpazVp','6kArNyl','950277OCYBmg','TD1\x20','2081714IImjaP','tdx','entries','4835201dyYviB','version','url','Authorization','../../package.json','replace','1244516iLghdl','2839540EmdlYM','17473041cfCaLY',';\x20node/','length'];a40_0x53f9=function(){return _0x2f5318;};return a40_0x53f9();}