@treasuredata/tdx 0.26.1 → 0.26.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (167) 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/personalization.js +1 -1
  99. package/dist/sdk/query/index.js +1 -1
  100. package/dist/sdk/query/sql-parser.js +1 -1
  101. package/dist/sdk/realtime.js +1 -1
  102. package/dist/sdk/schedule.js +1 -1
  103. package/dist/sdk/segment/child-segment-yaml.js +1 -1
  104. package/dist/sdk/segment/fields-display.js +1 -1
  105. package/dist/sdk/segment/file-discovery.js +1 -1
  106. package/dist/sdk/segment/journey-utils.js +1 -1
  107. package/dist/sdk/segment/journey-validator.js +1 -1
  108. package/dist/sdk/segment/journey-yaml.js +1 -1
  109. package/dist/sdk/segment/parent-segment-preview.js +1 -1
  110. package/dist/sdk/segment/parent-segment-yaml.js +1 -1
  111. package/dist/sdk/segment/pull-workflow.js +1 -1
  112. package/dist/sdk/segment/push-recovery.js +1 -1
  113. package/dist/sdk/segment/push-workflow.js +1 -1
  114. package/dist/sdk/segment/resolution-context.js +1 -1
  115. package/dist/sdk/segment/segment-path-parser.js +1 -1
  116. package/dist/sdk/segment/segment-ref-parser.js +1 -1
  117. package/dist/sdk/segment/target-resolution.js +1 -1
  118. package/dist/sdk/segment/tdx-config.js +1 -1
  119. package/dist/sdk/segment/validate-files.js +1 -1
  120. package/dist/sdk/segment/yaml-validator.js +1 -1
  121. package/dist/sdk/segment.js +1 -1
  122. package/dist/sdk/types/index.js +1 -1
  123. package/dist/sdk/types/progress.js +1 -1
  124. package/dist/sdk/user.js +1 -1
  125. package/dist/sdk/util/format-detector.js +1 -1
  126. package/dist/sdk/util/formatters.js +1 -1
  127. package/dist/sdk/util/index.js +1 -1
  128. package/dist/sdk/util/tree-formatter.js +1 -1
  129. package/dist/sdk/workflow/archive-validation.js +1 -1
  130. package/dist/sdk/workflow/clone-workflow.js +1 -1
  131. package/dist/sdk/workflow/index.js +1 -1
  132. package/dist/sdk/workflow/pull-workflow.js +1 -1
  133. package/dist/sdk/workflow/push-workflow.js +1 -1
  134. package/dist/sdk/workflow/tdx-config.js +1 -1
  135. package/dist/sdk/workflow/workflow-utils.js +1 -1
  136. package/dist/test-utils/command-runner.js +1 -1
  137. package/dist/test-utils/factories.js +1 -1
  138. package/dist/test-utils/fixtures.js +1 -1
  139. package/dist/test-utils/http-mock.js +1 -1
  140. package/dist/test-utils/index.js +1 -1
  141. package/dist/utils/async.js +1 -1
  142. package/dist/utils/colors.js +1 -1
  143. package/dist/utils/diff.js +1 -1
  144. package/dist/utils/file-permissions.js +1 -1
  145. package/dist/utils/global-cache.js +1 -1
  146. package/dist/utils/json-loader.js +1 -1
  147. package/dist/utils/local-cache.js +1 -1
  148. package/dist/utils/logger/formatters/default-formatter.js +1 -1
  149. package/dist/utils/logger/formatters/index.js +1 -1
  150. package/dist/utils/logger/handlers/console-handler.js +1 -1
  151. package/dist/utils/logger/handlers/file-handler.js +1 -1
  152. package/dist/utils/logger/handlers/index.js +1 -1
  153. package/dist/utils/logger/handlers/null-handler.js +1 -1
  154. package/dist/utils/logger/index.js +1 -1
  155. package/dist/utils/logger/logger.js +1 -1
  156. package/dist/utils/logger/types.js +1 -1
  157. package/dist/utils/option-validation.js +1 -1
  158. package/dist/utils/port.js +1 -1
  159. package/dist/utils/process.js +1 -1
  160. package/dist/utils/prompt.js +1 -1
  161. package/dist/utils/spinner.js +1 -1
  162. package/dist/utils/sse-parser.js +1 -1
  163. package/dist/utils/string-utils.js +1 -1
  164. package/dist/utils/table-ref-parser.js +1 -1
  165. package/dist/utils/tdx-logger.js +1 -1
  166. package/dist/utils/version-check.js +1 -1
  167. package/package.json +1 -1
