@treasuredata/tdx 0.25.1 → 0.25.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 (163) hide show
  1. package/dist/bin.js +1 -1
  2. package/dist/build-info.json +3 -3
  3. package/dist/cli-categories.js +1 -1
  4. package/dist/cli.js +1 -1
  5. package/dist/commands/activations.js +1 -1
  6. package/dist/commands/agent-command.js +1 -1
  7. package/dist/commands/agent-test-command.js +1 -1
  8. package/dist/commands/api-command.js +1 -1
  9. package/dist/commands/auth-command.js +1 -1
  10. package/dist/commands/chat-command.js +1 -1
  11. package/dist/commands/claude-command.js +1 -1
  12. package/dist/commands/claude-statusline-command.js +1 -1
  13. package/dist/commands/claude-usage-command.js +1 -1
  14. package/dist/commands/command.js +1 -1
  15. package/dist/commands/connection-command.js +1 -1
  16. package/dist/commands/databases.js +1 -1
  17. package/dist/commands/describe.js +1 -1
  18. package/dist/commands/engage-command.js +1 -1
  19. package/dist/commands/job-command.js +1 -1
  20. package/dist/commands/journey-command.js +1 -1
  21. package/dist/commands/journey-validate-command.js +1 -1
  22. package/dist/commands/llm-command.js +1 -1
  23. package/dist/commands/mcp-command.js +1 -1
  24. package/dist/commands/parent-segment-command.js +1 -1
  25. package/dist/commands/profile-command.js +1 -1
  26. package/dist/commands/profiles-command.js +1 -1
  27. package/dist/commands/query-command.js +1 -1
  28. package/dist/commands/schedule-command.js +1 -1
  29. package/dist/commands/segment-command.js +1 -1
  30. package/dist/commands/segment-create-command.js +1 -1
  31. package/dist/commands/segment-fields-command.js +1 -1
  32. package/dist/commands/segment-pull-command.js +1 -1
  33. package/dist/commands/segment-push-command.js +1 -1
  34. package/dist/commands/segment-update-command.js +1 -1
  35. package/dist/commands/segment-use-command.js +1 -1
  36. package/dist/commands/segment-validate-command.js +1 -1
  37. package/dist/commands/segments.js +1 -1
  38. package/dist/commands/show.js +1 -1
  39. package/dist/commands/status-command.js +1 -1
  40. package/dist/commands/tables.js +1 -1
  41. package/dist/commands/unset-command.js +1 -1
  42. package/dist/commands/use-command.js +1 -1
  43. package/dist/commands/user-command.js +1 -1
  44. package/dist/commands/workflow-command.js +1 -1
  45. package/dist/core/auth.js +1 -1
  46. package/dist/core/command-output.js +1 -1
  47. package/dist/core/config.js +1 -1
  48. package/dist/core/connection-cache.js +1 -1
  49. package/dist/core/constants.js +1 -1
  50. package/dist/core/credential-cache.js +1 -1
  51. package/dist/core/global-context.js +1 -1
  52. package/dist/core/keychain.js +1 -1
  53. package/dist/core/profile.js +1 -1
  54. package/dist/core/project-config.js +1 -1
  55. package/dist/core/session.js +1 -1
  56. package/dist/core/user-cache.js +1 -1
  57. package/dist/core/version.js +1 -1
  58. package/dist/index.js +1 -1
  59. package/dist/mcp/server.js +1 -1
  60. package/dist/mcp/tools/index.js +1 -1
  61. package/dist/mcp/tools/tdx-run.js +1 -1
  62. package/dist/mcp/tools/tdx-search.js +1 -1
  63. package/dist/mcp/utils.js +1 -1
  64. package/dist/proxy/claude-usage-tracker.js +1 -1
  65. package/dist/proxy/passthrough-server.js +1 -1
  66. package/dist/proxy/sse-usage-parser.js +1 -1
  67. package/dist/sdk/agent/agent-config.js +1 -1
  68. package/dist/sdk/agent/agent-ref-parser.js +1 -1
  69. package/dist/sdk/agent/agent-yaml.js +1 -1
  70. package/dist/sdk/agent/test/evaluator.js +1 -1
  71. package/dist/sdk/agent/test/executor.js +1 -1
  72. package/dist/sdk/agent/test/index.js +1 -1
  73. package/dist/sdk/agent/test/output.js +1 -1
  74. package/dist/sdk/agent/test/parser.js +1 -1
  75. package/dist/sdk/api.js +1 -1
  76. package/dist/sdk/client/cdp-api-client.js +1 -1
  77. package/dist/sdk/client/endpoints.js +1 -1
  78. package/dist/sdk/client/engage-api-client.js +1 -1
  79. package/dist/sdk/client/http-client.js +1 -1
  80. package/dist/sdk/client/llm-api-client.js +1 -1
  81. package/dist/sdk/client/rate-limiter.js +1 -1
  82. package/dist/sdk/client/td-api-client.js +1 -1
  83. package/dist/sdk/client/trino-api-client.js +1 -1
  84. package/dist/sdk/client/workflow-client.js +1 -1
  85. package/dist/sdk/connection-validator.js +1 -1
  86. package/dist/sdk/connection.js +1 -1
  87. package/dist/sdk/engage.js +1 -1
  88. package/dist/sdk/errors.js +1 -1
  89. package/dist/sdk/index.js +1 -1
  90. package/dist/sdk/io/index.js +1 -1
  91. package/dist/sdk/io/node-filesystem.js +1 -1
  92. package/dist/sdk/job.js +1 -1
  93. package/dist/sdk/journey.js +1 -1
  94. package/dist/sdk/llm/chat-cache.js +1 -1
  95. package/dist/sdk/llm/index.js +1 -1
  96. package/dist/sdk/llm/llm-backup-utils.js +1 -1
  97. package/dist/sdk/llm/model-factors.js +1 -1
  98. package/dist/sdk/query/index.js +1 -1
  99. package/dist/sdk/query/sql-parser.js +1 -1
  100. package/dist/sdk/schedule.js +1 -1
  101. package/dist/sdk/segment/child-segment-yaml.js +1 -1
  102. package/dist/sdk/segment/fields-display.js +1 -1
  103. package/dist/sdk/segment/file-discovery.js +1 -1
  104. package/dist/sdk/segment/journey-utils.js +1 -1
  105. package/dist/sdk/segment/journey-yaml.js +1 -1
  106. package/dist/sdk/segment/parent-segment-preview.js +1 -1
  107. package/dist/sdk/segment/parent-segment-yaml.js +1 -1
  108. package/dist/sdk/segment/pull-workflow.js +1 -1
  109. package/dist/sdk/segment/push-workflow.js +1 -1
  110. package/dist/sdk/segment/resolution-context.js +1 -1
  111. package/dist/sdk/segment/segment-path-parser.js +1 -1
  112. package/dist/sdk/segment/segment-ref-parser.js +1 -1
  113. package/dist/sdk/segment/target-resolution.js +1 -1
  114. package/dist/sdk/segment/tdx-config.js +1 -1
  115. package/dist/sdk/segment/validate-files.js +1 -1
  116. package/dist/sdk/segment/yaml-validator.js +1 -1
  117. package/dist/sdk/segment.js +1 -1
  118. package/dist/sdk/types/index.js +1 -1
  119. package/dist/sdk/types/progress.js +1 -1
  120. package/dist/sdk/user.js +1 -1
  121. package/dist/sdk/util/format-detector.js +1 -1
  122. package/dist/sdk/util/formatters.js +1 -1
  123. package/dist/sdk/util/index.js +1 -1
  124. package/dist/sdk/util/tree-formatter.js +1 -1
  125. package/dist/sdk/workflow/archive-validation.js +1 -1
  126. package/dist/sdk/workflow/clone-workflow.js +1 -1
  127. package/dist/sdk/workflow/index.js +1 -1
  128. package/dist/sdk/workflow/pull-workflow.js +1 -1
  129. package/dist/sdk/workflow/push-workflow.js +1 -1
  130. package/dist/sdk/workflow/tdx-config.js +1 -1
  131. package/dist/sdk/workflow/workflow-utils.js +1 -1
  132. package/dist/test-utils/command-runner.js +1 -1
  133. package/dist/test-utils/factories.js +1 -1
  134. package/dist/test-utils/fixtures.js +1 -1
  135. package/dist/test-utils/http-mock.js +1 -1
  136. package/dist/test-utils/index.js +1 -1
  137. package/dist/utils/async.js +1 -1
  138. package/dist/utils/colors.js +1 -1
  139. package/dist/utils/diff.js +1 -1
  140. package/dist/utils/file-permissions.js +1 -1
  141. package/dist/utils/global-cache.js +1 -1
  142. package/dist/utils/json-loader.js +1 -1
  143. package/dist/utils/local-cache.js +1 -1
  144. package/dist/utils/logger/formatters/default-formatter.js +1 -1
  145. package/dist/utils/logger/formatters/index.js +1 -1
  146. package/dist/utils/logger/handlers/console-handler.js +1 -1
  147. package/dist/utils/logger/handlers/file-handler.js +1 -1
  148. package/dist/utils/logger/handlers/index.js +1 -1
  149. package/dist/utils/logger/handlers/null-handler.js +1 -1
  150. package/dist/utils/logger/index.js +1 -1
  151. package/dist/utils/logger/logger.js +1 -1
  152. package/dist/utils/logger/types.js +1 -1
  153. package/dist/utils/option-validation.js +1 -1
  154. package/dist/utils/port.js +1 -1
  155. package/dist/utils/process.js +1 -1
  156. package/dist/utils/prompt.js +1 -1
  157. package/dist/utils/spinner.js +1 -1
  158. package/dist/utils/sse-parser.js +1 -1
  159. package/dist/utils/string-utils.js +1 -1
  160. package/dist/utils/table-ref-parser.js +1 -1
  161. package/dist/utils/tdx-logger.js +1 -1
  162. package/dist/utils/version-check.js +1 -1
  163. package/package.json +1 -1
