@treasuredata/tdx 0.28.2 → 0.28.4

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 (184) 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/use-command.js +1 -1
  47. package/dist/commands/user-command.js +1 -1
  48. package/dist/commands/workflow-command.js +1 -1
  49. package/dist/core/auth.js +1 -1
  50. package/dist/core/command-output.js +1 -1
  51. package/dist/core/config.js +1 -1
  52. package/dist/core/connection-cache.js +1 -1
  53. package/dist/core/constants.js +1 -1
  54. package/dist/core/credential-cache.js +1 -1
  55. package/dist/core/global-context.js +1 -1
  56. package/dist/core/keychain.js +1 -1
  57. package/dist/core/profile.js +1 -1
  58. package/dist/core/project-config.js +1 -1
  59. package/dist/core/session.js +1 -1
  60. package/dist/core/user-cache.js +1 -1
  61. package/dist/core/version.js +1 -1
  62. package/dist/index.js +1 -1
  63. package/dist/mcp/server.js +1 -1
  64. package/dist/mcp/tools/index.js +1 -1
  65. package/dist/mcp/tools/tdx-run.js +1 -1
  66. package/dist/mcp/tools/tdx-search.js +1 -1
  67. package/dist/mcp/utils.js +1 -1
  68. package/dist/proxy/claude-usage-tracker.js +1 -1
  69. package/dist/proxy/passthrough-server.js +1 -1
  70. package/dist/proxy/sse-usage-parser.js +1 -1
  71. package/dist/sdk/agent/agent-config.js +1 -1
  72. package/dist/sdk/agent/agent-ref-parser.js +1 -1
  73. package/dist/sdk/agent/agent-yaml.js +1 -1
  74. package/dist/sdk/agent/test/evaluator.js +1 -1
  75. package/dist/sdk/agent/test/executor.js +1 -1
  76. package/dist/sdk/agent/test/index.js +1 -1
  77. package/dist/sdk/agent/test/output.js +1 -1
  78. package/dist/sdk/agent/test/parser.js +1 -1
  79. package/dist/sdk/agent/tool-target-registry.js +1 -1
  80. package/dist/sdk/api.js +1 -1
  81. package/dist/sdk/client/cdp-api-client.js +1 -1
  82. package/dist/sdk/client/delivery-api-client.js +1 -1
  83. package/dist/sdk/client/endpoints.js +1 -1
  84. package/dist/sdk/client/engage-api-client.js +1 -1
  85. package/dist/sdk/client/http-client.js +1 -1
  86. package/dist/sdk/client/llm-api-client.js +1 -1
  87. package/dist/sdk/client/rate-limiter.js +1 -1
  88. package/dist/sdk/client/td-api-client.js +1 -1
  89. package/dist/sdk/client/trino-api-client.js +1 -1
  90. package/dist/sdk/client/workflow-client.js +1 -1
  91. package/dist/sdk/connection-validator.js +1 -1
  92. package/dist/sdk/connection.js +1 -1
  93. package/dist/sdk/delivery.js +1 -1
  94. package/dist/sdk/engage/campaign-pull.js +1 -1
  95. package/dist/sdk/engage/campaign-push.js +1 -1
  96. package/dist/sdk/engage/campaign-validator.js +1 -1
  97. package/dist/sdk/engage/campaign-yaml.js +1 -1
  98. package/dist/sdk/engage/types/campaign-def.js +1 -1
  99. package/dist/sdk/engage/types/campaign-schema.js +1 -1
  100. package/dist/sdk/engage.js +1 -1
  101. package/dist/sdk/errors.js +1 -1
  102. package/dist/sdk/index.js +1 -1
  103. package/dist/sdk/io/index.js +1 -1
  104. package/dist/sdk/io/node-filesystem.js +1 -1
  105. package/dist/sdk/job.js +1 -1
  106. package/dist/sdk/journey.js +1 -1
  107. package/dist/sdk/llm/chat-cache.js +1 -1
  108. package/dist/sdk/llm/index.js +1 -1
  109. package/dist/sdk/llm/llm-backup-utils.js +1 -1
  110. package/dist/sdk/llm/model-factors.js +1 -1
  111. package/dist/sdk/personalization.js +1 -1
  112. package/dist/sdk/query/index.js +1 -1
  113. package/dist/sdk/query/sql-parser.js +1 -1
  114. package/dist/sdk/realtime.js +1 -1
  115. package/dist/sdk/schedule.js +1 -1
  116. package/dist/sdk/segment/child-segment-yaml.js +1 -1
  117. package/dist/sdk/segment/fields-display.js +1 -1
  118. package/dist/sdk/segment/file-discovery.js +1 -1
  119. package/dist/sdk/segment/journey-utils.d.ts.map +1 -1
  120. package/dist/sdk/segment/journey-utils.js +1 -1
  121. package/dist/sdk/segment/journey-utils.js.map +1 -1
  122. package/dist/sdk/segment/journey-validator.js +1 -1
  123. package/dist/sdk/segment/journey-validator.js.map +1 -1
  124. package/dist/sdk/segment/journey-yaml.d.ts.map +1 -1
  125. package/dist/sdk/segment/journey-yaml.js +1 -1
  126. package/dist/sdk/segment/journey-yaml.js.map +1 -1
  127. package/dist/sdk/segment/parent-segment-preview.js +1 -1
  128. package/dist/sdk/segment/parent-segment-yaml.js +1 -1
  129. package/dist/sdk/segment/pull-workflow.js +1 -1
  130. package/dist/sdk/segment/push-recovery.js +1 -1
  131. package/dist/sdk/segment/push-workflow.js +1 -1
  132. package/dist/sdk/segment/resolution-context.js +1 -1
  133. package/dist/sdk/segment/segment-path-parser.js +1 -1
  134. package/dist/sdk/segment/segment-ref-parser.js +1 -1
  135. package/dist/sdk/segment/target-resolution.js +1 -1
  136. package/dist/sdk/segment/tdx-config.js +1 -1
  137. package/dist/sdk/segment/validate-files.js +1 -1
  138. package/dist/sdk/segment/yaml-validator.js +1 -1
  139. package/dist/sdk/segment.js +1 -1
  140. package/dist/sdk/types/index.js +1 -1
  141. package/dist/sdk/types/progress.js +1 -1
  142. package/dist/sdk/user.js +1 -1
  143. package/dist/sdk/util/format-detector.js +1 -1
  144. package/dist/sdk/util/formatters.js +1 -1
  145. package/dist/sdk/util/index.js +1 -1
  146. package/dist/sdk/util/tree-formatter.js +1 -1
  147. package/dist/sdk/workflow/archive-validation.js +1 -1
  148. package/dist/sdk/workflow/clone-workflow.js +1 -1
  149. package/dist/sdk/workflow/index.js +1 -1
  150. package/dist/sdk/workflow/pull-workflow.js +1 -1
  151. package/dist/sdk/workflow/push-workflow.js +1 -1
  152. package/dist/sdk/workflow/tdx-config.js +1 -1
  153. package/dist/sdk/workflow/workflow-utils.js +1 -1
  154. package/dist/test-utils/command-runner.js +1 -1
  155. package/dist/test-utils/factories.js +1 -1
  156. package/dist/test-utils/fixtures.js +1 -1
  157. package/dist/test-utils/http-mock.js +1 -1
  158. package/dist/test-utils/index.js +1 -1
  159. package/dist/utils/async.js +1 -1
  160. package/dist/utils/colors.js +1 -1
  161. package/dist/utils/diff.js +1 -1
  162. package/dist/utils/file-permissions.js +1 -1
  163. package/dist/utils/global-cache.js +1 -1
  164. package/dist/utils/json-loader.js +1 -1
  165. package/dist/utils/local-cache.js +1 -1
  166. package/dist/utils/logger/formatters/default-formatter.js +1 -1
  167. package/dist/utils/logger/formatters/index.js +1 -1
  168. package/dist/utils/logger/handlers/console-handler.js +1 -1
  169. package/dist/utils/logger/handlers/file-handler.js +1 -1
  170. package/dist/utils/logger/handlers/index.js +1 -1
  171. package/dist/utils/logger/handlers/null-handler.js +1 -1
  172. package/dist/utils/logger/index.js +1 -1
  173. package/dist/utils/logger/logger.js +1 -1
  174. package/dist/utils/logger/types.js +1 -1
  175. package/dist/utils/option-validation.js +1 -1
  176. package/dist/utils/process.js +1 -1
  177. package/dist/utils/prompt.js +1 -1
  178. package/dist/utils/spinner.js +1 -1
  179. package/dist/utils/sse-parser.js +1 -1
  180. package/dist/utils/string-utils.js +1 -1
  181. package/dist/utils/table-ref-parser.js +1 -1
  182. package/dist/utils/tdx-logger.js +1 -1
  183. package/dist/utils/version-check.js +1 -1
  184. package/package.json +1 -1
