@treasuredata/tdx 0.28.6 → 0.28.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (181) hide show
  1. package/dist/bin.js +1 -1
  2. package/dist/build-info.json +3 -3
  3. package/dist/cli-categories.js +1 -1
  4. package/dist/cli.js +1 -1
  5. package/dist/commands/activations.js +1 -1
  6. package/dist/commands/agent-command.js +1 -1
  7. package/dist/commands/agent-test-command.js +1 -1
  8. package/dist/commands/api-command.js +1 -1
  9. package/dist/commands/auth-command.js +1 -1
  10. package/dist/commands/chat-command.js +1 -1
  11. package/dist/commands/claude-command.js +1 -1
  12. package/dist/commands/claude-statusline-command.js +1 -1
  13. package/dist/commands/claude-usage-command.js +1 -1
  14. package/dist/commands/command.js +1 -1
  15. package/dist/commands/connection-command.js +1 -1
  16. package/dist/commands/databases.js +1 -1
  17. package/dist/commands/delivery-command.js +1 -1
  18. package/dist/commands/describe.js +1 -1
  19. package/dist/commands/engage-campaign-pull-command.js +1 -1
  20. package/dist/commands/engage-campaign-push-command.js +1 -1
  21. package/dist/commands/engage-campaign-validate-command.js +1 -1
  22. package/dist/commands/engage-command.js +1 -1
  23. package/dist/commands/job-command.js +1 -1
  24. package/dist/commands/journey-command.js +1 -1
  25. package/dist/commands/journey-validate-command.js +1 -1
  26. package/dist/commands/llm-command.js +1 -1
  27. package/dist/commands/mcp-command.js +1 -1
  28. package/dist/commands/parent-segment-command.js +1 -1
  29. package/dist/commands/profile-command.js +1 -1
  30. package/dist/commands/profiles-command.js +1 -1
  31. package/dist/commands/query-command.js +1 -1
  32. package/dist/commands/schedule-command.js +1 -1
  33. package/dist/commands/segment-command.js +1 -1
  34. package/dist/commands/segment-create-command.js +1 -1
  35. package/dist/commands/segment-fields-command.js +1 -1
  36. package/dist/commands/segment-pull-command.js +1 -1
  37. package/dist/commands/segment-push-command.js +1 -1
  38. package/dist/commands/segment-update-command.js +1 -1
  39. package/dist/commands/segment-use-command.js +1 -1
  40. package/dist/commands/segment-validate-command.js +1 -1
  41. package/dist/commands/segments.js +1 -1
  42. package/dist/commands/show.js +1 -1
  43. package/dist/commands/status-command.js +1 -1
  44. package/dist/commands/tables.js +1 -1
  45. package/dist/commands/unset-command.js +1 -1
  46. package/dist/commands/upgrade-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/agent/tool-target-registry.js +1 -1
  81. package/dist/sdk/api.js +1 -1
  82. package/dist/sdk/client/cdp-api-client.js +1 -1
  83. package/dist/sdk/client/delivery-api-client.js +1 -1
  84. package/dist/sdk/client/endpoints.js +1 -1
  85. package/dist/sdk/client/engage-api-client.js +1 -1
  86. package/dist/sdk/client/http-client.js +1 -1
  87. package/dist/sdk/client/llm-api-client.js +1 -1
  88. package/dist/sdk/client/rate-limiter.js +1 -1
  89. package/dist/sdk/client/td-api-client.js +1 -1
  90. package/dist/sdk/client/trino-api-client.js +1 -1
  91. package/dist/sdk/client/workflow-client.js +1 -1
  92. package/dist/sdk/connection-validator.js +1 -1
  93. package/dist/sdk/connection.js +1 -1
  94. package/dist/sdk/delivery.js +1 -1
  95. package/dist/sdk/engage/campaign-pull.js +1 -1
  96. package/dist/sdk/engage/campaign-push.js +1 -1
  97. package/dist/sdk/engage/campaign-validator.js +1 -1
  98. package/dist/sdk/engage/campaign-yaml.js +1 -1
  99. package/dist/sdk/engage/types/campaign-def.js +1 -1
  100. package/dist/sdk/engage/types/campaign-schema.js +1 -1
  101. package/dist/sdk/engage.js +1 -1
  102. package/dist/sdk/errors.js +1 -1
  103. package/dist/sdk/index.js +1 -1
  104. package/dist/sdk/io/index.js +1 -1
  105. package/dist/sdk/io/node-filesystem.js +1 -1
  106. package/dist/sdk/job.js +1 -1
  107. package/dist/sdk/journey.js +1 -1
  108. package/dist/sdk/llm/chat-cache.js +1 -1
  109. package/dist/sdk/llm/index.js +1 -1
  110. package/dist/sdk/llm/llm-backup-utils.js +1 -1
  111. package/dist/sdk/llm/model-factors.js +1 -1
  112. package/dist/sdk/personalization.js +1 -1
  113. package/dist/sdk/query/index.js +1 -1
  114. package/dist/sdk/query/sql-parser.js +1 -1
  115. package/dist/sdk/realtime.js +1 -1
  116. package/dist/sdk/schedule.js +1 -1
  117. package/dist/sdk/segment/child-segment-yaml.js +1 -1
  118. package/dist/sdk/segment/fields-display.js +1 -1
  119. package/dist/sdk/segment/file-discovery.js +1 -1
  120. package/dist/sdk/segment/journey-utils.js +1 -1
  121. package/dist/sdk/segment/journey-validator.js +1 -1
  122. package/dist/sdk/segment/journey-yaml.js +1 -1
  123. package/dist/sdk/segment/parent-segment-preview.js +1 -1
  124. package/dist/sdk/segment/parent-segment-yaml.js +1 -1
  125. package/dist/sdk/segment/pull-workflow.js +1 -1
  126. package/dist/sdk/segment/push-recovery.js +1 -1
  127. package/dist/sdk/segment/push-workflow.js +1 -1
  128. package/dist/sdk/segment/resolution-context.js +1 -1
  129. package/dist/sdk/segment/segment-path-parser.js +1 -1
  130. package/dist/sdk/segment/segment-ref-parser.js +1 -1
  131. package/dist/sdk/segment/target-resolution.js +1 -1
  132. package/dist/sdk/segment/tdx-config.js +1 -1
  133. package/dist/sdk/segment/validate-files.js +1 -1
  134. package/dist/sdk/segment/yaml-validator.js +1 -1
  135. package/dist/sdk/segment.js +1 -1
  136. package/dist/sdk/types/index.js +1 -1
  137. package/dist/sdk/types/progress.js +1 -1
  138. package/dist/sdk/user.js +1 -1
  139. package/dist/sdk/util/format-detector.js +1 -1
  140. package/dist/sdk/util/formatters.js +1 -1
  141. package/dist/sdk/util/index.js +1 -1
  142. package/dist/sdk/util/tree-formatter.js +1 -1
  143. package/dist/sdk/workflow/archive-validation.js +1 -1
  144. package/dist/sdk/workflow/clone-workflow.js +1 -1
  145. package/dist/sdk/workflow/index.js +1 -1
  146. package/dist/sdk/workflow/pull-workflow.js +1 -1
  147. package/dist/sdk/workflow/push-workflow.js +1 -1
  148. package/dist/sdk/workflow/tdx-config.js +1 -1
  149. package/dist/sdk/workflow/workflow-utils.js +1 -1
  150. package/dist/test-utils/command-runner.js +1 -1
  151. package/dist/test-utils/factories.js +1 -1
  152. package/dist/test-utils/fixtures.js +1 -1
  153. package/dist/test-utils/http-mock.js +1 -1
  154. package/dist/test-utils/index.js +1 -1
  155. package/dist/utils/async.js +1 -1
  156. package/dist/utils/colors.js +1 -1
  157. package/dist/utils/diff.js +1 -1
  158. package/dist/utils/file-permissions.js +1 -1
  159. package/dist/utils/file-reader.js +1 -1
  160. package/dist/utils/global-cache.js +1 -1
  161. package/dist/utils/json-loader.js +1 -1
  162. package/dist/utils/local-cache.js +1 -1
  163. package/dist/utils/logger/formatters/default-formatter.js +1 -1
  164. package/dist/utils/logger/formatters/index.js +1 -1
  165. package/dist/utils/logger/handlers/console-handler.js +1 -1
  166. package/dist/utils/logger/handlers/file-handler.js +1 -1
  167. package/dist/utils/logger/handlers/index.js +1 -1
  168. package/dist/utils/logger/handlers/null-handler.js +1 -1
  169. package/dist/utils/logger/index.js +1 -1
  170. package/dist/utils/logger/logger.js +1 -1
  171. package/dist/utils/logger/types.js +1 -1
  172. package/dist/utils/option-validation.js +1 -1
  173. package/dist/utils/process.js +1 -1
  174. package/dist/utils/prompt.js +1 -1
  175. package/dist/utils/spinner.js +1 -1
  176. package/dist/utils/sse-parser.js +1 -1
  177. package/dist/utils/string-utils.js +1 -1
  178. package/dist/utils/table-ref-parser.js +1 -1
  179. package/dist/utils/tdx-logger.js +1 -1
  180. package/dist/utils/version-check.js +1 -1
  181. package/package.json +1 -1
