@treasuredata/tdx 0.23.1 → 0.25.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (176) 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.d.ts.map +1 -1
  5. package/dist/cli.js +1 -1
  6. package/dist/cli.js.map +1 -1
  7. package/dist/commands/activations.js +1 -1
  8. package/dist/commands/agent-command.js +1 -1
  9. package/dist/commands/agent-test-command.js +1 -1
  10. package/dist/commands/api-command.js +1 -1
  11. package/dist/commands/auth-command.js +1 -1
  12. package/dist/commands/chat-command.d.ts +14 -3
  13. package/dist/commands/chat-command.d.ts.map +1 -1
  14. package/dist/commands/chat-command.js +1 -1
  15. package/dist/commands/chat-command.js.map +1 -1
  16. package/dist/commands/claude-command.js +1 -1
  17. package/dist/commands/claude-statusline-command.js +1 -1
  18. package/dist/commands/claude-usage-command.js +1 -1
  19. package/dist/commands/command.js +1 -1
  20. package/dist/commands/connection-command.js +1 -1
  21. package/dist/commands/databases.js +1 -1
  22. package/dist/commands/describe.js +1 -1
  23. package/dist/commands/engage-command.js +1 -1
  24. package/dist/commands/job-command.js +1 -1
  25. package/dist/commands/journey-command.js +1 -1
  26. package/dist/commands/journey-validate-command.js +1 -1
  27. package/dist/commands/llm-command.js +1 -1
  28. package/dist/commands/mcp-command.js +1 -1
  29. package/dist/commands/parent-segment-command.js +1 -1
  30. package/dist/commands/profile-command.js +1 -1
  31. package/dist/commands/profiles-command.js +1 -1
  32. package/dist/commands/query-command.js +1 -1
  33. package/dist/commands/schedule-command.js +1 -1
  34. package/dist/commands/segment-command.js +1 -1
  35. package/dist/commands/segment-create-command.js +1 -1
  36. package/dist/commands/segment-fields-command.js +1 -1
  37. package/dist/commands/segment-pull-command.js +1 -1
  38. package/dist/commands/segment-push-command.js +1 -1
  39. package/dist/commands/segment-update-command.js +1 -1
  40. package/dist/commands/segment-use-command.js +1 -1
  41. package/dist/commands/segment-validate-command.js +1 -1
  42. package/dist/commands/segments.js +1 -1
  43. package/dist/commands/show.js +1 -1
  44. package/dist/commands/status-command.js +1 -1
  45. package/dist/commands/tables.js +1 -1
  46. package/dist/commands/unset-command.js +1 -1
  47. package/dist/commands/use-command.js +1 -1
  48. package/dist/commands/user-command.js +1 -1
  49. package/dist/commands/workflow-command.js +1 -1
  50. package/dist/core/auth.js +1 -1
  51. package/dist/core/command-output.js +1 -1
  52. package/dist/core/config.js +1 -1
  53. package/dist/core/connection-cache.js +1 -1
  54. package/dist/core/constants.js +1 -1
  55. package/dist/core/credential-cache.js +1 -1
  56. package/dist/core/global-context.js +1 -1
  57. package/dist/core/keychain.js +1 -1
  58. package/dist/core/profile.js +1 -1
  59. package/dist/core/project-config.js +1 -1
  60. package/dist/core/session.js +1 -1
  61. package/dist/core/user-cache.js +1 -1
  62. package/dist/core/version.js +1 -1
  63. package/dist/index.js +1 -1
  64. package/dist/mcp/server.js +1 -1
  65. package/dist/mcp/tools/index.js +1 -1
  66. package/dist/mcp/tools/tdx-run.js +1 -1
  67. package/dist/mcp/tools/tdx-search.js +1 -1
  68. package/dist/mcp/utils.js +1 -1
  69. package/dist/proxy/claude-usage-tracker.js +1 -1
  70. package/dist/proxy/passthrough-server.js +1 -1
  71. package/dist/proxy/sse-usage-parser.js +1 -1
  72. package/dist/sdk/agent/agent-config.js +1 -1
  73. package/dist/sdk/agent/agent-ref-parser.js +1 -1
  74. package/dist/sdk/agent/agent-yaml.js +1 -1
  75. package/dist/sdk/agent/test/evaluator.js +1 -1
  76. package/dist/sdk/agent/test/executor.js +1 -1
  77. package/dist/sdk/agent/test/index.js +1 -1
  78. package/dist/sdk/agent/test/output.js +1 -1
  79. package/dist/sdk/agent/test/parser.js +1 -1
  80. package/dist/sdk/api.js +1 -1
  81. package/dist/sdk/client/cdp-api-client.js +1 -1
  82. package/dist/sdk/client/endpoints.js +1 -1
  83. package/dist/sdk/client/engage-api-client.js +1 -1
  84. package/dist/sdk/client/http-client.js +1 -1
  85. package/dist/sdk/client/llm-api-client.js +1 -1
  86. package/dist/sdk/client/rate-limiter.js +1 -1
  87. package/dist/sdk/client/td-api-client.js +1 -1
  88. package/dist/sdk/client/trino-api-client.js +1 -1
  89. package/dist/sdk/client/workflow-client.js +1 -1
  90. package/dist/sdk/connection-validator.js +1 -1
  91. package/dist/sdk/connection.js +1 -1
  92. package/dist/sdk/engage.js +1 -1
  93. package/dist/sdk/errors.js +1 -1
  94. package/dist/sdk/index.js +1 -1
  95. package/dist/sdk/io/index.js +1 -1
  96. package/dist/sdk/io/node-filesystem.js +1 -1
  97. package/dist/sdk/job.js +1 -1
  98. package/dist/sdk/journey.js +1 -1
  99. package/dist/sdk/llm/chat-cache.js +1 -1
  100. package/dist/sdk/llm/index.d.ts.map +1 -1
  101. package/dist/sdk/llm/index.js +1 -1
  102. package/dist/sdk/llm/index.js.map +1 -1
  103. package/dist/sdk/llm/llm-backup-utils.js +1 -1
  104. package/dist/sdk/llm/model-factors.d.ts +4 -4
  105. package/dist/sdk/llm/model-factors.d.ts.map +1 -1
  106. package/dist/sdk/llm/model-factors.js +1 -1
  107. package/dist/sdk/llm/model-factors.js.map +1 -1
  108. package/dist/sdk/query/index.js +1 -1
  109. package/dist/sdk/query/sql-parser.js +1 -1
  110. package/dist/sdk/schedule.js +1 -1
  111. package/dist/sdk/segment/child-segment-yaml.js +1 -1
  112. package/dist/sdk/segment/fields-display.js +1 -1
  113. package/dist/sdk/segment/file-discovery.js +1 -1
  114. package/dist/sdk/segment/journey-utils.js +1 -1
  115. package/dist/sdk/segment/journey-yaml.js +1 -1
  116. package/dist/sdk/segment/parent-segment-preview.js +1 -1
  117. package/dist/sdk/segment/parent-segment-yaml.js +1 -1
  118. package/dist/sdk/segment/pull-workflow.js +1 -1
  119. package/dist/sdk/segment/push-workflow.js +1 -1
  120. package/dist/sdk/segment/resolution-context.js +1 -1
  121. package/dist/sdk/segment/segment-path-parser.js +1 -1
  122. package/dist/sdk/segment/segment-ref-parser.js +1 -1
  123. package/dist/sdk/segment/target-resolution.js +1 -1
  124. package/dist/sdk/segment/tdx-config.js +1 -1
  125. package/dist/sdk/segment/validate-files.js +1 -1
  126. package/dist/sdk/segment/yaml-validator.js +1 -1
  127. package/dist/sdk/segment.js +1 -1
  128. package/dist/sdk/types/index.js +1 -1
  129. package/dist/sdk/types/llm.d.ts +1 -0
  130. package/dist/sdk/types/llm.d.ts.map +1 -1
  131. package/dist/sdk/types/progress.js +1 -1
  132. package/dist/sdk/user.js +1 -1
  133. package/dist/sdk/util/format-detector.js +1 -1
  134. package/dist/sdk/util/formatters.js +1 -1
  135. package/dist/sdk/util/index.js +1 -1
  136. package/dist/sdk/util/tree-formatter.js +1 -1
  137. package/dist/sdk/workflow/archive-validation.js +1 -1
  138. package/dist/sdk/workflow/clone-workflow.js +1 -1
  139. package/dist/sdk/workflow/index.js +1 -1
  140. package/dist/sdk/workflow/pull-workflow.js +1 -1
  141. package/dist/sdk/workflow/push-workflow.js +1 -1
  142. package/dist/sdk/workflow/tdx-config.js +1 -1
  143. package/dist/sdk/workflow/workflow-utils.js +1 -1
  144. package/dist/test-utils/command-runner.js +1 -1
  145. package/dist/test-utils/factories.js +1 -1
  146. package/dist/test-utils/fixtures.js +1 -1
  147. package/dist/test-utils/http-mock.js +1 -1
  148. package/dist/test-utils/index.js +1 -1
  149. package/dist/utils/async.js +1 -1
  150. package/dist/utils/colors.js +1 -1
  151. package/dist/utils/diff.js +1 -1
  152. package/dist/utils/file-permissions.js +1 -1
  153. package/dist/utils/global-cache.js +1 -1
  154. package/dist/utils/json-loader.js +1 -1
  155. package/dist/utils/local-cache.js +1 -1
  156. package/dist/utils/logger/formatters/default-formatter.js +1 -1
  157. package/dist/utils/logger/formatters/index.js +1 -1
  158. package/dist/utils/logger/handlers/console-handler.js +1 -1
  159. package/dist/utils/logger/handlers/file-handler.js +1 -1
  160. package/dist/utils/logger/handlers/index.js +1 -1
  161. package/dist/utils/logger/handlers/null-handler.js +1 -1
  162. package/dist/utils/logger/index.js +1 -1
  163. package/dist/utils/logger/logger.js +1 -1
  164. package/dist/utils/logger/types.js +1 -1
  165. package/dist/utils/option-validation.js +1 -1
  166. package/dist/utils/port.js +1 -1
  167. package/dist/utils/process.js +1 -1
  168. package/dist/utils/process.js.map +1 -1
  169. package/dist/utils/prompt.js +1 -1
  170. package/dist/utils/spinner.js +1 -1
  171. package/dist/utils/sse-parser.js +1 -1
  172. package/dist/utils/string-utils.js +1 -1
  173. package/dist/utils/table-ref-parser.js +1 -1
  174. package/dist/utils/tdx-logger.js +1 -1
  175. package/dist/utils/version-check.js +1 -1
  176. package/package.json +1 -1
