@treasuredata/tdx 0.4.2 → 0.4.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (111) hide show
  1. package/dist/build-info.json +2 -2
  2. package/dist/cli.js +1 -1
  3. package/dist/cli.js.map +1 -1
  4. package/dist/client/cdp-api-client.js +1 -1
  5. package/dist/client/engage-api-client.d.ts +57 -0
  6. package/dist/client/engage-api-client.d.ts.map +1 -0
  7. package/dist/client/engage-api-client.js +1 -0
  8. package/dist/client/engage-api-client.js.map +1 -0
  9. package/dist/client/http-client.js +1 -1
  10. package/dist/client/llm-api-client.d.ts.map +1 -1
  11. package/dist/client/llm-api-client.js +1 -1
  12. package/dist/client/llm-api-client.js.map +1 -1
  13. package/dist/client/rate-limiter.js +1 -1
  14. package/dist/client/td-api-client.js +1 -1
  15. package/dist/client/trino-api-client.js +1 -1
  16. package/dist/client/workflow-client.js +1 -1
  17. package/dist/commands/activations.js +1 -1
  18. package/dist/commands/api-command.js +1 -1
  19. package/dist/commands/auth-command.js +1 -1
  20. package/dist/commands/chat-command.js +1 -1
  21. package/dist/commands/claude-command.js +1 -1
  22. package/dist/commands/command.js +1 -1
  23. package/dist/commands/context-command.js +1 -1
  24. package/dist/commands/databases.js +1 -1
  25. package/dist/commands/describe.js +1 -1
  26. package/dist/commands/engage-command.d.ts +69 -0
  27. package/dist/commands/engage-command.d.ts.map +1 -0
  28. package/dist/commands/engage-command.js +1 -0
  29. package/dist/commands/engage-command.js.map +1 -0
  30. package/dist/commands/job-command.js +1 -1
  31. package/dist/commands/llm-command.js +1 -1
  32. package/dist/commands/llm-proxy.js +1 -1
  33. package/dist/commands/parent-segment-command.js +1 -1
  34. package/dist/commands/profiles-command.js +1 -1
  35. package/dist/commands/query-command.js +1 -1
  36. package/dist/commands/segment-command.js +1 -1
  37. package/dist/commands/segment-create-command.js +1 -1
  38. package/dist/commands/segment-fields-command.js +1 -1
  39. package/dist/commands/segment-pwd-command.js +1 -1
  40. package/dist/commands/segment-update-command.js +1 -1
  41. package/dist/commands/segment-use-command.js +1 -1
  42. package/dist/commands/segments.js +1 -1
  43. package/dist/commands/show.js +1 -1
  44. package/dist/commands/tables.js +1 -1
  45. package/dist/commands/use-command.js +1 -1
  46. package/dist/commands/workflow-command.js +1 -1
  47. package/dist/core/auth.js +1 -1
  48. package/dist/core/config.js +1 -1
  49. package/dist/core/credential-cache.js +1 -1
  50. package/dist/core/global-context.js +1 -1
  51. package/dist/core/keychain.js +1 -1
  52. package/dist/core/profile.js +1 -1
  53. package/dist/core/project-config.js +1 -1
  54. package/dist/core/session.js +1 -1
  55. package/dist/index.js +1 -1
  56. package/dist/proxy/anthropic-adapter.js +1 -1
  57. package/dist/proxy/server.js +1 -1
  58. package/dist/proxy/session-cache.js +1 -1
  59. package/dist/sdk/api.js +1 -1
  60. package/dist/sdk/engage.d.ts +152 -0
  61. package/dist/sdk/engage.d.ts.map +1 -0
  62. package/dist/sdk/engage.js +1 -0
  63. package/dist/sdk/engage.js.map +1 -0
  64. package/dist/sdk/errors.js +1 -1
  65. package/dist/sdk/index.d.ts +7 -0
  66. package/dist/sdk/index.d.ts.map +1 -1
  67. package/dist/sdk/index.js +1 -1
  68. package/dist/sdk/index.js.map +1 -1
  69. package/dist/sdk/job.js +1 -1
  70. package/dist/sdk/llm.js +1 -1
  71. package/dist/sdk/query.js +1 -1
  72. package/dist/sdk/segment.js +1 -1
  73. package/dist/sdk/workflow.js +1 -1
  74. package/dist/types/endpoints.d.ts +4 -0
  75. package/dist/types/endpoints.d.ts.map +1 -1
  76. package/dist/types/endpoints.js +1 -1
  77. package/dist/types/endpoints.js.map +1 -1
  78. package/dist/types/engage.d.ts +340 -0
  79. package/dist/types/engage.d.ts.map +1 -0
  80. package/dist/types/engage.js +1 -0
  81. package/dist/types/engage.js.map +1 -0
  82. package/dist/types/index.d.ts +2 -1
  83. package/dist/types/index.d.ts.map +1 -1
  84. package/dist/types/index.js +1 -1
  85. package/dist/utils/agent-ref-parser.js +1 -1
  86. package/dist/utils/chat-cache.js +1 -1
  87. package/dist/utils/colors.js +1 -1
  88. package/dist/utils/command-output.js +1 -1
  89. package/dist/utils/constants.js +1 -1
  90. package/dist/utils/file-permissions.js +1 -1
  91. package/dist/utils/format-detector.js +1 -1
  92. package/dist/utils/formatters.js +1 -1
  93. package/dist/utils/json-loader.js +1 -1
  94. package/dist/utils/llm-backup-utils.js +1 -1
  95. package/dist/utils/model-aliases.js +1 -1
  96. package/dist/utils/option-validation.js +1 -1
  97. package/dist/utils/port.js +1 -1
  98. package/dist/utils/process.js +1 -1
  99. package/dist/utils/prompt.js +1 -1
  100. package/dist/utils/segment-path-parser.js +1 -1
  101. package/dist/utils/segment-ref-parser.js +1 -1
  102. package/dist/utils/spinner.js +1 -1
  103. package/dist/utils/sql-parser.js +1 -1
  104. package/dist/utils/sse-parser.js +1 -1
  105. package/dist/utils/string-utils.js +1 -1
  106. package/dist/utils/table-ref-parser.js +1 -1
  107. package/dist/utils/tdx-logger.js +1 -1
  108. package/dist/utils/tree-formatter.js +1 -1
  109. package/dist/utils/version-check.js +1 -1
  110. package/dist/utils/workflow-utils.js +1 -1
  111. package/package.json +1 -1
