@treasuredata/tdx 0.23.1 → 0.24.0

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 (164) hide show
  1. package/dist/bin.js +1 -1
  2. package/dist/build-info.json +3 -3
  3. package/dist/cli-categories.js +1 -1
  4. package/dist/cli.js +1 -1
  5. package/dist/commands/activations.js +1 -1
  6. package/dist/commands/agent-command.js +1 -1
  7. package/dist/commands/agent-test-command.js +1 -1
  8. package/dist/commands/api-command.js +1 -1
  9. package/dist/commands/auth-command.js +1 -1
  10. package/dist/commands/chat-command.js +1 -1
  11. package/dist/commands/claude-command.js +1 -1
  12. package/dist/commands/claude-statusline-command.js +1 -1
  13. package/dist/commands/claude-usage-command.js +1 -1
  14. package/dist/commands/command.js +1 -1
  15. package/dist/commands/connection-command.js +1 -1
  16. package/dist/commands/databases.js +1 -1
  17. package/dist/commands/describe.js +1 -1
  18. package/dist/commands/engage-command.js +1 -1
  19. package/dist/commands/job-command.js +1 -1
  20. package/dist/commands/journey-command.js +1 -1
  21. package/dist/commands/journey-validate-command.js +1 -1
  22. package/dist/commands/llm-command.js +1 -1
  23. package/dist/commands/mcp-command.js +1 -1
  24. package/dist/commands/parent-segment-command.js +1 -1
  25. package/dist/commands/profile-command.js +1 -1
  26. package/dist/commands/profiles-command.js +1 -1
  27. package/dist/commands/query-command.js +1 -1
  28. package/dist/commands/schedule-command.js +1 -1
  29. package/dist/commands/segment-command.js +1 -1
  30. package/dist/commands/segment-create-command.js +1 -1
  31. package/dist/commands/segment-fields-command.js +1 -1
  32. package/dist/commands/segment-pull-command.js +1 -1
  33. package/dist/commands/segment-push-command.js +1 -1
  34. package/dist/commands/segment-update-command.js +1 -1
  35. package/dist/commands/segment-use-command.js +1 -1
  36. package/dist/commands/segment-validate-command.js +1 -1
  37. package/dist/commands/segments.js +1 -1
  38. package/dist/commands/show.js +1 -1
  39. package/dist/commands/status-command.js +1 -1
  40. package/dist/commands/tables.js +1 -1
  41. package/dist/commands/unset-command.js +1 -1
  42. package/dist/commands/use-command.js +1 -1
  43. package/dist/commands/user-command.js +1 -1
  44. package/dist/commands/workflow-command.js +1 -1
  45. package/dist/core/auth.js +1 -1
  46. package/dist/core/command-output.js +1 -1
  47. package/dist/core/config.js +1 -1
  48. package/dist/core/connection-cache.js +1 -1
  49. package/dist/core/constants.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/core/version.js +1 -1
  58. package/dist/index.js +1 -1
  59. package/dist/mcp/server.js +1 -1
  60. package/dist/mcp/tools/index.js +1 -1
  61. package/dist/mcp/tools/tdx-run.js +1 -1
  62. package/dist/mcp/tools/tdx-search.js +1 -1
  63. package/dist/mcp/utils.js +1 -1
  64. package/dist/proxy/claude-usage-tracker.js +1 -1
  65. package/dist/proxy/passthrough-server.js +1 -1
  66. package/dist/proxy/sse-usage-parser.js +1 -1
  67. package/dist/sdk/agent/agent-config.js +1 -1
  68. package/dist/sdk/agent/agent-ref-parser.js +1 -1
  69. package/dist/sdk/agent/agent-yaml.js +1 -1
  70. package/dist/sdk/agent/test/evaluator.js +1 -1
  71. package/dist/sdk/agent/test/executor.js +1 -1
  72. package/dist/sdk/agent/test/index.js +1 -1
  73. package/dist/sdk/agent/test/output.js +1 -1
  74. package/dist/sdk/agent/test/parser.js +1 -1
  75. package/dist/sdk/api.js +1 -1
  76. package/dist/sdk/client/cdp-api-client.js +1 -1
  77. package/dist/sdk/client/endpoints.js +1 -1
  78. package/dist/sdk/client/engage-api-client.js +1 -1
  79. package/dist/sdk/client/http-client.js +1 -1
  80. package/dist/sdk/client/llm-api-client.js +1 -1
  81. package/dist/sdk/client/rate-limiter.js +1 -1
  82. package/dist/sdk/client/td-api-client.js +1 -1
  83. package/dist/sdk/client/trino-api-client.js +1 -1
  84. package/dist/sdk/client/workflow-client.js +1 -1
  85. package/dist/sdk/connection-validator.js +1 -1
  86. package/dist/sdk/connection.js +1 -1
  87. package/dist/sdk/engage.js +1 -1
  88. package/dist/sdk/errors.js +1 -1
  89. package/dist/sdk/index.js +1 -1
  90. package/dist/sdk/io/index.js +1 -1
  91. package/dist/sdk/io/node-filesystem.js +1 -1
  92. package/dist/sdk/job.js +1 -1
  93. package/dist/sdk/journey.js +1 -1
  94. package/dist/sdk/llm/chat-cache.js +1 -1
  95. package/dist/sdk/llm/index.js +1 -1
  96. package/dist/sdk/llm/llm-backup-utils.js +1 -1
  97. package/dist/sdk/llm/model-factors.js +1 -1
  98. package/dist/sdk/query/index.js +1 -1
  99. package/dist/sdk/query/sql-parser.js +1 -1
  100. package/dist/sdk/schedule.js +1 -1
  101. package/dist/sdk/segment/child-segment-yaml.js +1 -1
  102. package/dist/sdk/segment/fields-display.js +1 -1
  103. package/dist/sdk/segment/file-discovery.js +1 -1
  104. package/dist/sdk/segment/journey-utils.js +1 -1
  105. package/dist/sdk/segment/journey-yaml.js +1 -1
  106. package/dist/sdk/segment/parent-segment-preview.js +1 -1
  107. package/dist/sdk/segment/parent-segment-yaml.js +1 -1
  108. package/dist/sdk/segment/pull-workflow.js +1 -1
  109. package/dist/sdk/segment/push-workflow.js +1 -1
  110. package/dist/sdk/segment/resolution-context.js +1 -1
  111. package/dist/sdk/segment/segment-path-parser.js +1 -1
  112. package/dist/sdk/segment/segment-ref-parser.js +1 -1
  113. package/dist/sdk/segment/target-resolution.js +1 -1
  114. package/dist/sdk/segment/tdx-config.js +1 -1
  115. package/dist/sdk/segment/validate-files.js +1 -1
  116. package/dist/sdk/segment/yaml-validator.js +1 -1
  117. package/dist/sdk/segment.js +1 -1
  118. package/dist/sdk/types/index.js +1 -1
  119. package/dist/sdk/types/progress.js +1 -1
  120. package/dist/sdk/user.js +1 -1
  121. package/dist/sdk/util/format-detector.js +1 -1
  122. package/dist/sdk/util/formatters.js +1 -1
  123. package/dist/sdk/util/index.js +1 -1
  124. package/dist/sdk/util/tree-formatter.js +1 -1
  125. package/dist/sdk/workflow/archive-validation.js +1 -1
  126. package/dist/sdk/workflow/clone-workflow.js +1 -1
  127. package/dist/sdk/workflow/index.js +1 -1
  128. package/dist/sdk/workflow/pull-workflow.js +1 -1
  129. package/dist/sdk/workflow/push-workflow.js +1 -1
  130. package/dist/sdk/workflow/tdx-config.js +1 -1
  131. package/dist/sdk/workflow/workflow-utils.js +1 -1
  132. package/dist/test-utils/command-runner.js +1 -1
  133. package/dist/test-utils/factories.js +1 -1
  134. package/dist/test-utils/fixtures.js +1 -1
  135. package/dist/test-utils/http-mock.js +1 -1
  136. package/dist/test-utils/index.js +1 -1
  137. package/dist/utils/async.js +1 -1
  138. package/dist/utils/colors.js +1 -1
  139. package/dist/utils/diff.js +1 -1
  140. package/dist/utils/file-permissions.js +1 -1
  141. package/dist/utils/global-cache.js +1 -1
  142. package/dist/utils/json-loader.js +1 -1
  143. package/dist/utils/local-cache.js +1 -1
  144. package/dist/utils/logger/formatters/default-formatter.js +1 -1
  145. package/dist/utils/logger/formatters/index.js +1 -1
  146. package/dist/utils/logger/handlers/console-handler.js +1 -1
  147. package/dist/utils/logger/handlers/file-handler.js +1 -1
  148. package/dist/utils/logger/handlers/index.js +1 -1
  149. package/dist/utils/logger/handlers/null-handler.js +1 -1
  150. package/dist/utils/logger/index.js +1 -1
  151. package/dist/utils/logger/logger.js +1 -1
  152. package/dist/utils/logger/types.js +1 -1
  153. package/dist/utils/option-validation.js +1 -1
  154. package/dist/utils/port.js +1 -1
  155. package/dist/utils/process.js +1 -1
  156. package/dist/utils/process.js.map +1 -1
  157. package/dist/utils/prompt.js +1 -1
  158. package/dist/utils/spinner.js +1 -1
  159. package/dist/utils/sse-parser.js +1 -1
  160. package/dist/utils/string-utils.js +1 -1
  161. package/dist/utils/table-ref-parser.js +1 -1
  162. package/dist/utils/tdx-logger.js +1 -1
  163. package/dist/utils/version-check.js +1 -1
  164. package/package.json +1 -1
