@treasuredata/tdx 0.9.6 → 0.9.8

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 (123) hide show
  1. package/dist/bin.js +1 -1
  2. package/dist/build-info.json +2 -2
  3. package/dist/cli-categories.js +1 -1
  4. package/dist/cli.js +1 -1
  5. package/dist/client/cdp-api-client.js +1 -1
  6. package/dist/client/engage-api-client.js +1 -1
  7. package/dist/client/http-client.js +1 -1
  8. package/dist/client/llm-api-client.js +1 -1
  9. package/dist/client/rate-limiter.js +1 -1
  10. package/dist/client/td-api-client.js +1 -1
  11. package/dist/client/trino-api-client.js +1 -1
  12. package/dist/client/workflow-client.js +1 -1
  13. package/dist/commands/activations.js +1 -1
  14. package/dist/commands/agent-command.js +1 -1
  15. package/dist/commands/api-command.js +1 -1
  16. package/dist/commands/auth-command.js +1 -1
  17. package/dist/commands/chat-command.js +1 -1
  18. package/dist/commands/claude-command.js +1 -1
  19. package/dist/commands/claude-statusline-command.js +1 -1
  20. package/dist/commands/claude-usage-command.js +1 -1
  21. package/dist/commands/command.js +1 -1
  22. package/dist/commands/connection-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.js +1 -1
  27. package/dist/commands/job-command.js +1 -1
  28. package/dist/commands/journey-command.js +1 -1
  29. package/dist/commands/llm-command.js +1 -1
  30. package/dist/commands/llm-proxy.js +1 -1
  31. package/dist/commands/parent-segment-command.js +1 -1
  32. package/dist/commands/profiles-command.js +1 -1
  33. package/dist/commands/query-command.js +1 -1
  34. package/dist/commands/segment-command.js +1 -1
  35. package/dist/commands/segment-create-command.js +1 -1
  36. package/dist/commands/segment-fields-command.js +1 -1
  37. package/dist/commands/segment-pull-command.js +1 -1
  38. package/dist/commands/segment-push-command.js +1 -1
  39. package/dist/commands/segment-update-command.js +1 -1
  40. package/dist/commands/segment-use-command.js +1 -1
  41. package/dist/commands/segments.js +1 -1
  42. package/dist/commands/show.js +1 -1
  43. package/dist/commands/tables.js +1 -1
  44. package/dist/commands/use-command.js +1 -1
  45. package/dist/commands/user-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/connection-cache.js +1 -1
  50. package/dist/core/credential-cache.js +1 -1
  51. package/dist/core/global-context.js +1 -1
  52. package/dist/core/keychain.js +1 -1
  53. package/dist/core/profile.js +1 -1
  54. package/dist/core/project-config.js +1 -1
  55. package/dist/core/session.js +1 -1
  56. package/dist/core/user-cache.js +1 -1
  57. package/dist/index.js +1 -1
  58. package/dist/proxy/anthropic-adapter.js +1 -1
  59. package/dist/proxy/claude-usage-tracker.js +1 -1
  60. package/dist/proxy/context-signature.js +1 -1
  61. package/dist/proxy/conversation-utils.js +1 -1
  62. package/dist/proxy/server.js +1 -1
  63. package/dist/proxy/session-cache.js +1 -1
  64. package/dist/sdk/agent/agent-yaml.js +1 -1
  65. package/dist/sdk/api.js +1 -1
  66. package/dist/sdk/connection-validator.js +1 -1
  67. package/dist/sdk/connection.js +1 -1
  68. package/dist/sdk/engage.js +1 -1
  69. package/dist/sdk/errors.js +1 -1
  70. package/dist/sdk/index.js +1 -1
  71. package/dist/sdk/job.js +1 -1
  72. package/dist/sdk/journey.js +1 -1
  73. package/dist/sdk/llm.js +1 -1
  74. package/dist/sdk/query.js +1 -1
  75. package/dist/sdk/segment/child-segment-yaml.js +1 -1
  76. package/dist/sdk/segment/journey-yaml.d.ts +53 -18
  77. package/dist/sdk/segment/journey-yaml.d.ts.map +1 -1
  78. package/dist/sdk/segment/journey-yaml.js +1 -1
  79. package/dist/sdk/segment/journey-yaml.js.map +1 -1
  80. package/dist/sdk/segment/parent-segment-preview.js +1 -1
  81. package/dist/sdk/segment/parent-segment-yaml.js +1 -1
  82. package/dist/sdk/segment.js +1 -1
  83. package/dist/sdk/user.js +1 -1
  84. package/dist/sdk/workflow.js +1 -1
  85. package/dist/types/endpoints.js +1 -1
  86. package/dist/types/index.js +1 -1
  87. package/dist/utils/agent-config.js +1 -1
  88. package/dist/utils/agent-ref-parser.js +1 -1
  89. package/dist/utils/async.js +1 -1
  90. package/dist/utils/chat-cache.js +1 -1
  91. package/dist/utils/colors.js +1 -1
  92. package/dist/utils/command-output.js +1 -1
  93. package/dist/utils/constants.js +1 -1
  94. package/dist/utils/diff.js +1 -1
  95. package/dist/utils/fields-display.js +1 -1
  96. package/dist/utils/file-permissions.js +1 -1
  97. package/dist/utils/format-detector.js +1 -1
  98. package/dist/utils/formatters.js +1 -1
  99. package/dist/utils/journey-utils.d.ts +30 -0
  100. package/dist/utils/journey-utils.d.ts.map +1 -1
  101. package/dist/utils/journey-utils.js +1 -1
  102. package/dist/utils/journey-utils.js.map +1 -1
  103. package/dist/utils/json-loader.js +1 -1
  104. package/dist/utils/llm-backup-utils.js +1 -1
  105. package/dist/utils/model-aliases.js +1 -1
  106. package/dist/utils/model-factors.js +1 -1
  107. package/dist/utils/option-validation.js +1 -1
  108. package/dist/utils/port.js +1 -1
  109. package/dist/utils/process.js +1 -1
  110. package/dist/utils/prompt.js +1 -1
  111. package/dist/utils/segment-path-parser.js +1 -1
  112. package/dist/utils/segment-ref-parser.js +1 -1
  113. package/dist/utils/spinner.js +1 -1
  114. package/dist/utils/sql-parser.js +1 -1
  115. package/dist/utils/sse-parser.js +1 -1
  116. package/dist/utils/string-utils.js +1 -1
  117. package/dist/utils/table-ref-parser.js +1 -1
  118. package/dist/utils/tdx-config.js +1 -1
  119. package/dist/utils/tdx-logger.js +1 -1
  120. package/dist/utils/tree-formatter.js +1 -1
  121. package/dist/utils/version-check.js +1 -1
  122. package/dist/utils/workflow-utils.js +1 -1
  123. package/package.json +1 -1