@@ -1 +1 @@
1
- const a36_0x3838a6=a36_0x30a6;function a36_0x2879(){const _0x4a7e0f=['error','✔\x20Updated\x20segment\x20\x27','Resolving\x20folder\x20\x27','execute','7127540yfpJDo','2923626kjVjBG','type','resolvePathToResource','segmentPath','\x20\x20tdx\x20segment\x20update\x20\x22My\x20Audience/High\x20Value\x22\x20--description\x20\x22...\x22','segment','7tvxHiS','updateSegmentById','includes','Resolved\x20relative\x20path\x20to:\x20','886756NBNiSZ','Parent\x20ID:\x20','Resolved\x20folder\x20ID:\x20','.\x20Only\x20child\x20segments\x20can\x20be\x20updated.','867654hXUiKS','4141850obhNOz','\x27...','⚠\x20Deprecation\x20warning:\x20`segment\x20update`\x20is\x20deprecated.','Error:\x20Cannot\x20update\x20','data','kind','resolveFolderId','segmentId','verbose','ruleFile','Updating\x20segment\x20\x27','1314QVHuDo','Resolving\x20path\x20\x27','\x20\x20tdx\x20segment\x20update\x20\x22High\x20Value\x22\x20--rule\x20\x27...\x27\x20\x20#\x20Relative\x20to\x20context','1446SEIIVi','Examples:','Use:\x20tdx\x20segment\x20update\x20<path_to_segment>\x20[options]','808QejYlC','\x20\x20Use\x20`tdx\x20sg\x20push`\x20with\x20YAML\x20files\x20instead.\x0a','yellow','description','segmentName','length','name','folder','segment:update','Resolved\x20type:\x20','6120gXeJUT','Error:\x20Segment\x20path\x20or\x20name\x20is\x20required'];a36_0x2879=function(){return _0x4a7e0f;};return a36_0x2879();}(function(_0x56f759,_0x2047f7){const _0x22814d=a36_0x30a6,_0x5334f4=_0x56f759();while(!![]){try{const _0x1317a9=-parseInt(_0x22814d(0x150))/0x1+-parseInt(_0x22814d(0x15c))/0x2*(-parseInt(_0x22814d(0x15f))/0x3)+-parseInt(_0x22814d(0x14c))/0x4+parseInt(_0x22814d(0x141))/0x5+-parseInt(_0x22814d(0x142))/0x6*(-parseInt(_0x22814d(0x148))/0x7)+-parseInt(_0x22814d(0x131))/0x8*(-parseInt(_0x22814d(0x13b))/0x9)+-parseInt(_0x22814d(0x151))/0xa;if(_0x1317a9===_0x2047f7)break;else _0x5334f4['push'](_0x5334f4['shift']());}catch(_0x31e6fb){_0x5334f4['push'](_0x5334f4['shift']());}}}(a36_0x2879,0xc1fed));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_0x30a6(_0x19f029,_0x1f0af0){_0x19f029=_0x19f029-0x131;const _0x2879a3=a36_0x2879();let _0x30a6cc=_0x2879a3[_0x19f029];return _0x30a6cc;}import a36_0x10f9ae from'chalk';export class SegmentUpdateCommand extends BaseCommand{[a36_0x3838a6(0x137)]=a36_0x3838a6(0x139);[a36_0x3838a6(0x134)]='Update\x20existing\x20child\x20segment';async[a36_0x3838a6(0x140)](_0x576f0f){const _0x8508a9=a36_0x3838a6;console[_0x8508a9(0x13d)](a36_0x10f9ae[_0x8508a9(0x133)](_0x8508a9(0x153))),console[_0x8508a9(0x13d)](a36_0x10f9ae['yellow'](_0x8508a9(0x132)));const {options:_0xbac8e7,args:_0x3599aa,tdx:_0x29169c}=_0x576f0f,_0x1b2dea=_0xbac8e7;if(_0x3599aa[_0x8508a9(0x136)]===0x0)return console[_0x8508a9(0x13d)](_0x8508a9(0x13c)),console[_0x8508a9(0x13d)]('Usage:\x20tdx\x20segment\x20update\x20<path>\x20[options]'),console[_0x8508a9(0x13d)](_0x8508a9(0x160)),console['error'](_0x8508a9(0x146)),console[_0x8508a9(0x13d)](_0x8508a9(0x15e)),0x1;const _0x70a91e=_0x3599aa[0x0],_0x2b43ea=_0xbac8e7[_0x8508a9(0x145)];let _0x2f9490=_0x70a91e;_0x2b43ea&&!_0x70a91e[_0x8508a9(0x14a)]('/')&&(_0x2f9490=_0x2b43ea+'/'+_0x70a91e,_0x1b2dea[_0x8508a9(0x159)]&&console[_0x8508a9(0x13d)](_0x8508a9(0x14b)+_0x2f9490));const _0x2e3b6a=await withSpinner(_0x8508a9(0x15d)+_0x2f9490+'\x27...',()=>_0x29169c['segment'][_0x8508a9(0x144)](_0x2f9490),{'verbose':_0x1b2dea[_0x8508a9(0x159)]}),_0x4e253a=_0x2e3b6a[_0x8508a9(0x155)];_0x1b2dea['verbose']&&console[_0x8508a9(0x13d)](_0x8508a9(0x13a)+_0x4e253a['type']);if(_0x4e253a[_0x8508a9(0x143)]!==_0x8508a9(0x147))return console[_0x8508a9(0x13d)](_0x8508a9(0x154)+_0x4e253a['type']+_0x8508a9(0x14f)),console[_0x8508a9(0x13d)](_0x8508a9(0x161)),0x1;if(!_0x4e253a['segmentId'])throw new SDKError(ErrorCode['INTERNAL'],'Segment\x20ID\x20missing\x20from\x20resolved\x20path');const _0x1389dc=_0x4e253a['parentId'],_0x2a2c99=_0x4e253a[_0x8508a9(0x158)];_0x1b2dea['verbose']&&(console['error'](_0x8508a9(0x14d)+_0x1389dc),console[_0x8508a9(0x13d)]('Segment\x20ID:\x20'+_0x2a2c99));let _0x279dea;if(_0x1b2dea['folder']){const _0x3f2dd8=_0x1b2dea[_0x8508a9(0x138)],_0xfbe392=await withSpinner(_0x8508a9(0x13f)+_0x3f2dd8+_0x8508a9(0x152),()=>_0x29169c[_0x8508a9(0x147)][_0x8508a9(0x157)](_0x1389dc,_0x3f2dd8),{'verbose':_0x1b2dea['verbose']});_0x279dea=parseInt(_0xfbe392[_0x8508a9(0x155)],0xa),_0x1b2dea[_0x8508a9(0x159)]&&console['error'](_0x8508a9(0x14e)+_0x279dea);}const _0x19cc60=await loadJSONFromOptions(_0x1b2dea['rule'],_0x1b2dea[_0x8508a9(0x15a)]),_0x1140e5={'name':_0x1b2dea[_0x8508a9(0x137)],'description':_0x1b2dea[_0x8508a9(0x134)],'rule':_0x19cc60,'kind':_0x1b2dea[_0x8508a9(0x156)]!==undefined?parseInt(_0x1b2dea['kind'],0xa):undefined,'segmentFolderId':_0x279dea},_0x1c3aa3=await withSpinner(_0x8508a9(0x15b)+_0x4e253a[_0x8508a9(0x135)]+_0x8508a9(0x152),()=>_0x29169c[_0x8508a9(0x147)][_0x8508a9(0x149)](_0x1389dc,_0x2a2c99,_0x1140e5),{'verbose':_0x1b2dea['verbose']}),_0x3613d7=_0x1c3aa3[_0x8508a9(0x155)];return console['error'](_0x8508a9(0x13e)+_0x3613d7['name']+'\x27'),_0x2f9490!==_0x70a91e&&console[_0x8508a9(0x13d)]('\x20\x20\x20Path:\x20'+_0x2f9490),await handleSDKOutput([_0x3613d7],_0x1b2dea),0x0;}}
1
+ const a36_0x4baf4a=a36_0x1482;(function(_0x52b2a5,_0x1d319e){const _0x475cea=a36_0x1482,_0xfc3285=_0x52b2a5();while(!![]){try{const _0x286eac=-parseInt(_0x475cea(0xb3))/0x1*(-parseInt(_0x475cea(0xd6))/0x2)+parseInt(_0x475cea(0xde))/0x3*(-parseInt(_0x475cea(0xb6))/0x4)+-parseInt(_0x475cea(0xbf))/0x5+parseInt(_0x475cea(0xc6))/0x6*(parseInt(_0x475cea(0xc3))/0x7)+parseInt(_0x475cea(0xc7))/0x8*(-parseInt(_0x475cea(0xbc))/0x9)+-parseInt(_0x475cea(0xd7))/0xa*(parseInt(_0x475cea(0xda))/0xb)+parseInt(_0x475cea(0xb9))/0xc;if(_0x286eac===_0x1d319e)break;else _0xfc3285['push'](_0xfc3285['shift']());}catch(_0x5ee76c){_0xfc3285['push'](_0xfc3285['shift']());}}}(a36_0x1f63,0xbf113));function a36_0x1f63(){const _0x553a62=['execute','segment:update','\x20\x20Use\x20`tdx\x20sg\x20push`\x20with\x20YAML\x20files\x20instead.\x0a','ruleFile','segment','\x20\x20tdx\x20segment\x20update\x20\x22High\x20Value\x22\x20--rule\x20\x27...\x27\x20\x20#\x20Relative\x20to\x20context','kind','Update\x20existing\x20child\x20segment','Use:\x20tdx\x20segment\x20update\x20<path_to_segment>\x20[options]','36724nWWEuR','20nhGAlM','Resolved\x20relative\x20path\x20to:\x20','error','4758457jkTHhO','includes','type','⚠\x20Deprecation\x20warning:\x20`segment\x20update`\x20is\x20deprecated.','72984krIxEV','.\x20Only\x20child\x20segments\x20can\x20be\x20updated.','Resolving\x20path\x20\x27','Usage:\x20tdx\x20segment\x20update\x20<path>\x20[options]','resolvePathToResource','verbose','segmentName','Examples:','segmentPath','\x20\x20tdx\x20segment\x20update\x20\x22My\x20Audience/High\x20Value\x22\x20--description\x20\x22...\x22','9HObMcG','yellow','\x27...','44kvQhFp','data','rule','24074496nRizZO','resolveFolderId','Segment\x20ID:\x20','838161eOHChv','folder','✔\x20Updated\x20segment\x20\x27','4199420iClkfg','length','\x20\x20\x20Path:\x20','Segment\x20ID\x20missing\x20from\x20resolved\x20path','215390PNlUrQ','Updating\x20segment\x20\x27','INTERNAL','132JOkpoG','8jbBGAP','name','Error:\x20Cannot\x20update\x20','description','segmentId','Parent\x20ID:\x20'];a36_0x1f63=function(){return _0x553a62;};return a36_0x1f63();}import{BaseCommand}from'./command.js';function a36_0x1482(_0x3d0535,_0xfad862){_0x3d0535=_0x3d0535-0xaf;const _0x1f6309=a36_0x1f63();let _0x1482b1=_0x1f6309[_0x3d0535];return _0x1482b1;}import{handleSDKOutput}from'../core/command-output.js';import{withSpinner}from'../utils/spinner.js';import{loadJSONFromOptions}from'../utils/json-loader.js';import{SDKError,ErrorCode}from'../sdk/index.js';import a36_0x2fb4bd from'chalk';export class SegmentUpdateCommand extends BaseCommand{[a36_0x4baf4a(0xc8)]=a36_0x4baf4a(0xce);[a36_0x4baf4a(0xca)]=a36_0x4baf4a(0xd4);async[a36_0x4baf4a(0xcd)](_0x5d1d10){const _0x5109a9=a36_0x4baf4a;console[_0x5109a9(0xd9)](a36_0x2fb4bd[_0x5109a9(0xb4)](_0x5109a9(0xdd))),console[_0x5109a9(0xd9)](a36_0x2fb4bd[_0x5109a9(0xb4)](_0x5109a9(0xcf)));const {options:_0x45fcde,args:_0x38940f,tdx:_0x3e232d}=_0x5d1d10,_0x9fb5ae=_0x45fcde;if(_0x38940f[_0x5109a9(0xc0)]===0x0)return console[_0x5109a9(0xd9)]('Error:\x20Segment\x20path\x20or\x20name\x20is\x20required'),console[_0x5109a9(0xd9)](_0x5109a9(0xe1)),console[_0x5109a9(0xd9)](_0x5109a9(0xb0)),console['error'](_0x5109a9(0xb2)),console[_0x5109a9(0xd9)](_0x5109a9(0xd2)),0x1;const _0x16975d=_0x38940f[0x0],_0x2f6c66=_0x45fcde[_0x5109a9(0xb1)];let _0xc29d1c=_0x16975d;_0x2f6c66&&!_0x16975d[_0x5109a9(0xdb)]('/')&&(_0xc29d1c=_0x2f6c66+'/'+_0x16975d,_0x9fb5ae[_0x5109a9(0xe3)]&&console['error'](_0x5109a9(0xd8)+_0xc29d1c));const _0x306e4a=await withSpinner(_0x5109a9(0xe0)+_0xc29d1c+_0x5109a9(0xb5),()=>_0x3e232d[_0x5109a9(0xd1)][_0x5109a9(0xe2)](_0xc29d1c),{'verbose':_0x9fb5ae[_0x5109a9(0xe3)]}),_0x5e3b81=_0x306e4a[_0x5109a9(0xb7)];_0x9fb5ae['verbose']&&console['error']('Resolved\x20type:\x20'+_0x5e3b81[_0x5109a9(0xdc)]);if(_0x5e3b81['type']!==_0x5109a9(0xd1))return console[_0x5109a9(0xd9)](_0x5109a9(0xc9)+_0x5e3b81[_0x5109a9(0xdc)]+_0x5109a9(0xdf)),console[_0x5109a9(0xd9)](_0x5109a9(0xd5)),0x1;if(!_0x5e3b81[_0x5109a9(0xcb)])throw new SDKError(ErrorCode[_0x5109a9(0xc5)],_0x5109a9(0xc2));const _0x543690=_0x5e3b81['parentId'],_0x228a87=_0x5e3b81[_0x5109a9(0xcb)];_0x9fb5ae[_0x5109a9(0xe3)]&&(console[_0x5109a9(0xd9)](_0x5109a9(0xcc)+_0x543690),console[_0x5109a9(0xd9)](_0x5109a9(0xbb)+_0x228a87));let _0x53e7fc;if(_0x9fb5ae['folder']){const _0x47f88e=_0x9fb5ae[_0x5109a9(0xbd)],_0x393110=await withSpinner('Resolving\x20folder\x20\x27'+_0x47f88e+_0x5109a9(0xb5),()=>_0x3e232d['segment'][_0x5109a9(0xba)](_0x543690,_0x47f88e),{'verbose':_0x9fb5ae[_0x5109a9(0xe3)]});_0x53e7fc=parseInt(_0x393110[_0x5109a9(0xb7)],0xa),_0x9fb5ae[_0x5109a9(0xe3)]&&console[_0x5109a9(0xd9)]('Resolved\x20folder\x20ID:\x20'+_0x53e7fc);}const _0x5919e6=await loadJSONFromOptions(_0x9fb5ae[_0x5109a9(0xb8)],_0x9fb5ae[_0x5109a9(0xd0)]),_0x4959cb={'name':_0x9fb5ae[_0x5109a9(0xc8)],'description':_0x9fb5ae['description'],'rule':_0x5919e6,'kind':_0x9fb5ae['kind']!==undefined?parseInt(_0x9fb5ae[_0x5109a9(0xd3)],0xa):undefined,'segmentFolderId':_0x53e7fc},_0x1acfac=await withSpinner(_0x5109a9(0xc4)+_0x5e3b81[_0x5109a9(0xaf)]+_0x5109a9(0xb5),()=>_0x3e232d[_0x5109a9(0xd1)]['updateSegmentById'](_0x543690,_0x228a87,_0x4959cb),{'verbose':_0x9fb5ae[_0x5109a9(0xe3)]}),_0x5b3567=_0x1acfac[_0x5109a9(0xb7)];return console['error'](_0x5109a9(0xbe)+_0x5b3567[_0x5109a9(0xc8)]+'\x27'),_0xc29d1c!==_0x16975d&&console[_0x5109a9(0xd9)](_0x5109a9(0xc1)+_0xc29d1c),await handleSDKOutput([_0x5b3567],_0x9fb5ae),0x0;}}
@@ -1 +1 @@
1
- const a37_0x311eeb=a37_0xc925;(function(_0x69da48,_0x3e6b54){const _0x49e417=a37_0xc925,_0x390c86=_0x69da48();while(!![]){try{const _0x16cb46=parseInt(_0x49e417(0x1ad))/0x1+parseInt(_0x49e417(0x199))/0x2*(-parseInt(_0x49e417(0x1a1))/0x3)+parseInt(_0x49e417(0x1a5))/0x4+parseInt(_0x49e417(0x19e))/0x5*(-parseInt(_0x49e417(0x1bc))/0x6)+-parseInt(_0x49e417(0x1ac))/0x7+-parseInt(_0x49e417(0x1c0))/0x8+parseInt(_0x49e417(0x1af))/0x9;if(_0x16cb46===_0x3e6b54)break;else _0x390c86['push'](_0x390c86['shift']());}catch(_0x8a5762){_0x390c86['push'](_0x390c86['shift']());}}}(a37_0xef02,0xd96fe));import{existsSync,statSync}from'fs';function a37_0xc925(_0x28b7c7,_0x164293){_0x28b7c7=_0x28b7c7-0x194;const _0xef028a=a37_0xef02();let _0xc925da=_0xef028a[_0x28b7c7];return _0xc925da;}import a37_0x53182a from'chalk';function a37_0xef02(){const _0x17faa7=['type','12335uREIHW','data','log','18Upfehq','folderId','\x27...','fullPath','568936QvTqhp','Examples:','cyan','✔\x20Context\x20set\x20to:\x20','\x20\x20tdx\x20segment\x20use\x20..\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Go\x20to\x20parent','error','Error:\x20No\x20context\x20set.\x20Cannot\x20use\x20relative\x20path.','1959132BvpLSJ','171448fXfsIi','Set\x20current\x20segment/folder\x20context\x20for\x20navigation','31281795iiNcYS','join','parentName','Target\x20path:\x20','segment','session','\x20\x20tdx\x20segment\x20use\x20\x22My\x20Audience\x22','length','verbose','Usage:\x20tdx\x20segment\x20use\x20<path>','site','✔\x20Context\x20cleared.\x20Back\x20to\x20root.','red','1038fuHIPS','description','Use\x20\x22tdx\x20segments\x22\x20to\x20list\x20contents\x20in\x20this\x20context','Use\x20\x22tdx\x20use\x22\x20to\x20see\x20all\x20context\x20parameters','5930592IgBdJt','Site:\x20','dim','segment:use','slice','segmentPath','Use\x20an\x20absolute\x20path\x20or\x20set\x20context\x20with:\x20tdx\x20segment\x20use\x20<parent_name>','Tip:\x20Run\x20`tdx\x20sg\x20pull\x20<parent_name>`\x20first\x20to\x20create\x20the\x20folder\x20structure','config','Parent\x20ID:\x20','split','Error:\x20Cannot\x20set\x20context\x20to\x20a\x20segment.','folderPath','parent_segment','Error:\x20Path\x20is\x20required\x0a','\x20\x20tdx\x20segment\x20use\x20/\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Clear\x20context','Resolving\x20path\x20\x27','isDirectory','green','name','483608Hyhwpq','Resolved\x20path\x20type:\x20','Error:\x20No\x20tdx.json\x20found\x20in\x20or\x20above:\x20','execute'];a37_0xef02=function(){return _0x17faa7;};return a37_0xef02();}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';export class SegmentUseCommand extends BaseCommand{[a37_0x311eeb(0x198)]=a37_0x311eeb(0x1c3);[a37_0x311eeb(0x1bd)]=a37_0x311eeb(0x1ae);async[a37_0x311eeb(0x19c)](_0x3e5255){const _0x46387c=a37_0x311eeb,{options:_0x4a8f57,args:_0x21b601,tdx:_0x795b1d}=_0x3e5255;if(_0x21b601[_0x46387c(0x1b6)]===0x0)return console['error'](a37_0x53182a['red'](_0x46387c(0x1ce))),console[_0x46387c(0x1aa)](_0x46387c(0x1b8)),console[_0x46387c(0x1aa)](_0x46387c(0x1a6)),console[_0x46387c(0x1aa)](_0x46387c(0x1b5)),console['error']('\x20\x20tdx\x20segment\x20use\x20\x22My\x20Audience/Marketing\x22'),console['error'](_0x46387c(0x194)),console[_0x46387c(0x1aa)](_0x46387c(0x1a9)),0x1;const _0xbb6a7b=_0x21b601[0x0],_0x2f0563=_0x4a8f57[_0x46387c(0x1b4)];try{if(_0xbb6a7b==='/')return saveSessionContext({'segment_path':undefined},_0x2f0563),console[_0x46387c(0x1a0)](a37_0x53182a[_0x46387c(0x197)]('✔\x20Context\x20cleared.\x20Back\x20to\x20root.')),0x0;if(existsSync(_0xbb6a7b)&&statSync(_0xbb6a7b)[_0x46387c(0x196)]()){let _0x561e8f;try{_0x561e8f=findTdxConfig(_0xbb6a7b);}catch{return console[_0x46387c(0x1aa)](a37_0x53182a['red'](_0x46387c(0x19b)+_0xbb6a7b)),console[_0x46387c(0x1aa)](a37_0x53182a['cyan'](_0x46387c(0x1c7))),0x1;}const _0x545f69=_0x561e8f[_0x46387c(0x1c8)][_0x46387c(0x1cd)];return saveSessionContext({'segment_path':_0x545f69,'parent_segment':_0x545f69},_0x2f0563),console[_0x46387c(0x1a0)](a37_0x53182a[_0x46387c(0x197)](_0x46387c(0x1a8)+a37_0x53182a[_0x46387c(0x1a7)](_0x545f69))),0x0;}const _0x12470b=_0x4a8f57[_0x46387c(0x1c5)];let _0xa3f91e=_0xbb6a7b;const _0x127263=parsePath(_0xbb6a7b);if(!_0x127263['isAbsolute']){if(!_0x12470b)return console['error'](a37_0x53182a[_0x46387c(0x1bb)](_0x46387c(0x1ab))),console[_0x46387c(0x1aa)](a37_0x53182a[_0x46387c(0x1a7)](_0x46387c(0x1c6))),0x1;if(_0xbb6a7b==='..'){const _0x7030aa=_0x12470b[_0x46387c(0x1ca)]('/')[_0x46387c(0x1c4)](0x0,-0x1)[_0x46387c(0x1b0)]('/');_0xa3f91e=_0x7030aa||'/';}else _0xbb6a7b==='.'?_0xa3f91e=_0x12470b:_0xa3f91e=_0x12470b+'/'+_0xbb6a7b;_0x4a8f57[_0x46387c(0x1b7)]&&console[_0x46387c(0x1aa)]('Resolved\x20relative\x20path\x20to:\x20'+_0xa3f91e);}if(_0xa3f91e==='/'||_0xa3f91e==='')return saveSessionContext({'segment_path':undefined},_0x2f0563),console[_0x46387c(0x1a0)](a37_0x53182a['green'](_0x46387c(0x1ba))),0x0;_0xa3f91e=normalizePath(_0xa3f91e);const _0x1d287d=parsePath(_0xa3f91e)['segments'];if(_0x1d287d['length']===0x0)return saveSessionContext({'segment_path':undefined},_0x2f0563),console[_0x46387c(0x1a0)](a37_0x53182a[_0x46387c(0x197)]('✔\x20Context\x20cleared.\x20Back\x20to\x20root.')),0x0;_0x4a8f57[_0x46387c(0x1b7)]&&(console[_0x46387c(0x1aa)](_0x46387c(0x1c1)+_0x4a8f57[_0x46387c(0x1b9)]),console[_0x46387c(0x1aa)](_0x46387c(0x1b2)+_0xa3f91e));const _0x472727=await withSpinner(_0x46387c(0x195)+_0xa3f91e+_0x46387c(0x1a3),()=>_0x795b1d['segment']['resolvePathToResource'](_0xa3f91e),{'verbose':_0x4a8f57['verbose']}),_0x11dc00=_0x472727[_0x46387c(0x19f)];_0x4a8f57[_0x46387c(0x1b7)]&&(console['error'](_0x46387c(0x19a)+_0x11dc00[_0x46387c(0x19d)]),console[_0x46387c(0x1aa)](_0x46387c(0x1c9)+_0x11dc00['parentId']),_0x11dc00[_0x46387c(0x1a2)]&&console[_0x46387c(0x1aa)]('Folder\x20ID:\x20'+_0x11dc00[_0x46387c(0x1a2)]));if(_0x11dc00[_0x46387c(0x19d)]===_0x46387c(0x1b3))return console[_0x46387c(0x1aa)](a37_0x53182a['red'](_0x46387c(0x1cb))),console[_0x46387c(0x1aa)]('Context\x20can\x20only\x20be\x20set\x20to\x20a\x20parent\x20segment\x20or\x20folder.'),console[_0x46387c(0x1aa)](a37_0x53182a[_0x46387c(0x1a7)]('Use:\x20tdx\x20segment\x20use\x20'+_0x11dc00[_0x46387c(0x1b1)]+(_0x11dc00[_0x46387c(0x1cc)]?'/'+_0x11dc00['folderPath']['join']('/'):''))),0x1;return saveSessionContext({'segment_path':_0x11dc00[_0x46387c(0x1a4)],'parent_segment':_0x11dc00[_0x46387c(0x1b1)]},_0x2f0563),console[_0x46387c(0x1a0)](a37_0x53182a[_0x46387c(0x197)](_0x46387c(0x1a8)+a37_0x53182a[_0x46387c(0x1a7)](_0x11dc00[_0x46387c(0x1a4)]))),_0x4a8f57[_0x46387c(0x1b7)]&&(console['error'](a37_0x53182a['dim'](_0x46387c(0x1be))),console['error'](a37_0x53182a[_0x46387c(0x1c2)](_0x46387c(0x1bf)))),0x0;}catch(_0x384976){throw _0x384976;}}}
1
+ function a37_0x52ee(){const _0x11769f=['Use\x20an\x20absolute\x20path\x20or\x20set\x20context\x20with:\x20tdx\x20segment\x20use\x20<parent_name>','111275PWvYQp','Error:\x20Path\x20is\x20required\x0a','\x20\x20tdx\x20segment\x20use\x20/\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Clear\x20context','56nLNRxh','12rmpBov','1318TMNgiz','error','segment','\x20\x20tdx\x20segment\x20use\x20\x22My\x20Audience\x22','Error:\x20No\x20tdx.json\x20found\x20in\x20or\x20above:\x20','60hEXHhc','Target\x20path:\x20','segmentPath','Parent\x20ID:\x20','Error:\x20Cannot\x20set\x20context\x20to\x20a\x20segment.','segment:use','Site:\x20','9CsbNsh','type','2285128gfzzQB','isAbsolute','Tip:\x20Run\x20`tdx\x20sg\x20pull\x20<parent_name>`\x20first\x20to\x20create\x20the\x20folder\x20structure','fullPath','split','Use\x20\x22tdx\x20use\x22\x20to\x20see\x20all\x20context\x20parameters','✔\x20Context\x20set\x20to:\x20','config','segments','11232dVToct','execute','Resolved\x20relative\x20path\x20to:\x20','Set\x20current\x20segment/folder\x20context\x20for\x20navigation','site','data','length','join','green','\x20\x20tdx\x20segment\x20use\x20..\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Go\x20to\x20parent','folderPath','red','Context\x20can\x20only\x20be\x20set\x20to\x20a\x20parent\x20segment\x20or\x20folder.','parent_segment','281413kQPxWi','✔\x20Context\x20cleared.\x20Back\x20to\x20root.','87QUwEwU','isDirectory','Folder\x20ID:\x20','folderId','verbose','log','cyan','11890703iaacqc','Examples:','session','Use\x20\x22tdx\x20segments\x22\x20to\x20list\x20contents\x20in\x20this\x20context','resolvePathToResource','Usage:\x20tdx\x20segment\x20use\x20<path>','Resolved\x20path\x20type:\x20','Resolving\x20path\x20\x27','\x27...','dim','3834910QwkGIh','parentId'];a37_0x52ee=function(){return _0x11769f;};return a37_0x52ee();}const a37_0x126caa=a37_0x3182;(function(_0x13033d,_0x199970){const _0x285165=a37_0x3182,_0x362f40=_0x13033d();while(!![]){try{const _0x2f5ea8=parseInt(_0x285165(0xac))/0x1+-parseInt(_0x285165(0xc7))/0x2*(parseInt(_0x285165(0xae))/0x3)+-parseInt(_0x285165(0xcc))/0x4*(-parseInt(_0x285165(0xc2))/0x5)+parseInt(_0x285165(0xde))/0x6*(parseInt(_0x285165(0xc5))/0x7)+parseInt(_0x285165(0xd5))/0x8+parseInt(_0x285165(0xd3))/0x9*(parseInt(_0x285165(0xbf))/0xa)+-parseInt(_0x285165(0xb5))/0xb*(parseInt(_0x285165(0xc6))/0xc);if(_0x2f5ea8===_0x199970)break;else _0x362f40['push'](_0x362f40['shift']());}catch(_0x3ec54d){_0x362f40['push'](_0x362f40['shift']());}}}(a37_0x52ee,0x30a5e));import{existsSync,statSync}from'fs';import a37_0x3c16c6 from'chalk';import{BaseCommand}from'./command.js';import{saveSessionContext}from'../core/session.js';import{withSpinner}from'../utils/spinner.js';import{parsePath,normalizePath}from'../sdk/segment/segment-path-parser.js';import{findTdxConfig}from'../sdk/segment/tdx-config.js';function a37_0x3182(_0x4a612f,_0x1a1dbc){_0x4a612f=_0x4a612f-0xac;const _0x52ee52=a37_0x52ee();let _0x3182f5=_0x52ee52[_0x4a612f];return _0x3182f5;}export class SegmentUseCommand extends BaseCommand{['name']=a37_0x126caa(0xd1);['description']=a37_0x126caa(0xe1);async[a37_0x126caa(0xdf)](_0x21ea0b){const _0x49b711=a37_0x126caa,{options:_0x1e007d,args:_0x4a5992,tdx:_0x4babcd}=_0x21ea0b;if(_0x4a5992['length']===0x0)return console['error'](a37_0x3c16c6['red'](_0x49b711(0xc3))),console['error'](_0x49b711(0xba)),console['error'](_0x49b711(0xb6)),console[_0x49b711(0xc8)](_0x49b711(0xca)),console[_0x49b711(0xc8)]('\x20\x20tdx\x20segment\x20use\x20\x22My\x20Audience/Marketing\x22'),console[_0x49b711(0xc8)](_0x49b711(0xc4)),console[_0x49b711(0xc8)](_0x49b711(0xe7)),0x1;const _0x3a15ef=_0x4a5992[0x0],_0x43bf26=_0x1e007d[_0x49b711(0xb7)];try{if(_0x3a15ef==='/')return saveSessionContext({'segment_path':undefined},_0x43bf26),console[_0x49b711(0xb3)](a37_0x3c16c6[_0x49b711(0xe6)]('✔\x20Context\x20cleared.\x20Back\x20to\x20root.')),0x0;if(existsSync(_0x3a15ef)&&statSync(_0x3a15ef)[_0x49b711(0xaf)]()){let _0x4b772d;try{_0x4b772d=findTdxConfig(_0x3a15ef);}catch{return console[_0x49b711(0xc8)](a37_0x3c16c6[_0x49b711(0xe9)](_0x49b711(0xcb)+_0x3a15ef)),console[_0x49b711(0xc8)](a37_0x3c16c6[_0x49b711(0xb4)](_0x49b711(0xd7))),0x1;}const _0x43c2e1=_0x4b772d[_0x49b711(0xdc)][_0x49b711(0xeb)];return saveSessionContext({'segment_path':_0x43c2e1,'parent_segment':_0x43c2e1},_0x43bf26),console['log'](a37_0x3c16c6['green'](_0x49b711(0xdb)+a37_0x3c16c6[_0x49b711(0xb4)](_0x43c2e1))),0x0;}const _0x1e5455=_0x1e007d[_0x49b711(0xce)];let _0x279b73=_0x3a15ef;const _0x4d6c0b=parsePath(_0x3a15ef);if(!_0x4d6c0b[_0x49b711(0xd6)]){if(!_0x1e5455)return console[_0x49b711(0xc8)](a37_0x3c16c6[_0x49b711(0xe9)]('Error:\x20No\x20context\x20set.\x20Cannot\x20use\x20relative\x20path.')),console[_0x49b711(0xc8)](a37_0x3c16c6[_0x49b711(0xb4)](_0x49b711(0xc1))),0x1;if(_0x3a15ef==='..'){const _0x2e710b=_0x1e5455[_0x49b711(0xd9)]('/')['slice'](0x0,-0x1)[_0x49b711(0xe5)]('/');_0x279b73=_0x2e710b||'/';}else _0x3a15ef==='.'?_0x279b73=_0x1e5455:_0x279b73=_0x1e5455+'/'+_0x3a15ef;_0x1e007d['verbose']&&console[_0x49b711(0xc8)](_0x49b711(0xe0)+_0x279b73);}if(_0x279b73==='/'||_0x279b73==='')return saveSessionContext({'segment_path':undefined},_0x43bf26),console[_0x49b711(0xb3)](a37_0x3c16c6['green'](_0x49b711(0xad))),0x0;_0x279b73=normalizePath(_0x279b73);const _0x9a94b7=parsePath(_0x279b73)[_0x49b711(0xdd)];if(_0x9a94b7[_0x49b711(0xe4)]===0x0)return saveSessionContext({'segment_path':undefined},_0x43bf26),console['log'](a37_0x3c16c6[_0x49b711(0xe6)](_0x49b711(0xad))),0x0;_0x1e007d['verbose']&&(console[_0x49b711(0xc8)](_0x49b711(0xd2)+_0x1e007d[_0x49b711(0xe2)]),console[_0x49b711(0xc8)](_0x49b711(0xcd)+_0x279b73));const _0x2f7a94=await withSpinner(_0x49b711(0xbc)+_0x279b73+_0x49b711(0xbd),()=>_0x4babcd[_0x49b711(0xc9)][_0x49b711(0xb9)](_0x279b73),{'verbose':_0x1e007d[_0x49b711(0xb2)]}),_0x388520=_0x2f7a94[_0x49b711(0xe3)];_0x1e007d['verbose']&&(console[_0x49b711(0xc8)](_0x49b711(0xbb)+_0x388520[_0x49b711(0xd4)]),console[_0x49b711(0xc8)](_0x49b711(0xcf)+_0x388520[_0x49b711(0xc0)]),_0x388520['folderId']&&console['error'](_0x49b711(0xb0)+_0x388520[_0x49b711(0xb1)]));if(_0x388520[_0x49b711(0xd4)]===_0x49b711(0xc9))return console['error'](a37_0x3c16c6['red'](_0x49b711(0xd0))),console[_0x49b711(0xc8)](_0x49b711(0xea)),console[_0x49b711(0xc8)](a37_0x3c16c6['cyan']('Use:\x20tdx\x20segment\x20use\x20'+_0x388520['parentName']+(_0x388520[_0x49b711(0xe8)]?'/'+_0x388520['folderPath'][_0x49b711(0xe5)]('/'):''))),0x1;return saveSessionContext({'segment_path':_0x388520[_0x49b711(0xd8)],'parent_segment':_0x388520['parentName']},_0x43bf26),console[_0x49b711(0xb3)](a37_0x3c16c6[_0x49b711(0xe6)](_0x49b711(0xdb)+a37_0x3c16c6['cyan'](_0x388520[_0x49b711(0xd8)]))),_0x1e007d[_0x49b711(0xb2)]&&(console[_0x49b711(0xc8)](a37_0x3c16c6[_0x49b711(0xbe)](_0x49b711(0xb8))),console[_0x49b711(0xc8)](a37_0x3c16c6[_0x49b711(0xbe)](_0x49b711(0xda)))),0x0;}catch(_0x5db2d4){throw _0x5db2d4;}}}
@@ -1 +1 @@
1
- const a38_0x2422ec=a38_0x1d35;(function(_0x58044c,_0x313277){const _0x359978=a38_0x1d35,_0x1dd323=_0x58044c();while(!![]){try{const _0x1836a4=parseInt(_0x359978(0x100))/0x1*(-parseInt(_0x359978(0xfc))/0x2)+parseInt(_0x359978(0xe5))/0x3*(parseInt(_0x359978(0xe8))/0x4)+parseInt(_0x359978(0x103))/0x5+-parseInt(_0x359978(0xd7))/0x6+parseInt(_0x359978(0xff))/0x7*(-parseInt(_0x359978(0xf5))/0x8)+parseInt(_0x359978(0xe3))/0x9*(parseInt(_0x359978(0xda))/0xa)+parseInt(_0x359978(0xe2))/0xb;if(_0x1836a4===_0x313277)break;else _0x1dd323['push'](_0x1dd323['shift']());}catch(_0x168d56){_0x1dd323['push'](_0x1dd323['shift']());}}}(a38_0x5f0e,0x3a803));import{BaseCommand}from'./command.js';import{resolveTarget,isSuccessfulResolution}from'../sdk/segment/target-resolution.js';import{findYamlFiles}from'../sdk/segment/file-discovery.js';function a38_0x5f0e(){const _0x285859=['\x20warning(s)','963805Rbysjd','Error:\x20Directory\x20not\x20found:\x20','file','errorCode','type','\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','.yaml','helpText','message','log','green','\x20file(s)\x20valid','Error:\x20','848226qfIEed','description','Error:\x20File\x20must\x20have\x20.yml\x20or\x20.yaml\x20extension:\x20','221830dEmSWr','parent_segment\x20is\x20not\x20set.\x20Use\x20`tdx\x20sg\x20use\x20<parent_name>`\x20to\x20set\x20it.\x0a','error','warningCount','valid','no_parent','execute','Validation\x20failed:\x20','4101460aAxmUj','189OUSkvj','\x20warning(s)\x20found','9201QahpzL','.yml','✔\x20All\x20','92fEpWOh','red','yellow','Error:\x20No\x20YAML\x20files\x20found\x20in\x20','\x20valid','warnings','errors','validCount','cwd','endsWith','verbose','name','\x20error(s)','8enCmjp','hasErrors','dim','):\x20','\x20file(s)\x20with\x20errors,\x20','segment:validate','Validate\x20segment\x20and\x20journey\x20YAML\x20files','40094PHADvj','length','Usage:\x20tdx\x20sg\x20validate\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Validate\x20all\x20(requires\x20context)','2661512QUsVWu','17OcvPxj','targetDir'];a38_0x5f0e=function(){return _0x285859;};return a38_0x5f0e();}import{existsSync}from'fs';function a38_0x1d35(_0x549894,_0x493309){_0x549894=_0x549894-0xd1;const _0x5f0e42=a38_0x5f0e();let _0x1d35da=_0x5f0e42[_0x549894];return _0x1d35da;}import a38_0x13a42b 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_0x2422ec(0xf3)]=a38_0x2422ec(0xfa);[a38_0x2422ec(0xd8)]=a38_0x2422ec(0xfb);async[a38_0x2422ec(0xe0)](_0x121666){const _0x1527ff=a38_0x2422ec,{options:_0x444c81,args:_0x2fe88d}=_0x121666,_0x508fbd=_0x444c81,_0x36b0eb=await resolveTarget({'arg':_0x2fe88d[0x0],'contextParent':_0x444c81['parentSegment'],'cwd':process[_0x1527ff(0xf0)]()});if(!isSuccessfulResolution(_0x36b0eb))return _0x36b0eb[_0x1527ff(0x106)]===_0x1527ff(0xdf)?(console['error'](a38_0x13a42b[_0x1527ff(0xea)](_0x1527ff(0xdb))),console[_0x1527ff(0xdc)](_0x1527ff(0xfe)),console[_0x1527ff(0xdc)](_0x1527ff(0x108)),console[_0x1527ff(0xdc)]('\x20\x20\x20\x20\x20\x20\x20tdx\x20sg\x20validate\x20<file_path>\x20\x20#\x20Validate\x20specific\x20file')):(console['error'](a38_0x13a42b[_0x1527ff(0xe9)](_0x1527ff(0xd6)+_0x36b0eb[_0x1527ff(0xd2)]+'\x0a')),_0x36b0eb[_0x1527ff(0xd1)]&&console[_0x1527ff(0xdc)](a38_0x13a42b['cyan'](_0x36b0eb[_0x1527ff(0xd1)]))),0x1;const _0x35c282=_0x36b0eb[_0x1527ff(0x101)],_0xe7e025=_0x36b0eb[_0x1527ff(0x107)]===_0x1527ff(0x105)?_0x36b0eb['filePath']:undefined;if(!_0xe7e025&&!existsSync(_0x35c282))return console['error'](a38_0x13a42b[_0x1527ff(0xe9)](_0x1527ff(0x104)+_0x35c282+'\x0a')),0x1;let _0x1c1f7f;if(_0xe7e025){if(!_0xe7e025[_0x1527ff(0xf1)](_0x1527ff(0xe6))&&!_0xe7e025[_0x1527ff(0xf1)](_0x1527ff(0x109)))return console['error'](a38_0x13a42b[_0x1527ff(0xe9)](_0x1527ff(0xd9)+_0xe7e025+'\x0a')),0x1;_0x1c1f7f=[_0xe7e025];}else _0x1c1f7f=findYamlFiles(_0x35c282);if(_0x1c1f7f[_0x1527ff(0xfd)]===0x0)return console[_0x1527ff(0xdc)](a38_0x13a42b['red'](_0x1527ff(0xeb)+_0x35c282+'\x0a')),0x1;const _0x41cd4b=validateYamlFiles(_0x1c1f7f,_0x35c282),_0x28de85=calculateSummary(_0x41cd4b);for(const _0x5342f4 of _0x41cd4b){if(!isValidationResult(_0x5342f4))continue;const {relativePath:_0x37c5c5,source:_0x537aee,result:_0x3bae4b,fileType:_0x1c873b}=_0x5342f4,_0x5b2108=_0x1c873b;if(_0x3bae4b[_0x1527ff(0xde)]&&_0x3bae4b['warnings']['length']===0x0)_0x508fbd[_0x1527ff(0xf2)]&&console[_0x1527ff(0xd3)](a38_0x13a42b[_0x1527ff(0xd4)]('✔\x20'+_0x37c5c5)+a38_0x13a42b[_0x1527ff(0xf7)]('\x20('+_0x5b2108+')'));else _0x3bae4b[_0x1527ff(0xde)]?(console[_0x1527ff(0xd3)](a38_0x13a42b[_0x1527ff(0xea)]('⚠\x20'+_0x37c5c5)+a38_0x13a42b[_0x1527ff(0xf7)]('\x20('+_0x5b2108+_0x1527ff(0xf8)+_0x3bae4b[_0x1527ff(0xed)][_0x1527ff(0xfd)]+_0x1527ff(0x102))),console[_0x1527ff(0xd3)](formatValidationResult(_0x3bae4b,_0x537aee,_0x37c5c5))):(console[_0x1527ff(0xd3)](a38_0x13a42b[_0x1527ff(0xe9)]('✖\x20'+_0x37c5c5)+a38_0x13a42b[_0x1527ff(0xf7)]('\x20('+_0x5b2108+_0x1527ff(0xf8)+_0x3bae4b[_0x1527ff(0xee)][_0x1527ff(0xfd)]+_0x1527ff(0xf4))),console['log'](formatValidationResult(_0x3bae4b,_0x537aee,_0x37c5c5)));}return console['log'](''),_0x28de85[_0x1527ff(0xf6)]?(console[_0x1527ff(0xd3)](a38_0x13a42b[_0x1527ff(0xe9)](_0x1527ff(0xe1)+_0x28de85['invalidCount']+_0x1527ff(0xf9)+_0x28de85[_0x1527ff(0xef)]+_0x1527ff(0xec))),_0x28de85['warningCount']>0x0&&console[_0x1527ff(0xd3)](a38_0x13a42b[_0x1527ff(0xea)](_0x28de85[_0x1527ff(0xdd)]+_0x1527ff(0xe4))),0x1):(console[_0x1527ff(0xd3)](a38_0x13a42b[_0x1527ff(0xd4)](_0x1527ff(0xe7)+_0x28de85[_0x1527ff(0xef)]+_0x1527ff(0xd5))),_0x28de85['warningCount']>0x0&&console['log'](a38_0x13a42b[_0x1527ff(0xea)](_0x28de85[_0x1527ff(0xdd)]+_0x1527ff(0xe4))),0x0);}}
1
+ const a38_0x893068=a38_0x2f7c;(function(_0x3a1f98,_0x53a4ff){const _0x60b879=a38_0x2f7c,_0x4157bc=_0x3a1f98();while(!![]){try{const _0x25fd13=parseInt(_0x60b879(0x129))/0x1*(-parseInt(_0x60b879(0x149))/0x2)+-parseInt(_0x60b879(0x156))/0x3*(parseInt(_0x60b879(0x147))/0x4)+parseInt(_0x60b879(0x151))/0x5*(-parseInt(_0x60b879(0x128))/0x6)+parseInt(_0x60b879(0x12b))/0x7+parseInt(_0x60b879(0x126))/0x8*(-parseInt(_0x60b879(0x144))/0x9)+parseInt(_0x60b879(0x142))/0xa+-parseInt(_0x60b879(0x12e))/0xb*(-parseInt(_0x60b879(0x140))/0xc);if(_0x25fd13===_0x53a4ff)break;else _0x4157bc['push'](_0x4157bc['shift']());}catch(_0x2a43da){_0x4157bc['push'](_0x4157bc['shift']());}}}(a38_0x4548,0x569a5));import{BaseCommand}from'./command.js';import{resolveTarget,isSuccessfulResolution}from'../sdk/segment/target-resolution.js';import{findYamlFiles}from'../sdk/segment/file-discovery.js';import{existsSync}from'fs';import a38_0x2669bc from'chalk';import{formatValidationResult}from'../sdk/segment/yaml-validator.js';function a38_0x2f7c(_0x4ffe35,_0x1142b2){_0x4ffe35=_0x4ffe35-0x124;const _0x4548a4=a38_0x4548();let _0x2f7c1f=_0x4548a4[_0x4ffe35];return _0x2f7c1f;}import{validateYamlFiles,isValidationResult,calculateSummary}from'../sdk/segment/validate-files.js';function a38_0x4548(){const _0x57240f=['parentSegment','helpText','targetDir','warnings','errorCode','validCount','.yml','):\x20','invalidCount','log','length','verbose','message','yellow','5961852ZkTCzP','\x20warning(s)','6833430MrwcOg','error','9nzkZze','hasErrors','Error:\x20','1192opkZLh','type','2IsSUJX','description','Error:\x20File\x20must\x20have\x20.yml\x20or\x20.yaml\x20extension:\x20','no_parent','cwd','\x20\x20\x20\x20\x20\x20\x20tdx\x20sg\x20validate\x20<file_path>\x20\x20#\x20Validate\x20specific\x20file','filePath','red','49645HsSspo','parent_segment\x20is\x20not\x20set.\x20Use\x20`tdx\x20sg\x20use\x20<parent_name>`\x20to\x20set\x20it.\x0a','valid','\x20warning(s)\x20found','warningCount','5412fanEAS','endsWith','green','1591048bVwnmY','file','108dwlVen','206234tXkRLX','errors','2071930ahjnBY','Error:\x20No\x20YAML\x20files\x20found\x20in\x20','\x20error(s)','11ViXDXY','dim','cyan','✔\x20All\x20'];a38_0x4548=function(){return _0x57240f;};return a38_0x4548();}export class SegmentValidateCommand extends BaseCommand{['name']='segment:validate';[a38_0x893068(0x14a)]='Validate\x20segment\x20and\x20journey\x20YAML\x20files';async['execute'](_0x17e757){const _0x580aeb=a38_0x893068,{options:_0x1bb3ae,args:_0xe6b8f3}=_0x17e757,_0x53ae97=_0x1bb3ae,_0x3e7b7a=await resolveTarget({'arg':_0xe6b8f3[0x0],'contextParent':_0x1bb3ae[_0x580aeb(0x132)],'cwd':process[_0x580aeb(0x14d)]()});if(!isSuccessfulResolution(_0x3e7b7a))return _0x3e7b7a[_0x580aeb(0x136)]===_0x580aeb(0x14c)?(console[_0x580aeb(0x143)](a38_0x2669bc['yellow'](_0x580aeb(0x152))),console[_0x580aeb(0x143)]('Usage:\x20tdx\x20sg\x20validate\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Validate\x20all\x20(requires\x20context)'),console[_0x580aeb(0x143)]('\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[_0x580aeb(0x143)](_0x580aeb(0x14e))):(console[_0x580aeb(0x143)](a38_0x2669bc[_0x580aeb(0x150)](_0x580aeb(0x146)+_0x3e7b7a[_0x580aeb(0x13e)]+'\x0a')),_0x3e7b7a[_0x580aeb(0x133)]&&console[_0x580aeb(0x143)](a38_0x2669bc[_0x580aeb(0x130)](_0x3e7b7a[_0x580aeb(0x133)]))),0x1;const _0x3f5573=_0x3e7b7a[_0x580aeb(0x134)],_0x10391b=_0x3e7b7a[_0x580aeb(0x148)]===_0x580aeb(0x127)?_0x3e7b7a[_0x580aeb(0x14f)]:undefined;if(!_0x10391b&&!existsSync(_0x3f5573))return console['error'](a38_0x2669bc[_0x580aeb(0x150)]('Error:\x20Directory\x20not\x20found:\x20'+_0x3f5573+'\x0a')),0x1;let _0x6a58c9;if(_0x10391b){if(!_0x10391b[_0x580aeb(0x124)](_0x580aeb(0x138))&&!_0x10391b[_0x580aeb(0x124)]('.yaml'))return console[_0x580aeb(0x143)](a38_0x2669bc[_0x580aeb(0x150)](_0x580aeb(0x14b)+_0x10391b+'\x0a')),0x1;_0x6a58c9=[_0x10391b];}else _0x6a58c9=findYamlFiles(_0x3f5573);if(_0x6a58c9[_0x580aeb(0x13c)]===0x0)return console[_0x580aeb(0x143)](a38_0x2669bc[_0x580aeb(0x150)](_0x580aeb(0x12c)+_0x3f5573+'\x0a')),0x1;const _0x2c2ec7=validateYamlFiles(_0x6a58c9,_0x3f5573),_0x23790c=calculateSummary(_0x2c2ec7);for(const _0x727798 of _0x2c2ec7){if(!isValidationResult(_0x727798))continue;const {relativePath:_0x248933,source:_0x42607b,result:_0x26d7b3,fileType:_0x156295}=_0x727798,_0x566bc6=_0x156295;if(_0x26d7b3[_0x580aeb(0x153)]&&_0x26d7b3[_0x580aeb(0x135)]['length']===0x0)_0x53ae97[_0x580aeb(0x13d)]&&console[_0x580aeb(0x13b)](a38_0x2669bc[_0x580aeb(0x125)]('✔\x20'+_0x248933)+a38_0x2669bc[_0x580aeb(0x12f)]('\x20('+_0x566bc6+')'));else _0x26d7b3[_0x580aeb(0x153)]?(console[_0x580aeb(0x13b)](a38_0x2669bc[_0x580aeb(0x13f)]('⚠\x20'+_0x248933)+a38_0x2669bc['dim']('\x20('+_0x566bc6+'):\x20'+_0x26d7b3[_0x580aeb(0x135)][_0x580aeb(0x13c)]+_0x580aeb(0x141))),console[_0x580aeb(0x13b)](formatValidationResult(_0x26d7b3,_0x42607b,_0x248933))):(console[_0x580aeb(0x13b)](a38_0x2669bc[_0x580aeb(0x150)]('✖\x20'+_0x248933)+a38_0x2669bc[_0x580aeb(0x12f)]('\x20('+_0x566bc6+_0x580aeb(0x139)+_0x26d7b3[_0x580aeb(0x12a)]['length']+_0x580aeb(0x12d))),console['log'](formatValidationResult(_0x26d7b3,_0x42607b,_0x248933)));}return console[_0x580aeb(0x13b)](''),_0x23790c[_0x580aeb(0x145)]?(console[_0x580aeb(0x13b)](a38_0x2669bc[_0x580aeb(0x150)]('Validation\x20failed:\x20'+_0x23790c[_0x580aeb(0x13a)]+'\x20file(s)\x20with\x20errors,\x20'+_0x23790c[_0x580aeb(0x137)]+'\x20valid')),_0x23790c[_0x580aeb(0x155)]>0x0&&console['log'](a38_0x2669bc[_0x580aeb(0x13f)](_0x23790c[_0x580aeb(0x155)]+'\x20warning(s)\x20found')),0x1):(console[_0x580aeb(0x13b)](a38_0x2669bc[_0x580aeb(0x125)](_0x580aeb(0x131)+_0x23790c[_0x580aeb(0x137)]+'\x20file(s)\x20valid')),_0x23790c[_0x580aeb(0x155)]>0x0&&console[_0x580aeb(0x13b)](a38_0x2669bc[_0x580aeb(0x13f)](_0x23790c['warningCount']+_0x580aeb(0x154))),0x0);}}
@@ -1 +1 @@
1
- const a39_0x5b33b1=a39_0x46d4;function a39_0x46d4(_0x5002ff,_0x55e69d){_0x5002ff=_0x5002ff-0x12b;const _0xa953c8=a39_0xa953();let _0x46d4d5=_0xa953c8[_0x5002ff];return _0x46d4d5;}(function(_0x23b622,_0x2338e9){const _0x43fb84=a39_0x46d4,_0x5be167=_0x23b622();while(!![]){try{const _0x138fb3=-parseInt(_0x43fb84(0x164))/0x1*(-parseInt(_0x43fb84(0x158))/0x2)+-parseInt(_0x43fb84(0x130))/0x3*(-parseInt(_0x43fb84(0x12e))/0x4)+parseInt(_0x43fb84(0x171))/0x5*(-parseInt(_0x43fb84(0x14f))/0x6)+-parseInt(_0x43fb84(0x153))/0x7+-parseInt(_0x43fb84(0x154))/0x8+parseInt(_0x43fb84(0x16e))/0x9+-parseInt(_0x43fb84(0x14d))/0xa*(-parseInt(_0x43fb84(0x15e))/0xb);if(_0x138fb3===_0x2338e9)break;else _0x5be167['push'](_0x5be167['shift']());}catch(_0x2670f4){_0x5be167['push'](_0x5be167['shift']());}}}(a39_0xa953,0x9c500));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';function a39_0xa953(){const _0x1d576b=['replace','listRecursive','name','Folder/pattern\x20arg:\x20','\x5c$&','length','✔\x20Built\x20tree\x20with\x20','journeyBundleName','\x20\x20tdx\x20sg\x20pull\x20\x22My\x20Audience\x22','message','Resolving\x20path\x20\x27','verbose','\x20\x20tdx\x20sg\x20use\x20\x22My\x20Audience\x22','Site:\x20','parentId','resolvePathToResource','(empty)','recursive','dim','/j/da','/e/','test','jsonl','data','parentSegment','Use\x20tdx\x20ps\x20list\x20to\x20see\x20available\x20parent\x20segments.','24727330aCLHcI','type','6UEGvCF',']\x20matching\x20\x27','\x20\x20Cause:\x20','log','6884269qTRKBV','5001936beVNbG','✔\x20Found\x20','No\x20items\x20match\x20pattern:\x20','\x20matching\x20\x27','2BKKjFm','journey','\x20journey','\x20folder','Building\x20hierarchy\x20tree...','Error:\x20No\x20parent\x20segment\x20context\x20set.','11KEbjwE','Error:\x20','error','/app/ps/','map','Parent\x20segment\x20context:\x20','151252tdXcEi','localeCompare','listUnified','\x27...','site','sort','json','folderId','\x20segment','Set\x20a\x20parent\x20segment\x20context\x20first:','1691964HMtqCI','journeys','cause','3042315eeglLD','Listing\x20folders,\x20segments,\x20and\x20journeys...','segments','folders','listWithPattern','List\x20folders\x20and\x20child\x20segments','Resolving\x20parent\x20segment\x20\x27','children','segment','filter','folder','format','181788OWmjhk','Parent\x20ID:\x20','3dhJFAT','Recursive\x20mode:\x20enabled',',\x20and\x20'];a39_0xa953=function(){return _0x1d576b;};return a39_0xa953();}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_0x159aa7 from'chalk';export class SegmentsCommand extends BaseCommand{['name']=a39_0x5b33b1(0x173);['description']=a39_0x5b33b1(0x176);async['execute'](_0xc7ae90){const _0x3a11c5=a39_0x5b33b1,{options:_0x2b91b1,args:_0x149d65}=_0xc7ae90,_0x1c13a1=_0x2b91b1[_0x3a11c5(0x144)],_0x475874=_0x149d65[0x0];try{const _0x122cff=_0x2b91b1[_0x3a11c5(0x14b)];_0x2b91b1[_0x3a11c5(0x13e)]&&(console[_0x3a11c5(0x160)](_0x3a11c5(0x140)+_0x2b91b1[_0x3a11c5(0x168)]),console['error'](_0x3a11c5(0x163)+(_0x122cff||'(not\x20set)')),_0x475874&&console[_0x3a11c5(0x160)](_0x3a11c5(0x136)+_0x475874),_0x1c13a1&&console[_0x3a11c5(0x160)](_0x3a11c5(0x131)));if(!_0x122cff)return console[_0x3a11c5(0x160)](_0x3a11c5(0x15d)),console['error'](''),console[_0x3a11c5(0x160)](_0x3a11c5(0x16d)),console[_0x3a11c5(0x160)](_0x3a11c5(0x13b)),console[_0x3a11c5(0x160)](_0x3a11c5(0x13f)),console['error'](''),console[_0x3a11c5(0x160)](_0x3a11c5(0x14c)),0x1;const _0x2c0c27=_0x475874&&(_0x475874['includes']('*')||_0x475874['includes']('?'));if(_0x2c0c27)return await this['listWithPattern'](_0xc7ae90,_0x122cff,_0x475874);const _0x4346c0=_0x475874?_0x122cff+'/'+_0x475874:_0x122cff;return _0x1c13a1?await this[_0x3a11c5(0x134)](_0xc7ae90,_0x4346c0):await this[_0x3a11c5(0x166)](_0xc7ae90,_0x4346c0);}catch(_0x682c4f){if(_0x682c4f instanceof SDKError)return console['error'](_0x3a11c5(0x15f)+_0x682c4f[_0x3a11c5(0x13c)]),_0x682c4f[_0x3a11c5(0x170)]&&console[_0x3a11c5(0x160)](_0x3a11c5(0x151)+_0x682c4f[_0x3a11c5(0x170)]),0x1;throw _0x682c4f;}}async[a39_0x5b33b1(0x175)](_0x4a8388,_0x547165,_0x262669){const _0xc95752=a39_0x5b33b1,{options:_0x4da334,tdx:_0x39f633}=_0x4a8388,_0x4d72cc=await withSpinner(_0xc95752(0x177)+_0x547165+_0xc95752(0x167),()=>_0x39f633[_0xc95752(0x179)][_0xc95752(0x142)](_0x547165),{'verbose':_0x4da334[_0xc95752(0x13e)]}),_0x32f327=_0x4d72cc['data'],_0x4e1d0e=await withSpinner('Listing\x20folders,\x20segments,\x20and\x20journeys...',()=>_0x39f633['segment']['listUnifiedWithJourneys'](_0x32f327[_0xc95752(0x141)],_0x32f327[_0xc95752(0x16b)]),{'verbose':_0x4da334[_0xc95752(0x13e)]}),{folders:_0x3fe161,segments:_0x3672c8,journeys:_0x1a5b5b}=_0x4e1d0e['data'],_0x50a6ed=_0x262669[_0xc95752(0x133)](/[.+^${}()|[\]\\]/g,_0xc95752(0x137))[_0xc95752(0x133)](/\*/g,'.*')[_0xc95752(0x133)](/\?/g,'.'),_0x30f87f=new RegExp('^'+_0x50a6ed+'$','i'),_0x4f31d4=_0x3fe161[_0xc95752(0x12b)](_0x24aff7=>_0x30f87f[_0xc95752(0x148)](_0x24aff7[_0xc95752(0x135)])),_0x4a1906=_0x3672c8[_0xc95752(0x12b)](_0x4234b5=>_0x30f87f[_0xc95752(0x148)](_0x4234b5[_0xc95752(0x135)])),_0x2912a0=_0x1a5b5b[_0xc95752(0x12b)](_0x30e033=>_0x30f87f['test'](_0x30e033[_0xc95752(0x13a)])),_0x33cde8=_0x4f31d4[_0xc95752(0x138)]+_0x4a1906[_0xc95752(0x138)]+_0x2912a0[_0xc95752(0x138)];console[_0xc95752(0x160)](_0xc95752(0x155)+_0x4f31d4['length']+_0xc95752(0x15b)+(_0x4f31d4[_0xc95752(0x138)]!==0x1?'s':'')+',\x20'+_0x4a1906[_0xc95752(0x138)]+_0xc95752(0x16c)+(_0x4a1906[_0xc95752(0x138)]!==0x1?'s':'')+',\x20and\x20'+_0x2912a0['length']+_0xc95752(0x15a)+(_0x2912a0[_0xc95752(0x138)]!==0x1?'s':'')+_0xc95752(0x157)+_0x262669+'\x27');const _0x239445=_0x553471=>{const _0x38ddcb=_0xc95752;return getConsoleNextUrl(_0x4da334[_0x38ddcb(0x168)],_0x38ddcb(0x161)+_0x32f327['parentId']+_0x38ddcb(0x147)+_0x553471);},_0x447b79=_0x4da334[_0xc95752(0x12d)]===_0xc95752(0x16a)||_0x4da334['format']===_0xc95752(0x149);if(_0x447b79){const _0x1469e6=[..._0x4f31d4[_0xc95752(0x162)](_0x24204a=>({..._0x24204a,'type':_0xc95752(0x12c)})),..._0x4a1906[_0xc95752(0x162)](_0x32be1f=>({..._0x32be1f,'type':'segment','url':_0x239445(_0x32be1f['id'])})),..._0x2912a0[_0xc95752(0x162)](_0x6751f2=>({..._0x6751f2,'name':_0x6751f2[_0xc95752(0x13a)],'type':_0xc95752(0x159)}))][_0xc95752(0x169)]((_0x295b70,_0x379507)=>_0x295b70['name']['localeCompare'](_0x379507[_0xc95752(0x135)]));await handleSDKOutput(_0x1469e6,_0x4da334);}else{if(_0x33cde8===0x0)console[_0xc95752(0x152)](_0xc95752(0x156)+_0x262669);else{console[_0xc95752(0x152)](a39_0x159aa7[_0xc95752(0x145)]('['+_0x547165+_0xc95752(0x150)+_0x262669+'\x27'));const _0x72f31=formatFlatList(_0x4f31d4,_0x4a1906,{'showMetadata':!![],'getSegmentUrl':_0x239445},_0x2912a0);console[_0xc95752(0x152)](_0x72f31);}}return 0x0;}async['listUnified'](_0x3afb00,_0x2b746f){const _0x16de15=a39_0x5b33b1,{options:_0x3cb141,tdx:_0xf5f9fe}=_0x3afb00,_0x3c0af8=await withSpinner(_0x16de15(0x13d)+_0x2b746f+_0x16de15(0x167),()=>_0xf5f9fe[_0x16de15(0x179)]['resolvePathToResource'](_0x2b746f),{'verbose':_0x3cb141['verbose']}),_0x226262=_0x3c0af8['data'];_0x3cb141[_0x16de15(0x13e)]&&(console[_0x16de15(0x160)](_0x16de15(0x12f)+_0x226262[_0x16de15(0x141)]),_0x226262[_0x16de15(0x16b)]&&console[_0x16de15(0x160)]('Folder\x20ID:\x20'+_0x226262[_0x16de15(0x16b)]));const _0x2ef7d5=await withSpinner(_0x16de15(0x172),()=>_0xf5f9fe[_0x16de15(0x179)]['listUnifiedWithJourneys'](_0x226262['parentId'],_0x226262[_0x16de15(0x16b)]),{'verbose':_0x3cb141[_0x16de15(0x13e)]}),{folders:_0x2ed58a,segments:_0x5ba9ef,journeys:_0xdf90d6}=_0x2ef7d5[_0x16de15(0x14a)],_0x142e9e=_0x2ed58a[_0x16de15(0x138)]+_0x5ba9ef['length']+_0xdf90d6[_0x16de15(0x138)];console[_0x16de15(0x160)](_0x16de15(0x155)+_0x2ed58a[_0x16de15(0x138)]+_0x16de15(0x15b)+(_0x2ed58a[_0x16de15(0x138)]!==0x1?'s':'')+',\x20'+_0x5ba9ef[_0x16de15(0x138)]+'\x20segment'+(_0x5ba9ef[_0x16de15(0x138)]!==0x1?'s':'')+',\x20and\x20'+_0xdf90d6[_0x16de15(0x138)]+_0x16de15(0x15a)+(_0xdf90d6['length']!==0x1?'s':''));const _0x58ab2a=_0x365ecb=>{const _0x4e522e=_0x16de15;return getConsoleNextUrl(_0x3cb141[_0x4e522e(0x168)],'/app/ps/'+_0x226262[_0x4e522e(0x141)]+_0x4e522e(0x147)+_0x365ecb);},_0x14e3f9=_0x5f531b=>{const _0xeb8ec9=_0x16de15;return getConsoleNextUrl(_0x3cb141['site'],_0xeb8ec9(0x161)+_0x226262[_0xeb8ec9(0x141)]+_0xeb8ec9(0x147)+_0x5f531b+'/j/da');},_0x3df366=_0x3cb141[_0x16de15(0x12d)]===_0x16de15(0x16a)||_0x3cb141[_0x16de15(0x12d)]===_0x16de15(0x149);if(_0x3df366){const _0x1a6fe9=[..._0x2ed58a[_0x16de15(0x162)](_0x3d1e90=>({..._0x3d1e90,'type':_0x16de15(0x12c)})),..._0x5ba9ef['map'](_0x3412e3=>({..._0x3412e3,'type':_0x16de15(0x179),'url':_0x58ab2a(_0x3412e3['id'])})),..._0xdf90d6[_0x16de15(0x162)](_0xfd4038=>({..._0xfd4038,'name':_0xfd4038['journeyBundleName'],'type':_0x16de15(0x159),'url':_0x14e3f9(_0xfd4038['id'])}))][_0x16de15(0x169)]((_0x6de6cd,_0x93c124)=>_0x6de6cd[_0x16de15(0x135)][_0x16de15(0x165)](_0x93c124[_0x16de15(0x135)]));await handleSDKOutput(_0x1a6fe9,_0x3cb141);}else{if(_0x142e9e===0x0)console[_0x16de15(0x152)](a39_0x159aa7['dim']('['+_0x2b746f+']')),console[_0x16de15(0x152)](_0x16de15(0x143));else{console[_0x16de15(0x152)](a39_0x159aa7['dim']('['+_0x2b746f+']'));const _0x351dd3=formatFlatList(_0x2ed58a,_0x5ba9ef,{'showMetadata':!![],'getSegmentUrl':_0x58ab2a,'getJourneyUrl':_0x14e3f9},_0xdf90d6);console[_0x16de15(0x152)](_0x351dd3);}}return 0x0;}async[a39_0x5b33b1(0x134)](_0x569439,_0x10bde4){const _0x2c8d9c=a39_0x5b33b1,{options:_0x56dbcc,tdx:_0x37ddb2}=_0x569439,_0x4f7979=await withSpinner(_0x2c8d9c(0x13d)+_0x10bde4+_0x2c8d9c(0x167),()=>_0x37ddb2[_0x2c8d9c(0x179)]['resolvePathToResource'](_0x10bde4),{'verbose':_0x56dbcc[_0x2c8d9c(0x13e)]}),_0xd8da10=_0x4f7979['data'];_0x56dbcc['verbose']&&(console['error'](_0x2c8d9c(0x12f)+_0xd8da10[_0x2c8d9c(0x141)]),_0xd8da10['folderId']&&console[_0x2c8d9c(0x160)]('Folder\x20ID:\x20'+_0xd8da10[_0x2c8d9c(0x16b)]));const _0x1dfdb8=_0x56dbcc['maxDepth']||0xa,_0x13c87c=await withSpinner(_0x2c8d9c(0x15c),()=>_0x37ddb2[_0x2c8d9c(0x179)]['listRecursive'](_0xd8da10[_0x2c8d9c(0x141)],_0xd8da10[_0x2c8d9c(0x16b)],0x0,_0x1dfdb8),{'verbose':_0x56dbcc[_0x2c8d9c(0x13e)]}),_0x2329b4=_0x13c87c['data'],_0x20cd0b=_0x13dcf9=>{const _0x1ec125=_0x2c8d9c;let _0x5c12bd=0x0,_0x48a317=0x0,_0x51d6c6=0x0;for(const _0x542bcf of _0x13dcf9){if(_0x542bcf['type']==='folder')_0x5c12bd++;else{if(_0x542bcf[_0x1ec125(0x14e)]===_0x1ec125(0x179))_0x48a317++;else{if(_0x542bcf['type']==='journey')_0x51d6c6++;}}if(_0x542bcf[_0x1ec125(0x178)]){const _0x344d58=_0x20cd0b(_0x542bcf['children']);_0x5c12bd+=_0x344d58[_0x1ec125(0x174)],_0x48a317+=_0x344d58['segments'],_0x51d6c6+=_0x344d58[_0x1ec125(0x16f)];}}return{'folders':_0x5c12bd,'segments':_0x48a317,'journeys':_0x51d6c6};},_0x5b08ad=_0x20cd0b(_0x2329b4);console['error'](_0x2c8d9c(0x139)+_0x5b08ad[_0x2c8d9c(0x174)]+'\x20folder'+(_0x5b08ad[_0x2c8d9c(0x174)]!==0x1?'s':'')+',\x20'+_0x5b08ad['segments']+'\x20segment'+(_0x5b08ad['segments']!==0x1?'s':'')+_0x2c8d9c(0x132)+_0x5b08ad[_0x2c8d9c(0x16f)]+_0x2c8d9c(0x15a)+(_0x5b08ad[_0x2c8d9c(0x16f)]!==0x1?'s':''));const _0xa1cf68=_0x35ee3e=>{const _0x288094=_0x2c8d9c;return getConsoleNextUrl(_0x56dbcc[_0x288094(0x168)],'/app/ps/'+_0xd8da10[_0x288094(0x141)]+_0x288094(0x147)+_0x35ee3e);},_0x1fafba=_0x425f80=>{const _0x20dc32=_0x2c8d9c;return getConsoleNextUrl(_0x56dbcc['site'],'/app/ps/'+_0xd8da10['parentId']+_0x20dc32(0x147)+_0x425f80+_0x20dc32(0x146));};if(_0x56dbcc['format']===_0x2c8d9c(0x16a)||_0x56dbcc[_0x2c8d9c(0x12d)]===_0x2c8d9c(0x149))await handleSDKOutput(_0x2329b4,_0x56dbcc);else{console[_0x2c8d9c(0x152)](a39_0x159aa7[_0x2c8d9c(0x145)]('['+_0x10bde4+']'));const _0x353023=formatTree(_0x2329b4,{'showMetadata':!![],'getSegmentUrl':_0xa1cf68,'getJourneyUrl':_0x1fafba});console[_0x2c8d9c(0x152)](_0x353023);}return 0x0;}}
1
+ const a39_0x5d0445=a39_0x3e49;(function(_0x5d9905,_0x1fdfcc){const _0x548410=a39_0x3e49,_0x1d915c=_0x5d9905();while(!![]){try{const _0x204b7d=parseInt(_0x548410(0x162))/0x1*(parseInt(_0x548410(0x15e))/0x2)+parseInt(_0x548410(0x176))/0x3+parseInt(_0x548410(0x185))/0x4*(parseInt(_0x548410(0x17c))/0x5)+parseInt(_0x548410(0x13b))/0x6+-parseInt(_0x548410(0x17f))/0x7+parseInt(_0x548410(0x17b))/0x8*(-parseInt(_0x548410(0x15b))/0x9)+-parseInt(_0x548410(0x17a))/0xa;if(_0x204b7d===_0x1fdfcc)break;else _0x1d915c['push'](_0x1d915c['shift']());}catch(_0x59970f){_0x1d915c['push'](_0x1d915c['shift']());}}}(a39_0x13c0,0x1c52f));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';function a39_0x3e49(_0x2de46a,_0x36565c){_0x2de46a=_0x2de46a-0x138;const _0x13c00b=a39_0x13c0();let _0x3e498b=_0x13c00b[_0x2de46a];return _0x3e498b;}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_0x117272 from'chalk';function a39_0x13c0(){const _0x5b2fe9=['1141435RVgkEd','replace','listWithPattern','823242iwvTYX','verbose',']\x20matching\x20\x27','includes','/app/ps/','Parent\x20ID:\x20','4fiocEj','journey','sort','\x20matching\x20\x27','/j/da','Error:\x20No\x20parent\x20segment\x20context\x20set.','1138122wrhKRT','segment','folderId','type','recursive','listUnified','folder','Resolving\x20path\x20\x27','log','message','Recursive\x20mode:\x20enabled','\x20\x20tdx\x20sg\x20pull\x20\x22My\x20Audience\x22','Parent\x20segment\x20context:\x20','folders','\x20\x20tdx\x20sg\x20use\x20\x22My\x20Audience\x22','/e/','Resolving\x20parent\x20segment\x20\x27','(empty)','\x20\x20Cause:\x20','\x27...','map',',\x20and\x20','listUnifiedWithJourneys','name','cause','error','Folder\x20ID:\x20','\x20journey','children','data','filter','resolvePathToResource','1171755MLvgzF','parentId','journeys','4744bhyssV','json','localeCompare','description','18NrtBpX','execute','jsonl','✔\x20Built\x20tree\x20with\x20','Listing\x20folders,\x20segments,\x20and\x20journeys...','site','journeyBundleName','length','segments','maxDepth','parentSegment','List\x20folders\x20and\x20child\x20segments','format','listRecursive','\x5c$&','Building\x20hierarchy\x20tree...','\x20folder','\x20segment','dim','Folder/pattern\x20arg:\x20','397005JUvEHZ','test','Set\x20a\x20parent\x20segment\x20context\x20first:','No\x20items\x20match\x20pattern:\x20','2291890WouHLn','8ErylMH'];a39_0x13c0=function(){return _0x5b2fe9;};return a39_0x13c0();}export class SegmentsCommand extends BaseCommand{[a39_0x5d0445(0x152)]=a39_0x5d0445(0x16a);[a39_0x5d0445(0x161)]=a39_0x5d0445(0x16d);async[a39_0x5d0445(0x163)](_0x330383){const _0x394265=a39_0x5d0445,{options:_0x3bbc50,args:_0x561f1c}=_0x330383,_0x2d1053=_0x3bbc50[_0x394265(0x13f)],_0x3239f5=_0x561f1c[0x0];try{const _0x505a63=_0x3bbc50[_0x394265(0x16c)];_0x3bbc50[_0x394265(0x180)]&&(console['error']('Site:\x20'+_0x3bbc50[_0x394265(0x167)]),console[_0x394265(0x154)](_0x394265(0x147)+(_0x505a63||'(not\x20set)')),_0x3239f5&&console[_0x394265(0x154)](_0x394265(0x175)+_0x3239f5),_0x2d1053&&console[_0x394265(0x154)](_0x394265(0x145)));if(!_0x505a63)return console[_0x394265(0x154)](_0x394265(0x13a)),console[_0x394265(0x154)](''),console[_0x394265(0x154)](_0x394265(0x178)),console[_0x394265(0x154)](_0x394265(0x146)),console[_0x394265(0x154)](_0x394265(0x149)),console['error'](''),console[_0x394265(0x154)]('Use\x20tdx\x20ps\x20list\x20to\x20see\x20available\x20parent\x20segments.'),0x1;const _0x38c4db=_0x3239f5&&(_0x3239f5[_0x394265(0x182)]('*')||_0x3239f5[_0x394265(0x182)]('?'));if(_0x38c4db)return await this[_0x394265(0x17e)](_0x330383,_0x505a63,_0x3239f5);const _0x49d5fc=_0x3239f5?_0x505a63+'/'+_0x3239f5:_0x505a63;return _0x2d1053?await this[_0x394265(0x16f)](_0x330383,_0x49d5fc):await this[_0x394265(0x140)](_0x330383,_0x49d5fc);}catch(_0x3911ed){if(_0x3911ed instanceof SDKError)return console[_0x394265(0x154)]('Error:\x20'+_0x3911ed[_0x394265(0x144)]),_0x3911ed['cause']&&console[_0x394265(0x154)](_0x394265(0x14d)+_0x3911ed[_0x394265(0x153)]),0x1;throw _0x3911ed;}}async[a39_0x5d0445(0x17e)](_0x5e47e8,_0x31e2ff,_0x496cbb){const _0x4672ee=a39_0x5d0445,{options:_0x24335c,tdx:_0x55f9a8}=_0x5e47e8,_0x5d0d04=await withSpinner(_0x4672ee(0x14b)+_0x31e2ff+'\x27...',()=>_0x55f9a8[_0x4672ee(0x13c)][_0x4672ee(0x15a)](_0x31e2ff),{'verbose':_0x24335c[_0x4672ee(0x180)]}),_0x2e2eef=_0x5d0d04[_0x4672ee(0x158)],_0x418a6a=await withSpinner('Listing\x20folders,\x20segments,\x20and\x20journeys...',()=>_0x55f9a8['segment'][_0x4672ee(0x151)](_0x2e2eef[_0x4672ee(0x15c)],_0x2e2eef[_0x4672ee(0x13d)]),{'verbose':_0x24335c['verbose']}),{folders:_0x2e5b0a,segments:_0x5af7a4,journeys:_0x46acc5}=_0x418a6a[_0x4672ee(0x158)],_0x36c382=_0x496cbb[_0x4672ee(0x17d)](/[.+^${}()|[\]\\]/g,_0x4672ee(0x170))['replace'](/\*/g,'.*')[_0x4672ee(0x17d)](/\?/g,'.'),_0xf29a4f=new RegExp('^'+_0x36c382+'$','i'),_0x287bde=_0x2e5b0a[_0x4672ee(0x159)](_0x300fb1=>_0xf29a4f[_0x4672ee(0x177)](_0x300fb1[_0x4672ee(0x152)])),_0x1e2ed1=_0x5af7a4[_0x4672ee(0x159)](_0x3e73b4=>_0xf29a4f[_0x4672ee(0x177)](_0x3e73b4[_0x4672ee(0x152)])),_0x55f1f7=_0x46acc5[_0x4672ee(0x159)](_0x429116=>_0xf29a4f[_0x4672ee(0x177)](_0x429116[_0x4672ee(0x168)])),_0x8ead78=_0x287bde[_0x4672ee(0x169)]+_0x1e2ed1[_0x4672ee(0x169)]+_0x55f1f7[_0x4672ee(0x169)];console[_0x4672ee(0x154)]('✔\x20Found\x20'+_0x287bde['length']+_0x4672ee(0x172)+(_0x287bde[_0x4672ee(0x169)]!==0x1?'s':'')+',\x20'+_0x1e2ed1['length']+_0x4672ee(0x173)+(_0x1e2ed1['length']!==0x1?'s':'')+_0x4672ee(0x150)+_0x55f1f7[_0x4672ee(0x169)]+_0x4672ee(0x156)+(_0x55f1f7[_0x4672ee(0x169)]!==0x1?'s':'')+_0x4672ee(0x138)+_0x496cbb+'\x27');const _0x3d7a91=_0x276643=>{const _0xc3bf7f=_0x4672ee;return getConsoleNextUrl(_0x24335c[_0xc3bf7f(0x167)],_0xc3bf7f(0x183)+_0x2e2eef[_0xc3bf7f(0x15c)]+'/e/'+_0x276643);},_0x34fe28=_0x24335c['format']===_0x4672ee(0x15f)||_0x24335c[_0x4672ee(0x16e)]===_0x4672ee(0x164);if(_0x34fe28){const _0x1f89ef=[..._0x287bde[_0x4672ee(0x14f)](_0x5e77b3=>({..._0x5e77b3,'type':_0x4672ee(0x141)})),..._0x1e2ed1['map'](_0x51d69c=>({..._0x51d69c,'type':_0x4672ee(0x13c),'url':_0x3d7a91(_0x51d69c['id'])})),..._0x55f1f7[_0x4672ee(0x14f)](_0x36aec7=>({..._0x36aec7,'name':_0x36aec7['journeyBundleName'],'type':'journey'}))][_0x4672ee(0x187)]((_0x30b902,_0x347bd1)=>_0x30b902[_0x4672ee(0x152)][_0x4672ee(0x160)](_0x347bd1[_0x4672ee(0x152)]));await handleSDKOutput(_0x1f89ef,_0x24335c);}else{if(_0x8ead78===0x0)console[_0x4672ee(0x143)](_0x4672ee(0x179)+_0x496cbb);else{console[_0x4672ee(0x143)](a39_0x117272[_0x4672ee(0x174)]('['+_0x31e2ff+_0x4672ee(0x181)+_0x496cbb+'\x27'));const _0x3f778e=formatFlatList(_0x287bde,_0x1e2ed1,{'showMetadata':!![],'getSegmentUrl':_0x3d7a91},_0x55f1f7);console[_0x4672ee(0x143)](_0x3f778e);}}return 0x0;}async[a39_0x5d0445(0x140)](_0x4583ad,_0x1fb7ec){const _0x8dd71a=a39_0x5d0445,{options:_0x1acb40,tdx:_0x4f7474}=_0x4583ad,_0x5d09c3=await withSpinner('Resolving\x20path\x20\x27'+_0x1fb7ec+_0x8dd71a(0x14e),()=>_0x4f7474[_0x8dd71a(0x13c)]['resolvePathToResource'](_0x1fb7ec),{'verbose':_0x1acb40[_0x8dd71a(0x180)]}),_0x206a4c=_0x5d09c3[_0x8dd71a(0x158)];_0x1acb40[_0x8dd71a(0x180)]&&(console['error'](_0x8dd71a(0x184)+_0x206a4c[_0x8dd71a(0x15c)]),_0x206a4c[_0x8dd71a(0x13d)]&&console[_0x8dd71a(0x154)](_0x8dd71a(0x155)+_0x206a4c[_0x8dd71a(0x13d)]));const _0x4ff24e=await withSpinner(_0x8dd71a(0x166),()=>_0x4f7474[_0x8dd71a(0x13c)]['listUnifiedWithJourneys'](_0x206a4c[_0x8dd71a(0x15c)],_0x206a4c[_0x8dd71a(0x13d)]),{'verbose':_0x1acb40['verbose']}),{folders:_0x433103,segments:_0x276d69,journeys:_0x437495}=_0x4ff24e[_0x8dd71a(0x158)],_0x28b48d=_0x433103[_0x8dd71a(0x169)]+_0x276d69[_0x8dd71a(0x169)]+_0x437495[_0x8dd71a(0x169)];console[_0x8dd71a(0x154)]('✔\x20Found\x20'+_0x433103[_0x8dd71a(0x169)]+_0x8dd71a(0x172)+(_0x433103[_0x8dd71a(0x169)]!==0x1?'s':'')+',\x20'+_0x276d69[_0x8dd71a(0x169)]+_0x8dd71a(0x173)+(_0x276d69[_0x8dd71a(0x169)]!==0x1?'s':'')+',\x20and\x20'+_0x437495[_0x8dd71a(0x169)]+_0x8dd71a(0x156)+(_0x437495['length']!==0x1?'s':''));const _0x4bbcfd=_0x1f27d1=>{const _0x3f6172=_0x8dd71a;return getConsoleNextUrl(_0x1acb40['site'],_0x3f6172(0x183)+_0x206a4c[_0x3f6172(0x15c)]+_0x3f6172(0x14a)+_0x1f27d1);},_0x3c5846=_0x4646c0=>{const _0x4f202d=_0x8dd71a;return getConsoleNextUrl(_0x1acb40[_0x4f202d(0x167)],_0x4f202d(0x183)+_0x206a4c['parentId']+_0x4f202d(0x14a)+_0x4646c0+'/j/da');},_0x346dcd=_0x1acb40[_0x8dd71a(0x16e)]===_0x8dd71a(0x15f)||_0x1acb40[_0x8dd71a(0x16e)]===_0x8dd71a(0x164);if(_0x346dcd){const _0x4ff75f=[..._0x433103[_0x8dd71a(0x14f)](_0x10fcfe=>({..._0x10fcfe,'type':'folder'})),..._0x276d69[_0x8dd71a(0x14f)](_0x2c207a=>({..._0x2c207a,'type':'segment','url':_0x4bbcfd(_0x2c207a['id'])})),..._0x437495[_0x8dd71a(0x14f)](_0x1b41db=>({..._0x1b41db,'name':_0x1b41db[_0x8dd71a(0x168)],'type':'journey','url':_0x3c5846(_0x1b41db['id'])}))][_0x8dd71a(0x187)]((_0x566c6d,_0x26e7a0)=>_0x566c6d[_0x8dd71a(0x152)][_0x8dd71a(0x160)](_0x26e7a0['name']));await handleSDKOutput(_0x4ff75f,_0x1acb40);}else{if(_0x28b48d===0x0)console['log'](a39_0x117272['dim']('['+_0x1fb7ec+']')),console[_0x8dd71a(0x143)](_0x8dd71a(0x14c));else{console['log'](a39_0x117272[_0x8dd71a(0x174)]('['+_0x1fb7ec+']'));const _0x504fbe=formatFlatList(_0x433103,_0x276d69,{'showMetadata':!![],'getSegmentUrl':_0x4bbcfd,'getJourneyUrl':_0x3c5846},_0x437495);console[_0x8dd71a(0x143)](_0x504fbe);}}return 0x0;}async[a39_0x5d0445(0x16f)](_0x40ab38,_0x2538b9){const _0xe97269=a39_0x5d0445,{options:_0x590895,tdx:_0x458e18}=_0x40ab38,_0x2930cd=await withSpinner(_0xe97269(0x142)+_0x2538b9+'\x27...',()=>_0x458e18[_0xe97269(0x13c)][_0xe97269(0x15a)](_0x2538b9),{'verbose':_0x590895[_0xe97269(0x180)]}),_0x26920b=_0x2930cd[_0xe97269(0x158)];_0x590895[_0xe97269(0x180)]&&(console[_0xe97269(0x154)]('Parent\x20ID:\x20'+_0x26920b[_0xe97269(0x15c)]),_0x26920b['folderId']&&console[_0xe97269(0x154)]('Folder\x20ID:\x20'+_0x26920b[_0xe97269(0x13d)]));const _0x428923=_0x590895[_0xe97269(0x16b)]||0xa,_0x5f00c3=await withSpinner(_0xe97269(0x171),()=>_0x458e18[_0xe97269(0x13c)][_0xe97269(0x16f)](_0x26920b[_0xe97269(0x15c)],_0x26920b[_0xe97269(0x13d)],0x0,_0x428923),{'verbose':_0x590895['verbose']}),_0xd61f2e=_0x5f00c3[_0xe97269(0x158)],_0x212ebc=_0x3e54d1=>{const _0x37bea4=_0xe97269;let _0x34b897=0x0,_0x824e3b=0x0,_0x3375f0=0x0;for(const _0x243dc7 of _0x3e54d1){if(_0x243dc7[_0x37bea4(0x13e)]===_0x37bea4(0x141))_0x34b897++;else{if(_0x243dc7[_0x37bea4(0x13e)]===_0x37bea4(0x13c))_0x824e3b++;else{if(_0x243dc7[_0x37bea4(0x13e)]===_0x37bea4(0x186))_0x3375f0++;}}if(_0x243dc7['children']){const _0x529c7e=_0x212ebc(_0x243dc7[_0x37bea4(0x157)]);_0x34b897+=_0x529c7e[_0x37bea4(0x148)],_0x824e3b+=_0x529c7e['segments'],_0x3375f0+=_0x529c7e[_0x37bea4(0x15d)];}}return{'folders':_0x34b897,'segments':_0x824e3b,'journeys':_0x3375f0};},_0x3996b3=_0x212ebc(_0xd61f2e);console[_0xe97269(0x154)](_0xe97269(0x165)+_0x3996b3[_0xe97269(0x148)]+_0xe97269(0x172)+(_0x3996b3[_0xe97269(0x148)]!==0x1?'s':'')+',\x20'+_0x3996b3[_0xe97269(0x16a)]+_0xe97269(0x173)+(_0x3996b3[_0xe97269(0x16a)]!==0x1?'s':'')+_0xe97269(0x150)+_0x3996b3['journeys']+_0xe97269(0x156)+(_0x3996b3[_0xe97269(0x15d)]!==0x1?'s':''));const _0x469d3f=_0xc5fd7f=>{const _0x38a25c=_0xe97269;return getConsoleNextUrl(_0x590895[_0x38a25c(0x167)],_0x38a25c(0x183)+_0x26920b[_0x38a25c(0x15c)]+'/e/'+_0xc5fd7f);},_0x3379a6=_0x3486a7=>{const _0x2590a1=_0xe97269;return getConsoleNextUrl(_0x590895[_0x2590a1(0x167)],'/app/ps/'+_0x26920b[_0x2590a1(0x15c)]+_0x2590a1(0x14a)+_0x3486a7+_0x2590a1(0x139));};if(_0x590895['format']===_0xe97269(0x15f)||_0x590895['format']===_0xe97269(0x164))await handleSDKOutput(_0xd61f2e,_0x590895);else{console['log'](a39_0x117272[_0xe97269(0x174)]('['+_0x2538b9+']'));const _0x1852ee=formatTree(_0xd61f2e,{'showMetadata':!![],'getSegmentUrl':_0x469d3f,'getJourneyUrl':_0x3379a6});console[_0xe97269(0x143)](_0x1852ee);}return 0x0;}}
@@ -1 +1 @@
1
- const a40_0x40dcd7=a40_0x5d96;(function(_0x96139e,_0x23ea86){const _0x3a01b3=a40_0x5d96,_0x489309=_0x96139e();while(!![]){try{const _0x57d029=parseInt(_0x3a01b3(0xa6))/0x1*(-parseInt(_0x3a01b3(0xad))/0x2)+-parseInt(_0x3a01b3(0xa9))/0x3+-parseInt(_0x3a01b3(0xb2))/0x4*(parseInt(_0x3a01b3(0x9a))/0x5)+-parseInt(_0x3a01b3(0xb0))/0x6+parseInt(_0x3a01b3(0xa5))/0x7*(-parseInt(_0x3a01b3(0xa8))/0x8)+-parseInt(_0x3a01b3(0xb5))/0x9*(-parseInt(_0x3a01b3(0xbd))/0xa)+parseInt(_0x3a01b3(0xa3))/0xb;if(_0x57d029===_0x23ea86)break;else _0x489309['push'](_0x489309['shift']());}catch(_0x408fa7){_0x489309['push'](_0x489309['shift']());}}}(a40_0x31ae,0x7b18c));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleSDKOutput}from'../core/command-output.js';import{parseTableReference,validateTableDescribeReference}from'../utils/table-ref-parser.js';import{withSpinner}from'../utils/spinner.js';import{DEFAULT_DISPLAY_LIMIT,resolveLimit}from'../core/constants.js';function a40_0x5d96(_0x13a480,_0x59f3f7){_0x13a480=_0x13a480-0x99;const _0x31ae5a=a40_0x31ae();let _0x5d967e=_0x31ae5a[_0x13a480];return _0x5d967e;}function a40_0x31ae(){const _0x321791=['5HaYotz','\x20row','\x20\x20\x20or:\x20tdx\x20show\x20<catalog.database.table>','...','description','verbose','✔\x20Query\x20successful\x20-\x200\x20rows\x20returned','Catalog:\x20','args','37504280ZbmEnd','cause','14gWgNOT','1277RbjuGG','\x20from\x20','3863096FrzHlj','855687StTGeE','length','Querying\x20','error','1398YNnLFy','Table:\x20','limit','5201718xtGtRt','show','2449144gkcYnk','Database:\x20','site','9WbuaLe','showTable','Usage:\x20tdx\x20show\x20<database.table>','message','\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--database\x20<database>','Show\x20table\x20contents','Error:\x20','name','7175890qCIElP','query','Usage:\x20tdx\x20show\x20<database.table>\x0a\x20\x20\x20or:\x20tdx\x20show\x20<catalog.database.table>\x0a\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--database\x20<database>\x0a\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--in\x20<database>\x0a\x0aRun\x20\x27tdx\x20show\x20--help\x27\x20for\x20more\x20options','database','execute','Site:\x20','\x20\x20Cause:\x20','✔\x20Retrieved\x20'];a40_0x31ae=function(){return _0x321791;};return a40_0x31ae();}export class ShowCommand extends BaseCommand{[a40_0x40dcd7(0xbc)]=a40_0x40dcd7(0xb1);[a40_0x40dcd7(0x9e)]=a40_0x40dcd7(0xba);async[a40_0x40dcd7(0xc1)](_0x3d2578){return this['showTable'](_0x3d2578);}async[a40_0x40dcd7(0xb6)](_0x25e33c){const _0x197f83=a40_0x40dcd7,{options:_0x1abbac,args:_0x4866fa,tdx:_0x5057c5}=_0x25e33c;let _0x4c0b62;try{_0x4c0b62=parseTableReference(_0x4866fa[0x0]);const _0x4df043=_0x1abbac[_0x197f83(0xc0)];!_0x4c0b62[_0x197f83(0xc0)]&&_0x4df043&&(_0x4c0b62[_0x197f83(0xc0)]=_0x4df043);const _0x4f8463=validateTableDescribeReference(_0x4c0b62);if(_0x4f8463)return console['error']('Error:\x20'+_0x4f8463),console[_0x197f83(0xac)]('Usage:\x20tdx\x20show\x20<database.table>'),console[_0x197f83(0xac)](_0x197f83(0x9c)),console[_0x197f83(0xac)](_0x197f83(0xb9)),0x1;}catch(_0x7bf10){return console[_0x197f83(0xac)]('Error:\x20'+_0x7bf10[_0x197f83(0xb8)]),console['error'](_0x197f83(0xb7)),console[_0x197f83(0xac)](_0x197f83(0x9c)),console[_0x197f83(0xac)](_0x197f83(0xb9)),0x1;}const _0xdcd45=_0x4c0b62['catalog'],_0x5d235b=_0x4c0b62['database'],_0x36b780=_0x4c0b62['table'],_0x2bd128=resolveLimit(_0x1abbac[_0x197f83(0xaf)],DEFAULT_DISPLAY_LIMIT);try{_0x1abbac[_0x197f83(0x9f)]&&(console[_0x197f83(0xac)](_0x197f83(0xc2)+_0x1abbac[_0x197f83(0xb4)]),_0xdcd45&&console['error'](_0x197f83(0xa1)+_0xdcd45),console[_0x197f83(0xac)](_0x197f83(0xb3)+_0x5d235b),console[_0x197f83(0xac)](_0x197f83(0xae)+_0x36b780),console[_0x197f83(0xac)]('Limit:\x20'+_0x2bd128));const _0x4dfdca=_0xdcd45?_0xdcd45+'.'+_0x5d235b+'.'+_0x36b780:_0x5d235b+'.'+_0x36b780,_0x5d5300=await withSpinner(_0x197f83(0xab)+_0x4dfdca+_0x197f83(0x9d),()=>_0x5057c5[_0x197f83(0xbe)][_0x197f83(0xb6)](_0x5d235b,_0x36b780,_0x2bd128,_0xdcd45),{'verbose':_0x1abbac['verbose']}),_0x1b6be4=_0x5d5300['data'],_0x2b2f00=_0x1b6be4['data'];return _0x2b2f00[_0x197f83(0xaa)]===0x0?console[_0x197f83(0xac)](_0x197f83(0xa0)):console[_0x197f83(0xac)](_0x197f83(0x99)+_0x2b2f00['length']+_0x197f83(0x9b)+(_0x2b2f00[_0x197f83(0xaa)]!==0x1?'s':'')+_0x197f83(0xa7)+_0x4dfdca),await handleSDKOutput(_0x2b2f00,_0x1abbac),0x0;}catch(_0x384f07){if(_0x384f07 instanceof SDKError)return console[_0x197f83(0xac)](_0x197f83(0xbb)+_0x384f07[_0x197f83(0xb8)]),_0x384f07[_0x197f83(0xa4)]&&console[_0x197f83(0xac)](_0x197f83(0xc3)+_0x384f07['cause']),0x1;throw _0x384f07;}}['validate'](_0x5b73fa){const _0x57341f=a40_0x40dcd7;if(_0x5b73fa[_0x57341f(0xa2)][_0x57341f(0xaa)]===0x0)return _0x57341f(0xbf);if(_0x5b73fa[_0x57341f(0xa2)][_0x57341f(0xaa)]>0x1)return'Too\x20many\x20arguments\x0aUsage:\x20tdx\x20show\x20<database.table>\x0a\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--database\x20<database>\x0a\x0aRun\x20\x27tdx\x20show\x20--help\x27\x20for\x20more\x20options';return undefined;}}
1
+ const a40_0x1e7f45=a40_0x4ace;function a40_0x4ace(_0x2b851d,_0x40aeca){_0x2b851d=_0x2b851d-0xa6;const _0x57b5a1=a40_0x57b5();let _0x4acef2=_0x57b5a1[_0x2b851d];return _0x4acef2;}(function(_0x5b43e7,_0x186be3){const _0x1ca94c=a40_0x4ace,_0x22d0da=_0x5b43e7();while(!![]){try{const _0x289116=-parseInt(_0x1ca94c(0xcd))/0x1+parseInt(_0x1ca94c(0xcb))/0x2*(-parseInt(_0x1ca94c(0xb0))/0x3)+parseInt(_0x1ca94c(0xce))/0x4+parseInt(_0x1ca94c(0xc7))/0x5+parseInt(_0x1ca94c(0xc1))/0x6+parseInt(_0x1ca94c(0xb7))/0x7*(-parseInt(_0x1ca94c(0xc0))/0x8)+parseInt(_0x1ca94c(0xc4))/0x9*(-parseInt(_0x1ca94c(0xbc))/0xa);if(_0x289116===_0x186be3)break;else _0x22d0da['push'](_0x22d0da['shift']());}catch(_0x449894){_0x22d0da['push'](_0x22d0da['shift']());}}}(a40_0x57b5,0x2c518));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_0x1e7f45(0xa7)]=a40_0x1e7f45(0xc3);async[a40_0x1e7f45(0xb3)](_0x2f6796){const _0x1efe88=a40_0x1e7f45;return this[_0x1efe88(0xab)](_0x2f6796);}async['showTable'](_0x248426){const _0x1b212d=a40_0x1e7f45,{options:_0x5c5ba8,args:_0xd72c1b,tdx:_0x25d9cc}=_0x248426;let _0x4d16b8;try{_0x4d16b8=parseTableReference(_0xd72c1b[0x0]);const _0x1cd103=_0x5c5ba8['database'];!_0x4d16b8[_0x1b212d(0xa9)]&&_0x1cd103&&(_0x4d16b8[_0x1b212d(0xa9)]=_0x1cd103);const _0x196aea=validateTableDescribeReference(_0x4d16b8);if(_0x196aea)return console['error']('Error:\x20'+_0x196aea),console[_0x1b212d(0xaa)](_0x1b212d(0xa6)),console[_0x1b212d(0xaa)](_0x1b212d(0xcc)),console[_0x1b212d(0xaa)]('\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--database\x20<database>'),0x1;}catch(_0x4e649a){return console[_0x1b212d(0xaa)]('Error:\x20'+_0x4e649a[_0x1b212d(0xbf)]),console[_0x1b212d(0xaa)]('Usage:\x20tdx\x20show\x20<database.table>'),console[_0x1b212d(0xaa)](_0x1b212d(0xcc)),console[_0x1b212d(0xaa)](_0x1b212d(0xb4)),0x1;}const _0x372d0a=_0x4d16b8[_0x1b212d(0xb5)],_0x228141=_0x4d16b8[_0x1b212d(0xa9)],_0x210af5=_0x4d16b8[_0x1b212d(0xc2)],_0x12fa29=resolveLimit(_0x5c5ba8[_0x1b212d(0xbd)],DEFAULT_DISPLAY_LIMIT);try{_0x5c5ba8[_0x1b212d(0xbb)]&&(console[_0x1b212d(0xaa)](_0x1b212d(0xac)+_0x5c5ba8[_0x1b212d(0xc9)]),_0x372d0a&&console[_0x1b212d(0xaa)](_0x1b212d(0xb1)+_0x372d0a),console[_0x1b212d(0xaa)](_0x1b212d(0xca)+_0x228141),console[_0x1b212d(0xaa)]('Table:\x20'+_0x210af5),console[_0x1b212d(0xaa)](_0x1b212d(0xc6)+_0x12fa29));const _0x7888c2=_0x372d0a?_0x372d0a+'.'+_0x228141+'.'+_0x210af5:_0x228141+'.'+_0x210af5,_0x329158=await withSpinner(_0x1b212d(0xb9)+_0x7888c2+_0x1b212d(0xb2),()=>_0x25d9cc[_0x1b212d(0xb6)][_0x1b212d(0xab)](_0x228141,_0x210af5,_0x12fa29,_0x372d0a),{'verbose':_0x5c5ba8[_0x1b212d(0xbb)]}),_0xfa91fb=_0x329158['data'],_0x21c128=_0xfa91fb[_0x1b212d(0xba)];return _0x21c128[_0x1b212d(0xae)]===0x0?console[_0x1b212d(0xaa)]('✔\x20Query\x20successful\x20-\x200\x20rows\x20returned'):console[_0x1b212d(0xaa)](_0x1b212d(0xbe)+_0x21c128[_0x1b212d(0xae)]+_0x1b212d(0xc5)+(_0x21c128['length']!==0x1?'s':'')+'\x20from\x20'+_0x7888c2),await handleSDKOutput(_0x21c128,_0x5c5ba8),0x0;}catch(_0x12e401){if(_0x12e401 instanceof SDKError)return console[_0x1b212d(0xaa)](_0x1b212d(0xaf)+_0x12e401[_0x1b212d(0xbf)]),_0x12e401['cause']&&console['error'](_0x1b212d(0xa8)+_0x12e401['cause']),0x1;throw _0x12e401;}}[a40_0x1e7f45(0xc8)](_0x2e7e8d){const _0x262ac6=a40_0x1e7f45;if(_0x2e7e8d[_0x262ac6(0xb8)][_0x262ac6(0xae)]===0x0)return'Usage:\x20tdx\x20show\x20<database.table>\x0a\x20\x20\x20or:\x20tdx\x20show\x20<catalog.database.table>\x0a\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--database\x20<database>\x0a\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--in\x20<database>\x0a\x0aRun\x20\x27tdx\x20show\x20--help\x27\x20for\x20more\x20options';if(_0x2e7e8d[_0x262ac6(0xb8)]['length']>0x1)return _0x262ac6(0xad);return undefined;}}function a40_0x57b5(){const _0x52db2c=['15783RtYaXK','Catalog:\x20','...','execute','\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--database\x20<database>','catalog','query','8526lfdQwA','args','Querying\x20','data','verbose','20ESJIPE','limit','✔\x20Retrieved\x20','message','672RizFJw','994998JRxEtt','table','Show\x20table\x20contents','325917tPwHdx','\x20row','Limit:\x20','1650325caiuzb','validate','site','Database:\x20','118isXxDt','\x20\x20\x20or:\x20tdx\x20show\x20<catalog.database.table>','152042bhQNRl','1291236lbvyDu','Usage:\x20tdx\x20show\x20<database.table>','description','\x20\x20Cause:\x20','database','error','showTable','Site:\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','length','Error:\x20'];a40_0x57b5=function(){return _0x52db2c;};return a40_0x57b5();}
@@ -1 +1 @@
1
- const a41_0x3bd9ec=a41_0x5dca;function a41_0x1db4(){const _0x437a7d=['tdx','16WFYRMl','19479ENVFzJ','1855968OBedWp','filter','green','3290670Uviyyk','profile','204auGjEw','site:\x20','yellow','3478174ZcAQic','249822RRNrPO','status','red','name','cyan','join','execute','✗\x20Validation\x20failed:\x20','dim','jobs','cli','description','User:','2942802WmLsbG','config','bold','account_id','email','site','TDX_PROFILE\x20env','first_name','displayWithSources','message','error','Show\x20authentication\x20status\x20and\x20current\x20context','Read\x20credential\x20from\x20','(from\x20','✓\x20Authentication\x20successful\x0a','No\x20credential\x20found','4688130fAVYRV','log'];a41_0x1db4=function(){return _0x437a7d;};return a41_0x1db4();}(function(_0x2faa92,_0xa6084a){const _0x8d6d41=a41_0x5dca,_0x2e67ee=_0x2faa92();while(!![]){try{const _0x16ea5f=parseInt(_0x8d6d41(0x152))/0x1+parseInt(_0x8d6d41(0x14e))/0x2*(parseInt(_0x8d6d41(0x148))/0x3)+parseInt(_0x8d6d41(0x149))/0x4+-parseInt(_0x8d6d41(0x144))/0x5+-parseInt(_0x8d6d41(0x14c))/0x6+parseInt(_0x8d6d41(0x151))/0x7*(parseInt(_0x8d6d41(0x147))/0x8)+-parseInt(_0x8d6d41(0x15f))/0x9;if(_0x16ea5f===_0xa6084a)break;else _0x2e67ee['push'](_0x2e67ee['shift']());}catch(_0x38e9a0){_0x2e67ee['push'](_0x2e67ee['shift']());}}}(a41_0x1db4,0x87f0f));import{BaseCommand,printAuthError}from'./command.js';function a41_0x5dca(_0x3abd18,_0x129925){_0x3abd18=_0x3abd18-0x13a;const _0x1db4b2=a41_0x1db4();let _0x5dca4b=_0x1db4b2[_0x3abd18];return _0x5dca4b;}import{resolveAPIKeyAsync}from'../core/config.js';import{HTTPClientError}from'../sdk/client/http-client.js';import{GlobalContext}from'../core/global-context.js';import a41_0x428f9e from'chalk';export class StatusCommand extends BaseCommand{[a41_0x3bd9ec(0x155)]=a41_0x3bd9ec(0x153);[a41_0x3bd9ec(0x15d)]=a41_0x3bd9ec(0x13f);async[a41_0x3bd9ec(0x158)](_0x33bbc9){const _0xecc35b=a41_0x3bd9ec,{options:_0x1ee196,tdx:_0x5c24ad}=_0x33bbc9,_0x302a46=_0x1ee196[_0xecc35b(0x164)],_0x32ec0c=new GlobalContext(_0x1ee196),_0x5a940f=_0x32ec0c[_0xecc35b(0x14d)],_0x223cdb=_0x32ec0c['profileSource'],_0x279748=_0x223cdb===_0xecc35b(0x15c)?'CLI\x20flag':_0x223cdb==='session'?'session':_0x223cdb==='env'?_0xecc35b(0x13a):_0x223cdb===_0xecc35b(0x160)?_0xecc35b(0x160):null,_0x4503f4=_0x5a940f?a41_0x428f9e[_0xecc35b(0x156)](_0x5a940f):a41_0x428f9e[_0xecc35b(0x15a)]('N/A'),_0x132b4c=_0x279748?'\x20'+a41_0x428f9e[_0xecc35b(0x15a)](_0xecc35b(0x141)+_0x279748+')'):'';console['log'](a41_0x428f9e['bold'](_0xecc35b(0x146))+'\x20profile:\x20'+_0x4503f4+_0x132b4c+'\x20'+a41_0x428f9e['dim']('(')+_0xecc35b(0x14f)+a41_0x428f9e['cyan'](_0x302a46)+a41_0x428f9e[_0xecc35b(0x15a)](')'));const _0x2190b0=await resolveAPIKeyAsync(_0x302a46,_0x5a940f);if(_0x2190b0){const {source:_0x3c1ee4,isDeprecated:_0x1e42d9}=_0x2190b0,_0x223f96=_0xecc35b(0x140)+a41_0x428f9e['cyan'](_0x3c1ee4);console['log'](_0x1e42d9?a41_0x428f9e[_0xecc35b(0x150)](_0x223f96):_0x223f96);}else console[_0xecc35b(0x145)](a41_0x428f9e[_0xecc35b(0x150)](_0xecc35b(0x143)));let _0x2d567b=![];try{const _0x1d778d=await _0x5c24ad[_0xecc35b(0x15b)]['getUserInfo']();console[_0xecc35b(0x145)](a41_0x428f9e[_0xecc35b(0x14b)](_0xecc35b(0x142))),console[_0xecc35b(0x145)](a41_0x428f9e[_0xecc35b(0x161)](_0xecc35b(0x15e))+'\x20'+a41_0x428f9e['cyan'](_0x1d778d[_0xecc35b(0x163)]));if(_0x1d778d[_0xecc35b(0x13b)]||_0x1d778d['last_name']){const _0x3ffa36=[_0x1d778d[_0xecc35b(0x13b)],_0x1d778d['last_name']][_0xecc35b(0x14a)](Boolean)[_0xecc35b(0x157)]('\x20');console['log'](a41_0x428f9e[_0xecc35b(0x161)]('Name:')+'\x20'+_0x3ffa36);}_0x1d778d[_0xecc35b(0x162)]&&console['log'](a41_0x428f9e['bold']('Account\x20ID:')+'\x20'+a41_0x428f9e[_0xecc35b(0x150)](_0x1d778d[_0xecc35b(0x162)])),_0x2d567b=!![];}catch(_0x44cf4f){_0x44cf4f instanceof HTTPClientError&&_0x44cf4f[_0xecc35b(0x153)]===0x191?printAuthError(_0x44cf4f,!![],_0x5a940f):console[_0xecc35b(0x13e)](a41_0x428f9e[_0xecc35b(0x154)](_0xecc35b(0x159)+(_0x44cf4f instanceof Error?_0x44cf4f[_0xecc35b(0x13d)]:String(_0x44cf4f))));}return console['log'](),_0x32ec0c[_0xecc35b(0x13c)](),_0x2d567b?0x0:0x1;}}
1
+ const a41_0x214f20=a41_0x5eb9;(function(_0xbf8f28,_0x24ac45){const _0x3ec9f1=a41_0x5eb9,_0x3ec552=_0xbf8f28();while(!![]){try{const _0xc8af96=-parseInt(_0x3ec9f1(0x172))/0x1+-parseInt(_0x3ec9f1(0x151))/0x2+parseInt(_0x3ec9f1(0x177))/0x3+parseInt(_0x3ec9f1(0x15a))/0x4+-parseInt(_0x3ec9f1(0x16c))/0x5+parseInt(_0x3ec9f1(0x15b))/0x6+-parseInt(_0x3ec9f1(0x161))/0x7;if(_0xc8af96===_0x24ac45)break;else _0x3ec552['push'](_0x3ec552['shift']());}catch(_0x421712){_0x3ec552['push'](_0x3ec552['shift']());}}}(a41_0x3043,0x9b524));function a41_0x5eb9(_0x431b15,_0x21df64){_0x431b15=_0x431b15-0x150;const _0x30438b=a41_0x3043();let _0x5eb9dc=_0x30438b[_0x431b15];return _0x5eb9dc;}import{BaseCommand,printAuthError}from'./command.js';function a41_0x3043(){const _0x53f9ce=['✓\x20Authentication\x20successful\x0a','displayWithSources','config','2526264ACUDGy','6598248lIjWBi','User:','execute','profile','description','No\x20credential\x20found','715603YeoHgA','red','message','site','Name:','join','email','bold','tdx','jobs','✗\x20Validation\x20failed:\x20','5382195EtTtun','cli','profileSource','getUserInfo','yellow','cyan','147037idfoQu','status','session','error','last_name','3788982dOwlod','site:\x20','account_id','name','dim','first_name','2064734VRNVjR','CLI\x20flag','log','TDX_PROFILE\x20env','Read\x20credential\x20from\x20','filter'];a41_0x3043=function(){return _0x53f9ce;};return a41_0x3043();}import{resolveAPIKeyAsync}from'../core/config.js';import{HTTPClientError}from'../sdk/client/http-client.js';import{GlobalContext}from'../core/global-context.js';import a41_0x5c3b29 from'chalk';export class StatusCommand extends BaseCommand{[a41_0x214f20(0x17a)]='status';[a41_0x214f20(0x15f)]='Show\x20authentication\x20status\x20and\x20current\x20context';async[a41_0x214f20(0x15d)](_0x2d9f06){const _0x1eafbf=a41_0x214f20,{options:_0x2f13a0,tdx:_0x5f0cfc}=_0x2d9f06,_0x414878=_0x2f13a0[_0x1eafbf(0x164)],_0x1c4dff=new GlobalContext(_0x2f13a0),_0x445372=_0x1c4dff[_0x1eafbf(0x15e)],_0x116ce1=_0x1c4dff[_0x1eafbf(0x16e)],_0x4fe016=_0x116ce1===_0x1eafbf(0x16d)?_0x1eafbf(0x152):_0x116ce1===_0x1eafbf(0x174)?_0x1eafbf(0x174):_0x116ce1==='env'?_0x1eafbf(0x154):_0x116ce1==='config'?_0x1eafbf(0x159):null,_0x273843=_0x445372?a41_0x5c3b29[_0x1eafbf(0x171)](_0x445372):a41_0x5c3b29[_0x1eafbf(0x17b)]('N/A'),_0x1c0a96=_0x4fe016?'\x20'+a41_0x5c3b29['dim']('(from\x20'+_0x4fe016+')'):'';console[_0x1eafbf(0x153)](a41_0x5c3b29[_0x1eafbf(0x168)](_0x1eafbf(0x169))+'\x20profile:\x20'+_0x273843+_0x1c0a96+'\x20'+a41_0x5c3b29[_0x1eafbf(0x17b)]('(')+_0x1eafbf(0x178)+a41_0x5c3b29[_0x1eafbf(0x171)](_0x414878)+a41_0x5c3b29[_0x1eafbf(0x17b)](')'));const _0x3f35a1=await resolveAPIKeyAsync(_0x414878,_0x445372);if(_0x3f35a1){const {source:_0x7d31ae,isDeprecated:_0x1ee452}=_0x3f35a1,_0x3a5575=_0x1eafbf(0x155)+a41_0x5c3b29[_0x1eafbf(0x171)](_0x7d31ae);console['log'](_0x1ee452?a41_0x5c3b29[_0x1eafbf(0x170)](_0x3a5575):_0x3a5575);}else console[_0x1eafbf(0x153)](a41_0x5c3b29[_0x1eafbf(0x170)](_0x1eafbf(0x160)));let _0x4793eb=![];try{const _0x4674dc=await _0x5f0cfc[_0x1eafbf(0x16a)][_0x1eafbf(0x16f)]();console[_0x1eafbf(0x153)](a41_0x5c3b29['green'](_0x1eafbf(0x157))),console[_0x1eafbf(0x153)](a41_0x5c3b29[_0x1eafbf(0x168)](_0x1eafbf(0x15c))+'\x20'+a41_0x5c3b29[_0x1eafbf(0x171)](_0x4674dc[_0x1eafbf(0x167)]));if(_0x4674dc[_0x1eafbf(0x150)]||_0x4674dc['last_name']){const _0x22a220=[_0x4674dc[_0x1eafbf(0x150)],_0x4674dc[_0x1eafbf(0x176)]][_0x1eafbf(0x156)](Boolean)[_0x1eafbf(0x166)]('\x20');console[_0x1eafbf(0x153)](a41_0x5c3b29['bold'](_0x1eafbf(0x165))+'\x20'+_0x22a220);}_0x4674dc[_0x1eafbf(0x179)]&&console[_0x1eafbf(0x153)](a41_0x5c3b29['bold']('Account\x20ID:')+'\x20'+a41_0x5c3b29['yellow'](_0x4674dc[_0x1eafbf(0x179)])),_0x4793eb=!![];}catch(_0x53e4c2){_0x53e4c2 instanceof HTTPClientError&&_0x53e4c2[_0x1eafbf(0x173)]===0x191?printAuthError(_0x53e4c2,!![],_0x445372):console[_0x1eafbf(0x175)](a41_0x5c3b29[_0x1eafbf(0x162)](_0x1eafbf(0x16b)+(_0x53e4c2 instanceof Error?_0x53e4c2[_0x1eafbf(0x163)]:String(_0x53e4c2))));}return console[_0x1eafbf(0x153)](),_0x1c4dff[_0x1eafbf(0x158)](),_0x4793eb?0x0:0x1;}}
@@ -1 +1 @@
1
- const a42_0x152645=a42_0x41a2;function a42_0x41a2(_0x408fb1,_0x7fd973){_0x408fb1=_0x408fb1-0x109;const _0x2a908e=a42_0x2a90();let _0x41a250=_0x2a908e[_0x408fb1];return _0x41a250;}(function(_0x3d682f,_0x2c7d3c){const _0x1c0273=a42_0x41a2,_0xc29e60=_0x3d682f();while(!![]){try{const _0x35e0b4=parseInt(_0x1c0273(0x125))/0x1+-parseInt(_0x1c0273(0x119))/0x2*(-parseInt(_0x1c0273(0x136))/0x3)+-parseInt(_0x1c0273(0x112))/0x4+parseInt(_0x1c0273(0x11a))/0x5*(parseInt(_0x1c0273(0x11f))/0x6)+parseInt(_0x1c0273(0x11e))/0x7*(parseInt(_0x1c0273(0x12d))/0x8)+parseInt(_0x1c0273(0x10c))/0x9+-parseInt(_0x1c0273(0x11b))/0xa;if(_0x35e0b4===_0x2c7d3c)break;else _0xc29e60['push'](_0xc29e60['shift']());}catch(_0x33ddc9){_0xc29e60['push'](_0xc29e60['shift']());}}}(a42_0x2a90,0x1ee01));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_0x2a90(){const _0x3426be=['182338MMOuMT','database','\x20\x20Or:\x20\x20tdx\x20tables\x20--database\x20','\x27\x20is\x20ambiguous.','message','Table\x20pattern:\x20','Error:\x20Too\x20many\x20arguments.\x20Use\x20single\x20argument:','table','949016SGGTkY','tables','Did\x20you\x20mean\x20to\x20list\x20all\x20tables\x20from\x20database\x20\x27','✖\x20No\x20tables\x20found','includes','\x20\x20tdx\x20tables\x20\x22mydb.*\x22\x20\x20\x20\x20\x20\x20\x20\x20->\x20all\x20tables\x20from\x20mydb','Listing\x20tables...','✔\x20Found\x20','site','294891ztuhSI','length','query','listTables','2207403vLrHVj','data','description','\x20\x20Or:\x20\x20tdx\x20tables\x20--in\x20','name','Error:\x20Pattern\x20\x27','428368kbAGMH','\x27\x20across\x20all\x20databases.','error','Site:\x20','\x20\x20Cause:\x20','Database\x20pattern:\x20','\x20table','2LVOlKy','5hHtqzW','6127380xnUuUI','Error:\x20','\x20\x20Use:\x20tdx\x20tables\x20\x22','7cVUYWS','1210596YZSRJQ','Or\x20use\x20--in\x20flag:','\x20\x20tdx\x20tables\x20users\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20->\x20table\x20\x22users\x22\x20across\x20all\x20databases','\x27\x20may\x20not\x20exist\x20or\x20contains\x20no\x20tables','verbose','cause'];a42_0x2a90=function(){return _0x3426be;};return a42_0x2a90();}export class TablesCommand extends BaseCommand{[a42_0x152645(0x110)]=a42_0x152645(0x12e);[a42_0x152645(0x10e)]='List\x20tables\x20in\x20a\x20database';async['execute'](_0x45ca9f){const _0x587293=a42_0x152645,{options:_0x2eff6b,args:_0x5bb02e,tdx:_0x4cff99}=_0x45ca9f;let _0xbddd85;if(_0x5bb02e[_0x587293(0x109)]===0x0)_0xbddd85={'database':undefined,'table':undefined,'original':''};else{if(_0x5bb02e[_0x587293(0x109)]===0x1)try{_0xbddd85=parseTableReference(_0x5bb02e[0x0]);if(_0xbddd85[_0x587293(0x12c)]&&!_0xbddd85[_0x587293(0x126)]&&!_0xbddd85[_0x587293(0x12c)][_0x587293(0x131)]('*')&&!_0xbddd85[_0x587293(0x12c)][_0x587293(0x131)]('?'))return console[_0x587293(0x114)](_0x587293(0x111)+_0x5bb02e[0x0]+_0x587293(0x128)),console[_0x587293(0x114)](_0x587293(0x12f)+_0xbddd85['table']+'\x27?'),console[_0x587293(0x114)](_0x587293(0x11d)+_0xbddd85[_0x587293(0x12c)]+'.*\x22'),console[_0x587293(0x114)](_0x587293(0x10f)+_0xbddd85[_0x587293(0x12c)]),console['error'](_0x587293(0x127)+_0xbddd85[_0x587293(0x12c)]),console[_0x587293(0x114)](''),console[_0x587293(0x114)]('Note:\x20\x27'+_0x5bb02e[0x0]+'\x27\x20without\x20wildcards\x20would\x20search\x20for\x20tables\x20named\x20\x27'+_0xbddd85[_0x587293(0x12c)]+_0x587293(0x113)),0x1;}catch(_0x4aba1e){return console[_0x587293(0x114)](_0x587293(0x11c)+_0x4aba1e[_0x587293(0x129)]),0x1;}else return console['error'](_0x587293(0x12b)),console[_0x587293(0x114)](_0x587293(0x121)),console[_0x587293(0x114)](_0x587293(0x132)),console[_0x587293(0x114)]('\x20\x20tdx\x20tables\x20\x22mydb.users\x22\x20\x20\x20\x20->\x20table\x20\x22users\x22\x20in\x20database\x20mydb'),console[_0x587293(0x114)]('\x20\x20tdx\x20tables\x20\x22*.user*\x22\x20\x20\x20\x20\x20\x20\x20->\x20tables\x20matching\x20user*\x20across\x20databases'),console[_0x587293(0x114)](_0x587293(0x120)),console['error']('\x20\x20tdx\x20tables\x20--in\x20mydb\x20\x20\x20\x20\x20\x20\x20->\x20all\x20tables\x20from\x20mydb'),0x1;}const _0x576cc6=_0x2eff6b[_0x587293(0x126)];!_0xbddd85[_0x587293(0x126)]&&_0x576cc6&&(_0xbddd85[_0x587293(0x126)]=_0x576cc6);try{const _0x53e192=_0x7b457d=>_0x7b457d&&(_0x7b457d['includes']('*')||_0x7b457d[_0x587293(0x131)]('?')),_0x4ead03=_0x53e192(_0xbddd85[_0x587293(0x126)]);_0x2eff6b[_0x587293(0x123)]&&(console['error'](_0x587293(0x115)+_0x2eff6b[_0x587293(0x135)]),_0xbddd85[_0x587293(0x126)]?_0x4ead03?console[_0x587293(0x114)](_0x587293(0x117)+_0xbddd85[_0x587293(0x126)]):console[_0x587293(0x114)]('Database:\x20'+_0xbddd85[_0x587293(0x126)]):console[_0x587293(0x114)]('Database:\x20all'),_0xbddd85['table']&&console[_0x587293(0x114)](_0x587293(0x12a)+_0xbddd85['table']));const _0x43b1da=_0xbddd85['database']&&!_0x4ead03?_0xbddd85['database']:undefined,_0x381b29=_0x4ead03?_0xbddd85[_0x587293(0x126)]:undefined,_0x42c4ef=_0xbddd85[_0x587293(0x12c)],_0x11c04f=resolveLimit(_0x2eff6b['limit'],DEFAULT_LISTING_LIMIT),_0x2ef1b1=await withSpinner(_0x587293(0x133),()=>_0x4cff99[_0x587293(0x10a)][_0x587293(0x10b)](_0x43b1da,_0x42c4ef,_0x381b29,_0x11c04f),{'verbose':_0x2eff6b[_0x587293(0x123)]}),_0x1e6114=_0x2ef1b1[_0x587293(0x10d)];if(_0x1e6114[_0x587293(0x109)]===0x0&&_0xbddd85[_0x587293(0x126)]&&!_0x4ead03)return console[_0x587293(0x114)](_0x587293(0x130)),console['error']('Database\x20\x27'+_0xbddd85['database']+_0x587293(0x122)),0x1;return console['error'](_0x587293(0x134)+_0x1e6114[_0x587293(0x109)]+_0x587293(0x118)+(_0x1e6114[_0x587293(0x109)]!==0x1?'s':'')),await handleSDKOutput(_0x1e6114,{..._0x2eff6b,'limit':_0x11c04f}),0x0;}catch(_0x5de907){if(_0x5de907 instanceof SDKError)return console[_0x587293(0x114)]('Error:\x20'+_0x5de907[_0x587293(0x129)]),_0x5de907[_0x587293(0x124)]&&console[_0x587293(0x114)](_0x587293(0x116)+_0x5de907[_0x587293(0x124)]),0x1;throw _0x5de907;}}['validate'](_0x3452e6){return undefined;}}
1
+ const a42_0x68c0b5=a42_0x37b8;function a42_0x37b8(_0x34d746,_0x404c39){_0x34d746=_0x34d746-0x1a2;const _0x74ce74=a42_0x74ce();let _0x37b856=_0x74ce74[_0x34d746];return _0x37b856;}(function(_0x19c372,_0x2a1a1c){const _0x46a867=a42_0x37b8,_0x2d307a=_0x19c372();while(!![]){try{const _0x19a45c=parseInt(_0x46a867(0x1be))/0x1*(parseInt(_0x46a867(0x1c6))/0x2)+parseInt(_0x46a867(0x1af))/0x3+parseInt(_0x46a867(0x1bc))/0x4+parseInt(_0x46a867(0x1bf))/0x5+-parseInt(_0x46a867(0x1bd))/0x6*(-parseInt(_0x46a867(0x1ca))/0x7)+-parseInt(_0x46a867(0x1c1))/0x8*(-parseInt(_0x46a867(0x1a9))/0x9)+-parseInt(_0x46a867(0x1c3))/0xa;if(_0x19a45c===_0x2a1a1c)break;else _0x2d307a['push'](_0x2d307a['shift']());}catch(_0x9e384a){_0x2d307a['push'](_0x2d307a['shift']());}}}(a42_0x74ce,0x3366a));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';function a42_0x74ce(){const _0x6ecfde=['length','table','Database\x20\x27','includes','519495baOYHi','verbose','\x20\x20tdx\x20tables\x20users\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20->\x20table\x20\x22users\x22\x20across\x20all\x20databases','\x20\x20tdx\x20tables\x20--in\x20mydb\x20\x20\x20\x20\x20\x20\x20->\x20all\x20tables\x20from\x20mydb','Database:\x20all','Did\x20you\x20mean\x20to\x20list\x20all\x20tables\x20from\x20database\x20\x27','error','\x20table','Site:\x20','description','Error:\x20','List\x20tables\x20in\x20a\x20database','execute','1390232tzjKuA','6TSsZOF','50482YpGDUL','1159340xWsMpk','Table\x20pattern:\x20','72TzMRyn','\x20\x20Cause:\x20','8799990LZWFVN','.*\x22','Error:\x20Too\x20many\x20arguments.\x20Use\x20single\x20argument:','2LjBonp','name','cause','\x20\x20tdx\x20tables\x20\x22mydb.*\x22\x20\x20\x20\x20\x20\x20\x20\x20->\x20all\x20tables\x20from\x20mydb','744877wDAgJw','Error:\x20Pattern\x20\x27','listTables','✔\x20Found\x20','data','message','Note:\x20\x27','query','\x20\x20tdx\x20tables\x20\x22*.user*\x22\x20\x20\x20\x20\x20\x20\x20->\x20tables\x20matching\x20user*\x20across\x20databases','\x27\x20across\x20all\x20databases.','database','✖\x20No\x20tables\x20found','Listing\x20tables...','181053YrfVcG','\x27\x20without\x20wildcards\x20would\x20search\x20for\x20tables\x20named\x20\x27'];a42_0x74ce=function(){return _0x6ecfde;};return a42_0x74ce();}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_0x68c0b5(0x1c7)]='tables';[a42_0x68c0b5(0x1b8)]=a42_0x68c0b5(0x1ba);async[a42_0x68c0b5(0x1bb)](_0x1cec28){const _0x4cd52a=a42_0x68c0b5,{options:_0x648808,args:_0xd1a3fc,tdx:_0x428a1d}=_0x1cec28;let _0x1c7183;if(_0xd1a3fc['length']===0x0)_0x1c7183={'database':undefined,'table':undefined,'original':''};else{if(_0xd1a3fc['length']===0x1)try{_0x1c7183=parseTableReference(_0xd1a3fc[0x0]);if(_0x1c7183[_0x4cd52a(0x1ac)]&&!_0x1c7183[_0x4cd52a(0x1a6)]&&!_0x1c7183[_0x4cd52a(0x1ac)][_0x4cd52a(0x1ae)]('*')&&!_0x1c7183[_0x4cd52a(0x1ac)]['includes']('?'))return console[_0x4cd52a(0x1b5)](_0x4cd52a(0x1cb)+_0xd1a3fc[0x0]+'\x27\x20is\x20ambiguous.'),console[_0x4cd52a(0x1b5)](_0x4cd52a(0x1b4)+_0x1c7183[_0x4cd52a(0x1ac)]+'\x27?'),console[_0x4cd52a(0x1b5)]('\x20\x20Use:\x20tdx\x20tables\x20\x22'+_0x1c7183[_0x4cd52a(0x1ac)]+_0x4cd52a(0x1c4)),console[_0x4cd52a(0x1b5)]('\x20\x20Or:\x20\x20tdx\x20tables\x20--in\x20'+_0x1c7183[_0x4cd52a(0x1ac)]),console[_0x4cd52a(0x1b5)]('\x20\x20Or:\x20\x20tdx\x20tables\x20--database\x20'+_0x1c7183[_0x4cd52a(0x1ac)]),console[_0x4cd52a(0x1b5)](''),console['error'](_0x4cd52a(0x1a2)+_0xd1a3fc[0x0]+_0x4cd52a(0x1aa)+_0x1c7183['table']+_0x4cd52a(0x1a5)),0x1;}catch(_0x3f156f){return console[_0x4cd52a(0x1b5)]('Error:\x20'+_0x3f156f['message']),0x1;}else return console[_0x4cd52a(0x1b5)](_0x4cd52a(0x1c5)),console[_0x4cd52a(0x1b5)](_0x4cd52a(0x1b1)),console[_0x4cd52a(0x1b5)](_0x4cd52a(0x1c9)),console[_0x4cd52a(0x1b5)]('\x20\x20tdx\x20tables\x20\x22mydb.users\x22\x20\x20\x20\x20->\x20table\x20\x22users\x22\x20in\x20database\x20mydb'),console[_0x4cd52a(0x1b5)](_0x4cd52a(0x1a4)),console[_0x4cd52a(0x1b5)]('Or\x20use\x20--in\x20flag:'),console['error'](_0x4cd52a(0x1b2)),0x1;}const _0x1c5c18=_0x648808[_0x4cd52a(0x1a6)];!_0x1c7183['database']&&_0x1c5c18&&(_0x1c7183['database']=_0x1c5c18);try{const _0x1780e1=_0x4d08a3=>_0x4d08a3&&(_0x4d08a3['includes']('*')||_0x4d08a3[_0x4cd52a(0x1ae)]('?')),_0x5f3444=_0x1780e1(_0x1c7183['database']);_0x648808[_0x4cd52a(0x1b0)]&&(console[_0x4cd52a(0x1b5)](_0x4cd52a(0x1b7)+_0x648808['site']),_0x1c7183[_0x4cd52a(0x1a6)]?_0x5f3444?console[_0x4cd52a(0x1b5)]('Database\x20pattern:\x20'+_0x1c7183[_0x4cd52a(0x1a6)]):console[_0x4cd52a(0x1b5)]('Database:\x20'+_0x1c7183[_0x4cd52a(0x1a6)]):console[_0x4cd52a(0x1b5)](_0x4cd52a(0x1b3)),_0x1c7183[_0x4cd52a(0x1ac)]&&console[_0x4cd52a(0x1b5)](_0x4cd52a(0x1c0)+_0x1c7183['table']));const _0xf59ce3=_0x1c7183[_0x4cd52a(0x1a6)]&&!_0x5f3444?_0x1c7183[_0x4cd52a(0x1a6)]:undefined,_0x25afc8=_0x5f3444?_0x1c7183[_0x4cd52a(0x1a6)]:undefined,_0x301caf=_0x1c7183['table'],_0x4d7b6f=resolveLimit(_0x648808['limit'],DEFAULT_LISTING_LIMIT),_0x8e385e=await withSpinner(_0x4cd52a(0x1a8),()=>_0x428a1d[_0x4cd52a(0x1a3)][_0x4cd52a(0x1cc)](_0xf59ce3,_0x301caf,_0x25afc8,_0x4d7b6f),{'verbose':_0x648808['verbose']}),_0x2c22bf=_0x8e385e[_0x4cd52a(0x1ce)];if(_0x2c22bf[_0x4cd52a(0x1ab)]===0x0&&_0x1c7183[_0x4cd52a(0x1a6)]&&!_0x5f3444)return console[_0x4cd52a(0x1b5)](_0x4cd52a(0x1a7)),console[_0x4cd52a(0x1b5)](_0x4cd52a(0x1ad)+_0x1c7183[_0x4cd52a(0x1a6)]+'\x27\x20may\x20not\x20exist\x20or\x20contains\x20no\x20tables'),0x1;return console['error'](_0x4cd52a(0x1cd)+_0x2c22bf[_0x4cd52a(0x1ab)]+_0x4cd52a(0x1b6)+(_0x2c22bf[_0x4cd52a(0x1ab)]!==0x1?'s':'')),await handleSDKOutput(_0x2c22bf,{..._0x648808,'limit':_0x4d7b6f}),0x0;}catch(_0x5a1dbe){if(_0x5a1dbe instanceof SDKError)return console[_0x4cd52a(0x1b5)](_0x4cd52a(0x1b9)+_0x5a1dbe[_0x4cd52a(0x1cf)]),_0x5a1dbe['cause']&&console[_0x4cd52a(0x1b5)](_0x4cd52a(0x1c2)+_0x5a1dbe[_0x4cd52a(0x1c8)]),0x1;throw _0x5a1dbe;}}['validate'](_0xf2a9f6){return undefined;}}
@@ -1 +1 @@
1
- const a43_0x21d84f=a43_0x5345;function a43_0x5345(_0x2a8617,_0x18f5eb){_0x2a8617=_0x2a8617-0x89;const _0x38450c=a43_0x3845();let _0x5345a3=_0x38450c[_0x2a8617];return _0x5345a3;}(function(_0x1e81b4,_0x4fac38){const _0x147473=a43_0x5345,_0x2f9fb2=_0x1e81b4();while(!![]){try{const _0x4da8e9=-parseInt(_0x147473(0xb4))/0x1+-parseInt(_0x147473(0xa4))/0x2*(-parseInt(_0x147473(0xb2))/0x3)+parseInt(_0x147473(0x8e))/0x4*(parseInt(_0x147473(0x8c))/0x5)+-parseInt(_0x147473(0x93))/0x6+parseInt(_0x147473(0xb3))/0x7*(-parseInt(_0x147473(0x8f))/0x8)+-parseInt(_0x147473(0xb5))/0x9*(parseInt(_0x147473(0xa6))/0xa)+parseInt(_0x147473(0x95))/0xb;if(_0x4da8e9===_0x4fac38)break;else _0x2f9fb2['push'](_0x2f9fb2['shift']());}catch(_0x109195){_0x2f9fb2['push'](_0x2f9fb2['shift']());}}}(a43_0x3845,0xe8a7e));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_0x3845(){const _0x4e539b=['site','message','llm_agent','llm_project','tdx.json','includes','Usage:\x20tdx\x20unset\x20<resource>\x0a','Default\x20site\x20','database','\x0aUpdated:\x20','Default\x20profile\x20','error','2138lbiIpY','(session:\x20','5211190CIiMnO','green','name','.\x20Must\x20be\x20one\x20of:\x20','execute','--default\x20can\x20only\x20be\x20used\x20with\x20\x27site\x27\x20or\x20\x27profile\x27.\x20Other\x20resources\x20are\x20session-level\x20only.','default','Invalid\x20resource:\x20','log','dim','agent','engage_workspace','2991oDcVGd','4605391EmPmTB','1821898IhoSBK','9tkWKBF','profile','cleared','session','10hRqUBy','\x20\x20\x20\x20\x20\x20\x20tdx\x20unset\x20--default\x20<resource>\x20\x20#\x20Clear\x20default\x20from\x20config\x0a','3546592VUJUDO','8poAOjV','description','parent_segment','join','3731880LuMheQ','length','19104569pYWYFB','validate','\x0aResources:\x20site,\x20database,\x20parent_segment,\x20llm_project,\x20agent,\x20profile,\x20engage_workspace\x0a'];a43_0x3845=function(){return _0x4e539b;};return a43_0x3845();}import a43_0x42ea0e from'chalk';import*as a43_0x64002e from'node:path';export class UnsetCommand extends BaseCommand{[a43_0x21d84f(0xa8)]='unset';[a43_0x21d84f(0x90)]='Clear\x20session-level\x20or\x20default\x20context\x20values';[a43_0x21d84f(0x96)](_0x2c07e7){const _0x103b59=a43_0x21d84f,{args:_0x2db306,options:_0x205ae6}=_0x2c07e7,_0x3424ee=_0x205ae6[_0x103b59(0xac)];if(_0x2db306[_0x103b59(0x94)]===0x0)return _0x103b59(0x9e)+_0x103b59(0x8d)+_0x103b59(0x97)+'\x0aRun\x20\x27tdx\x20unset\x20--help\x27\x20for\x20more\x20options';const _0x4515f6=_0x2db306[0x0],_0xd9c3a2=[_0x103b59(0x98),_0x103b59(0xa0),_0x103b59(0x91),_0x103b59(0x9b),_0x103b59(0xb0),_0x103b59(0x89),'engage_workspace'];if(!_0xd9c3a2[_0x103b59(0x9d)](_0x4515f6))return _0x103b59(0xad)+_0x4515f6+_0x103b59(0xa9)+_0xd9c3a2[_0x103b59(0x92)](',\x20');if(_0x3424ee&&_0x4515f6!==_0x103b59(0x98)&&_0x4515f6!==_0x103b59(0x89))return _0x103b59(0xab);return undefined;}async[a43_0x21d84f(0xaa)](_0x1e26e5){const _0x512103=a43_0x21d84f,{args:_0x2c3a06,options:_0x4e4432}=_0x1e26e5,_0x169965=_0x4e4432[_0x512103(0xac)];cleanExpiredSessions();try{const _0x569c61=_0x2c3a06[0x0],_0x10a085=a43_0x64002e['join'](getConfigDir(),_0x512103(0x9c));if(_0x169965){if(_0x569c61==='site')return clearDefaultSiteFromUserConfig(),console[_0x512103(0xae)](_0x512103(0x9f)+a43_0x42ea0e[_0x512103(0xa7)](_0x512103(0x8a))),console[_0x512103(0xae)](a43_0x42ea0e['dim'](_0x512103(0xa1)+_0x10a085)),0x0;if(_0x569c61===_0x512103(0x89))return clearActiveProfileFromUserConfig(),console[_0x512103(0xae)](_0x512103(0xa2)+a43_0x42ea0e[_0x512103(0xa7)](_0x512103(0x8a))),console[_0x512103(0xae)](a43_0x42ea0e['dim'](_0x512103(0xa1)+_0x10a085)),0x0;}const _0x3c04b4=getSessionID(_0x4e4432['session']),_0x1b7d34={'site':_0x512103(0x98),'database':_0x512103(0xa0),'parent_segment':_0x512103(0x91),'llm_project':_0x512103(0x9b),'agent':_0x512103(0x9a),'profile':_0x512103(0x89),'engage_workspace':_0x512103(0xb1)},_0x56006f=_0x1b7d34[_0x569c61];return _0x56006f&&(clearSessionContextField(_0x56006f,_0x4e4432[_0x512103(0x8b)]),console[_0x512103(0xae)]('Session\x20'+_0x569c61+'\x20'+a43_0x42ea0e[_0x512103(0xa7)](_0x512103(0x8a))+'\x20'+a43_0x42ea0e[_0x512103(0xaf)](_0x512103(0xa5)+_0x3c04b4+')'))),0x0;}catch(_0x4c9f8a){return _0x4c9f8a instanceof Error&&console[_0x512103(0xa3)]('Error:\x20'+_0x4c9f8a[_0x512103(0x99)]),0x1;}}}
1
+ const a43_0x13e578=a43_0x2406;(function(_0x2cea99,_0x400f95){const _0x134c67=a43_0x2406,_0x87c9d7=_0x2cea99();while(!![]){try{const _0x22dfc4=-parseInt(_0x134c67(0xfb))/0x1*(-parseInt(_0x134c67(0x119))/0x2)+parseInt(_0x134c67(0x110))/0x3*(-parseInt(_0x134c67(0xfe))/0x4)+parseInt(_0x134c67(0xf1))/0x5*(parseInt(_0x134c67(0x100))/0x6)+parseInt(_0x134c67(0x107))/0x7*(-parseInt(_0x134c67(0xf8))/0x8)+-parseInt(_0x134c67(0x10f))/0x9+parseInt(_0x134c67(0x10d))/0xa+parseInt(_0x134c67(0x118))/0xb*(parseInt(_0x134c67(0x10b))/0xc);if(_0x22dfc4===_0x400f95)break;else _0x87c9d7['push'](_0x87c9d7['shift']());}catch(_0x114dc3){_0x87c9d7['push'](_0x87c9d7['shift']());}}}(a43_0x5697,0x6d963));import{BaseCommand}from'./command.js';import{getSessionID,cleanExpiredSessions,clearSessionContextField}from'../core/session.js';function a43_0x5697(){const _0x112415=['Usage:\x20tdx\x20unset\x20<resource>\x0a','parent_segment','\x0aUpdated:\x20','name','default','.\x20Must\x20be\x20one\x20of:\x20','llm_agent','53515DOIHKy','22nVqOco','cleared','2995AmUeTw','error','session','green','Default\x20site\x20','site','Session\x20','64984NbAbby','tdx.json','llm_project','63711dxuRin','database','execute','15016AehhRa','engage_workspace','138UyRiOg','log','message','includes','dim','description','agent','126KeJfWH','join','\x0aRun\x20\x27tdx\x20unset\x20--help\x27\x20for\x20more\x20options','Invalid\x20resource:\x20','1116mUEPJO','Clear\x20session-level\x20or\x20default\x20context\x20values','3320680iVWMuB','profile','7933554kZhhqU','18yRgQmT'];a43_0x5697=function(){return _0x112415;};return a43_0x5697();}import{clearDefaultSiteFromUserConfig,clearActiveProfileFromUserConfig}from'../core/profile.js';function a43_0x2406(_0x3ccbf5,_0x210ead){_0x3ccbf5=_0x3ccbf5-0xf0;const _0x569790=a43_0x5697();let _0x24068e=_0x569790[_0x3ccbf5];return _0x24068e;}import{getConfigDir}from'../core/config.js';import a43_0x3d6cd8 from'chalk';import*as a43_0x3a3503 from'node:path';export class UnsetCommand extends BaseCommand{[a43_0x13e578(0x114)]='unset';[a43_0x13e578(0x105)]=a43_0x13e578(0x10c);['validate'](_0x2df5f0){const _0x9b95fc=a43_0x13e578,{args:_0x368d41,options:_0x35aeab}=_0x2df5f0,_0x19756c=_0x35aeab[_0x9b95fc(0x115)];if(_0x368d41['length']===0x0)return _0x9b95fc(0x111)+'\x20\x20\x20\x20\x20\x20\x20tdx\x20unset\x20--default\x20<resource>\x20\x20#\x20Clear\x20default\x20from\x20config\x0a'+'\x0aResources:\x20site,\x20database,\x20parent_segment,\x20llm_project,\x20agent,\x20profile,\x20engage_workspace\x0a'+_0x9b95fc(0x109);const _0xd3cf7e=_0x368d41[0x0],_0x3d7d7c=[_0x9b95fc(0xf6),_0x9b95fc(0xfc),_0x9b95fc(0x112),'llm_project',_0x9b95fc(0x106),'profile',_0x9b95fc(0xff)];if(!_0x3d7d7c[_0x9b95fc(0x103)](_0xd3cf7e))return _0x9b95fc(0x10a)+_0xd3cf7e+_0x9b95fc(0x116)+_0x3d7d7c[_0x9b95fc(0x108)](',\x20');if(_0x19756c&&_0xd3cf7e!==_0x9b95fc(0xf6)&&_0xd3cf7e!==_0x9b95fc(0x10e))return'--default\x20can\x20only\x20be\x20used\x20with\x20\x27site\x27\x20or\x20\x27profile\x27.\x20Other\x20resources\x20are\x20session-level\x20only.';return undefined;}async[a43_0x13e578(0xfd)](_0x2a2502){const _0x459fb4=a43_0x13e578,{args:_0x351273,options:_0x15c89e}=_0x2a2502,_0x43e7fe=_0x15c89e[_0x459fb4(0x115)];cleanExpiredSessions();try{const _0x36dd9f=_0x351273[0x0],_0x141e23=a43_0x3a3503['join'](getConfigDir(),_0x459fb4(0xf9));if(_0x43e7fe){if(_0x36dd9f===_0x459fb4(0xf6))return clearDefaultSiteFromUserConfig(),console[_0x459fb4(0x101)](_0x459fb4(0xf5)+a43_0x3d6cd8['green'](_0x459fb4(0xf0))),console['log'](a43_0x3d6cd8[_0x459fb4(0x104)](_0x459fb4(0x113)+_0x141e23)),0x0;if(_0x36dd9f===_0x459fb4(0x10e))return clearActiveProfileFromUserConfig(),console['log']('Default\x20profile\x20'+a43_0x3d6cd8[_0x459fb4(0xf4)]('cleared')),console[_0x459fb4(0x101)](a43_0x3d6cd8['dim']('\x0aUpdated:\x20'+_0x141e23)),0x0;}const _0xdb7785=getSessionID(_0x15c89e[_0x459fb4(0xf3)]),_0x3b0d91={'site':'site','database':'database','parent_segment':'parent_segment','llm_project':_0x459fb4(0xfa),'agent':_0x459fb4(0x117),'profile':_0x459fb4(0x10e),'engage_workspace':_0x459fb4(0xff)},_0x34f614=_0x3b0d91[_0x36dd9f];return _0x34f614&&(clearSessionContextField(_0x34f614,_0x15c89e[_0x459fb4(0xf3)]),console[_0x459fb4(0x101)](_0x459fb4(0xf7)+_0x36dd9f+'\x20'+a43_0x3d6cd8[_0x459fb4(0xf4)](_0x459fb4(0xf0))+'\x20'+a43_0x3d6cd8[_0x459fb4(0x104)]('(session:\x20'+_0xdb7785+')'))),0x0;}catch(_0x385ace){return _0x385ace instanceof Error&&console[_0x459fb4(0xf2)]('Error:\x20'+_0x385ace[_0x459fb4(0x102)]),0x1;}}}
@@ -1 +1 @@
1
- const a44_0x13f190=a44_0x4a3d;(function(_0x509ba1,_0x10baf3){const _0x158c03=a44_0x4a3d,_0x30b2dc=_0x509ba1();while(!![]){try{const _0x3b9a47=-parseInt(_0x158c03(0x138))/0x1*(parseInt(_0x158c03(0x15f))/0x2)+-parseInt(_0x158c03(0x17e))/0x3*(parseInt(_0x158c03(0x139))/0x4)+parseInt(_0x158c03(0x130))/0x5*(-parseInt(_0x158c03(0x14b))/0x6)+parseInt(_0x158c03(0x148))/0x7*(-parseInt(_0x158c03(0x176))/0x8)+parseInt(_0x158c03(0x173))/0x9+-parseInt(_0x158c03(0x164))/0xa+parseInt(_0x158c03(0x170))/0xb*(parseInt(_0x158c03(0x15c))/0xc);if(_0x3b9a47===_0x10baf3)break;else _0x30b2dc['push'](_0x30b2dc['shift']());}catch(_0x41372b){_0x30b2dc['push'](_0x30b2dc['shift']());}}}(a44_0x34d7,0x5aeed));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';function a44_0x4a3d(_0x18c1c0,_0x4c98f4){_0x18c1c0=_0x18c1c0-0x12e;const _0x34d7e9=a44_0x34d7();let _0x4a3d39=_0x34d7e9[_0x18c1c0];return _0x4a3d39;}import{SDKError,ErrorCode}from'../sdk/errors.js';import{withSpinner}from'../utils/spinner.js';import a44_0x1580fb from'chalk';function a44_0x34d7(){const _0x1851ed=['\x0aSaved\x20to:\x20','tdx.json','agent','log','12VFvdlm','tdx','\x0aSet\x20context:\x20tdx\x20use\x20<resource>\x20<value>','16246whLLLD','profile','Install\x20the\x20latest\x20next\x20version:\x20npm\x20install\x20-g\x20@treasuredata/tdx@next','Session\x20context\x20','\x0aUse\x20\x27tdx\x20profiles\x27\x20to\x20see\x20available\x20profiles','2106810flQYCf','\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20--clear\x20\x20\x20\x20\x20\x20#\x20Clear\x20session\x20context\x0a','name','Set\x20session-level\x20context','Error:\x20Profile\x20\x27','engage_workspace','\x0aTip:\x20Use\x20\x27tdx\x20use\x20--default\x20site\x20','Use\x20--default\x20with\x20site,\x20profile,\x20or\x20release_channel\x20to\x20save\x20permanently','debug','\x0aResources:\x20site,\x20database,\x20parent_segment,\x20llm_project,\x20agent,\x20profile,\x20engage_workspace,\x20release_channel\x0a','engage','Default\x20profile\x20set\x20to:\x20','21480107VZOtqi','release_channel','dim','2160288khMIrq','release_channel\x20requires\x20--default.\x20Usage:\x20tdx\x20use\x20--default\x20release_channel\x20<stable|next>','\x27...','7784FYDWhH','llm_project','Error:\x20','Session\x20parent_segment\x20set\x20to:\x20','Release\x20channel\x20set\x20to:\x20','site','--default\x20can\x20only\x20be\x20used\x20with\x20\x27site\x27,\x20\x27profile\x27,\x20or\x20\x27release_channel\x27.\x20Other\x20resources\x20are\x20session-level\x20only.','clear','3dlNDkN','.\x20Must\x20be\x20one\x20of:\x20','green','database','\x0aTip:\x20Use\x20\x27tdx\x20use\x20--clear\x27\x20to\x20clear\x20session\x20overrides','\x0aUpdate\x20notifications\x20will\x20now\x20check\x20the\x20@next\x20channel.','145NacCjD','\x0aUpdate\x20notifications\x20will\x20check\x20the\x20@latest\x20(stable)\x20channel.','join','Default\x20site\x20set\x20to:\x20','Session\x20profile\x20set\x20to:\x20','NOT_FOUND','displayWithSources','validate','37BMLaCr','2493688BNCpko','next','\x27\x20does\x20not\x20exist','Session\x20agent\x20set\x20to:\x20','Verifying\x20workspace\x20\x27','Invalid\x20release\x20channel:\x20','includes','message','\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20--default\x20release_channel\x20<stable|next>\x20\x20#\x20Set\x20release\x20channel\x0a','Session\x20database\x20set\x20to:\x20','session','(session:\x20','description','llm_agent','error','371EBOXML','code','\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20--default\x20profile\x20<value>\x20\x20#\x20Save\x20default\x20profile\x20to\x20config\x0a','131190aROPbL','\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','length','stable','\x0aTip:\x20Use\x20\x27tdx\x20use\x20--default\x20profile\x20','.\x20Must\x20be\x20\x27stable\x27\x20or\x20\x27next\x27.','parent_segment','Session\x20site\x20set\x20to:\x20','INVALID_ARGUMENT','\x27\x20to\x20save\x20permanently','\x0aUse\x20\x27tdx\x20engage\x20workspace\x20list\x27\x20to\x20see\x20available\x20workspaces','Session\x20engage_workspace\x20set\x20to:\x20','execute'];a44_0x34d7=function(){return _0x1851ed;};return a44_0x34d7();}import*as a44_0x1c40ea from'node:path';export class UseCommand extends BaseCommand{[a44_0x13f190(0x166)]='use';[a44_0x13f190(0x145)]=a44_0x13f190(0x167);[a44_0x13f190(0x137)](_0x75427f){const _0x2d56df=a44_0x13f190,{args:_0x31fae3,options:_0x51f410}=_0x75427f,_0x2f63c8=_0x51f410['default'];if(_0x31fae3[_0x2d56df(0x14d)]===0x0)return undefined;if(_0x31fae3[_0x2d56df(0x14d)]===0x1)return'Usage:\x20tdx\x20use\x20<resource>\x20<value>\x0a'+_0x2d56df(0x14c)+_0x2d56df(0x165)+'\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20--default\x20site\x20<value>\x20\x20\x20\x20\x20#\x20Save\x20default\x20site\x20to\x20config\x0a'+_0x2d56df(0x14a)+_0x2d56df(0x141)+_0x2d56df(0x16d)+'\x0aRun\x20\x27tdx\x20use\x20--help\x27\x20for\x20more\x20options';const _0x30a191=_0x31fae3[0x0],_0xc3e1b3=['site',_0x2d56df(0x181),'parent_segment',_0x2d56df(0x177),_0x2d56df(0x15a),_0x2d56df(0x160),_0x2d56df(0x169),_0x2d56df(0x171)];if(!_0xc3e1b3[_0x2d56df(0x13f)](_0x30a191))return'Invalid\x20resource:\x20'+_0x30a191+_0x2d56df(0x17f)+_0xc3e1b3['join'](',\x20');if(_0x2f63c8&&_0x30a191!==_0x2d56df(0x17b)&&_0x30a191!==_0x2d56df(0x160)&&_0x30a191!==_0x2d56df(0x171))return _0x2d56df(0x17c);if(_0x30a191===_0x2d56df(0x171)&&!_0x2f63c8)return _0x2d56df(0x174);if(_0x30a191===_0x2d56df(0x171)){const _0x75e158=_0x31fae3[0x1];if(_0x75e158!==_0x2d56df(0x14e)&&_0x75e158!==_0x2d56df(0x13a))return _0x2d56df(0x13e)+_0x75e158+_0x2d56df(0x150);}return undefined;}async[a44_0x13f190(0x157)](_0x580337){const _0x1c3a42=a44_0x13f190,{args:_0x4483ec,options:_0x30ccee}=_0x580337,_0x515e71=_0x30ccee[_0x1c3a42(0x16c)],_0x23d20d=_0x30ccee[_0x1c3a42(0x17d)],_0x1e674a=_0x30ccee['default'];cleanExpiredSessions();try{if(_0x23d20d){clearSessionContext(_0x30ccee[_0x1c3a42(0x143)]);const _0x1e5348=getSessionID(_0x30ccee['session']);return console[_0x1c3a42(0x15b)](_0x1c3a42(0x162)+a44_0x1580fb['green']('cleared')+'\x20'+a44_0x1580fb[_0x1c3a42(0x172)](_0x1c3a42(0x144)+_0x1e5348+')')),0x0;}if(_0x4483ec[_0x1c3a42(0x14d)]===0x0){const _0x34e311=new GlobalContext(_0x30ccee);return _0x515e71?_0x34e311[_0x1c3a42(0x136)]():_0x34e311['display'](),console[_0x1c3a42(0x15b)](a44_0x1580fb[_0x1c3a42(0x172)](_0x1c3a42(0x15e))),console[_0x1c3a42(0x15b)](a44_0x1580fb['dim']('Resources:\x20site,\x20database,\x20parent_segment,\x20llm_project,\x20agent,\x20profile,\x20engage_workspace,\x20release_channel')),console[_0x1c3a42(0x15b)](a44_0x1580fb[_0x1c3a42(0x172)](_0x1c3a42(0x16b))),0x0;}const _0x30673c=_0x4483ec[0x0],_0x5160a9=_0x4483ec[0x1],_0x5e125e=a44_0x1c40ea[_0x1c3a42(0x132)](getConfigDir(),_0x1c3a42(0x159));if(_0x1e674a){if(_0x30673c===_0x1c3a42(0x17b))return saveDefaultSiteToUserConfig(_0x5160a9),console[_0x1c3a42(0x15b)](_0x1c3a42(0x133)+a44_0x1580fb[_0x1c3a42(0x180)](_0x5160a9)),console['log'](a44_0x1580fb['dim'](_0x1c3a42(0x158)+_0x5e125e)),0x0;if(_0x30673c===_0x1c3a42(0x160)){if(!profileExists(_0x5160a9))return console[_0x1c3a42(0x147)](_0x1c3a42(0x168)+_0x5160a9+'\x27\x20does\x20not\x20exist'),console['error'](_0x1c3a42(0x163)),0x1;return saveActiveProfileToUserConfig(_0x5160a9),console[_0x1c3a42(0x15b)](_0x1c3a42(0x16f)+a44_0x1580fb[_0x1c3a42(0x180)](_0x5160a9)),console['log'](a44_0x1580fb[_0x1c3a42(0x172)]('\x0aSaved\x20to:\x20'+_0x5e125e)),0x0;}if(_0x30673c===_0x1c3a42(0x171))return saveReleaseChannel(_0x5160a9),console[_0x1c3a42(0x15b)](_0x1c3a42(0x17a)+a44_0x1580fb[_0x1c3a42(0x180)](_0x5160a9)),console[_0x1c3a42(0x15b)](a44_0x1580fb['dim']('\x0aSaved\x20to:\x20'+_0x5e125e)),_0x5160a9===_0x1c3a42(0x13a)?(console[_0x1c3a42(0x15b)](a44_0x1580fb['dim'](_0x1c3a42(0x12f))),console[_0x1c3a42(0x15b)](a44_0x1580fb[_0x1c3a42(0x172)](_0x1c3a42(0x161)))):console[_0x1c3a42(0x15b)](a44_0x1580fb['dim'](_0x1c3a42(0x131))),0x0;}if(_0x30673c==='site'){const _0x380a73=getSessionID(_0x30ccee[_0x1c3a42(0x143)]);return saveSessionContext({'site':_0x5160a9},_0x30ccee['session']),console['log'](_0x1c3a42(0x152)+a44_0x1580fb[_0x1c3a42(0x180)](_0x5160a9)+'\x20'+a44_0x1580fb['dim'](_0x1c3a42(0x144)+_0x380a73+')')),console['log'](a44_0x1580fb[_0x1c3a42(0x172)](_0x1c3a42(0x16a)+_0x5160a9+_0x1c3a42(0x154))),0x0;}if(_0x30673c===_0x1c3a42(0x160)){if(!profileExists(_0x5160a9))return console['error'](_0x1c3a42(0x168)+_0x5160a9+_0x1c3a42(0x13b)),console[_0x1c3a42(0x147)]('\x0aUse\x20\x27tdx\x20profiles\x27\x20to\x20see\x20available\x20profiles'),0x1;const _0x6d6d0c=getSessionID(_0x30ccee['session']);return saveSessionContext({'profile':_0x5160a9},_0x30ccee[_0x1c3a42(0x143)]),console[_0x1c3a42(0x15b)](_0x1c3a42(0x134)+a44_0x1580fb['green'](_0x5160a9)+'\x20'+a44_0x1580fb[_0x1c3a42(0x172)](_0x1c3a42(0x144)+_0x6d6d0c+')')),console['log'](a44_0x1580fb['dim'](_0x1c3a42(0x14f)+_0x5160a9+_0x1c3a42(0x154))),0x0;}const _0x532e04={},_0x59d113=getSessionID(_0x30ccee[_0x1c3a42(0x143)]);switch(_0x30673c){case _0x1c3a42(0x181):_0x532e04[_0x1c3a42(0x181)]=_0x5160a9,console[_0x1c3a42(0x15b)](_0x1c3a42(0x142)+a44_0x1580fb[_0x1c3a42(0x180)](_0x5160a9)+'\x20'+a44_0x1580fb[_0x1c3a42(0x172)](_0x1c3a42(0x144)+_0x59d113+')'));break;case _0x1c3a42(0x151):_0x532e04[_0x1c3a42(0x151)]=_0x5160a9,console[_0x1c3a42(0x15b)](_0x1c3a42(0x179)+a44_0x1580fb[_0x1c3a42(0x180)](_0x5160a9)+'\x20'+a44_0x1580fb[_0x1c3a42(0x172)](_0x1c3a42(0x144)+_0x59d113+')'));break;case'llm_project':_0x532e04[_0x1c3a42(0x177)]=_0x5160a9,console[_0x1c3a42(0x15b)]('Session\x20llm_project\x20set\x20to:\x20'+a44_0x1580fb[_0x1c3a42(0x180)](_0x5160a9)+'\x20'+a44_0x1580fb[_0x1c3a42(0x172)](_0x1c3a42(0x144)+_0x59d113+')'));break;case _0x1c3a42(0x15a):{const {projectName:_0x35a673,agentName:_0x3e794b}=parseAgentRef(_0x5160a9);_0x3e794b?(_0x532e04[_0x1c3a42(0x177)]=_0x35a673,_0x532e04['llm_agent']=_0x3e794b,console[_0x1c3a42(0x15b)]('Session\x20llm_project\x20set\x20to:\x20'+a44_0x1580fb['green'](_0x35a673)+'\x20'+a44_0x1580fb[_0x1c3a42(0x172)](_0x1c3a42(0x144)+_0x59d113+')')),console[_0x1c3a42(0x15b)](_0x1c3a42(0x13c)+a44_0x1580fb[_0x1c3a42(0x180)](_0x3e794b)+'\x20'+a44_0x1580fb[_0x1c3a42(0x172)](_0x1c3a42(0x144)+_0x59d113+')'))):(_0x532e04[_0x1c3a42(0x146)]=_0x5160a9,console['log'](_0x1c3a42(0x13c)+a44_0x1580fb['green'](_0x5160a9)+'\x20'+a44_0x1580fb[_0x1c3a42(0x172)](_0x1c3a42(0x144)+_0x59d113+')')));break;}case _0x1c3a42(0x169):{try{await withSpinner(_0x1c3a42(0x13d)+_0x5160a9+_0x1c3a42(0x175),()=>_0x580337[_0x1c3a42(0x15d)][_0x1c3a42(0x16e)]['resolveWorkspaceId'](_0x5160a9));}catch(_0xc4317f){if(_0xc4317f instanceof SDKError&&(_0xc4317f[_0x1c3a42(0x149)]===ErrorCode[_0x1c3a42(0x135)]||_0xc4317f['code']===ErrorCode[_0x1c3a42(0x153)]))return console[_0x1c3a42(0x147)](_0x1c3a42(0x178)+_0xc4317f[_0x1c3a42(0x140)]),console[_0x1c3a42(0x147)](_0x1c3a42(0x155)),0x1;throw _0xc4317f;}_0x532e04[_0x1c3a42(0x169)]=_0x5160a9,console['log'](_0x1c3a42(0x156)+a44_0x1580fb[_0x1c3a42(0x180)](_0x5160a9)+'\x20'+a44_0x1580fb['dim'](_0x1c3a42(0x144)+_0x59d113+')'));break;}}return saveSessionContext(_0x532e04,_0x30ccee[_0x1c3a42(0x143)]),console[_0x1c3a42(0x15b)](a44_0x1580fb[_0x1c3a42(0x172)](_0x1c3a42(0x12e))),0x0;}catch(_0x11976e){return _0x11976e instanceof Error&&console[_0x1c3a42(0x147)]('Error:\x20'+_0x11976e[_0x1c3a42(0x140)]),0x1;}}}
1
+ function a44_0x4ed1(){const _0x3ecd46=['Error:\x20Profile\x20\x27','174pOtKlh','\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','--default\x20can\x20only\x20be\x20used\x20with\x20\x27site\x27,\x20\x27profile\x27,\x20or\x20\x27release_channel\x27.\x20Other\x20resources\x20are\x20session-level\x20only.','parent_segment','session','Set\x20session-level\x20context','Session\x20site\x20set\x20to:\x20','profile','.\x20Must\x20be\x20\x27stable\x27\x20or\x20\x27next\x27.','use','stable','\x0aUse\x20\x27tdx\x20engage\x20workspace\x20list\x27\x20to\x20see\x20available\x20workspaces','engage_workspace','log','\x0aResources:\x20site,\x20database,\x20parent_segment,\x20llm_project,\x20agent,\x20profile,\x20engage_workspace,\x20release_channel\x0a','debug','displayWithSources','Session\x20engage_workspace\x20set\x20to:\x20','178796fqHdWG','3FgvOuA','llm_agent','Verifying\x20workspace\x20\x27','(session:\x20','Default\x20profile\x20set\x20to:\x20','execute','Session\x20agent\x20set\x20to:\x20','NOT_FOUND','98098DvIZLw','length','9734210IApNMP','tdx.json','1063966PwwMxN','\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20--default\x20release_channel\x20<stable|next>\x20\x20#\x20Set\x20release\x20channel\x0a','join','dim','\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20--default\x20profile\x20<value>\x20\x20#\x20Save\x20default\x20profile\x20to\x20config\x0a','INVALID_ARGUMENT','next','Invalid\x20release\x20channel:\x20','.\x20Must\x20be\x20one\x20of:\x20','Usage:\x20tdx\x20use\x20<resource>\x20<value>\x0a','default','site','\x0aSaved\x20to:\x20','error','\x0aTip:\x20Use\x20\x27tdx\x20use\x20--default\x20profile\x20','includes','Session\x20profile\x20set\x20to:\x20','\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20--clear\x20\x20\x20\x20\x20\x20#\x20Clear\x20session\x20context\x0a','description','clear','release_channel\x20requires\x20--default.\x20Usage:\x20tdx\x20use\x20--default\x20release_channel\x20<stable|next>','\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20--default\x20site\x20<value>\x20\x20\x20\x20\x20#\x20Save\x20default\x20site\x20to\x20config\x0a','5434200MHXOns','\x27\x20to\x20save\x20permanently','\x27\x20does\x20not\x20exist','tdx','llm_project','validate','Release\x20channel\x20set\x20to:\x20','\x0aSet\x20context:\x20tdx\x20use\x20<resource>\x20<value>','Session\x20database\x20set\x20to:\x20','database','code','release_channel','25mPEgxY','resolveWorkspaceId','Error:\x20','\x0aUpdate\x20notifications\x20will\x20check\x20the\x20@latest\x20(stable)\x20channel.','\x0aTip:\x20Use\x20\x27tdx\x20use\x20--clear\x27\x20to\x20clear\x20session\x20overrides','green','1925649nOphTz','\x0aUse\x20\x27tdx\x20profiles\x27\x20to\x20see\x20available\x20profiles','422188eGYYId','Install\x20the\x20latest\x20next\x20version:\x20npm\x20install\x20-g\x20@treasuredata/tdx@next','\x0aRun\x20\x27tdx\x20use\x20--help\x27\x20for\x20more\x20options','Session\x20parent_segment\x20set\x20to:\x20','message'];a44_0x4ed1=function(){return _0x3ecd46;};return a44_0x4ed1();}const a44_0x47178e=a44_0x14c4;function a44_0x14c4(_0x15925e,_0x53d5fa){_0x15925e=_0x15925e-0x1c9;const _0x4ed17c=a44_0x4ed1();let _0x14c4f9=_0x4ed17c[_0x15925e];return _0x14c4f9;}(function(_0x4fb93d,_0xd3b395){const _0x5a7719=a44_0x14c4,_0x1f204d=_0x4fb93d();while(!![]){try{const _0xe25f24=-parseInt(_0x5a7719(0x1df))/0x1+parseInt(_0x5a7719(0x204))/0x2*(parseInt(_0x5a7719(0x1f8))/0x3)+-parseInt(_0x5a7719(0x1f7))/0x4*(parseInt(_0x5a7719(0x1d7))/0x5)+-parseInt(_0x5a7719(0x1e5))/0x6*(-parseInt(_0x5a7719(0x200))/0x7)+-parseInt(_0x5a7719(0x1cb))/0x8+-parseInt(_0x5a7719(0x1dd))/0x9+parseInt(_0x5a7719(0x202))/0xa;if(_0xe25f24===_0xd3b395)break;else _0x1f204d['push'](_0x1f204d['shift']());}catch(_0x5db2ce){_0x1f204d['push'](_0x1f204d['shift']());}}}(a44_0x4ed1,0x5b09b));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';import{withSpinner}from'../utils/spinner.js';import a44_0x1609b1 from'chalk';import*as a44_0x33fa70 from'node:path';export class UseCommand extends BaseCommand{['name']=a44_0x47178e(0x1ee);[a44_0x47178e(0x216)]=a44_0x47178e(0x1ea);[a44_0x47178e(0x1d0)](_0x46203a){const _0x5e0c99=a44_0x47178e,{args:_0x54aa8e,options:_0x182057}=_0x46203a,_0x240033=_0x182057[_0x5e0c99(0x20e)];if(_0x54aa8e[_0x5e0c99(0x201)]===0x0)return undefined;if(_0x54aa8e['length']===0x1)return _0x5e0c99(0x20d)+_0x5e0c99(0x1e6)+_0x5e0c99(0x215)+_0x5e0c99(0x1ca)+_0x5e0c99(0x208)+_0x5e0c99(0x205)+_0x5e0c99(0x1f3)+_0x5e0c99(0x1e1);const _0x3d044b=_0x54aa8e[0x0],_0x1a3b38=[_0x5e0c99(0x20f),_0x5e0c99(0x1d4),_0x5e0c99(0x1e8),'llm_project','agent','profile',_0x5e0c99(0x1f1),'release_channel'];if(!_0x1a3b38[_0x5e0c99(0x213)](_0x3d044b))return'Invalid\x20resource:\x20'+_0x3d044b+_0x5e0c99(0x20c)+_0x1a3b38['join'](',\x20');if(_0x240033&&_0x3d044b!==_0x5e0c99(0x20f)&&_0x3d044b!==_0x5e0c99(0x1ec)&&_0x3d044b!==_0x5e0c99(0x1d6))return _0x5e0c99(0x1e7);if(_0x3d044b===_0x5e0c99(0x1d6)&&!_0x240033)return _0x5e0c99(0x1c9);if(_0x3d044b===_0x5e0c99(0x1d6)){const _0x51b351=_0x54aa8e[0x1];if(_0x51b351!==_0x5e0c99(0x1ef)&&_0x51b351!==_0x5e0c99(0x20a))return _0x5e0c99(0x20b)+_0x51b351+_0x5e0c99(0x1ed);}return undefined;}async[a44_0x47178e(0x1fd)](_0x2bedb8){const _0x537950=a44_0x47178e,{args:_0x402189,options:_0x211370}=_0x2bedb8,_0x20f1fc=_0x211370[_0x537950(0x1f4)],_0x1c5ec8=_0x211370[_0x537950(0x217)],_0x42a167=_0x211370[_0x537950(0x20e)];cleanExpiredSessions();try{if(_0x1c5ec8){clearSessionContext(_0x211370['session']);const _0x5964b5=getSessionID(_0x211370[_0x537950(0x1e9)]);return console['log']('Session\x20context\x20'+a44_0x1609b1[_0x537950(0x1dc)]('cleared')+'\x20'+a44_0x1609b1[_0x537950(0x207)](_0x537950(0x1fb)+_0x5964b5+')')),0x0;}if(_0x402189[_0x537950(0x201)]===0x0){const _0x3380f6=new GlobalContext(_0x211370);return _0x20f1fc?_0x3380f6[_0x537950(0x1f5)]():_0x3380f6['display'](),console[_0x537950(0x1f2)](a44_0x1609b1[_0x537950(0x207)](_0x537950(0x1d2))),console[_0x537950(0x1f2)](a44_0x1609b1['dim']('Resources:\x20site,\x20database,\x20parent_segment,\x20llm_project,\x20agent,\x20profile,\x20engage_workspace,\x20release_channel')),console[_0x537950(0x1f2)](a44_0x1609b1[_0x537950(0x207)]('Use\x20--default\x20with\x20site,\x20profile,\x20or\x20release_channel\x20to\x20save\x20permanently')),0x0;}const _0x323a92=_0x402189[0x0],_0x102b55=_0x402189[0x1],_0x388579=a44_0x33fa70[_0x537950(0x206)](getConfigDir(),_0x537950(0x203));if(_0x42a167){if(_0x323a92===_0x537950(0x20f))return saveDefaultSiteToUserConfig(_0x102b55),console['log']('Default\x20site\x20set\x20to:\x20'+a44_0x1609b1[_0x537950(0x1dc)](_0x102b55)),console[_0x537950(0x1f2)](a44_0x1609b1[_0x537950(0x207)]('\x0aSaved\x20to:\x20'+_0x388579)),0x0;if(_0x323a92===_0x537950(0x1ec)){if(!profileExists(_0x102b55))return console['error'](_0x537950(0x1e4)+_0x102b55+_0x537950(0x1cd)),console[_0x537950(0x211)](_0x537950(0x1de)),0x1;return saveActiveProfileToUserConfig(_0x102b55),console[_0x537950(0x1f2)](_0x537950(0x1fc)+a44_0x1609b1['green'](_0x102b55)),console[_0x537950(0x1f2)](a44_0x1609b1[_0x537950(0x207)](_0x537950(0x210)+_0x388579)),0x0;}if(_0x323a92===_0x537950(0x1d6))return saveReleaseChannel(_0x102b55),console[_0x537950(0x1f2)](_0x537950(0x1d1)+a44_0x1609b1[_0x537950(0x1dc)](_0x102b55)),console[_0x537950(0x1f2)](a44_0x1609b1[_0x537950(0x207)](_0x537950(0x210)+_0x388579)),_0x102b55===_0x537950(0x20a)?(console[_0x537950(0x1f2)](a44_0x1609b1['dim']('\x0aUpdate\x20notifications\x20will\x20now\x20check\x20the\x20@next\x20channel.')),console[_0x537950(0x1f2)](a44_0x1609b1['dim'](_0x537950(0x1e0)))):console[_0x537950(0x1f2)](a44_0x1609b1[_0x537950(0x207)](_0x537950(0x1da))),0x0;}if(_0x323a92===_0x537950(0x20f)){const _0xc667da=getSessionID(_0x211370[_0x537950(0x1e9)]);return saveSessionContext({'site':_0x102b55},_0x211370['session']),console[_0x537950(0x1f2)](_0x537950(0x1eb)+a44_0x1609b1['green'](_0x102b55)+'\x20'+a44_0x1609b1['dim'](_0x537950(0x1fb)+_0xc667da+')')),console[_0x537950(0x1f2)](a44_0x1609b1['dim']('\x0aTip:\x20Use\x20\x27tdx\x20use\x20--default\x20site\x20'+_0x102b55+_0x537950(0x1cc))),0x0;}if(_0x323a92===_0x537950(0x1ec)){if(!profileExists(_0x102b55))return console[_0x537950(0x211)](_0x537950(0x1e4)+_0x102b55+_0x537950(0x1cd)),console[_0x537950(0x211)](_0x537950(0x1de)),0x1;const _0x1ba244=getSessionID(_0x211370[_0x537950(0x1e9)]);return saveSessionContext({'profile':_0x102b55},_0x211370[_0x537950(0x1e9)]),console[_0x537950(0x1f2)](_0x537950(0x214)+a44_0x1609b1['green'](_0x102b55)+'\x20'+a44_0x1609b1['dim'](_0x537950(0x1fb)+_0x1ba244+')')),console[_0x537950(0x1f2)](a44_0x1609b1[_0x537950(0x207)](_0x537950(0x212)+_0x102b55+_0x537950(0x1cc))),0x0;}const _0x42b932={},_0x11e677=getSessionID(_0x211370[_0x537950(0x1e9)]);switch(_0x323a92){case _0x537950(0x1d4):_0x42b932[_0x537950(0x1d4)]=_0x102b55,console[_0x537950(0x1f2)](_0x537950(0x1d3)+a44_0x1609b1[_0x537950(0x1dc)](_0x102b55)+'\x20'+a44_0x1609b1[_0x537950(0x207)]('(session:\x20'+_0x11e677+')'));break;case _0x537950(0x1e8):_0x42b932[_0x537950(0x1e8)]=_0x102b55,console['log'](_0x537950(0x1e2)+a44_0x1609b1['green'](_0x102b55)+'\x20'+a44_0x1609b1[_0x537950(0x207)](_0x537950(0x1fb)+_0x11e677+')'));break;case _0x537950(0x1cf):_0x42b932['llm_project']=_0x102b55,console[_0x537950(0x1f2)]('Session\x20llm_project\x20set\x20to:\x20'+a44_0x1609b1['green'](_0x102b55)+'\x20'+a44_0x1609b1['dim'](_0x537950(0x1fb)+_0x11e677+')'));break;case'agent':{const {projectName:_0x473e28,agentName:_0x319ac4}=parseAgentRef(_0x102b55);_0x319ac4?(_0x42b932['llm_project']=_0x473e28,_0x42b932[_0x537950(0x1f9)]=_0x319ac4,console[_0x537950(0x1f2)]('Session\x20llm_project\x20set\x20to:\x20'+a44_0x1609b1['green'](_0x473e28)+'\x20'+a44_0x1609b1[_0x537950(0x207)](_0x537950(0x1fb)+_0x11e677+')')),console['log'](_0x537950(0x1fe)+a44_0x1609b1[_0x537950(0x1dc)](_0x319ac4)+'\x20'+a44_0x1609b1[_0x537950(0x207)](_0x537950(0x1fb)+_0x11e677+')'))):(_0x42b932[_0x537950(0x1f9)]=_0x102b55,console[_0x537950(0x1f2)]('Session\x20agent\x20set\x20to:\x20'+a44_0x1609b1['green'](_0x102b55)+'\x20'+a44_0x1609b1[_0x537950(0x207)](_0x537950(0x1fb)+_0x11e677+')')));break;}case _0x537950(0x1f1):{try{await withSpinner(_0x537950(0x1fa)+_0x102b55+'\x27...',()=>_0x2bedb8[_0x537950(0x1ce)]['engage'][_0x537950(0x1d8)](_0x102b55));}catch(_0x41a202){if(_0x41a202 instanceof SDKError&&(_0x41a202[_0x537950(0x1d5)]===ErrorCode[_0x537950(0x1ff)]||_0x41a202['code']===ErrorCode[_0x537950(0x209)]))return console[_0x537950(0x211)](_0x537950(0x1d9)+_0x41a202['message']),console[_0x537950(0x211)](_0x537950(0x1f0)),0x1;throw _0x41a202;}_0x42b932['engage_workspace']=_0x102b55,console[_0x537950(0x1f2)](_0x537950(0x1f6)+a44_0x1609b1[_0x537950(0x1dc)](_0x102b55)+'\x20'+a44_0x1609b1[_0x537950(0x207)](_0x537950(0x1fb)+_0x11e677+')'));break;}}return saveSessionContext(_0x42b932,_0x211370['session']),console[_0x537950(0x1f2)](a44_0x1609b1[_0x537950(0x207)](_0x537950(0x1db))),0x0;}catch(_0x2a18d2){return _0x2a18d2 instanceof Error&&console[_0x537950(0x211)](_0x537950(0x1d9)+_0x2a18d2[_0x537950(0x1e3)]),0x1;}}}
@@ -1 +1 @@
1
- const a45_0x3b9456=a45_0x1650;(function(_0x42d01f,_0x4f1b66){const _0x135806=a45_0x1650,_0x4aea55=_0x42d01f();while(!![]){try{const _0x421d2c=-parseInt(_0x135806(0x161))/0x1*(parseInt(_0x135806(0x154))/0x2)+parseInt(_0x135806(0x159))/0x3+parseInt(_0x135806(0x15c))/0x4*(parseInt(_0x135806(0x15b))/0x5)+-parseInt(_0x135806(0x147))/0x6+parseInt(_0x135806(0x153))/0x7+-parseInt(_0x135806(0x14d))/0x8*(parseInt(_0x135806(0x14a))/0x9)+parseInt(_0x135806(0x155))/0xa;if(_0x421d2c===_0x4f1b66)break;else _0x4aea55['push'](_0x4aea55['shift']());}catch(_0x5609ae){_0x4aea55['push'](_0x4aea55['shift']());}}}(a45_0x4669,0xcb24d));import{BaseCommand}from'./command.js';function a45_0x1650(_0x349177,_0x4239fc){_0x349177=_0x349177-0x147;const _0x466900=a45_0x4669();let _0x1650e4=_0x466900[_0x349177];return _0x1650e4;}import{SDKError}from'../sdk/index.js';import{handleSDKOutput,handleSingleObjectOutput}from'../core/command-output.js';function a45_0x4669(){const _0x1038e1=['\x20user','7981015JuPcea','1986962mxybhQ','14706710bEJKYd','Show\x20current\x20user\x20information','execute','name','1105803ZSnrFq','data','66440rQfYoM','268bjqPVr','\x20\x20Cause:\x20','verbose','getCurrent','length','1rgMPTb','6162768nSvUjv','Error:\x20','Fetching\x20user\x20info...','3051081gcHvtd','error','user','24UaNzAr','message','✔\x20Found\x20','Listing\x20users...','cause'];a45_0x4669=function(){return _0x1038e1;};return a45_0x4669();}import{withSpinner}from'../utils/spinner.js';export class UserCommand extends BaseCommand{[a45_0x3b9456(0x158)]='user';['description']=a45_0x3b9456(0x156);async[a45_0x3b9456(0x157)](_0x549010){const _0x4e79dc=a45_0x3b9456,{options:_0x2042bd,tdx:_0x2281c3}=_0x549010;try{const _0x49b82f=await withSpinner(_0x4e79dc(0x149),()=>_0x2281c3['user'][_0x4e79dc(0x15f)](),{'verbose':_0x2042bd[_0x4e79dc(0x15e)]}),_0x47dc35=_0x49b82f[_0x4e79dc(0x15a)];return await handleSingleObjectOutput(_0x47dc35,_0x2042bd),0x0;}catch(_0x50bd98){if(_0x50bd98 instanceof SDKError)return console[_0x4e79dc(0x14b)](_0x4e79dc(0x148)+_0x50bd98[_0x4e79dc(0x14e)]),_0x50bd98[_0x4e79dc(0x151)]&&console[_0x4e79dc(0x14b)](_0x4e79dc(0x15d)+_0x50bd98[_0x4e79dc(0x151)]),0x1;throw _0x50bd98;}}}export class UserListCommand extends BaseCommand{[a45_0x3b9456(0x158)]='user\x20list';['description']='List\x20all\x20users\x20in\x20the\x20account';async[a45_0x3b9456(0x157)](_0x6fc8ef){const _0x5e5992=a45_0x3b9456,{options:_0x5287c3,tdx:_0x45e051}=_0x6fc8ef;try{const _0x53e1c5=await withSpinner(_0x5e5992(0x150),()=>_0x45e051[_0x5e5992(0x14c)]['list'](),{'verbose':_0x5287c3[_0x5e5992(0x15e)]}),_0x23ba52=_0x53e1c5[_0x5e5992(0x15a)];return console[_0x5e5992(0x14b)](_0x5e5992(0x14f)+_0x23ba52[_0x5e5992(0x160)]+_0x5e5992(0x152)+(_0x23ba52[_0x5e5992(0x160)]!==0x1?'s':'')),await handleSDKOutput(_0x23ba52,_0x5287c3),0x0;}catch(_0x420349){if(_0x420349 instanceof SDKError)return console['error'](_0x5e5992(0x148)+_0x420349[_0x5e5992(0x14e)]),_0x420349['cause']&&console[_0x5e5992(0x14b)](_0x5e5992(0x15d)+_0x420349[_0x5e5992(0x151)]),0x1;throw _0x420349;}}}
1
+ const a45_0x9a9ff5=a45_0x1f2f;(function(_0x110102,_0x122e8f){const _0x1362ce=a45_0x1f2f,_0x5df380=_0x110102();while(!![]){try{const _0x30a777=parseInt(_0x1362ce(0x17d))/0x1+parseInt(_0x1362ce(0x171))/0x2+parseInt(_0x1362ce(0x180))/0x3*(-parseInt(_0x1362ce(0x173))/0x4)+-parseInt(_0x1362ce(0x17a))/0x5*(parseInt(_0x1362ce(0x170))/0x6)+parseInt(_0x1362ce(0x183))/0x7*(parseInt(_0x1362ce(0x188))/0x8)+parseInt(_0x1362ce(0x186))/0x9*(parseInt(_0x1362ce(0x181))/0xa)+-parseInt(_0x1362ce(0x189))/0xb;if(_0x30a777===_0x122e8f)break;else _0x5df380['push'](_0x5df380['shift']());}catch(_0xb4529d){_0x5df380['push'](_0x5df380['shift']());}}}(a45_0x15ff,0x3547f));import{BaseCommand}from'./command.js';function a45_0x1f2f(_0x287b93,_0x5b616f){_0x287b93=_0x287b93-0x16e;const _0x15ffe7=a45_0x15ff();let _0x1f2fca=_0x15ffe7[_0x287b93];return _0x1f2fca;}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{[a45_0x9a9ff5(0x184)]=a45_0x9a9ff5(0x18a);[a45_0x9a9ff5(0x176)]=a45_0x9a9ff5(0x17e);async[a45_0x9a9ff5(0x178)](_0x449e86){const _0x95c37e=a45_0x9a9ff5,{options:_0x2fe3d3,tdx:_0x5917d2}=_0x449e86;try{const _0x56956f=await withSpinner(_0x95c37e(0x187),()=>_0x5917d2[_0x95c37e(0x18a)][_0x95c37e(0x17c)](),{'verbose':_0x2fe3d3[_0x95c37e(0x17f)]}),_0x360468=_0x56956f[_0x95c37e(0x16e)];return await handleSingleObjectOutput(_0x360468,_0x2fe3d3),0x0;}catch(_0x46f2ac){if(_0x46f2ac instanceof SDKError)return console[_0x95c37e(0x182)]('Error:\x20'+_0x46f2ac[_0x95c37e(0x17b)]),_0x46f2ac[_0x95c37e(0x179)]&&console['error'](_0x95c37e(0x18c)+_0x46f2ac[_0x95c37e(0x179)]),0x1;throw _0x46f2ac;}}}function a45_0x15ff(){const _0x41cabe=['2464990xMsAAo','error','78008fahQvK','name','length','9ndjZkO','Fetching\x20user\x20info...','208LeZWtd','2814042xtHCJd','user','\x20user','\x20\x20Cause:\x20','data','Error:\x20','174198khRefz','578874abtsfP','Listing\x20users...','8soCvMv','✔\x20Found\x20','list','description','List\x20all\x20users\x20in\x20the\x20account','execute','cause','75nfbasS','message','getCurrent','318672gWSeCg','Show\x20current\x20user\x20information','verbose','352194QAMoOF'];a45_0x15ff=function(){return _0x41cabe;};return a45_0x15ff();}export class UserListCommand extends BaseCommand{[a45_0x9a9ff5(0x184)]='user\x20list';[a45_0x9a9ff5(0x176)]=a45_0x9a9ff5(0x177);async['execute'](_0x1958d1){const _0x127271=a45_0x9a9ff5,{options:_0x140a98,tdx:_0x560675}=_0x1958d1;try{const _0x10dd8a=await withSpinner(_0x127271(0x172),()=>_0x560675[_0x127271(0x18a)][_0x127271(0x175)](),{'verbose':_0x140a98[_0x127271(0x17f)]}),_0x580533=_0x10dd8a['data'];return console[_0x127271(0x182)](_0x127271(0x174)+_0x580533[_0x127271(0x185)]+_0x127271(0x18b)+(_0x580533[_0x127271(0x185)]!==0x1?'s':'')),await handleSDKOutput(_0x580533,_0x140a98),0x0;}catch(_0x33b83b){if(_0x33b83b instanceof SDKError)return console[_0x127271(0x182)](_0x127271(0x16f)+_0x33b83b['message']),_0x33b83b[_0x127271(0x179)]&&console[_0x127271(0x182)](_0x127271(0x18c)+_0x33b83b[_0x127271(0x179)]),0x1;throw _0x33b83b;}}}