@@ -1 +1 @@
1
- const a32_0x12d2af=a32_0x274d;(function(_0x18bc6e,_0x405f4a){const _0xf1e1e4=a32_0x274d,_0x43c6cd=_0x18bc6e();while(!![]){try{const _0x58d82f=-parseInt(_0xf1e1e4(0x165))/0x1+parseInt(_0xf1e1e4(0x176))/0x2+parseInt(_0xf1e1e4(0x178))/0x3*(parseInt(_0xf1e1e4(0x164))/0x4)+-parseInt(_0xf1e1e4(0x160))/0x5*(parseInt(_0xf1e1e4(0x15a))/0x6)+parseInt(_0xf1e1e4(0x161))/0x7+parseInt(_0xf1e1e4(0x16d))/0x8+-parseInt(_0xf1e1e4(0x156))/0x9*(parseInt(_0xf1e1e4(0x173))/0xa);if(_0x58d82f===_0x405f4a)break;else _0x43c6cd['push'](_0x43c6cd['shift']());}catch(_0xc02116){_0x43c6cd['push'](_0x43c6cd['shift']());}}}(a32_0xcff5,0xf0113));import{BaseCommand}from'./command.js';import{handleSDKOutput}from'../core/command-output.js';function a32_0x274d(_0x598386,_0x24c855){_0x598386=_0x598386-0x151;const _0xcff514=a32_0xcff5();let _0x274d99=_0xcff514[_0x598386];return _0x274d99;}import{withSpinner}from'../utils/spinner.js';import{loadJSONFromOptions}from'../utils/json-loader.js';import{SDKError,ErrorCode}from'../sdk/index.js';import a32_0x4edd02 from'chalk';export class SegmentUpdateCommand extends BaseCommand{[a32_0x12d2af(0x174)]=a32_0x12d2af(0x162);[a32_0x12d2af(0x16f)]=a32_0x12d2af(0x17c);async[a32_0x12d2af(0x17b)](_0x4ffdf6){const _0x594427=a32_0x12d2af;console[_0x594427(0x17e)](a32_0x4edd02[_0x594427(0x17a)](_0x594427(0x159))),console[_0x594427(0x17e)](a32_0x4edd02[_0x594427(0x17a)](_0x594427(0x170)));const {options:_0x3b1ab5,args:_0x59b7ab,tdx:_0x38b8d9}=_0x4ffdf6,_0x127d29=_0x3b1ab5;if(_0x59b7ab[_0x594427(0x179)]===0x0)return console[_0x594427(0x17e)](_0x594427(0x182)),console[_0x594427(0x17e)](_0x594427(0x163)),console['error']('Examples:'),console[_0x594427(0x17e)](_0x594427(0x152)),console[_0x594427(0x17e)](_0x594427(0x183)),0x1;const _0x39e6e2=_0x59b7ab[0x0],_0x3fccbc=_0x3b1ab5[_0x594427(0x184)];let _0x2e59af=_0x39e6e2;_0x3fccbc&&!_0x39e6e2[_0x594427(0x15c)]('/')&&(_0x2e59af=_0x3fccbc+'/'+_0x39e6e2,_0x127d29[_0x594427(0x16c)]&&console[_0x594427(0x17e)](_0x594427(0x15b)+_0x2e59af));const _0x54182b=await withSpinner(_0x594427(0x171)+_0x2e59af+_0x594427(0x172),()=>_0x38b8d9[_0x594427(0x15f)][_0x594427(0x16a)](_0x2e59af),{'verbose':_0x127d29['verbose']}),_0x43aad1=_0x54182b[_0x594427(0x168)];_0x127d29['verbose']&&console['error']('Resolved\x20type:\x20'+_0x43aad1[_0x594427(0x167)]);if(_0x43aad1['type']!==_0x594427(0x15f))return console[_0x594427(0x17e)]('Error:\x20Cannot\x20update\x20'+_0x43aad1['type']+_0x594427(0x154)),console[_0x594427(0x17e)](_0x594427(0x177)),0x1;if(!_0x43aad1[_0x594427(0x16b)])throw new SDKError(ErrorCode[_0x594427(0x15d)],_0x594427(0x17d));const _0x5c725b=_0x43aad1[_0x594427(0x180)],_0x5e1e93=_0x43aad1['segmentId'];_0x127d29[_0x594427(0x16c)]&&(console[_0x594427(0x17e)](_0x594427(0x185)+_0x5c725b),console['error'](_0x594427(0x17f)+_0x5e1e93));let _0xdba0dc;if(_0x127d29[_0x594427(0x169)]){const _0x444864=_0x127d29[_0x594427(0x169)],_0x11f417=await withSpinner(_0x594427(0x157)+_0x444864+_0x594427(0x172),()=>_0x38b8d9[_0x594427(0x15f)][_0x594427(0x181)](_0x5c725b,_0x444864),{'verbose':_0x127d29[_0x594427(0x16c)]});_0xdba0dc=parseInt(_0x11f417[_0x594427(0x168)],0xa),_0x127d29[_0x594427(0x16c)]&&console[_0x594427(0x17e)](_0x594427(0x166)+_0xdba0dc);}const _0x3dd312=await loadJSONFromOptions(_0x127d29['rule'],_0x127d29[_0x594427(0x155)]),_0x5e5ba5={'name':_0x127d29[_0x594427(0x174)],'description':_0x127d29[_0x594427(0x16f)],'rule':_0x3dd312,'kind':_0x127d29[_0x594427(0x151)]!==undefined?parseInt(_0x127d29[_0x594427(0x151)],0xa):undefined,'segmentFolderId':_0xdba0dc},_0x20ffe0=await withSpinner(_0x594427(0x16e)+_0x43aad1[_0x594427(0x15e)]+'\x27...',()=>_0x38b8d9['segment'][_0x594427(0x153)](_0x5c725b,_0x5e1e93,_0x5e5ba5),{'verbose':_0x127d29[_0x594427(0x16c)]}),_0x395fea=_0x20ffe0[_0x594427(0x168)];return console[_0x594427(0x17e)](_0x594427(0x175)+_0x395fea[_0x594427(0x174)]+'\x27'),_0x2e59af!==_0x39e6e2&&console['error'](_0x594427(0x158)+_0x2e59af),await handleSDKOutput([_0x395fea],_0x127d29),0x0;}}function a32_0xcff5(){const _0x43abe3=['ruleFile','18tdLGoW','Resolving\x20folder\x20\x27','\x20\x20\x20Path:\x20','⚠\x20Deprecation\x20warning:\x20`segment\x20update`\x20is\x20deprecated.','3194832jHaitZ','Resolved\x20relative\x20path\x20to:\x20','includes','INTERNAL','segmentName','segment','10PIhnhV','3624257zEcfIs','segment:update','Usage:\x20tdx\x20segment\x20update\x20<path>\x20[options]','23216jEXLif','561451XijLYp','Resolved\x20folder\x20ID:\x20','type','data','folder','resolvePathToResource','segmentId','verbose','11041304omXMJQ','Updating\x20segment\x20\x27','description','\x20\x20Use\x20`tdx\x20sg\x20push`\x20with\x20YAML\x20files\x20instead.\x0a','Resolving\x20path\x20\x27','\x27...','10022030kRMdCv','name','✔\x20Updated\x20segment\x20\x27','2391108PAsuOy','Use:\x20tdx\x20segment\x20update\x20<path_to_segment>\x20[options]','786kQYHct','length','yellow','execute','Update\x20existing\x20child\x20segment','Segment\x20ID\x20missing\x20from\x20resolved\x20path','error','Segment\x20ID:\x20','parentId','resolveFolderId','Error:\x20Segment\x20path\x20or\x20name\x20is\x20required','\x20\x20tdx\x20segment\x20update\x20\x22High\x20Value\x22\x20--rule\x20\x27...\x27\x20\x20#\x20Relative\x20to\x20context','segmentPath','Parent\x20ID:\x20','kind','\x20\x20tdx\x20segment\x20update\x20\x22My\x20Audience/High\x20Value\x22\x20--description\x20\x22...\x22','updateSegmentById','.\x20Only\x20child\x20segments\x20can\x20be\x20updated.'];a32_0xcff5=function(){return _0x43abe3;};return a32_0xcff5();}
1
+ const a32_0x3921de=a32_0x1c4d;function a32_0x1c4d(_0x409caf,_0x4dcf78){_0x409caf=_0x409caf-0x118;const _0x1ebf93=a32_0x1ebf();let _0x1c4d09=_0x1ebf93[_0x409caf];return _0x1c4d09;}(function(_0x11591c,_0x85dc75){const _0x1d61f5=a32_0x1c4d,_0x5cc810=_0x11591c();while(!![]){try{const _0x4e8d00=parseInt(_0x1d61f5(0x126))/0x1+parseInt(_0x1d61f5(0x11f))/0x2*(-parseInt(_0x1d61f5(0x12c))/0x3)+parseInt(_0x1d61f5(0x12f))/0x4*(parseInt(_0x1d61f5(0x12d))/0x5)+-parseInt(_0x1d61f5(0x12a))/0x6*(parseInt(_0x1d61f5(0x11e))/0x7)+parseInt(_0x1d61f5(0x133))/0x8*(-parseInt(_0x1d61f5(0x142))/0x9)+-parseInt(_0x1d61f5(0x145))/0xa+parseInt(_0x1d61f5(0x125))/0xb*(parseInt(_0x1d61f5(0x144))/0xc);if(_0x4e8d00===_0x85dc75)break;else _0x5cc810['push'](_0x5cc810['shift']());}catch(_0x21d259){_0x5cc810['push'](_0x5cc810['shift']());}}}(a32_0x1ebf,0xd0221));import{BaseCommand}from'./command.js';import{handleSDKOutput}from'../core/command-output.js';import{withSpinner}from'../utils/spinner.js';import{loadJSONFromOptions}from'../utils/json-loader.js';function a32_0x1ebf(){const _0x41fd6e=['resolveFolderId','\x20\x20\x20Path:\x20','type','folder','updateSegmentById','segment:update','parentId','resolvePathToResource','INTERNAL','error','data','yellow','Use:\x20tdx\x20segment\x20update\x20<path_to_segment>\x20[options]','9pvUMcV','includes','130056zDoWkZ','8602410bMrjNT','Segment\x20ID\x20missing\x20from\x20resolved\x20path','description','Resolved\x20folder\x20ID:\x20','verbose','segment','execute','\x20\x20Use\x20`tdx\x20sg\x20push`\x20with\x20YAML\x20files\x20instead.\x0a','Usage:\x20tdx\x20segment\x20update\x20<path>\x20[options]','kind','\x20\x20tdx\x20segment\x20update\x20\x22My\x20Audience/High\x20Value\x22\x20--description\x20\x22...\x22','segmentPath','\x27...','157619dkGkBQ','164QiDViN','segmentName','name','Resolved\x20type:\x20','Segment\x20ID:\x20','Resolving\x20folder\x20\x27','1595nTZvrT','1148450zYYClC','rule','Parent\x20ID:\x20','ruleFile','138gyDRDU','Update\x20existing\x20child\x20segment','26526VMMFxl','1133085SJjUiP','.\x20Only\x20child\x20segments\x20can\x20be\x20updated.','12cIvvFg','Updating\x20segment\x20\x27','segmentId','Error:\x20Segment\x20path\x20or\x20name\x20is\x20required','3552976nvqnFD','Error:\x20Cannot\x20update\x20'];a32_0x1ebf=function(){return _0x41fd6e;};return a32_0x1ebf();}import{SDKError,ErrorCode}from'../sdk/index.js';import a32_0x37a9a7 from'chalk';export class SegmentUpdateCommand extends BaseCommand{['name']=a32_0x3921de(0x13a);[a32_0x3921de(0x147)]=a32_0x3921de(0x12b);async[a32_0x3921de(0x14b)](_0x20acb6){const _0x5454f6=a32_0x3921de;console[_0x5454f6(0x13e)](a32_0x37a9a7['yellow']('⚠\x20Deprecation\x20warning:\x20`segment\x20update`\x20is\x20deprecated.')),console['error'](a32_0x37a9a7[_0x5454f6(0x140)](_0x5454f6(0x118)));const {options:_0x1b43ad,args:_0x2cb12f,tdx:_0x3332e8}=_0x20acb6,_0x3fbe98=_0x1b43ad;if(_0x2cb12f['length']===0x0)return console[_0x5454f6(0x13e)](_0x5454f6(0x132)),console[_0x5454f6(0x13e)](_0x5454f6(0x119)),console['error']('Examples:'),console[_0x5454f6(0x13e)](_0x5454f6(0x11b)),console[_0x5454f6(0x13e)]('\x20\x20tdx\x20segment\x20update\x20\x22High\x20Value\x22\x20--rule\x20\x27...\x27\x20\x20#\x20Relative\x20to\x20context'),0x1;const _0x230edc=_0x2cb12f[0x0],_0xb7c5aa=_0x1b43ad[_0x5454f6(0x11c)];let _0x408c4e=_0x230edc;_0xb7c5aa&&!_0x230edc[_0x5454f6(0x143)]('/')&&(_0x408c4e=_0xb7c5aa+'/'+_0x230edc,_0x3fbe98[_0x5454f6(0x149)]&&console[_0x5454f6(0x13e)]('Resolved\x20relative\x20path\x20to:\x20'+_0x408c4e));const _0x5c83db=await withSpinner('Resolving\x20path\x20\x27'+_0x408c4e+_0x5454f6(0x11d),()=>_0x3332e8[_0x5454f6(0x14a)][_0x5454f6(0x13c)](_0x408c4e),{'verbose':_0x3fbe98[_0x5454f6(0x149)]}),_0x1d6621=_0x5c83db[_0x5454f6(0x13f)];_0x3fbe98[_0x5454f6(0x149)]&&console[_0x5454f6(0x13e)](_0x5454f6(0x122)+_0x1d6621[_0x5454f6(0x137)]);if(_0x1d6621[_0x5454f6(0x137)]!==_0x5454f6(0x14a))return console[_0x5454f6(0x13e)](_0x5454f6(0x134)+_0x1d6621[_0x5454f6(0x137)]+_0x5454f6(0x12e)),console[_0x5454f6(0x13e)](_0x5454f6(0x141)),0x1;if(!_0x1d6621[_0x5454f6(0x131)])throw new SDKError(ErrorCode[_0x5454f6(0x13d)],_0x5454f6(0x146));const _0x3b151b=_0x1d6621[_0x5454f6(0x13b)],_0x131713=_0x1d6621[_0x5454f6(0x131)];_0x3fbe98[_0x5454f6(0x149)]&&(console[_0x5454f6(0x13e)](_0x5454f6(0x128)+_0x3b151b),console[_0x5454f6(0x13e)](_0x5454f6(0x123)+_0x131713));let _0x5c7cca;if(_0x3fbe98['folder']){const _0x169e4e=_0x3fbe98[_0x5454f6(0x138)],_0x3d1626=await withSpinner(_0x5454f6(0x124)+_0x169e4e+_0x5454f6(0x11d),()=>_0x3332e8[_0x5454f6(0x14a)][_0x5454f6(0x135)](_0x3b151b,_0x169e4e),{'verbose':_0x3fbe98[_0x5454f6(0x149)]});_0x5c7cca=parseInt(_0x3d1626['data'],0xa),_0x3fbe98['verbose']&&console[_0x5454f6(0x13e)](_0x5454f6(0x148)+_0x5c7cca);}const _0x45d5a=await loadJSONFromOptions(_0x3fbe98[_0x5454f6(0x127)],_0x3fbe98[_0x5454f6(0x129)]),_0x636b68={'name':_0x3fbe98[_0x5454f6(0x121)],'description':_0x3fbe98['description'],'rule':_0x45d5a,'kind':_0x3fbe98['kind']!==undefined?parseInt(_0x3fbe98[_0x5454f6(0x11a)],0xa):undefined,'segmentFolderId':_0x5c7cca},_0x5040f9=await withSpinner(_0x5454f6(0x130)+_0x1d6621[_0x5454f6(0x120)]+'\x27...',()=>_0x3332e8[_0x5454f6(0x14a)][_0x5454f6(0x139)](_0x3b151b,_0x131713,_0x636b68),{'verbose':_0x3fbe98['verbose']}),_0x1d9be8=_0x5040f9['data'];return console[_0x5454f6(0x13e)]('✔\x20Updated\x20segment\x20\x27'+_0x1d9be8[_0x5454f6(0x121)]+'\x27'),_0x408c4e!==_0x230edc&&console['error'](_0x5454f6(0x136)+_0x408c4e),await handleSDKOutput([_0x1d9be8],_0x3fbe98),0x0;}}
@@ -1 +1 @@
1
- const a33_0x1f0fc6=a33_0x557f;(function(_0x42c13d,_0x5c206f){const _0x2ed91d=a33_0x557f,_0x2031d0=_0x42c13d();while(!![]){try{const _0x13dd5a=parseInt(_0x2ed91d(0x18c))/0x1+parseInt(_0x2ed91d(0x1bc))/0x2*(-parseInt(_0x2ed91d(0x1a3))/0x3)+parseInt(_0x2ed91d(0x191))/0x4*(parseInt(_0x2ed91d(0x195))/0x5)+parseInt(_0x2ed91d(0x1b3))/0x6+parseInt(_0x2ed91d(0x1b0))/0x7+parseInt(_0x2ed91d(0x1b2))/0x8*(-parseInt(_0x2ed91d(0x1a8))/0x9)+-parseInt(_0x2ed91d(0x1b1))/0xa;if(_0x13dd5a===_0x5c206f)break;else _0x2031d0['push'](_0x2031d0['shift']());}catch(_0x565056){_0x2031d0['push'](_0x2031d0['shift']());}}}(a33_0x2c63,0x8bac6));function a33_0x2c63(){const _0x14d01e=['1006672FSWaRP','3032442DuqVvr','verbose','split','folderPath','Context\x20can\x20only\x20be\x20set\x20to\x20a\x20parent\x20segment\x20or\x20folder.','\x20\x20tdx\x20segment\x20use\x20\x22My\x20Audience/Marketing\x22','fullPath','Resolving\x20path\x20\x27','cyan','6SImOlW','join','Use\x20\x22tdx\x20use\x22\x20to\x20see\x20all\x20context\x20parameters','resolvePathToResource','site','execute','Resolved\x20relative\x20path\x20to:\x20','log','segments','slice','parent_segment','Error:\x20Path\x20is\x20required\x0a','Use\x20\x22tdx\x20segments\x22\x20to\x20list\x20contents\x20in\x20this\x20context','169584mtusFs','parentName','\x20\x20tdx\x20segment\x20use\x20\x22My\x20Audience\x22','Set\x20current\x20segment/folder\x20context\x20for\x20navigation','Error:\x20No\x20context\x20set.\x20Cannot\x20use\x20relative\x20path.','66520EitMwj','green','config','segment:use','185orireL','Examples:','isDirectory','✔\x20Context\x20set\x20to:\x20','error','Resolved\x20path\x20type:\x20','Error:\x20Cannot\x20set\x20context\x20to\x20a\x20segment.','Target\x20path:\x20','Parent\x20ID:\x20','length','red','Usage:\x20tdx\x20segment\x20use\x20<path>','Tip:\x20Run\x20`tdx\x20sg\x20pull\x20<parent_name>`\x20first\x20to\x20create\x20the\x20folder\x20structure','name','559902BoqhcI','description','Site:\x20','dim','type','36IJGZfB','Error:\x20No\x20tdx.json\x20found\x20in\x20or\x20above:\x20','parentId','segment','data','✔\x20Context\x20cleared.\x20Back\x20to\x20root.','\x27...','\x20\x20tdx\x20segment\x20use\x20/\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Clear\x20context','7579250jAPFRP','7377110KNewTE'];a33_0x2c63=function(){return _0x14d01e;};return a33_0x2c63();}import{existsSync,statSync}from'fs';import a33_0x209ef1 from'chalk';import{BaseCommand}from'./command.js';function a33_0x557f(_0x3e3645,_0x3a6a26){_0x3e3645=_0x3e3645-0x184;const _0x2c6314=a33_0x2c63();let _0x557fdc=_0x2c6314[_0x3e3645];return _0x557fdc;}import{saveSessionContext}from'../core/session.js';import{withSpinner}from'../utils/spinner.js';import{parsePath,normalizePath}from'../sdk/segment/segment-path-parser.js';import{findTdxConfig}from'../sdk/segment/tdx-config.js';export class SegmentUseCommand extends BaseCommand{[a33_0x1f0fc6(0x1a2)]=a33_0x1f0fc6(0x194);[a33_0x1f0fc6(0x1a4)]=a33_0x1f0fc6(0x18f);async[a33_0x1f0fc6(0x184)](_0x3b1bf3){const _0x395d6f=a33_0x1f0fc6,{options:_0x29a2cb,args:_0x3a93ad,tdx:_0x29cec9}=_0x3b1bf3;if(_0x3a93ad[_0x395d6f(0x19e)]===0x0)return console['error'](a33_0x209ef1['red'](_0x395d6f(0x18a))),console['error'](_0x395d6f(0x1a0)),console[_0x395d6f(0x199)](_0x395d6f(0x196)),console[_0x395d6f(0x199)](_0x395d6f(0x18e)),console[_0x395d6f(0x199)](_0x395d6f(0x1b8)),console['error'](_0x395d6f(0x1af)),console['error']('\x20\x20tdx\x20segment\x20use\x20..\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Go\x20to\x20parent'),0x1;const _0x14388f=_0x3a93ad[0x0],_0x4f65fe=_0x29a2cb['session'];try{if(_0x14388f==='/')return saveSessionContext({'segment_path':undefined},_0x4f65fe),console[_0x395d6f(0x186)](a33_0x209ef1[_0x395d6f(0x192)](_0x395d6f(0x1ad))),0x0;if(existsSync(_0x14388f)&&statSync(_0x14388f)[_0x395d6f(0x197)]()){let _0x19dfaa;try{_0x19dfaa=findTdxConfig(_0x14388f);}catch{return console[_0x395d6f(0x199)](a33_0x209ef1[_0x395d6f(0x19f)](_0x395d6f(0x1a9)+_0x14388f)),console[_0x395d6f(0x199)](a33_0x209ef1['cyan'](_0x395d6f(0x1a1))),0x1;}const _0xd16341=_0x19dfaa[_0x395d6f(0x193)][_0x395d6f(0x189)];return saveSessionContext({'segment_path':_0xd16341,'parent_segment':_0xd16341},_0x4f65fe),console[_0x395d6f(0x186)](a33_0x209ef1[_0x395d6f(0x192)](_0x395d6f(0x198)+a33_0x209ef1[_0x395d6f(0x1bb)](_0xd16341))),0x0;}const _0x30bd44=_0x29a2cb['segmentPath'];let _0x583065=_0x14388f;const _0x3a38b7=parsePath(_0x14388f);if(!_0x3a38b7['isAbsolute']){if(!_0x30bd44)return console[_0x395d6f(0x199)](a33_0x209ef1[_0x395d6f(0x19f)](_0x395d6f(0x190))),console['error'](a33_0x209ef1[_0x395d6f(0x1bb)]('Use\x20an\x20absolute\x20path\x20or\x20set\x20context\x20with:\x20tdx\x20segment\x20use\x20<parent_name>')),0x1;if(_0x14388f==='..'){const _0x3fac8a=_0x30bd44[_0x395d6f(0x1b5)]('/')[_0x395d6f(0x188)](0x0,-0x1)[_0x395d6f(0x1bd)]('/');_0x583065=_0x3fac8a||'/';}else _0x14388f==='.'?_0x583065=_0x30bd44:_0x583065=_0x30bd44+'/'+_0x14388f;_0x29a2cb[_0x395d6f(0x1b4)]&&console['error'](_0x395d6f(0x185)+_0x583065);}if(_0x583065==='/'||_0x583065==='')return saveSessionContext({'segment_path':undefined},_0x4f65fe),console[_0x395d6f(0x186)](a33_0x209ef1['green']('✔\x20Context\x20cleared.\x20Back\x20to\x20root.')),0x0;_0x583065=normalizePath(_0x583065);const _0x506bac=parsePath(_0x583065)[_0x395d6f(0x187)];if(_0x506bac['length']===0x0)return saveSessionContext({'segment_path':undefined},_0x4f65fe),console[_0x395d6f(0x186)](a33_0x209ef1[_0x395d6f(0x192)]('✔\x20Context\x20cleared.\x20Back\x20to\x20root.')),0x0;_0x29a2cb[_0x395d6f(0x1b4)]&&(console[_0x395d6f(0x199)](_0x395d6f(0x1a5)+_0x29a2cb[_0x395d6f(0x1c0)]),console[_0x395d6f(0x199)](_0x395d6f(0x19c)+_0x583065));const _0x179461=await withSpinner(_0x395d6f(0x1ba)+_0x583065+_0x395d6f(0x1ae),()=>_0x29cec9[_0x395d6f(0x1ab)][_0x395d6f(0x1bf)](_0x583065),{'verbose':_0x29a2cb['verbose']}),_0x3c18c4=_0x179461[_0x395d6f(0x1ac)];_0x29a2cb[_0x395d6f(0x1b4)]&&(console['error'](_0x395d6f(0x19a)+_0x3c18c4[_0x395d6f(0x1a7)]),console['error'](_0x395d6f(0x19d)+_0x3c18c4[_0x395d6f(0x1aa)]),_0x3c18c4['folderId']&&console['error']('Folder\x20ID:\x20'+_0x3c18c4['folderId']));if(_0x3c18c4[_0x395d6f(0x1a7)]===_0x395d6f(0x1ab))return console[_0x395d6f(0x199)](a33_0x209ef1[_0x395d6f(0x19f)](_0x395d6f(0x19b))),console[_0x395d6f(0x199)](_0x395d6f(0x1b7)),console[_0x395d6f(0x199)](a33_0x209ef1[_0x395d6f(0x1bb)]('Use:\x20tdx\x20segment\x20use\x20'+_0x3c18c4[_0x395d6f(0x18d)]+(_0x3c18c4[_0x395d6f(0x1b6)]?'/'+_0x3c18c4['folderPath'][_0x395d6f(0x1bd)]('/'):''))),0x1;return saveSessionContext({'segment_path':_0x3c18c4[_0x395d6f(0x1b9)],'parent_segment':_0x3c18c4[_0x395d6f(0x18d)]},_0x4f65fe),console[_0x395d6f(0x186)](a33_0x209ef1['green'](_0x395d6f(0x198)+a33_0x209ef1[_0x395d6f(0x1bb)](_0x3c18c4[_0x395d6f(0x1b9)]))),_0x29a2cb[_0x395d6f(0x1b4)]&&(console[_0x395d6f(0x199)](a33_0x209ef1[_0x395d6f(0x1a6)](_0x395d6f(0x18b))),console[_0x395d6f(0x199)](a33_0x209ef1[_0x395d6f(0x1a6)](_0x395d6f(0x1be)))),0x0;}catch(_0x49a0a2){throw _0x49a0a2;}}}
1
+ const a33_0xc9bda6=a33_0x2777;(function(_0x221ea8,_0x49e2a6){const _0x286823=a33_0x2777,_0x285ea9=_0x221ea8();while(!![]){try{const _0xe477e7=parseInt(_0x286823(0x167))/0x1+parseInt(_0x286823(0x15c))/0x2+-parseInt(_0x286823(0x14d))/0x3*(parseInt(_0x286823(0x156))/0x4)+-parseInt(_0x286823(0x17d))/0x5+-parseInt(_0x286823(0x15b))/0x6+parseInt(_0x286823(0x171))/0x7+parseInt(_0x286823(0x175))/0x8;if(_0xe477e7===_0x49e2a6)break;else _0x285ea9['push'](_0x285ea9['shift']());}catch(_0x17f732){_0x285ea9['push'](_0x285ea9['shift']());}}}(a33_0x42a1,0x2d34f));import{existsSync,statSync}from'fs';import a33_0xb32378 from'chalk';import{BaseCommand}from'./command.js';import{saveSessionContext}from'../core/session.js';function a33_0x2777(_0x1b9c80,_0x1c2183){_0x1b9c80=_0x1b9c80-0x14b;const _0x42a1c3=a33_0x42a1();let _0x277793=_0x42a1c3[_0x1b9c80];return _0x277793;}import{withSpinner}from'../utils/spinner.js';function a33_0x42a1(){const _0x44da9a=['dim','Resolved\x20path\x20type:\x20','log','join','Use:\x20tdx\x20segment\x20use\x20','Context\x20can\x20only\x20be\x20set\x20to\x20a\x20parent\x20segment\x20or\x20folder.','type','1462307VjrnMQ','Usage:\x20tdx\x20segment\x20use\x20<path>','parent_segment','\x20\x20tdx\x20segment\x20use\x20\x22My\x20Audience\x22','1477784cJOcST','\x20\x20tdx\x20segment\x20use\x20..\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Go\x20to\x20parent','error','✔\x20Context\x20set\x20to:\x20','verbose','Resolving\x20path\x20\x27','Site:\x20','execute','930275aDkSir','Examples:','isAbsolute','Use\x20\x22tdx\x20segments\x22\x20to\x20list\x20contents\x20in\x20this\x20context','\x27...','\x20\x20tdx\x20segment\x20use\x20\x22My\x20Audience/Marketing\x22','resolvePathToResource','folderId','length','3JKqNKl','Target\x20path:\x20','isDirectory','Tip:\x20Run\x20`tdx\x20sg\x20pull\x20<parent_name>`\x20first\x20to\x20create\x20the\x20folder\x20structure','green','Error:\x20No\x20context\x20set.\x20Cannot\x20use\x20relative\x20path.','✔\x20Context\x20cleared.\x20Back\x20to\x20root.','parentName','name','822940InRDRG','red','config','Use\x20an\x20absolute\x20path\x20or\x20set\x20context\x20with:\x20tdx\x20segment\x20use\x20<parent_name>','Resolved\x20relative\x20path\x20to:\x20','1946232RVNRdQ','586790SEfIVb','Error:\x20Cannot\x20set\x20context\x20to\x20a\x20segment.','parentId','session','segmentPath','site','slice','Error:\x20Path\x20is\x20required\x0a','segment','description','segment:use','214310BSboqR','folderPath','cyan'];a33_0x42a1=function(){return _0x44da9a;};return a33_0x42a1();}import{parsePath,normalizePath}from'../sdk/segment/segment-path-parser.js';import{findTdxConfig}from'../sdk/segment/tdx-config.js';export class SegmentUseCommand extends BaseCommand{[a33_0xc9bda6(0x155)]=a33_0xc9bda6(0x166);[a33_0xc9bda6(0x165)]='Set\x20current\x20segment/folder\x20context\x20for\x20navigation';async[a33_0xc9bda6(0x17c)](_0x5f56d4){const _0x2ff7ce=a33_0xc9bda6,{options:_0x8b2fd5,args:_0x1acc4f,tdx:_0x46b719}=_0x5f56d4;if(_0x1acc4f[_0x2ff7ce(0x14c)]===0x0)return console[_0x2ff7ce(0x177)](a33_0xb32378['red'](_0x2ff7ce(0x163))),console[_0x2ff7ce(0x177)](_0x2ff7ce(0x172)),console['error'](_0x2ff7ce(0x17e)),console[_0x2ff7ce(0x177)](_0x2ff7ce(0x174)),console[_0x2ff7ce(0x177)](_0x2ff7ce(0x182)),console[_0x2ff7ce(0x177)]('\x20\x20tdx\x20segment\x20use\x20/\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Clear\x20context'),console[_0x2ff7ce(0x177)](_0x2ff7ce(0x176)),0x1;const _0x3af2cd=_0x1acc4f[0x0],_0x562996=_0x8b2fd5[_0x2ff7ce(0x15f)];try{if(_0x3af2cd==='/')return saveSessionContext({'segment_path':undefined},_0x562996),console[_0x2ff7ce(0x16c)](a33_0xb32378[_0x2ff7ce(0x151)]('✔\x20Context\x20cleared.\x20Back\x20to\x20root.')),0x0;if(existsSync(_0x3af2cd)&&statSync(_0x3af2cd)[_0x2ff7ce(0x14f)]()){let _0x4d3cab;try{_0x4d3cab=findTdxConfig(_0x3af2cd);}catch{return console[_0x2ff7ce(0x177)](a33_0xb32378['red']('Error:\x20No\x20tdx.json\x20found\x20in\x20or\x20above:\x20'+_0x3af2cd)),console[_0x2ff7ce(0x177)](a33_0xb32378['cyan'](_0x2ff7ce(0x150))),0x1;}const _0x148086=_0x4d3cab[_0x2ff7ce(0x158)][_0x2ff7ce(0x173)];return saveSessionContext({'segment_path':_0x148086,'parent_segment':_0x148086},_0x562996),console[_0x2ff7ce(0x16c)](a33_0xb32378[_0x2ff7ce(0x151)](_0x2ff7ce(0x178)+a33_0xb32378[_0x2ff7ce(0x169)](_0x148086))),0x0;}const _0x2a7ab0=_0x8b2fd5[_0x2ff7ce(0x160)];let _0x197f9f=_0x3af2cd;const _0x441a5d=parsePath(_0x3af2cd);if(!_0x441a5d[_0x2ff7ce(0x17f)]){if(!_0x2a7ab0)return console[_0x2ff7ce(0x177)](a33_0xb32378[_0x2ff7ce(0x157)](_0x2ff7ce(0x152))),console[_0x2ff7ce(0x177)](a33_0xb32378['cyan'](_0x2ff7ce(0x159))),0x1;if(_0x3af2cd==='..'){const _0x39fb35=_0x2a7ab0['split']('/')[_0x2ff7ce(0x162)](0x0,-0x1)[_0x2ff7ce(0x16d)]('/');_0x197f9f=_0x39fb35||'/';}else _0x3af2cd==='.'?_0x197f9f=_0x2a7ab0:_0x197f9f=_0x2a7ab0+'/'+_0x3af2cd;_0x8b2fd5[_0x2ff7ce(0x179)]&&console[_0x2ff7ce(0x177)](_0x2ff7ce(0x15a)+_0x197f9f);}if(_0x197f9f==='/'||_0x197f9f==='')return saveSessionContext({'segment_path':undefined},_0x562996),console['log'](a33_0xb32378[_0x2ff7ce(0x151)]('✔\x20Context\x20cleared.\x20Back\x20to\x20root.')),0x0;_0x197f9f=normalizePath(_0x197f9f);const _0x57b026=parsePath(_0x197f9f)['segments'];if(_0x57b026[_0x2ff7ce(0x14c)]===0x0)return saveSessionContext({'segment_path':undefined},_0x562996),console['log'](a33_0xb32378[_0x2ff7ce(0x151)](_0x2ff7ce(0x153))),0x0;_0x8b2fd5['verbose']&&(console[_0x2ff7ce(0x177)](_0x2ff7ce(0x17b)+_0x8b2fd5[_0x2ff7ce(0x161)]),console[_0x2ff7ce(0x177)](_0x2ff7ce(0x14e)+_0x197f9f));const _0x2372a4=await withSpinner(_0x2ff7ce(0x17a)+_0x197f9f+_0x2ff7ce(0x181),()=>_0x46b719[_0x2ff7ce(0x164)][_0x2ff7ce(0x183)](_0x197f9f),{'verbose':_0x8b2fd5[_0x2ff7ce(0x179)]}),_0x11a012=_0x2372a4['data'];_0x8b2fd5['verbose']&&(console['error'](_0x2ff7ce(0x16b)+_0x11a012['type']),console[_0x2ff7ce(0x177)]('Parent\x20ID:\x20'+_0x11a012[_0x2ff7ce(0x15e)]),_0x11a012[_0x2ff7ce(0x14b)]&&console[_0x2ff7ce(0x177)]('Folder\x20ID:\x20'+_0x11a012[_0x2ff7ce(0x14b)]));if(_0x11a012[_0x2ff7ce(0x170)]===_0x2ff7ce(0x164))return console['error'](a33_0xb32378[_0x2ff7ce(0x157)](_0x2ff7ce(0x15d))),console['error'](_0x2ff7ce(0x16f)),console[_0x2ff7ce(0x177)](a33_0xb32378[_0x2ff7ce(0x169)](_0x2ff7ce(0x16e)+_0x11a012[_0x2ff7ce(0x154)]+(_0x11a012[_0x2ff7ce(0x168)]?'/'+_0x11a012[_0x2ff7ce(0x168)]['join']('/'):''))),0x1;return saveSessionContext({'segment_path':_0x11a012['fullPath'],'parent_segment':_0x11a012[_0x2ff7ce(0x154)]},_0x562996),console[_0x2ff7ce(0x16c)](a33_0xb32378[_0x2ff7ce(0x151)](_0x2ff7ce(0x178)+a33_0xb32378[_0x2ff7ce(0x169)](_0x11a012['fullPath']))),_0x8b2fd5['verbose']&&(console[_0x2ff7ce(0x177)](a33_0xb32378[_0x2ff7ce(0x16a)](_0x2ff7ce(0x180))),console[_0x2ff7ce(0x177)](a33_0xb32378[_0x2ff7ce(0x16a)]('Use\x20\x22tdx\x20use\x22\x20to\x20see\x20all\x20context\x20parameters'))),0x0;}catch(_0x544808){throw _0x544808;}}}
@@ -1 +1 @@
1
- const a34_0x3d4285=a34_0x13a7;(function(_0x52c32c,_0xef18ab){const _0x829650=a34_0x13a7,_0x43df81=_0x52c32c();while(!![]){try{const _0x39f682=-parseInt(_0x829650(0x14f))/0x1+parseInt(_0x829650(0x140))/0x2+-parseInt(_0x829650(0x139))/0x3*(-parseInt(_0x829650(0x131))/0x4)+-parseInt(_0x829650(0x132))/0x5*(-parseInt(_0x829650(0x13b))/0x6)+-parseInt(_0x829650(0x150))/0x7+-parseInt(_0x829650(0x12c))/0x8*(parseInt(_0x829650(0x133))/0x9)+parseInt(_0x829650(0x141))/0xa;if(_0x39f682===_0xef18ab)break;else _0x43df81['push'](_0x43df81['shift']());}catch(_0xd3e6d8){_0x43df81['push'](_0x43df81['shift']());}}}(a34_0x35a5,0x9e557));import{BaseCommand}from'./command.js';import{resolveTarget,isSuccessfulResolution}from'../sdk/segment/target-resolution.js';import{findYamlFiles}from'../sdk/segment/file-discovery.js';function a34_0x13a7(_0x412ac5,_0x2deba4){_0x412ac5=_0x412ac5-0x124;const _0x35a5de=a34_0x35a5();let _0x13a7c5=_0x35a5de[_0x412ac5];return _0x13a7c5;}import{existsSync}from'fs';import a34_0x3e4e5f from'chalk';import{formatValidationResult}from'../sdk/segment/yaml-validator.js';import{validateYamlFiles,isValidationResult,calculateSummary}from'../sdk/segment/validate-files.js';export class SegmentValidateCommand extends BaseCommand{['name']=a34_0x3d4285(0x147);[a34_0x3d4285(0x145)]='Validate\x20segment\x20and\x20journey\x20YAML\x20files';async[a34_0x3d4285(0x126)](_0x46747b){const _0x253998=a34_0x3d4285,{options:_0x292a2f,args:_0x33b5d3}=_0x46747b,_0x59542b=_0x292a2f,_0x11c21a=await resolveTarget({'arg':_0x33b5d3[0x0],'contextParent':_0x292a2f['parentSegment'],'cwd':process['cwd']()});if(!isSuccessfulResolution(_0x11c21a))return _0x11c21a[_0x253998(0x127)]==='no_parent'?(console[_0x253998(0x14d)](a34_0x3e4e5f[_0x253998(0x144)](_0x253998(0x13d))),console['error'](_0x253998(0x12d)),console[_0x253998(0x14d)](_0x253998(0x152)),console[_0x253998(0x14d)](_0x253998(0x138))):(console[_0x253998(0x14d)](a34_0x3e4e5f['red']('Error:\x20'+_0x11c21a[_0x253998(0x14b)]+'\x0a')),_0x11c21a[_0x253998(0x12a)]&&console['error'](a34_0x3e4e5f[_0x253998(0x13c)](_0x11c21a[_0x253998(0x12a)]))),0x1;const _0x38f273=_0x11c21a[_0x253998(0x13e)],_0x35b121=_0x11c21a[_0x253998(0x129)]==='file'?_0x11c21a[_0x253998(0x12f)]:undefined;if(!_0x35b121&&!existsSync(_0x38f273))return console[_0x253998(0x14d)](a34_0x3e4e5f[_0x253998(0x124)]('Error:\x20Directory\x20not\x20found:\x20'+_0x38f273+'\x0a')),0x1;let _0x4a73ec;if(_0x35b121){if(!_0x35b121[_0x253998(0x154)](_0x253998(0x148))&&!_0x35b121['endsWith'](_0x253998(0x151)))return console['error'](a34_0x3e4e5f[_0x253998(0x124)](_0x253998(0x125)+_0x35b121+'\x0a')),0x1;_0x4a73ec=[_0x35b121];}else _0x4a73ec=findYamlFiles(_0x38f273);if(_0x4a73ec[_0x253998(0x14c)]===0x0)return console[_0x253998(0x14d)](a34_0x3e4e5f[_0x253998(0x124)](_0x253998(0x14e)+_0x38f273+'\x0a')),0x1;const _0x4516db=validateYamlFiles(_0x4a73ec,_0x38f273),_0x5054b4=calculateSummary(_0x4516db);for(const _0x226fe1 of _0x4516db){if(!isValidationResult(_0x226fe1))continue;const {relativePath:_0x57cfad,source:_0x531a3d,result:_0x2e738a,fileType:_0x42df4c}=_0x226fe1,_0x5b94a7=_0x42df4c;if(_0x2e738a[_0x253998(0x13f)]&&_0x2e738a[_0x253998(0x146)][_0x253998(0x14c)]===0x0)_0x59542b[_0x253998(0x149)]&&console[_0x253998(0x130)](a34_0x3e4e5f[_0x253998(0x14a)]('✔\x20'+_0x57cfad)+a34_0x3e4e5f[_0x253998(0x136)]('\x20('+_0x5b94a7+')'));else _0x2e738a[_0x253998(0x13f)]?(console[_0x253998(0x130)](a34_0x3e4e5f[_0x253998(0x144)]('⚠\x20'+_0x57cfad)+a34_0x3e4e5f['dim']('\x20('+_0x5b94a7+_0x253998(0x128)+_0x2e738a[_0x253998(0x146)][_0x253998(0x14c)]+'\x20warning(s)')),console[_0x253998(0x130)](formatValidationResult(_0x2e738a,_0x531a3d,_0x57cfad))):(console['log'](a34_0x3e4e5f['red']('✖\x20'+_0x57cfad)+a34_0x3e4e5f['dim']('\x20('+_0x5b94a7+_0x253998(0x128)+_0x2e738a['errors'][_0x253998(0x14c)]+_0x253998(0x12e))),console[_0x253998(0x130)](formatValidationResult(_0x2e738a,_0x531a3d,_0x57cfad)));}return console['log'](''),_0x5054b4[_0x253998(0x153)]?(console['log'](a34_0x3e4e5f[_0x253998(0x124)](_0x253998(0x142)+_0x5054b4['invalidCount']+_0x253998(0x135)+_0x5054b4[_0x253998(0x137)]+_0x253998(0x134))),_0x5054b4['warningCount']>0x0&&console['log'](a34_0x3e4e5f['yellow'](_0x5054b4[_0x253998(0x12b)]+_0x253998(0x13a))),0x1):(console[_0x253998(0x130)](a34_0x3e4e5f[_0x253998(0x14a)]('✔\x20All\x20'+_0x5054b4['validCount']+_0x253998(0x143))),_0x5054b4[_0x253998(0x12b)]>0x0&&console[_0x253998(0x130)](a34_0x3e4e5f[_0x253998(0x144)](_0x5054b4[_0x253998(0x12b)]+_0x253998(0x13a))),0x0);}}function a34_0x35a5(){const _0x19833b=['173986NXdKud','6748710UvTwON','Validation\x20failed:\x20','\x20file(s)\x20valid','yellow','description','warnings','segment:validate','.yml','verbose','green','message','length','error','Error:\x20No\x20YAML\x20files\x20found\x20in\x20','1017813iFamer','228613SCjIck','.yaml','\x20\x20\x20\x20\x20\x20\x20tdx\x20sg\x20validate\x20.\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Validate\x20current\x20directory','hasErrors','endsWith','red','Error:\x20File\x20must\x20have\x20.yml\x20or\x20.yaml\x20extension:\x20','execute','errorCode','):\x20','type','helpText','warningCount','212792ZzOHDP','Usage:\x20tdx\x20sg\x20validate\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Validate\x20all\x20(requires\x20context)','\x20error(s)','filePath','log','4SgGUkr','15ZXdMyo','423UGGDAl','\x20valid','\x20file(s)\x20with\x20errors,\x20','dim','validCount','\x20\x20\x20\x20\x20\x20\x20tdx\x20sg\x20validate\x20<file_path>\x20\x20#\x20Validate\x20specific\x20file','2976171MfYlIx','\x20warning(s)\x20found','2390478MQOlVG','cyan','parent_segment\x20is\x20not\x20set.\x20Use\x20`tdx\x20sg\x20use\x20<parent_name>`\x20to\x20set\x20it.\x0a','targetDir','valid'];a34_0x35a5=function(){return _0x19833b;};return a34_0x35a5();}
1
+ function a34_0x1878(){const _0x379604=['segment:validate','valid','warningCount','546GsEtRO','dim','length','\x20file(s)\x20valid','.yml','green','678WvCneF','Error:\x20Directory\x20not\x20found:\x20','\x20\x20\x20\x20\x20\x20\x20tdx\x20sg\x20validate\x20<file_path>\x20\x20#\x20Validate\x20specific\x20file','file','):\x20','cyan','\x20warning(s)\x20found','message','warnings','cwd','685437AgzCHW','parentSegment','\x20\x20\x20\x20\x20\x20\x20tdx\x20sg\x20validate\x20.\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Validate\x20current\x20directory','Usage:\x20tdx\x20sg\x20validate\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Validate\x20all\x20(requires\x20context)','type','log','Error:\x20','156665gMQlaS','verbose','endsWith','9bYRgsD','1227618snzEYY','.yaml','Validate\x20segment\x20and\x20journey\x20YAML\x20files','7137144bTZHzX','\x20file(s)\x20with\x20errors,\x20','\x20valid','red','errorCode','error','errors','helpText','28zfOKky','yellow','Validation\x20failed:\x20','39818300KHdGXq','2467168MzUtuz'];a34_0x1878=function(){return _0x379604;};return a34_0x1878();}const a34_0x5d6f3a=a34_0x3bd8;(function(_0x45eb02,_0x3f7d5d){const _0x522ce3=a34_0x3bd8,_0x4c7bfc=_0x45eb02();while(!![]){try{const _0x4020e5=-parseInt(_0x522ce3(0x1b8))/0x1+-parseInt(_0x522ce3(0x1c7))/0x2+parseInt(_0x522ce3(0x1db))/0x3+-parseInt(_0x522ce3(0x1c3))/0x4*(parseInt(_0x522ce3(0x1b4))/0x5)+parseInt(_0x522ce3(0x1d1))/0x6*(parseInt(_0x522ce3(0x1cb))/0x7)+-parseInt(_0x522ce3(0x1bb))/0x8*(parseInt(_0x522ce3(0x1b7))/0x9)+parseInt(_0x522ce3(0x1c6))/0xa;if(_0x4020e5===_0x3f7d5d)break;else _0x4c7bfc['push'](_0x4c7bfc['shift']());}catch(_0x4c2f5c){_0x4c7bfc['push'](_0x4c7bfc['shift']());}}}(a34_0x1878,0x9dd2f));import{BaseCommand}from'./command.js';import{resolveTarget,isSuccessfulResolution}from'../sdk/segment/target-resolution.js';import{findYamlFiles}from'../sdk/segment/file-discovery.js';import{existsSync}from'fs';import a34_0x179f3f from'chalk';function a34_0x3bd8(_0x1572b3,_0x525042){_0x1572b3=_0x1572b3-0x1b3;const _0x1878b8=a34_0x1878();let _0x3bd8ec=_0x1878b8[_0x1572b3];return _0x3bd8ec;}import{formatValidationResult}from'../sdk/segment/yaml-validator.js';import{validateYamlFiles,isValidationResult,calculateSummary}from'../sdk/segment/validate-files.js';export class SegmentValidateCommand extends BaseCommand{['name']=a34_0x5d6f3a(0x1c8);['description']=a34_0x5d6f3a(0x1ba);async['execute'](_0x48f321){const _0x68f2f4=a34_0x5d6f3a,{options:_0x5a3974,args:_0x21a8cc}=_0x48f321,_0x360dc0=_0x5a3974,_0x56dd79=await resolveTarget({'arg':_0x21a8cc[0x0],'contextParent':_0x5a3974[_0x68f2f4(0x1dc)],'cwd':process[_0x68f2f4(0x1da)]()});if(!isSuccessfulResolution(_0x56dd79))return _0x56dd79[_0x68f2f4(0x1bf)]==='no_parent'?(console[_0x68f2f4(0x1c0)](a34_0x179f3f['yellow']('parent_segment\x20is\x20not\x20set.\x20Use\x20`tdx\x20sg\x20use\x20<parent_name>`\x20to\x20set\x20it.\x0a')),console[_0x68f2f4(0x1c0)](_0x68f2f4(0x1de)),console['error'](_0x68f2f4(0x1dd)),console[_0x68f2f4(0x1c0)](_0x68f2f4(0x1d3))):(console[_0x68f2f4(0x1c0)](a34_0x179f3f[_0x68f2f4(0x1be)](_0x68f2f4(0x1b3)+_0x56dd79[_0x68f2f4(0x1d8)]+'\x0a')),_0x56dd79[_0x68f2f4(0x1c2)]&&console[_0x68f2f4(0x1c0)](a34_0x179f3f[_0x68f2f4(0x1d6)](_0x56dd79[_0x68f2f4(0x1c2)]))),0x1;const _0x45a6e9=_0x56dd79['targetDir'],_0x5a93b3=_0x56dd79[_0x68f2f4(0x1df)]===_0x68f2f4(0x1d4)?_0x56dd79['filePath']:undefined;if(!_0x5a93b3&&!existsSync(_0x45a6e9))return console['error'](a34_0x179f3f[_0x68f2f4(0x1be)](_0x68f2f4(0x1d2)+_0x45a6e9+'\x0a')),0x1;let _0x18edad;if(_0x5a93b3){if(!_0x5a93b3[_0x68f2f4(0x1b6)](_0x68f2f4(0x1cf))&&!_0x5a93b3[_0x68f2f4(0x1b6)](_0x68f2f4(0x1b9)))return console['error'](a34_0x179f3f[_0x68f2f4(0x1be)]('Error:\x20File\x20must\x20have\x20.yml\x20or\x20.yaml\x20extension:\x20'+_0x5a93b3+'\x0a')),0x1;_0x18edad=[_0x5a93b3];}else _0x18edad=findYamlFiles(_0x45a6e9);if(_0x18edad[_0x68f2f4(0x1cd)]===0x0)return console[_0x68f2f4(0x1c0)](a34_0x179f3f[_0x68f2f4(0x1be)]('Error:\x20No\x20YAML\x20files\x20found\x20in\x20'+_0x45a6e9+'\x0a')),0x1;const _0x5bd731=validateYamlFiles(_0x18edad,_0x45a6e9),_0x59dca0=calculateSummary(_0x5bd731);for(const _0x358bca of _0x5bd731){if(!isValidationResult(_0x358bca))continue;const {relativePath:_0x25cc87,source:_0x14f108,result:_0x246d4e,fileType:_0x89431d}=_0x358bca,_0x363d44=_0x89431d;if(_0x246d4e[_0x68f2f4(0x1c9)]&&_0x246d4e[_0x68f2f4(0x1d9)][_0x68f2f4(0x1cd)]===0x0)_0x360dc0[_0x68f2f4(0x1b5)]&&console['log'](a34_0x179f3f[_0x68f2f4(0x1d0)]('✔\x20'+_0x25cc87)+a34_0x179f3f[_0x68f2f4(0x1cc)]('\x20('+_0x363d44+')'));else _0x246d4e['valid']?(console['log'](a34_0x179f3f['yellow']('⚠\x20'+_0x25cc87)+a34_0x179f3f[_0x68f2f4(0x1cc)]('\x20('+_0x363d44+_0x68f2f4(0x1d5)+_0x246d4e['warnings'][_0x68f2f4(0x1cd)]+'\x20warning(s)')),console['log'](formatValidationResult(_0x246d4e,_0x14f108,_0x25cc87))):(console['log'](a34_0x179f3f[_0x68f2f4(0x1be)]('✖\x20'+_0x25cc87)+a34_0x179f3f[_0x68f2f4(0x1cc)]('\x20('+_0x363d44+_0x68f2f4(0x1d5)+_0x246d4e[_0x68f2f4(0x1c1)][_0x68f2f4(0x1cd)]+'\x20error(s)')),console[_0x68f2f4(0x1e0)](formatValidationResult(_0x246d4e,_0x14f108,_0x25cc87)));}return console['log'](''),_0x59dca0['hasErrors']?(console['log'](a34_0x179f3f[_0x68f2f4(0x1be)](_0x68f2f4(0x1c5)+_0x59dca0['invalidCount']+_0x68f2f4(0x1bc)+_0x59dca0['validCount']+_0x68f2f4(0x1bd))),_0x59dca0[_0x68f2f4(0x1ca)]>0x0&&console[_0x68f2f4(0x1e0)](a34_0x179f3f[_0x68f2f4(0x1c4)](_0x59dca0[_0x68f2f4(0x1ca)]+_0x68f2f4(0x1d7))),0x1):(console[_0x68f2f4(0x1e0)](a34_0x179f3f[_0x68f2f4(0x1d0)]('✔\x20All\x20'+_0x59dca0['validCount']+_0x68f2f4(0x1ce))),_0x59dca0[_0x68f2f4(0x1ca)]>0x0&&console['log'](a34_0x179f3f[_0x68f2f4(0x1c4)](_0x59dca0['warningCount']+_0x68f2f4(0x1d7))),0x0);}}
@@ -1 +1 @@
1
- const a35_0x1dd658=a35_0x5908;(function(_0x4d28f0,_0x4fee6){const _0x1417f0=a35_0x5908,_0x55e2c7=_0x4d28f0();while(!![]){try{const _0x171c5e=parseInt(_0x1417f0(0xa2))/0x1*(-parseInt(_0x1417f0(0x83))/0x2)+-parseInt(_0x1417f0(0x7f))/0x3+-parseInt(_0x1417f0(0x78))/0x4+-parseInt(_0x1417f0(0x86))/0x5+-parseInt(_0x1417f0(0xa8))/0x6*(parseInt(_0x1417f0(0x89))/0x7)+parseInt(_0x1417f0(0x7e))/0x8*(-parseInt(_0x1417f0(0x77))/0x9)+-parseInt(_0x1417f0(0xb0))/0xa*(-parseInt(_0x1417f0(0x65))/0xb);if(_0x171c5e===_0x4fee6)break;else _0x55e2c7['push'](_0x55e2c7['shift']());}catch(_0x474dc0){_0x55e2c7['push'](_0x55e2c7['shift']());}}}(a35_0x14df,0x4e88e));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';function a35_0x5908(_0x20e7d1,_0x2e557f){_0x20e7d1=_0x20e7d1-0x64;const _0x14df07=a35_0x14df();let _0x59083d=_0x14df07[_0x20e7d1];return _0x59083d;}import{handleSDKOutput}from'../core/command-output.js';import{withSpinner}from'../utils/spinner.js';function a35_0x14df(){const _0x340f17=['filter','includes','Folder/pattern\x20arg:\x20','folderId','\x5c$&','name','\x27...','Use\x20tdx\x20ps\x20list\x20to\x20see\x20available\x20parent\x20segments.','(not\x20set)','No\x20items\x20match\x20pattern:\x20','(empty)','\x20journey','Parent\x20ID:\x20','localeCompare','segments','sort','List\x20folders\x20and\x20child\x20segments','journeyBundleName','\x20\x20tdx\x20sg\x20use\x20\x22My\x20Audience\x22','children','36019djlZmD','segment','replace','execute',']\x20matching\x20\x27','json','6zEmRNk','description','cause','/j/da','Building\x20hierarchy\x20tree...','\x20segment','journeys','✔\x20Built\x20tree\x20with\x20','21084260IZtUef','folders','11jblzPl','parentId','Folder\x20ID:\x20','maxDepth','error','Error:\x20','test','Error:\x20No\x20parent\x20segment\x20context\x20set.','verbose','listWithPattern','\x20folder','resolvePathToResource','/e/','data','journey',',\x20and\x20','log','map','9ethWHP','1004664ILvfdq','listUnifiedWithJourneys','site','type','recursive','listRecursive','1229264pGIZsV','1451433XMeErr','/app/ps/','jsonl','length','14oAfuvl','format','folder','3068055bAYoXX','Listing\x20folders,\x20segments,\x20and\x20journeys...','Resolving\x20path\x20\x27','226583RXADJT','✔\x20Found\x20','Site:\x20','dim','Parent\x20segment\x20context:\x20'];a35_0x14df=function(){return _0x340f17;};return a35_0x14df();}import{formatFlatList,formatTree}from'../sdk/util/tree-formatter.js';import{getConsoleNextUrl}from'../sdk/client/endpoints.js';import a35_0xe77cc0 from'chalk';export class SegmentsCommand extends BaseCommand{['name']=a35_0x1dd658(0x9c);[a35_0x1dd658(0xa9)]=a35_0x1dd658(0x9e);async[a35_0x1dd658(0xa5)](_0xedaa3f){const _0x3aa832=a35_0x1dd658,{options:_0x162c3e,args:_0x4743a5}=_0xedaa3f,_0x566374=_0x162c3e[_0x3aa832(0x7c)],_0x1cfc6c=_0x4743a5[0x0];try{const _0xe90d79=_0x162c3e['parentSegment'];_0x162c3e['verbose']&&(console[_0x3aa832(0x69)](_0x3aa832(0x8b)+_0x162c3e[_0x3aa832(0x7a)]),console[_0x3aa832(0x69)](_0x3aa832(0x8d)+(_0xe90d79||_0x3aa832(0x96))),_0x1cfc6c&&console[_0x3aa832(0x69)](_0x3aa832(0x90)+_0x1cfc6c),_0x566374&&console[_0x3aa832(0x69)]('Recursive\x20mode:\x20enabled'));if(!_0xe90d79)return console[_0x3aa832(0x69)](_0x3aa832(0x6c)),console[_0x3aa832(0x69)](''),console[_0x3aa832(0x69)]('Set\x20a\x20parent\x20segment\x20context\x20first:'),console[_0x3aa832(0x69)]('\x20\x20tdx\x20sg\x20pull\x20\x22My\x20Audience\x22'),console[_0x3aa832(0x69)](_0x3aa832(0xa0)),console[_0x3aa832(0x69)](''),console['error'](_0x3aa832(0x95)),0x1;const _0x4a27e6=_0x1cfc6c&&(_0x1cfc6c[_0x3aa832(0x8f)]('*')||_0x1cfc6c[_0x3aa832(0x8f)]('?'));if(_0x4a27e6)return await this[_0x3aa832(0x6e)](_0xedaa3f,_0xe90d79,_0x1cfc6c);const _0x2ce96b=_0x1cfc6c?_0xe90d79+'/'+_0x1cfc6c:_0xe90d79;return _0x566374?await this[_0x3aa832(0x7d)](_0xedaa3f,_0x2ce96b):await this['listUnified'](_0xedaa3f,_0x2ce96b);}catch(_0x5e103c){if(_0x5e103c instanceof SDKError)return console[_0x3aa832(0x69)](_0x3aa832(0x6a)+_0x5e103c['message']),_0x5e103c['cause']&&console[_0x3aa832(0x69)]('\x20\x20Cause:\x20'+_0x5e103c[_0x3aa832(0xaa)]),0x1;throw _0x5e103c;}}async[a35_0x1dd658(0x6e)](_0x387761,_0x21da93,_0x428097){const _0x118862=a35_0x1dd658,{options:_0x5d2eae,tdx:_0x4d2e24}=_0x387761,_0x1b32c1=await withSpinner('Resolving\x20parent\x20segment\x20\x27'+_0x21da93+'\x27...',()=>_0x4d2e24[_0x118862(0xa3)][_0x118862(0x70)](_0x21da93),{'verbose':_0x5d2eae['verbose']}),_0x6c137f=_0x1b32c1['data'],_0x407a3a=await withSpinner('Listing\x20folders,\x20segments,\x20and\x20journeys...',()=>_0x4d2e24[_0x118862(0xa3)][_0x118862(0x79)](_0x6c137f[_0x118862(0x66)],_0x6c137f[_0x118862(0x91)]),{'verbose':_0x5d2eae['verbose']}),{folders:_0x5dfa64,segments:_0x1576bb,journeys:_0x1a580c}=_0x407a3a[_0x118862(0x72)],_0x549ea3=_0x428097[_0x118862(0xa4)](/[.+^${}()|[\]\\]/g,_0x118862(0x92))[_0x118862(0xa4)](/\*/g,'.*')[_0x118862(0xa4)](/\?/g,'.'),_0x33d8ab=new RegExp('^'+_0x549ea3+'$','i'),_0x44cd15=_0x5dfa64['filter'](_0x112a4b=>_0x33d8ab['test'](_0x112a4b[_0x118862(0x93)])),_0x37b9a2=_0x1576bb[_0x118862(0x8e)](_0x3673b6=>_0x33d8ab[_0x118862(0x6b)](_0x3673b6[_0x118862(0x93)])),_0x377e9b=_0x1a580c[_0x118862(0x8e)](_0x10a77f=>_0x33d8ab['test'](_0x10a77f['journeyBundleName'])),_0x1a1a42=_0x44cd15[_0x118862(0x82)]+_0x37b9a2[_0x118862(0x82)]+_0x377e9b[_0x118862(0x82)];console['error'](_0x118862(0x8a)+_0x44cd15[_0x118862(0x82)]+_0x118862(0x6f)+(_0x44cd15[_0x118862(0x82)]!==0x1?'s':'')+',\x20'+_0x37b9a2[_0x118862(0x82)]+_0x118862(0xad)+(_0x37b9a2[_0x118862(0x82)]!==0x1?'s':'')+',\x20and\x20'+_0x377e9b[_0x118862(0x82)]+_0x118862(0x99)+(_0x377e9b[_0x118862(0x82)]!==0x1?'s':'')+'\x20matching\x20\x27'+_0x428097+'\x27');const _0xc65144=_0x4d8d13=>{const _0x4dcaaf=_0x118862;return getConsoleNextUrl(_0x5d2eae[_0x4dcaaf(0x7a)],_0x4dcaaf(0x80)+_0x6c137f[_0x4dcaaf(0x66)]+_0x4dcaaf(0x71)+_0x4d8d13);},_0x2a0290=_0x5d2eae[_0x118862(0x84)]==='json'||_0x5d2eae[_0x118862(0x84)]==='jsonl';if(_0x2a0290){const _0x2ad539=[..._0x44cd15[_0x118862(0x76)](_0x296a45=>({..._0x296a45,'type':'folder'})),..._0x37b9a2[_0x118862(0x76)](_0x44df28=>({..._0x44df28,'type':_0x118862(0xa3),'url':_0xc65144(_0x44df28['id'])})),..._0x377e9b[_0x118862(0x76)](_0x45bfae=>({..._0x45bfae,'name':_0x45bfae[_0x118862(0x9f)],'type':_0x118862(0x73)}))][_0x118862(0x9d)]((_0x1c7fd9,_0x572c35)=>_0x1c7fd9[_0x118862(0x93)][_0x118862(0x9b)](_0x572c35[_0x118862(0x93)]));await handleSDKOutput(_0x2ad539,_0x5d2eae);}else{if(_0x1a1a42===0x0)console[_0x118862(0x75)](_0x118862(0x97)+_0x428097);else{console[_0x118862(0x75)](a35_0xe77cc0[_0x118862(0x8c)]('['+_0x21da93+_0x118862(0xa6)+_0x428097+'\x27'));const _0x262b0c=formatFlatList(_0x44cd15,_0x37b9a2,{'showMetadata':!![],'getSegmentUrl':_0xc65144},_0x377e9b);console['log'](_0x262b0c);}}return 0x0;}async['listUnified'](_0x4b8ea6,_0xd9a317){const _0x31d631=a35_0x1dd658,{options:_0x152f11,tdx:_0x40480a}=_0x4b8ea6,_0x452083=await withSpinner(_0x31d631(0x88)+_0xd9a317+_0x31d631(0x94),()=>_0x40480a[_0x31d631(0xa3)][_0x31d631(0x70)](_0xd9a317),{'verbose':_0x152f11[_0x31d631(0x6d)]}),_0x401b7e=_0x452083[_0x31d631(0x72)];_0x152f11[_0x31d631(0x6d)]&&(console[_0x31d631(0x69)](_0x31d631(0x9a)+_0x401b7e[_0x31d631(0x66)]),_0x401b7e['folderId']&&console[_0x31d631(0x69)](_0x31d631(0x67)+_0x401b7e[_0x31d631(0x91)]));const _0x1c9f70=await withSpinner(_0x31d631(0x87),()=>_0x40480a[_0x31d631(0xa3)][_0x31d631(0x79)](_0x401b7e[_0x31d631(0x66)],_0x401b7e[_0x31d631(0x91)]),{'verbose':_0x152f11[_0x31d631(0x6d)]}),{folders:_0x2d5c23,segments:_0x2dc791,journeys:_0xc81f34}=_0x1c9f70[_0x31d631(0x72)],_0x510ffa=_0x2d5c23['length']+_0x2dc791[_0x31d631(0x82)]+_0xc81f34[_0x31d631(0x82)];console[_0x31d631(0x69)](_0x31d631(0x8a)+_0x2d5c23[_0x31d631(0x82)]+_0x31d631(0x6f)+(_0x2d5c23[_0x31d631(0x82)]!==0x1?'s':'')+',\x20'+_0x2dc791[_0x31d631(0x82)]+_0x31d631(0xad)+(_0x2dc791[_0x31d631(0x82)]!==0x1?'s':'')+_0x31d631(0x74)+_0xc81f34[_0x31d631(0x82)]+'\x20journey'+(_0xc81f34[_0x31d631(0x82)]!==0x1?'s':''));const _0x470fe5=_0x15d913=>{const _0x97471f=_0x31d631;return getConsoleNextUrl(_0x152f11[_0x97471f(0x7a)],_0x97471f(0x80)+_0x401b7e[_0x97471f(0x66)]+'/e/'+_0x15d913);},_0x217d9e=_0x285392=>{const _0xe7fef7=_0x31d631;return getConsoleNextUrl(_0x152f11[_0xe7fef7(0x7a)],_0xe7fef7(0x80)+_0x401b7e[_0xe7fef7(0x66)]+_0xe7fef7(0x71)+_0x285392+_0xe7fef7(0xab));},_0xe1c2f3=_0x152f11['format']===_0x31d631(0xa7)||_0x152f11[_0x31d631(0x84)]===_0x31d631(0x81);if(_0xe1c2f3){const _0x318f04=[..._0x2d5c23[_0x31d631(0x76)](_0x4027e5=>({..._0x4027e5,'type':_0x31d631(0x85)})),..._0x2dc791['map'](_0x54ea7f=>({..._0x54ea7f,'type':'segment','url':_0x470fe5(_0x54ea7f['id'])})),..._0xc81f34[_0x31d631(0x76)](_0x413a0f=>({..._0x413a0f,'name':_0x413a0f[_0x31d631(0x9f)],'type':'journey','url':_0x217d9e(_0x413a0f['id'])}))][_0x31d631(0x9d)]((_0x44e7cd,_0x36e71e)=>_0x44e7cd[_0x31d631(0x93)]['localeCompare'](_0x36e71e[_0x31d631(0x93)]));await handleSDKOutput(_0x318f04,_0x152f11);}else{if(_0x510ffa===0x0)console[_0x31d631(0x75)](a35_0xe77cc0[_0x31d631(0x8c)]('['+_0xd9a317+']')),console[_0x31d631(0x75)](_0x31d631(0x98));else{console[_0x31d631(0x75)](a35_0xe77cc0[_0x31d631(0x8c)]('['+_0xd9a317+']'));const _0x2bd367=formatFlatList(_0x2d5c23,_0x2dc791,{'showMetadata':!![],'getSegmentUrl':_0x470fe5,'getJourneyUrl':_0x217d9e},_0xc81f34);console[_0x31d631(0x75)](_0x2bd367);}}return 0x0;}async[a35_0x1dd658(0x7d)](_0x19ed9c,_0xe17d09){const _0x31ce9a=a35_0x1dd658,{options:_0x16b125,tdx:_0x706644}=_0x19ed9c,_0x698522=await withSpinner(_0x31ce9a(0x88)+_0xe17d09+_0x31ce9a(0x94),()=>_0x706644[_0x31ce9a(0xa3)][_0x31ce9a(0x70)](_0xe17d09),{'verbose':_0x16b125[_0x31ce9a(0x6d)]}),_0x59a7fe=_0x698522[_0x31ce9a(0x72)];_0x16b125[_0x31ce9a(0x6d)]&&(console[_0x31ce9a(0x69)](_0x31ce9a(0x9a)+_0x59a7fe[_0x31ce9a(0x66)]),_0x59a7fe[_0x31ce9a(0x91)]&&console[_0x31ce9a(0x69)](_0x31ce9a(0x67)+_0x59a7fe['folderId']));const _0x2a4f69=_0x16b125[_0x31ce9a(0x68)]||0xa,_0x1c2398=await withSpinner(_0x31ce9a(0xac),()=>_0x706644[_0x31ce9a(0xa3)][_0x31ce9a(0x7d)](_0x59a7fe[_0x31ce9a(0x66)],_0x59a7fe[_0x31ce9a(0x91)],0x0,_0x2a4f69),{'verbose':_0x16b125[_0x31ce9a(0x6d)]}),_0x184515=_0x1c2398['data'],_0x49651f=_0x1e06f4=>{const _0x676e05=_0x31ce9a;let _0x5782ad=0x0,_0x503684=0x0,_0x4dca27=0x0;for(const _0x3b38a7 of _0x1e06f4){if(_0x3b38a7[_0x676e05(0x7b)]===_0x676e05(0x85))_0x5782ad++;else{if(_0x3b38a7[_0x676e05(0x7b)]==='segment')_0x503684++;else{if(_0x3b38a7[_0x676e05(0x7b)]===_0x676e05(0x73))_0x4dca27++;}}if(_0x3b38a7[_0x676e05(0xa1)]){const _0x4e8d7b=_0x49651f(_0x3b38a7['children']);_0x5782ad+=_0x4e8d7b[_0x676e05(0x64)],_0x503684+=_0x4e8d7b[_0x676e05(0x9c)],_0x4dca27+=_0x4e8d7b[_0x676e05(0xae)];}}return{'folders':_0x5782ad,'segments':_0x503684,'journeys':_0x4dca27};},_0x127663=_0x49651f(_0x184515);console[_0x31ce9a(0x69)](_0x31ce9a(0xaf)+_0x127663[_0x31ce9a(0x64)]+_0x31ce9a(0x6f)+(_0x127663[_0x31ce9a(0x64)]!==0x1?'s':'')+',\x20'+_0x127663['segments']+_0x31ce9a(0xad)+(_0x127663[_0x31ce9a(0x9c)]!==0x1?'s':'')+_0x31ce9a(0x74)+_0x127663[_0x31ce9a(0xae)]+_0x31ce9a(0x99)+(_0x127663[_0x31ce9a(0xae)]!==0x1?'s':''));const _0x236e70=_0x28019d=>{const _0x36ced4=_0x31ce9a;return getConsoleNextUrl(_0x16b125['site'],_0x36ced4(0x80)+_0x59a7fe['parentId']+_0x36ced4(0x71)+_0x28019d);},_0x5465cb=_0x5430de=>{const _0x30d277=_0x31ce9a;return getConsoleNextUrl(_0x16b125[_0x30d277(0x7a)],_0x30d277(0x80)+_0x59a7fe[_0x30d277(0x66)]+_0x30d277(0x71)+_0x5430de+_0x30d277(0xab));};if(_0x16b125['format']===_0x31ce9a(0xa7)||_0x16b125[_0x31ce9a(0x84)]==='jsonl')await handleSDKOutput(_0x184515,_0x16b125);else{console[_0x31ce9a(0x75)](a35_0xe77cc0[_0x31ce9a(0x8c)]('['+_0xe17d09+']'));const _0x4c5062=formatTree(_0x184515,{'showMetadata':!![],'getSegmentUrl':_0x236e70,'getJourneyUrl':_0x5465cb});console['log'](_0x4c5062);}return 0x0;}}
1
+ const a35_0xe75e98=a35_0x24ae;function a35_0x36b6(){const _0x366e6f=['\x5c$&','folderId','description','Folder\x20ID:\x20','124BmKJMq','/j/da',']\x20matching\x20\x27','folder','site','log','Set\x20a\x20parent\x20segment\x20context\x20first:','listUnifiedWithJourneys','sort','execute','46292wiveCd','✔\x20Built\x20tree\x20with\x20',',\x20and\x20','22NMKNLb','children','Use\x20tdx\x20ps\x20list\x20to\x20see\x20available\x20parent\x20segments.','journey','maxDepth','jsonl','localeCompare','Listing\x20folders,\x20segments,\x20and\x20journeys...','parentSegment','segment','json','parentId','1496928KlCmEY','Error:\x20No\x20parent\x20segment\x20context\x20set.','name','length','45dGftlA','\x20journey','135hjGLhg','\x27...','error','\x20folder','journeyBundleName','463815bCkgtY','\x20segment','filter','2340360BBmwdH','test','data','\x20\x20Cause:\x20','No\x20items\x20match\x20pattern:\x20','Recursive\x20mode:\x20enabled','dim','/app/ps/','listUnified','2038981VhmCCk','Folder/pattern\x20arg:\x20','(empty)','map','listRecursive','recursive','List\x20folders\x20and\x20child\x20segments','\x20\x20tdx\x20sg\x20use\x20\x22My\x20Audience\x22','(not\x20set)','\x20\x20tdx\x20sg\x20pull\x20\x22My\x20Audience\x22','resolvePathToResource','6pjiAOV','type','✔\x20Found\x20','cause','segments','includes','verbose','message','Error:\x20','Parent\x20segment\x20context:\x20','journeys','replace','Parent\x20ID:\x20','/e/','6119TPmlDl','format','Site:\x20','folders','106060ZHRHBa'];a35_0x36b6=function(){return _0x366e6f;};return a35_0x36b6();}(function(_0x37e3b8,_0x593319){const _0x3c21c4=a35_0x24ae,_0x7f8b5e=_0x37e3b8();while(!![]){try{const _0x4f3970=-parseInt(_0x3c21c4(0xe9))/0x1*(-parseInt(_0x3c21c4(0xf2))/0x2)+-parseInt(_0x3c21c4(0x10f))/0x3*(parseInt(_0x3c21c4(0xfc))/0x4)+parseInt(_0x3c21c4(0x116))/0x5+parseInt(_0x3c21c4(0xdb))/0x6*(-parseInt(_0x3c21c4(0x122))/0x7)+parseInt(_0x3c21c4(0x119))/0x8+-parseInt(_0x3c21c4(0x111))/0x9*(-parseInt(_0x3c21c4(0xed))/0xa)+parseInt(_0x3c21c4(0xff))/0xb*(-parseInt(_0x3c21c4(0x10b))/0xc);if(_0x4f3970===_0x593319)break;else _0x7f8b5e['push'](_0x7f8b5e['shift']());}catch(_0x1563a3){_0x7f8b5e['push'](_0x7f8b5e['shift']());}}}(a35_0x36b6,0x33202));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleSDKOutput}from'../core/command-output.js';import{withSpinner}from'../utils/spinner.js';import{formatFlatList,formatTree}from'../sdk/util/tree-formatter.js';import{getConsoleNextUrl}from'../sdk/client/endpoints.js';function a35_0x24ae(_0x4ac089,_0x358cb3){_0x4ac089=_0x4ac089-0xd6;const _0x36b664=a35_0x36b6();let _0x24ae39=_0x36b664[_0x4ac089];return _0x24ae39;}import a35_0x459b1b from'chalk';export class SegmentsCommand extends BaseCommand{['name']=a35_0xe75e98(0xdf);[a35_0xe75e98(0xf0)]=a35_0xe75e98(0xd6);async[a35_0xe75e98(0xfb)](_0x3e2a9c){const _0x3d7a91=a35_0xe75e98,{options:_0x19a18f,args:_0x231b06}=_0x3e2a9c,_0x129e67=_0x19a18f[_0x3d7a91(0x127)],_0x184b3c=_0x231b06[0x0];try{const _0x183cc6=_0x19a18f[_0x3d7a91(0x107)];_0x19a18f[_0x3d7a91(0xe1)]&&(console[_0x3d7a91(0x113)](_0x3d7a91(0xeb)+_0x19a18f[_0x3d7a91(0xf6)]),console[_0x3d7a91(0x113)](_0x3d7a91(0xe4)+(_0x183cc6||_0x3d7a91(0xd8))),_0x184b3c&&console['error'](_0x3d7a91(0x123)+_0x184b3c),_0x129e67&&console['error'](_0x3d7a91(0x11e)));if(!_0x183cc6)return console[_0x3d7a91(0x113)](_0x3d7a91(0x10c)),console[_0x3d7a91(0x113)](''),console[_0x3d7a91(0x113)](_0x3d7a91(0xf8)),console[_0x3d7a91(0x113)](_0x3d7a91(0xd9)),console[_0x3d7a91(0x113)](_0x3d7a91(0xd7)),console['error'](''),console['error'](_0x3d7a91(0x101)),0x1;const _0x10311a=_0x184b3c&&(_0x184b3c[_0x3d7a91(0xe0)]('*')||_0x184b3c[_0x3d7a91(0xe0)]('?'));if(_0x10311a)return await this['listWithPattern'](_0x3e2a9c,_0x183cc6,_0x184b3c);const _0x3654a4=_0x184b3c?_0x183cc6+'/'+_0x184b3c:_0x183cc6;return _0x129e67?await this['listRecursive'](_0x3e2a9c,_0x3654a4):await this['listUnified'](_0x3e2a9c,_0x3654a4);}catch(_0x314e4e){if(_0x314e4e instanceof SDKError)return console[_0x3d7a91(0x113)](_0x3d7a91(0xe3)+_0x314e4e[_0x3d7a91(0xe2)]),_0x314e4e['cause']&&console[_0x3d7a91(0x113)](_0x3d7a91(0x11c)+_0x314e4e[_0x3d7a91(0xde)]),0x1;throw _0x314e4e;}}async['listWithPattern'](_0x33e419,_0x29c1c2,_0x4d681a){const _0x308889=a35_0xe75e98,{options:_0x5ba767,tdx:_0xefa31f}=_0x33e419,_0x289305=await withSpinner('Resolving\x20parent\x20segment\x20\x27'+_0x29c1c2+_0x308889(0x112),()=>_0xefa31f['segment']['resolvePathToResource'](_0x29c1c2),{'verbose':_0x5ba767[_0x308889(0xe1)]}),_0x38ce2f=_0x289305['data'],_0x21b9c9=await withSpinner(_0x308889(0x106),()=>_0xefa31f[_0x308889(0x108)][_0x308889(0xf9)](_0x38ce2f[_0x308889(0x10a)],_0x38ce2f[_0x308889(0xef)]),{'verbose':_0x5ba767[_0x308889(0xe1)]}),{folders:_0x5360c9,segments:_0x2c36bc,journeys:_0x40c386}=_0x21b9c9['data'],_0xb326d3=_0x4d681a[_0x308889(0xe6)](/[.+^${}()|[\]\\]/g,_0x308889(0xee))[_0x308889(0xe6)](/\*/g,'.*')[_0x308889(0xe6)](/\?/g,'.'),_0x173170=new RegExp('^'+_0xb326d3+'$','i'),_0x539d2d=_0x5360c9['filter'](_0x1a3aef=>_0x173170['test'](_0x1a3aef[_0x308889(0x10d)])),_0x2c03fb=_0x2c36bc['filter'](_0x3243bc=>_0x173170[_0x308889(0x11a)](_0x3243bc[_0x308889(0x10d)])),_0x105a98=_0x40c386[_0x308889(0x118)](_0xe95c95=>_0x173170[_0x308889(0x11a)](_0xe95c95['journeyBundleName'])),_0x16a27f=_0x539d2d['length']+_0x2c03fb[_0x308889(0x10e)]+_0x105a98[_0x308889(0x10e)];console[_0x308889(0x113)](_0x308889(0xdd)+_0x539d2d['length']+'\x20folder'+(_0x539d2d['length']!==0x1?'s':'')+',\x20'+_0x2c03fb[_0x308889(0x10e)]+_0x308889(0x117)+(_0x2c03fb[_0x308889(0x10e)]!==0x1?'s':'')+',\x20and\x20'+_0x105a98['length']+'\x20journey'+(_0x105a98['length']!==0x1?'s':'')+'\x20matching\x20\x27'+_0x4d681a+'\x27');const _0x4b3eb8=_0x527a73=>{const _0x554b75=_0x308889;return getConsoleNextUrl(_0x5ba767['site'],_0x554b75(0x120)+_0x38ce2f[_0x554b75(0x10a)]+'/e/'+_0x527a73);},_0x48ab88=_0x5ba767['format']==='json'||_0x5ba767[_0x308889(0xea)]==='jsonl';if(_0x48ab88){const _0x28ef6d=[..._0x539d2d[_0x308889(0x125)](_0x514b92=>({..._0x514b92,'type':_0x308889(0xf5)})),..._0x2c03fb[_0x308889(0x125)](_0x4a08f6=>({..._0x4a08f6,'type':_0x308889(0x108),'url':_0x4b3eb8(_0x4a08f6['id'])})),..._0x105a98[_0x308889(0x125)](_0x295687=>({..._0x295687,'name':_0x295687[_0x308889(0x115)],'type':_0x308889(0x102)}))]['sort']((_0x1ab336,_0x4d6a40)=>_0x1ab336[_0x308889(0x10d)]['localeCompare'](_0x4d6a40[_0x308889(0x10d)]));await handleSDKOutput(_0x28ef6d,_0x5ba767);}else{if(_0x16a27f===0x0)console[_0x308889(0xf7)](_0x308889(0x11d)+_0x4d681a);else{console['log'](a35_0x459b1b[_0x308889(0x11f)]('['+_0x29c1c2+_0x308889(0xf4)+_0x4d681a+'\x27'));const _0x182e8a=formatFlatList(_0x539d2d,_0x2c03fb,{'showMetadata':!![],'getSegmentUrl':_0x4b3eb8},_0x105a98);console[_0x308889(0xf7)](_0x182e8a);}}return 0x0;}async[a35_0xe75e98(0x121)](_0x13faec,_0x53f9a9){const _0x2b1e56=a35_0xe75e98,{options:_0x54766a,tdx:_0x75b22b}=_0x13faec,_0x11b611=await withSpinner('Resolving\x20path\x20\x27'+_0x53f9a9+_0x2b1e56(0x112),()=>_0x75b22b[_0x2b1e56(0x108)]['resolvePathToResource'](_0x53f9a9),{'verbose':_0x54766a['verbose']}),_0x1e98f4=_0x11b611[_0x2b1e56(0x11b)];_0x54766a[_0x2b1e56(0xe1)]&&(console[_0x2b1e56(0x113)](_0x2b1e56(0xe7)+_0x1e98f4[_0x2b1e56(0x10a)]),_0x1e98f4[_0x2b1e56(0xef)]&&console[_0x2b1e56(0x113)](_0x2b1e56(0xf1)+_0x1e98f4[_0x2b1e56(0xef)]));const _0x541ab5=await withSpinner('Listing\x20folders,\x20segments,\x20and\x20journeys...',()=>_0x75b22b['segment'][_0x2b1e56(0xf9)](_0x1e98f4[_0x2b1e56(0x10a)],_0x1e98f4['folderId']),{'verbose':_0x54766a[_0x2b1e56(0xe1)]}),{folders:_0x1f110c,segments:_0x313277,journeys:_0x5ded63}=_0x541ab5['data'],_0x3b99ec=_0x1f110c[_0x2b1e56(0x10e)]+_0x313277[_0x2b1e56(0x10e)]+_0x5ded63['length'];console[_0x2b1e56(0x113)](_0x2b1e56(0xdd)+_0x1f110c['length']+_0x2b1e56(0x114)+(_0x1f110c[_0x2b1e56(0x10e)]!==0x1?'s':'')+',\x20'+_0x313277[_0x2b1e56(0x10e)]+'\x20segment'+(_0x313277[_0x2b1e56(0x10e)]!==0x1?'s':'')+_0x2b1e56(0xfe)+_0x5ded63[_0x2b1e56(0x10e)]+_0x2b1e56(0x110)+(_0x5ded63[_0x2b1e56(0x10e)]!==0x1?'s':''));const _0x17ade9=_0x41a2ea=>{const _0x5bb678=_0x2b1e56;return getConsoleNextUrl(_0x54766a[_0x5bb678(0xf6)],_0x5bb678(0x120)+_0x1e98f4[_0x5bb678(0x10a)]+'/e/'+_0x41a2ea);},_0x376e53=_0x44c070=>{const _0x4097b4=_0x2b1e56;return getConsoleNextUrl(_0x54766a['site'],_0x4097b4(0x120)+_0x1e98f4[_0x4097b4(0x10a)]+_0x4097b4(0xe8)+_0x44c070+_0x4097b4(0xf3));},_0x209a97=_0x54766a['format']==='json'||_0x54766a[_0x2b1e56(0xea)]==='jsonl';if(_0x209a97){const _0xe79d6=[..._0x1f110c['map'](_0x462be3=>({..._0x462be3,'type':_0x2b1e56(0xf5)})),..._0x313277['map'](_0xeffbba=>({..._0xeffbba,'type':_0x2b1e56(0x108),'url':_0x17ade9(_0xeffbba['id'])})),..._0x5ded63[_0x2b1e56(0x125)](_0x14449b=>({..._0x14449b,'name':_0x14449b[_0x2b1e56(0x115)],'type':'journey','url':_0x376e53(_0x14449b['id'])}))][_0x2b1e56(0xfa)]((_0x29776b,_0x20bdbf)=>_0x29776b[_0x2b1e56(0x10d)][_0x2b1e56(0x105)](_0x20bdbf['name']));await handleSDKOutput(_0xe79d6,_0x54766a);}else{if(_0x3b99ec===0x0)console['log'](a35_0x459b1b[_0x2b1e56(0x11f)]('['+_0x53f9a9+']')),console[_0x2b1e56(0xf7)](_0x2b1e56(0x124));else{console['log'](a35_0x459b1b[_0x2b1e56(0x11f)]('['+_0x53f9a9+']'));const _0x3eb567=formatFlatList(_0x1f110c,_0x313277,{'showMetadata':!![],'getSegmentUrl':_0x17ade9,'getJourneyUrl':_0x376e53},_0x5ded63);console[_0x2b1e56(0xf7)](_0x3eb567);}}return 0x0;}async[a35_0xe75e98(0x126)](_0x309cf2,_0x190f58){const _0x5488e6=a35_0xe75e98,{options:_0x272254,tdx:_0x1ba001}=_0x309cf2,_0x215a63=await withSpinner('Resolving\x20path\x20\x27'+_0x190f58+_0x5488e6(0x112),()=>_0x1ba001['segment'][_0x5488e6(0xda)](_0x190f58),{'verbose':_0x272254['verbose']}),_0x31f94f=_0x215a63['data'];_0x272254['verbose']&&(console[_0x5488e6(0x113)]('Parent\x20ID:\x20'+_0x31f94f['parentId']),_0x31f94f['folderId']&&console[_0x5488e6(0x113)](_0x5488e6(0xf1)+_0x31f94f['folderId']));const _0x2e0109=_0x272254[_0x5488e6(0x103)]||0xa,_0x1406d1=await withSpinner('Building\x20hierarchy\x20tree...',()=>_0x1ba001[_0x5488e6(0x108)][_0x5488e6(0x126)](_0x31f94f[_0x5488e6(0x10a)],_0x31f94f[_0x5488e6(0xef)],0x0,_0x2e0109),{'verbose':_0x272254[_0x5488e6(0xe1)]}),_0x4c2444=_0x1406d1[_0x5488e6(0x11b)],_0x13e630=_0x5b7e55=>{const _0x186a42=_0x5488e6;let _0xfc9074=0x0,_0x263fb5=0x0,_0x1b951e=0x0;for(const _0x545745 of _0x5b7e55){if(_0x545745[_0x186a42(0xdc)]==='folder')_0xfc9074++;else{if(_0x545745[_0x186a42(0xdc)]===_0x186a42(0x108))_0x263fb5++;else{if(_0x545745[_0x186a42(0xdc)]===_0x186a42(0x102))_0x1b951e++;}}if(_0x545745[_0x186a42(0x100)]){const _0x424995=_0x13e630(_0x545745[_0x186a42(0x100)]);_0xfc9074+=_0x424995[_0x186a42(0xec)],_0x263fb5+=_0x424995[_0x186a42(0xdf)],_0x1b951e+=_0x424995[_0x186a42(0xe5)];}}return{'folders':_0xfc9074,'segments':_0x263fb5,'journeys':_0x1b951e};},_0x2dc440=_0x13e630(_0x4c2444);console['error'](_0x5488e6(0xfd)+_0x2dc440[_0x5488e6(0xec)]+'\x20folder'+(_0x2dc440[_0x5488e6(0xec)]!==0x1?'s':'')+',\x20'+_0x2dc440[_0x5488e6(0xdf)]+_0x5488e6(0x117)+(_0x2dc440['segments']!==0x1?'s':'')+_0x5488e6(0xfe)+_0x2dc440[_0x5488e6(0xe5)]+_0x5488e6(0x110)+(_0x2dc440[_0x5488e6(0xe5)]!==0x1?'s':''));const _0x43ada0=_0x4a3a1b=>{const _0x2203b4=_0x5488e6;return getConsoleNextUrl(_0x272254[_0x2203b4(0xf6)],'/app/ps/'+_0x31f94f[_0x2203b4(0x10a)]+'/e/'+_0x4a3a1b);},_0xfb47a5=_0x85d414=>{const _0x44adef=_0x5488e6;return getConsoleNextUrl(_0x272254[_0x44adef(0xf6)],_0x44adef(0x120)+_0x31f94f[_0x44adef(0x10a)]+_0x44adef(0xe8)+_0x85d414+'/j/da');};if(_0x272254[_0x5488e6(0xea)]===_0x5488e6(0x109)||_0x272254[_0x5488e6(0xea)]===_0x5488e6(0x104))await handleSDKOutput(_0x4c2444,_0x272254);else{console[_0x5488e6(0xf7)](a35_0x459b1b[_0x5488e6(0x11f)]('['+_0x190f58+']'));const _0x149d1a=formatTree(_0x4c2444,{'showMetadata':!![],'getSegmentUrl':_0x43ada0,'getJourneyUrl':_0xfb47a5});console['log'](_0x149d1a);}return 0x0;}}
@@ -1 +1 @@
1
- const a36_0x5b957=a36_0x2274;function a36_0x10ad(){const _0x1d4f3e=['Site:\x20','66546IVupbc','data','614340SOHWWO','database','Limit:\x20','✔\x20Retrieved\x20','name','site','Table:\x20','Usage:\x20tdx\x20show\x20<database.table>','error','args','2658urYOKz','Querying\x20','validate','verbose','Database:\x20','cause','22GEPkoi','374005aJAVXt','catalog','length','575295zPbxAt','\x20\x20\x20or:\x20tdx\x20show\x20<catalog.database.table>','7PSCrXT','2208744JvVaLg','Too\x20many\x20arguments\x0aUsage:\x20tdx\x20show\x20<database.table>\x0a\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--database\x20<database>\x0a\x0aRun\x20\x27tdx\x20show\x20--help\x27\x20for\x20more\x20options','4RrOUVc','Catalog:\x20','description','\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--database\x20<database>','...','query','execute','8928282iLQETF','show','50ybBFTf','\x20\x20Cause:\x20','showTable','Error:\x20'];a36_0x10ad=function(){return _0x1d4f3e;};return a36_0x10ad();}(function(_0x4349f6,_0x34eda1){const _0x1e9f26=a36_0x2274,_0x37a85b=_0x4349f6();while(!![]){try{const _0x5afaac=-parseInt(_0x1e9f26(0x77))/0x1*(-parseInt(_0x1e9f26(0x7d))/0x2)+-parseInt(_0x1e9f26(0x81))/0x3+parseInt(_0x1e9f26(0x86))/0x4*(-parseInt(_0x1e9f26(0x7e))/0x5)+parseInt(_0x1e9f26(0x6d))/0x6*(-parseInt(_0x1e9f26(0x83))/0x7)+-parseInt(_0x1e9f26(0x84))/0x8+-parseInt(_0x1e9f26(0x6b))/0x9*(parseInt(_0x1e9f26(0x66))/0xa)+parseInt(_0x1e9f26(0x64))/0xb;if(_0x5afaac===_0x34eda1)break;else _0x37a85b['push'](_0x37a85b['shift']());}catch(_0x236c5a){_0x37a85b['push'](_0x37a85b['shift']());}}}(a36_0x10ad,0x26ca1));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleSDKOutput}from'../core/command-output.js';import{parseTableReference,validateTableDescribeReference}from'../utils/table-ref-parser.js';import{withSpinner}from'../utils/spinner.js';import{DEFAULT_DISPLAY_LIMIT,resolveLimit}from'../core/constants.js';function a36_0x2274(_0x1a98ef,_0x3557d9){_0x1a98ef=_0x1a98ef-0x64;const _0x10ad32=a36_0x10ad();let _0x227449=_0x10ad32[_0x1a98ef];return _0x227449;}export class ShowCommand extends BaseCommand{[a36_0x5b957(0x71)]=a36_0x5b957(0x65);[a36_0x5b957(0x88)]='Show\x20table\x20contents';async[a36_0x5b957(0x8c)](_0x5db608){return this['showTable'](_0x5db608);}async[a36_0x5b957(0x68)](_0x3af598){const _0x160714=a36_0x5b957,{options:_0x4b9fd3,args:_0x54fbcb,tdx:_0x1011e5}=_0x3af598;let _0x15deb2;try{_0x15deb2=parseTableReference(_0x54fbcb[0x0]);const _0x322c7b=_0x4b9fd3['database'];!_0x15deb2['database']&&_0x322c7b&&(_0x15deb2[_0x160714(0x6e)]=_0x322c7b);const _0x2d012b=validateTableDescribeReference(_0x15deb2);if(_0x2d012b)return console[_0x160714(0x75)](_0x160714(0x69)+_0x2d012b),console[_0x160714(0x75)]('Usage:\x20tdx\x20show\x20<database.table>'),console[_0x160714(0x75)](_0x160714(0x82)),console[_0x160714(0x75)](_0x160714(0x89)),0x1;}catch(_0x596572){return console[_0x160714(0x75)](_0x160714(0x69)+_0x596572['message']),console[_0x160714(0x75)](_0x160714(0x74)),console[_0x160714(0x75)](_0x160714(0x82)),console[_0x160714(0x75)](_0x160714(0x89)),0x1;}const _0x948321=_0x15deb2[_0x160714(0x7f)],_0xfb1ca1=_0x15deb2[_0x160714(0x6e)],_0x7eb2fc=_0x15deb2['table'],_0x3c8c5a=resolveLimit(_0x4b9fd3['limit'],DEFAULT_DISPLAY_LIMIT);try{_0x4b9fd3['verbose']&&(console['error'](_0x160714(0x6a)+_0x4b9fd3[_0x160714(0x72)]),_0x948321&&console['error'](_0x160714(0x87)+_0x948321),console[_0x160714(0x75)](_0x160714(0x7b)+_0xfb1ca1),console['error'](_0x160714(0x73)+_0x7eb2fc),console[_0x160714(0x75)](_0x160714(0x6f)+_0x3c8c5a));const _0x3fd04a=_0x948321?_0x948321+'.'+_0xfb1ca1+'.'+_0x7eb2fc:_0xfb1ca1+'.'+_0x7eb2fc,_0x232c5f=await withSpinner(_0x160714(0x78)+_0x3fd04a+_0x160714(0x8a),()=>_0x1011e5[_0x160714(0x8b)][_0x160714(0x68)](_0xfb1ca1,_0x7eb2fc,_0x3c8c5a,_0x948321),{'verbose':_0x4b9fd3[_0x160714(0x7a)]}),_0x4a2c9d=_0x232c5f[_0x160714(0x6c)],_0x268cf3=_0x4a2c9d[_0x160714(0x6c)];return _0x268cf3['length']===0x0?console[_0x160714(0x75)]('✔\x20Query\x20successful\x20-\x200\x20rows\x20returned'):console[_0x160714(0x75)](_0x160714(0x70)+_0x268cf3[_0x160714(0x80)]+'\x20row'+(_0x268cf3[_0x160714(0x80)]!==0x1?'s':'')+'\x20from\x20'+_0x3fd04a),await handleSDKOutput(_0x268cf3,_0x4b9fd3),0x0;}catch(_0x3fd9ca){if(_0x3fd9ca instanceof SDKError)return console[_0x160714(0x75)](_0x160714(0x69)+_0x3fd9ca['message']),_0x3fd9ca['cause']&&console[_0x160714(0x75)](_0x160714(0x67)+_0x3fd9ca[_0x160714(0x7c)]),0x1;throw _0x3fd9ca;}}[a36_0x5b957(0x79)](_0x462300){const _0x258059=a36_0x5b957;if(_0x462300[_0x258059(0x76)][_0x258059(0x80)]===0x0)return'Usage:\x20tdx\x20show\x20<database.table>\x0a\x20\x20\x20or:\x20tdx\x20show\x20<catalog.database.table>\x0a\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--database\x20<database>\x0a\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--in\x20<database>\x0a\x0aRun\x20\x27tdx\x20show\x20--help\x27\x20for\x20more\x20options';if(_0x462300['args'][_0x258059(0x80)]>0x1)return _0x258059(0x85);return undefined;}}
1
+ function a36_0x324c(){const _0x346ffe=['Usage:\x20tdx\x20show\x20<database.table>\x0a\x20\x20\x20or:\x20tdx\x20show\x20<catalog.database.table>\x0a\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--database\x20<database>\x0a\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--in\x20<database>\x0a\x0aRun\x20\x27tdx\x20show\x20--help\x27\x20for\x20more\x20options','8607144mOliaP','2CZAaHL','limit','6eWzDdp','2212167QICeTD','\x20\x20Cause:\x20','Database:\x20','\x20row','Table:\x20','3796ZtFKMo','33XkXDob','207086TCirNv','message','args','name','table','Usage:\x20tdx\x20show\x20<database.table>','validate','Catalog:\x20','error','execute','showTable','Querying\x20','130QiDPTH','cause','3994407UBBtzy','Too\x20many\x20arguments\x0aUsage:\x20tdx\x20show\x20<database.table>\x0a\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--database\x20<database>\x0a\x0aRun\x20\x27tdx\x20show\x20--help\x27\x20for\x20more\x20options','...','\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--database\x20<database>','Error:\x20','Show\x20table\x20contents','5619170yznBEY','verbose','database','6158208HEpyNi','length','data','description','Site:\x20','site','query','\x20\x20\x20or:\x20tdx\x20show\x20<catalog.database.table>'];a36_0x324c=function(){return _0x346ffe;};return a36_0x324c();}const a36_0x250d4f=a36_0x1968;(function(_0x7535b3,_0x2aec4e){const _0x1064de=a36_0x1968,_0x3abc88=_0x7535b3();while(!![]){try{const _0xc570bb=parseInt(_0x1064de(0xd1))/0x1*(parseInt(_0x1064de(0xdb))/0x2)+-parseInt(_0x1064de(0xd4))/0x3+parseInt(_0x1064de(0xd9))/0x4*(parseInt(_0x1064de(0xbc))/0x5)+-parseInt(_0x1064de(0xd3))/0x6*(-parseInt(_0x1064de(0xc7))/0x7)+-parseInt(_0x1064de(0xd0))/0x8+-parseInt(_0x1064de(0xbe))/0x9+parseInt(_0x1064de(0xc4))/0xa*(parseInt(_0x1064de(0xda))/0xb);if(_0xc570bb===_0x2aec4e)break;else _0x3abc88['push'](_0x3abc88['shift']());}catch(_0x73ee54){_0x3abc88['push'](_0x3abc88['shift']());}}}(a36_0x324c,0x83df6));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleSDKOutput}from'../core/command-output.js';import{parseTableReference,validateTableDescribeReference}from'../utils/table-ref-parser.js';import{withSpinner}from'../utils/spinner.js';function a36_0x1968(_0x801ed4,_0x3d5daa){_0x801ed4=_0x801ed4-0xb6;const _0x324cf1=a36_0x324c();let _0x196897=_0x324cf1[_0x801ed4];return _0x196897;}import{DEFAULT_DISPLAY_LIMIT,resolveLimit}from'../core/constants.js';export class ShowCommand extends BaseCommand{[a36_0x250d4f(0xde)]='show';[a36_0x250d4f(0xca)]=a36_0x250d4f(0xc3);async[a36_0x250d4f(0xb9)](_0x5c480d){const _0x9d2a17=a36_0x250d4f;return this[_0x9d2a17(0xba)](_0x5c480d);}async[a36_0x250d4f(0xba)](_0x585dfd){const _0xa1c51a=a36_0x250d4f,{options:_0x41fc4a,args:_0x4a9232,tdx:_0x5f7d7f}=_0x585dfd;let _0x5c1b46;try{_0x5c1b46=parseTableReference(_0x4a9232[0x0]);const _0x535aed=_0x41fc4a['database'];!_0x5c1b46[_0xa1c51a(0xc6)]&&_0x535aed&&(_0x5c1b46[_0xa1c51a(0xc6)]=_0x535aed);const _0x422803=validateTableDescribeReference(_0x5c1b46);if(_0x422803)return console[_0xa1c51a(0xb8)](_0xa1c51a(0xc2)+_0x422803),console[_0xa1c51a(0xb8)](_0xa1c51a(0xe0)),console[_0xa1c51a(0xb8)](_0xa1c51a(0xce)),console[_0xa1c51a(0xb8)](_0xa1c51a(0xc1)),0x1;}catch(_0x106004){return console['error'](_0xa1c51a(0xc2)+_0x106004[_0xa1c51a(0xdc)]),console[_0xa1c51a(0xb8)](_0xa1c51a(0xe0)),console[_0xa1c51a(0xb8)](_0xa1c51a(0xce)),console[_0xa1c51a(0xb8)](_0xa1c51a(0xc1)),0x1;}const _0x320666=_0x5c1b46['catalog'],_0x36ac0c=_0x5c1b46['database'],_0x370590=_0x5c1b46[_0xa1c51a(0xdf)],_0x26d133=resolveLimit(_0x41fc4a[_0xa1c51a(0xd2)],DEFAULT_DISPLAY_LIMIT);try{_0x41fc4a[_0xa1c51a(0xc5)]&&(console[_0xa1c51a(0xb8)](_0xa1c51a(0xcb)+_0x41fc4a[_0xa1c51a(0xcc)]),_0x320666&&console[_0xa1c51a(0xb8)](_0xa1c51a(0xb7)+_0x320666),console[_0xa1c51a(0xb8)](_0xa1c51a(0xd6)+_0x36ac0c),console[_0xa1c51a(0xb8)](_0xa1c51a(0xd8)+_0x370590),console[_0xa1c51a(0xb8)]('Limit:\x20'+_0x26d133));const _0x1bf2e2=_0x320666?_0x320666+'.'+_0x36ac0c+'.'+_0x370590:_0x36ac0c+'.'+_0x370590,_0x11faa0=await withSpinner(_0xa1c51a(0xbb)+_0x1bf2e2+_0xa1c51a(0xc0),()=>_0x5f7d7f[_0xa1c51a(0xcd)][_0xa1c51a(0xba)](_0x36ac0c,_0x370590,_0x26d133,_0x320666),{'verbose':_0x41fc4a[_0xa1c51a(0xc5)]}),_0x29cc0b=_0x11faa0[_0xa1c51a(0xc9)],_0x5e8293=_0x29cc0b[_0xa1c51a(0xc9)];return _0x5e8293[_0xa1c51a(0xc8)]===0x0?console[_0xa1c51a(0xb8)]('✔\x20Query\x20successful\x20-\x200\x20rows\x20returned'):console[_0xa1c51a(0xb8)]('✔\x20Retrieved\x20'+_0x5e8293[_0xa1c51a(0xc8)]+_0xa1c51a(0xd7)+(_0x5e8293['length']!==0x1?'s':'')+'\x20from\x20'+_0x1bf2e2),await handleSDKOutput(_0x5e8293,_0x41fc4a),0x0;}catch(_0x23b090){if(_0x23b090 instanceof SDKError)return console['error'](_0xa1c51a(0xc2)+_0x23b090[_0xa1c51a(0xdc)]),_0x23b090['cause']&&console[_0xa1c51a(0xb8)](_0xa1c51a(0xd5)+_0x23b090[_0xa1c51a(0xbd)]),0x1;throw _0x23b090;}}[a36_0x250d4f(0xb6)](_0x1678c8){const _0xc56f60=a36_0x250d4f;if(_0x1678c8[_0xc56f60(0xdd)]['length']===0x0)return _0xc56f60(0xcf);if(_0x1678c8['args'][_0xc56f60(0xc8)]>0x1)return _0xc56f60(0xbf);return undefined;}}
@@ -1 +1 @@
1
- const a37_0x3015f2=a37_0x3872;function a37_0x188b(){const _0x4e91d9=['status','filter','email','config','4ZhcfNf','last_name','site','5VBlSAy','log','env','13794867zIXeMR','2591080CVBRPD','account_id','jobs','message','cli','746103WieLxW','profileSource','Read\x20credential\x20from\x20','10128566DlMiIi','green','bold','2vHupee','name','TDX_PROFILE\x20env','yellow','CLI\x20flag','388406dFKGzk','Show\x20authentication\x20status\x20and\x20current\x20context','session','dim','N/A','(from\x20','site:\x20','1495070IxNdXF','first_name','Account\x20ID:','6400902bAxVew','cyan'];a37_0x188b=function(){return _0x4e91d9;};return a37_0x188b();}(function(_0x24881b,_0x8f4ee3){const _0x44f180=a37_0x3872,_0x18544b=_0x24881b();while(!![]){try{const _0x3f1bb4=parseInt(_0x44f180(0x1aa))/0x1*(parseInt(_0x44f180(0x1a5))/0x2)+-parseInt(_0x44f180(0x19f))/0x3*(parseInt(_0x44f180(0x1ba))/0x4)+parseInt(_0x44f180(0x1bd))/0x5*(parseInt(_0x44f180(0x1b4))/0x6)+parseInt(_0x44f180(0x1a2))/0x7+-parseInt(_0x44f180(0x1c1))/0x8+-parseInt(_0x44f180(0x1c0))/0x9+parseInt(_0x44f180(0x1b1))/0xa;if(_0x3f1bb4===_0x8f4ee3)break;else _0x18544b['push'](_0x18544b['shift']());}catch(_0x57b70b){_0x18544b['push'](_0x18544b['shift']());}}}(a37_0x188b,0xe708f));import{BaseCommand,printAuthError}from'./command.js';import{resolveAPIKeyAsync}from'../core/config.js';import{HTTPClientError}from'../sdk/client/http-client.js';import{GlobalContext}from'../core/global-context.js';import a37_0x4879f5 from'chalk';function a37_0x3872(_0x3f2ceb,_0x14c42b){_0x3f2ceb=_0x3f2ceb-0x19d;const _0x188b81=a37_0x188b();let _0x38725b=_0x188b81[_0x3f2ceb];return _0x38725b;}export class StatusCommand extends BaseCommand{[a37_0x3015f2(0x1a6)]=a37_0x3015f2(0x1b6);['description']=a37_0x3015f2(0x1ab);async['execute'](_0x1aabe3){const _0xa9ab66=a37_0x3015f2,{options:_0x4661b9,tdx:_0x4a65e8}=_0x1aabe3,_0x30437a=_0x4661b9[_0xa9ab66(0x1bc)],_0xf7ff1a=new GlobalContext(_0x4661b9),_0x422914=_0xf7ff1a['profile'],_0x812a24=_0xf7ff1a[_0xa9ab66(0x1a0)],_0x5cd744=_0x812a24===_0xa9ab66(0x19e)?_0xa9ab66(0x1a9):_0x812a24===_0xa9ab66(0x1ac)?_0xa9ab66(0x1ac):_0x812a24===_0xa9ab66(0x1bf)?_0xa9ab66(0x1a7):_0x812a24===_0xa9ab66(0x1b9)?_0xa9ab66(0x1b9):null,_0x2e1268=_0x422914?a37_0x4879f5[_0xa9ab66(0x1b5)](_0x422914):a37_0x4879f5[_0xa9ab66(0x1ad)](_0xa9ab66(0x1ae)),_0x2c3ba0=_0x5cd744?'\x20'+a37_0x4879f5[_0xa9ab66(0x1ad)](_0xa9ab66(0x1af)+_0x5cd744+')'):'';console['log'](a37_0x4879f5['bold']('tdx')+'\x20profile:\x20'+_0x2e1268+_0x2c3ba0+'\x20'+a37_0x4879f5['dim']('(')+_0xa9ab66(0x1b0)+a37_0x4879f5[_0xa9ab66(0x1b5)](_0x30437a)+a37_0x4879f5[_0xa9ab66(0x1ad)](')'));const _0x510260=await resolveAPIKeyAsync(_0x30437a,_0x422914);if(_0x510260){const {source:_0x486d0f,isDeprecated:_0x3ada15}=_0x510260,_0x1c5324=_0xa9ab66(0x1a1)+a37_0x4879f5[_0xa9ab66(0x1b5)](_0x486d0f);console[_0xa9ab66(0x1be)](_0x3ada15?a37_0x4879f5['yellow'](_0x1c5324):_0x1c5324);}else console[_0xa9ab66(0x1be)](a37_0x4879f5['yellow']('No\x20credential\x20found'));let _0x30a6fe=![];try{const _0x5a6074=await _0x4a65e8[_0xa9ab66(0x1c3)]['getUserInfo']();console[_0xa9ab66(0x1be)](a37_0x4879f5[_0xa9ab66(0x1a3)]('✓\x20Authentication\x20successful\x0a')),console['log'](a37_0x4879f5[_0xa9ab66(0x1a4)]('User:')+'\x20'+a37_0x4879f5[_0xa9ab66(0x1b5)](_0x5a6074[_0xa9ab66(0x1b8)]));if(_0x5a6074[_0xa9ab66(0x1b2)]||_0x5a6074[_0xa9ab66(0x1bb)]){const _0x1098eb=[_0x5a6074[_0xa9ab66(0x1b2)],_0x5a6074['last_name']][_0xa9ab66(0x1b7)](Boolean)['join']('\x20');console[_0xa9ab66(0x1be)](a37_0x4879f5['bold']('Name:')+'\x20'+_0x1098eb);}_0x5a6074['account_id']&&console['log'](a37_0x4879f5[_0xa9ab66(0x1a4)](_0xa9ab66(0x1b3))+'\x20'+a37_0x4879f5[_0xa9ab66(0x1a8)](_0x5a6074[_0xa9ab66(0x1c2)])),_0x30a6fe=!![];}catch(_0x3ec119){_0x3ec119 instanceof HTTPClientError&&_0x3ec119['status']===0x191?printAuthError(_0x3ec119,!![],_0x422914):console['error'](a37_0x4879f5['red']('✗\x20Validation\x20failed:\x20'+(_0x3ec119 instanceof Error?_0x3ec119[_0xa9ab66(0x19d)]:String(_0x3ec119))));}return console[_0xa9ab66(0x1be)](),_0xf7ff1a['displayWithSources'](),_0x30a6fe?0x0:0x1;}}
1
+ const a37_0x26ceb9=a37_0xb094;(function(_0x1ee404,_0x2d75b0){const _0x4325f7=a37_0xb094,_0x50a66e=_0x1ee404();while(!![]){try{const _0x29d95a=-parseInt(_0x4325f7(0x17b))/0x1+-parseInt(_0x4325f7(0x16a))/0x2+parseInt(_0x4325f7(0x17a))/0x3*(parseInt(_0x4325f7(0x16f))/0x4)+-parseInt(_0x4325f7(0x178))/0x5+parseInt(_0x4325f7(0x162))/0x6+-parseInt(_0x4325f7(0x174))/0x7+-parseInt(_0x4325f7(0x16d))/0x8*(-parseInt(_0x4325f7(0x187))/0x9);if(_0x29d95a===_0x2d75b0)break;else _0x50a66e['push'](_0x50a66e['shift']());}catch(_0x1514da){_0x50a66e['push'](_0x50a66e['shift']());}}}(a37_0x4dea,0xc810c));import{BaseCommand,printAuthError}from'./command.js';import{resolveAPIKeyAsync}from'../core/config.js';import{HTTPClientError}from'../sdk/client/http-client.js';import{GlobalContext}from'../core/global-context.js';import a37_0x13ba3 from'chalk';function a37_0x4dea(){const _0x55c04f=['155416gXbPpI','CLI\x20flag','getUserInfo','dim','message','2204979UpTXAx','description','log','yellow','6768665bAKXQS','User:','27xmGOgh','531671xQUaeW','✗\x20Validation\x20failed:\x20','N/A','Account\x20ID:','filter','site:\x20','✓\x20Authentication\x20successful\x0a','profileSource','Show\x20authentication\x20status\x20and\x20current\x20context','env','account_id','error','28987587lEDdgE','displayWithSources','green','last_name','email','No\x20credential\x20found','\x20profile:\x20','tdx','status','4113426FfdhHl','profile','jobs','Name:','first_name','name','join','cyan','2472462uMmuPm','config','execute','8xChOYO','bold'];a37_0x4dea=function(){return _0x55c04f;};return a37_0x4dea();}function a37_0xb094(_0x567b5d,_0x4204e4){_0x567b5d=_0x567b5d-0x162;const _0x4deaff=a37_0x4dea();let _0xb094b7=_0x4deaff[_0x567b5d];return _0xb094b7;}export class StatusCommand extends BaseCommand{[a37_0x26ceb9(0x167)]=a37_0x26ceb9(0x18f);[a37_0x26ceb9(0x175)]=a37_0x26ceb9(0x183);async[a37_0x26ceb9(0x16c)](_0xef8114){const _0x4e7383=a37_0x26ceb9,{options:_0x3ad27b,tdx:_0x21c998}=_0xef8114,_0x975e6b=_0x3ad27b['site'],_0x19fca8=new GlobalContext(_0x3ad27b),_0x131d75=_0x19fca8[_0x4e7383(0x163)],_0x2656b7=_0x19fca8[_0x4e7383(0x182)],_0xd49324=_0x2656b7==='cli'?_0x4e7383(0x170):_0x2656b7==='session'?'session':_0x2656b7===_0x4e7383(0x184)?'TDX_PROFILE\x20env':_0x2656b7==='config'?_0x4e7383(0x16b):null,_0x57543f=_0x131d75?a37_0x13ba3['cyan'](_0x131d75):a37_0x13ba3[_0x4e7383(0x172)](_0x4e7383(0x17d)),_0x390835=_0xd49324?'\x20'+a37_0x13ba3['dim']('(from\x20'+_0xd49324+')'):'';console[_0x4e7383(0x176)](a37_0x13ba3[_0x4e7383(0x16e)](_0x4e7383(0x18e))+_0x4e7383(0x18d)+_0x57543f+_0x390835+'\x20'+a37_0x13ba3[_0x4e7383(0x172)]('(')+_0x4e7383(0x180)+a37_0x13ba3[_0x4e7383(0x169)](_0x975e6b)+a37_0x13ba3[_0x4e7383(0x172)](')'));const _0x58c373=await resolveAPIKeyAsync(_0x975e6b,_0x131d75);if(_0x58c373){const {source:_0x118e43,isDeprecated:_0x1e1807}=_0x58c373,_0x3d6352='Read\x20credential\x20from\x20'+a37_0x13ba3[_0x4e7383(0x169)](_0x118e43);console['log'](_0x1e1807?a37_0x13ba3[_0x4e7383(0x177)](_0x3d6352):_0x3d6352);}else console['log'](a37_0x13ba3[_0x4e7383(0x177)](_0x4e7383(0x18c)));let _0x2f4be9=![];try{const _0x3568ac=await _0x21c998[_0x4e7383(0x164)][_0x4e7383(0x171)]();console[_0x4e7383(0x176)](a37_0x13ba3[_0x4e7383(0x189)](_0x4e7383(0x181))),console[_0x4e7383(0x176)](a37_0x13ba3[_0x4e7383(0x16e)](_0x4e7383(0x179))+'\x20'+a37_0x13ba3[_0x4e7383(0x169)](_0x3568ac[_0x4e7383(0x18b)]));if(_0x3568ac[_0x4e7383(0x166)]||_0x3568ac['last_name']){const _0x281954=[_0x3568ac[_0x4e7383(0x166)],_0x3568ac[_0x4e7383(0x18a)]][_0x4e7383(0x17f)](Boolean)[_0x4e7383(0x168)]('\x20');console['log'](a37_0x13ba3[_0x4e7383(0x16e)](_0x4e7383(0x165))+'\x20'+_0x281954);}_0x3568ac[_0x4e7383(0x185)]&&console['log'](a37_0x13ba3[_0x4e7383(0x16e)](_0x4e7383(0x17e))+'\x20'+a37_0x13ba3[_0x4e7383(0x177)](_0x3568ac[_0x4e7383(0x185)])),_0x2f4be9=!![];}catch(_0x2cd83b){_0x2cd83b instanceof HTTPClientError&&_0x2cd83b[_0x4e7383(0x18f)]===0x191?printAuthError(_0x2cd83b,!![],_0x131d75):console[_0x4e7383(0x186)](a37_0x13ba3['red'](_0x4e7383(0x17c)+(_0x2cd83b instanceof Error?_0x2cd83b[_0x4e7383(0x173)]:String(_0x2cd83b))));}return console[_0x4e7383(0x176)](),_0x19fca8[_0x4e7383(0x188)](),_0x2f4be9?0x0:0x1;}}
@@ -1 +1 @@
1
- const a38_0x217dd1=a38_0x11bb;(function(_0x4682b7,_0x437cb2){const _0x308687=a38_0x11bb,_0x2038c0=_0x4682b7();while(!![]){try{const _0xb22879=-parseInt(_0x308687(0xdc))/0x1+parseInt(_0x308687(0x100))/0x2+parseInt(_0x308687(0xd9))/0x3+-parseInt(_0x308687(0xf5))/0x4+parseInt(_0x308687(0xe9))/0x5+-parseInt(_0x308687(0xfe))/0x6*(-parseInt(_0x308687(0xf4))/0x7)+-parseInt(_0x308687(0xf7))/0x8;if(_0xb22879===_0x437cb2)break;else _0x2038c0['push'](_0x2038c0['shift']());}catch(_0x45c8dc){_0x2038c0['push'](_0x2038c0['shift']());}}}(a38_0x9e16,0x9dff0));function a38_0x11bb(_0x2844af,_0x22f957){_0x2844af=_0x2844af-0xd9;const _0x9e163a=a38_0x9e16();let _0x11bb0e=_0x9e163a[_0x2844af];return _0x11bb0e;}import{BaseCommand}from'./command.js';function a38_0x9e16(){const _0x428b37=['Note:\x20\x27','\x27\x20is\x20ambiguous.','Database\x20\x27','98sceLYQ','4811008NWmlPU','Or\x20use\x20--in\x20flag:','8112344YRCOxx','Error:\x20Pattern\x20\x27','includes','verbose','execute','\x20\x20Or:\x20\x20tdx\x20tables\x20--database\x20','description','351546LsSAKX','table','1196410NOZcQB','\x20\x20tdx\x20tables\x20\x22mydb.users\x22\x20\x20\x20\x20->\x20table\x20\x22users\x22\x20in\x20database\x20mydb','Listing\x20tables...','data','✔\x20Found\x20','Did\x20you\x20mean\x20to\x20list\x20all\x20tables\x20from\x20database\x20\x27','name','List\x20tables\x20in\x20a\x20database','2975715gwIqdY','site','listTables','790662DKpuaT','Site:\x20','\x20table','\x20\x20tdx\x20tables\x20\x22*.user*\x22\x20\x20\x20\x20\x20\x20\x20->\x20tables\x20matching\x20user*\x20across\x20databases','length','\x27\x20may\x20not\x20exist\x20or\x20contains\x20no\x20tables','error','\x20\x20Cause:\x20','Error:\x20Too\x20many\x20arguments.\x20Use\x20single\x20argument:','database','Database:\x20','cause','validate','6221125HNzNdB','\x27\x20without\x20wildcards\x20would\x20search\x20for\x20tables\x20named\x20\x27','\x27\x20across\x20all\x20databases.','Database:\x20all','tables','Error:\x20','message','Database\x20pattern:\x20'];a38_0x9e16=function(){return _0x428b37;};return a38_0x9e16();}import{SDKError}from'../sdk/index.js';import{handleSDKOutput}from'../core/command-output.js';import{parseTableReference}from'../utils/table-ref-parser.js';import{DEFAULT_LISTING_LIMIT,resolveLimit}from'../core/constants.js';import{withSpinner}from'../utils/spinner.js';export class TablesCommand extends BaseCommand{[a38_0x217dd1(0x106)]=a38_0x217dd1(0xed);[a38_0x217dd1(0xfd)]=a38_0x217dd1(0x107);async[a38_0x217dd1(0xfb)](_0x4a810c){const _0x5e570f=a38_0x217dd1,{options:_0x29fe96,args:_0x1bb73a,tdx:_0x2a3aae}=_0x4a810c;let _0x341bdf;if(_0x1bb73a[_0x5e570f(0xe0)]===0x0)_0x341bdf={'database':undefined,'table':undefined,'original':''};else{if(_0x1bb73a['length']===0x1)try{_0x341bdf=parseTableReference(_0x1bb73a[0x0]);if(_0x341bdf[_0x5e570f(0xff)]&&!_0x341bdf['database']&&!_0x341bdf[_0x5e570f(0xff)][_0x5e570f(0xf9)]('*')&&!_0x341bdf['table']['includes']('?'))return console[_0x5e570f(0xe2)](_0x5e570f(0xf8)+_0x1bb73a[0x0]+_0x5e570f(0xf2)),console[_0x5e570f(0xe2)](_0x5e570f(0x105)+_0x341bdf[_0x5e570f(0xff)]+'\x27?'),console[_0x5e570f(0xe2)]('\x20\x20Use:\x20tdx\x20tables\x20\x22'+_0x341bdf[_0x5e570f(0xff)]+'.*\x22'),console[_0x5e570f(0xe2)]('\x20\x20Or:\x20\x20tdx\x20tables\x20--in\x20'+_0x341bdf[_0x5e570f(0xff)]),console[_0x5e570f(0xe2)](_0x5e570f(0xfc)+_0x341bdf['table']),console[_0x5e570f(0xe2)](''),console[_0x5e570f(0xe2)](_0x5e570f(0xf1)+_0x1bb73a[0x0]+_0x5e570f(0xea)+_0x341bdf[_0x5e570f(0xff)]+_0x5e570f(0xeb)),0x1;}catch(_0x3d813f){return console[_0x5e570f(0xe2)](_0x5e570f(0xee)+_0x3d813f[_0x5e570f(0xef)]),0x1;}else return console[_0x5e570f(0xe2)](_0x5e570f(0xe4)),console['error']('\x20\x20tdx\x20tables\x20users\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20->\x20table\x20\x22users\x22\x20across\x20all\x20databases'),console[_0x5e570f(0xe2)]('\x20\x20tdx\x20tables\x20\x22mydb.*\x22\x20\x20\x20\x20\x20\x20\x20\x20->\x20all\x20tables\x20from\x20mydb'),console[_0x5e570f(0xe2)](_0x5e570f(0x101)),console[_0x5e570f(0xe2)](_0x5e570f(0xdf)),console['error'](_0x5e570f(0xf6)),console[_0x5e570f(0xe2)]('\x20\x20tdx\x20tables\x20--in\x20mydb\x20\x20\x20\x20\x20\x20\x20->\x20all\x20tables\x20from\x20mydb'),0x1;}const _0x5bf132=_0x29fe96[_0x5e570f(0xe5)];!_0x341bdf[_0x5e570f(0xe5)]&&_0x5bf132&&(_0x341bdf[_0x5e570f(0xe5)]=_0x5bf132);try{const _0x38f785=_0x2325a3=>_0x2325a3&&(_0x2325a3[_0x5e570f(0xf9)]('*')||_0x2325a3['includes']('?')),_0x293072=_0x38f785(_0x341bdf[_0x5e570f(0xe5)]);_0x29fe96[_0x5e570f(0xfa)]&&(console[_0x5e570f(0xe2)](_0x5e570f(0xdd)+_0x29fe96[_0x5e570f(0xda)]),_0x341bdf[_0x5e570f(0xe5)]?_0x293072?console[_0x5e570f(0xe2)](_0x5e570f(0xf0)+_0x341bdf[_0x5e570f(0xe5)]):console[_0x5e570f(0xe2)](_0x5e570f(0xe6)+_0x341bdf['database']):console[_0x5e570f(0xe2)](_0x5e570f(0xec)),_0x341bdf[_0x5e570f(0xff)]&&console[_0x5e570f(0xe2)]('Table\x20pattern:\x20'+_0x341bdf[_0x5e570f(0xff)]));const _0x42bc5e=_0x341bdf['database']&&!_0x293072?_0x341bdf['database']:undefined,_0x48bab5=_0x293072?_0x341bdf['database']:undefined,_0x23fa9a=_0x341bdf['table'],_0x31a796=resolveLimit(_0x29fe96['limit'],DEFAULT_LISTING_LIMIT),_0x2bc730=await withSpinner(_0x5e570f(0x102),()=>_0x2a3aae['query'][_0x5e570f(0xdb)](_0x42bc5e,_0x23fa9a,_0x48bab5,_0x31a796),{'verbose':_0x29fe96[_0x5e570f(0xfa)]}),_0x384579=_0x2bc730[_0x5e570f(0x103)];if(_0x384579[_0x5e570f(0xe0)]===0x0&&_0x341bdf['database']&&!_0x293072)return console[_0x5e570f(0xe2)]('✖\x20No\x20tables\x20found'),console[_0x5e570f(0xe2)](_0x5e570f(0xf3)+_0x341bdf[_0x5e570f(0xe5)]+_0x5e570f(0xe1)),0x1;return console[_0x5e570f(0xe2)](_0x5e570f(0x104)+_0x384579[_0x5e570f(0xe0)]+_0x5e570f(0xde)+(_0x384579[_0x5e570f(0xe0)]!==0x1?'s':'')),await handleSDKOutput(_0x384579,{..._0x29fe96,'limit':_0x31a796}),0x0;}catch(_0xa5e430){if(_0xa5e430 instanceof SDKError)return console[_0x5e570f(0xe2)](_0x5e570f(0xee)+_0xa5e430[_0x5e570f(0xef)]),_0xa5e430['cause']&&console[_0x5e570f(0xe2)](_0x5e570f(0xe3)+_0xa5e430[_0x5e570f(0xe7)]),0x1;throw _0xa5e430;}}[a38_0x217dd1(0xe8)](_0x5d2ba9){return undefined;}}
1
+ const a38_0x2beaca=a38_0x262e;(function(_0x4457f6,_0x335547){const _0x12e0aa=a38_0x262e,_0x594db6=_0x4457f6();while(!![]){try{const _0x555e9a=parseInt(_0x12e0aa(0xbb))/0x1*(-parseInt(_0x12e0aa(0xad))/0x2)+parseInt(_0x12e0aa(0xa3))/0x3*(-parseInt(_0x12e0aa(0xb9))/0x4)+parseInt(_0x12e0aa(0xa7))/0x5+-parseInt(_0x12e0aa(0xb2))/0x6+parseInt(_0x12e0aa(0xb7))/0x7+parseInt(_0x12e0aa(0xac))/0x8+parseInt(_0x12e0aa(0xc7))/0x9;if(_0x555e9a===_0x335547)break;else _0x594db6['push'](_0x594db6['shift']());}catch(_0x4637cb){_0x594db6['push'](_0x594db6['shift']());}}}(a38_0x4e39,0xcadee));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleSDKOutput}from'../core/command-output.js';import{parseTableReference}from'../utils/table-ref-parser.js';function a38_0x262e(_0x5e4de8,_0x3fffc0){_0x5e4de8=_0x5e4de8-0x9d;const _0x4e39ab=a38_0x4e39();let _0x262e55=_0x4e39ab[_0x5e4de8];return _0x262e55;}import{DEFAULT_LISTING_LIMIT,resolveLimit}from'../core/constants.js';function a38_0x4e39(){const _0x581581=['238gBzRlk','\x20\x20Or:\x20\x20tdx\x20tables\x20--database\x20','error','\x20\x20tdx\x20tables\x20users\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20->\x20table\x20\x22users\x22\x20across\x20all\x20databases','List\x20tables\x20in\x20a\x20database','5647722wpPPSd','limit','Or\x20use\x20--in\x20flag:','verbose','\x20table','11578oErfcZ','\x20\x20tdx\x20tables\x20--in\x20mydb\x20\x20\x20\x20\x20\x20\x20->\x20all\x20tables\x20from\x20mydb','14572FXISru','length','7987SZphTU','Database\x20\x27','Database:\x20all','validate','✔\x20Found\x20','database','tables','\x20\x20Use:\x20tdx\x20tables\x20\x22','\x27\x20across\x20all\x20databases.','Error:\x20','Error:\x20Too\x20many\x20arguments.\x20Use\x20single\x20argument:','\x20\x20tdx\x20tables\x20\x22mydb.users\x22\x20\x20\x20\x20->\x20table\x20\x22users\x22\x20in\x20database\x20mydb','25485084XIwqUN','Database:\x20','\x20\x20Cause:\x20','Note:\x20\x27','name','message','Listing\x20tables...','cause','execute','includes','1047jutLVT','Error:\x20Pattern\x20\x27','table','\x20\x20Or:\x20\x20tdx\x20tables\x20--in\x20','2386230yCZMqR','\x27\x20may\x20not\x20exist\x20or\x20contains\x20no\x20tables','✖\x20No\x20tables\x20found','\x20\x20tdx\x20tables\x20\x22*.user*\x22\x20\x20\x20\x20\x20\x20\x20->\x20tables\x20matching\x20user*\x20across\x20databases','\x20\x20tdx\x20tables\x20\x22mydb.*\x22\x20\x20\x20\x20\x20\x20\x20\x20->\x20all\x20tables\x20from\x20mydb','5468232olTcQS'];a38_0x4e39=function(){return _0x581581;};return a38_0x4e39();}import{withSpinner}from'../utils/spinner.js';export class TablesCommand extends BaseCommand{[a38_0x2beaca(0x9d)]=a38_0x2beaca(0xc1);['description']=a38_0x2beaca(0xb1);async[a38_0x2beaca(0xa1)](_0x9f2185){const _0x1381f3=a38_0x2beaca,{options:_0x2b4bee,args:_0x44dc0e,tdx:_0x5c0055}=_0x9f2185;let _0x2ace9a;if(_0x44dc0e[_0x1381f3(0xba)]===0x0)_0x2ace9a={'database':undefined,'table':undefined,'original':''};else{if(_0x44dc0e[_0x1381f3(0xba)]===0x1)try{_0x2ace9a=parseTableReference(_0x44dc0e[0x0]);if(_0x2ace9a[_0x1381f3(0xa5)]&&!_0x2ace9a[_0x1381f3(0xc0)]&&!_0x2ace9a[_0x1381f3(0xa5)][_0x1381f3(0xa2)]('*')&&!_0x2ace9a[_0x1381f3(0xa5)]['includes']('?'))return console[_0x1381f3(0xaf)](_0x1381f3(0xa4)+_0x44dc0e[0x0]+'\x27\x20is\x20ambiguous.'),console[_0x1381f3(0xaf)]('Did\x20you\x20mean\x20to\x20list\x20all\x20tables\x20from\x20database\x20\x27'+_0x2ace9a[_0x1381f3(0xa5)]+'\x27?'),console[_0x1381f3(0xaf)](_0x1381f3(0xc2)+_0x2ace9a[_0x1381f3(0xa5)]+'.*\x22'),console[_0x1381f3(0xaf)](_0x1381f3(0xa6)+_0x2ace9a[_0x1381f3(0xa5)]),console[_0x1381f3(0xaf)](_0x1381f3(0xae)+_0x2ace9a['table']),console[_0x1381f3(0xaf)](''),console[_0x1381f3(0xaf)](_0x1381f3(0xca)+_0x44dc0e[0x0]+'\x27\x20without\x20wildcards\x20would\x20search\x20for\x20tables\x20named\x20\x27'+_0x2ace9a[_0x1381f3(0xa5)]+_0x1381f3(0xc3)),0x1;}catch(_0x5b6d06){return console[_0x1381f3(0xaf)](_0x1381f3(0xc4)+_0x5b6d06[_0x1381f3(0x9e)]),0x1;}else return console['error'](_0x1381f3(0xc5)),console[_0x1381f3(0xaf)](_0x1381f3(0xb0)),console[_0x1381f3(0xaf)](_0x1381f3(0xab)),console[_0x1381f3(0xaf)](_0x1381f3(0xc6)),console[_0x1381f3(0xaf)](_0x1381f3(0xaa)),console[_0x1381f3(0xaf)](_0x1381f3(0xb4)),console['error'](_0x1381f3(0xb8)),0x1;}const _0xaff621=_0x2b4bee[_0x1381f3(0xc0)];!_0x2ace9a[_0x1381f3(0xc0)]&&_0xaff621&&(_0x2ace9a[_0x1381f3(0xc0)]=_0xaff621);try{const _0x71e262=_0x409b01=>_0x409b01&&(_0x409b01[_0x1381f3(0xa2)]('*')||_0x409b01[_0x1381f3(0xa2)]('?')),_0x5d8122=_0x71e262(_0x2ace9a['database']);_0x2b4bee[_0x1381f3(0xb5)]&&(console[_0x1381f3(0xaf)]('Site:\x20'+_0x2b4bee['site']),_0x2ace9a['database']?_0x5d8122?console[_0x1381f3(0xaf)]('Database\x20pattern:\x20'+_0x2ace9a[_0x1381f3(0xc0)]):console[_0x1381f3(0xaf)](_0x1381f3(0xc8)+_0x2ace9a[_0x1381f3(0xc0)]):console['error'](_0x1381f3(0xbd)),_0x2ace9a[_0x1381f3(0xa5)]&&console['error']('Table\x20pattern:\x20'+_0x2ace9a[_0x1381f3(0xa5)]));const _0x31a277=_0x2ace9a['database']&&!_0x5d8122?_0x2ace9a['database']:undefined,_0x4d68df=_0x5d8122?_0x2ace9a[_0x1381f3(0xc0)]:undefined,_0x2f1049=_0x2ace9a[_0x1381f3(0xa5)],_0x112ba3=resolveLimit(_0x2b4bee[_0x1381f3(0xb3)],DEFAULT_LISTING_LIMIT),_0x463c9b=await withSpinner(_0x1381f3(0x9f),()=>_0x5c0055['query']['listTables'](_0x31a277,_0x2f1049,_0x4d68df,_0x112ba3),{'verbose':_0x2b4bee['verbose']}),_0x12b715=_0x463c9b['data'];if(_0x12b715['length']===0x0&&_0x2ace9a[_0x1381f3(0xc0)]&&!_0x5d8122)return console[_0x1381f3(0xaf)](_0x1381f3(0xa9)),console[_0x1381f3(0xaf)](_0x1381f3(0xbc)+_0x2ace9a[_0x1381f3(0xc0)]+_0x1381f3(0xa8)),0x1;return console[_0x1381f3(0xaf)](_0x1381f3(0xbf)+_0x12b715[_0x1381f3(0xba)]+_0x1381f3(0xb6)+(_0x12b715[_0x1381f3(0xba)]!==0x1?'s':'')),await handleSDKOutput(_0x12b715,{..._0x2b4bee,'limit':_0x112ba3}),0x0;}catch(_0x40a017){if(_0x40a017 instanceof SDKError)return console[_0x1381f3(0xaf)](_0x1381f3(0xc4)+_0x40a017[_0x1381f3(0x9e)]),_0x40a017[_0x1381f3(0xa0)]&&console[_0x1381f3(0xaf)](_0x1381f3(0xc9)+_0x40a017[_0x1381f3(0xa0)]),0x1;throw _0x40a017;}}[a38_0x2beaca(0xbe)](_0x29f90c){return undefined;}}
@@ -1 +1 @@
1
- function a39_0x5087(_0x1ca482,_0x81e446){_0x1ca482=_0x1ca482-0x87;const _0x2af100=a39_0x2af1();let _0x5087aa=_0x2af100[_0x1ca482];return _0x5087aa;}const a39_0x33b171=a39_0x5087;(function(_0x7647f3,_0x552270){const _0x6a30f7=a39_0x5087,_0x67a0b3=_0x7647f3();while(!![]){try{const _0x4c6011=-parseInt(_0x6a30f7(0xa3))/0x1+-parseInt(_0x6a30f7(0xa5))/0x2+-parseInt(_0x6a30f7(0x93))/0x3*(parseInt(_0x6a30f7(0x9a))/0x4)+parseInt(_0x6a30f7(0x94))/0x5+-parseInt(_0x6a30f7(0x89))/0x6*(parseInt(_0x6a30f7(0x9c))/0x7)+-parseInt(_0x6a30f7(0x8a))/0x8+parseInt(_0x6a30f7(0xaa))/0x9;if(_0x4c6011===_0x552270)break;else _0x67a0b3['push'](_0x67a0b3['shift']());}catch(_0x1ee716){_0x67a0b3['push'](_0x67a0b3['shift']());}}}(a39_0x2af1,0x3be91));import{BaseCommand}from'./command.js';import{getSessionID,cleanExpiredSessions,clearSessionContextField}from'../core/session.js';import{clearDefaultSiteFromUserConfig,clearActiveProfileFromUserConfig}from'../core/profile.js';import{getConfigDir}from'../core/config.js';import a39_0x4f56c0 from'chalk';import*as a39_0xf5a304 from'node:path';export class UnsetCommand extends BaseCommand{['name']=a39_0x33b171(0xa8);['description']='Clear\x20session-level\x20or\x20default\x20context\x20values';[a39_0x33b171(0xa7)](_0x115f27){const _0x53b6fc=a39_0x33b171,{args:_0x2423b8,options:_0x4d5502}=_0x115f27,_0x205cc1=_0x4d5502[_0x53b6fc(0x9d)];if(_0x2423b8['length']===0x0)return _0x53b6fc(0xa1)+_0x53b6fc(0x8c)+_0x53b6fc(0x8d)+'\x0aRun\x20\x27tdx\x20unset\x20--help\x27\x20for\x20more\x20options';const _0xe8f8ea=_0x2423b8[0x0],_0x2bb889=['site',_0x53b6fc(0xa2),'parent_segment','llm_project','agent','profile',_0x53b6fc(0x95)];if(!_0x2bb889[_0x53b6fc(0xa4)](_0xe8f8ea))return _0x53b6fc(0x99)+_0xe8f8ea+_0x53b6fc(0xa6)+_0x2bb889['join'](',\x20');if(_0x205cc1&&_0xe8f8ea!==_0x53b6fc(0x8b)&&_0xe8f8ea!==_0x53b6fc(0x97))return _0x53b6fc(0x88);return undefined;}async['execute'](_0xbd0093){const _0x36bc22=a39_0x33b171,{args:_0x28820b,options:_0x7d0dc}=_0xbd0093,_0x410d0a=_0x7d0dc[_0x36bc22(0x9d)];cleanExpiredSessions();try{const _0x5183f9=_0x28820b[0x0],_0x41ebcb=a39_0xf5a304[_0x36bc22(0xa9)](getConfigDir(),_0x36bc22(0x87));if(_0x410d0a){if(_0x5183f9===_0x36bc22(0x8b))return clearDefaultSiteFromUserConfig(),console[_0x36bc22(0x9f)]('Default\x20site\x20'+a39_0x4f56c0[_0x36bc22(0x98)](_0x36bc22(0x90))),console[_0x36bc22(0x9f)](a39_0x4f56c0[_0x36bc22(0xab)](_0x36bc22(0x8e)+_0x41ebcb)),0x0;if(_0x5183f9===_0x36bc22(0x97))return clearActiveProfileFromUserConfig(),console[_0x36bc22(0x9f)](_0x36bc22(0x8f)+a39_0x4f56c0[_0x36bc22(0x98)](_0x36bc22(0x90))),console[_0x36bc22(0x9f)](a39_0x4f56c0[_0x36bc22(0xab)]('\x0aUpdated:\x20'+_0x41ebcb)),0x0;}const _0x2743f5=getSessionID(_0x7d0dc[_0x36bc22(0xa0)]),_0x2e6fd5={'site':_0x36bc22(0x8b),'database':_0x36bc22(0xa2),'parent_segment':_0x36bc22(0x96),'llm_project':'llm_project','agent':_0x36bc22(0x92),'profile':_0x36bc22(0x97),'engage_workspace':'engage_workspace'},_0x4ceba9=_0x2e6fd5[_0x5183f9];return _0x4ceba9&&(clearSessionContextField(_0x4ceba9,_0x7d0dc[_0x36bc22(0xa0)]),console[_0x36bc22(0x9f)](_0x36bc22(0x9b)+_0x5183f9+'\x20'+a39_0x4f56c0[_0x36bc22(0x98)]('cleared')+'\x20'+a39_0x4f56c0[_0x36bc22(0xab)]('(session:\x20'+_0x2743f5+')'))),0x0;}catch(_0x5e04b1){return _0x5e04b1 instanceof Error&&console[_0x36bc22(0x9e)]('Error:\x20'+_0x5e04b1[_0x36bc22(0x91)]),0x1;}}}function a39_0x2af1(){const _0x1e2f73=['validate','unset','join','14624388IYIJkz','dim','tdx.json','--default\x20can\x20only\x20be\x20used\x20with\x20\x27site\x27\x20or\x20\x27profile\x27.\x20Other\x20resources\x20are\x20session-level\x20only.','270hzqvck','1034000uOfwwP','site','\x20\x20\x20\x20\x20\x20\x20tdx\x20unset\x20--default\x20<resource>\x20\x20#\x20Clear\x20default\x20from\x20config\x0a','\x0aResources:\x20site,\x20database,\x20parent_segment,\x20llm_project,\x20agent,\x20profile,\x20engage_workspace\x0a','\x0aUpdated:\x20','Default\x20profile\x20','cleared','message','llm_agent','3mHjfvv','682210TcADUy','engage_workspace','parent_segment','profile','green','Invalid\x20resource:\x20','412156UtUyrj','Session\x20','52801lRzWQL','default','error','log','session','Usage:\x20tdx\x20unset\x20<resource>\x0a','database','453653YxhgbA','includes','981208CeReCZ','.\x20Must\x20be\x20one\x20of:\x20'];a39_0x2af1=function(){return _0x1e2f73;};return a39_0x2af1();}
1
+ const a39_0x5f2113=a39_0x515e;(function(_0x1811f6,_0x3dbd1d){const _0x4efc25=a39_0x515e,_0xcadec9=_0x1811f6();while(!![]){try{const _0x31dd2d=parseInt(_0x4efc25(0x1f1))/0x1+-parseInt(_0x4efc25(0x1f8))/0x2+parseInt(_0x4efc25(0x20b))/0x3+-parseInt(_0x4efc25(0x1fb))/0x4+parseInt(_0x4efc25(0x1f3))/0x5+-parseInt(_0x4efc25(0x20c))/0x6*(-parseInt(_0x4efc25(0x20d))/0x7)+-parseInt(_0x4efc25(0x203))/0x8*(parseInt(_0x4efc25(0x206))/0x9);if(_0x31dd2d===_0x3dbd1d)break;else _0xcadec9['push'](_0xcadec9['shift']());}catch(_0x2b9c27){_0xcadec9['push'](_0xcadec9['shift']());}}}(a39_0x198e,0x2d17c));function a39_0x198e(){const _0x2f9195=['log','unset','description','181737mfJVCI','Default\x20site\x20','1338030RWNRTN','(session:\x20','default','Session\x20','profile','77984EGPXBB','Clear\x20session-level\x20or\x20default\x20context\x20values','Error:\x20','1038516sOciMG','dim','includes','Usage:\x20tdx\x20unset\x20<resource>\x0a','tdx.json','site','--default\x20can\x20only\x20be\x20used\x20with\x20\x27site\x27\x20or\x20\x27profile\x27.\x20Other\x20resources\x20are\x20session-level\x20only.','message','3088pgjNhE','parent_segment','join','3123PflCsY','Default\x20profile\x20','\x20\x20\x20\x20\x20\x20\x20tdx\x20unset\x20--default\x20<resource>\x20\x20#\x20Clear\x20default\x20from\x20config\x0a','session','engage_workspace','126708gOlWAH','156MPqfei','33838tqKBDL','\x0aResources:\x20site,\x20database,\x20parent_segment,\x20llm_project,\x20agent,\x20profile,\x20engage_workspace\x0a','cleared','database','length','validate','\x0aUpdated:\x20','Invalid\x20resource:\x20','green'];a39_0x198e=function(){return _0x2f9195;};return a39_0x198e();}import{BaseCommand}from'./command.js';import{getSessionID,cleanExpiredSessions,clearSessionContextField}from'../core/session.js';import{clearDefaultSiteFromUserConfig,clearActiveProfileFromUserConfig}from'../core/profile.js';function a39_0x515e(_0x4f50e8,_0x53c0b1){_0x4f50e8=_0x4f50e8-0x1ea;const _0x198e5c=a39_0x198e();let _0x515e0e=_0x198e5c[_0x4f50e8];return _0x515e0e;}import{getConfigDir}from'../core/config.js';import a39_0x244505 from'chalk';import*as a39_0x175987 from'node:path';export class UnsetCommand extends BaseCommand{['name']=a39_0x5f2113(0x1ef);[a39_0x5f2113(0x1f0)]=a39_0x5f2113(0x1f9);[a39_0x5f2113(0x1ea)](_0xf4c342){const _0x2f764f=a39_0x5f2113,{args:_0x34c78c,options:_0x2d219f}=_0xf4c342,_0x116757=_0x2d219f[_0x2f764f(0x1f5)];if(_0x34c78c[_0x2f764f(0x211)]===0x0)return _0x2f764f(0x1fe)+_0x2f764f(0x208)+_0x2f764f(0x20e)+'\x0aRun\x20\x27tdx\x20unset\x20--help\x27\x20for\x20more\x20options';const _0xcf2fa1=_0x34c78c[0x0],_0x14ab03=[_0x2f764f(0x200),_0x2f764f(0x210),_0x2f764f(0x204),'llm_project','agent',_0x2f764f(0x1f7),_0x2f764f(0x20a)];if(!_0x14ab03[_0x2f764f(0x1fd)](_0xcf2fa1))return _0x2f764f(0x1ec)+_0xcf2fa1+'.\x20Must\x20be\x20one\x20of:\x20'+_0x14ab03[_0x2f764f(0x205)](',\x20');if(_0x116757&&_0xcf2fa1!==_0x2f764f(0x200)&&_0xcf2fa1!=='profile')return _0x2f764f(0x201);return undefined;}async['execute'](_0x269245){const _0x423d66=a39_0x5f2113,{args:_0x5a7ba9,options:_0x5c3b8f}=_0x269245,_0x318e6a=_0x5c3b8f[_0x423d66(0x1f5)];cleanExpiredSessions();try{const _0x25b552=_0x5a7ba9[0x0],_0x312cd3=a39_0x175987[_0x423d66(0x205)](getConfigDir(),_0x423d66(0x1ff));if(_0x318e6a){if(_0x25b552===_0x423d66(0x200))return clearDefaultSiteFromUserConfig(),console[_0x423d66(0x1ee)](_0x423d66(0x1f2)+a39_0x244505[_0x423d66(0x1ed)](_0x423d66(0x20f))),console['log'](a39_0x244505[_0x423d66(0x1fc)](_0x423d66(0x1eb)+_0x312cd3)),0x0;if(_0x25b552===_0x423d66(0x1f7))return clearActiveProfileFromUserConfig(),console['log'](_0x423d66(0x207)+a39_0x244505[_0x423d66(0x1ed)](_0x423d66(0x20f))),console[_0x423d66(0x1ee)](a39_0x244505[_0x423d66(0x1fc)]('\x0aUpdated:\x20'+_0x312cd3)),0x0;}const _0x5edad0=getSessionID(_0x5c3b8f['session']),_0x5a024a={'site':_0x423d66(0x200),'database':_0x423d66(0x210),'parent_segment':'parent_segment','llm_project':'llm_project','agent':'llm_agent','profile':_0x423d66(0x1f7),'engage_workspace':'engage_workspace'},_0x191c8b=_0x5a024a[_0x25b552];return _0x191c8b&&(clearSessionContextField(_0x191c8b,_0x5c3b8f[_0x423d66(0x209)]),console[_0x423d66(0x1ee)](_0x423d66(0x1f6)+_0x25b552+'\x20'+a39_0x244505[_0x423d66(0x1ed)](_0x423d66(0x20f))+'\x20'+a39_0x244505[_0x423d66(0x1fc)](_0x423d66(0x1f4)+_0x5edad0+')'))),0x0;}catch(_0x1a3aa7){return _0x1a3aa7 instanceof Error&&console['error'](_0x423d66(0x1fa)+_0x1a3aa7[_0x423d66(0x202)]),0x1;}}}
@@ -1 +1 @@
1
- const a40_0x47295b=a40_0x3297;(function(_0x520165,_0x4db6d9){const _0x230e95=a40_0x3297,_0xa26785=_0x520165();while(!![]){try{const _0x10ea0d=-parseInt(_0x230e95(0x213))/0x1+parseInt(_0x230e95(0x220))/0x2+-parseInt(_0x230e95(0x218))/0x3+parseInt(_0x230e95(0x227))/0x4*(parseInt(_0x230e95(0x1fb))/0x5)+parseInt(_0x230e95(0x217))/0x6*(-parseInt(_0x230e95(0x20a))/0x7)+parseInt(_0x230e95(0x206))/0x8+-parseInt(_0x230e95(0x219))/0x9;if(_0x10ea0d===_0x4db6d9)break;else _0xa26785['push'](_0xa26785['shift']());}catch(_0xf2bcfb){_0xa26785['push'](_0xa26785['shift']());}}}(a40_0x3c7d,0x931bb));import{BaseCommand}from'./command.js';import{saveSessionContext,getSessionID,cleanExpiredSessions,clearSessionContext}from'../core/session.js';import{profileExists,saveActiveProfileToUserConfig,saveDefaultSiteToUserConfig}from'../core/profile.js';function a40_0x3297(_0xd004bd,_0xd6b2cd){_0xd004bd=_0xd004bd-0x1ec;const _0x3c7d13=a40_0x3c7d();let _0x3297d2=_0x3c7d13[_0xd004bd];return _0x3297d2;}import{GlobalContext}from'../core/global-context.js';import{parseAgentRef}from'../sdk/agent/agent-ref-parser.js';import{getConfigDir}from'../core/config.js';import a40_0x4fe7a9 from'chalk';import*as a40_0x31fa68 from'node:path';export class UseCommand extends BaseCommand{[a40_0x47295b(0x1ee)]=a40_0x47295b(0x202);[a40_0x47295b(0x21e)]=a40_0x47295b(0x223);[a40_0x47295b(0x200)](_0x47c5c7){const _0xb05851=a40_0x47295b,{args:_0x37affa,options:_0x2ac8d3}=_0x47c5c7,_0x55cb19=_0x2ac8d3['default'];if(_0x37affa[_0xb05851(0x1fc)]===0x0)return undefined;if(_0x37affa[_0xb05851(0x1fc)]===0x1)return _0xb05851(0x1ff)+_0xb05851(0x207)+_0xb05851(0x1f9)+'\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20--default\x20site\x20<value>\x20\x20\x20\x20\x20#\x20Save\x20default\x20site\x20to\x20config\x0a'+_0xb05851(0x209)+_0xb05851(0x20d)+_0xb05851(0x20c);const _0x505ba5=_0x37affa[0x0],_0x3c6165=[_0xb05851(0x22a),_0xb05851(0x1f2),'parent_segment',_0xb05851(0x1f6),_0xb05851(0x22b),'profile','engage_workspace'];if(!_0x3c6165[_0xb05851(0x216)](_0x505ba5))return'Invalid\x20resource:\x20'+_0x505ba5+_0xb05851(0x225)+_0x3c6165[_0xb05851(0x20b)](',\x20');if(_0x55cb19&&_0x505ba5!==_0xb05851(0x22a)&&_0x505ba5!=='profile')return _0xb05851(0x211);return undefined;}async[a40_0x47295b(0x1f0)](_0x38c08f){const _0x5e0c7b=a40_0x47295b,{args:_0x4b87a1,options:_0x477dcf}=_0x38c08f,_0x4be2fe=_0x477dcf[_0x5e0c7b(0x21f)],_0x43e87d=_0x477dcf['clear'],_0x2dc174=_0x477dcf[_0x5e0c7b(0x1f1)];cleanExpiredSessions();try{if(_0x43e87d){clearSessionContext(_0x477dcf[_0x5e0c7b(0x1f8)]);const _0x3d78aa=getSessionID(_0x477dcf['session']);return console[_0x5e0c7b(0x226)]('Session\x20context\x20'+a40_0x4fe7a9[_0x5e0c7b(0x1f4)]('cleared')+'\x20'+a40_0x4fe7a9[_0x5e0c7b(0x208)](_0x5e0c7b(0x1fd)+_0x3d78aa+')')),0x0;}if(_0x4b87a1[_0x5e0c7b(0x1fc)]===0x0){const _0x4c6520=new GlobalContext(_0x477dcf);return _0x4be2fe?_0x4c6520[_0x5e0c7b(0x229)]():_0x4c6520[_0x5e0c7b(0x201)](),console[_0x5e0c7b(0x226)](a40_0x4fe7a9[_0x5e0c7b(0x208)](_0x5e0c7b(0x222))),console[_0x5e0c7b(0x226)](a40_0x4fe7a9[_0x5e0c7b(0x208)](_0x5e0c7b(0x204))),console[_0x5e0c7b(0x226)](a40_0x4fe7a9[_0x5e0c7b(0x208)]('Use\x20--default\x20with\x20site\x20or\x20profile\x20to\x20save\x20permanently')),0x0;}const _0x26d3d9=_0x4b87a1[0x0],_0x5dd296=_0x4b87a1[0x1],_0x4f1f08=a40_0x31fa68[_0x5e0c7b(0x20b)](getConfigDir(),_0x5e0c7b(0x221));if(_0x2dc174){if(_0x26d3d9===_0x5e0c7b(0x22a))return saveDefaultSiteToUserConfig(_0x5dd296),console['log'](_0x5e0c7b(0x224)+a40_0x4fe7a9[_0x5e0c7b(0x1f4)](_0x5dd296)),console[_0x5e0c7b(0x226)](a40_0x4fe7a9[_0x5e0c7b(0x208)](_0x5e0c7b(0x210)+_0x4f1f08)),0x0;if(_0x26d3d9===_0x5e0c7b(0x22c)){if(!profileExists(_0x5dd296))return console[_0x5e0c7b(0x203)](_0x5e0c7b(0x1ed)+_0x5dd296+_0x5e0c7b(0x21a)),console['error'](_0x5e0c7b(0x21b)),0x1;return saveActiveProfileToUserConfig(_0x5dd296),console[_0x5e0c7b(0x226)](_0x5e0c7b(0x1f3)+a40_0x4fe7a9['green'](_0x5dd296)),console['log'](a40_0x4fe7a9[_0x5e0c7b(0x208)](_0x5e0c7b(0x210)+_0x4f1f08)),0x0;}}if(_0x26d3d9==='site'){const _0x33ba25=getSessionID(_0x477dcf['session']);return saveSessionContext({'site':_0x5dd296},_0x477dcf[_0x5e0c7b(0x1f8)]),console[_0x5e0c7b(0x226)](_0x5e0c7b(0x1ec)+a40_0x4fe7a9[_0x5e0c7b(0x1f4)](_0x5dd296)+'\x20'+a40_0x4fe7a9[_0x5e0c7b(0x208)](_0x5e0c7b(0x1fd)+_0x33ba25+')')),console[_0x5e0c7b(0x226)](a40_0x4fe7a9[_0x5e0c7b(0x208)](_0x5e0c7b(0x212)+_0x5dd296+_0x5e0c7b(0x228))),0x0;}if(_0x26d3d9==='profile'){if(!profileExists(_0x5dd296))return console[_0x5e0c7b(0x203)](_0x5e0c7b(0x1ed)+_0x5dd296+'\x27\x20does\x20not\x20exist'),console[_0x5e0c7b(0x203)](_0x5e0c7b(0x21b)),0x1;const _0x388335=getSessionID(_0x477dcf['session']);return saveSessionContext({'profile':_0x5dd296},_0x477dcf[_0x5e0c7b(0x1f8)]),console[_0x5e0c7b(0x226)](_0x5e0c7b(0x1fe)+a40_0x4fe7a9[_0x5e0c7b(0x1f4)](_0x5dd296)+'\x20'+a40_0x4fe7a9['dim']('(session:\x20'+_0x388335+')')),console[_0x5e0c7b(0x226)](a40_0x4fe7a9[_0x5e0c7b(0x208)](_0x5e0c7b(0x1ef)+_0x5dd296+_0x5e0c7b(0x228))),0x0;}const _0x72815f={},_0xdca373=getSessionID(_0x477dcf[_0x5e0c7b(0x1f8)]);switch(_0x26d3d9){case _0x5e0c7b(0x1f2):_0x72815f[_0x5e0c7b(0x1f2)]=_0x5dd296,console[_0x5e0c7b(0x226)](_0x5e0c7b(0x214)+a40_0x4fe7a9[_0x5e0c7b(0x1f4)](_0x5dd296)+'\x20'+a40_0x4fe7a9[_0x5e0c7b(0x208)](_0x5e0c7b(0x1fd)+_0xdca373+')'));break;case _0x5e0c7b(0x205):_0x72815f['parent_segment']=_0x5dd296,console['log'](_0x5e0c7b(0x21d)+a40_0x4fe7a9[_0x5e0c7b(0x1f4)](_0x5dd296)+'\x20'+a40_0x4fe7a9[_0x5e0c7b(0x208)]('(session:\x20'+_0xdca373+')'));break;case _0x5e0c7b(0x1f6):_0x72815f['llm_project']=_0x5dd296,console['log'](_0x5e0c7b(0x1f7)+a40_0x4fe7a9[_0x5e0c7b(0x1f4)](_0x5dd296)+'\x20'+a40_0x4fe7a9[_0x5e0c7b(0x208)](_0x5e0c7b(0x1fd)+_0xdca373+')'));break;case _0x5e0c7b(0x22b):{const {projectName:_0x9619ab,agentName:_0x4d7b1f}=parseAgentRef(_0x5dd296);_0x4d7b1f?(_0x72815f[_0x5e0c7b(0x1f6)]=_0x9619ab,_0x72815f['llm_agent']=_0x4d7b1f,console['log'](_0x5e0c7b(0x1f7)+a40_0x4fe7a9['green'](_0x9619ab)+'\x20'+a40_0x4fe7a9[_0x5e0c7b(0x208)](_0x5e0c7b(0x1fd)+_0xdca373+')')),console[_0x5e0c7b(0x226)]('Session\x20agent\x20set\x20to:\x20'+a40_0x4fe7a9[_0x5e0c7b(0x1f4)](_0x4d7b1f)+'\x20'+a40_0x4fe7a9['dim'](_0x5e0c7b(0x1fd)+_0xdca373+')'))):(_0x72815f['llm_agent']=_0x5dd296,console['log'](_0x5e0c7b(0x1fa)+a40_0x4fe7a9[_0x5e0c7b(0x1f4)](_0x5dd296)+'\x20'+a40_0x4fe7a9[_0x5e0c7b(0x208)](_0x5e0c7b(0x1fd)+_0xdca373+')')));break;}case _0x5e0c7b(0x20f):_0x72815f[_0x5e0c7b(0x20f)]=_0x5dd296,console[_0x5e0c7b(0x226)](_0x5e0c7b(0x20e)+a40_0x4fe7a9[_0x5e0c7b(0x1f4)](_0x5dd296)+'\x20'+a40_0x4fe7a9[_0x5e0c7b(0x208)](_0x5e0c7b(0x1fd)+_0xdca373+')'));break;}return saveSessionContext(_0x72815f,_0x477dcf[_0x5e0c7b(0x1f8)]),console['log'](a40_0x4fe7a9[_0x5e0c7b(0x208)](_0x5e0c7b(0x1f5))),0x0;}catch(_0x5ccbd9){return _0x5ccbd9 instanceof Error&&console['error'](_0x5e0c7b(0x21c)+_0x5ccbd9[_0x5e0c7b(0x215)]),0x1;}}}function a40_0x3c7d(){const _0x560410=['site','agent','profile','Session\x20site\x20set\x20to:\x20','Error:\x20Profile\x20\x27','name','\x0aTip:\x20Use\x20\x27tdx\x20use\x20--default\x20profile\x20','execute','default','database','Default\x20profile\x20set\x20to:\x20','green','\x0aTip:\x20Use\x20\x27tdx\x20use\x20--clear\x27\x20to\x20clear\x20session\x20overrides','llm_project','Session\x20llm_project\x20set\x20to:\x20','session','\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20--clear\x20\x20\x20\x20\x20\x20#\x20Clear\x20session\x20context\x0a','Session\x20agent\x20set\x20to:\x20','75pyqdEE','length','(session:\x20','Session\x20profile\x20set\x20to:\x20','Usage:\x20tdx\x20use\x20<resource>\x20<value>\x0a','validate','display','use','error','Resources:\x20site,\x20database,\x20parent_segment,\x20llm_project,\x20agent,\x20profile,\x20engage_workspace','parent_segment','5799168CeWgvI','\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20current\x20context\x0a','dim','\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20--default\x20profile\x20<value>\x20\x20#\x20Save\x20default\x20profile\x20to\x20config\x0a','183204IhlDOQ','join','\x0aRun\x20\x27tdx\x20use\x20--help\x27\x20for\x20more\x20options','\x0aResources:\x20site,\x20database,\x20parent_segment,\x20llm_project,\x20agent,\x20profile,\x20engage_workspace\x0a','Session\x20engage_workspace\x20set\x20to:\x20','engage_workspace','\x0aSaved\x20to:\x20','--default\x20can\x20only\x20be\x20used\x20with\x20\x27site\x27\x20or\x20\x27profile\x27.\x20Other\x20resources\x20are\x20session-level\x20only.','\x0aTip:\x20Use\x20\x27tdx\x20use\x20--default\x20site\x20','680672zZyYPH','Session\x20database\x20set\x20to:\x20','message','includes','84fsQZfU','567666NYgguk','3352455kHIcQw','\x27\x20does\x20not\x20exist','\x0aUse\x20\x27tdx\x20profiles\x27\x20to\x20see\x20available\x20profiles','Error:\x20','Session\x20parent_segment\x20set\x20to:\x20','description','debug','2307812rjXodc','tdx.json','\x0aSet\x20context:\x20tdx\x20use\x20<resource>\x20<value>','Set\x20session-level\x20context','Default\x20site\x20set\x20to:\x20','.\x20Must\x20be\x20one\x20of:\x20','log','88680TvmGCZ','\x27\x20to\x20save\x20permanently','displayWithSources'];a40_0x3c7d=function(){return _0x560410;};return a40_0x3c7d();}
1
+ const a40_0x1a496c=a40_0x536d;function a40_0x2c38(){const _0x3979de=['\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20--clear\x20\x20\x20\x20\x20\x20#\x20Clear\x20session\x20context\x0a','length','validate','tdx.json','201796joiXjZ','dim','green','session','Session\x20profile\x20set\x20to:\x20','llm_project','includes','default','--default\x20can\x20only\x20be\x20used\x20with\x20\x27site\x27\x20or\x20\x27profile\x27.\x20Other\x20resources\x20are\x20session-level\x20only.','database','message','Session\x20agent\x20set\x20to:\x20','cleared','display','(session:\x20','error','agent','\x0aSet\x20context:\x20tdx\x20use\x20<resource>\x20<value>','\x0aTip:\x20Use\x20\x27tdx\x20use\x20--default\x20site\x20','\x27\x20to\x20save\x20permanently','site','103bfOdzW','\x0aTip:\x20Use\x20\x27tdx\x20use\x20--default\x20profile\x20','Default\x20site\x20set\x20to:\x20','profile','llm_agent','name','6254430pjUUoE','parent_segment','\x0aUse\x20\x27tdx\x20profiles\x27\x20to\x20see\x20available\x20profiles','Invalid\x20resource:\x20','Session\x20parent_segment\x20set\x20to:\x20','.\x20Must\x20be\x20one\x20of:\x20','log','\x0aRun\x20\x27tdx\x20use\x20--help\x27\x20for\x20more\x20options','execute','Session\x20database\x20set\x20to:\x20','\x27\x20does\x20not\x20exist','Error:\x20Profile\x20\x27','join','5589960AvKtxv','debug','49TwOshe','\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20--default\x20profile\x20<value>\x20\x20#\x20Save\x20default\x20profile\x20to\x20config\x0a','40084nZKLXI','Usage:\x20tdx\x20use\x20<resource>\x20<value>\x0a','\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20current\x20context\x0a','27HXigQz','10812Amoras','33ECvJow','2764504MLeXvu','\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20--default\x20site\x20<value>\x20\x20\x20\x20\x20#\x20Save\x20default\x20site\x20to\x20config\x0a','\x0aTip:\x20Use\x20\x27tdx\x20use\x20--clear\x27\x20to\x20clear\x20session\x20overrides','displayWithSources','Session\x20llm_project\x20set\x20to:\x20','Resources:\x20site,\x20database,\x20parent_segment,\x20llm_project,\x20agent,\x20profile,\x20engage_workspace','use','14758vwkade','236676xneRKz','engage_workspace','Default\x20profile\x20set\x20to:\x20','Session\x20context\x20'];a40_0x2c38=function(){return _0x3979de;};return a40_0x2c38();}(function(_0x4cf457,_0x34ed3d){const _0x3a1e7a=a40_0x536d,_0x3654be=_0x4cf457();while(!![]){try{const _0x32478e=-parseInt(_0x3a1e7a(0xff))/0x1*(parseInt(_0x3a1e7a(0xe1))/0x2)+-parseInt(_0x3a1e7a(0xd9))/0x3*(parseInt(_0x3a1e7a(0xea))/0x4)+-parseInt(_0x3a1e7a(0x112))/0x5+parseInt(_0x3a1e7a(0xe2))/0x6*(parseInt(_0x3a1e7a(0xd2))/0x7)+-parseInt(_0x3a1e7a(0xda))/0x8*(parseInt(_0x3a1e7a(0xd7))/0x9)+parseInt(_0x3a1e7a(0x105))/0xa+parseInt(_0x3a1e7a(0xd4))/0xb*(parseInt(_0x3a1e7a(0xd8))/0xc);if(_0x32478e===_0x34ed3d)break;else _0x3654be['push'](_0x3654be['shift']());}catch(_0x5d72c4){_0x3654be['push'](_0x3654be['shift']());}}}(a40_0x2c38,0xae990));import{BaseCommand}from'./command.js';import{saveSessionContext,getSessionID,cleanExpiredSessions,clearSessionContext}from'../core/session.js';import{profileExists,saveActiveProfileToUserConfig,saveDefaultSiteToUserConfig}from'../core/profile.js';import{GlobalContext}from'../core/global-context.js';import{parseAgentRef}from'../sdk/agent/agent-ref-parser.js';import{getConfigDir}from'../core/config.js';import a40_0x6ecd0a from'chalk';import*as a40_0xce11d7 from'node:path';function a40_0x536d(_0x447480,_0x36cd8f){_0x447480=_0x447480-0xd1;const _0x2c38a6=a40_0x2c38();let _0x536d3a=_0x2c38a6[_0x447480];return _0x536d3a;}export class UseCommand extends BaseCommand{[a40_0x1a496c(0x104)]=a40_0x1a496c(0xe0);['description']='Set\x20session-level\x20context';[a40_0x1a496c(0xe8)](_0x546a4f){const _0xb8f69a=a40_0x1a496c,{args:_0x310732,options:_0x1a8fe8}=_0x546a4f,_0x46fa1a=_0x1a8fe8[_0xb8f69a(0xf1)];if(_0x310732[_0xb8f69a(0xe7)]===0x0)return undefined;if(_0x310732[_0xb8f69a(0xe7)]===0x1)return _0xb8f69a(0xd5)+_0xb8f69a(0xd6)+_0xb8f69a(0xe6)+_0xb8f69a(0xdb)+_0xb8f69a(0xd3)+'\x0aResources:\x20site,\x20database,\x20parent_segment,\x20llm_project,\x20agent,\x20profile,\x20engage_workspace\x0a'+_0xb8f69a(0x10c);const _0x31316c=_0x310732[0x0],_0x267fcb=[_0xb8f69a(0xfe),'database',_0xb8f69a(0x106),'llm_project',_0xb8f69a(0xfa),_0xb8f69a(0x102),'engage_workspace'];if(!_0x267fcb[_0xb8f69a(0xf0)](_0x31316c))return _0xb8f69a(0x108)+_0x31316c+_0xb8f69a(0x10a)+_0x267fcb[_0xb8f69a(0x111)](',\x20');if(_0x46fa1a&&_0x31316c!=='site'&&_0x31316c!=='profile')return _0xb8f69a(0xf2);return undefined;}async[a40_0x1a496c(0x10d)](_0x247610){const _0xa9dfc9=a40_0x1a496c,{args:_0x34608c,options:_0xc5ddd1}=_0x247610,_0x49890e=_0xc5ddd1[_0xa9dfc9(0xd1)],_0x4022a0=_0xc5ddd1['clear'],_0x4c4fda=_0xc5ddd1[_0xa9dfc9(0xf1)];cleanExpiredSessions();try{if(_0x4022a0){clearSessionContext(_0xc5ddd1[_0xa9dfc9(0xed)]);const _0x49c9c9=getSessionID(_0xc5ddd1[_0xa9dfc9(0xed)]);return console[_0xa9dfc9(0x10b)](_0xa9dfc9(0xe5)+a40_0x6ecd0a[_0xa9dfc9(0xec)](_0xa9dfc9(0xf6))+'\x20'+a40_0x6ecd0a[_0xa9dfc9(0xeb)]('(session:\x20'+_0x49c9c9+')')),0x0;}if(_0x34608c[_0xa9dfc9(0xe7)]===0x0){const _0x1ec1bb=new GlobalContext(_0xc5ddd1);return _0x49890e?_0x1ec1bb[_0xa9dfc9(0xdd)]():_0x1ec1bb[_0xa9dfc9(0xf7)](),console[_0xa9dfc9(0x10b)](a40_0x6ecd0a['dim'](_0xa9dfc9(0xfb))),console[_0xa9dfc9(0x10b)](a40_0x6ecd0a[_0xa9dfc9(0xeb)](_0xa9dfc9(0xdf))),console['log'](a40_0x6ecd0a['dim']('Use\x20--default\x20with\x20site\x20or\x20profile\x20to\x20save\x20permanently')),0x0;}const _0x354d54=_0x34608c[0x0],_0x12c62a=_0x34608c[0x1],_0x1a0350=a40_0xce11d7[_0xa9dfc9(0x111)](getConfigDir(),_0xa9dfc9(0xe9));if(_0x4c4fda){if(_0x354d54===_0xa9dfc9(0xfe))return saveDefaultSiteToUserConfig(_0x12c62a),console[_0xa9dfc9(0x10b)](_0xa9dfc9(0x101)+a40_0x6ecd0a[_0xa9dfc9(0xec)](_0x12c62a)),console['log'](a40_0x6ecd0a[_0xa9dfc9(0xeb)]('\x0aSaved\x20to:\x20'+_0x1a0350)),0x0;if(_0x354d54===_0xa9dfc9(0x102)){if(!profileExists(_0x12c62a))return console[_0xa9dfc9(0xf9)](_0xa9dfc9(0x110)+_0x12c62a+_0xa9dfc9(0x10f)),console[_0xa9dfc9(0xf9)](_0xa9dfc9(0x107)),0x1;return saveActiveProfileToUserConfig(_0x12c62a),console[_0xa9dfc9(0x10b)](_0xa9dfc9(0xe4)+a40_0x6ecd0a[_0xa9dfc9(0xec)](_0x12c62a)),console[_0xa9dfc9(0x10b)](a40_0x6ecd0a[_0xa9dfc9(0xeb)]('\x0aSaved\x20to:\x20'+_0x1a0350)),0x0;}}if(_0x354d54==='site'){const _0x3f04f1=getSessionID(_0xc5ddd1[_0xa9dfc9(0xed)]);return saveSessionContext({'site':_0x12c62a},_0xc5ddd1[_0xa9dfc9(0xed)]),console[_0xa9dfc9(0x10b)]('Session\x20site\x20set\x20to:\x20'+a40_0x6ecd0a['green'](_0x12c62a)+'\x20'+a40_0x6ecd0a['dim'](_0xa9dfc9(0xf8)+_0x3f04f1+')')),console['log'](a40_0x6ecd0a[_0xa9dfc9(0xeb)](_0xa9dfc9(0xfc)+_0x12c62a+_0xa9dfc9(0xfd))),0x0;}if(_0x354d54===_0xa9dfc9(0x102)){if(!profileExists(_0x12c62a))return console[_0xa9dfc9(0xf9)]('Error:\x20Profile\x20\x27'+_0x12c62a+_0xa9dfc9(0x10f)),console['error'](_0xa9dfc9(0x107)),0x1;const _0x1e9bf9=getSessionID(_0xc5ddd1[_0xa9dfc9(0xed)]);return saveSessionContext({'profile':_0x12c62a},_0xc5ddd1[_0xa9dfc9(0xed)]),console[_0xa9dfc9(0x10b)](_0xa9dfc9(0xee)+a40_0x6ecd0a['green'](_0x12c62a)+'\x20'+a40_0x6ecd0a[_0xa9dfc9(0xeb)](_0xa9dfc9(0xf8)+_0x1e9bf9+')')),console['log'](a40_0x6ecd0a[_0xa9dfc9(0xeb)](_0xa9dfc9(0x100)+_0x12c62a+_0xa9dfc9(0xfd))),0x0;}const _0x1d4c17={},_0x31b9b=getSessionID(_0xc5ddd1[_0xa9dfc9(0xed)]);switch(_0x354d54){case'database':_0x1d4c17[_0xa9dfc9(0xf3)]=_0x12c62a,console[_0xa9dfc9(0x10b)](_0xa9dfc9(0x10e)+a40_0x6ecd0a[_0xa9dfc9(0xec)](_0x12c62a)+'\x20'+a40_0x6ecd0a[_0xa9dfc9(0xeb)](_0xa9dfc9(0xf8)+_0x31b9b+')'));break;case'parent_segment':_0x1d4c17[_0xa9dfc9(0x106)]=_0x12c62a,console['log'](_0xa9dfc9(0x109)+a40_0x6ecd0a[_0xa9dfc9(0xec)](_0x12c62a)+'\x20'+a40_0x6ecd0a[_0xa9dfc9(0xeb)](_0xa9dfc9(0xf8)+_0x31b9b+')'));break;case _0xa9dfc9(0xef):_0x1d4c17[_0xa9dfc9(0xef)]=_0x12c62a,console[_0xa9dfc9(0x10b)](_0xa9dfc9(0xde)+a40_0x6ecd0a[_0xa9dfc9(0xec)](_0x12c62a)+'\x20'+a40_0x6ecd0a[_0xa9dfc9(0xeb)](_0xa9dfc9(0xf8)+_0x31b9b+')'));break;case'agent':{const {projectName:_0x134b52,agentName:_0x2aa80e}=parseAgentRef(_0x12c62a);_0x2aa80e?(_0x1d4c17['llm_project']=_0x134b52,_0x1d4c17[_0xa9dfc9(0x103)]=_0x2aa80e,console[_0xa9dfc9(0x10b)]('Session\x20llm_project\x20set\x20to:\x20'+a40_0x6ecd0a['green'](_0x134b52)+'\x20'+a40_0x6ecd0a['dim'](_0xa9dfc9(0xf8)+_0x31b9b+')')),console[_0xa9dfc9(0x10b)](_0xa9dfc9(0xf5)+a40_0x6ecd0a[_0xa9dfc9(0xec)](_0x2aa80e)+'\x20'+a40_0x6ecd0a[_0xa9dfc9(0xeb)](_0xa9dfc9(0xf8)+_0x31b9b+')'))):(_0x1d4c17[_0xa9dfc9(0x103)]=_0x12c62a,console[_0xa9dfc9(0x10b)]('Session\x20agent\x20set\x20to:\x20'+a40_0x6ecd0a[_0xa9dfc9(0xec)](_0x12c62a)+'\x20'+a40_0x6ecd0a['dim']('(session:\x20'+_0x31b9b+')')));break;}case _0xa9dfc9(0xe3):_0x1d4c17['engage_workspace']=_0x12c62a,console[_0xa9dfc9(0x10b)]('Session\x20engage_workspace\x20set\x20to:\x20'+a40_0x6ecd0a[_0xa9dfc9(0xec)](_0x12c62a)+'\x20'+a40_0x6ecd0a[_0xa9dfc9(0xeb)](_0xa9dfc9(0xf8)+_0x31b9b+')'));break;}return saveSessionContext(_0x1d4c17,_0xc5ddd1['session']),console[_0xa9dfc9(0x10b)](a40_0x6ecd0a[_0xa9dfc9(0xeb)](_0xa9dfc9(0xdc))),0x0;}catch(_0x5800c1){return _0x5800c1 instanceof Error&&console['error']('Error:\x20'+_0x5800c1[_0xa9dfc9(0xf4)]),0x1;}}}
@@ -1 +1 @@
1
- const a41_0x313422=a41_0x22e0;(function(_0xe3fbd1,_0x239054){const _0x28766a=a41_0x22e0,_0x476baf=_0xe3fbd1();while(!![]){try{const _0x4d0ca3=parseInt(_0x28766a(0x19c))/0x1+-parseInt(_0x28766a(0x197))/0x2*(-parseInt(_0x28766a(0x196))/0x3)+parseInt(_0x28766a(0x1a9))/0x4*(parseInt(_0x28766a(0x19a))/0x5)+parseInt(_0x28766a(0x1ad))/0x6+parseInt(_0x28766a(0x1aa))/0x7*(parseInt(_0x28766a(0x1ae))/0x8)+parseInt(_0x28766a(0x1a4))/0x9+-parseInt(_0x28766a(0x1ab))/0xa;if(_0x4d0ca3===_0x239054)break;else _0x476baf['push'](_0x476baf['shift']());}catch(_0x1267e3){_0x476baf['push'](_0x476baf['shift']());}}}(a41_0x1e1d,0x574d1));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';function a41_0x22e0(_0x5dd0ce,_0x4a19fe){_0x5dd0ce=_0x5dd0ce-0x196;const _0x1e1dc3=a41_0x1e1d();let _0x22e054=_0x1e1dc3[_0x5dd0ce];return _0x22e054;}import{handleSDKOutput,handleSingleObjectOutput}from'../core/command-output.js';import{withSpinner}from'../utils/spinner.js';export class UserCommand extends BaseCommand{[a41_0x313422(0x19f)]=a41_0x313422(0x1a6);[a41_0x313422(0x1a1)]=a41_0x313422(0x19d);async[a41_0x313422(0x19e)](_0x5f471b){const _0x20b65c=a41_0x313422,{options:_0x1f1c7e,tdx:_0x415bb0}=_0x5f471b;try{const _0x146630=await withSpinner('Fetching\x20user\x20info...',()=>_0x415bb0[_0x20b65c(0x1a6)]['getCurrent'](),{'verbose':_0x1f1c7e[_0x20b65c(0x1af)]}),_0x37cc00=_0x146630[_0x20b65c(0x1a0)];return await handleSingleObjectOutput(_0x37cc00,_0x1f1c7e),0x0;}catch(_0x3a739b){if(_0x3a739b instanceof SDKError)return console[_0x20b65c(0x1a7)](_0x20b65c(0x1b0)+_0x3a739b[_0x20b65c(0x198)]),_0x3a739b[_0x20b65c(0x1b2)]&&console[_0x20b65c(0x1a7)]('\x20\x20Cause:\x20'+_0x3a739b['cause']),0x1;throw _0x3a739b;}}}function a41_0x1e1d(){const _0x5c8ade=['\x20user','3600504cInLyr','list','user','error','List\x20all\x20users\x20in\x20the\x20account','8eGYGFu','39683uKktAP','18639270jHyfEV','✔\x20Found\x20','3070866kZZoRw','536EFKFpA','verbose','Error:\x20','user\x20list','cause','3153PNaPmz','6AzrCVV','message','Listing\x20users...','1030270AhrsGG','\x20\x20Cause:\x20','514561yyfnlB','Show\x20current\x20user\x20information','execute','name','data','description','length'];a41_0x1e1d=function(){return _0x5c8ade;};return a41_0x1e1d();}export class UserListCommand extends BaseCommand{[a41_0x313422(0x19f)]=a41_0x313422(0x1b1);[a41_0x313422(0x1a1)]=a41_0x313422(0x1a8);async[a41_0x313422(0x19e)](_0x4fc546){const _0x36a3eb=a41_0x313422,{options:_0x4ee714,tdx:_0x21eff3}=_0x4fc546;try{const _0x431ec8=await withSpinner(_0x36a3eb(0x199),()=>_0x21eff3[_0x36a3eb(0x1a6)][_0x36a3eb(0x1a5)](),{'verbose':_0x4ee714[_0x36a3eb(0x1af)]}),_0x56ffd8=_0x431ec8[_0x36a3eb(0x1a0)];return console[_0x36a3eb(0x1a7)](_0x36a3eb(0x1ac)+_0x56ffd8['length']+_0x36a3eb(0x1a3)+(_0x56ffd8[_0x36a3eb(0x1a2)]!==0x1?'s':'')),await handleSDKOutput(_0x56ffd8,_0x4ee714),0x0;}catch(_0x53767b){if(_0x53767b instanceof SDKError)return console['error'](_0x36a3eb(0x1b0)+_0x53767b[_0x36a3eb(0x198)]),_0x53767b[_0x36a3eb(0x1b2)]&&console[_0x36a3eb(0x1a7)](_0x36a3eb(0x19b)+_0x53767b[_0x36a3eb(0x1b2)]),0x1;throw _0x53767b;}}}
1
+ const a41_0x38bb76=a41_0x1a23;(function(_0x154e02,_0x5cb651){const _0x12594b=a41_0x1a23,_0x3c46d5=_0x154e02();while(!![]){try{const _0x3eaa6b=parseInt(_0x12594b(0x10b))/0x1+parseInt(_0x12594b(0x115))/0x2+-parseInt(_0x12594b(0x107))/0x3+-parseInt(_0x12594b(0x102))/0x4+parseInt(_0x12594b(0x111))/0x5*(parseInt(_0x12594b(0x112))/0x6)+-parseInt(_0x12594b(0x117))/0x7*(-parseInt(_0x12594b(0x11b))/0x8)+-parseInt(_0x12594b(0x10e))/0x9*(parseInt(_0x12594b(0x114))/0xa);if(_0x3eaa6b===_0x5cb651)break;else _0x3c46d5['push'](_0x3c46d5['shift']());}catch(_0x344124){_0x3c46d5['push'](_0x3c46d5['shift']());}}}(a41_0x2774,0x53c83));function a41_0x1a23(_0xc34e84,_0x22633b){_0xc34e84=_0xc34e84-0x101;const _0x2774b4=a41_0x2774();let _0x1a2346=_0x2774b4[_0xc34e84];return _0x1a2346;}import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleSDKOutput,handleSingleObjectOutput}from'../core/command-output.js';function a41_0x2774(){const _0x1ed620=['data','8KRxFhT','\x20\x20Cause:\x20','getCurrent','1008344TVtytF','user','execute','Fetching\x20user\x20info...','✔\x20Found\x20','1730487eosmYn','Error:\x20','user\x20list','length','380777GuLCTb','cause','name','4332897AtkkGP','message','verbose','23400QDOoRN','354kJBBdV','description','10otsylk','816648znegGZ','error','4118086VKVboH','list','Listing\x20users...'];a41_0x2774=function(){return _0x1ed620;};return a41_0x2774();}import{withSpinner}from'../utils/spinner.js';export class UserCommand extends BaseCommand{[a41_0x38bb76(0x10d)]=a41_0x38bb76(0x103);[a41_0x38bb76(0x113)]='Show\x20current\x20user\x20information';async[a41_0x38bb76(0x104)](_0xd22eeb){const _0x3c403b=a41_0x38bb76,{options:_0x5315da,tdx:_0x4e5bd9}=_0xd22eeb;try{const _0x1fd96b=await withSpinner(_0x3c403b(0x105),()=>_0x4e5bd9[_0x3c403b(0x103)][_0x3c403b(0x101)](),{'verbose':_0x5315da[_0x3c403b(0x110)]}),_0x5c66bb=_0x1fd96b[_0x3c403b(0x11a)];return await handleSingleObjectOutput(_0x5c66bb,_0x5315da),0x0;}catch(_0x263fff){if(_0x263fff instanceof SDKError)return console[_0x3c403b(0x116)](_0x3c403b(0x108)+_0x263fff['message']),_0x263fff[_0x3c403b(0x10c)]&&console[_0x3c403b(0x116)]('\x20\x20Cause:\x20'+_0x263fff[_0x3c403b(0x10c)]),0x1;throw _0x263fff;}}}export class UserListCommand extends BaseCommand{[a41_0x38bb76(0x10d)]=a41_0x38bb76(0x109);[a41_0x38bb76(0x113)]='List\x20all\x20users\x20in\x20the\x20account';async['execute'](_0x4cf9f2){const _0x1176a4=a41_0x38bb76,{options:_0x13cbb3,tdx:_0x2ecd55}=_0x4cf9f2;try{const _0x57e74f=await withSpinner(_0x1176a4(0x119),()=>_0x2ecd55[_0x1176a4(0x103)][_0x1176a4(0x118)](),{'verbose':_0x13cbb3[_0x1176a4(0x110)]}),_0x5c9503=_0x57e74f[_0x1176a4(0x11a)];return console[_0x1176a4(0x116)](_0x1176a4(0x106)+_0x5c9503[_0x1176a4(0x10a)]+'\x20user'+(_0x5c9503['length']!==0x1?'s':'')),await handleSDKOutput(_0x5c9503,_0x13cbb3),0x0;}catch(_0xca27c3){if(_0xca27c3 instanceof SDKError)return console[_0x1176a4(0x116)](_0x1176a4(0x108)+_0xca27c3[_0x1176a4(0x10f)]),_0xca27c3['cause']&&console[_0x1176a4(0x116)](_0x1176a4(0x11c)+_0xca27c3['cause']),0x1;throw _0xca27c3;}}}