@@ -1 +1 @@
1
- const a17_0x906b5e=a17_0x31c2;(function(_0x5e8b56,_0x4f698b){const _0x597b2a=a17_0x31c2,_0x71b4f8=_0x5e8b56();while(!![]){try{const _0xf5473e=parseInt(_0x597b2a(0xc1))/0x1*(-parseInt(_0x597b2a(0xda))/0x2)+-parseInt(_0x597b2a(0xbd))/0x3+parseInt(_0x597b2a(0xce))/0x4*(-parseInt(_0x597b2a(0xcc))/0x5)+-parseInt(_0x597b2a(0xd4))/0x6*(parseInt(_0x597b2a(0xd8))/0x7)+parseInt(_0x597b2a(0xc4))/0x8*(-parseInt(_0x597b2a(0xc6))/0x9)+parseInt(_0x597b2a(0xd0))/0xa+parseInt(_0x597b2a(0xe0))/0xb;if(_0xf5473e===_0x4f698b)break;else _0x71b4f8['push'](_0x71b4f8['shift']());}catch(_0x35df8e){_0x71b4f8['push'](_0x71b4f8['shift']());}}}(a17_0x5da8,0xecc23));import{createInterface}from'node:readline';import{BaseCommand}from'./command.js';import{getUsageStats}from'../proxy/claude-usage-tracker.js';function a17_0x31c2(_0x141a9b,_0x1a63c0){_0x141a9b=_0x141a9b-0xbb;const _0x5da8bc=a17_0x5da8();let _0x31c2b3=_0x5da8bc[_0x141a9b];return _0x31c2b3;}import{readCachedAccountInfo}from'../core/config.js';function a17_0x5da8(){const _0x3400dc=['latestInputTokens','\x20today\x20/\x20','name','79938SkAyli','accountId','site','model','742pYryqt','todayCredits','2mLFXWq','close','push','\x20-\x20','session_id','\x20session\x20/\x20','55055319YQqZBi','stdin','tdx','2254869oXgVDG','options','parse','monthCredits','1935702RYmLWI','Claude','profile','112FwPJRz','🪙\x20credit:\x20','7299hrtStS','\x20month','tdx\x20','line','execute','log','1595375oQHUWN','toFixed','20hpcBaP','💎\x20tdx\x20-\x20Claude','16710260RITobP'];a17_0x5da8=function(){return _0x3400dc;};return a17_0x5da8();}import{getModelDisplayName,formatTokenCount,calculateContextPercentage}from'../utils/model-factors.js';async function readStdinJson(_0x2a94ff=0x64){return new Promise(_0x187be2=>{const _0x44f026=a17_0x31c2;let _0x442506='',_0x55d871=![];const _0x13425b=createInterface({'input':process[_0x44f026(0xbb)],'terminal':![]}),_0x40c12d=_0x4ab31d=>{const _0x35db08=_0x44f026;if(_0x55d871)return;_0x55d871=!![],clearTimeout(_0x5a51cd),_0x13425b[_0x35db08(0xdb)](),_0x187be2(_0x4ab31d);},_0x5a51cd=setTimeout(()=>{_0x40c12d(null);},_0x2a94ff);_0x13425b['on'](_0x44f026(0xc9),_0x4dcd47=>{_0x442506+=_0x4dcd47;}),_0x13425b['on'](_0x44f026(0xdb),()=>{const _0x4fdcf7=_0x44f026;if(_0x55d871)return;try{const _0x1515d2=JSON[_0x4fdcf7(0xbf)](_0x442506);_0x40c12d(_0x1515d2);}catch{_0x40c12d(null);}});});}function formatCredits(_0x531e0e){const _0x32e825=a17_0x31c2;return _0x531e0e[_0x32e825(0xcd)](0x2);}export class ClaudeStatuslineCommand extends BaseCommand{[a17_0x906b5e(0xd3)]='statusline';['description']='Output\x20statusline\x20for\x20Claude\x20Code\x20(reads\x20JSON\x20from\x20stdin)';async[a17_0x906b5e(0xca)](_0x2eeadd){const _0x540ba0=a17_0x906b5e;try{const _0x4f438a=await readStdinJson();if(!_0x4f438a?.[_0x540ba0(0xde)])return console[_0x540ba0(0xcb)](_0x540ba0(0xcf)),0x0;const _0x5121da=_0x4f438a[_0x540ba0(0xde)],_0x590caf=_0x4f438a[_0x540ba0(0xd7)]?.['id']||'',_0x4b2d44=_0x4f438a[_0x540ba0(0xc3)]||_0x2eeadd[_0x540ba0(0xbe)][_0x540ba0(0xc3)],_0x5ef0f1=await getUsageStats(_0x5121da,_0x4b2d44),_0x93f787=[],_0x4845d5=readCachedAccountInfo(_0x4b2d44),_0x30dca9=_0x4845d5?_0x540ba0(0xc8)+_0x4845d5[_0x540ba0(0xd6)]+':'+_0x4845d5[_0x540ba0(0xd5)]:_0x540ba0(0xbc),_0x5a0abd=_0x590caf?getModelDisplayName(_0x590caf):_0x540ba0(0xc2);_0x93f787[_0x540ba0(0xdc)]('💎\x20'+_0x30dca9+_0x540ba0(0xdd)+_0x5a0abd);const _0x1b674c=formatCredits(_0x5ef0f1['sessionCredits']),_0x51aa08=formatCredits(_0x5ef0f1[_0x540ba0(0xd9)]),_0x236e2d=formatCredits(_0x5ef0f1[_0x540ba0(0xc0)]);_0x93f787[_0x540ba0(0xdc)](_0x540ba0(0xc5)+_0x1b674c+_0x540ba0(0xdf)+_0x51aa08+_0x540ba0(0xd2)+_0x236e2d+_0x540ba0(0xc7));if(_0x5ef0f1[_0x540ba0(0xd1)]>0x0&&_0x590caf){const _0x495537=formatTokenCount(_0x5ef0f1['latestInputTokens']),_0x510865=calculateContextPercentage(_0x5ef0f1['latestInputTokens'],_0x590caf);_0x93f787[_0x540ba0(0xdc)]('🧠\x20'+_0x495537+'\x20('+_0x510865+'%)');}return console[_0x540ba0(0xcb)](_0x93f787['join']('\x20|\x20')),0x0;}catch{return console[_0x540ba0(0xcb)](_0x540ba0(0xcf)),0x0;}}}
1
+ const a17_0x296d2a=a17_0x2c8b;function a17_0x4e9a(){const _0x5b31b9=['Output\x20statusline\x20for\x20Claude\x20Code\x20(reads\x20JSON\x20from\x20stdin)','184941eJkhUp','🪙\x20credit:\x20','statusline','404WvcWNH','latestInputTokens','346344YYtvLV','\x20session\x20/\x20','\x20today\x20/\x20','profile','💎\x20','close','12KWQDOM','3669fBoJOZ','join','site','line','20bkQOot','sessionCredits','log','\x20-\x20','20oQWJhQ','49PgbqQN','583518izQOXA','todayCredits','🧠\x20','7372761SjCrsu','name','stdin','tdx\x20','417938zKmiyw','toFixed','push','💎\x20tdx\x20-\x20Claude','458173LbnWMO','options','tdx'];a17_0x4e9a=function(){return _0x5b31b9;};return a17_0x4e9a();}function a17_0x2c8b(_0x1028b7,_0x17e5c7){_0x1028b7=_0x1028b7-0x1e3;const _0x4e9a8c=a17_0x4e9a();let _0x2c8ba1=_0x4e9a8c[_0x1028b7];return _0x2c8ba1;}(function(_0x21510b,_0x1330d1){const _0x5b24f9=a17_0x2c8b,_0xf1167e=_0x21510b();while(!![]){try{const _0x1a3425=-parseInt(_0x5b24f9(0x1ed))/0x1+-parseInt(_0x5b24f9(0x1e9))/0x2+-parseInt(_0x5b24f9(0x1fd))/0x3*(-parseInt(_0x5b24f9(0x1f4))/0x4)+parseInt(_0x5b24f9(0x205))/0x5*(parseInt(_0x5b24f9(0x207))/0x6)+-parseInt(_0x5b24f9(0x206))/0x7*(parseInt(_0x5b24f9(0x1f6))/0x8)+parseInt(_0x5b24f9(0x1f1))/0x9*(parseInt(_0x5b24f9(0x201))/0xa)+-parseInt(_0x5b24f9(0x1e5))/0xb*(-parseInt(_0x5b24f9(0x1fc))/0xc);if(_0x1a3425===_0x1330d1)break;else _0xf1167e['push'](_0xf1167e['shift']());}catch(_0x5e9676){_0xf1167e['push'](_0xf1167e['shift']());}}}(a17_0x4e9a,0x3defb));import{createInterface}from'node:readline';import{BaseCommand}from'./command.js';import{getUsageStats}from'../proxy/claude-usage-tracker.js';import{readCachedAccountInfo}from'../core/config.js';import{getModelDisplayName,formatTokenCount,calculateContextPercentage}from'../utils/model-factors.js';async function readStdinJson(_0x160a48=0x64){return new Promise(_0xc230fe=>{const _0xd74f56=a17_0x2c8b;let _0x4abac0='',_0x404f4b=![];const _0x5e8e48=createInterface({'input':process[_0xd74f56(0x1e7)],'terminal':![]}),_0x42ceac=_0x561960=>{const _0x4f6176=_0xd74f56;if(_0x404f4b)return;_0x404f4b=!![],clearTimeout(_0x18508c),_0x5e8e48[_0x4f6176(0x1fb)](),_0xc230fe(_0x561960);},_0x18508c=setTimeout(()=>{_0x42ceac(null);},_0x160a48);_0x5e8e48['on'](_0xd74f56(0x200),_0x37e2d9=>{_0x4abac0+=_0x37e2d9;}),_0x5e8e48['on']('close',()=>{if(_0x404f4b)return;try{const _0x49a414=JSON['parse'](_0x4abac0);_0x42ceac(_0x49a414);}catch{_0x42ceac(null);}});});}function formatCredits(_0x1b713a){const _0xdc039a=a17_0x2c8b;return _0x1b713a[_0xdc039a(0x1ea)](0x2);}export class ClaudeStatuslineCommand extends BaseCommand{[a17_0x296d2a(0x1e6)]=a17_0x296d2a(0x1f3);['description']=a17_0x296d2a(0x1f0);async['execute'](_0x202f2a){const _0x491478=a17_0x296d2a;try{const _0x48a992=await readStdinJson();if(!_0x48a992?.['session_id'])return console[_0x491478(0x203)](_0x491478(0x1ec)),0x0;const _0x1490c3=_0x48a992['session_id'],_0xe40d9f=_0x48a992['model']?.['id']||'',_0x587297=_0x48a992[_0x491478(0x1f9)]||_0x202f2a[_0x491478(0x1ee)]['profile'],_0x3c31d8=await getUsageStats(_0x1490c3,_0x587297),_0x12983b=[],_0x37bb35=readCachedAccountInfo(_0x587297),_0x4ac9f3=_0x37bb35?_0x491478(0x1e8)+_0x37bb35[_0x491478(0x1ff)]+':'+_0x37bb35['accountId']:_0x491478(0x1ef),_0x3989b6=_0xe40d9f?getModelDisplayName(_0xe40d9f):'Claude';_0x12983b[_0x491478(0x1eb)](_0x491478(0x1fa)+_0x4ac9f3+_0x491478(0x204)+_0x3989b6);const _0xd9b01d=formatCredits(_0x3c31d8[_0x491478(0x202)]),_0x3934f6=formatCredits(_0x3c31d8[_0x491478(0x1e3)]),_0x1b1d78=formatCredits(_0x3c31d8['monthCredits']);_0x12983b[_0x491478(0x1eb)](_0x491478(0x1f2)+_0xd9b01d+_0x491478(0x1f7)+_0x3934f6+_0x491478(0x1f8)+_0x1b1d78+'\x20month');if(_0x3c31d8[_0x491478(0x1f5)]>0x0&&_0xe40d9f){const _0x1b4d18=formatTokenCount(_0x3c31d8[_0x491478(0x1f5)]),_0x260571=calculateContextPercentage(_0x3c31d8[_0x491478(0x1f5)],_0xe40d9f);_0x12983b[_0x491478(0x1eb)](_0x491478(0x1e4)+_0x1b4d18+'\x20('+_0x260571+'%)');}return console[_0x491478(0x203)](_0x12983b[_0x491478(0x1fe)]('\x20|\x20')),0x0;}catch{return console[_0x491478(0x203)](_0x491478(0x1ec)),0x0;}}}
@@ -1 +1 @@
1
- function a18_0x4d66(){const _0x1148b3=['2156040oELIKl','\x20\x20No\x20usage\x20data\x20recorded\x20yet.','5904NpXsLH','3YdQBlx','default','\x20\x20Run\x20\x22tdx\x20claude\x22\x20to\x20start\x20using\x20AI\x20Suite.\x0a','dim','toLocaleDateString','numeric','6vrVFTZ','bold','6340fCnjOZ','Credits','3493392SOSxjQ','\x20\x20Total:\x20\x20\x20','today\x20','lastUsedAt','json','jsonl','description','8ZPBLUG','Usage\x20by\x20Profile','Last\x20Used','length','repeat','en-CA','credits','771572TwhhVv','message','\x0aAI\x20Suite\x20Credit\x20Usage\x20Summary','usage','Profile','Error:\x20','yesterday','todayCredits','all','Requests','red','getTime','log','outputStructured','cyan','max','round','2240742jtZXzi','map','totalCredits','en-US','execute','padEnd','\x20credits','Note:\x20Credit\x20values\x20are\x20estimates\x20based\x20on\x20token\x20usage.','padStart','entryCount','\x20\x20Today:\x20\x20\x20','7178842ZuzYAk','(default)','short','2-digit','format','name','58679xfpfsp','outputTable','profile'];a18_0x4d66=function(){return _0x1148b3;};return a18_0x4d66();}const a18_0x48f009=a18_0x1dd6;(function(_0x22d811,_0x3c3b92){const _0x38283c=a18_0x1dd6,_0x11bb42=_0x22d811();while(!![]){try{const _0x5240f2=-parseInt(_0x38283c(0x178))/0x1*(-parseInt(_0x38283c(0x184))/0x2)+-parseInt(_0x38283c(0x17e))/0x3*(-parseInt(_0x38283c(0x196))/0x4)+-parseInt(_0x38283c(0x17b))/0x5+-parseInt(_0x38283c(0x167))/0x6+parseInt(_0x38283c(0x188))/0x7*(parseInt(_0x38283c(0x18f))/0x8)+parseInt(_0x38283c(0x17d))/0x9*(-parseInt(_0x38283c(0x186))/0xa)+parseInt(_0x38283c(0x172))/0xb;if(_0x5240f2===_0x3c3b92)break;else _0x11bb42['push'](_0x11bb42['shift']());}catch(_0x384d67){_0x11bb42['push'](_0x11bb42['shift']());}}}(a18_0x4d66,0x49407));import a18_0x46995e from'chalk';import{BaseCommand}from'./command.js';import{handleSDKOutput}from'../utils/command-output.js';function a18_0x1dd6(_0x2390e0,_0x4b34dc){_0x2390e0=_0x2390e0-0x161;const _0x4d66cf=a18_0x4d66();let _0x1dd60b=_0x4d66cf[_0x2390e0];return _0x1dd60b;}import{getAllProfileStats,getUsageSummary}from'../proxy/claude-usage-tracker.js';function formatCredits(_0x2cc29f){return _0x2cc29f['toFixed'](0x2);}function formatLastUsed(_0x337085){const _0x20f76c=a18_0x1dd6;if(!_0x337085)return'never';const _0x2d6db8=new Date(_0x337085),_0x5330ef=new Date(),_0x1f9c16=_0x2d6db8[_0x20f76c(0x182)](_0x20f76c(0x194)),_0x2c3b17=_0x5330ef[_0x20f76c(0x182)]('en-CA');if(_0x1f9c16===_0x2c3b17)return _0x20f76c(0x18a)+_0x2d6db8['toLocaleTimeString']('en-US',{'hour':_0x20f76c(0x175),'minute':'2-digit'});const _0x41912a=new Date(_0x1f9c16),_0x15ed86=new Date(_0x2c3b17),_0x206094=Math[_0x20f76c(0x166)]((_0x15ed86[_0x20f76c(0x161)]()-_0x41912a[_0x20f76c(0x161)]())/(0x18*0x3c*0x3c*0x3e8));if(_0x206094===0x1)return _0x20f76c(0x19c);else return _0x206094>0x1&&_0x206094<0x7?_0x206094+'\x20days\x20ago':_0x2d6db8[_0x20f76c(0x182)](_0x20f76c(0x16a),{'month':_0x20f76c(0x174),'day':_0x20f76c(0x183)});}export class ClaudeUsageCommand extends BaseCommand{[a18_0x48f009(0x177)]=a18_0x48f009(0x199);[a18_0x48f009(0x18e)]='Show\x20AI\x20Suite\x20credit\x20usage\x20by\x20profile';async[a18_0x48f009(0x16b)](_0x46ec33){const _0x24e397=a18_0x48f009,{options:_0x19b62d}=_0x46ec33,_0x4f7dfd=_0x19b62d[_0x24e397(0x176)]==='json'||_0x19b62d[_0x24e397(0x176)]===_0x24e397(0x18d)||_0x19b62d[_0x24e397(0x18c)];try{const [_0xbbba8a,_0x176aae]=await Promise[_0x24e397(0x19e)]([getAllProfileStats(),getUsageSummary()]);return _0x4f7dfd?await this[_0x24e397(0x163)](_0xbbba8a,_0x176aae,_0x19b62d):this[_0x24e397(0x179)](_0xbbba8a,_0x176aae),0x0;}catch(_0x7eb9ef){const _0x2395fa=_0x7eb9ef instanceof Error?_0x7eb9ef[_0x24e397(0x197)]:'Unknown\x20error';return console['error'](a18_0x46995e[_0x24e397(0x1a0)](_0x24e397(0x19b)+_0x2395fa)),0x1;}}async[a18_0x48f009(0x163)](_0x5f3283,_0x3d5aae,_0x4e7b49){const _0x11c01f=a18_0x48f009,_0x8df920={'summary':{'todayCredits':_0x3d5aae[_0x11c01f(0x19d)],'monthCredits':_0x3d5aae['monthCredits'],'totalCredits':_0x3d5aae[_0x11c01f(0x169)],'profileCount':_0x3d5aae['profileCount']},'profiles':_0x5f3283[_0x11c01f(0x168)](_0x353ca9=>({'profile':_0x353ca9[_0x11c01f(0x17a)],'credits':_0x353ca9[_0x11c01f(0x195)],'requests':_0x353ca9[_0x11c01f(0x170)],'lastUsedAt':_0x353ca9[_0x11c01f(0x18b)]}))};await handleSDKOutput([_0x8df920],_0x4e7b49);}[a18_0x48f009(0x179)](_0x262b14,_0x2b971f){const _0x3e02f5=a18_0x48f009;console[_0x3e02f5(0x162)](a18_0x46995e[_0x3e02f5(0x185)](_0x3e02f5(0x198))),console[_0x3e02f5(0x162)](a18_0x46995e[_0x3e02f5(0x181)]('─'[_0x3e02f5(0x193)](0x32))),console[_0x3e02f5(0x162)](_0x3e02f5(0x171)+a18_0x46995e[_0x3e02f5(0x164)](formatCredits(_0x2b971f[_0x3e02f5(0x19d)]))+_0x3e02f5(0x16d)),console[_0x3e02f5(0x162)]('\x20\x20Month:\x20\x20\x20'+a18_0x46995e[_0x3e02f5(0x164)](formatCredits(_0x2b971f['monthCredits']))+_0x3e02f5(0x16d)),console[_0x3e02f5(0x162)](_0x3e02f5(0x189)+a18_0x46995e[_0x3e02f5(0x164)](formatCredits(_0x2b971f[_0x3e02f5(0x169)]))+'\x20credits'),console[_0x3e02f5(0x162)]();if(_0x262b14[_0x3e02f5(0x192)]===0x0){console[_0x3e02f5(0x162)](a18_0x46995e[_0x3e02f5(0x181)](_0x3e02f5(0x17c))),console[_0x3e02f5(0x162)](a18_0x46995e['dim'](_0x3e02f5(0x180)));return;}console[_0x3e02f5(0x162)](a18_0x46995e[_0x3e02f5(0x185)](_0x3e02f5(0x190))),console[_0x3e02f5(0x162)](a18_0x46995e['dim']('─'['repeat'](0x3c)));const _0x460741=Math[_0x3e02f5(0x165)](0xc,..._0x262b14[_0x3e02f5(0x168)](_0x2c51e=>_0x2c51e[_0x3e02f5(0x17a)]===_0x3e02f5(0x17f)?_0x3e02f5(0x173)[_0x3e02f5(0x192)]:_0x2c51e[_0x3e02f5(0x17a)][_0x3e02f5(0x192)])),_0x4e3cd9=0xa,_0x5f0a8a=0xa;console[_0x3e02f5(0x162)]('\x20\x20'+_0x3e02f5(0x19a)[_0x3e02f5(0x16c)](_0x460741)+'\x20\x20'+_0x3e02f5(0x187)[_0x3e02f5(0x16f)](_0x4e3cd9)+'\x20\x20'+_0x3e02f5(0x19f)['padStart'](_0x5f0a8a)+'\x20\x20'+_0x3e02f5(0x191));for(const _0x2482f0 of _0x262b14){const _0x4b735a=_0x2482f0[_0x3e02f5(0x17a)]===_0x3e02f5(0x17f)?_0x3e02f5(0x173):_0x2482f0[_0x3e02f5(0x17a)],_0x30d984=_0x4b735a[_0x3e02f5(0x16c)](_0x460741),_0x395cdd=_0x2482f0[_0x3e02f5(0x17a)]===_0x3e02f5(0x17f)?a18_0x46995e['dim'](_0x30d984):_0x30d984;console[_0x3e02f5(0x162)]('\x20\x20'+_0x395cdd+'\x20\x20'+a18_0x46995e[_0x3e02f5(0x164)](formatCredits(_0x2482f0[_0x3e02f5(0x195)])[_0x3e02f5(0x16f)](_0x4e3cd9))+'\x20\x20'+String(_0x2482f0['entryCount'])[_0x3e02f5(0x16f)](_0x5f0a8a)+'\x20\x20'+a18_0x46995e['dim'](formatLastUsed(_0x2482f0[_0x3e02f5(0x18b)])));}console['log'](),console[_0x3e02f5(0x162)](a18_0x46995e[_0x3e02f5(0x181)](_0x3e02f5(0x16e))),console[_0x3e02f5(0x162)]();}}
1
+ const a18_0x419f76=a18_0x3f60;(function(_0x39dd21,_0x38d639){const _0x1033b5=a18_0x3f60,_0x47e171=_0x39dd21();while(!![]){try{const _0x4c7bd9=parseInt(_0x1033b5(0x202))/0x1+-parseInt(_0x1033b5(0x22a))/0x2+-parseInt(_0x1033b5(0x218))/0x3*(-parseInt(_0x1033b5(0x21d))/0x4)+parseInt(_0x1033b5(0x21a))/0x5+parseInt(_0x1033b5(0x228))/0x6+parseInt(_0x1033b5(0x206))/0x7+-parseInt(_0x1033b5(0x1fa))/0x8;if(_0x4c7bd9===_0x38d639)break;else _0x47e171['push'](_0x47e171['shift']());}catch(_0x1f9a54){_0x47e171['push'](_0x47e171['shift']());}}}(a18_0x2822,0x24a3a));import a18_0x1f6e28 from'chalk';import{BaseCommand}from'./command.js';import{handleSDKOutput}from'../utils/command-output.js';import{getAllProfileStats,getUsageSummary}from'../proxy/claude-usage-tracker.js';function formatCredits(_0x181719){const _0x313a81=a18_0x3f60;return _0x181719[_0x313a81(0x22f)](0x2);}function a18_0x3f60(_0x9c153f,_0x50b957){_0x9c153f=_0x9c153f-0x1f4;const _0x28228a=a18_0x2822();let _0x3f605f=_0x28228a[_0x9c153f];return _0x3f605f;}function a18_0x2822(){const _0x4e792b=['2-digit','usage','Error:\x20','all','today\x20','monthCredits','padEnd','2962000pVFfDD','profile','en-CA','todayCredits','error','name','yesterday','toLocaleDateString','7875RtxkYu','Usage\x20by\x20Profile','Last\x20Used','Credits','1955065RcbBqs','outputStructured','dim','bold','jsonl','(default)','credits','getTime','format','length','Unknown\x20error','Requests','execute','\x20\x20Run\x20\x22tdx\x20claude\x22\x20to\x20start\x20using\x20AI\x20Suite.\x0a','message','red','\x20\x20Month:\x20\x20\x20','profileCount','1740suVfoV','repeat','1045740hninZE','description','round','316BJqUSJ','never','\x20\x20Total:\x20\x20\x20','outputTable','json','map','padStart','Show\x20AI\x20Suite\x20credit\x20usage\x20by\x20profile','\x20\x20Today:\x20\x20\x20','\x20credits','lastUsedAt','1058430lIfehm','toLocaleTimeString','396438KxStGk','\x20\x20No\x20usage\x20data\x20recorded\x20yet.','totalCredits','log','en-US','toFixed','cyan','short','default','entryCount'];a18_0x2822=function(){return _0x4e792b;};return a18_0x2822();}function formatLastUsed(_0xd3627){const _0x288328=a18_0x3f60;if(!_0xd3627)return _0x288328(0x21e);const _0x2ad8a6=new Date(_0xd3627),_0x3fb034=new Date(),_0x249722=_0x2ad8a6[_0x288328(0x201)](_0x288328(0x1fc)),_0x16ba60=_0x3fb034[_0x288328(0x201)](_0x288328(0x1fc));if(_0x249722===_0x16ba60)return _0x288328(0x1f7)+_0x2ad8a6[_0x288328(0x229)](_0x288328(0x22e),{'hour':_0x288328(0x234),'minute':_0x288328(0x234)});const _0x144d07=new Date(_0x249722),_0x6f7f39=new Date(_0x16ba60),_0x1f3118=Math[_0x288328(0x21c)]((_0x6f7f39[_0x288328(0x20d)]()-_0x144d07[_0x288328(0x20d)]())/(0x18*0x3c*0x3c*0x3e8));if(_0x1f3118===0x1)return _0x288328(0x200);else return _0x1f3118>0x1&&_0x1f3118<0x7?_0x1f3118+'\x20days\x20ago':_0x2ad8a6[_0x288328(0x201)](_0x288328(0x22e),{'month':_0x288328(0x231),'day':'numeric'});}export class ClaudeUsageCommand extends BaseCommand{[a18_0x419f76(0x1ff)]=a18_0x419f76(0x1f4);[a18_0x419f76(0x21b)]=a18_0x419f76(0x224);async[a18_0x419f76(0x212)](_0x1eae61){const _0x23b4ed=a18_0x419f76,{options:_0x30101a}=_0x1eae61,_0x3fb903=_0x30101a[_0x23b4ed(0x20e)]===_0x23b4ed(0x221)||_0x30101a[_0x23b4ed(0x20e)]===_0x23b4ed(0x20a)||_0x30101a[_0x23b4ed(0x221)];try{const [_0x41b5d9,_0xf8951f]=await Promise[_0x23b4ed(0x1f6)]([getAllProfileStats(),getUsageSummary()]);return _0x3fb903?await this[_0x23b4ed(0x207)](_0x41b5d9,_0xf8951f,_0x30101a):this[_0x23b4ed(0x220)](_0x41b5d9,_0xf8951f),0x0;}catch(_0x3c1985){const _0x59f1ac=_0x3c1985 instanceof Error?_0x3c1985[_0x23b4ed(0x214)]:_0x23b4ed(0x210);return console[_0x23b4ed(0x1fe)](a18_0x1f6e28[_0x23b4ed(0x215)](_0x23b4ed(0x1f5)+_0x59f1ac)),0x1;}}async[a18_0x419f76(0x207)](_0x5a062e,_0x161ed3,_0x1a5d10){const _0x377487=a18_0x419f76,_0x513c02={'summary':{'todayCredits':_0x161ed3[_0x377487(0x1fd)],'monthCredits':_0x161ed3[_0x377487(0x1f8)],'totalCredits':_0x161ed3[_0x377487(0x22c)],'profileCount':_0x161ed3[_0x377487(0x217)]},'profiles':_0x5a062e[_0x377487(0x222)](_0x83e58b=>({'profile':_0x83e58b[_0x377487(0x1fb)],'credits':_0x83e58b['credits'],'requests':_0x83e58b[_0x377487(0x233)],'lastUsedAt':_0x83e58b[_0x377487(0x227)]}))};await handleSDKOutput([_0x513c02],_0x1a5d10);}['outputTable'](_0x231042,_0x15669a){const _0x5dd686=a18_0x419f76;console[_0x5dd686(0x22d)](a18_0x1f6e28[_0x5dd686(0x209)]('\x0aAI\x20Suite\x20Credit\x20Usage\x20Summary')),console[_0x5dd686(0x22d)](a18_0x1f6e28['dim']('─'[_0x5dd686(0x219)](0x32))),console[_0x5dd686(0x22d)](_0x5dd686(0x225)+a18_0x1f6e28[_0x5dd686(0x230)](formatCredits(_0x15669a[_0x5dd686(0x1fd)]))+_0x5dd686(0x226)),console[_0x5dd686(0x22d)](_0x5dd686(0x216)+a18_0x1f6e28['cyan'](formatCredits(_0x15669a[_0x5dd686(0x1f8)]))+_0x5dd686(0x226)),console[_0x5dd686(0x22d)](_0x5dd686(0x21f)+a18_0x1f6e28[_0x5dd686(0x230)](formatCredits(_0x15669a[_0x5dd686(0x22c)]))+_0x5dd686(0x226)),console['log']();if(_0x231042[_0x5dd686(0x20f)]===0x0){console[_0x5dd686(0x22d)](a18_0x1f6e28['dim'](_0x5dd686(0x22b))),console[_0x5dd686(0x22d)](a18_0x1f6e28[_0x5dd686(0x208)](_0x5dd686(0x213)));return;}console['log'](a18_0x1f6e28[_0x5dd686(0x209)](_0x5dd686(0x203))),console[_0x5dd686(0x22d)](a18_0x1f6e28[_0x5dd686(0x208)]('─'[_0x5dd686(0x219)](0x3c)));const _0xd64c54=Math['max'](0xc,..._0x231042[_0x5dd686(0x222)](_0x511dce=>_0x511dce[_0x5dd686(0x1fb)]===_0x5dd686(0x232)?_0x5dd686(0x20b)[_0x5dd686(0x20f)]:_0x511dce[_0x5dd686(0x1fb)][_0x5dd686(0x20f)])),_0x135eae=0xa,_0x359a82=0xa;console[_0x5dd686(0x22d)]('\x20\x20'+'Profile'[_0x5dd686(0x1f9)](_0xd64c54)+'\x20\x20'+_0x5dd686(0x205)['padStart'](_0x135eae)+'\x20\x20'+_0x5dd686(0x211)[_0x5dd686(0x223)](_0x359a82)+'\x20\x20'+_0x5dd686(0x204));for(const _0x4e0ee3 of _0x231042){const _0x53afae=_0x4e0ee3['profile']===_0x5dd686(0x232)?_0x5dd686(0x20b):_0x4e0ee3[_0x5dd686(0x1fb)],_0x1b598c=_0x53afae['padEnd'](_0xd64c54),_0x29cb96=_0x4e0ee3['profile']==='default'?a18_0x1f6e28['dim'](_0x1b598c):_0x1b598c;console['log']('\x20\x20'+_0x29cb96+'\x20\x20'+a18_0x1f6e28[_0x5dd686(0x230)](formatCredits(_0x4e0ee3[_0x5dd686(0x20c)])[_0x5dd686(0x223)](_0x135eae))+'\x20\x20'+String(_0x4e0ee3['entryCount'])['padStart'](_0x359a82)+'\x20\x20'+a18_0x1f6e28[_0x5dd686(0x208)](formatLastUsed(_0x4e0ee3[_0x5dd686(0x227)])));}console[_0x5dd686(0x22d)](),console[_0x5dd686(0x22d)](a18_0x1f6e28[_0x5dd686(0x208)]('Note:\x20Credit\x20values\x20are\x20estimates\x20based\x20on\x20token\x20usage.')),console['log']();}}
@@ -1 +1 @@
1
- function a19_0x5731(){const _0x583846=['get','error','name','number','Authentication\x20error\x20stack\x20trace:','run','Invalid\x20limit\x20value:\x20','commands','Authentication\x20failed','limit','To\x20check\x20your\x20current\x20auth\x20status:','red','options','\x20\x20tdx\x20auth','values','value','set','validateGlobalOptions','4523082KvLxwU','detail','debug','tdx','stack','\x0aStack\x20trace:\x0a','yellow','6077274YAAfUc','has','problemDetails','1220352TdbqoV','test','\x0aTo\x20set\x20up\x20authentication:','.\x20Must\x20be\x20a\x20number.','256745NjMqgq','logger','getAll','Error:\x20','1951350pVrnEs','7206620bIDtZM','helpText','message','4074832pNCBzt','execute','8ulheAt','Reason:\x20','validate','\x27\x20is\x20already\x20registered','isValid','USER_ERROR','category','register'];a19_0x5731=function(){return _0x583846;};return a19_0x5731();}const a19_0x5299b0=a19_0x5e0e;(function(_0x4f1f25,_0x90c8ab){const _0x421839=a19_0x5e0e,_0xd1112c=_0x4f1f25();while(!![]){try{const _0x4bbebb=parseInt(_0x421839(0x185))/0x1*(parseInt(_0x421839(0x18f))/0x2)+-parseInt(_0x421839(0x189))/0x3+-parseInt(_0x421839(0x18d))/0x4+parseInt(_0x421839(0x18a))/0x5+parseInt(_0x421839(0x177))/0x6+-parseInt(_0x421839(0x17e))/0x7+parseInt(_0x421839(0x181))/0x8;if(_0x4bbebb===_0x90c8ab)break;else _0xd1112c['push'](_0xd1112c['shift']());}catch(_0x57caf3){_0xd1112c['push'](_0xd1112c['shift']());}}}(a19_0x5731,0xcc6eb));import{validateLimitOption}from'../utils/option-validation.js';import{HTTPClientError}from'../client/http-client.js';import{SDKError,ErrorCategory}from'../sdk/errors.js';import a19_0x243e93 from'chalk';export function printAuthError(_0x4d94af,_0x400aa7=![],_0x629aec){const _0x5c4d02=a19_0x5e0e,_0x1b62f3=_0x4d94af[_0x5c4d02(0x180)]?.[_0x5c4d02(0x178)]||_0x4d94af[_0x5c4d02(0x18c)];console[_0x5c4d02(0x198)](a19_0x243e93[_0x5c4d02(0x170)](_0x5c4d02(0x16d))),console[_0x5c4d02(0x198)](a19_0x243e93[_0x5c4d02(0x170)](_0x5c4d02(0x190)+_0x1b62f3));if(_0x400aa7){const _0x2b2604=_0x629aec?'\x20--profile\x20'+_0x629aec:'';console[_0x5c4d02(0x198)](_0x5c4d02(0x183)),console[_0x5c4d02(0x198)]('\x20\x20tdx\x20auth\x20setup'+_0x2b2604+'\x0a'),console['error'](_0x5c4d02(0x16f)),console['error'](_0x5c4d02(0x172)+_0x2b2604);}}export class BaseCommand{[a19_0x5299b0(0x176)](_0x20b089){const _0x54d2f7=a19_0x5299b0,{options:_0x360938}=_0x20b089,_0x5c175a=_0x360938['limit'];if(_0x5c175a!==undefined){const _0x1e57d8=typeof _0x5c175a===_0x54d2f7(0x19a)?_0x5c175a:parseInt(_0x5c175a,0xa);if(isNaN(_0x1e57d8))return _0x54d2f7(0x19d)+_0x5c175a+_0x54d2f7(0x184);const _0x2cba6c=validateLimitOption(_0x1e57d8);if(!_0x2cba6c[_0x54d2f7(0x193)])return _0x2cba6c['error'];_0x20b089['options'][_0x54d2f7(0x16e)]=_0x2cba6c[_0x54d2f7(0x174)];}return undefined;}[a19_0x5299b0(0x191)](_0x3eaa62){return undefined;}async[a19_0x5299b0(0x19c)](_0x218d06){const _0x543374=a19_0x5299b0;try{const _0x1ca37d=this[_0x543374(0x176)](_0x218d06);if(_0x1ca37d)return console['error']('Error:\x20'+_0x1ca37d),0x1;const _0x387c17=this[_0x543374(0x191)](_0x218d06);if(_0x387c17){const _0x1d68a5=/^\s*(Usage|Note|Warning|Error):/i[_0x543374(0x182)](_0x387c17);return _0x1d68a5?console['error'](_0x387c17):console['error'](_0x543374(0x188)+_0x387c17),0x1;}const _0x32bf24=await this[_0x543374(0x18e)](_0x218d06);return _0x32bf24??0x0;}catch(_0x2a9fd5){if(_0x2a9fd5 instanceof Error){if(_0x2a9fd5 instanceof HTTPClientError&&_0x2a9fd5['status']===0x191){const _0x464a3c=_0x218d06[_0x543374(0x171)]['profile'];return printAuthError(_0x2a9fd5,!![],_0x464a3c),_0x2a9fd5['stack']&&_0x218d06[_0x543374(0x17a)]&&(_0x218d06['tdx'][_0x543374(0x186)][_0x543374(0x179)](_0x543374(0x19b)),_0x218d06['tdx'][_0x543374(0x186)][_0x543374(0x179)](_0x2a9fd5[_0x543374(0x17b)])),0x1;}console[_0x543374(0x198)](a19_0x243e93[_0x543374(0x170)](_0x543374(0x188)+_0x2a9fd5[_0x543374(0x18c)]));_0x2a9fd5 instanceof SDKError&&_0x2a9fd5[_0x543374(0x18b)]&&console['error'](a19_0x243e93[_0x543374(0x17d)](_0x2a9fd5[_0x543374(0x18b)]));const _0x5e765b=_0x2a9fd5 instanceof SDKError&&_0x2a9fd5[_0x543374(0x195)]===ErrorCategory[_0x543374(0x194)];_0x2a9fd5[_0x543374(0x17b)]&&!_0x5e765b&&console[_0x543374(0x198)](_0x543374(0x17c)+_0x2a9fd5[_0x543374(0x17b)]);}else console[_0x543374(0x198)](_0x543374(0x188)+String(_0x2a9fd5));return 0x1;}}}function a19_0x5e0e(_0x4354b0,_0x52cd4e){_0x4354b0=_0x4354b0-0x16c;const _0x57311d=a19_0x5731();let _0x5e0e5d=_0x57311d[_0x4354b0];return _0x5e0e5d;}export class CommandRegistry{[a19_0x5299b0(0x16c)]=new Map();[a19_0x5299b0(0x196)](_0x5af0e5){const _0x21ef66=a19_0x5299b0;if(this[_0x21ef66(0x16c)][_0x21ef66(0x17f)](_0x5af0e5[_0x21ef66(0x199)]))throw new Error('Command\x20\x27'+_0x5af0e5[_0x21ef66(0x199)]+_0x21ef66(0x192));this[_0x21ef66(0x16c)][_0x21ef66(0x175)](_0x5af0e5[_0x21ef66(0x199)],_0x5af0e5);}['get'](_0x43ecb0){const _0x518276=a19_0x5299b0;return this[_0x518276(0x16c)][_0x518276(0x197)](_0x43ecb0);}[a19_0x5299b0(0x187)](){const _0x1901ee=a19_0x5299b0;return Array['from'](this['commands'][_0x1901ee(0x173)]());}[a19_0x5299b0(0x17f)](_0x55c641){const _0x122ef5=a19_0x5299b0;return this[_0x122ef5(0x16c)]['has'](_0x55c641);}}export const registry=new CommandRegistry();
1
+ const a19_0x578480=a19_0x559a;(function(_0x2602de,_0x14fc22){const _0x53997a=a19_0x559a,_0x37b62a=_0x2602de();while(!![]){try{const _0x382b5e=-parseInt(_0x53997a(0x162))/0x1+-parseInt(_0x53997a(0x174))/0x2*(parseInt(_0x53997a(0x17f))/0x3)+-parseInt(_0x53997a(0x185))/0x4*(parseInt(_0x53997a(0x159))/0x5)+parseInt(_0x53997a(0x170))/0x6+parseInt(_0x53997a(0x160))/0x7+-parseInt(_0x53997a(0x17b))/0x8*(-parseInt(_0x53997a(0x15f))/0x9)+parseInt(_0x53997a(0x163))/0xa;if(_0x382b5e===_0x14fc22)break;else _0x37b62a['push'](_0x37b62a['shift']());}catch(_0x2105e3){_0x37b62a['push'](_0x37b62a['shift']());}}}(a19_0x5772,0x4dc4e));function a19_0x559a(_0x5d3275,_0x398c19){_0x5d3275=_0x5d3275-0x157;const _0x57720b=a19_0x5772();let _0x559a49=_0x57720b[_0x5d3275];return _0x559a49;}function a19_0x5772(){const _0x45d44d=['To\x20check\x20your\x20current\x20auth\x20status:','363978YFnGYG','1099462iZjiJN','error','242811vRYKnW','5778960QzmsnM','problemDetails','has','\x20\x20tdx\x20auth\x20setup','Command\x20\x27','validate','red','register','debug','get','options','from','\x20\x20tdx\x20auth','3795426yCcvau','set','run','logger','6oXmkjh','category','Authentication\x20error\x20stack\x20trace:','\x27\x20is\x20already\x20registered','yellow','stack','name','32fnaziS','Invalid\x20limit\x20value:\x20','\x20--profile\x20','commands','483351YBPwbS','Reason:\x20','isValid','number','limit','helpText','4MIhYGK','Error:\x20','\x0aTo\x20set\x20up\x20authentication:','USER_ERROR','execute','2422985rhDPem','message','tdx','profile','validateGlobalOptions'];a19_0x5772=function(){return _0x45d44d;};return a19_0x5772();}import{validateLimitOption}from'../utils/option-validation.js';import{HTTPClientError}from'../client/http-client.js';import{SDKError,ErrorCategory}from'../sdk/errors.js';import a19_0x39f8a9 from'chalk';export function printAuthError(_0x3c142a,_0x6fe297=![],_0x4c82d2){const _0x4d3b61=a19_0x559a,_0x163a33=_0x3c142a[_0x4d3b61(0x164)]?.['detail']||_0x3c142a[_0x4d3b61(0x15a)];console[_0x4d3b61(0x161)](a19_0x39f8a9[_0x4d3b61(0x169)]('Authentication\x20failed')),console[_0x4d3b61(0x161)](a19_0x39f8a9[_0x4d3b61(0x169)](_0x4d3b61(0x180)+_0x163a33));if(_0x6fe297){const _0x1561fb=_0x4c82d2?_0x4d3b61(0x17d)+_0x4c82d2:'';console[_0x4d3b61(0x161)](_0x4d3b61(0x187)),console['error'](_0x4d3b61(0x166)+_0x1561fb+'\x0a'),console['error'](_0x4d3b61(0x15e)),console['error'](_0x4d3b61(0x16f)+_0x1561fb);}}export class BaseCommand{[a19_0x578480(0x15d)](_0x2ba446){const _0x293e3f=a19_0x578480,{options:_0x5595ce}=_0x2ba446,_0x1822ba=_0x5595ce[_0x293e3f(0x183)];if(_0x1822ba!==undefined){const _0x3f1b18=typeof _0x1822ba===_0x293e3f(0x182)?_0x1822ba:parseInt(_0x1822ba,0xa);if(isNaN(_0x3f1b18))return _0x293e3f(0x17c)+_0x1822ba+'.\x20Must\x20be\x20a\x20number.';const _0x55e43c=validateLimitOption(_0x3f1b18);if(!_0x55e43c[_0x293e3f(0x181)])return _0x55e43c[_0x293e3f(0x161)];_0x2ba446[_0x293e3f(0x16d)][_0x293e3f(0x183)]=_0x55e43c['value'];}return undefined;}[a19_0x578480(0x168)](_0x506f8a){return undefined;}async[a19_0x578480(0x172)](_0x531ca6){const _0x4f1849=a19_0x578480;try{const _0x1cc797=this['validateGlobalOptions'](_0x531ca6);if(_0x1cc797)return console[_0x4f1849(0x161)](_0x4f1849(0x186)+_0x1cc797),0x1;const _0x2213fa=this['validate'](_0x531ca6);if(_0x2213fa){const _0x3e3eab=/^\s*(Usage|Note|Warning|Error):/i['test'](_0x2213fa);return _0x3e3eab?console[_0x4f1849(0x161)](_0x2213fa):console[_0x4f1849(0x161)]('Error:\x20'+_0x2213fa),0x1;}const _0x59934c=await this[_0x4f1849(0x158)](_0x531ca6);return _0x59934c??0x0;}catch(_0x550e05){if(_0x550e05 instanceof Error){if(_0x550e05 instanceof HTTPClientError&&_0x550e05['status']===0x191){const _0x80c6bd=_0x531ca6['options'][_0x4f1849(0x15c)];return printAuthError(_0x550e05,!![],_0x80c6bd),_0x550e05[_0x4f1849(0x179)]&&_0x531ca6[_0x4f1849(0x15b)]&&(_0x531ca6['tdx'][_0x4f1849(0x173)][_0x4f1849(0x16b)](_0x4f1849(0x176)),_0x531ca6[_0x4f1849(0x15b)][_0x4f1849(0x173)][_0x4f1849(0x16b)](_0x550e05[_0x4f1849(0x179)])),0x1;}console[_0x4f1849(0x161)](a19_0x39f8a9['red']('Error:\x20'+_0x550e05[_0x4f1849(0x15a)]));_0x550e05 instanceof SDKError&&_0x550e05[_0x4f1849(0x184)]&&console[_0x4f1849(0x161)](a19_0x39f8a9[_0x4f1849(0x178)](_0x550e05[_0x4f1849(0x184)]));const _0x47dad1=_0x550e05 instanceof SDKError&&_0x550e05[_0x4f1849(0x175)]===ErrorCategory[_0x4f1849(0x157)];_0x550e05[_0x4f1849(0x179)]&&!_0x47dad1&&console['error']('\x0aStack\x20trace:\x0a'+_0x550e05[_0x4f1849(0x179)]);}else console[_0x4f1849(0x161)]('Error:\x20'+String(_0x550e05));return 0x1;}}}export class CommandRegistry{[a19_0x578480(0x17e)]=new Map();[a19_0x578480(0x16a)](_0xb4f3c1){const _0x4c459b=a19_0x578480;if(this[_0x4c459b(0x17e)]['has'](_0xb4f3c1[_0x4c459b(0x17a)]))throw new Error(_0x4c459b(0x167)+_0xb4f3c1['name']+_0x4c459b(0x177));this[_0x4c459b(0x17e)][_0x4c459b(0x171)](_0xb4f3c1['name'],_0xb4f3c1);}[a19_0x578480(0x16c)](_0x5701e1){const _0x224604=a19_0x578480;return this[_0x224604(0x17e)][_0x224604(0x16c)](_0x5701e1);}['getAll'](){const _0x276c1b=a19_0x578480;return Array[_0x276c1b(0x16e)](this[_0x276c1b(0x17e)]['values']());}[a19_0x578480(0x165)](_0x4eeee5){const _0x57b1fd=a19_0x578480;return this[_0x57b1fd(0x17e)][_0x57b1fd(0x165)](_0x4eeee5);}}export const registry=new CommandRegistry();
@@ -1 +1 @@
1
- const a20_0x5e6fd0=a20_0x1e0d;(function(_0x1240ea,_0x18764d){const _0x5b775b=a20_0x1e0d,_0x91232b=_0x1240ea();while(!![]){try{const _0x4ee2ce=parseInt(_0x5b775b(0xdc))/0x1+-parseInt(_0x5b775b(0x115))/0x2*(-parseInt(_0x5b775b(0xe5))/0x3)+-parseInt(_0x5b775b(0xd3))/0x4+-parseInt(_0x5b775b(0xb0))/0x5+-parseInt(_0x5b775b(0x111))/0x6+parseInt(_0x5b775b(0x100))/0x7*(-parseInt(_0x5b775b(0xae))/0x8)+parseInt(_0x5b775b(0x104))/0x9;if(_0x4ee2ce===_0x18764d)break;else _0x91232b['push'](_0x91232b['shift']());}catch(_0xeb9b28){_0x91232b['push'](_0x91232b['shift']());}}}(a20_0x5367,0x94e3c));import{BaseCommand}from'./command.js';import{handleSDKOutput,handleSingleObjectOutput,isStructuredFormat,writeOutput}from'../utils/command-output.js';import{withSpinner}from'../utils/spinner.js';import{DEFAULT_LISTING_LIMIT,resolveLimit}from'../utils/constants.js';import a20_0x4d7dbf from'chalk';function normalizeSchemaForDisplay(_0x1e8cae){const _0x423a59=a20_0x1e0d,_0x327c26=_0x1e8cae[_0x423a59(0xe6)]||[],_0x2fda83=_0x327c26[_0x423a59(0xfd)](_0x229a12=>_0x229a12[_0x423a59(0x114)]==='legacy_settings'&&_0x229a12[_0x423a59(0xc5)]===_0x423a59(0xb2)&&_0x229a12[_0x423a59(0xe6)]);if(_0x2fda83?.[_0x423a59(0xe6)]){const _0x15e173=_0x327c26[_0x423a59(0xef)](_0x482a82=>_0x482a82[_0x423a59(0x114)]!=='legacy'&&_0x482a82[_0x423a59(0x114)]!==_0x423a59(0xf3));return[..._0x15e173,..._0x2fda83[_0x423a59(0xe6)]];}return _0x327c26[_0x423a59(0xef)](_0x3bc761=>_0x3bc761[_0x423a59(0x114)]!==_0x423a59(0xf4));}function a20_0x1e0d(_0x4efad0,_0x5cdf3a){_0x4efad0=_0x4efad0-0xac;const _0x536787=a20_0x5367();let _0x1e0d7e=_0x536787[_0x4efad0];return _0x1e0d7e;}function printSchemaFields(_0x1b2c37,_0x439962){const _0xb5f2c6=a20_0x1e0d,_0x135195='\x20\x20'[_0xb5f2c6(0x10d)](_0x439962+0x1),_0x515d97='\x20\x20'[_0xb5f2c6(0x10d)](_0x439962+0x2);for(const _0x537770 of _0x1b2c37){if(!_0x537770[_0xb5f2c6(0x114)])continue;const _0x537ce8=_0x537770[_0xb5f2c6(0xc5)]===_0xb5f2c6(0xb2)&&_0x537770['properties']&&_0x537770[_0xb5f2c6(0xe6)][_0xb5f2c6(0xb1)]>0x0&&_0x537770[_0xb5f2c6(0x114)]!==_0xb5f2c6(0xf3);let _0x5e27fb=''+_0x135195+a20_0x4d7dbf[_0xb5f2c6(0xd6)](_0x537770[_0xb5f2c6(0x114)]);_0x537770['title']&&(_0x5e27fb+=':\x20'+_0x537770[_0xb5f2c6(0x117)]);if(_0x537770[_0xb5f2c6(0xd9)])_0x5e27fb+=a20_0x4d7dbf[_0xb5f2c6(0xba)]('\x20['+_0x537770['input']+']');else _0x537ce8&&(_0x5e27fb+=a20_0x4d7dbf[_0xb5f2c6(0xba)](_0xb5f2c6(0xbd)));console['log'](_0x5e27fb);_0x537770[_0xb5f2c6(0xc3)]&&console[_0xb5f2c6(0xb6)](''+_0x515d97+a20_0x4d7dbf['dim'](_0x537770[_0xb5f2c6(0xc3)]));if(_0x537770[_0xb5f2c6(0xf5)]){const _0x2b419a=_0x537770['enumeration']['map'](_0x26c2ff=>typeof _0x26c2ff==='object'&&_0xb5f2c6(0xc1)in _0x26c2ff?_0x26c2ff['value']:_0x26c2ff)[_0xb5f2c6(0x108)](',\x20');console[_0xb5f2c6(0xb6)](_0x515d97+'Options:\x20'+a20_0x4d7dbf[_0xb5f2c6(0x106)](_0x2b419a));}_0x537770[_0xb5f2c6(0xb4)]!==undefined&&console[_0xb5f2c6(0xb6)](_0x515d97+'Default:\x20'+a20_0x4d7dbf[_0xb5f2c6(0xb5)](String(_0x537770['default_value'])));if(_0x537770['minimum']!==undefined||_0x537770[_0xb5f2c6(0xfb)]!==undefined){const _0x5bb11c=_0x537770['minimum']!==undefined&&_0x537770['maximum']!==undefined?_0x537770[_0xb5f2c6(0xf6)]+'\x20-\x20'+_0x537770['maximum']:_0x537770['minimum']!==undefined?_0xb5f2c6(0xcf)+_0x537770[_0xb5f2c6(0xf6)]:_0xb5f2c6(0xe1)+_0x537770[_0xb5f2c6(0xfb)];console[_0xb5f2c6(0xb6)](_0x515d97+_0xb5f2c6(0x113)+a20_0x4d7dbf[_0xb5f2c6(0xb5)](_0x5bb11c));}if(_0x537770[_0xb5f2c6(0xc0)]){const _0x211c30=Object['entries'](_0x537770[_0xb5f2c6(0xc0)])['map'](([_0x2b4d5a,_0x11152e])=>_0x2b4d5a+'='+JSON[_0xb5f2c6(0xac)](_0x11152e))[_0xb5f2c6(0x108)](',\x20');console[_0xb5f2c6(0xb6)](''+_0x515d97+a20_0x4d7dbf['dim'](_0xb5f2c6(0xe7)+_0x211c30));}_0x537ce8&&_0x537770[_0xb5f2c6(0xe6)]&&printSchemaFields(_0x537770[_0xb5f2c6(0xe6)],_0x439962+0x1);}}export class ConnectionListCommand extends BaseCommand{[a20_0x5e6fd0(0x114)]=a20_0x5e6fd0(0x109);[a20_0x5e6fd0(0xc3)]=a20_0x5e6fd0(0xda);async[a20_0x5e6fd0(0xc2)](_0x5776d0){const _0x336471=a20_0x5e6fd0,{options:_0x30c9a0,tdx:_0x455d3a}=_0x5776d0;_0x30c9a0[_0x336471(0xb8)]&&console['error'](_0x336471(0xe8)+_0x30c9a0[_0x336471(0xd1)]);const _0x49c659=resolveLimit(_0x30c9a0[_0x336471(0x10b)],DEFAULT_LISTING_LIMIT),_0x152e49=await withSpinner(_0x336471(0x10f),()=>_0x455d3a[_0x336471(0xff)][_0x336471(0x112)](),{'verbose':_0x30c9a0[_0x336471(0xb8)]}),_0x307fa6=_0x152e49[_0x336471(0x10e)];console[_0x336471(0xea)](_0x336471(0xfe)+_0x307fa6[_0x336471(0xb1)]+'\x20connection'+(_0x307fa6[_0x336471(0xb1)]!==0x1?'s':''));if(isStructuredFormat(_0x30c9a0)){const _0x48ca9d=_0x307fa6[_0x336471(0x10c)](0x0,_0x49c659);await handleSDKOutput(_0x48ca9d,{..._0x30c9a0,'limit':_0x49c659});}else{const _0x5c93b4=_0x307fa6[_0x336471(0xb1)]>0x0?Math['max'](..._0x307fa6[_0x336471(0xaf)](_0x4deeba=>_0x4deeba[_0x336471(0xc5)]['length'])):0x0,_0x82ce14=[];for(const _0x207d96 of _0x307fa6){const _0x3214c7=a20_0x4d7dbf[_0x336471(0xf1)](_0x207d96[_0x336471(0xc5)][_0x336471(0xd8)](_0x5c93b4)),_0x43cf61=_0x207d96[_0x336471(0xbe)]?.[_0x336471(0x114)]?_0x336471(0xca)+a20_0x4d7dbf[_0x336471(0xba)](_0x207d96[_0x336471(0xbe)]['name']):'';_0x82ce14[_0x336471(0xbc)](_0x3214c7+'\x20\x20'+_0x207d96['name']+_0x43cf61);}await writeOutput(_0x82ce14[_0x336471(0x108)]('\x0a'),_0x30c9a0[_0x336471(0xcc)],_0x336471(0xb7));}return 0x0;}}export class ConnectionShowCommand extends BaseCommand{['name']=a20_0x5e6fd0(0xe0);['description']=a20_0x5e6fd0(0xfa);[a20_0x5e6fd0(0xee)](_0x5f1ebc){const {args:_0x3cb24b}=_0x5f1ebc;if(!_0x3cb24b[0x0])return'Usage:\x20tdx\x20connection\x20show\x20<name>\x0a\x0aArguments:\x0a\x20\x20<name>\x20\x20\x20\x20Connection\x20name\x0a\x0aExamples:\x0a\x20\x20tdx\x20connection\x20show\x20my-s3-connection\x0a\x20\x20tdx\x20connection\x20show\x20\x22My\x20Salesforce\x20Connection\x22';return undefined;}async[a20_0x5e6fd0(0xc2)](_0x46c5eb){const _0xcb56d0=a20_0x5e6fd0,{options:_0x5ec1e7,args:_0x33986e,tdx:_0x1b0e70}=_0x46c5eb,_0x3404f9=_0x33986e[0x0];_0x5ec1e7['verbose']&&(console[_0xcb56d0(0xea)](_0xcb56d0(0xe8)+_0x5ec1e7['site']),console[_0xcb56d0(0xea)](_0xcb56d0(0xf7)+_0x3404f9));const _0x5e7ee4=await withSpinner(_0xcb56d0(0x110)+_0x3404f9+_0xcb56d0(0xd4),()=>_0x1b0e70['connection'][_0xcb56d0(0xc7)](_0x3404f9),{'verbose':_0x5ec1e7[_0xcb56d0(0xb8)]}),_0x3e6104=_0x5e7ee4[_0xcb56d0(0x10e)];return console[_0xcb56d0(0xea)](_0xcb56d0(0xbb)+_0x3e6104[_0xcb56d0(0x114)]),await handleSingleObjectOutput(_0x3e6104,_0x5ec1e7),0x0;}}export class ConnectionSchemaCommand extends BaseCommand{[a20_0x5e6fd0(0x114)]=a20_0x5e6fd0(0xde);[a20_0x5e6fd0(0xc3)]=a20_0x5e6fd0(0xcd);['validate'](_0x279a38){const _0x5af055=a20_0x5e6fd0,{args:_0x1e31a0}=_0x279a38;if(!_0x1e31a0[0x0])return _0x5af055(0xbf);return undefined;}async[a20_0x5e6fd0(0xc2)](_0x57c052){const _0x3ae466=a20_0x5e6fd0,{options:_0x2edfdd,args:_0x2ab359,tdx:_0x2ce5ff}=_0x57c052,_0x4dbeeb=_0x2ab359[0x0];_0x2edfdd[_0x3ae466(0xb8)]&&(console[_0x3ae466(0xea)](_0x3ae466(0xe8)+_0x2edfdd[_0x3ae466(0xd1)]),console[_0x3ae466(0xea)]('Resolving\x20connector\x20type\x20or\x20name:\x20'+_0x4dbeeb));let _0x2d6fed=_0x4dbeeb,_0x5b8280;try{const _0x376492=await _0x2ce5ff['connection'][_0x3ae466(0xed)](_0x4dbeeb);_0x376492&&(_0x2d6fed=_0x376492[_0x3ae466(0xc5)],_0x5b8280=_0x376492[_0x3ae466(0x114)],_0x2edfdd[_0x3ae466(0xb8)]&&console[_0x3ae466(0xea)](_0x3ae466(0xe2)+_0x4dbeeb+'\x27\x20as\x20connection\x20name\x20→\x20type:\x20'+_0x2d6fed));}catch{_0x2edfdd['verbose']&&console['error']('Treating\x20\x27'+_0x4dbeeb+'\x27\x20as\x20connector\x20type');}const _0x2c224e=await withSpinner('Fetching\x20schema\x20for\x20\x27'+_0x2d6fed+_0x3ae466(0xd4),()=>_0x2ce5ff[_0x3ae466(0xff)][_0x3ae466(0x103)](_0x2d6fed),{'verbose':_0x2edfdd[_0x3ae466(0xb8)]}),_0x2cab66=_0x2c224e[_0x3ae466(0x10e)];_0x5b8280?console['error'](_0x3ae466(0xf2)+_0x5b8280+_0x3ae466(0xdf)+_0x2d6fed+')'):console[_0x3ae466(0xea)]('✔\x20Found\x20schema\x20for\x20connector\x20type:\x20'+_0x2d6fed);if(isStructuredFormat(_0x2edfdd))await handleSingleObjectOutput(_0x2cab66,_0x2edfdd);else{const _0x55eb8d=normalizeSchemaForDisplay(_0x2cab66);_0x5b8280?(console['log'](_0x3ae466(0xf0)+a20_0x4d7dbf[_0x3ae466(0xf1)](_0x5b8280)),console[_0x3ae466(0xb6)](_0x3ae466(0xe3)+a20_0x4d7dbf[_0x3ae466(0xba)](_0x2d6fed))):console['log'](_0x3ae466(0xb9)+a20_0x4d7dbf[_0x3ae466(0xf1)](_0x2d6fed)),_0x55eb8d[_0x3ae466(0xb1)]>0x0?(console[_0x3ae466(0xb6)](a20_0x4d7dbf[_0x3ae466(0xd0)](_0x3ae466(0xc8))),printSchemaFields(_0x55eb8d,0x0)):console[_0x3ae466(0xb6)](a20_0x4d7dbf[_0x3ae466(0xba)](_0x3ae466(0xc6)));}return 0x0;}}export class ConnectionTypesCommand extends BaseCommand{[a20_0x5e6fd0(0x114)]='connection:types';[a20_0x5e6fd0(0xc3)]='List\x20available\x20connector\x20types';async[a20_0x5e6fd0(0xc2)](_0x57ce08){const _0xaccee=a20_0x5e6fd0,{options:_0x3c9be5,tdx:_0x5c2b50}=_0x57ce08;_0x3c9be5[_0xaccee(0xb8)]&&console[_0xaccee(0xea)](_0xaccee(0xe8)+_0x3c9be5[_0xaccee(0xd1)]);const _0x91dad3=await withSpinner(_0xaccee(0xad),()=>_0x5c2b50[_0xaccee(0xff)]['listTypes'](),{'verbose':_0x3c9be5[_0xaccee(0xb8)]}),_0x2de767=_0x91dad3['data'][_0xaccee(0xfc)]((_0x12eb24,_0x3a6961)=>_0x12eb24['type'][_0xaccee(0xdb)](_0x3a6961[_0xaccee(0xc5)]));console['error'](_0xaccee(0xfe)+_0x2de767[_0xaccee(0xb1)]+_0xaccee(0xd2)+(_0x2de767['length']!==0x1?'s':''));if(isStructuredFormat(_0x3c9be5))await handleSDKOutput(_0x2de767,_0x3c9be5);else{const _0x1d22e0=_0x2de767[_0xaccee(0xb1)]>0x0?Math[_0xaccee(0x102)](..._0x2de767[_0xaccee(0xaf)](_0x2ea5c4=>_0x2ea5c4[_0xaccee(0xc5)][_0xaccee(0xb1)])):0x0,_0x1e352f=[];for(const _0x326860 of _0x2de767){const _0x4a659f=a20_0x4d7dbf[_0xaccee(0xf1)](_0x326860[_0xaccee(0xc5)][_0xaccee(0xd8)](_0x1d22e0));_0x1e352f[_0xaccee(0xbc)](_0x4a659f+'\x20\x20'+_0x326860['name']);}await writeOutput(_0x1e352f['join']('\x0a'),_0x3c9be5[_0xaccee(0xcc)],_0xaccee(0xb7));}return 0x0;}}export class ConnectionSettingsCommand extends BaseCommand{['name']=a20_0x5e6fd0(0xe4);[a20_0x5e6fd0(0xc3)]=a20_0x5e6fd0(0xb3);['validate'](_0x3f7194){const _0x3cfdc9=a20_0x5e6fd0,{args:_0x1c7f35}=_0x3f7194;if(!_0x1c7f35[0x0])return _0x3cfdc9(0x10a);return undefined;}async[a20_0x5e6fd0(0xc2)](_0x2de89f){const _0x3fcb78=a20_0x5e6fd0,{options:_0x6dea6,args:_0x2ad2bc,tdx:_0x5695f8}=_0x2de89f,_0x1ef465=_0x2ad2bc[0x0];_0x6dea6[_0x3fcb78(0xb8)]&&(console['error'](_0x3fcb78(0xe8)+_0x6dea6[_0x3fcb78(0xd1)]),console[_0x3fcb78(0xea)](_0x3fcb78(0xcb)+_0x1ef465));const _0x389123=await withSpinner(_0x3fcb78(0x107)+_0x1ef465+_0x3fcb78(0xd4),()=>_0x5695f8[_0x3fcb78(0xff)]['getMetadata'](_0x1ef465),{'verbose':_0x6dea6[_0x3fcb78(0xb8)]}),_0xe7cf18=_0x389123[_0x3fcb78(0x10e)];console[_0x3fcb78(0xea)](_0x3fcb78(0x105)+_0x1ef465);if(isStructuredFormat(_0x6dea6))await handleSingleObjectOutput(_0xe7cf18,_0x6dea6);else{console[_0x3fcb78(0xb6)](_0x3fcb78(0xb9)+a20_0x4d7dbf[_0x3fcb78(0xf1)](_0x1ef465)),console[_0x3fcb78(0xb6)](_0x3fcb78(0xc9)+_0xe7cf18[_0x3fcb78(0x114)]);const _0xf9c858=_0xe7cf18[_0x3fcb78(0x101)]||[],_0x530395=_0xf9c858[_0x3fcb78(0xef)](_0x4e548f=>_0x4e548f[_0x3fcb78(0xc4)]);_0x530395[_0x3fcb78(0xb1)]>0x0&&(console['log'](a20_0x4d7dbf[_0x3fcb78(0xd0)](_0x3fcb78(0xd7))),printMetadataSettings(_0x530395));let _0x329d7e=![];try{const _0x3fb76e=await _0x5695f8[_0x3fcb78(0xff)][_0x3fcb78(0x103)](_0x1ef465),_0x36d3c8=normalizeSchemaForDisplay(_0x3fb76e);_0x36d3c8['length']>0x0&&(console[_0x3fcb78(0xb6)](a20_0x4d7dbf[_0x3fcb78(0xd0)]('\x0aAvailable\x20fields:')),printSchemaFields(_0x36d3c8,0x0),_0x329d7e=!![]);}catch{const _0x2060c2=_0xf9c858[_0x3fcb78(0xef)](_0x55d21c=>!_0x55d21c['credential']);_0x2060c2[_0x3fcb78(0xb1)]>0x0&&(console[_0x3fcb78(0xb6)](a20_0x4d7dbf[_0x3fcb78(0xd0)](_0x3fcb78(0xc8))),printMetadataSettings(_0x2060c2),_0x329d7e=!![]);}!_0x329d7e&&_0x6dea6['verbose']&&console[_0x3fcb78(0xea)](a20_0x4d7dbf[_0x3fcb78(0xba)](_0x3fcb78(0x116))),_0x530395[_0x3fcb78(0xb1)]===0x0&&console[_0x3fcb78(0xb6)](a20_0x4d7dbf['dim']('\x0aNo\x20credential\x20settings\x20defined'));}return 0x0;}}function printMetadataSettings(_0xf27318){const _0x40a936=a20_0x5e6fd0;for(const _0x32ea88 of _0xf27318){if(!_0x32ea88[_0x40a936(0x114)])continue;if(_0x32ea88[_0x40a936(0xec)])continue;let _0x41b78e='\x20\x20'+a20_0x4d7dbf[_0x40a936(0xd6)](_0x32ea88['name']);_0x32ea88[_0x40a936(0xce)]&&(_0x41b78e+=':\x20'+_0x32ea88[_0x40a936(0xce)]);_0x32ea88[_0x40a936(0xc5)]&&(_0x41b78e+=a20_0x4d7dbf[_0x40a936(0xba)]('\x20['+_0x32ea88[_0x40a936(0xc5)]+']'));console['log'](_0x41b78e);_0x32ea88[_0x40a936(0xf9)]&&console[_0x40a936(0xb6)](_0x40a936(0xdd)+a20_0x4d7dbf[_0x40a936(0xba)](_0x32ea88[_0x40a936(0xf9)]));if(_0x32ea88[_0x40a936(0xe9)]){const _0x6938ac=_0x32ea88['options'][_0x40a936(0xaf)](_0x3d70a5=>_0x3d70a5[_0x40a936(0xc1)])[_0x40a936(0x108)](',\x20');console[_0x40a936(0xb6)](_0x40a936(0xf8)+a20_0x4d7dbf['yellow'](_0x6938ac));}_0x32ea88[_0x40a936(0xb4)]!==undefined&&_0x32ea88[_0x40a936(0xb4)]!==null&&console['log'](_0x40a936(0xd5)+a20_0x4d7dbf[_0x40a936(0xb5)](String(_0x32ea88[_0x40a936(0xb4)])));if(_0x32ea88[_0x40a936(0xc0)]){const _0x18dd1c=Object[_0x40a936(0xeb)](_0x32ea88[_0x40a936(0xc0)])[_0x40a936(0xaf)](([_0x3f4da4,_0x35a63b])=>_0x3f4da4+'='+JSON[_0x40a936(0xac)](_0x35a63b))[_0x40a936(0x108)](',\x20');console[_0x40a936(0xb6)](_0x40a936(0xdd)+a20_0x4d7dbf[_0x40a936(0xba)](_0x40a936(0xe7)+_0x18dd1c));}}}function a20_0x5367(){const _0x9a7df4=['Type:\x20','connection:settings','789wAMfPN','properties','Show\x20when:\x20','Site:\x20','options','error','entries','hidden','findByName','validate','filter','\x0aConnection:\x20','cyan','✔\x20Found\x20schema\x20for\x20connection\x20\x27','legacy_settings','legacy','enumeration','minimum','Looking\x20up\x20connection:\x20','\x20\x20\x20\x20Options:\x20','hint','Show\x20connection\x20details','maximum','sort','find','✔\x20Found\x20','connection','7779191lRPZkh','settings','max','getOutputSchema','29983275dRuKsi','✔\x20Found\x20settings\x20for\x20connector\x20type:\x20','yellow','Fetching\x20settings\x20for\x20\x27','join','connection:list','Usage:\x20tdx\x20connection\x20settings\x20<type>\x0a\x0aArguments:\x0a\x20\x20<type>\x20\x20\x20\x20Connector\x20type\x20(e.g.,\x20\x27salesforce\x27,\x20\x27rest\x27,\x20\x27s3\x27)\x0a\x0aExamples:\x0a\x20\x20tdx\x20connection\x20settings\x20rest\x0a\x20\x20tdx\x20connection\x20settings\x20salesforce\x0a\x20\x20tdx\x20connection\x20settings\x20s3\x0a\x0aNote:\x20This\x20shows\x20settings\x20for\x20creating/configuring\x20a\x20connection.\x0aFor\x20activation\x20output\x20settings,\x20use\x20\x27tdx\x20connection\x20schema\x20<type>\x27.\x0aUse\x20\x27tdx\x20connection\x20types\x27\x20to\x20list\x20available\x20connector\x20types.','limit','slice','repeat','data','Listing\x20connections...','Fetching\x20connection\x20\x27','3397434VbkrlD','list','Range:\x20','name','398QYaart','No\x20available\x20fields\x20for\x20this\x20connector','title','stringify','Listing\x20connector\x20types...','8xyNlvs','map','4848360zFGgwt','length','record','Show\x20connection-level\x20settings\x20(credentials,\x20authentication)','default_value','blue','log','table','verbose','\x0aConnector:\x20','dim','✔\x20Found\x20connection:\x20','push','\x20[record]','owner','Usage:\x20tdx\x20connection\x20schema\x20<type-or-name>\x0a\x0aArguments:\x0a\x20\x20<type-or-name>\x20\x20\x20\x20Connector\x20type\x20(e.g.,\x20\x27salesforce\x27,\x20\x27pgsql\x27,\x20\x27s3\x27)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20or\x20connection\x20name\x20(e.g.,\x20\x27my-salesforce-connection\x27)\x0a\x0aExamples:\x0a\x20\x20tdx\x20connection\x20schema\x20salesforce\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20By\x20connector\x20type\x0a\x20\x20tdx\x20connection\x20schema\x20my-s3-connection\x20\x20\x20\x20\x20#\x20By\x20connection\x20name\x0a\x20\x20tdx\x20connection\x20schema\x20pgsql\x0a\x0aUse\x20\x27tdx\x20connection\x20types\x27\x20to\x20list\x20available\x20connector\x20types.\x0aUse\x20\x27tdx\x20connection\x20list\x27\x20to\x20list\x20available\x20connections.','criteria','value','execute','description','credential','type','\x0aNo\x20fields\x20defined\x20in\x20schema','resolve','\x0aAvailable\x20fields:','Name:\x20','\x20-\x20','Fetching\x20settings\x20for\x20connector\x20type:\x20','output','Show\x20connector\x20output\x20schema\x20for\x20connector_config\x20validation','label','>=\x20','bold','site','\x20connector\x20type','2071556tGhSUo','\x27...','\x20\x20\x20\x20Default:\x20','green','\x0aCredential\x20settings:','padStart','input','List\x20all\x20result\x20output\x20connections','localeCompare','391153SncPva','\x20\x20\x20\x20','connection:schema','\x27\x20(type:\x20','connection:show','<=\x20','✔\x20Resolved\x20\x27'];a20_0x5367=function(){return _0x9a7df4;};return a20_0x5367();}
1
+ const a20_0x2e903e=a20_0x53b8;(function(_0x475867,_0x23bfd6){const _0x77096a=a20_0x53b8,_0x3ff1fc=_0x475867();while(!![]){try{const _0x619848=-parseInt(_0x77096a(0x184))/0x1*(parseInt(_0x77096a(0x1c3))/0x2)+parseInt(_0x77096a(0x1d8))/0x3*(-parseInt(_0x77096a(0x1c7))/0x4)+-parseInt(_0x77096a(0x1c2))/0x5*(-parseInt(_0x77096a(0x183))/0x6)+parseInt(_0x77096a(0x186))/0x7*(-parseInt(_0x77096a(0x196))/0x8)+parseInt(_0x77096a(0x1ab))/0x9*(parseInt(_0x77096a(0x18a))/0xa)+parseInt(_0x77096a(0x1d5))/0xb+parseInt(_0x77096a(0x1a0))/0xc*(parseInt(_0x77096a(0x190))/0xd);if(_0x619848===_0x23bfd6)break;else _0x3ff1fc['push'](_0x3ff1fc['shift']());}catch(_0x44093c){_0x3ff1fc['push'](_0x3ff1fc['shift']());}}}(a20_0x5059,0x8ff70));import{BaseCommand}from'./command.js';import{handleSDKOutput,handleSingleObjectOutput,isStructuredFormat,writeOutput}from'../utils/command-output.js';import{withSpinner}from'../utils/spinner.js';function a20_0x53b8(_0x17418d,_0x375426){_0x17418d=_0x17418d-0x174;const _0x505919=a20_0x5059();let _0x53b8c5=_0x505919[_0x17418d];return _0x53b8c5;}import{DEFAULT_LISTING_LIMIT,resolveLimit}from'../utils/constants.js';import a20_0x1dcc04 from'chalk';function normalizeSchemaForDisplay(_0x4c9815){const _0x2cd610=a20_0x53b8,_0x28b077=_0x4c9815[_0x2cd610(0x1d7)]||[],_0x403d10=_0x28b077[_0x2cd610(0x1d9)](_0x12c9b1=>_0x12c9b1[_0x2cd610(0x197)]==='legacy_settings'&&_0x12c9b1[_0x2cd610(0x193)]===_0x2cd610(0x1cd)&&_0x12c9b1[_0x2cd610(0x1d7)]);if(_0x403d10?.['properties']){const _0x20dbb1=_0x28b077[_0x2cd610(0x189)](_0x41bc43=>_0x41bc43[_0x2cd610(0x197)]!==_0x2cd610(0x1aa)&&_0x41bc43[_0x2cd610(0x197)]!==_0x2cd610(0x17d));return[..._0x20dbb1,..._0x403d10[_0x2cd610(0x1d7)]];}return _0x28b077[_0x2cd610(0x189)](_0xb72edf=>_0xb72edf[_0x2cd610(0x197)]!==_0x2cd610(0x1aa));}function printSchemaFields(_0x49d35a,_0x9ffede){const _0x2229b3=a20_0x53b8,_0x4e50e9='\x20\x20'[_0x2229b3(0x1d1)](_0x9ffede+0x1),_0x62b4ca='\x20\x20'[_0x2229b3(0x1d1)](_0x9ffede+0x2);for(const _0x368a1c of _0x49d35a){if(!_0x368a1c[_0x2229b3(0x197)])continue;const _0x46d974=_0x368a1c['type']===_0x2229b3(0x1cd)&&_0x368a1c[_0x2229b3(0x1d7)]&&_0x368a1c['properties']['length']>0x0&&_0x368a1c[_0x2229b3(0x197)]!=='legacy_settings';let _0x123722=''+_0x4e50e9+a20_0x1dcc04['green'](_0x368a1c[_0x2229b3(0x197)]);_0x368a1c['title']&&(_0x123722+=':\x20'+_0x368a1c[_0x2229b3(0x177)]);if(_0x368a1c['input'])_0x123722+=a20_0x1dcc04[_0x2229b3(0x1d0)]('\x20['+_0x368a1c[_0x2229b3(0x1b2)]+']');else _0x46d974&&(_0x123722+=a20_0x1dcc04[_0x2229b3(0x1d0)]('\x20[record]'));console[_0x2229b3(0x1b7)](_0x123722);_0x368a1c[_0x2229b3(0x1a8)]&&console[_0x2229b3(0x1b7)](''+_0x62b4ca+a20_0x1dcc04[_0x2229b3(0x1d0)](_0x368a1c[_0x2229b3(0x1a8)]));if(_0x368a1c[_0x2229b3(0x1c9)]){const _0x1dc5ff=_0x368a1c[_0x2229b3(0x1c9)]['map'](_0x114e6=>typeof _0x114e6===_0x2229b3(0x19b)&&_0x2229b3(0x198)in _0x114e6?_0x114e6[_0x2229b3(0x198)]:_0x114e6)[_0x2229b3(0x1d4)](',\x20');console['log'](_0x62b4ca+_0x2229b3(0x18b)+a20_0x1dcc04[_0x2229b3(0x1a2)](_0x1dc5ff));}_0x368a1c[_0x2229b3(0x1af)]!==undefined&&console[_0x2229b3(0x1b7)](_0x62b4ca+'Default:\x20'+a20_0x1dcc04['blue'](String(_0x368a1c[_0x2229b3(0x1af)])));if(_0x368a1c[_0x2229b3(0x1da)]!==undefined||_0x368a1c[_0x2229b3(0x182)]!==undefined){const _0x5d2e0e=_0x368a1c[_0x2229b3(0x1da)]!==undefined&&_0x368a1c[_0x2229b3(0x182)]!==undefined?_0x368a1c[_0x2229b3(0x1da)]+_0x2229b3(0x1dd)+_0x368a1c[_0x2229b3(0x182)]:_0x368a1c[_0x2229b3(0x1da)]!==undefined?_0x2229b3(0x1dc)+_0x368a1c[_0x2229b3(0x1da)]:_0x2229b3(0x1a9)+_0x368a1c[_0x2229b3(0x182)];console['log'](_0x62b4ca+_0x2229b3(0x1b1)+a20_0x1dcc04[_0x2229b3(0x1a6)](_0x5d2e0e));}if(_0x368a1c[_0x2229b3(0x1bb)]){const _0x52635a=Object['entries'](_0x368a1c[_0x2229b3(0x1bb)])[_0x2229b3(0x1db)](([_0x1d0b2c,_0x56fe42])=>_0x1d0b2c+'='+JSON[_0x2229b3(0x17e)](_0x56fe42))[_0x2229b3(0x1d4)](',\x20');console[_0x2229b3(0x1b7)](''+_0x62b4ca+a20_0x1dcc04['dim']('Show\x20when:\x20'+_0x52635a));}_0x46d974&&_0x368a1c[_0x2229b3(0x1d7)]&&printSchemaFields(_0x368a1c[_0x2229b3(0x1d7)],_0x9ffede+0x1);}}export class ConnectionListCommand extends BaseCommand{['name']=a20_0x2e903e(0x179);['description']=a20_0x2e903e(0x1bf);async[a20_0x2e903e(0x19e)](_0x461214){const _0x41de00=a20_0x2e903e,{options:_0x5b6383,tdx:_0x1fc4b6}=_0x461214;_0x5b6383[_0x41de00(0x175)]&&console[_0x41de00(0x19a)]('Site:\x20'+_0x5b6383[_0x41de00(0x188)]);const _0xe6126a=resolveLimit(_0x5b6383[_0x41de00(0x1a3)],DEFAULT_LISTING_LIMIT),_0x3d00a1=await withSpinner(_0x41de00(0x1b9),()=>_0x1fc4b6[_0x41de00(0x1cc)][_0x41de00(0x1ae)](),{'verbose':_0x5b6383[_0x41de00(0x175)]}),_0x1226bb=_0x3d00a1[_0x41de00(0x1a4)];console[_0x41de00(0x19a)](_0x41de00(0x1ca)+_0x1226bb[_0x41de00(0x1c8)]+_0x41de00(0x1b8)+(_0x1226bb[_0x41de00(0x1c8)]!==0x1?'s':''));if(isStructuredFormat(_0x5b6383)){const _0x3dc1ea=_0x1226bb[_0x41de00(0x195)](0x0,_0xe6126a);await handleSDKOutput(_0x3dc1ea,{..._0x5b6383,'limit':_0xe6126a});}else{const _0x5df0c9=_0x1226bb['length']>0x0?Math[_0x41de00(0x18f)](..._0x1226bb[_0x41de00(0x1db)](_0xd9f473=>_0xd9f473[_0x41de00(0x193)][_0x41de00(0x1c8)])):0x0,_0x31c623=[];for(const _0x145e1c of _0x1226bb){const _0x226753=a20_0x1dcc04[_0x41de00(0x1c5)](_0x145e1c[_0x41de00(0x193)][_0x41de00(0x1a5)](_0x5df0c9)),_0x2a8687=_0x145e1c['owner']?.[_0x41de00(0x197)]?_0x41de00(0x1dd)+a20_0x1dcc04[_0x41de00(0x1d0)](_0x145e1c[_0x41de00(0x199)]['name']):'';_0x31c623[_0x41de00(0x1cb)](_0x226753+'\x20\x20'+_0x145e1c[_0x41de00(0x197)]+_0x2a8687);}await writeOutput(_0x31c623[_0x41de00(0x1d4)]('\x0a'),_0x5b6383[_0x41de00(0x1bc)],_0x41de00(0x19d));}return 0x0;}}export class ConnectionShowCommand extends BaseCommand{[a20_0x2e903e(0x197)]=a20_0x2e903e(0x18c);[a20_0x2e903e(0x1a8)]='Show\x20connection\x20details';['validate'](_0x3a4ddb){const _0x4aecbf=a20_0x2e903e,{args:_0xca762e}=_0x3a4ddb;if(!_0xca762e[0x0])return _0x4aecbf(0x192);return undefined;}async[a20_0x2e903e(0x19e)](_0x65fa52){const _0x28b5cf=a20_0x2e903e,{options:_0x347203,args:_0x351d82,tdx:_0x228596}=_0x65fa52,_0x23b675=_0x351d82[0x0];_0x347203[_0x28b5cf(0x175)]&&(console[_0x28b5cf(0x19a)](_0x28b5cf(0x1a1)+_0x347203[_0x28b5cf(0x188)]),console[_0x28b5cf(0x19a)](_0x28b5cf(0x1bd)+_0x23b675));const _0x1511a8=await withSpinner(_0x28b5cf(0x18e)+_0x23b675+_0x28b5cf(0x18d),()=>_0x228596[_0x28b5cf(0x1cc)]['resolve'](_0x23b675),{'verbose':_0x347203['verbose']}),_0x4b0da3=_0x1511a8[_0x28b5cf(0x1a4)];return console['error'](_0x28b5cf(0x1ac)+_0x4b0da3['name']),await handleSingleObjectOutput(_0x4b0da3,_0x347203),0x0;}}function a20_0x5059(){const _0x3fcb0d=['log','\x20connection','Listing\x20connections...','bold','criteria','output','Looking\x20up\x20connection:\x20','\x0aNo\x20fields\x20defined\x20in\x20schema','List\x20all\x20result\x20output\x20connections','Usage:\x20tdx\x20connection\x20settings\x20<type>\x0a\x0aArguments:\x0a\x20\x20<type>\x20\x20\x20\x20Connector\x20type\x20(e.g.,\x20\x27salesforce\x27,\x20\x27rest\x27,\x20\x27s3\x27)\x0a\x0aExamples:\x0a\x20\x20tdx\x20connection\x20settings\x20rest\x0a\x20\x20tdx\x20connection\x20settings\x20salesforce\x0a\x20\x20tdx\x20connection\x20settings\x20s3\x0a\x0aNote:\x20This\x20shows\x20settings\x20for\x20creating/configuring\x20a\x20connection.\x0aFor\x20activation\x20output\x20settings,\x20use\x20\x27tdx\x20connection\x20schema\x20<type>\x27.\x0aUse\x20\x27tdx\x20connection\x20types\x27\x20to\x20list\x20available\x20connector\x20types.','List\x20available\x20connector\x20types','1167770kdxiIm','94PPtBVC','\x27\x20as\x20connection\x20name\x20→\x20type:\x20','cyan','options','12XFQfrU','length','enumeration','✔\x20Found\x20','push','connection','record','green','Fetching\x20settings\x20for\x20\x27','dim','repeat','\x0aConnection:\x20','findByName','join','2317260LexNBU','settings','properties','940341NkHZhP','find','minimum','map','>=\x20','\x20-\x20','sort','getOutputSchema','\x0aConnector:\x20','\x20connector\x20type','verbose','\x0aAvailable\x20fields:','title','getMetadata','connection:list','Fetching\x20schema\x20for\x20\x27','No\x20available\x20fields\x20for\x20this\x20connector','Treating\x20\x27','legacy_settings','stringify','label','Show\x20connector\x20output\x20schema\x20for\x20connector_config\x20validation','hint','maximum','6xybyom','13292oNunxj','Name:\x20','280CrPvot','Type:\x20','site','filter','20590GduuZt','Options:\x20','connection:show','\x27...','Fetching\x20connection\x20\x27','max','12909221oEuOEo','\x20\x20\x20\x20','Usage:\x20tdx\x20connection\x20show\x20<name>\x0a\x0aArguments:\x0a\x20\x20<name>\x20\x20\x20\x20Connection\x20name\x0a\x0aExamples:\x0a\x20\x20tdx\x20connection\x20show\x20my-s3-connection\x0a\x20\x20tdx\x20connection\x20show\x20\x22My\x20Salesforce\x20Connection\x22','type','connection:schema','slice','40160BGLexP','name','value','owner','error','object','validate','table','execute','Fetching\x20settings\x20for\x20connector\x20type:\x20','12NVFdhZ','Site:\x20','yellow','limit','data','padStart','blue','\x0aNo\x20credential\x20settings\x20defined','description','<=\x20','legacy','4014VcfMPX','✔\x20Found\x20connection:\x20','entries','list','default_value','\x27\x20as\x20connector\x20type','Range:\x20','input','Usage:\x20tdx\x20connection\x20schema\x20<type-or-name>\x0a\x0aArguments:\x0a\x20\x20<type-or-name>\x20\x20\x20\x20Connector\x20type\x20(e.g.,\x20\x27salesforce\x27,\x20\x27pgsql\x27,\x20\x27s3\x27)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20or\x20connection\x20name\x20(e.g.,\x20\x27my-salesforce-connection\x27)\x0a\x0aExamples:\x0a\x20\x20tdx\x20connection\x20schema\x20salesforce\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20By\x20connector\x20type\x0a\x20\x20tdx\x20connection\x20schema\x20my-s3-connection\x20\x20\x20\x20\x20#\x20By\x20connection\x20name\x0a\x20\x20tdx\x20connection\x20schema\x20pgsql\x0a\x0aUse\x20\x27tdx\x20connection\x20types\x27\x20to\x20list\x20available\x20connector\x20types.\x0aUse\x20\x27tdx\x20connection\x20list\x27\x20to\x20list\x20available\x20connections.','localeCompare','listTypes','✔\x20Found\x20schema\x20for\x20connector\x20type:\x20'];a20_0x5059=function(){return _0x3fcb0d;};return a20_0x5059();}export class ConnectionSchemaCommand extends BaseCommand{['name']=a20_0x2e903e(0x194);[a20_0x2e903e(0x1a8)]=a20_0x2e903e(0x180);[a20_0x2e903e(0x19c)](_0x28a79e){const _0x4c112b=a20_0x2e903e,{args:_0x4d567a}=_0x28a79e;if(!_0x4d567a[0x0])return _0x4c112b(0x1b3);return undefined;}async[a20_0x2e903e(0x19e)](_0x5d12fa){const _0x7bd8e0=a20_0x2e903e,{options:_0x31a42d,args:_0x5cc349,tdx:_0xa6d3ec}=_0x5d12fa,_0x15978a=_0x5cc349[0x0];_0x31a42d['verbose']&&(console[_0x7bd8e0(0x19a)]('Site:\x20'+_0x31a42d[_0x7bd8e0(0x188)]),console[_0x7bd8e0(0x19a)]('Resolving\x20connector\x20type\x20or\x20name:\x20'+_0x15978a));let _0x3c531d=_0x15978a,_0x46ec40;try{const _0x268dac=await _0xa6d3ec['connection'][_0x7bd8e0(0x1d3)](_0x15978a);_0x268dac&&(_0x3c531d=_0x268dac[_0x7bd8e0(0x193)],_0x46ec40=_0x268dac[_0x7bd8e0(0x197)],_0x31a42d[_0x7bd8e0(0x175)]&&console['error']('✔\x20Resolved\x20\x27'+_0x15978a+_0x7bd8e0(0x1c4)+_0x3c531d));}catch{_0x31a42d['verbose']&&console[_0x7bd8e0(0x19a)](_0x7bd8e0(0x17c)+_0x15978a+_0x7bd8e0(0x1b0));}const _0x5c86b4=await withSpinner(_0x7bd8e0(0x17a)+_0x3c531d+_0x7bd8e0(0x18d),()=>_0xa6d3ec['connection'][_0x7bd8e0(0x1df)](_0x3c531d),{'verbose':_0x31a42d[_0x7bd8e0(0x175)]}),_0x4466f4=_0x5c86b4[_0x7bd8e0(0x1a4)];_0x46ec40?console['error']('✔\x20Found\x20schema\x20for\x20connection\x20\x27'+_0x46ec40+'\x27\x20(type:\x20'+_0x3c531d+')'):console['error'](_0x7bd8e0(0x1b6)+_0x3c531d);if(isStructuredFormat(_0x31a42d))await handleSingleObjectOutput(_0x4466f4,_0x31a42d);else{const _0x23b9e7=normalizeSchemaForDisplay(_0x4466f4);_0x46ec40?(console[_0x7bd8e0(0x1b7)](_0x7bd8e0(0x1d2)+a20_0x1dcc04[_0x7bd8e0(0x1c5)](_0x46ec40)),console[_0x7bd8e0(0x1b7)](_0x7bd8e0(0x187)+a20_0x1dcc04[_0x7bd8e0(0x1d0)](_0x3c531d))):console[_0x7bd8e0(0x1b7)](_0x7bd8e0(0x1e0)+a20_0x1dcc04[_0x7bd8e0(0x1c5)](_0x3c531d)),_0x23b9e7['length']>0x0?(console[_0x7bd8e0(0x1b7)](a20_0x1dcc04[_0x7bd8e0(0x1ba)](_0x7bd8e0(0x176))),printSchemaFields(_0x23b9e7,0x0)):console[_0x7bd8e0(0x1b7)](a20_0x1dcc04[_0x7bd8e0(0x1d0)](_0x7bd8e0(0x1be)));}return 0x0;}}export class ConnectionTypesCommand extends BaseCommand{[a20_0x2e903e(0x197)]='connection:types';[a20_0x2e903e(0x1a8)]=a20_0x2e903e(0x1c1);async[a20_0x2e903e(0x19e)](_0x312228){const _0x34759c=a20_0x2e903e,{options:_0x459944,tdx:_0x335e18}=_0x312228;_0x459944[_0x34759c(0x175)]&&console[_0x34759c(0x19a)](_0x34759c(0x1a1)+_0x459944[_0x34759c(0x188)]);const _0x2ca0b6=await withSpinner('Listing\x20connector\x20types...',()=>_0x335e18['connection'][_0x34759c(0x1b5)](),{'verbose':_0x459944['verbose']}),_0xc0bcae=_0x2ca0b6['data'][_0x34759c(0x1de)]((_0x28983a,_0x30030d)=>_0x28983a[_0x34759c(0x193)][_0x34759c(0x1b4)](_0x30030d['type']));console[_0x34759c(0x19a)](_0x34759c(0x1ca)+_0xc0bcae['length']+_0x34759c(0x174)+(_0xc0bcae[_0x34759c(0x1c8)]!==0x1?'s':''));if(isStructuredFormat(_0x459944))await handleSDKOutput(_0xc0bcae,_0x459944);else{const _0x6b2457=_0xc0bcae[_0x34759c(0x1c8)]>0x0?Math['max'](..._0xc0bcae[_0x34759c(0x1db)](_0x5c6b87=>_0x5c6b87[_0x34759c(0x193)][_0x34759c(0x1c8)])):0x0,_0xe7dfab=[];for(const _0x51a892 of _0xc0bcae){const _0x1d0ef7=a20_0x1dcc04[_0x34759c(0x1c5)](_0x51a892[_0x34759c(0x193)]['padStart'](_0x6b2457));_0xe7dfab[_0x34759c(0x1cb)](_0x1d0ef7+'\x20\x20'+_0x51a892['name']);}await writeOutput(_0xe7dfab[_0x34759c(0x1d4)]('\x0a'),_0x459944[_0x34759c(0x1bc)],_0x34759c(0x19d));}return 0x0;}}export class ConnectionSettingsCommand extends BaseCommand{[a20_0x2e903e(0x197)]='connection:settings';[a20_0x2e903e(0x1a8)]='Show\x20connection-level\x20settings\x20(credentials,\x20authentication)';[a20_0x2e903e(0x19c)](_0x30ffda){const _0x297cfe=a20_0x2e903e,{args:_0x20a9ed}=_0x30ffda;if(!_0x20a9ed[0x0])return _0x297cfe(0x1c0);return undefined;}async['execute'](_0x22c9c1){const _0x283d8e=a20_0x2e903e,{options:_0x3ae7c2,args:_0x599c8d,tdx:_0x45667b}=_0x22c9c1,_0x149af4=_0x599c8d[0x0];_0x3ae7c2[_0x283d8e(0x175)]&&(console[_0x283d8e(0x19a)](_0x283d8e(0x1a1)+_0x3ae7c2[_0x283d8e(0x188)]),console[_0x283d8e(0x19a)](_0x283d8e(0x19f)+_0x149af4));const _0x1c6f56=await withSpinner(_0x283d8e(0x1cf)+_0x149af4+_0x283d8e(0x18d),()=>_0x45667b[_0x283d8e(0x1cc)][_0x283d8e(0x178)](_0x149af4),{'verbose':_0x3ae7c2[_0x283d8e(0x175)]}),_0x18e89a=_0x1c6f56[_0x283d8e(0x1a4)];console['error']('✔\x20Found\x20settings\x20for\x20connector\x20type:\x20'+_0x149af4);if(isStructuredFormat(_0x3ae7c2))await handleSingleObjectOutput(_0x18e89a,_0x3ae7c2);else{console[_0x283d8e(0x1b7)](_0x283d8e(0x1e0)+a20_0x1dcc04[_0x283d8e(0x1c5)](_0x149af4)),console[_0x283d8e(0x1b7)](_0x283d8e(0x185)+_0x18e89a[_0x283d8e(0x197)]);const _0x3235a8=_0x18e89a[_0x283d8e(0x1d6)]||[],_0xed0b7c=_0x3235a8[_0x283d8e(0x189)](_0x3850af=>_0x3850af['credential']);_0xed0b7c[_0x283d8e(0x1c8)]>0x0&&(console[_0x283d8e(0x1b7)](a20_0x1dcc04[_0x283d8e(0x1ba)]('\x0aCredential\x20settings:')),printMetadataSettings(_0xed0b7c));let _0x42c9da=![];try{const _0x136c0c=await _0x45667b[_0x283d8e(0x1cc)][_0x283d8e(0x1df)](_0x149af4),_0x54bee3=normalizeSchemaForDisplay(_0x136c0c);_0x54bee3['length']>0x0&&(console[_0x283d8e(0x1b7)](a20_0x1dcc04[_0x283d8e(0x1ba)](_0x283d8e(0x176))),printSchemaFields(_0x54bee3,0x0),_0x42c9da=!![]);}catch{const _0x4ca751=_0x3235a8[_0x283d8e(0x189)](_0x229e4a=>!_0x229e4a['credential']);_0x4ca751[_0x283d8e(0x1c8)]>0x0&&(console[_0x283d8e(0x1b7)](a20_0x1dcc04[_0x283d8e(0x1ba)](_0x283d8e(0x176))),printMetadataSettings(_0x4ca751),_0x42c9da=!![]);}!_0x42c9da&&_0x3ae7c2[_0x283d8e(0x175)]&&console['error'](a20_0x1dcc04['dim'](_0x283d8e(0x17b))),_0xed0b7c[_0x283d8e(0x1c8)]===0x0&&console['log'](a20_0x1dcc04[_0x283d8e(0x1d0)](_0x283d8e(0x1a7)));}return 0x0;}}function printMetadataSettings(_0x1a53dd){const _0x393214=a20_0x2e903e;for(const _0x176ae0 of _0x1a53dd){if(!_0x176ae0[_0x393214(0x197)])continue;if(_0x176ae0['hidden'])continue;let _0x10f32e='\x20\x20'+a20_0x1dcc04[_0x393214(0x1ce)](_0x176ae0[_0x393214(0x197)]);_0x176ae0[_0x393214(0x17f)]&&(_0x10f32e+=':\x20'+_0x176ae0[_0x393214(0x17f)]);_0x176ae0['type']&&(_0x10f32e+=a20_0x1dcc04[_0x393214(0x1d0)]('\x20['+_0x176ae0['type']+']'));console[_0x393214(0x1b7)](_0x10f32e);_0x176ae0[_0x393214(0x181)]&&console[_0x393214(0x1b7)](_0x393214(0x191)+a20_0x1dcc04[_0x393214(0x1d0)](_0x176ae0[_0x393214(0x181)]));if(_0x176ae0[_0x393214(0x1c6)]){const _0xa8e431=_0x176ae0[_0x393214(0x1c6)][_0x393214(0x1db)](_0x399708=>_0x399708['value'])['join'](',\x20');console[_0x393214(0x1b7)]('\x20\x20\x20\x20Options:\x20'+a20_0x1dcc04[_0x393214(0x1a2)](_0xa8e431));}_0x176ae0[_0x393214(0x1af)]!==undefined&&_0x176ae0['default_value']!==null&&console[_0x393214(0x1b7)]('\x20\x20\x20\x20Default:\x20'+a20_0x1dcc04[_0x393214(0x1a6)](String(_0x176ae0[_0x393214(0x1af)])));if(_0x176ae0[_0x393214(0x1bb)]){const _0x3b84e9=Object[_0x393214(0x1ad)](_0x176ae0[_0x393214(0x1bb)])[_0x393214(0x1db)](([_0x43db7f,_0x2ba7fc])=>_0x43db7f+'='+JSON['stringify'](_0x2ba7fc))[_0x393214(0x1d4)](',\x20');console['log'](_0x393214(0x191)+a20_0x1dcc04['dim']('Show\x20when:\x20'+_0x3b84e9));}}}
@@ -1 +1 @@
1
- const a21_0x224289=a21_0xdea6;(function(_0xf8a161,_0x533e11){const _0x20f9fc=a21_0xdea6,_0x65eff=_0xf8a161();while(!![]){try{const _0x48d8e7=-parseInt(_0x20f9fc(0x15c))/0x1*(-parseInt(_0x20f9fc(0x161))/0x2)+-parseInt(_0x20f9fc(0x154))/0x3*(parseInt(_0x20f9fc(0x169))/0x4)+-parseInt(_0x20f9fc(0x15b))/0x5+-parseInt(_0x20f9fc(0x167))/0x6+parseInt(_0x20f9fc(0x162))/0x7*(-parseInt(_0x20f9fc(0x157))/0x8)+parseInt(_0x20f9fc(0x15f))/0x9+-parseInt(_0x20f9fc(0x159))/0xa*(-parseInt(_0x20f9fc(0x168))/0xb);if(_0x48d8e7===_0x533e11)break;else _0x65eff['push'](_0x65eff['shift']());}catch(_0x276b55){_0x65eff['push'](_0x65eff['shift']());}}}(a21_0x5810,0xe0d5f));function a21_0x5810(){const _0x386470=['execute','10857870APIsbs','28411163rykjmf','868goeuGs','warn','clear','context','Warning:\x20\x27tdx\x20context\x27\x20is\x20deprecated.\x20Use\x20\x27tdx\x20use\x27\x20instead.','displayWithSources','12429ZDyalW','\x20\x20tdx\x20use\x20--clear\x20\x20\x20#\x20Clear\x20session\x20context\x0a','session','256JbCSKQ','message','20TwooWB','debug','3799425arNRyD','312461ZKEiUY','Show\x20current\x20resolved\x20context','Error:\x20','2253492XvDOIr','error','4fFgQsi','361263GNmWCs','yellow','\x20\x20tdx\x20use\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20current\x20context','toString'];a21_0x5810=function(){return _0x386470;};return a21_0x5810();}import{BaseCommand}from'./command.js';import{GlobalContext}from'../core/global-context.js';import{cleanExpiredSessions,clearSessionContext,getCurrentSessionPID}from'../core/session.js';function a21_0xdea6(_0x52e731,_0x584b49){_0x52e731=_0x52e731-0x153;const _0x5810c3=a21_0x5810();let _0xdea612=_0x5810c3[_0x52e731];return _0xdea612;}import a21_0x5f309c from'chalk';export class ContextCommand extends BaseCommand{['name']=a21_0x224289(0x16c);['description']=a21_0x224289(0x15d);async[a21_0x224289(0x166)](_0x3f9b0a){const _0x56435d=a21_0x224289,{options:_0xb82486}=_0x3f9b0a,_0x4e39d6=_0xb82486[_0x56435d(0x15a)],_0x534782=_0xb82486[_0x56435d(0x16b)];console[_0x56435d(0x16a)](a21_0x5f309c[_0x56435d(0x163)](_0x56435d(0x16d))),console[_0x56435d(0x16a)](a21_0x5f309c['yellow'](_0x56435d(0x164))),console[_0x56435d(0x16a)](a21_0x5f309c[_0x56435d(0x163)](_0x56435d(0x155))),cleanExpiredSessions();try{if(_0x534782){clearSessionContext(_0xb82486[_0x56435d(0x156)]);const _0x3479e7=_0xb82486[_0x56435d(0x156)]||getCurrentSessionPID()[_0x56435d(0x165)]();return console['log']('Session\x20context\x20cleared\x20(session:\x20'+_0x3479e7+')'),0x0;}const _0x306671=new GlobalContext(_0xb82486);return _0x4e39d6?_0x306671[_0x56435d(0x153)]():_0x306671['display'](),0x0;}catch(_0x2d181e){return _0x2d181e instanceof Error&&console[_0x56435d(0x160)](_0x56435d(0x15e)+_0x2d181e[_0x56435d(0x158)]),0x1;}}}
1
+ const a21_0x589f82=a21_0x38df;(function(_0x5bef0a,_0x11d3cf){const _0x4997c5=a21_0x38df,_0x4c5164=_0x5bef0a();while(!![]){try{const _0x57c39a=-parseInt(_0x4997c5(0xdf))/0x1*(-parseInt(_0x4997c5(0xd0))/0x2)+parseInt(_0x4997c5(0xcf))/0x3*(-parseInt(_0x4997c5(0xe0))/0x4)+-parseInt(_0x4997c5(0xcd))/0x5+parseInt(_0x4997c5(0xd4))/0x6+-parseInt(_0x4997c5(0xe1))/0x7+parseInt(_0x4997c5(0xd2))/0x8+-parseInt(_0x4997c5(0xd8))/0x9*(-parseInt(_0x4997c5(0xcb))/0xa);if(_0x57c39a===_0x11d3cf)break;else _0x4c5164['push'](_0x4c5164['shift']());}catch(_0x4f0070){_0x4c5164['push'](_0x4c5164['shift']());}}}(a21_0x58d2,0xb7945));import{BaseCommand}from'./command.js';function a21_0x58d2(){const _0x1b1941=['8977932bTPznY','message','Show\x20current\x20resolved\x20context','yellow','2528424pGGDLF','Session\x20context\x20cleared\x20(session:\x20','\x20\x20tdx\x20use\x20--clear\x20\x20\x20#\x20Clear\x20session\x20context\x0a','context','description','warn','clear','525514SINpiE','1940vqIVRu','6973785cOdMWn','toString','display','session','execute','30DnEudK','error','6953080yWLdKd','log','1167BAZMQe','2LWPVWj','\x20\x20tdx\x20use\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20current\x20context','3702664tbKaeN','Error:\x20'];a21_0x58d2=function(){return _0x1b1941;};return a21_0x58d2();}function a21_0x38df(_0x1a72b3,_0x2624b5){_0x1a72b3=_0x1a72b3-0xc8;const _0x58d237=a21_0x58d2();let _0x38df5d=_0x58d237[_0x1a72b3];return _0x38df5d;}import{GlobalContext}from'../core/global-context.js';import{cleanExpiredSessions,clearSessionContext,getCurrentSessionPID}from'../core/session.js';import a21_0x34980c from'chalk';export class ContextCommand extends BaseCommand{['name']=a21_0x589f82(0xdb);[a21_0x589f82(0xdc)]=a21_0x589f82(0xd6);async[a21_0x589f82(0xca)](_0x35e6bd){const _0x1ac32e=a21_0x589f82,{options:_0x5bf33c}=_0x35e6bd,_0x185669=_0x5bf33c['debug'],_0x2d9467=_0x5bf33c[_0x1ac32e(0xde)];console[_0x1ac32e(0xdd)](a21_0x34980c[_0x1ac32e(0xd7)]('Warning:\x20\x27tdx\x20context\x27\x20is\x20deprecated.\x20Use\x20\x27tdx\x20use\x27\x20instead.')),console[_0x1ac32e(0xdd)](a21_0x34980c[_0x1ac32e(0xd7)](_0x1ac32e(0xd1))),console[_0x1ac32e(0xdd)](a21_0x34980c['yellow'](_0x1ac32e(0xda))),cleanExpiredSessions();try{if(_0x2d9467){clearSessionContext(_0x5bf33c[_0x1ac32e(0xc9)]);const _0x110f2a=_0x5bf33c[_0x1ac32e(0xc9)]||getCurrentSessionPID()[_0x1ac32e(0xe2)]();return console[_0x1ac32e(0xce)](_0x1ac32e(0xd9)+_0x110f2a+')'),0x0;}const _0x20ebaf=new GlobalContext(_0x5bf33c);return _0x185669?_0x20ebaf['displayWithSources']():_0x20ebaf[_0x1ac32e(0xc8)](),0x0;}catch(_0x154828){return _0x154828 instanceof Error&&console[_0x1ac32e(0xcc)](_0x1ac32e(0xd3)+_0x154828[_0x1ac32e(0xd5)]),0x1;}}}
@@ -1 +1 @@
1
- const a22_0xc94f2f=a22_0x27e6;(function(_0x34cf39,_0x2b4f15){const _0x57cc05=a22_0x27e6,_0x11dbb4=_0x34cf39();while(!![]){try{const _0x30ff90=-parseInt(_0x57cc05(0x1c4))/0x1*(-parseInt(_0x57cc05(0x1c6))/0x2)+parseInt(_0x57cc05(0x1b6))/0x3+parseInt(_0x57cc05(0x1c5))/0x4*(-parseInt(_0x57cc05(0x1b4))/0x5)+parseInt(_0x57cc05(0x1c3))/0x6*(-parseInt(_0x57cc05(0x1b5))/0x7)+parseInt(_0x57cc05(0x1b1))/0x8+-parseInt(_0x57cc05(0x1ca))/0x9+-parseInt(_0x57cc05(0x1b7))/0xa*(-parseInt(_0x57cc05(0x1b2))/0xb);if(_0x30ff90===_0x2b4f15)break;else _0x11dbb4['push'](_0x11dbb4['shift']());}catch(_0x2a7fcf){_0x11dbb4['push'](_0x11dbb4['shift']());}}}(a22_0x1e1e,0xc7e4e));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';function a22_0x1e1e(){const _0xe2200e=['length','data','12644064kINVbv','2287615xEhxoz','description','5DykGXF','14uIsMhb','4480779WmbuUg','60MADbGZ','limit','List\x20all\x20databases','message','✔\x20Found\x20','Listing\x20databases...','\x20\x20Cause:\x20','query','databases','error','Site:\x20','cause','4828056ZZMRVt','35095fgjtVH','6139276AzcNEr','20GjsxTK','name','Pattern:\x20','Error:\x20','6389136QqQQBo'];a22_0x1e1e=function(){return _0xe2200e;};return a22_0x1e1e();}function a22_0x27e6(_0x3f271a,_0x4ecf34){_0x3f271a=_0x3f271a-0x1b0;const _0x1e1e84=a22_0x1e1e();let _0x27e66f=_0x1e1e84[_0x3f271a];return _0x27e66f;}import{handleSDKOutput}from'../utils/command-output.js';import{withSpinner}from'../utils/spinner.js';import{DEFAULT_LISTING_LIMIT,resolveLimit}from'../utils/constants.js';export class DatabasesCommand extends BaseCommand{[a22_0xc94f2f(0x1c7)]=a22_0xc94f2f(0x1bf);[a22_0xc94f2f(0x1b3)]=a22_0xc94f2f(0x1b9);async['execute'](_0x8ef071){const _0x1e0a94=a22_0xc94f2f,{options:_0x2b3abc,args:_0x4eb47b,tdx:_0x30d31c}=_0x8ef071,_0x11f736=_0x4eb47b[0x0];try{_0x2b3abc['verbose']&&(console[_0x1e0a94(0x1c0)](_0x1e0a94(0x1c1)+_0x2b3abc['site']),_0x11f736&&console[_0x1e0a94(0x1c0)](_0x1e0a94(0x1c8)+_0x11f736));const _0x1181a2=resolveLimit(_0x2b3abc[_0x1e0a94(0x1b8)],DEFAULT_LISTING_LIMIT),_0x19d830=await withSpinner(_0x1e0a94(0x1bc),()=>_0x30d31c[_0x1e0a94(0x1be)]['listDatabases'](_0x11f736,_0x1181a2),{'verbose':_0x2b3abc['verbose']}),_0x5a0723=_0x19d830[_0x1e0a94(0x1b0)];return console['error'](_0x1e0a94(0x1bb)+_0x5a0723[_0x1e0a94(0x1cb)]+'\x20database'+(_0x5a0723[_0x1e0a94(0x1cb)]!==0x1?'s':'')),await handleSDKOutput(_0x5a0723,{..._0x2b3abc,'limit':_0x1181a2}),0x0;}catch(_0x177602){if(_0x177602 instanceof SDKError)return console[_0x1e0a94(0x1c0)](_0x1e0a94(0x1c9)+_0x177602[_0x1e0a94(0x1ba)]),_0x177602[_0x1e0a94(0x1c2)]&&console[_0x1e0a94(0x1c0)](_0x1e0a94(0x1bd)+_0x177602[_0x1e0a94(0x1c2)]),0x1;throw _0x177602;}}}
1
+ const a22_0x168cd8=a22_0x368b;(function(_0x4245ef,_0x5e4450){const _0x375ebe=a22_0x368b,_0x1a08fc=_0x4245ef();while(!![]){try{const _0x45c01f=-parseInt(_0x375ebe(0x16b))/0x1*(-parseInt(_0x375ebe(0x17f))/0x2)+-parseInt(_0x375ebe(0x180))/0x3*(parseInt(_0x375ebe(0x170))/0x4)+-parseInt(_0x375ebe(0x17c))/0x5+parseInt(_0x375ebe(0x17a))/0x6+parseInt(_0x375ebe(0x16f))/0x7*(-parseInt(_0x375ebe(0x173))/0x8)+-parseInt(_0x375ebe(0x169))/0x9*(-parseInt(_0x375ebe(0x17e))/0xa)+parseInt(_0x375ebe(0x17b))/0xb;if(_0x45c01f===_0x5e4450)break;else _0x1a08fc['push'](_0x1a08fc['shift']());}catch(_0xa1bad6){_0x1a08fc['push'](_0x1a08fc['shift']());}}}(a22_0x36f4,0x5545c));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';function a22_0x368b(_0x1dc3b9,_0xa8ba3e){_0x1dc3b9=_0x1dc3b9-0x169;const _0x36f4e2=a22_0x36f4();let _0x368b59=_0x36f4e2[_0x1dc3b9];return _0x368b59;}import{handleSDKOutput}from'../utils/command-output.js';import{withSpinner}from'../utils/spinner.js';import{DEFAULT_LISTING_LIMIT,resolveLimit}from'../utils/constants.js';export class DatabasesCommand extends BaseCommand{[a22_0x168cd8(0x16c)]=a22_0x168cd8(0x172);['description']=a22_0x168cd8(0x17d);async['execute'](_0x294538){const _0x255c98=a22_0x168cd8,{options:_0x3a69ac,args:_0xbaab37,tdx:_0x28f08a}=_0x294538,_0x1a14b6=_0xbaab37[0x0];try{_0x3a69ac['verbose']&&(console[_0x255c98(0x178)](_0x255c98(0x171)+_0x3a69ac['site']),_0x1a14b6&&console[_0x255c98(0x178)]('Pattern:\x20'+_0x1a14b6));const _0x41bf3b=resolveLimit(_0x3a69ac[_0x255c98(0x177)],DEFAULT_LISTING_LIMIT),_0x57a575=await withSpinner(_0x255c98(0x176),()=>_0x28f08a['query'][_0x255c98(0x16a)](_0x1a14b6,_0x41bf3b),{'verbose':_0x3a69ac[_0x255c98(0x174)]}),_0x403802=_0x57a575['data'];return console[_0x255c98(0x178)](_0x255c98(0x16e)+_0x403802['length']+'\x20database'+(_0x403802['length']!==0x1?'s':'')),await handleSDKOutput(_0x403802,{..._0x3a69ac,'limit':_0x41bf3b}),0x0;}catch(_0x3800e8){if(_0x3800e8 instanceof SDKError)return console[_0x255c98(0x178)](_0x255c98(0x179)+_0x3800e8['message']),_0x3800e8[_0x255c98(0x16d)]&&console[_0x255c98(0x178)](_0x255c98(0x175)+_0x3800e8[_0x255c98(0x16d)]),0x1;throw _0x3800e8;}}}function a22_0x36f4(){const _0x3ba871=['5654277WUpocp','listDatabases','249cjlZCQ','name','cause','✔\x20Found\x20','199878jazlpu','16LBaeZH','Site:\x20','databases','152PnBlby','verbose','\x20\x20Cause:\x20','Listing\x20databases...','limit','error','Error:\x20','2866020xWWZMc','34628MAXbWu','1184060YGniUq','List\x20all\x20databases','10WlHxmx','2158TTozUH','186846yHUxje'];a22_0x36f4=function(){return _0x3ba871;};return a22_0x36f4();}
@@ -1 +1 @@
1
- function a23_0x3366(_0x4af678,_0x3eadb9){_0x4af678=_0x4af678-0x15e;const _0xbf04de=a23_0xbf04();let _0x3366ee=_0xbf04de[_0x4af678];return _0x3366ee;}const a23_0x5a6b88=a23_0x3366;(function(_0xa2bf82,_0x47cd8e){const _0x2a3f2f=a23_0x3366,_0x1b8632=_0xa2bf82();while(!![]){try{const _0x1af110=-parseInt(_0x2a3f2f(0x186))/0x1*(parseInt(_0x2a3f2f(0x16b))/0x2)+-parseInt(_0x2a3f2f(0x178))/0x3+parseInt(_0x2a3f2f(0x182))/0x4*(parseInt(_0x2a3f2f(0x165))/0x5)+parseInt(_0x2a3f2f(0x164))/0x6*(-parseInt(_0x2a3f2f(0x180))/0x7)+parseInt(_0x2a3f2f(0x181))/0x8*(parseInt(_0x2a3f2f(0x173))/0x9)+parseInt(_0x2a3f2f(0x17b))/0xa*(-parseInt(_0x2a3f2f(0x160))/0xb)+parseInt(_0x2a3f2f(0x16d))/0xc;if(_0x1af110===_0x47cd8e)break;else _0x1b8632['push'](_0x1b8632['shift']());}catch(_0x18f2b8){_0x1b8632['push'](_0x1b8632['shift']());}}}(a23_0xbf04,0xbfa35));import{BaseCommand}from'./command.js';function a23_0xbf04(){const _0x3bb7e2=['\x20column','\x20\x20Cause:\x20','args','length','2620407vgjhye','validate','cause','370RsQcTd','execute','Error:\x20','message','database','7kczHnb','5968kSOrZf','90996AsZTqh','describeTable','✖\x20Table\x20not\x20found','\x27\x20does\x20not\x20exist','558xezscf','Table\x20\x27','name','297858HQLmOx','query','Describe\x20table\x20schema','data','9283236cSrmDB','195vdsYGF','verbose','Usage:\x20tdx\x20describe\x20<database.table>\x0a\x20\x20\x20or:\x20tdx\x20describe\x20<table>\x20--database\x20<database>\x0a\x20\x20\x20or:\x20tdx\x20describe\x20<table>\x20--in\x20<database>\x0a\x0aRun\x20\x27tdx\x20describe\x20--help\x27\x20for\x20more\x20options','error','site','describe','3882NNLadC','Database:\x20','52563012REqirv','Describing\x20table\x20','...','\x20in\x20','✔\x20Found\x20','Table:\x20','279iMQkDJ'];a23_0xbf04=function(){return _0x3bb7e2;};return a23_0xbf04();}import{SDKError}from'../sdk/index.js';import{handleSDKOutput}from'../utils/command-output.js';import{parseTableReference,validateTableDescribeReference}from'../utils/table-ref-parser.js';import{withSpinner}from'../utils/spinner.js';export class DescribeCommand extends BaseCommand{[a23_0x5a6b88(0x15f)]=a23_0x5a6b88(0x16a);['description']=a23_0x5a6b88(0x162);async[a23_0x5a6b88(0x17c)](_0x399d7b){const _0x2d280b=a23_0x5a6b88;return this[_0x2d280b(0x183)](_0x399d7b);}async[a23_0x5a6b88(0x183)](_0x2d6783){const _0x18c6bb=a23_0x5a6b88,{options:_0x4f26de,args:_0x4f7caf,tdx:_0x4f801f}=_0x2d6783;let _0x427de4;try{_0x427de4=parseTableReference(_0x4f7caf[0x0]);const _0x304c85=_0x4f26de[_0x18c6bb(0x17f)];!_0x427de4[_0x18c6bb(0x17f)]&&_0x304c85&&(_0x427de4[_0x18c6bb(0x17f)]=_0x304c85);const _0x2cfe72=validateTableDescribeReference(_0x427de4);if(_0x2cfe72)return console[_0x18c6bb(0x168)](_0x18c6bb(0x17d)+_0x2cfe72),0x1;}catch(_0x3f5c14){return console['error']('Error:\x20'+_0x3f5c14[_0x18c6bb(0x17e)]),0x1;}const _0x300880=_0x427de4[_0x18c6bb(0x17f)],_0x4cdf45=_0x427de4['table'];try{_0x4f26de[_0x18c6bb(0x166)]&&(console[_0x18c6bb(0x168)]('Site:\x20'+_0x4f26de[_0x18c6bb(0x169)]),console['error'](_0x18c6bb(0x16c)+_0x300880),console[_0x18c6bb(0x168)](_0x18c6bb(0x172)+_0x4cdf45));const _0x442a93=await withSpinner(_0x18c6bb(0x16e)+_0x300880+'.'+_0x4cdf45+_0x18c6bb(0x16f),()=>_0x4f801f[_0x18c6bb(0x161)][_0x18c6bb(0x183)](_0x300880,_0x4cdf45),{'verbose':_0x4f26de['verbose']}),_0x4c0ea0=_0x442a93[_0x18c6bb(0x163)];if(_0x4c0ea0[_0x18c6bb(0x177)]===0x0)return console[_0x18c6bb(0x168)](_0x18c6bb(0x184)),console['error'](_0x18c6bb(0x15e)+_0x300880+'.'+_0x4cdf45+_0x18c6bb(0x185)),0x1;return console[_0x18c6bb(0x168)](_0x18c6bb(0x171)+_0x4c0ea0[_0x18c6bb(0x177)]+_0x18c6bb(0x174)+(_0x4c0ea0['length']!==0x1?'s':'')+_0x18c6bb(0x170)+_0x300880+'.'+_0x4cdf45),await handleSDKOutput(_0x4c0ea0,_0x4f26de),0x0;}catch(_0x10ee86){if(_0x10ee86 instanceof SDKError)return console[_0x18c6bb(0x168)](_0x18c6bb(0x17d)+_0x10ee86[_0x18c6bb(0x17e)]),_0x10ee86[_0x18c6bb(0x17a)]&&console['error'](_0x18c6bb(0x175)+_0x10ee86[_0x18c6bb(0x17a)]),0x1;throw _0x10ee86;}}[a23_0x5a6b88(0x179)](_0x240a28){const _0x5c2371=a23_0x5a6b88;if(_0x240a28[_0x5c2371(0x176)][_0x5c2371(0x177)]===0x0)return _0x5c2371(0x167);if(_0x240a28[_0x5c2371(0x176)][_0x5c2371(0x177)]>0x1)return'Too\x20many\x20arguments\x0aUsage:\x20tdx\x20describe\x20<database.table>\x0a\x20\x20\x20or:\x20tdx\x20describe\x20<table>\x20--database\x20<database>\x0a\x0aRun\x20\x27tdx\x20describe\x20--help\x27\x20for\x20more\x20options';return undefined;}}
1
+ const a23_0x11f4f4=a23_0x4939;(function(_0x3bc9bf,_0x670471){const _0x4d85cb=a23_0x4939,_0xfc9c09=_0x3bc9bf();while(!![]){try{const _0x26f4e6=parseInt(_0x4d85cb(0x14a))/0x1*(parseInt(_0x4d85cb(0x151))/0x2)+-parseInt(_0x4d85cb(0x154))/0x3*(parseInt(_0x4d85cb(0x132))/0x4)+-parseInt(_0x4d85cb(0x135))/0x5+-parseInt(_0x4d85cb(0x153))/0x6*(parseInt(_0x4d85cb(0x134))/0x7)+parseInt(_0x4d85cb(0x131))/0x8*(parseInt(_0x4d85cb(0x152))/0x9)+-parseInt(_0x4d85cb(0x12f))/0xa+parseInt(_0x4d85cb(0x13f))/0xb*(parseInt(_0x4d85cb(0x14d))/0xc);if(_0x26f4e6===_0x670471)break;else _0xfc9c09['push'](_0xfc9c09['shift']());}catch(_0x48bc93){_0xfc9c09['push'](_0xfc9c09['shift']());}}}(a23_0x58f1,0xb95f4));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleSDKOutput}from'../utils/command-output.js';function a23_0x4939(_0x4976f4,_0x1f1a22){_0x4976f4=_0x4976f4-0x12a;const _0x58f18d=a23_0x58f1();let _0x49396b=_0x58f18d[_0x4976f4];return _0x49396b;}import{parseTableReference,validateTableDescribeReference}from'../utils/table-ref-parser.js';import{withSpinner}from'../utils/spinner.js';function a23_0x58f1(){const _0x31a13d=['✔\x20Found\x20','site','...','describeTable','Site:\x20','database','args','\x27\x20does\x20not\x20exist','validate','31slgLGJ','error','Table:\x20','12GhwfQI','Usage:\x20tdx\x20describe\x20<database.table>\x0a\x20\x20\x20or:\x20tdx\x20describe\x20<table>\x20--database\x20<database>\x0a\x20\x20\x20or:\x20tdx\x20describe\x20<table>\x20--in\x20<database>\x0a\x0aRun\x20\x27tdx\x20describe\x20--help\x27\x20for\x20more\x20options','Error:\x20','\x20\x20Cause:\x20','16774bxQbmT','45YdEujb','33900zcUflW','189fZpugf','✖\x20Table\x20not\x20found','cause','\x20in\x20','Describing\x20table\x20','name','describe','14660020Kqnffy','Table\x20\x27','2088232ZEDVHK','91964Sqwlgt','query','70EQjToU','3441010lzmXAE','Too\x20many\x20arguments\x0aUsage:\x20tdx\x20describe\x20<database.table>\x0a\x20\x20\x20or:\x20tdx\x20describe\x20<table>\x20--database\x20<database>\x0a\x0aRun\x20\x27tdx\x20describe\x20--help\x27\x20for\x20more\x20options','data','Database:\x20','table','\x20column','message','length','execute','verbose','31386069hOrmqD','Describe\x20table\x20schema'];a23_0x58f1=function(){return _0x31a13d;};return a23_0x58f1();}export class DescribeCommand extends BaseCommand{[a23_0x11f4f4(0x12d)]=a23_0x11f4f4(0x12e);['description']=a23_0x11f4f4(0x140);async[a23_0x11f4f4(0x13d)](_0x465ba9){return this['describeTable'](_0x465ba9);}async[a23_0x11f4f4(0x144)](_0x43c867){const _0x15d6f3=a23_0x11f4f4,{options:_0x3d6ee9,args:_0x3d2e94,tdx:_0x2e910f}=_0x43c867;let _0x3dfafd;try{_0x3dfafd=parseTableReference(_0x3d2e94[0x0]);const _0x2ec348=_0x3d6ee9[_0x15d6f3(0x146)];!_0x3dfafd[_0x15d6f3(0x146)]&&_0x2ec348&&(_0x3dfafd['database']=_0x2ec348);const _0x34b59c=validateTableDescribeReference(_0x3dfafd);if(_0x34b59c)return console[_0x15d6f3(0x14b)]('Error:\x20'+_0x34b59c),0x1;}catch(_0x54bd72){return console['error'](_0x15d6f3(0x14f)+_0x54bd72[_0x15d6f3(0x13b)]),0x1;}const _0x1aeccd=_0x3dfafd['database'],_0x150e35=_0x3dfafd[_0x15d6f3(0x139)];try{_0x3d6ee9[_0x15d6f3(0x13e)]&&(console[_0x15d6f3(0x14b)](_0x15d6f3(0x145)+_0x3d6ee9[_0x15d6f3(0x142)]),console['error'](_0x15d6f3(0x138)+_0x1aeccd),console[_0x15d6f3(0x14b)](_0x15d6f3(0x14c)+_0x150e35));const _0x103be1=await withSpinner(_0x15d6f3(0x12c)+_0x1aeccd+'.'+_0x150e35+_0x15d6f3(0x143),()=>_0x2e910f[_0x15d6f3(0x133)][_0x15d6f3(0x144)](_0x1aeccd,_0x150e35),{'verbose':_0x3d6ee9['verbose']}),_0x3f9539=_0x103be1[_0x15d6f3(0x137)];if(_0x3f9539[_0x15d6f3(0x13c)]===0x0)return console[_0x15d6f3(0x14b)](_0x15d6f3(0x155)),console[_0x15d6f3(0x14b)](_0x15d6f3(0x130)+_0x1aeccd+'.'+_0x150e35+_0x15d6f3(0x148)),0x1;return console['error'](_0x15d6f3(0x141)+_0x3f9539['length']+_0x15d6f3(0x13a)+(_0x3f9539[_0x15d6f3(0x13c)]!==0x1?'s':'')+_0x15d6f3(0x12b)+_0x1aeccd+'.'+_0x150e35),await handleSDKOutput(_0x3f9539,_0x3d6ee9),0x0;}catch(_0xed3e41){if(_0xed3e41 instanceof SDKError)return console[_0x15d6f3(0x14b)](_0x15d6f3(0x14f)+_0xed3e41['message']),_0xed3e41[_0x15d6f3(0x12a)]&&console[_0x15d6f3(0x14b)](_0x15d6f3(0x150)+_0xed3e41['cause']),0x1;throw _0xed3e41;}}[a23_0x11f4f4(0x149)](_0x2072c3){const _0x162f1b=a23_0x11f4f4;if(_0x2072c3[_0x162f1b(0x147)]['length']===0x0)return _0x162f1b(0x14e);if(_0x2072c3[_0x162f1b(0x147)][_0x162f1b(0x13c)]>0x1)return _0x162f1b(0x136);return undefined;}}
@@ -1 +1 @@
1
- const a24_0x3481df=a24_0x114c;(function(_0x150954,_0x2f746b){const _0x39052e=a24_0x114c,_0x3cb7ac=_0x150954();while(!![]){try{const _0x358784=-parseInt(_0x39052e(0x20d))/0x1+-parseInt(_0x39052e(0x1d7))/0x2*(parseInt(_0x39052e(0x1bb))/0x3)+parseInt(_0x39052e(0x216))/0x4*(parseInt(_0x39052e(0x215))/0x5)+-parseInt(_0x39052e(0x1f1))/0x6*(parseInt(_0x39052e(0x21e))/0x7)+-parseInt(_0x39052e(0x1d9))/0x8*(-parseInt(_0x39052e(0x1df))/0x9)+-parseInt(_0x39052e(0x202))/0xa*(-parseInt(_0x39052e(0x192))/0xb)+parseInt(_0x39052e(0x20a))/0xc;if(_0x358784===_0x2f746b)break;else _0x3cb7ac['push'](_0x3cb7ac['shift']());}catch(_0x2c1c94){_0x3cb7ac['push'](_0x3cb7ac['shift']());}}}(a24_0x5267,0xc3155));import{BaseCommand}from'./command.js';import{handleSDKOutput}from'../utils/command-output.js';import{withSpinner}from'../utils/spinner.js';import{matchGlobPattern}from'../utils/string-utils.js';function a24_0x5267(){const _0x43bf61=['Usage:\x20tdx\x20engage\x20workspace\x20delete\x20<name-or-id>','215170GlpRMC','subject','Usage:\x20tdx\x20engage\x20campaign\x20resume\x20<name-or-id>','emailSenderId','engage:campaign:resume','resolvePathToResource','updateCampaign','Create\x20an\x20email\x20template','35331504JiRuQK','Show\x20workspace\x20details','updateTemplate','1581973sEepRh','startAt','Usage:\x20tdx\x20engage\x20workspace\x20create\x20--name\x20<name>\x20[--description\x20<desc>]','session','engage:template:update','engage:workspace:use','Usage:\x20tdx\x20engage\x20template\x20update\x20<name-or-id>\x20[--name\x20<new-name>]\x20...','engage:campaigns','15aZnXCv','1243604GctzgQ','Use\x20--workspace\x20<name>\x20or\x20set\x20with\x20\x22tdx\x20use\x20engage_workspace\x20<name>\x22','engage:workspace:create','Duplicate\x20a\x20campaign','Usage:\x20tdx\x20engage\x20workspace\x20show\x20<name-or-id>','engage:template:show','MISSING_ARGUMENT','plaintext','77qgCBaW','Delete\x20a\x20workspace','Options:\x20--name,\x20--description,\x20--segment,\x20--email-sender-id,\x20--json-columns,\x20--start-at,\x20--timezone','listWorkspaces','\x27...','engage:workspaces','55LkiGGx','entries','Error:\x20--name\x20is\x20required','engage:workspace:update','resumeCampaign','duplicateCampaign','engage:workspace:show','Error:\x20--html\x20is\x20required','Engage\x20workspace\x20set\x20to:\x20','engage_workspace','Error:\x20Workspace\x20name\x20is\x20required','\x0aTip:\x20Use\x20\x27tdx\x20context\x20--clear\x27\x20to\x20clear\x20session\x20overrides','Fetching\x20campaigns...','filter','Usage:\x20tdx\x20engage\x20campaign\x20create\x20--name\x20<name>\x20--type\x20<email|push>','Pausing\x20campaign\x20\x27','Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20campaign\x20\x27','Usage:\x20tdx\x20engage\x20template\x20show\x20<name-or-id>','\x27\x20deleted\x20successfully','Show\x20email\x20template\x20details','Updating\x20campaign\x20\x27','Template\x20\x27','createCampaign','Usage:\x20tdx\x20engage\x20campaign\x20launch\x20<name-or-id>','getWorkspace','Launch\x20a\x20campaign','Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20workspace\x20\x27','Usage:\x20tdx\x20engage\x20campaign\x20pause\x20<name-or-id>','Delete\x20an\x20email\x20template','html','Fetching\x20template\x20\x27','fromEntries','engage:template:delete','Creating\x20workspace\x20\x27','yes','Launching\x20campaign\x20\x27','Error:\x20Campaign\x20name\x20or\x20ID\x20is\x20required','engage:campaign:update','engage:template:create','resolveWorkspaceId','limit','357fJcapF','type','engage:campaign:duplicate','timezone','listTemplates','Error:\x20Workspace\x20name\x20or\x20ID\x20is\x20required','Resuming\x20campaign\x20\x27','Deleting\x20template\x20\x27','Show\x20campaign\x20details','editorType','parentName','engage:campaign:create','List\x20workspaces','Update\x20a\x20campaign','Error:\x20At\x20least\x20one\x20field\x20to\x20update\x20is\x20required','Campaign\x20\x27','full','Usage:\x20tdx\x20engage\x20workspace\x20update\x20<name-or-id>\x20[--name\x20<new-name>]\x20...','Workspace\x20is\x20required\x20for\x20this\x20operation','deleteTemplate','createWorkspace','description','Fetching\x20campaign\x20\x27','Usage:\x20tdx\x20engage\x20workspace\x20use\x20<name>','getTemplate','Creating\x20template\x20\x27','name','Create\x20a\x20new\x20campaign','20406fxqMvg','Fetching\x20workspaces...','405736GtfUba','Duplicating\x20campaign\x20\x27','verbose','updateWorkspace','\x27?\x20This\x20cannot\x20be\x20undone.','deleteWorkspace','198jfFVey','keys','status','engage:campaign:delete','engage:workspace:delete','Usage:\x20tdx\x20engage\x20template\x20delete\x20<name-or-id>','length','deleteCampaign','Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20template\x20\x27','\x27\x20resumed\x20successfully','Updating\x20workspace\x20\x27','listCampaigns','engage:templates','Usage:\x20tdx\x20engage\x20campaign\x20show\x20<name-or-id>','Fetching\x20templates...','segmentId','execute','error','820998gjzFjK','Options:\x20--name,\x20--description','segmentName','getCampaign','engage','Usage:\x20tdx\x20engage\x20template\x20create\x20--name\x20<name>\x20--subject\x20<subject>\x20--html\x20<html>','jsonColumns','Updating\x20template\x20\x27','Fetching\x20workspace\x20\x27','Error:\x20Template\x20name\x20or\x20ID\x20is\x20required','parentId','Usage:\x20tdx\x20engage\x20campaign\x20duplicate\x20<name-or-id>','log','data','Operation\x20cancelled','Deleting\x20campaign\x20\x27'];a24_0x5267=function(){return _0x43bf61;};return a24_0x5267();}import{confirm}from'../utils/prompt.js';import{loadSessionContext,saveSessionContext}from'../core/session.js';import{DEFAULT_LLM_LIMIT,resolveLimit}from'../utils/constants.js';import{SDKError,ErrorCode}from'../sdk/errors.js';async function resolveWorkspaceIdFromOptions(_0x32597c,_0x38da37,_0x3e5d29=![]){const _0x2246c1=a24_0x114c;if(_0x32597c['workspace'])return await _0x38da37['engage'][_0x2246c1(0x1b9)](_0x32597c['workspace']);const _0x55cda6=loadSessionContext(_0x32597c['session']);if(_0x55cda6?.[_0x2246c1(0x19b)])return await _0x38da37['engage'][_0x2246c1(0x1b9)](_0x55cda6[_0x2246c1(0x19b)]);if(_0x3e5d29)throw new SDKError(ErrorCode[_0x2246c1(0x21c)],_0x2246c1(0x1cd),undefined,{'helpText':_0x2246c1(0x217)});return undefined;}async function resolveSegmentFromOptions(_0xea13d9,_0x2e12e0){const _0x348c1a=a24_0x114c;if(!_0xea13d9['segment'])return{};const _0x587e12=_0xea13d9['segment'],_0x6eaf2=await _0x2e12e0['segment'][_0x348c1a(0x207)](_0x587e12);return{'audienceId':_0x6eaf2[_0x348c1a(0x1fb)],'audienceName':_0x6eaf2[_0x348c1a(0x1c5)],..._0x6eaf2['segmentId']&&{'segmentId':_0x6eaf2[_0x348c1a(0x1ee)],'segmentName':_0x6eaf2[_0x348c1a(0x1f3)]}};}function buildConnectorConfig(_0x529190){const _0x41c6a3=a24_0x114c,_0x2df141=_0x529190[_0x41c6a3(0x205)],_0x479529=_0x529190[_0x41c6a3(0x1f7)];if(!_0x2df141&&!_0x479529)return undefined;return{..._0x2df141&&{'emailSenderId':_0x2df141},..._0x479529&&{'jsonColumns':_0x479529}};}export class EngageCampaignsCommand extends BaseCommand{[a24_0x3481df(0x1d5)]=a24_0x3481df(0x214);['description']='List\x20campaigns';async[a24_0x3481df(0x1ef)](_0x938644){const _0xfa2d92=a24_0x3481df,{options:_0x14cefe,args:_0x4d8963,tdx:_0x3fdd11}=_0x938644,_0x314ea1=_0x4d8963[0x0],_0x395ba4=resolveLimit(_0x14cefe[_0xfa2d92(0x1ba)],DEFAULT_LLM_LIMIT),_0x11c789=_0x14cefe,_0x51ff8d=_0x11c789[_0xfa2d92(0x1bc)],_0x3ade46=_0x11c789[_0xfa2d92(0x1e1)],_0x50af3e=await resolveWorkspaceIdFromOptions(_0x11c789,_0x3fdd11),_0x524d98=await withSpinner(_0xfa2d92(0x19e),()=>_0x3fdd11[_0xfa2d92(0x1f5)][_0xfa2d92(0x1ea)]({'type':_0x51ff8d,'status':_0x3ade46,'workspaceId':_0x50af3e,'limit':_0x395ba4}),{'verbose':_0x14cefe['verbose']});let _0x3cb548=_0x524d98[_0xfa2d92(0x1fe)];return _0x314ea1&&(_0x3cb548=_0x524d98[_0xfa2d92(0x1fe)][_0xfa2d92(0x19f)](_0x1c5f35=>matchGlobPattern(_0x1c5f35[_0xfa2d92(0x1d5)],_0x314ea1))),await handleSDKOutput(_0x3cb548,_0x14cefe),0x0;}}export class EngageCampaignShowCommand extends BaseCommand{[a24_0x3481df(0x1d5)]='engage:campaign:show';[a24_0x3481df(0x1d0)]=a24_0x3481df(0x1c3);async['execute'](_0x5e9e34){const _0x2d719e=a24_0x3481df,{options:_0x4c0624,args:_0x102948,tdx:_0x4abbc6}=_0x5e9e34;if(_0x102948[_0x2d719e(0x1e5)]===0x0)return console[_0x2d719e(0x1f0)](_0x2d719e(0x1b6)),console[_0x2d719e(0x1f0)](_0x2d719e(0x1ec)),0x1;const _0x4dd9f8=_0x102948[0x0],_0x8e9ac3=_0x4c0624,_0x494907=await resolveWorkspaceIdFromOptions(_0x8e9ac3,_0x4abbc6),_0x362836=_0x8e9ac3[_0x2d719e(0x1cb)];if(_0x362836){const _0x2b6d0d=await withSpinner(_0x2d719e(0x1d1)+_0x4dd9f8+_0x2d719e(0x190),()=>_0x4abbc6[_0x2d719e(0x1f5)]['getCampaignFull'](_0x4dd9f8,_0x494907),{'verbose':_0x4c0624[_0x2d719e(0x1db)]});await handleSDKOutput([_0x2b6d0d],_0x4c0624);}else{const _0x23819b=await withSpinner(_0x2d719e(0x1d1)+_0x4dd9f8+'\x27...',()=>_0x4abbc6['engage'][_0x2d719e(0x1f4)](_0x4dd9f8,_0x494907),{'verbose':_0x4c0624['verbose']});await handleSDKOutput([_0x23819b],_0x4c0624);}return 0x0;}}export class EngageCampaignCreateCommand extends BaseCommand{[a24_0x3481df(0x1d5)]=a24_0x3481df(0x1c6);[a24_0x3481df(0x1d0)]=a24_0x3481df(0x1d6);async[a24_0x3481df(0x1ef)](_0x2c779d){const _0x172191=a24_0x3481df,{options:_0x48995c,tdx:_0x4348f6}=_0x2c779d,_0x41c516=_0x48995c,_0x3beccc=_0x41c516[_0x172191(0x1d5)],_0x42c40b=_0x41c516[_0x172191(0x1bc)];if(!_0x3beccc)return console[_0x172191(0x1f0)](_0x172191(0x194)),console['error']('Usage:\x20tdx\x20engage\x20campaign\x20create\x20--name\x20<name>\x20--type\x20<email|push>'),0x1;if(!_0x42c40b)return console[_0x172191(0x1f0)]('Error:\x20--type\x20is\x20required\x20(email\x20or\x20push)'),console[_0x172191(0x1f0)](_0x172191(0x1a0)),0x1;const _0x416c20=await resolveWorkspaceIdFromOptions(_0x41c516,_0x4348f6,!![]),_0x16935b=await resolveSegmentFromOptions(_0x41c516,_0x4348f6),_0x22798e=buildConnectorConfig(_0x41c516),_0x5bcdc3={'name':_0x3beccc,'campaignType':_0x42c40b,'workspaceId':_0x416c20,'description':_0x41c516[_0x172191(0x1d0)],..._0x16935b,'connectorConfig':_0x22798e,'startAt':_0x41c516[_0x172191(0x20e)],'timezone':_0x41c516[_0x172191(0x1be)]},_0x50a8d6=await withSpinner('Creating\x20campaign\x20\x27'+_0x3beccc+_0x172191(0x190),()=>_0x4348f6['engage'][_0x172191(0x1a8)](_0x5bcdc3));return await handleSDKOutput([_0x50a8d6[_0x172191(0x1fe)]],_0x48995c),0x0;}}export class EngageCampaignUpdateCommand extends BaseCommand{[a24_0x3481df(0x1d5)]=a24_0x3481df(0x1b7);[a24_0x3481df(0x1d0)]=a24_0x3481df(0x1c8);async['execute'](_0x817f96){const _0x3f7c89=a24_0x3481df,{options:_0x4d70ad,args:_0x61b29b,tdx:_0xbf3378}=_0x817f96;if(_0x61b29b['length']===0x0)return console[_0x3f7c89(0x1f0)](_0x3f7c89(0x1b6)),console[_0x3f7c89(0x1f0)]('Usage:\x20tdx\x20engage\x20campaign\x20update\x20<name-or-id>\x20[--name\x20<new-name>]\x20...'),0x1;const _0x1a7172=_0x61b29b[0x0],_0x26695c=_0x4d70ad,_0x470a0d=await resolveWorkspaceIdFromOptions(_0x26695c,_0xbf3378),_0x2ee502=await resolveSegmentFromOptions(_0x26695c,_0xbf3378),_0x35cfea=buildConnectorConfig(_0x26695c),_0xf2de54={'name':_0x26695c[_0x3f7c89(0x1d5)],'description':_0x26695c['description'],..._0x2ee502,'connectorConfig':_0x35cfea,'startAt':_0x26695c[_0x3f7c89(0x20e)],'timezone':_0x26695c[_0x3f7c89(0x1be)]},_0x9333e0=Object[_0x3f7c89(0x1b1)](Object[_0x3f7c89(0x193)](_0xf2de54)[_0x3f7c89(0x19f)](([,_0x482657])=>_0x482657!==undefined));if(Object[_0x3f7c89(0x1e0)](_0x9333e0)[_0x3f7c89(0x1e5)]===0x0)return console['error']('Error:\x20At\x20least\x20one\x20field\x20to\x20update\x20is\x20required'),console[_0x3f7c89(0x1f0)](_0x3f7c89(0x18e)),0x1;const _0x1edb96=await withSpinner(_0x3f7c89(0x1a6)+_0x1a7172+'\x27...',()=>_0xbf3378[_0x3f7c89(0x1f5)][_0x3f7c89(0x208)](_0x1a7172,_0x9333e0,_0x470a0d),{'verbose':_0x4d70ad[_0x3f7c89(0x1db)]});return await handleSDKOutput([_0x1edb96[_0x3f7c89(0x1fe)]],_0x4d70ad),0x0;}}export class EngageCampaignDeleteCommand extends BaseCommand{['name']=a24_0x3481df(0x1e2);[a24_0x3481df(0x1d0)]='Delete\x20a\x20campaign';async[a24_0x3481df(0x1ef)](_0x384b13){const _0x3e5e5a=a24_0x3481df,{options:_0x2c89ab,args:_0x1f7488,tdx:_0x24ac6c}=_0x384b13;if(_0x1f7488[_0x3e5e5a(0x1e5)]===0x0)return console[_0x3e5e5a(0x1f0)](_0x3e5e5a(0x1b6)),console[_0x3e5e5a(0x1f0)]('Usage:\x20tdx\x20engage\x20campaign\x20delete\x20<name-or-id>'),0x1;const _0x3c9831=_0x1f7488[0x0],_0x26c5b1=_0x2c89ab,_0x52916f=await resolveWorkspaceIdFromOptions(_0x26c5b1,_0x24ac6c);if(!_0x2c89ab['yes']){const _0x4e6ee0=await confirm(_0x3e5e5a(0x1a2)+_0x3c9831+_0x3e5e5a(0x1dd));if(!_0x4e6ee0)return console['log'](_0x3e5e5a(0x1ff)),0x0;}return await withSpinner(_0x3e5e5a(0x200)+_0x3c9831+_0x3e5e5a(0x190),()=>_0x24ac6c['engage'][_0x3e5e5a(0x1e6)](_0x3c9831,_0x52916f),{'verbose':_0x2c89ab[_0x3e5e5a(0x1db)]}),console[_0x3e5e5a(0x1fd)]('Campaign\x20\x27'+_0x3c9831+_0x3e5e5a(0x1a4)),0x0;}}export class EngageCampaignLaunchCommand extends BaseCommand{[a24_0x3481df(0x1d5)]='engage:campaign:launch';['description']=a24_0x3481df(0x1ab);async['execute'](_0x3f9303){const _0x5ab031=a24_0x3481df,{options:_0x2dcc77,args:_0xe4ccf7,tdx:_0x3dc271}=_0x3f9303;if(_0xe4ccf7['length']===0x0)return console[_0x5ab031(0x1f0)](_0x5ab031(0x1b6)),console[_0x5ab031(0x1f0)](_0x5ab031(0x1a9)),0x1;const _0x88d5a3=_0xe4ccf7[0x0],_0x1080be=_0x2dcc77,_0x3b135c=await resolveWorkspaceIdFromOptions(_0x1080be,_0x3dc271);return await withSpinner(_0x5ab031(0x1b5)+_0x88d5a3+'\x27...',()=>_0x3dc271[_0x5ab031(0x1f5)]['launchCampaign'](_0x88d5a3,_0x3b135c),{'verbose':_0x2dcc77[_0x5ab031(0x1db)]}),console[_0x5ab031(0x1fd)](_0x5ab031(0x1ca)+_0x88d5a3+'\x27\x20launched\x20successfully'),0x0;}}export class EngageCampaignPauseCommand extends BaseCommand{[a24_0x3481df(0x1d5)]='engage:campaign:pause';['description']='Pause\x20a\x20campaign';async[a24_0x3481df(0x1ef)](_0x52f46e){const _0x11404b=a24_0x3481df,{options:_0x458ac7,args:_0x9b3a08,tdx:_0x1b5088}=_0x52f46e;if(_0x9b3a08['length']===0x0)return console[_0x11404b(0x1f0)](_0x11404b(0x1b6)),console[_0x11404b(0x1f0)](_0x11404b(0x1ad)),0x1;const _0x2ec224=_0x9b3a08[0x0],_0x3e45ee=_0x458ac7,_0x2261fd=await resolveWorkspaceIdFromOptions(_0x3e45ee,_0x1b5088);return await withSpinner(_0x11404b(0x1a1)+_0x2ec224+_0x11404b(0x190),()=>_0x1b5088['engage']['pauseCampaign'](_0x2ec224,_0x2261fd),{'verbose':_0x458ac7[_0x11404b(0x1db)]}),console[_0x11404b(0x1fd)](_0x11404b(0x1ca)+_0x2ec224+'\x27\x20paused\x20successfully'),0x0;}}export class EngageCampaignResumeCommand extends BaseCommand{[a24_0x3481df(0x1d5)]=a24_0x3481df(0x206);[a24_0x3481df(0x1d0)]='Resume\x20a\x20paused\x20campaign';async[a24_0x3481df(0x1ef)](_0x2fb1cb){const _0x5375a5=a24_0x3481df,{options:_0x2af2af,args:_0x734527,tdx:_0x8224ba}=_0x2fb1cb;if(_0x734527[_0x5375a5(0x1e5)]===0x0)return console[_0x5375a5(0x1f0)]('Error:\x20Campaign\x20name\x20or\x20ID\x20is\x20required'),console[_0x5375a5(0x1f0)](_0x5375a5(0x204)),0x1;const _0x4181bc=_0x734527[0x0],_0x33982a=_0x2af2af,_0x5cd5b0=await resolveWorkspaceIdFromOptions(_0x33982a,_0x8224ba);return await withSpinner(_0x5375a5(0x1c1)+_0x4181bc+_0x5375a5(0x190),()=>_0x8224ba['engage'][_0x5375a5(0x196)](_0x4181bc,_0x5cd5b0),{'verbose':_0x2af2af[_0x5375a5(0x1db)]}),console[_0x5375a5(0x1fd)]('Campaign\x20\x27'+_0x4181bc+_0x5375a5(0x1e8)),0x0;}}export class EngageCampaignDuplicateCommand extends BaseCommand{['name']=a24_0x3481df(0x1bd);[a24_0x3481df(0x1d0)]=a24_0x3481df(0x219);async[a24_0x3481df(0x1ef)](_0x38ff2f){const _0x2647e5=a24_0x3481df,{options:_0x278237,args:_0x549b4d,tdx:_0x589ba0}=_0x38ff2f;if(_0x549b4d[_0x2647e5(0x1e5)]===0x0)return console[_0x2647e5(0x1f0)]('Error:\x20Campaign\x20name\x20or\x20ID\x20is\x20required'),console[_0x2647e5(0x1f0)](_0x2647e5(0x1fc)),0x1;const _0x7efdb2=_0x549b4d[0x0],_0x23b266=_0x278237,_0x2e33c0=await resolveWorkspaceIdFromOptions(_0x23b266,_0x589ba0),_0x4ad883=await withSpinner(_0x2647e5(0x1da)+_0x7efdb2+_0x2647e5(0x190),()=>_0x589ba0['engage'][_0x2647e5(0x197)](_0x7efdb2,_0x2e33c0),{'verbose':_0x278237['verbose']});return await handleSDKOutput([_0x4ad883[_0x2647e5(0x1fe)]],_0x278237),0x0;}}export class EngageTemplatesCommand extends BaseCommand{[a24_0x3481df(0x1d5)]=a24_0x3481df(0x1eb);[a24_0x3481df(0x1d0)]='List\x20email\x20templates';async['execute'](_0x2f46a3){const _0x49d563=a24_0x3481df,{options:_0x2fc88f,args:_0x576e39,tdx:_0x140282}=_0x2f46a3,_0x126e03=_0x576e39[0x0],_0x3892da=resolveLimit(_0x2fc88f[_0x49d563(0x1ba)],DEFAULT_LLM_LIMIT),_0x15c9ba=_0x2fc88f,_0x2069a2=await resolveWorkspaceIdFromOptions(_0x15c9ba,_0x140282),_0x14de7b=await withSpinner(_0x49d563(0x1ed),()=>_0x140282[_0x49d563(0x1f5)][_0x49d563(0x1bf)]({'workspaceId':_0x2069a2,'limit':_0x3892da}),{'verbose':_0x2fc88f[_0x49d563(0x1db)]});let _0x26eee8=_0x14de7b['data'];return _0x126e03&&(_0x26eee8=_0x14de7b[_0x49d563(0x1fe)][_0x49d563(0x19f)](_0x50f72d=>matchGlobPattern(_0x50f72d[_0x49d563(0x1d5)],_0x126e03))),await handleSDKOutput(_0x26eee8,_0x2fc88f),0x0;}}export class EngageTemplateShowCommand extends BaseCommand{['name']=a24_0x3481df(0x21b);[a24_0x3481df(0x1d0)]=a24_0x3481df(0x1a5);async[a24_0x3481df(0x1ef)](_0x183a50){const _0x5c1d08=a24_0x3481df,{options:_0x25ec40,args:_0x19ac4a,tdx:_0x17489b}=_0x183a50;if(_0x19ac4a[_0x5c1d08(0x1e5)]===0x0)return console[_0x5c1d08(0x1f0)](_0x5c1d08(0x1fa)),console[_0x5c1d08(0x1f0)](_0x5c1d08(0x1a3)),0x1;const _0x3e8850=_0x19ac4a[0x0],_0x22c33a=_0x25ec40,_0x1a5e74=await resolveWorkspaceIdFromOptions(_0x22c33a,_0x17489b),_0x24c704=_0x22c33a[_0x5c1d08(0x1cb)];if(_0x24c704){const _0x508eab=await withSpinner('Fetching\x20template\x20\x27'+_0x3e8850+'\x27...',()=>_0x17489b[_0x5c1d08(0x1f5)]['getTemplateFull'](_0x3e8850,_0x1a5e74),{'verbose':_0x25ec40['verbose']});await handleSDKOutput([_0x508eab],_0x25ec40);}else{const _0x5af8ff=await withSpinner(_0x5c1d08(0x1b0)+_0x3e8850+'\x27...',()=>_0x17489b[_0x5c1d08(0x1f5)][_0x5c1d08(0x1d3)](_0x3e8850,_0x1a5e74),{'verbose':_0x25ec40[_0x5c1d08(0x1db)]});await handleSDKOutput([_0x5af8ff],_0x25ec40);}return 0x0;}}export class EngageTemplateCreateCommand extends BaseCommand{['name']=a24_0x3481df(0x1b8);[a24_0x3481df(0x1d0)]=a24_0x3481df(0x209);async[a24_0x3481df(0x1ef)](_0xfff6ea){const _0x55d442=a24_0x3481df,{options:_0x35ade8,tdx:_0x586d5c}=_0xfff6ea,_0x1b6fce=_0x35ade8,_0xe21409=_0x1b6fce[_0x55d442(0x1d5)],_0x41bac3=_0x1b6fce[_0x55d442(0x203)],_0x3c8170=_0x1b6fce[_0x55d442(0x1af)];if(!_0xe21409)return console['error'](_0x55d442(0x194)),console[_0x55d442(0x1f0)](_0x55d442(0x1f6)),0x1;if(!_0x41bac3)return console['error']('Error:\x20--subject\x20is\x20required'),0x1;if(!_0x3c8170)return console[_0x55d442(0x1f0)](_0x55d442(0x199)),0x1;const _0x58493a=await resolveWorkspaceIdFromOptions(_0x1b6fce,_0x586d5c,!![]),_0x123104={'name':_0xe21409,'subjectTemplate':_0x41bac3,'htmlTemplate':_0x3c8170,'workspaceId':_0x58493a,'plaintextTemplate':_0x1b6fce[_0x55d442(0x21d)],'editorType':_0x1b6fce[_0x55d442(0x1c4)]},_0x2aedc9=await withSpinner(_0x55d442(0x1d4)+_0xe21409+_0x55d442(0x190),()=>_0x586d5c[_0x55d442(0x1f5)]['createTemplate'](_0x123104));return await handleSDKOutput([_0x2aedc9[_0x55d442(0x1fe)]],_0x35ade8),0x0;}}export class EngageTemplateUpdateCommand extends BaseCommand{[a24_0x3481df(0x1d5)]=a24_0x3481df(0x211);['description']='Update\x20an\x20email\x20template';async[a24_0x3481df(0x1ef)](_0x372e6e){const _0x4e3c50=a24_0x3481df,{options:_0x176324,args:_0x3705b3,tdx:_0x1b62c2}=_0x372e6e;if(_0x3705b3[_0x4e3c50(0x1e5)]===0x0)return console[_0x4e3c50(0x1f0)](_0x4e3c50(0x1fa)),console[_0x4e3c50(0x1f0)](_0x4e3c50(0x213)),0x1;const _0x1f4311=_0x3705b3[0x0],_0x504f22=_0x176324,_0x4d3925=await resolveWorkspaceIdFromOptions(_0x504f22,_0x1b62c2),_0x1fd41b={'name':_0x504f22[_0x4e3c50(0x1d5)],'subjectTemplate':_0x504f22[_0x4e3c50(0x203)],'htmlTemplate':_0x504f22[_0x4e3c50(0x1af)],'plaintextTemplate':_0x504f22[_0x4e3c50(0x21d)]},_0x3b2b52=Object['fromEntries'](Object[_0x4e3c50(0x193)](_0x1fd41b)[_0x4e3c50(0x19f)](([,_0x3482a7])=>_0x3482a7!==undefined));if(Object[_0x4e3c50(0x1e0)](_0x3b2b52)[_0x4e3c50(0x1e5)]===0x0)return console[_0x4e3c50(0x1f0)](_0x4e3c50(0x1c9)),console[_0x4e3c50(0x1f0)]('Options:\x20--name,\x20--subject,\x20--html,\x20--plaintext'),0x1;const _0x6e2ec5=await withSpinner(_0x4e3c50(0x1f8)+_0x1f4311+_0x4e3c50(0x190),()=>_0x1b62c2['engage'][_0x4e3c50(0x20c)](_0x1f4311,_0x3b2b52,_0x4d3925),{'verbose':_0x176324[_0x4e3c50(0x1db)]});return await handleSDKOutput([_0x6e2ec5['data']],_0x176324),0x0;}}export class EngageTemplateDeleteCommand extends BaseCommand{['name']=a24_0x3481df(0x1b2);[a24_0x3481df(0x1d0)]=a24_0x3481df(0x1ae);async[a24_0x3481df(0x1ef)](_0x438589){const _0x3d56db=a24_0x3481df,{options:_0x37eb74,args:_0x41d3e3,tdx:_0x3e1ac0}=_0x438589;if(_0x41d3e3['length']===0x0)return console[_0x3d56db(0x1f0)](_0x3d56db(0x1fa)),console[_0x3d56db(0x1f0)](_0x3d56db(0x1e4)),0x1;const _0x34f556=_0x41d3e3[0x0],_0x2ed721=_0x37eb74,_0x2d16bb=await resolveWorkspaceIdFromOptions(_0x2ed721,_0x3e1ac0);if(!_0x37eb74[_0x3d56db(0x1b4)]){const _0x28fd98=await confirm(_0x3d56db(0x1e7)+_0x34f556+'\x27?\x20This\x20cannot\x20be\x20undone.');if(!_0x28fd98)return console[_0x3d56db(0x1fd)]('Operation\x20cancelled'),0x0;}return await withSpinner(_0x3d56db(0x1c2)+_0x34f556+_0x3d56db(0x190),()=>_0x3e1ac0[_0x3d56db(0x1f5)][_0x3d56db(0x1ce)](_0x34f556,_0x2d16bb),{'verbose':_0x37eb74[_0x3d56db(0x1db)]}),console[_0x3d56db(0x1fd)](_0x3d56db(0x1a7)+_0x34f556+_0x3d56db(0x1a4)),0x0;}}function a24_0x114c(_0x2b1be8,_0x33c4a5){_0x2b1be8=_0x2b1be8-0x18d;const _0x5267ac=a24_0x5267();let _0x114cab=_0x5267ac[_0x2b1be8];return _0x114cab;}export class EngageWorkspacesCommand extends BaseCommand{[a24_0x3481df(0x1d5)]=a24_0x3481df(0x191);['description']=a24_0x3481df(0x1c7);async['execute'](_0x1022ea){const _0x4163dd=a24_0x3481df,{options:_0x29d93e,args:_0x24d3cf,tdx:_0x2b9326}=_0x1022ea,_0x5ef83d=_0x24d3cf[0x0],_0x16b505=resolveLimit(_0x29d93e['limit'],DEFAULT_LLM_LIMIT),_0x316c38=await withSpinner(_0x4163dd(0x1d8),()=>_0x2b9326['engage'][_0x4163dd(0x18f)]({'limit':_0x16b505}),{'verbose':_0x29d93e[_0x4163dd(0x1db)]});let _0x2da4fa=_0x316c38[_0x4163dd(0x1fe)];return _0x5ef83d&&(_0x2da4fa=_0x316c38[_0x4163dd(0x1fe)]['filter'](_0x3cef6d=>matchGlobPattern(_0x3cef6d[_0x4163dd(0x1d5)],_0x5ef83d))),await handleSDKOutput(_0x2da4fa,_0x29d93e),0x0;}}export class EngageWorkspaceShowCommand extends BaseCommand{[a24_0x3481df(0x1d5)]=a24_0x3481df(0x198);[a24_0x3481df(0x1d0)]=a24_0x3481df(0x20b);async[a24_0x3481df(0x1ef)](_0x16fa3d){const _0x3f7f8c=a24_0x3481df,{options:_0x35cbfc,args:_0x41faad,tdx:_0x5af486}=_0x16fa3d;if(_0x41faad[_0x3f7f8c(0x1e5)]===0x0)return console[_0x3f7f8c(0x1f0)]('Error:\x20Workspace\x20name\x20or\x20ID\x20is\x20required'),console[_0x3f7f8c(0x1f0)](_0x3f7f8c(0x21a)),0x1;const _0x4e1710=_0x41faad[0x0],_0x404cf3=_0x35cbfc,_0x1aeb49=_0x404cf3[_0x3f7f8c(0x1cb)];if(_0x1aeb49){const _0x428bf1=await withSpinner(_0x3f7f8c(0x1f9)+_0x4e1710+_0x3f7f8c(0x190),()=>_0x5af486[_0x3f7f8c(0x1f5)]['getWorkspaceFull'](_0x4e1710),{'verbose':_0x35cbfc[_0x3f7f8c(0x1db)]});await handleSDKOutput([_0x428bf1],_0x35cbfc);}else{const _0x176538=await withSpinner('Fetching\x20workspace\x20\x27'+_0x4e1710+_0x3f7f8c(0x190),()=>_0x5af486['engage'][_0x3f7f8c(0x1aa)](_0x4e1710),{'verbose':_0x35cbfc[_0x3f7f8c(0x1db)]});await handleSDKOutput([_0x176538],_0x35cbfc);}return 0x0;}}export class EngageWorkspaceCreateCommand extends BaseCommand{['name']=a24_0x3481df(0x218);[a24_0x3481df(0x1d0)]='Create\x20a\x20workspace';async[a24_0x3481df(0x1ef)](_0x23718f){const _0x4460fb=a24_0x3481df,{options:_0x5b9363,tdx:_0x46e78e}=_0x23718f,_0x55b87b=_0x5b9363,_0x50961e=_0x55b87b[_0x4460fb(0x1d5)];if(!_0x50961e)return console[_0x4460fb(0x1f0)]('Error:\x20--name\x20is\x20required'),console[_0x4460fb(0x1f0)](_0x4460fb(0x20f)),0x1;const _0xcb9dbd={'name':_0x50961e,'description':_0x55b87b[_0x4460fb(0x1d0)]},_0x4b0559=await withSpinner(_0x4460fb(0x1b3)+_0x50961e+_0x4460fb(0x190),()=>_0x46e78e[_0x4460fb(0x1f5)][_0x4460fb(0x1cf)](_0xcb9dbd));return await handleSDKOutput([_0x4b0559[_0x4460fb(0x1fe)]],_0x5b9363),0x0;}}export class EngageWorkspaceUpdateCommand extends BaseCommand{[a24_0x3481df(0x1d5)]=a24_0x3481df(0x195);[a24_0x3481df(0x1d0)]='Update\x20a\x20workspace';async[a24_0x3481df(0x1ef)](_0x279f43){const _0x34d1b8=a24_0x3481df,{options:_0xa11d71,args:_0x25968c,tdx:_0x4876d5}=_0x279f43;if(_0x25968c[_0x34d1b8(0x1e5)]===0x0)return console[_0x34d1b8(0x1f0)]('Error:\x20Workspace\x20name\x20or\x20ID\x20is\x20required'),console[_0x34d1b8(0x1f0)](_0x34d1b8(0x1cc)),0x1;const _0x54775d=_0x25968c[0x0],_0x4e85b3=_0xa11d71,_0x3b88d8={'name':_0x4e85b3[_0x34d1b8(0x1d5)],'description':_0x4e85b3[_0x34d1b8(0x1d0)]},_0x5314a8=Object[_0x34d1b8(0x1b1)](Object[_0x34d1b8(0x193)](_0x3b88d8)[_0x34d1b8(0x19f)](([,_0x3756e9])=>_0x3756e9!==undefined));if(Object[_0x34d1b8(0x1e0)](_0x5314a8)[_0x34d1b8(0x1e5)]===0x0)return console[_0x34d1b8(0x1f0)](_0x34d1b8(0x1c9)),console[_0x34d1b8(0x1f0)](_0x34d1b8(0x1f2)),0x1;const _0x246197=await withSpinner(_0x34d1b8(0x1e9)+_0x54775d+_0x34d1b8(0x190),()=>_0x4876d5[_0x34d1b8(0x1f5)][_0x34d1b8(0x1dc)](_0x54775d,_0x5314a8),{'verbose':_0xa11d71[_0x34d1b8(0x1db)]});return await handleSDKOutput([_0x246197[_0x34d1b8(0x1fe)]],_0xa11d71),0x0;}}export class EngageWorkspaceDeleteCommand extends BaseCommand{[a24_0x3481df(0x1d5)]=a24_0x3481df(0x1e3);[a24_0x3481df(0x1d0)]=a24_0x3481df(0x18d);async[a24_0x3481df(0x1ef)](_0x472aad){const _0x3c5ad6=a24_0x3481df,{options:_0x3f2824,args:_0x403bed,tdx:_0xef0ff7}=_0x472aad;if(_0x403bed[_0x3c5ad6(0x1e5)]===0x0)return console['error'](_0x3c5ad6(0x1c0)),console[_0x3c5ad6(0x1f0)](_0x3c5ad6(0x201)),0x1;const _0x13357a=_0x403bed[0x0];if(!_0x3f2824[_0x3c5ad6(0x1b4)]){const _0x2ddf99=await confirm(_0x3c5ad6(0x1ac)+_0x13357a+_0x3c5ad6(0x1dd));if(!_0x2ddf99)return console[_0x3c5ad6(0x1fd)](_0x3c5ad6(0x1ff)),0x0;}return await withSpinner('Deleting\x20workspace\x20\x27'+_0x13357a+_0x3c5ad6(0x190),()=>_0xef0ff7[_0x3c5ad6(0x1f5)][_0x3c5ad6(0x1de)](_0x13357a),{'verbose':_0x3f2824['verbose']}),console[_0x3c5ad6(0x1fd)]('Workspace\x20\x27'+_0x13357a+'\x27\x20deleted\x20successfully'),0x0;}}export class EngageWorkspaceUseCommand extends BaseCommand{['name']=a24_0x3481df(0x212);[a24_0x3481df(0x1d0)]='Set\x20workspace\x20context\x20for\x20Engage\x20commands';async[a24_0x3481df(0x1ef)](_0x37db6c){const _0x314041=a24_0x3481df,{options:_0x5e524f,args:_0x275224,tdx:_0xc8693}=_0x37db6c;if(_0x275224[_0x314041(0x1e5)]===0x0)return console[_0x314041(0x1f0)](_0x314041(0x19c)),console[_0x314041(0x1f0)](_0x314041(0x1d2)),0x1;const _0x741946=_0x275224[0x0];await withSpinner('Verifying\x20workspace\x20\x27'+_0x741946+'\x27...',()=>_0xc8693['engage'][_0x314041(0x1b9)](_0x741946));const _0xc98fb0=_0x5e524f[_0x314041(0x210)]||undefined;return saveSessionContext({'engage_workspace':_0x741946},_0xc98fb0),console[_0x314041(0x1fd)](_0x314041(0x19a)+_0x741946),console[_0x314041(0x1fd)](_0x314041(0x19d)),0x0;}}
1
+ const a24_0x12e534=a24_0x1117;(function(_0x5b6149,_0x2eea8a){const _0x5d6ff5=a24_0x1117,_0x39095e=_0x5b6149();while(!![]){try{const _0x37190c=-parseInt(_0x5d6ff5(0x1ce))/0x1*(-parseInt(_0x5d6ff5(0x230))/0x2)+parseInt(_0x5d6ff5(0x229))/0x3*(-parseInt(_0x5d6ff5(0x1ff))/0x4)+parseInt(_0x5d6ff5(0x1e5))/0x5+parseInt(_0x5d6ff5(0x22f))/0x6+-parseInt(_0x5d6ff5(0x1fc))/0x7*(parseInt(_0x5d6ff5(0x1d3))/0x8)+-parseInt(_0x5d6ff5(0x247))/0x9*(-parseInt(_0x5d6ff5(0x227))/0xa)+-parseInt(_0x5d6ff5(0x1d2))/0xb;if(_0x37190c===_0x2eea8a)break;else _0x39095e['push'](_0x39095e['shift']());}catch(_0x12e355){_0x39095e['push'](_0x39095e['shift']());}}}(a24_0x2429,0xb284a));import{BaseCommand}from'./command.js';import{handleSDKOutput}from'../utils/command-output.js';import{withSpinner}from'../utils/spinner.js';import{matchGlobPattern}from'../utils/string-utils.js';import{confirm}from'../utils/prompt.js';import{loadSessionContext,saveSessionContext}from'../core/session.js';import{DEFAULT_LLM_LIMIT,resolveLimit}from'../utils/constants.js';import{SDKError,ErrorCode}from'../sdk/errors.js';async function resolveWorkspaceIdFromOptions(_0x4791ba,_0x18d7a6,_0x5ac1fa=![]){const _0x7b76d=a24_0x1117;if(_0x4791ba[_0x7b76d(0x1cd)])return await _0x18d7a6[_0x7b76d(0x22b)][_0x7b76d(0x1ea)](_0x4791ba['workspace']);const _0x28fa10=loadSessionContext(_0x4791ba['session']);if(_0x28fa10?.['engage_workspace'])return await _0x18d7a6[_0x7b76d(0x22b)][_0x7b76d(0x1ea)](_0x28fa10[_0x7b76d(0x1eb)]);if(_0x5ac1fa)throw new SDKError(ErrorCode[_0x7b76d(0x23a)],_0x7b76d(0x1f9),undefined,{'helpText':_0x7b76d(0x1ef)});return undefined;}async function resolveSegmentFromOptions(_0x560414,_0x58e702){const _0x6c9fb2=a24_0x1117;if(!_0x560414[_0x6c9fb2(0x1e1)])return{};const _0x75a3f=_0x560414[_0x6c9fb2(0x1e1)],_0x57033c=await _0x58e702[_0x6c9fb2(0x1e1)]['resolvePathToResource'](_0x75a3f);return{'audienceId':_0x57033c[_0x6c9fb2(0x20b)],'audienceName':_0x57033c[_0x6c9fb2(0x1d9)],..._0x57033c['segmentId']&&{'segmentId':_0x57033c[_0x6c9fb2(0x222)],'segmentName':_0x57033c[_0x6c9fb2(0x22d)]}};}function a24_0x1117(_0x449a77,_0x37f5dd){_0x449a77=_0x449a77-0x1c0;const _0x242927=a24_0x2429();let _0x1117ae=_0x242927[_0x449a77];return _0x1117ae;}function buildConnectorConfig(_0x59ac15){const _0x26a26a=a24_0x1117,_0x24bde5=_0x59ac15[_0x26a26a(0x23e)],_0x32a5bc=_0x59ac15[_0x26a26a(0x1e8)];if(!_0x24bde5&&!_0x32a5bc)return undefined;return{..._0x24bde5&&{'emailSenderId':_0x24bde5},..._0x32a5bc&&{'jsonColumns':_0x32a5bc}};}export class EngageCampaignsCommand extends BaseCommand{[a24_0x12e534(0x224)]=a24_0x12e534(0x200);[a24_0x12e534(0x1e2)]='List\x20campaigns';async[a24_0x12e534(0x1d1)](_0x5e056b){const _0x1e3226=a24_0x12e534,{options:_0x4445b9,args:_0x52019a,tdx:_0x454287}=_0x5e056b,_0x5c14af=_0x52019a[0x0],_0x364cab=resolveLimit(_0x4445b9['limit'],DEFAULT_LLM_LIMIT),_0x5daed4=_0x4445b9,_0x2b240d=_0x5daed4[_0x1e3226(0x217)],_0x588ccb=_0x5daed4['status'],_0x339873=await resolveWorkspaceIdFromOptions(_0x5daed4,_0x454287),_0x44881a=await withSpinner('Fetching\x20campaigns...',()=>_0x454287[_0x1e3226(0x22b)]['listCampaigns']({'type':_0x2b240d,'status':_0x588ccb,'workspaceId':_0x339873,'limit':_0x364cab}),{'verbose':_0x4445b9[_0x1e3226(0x216)]});let _0x320e77=_0x44881a[_0x1e3226(0x21a)];return _0x5c14af&&(_0x320e77=_0x44881a['data'][_0x1e3226(0x23c)](_0xaf35f2=>matchGlobPattern(_0xaf35f2[_0x1e3226(0x224)],_0x5c14af))),await handleSDKOutput(_0x320e77,_0x4445b9),0x0;}}function a24_0x2429(){const _0x3f7e47=['updateWorkspace','name','engage:campaign:show','Usage:\x20tdx\x20engage\x20campaign\x20launch\x20<name-or-id>','90qywpHM','Usage:\x20tdx\x20engage\x20campaign\x20update\x20<name-or-id>\x20[--name\x20<new-name>]\x20...','83013vWpenk','engage:campaign:update','engage','Error:\x20--html\x20is\x20required','segmentName','duplicateCampaign','1995714bRMmui','184SKEjLV','engage:workspace:update','Fetching\x20campaign\x20\x27','Delete\x20an\x20email\x20template','fromEntries','engage:workspace:show','deleteTemplate','Template\x20\x27','getTemplate','engage:campaign:pause','MISSING_ARGUMENT','Options:\x20--name,\x20--subject,\x20--html,\x20--plaintext','filter','Fetching\x20workspaces...','emailSenderId','Update\x20a\x20workspace','resumeCampaign','createWorkspace','Engage\x20workspace\x20set\x20to:\x20','Updating\x20workspace\x20\x27','List\x20workspaces','Pause\x20a\x20campaign','getCampaign','678438Ahooco','updateCampaign','Error:\x20--name\x20is\x20required','Show\x20workspace\x20details','getCampaignFull','editorType','Set\x20workspace\x20context\x20for\x20Engage\x20commands','\x0aTip:\x20Use\x20\x27tdx\x20context\x20--clear\x27\x20to\x20clear\x20session\x20overrides','engage:workspace:delete','Launch\x20a\x20campaign','Create\x20an\x20email\x20template','updateTemplate','Create\x20a\x20workspace','startAt','log','listWorkspaces','limit','Usage:\x20tdx\x20engage\x20template\x20show\x20<name-or-id>','deleteWorkspace','Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20template\x20\x27','yes','workspace','443VQgKim','Duplicating\x20campaign\x20\x27','Usage:\x20tdx\x20engage\x20workspace\x20use\x20<name>','execute','10854624EtEROy','472168vrLXqS','subject','plaintext','\x27\x20deleted\x20successfully','engage:template:delete','Usage:\x20tdx\x20engage\x20template\x20update\x20<name-or-id>\x20[--name\x20<new-name>]\x20...','parentName','Fetching\x20template\x20\x27','createCampaign','\x27\x20launched\x20successfully','Error:\x20Workspace\x20name\x20or\x20ID\x20is\x20required','Usage:\x20tdx\x20engage\x20campaign\x20pause\x20<name-or-id>','Usage:\x20tdx\x20engage\x20workspace\x20update\x20<name-or-id>\x20[--name\x20<new-name>]\x20...','Resuming\x20campaign\x20\x27','segment','description','engage:workspace:use','getWorkspaceFull','6088415oSFtTs','Update\x20an\x20email\x20template','engage:campaign:delete','jsonColumns','Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20workspace\x20\x27','resolveWorkspaceId','engage_workspace','Options:\x20--name,\x20--description,\x20--segment,\x20--email-sender-id,\x20--json-columns,\x20--start-at,\x20--timezone','full','launchCampaign','Use\x20--workspace\x20<name>\x20or\x20set\x20with\x20\x22tdx\x20use\x20engage_workspace\x20<name>\x22','engage:templates','Error:\x20Workspace\x20name\x20is\x20required','length','Usage:\x20tdx\x20engage\x20campaign\x20delete\x20<name-or-id>','Error:\x20At\x20least\x20one\x20field\x20to\x20update\x20is\x20required','Error:\x20Template\x20name\x20or\x20ID\x20is\x20required','Updating\x20template\x20\x27','Campaign\x20\x27','Usage:\x20tdx\x20engage\x20workspace\x20delete\x20<name-or-id>','Workspace\x20is\x20required\x20for\x20this\x20operation','\x27\x20resumed\x20successfully','Pausing\x20campaign\x20\x27','49mlPJjE','Usage:\x20tdx\x20engage\x20campaign\x20resume\x20<name-or-id>','engage:workspaces','20HsYnXR','engage:campaigns','engage:campaign:launch','Creating\x20campaign\x20\x27','engage:template:create','html','\x27?\x20This\x20cannot\x20be\x20undone.','\x27...','Deleting\x20workspace\x20\x27','Options:\x20--name,\x20--description','Usage:\x20tdx\x20engage\x20campaign\x20show\x20<name-or-id>','getWorkspace','parentId','Usage:\x20tdx\x20engage\x20campaign\x20create\x20--name\x20<name>\x20--type\x20<email|push>','engage:campaign:resume','Operation\x20cancelled','Create\x20a\x20new\x20campaign','List\x20email\x20templates','Creating\x20workspace\x20\x27','Duplicate\x20a\x20campaign','Usage:\x20tdx\x20engage\x20template\x20create\x20--name\x20<name>\x20--subject\x20<subject>\x20--html\x20<html>','Error:\x20Campaign\x20name\x20or\x20ID\x20is\x20required','Deleting\x20campaign\x20\x27','verbose','type','Update\x20a\x20campaign','error','data','engage:template:update','session','entries','Fetching\x20workspace\x20\x27','timezone','Updating\x20campaign\x20\x27','Delete\x20a\x20workspace','segmentId'];a24_0x2429=function(){return _0x3f7e47;};return a24_0x2429();}export class EngageCampaignShowCommand extends BaseCommand{[a24_0x12e534(0x224)]=a24_0x12e534(0x225);[a24_0x12e534(0x1e2)]='Show\x20campaign\x20details';async[a24_0x12e534(0x1d1)](_0x101c65){const _0x27ced2=a24_0x12e534,{options:_0x423748,args:_0x32cb37,tdx:_0xb5b96b}=_0x101c65;if(_0x32cb37[_0x27ced2(0x1f2)]===0x0)return console['error'](_0x27ced2(0x214)),console['error'](_0x27ced2(0x209)),0x1;const _0xb48a0=_0x32cb37[0x0],_0x4a5810=_0x423748,_0xb7ecdf=await resolveWorkspaceIdFromOptions(_0x4a5810,_0xb5b96b),_0x17c2fd=_0x4a5810[_0x27ced2(0x1ed)];if(_0x17c2fd){const _0x549143=await withSpinner('Fetching\x20campaign\x20\x27'+_0xb48a0+_0x27ced2(0x206),()=>_0xb5b96b[_0x27ced2(0x22b)][_0x27ced2(0x24b)](_0xb48a0,_0xb7ecdf),{'verbose':_0x423748[_0x27ced2(0x216)]});await handleSDKOutput([_0x549143],_0x423748);}else{const _0x2cdb3c=await withSpinner(_0x27ced2(0x232)+_0xb48a0+_0x27ced2(0x206),()=>_0xb5b96b[_0x27ced2(0x22b)][_0x27ced2(0x246)](_0xb48a0,_0xb7ecdf),{'verbose':_0x423748[_0x27ced2(0x216)]});await handleSDKOutput([_0x2cdb3c],_0x423748);}return 0x0;}}export class EngageCampaignCreateCommand extends BaseCommand{[a24_0x12e534(0x224)]='engage:campaign:create';[a24_0x12e534(0x1e2)]=a24_0x12e534(0x20f);async[a24_0x12e534(0x1d1)](_0x45794a){const _0xcaca83=a24_0x12e534,{options:_0x111870,tdx:_0x4b72d0}=_0x45794a,_0x4afc27=_0x111870,_0x968d2d=_0x4afc27[_0xcaca83(0x224)],_0x3fa754=_0x4afc27[_0xcaca83(0x217)];if(!_0x968d2d)return console[_0xcaca83(0x219)](_0xcaca83(0x249)),console[_0xcaca83(0x219)](_0xcaca83(0x20c)),0x1;if(!_0x3fa754)return console[_0xcaca83(0x219)]('Error:\x20--type\x20is\x20required\x20(email\x20or\x20push)'),console[_0xcaca83(0x219)](_0xcaca83(0x20c)),0x1;const _0x5025cc=await resolveWorkspaceIdFromOptions(_0x4afc27,_0x4b72d0,!![]),_0x373d9c=await resolveSegmentFromOptions(_0x4afc27,_0x4b72d0),_0x377da8=buildConnectorConfig(_0x4afc27),_0x2fc2f1={'name':_0x968d2d,'campaignType':_0x3fa754,'workspaceId':_0x5025cc,'description':_0x4afc27['description'],..._0x373d9c,'connectorConfig':_0x377da8,'startAt':_0x4afc27['startAt'],'timezone':_0x4afc27[_0xcaca83(0x21f)]},_0x60f869=await withSpinner(_0xcaca83(0x202)+_0x968d2d+_0xcaca83(0x206),()=>_0x4b72d0[_0xcaca83(0x22b)][_0xcaca83(0x1db)](_0x2fc2f1));return await handleSDKOutput([_0x60f869['data']],_0x111870),0x0;}}export class EngageCampaignUpdateCommand extends BaseCommand{['name']=a24_0x12e534(0x22a);[a24_0x12e534(0x1e2)]=a24_0x12e534(0x218);async[a24_0x12e534(0x1d1)](_0x3e3ea5){const _0x7ce003=a24_0x12e534,{options:_0x23425f,args:_0x4f9f79,tdx:_0x5e9ac2}=_0x3e3ea5;if(_0x4f9f79[_0x7ce003(0x1f2)]===0x0)return console[_0x7ce003(0x219)](_0x7ce003(0x214)),console[_0x7ce003(0x219)](_0x7ce003(0x228)),0x1;const _0x1d4075=_0x4f9f79[0x0],_0x4becd5=_0x23425f,_0x345a03=await resolveWorkspaceIdFromOptions(_0x4becd5,_0x5e9ac2),_0x3789b6=await resolveSegmentFromOptions(_0x4becd5,_0x5e9ac2),_0x51fc96=buildConnectorConfig(_0x4becd5),_0x3d51a2={'name':_0x4becd5[_0x7ce003(0x224)],'description':_0x4becd5[_0x7ce003(0x1e2)],..._0x3789b6,'connectorConfig':_0x51fc96,'startAt':_0x4becd5[_0x7ce003(0x1c5)],'timezone':_0x4becd5[_0x7ce003(0x21f)]},_0x21b640=Object[_0x7ce003(0x234)](Object[_0x7ce003(0x21d)](_0x3d51a2)[_0x7ce003(0x23c)](([,_0x4dcb37])=>_0x4dcb37!==undefined));if(Object['keys'](_0x21b640)[_0x7ce003(0x1f2)]===0x0)return console[_0x7ce003(0x219)](_0x7ce003(0x1f4)),console[_0x7ce003(0x219)](_0x7ce003(0x1ec)),0x1;const _0x171671=await withSpinner(_0x7ce003(0x220)+_0x1d4075+_0x7ce003(0x206),()=>_0x5e9ac2[_0x7ce003(0x22b)][_0x7ce003(0x248)](_0x1d4075,_0x21b640,_0x345a03),{'verbose':_0x23425f[_0x7ce003(0x216)]});return await handleSDKOutput([_0x171671['data']],_0x23425f),0x0;}}export class EngageCampaignDeleteCommand extends BaseCommand{[a24_0x12e534(0x224)]=a24_0x12e534(0x1e7);['description']='Delete\x20a\x20campaign';async[a24_0x12e534(0x1d1)](_0x3b8538){const _0x16fc09=a24_0x12e534,{options:_0x672a41,args:_0x307759,tdx:_0x12457a}=_0x3b8538;if(_0x307759[_0x16fc09(0x1f2)]===0x0)return console[_0x16fc09(0x219)](_0x16fc09(0x214)),console['error'](_0x16fc09(0x1f3)),0x1;const _0x2f2e5a=_0x307759[0x0],_0x211bc2=_0x672a41,_0x197fa=await resolveWorkspaceIdFromOptions(_0x211bc2,_0x12457a);if(!_0x672a41['yes']){const _0x545652=await confirm('Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20campaign\x20\x27'+_0x2f2e5a+'\x27?\x20This\x20cannot\x20be\x20undone.');if(!_0x545652)return console['log'](_0x16fc09(0x20e)),0x0;}return await withSpinner(_0x16fc09(0x215)+_0x2f2e5a+_0x16fc09(0x206),()=>_0x12457a[_0x16fc09(0x22b)]['deleteCampaign'](_0x2f2e5a,_0x197fa),{'verbose':_0x672a41[_0x16fc09(0x216)]}),console[_0x16fc09(0x1c6)](_0x16fc09(0x1f7)+_0x2f2e5a+_0x16fc09(0x1d6)),0x0;}}export class EngageCampaignLaunchCommand extends BaseCommand{[a24_0x12e534(0x224)]=a24_0x12e534(0x201);['description']=a24_0x12e534(0x1c1);async[a24_0x12e534(0x1d1)](_0x576b90){const _0x302368=a24_0x12e534,{options:_0x29259c,args:_0x318a40,tdx:_0x32aaea}=_0x576b90;if(_0x318a40[_0x302368(0x1f2)]===0x0)return console[_0x302368(0x219)]('Error:\x20Campaign\x20name\x20or\x20ID\x20is\x20required'),console['error'](_0x302368(0x226)),0x1;const _0x1f69a8=_0x318a40[0x0],_0x30ca4a=_0x29259c,_0xafc309=await resolveWorkspaceIdFromOptions(_0x30ca4a,_0x32aaea);return await withSpinner('Launching\x20campaign\x20\x27'+_0x1f69a8+_0x302368(0x206),()=>_0x32aaea[_0x302368(0x22b)][_0x302368(0x1ee)](_0x1f69a8,_0xafc309),{'verbose':_0x29259c[_0x302368(0x216)]}),console[_0x302368(0x1c6)](_0x302368(0x1f7)+_0x1f69a8+_0x302368(0x1dc)),0x0;}}export class EngageCampaignPauseCommand extends BaseCommand{[a24_0x12e534(0x224)]=a24_0x12e534(0x239);['description']=a24_0x12e534(0x245);async[a24_0x12e534(0x1d1)](_0x20f3c7){const _0x1861f8=a24_0x12e534,{options:_0x56f042,args:_0x114fd9,tdx:_0x263081}=_0x20f3c7;if(_0x114fd9[_0x1861f8(0x1f2)]===0x0)return console['error'](_0x1861f8(0x214)),console[_0x1861f8(0x219)](_0x1861f8(0x1de)),0x1;const _0xf5875=_0x114fd9[0x0],_0x182a28=_0x56f042,_0x1b00eb=await resolveWorkspaceIdFromOptions(_0x182a28,_0x263081);return await withSpinner(_0x1861f8(0x1fb)+_0xf5875+'\x27...',()=>_0x263081[_0x1861f8(0x22b)]['pauseCampaign'](_0xf5875,_0x1b00eb),{'verbose':_0x56f042[_0x1861f8(0x216)]}),console[_0x1861f8(0x1c6)](_0x1861f8(0x1f7)+_0xf5875+'\x27\x20paused\x20successfully'),0x0;}}export class EngageCampaignResumeCommand extends BaseCommand{[a24_0x12e534(0x224)]=a24_0x12e534(0x20d);[a24_0x12e534(0x1e2)]='Resume\x20a\x20paused\x20campaign';async[a24_0x12e534(0x1d1)](_0x530d89){const _0x3272ed=a24_0x12e534,{options:_0x2b6929,args:_0x14cb5d,tdx:_0x37d112}=_0x530d89;if(_0x14cb5d[_0x3272ed(0x1f2)]===0x0)return console[_0x3272ed(0x219)]('Error:\x20Campaign\x20name\x20or\x20ID\x20is\x20required'),console[_0x3272ed(0x219)](_0x3272ed(0x1fd)),0x1;const _0xba7329=_0x14cb5d[0x0],_0x42e953=_0x2b6929,_0x157602=await resolveWorkspaceIdFromOptions(_0x42e953,_0x37d112);return await withSpinner(_0x3272ed(0x1e0)+_0xba7329+_0x3272ed(0x206),()=>_0x37d112[_0x3272ed(0x22b)][_0x3272ed(0x240)](_0xba7329,_0x157602),{'verbose':_0x2b6929[_0x3272ed(0x216)]}),console[_0x3272ed(0x1c6)](_0x3272ed(0x1f7)+_0xba7329+_0x3272ed(0x1fa)),0x0;}}export class EngageCampaignDuplicateCommand extends BaseCommand{[a24_0x12e534(0x224)]='engage:campaign:duplicate';[a24_0x12e534(0x1e2)]=a24_0x12e534(0x212);async[a24_0x12e534(0x1d1)](_0x1aeb62){const _0xe35dac=a24_0x12e534,{options:_0x22a236,args:_0x204dde,tdx:_0xed2119}=_0x1aeb62;if(_0x204dde['length']===0x0)return console[_0xe35dac(0x219)](_0xe35dac(0x214)),console['error']('Usage:\x20tdx\x20engage\x20campaign\x20duplicate\x20<name-or-id>'),0x1;const _0x3b7a83=_0x204dde[0x0],_0x3df43f=_0x22a236,_0x3770ed=await resolveWorkspaceIdFromOptions(_0x3df43f,_0xed2119),_0x521996=await withSpinner(_0xe35dac(0x1cf)+_0x3b7a83+_0xe35dac(0x206),()=>_0xed2119[_0xe35dac(0x22b)][_0xe35dac(0x22e)](_0x3b7a83,_0x3770ed),{'verbose':_0x22a236[_0xe35dac(0x216)]});return await handleSDKOutput([_0x521996[_0xe35dac(0x21a)]],_0x22a236),0x0;}}export class EngageTemplatesCommand extends BaseCommand{[a24_0x12e534(0x224)]=a24_0x12e534(0x1f0);[a24_0x12e534(0x1e2)]=a24_0x12e534(0x210);async[a24_0x12e534(0x1d1)](_0x4bd415){const _0x260e62=a24_0x12e534,{options:_0x84cf62,args:_0x33c448,tdx:_0x538831}=_0x4bd415,_0x3d0ecf=_0x33c448[0x0],_0x44c010=resolveLimit(_0x84cf62['limit'],DEFAULT_LLM_LIMIT),_0x53eb88=_0x84cf62,_0x39603e=await resolveWorkspaceIdFromOptions(_0x53eb88,_0x538831),_0x5d05ed=await withSpinner('Fetching\x20templates...',()=>_0x538831[_0x260e62(0x22b)]['listTemplates']({'workspaceId':_0x39603e,'limit':_0x44c010}),{'verbose':_0x84cf62['verbose']});let _0x5c075e=_0x5d05ed[_0x260e62(0x21a)];return _0x3d0ecf&&(_0x5c075e=_0x5d05ed[_0x260e62(0x21a)][_0x260e62(0x23c)](_0xe326be=>matchGlobPattern(_0xe326be[_0x260e62(0x224)],_0x3d0ecf))),await handleSDKOutput(_0x5c075e,_0x84cf62),0x0;}}export class EngageTemplateShowCommand extends BaseCommand{[a24_0x12e534(0x224)]='engage:template:show';[a24_0x12e534(0x1e2)]='Show\x20email\x20template\x20details';async['execute'](_0x3f2edd){const _0x4e4df2=a24_0x12e534,{options:_0x1fd3ba,args:_0x2166b3,tdx:_0x41bd61}=_0x3f2edd;if(_0x2166b3[_0x4e4df2(0x1f2)]===0x0)return console[_0x4e4df2(0x219)](_0x4e4df2(0x1f5)),console['error'](_0x4e4df2(0x1c9)),0x1;const _0x5f25e7=_0x2166b3[0x0],_0x2a89f4=_0x1fd3ba,_0x321e01=await resolveWorkspaceIdFromOptions(_0x2a89f4,_0x41bd61),_0x59eda7=_0x2a89f4[_0x4e4df2(0x1ed)];if(_0x59eda7){const _0x3bb4c7=await withSpinner(_0x4e4df2(0x1da)+_0x5f25e7+_0x4e4df2(0x206),()=>_0x41bd61[_0x4e4df2(0x22b)]['getTemplateFull'](_0x5f25e7,_0x321e01),{'verbose':_0x1fd3ba[_0x4e4df2(0x216)]});await handleSDKOutput([_0x3bb4c7],_0x1fd3ba);}else{const _0x9c9f21=await withSpinner(_0x4e4df2(0x1da)+_0x5f25e7+'\x27...',()=>_0x41bd61[_0x4e4df2(0x22b)][_0x4e4df2(0x238)](_0x5f25e7,_0x321e01),{'verbose':_0x1fd3ba[_0x4e4df2(0x216)]});await handleSDKOutput([_0x9c9f21],_0x1fd3ba);}return 0x0;}}export class EngageTemplateCreateCommand extends BaseCommand{[a24_0x12e534(0x224)]=a24_0x12e534(0x203);[a24_0x12e534(0x1e2)]=a24_0x12e534(0x1c2);async[a24_0x12e534(0x1d1)](_0x5d8f00){const _0x4ac841=a24_0x12e534,{options:_0x14a8ad,tdx:_0x3c26ff}=_0x5d8f00,_0x5b3622=_0x14a8ad,_0x6da154=_0x5b3622['name'],_0x23bdbe=_0x5b3622[_0x4ac841(0x1d4)],_0x3f6a1a=_0x5b3622[_0x4ac841(0x204)];if(!_0x6da154)return console[_0x4ac841(0x219)](_0x4ac841(0x249)),console[_0x4ac841(0x219)](_0x4ac841(0x213)),0x1;if(!_0x23bdbe)return console[_0x4ac841(0x219)]('Error:\x20--subject\x20is\x20required'),0x1;if(!_0x3f6a1a)return console[_0x4ac841(0x219)](_0x4ac841(0x22c)),0x1;const _0x5cbade=await resolveWorkspaceIdFromOptions(_0x5b3622,_0x3c26ff,!![]),_0x1d92d8={'name':_0x6da154,'subjectTemplate':_0x23bdbe,'htmlTemplate':_0x3f6a1a,'workspaceId':_0x5cbade,'plaintextTemplate':_0x5b3622[_0x4ac841(0x1d5)],'editorType':_0x5b3622[_0x4ac841(0x24c)]},_0x5990b2=await withSpinner('Creating\x20template\x20\x27'+_0x6da154+_0x4ac841(0x206),()=>_0x3c26ff[_0x4ac841(0x22b)]['createTemplate'](_0x1d92d8));return await handleSDKOutput([_0x5990b2[_0x4ac841(0x21a)]],_0x14a8ad),0x0;}}export class EngageTemplateUpdateCommand extends BaseCommand{[a24_0x12e534(0x224)]=a24_0x12e534(0x21b);['description']=a24_0x12e534(0x1e6);async['execute'](_0x307097){const _0x40ddcd=a24_0x12e534,{options:_0x3af2c5,args:_0x192b50,tdx:_0x224f19}=_0x307097;if(_0x192b50[_0x40ddcd(0x1f2)]===0x0)return console['error'](_0x40ddcd(0x1f5)),console[_0x40ddcd(0x219)](_0x40ddcd(0x1d8)),0x1;const _0xb58881=_0x192b50[0x0],_0xca8a68=_0x3af2c5,_0xe45438=await resolveWorkspaceIdFromOptions(_0xca8a68,_0x224f19),_0x55188a={'name':_0xca8a68[_0x40ddcd(0x224)],'subjectTemplate':_0xca8a68['subject'],'htmlTemplate':_0xca8a68[_0x40ddcd(0x204)],'plaintextTemplate':_0xca8a68[_0x40ddcd(0x1d5)]},_0x3e80d6=Object[_0x40ddcd(0x234)](Object[_0x40ddcd(0x21d)](_0x55188a)[_0x40ddcd(0x23c)](([,_0x15058d])=>_0x15058d!==undefined));if(Object['keys'](_0x3e80d6)[_0x40ddcd(0x1f2)]===0x0)return console[_0x40ddcd(0x219)](_0x40ddcd(0x1f4)),console[_0x40ddcd(0x219)](_0x40ddcd(0x23b)),0x1;const _0x58b7c9=await withSpinner(_0x40ddcd(0x1f6)+_0xb58881+_0x40ddcd(0x206),()=>_0x224f19['engage'][_0x40ddcd(0x1c3)](_0xb58881,_0x3e80d6,_0xe45438),{'verbose':_0x3af2c5[_0x40ddcd(0x216)]});return await handleSDKOutput([_0x58b7c9[_0x40ddcd(0x21a)]],_0x3af2c5),0x0;}}export class EngageTemplateDeleteCommand extends BaseCommand{[a24_0x12e534(0x224)]=a24_0x12e534(0x1d7);[a24_0x12e534(0x1e2)]=a24_0x12e534(0x233);async[a24_0x12e534(0x1d1)](_0x1f4a30){const _0x36daf6=a24_0x12e534,{options:_0x1e2917,args:_0x29d89a,tdx:_0x4d62f2}=_0x1f4a30;if(_0x29d89a[_0x36daf6(0x1f2)]===0x0)return console[_0x36daf6(0x219)]('Error:\x20Template\x20name\x20or\x20ID\x20is\x20required'),console[_0x36daf6(0x219)]('Usage:\x20tdx\x20engage\x20template\x20delete\x20<name-or-id>'),0x1;const _0x586e84=_0x29d89a[0x0],_0x4a0625=_0x1e2917,_0x3908a5=await resolveWorkspaceIdFromOptions(_0x4a0625,_0x4d62f2);if(!_0x1e2917[_0x36daf6(0x1cc)]){const _0xd91dd8=await confirm(_0x36daf6(0x1cb)+_0x586e84+_0x36daf6(0x205));if(!_0xd91dd8)return console['log'](_0x36daf6(0x20e)),0x0;}return await withSpinner('Deleting\x20template\x20\x27'+_0x586e84+_0x36daf6(0x206),()=>_0x4d62f2['engage'][_0x36daf6(0x236)](_0x586e84,_0x3908a5),{'verbose':_0x1e2917[_0x36daf6(0x216)]}),console[_0x36daf6(0x1c6)](_0x36daf6(0x237)+_0x586e84+_0x36daf6(0x1d6)),0x0;}}export class EngageWorkspacesCommand extends BaseCommand{[a24_0x12e534(0x224)]=a24_0x12e534(0x1fe);[a24_0x12e534(0x1e2)]=a24_0x12e534(0x244);async[a24_0x12e534(0x1d1)](_0x39a6dd){const _0x441a4b=a24_0x12e534,{options:_0x5a9995,args:_0x1da478,tdx:_0x2ce7ad}=_0x39a6dd,_0x12464d=_0x1da478[0x0],_0x2e3f1f=resolveLimit(_0x5a9995[_0x441a4b(0x1c8)],DEFAULT_LLM_LIMIT),_0x15810b=await withSpinner(_0x441a4b(0x23d),()=>_0x2ce7ad[_0x441a4b(0x22b)][_0x441a4b(0x1c7)]({'limit':_0x2e3f1f}),{'verbose':_0x5a9995[_0x441a4b(0x216)]});let _0x50e9f3=_0x15810b[_0x441a4b(0x21a)];return _0x12464d&&(_0x50e9f3=_0x15810b['data']['filter'](_0x38be37=>matchGlobPattern(_0x38be37[_0x441a4b(0x224)],_0x12464d))),await handleSDKOutput(_0x50e9f3,_0x5a9995),0x0;}}export class EngageWorkspaceShowCommand extends BaseCommand{['name']=a24_0x12e534(0x235);['description']=a24_0x12e534(0x24a);async[a24_0x12e534(0x1d1)](_0x406367){const _0x49f4db=a24_0x12e534,{options:_0x18e3ee,args:_0x2d91a7,tdx:_0x2809bd}=_0x406367;if(_0x2d91a7['length']===0x0)return console[_0x49f4db(0x219)]('Error:\x20Workspace\x20name\x20or\x20ID\x20is\x20required'),console[_0x49f4db(0x219)]('Usage:\x20tdx\x20engage\x20workspace\x20show\x20<name-or-id>'),0x1;const _0x3482a5=_0x2d91a7[0x0],_0x15d022=_0x18e3ee,_0x4b814e=_0x15d022[_0x49f4db(0x1ed)];if(_0x4b814e){const _0x30faad=await withSpinner(_0x49f4db(0x21e)+_0x3482a5+_0x49f4db(0x206),()=>_0x2809bd[_0x49f4db(0x22b)][_0x49f4db(0x1e4)](_0x3482a5),{'verbose':_0x18e3ee['verbose']});await handleSDKOutput([_0x30faad],_0x18e3ee);}else{const _0x8f7c9b=await withSpinner(_0x49f4db(0x21e)+_0x3482a5+_0x49f4db(0x206),()=>_0x2809bd[_0x49f4db(0x22b)][_0x49f4db(0x20a)](_0x3482a5),{'verbose':_0x18e3ee[_0x49f4db(0x216)]});await handleSDKOutput([_0x8f7c9b],_0x18e3ee);}return 0x0;}}export class EngageWorkspaceCreateCommand extends BaseCommand{[a24_0x12e534(0x224)]='engage:workspace:create';[a24_0x12e534(0x1e2)]=a24_0x12e534(0x1c4);async[a24_0x12e534(0x1d1)](_0xccbab4){const _0x147435=a24_0x12e534,{options:_0x574120,tdx:_0x2d665b}=_0xccbab4,_0x420f86=_0x574120,_0x9dfa73=_0x420f86[_0x147435(0x224)];if(!_0x9dfa73)return console[_0x147435(0x219)](_0x147435(0x249)),console['error']('Usage:\x20tdx\x20engage\x20workspace\x20create\x20--name\x20<name>\x20[--description\x20<desc>]'),0x1;const _0x31ac98={'name':_0x9dfa73,'description':_0x420f86['description']},_0x155260=await withSpinner(_0x147435(0x211)+_0x9dfa73+_0x147435(0x206),()=>_0x2d665b['engage'][_0x147435(0x241)](_0x31ac98));return await handleSDKOutput([_0x155260[_0x147435(0x21a)]],_0x574120),0x0;}}export class EngageWorkspaceUpdateCommand extends BaseCommand{[a24_0x12e534(0x224)]=a24_0x12e534(0x231);[a24_0x12e534(0x1e2)]=a24_0x12e534(0x23f);async[a24_0x12e534(0x1d1)](_0x26fe95){const _0x521a73=a24_0x12e534,{options:_0x3328f4,args:_0x567e10,tdx:_0x4afc50}=_0x26fe95;if(_0x567e10[_0x521a73(0x1f2)]===0x0)return console[_0x521a73(0x219)](_0x521a73(0x1dd)),console[_0x521a73(0x219)](_0x521a73(0x1df)),0x1;const _0x3d43bc=_0x567e10[0x0],_0x19744f=_0x3328f4,_0x4c72fb={'name':_0x19744f['name'],'description':_0x19744f[_0x521a73(0x1e2)]},_0x2f10db=Object[_0x521a73(0x234)](Object['entries'](_0x4c72fb)[_0x521a73(0x23c)](([,_0x8ddd42])=>_0x8ddd42!==undefined));if(Object['keys'](_0x2f10db)[_0x521a73(0x1f2)]===0x0)return console[_0x521a73(0x219)](_0x521a73(0x1f4)),console[_0x521a73(0x219)](_0x521a73(0x208)),0x1;const _0x152385=await withSpinner(_0x521a73(0x243)+_0x3d43bc+'\x27...',()=>_0x4afc50[_0x521a73(0x22b)][_0x521a73(0x223)](_0x3d43bc,_0x2f10db),{'verbose':_0x3328f4['verbose']});return await handleSDKOutput([_0x152385[_0x521a73(0x21a)]],_0x3328f4),0x0;}}export class EngageWorkspaceDeleteCommand extends BaseCommand{[a24_0x12e534(0x224)]=a24_0x12e534(0x1c0);['description']=a24_0x12e534(0x221);async[a24_0x12e534(0x1d1)](_0x1a6e7e){const _0x44c743=a24_0x12e534,{options:_0x26d01f,args:_0x1e9a2c,tdx:_0x3c4c2c}=_0x1a6e7e;if(_0x1e9a2c[_0x44c743(0x1f2)]===0x0)return console[_0x44c743(0x219)](_0x44c743(0x1dd)),console[_0x44c743(0x219)](_0x44c743(0x1f8)),0x1;const _0x2f4805=_0x1e9a2c[0x0];if(!_0x26d01f[_0x44c743(0x1cc)]){const _0x85ab7=await confirm(_0x44c743(0x1e9)+_0x2f4805+'\x27?\x20This\x20cannot\x20be\x20undone.');if(!_0x85ab7)return console['log'](_0x44c743(0x20e)),0x0;}return await withSpinner(_0x44c743(0x207)+_0x2f4805+'\x27...',()=>_0x3c4c2c['engage'][_0x44c743(0x1ca)](_0x2f4805),{'verbose':_0x26d01f[_0x44c743(0x216)]}),console['log']('Workspace\x20\x27'+_0x2f4805+_0x44c743(0x1d6)),0x0;}}export class EngageWorkspaceUseCommand extends BaseCommand{[a24_0x12e534(0x224)]=a24_0x12e534(0x1e3);[a24_0x12e534(0x1e2)]=a24_0x12e534(0x24d);async[a24_0x12e534(0x1d1)](_0x232cf1){const _0x1394a7=a24_0x12e534,{options:_0x5391e6,args:_0x22da2b,tdx:_0x52efae}=_0x232cf1;if(_0x22da2b[_0x1394a7(0x1f2)]===0x0)return console[_0x1394a7(0x219)](_0x1394a7(0x1f1)),console[_0x1394a7(0x219)](_0x1394a7(0x1d0)),0x1;const _0x29d839=_0x22da2b[0x0];await withSpinner('Verifying\x20workspace\x20\x27'+_0x29d839+_0x1394a7(0x206),()=>_0x52efae['engage'][_0x1394a7(0x1ea)](_0x29d839));const _0x1ab9b5=_0x5391e6[_0x1394a7(0x21c)]||undefined;return saveSessionContext({'engage_workspace':_0x29d839},_0x1ab9b5),console['log'](_0x1394a7(0x242)+_0x29d839),console[_0x1394a7(0x1c6)](_0x1394a7(0x24e)),0x0;}}
@@ -1 +1 @@
1
- const a25_0x28a739=a25_0xad55;(function(_0x4acb59,_0x1cb1d9){const _0x18f694=a25_0xad55,_0x517925=_0x4acb59();while(!![]){try{const _0x466e7f=-parseInt(_0x18f694(0x189))/0x1*(-parseInt(_0x18f694(0x188))/0x2)+-parseInt(_0x18f694(0x1bd))/0x3+-parseInt(_0x18f694(0x1b3))/0x4+-parseInt(_0x18f694(0x1b2))/0x5*(parseInt(_0x18f694(0x17e))/0x6)+-parseInt(_0x18f694(0x17b))/0x7+-parseInt(_0x18f694(0x177))/0x8*(-parseInt(_0x18f694(0x1c0))/0x9)+parseInt(_0x18f694(0x174))/0xa;if(_0x466e7f===_0x1cb1d9)break;else _0x517925['push'](_0x517925['shift']());}catch(_0x4363be){_0x517925['push'](_0x517925['shift']());}}}(a25_0x2381,0x3082f));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{readSqlStatementsFromFile}from'../utils/sql-parser.js';import{confirm}from'../utils/prompt.js';import{DEFAULT_DISPLAY_LIMIT,resolveLimit}from'../utils/constants.js';export class JobListCommand extends BaseCommand{[a25_0x28a739(0x1b5)]=a25_0x28a739(0x1b1);[a25_0x28a739(0x1c4)]=a25_0x28a739(0x1a6);async['execute'](_0x25c46c){const _0x3b6cf3=a25_0x28a739,{options:_0x38620e,tdx:_0x2f03f3}=_0x25c46c;try{const _0x474e8f=resolveLimit(_0x38620e['limit'],DEFAULT_DISPLAY_LIMIT),_0x1d98b0=_0x38620e['status'];_0x38620e[_0x3b6cf3(0x1a5)]&&(console[_0x3b6cf3(0x19c)]('Limit:\x20'+_0x474e8f+_0x3b6cf3(0x1b0)),_0x1d98b0&&console['error'](_0x3b6cf3(0x1af)+_0x1d98b0));const _0x38c276=await withSpinner(_0x3b6cf3(0x1a1),()=>_0x2f03f3[_0x3b6cf3(0x1b1)][_0x3b6cf3(0x19d)]({'from':0x0,'to':_0x474e8f-0x1,'status':_0x1d98b0}),{'verbose':_0x38620e[_0x3b6cf3(0x1a5)]}),_0x490fb5=_0x38c276[_0x3b6cf3(0x175)];console[_0x3b6cf3(0x19c)](_0x3b6cf3(0x173)+_0x490fb5[_0x3b6cf3(0x186)]+_0x3b6cf3(0x1c2)+(_0x490fb5['length']!==0x1?'s':''));const _0x33353f=_0x490fb5[_0x3b6cf3(0x1b6)](_0x63b658=>{const _0x1b7df5=_0x3b6cf3;let _0x1577d4;if(_0x63b658[_0x1b7df5(0x19b)]&&_0x63b658['end_at']){const _0x3b125c=new Date(_0x63b658[_0x1b7df5(0x19b)])[_0x1b7df5(0x1b4)](),_0xe43163=new Date(_0x63b658[_0x1b7df5(0x1a4)])['getTime']();_0x1577d4=Math[_0x1b7df5(0x1a0)]((_0xe43163-_0x3b125c)/0x3e8);}return{'job_id':_0x63b658[_0x1b7df5(0x178)],'type':_0x63b658[_0x1b7df5(0x1bf)],'status':_0x63b658[_0x1b7df5(0x1ac)],'user_name':_0x63b658[_0x1b7df5(0x182)],'duration_sec':_0x1577d4,'created_at':_0x63b658[_0x1b7df5(0x180)],'started_at':_0x63b658[_0x1b7df5(0x19b)],'end_at':_0x63b658['end_at']};});return await handleSDKOutput(_0x33353f,_0x38620e),0x0;}catch(_0x576358){if(_0x576358 instanceof SDKError)return console[_0x3b6cf3(0x19c)]('Error:\x20'+_0x576358[_0x3b6cf3(0x1a8)]),_0x576358['cause']&&console[_0x3b6cf3(0x19c)](_0x3b6cf3(0x1c1)+_0x576358[_0x3b6cf3(0x184)]),0x1;throw _0x576358;}}}function a25_0xad55(_0x56f687,_0x46855a){_0x56f687=_0x56f687-0x172;const _0x238165=a25_0x2381();let _0xad55c6=_0x238165[_0x56f687];return _0xad55c6;}function a25_0x2381(){const _0x256c85=['status','job:submit','...','Status\x20filter:\x20','\x20jobs','jobs','624905JgldGl','76804jXLxZG','getTime','name','map','hive','substring','Get\x20job\x20results','debug','Error:\x20Query\x20is\x20required','Error:\x20','955293pyJWcL','✔\x20Retrieved\x20','type','162JKCYXV','\x20\x20Cause:\x20','\x20job','Submit\x20a\x20job','description','Error:\x20Cannot\x20specify\x20both\x20query\x20argument\x20and\x20--file\x20option','✔\x20Found\x20','6420570SdCKNN','data','Getting\x20job\x20results...','79336NAXGJM','job_id','job:result','Submitting\x20job...','1115135IBHvkY','\x20\x20Job\x20ID:\x20','url','6qLAKiq','job:show','created_at','database','user_name','job:kill','cause','priority','length','✔\x20Kill\x20request\x20submitted\x20for\x20job\x20','4aqvkCf','29cpdmbw','execute','Error:\x20--job-type\x20must\x20be\x20either\x20\x22trino\x22\x20or\x20\x22hive\x22','kill','jobType','Are\x20you\x20sure\x20you\x20want\x20to\x20kill\x20job\x20','Getting\x20job\x20details...','Job\x20type:\x20','trino','\x27\x20to\x20verify\x20the\x20job\x20status','result','query','Usage:\x20job\x20kill\x20<job-id>','information_schema','Error:\x20Multiple\x20SQL\x20statements\x20found\x20in\x20file.\x20Only\x20one\x20statement\x20is\x20allowed\x20for\x20job\x20submission.','Kill\x20a\x20job','\x20\x20Note:\x20Use\x20\x27tdx\x20job\x20show\x20','Database:\x20','start_at','error','list','file','Cancelled','round','Listing\x20jobs...','Usage:\x20job\x20result\x20<job-id>','✔\x20Job\x20submitted','end_at','verbose','List\x20jobs','Submitting\x20kill\x20request...','message','Error:\x20Job\x20ID\x20is\x20required','Show\x20job\x20details','submit'];a25_0x2381=function(){return _0x256c85;};return a25_0x2381();}export class JobShowCommand extends BaseCommand{[a25_0x28a739(0x1b5)]=a25_0x28a739(0x17f);[a25_0x28a739(0x1c4)]=a25_0x28a739(0x1aa);async[a25_0x28a739(0x18a)](_0x5a8ac5){const _0x2ad5ce=a25_0x28a739,{options:_0x35b7db,args:_0x3365eb,tdx:_0x28668f}=_0x5a8ac5,_0x24b64c=_0x3365eb[0x0];if(!_0x24b64c)return console[_0x2ad5ce(0x19c)](_0x2ad5ce(0x1a9)),console[_0x2ad5ce(0x19c)]('Usage:\x20job\x20show\x20<job-id>'),0x1;try{const _0x27da9b=await withSpinner(_0x2ad5ce(0x18f),()=>_0x28668f[_0x2ad5ce(0x1b1)]['show'](_0x24b64c),{'verbose':_0x35b7db[_0x2ad5ce(0x1a5)]}),_0x4db6c7=_0x27da9b[_0x2ad5ce(0x175)];let _0x266483;if(_0x4db6c7[_0x2ad5ce(0x19b)]&&_0x4db6c7['end_at']){const _0x5d46cf=new Date(_0x4db6c7[_0x2ad5ce(0x19b)])[_0x2ad5ce(0x1b4)](),_0x5dc535=new Date(_0x4db6c7[_0x2ad5ce(0x1a4)])['getTime']();_0x266483=Math[_0x2ad5ce(0x1a0)]((_0x5dc535-_0x5d46cf)/0x3e8);}const _0xbade34={'job_id':_0x4db6c7[_0x2ad5ce(0x178)],'type':_0x4db6c7[_0x2ad5ce(0x1bf)],'status':_0x4db6c7['status'],..._0x4db6c7[_0x2ad5ce(0x182)]&&{'user_name':_0x4db6c7[_0x2ad5ce(0x182)]},..._0x266483!==undefined&&{'duration_sec':_0x266483},..._0x4db6c7['created_at']&&{'created_at':_0x4db6c7[_0x2ad5ce(0x180)]},..._0x4db6c7[_0x2ad5ce(0x19b)]&&{'started_at':_0x4db6c7[_0x2ad5ce(0x19b)]},..._0x4db6c7[_0x2ad5ce(0x1a4)]&&{'end_at':_0x4db6c7[_0x2ad5ce(0x1a4)]},..._0x4db6c7[_0x2ad5ce(0x181)]&&{'database':_0x4db6c7['database']},..._0x4db6c7['priority']!==undefined&&{'priority':_0x4db6c7[_0x2ad5ce(0x185)]},..._0x4db6c7[_0x2ad5ce(0x17d)]&&{'url':_0x4db6c7[_0x2ad5ce(0x17d)]},..._0x4db6c7[_0x2ad5ce(0x194)]&&{'query':_0x4db6c7[_0x2ad5ce(0x194)]},..._0x4db6c7[_0x2ad5ce(0x1ba)]&&{'debug':_0x4db6c7[_0x2ad5ce(0x1ba)]}};return await handleSingleObjectOutput(_0xbade34,_0x35b7db),0x0;}catch(_0x35e28e){if(_0x35e28e instanceof SDKError)return console[_0x2ad5ce(0x19c)](_0x2ad5ce(0x1bc)+_0x35e28e[_0x2ad5ce(0x1a8)]),_0x35e28e['cause']&&console[_0x2ad5ce(0x19c)](_0x2ad5ce(0x1c1)+_0x35e28e[_0x2ad5ce(0x184)]),0x1;throw _0x35e28e;}}}export class JobKillCommand extends BaseCommand{['name']=a25_0x28a739(0x183);[a25_0x28a739(0x1c4)]=a25_0x28a739(0x198);async[a25_0x28a739(0x18a)](_0x48d821){const _0x4ce840=a25_0x28a739,{options:_0x4f0e07,args:_0x52efcc,tdx:_0x89fb0b}=_0x48d821,_0x5233b3=_0x52efcc[0x0];if(!_0x5233b3)return console[_0x4ce840(0x19c)](_0x4ce840(0x1a9)),console[_0x4ce840(0x19c)](_0x4ce840(0x195)),0x1;try{if(!_0x4f0e07['yes']){const _0x212b5a=await confirm(_0x4ce840(0x18e)+_0x5233b3+'?');if(!_0x212b5a)return console[_0x4ce840(0x19c)](_0x4ce840(0x19f)),0x0;}return await withSpinner(_0x4ce840(0x1a7),()=>_0x89fb0b[_0x4ce840(0x1b1)][_0x4ce840(0x18c)](_0x5233b3),{'verbose':_0x4f0e07[_0x4ce840(0x1a5)]}),console[_0x4ce840(0x19c)](_0x4ce840(0x187)+_0x5233b3),console['error'](_0x4ce840(0x199)+_0x5233b3+_0x4ce840(0x192)),0x0;}catch(_0x449b27){if(_0x449b27 instanceof SDKError)return console[_0x4ce840(0x19c)](_0x4ce840(0x1bc)+_0x449b27['message']),_0x449b27[_0x4ce840(0x184)]&&console[_0x4ce840(0x19c)](_0x4ce840(0x1c1)+_0x449b27[_0x4ce840(0x184)]),0x1;throw _0x449b27;}}}export class JobSubmitCommand extends BaseCommand{[a25_0x28a739(0x1b5)]=a25_0x28a739(0x1ad);['description']=a25_0x28a739(0x1c3);async[a25_0x28a739(0x18a)](_0x2c268a){const _0x58338d=a25_0x28a739,{options:_0x487df7,args:_0xee5031,tdx:_0x3859af}=_0x2c268a;try{const _0x5ceab6=_0x487df7[_0x58338d(0x18d)]||'trino',_0x92afd6=_0x487df7[_0x58338d(0x19e)],_0x178b9e=_0x487df7[_0x58338d(0x181)]||_0x58338d(0x196);if(_0x5ceab6!==_0x58338d(0x191)&&_0x5ceab6!==_0x58338d(0x1b7))return console['error'](_0x58338d(0x18b)),0x1;let _0xf6647;if(_0x92afd6){if(_0xee5031[0x0])return console['error'](_0x58338d(0x172)),0x1;const _0x57bd34=readSqlStatementsFromFile(_0x92afd6);if(_0x57bd34[_0x58338d(0x186)]===0x0)return console[_0x58338d(0x19c)]('Error:\x20No\x20SQL\x20statements\x20found\x20in\x20file'),0x1;if(_0x57bd34['length']>0x1)return console[_0x58338d(0x19c)](_0x58338d(0x197)),0x1;_0xf6647=_0x57bd34[0x0];}else{if(!_0xee5031[0x0])return console[_0x58338d(0x19c)](_0x58338d(0x1bb)),console[_0x58338d(0x19c)]('Usage:\x20job\x20submit\x20<query>\x20or\x20job\x20submit\x20--file\x20<path>'),0x1;_0xf6647=_0xee5031[0x0];}_0x487df7[_0x58338d(0x1a5)]&&(console['error'](_0x58338d(0x190)+_0x5ceab6),console[_0x58338d(0x19c)](_0x58338d(0x19a)+_0x178b9e),console['error']('Query:\x20'+_0xf6647[_0x58338d(0x1b8)](0x0,0x64)+(_0xf6647['length']>0x64?_0x58338d(0x1ae):'')));const _0x2a9bf9=await withSpinner(_0x58338d(0x17a),()=>_0x3859af[_0x58338d(0x1b1)][_0x58338d(0x1ab)](_0x178b9e,_0xf6647,_0x5ceab6),{'verbose':_0x487df7[_0x58338d(0x1a5)]}),_0x1fa2d5=_0x2a9bf9[_0x58338d(0x175)];return console[_0x58338d(0x19c)](_0x58338d(0x1a3)),console[_0x58338d(0x19c)](_0x58338d(0x17c)+_0x1fa2d5[_0x58338d(0x178)]),await handleSDKOutput([_0x1fa2d5],_0x487df7),0x0;}catch(_0x31912f){if(_0x31912f instanceof SDKError)return console['error'](_0x58338d(0x1bc)+_0x31912f[_0x58338d(0x1a8)]),_0x31912f[_0x58338d(0x184)]&&console[_0x58338d(0x19c)]('\x20\x20Cause:\x20'+_0x31912f[_0x58338d(0x184)]),0x1;throw _0x31912f;}}}export class JobResultCommand extends BaseCommand{['name']=a25_0x28a739(0x179);[a25_0x28a739(0x1c4)]=a25_0x28a739(0x1b9);async['execute'](_0x514393){const _0x53d1c0=a25_0x28a739,{options:_0x4537fa,args:_0x4266ac,tdx:_0xf2114a}=_0x514393,_0x5407ff=_0x4266ac[0x0];if(!_0x5407ff)return console['error'](_0x53d1c0(0x1a9)),console[_0x53d1c0(0x19c)](_0x53d1c0(0x1a2)),0x1;try{const _0x224abc=await withSpinner(_0x53d1c0(0x176),()=>_0xf2114a['jobs'][_0x53d1c0(0x193)](_0x5407ff),{'verbose':_0x4537fa[_0x53d1c0(0x1a5)]}),_0x2492c4=_0x224abc[_0x53d1c0(0x175)];return console[_0x53d1c0(0x19c)](_0x53d1c0(0x1be)+_0x2492c4[_0x53d1c0(0x186)]+'\x20row'+(_0x2492c4['length']!==0x1?'s':'')),await handleSDKOutput(_0x2492c4,_0x4537fa),0x0;}catch(_0x434d3c){if(_0x434d3c instanceof SDKError)return console[_0x53d1c0(0x19c)](_0x53d1c0(0x1bc)+_0x434d3c[_0x53d1c0(0x1a8)]),_0x434d3c['cause']&&console['error'](_0x53d1c0(0x1c1)+_0x434d3c[_0x53d1c0(0x184)]),0x1;throw _0x434d3c;}}}
1
+ const a25_0x4f9d5d=a25_0x1af1;(function(_0x43b92d,_0x450325){const _0x172453=a25_0x1af1,_0x190415=_0x43b92d();while(!![]){try{const _0x381a88=-parseInt(_0x172453(0x1fb))/0x1*(-parseInt(_0x172453(0x1d6))/0x2)+parseInt(_0x172453(0x1fd))/0x3+parseInt(_0x172453(0x1cd))/0x4*(-parseInt(_0x172453(0x1df))/0x5)+-parseInt(_0x172453(0x1cf))/0x6+-parseInt(_0x172453(0x1c3))/0x7+parseInt(_0x172453(0x206))/0x8*(-parseInt(_0x172453(0x1d4))/0x9)+parseInt(_0x172453(0x1ee))/0xa*(parseInt(_0x172453(0x1f0))/0xb);if(_0x381a88===_0x450325)break;else _0x190415['push'](_0x190415['shift']());}catch(_0x41e4aa){_0x190415['push'](_0x190415['shift']());}}}(a25_0x164c,0x78db1));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';function a25_0x1af1(_0x2607fa,_0x22d20c){_0x2607fa=_0x2607fa-0x1b6;const _0x164c7a=a25_0x164c();let _0x1af155=_0x164c7a[_0x2607fa];return _0x1af155;}import{handleSDKOutput,handleSingleObjectOutput}from'../utils/command-output.js';import{withSpinner}from'../utils/spinner.js';import{readSqlStatementsFromFile}from'../utils/sql-parser.js';import{confirm}from'../utils/prompt.js';import{DEFAULT_DISPLAY_LIMIT,resolveLimit}from'../utils/constants.js';function a25_0x164c(){const _0x2be49a=['job_id','length','✔\x20Kill\x20request\x20submitted\x20for\x20job\x20','Usage:\x20job\x20show\x20<job-id>','List\x20jobs','job:submit','url','Are\x20you\x20sure\x20you\x20want\x20to\x20kill\x20job\x20','kill','jobs','Kill\x20a\x20job','Error:\x20Query\x20is\x20required','Getting\x20job\x20details...','2510431cyejfA','map','cause','file','\x20job','created_at','trino','data','round','Error:\x20No\x20SQL\x20statements\x20found\x20in\x20file','64388UoyJeA','Submitting\x20kill\x20request...','2078058yBLhGe','information_schema','database','list','user_name','351pBVTxm','start_at','2OUZoOq','execute','\x20\x20Job\x20ID:\x20','name','Listing\x20jobs...','description','Get\x20job\x20results','Submitting\x20job...','verbose','205atxRpO','error','✔\x20Job\x20submitted','\x20\x20Cause:\x20','yes','Getting\x20job\x20results...','hive','...','Usage:\x20job\x20kill\x20<job-id>','\x20jobs','query','getTime','result','Usage:\x20job\x20result\x20<job-id>','end_at','176830EBaxRM','priority','473cEsNHP','Database:\x20','Submit\x20a\x20job','Error:\x20Multiple\x20SQL\x20statements\x20found\x20in\x20file.\x20Only\x20one\x20statement\x20is\x20allowed\x20for\x20job\x20submission.','\x27\x20to\x20verify\x20the\x20job\x20status','✔\x20Retrieved\x20','message','Job\x20type:\x20','jobType','submit','Usage:\x20job\x20submit\x20<query>\x20or\x20job\x20submit\x20--file\x20<path>','539185PuDgWr','\x20\x20Note:\x20Use\x20\x27tdx\x20job\x20show\x20','2739186ODrqwP','Show\x20job\x20details','job:kill','Query:\x20','status','Cancelled','Error:\x20','Error:\x20Job\x20ID\x20is\x20required','debug','72336vzIvVk','Error:\x20Cannot\x20specify\x20both\x20query\x20argument\x20and\x20--file\x20option','Limit:\x20','job:result','type','show'];a25_0x164c=function(){return _0x2be49a;};return a25_0x164c();}export class JobListCommand extends BaseCommand{[a25_0x4f9d5d(0x1d9)]=a25_0x4f9d5d(0x1bf);['description']=a25_0x4f9d5d(0x1ba);async[a25_0x4f9d5d(0x1d7)](_0x366d48){const _0x25a593=a25_0x4f9d5d,{options:_0x3401e5,tdx:_0x16727c}=_0x366d48;try{const _0x192153=resolveLimit(_0x3401e5['limit'],DEFAULT_DISPLAY_LIMIT),_0x420e8c=_0x3401e5['status'];_0x3401e5[_0x25a593(0x1de)]&&(console[_0x25a593(0x1e0)](_0x25a593(0x208)+_0x192153+_0x25a593(0x1e8)),_0x420e8c&&console[_0x25a593(0x1e0)]('Status\x20filter:\x20'+_0x420e8c));const _0x3c6d70=await withSpinner(_0x25a593(0x1da),()=>_0x16727c['jobs'][_0x25a593(0x1d2)]({'from':0x0,'to':_0x192153-0x1,'status':_0x420e8c}),{'verbose':_0x3401e5[_0x25a593(0x1de)]}),_0x37f9d0=_0x3c6d70['data'];console[_0x25a593(0x1e0)]('✔\x20Found\x20'+_0x37f9d0[_0x25a593(0x1b7)]+_0x25a593(0x1c7)+(_0x37f9d0['length']!==0x1?'s':''));const _0x58f2da=_0x37f9d0[_0x25a593(0x1c4)](_0x562311=>{const _0x29125f=_0x25a593;let _0x29d6ba;if(_0x562311[_0x29125f(0x1d5)]&&_0x562311[_0x29125f(0x1ed)]){const _0x108707=new Date(_0x562311[_0x29125f(0x1d5)])[_0x29125f(0x1ea)](),_0x48283e=new Date(_0x562311['end_at'])[_0x29125f(0x1ea)]();_0x29d6ba=Math[_0x29125f(0x1cb)]((_0x48283e-_0x108707)/0x3e8);}return{'job_id':_0x562311['job_id'],'type':_0x562311[_0x29125f(0x20a)],'status':_0x562311['status'],'user_name':_0x562311['user_name'],'duration_sec':_0x29d6ba,'created_at':_0x562311[_0x29125f(0x1c8)],'started_at':_0x562311['start_at'],'end_at':_0x562311[_0x29125f(0x1ed)]};});return await handleSDKOutput(_0x58f2da,_0x3401e5),0x0;}catch(_0x26e279){if(_0x26e279 instanceof SDKError)return console['error']('Error:\x20'+_0x26e279[_0x25a593(0x1f6)]),_0x26e279[_0x25a593(0x1c5)]&&console[_0x25a593(0x1e0)]('\x20\x20Cause:\x20'+_0x26e279[_0x25a593(0x1c5)]),0x1;throw _0x26e279;}}}export class JobShowCommand extends BaseCommand{['name']='job:show';[a25_0x4f9d5d(0x1db)]=a25_0x4f9d5d(0x1fe);async['execute'](_0x3e210d){const _0x173365=a25_0x4f9d5d,{options:_0x256577,args:_0x5a18a2,tdx:_0x5bee14}=_0x3e210d,_0x492d57=_0x5a18a2[0x0];if(!_0x492d57)return console[_0x173365(0x1e0)](_0x173365(0x204)),console[_0x173365(0x1e0)](_0x173365(0x1b9)),0x1;try{const _0x4f63e2=await withSpinner(_0x173365(0x1c2),()=>_0x5bee14[_0x173365(0x1bf)][_0x173365(0x20b)](_0x492d57),{'verbose':_0x256577['verbose']}),_0x196535=_0x4f63e2[_0x173365(0x1ca)];let _0x4dbce2;if(_0x196535[_0x173365(0x1d5)]&&_0x196535[_0x173365(0x1ed)]){const _0x2b605c=new Date(_0x196535['start_at'])[_0x173365(0x1ea)](),_0x3732f8=new Date(_0x196535['end_at'])[_0x173365(0x1ea)]();_0x4dbce2=Math['round']((_0x3732f8-_0x2b605c)/0x3e8);}const _0x53ac8b={'job_id':_0x196535[_0x173365(0x1b6)],'type':_0x196535[_0x173365(0x20a)],'status':_0x196535[_0x173365(0x201)],..._0x196535[_0x173365(0x1d3)]&&{'user_name':_0x196535[_0x173365(0x1d3)]},..._0x4dbce2!==undefined&&{'duration_sec':_0x4dbce2},..._0x196535['created_at']&&{'created_at':_0x196535[_0x173365(0x1c8)]},..._0x196535[_0x173365(0x1d5)]&&{'started_at':_0x196535['start_at']},..._0x196535[_0x173365(0x1ed)]&&{'end_at':_0x196535[_0x173365(0x1ed)]},..._0x196535[_0x173365(0x1d1)]&&{'database':_0x196535[_0x173365(0x1d1)]},..._0x196535[_0x173365(0x1ef)]!==undefined&&{'priority':_0x196535['priority']},..._0x196535[_0x173365(0x1bc)]&&{'url':_0x196535['url']},..._0x196535['query']&&{'query':_0x196535[_0x173365(0x1e9)]},..._0x196535[_0x173365(0x205)]&&{'debug':_0x196535[_0x173365(0x205)]}};return await handleSingleObjectOutput(_0x53ac8b,_0x256577),0x0;}catch(_0x4461aa){if(_0x4461aa instanceof SDKError)return console[_0x173365(0x1e0)](_0x173365(0x203)+_0x4461aa[_0x173365(0x1f6)]),_0x4461aa[_0x173365(0x1c5)]&&console[_0x173365(0x1e0)](_0x173365(0x1e2)+_0x4461aa[_0x173365(0x1c5)]),0x1;throw _0x4461aa;}}}export class JobKillCommand extends BaseCommand{[a25_0x4f9d5d(0x1d9)]=a25_0x4f9d5d(0x1ff);['description']=a25_0x4f9d5d(0x1c0);async[a25_0x4f9d5d(0x1d7)](_0x46198c){const _0x278998=a25_0x4f9d5d,{options:_0x3bcdd7,args:_0xb00da,tdx:_0x267546}=_0x46198c,_0x5bae45=_0xb00da[0x0];if(!_0x5bae45)return console[_0x278998(0x1e0)](_0x278998(0x204)),console[_0x278998(0x1e0)](_0x278998(0x1e7)),0x1;try{if(!_0x3bcdd7[_0x278998(0x1e3)]){const _0x5bb51a=await confirm(_0x278998(0x1bd)+_0x5bae45+'?');if(!_0x5bb51a)return console[_0x278998(0x1e0)](_0x278998(0x202)),0x0;}return await withSpinner(_0x278998(0x1ce),()=>_0x267546['jobs'][_0x278998(0x1be)](_0x5bae45),{'verbose':_0x3bcdd7[_0x278998(0x1de)]}),console['error'](_0x278998(0x1b8)+_0x5bae45),console[_0x278998(0x1e0)](_0x278998(0x1fc)+_0x5bae45+_0x278998(0x1f4)),0x0;}catch(_0x265c4f){if(_0x265c4f instanceof SDKError)return console['error'](_0x278998(0x203)+_0x265c4f['message']),_0x265c4f[_0x278998(0x1c5)]&&console[_0x278998(0x1e0)](_0x278998(0x1e2)+_0x265c4f[_0x278998(0x1c5)]),0x1;throw _0x265c4f;}}}export class JobSubmitCommand extends BaseCommand{[a25_0x4f9d5d(0x1d9)]=a25_0x4f9d5d(0x1bb);['description']=a25_0x4f9d5d(0x1f2);async[a25_0x4f9d5d(0x1d7)](_0x78d326){const _0x24cdc6=a25_0x4f9d5d,{options:_0x4b74d8,args:_0x532e3a,tdx:_0x5b84e8}=_0x78d326;try{const _0x587191=_0x4b74d8[_0x24cdc6(0x1f8)]||_0x24cdc6(0x1c9),_0x4bf305=_0x4b74d8[_0x24cdc6(0x1c6)],_0x21c293=_0x4b74d8[_0x24cdc6(0x1d1)]||_0x24cdc6(0x1d0);if(_0x587191!==_0x24cdc6(0x1c9)&&_0x587191!==_0x24cdc6(0x1e5))return console[_0x24cdc6(0x1e0)]('Error:\x20--job-type\x20must\x20be\x20either\x20\x22trino\x22\x20or\x20\x22hive\x22'),0x1;let _0xbaf339;if(_0x4bf305){if(_0x532e3a[0x0])return console[_0x24cdc6(0x1e0)](_0x24cdc6(0x207)),0x1;const _0x2d56f7=readSqlStatementsFromFile(_0x4bf305);if(_0x2d56f7[_0x24cdc6(0x1b7)]===0x0)return console[_0x24cdc6(0x1e0)](_0x24cdc6(0x1cc)),0x1;if(_0x2d56f7[_0x24cdc6(0x1b7)]>0x1)return console[_0x24cdc6(0x1e0)](_0x24cdc6(0x1f3)),0x1;_0xbaf339=_0x2d56f7[0x0];}else{if(!_0x532e3a[0x0])return console[_0x24cdc6(0x1e0)](_0x24cdc6(0x1c1)),console[_0x24cdc6(0x1e0)](_0x24cdc6(0x1fa)),0x1;_0xbaf339=_0x532e3a[0x0];}_0x4b74d8['verbose']&&(console[_0x24cdc6(0x1e0)](_0x24cdc6(0x1f7)+_0x587191),console['error'](_0x24cdc6(0x1f1)+_0x21c293),console[_0x24cdc6(0x1e0)](_0x24cdc6(0x200)+_0xbaf339['substring'](0x0,0x64)+(_0xbaf339[_0x24cdc6(0x1b7)]>0x64?_0x24cdc6(0x1e6):'')));const _0x1eb15f=await withSpinner(_0x24cdc6(0x1dd),()=>_0x5b84e8[_0x24cdc6(0x1bf)][_0x24cdc6(0x1f9)](_0x21c293,_0xbaf339,_0x587191),{'verbose':_0x4b74d8[_0x24cdc6(0x1de)]}),_0x5e5707=_0x1eb15f[_0x24cdc6(0x1ca)];return console[_0x24cdc6(0x1e0)](_0x24cdc6(0x1e1)),console['error'](_0x24cdc6(0x1d8)+_0x5e5707[_0x24cdc6(0x1b6)]),await handleSDKOutput([_0x5e5707],_0x4b74d8),0x0;}catch(_0x2e00f6){if(_0x2e00f6 instanceof SDKError)return console['error']('Error:\x20'+_0x2e00f6[_0x24cdc6(0x1f6)]),_0x2e00f6[_0x24cdc6(0x1c5)]&&console[_0x24cdc6(0x1e0)](_0x24cdc6(0x1e2)+_0x2e00f6[_0x24cdc6(0x1c5)]),0x1;throw _0x2e00f6;}}}export class JobResultCommand extends BaseCommand{[a25_0x4f9d5d(0x1d9)]=a25_0x4f9d5d(0x209);[a25_0x4f9d5d(0x1db)]=a25_0x4f9d5d(0x1dc);async[a25_0x4f9d5d(0x1d7)](_0x590538){const _0x47f697=a25_0x4f9d5d,{options:_0x4a1616,args:_0x38e752,tdx:_0x53b0dc}=_0x590538,_0x10970b=_0x38e752[0x0];if(!_0x10970b)return console[_0x47f697(0x1e0)](_0x47f697(0x204)),console[_0x47f697(0x1e0)](_0x47f697(0x1ec)),0x1;try{const _0x1f3c83=await withSpinner(_0x47f697(0x1e4),()=>_0x53b0dc[_0x47f697(0x1bf)][_0x47f697(0x1eb)](_0x10970b),{'verbose':_0x4a1616[_0x47f697(0x1de)]}),_0x5cdc06=_0x1f3c83[_0x47f697(0x1ca)];return console[_0x47f697(0x1e0)](_0x47f697(0x1f5)+_0x5cdc06[_0x47f697(0x1b7)]+'\x20row'+(_0x5cdc06[_0x47f697(0x1b7)]!==0x1?'s':'')),await handleSDKOutput(_0x5cdc06,_0x4a1616),0x0;}catch(_0x5308cb){if(_0x5308cb instanceof SDKError)return console[_0x47f697(0x1e0)](_0x47f697(0x203)+_0x5308cb[_0x47f697(0x1f6)]),_0x5308cb[_0x47f697(0x1c5)]&&console[_0x47f697(0x1e0)](_0x47f697(0x1e2)+_0x5308cb[_0x47f697(0x1c5)]),0x1;throw _0x5308cb;}}}