@@ -1 +1 @@
1
- const a36_0x5f4950=a36_0x8ad7;(function(_0x18bf6f,_0x2acf6e){const _0x49567d=a36_0x8ad7,_0x45e29a=_0x18bf6f();while(!![]){try{const _0x34d9be=parseInt(_0x49567d(0x13e))/0x1+parseInt(_0x49567d(0x166))/0x2+parseInt(_0x49567d(0x145))/0x3+parseInt(_0x49567d(0x165))/0x4+parseInt(_0x49567d(0x167))/0x5+parseInt(_0x49567d(0x159))/0x6*(parseInt(_0x49567d(0x16c))/0x7)+-parseInt(_0x49567d(0x143))/0x8*(parseInt(_0x49567d(0x16a))/0x9);if(_0x34d9be===_0x2acf6e)break;else _0x45e29a['push'](_0x45e29a['shift']());}catch(_0x4f7b4a){_0x45e29a['push'](_0x45e29a['shift']());}}}(a36_0x12bf,0xe5fec));import{BaseCommand}from'./command.js';import{handleSDKOutput}from'../core/command-output.js';function a36_0x12bf(){const _0x27071f=['2032872pXacMr','\x20\x20\x20Path:\x20','yellow','⚠\x20Deprecation\x20warning:\x20`segment\x20update`\x20is\x20deprecated.','parentId','rule','segmentId','segmentName','updateSegmentById','\x20\x20tdx\x20segment\x20update\x20\x22High\x20Value\x22\x20--rule\x20\x27...\x27\x20\x20#\x20Relative\x20to\x20context','Error:\x20Cannot\x20update\x20','Resolved\x20type:\x20','Error:\x20Segment\x20path\x20or\x20name\x20is\x20required','\x20\x20Use\x20`tdx\x20sg\x20push`\x20with\x20YAML\x20files\x20instead.\x0a','Resolved\x20folder\x20ID:\x20','execute','ruleFile','\x27...','description','Usage:\x20tdx\x20segment\x20update\x20<path>\x20[options]','86586SVsxlD','segmentPath','Updating\x20segment\x20\x27','Resolving\x20path\x20\x27','Resolved\x20relative\x20path\x20to:\x20','length','folder','Segment\x20ID\x20missing\x20from\x20resolved\x20path','Examples:','kind','segment:update','✔\x20Updated\x20segment\x20\x27','5640080pDfoqd','1211432WFHjSK','5454070oTiHvK','.\x20Only\x20child\x20segments\x20can\x20be\x20updated.','segment','387SxOVGs','Resolving\x20folder\x20\x27','154ulaejn','data','verbose','1193337ReHxKL','includes','\x20\x20tdx\x20segment\x20update\x20\x22My\x20Audience/High\x20Value\x22\x20--description\x20\x22...\x22','type','name','809848tvUqxs','error'];a36_0x12bf=function(){return _0x27071f;};return a36_0x12bf();}import{withSpinner}from'../utils/spinner.js';import{loadJSONFromOptions}from'../utils/json-loader.js';import{SDKError,ErrorCode}from'../sdk/index.js';import a36_0x12d5d9 from'chalk';function a36_0x8ad7(_0x78288e,_0x18429f){_0x78288e=_0x78288e-0x13d;const _0x12bf49=a36_0x12bf();let _0x8ad75b=_0x12bf49[_0x78288e];return _0x8ad75b;}export class SegmentUpdateCommand extends BaseCommand{[a36_0x5f4950(0x142)]=a36_0x5f4950(0x163);['description']='Update\x20existing\x20child\x20segment';async[a36_0x5f4950(0x154)](_0x469436){const _0x4c5199=a36_0x5f4950;console['error'](a36_0x12d5d9[_0x4c5199(0x147)](_0x4c5199(0x148))),console[_0x4c5199(0x144)](a36_0x12d5d9['yellow'](_0x4c5199(0x152)));const {options:_0x38d530,args:_0x43ffa8,tdx:_0x40c0ef}=_0x469436,_0xfcef5d=_0x38d530;if(_0x43ffa8[_0x4c5199(0x15e)]===0x0)return console[_0x4c5199(0x144)](_0x4c5199(0x151)),console[_0x4c5199(0x144)](_0x4c5199(0x158)),console[_0x4c5199(0x144)](_0x4c5199(0x161)),console[_0x4c5199(0x144)](_0x4c5199(0x140)),console['error'](_0x4c5199(0x14e)),0x1;const _0x42fa0f=_0x43ffa8[0x0],_0x4264a9=_0x38d530[_0x4c5199(0x15a)];let _0x36fc6b=_0x42fa0f;_0x4264a9&&!_0x42fa0f[_0x4c5199(0x13f)]('/')&&(_0x36fc6b=_0x4264a9+'/'+_0x42fa0f,_0xfcef5d[_0x4c5199(0x13d)]&&console['error'](_0x4c5199(0x15d)+_0x36fc6b));const _0x5aafba=await withSpinner(_0x4c5199(0x15c)+_0x36fc6b+_0x4c5199(0x156),()=>_0x40c0ef[_0x4c5199(0x169)]['resolvePathToResource'](_0x36fc6b),{'verbose':_0xfcef5d[_0x4c5199(0x13d)]}),_0x4c62ae=_0x5aafba[_0x4c5199(0x16d)];_0xfcef5d[_0x4c5199(0x13d)]&&console['error'](_0x4c5199(0x150)+_0x4c62ae[_0x4c5199(0x141)]);if(_0x4c62ae[_0x4c5199(0x141)]!==_0x4c5199(0x169))return console[_0x4c5199(0x144)](_0x4c5199(0x14f)+_0x4c62ae['type']+_0x4c5199(0x168)),console['error']('Use:\x20tdx\x20segment\x20update\x20<path_to_segment>\x20[options]'),0x1;if(!_0x4c62ae['segmentId'])throw new SDKError(ErrorCode['INTERNAL'],_0x4c5199(0x160));const _0x4c97c7=_0x4c62ae[_0x4c5199(0x149)],_0x453311=_0x4c62ae[_0x4c5199(0x14b)];_0xfcef5d[_0x4c5199(0x13d)]&&(console[_0x4c5199(0x144)]('Parent\x20ID:\x20'+_0x4c97c7),console['error']('Segment\x20ID:\x20'+_0x453311));let _0x2c56af;if(_0xfcef5d[_0x4c5199(0x15f)]){const _0x2b51ac=_0xfcef5d[_0x4c5199(0x15f)],_0x45ff7f=await withSpinner(_0x4c5199(0x16b)+_0x2b51ac+_0x4c5199(0x156),()=>_0x40c0ef[_0x4c5199(0x169)]['resolveFolderId'](_0x4c97c7,_0x2b51ac),{'verbose':_0xfcef5d[_0x4c5199(0x13d)]});_0x2c56af=parseInt(_0x45ff7f[_0x4c5199(0x16d)],0xa),_0xfcef5d[_0x4c5199(0x13d)]&&console['error'](_0x4c5199(0x153)+_0x2c56af);}const _0x52b90b=await loadJSONFromOptions(_0xfcef5d[_0x4c5199(0x14a)],_0xfcef5d[_0x4c5199(0x155)]),_0x92e87d={'name':_0xfcef5d[_0x4c5199(0x142)],'description':_0xfcef5d[_0x4c5199(0x157)],'rule':_0x52b90b,'kind':_0xfcef5d[_0x4c5199(0x162)]!==undefined?parseInt(_0xfcef5d['kind'],0xa):undefined,'segmentFolderId':_0x2c56af},_0x5b46da=await withSpinner(_0x4c5199(0x15b)+_0x4c62ae[_0x4c5199(0x14c)]+_0x4c5199(0x156),()=>_0x40c0ef[_0x4c5199(0x169)][_0x4c5199(0x14d)](_0x4c97c7,_0x453311,_0x92e87d),{'verbose':_0xfcef5d[_0x4c5199(0x13d)]}),_0x4111cf=_0x5b46da[_0x4c5199(0x16d)];return console['error'](_0x4c5199(0x164)+_0x4111cf['name']+'\x27'),_0x36fc6b!==_0x42fa0f&&console[_0x4c5199(0x144)](_0x4c5199(0x146)+_0x36fc6b),await handleSDKOutput([_0x4111cf],_0xfcef5d),0x0;}}
1
+ const a36_0x34fbef=a36_0x1d3b;(function(_0x35bef4,_0x2d3826){const _0x1aeb9d=a36_0x1d3b,_0x54a681=_0x35bef4();while(!![]){try{const _0x5d0e3f=-parseInt(_0x1aeb9d(0x100))/0x1+-parseInt(_0x1aeb9d(0x121))/0x2*(-parseInt(_0x1aeb9d(0x11e))/0x3)+-parseInt(_0x1aeb9d(0x118))/0x4+-parseInt(_0x1aeb9d(0x109))/0x5+-parseInt(_0x1aeb9d(0xfc))/0x6+parseInt(_0x1aeb9d(0x105))/0x7*(parseInt(_0x1aeb9d(0x10a))/0x8)+parseInt(_0x1aeb9d(0x10e))/0x9;if(_0x5d0e3f===_0x2d3826)break;else _0x54a681['push'](_0x54a681['shift']());}catch(_0x4264bb){_0x54a681['push'](_0x54a681['shift']());}}}(a36_0x49c2,0xc9b4f));import{BaseCommand}from'./command.js';import{handleSDKOutput}from'../core/command-output.js';import{withSpinner}from'../utils/spinner.js';import{loadJSONFromOptions}from'../utils/json-loader.js';import{SDKError,ErrorCode}from'../sdk/index.js';function a36_0x1d3b(_0x3a7ecc,_0x24c3ae){_0x3a7ecc=_0x3a7ecc-0xfa;const _0x49c2c6=a36_0x49c2();let _0x1d3b81=_0x49c2c6[_0x3a7ecc];return _0x1d3b81;}import a36_0x23e19f from'chalk';export class SegmentUpdateCommand extends BaseCommand{['name']='segment:update';['description']=a36_0x34fbef(0x114);async[a36_0x34fbef(0xff)](_0xf667ca){const _0x491289=a36_0x34fbef;console['error'](a36_0x23e19f['yellow'](_0x491289(0x110))),console[_0x491289(0x11b)](a36_0x23e19f[_0x491289(0x120)](_0x491289(0x10c)));const {options:_0x2854ae,args:_0x6a50ad,tdx:_0xfb7961}=_0xf667ca,_0x361ba6=_0x2854ae;if(_0x6a50ad['length']===0x0)return console[_0x491289(0x11b)]('Error:\x20Segment\x20path\x20or\x20name\x20is\x20required'),console['error']('Usage:\x20tdx\x20segment\x20update\x20<path>\x20[options]'),console[_0x491289(0x11b)](_0x491289(0x122)),console['error'](_0x491289(0x111)),console[_0x491289(0x11b)](_0x491289(0x126)),0x1;const _0x5586e3=_0x6a50ad[0x0],_0x43dbf3=_0x2854ae[_0x491289(0x107)];let _0x3d49e8=_0x5586e3;_0x43dbf3&&!_0x5586e3['includes']('/')&&(_0x3d49e8=_0x43dbf3+'/'+_0x5586e3,_0x361ba6[_0x491289(0x11f)]&&console[_0x491289(0x11b)](_0x491289(0x10b)+_0x3d49e8));const _0x367a8b=await withSpinner(_0x491289(0xfb)+_0x3d49e8+_0x491289(0x124),()=>_0xfb7961[_0x491289(0x119)][_0x491289(0x103)](_0x3d49e8),{'verbose':_0x361ba6[_0x491289(0x11f)]}),_0x1bf73e=_0x367a8b[_0x491289(0x127)];_0x361ba6[_0x491289(0x11f)]&&console[_0x491289(0x11b)](_0x491289(0x108)+_0x1bf73e[_0x491289(0x125)]);if(_0x1bf73e[_0x491289(0x125)]!==_0x491289(0x119))return console[_0x491289(0x11b)](_0x491289(0x104)+_0x1bf73e['type']+_0x491289(0x112)),console[_0x491289(0x11b)](_0x491289(0x113)),0x1;if(!_0x1bf73e[_0x491289(0x101)])throw new SDKError(ErrorCode[_0x491289(0x115)],_0x491289(0xfe));const _0x285089=_0x1bf73e['parentId'],_0x49e202=_0x1bf73e['segmentId'];_0x361ba6[_0x491289(0x11f)]&&(console['error'](_0x491289(0x102)+_0x285089),console[_0x491289(0x11b)](_0x491289(0x11a)+_0x49e202));let _0x2a0832;if(_0x361ba6[_0x491289(0x11d)]){const _0x3bae4a=_0x361ba6[_0x491289(0x11d)],_0x577a6d=await withSpinner(_0x491289(0x117)+_0x3bae4a+_0x491289(0x124),()=>_0xfb7961[_0x491289(0x119)][_0x491289(0xfa)](_0x285089,_0x3bae4a),{'verbose':_0x361ba6[_0x491289(0x11f)]});_0x2a0832=parseInt(_0x577a6d[_0x491289(0x127)],0xa),_0x361ba6['verbose']&&console['error']('Resolved\x20folder\x20ID:\x20'+_0x2a0832);}const _0x23238e=await loadJSONFromOptions(_0x361ba6[_0x491289(0x116)],_0x361ba6[_0x491289(0xfd)]),_0x28025e={'name':_0x361ba6['name'],'description':_0x361ba6[_0x491289(0x10f)],'rule':_0x23238e,'kind':_0x361ba6[_0x491289(0x106)]!==undefined?parseInt(_0x361ba6[_0x491289(0x106)],0xa):undefined,'segmentFolderId':_0x2a0832},_0x16467c=await withSpinner('Updating\x20segment\x20\x27'+_0x1bf73e[_0x491289(0x123)]+_0x491289(0x124),()=>_0xfb7961['segment']['updateSegmentById'](_0x285089,_0x49e202,_0x28025e),{'verbose':_0x361ba6[_0x491289(0x11f)]}),_0x1dad90=_0x16467c[_0x491289(0x127)];return console[_0x491289(0x11b)](_0x491289(0x10d)+_0x1dad90[_0x491289(0x128)]+'\x27'),_0x3d49e8!==_0x5586e3&&console[_0x491289(0x11b)](_0x491289(0x11c)+_0x3d49e8),await handleSDKOutput([_0x1dad90],_0x361ba6),0x0;}}function a36_0x49c2(){const _0x36fe4e=['Error:\x20Cannot\x20update\x20','1419005PqAmVg','kind','segmentPath','Resolved\x20type:\x20','2980800kvwHZV','16dwzBgU','Resolved\x20relative\x20path\x20to:\x20','\x20\x20Use\x20`tdx\x20sg\x20push`\x20with\x20YAML\x20files\x20instead.\x0a','✔\x20Updated\x20segment\x20\x27','14246424WKdEJP','description','⚠\x20Deprecation\x20warning:\x20`segment\x20update`\x20is\x20deprecated.','\x20\x20tdx\x20segment\x20update\x20\x22My\x20Audience/High\x20Value\x22\x20--description\x20\x22...\x22','.\x20Only\x20child\x20segments\x20can\x20be\x20updated.','Use:\x20tdx\x20segment\x20update\x20<path_to_segment>\x20[options]','Update\x20existing\x20child\x20segment','INTERNAL','rule','Resolving\x20folder\x20\x27','570888sLDHIU','segment','Segment\x20ID:\x20','error','\x20\x20\x20Path:\x20','folder','3988701urISXU','verbose','yellow','2gkuRlA','Examples:','segmentName','\x27...','type','\x20\x20tdx\x20segment\x20update\x20\x22High\x20Value\x22\x20--rule\x20\x27...\x27\x20\x20#\x20Relative\x20to\x20context','data','name','resolveFolderId','Resolving\x20path\x20\x27','6508104yCRCuP','ruleFile','Segment\x20ID\x20missing\x20from\x20resolved\x20path','execute','668176ZQjEIW','segmentId','Parent\x20ID:\x20','resolvePathToResource'];a36_0x49c2=function(){return _0x36fe4e;};return a36_0x49c2();}
@@ -1 +1 @@
1
- const a37_0x13b1c1=a37_0x1534;(function(_0x3a8356,_0x65847f){const _0x5d05bf=a37_0x1534,_0x3ad740=_0x3a8356();while(!![]){try{const _0xefa898=-parseInt(_0x5d05bf(0x14e))/0x1+parseInt(_0x5d05bf(0x13e))/0x2*(-parseInt(_0x5d05bf(0x120))/0x3)+parseInt(_0x5d05bf(0x12f))/0x4*(-parseInt(_0x5d05bf(0x121))/0x5)+parseInt(_0x5d05bf(0x127))/0x6*(parseInt(_0x5d05bf(0x131))/0x7)+-parseInt(_0x5d05bf(0x147))/0x8+parseInt(_0x5d05bf(0x13a))/0x9+parseInt(_0x5d05bf(0x135))/0xa*(parseInt(_0x5d05bf(0x12a))/0xb);if(_0xefa898===_0x65847f)break;else _0x3ad740['push'](_0x3ad740['shift']());}catch(_0x568996){_0x3ad740['push'](_0x3ad740['shift']());}}}(a37_0x4011,0xe645d));import{existsSync,statSync}from'fs';import a37_0x469446 from'chalk';function a37_0x1534(_0x38b013,_0x1d2715){_0x38b013=_0x38b013-0x11e;const _0x40117c=a37_0x4011();let _0x153491=_0x40117c[_0x38b013];return _0x153491;}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 a37_0x4011(){const _0x4618b0=['red','type','Error:\x20Path\x20is\x20required\x0a','segment','Error:\x20No\x20tdx.json\x20found\x20in\x20or\x20above:\x20','segment:use','4587440lHCqAp','✔\x20Context\x20cleared.\x20Back\x20to\x20root.','Resolved\x20path\x20type:\x20','resolvePathToResource','green','✔\x20Context\x20set\x20to:\x20','segments','710375aUniab','split','Resolved\x20relative\x20path\x20to:\x20','folderPath','cyan','Use:\x20tdx\x20segment\x20use\x20','\x20\x20tdx\x20segment\x20use\x20\x22My\x20Audience\x22','parentId','Site:\x20','segmentPath','2859BqDUcN','121295jWlcXh','folderId','data','description','Use\x20\x22tdx\x20segments\x22\x20to\x20list\x20contents\x20in\x20this\x20context','parentName','316524mdylvV','dim','Target\x20path:\x20','77QTqTgr','Tip:\x20Run\x20`tdx\x20sg\x20pull\x20<parent_name>`\x20first\x20to\x20create\x20the\x20folder\x20structure','length','isAbsolute','slice','64pFtEGE','verbose','203sOfEqd','\x20\x20tdx\x20segment\x20use\x20/\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Clear\x20context','fullPath','Context\x20can\x20only\x20be\x20set\x20to\x20a\x20parent\x20segment\x20or\x20folder.','1002490CTaOrU','Error:\x20Cannot\x20set\x20context\x20to\x20a\x20segment.','error','Resolving\x20path\x20\x27','Folder\x20ID:\x20','7251444ijSlHm','config','log','parent_segment','886IDsifo','name','Usage:\x20tdx\x20segment\x20use\x20<path>'];a37_0x4011=function(){return _0x4618b0;};return a37_0x4011();}export class SegmentUseCommand extends BaseCommand{[a37_0x13b1c1(0x13f)]=a37_0x13b1c1(0x146);[a37_0x13b1c1(0x124)]='Set\x20current\x20segment/folder\x20context\x20for\x20navigation';async['execute'](_0x155be7){const _0x4c7174=a37_0x13b1c1,{options:_0x1ed4ca,args:_0x417433,tdx:_0x41d714}=_0x155be7;if(_0x417433['length']===0x0)return console['error'](a37_0x469446['red'](_0x4c7174(0x143))),console['error'](_0x4c7174(0x140)),console[_0x4c7174(0x137)]('Examples:'),console[_0x4c7174(0x137)](_0x4c7174(0x154)),console[_0x4c7174(0x137)]('\x20\x20tdx\x20segment\x20use\x20\x22My\x20Audience/Marketing\x22'),console[_0x4c7174(0x137)](_0x4c7174(0x132)),console[_0x4c7174(0x137)]('\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 _0x505030=_0x417433[0x0],_0x3fac8f=_0x1ed4ca['session'];try{if(_0x505030==='/')return saveSessionContext({'segment_path':undefined},_0x3fac8f),console['log'](a37_0x469446[_0x4c7174(0x14b)]('✔\x20Context\x20cleared.\x20Back\x20to\x20root.')),0x0;if(existsSync(_0x505030)&&statSync(_0x505030)['isDirectory']()){let _0xdacd4c;try{_0xdacd4c=findTdxConfig(_0x505030);}catch{return console[_0x4c7174(0x137)](a37_0x469446[_0x4c7174(0x141)](_0x4c7174(0x145)+_0x505030)),console[_0x4c7174(0x137)](a37_0x469446[_0x4c7174(0x152)](_0x4c7174(0x12b))),0x1;}const _0x5381f4=_0xdacd4c[_0x4c7174(0x13b)][_0x4c7174(0x13d)];return saveSessionContext({'segment_path':_0x5381f4,'parent_segment':_0x5381f4},_0x3fac8f),console['log'](a37_0x469446[_0x4c7174(0x14b)]('✔\x20Context\x20set\x20to:\x20'+a37_0x469446[_0x4c7174(0x152)](_0x5381f4))),0x0;}const _0x3aa604=_0x1ed4ca[_0x4c7174(0x11f)];let _0x55401b=_0x505030;const _0xea8ad=parsePath(_0x505030);if(!_0xea8ad[_0x4c7174(0x12d)]){if(!_0x3aa604)return console[_0x4c7174(0x137)](a37_0x469446[_0x4c7174(0x141)]('Error:\x20No\x20context\x20set.\x20Cannot\x20use\x20relative\x20path.')),console['error'](a37_0x469446[_0x4c7174(0x152)]('Use\x20an\x20absolute\x20path\x20or\x20set\x20context\x20with:\x20tdx\x20segment\x20use\x20<parent_name>')),0x1;if(_0x505030==='..'){const _0x4de2d8=_0x3aa604[_0x4c7174(0x14f)]('/')[_0x4c7174(0x12e)](0x0,-0x1)['join']('/');_0x55401b=_0x4de2d8||'/';}else _0x505030==='.'?_0x55401b=_0x3aa604:_0x55401b=_0x3aa604+'/'+_0x505030;_0x1ed4ca[_0x4c7174(0x130)]&&console['error'](_0x4c7174(0x150)+_0x55401b);}if(_0x55401b==='/'||_0x55401b==='')return saveSessionContext({'segment_path':undefined},_0x3fac8f),console[_0x4c7174(0x13c)](a37_0x469446[_0x4c7174(0x14b)](_0x4c7174(0x148))),0x0;_0x55401b=normalizePath(_0x55401b);const _0x519245=parsePath(_0x55401b)[_0x4c7174(0x14d)];if(_0x519245[_0x4c7174(0x12c)]===0x0)return saveSessionContext({'segment_path':undefined},_0x3fac8f),console['log'](a37_0x469446[_0x4c7174(0x14b)](_0x4c7174(0x148))),0x0;_0x1ed4ca[_0x4c7174(0x130)]&&(console[_0x4c7174(0x137)](_0x4c7174(0x11e)+_0x1ed4ca['site']),console['error'](_0x4c7174(0x129)+_0x55401b));const _0x3f644f=await withSpinner(_0x4c7174(0x138)+_0x55401b+'\x27...',()=>_0x41d714[_0x4c7174(0x144)][_0x4c7174(0x14a)](_0x55401b),{'verbose':_0x1ed4ca[_0x4c7174(0x130)]}),_0x8f5c47=_0x3f644f[_0x4c7174(0x123)];_0x1ed4ca['verbose']&&(console['error'](_0x4c7174(0x149)+_0x8f5c47['type']),console['error']('Parent\x20ID:\x20'+_0x8f5c47[_0x4c7174(0x155)]),_0x8f5c47[_0x4c7174(0x122)]&&console[_0x4c7174(0x137)](_0x4c7174(0x139)+_0x8f5c47['folderId']));if(_0x8f5c47[_0x4c7174(0x142)]===_0x4c7174(0x144))return console[_0x4c7174(0x137)](a37_0x469446[_0x4c7174(0x141)](_0x4c7174(0x136))),console['error'](_0x4c7174(0x134)),console[_0x4c7174(0x137)](a37_0x469446[_0x4c7174(0x152)](_0x4c7174(0x153)+_0x8f5c47[_0x4c7174(0x126)]+(_0x8f5c47['folderPath']?'/'+_0x8f5c47[_0x4c7174(0x151)]['join']('/'):''))),0x1;return saveSessionContext({'segment_path':_0x8f5c47[_0x4c7174(0x133)],'parent_segment':_0x8f5c47[_0x4c7174(0x126)]},_0x3fac8f),console[_0x4c7174(0x13c)](a37_0x469446[_0x4c7174(0x14b)](_0x4c7174(0x14c)+a37_0x469446[_0x4c7174(0x152)](_0x8f5c47[_0x4c7174(0x133)]))),_0x1ed4ca['verbose']&&(console[_0x4c7174(0x137)](a37_0x469446[_0x4c7174(0x128)](_0x4c7174(0x125))),console[_0x4c7174(0x137)](a37_0x469446['dim']('Use\x20\x22tdx\x20use\x22\x20to\x20see\x20all\x20context\x20parameters'))),0x0;}catch(_0x5c6cb9){throw _0x5c6cb9;}}}
1
+ const a37_0x25d9eb=a37_0x50c5;(function(_0x44704d,_0x3fdcc8){const _0x5afad4=a37_0x50c5,_0x3443a5=_0x44704d();while(!![]){try{const _0xc85620=-parseInt(_0x5afad4(0x18e))/0x1*(parseInt(_0x5afad4(0x159))/0x2)+parseInt(_0x5afad4(0x190))/0x3*(parseInt(_0x5afad4(0x156))/0x4)+parseInt(_0x5afad4(0x163))/0x5+parseInt(_0x5afad4(0x155))/0x6*(-parseInt(_0x5afad4(0x152))/0x7)+-parseInt(_0x5afad4(0x164))/0x8*(parseInt(_0x5afad4(0x179))/0x9)+-parseInt(_0x5afad4(0x17d))/0xa+parseInt(_0x5afad4(0x176))/0xb;if(_0xc85620===_0x3fdcc8)break;else _0x3443a5['push'](_0x3443a5['shift']());}catch(_0x4eb2b5){_0x3443a5['push'](_0x3443a5['shift']());}}}(a37_0x16bb,0x6cfb8));import{existsSync,statSync}from'fs';import a37_0x36e99c from'chalk';import{BaseCommand}from'./command.js';import{saveSessionContext}from'../core/session.js';function a37_0x16bb(){const _0x28ca8e=['744777WNrXxw','Use\x20\x22tdx\x20segments\x22\x20to\x20list\x20contents\x20in\x20this\x20context','folderPath','folderId','7455800Yddfsl','split','\x20\x20tdx\x20segment\x20use\x20\x22My\x20Audience\x22','\x20\x20tdx\x20segment\x20use\x20..\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Go\x20to\x20parent','green','Error:\x20Path\x20is\x20required\x0a','fullPath','join','parent_segment','Resolved\x20relative\x20path\x20to:\x20','description','Error:\x20No\x20tdx.json\x20found\x20in\x20or\x20above:\x20','cyan','\x27...','\x20\x20tdx\x20segment\x20use\x20\x22My\x20Audience/Marketing\x22','Tip:\x20Run\x20`tdx\x20sg\x20pull\x20<parent_name>`\x20first\x20to\x20create\x20the\x20folder\x20structure','parentName','29cGLGLt','Target\x20path:\x20','55014xpmyzP','type','7khbcZd','site','Resolved\x20path\x20type:\x20','122730qYkAnv','96QCBpph','error','Site:\x20','9066dRoqYp','slice','session','Error:\x20No\x20context\x20set.\x20Cannot\x20use\x20relative\x20path.','Folder\x20ID:\x20','Usage:\x20tdx\x20segment\x20use\x20<path>','segmentPath','segment:use','data','\x20\x20tdx\x20segment\x20use\x20/\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Clear\x20context','74140rmPCAG','80duzTLl','name','segments','verbose','Set\x20current\x20segment/folder\x20context\x20for\x20navigation','parentId','length','Context\x20can\x20only\x20be\x20set\x20to\x20a\x20parent\x20segment\x20or\x20folder.','✔\x20Context\x20cleared.\x20Back\x20to\x20root.','Use\x20\x22tdx\x20use\x22\x20to\x20see\x20all\x20context\x20parameters','isDirectory','execute','log','red','segment','dim','resolvePathToResource','Use:\x20tdx\x20segment\x20use\x20','18881214NvMkYy','✔\x20Context\x20set\x20to:\x20','Use\x20an\x20absolute\x20path\x20or\x20set\x20context\x20with:\x20tdx\x20segment\x20use\x20<parent_name>'];a37_0x16bb=function(){return _0x28ca8e;};return a37_0x16bb();}function a37_0x50c5(_0x26896f,_0x14a543){_0x26896f=_0x26896f-0x151;const _0x16bb72=a37_0x16bb();let _0x50c57f=_0x16bb72[_0x26896f];return _0x50c57f;}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{[a37_0x25d9eb(0x165)]=a37_0x25d9eb(0x160);[a37_0x25d9eb(0x187)]=a37_0x25d9eb(0x168);async[a37_0x25d9eb(0x16f)](_0x1c8f68){const _0x50fca7=a37_0x25d9eb,{options:_0x5ae903,args:_0x54c993,tdx:_0x1aa93c}=_0x1c8f68;if(_0x54c993[_0x50fca7(0x16a)]===0x0)return console[_0x50fca7(0x157)](a37_0x36e99c[_0x50fca7(0x171)](_0x50fca7(0x182))),console[_0x50fca7(0x157)](_0x50fca7(0x15e)),console['error']('Examples:'),console['error'](_0x50fca7(0x17f)),console[_0x50fca7(0x157)](_0x50fca7(0x18b)),console['error'](_0x50fca7(0x162)),console[_0x50fca7(0x157)](_0x50fca7(0x180)),0x1;const _0x187f79=_0x54c993[0x0],_0x5ed552=_0x5ae903[_0x50fca7(0x15b)];try{if(_0x187f79==='/')return saveSessionContext({'segment_path':undefined},_0x5ed552),console[_0x50fca7(0x170)](a37_0x36e99c[_0x50fca7(0x181)](_0x50fca7(0x16c))),0x0;if(existsSync(_0x187f79)&&statSync(_0x187f79)[_0x50fca7(0x16e)]()){let _0x5333e0;try{_0x5333e0=findTdxConfig(_0x187f79);}catch{return console['error'](a37_0x36e99c['red'](_0x50fca7(0x188)+_0x187f79)),console['error'](a37_0x36e99c[_0x50fca7(0x189)](_0x50fca7(0x18c))),0x1;}const _0x51d816=_0x5333e0['config'][_0x50fca7(0x185)];return saveSessionContext({'segment_path':_0x51d816,'parent_segment':_0x51d816},_0x5ed552),console[_0x50fca7(0x170)](a37_0x36e99c[_0x50fca7(0x181)](_0x50fca7(0x177)+a37_0x36e99c[_0x50fca7(0x189)](_0x51d816))),0x0;}const _0x46350a=_0x5ae903[_0x50fca7(0x15f)];let _0x594695=_0x187f79;const _0xa69019=parsePath(_0x187f79);if(!_0xa69019['isAbsolute']){if(!_0x46350a)return console[_0x50fca7(0x157)](a37_0x36e99c['red'](_0x50fca7(0x15c))),console[_0x50fca7(0x157)](a37_0x36e99c['cyan'](_0x50fca7(0x178))),0x1;if(_0x187f79==='..'){const _0xdd81fc=_0x46350a[_0x50fca7(0x17e)]('/')[_0x50fca7(0x15a)](0x0,-0x1)['join']('/');_0x594695=_0xdd81fc||'/';}else _0x187f79==='.'?_0x594695=_0x46350a:_0x594695=_0x46350a+'/'+_0x187f79;_0x5ae903['verbose']&&console['error'](_0x50fca7(0x186)+_0x594695);}if(_0x594695==='/'||_0x594695==='')return saveSessionContext({'segment_path':undefined},_0x5ed552),console[_0x50fca7(0x170)](a37_0x36e99c[_0x50fca7(0x181)](_0x50fca7(0x16c))),0x0;_0x594695=normalizePath(_0x594695);const _0xeb5a4a=parsePath(_0x594695)[_0x50fca7(0x166)];if(_0xeb5a4a[_0x50fca7(0x16a)]===0x0)return saveSessionContext({'segment_path':undefined},_0x5ed552),console[_0x50fca7(0x170)](a37_0x36e99c['green'](_0x50fca7(0x16c))),0x0;_0x5ae903[_0x50fca7(0x167)]&&(console[_0x50fca7(0x157)](_0x50fca7(0x158)+_0x5ae903[_0x50fca7(0x153)]),console[_0x50fca7(0x157)](_0x50fca7(0x18f)+_0x594695));const _0x29b03c=await withSpinner('Resolving\x20path\x20\x27'+_0x594695+_0x50fca7(0x18a),()=>_0x1aa93c[_0x50fca7(0x172)][_0x50fca7(0x174)](_0x594695),{'verbose':_0x5ae903[_0x50fca7(0x167)]}),_0x8320f1=_0x29b03c[_0x50fca7(0x161)];_0x5ae903[_0x50fca7(0x167)]&&(console[_0x50fca7(0x157)](_0x50fca7(0x154)+_0x8320f1['type']),console['error']('Parent\x20ID:\x20'+_0x8320f1[_0x50fca7(0x169)]),_0x8320f1['folderId']&&console[_0x50fca7(0x157)](_0x50fca7(0x15d)+_0x8320f1[_0x50fca7(0x17c)]));if(_0x8320f1[_0x50fca7(0x151)]===_0x50fca7(0x172))return console[_0x50fca7(0x157)](a37_0x36e99c[_0x50fca7(0x171)]('Error:\x20Cannot\x20set\x20context\x20to\x20a\x20segment.')),console['error'](_0x50fca7(0x16b)),console['error'](a37_0x36e99c[_0x50fca7(0x189)](_0x50fca7(0x175)+_0x8320f1[_0x50fca7(0x18d)]+(_0x8320f1[_0x50fca7(0x17b)]?'/'+_0x8320f1[_0x50fca7(0x17b)][_0x50fca7(0x184)]('/'):''))),0x1;return saveSessionContext({'segment_path':_0x8320f1[_0x50fca7(0x183)],'parent_segment':_0x8320f1[_0x50fca7(0x18d)]},_0x5ed552),console[_0x50fca7(0x170)](a37_0x36e99c[_0x50fca7(0x181)](_0x50fca7(0x177)+a37_0x36e99c[_0x50fca7(0x189)](_0x8320f1[_0x50fca7(0x183)]))),_0x5ae903['verbose']&&(console[_0x50fca7(0x157)](a37_0x36e99c['dim'](_0x50fca7(0x17a))),console[_0x50fca7(0x157)](a37_0x36e99c[_0x50fca7(0x173)](_0x50fca7(0x16d)))),0x0;}catch(_0x499b11){throw _0x499b11;}}}
@@ -1 +1 @@
1
- const a38_0x2d45d6=a38_0x4552;(function(_0x5d0b7a,_0xc3e13b){const _0x114df4=a38_0x4552,_0x2af821=_0x5d0b7a();while(!![]){try{const _0x27dc49=-parseInt(_0x114df4(0xaf))/0x1+parseInt(_0x114df4(0xa4))/0x2*(-parseInt(_0x114df4(0xa5))/0x3)+-parseInt(_0x114df4(0x97))/0x4+-parseInt(_0x114df4(0xa0))/0x5+-parseInt(_0x114df4(0x9e))/0x6*(-parseInt(_0x114df4(0xb5))/0x7)+-parseInt(_0x114df4(0xc2))/0x8+parseInt(_0x114df4(0xab))/0x9;if(_0x27dc49===_0xc3e13b)break;else _0x2af821['push'](_0x2af821['shift']());}catch(_0x36b776){_0x2af821['push'](_0x2af821['shift']());}}}(a38_0x2203,0xc9f2e));import{BaseCommand}from'./command.js';function a38_0x2203(){const _0xb844d=['execute','dim','\x20warning(s)\x20found','helpText','yellow','5568WXBZvY','.yaml','265630XRZoAB','segment:validate','errorCode','✔\x20All\x20','324lFiEWM','20505GqLbzZ','verbose','warningCount','validCount','name','errors','47182428mxxGcl','length','):\x20','parentSegment','1019520NjcmOz','\x20file(s)\x20with\x20errors,\x20','valid','Validate\x20segment\x20and\x20journey\x20YAML\x20files','\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','3612nQvQGV','file','Validation\x20failed:\x20','Error:\x20','log','Error:\x20Directory\x20not\x20found:\x20','\x20warning(s)','green','.yml','warnings','red','invalidCount','endsWith','12462520PARwKI','error','message','cwd','\x20error(s)','\x20file(s)\x20valid','Error:\x20No\x20YAML\x20files\x20found\x20in\x20','parent_segment\x20is\x20not\x20set.\x20Use\x20`tdx\x20sg\x20use\x20<parent_name>`\x20to\x20set\x20it.\x0a','\x20valid','4625708BzCGOo','no_parent'];a38_0x2203=function(){return _0xb844d;};return a38_0x2203();}function a38_0x4552(_0x476484,_0x49ee54){_0x476484=_0x476484-0x90;const _0x22039b=a38_0x2203();let _0x455250=_0x22039b[_0x476484];return _0x455250;}import{resolveTarget,isSuccessfulResolution}from'../sdk/segment/target-resolution.js';import{findYamlFiles}from'../sdk/segment/file-discovery.js';import{existsSync}from'fs';import a38_0x1699fb 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{[a38_0x2d45d6(0xa9)]=a38_0x2d45d6(0xa1);['description']=a38_0x2d45d6(0xb2);async[a38_0x2d45d6(0x99)](_0x4350fe){const _0x1003e4=a38_0x2d45d6,{options:_0x3bc7c5,args:_0x1e5a95}=_0x4350fe,_0x3ed40d=_0x3bc7c5,_0x1a4799=await resolveTarget({'arg':_0x1e5a95[0x0],'contextParent':_0x3bc7c5[_0x1003e4(0xae)],'cwd':process[_0x1003e4(0x91)]()});if(!isSuccessfulResolution(_0x1a4799))return _0x1a4799[_0x1003e4(0xa2)]===_0x1003e4(0x98)?(console[_0x1003e4(0xc3)](a38_0x1699fb[_0x1003e4(0x9d)](_0x1003e4(0x95))),console[_0x1003e4(0xc3)]('Usage:\x20tdx\x20sg\x20validate\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Validate\x20all\x20(requires\x20context)'),console[_0x1003e4(0xc3)](_0x1003e4(0xb3)),console[_0x1003e4(0xc3)]('\x20\x20\x20\x20\x20\x20\x20tdx\x20sg\x20validate\x20<file_path>\x20\x20#\x20Validate\x20specific\x20file')):(console[_0x1003e4(0xc3)](a38_0x1699fb[_0x1003e4(0xbf)](_0x1003e4(0xb8)+_0x1a4799[_0x1003e4(0x90)]+'\x0a')),_0x1a4799['helpText']&&console[_0x1003e4(0xc3)](a38_0x1699fb['cyan'](_0x1a4799[_0x1003e4(0x9c)]))),0x1;const _0x2aa68d=_0x1a4799['targetDir'],_0x43f63f=_0x1a4799['type']===_0x1003e4(0xb6)?_0x1a4799['filePath']:undefined;if(!_0x43f63f&&!existsSync(_0x2aa68d))return console[_0x1003e4(0xc3)](a38_0x1699fb[_0x1003e4(0xbf)](_0x1003e4(0xba)+_0x2aa68d+'\x0a')),0x1;let _0x1c1bea;if(_0x43f63f){if(!_0x43f63f[_0x1003e4(0xc1)](_0x1003e4(0xbd))&&!_0x43f63f[_0x1003e4(0xc1)](_0x1003e4(0x9f)))return console[_0x1003e4(0xc3)](a38_0x1699fb[_0x1003e4(0xbf)]('Error:\x20File\x20must\x20have\x20.yml\x20or\x20.yaml\x20extension:\x20'+_0x43f63f+'\x0a')),0x1;_0x1c1bea=[_0x43f63f];}else _0x1c1bea=findYamlFiles(_0x2aa68d);if(_0x1c1bea['length']===0x0)return console[_0x1003e4(0xc3)](a38_0x1699fb['red'](_0x1003e4(0x94)+_0x2aa68d+'\x0a')),0x1;const _0x49f179=validateYamlFiles(_0x1c1bea,_0x2aa68d),_0x57fa4f=calculateSummary(_0x49f179);for(const _0x5c8354 of _0x49f179){if(!isValidationResult(_0x5c8354))continue;const {relativePath:_0x2cf25c,source:_0x106e40,result:_0x5ca0eb,fileType:_0x2f9682}=_0x5c8354,_0x12f5b3=_0x2f9682;if(_0x5ca0eb[_0x1003e4(0xb1)]&&_0x5ca0eb[_0x1003e4(0xbe)][_0x1003e4(0xac)]===0x0)_0x3ed40d[_0x1003e4(0xa6)]&&console[_0x1003e4(0xb9)](a38_0x1699fb['green']('✔\x20'+_0x2cf25c)+a38_0x1699fb[_0x1003e4(0x9a)]('\x20('+_0x12f5b3+')'));else _0x5ca0eb['valid']?(console[_0x1003e4(0xb9)](a38_0x1699fb[_0x1003e4(0x9d)]('⚠\x20'+_0x2cf25c)+a38_0x1699fb[_0x1003e4(0x9a)]('\x20('+_0x12f5b3+_0x1003e4(0xad)+_0x5ca0eb[_0x1003e4(0xbe)][_0x1003e4(0xac)]+_0x1003e4(0xbb))),console[_0x1003e4(0xb9)](formatValidationResult(_0x5ca0eb,_0x106e40,_0x2cf25c))):(console[_0x1003e4(0xb9)](a38_0x1699fb[_0x1003e4(0xbf)]('✖\x20'+_0x2cf25c)+a38_0x1699fb['dim']('\x20('+_0x12f5b3+'):\x20'+_0x5ca0eb[_0x1003e4(0xaa)][_0x1003e4(0xac)]+_0x1003e4(0x92))),console[_0x1003e4(0xb9)](formatValidationResult(_0x5ca0eb,_0x106e40,_0x2cf25c)));}return console[_0x1003e4(0xb9)](''),_0x57fa4f[_0x1003e4(0xb4)]?(console[_0x1003e4(0xb9)](a38_0x1699fb['red'](_0x1003e4(0xb7)+_0x57fa4f[_0x1003e4(0xc0)]+_0x1003e4(0xb0)+_0x57fa4f[_0x1003e4(0xa8)]+_0x1003e4(0x96))),_0x57fa4f[_0x1003e4(0xa7)]>0x0&&console['log'](a38_0x1699fb[_0x1003e4(0x9d)](_0x57fa4f[_0x1003e4(0xa7)]+'\x20warning(s)\x20found')),0x1):(console[_0x1003e4(0xb9)](a38_0x1699fb[_0x1003e4(0xbc)](_0x1003e4(0xa3)+_0x57fa4f[_0x1003e4(0xa8)]+_0x1003e4(0x93))),_0x57fa4f[_0x1003e4(0xa7)]>0x0&&console['log'](a38_0x1699fb[_0x1003e4(0x9d)](_0x57fa4f[_0x1003e4(0xa7)]+_0x1003e4(0x9b))),0x0);}}
1
+ const a38_0x481257=a38_0x4c57;(function(_0xa41601,_0x4ffaa1){const _0x357661=a38_0x4c57,_0x4ef1fb=_0xa41601();while(!![]){try{const _0x334e98=parseInt(_0x357661(0x19b))/0x1+-parseInt(_0x357661(0x186))/0x2+-parseInt(_0x357661(0x19d))/0x3+parseInt(_0x357661(0x197))/0x4*(-parseInt(_0x357661(0x1a0))/0x5)+parseInt(_0x357661(0x1a7))/0x6+parseInt(_0x357661(0x189))/0x7*(-parseInt(_0x357661(0x182))/0x8)+parseInt(_0x357661(0x191))/0x9*(parseInt(_0x357661(0x195))/0xa);if(_0x334e98===_0x4ffaa1)break;else _0x4ef1fb['push'](_0x4ef1fb['shift']());}catch(_0x4dc278){_0x4ef1fb['push'](_0x4ef1fb['shift']());}}}(a38_0x2eb9,0x1f384));import{BaseCommand}from'./command.js';function a38_0x4c57(_0x50cb97,_0x4db672){_0x50cb97=_0x50cb97-0x17f;const _0x2eb99=a38_0x2eb9();let _0x4c57c2=_0x2eb99[_0x50cb97];return _0x4c57c2;}import{resolveTarget,isSuccessfulResolution}from'../sdk/segment/target-resolution.js';import{findYamlFiles}from'../sdk/segment/file-discovery.js';import{existsSync}from'fs';import a38_0x1e3f82 from'chalk';import{formatValidationResult}from'../sdk/segment/yaml-validator.js';import{validateYamlFiles,isValidationResult,calculateSummary}from'../sdk/segment/validate-files.js';function a38_0x2eb9(){const _0x303ff2=['log','✔\x20All\x20','dim','length','1968304JELZxl','\x20file(s)\x20with\x20errors,\x20','verbose','helpText','205938IdVlFR','Error:\x20','validCount','7LgqwyZ','Usage:\x20tdx\x20sg\x20validate\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Validate\x20all\x20(requires\x20context)','endsWith','description','):\x20','\x20valid','yellow','parent_segment\x20is\x20not\x20set.\x20Use\x20`tdx\x20sg\x20use\x20<parent_name>`\x20to\x20set\x20it.\x0a','4671fJejHG','invalidCount','red','cwd','9670BCtoBZ','warnings','4rQJMGt','targetDir','\x20\x20\x20\x20\x20\x20\x20tdx\x20sg\x20validate\x20<file_path>\x20\x20#\x20Validate\x20specific\x20file','execute','43437LrJTeM','valid','109467XHcoIS','Error:\x20File\x20must\x20have\x20.yml\x20or\x20.yaml\x20extension:\x20','cyan','681265LJNgWh','green','file','filePath','\x20warning(s)','\x20error(s)','no_parent','625890vquLXI','\x20warning(s)\x20found','name','message','Validation\x20failed:\x20','.yml','warningCount','hasErrors','.yaml','error'];a38_0x2eb9=function(){return _0x303ff2;};return a38_0x2eb9();}export class SegmentValidateCommand extends BaseCommand{[a38_0x481257(0x1a9)]='segment:validate';[a38_0x481257(0x18c)]='Validate\x20segment\x20and\x20journey\x20YAML\x20files';async[a38_0x481257(0x19a)](_0x2973d2){const _0x36476b=a38_0x481257,{options:_0x4a1a16,args:_0x24a961}=_0x2973d2,_0x470f83=_0x4a1a16,_0x4c5d3f=await resolveTarget({'arg':_0x24a961[0x0],'contextParent':_0x4a1a16['parentSegment'],'cwd':process[_0x36476b(0x194)]()});if(!isSuccessfulResolution(_0x4c5d3f))return _0x4c5d3f['errorCode']===_0x36476b(0x1a6)?(console[_0x36476b(0x1b0)](a38_0x1e3f82['yellow'](_0x36476b(0x190))),console[_0x36476b(0x1b0)](_0x36476b(0x18a)),console[_0x36476b(0x1b0)]('\x20\x20\x20\x20\x20\x20\x20tdx\x20sg\x20validate\x20.\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Validate\x20current\x20directory'),console['error'](_0x36476b(0x199))):(console['error'](a38_0x1e3f82[_0x36476b(0x193)](_0x36476b(0x187)+_0x4c5d3f[_0x36476b(0x1aa)]+'\x0a')),_0x4c5d3f[_0x36476b(0x185)]&&console[_0x36476b(0x1b0)](a38_0x1e3f82[_0x36476b(0x19f)](_0x4c5d3f['helpText']))),0x1;const _0x26cb2b=_0x4c5d3f[_0x36476b(0x198)],_0x11eca9=_0x4c5d3f['type']===_0x36476b(0x1a2)?_0x4c5d3f[_0x36476b(0x1a3)]:undefined;if(!_0x11eca9&&!existsSync(_0x26cb2b))return console[_0x36476b(0x1b0)](a38_0x1e3f82[_0x36476b(0x193)]('Error:\x20Directory\x20not\x20found:\x20'+_0x26cb2b+'\x0a')),0x1;let _0x225a01;if(_0x11eca9){if(!_0x11eca9[_0x36476b(0x18b)](_0x36476b(0x1ac))&&!_0x11eca9['endsWith'](_0x36476b(0x1af)))return console[_0x36476b(0x1b0)](a38_0x1e3f82[_0x36476b(0x193)](_0x36476b(0x19e)+_0x11eca9+'\x0a')),0x1;_0x225a01=[_0x11eca9];}else _0x225a01=findYamlFiles(_0x26cb2b);if(_0x225a01[_0x36476b(0x181)]===0x0)return console[_0x36476b(0x1b0)](a38_0x1e3f82[_0x36476b(0x193)]('Error:\x20No\x20YAML\x20files\x20found\x20in\x20'+_0x26cb2b+'\x0a')),0x1;const _0x15cf09=validateYamlFiles(_0x225a01,_0x26cb2b),_0x248281=calculateSummary(_0x15cf09);for(const _0x32030c of _0x15cf09){if(!isValidationResult(_0x32030c))continue;const {relativePath:_0x26ff2b,source:_0x2731ee,result:_0x4d52ee,fileType:_0x341168}=_0x32030c,_0x268efc=_0x341168;if(_0x4d52ee[_0x36476b(0x19c)]&&_0x4d52ee[_0x36476b(0x196)]['length']===0x0)_0x470f83[_0x36476b(0x184)]&&console[_0x36476b(0x1b1)](a38_0x1e3f82['green']('✔\x20'+_0x26ff2b)+a38_0x1e3f82['dim']('\x20('+_0x268efc+')'));else _0x4d52ee[_0x36476b(0x19c)]?(console[_0x36476b(0x1b1)](a38_0x1e3f82[_0x36476b(0x18f)]('⚠\x20'+_0x26ff2b)+a38_0x1e3f82[_0x36476b(0x180)]('\x20('+_0x268efc+_0x36476b(0x18d)+_0x4d52ee['warnings']['length']+_0x36476b(0x1a4))),console[_0x36476b(0x1b1)](formatValidationResult(_0x4d52ee,_0x2731ee,_0x26ff2b))):(console['log'](a38_0x1e3f82['red']('✖\x20'+_0x26ff2b)+a38_0x1e3f82['dim']('\x20('+_0x268efc+_0x36476b(0x18d)+_0x4d52ee['errors'][_0x36476b(0x181)]+_0x36476b(0x1a5))),console[_0x36476b(0x1b1)](formatValidationResult(_0x4d52ee,_0x2731ee,_0x26ff2b)));}return console[_0x36476b(0x1b1)](''),_0x248281[_0x36476b(0x1ae)]?(console[_0x36476b(0x1b1)](a38_0x1e3f82['red'](_0x36476b(0x1ab)+_0x248281[_0x36476b(0x192)]+_0x36476b(0x183)+_0x248281[_0x36476b(0x188)]+_0x36476b(0x18e))),_0x248281[_0x36476b(0x1ad)]>0x0&&console[_0x36476b(0x1b1)](a38_0x1e3f82['yellow'](_0x248281['warningCount']+_0x36476b(0x1a8))),0x1):(console[_0x36476b(0x1b1)](a38_0x1e3f82[_0x36476b(0x1a1)](_0x36476b(0x17f)+_0x248281[_0x36476b(0x188)]+'\x20file(s)\x20valid')),_0x248281[_0x36476b(0x1ad)]>0x0&&console[_0x36476b(0x1b1)](a38_0x1e3f82[_0x36476b(0x18f)](_0x248281[_0x36476b(0x1ad)]+_0x36476b(0x1a8))),0x0);}}
@@ -1 +1 @@
1
- const a39_0x238353=a39_0x4493;(function(_0x16cb28,_0x52dc6e){const _0x5519b5=a39_0x4493,_0x5c76f9=_0x16cb28();while(!![]){try{const _0x4c17d4=-parseInt(_0x5519b5(0x108))/0x1*(parseInt(_0x5519b5(0xf6))/0x2)+parseInt(_0x5519b5(0xec))/0x3+parseInt(_0x5519b5(0x10e))/0x4*(parseInt(_0x5519b5(0xe6))/0x5)+-parseInt(_0x5519b5(0xe8))/0x6*(-parseInt(_0x5519b5(0x123))/0x7)+parseInt(_0x5519b5(0x10a))/0x8+-parseInt(_0x5519b5(0xfc))/0x9+-parseInt(_0x5519b5(0xfd))/0xa;if(_0x4c17d4===_0x52dc6e)break;else _0x5c76f9['push'](_0x5c76f9['shift']());}catch(_0x28dbc9){_0x5c76f9['push'](_0x5c76f9['shift']());}}}(a39_0x5c14,0xcf927));function a39_0x4493(_0x874b9a,_0x2dc334){_0x874b9a=_0x874b9a-0xdb;const _0x5c14ca=a39_0x5c14();let _0x449338=_0x5c14ca[_0x874b9a];return _0x449338;}import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleSDKOutput}from'../core/command-output.js';import{withSpinner}from'../utils/spinner.js';function a39_0x5c14(){const _0x3a5979=['listWithPattern','verbose','name','2928125KbYcxT','length','2873778VWvsjz',']\x20matching\x20\x27','journeyBundleName','folder','1378308fdefQW','\x20journey','folderId','folders','json','/j/da','segments','resolvePathToResource','\x20\x20tdx\x20sg\x20pull\x20\x22My\x20Audience\x22','parentId','46NzsPOZ','✔\x20Built\x20tree\x20with\x20','Resolving\x20path\x20\x27','format',',\x20and\x20','Listing\x20folders,\x20segments,\x20and\x20journeys...','5062806sKQXkZ','5181140kvYApD','localeCompare','(empty)','Error:\x20No\x20parent\x20segment\x20context\x20set.','Error:\x20','\x20matching\x20\x27','segment','\x5c$&','log','journeys','Set\x20a\x20parent\x20segment\x20context\x20first:','36506vhxWlB','/app/ps/','1455112SRdDsx','✔\x20Found\x20','Folder\x20ID:\x20','/e/','8nmNpYx','data','error','replace','type','children','journey','test','execute','Parent\x20segment\x20context:\x20','filter','\x20\x20tdx\x20sg\x20use\x20\x22My\x20Audience\x22','(not\x20set)','sort','includes','Resolving\x20parent\x20segment\x20\x27','listRecursive','map','jsonl','dim','recursive','14FrhkQT','site','\x27...','listUnified','cause','Site:\x20','\x20folder','\x20segment','Parent\x20ID:\x20','description','Use\x20tdx\x20ps\x20list\x20to\x20see\x20available\x20parent\x20segments.','List\x20folders\x20and\x20child\x20segments','listUnifiedWithJourneys','Recursive\x20mode:\x20enabled'];a39_0x5c14=function(){return _0x3a5979;};return a39_0x5c14();}import{formatFlatList,formatTree}from'../sdk/util/tree-formatter.js';import{getConsoleNextUrl}from'../sdk/client/endpoints.js';import a39_0x304fc3 from'chalk';export class SegmentsCommand extends BaseCommand{[a39_0x238353(0xe5)]=a39_0x238353(0xf2);[a39_0x238353(0xde)]=a39_0x238353(0xe0);async[a39_0x238353(0x116)](_0x3e6b01){const _0x120ce6=a39_0x238353,{options:_0x13b342,args:_0x38cd02}=_0x3e6b01,_0x33dbfd=_0x13b342[_0x120ce6(0x122)],_0x27fef8=_0x38cd02[0x0];try{const _0x347507=_0x13b342['parentSegment'];_0x13b342[_0x120ce6(0xe4)]&&(console['error'](_0x120ce6(0x128)+_0x13b342[_0x120ce6(0x124)]),console[_0x120ce6(0x110)](_0x120ce6(0x117)+(_0x347507||_0x120ce6(0x11a))),_0x27fef8&&console[_0x120ce6(0x110)]('Folder/pattern\x20arg:\x20'+_0x27fef8),_0x33dbfd&&console[_0x120ce6(0x110)](_0x120ce6(0xe2)));if(!_0x347507)return console[_0x120ce6(0x110)](_0x120ce6(0x100)),console[_0x120ce6(0x110)](''),console[_0x120ce6(0x110)](_0x120ce6(0x107)),console[_0x120ce6(0x110)](_0x120ce6(0xf4)),console['error'](_0x120ce6(0x119)),console[_0x120ce6(0x110)](''),console[_0x120ce6(0x110)](_0x120ce6(0xdf)),0x1;const _0x2354e5=_0x27fef8&&(_0x27fef8[_0x120ce6(0x11c)]('*')||_0x27fef8[_0x120ce6(0x11c)]('?'));if(_0x2354e5)return await this[_0x120ce6(0xe3)](_0x3e6b01,_0x347507,_0x27fef8);const _0x1848d2=_0x27fef8?_0x347507+'/'+_0x27fef8:_0x347507;return _0x33dbfd?await this[_0x120ce6(0x11e)](_0x3e6b01,_0x1848d2):await this['listUnified'](_0x3e6b01,_0x1848d2);}catch(_0x3f0cd0){if(_0x3f0cd0 instanceof SDKError)return console['error'](_0x120ce6(0x101)+_0x3f0cd0['message']),_0x3f0cd0[_0x120ce6(0x127)]&&console[_0x120ce6(0x110)]('\x20\x20Cause:\x20'+_0x3f0cd0[_0x120ce6(0x127)]),0x1;throw _0x3f0cd0;}}async['listWithPattern'](_0x7b222b,_0x4bf951,_0x17a37e){const _0x1f3313=a39_0x238353,{options:_0xa70d6,tdx:_0x278561}=_0x7b222b,_0x4b60ee=await withSpinner(_0x1f3313(0x11d)+_0x4bf951+_0x1f3313(0x125),()=>_0x278561['segment'][_0x1f3313(0xf3)](_0x4bf951),{'verbose':_0xa70d6[_0x1f3313(0xe4)]}),_0x9892c3=_0x4b60ee[_0x1f3313(0x10f)],_0x2d9d93=await withSpinner(_0x1f3313(0xfb),()=>_0x278561[_0x1f3313(0x103)]['listUnifiedWithJourneys'](_0x9892c3[_0x1f3313(0xf5)],_0x9892c3[_0x1f3313(0xee)]),{'verbose':_0xa70d6[_0x1f3313(0xe4)]}),{folders:_0x4d2587,segments:_0x3f09e3,journeys:_0xa69110}=_0x2d9d93['data'],_0x427ccb=_0x17a37e[_0x1f3313(0x111)](/[.+^${}()|[\]\\]/g,_0x1f3313(0x104))[_0x1f3313(0x111)](/\*/g,'.*')[_0x1f3313(0x111)](/\?/g,'.'),_0x407959=new RegExp('^'+_0x427ccb+'$','i'),_0x2b973e=_0x4d2587[_0x1f3313(0x118)](_0x56d5e5=>_0x407959[_0x1f3313(0x115)](_0x56d5e5[_0x1f3313(0xe5)])),_0x3fce47=_0x3f09e3[_0x1f3313(0x118)](_0x204888=>_0x407959[_0x1f3313(0x115)](_0x204888[_0x1f3313(0xe5)])),_0xc207ca=_0xa69110[_0x1f3313(0x118)](_0x129a3f=>_0x407959[_0x1f3313(0x115)](_0x129a3f[_0x1f3313(0xea)])),_0xb06dc8=_0x2b973e[_0x1f3313(0xe7)]+_0x3fce47[_0x1f3313(0xe7)]+_0xc207ca['length'];console[_0x1f3313(0x110)](_0x1f3313(0x10b)+_0x2b973e[_0x1f3313(0xe7)]+'\x20folder'+(_0x2b973e[_0x1f3313(0xe7)]!==0x1?'s':'')+',\x20'+_0x3fce47['length']+_0x1f3313(0xdc)+(_0x3fce47[_0x1f3313(0xe7)]!==0x1?'s':'')+',\x20and\x20'+_0xc207ca[_0x1f3313(0xe7)]+_0x1f3313(0xed)+(_0xc207ca[_0x1f3313(0xe7)]!==0x1?'s':'')+_0x1f3313(0x102)+_0x17a37e+'\x27');const _0x1309ab=_0x57ac63=>{const _0x5ddd26=_0x1f3313;return getConsoleNextUrl(_0xa70d6[_0x5ddd26(0x124)],_0x5ddd26(0x109)+_0x9892c3[_0x5ddd26(0xf5)]+'/e/'+_0x57ac63);},_0x5951ce=_0xa70d6[_0x1f3313(0xf9)]===_0x1f3313(0xf0)||_0xa70d6[_0x1f3313(0xf9)]==='jsonl';if(_0x5951ce){const _0x9d901a=[..._0x2b973e[_0x1f3313(0x11f)](_0x27127c=>({..._0x27127c,'type':'folder'})),..._0x3fce47[_0x1f3313(0x11f)](_0x28624a=>({..._0x28624a,'type':_0x1f3313(0x103),'url':_0x1309ab(_0x28624a['id'])})),..._0xc207ca[_0x1f3313(0x11f)](_0x333cec=>({..._0x333cec,'name':_0x333cec[_0x1f3313(0xea)],'type':_0x1f3313(0x114)}))]['sort']((_0x1c32a0,_0x1ac1d4)=>_0x1c32a0[_0x1f3313(0xe5)][_0x1f3313(0xfe)](_0x1ac1d4[_0x1f3313(0xe5)]));await handleSDKOutput(_0x9d901a,_0xa70d6);}else{if(_0xb06dc8===0x0)console[_0x1f3313(0x105)]('No\x20items\x20match\x20pattern:\x20'+_0x17a37e);else{console[_0x1f3313(0x105)](a39_0x304fc3[_0x1f3313(0x121)]('['+_0x4bf951+_0x1f3313(0xe9)+_0x17a37e+'\x27'));const _0x51f8c8=formatFlatList(_0x2b973e,_0x3fce47,{'showMetadata':!![],'getSegmentUrl':_0x1309ab},_0xc207ca);console[_0x1f3313(0x105)](_0x51f8c8);}}return 0x0;}async[a39_0x238353(0x126)](_0x43738b,_0x38bb38){const _0x20502b=a39_0x238353,{options:_0x32b0c0,tdx:_0x1ce251}=_0x43738b,_0x194dc9=await withSpinner(_0x20502b(0xf8)+_0x38bb38+_0x20502b(0x125),()=>_0x1ce251[_0x20502b(0x103)][_0x20502b(0xf3)](_0x38bb38),{'verbose':_0x32b0c0['verbose']}),_0x4394a1=_0x194dc9[_0x20502b(0x10f)];_0x32b0c0[_0x20502b(0xe4)]&&(console[_0x20502b(0x110)](_0x20502b(0xdd)+_0x4394a1[_0x20502b(0xf5)]),_0x4394a1[_0x20502b(0xee)]&&console[_0x20502b(0x110)](_0x20502b(0x10c)+_0x4394a1[_0x20502b(0xee)]));const _0x5d72c9=await withSpinner(_0x20502b(0xfb),()=>_0x1ce251[_0x20502b(0x103)][_0x20502b(0xe1)](_0x4394a1[_0x20502b(0xf5)],_0x4394a1['folderId']),{'verbose':_0x32b0c0[_0x20502b(0xe4)]}),{folders:_0x1a3a08,segments:_0x5cc140,journeys:_0x38e70a}=_0x5d72c9[_0x20502b(0x10f)],_0x12fe05=_0x1a3a08['length']+_0x5cc140['length']+_0x38e70a['length'];console[_0x20502b(0x110)](_0x20502b(0x10b)+_0x1a3a08[_0x20502b(0xe7)]+'\x20folder'+(_0x1a3a08[_0x20502b(0xe7)]!==0x1?'s':'')+',\x20'+_0x5cc140['length']+_0x20502b(0xdc)+(_0x5cc140[_0x20502b(0xe7)]!==0x1?'s':'')+_0x20502b(0xfa)+_0x38e70a['length']+_0x20502b(0xed)+(_0x38e70a[_0x20502b(0xe7)]!==0x1?'s':''));const _0x4ba948=_0x131465=>{const _0x17f77f=_0x20502b;return getConsoleNextUrl(_0x32b0c0[_0x17f77f(0x124)],'/app/ps/'+_0x4394a1[_0x17f77f(0xf5)]+_0x17f77f(0x10d)+_0x131465);},_0x1189e2=_0x2d7cba=>{const _0x4a7fa0=_0x20502b;return getConsoleNextUrl(_0x32b0c0[_0x4a7fa0(0x124)],'/app/ps/'+_0x4394a1[_0x4a7fa0(0xf5)]+_0x4a7fa0(0x10d)+_0x2d7cba+_0x4a7fa0(0xf1));},_0x3de483=_0x32b0c0[_0x20502b(0xf9)]==='json'||_0x32b0c0['format']===_0x20502b(0x120);if(_0x3de483){const _0xd7d55=[..._0x1a3a08[_0x20502b(0x11f)](_0x42053d=>({..._0x42053d,'type':_0x20502b(0xeb)})),..._0x5cc140[_0x20502b(0x11f)](_0x27505a=>({..._0x27505a,'type':_0x20502b(0x103),'url':_0x4ba948(_0x27505a['id'])})),..._0x38e70a['map'](_0xc351f7=>({..._0xc351f7,'name':_0xc351f7[_0x20502b(0xea)],'type':'journey','url':_0x1189e2(_0xc351f7['id'])}))][_0x20502b(0x11b)]((_0x269230,_0x3077ee)=>_0x269230['name']['localeCompare'](_0x3077ee[_0x20502b(0xe5)]));await handleSDKOutput(_0xd7d55,_0x32b0c0);}else{if(_0x12fe05===0x0)console[_0x20502b(0x105)](a39_0x304fc3['dim']('['+_0x38bb38+']')),console[_0x20502b(0x105)](_0x20502b(0xff));else{console[_0x20502b(0x105)](a39_0x304fc3[_0x20502b(0x121)]('['+_0x38bb38+']'));const _0xa1c38c=formatFlatList(_0x1a3a08,_0x5cc140,{'showMetadata':!![],'getSegmentUrl':_0x4ba948,'getJourneyUrl':_0x1189e2},_0x38e70a);console[_0x20502b(0x105)](_0xa1c38c);}}return 0x0;}async[a39_0x238353(0x11e)](_0x20fc58,_0x10a733){const _0x230cb5=a39_0x238353,{options:_0x217b95,tdx:_0x34499e}=_0x20fc58,_0x751dd=await withSpinner(_0x230cb5(0xf8)+_0x10a733+'\x27...',()=>_0x34499e[_0x230cb5(0x103)][_0x230cb5(0xf3)](_0x10a733),{'verbose':_0x217b95[_0x230cb5(0xe4)]}),_0x3440e3=_0x751dd[_0x230cb5(0x10f)];_0x217b95['verbose']&&(console[_0x230cb5(0x110)](_0x230cb5(0xdd)+_0x3440e3[_0x230cb5(0xf5)]),_0x3440e3[_0x230cb5(0xee)]&&console[_0x230cb5(0x110)](_0x230cb5(0x10c)+_0x3440e3[_0x230cb5(0xee)]));const _0x293f34=_0x217b95['maxDepth']||0xa,_0x35da51=await withSpinner('Building\x20hierarchy\x20tree...',()=>_0x34499e[_0x230cb5(0x103)][_0x230cb5(0x11e)](_0x3440e3[_0x230cb5(0xf5)],_0x3440e3[_0x230cb5(0xee)],0x0,_0x293f34),{'verbose':_0x217b95[_0x230cb5(0xe4)]}),_0x2b8142=_0x35da51[_0x230cb5(0x10f)],_0x15ae43=_0x2ce5c7=>{const _0x15a207=_0x230cb5;let _0x118223=0x0,_0x4def19=0x0,_0x47bc56=0x0;for(const _0x3db494 of _0x2ce5c7){if(_0x3db494['type']===_0x15a207(0xeb))_0x118223++;else{if(_0x3db494['type']===_0x15a207(0x103))_0x4def19++;else{if(_0x3db494[_0x15a207(0x112)]===_0x15a207(0x114))_0x47bc56++;}}if(_0x3db494[_0x15a207(0x113)]){const _0x5b3893=_0x15ae43(_0x3db494[_0x15a207(0x113)]);_0x118223+=_0x5b3893[_0x15a207(0xef)],_0x4def19+=_0x5b3893[_0x15a207(0xf2)],_0x47bc56+=_0x5b3893[_0x15a207(0x106)];}}return{'folders':_0x118223,'segments':_0x4def19,'journeys':_0x47bc56};},_0x72ad05=_0x15ae43(_0x2b8142);console['error'](_0x230cb5(0xf7)+_0x72ad05['folders']+_0x230cb5(0xdb)+(_0x72ad05[_0x230cb5(0xef)]!==0x1?'s':'')+',\x20'+_0x72ad05[_0x230cb5(0xf2)]+_0x230cb5(0xdc)+(_0x72ad05['segments']!==0x1?'s':'')+_0x230cb5(0xfa)+_0x72ad05['journeys']+'\x20journey'+(_0x72ad05[_0x230cb5(0x106)]!==0x1?'s':''));const _0x2c4ea4=_0x4bd0ef=>{const _0x563c6b=_0x230cb5;return getConsoleNextUrl(_0x217b95['site'],'/app/ps/'+_0x3440e3[_0x563c6b(0xf5)]+_0x563c6b(0x10d)+_0x4bd0ef);},_0x5543bd=_0xb6e7e2=>{const _0x4c785e=_0x230cb5;return getConsoleNextUrl(_0x217b95['site'],_0x4c785e(0x109)+_0x3440e3[_0x4c785e(0xf5)]+_0x4c785e(0x10d)+_0xb6e7e2+_0x4c785e(0xf1));};if(_0x217b95[_0x230cb5(0xf9)]===_0x230cb5(0xf0)||_0x217b95[_0x230cb5(0xf9)]===_0x230cb5(0x120))await handleSDKOutput(_0x2b8142,_0x217b95);else{console[_0x230cb5(0x105)](a39_0x304fc3[_0x230cb5(0x121)]('['+_0x10a733+']'));const _0x1a8067=formatTree(_0x2b8142,{'showMetadata':!![],'getSegmentUrl':_0x2c4ea4,'getJourneyUrl':_0x5543bd});console[_0x230cb5(0x105)](_0x1a8067);}return 0x0;}}
1
+ const a39_0x39c55a=a39_0x2e25;(function(_0x47bd1b,_0x2d0bf4){const _0x45dda1=a39_0x2e25,_0xaa123c=_0x47bd1b();while(!![]){try{const _0x1885ef=-parseInt(_0x45dda1(0x182))/0x1*(-parseInt(_0x45dda1(0x19f))/0x2)+parseInt(_0x45dda1(0x168))/0x3*(-parseInt(_0x45dda1(0x163))/0x4)+parseInt(_0x45dda1(0x17a))/0x5+parseInt(_0x45dda1(0x1a4))/0x6*(-parseInt(_0x45dda1(0x195))/0x7)+parseInt(_0x45dda1(0x17d))/0x8+-parseInt(_0x45dda1(0x166))/0x9+parseInt(_0x45dda1(0x180))/0xa;if(_0x1885ef===_0x2d0bf4)break;else _0xaa123c['push'](_0xaa123c['shift']());}catch(_0x4cdd8a){_0xaa123c['push'](_0xaa123c['shift']());}}}(a39_0x3460,0xb98cf));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleSDKOutput}from'../core/command-output.js';import{withSpinner}from'../utils/spinner.js';import{formatFlatList,formatTree}from'../sdk/util/tree-formatter.js';import{getConsoleNextUrl}from'../sdk/client/endpoints.js';import a39_0x40afd3 from'chalk';function a39_0x2e25(_0x496c90,_0x27481e){_0x496c90=_0x496c90-0x159;const _0x3460e0=a39_0x3460();let _0x2e255e=_0x3460e0[_0x496c90];return _0x2e255e;}function a39_0x3460(){const _0x5637ae=['segments','Site:\x20','List\x20folders\x20and\x20child\x20segments','resolvePathToResource','Recursive\x20mode:\x20enabled','listWithPattern','recursive',',\x20and\x20','json','map','journeys','2700305wFCFji','No\x20items\x20match\x20pattern:\x20','listRecursive','3563120GwaDXA','includes','Folder/pattern\x20arg:\x20','11736830UoXogj','cause','2HXbXig','/app/ps/','Parent\x20segment\x20context:\x20','type','message','\x20\x20tdx\x20sg\x20pull\x20\x22My\x20Audience\x22','✔\x20Found\x20','test','format','children','\x27...','(empty)','Resolving\x20parent\x20segment\x20\x27','segment','Listing\x20folders,\x20segments,\x20and\x20journeys...','data','dim','\x20folder','length','4430531eHpzjS','localeCompare','execute','\x20segment','Building\x20hierarchy\x20tree...','(not\x20set)','folders','name','log','parentId','525996OTfUVU','replace','verbose','Folder\x20ID:\x20','✔\x20Built\x20tree\x20with\x20','6tDpqyA','filter','folder','maxDepth','parentSegment','Resolving\x20path\x20\x27','site','\x20matching\x20\x27','Use\x20tdx\x20ps\x20list\x20to\x20see\x20available\x20parent\x20segments.','Parent\x20ID:\x20','\x20\x20Cause:\x20','/j/da','/e/','listUnifiedWithJourneys','journey','49732MIWlTH','\x20\x20tdx\x20sg\x20use\x20\x22My\x20Audience\x22','journeyBundleName','2565981hfwmtt','folderId','243akVYsp','sort','\x5c$&',']\x20matching\x20\x27','\x20journey','error','listUnified'];a39_0x3460=function(){return _0x5637ae;};return a39_0x3460();}export class SegmentsCommand extends BaseCommand{[a39_0x39c55a(0x19c)]=a39_0x39c55a(0x16f);['description']=a39_0x39c55a(0x171);async[a39_0x39c55a(0x197)](_0x5179f6){const _0x76d547=a39_0x39c55a,{options:_0x48e3af,args:_0x5871d7}=_0x5179f6,_0x1c29ad=_0x48e3af[_0x76d547(0x175)],_0xc58dbf=_0x5871d7[0x0];try{const _0x544fe7=_0x48e3af[_0x76d547(0x1a8)];_0x48e3af['verbose']&&(console['error'](_0x76d547(0x170)+_0x48e3af[_0x76d547(0x15a)]),console['error'](_0x76d547(0x184)+(_0x544fe7||_0x76d547(0x19a))),_0xc58dbf&&console[_0x76d547(0x16d)](_0x76d547(0x17f)+_0xc58dbf),_0x1c29ad&&console[_0x76d547(0x16d)](_0x76d547(0x173)));if(!_0x544fe7)return console[_0x76d547(0x16d)]('Error:\x20No\x20parent\x20segment\x20context\x20set.'),console[_0x76d547(0x16d)](''),console[_0x76d547(0x16d)]('Set\x20a\x20parent\x20segment\x20context\x20first:'),console[_0x76d547(0x16d)](_0x76d547(0x187)),console[_0x76d547(0x16d)](_0x76d547(0x164)),console[_0x76d547(0x16d)](''),console[_0x76d547(0x16d)](_0x76d547(0x15c)),0x1;const _0x1bd475=_0xc58dbf&&(_0xc58dbf[_0x76d547(0x17e)]('*')||_0xc58dbf[_0x76d547(0x17e)]('?'));if(_0x1bd475)return await this['listWithPattern'](_0x5179f6,_0x544fe7,_0xc58dbf);const _0xd0147d=_0xc58dbf?_0x544fe7+'/'+_0xc58dbf:_0x544fe7;return _0x1c29ad?await this['listRecursive'](_0x5179f6,_0xd0147d):await this['listUnified'](_0x5179f6,_0xd0147d);}catch(_0x18c1e4){if(_0x18c1e4 instanceof SDKError)return console[_0x76d547(0x16d)]('Error:\x20'+_0x18c1e4[_0x76d547(0x186)]),_0x18c1e4[_0x76d547(0x181)]&&console['error'](_0x76d547(0x15e)+_0x18c1e4[_0x76d547(0x181)]),0x1;throw _0x18c1e4;}}async[a39_0x39c55a(0x174)](_0x2d7f5f,_0x231c1e,_0x5d8060){const _0x30ec9c=a39_0x39c55a,{options:_0x27e311,tdx:_0x547876}=_0x2d7f5f,_0x59741b=await withSpinner(_0x30ec9c(0x18e)+_0x231c1e+_0x30ec9c(0x18c),()=>_0x547876[_0x30ec9c(0x18f)][_0x30ec9c(0x172)](_0x231c1e),{'verbose':_0x27e311[_0x30ec9c(0x1a1)]}),_0x47fbf2=_0x59741b[_0x30ec9c(0x191)],_0x5a0670=await withSpinner('Listing\x20folders,\x20segments,\x20and\x20journeys...',()=>_0x547876[_0x30ec9c(0x18f)][_0x30ec9c(0x161)](_0x47fbf2[_0x30ec9c(0x19e)],_0x47fbf2[_0x30ec9c(0x167)]),{'verbose':_0x27e311['verbose']}),{folders:_0x237018,segments:_0x2fd7f1,journeys:_0xde4f51}=_0x5a0670[_0x30ec9c(0x191)],_0x5ce239=_0x5d8060[_0x30ec9c(0x1a0)](/[.+^${}()|[\]\\]/g,_0x30ec9c(0x16a))['replace'](/\*/g,'.*')[_0x30ec9c(0x1a0)](/\?/g,'.'),_0x82b03f=new RegExp('^'+_0x5ce239+'$','i'),_0x176ba6=_0x237018[_0x30ec9c(0x1a5)](_0x23568e=>_0x82b03f['test'](_0x23568e[_0x30ec9c(0x19c)])),_0x68b2f=_0x2fd7f1[_0x30ec9c(0x1a5)](_0x3784bf=>_0x82b03f[_0x30ec9c(0x189)](_0x3784bf[_0x30ec9c(0x19c)])),_0x270ad5=_0xde4f51[_0x30ec9c(0x1a5)](_0x2bc1b1=>_0x82b03f[_0x30ec9c(0x189)](_0x2bc1b1['journeyBundleName'])),_0x5170bc=_0x176ba6[_0x30ec9c(0x194)]+_0x68b2f['length']+_0x270ad5['length'];console[_0x30ec9c(0x16d)](_0x30ec9c(0x188)+_0x176ba6[_0x30ec9c(0x194)]+'\x20folder'+(_0x176ba6[_0x30ec9c(0x194)]!==0x1?'s':'')+',\x20'+_0x68b2f[_0x30ec9c(0x194)]+_0x30ec9c(0x198)+(_0x68b2f['length']!==0x1?'s':'')+_0x30ec9c(0x176)+_0x270ad5[_0x30ec9c(0x194)]+'\x20journey'+(_0x270ad5[_0x30ec9c(0x194)]!==0x1?'s':'')+_0x30ec9c(0x15b)+_0x5d8060+'\x27');const _0x45e526=_0x3349f3=>{const _0x26acf3=_0x30ec9c;return getConsoleNextUrl(_0x27e311['site'],_0x26acf3(0x183)+_0x47fbf2['parentId']+_0x26acf3(0x160)+_0x3349f3);},_0x42c2b1=_0x27e311['format']===_0x30ec9c(0x177)||_0x27e311[_0x30ec9c(0x18a)]==='jsonl';if(_0x42c2b1){const _0x431608=[..._0x176ba6['map'](_0x4b0ffd=>({..._0x4b0ffd,'type':_0x30ec9c(0x1a6)})),..._0x68b2f['map'](_0x5a3b95=>({..._0x5a3b95,'type':'segment','url':_0x45e526(_0x5a3b95['id'])})),..._0x270ad5['map'](_0x35eecc=>({..._0x35eecc,'name':_0x35eecc[_0x30ec9c(0x165)],'type':_0x30ec9c(0x162)}))][_0x30ec9c(0x169)]((_0x3a0387,_0x54c53e)=>_0x3a0387[_0x30ec9c(0x19c)]['localeCompare'](_0x54c53e['name']));await handleSDKOutput(_0x431608,_0x27e311);}else{if(_0x5170bc===0x0)console[_0x30ec9c(0x19d)](_0x30ec9c(0x17b)+_0x5d8060);else{console[_0x30ec9c(0x19d)](a39_0x40afd3['dim']('['+_0x231c1e+_0x30ec9c(0x16b)+_0x5d8060+'\x27'));const _0x2a90cd=formatFlatList(_0x176ba6,_0x68b2f,{'showMetadata':!![],'getSegmentUrl':_0x45e526},_0x270ad5);console[_0x30ec9c(0x19d)](_0x2a90cd);}}return 0x0;}async[a39_0x39c55a(0x16e)](_0x3b9f9c,_0x4c8037){const _0x3f8866=a39_0x39c55a,{options:_0x4b7567,tdx:_0x21fb5d}=_0x3b9f9c,_0xfafea3=await withSpinner(_0x3f8866(0x159)+_0x4c8037+_0x3f8866(0x18c),()=>_0x21fb5d['segment'][_0x3f8866(0x172)](_0x4c8037),{'verbose':_0x4b7567[_0x3f8866(0x1a1)]}),_0x6b4509=_0xfafea3[_0x3f8866(0x191)];_0x4b7567['verbose']&&(console[_0x3f8866(0x16d)](_0x3f8866(0x15d)+_0x6b4509[_0x3f8866(0x19e)]),_0x6b4509['folderId']&&console['error'](_0x3f8866(0x1a2)+_0x6b4509[_0x3f8866(0x167)]));const _0xa61476=await withSpinner(_0x3f8866(0x190),()=>_0x21fb5d[_0x3f8866(0x18f)]['listUnifiedWithJourneys'](_0x6b4509[_0x3f8866(0x19e)],_0x6b4509[_0x3f8866(0x167)]),{'verbose':_0x4b7567[_0x3f8866(0x1a1)]}),{folders:_0x57c89e,segments:_0x17d992,journeys:_0x1357ab}=_0xa61476['data'],_0x5d07f8=_0x57c89e['length']+_0x17d992[_0x3f8866(0x194)]+_0x1357ab[_0x3f8866(0x194)];console[_0x3f8866(0x16d)](_0x3f8866(0x188)+_0x57c89e[_0x3f8866(0x194)]+_0x3f8866(0x193)+(_0x57c89e[_0x3f8866(0x194)]!==0x1?'s':'')+',\x20'+_0x17d992[_0x3f8866(0x194)]+'\x20segment'+(_0x17d992[_0x3f8866(0x194)]!==0x1?'s':'')+_0x3f8866(0x176)+_0x1357ab[_0x3f8866(0x194)]+_0x3f8866(0x16c)+(_0x1357ab['length']!==0x1?'s':''));const _0x289a25=_0x2ea605=>{const _0x193794=_0x3f8866;return getConsoleNextUrl(_0x4b7567[_0x193794(0x15a)],_0x193794(0x183)+_0x6b4509[_0x193794(0x19e)]+_0x193794(0x160)+_0x2ea605);},_0x47e405=_0x295a43=>{const _0x18b586=_0x3f8866;return getConsoleNextUrl(_0x4b7567[_0x18b586(0x15a)],'/app/ps/'+_0x6b4509[_0x18b586(0x19e)]+_0x18b586(0x160)+_0x295a43+_0x18b586(0x15f));},_0x5683b0=_0x4b7567[_0x3f8866(0x18a)]===_0x3f8866(0x177)||_0x4b7567['format']==='jsonl';if(_0x5683b0){const _0x4f66de=[..._0x57c89e[_0x3f8866(0x178)](_0x3c7834=>({..._0x3c7834,'type':_0x3f8866(0x1a6)})),..._0x17d992[_0x3f8866(0x178)](_0x435138=>({..._0x435138,'type':_0x3f8866(0x18f),'url':_0x289a25(_0x435138['id'])})),..._0x1357ab['map'](_0x4faed6=>({..._0x4faed6,'name':_0x4faed6[_0x3f8866(0x165)],'type':_0x3f8866(0x162),'url':_0x47e405(_0x4faed6['id'])}))][_0x3f8866(0x169)]((_0x503bf1,_0x4021da)=>_0x503bf1['name'][_0x3f8866(0x196)](_0x4021da[_0x3f8866(0x19c)]));await handleSDKOutput(_0x4f66de,_0x4b7567);}else{if(_0x5d07f8===0x0)console[_0x3f8866(0x19d)](a39_0x40afd3['dim']('['+_0x4c8037+']')),console[_0x3f8866(0x19d)](_0x3f8866(0x18d));else{console[_0x3f8866(0x19d)](a39_0x40afd3[_0x3f8866(0x192)]('['+_0x4c8037+']'));const _0x3ac395=formatFlatList(_0x57c89e,_0x17d992,{'showMetadata':!![],'getSegmentUrl':_0x289a25,'getJourneyUrl':_0x47e405},_0x1357ab);console[_0x3f8866(0x19d)](_0x3ac395);}}return 0x0;}async[a39_0x39c55a(0x17c)](_0x3ac9fc,_0x3d8d1b){const _0x36a241=a39_0x39c55a,{options:_0x35cbd8,tdx:_0x1a1af1}=_0x3ac9fc,_0x56a2bc=await withSpinner('Resolving\x20path\x20\x27'+_0x3d8d1b+_0x36a241(0x18c),()=>_0x1a1af1['segment'][_0x36a241(0x172)](_0x3d8d1b),{'verbose':_0x35cbd8[_0x36a241(0x1a1)]}),_0x3bc667=_0x56a2bc[_0x36a241(0x191)];_0x35cbd8[_0x36a241(0x1a1)]&&(console[_0x36a241(0x16d)](_0x36a241(0x15d)+_0x3bc667[_0x36a241(0x19e)]),_0x3bc667[_0x36a241(0x167)]&&console[_0x36a241(0x16d)](_0x36a241(0x1a2)+_0x3bc667[_0x36a241(0x167)]));const _0x1d637d=_0x35cbd8[_0x36a241(0x1a7)]||0xa,_0xf1d11e=await withSpinner(_0x36a241(0x199),()=>_0x1a1af1[_0x36a241(0x18f)]['listRecursive'](_0x3bc667['parentId'],_0x3bc667[_0x36a241(0x167)],0x0,_0x1d637d),{'verbose':_0x35cbd8['verbose']}),_0x539cbe=_0xf1d11e['data'],_0x12fca1=_0x506d66=>{const _0x40f223=_0x36a241;let _0x141345=0x0,_0x5b3543=0x0,_0x252466=0x0;for(const _0x4d5e33 of _0x506d66){if(_0x4d5e33[_0x40f223(0x185)]===_0x40f223(0x1a6))_0x141345++;else{if(_0x4d5e33[_0x40f223(0x185)]===_0x40f223(0x18f))_0x5b3543++;else{if(_0x4d5e33[_0x40f223(0x185)]===_0x40f223(0x162))_0x252466++;}}if(_0x4d5e33['children']){const _0x307618=_0x12fca1(_0x4d5e33[_0x40f223(0x18b)]);_0x141345+=_0x307618['folders'],_0x5b3543+=_0x307618[_0x40f223(0x16f)],_0x252466+=_0x307618[_0x40f223(0x179)];}}return{'folders':_0x141345,'segments':_0x5b3543,'journeys':_0x252466};},_0x115fbb=_0x12fca1(_0x539cbe);console['error'](_0x36a241(0x1a3)+_0x115fbb[_0x36a241(0x19b)]+'\x20folder'+(_0x115fbb[_0x36a241(0x19b)]!==0x1?'s':'')+',\x20'+_0x115fbb[_0x36a241(0x16f)]+_0x36a241(0x198)+(_0x115fbb['segments']!==0x1?'s':'')+_0x36a241(0x176)+_0x115fbb['journeys']+_0x36a241(0x16c)+(_0x115fbb[_0x36a241(0x179)]!==0x1?'s':''));const _0x1f21da=_0x1b3d69=>{const _0x3d24c9=_0x36a241;return getConsoleNextUrl(_0x35cbd8['site'],_0x3d24c9(0x183)+_0x3bc667[_0x3d24c9(0x19e)]+'/e/'+_0x1b3d69);},_0x3119c2=_0x69b2b3=>{const _0x42ddc1=_0x36a241;return getConsoleNextUrl(_0x35cbd8[_0x42ddc1(0x15a)],'/app/ps/'+_0x3bc667[_0x42ddc1(0x19e)]+'/e/'+_0x69b2b3+_0x42ddc1(0x15f));};if(_0x35cbd8[_0x36a241(0x18a)]==='json'||_0x35cbd8[_0x36a241(0x18a)]==='jsonl')await handleSDKOutput(_0x539cbe,_0x35cbd8);else{console[_0x36a241(0x19d)](a39_0x40afd3[_0x36a241(0x192)]('['+_0x3d8d1b+']'));const _0x26ae2c=formatTree(_0x539cbe,{'showMetadata':!![],'getSegmentUrl':_0x1f21da,'getJourneyUrl':_0x3119c2});console[_0x36a241(0x19d)](_0x26ae2c);}return 0x0;}}
@@ -1 +1 @@
1
- const a40_0x1d1124=a40_0x2e97;function a40_0x4b0c(){const _0x9ec3a=['site','23315mKkVXh','Error:\x20','database','data','386GnElsN','Catalog:\x20','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','limit','20158000VmwOmM','1244ekVMuQ','\x20row','7467FHpHbu','catalog','1843356SoktNm','length','description','message','cause','\x20from\x20','\x20\x20\x20or:\x20tdx\x20show\x20<catalog.database.table>','error','validate','Site:\x20','1564047klyLIp','✔\x20Retrieved\x20','24cffpuL','Querying\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','showTable','table','Show\x20table\x20contents','verbose','Usage:\x20tdx\x20show\x20<database.table>','3533257XRlvxU','query','2448375DDUYqz','args'];a40_0x4b0c=function(){return _0x9ec3a;};return a40_0x4b0c();}function a40_0x2e97(_0x56b0ba,_0x48ae6f){_0x56b0ba=_0x56b0ba-0x12b;const _0x4b0c9a=a40_0x4b0c();let _0x2e9705=_0x4b0c9a[_0x56b0ba];return _0x2e9705;}(function(_0x35b178,_0x519579){const _0x168da9=a40_0x2e97,_0x38522a=_0x35b178();while(!![]){try{const _0x3af623=parseInt(_0x168da9(0x134))/0x1*(-parseInt(_0x168da9(0x12d))/0x2)+-parseInt(_0x168da9(0x14c))/0x3+parseInt(_0x168da9(0x132))/0x4*(parseInt(_0x168da9(0x14f))/0x5)+-parseInt(_0x168da9(0x136))/0x6+-parseInt(_0x168da9(0x14a))/0x7+-parseInt(_0x168da9(0x142))/0x8*(-parseInt(_0x168da9(0x140))/0x9)+parseInt(_0x168da9(0x131))/0xa;if(_0x3af623===_0x519579)break;else _0x38522a['push'](_0x38522a['shift']());}catch(_0x58778f){_0x38522a['push'](_0x38522a['shift']());}}}(a40_0x4b0c,0xe025d));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{['name']='show';[a40_0x1d1124(0x138)]=a40_0x1d1124(0x147);async['execute'](_0x15df57){return this['showTable'](_0x15df57);}async[a40_0x1d1124(0x145)](_0x103f97){const _0x6e647b=a40_0x1d1124,{options:_0x2041a6,args:_0x3302c1,tdx:_0x5d2a9b}=_0x103f97;let _0x941d4d;try{_0x941d4d=parseTableReference(_0x3302c1[0x0]);const _0xcd2c0e=_0x2041a6[_0x6e647b(0x12b)];!_0x941d4d['database']&&_0xcd2c0e&&(_0x941d4d['database']=_0xcd2c0e);const _0x3c3d15=validateTableDescribeReference(_0x941d4d);if(_0x3c3d15)return console[_0x6e647b(0x13d)](_0x6e647b(0x150)+_0x3c3d15),console[_0x6e647b(0x13d)](_0x6e647b(0x149)),console[_0x6e647b(0x13d)](_0x6e647b(0x13c)),console[_0x6e647b(0x13d)]('\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--database\x20<database>'),0x1;}catch(_0x57892f){return console[_0x6e647b(0x13d)](_0x6e647b(0x150)+_0x57892f[_0x6e647b(0x139)]),console['error'](_0x6e647b(0x149)),console['error'](_0x6e647b(0x13c)),console[_0x6e647b(0x13d)]('\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--database\x20<database>'),0x1;}const _0x370ce6=_0x941d4d[_0x6e647b(0x135)],_0x318190=_0x941d4d[_0x6e647b(0x12b)],_0x4b50fb=_0x941d4d[_0x6e647b(0x146)],_0x5a1e75=resolveLimit(_0x2041a6[_0x6e647b(0x130)],DEFAULT_DISPLAY_LIMIT);try{_0x2041a6[_0x6e647b(0x148)]&&(console['error'](_0x6e647b(0x13f)+_0x2041a6[_0x6e647b(0x14e)]),_0x370ce6&&console[_0x6e647b(0x13d)](_0x6e647b(0x12e)+_0x370ce6),console[_0x6e647b(0x13d)]('Database:\x20'+_0x318190),console[_0x6e647b(0x13d)]('Table:\x20'+_0x4b50fb),console[_0x6e647b(0x13d)]('Limit:\x20'+_0x5a1e75));const _0x151b18=_0x370ce6?_0x370ce6+'.'+_0x318190+'.'+_0x4b50fb:_0x318190+'.'+_0x4b50fb,_0x1fd3e4=await withSpinner(_0x6e647b(0x143)+_0x151b18+'...',()=>_0x5d2a9b[_0x6e647b(0x14b)][_0x6e647b(0x145)](_0x318190,_0x4b50fb,_0x5a1e75,_0x370ce6),{'verbose':_0x2041a6[_0x6e647b(0x148)]}),_0x52983f=_0x1fd3e4[_0x6e647b(0x12c)],_0x4148c7=_0x52983f['data'];return _0x4148c7['length']===0x0?console[_0x6e647b(0x13d)]('✔\x20Query\x20successful\x20-\x200\x20rows\x20returned'):console[_0x6e647b(0x13d)](_0x6e647b(0x141)+_0x4148c7[_0x6e647b(0x137)]+_0x6e647b(0x133)+(_0x4148c7[_0x6e647b(0x137)]!==0x1?'s':'')+_0x6e647b(0x13b)+_0x151b18),await handleSDKOutput(_0x4148c7,_0x2041a6),0x0;}catch(_0x3bab79){if(_0x3bab79 instanceof SDKError)return console[_0x6e647b(0x13d)](_0x6e647b(0x150)+_0x3bab79[_0x6e647b(0x139)]),_0x3bab79[_0x6e647b(0x13a)]&&console['error']('\x20\x20Cause:\x20'+_0x3bab79[_0x6e647b(0x13a)]),0x1;throw _0x3bab79;}}[a40_0x1d1124(0x13e)](_0x12a09c){const _0x45ff8d=a40_0x1d1124;if(_0x12a09c[_0x45ff8d(0x14d)]['length']===0x0)return _0x45ff8d(0x12f);if(_0x12a09c['args']['length']>0x1)return _0x45ff8d(0x144);return undefined;}}
1
+ const a40_0x3c0cae=a40_0x5a89;(function(_0x30aa51,_0x3dfaca){const _0x34fab7=a40_0x5a89,_0x5df885=_0x30aa51();while(!![]){try{const _0xf5c5c6=parseInt(_0x34fab7(0x1d4))/0x1*(-parseInt(_0x34fab7(0x1e7))/0x2)+-parseInt(_0x34fab7(0x1fb))/0x3+parseInt(_0x34fab7(0x1f3))/0x4*(-parseInt(_0x34fab7(0x1d2))/0x5)+parseInt(_0x34fab7(0x1d1))/0x6+-parseInt(_0x34fab7(0x1d5))/0x7+parseInt(_0x34fab7(0x1f7))/0x8+-parseInt(_0x34fab7(0x1ee))/0x9*(parseInt(_0x34fab7(0x1f8))/0xa);if(_0xf5c5c6===_0x3dfaca)break;else _0x5df885['push'](_0x5df885['shift']());}catch(_0x303f88){_0x5df885['push'](_0x5df885['shift']());}}}(a40_0x38ec,0xa321a));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';function a40_0x5a89(_0x48111d,_0x3c5e53){_0x48111d=_0x48111d-0x1d0;const _0x38ec2e=a40_0x38ec();let _0x5a89e5=_0x38ec2e[_0x48111d];return _0x5a89e5;}function a40_0x38ec(){const _0x1aac19=['cause','database','172134yioACD','\x20\x20Cause:\x20','error','...','7701480YoVhRi','5booGwD','Querying\x20','747398exjNrB','5466741sDKxpc','validate','data','\x20row','Limit:\x20','Show\x20table\x20contents','length','Usage:\x20tdx\x20show\x20<database.table>\x0a\x20\x20\x20or:\x20tdx\x20show\x20<catalog.database.table>\x0a\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--database\x20<database>\x0a\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--in\x20<database>\x0a\x0aRun\x20\x27tdx\x20show\x20--help\x27\x20for\x20more\x20options','showTable','table','\x20\x20\x20or:\x20tdx\x20show\x20<catalog.database.table>','Site:\x20','limit','verbose','message','show','site','\x20from\x20','2DGAJEO','query','Usage:\x20tdx\x20show\x20<database.table>','✔\x20Retrieved\x20','\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--database\x20<database>','Too\x20many\x20arguments\x0aUsage:\x20tdx\x20show\x20<database.table>\x0a\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--database\x20<database>\x0a\x0aRun\x20\x27tdx\x20show\x20--help\x27\x20for\x20more\x20options','Database:\x20','117HijXqs','Table:\x20','catalog','args','name','162404JFGREV','Error:\x20','description','Catalog:\x20','8338936QFjkFi','24170EIZOuO'];a40_0x38ec=function(){return _0x1aac19;};return a40_0x38ec();}import{withSpinner}from'../utils/spinner.js';import{DEFAULT_DISPLAY_LIMIT,resolveLimit}from'../core/constants.js';export class ShowCommand extends BaseCommand{[a40_0x3c0cae(0x1f2)]=a40_0x3c0cae(0x1e4);[a40_0x3c0cae(0x1f5)]=a40_0x3c0cae(0x1da);async['execute'](_0x5625a){const _0x4f276e=a40_0x3c0cae;return this[_0x4f276e(0x1dd)](_0x5625a);}async[a40_0x3c0cae(0x1dd)](_0x778a06){const _0x4ef762=a40_0x3c0cae,{options:_0x436c0f,args:_0x487ba2,tdx:_0x1a3bfd}=_0x778a06;let _0x284667;try{_0x284667=parseTableReference(_0x487ba2[0x0]);const _0x5486fa=_0x436c0f[_0x4ef762(0x1fa)];!_0x284667[_0x4ef762(0x1fa)]&&_0x5486fa&&(_0x284667['database']=_0x5486fa);const _0x1275d2=validateTableDescribeReference(_0x284667);if(_0x1275d2)return console['error'](_0x4ef762(0x1f4)+_0x1275d2),console[_0x4ef762(0x1fd)](_0x4ef762(0x1e9)),console[_0x4ef762(0x1fd)](_0x4ef762(0x1df)),console[_0x4ef762(0x1fd)](_0x4ef762(0x1eb)),0x1;}catch(_0x3be03e){return console[_0x4ef762(0x1fd)](_0x4ef762(0x1f4)+_0x3be03e[_0x4ef762(0x1e3)]),console['error'](_0x4ef762(0x1e9)),console[_0x4ef762(0x1fd)]('\x20\x20\x20or:\x20tdx\x20show\x20<catalog.database.table>'),console[_0x4ef762(0x1fd)](_0x4ef762(0x1eb)),0x1;}const _0x1c317f=_0x284667[_0x4ef762(0x1f0)],_0x552622=_0x284667['database'],_0x55029e=_0x284667[_0x4ef762(0x1de)],_0xf9bc5c=resolveLimit(_0x436c0f[_0x4ef762(0x1e1)],DEFAULT_DISPLAY_LIMIT);try{_0x436c0f[_0x4ef762(0x1e2)]&&(console['error'](_0x4ef762(0x1e0)+_0x436c0f[_0x4ef762(0x1e5)]),_0x1c317f&&console[_0x4ef762(0x1fd)](_0x4ef762(0x1f6)+_0x1c317f),console[_0x4ef762(0x1fd)](_0x4ef762(0x1ed)+_0x552622),console[_0x4ef762(0x1fd)](_0x4ef762(0x1ef)+_0x55029e),console['error'](_0x4ef762(0x1d9)+_0xf9bc5c));const _0x2ac32b=_0x1c317f?_0x1c317f+'.'+_0x552622+'.'+_0x55029e:_0x552622+'.'+_0x55029e,_0x21fed5=await withSpinner(_0x4ef762(0x1d3)+_0x2ac32b+_0x4ef762(0x1d0),()=>_0x1a3bfd[_0x4ef762(0x1e8)][_0x4ef762(0x1dd)](_0x552622,_0x55029e,_0xf9bc5c,_0x1c317f),{'verbose':_0x436c0f['verbose']}),_0x4c4a1c=_0x21fed5[_0x4ef762(0x1d7)],_0x1f5224=_0x4c4a1c[_0x4ef762(0x1d7)];return _0x1f5224['length']===0x0?console[_0x4ef762(0x1fd)]('✔\x20Query\x20successful\x20-\x200\x20rows\x20returned'):console[_0x4ef762(0x1fd)](_0x4ef762(0x1ea)+_0x1f5224[_0x4ef762(0x1db)]+_0x4ef762(0x1d8)+(_0x1f5224['length']!==0x1?'s':'')+_0x4ef762(0x1e6)+_0x2ac32b),await handleSDKOutput(_0x1f5224,_0x436c0f),0x0;}catch(_0x2e6564){if(_0x2e6564 instanceof SDKError)return console[_0x4ef762(0x1fd)](_0x4ef762(0x1f4)+_0x2e6564[_0x4ef762(0x1e3)]),_0x2e6564[_0x4ef762(0x1f9)]&&console[_0x4ef762(0x1fd)](_0x4ef762(0x1fc)+_0x2e6564[_0x4ef762(0x1f9)]),0x1;throw _0x2e6564;}}[a40_0x3c0cae(0x1d6)](_0x37f216){const _0x4037a5=a40_0x3c0cae;if(_0x37f216[_0x4037a5(0x1f1)]['length']===0x0)return _0x4037a5(0x1dc);if(_0x37f216[_0x4037a5(0x1f1)]['length']>0x1)return _0x4037a5(0x1ec);return undefined;}}
@@ -1 +1 @@
1
- const a41_0x1489ec=a41_0x4f65;function a41_0xea96(){const _0x516d09=['env','No\x20credential\x20found','2678472NIuEiw','red','displayWithSources','Show\x20authentication\x20status\x20and\x20current\x20context','N/A','526782UjOQQZ','session','Name:','20214792NfVcFj','message','config','cli','execute','account_id','dim','1914857JtJaqX','404iCrvXr','site:\x20','cyan','TDX_PROFILE\x20env','90141PmVilT','getUserInfo','first_name','bold','profileSource','40539yFLCoe','profile','44504psRzGP','Read\x20credential\x20from\x20','✗\x20Validation\x20failed:\x20','log','✓\x20Authentication\x20successful\x0a','last_name','yellow','error','CLI\x20flag','email','35ZRJTqR','status','description'];a41_0xea96=function(){return _0x516d09;};return a41_0xea96();}function a41_0x4f65(_0x482c65,_0x5b77dc){_0x482c65=_0x482c65-0x10e;const _0xea9679=a41_0xea96();let _0x4f659a=_0xea9679[_0x482c65];return _0x4f659a;}(function(_0x27c805,_0x459508){const _0x48d889=a41_0x4f65,_0x2ca2fa=_0x27c805();while(!![]){try{const _0x3e63ad=parseInt(_0x48d889(0x124))/0x1+-parseInt(_0x48d889(0x12b))/0x2+-parseInt(_0x48d889(0x129))/0x3*(parseInt(_0x48d889(0x120))/0x4)+-parseInt(_0x48d889(0x135))/0x5*(parseInt(_0x48d889(0x115))/0x6)+parseInt(_0x48d889(0x11f))/0x7+parseInt(_0x48d889(0x110))/0x8+parseInt(_0x48d889(0x118))/0x9;if(_0x3e63ad===_0x459508)break;else _0x2ca2fa['push'](_0x2ca2fa['shift']());}catch(_0x94bf76){_0x2ca2fa['push'](_0x2ca2fa['shift']());}}}(a41_0xea96,0xe6361));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 a41_0x89db36 from'chalk';export class StatusCommand extends BaseCommand{['name']='status';[a41_0x1489ec(0x137)]=a41_0x1489ec(0x113);async[a41_0x1489ec(0x11c)](_0x2b536d){const _0x5ab058=a41_0x1489ec,{options:_0x42604d,tdx:_0x4ec3f1}=_0x2b536d,_0x8e6cfe=_0x42604d['site'],_0x6d1e2a=new GlobalContext(_0x42604d),_0x5d5e05=_0x6d1e2a[_0x5ab058(0x12a)],_0x27086c=_0x6d1e2a[_0x5ab058(0x128)],_0x186ca5=_0x27086c===_0x5ab058(0x11b)?_0x5ab058(0x133):_0x27086c===_0x5ab058(0x116)?'session':_0x27086c===_0x5ab058(0x10e)?_0x5ab058(0x123):_0x27086c===_0x5ab058(0x11a)?'config':null,_0x7e2e83=_0x5d5e05?a41_0x89db36[_0x5ab058(0x122)](_0x5d5e05):a41_0x89db36[_0x5ab058(0x11e)](_0x5ab058(0x114)),_0x526191=_0x186ca5?'\x20'+a41_0x89db36[_0x5ab058(0x11e)]('(from\x20'+_0x186ca5+')'):'';console[_0x5ab058(0x12e)](a41_0x89db36[_0x5ab058(0x127)]('tdx')+'\x20profile:\x20'+_0x7e2e83+_0x526191+'\x20'+a41_0x89db36['dim']('(')+_0x5ab058(0x121)+a41_0x89db36['cyan'](_0x8e6cfe)+a41_0x89db36[_0x5ab058(0x11e)](')'));const _0x579f8d=await resolveAPIKeyAsync(_0x8e6cfe,_0x5d5e05);if(_0x579f8d){const {source:_0x37c711,isDeprecated:_0x30457a}=_0x579f8d,_0x58f85b=_0x5ab058(0x12c)+a41_0x89db36[_0x5ab058(0x122)](_0x37c711);console['log'](_0x30457a?a41_0x89db36['yellow'](_0x58f85b):_0x58f85b);}else console[_0x5ab058(0x12e)](a41_0x89db36['yellow'](_0x5ab058(0x10f)));let _0x375fc0=![];try{const _0x10920f=await _0x4ec3f1['jobs'][_0x5ab058(0x125)]();console[_0x5ab058(0x12e)](a41_0x89db36['green'](_0x5ab058(0x12f))),console[_0x5ab058(0x12e)](a41_0x89db36[_0x5ab058(0x127)]('User:')+'\x20'+a41_0x89db36[_0x5ab058(0x122)](_0x10920f[_0x5ab058(0x134)]));if(_0x10920f[_0x5ab058(0x126)]||_0x10920f[_0x5ab058(0x130)]){const _0x280003=[_0x10920f['first_name'],_0x10920f['last_name']]['filter'](Boolean)['join']('\x20');console[_0x5ab058(0x12e)](a41_0x89db36[_0x5ab058(0x127)](_0x5ab058(0x117))+'\x20'+_0x280003);}_0x10920f['account_id']&&console[_0x5ab058(0x12e)](a41_0x89db36['bold']('Account\x20ID:')+'\x20'+a41_0x89db36[_0x5ab058(0x131)](_0x10920f[_0x5ab058(0x11d)])),_0x375fc0=!![];}catch(_0x12fde7){_0x12fde7 instanceof HTTPClientError&&_0x12fde7[_0x5ab058(0x136)]===0x191?printAuthError(_0x12fde7,!![],_0x5d5e05):console[_0x5ab058(0x132)](a41_0x89db36[_0x5ab058(0x111)](_0x5ab058(0x12d)+(_0x12fde7 instanceof Error?_0x12fde7[_0x5ab058(0x119)]:String(_0x12fde7))));}return console[_0x5ab058(0x12e)](),_0x6d1e2a[_0x5ab058(0x112)](),_0x375fc0?0x0:0x1;}}
1
+ const a41_0x48624c=a41_0xb7a3;function a41_0xb7a3(_0x391a9d,_0x165b87){_0x391a9d=_0x391a9d-0x1ea;const _0x3e8744=a41_0x3e87();let _0xb7a380=_0x3e8744[_0x391a9d];return _0xb7a380;}(function(_0x22c63a,_0x5a9255){const _0x7e801f=a41_0xb7a3,_0xcad30=_0x22c63a();while(!![]){try{const _0x5721db=parseInt(_0x7e801f(0x1f2))/0x1*(parseInt(_0x7e801f(0x1ee))/0x2)+-parseInt(_0x7e801f(0x203))/0x3+-parseInt(_0x7e801f(0x1fd))/0x4*(parseInt(_0x7e801f(0x206))/0x5)+-parseInt(_0x7e801f(0x1f0))/0x6*(-parseInt(_0x7e801f(0x208))/0x7)+parseInt(_0x7e801f(0x1ef))/0x8*(parseInt(_0x7e801f(0x211))/0x9)+-parseInt(_0x7e801f(0x205))/0xa*(parseInt(_0x7e801f(0x1f3))/0xb)+parseInt(_0x7e801f(0x1f8))/0xc;if(_0x5721db===_0x5a9255)break;else _0xcad30['push'](_0xcad30['shift']());}catch(_0x93a66a){_0xcad30['push'](_0xcad30['shift']());}}}(a41_0x3e87,0xc83a2));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 a41_0x1509b3 from'chalk';export class StatusCommand extends BaseCommand{[a41_0x48624c(0x212)]=a41_0x48624c(0x200);['description']='Show\x20authentication\x20status\x20and\x20current\x20context';async[a41_0x48624c(0x202)](_0x30b8fd){const _0x1e8f5d=a41_0x48624c,{options:_0x2780fe,tdx:_0x530f8c}=_0x30b8fd,_0x33d948=_0x2780fe['site'],_0x3ba818=new GlobalContext(_0x2780fe),_0xdac8f7=_0x3ba818['profile'],_0x309cbb=_0x3ba818[_0x1e8f5d(0x1f4)],_0x5a6fa2=_0x309cbb==='cli'?'CLI\x20flag':_0x309cbb===_0x1e8f5d(0x214)?'session':_0x309cbb===_0x1e8f5d(0x1ea)?_0x1e8f5d(0x207):_0x309cbb==='config'?_0x1e8f5d(0x213):null,_0x575a9a=_0xdac8f7?a41_0x1509b3['cyan'](_0xdac8f7):a41_0x1509b3[_0x1e8f5d(0x1eb)](_0x1e8f5d(0x1fb)),_0x177be0=_0x5a6fa2?'\x20'+a41_0x1509b3[_0x1e8f5d(0x1eb)](_0x1e8f5d(0x1ff)+_0x5a6fa2+')'):'';console['log'](a41_0x1509b3[_0x1e8f5d(0x20e)](_0x1e8f5d(0x20f))+_0x1e8f5d(0x1ec)+_0x575a9a+_0x177be0+'\x20'+a41_0x1509b3[_0x1e8f5d(0x1eb)]('(')+'site:\x20'+a41_0x1509b3[_0x1e8f5d(0x1f1)](_0x33d948)+a41_0x1509b3[_0x1e8f5d(0x1eb)](')'));const _0x200ac3=await resolveAPIKeyAsync(_0x33d948,_0xdac8f7);if(_0x200ac3){const {source:_0x3f9147,isDeprecated:_0x32c69f}=_0x200ac3,_0x158fa2=_0x1e8f5d(0x1f7)+a41_0x1509b3[_0x1e8f5d(0x1f1)](_0x3f9147);console[_0x1e8f5d(0x216)](_0x32c69f?a41_0x1509b3[_0x1e8f5d(0x204)](_0x158fa2):_0x158fa2);}else console[_0x1e8f5d(0x216)](a41_0x1509b3[_0x1e8f5d(0x204)](_0x1e8f5d(0x215)));let _0x6453a0=![];try{const _0x14c6af=await _0x530f8c[_0x1e8f5d(0x1fa)][_0x1e8f5d(0x1f5)]();console['log'](a41_0x1509b3['green'](_0x1e8f5d(0x20b))),console[_0x1e8f5d(0x216)](a41_0x1509b3[_0x1e8f5d(0x20e)](_0x1e8f5d(0x20a))+'\x20'+a41_0x1509b3[_0x1e8f5d(0x1f1)](_0x14c6af[_0x1e8f5d(0x20d)]));if(_0x14c6af[_0x1e8f5d(0x1f6)]||_0x14c6af['last_name']){const _0x2679c8=[_0x14c6af[_0x1e8f5d(0x1f6)],_0x14c6af['last_name']][_0x1e8f5d(0x1f9)](Boolean)['join']('\x20');console[_0x1e8f5d(0x216)](a41_0x1509b3[_0x1e8f5d(0x20e)]('Name:')+'\x20'+_0x2679c8);}_0x14c6af[_0x1e8f5d(0x20c)]&&console['log'](a41_0x1509b3[_0x1e8f5d(0x20e)](_0x1e8f5d(0x1fc))+'\x20'+a41_0x1509b3[_0x1e8f5d(0x204)](_0x14c6af[_0x1e8f5d(0x20c)])),_0x6453a0=!![];}catch(_0x134e61){_0x134e61 instanceof HTTPClientError&&_0x134e61[_0x1e8f5d(0x200)]===0x191?printAuthError(_0x134e61,!![],_0xdac8f7):console[_0x1e8f5d(0x210)](a41_0x1509b3[_0x1e8f5d(0x201)](_0x1e8f5d(0x1fe)+(_0x134e61 instanceof Error?_0x134e61[_0x1e8f5d(0x1ed)]:String(_0x134e61))));}return console[_0x1e8f5d(0x216)](),_0x3ba818[_0x1e8f5d(0x209)](),_0x6453a0?0x0:0x1;}}function a41_0x3e87(){const _0x85a9ae=['2039544mjwuaE','name','config','session','No\x20credential\x20found','log','env','dim','\x20profile:\x20','message','10zkpDTg','8PvKBwk','162tmQRKi','cyan','7072SJaZZp','209mHRDnO','profileSource','getUserInfo','first_name','Read\x20credential\x20from\x20','29433864lQxvBY','filter','jobs','N/A','Account\x20ID:','13928vHqaqa','✗\x20Validation\x20failed:\x20','(from\x20','status','red','execute','4068396utfIVG','yellow','333710bZZOLE','1420trVYoP','TDX_PROFILE\x20env','281141YMyZWO','displayWithSources','User:','✓\x20Authentication\x20successful\x0a','account_id','email','bold','tdx','error'];a41_0x3e87=function(){return _0x85a9ae;};return a41_0x3e87();}
@@ -1 +1 @@
1
- const a42_0x108dec=a42_0x48e3;function a42_0x48e3(_0x1bb594,_0x2fd809){_0x1bb594=_0x1bb594-0xca;const _0xa7769c=a42_0xa776();let _0x48e30f=_0xa7769c[_0x1bb594];return _0x48e30f;}(function(_0xe51850,_0x561bdf){const _0x184733=a42_0x48e3,_0x17a2a9=_0xe51850();while(!![]){try{const _0x158632=parseInt(_0x184733(0xd3))/0x1+-parseInt(_0x184733(0xe0))/0x2*(parseInt(_0x184733(0xe2))/0x3)+-parseInt(_0x184733(0xfe))/0x4*(-parseInt(_0x184733(0xff))/0x5)+parseInt(_0x184733(0xe8))/0x6+-parseInt(_0x184733(0xd8))/0x7*(parseInt(_0x184733(0xe1))/0x8)+parseInt(_0x184733(0xd9))/0x9*(parseInt(_0x184733(0xf3))/0xa)+-parseInt(_0x184733(0xed))/0xb;if(_0x158632===_0x561bdf)break;else _0x17a2a9['push'](_0x17a2a9['shift']());}catch(_0x4e1c94){_0x17a2a9['push'](_0x17a2a9['shift']());}}}(a42_0xa776,0xbbc8c));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleSDKOutput}from'../core/command-output.js';import{parseTableReference}from'../utils/table-ref-parser.js';import{DEFAULT_LISTING_LIMIT,resolveLimit}from'../core/constants.js';import{withSpinner}from'../utils/spinner.js';function a42_0xa776(){const _0x2aebc2=['length','database','query','Database:\x20','data','\x20\x20tdx\x20tables\x20\x22mydb.*\x22\x20\x20\x20\x20\x20\x20\x20\x20->\x20all\x20tables\x20from\x20mydb','4qyCNGZ','6667495NPFNEE','\x27\x20across\x20all\x20databases.','includes','Error:\x20Too\x20many\x20arguments.\x20Use\x20single\x20argument:','\x20\x20Use:\x20tdx\x20tables\x20\x22','.*\x22','Database\x20pattern:\x20','name','\x20\x20tdx\x20tables\x20\x22mydb.users\x22\x20\x20\x20\x20->\x20table\x20\x22users\x22\x20in\x20database\x20mydb','site','389600pfjqgi','Table\x20pattern:\x20','\x27\x20may\x20not\x20exist\x20or\x20contains\x20no\x20tables','Database\x20\x27','description','9412151Kasdvl','9yqcTzl','tables','\x20\x20Cause:\x20','List\x20tables\x20in\x20a\x20database','Error:\x20','Listing\x20tables...','verbose','2fOJqin','8gEQoRA','1485831HdIVLA','\x20\x20tdx\x20tables\x20\x22*.user*\x22\x20\x20\x20\x20\x20\x20\x20->\x20tables\x20matching\x20user*\x20across\x20databases','message','limit','listTables','execute','4768542lpetOl','Note:\x20\x27','table','\x20\x20tdx\x20tables\x20users\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20->\x20table\x20\x22users\x22\x20across\x20all\x20databases','cause','2076998pIWUqX','Site:\x20','error','Or\x20use\x20--in\x20flag:','✖\x20No\x20tables\x20found','validate','2799960SkeBKB','\x27\x20is\x20ambiguous.','Did\x20you\x20mean\x20to\x20list\x20all\x20tables\x20from\x20database\x20\x27','\x27\x20without\x20wildcards\x20would\x20search\x20for\x20tables\x20named\x20\x27','\x20\x20Or:\x20\x20tdx\x20tables\x20--in\x20'];a42_0xa776=function(){return _0x2aebc2;};return a42_0xa776();}export class TablesCommand extends BaseCommand{[a42_0x108dec(0xd0)]=a42_0x108dec(0xda);[a42_0x108dec(0xd7)]=a42_0x108dec(0xdc);async[a42_0x108dec(0xe7)](_0x58ade8){const _0x281e63=a42_0x108dec,{options:_0x359f8a,args:_0x2fb7e4,tdx:_0x16925d}=_0x58ade8;let _0x3c0fb2;if(_0x2fb7e4[_0x281e63(0xf8)]===0x0)_0x3c0fb2={'database':undefined,'table':undefined,'original':''};else{if(_0x2fb7e4[_0x281e63(0xf8)]===0x1)try{_0x3c0fb2=parseTableReference(_0x2fb7e4[0x0]);if(_0x3c0fb2[_0x281e63(0xea)]&&!_0x3c0fb2[_0x281e63(0xf9)]&&!_0x3c0fb2[_0x281e63(0xea)]['includes']('*')&&!_0x3c0fb2['table'][_0x281e63(0xcb)]('?'))return console[_0x281e63(0xef)]('Error:\x20Pattern\x20\x27'+_0x2fb7e4[0x0]+_0x281e63(0xf4)),console[_0x281e63(0xef)](_0x281e63(0xf5)+_0x3c0fb2['table']+'\x27?'),console['error'](_0x281e63(0xcd)+_0x3c0fb2[_0x281e63(0xea)]+_0x281e63(0xce)),console[_0x281e63(0xef)](_0x281e63(0xf7)+_0x3c0fb2[_0x281e63(0xea)]),console[_0x281e63(0xef)]('\x20\x20Or:\x20\x20tdx\x20tables\x20--database\x20'+_0x3c0fb2['table']),console['error'](''),console[_0x281e63(0xef)](_0x281e63(0xe9)+_0x2fb7e4[0x0]+_0x281e63(0xf6)+_0x3c0fb2[_0x281e63(0xea)]+_0x281e63(0xca)),0x1;}catch(_0x188c80){return console[_0x281e63(0xef)](_0x281e63(0xdd)+_0x188c80[_0x281e63(0xe4)]),0x1;}else return console['error'](_0x281e63(0xcc)),console['error'](_0x281e63(0xeb)),console['error'](_0x281e63(0xfd)),console[_0x281e63(0xef)](_0x281e63(0xd1)),console[_0x281e63(0xef)](_0x281e63(0xe3)),console[_0x281e63(0xef)](_0x281e63(0xf0)),console[_0x281e63(0xef)]('\x20\x20tdx\x20tables\x20--in\x20mydb\x20\x20\x20\x20\x20\x20\x20->\x20all\x20tables\x20from\x20mydb'),0x1;}const _0x42e8f9=_0x359f8a[_0x281e63(0xf9)];!_0x3c0fb2[_0x281e63(0xf9)]&&_0x42e8f9&&(_0x3c0fb2['database']=_0x42e8f9);try{const _0x3e1080=_0x27645c=>_0x27645c&&(_0x27645c[_0x281e63(0xcb)]('*')||_0x27645c[_0x281e63(0xcb)]('?')),_0x266c6e=_0x3e1080(_0x3c0fb2[_0x281e63(0xf9)]);_0x359f8a[_0x281e63(0xdf)]&&(console[_0x281e63(0xef)](_0x281e63(0xee)+_0x359f8a[_0x281e63(0xd2)]),_0x3c0fb2[_0x281e63(0xf9)]?_0x266c6e?console['error'](_0x281e63(0xcf)+_0x3c0fb2[_0x281e63(0xf9)]):console[_0x281e63(0xef)](_0x281e63(0xfb)+_0x3c0fb2[_0x281e63(0xf9)]):console['error']('Database:\x20all'),_0x3c0fb2['table']&&console[_0x281e63(0xef)](_0x281e63(0xd4)+_0x3c0fb2[_0x281e63(0xea)]));const _0x4871f8=_0x3c0fb2['database']&&!_0x266c6e?_0x3c0fb2[_0x281e63(0xf9)]:undefined,_0x15c070=_0x266c6e?_0x3c0fb2['database']:undefined,_0x4db760=_0x3c0fb2[_0x281e63(0xea)],_0x5297f3=resolveLimit(_0x359f8a[_0x281e63(0xe5)],DEFAULT_LISTING_LIMIT),_0x5eca59=await withSpinner(_0x281e63(0xde),()=>_0x16925d[_0x281e63(0xfa)][_0x281e63(0xe6)](_0x4871f8,_0x4db760,_0x15c070,_0x5297f3),{'verbose':_0x359f8a[_0x281e63(0xdf)]}),_0x3544b4=_0x5eca59[_0x281e63(0xfc)];if(_0x3544b4[_0x281e63(0xf8)]===0x0&&_0x3c0fb2[_0x281e63(0xf9)]&&!_0x266c6e)return console['error'](_0x281e63(0xf1)),console['error'](_0x281e63(0xd6)+_0x3c0fb2[_0x281e63(0xf9)]+_0x281e63(0xd5)),0x1;return console[_0x281e63(0xef)]('✔\x20Found\x20'+_0x3544b4[_0x281e63(0xf8)]+'\x20table'+(_0x3544b4['length']!==0x1?'s':'')),await handleSDKOutput(_0x3544b4,{..._0x359f8a,'limit':_0x5297f3}),0x0;}catch(_0x397904){if(_0x397904 instanceof SDKError)return console[_0x281e63(0xef)](_0x281e63(0xdd)+_0x397904[_0x281e63(0xe4)]),_0x397904['cause']&&console[_0x281e63(0xef)](_0x281e63(0xdb)+_0x397904[_0x281e63(0xec)]),0x1;throw _0x397904;}}[a42_0x108dec(0xf2)](_0x202e51){return undefined;}}
1
+ const a42_0x5bce8a=a42_0x7f2a;function a42_0x7f2a(_0x17b0f2,_0x2e2613){_0x17b0f2=_0x17b0f2-0x8a;const _0x3eebf0=a42_0x3eeb();let _0x7f2a7e=_0x3eebf0[_0x17b0f2];return _0x7f2a7e;}(function(_0x12c53c,_0x46b3aa){const _0x48c644=a42_0x7f2a,_0x28c37e=_0x12c53c();while(!![]){try{const _0x4132fc=-parseInt(_0x48c644(0x97))/0x1+parseInt(_0x48c644(0xb4))/0x2*(parseInt(_0x48c644(0xb7))/0x3)+-parseInt(_0x48c644(0xb0))/0x4*(parseInt(_0x48c644(0xb2))/0x5)+-parseInt(_0x48c644(0xba))/0x6*(parseInt(_0x48c644(0xae))/0x7)+parseInt(_0x48c644(0x96))/0x8*(-parseInt(_0x48c644(0x8e))/0x9)+parseInt(_0x48c644(0x8d))/0xa+parseInt(_0x48c644(0x98))/0xb*(parseInt(_0x48c644(0x90))/0xc);if(_0x4132fc===_0x46b3aa)break;else _0x28c37e['push'](_0x28c37e['shift']());}catch(_0x20f8cf){_0x28c37e['push'](_0x28c37e['shift']());}}}(a42_0x3eeb,0x62502));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';function a42_0x3eeb(){const _0x324c42=['Error:\x20','25opKRif','verbose','691712qlogyl','includes','\x27\x20without\x20wildcards\x20would\x20search\x20for\x20tables\x20named\x20\x27','3HhTJiv','site','\x20\x20Use:\x20tdx\x20tables\x20\x22','174lmquwl','✔\x20Found\x20','\x20\x20Or:\x20\x20tdx\x20tables\x20--database\x20','tables','name','657870tHrSzj','173574vApRPM','.*\x22','30886068cPUZxR','validate','database','\x20\x20tdx\x20tables\x20\x22mydb.*\x22\x20\x20\x20\x20\x20\x20\x20\x20->\x20all\x20tables\x20from\x20mydb','limit','cause','280GpTRHD','369348Ajyapb','11TNwqyi','data','\x20\x20tdx\x20tables\x20--in\x20mydb\x20\x20\x20\x20\x20\x20\x20->\x20all\x20tables\x20from\x20mydb','Database\x20pattern:\x20','✖\x20No\x20tables\x20found','error','Did\x20you\x20mean\x20to\x20list\x20all\x20tables\x20from\x20database\x20\x27','Database:\x20','\x20\x20tdx\x20tables\x20users\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20->\x20table\x20\x22users\x22\x20across\x20all\x20databases','\x27\x20across\x20all\x20databases.','listTables','query','Table\x20pattern:\x20','description','execute','Database:\x20all','table','List\x20tables\x20in\x20a\x20database','Site:\x20','length','message','Error:\x20Pattern\x20\x27','183967wxaETN','Database\x20\x27','621028KPFFpV'];a42_0x3eeb=function(){return _0x324c42;};return a42_0x3eeb();}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{[a42_0x5bce8a(0x8c)]=a42_0x5bce8a(0x8b);[a42_0x5bce8a(0xa5)]=a42_0x5bce8a(0xa9);async[a42_0x5bce8a(0xa6)](_0x577769){const _0x12447f=a42_0x5bce8a,{options:_0x4c2aca,args:_0x26e349,tdx:_0x157344}=_0x577769;let _0xad0563;if(_0x26e349[_0x12447f(0xab)]===0x0)_0xad0563={'database':undefined,'table':undefined,'original':''};else{if(_0x26e349[_0x12447f(0xab)]===0x1)try{_0xad0563=parseTableReference(_0x26e349[0x0]);if(_0xad0563['table']&&!_0xad0563[_0x12447f(0x92)]&&!_0xad0563['table'][_0x12447f(0xb5)]('*')&&!_0xad0563[_0x12447f(0xa8)]['includes']('?'))return console[_0x12447f(0x9d)](_0x12447f(0xad)+_0x26e349[0x0]+'\x27\x20is\x20ambiguous.'),console['error'](_0x12447f(0x9e)+_0xad0563['table']+'\x27?'),console['error'](_0x12447f(0xb9)+_0xad0563['table']+_0x12447f(0x8f)),console[_0x12447f(0x9d)]('\x20\x20Or:\x20\x20tdx\x20tables\x20--in\x20'+_0xad0563[_0x12447f(0xa8)]),console[_0x12447f(0x9d)](_0x12447f(0x8a)+_0xad0563[_0x12447f(0xa8)]),console['error'](''),console[_0x12447f(0x9d)]('Note:\x20\x27'+_0x26e349[0x0]+_0x12447f(0xb6)+_0xad0563[_0x12447f(0xa8)]+_0x12447f(0xa1)),0x1;}catch(_0xb93414){return console['error']('Error:\x20'+_0xb93414[_0x12447f(0xac)]),0x1;}else return console[_0x12447f(0x9d)]('Error:\x20Too\x20many\x20arguments.\x20Use\x20single\x20argument:'),console[_0x12447f(0x9d)](_0x12447f(0xa0)),console['error'](_0x12447f(0x93)),console['error']('\x20\x20tdx\x20tables\x20\x22mydb.users\x22\x20\x20\x20\x20->\x20table\x20\x22users\x22\x20in\x20database\x20mydb'),console[_0x12447f(0x9d)]('\x20\x20tdx\x20tables\x20\x22*.user*\x22\x20\x20\x20\x20\x20\x20\x20->\x20tables\x20matching\x20user*\x20across\x20databases'),console[_0x12447f(0x9d)]('Or\x20use\x20--in\x20flag:'),console[_0x12447f(0x9d)](_0x12447f(0x9a)),0x1;}const _0x2b74db=_0x4c2aca[_0x12447f(0x92)];!_0xad0563[_0x12447f(0x92)]&&_0x2b74db&&(_0xad0563[_0x12447f(0x92)]=_0x2b74db);try{const _0x551226=_0x49b041=>_0x49b041&&(_0x49b041[_0x12447f(0xb5)]('*')||_0x49b041[_0x12447f(0xb5)]('?')),_0x10295f=_0x551226(_0xad0563[_0x12447f(0x92)]);_0x4c2aca['verbose']&&(console[_0x12447f(0x9d)](_0x12447f(0xaa)+_0x4c2aca[_0x12447f(0xb8)]),_0xad0563['database']?_0x10295f?console[_0x12447f(0x9d)](_0x12447f(0x9b)+_0xad0563[_0x12447f(0x92)]):console[_0x12447f(0x9d)](_0x12447f(0x9f)+_0xad0563['database']):console[_0x12447f(0x9d)](_0x12447f(0xa7)),_0xad0563[_0x12447f(0xa8)]&&console[_0x12447f(0x9d)](_0x12447f(0xa4)+_0xad0563[_0x12447f(0xa8)]));const _0x189ced=_0xad0563[_0x12447f(0x92)]&&!_0x10295f?_0xad0563[_0x12447f(0x92)]:undefined,_0x4c57b2=_0x10295f?_0xad0563[_0x12447f(0x92)]:undefined,_0x1cb54f=_0xad0563[_0x12447f(0xa8)],_0x5aaa18=resolveLimit(_0x4c2aca[_0x12447f(0x94)],DEFAULT_LISTING_LIMIT),_0x47dd87=await withSpinner('Listing\x20tables...',()=>_0x157344[_0x12447f(0xa3)][_0x12447f(0xa2)](_0x189ced,_0x1cb54f,_0x4c57b2,_0x5aaa18),{'verbose':_0x4c2aca[_0x12447f(0xb3)]}),_0x4e4de2=_0x47dd87[_0x12447f(0x99)];if(_0x4e4de2['length']===0x0&&_0xad0563[_0x12447f(0x92)]&&!_0x10295f)return console[_0x12447f(0x9d)](_0x12447f(0x9c)),console['error'](_0x12447f(0xaf)+_0xad0563[_0x12447f(0x92)]+'\x27\x20may\x20not\x20exist\x20or\x20contains\x20no\x20tables'),0x1;return console[_0x12447f(0x9d)](_0x12447f(0xbb)+_0x4e4de2[_0x12447f(0xab)]+'\x20table'+(_0x4e4de2[_0x12447f(0xab)]!==0x1?'s':'')),await handleSDKOutput(_0x4e4de2,{..._0x4c2aca,'limit':_0x5aaa18}),0x0;}catch(_0x19d854){if(_0x19d854 instanceof SDKError)return console[_0x12447f(0x9d)](_0x12447f(0xb1)+_0x19d854['message']),_0x19d854[_0x12447f(0x95)]&&console[_0x12447f(0x9d)]('\x20\x20Cause:\x20'+_0x19d854[_0x12447f(0x95)]),0x1;throw _0x19d854;}}[a42_0x5bce8a(0x91)](_0x4b3c54){return undefined;}}
@@ -1 +1 @@
1
- const a43_0x342a91=a43_0x31cb;(function(_0x686ac4,_0x2a4402){const _0xe594fc=a43_0x31cb,_0x41da05=_0x686ac4();while(!![]){try{const _0x4e009f=-parseInt(_0xe594fc(0xa6))/0x1*(-parseInt(_0xe594fc(0x82))/0x2)+-parseInt(_0xe594fc(0x78))/0x3*(-parseInt(_0xe594fc(0x9a))/0x4)+parseInt(_0xe594fc(0x7f))/0x5*(parseInt(_0xe594fc(0x7e))/0x6)+-parseInt(_0xe594fc(0x83))/0x7*(-parseInt(_0xe594fc(0x99))/0x8)+parseInt(_0xe594fc(0x8a))/0x9+parseInt(_0xe594fc(0x98))/0xa*(-parseInt(_0xe594fc(0x97))/0xb)+parseInt(_0xe594fc(0x90))/0xc*(-parseInt(_0xe594fc(0x79))/0xd);if(_0x4e009f===_0x2a4402)break;else _0x41da05['push'](_0x41da05['shift']());}catch(_0x515beb){_0x41da05['push'](_0x41da05['shift']());}}}(a43_0x33db,0x94e50));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';function a43_0x31cb(_0x7283ef,_0x5475c7){_0x7283ef=_0x7283ef-0x77;const _0x33db87=a43_0x33db();let _0x31cbd8=_0x33db87[_0x7283ef];return _0x31cbd8;}import a43_0x352896 from'chalk';function a43_0x33db(){const _0x2e6fa7=['64zwupbG','402124icQJFB','\x0aResources:\x20site,\x20database,\x20parent_segment,\x20llm_project,\x20agent,\x20profile,\x20engage_workspace\x0a','green','execute','includes','default','--default\x20can\x20only\x20be\x20used\x20with\x20\x27site\x27\x20or\x20\x27profile\x27.\x20Other\x20resources\x20are\x20session-level\x20only.','\x20\x20\x20\x20\x20\x20\x20tdx\x20unset\x20--default\x20<resource>\x20\x20#\x20Clear\x20default\x20from\x20config\x0a','llm_project','cleared','Default\x20profile\x20','unset','1MgNchZ','log','36hsNcqS','65EmjfTn','Usage:\x20tdx\x20unset\x20<resource>\x0a','Error:\x20','.\x20Must\x20be\x20one\x20of:\x20','database','6naAoiD','5757965sCYYVY','(session:\x20','agent','25266BbsLXf','91651sKPVcu','tdx.json','Session\x20','engage_workspace','session','length','name','1745244wnCpOA','Invalid\x20resource:\x20','parent_segment','error','join','profile','3156372qCLTmi','message','llm_agent','\x0aRun\x20\x27tdx\x20unset\x20--help\x27\x20for\x20more\x20options','site','dim','Default\x20site\x20','2728847gBerHO','30EeMtEH'];a43_0x33db=function(){return _0x2e6fa7;};return a43_0x33db();}import*as a43_0x815c82 from'node:path';export class UnsetCommand extends BaseCommand{[a43_0x342a91(0x89)]=a43_0x342a91(0xa5);['description']='Clear\x20session-level\x20or\x20default\x20context\x20values';['validate'](_0x290b0e){const _0x5140a0=a43_0x342a91,{args:_0x4c4e2f,options:_0x2fc4c2}=_0x290b0e,_0x4fb4c3=_0x2fc4c2[_0x5140a0(0x9f)];if(_0x4c4e2f[_0x5140a0(0x88)]===0x0)return _0x5140a0(0x7a)+_0x5140a0(0xa1)+_0x5140a0(0x9b)+_0x5140a0(0x93);const _0x54dbe7=_0x4c4e2f[0x0],_0x2e95b5=['site',_0x5140a0(0x7d),'parent_segment','llm_project',_0x5140a0(0x81),_0x5140a0(0x8f),'engage_workspace'];if(!_0x2e95b5[_0x5140a0(0x9e)](_0x54dbe7))return _0x5140a0(0x8b)+_0x54dbe7+_0x5140a0(0x7c)+_0x2e95b5['join'](',\x20');if(_0x4fb4c3&&_0x54dbe7!==_0x5140a0(0x94)&&_0x54dbe7!==_0x5140a0(0x8f))return _0x5140a0(0xa0);return undefined;}async[a43_0x342a91(0x9d)](_0x4c74ef){const _0x338f6d=a43_0x342a91,{args:_0x246659,options:_0x5d2065}=_0x4c74ef,_0x42d49b=_0x5d2065[_0x338f6d(0x9f)];cleanExpiredSessions();try{const _0x45ae9d=_0x246659[0x0],_0x254885=a43_0x815c82[_0x338f6d(0x8e)](getConfigDir(),_0x338f6d(0x84));if(_0x42d49b){if(_0x45ae9d===_0x338f6d(0x94))return clearDefaultSiteFromUserConfig(),console[_0x338f6d(0x77)](_0x338f6d(0x96)+a43_0x352896[_0x338f6d(0x9c)]('cleared')),console[_0x338f6d(0x77)](a43_0x352896[_0x338f6d(0x95)]('\x0aUpdated:\x20'+_0x254885)),0x0;if(_0x45ae9d===_0x338f6d(0x8f))return clearActiveProfileFromUserConfig(),console[_0x338f6d(0x77)](_0x338f6d(0xa4)+a43_0x352896[_0x338f6d(0x9c)](_0x338f6d(0xa3))),console['log'](a43_0x352896[_0x338f6d(0x95)]('\x0aUpdated:\x20'+_0x254885)),0x0;}const _0x56e01e=getSessionID(_0x5d2065['session']),_0xab854e={'site':_0x338f6d(0x94),'database':_0x338f6d(0x7d),'parent_segment':_0x338f6d(0x8c),'llm_project':_0x338f6d(0xa2),'agent':_0x338f6d(0x92),'profile':_0x338f6d(0x8f),'engage_workspace':_0x338f6d(0x86)},_0x5b019a=_0xab854e[_0x45ae9d];return _0x5b019a&&(clearSessionContextField(_0x5b019a,_0x5d2065[_0x338f6d(0x87)]),console[_0x338f6d(0x77)](_0x338f6d(0x85)+_0x45ae9d+'\x20'+a43_0x352896['green'](_0x338f6d(0xa3))+'\x20'+a43_0x352896[_0x338f6d(0x95)](_0x338f6d(0x80)+_0x56e01e+')'))),0x0;}catch(_0x1dbb72){return _0x1dbb72 instanceof Error&&console[_0x338f6d(0x8d)](_0x338f6d(0x7b)+_0x1dbb72[_0x338f6d(0x91)]),0x1;}}}
1
+ const a43_0x22ca10=a43_0x108a;(function(_0x30cdb2,_0x128367){const _0x27a3b2=a43_0x108a,_0x4f7051=_0x30cdb2();while(!![]){try{const _0xd9a8ce=parseInt(_0x27a3b2(0x1cc))/0x1+-parseInt(_0x27a3b2(0x1c7))/0x2*(parseInt(_0x27a3b2(0x1bc))/0x3)+-parseInt(_0x27a3b2(0x1d2))/0x4+parseInt(_0x27a3b2(0x1d0))/0x5+parseInt(_0x27a3b2(0x1c2))/0x6*(-parseInt(_0x27a3b2(0x1d4))/0x7)+-parseInt(_0x27a3b2(0x1c3))/0x8+parseInt(_0x27a3b2(0x1d6))/0x9;if(_0xd9a8ce===_0x128367)break;else _0x4f7051['push'](_0x4f7051['shift']());}catch(_0x27d4eb){_0x4f7051['push'](_0x4f7051['shift']());}}}(a43_0x486d,0x2b773));import{BaseCommand}from'./command.js';function a43_0x108a(_0x4ea163,_0x5af42a){_0x4ea163=_0x4ea163-0x1bc;const _0x486de1=a43_0x486d();let _0x108a70=_0x486de1[_0x4ea163];return _0x108a70;}import{getSessionID,cleanExpiredSessions,clearSessionContextField}from'../core/session.js';import{clearDefaultSiteFromUserConfig,clearActiveProfileFromUserConfig}from'../core/profile.js';import{getConfigDir}from'../core/config.js';function a43_0x486d(){const _0x3e8d65=['1210149dfRvUG','engage_workspace','message','Invalid\x20resource:\x20','tdx.json','agent','name','database','green','dim','includes','Default\x20profile\x20','365907yRjTjQ','log','\x0aResources:\x20site,\x20database,\x20parent_segment,\x20llm_project,\x20agent,\x20profile,\x20engage_workspace\x0a','session','parent_segment','Session\x20','18KXgywO','437032qMxoXM','\x0aUpdated:\x20','Error:\x20','\x0aRun\x20\x27tdx\x20unset\x20--help\x27\x20for\x20more\x20options','2aJrBmk','profile','Clear\x20session-level\x20or\x20default\x20context\x20values','validate','default','310212OfHItf','error','llm_project','cleared','858145BUKUsw','execute','147588jYhtcj','.\x20Must\x20be\x20one\x20of:\x20','524468ntGmTX','site'];a43_0x486d=function(){return _0x3e8d65;};return a43_0x486d();}import a43_0x6e66f5 from'chalk';import*as a43_0x33db47 from'node:path';export class UnsetCommand extends BaseCommand{[a43_0x22ca10(0x1dc)]='unset';['description']=a43_0x22ca10(0x1c9);[a43_0x22ca10(0x1ca)](_0x574be8){const _0x28b2fe=a43_0x22ca10,{args:_0x5ecd6f,options:_0x480754}=_0x574be8,_0x2ffb0e=_0x480754[_0x28b2fe(0x1cb)];if(_0x5ecd6f['length']===0x0)return'Usage:\x20tdx\x20unset\x20<resource>\x0a'+'\x20\x20\x20\x20\x20\x20\x20tdx\x20unset\x20--default\x20<resource>\x20\x20#\x20Clear\x20default\x20from\x20config\x0a'+_0x28b2fe(0x1be)+_0x28b2fe(0x1c6);const _0x2dc609=_0x5ecd6f[0x0],_0x935814=[_0x28b2fe(0x1d5),_0x28b2fe(0x1dd),_0x28b2fe(0x1c0),_0x28b2fe(0x1ce),_0x28b2fe(0x1db),_0x28b2fe(0x1c8),_0x28b2fe(0x1d7)];if(!_0x935814[_0x28b2fe(0x1e0)](_0x2dc609))return _0x28b2fe(0x1d9)+_0x2dc609+_0x28b2fe(0x1d3)+_0x935814['join'](',\x20');if(_0x2ffb0e&&_0x2dc609!=='site'&&_0x2dc609!==_0x28b2fe(0x1c8))return'--default\x20can\x20only\x20be\x20used\x20with\x20\x27site\x27\x20or\x20\x27profile\x27.\x20Other\x20resources\x20are\x20session-level\x20only.';return undefined;}async[a43_0x22ca10(0x1d1)](_0x1ba999){const _0x4791c7=a43_0x22ca10,{args:_0x137a40,options:_0x3e43f5}=_0x1ba999,_0x28cc41=_0x3e43f5['default'];cleanExpiredSessions();try{const _0x51f713=_0x137a40[0x0],_0x2723b5=a43_0x33db47['join'](getConfigDir(),_0x4791c7(0x1da));if(_0x28cc41){if(_0x51f713===_0x4791c7(0x1d5))return clearDefaultSiteFromUserConfig(),console[_0x4791c7(0x1bd)]('Default\x20site\x20'+a43_0x6e66f5[_0x4791c7(0x1de)](_0x4791c7(0x1cf))),console[_0x4791c7(0x1bd)](a43_0x6e66f5[_0x4791c7(0x1df)](_0x4791c7(0x1c4)+_0x2723b5)),0x0;if(_0x51f713===_0x4791c7(0x1c8))return clearActiveProfileFromUserConfig(),console['log'](_0x4791c7(0x1e1)+a43_0x6e66f5[_0x4791c7(0x1de)](_0x4791c7(0x1cf))),console[_0x4791c7(0x1bd)](a43_0x6e66f5[_0x4791c7(0x1df)](_0x4791c7(0x1c4)+_0x2723b5)),0x0;}const _0x504414=getSessionID(_0x3e43f5[_0x4791c7(0x1bf)]),_0x17d221={'site':_0x4791c7(0x1d5),'database':_0x4791c7(0x1dd),'parent_segment':_0x4791c7(0x1c0),'llm_project':_0x4791c7(0x1ce),'agent':'llm_agent','profile':'profile','engage_workspace':_0x4791c7(0x1d7)},_0x1add58=_0x17d221[_0x51f713];return _0x1add58&&(clearSessionContextField(_0x1add58,_0x3e43f5[_0x4791c7(0x1bf)]),console['log'](_0x4791c7(0x1c1)+_0x51f713+'\x20'+a43_0x6e66f5[_0x4791c7(0x1de)](_0x4791c7(0x1cf))+'\x20'+a43_0x6e66f5[_0x4791c7(0x1df)]('(session:\x20'+_0x504414+')'))),0x0;}catch(_0x527e01){return _0x527e01 instanceof Error&&console[_0x4791c7(0x1cd)](_0x4791c7(0x1c5)+_0x527e01[_0x4791c7(0x1d8)]),0x1;}}}
@@ -1 +1 @@
1
- const a44_0x29f658=a44_0x2e4a;(function(_0x1bd94a,_0x36cc22){const _0xd05371=a44_0x2e4a,_0x15ca11=_0x1bd94a();while(!![]){try{const _0x5d8399=parseInt(_0xd05371(0x1f4))/0x1+parseInt(_0xd05371(0x208))/0x2+-parseInt(_0xd05371(0x216))/0x3+-parseInt(_0xd05371(0x212))/0x4+-parseInt(_0xd05371(0x20d))/0x5+parseInt(_0xd05371(0x1f9))/0x6+parseInt(_0xd05371(0x200))/0x7*(parseInt(_0xd05371(0x203))/0x8);if(_0x5d8399===_0x36cc22)break;else _0x15ca11['push'](_0x15ca11['shift']());}catch(_0xe37f39){_0x15ca11['push'](_0x15ca11['shift']());}}}(a44_0x5b3b,0x42c63));import{gt}from'semver';function a44_0x5b3b(){const _0x216e41=['172760vZAbQM','inherit','Upgrade\x20failed\x20(exit\x20code\x20','green','Failed\x20to\x20run\x20','262638RWGKEU','add','error','Already\x20up\x20to\x20date\x20(','Latest\x20version:','latest','...','434DAvdJx','next','Current\x20version:\x20','41432Oiyrft','message','red','execute','yellow','607048RNQiWs','join','.bun/','Would\x20run:','global','266480dTBkcw','description','dim','Running:','upgrade','1725460CKWTxb','pnpm','yarn','cyan','248961pDVCZM','toLowerCase','replace','Target\x20version:','@treasuredata/tdx','log','bun','Upgrade\x20tdx\x20to\x20the\x20latest\x20version','dryRun','argv','install','includes','execPath','Current\x20version:'];a44_0x5b3b=function(){return _0x216e41;};return a44_0x5b3b();}import a44_0x1f535a from'chalk';import{BaseCommand}from'./command.js';import{getVersion,isDevVersion}from'../core/version.js';import{loadReleaseChannel}from'../core/config.js';import{fetchLatestVersion}from'../utils/version-check.js';import{crossSpawn}from'../utils/process.js';function a44_0x2e4a(_0x1ca194,_0x1f77ae){_0x1ca194=_0x1ca194-0x1ef;const _0x5b3bb8=a44_0x5b3b();let _0x2e4a50=_0x5b3bb8[_0x1ca194];return _0x2e4a50;}const PACKAGE_NAME=a44_0x29f658(0x21a);export function detectPackageManager(){const _0x2225fe=a44_0x29f658,_0x448660=process[_0x2225fe(0x1f2)][_0x2225fe(0x217)](),_0x5d1948=process[_0x2225fe(0x1ef)][0x1]??'';if(_0x448660[_0x2225fe(0x1f1)](_0x2225fe(0x21c))||_0x5d1948['includes'](_0x2225fe(0x20a)))return _0x2225fe(0x21c);if(_0x5d1948[_0x2225fe(0x1f1)]('pnpm'))return _0x2225fe(0x213);if(_0x5d1948['includes'](_0x2225fe(0x214)))return _0x2225fe(0x214);return'npm';}export function buildInstallArgs(_0x4534d5,_0x453943){const _0x17701c=a44_0x29f658;switch(_0x4534d5){case _0x17701c(0x214):return[_0x17701c(0x20c),_0x17701c(0x1fa),_0x453943];case _0x17701c(0x213):return[_0x17701c(0x1fa),'-g',_0x453943];default:return[_0x17701c(0x1f0),'-g',_0x453943];}}export class UpgradeCommand extends BaseCommand{['name']=a44_0x29f658(0x211);[a44_0x29f658(0x20e)]=a44_0x29f658(0x21d);async[a44_0x29f658(0x206)](_0x34ce2f){const _0x2b0135=a44_0x29f658,{options:_0x26abc6,args:_0x25ddaa}=_0x34ce2f,_0x30ab3c=!!_0x26abc6[_0x2b0135(0x21e)],{next:_0x10ece2,method:_0x76f4cb}=_0x26abc6,_0x46dd98=_0x10ece2?'next':loadReleaseChannel(),_0x102fcb=_0x46dd98===_0x2b0135(0x201)?'next':_0x2b0135(0x1fe),_0xaf1625=_0x25ddaa[0x0]?String(_0x25ddaa[0x0])[_0x2b0135(0x218)](/^v/,''):undefined,_0x4e5a24=getVersion();if(isDevVersion())return console['error'](a44_0x1f535a[_0x2b0135(0x207)]('Upgrade\x20is\x20not\x20available\x20for\x20development\x20versions.')),console[_0x2b0135(0x1fb)](a44_0x1f535a[_0x2b0135(0x20f)](_0x2b0135(0x202)+_0x4e5a24)),0x1;let _0x4ae125;if(_0xaf1625)_0x4ae125=_0xaf1625,console[_0x2b0135(0x21b)](a44_0x1f535a[_0x2b0135(0x20f)]('Current\x20version:')+'\x20'+_0x4e5a24),console['log'](a44_0x1f535a[_0x2b0135(0x20f)](_0x2b0135(0x219))+'\x20\x20'+a44_0x1f535a[_0x2b0135(0x1f7)](_0xaf1625)),console['log']();else{console[_0x2b0135(0x21b)](a44_0x1f535a['dim']('Checking\x20'+PACKAGE_NAME+'@'+_0x102fcb+_0x2b0135(0x1ff)));try{_0x4ae125=await fetchLatestVersion(_0x46dd98);}catch(_0x447694){return console[_0x2b0135(0x1fb)](a44_0x1f535a[_0x2b0135(0x205)]('Failed\x20to\x20check\x20for\x20updates:\x20'+(_0x447694 instanceof Error?_0x447694[_0x2b0135(0x204)]:String(_0x447694)))),0x1;}if(!gt(_0x4ae125,_0x4e5a24))return console[_0x2b0135(0x21b)](a44_0x1f535a[_0x2b0135(0x1f7)](_0x2b0135(0x1fc)+_0x4e5a24+').')),0x0;console[_0x2b0135(0x21b)](a44_0x1f535a[_0x2b0135(0x20f)](_0x2b0135(0x1f3))+'\x20'+_0x4e5a24),console[_0x2b0135(0x21b)](a44_0x1f535a[_0x2b0135(0x20f)](_0x2b0135(0x1fd))+'\x20\x20'+a44_0x1f535a['green'](_0x4ae125)),console[_0x2b0135(0x21b)]();}const _0x28b451=_0x76f4cb??detectPackageManager(),_0x3eed71=_0xaf1625?PACKAGE_NAME+'@'+_0xaf1625:PACKAGE_NAME+'@'+_0x102fcb,_0x2e82fe=buildInstallArgs(_0x28b451,_0x3eed71);if(_0x30ab3c)return console['log'](a44_0x1f535a['dim'](_0x2b0135(0x20b))),console[_0x2b0135(0x21b)]('\x20\x20'+a44_0x1f535a[_0x2b0135(0x215)](_0x28b451+'\x20'+_0x2e82fe[_0x2b0135(0x209)]('\x20'))),0x0;return console[_0x2b0135(0x21b)](a44_0x1f535a[_0x2b0135(0x20f)](_0x2b0135(0x210))+'\x20'+_0x28b451+'\x20'+_0x2e82fe[_0x2b0135(0x209)]('\x20')),console[_0x2b0135(0x21b)](),new Promise(_0x59d241=>{const _0xce2cbf=_0x2b0135,_0x143889=crossSpawn(_0x28b451,_0x2e82fe,{'stdio':_0xce2cbf(0x1f5)});_0x143889['on']('close',_0x283013=>{const _0x2e283d=_0xce2cbf;console[_0x2e283d(0x21b)](),_0x283013===0x0?console['log'](a44_0x1f535a[_0x2e283d(0x1f7)]('Successfully\x20upgraded\x20to\x20'+_0x3eed71)):console[_0x2e283d(0x1fb)](a44_0x1f535a[_0x2e283d(0x205)](_0x2e283d(0x1f6)+_0x283013+').')),_0x59d241(_0x283013??0x1);}),_0x143889['on']('error',_0x5e806f=>{const _0x5a2e3e=_0xce2cbf;console[_0x5a2e3e(0x1fb)](a44_0x1f535a[_0x5a2e3e(0x205)](_0x5a2e3e(0x1f8)+_0x28b451+':\x20'+_0x5e806f['message'])),_0x59d241(0x1);});});}}
1
+ const a44_0x44a2fd=a44_0x4b42;(function(_0x4b0679,_0x367cb9){const _0xa2616b=a44_0x4b42,_0xd0eb94=_0x4b0679();while(!![]){try{const _0x39f261=parseInt(_0xa2616b(0x14a))/0x1*(parseInt(_0xa2616b(0x12b))/0x2)+parseInt(_0xa2616b(0x141))/0x3*(-parseInt(_0xa2616b(0x12d))/0x4)+-parseInt(_0xa2616b(0x145))/0x5+-parseInt(_0xa2616b(0x123))/0x6+-parseInt(_0xa2616b(0x13d))/0x7*(parseInt(_0xa2616b(0x12a))/0x8)+-parseInt(_0xa2616b(0x143))/0x9+parseInt(_0xa2616b(0x13e))/0xa*(parseInt(_0xa2616b(0x131))/0xb);if(_0x39f261===_0x367cb9)break;else _0xd0eb94['push'](_0xd0eb94['shift']());}catch(_0x5560a0){_0xd0eb94['push'](_0xd0eb94['shift']());}}}(a44_0x19e7,0xa5df0));function a44_0x19e7(){const _0x4886a5=['2001508WIkGNh','next','message','dim','35879481VRiFJK','error','add','Upgrade\x20is\x20not\x20available\x20for\x20development\x20versions.','latest','toLowerCase','Checking\x20','inherit','execPath','red','log','execute','21oGpWXI','10erkNEu','Would\x20run:','pnpm','6XiafCA','install','488592PBCzAP','bun','1287025vcRPhx','Failed\x20to\x20check\x20for\x20updates:\x20','...','green','includes','497153GQHHJp','replace','argv','global','name','Current\x20version:','yarn','close','yellow','dryRun','cyan','3000744SLCBFH','Successfully\x20upgraded\x20to\x20','Upgrade\x20failed\x20(exit\x20code\x20','join','upgrade','Running:','Latest\x20version:','3378520dxMxef','2lvPRmT','@treasuredata/tdx'];a44_0x19e7=function(){return _0x4886a5;};return a44_0x19e7();}import{gt}from'semver';import a44_0x3703d3 from'chalk';import{BaseCommand}from'./command.js';import{getVersion,isDevVersion}from'../core/version.js';import{loadReleaseChannel}from'../core/config.js';import{fetchLatestVersion}from'../utils/version-check.js';function a44_0x4b42(_0x3a5639,_0x24c603){_0x3a5639=_0x3a5639-0x11e;const _0x19e785=a44_0x19e7();let _0x4b42c6=_0x19e785[_0x3a5639];return _0x4b42c6;}import{crossSpawn}from'../utils/process.js';const PACKAGE_NAME=a44_0x44a2fd(0x12c);export function detectPackageManager(){const _0x4be584=a44_0x44a2fd,_0x19953a=process[_0x4be584(0x139)][_0x4be584(0x136)](),_0x48f6db=process[_0x4be584(0x14c)][0x1]??'';if(_0x19953a[_0x4be584(0x149)](_0x4be584(0x144))||_0x48f6db['includes']('.bun/'))return'bun';if(_0x48f6db[_0x4be584(0x149)](_0x4be584(0x140)))return _0x4be584(0x140);if(_0x48f6db[_0x4be584(0x149)]('yarn'))return _0x4be584(0x11e);return'npm';}export function buildInstallArgs(_0x49bbd6,_0x2fd3c4){const _0xf3dc5f=a44_0x44a2fd;switch(_0x49bbd6){case _0xf3dc5f(0x11e):return[_0xf3dc5f(0x14d),_0xf3dc5f(0x133),_0x2fd3c4];case _0xf3dc5f(0x140):return[_0xf3dc5f(0x133),'-g',_0x2fd3c4];default:return[_0xf3dc5f(0x142),'-g',_0x2fd3c4];}}export class UpgradeCommand extends BaseCommand{[a44_0x44a2fd(0x14e)]=a44_0x44a2fd(0x127);['description']='Upgrade\x20tdx\x20to\x20the\x20latest\x20version';async[a44_0x44a2fd(0x13c)](_0x48a652){const _0x2095fb=a44_0x44a2fd,{options:_0x3c3f17,args:_0x13da4d}=_0x48a652,_0x5d0c61=!!_0x3c3f17[_0x2095fb(0x121)],{next:_0x44c29b,method:_0x1f3e91}=_0x3c3f17,_0x23b74a=_0x44c29b?_0x2095fb(0x12e):loadReleaseChannel(),_0xf82d2b=_0x23b74a==='next'?_0x2095fb(0x12e):_0x2095fb(0x135),_0x36d35d=_0x13da4d[0x0]?String(_0x13da4d[0x0])[_0x2095fb(0x14b)](/^v/,''):undefined,_0x12e5b2=getVersion();if(isDevVersion())return console[_0x2095fb(0x132)](a44_0x3703d3[_0x2095fb(0x120)](_0x2095fb(0x134))),console['error'](a44_0x3703d3['dim']('Current\x20version:\x20'+_0x12e5b2)),0x1;let _0x2938a;if(_0x36d35d)_0x2938a=_0x36d35d,console[_0x2095fb(0x13b)](a44_0x3703d3[_0x2095fb(0x130)](_0x2095fb(0x14f))+'\x20'+_0x12e5b2),console[_0x2095fb(0x13b)](a44_0x3703d3[_0x2095fb(0x130)]('Target\x20version:')+'\x20\x20'+a44_0x3703d3['green'](_0x36d35d)),console[_0x2095fb(0x13b)]();else{console['log'](a44_0x3703d3[_0x2095fb(0x130)](_0x2095fb(0x137)+PACKAGE_NAME+'@'+_0xf82d2b+_0x2095fb(0x147)));try{_0x2938a=await fetchLatestVersion(_0x23b74a);}catch(_0x4d9f93){return console[_0x2095fb(0x132)](a44_0x3703d3[_0x2095fb(0x13a)](_0x2095fb(0x146)+(_0x4d9f93 instanceof Error?_0x4d9f93[_0x2095fb(0x12f)]:String(_0x4d9f93)))),0x1;}if(!gt(_0x2938a,_0x12e5b2))return console['log'](a44_0x3703d3[_0x2095fb(0x148)]('Already\x20up\x20to\x20date\x20('+_0x12e5b2+').')),0x0;console[_0x2095fb(0x13b)](a44_0x3703d3[_0x2095fb(0x130)]('Current\x20version:')+'\x20'+_0x12e5b2),console[_0x2095fb(0x13b)](a44_0x3703d3['dim'](_0x2095fb(0x129))+'\x20\x20'+a44_0x3703d3['green'](_0x2938a)),console[_0x2095fb(0x13b)]();}const _0x41aea3=_0x1f3e91??detectPackageManager(),_0x302cba=_0x36d35d?PACKAGE_NAME+'@'+_0x36d35d:PACKAGE_NAME+'@'+_0xf82d2b,_0x4da143=buildInstallArgs(_0x41aea3,_0x302cba);if(_0x5d0c61)return console[_0x2095fb(0x13b)](a44_0x3703d3[_0x2095fb(0x130)](_0x2095fb(0x13f))),console[_0x2095fb(0x13b)]('\x20\x20'+a44_0x3703d3[_0x2095fb(0x122)](_0x41aea3+'\x20'+_0x4da143[_0x2095fb(0x126)]('\x20'))),0x0;return console[_0x2095fb(0x13b)](a44_0x3703d3[_0x2095fb(0x130)](_0x2095fb(0x128))+'\x20'+_0x41aea3+'\x20'+_0x4da143[_0x2095fb(0x126)]('\x20')),console[_0x2095fb(0x13b)](),new Promise(_0x10e706=>{const _0xdbb54c=_0x2095fb,_0x440af9=crossSpawn(_0x41aea3,_0x4da143,{'stdio':_0xdbb54c(0x138)});_0x440af9['on'](_0xdbb54c(0x11f),_0x3a14fa=>{const _0x319df6=_0xdbb54c;console[_0x319df6(0x13b)](),_0x3a14fa===0x0?console[_0x319df6(0x13b)](a44_0x3703d3['green'](_0x319df6(0x124)+_0x302cba)):console['error'](a44_0x3703d3[_0x319df6(0x13a)](_0x319df6(0x125)+_0x3a14fa+').')),_0x10e706(_0x3a14fa??0x1);}),_0x440af9['on'](_0xdbb54c(0x132),_0x4f3bda=>{const _0x42bacf=_0xdbb54c;console[_0x42bacf(0x132)](a44_0x3703d3[_0x42bacf(0x13a)]('Failed\x20to\x20run\x20'+_0x41aea3+':\x20'+_0x4f3bda[_0x42bacf(0x12f)])),_0x10e706(0x1);});});}}
@@ -1 +1 @@
1
- const a45_0x3579f4=a45_0x5d07;(function(_0x3df311,_0x18996e){const _0x25af0c=a45_0x5d07,_0x2a59d7=_0x3df311();while(!![]){try{const _0x8cf6bb=parseInt(_0x25af0c(0x1a8))/0x1+-parseInt(_0x25af0c(0x193))/0x2+parseInt(_0x25af0c(0x171))/0x3+parseInt(_0x25af0c(0x190))/0x4*(parseInt(_0x25af0c(0x1af))/0x5)+-parseInt(_0x25af0c(0x195))/0x6+parseInt(_0x25af0c(0x176))/0x7*(-parseInt(_0x25af0c(0x18e))/0x8)+-parseInt(_0x25af0c(0x1ba))/0x9*(-parseInt(_0x25af0c(0x186))/0xa);if(_0x8cf6bb===_0x18996e)break;else _0x2a59d7['push'](_0x2a59d7['shift']());}catch(_0x1c4027){_0x2a59d7['push'](_0x2a59d7['shift']());}}}(a45_0x34f8,0xa81f2));import{BaseCommand}from'./command.js';import{saveSessionContext,getSessionID,cleanExpiredSessions,clearSessionContext}from'../core/session.js';function a45_0x34f8(){const _0x55c2af=['\x0aTip:\x20Use\x20\x27tdx\x20use\x20--default\x20site\x20','llm_agent','session','Session\x20engage_workspace\x20set\x20to:\x20','displayWithSources','includes','stable','\x0aTip:\x20Use\x20\x27tdx\x20use\x20--default\x20profile\x20','code','873020mSzCfa','Session\x20parent_segment\x20set\x20to:\x20','next','.\x20Must\x20be\x20one\x20of:\x20','Session\x20llm_project\x20set\x20to:\x20','llm_project','length','validate','10488LIeGZL','NOT_FOUND','6844YAwdlE','Session\x20context\x20','Release\x20channel\x20set\x20to:\x20','841026CxqBJk','resolveWorkspaceId','3041328CVsKWi','database','Session\x20profile\x20set\x20to:\x20','\x0aSaved\x20to:\x20','Invalid\x20resource:\x20','\x0aUse\x20\x27tdx\x20profiles\x27\x20to\x20see\x20available\x20profiles','name','Install\x20the\x20latest\x20next\x20version:\x20npm\x20install\x20-g\x20@treasuredata/tdx@next','\x27\x20to\x20save\x20permanently','use','INVALID_ARGUMENT','execute','Invalid\x20release\x20channel:\x20','engage_workspace','Default\x20profile\x20set\x20to:\x20','Error:\x20','.\x20Must\x20be\x20\x27stable\x27\x20or\x20\x27next\x27.','\x0aUpdate\x20notifications\x20will\x20check\x20the\x20@latest\x20(stable)\x20channel.','cleared','619249VJNTfa','site','Error:\x20Profile\x20\x27','log','default','\x27\x20does\x20not\x20exist','Set\x20session-level\x20context','525HuhHwX','message','Use\x20--default\x20with\x20site,\x20profile,\x20or\x20release_channel\x20to\x20save\x20permanently','release_channel','release_channel\x20requires\x20--default.\x20Usage:\x20tdx\x20use\x20--default\x20release_channel\x20<stable|next>','Session\x20agent\x20set\x20to:\x20','(session:\x20','error','Default\x20site\x20set\x20to:\x20','Usage:\x20tdx\x20use\x20<resource>\x20<value>\x0a','\x0aRun\x20\x27tdx\x20use\x20--help\x27\x20for\x20more\x20options','18wyjREg','\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20--default\x20release_channel\x20<stable|next>\x20\x20#\x20Set\x20release\x20channel\x0a','display','clear','\x0aSet\x20context:\x20tdx\x20use\x20<resource>\x20<value>','profile','3158586pWSKUs','dim','parent_segment','\x0aUse\x20\x27tdx\x20engage\x20workspace\x20list\x27\x20to\x20see\x20available\x20workspaces','join','2191twBqal','\x0aUpdate\x20notifications\x20will\x20now\x20check\x20the\x20@next\x20channel.','debug','--default\x20can\x20only\x20be\x20used\x20with\x20\x27site\x27,\x20\x27profile\x27,\x20or\x20\x27release_channel\x27.\x20Other\x20resources\x20are\x20session-level\x20only.','green','\x0aTip:\x20Use\x20\x27tdx\x20use\x20--clear\x27\x20to\x20clear\x20session\x20overrides','Session\x20database\x20set\x20to:\x20'];a45_0x34f8=function(){return _0x55c2af;};return a45_0x34f8();}import{profileExists,saveActiveProfileToUserConfig,saveDefaultSiteToUserConfig}from'../core/profile.js';import{GlobalContext}from'../core/global-context.js';import{parseAgentRef}from'../sdk/agent/agent-ref-parser.js';import{getConfigDir,saveReleaseChannel}from'../core/config.js';import{SDKError,ErrorCode}from'../sdk/errors.js';function a45_0x5d07(_0x3a03a4,_0x5ae01e){_0x3a03a4=_0x3a03a4-0x16e;const _0x34f8e3=a45_0x34f8();let _0x5d0724=_0x34f8e3[_0x3a03a4];return _0x5d0724;}import{withSpinner}from'../utils/spinner.js';import a45_0x9500c5 from'chalk';import*as a45_0x4f94d9 from'node:path';export class UseCommand extends BaseCommand{[a45_0x3579f4(0x19b)]=a45_0x3579f4(0x19e);['description']=a45_0x3579f4(0x1ae);[a45_0x3579f4(0x18d)](_0x29f8f9){const _0x3ca9de=a45_0x3579f4,{args:_0xc8c69f,options:_0x44a25e}=_0x29f8f9,_0x3fe85e=_0x44a25e[_0x3ca9de(0x1ac)];if(_0xc8c69f[_0x3ca9de(0x18c)]===0x0)return undefined;if(_0xc8c69f[_0x3ca9de(0x18c)]===0x1)return _0x3ca9de(0x1b8)+'\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'+'\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20--clear\x20\x20\x20\x20\x20\x20#\x20Clear\x20session\x20context\x0a'+'\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20--default\x20site\x20<value>\x20\x20\x20\x20\x20#\x20Save\x20default\x20site\x20to\x20config\x0a'+'\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20--default\x20profile\x20<value>\x20\x20#\x20Save\x20default\x20profile\x20to\x20config\x0a'+_0x3ca9de(0x1bb)+'\x0aResources:\x20site,\x20database,\x20parent_segment,\x20llm_project,\x20agent,\x20profile,\x20engage_workspace,\x20release_channel\x0a'+_0x3ca9de(0x1b9);const _0x36cc04=_0xc8c69f[0x0],_0x4b218a=[_0x3ca9de(0x1a9),_0x3ca9de(0x196),_0x3ca9de(0x173),_0x3ca9de(0x18b),'agent',_0x3ca9de(0x170),_0x3ca9de(0x1a2),_0x3ca9de(0x1b2)];if(!_0x4b218a[_0x3ca9de(0x182)](_0x36cc04))return _0x3ca9de(0x199)+_0x36cc04+_0x3ca9de(0x189)+_0x4b218a[_0x3ca9de(0x175)](',\x20');if(_0x3fe85e&&_0x36cc04!==_0x3ca9de(0x1a9)&&_0x36cc04!==_0x3ca9de(0x170)&&_0x36cc04!==_0x3ca9de(0x1b2))return _0x3ca9de(0x179);if(_0x36cc04===_0x3ca9de(0x1b2)&&!_0x3fe85e)return _0x3ca9de(0x1b3);if(_0x36cc04==='release_channel'){const _0x36b116=_0xc8c69f[0x1];if(_0x36b116!==_0x3ca9de(0x183)&&_0x36b116!==_0x3ca9de(0x188))return _0x3ca9de(0x1a1)+_0x36b116+_0x3ca9de(0x1a5);}return undefined;}async[a45_0x3579f4(0x1a0)](_0x446200){const _0x1fba62=a45_0x3579f4,{args:_0x3b8ae1,options:_0x3c9732}=_0x446200,_0x56b801=_0x3c9732[_0x1fba62(0x178)],_0x83d0aa=_0x3c9732[_0x1fba62(0x16e)],_0x406edf=_0x3c9732[_0x1fba62(0x1ac)];cleanExpiredSessions();try{if(_0x83d0aa){clearSessionContext(_0x3c9732[_0x1fba62(0x17f)]);const _0x38a932=getSessionID(_0x3c9732[_0x1fba62(0x17f)]);return console[_0x1fba62(0x1ab)](_0x1fba62(0x191)+a45_0x9500c5[_0x1fba62(0x17a)](_0x1fba62(0x1a7))+'\x20'+a45_0x9500c5['dim'](_0x1fba62(0x1b5)+_0x38a932+')')),0x0;}if(_0x3b8ae1[_0x1fba62(0x18c)]===0x0){const _0x12827c=new GlobalContext(_0x3c9732);return _0x56b801?_0x12827c[_0x1fba62(0x181)]():_0x12827c[_0x1fba62(0x1bc)](),console[_0x1fba62(0x1ab)](a45_0x9500c5['dim'](_0x1fba62(0x16f))),console[_0x1fba62(0x1ab)](a45_0x9500c5[_0x1fba62(0x172)]('Resources:\x20site,\x20database,\x20parent_segment,\x20llm_project,\x20agent,\x20profile,\x20engage_workspace,\x20release_channel')),console['log'](a45_0x9500c5[_0x1fba62(0x172)](_0x1fba62(0x1b1))),0x0;}const _0x11b4b6=_0x3b8ae1[0x0],_0x5d8a22=_0x3b8ae1[0x1],_0x2b54b2=a45_0x4f94d9['join'](getConfigDir(),'tdx.json');if(_0x406edf){if(_0x11b4b6==='site')return saveDefaultSiteToUserConfig(_0x5d8a22),console[_0x1fba62(0x1ab)](_0x1fba62(0x1b7)+a45_0x9500c5[_0x1fba62(0x17a)](_0x5d8a22)),console[_0x1fba62(0x1ab)](a45_0x9500c5[_0x1fba62(0x172)](_0x1fba62(0x198)+_0x2b54b2)),0x0;if(_0x11b4b6===_0x1fba62(0x170)){if(!profileExists(_0x5d8a22))return console[_0x1fba62(0x1b6)](_0x1fba62(0x1aa)+_0x5d8a22+_0x1fba62(0x1ad)),console[_0x1fba62(0x1b6)]('\x0aUse\x20\x27tdx\x20profiles\x27\x20to\x20see\x20available\x20profiles'),0x1;return saveActiveProfileToUserConfig(_0x5d8a22),console[_0x1fba62(0x1ab)](_0x1fba62(0x1a3)+a45_0x9500c5[_0x1fba62(0x17a)](_0x5d8a22)),console[_0x1fba62(0x1ab)](a45_0x9500c5[_0x1fba62(0x172)]('\x0aSaved\x20to:\x20'+_0x2b54b2)),0x0;}if(_0x11b4b6==='release_channel')return saveReleaseChannel(_0x5d8a22),console[_0x1fba62(0x1ab)](_0x1fba62(0x192)+a45_0x9500c5[_0x1fba62(0x17a)](_0x5d8a22)),console[_0x1fba62(0x1ab)](a45_0x9500c5[_0x1fba62(0x172)]('\x0aSaved\x20to:\x20'+_0x2b54b2)),_0x5d8a22===_0x1fba62(0x188)?(console[_0x1fba62(0x1ab)](a45_0x9500c5[_0x1fba62(0x172)](_0x1fba62(0x177))),console[_0x1fba62(0x1ab)](a45_0x9500c5['dim'](_0x1fba62(0x19c)))):console[_0x1fba62(0x1ab)](a45_0x9500c5[_0x1fba62(0x172)](_0x1fba62(0x1a6))),0x0;}if(_0x11b4b6==='site'){const _0x377353=getSessionID(_0x3c9732[_0x1fba62(0x17f)]);return saveSessionContext({'site':_0x5d8a22},_0x3c9732[_0x1fba62(0x17f)]),console[_0x1fba62(0x1ab)]('Session\x20site\x20set\x20to:\x20'+a45_0x9500c5[_0x1fba62(0x17a)](_0x5d8a22)+'\x20'+a45_0x9500c5[_0x1fba62(0x172)](_0x1fba62(0x1b5)+_0x377353+')')),console[_0x1fba62(0x1ab)](a45_0x9500c5[_0x1fba62(0x172)](_0x1fba62(0x17d)+_0x5d8a22+'\x27\x20to\x20save\x20permanently')),0x0;}if(_0x11b4b6===_0x1fba62(0x170)){if(!profileExists(_0x5d8a22))return console['error']('Error:\x20Profile\x20\x27'+_0x5d8a22+'\x27\x20does\x20not\x20exist'),console[_0x1fba62(0x1b6)](_0x1fba62(0x19a)),0x1;const _0x54c067=getSessionID(_0x3c9732['session']);return saveSessionContext({'profile':_0x5d8a22},_0x3c9732[_0x1fba62(0x17f)]),console['log'](_0x1fba62(0x197)+a45_0x9500c5['green'](_0x5d8a22)+'\x20'+a45_0x9500c5['dim']('(session:\x20'+_0x54c067+')')),console[_0x1fba62(0x1ab)](a45_0x9500c5[_0x1fba62(0x172)](_0x1fba62(0x184)+_0x5d8a22+_0x1fba62(0x19d))),0x0;}const _0xf740d={},_0x4eb1bb=getSessionID(_0x3c9732[_0x1fba62(0x17f)]);switch(_0x11b4b6){case _0x1fba62(0x196):_0xf740d[_0x1fba62(0x196)]=_0x5d8a22,console['log'](_0x1fba62(0x17c)+a45_0x9500c5['green'](_0x5d8a22)+'\x20'+a45_0x9500c5[_0x1fba62(0x172)](_0x1fba62(0x1b5)+_0x4eb1bb+')'));break;case _0x1fba62(0x173):_0xf740d['parent_segment']=_0x5d8a22,console[_0x1fba62(0x1ab)](_0x1fba62(0x187)+a45_0x9500c5['green'](_0x5d8a22)+'\x20'+a45_0x9500c5[_0x1fba62(0x172)](_0x1fba62(0x1b5)+_0x4eb1bb+')'));break;case _0x1fba62(0x18b):_0xf740d['llm_project']=_0x5d8a22,console[_0x1fba62(0x1ab)](_0x1fba62(0x18a)+a45_0x9500c5[_0x1fba62(0x17a)](_0x5d8a22)+'\x20'+a45_0x9500c5[_0x1fba62(0x172)](_0x1fba62(0x1b5)+_0x4eb1bb+')'));break;case'agent':{const {projectName:_0x52a3fd,agentName:_0x2cea88}=parseAgentRef(_0x5d8a22);_0x2cea88?(_0xf740d[_0x1fba62(0x18b)]=_0x52a3fd,_0xf740d[_0x1fba62(0x17e)]=_0x2cea88,console[_0x1fba62(0x1ab)](_0x1fba62(0x18a)+a45_0x9500c5['green'](_0x52a3fd)+'\x20'+a45_0x9500c5[_0x1fba62(0x172)](_0x1fba62(0x1b5)+_0x4eb1bb+')')),console['log']('Session\x20agent\x20set\x20to:\x20'+a45_0x9500c5[_0x1fba62(0x17a)](_0x2cea88)+'\x20'+a45_0x9500c5[_0x1fba62(0x172)](_0x1fba62(0x1b5)+_0x4eb1bb+')'))):(_0xf740d[_0x1fba62(0x17e)]=_0x5d8a22,console[_0x1fba62(0x1ab)](_0x1fba62(0x1b4)+a45_0x9500c5['green'](_0x5d8a22)+'\x20'+a45_0x9500c5['dim'](_0x1fba62(0x1b5)+_0x4eb1bb+')')));break;}case _0x1fba62(0x1a2):{try{await withSpinner('Verifying\x20workspace\x20\x27'+_0x5d8a22+'\x27...',()=>_0x446200['tdx']['engage'][_0x1fba62(0x194)](_0x5d8a22));}catch(_0x4c88e1){if(_0x4c88e1 instanceof SDKError&&(_0x4c88e1[_0x1fba62(0x185)]===ErrorCode[_0x1fba62(0x18f)]||_0x4c88e1[_0x1fba62(0x185)]===ErrorCode[_0x1fba62(0x19f)]))return console[_0x1fba62(0x1b6)](_0x1fba62(0x1a4)+_0x4c88e1[_0x1fba62(0x1b0)]),console['error'](_0x1fba62(0x174)),0x1;throw _0x4c88e1;}_0xf740d['engage_workspace']=_0x5d8a22,console[_0x1fba62(0x1ab)](_0x1fba62(0x180)+a45_0x9500c5[_0x1fba62(0x17a)](_0x5d8a22)+'\x20'+a45_0x9500c5['dim'](_0x1fba62(0x1b5)+_0x4eb1bb+')'));break;}}return saveSessionContext(_0xf740d,_0x3c9732[_0x1fba62(0x17f)]),console['log'](a45_0x9500c5[_0x1fba62(0x172)](_0x1fba62(0x17b))),0x0;}catch(_0x4f21d9){return _0x4f21d9 instanceof Error&&console['error'](_0x1fba62(0x1a4)+_0x4f21d9['message']),0x1;}}}
1
+ const a45_0x21ea83=a45_0x3adb;(function(_0x49e88c,_0x18b12b){const _0x156c92=a45_0x3adb,_0x17d085=_0x49e88c();while(!![]){try{const _0x1dcc5c=parseInt(_0x156c92(0x1dc))/0x1+parseInt(_0x156c92(0x1d6))/0x2+-parseInt(_0x156c92(0x1ca))/0x3+-parseInt(_0x156c92(0x1ac))/0x4+parseInt(_0x156c92(0x19d))/0x5*(parseInt(_0x156c92(0x1db))/0x6)+-parseInt(_0x156c92(0x1e4))/0x7*(-parseInt(_0x156c92(0x19e))/0x8)+-parseInt(_0x156c92(0x1d5))/0x9*(parseInt(_0x156c92(0x1e6))/0xa);if(_0x1dcc5c===_0x18b12b)break;else _0x17d085['push'](_0x17d085['shift']());}catch(_0x38cd3d){_0x17d085['push'](_0x17d085['shift']());}}}(a45_0x4b39,0x699e5));import{BaseCommand}from'./command.js';import{saveSessionContext,getSessionID,cleanExpiredSessions,clearSessionContext}from'../core/session.js';import{profileExists,saveActiveProfileToUserConfig,saveDefaultSiteToUserConfig}from'../core/profile.js';import{GlobalContext}from'../core/global-context.js';import{parseAgentRef}from'../sdk/agent/agent-ref-parser.js';import{getConfigDir,saveReleaseChannel}from'../core/config.js';import{SDKError,ErrorCode}from'../sdk/errors.js';function a45_0x3adb(_0x4324ef,_0x4ea230){_0x4324ef=_0x4324ef-0x19d;const _0x4b3943=a45_0x4b39();let _0x3adb7b=_0x4b3943[_0x4324ef];return _0x3adb7b;}import{withSpinner}from'../utils/spinner.js';import a45_0x46408a from'chalk';import*as a45_0x26ede3 from'node:path';function a45_0x4b39(){const _0x4bf27a=['parent_segment','31050lPLTSc','136DIWwKP','\x0aTip:\x20Use\x20\x27tdx\x20use\x20--clear\x27\x20to\x20clear\x20session\x20overrides','default','validate','session','Session\x20profile\x20set\x20to:\x20','site','release_channel','resolveWorkspaceId','display','\x0aUse\x20\x27tdx\x20profiles\x27\x20to\x20see\x20available\x20profiles','dim','\x0aUse\x20\x27tdx\x20engage\x20workspace\x20list\x27\x20to\x20see\x20available\x20workspaces','\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20--default\x20release_channel\x20<stable|next>\x20\x20#\x20Set\x20release\x20channel\x0a','1578392tBlKoB','(session:\x20','Session\x20context\x20','Error:\x20Profile\x20\x27','\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','\x0aRun\x20\x27tdx\x20use\x20--help\x27\x20for\x20more\x20options','--default\x20can\x20only\x20be\x20used\x20with\x20\x27site\x27,\x20\x27profile\x27,\x20or\x20\x27release_channel\x27.\x20Other\x20resources\x20are\x20session-level\x20only.','tdx','next','clear','use','\x0aResources:\x20site,\x20database,\x20parent_segment,\x20llm_project,\x20agent,\x20profile,\x20engage_workspace,\x20release_channel\x0a','engage_workspace','.\x20Must\x20be\x20one\x20of:\x20','Session\x20llm_project\x20set\x20to:\x20','\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20--clear\x20\x20\x20\x20\x20\x20#\x20Clear\x20session\x20context\x0a','\x0aSaved\x20to:\x20','\x27\x20does\x20not\x20exist','Session\x20engage_workspace\x20set\x20to:\x20','error','Session\x20database\x20set\x20to:\x20','Default\x20site\x20set\x20to:\x20','Verifying\x20workspace\x20\x27','length','llm_agent','\x27\x20to\x20save\x20permanently','stable','cleared','Install\x20the\x20latest\x20next\x20version:\x20npm\x20install\x20-g\x20@treasuredata/tdx@next','Release\x20channel\x20set\x20to:\x20','1481205aSFHQc','Use\x20--default\x20with\x20site,\x20profile,\x20or\x20release_channel\x20to\x20save\x20permanently','join','\x27...','message','profile','displayWithSources','\x0aTip:\x20Use\x20\x27tdx\x20use\x20--default\x20site\x20','Default\x20profile\x20set\x20to:\x20','\x0aUpdate\x20notifications\x20will\x20check\x20the\x20@latest\x20(stable)\x20channel.','green','522FODEDY','1138470CqRRUF','.\x20Must\x20be\x20\x27stable\x27\x20or\x20\x27next\x27.','execute','log','Session\x20parent_segment\x20set\x20to:\x20','36aJoJIG','690787WWPbNI','\x0aSet\x20context:\x20tdx\x20use\x20<resource>\x20<value>','\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20--default\x20profile\x20<value>\x20\x20#\x20Save\x20default\x20profile\x20to\x20config\x0a','Invalid\x20release\x20channel:\x20','debug','llm_project','Session\x20agent\x20set\x20to:\x20','\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20--default\x20site\x20<value>\x20\x20\x20\x20\x20#\x20Save\x20default\x20site\x20to\x20config\x0a','157934IIHdVO','Session\x20site\x20set\x20to:\x20','62050uDxzWR','code','Usage:\x20tdx\x20use\x20<resource>\x20<value>\x0a','database','agent','tdx.json','name','engage'];a45_0x4b39=function(){return _0x4bf27a;};return a45_0x4b39();}export class UseCommand extends BaseCommand{[a45_0x21ea83(0x1ec)]=a45_0x21ea83(0x1b6);['description']='Set\x20session-level\x20context';[a45_0x21ea83(0x1a1)](_0x12bd7c){const _0x56b353=a45_0x21ea83,{args:_0x2dd755,options:_0x2df202}=_0x12bd7c,_0x1ecb7a=_0x2df202[_0x56b353(0x1a0)];if(_0x2dd755['length']===0x0)return undefined;if(_0x2dd755[_0x56b353(0x1c3)]===0x1)return _0x56b353(0x1e8)+_0x56b353(0x1b0)+_0x56b353(0x1bb)+_0x56b353(0x1e3)+_0x56b353(0x1de)+_0x56b353(0x1ab)+_0x56b353(0x1b7)+_0x56b353(0x1b1);const _0x1f6e6c=_0x2dd755[0x0],_0x3391ad=[_0x56b353(0x1a4),_0x56b353(0x1e9),_0x56b353(0x1ee),'llm_project',_0x56b353(0x1ea),_0x56b353(0x1cf),_0x56b353(0x1b8),_0x56b353(0x1a5)];if(!_0x3391ad['includes'](_0x1f6e6c))return'Invalid\x20resource:\x20'+_0x1f6e6c+_0x56b353(0x1b9)+_0x3391ad[_0x56b353(0x1cc)](',\x20');if(_0x1ecb7a&&_0x1f6e6c!==_0x56b353(0x1a4)&&_0x1f6e6c!==_0x56b353(0x1cf)&&_0x1f6e6c!==_0x56b353(0x1a5))return _0x56b353(0x1b2);if(_0x1f6e6c===_0x56b353(0x1a5)&&!_0x1ecb7a)return'release_channel\x20requires\x20--default.\x20Usage:\x20tdx\x20use\x20--default\x20release_channel\x20<stable|next>';if(_0x1f6e6c===_0x56b353(0x1a5)){const _0x37f2ba=_0x2dd755[0x1];if(_0x37f2ba!==_0x56b353(0x1c6)&&_0x37f2ba!==_0x56b353(0x1b4))return _0x56b353(0x1df)+_0x37f2ba+_0x56b353(0x1d7);}return undefined;}async[a45_0x21ea83(0x1d8)](_0x57c918){const _0x45a75f=a45_0x21ea83,{args:_0x2a7327,options:_0x1d5d19}=_0x57c918,_0x1e3a5c=_0x1d5d19[_0x45a75f(0x1e0)],_0x37b41f=_0x1d5d19[_0x45a75f(0x1b5)],_0xe1a417=_0x1d5d19[_0x45a75f(0x1a0)];cleanExpiredSessions();try{if(_0x37b41f){clearSessionContext(_0x1d5d19[_0x45a75f(0x1a2)]);const _0x1a1e43=getSessionID(_0x1d5d19[_0x45a75f(0x1a2)]);return console[_0x45a75f(0x1d9)](_0x45a75f(0x1ae)+a45_0x46408a[_0x45a75f(0x1d4)](_0x45a75f(0x1c7))+'\x20'+a45_0x46408a[_0x45a75f(0x1a9)](_0x45a75f(0x1ad)+_0x1a1e43+')')),0x0;}if(_0x2a7327['length']===0x0){const _0x290830=new GlobalContext(_0x1d5d19);return _0x1e3a5c?_0x290830[_0x45a75f(0x1d0)]():_0x290830[_0x45a75f(0x1a7)](),console[_0x45a75f(0x1d9)](a45_0x46408a[_0x45a75f(0x1a9)](_0x45a75f(0x1dd))),console['log'](a45_0x46408a[_0x45a75f(0x1a9)]('Resources:\x20site,\x20database,\x20parent_segment,\x20llm_project,\x20agent,\x20profile,\x20engage_workspace,\x20release_channel')),console[_0x45a75f(0x1d9)](a45_0x46408a[_0x45a75f(0x1a9)](_0x45a75f(0x1cb))),0x0;}const _0xf55ee5=_0x2a7327[0x0],_0x464bb0=_0x2a7327[0x1],_0x13e3a0=a45_0x26ede3[_0x45a75f(0x1cc)](getConfigDir(),_0x45a75f(0x1eb));if(_0xe1a417){if(_0xf55ee5===_0x45a75f(0x1a4))return saveDefaultSiteToUserConfig(_0x464bb0),console['log'](_0x45a75f(0x1c1)+a45_0x46408a[_0x45a75f(0x1d4)](_0x464bb0)),console[_0x45a75f(0x1d9)](a45_0x46408a[_0x45a75f(0x1a9)](_0x45a75f(0x1bc)+_0x13e3a0)),0x0;if(_0xf55ee5===_0x45a75f(0x1cf)){if(!profileExists(_0x464bb0))return console[_0x45a75f(0x1bf)](_0x45a75f(0x1af)+_0x464bb0+'\x27\x20does\x20not\x20exist'),console[_0x45a75f(0x1bf)](_0x45a75f(0x1a8)),0x1;return saveActiveProfileToUserConfig(_0x464bb0),console[_0x45a75f(0x1d9)](_0x45a75f(0x1d2)+a45_0x46408a[_0x45a75f(0x1d4)](_0x464bb0)),console[_0x45a75f(0x1d9)](a45_0x46408a[_0x45a75f(0x1a9)]('\x0aSaved\x20to:\x20'+_0x13e3a0)),0x0;}if(_0xf55ee5===_0x45a75f(0x1a5))return saveReleaseChannel(_0x464bb0),console[_0x45a75f(0x1d9)](_0x45a75f(0x1c9)+a45_0x46408a['green'](_0x464bb0)),console[_0x45a75f(0x1d9)](a45_0x46408a[_0x45a75f(0x1a9)](_0x45a75f(0x1bc)+_0x13e3a0)),_0x464bb0==='next'?(console[_0x45a75f(0x1d9)](a45_0x46408a[_0x45a75f(0x1a9)]('\x0aUpdate\x20notifications\x20will\x20now\x20check\x20the\x20@next\x20channel.')),console['log'](a45_0x46408a[_0x45a75f(0x1a9)](_0x45a75f(0x1c8)))):console['log'](a45_0x46408a[_0x45a75f(0x1a9)](_0x45a75f(0x1d3))),0x0;}if(_0xf55ee5===_0x45a75f(0x1a4)){const _0x577b66=getSessionID(_0x1d5d19[_0x45a75f(0x1a2)]);return saveSessionContext({'site':_0x464bb0},_0x1d5d19[_0x45a75f(0x1a2)]),console[_0x45a75f(0x1d9)](_0x45a75f(0x1e5)+a45_0x46408a[_0x45a75f(0x1d4)](_0x464bb0)+'\x20'+a45_0x46408a[_0x45a75f(0x1a9)](_0x45a75f(0x1ad)+_0x577b66+')')),console[_0x45a75f(0x1d9)](a45_0x46408a['dim'](_0x45a75f(0x1d1)+_0x464bb0+_0x45a75f(0x1c5))),0x0;}if(_0xf55ee5==='profile'){if(!profileExists(_0x464bb0))return console[_0x45a75f(0x1bf)](_0x45a75f(0x1af)+_0x464bb0+_0x45a75f(0x1bd)),console[_0x45a75f(0x1bf)](_0x45a75f(0x1a8)),0x1;const _0x2b29ba=getSessionID(_0x1d5d19['session']);return saveSessionContext({'profile':_0x464bb0},_0x1d5d19['session']),console['log'](_0x45a75f(0x1a3)+a45_0x46408a[_0x45a75f(0x1d4)](_0x464bb0)+'\x20'+a45_0x46408a[_0x45a75f(0x1a9)](_0x45a75f(0x1ad)+_0x2b29ba+')')),console[_0x45a75f(0x1d9)](a45_0x46408a[_0x45a75f(0x1a9)]('\x0aTip:\x20Use\x20\x27tdx\x20use\x20--default\x20profile\x20'+_0x464bb0+_0x45a75f(0x1c5))),0x0;}const _0x52bd8f={},_0x1f1ce2=getSessionID(_0x1d5d19['session']);switch(_0xf55ee5){case _0x45a75f(0x1e9):_0x52bd8f['database']=_0x464bb0,console[_0x45a75f(0x1d9)](_0x45a75f(0x1c0)+a45_0x46408a['green'](_0x464bb0)+'\x20'+a45_0x46408a['dim']('(session:\x20'+_0x1f1ce2+')'));break;case _0x45a75f(0x1ee):_0x52bd8f[_0x45a75f(0x1ee)]=_0x464bb0,console[_0x45a75f(0x1d9)](_0x45a75f(0x1da)+a45_0x46408a[_0x45a75f(0x1d4)](_0x464bb0)+'\x20'+a45_0x46408a['dim']('(session:\x20'+_0x1f1ce2+')'));break;case _0x45a75f(0x1e1):_0x52bd8f[_0x45a75f(0x1e1)]=_0x464bb0,console[_0x45a75f(0x1d9)](_0x45a75f(0x1ba)+a45_0x46408a[_0x45a75f(0x1d4)](_0x464bb0)+'\x20'+a45_0x46408a[_0x45a75f(0x1a9)]('(session:\x20'+_0x1f1ce2+')'));break;case _0x45a75f(0x1ea):{const {projectName:_0xd57192,agentName:_0x5af20b}=parseAgentRef(_0x464bb0);_0x5af20b?(_0x52bd8f['llm_project']=_0xd57192,_0x52bd8f[_0x45a75f(0x1c4)]=_0x5af20b,console[_0x45a75f(0x1d9)](_0x45a75f(0x1ba)+a45_0x46408a[_0x45a75f(0x1d4)](_0xd57192)+'\x20'+a45_0x46408a[_0x45a75f(0x1a9)]('(session:\x20'+_0x1f1ce2+')')),console[_0x45a75f(0x1d9)](_0x45a75f(0x1e2)+a45_0x46408a[_0x45a75f(0x1d4)](_0x5af20b)+'\x20'+a45_0x46408a[_0x45a75f(0x1a9)](_0x45a75f(0x1ad)+_0x1f1ce2+')'))):(_0x52bd8f['llm_agent']=_0x464bb0,console['log'](_0x45a75f(0x1e2)+a45_0x46408a[_0x45a75f(0x1d4)](_0x464bb0)+'\x20'+a45_0x46408a[_0x45a75f(0x1a9)](_0x45a75f(0x1ad)+_0x1f1ce2+')')));break;}case'engage_workspace':{try{await withSpinner(_0x45a75f(0x1c2)+_0x464bb0+_0x45a75f(0x1cd),()=>_0x57c918[_0x45a75f(0x1b3)][_0x45a75f(0x1ed)][_0x45a75f(0x1a6)](_0x464bb0));}catch(_0x261675){if(_0x261675 instanceof SDKError&&(_0x261675[_0x45a75f(0x1e7)]===ErrorCode['NOT_FOUND']||_0x261675['code']===ErrorCode['INVALID_ARGUMENT']))return console['error']('Error:\x20'+_0x261675[_0x45a75f(0x1ce)]),console[_0x45a75f(0x1bf)](_0x45a75f(0x1aa)),0x1;throw _0x261675;}_0x52bd8f['engage_workspace']=_0x464bb0,console[_0x45a75f(0x1d9)](_0x45a75f(0x1be)+a45_0x46408a[_0x45a75f(0x1d4)](_0x464bb0)+'\x20'+a45_0x46408a['dim'](_0x45a75f(0x1ad)+_0x1f1ce2+')'));break;}}return saveSessionContext(_0x52bd8f,_0x1d5d19[_0x45a75f(0x1a2)]),console['log'](a45_0x46408a[_0x45a75f(0x1a9)](_0x45a75f(0x19f))),0x0;}catch(_0x47e56d){return _0x47e56d instanceof Error&&console['error']('Error:\x20'+_0x47e56d['message']),0x1;}}}
@@ -1 +1 @@
1
- function a46_0x670e(){const _0x15dd55=['2681180chwMjW','message','1023711bjSseJ','data','cause','getCurrent','7774weaMhl','7984521qvuPey','\x20\x20Cause:\x20','Error:\x20','error','name','verbose','30NaBcDF','description','\x20user','List\x20all\x20users\x20in\x20the\x20account','execute','1440327wSgjYq','1785976tagTvM','Fetching\x20user\x20info...','160Npfnrs','Show\x20current\x20user\x20information','length','834846GFoYra','user'];a46_0x670e=function(){return _0x15dd55;};return a46_0x670e();}const a46_0x4cae88=a46_0x382d;(function(_0x34e2e8,_0x3538cc){const _0x21705f=a46_0x382d,_0x59d540=_0x34e2e8();while(!![]){try{const _0x31d9b7=-parseInt(_0x21705f(0x1ed))/0x1*(parseInt(_0x21705f(0x1e2))/0x2)+-parseInt(_0x21705f(0x1e9))/0x3+-parseInt(_0x21705f(0x1e7))/0x4+parseInt(_0x21705f(0x1f4))/0x5*(parseInt(_0x21705f(0x1e5))/0x6)+parseInt(_0x21705f(0x1f9))/0x7+parseInt(_0x21705f(0x1e0))/0x8+parseInt(_0x21705f(0x1ee))/0x9;if(_0x31d9b7===_0x3538cc)break;else _0x59d540['push'](_0x59d540['shift']());}catch(_0x44875d){_0x59d540['push'](_0x59d540['shift']());}}}(a46_0x670e,0x7e5c3));function a46_0x382d(_0x532826,_0x4531b4){_0x532826=_0x532826-0x1e0;const _0x670e88=a46_0x670e();let _0x382dde=_0x670e88[_0x532826];return _0x382dde;}import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleSDKOutput,handleSingleObjectOutput}from'../core/command-output.js';import{withSpinner}from'../utils/spinner.js';export class UserCommand extends BaseCommand{[a46_0x4cae88(0x1f2)]='user';[a46_0x4cae88(0x1f5)]=a46_0x4cae88(0x1e3);async[a46_0x4cae88(0x1f8)](_0x3aef16){const _0x3fb29f=a46_0x4cae88,{options:_0x4e6024,tdx:_0x113f32}=_0x3aef16;try{const _0x168ae0=await withSpinner(_0x3fb29f(0x1e1),()=>_0x113f32['user'][_0x3fb29f(0x1ec)](),{'verbose':_0x4e6024[_0x3fb29f(0x1f3)]}),_0x33a723=_0x168ae0[_0x3fb29f(0x1ea)];return await handleSingleObjectOutput(_0x33a723,_0x4e6024),0x0;}catch(_0x2c055c){if(_0x2c055c instanceof SDKError)return console[_0x3fb29f(0x1f1)](_0x3fb29f(0x1f0)+_0x2c055c[_0x3fb29f(0x1e8)]),_0x2c055c[_0x3fb29f(0x1eb)]&&console['error']('\x20\x20Cause:\x20'+_0x2c055c[_0x3fb29f(0x1eb)]),0x1;throw _0x2c055c;}}}export class UserListCommand extends BaseCommand{['name']='user\x20list';['description']=a46_0x4cae88(0x1f7);async['execute'](_0x62bad3){const _0x5584b9=a46_0x4cae88,{options:_0x2a0cb0,tdx:_0x30d073}=_0x62bad3;try{const _0x2688df=await withSpinner('Listing\x20users...',()=>_0x30d073[_0x5584b9(0x1e6)]['list'](),{'verbose':_0x2a0cb0[_0x5584b9(0x1f3)]}),_0x522b86=_0x2688df[_0x5584b9(0x1ea)];return console[_0x5584b9(0x1f1)]('✔\x20Found\x20'+_0x522b86[_0x5584b9(0x1e4)]+_0x5584b9(0x1f6)+(_0x522b86['length']!==0x1?'s':'')),await handleSDKOutput(_0x522b86,_0x2a0cb0),0x0;}catch(_0x5337e2){if(_0x5337e2 instanceof SDKError)return console[_0x5584b9(0x1f1)](_0x5584b9(0x1f0)+_0x5337e2[_0x5584b9(0x1e8)]),_0x5337e2[_0x5584b9(0x1eb)]&&console[_0x5584b9(0x1f1)](_0x5584b9(0x1ef)+_0x5337e2['cause']),0x1;throw _0x5337e2;}}}
1
+ const a46_0x157f68=a46_0x20ab;(function(_0x9835e8,_0x4a7747){const _0x314376=a46_0x20ab,_0x479506=_0x9835e8();while(!![]){try{const _0x2f9185=-parseInt(_0x314376(0x145))/0x1*(-parseInt(_0x314376(0x138))/0x2)+parseInt(_0x314376(0x13e))/0x3*(parseInt(_0x314376(0x13f))/0x4)+parseInt(_0x314376(0x14c))/0x5*(-parseInt(_0x314376(0x146))/0x6)+parseInt(_0x314376(0x151))/0x7+parseInt(_0x314376(0x14d))/0x8+parseInt(_0x314376(0x149))/0x9+parseInt(_0x314376(0x13c))/0xa*(-parseInt(_0x314376(0x147))/0xb);if(_0x2f9185===_0x4a7747)break;else _0x479506['push'](_0x479506['shift']());}catch(_0x4b65c5){_0x479506['push'](_0x479506['shift']());}}}(a46_0x8807,0xec136));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';function a46_0x20ab(_0x4c58f3,_0x1680f1){_0x4c58f3=_0x4c58f3-0x138;const _0x88077e=a46_0x8807();let _0x20abf7=_0x88077e[_0x4c58f3];return _0x20abf7;}import{handleSDKOutput,handleSingleObjectOutput}from'../core/command-output.js';import{withSpinner}from'../utils/spinner.js';function a46_0x8807(){const _0x2f3bf6=['2132lZOIoP','cause','verbose','error','✔\x20Found\x20','length','842EWZwzX','33438QkhyGY','3058tINMnx','Fetching\x20user\x20info...','16684803JsAPLm','user\x20list','user','695ekxIjc','6845792jpLPXy','List\x20all\x20users\x20in\x20the\x20account','execute','description','2081051VNJglh','Listing\x20users...','data','3394bSPyMC','message','name','list','136810TJLBXA','\x20\x20Cause:\x20','6243wecRPY'];a46_0x8807=function(){return _0x2f3bf6;};return a46_0x8807();}export class UserCommand extends BaseCommand{[a46_0x157f68(0x13a)]=a46_0x157f68(0x14b);[a46_0x157f68(0x150)]='Show\x20current\x20user\x20information';async[a46_0x157f68(0x14f)](_0xabf75f){const _0x4f0a80=a46_0x157f68,{options:_0x37702f,tdx:_0x33bc85}=_0xabf75f;try{const _0x3c5caf=await withSpinner(_0x4f0a80(0x148),()=>_0x33bc85['user']['getCurrent'](),{'verbose':_0x37702f['verbose']}),_0x24127=_0x3c5caf[_0x4f0a80(0x153)];return await handleSingleObjectOutput(_0x24127,_0x37702f),0x0;}catch(_0x325320){if(_0x325320 instanceof SDKError)return console[_0x4f0a80(0x142)]('Error:\x20'+_0x325320['message']),_0x325320[_0x4f0a80(0x140)]&&console[_0x4f0a80(0x142)](_0x4f0a80(0x13d)+_0x325320[_0x4f0a80(0x140)]),0x1;throw _0x325320;}}}export class UserListCommand extends BaseCommand{[a46_0x157f68(0x13a)]=a46_0x157f68(0x14a);[a46_0x157f68(0x150)]=a46_0x157f68(0x14e);async[a46_0x157f68(0x14f)](_0x3b44c4){const _0x4f6a43=a46_0x157f68,{options:_0x3de352,tdx:_0x146d5e}=_0x3b44c4;try{const _0x40a5ef=await withSpinner(_0x4f6a43(0x152),()=>_0x146d5e[_0x4f6a43(0x14b)][_0x4f6a43(0x13b)](),{'verbose':_0x3de352[_0x4f6a43(0x141)]}),_0x4b53ab=_0x40a5ef[_0x4f6a43(0x153)];return console[_0x4f6a43(0x142)](_0x4f6a43(0x143)+_0x4b53ab[_0x4f6a43(0x144)]+'\x20user'+(_0x4b53ab[_0x4f6a43(0x144)]!==0x1?'s':'')),await handleSDKOutput(_0x4b53ab,_0x3de352),0x0;}catch(_0x8db9cc){if(_0x8db9cc instanceof SDKError)return console[_0x4f6a43(0x142)]('Error:\x20'+_0x8db9cc[_0x4f6a43(0x139)]),_0x8db9cc[_0x4f6a43(0x140)]&&console[_0x4f6a43(0x142)](_0x4f6a43(0x13d)+_0x8db9cc[_0x4f6a43(0x140)]),0x1;throw _0x8db9cc;}}}