@@ -1 +1 @@
1
- function a32_0x2b28(_0x303cc0,_0x4470e3){_0x303cc0=_0x303cc0-0x16b;const _0x1063cb=a32_0x1063();let _0x2b287f=_0x1063cb[_0x303cc0];return _0x2b287f;}function a32_0x1063(){const _0x461e3f=['2873244msYEws','Updating\x20segment\x20\x27','segmentPath','verbose','Segment\x20ID:\x20','1200040yzNLkz','segment','execute','Resolved\x20folder\x20ID:\x20','430GixtAk','description','Segment\x20ID\x20missing\x20from\x20resolved\x20path','Resolved\x20type:\x20','\x20\x20tdx\x20segment\x20update\x20\x22High\x20Value\x22\x20--rule\x20\x27...\x27\x20\x20#\x20Relative\x20to\x20context','2082aOOOJx','\x20\x20Use\x20`tdx\x20sg\x20push`\x20with\x20YAML\x20files\x20instead.\x0a','kind','\x20\x20\x20Path:\x20','Usage:\x20tdx\x20segment\x20update\x20<path>\x20[options]','data','26719SlnWNZ','yellow','\x20\x20tdx\x20segment\x20update\x20\x22My\x20Audience/High\x20Value\x22\x20--description\x20\x22...\x22','INTERNAL','104zcoBEY','Error:\x20Segment\x20path\x20or\x20name\x20is\x20required','Use:\x20tdx\x20segment\x20update\x20<path_to_segment>\x20[options]','Examples:','36VrQlzH','21376861pcEBqw','1108746LTxLFR','2DniolO','updateSegmentById','152716sDSRdQ','Update\x20existing\x20child\x20segment','ruleFile','name','error','type','segmentId','segment:update','segmentName','.\x20Only\x20child\x20segments\x20can\x20be\x20updated.','\x27...','48416qIBYvu','resolveFolderId','Resolved\x20relative\x20path\x20to:\x20'];a32_0x1063=function(){return _0x461e3f;};return a32_0x1063();}const a32_0x2bf253=a32_0x2b28;(function(_0x10247b,_0x29dd26){const _0x2c3bbe=a32_0x2b28,_0x199462=_0x10247b();while(!![]){try{const _0x32c913=-parseInt(_0x2c3bbe(0x190))/0x1*(parseInt(_0x2c3bbe(0x192))/0x2)+-parseInt(_0x2c3bbe(0x171))/0x3+-parseInt(_0x2c3bbe(0x16e))/0x4*(parseInt(_0x2c3bbe(0x17a))/0x5)+parseInt(_0x2c3bbe(0x17f))/0x6*(-parseInt(_0x2c3bbe(0x185))/0x7)+-parseInt(_0x2c3bbe(0x189))/0x8*(parseInt(_0x2c3bbe(0x18f))/0x9)+parseInt(_0x2c3bbe(0x176))/0xa+parseInt(_0x2c3bbe(0x18e))/0xb*(parseInt(_0x2c3bbe(0x18d))/0xc);if(_0x32c913===_0x29dd26)break;else _0x199462['push'](_0x199462['shift']());}catch(_0x51e2d1){_0x199462['push'](_0x199462['shift']());}}}(a32_0x1063,0xd50b4));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_0x1949b8 from'chalk';export class SegmentUpdateCommand extends BaseCommand{[a32_0x2bf253(0x195)]=a32_0x2bf253(0x199);[a32_0x2bf253(0x17b)]=a32_0x2bf253(0x193);async[a32_0x2bf253(0x178)](_0x382328){const _0x5ec9ea=a32_0x2bf253;console[_0x5ec9ea(0x196)](a32_0x1949b8[_0x5ec9ea(0x186)]('⚠\x20Deprecation\x20warning:\x20`segment\x20update`\x20is\x20deprecated.')),console[_0x5ec9ea(0x196)](a32_0x1949b8['yellow'](_0x5ec9ea(0x180)));const {options:_0x49a2c0,args:_0xb11fa6,tdx:_0x227899}=_0x382328,_0x507fc9=_0x49a2c0;if(_0xb11fa6['length']===0x0)return console[_0x5ec9ea(0x196)](_0x5ec9ea(0x18a)),console[_0x5ec9ea(0x196)](_0x5ec9ea(0x183)),console[_0x5ec9ea(0x196)](_0x5ec9ea(0x18c)),console[_0x5ec9ea(0x196)](_0x5ec9ea(0x187)),console[_0x5ec9ea(0x196)](_0x5ec9ea(0x17e)),0x1;const _0x368b82=_0xb11fa6[0x0],_0x21edf7=_0x49a2c0[_0x5ec9ea(0x173)];let _0x1e141b=_0x368b82;_0x21edf7&&!_0x368b82['includes']('/')&&(_0x1e141b=_0x21edf7+'/'+_0x368b82,_0x507fc9[_0x5ec9ea(0x174)]&&console[_0x5ec9ea(0x196)](_0x5ec9ea(0x170)+_0x1e141b));const _0x3713d9=await withSpinner('Resolving\x20path\x20\x27'+_0x1e141b+_0x5ec9ea(0x16d),()=>_0x227899[_0x5ec9ea(0x177)]['resolvePathToResource'](_0x1e141b),{'verbose':_0x507fc9[_0x5ec9ea(0x174)]}),_0x4d96ad=_0x3713d9[_0x5ec9ea(0x184)];_0x507fc9['verbose']&&console[_0x5ec9ea(0x196)](_0x5ec9ea(0x17d)+_0x4d96ad[_0x5ec9ea(0x197)]);if(_0x4d96ad[_0x5ec9ea(0x197)]!==_0x5ec9ea(0x177))return console[_0x5ec9ea(0x196)]('Error:\x20Cannot\x20update\x20'+_0x4d96ad['type']+_0x5ec9ea(0x16c)),console[_0x5ec9ea(0x196)](_0x5ec9ea(0x18b)),0x1;if(!_0x4d96ad[_0x5ec9ea(0x198)])throw new SDKError(ErrorCode[_0x5ec9ea(0x188)],_0x5ec9ea(0x17c));const _0x209a49=_0x4d96ad['parentId'],_0x5325c5=_0x4d96ad[_0x5ec9ea(0x198)];_0x507fc9[_0x5ec9ea(0x174)]&&(console[_0x5ec9ea(0x196)]('Parent\x20ID:\x20'+_0x209a49),console[_0x5ec9ea(0x196)](_0x5ec9ea(0x175)+_0x5325c5));let _0xf0c6f1;if(_0x507fc9['folder']){const _0x1ade2b=_0x507fc9['folder'],_0x4e4b4c=await withSpinner('Resolving\x20folder\x20\x27'+_0x1ade2b+'\x27...',()=>_0x227899[_0x5ec9ea(0x177)][_0x5ec9ea(0x16f)](_0x209a49,_0x1ade2b),{'verbose':_0x507fc9[_0x5ec9ea(0x174)]});_0xf0c6f1=parseInt(_0x4e4b4c[_0x5ec9ea(0x184)],0xa),_0x507fc9[_0x5ec9ea(0x174)]&&console[_0x5ec9ea(0x196)](_0x5ec9ea(0x179)+_0xf0c6f1);}const _0x1da535=await loadJSONFromOptions(_0x507fc9['rule'],_0x507fc9[_0x5ec9ea(0x194)]),_0x2ce623={'name':_0x507fc9[_0x5ec9ea(0x195)],'description':_0x507fc9[_0x5ec9ea(0x17b)],'rule':_0x1da535,'kind':_0x507fc9[_0x5ec9ea(0x181)]!==undefined?parseInt(_0x507fc9['kind'],0xa):undefined,'segmentFolderId':_0xf0c6f1},_0x3e2db3=await withSpinner(_0x5ec9ea(0x172)+_0x4d96ad[_0x5ec9ea(0x16b)]+'\x27...',()=>_0x227899['segment'][_0x5ec9ea(0x191)](_0x209a49,_0x5325c5,_0x2ce623),{'verbose':_0x507fc9[_0x5ec9ea(0x174)]}),_0xb08050=_0x3e2db3['data'];return console['error']('✔\x20Updated\x20segment\x20\x27'+_0xb08050['name']+'\x27'),_0x1e141b!==_0x368b82&&console[_0x5ec9ea(0x196)](_0x5ec9ea(0x182)+_0x1e141b),await handleSDKOutput([_0xb08050],_0x507fc9),0x0;}}
1
+ const a32_0x443b7b=a32_0x1c3d;(function(_0x47a5a1,_0x567dda){const _0xe796b4=a32_0x1c3d,_0x3fcf1a=_0x47a5a1();while(!![]){try{const _0x1b23e9=-parseInt(_0xe796b4(0xd5))/0x1+-parseInt(_0xe796b4(0xcf))/0x2+-parseInt(_0xe796b4(0xc2))/0x3*(-parseInt(_0xe796b4(0xc1))/0x4)+-parseInt(_0xe796b4(0xd1))/0x5*(-parseInt(_0xe796b4(0xbf))/0x6)+parseInt(_0xe796b4(0xb4))/0x7+-parseInt(_0xe796b4(0xc7))/0x8*(-parseInt(_0xe796b4(0xab))/0x9)+-parseInt(_0xe796b4(0xbd))/0xa;if(_0x1b23e9===_0x567dda)break;else _0x3fcf1a['push'](_0x3fcf1a['shift']());}catch(_0x66fe3f){_0x3fcf1a['push'](_0x3fcf1a['shift']());}}}(a32_0x4863,0x46759));import{BaseCommand}from'./command.js';import{handleSDKOutput}from'../core/command-output.js';function a32_0x4863(){const _0x2a5db6=['12WXcjPg','length','159076hrwtTk','30IKIpTG','error','\x20\x20\x20Path:\x20','⚠\x20Deprecation\x20warning:\x20`segment\x20update`\x20is\x20deprecated.','updateSegmentById','48qjzIZG','segmentId','Error:\x20Segment\x20path\x20or\x20name\x20is\x20required','.\x20Only\x20child\x20segments\x20can\x20be\x20updated.','description','execute','rule','Segment\x20ID:\x20','61004NZCAei','folder','521870aAEJCg','Resolved\x20relative\x20path\x20to:\x20','type','name','403683bgaqRG','segment','\x20\x20tdx\x20segment\x20update\x20\x22My\x20Audience/High\x20Value\x22\x20--description\x20\x22...\x22','Resolving\x20folder\x20\x27','yellow','Segment\x20ID\x20missing\x20from\x20resolved\x20path','Resolved\x20folder\x20ID:\x20','252459CaJoNb','includes','segmentPath','resolvePathToResource','Examples:','Parent\x20ID:\x20','data','\x27...','\x20\x20tdx\x20segment\x20update\x20\x22High\x20Value\x22\x20--rule\x20\x27...\x27\x20\x20#\x20Relative\x20to\x20context','1551536CAYgaJ','Error:\x20Cannot\x20update\x20','INTERNAL','kind','\x20\x20Use\x20`tdx\x20sg\x20push`\x20with\x20YAML\x20files\x20instead.\x0a','✔\x20Updated\x20segment\x20\x27','segmentName','segment:update','ruleFile','2736060yhRfWL','verbose'];a32_0x4863=function(){return _0x2a5db6;};return a32_0x4863();}function a32_0x1c3d(_0x4bb1aa,_0x82e849){_0x4bb1aa=_0x4bb1aa-0xab;const _0x4863a2=a32_0x4863();let _0x1c3d86=_0x4863a2[_0x4bb1aa];return _0x1c3d86;}import{withSpinner}from'../utils/spinner.js';import{loadJSONFromOptions}from'../utils/json-loader.js';import{SDKError,ErrorCode}from'../sdk/index.js';import a32_0x5da57e from'chalk';export class SegmentUpdateCommand extends BaseCommand{['name']=a32_0x443b7b(0xbb);[a32_0x443b7b(0xcb)]='Update\x20existing\x20child\x20segment';async[a32_0x443b7b(0xcc)](_0x388a2b){const _0x2af370=a32_0x443b7b;console['error'](a32_0x5da57e['yellow'](_0x2af370(0xc5))),console[_0x2af370(0xc3)](a32_0x5da57e[_0x2af370(0xd9)](_0x2af370(0xb8)));const {options:_0xb67894,args:_0x369867,tdx:_0x425c2b}=_0x388a2b,_0x298da3=_0xb67894;if(_0x369867[_0x2af370(0xc0)]===0x0)return console[_0x2af370(0xc3)](_0x2af370(0xc9)),console[_0x2af370(0xc3)]('Usage:\x20tdx\x20segment\x20update\x20<path>\x20[options]'),console[_0x2af370(0xc3)](_0x2af370(0xaf)),console[_0x2af370(0xc3)](_0x2af370(0xd7)),console['error'](_0x2af370(0xb3)),0x1;const _0x57135f=_0x369867[0x0],_0x117b21=_0xb67894[_0x2af370(0xad)];let _0x17d43d=_0x57135f;_0x117b21&&!_0x57135f[_0x2af370(0xac)]('/')&&(_0x17d43d=_0x117b21+'/'+_0x57135f,_0x298da3[_0x2af370(0xbe)]&&console[_0x2af370(0xc3)](_0x2af370(0xd2)+_0x17d43d));const _0x195b18=await withSpinner('Resolving\x20path\x20\x27'+_0x17d43d+'\x27...',()=>_0x425c2b[_0x2af370(0xd6)][_0x2af370(0xae)](_0x17d43d),{'verbose':_0x298da3[_0x2af370(0xbe)]}),_0x1ee7ef=_0x195b18[_0x2af370(0xb1)];_0x298da3[_0x2af370(0xbe)]&&console[_0x2af370(0xc3)]('Resolved\x20type:\x20'+_0x1ee7ef[_0x2af370(0xd3)]);if(_0x1ee7ef[_0x2af370(0xd3)]!==_0x2af370(0xd6))return console[_0x2af370(0xc3)](_0x2af370(0xb5)+_0x1ee7ef[_0x2af370(0xd3)]+_0x2af370(0xca)),console[_0x2af370(0xc3)]('Use:\x20tdx\x20segment\x20update\x20<path_to_segment>\x20[options]'),0x1;if(!_0x1ee7ef[_0x2af370(0xc8)])throw new SDKError(ErrorCode[_0x2af370(0xb6)],_0x2af370(0xda));const _0x20ff5f=_0x1ee7ef['parentId'],_0x5be35b=_0x1ee7ef[_0x2af370(0xc8)];_0x298da3[_0x2af370(0xbe)]&&(console[_0x2af370(0xc3)](_0x2af370(0xb0)+_0x20ff5f),console[_0x2af370(0xc3)](_0x2af370(0xce)+_0x5be35b));let _0x20c45a;if(_0x298da3[_0x2af370(0xd0)]){const _0x4fb044=_0x298da3[_0x2af370(0xd0)],_0x4b16c0=await withSpinner(_0x2af370(0xd8)+_0x4fb044+_0x2af370(0xb2),()=>_0x425c2b[_0x2af370(0xd6)]['resolveFolderId'](_0x20ff5f,_0x4fb044),{'verbose':_0x298da3[_0x2af370(0xbe)]});_0x20c45a=parseInt(_0x4b16c0[_0x2af370(0xb1)],0xa),_0x298da3[_0x2af370(0xbe)]&&console[_0x2af370(0xc3)](_0x2af370(0xdb)+_0x20c45a);}const _0x5c6b3=await loadJSONFromOptions(_0x298da3[_0x2af370(0xcd)],_0x298da3[_0x2af370(0xbc)]),_0x462320={'name':_0x298da3[_0x2af370(0xd4)],'description':_0x298da3['description'],'rule':_0x5c6b3,'kind':_0x298da3[_0x2af370(0xb7)]!==undefined?parseInt(_0x298da3[_0x2af370(0xb7)],0xa):undefined,'segmentFolderId':_0x20c45a},_0x4fbe65=await withSpinner('Updating\x20segment\x20\x27'+_0x1ee7ef[_0x2af370(0xba)]+_0x2af370(0xb2),()=>_0x425c2b[_0x2af370(0xd6)][_0x2af370(0xc6)](_0x20ff5f,_0x5be35b,_0x462320),{'verbose':_0x298da3[_0x2af370(0xbe)]}),_0x403080=_0x4fbe65[_0x2af370(0xb1)];return console[_0x2af370(0xc3)](_0x2af370(0xb9)+_0x403080[_0x2af370(0xd4)]+'\x27'),_0x17d43d!==_0x57135f&&console['error'](_0x2af370(0xc4)+_0x17d43d),await handleSDKOutput([_0x403080],_0x298da3),0x0;}}
@@ -1 +1 @@
1
- const a33_0x4dd9d0=a33_0x29ea;(function(_0x22d24a,_0x237178){const _0x8868fe=a33_0x29ea,_0x393790=_0x22d24a();while(!![]){try{const _0x294789=-parseInt(_0x8868fe(0x157))/0x1*(parseInt(_0x8868fe(0x13d))/0x2)+parseInt(_0x8868fe(0x145))/0x3+-parseInt(_0x8868fe(0x16b))/0x4*(-parseInt(_0x8868fe(0x167))/0x5)+parseInt(_0x8868fe(0x154))/0x6+-parseInt(_0x8868fe(0x16d))/0x7+-parseInt(_0x8868fe(0x164))/0x8*(parseInt(_0x8868fe(0x155))/0x9)+parseInt(_0x8868fe(0x14d))/0xa;if(_0x294789===_0x237178)break;else _0x393790['push'](_0x393790['shift']());}catch(_0x9d9301){_0x393790['push'](_0x393790['shift']());}}}(a33_0x1d0c,0x48cb2));import{existsSync,statSync}from'fs';function a33_0x29ea(_0x1fdab8,_0x2e2f0f){_0x1fdab8=_0x1fdab8-0x13b;const _0x1d0c48=a33_0x1d0c();let _0x29ea3d=_0x1d0c48[_0x1fdab8];return _0x29ea3d;}import a33_0x3ade71 from'chalk';import{BaseCommand}from'./command.js';import{saveSessionContext}from'../core/session.js';function a33_0x1d0c(){const _0x30be9f=['segmentPath','220ykoHAy','join','dim','red','Context\x20can\x20only\x20be\x20set\x20to\x20a\x20parent\x20segment\x20or\x20folder.','execute','Set\x20current\x20segment/folder\x20context\x20for\x20navigation','resolvePathToResource','197058OkdmIh','log','\x20\x20tdx\x20segment\x20use\x20/\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Clear\x20context','isAbsolute','Resolving\x20path\x20\x27','parentId','Examples:','folderId','2454770msJvVE','\x20\x20tdx\x20segment\x20use\x20\x22My\x20Audience/Marketing\x22','Error:\x20Cannot\x20set\x20context\x20to\x20a\x20segment.','Target\x20path:\x20','Error:\x20Path\x20is\x20required\x0a','Resolved\x20path\x20type:\x20','Use\x20an\x20absolute\x20path\x20or\x20set\x20context\x20with:\x20tdx\x20segment\x20use\x20<parent_name>','3030168DVgHxL','81gPpALv','description','1838tlBiOM','\x20\x20tdx\x20segment\x20use\x20..\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Go\x20to\x20parent','segment','green','config','Error:\x20No\x20tdx.json\x20found\x20in\x20or\x20above:\x20','folderPath','Usage:\x20tdx\x20segment\x20use\x20<path>','✔\x20Context\x20cleared.\x20Back\x20to\x20root.','parentName','name','fullPath','type','157336uVlRMU','slice','data','115CLgQod','error','session','cyan','28052zQfLkQ','segments','2101015QsFptR','length','Error:\x20No\x20context\x20set.\x20Cannot\x20use\x20relative\x20path.','isDirectory','verbose','✔\x20Context\x20set\x20to:\x20','split','segment:use','Resolved\x20relative\x20path\x20to:\x20'];a33_0x1d0c=function(){return _0x30be9f;};return a33_0x1d0c();}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_0x4dd9d0(0x161)]=a33_0x4dd9d0(0x174);[a33_0x4dd9d0(0x156)]=a33_0x4dd9d0(0x143);async[a33_0x4dd9d0(0x142)](_0xaaf301){const _0x325416=a33_0x4dd9d0,{options:_0x530f1e,args:_0x110a01,tdx:_0xc5e5df}=_0xaaf301;if(_0x110a01[_0x325416(0x16e)]===0x0)return console[_0x325416(0x168)](a33_0x3ade71['red'](_0x325416(0x151))),console[_0x325416(0x168)](_0x325416(0x15e)),console[_0x325416(0x168)](_0x325416(0x14b)),console['error']('\x20\x20tdx\x20segment\x20use\x20\x22My\x20Audience\x22'),console['error'](_0x325416(0x14e)),console[_0x325416(0x168)](_0x325416(0x147)),console['error'](_0x325416(0x158)),0x1;const _0x31af2a=_0x110a01[0x0],_0x5c9bbf=_0x530f1e[_0x325416(0x169)];try{if(_0x31af2a==='/')return saveSessionContext({'segment_path':undefined},_0x5c9bbf),console[_0x325416(0x146)](a33_0x3ade71[_0x325416(0x15a)](_0x325416(0x15f))),0x0;if(existsSync(_0x31af2a)&&statSync(_0x31af2a)[_0x325416(0x170)]()){let _0x7c1d2;try{_0x7c1d2=findTdxConfig(_0x31af2a);}catch{return console[_0x325416(0x168)](a33_0x3ade71['red'](_0x325416(0x15c)+_0x31af2a)),console[_0x325416(0x168)](a33_0x3ade71['cyan']('Tip:\x20Run\x20`tdx\x20sg\x20pull\x20<parent_name>`\x20first\x20to\x20create\x20the\x20folder\x20structure')),0x1;}const _0x9a264e=_0x7c1d2[_0x325416(0x15b)]['parent_segment'];return saveSessionContext({'segment_path':_0x9a264e,'parent_segment':_0x9a264e},_0x5c9bbf),console[_0x325416(0x146)](a33_0x3ade71['green'](_0x325416(0x172)+a33_0x3ade71['cyan'](_0x9a264e))),0x0;}const _0x103e49=_0x530f1e[_0x325416(0x13c)];let _0x39fbfd=_0x31af2a;const _0x1a3c49=parsePath(_0x31af2a);if(!_0x1a3c49[_0x325416(0x148)]){if(!_0x103e49)return console['error'](a33_0x3ade71['red'](_0x325416(0x16f))),console[_0x325416(0x168)](a33_0x3ade71[_0x325416(0x16a)](_0x325416(0x153))),0x1;if(_0x31af2a==='..'){const _0x2bc4f9=_0x103e49[_0x325416(0x173)]('/')[_0x325416(0x165)](0x0,-0x1)[_0x325416(0x13e)]('/');_0x39fbfd=_0x2bc4f9||'/';}else _0x31af2a==='.'?_0x39fbfd=_0x103e49:_0x39fbfd=_0x103e49+'/'+_0x31af2a;_0x530f1e[_0x325416(0x171)]&&console[_0x325416(0x168)](_0x325416(0x13b)+_0x39fbfd);}if(_0x39fbfd==='/'||_0x39fbfd==='')return saveSessionContext({'segment_path':undefined},_0x5c9bbf),console[_0x325416(0x146)](a33_0x3ade71[_0x325416(0x15a)]('✔\x20Context\x20cleared.\x20Back\x20to\x20root.')),0x0;_0x39fbfd=normalizePath(_0x39fbfd);const _0x50e246=parsePath(_0x39fbfd)[_0x325416(0x16c)];if(_0x50e246[_0x325416(0x16e)]===0x0)return saveSessionContext({'segment_path':undefined},_0x5c9bbf),console['log'](a33_0x3ade71['green'](_0x325416(0x15f))),0x0;_0x530f1e[_0x325416(0x171)]&&(console[_0x325416(0x168)]('Site:\x20'+_0x530f1e['site']),console[_0x325416(0x168)](_0x325416(0x150)+_0x39fbfd));const _0x440801=await withSpinner(_0x325416(0x149)+_0x39fbfd+'\x27...',()=>_0xc5e5df[_0x325416(0x159)][_0x325416(0x144)](_0x39fbfd),{'verbose':_0x530f1e[_0x325416(0x171)]}),_0x2bd9e9=_0x440801[_0x325416(0x166)];_0x530f1e[_0x325416(0x171)]&&(console[_0x325416(0x168)](_0x325416(0x152)+_0x2bd9e9[_0x325416(0x163)]),console[_0x325416(0x168)]('Parent\x20ID:\x20'+_0x2bd9e9[_0x325416(0x14a)]),_0x2bd9e9[_0x325416(0x14c)]&&console[_0x325416(0x168)]('Folder\x20ID:\x20'+_0x2bd9e9[_0x325416(0x14c)]));if(_0x2bd9e9['type']===_0x325416(0x159))return console[_0x325416(0x168)](a33_0x3ade71[_0x325416(0x140)](_0x325416(0x14f))),console[_0x325416(0x168)](_0x325416(0x141)),console[_0x325416(0x168)](a33_0x3ade71[_0x325416(0x16a)]('Use:\x20tdx\x20segment\x20use\x20'+_0x2bd9e9['parentName']+(_0x2bd9e9[_0x325416(0x15d)]?'/'+_0x2bd9e9[_0x325416(0x15d)][_0x325416(0x13e)]('/'):''))),0x1;return saveSessionContext({'segment_path':_0x2bd9e9['fullPath'],'parent_segment':_0x2bd9e9[_0x325416(0x160)]},_0x5c9bbf),console['log'](a33_0x3ade71[_0x325416(0x15a)](_0x325416(0x172)+a33_0x3ade71[_0x325416(0x16a)](_0x2bd9e9[_0x325416(0x162)]))),_0x530f1e[_0x325416(0x171)]&&(console['error'](a33_0x3ade71['dim']('Use\x20\x22tdx\x20segments\x22\x20to\x20list\x20contents\x20in\x20this\x20context')),console[_0x325416(0x168)](a33_0x3ade71[_0x325416(0x13f)]('Use\x20\x22tdx\x20use\x22\x20to\x20see\x20all\x20context\x20parameters'))),0x0;}catch(_0x46e166){throw _0x46e166;}}}
1
+ const a33_0x5865fd=a33_0x4cd3;(function(_0x5235e6,_0x19f59c){const _0x427cdb=a33_0x4cd3,_0xd7814d=_0x5235e6();while(!![]){try{const _0x186e1b=parseInt(_0x427cdb(0x1ff))/0x1+-parseInt(_0x427cdb(0x1cb))/0x2*(parseInt(_0x427cdb(0x1d1))/0x3)+-parseInt(_0x427cdb(0x1cf))/0x4*(-parseInt(_0x427cdb(0x1f8))/0x5)+-parseInt(_0x427cdb(0x1d2))/0x6*(parseInt(_0x427cdb(0x1fa))/0x7)+parseInt(_0x427cdb(0x1d5))/0x8+-parseInt(_0x427cdb(0x1ef))/0x9*(-parseInt(_0x427cdb(0x1f2))/0xa)+-parseInt(_0x427cdb(0x1f6))/0xb;if(_0x186e1b===_0x19f59c)break;else _0xd7814d['push'](_0xd7814d['shift']());}catch(_0x188f64){_0xd7814d['push'](_0xd7814d['shift']());}}}(a33_0x5ba5,0x70e4e));import{existsSync,statSync}from'fs';import a33_0x108fc3 from'chalk';import{BaseCommand}from'./command.js';import{saveSessionContext}from'../core/session.js';import{withSpinner}from'../utils/spinner.js';function a33_0x4cd3(_0x3a1cc6,_0x4218b5){_0x3a1cc6=_0x3a1cc6-0x1ca;const _0x5ba588=a33_0x5ba5();let _0x4cd336=_0x5ba588[_0x3a1cc6];return _0x4cd336;}import{parsePath,normalizePath}from'../sdk/segment/segment-path-parser.js';import{findTdxConfig}from'../sdk/segment/tdx-config.js';export class SegmentUseCommand extends BaseCommand{[a33_0x5865fd(0x203)]=a33_0x5865fd(0x1d4);['description']=a33_0x5865fd(0x1ed);async['execute'](_0x2a14d4){const _0x3ace20=a33_0x5865fd,{options:_0x54fe0c,args:_0x23ad68,tdx:_0x407881}=_0x2a14d4;if(_0x23ad68['length']===0x0)return console[_0x3ace20(0x1d9)](a33_0x108fc3[_0x3ace20(0x1fb)](_0x3ace20(0x1cd))),console[_0x3ace20(0x1d9)](_0x3ace20(0x1ea)),console[_0x3ace20(0x1d9)](_0x3ace20(0x1e7)),console[_0x3ace20(0x1d9)]('\x20\x20tdx\x20segment\x20use\x20\x22My\x20Audience\x22'),console[_0x3ace20(0x1d9)]('\x20\x20tdx\x20segment\x20use\x20\x22My\x20Audience/Marketing\x22'),console[_0x3ace20(0x1d9)](_0x3ace20(0x202)),console[_0x3ace20(0x1d9)](_0x3ace20(0x1e5)),0x1;const _0x2a4e2=_0x23ad68[0x0],_0x22ae92=_0x54fe0c[_0x3ace20(0x1e0)];try{if(_0x2a4e2==='/')return saveSessionContext({'segment_path':undefined},_0x22ae92),console[_0x3ace20(0x1e8)](a33_0x108fc3[_0x3ace20(0x1ee)](_0x3ace20(0x1ca))),0x0;if(existsSync(_0x2a4e2)&&statSync(_0x2a4e2)[_0x3ace20(0x1e9)]()){let _0x1125df;try{_0x1125df=findTdxConfig(_0x2a4e2);}catch{return console['error'](a33_0x108fc3[_0x3ace20(0x1fb)](_0x3ace20(0x1fe)+_0x2a4e2)),console[_0x3ace20(0x1d9)](a33_0x108fc3[_0x3ace20(0x1f9)]('Tip:\x20Run\x20`tdx\x20sg\x20pull\x20<parent_name>`\x20first\x20to\x20create\x20the\x20folder\x20structure')),0x1;}const _0x2575df=_0x1125df[_0x3ace20(0x1ec)][_0x3ace20(0x204)];return saveSessionContext({'segment_path':_0x2575df,'parent_segment':_0x2575df},_0x22ae92),console[_0x3ace20(0x1e8)](a33_0x108fc3[_0x3ace20(0x1ee)]('✔\x20Context\x20set\x20to:\x20'+a33_0x108fc3[_0x3ace20(0x1f9)](_0x2575df))),0x0;}const _0x236698=_0x54fe0c[_0x3ace20(0x1dc)];let _0x45f3ed=_0x2a4e2;const _0x47628f=parsePath(_0x2a4e2);if(!_0x47628f[_0x3ace20(0x1de)]){if(!_0x236698)return console['error'](a33_0x108fc3[_0x3ace20(0x1fb)](_0x3ace20(0x1fc))),console[_0x3ace20(0x1d9)](a33_0x108fc3[_0x3ace20(0x1f9)](_0x3ace20(0x1df))),0x1;if(_0x2a4e2==='..'){const _0xedf484=_0x236698[_0x3ace20(0x1e4)]('/')['slice'](0x0,-0x1)[_0x3ace20(0x1d6)]('/');_0x45f3ed=_0xedf484||'/';}else _0x2a4e2==='.'?_0x45f3ed=_0x236698:_0x45f3ed=_0x236698+'/'+_0x2a4e2;_0x54fe0c[_0x3ace20(0x1e3)]&&console[_0x3ace20(0x1d9)](_0x3ace20(0x1fd)+_0x45f3ed);}if(_0x45f3ed==='/'||_0x45f3ed==='')return saveSessionContext({'segment_path':undefined},_0x22ae92),console[_0x3ace20(0x1e8)](a33_0x108fc3[_0x3ace20(0x1ee)](_0x3ace20(0x1ca))),0x0;_0x45f3ed=normalizePath(_0x45f3ed);const _0x34f9b1=parsePath(_0x45f3ed)[_0x3ace20(0x1e1)];if(_0x34f9b1['length']===0x0)return saveSessionContext({'segment_path':undefined},_0x22ae92),console[_0x3ace20(0x1e8)](a33_0x108fc3[_0x3ace20(0x1ee)]('✔\x20Context\x20cleared.\x20Back\x20to\x20root.')),0x0;_0x54fe0c[_0x3ace20(0x1e3)]&&(console[_0x3ace20(0x1d9)]('Site:\x20'+_0x54fe0c[_0x3ace20(0x1f3)]),console[_0x3ace20(0x1d9)](_0x3ace20(0x200)+_0x45f3ed));const _0x44dd50=await withSpinner(_0x3ace20(0x1eb)+_0x45f3ed+'\x27...',()=>_0x407881[_0x3ace20(0x1f0)][_0x3ace20(0x1f7)](_0x45f3ed),{'verbose':_0x54fe0c['verbose']}),_0x337758=_0x44dd50[_0x3ace20(0x1dd)];_0x54fe0c['verbose']&&(console[_0x3ace20(0x1d9)](_0x3ace20(0x1ce)+_0x337758[_0x3ace20(0x1d7)]),console[_0x3ace20(0x1d9)]('Parent\x20ID:\x20'+_0x337758['parentId']),_0x337758[_0x3ace20(0x1d3)]&&console[_0x3ace20(0x1d9)](_0x3ace20(0x1f4)+_0x337758[_0x3ace20(0x1d3)]));if(_0x337758['type']==='segment')return console['error'](a33_0x108fc3[_0x3ace20(0x1fb)](_0x3ace20(0x1db))),console[_0x3ace20(0x1d9)](_0x3ace20(0x1cc)),console[_0x3ace20(0x1d9)](a33_0x108fc3[_0x3ace20(0x1f9)](_0x3ace20(0x1d8)+_0x337758[_0x3ace20(0x201)]+(_0x337758['folderPath']?'/'+_0x337758[_0x3ace20(0x1f1)][_0x3ace20(0x1d6)]('/'):''))),0x1;return saveSessionContext({'segment_path':_0x337758[_0x3ace20(0x1e2)],'parent_segment':_0x337758['parentName']},_0x22ae92),console['log'](a33_0x108fc3[_0x3ace20(0x1ee)](_0x3ace20(0x1e6)+a33_0x108fc3['cyan'](_0x337758[_0x3ace20(0x1e2)]))),_0x54fe0c[_0x3ace20(0x1e3)]&&(console[_0x3ace20(0x1d9)](a33_0x108fc3['dim'](_0x3ace20(0x1da))),console[_0x3ace20(0x1d9)](a33_0x108fc3[_0x3ace20(0x1f5)](_0x3ace20(0x1d0)))),0x0;}catch(_0x31cf42){throw _0x31cf42;}}}function a33_0x5ba5(){const _0x58355c=['Resolved\x20path\x20type:\x20','4SRInCv','Use\x20\x22tdx\x20use\x22\x20to\x20see\x20all\x20context\x20parameters','917121QmnZUG','6RcocMv','folderId','segment:use','613888AlGhJD','join','type','Use:\x20tdx\x20segment\x20use\x20','error','Use\x20\x22tdx\x20segments\x22\x20to\x20list\x20contents\x20in\x20this\x20context','Error:\x20Cannot\x20set\x20context\x20to\x20a\x20segment.','segmentPath','data','isAbsolute','Use\x20an\x20absolute\x20path\x20or\x20set\x20context\x20with:\x20tdx\x20segment\x20use\x20<parent_name>','session','segments','fullPath','verbose','split','\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','Examples:','log','isDirectory','Usage:\x20tdx\x20segment\x20use\x20<path>','Resolving\x20path\x20\x27','config','Set\x20current\x20segment/folder\x20context\x20for\x20navigation','green','1226466NGIhDk','segment','folderPath','10BdUecc','site','Folder\x20ID:\x20','dim','1364154BJlhRG','resolvePathToResource','4340755OrZDzQ','cyan','3864623ECEIqP','red','Error:\x20No\x20context\x20set.\x20Cannot\x20use\x20relative\x20path.','Resolved\x20relative\x20path\x20to:\x20','Error:\x20No\x20tdx.json\x20found\x20in\x20or\x20above:\x20','363063yizsoC','Target\x20path:\x20','parentName','\x20\x20tdx\x20segment\x20use\x20/\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Clear\x20context','name','parent_segment','✔\x20Context\x20cleared.\x20Back\x20to\x20root.','2vOwiZy','Context\x20can\x20only\x20be\x20set\x20to\x20a\x20parent\x20segment\x20or\x20folder.','Error:\x20Path\x20is\x20required\x0a'];a33_0x5ba5=function(){return _0x58355c;};return a33_0x5ba5();}
@@ -1 +1 @@
1
- const a34_0x3c7296=a34_0x147a;(function(_0x5e56cc,_0x599486){const _0x26a33e=a34_0x147a,_0x2c880c=_0x5e56cc();while(!![]){try{const _0xcfa737=-parseInt(_0x26a33e(0xd8))/0x1*(parseInt(_0x26a33e(0x101))/0x2)+-parseInt(_0x26a33e(0xf1))/0x3*(-parseInt(_0x26a33e(0xd9))/0x4)+-parseInt(_0x26a33e(0xfe))/0x5+parseInt(_0x26a33e(0xda))/0x6*(parseInt(_0x26a33e(0xea))/0x7)+-parseInt(_0x26a33e(0x105))/0x8+-parseInt(_0x26a33e(0xf7))/0x9*(-parseInt(_0x26a33e(0xdd))/0xa)+-parseInt(_0x26a33e(0xfb))/0xb;if(_0xcfa737===_0x599486)break;else _0x2c880c['push'](_0x2c880c['shift']());}catch(_0xd47bc2){_0x2c880c['push'](_0x2c880c['shift']());}}}(a34_0x1375,0x18ebb));import{BaseCommand}from'./command.js';import{resolveTarget,isSuccessfulResolution}from'../sdk/segment/target-resolution.js';function a34_0x147a(_0x4b1dd4,_0x4c6070){_0x4b1dd4=_0x4b1dd4-0xd6;const _0x1375a0=a34_0x1375();let _0x147a13=_0x1375a0[_0x4b1dd4];return _0x147a13;}import{findYamlFiles}from'../sdk/segment/file-discovery.js';import{existsSync}from'fs';import a34_0x1dbd6f 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_0x3c7296(0xf2);[a34_0x3c7296(0xe6)]=a34_0x3c7296(0x109);async[a34_0x3c7296(0xdf)](_0x5e241f){const _0x95b0d9=a34_0x3c7296,{options:_0x39e479,args:_0x5103e6}=_0x5e241f,_0x4ae5b0=_0x39e479,_0xc201bf=await resolveTarget({'arg':_0x5103e6[0x0],'contextParent':_0x39e479[_0x95b0d9(0xe8)],'cwd':process['cwd']()});if(!isSuccessfulResolution(_0xc201bf))return _0xc201bf['errorCode']===_0x95b0d9(0xff)?(console[_0x95b0d9(0xe9)](a34_0x1dbd6f[_0x95b0d9(0x100)](_0x95b0d9(0xf9))),console[_0x95b0d9(0xe9)](_0x95b0d9(0xf6)),console[_0x95b0d9(0xe9)]('\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['error'](_0x95b0d9(0xfc))):(console[_0x95b0d9(0xe9)](a34_0x1dbd6f[_0x95b0d9(0xf5)](_0x95b0d9(0x103)+_0xc201bf[_0x95b0d9(0xeb)]+'\x0a')),_0xc201bf[_0x95b0d9(0xef)]&&console[_0x95b0d9(0xe9)](a34_0x1dbd6f[_0x95b0d9(0xde)](_0xc201bf[_0x95b0d9(0xef)]))),0x1;const _0x1b26d4=_0xc201bf[_0x95b0d9(0xe4)],_0x4f2392=_0xc201bf[_0x95b0d9(0xe3)]===_0x95b0d9(0xd7)?_0xc201bf[_0x95b0d9(0xec)]:undefined;if(!_0x4f2392&&!existsSync(_0x1b26d4))return console[_0x95b0d9(0xe9)](a34_0x1dbd6f['red']('Error:\x20Directory\x20not\x20found:\x20'+_0x1b26d4+'\x0a')),0x1;let _0x3fe26a;if(_0x4f2392){if(!_0x4f2392[_0x95b0d9(0x104)](_0x95b0d9(0xe2))&&!_0x4f2392[_0x95b0d9(0x104)](_0x95b0d9(0x102)))return console['error'](a34_0x1dbd6f[_0x95b0d9(0xf5)](_0x95b0d9(0xe1)+_0x4f2392+'\x0a')),0x1;_0x3fe26a=[_0x4f2392];}else _0x3fe26a=findYamlFiles(_0x1b26d4);if(_0x3fe26a[_0x95b0d9(0xf3)]===0x0)return console['error'](a34_0x1dbd6f['red']('Error:\x20No\x20YAML\x20files\x20found\x20in\x20'+_0x1b26d4+'\x0a')),0x1;const _0x17ae39=validateYamlFiles(_0x3fe26a,_0x1b26d4),_0x1a83eb=calculateSummary(_0x17ae39);for(const _0x507621 of _0x17ae39){if(!isValidationResult(_0x507621))continue;const {relativePath:_0x206672,source:_0x2ef840,result:_0x1a2f7c,fileType:_0x2384b6}=_0x507621,_0x1e34d8=_0x2384b6;if(_0x1a2f7c['valid']&&_0x1a2f7c[_0x95b0d9(0xdc)][_0x95b0d9(0xf3)]===0x0)_0x4ae5b0['verbose']&&console[_0x95b0d9(0xe7)](a34_0x1dbd6f['green']('✔\x20'+_0x206672)+a34_0x1dbd6f[_0x95b0d9(0xe0)]('\x20('+_0x1e34d8+')'));else _0x1a2f7c[_0x95b0d9(0x10a)]?(console[_0x95b0d9(0xe7)](a34_0x1dbd6f['yellow']('⚠\x20'+_0x206672)+a34_0x1dbd6f[_0x95b0d9(0xe0)]('\x20('+_0x1e34d8+_0x95b0d9(0xee)+_0x1a2f7c[_0x95b0d9(0xdc)]['length']+_0x95b0d9(0x108))),console['log'](formatValidationResult(_0x1a2f7c,_0x2ef840,_0x206672))):(console[_0x95b0d9(0xe7)](a34_0x1dbd6f['red']('✖\x20'+_0x206672)+a34_0x1dbd6f[_0x95b0d9(0xe0)]('\x20('+_0x1e34d8+'):\x20'+_0x1a2f7c['errors'][_0x95b0d9(0xf3)]+_0x95b0d9(0x106))),console[_0x95b0d9(0xe7)](formatValidationResult(_0x1a2f7c,_0x2ef840,_0x206672)));}return console[_0x95b0d9(0xe7)](''),_0x1a83eb[_0x95b0d9(0xf8)]?(console[_0x95b0d9(0xe7)](a34_0x1dbd6f[_0x95b0d9(0xf5)](_0x95b0d9(0xf0)+_0x1a83eb[_0x95b0d9(0xed)]+_0x95b0d9(0xf4)+_0x1a83eb[_0x95b0d9(0xe5)]+'\x20valid')),_0x1a83eb[_0x95b0d9(0xdb)]>0x0&&console[_0x95b0d9(0xe7)](a34_0x1dbd6f[_0x95b0d9(0x100)](_0x1a83eb[_0x95b0d9(0xdb)]+_0x95b0d9(0xfd))),0x1):(console[_0x95b0d9(0xe7)](a34_0x1dbd6f[_0x95b0d9(0x107)](_0x95b0d9(0xfa)+_0x1a83eb['validCount']+_0x95b0d9(0xd6))),_0x1a83eb[_0x95b0d9(0xdb)]>0x0&&console[_0x95b0d9(0xe7)](a34_0x1dbd6f[_0x95b0d9(0x100)](_0x1a83eb['warningCount']+'\x20warning(s)\x20found')),0x0);}}function a34_0x1375(){const _0x39d81d=['10YnhQqY','cyan','execute','dim','Error:\x20File\x20must\x20have\x20.yml\x20or\x20.yaml\x20extension:\x20','.yml','type','targetDir','validCount','description','log','parentSegment','error','791NCPgXQ','message','filePath','invalidCount','):\x20','helpText','Validation\x20failed:\x20','8871SOBICh','segment:validate','length','\x20file(s)\x20with\x20errors,\x20','red','Usage:\x20tdx\x20sg\x20validate\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Validate\x20all\x20(requires\x20context)','1606581OswNjl','hasErrors','parent_segment\x20is\x20not\x20set.\x20Use\x20`tdx\x20sg\x20use\x20<parent_name>`\x20to\x20set\x20it.\x0a','✔\x20All\x20','1188572bXIZCl','\x20\x20\x20\x20\x20\x20\x20tdx\x20sg\x20validate\x20<file_path>\x20\x20#\x20Validate\x20specific\x20file','\x20warning(s)\x20found','114865XjZCmy','no_parent','yellow','928Fvikvx','.yaml','Error:\x20','endsWith','898312nwrHIj','\x20error(s)','green','\x20warning(s)','Validate\x20segment\x20and\x20journey\x20YAML\x20files','valid','\x20file(s)\x20valid','file','41iNRcps','4IkqcRe','9714ViMxeL','warningCount','warnings'];a34_0x1375=function(){return _0x39d81d;};return a34_0x1375();}
1
+ const a34_0x37374=a34_0x31a3;(function(_0x590751,_0x26de25){const _0x5b4622=a34_0x31a3,_0x5b8a89=_0x590751();while(!![]){try{const _0x1737f7=parseInt(_0x5b4622(0xba))/0x1+-parseInt(_0x5b4622(0xb3))/0x2+-parseInt(_0x5b4622(0xab))/0x3+-parseInt(_0x5b4622(0x90))/0x4*(-parseInt(_0x5b4622(0xb9))/0x5)+-parseInt(_0x5b4622(0x9c))/0x6+-parseInt(_0x5b4622(0x91))/0x7+parseInt(_0x5b4622(0xaa))/0x8;if(_0x1737f7===_0x26de25)break;else _0x5b8a89['push'](_0x5b8a89['shift']());}catch(_0x5eb84e){_0x5b8a89['push'](_0x5b8a89['shift']());}}}(a34_0x35ed,0xaa512));import{BaseCommand}from'./command.js';import{resolveTarget,isSuccessfulResolution}from'../sdk/segment/target-resolution.js';import{findYamlFiles}from'../sdk/segment/file-discovery.js';function a34_0x31a3(_0x56442d,_0x32964d){_0x56442d=_0x56442d-0x8c;const _0x35edab=a34_0x35ed();let _0x31a368=_0x35edab[_0x56442d];return _0x31a368;}function a34_0x35ed(){const _0xf50691=['green','errors','parent_segment\x20is\x20not\x20set.\x20Use\x20`tdx\x20sg\x20use\x20<parent_name>`\x20to\x20set\x20it.\x0a','\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','5783748TMKVWj','dim','length','✔\x20All\x20','red','cyan','segment:validate','Error:\x20','warningCount','Validate\x20segment\x20and\x20journey\x20YAML\x20files','\x20file(s)\x20valid','errorCode','name','.yml','15312416yLHqyc','1785489dSZYWH','Error:\x20File\x20must\x20have\x20.yml\x20or\x20.yaml\x20extension:\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','endsWith','Error:\x20Directory\x20not\x20found:\x20','description','invalidCount','1530792KukEKh','no_parent','\x20warning(s)\x20found','warnings','validCount','valid','15WGkjQB','196887acdbFx','hasErrors','\x20valid','error','\x20error(s)','verbose','type','filePath','1373228HYNpfI','831075eoCPwu','yellow','log','file','\x20warning(s)','):\x20','helpText'];a34_0x35ed=function(){return _0xf50691;};return a34_0x35ed();}import{existsSync}from'fs';import a34_0x2031b2 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_0x37374(0xa8)]=a34_0x37374(0xa2);[a34_0x37374(0xb1)]=a34_0x37374(0xa5);async['execute'](_0x1ca076){const _0x121802=a34_0x37374,{options:_0x2d9df7,args:_0x50b784}=_0x1ca076,_0x5ab405=_0x2d9df7,_0x485731=await resolveTarget({'arg':_0x50b784[0x0],'contextParent':_0x2d9df7['parentSegment'],'cwd':process['cwd']()});if(!isSuccessfulResolution(_0x485731))return _0x485731[_0x121802(0xa7)]===_0x121802(0xb4)?(console[_0x121802(0xbd)](a34_0x2031b2[_0x121802(0x92)](_0x121802(0x9a))),console[_0x121802(0xbd)](_0x121802(0xad)),console['error'](_0x121802(0x9b)),console[_0x121802(0xbd)]('\x20\x20\x20\x20\x20\x20\x20tdx\x20sg\x20validate\x20<file_path>\x20\x20#\x20Validate\x20specific\x20file')):(console[_0x121802(0xbd)](a34_0x2031b2[_0x121802(0xa0)](_0x121802(0xa3)+_0x485731['message']+'\x0a')),_0x485731[_0x121802(0x97)]&&console[_0x121802(0xbd)](a34_0x2031b2[_0x121802(0xa1)](_0x485731[_0x121802(0x97)]))),0x1;const _0x18b2a6=_0x485731['targetDir'],_0x5973c9=_0x485731[_0x121802(0x8e)]===_0x121802(0x94)?_0x485731[_0x121802(0x8f)]:undefined;if(!_0x5973c9&&!existsSync(_0x18b2a6))return console['error'](a34_0x2031b2[_0x121802(0xa0)](_0x121802(0xb0)+_0x18b2a6+'\x0a')),0x1;let _0x2edb0c;if(_0x5973c9){if(!_0x5973c9['endsWith'](_0x121802(0xa9))&&!_0x5973c9[_0x121802(0xaf)]('.yaml'))return console[_0x121802(0xbd)](a34_0x2031b2[_0x121802(0xa0)](_0x121802(0xac)+_0x5973c9+'\x0a')),0x1;_0x2edb0c=[_0x5973c9];}else _0x2edb0c=findYamlFiles(_0x18b2a6);if(_0x2edb0c[_0x121802(0x9e)]===0x0)return console[_0x121802(0xbd)](a34_0x2031b2['red']('Error:\x20No\x20YAML\x20files\x20found\x20in\x20'+_0x18b2a6+'\x0a')),0x1;const _0x271e89=validateYamlFiles(_0x2edb0c,_0x18b2a6),_0x552f6a=calculateSummary(_0x271e89);for(const _0x407bca of _0x271e89){if(!isValidationResult(_0x407bca))continue;const {relativePath:_0x19e0f1,source:_0x5706aa,result:_0x32ef62,fileType:_0x58aa00}=_0x407bca,_0x1a681c=_0x58aa00;if(_0x32ef62[_0x121802(0xb8)]&&_0x32ef62[_0x121802(0xb6)][_0x121802(0x9e)]===0x0)_0x5ab405[_0x121802(0x8d)]&&console[_0x121802(0x93)](a34_0x2031b2['green']('✔\x20'+_0x19e0f1)+a34_0x2031b2[_0x121802(0x9d)]('\x20('+_0x1a681c+')'));else _0x32ef62['valid']?(console[_0x121802(0x93)](a34_0x2031b2[_0x121802(0x92)]('⚠\x20'+_0x19e0f1)+a34_0x2031b2[_0x121802(0x9d)]('\x20('+_0x1a681c+_0x121802(0x96)+_0x32ef62[_0x121802(0xb6)][_0x121802(0x9e)]+_0x121802(0x95))),console[_0x121802(0x93)](formatValidationResult(_0x32ef62,_0x5706aa,_0x19e0f1))):(console[_0x121802(0x93)](a34_0x2031b2[_0x121802(0xa0)]('✖\x20'+_0x19e0f1)+a34_0x2031b2[_0x121802(0x9d)]('\x20('+_0x1a681c+_0x121802(0x96)+_0x32ef62[_0x121802(0x99)][_0x121802(0x9e)]+_0x121802(0x8c))),console['log'](formatValidationResult(_0x32ef62,_0x5706aa,_0x19e0f1)));}return console[_0x121802(0x93)](''),_0x552f6a[_0x121802(0xbb)]?(console[_0x121802(0x93)](a34_0x2031b2['red'](_0x121802(0xae)+_0x552f6a[_0x121802(0xb2)]+'\x20file(s)\x20with\x20errors,\x20'+_0x552f6a[_0x121802(0xb7)]+_0x121802(0xbc))),_0x552f6a[_0x121802(0xa4)]>0x0&&console['log'](a34_0x2031b2[_0x121802(0x92)](_0x552f6a[_0x121802(0xa4)]+_0x121802(0xb5))),0x1):(console[_0x121802(0x93)](a34_0x2031b2[_0x121802(0x98)](_0x121802(0x9f)+_0x552f6a['validCount']+_0x121802(0xa6))),_0x552f6a[_0x121802(0xa4)]>0x0&&console[_0x121802(0x93)](a34_0x2031b2[_0x121802(0x92)](_0x552f6a[_0x121802(0xa4)]+'\x20warning(s)\x20found')),0x0);}}
@@ -1 +1 @@
1
- const a35_0x59475f=a35_0x4561;function a35_0x4561(_0x7a73ed,_0xa7a6f9){_0x7a73ed=_0x7a73ed-0x15a;const _0x5775f3=a35_0x5775();let _0x4561d7=_0x5775f3[_0x7a73ed];return _0x4561d7;}(function(_0x4a1782,_0x29f0af){const _0x57d56d=a35_0x4561,_0x1e11b6=_0x4a1782();while(!![]){try{const _0x1e6d2b=parseInt(_0x57d56d(0x1a6))/0x1*(-parseInt(_0x57d56d(0x15f))/0x2)+parseInt(_0x57d56d(0x191))/0x3+parseInt(_0x57d56d(0x168))/0x4*(parseInt(_0x57d56d(0x19d))/0x5)+parseInt(_0x57d56d(0x194))/0x6*(parseInt(_0x57d56d(0x198))/0x7)+parseInt(_0x57d56d(0x172))/0x8*(-parseInt(_0x57d56d(0x1a5))/0x9)+-parseInt(_0x57d56d(0x1a0))/0xa*(-parseInt(_0x57d56d(0x188))/0xb)+-parseInt(_0x57d56d(0x16f))/0xc*(parseInt(_0x57d56d(0x199))/0xd);if(_0x1e6d2b===_0x29f0af)break;else _0x1e11b6['push'](_0x1e11b6['shift']());}catch(_0x3ba71f){_0x1e11b6['push'](_0x1e11b6['shift']());}}}(a35_0x5775,0xd2262));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleSDKOutput}from'../core/command-output.js';import{withSpinner}from'../utils/spinner.js';import{formatFlatList,formatTree}from'../sdk/util/tree-formatter.js';import{getConsoleNextUrl}from'../sdk/client/endpoints.js';import a35_0xec7535 from'chalk';function a35_0x5775(){const _0x495a7e=['description','folders','folderId','listUnified','listWithPattern','jsonl','(not\x20set)',',\x20and\x20','\x20segment','Listing\x20folders,\x20segments,\x20and\x20journeys...','sort','listRecursive','log','1606cqRWtV','/app/ps/',']\x20matching\x20\x27','journeys','Parent\x20ID:\x20','\x27...','replace','site','test','3552864axAOSf','✔\x20Found\x20','\x20\x20tdx\x20sg\x20use\x20\x22My\x20Audience\x22','6POtBSq','resolvePathToResource','error','/e/','8442413igcNvm','4798508iXGRqy','journey','Parent\x20segment\x20context:\x20','execute','2318370GEgoJn','json','Set\x20a\x20parent\x20segment\x20context\x20first:','101170HBUrTo','verbose','\x20folder','recursive','✔\x20Built\x20tree\x20with\x20','1413OOEBoK','2UJkgCz','/j/da','map','folder','format','filter','Folder\x20ID:\x20','758314UHfLqz','parentSegment','\x5c$&','Resolving\x20path\x20\x27','Resolving\x20parent\x20segment\x20\x27','name','dim','data','No\x20items\x20match\x20pattern:\x20','8FJsVLu','(empty)','\x20\x20Cause:\x20','length','parentId','localeCompare','cause','72qGwKjn','journeyBundleName','List\x20folders\x20and\x20child\x20segments','48968lVNNKz','segments','segment','\x20\x20tdx\x20sg\x20pull\x20\x22My\x20Audience\x22','maxDepth','includes','Recursive\x20mode:\x20enabled','\x20journey','type'];a35_0x5775=function(){return _0x495a7e;};return a35_0x5775();}export class SegmentsCommand extends BaseCommand{[a35_0x59475f(0x164)]=a35_0x59475f(0x173);[a35_0x59475f(0x17b)]=a35_0x59475f(0x171);async[a35_0x59475f(0x19c)](_0x21f997){const _0x34ee06=a35_0x59475f,{options:_0x52cd0d,args:_0x3943be}=_0x21f997,_0x4cf5b5=_0x52cd0d[_0x34ee06(0x1a3)],_0x1e372b=_0x3943be[0x0];try{const _0x3a4af1=_0x52cd0d[_0x34ee06(0x160)];_0x52cd0d[_0x34ee06(0x1a1)]&&(console[_0x34ee06(0x196)]('Site:\x20'+_0x52cd0d[_0x34ee06(0x18f)]),console[_0x34ee06(0x196)](_0x34ee06(0x19b)+(_0x3a4af1||_0x34ee06(0x181))),_0x1e372b&&console[_0x34ee06(0x196)]('Folder/pattern\x20arg:\x20'+_0x1e372b),_0x4cf5b5&&console[_0x34ee06(0x196)](_0x34ee06(0x178)));if(!_0x3a4af1)return console[_0x34ee06(0x196)]('Error:\x20No\x20parent\x20segment\x20context\x20set.'),console[_0x34ee06(0x196)](''),console[_0x34ee06(0x196)](_0x34ee06(0x19f)),console[_0x34ee06(0x196)](_0x34ee06(0x175)),console[_0x34ee06(0x196)](_0x34ee06(0x193)),console['error'](''),console[_0x34ee06(0x196)]('Use\x20tdx\x20ps\x20list\x20to\x20see\x20available\x20parent\x20segments.'),0x1;const _0x40142b=_0x1e372b&&(_0x1e372b[_0x34ee06(0x177)]('*')||_0x1e372b[_0x34ee06(0x177)]('?'));if(_0x40142b)return await this[_0x34ee06(0x17f)](_0x21f997,_0x3a4af1,_0x1e372b);const _0x5926ad=_0x1e372b?_0x3a4af1+'/'+_0x1e372b:_0x3a4af1;return _0x4cf5b5?await this['listRecursive'](_0x21f997,_0x5926ad):await this[_0x34ee06(0x17e)](_0x21f997,_0x5926ad);}catch(_0x3c4e43){if(_0x3c4e43 instanceof SDKError)return console[_0x34ee06(0x196)]('Error:\x20'+_0x3c4e43['message']),_0x3c4e43[_0x34ee06(0x16e)]&&console[_0x34ee06(0x196)](_0x34ee06(0x16a)+_0x3c4e43[_0x34ee06(0x16e)]),0x1;throw _0x3c4e43;}}async['listWithPattern'](_0x22f67d,_0x17096c,_0x27498d){const _0x2e65e4=a35_0x59475f,{options:_0x51557c,tdx:_0x587c29}=_0x22f67d,_0xe97dee=await withSpinner(_0x2e65e4(0x163)+_0x17096c+_0x2e65e4(0x18d),()=>_0x587c29[_0x2e65e4(0x174)]['resolvePathToResource'](_0x17096c),{'verbose':_0x51557c['verbose']}),_0x56bf06=_0xe97dee[_0x2e65e4(0x166)],_0x5bdb24=await withSpinner(_0x2e65e4(0x184),()=>_0x587c29[_0x2e65e4(0x174)]['listUnifiedWithJourneys'](_0x56bf06[_0x2e65e4(0x16c)],_0x56bf06[_0x2e65e4(0x17d)]),{'verbose':_0x51557c[_0x2e65e4(0x1a1)]}),{folders:_0xa3b1be,segments:_0x3029ae,journeys:_0x157e14}=_0x5bdb24[_0x2e65e4(0x166)],_0x324514=_0x27498d[_0x2e65e4(0x18e)](/[.+^${}()|[\]\\]/g,_0x2e65e4(0x161))[_0x2e65e4(0x18e)](/\*/g,'.*')[_0x2e65e4(0x18e)](/\?/g,'.'),_0x4bf98c=new RegExp('^'+_0x324514+'$','i'),_0x563776=_0xa3b1be['filter'](_0x20d6c1=>_0x4bf98c[_0x2e65e4(0x190)](_0x20d6c1[_0x2e65e4(0x164)])),_0x3e9273=_0x3029ae['filter'](_0x457670=>_0x4bf98c[_0x2e65e4(0x190)](_0x457670[_0x2e65e4(0x164)])),_0x1dc306=_0x157e14[_0x2e65e4(0x15d)](_0x1e2948=>_0x4bf98c[_0x2e65e4(0x190)](_0x1e2948[_0x2e65e4(0x170)])),_0x294b15=_0x563776[_0x2e65e4(0x16b)]+_0x3e9273[_0x2e65e4(0x16b)]+_0x1dc306['length'];console[_0x2e65e4(0x196)](_0x2e65e4(0x192)+_0x563776[_0x2e65e4(0x16b)]+'\x20folder'+(_0x563776[_0x2e65e4(0x16b)]!==0x1?'s':'')+',\x20'+_0x3e9273[_0x2e65e4(0x16b)]+_0x2e65e4(0x183)+(_0x3e9273[_0x2e65e4(0x16b)]!==0x1?'s':'')+_0x2e65e4(0x182)+_0x1dc306[_0x2e65e4(0x16b)]+_0x2e65e4(0x179)+(_0x1dc306[_0x2e65e4(0x16b)]!==0x1?'s':'')+'\x20matching\x20\x27'+_0x27498d+'\x27');const _0x4456a4=_0x5256fe=>{const _0x11fa9e=_0x2e65e4;return getConsoleNextUrl(_0x51557c[_0x11fa9e(0x18f)],_0x11fa9e(0x189)+_0x56bf06[_0x11fa9e(0x16c)]+_0x11fa9e(0x197)+_0x5256fe);},_0x49a78a=_0x51557c[_0x2e65e4(0x15c)]===_0x2e65e4(0x19e)||_0x51557c[_0x2e65e4(0x15c)]==='jsonl';if(_0x49a78a){const _0x59951a=[..._0x563776['map'](_0x458725=>({..._0x458725,'type':_0x2e65e4(0x15b)})),..._0x3e9273[_0x2e65e4(0x15a)](_0x439b85=>({..._0x439b85,'type':_0x2e65e4(0x174),'url':_0x4456a4(_0x439b85['id'])})),..._0x1dc306['map'](_0x14032a=>({..._0x14032a,'name':_0x14032a[_0x2e65e4(0x170)],'type':'journey'}))]['sort']((_0x4cd4ef,_0x2e7b47)=>_0x4cd4ef[_0x2e65e4(0x164)][_0x2e65e4(0x16d)](_0x2e7b47[_0x2e65e4(0x164)]));await handleSDKOutput(_0x59951a,_0x51557c);}else{if(_0x294b15===0x0)console[_0x2e65e4(0x187)](_0x2e65e4(0x167)+_0x27498d);else{console[_0x2e65e4(0x187)](a35_0xec7535[_0x2e65e4(0x165)]('['+_0x17096c+_0x2e65e4(0x18a)+_0x27498d+'\x27'));const _0x2089ab=formatFlatList(_0x563776,_0x3e9273,{'showMetadata':!![],'getSegmentUrl':_0x4456a4},_0x1dc306);console['log'](_0x2089ab);}}return 0x0;}async[a35_0x59475f(0x17e)](_0x3259c2,_0x101141){const _0x471f34=a35_0x59475f,{options:_0x44bebe,tdx:_0x42c722}=_0x3259c2,_0x2c85ea=await withSpinner(_0x471f34(0x162)+_0x101141+'\x27...',()=>_0x42c722[_0x471f34(0x174)]['resolvePathToResource'](_0x101141),{'verbose':_0x44bebe[_0x471f34(0x1a1)]}),_0x36fe01=_0x2c85ea['data'];_0x44bebe[_0x471f34(0x1a1)]&&(console[_0x471f34(0x196)](_0x471f34(0x18c)+_0x36fe01[_0x471f34(0x16c)]),_0x36fe01[_0x471f34(0x17d)]&&console['error']('Folder\x20ID:\x20'+_0x36fe01[_0x471f34(0x17d)]));const _0x54b627=await withSpinner(_0x471f34(0x184),()=>_0x42c722['segment']['listUnifiedWithJourneys'](_0x36fe01[_0x471f34(0x16c)],_0x36fe01[_0x471f34(0x17d)]),{'verbose':_0x44bebe[_0x471f34(0x1a1)]}),{folders:_0x4691be,segments:_0x1b879,journeys:_0x1a269c}=_0x54b627[_0x471f34(0x166)],_0x4b8b05=_0x4691be[_0x471f34(0x16b)]+_0x1b879['length']+_0x1a269c[_0x471f34(0x16b)];console[_0x471f34(0x196)](_0x471f34(0x192)+_0x4691be['length']+_0x471f34(0x1a2)+(_0x4691be[_0x471f34(0x16b)]!==0x1?'s':'')+',\x20'+_0x1b879[_0x471f34(0x16b)]+_0x471f34(0x183)+(_0x1b879[_0x471f34(0x16b)]!==0x1?'s':'')+_0x471f34(0x182)+_0x1a269c['length']+_0x471f34(0x179)+(_0x1a269c[_0x471f34(0x16b)]!==0x1?'s':''));const _0x217a33=_0x1467e4=>{const _0x57de85=_0x471f34;return getConsoleNextUrl(_0x44bebe[_0x57de85(0x18f)],_0x57de85(0x189)+_0x36fe01['parentId']+'/e/'+_0x1467e4);},_0x494a16=_0x1c45b6=>{const _0x1e5293=_0x471f34;return getConsoleNextUrl(_0x44bebe[_0x1e5293(0x18f)],'/app/ps/'+_0x36fe01['parentId']+'/e/'+_0x1c45b6+_0x1e5293(0x1a7));},_0x1fc348=_0x44bebe[_0x471f34(0x15c)]==='json'||_0x44bebe[_0x471f34(0x15c)]===_0x471f34(0x180);if(_0x1fc348){const _0x3538e5=[..._0x4691be[_0x471f34(0x15a)](_0x5dff41=>({..._0x5dff41,'type':_0x471f34(0x15b)})),..._0x1b879[_0x471f34(0x15a)](_0x2ff83a=>({..._0x2ff83a,'type':_0x471f34(0x174),'url':_0x217a33(_0x2ff83a['id'])})),..._0x1a269c['map'](_0x57c8a2=>({..._0x57c8a2,'name':_0x57c8a2['journeyBundleName'],'type':_0x471f34(0x19a),'url':_0x494a16(_0x57c8a2['id'])}))][_0x471f34(0x185)]((_0x4ae243,_0xe27932)=>_0x4ae243[_0x471f34(0x164)][_0x471f34(0x16d)](_0xe27932['name']));await handleSDKOutput(_0x3538e5,_0x44bebe);}else{if(_0x4b8b05===0x0)console[_0x471f34(0x187)](a35_0xec7535[_0x471f34(0x165)]('['+_0x101141+']')),console['log'](_0x471f34(0x169));else{console['log'](a35_0xec7535[_0x471f34(0x165)]('['+_0x101141+']'));const _0x303e51=formatFlatList(_0x4691be,_0x1b879,{'showMetadata':!![],'getSegmentUrl':_0x217a33,'getJourneyUrl':_0x494a16},_0x1a269c);console[_0x471f34(0x187)](_0x303e51);}}return 0x0;}async[a35_0x59475f(0x186)](_0x86d778,_0x49b6ff){const _0x18311a=a35_0x59475f,{options:_0x1b7da8,tdx:_0x376d41}=_0x86d778,_0x5813e6=await withSpinner(_0x18311a(0x162)+_0x49b6ff+'\x27...',()=>_0x376d41[_0x18311a(0x174)][_0x18311a(0x195)](_0x49b6ff),{'verbose':_0x1b7da8[_0x18311a(0x1a1)]}),_0x40649a=_0x5813e6['data'];_0x1b7da8['verbose']&&(console[_0x18311a(0x196)](_0x18311a(0x18c)+_0x40649a['parentId']),_0x40649a[_0x18311a(0x17d)]&&console['error'](_0x18311a(0x15e)+_0x40649a[_0x18311a(0x17d)]));const _0x3776c8=_0x1b7da8[_0x18311a(0x176)]||0xa,_0x233cb3=await withSpinner('Building\x20hierarchy\x20tree...',()=>_0x376d41['segment'][_0x18311a(0x186)](_0x40649a['parentId'],_0x40649a['folderId'],0x0,_0x3776c8),{'verbose':_0x1b7da8['verbose']}),_0x163adb=_0x233cb3[_0x18311a(0x166)],_0x29c980=_0x4b1e5e=>{const _0x3fc30f=_0x18311a;let _0x1396cb=0x0,_0x599c95=0x0,_0x544891=0x0;for(const _0x39e1c1 of _0x4b1e5e){if(_0x39e1c1[_0x3fc30f(0x17a)]===_0x3fc30f(0x15b))_0x1396cb++;else{if(_0x39e1c1['type']===_0x3fc30f(0x174))_0x599c95++;else{if(_0x39e1c1[_0x3fc30f(0x17a)]===_0x3fc30f(0x19a))_0x544891++;}}if(_0x39e1c1['children']){const _0x2312c0=_0x29c980(_0x39e1c1['children']);_0x1396cb+=_0x2312c0[_0x3fc30f(0x17c)],_0x599c95+=_0x2312c0[_0x3fc30f(0x173)],_0x544891+=_0x2312c0[_0x3fc30f(0x18b)];}}return{'folders':_0x1396cb,'segments':_0x599c95,'journeys':_0x544891};},_0x299448=_0x29c980(_0x163adb);console['error'](_0x18311a(0x1a4)+_0x299448['folders']+_0x18311a(0x1a2)+(_0x299448[_0x18311a(0x17c)]!==0x1?'s':'')+',\x20'+_0x299448['segments']+'\x20segment'+(_0x299448['segments']!==0x1?'s':'')+_0x18311a(0x182)+_0x299448[_0x18311a(0x18b)]+_0x18311a(0x179)+(_0x299448[_0x18311a(0x18b)]!==0x1?'s':''));const _0x529fba=_0x37f5d4=>{const _0x130685=_0x18311a;return getConsoleNextUrl(_0x1b7da8[_0x130685(0x18f)],_0x130685(0x189)+_0x40649a[_0x130685(0x16c)]+'/e/'+_0x37f5d4);},_0x1ea0c8=_0x529120=>{const _0x412bf1=_0x18311a;return getConsoleNextUrl(_0x1b7da8['site'],_0x412bf1(0x189)+_0x40649a[_0x412bf1(0x16c)]+_0x412bf1(0x197)+_0x529120+'/j/da');};if(_0x1b7da8[_0x18311a(0x15c)]==='json'||_0x1b7da8[_0x18311a(0x15c)]===_0x18311a(0x180))await handleSDKOutput(_0x163adb,_0x1b7da8);else{console['log'](a35_0xec7535[_0x18311a(0x165)]('['+_0x49b6ff+']'));const _0x29defe=formatTree(_0x163adb,{'showMetadata':!![],'getSegmentUrl':_0x529fba,'getJourneyUrl':_0x1ea0c8});console[_0x18311a(0x187)](_0x29defe);}return 0x0;}}
1
+ const a35_0x1fb15e=a35_0x32cb;(function(_0x541a8d,_0x3ff363){const _0x5928e6=a35_0x32cb,_0x52ca83=_0x541a8d();while(!![]){try{const _0x4516c5=-parseInt(_0x5928e6(0x185))/0x1*(parseInt(_0x5928e6(0x17c))/0x2)+-parseInt(_0x5928e6(0x192))/0x3*(-parseInt(_0x5928e6(0x155))/0x4)+-parseInt(_0x5928e6(0x196))/0x5+-parseInt(_0x5928e6(0x176))/0x6+-parseInt(_0x5928e6(0x154))/0x7+parseInt(_0x5928e6(0x189))/0x8*(parseInt(_0x5928e6(0x19c))/0x9)+parseInt(_0x5928e6(0x194))/0xa*(parseInt(_0x5928e6(0x161))/0xb);if(_0x4516c5===_0x3ff363)break;else _0x52ca83['push'](_0x52ca83['shift']());}catch(_0x45b826){_0x52ca83['push'](_0x52ca83['shift']());}}}(a35_0x38b9,0x325c8));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleSDKOutput}from'../core/command-output.js';function a35_0x32cb(_0x3ef4b4,_0x107edd){_0x3ef4b4=_0x3ef4b4-0x153;const _0x38b904=a35_0x38b9();let _0x32cb2c=_0x38b904[_0x3ef4b4];return _0x32cb2c;}import{withSpinner}from'../utils/spinner.js';function a35_0x38b9(){const _0x6eaba3=['dim','error','/app/ps/','(not\x20set)','description','Parent\x20segment\x20context:\x20','\x20segment','jsonl','listWithPattern','cause','(empty)','data','folderId','map','resolvePathToResource','children','\x20journey','2007978HlnGDP','segments','\x20\x20Cause:\x20','\x27...','journey','/e/','77918fJoXGN','format','filter','journeyBundleName','folder','site','listRecursive','Recursive\x20mode:\x20enabled',',\x20and\x20','7YsSfSG','✔\x20Found\x20','Set\x20a\x20parent\x20segment\x20context\x20first:','folders','8lLMTWv','type','Site:\x20','Resolving\x20parent\x20segment\x20\x27','replace','Building\x20hierarchy\x20tree...','listUnifiedWithJourneys','Use\x20tdx\x20ps\x20list\x20to\x20see\x20available\x20parent\x20segments.','Resolving\x20path\x20\x27','5631IeliPe','journeys','20HvVyAc','json','998525MEBZKI','Error:\x20No\x20parent\x20segment\x20context\x20set.','test','\x20folder','length','parentSegment','434493LpRhTl','localeCompare','log','Error:\x20','\x20matching\x20\x27','Listing\x20folders,\x20segments,\x20and\x20journeys...','2442741WmeutA','132QCXkHh','Folder\x20ID:\x20','listUnified','segment','sort','name','includes','parentId','message','\x20\x20tdx\x20sg\x20pull\x20\x22My\x20Audience\x22','No\x20items\x20match\x20pattern:\x20','recursive','6886583YErEnD','\x5c$&','verbose','maxDepth'];a35_0x38b9=function(){return _0x6eaba3;};return a35_0x38b9();}import{formatFlatList,formatTree}from'../sdk/util/tree-formatter.js';import{getConsoleNextUrl}from'../sdk/client/endpoints.js';import a35_0x362103 from'chalk';export class SegmentsCommand extends BaseCommand{[a35_0x1fb15e(0x15a)]='segments';[a35_0x1fb15e(0x169)]='List\x20folders\x20and\x20child\x20segments';async['execute'](_0x375853){const _0x188ba4=a35_0x1fb15e,{options:_0x1b702f,args:_0x741531}=_0x375853,_0x464d70=_0x1b702f[_0x188ba4(0x160)],_0x516e24=_0x741531[0x0];try{const _0x244624=_0x1b702f[_0x188ba4(0x19b)];_0x1b702f[_0x188ba4(0x163)]&&(console[_0x188ba4(0x166)](_0x188ba4(0x18b)+_0x1b702f['site']),console[_0x188ba4(0x166)](_0x188ba4(0x16a)+(_0x244624||_0x188ba4(0x168))),_0x516e24&&console[_0x188ba4(0x166)]('Folder/pattern\x20arg:\x20'+_0x516e24),_0x464d70&&console[_0x188ba4(0x166)](_0x188ba4(0x183)));if(!_0x244624)return console[_0x188ba4(0x166)](_0x188ba4(0x197)),console[_0x188ba4(0x166)](''),console[_0x188ba4(0x166)](_0x188ba4(0x187)),console[_0x188ba4(0x166)](_0x188ba4(0x15e)),console[_0x188ba4(0x166)]('\x20\x20tdx\x20sg\x20use\x20\x22My\x20Audience\x22'),console['error'](''),console[_0x188ba4(0x166)](_0x188ba4(0x190)),0x1;const _0x1091b0=_0x516e24&&(_0x516e24[_0x188ba4(0x15b)]('*')||_0x516e24['includes']('?'));if(_0x1091b0)return await this['listWithPattern'](_0x375853,_0x244624,_0x516e24);const _0x198dda=_0x516e24?_0x244624+'/'+_0x516e24:_0x244624;return _0x464d70?await this[_0x188ba4(0x182)](_0x375853,_0x198dda):await this['listUnified'](_0x375853,_0x198dda);}catch(_0x8d6dae){if(_0x8d6dae instanceof SDKError)return console['error'](_0x188ba4(0x19f)+_0x8d6dae[_0x188ba4(0x15d)]),_0x8d6dae[_0x188ba4(0x16e)]&&console[_0x188ba4(0x166)](_0x188ba4(0x178)+_0x8d6dae['cause']),0x1;throw _0x8d6dae;}}async[a35_0x1fb15e(0x16d)](_0x23f647,_0x52d806,_0xc9e30){const _0x5e36fe=a35_0x1fb15e,{options:_0x111d04,tdx:_0x57c44d}=_0x23f647,_0x4fd874=await withSpinner(_0x5e36fe(0x18c)+_0x52d806+_0x5e36fe(0x179),()=>_0x57c44d[_0x5e36fe(0x158)][_0x5e36fe(0x173)](_0x52d806),{'verbose':_0x111d04[_0x5e36fe(0x163)]}),_0x107690=_0x4fd874[_0x5e36fe(0x170)],_0x3d3d22=await withSpinner(_0x5e36fe(0x153),()=>_0x57c44d[_0x5e36fe(0x158)][_0x5e36fe(0x18f)](_0x107690[_0x5e36fe(0x15c)],_0x107690[_0x5e36fe(0x171)]),{'verbose':_0x111d04[_0x5e36fe(0x163)]}),{folders:_0x35d3d3,segments:_0x1b01f3,journeys:_0x5d4658}=_0x3d3d22[_0x5e36fe(0x170)],_0x2450ff=_0xc9e30[_0x5e36fe(0x18d)](/[.+^${}()|[\]\\]/g,_0x5e36fe(0x162))[_0x5e36fe(0x18d)](/\*/g,'.*')[_0x5e36fe(0x18d)](/\?/g,'.'),_0x2e1434=new RegExp('^'+_0x2450ff+'$','i'),_0x38be51=_0x35d3d3[_0x5e36fe(0x17e)](_0x1371ce=>_0x2e1434[_0x5e36fe(0x198)](_0x1371ce[_0x5e36fe(0x15a)])),_0x3a4304=_0x1b01f3[_0x5e36fe(0x17e)](_0x200775=>_0x2e1434[_0x5e36fe(0x198)](_0x200775[_0x5e36fe(0x15a)])),_0x1fbb26=_0x5d4658[_0x5e36fe(0x17e)](_0xf069c0=>_0x2e1434[_0x5e36fe(0x198)](_0xf069c0['journeyBundleName'])),_0x4cc540=_0x38be51[_0x5e36fe(0x19a)]+_0x3a4304[_0x5e36fe(0x19a)]+_0x1fbb26[_0x5e36fe(0x19a)];console[_0x5e36fe(0x166)](_0x5e36fe(0x186)+_0x38be51[_0x5e36fe(0x19a)]+_0x5e36fe(0x199)+(_0x38be51['length']!==0x1?'s':'')+',\x20'+_0x3a4304[_0x5e36fe(0x19a)]+'\x20segment'+(_0x3a4304[_0x5e36fe(0x19a)]!==0x1?'s':'')+_0x5e36fe(0x184)+_0x1fbb26[_0x5e36fe(0x19a)]+_0x5e36fe(0x175)+(_0x1fbb26[_0x5e36fe(0x19a)]!==0x1?'s':'')+_0x5e36fe(0x1a0)+_0xc9e30+'\x27');const _0x2369e9=_0x2ae9a9=>{const _0x261ef0=_0x5e36fe;return getConsoleNextUrl(_0x111d04[_0x261ef0(0x181)],_0x261ef0(0x167)+_0x107690['parentId']+'/e/'+_0x2ae9a9);},_0x35f870=_0x111d04[_0x5e36fe(0x17d)]===_0x5e36fe(0x195)||_0x111d04[_0x5e36fe(0x17d)]===_0x5e36fe(0x16c);if(_0x35f870){const _0x1ff400=[..._0x38be51[_0x5e36fe(0x172)](_0x175ea8=>({..._0x175ea8,'type':_0x5e36fe(0x180)})),..._0x3a4304['map'](_0x163619=>({..._0x163619,'type':_0x5e36fe(0x158),'url':_0x2369e9(_0x163619['id'])})),..._0x1fbb26[_0x5e36fe(0x172)](_0x4f7a4c=>({..._0x4f7a4c,'name':_0x4f7a4c[_0x5e36fe(0x17f)],'type':'journey'}))]['sort']((_0x2d8ff7,_0x3e775c)=>_0x2d8ff7['name'][_0x5e36fe(0x19d)](_0x3e775c['name']));await handleSDKOutput(_0x1ff400,_0x111d04);}else{if(_0x4cc540===0x0)console[_0x5e36fe(0x19e)](_0x5e36fe(0x15f)+_0xc9e30);else{console[_0x5e36fe(0x19e)](a35_0x362103[_0x5e36fe(0x165)]('['+_0x52d806+']\x20matching\x20\x27'+_0xc9e30+'\x27'));const _0x19acce=formatFlatList(_0x38be51,_0x3a4304,{'showMetadata':!![],'getSegmentUrl':_0x2369e9},_0x1fbb26);console['log'](_0x19acce);}}return 0x0;}async[a35_0x1fb15e(0x157)](_0x5f5334,_0x3ad3e5){const _0x2bd88b=a35_0x1fb15e,{options:_0x30c909,tdx:_0x47fc8c}=_0x5f5334,_0x10169c=await withSpinner(_0x2bd88b(0x191)+_0x3ad3e5+_0x2bd88b(0x179),()=>_0x47fc8c[_0x2bd88b(0x158)][_0x2bd88b(0x173)](_0x3ad3e5),{'verbose':_0x30c909['verbose']}),_0x3da815=_0x10169c[_0x2bd88b(0x170)];_0x30c909['verbose']&&(console[_0x2bd88b(0x166)]('Parent\x20ID:\x20'+_0x3da815[_0x2bd88b(0x15c)]),_0x3da815[_0x2bd88b(0x171)]&&console[_0x2bd88b(0x166)](_0x2bd88b(0x156)+_0x3da815[_0x2bd88b(0x171)]));const _0x2d4a52=await withSpinner(_0x2bd88b(0x153),()=>_0x47fc8c[_0x2bd88b(0x158)]['listUnifiedWithJourneys'](_0x3da815[_0x2bd88b(0x15c)],_0x3da815[_0x2bd88b(0x171)]),{'verbose':_0x30c909[_0x2bd88b(0x163)]}),{folders:_0x3d55e1,segments:_0x558fd8,journeys:_0x502a2d}=_0x2d4a52[_0x2bd88b(0x170)],_0x2e7481=_0x3d55e1[_0x2bd88b(0x19a)]+_0x558fd8[_0x2bd88b(0x19a)]+_0x502a2d[_0x2bd88b(0x19a)];console['error'](_0x2bd88b(0x186)+_0x3d55e1[_0x2bd88b(0x19a)]+_0x2bd88b(0x199)+(_0x3d55e1[_0x2bd88b(0x19a)]!==0x1?'s':'')+',\x20'+_0x558fd8['length']+_0x2bd88b(0x16b)+(_0x558fd8['length']!==0x1?'s':'')+_0x2bd88b(0x184)+_0x502a2d[_0x2bd88b(0x19a)]+'\x20journey'+(_0x502a2d[_0x2bd88b(0x19a)]!==0x1?'s':''));const _0x67e44a=_0x1b4939=>{const _0x21c2d2=_0x2bd88b;return getConsoleNextUrl(_0x30c909['site'],'/app/ps/'+_0x3da815['parentId']+_0x21c2d2(0x17b)+_0x1b4939);},_0x368ce0=_0x4a33be=>{const _0x1dd337=_0x2bd88b;return getConsoleNextUrl(_0x30c909[_0x1dd337(0x181)],_0x1dd337(0x167)+_0x3da815[_0x1dd337(0x15c)]+_0x1dd337(0x17b)+_0x4a33be+'/j/da');},_0x46e869=_0x30c909[_0x2bd88b(0x17d)]==='json'||_0x30c909[_0x2bd88b(0x17d)]===_0x2bd88b(0x16c);if(_0x46e869){const _0xb67f84=[..._0x3d55e1[_0x2bd88b(0x172)](_0x3e423f=>({..._0x3e423f,'type':_0x2bd88b(0x180)})),..._0x558fd8[_0x2bd88b(0x172)](_0x471378=>({..._0x471378,'type':'segment','url':_0x67e44a(_0x471378['id'])})),..._0x502a2d[_0x2bd88b(0x172)](_0x5a807a=>({..._0x5a807a,'name':_0x5a807a[_0x2bd88b(0x17f)],'type':_0x2bd88b(0x17a),'url':_0x368ce0(_0x5a807a['id'])}))][_0x2bd88b(0x159)]((_0x234c07,_0x112f56)=>_0x234c07[_0x2bd88b(0x15a)]['localeCompare'](_0x112f56['name']));await handleSDKOutput(_0xb67f84,_0x30c909);}else{if(_0x2e7481===0x0)console[_0x2bd88b(0x19e)](a35_0x362103[_0x2bd88b(0x165)]('['+_0x3ad3e5+']')),console[_0x2bd88b(0x19e)](_0x2bd88b(0x16f));else{console[_0x2bd88b(0x19e)](a35_0x362103[_0x2bd88b(0x165)]('['+_0x3ad3e5+']'));const _0x4d432d=formatFlatList(_0x3d55e1,_0x558fd8,{'showMetadata':!![],'getSegmentUrl':_0x67e44a,'getJourneyUrl':_0x368ce0},_0x502a2d);console[_0x2bd88b(0x19e)](_0x4d432d);}}return 0x0;}async[a35_0x1fb15e(0x182)](_0x3a61f7,_0x384873){const _0x51b8c=a35_0x1fb15e,{options:_0x2a2d05,tdx:_0xfb762}=_0x3a61f7,_0x698bb6=await withSpinner('Resolving\x20path\x20\x27'+_0x384873+_0x51b8c(0x179),()=>_0xfb762[_0x51b8c(0x158)][_0x51b8c(0x173)](_0x384873),{'verbose':_0x2a2d05[_0x51b8c(0x163)]}),_0x10d506=_0x698bb6['data'];_0x2a2d05[_0x51b8c(0x163)]&&(console[_0x51b8c(0x166)]('Parent\x20ID:\x20'+_0x10d506[_0x51b8c(0x15c)]),_0x10d506[_0x51b8c(0x171)]&&console[_0x51b8c(0x166)](_0x51b8c(0x156)+_0x10d506[_0x51b8c(0x171)]));const _0x306442=_0x2a2d05[_0x51b8c(0x164)]||0xa,_0x36fb3e=await withSpinner(_0x51b8c(0x18e),()=>_0xfb762[_0x51b8c(0x158)][_0x51b8c(0x182)](_0x10d506[_0x51b8c(0x15c)],_0x10d506[_0x51b8c(0x171)],0x0,_0x306442),{'verbose':_0x2a2d05[_0x51b8c(0x163)]}),_0x3a39a9=_0x36fb3e['data'],_0x518fe8=_0x3d5952=>{const _0x59c68f=_0x51b8c;let _0x592f82=0x0,_0x4b67a7=0x0,_0x2f4b5e=0x0;for(const _0x597fee of _0x3d5952){if(_0x597fee[_0x59c68f(0x18a)]===_0x59c68f(0x180))_0x592f82++;else{if(_0x597fee[_0x59c68f(0x18a)]==='segment')_0x4b67a7++;else{if(_0x597fee[_0x59c68f(0x18a)]===_0x59c68f(0x17a))_0x2f4b5e++;}}if(_0x597fee[_0x59c68f(0x174)]){const _0xd10d30=_0x518fe8(_0x597fee[_0x59c68f(0x174)]);_0x592f82+=_0xd10d30[_0x59c68f(0x188)],_0x4b67a7+=_0xd10d30[_0x59c68f(0x177)],_0x2f4b5e+=_0xd10d30[_0x59c68f(0x193)];}}return{'folders':_0x592f82,'segments':_0x4b67a7,'journeys':_0x2f4b5e};},_0x2317b7=_0x518fe8(_0x3a39a9);console[_0x51b8c(0x166)]('✔\x20Built\x20tree\x20with\x20'+_0x2317b7[_0x51b8c(0x188)]+_0x51b8c(0x199)+(_0x2317b7[_0x51b8c(0x188)]!==0x1?'s':'')+',\x20'+_0x2317b7['segments']+'\x20segment'+(_0x2317b7[_0x51b8c(0x177)]!==0x1?'s':'')+_0x51b8c(0x184)+_0x2317b7[_0x51b8c(0x193)]+'\x20journey'+(_0x2317b7[_0x51b8c(0x193)]!==0x1?'s':''));const _0x5c5dc4=_0x2cbfcd=>{const _0x4243d2=_0x51b8c;return getConsoleNextUrl(_0x2a2d05['site'],_0x4243d2(0x167)+_0x10d506[_0x4243d2(0x15c)]+_0x4243d2(0x17b)+_0x2cbfcd);},_0x25a216=_0x51a6be=>{const _0x52ed7a=_0x51b8c;return getConsoleNextUrl(_0x2a2d05[_0x52ed7a(0x181)],_0x52ed7a(0x167)+_0x10d506['parentId']+_0x52ed7a(0x17b)+_0x51a6be+'/j/da');};if(_0x2a2d05[_0x51b8c(0x17d)]===_0x51b8c(0x195)||_0x2a2d05['format']===_0x51b8c(0x16c))await handleSDKOutput(_0x3a39a9,_0x2a2d05);else{console[_0x51b8c(0x19e)](a35_0x362103[_0x51b8c(0x165)]('['+_0x384873+']'));const _0x5b1865=formatTree(_0x3a39a9,{'showMetadata':!![],'getSegmentUrl':_0x5c5dc4,'getJourneyUrl':_0x25a216});console[_0x51b8c(0x19e)](_0x5b1865);}return 0x0;}}
@@ -1 +1 @@
1
- const a36_0x965fe5=a36_0x2bc4;(function(_0x5d5f01,_0x2d6a41){const _0x29b3c8=a36_0x2bc4,_0x4ed3d5=_0x5d5f01();while(!![]){try{const _0x590735=parseInt(_0x29b3c8(0x1b6))/0x1+-parseInt(_0x29b3c8(0x195))/0x2+-parseInt(_0x29b3c8(0x1a0))/0x3*(-parseInt(_0x29b3c8(0x1b0))/0x4)+parseInt(_0x29b3c8(0x19d))/0x5+parseInt(_0x29b3c8(0x1ab))/0x6*(parseInt(_0x29b3c8(0x1b4))/0x7)+parseInt(_0x29b3c8(0x18f))/0x8+-parseInt(_0x29b3c8(0x1ac))/0x9;if(_0x590735===_0x2d6a41)break;else _0x4ed3d5['push'](_0x4ed3d5['shift']());}catch(_0x3bb5d3){_0x4ed3d5['push'](_0x4ed3d5['shift']());}}}(a36_0x4a3b,0x8e18e));function a36_0x4a3b(){const _0x3a2970=['site','Usage:\x20tdx\x20show\x20<database.table>','database','Error:\x20','...','Database:\x20','show','execute','\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--database\x20<database>','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','78FBLgvL','23623515ozqyrP','validate','Limit:\x20','\x20\x20Cause:\x20','628LWHJSG','Querying\x20','data','Show\x20table\x20contents','618877TohPnW','length','652707Eclssu','4958552PxNlYL','limit','query','name','Site:\x20','catalog','511692flAMHA','cause','args','✔\x20Retrieved\x20','showTable','error','Table:\x20','\x20row','1959805OaBmkj','message','table','12399PQzTvC'];a36_0x4a3b=function(){return _0x3a2970;};return a36_0x4a3b();}import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleSDKOutput}from'../core/command-output.js';function a36_0x2bc4(_0x1cc6b5,_0x247c34){_0x1cc6b5=_0x1cc6b5-0x18f;const _0x4a3ba7=a36_0x4a3b();let _0x2bc44f=_0x4a3ba7[_0x1cc6b5];return _0x2bc44f;}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_0x965fe5(0x192)]=a36_0x965fe5(0x1a7);['description']=a36_0x965fe5(0x1b3);async[a36_0x965fe5(0x1a8)](_0x3a64c9){const _0x1799a0=a36_0x965fe5;return this[_0x1799a0(0x199)](_0x3a64c9);}async[a36_0x965fe5(0x199)](_0x21b51f){const _0xab0482=a36_0x965fe5,{options:_0x2abb68,args:_0x2f6e5d,tdx:_0x541451}=_0x21b51f;let _0x509ee8;try{_0x509ee8=parseTableReference(_0x2f6e5d[0x0]);const _0x326ff7=_0x2abb68[_0xab0482(0x1a3)];!_0x509ee8[_0xab0482(0x1a3)]&&_0x326ff7&&(_0x509ee8[_0xab0482(0x1a3)]=_0x326ff7);const _0x5e5ac6=validateTableDescribeReference(_0x509ee8);if(_0x5e5ac6)return console[_0xab0482(0x19a)](_0xab0482(0x1a4)+_0x5e5ac6),console[_0xab0482(0x19a)](_0xab0482(0x1a2)),console[_0xab0482(0x19a)]('\x20\x20\x20or:\x20tdx\x20show\x20<catalog.database.table>'),console[_0xab0482(0x19a)](_0xab0482(0x1a9)),0x1;}catch(_0x3bc43c){return console[_0xab0482(0x19a)](_0xab0482(0x1a4)+_0x3bc43c[_0xab0482(0x19e)]),console[_0xab0482(0x19a)](_0xab0482(0x1a2)),console['error']('\x20\x20\x20or:\x20tdx\x20show\x20<catalog.database.table>'),console[_0xab0482(0x19a)]('\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--database\x20<database>'),0x1;}const _0x50e8d0=_0x509ee8[_0xab0482(0x194)],_0x399e36=_0x509ee8['database'],_0x1bea76=_0x509ee8[_0xab0482(0x19f)],_0x4c686e=resolveLimit(_0x2abb68[_0xab0482(0x190)],DEFAULT_DISPLAY_LIMIT);try{_0x2abb68['verbose']&&(console['error'](_0xab0482(0x193)+_0x2abb68[_0xab0482(0x1a1)]),_0x50e8d0&&console[_0xab0482(0x19a)]('Catalog:\x20'+_0x50e8d0),console[_0xab0482(0x19a)](_0xab0482(0x1a6)+_0x399e36),console[_0xab0482(0x19a)](_0xab0482(0x19b)+_0x1bea76),console[_0xab0482(0x19a)](_0xab0482(0x1ae)+_0x4c686e));const _0x7cf7d0=_0x50e8d0?_0x50e8d0+'.'+_0x399e36+'.'+_0x1bea76:_0x399e36+'.'+_0x1bea76,_0x1fc0f2=await withSpinner(_0xab0482(0x1b1)+_0x7cf7d0+_0xab0482(0x1a5),()=>_0x541451[_0xab0482(0x191)][_0xab0482(0x199)](_0x399e36,_0x1bea76,_0x4c686e,_0x50e8d0),{'verbose':_0x2abb68['verbose']}),_0x432249=_0x1fc0f2[_0xab0482(0x1b2)],_0x330181=_0x432249[_0xab0482(0x1b2)];return _0x330181[_0xab0482(0x1b5)]===0x0?console[_0xab0482(0x19a)]('✔\x20Query\x20successful\x20-\x200\x20rows\x20returned'):console[_0xab0482(0x19a)](_0xab0482(0x198)+_0x330181[_0xab0482(0x1b5)]+_0xab0482(0x19c)+(_0x330181['length']!==0x1?'s':'')+'\x20from\x20'+_0x7cf7d0),await handleSDKOutput(_0x330181,_0x2abb68),0x0;}catch(_0x3d920e){if(_0x3d920e instanceof SDKError)return console[_0xab0482(0x19a)]('Error:\x20'+_0x3d920e['message']),_0x3d920e[_0xab0482(0x196)]&&console[_0xab0482(0x19a)](_0xab0482(0x1af)+_0x3d920e[_0xab0482(0x196)]),0x1;throw _0x3d920e;}}[a36_0x965fe5(0x1ad)](_0x15530a){const _0x2df424=a36_0x965fe5;if(_0x15530a[_0x2df424(0x197)][_0x2df424(0x1b5)]===0x0)return'Usage:\x20tdx\x20show\x20<database.table>\x0a\x20\x20\x20or:\x20tdx\x20show\x20<catalog.database.table>\x0a\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--database\x20<database>\x0a\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--in\x20<database>\x0a\x0aRun\x20\x27tdx\x20show\x20--help\x27\x20for\x20more\x20options';if(_0x15530a[_0x2df424(0x197)][_0x2df424(0x1b5)]>0x1)return _0x2df424(0x1aa);return undefined;}}
1
+ const a36_0x173e67=a36_0x5eab;(function(_0x465f08,_0x571f58){const _0x634085=a36_0x5eab,_0x22e16b=_0x465f08();while(!![]){try{const _0x2596e7=-parseInt(_0x634085(0xca))/0x1+parseInt(_0x634085(0xbb))/0x2*(parseInt(_0x634085(0xb6))/0x3)+parseInt(_0x634085(0xc8))/0x4*(-parseInt(_0x634085(0xc4))/0x5)+parseInt(_0x634085(0xc9))/0x6+-parseInt(_0x634085(0xcb))/0x7*(parseInt(_0x634085(0xb9))/0x8)+parseInt(_0x634085(0xcf))/0x9*(-parseInt(_0x634085(0xbf))/0xa)+parseInt(_0x634085(0xb0))/0xb*(parseInt(_0x634085(0xb3))/0xc);if(_0x2596e7===_0x571f58)break;else _0x22e16b['push'](_0x22e16b['shift']());}catch(_0x302008){_0x22e16b['push'](_0x22e16b['shift']());}}}(a36_0x257c,0x49572));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_0x257c(){const _0x291ff7=['length','data','validate','2448370HIXdKU','error','\x20\x20Cause:\x20','name','Limit:\x20','5UzpRML','Table:\x20','show','Database:\x20','1035448uYXYVD','1786962VjwLhT','2834qgsIVh','1790929VaTiTx','\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--database\x20<database>','cause','site','18cMKvNN','description','Site:\x20','execute','Querying\x20','Usage:\x20tdx\x20show\x20<database.table>','Catalog:\x20','✔\x20Query\x20successful\x20-\x200\x20rows\x20returned','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','Error:\x20','query','\x20\x20\x20or:\x20tdx\x20show\x20<catalog.database.table>','✔\x20Retrieved\x20','showTable','55BGsSxJ','limit','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','1638348GbHIQm','catalog','args','3mMsiEu','Show\x20table\x20contents','database','16bMyUac','message','1165988epZjNr'];a36_0x257c=function(){return _0x291ff7;};return a36_0x257c();}import{DEFAULT_DISPLAY_LIMIT,resolveLimit}from'../core/constants.js';function a36_0x5eab(_0x443361,_0x34774b){_0x443361=_0x443361-0xae;const _0x257cca=a36_0x257c();let _0x5eab3=_0x257cca[_0x443361];return _0x5eab3;}export class ShowCommand extends BaseCommand{[a36_0x173e67(0xc2)]=a36_0x173e67(0xc6);[a36_0x173e67(0xd0)]=a36_0x173e67(0xb7);async[a36_0x173e67(0xd2)](_0x176ea1){return this['showTable'](_0x176ea1);}async[a36_0x173e67(0xaf)](_0x3b6863){const _0x240a58=a36_0x173e67,{options:_0x4627eb,args:_0x16ebef,tdx:_0x27c1cb}=_0x3b6863;let _0x4f118e;try{_0x4f118e=parseTableReference(_0x16ebef[0x0]);const _0x23ecd0=_0x4627eb[_0x240a58(0xb8)];!_0x4f118e[_0x240a58(0xb8)]&&_0x23ecd0&&(_0x4f118e['database']=_0x23ecd0);const _0x54829f=validateTableDescribeReference(_0x4f118e);if(_0x54829f)return console[_0x240a58(0xc0)](_0x240a58(0xd8)+_0x54829f),console[_0x240a58(0xc0)]('Usage:\x20tdx\x20show\x20<database.table>'),console[_0x240a58(0xc0)](_0x240a58(0xda)),console[_0x240a58(0xc0)](_0x240a58(0xcc)),0x1;}catch(_0x4840b6){return console['error'](_0x240a58(0xd8)+_0x4840b6[_0x240a58(0xba)]),console[_0x240a58(0xc0)](_0x240a58(0xd4)),console[_0x240a58(0xc0)](_0x240a58(0xda)),console[_0x240a58(0xc0)]('\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--database\x20<database>'),0x1;}const _0x45f1a8=_0x4f118e[_0x240a58(0xb4)],_0x14b1de=_0x4f118e[_0x240a58(0xb8)],_0x4d0ba1=_0x4f118e['table'],_0x4453d3=resolveLimit(_0x4627eb[_0x240a58(0xb1)],DEFAULT_DISPLAY_LIMIT);try{_0x4627eb['verbose']&&(console[_0x240a58(0xc0)](_0x240a58(0xd1)+_0x4627eb[_0x240a58(0xce)]),_0x45f1a8&&console[_0x240a58(0xc0)](_0x240a58(0xd5)+_0x45f1a8),console['error'](_0x240a58(0xc7)+_0x14b1de),console[_0x240a58(0xc0)](_0x240a58(0xc5)+_0x4d0ba1),console[_0x240a58(0xc0)](_0x240a58(0xc3)+_0x4453d3));const _0x3ef642=_0x45f1a8?_0x45f1a8+'.'+_0x14b1de+'.'+_0x4d0ba1:_0x14b1de+'.'+_0x4d0ba1,_0x25c1d1=await withSpinner(_0x240a58(0xd3)+_0x3ef642+'...',()=>_0x27c1cb[_0x240a58(0xd9)]['showTable'](_0x14b1de,_0x4d0ba1,_0x4453d3,_0x45f1a8),{'verbose':_0x4627eb['verbose']}),_0x1b8f33=_0x25c1d1['data'],_0x736673=_0x1b8f33[_0x240a58(0xbd)];return _0x736673[_0x240a58(0xbc)]===0x0?console[_0x240a58(0xc0)](_0x240a58(0xd6)):console[_0x240a58(0xc0)](_0x240a58(0xae)+_0x736673[_0x240a58(0xbc)]+'\x20row'+(_0x736673[_0x240a58(0xbc)]!==0x1?'s':'')+'\x20from\x20'+_0x3ef642),await handleSDKOutput(_0x736673,_0x4627eb),0x0;}catch(_0x2ad58b){if(_0x2ad58b instanceof SDKError)return console[_0x240a58(0xc0)]('Error:\x20'+_0x2ad58b['message']),_0x2ad58b[_0x240a58(0xcd)]&&console[_0x240a58(0xc0)](_0x240a58(0xc1)+_0x2ad58b[_0x240a58(0xcd)]),0x1;throw _0x2ad58b;}}[a36_0x173e67(0xbe)](_0x480a7c){const _0x601f29=a36_0x173e67;if(_0x480a7c['args']['length']===0x0)return _0x601f29(0xb2);if(_0x480a7c[_0x601f29(0xb5)]['length']>0x1)return _0x601f29(0xd7);return undefined;}}
@@ -1 +1 @@
1
- const a37_0x4ef797=a37_0x4c83;(function(_0x37825d,_0x2904aa){const _0x462916=a37_0x4c83,_0x3def14=_0x37825d();while(!![]){try{const _0x440173=-parseInt(_0x462916(0x101))/0x1+-parseInt(_0x462916(0x103))/0x2*(-parseInt(_0x462916(0x112))/0x3)+parseInt(_0x462916(0x118))/0x4*(-parseInt(_0x462916(0x10e))/0x5)+parseInt(_0x462916(0x124))/0x6+-parseInt(_0x462916(0x107))/0x7*(-parseInt(_0x462916(0x106))/0x8)+-parseInt(_0x462916(0x102))/0x9*(parseInt(_0x462916(0x11f))/0xa)+parseInt(_0x462916(0x116))/0xb*(parseInt(_0x462916(0x128))/0xc);if(_0x440173===_0x2904aa)break;else _0x3def14['push'](_0x3def14['shift']());}catch(_0x2e344d){_0x3def14['push'](_0x3def14['shift']());}}}(a37_0x5213,0x3eabc));function a37_0x4c83(_0x33b417,_0x4ccd23){_0x33b417=_0x33b417-0xfc;const _0x52139d=a37_0x5213();let _0x4c83a7=_0x52139d[_0x33b417];return _0x4c83a7;}import{BaseCommand,printAuthError}from'./command.js';import{resolveAPIKeyAsync}from'../core/config.js';function a37_0x5213(){const _0x2ee31b=['config','2652PasjLq','Show\x20authentication\x20status\x20and\x20current\x20context','displayWithSources','getUserInfo','11HhZKfd','User:','141424kSyHQE','CLI\x20flag','yellow','dim','site:\x20','status','(from\x20','4628190fqJNav','N/A','profile','Account\x20ID:','name','1235766thDMgX','✓\x20Authentication\x20successful\x0a','log','jobs','609888wbRJMD','red','cli','cyan','green','error','376511AROIas','9DyOPDF','1114pGlQlK','join','profileSource','8qCfaYi','2675491EhXXTs','\x20profile:\x20','account_id','first_name','session','last_name','filter','5DTYGQq','bold','No\x20credential\x20found'];a37_0x5213=function(){return _0x2ee31b;};return a37_0x5213();}import{HTTPClientError}from'../sdk/client/http-client.js';import{GlobalContext}from'../core/global-context.js';import a37_0x14a8c9 from'chalk';export class StatusCommand extends BaseCommand{[a37_0x4ef797(0x123)]=a37_0x4ef797(0x11d);['description']=a37_0x4ef797(0x113);async['execute'](_0x282e4b){const _0x12b0fc=a37_0x4ef797,{options:_0x1e1995,tdx:_0x397a25}=_0x282e4b,_0x27ac57=_0x1e1995['site'],_0x549ff0=new GlobalContext(_0x1e1995),_0x28d041=_0x549ff0[_0x12b0fc(0x121)],_0xb259f7=_0x549ff0[_0x12b0fc(0x105)],_0xd1b215=_0xb259f7===_0x12b0fc(0xfd)?_0x12b0fc(0x119):_0xb259f7===_0x12b0fc(0x10b)?_0x12b0fc(0x10b):_0xb259f7==='env'?'TDX_PROFILE\x20env':_0xb259f7===_0x12b0fc(0x111)?'config':null,_0x20590e=_0x28d041?a37_0x14a8c9[_0x12b0fc(0xfe)](_0x28d041):a37_0x14a8c9[_0x12b0fc(0x11b)](_0x12b0fc(0x120)),_0x4e8380=_0xd1b215?'\x20'+a37_0x14a8c9[_0x12b0fc(0x11b)](_0x12b0fc(0x11e)+_0xd1b215+')'):'';console['log'](a37_0x14a8c9[_0x12b0fc(0x10f)]('tdx')+_0x12b0fc(0x108)+_0x20590e+_0x4e8380+'\x20'+a37_0x14a8c9[_0x12b0fc(0x11b)]('(')+_0x12b0fc(0x11c)+a37_0x14a8c9[_0x12b0fc(0xfe)](_0x27ac57)+a37_0x14a8c9[_0x12b0fc(0x11b)](')'));const _0x3ec245=await resolveAPIKeyAsync(_0x27ac57,_0x28d041);if(_0x3ec245){const {source:_0x4ee743,isDeprecated:_0x2ea489}=_0x3ec245,_0x452dbc='Read\x20credential\x20from\x20'+a37_0x14a8c9[_0x12b0fc(0xfe)](_0x4ee743);console['log'](_0x2ea489?a37_0x14a8c9[_0x12b0fc(0x11a)](_0x452dbc):_0x452dbc);}else console[_0x12b0fc(0x126)](a37_0x14a8c9[_0x12b0fc(0x11a)](_0x12b0fc(0x110)));let _0x17c8a8=![];try{const _0x37edd3=await _0x397a25[_0x12b0fc(0x127)][_0x12b0fc(0x115)]();console[_0x12b0fc(0x126)](a37_0x14a8c9[_0x12b0fc(0xff)](_0x12b0fc(0x125))),console[_0x12b0fc(0x126)](a37_0x14a8c9[_0x12b0fc(0x10f)](_0x12b0fc(0x117))+'\x20'+a37_0x14a8c9[_0x12b0fc(0xfe)](_0x37edd3['email']));if(_0x37edd3[_0x12b0fc(0x10a)]||_0x37edd3[_0x12b0fc(0x10c)]){const _0x511e79=[_0x37edd3[_0x12b0fc(0x10a)],_0x37edd3[_0x12b0fc(0x10c)]][_0x12b0fc(0x10d)](Boolean)[_0x12b0fc(0x104)]('\x20');console[_0x12b0fc(0x126)](a37_0x14a8c9[_0x12b0fc(0x10f)]('Name:')+'\x20'+_0x511e79);}_0x37edd3['account_id']&&console[_0x12b0fc(0x126)](a37_0x14a8c9['bold'](_0x12b0fc(0x122))+'\x20'+a37_0x14a8c9[_0x12b0fc(0x11a)](_0x37edd3[_0x12b0fc(0x109)])),_0x17c8a8=!![];}catch(_0x3a0207){_0x3a0207 instanceof HTTPClientError&&_0x3a0207[_0x12b0fc(0x11d)]===0x191?printAuthError(_0x3a0207,!![],_0x28d041):console[_0x12b0fc(0x100)](a37_0x14a8c9[_0x12b0fc(0xfc)]('✗\x20Validation\x20failed:\x20'+(_0x3a0207 instanceof Error?_0x3a0207['message']:String(_0x3a0207))));}return console['log'](),_0x549ff0[_0x12b0fc(0x114)](),_0x17c8a8?0x0:0x1;}}
1
+ const a37_0x490596=a37_0x442a;(function(_0x37ac9f,_0x36d12c){const _0x54fba1=a37_0x442a,_0x2b99f7=_0x37ac9f();while(!![]){try{const _0x330daa=parseInt(_0x54fba1(0x138))/0x1*(-parseInt(_0x54fba1(0x12d))/0x2)+-parseInt(_0x54fba1(0x13d))/0x3+parseInt(_0x54fba1(0x13e))/0x4*(parseInt(_0x54fba1(0x120))/0x5)+parseInt(_0x54fba1(0x12b))/0x6*(-parseInt(_0x54fba1(0x146))/0x7)+parseInt(_0x54fba1(0x13f))/0x8+parseInt(_0x54fba1(0x130))/0x9+parseInt(_0x54fba1(0x139))/0xa;if(_0x330daa===_0x36d12c)break;else _0x2b99f7['push'](_0x2b99f7['shift']());}catch(_0x31e1b8){_0x2b99f7['push'](_0x2b99f7['shift']());}}}(a37_0x568a,0xf2e3d));function a37_0x442a(_0x49c2cd,_0x356482){_0x49c2cd=_0x49c2cd-0x11b;const _0x568a93=a37_0x568a();let _0x442a35=_0x568a93[_0x49c2cd];return _0x442a35;}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';function a37_0x568a(){const _0x12334b=['1cdFfqd','10547540ClPnAP','profile','config','last_name','2293368idvCNl','1432rfvwnc','14957392FTlwiM','cyan','site','execute','displayWithSources','TDX_PROFILE\x20env','CLI\x20flag','21GvPuXt','error','yellow','No\x20credential\x20found','jobs','\x20profile:\x20','N/A','join','7970LyTMHS','green','(from\x20','name','tdx','dim','session','filter','first_name','Account\x20ID:','log','2731236jnsfCc','bold','3704146EIIbcX','Read\x20credential\x20from\x20','✗\x20Validation\x20failed:\x20','13337496zuYAYD','description','status','cli','profileSource','message','account_id','email'];a37_0x568a=function(){return _0x12334b;};return a37_0x568a();}import a37_0x1209d7 from'chalk';export class StatusCommand extends BaseCommand{[a37_0x490596(0x123)]=a37_0x490596(0x132);[a37_0x490596(0x131)]='Show\x20authentication\x20status\x20and\x20current\x20context';async[a37_0x490596(0x142)](_0x16324d){const _0x429d55=a37_0x490596,{options:_0x59f926,tdx:_0x48c4b7}=_0x16324d,_0x85e68f=_0x59f926[_0x429d55(0x141)],_0x1530bb=new GlobalContext(_0x59f926),_0x3cc422=_0x1530bb[_0x429d55(0x13a)],_0x4263ac=_0x1530bb[_0x429d55(0x134)],_0x3065d6=_0x4263ac===_0x429d55(0x133)?_0x429d55(0x145):_0x4263ac===_0x429d55(0x126)?_0x429d55(0x126):_0x4263ac==='env'?_0x429d55(0x144):_0x4263ac==='config'?_0x429d55(0x13b):null,_0x141de5=_0x3cc422?a37_0x1209d7[_0x429d55(0x140)](_0x3cc422):a37_0x1209d7[_0x429d55(0x125)](_0x429d55(0x11e)),_0x32a3d0=_0x3065d6?'\x20'+a37_0x1209d7[_0x429d55(0x125)](_0x429d55(0x122)+_0x3065d6+')'):'';console['log'](a37_0x1209d7[_0x429d55(0x12c)](_0x429d55(0x124))+_0x429d55(0x11d)+_0x141de5+_0x32a3d0+'\x20'+a37_0x1209d7['dim']('(')+'site:\x20'+a37_0x1209d7[_0x429d55(0x140)](_0x85e68f)+a37_0x1209d7[_0x429d55(0x125)](')'));const _0x4da59b=await resolveAPIKeyAsync(_0x85e68f,_0x3cc422);if(_0x4da59b){const {source:_0x41bb37,isDeprecated:_0x5083fe}=_0x4da59b,_0x38298b=_0x429d55(0x12e)+a37_0x1209d7[_0x429d55(0x140)](_0x41bb37);console['log'](_0x5083fe?a37_0x1209d7['yellow'](_0x38298b):_0x38298b);}else console[_0x429d55(0x12a)](a37_0x1209d7[_0x429d55(0x148)](_0x429d55(0x11b)));let _0x3130e2=![];try{const _0x4c91da=await _0x48c4b7[_0x429d55(0x11c)]['getUserInfo']();console[_0x429d55(0x12a)](a37_0x1209d7[_0x429d55(0x121)]('✓\x20Authentication\x20successful\x0a')),console[_0x429d55(0x12a)](a37_0x1209d7['bold']('User:')+'\x20'+a37_0x1209d7[_0x429d55(0x140)](_0x4c91da[_0x429d55(0x137)]));if(_0x4c91da[_0x429d55(0x128)]||_0x4c91da[_0x429d55(0x13c)]){const _0x2a0a33=[_0x4c91da[_0x429d55(0x128)],_0x4c91da[_0x429d55(0x13c)]][_0x429d55(0x127)](Boolean)[_0x429d55(0x11f)]('\x20');console[_0x429d55(0x12a)](a37_0x1209d7['bold']('Name:')+'\x20'+_0x2a0a33);}_0x4c91da['account_id']&&console[_0x429d55(0x12a)](a37_0x1209d7[_0x429d55(0x12c)](_0x429d55(0x129))+'\x20'+a37_0x1209d7[_0x429d55(0x148)](_0x4c91da[_0x429d55(0x136)])),_0x3130e2=!![];}catch(_0x4bce77){_0x4bce77 instanceof HTTPClientError&&_0x4bce77['status']===0x191?printAuthError(_0x4bce77,!![],_0x3cc422):console[_0x429d55(0x147)](a37_0x1209d7['red'](_0x429d55(0x12f)+(_0x4bce77 instanceof Error?_0x4bce77[_0x429d55(0x135)]:String(_0x4bce77))));}return console[_0x429d55(0x12a)](),_0x1530bb[_0x429d55(0x143)](),_0x3130e2?0x0:0x1;}}
@@ -1 +1 @@
1
- const a38_0x3b9bc2=a38_0x4888;(function(_0x870fa8,_0x4fe5d9){const _0x38e59e=a38_0x4888,_0x53edbe=_0x870fa8();while(!![]){try{const _0x584c2e=-parseInt(_0x38e59e(0x155))/0x1*(-parseInt(_0x38e59e(0x14b))/0x2)+parseInt(_0x38e59e(0x137))/0x3+parseInt(_0x38e59e(0x12b))/0x4+parseInt(_0x38e59e(0x158))/0x5+parseInt(_0x38e59e(0x146))/0x6+parseInt(_0x38e59e(0x159))/0x7+parseInt(_0x38e59e(0x14f))/0x8*(-parseInt(_0x38e59e(0x150))/0x9);if(_0x584c2e===_0x4fe5d9)break;else _0x53edbe['push'](_0x53edbe['shift']());}catch(_0x4a729c){_0x53edbe['push'](_0x53edbe['shift']());}}}(a38_0x8046,0xb9cf3));import{BaseCommand}from'./command.js';function a38_0x4888(_0x298ca3,_0x347ec0){_0x298ca3=_0x298ca3-0x127;const _0x8046f4=a38_0x8046();let _0x488840=_0x8046f4[_0x298ca3];return _0x488840;}import{SDKError}from'../sdk/index.js';function a38_0x8046(){const _0x3961b1=['\x27\x20may\x20not\x20exist\x20or\x20contains\x20no\x20tables','\x20\x20Or:\x20\x20tdx\x20tables\x20--in\x20','✔\x20Found\x20','Database:\x20all','\x20\x20tdx\x20tables\x20\x22mydb.users\x22\x20\x20\x20\x20->\x20table\x20\x22users\x22\x20in\x20database\x20mydb','data','List\x20tables\x20in\x20a\x20database','\x20\x20Cause:\x20','query','Note:\x20\x27','2494515vAImLd','validate','name','Database\x20\x27','tables','\x20\x20Use:\x20tdx\x20tables\x20\x22','cause','Error:\x20Pattern\x20\x27','\x20\x20tdx\x20tables\x20\x22mydb.*\x22\x20\x20\x20\x20\x20\x20\x20\x20->\x20all\x20tables\x20from\x20mydb','message','\x20\x20tdx\x20tables\x20\x22*.user*\x22\x20\x20\x20\x20\x20\x20\x20->\x20tables\x20matching\x20user*\x20across\x20databases','\x27\x20across\x20all\x20databases.','includes','length','\x27\x20is\x20ambiguous.','499938OLBkHk','Table\x20pattern:\x20','error','table','Did\x20you\x20mean\x20to\x20list\x20all\x20tables\x20from\x20database\x20\x27','210874wjgrOF','Or\x20use\x20--in\x20flag:','execute','verbose','120nbqCXD','1554786jTWKmW','Database:\x20','listTables','limit','database','7vYveaH','Error:\x20','\x20\x20tdx\x20tables\x20--in\x20mydb\x20\x20\x20\x20\x20\x20\x20->\x20all\x20tables\x20from\x20mydb','2343150qeRcIS','2548560qZrLRH','\x20\x20tdx\x20tables\x20users\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20->\x20table\x20\x22users\x22\x20across\x20all\x20databases','Site:\x20','site','✖\x20No\x20tables\x20found','3467152uivxRl','Error:\x20Too\x20many\x20arguments.\x20Use\x20single\x20argument:'];a38_0x8046=function(){return _0x3961b1;};return a38_0x8046();}import{handleSDKOutput}from'../core/command-output.js';import{parseTableReference}from'../utils/table-ref-parser.js';import{DEFAULT_LISTING_LIMIT,resolveLimit}from'../core/constants.js';import{withSpinner}from'../utils/spinner.js';export class TablesCommand extends BaseCommand{[a38_0x3b9bc2(0x139)]=a38_0x3b9bc2(0x13b);['description']=a38_0x3b9bc2(0x133);async[a38_0x3b9bc2(0x14d)](_0x6394dd){const _0x1b153c=a38_0x3b9bc2,{options:_0x125a8d,args:_0xbb9530,tdx:_0x3d3dd9}=_0x6394dd;let _0x1f55f7;if(_0xbb9530[_0x1b153c(0x144)]===0x0)_0x1f55f7={'database':undefined,'table':undefined,'original':''};else{if(_0xbb9530[_0x1b153c(0x144)]===0x1)try{_0x1f55f7=parseTableReference(_0xbb9530[0x0]);if(_0x1f55f7[_0x1b153c(0x149)]&&!_0x1f55f7['database']&&!_0x1f55f7['table'][_0x1b153c(0x143)]('*')&&!_0x1f55f7[_0x1b153c(0x149)][_0x1b153c(0x143)]('?'))return console['error'](_0x1b153c(0x13e)+_0xbb9530[0x0]+_0x1b153c(0x145)),console[_0x1b153c(0x148)](_0x1b153c(0x14a)+_0x1f55f7[_0x1b153c(0x149)]+'\x27?'),console[_0x1b153c(0x148)](_0x1b153c(0x13c)+_0x1f55f7[_0x1b153c(0x149)]+'.*\x22'),console[_0x1b153c(0x148)](_0x1b153c(0x12e)+_0x1f55f7['table']),console[_0x1b153c(0x148)]('\x20\x20Or:\x20\x20tdx\x20tables\x20--database\x20'+_0x1f55f7[_0x1b153c(0x149)]),console[_0x1b153c(0x148)](''),console['error'](_0x1b153c(0x136)+_0xbb9530[0x0]+'\x27\x20without\x20wildcards\x20would\x20search\x20for\x20tables\x20named\x20\x27'+_0x1f55f7[_0x1b153c(0x149)]+_0x1b153c(0x142)),0x1;}catch(_0x83e522){return console[_0x1b153c(0x148)]('Error:\x20'+_0x83e522[_0x1b153c(0x140)]),0x1;}else return console['error'](_0x1b153c(0x12c)),console[_0x1b153c(0x148)](_0x1b153c(0x127)),console[_0x1b153c(0x148)](_0x1b153c(0x13f)),console[_0x1b153c(0x148)](_0x1b153c(0x131)),console[_0x1b153c(0x148)](_0x1b153c(0x141)),console[_0x1b153c(0x148)](_0x1b153c(0x14c)),console[_0x1b153c(0x148)](_0x1b153c(0x157)),0x1;}const _0xf76844=_0x125a8d[_0x1b153c(0x154)];!_0x1f55f7[_0x1b153c(0x154)]&&_0xf76844&&(_0x1f55f7['database']=_0xf76844);try{const _0x359226=_0x34a592=>_0x34a592&&(_0x34a592[_0x1b153c(0x143)]('*')||_0x34a592[_0x1b153c(0x143)]('?')),_0x335f30=_0x359226(_0x1f55f7[_0x1b153c(0x154)]);_0x125a8d['verbose']&&(console[_0x1b153c(0x148)](_0x1b153c(0x128)+_0x125a8d[_0x1b153c(0x129)]),_0x1f55f7[_0x1b153c(0x154)]?_0x335f30?console[_0x1b153c(0x148)]('Database\x20pattern:\x20'+_0x1f55f7[_0x1b153c(0x154)]):console[_0x1b153c(0x148)](_0x1b153c(0x151)+_0x1f55f7[_0x1b153c(0x154)]):console[_0x1b153c(0x148)](_0x1b153c(0x130)),_0x1f55f7[_0x1b153c(0x149)]&&console[_0x1b153c(0x148)](_0x1b153c(0x147)+_0x1f55f7[_0x1b153c(0x149)]));const _0x5d82a8=_0x1f55f7[_0x1b153c(0x154)]&&!_0x335f30?_0x1f55f7[_0x1b153c(0x154)]:undefined,_0xd727cb=_0x335f30?_0x1f55f7[_0x1b153c(0x154)]:undefined,_0x5282a4=_0x1f55f7[_0x1b153c(0x149)],_0x358b18=resolveLimit(_0x125a8d[_0x1b153c(0x153)],DEFAULT_LISTING_LIMIT),_0x4a0f86=await withSpinner('Listing\x20tables...',()=>_0x3d3dd9[_0x1b153c(0x135)][_0x1b153c(0x152)](_0x5d82a8,_0x5282a4,_0xd727cb,_0x358b18),{'verbose':_0x125a8d[_0x1b153c(0x14e)]}),_0x4d55bf=_0x4a0f86[_0x1b153c(0x132)];if(_0x4d55bf[_0x1b153c(0x144)]===0x0&&_0x1f55f7['database']&&!_0x335f30)return console['error'](_0x1b153c(0x12a)),console[_0x1b153c(0x148)](_0x1b153c(0x13a)+_0x1f55f7[_0x1b153c(0x154)]+_0x1b153c(0x12d)),0x1;return console[_0x1b153c(0x148)](_0x1b153c(0x12f)+_0x4d55bf['length']+'\x20table'+(_0x4d55bf[_0x1b153c(0x144)]!==0x1?'s':'')),await handleSDKOutput(_0x4d55bf,{..._0x125a8d,'limit':_0x358b18}),0x0;}catch(_0x5250cc){if(_0x5250cc instanceof SDKError)return console[_0x1b153c(0x148)](_0x1b153c(0x156)+_0x5250cc[_0x1b153c(0x140)]),_0x5250cc['cause']&&console[_0x1b153c(0x148)](_0x1b153c(0x134)+_0x5250cc[_0x1b153c(0x13d)]),0x1;throw _0x5250cc;}}[a38_0x3b9bc2(0x138)](_0x5a2ce5){return undefined;}}
1
+ const a38_0x3276cc=a38_0x4d81;function a38_0x4d81(_0x41c490,_0x3425d5){_0x41c490=_0x41c490-0x12b;const _0x4a4766=a38_0x4a47();let _0x4d8148=_0x4a4766[_0x41c490];return _0x4d8148;}function a38_0x4a47(){const _0x219639=['439964aUTdTv','query','listTables','\x20\x20Cause:\x20','cause','site','includes','\x27\x20is\x20ambiguous.','8VNlFeE','805510beobqR','tables','\x20\x20Or:\x20\x20tdx\x20tables\x20--in\x20','List\x20tables\x20in\x20a\x20database','Listing\x20tables...','315564iJZUQM','Database\x20\x27','260dukDjV','data','8gqRlGT','length','Database:\x20','\x27\x20without\x20wildcards\x20would\x20search\x20for\x20tables\x20named\x20\x27','Database\x20pattern:\x20','database','name','864387ivipIx','✖\x20No\x20tables\x20found','execute','Database:\x20all','\x20\x20tdx\x20tables\x20\x22mydb.*\x22\x20\x20\x20\x20\x20\x20\x20\x20->\x20all\x20tables\x20from\x20mydb','\x27\x20may\x20not\x20exist\x20or\x20contains\x20no\x20tables','message','\x20\x20tdx\x20tables\x20\x22*.user*\x22\x20\x20\x20\x20\x20\x20\x20->\x20tables\x20matching\x20user*\x20across\x20databases','\x20\x20tdx\x20tables\x20--in\x20mydb\x20\x20\x20\x20\x20\x20\x20->\x20all\x20tables\x20from\x20mydb','Error:\x20','8884687cNtjys','limit','\x20\x20tdx\x20tables\x20users\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20->\x20table\x20\x22users\x22\x20across\x20all\x20databases','2974188PsZkUE','Error:\x20Too\x20many\x20arguments.\x20Use\x20single\x20argument:','table','1781547QlvNVq','verbose','error','Did\x20you\x20mean\x20to\x20list\x20all\x20tables\x20from\x20database\x20\x27'];a38_0x4a47=function(){return _0x219639;};return a38_0x4a47();}(function(_0x10d1c0,_0x10c868){const _0x160f80=a38_0x4d81,_0x290010=_0x10d1c0();while(!![]){try{const _0x4ea88d=parseInt(_0x160f80(0x132))/0x1+-parseInt(_0x160f80(0x151))/0x2+-parseInt(_0x160f80(0x14d))/0x3*(parseInt(_0x160f80(0x136))/0x4)+parseInt(_0x160f80(0x12d))/0x5+parseInt(_0x160f80(0x14a))/0x6+-parseInt(_0x160f80(0x147))/0x7*(parseInt(_0x160f80(0x12c))/0x8)+parseInt(_0x160f80(0x13d))/0x9*(parseInt(_0x160f80(0x134))/0xa);if(_0x4ea88d===_0x10c868)break;else _0x290010['push'](_0x290010['shift']());}catch(_0x3670b0){_0x290010['push'](_0x290010['shift']());}}}(a38_0x4a47,0xc17f1));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleSDKOutput}from'../core/command-output.js';import{parseTableReference}from'../utils/table-ref-parser.js';import{DEFAULT_LISTING_LIMIT,resolveLimit}from'../core/constants.js';import{withSpinner}from'../utils/spinner.js';export class TablesCommand extends BaseCommand{[a38_0x3276cc(0x13c)]=a38_0x3276cc(0x12e);['description']=a38_0x3276cc(0x130);async[a38_0x3276cc(0x13f)](_0x204eb6){const _0x2e1c05=a38_0x3276cc,{options:_0x434837,args:_0x2fc46c,tdx:_0x5eb4d1}=_0x204eb6;let _0x1fa6a1;if(_0x2fc46c[_0x2e1c05(0x137)]===0x0)_0x1fa6a1={'database':undefined,'table':undefined,'original':''};else{if(_0x2fc46c[_0x2e1c05(0x137)]===0x1)try{_0x1fa6a1=parseTableReference(_0x2fc46c[0x0]);if(_0x1fa6a1[_0x2e1c05(0x14c)]&&!_0x1fa6a1[_0x2e1c05(0x13b)]&&!_0x1fa6a1['table'][_0x2e1c05(0x157)]('*')&&!_0x1fa6a1[_0x2e1c05(0x14c)][_0x2e1c05(0x157)]('?'))return console[_0x2e1c05(0x14f)]('Error:\x20Pattern\x20\x27'+_0x2fc46c[0x0]+_0x2e1c05(0x12b)),console['error'](_0x2e1c05(0x150)+_0x1fa6a1[_0x2e1c05(0x14c)]+'\x27?'),console['error']('\x20\x20Use:\x20tdx\x20tables\x20\x22'+_0x1fa6a1[_0x2e1c05(0x14c)]+'.*\x22'),console[_0x2e1c05(0x14f)](_0x2e1c05(0x12f)+_0x1fa6a1['table']),console[_0x2e1c05(0x14f)]('\x20\x20Or:\x20\x20tdx\x20tables\x20--database\x20'+_0x1fa6a1[_0x2e1c05(0x14c)]),console[_0x2e1c05(0x14f)](''),console[_0x2e1c05(0x14f)]('Note:\x20\x27'+_0x2fc46c[0x0]+_0x2e1c05(0x139)+_0x1fa6a1[_0x2e1c05(0x14c)]+'\x27\x20across\x20all\x20databases.'),0x1;}catch(_0x190ebb){return console[_0x2e1c05(0x14f)](_0x2e1c05(0x146)+_0x190ebb[_0x2e1c05(0x143)]),0x1;}else return console['error'](_0x2e1c05(0x14b)),console[_0x2e1c05(0x14f)](_0x2e1c05(0x149)),console['error'](_0x2e1c05(0x141)),console['error']('\x20\x20tdx\x20tables\x20\x22mydb.users\x22\x20\x20\x20\x20->\x20table\x20\x22users\x22\x20in\x20database\x20mydb'),console[_0x2e1c05(0x14f)](_0x2e1c05(0x144)),console[_0x2e1c05(0x14f)]('Or\x20use\x20--in\x20flag:'),console[_0x2e1c05(0x14f)](_0x2e1c05(0x145)),0x1;}const _0x49e505=_0x434837[_0x2e1c05(0x13b)];!_0x1fa6a1[_0x2e1c05(0x13b)]&&_0x49e505&&(_0x1fa6a1['database']=_0x49e505);try{const _0x464b9f=_0x220997=>_0x220997&&(_0x220997['includes']('*')||_0x220997[_0x2e1c05(0x157)]('?')),_0x528e8e=_0x464b9f(_0x1fa6a1[_0x2e1c05(0x13b)]);_0x434837[_0x2e1c05(0x14e)]&&(console['error']('Site:\x20'+_0x434837[_0x2e1c05(0x156)]),_0x1fa6a1[_0x2e1c05(0x13b)]?_0x528e8e?console[_0x2e1c05(0x14f)](_0x2e1c05(0x13a)+_0x1fa6a1[_0x2e1c05(0x13b)]):console['error'](_0x2e1c05(0x138)+_0x1fa6a1[_0x2e1c05(0x13b)]):console[_0x2e1c05(0x14f)](_0x2e1c05(0x140)),_0x1fa6a1[_0x2e1c05(0x14c)]&&console[_0x2e1c05(0x14f)]('Table\x20pattern:\x20'+_0x1fa6a1[_0x2e1c05(0x14c)]));const _0x680e1c=_0x1fa6a1[_0x2e1c05(0x13b)]&&!_0x528e8e?_0x1fa6a1[_0x2e1c05(0x13b)]:undefined,_0x50e3ec=_0x528e8e?_0x1fa6a1['database']:undefined,_0x479700=_0x1fa6a1[_0x2e1c05(0x14c)],_0x14fe2e=resolveLimit(_0x434837[_0x2e1c05(0x148)],DEFAULT_LISTING_LIMIT),_0x12f4ab=await withSpinner(_0x2e1c05(0x131),()=>_0x5eb4d1[_0x2e1c05(0x152)][_0x2e1c05(0x153)](_0x680e1c,_0x479700,_0x50e3ec,_0x14fe2e),{'verbose':_0x434837['verbose']}),_0xce5fc9=_0x12f4ab[_0x2e1c05(0x135)];if(_0xce5fc9[_0x2e1c05(0x137)]===0x0&&_0x1fa6a1[_0x2e1c05(0x13b)]&&!_0x528e8e)return console[_0x2e1c05(0x14f)](_0x2e1c05(0x13e)),console[_0x2e1c05(0x14f)](_0x2e1c05(0x133)+_0x1fa6a1[_0x2e1c05(0x13b)]+_0x2e1c05(0x142)),0x1;return console[_0x2e1c05(0x14f)]('✔\x20Found\x20'+_0xce5fc9[_0x2e1c05(0x137)]+'\x20table'+(_0xce5fc9[_0x2e1c05(0x137)]!==0x1?'s':'')),await handleSDKOutput(_0xce5fc9,{..._0x434837,'limit':_0x14fe2e}),0x0;}catch(_0x1ca480){if(_0x1ca480 instanceof SDKError)return console[_0x2e1c05(0x14f)]('Error:\x20'+_0x1ca480[_0x2e1c05(0x143)]),_0x1ca480[_0x2e1c05(0x155)]&&console[_0x2e1c05(0x14f)](_0x2e1c05(0x154)+_0x1ca480[_0x2e1c05(0x155)]),0x1;throw _0x1ca480;}}['validate'](_0x31a94f){return undefined;}}
@@ -1 +1 @@
1
- const a39_0x5907b4=a39_0x311c;function a39_0x5030(){const _0x5c465b=['.\x20Must\x20be\x20one\x20of:\x20','parent_segment','default','71915ODhfDX','execute','description','618dkuDee','database','\x0aUpdated:\x20','log','join','41cjqUUY','146244nyTiVA','16378aBeUPp','session','llm_agent','--default\x20can\x20only\x20be\x20used\x20with\x20\x27site\x27\x20or\x20\x27profile\x27.\x20Other\x20resources\x20are\x20session-level\x20only.','89150GMjODV','\x20\x20\x20\x20\x20\x20\x20tdx\x20unset\x20--default\x20<resource>\x20\x20#\x20Clear\x20default\x20from\x20config\x0a','name','Default\x20site\x20','includes','Invalid\x20resource:\x20','cleared','llm_project','Session\x20','profile','Clear\x20session-level\x20or\x20default\x20context\x20values','3152492KOEHgm','232ViqCpi','green','3632292yjfbBt','unset','dim','engage_workspace','site','\x0aRun\x20\x27tdx\x20unset\x20--help\x27\x20for\x20more\x20options','2794OhSmeH','Usage:\x20tdx\x20unset\x20<resource>\x0a','12581748EkuSkz','(session:\x20','tdx.json','message'];a39_0x5030=function(){return _0x5c465b;};return a39_0x5030();}(function(_0x4ae8da,_0x57c721){const _0x3867e2=a39_0x311c,_0x3237a1=_0x4ae8da();while(!![]){try{const _0x255da5=-parseInt(_0x3867e2(0x20e))/0x1*(parseInt(_0x3867e2(0x210))/0x2)+-parseInt(_0x3867e2(0x1f7))/0x3+parseInt(_0x3867e2(0x1f4))/0x4+parseInt(_0x3867e2(0x206))/0x5*(-parseInt(_0x3867e2(0x209))/0x6)+-parseInt(_0x3867e2(0x20f))/0x7*(parseInt(_0x3867e2(0x1f5))/0x8)+parseInt(_0x3867e2(0x1ff))/0x9+-parseInt(_0x3867e2(0x214))/0xa*(-parseInt(_0x3867e2(0x1fd))/0xb);if(_0x255da5===_0x57c721)break;else _0x3237a1['push'](_0x3237a1['shift']());}catch(_0x1396d2){_0x3237a1['push'](_0x3237a1['shift']());}}}(a39_0x5030,0xc7623));import{BaseCommand}from'./command.js';function a39_0x311c(_0x5b84c9,_0x1670c5){_0x5b84c9=_0x5b84c9-0x1ef;const _0x5030fa=a39_0x5030();let _0x311c8c=_0x5030fa[_0x5b84c9];return _0x311c8c;}import{getSessionID,cleanExpiredSessions,clearSessionContextField}from'../core/session.js';import{clearDefaultSiteFromUserConfig,clearActiveProfileFromUserConfig}from'../core/profile.js';import{getConfigDir}from'../core/config.js';import a39_0x4db9be from'chalk';import*as a39_0x5747ec from'node:path';export class UnsetCommand extends BaseCommand{[a39_0x5907b4(0x216)]=a39_0x5907b4(0x1f8);[a39_0x5907b4(0x208)]=a39_0x5907b4(0x1f3);['validate'](_0x3d3846){const _0x465136=a39_0x5907b4,{args:_0x1d43a2,options:_0x3dc13e}=_0x3d3846,_0x191cef=_0x3dc13e[_0x465136(0x205)];if(_0x1d43a2['length']===0x0)return _0x465136(0x1fe)+_0x465136(0x215)+'\x0aResources:\x20site,\x20database,\x20parent_segment,\x20llm_project,\x20agent,\x20profile,\x20engage_workspace\x0a'+_0x465136(0x1fc);const _0xb56236=_0x1d43a2[0x0],_0x2445e4=[_0x465136(0x1fb),'database','parent_segment',_0x465136(0x1f0),'agent',_0x465136(0x1f2),'engage_workspace'];if(!_0x2445e4[_0x465136(0x218)](_0xb56236))return _0x465136(0x219)+_0xb56236+_0x465136(0x203)+_0x2445e4[_0x465136(0x20d)](',\x20');if(_0x191cef&&_0xb56236!==_0x465136(0x1fb)&&_0xb56236!==_0x465136(0x1f2))return _0x465136(0x213);return undefined;}async[a39_0x5907b4(0x207)](_0x510664){const _0x134036=a39_0x5907b4,{args:_0x42bee0,options:_0x2cca3e}=_0x510664,_0x15fb2b=_0x2cca3e[_0x134036(0x205)];cleanExpiredSessions();try{const _0x38116f=_0x42bee0[0x0],_0x537d14=a39_0x5747ec['join'](getConfigDir(),_0x134036(0x201));if(_0x15fb2b){if(_0x38116f===_0x134036(0x1fb))return clearDefaultSiteFromUserConfig(),console[_0x134036(0x20c)](_0x134036(0x217)+a39_0x4db9be[_0x134036(0x1f6)](_0x134036(0x1ef))),console[_0x134036(0x20c)](a39_0x4db9be[_0x134036(0x1f9)](_0x134036(0x20b)+_0x537d14)),0x0;if(_0x38116f==='profile')return clearActiveProfileFromUserConfig(),console[_0x134036(0x20c)]('Default\x20profile\x20'+a39_0x4db9be[_0x134036(0x1f6)](_0x134036(0x1ef))),console[_0x134036(0x20c)](a39_0x4db9be[_0x134036(0x1f9)](_0x134036(0x20b)+_0x537d14)),0x0;}const _0x4f73fc=getSessionID(_0x2cca3e['session']),_0x2a088b={'site':_0x134036(0x1fb),'database':_0x134036(0x20a),'parent_segment':_0x134036(0x204),'llm_project':_0x134036(0x1f0),'agent':_0x134036(0x212),'profile':_0x134036(0x1f2),'engage_workspace':_0x134036(0x1fa)},_0x46def5=_0x2a088b[_0x38116f];return _0x46def5&&(clearSessionContextField(_0x46def5,_0x2cca3e[_0x134036(0x211)]),console['log'](_0x134036(0x1f1)+_0x38116f+'\x20'+a39_0x4db9be['green'](_0x134036(0x1ef))+'\x20'+a39_0x4db9be[_0x134036(0x1f9)](_0x134036(0x200)+_0x4f73fc+')'))),0x0;}catch(_0x46b2a6){return _0x46b2a6 instanceof Error&&console['error']('Error:\x20'+_0x46b2a6[_0x134036(0x202)]),0x1;}}}
1
+ const a39_0x476a1b=a39_0x32e9;(function(_0x4c2cdd,_0x5697f7){const _0x228338=a39_0x32e9,_0x528a95=_0x4c2cdd();while(!![]){try{const _0x4aa55a=parseInt(_0x228338(0x1f9))/0x1+-parseInt(_0x228338(0x1e7))/0x2+-parseInt(_0x228338(0x1dd))/0x3+parseInt(_0x228338(0x1ec))/0x4+parseInt(_0x228338(0x1df))/0x5+-parseInt(_0x228338(0x1fb))/0x6*(parseInt(_0x228338(0x1ea))/0x7)+-parseInt(_0x228338(0x1fc))/0x8*(-parseInt(_0x228338(0x1e2))/0x9);if(_0x4aa55a===_0x5697f7)break;else _0x528a95['push'](_0x528a95['shift']());}catch(_0x27c286){_0x528a95['push'](_0x528a95['shift']());}}}(a39_0x1c1d,0xac67c));import{BaseCommand}from'./command.js';import{getSessionID,cleanExpiredSessions,clearSessionContextField}from'../core/session.js';import{clearDefaultSiteFromUserConfig,clearActiveProfileFromUserConfig}from'../core/profile.js';function a39_0x32e9(_0x2265ed,_0x45f13f){_0x2265ed=_0x2265ed-0x1d3;const _0x1c1d5e=a39_0x1c1d();let _0x32e9ce=_0x1c1d5e[_0x2265ed];return _0x32e9ce;}import{getConfigDir}from'../core/config.js';import a39_0x11d3ab from'chalk';function a39_0x1c1d(){const _0x30ddeb=['error','Invalid\x20resource:\x20','135jjFksQ','log','\x20\x20\x20\x20\x20\x20\x20tdx\x20unset\x20--default\x20<resource>\x20\x20#\x20Clear\x20default\x20from\x20config\x0a','Default\x20site\x20','Session\x20','2589886nVCQdc','description','profile','4574829TVoYUM','engage_workspace','3638624mengbN','--default\x20can\x20only\x20be\x20used\x20with\x20\x27site\x27\x20or\x20\x27profile\x27.\x20Other\x20resources\x20are\x20session-level\x20only.','tdx.json','parent_segment','llm_project','\x0aResources:\x20site,\x20database,\x20parent_segment,\x20llm_project,\x20agent,\x20profile,\x20engage_workspace\x0a','default','includes','database','join','Default\x20profile\x20','Error:\x20','agent','204834SKIBLQ','(session:\x20','6kBwHbn','973848NXxjAs','unset','validate','message','Clear\x20session-level\x20or\x20default\x20context\x20values','\x0aUpdated:\x20','site','llm_agent','session','.\x20Must\x20be\x20one\x20of:\x20','cleared','green','858819aqGANm','dim','2400ARMbgQ'];a39_0x1c1d=function(){return _0x30ddeb;};return a39_0x1c1d();}import*as a39_0x11717d from'node:path';export class UnsetCommand extends BaseCommand{['name']=a39_0x476a1b(0x1fd);[a39_0x476a1b(0x1e8)]=a39_0x476a1b(0x1d5);[a39_0x476a1b(0x1d3)](_0x38bbd9){const _0x294ffb=a39_0x476a1b,{args:_0x2ad1d6,options:_0xcfc333}=_0x38bbd9,_0x151078=_0xcfc333[_0x294ffb(0x1f2)];if(_0x2ad1d6['length']===0x0)return'Usage:\x20tdx\x20unset\x20<resource>\x0a'+_0x294ffb(0x1e4)+_0x294ffb(0x1f1)+'\x0aRun\x20\x27tdx\x20unset\x20--help\x27\x20for\x20more\x20options';const _0x3a0624=_0x2ad1d6[0x0],_0x2b00ab=[_0x294ffb(0x1d7),_0x294ffb(0x1f4),_0x294ffb(0x1ef),_0x294ffb(0x1f0),_0x294ffb(0x1f8),_0x294ffb(0x1e9),_0x294ffb(0x1eb)];if(!_0x2b00ab[_0x294ffb(0x1f3)](_0x3a0624))return _0x294ffb(0x1e1)+_0x3a0624+_0x294ffb(0x1da)+_0x2b00ab[_0x294ffb(0x1f5)](',\x20');if(_0x151078&&_0x3a0624!=='site'&&_0x3a0624!==_0x294ffb(0x1e9))return _0x294ffb(0x1ed);return undefined;}async['execute'](_0x4c32fd){const _0x26ec03=a39_0x476a1b,{args:_0x15d26c,options:_0x1ea76a}=_0x4c32fd,_0x217d2f=_0x1ea76a[_0x26ec03(0x1f2)];cleanExpiredSessions();try{const _0x151fe9=_0x15d26c[0x0],_0x45ed15=a39_0x11717d[_0x26ec03(0x1f5)](getConfigDir(),_0x26ec03(0x1ee));if(_0x217d2f){if(_0x151fe9==='site')return clearDefaultSiteFromUserConfig(),console[_0x26ec03(0x1e3)](_0x26ec03(0x1e5)+a39_0x11d3ab[_0x26ec03(0x1dc)]('cleared')),console[_0x26ec03(0x1e3)](a39_0x11d3ab[_0x26ec03(0x1de)](_0x26ec03(0x1d6)+_0x45ed15)),0x0;if(_0x151fe9===_0x26ec03(0x1e9))return clearActiveProfileFromUserConfig(),console[_0x26ec03(0x1e3)](_0x26ec03(0x1f6)+a39_0x11d3ab[_0x26ec03(0x1dc)](_0x26ec03(0x1db))),console[_0x26ec03(0x1e3)](a39_0x11d3ab['dim'](_0x26ec03(0x1d6)+_0x45ed15)),0x0;}const _0x78d66a=getSessionID(_0x1ea76a[_0x26ec03(0x1d9)]),_0x2257ff={'site':_0x26ec03(0x1d7),'database':'database','parent_segment':_0x26ec03(0x1ef),'llm_project':'llm_project','agent':_0x26ec03(0x1d8),'profile':_0x26ec03(0x1e9),'engage_workspace':_0x26ec03(0x1eb)},_0x531a0b=_0x2257ff[_0x151fe9];return _0x531a0b&&(clearSessionContextField(_0x531a0b,_0x1ea76a[_0x26ec03(0x1d9)]),console[_0x26ec03(0x1e3)](_0x26ec03(0x1e6)+_0x151fe9+'\x20'+a39_0x11d3ab['green'](_0x26ec03(0x1db))+'\x20'+a39_0x11d3ab[_0x26ec03(0x1de)](_0x26ec03(0x1fa)+_0x78d66a+')'))),0x0;}catch(_0x447bd8){return _0x447bd8 instanceof Error&&console[_0x26ec03(0x1e0)](_0x26ec03(0x1f7)+_0x447bd8[_0x26ec03(0x1d4)]),0x1;}}}
@@ -1 +1 @@
1
- function a40_0x36a5(_0xa8d49b,_0x3e54ba){_0xa8d49b=_0xa8d49b-0x8f;const _0xff0792=a40_0xff07();let _0x36a5e6=_0xff0792[_0xa8d49b];return _0x36a5e6;}const a40_0xc3dd57=a40_0x36a5;(function(_0x32e856,_0x1a600e){const _0x35318c=a40_0x36a5,_0x505dd3=_0x32e856();while(!![]){try{const _0x36a648=-parseInt(_0x35318c(0xc3))/0x1+-parseInt(_0x35318c(0xa5))/0x2+parseInt(_0x35318c(0xc6))/0x3+parseInt(_0x35318c(0xca))/0x4*(parseInt(_0x35318c(0xb2))/0x5)+parseInt(_0x35318c(0xb9))/0x6*(-parseInt(_0x35318c(0xaf))/0x7)+parseInt(_0x35318c(0xa8))/0x8+parseInt(_0x35318c(0xa2))/0x9;if(_0x36a648===_0x1a600e)break;else _0x505dd3['push'](_0x505dd3['shift']());}catch(_0x3e7259){_0x505dd3['push'](_0x505dd3['shift']());}}}(a40_0xff07,0x8fbb8));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_0xff07(){const _0x568989=['profile','\x0aTip:\x20Use\x20\x27tdx\x20use\x20--clear\x27\x20to\x20clear\x20session\x20overrides','3679024wnaxBz','includes','displayWithSources','log','execute','dim','\x0aTip:\x20Use\x20\x27tdx\x20use\x20--default\x20site\x20','5138BGAGxx','\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20--default\x20site\x20<value>\x20\x20\x20\x20\x20#\x20Save\x20default\x20site\x20to\x20config\x0a','description','20420jUvAUj','display','(session:\x20','session','debug','use','join','7086JdWeNi','Session\x20llm_project\x20set\x20to:\x20','\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20--default\x20profile\x20<value>\x20\x20#\x20Save\x20default\x20profile\x20to\x20config\x0a','.\x20Must\x20be\x20one\x20of:\x20','name','engage_workspace','Error:\x20','Invalid\x20resource:\x20','length','\x27\x20does\x20not\x20exist','53252iJMjhG','default','\x0aResources:\x20site,\x20database,\x20parent_segment,\x20llm_project,\x20agent,\x20profile,\x20engage_workspace\x0a','2211450qdiOPF','\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','llm_agent','Session\x20engage_workspace\x20set\x20to:\x20','764mKxQKQ','clear','Set\x20session-level\x20context','\x0aRun\x20\x27tdx\x20use\x20--help\x27\x20for\x20more\x20options','Session\x20parent_segment\x20set\x20to:\x20','--default\x20can\x20only\x20be\x20used\x20with\x20\x27site\x27\x20or\x20\x27profile\x27.\x20Other\x20resources\x20are\x20session-level\x20only.','Session\x20site\x20set\x20to:\x20','message','\x0aSet\x20context:\x20tdx\x20use\x20<resource>\x20<value>','parent_segment','database','Resources:\x20site,\x20database,\x20parent_segment,\x20llm_project,\x20agent,\x20profile,\x20engage_workspace','validate','green','llm_project','error','Session\x20context\x20','Error:\x20Profile\x20\x27','site','\x0aUse\x20\x27tdx\x20profiles\x27\x20to\x20see\x20available\x20profiles','Session\x20database\x20set\x20to:\x20','6287472eycZel','Session\x20agent\x20set\x20to:\x20','agent','2333692tVaKlL'];a40_0xff07=function(){return _0x568989;};return a40_0xff07();}import{parseAgentRef}from'../sdk/agent/agent-ref-parser.js';import{getConfigDir}from'../core/config.js';import a40_0x346e4c from'chalk';import*as a40_0x4b05b5 from'node:path';export class UseCommand extends BaseCommand{[a40_0xc3dd57(0xbd)]=a40_0xc3dd57(0xb7);[a40_0xc3dd57(0xb1)]=a40_0xc3dd57(0x8f);[a40_0xc3dd57(0x99)](_0x343943){const _0x1bb709=a40_0xc3dd57,{args:_0x7b1b22,options:_0x2e8068}=_0x343943,_0x167466=_0x2e8068[_0x1bb709(0xc4)];if(_0x7b1b22[_0x1bb709(0xc1)]===0x0)return undefined;if(_0x7b1b22['length']===0x1)return'Usage:\x20tdx\x20use\x20<resource>\x20<value>\x0a'+_0x1bb709(0xc7)+'\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20--clear\x20\x20\x20\x20\x20\x20#\x20Clear\x20session\x20context\x0a'+_0x1bb709(0xb0)+_0x1bb709(0xbb)+_0x1bb709(0xc5)+_0x1bb709(0x90);const _0x4a1370=_0x7b1b22[0x0],_0x285a47=[_0x1bb709(0x9f),_0x1bb709(0x97),'parent_segment',_0x1bb709(0x9b),'agent','profile',_0x1bb709(0xbe)];if(!_0x285a47[_0x1bb709(0xa9)](_0x4a1370))return _0x1bb709(0xc0)+_0x4a1370+_0x1bb709(0xbc)+_0x285a47[_0x1bb709(0xb8)](',\x20');if(_0x167466&&_0x4a1370!==_0x1bb709(0x9f)&&_0x4a1370!==_0x1bb709(0xa6))return _0x1bb709(0x92);return undefined;}async[a40_0xc3dd57(0xac)](_0x4dfbd6){const _0x58cfd8=a40_0xc3dd57,{args:_0x572418,options:_0x119198}=_0x4dfbd6,_0xb6d929=_0x119198[_0x58cfd8(0xb6)],_0x11b380=_0x119198[_0x58cfd8(0xcb)],_0x2803c1=_0x119198[_0x58cfd8(0xc4)];cleanExpiredSessions();try{if(_0x11b380){clearSessionContext(_0x119198['session']);const _0xa40148=getSessionID(_0x119198[_0x58cfd8(0xb5)]);return console[_0x58cfd8(0xab)](_0x58cfd8(0x9d)+a40_0x346e4c[_0x58cfd8(0x9a)]('cleared')+'\x20'+a40_0x346e4c[_0x58cfd8(0xad)]('(session:\x20'+_0xa40148+')')),0x0;}if(_0x572418['length']===0x0){const _0x51cab9=new GlobalContext(_0x119198);return _0xb6d929?_0x51cab9[_0x58cfd8(0xaa)]():_0x51cab9[_0x58cfd8(0xb3)](),console['log'](a40_0x346e4c[_0x58cfd8(0xad)](_0x58cfd8(0x95))),console[_0x58cfd8(0xab)](a40_0x346e4c[_0x58cfd8(0xad)](_0x58cfd8(0x98))),console['log'](a40_0x346e4c['dim']('Use\x20--default\x20with\x20site\x20or\x20profile\x20to\x20save\x20permanently')),0x0;}const _0x1743bc=_0x572418[0x0],_0x3a89bc=_0x572418[0x1],_0x3419a0=a40_0x4b05b5['join'](getConfigDir(),'tdx.json');if(_0x2803c1){if(_0x1743bc==='site')return saveDefaultSiteToUserConfig(_0x3a89bc),console[_0x58cfd8(0xab)]('Default\x20site\x20set\x20to:\x20'+a40_0x346e4c[_0x58cfd8(0x9a)](_0x3a89bc)),console[_0x58cfd8(0xab)](a40_0x346e4c[_0x58cfd8(0xad)]('\x0aSaved\x20to:\x20'+_0x3419a0)),0x0;if(_0x1743bc===_0x58cfd8(0xa6)){if(!profileExists(_0x3a89bc))return console['error'](_0x58cfd8(0x9e)+_0x3a89bc+_0x58cfd8(0xc2)),console['error'](_0x58cfd8(0xa0)),0x1;return saveActiveProfileToUserConfig(_0x3a89bc),console[_0x58cfd8(0xab)]('Default\x20profile\x20set\x20to:\x20'+a40_0x346e4c['green'](_0x3a89bc)),console['log'](a40_0x346e4c['dim']('\x0aSaved\x20to:\x20'+_0x3419a0)),0x0;}}if(_0x1743bc==='site'){const _0x1e7281=getSessionID(_0x119198[_0x58cfd8(0xb5)]);return saveSessionContext({'site':_0x3a89bc},_0x119198['session']),console['log'](_0x58cfd8(0x93)+a40_0x346e4c[_0x58cfd8(0x9a)](_0x3a89bc)+'\x20'+a40_0x346e4c['dim'](_0x58cfd8(0xb4)+_0x1e7281+')')),console[_0x58cfd8(0xab)](a40_0x346e4c['dim'](_0x58cfd8(0xae)+_0x3a89bc+'\x27\x20to\x20save\x20permanently')),0x0;}if(_0x1743bc===_0x58cfd8(0xa6)){if(!profileExists(_0x3a89bc))return console[_0x58cfd8(0x9c)]('Error:\x20Profile\x20\x27'+_0x3a89bc+_0x58cfd8(0xc2)),console[_0x58cfd8(0x9c)](_0x58cfd8(0xa0)),0x1;const _0x39624f=getSessionID(_0x119198[_0x58cfd8(0xb5)]);return saveSessionContext({'profile':_0x3a89bc},_0x119198['session']),console[_0x58cfd8(0xab)]('Session\x20profile\x20set\x20to:\x20'+a40_0x346e4c[_0x58cfd8(0x9a)](_0x3a89bc)+'\x20'+a40_0x346e4c['dim'](_0x58cfd8(0xb4)+_0x39624f+')')),console['log'](a40_0x346e4c[_0x58cfd8(0xad)]('\x0aTip:\x20Use\x20\x27tdx\x20use\x20--default\x20profile\x20'+_0x3a89bc+'\x27\x20to\x20save\x20permanently')),0x0;}const _0x115276={},_0x576585=getSessionID(_0x119198['session']);switch(_0x1743bc){case'database':_0x115276[_0x58cfd8(0x97)]=_0x3a89bc,console[_0x58cfd8(0xab)](_0x58cfd8(0xa1)+a40_0x346e4c[_0x58cfd8(0x9a)](_0x3a89bc)+'\x20'+a40_0x346e4c[_0x58cfd8(0xad)](_0x58cfd8(0xb4)+_0x576585+')'));break;case _0x58cfd8(0x96):_0x115276[_0x58cfd8(0x96)]=_0x3a89bc,console[_0x58cfd8(0xab)](_0x58cfd8(0x91)+a40_0x346e4c[_0x58cfd8(0x9a)](_0x3a89bc)+'\x20'+a40_0x346e4c[_0x58cfd8(0xad)]('(session:\x20'+_0x576585+')'));break;case _0x58cfd8(0x9b):_0x115276[_0x58cfd8(0x9b)]=_0x3a89bc,console['log'](_0x58cfd8(0xba)+a40_0x346e4c['green'](_0x3a89bc)+'\x20'+a40_0x346e4c[_0x58cfd8(0xad)]('(session:\x20'+_0x576585+')'));break;case _0x58cfd8(0xa4):{const {projectName:_0x4bdd16,agentName:_0x55b03e}=parseAgentRef(_0x3a89bc);_0x55b03e?(_0x115276['llm_project']=_0x4bdd16,_0x115276[_0x58cfd8(0xc8)]=_0x55b03e,console[_0x58cfd8(0xab)](_0x58cfd8(0xba)+a40_0x346e4c[_0x58cfd8(0x9a)](_0x4bdd16)+'\x20'+a40_0x346e4c[_0x58cfd8(0xad)]('(session:\x20'+_0x576585+')')),console[_0x58cfd8(0xab)](_0x58cfd8(0xa3)+a40_0x346e4c[_0x58cfd8(0x9a)](_0x55b03e)+'\x20'+a40_0x346e4c[_0x58cfd8(0xad)](_0x58cfd8(0xb4)+_0x576585+')'))):(_0x115276['llm_agent']=_0x3a89bc,console[_0x58cfd8(0xab)]('Session\x20agent\x20set\x20to:\x20'+a40_0x346e4c[_0x58cfd8(0x9a)](_0x3a89bc)+'\x20'+a40_0x346e4c[_0x58cfd8(0xad)]('(session:\x20'+_0x576585+')')));break;}case _0x58cfd8(0xbe):_0x115276['engage_workspace']=_0x3a89bc,console[_0x58cfd8(0xab)](_0x58cfd8(0xc9)+a40_0x346e4c[_0x58cfd8(0x9a)](_0x3a89bc)+'\x20'+a40_0x346e4c[_0x58cfd8(0xad)](_0x58cfd8(0xb4)+_0x576585+')'));break;}return saveSessionContext(_0x115276,_0x119198[_0x58cfd8(0xb5)]),console[_0x58cfd8(0xab)](a40_0x346e4c[_0x58cfd8(0xad)](_0x58cfd8(0xa7))),0x0;}catch(_0x40c80f){return _0x40c80f instanceof Error&&console[_0x58cfd8(0x9c)](_0x58cfd8(0xbf)+_0x40c80f[_0x58cfd8(0x94)]),0x1;}}}
1
+ const a40_0x594a47=a40_0x37c0;function a40_0x37c0(_0x5b80c4,_0x48322f){_0x5b80c4=_0x5b80c4-0x70;const _0x2ebd7a=a40_0x2ebd();let _0x37c024=_0x2ebd7a[_0x5b80c4];return _0x37c024;}(function(_0x245437,_0x49b901){const _0x5a9c9b=a40_0x37c0,_0x1d5f15=_0x245437();while(!![]){try{const _0x386170=parseInt(_0x5a9c9b(0xa6))/0x1*(-parseInt(_0x5a9c9b(0x95))/0x2)+-parseInt(_0x5a9c9b(0x7b))/0x3*(parseInt(_0x5a9c9b(0x89))/0x4)+parseInt(_0x5a9c9b(0xa7))/0x5+-parseInt(_0x5a9c9b(0x79))/0x6+-parseInt(_0x5a9c9b(0x81))/0x7*(parseInt(_0x5a9c9b(0x98))/0x8)+-parseInt(_0x5a9c9b(0xae))/0x9+parseInt(_0x5a9c9b(0x8e))/0xa*(parseInt(_0x5a9c9b(0xaf))/0xb);if(_0x386170===_0x49b901)break;else _0x1d5f15['push'](_0x1d5f15['shift']());}catch(_0x3808c6){_0x1d5f15['push'](_0x1d5f15['shift']());}}}(a40_0x2ebd,0x2b511));function a40_0x2ebd(){const _0x463b05=['tdx.json','Error:\x20Profile\x20\x27','\x27\x20does\x20not\x20exist','use','10ITtDkh','\x0aTip:\x20Use\x20\x27tdx\x20use\x20--default\x20site\x20','log','\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20--clear\x20\x20\x20\x20\x20\x20#\x20Clear\x20session\x20context\x0a','llm_agent','\x0aResources:\x20site,\x20database,\x20parent_segment,\x20llm_project,\x20agent,\x20profile,\x20engage_workspace\x0a','database','12nZGaTj','Session\x20profile\x20set\x20to:\x20','display','8rFjZzh','Session\x20llm_project\x20set\x20to:\x20','message','\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','\x27\x20to\x20save\x20permanently','\x0aUse\x20\x27tdx\x20profiles\x27\x20to\x20see\x20available\x20profiles','Session\x20engage_workspace\x20set\x20to:\x20','engage_workspace','session','\x0aSet\x20context:\x20tdx\x20use\x20<resource>\x20<value>','\x0aTip:\x20Use\x20\x27tdx\x20use\x20--default\x20profile\x20','(session:\x20','\x0aSaved\x20to:\x20','site','13997AzUteQ','637960moYEYl','length','debug','cleared','error','join','default','684873mMXpgf','7040858ZMCsKs','includes','llm_project','description','Invalid\x20resource:\x20','Use\x20--default\x20with\x20site\x20or\x20profile\x20to\x20save\x20permanently','Set\x20session-level\x20context','\x0aTip:\x20Use\x20\x27tdx\x20use\x20--clear\x27\x20to\x20clear\x20session\x20overrides','dim','clear','parent_segment','.\x20Must\x20be\x20one\x20of:\x20','Default\x20profile\x20set\x20to:\x20','Session\x20site\x20set\x20to:\x20','validate','Session\x20context\x20','285300YlEDmH','Usage:\x20tdx\x20use\x20<resource>\x20<value>\x0a','281469MVtrCr','Default\x20site\x20set\x20to:\x20','execute','Resources:\x20site,\x20database,\x20parent_segment,\x20llm_project,\x20agent,\x20profile,\x20engage_workspace','Session\x20agent\x20set\x20to:\x20','Session\x20parent_segment\x20set\x20to:\x20','2021551ZWwBOI','--default\x20can\x20only\x20be\x20used\x20with\x20\x27site\x27\x20or\x20\x27profile\x27.\x20Other\x20resources\x20are\x20session-level\x20only.','agent','\x0aRun\x20\x27tdx\x20use\x20--help\x27\x20for\x20more\x20options','green','profile','Error:\x20','name','4SPyRxI'];a40_0x2ebd=function(){return _0x463b05;};return a40_0x2ebd();}import{BaseCommand}from'./command.js';import{saveSessionContext,getSessionID,cleanExpiredSessions,clearSessionContext}from'../core/session.js';import{profileExists,saveActiveProfileToUserConfig,saveDefaultSiteToUserConfig}from'../core/profile.js';import{GlobalContext}from'../core/global-context.js';import{parseAgentRef}from'../sdk/agent/agent-ref-parser.js';import{getConfigDir}from'../core/config.js';import a40_0x2b1728 from'chalk';import*as a40_0x438880 from'node:path';export class UseCommand extends BaseCommand{[a40_0x594a47(0x88)]=a40_0x594a47(0x8d);[a40_0x594a47(0xb2)]=a40_0x594a47(0xb5);[a40_0x594a47(0x77)](_0x3852f9){const _0x19780d=a40_0x594a47,{args:_0xb26da4,options:_0x41f4b7}=_0x3852f9,_0x128c19=_0x41f4b7[_0x19780d(0xad)];if(_0xb26da4['length']===0x0)return undefined;if(_0xb26da4[_0x19780d(0xa8)]===0x1)return _0x19780d(0x7a)+_0x19780d(0x9b)+_0x19780d(0x91)+'\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20--default\x20site\x20<value>\x20\x20\x20\x20\x20#\x20Save\x20default\x20site\x20to\x20config\x0a'+'\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20--default\x20profile\x20<value>\x20\x20#\x20Save\x20default\x20profile\x20to\x20config\x0a'+_0x19780d(0x93)+_0x19780d(0x84);const _0x74cf95=_0xb26da4[0x0],_0x50f056=[_0x19780d(0xa5),_0x19780d(0x94),'parent_segment',_0x19780d(0xb1),_0x19780d(0x83),'profile',_0x19780d(0x9f)];if(!_0x50f056[_0x19780d(0xb0)](_0x74cf95))return _0x19780d(0xb3)+_0x74cf95+_0x19780d(0x74)+_0x50f056[_0x19780d(0xac)](',\x20');if(_0x128c19&&_0x74cf95!==_0x19780d(0xa5)&&_0x74cf95!==_0x19780d(0x86))return _0x19780d(0x82);return undefined;}async[a40_0x594a47(0x7d)](_0x410e32){const _0xc6efaa=a40_0x594a47,{args:_0xf6c217,options:_0x5daa8e}=_0x410e32,_0x132b3c=_0x5daa8e[_0xc6efaa(0xa9)],_0x5b7d10=_0x5daa8e[_0xc6efaa(0x72)],_0x162790=_0x5daa8e['default'];cleanExpiredSessions();try{if(_0x5b7d10){clearSessionContext(_0x5daa8e['session']);const _0x4f6aaf=getSessionID(_0x5daa8e[_0xc6efaa(0xa0)]);return console[_0xc6efaa(0x90)](_0xc6efaa(0x78)+a40_0x2b1728[_0xc6efaa(0x85)](_0xc6efaa(0xaa))+'\x20'+a40_0x2b1728['dim'](_0xc6efaa(0xa3)+_0x4f6aaf+')')),0x0;}if(_0xf6c217['length']===0x0){const _0x2459db=new GlobalContext(_0x5daa8e);return _0x132b3c?_0x2459db['displayWithSources']():_0x2459db[_0xc6efaa(0x97)](),console['log'](a40_0x2b1728['dim'](_0xc6efaa(0xa1))),console['log'](a40_0x2b1728[_0xc6efaa(0x71)](_0xc6efaa(0x7e))),console[_0xc6efaa(0x90)](a40_0x2b1728['dim'](_0xc6efaa(0xb4))),0x0;}const _0x5c4c16=_0xf6c217[0x0],_0x19011b=_0xf6c217[0x1],_0x5f13a4=a40_0x438880['join'](getConfigDir(),_0xc6efaa(0x8a));if(_0x162790){if(_0x5c4c16===_0xc6efaa(0xa5))return saveDefaultSiteToUserConfig(_0x19011b),console[_0xc6efaa(0x90)](_0xc6efaa(0x7c)+a40_0x2b1728['green'](_0x19011b)),console[_0xc6efaa(0x90)](a40_0x2b1728[_0xc6efaa(0x71)](_0xc6efaa(0xa4)+_0x5f13a4)),0x0;if(_0x5c4c16===_0xc6efaa(0x86)){if(!profileExists(_0x19011b))return console[_0xc6efaa(0xab)](_0xc6efaa(0x8b)+_0x19011b+_0xc6efaa(0x8c)),console[_0xc6efaa(0xab)]('\x0aUse\x20\x27tdx\x20profiles\x27\x20to\x20see\x20available\x20profiles'),0x1;return saveActiveProfileToUserConfig(_0x19011b),console[_0xc6efaa(0x90)](_0xc6efaa(0x75)+a40_0x2b1728[_0xc6efaa(0x85)](_0x19011b)),console[_0xc6efaa(0x90)](a40_0x2b1728[_0xc6efaa(0x71)]('\x0aSaved\x20to:\x20'+_0x5f13a4)),0x0;}}if(_0x5c4c16===_0xc6efaa(0xa5)){const _0x39e104=getSessionID(_0x5daa8e['session']);return saveSessionContext({'site':_0x19011b},_0x5daa8e[_0xc6efaa(0xa0)]),console[_0xc6efaa(0x90)](_0xc6efaa(0x76)+a40_0x2b1728[_0xc6efaa(0x85)](_0x19011b)+'\x20'+a40_0x2b1728[_0xc6efaa(0x71)](_0xc6efaa(0xa3)+_0x39e104+')')),console[_0xc6efaa(0x90)](a40_0x2b1728[_0xc6efaa(0x71)](_0xc6efaa(0x8f)+_0x19011b+_0xc6efaa(0x9c))),0x0;}if(_0x5c4c16===_0xc6efaa(0x86)){if(!profileExists(_0x19011b))return console['error'](_0xc6efaa(0x8b)+_0x19011b+_0xc6efaa(0x8c)),console['error'](_0xc6efaa(0x9d)),0x1;const _0x40d75a=getSessionID(_0x5daa8e[_0xc6efaa(0xa0)]);return saveSessionContext({'profile':_0x19011b},_0x5daa8e[_0xc6efaa(0xa0)]),console[_0xc6efaa(0x90)](_0xc6efaa(0x96)+a40_0x2b1728[_0xc6efaa(0x85)](_0x19011b)+'\x20'+a40_0x2b1728['dim'](_0xc6efaa(0xa3)+_0x40d75a+')')),console[_0xc6efaa(0x90)](a40_0x2b1728[_0xc6efaa(0x71)](_0xc6efaa(0xa2)+_0x19011b+_0xc6efaa(0x9c))),0x0;}const _0x3c88f2={},_0x159af3=getSessionID(_0x5daa8e[_0xc6efaa(0xa0)]);switch(_0x5c4c16){case _0xc6efaa(0x94):_0x3c88f2[_0xc6efaa(0x94)]=_0x19011b,console[_0xc6efaa(0x90)]('Session\x20database\x20set\x20to:\x20'+a40_0x2b1728[_0xc6efaa(0x85)](_0x19011b)+'\x20'+a40_0x2b1728[_0xc6efaa(0x71)](_0xc6efaa(0xa3)+_0x159af3+')'));break;case _0xc6efaa(0x73):_0x3c88f2[_0xc6efaa(0x73)]=_0x19011b,console[_0xc6efaa(0x90)](_0xc6efaa(0x80)+a40_0x2b1728['green'](_0x19011b)+'\x20'+a40_0x2b1728[_0xc6efaa(0x71)]('(session:\x20'+_0x159af3+')'));break;case _0xc6efaa(0xb1):_0x3c88f2['llm_project']=_0x19011b,console[_0xc6efaa(0x90)]('Session\x20llm_project\x20set\x20to:\x20'+a40_0x2b1728['green'](_0x19011b)+'\x20'+a40_0x2b1728[_0xc6efaa(0x71)]('(session:\x20'+_0x159af3+')'));break;case _0xc6efaa(0x83):{const {projectName:_0x2283ab,agentName:_0x3138be}=parseAgentRef(_0x19011b);_0x3138be?(_0x3c88f2['llm_project']=_0x2283ab,_0x3c88f2[_0xc6efaa(0x92)]=_0x3138be,console[_0xc6efaa(0x90)](_0xc6efaa(0x99)+a40_0x2b1728[_0xc6efaa(0x85)](_0x2283ab)+'\x20'+a40_0x2b1728[_0xc6efaa(0x71)](_0xc6efaa(0xa3)+_0x159af3+')')),console[_0xc6efaa(0x90)](_0xc6efaa(0x7f)+a40_0x2b1728[_0xc6efaa(0x85)](_0x3138be)+'\x20'+a40_0x2b1728[_0xc6efaa(0x71)]('(session:\x20'+_0x159af3+')'))):(_0x3c88f2[_0xc6efaa(0x92)]=_0x19011b,console[_0xc6efaa(0x90)]('Session\x20agent\x20set\x20to:\x20'+a40_0x2b1728[_0xc6efaa(0x85)](_0x19011b)+'\x20'+a40_0x2b1728['dim'](_0xc6efaa(0xa3)+_0x159af3+')')));break;}case'engage_workspace':_0x3c88f2[_0xc6efaa(0x9f)]=_0x19011b,console[_0xc6efaa(0x90)](_0xc6efaa(0x9e)+a40_0x2b1728[_0xc6efaa(0x85)](_0x19011b)+'\x20'+a40_0x2b1728[_0xc6efaa(0x71)](_0xc6efaa(0xa3)+_0x159af3+')'));break;}return saveSessionContext(_0x3c88f2,_0x5daa8e[_0xc6efaa(0xa0)]),console[_0xc6efaa(0x90)](a40_0x2b1728[_0xc6efaa(0x71)](_0xc6efaa(0x70))),0x0;}catch(_0x1582d0){return _0x1582d0 instanceof Error&&console[_0xc6efaa(0xab)](_0xc6efaa(0x87)+_0x1582d0[_0xc6efaa(0x9a)]),0x1;}}}
@@ -1 +1 @@
1
- function a41_0x410a(){const _0x551cab=['2409029CIHvGn','398312BZIIuB','length','2222334ZVYrru','3065shVNfX','verbose','Fetching\x20user\x20info...','10179480DRlnmL','description','5636784CvWVIM','8akRAwG','message','✔\x20Found\x20','execute','List\x20all\x20users\x20in\x20the\x20account','user\x20list','\x20\x20Cause:\x20','user','error','224624aVoIzf','Error:\x20','7188fShymK','list','6QhWhMA','data','cause','name','Listing\x20users...','Show\x20current\x20user\x20information'];a41_0x410a=function(){return _0x551cab;};return a41_0x410a();}const a41_0x381a4c=a41_0x5721;(function(_0x1fe10f,_0x81f1fa){const _0x1ca793=a41_0x5721,_0x5951f1=_0x1fe10f();while(!![]){try{const _0x128c3c=parseInt(_0x1ca793(0xb7))/0x1+parseInt(_0x1ca793(0xc9))/0x2*(-parseInt(_0x1ca793(0xb0))/0x3)+parseInt(_0x1ca793(0xbf))/0x4+parseInt(_0x1ca793(0xba))/0x5*(parseInt(_0x1ca793(0xcb))/0x6)+-parseInt(_0x1ca793(0xb6))/0x7+parseInt(_0x1ca793(0xc0))/0x8*(-parseInt(_0x1ca793(0xb9))/0x9)+-parseInt(_0x1ca793(0xbd))/0xa;if(_0x128c3c===_0x81f1fa)break;else _0x5951f1['push'](_0x5951f1['shift']());}catch(_0x4f24bd){_0x5951f1['push'](_0x5951f1['shift']());}}}(a41_0x410a,0xace8d));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';export class UserCommand extends BaseCommand{[a41_0x381a4c(0xb3)]=a41_0x381a4c(0xc7);['description']=a41_0x381a4c(0xb5);async[a41_0x381a4c(0xc3)](_0x36a232){const _0x3bc0f3=a41_0x381a4c,{options:_0x13808d,tdx:_0x447db9}=_0x36a232;try{const _0x1a8419=await withSpinner(_0x3bc0f3(0xbc),()=>_0x447db9[_0x3bc0f3(0xc7)]['getCurrent'](),{'verbose':_0x13808d[_0x3bc0f3(0xbb)]}),_0x2db200=_0x1a8419[_0x3bc0f3(0xb1)];return await handleSingleObjectOutput(_0x2db200,_0x13808d),0x0;}catch(_0x4deab0){if(_0x4deab0 instanceof SDKError)return console[_0x3bc0f3(0xc8)](_0x3bc0f3(0xca)+_0x4deab0['message']),_0x4deab0['cause']&&console[_0x3bc0f3(0xc8)](_0x3bc0f3(0xc6)+_0x4deab0['cause']),0x1;throw _0x4deab0;}}}function a41_0x5721(_0x18963c,_0x103e1d){_0x18963c=_0x18963c-0xaf;const _0x410a13=a41_0x410a();let _0x572102=_0x410a13[_0x18963c];return _0x572102;}export class UserListCommand extends BaseCommand{[a41_0x381a4c(0xb3)]=a41_0x381a4c(0xc5);[a41_0x381a4c(0xbe)]=a41_0x381a4c(0xc4);async[a41_0x381a4c(0xc3)](_0x3e2bdc){const _0x3263e0=a41_0x381a4c,{options:_0x3a3d8d,tdx:_0x118e71}=_0x3e2bdc;try{const _0x6f9b64=await withSpinner(_0x3263e0(0xb4),()=>_0x118e71[_0x3263e0(0xc7)][_0x3263e0(0xaf)](),{'verbose':_0x3a3d8d[_0x3263e0(0xbb)]}),_0x4dbdf6=_0x6f9b64[_0x3263e0(0xb1)];return console['error'](_0x3263e0(0xc2)+_0x4dbdf6[_0x3263e0(0xb8)]+'\x20user'+(_0x4dbdf6[_0x3263e0(0xb8)]!==0x1?'s':'')),await handleSDKOutput(_0x4dbdf6,_0x3a3d8d),0x0;}catch(_0x55b9d2){if(_0x55b9d2 instanceof SDKError)return console[_0x3263e0(0xc8)](_0x3263e0(0xca)+_0x55b9d2[_0x3263e0(0xc1)]),_0x55b9d2[_0x3263e0(0xb2)]&&console[_0x3263e0(0xc8)](_0x3263e0(0xc6)+_0x55b9d2['cause']),0x1;throw _0x55b9d2;}}}
1
+ function a41_0x2908(){const _0x1822dc=['\x20\x20Cause:\x20','description','233152oFpoch','1134856kwVdet','getCurrent','data','length','2HRTMSV','375288JREvjg','5hkqTfi','Show\x20current\x20user\x20information','user\x20list','user','Fetching\x20user\x20info...','✔\x20Found\x20','Listing\x20users...','verbose','name','\x20user','execute','List\x20all\x20users\x20in\x20the\x20account','1343928KihfyN','80861dpgdwX','1327928kyrPrN','list','cause','message','10KAUIPE','error','9TmstBu','4302133yjYpqb'];a41_0x2908=function(){return _0x1822dc;};return a41_0x2908();}const a41_0x32f3ea=a41_0x5d0d;(function(_0x127a3a,_0xe8e60d){const _0x328b13=a41_0x5d0d,_0x19c825=_0x127a3a();while(!![]){try{const _0x93bccc=parseInt(_0x328b13(0x106))/0x1*(-parseInt(_0x328b13(0xf7))/0x2)+-parseInt(_0x328b13(0xf8))/0x3+parseInt(_0x328b13(0xf2))/0x4+parseInt(_0x328b13(0xf9))/0x5*(parseInt(_0x328b13(0x105))/0x6)+-parseInt(_0x328b13(0x107))/0x7+parseInt(_0x328b13(0xf3))/0x8*(-parseInt(_0x328b13(0x10d))/0x9)+parseInt(_0x328b13(0x10b))/0xa*(parseInt(_0x328b13(0x10e))/0xb);if(_0x93bccc===_0xe8e60d)break;else _0x19c825['push'](_0x19c825['shift']());}catch(_0x40509b){_0x19c825['push'](_0x19c825['shift']());}}}(a41_0x2908,0x212b5));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';function a41_0x5d0d(_0x293962,_0x4c6089){_0x293962=_0x293962-0xf2;const _0x290819=a41_0x2908();let _0x5d0dbb=_0x290819[_0x293962];return _0x5d0dbb;}import{handleSDKOutput,handleSingleObjectOutput}from'../core/command-output.js';import{withSpinner}from'../utils/spinner.js';export class UserCommand extends BaseCommand{[a41_0x32f3ea(0x101)]=a41_0x32f3ea(0xfc);[a41_0x32f3ea(0x110)]=a41_0x32f3ea(0xfa);async[a41_0x32f3ea(0x103)](_0x12510c){const _0x2327f2=a41_0x32f3ea,{options:_0x3d9a43,tdx:_0x57b72e}=_0x12510c;try{const _0x33d0b4=await withSpinner(_0x2327f2(0xfd),()=>_0x57b72e[_0x2327f2(0xfc)][_0x2327f2(0xf4)](),{'verbose':_0x3d9a43[_0x2327f2(0x100)]}),_0x4d209e=_0x33d0b4[_0x2327f2(0xf5)];return await handleSingleObjectOutput(_0x4d209e,_0x3d9a43),0x0;}catch(_0x3f3f71){if(_0x3f3f71 instanceof SDKError)return console['error']('Error:\x20'+_0x3f3f71[_0x2327f2(0x10a)]),_0x3f3f71[_0x2327f2(0x109)]&&console[_0x2327f2(0x10c)](_0x2327f2(0x10f)+_0x3f3f71[_0x2327f2(0x109)]),0x1;throw _0x3f3f71;}}}export class UserListCommand extends BaseCommand{[a41_0x32f3ea(0x101)]=a41_0x32f3ea(0xfb);[a41_0x32f3ea(0x110)]=a41_0x32f3ea(0x104);async[a41_0x32f3ea(0x103)](_0x381f65){const _0x200c16=a41_0x32f3ea,{options:_0x4d2652,tdx:_0x3911db}=_0x381f65;try{const _0x45ce0e=await withSpinner(_0x200c16(0xff),()=>_0x3911db[_0x200c16(0xfc)][_0x200c16(0x108)](),{'verbose':_0x4d2652[_0x200c16(0x100)]}),_0x35c9fa=_0x45ce0e[_0x200c16(0xf5)];return console[_0x200c16(0x10c)](_0x200c16(0xfe)+_0x35c9fa[_0x200c16(0xf6)]+_0x200c16(0x102)+(_0x35c9fa[_0x200c16(0xf6)]!==0x1?'s':'')),await handleSDKOutput(_0x35c9fa,_0x4d2652),0x0;}catch(_0x396e30){if(_0x396e30 instanceof SDKError)return console[_0x200c16(0x10c)]('Error:\x20'+_0x396e30[_0x200c16(0x10a)]),_0x396e30['cause']&&console['error'](_0x200c16(0x10f)+_0x396e30[_0x200c16(0x109)]),0x1;throw _0x396e30;}}}