@@ -1 +1 @@
1
- function a32_0x1c73(_0x19aeb3,_0x45c5c2){_0x19aeb3=_0x19aeb3-0xb5;const _0xa00922=a32_0xa009();let _0x1c73ee=_0xa00922[_0x19aeb3];return _0x1c73ee;}const a32_0x142111=a32_0x1c73;(function(_0xa73695,_0x52deeb){const _0x43108d=a32_0x1c73,_0x4052cf=_0xa73695();while(!![]){try{const _0xadca4d=parseInt(_0x43108d(0xbf))/0x1*(-parseInt(_0x43108d(0xe0))/0x2)+-parseInt(_0x43108d(0xb7))/0x3*(parseInt(_0x43108d(0xda))/0x4)+-parseInt(_0x43108d(0xbd))/0x5+parseInt(_0x43108d(0xbb))/0x6*(-parseInt(_0x43108d(0xd8))/0x7)+parseInt(_0x43108d(0xcf))/0x8*(parseInt(_0x43108d(0xc3))/0x9)+-parseInt(_0x43108d(0xbe))/0xa+-parseInt(_0x43108d(0xc6))/0xb*(-parseInt(_0x43108d(0xc5))/0xc);if(_0xadca4d===_0x52deeb)break;else _0x4052cf['push'](_0x4052cf['shift']());}catch(_0x4e04e6){_0x4052cf['push'](_0x4052cf['shift']());}}}(a32_0xa009,0x2d64e));import{BaseCommand}from'./command.js';import{handleSDKOutput}from'../core/command-output.js';import{withSpinner}from'../utils/spinner.js';function a32_0xa009(){const _0x5a9796=['2002662JXsHQm','\x27...','117555XDekbO','32330JgXcFs','1BwQGSs','resolveFolderId','segmentName','name','1652481FFVrua','Update\x20existing\x20child\x20segment','224304IkoJHC','352XgXHEd','segment','rule','\x20\x20\x20Path:\x20','data','Segment\x20ID:\x20','segmentPath','Examples:','Resolving\x20folder\x20\x27','16avcptt','resolvePathToResource','Use:\x20tdx\x20segment\x20update\x20<path_to_segment>\x20[options]','description','verbose','✔\x20Updated\x20segment\x20\x27','\x20\x20tdx\x20segment\x20update\x20\x22My\x20Audience/High\x20Value\x22\x20--description\x20\x22...\x22','Resolved\x20folder\x20ID:\x20','Parent\x20ID:\x20','7YmlUkW','kind','475024wQgLyA','Error:\x20Segment\x20path\x20or\x20name\x20is\x20required','updateSegmentById','.\x20Only\x20child\x20segments\x20can\x20be\x20updated.','execute','Updating\x20segment\x20\x27','600302whKZbg','⚠\x20Deprecation\x20warning:\x20`segment\x20update`\x20is\x20deprecated.','\x20\x20Use\x20`tdx\x20sg\x20push`\x20with\x20YAML\x20files\x20instead.\x0a','segmentId','3iQNUpy','error','Usage:\x20tdx\x20segment\x20update\x20<path>\x20[options]','yellow'];a32_0xa009=function(){return _0x5a9796;};return a32_0xa009();}import{loadJSONFromOptions}from'../utils/json-loader.js';import{SDKError,ErrorCode}from'../sdk/index.js';import a32_0x26cef6 from'chalk';export class SegmentUpdateCommand extends BaseCommand{[a32_0x142111(0xc2)]='segment:update';['description']=a32_0x142111(0xc4);async[a32_0x142111(0xde)](_0x4b9220){const _0x489d21=a32_0x142111;console[_0x489d21(0xb8)](a32_0x26cef6[_0x489d21(0xba)](_0x489d21(0xe1))),console[_0x489d21(0xb8)](a32_0x26cef6[_0x489d21(0xba)](_0x489d21(0xb5)));const {options:_0x3bc226,args:_0x33cf87,tdx:_0x24a960}=_0x4b9220,_0x39bd89=_0x3bc226;if(_0x33cf87['length']===0x0)return console[_0x489d21(0xb8)](_0x489d21(0xdb)),console['error'](_0x489d21(0xb9)),console[_0x489d21(0xb8)](_0x489d21(0xcd)),console['error'](_0x489d21(0xd5)),console[_0x489d21(0xb8)]('\x20\x20tdx\x20segment\x20update\x20\x22High\x20Value\x22\x20--rule\x20\x27...\x27\x20\x20#\x20Relative\x20to\x20context'),0x1;const _0x49445b=_0x33cf87[0x0],_0x262dee=_0x3bc226[_0x489d21(0xcc)];let _0x340479=_0x49445b;_0x262dee&&!_0x49445b['includes']('/')&&(_0x340479=_0x262dee+'/'+_0x49445b,_0x39bd89[_0x489d21(0xd3)]&&console['error']('Resolved\x20relative\x20path\x20to:\x20'+_0x340479));const _0x405e55=await withSpinner('Resolving\x20path\x20\x27'+_0x340479+_0x489d21(0xbc),()=>_0x24a960[_0x489d21(0xc7)][_0x489d21(0xd0)](_0x340479),{'verbose':_0x39bd89[_0x489d21(0xd3)]}),_0x473e4c=_0x405e55[_0x489d21(0xca)];_0x39bd89[_0x489d21(0xd3)]&&console['error']('Resolved\x20type:\x20'+_0x473e4c['type']);if(_0x473e4c['type']!==_0x489d21(0xc7))return console[_0x489d21(0xb8)]('Error:\x20Cannot\x20update\x20'+_0x473e4c['type']+_0x489d21(0xdd)),console['error'](_0x489d21(0xd1)),0x1;if(!_0x473e4c[_0x489d21(0xb6)])throw new SDKError(ErrorCode['INTERNAL'],'Segment\x20ID\x20missing\x20from\x20resolved\x20path');const _0x3452c6=_0x473e4c['parentId'],_0x3c48d3=_0x473e4c[_0x489d21(0xb6)];_0x39bd89['verbose']&&(console[_0x489d21(0xb8)](_0x489d21(0xd7)+_0x3452c6),console['error'](_0x489d21(0xcb)+_0x3c48d3));let _0x4e44c1;if(_0x39bd89['folder']){const _0x4b1e48=_0x39bd89['folder'],_0xc1e992=await withSpinner(_0x489d21(0xce)+_0x4b1e48+_0x489d21(0xbc),()=>_0x24a960['segment'][_0x489d21(0xc0)](_0x3452c6,_0x4b1e48),{'verbose':_0x39bd89[_0x489d21(0xd3)]});_0x4e44c1=parseInt(_0xc1e992[_0x489d21(0xca)],0xa),_0x39bd89['verbose']&&console['error'](_0x489d21(0xd6)+_0x4e44c1);}const _0x176958=await loadJSONFromOptions(_0x39bd89[_0x489d21(0xc8)],_0x39bd89['ruleFile']),_0x5bd4c9={'name':_0x39bd89[_0x489d21(0xc2)],'description':_0x39bd89[_0x489d21(0xd2)],'rule':_0x176958,'kind':_0x39bd89['kind']!==undefined?parseInt(_0x39bd89[_0x489d21(0xd9)],0xa):undefined,'segmentFolderId':_0x4e44c1},_0x34ee9c=await withSpinner(_0x489d21(0xdf)+_0x473e4c[_0x489d21(0xc1)]+_0x489d21(0xbc),()=>_0x24a960[_0x489d21(0xc7)][_0x489d21(0xdc)](_0x3452c6,_0x3c48d3,_0x5bd4c9),{'verbose':_0x39bd89[_0x489d21(0xd3)]}),_0x19b36c=_0x34ee9c['data'];return console[_0x489d21(0xb8)](_0x489d21(0xd4)+_0x19b36c[_0x489d21(0xc2)]+'\x27'),_0x340479!==_0x49445b&&console[_0x489d21(0xb8)](_0x489d21(0xc9)+_0x340479),await handleSDKOutput([_0x19b36c],_0x39bd89),0x0;}}
1
+ const a32_0x41c9bd=a32_0x6f2c;(function(_0x1709f8,_0x45e183){const _0x3ade9a=a32_0x6f2c,_0xee9bb1=_0x1709f8();while(!![]){try{const _0x4c0a7c=-parseInt(_0x3ade9a(0x8d))/0x1*(-parseInt(_0x3ade9a(0xb1))/0x2)+-parseInt(_0x3ade9a(0xa0))/0x3+parseInt(_0x3ade9a(0x9d))/0x4+-parseInt(_0x3ade9a(0xa8))/0x5*(parseInt(_0x3ade9a(0xbb))/0x6)+parseInt(_0x3ade9a(0xb8))/0x7+-parseInt(_0x3ade9a(0x9a))/0x8*(-parseInt(_0x3ade9a(0xa7))/0x9)+-parseInt(_0x3ade9a(0xa4))/0xa;if(_0x4c0a7c===_0x45e183)break;else _0xee9bb1['push'](_0xee9bb1['shift']());}catch(_0x30ed13){_0xee9bb1['push'](_0xee9bb1['shift']());}}}(a32_0x2dc6,0x54385));function a32_0x6f2c(_0x1da05e,_0xb34368){_0x1da05e=_0x1da05e-0x8c;const _0x2dc61f=a32_0x2dc6();let _0x6f2cfd=_0x2dc61f[_0x1da05e];return _0x6f2cfd;}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';import{SDKError,ErrorCode}from'../sdk/index.js';import a32_0x57a2e2 from'chalk';export class SegmentUpdateCommand extends BaseCommand{[a32_0x41c9bd(0xa2)]='segment:update';[a32_0x41c9bd(0xa3)]=a32_0x41c9bd(0x99);async[a32_0x41c9bd(0xb9)](_0x4fbda2){const _0xde4827=a32_0x41c9bd;console[_0xde4827(0x8f)](a32_0x57a2e2['yellow'](_0xde4827(0xba))),console[_0xde4827(0x8f)](a32_0x57a2e2[_0xde4827(0x96)](_0xde4827(0xae)));const {options:_0x272fbe,args:_0xbcf544,tdx:_0x4544a5}=_0x4fbda2,_0x5ed37f=_0x272fbe;if(_0xbcf544[_0xde4827(0x97)]===0x0)return console['error']('Error:\x20Segment\x20path\x20or\x20name\x20is\x20required'),console['error'](_0xde4827(0xb0)),console['error'](_0xde4827(0x8c)),console[_0xde4827(0x8f)](_0xde4827(0x93)),console['error'](_0xde4827(0xb2)),0x1;const _0x2ac6a5=_0xbcf544[0x0],_0x313212=_0x272fbe['segmentPath'];let _0x4fde6d=_0x2ac6a5;_0x313212&&!_0x2ac6a5[_0xde4827(0x91)]('/')&&(_0x4fde6d=_0x313212+'/'+_0x2ac6a5,_0x5ed37f[_0xde4827(0x90)]&&console[_0xde4827(0x8f)](_0xde4827(0xb6)+_0x4fde6d));const _0x63324b=await withSpinner(_0xde4827(0x9e)+_0x4fde6d+_0xde4827(0x94),()=>_0x4544a5[_0xde4827(0xb7)][_0xde4827(0x92)](_0x4fde6d),{'verbose':_0x5ed37f['verbose']}),_0x4b2cd9=_0x63324b['data'];_0x5ed37f[_0xde4827(0x90)]&&console[_0xde4827(0x8f)]('Resolved\x20type:\x20'+_0x4b2cd9[_0xde4827(0xb3)]);if(_0x4b2cd9[_0xde4827(0xb3)]!==_0xde4827(0xb7))return console[_0xde4827(0x8f)](_0xde4827(0xbc)+_0x4b2cd9[_0xde4827(0xb3)]+_0xde4827(0xb5)),console[_0xde4827(0x8f)](_0xde4827(0x98)),0x1;if(!_0x4b2cd9[_0xde4827(0x8e)])throw new SDKError(ErrorCode[_0xde4827(0x9c)],'Segment\x20ID\x20missing\x20from\x20resolved\x20path');const _0x249427=_0x4b2cd9[_0xde4827(0xad)],_0x39ca0b=_0x4b2cd9['segmentId'];_0x5ed37f['verbose']&&(console[_0xde4827(0x8f)](_0xde4827(0xab)+_0x249427),console[_0xde4827(0x8f)](_0xde4827(0xaa)+_0x39ca0b));let _0x246356;if(_0x5ed37f[_0xde4827(0xa6)]){const _0x3e40ed=_0x5ed37f[_0xde4827(0xa6)],_0x107449=await withSpinner(_0xde4827(0xac)+_0x3e40ed+_0xde4827(0x94),()=>_0x4544a5[_0xde4827(0xb7)]['resolveFolderId'](_0x249427,_0x3e40ed),{'verbose':_0x5ed37f[_0xde4827(0x90)]});_0x246356=parseInt(_0x107449[_0xde4827(0xaf)],0xa),_0x5ed37f[_0xde4827(0x90)]&&console[_0xde4827(0x8f)](_0xde4827(0x9f)+_0x246356);}const _0x4e6339=await loadJSONFromOptions(_0x5ed37f[_0xde4827(0x9b)],_0x5ed37f[_0xde4827(0xa1)]),_0x896b41={'name':_0x5ed37f[_0xde4827(0xa2)],'description':_0x5ed37f['description'],'rule':_0x4e6339,'kind':_0x5ed37f[_0xde4827(0xa5)]!==undefined?parseInt(_0x5ed37f['kind'],0xa):undefined,'segmentFolderId':_0x246356},_0x2075e3=await withSpinner('Updating\x20segment\x20\x27'+_0x4b2cd9[_0xde4827(0x95)]+_0xde4827(0x94),()=>_0x4544a5[_0xde4827(0xb7)]['updateSegmentById'](_0x249427,_0x39ca0b,_0x896b41),{'verbose':_0x5ed37f[_0xde4827(0x90)]}),_0x290e9f=_0x2075e3[_0xde4827(0xaf)];return console['error'](_0xde4827(0xa9)+_0x290e9f['name']+'\x27'),_0x4fde6d!==_0x2ac6a5&&console[_0xde4827(0x8f)](_0xde4827(0xb4)+_0x4fde6d),await handleSDKOutput([_0x290e9f],_0x5ed37f),0x0;}}function a32_0x2dc6(){const _0x5b3968=['12Puugte','segmentId','error','verbose','includes','resolvePathToResource','\x20\x20tdx\x20segment\x20update\x20\x22My\x20Audience/High\x20Value\x22\x20--description\x20\x22...\x22','\x27...','segmentName','yellow','length','Use:\x20tdx\x20segment\x20update\x20<path_to_segment>\x20[options]','Update\x20existing\x20child\x20segment','8rFNUVl','rule','INTERNAL','1571820DbDRGv','Resolving\x20path\x20\x27','Resolved\x20folder\x20ID:\x20','938559tQmjbc','ruleFile','name','description','1073360liURyh','kind','folder','867087wWLdQS','595ZfqADv','✔\x20Updated\x20segment\x20\x27','Segment\x20ID:\x20','Parent\x20ID:\x20','Resolving\x20folder\x20\x27','parentId','\x20\x20Use\x20`tdx\x20sg\x20push`\x20with\x20YAML\x20files\x20instead.\x0a','data','Usage:\x20tdx\x20segment\x20update\x20<path>\x20[options]','5770LMtSWm','\x20\x20tdx\x20segment\x20update\x20\x22High\x20Value\x22\x20--rule\x20\x27...\x27\x20\x20#\x20Relative\x20to\x20context','type','\x20\x20\x20Path:\x20','.\x20Only\x20child\x20segments\x20can\x20be\x20updated.','Resolved\x20relative\x20path\x20to:\x20','segment','2459177jSLdxz','execute','⚠\x20Deprecation\x20warning:\x20`segment\x20update`\x20is\x20deprecated.','5550uROPVc','Error:\x20Cannot\x20update\x20','Examples:'];a32_0x2dc6=function(){return _0x5b3968;};return a32_0x2dc6();}
@@ -1 +1 @@
1
- const a33_0xebb60e=a33_0x5927;(function(_0x4697b0,_0x22762a){const _0x519da6=a33_0x5927,_0x421f30=_0x4697b0();while(!![]){try{const _0x506b62=parseInt(_0x519da6(0xd7))/0x1+parseInt(_0x519da6(0xd8))/0x2+-parseInt(_0x519da6(0xb3))/0x3*(-parseInt(_0x519da6(0xd0))/0x4)+parseInt(_0x519da6(0xe2))/0x5*(-parseInt(_0x519da6(0xe7))/0x6)+-parseInt(_0x519da6(0xbc))/0x7*(parseInt(_0x519da6(0xc8))/0x8)+-parseInt(_0x519da6(0xe4))/0x9*(-parseInt(_0x519da6(0xec))/0xa)+parseInt(_0x519da6(0xcb))/0xb*(-parseInt(_0x519da6(0xd2))/0xc);if(_0x506b62===_0x22762a)break;else _0x421f30['push'](_0x421f30['shift']());}catch(_0xd641bd){_0x421f30['push'](_0x421f30['shift']());}}}(a33_0x4699,0x32204));import{existsSync,statSync}from'fs';import a33_0x2ec449 from'chalk';import{BaseCommand}from'./command.js';import{saveSessionContext}from'../core/session.js';function a33_0x4699(){const _0x5b308b=['segments','1666045dQRiAY','verbose','2985237KAFAfR','folderPath','\x20\x20tdx\x20segment\x20use\x20/\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Clear\x20context','6BlCEBB','resolvePathToResource','config','Parent\x20ID:\x20','Error:\x20Path\x20is\x20required\x0a','10SlXtXi','45PzRliK','Set\x20current\x20segment/folder\x20context\x20for\x20navigation','\x27...','description','isDirectory','red','segment:use','name','log','518lAwzkE','execute','fullPath','Context\x20can\x20only\x20be\x20set\x20to\x20a\x20parent\x20segment\x20or\x20folder.','Tip:\x20Run\x20`tdx\x20sg\x20pull\x20<parent_name>`\x20first\x20to\x20create\x20the\x20folder\x20structure','✔\x20Context\x20cleared.\x20Back\x20to\x20root.','Error:\x20Cannot\x20set\x20context\x20to\x20a\x20segment.','Usage:\x20tdx\x20segment\x20use\x20<path>','parentId','cyan','Examples:','slice','29288NqEGpj','Use\x20an\x20absolute\x20path\x20or\x20set\x20context\x20with:\x20tdx\x20segment\x20use\x20<parent_name>','isAbsolute','2783daekpb','\x20\x20tdx\x20segment\x20use\x20\x22My\x20Audience/Marketing\x22','dim','site','type','9980vocHLL','folderId','8724yZvGfw','\x20\x20tdx\x20segment\x20use\x20..\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Go\x20to\x20parent','✔\x20Context\x20set\x20to:\x20','parentName','Error:\x20No\x20context\x20set.\x20Cannot\x20use\x20relative\x20path.','272289QljtXk','703926gyNWUo','segmentPath','length','segment','Resolved\x20relative\x20path\x20to:\x20','error','Use:\x20tdx\x20segment\x20use\x20','green','parent_segment'];a33_0x4699=function(){return _0x5b308b;};return a33_0x4699();}function a33_0x5927(_0xb745fa,_0xcfd989){_0xb745fa=_0xb745fa-0xb3;const _0x469998=a33_0x4699();let _0x592779=_0x469998[_0xb745fa];return _0x592779;}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_0xebb60e(0xba)]=a33_0xebb60e(0xb9);[a33_0xebb60e(0xb6)]=a33_0xebb60e(0xb4);async[a33_0xebb60e(0xbd)](_0x49aef5){const _0x3f0331=a33_0xebb60e,{options:_0x32eb7c,args:_0x5c4482,tdx:_0x45351b}=_0x49aef5;if(_0x5c4482[_0x3f0331(0xda)]===0x0)return console[_0x3f0331(0xdd)](a33_0x2ec449['red'](_0x3f0331(0xeb))),console[_0x3f0331(0xdd)](_0x3f0331(0xc3)),console['error'](_0x3f0331(0xc6)),console[_0x3f0331(0xdd)]('\x20\x20tdx\x20segment\x20use\x20\x22My\x20Audience\x22'),console['error'](_0x3f0331(0xcc)),console[_0x3f0331(0xdd)](_0x3f0331(0xe6)),console[_0x3f0331(0xdd)](_0x3f0331(0xd3)),0x1;const _0x37e86b=_0x5c4482[0x0],_0x4d2ca0=_0x32eb7c['session'];try{if(_0x37e86b==='/')return saveSessionContext({'segment_path':undefined},_0x4d2ca0),console[_0x3f0331(0xbb)](a33_0x2ec449[_0x3f0331(0xdf)](_0x3f0331(0xc1))),0x0;if(existsSync(_0x37e86b)&&statSync(_0x37e86b)[_0x3f0331(0xb7)]()){let _0x32d70f;try{_0x32d70f=findTdxConfig(_0x37e86b);}catch{return console['error'](a33_0x2ec449['red']('Error:\x20No\x20tdx.json\x20found\x20in\x20or\x20above:\x20'+_0x37e86b)),console[_0x3f0331(0xdd)](a33_0x2ec449[_0x3f0331(0xc5)](_0x3f0331(0xc0))),0x1;}const _0xe5a7f6=_0x32d70f[_0x3f0331(0xe9)][_0x3f0331(0xe0)];return saveSessionContext({'segment_path':_0xe5a7f6,'parent_segment':_0xe5a7f6},_0x4d2ca0),console['log'](a33_0x2ec449[_0x3f0331(0xdf)](_0x3f0331(0xd4)+a33_0x2ec449['cyan'](_0xe5a7f6))),0x0;}const _0x30e068=_0x32eb7c[_0x3f0331(0xd9)];let _0x150e1d=_0x37e86b;const _0x1a9d45=parsePath(_0x37e86b);if(!_0x1a9d45[_0x3f0331(0xca)]){if(!_0x30e068)return console[_0x3f0331(0xdd)](a33_0x2ec449['red'](_0x3f0331(0xd6))),console[_0x3f0331(0xdd)](a33_0x2ec449['cyan'](_0x3f0331(0xc9))),0x1;if(_0x37e86b==='..'){const _0x3310f9=_0x30e068['split']('/')[_0x3f0331(0xc7)](0x0,-0x1)['join']('/');_0x150e1d=_0x3310f9||'/';}else _0x37e86b==='.'?_0x150e1d=_0x30e068:_0x150e1d=_0x30e068+'/'+_0x37e86b;_0x32eb7c[_0x3f0331(0xe3)]&&console['error'](_0x3f0331(0xdc)+_0x150e1d);}if(_0x150e1d==='/'||_0x150e1d==='')return saveSessionContext({'segment_path':undefined},_0x4d2ca0),console[_0x3f0331(0xbb)](a33_0x2ec449[_0x3f0331(0xdf)](_0x3f0331(0xc1))),0x0;_0x150e1d=normalizePath(_0x150e1d);const _0x955322=parsePath(_0x150e1d)[_0x3f0331(0xe1)];if(_0x955322[_0x3f0331(0xda)]===0x0)return saveSessionContext({'segment_path':undefined},_0x4d2ca0),console['log'](a33_0x2ec449[_0x3f0331(0xdf)](_0x3f0331(0xc1))),0x0;_0x32eb7c['verbose']&&(console['error']('Site:\x20'+_0x32eb7c[_0x3f0331(0xce)]),console[_0x3f0331(0xdd)]('Target\x20path:\x20'+_0x150e1d));const _0x4b8473=await withSpinner('Resolving\x20path\x20\x27'+_0x150e1d+_0x3f0331(0xb5),()=>_0x45351b[_0x3f0331(0xdb)][_0x3f0331(0xe8)](_0x150e1d),{'verbose':_0x32eb7c[_0x3f0331(0xe3)]}),_0x134f7d=_0x4b8473['data'];_0x32eb7c['verbose']&&(console[_0x3f0331(0xdd)]('Resolved\x20path\x20type:\x20'+_0x134f7d[_0x3f0331(0xcf)]),console[_0x3f0331(0xdd)](_0x3f0331(0xea)+_0x134f7d[_0x3f0331(0xc4)]),_0x134f7d[_0x3f0331(0xd1)]&&console[_0x3f0331(0xdd)]('Folder\x20ID:\x20'+_0x134f7d[_0x3f0331(0xd1)]));if(_0x134f7d['type']==='segment')return console[_0x3f0331(0xdd)](a33_0x2ec449[_0x3f0331(0xb8)](_0x3f0331(0xc2))),console[_0x3f0331(0xdd)](_0x3f0331(0xbf)),console[_0x3f0331(0xdd)](a33_0x2ec449[_0x3f0331(0xc5)](_0x3f0331(0xde)+_0x134f7d[_0x3f0331(0xd5)]+(_0x134f7d[_0x3f0331(0xe5)]?'/'+_0x134f7d[_0x3f0331(0xe5)]['join']('/'):''))),0x1;return saveSessionContext({'segment_path':_0x134f7d[_0x3f0331(0xbe)],'parent_segment':_0x134f7d['parentName']},_0x4d2ca0),console[_0x3f0331(0xbb)](a33_0x2ec449[_0x3f0331(0xdf)]('✔\x20Context\x20set\x20to:\x20'+a33_0x2ec449[_0x3f0331(0xc5)](_0x134f7d['fullPath']))),_0x32eb7c[_0x3f0331(0xe3)]&&(console[_0x3f0331(0xdd)](a33_0x2ec449[_0x3f0331(0xcd)]('Use\x20\x22tdx\x20segments\x22\x20to\x20list\x20contents\x20in\x20this\x20context')),console['error'](a33_0x2ec449[_0x3f0331(0xcd)]('Use\x20\x22tdx\x20use\x22\x20to\x20see\x20all\x20context\x20parameters'))),0x0;}catch(_0x22d0e6){throw _0x22d0e6;}}}
1
+ const a33_0x1c048f=a33_0x5425;(function(_0x4e1125,_0x21dff1){const _0x2c19ff=a33_0x5425,_0x2262ec=_0x4e1125();while(!![]){try{const _0x34ef59=-parseInt(_0x2c19ff(0xe1))/0x1+parseInt(_0x2c19ff(0xc4))/0x2+parseInt(_0x2c19ff(0xb8))/0x3*(parseInt(_0x2c19ff(0xd6))/0x4)+parseInt(_0x2c19ff(0xcb))/0x5+parseInt(_0x2c19ff(0xbe))/0x6*(parseInt(_0x2c19ff(0xdc))/0x7)+parseInt(_0x2c19ff(0xc9))/0x8*(parseInt(_0x2c19ff(0xbd))/0x9)+parseInt(_0x2c19ff(0xd0))/0xa*(-parseInt(_0x2c19ff(0xc0))/0xb);if(_0x34ef59===_0x21dff1)break;else _0x2262ec['push'](_0x2262ec['shift']());}catch(_0x394f97){_0x2262ec['push'](_0x2262ec['shift']());}}}(a33_0x5bb7,0x8f384));import{existsSync,statSync}from'fs';import a33_0x5f53c0 from'chalk';import{BaseCommand}from'./command.js';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';function a33_0x5bb7(){const _0x15aef9=['Set\x20current\x20segment/folder\x20context\x20for\x20navigation','2497WOqYBU','Resolving\x20path\x20\x27','length','split','2174774OZirRA','error','verbose','join','log','23576LqFRdB','folderId','1110370VimNjD','\x20\x20tdx\x20segment\x20use\x20/\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Clear\x20context','\x27...','data','execute','85660nuyMSK','type','segment:use','Context\x20can\x20only\x20be\x20set\x20to\x20a\x20parent\x20segment\x20or\x20folder.','isAbsolute','dim','24EFqvKT','Use\x20an\x20absolute\x20path\x20or\x20set\x20context\x20with:\x20tdx\x20segment\x20use\x20<parent_name>','isDirectory','slice','segments','session','707QjfqiT','✔\x20Context\x20cleared.\x20Back\x20to\x20root.','green','folderPath','red','71807yvRCIQ','Error:\x20No\x20tdx.json\x20found\x20in\x20or\x20above:\x20','cyan','Target\x20path:\x20','Site:\x20','Error:\x20No\x20context\x20set.\x20Cannot\x20use\x20relative\x20path.','segment','Tip:\x20Run\x20`tdx\x20sg\x20pull\x20<parent_name>`\x20first\x20to\x20create\x20the\x20folder\x20structure','Parent\x20ID:\x20','Use:\x20tdx\x20segment\x20use\x20','resolvePathToResource','description','parentName','\x20\x20tdx\x20segment\x20use\x20..\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Go\x20to\x20parent','240993SHXaMW','Usage:\x20tdx\x20segment\x20use\x20<path>','fullPath','Use\x20\x22tdx\x20segments\x22\x20to\x20list\x20contents\x20in\x20this\x20context','site','927qmwYNF','30174YxnCXl'];a33_0x5bb7=function(){return _0x15aef9;};return a33_0x5bb7();}function a33_0x5425(_0x587272,_0x561b87){_0x587272=_0x587272-0xb1;const _0x5bb7d7=a33_0x5bb7();let _0x5425d2=_0x5bb7d7[_0x587272];return _0x5425d2;}export class SegmentUseCommand extends BaseCommand{['name']=a33_0x1c048f(0xd2);[a33_0x1c048f(0xb5)]=a33_0x1c048f(0xbf);async[a33_0x1c048f(0xcf)](_0x53ea0e){const _0x523057=a33_0x1c048f,{options:_0x52f09e,args:_0x219aef,tdx:_0x5c4911}=_0x53ea0e;if(_0x219aef[_0x523057(0xc2)]===0x0)return console['error'](a33_0x5f53c0[_0x523057(0xe0)]('Error:\x20Path\x20is\x20required\x0a')),console['error'](_0x523057(0xb9)),console[_0x523057(0xc5)]('Examples:'),console[_0x523057(0xc5)]('\x20\x20tdx\x20segment\x20use\x20\x22My\x20Audience\x22'),console['error']('\x20\x20tdx\x20segment\x20use\x20\x22My\x20Audience/Marketing\x22'),console[_0x523057(0xc5)](_0x523057(0xcc)),console[_0x523057(0xc5)](_0x523057(0xb7)),0x1;const _0x32f6b0=_0x219aef[0x0],_0x108df7=_0x52f09e[_0x523057(0xdb)];try{if(_0x32f6b0==='/')return saveSessionContext({'segment_path':undefined},_0x108df7),console['log'](a33_0x5f53c0[_0x523057(0xde)](_0x523057(0xdd))),0x0;if(existsSync(_0x32f6b0)&&statSync(_0x32f6b0)[_0x523057(0xd8)]()){let _0x59d70f;try{_0x59d70f=findTdxConfig(_0x32f6b0);}catch{return console[_0x523057(0xc5)](a33_0x5f53c0[_0x523057(0xe0)](_0x523057(0xe2)+_0x32f6b0)),console[_0x523057(0xc5)](a33_0x5f53c0[_0x523057(0xe3)](_0x523057(0xb1))),0x1;}const _0x5d721f=_0x59d70f['config']['parent_segment'];return saveSessionContext({'segment_path':_0x5d721f,'parent_segment':_0x5d721f},_0x108df7),console[_0x523057(0xc8)](a33_0x5f53c0[_0x523057(0xde)]('✔\x20Context\x20set\x20to:\x20'+a33_0x5f53c0[_0x523057(0xe3)](_0x5d721f))),0x0;}const _0x1b3b06=_0x52f09e['segmentPath'];let _0x1b965b=_0x32f6b0;const _0x4b481a=parsePath(_0x32f6b0);if(!_0x4b481a[_0x523057(0xd4)]){if(!_0x1b3b06)return console[_0x523057(0xc5)](a33_0x5f53c0[_0x523057(0xe0)](_0x523057(0xe6))),console[_0x523057(0xc5)](a33_0x5f53c0[_0x523057(0xe3)](_0x523057(0xd7))),0x1;if(_0x32f6b0==='..'){const _0x2bab01=_0x1b3b06[_0x523057(0xc3)]('/')[_0x523057(0xd9)](0x0,-0x1)[_0x523057(0xc7)]('/');_0x1b965b=_0x2bab01||'/';}else _0x32f6b0==='.'?_0x1b965b=_0x1b3b06:_0x1b965b=_0x1b3b06+'/'+_0x32f6b0;_0x52f09e['verbose']&&console['error']('Resolved\x20relative\x20path\x20to:\x20'+_0x1b965b);}if(_0x1b965b==='/'||_0x1b965b==='')return saveSessionContext({'segment_path':undefined},_0x108df7),console[_0x523057(0xc8)](a33_0x5f53c0['green'](_0x523057(0xdd))),0x0;_0x1b965b=normalizePath(_0x1b965b);const _0x2c735b=parsePath(_0x1b965b)[_0x523057(0xda)];if(_0x2c735b[_0x523057(0xc2)]===0x0)return saveSessionContext({'segment_path':undefined},_0x108df7),console[_0x523057(0xc8)](a33_0x5f53c0[_0x523057(0xde)]('✔\x20Context\x20cleared.\x20Back\x20to\x20root.')),0x0;_0x52f09e[_0x523057(0xc6)]&&(console['error'](_0x523057(0xe5)+_0x52f09e[_0x523057(0xbc)]),console[_0x523057(0xc5)](_0x523057(0xe4)+_0x1b965b));const _0x41cc07=await withSpinner(_0x523057(0xc1)+_0x1b965b+_0x523057(0xcd),()=>_0x5c4911[_0x523057(0xe7)][_0x523057(0xb4)](_0x1b965b),{'verbose':_0x52f09e[_0x523057(0xc6)]}),_0x5c1013=_0x41cc07[_0x523057(0xce)];_0x52f09e[_0x523057(0xc6)]&&(console[_0x523057(0xc5)]('Resolved\x20path\x20type:\x20'+_0x5c1013['type']),console[_0x523057(0xc5)](_0x523057(0xb2)+_0x5c1013['parentId']),_0x5c1013[_0x523057(0xca)]&&console[_0x523057(0xc5)]('Folder\x20ID:\x20'+_0x5c1013['folderId']));if(_0x5c1013[_0x523057(0xd1)]===_0x523057(0xe7))return console['error'](a33_0x5f53c0[_0x523057(0xe0)]('Error:\x20Cannot\x20set\x20context\x20to\x20a\x20segment.')),console[_0x523057(0xc5)](_0x523057(0xd3)),console['error'](a33_0x5f53c0[_0x523057(0xe3)](_0x523057(0xb3)+_0x5c1013[_0x523057(0xb6)]+(_0x5c1013['folderPath']?'/'+_0x5c1013[_0x523057(0xdf)]['join']('/'):''))),0x1;return saveSessionContext({'segment_path':_0x5c1013['fullPath'],'parent_segment':_0x5c1013[_0x523057(0xb6)]},_0x108df7),console[_0x523057(0xc8)](a33_0x5f53c0[_0x523057(0xde)]('✔\x20Context\x20set\x20to:\x20'+a33_0x5f53c0[_0x523057(0xe3)](_0x5c1013[_0x523057(0xba)]))),_0x52f09e[_0x523057(0xc6)]&&(console[_0x523057(0xc5)](a33_0x5f53c0[_0x523057(0xd5)](_0x523057(0xbb))),console[_0x523057(0xc5)](a33_0x5f53c0[_0x523057(0xd5)]('Use\x20\x22tdx\x20use\x22\x20to\x20see\x20all\x20context\x20parameters'))),0x0;}catch(_0x1984dd){throw _0x1984dd;}}}
@@ -1 +1 @@
1
- const a34_0x2277b0=a34_0x35e1;(function(_0x30d303,_0x58ea2f){const _0x1bd0cc=a34_0x35e1,_0x133a94=_0x30d303();while(!![]){try{const _0xac2ab2=parseInt(_0x1bd0cc(0x200))/0x1+-parseInt(_0x1bd0cc(0x201))/0x2*(-parseInt(_0x1bd0cc(0x210))/0x3)+-parseInt(_0x1bd0cc(0x214))/0x4+-parseInt(_0x1bd0cc(0x1f1))/0x5+-parseInt(_0x1bd0cc(0x1ec))/0x6+-parseInt(_0x1bd0cc(0x202))/0x7+parseInt(_0x1bd0cc(0x1f0))/0x8;if(_0xac2ab2===_0x58ea2f)break;else _0x133a94['push'](_0x133a94['shift']());}catch(_0x1aea3d){_0x133a94['push'](_0x133a94['shift']());}}}(a34_0x1e18,0x5f817));function a34_0x1e18(){const _0x10e406=['type','warningCount','errors','Error:\x20File\x20must\x20have\x20.yml\x20or\x20.yaml\x20extension:\x20','\x20warning(s)','error','9723zLkskG','log','parent_segment\x20is\x20not\x20set.\x20Use\x20`tdx\x20sg\x20use\x20<parent_name>`\x20to\x20set\x20it.\x0a','file','591356PSzmci','):\x20','length','87894XXvuWH','cyan','yellow','description','11237552kqsPCD','3793440jjysMY','red','errorCode','\x20\x20\x20\x20\x20\x20\x20tdx\x20sg\x20validate\x20<file_path>\x20\x20#\x20Validate\x20specific\x20file','validCount','\x20warning(s)\x20found','✔\x20All\x20','dim','\x20file(s)\x20with\x20errors,\x20','parentSegment','warnings','message','endsWith','segment:validate','\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','34746gYreHN','318LdQjih','4496744LxaTmA','.yml','Validate\x20segment\x20and\x20journey\x20YAML\x20files','Validation\x20failed:\x20','verbose','.yaml','helpText','filePath'];a34_0x1e18=function(){return _0x10e406;};return a34_0x1e18();}import{BaseCommand}from'./command.js';import{resolveTarget,isSuccessfulResolution}from'../sdk/segment/target-resolution.js';function a34_0x35e1(_0x56260a,_0x5e648b){_0x56260a=_0x56260a-0x1eb;const _0x1e18e9=a34_0x1e18();let _0x35e1c5=_0x1e18e9[_0x56260a];return _0x35e1c5;}import{findYamlFiles}from'../sdk/segment/file-discovery.js';import{existsSync}from'fs';import a34_0x184d68 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_0x2277b0(0x1fe);[a34_0x2277b0(0x1ef)]=a34_0x2277b0(0x204);async['execute'](_0x5e4e9e){const _0x169338=a34_0x2277b0,{options:_0x510956,args:_0xd0b32e}=_0x5e4e9e,_0x57041e=_0x510956,_0x1332ed=await resolveTarget({'arg':_0xd0b32e[0x0],'contextParent':_0x510956[_0x169338(0x1fa)],'cwd':process['cwd']()});if(!isSuccessfulResolution(_0x1332ed))return _0x1332ed[_0x169338(0x1f3)]==='no_parent'?(console[_0x169338(0x20f)](a34_0x184d68[_0x169338(0x1ee)](_0x169338(0x212))),console[_0x169338(0x20f)]('Usage:\x20tdx\x20sg\x20validate\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Validate\x20all\x20(requires\x20context)'),console[_0x169338(0x20f)](_0x169338(0x1ff)),console[_0x169338(0x20f)](_0x169338(0x1f4))):(console[_0x169338(0x20f)](a34_0x184d68[_0x169338(0x1f2)]('Error:\x20'+_0x1332ed[_0x169338(0x1fc)]+'\x0a')),_0x1332ed[_0x169338(0x208)]&&console[_0x169338(0x20f)](a34_0x184d68[_0x169338(0x1ed)](_0x1332ed[_0x169338(0x208)]))),0x1;const _0x286434=_0x1332ed['targetDir'],_0x1b94b1=_0x1332ed[_0x169338(0x20a)]===_0x169338(0x213)?_0x1332ed[_0x169338(0x209)]:undefined;if(!_0x1b94b1&&!existsSync(_0x286434))return console['error'](a34_0x184d68['red']('Error:\x20Directory\x20not\x20found:\x20'+_0x286434+'\x0a')),0x1;let _0x2bbe5f;if(_0x1b94b1){if(!_0x1b94b1[_0x169338(0x1fd)](_0x169338(0x203))&&!_0x1b94b1[_0x169338(0x1fd)](_0x169338(0x207)))return console['error'](a34_0x184d68['red'](_0x169338(0x20d)+_0x1b94b1+'\x0a')),0x1;_0x2bbe5f=[_0x1b94b1];}else _0x2bbe5f=findYamlFiles(_0x286434);if(_0x2bbe5f[_0x169338(0x1eb)]===0x0)return console[_0x169338(0x20f)](a34_0x184d68['red']('Error:\x20No\x20YAML\x20files\x20found\x20in\x20'+_0x286434+'\x0a')),0x1;const _0x5a4f8a=validateYamlFiles(_0x2bbe5f,_0x286434),_0x1a5d02=calculateSummary(_0x5a4f8a);for(const _0x5f4959 of _0x5a4f8a){if(!isValidationResult(_0x5f4959))continue;const {relativePath:_0x40e109,source:_0x56de73,result:_0x3cbc00,fileType:_0x22704c}=_0x5f4959,_0x25f61f=_0x22704c;if(_0x3cbc00['valid']&&_0x3cbc00[_0x169338(0x1fb)][_0x169338(0x1eb)]===0x0)_0x57041e[_0x169338(0x206)]&&console[_0x169338(0x211)](a34_0x184d68['green']('✔\x20'+_0x40e109)+a34_0x184d68['dim']('\x20('+_0x25f61f+')'));else _0x3cbc00['valid']?(console[_0x169338(0x211)](a34_0x184d68[_0x169338(0x1ee)]('⚠\x20'+_0x40e109)+a34_0x184d68[_0x169338(0x1f8)]('\x20('+_0x25f61f+'):\x20'+_0x3cbc00[_0x169338(0x1fb)][_0x169338(0x1eb)]+_0x169338(0x20e))),console[_0x169338(0x211)](formatValidationResult(_0x3cbc00,_0x56de73,_0x40e109))):(console[_0x169338(0x211)](a34_0x184d68[_0x169338(0x1f2)]('✖\x20'+_0x40e109)+a34_0x184d68[_0x169338(0x1f8)]('\x20('+_0x25f61f+_0x169338(0x215)+_0x3cbc00[_0x169338(0x20c)]['length']+'\x20error(s)')),console[_0x169338(0x211)](formatValidationResult(_0x3cbc00,_0x56de73,_0x40e109)));}return console['log'](''),_0x1a5d02['hasErrors']?(console[_0x169338(0x211)](a34_0x184d68[_0x169338(0x1f2)](_0x169338(0x205)+_0x1a5d02['invalidCount']+_0x169338(0x1f9)+_0x1a5d02[_0x169338(0x1f5)]+'\x20valid')),_0x1a5d02[_0x169338(0x20b)]>0x0&&console[_0x169338(0x211)](a34_0x184d68['yellow'](_0x1a5d02['warningCount']+_0x169338(0x1f6))),0x1):(console[_0x169338(0x211)](a34_0x184d68['green'](_0x169338(0x1f7)+_0x1a5d02['validCount']+'\x20file(s)\x20valid')),_0x1a5d02[_0x169338(0x20b)]>0x0&&console[_0x169338(0x211)](a34_0x184d68[_0x169338(0x1ee)](_0x1a5d02['warningCount']+_0x169338(0x1f6))),0x0);}}
1
+ const a34_0x31d784=a34_0x5b04;function a34_0x2244(){const _0x12ab46=['endsWith','helpText','\x20file(s)\x20valid','6778746zcQrHa','hasErrors','Error:\x20File\x20must\x20have\x20.yml\x20or\x20.yaml\x20extension:\x20','Validate\x20segment\x20and\x20journey\x20YAML\x20files','invalidCount','dim','name','Error:\x20No\x20YAML\x20files\x20found\x20in\x20','valid','552161AHcPcO','no_parent','\x20warning(s)','validCount','\x20warning(s)\x20found','parentSegment','Error:\x20','36349888khWVZq','green','segment:validate','\x20file(s)\x20with\x20errors,\x20','type','message','parent_segment\x20is\x20not\x20set.\x20Use\x20`tdx\x20sg\x20use\x20<parent_name>`\x20to\x20set\x20it.\x0a','red','1178456fPGeQf','Error:\x20Directory\x20not\x20found:\x20','targetDir','verbose','warnings','yellow','12eACkiE','3437388rNZxqo','length','):\x20','\x20error(s)','.yaml','execute','1756415wUTNPH','file','filePath','cyan','4184733ptpbiW','✔\x20All\x20','Usage:\x20tdx\x20sg\x20validate\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Validate\x20all\x20(requires\x20context)','Validation\x20failed:\x20','log','warningCount','error'];a34_0x2244=function(){return _0x12ab46;};return a34_0x2244();}(function(_0x459122,_0x5d9422){const _0x5af9ec=a34_0x5b04,_0x39fe88=_0x459122();while(!![]){try{const _0x454f0e=-parseInt(_0x5af9ec(0x102))/0x1+parseInt(_0x5af9ec(0x111))/0x2+-parseInt(_0x5af9ec(0xe5))/0x3+-parseInt(_0x5af9ec(0xe4))/0x4*(parseInt(_0x5af9ec(0xeb))/0x5)+-parseInt(_0x5af9ec(0xf9))/0x6+-parseInt(_0x5af9ec(0xef))/0x7+parseInt(_0x5af9ec(0x109))/0x8;if(_0x454f0e===_0x5d9422)break;else _0x39fe88['push'](_0x39fe88['shift']());}catch(_0x712f1c){_0x39fe88['push'](_0x39fe88['shift']());}}}(a34_0x2244,0x9f8ec));import{BaseCommand}from'./command.js';import{resolveTarget,isSuccessfulResolution}from'../sdk/segment/target-resolution.js';import{findYamlFiles}from'../sdk/segment/file-discovery.js';function a34_0x5b04(_0x1406ad,_0x242399){_0x1406ad=_0x1406ad-0xe2;const _0x224452=a34_0x2244();let _0x5b04e5=_0x224452[_0x1406ad];return _0x5b04e5;}import{existsSync}from'fs';import a34_0x1723b4 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{[a34_0x31d784(0xff)]=a34_0x31d784(0x10b);['description']=a34_0x31d784(0xfc);async[a34_0x31d784(0xea)](_0x35f066){const _0x1eddb8=a34_0x31d784,{options:_0x46c704,args:_0x5d87d5}=_0x35f066,_0x2f63b9=_0x46c704,_0x2aff4b=await resolveTarget({'arg':_0x5d87d5[0x0],'contextParent':_0x46c704[_0x1eddb8(0x107)],'cwd':process['cwd']()});if(!isSuccessfulResolution(_0x2aff4b))return _0x2aff4b['errorCode']===_0x1eddb8(0x103)?(console[_0x1eddb8(0xf5)](a34_0x1723b4[_0x1eddb8(0xe3)](_0x1eddb8(0x10f))),console[_0x1eddb8(0xf5)](_0x1eddb8(0xf1)),console['error']('\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'),console[_0x1eddb8(0xf5)]('\x20\x20\x20\x20\x20\x20\x20tdx\x20sg\x20validate\x20<file_path>\x20\x20#\x20Validate\x20specific\x20file')):(console[_0x1eddb8(0xf5)](a34_0x1723b4[_0x1eddb8(0x110)](_0x1eddb8(0x108)+_0x2aff4b[_0x1eddb8(0x10e)]+'\x0a')),_0x2aff4b['helpText']&&console[_0x1eddb8(0xf5)](a34_0x1723b4[_0x1eddb8(0xee)](_0x2aff4b[_0x1eddb8(0xf7)]))),0x1;const _0x55b789=_0x2aff4b[_0x1eddb8(0x113)],_0x323829=_0x2aff4b[_0x1eddb8(0x10d)]===_0x1eddb8(0xec)?_0x2aff4b[_0x1eddb8(0xed)]:undefined;if(!_0x323829&&!existsSync(_0x55b789))return console[_0x1eddb8(0xf5)](a34_0x1723b4[_0x1eddb8(0x110)](_0x1eddb8(0x112)+_0x55b789+'\x0a')),0x1;let _0x267f40;if(_0x323829){if(!_0x323829[_0x1eddb8(0xf6)]('.yml')&&!_0x323829[_0x1eddb8(0xf6)](_0x1eddb8(0xe9)))return console[_0x1eddb8(0xf5)](a34_0x1723b4[_0x1eddb8(0x110)](_0x1eddb8(0xfb)+_0x323829+'\x0a')),0x1;_0x267f40=[_0x323829];}else _0x267f40=findYamlFiles(_0x55b789);if(_0x267f40[_0x1eddb8(0xe6)]===0x0)return console[_0x1eddb8(0xf5)](a34_0x1723b4[_0x1eddb8(0x110)](_0x1eddb8(0x100)+_0x55b789+'\x0a')),0x1;const _0x4952f9=validateYamlFiles(_0x267f40,_0x55b789),_0x617df6=calculateSummary(_0x4952f9);for(const _0x151bbf of _0x4952f9){if(!isValidationResult(_0x151bbf))continue;const {relativePath:_0x37a20b,source:_0xfde98f,result:_0x254673,fileType:_0x4fbd60}=_0x151bbf,_0x2d64f6=_0x4fbd60;if(_0x254673[_0x1eddb8(0x101)]&&_0x254673['warnings'][_0x1eddb8(0xe6)]===0x0)_0x2f63b9[_0x1eddb8(0x114)]&&console[_0x1eddb8(0xf3)](a34_0x1723b4[_0x1eddb8(0x10a)]('✔\x20'+_0x37a20b)+a34_0x1723b4[_0x1eddb8(0xfe)]('\x20('+_0x2d64f6+')'));else _0x254673['valid']?(console[_0x1eddb8(0xf3)](a34_0x1723b4[_0x1eddb8(0xe3)]('⚠\x20'+_0x37a20b)+a34_0x1723b4[_0x1eddb8(0xfe)]('\x20('+_0x2d64f6+'):\x20'+_0x254673[_0x1eddb8(0xe2)][_0x1eddb8(0xe6)]+_0x1eddb8(0x104))),console[_0x1eddb8(0xf3)](formatValidationResult(_0x254673,_0xfde98f,_0x37a20b))):(console[_0x1eddb8(0xf3)](a34_0x1723b4['red']('✖\x20'+_0x37a20b)+a34_0x1723b4['dim']('\x20('+_0x2d64f6+_0x1eddb8(0xe7)+_0x254673['errors'][_0x1eddb8(0xe6)]+_0x1eddb8(0xe8))),console['log'](formatValidationResult(_0x254673,_0xfde98f,_0x37a20b)));}return console[_0x1eddb8(0xf3)](''),_0x617df6[_0x1eddb8(0xfa)]?(console[_0x1eddb8(0xf3)](a34_0x1723b4['red'](_0x1eddb8(0xf2)+_0x617df6[_0x1eddb8(0xfd)]+_0x1eddb8(0x10c)+_0x617df6['validCount']+'\x20valid')),_0x617df6[_0x1eddb8(0xf4)]>0x0&&console[_0x1eddb8(0xf3)](a34_0x1723b4[_0x1eddb8(0xe3)](_0x617df6[_0x1eddb8(0xf4)]+_0x1eddb8(0x106))),0x1):(console[_0x1eddb8(0xf3)](a34_0x1723b4['green'](_0x1eddb8(0xf0)+_0x617df6[_0x1eddb8(0x105)]+_0x1eddb8(0xf8))),_0x617df6[_0x1eddb8(0xf4)]>0x0&&console['log'](a34_0x1723b4[_0x1eddb8(0xe3)](_0x617df6['warningCount']+_0x1eddb8(0x106))),0x0);}}
@@ -1 +1 @@
1
- const a35_0x3b9a44=a35_0x33e9;(function(_0x47494a,_0x15994d){const _0x59a5f8=a35_0x33e9,_0x5f4b8f=_0x47494a();while(!![]){try{const _0x3ae5d6=parseInt(_0x59a5f8(0xe0))/0x1+parseInt(_0x59a5f8(0x103))/0x2+parseInt(_0x59a5f8(0xbe))/0x3+-parseInt(_0x59a5f8(0xd3))/0x4+-parseInt(_0x59a5f8(0xcb))/0x5*(parseInt(_0x59a5f8(0xd6))/0x6)+parseInt(_0x59a5f8(0xd1))/0x7+-parseInt(_0x59a5f8(0xe3))/0x8;if(_0x3ae5d6===_0x15994d)break;else _0x5f4b8f['push'](_0x5f4b8f['shift']());}catch(_0x3b405c){_0x5f4b8f['push'](_0x5f4b8f['shift']());}}}(a35_0x282d,0x1e3a8));import{BaseCommand}from'./command.js';function a35_0x282d(){const _0x394731=['Parent\x20ID:\x20','parentId','Set\x20a\x20parent\x20segment\x20context\x20first:','/e/','Use\x20tdx\x20ps\x20list\x20to\x20see\x20available\x20parent\x20segments.','5WhmNrn','/j/da','type','json','error','jsonl','148400zZmtxn','✔\x20Found\x20','59424CCukDi','listWithPattern','Error:\x20No\x20parent\x20segment\x20context\x20set.','53364BHzMMU','(not\x20set)','message','journeyBundleName','\x20\x20tdx\x20sg\x20use\x20\x22My\x20Audience\x22','log','\x20segment','No\x20items\x20match\x20pattern:\x20','\x20folder',']\x20matching\x20\x27','69141FzmUZW','folder','\x20matching\x20\x27','1312080TETJze','\x20\x20tdx\x20sg\x20pull\x20\x22My\x20Audience\x22','dim','Site:\x20','listUnified','\x20\x20Cause:\x20','sort','replace','✔\x20Built\x20tree\x20with\x20','journey','folderId','cause','execute','journeys','filter','description','segment','\x20journey','data','Error:\x20','length','verbose','map','Listing\x20folders,\x20segments,\x20and\x20journeys...','/app/ps/','name','resolvePathToResource','Folder/pattern\x20arg:\x20','localeCompare','listRecursive','segments','Resolving\x20path\x20\x27','112170hsFwda','test',',\x20and\x20','\x27...','includes','listUnifiedWithJourneys','495450AiZPtq','site','Parent\x20segment\x20context:\x20','parentSegment','format','children','Folder\x20ID:\x20','recursive'];a35_0x282d=function(){return _0x394731;};return a35_0x282d();}import{SDKError}from'../sdk/index.js';import{handleSDKOutput}from'../core/command-output.js';import{withSpinner}from'../utils/spinner.js';function a35_0x33e9(_0x39df8c,_0x1f49f4){_0x39df8c=_0x39df8c-0xb9;const _0x282d4b=a35_0x282d();let _0x33e936=_0x282d4b[_0x39df8c];return _0x33e936;}import{formatFlatList,formatTree}from'../sdk/util/tree-formatter.js';import{getConsoleNextUrl}from'../sdk/client/endpoints.js';import a35_0x22dff1 from'chalk';export class SegmentsCommand extends BaseCommand{[a35_0x3b9a44(0xfc)]='segments';[a35_0x3b9a44(0xf2)]='List\x20folders\x20and\x20child\x20segments';async[a35_0x3b9a44(0xef)](_0xc6de2c){const _0x5c3ff4=a35_0x3b9a44,{options:_0x3aa77b,args:_0x254cbe}=_0xc6de2c,_0x1f388d=_0x3aa77b[_0x5c3ff4(0xc5)],_0xa5d901=_0x254cbe[0x0];try{const _0x1a9745=_0x3aa77b[_0x5c3ff4(0xc1)];_0x3aa77b['verbose']&&(console[_0x5c3ff4(0xcf)](_0x5c3ff4(0xe6)+_0x3aa77b['site']),console[_0x5c3ff4(0xcf)](_0x5c3ff4(0xc0)+(_0x1a9745||_0x5c3ff4(0xd7))),_0xa5d901&&console[_0x5c3ff4(0xcf)](_0x5c3ff4(0xfe)+_0xa5d901),_0x1f388d&&console['error']('Recursive\x20mode:\x20enabled'));if(!_0x1a9745)return console['error'](_0x5c3ff4(0xd5)),console[_0x5c3ff4(0xcf)](''),console[_0x5c3ff4(0xcf)](_0x5c3ff4(0xc8)),console[_0x5c3ff4(0xcf)](_0x5c3ff4(0xe4)),console['error'](_0x5c3ff4(0xda)),console[_0x5c3ff4(0xcf)](''),console[_0x5c3ff4(0xcf)](_0x5c3ff4(0xca)),0x1;const _0x3ac5e=_0xa5d901&&(_0xa5d901['includes']('*')||_0xa5d901[_0x5c3ff4(0xbc)]('?'));if(_0x3ac5e)return await this[_0x5c3ff4(0xd4)](_0xc6de2c,_0x1a9745,_0xa5d901);const _0x17408a=_0xa5d901?_0x1a9745+'/'+_0xa5d901:_0x1a9745;return _0x1f388d?await this[_0x5c3ff4(0x100)](_0xc6de2c,_0x17408a):await this[_0x5c3ff4(0xe7)](_0xc6de2c,_0x17408a);}catch(_0x59466f){if(_0x59466f instanceof SDKError)return console[_0x5c3ff4(0xcf)](_0x5c3ff4(0xf6)+_0x59466f[_0x5c3ff4(0xd8)]),_0x59466f[_0x5c3ff4(0xee)]&&console['error'](_0x5c3ff4(0xe8)+_0x59466f[_0x5c3ff4(0xee)]),0x1;throw _0x59466f;}}async[a35_0x3b9a44(0xd4)](_0x1d588c,_0x2a43e6,_0x210244){const _0x23eace=a35_0x3b9a44,{options:_0x1bae14,tdx:_0x3f3ed8}=_0x1d588c,_0x54fa30=await withSpinner('Resolving\x20parent\x20segment\x20\x27'+_0x2a43e6+_0x23eace(0xbb),()=>_0x3f3ed8[_0x23eace(0xf3)][_0x23eace(0xfd)](_0x2a43e6),{'verbose':_0x1bae14[_0x23eace(0xf8)]}),_0x4fd8c7=_0x54fa30[_0x23eace(0xf5)],_0x1211fc=await withSpinner(_0x23eace(0xfa),()=>_0x3f3ed8[_0x23eace(0xf3)][_0x23eace(0xbd)](_0x4fd8c7[_0x23eace(0xc7)],_0x4fd8c7[_0x23eace(0xed)]),{'verbose':_0x1bae14[_0x23eace(0xf8)]}),{folders:_0x3059e2,segments:_0x50ffe3,journeys:_0x3d114f}=_0x1211fc[_0x23eace(0xf5)],_0xbc9374=_0x210244[_0x23eace(0xea)](/[.+^${}()|[\]\\]/g,'\x5c$&')[_0x23eace(0xea)](/\*/g,'.*')[_0x23eace(0xea)](/\?/g,'.'),_0x60bff0=new RegExp('^'+_0xbc9374+'$','i'),_0x2ec88e=_0x3059e2[_0x23eace(0xf1)](_0x5219b5=>_0x60bff0[_0x23eace(0xb9)](_0x5219b5[_0x23eace(0xfc)])),_0x3b6700=_0x50ffe3[_0x23eace(0xf1)](_0x35287b=>_0x60bff0[_0x23eace(0xb9)](_0x35287b[_0x23eace(0xfc)])),_0x5be913=_0x3d114f[_0x23eace(0xf1)](_0x4bef0b=>_0x60bff0[_0x23eace(0xb9)](_0x4bef0b[_0x23eace(0xd9)])),_0x289a19=_0x2ec88e[_0x23eace(0xf7)]+_0x3b6700[_0x23eace(0xf7)]+_0x5be913['length'];console[_0x23eace(0xcf)](_0x23eace(0xd2)+_0x2ec88e[_0x23eace(0xf7)]+_0x23eace(0xde)+(_0x2ec88e['length']!==0x1?'s':'')+',\x20'+_0x3b6700['length']+_0x23eace(0xdc)+(_0x3b6700[_0x23eace(0xf7)]!==0x1?'s':'')+_0x23eace(0xba)+_0x5be913[_0x23eace(0xf7)]+_0x23eace(0xf4)+(_0x5be913['length']!==0x1?'s':'')+_0x23eace(0xe2)+_0x210244+'\x27');const _0x1872f6=_0x24e8e5=>{const _0x10bdc0=_0x23eace;return getConsoleNextUrl(_0x1bae14['site'],_0x10bdc0(0xfb)+_0x4fd8c7[_0x10bdc0(0xc7)]+_0x10bdc0(0xc9)+_0x24e8e5);},_0x3b6dc6=_0x1bae14[_0x23eace(0xc2)]==='json'||_0x1bae14[_0x23eace(0xc2)]===_0x23eace(0xd0);if(_0x3b6dc6){const _0x48fe92=[..._0x2ec88e['map'](_0x37e29d=>({..._0x37e29d,'type':_0x23eace(0xe1)})),..._0x3b6700[_0x23eace(0xf9)](_0x39de98=>({..._0x39de98,'type':_0x23eace(0xf3),'url':_0x1872f6(_0x39de98['id'])})),..._0x5be913[_0x23eace(0xf9)](_0x46ee50=>({..._0x46ee50,'name':_0x46ee50[_0x23eace(0xd9)],'type':'journey'}))][_0x23eace(0xe9)]((_0x1ab12d,_0x10a2f4)=>_0x1ab12d[_0x23eace(0xfc)]['localeCompare'](_0x10a2f4[_0x23eace(0xfc)]));await handleSDKOutput(_0x48fe92,_0x1bae14);}else{if(_0x289a19===0x0)console[_0x23eace(0xdb)](_0x23eace(0xdd)+_0x210244);else{console[_0x23eace(0xdb)](a35_0x22dff1[_0x23eace(0xe5)]('['+_0x2a43e6+_0x23eace(0xdf)+_0x210244+'\x27'));const _0xc5d308=formatFlatList(_0x2ec88e,_0x3b6700,{'showMetadata':!![],'getSegmentUrl':_0x1872f6},_0x5be913);console['log'](_0xc5d308);}}return 0x0;}async['listUnified'](_0x47f438,_0x25af4d){const _0x5b8df4=a35_0x3b9a44,{options:_0x1f287a,tdx:_0x642e3e}=_0x47f438,_0x4e24e8=await withSpinner('Resolving\x20path\x20\x27'+_0x25af4d+_0x5b8df4(0xbb),()=>_0x642e3e[_0x5b8df4(0xf3)][_0x5b8df4(0xfd)](_0x25af4d),{'verbose':_0x1f287a[_0x5b8df4(0xf8)]}),_0x40cdbe=_0x4e24e8[_0x5b8df4(0xf5)];_0x1f287a[_0x5b8df4(0xf8)]&&(console[_0x5b8df4(0xcf)](_0x5b8df4(0xc6)+_0x40cdbe[_0x5b8df4(0xc7)]),_0x40cdbe[_0x5b8df4(0xed)]&&console[_0x5b8df4(0xcf)](_0x5b8df4(0xc4)+_0x40cdbe[_0x5b8df4(0xed)]));const _0xc15797=await withSpinner(_0x5b8df4(0xfa),()=>_0x642e3e[_0x5b8df4(0xf3)][_0x5b8df4(0xbd)](_0x40cdbe[_0x5b8df4(0xc7)],_0x40cdbe[_0x5b8df4(0xed)]),{'verbose':_0x1f287a[_0x5b8df4(0xf8)]}),{folders:_0x5ab77b,segments:_0x2832c1,journeys:_0x2b89ed}=_0xc15797['data'],_0x32d258=_0x5ab77b['length']+_0x2832c1[_0x5b8df4(0xf7)]+_0x2b89ed[_0x5b8df4(0xf7)];console[_0x5b8df4(0xcf)](_0x5b8df4(0xd2)+_0x5ab77b['length']+_0x5b8df4(0xde)+(_0x5ab77b[_0x5b8df4(0xf7)]!==0x1?'s':'')+',\x20'+_0x2832c1[_0x5b8df4(0xf7)]+_0x5b8df4(0xdc)+(_0x2832c1[_0x5b8df4(0xf7)]!==0x1?'s':'')+_0x5b8df4(0xba)+_0x2b89ed['length']+_0x5b8df4(0xf4)+(_0x2b89ed[_0x5b8df4(0xf7)]!==0x1?'s':''));const _0x19e06a=_0x3bc60c=>{const _0x4794b6=_0x5b8df4;return getConsoleNextUrl(_0x1f287a['site'],'/app/ps/'+_0x40cdbe[_0x4794b6(0xc7)]+_0x4794b6(0xc9)+_0x3bc60c);},_0x4eb59a=_0x428a48=>{const _0x511f5f=_0x5b8df4;return getConsoleNextUrl(_0x1f287a[_0x511f5f(0xbf)],'/app/ps/'+_0x40cdbe[_0x511f5f(0xc7)]+_0x511f5f(0xc9)+_0x428a48+'/j/da');},_0x290d49=_0x1f287a[_0x5b8df4(0xc2)]===_0x5b8df4(0xce)||_0x1f287a[_0x5b8df4(0xc2)]===_0x5b8df4(0xd0);if(_0x290d49){const _0x3e684d=[..._0x5ab77b['map'](_0x44531c=>({..._0x44531c,'type':_0x5b8df4(0xe1)})),..._0x2832c1[_0x5b8df4(0xf9)](_0x3b746f=>({..._0x3b746f,'type':_0x5b8df4(0xf3),'url':_0x19e06a(_0x3b746f['id'])})),..._0x2b89ed[_0x5b8df4(0xf9)](_0xf6c2ab=>({..._0xf6c2ab,'name':_0xf6c2ab['journeyBundleName'],'type':'journey','url':_0x4eb59a(_0xf6c2ab['id'])}))][_0x5b8df4(0xe9)]((_0x16b3f7,_0x4edfab)=>_0x16b3f7[_0x5b8df4(0xfc)][_0x5b8df4(0xff)](_0x4edfab['name']));await handleSDKOutput(_0x3e684d,_0x1f287a);}else{if(_0x32d258===0x0)console[_0x5b8df4(0xdb)](a35_0x22dff1[_0x5b8df4(0xe5)]('['+_0x25af4d+']')),console[_0x5b8df4(0xdb)]('(empty)');else{console[_0x5b8df4(0xdb)](a35_0x22dff1[_0x5b8df4(0xe5)]('['+_0x25af4d+']'));const _0x273f85=formatFlatList(_0x5ab77b,_0x2832c1,{'showMetadata':!![],'getSegmentUrl':_0x19e06a,'getJourneyUrl':_0x4eb59a},_0x2b89ed);console[_0x5b8df4(0xdb)](_0x273f85);}}return 0x0;}async[a35_0x3b9a44(0x100)](_0x37d407,_0x2b8af8){const _0x118bab=a35_0x3b9a44,{options:_0x4d29c5,tdx:_0x199bc5}=_0x37d407,_0x5e46ae=await withSpinner(_0x118bab(0x102)+_0x2b8af8+_0x118bab(0xbb),()=>_0x199bc5[_0x118bab(0xf3)][_0x118bab(0xfd)](_0x2b8af8),{'verbose':_0x4d29c5['verbose']}),_0x34a314=_0x5e46ae[_0x118bab(0xf5)];_0x4d29c5['verbose']&&(console['error']('Parent\x20ID:\x20'+_0x34a314['parentId']),_0x34a314[_0x118bab(0xed)]&&console['error'](_0x118bab(0xc4)+_0x34a314[_0x118bab(0xed)]));const _0x154eb6=_0x4d29c5['maxDepth']||0xa,_0x3597fd=await withSpinner('Building\x20hierarchy\x20tree...',()=>_0x199bc5[_0x118bab(0xf3)]['listRecursive'](_0x34a314['parentId'],_0x34a314[_0x118bab(0xed)],0x0,_0x154eb6),{'verbose':_0x4d29c5[_0x118bab(0xf8)]}),_0xb02f3=_0x3597fd[_0x118bab(0xf5)],_0x5a533a=_0x3b2586=>{const _0x428731=_0x118bab;let _0x1ce195=0x0,_0xd4cdca=0x0,_0x513e3b=0x0;for(const _0x11366a of _0x3b2586){if(_0x11366a['type']===_0x428731(0xe1))_0x1ce195++;else{if(_0x11366a['type']==='segment')_0xd4cdca++;else{if(_0x11366a[_0x428731(0xcd)]===_0x428731(0xec))_0x513e3b++;}}if(_0x11366a['children']){const _0x57a437=_0x5a533a(_0x11366a[_0x428731(0xc3)]);_0x1ce195+=_0x57a437['folders'],_0xd4cdca+=_0x57a437[_0x428731(0x101)],_0x513e3b+=_0x57a437[_0x428731(0xf0)];}}return{'folders':_0x1ce195,'segments':_0xd4cdca,'journeys':_0x513e3b};},_0x108635=_0x5a533a(_0xb02f3);console['error'](_0x118bab(0xeb)+_0x108635['folders']+_0x118bab(0xde)+(_0x108635['folders']!==0x1?'s':'')+',\x20'+_0x108635[_0x118bab(0x101)]+_0x118bab(0xdc)+(_0x108635[_0x118bab(0x101)]!==0x1?'s':'')+_0x118bab(0xba)+_0x108635[_0x118bab(0xf0)]+'\x20journey'+(_0x108635[_0x118bab(0xf0)]!==0x1?'s':''));const _0xe3c426=_0x4ef305=>{const _0x5081c6=_0x118bab;return getConsoleNextUrl(_0x4d29c5[_0x5081c6(0xbf)],_0x5081c6(0xfb)+_0x34a314[_0x5081c6(0xc7)]+_0x5081c6(0xc9)+_0x4ef305);},_0x3d0915=_0x418db7=>{const _0xe23501=_0x118bab;return getConsoleNextUrl(_0x4d29c5[_0xe23501(0xbf)],_0xe23501(0xfb)+_0x34a314[_0xe23501(0xc7)]+_0xe23501(0xc9)+_0x418db7+_0xe23501(0xcc));};if(_0x4d29c5['format']===_0x118bab(0xce)||_0x4d29c5[_0x118bab(0xc2)]===_0x118bab(0xd0))await handleSDKOutput(_0xb02f3,_0x4d29c5);else{console['log'](a35_0x22dff1['dim']('['+_0x2b8af8+']'));const _0x2ac08e=formatTree(_0xb02f3,{'showMetadata':!![],'getSegmentUrl':_0xe3c426,'getJourneyUrl':_0x3d0915});console[_0x118bab(0xdb)](_0x2ac08e);}return 0x0;}}
1
+ const a35_0x4a2455=a35_0x4a8d;(function(_0x43043b,_0x4cfae2){const _0xc9ae96=a35_0x4a8d,_0x49170a=_0x43043b();while(!![]){try{const _0x40813b=parseInt(_0xc9ae96(0x1c6))/0x1+parseInt(_0xc9ae96(0x1fa))/0x2*(parseInt(_0xc9ae96(0x210))/0x3)+parseInt(_0xc9ae96(0x1de))/0x4*(parseInt(_0xc9ae96(0x1e9))/0x5)+-parseInt(_0xc9ae96(0x20f))/0x6*(parseInt(_0xc9ae96(0x201))/0x7)+parseInt(_0xc9ae96(0x20a))/0x8*(-parseInt(_0xc9ae96(0x211))/0x9)+-parseInt(_0xc9ae96(0x1da))/0xa*(-parseInt(_0xc9ae96(0x1e7))/0xb)+-parseInt(_0xc9ae96(0x1d8))/0xc*(parseInt(_0xc9ae96(0x1f9))/0xd);if(_0x40813b===_0x4cfae2)break;else _0x49170a['push'](_0x49170a['shift']());}catch(_0x7869d2){_0x49170a['push'](_0x49170a['shift']());}}}(a35_0x35e9,0x2b27d));import{BaseCommand}from'./command.js';function a35_0x4a8d(_0x5b381e,_0x1e72a0){_0x5b381e=_0x5b381e-0x1c6;const _0x35e9fd=a35_0x35e9();let _0x4a8d63=_0x35e9fd[_0x5b381e];return _0x4a8d63;}import{SDKError}from'../sdk/index.js';import{handleSDKOutput}from'../core/command-output.js';function a35_0x35e9(){const _0x409599=['dim','json','4xsIyOY','folder','segments','replace','children','resolvePathToResource',']\x20matching\x20\x27','listRecursive','\x20journey','22CKdlAD','execute','1601335DtpZZn','journeys','description','\x20\x20tdx\x20sg\x20pull\x20\x22My\x20Audience\x22','✔\x20Built\x20tree\x20with\x20','maxDepth','journeyBundleName','filter','/app/ps/','name','jsonl','error','Folder/pattern\x20arg:\x20','Parent\x20segment\x20context:\x20','/j/da','segment','175955qqPXSJ','2cllNkD','parentSegment','type','Resolving\x20path\x20\x27','Recursive\x20mode:\x20enabled','data','Site:\x20','7jEKsna','Listing\x20folders,\x20segments,\x20and\x20journeys...','listUnified','(empty)','folderId','Building\x20hierarchy\x20tree...','log','listUnifiedWithJourneys','Use\x20tdx\x20ps\x20list\x20to\x20see\x20available\x20parent\x20segments.','77824TpHxrG',',\x20and\x20','Folder\x20ID:\x20','\x5c$&','map','1300500QrOtlK','1046766EutJRg','90ZZSsvk','✔\x20Found\x20','312293sZSNyE','verbose','length','cause','parentId','includes','sort','site','journey','format','(not\x20set)','message','test','folders','Parent\x20ID:\x20','recursive','/e/','\x27...','660KDcUTv','\x20segment','1268690XANMMY','listWithPattern'];a35_0x35e9=function(){return _0x409599;};return a35_0x35e9();}import{withSpinner}from'../utils/spinner.js';import{formatFlatList,formatTree}from'../sdk/util/tree-formatter.js';import{getConsoleNextUrl}from'../sdk/client/endpoints.js';import a35_0x3d9c68 from'chalk';export class SegmentsCommand extends BaseCommand{[a35_0x4a2455(0x1f2)]=a35_0x4a2455(0x1e0);[a35_0x4a2455(0x1eb)]='List\x20folders\x20and\x20child\x20segments';async[a35_0x4a2455(0x1e8)](_0x35475e){const _0x7b6267=a35_0x4a2455,{options:_0x4a099a,args:_0x4398d9}=_0x35475e,_0x57e9c8=_0x4a099a[_0x7b6267(0x1d5)],_0x2774bd=_0x4398d9[0x0];try{const _0x46c9d4=_0x4a099a[_0x7b6267(0x1fb)];_0x4a099a[_0x7b6267(0x1c7)]&&(console[_0x7b6267(0x1f4)](_0x7b6267(0x200)+_0x4a099a[_0x7b6267(0x1cd)]),console[_0x7b6267(0x1f4)](_0x7b6267(0x1f6)+(_0x46c9d4||_0x7b6267(0x1d0))),_0x2774bd&&console['error'](_0x7b6267(0x1f5)+_0x2774bd),_0x57e9c8&&console[_0x7b6267(0x1f4)](_0x7b6267(0x1fe)));if(!_0x46c9d4)return console['error']('Error:\x20No\x20parent\x20segment\x20context\x20set.'),console[_0x7b6267(0x1f4)](''),console[_0x7b6267(0x1f4)]('Set\x20a\x20parent\x20segment\x20context\x20first:'),console[_0x7b6267(0x1f4)](_0x7b6267(0x1ec)),console[_0x7b6267(0x1f4)]('\x20\x20tdx\x20sg\x20use\x20\x22My\x20Audience\x22'),console[_0x7b6267(0x1f4)](''),console[_0x7b6267(0x1f4)](_0x7b6267(0x209)),0x1;const _0x42a36a=_0x2774bd&&(_0x2774bd['includes']('*')||_0x2774bd[_0x7b6267(0x1cb)]('?'));if(_0x42a36a)return await this[_0x7b6267(0x1db)](_0x35475e,_0x46c9d4,_0x2774bd);const _0x552711=_0x2774bd?_0x46c9d4+'/'+_0x2774bd:_0x46c9d4;return _0x57e9c8?await this[_0x7b6267(0x1e5)](_0x35475e,_0x552711):await this[_0x7b6267(0x203)](_0x35475e,_0x552711);}catch(_0x593e07){if(_0x593e07 instanceof SDKError)return console[_0x7b6267(0x1f4)]('Error:\x20'+_0x593e07[_0x7b6267(0x1d1)]),_0x593e07['cause']&&console[_0x7b6267(0x1f4)]('\x20\x20Cause:\x20'+_0x593e07[_0x7b6267(0x1c9)]),0x1;throw _0x593e07;}}async['listWithPattern'](_0x1faf32,_0x2c8914,_0x3ccb78){const _0x491237=a35_0x4a2455,{options:_0x11d9bc,tdx:_0x30bd45}=_0x1faf32,_0x1efc1f=await withSpinner('Resolving\x20parent\x20segment\x20\x27'+_0x2c8914+_0x491237(0x1d7),()=>_0x30bd45['segment'][_0x491237(0x1e3)](_0x2c8914),{'verbose':_0x11d9bc[_0x491237(0x1c7)]}),_0x586008=_0x1efc1f[_0x491237(0x1ff)],_0x57c9bd=await withSpinner(_0x491237(0x202),()=>_0x30bd45[_0x491237(0x1f8)][_0x491237(0x208)](_0x586008[_0x491237(0x1ca)],_0x586008[_0x491237(0x205)]),{'verbose':_0x11d9bc[_0x491237(0x1c7)]}),{folders:_0x70d162,segments:_0x33b3c8,journeys:_0x54e7fd}=_0x57c9bd[_0x491237(0x1ff)],_0x1710b7=_0x3ccb78[_0x491237(0x1e1)](/[.+^${}()|[\]\\]/g,_0x491237(0x20d))[_0x491237(0x1e1)](/\*/g,'.*')[_0x491237(0x1e1)](/\?/g,'.'),_0x4f7966=new RegExp('^'+_0x1710b7+'$','i'),_0x528b3c=_0x70d162[_0x491237(0x1f0)](_0x18250a=>_0x4f7966[_0x491237(0x1d2)](_0x18250a[_0x491237(0x1f2)])),_0x599779=_0x33b3c8[_0x491237(0x1f0)](_0x58e3d4=>_0x4f7966[_0x491237(0x1d2)](_0x58e3d4[_0x491237(0x1f2)])),_0x2d0e5a=_0x54e7fd[_0x491237(0x1f0)](_0x58d699=>_0x4f7966[_0x491237(0x1d2)](_0x58d699[_0x491237(0x1ef)])),_0x3c237a=_0x528b3c[_0x491237(0x1c8)]+_0x599779[_0x491237(0x1c8)]+_0x2d0e5a[_0x491237(0x1c8)];console[_0x491237(0x1f4)]('✔\x20Found\x20'+_0x528b3c['length']+'\x20folder'+(_0x528b3c[_0x491237(0x1c8)]!==0x1?'s':'')+',\x20'+_0x599779['length']+_0x491237(0x1d9)+(_0x599779['length']!==0x1?'s':'')+_0x491237(0x20b)+_0x2d0e5a[_0x491237(0x1c8)]+_0x491237(0x1e6)+(_0x2d0e5a[_0x491237(0x1c8)]!==0x1?'s':'')+'\x20matching\x20\x27'+_0x3ccb78+'\x27');const _0x3a4341=_0x93a957=>{const _0x29f247=_0x491237;return getConsoleNextUrl(_0x11d9bc['site'],_0x29f247(0x1f1)+_0x586008[_0x29f247(0x1ca)]+'/e/'+_0x93a957);},_0x701358=_0x11d9bc[_0x491237(0x1cf)]===_0x491237(0x1dd)||_0x11d9bc[_0x491237(0x1cf)]===_0x491237(0x1f3);if(_0x701358){const _0x22af15=[..._0x528b3c[_0x491237(0x20e)](_0x10df6b=>({..._0x10df6b,'type':_0x491237(0x1df)})),..._0x599779[_0x491237(0x20e)](_0x1f8912=>({..._0x1f8912,'type':'segment','url':_0x3a4341(_0x1f8912['id'])})),..._0x2d0e5a[_0x491237(0x20e)](_0x340588=>({..._0x340588,'name':_0x340588[_0x491237(0x1ef)],'type':'journey'}))][_0x491237(0x1cc)]((_0x5779ca,_0x22f97b)=>_0x5779ca[_0x491237(0x1f2)]['localeCompare'](_0x22f97b[_0x491237(0x1f2)]));await handleSDKOutput(_0x22af15,_0x11d9bc);}else{if(_0x3c237a===0x0)console[_0x491237(0x207)]('No\x20items\x20match\x20pattern:\x20'+_0x3ccb78);else{console[_0x491237(0x207)](a35_0x3d9c68[_0x491237(0x1dc)]('['+_0x2c8914+_0x491237(0x1e4)+_0x3ccb78+'\x27'));const _0x2a3e23=formatFlatList(_0x528b3c,_0x599779,{'showMetadata':!![],'getSegmentUrl':_0x3a4341},_0x2d0e5a);console[_0x491237(0x207)](_0x2a3e23);}}return 0x0;}async['listUnified'](_0x1f53ba,_0x142898){const _0x39470d=a35_0x4a2455,{options:_0x3bd31d,tdx:_0x50a3a1}=_0x1f53ba,_0x51ac5e=await withSpinner(_0x39470d(0x1fd)+_0x142898+_0x39470d(0x1d7),()=>_0x50a3a1[_0x39470d(0x1f8)][_0x39470d(0x1e3)](_0x142898),{'verbose':_0x3bd31d[_0x39470d(0x1c7)]}),_0xb15474=_0x51ac5e[_0x39470d(0x1ff)];_0x3bd31d[_0x39470d(0x1c7)]&&(console[_0x39470d(0x1f4)](_0x39470d(0x1d4)+_0xb15474['parentId']),_0xb15474[_0x39470d(0x205)]&&console[_0x39470d(0x1f4)](_0x39470d(0x20c)+_0xb15474[_0x39470d(0x205)]));const _0x4aee63=await withSpinner(_0x39470d(0x202),()=>_0x50a3a1[_0x39470d(0x1f8)][_0x39470d(0x208)](_0xb15474[_0x39470d(0x1ca)],_0xb15474[_0x39470d(0x205)]),{'verbose':_0x3bd31d[_0x39470d(0x1c7)]}),{folders:_0x14c7c2,segments:_0x1f3ae5,journeys:_0x251f97}=_0x4aee63[_0x39470d(0x1ff)],_0x427896=_0x14c7c2[_0x39470d(0x1c8)]+_0x1f3ae5['length']+_0x251f97[_0x39470d(0x1c8)];console[_0x39470d(0x1f4)](_0x39470d(0x212)+_0x14c7c2[_0x39470d(0x1c8)]+'\x20folder'+(_0x14c7c2[_0x39470d(0x1c8)]!==0x1?'s':'')+',\x20'+_0x1f3ae5[_0x39470d(0x1c8)]+_0x39470d(0x1d9)+(_0x1f3ae5[_0x39470d(0x1c8)]!==0x1?'s':'')+_0x39470d(0x20b)+_0x251f97[_0x39470d(0x1c8)]+_0x39470d(0x1e6)+(_0x251f97[_0x39470d(0x1c8)]!==0x1?'s':''));const _0x4ff216=_0x56216a=>{const _0x374497=_0x39470d;return getConsoleNextUrl(_0x3bd31d[_0x374497(0x1cd)],_0x374497(0x1f1)+_0xb15474['parentId']+_0x374497(0x1d6)+_0x56216a);},_0x49d0a2=_0x133810=>{const _0x1a6450=_0x39470d;return getConsoleNextUrl(_0x3bd31d[_0x1a6450(0x1cd)],'/app/ps/'+_0xb15474[_0x1a6450(0x1ca)]+_0x1a6450(0x1d6)+_0x133810+_0x1a6450(0x1f7));},_0x24d388=_0x3bd31d[_0x39470d(0x1cf)]===_0x39470d(0x1dd)||_0x3bd31d[_0x39470d(0x1cf)]===_0x39470d(0x1f3);if(_0x24d388){const _0x1abb16=[..._0x14c7c2['map'](_0x3210b4=>({..._0x3210b4,'type':_0x39470d(0x1df)})),..._0x1f3ae5[_0x39470d(0x20e)](_0x44cc72=>({..._0x44cc72,'type':_0x39470d(0x1f8),'url':_0x4ff216(_0x44cc72['id'])})),..._0x251f97[_0x39470d(0x20e)](_0x4da46b=>({..._0x4da46b,'name':_0x4da46b['journeyBundleName'],'type':_0x39470d(0x1ce),'url':_0x49d0a2(_0x4da46b['id'])}))]['sort']((_0x405001,_0x19d20d)=>_0x405001[_0x39470d(0x1f2)]['localeCompare'](_0x19d20d[_0x39470d(0x1f2)]));await handleSDKOutput(_0x1abb16,_0x3bd31d);}else{if(_0x427896===0x0)console[_0x39470d(0x207)](a35_0x3d9c68[_0x39470d(0x1dc)]('['+_0x142898+']')),console[_0x39470d(0x207)](_0x39470d(0x204));else{console[_0x39470d(0x207)](a35_0x3d9c68['dim']('['+_0x142898+']'));const _0x468997=formatFlatList(_0x14c7c2,_0x1f3ae5,{'showMetadata':!![],'getSegmentUrl':_0x4ff216,'getJourneyUrl':_0x49d0a2},_0x251f97);console[_0x39470d(0x207)](_0x468997);}}return 0x0;}async['listRecursive'](_0x2ab2e6,_0x1937b6){const _0x278cdf=a35_0x4a2455,{options:_0x14489b,tdx:_0x219dc7}=_0x2ab2e6,_0x4590f6=await withSpinner(_0x278cdf(0x1fd)+_0x1937b6+_0x278cdf(0x1d7),()=>_0x219dc7[_0x278cdf(0x1f8)][_0x278cdf(0x1e3)](_0x1937b6),{'verbose':_0x14489b['verbose']}),_0x2d5eaf=_0x4590f6[_0x278cdf(0x1ff)];_0x14489b[_0x278cdf(0x1c7)]&&(console[_0x278cdf(0x1f4)](_0x278cdf(0x1d4)+_0x2d5eaf[_0x278cdf(0x1ca)]),_0x2d5eaf['folderId']&&console[_0x278cdf(0x1f4)]('Folder\x20ID:\x20'+_0x2d5eaf[_0x278cdf(0x205)]));const _0x13ed33=_0x14489b[_0x278cdf(0x1ee)]||0xa,_0x2b09a8=await withSpinner(_0x278cdf(0x206),()=>_0x219dc7['segment'][_0x278cdf(0x1e5)](_0x2d5eaf[_0x278cdf(0x1ca)],_0x2d5eaf[_0x278cdf(0x205)],0x0,_0x13ed33),{'verbose':_0x14489b[_0x278cdf(0x1c7)]}),_0x244074=_0x2b09a8[_0x278cdf(0x1ff)],_0x1aaeba=_0x4194ad=>{const _0x2bbe67=_0x278cdf;let _0x378c9c=0x0,_0x1fd9d9=0x0,_0x396eaf=0x0;for(const _0x30227c of _0x4194ad){if(_0x30227c[_0x2bbe67(0x1fc)]===_0x2bbe67(0x1df))_0x378c9c++;else{if(_0x30227c[_0x2bbe67(0x1fc)]===_0x2bbe67(0x1f8))_0x1fd9d9++;else{if(_0x30227c[_0x2bbe67(0x1fc)]==='journey')_0x396eaf++;}}if(_0x30227c[_0x2bbe67(0x1e2)]){const _0x59e4c0=_0x1aaeba(_0x30227c['children']);_0x378c9c+=_0x59e4c0[_0x2bbe67(0x1d3)],_0x1fd9d9+=_0x59e4c0[_0x2bbe67(0x1e0)],_0x396eaf+=_0x59e4c0['journeys'];}}return{'folders':_0x378c9c,'segments':_0x1fd9d9,'journeys':_0x396eaf};},_0x186c47=_0x1aaeba(_0x244074);console[_0x278cdf(0x1f4)](_0x278cdf(0x1ed)+_0x186c47[_0x278cdf(0x1d3)]+'\x20folder'+(_0x186c47[_0x278cdf(0x1d3)]!==0x1?'s':'')+',\x20'+_0x186c47[_0x278cdf(0x1e0)]+_0x278cdf(0x1d9)+(_0x186c47['segments']!==0x1?'s':'')+_0x278cdf(0x20b)+_0x186c47[_0x278cdf(0x1ea)]+_0x278cdf(0x1e6)+(_0x186c47[_0x278cdf(0x1ea)]!==0x1?'s':''));const _0x87cb48=_0x4970ba=>{const _0x2249ab=_0x278cdf;return getConsoleNextUrl(_0x14489b[_0x2249ab(0x1cd)],'/app/ps/'+_0x2d5eaf['parentId']+'/e/'+_0x4970ba);},_0x47b963=_0x5380d2=>{const _0x117d6e=_0x278cdf;return getConsoleNextUrl(_0x14489b[_0x117d6e(0x1cd)],_0x117d6e(0x1f1)+_0x2d5eaf[_0x117d6e(0x1ca)]+_0x117d6e(0x1d6)+_0x5380d2+_0x117d6e(0x1f7));};if(_0x14489b['format']===_0x278cdf(0x1dd)||_0x14489b['format']==='jsonl')await handleSDKOutput(_0x244074,_0x14489b);else{console[_0x278cdf(0x207)](a35_0x3d9c68['dim']('['+_0x1937b6+']'));const _0xce3023=formatTree(_0x244074,{'showMetadata':!![],'getSegmentUrl':_0x87cb48,'getJourneyUrl':_0x47b963});console['log'](_0xce3023);}return 0x0;}}
@@ -1 +1 @@
1
- const a36_0x1966a3=a36_0x2106;function a36_0x2106(_0x2ec048,_0xc163e5){_0x2ec048=_0x2ec048-0x181;const _0x29aa0e=a36_0x29aa();let _0x2106e5=_0x29aa0e[_0x2ec048];return _0x2106e5;}(function(_0x4e18f7,_0x2db5fc){const _0x15941b=a36_0x2106,_0xb4371f=_0x4e18f7();while(!![]){try{const _0x4015ed=parseInt(_0x15941b(0x19c))/0x1+parseInt(_0x15941b(0x18c))/0x2*(-parseInt(_0x15941b(0x181))/0x3)+parseInt(_0x15941b(0x193))/0x4*(-parseInt(_0x15941b(0x183))/0x5)+-parseInt(_0x15941b(0x198))/0x6*(parseInt(_0x15941b(0x189))/0x7)+parseInt(_0x15941b(0x186))/0x8*(parseInt(_0x15941b(0x18e))/0x9)+-parseInt(_0x15941b(0x18d))/0xa+parseInt(_0x15941b(0x18a))/0xb*(parseInt(_0x15941b(0x19d))/0xc);if(_0x4015ed===_0x2db5fc)break;else _0xb4371f['push'](_0xb4371f['shift']());}catch(_0x420561){_0xb4371f['push'](_0xb4371f['shift']());}}}(a36_0x29aa,0x782bc));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';export class ShowCommand extends BaseCommand{[a36_0x1966a3(0x1a1)]=a36_0x1966a3(0x196);[a36_0x1966a3(0x184)]='Show\x20table\x20contents';async[a36_0x1966a3(0x1a6)](_0x291aa4){const _0x1f8adb=a36_0x1966a3;return this[_0x1f8adb(0x199)](_0x291aa4);}async[a36_0x1966a3(0x199)](_0x588535){const _0x1e70aa=a36_0x1966a3,{options:_0x15cc2c,args:_0xe2fd7a,tdx:_0x31299a}=_0x588535;let _0x44bfa6;try{_0x44bfa6=parseTableReference(_0xe2fd7a[0x0]);const _0x44dd0b=_0x15cc2c[_0x1e70aa(0x1a5)];!_0x44bfa6[_0x1e70aa(0x1a5)]&&_0x44dd0b&&(_0x44bfa6[_0x1e70aa(0x1a5)]=_0x44dd0b);const _0x342726=validateTableDescribeReference(_0x44bfa6);if(_0x342726)return console[_0x1e70aa(0x185)]('Error:\x20'+_0x342726),console[_0x1e70aa(0x185)](_0x1e70aa(0x1a9)),console[_0x1e70aa(0x185)]('\x20\x20\x20or:\x20tdx\x20show\x20<catalog.database.table>'),console[_0x1e70aa(0x185)](_0x1e70aa(0x195)),0x1;}catch(_0x87b787){return console[_0x1e70aa(0x185)]('Error:\x20'+_0x87b787['message']),console[_0x1e70aa(0x185)]('Usage:\x20tdx\x20show\x20<database.table>'),console[_0x1e70aa(0x185)]('\x20\x20\x20or:\x20tdx\x20show\x20<catalog.database.table>'),console[_0x1e70aa(0x185)](_0x1e70aa(0x195)),0x1;}const _0x2508fd=_0x44bfa6[_0x1e70aa(0x18b)],_0x60ca6f=_0x44bfa6[_0x1e70aa(0x1a5)],_0x294d2a=_0x44bfa6[_0x1e70aa(0x194)],_0x5273ca=resolveLimit(_0x15cc2c[_0x1e70aa(0x1aa)],DEFAULT_DISPLAY_LIMIT);try{_0x15cc2c['verbose']&&(console[_0x1e70aa(0x185)](_0x1e70aa(0x19a)+_0x15cc2c[_0x1e70aa(0x1a2)]),_0x2508fd&&console[_0x1e70aa(0x185)](_0x1e70aa(0x1ab)+_0x2508fd),console['error'](_0x1e70aa(0x1a7)+_0x60ca6f),console[_0x1e70aa(0x185)](_0x1e70aa(0x18f)+_0x294d2a),console[_0x1e70aa(0x185)](_0x1e70aa(0x187)+_0x5273ca));const _0x433c00=_0x2508fd?_0x2508fd+'.'+_0x60ca6f+'.'+_0x294d2a:_0x60ca6f+'.'+_0x294d2a,_0x356392=await withSpinner(_0x1e70aa(0x19b)+_0x433c00+'...',()=>_0x31299a[_0x1e70aa(0x1a8)][_0x1e70aa(0x199)](_0x60ca6f,_0x294d2a,_0x5273ca,_0x2508fd),{'verbose':_0x15cc2c['verbose']}),_0x3e48ad=_0x356392['data'],_0x5d72a6=_0x3e48ad[_0x1e70aa(0x190)];return _0x5d72a6[_0x1e70aa(0x1a3)]===0x0?console['error'](_0x1e70aa(0x191)):console[_0x1e70aa(0x185)]('✔\x20Retrieved\x20'+_0x5d72a6['length']+_0x1e70aa(0x188)+(_0x5d72a6[_0x1e70aa(0x1a3)]!==0x1?'s':'')+_0x1e70aa(0x19f)+_0x433c00),await handleSDKOutput(_0x5d72a6,_0x15cc2c),0x0;}catch(_0x2f5c48){if(_0x2f5c48 instanceof SDKError)return console[_0x1e70aa(0x185)]('Error:\x20'+_0x2f5c48[_0x1e70aa(0x182)]),_0x2f5c48['cause']&&console['error'](_0x1e70aa(0x192)+_0x2f5c48[_0x1e70aa(0x197)]),0x1;throw _0x2f5c48;}}['validate'](_0x3f248c){const _0x2682ec=a36_0x1966a3;if(_0x3f248c[_0x2682ec(0x19e)][_0x2682ec(0x1a3)]===0x0)return _0x2682ec(0x1a4);if(_0x3f248c[_0x2682ec(0x19e)]['length']>0x1)return _0x2682ec(0x1a0);return undefined;}}function a36_0x29aa(){const _0x15504b=['5093jkPpJj','catalog','8AFmRbK','8240890xVNsNL','5125374gUwjuz','Table:\x20','data','✔\x20Query\x20successful\x20-\x200\x20rows\x20returned','\x20\x20Cause:\x20','8676fSMHjL','table','\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--database\x20<database>','show','cause','6TQWbrJ','showTable','Site:\x20','Querying\x20','805619qzgDtm','33504JkQwxi','args','\x20from\x20','Too\x20many\x20arguments\x0aUsage:\x20tdx\x20show\x20<database.table>\x0a\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--database\x20<database>\x0a\x0aRun\x20\x27tdx\x20show\x20--help\x27\x20for\x20more\x20options','name','site','length','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','database','execute','Database:\x20','query','Usage:\x20tdx\x20show\x20<database.table>','limit','Catalog:\x20','375609QvNUyb','message','410LKJNLD','description','error','8Ezryzo','Limit:\x20','\x20row','4709754gAWwVM'];a36_0x29aa=function(){return _0x15504b;};return a36_0x29aa();}
1
+ const a36_0x1c3ee5=a36_0x5925;(function(_0x24def8,_0x5691da){const _0x428252=a36_0x5925,_0x3b7998=_0x24def8();while(!![]){try{const _0x509ede=-parseInt(_0x428252(0x1ba))/0x1+-parseInt(_0x428252(0x1c2))/0x2+-parseInt(_0x428252(0x1c0))/0x3*(-parseInt(_0x428252(0x1a8))/0x4)+-parseInt(_0x428252(0x1b2))/0x5+-parseInt(_0x428252(0x19d))/0x6*(-parseInt(_0x428252(0x1aa))/0x7)+-parseInt(_0x428252(0x1b3))/0x8*(-parseInt(_0x428252(0x1b1))/0x9)+-parseInt(_0x428252(0x1a9))/0xa*(-parseInt(_0x428252(0x1b8))/0xb);if(_0x509ede===_0x5691da)break;else _0x3b7998['push'](_0x3b7998['shift']());}catch(_0x11f5ba){_0x3b7998['push'](_0x3b7998['shift']());}}}(a36_0x6b6b,0xb7edc));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_0x5925(_0x48761e,_0x44cceb){_0x48761e=_0x48761e-0x19d;const _0x6b6b2f=a36_0x6b6b();let _0x5925cf=_0x6b6b2f[_0x48761e];return _0x5925cf;}import{DEFAULT_DISPLAY_LIMIT,resolveLimit}from'../core/constants.js';export class ShowCommand extends BaseCommand{[a36_0x1c3ee5(0x1bb)]=a36_0x1c3ee5(0x1c6);[a36_0x1c3ee5(0x1c4)]=a36_0x1c3ee5(0x19e);async[a36_0x1c3ee5(0x1be)](_0x127899){const _0x513ef8=a36_0x1c3ee5;return this[_0x513ef8(0x1a5)](_0x127899);}async[a36_0x1c3ee5(0x1a5)](_0x33b724){const _0xc7c362=a36_0x1c3ee5,{options:_0xceedda,args:_0x446e8a,tdx:_0x185b8c}=_0x33b724;let _0x3bd66b;try{_0x3bd66b=parseTableReference(_0x446e8a[0x0]);const _0x361fb4=_0xceedda['database'];!_0x3bd66b['database']&&_0x361fb4&&(_0x3bd66b['database']=_0x361fb4);const _0x6e43a9=validateTableDescribeReference(_0x3bd66b);if(_0x6e43a9)return console['error'](_0xc7c362(0x1b5)+_0x6e43a9),console[_0xc7c362(0x1a0)](_0xc7c362(0x1ab)),console['error'](_0xc7c362(0x1ad)),console['error']('\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--database\x20<database>'),0x1;}catch(_0x48100b){return console[_0xc7c362(0x1a0)](_0xc7c362(0x1b5)+_0x48100b['message']),console[_0xc7c362(0x1a0)]('Usage:\x20tdx\x20show\x20<database.table>'),console[_0xc7c362(0x1a0)](_0xc7c362(0x1ad)),console[_0xc7c362(0x1a0)](_0xc7c362(0x1bd)),0x1;}const _0x4a992e=_0x3bd66b[_0xc7c362(0x1a3)],_0x33154a=_0x3bd66b[_0xc7c362(0x1bc)],_0x5457ee=_0x3bd66b[_0xc7c362(0x1a4)],_0x1f9f6b=resolveLimit(_0xceedda[_0xc7c362(0x1c7)],DEFAULT_DISPLAY_LIMIT);try{_0xceedda[_0xc7c362(0x1af)]&&(console['error'](_0xc7c362(0x1ae)+_0xceedda['site']),_0x4a992e&&console['error'](_0xc7c362(0x1bf)+_0x4a992e),console[_0xc7c362(0x1a0)](_0xc7c362(0x1b9)+_0x33154a),console[_0xc7c362(0x1a0)]('Table:\x20'+_0x5457ee),console[_0xc7c362(0x1a0)]('Limit:\x20'+_0x1f9f6b));const _0x125268=_0x4a992e?_0x4a992e+'.'+_0x33154a+'.'+_0x5457ee:_0x33154a+'.'+_0x5457ee,_0x56753d=await withSpinner('Querying\x20'+_0x125268+_0xc7c362(0x1c3),()=>_0x185b8c[_0xc7c362(0x1a1)][_0xc7c362(0x1a5)](_0x33154a,_0x5457ee,_0x1f9f6b,_0x4a992e),{'verbose':_0xceedda[_0xc7c362(0x1af)]}),_0x5d2e95=_0x56753d[_0xc7c362(0x1ac)],_0x1965a0=_0x5d2e95[_0xc7c362(0x1ac)];return _0x1965a0[_0xc7c362(0x1a6)]===0x0?console[_0xc7c362(0x1a0)](_0xc7c362(0x1a7)):console[_0xc7c362(0x1a0)](_0xc7c362(0x1a2)+_0x1965a0[_0xc7c362(0x1a6)]+_0xc7c362(0x1b7)+(_0x1965a0[_0xc7c362(0x1a6)]!==0x1?'s':'')+'\x20from\x20'+_0x125268),await handleSDKOutput(_0x1965a0,_0xceedda),0x0;}catch(_0x247281){if(_0x247281 instanceof SDKError)return console[_0xc7c362(0x1a0)](_0xc7c362(0x1b5)+_0x247281[_0xc7c362(0x1c5)]),_0x247281[_0xc7c362(0x1c1)]&&console[_0xc7c362(0x1a0)](_0xc7c362(0x1b0)+_0x247281['cause']),0x1;throw _0x247281;}}[a36_0x1c3ee5(0x1b4)](_0x240bfd){const _0x6a272d=a36_0x1c3ee5;if(_0x240bfd['args']['length']===0x0)return _0x6a272d(0x19f);if(_0x240bfd[_0x6a272d(0x1b6)]['length']>0x1)return'Too\x20many\x20arguments\x0aUsage:\x20tdx\x20show\x20<database.table>\x0a\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--database\x20<database>\x0a\x0aRun\x20\x27tdx\x20show\x20--help\x27\x20for\x20more\x20options';return undefined;}}function a36_0x6b6b(){const _0x3a58aa=['30ESLtJI','1498OXMqnj','Usage:\x20tdx\x20show\x20<database.table>','data','\x20\x20\x20or:\x20tdx\x20show\x20<catalog.database.table>','Site:\x20','verbose','\x20\x20Cause:\x20','2318913ofltlM','7421675GRFPVJ','24NeVIHi','validate','Error:\x20','args','\x20row','2368619JLnKSF','Database:\x20','1198949WcvNvz','name','database','\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--database\x20<database>','execute','Catalog:\x20','336kqQBCs','cause','586684NBJDUM','...','description','message','show','limit','32304XlmTZu','Show\x20table\x20contents','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','error','query','✔\x20Retrieved\x20','catalog','table','showTable','length','✔\x20Query\x20successful\x20-\x200\x20rows\x20returned','41388gLcYgo'];a36_0x6b6b=function(){return _0x3a58aa;};return a36_0x6b6b();}
@@ -1 +1 @@
1
- const a37_0x312361=a37_0x11d4;function a37_0x11d4(_0x258de2,_0x568d9b){_0x258de2=_0x258de2-0x92;const _0x53ec6e=a37_0x53ec();let _0x11d4c6=_0x53ec6e[_0x258de2];return _0x11d4c6;}(function(_0x253273,_0x57f74b){const _0xdffd29=a37_0x11d4,_0x59efca=_0x253273();while(!![]){try{const _0x2ef7a9=-parseInt(_0xdffd29(0xae))/0x1*(parseInt(_0xdffd29(0x97))/0x2)+-parseInt(_0xdffd29(0xab))/0x3+-parseInt(_0xdffd29(0xb5))/0x4*(parseInt(_0xdffd29(0x99))/0x5)+parseInt(_0xdffd29(0xa1))/0x6+parseInt(_0xdffd29(0xb1))/0x7*(-parseInt(_0xdffd29(0xb4))/0x8)+-parseInt(_0xdffd29(0xbe))/0x9+parseInt(_0xdffd29(0xaf))/0xa*(parseInt(_0xdffd29(0xb0))/0xb);if(_0x2ef7a9===_0x57f74b)break;else _0x59efca['push'](_0x59efca['shift']());}catch(_0x6e7163){_0x59efca['push'](_0x59efca['shift']());}}}(a37_0x53ec,0x20c4c));function a37_0x53ec(){const _0x3fd52a=['cyan','cli','479268UQYwzG','filter','25nUOCTt','(from\x20','red','getUserInfo','name','✗\x20Validation\x20failed:\x20','last_name','No\x20credential\x20found','1138488idhBQa','config','Name:','N/A','first_name','log','bold','User:','Account\x20ID:','profile','183093ZmNESb','Read\x20credential\x20from\x20','message','1nxShwz','9036670tSvQyv','11YYidjo','35021DQufRB','status','TDX_PROFILE\x20env','424EKSPxB','180116dNMtlH','displayWithSources','join','tdx','green','description','yellow','dim','Show\x20authentication\x20status\x20and\x20current\x20context','1514034sBNlUF','account_id','env','jobs'];a37_0x53ec=function(){return _0x3fd52a;};return a37_0x53ec();}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_0xfb4dbf from'chalk';export class StatusCommand extends BaseCommand{[a37_0x312361(0x9d)]='status';[a37_0x312361(0xba)]=a37_0x312361(0xbd);async['execute'](_0x5c1ee2){const _0x519f85=a37_0x312361,{options:_0x4da1b2,tdx:_0x115e5d}=_0x5c1ee2,_0x5518dc=_0x4da1b2['site'],_0x43cf5c=new GlobalContext(_0x4da1b2),_0x5b5d9f=_0x43cf5c[_0x519f85(0xaa)],_0x4919e9=_0x43cf5c['profileSource'],_0x50e876=_0x4919e9===_0x519f85(0x96)?'CLI\x20flag':_0x4919e9==='session'?'session':_0x4919e9===_0x519f85(0x93)?_0x519f85(0xb3):_0x4919e9===_0x519f85(0xa2)?'config':null,_0x5a8a4c=_0x5b5d9f?a37_0xfb4dbf['cyan'](_0x5b5d9f):a37_0xfb4dbf[_0x519f85(0xbc)](_0x519f85(0xa4)),_0x279399=_0x50e876?'\x20'+a37_0xfb4dbf[_0x519f85(0xbc)](_0x519f85(0x9a)+_0x50e876+')'):'';console[_0x519f85(0xa6)](a37_0xfb4dbf[_0x519f85(0xa7)](_0x519f85(0xb8))+'\x20profile:\x20'+_0x5a8a4c+_0x279399+'\x20'+a37_0xfb4dbf[_0x519f85(0xbc)]('(')+'site:\x20'+a37_0xfb4dbf[_0x519f85(0x95)](_0x5518dc)+a37_0xfb4dbf['dim'](')'));const _0x522e63=await resolveAPIKeyAsync(_0x5518dc,_0x5b5d9f);if(_0x522e63){const {source:_0x560d42,isDeprecated:_0x40640c}=_0x522e63,_0x369485=_0x519f85(0xac)+a37_0xfb4dbf[_0x519f85(0x95)](_0x560d42);console['log'](_0x40640c?a37_0xfb4dbf[_0x519f85(0xbb)](_0x369485):_0x369485);}else console['log'](a37_0xfb4dbf[_0x519f85(0xbb)](_0x519f85(0xa0)));let _0xb99068=![];try{const _0x24fd12=await _0x115e5d[_0x519f85(0x94)][_0x519f85(0x9c)]();console[_0x519f85(0xa6)](a37_0xfb4dbf[_0x519f85(0xb9)]('✓\x20Authentication\x20successful\x0a')),console['log'](a37_0xfb4dbf['bold'](_0x519f85(0xa8))+'\x20'+a37_0xfb4dbf['cyan'](_0x24fd12['email']));if(_0x24fd12[_0x519f85(0xa5)]||_0x24fd12[_0x519f85(0x9f)]){const _0x44afc8=[_0x24fd12[_0x519f85(0xa5)],_0x24fd12[_0x519f85(0x9f)]][_0x519f85(0x98)](Boolean)[_0x519f85(0xb7)]('\x20');console['log'](a37_0xfb4dbf[_0x519f85(0xa7)](_0x519f85(0xa3))+'\x20'+_0x44afc8);}_0x24fd12[_0x519f85(0x92)]&&console['log'](a37_0xfb4dbf[_0x519f85(0xa7)](_0x519f85(0xa9))+'\x20'+a37_0xfb4dbf['yellow'](_0x24fd12[_0x519f85(0x92)])),_0xb99068=!![];}catch(_0x3ea566){_0x3ea566 instanceof HTTPClientError&&_0x3ea566[_0x519f85(0xb2)]===0x191?printAuthError(_0x3ea566,!![],_0x5b5d9f):console['error'](a37_0xfb4dbf[_0x519f85(0x9b)](_0x519f85(0x9e)+(_0x3ea566 instanceof Error?_0x3ea566[_0x519f85(0xad)]:String(_0x3ea566))));}return console[_0x519f85(0xa6)](),_0x43cf5c[_0x519f85(0xb6)](),_0xb99068?0x0:0x1;}}
1
+ const a37_0x125ff0=a37_0x8a0d;(function(_0x52170e,_0x4e37c4){const _0x522e02=a37_0x8a0d,_0xac9743=_0x52170e();while(!![]){try{const _0x49e1e9=-parseInt(_0x522e02(0x91))/0x1+parseInt(_0x522e02(0x99))/0x2*(-parseInt(_0x522e02(0x85))/0x3)+-parseInt(_0x522e02(0x9a))/0x4+-parseInt(_0x522e02(0x9f))/0x5+parseInt(_0x522e02(0x78))/0x6*(-parseInt(_0x522e02(0x96))/0x7)+-parseInt(_0x522e02(0x88))/0x8*(parseInt(_0x522e02(0x93))/0x9)+parseInt(_0x522e02(0x90))/0xa;if(_0x49e1e9===_0x4e37c4)break;else _0xac9743['push'](_0xac9743['shift']());}catch(_0x13ba90){_0xac9743['push'](_0xac9743['shift']());}}}(a37_0x237b,0xde28f));import{BaseCommand,printAuthError}from'./command.js';import{resolveAPIKeyAsync}from'../core/config.js';import{HTTPClientError}from'../sdk/client/http-client.js';function a37_0x237b(){const _0x9dab83=['site:\x20','✓\x20Authentication\x20successful\x0a','CLI\x20flag','env','Name:','Account\x20ID:','89145090FkSTti','1409065wllsbj','yellow','2745xYEuXE','session','red','7eFwQmZ','displayWithSources','✗\x20Validation\x20failed:\x20','10UiIeQN','3215176ELMsfk','error','bold','Read\x20credential\x20from\x20','(from\x20','7565020GEASUC','N/A','log','cyan','description','dim','profileSource','cli','last_name','10604994mIjRDE','account_id','profile','User:','first_name','config','filter','No\x20credential\x20found','name','site','tdx','getUserInfo','message','450066KeVOyS','status','join','46192tPZOvK','execute'];a37_0x237b=function(){return _0x9dab83;};return a37_0x237b();}import{GlobalContext}from'../core/global-context.js';function a37_0x8a0d(_0x4499e4,_0xb3355){_0x4499e4=_0x4499e4-0x75;const _0x237bf7=a37_0x237b();let _0x8a0de1=_0x237bf7[_0x4499e4];return _0x8a0de1;}import a37_0x235a09 from'chalk';export class StatusCommand extends BaseCommand{[a37_0x125ff0(0x80)]=a37_0x125ff0(0x86);[a37_0x125ff0(0xa3)]='Show\x20authentication\x20status\x20and\x20current\x20context';async[a37_0x125ff0(0x89)](_0x59f10b){const _0x2e6bb=a37_0x125ff0,{options:_0x377727,tdx:_0x236e06}=_0x59f10b,_0xf407ef=_0x377727[_0x2e6bb(0x81)],_0x12559c=new GlobalContext(_0x377727),_0x3c1af1=_0x12559c[_0x2e6bb(0x7a)],_0x4bc9dd=_0x12559c[_0x2e6bb(0x75)],_0x1c17d5=_0x4bc9dd===_0x2e6bb(0x76)?_0x2e6bb(0x8c):_0x4bc9dd===_0x2e6bb(0x94)?_0x2e6bb(0x94):_0x4bc9dd===_0x2e6bb(0x8d)?'TDX_PROFILE\x20env':_0x4bc9dd===_0x2e6bb(0x7d)?_0x2e6bb(0x7d):null,_0x3f5222=_0x3c1af1?a37_0x235a09[_0x2e6bb(0xa2)](_0x3c1af1):a37_0x235a09[_0x2e6bb(0xa4)](_0x2e6bb(0xa0)),_0x2f7880=_0x1c17d5?'\x20'+a37_0x235a09[_0x2e6bb(0xa4)](_0x2e6bb(0x9e)+_0x1c17d5+')'):'';console[_0x2e6bb(0xa1)](a37_0x235a09[_0x2e6bb(0x9c)](_0x2e6bb(0x82))+'\x20profile:\x20'+_0x3f5222+_0x2f7880+'\x20'+a37_0x235a09[_0x2e6bb(0xa4)]('(')+_0x2e6bb(0x8a)+a37_0x235a09[_0x2e6bb(0xa2)](_0xf407ef)+a37_0x235a09[_0x2e6bb(0xa4)](')'));const _0x1b2140=await resolveAPIKeyAsync(_0xf407ef,_0x3c1af1);if(_0x1b2140){const {source:_0x518192,isDeprecated:_0x33b327}=_0x1b2140,_0x39762b=_0x2e6bb(0x9d)+a37_0x235a09['cyan'](_0x518192);console['log'](_0x33b327?a37_0x235a09['yellow'](_0x39762b):_0x39762b);}else console['log'](a37_0x235a09[_0x2e6bb(0x92)](_0x2e6bb(0x7f)));let _0x252c8d=![];try{const _0x1895fb=await _0x236e06['jobs'][_0x2e6bb(0x83)]();console[_0x2e6bb(0xa1)](a37_0x235a09['green'](_0x2e6bb(0x8b))),console['log'](a37_0x235a09[_0x2e6bb(0x9c)](_0x2e6bb(0x7b))+'\x20'+a37_0x235a09[_0x2e6bb(0xa2)](_0x1895fb['email']));if(_0x1895fb[_0x2e6bb(0x7c)]||_0x1895fb[_0x2e6bb(0x77)]){const _0x991b23=[_0x1895fb['first_name'],_0x1895fb[_0x2e6bb(0x77)]][_0x2e6bb(0x7e)](Boolean)[_0x2e6bb(0x87)]('\x20');console['log'](a37_0x235a09['bold'](_0x2e6bb(0x8e))+'\x20'+_0x991b23);}_0x1895fb[_0x2e6bb(0x79)]&&console['log'](a37_0x235a09['bold'](_0x2e6bb(0x8f))+'\x20'+a37_0x235a09[_0x2e6bb(0x92)](_0x1895fb[_0x2e6bb(0x79)])),_0x252c8d=!![];}catch(_0x404a09){_0x404a09 instanceof HTTPClientError&&_0x404a09[_0x2e6bb(0x86)]===0x191?printAuthError(_0x404a09,!![],_0x3c1af1):console[_0x2e6bb(0x9b)](a37_0x235a09[_0x2e6bb(0x95)](_0x2e6bb(0x98)+(_0x404a09 instanceof Error?_0x404a09[_0x2e6bb(0x84)]:String(_0x404a09))));}return console[_0x2e6bb(0xa1)](),_0x12559c[_0x2e6bb(0x97)](),_0x252c8d?0x0:0x1;}}
@@ -1 +1 @@
1
- const a38_0x1fbf2c=a38_0x3c29;(function(_0x2235b8,_0x1ac560){const _0x5b74f4=a38_0x3c29,_0x2df4c1=_0x2235b8();while(!![]){try{const _0x5a9c3e=-parseInt(_0x5b74f4(0xc3))/0x1+parseInt(_0x5b74f4(0xc0))/0x2+-parseInt(_0x5b74f4(0xc4))/0x3*(-parseInt(_0x5b74f4(0xc6))/0x4)+parseInt(_0x5b74f4(0xcd))/0x5*(-parseInt(_0x5b74f4(0xb6))/0x6)+parseInt(_0x5b74f4(0xdc))/0x7*(parseInt(_0x5b74f4(0xb7))/0x8)+-parseInt(_0x5b74f4(0xce))/0x9*(-parseInt(_0x5b74f4(0xe6))/0xa)+-parseInt(_0x5b74f4(0xb9))/0xb;if(_0x5a9c3e===_0x1ac560)break;else _0x2df4c1['push'](_0x2df4c1['shift']());}catch(_0x11a5fa){_0x2df4c1['push'](_0x2df4c1['shift']());}}}(a38_0x3ddd,0xb367c));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';function a38_0x3c29(_0x1d1edd,_0x266b92){_0x1d1edd=_0x1d1edd-0xb5;const _0x3dddc7=a38_0x3ddd();let _0x3c2947=_0x3dddc7[_0x1d1edd];return _0x3c2947;}import{handleSDKOutput}from'../core/command-output.js';function a38_0x3ddd(){const _0x334245=['Error:\x20Pattern\x20\x27','13582173GzbfyR','message','tables','listTables','Database:\x20all','\x20\x20Or:\x20\x20tdx\x20tables\x20--database\x20','database','672250KtXEHy','\x20\x20Use:\x20tdx\x20tables\x20\x22','validate','854464APoded','108hjBDYj','\x20\x20tdx\x20tables\x20\x22mydb.*\x22\x20\x20\x20\x20\x20\x20\x20\x20->\x20all\x20tables\x20from\x20mydb','81412MwoAhK','description','length','table','Error:\x20','✔\x20Found\x20','error','35NdUyyn','45VuIhxt','\x20\x20tdx\x20tables\x20--in\x20mydb\x20\x20\x20\x20\x20\x20\x20->\x20all\x20tables\x20from\x20mydb','Or\x20use\x20--in\x20flag:','Database\x20pattern:\x20','limit','cause','Listing\x20tables...','\x27\x20may\x20not\x20exist\x20or\x20contains\x20no\x20tables','Database:\x20','Error:\x20Too\x20many\x20arguments.\x20Use\x20single\x20argument:','\x20\x20Cause:\x20','\x27\x20without\x20wildcards\x20would\x20search\x20for\x20tables\x20named\x20\x27','includes','\x20\x20tdx\x20tables\x20users\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20->\x20table\x20\x22users\x22\x20across\x20all\x20databases','63CYSJKR','\x20\x20tdx\x20tables\x20\x22*.user*\x22\x20\x20\x20\x20\x20\x20\x20->\x20tables\x20matching\x20user*\x20across\x20databases','name','Did\x20you\x20mean\x20to\x20list\x20all\x20tables\x20from\x20database\x20\x27','.*\x22','✖\x20No\x20tables\x20found','site','List\x20tables\x20in\x20a\x20database','verbose','\x20\x20tdx\x20tables\x20\x22mydb.users\x22\x20\x20\x20\x20->\x20table\x20\x22users\x22\x20in\x20database\x20mydb','2572580BrUqSC','execute','data','480846psOKDU','915480XgxpAf'];a38_0x3ddd=function(){return _0x334245;};return a38_0x3ddd();}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_0x1fbf2c(0xde)]=a38_0x1fbf2c(0xbb);[a38_0x1fbf2c(0xc7)]=a38_0x1fbf2c(0xe3);async[a38_0x1fbf2c(0xe7)](_0x14c83a){const _0x54bd50=a38_0x1fbf2c,{options:_0x383569,args:_0x56f53f,tdx:_0x4e57e2}=_0x14c83a;let _0x10cd86;if(_0x56f53f['length']===0x0)_0x10cd86={'database':undefined,'table':undefined,'original':''};else{if(_0x56f53f[_0x54bd50(0xc8)]===0x1)try{_0x10cd86=parseTableReference(_0x56f53f[0x0]);if(_0x10cd86[_0x54bd50(0xc9)]&&!_0x10cd86['database']&&!_0x10cd86[_0x54bd50(0xc9)][_0x54bd50(0xda)]('*')&&!_0x10cd86[_0x54bd50(0xc9)][_0x54bd50(0xda)]('?'))return console['error'](_0x54bd50(0xb8)+_0x56f53f[0x0]+'\x27\x20is\x20ambiguous.'),console['error'](_0x54bd50(0xdf)+_0x10cd86[_0x54bd50(0xc9)]+'\x27?'),console[_0x54bd50(0xcc)](_0x54bd50(0xc1)+_0x10cd86[_0x54bd50(0xc9)]+_0x54bd50(0xe0)),console['error']('\x20\x20Or:\x20\x20tdx\x20tables\x20--in\x20'+_0x10cd86[_0x54bd50(0xc9)]),console[_0x54bd50(0xcc)](_0x54bd50(0xbe)+_0x10cd86['table']),console[_0x54bd50(0xcc)](''),console[_0x54bd50(0xcc)]('Note:\x20\x27'+_0x56f53f[0x0]+_0x54bd50(0xd9)+_0x10cd86[_0x54bd50(0xc9)]+'\x27\x20across\x20all\x20databases.'),0x1;}catch(_0x4b6484){return console[_0x54bd50(0xcc)]('Error:\x20'+_0x4b6484[_0x54bd50(0xba)]),0x1;}else return console[_0x54bd50(0xcc)](_0x54bd50(0xd7)),console['error'](_0x54bd50(0xdb)),console[_0x54bd50(0xcc)](_0x54bd50(0xc5)),console[_0x54bd50(0xcc)](_0x54bd50(0xe5)),console[_0x54bd50(0xcc)](_0x54bd50(0xdd)),console[_0x54bd50(0xcc)](_0x54bd50(0xd0)),console[_0x54bd50(0xcc)](_0x54bd50(0xcf)),0x1;}const _0x5553db=_0x383569['database'];!_0x10cd86[_0x54bd50(0xbf)]&&_0x5553db&&(_0x10cd86[_0x54bd50(0xbf)]=_0x5553db);try{const _0x136cb7=_0x391cf3=>_0x391cf3&&(_0x391cf3[_0x54bd50(0xda)]('*')||_0x391cf3[_0x54bd50(0xda)]('?')),_0x51208e=_0x136cb7(_0x10cd86['database']);_0x383569[_0x54bd50(0xe4)]&&(console[_0x54bd50(0xcc)]('Site:\x20'+_0x383569[_0x54bd50(0xe2)]),_0x10cd86[_0x54bd50(0xbf)]?_0x51208e?console[_0x54bd50(0xcc)](_0x54bd50(0xd1)+_0x10cd86['database']):console[_0x54bd50(0xcc)](_0x54bd50(0xd6)+_0x10cd86[_0x54bd50(0xbf)]):console[_0x54bd50(0xcc)](_0x54bd50(0xbd)),_0x10cd86['table']&&console[_0x54bd50(0xcc)]('Table\x20pattern:\x20'+_0x10cd86[_0x54bd50(0xc9)]));const _0x313228=_0x10cd86['database']&&!_0x51208e?_0x10cd86[_0x54bd50(0xbf)]:undefined,_0x49c0a8=_0x51208e?_0x10cd86[_0x54bd50(0xbf)]:undefined,_0x555e62=_0x10cd86[_0x54bd50(0xc9)],_0x29629c=resolveLimit(_0x383569[_0x54bd50(0xd2)],DEFAULT_LISTING_LIMIT),_0x36bcc8=await withSpinner(_0x54bd50(0xd4),()=>_0x4e57e2['query'][_0x54bd50(0xbc)](_0x313228,_0x555e62,_0x49c0a8,_0x29629c),{'verbose':_0x383569[_0x54bd50(0xe4)]}),_0x49992f=_0x36bcc8[_0x54bd50(0xb5)];if(_0x49992f[_0x54bd50(0xc8)]===0x0&&_0x10cd86[_0x54bd50(0xbf)]&&!_0x51208e)return console[_0x54bd50(0xcc)](_0x54bd50(0xe1)),console['error']('Database\x20\x27'+_0x10cd86[_0x54bd50(0xbf)]+_0x54bd50(0xd5)),0x1;return console[_0x54bd50(0xcc)](_0x54bd50(0xcb)+_0x49992f[_0x54bd50(0xc8)]+'\x20table'+(_0x49992f[_0x54bd50(0xc8)]!==0x1?'s':'')),await handleSDKOutput(_0x49992f,{..._0x383569,'limit':_0x29629c}),0x0;}catch(_0x4fa2db){if(_0x4fa2db instanceof SDKError)return console[_0x54bd50(0xcc)](_0x54bd50(0xca)+_0x4fa2db[_0x54bd50(0xba)]),_0x4fa2db['cause']&&console['error'](_0x54bd50(0xd8)+_0x4fa2db[_0x54bd50(0xd3)]),0x1;throw _0x4fa2db;}}[a38_0x1fbf2c(0xc2)](_0x4cea84){return undefined;}}
1
+ function a38_0x483a(_0x3678d5,_0x1f203d){_0x3678d5=_0x3678d5-0xeb;const _0x4edeb4=a38_0x4ede();let _0x483ad3=_0x4edeb4[_0x3678d5];return _0x483ad3;}const a38_0x25d862=a38_0x483a;(function(_0x372d20,_0x9a343){const _0x13690c=a38_0x483a,_0x3fb072=_0x372d20();while(!![]){try{const _0x301aaa=parseInt(_0x13690c(0x112))/0x1*(parseInt(_0x13690c(0x10f))/0x2)+-parseInt(_0x13690c(0xf0))/0x3*(-parseInt(_0x13690c(0xf1))/0x4)+-parseInt(_0x13690c(0xf7))/0x5*(parseInt(_0x13690c(0xf2))/0x6)+-parseInt(_0x13690c(0xfe))/0x7+parseInt(_0x13690c(0x11c))/0x8+parseInt(_0x13690c(0x110))/0x9*(parseInt(_0x13690c(0xf9))/0xa)+parseInt(_0x13690c(0xfd))/0xb*(parseInt(_0x13690c(0xf5))/0xc);if(_0x301aaa===_0x9a343)break;else _0x3fb072['push'](_0x3fb072['shift']());}catch(_0x2c1202){_0x3fb072['push'](_0x3fb072['shift']());}}}(a38_0x4ede,0x64cb2));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleSDKOutput}from'../core/command-output.js';function a38_0x4ede(){const _0x462253=['data','12lViukb','Database\x20\x27','135YAJjeJ','\x20\x20tdx\x20tables\x20users\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20->\x20table\x20\x22users\x22\x20across\x20all\x20databases','20WCWqNK','Or\x20use\x20--in\x20flag:','Note:\x20\x27','verbose','586883qYYpbx','3935750YLdDgl','List\x20tables\x20in\x20a\x20database','\x20\x20Cause:\x20','Database\x20pattern:\x20','table','limit','\x20\x20Or:\x20\x20tdx\x20tables\x20--database\x20','\x27\x20is\x20ambiguous.','site','cause','\x20\x20tdx\x20tables\x20\x22mydb.users\x22\x20\x20\x20\x20->\x20table\x20\x22users\x22\x20in\x20database\x20mydb','length','Error:\x20','description','\x20\x20Use:\x20tdx\x20tables\x20\x22','Database:\x20all','error','6634WKFsnL','389169RQNYEh','Table\x20pattern:\x20','13lTsVxl','listTables','\x20\x20Or:\x20\x20tdx\x20tables\x20--in\x20','validate','includes','database','\x27\x20across\x20all\x20databases.','query','message','\x27\x20without\x20wildcards\x20would\x20search\x20for\x20tables\x20named\x20\x27','4934368UCmdxh','Error:\x20Pattern\x20\x27','name','Site:\x20','Did\x20you\x20mean\x20to\x20list\x20all\x20tables\x20from\x20database\x20\x27','\x20\x20tdx\x20tables\x20\x22*.user*\x22\x20\x20\x20\x20\x20\x20\x20->\x20tables\x20matching\x20user*\x20across\x20databases','Database:\x20','\x27\x20may\x20not\x20exist\x20or\x20contains\x20no\x20tables','execute','\x20\x20tdx\x20tables\x20\x22mydb.*\x22\x20\x20\x20\x20\x20\x20\x20\x20->\x20all\x20tables\x20from\x20mydb','4485xbaEnu','1084foYPTu','51066DbuvNC','Error:\x20Too\x20many\x20arguments.\x20Use\x20single\x20argument:'];a38_0x4ede=function(){return _0x462253;};return a38_0x4ede();}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_0x25d862(0x11e)]='tables';[a38_0x25d862(0x10b)]=a38_0x25d862(0xff);async[a38_0x25d862(0xee)](_0x5046d4){const _0x58d828=a38_0x25d862,{options:_0x205366,args:_0x354a75,tdx:_0x44f447}=_0x5046d4;let _0x48d84a;if(_0x354a75[_0x58d828(0x109)]===0x0)_0x48d84a={'database':undefined,'table':undefined,'original':''};else{if(_0x354a75[_0x58d828(0x109)]===0x1)try{_0x48d84a=parseTableReference(_0x354a75[0x0]);if(_0x48d84a[_0x58d828(0x102)]&&!_0x48d84a[_0x58d828(0x117)]&&!_0x48d84a[_0x58d828(0x102)][_0x58d828(0x116)]('*')&&!_0x48d84a[_0x58d828(0x102)][_0x58d828(0x116)]('?'))return console['error'](_0x58d828(0x11d)+_0x354a75[0x0]+_0x58d828(0x105)),console[_0x58d828(0x10e)](_0x58d828(0x120)+_0x48d84a[_0x58d828(0x102)]+'\x27?'),console[_0x58d828(0x10e)](_0x58d828(0x10c)+_0x48d84a[_0x58d828(0x102)]+'.*\x22'),console[_0x58d828(0x10e)](_0x58d828(0x114)+_0x48d84a[_0x58d828(0x102)]),console['error'](_0x58d828(0x104)+_0x48d84a[_0x58d828(0x102)]),console[_0x58d828(0x10e)](''),console[_0x58d828(0x10e)](_0x58d828(0xfb)+_0x354a75[0x0]+_0x58d828(0x11b)+_0x48d84a[_0x58d828(0x102)]+_0x58d828(0x118)),0x1;}catch(_0x3bd5b0){return console['error'](_0x58d828(0x10a)+_0x3bd5b0[_0x58d828(0x11a)]),0x1;}else return console[_0x58d828(0x10e)](_0x58d828(0xf3)),console['error'](_0x58d828(0xf8)),console[_0x58d828(0x10e)](_0x58d828(0xef)),console['error'](_0x58d828(0x108)),console[_0x58d828(0x10e)](_0x58d828(0xeb)),console[_0x58d828(0x10e)](_0x58d828(0xfa)),console['error']('\x20\x20tdx\x20tables\x20--in\x20mydb\x20\x20\x20\x20\x20\x20\x20->\x20all\x20tables\x20from\x20mydb'),0x1;}const _0x54eb9b=_0x205366[_0x58d828(0x117)];!_0x48d84a['database']&&_0x54eb9b&&(_0x48d84a[_0x58d828(0x117)]=_0x54eb9b);try{const _0x278928=_0x5b6bff=>_0x5b6bff&&(_0x5b6bff[_0x58d828(0x116)]('*')||_0x5b6bff[_0x58d828(0x116)]('?')),_0x5bed4d=_0x278928(_0x48d84a[_0x58d828(0x117)]);_0x205366[_0x58d828(0xfc)]&&(console[_0x58d828(0x10e)](_0x58d828(0x11f)+_0x205366[_0x58d828(0x106)]),_0x48d84a[_0x58d828(0x117)]?_0x5bed4d?console['error'](_0x58d828(0x101)+_0x48d84a[_0x58d828(0x117)]):console[_0x58d828(0x10e)](_0x58d828(0xec)+_0x48d84a[_0x58d828(0x117)]):console[_0x58d828(0x10e)](_0x58d828(0x10d)),_0x48d84a[_0x58d828(0x102)]&&console['error'](_0x58d828(0x111)+_0x48d84a['table']));const _0x4088a2=_0x48d84a[_0x58d828(0x117)]&&!_0x5bed4d?_0x48d84a[_0x58d828(0x117)]:undefined,_0x5baaa6=_0x5bed4d?_0x48d84a['database']:undefined,_0x4c5c53=_0x48d84a[_0x58d828(0x102)],_0x1e37bc=resolveLimit(_0x205366[_0x58d828(0x103)],DEFAULT_LISTING_LIMIT),_0x587b0f=await withSpinner('Listing\x20tables...',()=>_0x44f447[_0x58d828(0x119)][_0x58d828(0x113)](_0x4088a2,_0x4c5c53,_0x5baaa6,_0x1e37bc),{'verbose':_0x205366[_0x58d828(0xfc)]}),_0x5bdb94=_0x587b0f[_0x58d828(0xf4)];if(_0x5bdb94[_0x58d828(0x109)]===0x0&&_0x48d84a[_0x58d828(0x117)]&&!_0x5bed4d)return console['error']('✖\x20No\x20tables\x20found'),console[_0x58d828(0x10e)](_0x58d828(0xf6)+_0x48d84a[_0x58d828(0x117)]+_0x58d828(0xed)),0x1;return console[_0x58d828(0x10e)]('✔\x20Found\x20'+_0x5bdb94[_0x58d828(0x109)]+'\x20table'+(_0x5bdb94['length']!==0x1?'s':'')),await handleSDKOutput(_0x5bdb94,{..._0x205366,'limit':_0x1e37bc}),0x0;}catch(_0x4d3b19){if(_0x4d3b19 instanceof SDKError)return console[_0x58d828(0x10e)](_0x58d828(0x10a)+_0x4d3b19['message']),_0x4d3b19[_0x58d828(0x107)]&&console[_0x58d828(0x10e)](_0x58d828(0x100)+_0x4d3b19[_0x58d828(0x107)]),0x1;throw _0x4d3b19;}}[a38_0x25d862(0x115)](_0x30fe41){return undefined;}}
@@ -1 +1 @@
1
- const a39_0x496c25=a39_0x3fa9;function a39_0x1012(){const _0x36c8d8=['dim','Invalid\x20resource:\x20','tdx.json','green','name','join','description','agent','profile','database','default','.\x20Must\x20be\x20one\x20of:\x20','527704pcNqpb','parent_segment','engage_workspace','Default\x20site\x20','Usage:\x20tdx\x20unset\x20<resource>\x0a','Clear\x20session-level\x20or\x20default\x20context\x20values','\x0aRun\x20\x27tdx\x20unset\x20--help\x27\x20for\x20more\x20options','Session\x20','6AXWgLG','validate','\x20\x20\x20\x20\x20\x20\x20tdx\x20unset\x20--default\x20<resource>\x20\x20#\x20Clear\x20default\x20from\x20config\x0a','log','unset','site','391081BJFhbC','llm_project','cleared','214235XuWQDh','length','4788847xATMxI','llm_agent','\x0aUpdated:\x20','session','includes','\x0aResources:\x20site,\x20database,\x20parent_segment,\x20llm_project,\x20agent,\x20profile,\x20engage_workspace\x0a','1468004vepBel','5446848Hsznsz','--default\x20can\x20only\x20be\x20used\x20with\x20\x27site\x27\x20or\x20\x27profile\x27.\x20Other\x20resources\x20are\x20session-level\x20only.','15702264SVGOOi','message','78cJOSQs'];a39_0x1012=function(){return _0x36c8d8;};return a39_0x1012();}(function(_0x2919bf,_0x40c73b){const _0x1a6e99=a39_0x3fa9,_0x47b84e=_0x2919bf();while(!![]){try{const _0x55ebd7=-parseInt(_0x1a6e99(0x207))/0x1+parseInt(_0x1a6e99(0x1e7))/0x2+parseInt(_0x1a6e99(0x201))/0x3*(parseInt(_0x1a6e99(0x1f9))/0x4)+-parseInt(_0x1a6e99(0x1df))/0x5*(parseInt(_0x1a6e99(0x1ec))/0x6)+-parseInt(_0x1a6e99(0x1e1))/0x7+-parseInt(_0x1a6e99(0x1e8))/0x8+parseInt(_0x1a6e99(0x1ea))/0x9;if(_0x55ebd7===_0x40c73b)break;else _0x47b84e['push'](_0x47b84e['shift']());}catch(_0x25227e){_0x47b84e['push'](_0x47b84e['shift']());}}}(a39_0x1012,0x68da9));import{BaseCommand}from'./command.js';import{getSessionID,cleanExpiredSessions,clearSessionContextField}from'../core/session.js';import{clearDefaultSiteFromUserConfig,clearActiveProfileFromUserConfig}from'../core/profile.js';function a39_0x3fa9(_0x54eba2,_0x39e97d){_0x54eba2=_0x54eba2-0x1de;const _0x1012f7=a39_0x1012();let _0x3fa90a=_0x1012f7[_0x54eba2];return _0x3fa90a;}import{getConfigDir}from'../core/config.js';import a39_0x124e45 from'chalk';import*as a39_0x2494c5 from'node:path';export class UnsetCommand extends BaseCommand{[a39_0x496c25(0x1f1)]=a39_0x496c25(0x205);[a39_0x496c25(0x1f3)]=a39_0x496c25(0x1fe);[a39_0x496c25(0x202)](_0x2511cc){const _0x370487=a39_0x496c25,{args:_0x172274,options:_0x2839a9}=_0x2511cc,_0xdc826a=_0x2839a9[_0x370487(0x1f7)];if(_0x172274[_0x370487(0x1e0)]===0x0)return _0x370487(0x1fd)+_0x370487(0x203)+_0x370487(0x1e6)+_0x370487(0x1ff);const _0x48accf=_0x172274[0x0],_0x354445=[_0x370487(0x206),'database',_0x370487(0x1fa),_0x370487(0x208),_0x370487(0x1f4),_0x370487(0x1f5),_0x370487(0x1fb)];if(!_0x354445[_0x370487(0x1e5)](_0x48accf))return _0x370487(0x1ee)+_0x48accf+_0x370487(0x1f8)+_0x354445[_0x370487(0x1f2)](',\x20');if(_0xdc826a&&_0x48accf!==_0x370487(0x206)&&_0x48accf!==_0x370487(0x1f5))return _0x370487(0x1e9);return undefined;}async['execute'](_0x569a33){const _0x189d54=a39_0x496c25,{args:_0x3202db,options:_0xb47ef0}=_0x569a33,_0x49a5c9=_0xb47ef0[_0x189d54(0x1f7)];cleanExpiredSessions();try{const _0x1413c7=_0x3202db[0x0],_0x38b775=a39_0x2494c5[_0x189d54(0x1f2)](getConfigDir(),_0x189d54(0x1ef));if(_0x49a5c9){if(_0x1413c7===_0x189d54(0x206))return clearDefaultSiteFromUserConfig(),console[_0x189d54(0x204)](_0x189d54(0x1fc)+a39_0x124e45['green'](_0x189d54(0x1de))),console[_0x189d54(0x204)](a39_0x124e45[_0x189d54(0x1ed)](_0x189d54(0x1e3)+_0x38b775)),0x0;if(_0x1413c7===_0x189d54(0x1f5))return clearActiveProfileFromUserConfig(),console[_0x189d54(0x204)]('Default\x20profile\x20'+a39_0x124e45[_0x189d54(0x1f0)]('cleared')),console[_0x189d54(0x204)](a39_0x124e45[_0x189d54(0x1ed)]('\x0aUpdated:\x20'+_0x38b775)),0x0;}const _0x5150ab=getSessionID(_0xb47ef0[_0x189d54(0x1e4)]),_0x869e98={'site':'site','database':_0x189d54(0x1f6),'parent_segment':'parent_segment','llm_project':_0x189d54(0x208),'agent':_0x189d54(0x1e2),'profile':_0x189d54(0x1f5),'engage_workspace':_0x189d54(0x1fb)},_0x5df22a=_0x869e98[_0x1413c7];return _0x5df22a&&(clearSessionContextField(_0x5df22a,_0xb47ef0[_0x189d54(0x1e4)]),console[_0x189d54(0x204)](_0x189d54(0x200)+_0x1413c7+'\x20'+a39_0x124e45[_0x189d54(0x1f0)](_0x189d54(0x1de))+'\x20'+a39_0x124e45['dim']('(session:\x20'+_0x5150ab+')'))),0x0;}catch(_0x3ed5b9){return _0x3ed5b9 instanceof Error&&console['error']('Error:\x20'+_0x3ed5b9[_0x189d54(0x1eb)]),0x1;}}}
1
+ const a39_0x24d139=a39_0xbd62;function a39_0x2dd0(){const _0x77ce55=['name','Default\x20profile\x20','238QgoTCq','execute','database','Invalid\x20resource:\x20','engage_workspace','\x0aUpdated:\x20','9333605zvqtwA','parent_segment','1396894wguTJg','message','Session\x20','63161988ygYOLE','18jOulps','default','16CZZcZq','join','site','cleared','Clear\x20session-level\x20or\x20default\x20context\x20values','tdx.json','validate','\x0aResources:\x20site,\x20database,\x20parent_segment,\x20llm_project,\x20agent,\x20profile,\x20engage_workspace\x0a','60iSeKrI','Default\x20site\x20','3103488bLOFxV','190479Fiexoz','17688xuizBZ','\x20\x20\x20\x20\x20\x20\x20tdx\x20unset\x20--default\x20<resource>\x20\x20#\x20Clear\x20default\x20from\x20config\x0a','unset','4swxmzP','llm_agent','Error:\x20','session','33954gOQlaf','dim','length','(session:\x20','profile','log','includes','.\x20Must\x20be\x20one\x20of:\x20','green'];a39_0x2dd0=function(){return _0x77ce55;};return a39_0x2dd0();}function a39_0xbd62(_0x409c23,_0x598ba1){_0x409c23=_0x409c23-0xfe;const _0x2dd0fe=a39_0x2dd0();let _0xbd6224=_0x2dd0fe[_0x409c23];return _0xbd6224;}(function(_0xace20a,_0x151124){const _0xfb6cee=a39_0xbd62,_0x44281d=_0xace20a();while(!![]){try{const _0x14ae34=-parseInt(_0xfb6cee(0x11d))/0x1+parseInt(_0xfb6cee(0x121))/0x2*(-parseInt(_0xfb6cee(0x102))/0x3)+parseInt(_0xfb6cee(0x106))/0x4*(-parseInt(_0xfb6cee(0x11b))/0x5)+parseInt(_0xfb6cee(0x10a))/0x6*(parseInt(_0xfb6cee(0x115))/0x7)+-parseInt(_0xfb6cee(0x123))/0x8*(parseInt(_0xfb6cee(0x101))/0x9)+-parseInt(_0xfb6cee(0xff))/0xa*(-parseInt(_0xfb6cee(0x103))/0xb)+parseInt(_0xfb6cee(0x120))/0xc;if(_0x14ae34===_0x151124)break;else _0x44281d['push'](_0x44281d['shift']());}catch(_0x31f746){_0x44281d['push'](_0x44281d['shift']());}}}(a39_0x2dd0,0xe5b25));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_0xaea830 from'chalk';import*as a39_0x58b16d from'node:path';export class UnsetCommand extends BaseCommand{[a39_0x24d139(0x113)]=a39_0x24d139(0x105);['description']=a39_0x24d139(0x127);[a39_0x24d139(0x129)](_0x7d7488){const _0xff73a7=a39_0x24d139,{args:_0x4d875c,options:_0x2147c8}=_0x7d7488,_0x27ad29=_0x2147c8[_0xff73a7(0x122)];if(_0x4d875c[_0xff73a7(0x10c)]===0x0)return'Usage:\x20tdx\x20unset\x20<resource>\x0a'+_0xff73a7(0x104)+_0xff73a7(0xfe)+'\x0aRun\x20\x27tdx\x20unset\x20--help\x27\x20for\x20more\x20options';const _0x41e531=_0x4d875c[0x0],_0x1607e5=[_0xff73a7(0x125),_0xff73a7(0x117),_0xff73a7(0x11c),'llm_project','agent','profile',_0xff73a7(0x119)];if(!_0x1607e5[_0xff73a7(0x110)](_0x41e531))return _0xff73a7(0x118)+_0x41e531+_0xff73a7(0x111)+_0x1607e5[_0xff73a7(0x124)](',\x20');if(_0x27ad29&&_0x41e531!==_0xff73a7(0x125)&&_0x41e531!==_0xff73a7(0x10e))return'--default\x20can\x20only\x20be\x20used\x20with\x20\x27site\x27\x20or\x20\x27profile\x27.\x20Other\x20resources\x20are\x20session-level\x20only.';return undefined;}async[a39_0x24d139(0x116)](_0x36f15c){const _0x1bd41a=a39_0x24d139,{args:_0x507b92,options:_0x3ed84f}=_0x36f15c,_0x62ac0c=_0x3ed84f[_0x1bd41a(0x122)];cleanExpiredSessions();try{const _0x4e86f4=_0x507b92[0x0],_0x573d74=a39_0x58b16d[_0x1bd41a(0x124)](getConfigDir(),_0x1bd41a(0x128));if(_0x62ac0c){if(_0x4e86f4===_0x1bd41a(0x125))return clearDefaultSiteFromUserConfig(),console[_0x1bd41a(0x10f)](_0x1bd41a(0x100)+a39_0xaea830[_0x1bd41a(0x112)](_0x1bd41a(0x126))),console[_0x1bd41a(0x10f)](a39_0xaea830['dim'](_0x1bd41a(0x11a)+_0x573d74)),0x0;if(_0x4e86f4==='profile')return clearActiveProfileFromUserConfig(),console['log'](_0x1bd41a(0x114)+a39_0xaea830[_0x1bd41a(0x112)](_0x1bd41a(0x126))),console[_0x1bd41a(0x10f)](a39_0xaea830[_0x1bd41a(0x10b)](_0x1bd41a(0x11a)+_0x573d74)),0x0;}const _0x422254=getSessionID(_0x3ed84f[_0x1bd41a(0x109)]),_0x521272={'site':'site','database':_0x1bd41a(0x117),'parent_segment':_0x1bd41a(0x11c),'llm_project':'llm_project','agent':_0x1bd41a(0x107),'profile':_0x1bd41a(0x10e),'engage_workspace':'engage_workspace'},_0x3f5e8b=_0x521272[_0x4e86f4];return _0x3f5e8b&&(clearSessionContextField(_0x3f5e8b,_0x3ed84f[_0x1bd41a(0x109)]),console[_0x1bd41a(0x10f)](_0x1bd41a(0x11f)+_0x4e86f4+'\x20'+a39_0xaea830['green'](_0x1bd41a(0x126))+'\x20'+a39_0xaea830[_0x1bd41a(0x10b)](_0x1bd41a(0x10d)+_0x422254+')'))),0x0;}catch(_0x2705c1){return _0x2705c1 instanceof Error&&console['error'](_0x1bd41a(0x108)+_0x2705c1[_0x1bd41a(0x11e)]),0x1;}}}
@@ -1 +1 @@
1
- const a40_0x5062b8=a40_0x3763;(function(_0x2a455d,_0x45dc6d){const _0x40ca88=a40_0x3763,_0x359df8=_0x2a455d();while(!![]){try{const _0x51f960=-parseInt(_0x40ca88(0x1df))/0x1*(parseInt(_0x40ca88(0x228))/0x2)+parseInt(_0x40ca88(0x21b))/0x3*(parseInt(_0x40ca88(0x205))/0x4)+-parseInt(_0x40ca88(0x21d))/0x5*(-parseInt(_0x40ca88(0x206))/0x6)+parseInt(_0x40ca88(0x1e0))/0x7+parseInt(_0x40ca88(0x1f3))/0x8+-parseInt(_0x40ca88(0x1fe))/0x9*(parseInt(_0x40ca88(0x22a))/0xa)+-parseInt(_0x40ca88(0x209))/0xb;if(_0x51f960===_0x45dc6d)break;else _0x359df8['push'](_0x359df8['shift']());}catch(_0x1dd7a8){_0x359df8['push'](_0x359df8['shift']());}}}(a40_0x3fce,0xc33e7));function a40_0x3fce(){const _0x260385=['site','Set\x20session-level\x20context','Session\x20parent_segment\x20set\x20to:\x20','display','\x0aUse\x20\x27tdx\x20profiles\x27\x20to\x20see\x20available\x20profiles','Session\x20engage_workspace\x20set\x20to:\x20','llm_agent','release_channel\x20requires\x20--default.\x20Usage:\x20tdx\x20use\x20--default\x20release_channel\x20<stable|next>','Default\x20profile\x20set\x20to:\x20','name','use','engage_workspace','debug','next','clear','279YlcmNw','parent_segment','5XtOcdF','Session\x20site\x20set\x20to:\x20','cleared','join','\x0aSet\x20context:\x20tdx\x20use\x20<resource>\x20<value>','length','Resources:\x20site,\x20database,\x20parent_segment,\x20llm_project,\x20agent,\x20profile,\x20engage_workspace,\x20release_channel','\x0aUpdate\x20notifications\x20will\x20now\x20check\x20the\x20@next\x20channel.','Error:\x20','session','displayWithSources','24140CAfueU','\x27\x20does\x20not\x20exist','8087510WctjeS','\x27\x20to\x20save\x20permanently','117tThdol','10705212gPSGpz','agent','profile','execute','\x0aTip:\x20Use\x20\x27tdx\x20use\x20--clear\x27\x20to\x20clear\x20session\x20overrides','llm_project','\x0aRun\x20\x27tdx\x20use\x20--help\x27\x20for\x20more\x20options','stable','dim','\x0aUpdate\x20notifications\x20will\x20check\x20the\x20@latest\x20(stable)\x20channel.','.\x20Must\x20be\x20\x27stable\x27\x20or\x20\x27next\x27.','\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20--clear\x20\x20\x20\x20\x20\x20#\x20Clear\x20session\x20context\x0a','Use\x20--default\x20with\x20site,\x20profile,\x20or\x20release_channel\x20to\x20save\x20permanently','\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20--default\x20release_channel\x20<stable|next>\x20\x20#\x20Set\x20release\x20channel\x0a','database','(session:\x20','\x0aTip:\x20Use\x20\x27tdx\x20use\x20--default\x20site\x20','.\x20Must\x20be\x20one\x20of:\x20','\x0aTip:\x20Use\x20\x27tdx\x20use\x20--default\x20profile\x20','9797792cNAoeW','Session\x20agent\x20set\x20to:\x20','\x0aSaved\x20to:\x20','Session\x20profile\x20set\x20to:\x20','\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20--default\x20profile\x20<value>\x20\x20#\x20Save\x20default\x20profile\x20to\x20config\x0a','description','error','Invalid\x20resource:\x20','green','message','Usage:\x20tdx\x20use\x20<resource>\x20<value>\x0a','9alqtwQ','includes','\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','Invalid\x20release\x20channel:\x20','Install\x20the\x20latest\x20next\x20version:\x20npm\x20install\x20-g\x20@treasuredata/tdx@next','tdx.json','Error:\x20Profile\x20\x27','39524LrHhfS','6386532MTPQHQ','release_channel','validate','18884085CeuomR','log','Session\x20context\x20'];a40_0x3fce=function(){return _0x260385;};return a40_0x3fce();}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';function a40_0x3763(_0x9d140e,_0x129664){_0x9d140e=_0x9d140e-0x1df;const _0x3fced1=a40_0x3fce();let _0x376322=_0x3fced1[_0x9d140e];return _0x376322;}import{parseAgentRef}from'../sdk/agent/agent-ref-parser.js';import{getConfigDir,saveReleaseChannel}from'../core/config.js';import a40_0xa943d3 from'chalk';import*as a40_0x1e7ee5 from'node:path';export class UseCommand extends BaseCommand{[a40_0x5062b8(0x215)]=a40_0x5062b8(0x216);[a40_0x5062b8(0x1f8)]=a40_0x5062b8(0x20d);[a40_0x5062b8(0x208)](_0x58fa33){const _0x4be9b4=a40_0x5062b8,{args:_0x3bf49a,options:_0xf3e53c}=_0x58fa33,_0x1789a3=_0xf3e53c['default'];if(_0x3bf49a[_0x4be9b4(0x222)]===0x0)return undefined;if(_0x3bf49a[_0x4be9b4(0x222)]===0x1)return _0x4be9b4(0x1fd)+_0x4be9b4(0x200)+_0x4be9b4(0x1eb)+'\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20--default\x20site\x20<value>\x20\x20\x20\x20\x20#\x20Save\x20default\x20site\x20to\x20config\x0a'+_0x4be9b4(0x1f7)+_0x4be9b4(0x1ed)+'\x0aResources:\x20site,\x20database,\x20parent_segment,\x20llm_project,\x20agent,\x20profile,\x20engage_workspace,\x20release_channel\x0a'+_0x4be9b4(0x1e6);const _0x1cec16=_0x3bf49a[0x0],_0x43c4ea=[_0x4be9b4(0x20c),_0x4be9b4(0x1ee),_0x4be9b4(0x21c),_0x4be9b4(0x1e5),'agent',_0x4be9b4(0x1e2),_0x4be9b4(0x217),_0x4be9b4(0x207)];if(!_0x43c4ea[_0x4be9b4(0x1ff)](_0x1cec16))return _0x4be9b4(0x1fa)+_0x1cec16+_0x4be9b4(0x1f1)+_0x43c4ea[_0x4be9b4(0x220)](',\x20');if(_0x1789a3&&_0x1cec16!==_0x4be9b4(0x20c)&&_0x1cec16!=='profile'&&_0x1cec16!=='release_channel')return'--default\x20can\x20only\x20be\x20used\x20with\x20\x27site\x27,\x20\x27profile\x27,\x20or\x20\x27release_channel\x27.\x20Other\x20resources\x20are\x20session-level\x20only.';if(_0x1cec16===_0x4be9b4(0x207)&&!_0x1789a3)return _0x4be9b4(0x213);if(_0x1cec16===_0x4be9b4(0x207)){const _0x13fd65=_0x3bf49a[0x1];if(_0x13fd65!==_0x4be9b4(0x1e7)&&_0x13fd65!==_0x4be9b4(0x219))return _0x4be9b4(0x201)+_0x13fd65+_0x4be9b4(0x1ea);}return undefined;}async[a40_0x5062b8(0x1e3)](_0x5e7b49){const _0x3890da=a40_0x5062b8,{args:_0xab7cc2,options:_0x2f9cf2}=_0x5e7b49,_0x419f09=_0x2f9cf2[_0x3890da(0x218)],_0xdcfbf=_0x2f9cf2[_0x3890da(0x21a)],_0x77403f=_0x2f9cf2['default'];cleanExpiredSessions();try{if(_0xdcfbf){clearSessionContext(_0x2f9cf2['session']);const _0x1a47a7=getSessionID(_0x2f9cf2[_0x3890da(0x226)]);return console[_0x3890da(0x20a)](_0x3890da(0x20b)+a40_0xa943d3[_0x3890da(0x1fb)](_0x3890da(0x21f))+'\x20'+a40_0xa943d3[_0x3890da(0x1e8)](_0x3890da(0x1ef)+_0x1a47a7+')')),0x0;}if(_0xab7cc2[_0x3890da(0x222)]===0x0){const _0x5b9dc5=new GlobalContext(_0x2f9cf2);return _0x419f09?_0x5b9dc5[_0x3890da(0x227)]():_0x5b9dc5[_0x3890da(0x20f)](),console['log'](a40_0xa943d3['dim'](_0x3890da(0x221))),console[_0x3890da(0x20a)](a40_0xa943d3[_0x3890da(0x1e8)](_0x3890da(0x223))),console['log'](a40_0xa943d3[_0x3890da(0x1e8)](_0x3890da(0x1ec))),0x0;}const _0x1517f2=_0xab7cc2[0x0],_0x327352=_0xab7cc2[0x1],_0xa1e3f2=a40_0x1e7ee5['join'](getConfigDir(),_0x3890da(0x203));if(_0x77403f){if(_0x1517f2===_0x3890da(0x20c))return saveDefaultSiteToUserConfig(_0x327352),console['log']('Default\x20site\x20set\x20to:\x20'+a40_0xa943d3[_0x3890da(0x1fb)](_0x327352)),console[_0x3890da(0x20a)](a40_0xa943d3[_0x3890da(0x1e8)](_0x3890da(0x1f5)+_0xa1e3f2)),0x0;if(_0x1517f2===_0x3890da(0x1e2)){if(!profileExists(_0x327352))return console[_0x3890da(0x1f9)](_0x3890da(0x204)+_0x327352+'\x27\x20does\x20not\x20exist'),console['error'](_0x3890da(0x210)),0x1;return saveActiveProfileToUserConfig(_0x327352),console['log'](_0x3890da(0x214)+a40_0xa943d3[_0x3890da(0x1fb)](_0x327352)),console[_0x3890da(0x20a)](a40_0xa943d3[_0x3890da(0x1e8)](_0x3890da(0x1f5)+_0xa1e3f2)),0x0;}if(_0x1517f2==='release_channel')return saveReleaseChannel(_0x327352),console[_0x3890da(0x20a)]('Release\x20channel\x20set\x20to:\x20'+a40_0xa943d3[_0x3890da(0x1fb)](_0x327352)),console['log'](a40_0xa943d3[_0x3890da(0x1e8)](_0x3890da(0x1f5)+_0xa1e3f2)),_0x327352===_0x3890da(0x219)?(console[_0x3890da(0x20a)](a40_0xa943d3[_0x3890da(0x1e8)](_0x3890da(0x224))),console['log'](a40_0xa943d3[_0x3890da(0x1e8)](_0x3890da(0x202)))):console[_0x3890da(0x20a)](a40_0xa943d3[_0x3890da(0x1e8)](_0x3890da(0x1e9))),0x0;}if(_0x1517f2==='site'){const _0x41d6a2=getSessionID(_0x2f9cf2[_0x3890da(0x226)]);return saveSessionContext({'site':_0x327352},_0x2f9cf2[_0x3890da(0x226)]),console[_0x3890da(0x20a)](_0x3890da(0x21e)+a40_0xa943d3['green'](_0x327352)+'\x20'+a40_0xa943d3[_0x3890da(0x1e8)](_0x3890da(0x1ef)+_0x41d6a2+')')),console[_0x3890da(0x20a)](a40_0xa943d3[_0x3890da(0x1e8)](_0x3890da(0x1f0)+_0x327352+_0x3890da(0x22b))),0x0;}if(_0x1517f2===_0x3890da(0x1e2)){if(!profileExists(_0x327352))return console['error'](_0x3890da(0x204)+_0x327352+_0x3890da(0x229)),console['error'](_0x3890da(0x210)),0x1;const _0x105b39=getSessionID(_0x2f9cf2['session']);return saveSessionContext({'profile':_0x327352},_0x2f9cf2['session']),console['log'](_0x3890da(0x1f6)+a40_0xa943d3[_0x3890da(0x1fb)](_0x327352)+'\x20'+a40_0xa943d3[_0x3890da(0x1e8)](_0x3890da(0x1ef)+_0x105b39+')')),console[_0x3890da(0x20a)](a40_0xa943d3[_0x3890da(0x1e8)](_0x3890da(0x1f2)+_0x327352+'\x27\x20to\x20save\x20permanently')),0x0;}const _0x359555={},_0x17a8dc=getSessionID(_0x2f9cf2[_0x3890da(0x226)]);switch(_0x1517f2){case _0x3890da(0x1ee):_0x359555[_0x3890da(0x1ee)]=_0x327352,console[_0x3890da(0x20a)]('Session\x20database\x20set\x20to:\x20'+a40_0xa943d3['green'](_0x327352)+'\x20'+a40_0xa943d3[_0x3890da(0x1e8)](_0x3890da(0x1ef)+_0x17a8dc+')'));break;case _0x3890da(0x21c):_0x359555['parent_segment']=_0x327352,console[_0x3890da(0x20a)](_0x3890da(0x20e)+a40_0xa943d3[_0x3890da(0x1fb)](_0x327352)+'\x20'+a40_0xa943d3[_0x3890da(0x1e8)](_0x3890da(0x1ef)+_0x17a8dc+')'));break;case'llm_project':_0x359555['llm_project']=_0x327352,console[_0x3890da(0x20a)]('Session\x20llm_project\x20set\x20to:\x20'+a40_0xa943d3['green'](_0x327352)+'\x20'+a40_0xa943d3[_0x3890da(0x1e8)](_0x3890da(0x1ef)+_0x17a8dc+')'));break;case _0x3890da(0x1e1):{const {projectName:_0xbdf08f,agentName:_0x2332a3}=parseAgentRef(_0x327352);_0x2332a3?(_0x359555[_0x3890da(0x1e5)]=_0xbdf08f,_0x359555['llm_agent']=_0x2332a3,console[_0x3890da(0x20a)]('Session\x20llm_project\x20set\x20to:\x20'+a40_0xa943d3[_0x3890da(0x1fb)](_0xbdf08f)+'\x20'+a40_0xa943d3[_0x3890da(0x1e8)](_0x3890da(0x1ef)+_0x17a8dc+')')),console[_0x3890da(0x20a)]('Session\x20agent\x20set\x20to:\x20'+a40_0xa943d3[_0x3890da(0x1fb)](_0x2332a3)+'\x20'+a40_0xa943d3[_0x3890da(0x1e8)](_0x3890da(0x1ef)+_0x17a8dc+')'))):(_0x359555[_0x3890da(0x212)]=_0x327352,console[_0x3890da(0x20a)](_0x3890da(0x1f4)+a40_0xa943d3[_0x3890da(0x1fb)](_0x327352)+'\x20'+a40_0xa943d3[_0x3890da(0x1e8)](_0x3890da(0x1ef)+_0x17a8dc+')')));break;}case _0x3890da(0x217):_0x359555[_0x3890da(0x217)]=_0x327352,console[_0x3890da(0x20a)](_0x3890da(0x211)+a40_0xa943d3[_0x3890da(0x1fb)](_0x327352)+'\x20'+a40_0xa943d3['dim'](_0x3890da(0x1ef)+_0x17a8dc+')'));break;}return saveSessionContext(_0x359555,_0x2f9cf2[_0x3890da(0x226)]),console['log'](a40_0xa943d3['dim'](_0x3890da(0x1e4))),0x0;}catch(_0x22ba9e){return _0x22ba9e instanceof Error&&console['error'](_0x3890da(0x225)+_0x22ba9e[_0x3890da(0x1fc)]),0x1;}}}
1
+ const a40_0x7000af=a40_0x1a01;(function(_0x3790aa,_0x4bf07e){const _0x328e86=a40_0x1a01,_0x3211bd=_0x3790aa();while(!![]){try{const _0x5d5e80=-parseInt(_0x328e86(0xc7))/0x1*(-parseInt(_0x328e86(0xca))/0x2)+parseInt(_0x328e86(0xf5))/0x3+parseInt(_0x328e86(0xea))/0x4*(-parseInt(_0x328e86(0xf6))/0x5)+-parseInt(_0x328e86(0xcc))/0x6+-parseInt(_0x328e86(0xce))/0x7+parseInt(_0x328e86(0xcd))/0x8*(-parseInt(_0x328e86(0xe6))/0x9)+parseInt(_0x328e86(0xd8))/0xa;if(_0x5d5e80===_0x4bf07e)break;else _0x3211bd['push'](_0x3211bd['shift']());}catch(_0x2fa4c8){_0x3211bd['push'](_0x3211bd['shift']());}}}(a40_0xfeb0,0x6c984));import{BaseCommand}from'./command.js';function a40_0xfeb0(){const _0x5f31f9=['\x0aUpdate\x20notifications\x20will\x20now\x20check\x20the\x20@next\x20channel.','\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','127deRfkE','\x27\x20does\x20not\x20exist','displayWithSources','4786VwvpqS','Session\x20agent\x20set\x20to:\x20','1579590GPopOe','6166616dKyKBe','893648cGnZxk','use','profile','stable','join','parent_segment','llm_agent','message','Error:\x20Profile\x20\x27','\x0aSet\x20context:\x20tdx\x20use\x20<resource>\x20<value>','14269410DoedLn','Session\x20context\x20','\x27\x20to\x20save\x20permanently','\x0aSaved\x20to:\x20','Usage:\x20tdx\x20use\x20<resource>\x20<value>\x0a','\x0aResources:\x20site,\x20database,\x20parent_segment,\x20llm_project,\x20agent,\x20profile,\x20engage_workspace,\x20release_channel\x0a','database','\x0aRun\x20\x27tdx\x20use\x20--help\x27\x20for\x20more\x20options','llm_project','error','--default\x20can\x20only\x20be\x20used\x20with\x20\x27site\x27,\x20\x27profile\x27,\x20or\x20\x27release_channel\x27.\x20Other\x20resources\x20are\x20session-level\x20only.','Set\x20session-level\x20context','release_channel\x20requires\x20--default.\x20Usage:\x20tdx\x20use\x20--default\x20release_channel\x20<stable|next>','Use\x20--default\x20with\x20site,\x20profile,\x20or\x20release_channel\x20to\x20save\x20permanently','9nccCwu','log','agent','\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20--default\x20profile\x20<value>\x20\x20#\x20Save\x20default\x20profile\x20to\x20config\x0a','168292IYRpxL','Install\x20the\x20latest\x20next\x20version:\x20npm\x20install\x20-g\x20@treasuredata/tdx@next','clear','release_channel','site','Default\x20profile\x20set\x20to:\x20','dim','\x0aTip:\x20Use\x20\x27tdx\x20use\x20--default\x20site\x20','\x0aUse\x20\x27tdx\x20profiles\x27\x20to\x20see\x20available\x20profiles','\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20--default\x20site\x20<value>\x20\x20\x20\x20\x20#\x20Save\x20default\x20site\x20to\x20config\x0a','session','1520409HEOcCs','75VNkhSA','name','\x0aTip:\x20Use\x20\x27tdx\x20use\x20--default\x20profile\x20','execute','Session\x20parent_segment\x20set\x20to:\x20','Session\x20llm_project\x20set\x20to:\x20','debug','engage_workspace','length','\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20--clear\x20\x20\x20\x20\x20\x20#\x20Clear\x20session\x20context\x0a','default','Error:\x20','Invalid\x20resource:\x20','Session\x20site\x20set\x20to:\x20','\x0aUpdate\x20notifications\x20will\x20check\x20the\x20@latest\x20(stable)\x20channel.','next','green','Default\x20site\x20set\x20to:\x20','Invalid\x20release\x20channel:\x20','(session:\x20'];a40_0xfeb0=function(){return _0x5f31f9;};return a40_0xfeb0();}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';function a40_0x1a01(_0x3ef344,_0x22abc1){_0x3ef344=_0x3ef344-0xb4;const _0xfeb06f=a40_0xfeb0();let _0x1a0127=_0xfeb06f[_0x3ef344];return _0x1a0127;}import{getConfigDir,saveReleaseChannel}from'../core/config.js';import a40_0xfbc67 from'chalk';import*as a40_0x3f4433 from'node:path';export class UseCommand extends BaseCommand{[a40_0x7000af(0xf7)]=a40_0x7000af(0xcf);['description']=a40_0x7000af(0xe3);['validate'](_0x8b3fd4){const _0x12a768=a40_0x7000af,{args:_0x598bc2,options:_0x21014f}=_0x8b3fd4,_0x38b427=_0x21014f['default'];if(_0x598bc2[_0x12a768(0xb9)]===0x0)return undefined;if(_0x598bc2[_0x12a768(0xb9)]===0x1)return _0x12a768(0xdc)+_0x12a768(0xc6)+_0x12a768(0xba)+_0x12a768(0xf3)+_0x12a768(0xe9)+'\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20--default\x20release_channel\x20<stable|next>\x20\x20#\x20Set\x20release\x20channel\x0a'+_0x12a768(0xdd)+_0x12a768(0xdf);const _0x1efc0e=_0x598bc2[0x0],_0x25ea49=[_0x12a768(0xee),_0x12a768(0xde),_0x12a768(0xd3),_0x12a768(0xe0),_0x12a768(0xe8),'profile',_0x12a768(0xb8),_0x12a768(0xed)];if(!_0x25ea49['includes'](_0x1efc0e))return _0x12a768(0xbd)+_0x1efc0e+'.\x20Must\x20be\x20one\x20of:\x20'+_0x25ea49[_0x12a768(0xd2)](',\x20');if(_0x38b427&&_0x1efc0e!==_0x12a768(0xee)&&_0x1efc0e!==_0x12a768(0xd0)&&_0x1efc0e!==_0x12a768(0xed))return _0x12a768(0xe2);if(_0x1efc0e==='release_channel'&&!_0x38b427)return _0x12a768(0xe4);if(_0x1efc0e===_0x12a768(0xed)){const _0x1fd138=_0x598bc2[0x1];if(_0x1fd138!==_0x12a768(0xd1)&&_0x1fd138!==_0x12a768(0xc0))return _0x12a768(0xc3)+_0x1fd138+'.\x20Must\x20be\x20\x27stable\x27\x20or\x20\x27next\x27.';}return undefined;}async[a40_0x7000af(0xb4)](_0x4e93dc){const _0x2db60a=a40_0x7000af,{args:_0x720cb7,options:_0x1c5ec0}=_0x4e93dc,_0x19a234=_0x1c5ec0[_0x2db60a(0xb7)],_0x5ab412=_0x1c5ec0[_0x2db60a(0xec)],_0x587e50=_0x1c5ec0[_0x2db60a(0xbb)];cleanExpiredSessions();try{if(_0x5ab412){clearSessionContext(_0x1c5ec0['session']);const _0x49d294=getSessionID(_0x1c5ec0[_0x2db60a(0xf4)]);return console[_0x2db60a(0xe7)](_0x2db60a(0xd9)+a40_0xfbc67[_0x2db60a(0xc1)]('cleared')+'\x20'+a40_0xfbc67[_0x2db60a(0xf0)](_0x2db60a(0xc4)+_0x49d294+')')),0x0;}if(_0x720cb7[_0x2db60a(0xb9)]===0x0){const _0x4454d4=new GlobalContext(_0x1c5ec0);return _0x19a234?_0x4454d4[_0x2db60a(0xc9)]():_0x4454d4['display'](),console[_0x2db60a(0xe7)](a40_0xfbc67[_0x2db60a(0xf0)](_0x2db60a(0xd7))),console['log'](a40_0xfbc67[_0x2db60a(0xf0)]('Resources:\x20site,\x20database,\x20parent_segment,\x20llm_project,\x20agent,\x20profile,\x20engage_workspace,\x20release_channel')),console['log'](a40_0xfbc67['dim'](_0x2db60a(0xe5))),0x0;}const _0x406b2a=_0x720cb7[0x0],_0x25ef23=_0x720cb7[0x1],_0x4c75d6=a40_0x3f4433[_0x2db60a(0xd2)](getConfigDir(),'tdx.json');if(_0x587e50){if(_0x406b2a==='site')return saveDefaultSiteToUserConfig(_0x25ef23),console['log'](_0x2db60a(0xc2)+a40_0xfbc67[_0x2db60a(0xc1)](_0x25ef23)),console['log'](a40_0xfbc67[_0x2db60a(0xf0)](_0x2db60a(0xdb)+_0x4c75d6)),0x0;if(_0x406b2a===_0x2db60a(0xd0)){if(!profileExists(_0x25ef23))return console[_0x2db60a(0xe1)](_0x2db60a(0xd6)+_0x25ef23+_0x2db60a(0xc8)),console[_0x2db60a(0xe1)](_0x2db60a(0xf2)),0x1;return saveActiveProfileToUserConfig(_0x25ef23),console[_0x2db60a(0xe7)](_0x2db60a(0xef)+a40_0xfbc67[_0x2db60a(0xc1)](_0x25ef23)),console[_0x2db60a(0xe7)](a40_0xfbc67['dim'](_0x2db60a(0xdb)+_0x4c75d6)),0x0;}if(_0x406b2a===_0x2db60a(0xed))return saveReleaseChannel(_0x25ef23),console[_0x2db60a(0xe7)]('Release\x20channel\x20set\x20to:\x20'+a40_0xfbc67[_0x2db60a(0xc1)](_0x25ef23)),console[_0x2db60a(0xe7)](a40_0xfbc67[_0x2db60a(0xf0)](_0x2db60a(0xdb)+_0x4c75d6)),_0x25ef23===_0x2db60a(0xc0)?(console[_0x2db60a(0xe7)](a40_0xfbc67[_0x2db60a(0xf0)](_0x2db60a(0xc5))),console[_0x2db60a(0xe7)](a40_0xfbc67[_0x2db60a(0xf0)](_0x2db60a(0xeb)))):console['log'](a40_0xfbc67['dim'](_0x2db60a(0xbf))),0x0;}if(_0x406b2a==='site'){const _0x3e2985=getSessionID(_0x1c5ec0[_0x2db60a(0xf4)]);return saveSessionContext({'site':_0x25ef23},_0x1c5ec0['session']),console[_0x2db60a(0xe7)](_0x2db60a(0xbe)+a40_0xfbc67['green'](_0x25ef23)+'\x20'+a40_0xfbc67['dim']('(session:\x20'+_0x3e2985+')')),console[_0x2db60a(0xe7)](a40_0xfbc67[_0x2db60a(0xf0)](_0x2db60a(0xf1)+_0x25ef23+_0x2db60a(0xda))),0x0;}if(_0x406b2a==='profile'){if(!profileExists(_0x25ef23))return console[_0x2db60a(0xe1)](_0x2db60a(0xd6)+_0x25ef23+_0x2db60a(0xc8)),console[_0x2db60a(0xe1)](_0x2db60a(0xf2)),0x1;const _0x20fc7b=getSessionID(_0x1c5ec0['session']);return saveSessionContext({'profile':_0x25ef23},_0x1c5ec0[_0x2db60a(0xf4)]),console['log']('Session\x20profile\x20set\x20to:\x20'+a40_0xfbc67[_0x2db60a(0xc1)](_0x25ef23)+'\x20'+a40_0xfbc67[_0x2db60a(0xf0)]('(session:\x20'+_0x20fc7b+')')),console['log'](a40_0xfbc67[_0x2db60a(0xf0)](_0x2db60a(0xf8)+_0x25ef23+_0x2db60a(0xda))),0x0;}const _0x2f768c={},_0x3de5e2=getSessionID(_0x1c5ec0[_0x2db60a(0xf4)]);switch(_0x406b2a){case _0x2db60a(0xde):_0x2f768c[_0x2db60a(0xde)]=_0x25ef23,console[_0x2db60a(0xe7)]('Session\x20database\x20set\x20to:\x20'+a40_0xfbc67[_0x2db60a(0xc1)](_0x25ef23)+'\x20'+a40_0xfbc67[_0x2db60a(0xf0)](_0x2db60a(0xc4)+_0x3de5e2+')'));break;case _0x2db60a(0xd3):_0x2f768c['parent_segment']=_0x25ef23,console[_0x2db60a(0xe7)](_0x2db60a(0xb5)+a40_0xfbc67['green'](_0x25ef23)+'\x20'+a40_0xfbc67[_0x2db60a(0xf0)](_0x2db60a(0xc4)+_0x3de5e2+')'));break;case _0x2db60a(0xe0):_0x2f768c[_0x2db60a(0xe0)]=_0x25ef23,console[_0x2db60a(0xe7)]('Session\x20llm_project\x20set\x20to:\x20'+a40_0xfbc67[_0x2db60a(0xc1)](_0x25ef23)+'\x20'+a40_0xfbc67[_0x2db60a(0xf0)](_0x2db60a(0xc4)+_0x3de5e2+')'));break;case'agent':{const {projectName:_0x3c368e,agentName:_0x393ebe}=parseAgentRef(_0x25ef23);_0x393ebe?(_0x2f768c[_0x2db60a(0xe0)]=_0x3c368e,_0x2f768c['llm_agent']=_0x393ebe,console[_0x2db60a(0xe7)](_0x2db60a(0xb6)+a40_0xfbc67[_0x2db60a(0xc1)](_0x3c368e)+'\x20'+a40_0xfbc67[_0x2db60a(0xf0)](_0x2db60a(0xc4)+_0x3de5e2+')')),console[_0x2db60a(0xe7)](_0x2db60a(0xcb)+a40_0xfbc67['green'](_0x393ebe)+'\x20'+a40_0xfbc67[_0x2db60a(0xf0)](_0x2db60a(0xc4)+_0x3de5e2+')'))):(_0x2f768c[_0x2db60a(0xd4)]=_0x25ef23,console['log']('Session\x20agent\x20set\x20to:\x20'+a40_0xfbc67['green'](_0x25ef23)+'\x20'+a40_0xfbc67['dim'](_0x2db60a(0xc4)+_0x3de5e2+')')));break;}case _0x2db60a(0xb8):_0x2f768c[_0x2db60a(0xb8)]=_0x25ef23,console[_0x2db60a(0xe7)]('Session\x20engage_workspace\x20set\x20to:\x20'+a40_0xfbc67[_0x2db60a(0xc1)](_0x25ef23)+'\x20'+a40_0xfbc67[_0x2db60a(0xf0)](_0x2db60a(0xc4)+_0x3de5e2+')'));break;}return saveSessionContext(_0x2f768c,_0x1c5ec0[_0x2db60a(0xf4)]),console[_0x2db60a(0xe7)](a40_0xfbc67[_0x2db60a(0xf0)]('\x0aTip:\x20Use\x20\x27tdx\x20use\x20--clear\x27\x20to\x20clear\x20session\x20overrides')),0x0;}catch(_0x1da6b7){return _0x1da6b7 instanceof Error&&console[_0x2db60a(0xe1)](_0x2db60a(0xbc)+_0x1da6b7[_0x2db60a(0xd5)]),0x1;}}}
@@ -1 +1 @@
1
- const a41_0x30071d=a41_0x2b59;(function(_0xcf8688,_0x331de4){const _0x59aa29=a41_0x2b59,_0x5f3a9e=_0xcf8688();while(!![]){try{const _0x154143=parseInt(_0x59aa29(0x18c))/0x1+parseInt(_0x59aa29(0x176))/0x2+-parseInt(_0x59aa29(0x181))/0x3+-parseInt(_0x59aa29(0x173))/0x4+-parseInt(_0x59aa29(0x17d))/0x5*(parseInt(_0x59aa29(0x17e))/0x6)+parseInt(_0x59aa29(0x178))/0x7+parseInt(_0x59aa29(0x17c))/0x8;if(_0x154143===_0x331de4)break;else _0x5f3a9e['push'](_0x5f3a9e['shift']());}catch(_0x189374){_0x5f3a9e['push'](_0x5f3a9e['shift']());}}}(a41_0x2d00,0xa76d5));function a41_0x2b59(_0x4166e1,_0x4b4371){_0x4166e1=_0x4166e1-0x172;const _0x2d00ea=a41_0x2d00();let _0x2b59f6=_0x2d00ea[_0x4166e1];return _0x2b59f6;}import{BaseCommand}from'./command.js';function a41_0x2d00(){const _0x38318a=['2932581eAaSXl','name','\x20user','length','data','description','cause','execute','Show\x20current\x20user\x20information','Listing\x20users...','\x20\x20Cause:\x20','1335057ZWOdyt','Error:\x20','2149988OYPjBP','error','message','1572600WzZCUr','user','3830589ZyHvZn','Fetching\x20user\x20info...','List\x20all\x20users\x20in\x20the\x20account','✔\x20Found\x20','2790464RZDyca','5FLIIdb','4899522qWWedP','user\x20list','verbose'];a41_0x2d00=function(){return _0x38318a;};return a41_0x2d00();}import{SDKError}from'../sdk/index.js';import{handleSDKOutput,handleSingleObjectOutput}from'../core/command-output.js';import{withSpinner}from'../utils/spinner.js';export class UserCommand extends BaseCommand{[a41_0x30071d(0x182)]=a41_0x30071d(0x177);[a41_0x30071d(0x186)]=a41_0x30071d(0x189);async[a41_0x30071d(0x188)](_0x436f5a){const _0x3e0bd0=a41_0x30071d,{options:_0x4d7498,tdx:_0x1ab471}=_0x436f5a;try{const _0xe832de=await withSpinner(_0x3e0bd0(0x179),()=>_0x1ab471[_0x3e0bd0(0x177)]['getCurrent'](),{'verbose':_0x4d7498['verbose']}),_0x1bf4d2=_0xe832de['data'];return await handleSingleObjectOutput(_0x1bf4d2,_0x4d7498),0x0;}catch(_0x42a65f){if(_0x42a65f instanceof SDKError)return console[_0x3e0bd0(0x174)](_0x3e0bd0(0x172)+_0x42a65f[_0x3e0bd0(0x175)]),_0x42a65f['cause']&&console[_0x3e0bd0(0x174)](_0x3e0bd0(0x18b)+_0x42a65f[_0x3e0bd0(0x187)]),0x1;throw _0x42a65f;}}}export class UserListCommand extends BaseCommand{[a41_0x30071d(0x182)]=a41_0x30071d(0x17f);[a41_0x30071d(0x186)]=a41_0x30071d(0x17a);async[a41_0x30071d(0x188)](_0x17b339){const _0x9e5914=a41_0x30071d,{options:_0x5ab25b,tdx:_0x5a156b}=_0x17b339;try{const _0x499414=await withSpinner(_0x9e5914(0x18a),()=>_0x5a156b[_0x9e5914(0x177)]['list'](),{'verbose':_0x5ab25b[_0x9e5914(0x180)]}),_0x5f2009=_0x499414[_0x9e5914(0x185)];return console['error'](_0x9e5914(0x17b)+_0x5f2009[_0x9e5914(0x184)]+_0x9e5914(0x183)+(_0x5f2009[_0x9e5914(0x184)]!==0x1?'s':'')),await handleSDKOutput(_0x5f2009,_0x5ab25b),0x0;}catch(_0x22c462){if(_0x22c462 instanceof SDKError)return console[_0x9e5914(0x174)]('Error:\x20'+_0x22c462[_0x9e5914(0x175)]),_0x22c462[_0x9e5914(0x187)]&&console[_0x9e5914(0x174)](_0x9e5914(0x18b)+_0x22c462[_0x9e5914(0x187)]),0x1;throw _0x22c462;}}}
1
+ const a41_0xe5646=a41_0x1e1a;(function(_0x2321b7,_0x1bc9f8){const _0x2607a9=a41_0x1e1a,_0x5cefeb=_0x2321b7();while(!![]){try{const _0x418ba4=parseInt(_0x2607a9(0x15d))/0x1+-parseInt(_0x2607a9(0x156))/0x2+-parseInt(_0x2607a9(0x166))/0x3+-parseInt(_0x2607a9(0x15b))/0x4+-parseInt(_0x2607a9(0x159))/0x5*(-parseInt(_0x2607a9(0x160))/0x6)+-parseInt(_0x2607a9(0x163))/0x7*(parseInt(_0x2607a9(0x14c))/0x8)+parseInt(_0x2607a9(0x150))/0x9*(parseInt(_0x2607a9(0x153))/0xa);if(_0x418ba4===_0x1bc9f8)break;else _0x5cefeb['push'](_0x5cefeb['shift']());}catch(_0x29bc5e){_0x5cefeb['push'](_0x5cefeb['shift']());}}}(a41_0x4c90,0xae4ac));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleSDKOutput,handleSingleObjectOutput}from'../core/command-output.js';import{withSpinner}from'../utils/spinner.js';function a41_0x4c90(){const _0x56684f=['2372924HPEBRE','error','1327865dzgoLG','\x20\x20Cause:\x20','name','2167692jBVwME','list','\x20user','6795551ZoGtNL','execute','verbose','2405586SHptqq','user\x20list','user','8iQxruE','Error:\x20','getCurrent','message','3684258ADOdse','List\x20all\x20users\x20in\x20the\x20account','description','20fJyMnx','✔\x20Found\x20','Show\x20current\x20user\x20information','301298xjWnld','data','Listing\x20users...','15vSMBbQ','cause'];a41_0x4c90=function(){return _0x56684f;};return a41_0x4c90();}export class UserCommand extends BaseCommand{['name']=a41_0xe5646(0x14b);[a41_0xe5646(0x152)]=a41_0xe5646(0x155);async[a41_0xe5646(0x164)](_0x57539b){const _0x23ffa1=a41_0xe5646,{options:_0x5c7c9e,tdx:_0x3fef2e}=_0x57539b;try{const _0x1b24d2=await withSpinner('Fetching\x20user\x20info...',()=>_0x3fef2e[_0x23ffa1(0x14b)][_0x23ffa1(0x14e)](),{'verbose':_0x5c7c9e[_0x23ffa1(0x165)]}),_0x468faf=_0x1b24d2['data'];return await handleSingleObjectOutput(_0x468faf,_0x5c7c9e),0x0;}catch(_0x297625){if(_0x297625 instanceof SDKError)return console[_0x23ffa1(0x15c)](_0x23ffa1(0x14d)+_0x297625['message']),_0x297625[_0x23ffa1(0x15a)]&&console[_0x23ffa1(0x15c)](_0x23ffa1(0x15e)+_0x297625[_0x23ffa1(0x15a)]),0x1;throw _0x297625;}}}function a41_0x1e1a(_0x4de3a6,_0x2aac1d){_0x4de3a6=_0x4de3a6-0x14a;const _0x4c906d=a41_0x4c90();let _0x1e1acf=_0x4c906d[_0x4de3a6];return _0x1e1acf;}export class UserListCommand extends BaseCommand{[a41_0xe5646(0x15f)]=a41_0xe5646(0x14a);[a41_0xe5646(0x152)]=a41_0xe5646(0x151);async[a41_0xe5646(0x164)](_0x20c11b){const _0x1825a8=a41_0xe5646,{options:_0x597d2d,tdx:_0x416aa0}=_0x20c11b;try{const _0x1ed9eb=await withSpinner(_0x1825a8(0x158),()=>_0x416aa0[_0x1825a8(0x14b)][_0x1825a8(0x161)](),{'verbose':_0x597d2d[_0x1825a8(0x165)]}),_0x5b114e=_0x1ed9eb[_0x1825a8(0x157)];return console[_0x1825a8(0x15c)](_0x1825a8(0x154)+_0x5b114e['length']+_0x1825a8(0x162)+(_0x5b114e['length']!==0x1?'s':'')),await handleSDKOutput(_0x5b114e,_0x597d2d),0x0;}catch(_0x1e8552){if(_0x1e8552 instanceof SDKError)return console[_0x1825a8(0x15c)]('Error:\x20'+_0x1e8552[_0x1825a8(0x14f)]),_0x1e8552[_0x1825a8(0x15a)]&&console['error'](_0x1825a8(0x15e)+_0x1e8552[_0x1825a8(0x15a)]),0x1;throw _0x1e8552;}}}