@@ -1 +1 @@
1
- const a32_0x12d2af=a32_0x274d;(function(_0x18bc6e,_0x405f4a){const _0xf1e1e4=a32_0x274d,_0x43c6cd=_0x18bc6e();while(!![]){try{const _0x58d82f=-parseInt(_0xf1e1e4(0x165))/0x1+parseInt(_0xf1e1e4(0x176))/0x2+parseInt(_0xf1e1e4(0x178))/0x3*(parseInt(_0xf1e1e4(0x164))/0x4)+-parseInt(_0xf1e1e4(0x160))/0x5*(parseInt(_0xf1e1e4(0x15a))/0x6)+parseInt(_0xf1e1e4(0x161))/0x7+parseInt(_0xf1e1e4(0x16d))/0x8+-parseInt(_0xf1e1e4(0x156))/0x9*(parseInt(_0xf1e1e4(0x173))/0xa);if(_0x58d82f===_0x405f4a)break;else _0x43c6cd['push'](_0x43c6cd['shift']());}catch(_0xc02116){_0x43c6cd['push'](_0x43c6cd['shift']());}}}(a32_0xcff5,0xf0113));import{BaseCommand}from'./command.js';import{handleSDKOutput}from'../core/command-output.js';function a32_0x274d(_0x598386,_0x24c855){_0x598386=_0x598386-0x151;const _0xcff514=a32_0xcff5();let _0x274d99=_0xcff514[_0x598386];return _0x274d99;}import{withSpinner}from'../utils/spinner.js';import{loadJSONFromOptions}from'../utils/json-loader.js';import{SDKError,ErrorCode}from'../sdk/index.js';import a32_0x4edd02 from'chalk';export class SegmentUpdateCommand extends BaseCommand{[a32_0x12d2af(0x174)]=a32_0x12d2af(0x162);[a32_0x12d2af(0x16f)]=a32_0x12d2af(0x17c);async[a32_0x12d2af(0x17b)](_0x4ffdf6){const _0x594427=a32_0x12d2af;console[_0x594427(0x17e)](a32_0x4edd02[_0x594427(0x17a)](_0x594427(0x159))),console[_0x594427(0x17e)](a32_0x4edd02[_0x594427(0x17a)](_0x594427(0x170)));const {options:_0x3b1ab5,args:_0x59b7ab,tdx:_0x38b8d9}=_0x4ffdf6,_0x127d29=_0x3b1ab5;if(_0x59b7ab[_0x594427(0x179)]===0x0)return console[_0x594427(0x17e)](_0x594427(0x182)),console[_0x594427(0x17e)](_0x594427(0x163)),console['error']('Examples:'),console[_0x594427(0x17e)](_0x594427(0x152)),console[_0x594427(0x17e)](_0x594427(0x183)),0x1;const _0x39e6e2=_0x59b7ab[0x0],_0x3fccbc=_0x3b1ab5[_0x594427(0x184)];let _0x2e59af=_0x39e6e2;_0x3fccbc&&!_0x39e6e2[_0x594427(0x15c)]('/')&&(_0x2e59af=_0x3fccbc+'/'+_0x39e6e2,_0x127d29[_0x594427(0x16c)]&&console[_0x594427(0x17e)](_0x594427(0x15b)+_0x2e59af));const _0x54182b=await withSpinner(_0x594427(0x171)+_0x2e59af+_0x594427(0x172),()=>_0x38b8d9[_0x594427(0x15f)][_0x594427(0x16a)](_0x2e59af),{'verbose':_0x127d29['verbose']}),_0x43aad1=_0x54182b[_0x594427(0x168)];_0x127d29['verbose']&&console['error']('Resolved\x20type:\x20'+_0x43aad1[_0x594427(0x167)]);if(_0x43aad1['type']!==_0x594427(0x15f))return console[_0x594427(0x17e)]('Error:\x20Cannot\x20update\x20'+_0x43aad1['type']+_0x594427(0x154)),console[_0x594427(0x17e)](_0x594427(0x177)),0x1;if(!_0x43aad1[_0x594427(0x16b)])throw new SDKError(ErrorCode[_0x594427(0x15d)],_0x594427(0x17d));const _0x5c725b=_0x43aad1[_0x594427(0x180)],_0x5e1e93=_0x43aad1['segmentId'];_0x127d29[_0x594427(0x16c)]&&(console[_0x594427(0x17e)](_0x594427(0x185)+_0x5c725b),console['error'](_0x594427(0x17f)+_0x5e1e93));let _0xdba0dc;if(_0x127d29[_0x594427(0x169)]){const _0x444864=_0x127d29[_0x594427(0x169)],_0x11f417=await withSpinner(_0x594427(0x157)+_0x444864+_0x594427(0x172),()=>_0x38b8d9[_0x594427(0x15f)][_0x594427(0x181)](_0x5c725b,_0x444864),{'verbose':_0x127d29[_0x594427(0x16c)]});_0xdba0dc=parseInt(_0x11f417[_0x594427(0x168)],0xa),_0x127d29[_0x594427(0x16c)]&&console[_0x594427(0x17e)](_0x594427(0x166)+_0xdba0dc);}const _0x3dd312=await loadJSONFromOptions(_0x127d29['rule'],_0x127d29[_0x594427(0x155)]),_0x5e5ba5={'name':_0x127d29[_0x594427(0x174)],'description':_0x127d29[_0x594427(0x16f)],'rule':_0x3dd312,'kind':_0x127d29[_0x594427(0x151)]!==undefined?parseInt(_0x127d29[_0x594427(0x151)],0xa):undefined,'segmentFolderId':_0xdba0dc},_0x20ffe0=await withSpinner(_0x594427(0x16e)+_0x43aad1[_0x594427(0x15e)]+'\x27...',()=>_0x38b8d9['segment'][_0x594427(0x153)](_0x5c725b,_0x5e1e93,_0x5e5ba5),{'verbose':_0x127d29[_0x594427(0x16c)]}),_0x395fea=_0x20ffe0[_0x594427(0x168)];return console[_0x594427(0x17e)](_0x594427(0x175)+_0x395fea[_0x594427(0x174)]+'\x27'),_0x2e59af!==_0x39e6e2&&console['error'](_0x594427(0x158)+_0x2e59af),await handleSDKOutput([_0x395fea],_0x127d29),0x0;}}function a32_0xcff5(){const _0x43abe3=['ruleFile','18tdLGoW','Resolving\x20folder\x20\x27','\x20\x20\x20Path:\x20','⚠\x20Deprecation\x20warning:\x20`segment\x20update`\x20is\x20deprecated.','3194832jHaitZ','Resolved\x20relative\x20path\x20to:\x20','includes','INTERNAL','segmentName','segment','10PIhnhV','3624257zEcfIs','segment:update','Usage:\x20tdx\x20segment\x20update\x20<path>\x20[options]','23216jEXLif','561451XijLYp','Resolved\x20folder\x20ID:\x20','type','data','folder','resolvePathToResource','segmentId','verbose','11041304omXMJQ','Updating\x20segment\x20\x27','description','\x20\x20Use\x20`tdx\x20sg\x20push`\x20with\x20YAML\x20files\x20instead.\x0a','Resolving\x20path\x20\x27','\x27...','10022030kRMdCv','name','✔\x20Updated\x20segment\x20\x27','2391108PAsuOy','Use:\x20tdx\x20segment\x20update\x20<path_to_segment>\x20[options]','786kQYHct','length','yellow','execute','Update\x20existing\x20child\x20segment','Segment\x20ID\x20missing\x20from\x20resolved\x20path','error','Segment\x20ID:\x20','parentId','resolveFolderId','Error:\x20Segment\x20path\x20or\x20name\x20is\x20required','\x20\x20tdx\x20segment\x20update\x20\x22High\x20Value\x22\x20--rule\x20\x27...\x27\x20\x20#\x20Relative\x20to\x20context','segmentPath','Parent\x20ID:\x20','kind','\x20\x20tdx\x20segment\x20update\x20\x22My\x20Audience/High\x20Value\x22\x20--description\x20\x22...\x22','updateSegmentById','.\x20Only\x20child\x20segments\x20can\x20be\x20updated.'];a32_0xcff5=function(){return _0x43abe3;};return a32_0xcff5();}
1
+ const a32_0x33fe08=a32_0x3dbc;(function(_0xb9dd02,_0x53bd12){const _0x2391fb=a32_0x3dbc,_0x4bd3b1=_0xb9dd02();while(!![]){try{const _0x46a8d6=parseInt(_0x2391fb(0x167))/0x1+-parseInt(_0x2391fb(0x187))/0x2+-parseInt(_0x2391fb(0x16d))/0x3*(parseInt(_0x2391fb(0x18a))/0x4)+-parseInt(_0x2391fb(0x17d))/0x5+parseInt(_0x2391fb(0x161))/0x6*(parseInt(_0x2391fb(0x17c))/0x7)+parseInt(_0x2391fb(0x166))/0x8*(parseInt(_0x2391fb(0x169))/0x9)+-parseInt(_0x2391fb(0x181))/0xa*(-parseInt(_0x2391fb(0x165))/0xb);if(_0x46a8d6===_0x53bd12)break;else _0x4bd3b1['push'](_0x4bd3b1['shift']());}catch(_0x29e4a5){_0x4bd3b1['push'](_0x4bd3b1['shift']());}}}(a32_0x3c08,0x3b351));import{BaseCommand}from'./command.js';import{handleSDKOutput}from'../core/command-output.js';function a32_0x3c08(){const _0x9dc57=['4TdhSXu','INTERNAL','kind','length','\x20\x20\x20Path:\x20','error','description','228fPsABI','\x20\x20Use\x20`tdx\x20sg\x20push`\x20with\x20YAML\x20files\x20instead.\x0a','name','segmentId','24277mYOvdr','3176ELjBmi','193826zUrMoB','Examples:','7029rvALFp','Segment\x20ID:\x20','segment','parentId','954663kIqfLr','verbose','\x27...','folder','\x20\x20tdx\x20segment\x20update\x20\x22High\x20Value\x22\x20--rule\x20\x27...\x27\x20\x20#\x20Relative\x20to\x20context','segmentPath','Error:\x20Segment\x20path\x20or\x20name\x20is\x20required','Segment\x20ID\x20missing\x20from\x20resolved\x20path','Resolving\x20path\x20\x27','rule','Resolved\x20relative\x20path\x20to:\x20','type','execute','Parent\x20ID:\x20','Use:\x20tdx\x20segment\x20update\x20<path_to_segment>\x20[options]','49427jjZUhr','2104390leHjnq','segmentName','Resolved\x20folder\x20ID:\x20','Resolving\x20folder\x20\x27','2080SovBHx','resolvePathToResource','data','Update\x20existing\x20child\x20segment','⚠\x20Deprecation\x20warning:\x20`segment\x20update`\x20is\x20deprecated.','yellow','499290rGAxcA','includes','resolveFolderId'];a32_0x3c08=function(){return _0x9dc57;};return a32_0x3c08();}import{withSpinner}from'../utils/spinner.js';function a32_0x3dbc(_0x3317a6,_0x4da875){_0x3317a6=_0x3317a6-0x15d;const _0x3c085e=a32_0x3c08();let _0x3dbcff=_0x3c085e[_0x3317a6];return _0x3dbcff;}import{loadJSONFromOptions}from'../utils/json-loader.js';import{SDKError,ErrorCode}from'../sdk/index.js';import a32_0x2224ae from'chalk';export class SegmentUpdateCommand extends BaseCommand{['name']='segment:update';['description']=a32_0x33fe08(0x184);async[a32_0x33fe08(0x179)](_0x275704){const _0xa13fe4=a32_0x33fe08;console['error'](a32_0x2224ae['yellow'](_0xa13fe4(0x185))),console[_0xa13fe4(0x15f)](a32_0x2224ae[_0xa13fe4(0x186)](_0xa13fe4(0x162)));const {options:_0x2c4f42,args:_0x4c99d3,tdx:_0x274950}=_0x275704,_0x3e3413=_0x2c4f42;if(_0x4c99d3[_0xa13fe4(0x15d)]===0x0)return console['error'](_0xa13fe4(0x173)),console['error']('Usage:\x20tdx\x20segment\x20update\x20<path>\x20[options]'),console[_0xa13fe4(0x15f)](_0xa13fe4(0x168)),console['error']('\x20\x20tdx\x20segment\x20update\x20\x22My\x20Audience/High\x20Value\x22\x20--description\x20\x22...\x22'),console['error'](_0xa13fe4(0x171)),0x1;const _0x5b782f=_0x4c99d3[0x0],_0x326453=_0x2c4f42[_0xa13fe4(0x172)];let _0x1faf1c=_0x5b782f;_0x326453&&!_0x5b782f[_0xa13fe4(0x188)]('/')&&(_0x1faf1c=_0x326453+'/'+_0x5b782f,_0x3e3413[_0xa13fe4(0x16e)]&&console[_0xa13fe4(0x15f)](_0xa13fe4(0x177)+_0x1faf1c));const _0x265f39=await withSpinner(_0xa13fe4(0x175)+_0x1faf1c+'\x27...',()=>_0x274950[_0xa13fe4(0x16b)][_0xa13fe4(0x182)](_0x1faf1c),{'verbose':_0x3e3413['verbose']}),_0x4ea03e=_0x265f39[_0xa13fe4(0x183)];_0x3e3413[_0xa13fe4(0x16e)]&&console[_0xa13fe4(0x15f)]('Resolved\x20type:\x20'+_0x4ea03e[_0xa13fe4(0x178)]);if(_0x4ea03e[_0xa13fe4(0x178)]!==_0xa13fe4(0x16b))return console[_0xa13fe4(0x15f)]('Error:\x20Cannot\x20update\x20'+_0x4ea03e[_0xa13fe4(0x178)]+'.\x20Only\x20child\x20segments\x20can\x20be\x20updated.'),console['error'](_0xa13fe4(0x17b)),0x1;if(!_0x4ea03e[_0xa13fe4(0x164)])throw new SDKError(ErrorCode[_0xa13fe4(0x18b)],_0xa13fe4(0x174));const _0x2878e1=_0x4ea03e[_0xa13fe4(0x16c)],_0x2262dd=_0x4ea03e[_0xa13fe4(0x164)];_0x3e3413[_0xa13fe4(0x16e)]&&(console[_0xa13fe4(0x15f)](_0xa13fe4(0x17a)+_0x2878e1),console[_0xa13fe4(0x15f)](_0xa13fe4(0x16a)+_0x2262dd));let _0x5ede9f;if(_0x3e3413[_0xa13fe4(0x170)]){const _0x29da8d=_0x3e3413[_0xa13fe4(0x170)],_0x1b9849=await withSpinner(_0xa13fe4(0x180)+_0x29da8d+_0xa13fe4(0x16f),()=>_0x274950[_0xa13fe4(0x16b)][_0xa13fe4(0x189)](_0x2878e1,_0x29da8d),{'verbose':_0x3e3413[_0xa13fe4(0x16e)]});_0x5ede9f=parseInt(_0x1b9849['data'],0xa),_0x3e3413[_0xa13fe4(0x16e)]&&console[_0xa13fe4(0x15f)](_0xa13fe4(0x17f)+_0x5ede9f);}const _0x4ccd52=await loadJSONFromOptions(_0x3e3413[_0xa13fe4(0x176)],_0x3e3413['ruleFile']),_0x3e27c1={'name':_0x3e3413[_0xa13fe4(0x163)],'description':_0x3e3413[_0xa13fe4(0x160)],'rule':_0x4ccd52,'kind':_0x3e3413[_0xa13fe4(0x18c)]!==undefined?parseInt(_0x3e3413[_0xa13fe4(0x18c)],0xa):undefined,'segmentFolderId':_0x5ede9f},_0x5b6961=await withSpinner('Updating\x20segment\x20\x27'+_0x4ea03e[_0xa13fe4(0x17e)]+_0xa13fe4(0x16f),()=>_0x274950[_0xa13fe4(0x16b)]['updateSegmentById'](_0x2878e1,_0x2262dd,_0x3e27c1),{'verbose':_0x3e3413[_0xa13fe4(0x16e)]}),_0x4272ac=_0x5b6961[_0xa13fe4(0x183)];return console[_0xa13fe4(0x15f)]('✔\x20Updated\x20segment\x20\x27'+_0x4272ac[_0xa13fe4(0x163)]+'\x27'),_0x1faf1c!==_0x5b782f&&console['error'](_0xa13fe4(0x15e)+_0x1faf1c),await handleSDKOutput([_0x4272ac],_0x3e3413),0x0;}}
@@ -1 +1 @@
1
- const a33_0x1f0fc6=a33_0x557f;(function(_0x42c13d,_0x5c206f){const _0x2ed91d=a33_0x557f,_0x2031d0=_0x42c13d();while(!![]){try{const _0x13dd5a=parseInt(_0x2ed91d(0x18c))/0x1+parseInt(_0x2ed91d(0x1bc))/0x2*(-parseInt(_0x2ed91d(0x1a3))/0x3)+parseInt(_0x2ed91d(0x191))/0x4*(parseInt(_0x2ed91d(0x195))/0x5)+parseInt(_0x2ed91d(0x1b3))/0x6+parseInt(_0x2ed91d(0x1b0))/0x7+parseInt(_0x2ed91d(0x1b2))/0x8*(-parseInt(_0x2ed91d(0x1a8))/0x9)+-parseInt(_0x2ed91d(0x1b1))/0xa;if(_0x13dd5a===_0x5c206f)break;else _0x2031d0['push'](_0x2031d0['shift']());}catch(_0x565056){_0x2031d0['push'](_0x2031d0['shift']());}}}(a33_0x2c63,0x8bac6));function a33_0x2c63(){const _0x14d01e=['1006672FSWaRP','3032442DuqVvr','verbose','split','folderPath','Context\x20can\x20only\x20be\x20set\x20to\x20a\x20parent\x20segment\x20or\x20folder.','\x20\x20tdx\x20segment\x20use\x20\x22My\x20Audience/Marketing\x22','fullPath','Resolving\x20path\x20\x27','cyan','6SImOlW','join','Use\x20\x22tdx\x20use\x22\x20to\x20see\x20all\x20context\x20parameters','resolvePathToResource','site','execute','Resolved\x20relative\x20path\x20to:\x20','log','segments','slice','parent_segment','Error:\x20Path\x20is\x20required\x0a','Use\x20\x22tdx\x20segments\x22\x20to\x20list\x20contents\x20in\x20this\x20context','169584mtusFs','parentName','\x20\x20tdx\x20segment\x20use\x20\x22My\x20Audience\x22','Set\x20current\x20segment/folder\x20context\x20for\x20navigation','Error:\x20No\x20context\x20set.\x20Cannot\x20use\x20relative\x20path.','66520EitMwj','green','config','segment:use','185orireL','Examples:','isDirectory','✔\x20Context\x20set\x20to:\x20','error','Resolved\x20path\x20type:\x20','Error:\x20Cannot\x20set\x20context\x20to\x20a\x20segment.','Target\x20path:\x20','Parent\x20ID:\x20','length','red','Usage:\x20tdx\x20segment\x20use\x20<path>','Tip:\x20Run\x20`tdx\x20sg\x20pull\x20<parent_name>`\x20first\x20to\x20create\x20the\x20folder\x20structure','name','559902BoqhcI','description','Site:\x20','dim','type','36IJGZfB','Error:\x20No\x20tdx.json\x20found\x20in\x20or\x20above:\x20','parentId','segment','data','✔\x20Context\x20cleared.\x20Back\x20to\x20root.','\x27...','\x20\x20tdx\x20segment\x20use\x20/\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Clear\x20context','7579250jAPFRP','7377110KNewTE'];a33_0x2c63=function(){return _0x14d01e;};return a33_0x2c63();}import{existsSync,statSync}from'fs';import a33_0x209ef1 from'chalk';import{BaseCommand}from'./command.js';function a33_0x557f(_0x3e3645,_0x3a6a26){_0x3e3645=_0x3e3645-0x184;const _0x2c6314=a33_0x2c63();let _0x557fdc=_0x2c6314[_0x3e3645];return _0x557fdc;}import{saveSessionContext}from'../core/session.js';import{withSpinner}from'../utils/spinner.js';import{parsePath,normalizePath}from'../sdk/segment/segment-path-parser.js';import{findTdxConfig}from'../sdk/segment/tdx-config.js';export class SegmentUseCommand extends BaseCommand{[a33_0x1f0fc6(0x1a2)]=a33_0x1f0fc6(0x194);[a33_0x1f0fc6(0x1a4)]=a33_0x1f0fc6(0x18f);async[a33_0x1f0fc6(0x184)](_0x3b1bf3){const _0x395d6f=a33_0x1f0fc6,{options:_0x29a2cb,args:_0x3a93ad,tdx:_0x29cec9}=_0x3b1bf3;if(_0x3a93ad[_0x395d6f(0x19e)]===0x0)return console['error'](a33_0x209ef1['red'](_0x395d6f(0x18a))),console['error'](_0x395d6f(0x1a0)),console[_0x395d6f(0x199)](_0x395d6f(0x196)),console[_0x395d6f(0x199)](_0x395d6f(0x18e)),console[_0x395d6f(0x199)](_0x395d6f(0x1b8)),console['error'](_0x395d6f(0x1af)),console['error']('\x20\x20tdx\x20segment\x20use\x20..\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Go\x20to\x20parent'),0x1;const _0x14388f=_0x3a93ad[0x0],_0x4f65fe=_0x29a2cb['session'];try{if(_0x14388f==='/')return saveSessionContext({'segment_path':undefined},_0x4f65fe),console[_0x395d6f(0x186)](a33_0x209ef1[_0x395d6f(0x192)](_0x395d6f(0x1ad))),0x0;if(existsSync(_0x14388f)&&statSync(_0x14388f)[_0x395d6f(0x197)]()){let _0x19dfaa;try{_0x19dfaa=findTdxConfig(_0x14388f);}catch{return console[_0x395d6f(0x199)](a33_0x209ef1[_0x395d6f(0x19f)](_0x395d6f(0x1a9)+_0x14388f)),console[_0x395d6f(0x199)](a33_0x209ef1['cyan'](_0x395d6f(0x1a1))),0x1;}const _0xd16341=_0x19dfaa[_0x395d6f(0x193)][_0x395d6f(0x189)];return saveSessionContext({'segment_path':_0xd16341,'parent_segment':_0xd16341},_0x4f65fe),console[_0x395d6f(0x186)](a33_0x209ef1[_0x395d6f(0x192)](_0x395d6f(0x198)+a33_0x209ef1[_0x395d6f(0x1bb)](_0xd16341))),0x0;}const _0x30bd44=_0x29a2cb['segmentPath'];let _0x583065=_0x14388f;const _0x3a38b7=parsePath(_0x14388f);if(!_0x3a38b7['isAbsolute']){if(!_0x30bd44)return console[_0x395d6f(0x199)](a33_0x209ef1[_0x395d6f(0x19f)](_0x395d6f(0x190))),console['error'](a33_0x209ef1[_0x395d6f(0x1bb)]('Use\x20an\x20absolute\x20path\x20or\x20set\x20context\x20with:\x20tdx\x20segment\x20use\x20<parent_name>')),0x1;if(_0x14388f==='..'){const _0x3fac8a=_0x30bd44[_0x395d6f(0x1b5)]('/')[_0x395d6f(0x188)](0x0,-0x1)[_0x395d6f(0x1bd)]('/');_0x583065=_0x3fac8a||'/';}else _0x14388f==='.'?_0x583065=_0x30bd44:_0x583065=_0x30bd44+'/'+_0x14388f;_0x29a2cb[_0x395d6f(0x1b4)]&&console['error'](_0x395d6f(0x185)+_0x583065);}if(_0x583065==='/'||_0x583065==='')return saveSessionContext({'segment_path':undefined},_0x4f65fe),console[_0x395d6f(0x186)](a33_0x209ef1['green']('✔\x20Context\x20cleared.\x20Back\x20to\x20root.')),0x0;_0x583065=normalizePath(_0x583065);const _0x506bac=parsePath(_0x583065)[_0x395d6f(0x187)];if(_0x506bac['length']===0x0)return saveSessionContext({'segment_path':undefined},_0x4f65fe),console[_0x395d6f(0x186)](a33_0x209ef1[_0x395d6f(0x192)]('✔\x20Context\x20cleared.\x20Back\x20to\x20root.')),0x0;_0x29a2cb[_0x395d6f(0x1b4)]&&(console[_0x395d6f(0x199)](_0x395d6f(0x1a5)+_0x29a2cb[_0x395d6f(0x1c0)]),console[_0x395d6f(0x199)](_0x395d6f(0x19c)+_0x583065));const _0x179461=await withSpinner(_0x395d6f(0x1ba)+_0x583065+_0x395d6f(0x1ae),()=>_0x29cec9[_0x395d6f(0x1ab)][_0x395d6f(0x1bf)](_0x583065),{'verbose':_0x29a2cb['verbose']}),_0x3c18c4=_0x179461[_0x395d6f(0x1ac)];_0x29a2cb[_0x395d6f(0x1b4)]&&(console['error'](_0x395d6f(0x19a)+_0x3c18c4[_0x395d6f(0x1a7)]),console['error'](_0x395d6f(0x19d)+_0x3c18c4[_0x395d6f(0x1aa)]),_0x3c18c4['folderId']&&console['error']('Folder\x20ID:\x20'+_0x3c18c4['folderId']));if(_0x3c18c4[_0x395d6f(0x1a7)]===_0x395d6f(0x1ab))return console[_0x395d6f(0x199)](a33_0x209ef1[_0x395d6f(0x19f)](_0x395d6f(0x19b))),console[_0x395d6f(0x199)](_0x395d6f(0x1b7)),console[_0x395d6f(0x199)](a33_0x209ef1[_0x395d6f(0x1bb)]('Use:\x20tdx\x20segment\x20use\x20'+_0x3c18c4[_0x395d6f(0x18d)]+(_0x3c18c4[_0x395d6f(0x1b6)]?'/'+_0x3c18c4['folderPath'][_0x395d6f(0x1bd)]('/'):''))),0x1;return saveSessionContext({'segment_path':_0x3c18c4[_0x395d6f(0x1b9)],'parent_segment':_0x3c18c4[_0x395d6f(0x18d)]},_0x4f65fe),console[_0x395d6f(0x186)](a33_0x209ef1['green'](_0x395d6f(0x198)+a33_0x209ef1[_0x395d6f(0x1bb)](_0x3c18c4[_0x395d6f(0x1b9)]))),_0x29a2cb[_0x395d6f(0x1b4)]&&(console[_0x395d6f(0x199)](a33_0x209ef1[_0x395d6f(0x1a6)](_0x395d6f(0x18b))),console[_0x395d6f(0x199)](a33_0x209ef1[_0x395d6f(0x1a6)](_0x395d6f(0x1be)))),0x0;}catch(_0x49a0a2){throw _0x49a0a2;}}}
1
+ const a33_0x6b2ba3=a33_0x4cb2;(function(_0x5279ca,_0x51543c){const _0x44fef1=a33_0x4cb2,_0x255bc8=_0x5279ca();while(!![]){try{const _0x7ecbce=-parseInt(_0x44fef1(0xb2))/0x1+-parseInt(_0x44fef1(0xc0))/0x2+parseInt(_0x44fef1(0xdd))/0x3*(parseInt(_0x44fef1(0xd0))/0x4)+parseInt(_0x44fef1(0xbb))/0x5+parseInt(_0x44fef1(0xb3))/0x6+parseInt(_0x44fef1(0xdb))/0x7+parseInt(_0x44fef1(0xce))/0x8*(-parseInt(_0x44fef1(0xe1))/0x9);if(_0x7ecbce===_0x51543c)break;else _0x255bc8['push'](_0x255bc8['shift']());}catch(_0x24efb6){_0x255bc8['push'](_0x255bc8['shift']());}}}(a33_0x562b,0x7c36b));import{existsSync,statSync}from'fs';import a33_0xb41b2b from'chalk';import{BaseCommand}from'./command.js';import{saveSessionContext}from'../core/session.js';import{withSpinner}from'../utils/spinner.js';import{parsePath,normalizePath}from'../sdk/segment/segment-path-parser.js';import{findTdxConfig}from'../sdk/segment/tdx-config.js';function a33_0x4cb2(_0x55cd77,_0x34d8fe){_0x55cd77=_0x55cd77-0xb0;const _0x562bf3=a33_0x562b();let _0x4cb262=_0x562bf3[_0x55cd77];return _0x4cb262;}export class SegmentUseCommand extends BaseCommand{[a33_0x6b2ba3(0xc5)]=a33_0x6b2ba3(0xd1);[a33_0x6b2ba3(0xe4)]='Set\x20current\x20segment/folder\x20context\x20for\x20navigation';async[a33_0x6b2ba3(0xb9)](_0x5aba66){const _0x260a5b=a33_0x6b2ba3,{options:_0x34b0cb,args:_0x29e631,tdx:_0x1ddf20}=_0x5aba66;if(_0x29e631[_0x260a5b(0xbe)]===0x0)return console[_0x260a5b(0xb5)](a33_0xb41b2b['red'](_0x260a5b(0xe2))),console['error'](_0x260a5b(0xb7)),console[_0x260a5b(0xb5)](_0x260a5b(0xc8)),console[_0x260a5b(0xb5)](_0x260a5b(0xe7)),console[_0x260a5b(0xb5)]('\x20\x20tdx\x20segment\x20use\x20\x22My\x20Audience/Marketing\x22'),console[_0x260a5b(0xb5)](_0x260a5b(0xc2)),console[_0x260a5b(0xb5)](_0x260a5b(0xb4)),0x1;const _0x4241be=_0x29e631[0x0],_0x394897=_0x34b0cb[_0x260a5b(0xd5)];try{if(_0x4241be==='/')return saveSessionContext({'segment_path':undefined},_0x394897),console[_0x260a5b(0xd9)](a33_0xb41b2b[_0x260a5b(0xe9)](_0x260a5b(0xe0))),0x0;if(existsSync(_0x4241be)&&statSync(_0x4241be)[_0x260a5b(0xca)]()){let _0x586b57;try{_0x586b57=findTdxConfig(_0x4241be);}catch{return console[_0x260a5b(0xb5)](a33_0xb41b2b[_0x260a5b(0xd6)](_0x260a5b(0xcf)+_0x4241be)),console[_0x260a5b(0xb5)](a33_0xb41b2b['cyan'](_0x260a5b(0xbc))),0x1;}const _0x245f96=_0x586b57['config']['parent_segment'];return saveSessionContext({'segment_path':_0x245f96,'parent_segment':_0x245f96},_0x394897),console['log'](a33_0xb41b2b[_0x260a5b(0xe9)](_0x260a5b(0xd8)+a33_0xb41b2b[_0x260a5b(0xb8)](_0x245f96))),0x0;}const _0x40019c=_0x34b0cb['segmentPath'];let _0x543d14=_0x4241be;const _0x161434=parsePath(_0x4241be);if(!_0x161434[_0x260a5b(0xd3)]){if(!_0x40019c)return console['error'](a33_0xb41b2b['red'](_0x260a5b(0xd2))),console[_0x260a5b(0xb5)](a33_0xb41b2b[_0x260a5b(0xb8)](_0x260a5b(0xd7))),0x1;if(_0x4241be==='..'){const _0x268d09=_0x40019c[_0x260a5b(0xe6)]('/')[_0x260a5b(0xcb)](0x0,-0x1)['join']('/');_0x543d14=_0x268d09||'/';}else _0x4241be==='.'?_0x543d14=_0x40019c:_0x543d14=_0x40019c+'/'+_0x4241be;_0x34b0cb[_0x260a5b(0xc7)]&&console['error']('Resolved\x20relative\x20path\x20to:\x20'+_0x543d14);}if(_0x543d14==='/'||_0x543d14==='')return saveSessionContext({'segment_path':undefined},_0x394897),console[_0x260a5b(0xd9)](a33_0xb41b2b[_0x260a5b(0xe9)](_0x260a5b(0xe0))),0x0;_0x543d14=normalizePath(_0x543d14);const _0x37db84=parsePath(_0x543d14)[_0x260a5b(0xdf)];if(_0x37db84['length']===0x0)return saveSessionContext({'segment_path':undefined},_0x394897),console[_0x260a5b(0xd9)](a33_0xb41b2b['green'](_0x260a5b(0xe0))),0x0;_0x34b0cb[_0x260a5b(0xc7)]&&(console[_0x260a5b(0xb5)]('Site:\x20'+_0x34b0cb['site']),console['error'](_0x260a5b(0xd4)+_0x543d14));const _0x3a5955=await withSpinner(_0x260a5b(0xcd)+_0x543d14+_0x260a5b(0xe8),()=>_0x1ddf20['segment'][_0x260a5b(0xe3)](_0x543d14),{'verbose':_0x34b0cb['verbose']}),_0x2956b3=_0x3a5955['data'];_0x34b0cb[_0x260a5b(0xc7)]&&(console[_0x260a5b(0xb5)](_0x260a5b(0xb6)+_0x2956b3[_0x260a5b(0xc3)]),console[_0x260a5b(0xb5)](_0x260a5b(0xbd)+_0x2956b3[_0x260a5b(0xc4)]),_0x2956b3[_0x260a5b(0xcc)]&&console['error'](_0x260a5b(0xb0)+_0x2956b3[_0x260a5b(0xcc)]));if(_0x2956b3[_0x260a5b(0xc3)]===_0x260a5b(0xda))return console[_0x260a5b(0xb5)](a33_0xb41b2b[_0x260a5b(0xd6)](_0x260a5b(0xbf))),console['error'](_0x260a5b(0xde)),console[_0x260a5b(0xb5)](a33_0xb41b2b[_0x260a5b(0xb8)](_0x260a5b(0xc9)+_0x2956b3['parentName']+(_0x2956b3['folderPath']?'/'+_0x2956b3['folderPath'][_0x260a5b(0xdc)]('/'):''))),0x1;return saveSessionContext({'segment_path':_0x2956b3[_0x260a5b(0xb1)],'parent_segment':_0x2956b3[_0x260a5b(0xc6)]},_0x394897),console[_0x260a5b(0xd9)](a33_0xb41b2b[_0x260a5b(0xe9)](_0x260a5b(0xd8)+a33_0xb41b2b[_0x260a5b(0xb8)](_0x2956b3[_0x260a5b(0xb1)]))),_0x34b0cb[_0x260a5b(0xc7)]&&(console[_0x260a5b(0xb5)](a33_0xb41b2b[_0x260a5b(0xe5)](_0x260a5b(0xc1))),console[_0x260a5b(0xb5)](a33_0xb41b2b[_0x260a5b(0xe5)](_0x260a5b(0xba)))),0x0;}catch(_0xdc45e5){throw _0xdc45e5;}}}function a33_0x562b(){const _0x4b4492=['Parent\x20ID:\x20','length','Error:\x20Cannot\x20set\x20context\x20to\x20a\x20segment.','1425438TXmTJT','Use\x20\x22tdx\x20segments\x22\x20to\x20list\x20contents\x20in\x20this\x20context','\x20\x20tdx\x20segment\x20use\x20/\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Clear\x20context','type','parentId','name','parentName','verbose','Examples:','Use:\x20tdx\x20segment\x20use\x20','isDirectory','slice','folderId','Resolving\x20path\x20\x27','25216ncooFK','Error:\x20No\x20tdx.json\x20found\x20in\x20or\x20above:\x20','292mRwpgb','segment:use','Error:\x20No\x20context\x20set.\x20Cannot\x20use\x20relative\x20path.','isAbsolute','Target\x20path:\x20','session','red','Use\x20an\x20absolute\x20path\x20or\x20set\x20context\x20with:\x20tdx\x20segment\x20use\x20<parent_name>','✔\x20Context\x20set\x20to:\x20','log','segment','3825654pUPsvj','join','7143rPhRfm','Context\x20can\x20only\x20be\x20set\x20to\x20a\x20parent\x20segment\x20or\x20folder.','segments','✔\x20Context\x20cleared.\x20Back\x20to\x20root.','135GgtyFL','Error:\x20Path\x20is\x20required\x0a','resolvePathToResource','description','dim','split','\x20\x20tdx\x20segment\x20use\x20\x22My\x20Audience\x22','\x27...','green','Folder\x20ID:\x20','fullPath','207646wUstxZ','2404398dJkUEr','\x20\x20tdx\x20segment\x20use\x20..\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Go\x20to\x20parent','error','Resolved\x20path\x20type:\x20','Usage:\x20tdx\x20segment\x20use\x20<path>','cyan','execute','Use\x20\x22tdx\x20use\x22\x20to\x20see\x20all\x20context\x20parameters','1776780kuXLRx','Tip:\x20Run\x20`tdx\x20sg\x20pull\x20<parent_name>`\x20first\x20to\x20create\x20the\x20folder\x20structure'];a33_0x562b=function(){return _0x4b4492;};return a33_0x562b();}
@@ -1 +1 @@
1
- const a34_0x3d4285=a34_0x13a7;(function(_0x52c32c,_0xef18ab){const _0x829650=a34_0x13a7,_0x43df81=_0x52c32c();while(!![]){try{const _0x39f682=-parseInt(_0x829650(0x14f))/0x1+parseInt(_0x829650(0x140))/0x2+-parseInt(_0x829650(0x139))/0x3*(-parseInt(_0x829650(0x131))/0x4)+-parseInt(_0x829650(0x132))/0x5*(-parseInt(_0x829650(0x13b))/0x6)+-parseInt(_0x829650(0x150))/0x7+-parseInt(_0x829650(0x12c))/0x8*(parseInt(_0x829650(0x133))/0x9)+parseInt(_0x829650(0x141))/0xa;if(_0x39f682===_0xef18ab)break;else _0x43df81['push'](_0x43df81['shift']());}catch(_0xd3e6d8){_0x43df81['push'](_0x43df81['shift']());}}}(a34_0x35a5,0x9e557));import{BaseCommand}from'./command.js';import{resolveTarget,isSuccessfulResolution}from'../sdk/segment/target-resolution.js';import{findYamlFiles}from'../sdk/segment/file-discovery.js';function a34_0x13a7(_0x412ac5,_0x2deba4){_0x412ac5=_0x412ac5-0x124;const _0x35a5de=a34_0x35a5();let _0x13a7c5=_0x35a5de[_0x412ac5];return _0x13a7c5;}import{existsSync}from'fs';import a34_0x3e4e5f from'chalk';import{formatValidationResult}from'../sdk/segment/yaml-validator.js';import{validateYamlFiles,isValidationResult,calculateSummary}from'../sdk/segment/validate-files.js';export class SegmentValidateCommand extends BaseCommand{['name']=a34_0x3d4285(0x147);[a34_0x3d4285(0x145)]='Validate\x20segment\x20and\x20journey\x20YAML\x20files';async[a34_0x3d4285(0x126)](_0x46747b){const _0x253998=a34_0x3d4285,{options:_0x292a2f,args:_0x33b5d3}=_0x46747b,_0x59542b=_0x292a2f,_0x11c21a=await resolveTarget({'arg':_0x33b5d3[0x0],'contextParent':_0x292a2f['parentSegment'],'cwd':process['cwd']()});if(!isSuccessfulResolution(_0x11c21a))return _0x11c21a[_0x253998(0x127)]==='no_parent'?(console[_0x253998(0x14d)](a34_0x3e4e5f[_0x253998(0x144)](_0x253998(0x13d))),console['error'](_0x253998(0x12d)),console[_0x253998(0x14d)](_0x253998(0x152)),console[_0x253998(0x14d)](_0x253998(0x138))):(console[_0x253998(0x14d)](a34_0x3e4e5f['red']('Error:\x20'+_0x11c21a[_0x253998(0x14b)]+'\x0a')),_0x11c21a[_0x253998(0x12a)]&&console['error'](a34_0x3e4e5f[_0x253998(0x13c)](_0x11c21a[_0x253998(0x12a)]))),0x1;const _0x38f273=_0x11c21a[_0x253998(0x13e)],_0x35b121=_0x11c21a[_0x253998(0x129)]==='file'?_0x11c21a[_0x253998(0x12f)]:undefined;if(!_0x35b121&&!existsSync(_0x38f273))return console[_0x253998(0x14d)](a34_0x3e4e5f[_0x253998(0x124)]('Error:\x20Directory\x20not\x20found:\x20'+_0x38f273+'\x0a')),0x1;let _0x4a73ec;if(_0x35b121){if(!_0x35b121[_0x253998(0x154)](_0x253998(0x148))&&!_0x35b121['endsWith'](_0x253998(0x151)))return console['error'](a34_0x3e4e5f[_0x253998(0x124)](_0x253998(0x125)+_0x35b121+'\x0a')),0x1;_0x4a73ec=[_0x35b121];}else _0x4a73ec=findYamlFiles(_0x38f273);if(_0x4a73ec[_0x253998(0x14c)]===0x0)return console[_0x253998(0x14d)](a34_0x3e4e5f[_0x253998(0x124)](_0x253998(0x14e)+_0x38f273+'\x0a')),0x1;const _0x4516db=validateYamlFiles(_0x4a73ec,_0x38f273),_0x5054b4=calculateSummary(_0x4516db);for(const _0x226fe1 of _0x4516db){if(!isValidationResult(_0x226fe1))continue;const {relativePath:_0x57cfad,source:_0x531a3d,result:_0x2e738a,fileType:_0x42df4c}=_0x226fe1,_0x5b94a7=_0x42df4c;if(_0x2e738a[_0x253998(0x13f)]&&_0x2e738a[_0x253998(0x146)][_0x253998(0x14c)]===0x0)_0x59542b[_0x253998(0x149)]&&console[_0x253998(0x130)](a34_0x3e4e5f[_0x253998(0x14a)]('✔\x20'+_0x57cfad)+a34_0x3e4e5f[_0x253998(0x136)]('\x20('+_0x5b94a7+')'));else _0x2e738a[_0x253998(0x13f)]?(console[_0x253998(0x130)](a34_0x3e4e5f[_0x253998(0x144)]('⚠\x20'+_0x57cfad)+a34_0x3e4e5f['dim']('\x20('+_0x5b94a7+_0x253998(0x128)+_0x2e738a[_0x253998(0x146)][_0x253998(0x14c)]+'\x20warning(s)')),console[_0x253998(0x130)](formatValidationResult(_0x2e738a,_0x531a3d,_0x57cfad))):(console['log'](a34_0x3e4e5f['red']('✖\x20'+_0x57cfad)+a34_0x3e4e5f['dim']('\x20('+_0x5b94a7+_0x253998(0x128)+_0x2e738a['errors'][_0x253998(0x14c)]+_0x253998(0x12e))),console[_0x253998(0x130)](formatValidationResult(_0x2e738a,_0x531a3d,_0x57cfad)));}return console['log'](''),_0x5054b4[_0x253998(0x153)]?(console['log'](a34_0x3e4e5f[_0x253998(0x124)](_0x253998(0x142)+_0x5054b4['invalidCount']+_0x253998(0x135)+_0x5054b4[_0x253998(0x137)]+_0x253998(0x134))),_0x5054b4['warningCount']>0x0&&console['log'](a34_0x3e4e5f['yellow'](_0x5054b4[_0x253998(0x12b)]+_0x253998(0x13a))),0x1):(console[_0x253998(0x130)](a34_0x3e4e5f[_0x253998(0x14a)]('✔\x20All\x20'+_0x5054b4['validCount']+_0x253998(0x143))),_0x5054b4[_0x253998(0x12b)]>0x0&&console[_0x253998(0x130)](a34_0x3e4e5f[_0x253998(0x144)](_0x5054b4[_0x253998(0x12b)]+_0x253998(0x13a))),0x0);}}function a34_0x35a5(){const _0x19833b=['173986NXdKud','6748710UvTwON','Validation\x20failed:\x20','\x20file(s)\x20valid','yellow','description','warnings','segment:validate','.yml','verbose','green','message','length','error','Error:\x20No\x20YAML\x20files\x20found\x20in\x20','1017813iFamer','228613SCjIck','.yaml','\x20\x20\x20\x20\x20\x20\x20tdx\x20sg\x20validate\x20.\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Validate\x20current\x20directory','hasErrors','endsWith','red','Error:\x20File\x20must\x20have\x20.yml\x20or\x20.yaml\x20extension:\x20','execute','errorCode','):\x20','type','helpText','warningCount','212792ZzOHDP','Usage:\x20tdx\x20sg\x20validate\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Validate\x20all\x20(requires\x20context)','\x20error(s)','filePath','log','4SgGUkr','15ZXdMyo','423UGGDAl','\x20valid','\x20file(s)\x20with\x20errors,\x20','dim','validCount','\x20\x20\x20\x20\x20\x20\x20tdx\x20sg\x20validate\x20<file_path>\x20\x20#\x20Validate\x20specific\x20file','2976171MfYlIx','\x20warning(s)\x20found','2390478MQOlVG','cyan','parent_segment\x20is\x20not\x20set.\x20Use\x20`tdx\x20sg\x20use\x20<parent_name>`\x20to\x20set\x20it.\x0a','targetDir','valid'];a34_0x35a5=function(){return _0x19833b;};return a34_0x35a5();}
1
+ const a34_0x2faebb=a34_0x36de;(function(_0x3f2894,_0x2115ab){const _0x39cd63=a34_0x36de,_0x37d164=_0x3f2894();while(!![]){try{const _0x455370=parseInt(_0x39cd63(0x1ab))/0x1*(parseInt(_0x39cd63(0x1b2))/0x2)+parseInt(_0x39cd63(0x1a0))/0x3+parseInt(_0x39cd63(0x1a7))/0x4*(parseInt(_0x39cd63(0x186))/0x5)+parseInt(_0x39cd63(0x1a5))/0x6*(-parseInt(_0x39cd63(0x191))/0x7)+-parseInt(_0x39cd63(0x18c))/0x8*(-parseInt(_0x39cd63(0x187))/0x9)+parseInt(_0x39cd63(0x19a))/0xa+-parseInt(_0x39cd63(0x17f))/0xb;if(_0x455370===_0x2115ab)break;else _0x37d164['push'](_0x37d164['shift']());}catch(_0xa39c57){_0x37d164['push'](_0x37d164['shift']());}}}(a34_0x1126,0x65bd3));import{BaseCommand}from'./command.js';function a34_0x36de(_0xcc0c67,_0x588000){_0xcc0c67=_0xcc0c67-0x17c;const _0x112670=a34_0x1126();let _0x36deb1=_0x112670[_0xcc0c67];return _0x36deb1;}import{resolveTarget,isSuccessfulResolution}from'../sdk/segment/target-resolution.js';import{findYamlFiles}from'../sdk/segment/file-discovery.js';import{existsSync}from'fs';import a34_0x4db120 from'chalk';import{formatValidationResult}from'../sdk/segment/yaml-validator.js';function a34_0x1126(){const _0x3b94d1=['Error:\x20No\x20YAML\x20files\x20found\x20in\x20','description','4354qmrfHq','verbose','execute','yellow','5917714PdVoAU','\x20warning(s)','name','cyan','targetDir','invalidCount','helpText','237740JOIRsJ','9VpOMnn','red','Validate\x20segment\x20and\x20journey\x20YAML\x20files','✔\x20All\x20','\x20valid','2580224RTyCEI','\x20file(s)\x20valid','green','Error:\x20Directory\x20not\x20found:\x20','.yml','761257vcmFXO','filePath','file','Error:\x20File\x20must\x20have\x20.yml\x20or\x20.yaml\x20extension:\x20','segment:validate','valid','\x20warning(s)\x20found','\x20error(s)','log','4454410aXMMhP','dim','parent_segment\x20is\x20not\x20set.\x20Use\x20`tdx\x20sg\x20use\x20<parent_name>`\x20to\x20set\x20it.\x0a','Validation\x20failed:\x20','validCount','.yaml','1220109bhYiQH','\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','warnings','parentSegment','endsWith','36MLrepH','warningCount','8zcJqnf','):\x20','length','error','155cOlzjf','hasErrors','cwd','type','Usage:\x20tdx\x20sg\x20validate\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Validate\x20all\x20(requires\x20context)'];a34_0x1126=function(){return _0x3b94d1;};return a34_0x1126();}import{validateYamlFiles,isValidationResult,calculateSummary}from'../sdk/segment/validate-files.js';export class SegmentValidateCommand extends BaseCommand{[a34_0x2faebb(0x181)]=a34_0x2faebb(0x195);[a34_0x2faebb(0x1b1)]=a34_0x2faebb(0x189);async[a34_0x2faebb(0x17d)](_0xfd4685){const _0x513456=a34_0x2faebb,{options:_0x1ea8ea,args:_0xebb309}=_0xfd4685,_0x1027f6=_0x1ea8ea,_0x4158ff=await resolveTarget({'arg':_0xebb309[0x0],'contextParent':_0x1ea8ea[_0x513456(0x1a3)],'cwd':process[_0x513456(0x1ad)]()});if(!isSuccessfulResolution(_0x4158ff))return _0x4158ff['errorCode']==='no_parent'?(console[_0x513456(0x1aa)](a34_0x4db120[_0x513456(0x17e)](_0x513456(0x19c))),console['error'](_0x513456(0x1af)),console[_0x513456(0x1aa)](_0x513456(0x1a1)),console[_0x513456(0x1aa)]('\x20\x20\x20\x20\x20\x20\x20tdx\x20sg\x20validate\x20<file_path>\x20\x20#\x20Validate\x20specific\x20file')):(console[_0x513456(0x1aa)](a34_0x4db120['red']('Error:\x20'+_0x4158ff['message']+'\x0a')),_0x4158ff[_0x513456(0x185)]&&console[_0x513456(0x1aa)](a34_0x4db120[_0x513456(0x182)](_0x4158ff['helpText']))),0x1;const _0x17cf97=_0x4158ff[_0x513456(0x183)],_0x27b2b2=_0x4158ff[_0x513456(0x1ae)]===_0x513456(0x193)?_0x4158ff[_0x513456(0x192)]:undefined;if(!_0x27b2b2&&!existsSync(_0x17cf97))return console[_0x513456(0x1aa)](a34_0x4db120[_0x513456(0x188)](_0x513456(0x18f)+_0x17cf97+'\x0a')),0x1;let _0x4a3a62;if(_0x27b2b2){if(!_0x27b2b2[_0x513456(0x1a4)](_0x513456(0x190))&&!_0x27b2b2[_0x513456(0x1a4)](_0x513456(0x19f)))return console[_0x513456(0x1aa)](a34_0x4db120[_0x513456(0x188)](_0x513456(0x194)+_0x27b2b2+'\x0a')),0x1;_0x4a3a62=[_0x27b2b2];}else _0x4a3a62=findYamlFiles(_0x17cf97);if(_0x4a3a62['length']===0x0)return console['error'](a34_0x4db120[_0x513456(0x188)](_0x513456(0x1b0)+_0x17cf97+'\x0a')),0x1;const _0x4e68d1=validateYamlFiles(_0x4a3a62,_0x17cf97),_0x5bcdc9=calculateSummary(_0x4e68d1);for(const _0x76b84d of _0x4e68d1){if(!isValidationResult(_0x76b84d))continue;const {relativePath:_0x46c035,source:_0x1dc81c,result:_0x35b823,fileType:_0x8e16f3}=_0x76b84d,_0x2729be=_0x8e16f3;if(_0x35b823[_0x513456(0x196)]&&_0x35b823[_0x513456(0x1a2)][_0x513456(0x1a9)]===0x0)_0x1027f6[_0x513456(0x17c)]&&console[_0x513456(0x199)](a34_0x4db120[_0x513456(0x18e)]('✔\x20'+_0x46c035)+a34_0x4db120[_0x513456(0x19b)]('\x20('+_0x2729be+')'));else _0x35b823[_0x513456(0x196)]?(console[_0x513456(0x199)](a34_0x4db120[_0x513456(0x17e)]('⚠\x20'+_0x46c035)+a34_0x4db120[_0x513456(0x19b)]('\x20('+_0x2729be+_0x513456(0x1a8)+_0x35b823['warnings'][_0x513456(0x1a9)]+_0x513456(0x180))),console[_0x513456(0x199)](formatValidationResult(_0x35b823,_0x1dc81c,_0x46c035))):(console[_0x513456(0x199)](a34_0x4db120[_0x513456(0x188)]('✖\x20'+_0x46c035)+a34_0x4db120[_0x513456(0x19b)]('\x20('+_0x2729be+_0x513456(0x1a8)+_0x35b823['errors'][_0x513456(0x1a9)]+_0x513456(0x198))),console['log'](formatValidationResult(_0x35b823,_0x1dc81c,_0x46c035)));}return console[_0x513456(0x199)](''),_0x5bcdc9[_0x513456(0x1ac)]?(console[_0x513456(0x199)](a34_0x4db120[_0x513456(0x188)](_0x513456(0x19d)+_0x5bcdc9[_0x513456(0x184)]+'\x20file(s)\x20with\x20errors,\x20'+_0x5bcdc9[_0x513456(0x19e)]+_0x513456(0x18b))),_0x5bcdc9[_0x513456(0x1a6)]>0x0&&console[_0x513456(0x199)](a34_0x4db120['yellow'](_0x5bcdc9[_0x513456(0x1a6)]+_0x513456(0x197))),0x1):(console[_0x513456(0x199)](a34_0x4db120[_0x513456(0x18e)](_0x513456(0x18a)+_0x5bcdc9[_0x513456(0x19e)]+_0x513456(0x18d))),_0x5bcdc9[_0x513456(0x1a6)]>0x0&&console[_0x513456(0x199)](a34_0x4db120[_0x513456(0x17e)](_0x5bcdc9['warningCount']+_0x513456(0x197))),0x0);}}
@@ -1 +1 @@
1
- const a35_0x1dd658=a35_0x5908;(function(_0x4d28f0,_0x4fee6){const _0x1417f0=a35_0x5908,_0x55e2c7=_0x4d28f0();while(!![]){try{const _0x171c5e=parseInt(_0x1417f0(0xa2))/0x1*(-parseInt(_0x1417f0(0x83))/0x2)+-parseInt(_0x1417f0(0x7f))/0x3+-parseInt(_0x1417f0(0x78))/0x4+-parseInt(_0x1417f0(0x86))/0x5+-parseInt(_0x1417f0(0xa8))/0x6*(parseInt(_0x1417f0(0x89))/0x7)+parseInt(_0x1417f0(0x7e))/0x8*(-parseInt(_0x1417f0(0x77))/0x9)+-parseInt(_0x1417f0(0xb0))/0xa*(-parseInt(_0x1417f0(0x65))/0xb);if(_0x171c5e===_0x4fee6)break;else _0x55e2c7['push'](_0x55e2c7['shift']());}catch(_0x474dc0){_0x55e2c7['push'](_0x55e2c7['shift']());}}}(a35_0x14df,0x4e88e));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';function a35_0x5908(_0x20e7d1,_0x2e557f){_0x20e7d1=_0x20e7d1-0x64;const _0x14df07=a35_0x14df();let _0x59083d=_0x14df07[_0x20e7d1];return _0x59083d;}import{handleSDKOutput}from'../core/command-output.js';import{withSpinner}from'../utils/spinner.js';function a35_0x14df(){const _0x340f17=['filter','includes','Folder/pattern\x20arg:\x20','folderId','\x5c$&','name','\x27...','Use\x20tdx\x20ps\x20list\x20to\x20see\x20available\x20parent\x20segments.','(not\x20set)','No\x20items\x20match\x20pattern:\x20','(empty)','\x20journey','Parent\x20ID:\x20','localeCompare','segments','sort','List\x20folders\x20and\x20child\x20segments','journeyBundleName','\x20\x20tdx\x20sg\x20use\x20\x22My\x20Audience\x22','children','36019djlZmD','segment','replace','execute',']\x20matching\x20\x27','json','6zEmRNk','description','cause','/j/da','Building\x20hierarchy\x20tree...','\x20segment','journeys','✔\x20Built\x20tree\x20with\x20','21084260IZtUef','folders','11jblzPl','parentId','Folder\x20ID:\x20','maxDepth','error','Error:\x20','test','Error:\x20No\x20parent\x20segment\x20context\x20set.','verbose','listWithPattern','\x20folder','resolvePathToResource','/e/','data','journey',',\x20and\x20','log','map','9ethWHP','1004664ILvfdq','listUnifiedWithJourneys','site','type','recursive','listRecursive','1229264pGIZsV','1451433XMeErr','/app/ps/','jsonl','length','14oAfuvl','format','folder','3068055bAYoXX','Listing\x20folders,\x20segments,\x20and\x20journeys...','Resolving\x20path\x20\x27','226583RXADJT','✔\x20Found\x20','Site:\x20','dim','Parent\x20segment\x20context:\x20'];a35_0x14df=function(){return _0x340f17;};return a35_0x14df();}import{formatFlatList,formatTree}from'../sdk/util/tree-formatter.js';import{getConsoleNextUrl}from'../sdk/client/endpoints.js';import a35_0xe77cc0 from'chalk';export class SegmentsCommand extends BaseCommand{['name']=a35_0x1dd658(0x9c);[a35_0x1dd658(0xa9)]=a35_0x1dd658(0x9e);async[a35_0x1dd658(0xa5)](_0xedaa3f){const _0x3aa832=a35_0x1dd658,{options:_0x162c3e,args:_0x4743a5}=_0xedaa3f,_0x566374=_0x162c3e[_0x3aa832(0x7c)],_0x1cfc6c=_0x4743a5[0x0];try{const _0xe90d79=_0x162c3e['parentSegment'];_0x162c3e['verbose']&&(console[_0x3aa832(0x69)](_0x3aa832(0x8b)+_0x162c3e[_0x3aa832(0x7a)]),console[_0x3aa832(0x69)](_0x3aa832(0x8d)+(_0xe90d79||_0x3aa832(0x96))),_0x1cfc6c&&console[_0x3aa832(0x69)](_0x3aa832(0x90)+_0x1cfc6c),_0x566374&&console[_0x3aa832(0x69)]('Recursive\x20mode:\x20enabled'));if(!_0xe90d79)return console[_0x3aa832(0x69)](_0x3aa832(0x6c)),console[_0x3aa832(0x69)](''),console[_0x3aa832(0x69)]('Set\x20a\x20parent\x20segment\x20context\x20first:'),console[_0x3aa832(0x69)]('\x20\x20tdx\x20sg\x20pull\x20\x22My\x20Audience\x22'),console[_0x3aa832(0x69)](_0x3aa832(0xa0)),console[_0x3aa832(0x69)](''),console['error'](_0x3aa832(0x95)),0x1;const _0x4a27e6=_0x1cfc6c&&(_0x1cfc6c[_0x3aa832(0x8f)]('*')||_0x1cfc6c[_0x3aa832(0x8f)]('?'));if(_0x4a27e6)return await this[_0x3aa832(0x6e)](_0xedaa3f,_0xe90d79,_0x1cfc6c);const _0x2ce96b=_0x1cfc6c?_0xe90d79+'/'+_0x1cfc6c:_0xe90d79;return _0x566374?await this[_0x3aa832(0x7d)](_0xedaa3f,_0x2ce96b):await this['listUnified'](_0xedaa3f,_0x2ce96b);}catch(_0x5e103c){if(_0x5e103c instanceof SDKError)return console[_0x3aa832(0x69)](_0x3aa832(0x6a)+_0x5e103c['message']),_0x5e103c['cause']&&console[_0x3aa832(0x69)]('\x20\x20Cause:\x20'+_0x5e103c[_0x3aa832(0xaa)]),0x1;throw _0x5e103c;}}async[a35_0x1dd658(0x6e)](_0x387761,_0x21da93,_0x428097){const _0x118862=a35_0x1dd658,{options:_0x5d2eae,tdx:_0x4d2e24}=_0x387761,_0x1b32c1=await withSpinner('Resolving\x20parent\x20segment\x20\x27'+_0x21da93+'\x27...',()=>_0x4d2e24[_0x118862(0xa3)][_0x118862(0x70)](_0x21da93),{'verbose':_0x5d2eae['verbose']}),_0x6c137f=_0x1b32c1['data'],_0x407a3a=await withSpinner('Listing\x20folders,\x20segments,\x20and\x20journeys...',()=>_0x4d2e24[_0x118862(0xa3)][_0x118862(0x79)](_0x6c137f[_0x118862(0x66)],_0x6c137f[_0x118862(0x91)]),{'verbose':_0x5d2eae['verbose']}),{folders:_0x5dfa64,segments:_0x1576bb,journeys:_0x1a580c}=_0x407a3a[_0x118862(0x72)],_0x549ea3=_0x428097[_0x118862(0xa4)](/[.+^${}()|[\]\\]/g,_0x118862(0x92))[_0x118862(0xa4)](/\*/g,'.*')[_0x118862(0xa4)](/\?/g,'.'),_0x33d8ab=new RegExp('^'+_0x549ea3+'$','i'),_0x44cd15=_0x5dfa64['filter'](_0x112a4b=>_0x33d8ab['test'](_0x112a4b[_0x118862(0x93)])),_0x37b9a2=_0x1576bb[_0x118862(0x8e)](_0x3673b6=>_0x33d8ab[_0x118862(0x6b)](_0x3673b6[_0x118862(0x93)])),_0x377e9b=_0x1a580c[_0x118862(0x8e)](_0x10a77f=>_0x33d8ab['test'](_0x10a77f['journeyBundleName'])),_0x1a1a42=_0x44cd15[_0x118862(0x82)]+_0x37b9a2[_0x118862(0x82)]+_0x377e9b[_0x118862(0x82)];console['error'](_0x118862(0x8a)+_0x44cd15[_0x118862(0x82)]+_0x118862(0x6f)+(_0x44cd15[_0x118862(0x82)]!==0x1?'s':'')+',\x20'+_0x37b9a2[_0x118862(0x82)]+_0x118862(0xad)+(_0x37b9a2[_0x118862(0x82)]!==0x1?'s':'')+',\x20and\x20'+_0x377e9b[_0x118862(0x82)]+_0x118862(0x99)+(_0x377e9b[_0x118862(0x82)]!==0x1?'s':'')+'\x20matching\x20\x27'+_0x428097+'\x27');const _0xc65144=_0x4d8d13=>{const _0x4dcaaf=_0x118862;return getConsoleNextUrl(_0x5d2eae[_0x4dcaaf(0x7a)],_0x4dcaaf(0x80)+_0x6c137f[_0x4dcaaf(0x66)]+_0x4dcaaf(0x71)+_0x4d8d13);},_0x2a0290=_0x5d2eae[_0x118862(0x84)]==='json'||_0x5d2eae[_0x118862(0x84)]==='jsonl';if(_0x2a0290){const _0x2ad539=[..._0x44cd15[_0x118862(0x76)](_0x296a45=>({..._0x296a45,'type':'folder'})),..._0x37b9a2[_0x118862(0x76)](_0x44df28=>({..._0x44df28,'type':_0x118862(0xa3),'url':_0xc65144(_0x44df28['id'])})),..._0x377e9b[_0x118862(0x76)](_0x45bfae=>({..._0x45bfae,'name':_0x45bfae[_0x118862(0x9f)],'type':_0x118862(0x73)}))][_0x118862(0x9d)]((_0x1c7fd9,_0x572c35)=>_0x1c7fd9[_0x118862(0x93)][_0x118862(0x9b)](_0x572c35[_0x118862(0x93)]));await handleSDKOutput(_0x2ad539,_0x5d2eae);}else{if(_0x1a1a42===0x0)console[_0x118862(0x75)](_0x118862(0x97)+_0x428097);else{console[_0x118862(0x75)](a35_0xe77cc0[_0x118862(0x8c)]('['+_0x21da93+_0x118862(0xa6)+_0x428097+'\x27'));const _0x262b0c=formatFlatList(_0x44cd15,_0x37b9a2,{'showMetadata':!![],'getSegmentUrl':_0xc65144},_0x377e9b);console['log'](_0x262b0c);}}return 0x0;}async['listUnified'](_0x4b8ea6,_0xd9a317){const _0x31d631=a35_0x1dd658,{options:_0x152f11,tdx:_0x40480a}=_0x4b8ea6,_0x452083=await withSpinner(_0x31d631(0x88)+_0xd9a317+_0x31d631(0x94),()=>_0x40480a[_0x31d631(0xa3)][_0x31d631(0x70)](_0xd9a317),{'verbose':_0x152f11[_0x31d631(0x6d)]}),_0x401b7e=_0x452083[_0x31d631(0x72)];_0x152f11[_0x31d631(0x6d)]&&(console[_0x31d631(0x69)](_0x31d631(0x9a)+_0x401b7e[_0x31d631(0x66)]),_0x401b7e['folderId']&&console[_0x31d631(0x69)](_0x31d631(0x67)+_0x401b7e[_0x31d631(0x91)]));const _0x1c9f70=await withSpinner(_0x31d631(0x87),()=>_0x40480a[_0x31d631(0xa3)][_0x31d631(0x79)](_0x401b7e[_0x31d631(0x66)],_0x401b7e[_0x31d631(0x91)]),{'verbose':_0x152f11[_0x31d631(0x6d)]}),{folders:_0x2d5c23,segments:_0x2dc791,journeys:_0xc81f34}=_0x1c9f70[_0x31d631(0x72)],_0x510ffa=_0x2d5c23['length']+_0x2dc791[_0x31d631(0x82)]+_0xc81f34[_0x31d631(0x82)];console[_0x31d631(0x69)](_0x31d631(0x8a)+_0x2d5c23[_0x31d631(0x82)]+_0x31d631(0x6f)+(_0x2d5c23[_0x31d631(0x82)]!==0x1?'s':'')+',\x20'+_0x2dc791[_0x31d631(0x82)]+_0x31d631(0xad)+(_0x2dc791[_0x31d631(0x82)]!==0x1?'s':'')+_0x31d631(0x74)+_0xc81f34[_0x31d631(0x82)]+'\x20journey'+(_0xc81f34[_0x31d631(0x82)]!==0x1?'s':''));const _0x470fe5=_0x15d913=>{const _0x97471f=_0x31d631;return getConsoleNextUrl(_0x152f11[_0x97471f(0x7a)],_0x97471f(0x80)+_0x401b7e[_0x97471f(0x66)]+'/e/'+_0x15d913);},_0x217d9e=_0x285392=>{const _0xe7fef7=_0x31d631;return getConsoleNextUrl(_0x152f11[_0xe7fef7(0x7a)],_0xe7fef7(0x80)+_0x401b7e[_0xe7fef7(0x66)]+_0xe7fef7(0x71)+_0x285392+_0xe7fef7(0xab));},_0xe1c2f3=_0x152f11['format']===_0x31d631(0xa7)||_0x152f11[_0x31d631(0x84)]===_0x31d631(0x81);if(_0xe1c2f3){const _0x318f04=[..._0x2d5c23[_0x31d631(0x76)](_0x4027e5=>({..._0x4027e5,'type':_0x31d631(0x85)})),..._0x2dc791['map'](_0x54ea7f=>({..._0x54ea7f,'type':'segment','url':_0x470fe5(_0x54ea7f['id'])})),..._0xc81f34[_0x31d631(0x76)](_0x413a0f=>({..._0x413a0f,'name':_0x413a0f[_0x31d631(0x9f)],'type':'journey','url':_0x217d9e(_0x413a0f['id'])}))][_0x31d631(0x9d)]((_0x44e7cd,_0x36e71e)=>_0x44e7cd[_0x31d631(0x93)]['localeCompare'](_0x36e71e[_0x31d631(0x93)]));await handleSDKOutput(_0x318f04,_0x152f11);}else{if(_0x510ffa===0x0)console[_0x31d631(0x75)](a35_0xe77cc0[_0x31d631(0x8c)]('['+_0xd9a317+']')),console[_0x31d631(0x75)](_0x31d631(0x98));else{console[_0x31d631(0x75)](a35_0xe77cc0[_0x31d631(0x8c)]('['+_0xd9a317+']'));const _0x2bd367=formatFlatList(_0x2d5c23,_0x2dc791,{'showMetadata':!![],'getSegmentUrl':_0x470fe5,'getJourneyUrl':_0x217d9e},_0xc81f34);console[_0x31d631(0x75)](_0x2bd367);}}return 0x0;}async[a35_0x1dd658(0x7d)](_0x19ed9c,_0xe17d09){const _0x31ce9a=a35_0x1dd658,{options:_0x16b125,tdx:_0x706644}=_0x19ed9c,_0x698522=await withSpinner(_0x31ce9a(0x88)+_0xe17d09+_0x31ce9a(0x94),()=>_0x706644[_0x31ce9a(0xa3)][_0x31ce9a(0x70)](_0xe17d09),{'verbose':_0x16b125[_0x31ce9a(0x6d)]}),_0x59a7fe=_0x698522[_0x31ce9a(0x72)];_0x16b125[_0x31ce9a(0x6d)]&&(console[_0x31ce9a(0x69)](_0x31ce9a(0x9a)+_0x59a7fe[_0x31ce9a(0x66)]),_0x59a7fe[_0x31ce9a(0x91)]&&console[_0x31ce9a(0x69)](_0x31ce9a(0x67)+_0x59a7fe['folderId']));const _0x2a4f69=_0x16b125[_0x31ce9a(0x68)]||0xa,_0x1c2398=await withSpinner(_0x31ce9a(0xac),()=>_0x706644[_0x31ce9a(0xa3)][_0x31ce9a(0x7d)](_0x59a7fe[_0x31ce9a(0x66)],_0x59a7fe[_0x31ce9a(0x91)],0x0,_0x2a4f69),{'verbose':_0x16b125[_0x31ce9a(0x6d)]}),_0x184515=_0x1c2398['data'],_0x49651f=_0x1e06f4=>{const _0x676e05=_0x31ce9a;let _0x5782ad=0x0,_0x503684=0x0,_0x4dca27=0x0;for(const _0x3b38a7 of _0x1e06f4){if(_0x3b38a7[_0x676e05(0x7b)]===_0x676e05(0x85))_0x5782ad++;else{if(_0x3b38a7[_0x676e05(0x7b)]==='segment')_0x503684++;else{if(_0x3b38a7[_0x676e05(0x7b)]===_0x676e05(0x73))_0x4dca27++;}}if(_0x3b38a7[_0x676e05(0xa1)]){const _0x4e8d7b=_0x49651f(_0x3b38a7['children']);_0x5782ad+=_0x4e8d7b[_0x676e05(0x64)],_0x503684+=_0x4e8d7b[_0x676e05(0x9c)],_0x4dca27+=_0x4e8d7b[_0x676e05(0xae)];}}return{'folders':_0x5782ad,'segments':_0x503684,'journeys':_0x4dca27};},_0x127663=_0x49651f(_0x184515);console[_0x31ce9a(0x69)](_0x31ce9a(0xaf)+_0x127663[_0x31ce9a(0x64)]+_0x31ce9a(0x6f)+(_0x127663[_0x31ce9a(0x64)]!==0x1?'s':'')+',\x20'+_0x127663['segments']+_0x31ce9a(0xad)+(_0x127663[_0x31ce9a(0x9c)]!==0x1?'s':'')+_0x31ce9a(0x74)+_0x127663[_0x31ce9a(0xae)]+_0x31ce9a(0x99)+(_0x127663[_0x31ce9a(0xae)]!==0x1?'s':''));const _0x236e70=_0x28019d=>{const _0x36ced4=_0x31ce9a;return getConsoleNextUrl(_0x16b125['site'],_0x36ced4(0x80)+_0x59a7fe['parentId']+_0x36ced4(0x71)+_0x28019d);},_0x5465cb=_0x5430de=>{const _0x30d277=_0x31ce9a;return getConsoleNextUrl(_0x16b125[_0x30d277(0x7a)],_0x30d277(0x80)+_0x59a7fe[_0x30d277(0x66)]+_0x30d277(0x71)+_0x5430de+_0x30d277(0xab));};if(_0x16b125['format']===_0x31ce9a(0xa7)||_0x16b125[_0x31ce9a(0x84)]==='jsonl')await handleSDKOutput(_0x184515,_0x16b125);else{console[_0x31ce9a(0x75)](a35_0xe77cc0[_0x31ce9a(0x8c)]('['+_0xe17d09+']'));const _0x4c5062=formatTree(_0x184515,{'showMetadata':!![],'getSegmentUrl':_0x236e70,'getJourneyUrl':_0x5465cb});console['log'](_0x4c5062);}return 0x0;}}
1
+ const a35_0x6c0b22=a35_0x4a83;(function(_0xde8ea1,_0x1e1505){const _0x4eb018=a35_0x4a83,_0x20661b=_0xde8ea1();while(!![]){try{const _0x1ddb3f=parseInt(_0x4eb018(0x1f3))/0x1+parseInt(_0x4eb018(0x21f))/0x2+parseInt(_0x4eb018(0x1ed))/0x3+parseInt(_0x4eb018(0x203))/0x4*(-parseInt(_0x4eb018(0x216))/0x5)+parseInt(_0x4eb018(0x23d))/0x6*(-parseInt(_0x4eb018(0x228))/0x7)+-parseInt(_0x4eb018(0x1fa))/0x8+parseInt(_0x4eb018(0x205))/0x9;if(_0x1ddb3f===_0x1e1505)break;else _0x20661b['push'](_0x20661b['shift']());}catch(_0x3c83d9){_0x20661b['push'](_0x20661b['shift']());}}}(a35_0x3f5f,0xe7a55));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';function a35_0x4a83(_0x6e878f,_0x4e75bc){_0x6e878f=_0x6e878f-0x1ed;const _0x3f5f52=a35_0x3f5f();let _0x4a83bb=_0x3f5f52[_0x6e878f];return _0x4a83bb;}import{handleSDKOutput}from'../core/command-output.js';import{withSpinner}from'../utils/spinner.js';import{formatFlatList,formatTree}from'../sdk/util/tree-formatter.js';import{getConsoleNextUrl}from'../sdk/client/endpoints.js';function a35_0x3f5f(){const _0x1ab4c7=['segments','format','Use\x20tdx\x20ps\x20list\x20to\x20see\x20available\x20parent\x20segments.','1377455gVlYNm','includes','maxDepth','jsonl','test','journeyBundleName','\x20\x20Cause:\x20','4242552aItEYl','Error:\x20','localeCompare','\x20matching\x20\x27','Folder\x20ID:\x20','message','filter','Parent\x20ID:\x20','Set\x20a\x20parent\x20segment\x20context\x20first:','649088JPybxh','folderId','2576016hXMBYk','length','\x20\x20tdx\x20sg\x20pull\x20\x22My\x20Audience\x22','execute','type','verbose','\x20journey','Recursive\x20mode:\x20enabled','\x20\x20tdx\x20sg\x20use\x20\x22My\x20Audience\x22','journey','dim','\x20folder','json','✔\x20Found\x20','segment','/app/ps/','(empty)','50yQtafs','Error:\x20No\x20parent\x20segment\x20context\x20set.','Folder/pattern\x20arg:\x20','children','listWithPattern','Resolving\x20parent\x20segment\x20\x27','folder','name','journeys','3379764XhkwvC','data','map','cause','site','(not\x20set)','Resolving\x20path\x20\x27','\x5c$&','Parent\x20segment\x20context:\x20','7ZzuvIA','replace','\x27...','List\x20folders\x20and\x20child\x20segments','parentSegment','✔\x20Built\x20tree\x20with\x20','listRecursive','Site:\x20','error','/e/','folders',',\x20and\x20','description','sort','resolvePathToResource','recursive','/j/da','listUnifiedWithJourneys','parentId','log','\x20segment','10231872uhaiaz','4360833BuXESY','listUnified',']\x20matching\x20\x27'];a35_0x3f5f=function(){return _0x1ab4c7;};return a35_0x3f5f();}import a35_0x2473e9 from'chalk';export class SegmentsCommand extends BaseCommand{['name']=a35_0x6c0b22(0x1f0);[a35_0x6c0b22(0x234)]=a35_0x6c0b22(0x22b);async[a35_0x6c0b22(0x208)](_0x559fd0){const _0xb59852=a35_0x6c0b22,{options:_0x49eb37,args:_0x4220d1}=_0x559fd0,_0x4ff568=_0x49eb37[_0xb59852(0x237)],_0x3f334a=_0x4220d1[0x0];try{const _0x5bccfa=_0x49eb37[_0xb59852(0x22c)];_0x49eb37['verbose']&&(console[_0xb59852(0x230)](_0xb59852(0x22f)+_0x49eb37[_0xb59852(0x223)]),console[_0xb59852(0x230)](_0xb59852(0x227)+(_0x5bccfa||_0xb59852(0x224))),_0x3f334a&&console[_0xb59852(0x230)](_0xb59852(0x218)+_0x3f334a),_0x4ff568&&console[_0xb59852(0x230)](_0xb59852(0x20c)));if(!_0x5bccfa)return console[_0xb59852(0x230)](_0xb59852(0x217)),console['error'](''),console[_0xb59852(0x230)](_0xb59852(0x202)),console['error'](_0xb59852(0x207)),console[_0xb59852(0x230)](_0xb59852(0x20d)),console[_0xb59852(0x230)](''),console[_0xb59852(0x230)](_0xb59852(0x1f2)),0x1;const _0x5a1164=_0x3f334a&&(_0x3f334a[_0xb59852(0x1f4)]('*')||_0x3f334a[_0xb59852(0x1f4)]('?'));if(_0x5a1164)return await this[_0xb59852(0x21a)](_0x559fd0,_0x5bccfa,_0x3f334a);const _0x4df08c=_0x3f334a?_0x5bccfa+'/'+_0x3f334a:_0x5bccfa;return _0x4ff568?await this['listRecursive'](_0x559fd0,_0x4df08c):await this[_0xb59852(0x1ee)](_0x559fd0,_0x4df08c);}catch(_0x2a9155){if(_0x2a9155 instanceof SDKError)return console[_0xb59852(0x230)](_0xb59852(0x1fb)+_0x2a9155[_0xb59852(0x1ff)]),_0x2a9155[_0xb59852(0x222)]&&console['error'](_0xb59852(0x1f9)+_0x2a9155[_0xb59852(0x222)]),0x1;throw _0x2a9155;}}async['listWithPattern'](_0x37c782,_0x4a7767,_0x53b566){const _0x3a3782=a35_0x6c0b22,{options:_0x178b4a,tdx:_0x110a53}=_0x37c782,_0x3028ec=await withSpinner(_0x3a3782(0x21b)+_0x4a7767+_0x3a3782(0x22a),()=>_0x110a53[_0x3a3782(0x213)]['resolvePathToResource'](_0x4a7767),{'verbose':_0x178b4a[_0x3a3782(0x20a)]}),_0x224a9e=_0x3028ec[_0x3a3782(0x220)],_0x5dcda3=await withSpinner('Listing\x20folders,\x20segments,\x20and\x20journeys...',()=>_0x110a53[_0x3a3782(0x213)][_0x3a3782(0x239)](_0x224a9e[_0x3a3782(0x23a)],_0x224a9e[_0x3a3782(0x204)]),{'verbose':_0x178b4a['verbose']}),{folders:_0x1e7a34,segments:_0x42fac7,journeys:_0x59bb52}=_0x5dcda3[_0x3a3782(0x220)],_0x234a54=_0x53b566[_0x3a3782(0x229)](/[.+^${}()|[\]\\]/g,_0x3a3782(0x226))[_0x3a3782(0x229)](/\*/g,'.*')[_0x3a3782(0x229)](/\?/g,'.'),_0x358b18=new RegExp('^'+_0x234a54+'$','i'),_0x47a00a=_0x1e7a34[_0x3a3782(0x200)](_0x58291a=>_0x358b18[_0x3a3782(0x1f7)](_0x58291a[_0x3a3782(0x21d)])),_0x1802e2=_0x42fac7[_0x3a3782(0x200)](_0x83398b=>_0x358b18[_0x3a3782(0x1f7)](_0x83398b[_0x3a3782(0x21d)])),_0x4a3145=_0x59bb52[_0x3a3782(0x200)](_0x20cb52=>_0x358b18[_0x3a3782(0x1f7)](_0x20cb52['journeyBundleName'])),_0x562a8f=_0x47a00a['length']+_0x1802e2[_0x3a3782(0x206)]+_0x4a3145['length'];console['error'](_0x3a3782(0x212)+_0x47a00a[_0x3a3782(0x206)]+'\x20folder'+(_0x47a00a[_0x3a3782(0x206)]!==0x1?'s':'')+',\x20'+_0x1802e2[_0x3a3782(0x206)]+'\x20segment'+(_0x1802e2[_0x3a3782(0x206)]!==0x1?'s':'')+_0x3a3782(0x233)+_0x4a3145[_0x3a3782(0x206)]+_0x3a3782(0x20b)+(_0x4a3145[_0x3a3782(0x206)]!==0x1?'s':'')+_0x3a3782(0x1fd)+_0x53b566+'\x27');const _0x3526be=_0x13ab15=>{const _0x3cac1a=_0x3a3782;return getConsoleNextUrl(_0x178b4a['site'],_0x3cac1a(0x214)+_0x224a9e[_0x3cac1a(0x23a)]+_0x3cac1a(0x231)+_0x13ab15);},_0x2a98be=_0x178b4a[_0x3a3782(0x1f1)]==='json'||_0x178b4a[_0x3a3782(0x1f1)]===_0x3a3782(0x1f6);if(_0x2a98be){const _0x408f05=[..._0x47a00a[_0x3a3782(0x221)](_0x52ff9a=>({..._0x52ff9a,'type':'folder'})),..._0x1802e2[_0x3a3782(0x221)](_0x3504b6=>({..._0x3504b6,'type':_0x3a3782(0x213),'url':_0x3526be(_0x3504b6['id'])})),..._0x4a3145[_0x3a3782(0x221)](_0x17950e=>({..._0x17950e,'name':_0x17950e['journeyBundleName'],'type':_0x3a3782(0x20e)}))][_0x3a3782(0x235)]((_0x35704b,_0x41f442)=>_0x35704b[_0x3a3782(0x21d)][_0x3a3782(0x1fc)](_0x41f442[_0x3a3782(0x21d)]));await handleSDKOutput(_0x408f05,_0x178b4a);}else{if(_0x562a8f===0x0)console[_0x3a3782(0x23b)]('No\x20items\x20match\x20pattern:\x20'+_0x53b566);else{console[_0x3a3782(0x23b)](a35_0x2473e9['dim']('['+_0x4a7767+_0x3a3782(0x1ef)+_0x53b566+'\x27'));const _0x303685=formatFlatList(_0x47a00a,_0x1802e2,{'showMetadata':!![],'getSegmentUrl':_0x3526be},_0x4a3145);console[_0x3a3782(0x23b)](_0x303685);}}return 0x0;}async['listUnified'](_0x379b95,_0x717ff9){const _0xd11070=a35_0x6c0b22,{options:_0x251655,tdx:_0xf9478e}=_0x379b95,_0x1a5059=await withSpinner(_0xd11070(0x225)+_0x717ff9+_0xd11070(0x22a),()=>_0xf9478e[_0xd11070(0x213)][_0xd11070(0x236)](_0x717ff9),{'verbose':_0x251655[_0xd11070(0x20a)]}),_0x2b3379=_0x1a5059['data'];_0x251655[_0xd11070(0x20a)]&&(console[_0xd11070(0x230)]('Parent\x20ID:\x20'+_0x2b3379[_0xd11070(0x23a)]),_0x2b3379['folderId']&&console[_0xd11070(0x230)]('Folder\x20ID:\x20'+_0x2b3379[_0xd11070(0x204)]));const _0x4d40d3=await withSpinner('Listing\x20folders,\x20segments,\x20and\x20journeys...',()=>_0xf9478e[_0xd11070(0x213)]['listUnifiedWithJourneys'](_0x2b3379[_0xd11070(0x23a)],_0x2b3379[_0xd11070(0x204)]),{'verbose':_0x251655[_0xd11070(0x20a)]}),{folders:_0x4e0375,segments:_0x504423,journeys:_0xcf032b}=_0x4d40d3['data'],_0x212590=_0x4e0375['length']+_0x504423[_0xd11070(0x206)]+_0xcf032b[_0xd11070(0x206)];console[_0xd11070(0x230)](_0xd11070(0x212)+_0x4e0375[_0xd11070(0x206)]+_0xd11070(0x210)+(_0x4e0375['length']!==0x1?'s':'')+',\x20'+_0x504423[_0xd11070(0x206)]+_0xd11070(0x23c)+(_0x504423['length']!==0x1?'s':'')+',\x20and\x20'+_0xcf032b[_0xd11070(0x206)]+_0xd11070(0x20b)+(_0xcf032b[_0xd11070(0x206)]!==0x1?'s':''));const _0x25a324=_0x36b83d=>{const _0x1a390b=_0xd11070;return getConsoleNextUrl(_0x251655[_0x1a390b(0x223)],'/app/ps/'+_0x2b3379['parentId']+_0x1a390b(0x231)+_0x36b83d);},_0x5f5e4c=_0x4a8e04=>{const _0xf27cec=_0xd11070;return getConsoleNextUrl(_0x251655['site'],_0xf27cec(0x214)+_0x2b3379['parentId']+_0xf27cec(0x231)+_0x4a8e04+_0xf27cec(0x238));},_0x3bbef6=_0x251655['format']===_0xd11070(0x211)||_0x251655[_0xd11070(0x1f1)]===_0xd11070(0x1f6);if(_0x3bbef6){const _0x14b4e4=[..._0x4e0375[_0xd11070(0x221)](_0x3ccd70=>({..._0x3ccd70,'type':_0xd11070(0x21c)})),..._0x504423[_0xd11070(0x221)](_0x5accc9=>({..._0x5accc9,'type':'segment','url':_0x25a324(_0x5accc9['id'])})),..._0xcf032b['map'](_0x11a534=>({..._0x11a534,'name':_0x11a534[_0xd11070(0x1f8)],'type':'journey','url':_0x5f5e4c(_0x11a534['id'])}))][_0xd11070(0x235)]((_0x11ef78,_0x2c0666)=>_0x11ef78[_0xd11070(0x21d)]['localeCompare'](_0x2c0666[_0xd11070(0x21d)]));await handleSDKOutput(_0x14b4e4,_0x251655);}else{if(_0x212590===0x0)console[_0xd11070(0x23b)](a35_0x2473e9['dim']('['+_0x717ff9+']')),console[_0xd11070(0x23b)](_0xd11070(0x215));else{console[_0xd11070(0x23b)](a35_0x2473e9[_0xd11070(0x20f)]('['+_0x717ff9+']'));const _0x5c6d8f=formatFlatList(_0x4e0375,_0x504423,{'showMetadata':!![],'getSegmentUrl':_0x25a324,'getJourneyUrl':_0x5f5e4c},_0xcf032b);console[_0xd11070(0x23b)](_0x5c6d8f);}}return 0x0;}async[a35_0x6c0b22(0x22e)](_0x5c8e7b,_0x2cb94d){const _0x42dc56=a35_0x6c0b22,{options:_0x5cc356,tdx:_0x42c572}=_0x5c8e7b,_0x4a1064=await withSpinner(_0x42dc56(0x225)+_0x2cb94d+'\x27...',()=>_0x42c572[_0x42dc56(0x213)][_0x42dc56(0x236)](_0x2cb94d),{'verbose':_0x5cc356['verbose']}),_0x55f355=_0x4a1064['data'];_0x5cc356[_0x42dc56(0x20a)]&&(console[_0x42dc56(0x230)](_0x42dc56(0x201)+_0x55f355[_0x42dc56(0x23a)]),_0x55f355[_0x42dc56(0x204)]&&console[_0x42dc56(0x230)](_0x42dc56(0x1fe)+_0x55f355[_0x42dc56(0x204)]));const _0x934cf3=_0x5cc356[_0x42dc56(0x1f5)]||0xa,_0x1ffb21=await withSpinner('Building\x20hierarchy\x20tree...',()=>_0x42c572['segment'][_0x42dc56(0x22e)](_0x55f355['parentId'],_0x55f355[_0x42dc56(0x204)],0x0,_0x934cf3),{'verbose':_0x5cc356[_0x42dc56(0x20a)]}),_0x314c4d=_0x1ffb21['data'],_0x52eb0f=_0x14b297=>{const _0x667201=_0x42dc56;let _0x17eb3c=0x0,_0x1ec1ad=0x0,_0x1b3014=0x0;for(const _0x1f163e of _0x14b297){if(_0x1f163e[_0x667201(0x209)]===_0x667201(0x21c))_0x17eb3c++;else{if(_0x1f163e['type']==='segment')_0x1ec1ad++;else{if(_0x1f163e[_0x667201(0x209)]===_0x667201(0x20e))_0x1b3014++;}}if(_0x1f163e[_0x667201(0x219)]){const _0x384f5e=_0x52eb0f(_0x1f163e[_0x667201(0x219)]);_0x17eb3c+=_0x384f5e[_0x667201(0x232)],_0x1ec1ad+=_0x384f5e['segments'],_0x1b3014+=_0x384f5e[_0x667201(0x21e)];}}return{'folders':_0x17eb3c,'segments':_0x1ec1ad,'journeys':_0x1b3014};},_0x402889=_0x52eb0f(_0x314c4d);console['error'](_0x42dc56(0x22d)+_0x402889[_0x42dc56(0x232)]+'\x20folder'+(_0x402889[_0x42dc56(0x232)]!==0x1?'s':'')+',\x20'+_0x402889['segments']+_0x42dc56(0x23c)+(_0x402889['segments']!==0x1?'s':'')+',\x20and\x20'+_0x402889[_0x42dc56(0x21e)]+_0x42dc56(0x20b)+(_0x402889['journeys']!==0x1?'s':''));const _0x4aa84b=_0x41b082=>{const _0x2dcae7=_0x42dc56;return getConsoleNextUrl(_0x5cc356['site'],'/app/ps/'+_0x55f355['parentId']+_0x2dcae7(0x231)+_0x41b082);},_0x2e9dfe=_0x5ab3b5=>{const _0x50e48a=_0x42dc56;return getConsoleNextUrl(_0x5cc356[_0x50e48a(0x223)],_0x50e48a(0x214)+_0x55f355[_0x50e48a(0x23a)]+'/e/'+_0x5ab3b5+_0x50e48a(0x238));};if(_0x5cc356[_0x42dc56(0x1f1)]===_0x42dc56(0x211)||_0x5cc356[_0x42dc56(0x1f1)]==='jsonl')await handleSDKOutput(_0x314c4d,_0x5cc356);else{console['log'](a35_0x2473e9[_0x42dc56(0x20f)]('['+_0x2cb94d+']'));const _0x166315=formatTree(_0x314c4d,{'showMetadata':!![],'getSegmentUrl':_0x4aa84b,'getJourneyUrl':_0x2e9dfe});console[_0x42dc56(0x23b)](_0x166315);}return 0x0;}}
@@ -1 +1 @@
1
- const a36_0x5b957=a36_0x2274;function a36_0x10ad(){const _0x1d4f3e=['Site:\x20','66546IVupbc','data','614340SOHWWO','database','Limit:\x20','✔\x20Retrieved\x20','name','site','Table:\x20','Usage:\x20tdx\x20show\x20<database.table>','error','args','2658urYOKz','Querying\x20','validate','verbose','Database:\x20','cause','22GEPkoi','374005aJAVXt','catalog','length','575295zPbxAt','\x20\x20\x20or:\x20tdx\x20show\x20<catalog.database.table>','7PSCrXT','2208744JvVaLg','Too\x20many\x20arguments\x0aUsage:\x20tdx\x20show\x20<database.table>\x0a\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--database\x20<database>\x0a\x0aRun\x20\x27tdx\x20show\x20--help\x27\x20for\x20more\x20options','4RrOUVc','Catalog:\x20','description','\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--database\x20<database>','...','query','execute','8928282iLQETF','show','50ybBFTf','\x20\x20Cause:\x20','showTable','Error:\x20'];a36_0x10ad=function(){return _0x1d4f3e;};return a36_0x10ad();}(function(_0x4349f6,_0x34eda1){const _0x1e9f26=a36_0x2274,_0x37a85b=_0x4349f6();while(!![]){try{const _0x5afaac=-parseInt(_0x1e9f26(0x77))/0x1*(-parseInt(_0x1e9f26(0x7d))/0x2)+-parseInt(_0x1e9f26(0x81))/0x3+parseInt(_0x1e9f26(0x86))/0x4*(-parseInt(_0x1e9f26(0x7e))/0x5)+parseInt(_0x1e9f26(0x6d))/0x6*(-parseInt(_0x1e9f26(0x83))/0x7)+-parseInt(_0x1e9f26(0x84))/0x8+-parseInt(_0x1e9f26(0x6b))/0x9*(parseInt(_0x1e9f26(0x66))/0xa)+parseInt(_0x1e9f26(0x64))/0xb;if(_0x5afaac===_0x34eda1)break;else _0x37a85b['push'](_0x37a85b['shift']());}catch(_0x236c5a){_0x37a85b['push'](_0x37a85b['shift']());}}}(a36_0x10ad,0x26ca1));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleSDKOutput}from'../core/command-output.js';import{parseTableReference,validateTableDescribeReference}from'../utils/table-ref-parser.js';import{withSpinner}from'../utils/spinner.js';import{DEFAULT_DISPLAY_LIMIT,resolveLimit}from'../core/constants.js';function a36_0x2274(_0x1a98ef,_0x3557d9){_0x1a98ef=_0x1a98ef-0x64;const _0x10ad32=a36_0x10ad();let _0x227449=_0x10ad32[_0x1a98ef];return _0x227449;}export class ShowCommand extends BaseCommand{[a36_0x5b957(0x71)]=a36_0x5b957(0x65);[a36_0x5b957(0x88)]='Show\x20table\x20contents';async[a36_0x5b957(0x8c)](_0x5db608){return this['showTable'](_0x5db608);}async[a36_0x5b957(0x68)](_0x3af598){const _0x160714=a36_0x5b957,{options:_0x4b9fd3,args:_0x54fbcb,tdx:_0x1011e5}=_0x3af598;let _0x15deb2;try{_0x15deb2=parseTableReference(_0x54fbcb[0x0]);const _0x322c7b=_0x4b9fd3['database'];!_0x15deb2['database']&&_0x322c7b&&(_0x15deb2[_0x160714(0x6e)]=_0x322c7b);const _0x2d012b=validateTableDescribeReference(_0x15deb2);if(_0x2d012b)return console[_0x160714(0x75)](_0x160714(0x69)+_0x2d012b),console[_0x160714(0x75)]('Usage:\x20tdx\x20show\x20<database.table>'),console[_0x160714(0x75)](_0x160714(0x82)),console[_0x160714(0x75)](_0x160714(0x89)),0x1;}catch(_0x596572){return console[_0x160714(0x75)](_0x160714(0x69)+_0x596572['message']),console[_0x160714(0x75)](_0x160714(0x74)),console[_0x160714(0x75)](_0x160714(0x82)),console[_0x160714(0x75)](_0x160714(0x89)),0x1;}const _0x948321=_0x15deb2[_0x160714(0x7f)],_0xfb1ca1=_0x15deb2[_0x160714(0x6e)],_0x7eb2fc=_0x15deb2['table'],_0x3c8c5a=resolveLimit(_0x4b9fd3['limit'],DEFAULT_DISPLAY_LIMIT);try{_0x4b9fd3['verbose']&&(console['error'](_0x160714(0x6a)+_0x4b9fd3[_0x160714(0x72)]),_0x948321&&console['error'](_0x160714(0x87)+_0x948321),console[_0x160714(0x75)](_0x160714(0x7b)+_0xfb1ca1),console['error'](_0x160714(0x73)+_0x7eb2fc),console[_0x160714(0x75)](_0x160714(0x6f)+_0x3c8c5a));const _0x3fd04a=_0x948321?_0x948321+'.'+_0xfb1ca1+'.'+_0x7eb2fc:_0xfb1ca1+'.'+_0x7eb2fc,_0x232c5f=await withSpinner(_0x160714(0x78)+_0x3fd04a+_0x160714(0x8a),()=>_0x1011e5[_0x160714(0x8b)][_0x160714(0x68)](_0xfb1ca1,_0x7eb2fc,_0x3c8c5a,_0x948321),{'verbose':_0x4b9fd3[_0x160714(0x7a)]}),_0x4a2c9d=_0x232c5f[_0x160714(0x6c)],_0x268cf3=_0x4a2c9d[_0x160714(0x6c)];return _0x268cf3['length']===0x0?console[_0x160714(0x75)]('✔\x20Query\x20successful\x20-\x200\x20rows\x20returned'):console[_0x160714(0x75)](_0x160714(0x70)+_0x268cf3[_0x160714(0x80)]+'\x20row'+(_0x268cf3[_0x160714(0x80)]!==0x1?'s':'')+'\x20from\x20'+_0x3fd04a),await handleSDKOutput(_0x268cf3,_0x4b9fd3),0x0;}catch(_0x3fd9ca){if(_0x3fd9ca instanceof SDKError)return console[_0x160714(0x75)](_0x160714(0x69)+_0x3fd9ca['message']),_0x3fd9ca['cause']&&console[_0x160714(0x75)](_0x160714(0x67)+_0x3fd9ca[_0x160714(0x7c)]),0x1;throw _0x3fd9ca;}}[a36_0x5b957(0x79)](_0x462300){const _0x258059=a36_0x5b957;if(_0x462300[_0x258059(0x76)][_0x258059(0x80)]===0x0)return'Usage:\x20tdx\x20show\x20<database.table>\x0a\x20\x20\x20or:\x20tdx\x20show\x20<catalog.database.table>\x0a\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--database\x20<database>\x0a\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--in\x20<database>\x0a\x0aRun\x20\x27tdx\x20show\x20--help\x27\x20for\x20more\x20options';if(_0x462300['args'][_0x258059(0x80)]>0x1)return _0x258059(0x85);return undefined;}}
1
+ function a36_0x5e78(_0xe7e90f,_0x517c60){_0xe7e90f=_0xe7e90f-0x74;const _0x42f4d6=a36_0x42f4();let _0x5e78d7=_0x42f4d6[_0xe7e90f];return _0x5e78d7;}function a36_0x42f4(){const _0x6d1e93=['error','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','3040328XZTWAE','28827530PoYXTQ','1564438KjMNiw','showTable','162455rZfdZn','Table:\x20','\x20\x20Cause:\x20','252VgaZpc','24EHedZf','database','Catalog:\x20','\x20from\x20','site','table','5670423HYPNyF','11peAFoC','verbose','name','\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--database\x20<database>','limit','✔\x20Retrieved\x20','1111803fbQpkl','\x20\x20\x20or:\x20tdx\x20show\x20<catalog.database.table>','show','2xXiRSM','message','execute','data','3563580OZCaGp','Querying\x20','\x20row','...','Usage:\x20tdx\x20show\x20<database.table>','validate','length','Limit:\x20','args','description','Error:\x20','Too\x20many\x20arguments\x0aUsage:\x20tdx\x20show\x20<database.table>\x0a\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--database\x20<database>\x0a\x0aRun\x20\x27tdx\x20show\x20--help\x27\x20for\x20more\x20options'];a36_0x42f4=function(){return _0x6d1e93;};return a36_0x42f4();}const a36_0x26d440=a36_0x5e78;(function(_0x56d424,_0x46949e){const _0x464e6d=a36_0x5e78,_0x8d7932=_0x56d424();while(!![]){try{const _0x18e56d=-parseInt(_0x464e6d(0x87))/0x1*(-parseInt(_0x464e6d(0x9d))/0x2)+parseInt(_0x464e6d(0x77))/0x3+parseInt(_0x464e6d(0x85))/0x4+parseInt(_0x464e6d(0x89))/0x5*(parseInt(_0x464e6d(0x8c))/0x6)+parseInt(_0x464e6d(0x9a))/0x7*(-parseInt(_0x464e6d(0x8d))/0x8)+-parseInt(_0x464e6d(0x93))/0x9+-parseInt(_0x464e6d(0x86))/0xa*(parseInt(_0x464e6d(0x94))/0xb);if(_0x18e56d===_0x46949e)break;else _0x8d7932['push'](_0x8d7932['shift']());}catch(_0x10ed7d){_0x8d7932['push'](_0x8d7932['shift']());}}}(a36_0x42f4,0xd8ba3));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleSDKOutput}from'../core/command-output.js';import{parseTableReference,validateTableDescribeReference}from'../utils/table-ref-parser.js';import{withSpinner}from'../utils/spinner.js';import{DEFAULT_DISPLAY_LIMIT,resolveLimit}from'../core/constants.js';export class ShowCommand extends BaseCommand{[a36_0x26d440(0x96)]=a36_0x26d440(0x9c);[a36_0x26d440(0x80)]='Show\x20table\x20contents';async[a36_0x26d440(0x75)](_0x7b3eda){const _0x2f78c1=a36_0x26d440;return this[_0x2f78c1(0x88)](_0x7b3eda);}async[a36_0x26d440(0x88)](_0x41bfcf){const _0x3190e3=a36_0x26d440,{options:_0x5bd916,args:_0x499ada,tdx:_0x584af5}=_0x41bfcf;let _0x2a6983;try{_0x2a6983=parseTableReference(_0x499ada[0x0]);const _0x45a502=_0x5bd916[_0x3190e3(0x8e)];!_0x2a6983[_0x3190e3(0x8e)]&&_0x45a502&&(_0x2a6983[_0x3190e3(0x8e)]=_0x45a502);const _0x409a9b=validateTableDescribeReference(_0x2a6983);if(_0x409a9b)return console[_0x3190e3(0x83)]('Error:\x20'+_0x409a9b),console[_0x3190e3(0x83)](_0x3190e3(0x7b)),console[_0x3190e3(0x83)](_0x3190e3(0x9b)),console[_0x3190e3(0x83)](_0x3190e3(0x97)),0x1;}catch(_0x51adc7){return console['error'](_0x3190e3(0x81)+_0x51adc7[_0x3190e3(0x74)]),console[_0x3190e3(0x83)](_0x3190e3(0x7b)),console[_0x3190e3(0x83)](_0x3190e3(0x9b)),console[_0x3190e3(0x83)](_0x3190e3(0x97)),0x1;}const _0x6db306=_0x2a6983['catalog'],_0xd3ba69=_0x2a6983[_0x3190e3(0x8e)],_0x3696a9=_0x2a6983[_0x3190e3(0x92)],_0x117eb4=resolveLimit(_0x5bd916[_0x3190e3(0x98)],DEFAULT_DISPLAY_LIMIT);try{_0x5bd916['verbose']&&(console['error']('Site:\x20'+_0x5bd916[_0x3190e3(0x91)]),_0x6db306&&console['error'](_0x3190e3(0x8f)+_0x6db306),console[_0x3190e3(0x83)]('Database:\x20'+_0xd3ba69),console[_0x3190e3(0x83)](_0x3190e3(0x8a)+_0x3696a9),console[_0x3190e3(0x83)](_0x3190e3(0x7e)+_0x117eb4));const _0x227b84=_0x6db306?_0x6db306+'.'+_0xd3ba69+'.'+_0x3696a9:_0xd3ba69+'.'+_0x3696a9,_0x18fe45=await withSpinner(_0x3190e3(0x78)+_0x227b84+_0x3190e3(0x7a),()=>_0x584af5['query'][_0x3190e3(0x88)](_0xd3ba69,_0x3696a9,_0x117eb4,_0x6db306),{'verbose':_0x5bd916[_0x3190e3(0x95)]}),_0x4f184c=_0x18fe45[_0x3190e3(0x76)],_0x145ed0=_0x4f184c[_0x3190e3(0x76)];return _0x145ed0['length']===0x0?console[_0x3190e3(0x83)]('✔\x20Query\x20successful\x20-\x200\x20rows\x20returned'):console[_0x3190e3(0x83)](_0x3190e3(0x99)+_0x145ed0[_0x3190e3(0x7d)]+_0x3190e3(0x79)+(_0x145ed0['length']!==0x1?'s':'')+_0x3190e3(0x90)+_0x227b84),await handleSDKOutput(_0x145ed0,_0x5bd916),0x0;}catch(_0x145023){if(_0x145023 instanceof SDKError)return console[_0x3190e3(0x83)](_0x3190e3(0x81)+_0x145023[_0x3190e3(0x74)]),_0x145023['cause']&&console[_0x3190e3(0x83)](_0x3190e3(0x8b)+_0x145023['cause']),0x1;throw _0x145023;}}[a36_0x26d440(0x7c)](_0x532487){const _0x2fd614=a36_0x26d440;if(_0x532487[_0x2fd614(0x7f)][_0x2fd614(0x7d)]===0x0)return _0x2fd614(0x84);if(_0x532487[_0x2fd614(0x7f)][_0x2fd614(0x7d)]>0x1)return _0x2fd614(0x82);return undefined;}}
@@ -1 +1 @@
1
- const a37_0x3015f2=a37_0x3872;function a37_0x188b(){const _0x4e91d9=['status','filter','email','config','4ZhcfNf','last_name','site','5VBlSAy','log','env','13794867zIXeMR','2591080CVBRPD','account_id','jobs','message','cli','746103WieLxW','profileSource','Read\x20credential\x20from\x20','10128566DlMiIi','green','bold','2vHupee','name','TDX_PROFILE\x20env','yellow','CLI\x20flag','388406dFKGzk','Show\x20authentication\x20status\x20and\x20current\x20context','session','dim','N/A','(from\x20','site:\x20','1495070IxNdXF','first_name','Account\x20ID:','6400902bAxVew','cyan'];a37_0x188b=function(){return _0x4e91d9;};return a37_0x188b();}(function(_0x24881b,_0x8f4ee3){const _0x44f180=a37_0x3872,_0x18544b=_0x24881b();while(!![]){try{const _0x3f1bb4=parseInt(_0x44f180(0x1aa))/0x1*(parseInt(_0x44f180(0x1a5))/0x2)+-parseInt(_0x44f180(0x19f))/0x3*(parseInt(_0x44f180(0x1ba))/0x4)+parseInt(_0x44f180(0x1bd))/0x5*(parseInt(_0x44f180(0x1b4))/0x6)+parseInt(_0x44f180(0x1a2))/0x7+-parseInt(_0x44f180(0x1c1))/0x8+-parseInt(_0x44f180(0x1c0))/0x9+parseInt(_0x44f180(0x1b1))/0xa;if(_0x3f1bb4===_0x8f4ee3)break;else _0x18544b['push'](_0x18544b['shift']());}catch(_0x57b70b){_0x18544b['push'](_0x18544b['shift']());}}}(a37_0x188b,0xe708f));import{BaseCommand,printAuthError}from'./command.js';import{resolveAPIKeyAsync}from'../core/config.js';import{HTTPClientError}from'../sdk/client/http-client.js';import{GlobalContext}from'../core/global-context.js';import a37_0x4879f5 from'chalk';function a37_0x3872(_0x3f2ceb,_0x14c42b){_0x3f2ceb=_0x3f2ceb-0x19d;const _0x188b81=a37_0x188b();let _0x38725b=_0x188b81[_0x3f2ceb];return _0x38725b;}export class StatusCommand extends BaseCommand{[a37_0x3015f2(0x1a6)]=a37_0x3015f2(0x1b6);['description']=a37_0x3015f2(0x1ab);async['execute'](_0x1aabe3){const _0xa9ab66=a37_0x3015f2,{options:_0x4661b9,tdx:_0x4a65e8}=_0x1aabe3,_0x30437a=_0x4661b9[_0xa9ab66(0x1bc)],_0xf7ff1a=new GlobalContext(_0x4661b9),_0x422914=_0xf7ff1a['profile'],_0x812a24=_0xf7ff1a[_0xa9ab66(0x1a0)],_0x5cd744=_0x812a24===_0xa9ab66(0x19e)?_0xa9ab66(0x1a9):_0x812a24===_0xa9ab66(0x1ac)?_0xa9ab66(0x1ac):_0x812a24===_0xa9ab66(0x1bf)?_0xa9ab66(0x1a7):_0x812a24===_0xa9ab66(0x1b9)?_0xa9ab66(0x1b9):null,_0x2e1268=_0x422914?a37_0x4879f5[_0xa9ab66(0x1b5)](_0x422914):a37_0x4879f5[_0xa9ab66(0x1ad)](_0xa9ab66(0x1ae)),_0x2c3ba0=_0x5cd744?'\x20'+a37_0x4879f5[_0xa9ab66(0x1ad)](_0xa9ab66(0x1af)+_0x5cd744+')'):'';console['log'](a37_0x4879f5['bold']('tdx')+'\x20profile:\x20'+_0x2e1268+_0x2c3ba0+'\x20'+a37_0x4879f5['dim']('(')+_0xa9ab66(0x1b0)+a37_0x4879f5[_0xa9ab66(0x1b5)](_0x30437a)+a37_0x4879f5[_0xa9ab66(0x1ad)](')'));const _0x510260=await resolveAPIKeyAsync(_0x30437a,_0x422914);if(_0x510260){const {source:_0x486d0f,isDeprecated:_0x3ada15}=_0x510260,_0x1c5324=_0xa9ab66(0x1a1)+a37_0x4879f5[_0xa9ab66(0x1b5)](_0x486d0f);console[_0xa9ab66(0x1be)](_0x3ada15?a37_0x4879f5['yellow'](_0x1c5324):_0x1c5324);}else console[_0xa9ab66(0x1be)](a37_0x4879f5['yellow']('No\x20credential\x20found'));let _0x30a6fe=![];try{const _0x5a6074=await _0x4a65e8[_0xa9ab66(0x1c3)]['getUserInfo']();console[_0xa9ab66(0x1be)](a37_0x4879f5[_0xa9ab66(0x1a3)]('✓\x20Authentication\x20successful\x0a')),console['log'](a37_0x4879f5[_0xa9ab66(0x1a4)]('User:')+'\x20'+a37_0x4879f5[_0xa9ab66(0x1b5)](_0x5a6074[_0xa9ab66(0x1b8)]));if(_0x5a6074[_0xa9ab66(0x1b2)]||_0x5a6074[_0xa9ab66(0x1bb)]){const _0x1098eb=[_0x5a6074[_0xa9ab66(0x1b2)],_0x5a6074['last_name']][_0xa9ab66(0x1b7)](Boolean)['join']('\x20');console[_0xa9ab66(0x1be)](a37_0x4879f5['bold']('Name:')+'\x20'+_0x1098eb);}_0x5a6074['account_id']&&console['log'](a37_0x4879f5[_0xa9ab66(0x1a4)](_0xa9ab66(0x1b3))+'\x20'+a37_0x4879f5[_0xa9ab66(0x1a8)](_0x5a6074[_0xa9ab66(0x1c2)])),_0x30a6fe=!![];}catch(_0x3ec119){_0x3ec119 instanceof HTTPClientError&&_0x3ec119['status']===0x191?printAuthError(_0x3ec119,!![],_0x422914):console['error'](a37_0x4879f5['red']('✗\x20Validation\x20failed:\x20'+(_0x3ec119 instanceof Error?_0x3ec119[_0xa9ab66(0x19d)]:String(_0x3ec119))));}return console[_0xa9ab66(0x1be)](),_0xf7ff1a['displayWithSources'](),_0x30a6fe?0x0:0x1;}}
1
+ const a37_0x2a8fb2=a37_0x5e1e;(function(_0x58f08a,_0x3a0450){const _0x5e3f0e=a37_0x5e1e,_0x53ed52=_0x58f08a();while(!![]){try{const _0x639937=parseInt(_0x5e3f0e(0xc6))/0x1*(parseInt(_0x5e3f0e(0xba))/0x2)+parseInt(_0x5e3f0e(0xaa))/0x3+parseInt(_0x5e3f0e(0xbc))/0x4+parseInt(_0x5e3f0e(0xa9))/0x5+parseInt(_0x5e3f0e(0xc1))/0x6*(-parseInt(_0x5e3f0e(0xb5))/0x7)+-parseInt(_0x5e3f0e(0xb4))/0x8+-parseInt(_0x5e3f0e(0xcc))/0x9*(parseInt(_0x5e3f0e(0xac))/0xa);if(_0x639937===_0x3a0450)break;else _0x53ed52['push'](_0x53ed52['shift']());}catch(_0x4dc550){_0x53ed52['push'](_0x53ed52['shift']());}}}(a37_0x4f20,0x5f961));import{BaseCommand,printAuthError}from'./command.js';function a37_0x5e1e(_0x2d9bdd,_0x2e9fb4){_0x2d9bdd=_0x2d9bdd-0xa1;const _0x4f20ca=a37_0x4f20();let _0x5e1e44=_0x4f20ca[_0x2d9bdd];return _0x5e1e44;}import{resolveAPIKeyAsync}from'../core/config.js';function a37_0x4f20(){const _0x2ebeb9=['Name:','85832secvII','TDX_PROFILE\x20env','No\x20credential\x20found','email','✗\x20Validation\x20failed:\x20','(from\x20','423fTvVgv','config','Account\x20ID:','site:\x20','CLI\x20flag','message','displayWithSources','name','filter','site','session','profileSource','3137300qoAOyc','1800666pDFpaf','✓\x20Authentication\x20successful\x0a','42260qHTnwj','account_id','\x20profile:\x20','bold','red','description','profile','status','5156632EZZpzL','21ZOfgQZ','log','dim','User:','jobs','8IiuHXa','tdx','510096UBycPr','execute','last_name','green','cyan','927624trHGxF','yellow','cli','error'];a37_0x4f20=function(){return _0x2ebeb9;};return a37_0x4f20();}import{HTTPClientError}from'../sdk/client/http-client.js';import{GlobalContext}from'../core/global-context.js';import a37_0x5600c4 from'chalk';export class StatusCommand extends BaseCommand{[a37_0x2a8fb2(0xa4)]=a37_0x2a8fb2(0xb3);[a37_0x2a8fb2(0xb1)]='Show\x20authentication\x20status\x20and\x20current\x20context';async[a37_0x2a8fb2(0xbd)](_0x37074d){const _0x18d88a=a37_0x2a8fb2,{options:_0x38e117,tdx:_0x513573}=_0x37074d,_0x13ee88=_0x38e117[_0x18d88a(0xa6)],_0x3d6daf=new GlobalContext(_0x38e117),_0x462ba3=_0x3d6daf[_0x18d88a(0xb2)],_0x37ca03=_0x3d6daf[_0x18d88a(0xa8)],_0xc88239=_0x37ca03===_0x18d88a(0xc3)?_0x18d88a(0xa1):_0x37ca03===_0x18d88a(0xa7)?_0x18d88a(0xa7):_0x37ca03==='env'?_0x18d88a(0xc7):_0x37ca03==='config'?_0x18d88a(0xcd):null,_0x22dbc8=_0x462ba3?a37_0x5600c4['cyan'](_0x462ba3):a37_0x5600c4[_0x18d88a(0xb7)]('N/A'),_0x40d490=_0xc88239?'\x20'+a37_0x5600c4[_0x18d88a(0xb7)](_0x18d88a(0xcb)+_0xc88239+')'):'';console[_0x18d88a(0xb6)](a37_0x5600c4['bold'](_0x18d88a(0xbb))+_0x18d88a(0xae)+_0x22dbc8+_0x40d490+'\x20'+a37_0x5600c4[_0x18d88a(0xb7)]('(')+_0x18d88a(0xcf)+a37_0x5600c4['cyan'](_0x13ee88)+a37_0x5600c4[_0x18d88a(0xb7)](')'));const _0x99572e=await resolveAPIKeyAsync(_0x13ee88,_0x462ba3);if(_0x99572e){const {source:_0x2021ef,isDeprecated:_0x1e5fad}=_0x99572e,_0x4d107f='Read\x20credential\x20from\x20'+a37_0x5600c4[_0x18d88a(0xc0)](_0x2021ef);console[_0x18d88a(0xb6)](_0x1e5fad?a37_0x5600c4[_0x18d88a(0xc2)](_0x4d107f):_0x4d107f);}else console[_0x18d88a(0xb6)](a37_0x5600c4['yellow'](_0x18d88a(0xc8)));let _0x269624=![];try{const _0x2676de=await _0x513573[_0x18d88a(0xb9)]['getUserInfo']();console[_0x18d88a(0xb6)](a37_0x5600c4[_0x18d88a(0xbf)](_0x18d88a(0xab))),console[_0x18d88a(0xb6)](a37_0x5600c4[_0x18d88a(0xaf)](_0x18d88a(0xb8))+'\x20'+a37_0x5600c4[_0x18d88a(0xc0)](_0x2676de[_0x18d88a(0xc9)]));if(_0x2676de['first_name']||_0x2676de[_0x18d88a(0xbe)]){const _0x491bbe=[_0x2676de['first_name'],_0x2676de['last_name']][_0x18d88a(0xa5)](Boolean)['join']('\x20');console['log'](a37_0x5600c4[_0x18d88a(0xaf)](_0x18d88a(0xc5))+'\x20'+_0x491bbe);}_0x2676de['account_id']&&console['log'](a37_0x5600c4[_0x18d88a(0xaf)](_0x18d88a(0xce))+'\x20'+a37_0x5600c4[_0x18d88a(0xc2)](_0x2676de[_0x18d88a(0xad)])),_0x269624=!![];}catch(_0x5a00c3){_0x5a00c3 instanceof HTTPClientError&&_0x5a00c3[_0x18d88a(0xb3)]===0x191?printAuthError(_0x5a00c3,!![],_0x462ba3):console[_0x18d88a(0xc4)](a37_0x5600c4[_0x18d88a(0xb0)](_0x18d88a(0xca)+(_0x5a00c3 instanceof Error?_0x5a00c3[_0x18d88a(0xa2)]:String(_0x5a00c3))));}return console[_0x18d88a(0xb6)](),_0x3d6daf[_0x18d88a(0xa3)](),_0x269624?0x0:0x1;}}
@@ -1 +1 @@
1
- const a38_0x217dd1=a38_0x11bb;(function(_0x4682b7,_0x437cb2){const _0x308687=a38_0x11bb,_0x2038c0=_0x4682b7();while(!![]){try{const _0xb22879=-parseInt(_0x308687(0xdc))/0x1+parseInt(_0x308687(0x100))/0x2+parseInt(_0x308687(0xd9))/0x3+-parseInt(_0x308687(0xf5))/0x4+parseInt(_0x308687(0xe9))/0x5+-parseInt(_0x308687(0xfe))/0x6*(-parseInt(_0x308687(0xf4))/0x7)+-parseInt(_0x308687(0xf7))/0x8;if(_0xb22879===_0x437cb2)break;else _0x2038c0['push'](_0x2038c0['shift']());}catch(_0x45c8dc){_0x2038c0['push'](_0x2038c0['shift']());}}}(a38_0x9e16,0x9dff0));function a38_0x11bb(_0x2844af,_0x22f957){_0x2844af=_0x2844af-0xd9;const _0x9e163a=a38_0x9e16();let _0x11bb0e=_0x9e163a[_0x2844af];return _0x11bb0e;}import{BaseCommand}from'./command.js';function a38_0x9e16(){const _0x428b37=['Note:\x20\x27','\x27\x20is\x20ambiguous.','Database\x20\x27','98sceLYQ','4811008NWmlPU','Or\x20use\x20--in\x20flag:','8112344YRCOxx','Error:\x20Pattern\x20\x27','includes','verbose','execute','\x20\x20Or:\x20\x20tdx\x20tables\x20--database\x20','description','351546LsSAKX','table','1196410NOZcQB','\x20\x20tdx\x20tables\x20\x22mydb.users\x22\x20\x20\x20\x20->\x20table\x20\x22users\x22\x20in\x20database\x20mydb','Listing\x20tables...','data','✔\x20Found\x20','Did\x20you\x20mean\x20to\x20list\x20all\x20tables\x20from\x20database\x20\x27','name','List\x20tables\x20in\x20a\x20database','2975715gwIqdY','site','listTables','790662DKpuaT','Site:\x20','\x20table','\x20\x20tdx\x20tables\x20\x22*.user*\x22\x20\x20\x20\x20\x20\x20\x20->\x20tables\x20matching\x20user*\x20across\x20databases','length','\x27\x20may\x20not\x20exist\x20or\x20contains\x20no\x20tables','error','\x20\x20Cause:\x20','Error:\x20Too\x20many\x20arguments.\x20Use\x20single\x20argument:','database','Database:\x20','cause','validate','6221125HNzNdB','\x27\x20without\x20wildcards\x20would\x20search\x20for\x20tables\x20named\x20\x27','\x27\x20across\x20all\x20databases.','Database:\x20all','tables','Error:\x20','message','Database\x20pattern:\x20'];a38_0x9e16=function(){return _0x428b37;};return a38_0x9e16();}import{SDKError}from'../sdk/index.js';import{handleSDKOutput}from'../core/command-output.js';import{parseTableReference}from'../utils/table-ref-parser.js';import{DEFAULT_LISTING_LIMIT,resolveLimit}from'../core/constants.js';import{withSpinner}from'../utils/spinner.js';export class TablesCommand extends BaseCommand{[a38_0x217dd1(0x106)]=a38_0x217dd1(0xed);[a38_0x217dd1(0xfd)]=a38_0x217dd1(0x107);async[a38_0x217dd1(0xfb)](_0x4a810c){const _0x5e570f=a38_0x217dd1,{options:_0x29fe96,args:_0x1bb73a,tdx:_0x2a3aae}=_0x4a810c;let _0x341bdf;if(_0x1bb73a[_0x5e570f(0xe0)]===0x0)_0x341bdf={'database':undefined,'table':undefined,'original':''};else{if(_0x1bb73a['length']===0x1)try{_0x341bdf=parseTableReference(_0x1bb73a[0x0]);if(_0x341bdf[_0x5e570f(0xff)]&&!_0x341bdf['database']&&!_0x341bdf[_0x5e570f(0xff)][_0x5e570f(0xf9)]('*')&&!_0x341bdf['table']['includes']('?'))return console[_0x5e570f(0xe2)](_0x5e570f(0xf8)+_0x1bb73a[0x0]+_0x5e570f(0xf2)),console[_0x5e570f(0xe2)](_0x5e570f(0x105)+_0x341bdf[_0x5e570f(0xff)]+'\x27?'),console[_0x5e570f(0xe2)]('\x20\x20Use:\x20tdx\x20tables\x20\x22'+_0x341bdf[_0x5e570f(0xff)]+'.*\x22'),console[_0x5e570f(0xe2)]('\x20\x20Or:\x20\x20tdx\x20tables\x20--in\x20'+_0x341bdf[_0x5e570f(0xff)]),console[_0x5e570f(0xe2)](_0x5e570f(0xfc)+_0x341bdf['table']),console[_0x5e570f(0xe2)](''),console[_0x5e570f(0xe2)](_0x5e570f(0xf1)+_0x1bb73a[0x0]+_0x5e570f(0xea)+_0x341bdf[_0x5e570f(0xff)]+_0x5e570f(0xeb)),0x1;}catch(_0x3d813f){return console[_0x5e570f(0xe2)](_0x5e570f(0xee)+_0x3d813f[_0x5e570f(0xef)]),0x1;}else return console[_0x5e570f(0xe2)](_0x5e570f(0xe4)),console['error']('\x20\x20tdx\x20tables\x20users\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20->\x20table\x20\x22users\x22\x20across\x20all\x20databases'),console[_0x5e570f(0xe2)]('\x20\x20tdx\x20tables\x20\x22mydb.*\x22\x20\x20\x20\x20\x20\x20\x20\x20->\x20all\x20tables\x20from\x20mydb'),console[_0x5e570f(0xe2)](_0x5e570f(0x101)),console[_0x5e570f(0xe2)](_0x5e570f(0xdf)),console['error'](_0x5e570f(0xf6)),console[_0x5e570f(0xe2)]('\x20\x20tdx\x20tables\x20--in\x20mydb\x20\x20\x20\x20\x20\x20\x20->\x20all\x20tables\x20from\x20mydb'),0x1;}const _0x5bf132=_0x29fe96[_0x5e570f(0xe5)];!_0x341bdf[_0x5e570f(0xe5)]&&_0x5bf132&&(_0x341bdf[_0x5e570f(0xe5)]=_0x5bf132);try{const _0x38f785=_0x2325a3=>_0x2325a3&&(_0x2325a3[_0x5e570f(0xf9)]('*')||_0x2325a3['includes']('?')),_0x293072=_0x38f785(_0x341bdf[_0x5e570f(0xe5)]);_0x29fe96[_0x5e570f(0xfa)]&&(console[_0x5e570f(0xe2)](_0x5e570f(0xdd)+_0x29fe96[_0x5e570f(0xda)]),_0x341bdf[_0x5e570f(0xe5)]?_0x293072?console[_0x5e570f(0xe2)](_0x5e570f(0xf0)+_0x341bdf[_0x5e570f(0xe5)]):console[_0x5e570f(0xe2)](_0x5e570f(0xe6)+_0x341bdf['database']):console[_0x5e570f(0xe2)](_0x5e570f(0xec)),_0x341bdf[_0x5e570f(0xff)]&&console[_0x5e570f(0xe2)]('Table\x20pattern:\x20'+_0x341bdf[_0x5e570f(0xff)]));const _0x42bc5e=_0x341bdf['database']&&!_0x293072?_0x341bdf['database']:undefined,_0x48bab5=_0x293072?_0x341bdf['database']:undefined,_0x23fa9a=_0x341bdf['table'],_0x31a796=resolveLimit(_0x29fe96['limit'],DEFAULT_LISTING_LIMIT),_0x2bc730=await withSpinner(_0x5e570f(0x102),()=>_0x2a3aae['query'][_0x5e570f(0xdb)](_0x42bc5e,_0x23fa9a,_0x48bab5,_0x31a796),{'verbose':_0x29fe96[_0x5e570f(0xfa)]}),_0x384579=_0x2bc730[_0x5e570f(0x103)];if(_0x384579[_0x5e570f(0xe0)]===0x0&&_0x341bdf['database']&&!_0x293072)return console[_0x5e570f(0xe2)]('✖\x20No\x20tables\x20found'),console[_0x5e570f(0xe2)](_0x5e570f(0xf3)+_0x341bdf[_0x5e570f(0xe5)]+_0x5e570f(0xe1)),0x1;return console[_0x5e570f(0xe2)](_0x5e570f(0x104)+_0x384579[_0x5e570f(0xe0)]+_0x5e570f(0xde)+(_0x384579[_0x5e570f(0xe0)]!==0x1?'s':'')),await handleSDKOutput(_0x384579,{..._0x29fe96,'limit':_0x31a796}),0x0;}catch(_0xa5e430){if(_0xa5e430 instanceof SDKError)return console[_0x5e570f(0xe2)](_0x5e570f(0xee)+_0xa5e430[_0x5e570f(0xef)]),_0xa5e430['cause']&&console[_0x5e570f(0xe2)](_0x5e570f(0xe3)+_0xa5e430[_0x5e570f(0xe7)]),0x1;throw _0xa5e430;}}[a38_0x217dd1(0xe8)](_0x5d2ba9){return undefined;}}
1
+ const a38_0x5200ee=a38_0x5b7b;(function(_0x2b738e,_0x306293){const _0x978f1c=a38_0x5b7b,_0x298e4a=_0x2b738e();while(!![]){try{const _0x3d0f49=-parseInt(_0x978f1c(0x141))/0x1+parseInt(_0x978f1c(0x143))/0x2+parseInt(_0x978f1c(0x168))/0x3*(-parseInt(_0x978f1c(0x145))/0x4)+parseInt(_0x978f1c(0x15d))/0x5+parseInt(_0x978f1c(0x147))/0x6+parseInt(_0x978f1c(0x157))/0x7*(-parseInt(_0x978f1c(0x167))/0x8)+parseInt(_0x978f1c(0x14e))/0x9;if(_0x3d0f49===_0x306293)break;else _0x298e4a['push'](_0x298e4a['shift']());}catch(_0x4b9e33){_0x298e4a['push'](_0x298e4a['shift']());}}}(a38_0x48e6,0xad217));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleSDKOutput}from'../core/command-output.js';function a38_0x48e6(){const _0x241f62=['error','Table\x20pattern:\x20','Database\x20\x27','includes','\x20\x20tdx\x20tables\x20\x22mydb.*\x22\x20\x20\x20\x20\x20\x20\x20\x20->\x20all\x20tables\x20from\x20mydb','length','Database:\x20','limit','3149528kvGTlu','1218276rQKJgH','database','data','Note:\x20\x27','table','✖\x20No\x20tables\x20found','verbose','1250364JObPYl','\x20\x20tdx\x20tables\x20--in\x20mydb\x20\x20\x20\x20\x20\x20\x20->\x20all\x20tables\x20from\x20mydb','2006794qDDJMU','\x27\x20across\x20all\x20databases.','4TAkiXW','name','2553228FUzNvF','cause','execute','site','\x20table','Error:\x20','Site:\x20','6505047KSBEDJ','\x20\x20tdx\x20tables\x20users\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20->\x20table\x20\x22users\x22\x20across\x20all\x20databases','\x20\x20tdx\x20tables\x20\x22mydb.users\x22\x20\x20\x20\x20->\x20table\x20\x22users\x22\x20in\x20database\x20mydb','message','validate','tables','Error:\x20Too\x20many\x20arguments.\x20Use\x20single\x20argument:','\x20\x20Cause:\x20','Or\x20use\x20--in\x20flag:','14wCjqAg','\x20\x20Or:\x20\x20tdx\x20tables\x20--database\x20','\x20\x20tdx\x20tables\x20\x22*.user*\x22\x20\x20\x20\x20\x20\x20\x20->\x20tables\x20matching\x20user*\x20across\x20databases','.*\x22','List\x20tables\x20in\x20a\x20database','\x27\x20may\x20not\x20exist\x20or\x20contains\x20no\x20tables','5006315bIOmoO','Database:\x20all'];a38_0x48e6=function(){return _0x241f62;};return a38_0x48e6();}import{parseTableReference}from'../utils/table-ref-parser.js';function a38_0x5b7b(_0x53ab33,_0x25a763){_0x53ab33=_0x53ab33-0x140;const _0x48e6f3=a38_0x48e6();let _0x5b7be8=_0x48e6f3[_0x53ab33];return _0x5b7be8;}import{DEFAULT_LISTING_LIMIT,resolveLimit}from'../core/constants.js';import{withSpinner}from'../utils/spinner.js';export class TablesCommand extends BaseCommand{[a38_0x5200ee(0x146)]=a38_0x5200ee(0x153);['description']=a38_0x5200ee(0x15b);async[a38_0x5200ee(0x149)](_0x42ba12){const _0x4fa603=a38_0x5200ee,{options:_0x5bb9b9,args:_0x128a42,tdx:_0x12d466}=_0x42ba12;let _0x405763;if(_0x128a42[_0x4fa603(0x164)]===0x0)_0x405763={'database':undefined,'table':undefined,'original':''};else{if(_0x128a42[_0x4fa603(0x164)]===0x1)try{_0x405763=parseTableReference(_0x128a42[0x0]);if(_0x405763[_0x4fa603(0x16c)]&&!_0x405763[_0x4fa603(0x169)]&&!_0x405763[_0x4fa603(0x16c)][_0x4fa603(0x162)]('*')&&!_0x405763['table'][_0x4fa603(0x162)]('?'))return console['error']('Error:\x20Pattern\x20\x27'+_0x128a42[0x0]+'\x27\x20is\x20ambiguous.'),console[_0x4fa603(0x15f)]('Did\x20you\x20mean\x20to\x20list\x20all\x20tables\x20from\x20database\x20\x27'+_0x405763[_0x4fa603(0x16c)]+'\x27?'),console[_0x4fa603(0x15f)]('\x20\x20Use:\x20tdx\x20tables\x20\x22'+_0x405763[_0x4fa603(0x16c)]+_0x4fa603(0x15a)),console[_0x4fa603(0x15f)]('\x20\x20Or:\x20\x20tdx\x20tables\x20--in\x20'+_0x405763[_0x4fa603(0x16c)]),console['error'](_0x4fa603(0x158)+_0x405763[_0x4fa603(0x16c)]),console[_0x4fa603(0x15f)](''),console['error'](_0x4fa603(0x16b)+_0x128a42[0x0]+'\x27\x20without\x20wildcards\x20would\x20search\x20for\x20tables\x20named\x20\x27'+_0x405763[_0x4fa603(0x16c)]+_0x4fa603(0x144)),0x1;}catch(_0x12ef8d){return console['error'](_0x4fa603(0x14c)+_0x12ef8d[_0x4fa603(0x151)]),0x1;}else return console[_0x4fa603(0x15f)](_0x4fa603(0x154)),console[_0x4fa603(0x15f)](_0x4fa603(0x14f)),console[_0x4fa603(0x15f)](_0x4fa603(0x163)),console['error'](_0x4fa603(0x150)),console['error'](_0x4fa603(0x159)),console[_0x4fa603(0x15f)](_0x4fa603(0x156)),console[_0x4fa603(0x15f)](_0x4fa603(0x142)),0x1;}const _0x151fa6=_0x5bb9b9['database'];!_0x405763[_0x4fa603(0x169)]&&_0x151fa6&&(_0x405763['database']=_0x151fa6);try{const _0x2639f6=_0x5840c4=>_0x5840c4&&(_0x5840c4[_0x4fa603(0x162)]('*')||_0x5840c4[_0x4fa603(0x162)]('?')),_0x2898b8=_0x2639f6(_0x405763[_0x4fa603(0x169)]);_0x5bb9b9[_0x4fa603(0x140)]&&(console[_0x4fa603(0x15f)](_0x4fa603(0x14d)+_0x5bb9b9[_0x4fa603(0x14a)]),_0x405763['database']?_0x2898b8?console[_0x4fa603(0x15f)]('Database\x20pattern:\x20'+_0x405763['database']):console[_0x4fa603(0x15f)](_0x4fa603(0x165)+_0x405763['database']):console['error'](_0x4fa603(0x15e)),_0x405763['table']&&console[_0x4fa603(0x15f)](_0x4fa603(0x160)+_0x405763[_0x4fa603(0x16c)]));const _0x422457=_0x405763['database']&&!_0x2898b8?_0x405763[_0x4fa603(0x169)]:undefined,_0xb406c5=_0x2898b8?_0x405763[_0x4fa603(0x169)]:undefined,_0x15b129=_0x405763['table'],_0x596a5b=resolveLimit(_0x5bb9b9[_0x4fa603(0x166)],DEFAULT_LISTING_LIMIT),_0x186bc6=await withSpinner('Listing\x20tables...',()=>_0x12d466['query']['listTables'](_0x422457,_0x15b129,_0xb406c5,_0x596a5b),{'verbose':_0x5bb9b9['verbose']}),_0x230cf=_0x186bc6[_0x4fa603(0x16a)];if(_0x230cf[_0x4fa603(0x164)]===0x0&&_0x405763[_0x4fa603(0x169)]&&!_0x2898b8)return console[_0x4fa603(0x15f)](_0x4fa603(0x16d)),console[_0x4fa603(0x15f)](_0x4fa603(0x161)+_0x405763[_0x4fa603(0x169)]+_0x4fa603(0x15c)),0x1;return console['error']('✔\x20Found\x20'+_0x230cf[_0x4fa603(0x164)]+_0x4fa603(0x14b)+(_0x230cf['length']!==0x1?'s':'')),await handleSDKOutput(_0x230cf,{..._0x5bb9b9,'limit':_0x596a5b}),0x0;}catch(_0x5e871){if(_0x5e871 instanceof SDKError)return console[_0x4fa603(0x15f)](_0x4fa603(0x14c)+_0x5e871[_0x4fa603(0x151)]),_0x5e871[_0x4fa603(0x148)]&&console[_0x4fa603(0x15f)](_0x4fa603(0x155)+_0x5e871[_0x4fa603(0x148)]),0x1;throw _0x5e871;}}[a38_0x5200ee(0x152)](_0x3e1aa9){return undefined;}}
@@ -1 +1 @@
1
- function a39_0x5087(_0x1ca482,_0x81e446){_0x1ca482=_0x1ca482-0x87;const _0x2af100=a39_0x2af1();let _0x5087aa=_0x2af100[_0x1ca482];return _0x5087aa;}const a39_0x33b171=a39_0x5087;(function(_0x7647f3,_0x552270){const _0x6a30f7=a39_0x5087,_0x67a0b3=_0x7647f3();while(!![]){try{const _0x4c6011=-parseInt(_0x6a30f7(0xa3))/0x1+-parseInt(_0x6a30f7(0xa5))/0x2+-parseInt(_0x6a30f7(0x93))/0x3*(parseInt(_0x6a30f7(0x9a))/0x4)+parseInt(_0x6a30f7(0x94))/0x5+-parseInt(_0x6a30f7(0x89))/0x6*(parseInt(_0x6a30f7(0x9c))/0x7)+-parseInt(_0x6a30f7(0x8a))/0x8+parseInt(_0x6a30f7(0xaa))/0x9;if(_0x4c6011===_0x552270)break;else _0x67a0b3['push'](_0x67a0b3['shift']());}catch(_0x1ee716){_0x67a0b3['push'](_0x67a0b3['shift']());}}}(a39_0x2af1,0x3be91));import{BaseCommand}from'./command.js';import{getSessionID,cleanExpiredSessions,clearSessionContextField}from'../core/session.js';import{clearDefaultSiteFromUserConfig,clearActiveProfileFromUserConfig}from'../core/profile.js';import{getConfigDir}from'../core/config.js';import a39_0x4f56c0 from'chalk';import*as a39_0xf5a304 from'node:path';export class UnsetCommand extends BaseCommand{['name']=a39_0x33b171(0xa8);['description']='Clear\x20session-level\x20or\x20default\x20context\x20values';[a39_0x33b171(0xa7)](_0x115f27){const _0x53b6fc=a39_0x33b171,{args:_0x2423b8,options:_0x4d5502}=_0x115f27,_0x205cc1=_0x4d5502[_0x53b6fc(0x9d)];if(_0x2423b8['length']===0x0)return _0x53b6fc(0xa1)+_0x53b6fc(0x8c)+_0x53b6fc(0x8d)+'\x0aRun\x20\x27tdx\x20unset\x20--help\x27\x20for\x20more\x20options';const _0xe8f8ea=_0x2423b8[0x0],_0x2bb889=['site',_0x53b6fc(0xa2),'parent_segment','llm_project','agent','profile',_0x53b6fc(0x95)];if(!_0x2bb889[_0x53b6fc(0xa4)](_0xe8f8ea))return _0x53b6fc(0x99)+_0xe8f8ea+_0x53b6fc(0xa6)+_0x2bb889['join'](',\x20');if(_0x205cc1&&_0xe8f8ea!==_0x53b6fc(0x8b)&&_0xe8f8ea!==_0x53b6fc(0x97))return _0x53b6fc(0x88);return undefined;}async['execute'](_0xbd0093){const _0x36bc22=a39_0x33b171,{args:_0x28820b,options:_0x7d0dc}=_0xbd0093,_0x410d0a=_0x7d0dc[_0x36bc22(0x9d)];cleanExpiredSessions();try{const _0x5183f9=_0x28820b[0x0],_0x41ebcb=a39_0xf5a304[_0x36bc22(0xa9)](getConfigDir(),_0x36bc22(0x87));if(_0x410d0a){if(_0x5183f9===_0x36bc22(0x8b))return clearDefaultSiteFromUserConfig(),console[_0x36bc22(0x9f)]('Default\x20site\x20'+a39_0x4f56c0[_0x36bc22(0x98)](_0x36bc22(0x90))),console[_0x36bc22(0x9f)](a39_0x4f56c0[_0x36bc22(0xab)](_0x36bc22(0x8e)+_0x41ebcb)),0x0;if(_0x5183f9===_0x36bc22(0x97))return clearActiveProfileFromUserConfig(),console[_0x36bc22(0x9f)](_0x36bc22(0x8f)+a39_0x4f56c0[_0x36bc22(0x98)](_0x36bc22(0x90))),console[_0x36bc22(0x9f)](a39_0x4f56c0[_0x36bc22(0xab)]('\x0aUpdated:\x20'+_0x41ebcb)),0x0;}const _0x2743f5=getSessionID(_0x7d0dc[_0x36bc22(0xa0)]),_0x2e6fd5={'site':_0x36bc22(0x8b),'database':_0x36bc22(0xa2),'parent_segment':_0x36bc22(0x96),'llm_project':'llm_project','agent':_0x36bc22(0x92),'profile':_0x36bc22(0x97),'engage_workspace':'engage_workspace'},_0x4ceba9=_0x2e6fd5[_0x5183f9];return _0x4ceba9&&(clearSessionContextField(_0x4ceba9,_0x7d0dc[_0x36bc22(0xa0)]),console[_0x36bc22(0x9f)](_0x36bc22(0x9b)+_0x5183f9+'\x20'+a39_0x4f56c0[_0x36bc22(0x98)]('cleared')+'\x20'+a39_0x4f56c0[_0x36bc22(0xab)]('(session:\x20'+_0x2743f5+')'))),0x0;}catch(_0x5e04b1){return _0x5e04b1 instanceof Error&&console[_0x36bc22(0x9e)]('Error:\x20'+_0x5e04b1[_0x36bc22(0x91)]),0x1;}}}function a39_0x2af1(){const _0x1e2f73=['validate','unset','join','14624388IYIJkz','dim','tdx.json','--default\x20can\x20only\x20be\x20used\x20with\x20\x27site\x27\x20or\x20\x27profile\x27.\x20Other\x20resources\x20are\x20session-level\x20only.','270hzqvck','1034000uOfwwP','site','\x20\x20\x20\x20\x20\x20\x20tdx\x20unset\x20--default\x20<resource>\x20\x20#\x20Clear\x20default\x20from\x20config\x0a','\x0aResources:\x20site,\x20database,\x20parent_segment,\x20llm_project,\x20agent,\x20profile,\x20engage_workspace\x0a','\x0aUpdated:\x20','Default\x20profile\x20','cleared','message','llm_agent','3mHjfvv','682210TcADUy','engage_workspace','parent_segment','profile','green','Invalid\x20resource:\x20','412156UtUyrj','Session\x20','52801lRzWQL','default','error','log','session','Usage:\x20tdx\x20unset\x20<resource>\x0a','database','453653YxhgbA','includes','981208CeReCZ','.\x20Must\x20be\x20one\x20of:\x20'];a39_0x2af1=function(){return _0x1e2f73;};return a39_0x2af1();}
1
+ const a39_0x3b6377=a39_0x1b79;(function(_0x10f3fc,_0x5d2a68){const _0x5376ea=a39_0x1b79,_0x4108e1=_0x10f3fc();while(!![]){try{const _0x436294=parseInt(_0x5376ea(0xf3))/0x1*(-parseInt(_0x5376ea(0xea))/0x2)+-parseInt(_0x5376ea(0xfa))/0x3*(parseInt(_0x5376ea(0xd7))/0x4)+parseInt(_0x5376ea(0xd4))/0x5+-parseInt(_0x5376ea(0xec))/0x6+-parseInt(_0x5376ea(0xe4))/0x7*(-parseInt(_0x5376ea(0xe6))/0x8)+-parseInt(_0x5376ea(0xf6))/0x9*(-parseInt(_0x5376ea(0xdd))/0xa)+-parseInt(_0x5376ea(0xf4))/0xb*(-parseInt(_0x5376ea(0xd9))/0xc);if(_0x436294===_0x5d2a68)break;else _0x4108e1['push'](_0x4108e1['shift']());}catch(_0x30b128){_0x4108e1['push'](_0x4108e1['shift']());}}}(a39_0x243e,0xd9e69));import{BaseCommand}from'./command.js';function a39_0x1b79(_0x222979,_0xa318e7){_0x222979=_0x222979-0xd3;const _0x243e43=a39_0x243e();let _0x1b791f=_0x243e43[_0x222979];return _0x1b791f;}import{getSessionID,cleanExpiredSessions,clearSessionContextField}from'../core/session.js';import{clearDefaultSiteFromUserConfig,clearActiveProfileFromUserConfig}from'../core/profile.js';import{getConfigDir}from'../core/config.js';import a39_0x358aae from'chalk';import*as a39_0x4ae59b from'node:path';function a39_0x243e(){const _0x1f0aeb=['\x0aRun\x20\x27tdx\x20unset\x20--help\x27\x20for\x20more\x20options','9mZedSp','tdx.json','length','error','6zHfXfk','parent_segment','Clear\x20session-level\x20or\x20default\x20context\x20values','1180960WpvDaR','database','includes','3139156PmvRpi','cleared','12pWVMeV','Default\x20site\x20','green','.\x20Must\x20be\x20one\x20of:\x20','899150cRbsgj','Session\x20','--default\x20can\x20only\x20be\x20used\x20with\x20\x27site\x27\x20or\x20\x27profile\x27.\x20Other\x20resources\x20are\x20session-level\x20only.','log','engage_workspace','dim','\x0aUpdated:\x20','21JtGvee','site','1677736OSzyLz','Default\x20profile\x20','Usage:\x20tdx\x20unset\x20<resource>\x0a','agent','2vYKtKF','\x20\x20\x20\x20\x20\x20\x20tdx\x20unset\x20--default\x20<resource>\x20\x20#\x20Clear\x20default\x20from\x20config\x0a','10664316SMcncz','llm_project','profile','description','validate','llm_agent','default','1689951UkqzXt','54715958WBVxJR'];a39_0x243e=function(){return _0x1f0aeb;};return a39_0x243e();}export class UnsetCommand extends BaseCommand{['name']='unset';[a39_0x3b6377(0xef)]=a39_0x3b6377(0xd3);[a39_0x3b6377(0xf0)](_0x2bf718){const _0x3d2402=a39_0x3b6377,{args:_0x42c3ce,options:_0x2c0d58}=_0x2bf718,_0x4c9378=_0x2c0d58[_0x3d2402(0xf2)];if(_0x42c3ce[_0x3d2402(0xf8)]===0x0)return _0x3d2402(0xe8)+_0x3d2402(0xeb)+'\x0aResources:\x20site,\x20database,\x20parent_segment,\x20llm_project,\x20agent,\x20profile,\x20engage_workspace\x0a'+_0x3d2402(0xf5);const _0x5b054a=_0x42c3ce[0x0],_0x51a824=[_0x3d2402(0xe5),_0x3d2402(0xd5),_0x3d2402(0xfb),_0x3d2402(0xed),_0x3d2402(0xe9),_0x3d2402(0xee),_0x3d2402(0xe1)];if(!_0x51a824[_0x3d2402(0xd6)](_0x5b054a))return'Invalid\x20resource:\x20'+_0x5b054a+_0x3d2402(0xdc)+_0x51a824['join'](',\x20');if(_0x4c9378&&_0x5b054a!==_0x3d2402(0xe5)&&_0x5b054a!==_0x3d2402(0xee))return _0x3d2402(0xdf);return undefined;}async['execute'](_0xbd1a52){const _0x547a01=a39_0x3b6377,{args:_0x5d9ab0,options:_0x2ead0e}=_0xbd1a52,_0x4761c2=_0x2ead0e[_0x547a01(0xf2)];cleanExpiredSessions();try{const _0x5f0df2=_0x5d9ab0[0x0],_0x4bc366=a39_0x4ae59b['join'](getConfigDir(),_0x547a01(0xf7));if(_0x4761c2){if(_0x5f0df2===_0x547a01(0xe5))return clearDefaultSiteFromUserConfig(),console[_0x547a01(0xe0)](_0x547a01(0xda)+a39_0x358aae[_0x547a01(0xdb)](_0x547a01(0xd8))),console['log'](a39_0x358aae['dim'](_0x547a01(0xe3)+_0x4bc366)),0x0;if(_0x5f0df2===_0x547a01(0xee))return clearActiveProfileFromUserConfig(),console[_0x547a01(0xe0)](_0x547a01(0xe7)+a39_0x358aae[_0x547a01(0xdb)](_0x547a01(0xd8))),console[_0x547a01(0xe0)](a39_0x358aae[_0x547a01(0xe2)]('\x0aUpdated:\x20'+_0x4bc366)),0x0;}const _0x2648f7=getSessionID(_0x2ead0e['session']),_0x5c6fdb={'site':_0x547a01(0xe5),'database':'database','parent_segment':_0x547a01(0xfb),'llm_project':'llm_project','agent':_0x547a01(0xf1),'profile':_0x547a01(0xee),'engage_workspace':_0x547a01(0xe1)},_0x33e8ae=_0x5c6fdb[_0x5f0df2];return _0x33e8ae&&(clearSessionContextField(_0x33e8ae,_0x2ead0e['session']),console[_0x547a01(0xe0)](_0x547a01(0xde)+_0x5f0df2+'\x20'+a39_0x358aae['green']('cleared')+'\x20'+a39_0x358aae[_0x547a01(0xe2)]('(session:\x20'+_0x2648f7+')'))),0x0;}catch(_0x43ab68){return _0x43ab68 instanceof Error&&console[_0x547a01(0xf9)]('Error:\x20'+_0x43ab68['message']),0x1;}}}
@@ -1 +1 @@
1
- const a40_0x47295b=a40_0x3297;(function(_0x520165,_0x4db6d9){const _0x230e95=a40_0x3297,_0xa26785=_0x520165();while(!![]){try{const _0x10ea0d=-parseInt(_0x230e95(0x213))/0x1+parseInt(_0x230e95(0x220))/0x2+-parseInt(_0x230e95(0x218))/0x3+parseInt(_0x230e95(0x227))/0x4*(parseInt(_0x230e95(0x1fb))/0x5)+parseInt(_0x230e95(0x217))/0x6*(-parseInt(_0x230e95(0x20a))/0x7)+parseInt(_0x230e95(0x206))/0x8+-parseInt(_0x230e95(0x219))/0x9;if(_0x10ea0d===_0x4db6d9)break;else _0xa26785['push'](_0xa26785['shift']());}catch(_0xf2bcfb){_0xa26785['push'](_0xa26785['shift']());}}}(a40_0x3c7d,0x931bb));import{BaseCommand}from'./command.js';import{saveSessionContext,getSessionID,cleanExpiredSessions,clearSessionContext}from'../core/session.js';import{profileExists,saveActiveProfileToUserConfig,saveDefaultSiteToUserConfig}from'../core/profile.js';function a40_0x3297(_0xd004bd,_0xd6b2cd){_0xd004bd=_0xd004bd-0x1ec;const _0x3c7d13=a40_0x3c7d();let _0x3297d2=_0x3c7d13[_0xd004bd];return _0x3297d2;}import{GlobalContext}from'../core/global-context.js';import{parseAgentRef}from'../sdk/agent/agent-ref-parser.js';import{getConfigDir}from'../core/config.js';import a40_0x4fe7a9 from'chalk';import*as a40_0x31fa68 from'node:path';export class UseCommand extends BaseCommand{[a40_0x47295b(0x1ee)]=a40_0x47295b(0x202);[a40_0x47295b(0x21e)]=a40_0x47295b(0x223);[a40_0x47295b(0x200)](_0x47c5c7){const _0xb05851=a40_0x47295b,{args:_0x37affa,options:_0x2ac8d3}=_0x47c5c7,_0x55cb19=_0x2ac8d3['default'];if(_0x37affa[_0xb05851(0x1fc)]===0x0)return undefined;if(_0x37affa[_0xb05851(0x1fc)]===0x1)return _0xb05851(0x1ff)+_0xb05851(0x207)+_0xb05851(0x1f9)+'\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20--default\x20site\x20<value>\x20\x20\x20\x20\x20#\x20Save\x20default\x20site\x20to\x20config\x0a'+_0xb05851(0x209)+_0xb05851(0x20d)+_0xb05851(0x20c);const _0x505ba5=_0x37affa[0x0],_0x3c6165=[_0xb05851(0x22a),_0xb05851(0x1f2),'parent_segment',_0xb05851(0x1f6),_0xb05851(0x22b),'profile','engage_workspace'];if(!_0x3c6165[_0xb05851(0x216)](_0x505ba5))return'Invalid\x20resource:\x20'+_0x505ba5+_0xb05851(0x225)+_0x3c6165[_0xb05851(0x20b)](',\x20');if(_0x55cb19&&_0x505ba5!==_0xb05851(0x22a)&&_0x505ba5!=='profile')return _0xb05851(0x211);return undefined;}async[a40_0x47295b(0x1f0)](_0x38c08f){const _0x5e0c7b=a40_0x47295b,{args:_0x4b87a1,options:_0x477dcf}=_0x38c08f,_0x4be2fe=_0x477dcf[_0x5e0c7b(0x21f)],_0x43e87d=_0x477dcf['clear'],_0x2dc174=_0x477dcf[_0x5e0c7b(0x1f1)];cleanExpiredSessions();try{if(_0x43e87d){clearSessionContext(_0x477dcf[_0x5e0c7b(0x1f8)]);const _0x3d78aa=getSessionID(_0x477dcf['session']);return console[_0x5e0c7b(0x226)]('Session\x20context\x20'+a40_0x4fe7a9[_0x5e0c7b(0x1f4)]('cleared')+'\x20'+a40_0x4fe7a9[_0x5e0c7b(0x208)](_0x5e0c7b(0x1fd)+_0x3d78aa+')')),0x0;}if(_0x4b87a1[_0x5e0c7b(0x1fc)]===0x0){const _0x4c6520=new GlobalContext(_0x477dcf);return _0x4be2fe?_0x4c6520[_0x5e0c7b(0x229)]():_0x4c6520[_0x5e0c7b(0x201)](),console[_0x5e0c7b(0x226)](a40_0x4fe7a9[_0x5e0c7b(0x208)](_0x5e0c7b(0x222))),console[_0x5e0c7b(0x226)](a40_0x4fe7a9[_0x5e0c7b(0x208)](_0x5e0c7b(0x204))),console[_0x5e0c7b(0x226)](a40_0x4fe7a9[_0x5e0c7b(0x208)]('Use\x20--default\x20with\x20site\x20or\x20profile\x20to\x20save\x20permanently')),0x0;}const _0x26d3d9=_0x4b87a1[0x0],_0x5dd296=_0x4b87a1[0x1],_0x4f1f08=a40_0x31fa68[_0x5e0c7b(0x20b)](getConfigDir(),_0x5e0c7b(0x221));if(_0x2dc174){if(_0x26d3d9===_0x5e0c7b(0x22a))return saveDefaultSiteToUserConfig(_0x5dd296),console['log'](_0x5e0c7b(0x224)+a40_0x4fe7a9[_0x5e0c7b(0x1f4)](_0x5dd296)),console[_0x5e0c7b(0x226)](a40_0x4fe7a9[_0x5e0c7b(0x208)](_0x5e0c7b(0x210)+_0x4f1f08)),0x0;if(_0x26d3d9===_0x5e0c7b(0x22c)){if(!profileExists(_0x5dd296))return console[_0x5e0c7b(0x203)](_0x5e0c7b(0x1ed)+_0x5dd296+_0x5e0c7b(0x21a)),console['error'](_0x5e0c7b(0x21b)),0x1;return saveActiveProfileToUserConfig(_0x5dd296),console[_0x5e0c7b(0x226)](_0x5e0c7b(0x1f3)+a40_0x4fe7a9['green'](_0x5dd296)),console['log'](a40_0x4fe7a9[_0x5e0c7b(0x208)](_0x5e0c7b(0x210)+_0x4f1f08)),0x0;}}if(_0x26d3d9==='site'){const _0x33ba25=getSessionID(_0x477dcf['session']);return saveSessionContext({'site':_0x5dd296},_0x477dcf[_0x5e0c7b(0x1f8)]),console[_0x5e0c7b(0x226)](_0x5e0c7b(0x1ec)+a40_0x4fe7a9[_0x5e0c7b(0x1f4)](_0x5dd296)+'\x20'+a40_0x4fe7a9[_0x5e0c7b(0x208)](_0x5e0c7b(0x1fd)+_0x33ba25+')')),console[_0x5e0c7b(0x226)](a40_0x4fe7a9[_0x5e0c7b(0x208)](_0x5e0c7b(0x212)+_0x5dd296+_0x5e0c7b(0x228))),0x0;}if(_0x26d3d9==='profile'){if(!profileExists(_0x5dd296))return console[_0x5e0c7b(0x203)](_0x5e0c7b(0x1ed)+_0x5dd296+'\x27\x20does\x20not\x20exist'),console[_0x5e0c7b(0x203)](_0x5e0c7b(0x21b)),0x1;const _0x388335=getSessionID(_0x477dcf['session']);return saveSessionContext({'profile':_0x5dd296},_0x477dcf[_0x5e0c7b(0x1f8)]),console[_0x5e0c7b(0x226)](_0x5e0c7b(0x1fe)+a40_0x4fe7a9[_0x5e0c7b(0x1f4)](_0x5dd296)+'\x20'+a40_0x4fe7a9['dim']('(session:\x20'+_0x388335+')')),console[_0x5e0c7b(0x226)](a40_0x4fe7a9[_0x5e0c7b(0x208)](_0x5e0c7b(0x1ef)+_0x5dd296+_0x5e0c7b(0x228))),0x0;}const _0x72815f={},_0xdca373=getSessionID(_0x477dcf[_0x5e0c7b(0x1f8)]);switch(_0x26d3d9){case _0x5e0c7b(0x1f2):_0x72815f[_0x5e0c7b(0x1f2)]=_0x5dd296,console[_0x5e0c7b(0x226)](_0x5e0c7b(0x214)+a40_0x4fe7a9[_0x5e0c7b(0x1f4)](_0x5dd296)+'\x20'+a40_0x4fe7a9[_0x5e0c7b(0x208)](_0x5e0c7b(0x1fd)+_0xdca373+')'));break;case _0x5e0c7b(0x205):_0x72815f['parent_segment']=_0x5dd296,console['log'](_0x5e0c7b(0x21d)+a40_0x4fe7a9[_0x5e0c7b(0x1f4)](_0x5dd296)+'\x20'+a40_0x4fe7a9[_0x5e0c7b(0x208)]('(session:\x20'+_0xdca373+')'));break;case _0x5e0c7b(0x1f6):_0x72815f['llm_project']=_0x5dd296,console['log'](_0x5e0c7b(0x1f7)+a40_0x4fe7a9[_0x5e0c7b(0x1f4)](_0x5dd296)+'\x20'+a40_0x4fe7a9[_0x5e0c7b(0x208)](_0x5e0c7b(0x1fd)+_0xdca373+')'));break;case _0x5e0c7b(0x22b):{const {projectName:_0x9619ab,agentName:_0x4d7b1f}=parseAgentRef(_0x5dd296);_0x4d7b1f?(_0x72815f[_0x5e0c7b(0x1f6)]=_0x9619ab,_0x72815f['llm_agent']=_0x4d7b1f,console['log'](_0x5e0c7b(0x1f7)+a40_0x4fe7a9['green'](_0x9619ab)+'\x20'+a40_0x4fe7a9[_0x5e0c7b(0x208)](_0x5e0c7b(0x1fd)+_0xdca373+')')),console[_0x5e0c7b(0x226)]('Session\x20agent\x20set\x20to:\x20'+a40_0x4fe7a9[_0x5e0c7b(0x1f4)](_0x4d7b1f)+'\x20'+a40_0x4fe7a9['dim'](_0x5e0c7b(0x1fd)+_0xdca373+')'))):(_0x72815f['llm_agent']=_0x5dd296,console['log'](_0x5e0c7b(0x1fa)+a40_0x4fe7a9[_0x5e0c7b(0x1f4)](_0x5dd296)+'\x20'+a40_0x4fe7a9[_0x5e0c7b(0x208)](_0x5e0c7b(0x1fd)+_0xdca373+')')));break;}case _0x5e0c7b(0x20f):_0x72815f[_0x5e0c7b(0x20f)]=_0x5dd296,console[_0x5e0c7b(0x226)](_0x5e0c7b(0x20e)+a40_0x4fe7a9[_0x5e0c7b(0x1f4)](_0x5dd296)+'\x20'+a40_0x4fe7a9[_0x5e0c7b(0x208)](_0x5e0c7b(0x1fd)+_0xdca373+')'));break;}return saveSessionContext(_0x72815f,_0x477dcf[_0x5e0c7b(0x1f8)]),console['log'](a40_0x4fe7a9[_0x5e0c7b(0x208)](_0x5e0c7b(0x1f5))),0x0;}catch(_0x5ccbd9){return _0x5ccbd9 instanceof Error&&console['error'](_0x5e0c7b(0x21c)+_0x5ccbd9[_0x5e0c7b(0x215)]),0x1;}}}function a40_0x3c7d(){const _0x560410=['site','agent','profile','Session\x20site\x20set\x20to:\x20','Error:\x20Profile\x20\x27','name','\x0aTip:\x20Use\x20\x27tdx\x20use\x20--default\x20profile\x20','execute','default','database','Default\x20profile\x20set\x20to:\x20','green','\x0aTip:\x20Use\x20\x27tdx\x20use\x20--clear\x27\x20to\x20clear\x20session\x20overrides','llm_project','Session\x20llm_project\x20set\x20to:\x20','session','\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20--clear\x20\x20\x20\x20\x20\x20#\x20Clear\x20session\x20context\x0a','Session\x20agent\x20set\x20to:\x20','75pyqdEE','length','(session:\x20','Session\x20profile\x20set\x20to:\x20','Usage:\x20tdx\x20use\x20<resource>\x20<value>\x0a','validate','display','use','error','Resources:\x20site,\x20database,\x20parent_segment,\x20llm_project,\x20agent,\x20profile,\x20engage_workspace','parent_segment','5799168CeWgvI','\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20current\x20context\x0a','dim','\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20--default\x20profile\x20<value>\x20\x20#\x20Save\x20default\x20profile\x20to\x20config\x0a','183204IhlDOQ','join','\x0aRun\x20\x27tdx\x20use\x20--help\x27\x20for\x20more\x20options','\x0aResources:\x20site,\x20database,\x20parent_segment,\x20llm_project,\x20agent,\x20profile,\x20engage_workspace\x0a','Session\x20engage_workspace\x20set\x20to:\x20','engage_workspace','\x0aSaved\x20to:\x20','--default\x20can\x20only\x20be\x20used\x20with\x20\x27site\x27\x20or\x20\x27profile\x27.\x20Other\x20resources\x20are\x20session-level\x20only.','\x0aTip:\x20Use\x20\x27tdx\x20use\x20--default\x20site\x20','680672zZyYPH','Session\x20database\x20set\x20to:\x20','message','includes','84fsQZfU','567666NYgguk','3352455kHIcQw','\x27\x20does\x20not\x20exist','\x0aUse\x20\x27tdx\x20profiles\x27\x20to\x20see\x20available\x20profiles','Error:\x20','Session\x20parent_segment\x20set\x20to:\x20','description','debug','2307812rjXodc','tdx.json','\x0aSet\x20context:\x20tdx\x20use\x20<resource>\x20<value>','Set\x20session-level\x20context','Default\x20site\x20set\x20to:\x20','.\x20Must\x20be\x20one\x20of:\x20','log','88680TvmGCZ','\x27\x20to\x20save\x20permanently','displayWithSources'];a40_0x3c7d=function(){return _0x560410;};return a40_0x3c7d();}
1
+ const a40_0x1100c0=a40_0x48a5;(function(_0x97d17c,_0x48f076){const _0x4286da=a40_0x48a5,_0x55b6c1=_0x97d17c();while(!![]){try{const _0x56b606=parseInt(_0x4286da(0x10e))/0x1*(-parseInt(_0x4286da(0xce))/0x2)+parseInt(_0x4286da(0xf7))/0x3*(parseInt(_0x4286da(0xfa))/0x4)+-parseInt(_0x4286da(0xfc))/0x5*(-parseInt(_0x4286da(0xf6))/0x6)+-parseInt(_0x4286da(0xf8))/0x7*(-parseInt(_0x4286da(0xf4))/0x8)+-parseInt(_0x4286da(0x10b))/0x9*(-parseInt(_0x4286da(0xd1))/0xa)+parseInt(_0x4286da(0x10f))/0xb+-parseInt(_0x4286da(0xd6))/0xc;if(_0x56b606===_0x48f076)break;else _0x55b6c1['push'](_0x55b6c1['shift']());}catch(_0x452d5d){_0x55b6c1['push'](_0x55b6c1['shift']());}}}(a40_0x4658,0x25ffd));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';function a40_0x48a5(_0xaf5e4f,_0x338ce3){_0xaf5e4f=_0xaf5e4f-0xce;const _0x465826=a40_0x4658();let _0x48a53a=_0x465826[_0xaf5e4f];return _0x48a53a;}import{getConfigDir}from'../core/config.js';function a40_0x4658(){const _0x123238=['display','llm_agent','\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20--default\x20site\x20<value>\x20\x20\x20\x20\x20#\x20Save\x20default\x20site\x20to\x20config\x0a','tdx.json','description','Error:\x20','execute','site','Error:\x20Profile\x20\x27','join','Session\x20site\x20set\x20to:\x20','\x0aSet\x20context:\x20tdx\x20use\x20<resource>\x20<value>','Session\x20parent_segment\x20set\x20to:\x20','16wvFkIC','engage_workspace','18sNowvw','6nnWgLx','1018843DFgMPk','\x0aResources:\x20site,\x20database,\x20parent_segment,\x20llm_project,\x20agent,\x20profile,\x20engage_workspace\x0a','127496IroOVX','\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','4835kLsuNq','session','--default\x20can\x20only\x20be\x20used\x20with\x20\x27site\x27\x20or\x20\x27profile\x27.\x20Other\x20resources\x20are\x20session-level\x20only.','llm_project','validate','length','includes','green','error','cleared','profile','\x27\x20to\x20save\x20permanently','displayWithSources','agent','message','9vbAALk','Session\x20llm_project\x20set\x20to:\x20','Set\x20session-level\x20context','386jBhsqQ','157080udPCBr','90DGyfAg','debug','Session\x20database\x20set\x20to:\x20','1785130NLhMXB','\x27\x20does\x20not\x20exist','Session\x20profile\x20set\x20to:\x20','\x0aTip:\x20Use\x20\x27tdx\x20use\x20--clear\x27\x20to\x20clear\x20session\x20overrides','database','4530300WEueFi','\x0aUse\x20\x27tdx\x20profiles\x27\x20to\x20see\x20available\x20profiles','default','dim','log','.\x20Must\x20be\x20one\x20of:\x20','Session\x20engage_workspace\x20set\x20to:\x20','\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20--default\x20profile\x20<value>\x20\x20#\x20Save\x20default\x20profile\x20to\x20config\x0a','Invalid\x20resource:\x20','clear','Default\x20site\x20set\x20to:\x20','Session\x20agent\x20set\x20to:\x20','\x0aTip:\x20Use\x20\x27tdx\x20use\x20--default\x20profile\x20','use','Usage:\x20tdx\x20use\x20<resource>\x20<value>\x0a','\x0aSaved\x20to:\x20','(session:\x20'];a40_0x4658=function(){return _0x123238;};return a40_0x4658();}import a40_0x1496c2 from'chalk';import*as a40_0x996582 from'node:path';export class UseCommand extends BaseCommand{['name']=a40_0x1100c0(0xe3);[a40_0x1100c0(0xeb)]=a40_0x1100c0(0x10d);[a40_0x1100c0(0x100)](_0x5e6a1d){const _0x323e2f=a40_0x1100c0,{args:_0x521f5e,options:_0x32ce60}=_0x5e6a1d,_0x5a7a5f=_0x32ce60['default'];if(_0x521f5e[_0x323e2f(0x101)]===0x0)return undefined;if(_0x521f5e[_0x323e2f(0x101)]===0x1)return _0x323e2f(0xe4)+_0x323e2f(0xfb)+'\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20--clear\x20\x20\x20\x20\x20\x20#\x20Clear\x20session\x20context\x0a'+_0x323e2f(0xe9)+_0x323e2f(0xdd)+_0x323e2f(0xf9)+'\x0aRun\x20\x27tdx\x20use\x20--help\x27\x20for\x20more\x20options';const _0x262e7f=_0x521f5e[0x0],_0x2b50b8=[_0x323e2f(0xee),_0x323e2f(0xd5),'parent_segment',_0x323e2f(0xff),_0x323e2f(0x109),_0x323e2f(0x106),_0x323e2f(0xf5)];if(!_0x2b50b8[_0x323e2f(0x102)](_0x262e7f))return _0x323e2f(0xde)+_0x262e7f+_0x323e2f(0xdb)+_0x2b50b8[_0x323e2f(0xf0)](',\x20');if(_0x5a7a5f&&_0x262e7f!==_0x323e2f(0xee)&&_0x262e7f!=='profile')return _0x323e2f(0xfe);return undefined;}async[a40_0x1100c0(0xed)](_0x4f8190){const _0x391194=a40_0x1100c0,{args:_0x4c3a25,options:_0x319a6d}=_0x4f8190,_0x5124de=_0x319a6d[_0x391194(0xcf)],_0x50288f=_0x319a6d[_0x391194(0xdf)],_0x1c0446=_0x319a6d[_0x391194(0xd8)];cleanExpiredSessions();try{if(_0x50288f){clearSessionContext(_0x319a6d['session']);const _0x27d238=getSessionID(_0x319a6d['session']);return console[_0x391194(0xda)]('Session\x20context\x20'+a40_0x1496c2[_0x391194(0x103)](_0x391194(0x105))+'\x20'+a40_0x1496c2[_0x391194(0xd9)](_0x391194(0xe6)+_0x27d238+')')),0x0;}if(_0x4c3a25[_0x391194(0x101)]===0x0){const _0x41e5d7=new GlobalContext(_0x319a6d);return _0x5124de?_0x41e5d7[_0x391194(0x108)]():_0x41e5d7[_0x391194(0xe7)](),console['log'](a40_0x1496c2[_0x391194(0xd9)](_0x391194(0xf2))),console[_0x391194(0xda)](a40_0x1496c2[_0x391194(0xd9)]('Resources:\x20site,\x20database,\x20parent_segment,\x20llm_project,\x20agent,\x20profile,\x20engage_workspace')),console[_0x391194(0xda)](a40_0x1496c2[_0x391194(0xd9)]('Use\x20--default\x20with\x20site\x20or\x20profile\x20to\x20save\x20permanently')),0x0;}const _0x45bb57=_0x4c3a25[0x0],_0x1ff88c=_0x4c3a25[0x1],_0x2be851=a40_0x996582['join'](getConfigDir(),_0x391194(0xea));if(_0x1c0446){if(_0x45bb57===_0x391194(0xee))return saveDefaultSiteToUserConfig(_0x1ff88c),console[_0x391194(0xda)](_0x391194(0xe0)+a40_0x1496c2[_0x391194(0x103)](_0x1ff88c)),console['log'](a40_0x1496c2[_0x391194(0xd9)](_0x391194(0xe5)+_0x2be851)),0x0;if(_0x45bb57==='profile'){if(!profileExists(_0x1ff88c))return console[_0x391194(0x104)](_0x391194(0xef)+_0x1ff88c+_0x391194(0xd2)),console['error'](_0x391194(0xd7)),0x1;return saveActiveProfileToUserConfig(_0x1ff88c),console[_0x391194(0xda)]('Default\x20profile\x20set\x20to:\x20'+a40_0x1496c2[_0x391194(0x103)](_0x1ff88c)),console[_0x391194(0xda)](a40_0x1496c2['dim'](_0x391194(0xe5)+_0x2be851)),0x0;}}if(_0x45bb57==='site'){const _0x3b0970=getSessionID(_0x319a6d[_0x391194(0xfd)]);return saveSessionContext({'site':_0x1ff88c},_0x319a6d['session']),console[_0x391194(0xda)](_0x391194(0xf1)+a40_0x1496c2[_0x391194(0x103)](_0x1ff88c)+'\x20'+a40_0x1496c2[_0x391194(0xd9)](_0x391194(0xe6)+_0x3b0970+')')),console[_0x391194(0xda)](a40_0x1496c2['dim']('\x0aTip:\x20Use\x20\x27tdx\x20use\x20--default\x20site\x20'+_0x1ff88c+_0x391194(0x107))),0x0;}if(_0x45bb57===_0x391194(0x106)){if(!profileExists(_0x1ff88c))return console['error'](_0x391194(0xef)+_0x1ff88c+_0x391194(0xd2)),console[_0x391194(0x104)](_0x391194(0xd7)),0x1;const _0x159ad0=getSessionID(_0x319a6d['session']);return saveSessionContext({'profile':_0x1ff88c},_0x319a6d[_0x391194(0xfd)]),console[_0x391194(0xda)](_0x391194(0xd3)+a40_0x1496c2[_0x391194(0x103)](_0x1ff88c)+'\x20'+a40_0x1496c2[_0x391194(0xd9)](_0x391194(0xe6)+_0x159ad0+')')),console[_0x391194(0xda)](a40_0x1496c2['dim'](_0x391194(0xe2)+_0x1ff88c+_0x391194(0x107))),0x0;}const _0x3cb5fd={},_0x1cba76=getSessionID(_0x319a6d[_0x391194(0xfd)]);switch(_0x45bb57){case'database':_0x3cb5fd['database']=_0x1ff88c,console['log'](_0x391194(0xd0)+a40_0x1496c2[_0x391194(0x103)](_0x1ff88c)+'\x20'+a40_0x1496c2[_0x391194(0xd9)](_0x391194(0xe6)+_0x1cba76+')'));break;case'parent_segment':_0x3cb5fd['parent_segment']=_0x1ff88c,console[_0x391194(0xda)](_0x391194(0xf3)+a40_0x1496c2[_0x391194(0x103)](_0x1ff88c)+'\x20'+a40_0x1496c2[_0x391194(0xd9)]('(session:\x20'+_0x1cba76+')'));break;case'llm_project':_0x3cb5fd[_0x391194(0xff)]=_0x1ff88c,console['log']('Session\x20llm_project\x20set\x20to:\x20'+a40_0x1496c2[_0x391194(0x103)](_0x1ff88c)+'\x20'+a40_0x1496c2['dim']('(session:\x20'+_0x1cba76+')'));break;case _0x391194(0x109):{const {projectName:_0x5e86e1,agentName:_0x2b476f}=parseAgentRef(_0x1ff88c);_0x2b476f?(_0x3cb5fd[_0x391194(0xff)]=_0x5e86e1,_0x3cb5fd[_0x391194(0xe8)]=_0x2b476f,console[_0x391194(0xda)](_0x391194(0x10c)+a40_0x1496c2['green'](_0x5e86e1)+'\x20'+a40_0x1496c2[_0x391194(0xd9)](_0x391194(0xe6)+_0x1cba76+')')),console[_0x391194(0xda)](_0x391194(0xe1)+a40_0x1496c2[_0x391194(0x103)](_0x2b476f)+'\x20'+a40_0x1496c2[_0x391194(0xd9)](_0x391194(0xe6)+_0x1cba76+')'))):(_0x3cb5fd[_0x391194(0xe8)]=_0x1ff88c,console['log']('Session\x20agent\x20set\x20to:\x20'+a40_0x1496c2['green'](_0x1ff88c)+'\x20'+a40_0x1496c2[_0x391194(0xd9)]('(session:\x20'+_0x1cba76+')')));break;}case _0x391194(0xf5):_0x3cb5fd[_0x391194(0xf5)]=_0x1ff88c,console[_0x391194(0xda)](_0x391194(0xdc)+a40_0x1496c2[_0x391194(0x103)](_0x1ff88c)+'\x20'+a40_0x1496c2[_0x391194(0xd9)](_0x391194(0xe6)+_0x1cba76+')'));break;}return saveSessionContext(_0x3cb5fd,_0x319a6d['session']),console[_0x391194(0xda)](a40_0x1496c2[_0x391194(0xd9)](_0x391194(0xd4))),0x0;}catch(_0x4924df){return _0x4924df instanceof Error&&console[_0x391194(0x104)](_0x391194(0xec)+_0x4924df[_0x391194(0x10a)]),0x1;}}}
@@ -1 +1 @@
1
- const a41_0x313422=a41_0x22e0;(function(_0xe3fbd1,_0x239054){const _0x28766a=a41_0x22e0,_0x476baf=_0xe3fbd1();while(!![]){try{const _0x4d0ca3=parseInt(_0x28766a(0x19c))/0x1+-parseInt(_0x28766a(0x197))/0x2*(-parseInt(_0x28766a(0x196))/0x3)+parseInt(_0x28766a(0x1a9))/0x4*(parseInt(_0x28766a(0x19a))/0x5)+parseInt(_0x28766a(0x1ad))/0x6+parseInt(_0x28766a(0x1aa))/0x7*(parseInt(_0x28766a(0x1ae))/0x8)+parseInt(_0x28766a(0x1a4))/0x9+-parseInt(_0x28766a(0x1ab))/0xa;if(_0x4d0ca3===_0x239054)break;else _0x476baf['push'](_0x476baf['shift']());}catch(_0x1267e3){_0x476baf['push'](_0x476baf['shift']());}}}(a41_0x1e1d,0x574d1));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';function a41_0x22e0(_0x5dd0ce,_0x4a19fe){_0x5dd0ce=_0x5dd0ce-0x196;const _0x1e1dc3=a41_0x1e1d();let _0x22e054=_0x1e1dc3[_0x5dd0ce];return _0x22e054;}import{handleSDKOutput,handleSingleObjectOutput}from'../core/command-output.js';import{withSpinner}from'../utils/spinner.js';export class UserCommand extends BaseCommand{[a41_0x313422(0x19f)]=a41_0x313422(0x1a6);[a41_0x313422(0x1a1)]=a41_0x313422(0x19d);async[a41_0x313422(0x19e)](_0x5f471b){const _0x20b65c=a41_0x313422,{options:_0x1f1c7e,tdx:_0x415bb0}=_0x5f471b;try{const _0x146630=await withSpinner('Fetching\x20user\x20info...',()=>_0x415bb0[_0x20b65c(0x1a6)]['getCurrent'](),{'verbose':_0x1f1c7e[_0x20b65c(0x1af)]}),_0x37cc00=_0x146630[_0x20b65c(0x1a0)];return await handleSingleObjectOutput(_0x37cc00,_0x1f1c7e),0x0;}catch(_0x3a739b){if(_0x3a739b instanceof SDKError)return console[_0x20b65c(0x1a7)](_0x20b65c(0x1b0)+_0x3a739b[_0x20b65c(0x198)]),_0x3a739b[_0x20b65c(0x1b2)]&&console[_0x20b65c(0x1a7)]('\x20\x20Cause:\x20'+_0x3a739b['cause']),0x1;throw _0x3a739b;}}}function a41_0x1e1d(){const _0x5c8ade=['\x20user','3600504cInLyr','list','user','error','List\x20all\x20users\x20in\x20the\x20account','8eGYGFu','39683uKktAP','18639270jHyfEV','✔\x20Found\x20','3070866kZZoRw','536EFKFpA','verbose','Error:\x20','user\x20list','cause','3153PNaPmz','6AzrCVV','message','Listing\x20users...','1030270AhrsGG','\x20\x20Cause:\x20','514561yyfnlB','Show\x20current\x20user\x20information','execute','name','data','description','length'];a41_0x1e1d=function(){return _0x5c8ade;};return a41_0x1e1d();}export class UserListCommand extends BaseCommand{[a41_0x313422(0x19f)]=a41_0x313422(0x1b1);[a41_0x313422(0x1a1)]=a41_0x313422(0x1a8);async[a41_0x313422(0x19e)](_0x4fc546){const _0x36a3eb=a41_0x313422,{options:_0x4ee714,tdx:_0x21eff3}=_0x4fc546;try{const _0x431ec8=await withSpinner(_0x36a3eb(0x199),()=>_0x21eff3[_0x36a3eb(0x1a6)][_0x36a3eb(0x1a5)](),{'verbose':_0x4ee714[_0x36a3eb(0x1af)]}),_0x56ffd8=_0x431ec8[_0x36a3eb(0x1a0)];return console[_0x36a3eb(0x1a7)](_0x36a3eb(0x1ac)+_0x56ffd8['length']+_0x36a3eb(0x1a3)+(_0x56ffd8[_0x36a3eb(0x1a2)]!==0x1?'s':'')),await handleSDKOutput(_0x56ffd8,_0x4ee714),0x0;}catch(_0x53767b){if(_0x53767b instanceof SDKError)return console['error'](_0x36a3eb(0x1b0)+_0x53767b[_0x36a3eb(0x198)]),_0x53767b[_0x36a3eb(0x1b2)]&&console[_0x36a3eb(0x1a7)](_0x36a3eb(0x19b)+_0x53767b[_0x36a3eb(0x1b2)]),0x1;throw _0x53767b;}}}
1
+ const a41_0x40c26b=a41_0xc1ef;(function(_0x20baa8,_0x37d93e){const _0x1a469b=a41_0xc1ef,_0x44ef2a=_0x20baa8();while(!![]){try{const _0x29a347=parseInt(_0x1a469b(0x1fc))/0x1*(-parseInt(_0x1a469b(0x1ea))/0x2)+-parseInt(_0x1a469b(0x1f7))/0x3+-parseInt(_0x1a469b(0x1fb))/0x4*(parseInt(_0x1a469b(0x1fa))/0x5)+parseInt(_0x1a469b(0x1ed))/0x6+parseInt(_0x1a469b(0x1eb))/0x7*(-parseInt(_0x1a469b(0x1f9))/0x8)+-parseInt(_0x1a469b(0x1f2))/0x9*(parseInt(_0x1a469b(0x1ec))/0xa)+parseInt(_0x1a469b(0x1f8))/0xb;if(_0x29a347===_0x37d93e)break;else _0x44ef2a['push'](_0x44ef2a['shift']());}catch(_0x1a0365){_0x44ef2a['push'](_0x44ef2a['shift']());}}}(a41_0x3ae6,0xaeb48));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleSDKOutput,handleSingleObjectOutput}from'../core/command-output.js';import{withSpinner}from'../utils/spinner.js';function a41_0x3ae6(){const _0x6f4774=['name','error','9zPfJKW','\x20user','execute','length','List\x20all\x20users\x20in\x20the\x20account','2758575qBAAls','33923549BoAtnm','43192KczhqC','5ezGGce','646552WxyGqZ','1387877NwhQdO','Error:\x20','cause','user','✔\x20Found\x20','verbose','Fetching\x20user\x20info...','\x20\x20Cause:\x20','message','2orasrL','238ksSxYm','357940RSrzSO','1920198yAWcrz','data','Show\x20current\x20user\x20information'];a41_0x3ae6=function(){return _0x6f4774;};return a41_0x3ae6();}export class UserCommand extends BaseCommand{[a41_0x40c26b(0x1f0)]=a41_0x40c26b(0x1ff);['description']=a41_0x40c26b(0x1ef);async[a41_0x40c26b(0x1f4)](_0x5c2311){const _0x5943d6=a41_0x40c26b,{options:_0x146f6d,tdx:_0x12b335}=_0x5c2311;try{const _0x2d2f32=await withSpinner(_0x5943d6(0x1e7),()=>_0x12b335['user']['getCurrent'](),{'verbose':_0x146f6d[_0x5943d6(0x1e6)]}),_0x1437d6=_0x2d2f32['data'];return await handleSingleObjectOutput(_0x1437d6,_0x146f6d),0x0;}catch(_0x369b25){if(_0x369b25 instanceof SDKError)return console[_0x5943d6(0x1f1)](_0x5943d6(0x1fd)+_0x369b25[_0x5943d6(0x1e9)]),_0x369b25[_0x5943d6(0x1fe)]&&console[_0x5943d6(0x1f1)](_0x5943d6(0x1e8)+_0x369b25[_0x5943d6(0x1fe)]),0x1;throw _0x369b25;}}}function a41_0xc1ef(_0xb7d435,_0x585cff){_0xb7d435=_0xb7d435-0x1e5;const _0x3ae618=a41_0x3ae6();let _0xc1ef26=_0x3ae618[_0xb7d435];return _0xc1ef26;}export class UserListCommand extends BaseCommand{['name']='user\x20list';['description']=a41_0x40c26b(0x1f6);async[a41_0x40c26b(0x1f4)](_0x2b63f4){const _0x1ec58f=a41_0x40c26b,{options:_0x3595e2,tdx:_0xb1cdae}=_0x2b63f4;try{const _0x3a917c=await withSpinner('Listing\x20users...',()=>_0xb1cdae[_0x1ec58f(0x1ff)]['list'](),{'verbose':_0x3595e2['verbose']}),_0x45eb3c=_0x3a917c[_0x1ec58f(0x1ee)];return console[_0x1ec58f(0x1f1)](_0x1ec58f(0x1e5)+_0x45eb3c[_0x1ec58f(0x1f5)]+_0x1ec58f(0x1f3)+(_0x45eb3c[_0x1ec58f(0x1f5)]!==0x1?'s':'')),await handleSDKOutput(_0x45eb3c,_0x3595e2),0x0;}catch(_0x1cfe7b){if(_0x1cfe7b instanceof SDKError)return console['error']('Error:\x20'+_0x1cfe7b[_0x1ec58f(0x1e9)]),_0x1cfe7b[_0x1ec58f(0x1fe)]&&console['error'](_0x1ec58f(0x1e8)+_0x1cfe7b['cause']),0x1;throw _0x1cfe7b;}}}