@@ -1 +1 @@
1
- const a24_0x19354b=a24_0x524c;(function(_0x2201b8,_0x27da7d){const _0x10133e=a24_0x524c,_0x69640f=_0x2201b8();while(!![]){try{const _0x56e548=parseInt(_0x10133e(0x1d1))/0x1+parseInt(_0x10133e(0x1c3))/0x2*(parseInt(_0x10133e(0x1b2))/0x3)+-parseInt(_0x10133e(0x1c2))/0x4+parseInt(_0x10133e(0x1b8))/0x5+parseInt(_0x10133e(0x1a7))/0x6*(-parseInt(_0x10133e(0x1cc))/0x7)+-parseInt(_0x10133e(0x1ce))/0x8*(-parseInt(_0x10133e(0x1ba))/0x9)+parseInt(_0x10133e(0x1b0))/0xa;if(_0x56e548===_0x27da7d)break;else _0x69640f['push'](_0x69640f['shift']());}catch(_0x552e4a){_0x69640f['push'](_0x69640f['shift']());}}}(a24_0x3049,0x69b61));function a24_0x3049(){const _0x1e549c=['rule','createSegment','segments','Resolved\x20folder\x20ID:\x20','\x20\x20tdx\x20segment\x20create\x20\x22My\x20Audience/Marketing/Premium\x22\x20--rule\x20\x27...\x27','Resolving\x20folder\x20path\x20\x27','3587549wnhKWY','\x27...','332600NDHeIj','folderId','verbose','382026lmPeVA','Usage:\x20tdx\x20segment\x20create\x20<parent/segment_name>\x20[options]','Segment\x20name:\x20','execute','name','folder','kind','\x27\x20with\x20ID:\x20','Error:\x20Cannot\x20create\x20segment\x20in\x20a\x20segment.\x20Parent\x20path\x20must\x20be\x20a\x20folder\x20or\x20parent.','data','ruleFile','Parent\x20path:\x20','\x20\x20tdx\x20segment\x20create\x20\x22My\x20Audience/High\x20Value\x22\x20--rule\x20\x27...\x27','6vzobDZ','description','invisible','length','resolveParentId','segmentPath','Target\x20path:\x20','Examples:','Resolving\x20folder\x20\x27','1319330gPSQtJ','noCountPopulation','1023UJTYir','Create\x20child\x20segment\x20with\x20filtering\x20rules','Resolving\x20parent\x20segment\x20\x27','\x20\x20tdx\x20segment\x20create\x20\x22Premium\x22\x20--rule\x20\x27...\x27\x20\x20#\x20Relative\x20to\x20context','includes','Error:\x20Segment\x20path\x20or\x20name\x20is\x20required','2400345InIhkL','Creating\x20segment\x20\x27','9hnKYif','error','resolveFolderId','Resolved\x20relative\x20path\x20to:\x20','resolvePathToResource','type','site','Usage:\x20tdx\x20segment\x20create\x20<path>\x20[options]','1688948kJceHm','1948RZIZIO','Site:\x20','segment'];a24_0x3049=function(){return _0x1e549c;};return a24_0x3049();}import{BaseCommand}from'./command.js';import{handleSDKOutput}from'../utils/command-output.js';import{withSpinner}from'../utils/spinner.js';import{loadJSONFromOptions}from'../utils/json-loader.js';function a24_0x524c(_0x2c65c8,_0x1bb210){const _0x304939=a24_0x3049();return a24_0x524c=function(_0x524ca2,_0x52a456){_0x524ca2=_0x524ca2-0x19b;let _0x243b64=_0x304939[_0x524ca2];return _0x243b64;},a24_0x524c(_0x2c65c8,_0x1bb210);}import{parsePath,getParentPath,getBaseName}from'../utils/segment-path-parser.js';export class SegmentCreateCommand extends BaseCommand{[a24_0x19354b(0x19e)]='segment:create';[a24_0x19354b(0x1a8)]=a24_0x19354b(0x1b3);async[a24_0x19354b(0x19d)](_0x48e6f7){const _0x54b12c=a24_0x19354b,{options:_0x563c17,args:_0x1fee7a,tdx:_0x4211bd}=_0x48e6f7,_0x32c987=_0x563c17;if(_0x1fee7a[_0x54b12c(0x1aa)]===0x0)return console[_0x54b12c(0x1bb)](_0x54b12c(0x1b7)),console['error'](_0x54b12c(0x1c1)),console[_0x54b12c(0x1bb)](_0x54b12c(0x1ae)),console[_0x54b12c(0x1bb)](_0x54b12c(0x1a6)),console['error'](_0x54b12c(0x1ca)),console[_0x54b12c(0x1bb)](_0x54b12c(0x1b5)),0x1;const _0x23fdf2=_0x1fee7a[0x0],_0x277683=_0x563c17[_0x54b12c(0x1ac)];let _0x5399e5=_0x23fdf2;_0x277683&&!_0x23fdf2[_0x54b12c(0x1b6)]('/')&&(_0x5399e5=_0x277683+'/'+_0x23fdf2,_0x32c987['verbose']&&console[_0x54b12c(0x1bb)](_0x54b12c(0x1bd)+_0x5399e5));const _0x1b8ecb=parsePath(_0x5399e5);if(_0x1b8ecb[_0x54b12c(0x1c8)][_0x54b12c(0x1aa)]<0x2)return console[_0x54b12c(0x1bb)]('Error:\x20Full\x20path\x20required\x20(parent/segment_name\x20or\x20parent/folder/segment_name)'),console[_0x54b12c(0x1bb)](_0x54b12c(0x19b)),0x1;const _0x1983c1=_0x1b8ecb[_0x54b12c(0x1c8)][0x0],_0x140efb=getBaseName(_0x5399e5),_0x195821=getParentPath(_0x5399e5);_0x32c987[_0x54b12c(0x1d0)]&&(console[_0x54b12c(0x1bb)](_0x54b12c(0x1c4)+_0x32c987[_0x54b12c(0x1c0)]),console[_0x54b12c(0x1bb)](_0x54b12c(0x1ad)+_0x5399e5),console[_0x54b12c(0x1bb)]('Parent:\x20'+_0x1983c1),console[_0x54b12c(0x1bb)](_0x54b12c(0x19c)+_0x140efb),console['error'](_0x54b12c(0x1a5)+_0x195821));const _0x5b7101=await withSpinner(_0x54b12c(0x1b4)+_0x1983c1+_0x54b12c(0x1cd),()=>_0x4211bd[_0x54b12c(0x1c5)][_0x54b12c(0x1ab)](_0x1983c1),{'verbose':_0x32c987[_0x54b12c(0x1d0)]}),_0x11200b=_0x5b7101[_0x54b12c(0x1a3)];let _0x2078e9;if(_0x1b8ecb[_0x54b12c(0x1c8)][_0x54b12c(0x1aa)]>0x2){const _0x4a39ae=await withSpinner(_0x54b12c(0x1cb)+_0x195821+'\x27...',()=>_0x4211bd[_0x54b12c(0x1c5)][_0x54b12c(0x1be)](_0x195821),{'verbose':_0x32c987['verbose']}),_0x4569df=_0x4a39ae[_0x54b12c(0x1a3)];if(_0x4569df[_0x54b12c(0x1bf)]!==_0x54b12c(0x19f)&&_0x4569df[_0x54b12c(0x1bf)]!=='parent')return console[_0x54b12c(0x1bb)](_0x54b12c(0x1a2)),0x1;_0x2078e9=_0x4569df[_0x54b12c(0x1cf)];}else{if(_0x32c987['folder']){const _0x36dc8f=await withSpinner(_0x54b12c(0x1af)+_0x32c987['folder']+_0x54b12c(0x1cd),()=>_0x4211bd[_0x54b12c(0x1c5)][_0x54b12c(0x1bc)](_0x11200b,_0x32c987['folder']),{'verbose':_0x32c987[_0x54b12c(0x1d0)]});_0x2078e9=_0x36dc8f[_0x54b12c(0x1a3)];}}_0x32c987[_0x54b12c(0x1d0)]&&_0x2078e9&&console[_0x54b12c(0x1bb)](_0x54b12c(0x1c9)+_0x2078e9);const _0x5ed4df=await loadJSONFromOptions(_0x32c987[_0x54b12c(0x1c6)],_0x32c987[_0x54b12c(0x1a4)]),_0x3ccc4e={'name':_0x140efb,'description':_0x32c987[_0x54b12c(0x1a8)],'rule':_0x5ed4df,'kind':_0x32c987[_0x54b12c(0x1a0)]!==undefined?parseInt(_0x32c987[_0x54b12c(0x1a0)],0xa):undefined,'isVisible':_0x32c987[_0x54b12c(0x1a9)]?![]:undefined,'segmentFolderId':_0x2078e9,'countPopulation':_0x32c987[_0x54b12c(0x1b1)]?![]:undefined},_0x3a8584=await withSpinner(_0x54b12c(0x1b9)+_0x140efb+_0x54b12c(0x1cd),()=>_0x4211bd[_0x54b12c(0x1c5)][_0x54b12c(0x1c7)](_0x11200b,_0x3ccc4e),{'verbose':_0x32c987[_0x54b12c(0x1d0)]}),_0x3b8fe0=_0x3a8584['data'];return console[_0x54b12c(0x1bb)]('✔\x20Created\x20segment\x20\x27'+_0x3b8fe0[_0x54b12c(0x19e)]+_0x54b12c(0x1a1)+_0x3b8fe0['id']),_0x5399e5!==_0x23fdf2&&console[_0x54b12c(0x1bb)]('\x20\x20\x20Path:\x20'+_0x5399e5),await handleSDKOutput([_0x3b8fe0],_0x32c987),0x0;}}
1
+ const a26_0x5b29cc=a26_0x5964;function a26_0x46c1(){const _0x41a92a=['resolveParentId','Error:\x20Segment\x20path\x20or\x20name\x20is\x20required','ruleFile','\x27...','parent','execute','Error:\x20Cannot\x20create\x20segment\x20in\x20a\x20segment.\x20Parent\x20path\x20must\x20be\x20a\x20folder\x20or\x20parent.','Usage:\x20tdx\x20segment\x20create\x20<parent/segment_name>\x20[options]','Target\x20path:\x20','verbose','3iQUXxV','site','Error:\x20Full\x20path\x20required\x20(parent/segment_name\x20or\x20parent/folder/segment_name)','\x20\x20tdx\x20segment\x20create\x20\x22My\x20Audience/High\x20Value\x22\x20--rule\x20\x27...\x27','Resolving\x20folder\x20path\x20\x27','7168768gfygpx','Resolving\x20parent\x20segment\x20\x27','\x20\x20tdx\x20segment\x20create\x20\x22My\x20Audience/Marketing/Premium\x22\x20--rule\x20\x27...\x27','error','segment','9222588MmRdmi','5242890JKoESy','\x20\x20\x20Path:\x20','segments','Examples:','4034248RvEvfb','folderId','Resolving\x20folder\x20\x27','segment:create','1577388nhNOmo','Segment\x20name:\x20','type','data','Parent\x20path:\x20','name','description','kind','Resolved\x20relative\x20path\x20to:\x20','Creating\x20segment\x20\x27','7kcRrRz','length','100882aOvfsf','resolveFolderId','rule','noCountPopulation','invisible','Parent:\x20','4615728ORkMdG','folder'];a26_0x46c1=function(){return _0x41a92a;};return a26_0x46c1();}(function(_0xf80ea6,_0x46d85e){const _0x204ef7=a26_0x5964,_0x3ffb3c=_0xf80ea6();while(!![]){try{const _0x25a49c=parseInt(_0x204ef7(0x91))/0x1*(parseInt(_0x204ef7(0x7f))/0x2)+-parseInt(_0x204ef7(0x73))/0x3+parseInt(_0x204ef7(0x6f))/0x4+parseInt(_0x204ef7(0x6b))/0x5+-parseInt(_0x204ef7(0x85))/0x6*(-parseInt(_0x204ef7(0x7d))/0x7)+-parseInt(_0x204ef7(0x96))/0x8+-parseInt(_0x204ef7(0x6a))/0x9;if(_0x25a49c===_0x46d85e)break;else _0x3ffb3c['push'](_0x3ffb3c['shift']());}catch(_0x31faf4){_0x3ffb3c['push'](_0x3ffb3c['shift']());}}}(a26_0x46c1,0x81ab7));function a26_0x5964(_0x214bcb,_0x3a9bf9){const _0x46c10e=a26_0x46c1();return a26_0x5964=function(_0x59640b,_0x375cb2){_0x59640b=_0x59640b-0x66;let _0x4aa583=_0x46c10e[_0x59640b];return _0x4aa583;},a26_0x5964(_0x214bcb,_0x3a9bf9);}import{BaseCommand}from'./command.js';import{handleSDKOutput}from'../utils/command-output.js';import{withSpinner}from'../utils/spinner.js';import{loadJSONFromOptions}from'../utils/json-loader.js';import{parsePath,getParentPath,getBaseName}from'../utils/segment-path-parser.js';export class SegmentCreateCommand extends BaseCommand{[a26_0x5b29cc(0x78)]=a26_0x5b29cc(0x72);[a26_0x5b29cc(0x79)]='Create\x20child\x20segment\x20with\x20filtering\x20rules';async[a26_0x5b29cc(0x8c)](_0x37566f){const _0x51b954=a26_0x5b29cc,{options:_0x9f00c,args:_0x17b2c8,tdx:_0x1621a8}=_0x37566f,_0x3dfe2b=_0x9f00c;if(_0x17b2c8['length']===0x0)return console[_0x51b954(0x68)](_0x51b954(0x88)),console[_0x51b954(0x68)]('Usage:\x20tdx\x20segment\x20create\x20<path>\x20[options]'),console[_0x51b954(0x68)](_0x51b954(0x6e)),console[_0x51b954(0x68)](_0x51b954(0x94)),console[_0x51b954(0x68)](_0x51b954(0x67)),console[_0x51b954(0x68)]('\x20\x20tdx\x20segment\x20create\x20\x22Premium\x22\x20--rule\x20\x27...\x27\x20\x20#\x20Relative\x20to\x20context'),0x1;const _0x38da99=_0x17b2c8[0x0],_0x37dfbc=_0x9f00c['segmentPath'];let _0xe71049=_0x38da99;_0x37dfbc&&!_0x38da99['includes']('/')&&(_0xe71049=_0x37dfbc+'/'+_0x38da99,_0x3dfe2b[_0x51b954(0x90)]&&console[_0x51b954(0x68)](_0x51b954(0x7b)+_0xe71049));const _0x5ceefc=parsePath(_0xe71049);if(_0x5ceefc[_0x51b954(0x6d)][_0x51b954(0x7e)]<0x2)return console[_0x51b954(0x68)](_0x51b954(0x93)),console[_0x51b954(0x68)](_0x51b954(0x8e)),0x1;const _0x2c461d=_0x5ceefc[_0x51b954(0x6d)][0x0],_0x35e4b2=getBaseName(_0xe71049),_0x236f94=getParentPath(_0xe71049);_0x3dfe2b[_0x51b954(0x90)]&&(console[_0x51b954(0x68)]('Site:\x20'+_0x3dfe2b[_0x51b954(0x92)]),console[_0x51b954(0x68)](_0x51b954(0x8f)+_0xe71049),console[_0x51b954(0x68)](_0x51b954(0x84)+_0x2c461d),console[_0x51b954(0x68)](_0x51b954(0x74)+_0x35e4b2),console[_0x51b954(0x68)](_0x51b954(0x77)+_0x236f94));const _0x46f7ef=await withSpinner(_0x51b954(0x66)+_0x2c461d+_0x51b954(0x8a),()=>_0x1621a8[_0x51b954(0x69)][_0x51b954(0x87)](_0x2c461d),{'verbose':_0x3dfe2b[_0x51b954(0x90)]}),_0x2e62d7=_0x46f7ef[_0x51b954(0x76)];let _0x256cf7;if(_0x5ceefc[_0x51b954(0x6d)]['length']>0x2){const _0x3ec6b2=await withSpinner(_0x51b954(0x95)+_0x236f94+_0x51b954(0x8a),()=>_0x1621a8[_0x51b954(0x69)]['resolvePathToResource'](_0x236f94),{'verbose':_0x3dfe2b[_0x51b954(0x90)]}),_0xf241e0=_0x3ec6b2[_0x51b954(0x76)];if(_0xf241e0[_0x51b954(0x75)]!==_0x51b954(0x86)&&_0xf241e0['type']!==_0x51b954(0x8b))return console[_0x51b954(0x68)](_0x51b954(0x8d)),0x1;_0x256cf7=_0xf241e0[_0x51b954(0x70)];}else{if(_0x3dfe2b['folder']){const _0x32199d=await withSpinner(_0x51b954(0x71)+_0x3dfe2b[_0x51b954(0x86)]+_0x51b954(0x8a),()=>_0x1621a8['segment'][_0x51b954(0x80)](_0x2e62d7,_0x3dfe2b[_0x51b954(0x86)]),{'verbose':_0x3dfe2b['verbose']});_0x256cf7=_0x32199d[_0x51b954(0x76)];}}_0x3dfe2b['verbose']&&_0x256cf7&&console[_0x51b954(0x68)]('Resolved\x20folder\x20ID:\x20'+_0x256cf7);const _0x2c59a4=await loadJSONFromOptions(_0x3dfe2b[_0x51b954(0x81)],_0x3dfe2b[_0x51b954(0x89)]),_0x4b411a={'name':_0x35e4b2,'description':_0x3dfe2b['description'],'rule':_0x2c59a4,'kind':_0x3dfe2b[_0x51b954(0x7a)]!==undefined?parseInt(_0x3dfe2b[_0x51b954(0x7a)],0xa):undefined,'isVisible':_0x3dfe2b[_0x51b954(0x83)]?![]:undefined,'segmentFolderId':_0x256cf7,'countPopulation':_0x3dfe2b[_0x51b954(0x82)]?![]:undefined},_0x3467ca=await withSpinner(_0x51b954(0x7c)+_0x35e4b2+'\x27...',()=>_0x1621a8['segment']['createSegment'](_0x2e62d7,_0x4b411a),{'verbose':_0x3dfe2b[_0x51b954(0x90)]}),_0x1e2caa=_0x3467ca['data'];return console['error']('✔\x20Created\x20segment\x20\x27'+_0x1e2caa['name']+'\x27\x20with\x20ID:\x20'+_0x1e2caa['id']),_0xe71049!==_0x38da99&&console[_0x51b954(0x68)](_0x51b954(0x6c)+_0xe71049),await handleSDKOutput([_0x1e2caa],_0x3dfe2b),0x0;}}
@@ -1 +1 @@
1
- function a25_0x444c(_0x2daef2,_0x104163){const _0x2ebe9b=a25_0x2ebe();return a25_0x444c=function(_0x444cab,_0x3719bf){_0x444cab=_0x444cab-0x10b;let _0x5a88a5=_0x2ebe9b[_0x444cab];return _0x5a88a5;},a25_0x444c(_0x2daef2,_0x104163);}const a25_0x207b5b=a25_0x444c;(function(_0x2397f0,_0x1f3692){const _0x2f163e=a25_0x444c,_0xa0b092=_0x2397f0();while(!![]){try{const _0x50383a=parseInt(_0x2f163e(0x113))/0x1+-parseInt(_0x2f163e(0x121))/0x2*(-parseInt(_0x2f163e(0x117))/0x3)+-parseInt(_0x2f163e(0x11b))/0x4+parseInt(_0x2f163e(0x119))/0x5+-parseInt(_0x2f163e(0x11d))/0x6*(parseInt(_0x2f163e(0x118))/0x7)+-parseInt(_0x2f163e(0x111))/0x8*(-parseInt(_0x2f163e(0x123))/0x9)+-parseInt(_0x2f163e(0x110))/0xa;if(_0x50383a===_0x1f3692)break;else _0xa0b092['push'](_0xa0b092['shift']());}catch(_0x1b3ff2){_0xa0b092['push'](_0xa0b092['shift']());}}}(a25_0x2ebe,0x6092a));import{BaseCommand}from'./command.js';import{handleSDKOutput}from'../utils/command-output.js';import{withSpinner}from'../utils/spinner.js';export class SegmentFieldsCommand extends BaseCommand{[a25_0x207b5b(0x11a)]=a25_0x207b5b(0x10d);['description']='List\x20available\x20fields\x20for\x20segmentation';async[a25_0x207b5b(0x10b)](_0x3314f0){const _0x1c2679=a25_0x207b5b,{options:_0x6c4e53,args:_0x2ce0ec,tdx:_0x3ae73e}=_0x3314f0,_0x3565b8=_0x2ce0ec[0x0]||_0x6c4e53[_0x1c2679(0x10e)];if(!_0x3565b8)return console[_0x1c2679(0x10c)](_0x1c2679(0x112)),console[_0x1c2679(0x10c)](_0x1c2679(0x11c)),console['error'](_0x1c2679(0x125)),0x1;_0x6c4e53[_0x1c2679(0x11f)]&&(console[_0x1c2679(0x10c)](_0x1c2679(0x124)+_0x6c4e53['site']),console[_0x1c2679(0x10c)](_0x1c2679(0x115)+_0x3565b8));const _0x455d36=await withSpinner(_0x1c2679(0x10f)+_0x3565b8+_0x1c2679(0x11e),()=>_0x3ae73e[_0x1c2679(0x120)][_0x1c2679(0x126)](_0x3565b8),{'verbose':_0x6c4e53[_0x1c2679(0x11f)]}),_0x344bd2=_0x455d36[_0x1c2679(0x114)];return console[_0x1c2679(0x10c)]('✔\x20Found\x20'+_0x344bd2[_0x1c2679(0x116)]+_0x1c2679(0x122)+(_0x344bd2['length']!==0x1?'s':'')),await handleSDKOutput(_0x344bd2,_0x6c4e53),0x0;}}function a25_0x2ebe(){const _0x52a8bf=['Listing\x20fields\x20for\x20\x27','10679480VYmMRw','8kImFiP','Error:\x20Parent\x20segment\x20name\x20is\x20required','288855aGbtti','data','Parent\x20segment:\x20','length','841539QAffJy','1351217QrPCGQ','2531640TKeiDp','name','160172TYNLGo','Usage:\x20tdx\x20segment\x20fields\x20<parent_name>','6OQnDuG','\x27...','verbose','segment','4NUPpat','\x20field','3063375yJrmPG','Site:\x20','\x20\x20Or\x20set\x20context:\x20tdx\x20use\x20parent_segment\x20<name>','listFields','execute','error','segment:fields','parentSegment'];a25_0x2ebe=function(){return _0x52a8bf;};return a25_0x2ebe();}
1
+ const a27_0x17d180=a27_0x9151;(function(_0x1489e8,_0xbec911){const _0x4cf8ff=a27_0x9151,_0xa36641=_0x1489e8();while(!![]){try{const _0x43a036=-parseInt(_0x4cf8ff(0xe3))/0x1+-parseInt(_0x4cf8ff(0xe6))/0x2+-parseInt(_0x4cf8ff(0xd7))/0x3*(-parseInt(_0x4cf8ff(0xdd))/0x4)+-parseInt(_0x4cf8ff(0xd5))/0x5+parseInt(_0x4cf8ff(0xe1))/0x6+parseInt(_0x4cf8ff(0xde))/0x7*(-parseInt(_0x4cf8ff(0xda))/0x8)+parseInt(_0x4cf8ff(0xdc))/0x9;if(_0x43a036===_0xbec911)break;else _0xa36641['push'](_0xa36641['shift']());}catch(_0x2fe3b9){_0xa36641['push'](_0xa36641['shift']());}}}(a27_0x4fb8,0x7263b));function a27_0x4fb8(){const _0x213c7b=['2566932fySibd','7boOHVe','description','\x20\x20Or\x20set\x20context:\x20tdx\x20use\x20parent_segment\x20<name>','4003848AfgENv','Usage:\x20tdx\x20segment\x20fields\x20<parent_name>','792355timfew','\x20field','listFields','1502074hxJyGA','segment','Site:\x20','Listing\x20fields\x20for\x20\x27','length','segment:fields','3246470wdpieu','error','3IwGOOO','name','verbose','2150632EzMDzu','✔\x20Found\x20','14589117GgmZPp'];a27_0x4fb8=function(){return _0x213c7b;};return a27_0x4fb8();}import{BaseCommand}from'./command.js';import{handleSDKOutput}from'../utils/command-output.js';import{withSpinner}from'../utils/spinner.js';function a27_0x9151(_0x13e65b,_0xe5fd84){const _0x4fb838=a27_0x4fb8();return a27_0x9151=function(_0x915142,_0x36bd49){_0x915142=_0x915142-0xd2;let _0xa21c62=_0x4fb838[_0x915142];return _0xa21c62;},a27_0x9151(_0x13e65b,_0xe5fd84);}export class SegmentFieldsCommand extends BaseCommand{[a27_0x17d180(0xd8)]=a27_0x17d180(0xd4);[a27_0x17d180(0xdf)]='List\x20available\x20fields\x20for\x20segmentation';async['execute'](_0x2887e7){const _0x2413a0=a27_0x17d180,{options:_0x199252,args:_0x44cf92,tdx:_0x4975f8}=_0x2887e7,_0x41e004=_0x44cf92[0x0]||_0x199252['parentSegment'];if(!_0x41e004)return console[_0x2413a0(0xd6)]('Error:\x20Parent\x20segment\x20name\x20is\x20required'),console[_0x2413a0(0xd6)](_0x2413a0(0xe2)),console['error'](_0x2413a0(0xe0)),0x1;_0x199252['verbose']&&(console[_0x2413a0(0xd6)](_0x2413a0(0xe8)+_0x199252['site']),console['error']('Parent\x20segment:\x20'+_0x41e004));const _0x46d1b8=await withSpinner(_0x2413a0(0xd2)+_0x41e004+'\x27...',()=>_0x4975f8[_0x2413a0(0xe7)][_0x2413a0(0xe5)](_0x41e004),{'verbose':_0x199252[_0x2413a0(0xd9)]}),_0x54b73f=_0x46d1b8['data'];return console[_0x2413a0(0xd6)](_0x2413a0(0xdb)+_0x54b73f[_0x2413a0(0xd3)]+_0x2413a0(0xe4)+(_0x54b73f[_0x2413a0(0xd3)]!==0x1?'s':'')),await handleSDKOutput(_0x54b73f,_0x199252),0x0;}}
@@ -1 +1 @@
1
- const a26_0x7a73bd=a26_0x168e;function a26_0x46b2(){const _0x29ef72=['log','segment:pwd','6243496wwJNea','58567MWxFyE','Context\x20details:','root','116914TaoFmx','stringify','Show\x20current\x20segment/folder\x20context','jsonl','3JdAePE','4735593FQJHsA','\x20\x20Path:\x20','10BxeNtZ','Use\x20\x22tdx\x20context\x22\x20to\x20see\x20all\x20context\x20parameters','Use\x20\x22tdx\x20context\x20--debug\x22\x20to\x20see\x20context\x20sources','segmentPath','format','3967456kvrySm','216opbqoF','870962INbzdM','json','error','1652720AVYYrr','execute'];a26_0x46b2=function(){return _0x29ef72;};return a26_0x46b2();}(function(_0x227bf0,_0x55e5e0){const _0x361381=a26_0x168e,_0x38435f=_0x227bf0();while(!![]){try{const _0x5c75ac=parseInt(_0x361381(0x176))/0x1+-parseInt(_0x361381(0x16e))/0x2*(parseInt(_0x361381(0x164))/0x3)+parseInt(_0x361381(0x175))/0x4+parseInt(_0x361381(0x171))/0x5+-parseInt(_0x361381(0x16d))/0x6*(parseInt(_0x361381(0x179))/0x7)+-parseInt(_0x361381(0x16c))/0x8+parseInt(_0x361381(0x165))/0x9*(parseInt(_0x361381(0x167))/0xa);if(_0x5c75ac===_0x55e5e0)break;else _0x38435f['push'](_0x38435f['shift']());}catch(_0x4830ba){_0x38435f['push'](_0x38435f['shift']());}}}(a26_0x46b2,0xe6575));import{BaseCommand}from'./command.js';function a26_0x168e(_0x43853e,_0x3e8777){const _0x46b2b0=a26_0x46b2();return a26_0x168e=function(_0x168e0a,_0x541477){_0x168e0a=_0x168e0a-0x162;let _0x343599=_0x46b2b0[_0x168e0a];return _0x343599;},a26_0x168e(_0x43853e,_0x3e8777);}export class SegmentPwdCommand extends BaseCommand{['name']=a26_0x7a73bd(0x174);['description']=a26_0x7a73bd(0x162);async[a26_0x7a73bd(0x172)](_0x4fdc82){const _0x5660e6=a26_0x7a73bd,{options:_0x31d814}=_0x4fdc82;try{const _0xacbae8=_0x31d814[_0x5660e6(0x16a)];if(!_0xacbae8)return _0x31d814[_0x5660e6(0x16b)]==='json'||_0x31d814['format']===_0x5660e6(0x163)?console[_0x5660e6(0x173)](JSON['stringify']({'path':'/','type':_0x5660e6(0x178)})):console[_0x5660e6(0x173)]('/'),0x0;if(_0x31d814[_0x5660e6(0x16b)]===_0x5660e6(0x16f)||_0x31d814[_0x5660e6(0x16b)]===_0x5660e6(0x163)){const _0x49cfb6={'path':_0xacbae8};console[_0x5660e6(0x173)](JSON[_0x5660e6(0x17a)](_0x49cfb6));}else console['log'](_0xacbae8),_0x31d814['verbose']&&(console[_0x5660e6(0x170)](''),console[_0x5660e6(0x170)](_0x5660e6(0x177)),console[_0x5660e6(0x170)](_0x5660e6(0x166)+_0xacbae8),console[_0x5660e6(0x170)](''),console[_0x5660e6(0x170)](_0x5660e6(0x168)),console[_0x5660e6(0x170)](_0x5660e6(0x169)));return 0x0;}catch(_0x9c7a9e){throw _0x9c7a9e;}}}
1
+ function a28_0x5530(_0x57f70c,_0x9c9500){const _0x514241=a28_0x5142();return a28_0x5530=function(_0x55306b,_0x2373ce){_0x55306b=_0x55306b-0x1ad;let _0x20fb54=_0x514241[_0x55306b];return _0x20fb54;},a28_0x5530(_0x57f70c,_0x9c9500);}const a28_0x4db995=a28_0x5530;(function(_0x2d238b,_0x2049a0){const _0x3b0460=a28_0x5530,_0x33a070=_0x2d238b();while(!![]){try{const _0x1ca724=parseInt(_0x3b0460(0x1b3))/0x1*(-parseInt(_0x3b0460(0x1bf))/0x2)+parseInt(_0x3b0460(0x1be))/0x3+-parseInt(_0x3b0460(0x1c8))/0x4*(parseInt(_0x3b0460(0x1b7))/0x5)+parseInt(_0x3b0460(0x1c7))/0x6*(parseInt(_0x3b0460(0x1b9))/0x7)+-parseInt(_0x3b0460(0x1c2))/0x8*(parseInt(_0x3b0460(0x1b5))/0x9)+parseInt(_0x3b0460(0x1c5))/0xa+-parseInt(_0x3b0460(0x1b6))/0xb;if(_0x1ca724===_0x2049a0)break;else _0x33a070['push'](_0x33a070['shift']());}catch(_0x46533c){_0x33a070['push'](_0x33a070['shift']());}}}(a28_0x5142,0x3a363));import{BaseCommand}from'./command.js';function a28_0x5142(){const _0x103a1f=['\x20\x20Path:\x20','execute','1708480jPLNFJ','error','6TdgInA','1021868WrWHJV','stringify','Use\x20\x22tdx\x20context\x22\x20to\x20see\x20all\x20context\x20parameters','Context\x20details:','Use\x20\x22tdx\x20context\x20--debug\x22\x20to\x20see\x20context\x20sources','name','verbose','2OxqCBG','jsonl','4833Ivyvzn','971828tfXWlL','5zCYNCo','log','726957wSkRKp','format','Show\x20current\x20segment/folder\x20context','segmentPath','root','1426596zuHjbL','121262zPhFjy','segment:pwd','json','696KZULho'];a28_0x5142=function(){return _0x103a1f;};return a28_0x5142();}export class SegmentPwdCommand extends BaseCommand{[a28_0x4db995(0x1b1)]=a28_0x4db995(0x1c0);['description']=a28_0x4db995(0x1bb);async[a28_0x4db995(0x1c4)](_0x3f99b3){const _0x3a31a2=a28_0x4db995,{options:_0xceed65}=_0x3f99b3;try{const _0x280a25=_0xceed65[_0x3a31a2(0x1bc)];if(!_0x280a25)return _0xceed65['format']===_0x3a31a2(0x1c1)||_0xceed65[_0x3a31a2(0x1ba)]==='jsonl'?console[_0x3a31a2(0x1b8)](JSON[_0x3a31a2(0x1ad)]({'path':'/','type':_0x3a31a2(0x1bd)})):console[_0x3a31a2(0x1b8)]('/'),0x0;if(_0xceed65['format']===_0x3a31a2(0x1c1)||_0xceed65['format']===_0x3a31a2(0x1b4)){const _0x24f4da={'path':_0x280a25};console['log'](JSON[_0x3a31a2(0x1ad)](_0x24f4da));}else console[_0x3a31a2(0x1b8)](_0x280a25),_0xceed65[_0x3a31a2(0x1b2)]&&(console[_0x3a31a2(0x1c6)](''),console['error'](_0x3a31a2(0x1af)),console[_0x3a31a2(0x1c6)](_0x3a31a2(0x1c3)+_0x280a25),console[_0x3a31a2(0x1c6)](''),console[_0x3a31a2(0x1c6)](_0x3a31a2(0x1ae)),console[_0x3a31a2(0x1c6)](_0x3a31a2(0x1b0)));return 0x0;}catch(_0x3823ea){throw _0x3823ea;}}}
@@ -1 +1 @@
1
- const a27_0x354244=a27_0x3f07;(function(_0xb29a50,_0x10c850){const _0x330e68=a27_0x3f07,_0x58baff=_0xb29a50();while(!![]){try{const _0x476115=parseInt(_0x330e68(0x1a0))/0x1*(-parseInt(_0x330e68(0x1ab))/0x2)+parseInt(_0x330e68(0x18f))/0x3+-parseInt(_0x330e68(0x1ad))/0x4*(parseInt(_0x330e68(0x187))/0x5)+parseInt(_0x330e68(0x195))/0x6*(parseInt(_0x330e68(0x1a4))/0x7)+-parseInt(_0x330e68(0x1b3))/0x8*(-parseInt(_0x330e68(0x1aa))/0x9)+parseInt(_0x330e68(0x1a5))/0xa+-parseInt(_0x330e68(0x1a6))/0xb*(-parseInt(_0x330e68(0x1ac))/0xc);if(_0x476115===_0x10c850)break;else _0x58baff['push'](_0x58baff['shift']());}catch(_0x1dafb5){_0x58baff['push'](_0x58baff['shift']());}}}(a27_0x11f4,0x791cd));function a27_0x3f07(_0x4fe517,_0x59a660){const _0x11f4ae=a27_0x11f4();return a27_0x3f07=function(_0x3f078d,_0x4a6cf2){_0x3f078d=_0x3f078d-0x185;let _0x119a76=_0x11f4ae[_0x3f078d];return _0x119a76;},a27_0x3f07(_0x4fe517,_0x59a660);}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 a27_0x11f4(){const _0x313cbd=['description','segment','22734KSfYHe','kind','segmentId','rule','Resolving\x20folder\x20\x27','execute','Usage:\x20tdx\x20segment\x20update\x20<path>\x20[options]','updateSegmentById','\x20\x20tdx\x20segment\x20update\x20\x22My\x20Audience/High\x20Value\x22\x20--description\x20\x22...\x22','verbose','resolvePathToResource','267164WtQSYd','✔\x20Updated\x20segment\x20\x27','resolveFolderId','Segment\x20ID\x20missing\x20from\x20resolved\x20path','595XVJvbf','3875130zdDasU','858iKhdKr','Parent\x20ID:\x20','Update\x20existing\x20child\x20segment','Error:\x20Cannot\x20update\x20','9jNdWhT','4XQXaGq','24456nZbfKi','4Kcgszq','\x20\x20\x20Path:\x20','includes','Segment\x20ID:\x20','type','.\x20Only\x20child\x20segments\x20can\x20be\x20updated.','2667304JJEQXM','Resolving\x20path\x20\x27','data','Updating\x20segment\x20\x27','2916215WMRzhJ','INTERNAL','Resolved\x20type:\x20','error','segmentName','\x27...','Resolved\x20folder\x20ID:\x20','Use:\x20tdx\x20segment\x20update\x20<path_to_segment>\x20[options]','1235079euuYFZ','\x20\x20tdx\x20segment\x20update\x20\x22High\x20Value\x22\x20--rule\x20\x27...\x27\x20\x20#\x20Relative\x20to\x20context','name','folder'];a27_0x11f4=function(){return _0x313cbd;};return a27_0x11f4();}import{SDKError,ErrorCode}from'../sdk/index.js';export class SegmentUpdateCommand extends BaseCommand{[a27_0x354244(0x191)]='segment:update';[a27_0x354244(0x193)]=a27_0x354244(0x1a8);async[a27_0x354244(0x19a)](_0x329b0d){const _0x13dda9=a27_0x354244,{options:_0x258fd8,args:_0x22f3f3,tdx:_0x346ace}=_0x329b0d,_0x1a8326=_0x258fd8;if(_0x22f3f3['length']===0x0)return console[_0x13dda9(0x18a)]('Error:\x20Segment\x20path\x20or\x20name\x20is\x20required'),console[_0x13dda9(0x18a)](_0x13dda9(0x19b)),console[_0x13dda9(0x18a)]('Examples:'),console[_0x13dda9(0x18a)](_0x13dda9(0x19d)),console['error'](_0x13dda9(0x190)),0x1;const _0x332219=_0x22f3f3[0x0],_0x471e5c=_0x258fd8['segmentPath'];let _0x3bf197=_0x332219;_0x471e5c&&!_0x332219[_0x13dda9(0x1af)]('/')&&(_0x3bf197=_0x471e5c+'/'+_0x332219,_0x1a8326[_0x13dda9(0x19e)]&&console[_0x13dda9(0x18a)]('Resolved\x20relative\x20path\x20to:\x20'+_0x3bf197));const _0x1e38a3=await withSpinner(_0x13dda9(0x1b4)+_0x3bf197+_0x13dda9(0x18c),()=>_0x346ace[_0x13dda9(0x194)][_0x13dda9(0x19f)](_0x3bf197),{'verbose':_0x1a8326['verbose']}),_0x5dd0b6=_0x1e38a3[_0x13dda9(0x185)];_0x1a8326[_0x13dda9(0x19e)]&&console[_0x13dda9(0x18a)](_0x13dda9(0x189)+_0x5dd0b6[_0x13dda9(0x1b1)]);if(_0x5dd0b6[_0x13dda9(0x1b1)]!==_0x13dda9(0x194))return console[_0x13dda9(0x18a)](_0x13dda9(0x1a9)+_0x5dd0b6[_0x13dda9(0x1b1)]+_0x13dda9(0x1b2)),console[_0x13dda9(0x18a)](_0x13dda9(0x18e)),0x1;if(!_0x5dd0b6[_0x13dda9(0x197)])throw new SDKError(ErrorCode[_0x13dda9(0x188)],_0x13dda9(0x1a3));const _0x3df0d9=_0x5dd0b6['parentId'],_0x4cad19=_0x5dd0b6[_0x13dda9(0x197)];_0x1a8326['verbose']&&(console['error'](_0x13dda9(0x1a7)+_0x3df0d9),console['error'](_0x13dda9(0x1b0)+_0x4cad19));let _0x4b4d43;if(_0x1a8326[_0x13dda9(0x192)]){const _0x175cf7=_0x1a8326[_0x13dda9(0x192)],_0x4ade8f=await withSpinner(_0x13dda9(0x199)+_0x175cf7+'\x27...',()=>_0x346ace[_0x13dda9(0x194)][_0x13dda9(0x1a2)](_0x3df0d9,_0x175cf7),{'verbose':_0x1a8326[_0x13dda9(0x19e)]});_0x4b4d43=parseInt(_0x4ade8f[_0x13dda9(0x185)],0xa),_0x1a8326['verbose']&&console[_0x13dda9(0x18a)](_0x13dda9(0x18d)+_0x4b4d43);}const _0x3f8fcd=await loadJSONFromOptions(_0x1a8326[_0x13dda9(0x198)],_0x1a8326['ruleFile']),_0x1f93fc={'name':_0x1a8326[_0x13dda9(0x191)],'description':_0x1a8326['description'],'rule':_0x3f8fcd,'kind':_0x1a8326['kind']!==undefined?parseInt(_0x1a8326[_0x13dda9(0x196)],0xa):undefined,'segmentFolderId':_0x4b4d43},_0x2ca21b=await withSpinner(_0x13dda9(0x186)+_0x5dd0b6[_0x13dda9(0x18b)]+_0x13dda9(0x18c),()=>_0x346ace[_0x13dda9(0x194)][_0x13dda9(0x19c)](_0x3df0d9,_0x4cad19,_0x1f93fc),{'verbose':_0x1a8326['verbose']}),_0x4b5d9f=_0x2ca21b[_0x13dda9(0x185)];return console[_0x13dda9(0x18a)](_0x13dda9(0x1a1)+_0x4b5d9f[_0x13dda9(0x191)]+'\x27'),_0x3bf197!==_0x332219&&console[_0x13dda9(0x18a)](_0x13dda9(0x1ae)+_0x3bf197),await handleSDKOutput([_0x4b5d9f],_0x1a8326),0x0;}}
1
+ function a29_0x3492(){const _0x4e2960=['segmentPath','1253505hzOarS','7947544qOEsFK','segment:update','execute','length','type','segmentName','rule','\x27...','1048594XPDFtA','resolveFolderId','Segment\x20ID:\x20','description','segmentId','Usage:\x20tdx\x20segment\x20update\x20<path>\x20[options]','segment','name','includes','\x20\x20tdx\x20segment\x20update\x20\x22My\x20Audience/High\x20Value\x22\x20--description\x20\x22...\x22','Update\x20existing\x20child\x20segment','resolvePathToResource','verbose','Parent\x20ID:\x20','kind','Resolving\x20folder\x20\x27','Error:\x20Cannot\x20update\x20','folder','16540DjYlkQ','7hNVPWJ','parentId','Resolved\x20folder\x20ID:\x20','936OiDbMC','Error:\x20Segment\x20path\x20or\x20name\x20is\x20required','77276sZxBzZ','Resolved\x20relative\x20path\x20to:\x20','Examples:','INTERNAL','Resolving\x20path\x20\x27','\x20\x20\x20Path:\x20','error','\x20\x20tdx\x20segment\x20update\x20\x22High\x20Value\x22\x20--rule\x20\x27...\x27\x20\x20#\x20Relative\x20to\x20context','ruleFile','Resolved\x20type:\x20','9542790adnuiY','122879fZFdVn'];a29_0x3492=function(){return _0x4e2960;};return a29_0x3492();}const a29_0x3f246d=a29_0x2968;(function(_0x367863,_0x3c2e74){const _0x35222e=a29_0x2968,_0x32b4c9=_0x367863();while(!![]){try{const _0x26ee13=parseInt(_0x35222e(0x7c))/0x1+-parseInt(_0x35222e(0x87))/0x2+parseInt(_0x35222e(0x7e))/0x3+-parseInt(_0x35222e(0x71))/0x4+parseInt(_0x35222e(0x99))/0x5*(parseInt(_0x35222e(0x6f))/0x6)+parseInt(_0x35222e(0x9a))/0x7*(-parseInt(_0x35222e(0x7f))/0x8)+parseInt(_0x35222e(0x7b))/0x9;if(_0x26ee13===_0x3c2e74)break;else _0x32b4c9['push'](_0x32b4c9['shift']());}catch(_0xd5337){_0x32b4c9['push'](_0x32b4c9['shift']());}}}(a29_0x3492,0x8d9ad));import{BaseCommand}from'./command.js';import{handleSDKOutput}from'../utils/command-output.js';function a29_0x2968(_0x5d2e13,_0x112d47){const _0x34920a=a29_0x3492();return a29_0x2968=function(_0x2968fa,_0x2d1402){_0x2968fa=_0x2968fa-0x6f;let _0x4b173e=_0x34920a[_0x2968fa];return _0x4b173e;},a29_0x2968(_0x5d2e13,_0x112d47);}import{withSpinner}from'../utils/spinner.js';import{loadJSONFromOptions}from'../utils/json-loader.js';import{SDKError,ErrorCode}from'../sdk/index.js';export class SegmentUpdateCommand extends BaseCommand{[a29_0x3f246d(0x8e)]=a29_0x3f246d(0x80);[a29_0x3f246d(0x8a)]=a29_0x3f246d(0x91);async[a29_0x3f246d(0x81)](_0x512695){const _0x4e5483=a29_0x3f246d,{options:_0x20e819,args:_0x293934,tdx:_0x5c2df9}=_0x512695,_0x27c4ed=_0x20e819;if(_0x293934[_0x4e5483(0x82)]===0x0)return console['error'](_0x4e5483(0x70)),console['error'](_0x4e5483(0x8c)),console[_0x4e5483(0x77)](_0x4e5483(0x73)),console[_0x4e5483(0x77)](_0x4e5483(0x90)),console[_0x4e5483(0x77)](_0x4e5483(0x78)),0x1;const _0x47d42b=_0x293934[0x0],_0x14d8c2=_0x20e819[_0x4e5483(0x7d)];let _0x4eef28=_0x47d42b;_0x14d8c2&&!_0x47d42b[_0x4e5483(0x8f)]('/')&&(_0x4eef28=_0x14d8c2+'/'+_0x47d42b,_0x27c4ed['verbose']&&console[_0x4e5483(0x77)](_0x4e5483(0x72)+_0x4eef28));const _0x3f40d7=await withSpinner(_0x4e5483(0x75)+_0x4eef28+_0x4e5483(0x86),()=>_0x5c2df9[_0x4e5483(0x8d)][_0x4e5483(0x92)](_0x4eef28),{'verbose':_0x27c4ed[_0x4e5483(0x93)]}),_0x3cd6e4=_0x3f40d7['data'];_0x27c4ed[_0x4e5483(0x93)]&&console['error'](_0x4e5483(0x7a)+_0x3cd6e4[_0x4e5483(0x83)]);if(_0x3cd6e4[_0x4e5483(0x83)]!==_0x4e5483(0x8d))return console[_0x4e5483(0x77)](_0x4e5483(0x97)+_0x3cd6e4[_0x4e5483(0x83)]+'.\x20Only\x20child\x20segments\x20can\x20be\x20updated.'),console[_0x4e5483(0x77)]('Use:\x20tdx\x20segment\x20update\x20<path_to_segment>\x20[options]'),0x1;if(!_0x3cd6e4[_0x4e5483(0x8b)])throw new SDKError(ErrorCode[_0x4e5483(0x74)],'Segment\x20ID\x20missing\x20from\x20resolved\x20path');const _0x88fd3d=_0x3cd6e4[_0x4e5483(0x9b)],_0xf812e6=_0x3cd6e4['segmentId'];_0x27c4ed['verbose']&&(console['error'](_0x4e5483(0x94)+_0x88fd3d),console[_0x4e5483(0x77)](_0x4e5483(0x89)+_0xf812e6));let _0x4f2a98;if(_0x27c4ed[_0x4e5483(0x98)]){const _0x24ecdc=_0x27c4ed[_0x4e5483(0x98)],_0x258161=await withSpinner(_0x4e5483(0x96)+_0x24ecdc+_0x4e5483(0x86),()=>_0x5c2df9[_0x4e5483(0x8d)][_0x4e5483(0x88)](_0x88fd3d,_0x24ecdc),{'verbose':_0x27c4ed[_0x4e5483(0x93)]});_0x4f2a98=parseInt(_0x258161['data'],0xa),_0x27c4ed[_0x4e5483(0x93)]&&console[_0x4e5483(0x77)](_0x4e5483(0x9c)+_0x4f2a98);}const _0x547667=await loadJSONFromOptions(_0x27c4ed[_0x4e5483(0x85)],_0x27c4ed[_0x4e5483(0x79)]),_0x4fdf46={'name':_0x27c4ed[_0x4e5483(0x8e)],'description':_0x27c4ed['description'],'rule':_0x547667,'kind':_0x27c4ed[_0x4e5483(0x95)]!==undefined?parseInt(_0x27c4ed[_0x4e5483(0x95)],0xa):undefined,'segmentFolderId':_0x4f2a98},_0xce04da=await withSpinner('Updating\x20segment\x20\x27'+_0x3cd6e4[_0x4e5483(0x84)]+'\x27...',()=>_0x5c2df9[_0x4e5483(0x8d)]['updateSegmentById'](_0x88fd3d,_0xf812e6,_0x4fdf46),{'verbose':_0x27c4ed[_0x4e5483(0x93)]}),_0x4947c3=_0xce04da['data'];return console[_0x4e5483(0x77)]('✔\x20Updated\x20segment\x20\x27'+_0x4947c3[_0x4e5483(0x8e)]+'\x27'),_0x4eef28!==_0x47d42b&&console[_0x4e5483(0x77)](_0x4e5483(0x76)+_0x4eef28),await handleSDKOutput([_0x4947c3],_0x27c4ed),0x0;}}
@@ -1 +1 @@
1
- const a28_0xb89e22=a28_0x4fa7;(function(_0x124330,_0x1fd2d5){const _0x58a782=a28_0x4fa7,_0x12a182=_0x124330();while(!![]){try{const _0x2eb811=parseInt(_0x58a782(0xd7))/0x1*(-parseInt(_0x58a782(0xc9))/0x2)+-parseInt(_0x58a782(0xe0))/0x3+-parseInt(_0x58a782(0xda))/0x4+-parseInt(_0x58a782(0xd0))/0x5+-parseInt(_0x58a782(0xc1))/0x6+parseInt(_0x58a782(0xba))/0x7+parseInt(_0x58a782(0xe2))/0x8*(parseInt(_0x58a782(0xe8))/0x9);if(_0x2eb811===_0x1fd2d5)break;else _0x12a182['push'](_0x12a182['shift']());}catch(_0x40a34b){_0x12a182['push'](_0x12a182['shift']());}}}(a28_0x8248,0xed585));function a28_0x8248(){const _0x33fb08=['join','Resolved\x20relative\x20path\x20to:\x20','Target\x20path:\x20','6544495GvMeEL','Set\x20current\x20segment/folder\x20context\x20for\x20navigation','segment','folderPath','Parent\x20ID:\x20','parentName','folderId','2606qPUCEP','\x20\x20tdx\x20segment\x20use\x20\x22My\x20Audience\x22','fullPath','4010568cvUhkN','Context\x20cleared.\x20Back\x20to\x20root.','Examples:','log','Resolving\x20path\x20\x27','split','561771LcffAM','Error:\x20Cannot\x20set\x20context\x20to\x20a\x20segment.','2896RfodOe','Folder\x20ID:\x20','\x27...','length','segments','isAbsolute','76131UIshSc','Context\x20set\x20to:\x20','Use\x20\x22tdx\x20segment\x20pwd\x22\x20to\x20show\x20current\x20context','error','description','10081694TmrqjD','\x20\x20tdx\x20segment\x20use\x20\x22My\x20Audience/Marketing\x22','type','name','\x20\x20tdx\x20segment\x20use\x20/\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Clear\x20context','data','Error:\x20No\x20context\x20set.\x20Cannot\x20use\x20relative\x20path.','5453730ybjtFq','Error:\x20Path\x20is\x20required','verbose','Use\x20\x22tdx\x20context\x22\x20to\x20see\x20all\x20context\x20parameters','segmentPath','Resolved\x20path\x20type:\x20','\x20\x20tdx\x20segment\x20use\x20..\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Go\x20to\x20parent','session','94OXOfin','Use\x20\x22tdx\x20segments\x22\x20to\x20list\x20contents\x20in\x20this\x20context','Context\x20can\x20only\x20be\x20set\x20to\x20a\x20parent\x20segment\x20or\x20folder.','site'];a28_0x8248=function(){return _0x33fb08;};return a28_0x8248();}import{BaseCommand}from'./command.js';function a28_0x4fa7(_0x178494,_0x4afb34){const _0x8248e2=a28_0x8248();return a28_0x4fa7=function(_0x4fa7ef,_0x1df637){_0x4fa7ef=_0x4fa7ef-0xb7;let _0x207ab1=_0x8248e2[_0x4fa7ef];return _0x207ab1;},a28_0x4fa7(_0x178494,_0x4afb34);}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{[a28_0xb89e22(0xbd)]='segment:use';[a28_0xb89e22(0xb9)]=a28_0xb89e22(0xd1);async['execute'](_0x267631){const _0x47eb0e=a28_0xb89e22,{options:_0x5ecc3a,args:_0x56286d,tdx:_0x7d24c0}=_0x267631;if(_0x56286d[_0x47eb0e(0xe5)]===0x0)return console[_0x47eb0e(0xb8)](_0x47eb0e(0xc2)),console['error']('Usage:\x20tdx\x20segment\x20use\x20<path>'),console['error'](_0x47eb0e(0xdc)),console[_0x47eb0e(0xb8)](_0x47eb0e(0xd8)),console['error'](_0x47eb0e(0xbb)),console['error'](_0x47eb0e(0xbe)),console[_0x47eb0e(0xb8)](_0x47eb0e(0xc7)),0x1;const _0xef9219=_0x56286d[0x0],_0xf7f8bc=_0x5ecc3a[_0x47eb0e(0xc8)];try{if(_0xef9219==='/')return saveSessionContext({'segment_path':undefined},_0xf7f8bc),console['log']('Context\x20cleared.\x20Back\x20to\x20root.'),0x0;const _0x1c0c9a=_0x5ecc3a[_0x47eb0e(0xc5)];let _0xcc3736=_0xef9219;const _0x47426a=parsePath(_0xef9219);if(!_0x47426a[_0x47eb0e(0xe7)]){if(!_0x1c0c9a)return console['error'](_0x47eb0e(0xc0)),console[_0x47eb0e(0xb8)]('Use\x20an\x20absolute\x20path\x20or\x20set\x20context\x20with:\x20tdx\x20segment\x20use\x20<parent_name>'),0x1;if(_0xef9219==='..'){const _0x23c77c=_0x1c0c9a[_0x47eb0e(0xdf)]('/')['slice'](0x0,-0x1)[_0x47eb0e(0xcd)]('/');_0xcc3736=_0x23c77c||'/';}else _0xef9219==='.'?_0xcc3736=_0x1c0c9a:_0xcc3736=_0x1c0c9a+'/'+_0xef9219;_0x5ecc3a[_0x47eb0e(0xc3)]&&console[_0x47eb0e(0xb8)](_0x47eb0e(0xce)+_0xcc3736);}if(_0xcc3736==='/'||_0xcc3736==='')return saveSessionContext({'segment_path':undefined},_0xf7f8bc),console[_0x47eb0e(0xdd)]('Context\x20cleared.\x20Back\x20to\x20root.'),0x0;_0xcc3736=normalizePath(_0xcc3736);const _0x24cf10=parsePath(_0xcc3736)[_0x47eb0e(0xe6)];if(_0x24cf10['length']===0x0)return saveSessionContext({'segment_path':undefined},_0xf7f8bc),console[_0x47eb0e(0xdd)](_0x47eb0e(0xdb)),0x0;_0x5ecc3a[_0x47eb0e(0xc3)]&&(console[_0x47eb0e(0xb8)]('Site:\x20'+_0x5ecc3a[_0x47eb0e(0xcc)]),console['error'](_0x47eb0e(0xcf)+_0xcc3736));const _0x3323b5=await withSpinner(_0x47eb0e(0xde)+_0xcc3736+_0x47eb0e(0xe4),()=>_0x7d24c0[_0x47eb0e(0xd2)]['resolvePathToResource'](_0xcc3736),{'verbose':_0x5ecc3a[_0x47eb0e(0xc3)]}),_0x4b3c10=_0x3323b5[_0x47eb0e(0xbf)];_0x5ecc3a['verbose']&&(console[_0x47eb0e(0xb8)](_0x47eb0e(0xc6)+_0x4b3c10[_0x47eb0e(0xbc)]),console['error'](_0x47eb0e(0xd4)+_0x4b3c10['parentId']),_0x4b3c10['folderId']&&console[_0x47eb0e(0xb8)](_0x47eb0e(0xe3)+_0x4b3c10[_0x47eb0e(0xd6)]));if(_0x4b3c10[_0x47eb0e(0xbc)]===_0x47eb0e(0xd2))return console[_0x47eb0e(0xb8)](_0x47eb0e(0xe1)),console[_0x47eb0e(0xb8)](_0x47eb0e(0xcb)),console[_0x47eb0e(0xb8)]('Use:\x20tdx\x20segment\x20use\x20'+_0x4b3c10['parentName']+(_0x4b3c10[_0x47eb0e(0xd3)]?'/'+_0x4b3c10[_0x47eb0e(0xd3)][_0x47eb0e(0xcd)]('/'):'')),0x1;return saveSessionContext({'segment_path':_0x4b3c10[_0x47eb0e(0xd9)],'parent_segment':_0x4b3c10[_0x47eb0e(0xd5)]},_0xf7f8bc),console['log'](_0x47eb0e(0xe9)+_0x4b3c10[_0x47eb0e(0xd9)]),_0x5ecc3a[_0x47eb0e(0xc3)]&&(console['error'](_0x47eb0e(0xca)),console['error'](_0x47eb0e(0xb7)),console[_0x47eb0e(0xb8)](_0x47eb0e(0xc4))),0x0;}catch(_0xee17db){throw _0xee17db;}}}
1
+ const a30_0x554f5b=a30_0x5302;(function(_0x25228c,_0x468309){const _0x1e891e=a30_0x5302,_0x5751b9=_0x25228c();while(!![]){try{const _0x526a40=parseInt(_0x1e891e(0x13b))/0x1+parseInt(_0x1e891e(0x129))/0x2+-parseInt(_0x1e891e(0x139))/0x3*(-parseInt(_0x1e891e(0x133))/0x4)+parseInt(_0x1e891e(0x12e))/0x5+-parseInt(_0x1e891e(0x11e))/0x6+parseInt(_0x1e891e(0x119))/0x7+-parseInt(_0x1e891e(0x140))/0x8;if(_0x526a40===_0x468309)break;else _0x5751b9['push'](_0x5751b9['shift']());}catch(_0x223bef){_0x5751b9['push'](_0x5751b9['shift']());}}}(a30_0x2bf0,0x4b3d7));import{BaseCommand}from'./command.js';function a30_0x5302(_0x367b7c,_0x50711d){const _0x2bf07e=a30_0x2bf0();return a30_0x5302=function(_0x53024f,_0x45b3ae){_0x53024f=_0x53024f-0x118;let _0x29a011=_0x2bf07e[_0x53024f];return _0x29a011;},a30_0x5302(_0x367b7c,_0x50711d);}import{saveSessionContext}from'../core/session.js';function a30_0x2bf0(){const _0x3cff95=['Use:\x20tdx\x20segment\x20use\x20','248775HkRbXo','verbose','Context\x20can\x20only\x20be\x20set\x20to\x20a\x20parent\x20segment\x20or\x20folder.','Context\x20cleared.\x20Back\x20to\x20root.','Target\x20path:\x20','4ZQvBpR','session','type','segments','Examples:','\x20\x20tdx\x20segment\x20use\x20\x22My\x20Audience\x22','644322vIWOfm','Use\x20an\x20absolute\x20path\x20or\x20set\x20context\x20with:\x20tdx\x20segment\x20use\x20<parent_name>','184901SfwTjN','description','segment','folderId','slice','7758256vaqnDm','Use\x20\x22tdx\x20segments\x22\x20to\x20list\x20contents\x20in\x20this\x20context','length','isAbsolute','\x20\x20tdx\x20segment\x20use\x20..\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Go\x20to\x20parent','\x20\x20tdx\x20segment\x20use\x20\x22My\x20Audience/Marketing\x22','join','3474065qbBXwQ','Error:\x20Path\x20is\x20required','error','Resolved\x20path\x20type:\x20','parentName','9846imWdTt','Usage:\x20tdx\x20segment\x20use\x20<path>','segment:use','Folder\x20ID:\x20','Resolving\x20path\x20\x27','segmentPath','fullPath','split','log','Resolved\x20relative\x20path\x20to:\x20','name','667762LVmgwT','folderPath','execute','\x27...'];a30_0x2bf0=function(){return _0x3cff95;};return a30_0x2bf0();}import{withSpinner}from'../utils/spinner.js';import{parsePath,normalizePath}from'../utils/segment-path-parser.js';export class SegmentUseCommand extends BaseCommand{[a30_0x554f5b(0x128)]=a30_0x554f5b(0x120);[a30_0x554f5b(0x13c)]='Set\x20current\x20segment/folder\x20context\x20for\x20navigation';async[a30_0x554f5b(0x12b)](_0x181e75){const _0xcd741d=a30_0x554f5b,{options:_0x179352,args:_0x516345,tdx:_0x1eb7e8}=_0x181e75;if(_0x516345[_0xcd741d(0x142)]===0x0)return console[_0xcd741d(0x11b)](_0xcd741d(0x11a)),console[_0xcd741d(0x11b)](_0xcd741d(0x11f)),console[_0xcd741d(0x11b)](_0xcd741d(0x137)),console[_0xcd741d(0x11b)](_0xcd741d(0x138)),console[_0xcd741d(0x11b)](_0xcd741d(0x145)),console[_0xcd741d(0x11b)]('\x20\x20tdx\x20segment\x20use\x20/\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Clear\x20context'),console[_0xcd741d(0x11b)](_0xcd741d(0x144)),0x1;const _0x4e5bd2=_0x516345[0x0],_0x34a375=_0x179352[_0xcd741d(0x134)];try{if(_0x4e5bd2==='/')return saveSessionContext({'segment_path':undefined},_0x34a375),console[_0xcd741d(0x126)](_0xcd741d(0x131)),0x0;const _0x458f85=_0x179352[_0xcd741d(0x123)];let _0x1d53fd=_0x4e5bd2;const _0x95aef8=parsePath(_0x4e5bd2);if(!_0x95aef8[_0xcd741d(0x143)]){if(!_0x458f85)return console[_0xcd741d(0x11b)]('Error:\x20No\x20context\x20set.\x20Cannot\x20use\x20relative\x20path.'),console[_0xcd741d(0x11b)](_0xcd741d(0x13a)),0x1;if(_0x4e5bd2==='..'){const _0x1859f3=_0x458f85[_0xcd741d(0x125)]('/')[_0xcd741d(0x13f)](0x0,-0x1)[_0xcd741d(0x118)]('/');_0x1d53fd=_0x1859f3||'/';}else _0x4e5bd2==='.'?_0x1d53fd=_0x458f85:_0x1d53fd=_0x458f85+'/'+_0x4e5bd2;_0x179352[_0xcd741d(0x12f)]&&console[_0xcd741d(0x11b)](_0xcd741d(0x127)+_0x1d53fd);}if(_0x1d53fd==='/'||_0x1d53fd==='')return saveSessionContext({'segment_path':undefined},_0x34a375),console['log'](_0xcd741d(0x131)),0x0;_0x1d53fd=normalizePath(_0x1d53fd);const _0x5e2393=parsePath(_0x1d53fd)[_0xcd741d(0x136)];if(_0x5e2393['length']===0x0)return saveSessionContext({'segment_path':undefined},_0x34a375),console[_0xcd741d(0x126)](_0xcd741d(0x131)),0x0;_0x179352[_0xcd741d(0x12f)]&&(console[_0xcd741d(0x11b)]('Site:\x20'+_0x179352['site']),console['error'](_0xcd741d(0x132)+_0x1d53fd));const _0x143ca0=await withSpinner(_0xcd741d(0x122)+_0x1d53fd+_0xcd741d(0x12c),()=>_0x1eb7e8[_0xcd741d(0x13d)]['resolvePathToResource'](_0x1d53fd),{'verbose':_0x179352[_0xcd741d(0x12f)]}),_0x1751d9=_0x143ca0['data'];_0x179352[_0xcd741d(0x12f)]&&(console[_0xcd741d(0x11b)](_0xcd741d(0x11c)+_0x1751d9[_0xcd741d(0x135)]),console[_0xcd741d(0x11b)]('Parent\x20ID:\x20'+_0x1751d9['parentId']),_0x1751d9['folderId']&&console[_0xcd741d(0x11b)](_0xcd741d(0x121)+_0x1751d9[_0xcd741d(0x13e)]));if(_0x1751d9[_0xcd741d(0x135)]===_0xcd741d(0x13d))return console[_0xcd741d(0x11b)]('Error:\x20Cannot\x20set\x20context\x20to\x20a\x20segment.'),console[_0xcd741d(0x11b)](_0xcd741d(0x130)),console[_0xcd741d(0x11b)](_0xcd741d(0x12d)+_0x1751d9[_0xcd741d(0x11d)]+(_0x1751d9[_0xcd741d(0x12a)]?'/'+_0x1751d9[_0xcd741d(0x12a)][_0xcd741d(0x118)]('/'):'')),0x1;return saveSessionContext({'segment_path':_0x1751d9[_0xcd741d(0x124)],'parent_segment':_0x1751d9[_0xcd741d(0x11d)]},_0x34a375),console[_0xcd741d(0x126)]('Context\x20set\x20to:\x20'+_0x1751d9[_0xcd741d(0x124)]),_0x179352[_0xcd741d(0x12f)]&&(console[_0xcd741d(0x11b)](_0xcd741d(0x141)),console[_0xcd741d(0x11b)]('Use\x20\x22tdx\x20segment\x20pwd\x22\x20to\x20show\x20current\x20context'),console[_0xcd741d(0x11b)]('Use\x20\x22tdx\x20context\x22\x20to\x20see\x20all\x20context\x20parameters')),0x0;}catch(_0xd2b103){throw _0xd2b103;}}}
@@ -1 +1 @@
1
- const a29_0x503e5d=a29_0x369c;(function(_0x141cb6,_0x23e277){const _0x40e18b=a29_0x369c,_0x206f7f=_0x141cb6();while(!![]){try{const _0x152e3d=parseInt(_0x40e18b(0x1ca))/0x1*(-parseInt(_0x40e18b(0x1a9))/0x2)+parseInt(_0x40e18b(0x197))/0x3+parseInt(_0x40e18b(0x1a3))/0x4+parseInt(_0x40e18b(0x1cb))/0x5+parseInt(_0x40e18b(0x19a))/0x6*(parseInt(_0x40e18b(0x1b3))/0x7)+parseInt(_0x40e18b(0x1b7))/0x8*(parseInt(_0x40e18b(0x19d))/0x9)+-parseInt(_0x40e18b(0x1c1))/0xa*(parseInt(_0x40e18b(0x1a5))/0xb);if(_0x152e3d===_0x23e277)break;else _0x206f7f['push'](_0x206f7f['shift']());}catch(_0x3a1d96){_0x206f7f['push'](_0x206f7f['shift']());}}}(a29_0x2815,0xdff3f));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleSDKOutput}from'../utils/command-output.js';import{withSpinner}from'../utils/spinner.js';import{formatFlatList,formatTree}from'../utils/tree-formatter.js';function a29_0x2815(){const _0x598531=['6VScYTu','json','sort','207EqVQju','error','description','(empty)','Building\x20hierarchy\x20tree...','message','2626076nvQnGh','Error:\x20','26841111wmPHPy','listUnified','dim','No\x20parent\x20segments\x20match\x20pattern:\x20','128638NrIEbU','includes','name','Clear\x20context\x20with:\x20tdx\x20segment\x20use\x20/','👥\x20','execute','segmentPath','segment','log','length','12644506uWnfzq','List\x20parent\x20segments,\x20folders,\x20and\x20child\x20segments','✔\x20Found\x20','verbose','116152VUVrXF','segments','filter','folderId','Parent\x20ID:\x20','Error:\x20Pattern\x20matching\x20is\x20only\x20supported\x20at\x20root\x20level\x20(no\x20context\x20set).','\x20top-level\x20items','listRecursive','Recursive\x20mode:\x20enabled','✔\x20Built\x20tree\x20with\x20','10XQKNOa','population','test','replace','format','\x20and\x20','Current\x20context:\x20','parentId','Site:\x20','15JRPSeo','1107220IgSZtW','\x20parent\x20segment','[parent\x20segments]','resolvePathToResource','listParentsWithPattern','folder','Resolving\x20context\x20path\x20\x27','listParents','\x27...','map','attributes','Folder\x20ID:\x20','jsonl','site','recursive','data','3911817HAJQoU','\x20folder','maxDepth'];a29_0x2815=function(){return _0x598531;};return a29_0x2815();}import{formatRows}from'../utils/formatters.js';import a29_0x20e3ed from'chalk';function a29_0x369c(_0x102986,_0x502983){const _0x281580=a29_0x2815();return a29_0x369c=function(_0x369c4f,_0x776c3a){_0x369c4f=_0x369c4f-0x18f;let _0x2cf072=_0x281580[_0x369c4f];return _0x2cf072;},a29_0x369c(_0x102986,_0x502983);}export class SegmentsCommand extends BaseCommand{[a29_0x503e5d(0x1ab)]=a29_0x503e5d(0x1b8);[a29_0x503e5d(0x19f)]=a29_0x503e5d(0x1b4);async[a29_0x503e5d(0x1ae)](_0x2af098){const _0x35cb61=a29_0x503e5d,{options:_0x1edcaa,args:_0x14c1e2}=_0x2af098,_0x2cae24=_0x1edcaa[_0x35cb61(0x195)],_0x2f3f3d=_0x14c1e2[0x0];try{const _0x3996e9=_0x1edcaa[_0x35cb61(0x1af)];_0x1edcaa[_0x35cb61(0x1b6)]&&(console['error'](_0x35cb61(0x1c9)+_0x1edcaa[_0x35cb61(0x194)]),console[_0x35cb61(0x19e)](_0x35cb61(0x1c7)+(_0x3996e9||'/')),_0x2f3f3d&&console[_0x35cb61(0x19e)]('Path/pattern\x20arg:\x20'+_0x2f3f3d),_0x2cae24&&console['error'](_0x35cb61(0x1bf)));if(_0x2f3f3d){const _0x262bc1=_0x2f3f3d[_0x35cb61(0x1aa)]('*')||_0x2f3f3d[_0x35cb61(0x1aa)]('?');if(_0x262bc1&&!_0x3996e9)return await this[_0x35cb61(0x1cf)](_0x2af098,_0x2f3f3d);else return _0x262bc1?(console['error'](_0x35cb61(0x1bc)),console[_0x35cb61(0x19e)](_0x35cb61(0x1ac)),0x1):_0x2cae24?await this[_0x35cb61(0x1be)](_0x2af098,_0x2f3f3d):await this[_0x35cb61(0x1a6)](_0x2af098,_0x2f3f3d);}if(!_0x3996e9)return await this[_0x35cb61(0x1d2)](_0x2af098);return _0x2cae24?await this[_0x35cb61(0x1be)](_0x2af098,_0x3996e9):await this[_0x35cb61(0x1a6)](_0x2af098,_0x3996e9);}catch(_0x362844){if(_0x362844 instanceof SDKError)return console[_0x35cb61(0x19e)](_0x35cb61(0x1a4)+_0x362844[_0x35cb61(0x1a2)]),_0x362844['cause']&&console[_0x35cb61(0x19e)]('\x20\x20Cause:\x20'+_0x362844['cause']),0x1;throw _0x362844;}}async['listParentsWithPattern'](_0x34c969,_0x1ecd00){const _0x1552c3=a29_0x503e5d,{options:_0x2e463f,tdx:_0x3663c4}=_0x34c969,_0x22f2c8=await withSpinner('Listing\x20parent\x20segments\x20matching\x20\x27'+_0x1ecd00+_0x1552c3(0x18f),()=>_0x3663c4[_0x1552c3(0x1b0)]['listParents'](),{'verbose':_0x2e463f[_0x1552c3(0x1b6)]}),_0x55d5ea=_0x22f2c8[_0x1552c3(0x196)],_0x2cbc95=_0x1ecd00['replace'](/[.+^${}()|[\]\\]/g,'\x5c$&')['replace'](/\*/g,'.*')[_0x1552c3(0x1c4)](/\?/g,'.'),_0x4115ad=new RegExp('^'+_0x2cbc95+'$','i'),_0x3d278d=_0x55d5ea[_0x1552c3(0x1b9)](_0x4bc66c=>_0x4115ad[_0x1552c3(0x1c3)](_0x4bc66c[_0x1552c3(0x191)]['name']));console[_0x1552c3(0x19e)](_0x1552c3(0x1b5)+_0x3d278d['length']+_0x1552c3(0x1cc)+(_0x3d278d[_0x1552c3(0x1b2)]!==0x1?'s':'')+'\x20matching\x20\x27'+_0x1ecd00+'\x27');if(_0x2e463f[_0x1552c3(0x1c5)]===_0x1552c3(0x19b)||_0x2e463f['format']==='jsonl')await handleSDKOutput(_0x3d278d,_0x2e463f);else{if(_0x3d278d[_0x1552c3(0x1b2)]===0x0)console[_0x1552c3(0x1b1)](_0x1552c3(0x1a8)+_0x1ecd00);else{console['log'](_0x1552c3(0x1cd));for(const _0x1ea003 of _0x3d278d){const _0x5c841f=_0x1ea003['attributes'][_0x1552c3(0x1c2)]?a29_0x20e3ed['dim']('\x20('+formatRows(_0x1ea003['attributes'][_0x1552c3(0x1c2)])+')'):'';console[_0x1552c3(0x1b1)](_0x1552c3(0x1ad)+_0x1ea003[_0x1552c3(0x191)][_0x1552c3(0x1ab)]+_0x5c841f);}}}return 0x0;}async[a29_0x503e5d(0x1d2)](_0x28da12){const _0x46a204=a29_0x503e5d,{options:_0x4089de,tdx:_0x3663ef}=_0x28da12,_0x44c318=await withSpinner('Listing\x20parent\x20segments...',()=>_0x3663ef['segment'][_0x46a204(0x1d2)](),{'verbose':_0x4089de[_0x46a204(0x1b6)]}),_0xdfe254=_0x44c318[_0x46a204(0x196)];console[_0x46a204(0x19e)](_0x46a204(0x1b5)+_0xdfe254[_0x46a204(0x1b2)]+_0x46a204(0x1cc)+(_0xdfe254[_0x46a204(0x1b2)]!==0x1?'s':''));if(_0x4089de['format']===_0x46a204(0x19b)||_0x4089de[_0x46a204(0x1c5)]===_0x46a204(0x193))await handleSDKOutput(_0xdfe254,_0x4089de);else{console['log'](_0x46a204(0x1cd));for(const _0x14a56c of _0xdfe254){const _0x5c27b3=_0x14a56c[_0x46a204(0x191)][_0x46a204(0x1c2)]?a29_0x20e3ed[_0x46a204(0x1a7)]('\x20('+formatRows(_0x14a56c[_0x46a204(0x191)][_0x46a204(0x1c2)])+')'):'';console[_0x46a204(0x1b1)](_0x46a204(0x1ad)+_0x14a56c[_0x46a204(0x191)][_0x46a204(0x1ab)]+_0x5c27b3);}}return 0x0;}async[a29_0x503e5d(0x1a6)](_0x3a200d,_0x230827){const _0x59c842=a29_0x503e5d,{options:_0x4e5fee,tdx:_0x4734ba}=_0x3a200d,_0x35504d=await withSpinner(_0x59c842(0x1d1)+_0x230827+_0x59c842(0x18f),()=>_0x4734ba[_0x59c842(0x1b0)][_0x59c842(0x1ce)](_0x230827),{'verbose':_0x4e5fee['verbose']}),_0x5c36dc=_0x35504d[_0x59c842(0x196)];_0x4e5fee[_0x59c842(0x1b6)]&&(console[_0x59c842(0x19e)](_0x59c842(0x1bb)+_0x5c36dc['parentId']),_0x5c36dc[_0x59c842(0x1ba)]&&console[_0x59c842(0x19e)]('Folder\x20ID:\x20'+_0x5c36dc[_0x59c842(0x1ba)]));const _0x296a25=await withSpinner('Listing\x20folders\x20and\x20segments...',()=>_0x4734ba[_0x59c842(0x1b0)][_0x59c842(0x1a6)](_0x5c36dc[_0x59c842(0x1c8)],_0x5c36dc['folderId']),{'verbose':_0x4e5fee[_0x59c842(0x1b6)]}),{folders:_0x4eeb52,segments:_0x211191}=_0x296a25['data'],_0x1cb1c2=_0x4eeb52[_0x59c842(0x1b2)]+_0x211191[_0x59c842(0x1b2)];console['error'](_0x59c842(0x1b5)+_0x4eeb52[_0x59c842(0x1b2)]+_0x59c842(0x198)+(_0x4eeb52[_0x59c842(0x1b2)]!==0x1?'s':'')+_0x59c842(0x1c6)+_0x211191[_0x59c842(0x1b2)]+'\x20segment'+(_0x211191['length']!==0x1?'s':''));if(_0x4e5fee['format']===_0x59c842(0x19b)||_0x4e5fee[_0x59c842(0x1c5)]===_0x59c842(0x193)){const _0x4c768b=[..._0x4eeb52[_0x59c842(0x190)](_0x3e6493=>({..._0x3e6493,'type':_0x59c842(0x1d0)})),..._0x211191[_0x59c842(0x190)](_0x45bd69=>({..._0x45bd69,'type':'segment'}))][_0x59c842(0x19c)]((_0x167fe,_0x44d0c6)=>_0x167fe[_0x59c842(0x1ab)]['localeCompare'](_0x44d0c6[_0x59c842(0x1ab)]));await handleSDKOutput(_0x4c768b,_0x4e5fee);}else{if(_0x1cb1c2===0x0)console[_0x59c842(0x1b1)](a29_0x20e3ed[_0x59c842(0x1a7)]('[/'+_0x230827+']')),console['log'](_0x59c842(0x1a0));else{console[_0x59c842(0x1b1)](a29_0x20e3ed[_0x59c842(0x1a7)]('[/'+_0x230827+']'));const _0x19c153=formatFlatList(_0x4eeb52,_0x211191,{'showMetadata':!![]});console['log'](_0x19c153);}}return 0x0;}async[a29_0x503e5d(0x1be)](_0x565ce9,_0xd6c4ca){const _0xeecb03=a29_0x503e5d,{options:_0x491455,tdx:_0x5bd201}=_0x565ce9,_0x2e8f59=await withSpinner(_0xeecb03(0x1d1)+_0xd6c4ca+'\x27...',()=>_0x5bd201[_0xeecb03(0x1b0)][_0xeecb03(0x1ce)](_0xd6c4ca),{'verbose':_0x491455['verbose']}),_0x336406=_0x2e8f59[_0xeecb03(0x196)];_0x491455['verbose']&&(console['error'](_0xeecb03(0x1bb)+_0x336406[_0xeecb03(0x1c8)]),_0x336406[_0xeecb03(0x1ba)]&&console[_0xeecb03(0x19e)](_0xeecb03(0x192)+_0x336406[_0xeecb03(0x1ba)]));const _0x373406=_0x491455[_0xeecb03(0x199)]||0xa,_0x4ca642=await withSpinner(_0xeecb03(0x1a1),()=>_0x5bd201['segment'][_0xeecb03(0x1be)](_0x336406[_0xeecb03(0x1c8)],_0x336406['folderId'],0x0,_0x373406),{'verbose':_0x491455[_0xeecb03(0x1b6)]}),_0x31f20f=_0x4ca642['data'];console[_0xeecb03(0x19e)](_0xeecb03(0x1c0)+_0x31f20f[_0xeecb03(0x1b2)]+_0xeecb03(0x1bd));if(_0x491455[_0xeecb03(0x1c5)]===_0xeecb03(0x19b)||_0x491455[_0xeecb03(0x1c5)]===_0xeecb03(0x193))await handleSDKOutput(_0x31f20f,_0x491455);else{console[_0xeecb03(0x1b1)](a29_0x20e3ed['dim']('[/'+_0xd6c4ca+']'));const _0x556677=formatTree(_0x31f20f,{'showMetadata':!![]});console['log'](_0x556677);}return 0x0;}}
1
+ const a31_0x2315f9=a31_0x470b;(function(_0xd886ae,_0xdc90bb){const _0xbedd4a=a31_0x470b,_0x37586f=_0xd886ae();while(!![]){try{const _0x5d4062=-parseInt(_0xbedd4a(0xb3))/0x1+-parseInt(_0xbedd4a(0xc3))/0x2*(-parseInt(_0xbedd4a(0xc7))/0x3)+-parseInt(_0xbedd4a(0xcd))/0x4+-parseInt(_0xbedd4a(0xb0))/0x5*(parseInt(_0xbedd4a(0xdc))/0x6)+-parseInt(_0xbedd4a(0xe9))/0x7*(parseInt(_0xbedd4a(0xdf))/0x8)+parseInt(_0xbedd4a(0xab))/0x9+parseInt(_0xbedd4a(0xc4))/0xa;if(_0x5d4062===_0xdc90bb)break;else _0x37586f['push'](_0x37586f['shift']());}catch(_0x1a00fd){_0x37586f['push'](_0x37586f['shift']());}}}(a31_0x490a,0x9193d));import{BaseCommand}from'./command.js';function a31_0x470b(_0x3233aa,_0x1a2e8a){const _0x490a00=a31_0x490a();return a31_0x470b=function(_0x470b54,_0x308469){_0x470b54=_0x470b54-0xaa;let _0x18a913=_0x490a00[_0x470b54];return _0x18a913;},a31_0x470b(_0x3233aa,_0x1a2e8a);}import{SDKError}from'../sdk/index.js';import{handleSDKOutput}from'../utils/command-output.js';function a31_0x490a(){const _0x531d32=['Error:\x20','10049652GLwHtd','\x20top-level\x20items','sort','List\x20parent\x20segments,\x20folders,\x20and\x20child\x20segments','replace','3170vscSuu','listRecursive','Resolving\x20context\x20path\x20\x27','288913keRHlL','json','population','Building\x20hierarchy\x20tree...','error','\x20matching\x20\x27','segment','folder','Site:\x20','attributes','\x20and\x20','Listing\x20parent\x20segments\x20matching\x20\x27','\x20parent\x20segment','Current\x20context:\x20','listUnified','jsonl','1129266VAJQJH','11628480cfMzRl','\x20\x20Cause:\x20','localeCompare','3JISEuh','length','(empty)','parentId','dim','recursive','2768744gzuzXl','Path/pattern\x20arg:\x20','listParents','name','data','👥\x20','[parent\x20segments]','log','execute','Listing\x20folders\x20and\x20segments...','segments','format','maxDepth','listParentsWithPattern','folderId','8214PTFPMk','cause','Error:\x20Pattern\x20matching\x20is\x20only\x20supported\x20at\x20root\x20level\x20(no\x20context\x20set).','3190232OwKNkz','\x27...','includes','Folder\x20ID:\x20','verbose','resolvePathToResource','Parent\x20ID:\x20','✔\x20Found\x20','map','\x20segment','7KOCsTM','\x20folder','\x5c$&','message'];a31_0x490a=function(){return _0x531d32;};return a31_0x490a();}import{withSpinner}from'../utils/spinner.js';import{formatFlatList,formatTree}from'../utils/tree-formatter.js';import{formatRows}from'../utils/formatters.js';import a31_0x136c25 from'chalk';export class SegmentsCommand extends BaseCommand{[a31_0x2315f9(0xd0)]=a31_0x2315f9(0xd7);['description']=a31_0x2315f9(0xae);async[a31_0x2315f9(0xd5)](_0x38ce9b){const _0x44a376=a31_0x2315f9,{options:_0x4f1838,args:_0x45175c}=_0x38ce9b,_0x5aa442=_0x4f1838[_0x44a376(0xcc)],_0x552262=_0x45175c[0x0];try{const _0x2aa8cb=_0x4f1838['segmentPath'];_0x4f1838['verbose']&&(console[_0x44a376(0xb7)](_0x44a376(0xbb)+_0x4f1838['site']),console[_0x44a376(0xb7)](_0x44a376(0xc0)+(_0x2aa8cb||'/')),_0x552262&&console[_0x44a376(0xb7)](_0x44a376(0xce)+_0x552262),_0x5aa442&&console[_0x44a376(0xb7)]('Recursive\x20mode:\x20enabled'));if(_0x552262){const _0x32ad29=_0x552262['includes']('*')||_0x552262[_0x44a376(0xe1)]('?');if(_0x32ad29&&!_0x2aa8cb)return await this[_0x44a376(0xda)](_0x38ce9b,_0x552262);else return _0x32ad29?(console['error'](_0x44a376(0xde)),console[_0x44a376(0xb7)]('Clear\x20context\x20with:\x20tdx\x20segment\x20use\x20/'),0x1):_0x5aa442?await this[_0x44a376(0xb1)](_0x38ce9b,_0x552262):await this['listUnified'](_0x38ce9b,_0x552262);}if(!_0x2aa8cb)return await this[_0x44a376(0xcf)](_0x38ce9b);return _0x5aa442?await this[_0x44a376(0xb1)](_0x38ce9b,_0x2aa8cb):await this[_0x44a376(0xc1)](_0x38ce9b,_0x2aa8cb);}catch(_0x16a366){if(_0x16a366 instanceof SDKError)return console[_0x44a376(0xb7)](_0x44a376(0xaa)+_0x16a366[_0x44a376(0xec)]),_0x16a366[_0x44a376(0xdd)]&&console[_0x44a376(0xb7)](_0x44a376(0xc5)+_0x16a366[_0x44a376(0xdd)]),0x1;throw _0x16a366;}}async[a31_0x2315f9(0xda)](_0x3b2268,_0x447504){const _0x272f9a=a31_0x2315f9,{options:_0x729398,tdx:_0x57b4f3}=_0x3b2268,_0x277dee=await withSpinner(_0x272f9a(0xbe)+_0x447504+_0x272f9a(0xe0),()=>_0x57b4f3['segment'][_0x272f9a(0xcf)](),{'verbose':_0x729398['verbose']}),_0x4e99c4=_0x277dee[_0x272f9a(0xd1)],_0x25894b=_0x447504[_0x272f9a(0xaf)](/[.+^${}()|[\]\\]/g,_0x272f9a(0xeb))[_0x272f9a(0xaf)](/\*/g,'.*')[_0x272f9a(0xaf)](/\?/g,'.'),_0x54ca89=new RegExp('^'+_0x25894b+'$','i'),_0x45a72d=_0x4e99c4['filter'](_0x59a9ef=>_0x54ca89['test'](_0x59a9ef['attributes'][_0x272f9a(0xd0)]));console['error'](_0x272f9a(0xe6)+_0x45a72d[_0x272f9a(0xc8)]+_0x272f9a(0xbf)+(_0x45a72d[_0x272f9a(0xc8)]!==0x1?'s':'')+_0x272f9a(0xb8)+_0x447504+'\x27');if(_0x729398[_0x272f9a(0xd8)]==='json'||_0x729398['format']==='jsonl')await handleSDKOutput(_0x45a72d,_0x729398);else{if(_0x45a72d[_0x272f9a(0xc8)]===0x0)console['log']('No\x20parent\x20segments\x20match\x20pattern:\x20'+_0x447504);else{console['log'](_0x272f9a(0xd3));for(const _0x15df5f of _0x45a72d){const _0x449a15=_0x15df5f[_0x272f9a(0xbc)][_0x272f9a(0xb5)]?a31_0x136c25[_0x272f9a(0xcb)]('\x20('+formatRows(_0x15df5f[_0x272f9a(0xbc)][_0x272f9a(0xb5)])+')'):'';console[_0x272f9a(0xd4)](_0x272f9a(0xd2)+_0x15df5f[_0x272f9a(0xbc)][_0x272f9a(0xd0)]+_0x449a15);}}}return 0x0;}async[a31_0x2315f9(0xcf)](_0x8c70d0){const _0x566041=a31_0x2315f9,{options:_0x26e370,tdx:_0x1d724b}=_0x8c70d0,_0xc9762e=await withSpinner('Listing\x20parent\x20segments...',()=>_0x1d724b[_0x566041(0xb9)][_0x566041(0xcf)](),{'verbose':_0x26e370['verbose']}),_0x32bacb=_0xc9762e[_0x566041(0xd1)];console['error'](_0x566041(0xe6)+_0x32bacb['length']+_0x566041(0xbf)+(_0x32bacb[_0x566041(0xc8)]!==0x1?'s':''));if(_0x26e370[_0x566041(0xd8)]===_0x566041(0xb4)||_0x26e370[_0x566041(0xd8)]===_0x566041(0xc2))await handleSDKOutput(_0x32bacb,_0x26e370);else{console[_0x566041(0xd4)]('[parent\x20segments]');for(const _0x923320 of _0x32bacb){const _0x9b79a3=_0x923320[_0x566041(0xbc)][_0x566041(0xb5)]?a31_0x136c25['dim']('\x20('+formatRows(_0x923320['attributes'][_0x566041(0xb5)])+')'):'';console[_0x566041(0xd4)](_0x566041(0xd2)+_0x923320[_0x566041(0xbc)]['name']+_0x9b79a3);}}return 0x0;}async['listUnified'](_0x468c84,_0x3c521b){const _0x1baa6c=a31_0x2315f9,{options:_0x131077,tdx:_0x1a2b52}=_0x468c84,_0x4fd0b2=await withSpinner(_0x1baa6c(0xb2)+_0x3c521b+_0x1baa6c(0xe0),()=>_0x1a2b52['segment'][_0x1baa6c(0xe4)](_0x3c521b),{'verbose':_0x131077[_0x1baa6c(0xe3)]}),_0x1310cf=_0x4fd0b2['data'];_0x131077['verbose']&&(console[_0x1baa6c(0xb7)](_0x1baa6c(0xe5)+_0x1310cf[_0x1baa6c(0xca)]),_0x1310cf[_0x1baa6c(0xdb)]&&console[_0x1baa6c(0xb7)](_0x1baa6c(0xe2)+_0x1310cf[_0x1baa6c(0xdb)]));const _0x1594cf=await withSpinner(_0x1baa6c(0xd6),()=>_0x1a2b52[_0x1baa6c(0xb9)][_0x1baa6c(0xc1)](_0x1310cf[_0x1baa6c(0xca)],_0x1310cf[_0x1baa6c(0xdb)]),{'verbose':_0x131077['verbose']}),{folders:_0x595817,segments:_0x5c7aea}=_0x1594cf[_0x1baa6c(0xd1)],_0x10d614=_0x595817[_0x1baa6c(0xc8)]+_0x5c7aea[_0x1baa6c(0xc8)];console[_0x1baa6c(0xb7)](_0x1baa6c(0xe6)+_0x595817[_0x1baa6c(0xc8)]+_0x1baa6c(0xea)+(_0x595817[_0x1baa6c(0xc8)]!==0x1?'s':'')+_0x1baa6c(0xbd)+_0x5c7aea[_0x1baa6c(0xc8)]+_0x1baa6c(0xe8)+(_0x5c7aea[_0x1baa6c(0xc8)]!==0x1?'s':''));if(_0x131077[_0x1baa6c(0xd8)]===_0x1baa6c(0xb4)||_0x131077[_0x1baa6c(0xd8)]===_0x1baa6c(0xc2)){const _0x4f7f3f=[..._0x595817[_0x1baa6c(0xe7)](_0x3df5d1=>({..._0x3df5d1,'type':_0x1baa6c(0xba)})),..._0x5c7aea[_0x1baa6c(0xe7)](_0xfd609b=>({..._0xfd609b,'type':_0x1baa6c(0xb9)}))][_0x1baa6c(0xad)]((_0x10ebfc,_0x12af22)=>_0x10ebfc[_0x1baa6c(0xd0)][_0x1baa6c(0xc6)](_0x12af22[_0x1baa6c(0xd0)]));await handleSDKOutput(_0x4f7f3f,_0x131077);}else{if(_0x10d614===0x0)console['log'](a31_0x136c25['dim']('[/'+_0x3c521b+']')),console[_0x1baa6c(0xd4)](_0x1baa6c(0xc9));else{console[_0x1baa6c(0xd4)](a31_0x136c25[_0x1baa6c(0xcb)]('[/'+_0x3c521b+']'));const _0x5488bc=formatFlatList(_0x595817,_0x5c7aea,{'showMetadata':!![]});console[_0x1baa6c(0xd4)](_0x5488bc);}}return 0x0;}async[a31_0x2315f9(0xb1)](_0x181bda,_0xf68f98){const _0x24ac29=a31_0x2315f9,{options:_0x337820,tdx:_0x273435}=_0x181bda,_0x3ea522=await withSpinner(_0x24ac29(0xb2)+_0xf68f98+_0x24ac29(0xe0),()=>_0x273435[_0x24ac29(0xb9)][_0x24ac29(0xe4)](_0xf68f98),{'verbose':_0x337820[_0x24ac29(0xe3)]}),_0x43c776=_0x3ea522['data'];_0x337820[_0x24ac29(0xe3)]&&(console[_0x24ac29(0xb7)]('Parent\x20ID:\x20'+_0x43c776[_0x24ac29(0xca)]),_0x43c776[_0x24ac29(0xdb)]&&console[_0x24ac29(0xb7)](_0x24ac29(0xe2)+_0x43c776[_0x24ac29(0xdb)]));const _0x464389=_0x337820[_0x24ac29(0xd9)]||0xa,_0x4cca9f=await withSpinner(_0x24ac29(0xb6),()=>_0x273435[_0x24ac29(0xb9)][_0x24ac29(0xb1)](_0x43c776[_0x24ac29(0xca)],_0x43c776['folderId'],0x0,_0x464389),{'verbose':_0x337820[_0x24ac29(0xe3)]}),_0x1af143=_0x4cca9f['data'];console[_0x24ac29(0xb7)]('✔\x20Built\x20tree\x20with\x20'+_0x1af143[_0x24ac29(0xc8)]+_0x24ac29(0xac));if(_0x337820[_0x24ac29(0xd8)]===_0x24ac29(0xb4)||_0x337820[_0x24ac29(0xd8)]===_0x24ac29(0xc2))await handleSDKOutput(_0x1af143,_0x337820);else{console[_0x24ac29(0xd4)](a31_0x136c25[_0x24ac29(0xcb)]('[/'+_0xf68f98+']'));const _0x41f465=formatTree(_0x1af143,{'showMetadata':!![]});console[_0x24ac29(0xd4)](_0x41f465);}return 0x0;}}
@@ -1 +1 @@
1
- const a30_0x2f55ff=a30_0x143c;(function(_0xbfc450,_0x2a6fe5){const _0x19c749=a30_0x143c,_0x4ea1d6=_0xbfc450();while(!![]){try{const _0x4bdec6=-parseInt(_0x19c749(0x19f))/0x1+-parseInt(_0x19c749(0x181))/0x2*(-parseInt(_0x19c749(0x196))/0x3)+parseInt(_0x19c749(0x185))/0x4+-parseInt(_0x19c749(0x190))/0x5+parseInt(_0x19c749(0x1a3))/0x6+parseInt(_0x19c749(0x17f))/0x7+-parseInt(_0x19c749(0x19b))/0x8*(parseInt(_0x19c749(0x199))/0x9);if(_0x4bdec6===_0x2a6fe5)break;else _0x4ea1d6['push'](_0x4ea1d6['shift']());}catch(_0xb897b1){_0x4ea1d6['push'](_0x4ea1d6['shift']());}}}(a30_0x48e1,0x79224));import{BaseCommand}from'./command.js';function a30_0x143c(_0x5f1909,_0x1a38c6){const _0x48e144=a30_0x48e1();return a30_0x143c=function(_0x143cf2,_0x35c741){_0x143cf2=_0x143cf2-0x17f;let _0x4076e1=_0x48e144[_0x143cf2];return _0x4076e1;},a30_0x143c(_0x5f1909,_0x1a38c6);}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';function a30_0x48e1(){const _0x49b8b9=['query','4264062RtVMdW','verbose','Table:\x20','5069834vxKHnq','catalog','2224xbWJlS','...','cause','Error:\x20','3872576RCFULY','\x20\x20\x20or:\x20tdx\x20show\x20<catalog.database.table>','data','description','Site:\x20','validate','args','\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--database\x20<database>','Catalog:\x20','\x20from\x20','execute','475365uHefcp','Querying\x20','Usage:\x20tdx\x20show\x20<database.table>\x0a\x20\x20\x20or:\x20tdx\x20show\x20<catalog.database.table>\x0a\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--database\x20<database>\x0a\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--in\x20<database>\x0a\x0aRun\x20\x27tdx\x20show\x20--help\x27\x20for\x20more\x20options','showTable','\x20\x20Cause:\x20','error','1329MIZMnw','database','length','52659wvfFrn','Usage:\x20tdx\x20show\x20<database.table>','2200qRqUqo','Show\x20table\x20contents','site','show','695437JCkGjv','message','name'];a30_0x48e1=function(){return _0x49b8b9;};return a30_0x48e1();}export class ShowCommand extends BaseCommand{[a30_0x2f55ff(0x1a1)]=a30_0x2f55ff(0x19e);[a30_0x2f55ff(0x188)]=a30_0x2f55ff(0x19c);async[a30_0x2f55ff(0x18f)](_0xcd3b53){const _0x382bc6=a30_0x2f55ff;return this[_0x382bc6(0x193)](_0xcd3b53);}async[a30_0x2f55ff(0x193)](_0x4b29bf){const _0x581b0e=a30_0x2f55ff,{options:_0x19b201,args:_0x4ea4f7,tdx:_0x1b8411}=_0x4b29bf;let _0xebb157;try{_0xebb157=parseTableReference(_0x4ea4f7[0x0]);const _0x558110=_0x19b201[_0x581b0e(0x197)];!_0xebb157['database']&&_0x558110&&(_0xebb157[_0x581b0e(0x197)]=_0x558110);const _0x4db71f=validateTableDescribeReference(_0xebb157);if(_0x4db71f)return console[_0x581b0e(0x195)](_0x581b0e(0x184)+_0x4db71f),console[_0x581b0e(0x195)](_0x581b0e(0x19a)),console[_0x581b0e(0x195)]('\x20\x20\x20or:\x20tdx\x20show\x20<catalog.database.table>'),console[_0x581b0e(0x195)](_0x581b0e(0x18c)),0x1;}catch(_0x3479f9){return console[_0x581b0e(0x195)](_0x581b0e(0x184)+_0x3479f9[_0x581b0e(0x1a0)]),console['error'](_0x581b0e(0x19a)),console[_0x581b0e(0x195)](_0x581b0e(0x186)),console[_0x581b0e(0x195)](_0x581b0e(0x18c)),0x1;}const _0x4e1ec7=_0xebb157[_0x581b0e(0x180)],_0x301e32=_0xebb157[_0x581b0e(0x197)],_0x443db8=_0xebb157['table'],_0x509744=resolveLimit(_0x19b201['limit'],DEFAULT_DISPLAY_LIMIT);try{_0x19b201[_0x581b0e(0x1a4)]&&(console[_0x581b0e(0x195)](_0x581b0e(0x189)+_0x19b201[_0x581b0e(0x19d)]),_0x4e1ec7&&console['error'](_0x581b0e(0x18d)+_0x4e1ec7),console[_0x581b0e(0x195)]('Database:\x20'+_0x301e32),console[_0x581b0e(0x195)](_0x581b0e(0x1a5)+_0x443db8),console[_0x581b0e(0x195)]('Limit:\x20'+_0x509744));const _0x58268d=_0x4e1ec7?_0x4e1ec7+'.'+_0x301e32+'.'+_0x443db8:_0x301e32+'.'+_0x443db8,_0x26ddaa=await withSpinner(_0x581b0e(0x191)+_0x58268d+_0x581b0e(0x182),()=>_0x1b8411[_0x581b0e(0x1a2)][_0x581b0e(0x193)](_0x301e32,_0x443db8,_0x509744,_0x4e1ec7),{'verbose':_0x19b201[_0x581b0e(0x1a4)]}),_0xc2c81d=_0x26ddaa[_0x581b0e(0x187)],_0x41ce78=_0xc2c81d[_0x581b0e(0x187)];return _0x41ce78[_0x581b0e(0x198)]===0x0?console[_0x581b0e(0x195)]('✔\x20Query\x20successful\x20-\x200\x20rows\x20returned'):console['error']('✔\x20Retrieved\x20'+_0x41ce78[_0x581b0e(0x198)]+'\x20row'+(_0x41ce78['length']!==0x1?'s':'')+_0x581b0e(0x18e)+_0x58268d),await handleSDKOutput(_0x41ce78,_0x19b201),0x0;}catch(_0x325fb3){if(_0x325fb3 instanceof SDKError)return console['error'](_0x581b0e(0x184)+_0x325fb3[_0x581b0e(0x1a0)]),_0x325fb3[_0x581b0e(0x183)]&&console[_0x581b0e(0x195)](_0x581b0e(0x194)+_0x325fb3[_0x581b0e(0x183)]),0x1;throw _0x325fb3;}}[a30_0x2f55ff(0x18a)](_0x6e0cc7){const _0x2f0952=a30_0x2f55ff;if(_0x6e0cc7[_0x2f0952(0x18b)][_0x2f0952(0x198)]===0x0)return _0x2f0952(0x192);if(_0x6e0cc7[_0x2f0952(0x18b)][_0x2f0952(0x198)]>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
+ const a32_0x31f7c0=a32_0x873d;function a32_0x402d(){const _0x2a9251=['showTable','description','3554388jDPDIY','8JyotZz','args','length','error','verbose','20663460JCHRGS','\x20from\x20','Limit:\x20','Table:\x20','query','\x20row','3813KyVCNK','358VcDpPT','catalog','data','table','show','validate','database','...','262402KZfdeP','\x20\x20Cause:\x20','limit','Error:\x20','2434116VUlwwF','4238073PACrgf','\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--database\x20<database>','Usage:\x20tdx\x20show\x20<database.table>','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','✔\x20Retrieved\x20','cause','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','Catalog:\x20','3MAfWwa','4726445mPmVhO','message'];a32_0x402d=function(){return _0x2a9251;};return a32_0x402d();}(function(_0x907893,_0x1697dc){const _0x50cc56=a32_0x873d,_0x240ec4=_0x907893();while(!![]){try{const _0x390a53=-parseInt(_0x50cc56(0x189))/0x1*(-parseInt(_0x50cc56(0x18a))/0x2)+parseInt(_0x50cc56(0x178))/0x3*(parseInt(_0x50cc56(0x17d))/0x4)+parseInt(_0x50cc56(0x179))/0x5+-parseInt(_0x50cc56(0x16f))/0x6+parseInt(_0x50cc56(0x16b))/0x7+-parseInt(_0x50cc56(0x17e))/0x8*(-parseInt(_0x50cc56(0x170))/0x9)+-parseInt(_0x50cc56(0x183))/0xa;if(_0x390a53===_0x1697dc)break;else _0x240ec4['push'](_0x240ec4['shift']());}catch(_0x21ea15){_0x240ec4['push'](_0x240ec4['shift']());}}}(a32_0x402d,0x86f3c));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';function a32_0x873d(_0x101d2d,_0x1ad4ac){const _0x402d75=a32_0x402d();return a32_0x873d=function(_0x873d08,_0x3b7d2a){_0x873d08=_0x873d08-0x167;let _0x3faa33=_0x402d75[_0x873d08];return _0x3faa33;},a32_0x873d(_0x101d2d,_0x1ad4ac);}import{withSpinner}from'../utils/spinner.js';import{DEFAULT_DISPLAY_LIMIT,resolveLimit}from'../utils/constants.js';export class ShowCommand extends BaseCommand{['name']=a32_0x31f7c0(0x167);[a32_0x31f7c0(0x17c)]='Show\x20table\x20contents';async['execute'](_0x3d0c3c){const _0x11d7cb=a32_0x31f7c0;return this[_0x11d7cb(0x17b)](_0x3d0c3c);}async[a32_0x31f7c0(0x17b)](_0x1c7ef6){const _0x46c0d5=a32_0x31f7c0,{options:_0x432405,args:_0x2406b5,tdx:_0x3f1f53}=_0x1c7ef6;let _0x58d60b;try{_0x58d60b=parseTableReference(_0x2406b5[0x0]);const _0x28bad2=_0x432405[_0x46c0d5(0x169)];!_0x58d60b[_0x46c0d5(0x169)]&&_0x28bad2&&(_0x58d60b[_0x46c0d5(0x169)]=_0x28bad2);const _0x516d3c=validateTableDescribeReference(_0x58d60b);if(_0x516d3c)return console[_0x46c0d5(0x181)](_0x46c0d5(0x16e)+_0x516d3c),console[_0x46c0d5(0x181)](_0x46c0d5(0x172)),console['error']('\x20\x20\x20or:\x20tdx\x20show\x20<catalog.database.table>'),console['error'](_0x46c0d5(0x171)),0x1;}catch(_0x21e33f){return console[_0x46c0d5(0x181)](_0x46c0d5(0x16e)+_0x21e33f[_0x46c0d5(0x17a)]),console['error'](_0x46c0d5(0x172)),console[_0x46c0d5(0x181)]('\x20\x20\x20or:\x20tdx\x20show\x20<catalog.database.table>'),console[_0x46c0d5(0x181)]('\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--database\x20<database>'),0x1;}const _0x1a706d=_0x58d60b[_0x46c0d5(0x18b)],_0x4496ec=_0x58d60b['database'],_0x26e21c=_0x58d60b[_0x46c0d5(0x18d)],_0x54fcc8=resolveLimit(_0x432405[_0x46c0d5(0x16d)],DEFAULT_DISPLAY_LIMIT);try{_0x432405['verbose']&&(console[_0x46c0d5(0x181)]('Site:\x20'+_0x432405['site']),_0x1a706d&&console['error'](_0x46c0d5(0x177)+_0x1a706d),console[_0x46c0d5(0x181)]('Database:\x20'+_0x4496ec),console['error'](_0x46c0d5(0x186)+_0x26e21c),console[_0x46c0d5(0x181)](_0x46c0d5(0x185)+_0x54fcc8));const _0x4d51eb=_0x1a706d?_0x1a706d+'.'+_0x4496ec+'.'+_0x26e21c:_0x4496ec+'.'+_0x26e21c,_0x4cc5e8=await withSpinner('Querying\x20'+_0x4d51eb+_0x46c0d5(0x16a),()=>_0x3f1f53[_0x46c0d5(0x187)][_0x46c0d5(0x17b)](_0x4496ec,_0x26e21c,_0x54fcc8,_0x1a706d),{'verbose':_0x432405[_0x46c0d5(0x182)]}),_0x83646d=_0x4cc5e8[_0x46c0d5(0x18c)],_0x1a99bb=_0x83646d[_0x46c0d5(0x18c)];return _0x1a99bb[_0x46c0d5(0x180)]===0x0?console[_0x46c0d5(0x181)]('✔\x20Query\x20successful\x20-\x200\x20rows\x20returned'):console[_0x46c0d5(0x181)](_0x46c0d5(0x174)+_0x1a99bb[_0x46c0d5(0x180)]+_0x46c0d5(0x188)+(_0x1a99bb[_0x46c0d5(0x180)]!==0x1?'s':'')+_0x46c0d5(0x184)+_0x4d51eb),await handleSDKOutput(_0x1a99bb,_0x432405),0x0;}catch(_0x293e4e){if(_0x293e4e instanceof SDKError)return console[_0x46c0d5(0x181)]('Error:\x20'+_0x293e4e['message']),_0x293e4e[_0x46c0d5(0x175)]&&console[_0x46c0d5(0x181)](_0x46c0d5(0x16c)+_0x293e4e['cause']),0x1;throw _0x293e4e;}}[a32_0x31f7c0(0x168)](_0x5512a2){const _0x4fd1df=a32_0x31f7c0;if(_0x5512a2[_0x4fd1df(0x17f)]['length']===0x0)return _0x4fd1df(0x176);if(_0x5512a2['args'][_0x4fd1df(0x180)]>0x1)return _0x4fd1df(0x173);return undefined;}}
@@ -1 +1 @@
1
- function a31_0x3377(_0x51f29e,_0x536489){const _0x50e087=a31_0x50e0();return a31_0x3377=function(_0x3377c6,_0x5780ad){_0x3377c6=_0x3377c6-0xe5;let _0x140ce7=_0x50e087[_0x3377c6];return _0x140ce7;},a31_0x3377(_0x51f29e,_0x536489);}const a31_0x42e4e8=a31_0x3377;(function(_0x4ec059,_0x3a4d4b){const _0x13f5f7=a31_0x3377,_0x31abf0=_0x4ec059();while(!![]){try{const _0x1e5451=parseInt(_0x13f5f7(0xf3))/0x1*(parseInt(_0x13f5f7(0x106))/0x2)+parseInt(_0x13f5f7(0x10d))/0x3*(-parseInt(_0x13f5f7(0xef))/0x4)+parseInt(_0x13f5f7(0xe7))/0x5*(parseInt(_0x13f5f7(0xed))/0x6)+-parseInt(_0x13f5f7(0xf7))/0x7*(parseInt(_0x13f5f7(0x117))/0x8)+-parseInt(_0x13f5f7(0xe5))/0x9+-parseInt(_0x13f5f7(0x108))/0xa*(-parseInt(_0x13f5f7(0x112))/0xb)+-parseInt(_0x13f5f7(0xfa))/0xc*(-parseInt(_0x13f5f7(0xf6))/0xd);if(_0x1e5451===_0x3a4d4b)break;else _0x31abf0['push'](_0x31abf0['shift']());}catch(_0x57af5e){_0x31abf0['push'](_0x31abf0['shift']());}}}(a31_0x50e0,0xc82bd));import{BaseCommand}from'./command.js';function a31_0x50e0(){const _0x5c61a0=['2170427vtttfc','Or\x20use\x20--in\x20flag:','tables','9204DFROuA','table','length','description','✔\x20Found\x20','\x20\x20tdx\x20tables\x20\x22*.user*\x22\x20\x20\x20\x20\x20\x20\x20->\x20tables\x20matching\x20user*\x20across\x20databases','database','verbose','message','Table\x20pattern:\x20','includes','\x27\x20may\x20not\x20exist\x20or\x20contains\x20no\x20tables','1669714xWzzzo','\x20\x20Or:\x20\x20tdx\x20tables\x20--database\x20','435020uMObAr','\x20\x20tdx\x20tables\x20users\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20->\x20table\x20\x22users\x22\x20across\x20all\x20databases','Listing\x20tables...','Error:\x20','limit','195zkPIMG','\x27\x20without\x20wildcards\x20would\x20search\x20for\x20tables\x20named\x20\x27','error','Did\x20you\x20mean\x20to\x20list\x20all\x20tables\x20from\x20database\x20\x27','List\x20tables\x20in\x20a\x20database','22SQRzay','\x20table','.*\x22','execute','Database:\x20','32diVWdo','cause','\x27\x20is\x20ambiguous.','8766747qehpFB','✖\x20No\x20tables\x20found','12065EVErqW','Database\x20\x27','\x20\x20Or:\x20\x20tdx\x20tables\x20--in\x20','\x20\x20tdx\x20tables\x20\x22mydb.*\x22\x20\x20\x20\x20\x20\x20\x20\x20->\x20all\x20tables\x20from\x20mydb','\x20\x20tdx\x20tables\x20--in\x20mydb\x20\x20\x20\x20\x20\x20\x20->\x20all\x20tables\x20from\x20mydb','name','1782yguJae','query','65292qkjkvs','validate','Database\x20pattern:\x20','\x20\x20Use:\x20tdx\x20tables\x20\x22','1tcRccD','Error:\x20Too\x20many\x20arguments.\x20Use\x20single\x20argument:','Note:\x20\x27','41639uLeVMe'];a31_0x50e0=function(){return _0x5c61a0;};return a31_0x50e0();}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{[a31_0x42e4e8(0xec)]=a31_0x42e4e8(0xf9);[a31_0x42e4e8(0xfd)]=a31_0x42e4e8(0x111);async[a31_0x42e4e8(0x115)](_0x33747d){const _0x44c886=a31_0x42e4e8,{options:_0xc21131,args:_0x42ca85,tdx:_0x10e5a0}=_0x33747d;let _0x40fc56;if(_0x42ca85[_0x44c886(0xfc)]===0x0)_0x40fc56={'database':undefined,'table':undefined,'original':''};else{if(_0x42ca85[_0x44c886(0xfc)]===0x1)try{_0x40fc56=parseTableReference(_0x42ca85[0x0]);if(_0x40fc56['table']&&!_0x40fc56[_0x44c886(0x100)]&&!_0x40fc56[_0x44c886(0xfb)][_0x44c886(0x104)]('*')&&!_0x40fc56['table']['includes']('?'))return console[_0x44c886(0x10f)]('Error:\x20Pattern\x20\x27'+_0x42ca85[0x0]+_0x44c886(0x119)),console[_0x44c886(0x10f)](_0x44c886(0x110)+_0x40fc56[_0x44c886(0xfb)]+'\x27?'),console[_0x44c886(0x10f)](_0x44c886(0xf2)+_0x40fc56['table']+_0x44c886(0x114)),console[_0x44c886(0x10f)](_0x44c886(0xe9)+_0x40fc56[_0x44c886(0xfb)]),console[_0x44c886(0x10f)](_0x44c886(0x107)+_0x40fc56['table']),console[_0x44c886(0x10f)](''),console[_0x44c886(0x10f)](_0x44c886(0xf5)+_0x42ca85[0x0]+_0x44c886(0x10e)+_0x40fc56['table']+'\x27\x20across\x20all\x20databases.'),0x1;}catch(_0x5f5242){return console[_0x44c886(0x10f)](_0x44c886(0x10b)+_0x5f5242[_0x44c886(0x102)]),0x1;}else return console['error'](_0x44c886(0xf4)),console[_0x44c886(0x10f)](_0x44c886(0x109)),console[_0x44c886(0x10f)](_0x44c886(0xea)),console[_0x44c886(0x10f)]('\x20\x20tdx\x20tables\x20\x22mydb.users\x22\x20\x20\x20\x20->\x20table\x20\x22users\x22\x20in\x20database\x20mydb'),console['error'](_0x44c886(0xff)),console['error'](_0x44c886(0xf8)),console['error'](_0x44c886(0xeb)),0x1;}const _0x23adb2=_0xc21131[_0x44c886(0x100)];!_0x40fc56['database']&&_0x23adb2&&(_0x40fc56[_0x44c886(0x100)]=_0x23adb2);try{const _0x411c13=_0x1d1ad2=>_0x1d1ad2&&(_0x1d1ad2[_0x44c886(0x104)]('*')||_0x1d1ad2[_0x44c886(0x104)]('?')),_0x418d8e=_0x411c13(_0x40fc56['database']);_0xc21131['verbose']&&(console[_0x44c886(0x10f)]('Site:\x20'+_0xc21131['site']),_0x40fc56[_0x44c886(0x100)]?_0x418d8e?console[_0x44c886(0x10f)](_0x44c886(0xf1)+_0x40fc56['database']):console['error'](_0x44c886(0x116)+_0x40fc56[_0x44c886(0x100)]):console[_0x44c886(0x10f)]('Database:\x20all'),_0x40fc56['table']&&console['error'](_0x44c886(0x103)+_0x40fc56['table']));const _0x13770b=_0x40fc56['database']&&!_0x418d8e?_0x40fc56[_0x44c886(0x100)]:undefined,_0x28b97f=_0x418d8e?_0x40fc56[_0x44c886(0x100)]:undefined,_0x222785=_0x40fc56['table'],_0x1e3a91=resolveLimit(_0xc21131[_0x44c886(0x10c)],DEFAULT_LISTING_LIMIT),_0x931fe4=await withSpinner(_0x44c886(0x10a),()=>_0x10e5a0[_0x44c886(0xee)]['listTables'](_0x13770b,_0x222785,_0x28b97f,_0x1e3a91),{'verbose':_0xc21131[_0x44c886(0x101)]}),_0x11ebcc=_0x931fe4['data'];if(_0x11ebcc['length']===0x0&&_0x40fc56['database']&&!_0x418d8e)return console[_0x44c886(0x10f)](_0x44c886(0xe6)),console['error'](_0x44c886(0xe8)+_0x40fc56[_0x44c886(0x100)]+_0x44c886(0x105)),0x1;return console[_0x44c886(0x10f)](_0x44c886(0xfe)+_0x11ebcc['length']+_0x44c886(0x113)+(_0x11ebcc[_0x44c886(0xfc)]!==0x1?'s':'')),await handleSDKOutput(_0x11ebcc,{..._0xc21131,'limit':_0x1e3a91}),0x0;}catch(_0x53c37f){if(_0x53c37f instanceof SDKError)return console[_0x44c886(0x10f)](_0x44c886(0x10b)+_0x53c37f['message']),_0x53c37f['cause']&&console[_0x44c886(0x10f)]('\x20\x20Cause:\x20'+_0x53c37f[_0x44c886(0x118)]),0x1;throw _0x53c37f;}}[a31_0x42e4e8(0xf0)](_0x23a167){return undefined;}}
1
+ const a33_0x261aa7=a33_0x57d2;(function(_0x11ca61,_0x5211cd){const _0x5be1da=a33_0x57d2,_0x3376f9=_0x11ca61();while(!![]){try{const _0x4aef81=parseInt(_0x5be1da(0x13b))/0x1*(parseInt(_0x5be1da(0x121))/0x2)+-parseInt(_0x5be1da(0x13c))/0x3+-parseInt(_0x5be1da(0x117))/0x4*(parseInt(_0x5be1da(0x11c))/0x5)+parseInt(_0x5be1da(0x119))/0x6*(parseInt(_0x5be1da(0x133))/0x7)+parseInt(_0x5be1da(0x131))/0x8*(parseInt(_0x5be1da(0x129))/0x9)+-parseInt(_0x5be1da(0x10e))/0xa+-parseInt(_0x5be1da(0x110))/0xb*(parseInt(_0x5be1da(0x114))/0xc);if(_0x4aef81===_0x5211cd)break;else _0x3376f9['push'](_0x3376f9['shift']());}catch(_0x5e7dcc){_0x3376f9['push'](_0x3376f9['shift']());}}}(a33_0x4cab,0x73dd3));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';function a33_0x4cab(){const _0x1aaa5b=['\x20\x20tdx\x20tables\x20users\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20->\x20table\x20\x22users\x22\x20across\x20all\x20databases','6763356Fhdrnq','\x27\x20without\x20wildcards\x20would\x20search\x20for\x20tables\x20named\x20\x27','\x20\x20tdx\x20tables\x20--in\x20mydb\x20\x20\x20\x20\x20\x20\x20->\x20all\x20tables\x20from\x20mydb','data','\x20\x20Cause:\x20','\x20\x20tdx\x20tables\x20\x22*.user*\x22\x20\x20\x20\x20\x20\x20\x20->\x20tables\x20matching\x20user*\x20across\x20databases','\x20\x20Or:\x20\x20tdx\x20tables\x20--database\x20','verbose','8sNmuQX','Database:\x20','7Bvyibi','execute','Table\x20pattern:\x20','Listing\x20tables...','\x20table','✔\x20Found\x20','length','Error:\x20Pattern\x20\x27','727561xwQBkR','474741PXMTQj','✖\x20No\x20tables\x20found','database','5342630YYoucp','List\x20tables\x20in\x20a\x20database','36894SocRvI','limit','error','\x27\x20is\x20ambiguous.','804sRxkvt','name','Database\x20\x27','1775168xKUupy','site','4802076PZDkbd','includes','Did\x20you\x20mean\x20to\x20list\x20all\x20tables\x20from\x20database\x20\x27','10IISjqE','\x20\x20Or:\x20\x20tdx\x20tables\x20--in\x20','query','table','message','2vGbvrU','Database:\x20all','\x20\x20tdx\x20tables\x20\x22mydb.users\x22\x20\x20\x20\x20->\x20table\x20\x22users\x22\x20in\x20database\x20mydb','cause','\x20\x20tdx\x20tables\x20\x22mydb.*\x22\x20\x20\x20\x20\x20\x20\x20\x20->\x20all\x20tables\x20from\x20mydb','description','\x27\x20may\x20not\x20exist\x20or\x20contains\x20no\x20tables'];a33_0x4cab=function(){return _0x1aaa5b;};return a33_0x4cab();}import{handleSDKOutput}from'../utils/command-output.js';import{parseTableReference}from'../utils/table-ref-parser.js';function a33_0x57d2(_0x61d51e,_0xe5c8a7){const _0x4cab57=a33_0x4cab();return a33_0x57d2=function(_0x57d244,_0x4a4bb8){_0x57d244=_0x57d244-0x10c;let _0x5ea630=_0x4cab57[_0x57d244];return _0x5ea630;},a33_0x57d2(_0x61d51e,_0xe5c8a7);}import{DEFAULT_LISTING_LIMIT,resolveLimit}from'../utils/constants.js';import{withSpinner}from'../utils/spinner.js';export class TablesCommand extends BaseCommand{[a33_0x261aa7(0x115)]='tables';[a33_0x261aa7(0x126)]=a33_0x261aa7(0x10f);async[a33_0x261aa7(0x134)](_0x591ccf){const _0x302901=a33_0x261aa7,{options:_0x3e603d,args:_0x4f59e3,tdx:_0x2095d1}=_0x591ccf;let _0x350f87;if(_0x4f59e3[_0x302901(0x139)]===0x0)_0x350f87={'database':undefined,'table':undefined,'original':''};else{if(_0x4f59e3[_0x302901(0x139)]===0x1)try{_0x350f87=parseTableReference(_0x4f59e3[0x0]);if(_0x350f87[_0x302901(0x11f)]&&!_0x350f87[_0x302901(0x10d)]&&!_0x350f87['table']['includes']('*')&&!_0x350f87[_0x302901(0x11f)]['includes']('?'))return console['error'](_0x302901(0x13a)+_0x4f59e3[0x0]+_0x302901(0x113)),console[_0x302901(0x112)](_0x302901(0x11b)+_0x350f87[_0x302901(0x11f)]+'\x27?'),console[_0x302901(0x112)]('\x20\x20Use:\x20tdx\x20tables\x20\x22'+_0x350f87[_0x302901(0x11f)]+'.*\x22'),console[_0x302901(0x112)](_0x302901(0x11d)+_0x350f87['table']),console['error'](_0x302901(0x12f)+_0x350f87['table']),console[_0x302901(0x112)](''),console[_0x302901(0x112)]('Note:\x20\x27'+_0x4f59e3[0x0]+_0x302901(0x12a)+_0x350f87['table']+'\x27\x20across\x20all\x20databases.'),0x1;}catch(_0x4a82a7){return console[_0x302901(0x112)]('Error:\x20'+_0x4a82a7[_0x302901(0x120)]),0x1;}else return console[_0x302901(0x112)]('Error:\x20Too\x20many\x20arguments.\x20Use\x20single\x20argument:'),console[_0x302901(0x112)](_0x302901(0x128)),console['error'](_0x302901(0x125)),console['error'](_0x302901(0x123)),console[_0x302901(0x112)](_0x302901(0x12e)),console[_0x302901(0x112)]('Or\x20use\x20--in\x20flag:'),console['error'](_0x302901(0x12b)),0x1;}const _0x174c15=_0x3e603d[_0x302901(0x10d)];!_0x350f87[_0x302901(0x10d)]&&_0x174c15&&(_0x350f87[_0x302901(0x10d)]=_0x174c15);try{const _0x286f10=_0x2d2e17=>_0x2d2e17&&(_0x2d2e17[_0x302901(0x11a)]('*')||_0x2d2e17[_0x302901(0x11a)]('?')),_0x3648ce=_0x286f10(_0x350f87[_0x302901(0x10d)]);_0x3e603d['verbose']&&(console[_0x302901(0x112)]('Site:\x20'+_0x3e603d[_0x302901(0x118)]),_0x350f87['database']?_0x3648ce?console['error']('Database\x20pattern:\x20'+_0x350f87['database']):console['error'](_0x302901(0x132)+_0x350f87[_0x302901(0x10d)]):console[_0x302901(0x112)](_0x302901(0x122)),_0x350f87[_0x302901(0x11f)]&&console['error'](_0x302901(0x135)+_0x350f87[_0x302901(0x11f)]));const _0x31e246=_0x350f87['database']&&!_0x3648ce?_0x350f87[_0x302901(0x10d)]:undefined,_0x223da5=_0x3648ce?_0x350f87[_0x302901(0x10d)]:undefined,_0x4fce35=_0x350f87[_0x302901(0x11f)],_0x5b1841=resolveLimit(_0x3e603d[_0x302901(0x111)],DEFAULT_LISTING_LIMIT),_0x4c8248=await withSpinner(_0x302901(0x136),()=>_0x2095d1[_0x302901(0x11e)]['listTables'](_0x31e246,_0x4fce35,_0x223da5,_0x5b1841),{'verbose':_0x3e603d[_0x302901(0x130)]}),_0x3d9fa9=_0x4c8248[_0x302901(0x12c)];if(_0x3d9fa9[_0x302901(0x139)]===0x0&&_0x350f87[_0x302901(0x10d)]&&!_0x3648ce)return console[_0x302901(0x112)](_0x302901(0x10c)),console[_0x302901(0x112)](_0x302901(0x116)+_0x350f87['database']+_0x302901(0x127)),0x1;return console[_0x302901(0x112)](_0x302901(0x138)+_0x3d9fa9[_0x302901(0x139)]+_0x302901(0x137)+(_0x3d9fa9[_0x302901(0x139)]!==0x1?'s':'')),await handleSDKOutput(_0x3d9fa9,{..._0x3e603d,'limit':_0x5b1841}),0x0;}catch(_0x514cc3){if(_0x514cc3 instanceof SDKError)return console['error']('Error:\x20'+_0x514cc3[_0x302901(0x120)]),_0x514cc3[_0x302901(0x124)]&&console[_0x302901(0x112)](_0x302901(0x12d)+_0x514cc3['cause']),0x1;throw _0x514cc3;}}['validate'](_0x272b42){return undefined;}}
@@ -1 +1 @@
1
- const a32_0x3b1062=a32_0x531f;function a32_0x2b8d(){const _0x5ca5ad=['execute','use','validate','119096nQaXUk','Resources:\x20database,\x20parent_segment,\x20llm_project,\x20profile\x0a','llm_project','name','.\x20Must\x20be\x20one\x20of:\x20','Error:\x20','description','Usage:\x20tdx\x20use\x20<resource>\x20<value>\x0a','Session\x20database\x20set\x20to:\x20','session','Session\x20profile\x20set\x20to:\x20','Invalid\x20resource:\x20','16291eVzQHf','database','3140sfSsmf','239388oEkTMX','1387690YmsuFx','Or\x20use:\x20tdx\x20context\x20--clear\x20to\x20clear\x20session\x20context\x0a','789551KUqVIE','\x0aTip:\x20Use\x20\x27tdx\x20context\x20--clear\x27\x20to\x20clear\x20session\x20overrides','includes','error','log','parent_segment','6lQkTNL','103192MLQkMd','\x27\x20does\x20not\x20exist','\x20(session:\x20','261mZCNlQ','toString','Session\x20llm_project\x20set\x20to:\x20','\x0aUse\x20\x27tdx\x20profiles\x27\x20to\x20see\x20available\x20profiles','4qXauWo','Error:\x20Profile\x20\x27','85256QjhnYA','message'];a32_0x2b8d=function(){return _0x5ca5ad;};return a32_0x2b8d();}function a32_0x531f(_0x56ebd4,_0x121df5){const _0x2b8d60=a32_0x2b8d();return a32_0x531f=function(_0x531fba,_0x65a5d5){_0x531fba=_0x531fba-0xc7;let _0x24c348=_0x2b8d60[_0x531fba];return _0x24c348;},a32_0x531f(_0x56ebd4,_0x121df5);}(function(_0x367dd0,_0x419525){const _0x1b039a=a32_0x531f,_0x591c98=_0x367dd0();while(!![]){try{const _0xe3f5da=parseInt(_0x1b039a(0xeb))/0x1+parseInt(_0x1b039a(0xe6))/0x2+-parseInt(_0x1b039a(0xd3))/0x3*(-parseInt(_0x1b039a(0xe4))/0x4)+parseInt(_0x1b039a(0xd4))/0x5+parseInt(_0x1b039a(0xdc))/0x6*(-parseInt(_0x1b039a(0xd6))/0x7)+-parseInt(_0x1b039a(0xdd))/0x8*(-parseInt(_0x1b039a(0xe0))/0x9)+parseInt(_0x1b039a(0xd2))/0xa*(-parseInt(_0x1b039a(0xd0))/0xb);if(_0xe3f5da===_0x419525)break;else _0x591c98['push'](_0x591c98['shift']());}catch(_0x530b32){_0x591c98['push'](_0x591c98['shift']());}}}(a32_0x2b8d,0x4cfa6));import{BaseCommand}from'./command.js';import{saveSessionContext,getCurrentSessionPID}from'../core/session.js';import{profileExists}from'../core/profile.js';export class UseCommand extends BaseCommand{[a32_0x3b1062(0xc7)]=a32_0x3b1062(0xe9);[a32_0x3b1062(0xca)]='Set\x20session-level\x20context';[a32_0x3b1062(0xea)](_0x413264){const _0x2abd86=a32_0x3b1062,{args:_0x3fee14}=_0x413264;if(_0x3fee14['length']<0x2)return _0x2abd86(0xcb)+_0x2abd86(0xec)+_0x2abd86(0xd5)+'\x0aRun\x20\x27tdx\x20use\x20--help\x27\x20for\x20more\x20options';const _0x4622d4=_0x3fee14[0x0],_0x270f8d=['database',_0x2abd86(0xdb),'llm_project','profile'];if(!_0x270f8d[_0x2abd86(0xd8)](_0x4622d4))return _0x2abd86(0xcf)+_0x4622d4+_0x2abd86(0xc8)+_0x270f8d['join'](',\x20');return undefined;}async[a32_0x3b1062(0xe8)](_0x2c0746){const _0x1d151b=a32_0x3b1062,{args:_0x18c170,options:_0x4c143b}=_0x2c0746;try{const _0x560d32=_0x18c170[0x0],_0x50c1b5=_0x18c170[0x1];if(_0x560d32==='profile'){if(!profileExists(_0x50c1b5))return console['error'](_0x1d151b(0xe5)+_0x50c1b5+_0x1d151b(0xde)),console[_0x1d151b(0xd9)](_0x1d151b(0xe3)),0x1;const _0x43ede2=_0x4c143b[_0x1d151b(0xcd)]||getCurrentSessionPID()[_0x1d151b(0xe1)]();return saveSessionContext({'profile':_0x50c1b5},_0x4c143b[_0x1d151b(0xcd)]),console[_0x1d151b(0xda)](_0x1d151b(0xce)+_0x50c1b5+'\x20(session:\x20'+_0x43ede2+')'),console['log']('\x0aTip:\x20Use\x20\x27tdx\x20context\x20--clear\x27\x20to\x20clear\x20session\x20overrides'),0x0;}const _0x9b45b8={},_0x58f35c=_0x4c143b[_0x1d151b(0xcd)]||getCurrentSessionPID()[_0x1d151b(0xe1)]();switch(_0x560d32){case _0x1d151b(0xd1):_0x9b45b8['database']=_0x50c1b5,console[_0x1d151b(0xda)](_0x1d151b(0xcc)+_0x50c1b5+_0x1d151b(0xdf)+_0x58f35c+')');break;case _0x1d151b(0xdb):_0x9b45b8[_0x1d151b(0xdb)]=_0x50c1b5,console[_0x1d151b(0xda)]('Session\x20parent_segment\x20set\x20to:\x20'+_0x50c1b5+'\x20(session:\x20'+_0x58f35c+')');break;case _0x1d151b(0xed):_0x9b45b8[_0x1d151b(0xed)]=_0x50c1b5,console[_0x1d151b(0xda)](_0x1d151b(0xe2)+_0x50c1b5+_0x1d151b(0xdf)+_0x58f35c+')');break;}return saveSessionContext(_0x9b45b8,_0x4c143b[_0x1d151b(0xcd)]),console['log'](_0x1d151b(0xd7)),0x0;}catch(_0x113281){return _0x113281 instanceof Error&&console['error'](_0x1d151b(0xc9)+_0x113281[_0x1d151b(0xe7)]),0x1;}}}
1
+ const a34_0x4a8b8a=a34_0x3012;(function(_0x51796c,_0x536497){const _0x23db93=a34_0x3012,_0x240bba=_0x51796c();while(!![]){try{const _0x3cc0ac=parseInt(_0x23db93(0x187))/0x1+parseInt(_0x23db93(0x17f))/0x2+parseInt(_0x23db93(0x199))/0x3*(-parseInt(_0x23db93(0x188))/0x4)+-parseInt(_0x23db93(0x18b))/0x5+parseInt(_0x23db93(0x18e))/0x6*(parseInt(_0x23db93(0x198))/0x7)+-parseInt(_0x23db93(0x17e))/0x8+parseInt(_0x23db93(0x19c))/0x9;if(_0x3cc0ac===_0x536497)break;else _0x240bba['push'](_0x240bba['shift']());}catch(_0xc66ae1){_0x240bba['push'](_0x240bba['shift']());}}}(a34_0x291a,0x4c9ad));import{BaseCommand}from'./command.js';function a34_0x3012(_0x1f4c63,_0x373da6){const _0x291a76=a34_0x291a();return a34_0x3012=function(_0x3012b5,_0x3e1744){_0x3012b5=_0x3012b5-0x17d;let _0x296ad6=_0x291a76[_0x3012b5];return _0x296ad6;},a34_0x3012(_0x1f4c63,_0x373da6);}function a34_0x291a(){const _0xe14b44=['Session\x20database\x20set\x20to:\x20','\x20(session:\x20','445970sneuOL','140SybKsY','error','Resources:\x20database,\x20parent_segment,\x20llm_project,\x20profile\x0a','932485qVQAmm','\x0aRun\x20\x27tdx\x20use\x20--help\x27\x20for\x20more\x20options','llm_project','581718NauxTH','name','\x0aTip:\x20Use\x20\x27tdx\x20context\x20--clear\x27\x20to\x20clear\x20session\x20overrides','database','use','Usage:\x20tdx\x20use\x20<resource>\x20<value>\x0a','Session\x20llm_project\x20set\x20to:\x20','Error:\x20Profile\x20\x27','Invalid\x20resource:\x20','.\x20Must\x20be\x20one\x20of:\x20','7phgzHV','34905PhSTmf','length','session','5849937YkGsTq','toString','parent_segment','join','Or\x20use:\x20tdx\x20context\x20--clear\x20to\x20clear\x20session\x20context\x0a','Session\x20parent_segment\x20set\x20to:\x20','3106352CCYRrI','205746zIgPcm','log','validate','\x27\x20does\x20not\x20exist','profile','includes'];a34_0x291a=function(){return _0xe14b44;};return a34_0x291a();}import{saveSessionContext,getCurrentSessionPID}from'../core/session.js';import{profileExists}from'../core/profile.js';export class UseCommand extends BaseCommand{[a34_0x4a8b8a(0x18f)]=a34_0x4a8b8a(0x192);['description']='Set\x20session-level\x20context';[a34_0x4a8b8a(0x181)](_0x44e0c6){const _0x3e1d61=a34_0x4a8b8a,{args:_0x121607}=_0x44e0c6;if(_0x121607[_0x3e1d61(0x19a)]<0x2)return _0x3e1d61(0x193)+_0x3e1d61(0x18a)+_0x3e1d61(0x1a0)+_0x3e1d61(0x18c);const _0x53d820=_0x121607[0x0],_0x5854a6=[_0x3e1d61(0x191),_0x3e1d61(0x19e),_0x3e1d61(0x18d),'profile'];if(!_0x5854a6[_0x3e1d61(0x184)](_0x53d820))return _0x3e1d61(0x196)+_0x53d820+_0x3e1d61(0x197)+_0x5854a6[_0x3e1d61(0x19f)](',\x20');return undefined;}async['execute'](_0x32c451){const _0x59a070=a34_0x4a8b8a,{args:_0x3c869b,options:_0x3db02c}=_0x32c451;try{const _0x342fb8=_0x3c869b[0x0],_0x1870e8=_0x3c869b[0x1];if(_0x342fb8===_0x59a070(0x183)){if(!profileExists(_0x1870e8))return console[_0x59a070(0x189)](_0x59a070(0x195)+_0x1870e8+_0x59a070(0x182)),console[_0x59a070(0x189)]('\x0aUse\x20\x27tdx\x20profiles\x27\x20to\x20see\x20available\x20profiles'),0x1;const _0x4a395d=_0x3db02c[_0x59a070(0x19b)]||getCurrentSessionPID()[_0x59a070(0x19d)]();return saveSessionContext({'profile':_0x1870e8},_0x3db02c[_0x59a070(0x19b)]),console[_0x59a070(0x180)]('Session\x20profile\x20set\x20to:\x20'+_0x1870e8+_0x59a070(0x186)+_0x4a395d+')'),console[_0x59a070(0x180)](_0x59a070(0x190)),0x0;}const _0x19f078={},_0x4a8bfd=_0x3db02c['session']||getCurrentSessionPID()[_0x59a070(0x19d)]();switch(_0x342fb8){case _0x59a070(0x191):_0x19f078[_0x59a070(0x191)]=_0x1870e8,console[_0x59a070(0x180)](_0x59a070(0x185)+_0x1870e8+_0x59a070(0x186)+_0x4a8bfd+')');break;case _0x59a070(0x19e):_0x19f078[_0x59a070(0x19e)]=_0x1870e8,console[_0x59a070(0x180)](_0x59a070(0x17d)+_0x1870e8+_0x59a070(0x186)+_0x4a8bfd+')');break;case'llm_project':_0x19f078[_0x59a070(0x18d)]=_0x1870e8,console[_0x59a070(0x180)](_0x59a070(0x194)+_0x1870e8+'\x20(session:\x20'+_0x4a8bfd+')');break;}return saveSessionContext(_0x19f078,_0x3db02c[_0x59a070(0x19b)]),console[_0x59a070(0x180)]('\x0aTip:\x20Use\x20\x27tdx\x20context\x20--clear\x27\x20to\x20clear\x20session\x20overrides'),0x0;}catch(_0x178b72){return _0x178b72 instanceof Error&&console['error']('Error:\x20'+_0x178b72['message']),0x1;}}}
@@ -1 +1 @@
1
- const a33_0x37129c=a33_0x189c;(function(_0x50ac26,_0x549bc9){const _0x584ac9=a33_0x189c,_0x4b8ca7=_0x50ac26();while(!![]){try{const _0x560f27=-parseInt(_0x584ac9(0x1f8))/0x1*(parseInt(_0x584ac9(0x224))/0x2)+-parseInt(_0x584ac9(0x25a))/0x3*(-parseInt(_0x584ac9(0x1c3))/0x4)+-parseInt(_0x584ac9(0x226))/0x5+parseInt(_0x584ac9(0x1fe))/0x6+parseInt(_0x584ac9(0x24b))/0x7*(parseInt(_0x584ac9(0x254))/0x8)+parseInt(_0x584ac9(0x206))/0x9+-parseInt(_0x584ac9(0x217))/0xa;if(_0x560f27===_0x549bc9)break;else _0x4b8ca7['push'](_0x4b8ca7['shift']());}catch(_0x104ca4){_0x4b8ca7['push'](_0x4b8ca7['shift']());}}}(a33_0x1ed9,0x4c391));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';function a33_0x1ed9(){const _0xe4bf3b=['description','Cancelled','✔\x20Downloaded\x20','retryAttempt','3267048qoLZBJ','Workflow:\x20','logs','workflow:download','List\x20workflow\x20attempts','stat','Error:\x20','\x20\x20Files\x20extracted:\x20','1739484ZyldDY','workflow:retry','\x22?\x20This\x20cannot\x20be\x20undone.','Usage:\x20workflow:download\x20<project-name>\x20[output-dir]','done','includeRetried','Reason:\x20','session:','✔\x20Retry\x20started','Project:\x20','fileSize','logFiles','Error:\x20Session\x20ID\x20or\x20attempt\x20ID\x20is\x20required','\x20attempt','projects','Project\x20filter:\x20','workflow:delete','2339390xsQaWT','yes','startsWith','taskName','\x20\x20Project:\x20','Downloading\x20project\x20','json','execute','Error:\x20Invalid\x20JSON\x20in\x20--params','includeSubtasks','✔\x20Deleted\x20project\x20','createdAt','Deleting\x20project\x20','1638emIktA','Task\x20name:\x20','984630WLOUwJ','Start\x20a\x20workflow\x20run','finishedAt','Select\x20a\x20task\x20to\x20view\x20logs:','Attempt\x20ID:\x20','data','workflow:run','Session\x20time:\x20','Listing\x20workflow\x20projects...','\x20\x20Attempt\x20ID:\x20','workflow:logs','Filter:\x20','Are\x20you\x20sure\x20you\x20want\x20to\x20kill\x20attempt\x20','Revision:\x20','\x20\x20Revision:\x20','Error:\x20Target\x20must\x20be\x20prefixed\x20with\x20\x22session:\x22\x20or\x20\x22attempt:\x22','length','substring','retryAttemptName','\x20\x20Workflow:\x20','\x20project','verbose','workflow:push','Download\x20workflow\x20project\x20from\x20Treasure\x20Data','success','param','\x20is\x20not\x20a\x20directory','List\x20all\x20workflow\x20projects','delete','Include\x20retried:\x20yes','sessionTime','error','\x20\x20Session\x20ID:\x20','attempt:','projectId','workflow','Project\x20name:\x20','1414bzMmhu','task','Killing\x20attempt...','workflow:tasks','cancelRequested','select','isArray','project','Filter:\x20project=','10496WCstpG','Delete\x20workflow\x20project\x20from\x20Treasure\x20Data','split','kill','✔\x20Found\x20','workflow:workflows','34065BDoTMw','force','Project\x20directory:\x20','Error:\x20Project\x20name\x20or\x20ID\x20is\x20required','Show\x20tasks\x20for\x20an\x20attempt','Starting\x20workflow\x20run...','push','No\x20log\x20files\x20found\x20for\x20this\x20attempt','Target:\x20','List\x20workflows','Error:\x20Project\x20name\x20is\x20required','Listing\x20workflow\x20attempts...','session','revision','params','4LmRGcH','Kill\x20a\x20running\x20attempt','\x20workflow','cause','Error:\x20Attempt\x20ID\x20is\x20required','\x20\x20Cause:\x20','Usage:\x20workflow\x20retry\x20session:<id>\x20or\x20workflow\x20retry\x20attempt:<id>','stringify','status','Show\x20logs\x20for\x20a\x20workflow\x20attempt','getTime','fromTask','tasks','skipValidation','Status:\x20','format','Params:\x20','from','fs/promises','parse','\x20\x20Project\x20ID:\x20','Retry\x20a\x20session\x20or\x20attempt','Force:\x20yes','Listing\x20workflows...','Show\x20specific\x20attempt\x20details','workflow:sessions','index','Pattern:\x20','name','No\x20log\x20content\x20found','canceling','download','Expected\x20format:\x20--param\x20key=value','Getting\x20attempt\x20tasks...','sessionId','message','keys','Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20project\x20\x22','run','round','map','\x20session','\x20\x20Location:\x20','projectName','attempt','limit','Parameters:\x20','running','Push\x20workflow\x20project\x20to\x20Treasure\x20Data','retrySession','Including\x20subtasks:\x20yes','Validation:\x20skipped','Downloading\x20logs...','331qFXiob','✔\x20Workflow\x20run\x20started'];a33_0x1ed9=function(){return _0xe4bf3b;};return a33_0x1ed9();}import{formatBytes}from'../utils/formatters.js';import a33_0x3cc2a0 from'prompts';export class WorkflowProjectsCommand extends BaseCommand{[a33_0x37129c(0x1df)]='workflow:projects';[a33_0x37129c(0x1fa)]=a33_0x37129c(0x241);async[a33_0x37129c(0x21e)](_0x38f729){const _0x4c342e=a33_0x37129c,{options:_0x1f51bf,args:_0x5681c3,tdx:_0x26ef61}=_0x38f729,_0xf99c95=_0x5681c3[0x0];try{_0x1f51bf[_0x4c342e(0x23b)]&&_0xf99c95&&console['error'](_0x4c342e(0x1de)+_0xf99c95);const _0x6f660b=await withSpinner(_0x4c342e(0x22e),()=>_0x26ef61[_0x4c342e(0x249)][_0x4c342e(0x214)](_0xf99c95,{'limit':_0x1f51bf[_0x4c342e(0x1f0)]}),{'verbose':_0x1f51bf['verbose']}),_0x50acfd=_0x6f660b['data'];return console['error'](_0x4c342e(0x258)+_0x50acfd['length']+_0x4c342e(0x23a)+(_0x50acfd[_0x4c342e(0x236)]!==0x1?'s':'')),await handleSDKOutput(_0x50acfd,_0x1f51bf),0x0;}catch(_0x13d23a){if(_0x13d23a instanceof SDKError)return console[_0x4c342e(0x245)](_0x4c342e(0x204)+_0x13d23a['message']),_0x13d23a[_0x4c342e(0x1c6)]&&console[_0x4c342e(0x245)](_0x4c342e(0x1c8)+_0x13d23a['cause']),0x1;throw _0x13d23a;}}}export class WorkflowWorkflowsCommand extends BaseCommand{[a33_0x37129c(0x1df)]=a33_0x37129c(0x259);[a33_0x37129c(0x1fa)]=a33_0x37129c(0x263);async[a33_0x37129c(0x21e)](_0x330691){const _0x5f218d=a33_0x37129c,{options:_0x4d0597,args:_0x462111,tdx:_0xcc66c1}=_0x330691,_0x185221=_0x462111[0x0];try{_0x4d0597[_0x5f218d(0x23b)]&&_0x185221&&console[_0x5f218d(0x245)](_0x5f218d(0x215)+_0x185221);const _0x554bfc=await withSpinner(_0x5f218d(0x1da),()=>_0xcc66c1[_0x5f218d(0x249)]['workflows'](_0x185221,{'limit':_0x4d0597[_0x5f218d(0x1f0)]}),{'verbose':_0x4d0597[_0x5f218d(0x23b)]}),_0x1304fc=_0x554bfc['data'];return console[_0x5f218d(0x245)](_0x5f218d(0x258)+_0x1304fc[_0x5f218d(0x236)]+_0x5f218d(0x1c5)+(_0x1304fc[_0x5f218d(0x236)]!==0x1?'s':'')),await handleSDKOutput(_0x1304fc,_0x4d0597),0x0;}catch(_0x681a92){if(_0x681a92 instanceof SDKError)return console['error'](_0x5f218d(0x204)+_0x681a92[_0x5f218d(0x1e6)]),_0x681a92[_0x5f218d(0x1c6)]&&console[_0x5f218d(0x245)]('\x20\x20Cause:\x20'+_0x681a92['cause']),0x1;throw _0x681a92;}}}export class WorkflowSessionsCommand extends BaseCommand{['name']=a33_0x37129c(0x1dc);[a33_0x37129c(0x1fa)]='List\x20workflow\x20execution\x20sessions';async[a33_0x37129c(0x21e)](_0x1ad432){const _0xe03a5c=a33_0x37129c,{options:_0x387016,args:_0x2e50e3,tdx:_0x56fc5a}=_0x1ad432;let _0x197972,_0x57284a;if(_0x2e50e3[0x0]){const _0x18958c=_0x2e50e3[0x0][_0xe03a5c(0x256)]('.');if(_0x18958c[_0xe03a5c(0x236)]===0x1)_0x197972=_0x18958c[0x0];else{if(_0x18958c['length']===0x2)[_0x197972,_0x57284a]=_0x18958c;else return console[_0xe03a5c(0x245)]('Error:\x20Invalid\x20pattern.\x20Use\x20format:\x20project\x20or\x20project.workflow'),0x1;}}try{if(_0x387016[_0xe03a5c(0x23b)]){if(_0x197972&&_0x57284a)console[_0xe03a5c(0x245)](_0xe03a5c(0x231)+_0x197972+'.'+_0x57284a);else _0x197972&&console[_0xe03a5c(0x245)](_0xe03a5c(0x253)+_0x197972);const _0x211201=_0x387016[_0xe03a5c(0x1cb)];_0x211201&&console[_0xe03a5c(0x245)](_0xe03a5c(0x1d1)+_0x211201);}const _0x363dfa=await withSpinner('Listing\x20workflow\x20sessions...',()=>_0x56fc5a[_0xe03a5c(0x249)]['sessions']({'projectName':_0x197972,'workflowName':_0x57284a,'status':_0x387016[_0xe03a5c(0x1cb)],'fromTime':_0x387016[_0xe03a5c(0x1d4)],'toTime':_0x387016['to'],'limit':_0x387016[_0xe03a5c(0x1f0)]}),{'verbose':_0x387016[_0xe03a5c(0x23b)]}),_0x590fae=_0x363dfa[_0xe03a5c(0x22b)];return console['error']('✔\x20Found\x20'+_0x590fae[_0xe03a5c(0x236)]+_0xe03a5c(0x1ec)+(_0x590fae['length']!==0x1?'s':'')),await handleSDKOutput(_0x590fae,_0x387016),0x0;}catch(_0x83349f){if(_0x83349f instanceof SDKError)return console[_0xe03a5c(0x245)]('Error:\x20'+_0x83349f['message']),_0x83349f[_0xe03a5c(0x1c6)]&&console[_0xe03a5c(0x245)](_0xe03a5c(0x1c8)+_0x83349f[_0xe03a5c(0x1c6)]),0x1;throw _0x83349f;}}}export class WorkflowAttemptsCommand extends BaseCommand{[a33_0x37129c(0x1df)]='workflow:attempts';['description']=a33_0x37129c(0x202);async[a33_0x37129c(0x21e)](_0x5b87f7){const _0x456ad7=a33_0x37129c,{options:_0x31b286,args:_0xd442e,tdx:_0x4fced8}=_0x5b87f7;let _0x1cff2c,_0x5e4c4c;if(_0xd442e[0x0]){const _0x164292=_0xd442e[0x0][_0x456ad7(0x256)]('.');if(_0x164292[_0x456ad7(0x236)]===0x1)_0x1cff2c=_0x164292[0x0];else{if(_0x164292[_0x456ad7(0x236)]===0x2)[_0x1cff2c,_0x5e4c4c]=_0x164292;else return console[_0x456ad7(0x245)]('Error:\x20Invalid\x20pattern.\x20Use\x20format:\x20project\x20or\x20project.workflow'),0x1;}}try{const _0xf86da3=_0x31b286[_0x456ad7(0x20b)];if(_0x31b286[_0x456ad7(0x23b)]){if(_0x1cff2c&&_0x5e4c4c)console[_0x456ad7(0x245)](_0x456ad7(0x231)+_0x1cff2c+'.'+_0x5e4c4c);else _0x1cff2c&&console[_0x456ad7(0x245)](_0x456ad7(0x253)+_0x1cff2c);_0xf86da3&&console[_0x456ad7(0x245)](_0x456ad7(0x243));}const _0x46993a=await withSpinner(_0x456ad7(0x265),()=>_0x4fced8['workflow']['attempts']({'projectName':_0x1cff2c,'workflowName':_0x5e4c4c,'includeRetried':_0xf86da3,'limit':_0x31b286[_0x456ad7(0x1f0)]}),{'verbose':_0x31b286[_0x456ad7(0x23b)]}),_0x3e914f=_0x46993a[_0x456ad7(0x22b)];return console[_0x456ad7(0x245)]('✔\x20Found\x20'+_0x3e914f[_0x456ad7(0x236)]+_0x456ad7(0x213)+(_0x3e914f[_0x456ad7(0x236)]!==0x1?'s':'')),await handleSDKOutput(_0x3e914f,_0x31b286),0x0;}catch(_0x1aa4c7){if(_0x1aa4c7 instanceof SDKError)return console['error'](_0x456ad7(0x204)+_0x1aa4c7['message']),_0x1aa4c7[_0x456ad7(0x1c6)]&&console[_0x456ad7(0x245)](_0x456ad7(0x1c8)+_0x1aa4c7['cause']),0x1;throw _0x1aa4c7;}}}export class WorkflowAttemptCommand extends BaseCommand{['name']='workflow:attempt';['description']=a33_0x37129c(0x1db);async[a33_0x37129c(0x21e)](_0x192291){const _0x5968d3=a33_0x37129c,{options:_0x16691f,args:_0x5a07fd,tdx:_0x3e7d38}=_0x192291,_0x37b56b=_0x5a07fd[0x0];if(!_0x37b56b)return console[_0x5968d3(0x245)]('Error:\x20Attempt\x20ID\x20is\x20required'),0x1;try{_0x16691f['verbose']&&console['error']('Attempt\x20ID:\x20'+_0x37b56b);const _0x50a6bb=await withSpinner('Getting\x20attempt\x20details...',()=>_0x3e7d38['workflow'][_0x5968d3(0x1ef)](_0x37b56b),{'verbose':_0x16691f['verbose']}),_0x2de9a1=_0x50a6bb['data'];let _0x5b88e0;!_0x2de9a1[_0x5968d3(0x20a)]?_0x5b88e0=_0x2de9a1[_0x5968d3(0x24f)]?_0x5968d3(0x1e1):_0x5968d3(0x1f2):_0x5b88e0=_0x2de9a1[_0x5968d3(0x23e)]?_0x5968d3(0x23e):'error';let _0xb9b1ca;if(_0x2de9a1[_0x5968d3(0x222)]&&_0x2de9a1['finishedAt']){const _0x1a5ab3=new Date(_0x2de9a1[_0x5968d3(0x222)])[_0x5968d3(0x1cd)](),_0x5e698f=new Date(_0x2de9a1['finishedAt'])['getTime']();_0xb9b1ca=Math[_0x5968d3(0x1ea)]((_0x5e698f-_0x1a5ab3)/0x3e8);}const _0x47ebc0={'attempt_id':_0x2de9a1['id'],'status':_0x5b88e0,..._0x2de9a1[_0x5968d3(0x1dd)]!==undefined&&{'index':_0x2de9a1[_0x5968d3(0x1dd)]},..._0x2de9a1['project']&&{'project':_0x2de9a1['project']['name']},..._0x2de9a1['workflow']&&{'workflow':_0x2de9a1[_0x5968d3(0x249)][_0x5968d3(0x1df)]},..._0x2de9a1[_0x5968d3(0x1e5)]&&{'session_id':_0x2de9a1[_0x5968d3(0x1e5)]},..._0x2de9a1[_0x5968d3(0x244)]&&{'session_time':_0x2de9a1['sessionTime']},..._0x2de9a1[_0x5968d3(0x238)]&&{'retry_attempt':_0x2de9a1[_0x5968d3(0x238)]},..._0xb9b1ca!==undefined&&{'duration_sec':_0xb9b1ca},..._0x2de9a1[_0x5968d3(0x222)]&&{'created_at':_0x2de9a1[_0x5968d3(0x222)]},..._0x2de9a1['finishedAt']&&{'finished_at':_0x2de9a1[_0x5968d3(0x228)]},...Object['keys'](_0x2de9a1[_0x5968d3(0x268)])[_0x5968d3(0x236)]>0x0&&{'params':_0x2de9a1['params']}};return await handleSingleObjectOutput(_0x47ebc0,_0x16691f),0x0;}catch(_0x28a879){if(_0x28a879 instanceof SDKError)return console[_0x5968d3(0x245)](_0x5968d3(0x204)+_0x28a879[_0x5968d3(0x1e6)]),_0x28a879['cause']&&console['error'](_0x5968d3(0x1c8)+_0x28a879[_0x5968d3(0x1c6)]),0x1;throw _0x28a879;}}}export class WorkflowTasksCommand extends BaseCommand{[a33_0x37129c(0x1df)]=a33_0x37129c(0x24e);[a33_0x37129c(0x1fa)]=a33_0x37129c(0x25e);async[a33_0x37129c(0x21e)](_0x521799){const _0x4db080=a33_0x37129c,{options:_0x2f51c2,args:_0x34a5c5,tdx:_0x46d04a}=_0x521799,_0x7acc9=_0x34a5c5[0x0];if(!_0x7acc9)return console[_0x4db080(0x245)](_0x4db080(0x1c7)),0x1;try{const _0x2e9522=_0x2f51c2[_0x4db080(0x220)];_0x2f51c2['verbose']&&(console[_0x4db080(0x245)](_0x4db080(0x22a)+_0x7acc9),_0x2e9522&&console[_0x4db080(0x245)](_0x4db080(0x1f5)));const _0x3acce6=await withSpinner(_0x4db080(0x1e4),()=>_0x46d04a[_0x4db080(0x249)][_0x4db080(0x1cf)](_0x7acc9,_0x2e9522||![]),{'verbose':_0x2f51c2[_0x4db080(0x23b)]}),_0x702e4b=_0x3acce6['data'];return console[_0x4db080(0x245)](_0x4db080(0x258)+_0x702e4b[_0x4db080(0x236)]+'\x20task'+(_0x702e4b[_0x4db080(0x236)]!==0x1?'s':'')),await handleSDKOutput(_0x702e4b,_0x2f51c2),0x0;}catch(_0x280720){if(_0x280720 instanceof SDKError)return console[_0x4db080(0x245)](_0x4db080(0x204)+_0x280720[_0x4db080(0x1e6)]),_0x280720[_0x4db080(0x1c6)]&&console[_0x4db080(0x245)](_0x4db080(0x1c8)+_0x280720[_0x4db080(0x1c6)]),0x1;throw _0x280720;}}}function a33_0x189c(_0x55413a,_0x1804bc){const _0x1ed9f9=a33_0x1ed9();return a33_0x189c=function(_0x189c58,_0x24c6b1){_0x189c58=_0x189c58-0x1c3;let _0x233624=_0x1ed9f9[_0x189c58];return _0x233624;},a33_0x189c(_0x55413a,_0x1804bc);}export class WorkflowLogsCommand extends BaseCommand{[a33_0x37129c(0x1df)]=a33_0x37129c(0x230);[a33_0x37129c(0x1fa)]=a33_0x37129c(0x1cc);async[a33_0x37129c(0x21e)](_0x5cd153){const _0x57f482=a33_0x37129c,{options:_0x16dd57,args:_0x2fe536,tdx:_0x231c42}=_0x5cd153,_0x399bbd=_0x2fe536[0x0];let _0x4a7fc6=_0x2fe536[0x1];if(!_0x399bbd)return console['error'](_0x57f482(0x1c7)),0x1;try{_0x16dd57[_0x57f482(0x23b)]&&(console[_0x57f482(0x245)](_0x57f482(0x22a)+_0x399bbd),_0x4a7fc6&&console[_0x57f482(0x245)](_0x57f482(0x225)+_0x4a7fc6));const _0x423f41=await withSpinner('Fetching\x20log\x20files...',()=>_0x231c42[_0x57f482(0x249)][_0x57f482(0x211)](_0x399bbd,_0x4a7fc6),{'verbose':_0x16dd57[_0x57f482(0x23b)]}),_0xd375ed=_0x423f41[_0x57f482(0x22b)];if(_0xd375ed[_0x57f482(0x236)]===0x0)return console[_0x57f482(0x245)](_0x57f482(0x261)),0x0;if(!_0x4a7fc6&&(_0x16dd57[_0x57f482(0x21d)]||_0x16dd57[_0x57f482(0x1d2)]))return await handleSDKOutput(_0xd375ed,_0x16dd57),0x0;if(!_0x4a7fc6){const _0xbfad72=_0xd375ed[_0x57f482(0x1eb)](_0x5ba349=>({'title':_0x5ba349[_0x57f482(0x21a)]+'\x20('+formatBytes(_0x5ba349[_0x57f482(0x210)])+')','value':_0x5ba349[_0x57f482(0x21a)]})),_0x43a541=await a33_0x3cc2a0({'type':_0x57f482(0x250),'name':_0x57f482(0x24c),'message':_0x57f482(0x229),'choices':_0xbfad72});if(!_0x43a541[_0x57f482(0x24c)])return console[_0x57f482(0x245)](_0x57f482(0x1fb)),0x0;_0x4a7fc6=_0x43a541[_0x57f482(0x24c)];}const _0xc9fef7=await withSpinner(_0x57f482(0x1f7),()=>_0x231c42[_0x57f482(0x249)][_0x57f482(0x200)](_0x399bbd,_0x4a7fc6),{'verbose':_0x16dd57[_0x57f482(0x23b)]}),_0x127add=_0xc9fef7[_0x57f482(0x22b)];return _0x127add?console['log'](_0x127add):console['error'](_0x57f482(0x1e0)),0x0;}catch(_0x3b70f1){if(_0x3b70f1 instanceof SDKError)return console[_0x57f482(0x245)](_0x57f482(0x204)+_0x3b70f1[_0x57f482(0x1e6)]),_0x3b70f1[_0x57f482(0x1c6)]&&console[_0x57f482(0x245)](_0x57f482(0x1c8)+_0x3b70f1['cause']),0x1;throw _0x3b70f1;}}}export class WorkflowKillCommand extends BaseCommand{[a33_0x37129c(0x1df)]='workflow:kill';[a33_0x37129c(0x1fa)]=a33_0x37129c(0x1c4);async[a33_0x37129c(0x21e)](_0x4f40a9){const _0x53f176=a33_0x37129c,{options:_0x272e42,args:_0xf0fa3f,tdx:_0x208193}=_0x4f40a9,_0x54d505=_0xf0fa3f[0x0];if(!_0x54d505)return console[_0x53f176(0x245)]('Error:\x20Attempt\x20ID\x20is\x20required'),0x1;try{const _0xa07cb5=_0x272e42['reason'];_0x272e42[_0x53f176(0x23b)]&&(console[_0x53f176(0x245)](_0x53f176(0x22a)+_0x54d505),_0xa07cb5&&console['error'](_0x53f176(0x20c)+_0xa07cb5));if(!_0x272e42['yes']){const _0x1d568e=await confirm(_0x53f176(0x232)+_0x54d505+'?');if(!_0x1d568e)return console[_0x53f176(0x245)]('Cancelled'),0x0;}const _0x3bf68b=await withSpinner(_0x53f176(0x24d),()=>_0x208193['workflow'][_0x53f176(0x257)](_0x54d505,_0xa07cb5),{'verbose':_0x272e42['verbose']}),_0x283c4d=_0x3bf68b[_0x53f176(0x22b)];return console[_0x53f176(0x245)]('✔\x20'+_0x283c4d),0x0;}catch(_0x4d4d0a){if(_0x4d4d0a instanceof SDKError)return console[_0x53f176(0x245)](_0x53f176(0x204)+_0x4d4d0a[_0x53f176(0x1e6)]),_0x4d4d0a[_0x53f176(0x1c6)]&&console[_0x53f176(0x245)](_0x53f176(0x1c8)+_0x4d4d0a['cause']),0x1;throw _0x4d4d0a;}}}export class WorkflowRetryCommand extends BaseCommand{[a33_0x37129c(0x1df)]=a33_0x37129c(0x207);[a33_0x37129c(0x1fa)]=a33_0x37129c(0x1d8);async[a33_0x37129c(0x21e)](_0x19bc9a){const _0x5ab844=a33_0x37129c,{options:_0x489847,args:_0x4e23f5,tdx:_0x4823d2}=_0x19bc9a,_0x59955f=_0x4e23f5[0x0];if(!_0x59955f)return console['error'](_0x5ab844(0x212)),console[_0x5ab844(0x245)](_0x5ab844(0x1c9)),0x1;let _0x577f63=![],_0x1ea2dc=_0x59955f;if(_0x59955f[_0x5ab844(0x219)](_0x5ab844(0x20d)))_0x577f63=!![],_0x1ea2dc=_0x59955f[_0x5ab844(0x237)](0x8);else{if(_0x59955f[_0x5ab844(0x219)](_0x5ab844(0x247)))_0x577f63=![],_0x1ea2dc=_0x59955f[_0x5ab844(0x237)](0x8);else return console[_0x5ab844(0x245)](_0x5ab844(0x235)),console[_0x5ab844(0x245)](_0x5ab844(0x1c9)),0x1;}try{const _0x36cdba=_0x489847[_0x5ab844(0x1ce)],_0xb4a34d=_0x489847['resumeFrom'],_0x47e24f=_0x489847[_0x5ab844(0x268)],_0x2fe29d=_0x489847[_0x5ab844(0x25b)];_0x489847[_0x5ab844(0x23b)]&&(console[_0x5ab844(0x245)](_0x5ab844(0x262)+(_0x577f63?_0x5ab844(0x266):_0x5ab844(0x1ef))+'\x20'+_0x1ea2dc),_0x36cdba&&console[_0x5ab844(0x245)]('From\x20task:\x20'+_0x36cdba),_0xb4a34d&&console['error']('Resume\x20from:\x20'+_0xb4a34d),_0x47e24f&&console[_0x5ab844(0x245)](_0x5ab844(0x1d3)+_0x47e24f),_0x2fe29d&&console[_0x5ab844(0x245)](_0x5ab844(0x1d9)));let _0x7fe487;if(_0x47e24f)try{if(_0x47e24f[_0x5ab844(0x219)]('@')){const _0x157793=await import(_0x5ab844(0x1d5)),_0x62b802=_0x47e24f[_0x5ab844(0x237)](0x1),_0x581325=await _0x157793['readFile'](_0x62b802,'utf-8');_0x7fe487=JSON[_0x5ab844(0x1d6)](_0x581325);}else _0x7fe487=JSON['parse'](_0x47e24f);}catch{return console['error'](_0x5ab844(0x21f)),0x1;}if(!_0x489847[_0x5ab844(0x218)]){const _0x336c7c=await confirm('Are\x20you\x20sure\x20you\x20want\x20to\x20retry\x20'+(_0x577f63?_0x5ab844(0x266):_0x5ab844(0x1ef))+'\x20'+_0x1ea2dc+'?');if(!_0x336c7c)return console[_0x5ab844(0x245)](_0x5ab844(0x1fb)),0x0;}let _0x23f5a4;_0x577f63?_0x23f5a4=await withSpinner('Retrying\x20session...',()=>_0x4823d2['workflow'][_0x5ab844(0x1f4)](_0x1ea2dc,{'fromTask':_0x36cdba,'retryParams':_0x7fe487}),{'verbose':_0x489847[_0x5ab844(0x23b)]}):_0x23f5a4=await withSpinner('Retrying\x20attempt...',()=>_0x4823d2[_0x5ab844(0x249)][_0x5ab844(0x1fd)](_0x1ea2dc,{'resumeFrom':_0xb4a34d,'retryParams':_0x7fe487,'force':_0x2fe29d}),{'verbose':_0x489847['verbose']});const _0x244f01=_0x23f5a4[_0x5ab844(0x22b)];return console[_0x5ab844(0x245)](_0x5ab844(0x20e)),console[_0x5ab844(0x245)]('\x20\x20New\x20attempt\x20ID:\x20'+_0x244f01['attemptId']),console[_0x5ab844(0x245)](_0x5ab844(0x246)+_0x244f01[_0x5ab844(0x1e5)]),0x0;}catch(_0x2141ea){if(_0x2141ea instanceof SDKError)return console[_0x5ab844(0x245)](_0x5ab844(0x204)+_0x2141ea[_0x5ab844(0x1e6)]),_0x2141ea[_0x5ab844(0x1c6)]&&console[_0x5ab844(0x245)]('\x20\x20Cause:\x20'+_0x2141ea[_0x5ab844(0x1c6)]),0x1;throw _0x2141ea;}}}export class WorkflowRunCommand extends BaseCommand{['name']=a33_0x37129c(0x22c);[a33_0x37129c(0x1fa)]=a33_0x37129c(0x227);async[a33_0x37129c(0x21e)](_0x3e3034){const _0x3ab37a=a33_0x37129c,{options:_0x4ed10e,args:_0x360995,tdx:_0x484c65}=_0x3e3034,_0x238b68=_0x360995[0x0];if(!_0x238b68)return console[_0x3ab37a(0x245)]('Error:\x20Workflow\x20identifier\x20is\x20required'),console[_0x3ab37a(0x245)]('Usage:\x20workflow\x20run\x20<project.workflow>\x20[options]'),0x1;const _0x4fe6b9=_0x4ed10e[_0x3ab37a(0x23f)],_0x4ae7ef=_0x4ed10e['sessionTime'],_0x3d9204={};if(_0x4fe6b9&&Array[_0x3ab37a(0x251)](_0x4fe6b9))for(const _0x1c4411 of _0x4fe6b9){const _0x1d5a96=_0x1c4411['indexOf']('=');if(_0x1d5a96===-0x1)return console[_0x3ab37a(0x245)]('Error:\x20Invalid\x20parameter\x20format:\x20'+_0x1c4411),console[_0x3ab37a(0x245)](_0x3ab37a(0x1e3)),0x1;const _0x260471=_0x1c4411[_0x3ab37a(0x237)](0x0,_0x1d5a96),_0x1320d9=_0x1c4411[_0x3ab37a(0x237)](_0x1d5a96+0x1);try{_0x3d9204[_0x260471]=JSON[_0x3ab37a(0x1d6)](_0x1320d9);}catch{_0x3d9204[_0x260471]=_0x1320d9;}}_0x4ed10e[_0x3ab37a(0x23b)]&&(console['error'](_0x3ab37a(0x1ff)+_0x238b68),Object[_0x3ab37a(0x1e7)](_0x3d9204)['length']>0x0&&console['error'](_0x3ab37a(0x1f1)+JSON[_0x3ab37a(0x1ca)](_0x3d9204)),_0x4ae7ef&&console[_0x3ab37a(0x245)](_0x3ab37a(0x22d)+_0x4ae7ef));const _0x4772f0=await withSpinner(_0x3ab37a(0x25f),()=>_0x484c65['workflow'][_0x3ab37a(0x1e9)](_0x238b68,_0x3d9204,{'sessionTime':_0x4ae7ef}),{'verbose':_0x4ed10e['verbose']}),_0x47cb3a=_0x4772f0['data'];return console['error'](_0x3ab37a(0x1f9)),console[_0x3ab37a(0x245)](_0x3ab37a(0x22f)+_0x47cb3a['id']),console[_0x3ab37a(0x245)]('\x20\x20Session\x20ID:\x20'+_0x47cb3a[_0x3ab37a(0x1e5)]),console[_0x3ab37a(0x245)](_0x3ab37a(0x21b)+_0x47cb3a[_0x3ab37a(0x252)]?.[_0x3ab37a(0x1df)]),console[_0x3ab37a(0x245)](_0x3ab37a(0x239)+_0x47cb3a[_0x3ab37a(0x249)]?.[_0x3ab37a(0x1df)]),0x0;}}export class WorkflowDownloadCommand extends BaseCommand{[a33_0x37129c(0x1df)]=a33_0x37129c(0x201);[a33_0x37129c(0x1fa)]=a33_0x37129c(0x23d);async[a33_0x37129c(0x21e)](_0x171684){const _0x2b11cd=a33_0x37129c,{options:_0x4c9f15,args:_0x50a8b2,tdx:_0x5efa92}=_0x171684,_0x50e435=_0x50a8b2[0x0],_0x33a361=_0x50a8b2[0x1]||'.';if(!_0x50e435)return console[_0x2b11cd(0x245)](_0x2b11cd(0x264)),console['error'](_0x2b11cd(0x209)),0x1;const _0x466c33=_0x4c9f15[_0x2b11cd(0x267)];_0x4c9f15['verbose']&&(console[_0x2b11cd(0x245)](_0x2b11cd(0x20f)+_0x50e435),console[_0x2b11cd(0x245)]('Output\x20directory:\x20'+_0x33a361),_0x466c33&&console[_0x2b11cd(0x245)](_0x2b11cd(0x233)+_0x466c33));const _0x2a9b5f=await withSpinner(_0x2b11cd(0x21c)+_0x50e435+'...',()=>_0x5efa92[_0x2b11cd(0x249)][_0x2b11cd(0x1e2)](_0x50e435,_0x33a361,{'revision':_0x466c33}),{'verbose':_0x4c9f15[_0x2b11cd(0x23b)]}),_0x2cfb63=_0x2a9b5f['data'];return console[_0x2b11cd(0x245)](_0x2b11cd(0x1fc)+_0x2cfb63[_0x2b11cd(0x1ee)]),console['error'](_0x2b11cd(0x234)+_0x2cfb63['revision']),console[_0x2b11cd(0x245)](_0x2b11cd(0x205)+_0x2cfb63['filesExtracted']),console[_0x2b11cd(0x245)](_0x2b11cd(0x1ed)+_0x33a361+'/'+_0x2cfb63[_0x2b11cd(0x1ee)]),0x0;}}export class WorkflowPushCommand extends BaseCommand{[a33_0x37129c(0x1df)]=a33_0x37129c(0x23c);[a33_0x37129c(0x1fa)]=a33_0x37129c(0x1f3);async[a33_0x37129c(0x21e)](_0xbd04a){const _0x12bd65=a33_0x37129c,{options:_0x9b7d6a,args:_0x54f76c,tdx:_0x361e81}=_0xbd04a;let _0x4090da='.',_0x13d3df=_0x9b7d6a['name'];if(_0x54f76c[0x0]){const {promises:_0x3a9afa}=await import('fs');try{const _0x2e4d8f=await _0x3a9afa[_0x12bd65(0x203)](_0x54f76c[0x0]);if(_0x2e4d8f['isDirectory']())_0x4090da=_0x54f76c[0x0];else return console['error']('Error:\x20'+_0x54f76c[0x0]+_0x12bd65(0x240)),0x1;}catch{_0x13d3df=_0x54f76c[0x0],_0x4090da='.';}}const _0x371e27=_0x9b7d6a[_0x12bd65(0x267)],_0x75c080=_0x9b7d6a[_0x12bd65(0x1d0)];_0x9b7d6a['verbose']&&(console['error'](_0x12bd65(0x25c)+_0x4090da),_0x13d3df&&console[_0x12bd65(0x245)](_0x12bd65(0x24a)+_0x13d3df),_0x371e27&&console[_0x12bd65(0x245)](_0x12bd65(0x233)+_0x371e27),_0x75c080&&console[_0x12bd65(0x245)](_0x12bd65(0x1f6)));const _0x47f7c9=await withSpinner('Pushing\x20workflow\x20project...',()=>_0x361e81[_0x12bd65(0x249)][_0x12bd65(0x260)](_0x4090da,{'projectName':_0x13d3df,'revision':_0x371e27,'skipValidation':_0x75c080}),{'verbose':_0x9b7d6a['verbose']}),_0x590a4a=_0x47f7c9['data'];return console[_0x12bd65(0x245)]('✔\x20Pushed\x20'+_0x590a4a[_0x12bd65(0x1ee)]),console[_0x12bd65(0x245)](_0x12bd65(0x1d7)+_0x590a4a[_0x12bd65(0x248)]),console['error']('\x20\x20Revision:\x20'+_0x590a4a['revision']),0x0;}}export class WorkflowDeleteCommand extends BaseCommand{[a33_0x37129c(0x1df)]=a33_0x37129c(0x216);[a33_0x37129c(0x1fa)]=a33_0x37129c(0x255);async[a33_0x37129c(0x21e)](_0x990a78){const _0x5770c0=a33_0x37129c,{options:_0x306743,args:_0x270d16,tdx:_0x2d3b84}=_0x990a78,_0x485427=_0x270d16[0x0];if(!_0x485427)return console[_0x5770c0(0x245)](_0x5770c0(0x25d)),console[_0x5770c0(0x245)]('Usage:\x20workflow:delete\x20<project-name-or-id>'),0x1;_0x306743['verbose']&&console[_0x5770c0(0x245)]('Project:\x20'+_0x485427);if(!_0x306743['yes']){const _0x1c8516=await confirm(_0x5770c0(0x1e8)+_0x485427+_0x5770c0(0x208));if(!_0x1c8516)return console['error'](_0x5770c0(0x1fb)),0x0;}const _0x5ef632=await withSpinner(_0x5770c0(0x223)+_0x485427+'...',()=>_0x2d3b84[_0x5770c0(0x249)][_0x5770c0(0x242)](_0x485427),{'verbose':_0x306743[_0x5770c0(0x23b)]}),_0x204c82=_0x5ef632[_0x5770c0(0x22b)];return console['error'](_0x5770c0(0x221)+_0x204c82[_0x5770c0(0x1ee)]),console['error'](_0x5770c0(0x1d7)+_0x204c82[_0x5770c0(0x248)]),0x0;}}
1
+ const a35_0x3cf62c=a35_0x2913;(function(_0x5322d4,_0x538645){const _0x4d7b0b=a35_0x2913,_0x202953=_0x5322d4();while(!![]){try{const _0x5135aa=parseInt(_0x4d7b0b(0x224))/0x1*(parseInt(_0x4d7b0b(0x286))/0x2)+-parseInt(_0x4d7b0b(0x1f1))/0x3*(parseInt(_0x4d7b0b(0x1fa))/0x4)+-parseInt(_0x4d7b0b(0x1d9))/0x5*(parseInt(_0x4d7b0b(0x254))/0x6)+-parseInt(_0x4d7b0b(0x1ff))/0x7*(-parseInt(_0x4d7b0b(0x25f))/0x8)+-parseInt(_0x4d7b0b(0x1d8))/0x9*(-parseInt(_0x4d7b0b(0x21a))/0xa)+-parseInt(_0x4d7b0b(0x21f))/0xb*(parseInt(_0x4d7b0b(0x289))/0xc)+parseInt(_0x4d7b0b(0x27b))/0xd;if(_0x5135aa===_0x538645)break;else _0x202953['push'](_0x202953['shift']());}catch(_0x1f2416){_0x202953['push'](_0x202953['shift']());}}}(a35_0x4653,0x3b284));function a35_0x4653(){const _0x2ba9d7=['keys','\x20project','Resume\x20from:\x20','Retrying\x20session...','readFile','✔\x20Found\x20','Error:\x20Workflow\x20identifier\x20is\x20required','328EfxdOS','Listing\x20workflows...','\x20workflow','Revision:\x20','status','2576rEUgGX','logs','List\x20workflow\x20execution\x20sessions','running','Listing\x20workflow\x20projects...','round','map','✔\x20Pushed\x20','sessionId','Show\x20logs\x20for\x20a\x20workflow\x20attempt','kill','createdAt','List\x20all\x20workflow\x20projects','workflow:kill','Project\x20filter:\x20','success','skipValidation','isDirectory','projects','Start\x20a\x20workflow\x20run','workflows','attempt','Select\x20a\x20task\x20to\x20view\x20logs:','\x20\x20Location:\x20','Usage:\x20workflow\x20retry\x20session:<id>\x20or\x20workflow\x20retry\x20attempt:<id>','Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20project\x20\x22','Fetching\x20log\x20files...','246550mYjxCS','Push\x20workflow\x20project\x20to\x20Treasure\x20Data','cause','length','Params:\x20','59939vaGegn','Error:\x20Project\x20name\x20is\x20required','Task\x20name:\x20','includeSubtasks','Expected\x20format:\x20--param\x20key=value','2osCibp','\x20\x20Revision:\x20','run','task','execute','Getting\x20attempt\x20tasks...','Error:\x20Invalid\x20JSON\x20in\x20--params','✔\x20Retry\x20started','projectId','stringify','sessionTime','Error:\x20Target\x20must\x20be\x20prefixed\x20with\x20\x22session:\x22\x20or\x20\x22attempt:\x22','Cancelled','\x20\x20Attempt\x20ID:\x20','Kill\x20a\x20running\x20attempt','attempt:','index','Killing\x20attempt...','\x20\x20Workflow:\x20','retrySession','push','Status:\x20','Filter:\x20','\x20\x20Cause:\x20','workflow:retry','cancelRequested','stat','workflow:attempt','includeRetried','utf-8','logFiles','\x20\x20Session\x20ID:\x20','No\x20log\x20files\x20found\x20for\x20this\x20attempt','name','attemptId','Usage:\x20workflow:download\x20<project-name>\x20[output-dir]','workflow','Target:\x20','retryAttemptName','Project\x20directory:\x20','session:','Error:\x20Attempt\x20ID\x20is\x20required','indexOf','\x20attempt','error','workflow:delete','Workflow:\x20','Getting\x20attempt\x20details...','6906godWVT','select','✔\x20Downloaded\x20','done','\x22?\x20This\x20cannot\x20be\x20undone.','Starting\x20workflow\x20run...','taskName','\x20\x20Project:\x20','workflow:run','Filter:\x20project=','project','344HziDER','Include\x20retried:\x20yes','List\x20workflows','download','getTime','startsWith','params','split','Error:\x20Invalid\x20parameter\x20format:\x20','verbose','Parameters:\x20','Reason:\x20','From\x20task:\x20','fromTask','Error:\x20','json','parse','workflow:attempts','Downloading\x20logs...','Download\x20workflow\x20project\x20from\x20Treasure\x20Data','message','retryAttempt','finishedAt','workflow:workflows','Delete\x20workflow\x20project\x20from\x20Treasure\x20Data','✔\x20Workflow\x20run\x20started','projectName','\x20task','8060299mYTpFQ','Show\x20specific\x20attempt\x20details','delete','workflow:tasks','Session\x20time:\x20','\x20is\x20not\x20a\x20directory','Attempt\x20ID:\x20','session','Project\x20name:\x20','data','Validation:\x20skipped','133954BTMndw','description','filesExtracted','960qeBexE','Deleting\x20project\x20','72ADcYCo','835bapDdZ','yes','revision','limit','Error:\x20Invalid\x20pattern.\x20Use\x20format:\x20project\x20or\x20project.workflow','workflow:sessions','substring','Listing\x20workflow\x20sessions...','fileSize','from','workflow:projects','\x20\x20Project\x20ID:\x20','Show\x20tasks\x20for\x20an\x20attempt','Project:\x20','isArray','reason','...','fs/promises','attempts','Force:\x20yes','Error:\x20Project\x20name\x20or\x20ID\x20is\x20required','\x20\x20Files\x20extracted:\x20','workflow:push','workflow:download','3534mQWywA','Output\x20directory:\x20'];a35_0x4653=function(){return _0x2ba9d7;};return a35_0x4653();}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 a35_0xc912cc from'prompts';export class WorkflowProjectsCommand extends BaseCommand{[a35_0x3cf62c(0x245)]=a35_0x3cf62c(0x1e3);['description']=a35_0x3cf62c(0x20b);async[a35_0x3cf62c(0x228)](_0x26f315){const _0x5d38bf=a35_0x3cf62c,{options:_0x4bdf19,args:_0xb6efd,tdx:_0x5771f6}=_0x26f315,_0xb585=_0xb6efd[0x0];try{_0x4bdf19[_0x5d38bf(0x268)]&&_0xb585&&console[_0x5d38bf(0x250)]('Pattern:\x20'+_0xb585);const _0x30798a=await withSpinner(_0x5d38bf(0x203),()=>_0x5771f6[_0x5d38bf(0x248)][_0x5d38bf(0x211)](_0xb585,{'limit':_0x4bdf19[_0x5d38bf(0x1dc)]}),{'verbose':_0x4bdf19[_0x5d38bf(0x268)]}),_0x22c1c2=_0x30798a['data'];return console[_0x5d38bf(0x250)](_0x5d38bf(0x1f8)+_0x22c1c2[_0x5d38bf(0x21d)]+_0x5d38bf(0x1f4)+(_0x22c1c2[_0x5d38bf(0x21d)]!==0x1?'s':'')),await handleSDKOutput(_0x22c1c2,_0x4bdf19),0x0;}catch(_0x2e4e36){if(_0x2e4e36 instanceof SDKError)return console[_0x5d38bf(0x250)](_0x5d38bf(0x26d)+_0x2e4e36['message']),_0x2e4e36[_0x5d38bf(0x21c)]&&console[_0x5d38bf(0x250)](_0x5d38bf(0x23b)+_0x2e4e36[_0x5d38bf(0x21c)]),0x1;throw _0x2e4e36;}}}export class WorkflowWorkflowsCommand extends BaseCommand{['name']=a35_0x3cf62c(0x276);[a35_0x3cf62c(0x287)]=a35_0x3cf62c(0x261);async[a35_0x3cf62c(0x228)](_0x3840a6){const _0x50503a=a35_0x3cf62c,{options:_0x1532fc,args:_0x470778,tdx:_0x740225}=_0x3840a6,_0x3f6a76=_0x470778[0x0];try{_0x1532fc['verbose']&&_0x3f6a76&&console[_0x50503a(0x250)](_0x50503a(0x20d)+_0x3f6a76);const _0x44f216=await withSpinner(_0x50503a(0x1fb),()=>_0x740225['workflow'][_0x50503a(0x213)](_0x3f6a76,{'limit':_0x1532fc[_0x50503a(0x1dc)]}),{'verbose':_0x1532fc[_0x50503a(0x268)]}),_0x454102=_0x44f216[_0x50503a(0x284)];return console[_0x50503a(0x250)](_0x50503a(0x1f8)+_0x454102[_0x50503a(0x21d)]+_0x50503a(0x1fc)+(_0x454102[_0x50503a(0x21d)]!==0x1?'s':'')),await handleSDKOutput(_0x454102,_0x1532fc),0x0;}catch(_0x2e5bdd){if(_0x2e5bdd instanceof SDKError)return console[_0x50503a(0x250)](_0x50503a(0x26d)+_0x2e5bdd[_0x50503a(0x273)]),_0x2e5bdd['cause']&&console[_0x50503a(0x250)]('\x20\x20Cause:\x20'+_0x2e5bdd['cause']),0x1;throw _0x2e5bdd;}}}export class WorkflowSessionsCommand extends BaseCommand{['name']=a35_0x3cf62c(0x1de);['description']=a35_0x3cf62c(0x201);async[a35_0x3cf62c(0x228)](_0x547412){const _0x18e464=a35_0x3cf62c,{options:_0x1023b7,args:_0x4670f1,tdx:_0x58c606}=_0x547412;let _0x53433,_0x3c4a4e;if(_0x4670f1[0x0]){const _0x2d85af=_0x4670f1[0x0][_0x18e464(0x266)]('.');if(_0x2d85af[_0x18e464(0x21d)]===0x1)_0x53433=_0x2d85af[0x0];else{if(_0x2d85af[_0x18e464(0x21d)]===0x2)[_0x53433,_0x3c4a4e]=_0x2d85af;else return console[_0x18e464(0x250)](_0x18e464(0x1dd)),0x1;}}try{if(_0x1023b7[_0x18e464(0x268)]){if(_0x53433&&_0x3c4a4e)console[_0x18e464(0x250)](_0x18e464(0x23a)+_0x53433+'.'+_0x3c4a4e);else _0x53433&&console[_0x18e464(0x250)](_0x18e464(0x25d)+_0x53433);const _0x21b76a=_0x1023b7[_0x18e464(0x1fe)];_0x21b76a&&console[_0x18e464(0x250)](_0x18e464(0x239)+_0x21b76a);}const _0x5b9b6f=await withSpinner(_0x18e464(0x1e0),()=>_0x58c606[_0x18e464(0x248)]['sessions']({'projectName':_0x53433,'workflowName':_0x3c4a4e,'status':_0x1023b7[_0x18e464(0x1fe)],'fromTime':_0x1023b7[_0x18e464(0x1e2)],'toTime':_0x1023b7['to'],'limit':_0x1023b7['limit']}),{'verbose':_0x1023b7[_0x18e464(0x268)]}),_0x52cf80=_0x5b9b6f[_0x18e464(0x284)];return console['error'](_0x18e464(0x1f8)+_0x52cf80[_0x18e464(0x21d)]+'\x20session'+(_0x52cf80['length']!==0x1?'s':'')),await handleSDKOutput(_0x52cf80,_0x1023b7),0x0;}catch(_0x55d834){if(_0x55d834 instanceof SDKError)return console[_0x18e464(0x250)](_0x18e464(0x26d)+_0x55d834[_0x18e464(0x273)]),_0x55d834['cause']&&console[_0x18e464(0x250)]('\x20\x20Cause:\x20'+_0x55d834[_0x18e464(0x21c)]),0x1;throw _0x55d834;}}}export class WorkflowAttemptsCommand extends BaseCommand{[a35_0x3cf62c(0x245)]=a35_0x3cf62c(0x270);[a35_0x3cf62c(0x287)]='List\x20workflow\x20attempts';async['execute'](_0x37f712){const _0x3422e8=a35_0x3cf62c,{options:_0x296c35,args:_0x45250e,tdx:_0x37a30a}=_0x37f712;let _0x816204,_0x24aa24;if(_0x45250e[0x0]){const _0x502ad3=_0x45250e[0x0][_0x3422e8(0x266)]('.');if(_0x502ad3[_0x3422e8(0x21d)]===0x1)_0x816204=_0x502ad3[0x0];else{if(_0x502ad3['length']===0x2)[_0x816204,_0x24aa24]=_0x502ad3;else return console[_0x3422e8(0x250)]('Error:\x20Invalid\x20pattern.\x20Use\x20format:\x20project\x20or\x20project.workflow'),0x1;}}try{const _0x7bfd49=_0x296c35[_0x3422e8(0x240)];if(_0x296c35[_0x3422e8(0x268)]){if(_0x816204&&_0x24aa24)console[_0x3422e8(0x250)](_0x3422e8(0x23a)+_0x816204+'.'+_0x24aa24);else _0x816204&&console[_0x3422e8(0x250)](_0x3422e8(0x25d)+_0x816204);_0x7bfd49&&console[_0x3422e8(0x250)](_0x3422e8(0x260));}const _0x2f7118=await withSpinner('Listing\x20workflow\x20attempts...',()=>_0x37a30a[_0x3422e8(0x248)][_0x3422e8(0x1eb)]({'projectName':_0x816204,'workflowName':_0x24aa24,'includeRetried':_0x7bfd49,'limit':_0x296c35[_0x3422e8(0x1dc)]}),{'verbose':_0x296c35[_0x3422e8(0x268)]}),_0x4c8f0b=_0x2f7118['data'];return console[_0x3422e8(0x250)]('✔\x20Found\x20'+_0x4c8f0b[_0x3422e8(0x21d)]+_0x3422e8(0x24f)+(_0x4c8f0b[_0x3422e8(0x21d)]!==0x1?'s':'')),await handleSDKOutput(_0x4c8f0b,_0x296c35),0x0;}catch(_0x16f1ea){if(_0x16f1ea instanceof SDKError)return console[_0x3422e8(0x250)]('Error:\x20'+_0x16f1ea['message']),_0x16f1ea[_0x3422e8(0x21c)]&&console['error']('\x20\x20Cause:\x20'+_0x16f1ea[_0x3422e8(0x21c)]),0x1;throw _0x16f1ea;}}}export class WorkflowAttemptCommand extends BaseCommand{[a35_0x3cf62c(0x245)]=a35_0x3cf62c(0x23f);[a35_0x3cf62c(0x287)]=a35_0x3cf62c(0x27c);async['execute'](_0x151e8f){const _0x308eb4=a35_0x3cf62c,{options:_0x10b150,args:_0x5f1213,tdx:_0x907a27}=_0x151e8f,_0x211950=_0x5f1213[0x0];if(!_0x211950)return console['error']('Error:\x20Attempt\x20ID\x20is\x20required'),0x1;try{_0x10b150[_0x308eb4(0x268)]&&console[_0x308eb4(0x250)](_0x308eb4(0x281)+_0x211950);const _0x1630d7=await withSpinner(_0x308eb4(0x253),()=>_0x907a27[_0x308eb4(0x248)][_0x308eb4(0x214)](_0x211950),{'verbose':_0x10b150[_0x308eb4(0x268)]}),_0x4e3933=_0x1630d7[_0x308eb4(0x284)];let _0x11fa24;!_0x4e3933[_0x308eb4(0x257)]?_0x11fa24=_0x4e3933[_0x308eb4(0x23d)]?'canceling':_0x308eb4(0x202):_0x11fa24=_0x4e3933[_0x308eb4(0x20e)]?_0x308eb4(0x20e):_0x308eb4(0x250);let _0x30e8dc;if(_0x4e3933[_0x308eb4(0x20a)]&&_0x4e3933['finishedAt']){const _0x33e249=new Date(_0x4e3933[_0x308eb4(0x20a)])[_0x308eb4(0x263)](),_0x2d90d7=new Date(_0x4e3933[_0x308eb4(0x275)])[_0x308eb4(0x263)]();_0x30e8dc=Math[_0x308eb4(0x204)]((_0x2d90d7-_0x33e249)/0x3e8);}const _0x472b13={'attempt_id':_0x4e3933['id'],'status':_0x11fa24,..._0x4e3933[_0x308eb4(0x234)]!==undefined&&{'index':_0x4e3933[_0x308eb4(0x234)]},..._0x4e3933[_0x308eb4(0x25e)]&&{'project':_0x4e3933[_0x308eb4(0x25e)][_0x308eb4(0x245)]},..._0x4e3933[_0x308eb4(0x248)]&&{'workflow':_0x4e3933[_0x308eb4(0x248)]['name']},..._0x4e3933[_0x308eb4(0x207)]&&{'session_id':_0x4e3933[_0x308eb4(0x207)]},..._0x4e3933[_0x308eb4(0x22e)]&&{'session_time':_0x4e3933[_0x308eb4(0x22e)]},..._0x4e3933[_0x308eb4(0x24a)]&&{'retry_attempt':_0x4e3933[_0x308eb4(0x24a)]},..._0x30e8dc!==undefined&&{'duration_sec':_0x30e8dc},..._0x4e3933[_0x308eb4(0x20a)]&&{'created_at':_0x4e3933[_0x308eb4(0x20a)]},..._0x4e3933[_0x308eb4(0x275)]&&{'finished_at':_0x4e3933[_0x308eb4(0x275)]},...Object[_0x308eb4(0x1f3)](_0x4e3933[_0x308eb4(0x265)])[_0x308eb4(0x21d)]>0x0&&{'params':_0x4e3933[_0x308eb4(0x265)]}};return await handleSingleObjectOutput(_0x472b13,_0x10b150),0x0;}catch(_0x55ee96){if(_0x55ee96 instanceof SDKError)return console[_0x308eb4(0x250)](_0x308eb4(0x26d)+_0x55ee96['message']),_0x55ee96[_0x308eb4(0x21c)]&&console[_0x308eb4(0x250)](_0x308eb4(0x23b)+_0x55ee96['cause']),0x1;throw _0x55ee96;}}}export class WorkflowTasksCommand extends BaseCommand{[a35_0x3cf62c(0x245)]=a35_0x3cf62c(0x27e);[a35_0x3cf62c(0x287)]=a35_0x3cf62c(0x1e5);async[a35_0x3cf62c(0x228)](_0x4484fc){const _0x54ca74=a35_0x3cf62c,{options:_0x3c01c8,args:_0x3340d6,tdx:_0x46bd50}=_0x4484fc,_0x5e9334=_0x3340d6[0x0];if(!_0x5e9334)return console[_0x54ca74(0x250)](_0x54ca74(0x24d)),0x1;try{const _0x8fb230=_0x3c01c8[_0x54ca74(0x222)];_0x3c01c8[_0x54ca74(0x268)]&&(console[_0x54ca74(0x250)](_0x54ca74(0x281)+_0x5e9334),_0x8fb230&&console['error']('Including\x20subtasks:\x20yes'));const _0x3dc63a=await withSpinner(_0x54ca74(0x229),()=>_0x46bd50[_0x54ca74(0x248)]['tasks'](_0x5e9334,_0x8fb230||![]),{'verbose':_0x3c01c8['verbose']}),_0x53c4fc=_0x3dc63a[_0x54ca74(0x284)];return console[_0x54ca74(0x250)]('✔\x20Found\x20'+_0x53c4fc[_0x54ca74(0x21d)]+_0x54ca74(0x27a)+(_0x53c4fc[_0x54ca74(0x21d)]!==0x1?'s':'')),await handleSDKOutput(_0x53c4fc,_0x3c01c8),0x0;}catch(_0x3ebead){if(_0x3ebead instanceof SDKError)return console[_0x54ca74(0x250)](_0x54ca74(0x26d)+_0x3ebead[_0x54ca74(0x273)]),_0x3ebead[_0x54ca74(0x21c)]&&console[_0x54ca74(0x250)](_0x54ca74(0x23b)+_0x3ebead[_0x54ca74(0x21c)]),0x1;throw _0x3ebead;}}}export class WorkflowLogsCommand extends BaseCommand{[a35_0x3cf62c(0x245)]='workflow:logs';[a35_0x3cf62c(0x287)]=a35_0x3cf62c(0x208);async[a35_0x3cf62c(0x228)](_0xd03cd3){const _0x2b270a=a35_0x3cf62c,{options:_0x49763c,args:_0x185e71,tdx:_0x936d51}=_0xd03cd3,_0x14d876=_0x185e71[0x0];let _0x524794=_0x185e71[0x1];if(!_0x14d876)return console[_0x2b270a(0x250)](_0x2b270a(0x24d)),0x1;try{_0x49763c['verbose']&&(console[_0x2b270a(0x250)]('Attempt\x20ID:\x20'+_0x14d876),_0x524794&&console[_0x2b270a(0x250)](_0x2b270a(0x221)+_0x524794));const _0x1abc62=await withSpinner(_0x2b270a(0x219),()=>_0x936d51['workflow'][_0x2b270a(0x242)](_0x14d876,_0x524794),{'verbose':_0x49763c[_0x2b270a(0x268)]}),_0x45045d=_0x1abc62[_0x2b270a(0x284)];if(_0x45045d['length']===0x0)return console[_0x2b270a(0x250)](_0x2b270a(0x244)),0x0;if(!_0x524794&&(_0x49763c[_0x2b270a(0x26e)]||_0x49763c['format']))return await handleSDKOutput(_0x45045d,_0x49763c),0x0;if(!_0x524794){const _0x435497=_0x45045d[_0x2b270a(0x205)](_0x3c616f=>({'title':_0x3c616f[_0x2b270a(0x25a)]+'\x20('+formatBytes(_0x3c616f[_0x2b270a(0x1e1)])+')','value':_0x3c616f[_0x2b270a(0x25a)]})),_0x326be9=await a35_0xc912cc({'type':_0x2b270a(0x255),'name':_0x2b270a(0x227),'message':_0x2b270a(0x215),'choices':_0x435497});if(!_0x326be9[_0x2b270a(0x227)])return console['error'](_0x2b270a(0x230)),0x0;_0x524794=_0x326be9['task'];}const _0x50d916=await withSpinner(_0x2b270a(0x271),()=>_0x936d51[_0x2b270a(0x248)][_0x2b270a(0x200)](_0x14d876,_0x524794),{'verbose':_0x49763c[_0x2b270a(0x268)]}),_0x440185=_0x50d916[_0x2b270a(0x284)];return _0x440185?console['log'](_0x440185):console[_0x2b270a(0x250)]('No\x20log\x20content\x20found'),0x0;}catch(_0x497643){if(_0x497643 instanceof SDKError)return console[_0x2b270a(0x250)](_0x2b270a(0x26d)+_0x497643['message']),_0x497643['cause']&&console[_0x2b270a(0x250)](_0x2b270a(0x23b)+_0x497643[_0x2b270a(0x21c)]),0x1;throw _0x497643;}}}export class WorkflowKillCommand extends BaseCommand{[a35_0x3cf62c(0x245)]=a35_0x3cf62c(0x20c);[a35_0x3cf62c(0x287)]=a35_0x3cf62c(0x232);async['execute'](_0x85f27a){const _0x303543=a35_0x3cf62c,{options:_0x520c47,args:_0x5e3681,tdx:_0x51db58}=_0x85f27a,_0x4aa3c4=_0x5e3681[0x0];if(!_0x4aa3c4)return console[_0x303543(0x250)](_0x303543(0x24d)),0x1;try{const _0x45563c=_0x520c47[_0x303543(0x1e8)];_0x520c47[_0x303543(0x268)]&&(console[_0x303543(0x250)]('Attempt\x20ID:\x20'+_0x4aa3c4),_0x45563c&&console['error'](_0x303543(0x26a)+_0x45563c));if(!_0x520c47[_0x303543(0x1da)]){const _0x3b327b=await confirm('Are\x20you\x20sure\x20you\x20want\x20to\x20kill\x20attempt\x20'+_0x4aa3c4+'?');if(!_0x3b327b)return console[_0x303543(0x250)]('Cancelled'),0x0;}const _0x4209d9=await withSpinner(_0x303543(0x235),()=>_0x51db58[_0x303543(0x248)][_0x303543(0x209)](_0x4aa3c4,_0x45563c),{'verbose':_0x520c47[_0x303543(0x268)]}),_0x44960e=_0x4209d9[_0x303543(0x284)];return console[_0x303543(0x250)]('✔\x20'+_0x44960e),0x0;}catch(_0xc572e7){if(_0xc572e7 instanceof SDKError)return console[_0x303543(0x250)](_0x303543(0x26d)+_0xc572e7['message']),_0xc572e7[_0x303543(0x21c)]&&console[_0x303543(0x250)](_0x303543(0x23b)+_0xc572e7[_0x303543(0x21c)]),0x1;throw _0xc572e7;}}}function a35_0x2913(_0x445a63,_0x391be5){const _0x4653c9=a35_0x4653();return a35_0x2913=function(_0x2913a8,_0x3b9cd2){_0x2913a8=_0x2913a8-0x1d7;let _0x45a29d=_0x4653c9[_0x2913a8];return _0x45a29d;},a35_0x2913(_0x445a63,_0x391be5);}export class WorkflowRetryCommand extends BaseCommand{[a35_0x3cf62c(0x245)]=a35_0x3cf62c(0x23c);['description']='Retry\x20a\x20session\x20or\x20attempt';async[a35_0x3cf62c(0x228)](_0x1bb0df){const _0x3d7c68=a35_0x3cf62c,{options:_0x57e48f,args:_0x45d1bc,tdx:_0x148e69}=_0x1bb0df,_0x45168f=_0x45d1bc[0x0];if(!_0x45168f)return console[_0x3d7c68(0x250)]('Error:\x20Session\x20ID\x20or\x20attempt\x20ID\x20is\x20required'),console['error'](_0x3d7c68(0x217)),0x1;let _0x257beb=![],_0x566ea2=_0x45168f;if(_0x45168f[_0x3d7c68(0x264)](_0x3d7c68(0x24c)))_0x257beb=!![],_0x566ea2=_0x45168f['substring'](0x8);else{if(_0x45168f[_0x3d7c68(0x264)](_0x3d7c68(0x233)))_0x257beb=![],_0x566ea2=_0x45168f[_0x3d7c68(0x1df)](0x8);else return console[_0x3d7c68(0x250)](_0x3d7c68(0x22f)),console[_0x3d7c68(0x250)](_0x3d7c68(0x217)),0x1;}try{const _0x122dbc=_0x57e48f[_0x3d7c68(0x26c)],_0x6624f8=_0x57e48f['resumeFrom'],_0x3ff2be=_0x57e48f[_0x3d7c68(0x265)],_0x2cf428=_0x57e48f['force'];_0x57e48f['verbose']&&(console['error'](_0x3d7c68(0x249)+(_0x257beb?_0x3d7c68(0x282):_0x3d7c68(0x214))+'\x20'+_0x566ea2),_0x122dbc&&console[_0x3d7c68(0x250)](_0x3d7c68(0x26b)+_0x122dbc),_0x6624f8&&console['error'](_0x3d7c68(0x1f5)+_0x6624f8),_0x3ff2be&&console[_0x3d7c68(0x250)](_0x3d7c68(0x21e)+_0x3ff2be),_0x2cf428&&console[_0x3d7c68(0x250)](_0x3d7c68(0x1ec)));let _0x5d4049;if(_0x3ff2be)try{if(_0x3ff2be[_0x3d7c68(0x264)]('@')){const _0xd166b6=await import(_0x3d7c68(0x1ea)),_0x36b491=_0x3ff2be[_0x3d7c68(0x1df)](0x1),_0x250a5c=await _0xd166b6[_0x3d7c68(0x1f7)](_0x36b491,_0x3d7c68(0x241));_0x5d4049=JSON[_0x3d7c68(0x26f)](_0x250a5c);}else _0x5d4049=JSON[_0x3d7c68(0x26f)](_0x3ff2be);}catch{return console[_0x3d7c68(0x250)](_0x3d7c68(0x22a)),0x1;}if(!_0x57e48f[_0x3d7c68(0x1da)]){const _0x82a213=await confirm('Are\x20you\x20sure\x20you\x20want\x20to\x20retry\x20'+(_0x257beb?_0x3d7c68(0x282):_0x3d7c68(0x214))+'\x20'+_0x566ea2+'?');if(!_0x82a213)return console['error'](_0x3d7c68(0x230)),0x0;}let _0x1c35ea;_0x257beb?_0x1c35ea=await withSpinner(_0x3d7c68(0x1f6),()=>_0x148e69[_0x3d7c68(0x248)][_0x3d7c68(0x237)](_0x566ea2,{'fromTask':_0x122dbc,'retryParams':_0x5d4049}),{'verbose':_0x57e48f[_0x3d7c68(0x268)]}):_0x1c35ea=await withSpinner('Retrying\x20attempt...',()=>_0x148e69['workflow'][_0x3d7c68(0x274)](_0x566ea2,{'resumeFrom':_0x6624f8,'retryParams':_0x5d4049,'force':_0x2cf428}),{'verbose':_0x57e48f[_0x3d7c68(0x268)]});const _0x452364=_0x1c35ea[_0x3d7c68(0x284)];return console[_0x3d7c68(0x250)](_0x3d7c68(0x22b)),console[_0x3d7c68(0x250)]('\x20\x20New\x20attempt\x20ID:\x20'+_0x452364[_0x3d7c68(0x246)]),console['error'](_0x3d7c68(0x243)+_0x452364['sessionId']),0x0;}catch(_0x9746ee){if(_0x9746ee instanceof SDKError)return console[_0x3d7c68(0x250)]('Error:\x20'+_0x9746ee['message']),_0x9746ee['cause']&&console[_0x3d7c68(0x250)]('\x20\x20Cause:\x20'+_0x9746ee[_0x3d7c68(0x21c)]),0x1;throw _0x9746ee;}}}export class WorkflowRunCommand extends BaseCommand{[a35_0x3cf62c(0x245)]=a35_0x3cf62c(0x25c);[a35_0x3cf62c(0x287)]=a35_0x3cf62c(0x212);async[a35_0x3cf62c(0x228)](_0x597ef0){const _0x16e7bc=a35_0x3cf62c,{options:_0x2266f8,args:_0x30fc9c,tdx:_0x1d9bc4}=_0x597ef0,_0x5c415b=_0x30fc9c[0x0];if(!_0x5c415b)return console[_0x16e7bc(0x250)](_0x16e7bc(0x1f9)),console[_0x16e7bc(0x250)]('Usage:\x20workflow\x20run\x20<project.workflow>\x20[options]'),0x1;const _0x214223=_0x2266f8['param'],_0x920f6d=_0x2266f8[_0x16e7bc(0x22e)],_0xe78c02={};if(_0x214223&&Array[_0x16e7bc(0x1e7)](_0x214223))for(const _0x16b5ce of _0x214223){const _0x41d6ae=_0x16b5ce[_0x16e7bc(0x24e)]('=');if(_0x41d6ae===-0x1)return console[_0x16e7bc(0x250)](_0x16e7bc(0x267)+_0x16b5ce),console[_0x16e7bc(0x250)](_0x16e7bc(0x223)),0x1;const _0xcf02bc=_0x16b5ce[_0x16e7bc(0x1df)](0x0,_0x41d6ae),_0x277445=_0x16b5ce['substring'](_0x41d6ae+0x1);try{_0xe78c02[_0xcf02bc]=JSON[_0x16e7bc(0x26f)](_0x277445);}catch{_0xe78c02[_0xcf02bc]=_0x277445;}}_0x2266f8[_0x16e7bc(0x268)]&&(console[_0x16e7bc(0x250)](_0x16e7bc(0x252)+_0x5c415b),Object[_0x16e7bc(0x1f3)](_0xe78c02)[_0x16e7bc(0x21d)]>0x0&&console[_0x16e7bc(0x250)](_0x16e7bc(0x269)+JSON[_0x16e7bc(0x22d)](_0xe78c02)),_0x920f6d&&console[_0x16e7bc(0x250)](_0x16e7bc(0x27f)+_0x920f6d));const _0x1f5d8e=await withSpinner(_0x16e7bc(0x259),()=>_0x1d9bc4[_0x16e7bc(0x248)][_0x16e7bc(0x226)](_0x5c415b,_0xe78c02,{'sessionTime':_0x920f6d}),{'verbose':_0x2266f8['verbose']}),_0x4fc653=_0x1f5d8e[_0x16e7bc(0x284)];return console[_0x16e7bc(0x250)](_0x16e7bc(0x278)),console[_0x16e7bc(0x250)](_0x16e7bc(0x231)+_0x4fc653['id']),console[_0x16e7bc(0x250)]('\x20\x20Session\x20ID:\x20'+_0x4fc653[_0x16e7bc(0x207)]),console[_0x16e7bc(0x250)](_0x16e7bc(0x25b)+_0x4fc653[_0x16e7bc(0x25e)]?.[_0x16e7bc(0x245)]),console[_0x16e7bc(0x250)](_0x16e7bc(0x236)+_0x4fc653[_0x16e7bc(0x248)]?.[_0x16e7bc(0x245)]),0x0;}}export class WorkflowDownloadCommand extends BaseCommand{[a35_0x3cf62c(0x245)]=a35_0x3cf62c(0x1f0);[a35_0x3cf62c(0x287)]=a35_0x3cf62c(0x272);async[a35_0x3cf62c(0x228)](_0x92a5d8){const _0x7c2447=a35_0x3cf62c,{options:_0x205ffa,args:_0x44ceb8,tdx:_0x312525}=_0x92a5d8,_0x8a69ca=_0x44ceb8[0x0],_0x3740d4=_0x44ceb8[0x1]||'.';if(!_0x8a69ca)return console[_0x7c2447(0x250)](_0x7c2447(0x220)),console[_0x7c2447(0x250)](_0x7c2447(0x247)),0x1;const _0x1ae417=_0x205ffa[_0x7c2447(0x1db)];_0x205ffa[_0x7c2447(0x268)]&&(console[_0x7c2447(0x250)]('Project:\x20'+_0x8a69ca),console['error'](_0x7c2447(0x1f2)+_0x3740d4),_0x1ae417&&console[_0x7c2447(0x250)]('Revision:\x20'+_0x1ae417));const _0x268d35=await withSpinner('Downloading\x20project\x20'+_0x8a69ca+_0x7c2447(0x1e9),()=>_0x312525[_0x7c2447(0x248)][_0x7c2447(0x262)](_0x8a69ca,_0x3740d4,{'revision':_0x1ae417}),{'verbose':_0x205ffa[_0x7c2447(0x268)]}),_0x233f3b=_0x268d35[_0x7c2447(0x284)];return console['error'](_0x7c2447(0x256)+_0x233f3b['projectName']),console[_0x7c2447(0x250)](_0x7c2447(0x225)+_0x233f3b[_0x7c2447(0x1db)]),console[_0x7c2447(0x250)](_0x7c2447(0x1ee)+_0x233f3b[_0x7c2447(0x288)]),console['error'](_0x7c2447(0x216)+_0x3740d4+'/'+_0x233f3b[_0x7c2447(0x279)]),0x0;}}export class WorkflowPushCommand extends BaseCommand{[a35_0x3cf62c(0x245)]=a35_0x3cf62c(0x1ef);[a35_0x3cf62c(0x287)]=a35_0x3cf62c(0x21b);async[a35_0x3cf62c(0x228)](_0x52e892){const _0x195f9d=a35_0x3cf62c,{options:_0x1e8ff9,args:_0x2bef6c,tdx:_0x2a0c9b}=_0x52e892;let _0x1cbfdf='.',_0x27d6dc=_0x1e8ff9[_0x195f9d(0x245)];if(_0x2bef6c[0x0]){const {promises:_0x43d1a7}=await import('fs');try{const _0x5599ae=await _0x43d1a7[_0x195f9d(0x23e)](_0x2bef6c[0x0]);if(_0x5599ae[_0x195f9d(0x210)]())_0x1cbfdf=_0x2bef6c[0x0];else return console[_0x195f9d(0x250)](_0x195f9d(0x26d)+_0x2bef6c[0x0]+_0x195f9d(0x280)),0x1;}catch{_0x27d6dc=_0x2bef6c[0x0],_0x1cbfdf='.';}}const _0x38399f=_0x1e8ff9['revision'],_0x51e32e=_0x1e8ff9[_0x195f9d(0x20f)];_0x1e8ff9[_0x195f9d(0x268)]&&(console[_0x195f9d(0x250)](_0x195f9d(0x24b)+_0x1cbfdf),_0x27d6dc&&console[_0x195f9d(0x250)](_0x195f9d(0x283)+_0x27d6dc),_0x38399f&&console[_0x195f9d(0x250)](_0x195f9d(0x1fd)+_0x38399f),_0x51e32e&&console['error'](_0x195f9d(0x285)));const _0x5e2dd8=await withSpinner('Pushing\x20workflow\x20project...',()=>_0x2a0c9b[_0x195f9d(0x248)][_0x195f9d(0x238)](_0x1cbfdf,{'projectName':_0x27d6dc,'revision':_0x38399f,'skipValidation':_0x51e32e}),{'verbose':_0x1e8ff9['verbose']}),_0x187a64=_0x5e2dd8[_0x195f9d(0x284)];return console[_0x195f9d(0x250)](_0x195f9d(0x206)+_0x187a64[_0x195f9d(0x279)]),console[_0x195f9d(0x250)](_0x195f9d(0x1e4)+_0x187a64[_0x195f9d(0x22c)]),console['error'](_0x195f9d(0x225)+_0x187a64[_0x195f9d(0x1db)]),0x0;}}export class WorkflowDeleteCommand extends BaseCommand{[a35_0x3cf62c(0x245)]=a35_0x3cf62c(0x251);[a35_0x3cf62c(0x287)]=a35_0x3cf62c(0x277);async[a35_0x3cf62c(0x228)](_0x2b6c31){const _0x57e507=a35_0x3cf62c,{options:_0x51ddb0,args:_0x3ec870,tdx:_0x3e2176}=_0x2b6c31,_0x2ed3fe=_0x3ec870[0x0];if(!_0x2ed3fe)return console[_0x57e507(0x250)](_0x57e507(0x1ed)),console['error']('Usage:\x20workflow:delete\x20<project-name-or-id>'),0x1;_0x51ddb0['verbose']&&console[_0x57e507(0x250)](_0x57e507(0x1e6)+_0x2ed3fe);if(!_0x51ddb0[_0x57e507(0x1da)]){const _0x852ef5=await confirm(_0x57e507(0x218)+_0x2ed3fe+_0x57e507(0x258));if(!_0x852ef5)return console[_0x57e507(0x250)](_0x57e507(0x230)),0x0;}const _0x4858be=await withSpinner(_0x57e507(0x1d7)+_0x2ed3fe+_0x57e507(0x1e9),()=>_0x3e2176[_0x57e507(0x248)][_0x57e507(0x27d)](_0x2ed3fe),{'verbose':_0x51ddb0[_0x57e507(0x268)]}),_0x3bf51c=_0x4858be[_0x57e507(0x284)];return console['error']('✔\x20Deleted\x20project\x20'+_0x3bf51c[_0x57e507(0x279)]),console[_0x57e507(0x250)](_0x57e507(0x1e4)+_0x3bf51c[_0x57e507(0x22c)]),0x0;}}
package/dist/core/auth.js CHANGED
@@ -1 +1 @@
1
- (function(_0x1e40c2,_0x2d237a){const _0x21287f=a34_0x3e5c,_0x2791b5=_0x1e40c2();while(!![]){try{const _0x5618c6=-parseInt(_0x21287f(0x122))/0x1*(parseInt(_0x21287f(0x127))/0x2)+parseInt(_0x21287f(0x132))/0x3*(parseInt(_0x21287f(0x124))/0x4)+-parseInt(_0x21287f(0x12e))/0x5+parseInt(_0x21287f(0x136))/0x6+-parseInt(_0x21287f(0x12a))/0x7+-parseInt(_0x21287f(0x135))/0x8*(-parseInt(_0x21287f(0x123))/0x9)+parseInt(_0x21287f(0x12b))/0xa*(parseInt(_0x21287f(0x125))/0xb);if(_0x5618c6===_0x2d237a)break;else _0x2791b5['push'](_0x2791b5['shift']());}catch(_0x40b3c1){_0x2791b5['push'](_0x2791b5['shift']());}}}(a34_0x1d76,0x293e0));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 _0x5cec5d=a34_0x3e5c;try{const _0x136386=fileURLToPath(import.meta[_0x5cec5d(0x121)]),_0x59ec04=dirname(_0x136386),_0x163936=join(_0x59ec04,_0x5cec5d(0x133)),_0x6524e5=JSON[_0x5cec5d(0x12f)](readFileSync(_0x163936,_0x5cec5d(0x131)));return _0x6524e5[_0x5cec5d(0x134)];}catch{return _0x5cec5d(0x126);}}export function getUserAgent(){const _0x1c4933=a34_0x3e5c,_0xcfceb=getVersion(),_0x4a3b02=platform(),_0x325b25=process['version'][_0x1c4933(0x129)]('v','');return _0x1c4933(0x12c)+_0xcfceb+'\x20('+_0x4a3b02+_0x1c4933(0x12d)+_0x325b25+')';}function a34_0x1d76(){const _0x125aef=[';\x20node/','493715QAyeCY','parse','TD1\x20','utf-8','3dCcMcB','../../package.json','version','64sBrTGB','281142YQUpyE','Authorization','length','tdx','url','1903ZbfTmt','267363FBrTrL','522884bhesXe','5060FtMuta','0.0.0','94SjzlkZ','X-Trino-User','replace','1640114GRshCm','3830DpIWke','tdx/'];a34_0x1d76=function(){return _0x125aef;};return a34_0x1d76();}function a34_0x3e5c(_0x17e1e9,_0x20af49){const _0x1d768e=a34_0x1d76();return a34_0x3e5c=function(_0x3e5c4b,_0x2566c5){_0x3e5c4b=_0x3e5c4b-0x120;let _0x559e8d=_0x1d768e[_0x3e5c4b];return _0x559e8d;},a34_0x3e5c(_0x17e1e9,_0x20af49);}export function getAuthHeaders(_0x15594e,_0x278138){const _0x3484f4=a34_0x3e5c,_0x3958b8=getVersion(),_0x2223b6={'User-Agent':getUserAgent(),'X-TD-Client':_0x3484f4(0x120),'X-TD-Client-Version':_0x3958b8};return _0x278138&&(_0x2223b6[_0x3484f4(0x137)]=_0x3484f4(0x130)+_0x278138),_0x2223b6;}export function toHeaderRecord(_0x4b5e31){const _0x387902={};for(const [_0x327e47,_0x2c0d6d]of Object['entries'](_0x4b5e31)){_0x2c0d6d!==undefined&&(_0x387902[_0x327e47]=_0x2c0d6d);}return _0x387902;}export function getTrinoHeaders(_0x27aca4,_0x55d71f){const _0x3aa351=a34_0x3e5c,_0x225af0=getAuthHeaders(_0x27aca4,_0x55d71f),_0x2cc4db=toHeaderRecord(_0x225af0);return delete _0x2cc4db[_0x3aa351(0x137)],_0x55d71f&&(_0x2cc4db[_0x3aa351(0x128)]=_0x55d71f),_0x2cc4db;}export function hasAPIKey(_0x4ceb10){const _0x43612d=a34_0x3e5c,_0x37ddce=getAPIKey(_0x4ceb10);return _0x37ddce!==undefined&&_0x37ddce[_0x43612d(0x138)]>0x0;}
1
+ (function(_0x29858d,_0x55a7ee){const _0x1a39c0=a36_0x1ac7,_0x453310=_0x29858d();while(!![]){try{const _0x3d6d43=parseInt(_0x1a39c0(0xda))/0x1+parseInt(_0x1a39c0(0xd8))/0x2+parseInt(_0x1a39c0(0xd4))/0x3*(-parseInt(_0x1a39c0(0xdc))/0x4)+-parseInt(_0x1a39c0(0xde))/0x5*(parseInt(_0x1a39c0(0xe1))/0x6)+-parseInt(_0x1a39c0(0xe2))/0x7*(parseInt(_0x1a39c0(0xe0))/0x8)+parseInt(_0x1a39c0(0xd1))/0x9*(parseInt(_0x1a39c0(0xdb))/0xa)+parseInt(_0x1a39c0(0xd2))/0xb;if(_0x3d6d43===_0x55a7ee)break;else _0x453310['push'](_0x453310['shift']());}catch(_0x2a2d8f){_0x453310['push'](_0x453310['shift']());}}}(a36_0x1999,0xa7d2c));import{platform}from'os';function a36_0x1999(){const _0x191f12=['tdx/','91336OHmoig','1589442PUqrNn','406lNeIao',';\x20node/','version','16686AxOqVw','13227665RCsuqL','0.0.0','3iezECn','parse','url','Authorization','987422noVSMo','tdx','206053nXrdlh','4280ZCMhzG','1146292chJkQq','X-Trino-User','20CvKmXT'];a36_0x1999=function(){return _0x191f12;};return a36_0x1999();}import{readFileSync}from'fs';import{fileURLToPath}from'url';import{dirname,join}from'path';function a36_0x1ac7(_0x4cc9c1,_0x5a355b){const _0x1999d1=a36_0x1999();return a36_0x1ac7=function(_0x1ac73e,_0x3f5670){_0x1ac73e=_0x1ac73e-0xd0;let _0x40a86=_0x1999d1[_0x1ac73e];return _0x40a86;},a36_0x1ac7(_0x4cc9c1,_0x5a355b);}import{getAPIKey}from'./config.js';export function getVersion(){const _0x121185=a36_0x1ac7;try{const _0x160f5f=fileURLToPath(import.meta[_0x121185(0xd6)]),_0x231361=dirname(_0x160f5f),_0x5d461c=join(_0x231361,'../../package.json'),_0x5219b2=JSON[_0x121185(0xd5)](readFileSync(_0x5d461c,'utf-8'));return _0x5219b2[_0x121185(0xd0)];}catch{return _0x121185(0xd3);}}export function getUserAgent(){const _0x39f848=a36_0x1ac7,_0x1ae0bc=getVersion(),_0x55224b=platform(),_0x57225b=process['version']['replace']('v','');return _0x39f848(0xdf)+_0x1ae0bc+'\x20('+_0x55224b+_0x39f848(0xe3)+_0x57225b+')';}export function getAuthHeaders(_0x2f1448,_0x491fd1){const _0x176f0d=a36_0x1ac7,_0x3cbc98=getVersion(),_0x57ab28={'User-Agent':getUserAgent(),'X-TD-Client':_0x176f0d(0xd9),'X-TD-Client-Version':_0x3cbc98};return _0x491fd1&&(_0x57ab28[_0x176f0d(0xd7)]='TD1\x20'+_0x491fd1),_0x57ab28;}export function toHeaderRecord(_0x29482b){const _0x3f6707={};for(const [_0x5c8a30,_0x395ec1]of Object['entries'](_0x29482b)){_0x395ec1!==undefined&&(_0x3f6707[_0x5c8a30]=_0x395ec1);}return _0x3f6707;}export function getTrinoHeaders(_0x3bd200,_0x3c4fd2){const _0x1faec8=a36_0x1ac7,_0x2ab049=getAuthHeaders(_0x3bd200,_0x3c4fd2),_0x53cb5c=toHeaderRecord(_0x2ab049);return delete _0x53cb5c[_0x1faec8(0xd7)],_0x3c4fd2&&(_0x53cb5c[_0x1faec8(0xdd)]=_0x3c4fd2),_0x53cb5c;}export function hasAPIKey(_0x5d1712){const _0x512b1f=getAPIKey(_0x5d1712);return _0x512b1f!==undefined&&_0x512b1f['length']>0x0;}