@treasuredata/tdx 2026.3.13 → 2026.3.14

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 (201) 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/auth-login-command.js +1 -1
  11. package/dist/commands/chat-command.js +1 -1
  12. package/dist/commands/claude-command.js +1 -1
  13. package/dist/commands/claude-statusline-command.js +1 -1
  14. package/dist/commands/claude-usage-command.js +1 -1
  15. package/dist/commands/command.js +1 -1
  16. package/dist/commands/connection-command.js +1 -1
  17. package/dist/commands/databases.js +1 -1
  18. package/dist/commands/delivery-command.js +1 -1
  19. package/dist/commands/describe.js +1 -1
  20. package/dist/commands/engage-campaign-pull-command.js +1 -1
  21. package/dist/commands/engage-campaign-push-command.js +1 -1
  22. package/dist/commands/engage-campaign-validate-command.js +1 -1
  23. package/dist/commands/engage-command.js +1 -1
  24. package/dist/commands/engage-template-pull-command.js +1 -1
  25. package/dist/commands/engage-template-push-command.js +1 -1
  26. package/dist/commands/engage-template-validate-command.js +1 -1
  27. package/dist/commands/job-command.js +1 -1
  28. package/dist/commands/journey-command.js +1 -1
  29. package/dist/commands/journey-validate-command.js +1 -1
  30. package/dist/commands/llm-command.js +1 -1
  31. package/dist/commands/mcp-command.js +1 -1
  32. package/dist/commands/parent-segment-command.js +1 -1
  33. package/dist/commands/profile-command.js +1 -1
  34. package/dist/commands/profiles-command.js +1 -1
  35. package/dist/commands/query-command.js +1 -1
  36. package/dist/commands/schedule-command.js +1 -1
  37. package/dist/commands/segment-command.js +1 -1
  38. package/dist/commands/segment-create-command.js +1 -1
  39. package/dist/commands/segment-fields-command.js +1 -1
  40. package/dist/commands/segment-pull-command.js +1 -1
  41. package/dist/commands/segment-push-command.js +1 -1
  42. package/dist/commands/segment-update-command.js +1 -1
  43. package/dist/commands/segment-use-command.js +1 -1
  44. package/dist/commands/segment-validate-command.js +1 -1
  45. package/dist/commands/segments.js +1 -1
  46. package/dist/commands/show.js +1 -1
  47. package/dist/commands/status-command.js +1 -1
  48. package/dist/commands/tables.js +1 -1
  49. package/dist/commands/unset-command.js +1 -1
  50. package/dist/commands/upgrade-command.js +1 -1
  51. package/dist/commands/use-command.js +1 -1
  52. package/dist/commands/user-command.js +1 -1
  53. package/dist/commands/workflow-command.js +1 -1
  54. package/dist/core/auth.js +1 -1
  55. package/dist/core/command-output.js +1 -1
  56. package/dist/core/config.js +1 -1
  57. package/dist/core/connection-cache.js +1 -1
  58. package/dist/core/constants.js +1 -1
  59. package/dist/core/credential-cache.js +1 -1
  60. package/dist/core/global-context.js +1 -1
  61. package/dist/core/keychain.js +1 -1
  62. package/dist/core/oauth-keychain.js +1 -1
  63. package/dist/core/oauth.js +1 -1
  64. package/dist/core/profile.js +1 -1
  65. package/dist/core/project-config.js +1 -1
  66. package/dist/core/session.js +1 -1
  67. package/dist/core/user-cache.js +1 -1
  68. package/dist/core/version.js +1 -1
  69. package/dist/index.js +1 -1
  70. package/dist/mcp/server.js +1 -1
  71. package/dist/mcp/tools/index.js +1 -1
  72. package/dist/mcp/tools/tdx-run.js +1 -1
  73. package/dist/mcp/tools/tdx-search.js +1 -1
  74. package/dist/mcp/utils.js +1 -1
  75. package/dist/proxy/claude-usage-tracker.js +1 -1
  76. package/dist/proxy/passthrough-server.js +1 -1
  77. package/dist/proxy/sse-usage-parser.js +1 -1
  78. package/dist/sdk/agent/agent-config.js +1 -1
  79. package/dist/sdk/agent/agent-ref-parser.js +1 -1
  80. package/dist/sdk/agent/agent-yaml.js +1 -1
  81. package/dist/sdk/agent/test/evaluator.js +1 -1
  82. package/dist/sdk/agent/test/executor.js +1 -1
  83. package/dist/sdk/agent/test/index.js +1 -1
  84. package/dist/sdk/agent/test/output.js +1 -1
  85. package/dist/sdk/agent/test/parser.js +1 -1
  86. package/dist/sdk/agent/tool-target-registry.js +1 -1
  87. package/dist/sdk/api.js +1 -1
  88. package/dist/sdk/client/cdp-api-client.js +1 -1
  89. package/dist/sdk/client/delivery-api-client.js +1 -1
  90. package/dist/sdk/client/endpoints.js +1 -1
  91. package/dist/sdk/client/engage-api-client.js +1 -1
  92. package/dist/sdk/client/http-client.js +1 -1
  93. package/dist/sdk/client/llm-api-client.js +1 -1
  94. package/dist/sdk/client/oauth-refresh.js +1 -1
  95. package/dist/sdk/client/rate-limiter.js +1 -1
  96. package/dist/sdk/client/td-api-client.js +1 -1
  97. package/dist/sdk/client/trino-api-client.js +1 -1
  98. package/dist/sdk/client/workflow-client.js +1 -1
  99. package/dist/sdk/connection-validator.js +1 -1
  100. package/dist/sdk/connection.js +1 -1
  101. package/dist/sdk/delivery.js +1 -1
  102. package/dist/sdk/engage/campaign-pull.js +1 -1
  103. package/dist/sdk/engage/campaign-push.js +1 -1
  104. package/dist/sdk/engage/campaign-validator.js +1 -1
  105. package/dist/sdk/engage/campaign-yaml.js +1 -1
  106. package/dist/sdk/engage/template-pull.js +1 -1
  107. package/dist/sdk/engage/template-push.js +1 -1
  108. package/dist/sdk/engage/template-validator.js +1 -1
  109. package/dist/sdk/engage/template-yaml.js +1 -1
  110. package/dist/sdk/engage/types/campaign-def.js +1 -1
  111. package/dist/sdk/engage/types/campaign-schema.js +1 -1
  112. package/dist/sdk/engage/types/template-schema.js +1 -1
  113. package/dist/sdk/engage.js +1 -1
  114. package/dist/sdk/errors.js +1 -1
  115. package/dist/sdk/index.js +1 -1
  116. package/dist/sdk/io/index.js +1 -1
  117. package/dist/sdk/io/node-filesystem.js +1 -1
  118. package/dist/sdk/job.js +1 -1
  119. package/dist/sdk/journey.js +1 -1
  120. package/dist/sdk/llm/chat-cache.js +1 -1
  121. package/dist/sdk/llm/index.js +1 -1
  122. package/dist/sdk/llm/llm-backup-utils.js +1 -1
  123. package/dist/sdk/llm/model-factors.js +1 -1
  124. package/dist/sdk/personalization.js +1 -1
  125. package/dist/sdk/query/index.js +1 -1
  126. package/dist/sdk/query/sql-parser.js +1 -1
  127. package/dist/sdk/realtime.js +1 -1
  128. package/dist/sdk/schedule.js +1 -1
  129. package/dist/sdk/segment/child-segment-yaml.js +1 -1
  130. package/dist/sdk/segment/fields-display.js +1 -1
  131. package/dist/sdk/segment/file-discovery.js +1 -1
  132. package/dist/sdk/segment/journey-utils.js +1 -1
  133. package/dist/sdk/segment/journey-validator.js +1 -1
  134. package/dist/sdk/segment/journey-yaml.js +1 -1
  135. package/dist/sdk/segment/parent-segment-preview.js +1 -1
  136. package/dist/sdk/segment/parent-segment-yaml.js +1 -1
  137. package/dist/sdk/segment/pull-workflow.js +1 -1
  138. package/dist/sdk/segment/push-recovery.js +1 -1
  139. package/dist/sdk/segment/push-workflow.js +1 -1
  140. package/dist/sdk/segment/resolution-context.js +1 -1
  141. package/dist/sdk/segment/segment-path-parser.js +1 -1
  142. package/dist/sdk/segment/segment-ref-parser.js +1 -1
  143. package/dist/sdk/segment/segment-validator.js +1 -1
  144. package/dist/sdk/segment/target-resolution.js +1 -1
  145. package/dist/sdk/segment/tdx-config.js +1 -1
  146. package/dist/sdk/segment/types/activation-schema.js +1 -1
  147. package/dist/sdk/segment/types/journey-def.js +1 -1
  148. package/dist/sdk/segment/types/journey-schema.js +1 -1
  149. package/dist/sdk/segment/types/segment-def.js +1 -1
  150. package/dist/sdk/segment/types/segment-schema.js +1 -1
  151. package/dist/sdk/segment/validate-files.js +1 -1
  152. package/dist/sdk/segment/yaml-validator.js +1 -1
  153. package/dist/sdk/segment.js +1 -1
  154. package/dist/sdk/types/index.js +1 -1
  155. package/dist/sdk/types/progress.js +1 -1
  156. package/dist/sdk/user.js +1 -1
  157. package/dist/sdk/util/format-detector.js +1 -1
  158. package/dist/sdk/util/formatters.js +1 -1
  159. package/dist/sdk/util/index.js +1 -1
  160. package/dist/sdk/util/paginate.js +1 -1
  161. package/dist/sdk/util/tree-formatter.js +1 -1
  162. package/dist/sdk/workflow/archive-validation.js +1 -1
  163. package/dist/sdk/workflow/clone-workflow.js +1 -1
  164. package/dist/sdk/workflow/index.js +1 -1
  165. package/dist/sdk/workflow/pull-workflow.js +1 -1
  166. package/dist/sdk/workflow/push-workflow.js +1 -1
  167. package/dist/sdk/workflow/tdx-config.js +1 -1
  168. package/dist/sdk/workflow/workflow-utils.js +1 -1
  169. package/dist/test-utils/command-runner.js +1 -1
  170. package/dist/test-utils/factories.js +1 -1
  171. package/dist/test-utils/fixtures.js +1 -1
  172. package/dist/test-utils/http-mock.js +1 -1
  173. package/dist/test-utils/index.js +1 -1
  174. package/dist/utils/async.js +1 -1
  175. package/dist/utils/colors.js +1 -1
  176. package/dist/utils/diff.js +1 -1
  177. package/dist/utils/file-permissions.js +1 -1
  178. package/dist/utils/file-reader.js +1 -1
  179. package/dist/utils/github-releases.js +1 -1
  180. package/dist/utils/global-cache.js +1 -1
  181. package/dist/utils/json-loader.js +1 -1
  182. package/dist/utils/local-cache.js +1 -1
  183. package/dist/utils/logger/formatters/default-formatter.js +1 -1
  184. package/dist/utils/logger/formatters/index.js +1 -1
  185. package/dist/utils/logger/handlers/console-handler.js +1 -1
  186. package/dist/utils/logger/handlers/file-handler.js +1 -1
  187. package/dist/utils/logger/handlers/index.js +1 -1
  188. package/dist/utils/logger/handlers/null-handler.js +1 -1
  189. package/dist/utils/logger/index.js +1 -1
  190. package/dist/utils/logger/logger.js +1 -1
  191. package/dist/utils/logger/types.js +1 -1
  192. package/dist/utils/option-validation.js +1 -1
  193. package/dist/utils/process.js +1 -1
  194. package/dist/utils/prompt.js +1 -1
  195. package/dist/utils/spinner.js +1 -1
  196. package/dist/utils/sse-parser.js +1 -1
  197. package/dist/utils/string-utils.js +1 -1
  198. package/dist/utils/table-ref-parser.js +1 -1
  199. package/dist/utils/tdx-logger.js +1 -1
  200. package/dist/utils/version-check.js +1 -1
  201. package/package.json +1 -1
@@ -1 +1 @@
1
- const a40_0xc47e45=a40_0x35c7;(function(_0x59def2,_0x3efa4c){const _0x5596ae=a40_0x35c7,_0x56b904=_0x59def2();while(!![]){try{const _0x47691f=-parseInt(_0x5596ae(0xc9))/0x1+-parseInt(_0x5596ae(0xcc))/0x2*(-parseInt(_0x5596ae(0xcb))/0x3)+parseInt(_0x5596ae(0xdf))/0x4+-parseInt(_0x5596ae(0xef))/0x5+-parseInt(_0x5596ae(0xd9))/0x6*(-parseInt(_0x5596ae(0xe3))/0x7)+-parseInt(_0x5596ae(0xed))/0x8+-parseInt(_0x5596ae(0xe0))/0x9*(-parseInt(_0x5596ae(0xce))/0xa);if(_0x47691f===_0x3efa4c)break;else _0x56b904['push'](_0x56b904['shift']());}catch(_0x28f539){_0x56b904['push'](_0x56b904['shift']());}}}(a40_0x2593,0x46857));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 a40_0x35c7(_0x3eb875,_0x5e114d){_0x3eb875=_0x3eb875-0xc4;const _0x259333=a40_0x2593();let _0x35c72f=_0x259333[_0x3eb875];return _0x35c72f;}import a40_0x35d820 from'chalk';export class SegmentUpdateCommand extends BaseCommand{[a40_0xc47e45(0xe9)]=a40_0xc47e45(0xc5);[a40_0xc47e45(0xe6)]=a40_0xc47e45(0xc4);async[a40_0xc47e45(0xd7)](_0x3b1e24){const _0x9e9d6a=a40_0xc47e45;console[_0x9e9d6a(0xdd)](a40_0x35d820[_0x9e9d6a(0xe2)](_0x9e9d6a(0xe8))),console[_0x9e9d6a(0xdd)](a40_0x35d820[_0x9e9d6a(0xe2)](_0x9e9d6a(0xf1)));const {options:_0x1ff4fa,args:_0x4d092a,tdx:_0x6c853e}=_0x3b1e24,_0x4f0481=_0x1ff4fa;if(_0x4d092a[_0x9e9d6a(0xcd)]===0x0)return console['error']('Error:\x20Segment\x20path\x20or\x20name\x20is\x20required'),console[_0x9e9d6a(0xdd)](_0x9e9d6a(0xca)),console[_0x9e9d6a(0xdd)]('Examples:'),console[_0x9e9d6a(0xdd)](_0x9e9d6a(0xe1)),console[_0x9e9d6a(0xdd)](_0x9e9d6a(0xdc)),0x1;const _0x543a4c=_0x4d092a[0x0],_0x303d12=_0x1ff4fa[_0x9e9d6a(0xe7)];let _0x49e269=_0x543a4c;_0x303d12&&!_0x543a4c[_0x9e9d6a(0xda)]('/')&&(_0x49e269=_0x303d12+'/'+_0x543a4c,_0x4f0481[_0x9e9d6a(0xde)]&&console[_0x9e9d6a(0xdd)]('Resolved\x20relative\x20path\x20to:\x20'+_0x49e269));const _0x4f504a=await withSpinner(_0x9e9d6a(0xf3)+_0x49e269+_0x9e9d6a(0xc7),()=>_0x6c853e[_0x9e9d6a(0xd3)][_0x9e9d6a(0xd5)](_0x49e269),{'verbose':_0x4f0481['verbose']}),_0x3e639a=_0x4f504a[_0x9e9d6a(0xf4)];_0x4f0481['verbose']&&console[_0x9e9d6a(0xdd)](_0x9e9d6a(0xc6)+_0x3e639a[_0x9e9d6a(0xec)]);if(_0x3e639a[_0x9e9d6a(0xec)]!=='segment')return console[_0x9e9d6a(0xdd)](_0x9e9d6a(0xc8)+_0x3e639a[_0x9e9d6a(0xec)]+_0x9e9d6a(0xf5)),console[_0x9e9d6a(0xdd)](_0x9e9d6a(0xcf)),0x1;if(!_0x3e639a[_0x9e9d6a(0xe5)])throw new SDKError(ErrorCode[_0x9e9d6a(0xeb)],_0x9e9d6a(0xd1));const _0x1f06db=_0x3e639a[_0x9e9d6a(0xea)],_0x3c94e6=_0x3e639a[_0x9e9d6a(0xe5)];_0x4f0481['verbose']&&(console[_0x9e9d6a(0xdd)](_0x9e9d6a(0xf2)+_0x1f06db),console[_0x9e9d6a(0xdd)]('Segment\x20ID:\x20'+_0x3c94e6));let _0xcc2250;if(_0x4f0481['folder']){const _0x3182be=_0x4f0481[_0x9e9d6a(0xee)],_0x10e615=await withSpinner(_0x9e9d6a(0xe4)+_0x3182be+_0x9e9d6a(0xc7),()=>_0x6c853e[_0x9e9d6a(0xd3)][_0x9e9d6a(0xf0)](_0x1f06db,_0x3182be),{'verbose':_0x4f0481[_0x9e9d6a(0xde)]});_0xcc2250=parseInt(_0x10e615['data'],0xa),_0x4f0481[_0x9e9d6a(0xde)]&&console[_0x9e9d6a(0xdd)](_0x9e9d6a(0xd0)+_0xcc2250);}const _0x138b2f=await loadJSONFromOptions(_0x4f0481[_0x9e9d6a(0xf6)],_0x4f0481[_0x9e9d6a(0xdb)]),_0x22c15d={'name':_0x4f0481[_0x9e9d6a(0xe9)],'description':_0x4f0481[_0x9e9d6a(0xe6)],'rule':_0x138b2f,'kind':_0x4f0481[_0x9e9d6a(0xd8)]!==undefined?parseInt(_0x4f0481[_0x9e9d6a(0xd8)],0xa):undefined,'segmentFolderId':_0xcc2250},_0xd2efa3=await withSpinner(_0x9e9d6a(0xd4)+_0x3e639a[_0x9e9d6a(0xd6)]+_0x9e9d6a(0xc7),()=>_0x6c853e[_0x9e9d6a(0xd3)]['updateSegmentById'](_0x1f06db,_0x3c94e6,_0x22c15d),{'verbose':_0x4f0481[_0x9e9d6a(0xde)]}),_0x332e07=_0xd2efa3['data'];return console[_0x9e9d6a(0xdd)]('✔\x20Updated\x20segment\x20\x27'+_0x332e07[_0x9e9d6a(0xe9)]+'\x27'),_0x49e269!==_0x543a4c&&console['error'](_0x9e9d6a(0xd2)+_0x49e269),await handleSDKOutput([_0x332e07],_0x4f0481),0x0;}}function a40_0x2593(){const _0x1bfcce=['rule','Update\x20existing\x20child\x20segment','segment:update','Resolved\x20type:\x20','\x27...','Error:\x20Cannot\x20update\x20','40629hDcdlr','Usage:\x20tdx\x20segment\x20update\x20<path>\x20[options]','1794yBDKJW','548aKHeNx','length','87730TasBZq','Use:\x20tdx\x20segment\x20update\x20<path_to_segment>\x20[options]','Resolved\x20folder\x20ID:\x20','Segment\x20ID\x20missing\x20from\x20resolved\x20path','\x20\x20\x20Path:\x20','segment','Updating\x20segment\x20\x27','resolvePathToResource','segmentName','execute','kind','2663946dqsbkO','includes','ruleFile','\x20\x20tdx\x20segment\x20update\x20\x22High\x20Value\x22\x20--rule\x20\x27...\x27\x20\x20#\x20Relative\x20to\x20context','error','verbose','362056dClniH','153KKLeLc','\x20\x20tdx\x20segment\x20update\x20\x22My\x20Audience/High\x20Value\x22\x20--description\x20\x22...\x22','yellow','7oZuqVa','Resolving\x20folder\x20\x27','segmentId','description','segmentPath','⚠\x20Deprecation\x20warning:\x20`segment\x20update`\x20is\x20deprecated.','name','parentId','INTERNAL','type','3590432KsNEmz','folder','346050jCrMlp','resolveFolderId','\x20\x20Use\x20`tdx\x20sg\x20push`\x20with\x20YAML\x20files\x20instead.\x0a','Parent\x20ID:\x20','Resolving\x20path\x20\x27','data','.\x20Only\x20child\x20segments\x20can\x20be\x20updated.'];a40_0x2593=function(){return _0x1bfcce;};return a40_0x2593();}
1
+ function a40_0x5ae9(_0x237e71,_0x5ee6f9){_0x237e71=_0x237e71-0x12d;const _0x493dd0=a40_0x493d();let _0x5ae938=_0x493dd0[_0x237e71];return _0x5ae938;}const a40_0x490d3d=a40_0x5ae9;function a40_0x493d(){const _0xc5d1f0=['14069qhIhkf','name','945832EASXQK','\x20\x20Use\x20`tdx\x20sg\x20push`\x20with\x20YAML\x20files\x20instead.\x0a','data','Resolving\x20path\x20\x27','length','499203sUdGeE','kind','805480HTIVDj','29380xpieVY','rule','Resolved\x20type:\x20','segmentPath','folder','✔\x20Updated\x20segment\x20\x27','Segment\x20ID\x20missing\x20from\x20resolved\x20path','includes','7356UbfFLm','\x27...','resolvePathToResource','10NkePxF','updateSegmentById','type','description','resolveFolderId','Error:\x20Segment\x20path\x20or\x20name\x20is\x20required','execute','verbose','segment','.\x20Only\x20child\x20segments\x20can\x20be\x20updated.','Examples:','INTERNAL','Segment\x20ID:\x20','542853UArdtU','2lxxhLv','ruleFile','⚠\x20Deprecation\x20warning:\x20`segment\x20update`\x20is\x20deprecated.','7AaQeVv','yellow','Parent\x20ID:\x20','Resolved\x20relative\x20path\x20to:\x20','segmentId','814869IlmTOL','error','Resolving\x20folder\x20\x27','Resolved\x20folder\x20ID:\x20','\x20\x20tdx\x20segment\x20update\x20\x22High\x20Value\x22\x20--rule\x20\x27...\x27\x20\x20#\x20Relative\x20to\x20context','6vgSNPZ','parentId'];a40_0x493d=function(){return _0xc5d1f0;};return a40_0x493d();}(function(_0x2b201c,_0x3d8a60){const _0x3fe178=a40_0x5ae9,_0x23bc46=_0x2b201c();while(!![]){try{const _0xa2fec1=-parseInt(_0x3fe178(0x141))/0x1*(parseInt(_0x3fe178(0x15d))/0x2)+parseInt(_0x3fe178(0x133))/0x3+-parseInt(_0x3fe178(0x13c))/0x4+-parseInt(_0x3fe178(0x144))/0x5*(parseInt(_0x3fe178(0x138))/0x6)+parseInt(_0x3fe178(0x12e))/0x7*(-parseInt(_0x3fe178(0x143))/0x8)+parseInt(_0x3fe178(0x15c))/0x9*(parseInt(_0x3fe178(0x14f))/0xa)+-parseInt(_0x3fe178(0x13a))/0xb*(-parseInt(_0x3fe178(0x14c))/0xc);if(_0xa2fec1===_0x3d8a60)break;else _0x23bc46['push'](_0x23bc46['shift']());}catch(_0x3440f0){_0x23bc46['push'](_0x23bc46['shift']());}}}(a40_0x493d,0x42d51));import{BaseCommand}from'./command.js';import{handleSDKOutput}from'../core/command-output.js';import{withSpinner}from'../utils/spinner.js';import{loadJSONFromOptions}from'../utils/json-loader.js';import{SDKError,ErrorCode}from'../sdk/index.js';import a40_0x105a6a from'chalk';export class SegmentUpdateCommand extends BaseCommand{[a40_0x490d3d(0x13b)]='segment:update';[a40_0x490d3d(0x152)]='Update\x20existing\x20child\x20segment';async[a40_0x490d3d(0x155)](_0x15eb5e){const _0x10b450=a40_0x490d3d;console[_0x10b450(0x134)](a40_0x105a6a['yellow'](_0x10b450(0x12d))),console['error'](a40_0x105a6a[_0x10b450(0x12f)](_0x10b450(0x13d)));const {options:_0x19b4e7,args:_0x4e7120,tdx:_0xfd3f31}=_0x15eb5e,_0x31f118=_0x19b4e7;if(_0x4e7120[_0x10b450(0x140)]===0x0)return console[_0x10b450(0x134)](_0x10b450(0x154)),console['error']('Usage:\x20tdx\x20segment\x20update\x20<path>\x20[options]'),console[_0x10b450(0x134)](_0x10b450(0x159)),console['error']('\x20\x20tdx\x20segment\x20update\x20\x22My\x20Audience/High\x20Value\x22\x20--description\x20\x22...\x22'),console['error'](_0x10b450(0x137)),0x1;const _0x58cac3=_0x4e7120[0x0],_0xdfc540=_0x19b4e7[_0x10b450(0x147)];let _0x57ab1a=_0x58cac3;_0xdfc540&&!_0x58cac3[_0x10b450(0x14b)]('/')&&(_0x57ab1a=_0xdfc540+'/'+_0x58cac3,_0x31f118[_0x10b450(0x156)]&&console[_0x10b450(0x134)](_0x10b450(0x131)+_0x57ab1a));const _0x545e59=await withSpinner(_0x10b450(0x13f)+_0x57ab1a+'\x27...',()=>_0xfd3f31[_0x10b450(0x157)][_0x10b450(0x14e)](_0x57ab1a),{'verbose':_0x31f118[_0x10b450(0x156)]}),_0x548265=_0x545e59['data'];_0x31f118[_0x10b450(0x156)]&&console[_0x10b450(0x134)](_0x10b450(0x146)+_0x548265[_0x10b450(0x151)]);if(_0x548265[_0x10b450(0x151)]!==_0x10b450(0x157))return console[_0x10b450(0x134)]('Error:\x20Cannot\x20update\x20'+_0x548265['type']+_0x10b450(0x158)),console[_0x10b450(0x134)]('Use:\x20tdx\x20segment\x20update\x20<path_to_segment>\x20[options]'),0x1;if(!_0x548265[_0x10b450(0x132)])throw new SDKError(ErrorCode[_0x10b450(0x15a)],_0x10b450(0x14a));const _0x3e8cf4=_0x548265[_0x10b450(0x139)],_0x44a91b=_0x548265[_0x10b450(0x132)];_0x31f118[_0x10b450(0x156)]&&(console[_0x10b450(0x134)](_0x10b450(0x130)+_0x3e8cf4),console[_0x10b450(0x134)](_0x10b450(0x15b)+_0x44a91b));let _0x3c303c;if(_0x31f118['folder']){const _0x16f9e3=_0x31f118[_0x10b450(0x148)],_0x42d8dc=await withSpinner(_0x10b450(0x135)+_0x16f9e3+_0x10b450(0x14d),()=>_0xfd3f31['segment'][_0x10b450(0x153)](_0x3e8cf4,_0x16f9e3),{'verbose':_0x31f118[_0x10b450(0x156)]});_0x3c303c=parseInt(_0x42d8dc[_0x10b450(0x13e)],0xa),_0x31f118['verbose']&&console[_0x10b450(0x134)](_0x10b450(0x136)+_0x3c303c);}const _0x2441c9=await loadJSONFromOptions(_0x31f118[_0x10b450(0x145)],_0x31f118[_0x10b450(0x15e)]),_0x345455={'name':_0x31f118['name'],'description':_0x31f118[_0x10b450(0x152)],'rule':_0x2441c9,'kind':_0x31f118[_0x10b450(0x142)]!==undefined?parseInt(_0x31f118[_0x10b450(0x142)],0xa):undefined,'segmentFolderId':_0x3c303c},_0x272a1d=await withSpinner('Updating\x20segment\x20\x27'+_0x548265['segmentName']+_0x10b450(0x14d),()=>_0xfd3f31[_0x10b450(0x157)][_0x10b450(0x150)](_0x3e8cf4,_0x44a91b,_0x345455),{'verbose':_0x31f118['verbose']}),_0x8ada42=_0x272a1d[_0x10b450(0x13e)];return console[_0x10b450(0x134)](_0x10b450(0x149)+_0x8ada42[_0x10b450(0x13b)]+'\x27'),_0x57ab1a!==_0x58cac3&&console[_0x10b450(0x134)]('\x20\x20\x20Path:\x20'+_0x57ab1a),await handleSDKOutput([_0x8ada42],_0x31f118),0x0;}}
@@ -1 +1 @@
1
- const a41_0x2d94c9=a41_0x677d;(function(_0xabe1ff,_0x409608){const _0x497a0f=a41_0x677d,_0x4d96a0=_0xabe1ff();while(!![]){try{const _0xfd313f=-parseInt(_0x497a0f(0x156))/0x1+-parseInt(_0x497a0f(0x163))/0x2*(parseInt(_0x497a0f(0x182))/0x3)+parseInt(_0x497a0f(0x177))/0x4+parseInt(_0x497a0f(0x158))/0x5+-parseInt(_0x497a0f(0x150))/0x6+parseInt(_0x497a0f(0x171))/0x7+-parseInt(_0x497a0f(0x168))/0x8;if(_0xfd313f===_0x409608)break;else _0x4d96a0['push'](_0x4d96a0['shift']());}catch(_0x3ad53f){_0x4d96a0['push'](_0x4d96a0['shift']());}}}(a41_0x2d31,0xd37f0));import{existsSync,statSync}from'fs';import a41_0x2fdcc2 from'chalk';import{BaseCommand}from'./command.js';import{saveSessionContext}from'../core/session.js';function a41_0x677d(_0x1a9605,_0x2b217e){_0x1a9605=_0x1a9605-0x14e;const _0x2d3175=a41_0x2d31();let _0x677d6c=_0x2d3175[_0x1a9605];return _0x677d6c;}import{withSpinner}from'../utils/spinner.js';function a41_0x2d31(){const _0x453511=['1286300OnuGQF','Context\x20can\x20only\x20be\x20set\x20to\x20a\x20parent\x20segment\x20or\x20folder.','Error:\x20No\x20tdx.json\x20found\x20in\x20or\x20above:\x20','parentName','split','cyan','verbose','session','Resolved\x20relative\x20path\x20to:\x20','folderId','isDirectory','3JQXlqN','✔\x20Context\x20set\x20to:\x20','Tip:\x20Run\x20`tdx\x20sg\x20pull\x20<parent_name>`\x20first\x20to\x20create\x20the\x20folder\x20structure','segments','\x20\x20tdx\x20segment\x20use\x20\x22My\x20Audience/Marketing\x22','679374SqutBI','\x20\x20tdx\x20segment\x20use\x20..\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Go\x20to\x20parent','✔\x20Context\x20cleared.\x20Back\x20to\x20root.','error','parentId','Resolving\x20path\x20\x27','905998nMlSjI','Set\x20current\x20segment/folder\x20context\x20for\x20navigation','3599595ZyEiKj','slice','Error:\x20No\x20context\x20set.\x20Cannot\x20use\x20relative\x20path.','dim','Use\x20\x22tdx\x20segments\x22\x20to\x20list\x20contents\x20in\x20this\x20context','Examples:','fullPath','green','Use\x20an\x20absolute\x20path\x20or\x20set\x20context\x20with:\x20tdx\x20segment\x20use\x20<parent_name>','parent_segment','Target\x20path:\x20','826938sNumtV','Usage:\x20tdx\x20segment\x20use\x20<path>','segmentPath','data','resolvePathToResource','2578680zyuHLo','red','\x27...','Error:\x20Path\x20is\x20required\x0a','Resolved\x20path\x20type:\x20','join','\x20\x20tdx\x20segment\x20use\x20/\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Clear\x20context','type','site','11058775jxcSQj','folderPath','Site:\x20','segment','length','log'];a41_0x2d31=function(){return _0x453511;};return a41_0x2d31();}import{parsePath,normalizePath}from'../sdk/segment/segment-path-parser.js';import{findTdxConfig}from'../sdk/segment/tdx-config.js';export class SegmentUseCommand extends BaseCommand{['name']='segment:use';['description']=a41_0x2d94c9(0x157);async['execute'](_0x24b5fa){const _0x5a77f0=a41_0x2d94c9,{options:_0x59388f,args:_0x17b5d5,tdx:_0x3b3568}=_0x24b5fa;if(_0x17b5d5[_0x5a77f0(0x175)]===0x0)return console[_0x5a77f0(0x153)](a41_0x2fdcc2[_0x5a77f0(0x169)](_0x5a77f0(0x16b))),console['error'](_0x5a77f0(0x164)),console[_0x5a77f0(0x153)](_0x5a77f0(0x15d)),console[_0x5a77f0(0x153)]('\x20\x20tdx\x20segment\x20use\x20\x22My\x20Audience\x22'),console[_0x5a77f0(0x153)](_0x5a77f0(0x14f)),console[_0x5a77f0(0x153)](_0x5a77f0(0x16e)),console[_0x5a77f0(0x153)](_0x5a77f0(0x151)),0x1;const _0x378494=_0x17b5d5[0x0],_0xfda71d=_0x59388f[_0x5a77f0(0x17e)];try{if(_0x378494==='/')return saveSessionContext({'segment_path':undefined},_0xfda71d),console[_0x5a77f0(0x176)](a41_0x2fdcc2[_0x5a77f0(0x15f)](_0x5a77f0(0x152))),0x0;if(existsSync(_0x378494)&&statSync(_0x378494)[_0x5a77f0(0x181)]()){let _0x32a2e6;try{_0x32a2e6=findTdxConfig(_0x378494);}catch{return console[_0x5a77f0(0x153)](a41_0x2fdcc2['red'](_0x5a77f0(0x179)+_0x378494)),console['error'](a41_0x2fdcc2['cyan'](_0x5a77f0(0x184))),0x1;}const _0x1c47f7=_0x32a2e6['config'][_0x5a77f0(0x161)];return saveSessionContext({'segment_path':_0x1c47f7,'parent_segment':_0x1c47f7},_0xfda71d),console[_0x5a77f0(0x176)](a41_0x2fdcc2[_0x5a77f0(0x15f)]('✔\x20Context\x20set\x20to:\x20'+a41_0x2fdcc2[_0x5a77f0(0x17c)](_0x1c47f7))),0x0;}const _0xe1d32b=_0x59388f[_0x5a77f0(0x165)];let _0x48890f=_0x378494;const _0x2274c1=parsePath(_0x378494);if(!_0x2274c1['isAbsolute']){if(!_0xe1d32b)return console[_0x5a77f0(0x153)](a41_0x2fdcc2['red'](_0x5a77f0(0x15a))),console['error'](a41_0x2fdcc2['cyan'](_0x5a77f0(0x160))),0x1;if(_0x378494==='..'){const _0x51a585=_0xe1d32b[_0x5a77f0(0x17b)]('/')[_0x5a77f0(0x159)](0x0,-0x1)[_0x5a77f0(0x16d)]('/');_0x48890f=_0x51a585||'/';}else _0x378494==='.'?_0x48890f=_0xe1d32b:_0x48890f=_0xe1d32b+'/'+_0x378494;_0x59388f['verbose']&&console[_0x5a77f0(0x153)](_0x5a77f0(0x17f)+_0x48890f);}if(_0x48890f==='/'||_0x48890f==='')return saveSessionContext({'segment_path':undefined},_0xfda71d),console['log'](a41_0x2fdcc2['green'](_0x5a77f0(0x152))),0x0;_0x48890f=normalizePath(_0x48890f);const _0x17e947=parsePath(_0x48890f)[_0x5a77f0(0x14e)];if(_0x17e947[_0x5a77f0(0x175)]===0x0)return saveSessionContext({'segment_path':undefined},_0xfda71d),console[_0x5a77f0(0x176)](a41_0x2fdcc2['green']('✔\x20Context\x20cleared.\x20Back\x20to\x20root.')),0x0;_0x59388f[_0x5a77f0(0x17d)]&&(console[_0x5a77f0(0x153)](_0x5a77f0(0x173)+_0x59388f[_0x5a77f0(0x170)]),console[_0x5a77f0(0x153)](_0x5a77f0(0x162)+_0x48890f));const _0xa24864=await withSpinner(_0x5a77f0(0x155)+_0x48890f+_0x5a77f0(0x16a),()=>_0x3b3568['segment'][_0x5a77f0(0x167)](_0x48890f),{'verbose':_0x59388f[_0x5a77f0(0x17d)]}),_0x2dbe16=_0xa24864[_0x5a77f0(0x166)];_0x59388f['verbose']&&(console[_0x5a77f0(0x153)](_0x5a77f0(0x16c)+_0x2dbe16[_0x5a77f0(0x16f)]),console[_0x5a77f0(0x153)]('Parent\x20ID:\x20'+_0x2dbe16[_0x5a77f0(0x154)]),_0x2dbe16['folderId']&&console[_0x5a77f0(0x153)]('Folder\x20ID:\x20'+_0x2dbe16[_0x5a77f0(0x180)]));if(_0x2dbe16[_0x5a77f0(0x16f)]===_0x5a77f0(0x174))return console[_0x5a77f0(0x153)](a41_0x2fdcc2[_0x5a77f0(0x169)]('Error:\x20Cannot\x20set\x20context\x20to\x20a\x20segment.')),console[_0x5a77f0(0x153)](_0x5a77f0(0x178)),console[_0x5a77f0(0x153)](a41_0x2fdcc2[_0x5a77f0(0x17c)]('Use:\x20tdx\x20segment\x20use\x20'+_0x2dbe16[_0x5a77f0(0x17a)]+(_0x2dbe16['folderPath']?'/'+_0x2dbe16[_0x5a77f0(0x172)][_0x5a77f0(0x16d)]('/'):''))),0x1;return saveSessionContext({'segment_path':_0x2dbe16[_0x5a77f0(0x15e)],'parent_segment':_0x2dbe16[_0x5a77f0(0x17a)]},_0xfda71d),console[_0x5a77f0(0x176)](a41_0x2fdcc2[_0x5a77f0(0x15f)](_0x5a77f0(0x183)+a41_0x2fdcc2['cyan'](_0x2dbe16[_0x5a77f0(0x15e)]))),_0x59388f[_0x5a77f0(0x17d)]&&(console[_0x5a77f0(0x153)](a41_0x2fdcc2[_0x5a77f0(0x15b)](_0x5a77f0(0x15c))),console[_0x5a77f0(0x153)](a41_0x2fdcc2[_0x5a77f0(0x15b)]('Use\x20\x22tdx\x20use\x22\x20to\x20see\x20all\x20context\x20parameters'))),0x0;}catch(_0x5941d9){throw _0x5941d9;}}}
1
+ function a41_0x11ce(){const _0x3b50c7=['error','cyan','split','Error:\x20No\x20context\x20set.\x20Cannot\x20use\x20relative\x20path.','6724940GPJUBX','16923vkNEKj','72SWcqyI','Usage:\x20tdx\x20segment\x20use\x20<path>','resolvePathToResource','Set\x20current\x20segment/folder\x20context\x20for\x20navigation','10tgAsBZ','segment','Error:\x20Path\x20is\x20required\x0a','type','Target\x20path:\x20','parentName','Examples:','Use\x20\x22tdx\x20use\x22\x20to\x20see\x20all\x20context\x20parameters','name','Site:\x20','segmentPath','Resolved\x20relative\x20path\x20to:\x20','dim','✔\x20Context\x20set\x20to:\x20','red','376073pqNnmv','\x20\x20tdx\x20segment\x20use\x20..\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Go\x20to\x20parent','Error:\x20No\x20tdx.json\x20found\x20in\x20or\x20above:\x20','802404MBseHX','isAbsolute','Parent\x20ID:\x20','execute','folderPath','\x20\x20tdx\x20segment\x20use\x20/\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Clear\x20context','\x20\x20tdx\x20segment\x20use\x20\x22My\x20Audience\x22','slice','verbose','segment:use','length','folderId','log','Context\x20can\x20only\x20be\x20set\x20to\x20a\x20parent\x20segment\x20or\x20folder.','1504824qffrOj','parent_segment','292845Ncqnmt','Use\x20\x22tdx\x20segments\x22\x20to\x20list\x20contents\x20in\x20this\x20context','18605eKDQCk','✔\x20Context\x20cleared.\x20Back\x20to\x20root.','258GHtkse','description','config','fullPath','Resolved\x20path\x20type:\x20','green','Folder\x20ID:\x20','\x20\x20tdx\x20segment\x20use\x20\x22My\x20Audience/Marketing\x22'];a41_0x11ce=function(){return _0x3b50c7;};return a41_0x11ce();}const a41_0x2c22f6=a41_0x3a4e;(function(_0x3e05a6,_0x252219){const _0x208203=a41_0x3a4e,_0x4e38c1=_0x3e05a6();while(!![]){try{const _0x41b5d5=-parseInt(_0x208203(0x93))/0x1+parseInt(_0x208203(0xbc))/0x2*(parseInt(_0x208203(0xb7))/0x3)+parseInt(_0x208203(0xa4))/0x4+-parseInt(_0x208203(0xa8))/0x5*(parseInt(_0x208203(0xaa))/0x6)+-parseInt(_0x208203(0xa6))/0x7*(parseInt(_0x208203(0xb8))/0x8)+parseInt(_0x208203(0x96))/0x9+parseInt(_0x208203(0xb6))/0xa;if(_0x41b5d5===_0x252219)break;else _0x4e38c1['push'](_0x4e38c1['shift']());}catch(_0x468ba8){_0x4e38c1['push'](_0x4e38c1['shift']());}}}(a41_0x11ce,0x3de1e));import{existsSync,statSync}from'fs';import a41_0xecf6ec from'chalk';import{BaseCommand}from'./command.js';function a41_0x3a4e(_0x7b780e,_0x19c781){_0x7b780e=_0x7b780e-0x85;const _0x11cef3=a41_0x11ce();let _0x3a4e7d=_0x11cef3[_0x7b780e];return _0x3a4e7d;}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{[a41_0x2c22f6(0x8c)]=a41_0x2c22f6(0x9f);[a41_0x2c22f6(0xab)]=a41_0x2c22f6(0xbb);async[a41_0x2c22f6(0x99)](_0x114297){const _0x3c69b1=a41_0x2c22f6,{options:_0x6cf56b,args:_0x1fe934,tdx:_0x4ff1b3}=_0x114297;if(_0x1fe934[_0x3c69b1(0xa0)]===0x0)return console[_0x3c69b1(0xb2)](a41_0xecf6ec[_0x3c69b1(0x92)](_0x3c69b1(0x86))),console['error'](_0x3c69b1(0xb9)),console['error'](_0x3c69b1(0x8a)),console[_0x3c69b1(0xb2)](_0x3c69b1(0x9c)),console[_0x3c69b1(0xb2)](_0x3c69b1(0xb1)),console['error'](_0x3c69b1(0x9b)),console['error'](_0x3c69b1(0x94)),0x1;const _0x383aaf=_0x1fe934[0x0],_0x4eef2c=_0x6cf56b['session'];try{if(_0x383aaf==='/')return saveSessionContext({'segment_path':undefined},_0x4eef2c),console[_0x3c69b1(0xa2)](a41_0xecf6ec['green'](_0x3c69b1(0xa9))),0x0;if(existsSync(_0x383aaf)&&statSync(_0x383aaf)['isDirectory']()){let _0x2894e1;try{_0x2894e1=findTdxConfig(_0x383aaf);}catch{return console['error'](a41_0xecf6ec[_0x3c69b1(0x92)](_0x3c69b1(0x95)+_0x383aaf)),console['error'](a41_0xecf6ec['cyan']('Tip:\x20Run\x20`tdx\x20sg\x20pull\x20<parent_name>`\x20first\x20to\x20create\x20the\x20folder\x20structure')),0x1;}const _0x4e4294=_0x2894e1[_0x3c69b1(0xac)][_0x3c69b1(0xa5)];return saveSessionContext({'segment_path':_0x4e4294,'parent_segment':_0x4e4294},_0x4eef2c),console[_0x3c69b1(0xa2)](a41_0xecf6ec[_0x3c69b1(0xaf)]('✔\x20Context\x20set\x20to:\x20'+a41_0xecf6ec['cyan'](_0x4e4294))),0x0;}const _0x273aba=_0x6cf56b[_0x3c69b1(0x8e)];let _0x3e2a1d=_0x383aaf;const _0x25b69a=parsePath(_0x383aaf);if(!_0x25b69a[_0x3c69b1(0x97)]){if(!_0x273aba)return console[_0x3c69b1(0xb2)](a41_0xecf6ec[_0x3c69b1(0x92)](_0x3c69b1(0xb5))),console['error'](a41_0xecf6ec[_0x3c69b1(0xb3)]('Use\x20an\x20absolute\x20path\x20or\x20set\x20context\x20with:\x20tdx\x20segment\x20use\x20<parent_name>')),0x1;if(_0x383aaf==='..'){const _0x4b9cf9=_0x273aba[_0x3c69b1(0xb4)]('/')[_0x3c69b1(0x9d)](0x0,-0x1)['join']('/');_0x3e2a1d=_0x4b9cf9||'/';}else _0x383aaf==='.'?_0x3e2a1d=_0x273aba:_0x3e2a1d=_0x273aba+'/'+_0x383aaf;_0x6cf56b[_0x3c69b1(0x9e)]&&console[_0x3c69b1(0xb2)](_0x3c69b1(0x8f)+_0x3e2a1d);}if(_0x3e2a1d==='/'||_0x3e2a1d==='')return saveSessionContext({'segment_path':undefined},_0x4eef2c),console[_0x3c69b1(0xa2)](a41_0xecf6ec['green'](_0x3c69b1(0xa9))),0x0;_0x3e2a1d=normalizePath(_0x3e2a1d);const _0x470198=parsePath(_0x3e2a1d)['segments'];if(_0x470198['length']===0x0)return saveSessionContext({'segment_path':undefined},_0x4eef2c),console[_0x3c69b1(0xa2)](a41_0xecf6ec['green'](_0x3c69b1(0xa9))),0x0;_0x6cf56b['verbose']&&(console['error'](_0x3c69b1(0x8d)+_0x6cf56b['site']),console[_0x3c69b1(0xb2)](_0x3c69b1(0x88)+_0x3e2a1d));const _0x30bcc4=await withSpinner('Resolving\x20path\x20\x27'+_0x3e2a1d+'\x27...',()=>_0x4ff1b3[_0x3c69b1(0x85)][_0x3c69b1(0xba)](_0x3e2a1d),{'verbose':_0x6cf56b[_0x3c69b1(0x9e)]}),_0x3e0b63=_0x30bcc4['data'];_0x6cf56b[_0x3c69b1(0x9e)]&&(console[_0x3c69b1(0xb2)](_0x3c69b1(0xae)+_0x3e0b63[_0x3c69b1(0x87)]),console[_0x3c69b1(0xb2)](_0x3c69b1(0x98)+_0x3e0b63['parentId']),_0x3e0b63[_0x3c69b1(0xa1)]&&console['error'](_0x3c69b1(0xb0)+_0x3e0b63[_0x3c69b1(0xa1)]));if(_0x3e0b63[_0x3c69b1(0x87)]===_0x3c69b1(0x85))return console['error'](a41_0xecf6ec[_0x3c69b1(0x92)]('Error:\x20Cannot\x20set\x20context\x20to\x20a\x20segment.')),console[_0x3c69b1(0xb2)](_0x3c69b1(0xa3)),console[_0x3c69b1(0xb2)](a41_0xecf6ec[_0x3c69b1(0xb3)]('Use:\x20tdx\x20segment\x20use\x20'+_0x3e0b63[_0x3c69b1(0x89)]+(_0x3e0b63[_0x3c69b1(0x9a)]?'/'+_0x3e0b63[_0x3c69b1(0x9a)]['join']('/'):''))),0x1;return saveSessionContext({'segment_path':_0x3e0b63[_0x3c69b1(0xad)],'parent_segment':_0x3e0b63['parentName']},_0x4eef2c),console['log'](a41_0xecf6ec[_0x3c69b1(0xaf)](_0x3c69b1(0x91)+a41_0xecf6ec[_0x3c69b1(0xb3)](_0x3e0b63[_0x3c69b1(0xad)]))),_0x6cf56b[_0x3c69b1(0x9e)]&&(console[_0x3c69b1(0xb2)](a41_0xecf6ec[_0x3c69b1(0x90)](_0x3c69b1(0xa7))),console['error'](a41_0xecf6ec['dim'](_0x3c69b1(0x8b)))),0x0;}catch(_0xf382fc){throw _0xf382fc;}}}
@@ -1 +1 @@
1
- const a42_0x34bc65=a42_0x35ad;(function(_0x3bde87,_0x3cb1c8){const _0x32dd7d=a42_0x35ad,_0x8164c8=_0x3bde87();while(!![]){try{const _0x1d47dc=-parseInt(_0x32dd7d(0xd8))/0x1*(parseInt(_0x32dd7d(0xfc))/0x2)+parseInt(_0x32dd7d(0xeb))/0x3+parseInt(_0x32dd7d(0xf1))/0x4+-parseInt(_0x32dd7d(0xfb))/0x5*(-parseInt(_0x32dd7d(0xe9))/0x6)+parseInt(_0x32dd7d(0xdf))/0x7+-parseInt(_0x32dd7d(0xe2))/0x8+-parseInt(_0x32dd7d(0xe8))/0x9;if(_0x1d47dc===_0x3cb1c8)break;else _0x8164c8['push'](_0x8164c8['shift']());}catch(_0x373964){_0x8164c8['push'](_0x8164c8['shift']());}}}(a42_0xac3e,0xc46e5));import{BaseCommand}from'./command.js';import{resolveTarget,isSuccessfulResolution}from'../sdk/segment/target-resolution.js';function a42_0xac3e(){const _0x26393c=['Error:\x20No\x20YAML\x20files\x20found\x20in\x20','1161088PLAFQH','\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','\x20warning(s)','parent_segment\x20is\x20not\x20set.\x20Use\x20`tdx\x20sg\x20use\x20<parent_name>`\x20to\x20set\x20it.\x0a','.yml','✔\x20All\x20','22671738CkvMTY','1986SzsgQy','execute','3271848OKwNfe','dim','Error:\x20','invalidCount','log','parentSegment','3509980pikCNg','.yaml','validCount','\x20file(s)\x20valid','Usage:\x20tdx\x20sg\x20validate\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Validate\x20all\x20(requires\x20context)','Validation\x20failed:\x20','helpText','cyan','valid','segment:validate','14555PhVIHJ','40vSwiKt','length','Validate\x20segment\x20and\x20journey\x20YAML\x20files','endsWith','error','errorCode','filePath','red','):\x20','warningCount','yellow','name','\x20file(s)\x20with\x20errors,\x20','cwd','message','\x20warning(s)\x20found','18572IZUDgN','green','hasErrors','targetDir','no_parent','description','warnings','6360109HsAOGw','\x20error(s)'];a42_0xac3e=function(){return _0x26393c;};return a42_0xac3e();}import{findYamlFiles}from'../sdk/segment/file-discovery.js';import{existsSync}from'fs';function a42_0x35ad(_0x954905,_0x483276){_0x954905=_0x954905-0xcc;const _0xac3e88=a42_0xac3e();let _0x35ad7f=_0xac3e88[_0x954905];return _0x35ad7f;}import a42_0x15991c 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{[a42_0x34bc65(0xd3)]=a42_0x34bc65(0xfa);[a42_0x34bc65(0xdd)]=a42_0x34bc65(0xfe);async[a42_0x34bc65(0xea)](_0xf8e66a){const _0x5ec824=a42_0x34bc65,{options:_0x217d88,args:_0x5c7906}=_0xf8e66a,_0x50da71=_0x217d88,_0x2c37a6=await resolveTarget({'arg':_0x5c7906[0x0],'contextParent':_0x217d88[_0x5ec824(0xf0)],'cwd':process[_0x5ec824(0xd5)]()});if(!isSuccessfulResolution(_0x2c37a6))return _0x2c37a6[_0x5ec824(0xcd)]===_0x5ec824(0xdc)?(console[_0x5ec824(0xcc)](a42_0x15991c['yellow'](_0x5ec824(0xe5))),console[_0x5ec824(0xcc)](_0x5ec824(0xf5)),console['error'](_0x5ec824(0xe3)),console[_0x5ec824(0xcc)]('\x20\x20\x20\x20\x20\x20\x20tdx\x20sg\x20validate\x20<file_path>\x20\x20#\x20Validate\x20specific\x20file')):(console[_0x5ec824(0xcc)](a42_0x15991c['red'](_0x5ec824(0xed)+_0x2c37a6[_0x5ec824(0xd6)]+'\x0a')),_0x2c37a6[_0x5ec824(0xf7)]&&console[_0x5ec824(0xcc)](a42_0x15991c[_0x5ec824(0xf8)](_0x2c37a6['helpText']))),0x1;const _0xac2741=_0x2c37a6[_0x5ec824(0xdb)],_0x5a5ff8=_0x2c37a6['type']==='file'?_0x2c37a6[_0x5ec824(0xce)]:undefined;if(!_0x5a5ff8&&!existsSync(_0xac2741))return console[_0x5ec824(0xcc)](a42_0x15991c[_0x5ec824(0xcf)]('Error:\x20Directory\x20not\x20found:\x20'+_0xac2741+'\x0a')),0x1;let _0x46f070;if(_0x5a5ff8){if(!_0x5a5ff8[_0x5ec824(0xff)](_0x5ec824(0xe6))&&!_0x5a5ff8[_0x5ec824(0xff)](_0x5ec824(0xf2)))return console['error'](a42_0x15991c[_0x5ec824(0xcf)]('Error:\x20File\x20must\x20have\x20.yml\x20or\x20.yaml\x20extension:\x20'+_0x5a5ff8+'\x0a')),0x1;_0x46f070=[_0x5a5ff8];}else _0x46f070=findYamlFiles(_0xac2741);if(_0x46f070['length']===0x0)return console[_0x5ec824(0xcc)](a42_0x15991c['red'](_0x5ec824(0xe1)+_0xac2741+'\x0a')),0x1;const _0xce5444=validateYamlFiles(_0x46f070,_0xac2741),_0x369f29=calculateSummary(_0xce5444);for(const _0x423ae9 of _0xce5444){if(!isValidationResult(_0x423ae9))continue;const {relativePath:_0x50271c,source:_0x3ede19,result:_0x489500,fileType:_0x242cc5}=_0x423ae9,_0x5534dd=_0x242cc5;if(_0x489500[_0x5ec824(0xf9)]&&_0x489500[_0x5ec824(0xde)][_0x5ec824(0xfd)]===0x0)_0x50da71['verbose']&&console[_0x5ec824(0xef)](a42_0x15991c[_0x5ec824(0xd9)]('✔\x20'+_0x50271c)+a42_0x15991c[_0x5ec824(0xec)]('\x20('+_0x5534dd+')'));else _0x489500[_0x5ec824(0xf9)]?(console[_0x5ec824(0xef)](a42_0x15991c[_0x5ec824(0xd2)]('⚠\x20'+_0x50271c)+a42_0x15991c[_0x5ec824(0xec)]('\x20('+_0x5534dd+_0x5ec824(0xd0)+_0x489500[_0x5ec824(0xde)]['length']+_0x5ec824(0xe4))),console[_0x5ec824(0xef)](formatValidationResult(_0x489500,_0x3ede19,_0x50271c))):(console[_0x5ec824(0xef)](a42_0x15991c[_0x5ec824(0xcf)]('✖\x20'+_0x50271c)+a42_0x15991c[_0x5ec824(0xec)]('\x20('+_0x5534dd+'):\x20'+_0x489500['errors'][_0x5ec824(0xfd)]+_0x5ec824(0xe0))),console['log'](formatValidationResult(_0x489500,_0x3ede19,_0x50271c)));}return console['log'](''),_0x369f29[_0x5ec824(0xda)]?(console[_0x5ec824(0xef)](a42_0x15991c[_0x5ec824(0xcf)](_0x5ec824(0xf6)+_0x369f29[_0x5ec824(0xee)]+_0x5ec824(0xd4)+_0x369f29[_0x5ec824(0xf3)]+'\x20valid')),_0x369f29[_0x5ec824(0xd1)]>0x0&&console['log'](a42_0x15991c['yellow'](_0x369f29[_0x5ec824(0xd1)]+_0x5ec824(0xd7))),0x1):(console[_0x5ec824(0xef)](a42_0x15991c[_0x5ec824(0xd9)](_0x5ec824(0xe7)+_0x369f29['validCount']+_0x5ec824(0xf4))),_0x369f29[_0x5ec824(0xd1)]>0x0&&console['log'](a42_0x15991c[_0x5ec824(0xd2)](_0x369f29['warningCount']+_0x5ec824(0xd7))),0x0);}}
1
+ const a42_0x2c571a=a42_0x8104;(function(_0xbee444,_0x58d371){const _0x19d9b9=a42_0x8104,_0x54214f=_0xbee444();while(!![]){try{const _0x2ce1fe=parseInt(_0x19d9b9(0xae))/0x1*(parseInt(_0x19d9b9(0x8f))/0x2)+parseInt(_0x19d9b9(0x8b))/0x3*(parseInt(_0x19d9b9(0x86))/0x4)+parseInt(_0x19d9b9(0x8c))/0x5+-parseInt(_0x19d9b9(0xb5))/0x6+-parseInt(_0x19d9b9(0xb1))/0x7+parseInt(_0x19d9b9(0x92))/0x8+parseInt(_0x19d9b9(0x9b))/0x9*(-parseInt(_0x19d9b9(0xab))/0xa);if(_0x2ce1fe===_0x58d371)break;else _0x54214f['push'](_0x54214f['shift']());}catch(_0x278686){_0x54214f['push'](_0x54214f['shift']());}}}(a42_0x212d,0x293d1));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 a42_0x336957 from'chalk';import{formatValidationResult}from'../sdk/segment/yaml-validator.js';import{validateYamlFiles,isValidationResult,calculateSummary}from'../sdk/segment/validate-files.js';function a42_0x8104(_0x8fe81a,_0xab2546){_0x8fe81a=_0x8fe81a-0x84;const _0x212d53=a42_0x212d();let _0x810497=_0x212d53[_0x8fe81a];return _0x810497;}function a42_0x212d(){const _0xa4efd1=['red','\x20warning(s)','Error:\x20','validCount','\x20warning(s)\x20found','Error:\x20File\x20must\x20have\x20.yml\x20or\x20.yaml\x20extension:\x20','verbose','):\x20','warningCount','file','cwd','82180glClsF','error','type','1YBUQmQ','hasErrors','filePath','2044210xTCslW','.yaml','parentSegment','valid','2009436QXtKHI','\x20file(s)\x20with\x20errors,\x20','yellow','segment:validate','4YkghSl','warnings','Validate\x20segment\x20and\x20journey\x20YAML\x20files','.yml','\x20file(s)\x20valid','776409fXGJXa','1328095MGfbsV','no_parent','errors','671166BlhWWM','Usage:\x20tdx\x20sg\x20validate\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Validate\x20all\x20(requires\x20context)','green','867376jiPyiT','\x20\x20\x20\x20\x20\x20\x20tdx\x20sg\x20validate\x20<file_path>\x20\x20#\x20Validate\x20specific\x20file','\x20error(s)','length','targetDir','parent_segment\x20is\x20not\x20set.\x20Use\x20`tdx\x20sg\x20use\x20<parent_name>`\x20to\x20set\x20it.\x0a','log','name','endsWith','189pimoTT','\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','✔\x20All\x20','dim','Error:\x20No\x20YAML\x20files\x20found\x20in\x20'];a42_0x212d=function(){return _0xa4efd1;};return a42_0x212d();}export class SegmentValidateCommand extends BaseCommand{[a42_0x2c571a(0x99)]=a42_0x2c571a(0x85);['description']=a42_0x2c571a(0x88);async['execute'](_0x252cf4){const _0x14b00e=a42_0x2c571a,{options:_0x5aac2b,args:_0x3bded2}=_0x252cf4,_0x4e0a95=_0x5aac2b,_0x33f266=await resolveTarget({'arg':_0x3bded2[0x0],'contextParent':_0x5aac2b[_0x14b00e(0xb3)],'cwd':process[_0x14b00e(0xaa)]()});if(!isSuccessfulResolution(_0x33f266))return _0x33f266['errorCode']===_0x14b00e(0x8d)?(console['error'](a42_0x336957[_0x14b00e(0x84)](_0x14b00e(0x97))),console[_0x14b00e(0xac)](_0x14b00e(0x90)),console['error'](_0x14b00e(0x9c)),console['error'](_0x14b00e(0x93))):(console[_0x14b00e(0xac)](a42_0x336957[_0x14b00e(0xa0)](_0x14b00e(0xa2)+_0x33f266['message']+'\x0a')),_0x33f266['helpText']&&console[_0x14b00e(0xac)](a42_0x336957['cyan'](_0x33f266['helpText']))),0x1;const _0x7e781e=_0x33f266[_0x14b00e(0x96)],_0x160c8e=_0x33f266[_0x14b00e(0xad)]===_0x14b00e(0xa9)?_0x33f266[_0x14b00e(0xb0)]:undefined;if(!_0x160c8e&&!existsSync(_0x7e781e))return console[_0x14b00e(0xac)](a42_0x336957[_0x14b00e(0xa0)]('Error:\x20Directory\x20not\x20found:\x20'+_0x7e781e+'\x0a')),0x1;let _0x242ed3;if(_0x160c8e){if(!_0x160c8e[_0x14b00e(0x9a)](_0x14b00e(0x89))&&!_0x160c8e[_0x14b00e(0x9a)](_0x14b00e(0xb2)))return console[_0x14b00e(0xac)](a42_0x336957['red'](_0x14b00e(0xa5)+_0x160c8e+'\x0a')),0x1;_0x242ed3=[_0x160c8e];}else _0x242ed3=findYamlFiles(_0x7e781e);if(_0x242ed3[_0x14b00e(0x95)]===0x0)return console['error'](a42_0x336957[_0x14b00e(0xa0)](_0x14b00e(0x9f)+_0x7e781e+'\x0a')),0x1;const _0x598d7c=validateYamlFiles(_0x242ed3,_0x7e781e),_0x2f9be0=calculateSummary(_0x598d7c);for(const _0xc9e5c of _0x598d7c){if(!isValidationResult(_0xc9e5c))continue;const {relativePath:_0x3555a5,source:_0x1bddf5,result:_0x6a5d30,fileType:_0x33696e}=_0xc9e5c,_0x3ed084=_0x33696e;if(_0x6a5d30[_0x14b00e(0xb4)]&&_0x6a5d30[_0x14b00e(0x87)][_0x14b00e(0x95)]===0x0)_0x4e0a95[_0x14b00e(0xa6)]&&console[_0x14b00e(0x98)](a42_0x336957['green']('✔\x20'+_0x3555a5)+a42_0x336957['dim']('\x20('+_0x3ed084+')'));else _0x6a5d30[_0x14b00e(0xb4)]?(console['log'](a42_0x336957[_0x14b00e(0x84)]('⚠\x20'+_0x3555a5)+a42_0x336957[_0x14b00e(0x9e)]('\x20('+_0x3ed084+_0x14b00e(0xa7)+_0x6a5d30[_0x14b00e(0x87)]['length']+_0x14b00e(0xa1))),console[_0x14b00e(0x98)](formatValidationResult(_0x6a5d30,_0x1bddf5,_0x3555a5))):(console[_0x14b00e(0x98)](a42_0x336957['red']('✖\x20'+_0x3555a5)+a42_0x336957[_0x14b00e(0x9e)]('\x20('+_0x3ed084+_0x14b00e(0xa7)+_0x6a5d30[_0x14b00e(0x8e)]['length']+_0x14b00e(0x94))),console[_0x14b00e(0x98)](formatValidationResult(_0x6a5d30,_0x1bddf5,_0x3555a5)));}return console[_0x14b00e(0x98)](''),_0x2f9be0[_0x14b00e(0xaf)]?(console[_0x14b00e(0x98)](a42_0x336957[_0x14b00e(0xa0)]('Validation\x20failed:\x20'+_0x2f9be0['invalidCount']+_0x14b00e(0xb6)+_0x2f9be0[_0x14b00e(0xa3)]+'\x20valid')),_0x2f9be0[_0x14b00e(0xa8)]>0x0&&console[_0x14b00e(0x98)](a42_0x336957[_0x14b00e(0x84)](_0x2f9be0['warningCount']+'\x20warning(s)\x20found')),0x1):(console[_0x14b00e(0x98)](a42_0x336957[_0x14b00e(0x91)](_0x14b00e(0x9d)+_0x2f9be0[_0x14b00e(0xa3)]+_0x14b00e(0x8a))),_0x2f9be0['warningCount']>0x0&&console['log'](a42_0x336957[_0x14b00e(0x84)](_0x2f9be0[_0x14b00e(0xa8)]+_0x14b00e(0xa4))),0x0);}}
@@ -1 +1 @@
1
- const a43_0x54cc2f=a43_0x582c;(function(_0x358cc1,_0x54bcc3){const _0x423b73=a43_0x582c,_0x5d6483=_0x358cc1();while(!![]){try{const _0x4a5033=-parseInt(_0x423b73(0x1b6))/0x1*(parseInt(_0x423b73(0x18b))/0x2)+-parseInt(_0x423b73(0x19e))/0x3*(-parseInt(_0x423b73(0x1ca))/0x4)+parseInt(_0x423b73(0x1cc))/0x5+parseInt(_0x423b73(0x1c6))/0x6*(parseInt(_0x423b73(0x1c0))/0x7)+-parseInt(_0x423b73(0x197))/0x8+-parseInt(_0x423b73(0x1d3))/0x9+-parseInt(_0x423b73(0x1ce))/0xa;if(_0x4a5033===_0x54bcc3)break;else _0x5d6483['push'](_0x5d6483['shift']());}catch(_0x70b64d){_0x5d6483['push'](_0x5d6483['shift']());}}}(a43_0x123a,0x95869));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleSDKOutput}from'../core/command-output.js';import{withSpinner}from'../utils/spinner.js';function a43_0x123a(){const _0x11a74a=['Use\x20tdx\x20ps\x20list\x20to\x20see\x20available\x20parent\x20segments.','Resolving\x20path\x20\x27','24051ajOWVa','Building\x20hierarchy\x20tree...','length','List\x20folders\x20and\x20child\x20segments','\x20folder',']\x20matching\x20\x27','format','filter','(not\x20set)','map','parentSegment','verbose','Set\x20a\x20parent\x20segment\x20context\x20first:','Site:\x20','error','log','children','folders','json','✔\x20Found\x20','\x20journey','listWithPattern','site','\x20\x20Cause:\x20','1PZUNIq','maxDepth','dim','type','\x20matching\x20\x27','journeyBundleName','\x20\x20tdx\x20sg\x20use\x20\x22My\x20Audience\x22','segment','Listing\x20folders,\x20segments,\x20and\x20journeys...','Error:\x20No\x20parent\x20segment\x20context\x20set.','189kmOPKI','localeCompare','\x20segment','parentId','name','execute','123378NIRFnn','journeys','test','segments','368ZNPpBG','\x27...','2911240ZvHMfr','listUnified','3833980csYAax','/j/da','jsonl','includes','folderId','1051119NNRrlh','(empty)','Resolving\x20parent\x20segment\x20\x27','journey','listRecursive','1107732NNlBAZ','replace','Folder\x20ID:\x20','resolvePathToResource','data','recursive','Parent\x20ID:\x20','/app/ps/','/e/','cause','✔\x20Built\x20tree\x20with\x20',',\x20and\x20','1668008hJCaJA','sort','folder','listUnifiedWithJourneys','Error:\x20'];a43_0x123a=function(){return _0x11a74a;};return a43_0x123a();}import{formatFlatList,formatTree}from'../sdk/util/tree-formatter.js';function a43_0x582c(_0x1cdec0,_0x437b3c){_0x1cdec0=_0x1cdec0-0x18b;const _0x123a36=a43_0x123a();let _0x582c0a=_0x123a36[_0x1cdec0];return _0x582c0a;}import{getConsoleNextUrl}from'../sdk/client/endpoints.js';import a43_0x1c3c77 from'chalk';export class SegmentsCommand extends BaseCommand{[a43_0x54cc2f(0x1c4)]=a43_0x54cc2f(0x1c9);['description']=a43_0x54cc2f(0x1a1);async[a43_0x54cc2f(0x1c5)](_0x3c258e){const _0x319907=a43_0x54cc2f,{options:_0x4134d8,args:_0x58dde1}=_0x3c258e,_0x1028fb=_0x4134d8[_0x319907(0x190)],_0x52a01b=_0x58dde1[0x0];try{const _0x39f51e=_0x4134d8[_0x319907(0x1a8)];_0x4134d8[_0x319907(0x1a9)]&&(console[_0x319907(0x1ac)](_0x319907(0x1ab)+_0x4134d8['site']),console['error']('Parent\x20segment\x20context:\x20'+(_0x39f51e||_0x319907(0x1a6))),_0x52a01b&&console[_0x319907(0x1ac)]('Folder/pattern\x20arg:\x20'+_0x52a01b),_0x1028fb&&console[_0x319907(0x1ac)]('Recursive\x20mode:\x20enabled'));if(!_0x39f51e)return console[_0x319907(0x1ac)](_0x319907(0x1bf)),console[_0x319907(0x1ac)](''),console[_0x319907(0x1ac)](_0x319907(0x1aa)),console[_0x319907(0x1ac)]('\x20\x20tdx\x20sg\x20pull\x20\x22My\x20Audience\x22'),console[_0x319907(0x1ac)](_0x319907(0x1bc)),console[_0x319907(0x1ac)](''),console[_0x319907(0x1ac)](_0x319907(0x19c)),0x1;const _0x24e662=_0x52a01b&&(_0x52a01b[_0x319907(0x1d1)]('*')||_0x52a01b[_0x319907(0x1d1)]('?'));if(_0x24e662)return await this['listWithPattern'](_0x3c258e,_0x39f51e,_0x52a01b);const _0x22cf43=_0x52a01b?_0x39f51e+'/'+_0x52a01b:_0x39f51e;return _0x1028fb?await this[_0x319907(0x1d7)](_0x3c258e,_0x22cf43):await this['listUnified'](_0x3c258e,_0x22cf43);}catch(_0x321e0f){if(_0x321e0f instanceof SDKError)return console[_0x319907(0x1ac)](_0x319907(0x19b)+_0x321e0f['message']),_0x321e0f[_0x319907(0x194)]&&console[_0x319907(0x1ac)](_0x319907(0x1b5)+_0x321e0f[_0x319907(0x194)]),0x1;throw _0x321e0f;}}async[a43_0x54cc2f(0x1b3)](_0x4b847e,_0x5e97bf,_0x52d89d){const _0x320c74=a43_0x54cc2f,{options:_0x556f78,tdx:_0x1ceec6}=_0x4b847e,_0x3d6b15=await withSpinner(_0x320c74(0x1d5)+_0x5e97bf+_0x320c74(0x1cb),()=>_0x1ceec6[_0x320c74(0x1bd)][_0x320c74(0x18e)](_0x5e97bf),{'verbose':_0x556f78[_0x320c74(0x1a9)]}),_0x38bd85=_0x3d6b15[_0x320c74(0x18f)],_0x186593=await withSpinner(_0x320c74(0x1be),()=>_0x1ceec6[_0x320c74(0x1bd)][_0x320c74(0x19a)](_0x38bd85['parentId'],_0x38bd85[_0x320c74(0x1d2)]),{'verbose':_0x556f78['verbose']}),{folders:_0x1b6da5,segments:_0x47bdd2,journeys:_0x183381}=_0x186593[_0x320c74(0x18f)],_0x40cb23=_0x52d89d[_0x320c74(0x18c)](/[.+^${}()|[\]\\]/g,'\x5c$&')[_0x320c74(0x18c)](/\*/g,'.*')['replace'](/\?/g,'.'),_0x3553aa=new RegExp('^'+_0x40cb23+'$','i'),_0x569147=_0x1b6da5[_0x320c74(0x1a5)](_0x39f7b0=>_0x3553aa[_0x320c74(0x1c8)](_0x39f7b0[_0x320c74(0x1c4)])),_0x197a89=_0x47bdd2[_0x320c74(0x1a5)](_0x1e2b62=>_0x3553aa[_0x320c74(0x1c8)](_0x1e2b62[_0x320c74(0x1c4)])),_0x2e750a=_0x183381[_0x320c74(0x1a5)](_0x313233=>_0x3553aa[_0x320c74(0x1c8)](_0x313233['journeyBundleName'])),_0x423f19=_0x569147[_0x320c74(0x1a0)]+_0x197a89['length']+_0x2e750a[_0x320c74(0x1a0)];console[_0x320c74(0x1ac)](_0x320c74(0x1b1)+_0x569147['length']+_0x320c74(0x1a2)+(_0x569147[_0x320c74(0x1a0)]!==0x1?'s':'')+',\x20'+_0x197a89[_0x320c74(0x1a0)]+_0x320c74(0x1c2)+(_0x197a89[_0x320c74(0x1a0)]!==0x1?'s':'')+_0x320c74(0x196)+_0x2e750a[_0x320c74(0x1a0)]+_0x320c74(0x1b2)+(_0x2e750a[_0x320c74(0x1a0)]!==0x1?'s':'')+_0x320c74(0x1ba)+_0x52d89d+'\x27');const _0x40e8d2=_0x3c27e5=>{const _0x3715fa=_0x320c74;return getConsoleNextUrl(_0x556f78[_0x3715fa(0x1b4)],'/app/ps/'+_0x38bd85[_0x3715fa(0x1c3)]+_0x3715fa(0x193)+_0x3c27e5);},_0x136bb7=_0x556f78['format']===_0x320c74(0x1b0)||_0x556f78['format']==='jsonl';if(_0x136bb7){const _0x17b81f=[..._0x569147[_0x320c74(0x1a7)](_0x50faa3=>({..._0x50faa3,'type':_0x320c74(0x199)})),..._0x197a89[_0x320c74(0x1a7)](_0x24c58e=>({..._0x24c58e,'type':_0x320c74(0x1bd),'url':_0x40e8d2(_0x24c58e['id'])})),..._0x2e750a[_0x320c74(0x1a7)](_0x3d7caa=>({..._0x3d7caa,'name':_0x3d7caa[_0x320c74(0x1bb)],'type':_0x320c74(0x1d6)}))][_0x320c74(0x198)]((_0x242a5a,_0x4d7380)=>_0x242a5a[_0x320c74(0x1c4)][_0x320c74(0x1c1)](_0x4d7380[_0x320c74(0x1c4)]));await handleSDKOutput(_0x17b81f,_0x556f78);}else{if(_0x423f19===0x0)console[_0x320c74(0x1ad)]('No\x20items\x20match\x20pattern:\x20'+_0x52d89d);else{console[_0x320c74(0x1ad)](a43_0x1c3c77['dim']('['+_0x5e97bf+_0x320c74(0x1a3)+_0x52d89d+'\x27'));const _0x4a57f6=formatFlatList(_0x569147,_0x197a89,{'showMetadata':!![],'getSegmentUrl':_0x40e8d2},_0x2e750a);console['log'](_0x4a57f6);}}return 0x0;}async[a43_0x54cc2f(0x1cd)](_0x58d891,_0x3e225d){const _0x25523f=a43_0x54cc2f,{options:_0x3f2c3e,tdx:_0x183415}=_0x58d891,_0x3f7dcb=await withSpinner(_0x25523f(0x19d)+_0x3e225d+_0x25523f(0x1cb),()=>_0x183415[_0x25523f(0x1bd)][_0x25523f(0x18e)](_0x3e225d),{'verbose':_0x3f2c3e['verbose']}),_0x57d746=_0x3f7dcb['data'];_0x3f2c3e[_0x25523f(0x1a9)]&&(console[_0x25523f(0x1ac)](_0x25523f(0x191)+_0x57d746[_0x25523f(0x1c3)]),_0x57d746['folderId']&&console['error'](_0x25523f(0x18d)+_0x57d746['folderId']));const _0x17b63b=await withSpinner(_0x25523f(0x1be),()=>_0x183415[_0x25523f(0x1bd)][_0x25523f(0x19a)](_0x57d746[_0x25523f(0x1c3)],_0x57d746['folderId']),{'verbose':_0x3f2c3e[_0x25523f(0x1a9)]}),{folders:_0x38501c,segments:_0x3f2d66,journeys:_0x3e3052}=_0x17b63b['data'],_0x1c1724=_0x38501c[_0x25523f(0x1a0)]+_0x3f2d66[_0x25523f(0x1a0)]+_0x3e3052[_0x25523f(0x1a0)];console[_0x25523f(0x1ac)](_0x25523f(0x1b1)+_0x38501c['length']+'\x20folder'+(_0x38501c['length']!==0x1?'s':'')+',\x20'+_0x3f2d66['length']+_0x25523f(0x1c2)+(_0x3f2d66[_0x25523f(0x1a0)]!==0x1?'s':'')+',\x20and\x20'+_0x3e3052['length']+'\x20journey'+(_0x3e3052[_0x25523f(0x1a0)]!==0x1?'s':''));const _0x5e5d2d=_0x4717dc=>{const _0x4d0fe7=_0x25523f;return getConsoleNextUrl(_0x3f2c3e[_0x4d0fe7(0x1b4)],_0x4d0fe7(0x192)+_0x57d746[_0x4d0fe7(0x1c3)]+'/e/'+_0x4717dc);},_0x3cd46e=_0x14eb75=>{const _0x16094a=_0x25523f;return getConsoleNextUrl(_0x3f2c3e[_0x16094a(0x1b4)],'/app/ps/'+_0x57d746['parentId']+_0x16094a(0x193)+_0x14eb75+_0x16094a(0x1cf));},_0x531c88=_0x3f2c3e[_0x25523f(0x1a4)]===_0x25523f(0x1b0)||_0x3f2c3e[_0x25523f(0x1a4)]==='jsonl';if(_0x531c88){const _0x1cc560=[..._0x38501c[_0x25523f(0x1a7)](_0x4ce691=>({..._0x4ce691,'type':_0x25523f(0x199)})),..._0x3f2d66[_0x25523f(0x1a7)](_0x36f34d=>({..._0x36f34d,'type':'segment','url':_0x5e5d2d(_0x36f34d['id'])})),..._0x3e3052[_0x25523f(0x1a7)](_0x393446=>({..._0x393446,'name':_0x393446[_0x25523f(0x1bb)],'type':_0x25523f(0x1d6),'url':_0x3cd46e(_0x393446['id'])}))][_0x25523f(0x198)]((_0x2a0108,_0x1a2a2d)=>_0x2a0108[_0x25523f(0x1c4)][_0x25523f(0x1c1)](_0x1a2a2d[_0x25523f(0x1c4)]));await handleSDKOutput(_0x1cc560,_0x3f2c3e);}else{if(_0x1c1724===0x0)console['log'](a43_0x1c3c77[_0x25523f(0x1b8)]('['+_0x3e225d+']')),console['log'](_0x25523f(0x1d4));else{console[_0x25523f(0x1ad)](a43_0x1c3c77[_0x25523f(0x1b8)]('['+_0x3e225d+']'));const _0x261200=formatFlatList(_0x38501c,_0x3f2d66,{'showMetadata':!![],'getSegmentUrl':_0x5e5d2d,'getJourneyUrl':_0x3cd46e},_0x3e3052);console[_0x25523f(0x1ad)](_0x261200);}}return 0x0;}async['listRecursive'](_0x58fd5e,_0x320fed){const _0x535f05=a43_0x54cc2f,{options:_0xd7f6ba,tdx:_0xbe244a}=_0x58fd5e,_0x429709=await withSpinner('Resolving\x20path\x20\x27'+_0x320fed+'\x27...',()=>_0xbe244a['segment'][_0x535f05(0x18e)](_0x320fed),{'verbose':_0xd7f6ba['verbose']}),_0x46b6bc=_0x429709[_0x535f05(0x18f)];_0xd7f6ba[_0x535f05(0x1a9)]&&(console[_0x535f05(0x1ac)](_0x535f05(0x191)+_0x46b6bc['parentId']),_0x46b6bc[_0x535f05(0x1d2)]&&console[_0x535f05(0x1ac)](_0x535f05(0x18d)+_0x46b6bc[_0x535f05(0x1d2)]));const _0x5e636f=_0xd7f6ba[_0x535f05(0x1b7)]||0xa,_0x5ad089=await withSpinner(_0x535f05(0x19f),()=>_0xbe244a[_0x535f05(0x1bd)][_0x535f05(0x1d7)](_0x46b6bc[_0x535f05(0x1c3)],_0x46b6bc[_0x535f05(0x1d2)],0x0,_0x5e636f),{'verbose':_0xd7f6ba['verbose']}),_0x4416ef=_0x5ad089[_0x535f05(0x18f)],_0x1c3f28=_0x253da3=>{const _0x29e68e=_0x535f05;let _0x275282=0x0,_0x58fb6a=0x0,_0x4c5ed2=0x0;for(const _0x402c91 of _0x253da3){if(_0x402c91[_0x29e68e(0x1b9)]==='folder')_0x275282++;else{if(_0x402c91[_0x29e68e(0x1b9)]===_0x29e68e(0x1bd))_0x58fb6a++;else{if(_0x402c91['type']===_0x29e68e(0x1d6))_0x4c5ed2++;}}if(_0x402c91[_0x29e68e(0x1ae)]){const _0x7184fd=_0x1c3f28(_0x402c91['children']);_0x275282+=_0x7184fd[_0x29e68e(0x1af)],_0x58fb6a+=_0x7184fd[_0x29e68e(0x1c9)],_0x4c5ed2+=_0x7184fd[_0x29e68e(0x1c7)];}}return{'folders':_0x275282,'segments':_0x58fb6a,'journeys':_0x4c5ed2};},_0x534989=_0x1c3f28(_0x4416ef);console['error'](_0x535f05(0x195)+_0x534989[_0x535f05(0x1af)]+_0x535f05(0x1a2)+(_0x534989[_0x535f05(0x1af)]!==0x1?'s':'')+',\x20'+_0x534989[_0x535f05(0x1c9)]+_0x535f05(0x1c2)+(_0x534989[_0x535f05(0x1c9)]!==0x1?'s':'')+',\x20and\x20'+_0x534989[_0x535f05(0x1c7)]+_0x535f05(0x1b2)+(_0x534989[_0x535f05(0x1c7)]!==0x1?'s':''));const _0x4f0d1b=_0x21afe3=>{const _0x210d23=_0x535f05;return getConsoleNextUrl(_0xd7f6ba['site'],_0x210d23(0x192)+_0x46b6bc[_0x210d23(0x1c3)]+_0x210d23(0x193)+_0x21afe3);},_0x3bdb0f=_0x3febdf=>{const _0x14a7af=_0x535f05;return getConsoleNextUrl(_0xd7f6ba['site'],_0x14a7af(0x192)+_0x46b6bc['parentId']+_0x14a7af(0x193)+_0x3febdf+'/j/da');};if(_0xd7f6ba['format']===_0x535f05(0x1b0)||_0xd7f6ba[_0x535f05(0x1a4)]===_0x535f05(0x1d0))await handleSDKOutput(_0x4416ef,_0xd7f6ba);else{console[_0x535f05(0x1ad)](a43_0x1c3c77[_0x535f05(0x1b8)]('['+_0x320fed+']'));const _0x7fb8fd=formatTree(_0x4416ef,{'showMetadata':!![],'getSegmentUrl':_0x4f0d1b,'getJourneyUrl':_0x3bdb0f});console[_0x535f05(0x1ad)](_0x7fb8fd);}return 0x0;}}
1
+ function a43_0x508d(){const _0x3baffe=['data','\x20segment',',\x20and\x20','Set\x20a\x20parent\x20segment\x20context\x20first:','json','dim','folder','Error:\x20No\x20parent\x20segment\x20context\x20set.','2337912tNKsDO','No\x20items\x20match\x20pattern:\x20','journeys','map','/app/ps/','replace','name','filter','(not\x20set)','186ZtVQCv','Listing\x20folders,\x20segments,\x20and\x20journeys...','children','execute','\x27...','listRecursive','folders','listWithPattern','description','Parent\x20segment\x20context:\x20','57497aONQtg','\x20journey','4740tHoZQv','log','\x5c$&','Site:\x20','error','jsonl','Folder\x20ID:\x20','\x20\x20tdx\x20sg\x20pull\x20\x22My\x20Audience\x22','/e/','24fxqVaY','resolvePathToResource','✔\x20Found\x20','journey','Parent\x20ID:\x20',']\x20matching\x20\x27','listUnified','(empty)','journeyBundleName','\x20\x20tdx\x20sg\x20use\x20\x22My\x20Audience\x22','2762901EwYhbR','/j/da','maxDepth','format','\x20matching\x20\x27','recursive','test','segments','parentSegment','✔\x20Built\x20tree\x20with\x20','includes','1437569tMeXVj','17586gLBsFj','verbose','2484jXalCc','type','Use\x20tdx\x20ps\x20list\x20to\x20see\x20available\x20parent\x20segments.','\x20\x20Cause:\x20','folderId','sort','segment','510iScdli','site','\x20folder','2270cCZddp','length','Resolving\x20path\x20\x27','parentId','localeCompare','cause'];a43_0x508d=function(){return _0x3baffe;};return a43_0x508d();}function a43_0x25b7(_0x3f9770,_0x314708){_0x3f9770=_0x3f9770-0x153;const _0x508d6b=a43_0x508d();let _0x25b7d8=_0x508d6b[_0x3f9770];return _0x25b7d8;}const a43_0x21ed64=a43_0x25b7;(function(_0x1c381b,_0x4ab51e){const _0x5773a0=a43_0x25b7,_0x15c12e=_0x1c381b();while(!![]){try{const _0x37bc90=parseInt(_0x5773a0(0x19a))/0x1+parseInt(_0x5773a0(0x17b))/0x2*(parseInt(_0x5773a0(0x16f))/0x3)+-parseInt(_0x5773a0(0x19c))/0x4*(parseInt(_0x5773a0(0x158))/0x5)+parseInt(_0x5773a0(0x184))/0x6*(parseInt(_0x5773a0(0x199))/0x7)+parseInt(_0x5773a0(0x166))/0x8+-parseInt(_0x5773a0(0x18e))/0x9+parseInt(_0x5773a0(0x155))/0xa*(-parseInt(_0x5773a0(0x179))/0xb);if(_0x37bc90===_0x4ab51e)break;else _0x15c12e['push'](_0x15c12e['shift']());}catch(_0x574ea3){_0x15c12e['push'](_0x15c12e['shift']());}}}(a43_0x508d,0x6734d));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleSDKOutput}from'../core/command-output.js';import{withSpinner}from'../utils/spinner.js';import{formatFlatList,formatTree}from'../sdk/util/tree-formatter.js';import{getConsoleNextUrl}from'../sdk/client/endpoints.js';import a43_0x544e27 from'chalk';export class SegmentsCommand extends BaseCommand{[a43_0x21ed64(0x16c)]=a43_0x21ed64(0x195);[a43_0x21ed64(0x177)]='List\x20folders\x20and\x20child\x20segments';async[a43_0x21ed64(0x172)](_0x73db0a){const _0xf65cc6=a43_0x21ed64,{options:_0x551784,args:_0x32a832}=_0x73db0a,_0x26775e=_0x551784[_0xf65cc6(0x193)],_0x3c17d3=_0x32a832[0x0];try{const _0x2971b2=_0x551784[_0xf65cc6(0x196)];_0x551784[_0xf65cc6(0x19b)]&&(console[_0xf65cc6(0x17f)](_0xf65cc6(0x17e)+_0x551784[_0xf65cc6(0x156)]),console[_0xf65cc6(0x17f)](_0xf65cc6(0x178)+(_0x2971b2||_0xf65cc6(0x16e))),_0x3c17d3&&console[_0xf65cc6(0x17f)]('Folder/pattern\x20arg:\x20'+_0x3c17d3),_0x26775e&&console[_0xf65cc6(0x17f)]('Recursive\x20mode:\x20enabled'));if(!_0x2971b2)return console[_0xf65cc6(0x17f)](_0xf65cc6(0x165)),console[_0xf65cc6(0x17f)](''),console[_0xf65cc6(0x17f)](_0xf65cc6(0x161)),console['error'](_0xf65cc6(0x182)),console[_0xf65cc6(0x17f)](_0xf65cc6(0x18d)),console['error'](''),console[_0xf65cc6(0x17f)](_0xf65cc6(0x19e)),0x1;const _0x1d5fc6=_0x3c17d3&&(_0x3c17d3[_0xf65cc6(0x198)]('*')||_0x3c17d3[_0xf65cc6(0x198)]('?'));if(_0x1d5fc6)return await this[_0xf65cc6(0x176)](_0x73db0a,_0x2971b2,_0x3c17d3);const _0xf9be3b=_0x3c17d3?_0x2971b2+'/'+_0x3c17d3:_0x2971b2;return _0x26775e?await this['listRecursive'](_0x73db0a,_0xf9be3b):await this['listUnified'](_0x73db0a,_0xf9be3b);}catch(_0x209d0a){if(_0x209d0a instanceof SDKError)return console[_0xf65cc6(0x17f)]('Error:\x20'+_0x209d0a['message']),_0x209d0a[_0xf65cc6(0x15d)]&&console[_0xf65cc6(0x17f)](_0xf65cc6(0x19f)+_0x209d0a[_0xf65cc6(0x15d)]),0x1;throw _0x209d0a;}}async[a43_0x21ed64(0x176)](_0x4e5eeb,_0x2bf2e0,_0x55c428){const _0x405c15=a43_0x21ed64,{options:_0x2d6300,tdx:_0x1fa31d}=_0x4e5eeb,_0x477232=await withSpinner('Resolving\x20parent\x20segment\x20\x27'+_0x2bf2e0+_0x405c15(0x173),()=>_0x1fa31d[_0x405c15(0x154)][_0x405c15(0x185)](_0x2bf2e0),{'verbose':_0x2d6300[_0x405c15(0x19b)]}),_0x3e1cc9=_0x477232[_0x405c15(0x15e)],_0x283f96=await withSpinner(_0x405c15(0x170),()=>_0x1fa31d[_0x405c15(0x154)]['listUnifiedWithJourneys'](_0x3e1cc9[_0x405c15(0x15b)],_0x3e1cc9[_0x405c15(0x1a0)]),{'verbose':_0x2d6300[_0x405c15(0x19b)]}),{folders:_0x49d42b,segments:_0x3ea75f,journeys:_0x4b36ad}=_0x283f96['data'],_0x3e66d6=_0x55c428[_0x405c15(0x16b)](/[.+^${}()|[\]\\]/g,_0x405c15(0x17d))['replace'](/\*/g,'.*')['replace'](/\?/g,'.'),_0x208530=new RegExp('^'+_0x3e66d6+'$','i'),_0x16b9f8=_0x49d42b['filter'](_0x4b345d=>_0x208530[_0x405c15(0x194)](_0x4b345d[_0x405c15(0x16c)])),_0x1e4e85=_0x3ea75f[_0x405c15(0x16d)](_0x43acd6=>_0x208530[_0x405c15(0x194)](_0x43acd6['name'])),_0xc8d3d7=_0x4b36ad[_0x405c15(0x16d)](_0x5d521e=>_0x208530[_0x405c15(0x194)](_0x5d521e[_0x405c15(0x18c)])),_0x26e951=_0x16b9f8['length']+_0x1e4e85['length']+_0xc8d3d7[_0x405c15(0x159)];console[_0x405c15(0x17f)](_0x405c15(0x186)+_0x16b9f8['length']+_0x405c15(0x157)+(_0x16b9f8[_0x405c15(0x159)]!==0x1?'s':'')+',\x20'+_0x1e4e85[_0x405c15(0x159)]+_0x405c15(0x15f)+(_0x1e4e85[_0x405c15(0x159)]!==0x1?'s':'')+_0x405c15(0x160)+_0xc8d3d7['length']+'\x20journey'+(_0xc8d3d7[_0x405c15(0x159)]!==0x1?'s':'')+_0x405c15(0x192)+_0x55c428+'\x27');const _0x3e8bf5=_0x1fd148=>{const _0x469508=_0x405c15;return getConsoleNextUrl(_0x2d6300[_0x469508(0x156)],_0x469508(0x16a)+_0x3e1cc9[_0x469508(0x15b)]+_0x469508(0x183)+_0x1fd148);},_0x5d1eda=_0x2d6300[_0x405c15(0x191)]===_0x405c15(0x162)||_0x2d6300[_0x405c15(0x191)]==='jsonl';if(_0x5d1eda){const _0x3a75cf=[..._0x16b9f8['map'](_0x2c00bf=>({..._0x2c00bf,'type':'folder'})),..._0x1e4e85['map'](_0x31c116=>({..._0x31c116,'type':_0x405c15(0x154),'url':_0x3e8bf5(_0x31c116['id'])})),..._0xc8d3d7[_0x405c15(0x169)](_0x35c9c=>({..._0x35c9c,'name':_0x35c9c[_0x405c15(0x18c)],'type':_0x405c15(0x187)}))]['sort']((_0x5502b5,_0x46d1a3)=>_0x5502b5['name'][_0x405c15(0x15c)](_0x46d1a3[_0x405c15(0x16c)]));await handleSDKOutput(_0x3a75cf,_0x2d6300);}else{if(_0x26e951===0x0)console['log'](_0x405c15(0x167)+_0x55c428);else{console[_0x405c15(0x17c)](a43_0x544e27[_0x405c15(0x163)]('['+_0x2bf2e0+_0x405c15(0x189)+_0x55c428+'\x27'));const _0x44f600=formatFlatList(_0x16b9f8,_0x1e4e85,{'showMetadata':!![],'getSegmentUrl':_0x3e8bf5},_0xc8d3d7);console[_0x405c15(0x17c)](_0x44f600);}}return 0x0;}async[a43_0x21ed64(0x18a)](_0x3c2d5d,_0x2aa7af){const _0x5e695c=a43_0x21ed64,{options:_0x5afe97,tdx:_0x1ff657}=_0x3c2d5d,_0xa560eb=await withSpinner(_0x5e695c(0x15a)+_0x2aa7af+'\x27...',()=>_0x1ff657[_0x5e695c(0x154)][_0x5e695c(0x185)](_0x2aa7af),{'verbose':_0x5afe97[_0x5e695c(0x19b)]}),_0x495b53=_0xa560eb[_0x5e695c(0x15e)];_0x5afe97[_0x5e695c(0x19b)]&&(console[_0x5e695c(0x17f)](_0x5e695c(0x188)+_0x495b53[_0x5e695c(0x15b)]),_0x495b53[_0x5e695c(0x1a0)]&&console[_0x5e695c(0x17f)]('Folder\x20ID:\x20'+_0x495b53['folderId']));const _0x32366b=await withSpinner(_0x5e695c(0x170),()=>_0x1ff657['segment']['listUnifiedWithJourneys'](_0x495b53[_0x5e695c(0x15b)],_0x495b53[_0x5e695c(0x1a0)]),{'verbose':_0x5afe97[_0x5e695c(0x19b)]}),{folders:_0x479865,segments:_0x3d626b,journeys:_0x23f450}=_0x32366b[_0x5e695c(0x15e)],_0x594b32=_0x479865[_0x5e695c(0x159)]+_0x3d626b[_0x5e695c(0x159)]+_0x23f450['length'];console[_0x5e695c(0x17f)]('✔\x20Found\x20'+_0x479865[_0x5e695c(0x159)]+_0x5e695c(0x157)+(_0x479865[_0x5e695c(0x159)]!==0x1?'s':'')+',\x20'+_0x3d626b[_0x5e695c(0x159)]+_0x5e695c(0x15f)+(_0x3d626b[_0x5e695c(0x159)]!==0x1?'s':'')+',\x20and\x20'+_0x23f450[_0x5e695c(0x159)]+_0x5e695c(0x17a)+(_0x23f450[_0x5e695c(0x159)]!==0x1?'s':''));const _0x3595e3=_0x56687c=>{const _0x125814=_0x5e695c;return getConsoleNextUrl(_0x5afe97['site'],_0x125814(0x16a)+_0x495b53['parentId']+_0x125814(0x183)+_0x56687c);},_0x381957=_0x115d69=>{const _0x5512be=_0x5e695c;return getConsoleNextUrl(_0x5afe97['site'],'/app/ps/'+_0x495b53['parentId']+_0x5512be(0x183)+_0x115d69+_0x5512be(0x18f));},_0x45a73c=_0x5afe97['format']==='json'||_0x5afe97['format']===_0x5e695c(0x180);if(_0x45a73c){const _0x2931cf=[..._0x479865[_0x5e695c(0x169)](_0x2bc3de=>({..._0x2bc3de,'type':'folder'})),..._0x3d626b[_0x5e695c(0x169)](_0x1628c2=>({..._0x1628c2,'type':_0x5e695c(0x154),'url':_0x3595e3(_0x1628c2['id'])})),..._0x23f450[_0x5e695c(0x169)](_0x48f17a=>({..._0x48f17a,'name':_0x48f17a[_0x5e695c(0x18c)],'type':_0x5e695c(0x187),'url':_0x381957(_0x48f17a['id'])}))][_0x5e695c(0x153)]((_0x5bff0b,_0x13102b)=>_0x5bff0b[_0x5e695c(0x16c)]['localeCompare'](_0x13102b[_0x5e695c(0x16c)]));await handleSDKOutput(_0x2931cf,_0x5afe97);}else{if(_0x594b32===0x0)console[_0x5e695c(0x17c)](a43_0x544e27['dim']('['+_0x2aa7af+']')),console[_0x5e695c(0x17c)](_0x5e695c(0x18b));else{console['log'](a43_0x544e27[_0x5e695c(0x163)]('['+_0x2aa7af+']'));const _0x4a540a=formatFlatList(_0x479865,_0x3d626b,{'showMetadata':!![],'getSegmentUrl':_0x3595e3,'getJourneyUrl':_0x381957},_0x23f450);console[_0x5e695c(0x17c)](_0x4a540a);}}return 0x0;}async[a43_0x21ed64(0x174)](_0x148e6e,_0x2c3e1e){const _0x3ba013=a43_0x21ed64,{options:_0x311897,tdx:_0x3db12d}=_0x148e6e,_0x2b583c=await withSpinner(_0x3ba013(0x15a)+_0x2c3e1e+_0x3ba013(0x173),()=>_0x3db12d[_0x3ba013(0x154)][_0x3ba013(0x185)](_0x2c3e1e),{'verbose':_0x311897[_0x3ba013(0x19b)]}),_0x2dfe1f=_0x2b583c[_0x3ba013(0x15e)];_0x311897['verbose']&&(console[_0x3ba013(0x17f)](_0x3ba013(0x188)+_0x2dfe1f['parentId']),_0x2dfe1f['folderId']&&console['error'](_0x3ba013(0x181)+_0x2dfe1f['folderId']));const _0x470822=_0x311897[_0x3ba013(0x190)]||0xa,_0x4cbb86=await withSpinner('Building\x20hierarchy\x20tree...',()=>_0x3db12d[_0x3ba013(0x154)][_0x3ba013(0x174)](_0x2dfe1f['parentId'],_0x2dfe1f[_0x3ba013(0x1a0)],0x0,_0x470822),{'verbose':_0x311897[_0x3ba013(0x19b)]}),_0x4cda6f=_0x4cbb86[_0x3ba013(0x15e)],_0x260243=_0xea3a64=>{const _0x1f7fa6=_0x3ba013;let _0xb17c50=0x0,_0x52913d=0x0,_0x595d02=0x0;for(const _0x460e10 of _0xea3a64){if(_0x460e10['type']===_0x1f7fa6(0x164))_0xb17c50++;else{if(_0x460e10[_0x1f7fa6(0x19d)]===_0x1f7fa6(0x154))_0x52913d++;else{if(_0x460e10[_0x1f7fa6(0x19d)]==='journey')_0x595d02++;}}if(_0x460e10[_0x1f7fa6(0x171)]){const _0x164d8d=_0x260243(_0x460e10[_0x1f7fa6(0x171)]);_0xb17c50+=_0x164d8d[_0x1f7fa6(0x175)],_0x52913d+=_0x164d8d[_0x1f7fa6(0x195)],_0x595d02+=_0x164d8d['journeys'];}}return{'folders':_0xb17c50,'segments':_0x52913d,'journeys':_0x595d02};},_0x4e0e71=_0x260243(_0x4cda6f);console[_0x3ba013(0x17f)](_0x3ba013(0x197)+_0x4e0e71[_0x3ba013(0x175)]+'\x20folder'+(_0x4e0e71[_0x3ba013(0x175)]!==0x1?'s':'')+',\x20'+_0x4e0e71[_0x3ba013(0x195)]+_0x3ba013(0x15f)+(_0x4e0e71[_0x3ba013(0x195)]!==0x1?'s':'')+',\x20and\x20'+_0x4e0e71[_0x3ba013(0x168)]+'\x20journey'+(_0x4e0e71[_0x3ba013(0x168)]!==0x1?'s':''));const _0x3f1c0e=_0x43d198=>{const _0x2c29f5=_0x3ba013;return getConsoleNextUrl(_0x311897[_0x2c29f5(0x156)],_0x2c29f5(0x16a)+_0x2dfe1f[_0x2c29f5(0x15b)]+'/e/'+_0x43d198);},_0x483629=_0x57dd75=>{const _0xd95543=_0x3ba013;return getConsoleNextUrl(_0x311897[_0xd95543(0x156)],'/app/ps/'+_0x2dfe1f[_0xd95543(0x15b)]+_0xd95543(0x183)+_0x57dd75+_0xd95543(0x18f));};if(_0x311897['format']===_0x3ba013(0x162)||_0x311897[_0x3ba013(0x191)]===_0x3ba013(0x180))await handleSDKOutput(_0x4cda6f,_0x311897);else{console['log'](a43_0x544e27[_0x3ba013(0x163)]('['+_0x2c3e1e+']'));const _0x4baa10=formatTree(_0x4cda6f,{'showMetadata':!![],'getSegmentUrl':_0x3f1c0e,'getJourneyUrl':_0x483629});console['log'](_0x4baa10);}return 0x0;}}
@@ -1 +1 @@
1
- const a44_0x5cbf2b=a44_0x205d;(function(_0x5e1405,_0x539be3){const _0x4d8cb7=a44_0x205d,_0x2b4adb=_0x5e1405();while(!![]){try{const _0x200b91=parseInt(_0x4d8cb7(0xb9))/0x1+-parseInt(_0x4d8cb7(0x97))/0x2+parseInt(_0x4d8cb7(0xad))/0x3*(-parseInt(_0x4d8cb7(0xa6))/0x4)+-parseInt(_0x4d8cb7(0x9e))/0x5+-parseInt(_0x4d8cb7(0xa8))/0x6+-parseInt(_0x4d8cb7(0xab))/0x7+parseInt(_0x4d8cb7(0x96))/0x8*(parseInt(_0x4d8cb7(0xb7))/0x9);if(_0x200b91===_0x539be3)break;else _0x2b4adb['push'](_0x2b4adb['shift']());}catch(_0x4a5bc2){_0x2b4adb['push'](_0x2b4adb['shift']());}}}(a44_0x216e,0xec727));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{[a44_0x5cbf2b(0xb0)]=a44_0x5cbf2b(0xaf);['description']=a44_0x5cbf2b(0xa5);async[a44_0x5cbf2b(0x9b)](_0x496fd7){const _0x13e3d5=a44_0x5cbf2b;return this[_0x13e3d5(0x9c)](_0x496fd7);}async['showTable'](_0xbed0a){const _0x982b26=a44_0x5cbf2b,{options:_0x6cb91c,args:_0x518bff,tdx:_0x560423}=_0xbed0a;let _0x49c35a;try{_0x49c35a=parseTableReference(_0x518bff[0x0]);const _0x5b4305=_0x6cb91c['database'];!_0x49c35a[_0x982b26(0x94)]&&_0x5b4305&&(_0x49c35a[_0x982b26(0x94)]=_0x5b4305);const _0x17c907=validateTableDescribeReference(_0x49c35a);if(_0x17c907)return console[_0x982b26(0x91)](_0x982b26(0xb8)+_0x17c907),console['error'](_0x982b26(0x98)),console['error'](_0x982b26(0xa1)),console[_0x982b26(0x91)]('\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--database\x20<database>'),0x1;}catch(_0x4bdba5){return console['error'](_0x982b26(0xb8)+_0x4bdba5[_0x982b26(0xac)]),console['error'](_0x982b26(0x98)),console[_0x982b26(0x91)](_0x982b26(0xa1)),console[_0x982b26(0x91)]('\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--database\x20<database>'),0x1;}const _0x2601b0=_0x49c35a[_0x982b26(0xa3)],_0x194e6b=_0x49c35a[_0x982b26(0x94)],_0x3f00a5=_0x49c35a[_0x982b26(0xb6)],_0x4fc2c8=resolveLimit(_0x6cb91c['limit'],DEFAULT_DISPLAY_LIMIT);try{_0x6cb91c['verbose']&&(console[_0x982b26(0x91)]('Site:\x20'+_0x6cb91c[_0x982b26(0x93)]),_0x2601b0&&console[_0x982b26(0x91)](_0x982b26(0xb3)+_0x2601b0),console[_0x982b26(0x91)](_0x982b26(0xa4)+_0x194e6b),console['error'](_0x982b26(0x99)+_0x3f00a5),console['error'](_0x982b26(0xa7)+_0x4fc2c8));const _0x467f9b=_0x2601b0?_0x2601b0+'.'+_0x194e6b+'.'+_0x3f00a5:_0x194e6b+'.'+_0x3f00a5,_0x52251c=await withSpinner(_0x982b26(0x9f)+_0x467f9b+_0x982b26(0xb2),()=>_0x560423[_0x982b26(0x9d)]['showTable'](_0x194e6b,_0x3f00a5,_0x4fc2c8,_0x2601b0),{'verbose':_0x6cb91c[_0x982b26(0xaa)]}),_0x1d5b8c=_0x52251c['data'],_0x29ba53=_0x1d5b8c[_0x982b26(0xa0)];return _0x29ba53[_0x982b26(0x95)]===0x0?console[_0x982b26(0x91)](_0x982b26(0x92)):console[_0x982b26(0x91)](_0x982b26(0xa9)+_0x29ba53[_0x982b26(0x95)]+_0x982b26(0xae)+(_0x29ba53[_0x982b26(0x95)]!==0x1?'s':'')+_0x982b26(0x9a)+_0x467f9b),await handleSDKOutput(_0x29ba53,_0x6cb91c),0x0;}catch(_0x2cf8f4){if(_0x2cf8f4 instanceof SDKError)return console[_0x982b26(0x91)]('Error:\x20'+_0x2cf8f4['message']),_0x2cf8f4['cause']&&console[_0x982b26(0x91)]('\x20\x20Cause:\x20'+_0x2cf8f4[_0x982b26(0xa2)]),0x1;throw _0x2cf8f4;}}['validate'](_0x17ff6e){const _0x2b47e0=a44_0x5cbf2b;if(_0x17ff6e[_0x2b47e0(0xb1)][_0x2b47e0(0x95)]===0x0)return _0x2b47e0(0xb4);if(_0x17ff6e[_0x2b47e0(0xb1)][_0x2b47e0(0x95)]>0x1)return _0x2b47e0(0xb5);return undefined;}}function a44_0x205d(_0x1f6464,_0x12c04b){_0x1f6464=_0x1f6464-0x91;const _0x216e59=a44_0x216e();let _0x205d0c=_0x216e59[_0x1f6464];return _0x205d0c;}function a44_0x216e(){const _0x366d2e=['args','...','Catalog:\x20','Usage:\x20tdx\x20show\x20<database.table>\x0a\x20\x20\x20or:\x20tdx\x20show\x20<catalog.database.table>\x0a\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--database\x20<database>\x0a\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--in\x20<database>\x0a\x0aRun\x20\x27tdx\x20show\x20--help\x27\x20for\x20more\x20options','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','table','144rwQdKX','Error:\x20','1677598IabBnh','error','✔\x20Query\x20successful\x20-\x200\x20rows\x20returned','site','database','length','2496976YuLrYu','2420104yrieXm','Usage:\x20tdx\x20show\x20<database.table>','Table:\x20','\x20from\x20','execute','showTable','query','226775MvJfrl','Querying\x20','data','\x20\x20\x20or:\x20tdx\x20show\x20<catalog.database.table>','cause','catalog','Database:\x20','Show\x20table\x20contents','900868uXYSxd','Limit:\x20','9890466ddqLWv','✔\x20Retrieved\x20','verbose','11712120shyXrJ','message','15vFSOaZ','\x20row','show','name'];a44_0x216e=function(){return _0x366d2e;};return a44_0x216e();}
1
+ function a44_0xcf30(){const _0x48f0ba=['site','Catalog:\x20','cause','213403CcaMrJ','99KIRszW','error','9580869ublGZc','description','18114BDyEMZ','✔\x20Retrieved\x20','verbose','Table:\x20','message','\x20\x20\x20or:\x20tdx\x20show\x20<catalog.database.table>','...','Usage:\x20tdx\x20show\x20<database.table>','38132588UQevDq','677590QzoARR','2OLaCOf','showTable','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','✔\x20Query\x20successful\x20-\x200\x20rows\x20returned','69zcUNIV','catalog','execute','data','Database:\x20','length','args','Site:\x20','\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--database\x20<database>','12YlxkAZ','database','625RuVYie','show','query','193748KOrvcj','1679153pRsmii','validate','32dIdaaR','Limit:\x20','\x20\x20Cause:\x20','Error:\x20','Usage:\x20tdx\x20show\x20<database.table>\x0a\x20\x20\x20or:\x20tdx\x20show\x20<catalog.database.table>\x0a\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--database\x20<database>\x0a\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--in\x20<database>\x0a\x0aRun\x20\x27tdx\x20show\x20--help\x27\x20for\x20more\x20options'];a44_0xcf30=function(){return _0x48f0ba;};return a44_0xcf30();}const a44_0x2afcb9=a44_0x5636;function a44_0x5636(_0xd6d793,_0x74a941){_0xd6d793=_0xd6d793-0x1e9;const _0xcf30f9=a44_0xcf30();let _0x5636de=_0xcf30f9[_0xd6d793];return _0x5636de;}(function(_0x212c5d,_0x474ead){const _0x1fb991=a44_0x5636,_0x1c335b=_0x212c5d();while(!![]){try{const _0x1ae7f6=parseInt(_0x1fb991(0x20e))/0x1*(-parseInt(_0x1fb991(0x1f1))/0x2)+parseInt(_0x1fb991(0x1f5))/0x3*(-parseInt(_0x1fb991(0x203))/0x4)+-parseInt(_0x1fb991(0x200))/0x5*(-parseInt(_0x1fb991(0x213))/0x6)+-parseInt(_0x1fb991(0x204))/0x7*(parseInt(_0x1fb991(0x206))/0x8)+-parseInt(_0x1fb991(0x211))/0x9+-parseInt(_0x1fb991(0x1f0))/0xa*(-parseInt(_0x1fb991(0x20f))/0xb)+-parseInt(_0x1fb991(0x1fe))/0xc*(-parseInt(_0x1fb991(0x1ef))/0xd);if(_0x1ae7f6===_0x474ead)break;else _0x1c335b['push'](_0x1c335b['shift']());}catch(_0xb11f06){_0x1c335b['push'](_0x1c335b['shift']());}}}(a44_0xcf30,0x8ae8b));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']=a44_0x2afcb9(0x201);[a44_0x2afcb9(0x212)]='Show\x20table\x20contents';async[a44_0x2afcb9(0x1f7)](_0x503349){const _0x2bf241=a44_0x2afcb9;return this[_0x2bf241(0x1f2)](_0x503349);}async[a44_0x2afcb9(0x1f2)](_0x46b7e7){const _0x53cc7d=a44_0x2afcb9,{options:_0x5787a1,args:_0x5ab9fa,tdx:_0x574a2c}=_0x46b7e7;let _0x181f69;try{_0x181f69=parseTableReference(_0x5ab9fa[0x0]);const _0x4bf931=_0x5787a1[_0x53cc7d(0x1ff)];!_0x181f69[_0x53cc7d(0x1ff)]&&_0x4bf931&&(_0x181f69[_0x53cc7d(0x1ff)]=_0x4bf931);const _0x14000a=validateTableDescribeReference(_0x181f69);if(_0x14000a)return console[_0x53cc7d(0x210)](_0x53cc7d(0x209)+_0x14000a),console[_0x53cc7d(0x210)](_0x53cc7d(0x1ee)),console['error'](_0x53cc7d(0x1ec)),console[_0x53cc7d(0x210)](_0x53cc7d(0x1fd)),0x1;}catch(_0x1702fb){return console[_0x53cc7d(0x210)]('Error:\x20'+_0x1702fb[_0x53cc7d(0x1eb)]),console[_0x53cc7d(0x210)]('Usage:\x20tdx\x20show\x20<database.table>'),console['error'](_0x53cc7d(0x1ec)),console['error']('\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--database\x20<database>'),0x1;}const _0x3318fd=_0x181f69[_0x53cc7d(0x1f6)],_0x4b25a5=_0x181f69[_0x53cc7d(0x1ff)],_0xbd67a9=_0x181f69['table'],_0x130bc7=resolveLimit(_0x5787a1['limit'],DEFAULT_DISPLAY_LIMIT);try{_0x5787a1[_0x53cc7d(0x1e9)]&&(console[_0x53cc7d(0x210)](_0x53cc7d(0x1fc)+_0x5787a1[_0x53cc7d(0x20b)]),_0x3318fd&&console[_0x53cc7d(0x210)](_0x53cc7d(0x20c)+_0x3318fd),console[_0x53cc7d(0x210)](_0x53cc7d(0x1f9)+_0x4b25a5),console[_0x53cc7d(0x210)](_0x53cc7d(0x1ea)+_0xbd67a9),console[_0x53cc7d(0x210)](_0x53cc7d(0x207)+_0x130bc7));const _0x58f417=_0x3318fd?_0x3318fd+'.'+_0x4b25a5+'.'+_0xbd67a9:_0x4b25a5+'.'+_0xbd67a9,_0x4dd249=await withSpinner('Querying\x20'+_0x58f417+_0x53cc7d(0x1ed),()=>_0x574a2c[_0x53cc7d(0x202)][_0x53cc7d(0x1f2)](_0x4b25a5,_0xbd67a9,_0x130bc7,_0x3318fd),{'verbose':_0x5787a1[_0x53cc7d(0x1e9)]}),_0x2a87d3=_0x4dd249[_0x53cc7d(0x1f8)],_0x547a85=_0x2a87d3['data'];return _0x547a85[_0x53cc7d(0x1fa)]===0x0?console[_0x53cc7d(0x210)](_0x53cc7d(0x1f4)):console[_0x53cc7d(0x210)](_0x53cc7d(0x214)+_0x547a85['length']+'\x20row'+(_0x547a85[_0x53cc7d(0x1fa)]!==0x1?'s':'')+'\x20from\x20'+_0x58f417),await handleSDKOutput(_0x547a85,_0x5787a1),0x0;}catch(_0xc261aa){if(_0xc261aa instanceof SDKError)return console[_0x53cc7d(0x210)](_0x53cc7d(0x209)+_0xc261aa[_0x53cc7d(0x1eb)]),_0xc261aa[_0x53cc7d(0x20d)]&&console[_0x53cc7d(0x210)](_0x53cc7d(0x208)+_0xc261aa[_0x53cc7d(0x20d)]),0x1;throw _0xc261aa;}}[a44_0x2afcb9(0x205)](_0xac74ad){const _0x10cb14=a44_0x2afcb9;if(_0xac74ad[_0x10cb14(0x1fb)][_0x10cb14(0x1fa)]===0x0)return _0x10cb14(0x20a);if(_0xac74ad[_0x10cb14(0x1fb)]['length']>0x1)return _0x10cb14(0x1f3);return undefined;}}
@@ -1 +1 @@
1
- const a45_0x40e9cc=a45_0x2be9;(function(_0x3ffd04,_0x40d4b6){const _0x2cc3cd=a45_0x2be9,_0x59f097=_0x3ffd04();while(!![]){try{const _0x3078c3=-parseInt(_0x2cc3cd(0x117))/0x1*(-parseInt(_0x2cc3cd(0x11b))/0x2)+-parseInt(_0x2cc3cd(0x141))/0x3*(-parseInt(_0x2cc3cd(0x13b))/0x4)+-parseInt(_0x2cc3cd(0x133))/0x5+-parseInt(_0x2cc3cd(0x127))/0x6*(parseInt(_0x2cc3cd(0x129))/0x7)+parseInt(_0x2cc3cd(0x11f))/0x8*(parseInt(_0x2cc3cd(0x131))/0x9)+parseInt(_0x2cc3cd(0x132))/0xa+-parseInt(_0x2cc3cd(0x140))/0xb*(parseInt(_0x2cc3cd(0x143))/0xc);if(_0x3078c3===_0x40d4b6)break;else _0x59f097['push'](_0x59f097['shift']());}catch(_0x57fdc4){_0x59f097['push'](_0x59f097['shift']());}}}(a45_0x4d01,0xc1238));import{BaseCommand,printAuthError}from'./command.js';function a45_0x2be9(_0xaddadf,_0x12d689){_0xaddadf=_0xaddadf-0x113;const _0x4d01a1=a45_0x4d01();let _0x2be97b=_0x4d01a1[_0xaddadf];return _0x2be97b;}import{resolveAPIKeyAsync}from'../core/config.js';import{getOAuthTokens}from'../core/oauth-keychain.js';function a45_0x4d01(){const _0x29d1c0=['\x20profile:\x20','9522492zoSEYX','N/A','session','dim','last_name','env','bold','name','cli','1sdccPh','Show\x20authentication\x20status\x20and\x20current\x20context','✓\x20Authentication\x20successful\x0a','red','2394686UcQckd','Credential\x20type:\x20','User:','execute','12216vKOFDC','✗\x20Validation\x20failed:\x20','getUserInfo','account_id','OAuth','site:\x20','yellow','Name:','1182DxJlAK','config','22421siVksY','tdx','profileSource','(from\x20','join','first_name','filter','green','1467tjHHqD','7455090RvOHwG','4736165yloMpP','displayWithSources','CLI\x20flag','TDX_PROFILE\x20env','error','log','email','cyan','136WYVVyu','Account\x20ID:','No\x20credential\x20found','profile','site','11zhvKvq','85686kxneaT'];a45_0x4d01=function(){return _0x29d1c0;};return a45_0x4d01();}import{HTTPClientError}from'../sdk/client/http-client.js';import{GlobalContext}from'../core/global-context.js';import a45_0x48bb9d from'chalk';export class StatusCommand extends BaseCommand{[a45_0x40e9cc(0x115)]='status';['description']=a45_0x40e9cc(0x118);async[a45_0x40e9cc(0x11e)](_0x40455b){const _0x3f6413=a45_0x40e9cc,{options:_0x1c5439,tdx:_0x29eb09}=_0x40455b,_0x2f9855=_0x1c5439[_0x3f6413(0x13f)],_0x3e7386=new GlobalContext(_0x1c5439),_0x223f3f=_0x3e7386[_0x3f6413(0x13e)],_0x42e2c7=_0x3e7386[_0x3f6413(0x12b)],_0x180fd1=_0x42e2c7===_0x3f6413(0x116)?_0x3f6413(0x135):_0x42e2c7===_0x3f6413(0x145)?_0x3f6413(0x145):_0x42e2c7===_0x3f6413(0x113)?_0x3f6413(0x136):_0x42e2c7===_0x3f6413(0x128)?_0x3f6413(0x128):null,_0x59fa1f=_0x223f3f?a45_0x48bb9d[_0x3f6413(0x13a)](_0x223f3f):a45_0x48bb9d[_0x3f6413(0x146)](_0x3f6413(0x144)),_0xd57968=_0x180fd1?'\x20'+a45_0x48bb9d['dim'](_0x3f6413(0x12c)+_0x180fd1+')'):'';console['log'](a45_0x48bb9d[_0x3f6413(0x114)](_0x3f6413(0x12a))+_0x3f6413(0x142)+_0x59fa1f+_0xd57968+'\x20'+a45_0x48bb9d[_0x3f6413(0x146)]('(')+_0x3f6413(0x124)+a45_0x48bb9d[_0x3f6413(0x13a)](_0x2f9855)+a45_0x48bb9d[_0x3f6413(0x146)](')'));const _0x31f3ea=await getOAuthTokens(_0x223f3f);if(_0x31f3ea)console[_0x3f6413(0x138)](_0x3f6413(0x11c)+a45_0x48bb9d[_0x3f6413(0x13a)](_0x3f6413(0x123)));else{const _0x3c163f=await resolveAPIKeyAsync(_0x2f9855,_0x223f3f);if(_0x3c163f){const {source:_0x803203,isDeprecated:_0x1422cf}=_0x3c163f,_0x207617='Read\x20credential\x20from\x20'+a45_0x48bb9d['cyan'](_0x803203);console[_0x3f6413(0x138)](_0x1422cf?a45_0x48bb9d[_0x3f6413(0x125)](_0x207617):_0x207617);}else console[_0x3f6413(0x138)](a45_0x48bb9d[_0x3f6413(0x125)](_0x3f6413(0x13d)));}let _0x479b27=![];try{const _0x13d906=await _0x29eb09['jobs'][_0x3f6413(0x121)]();console[_0x3f6413(0x138)](a45_0x48bb9d[_0x3f6413(0x130)](_0x3f6413(0x119))),console['log'](a45_0x48bb9d[_0x3f6413(0x114)](_0x3f6413(0x11d))+'\x20'+a45_0x48bb9d[_0x3f6413(0x13a)](_0x13d906[_0x3f6413(0x139)]));if(_0x13d906['first_name']||_0x13d906[_0x3f6413(0x147)]){const _0x158f40=[_0x13d906[_0x3f6413(0x12e)],_0x13d906[_0x3f6413(0x147)]][_0x3f6413(0x12f)](Boolean)[_0x3f6413(0x12d)]('\x20');console['log'](a45_0x48bb9d[_0x3f6413(0x114)](_0x3f6413(0x126))+'\x20'+_0x158f40);}_0x13d906[_0x3f6413(0x122)]&&console[_0x3f6413(0x138)](a45_0x48bb9d[_0x3f6413(0x114)](_0x3f6413(0x13c))+'\x20'+a45_0x48bb9d[_0x3f6413(0x125)](_0x13d906['account_id'])),_0x479b27=!![];}catch(_0x3f270e){_0x3f270e instanceof HTTPClientError&&_0x3f270e['status']===0x191?printAuthError(_0x3f270e,!![],_0x223f3f):console[_0x3f6413(0x137)](a45_0x48bb9d[_0x3f6413(0x11a)](_0x3f6413(0x120)+(_0x3f270e instanceof Error?_0x3f270e['message']:String(_0x3f270e))));}return console[_0x3f6413(0x138)](),_0x3e7386[_0x3f6413(0x134)](),_0x479b27?0x0:0x1;}}
1
+ const a45_0x49ff4b=a45_0x5e1f;(function(_0x3a1c1b,_0x2edde4){const _0x23c444=a45_0x5e1f,_0x28d19a=_0x3a1c1b();while(!![]){try{const _0x3a2daf=-parseInt(_0x23c444(0xa9))/0x1*(parseInt(_0x23c444(0x8f))/0x2)+parseInt(_0x23c444(0x8d))/0x3+parseInt(_0x23c444(0xa7))/0x4*(-parseInt(_0x23c444(0x9a))/0x5)+-parseInt(_0x23c444(0xa8))/0x6*(parseInt(_0x23c444(0xa4))/0x7)+parseInt(_0x23c444(0xa1))/0x8+-parseInt(_0x23c444(0xaf))/0x9+parseInt(_0x23c444(0xa5))/0xa;if(_0x3a2daf===_0x2edde4)break;else _0x28d19a['push'](_0x28d19a['shift']());}catch(_0x2a03aa){_0x28d19a['push'](_0x28d19a['shift']());}}}(a45_0x23c2,0x482d5));import{BaseCommand,printAuthError}from'./command.js';import{resolveAPIKeyAsync}from'../core/config.js';import{getOAuthTokens}from'../core/oauth-keychain.js';import{HTTPClientError}from'../sdk/client/http-client.js';import{GlobalContext}from'../core/global-context.js';import a45_0x2ab469 from'chalk';function a45_0x23c2(){const _0x12990a=['filter','description','name','site:\x20','Account\x20ID:','status','User:','first_name','35DilrvK','Show\x20authentication\x20status\x20and\x20current\x20context','OAuth','Read\x20credential\x20from\x20','bold','cli','yellow','1221872KMzGkg','TDX_PROFILE\x20env','red','37884HjLSLW','11005670FPrWXL','getUserInfo','99736UhWCMB','228ybiiwK','5UUwwCh','account_id','config','env','execute','email','2532906vuSUIR','displayWithSources','tdx','profileSource','site','✗\x20Validation\x20failed:\x20','last_name','dim','✓\x20Authentication\x20successful\x0a','message','Name:','(from\x20','582087sPCttW','session','196026KlxTBr','log','cyan'];a45_0x23c2=function(){return _0x12990a;};return a45_0x23c2();}function a45_0x5e1f(_0x3cee29,_0x5fc42c){_0x3cee29=_0x3cee29-0x89;const _0x23c265=a45_0x23c2();let _0x5e1f7b=_0x23c265[_0x3cee29];return _0x5e1f7b;}export class StatusCommand extends BaseCommand{[a45_0x49ff4b(0x94)]=a45_0x49ff4b(0x97);[a45_0x49ff4b(0x93)]=a45_0x49ff4b(0x9b);async[a45_0x49ff4b(0xad)](_0x13ffcd){const _0x40af5e=a45_0x49ff4b,{options:_0x5c58e3,tdx:_0x4bd543}=_0x13ffcd,_0x267125=_0x5c58e3[_0x40af5e(0xb3)],_0xe9ab1a=new GlobalContext(_0x5c58e3),_0x4f6bcd=_0xe9ab1a['profile'],_0x53a608=_0xe9ab1a[_0x40af5e(0xb2)],_0x543c92=_0x53a608===_0x40af5e(0x9f)?'CLI\x20flag':_0x53a608===_0x40af5e(0x8e)?'session':_0x53a608===_0x40af5e(0xac)?_0x40af5e(0xa2):_0x53a608===_0x40af5e(0xab)?_0x40af5e(0xab):null,_0x66371=_0x4f6bcd?a45_0x2ab469[_0x40af5e(0x91)](_0x4f6bcd):a45_0x2ab469[_0x40af5e(0xb6)]('N/A'),_0x1e5888=_0x543c92?'\x20'+a45_0x2ab469[_0x40af5e(0xb6)](_0x40af5e(0x8c)+_0x543c92+')'):'';console['log'](a45_0x2ab469[_0x40af5e(0x9e)](_0x40af5e(0xb1))+'\x20profile:\x20'+_0x66371+_0x1e5888+'\x20'+a45_0x2ab469[_0x40af5e(0xb6)]('(')+_0x40af5e(0x95)+a45_0x2ab469[_0x40af5e(0x91)](_0x267125)+a45_0x2ab469[_0x40af5e(0xb6)](')'));const _0x81965e=await getOAuthTokens(_0x4f6bcd);if(_0x81965e)console['log']('Credential\x20type:\x20'+a45_0x2ab469[_0x40af5e(0x91)](_0x40af5e(0x9c)));else{const _0xa82934=await resolveAPIKeyAsync(_0x267125,_0x4f6bcd);if(_0xa82934){const {source:_0x3def59,isDeprecated:_0x259ded}=_0xa82934,_0x15f70d=_0x40af5e(0x9d)+a45_0x2ab469[_0x40af5e(0x91)](_0x3def59);console['log'](_0x259ded?a45_0x2ab469[_0x40af5e(0xa0)](_0x15f70d):_0x15f70d);}else console[_0x40af5e(0x90)](a45_0x2ab469[_0x40af5e(0xa0)]('No\x20credential\x20found'));}let _0x21bf93=![];try{const _0x4f3230=await _0x4bd543['jobs'][_0x40af5e(0xa6)]();console['log'](a45_0x2ab469['green'](_0x40af5e(0x89))),console[_0x40af5e(0x90)](a45_0x2ab469['bold'](_0x40af5e(0x98))+'\x20'+a45_0x2ab469[_0x40af5e(0x91)](_0x4f3230[_0x40af5e(0xae)]));if(_0x4f3230[_0x40af5e(0x99)]||_0x4f3230[_0x40af5e(0xb5)]){const _0x450c2b=[_0x4f3230[_0x40af5e(0x99)],_0x4f3230[_0x40af5e(0xb5)]][_0x40af5e(0x92)](Boolean)['join']('\x20');console[_0x40af5e(0x90)](a45_0x2ab469['bold'](_0x40af5e(0x8b))+'\x20'+_0x450c2b);}_0x4f3230[_0x40af5e(0xaa)]&&console[_0x40af5e(0x90)](a45_0x2ab469[_0x40af5e(0x9e)](_0x40af5e(0x96))+'\x20'+a45_0x2ab469[_0x40af5e(0xa0)](_0x4f3230['account_id'])),_0x21bf93=!![];}catch(_0x100d5f){_0x100d5f instanceof HTTPClientError&&_0x100d5f['status']===0x191?printAuthError(_0x100d5f,!![],_0x4f6bcd):console['error'](a45_0x2ab469[_0x40af5e(0xa3)](_0x40af5e(0xb4)+(_0x100d5f instanceof Error?_0x100d5f[_0x40af5e(0x8a)]:String(_0x100d5f))));}return console['log'](),_0xe9ab1a[_0x40af5e(0xb0)](),_0x21bf93?0x0:0x1;}}
@@ -1 +1 @@
1
- const a46_0x48da89=a46_0x1659;(function(_0x72a2f1,_0x38dec5){const _0x451a4d=a46_0x1659,_0x29782a=_0x72a2f1();while(!![]){try{const _0x251281=-parseInt(_0x451a4d(0x150))/0x1*(parseInt(_0x451a4d(0x146))/0x2)+parseInt(_0x451a4d(0x127))/0x3*(parseInt(_0x451a4d(0x126))/0x4)+-parseInt(_0x451a4d(0x13d))/0x5+parseInt(_0x451a4d(0x145))/0x6*(-parseInt(_0x451a4d(0x144))/0x7)+parseInt(_0x451a4d(0x135))/0x8+-parseInt(_0x451a4d(0x12b))/0x9+-parseInt(_0x451a4d(0x12f))/0xa*(-parseInt(_0x451a4d(0x147))/0xb);if(_0x251281===_0x38dec5)break;else _0x29782a['push'](_0x29782a['shift']());}catch(_0x5beffa){_0x29782a['push'](_0x29782a['shift']());}}}(a46_0x5139,0x77665));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleSDKOutput,isStructuredFormat}from'../core/command-output.js';import{parseTableReference}from'../utils/table-ref-parser.js';import{DEFAULT_LISTING_LIMIT,resolveLimit}from'../core/constants.js';function a46_0x5139(){const _0x3919ab=['execute','8320230wQgxqi','Database:\x20','\x20\x20Or:\x20\x20tdx\x20tables\x20--database\x20','database_name','50kBDIdW','Table\x20pattern:\x20','Site:\x20','\x27\x20is\x20ambiguous.','\x27\x20without\x20wildcards\x20would\x20search\x20for\x20tables\x20named\x20\x27','error','3018968VAWPDa','Error:\x20','tables','listTables','includes','Database\x20pattern:\x20','✔\x20Found\x20','Database\x20\x27','4477330oSqzuD','\x27\x20may\x20not\x20exist\x20or\x20contains\x20no\x20tables','List\x20tables\x20in\x20a\x20database','log','limit','validate','.*\x22','7AGUSOT','2854860DomPwP','1271428epjfrd','5932421ELPUcz','length','\x20\x20Cause:\x20','✖\x20No\x20tables\x20found','\x20\x20Or:\x20\x20tdx\x20tables\x20--in\x20','\x20\x20tdx\x20tables\x20\x22mydb.*\x22\x20\x20\x20\x20\x20\x20\x20\x20->\x20all\x20tables\x20from\x20mydb','database','table','Error:\x20Too\x20many\x20arguments.\x20Use\x20single\x20argument:','1DYEAYL','\x27\x20across\x20all\x20databases.','Note:\x20\x27','\x20\x20Use:\x20tdx\x20tables\x20\x22','table_name','\x20\x20tdx\x20tables\x20\x22mydb.users\x22\x20\x20\x20\x20->\x20table\x20\x22users\x22\x20in\x20database\x20mydb','description','\x20\x20tdx\x20tables\x20\x22*.user*\x22\x20\x20\x20\x20\x20\x20\x20->\x20tables\x20matching\x20user*\x20across\x20databases','1386380dAVKmT','3TSrcch','verbose','message'];a46_0x5139=function(){return _0x3919ab;};return a46_0x5139();}import{withSpinner}from'../utils/spinner.js';function a46_0x1659(_0x21411b,_0x29ba6a){_0x21411b=_0x21411b-0x126;const _0x5139d7=a46_0x5139();let _0x1659cc=_0x5139d7[_0x21411b];return _0x1659cc;}export class TablesCommand extends BaseCommand{['name']=a46_0x48da89(0x137);[a46_0x48da89(0x156)]=a46_0x48da89(0x13f);async[a46_0x48da89(0x12a)](_0x591b4d){const _0x553526=a46_0x48da89,{options:_0x32369c,args:_0x23f6e6,tdx:_0x393e94}=_0x591b4d;let _0x1d03c9;if(_0x23f6e6[_0x553526(0x148)]===0x0)_0x1d03c9={'database':undefined,'table':undefined,'original':''};else{if(_0x23f6e6[_0x553526(0x148)]===0x1)try{_0x1d03c9=parseTableReference(_0x23f6e6[0x0]);if(_0x1d03c9[_0x553526(0x14e)]&&!_0x1d03c9[_0x553526(0x14d)]&&!_0x1d03c9[_0x553526(0x14e)][_0x553526(0x139)]('*')&&!_0x1d03c9[_0x553526(0x14e)][_0x553526(0x139)]('?'))return console[_0x553526(0x134)]('Error:\x20Pattern\x20\x27'+_0x23f6e6[0x0]+_0x553526(0x132)),console[_0x553526(0x134)]('Did\x20you\x20mean\x20to\x20list\x20all\x20tables\x20from\x20database\x20\x27'+_0x1d03c9[_0x553526(0x14e)]+'\x27?'),console[_0x553526(0x134)](_0x553526(0x153)+_0x1d03c9[_0x553526(0x14e)]+_0x553526(0x143)),console['error'](_0x553526(0x14b)+_0x1d03c9['table']),console[_0x553526(0x134)](_0x553526(0x12d)+_0x1d03c9[_0x553526(0x14e)]),console[_0x553526(0x134)](''),console[_0x553526(0x134)](_0x553526(0x152)+_0x23f6e6[0x0]+_0x553526(0x133)+_0x1d03c9[_0x553526(0x14e)]+_0x553526(0x151)),0x1;}catch(_0x456695){return console[_0x553526(0x134)]('Error:\x20'+_0x456695[_0x553526(0x129)]),0x1;}else return console[_0x553526(0x134)](_0x553526(0x14f)),console['error']('\x20\x20tdx\x20tables\x20users\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20->\x20table\x20\x22users\x22\x20across\x20all\x20databases'),console[_0x553526(0x134)](_0x553526(0x14c)),console[_0x553526(0x134)](_0x553526(0x155)),console[_0x553526(0x134)](_0x553526(0x157)),console[_0x553526(0x134)]('Or\x20use\x20--in\x20flag:'),console[_0x553526(0x134)]('\x20\x20tdx\x20tables\x20--in\x20mydb\x20\x20\x20\x20\x20\x20\x20->\x20all\x20tables\x20from\x20mydb'),0x1;}const _0x5801bf=_0x32369c[_0x553526(0x14d)];!_0x1d03c9[_0x553526(0x14d)]&&_0x5801bf&&(_0x1d03c9[_0x553526(0x14d)]=_0x5801bf);try{const _0x3808f1=_0x40ea57=>_0x40ea57&&(_0x40ea57[_0x553526(0x139)]('*')||_0x40ea57['includes']('?')),_0x38055b=_0x3808f1(_0x1d03c9[_0x553526(0x14d)]);_0x32369c[_0x553526(0x128)]&&(console['error'](_0x553526(0x131)+_0x32369c['site']),_0x1d03c9['database']?_0x38055b?console[_0x553526(0x134)](_0x553526(0x13a)+_0x1d03c9[_0x553526(0x14d)]):console[_0x553526(0x134)](_0x553526(0x12c)+_0x1d03c9[_0x553526(0x14d)]):console[_0x553526(0x134)]('Database:\x20all'),_0x1d03c9['table']&&console[_0x553526(0x134)](_0x553526(0x130)+_0x1d03c9[_0x553526(0x14e)]));const _0x18a805=_0x1d03c9[_0x553526(0x14d)]&&!_0x38055b?_0x1d03c9[_0x553526(0x14d)]:undefined,_0x55fc04=_0x38055b?_0x1d03c9[_0x553526(0x14d)]:undefined,_0x2f7e61=_0x1d03c9[_0x553526(0x14e)],_0x43b13a=resolveLimit(_0x32369c[_0x553526(0x141)],DEFAULT_LISTING_LIMIT),_0x5aed3b=await withSpinner('Listing\x20tables...',()=>_0x393e94['query'][_0x553526(0x138)](_0x18a805,_0x2f7e61,_0x55fc04,_0x43b13a),{'verbose':_0x32369c[_0x553526(0x128)]}),_0xaff27d=_0x5aed3b['data'];if(_0xaff27d['length']===0x0&&_0x1d03c9[_0x553526(0x14d)]&&!_0x38055b)return console[_0x553526(0x134)](_0x553526(0x14a)),console[_0x553526(0x134)](_0x553526(0x13c)+_0x1d03c9[_0x553526(0x14d)]+_0x553526(0x13e)),0x1;console[_0x553526(0x134)](_0x553526(0x13b)+_0xaff27d[_0x553526(0x148)]+'\x20table'+(_0xaff27d['length']!==0x1?'s':''));if(isStructuredFormat(_0x32369c))await handleSDKOutput(_0xaff27d,{..._0x32369c,'limit':_0x43b13a});else for(const _0x16ac1d of _0xaff27d){const _0x29b411=_0x16ac1d[_0x553526(0x12e)]?_0x16ac1d[_0x553526(0x12e)]+'.':'';console[_0x553526(0x140)]('📋\x20'+_0x29b411+_0x16ac1d[_0x553526(0x154)]);}return 0x0;}catch(_0xb3285c){if(_0xb3285c instanceof SDKError)return console[_0x553526(0x134)](_0x553526(0x136)+_0xb3285c[_0x553526(0x129)]),_0xb3285c['cause']&&console[_0x553526(0x134)](_0x553526(0x149)+_0xb3285c['cause']),0x1;throw _0xb3285c;}}[a46_0x48da89(0x142)](_0x513b4b){return undefined;}}
1
+ const a46_0x2b0420=a46_0x2b93;(function(_0x2dbcf7,_0x4df061){const _0xd44e5=a46_0x2b93,_0x5bdcbd=_0x2dbcf7();while(!![]){try{const _0x386ebb=-parseInt(_0xd44e5(0x1ff))/0x1+-parseInt(_0xd44e5(0x205))/0x2+parseInt(_0xd44e5(0x1f5))/0x3+parseInt(_0xd44e5(0x1f9))/0x4*(parseInt(_0xd44e5(0x1ee))/0x5)+-parseInt(_0xd44e5(0x1e5))/0x6*(parseInt(_0xd44e5(0x1f3))/0x7)+-parseInt(_0xd44e5(0x1ec))/0x8+parseInt(_0xd44e5(0x1e8))/0x9;if(_0x386ebb===_0x4df061)break;else _0x5bdcbd['push'](_0x5bdcbd['shift']());}catch(_0x448c3e){_0x5bdcbd['push'](_0x5bdcbd['shift']());}}}(a46_0x4123,0xad3de));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleSDKOutput,isStructuredFormat}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 a46_0x4123(){const _0x25178f=['tables','Database\x20\x27','description','\x27\x20may\x20not\x20exist\x20or\x20contains\x20no\x20tables','835273Exmxmi','List\x20tables\x20in\x20a\x20database','✖\x20No\x20tables\x20found','Error:\x20Too\x20many\x20arguments.\x20Use\x20single\x20argument:','\x20\x20tdx\x20tables\x20\x22mydb.*\x22\x20\x20\x20\x20\x20\x20\x20\x20->\x20all\x20tables\x20from\x20mydb','database','1882492muREOc','Table\x20pattern:\x20','includes','data','\x20table','verbose','message','Database:\x20','\x27\x20without\x20wildcards\x20would\x20search\x20for\x20tables\x20named\x20\x27','\x20\x20tdx\x20tables\x20--in\x20mydb\x20\x20\x20\x20\x20\x20\x20->\x20all\x20tables\x20from\x20mydb','\x20\x20tdx\x20tables\x20\x22mydb.users\x22\x20\x20\x20\x20->\x20table\x20\x22users\x22\x20in\x20database\x20mydb','table','table_name','name','Listing\x20tables...','📋\x20','error','174xbAsGs','Did\x20you\x20mean\x20to\x20list\x20all\x20tables\x20from\x20database\x20\x27','limit','24493077GVubBa','\x27\x20across\x20all\x20databases.','query','Or\x20use\x20--in\x20flag:','4866024EZTwTS','.*\x22','39470yWtfif','✔\x20Found\x20','cause','length','validate','259630spkOVC','database_name','2119473jQZvMu','Note:\x20\x27','Error:\x20','site','376izEfer','Database:\x20all'];a46_0x4123=function(){return _0x25178f;};return a46_0x4123();}function a46_0x2b93(_0x4d3dc4,_0x537af9){_0x4d3dc4=_0x4d3dc4-0x1d5;const _0x412357=a46_0x4123();let _0x2b9383=_0x412357[_0x4d3dc4];return _0x2b9383;}export class TablesCommand extends BaseCommand{[a46_0x2b0420(0x1e1)]=a46_0x2b0420(0x1fb);[a46_0x2b0420(0x1fd)]=a46_0x2b0420(0x200);async['execute'](_0x323d95){const _0x4de096=a46_0x2b0420,{options:_0x2fe8b4,args:_0x323d54,tdx:_0x255db2}=_0x323d95;let _0x1b374b;if(_0x323d54[_0x4de096(0x1f1)]===0x0)_0x1b374b={'database':undefined,'table':undefined,'original':''};else{if(_0x323d54[_0x4de096(0x1f1)]===0x1)try{_0x1b374b=parseTableReference(_0x323d54[0x0]);if(_0x1b374b['table']&&!_0x1b374b[_0x4de096(0x204)]&&!_0x1b374b['table'][_0x4de096(0x1d6)]('*')&&!_0x1b374b['table'][_0x4de096(0x1d6)]('?'))return console['error']('Error:\x20Pattern\x20\x27'+_0x323d54[0x0]+'\x27\x20is\x20ambiguous.'),console[_0x4de096(0x1e4)](_0x4de096(0x1e6)+_0x1b374b['table']+'\x27?'),console['error']('\x20\x20Use:\x20tdx\x20tables\x20\x22'+_0x1b374b[_0x4de096(0x1df)]+_0x4de096(0x1ed)),console[_0x4de096(0x1e4)]('\x20\x20Or:\x20\x20tdx\x20tables\x20--in\x20'+_0x1b374b[_0x4de096(0x1df)]),console['error']('\x20\x20Or:\x20\x20tdx\x20tables\x20--database\x20'+_0x1b374b['table']),console[_0x4de096(0x1e4)](''),console['error'](_0x4de096(0x1f6)+_0x323d54[0x0]+_0x4de096(0x1dc)+_0x1b374b[_0x4de096(0x1df)]+_0x4de096(0x1e9)),0x1;}catch(_0x1f3003){return console[_0x4de096(0x1e4)](_0x4de096(0x1f7)+_0x1f3003[_0x4de096(0x1da)]),0x1;}else return console['error'](_0x4de096(0x202)),console['error']('\x20\x20tdx\x20tables\x20users\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20->\x20table\x20\x22users\x22\x20across\x20all\x20databases'),console[_0x4de096(0x1e4)](_0x4de096(0x203)),console[_0x4de096(0x1e4)](_0x4de096(0x1de)),console[_0x4de096(0x1e4)]('\x20\x20tdx\x20tables\x20\x22*.user*\x22\x20\x20\x20\x20\x20\x20\x20->\x20tables\x20matching\x20user*\x20across\x20databases'),console['error'](_0x4de096(0x1eb)),console['error'](_0x4de096(0x1dd)),0x1;}const _0x45b2a7=_0x2fe8b4[_0x4de096(0x204)];!_0x1b374b[_0x4de096(0x204)]&&_0x45b2a7&&(_0x1b374b['database']=_0x45b2a7);try{const _0x549f78=_0xd26511=>_0xd26511&&(_0xd26511[_0x4de096(0x1d6)]('*')||_0xd26511[_0x4de096(0x1d6)]('?')),_0x30e750=_0x549f78(_0x1b374b[_0x4de096(0x204)]);_0x2fe8b4[_0x4de096(0x1d9)]&&(console[_0x4de096(0x1e4)]('Site:\x20'+_0x2fe8b4[_0x4de096(0x1f8)]),_0x1b374b[_0x4de096(0x204)]?_0x30e750?console[_0x4de096(0x1e4)]('Database\x20pattern:\x20'+_0x1b374b['database']):console[_0x4de096(0x1e4)](_0x4de096(0x1db)+_0x1b374b[_0x4de096(0x204)]):console[_0x4de096(0x1e4)](_0x4de096(0x1fa)),_0x1b374b[_0x4de096(0x1df)]&&console[_0x4de096(0x1e4)](_0x4de096(0x1d5)+_0x1b374b[_0x4de096(0x1df)]));const _0x500ead=_0x1b374b['database']&&!_0x30e750?_0x1b374b[_0x4de096(0x204)]:undefined,_0x5b6154=_0x30e750?_0x1b374b[_0x4de096(0x204)]:undefined,_0x257e4b=_0x1b374b['table'],_0x53aac3=resolveLimit(_0x2fe8b4[_0x4de096(0x1e7)],DEFAULT_LISTING_LIMIT),_0x465db5=await withSpinner(_0x4de096(0x1e2),()=>_0x255db2[_0x4de096(0x1ea)]['listTables'](_0x500ead,_0x257e4b,_0x5b6154,_0x53aac3),{'verbose':_0x2fe8b4[_0x4de096(0x1d9)]}),_0x4dfaa6=_0x465db5[_0x4de096(0x1d7)];if(_0x4dfaa6['length']===0x0&&_0x1b374b[_0x4de096(0x204)]&&!_0x30e750)return console['error'](_0x4de096(0x201)),console[_0x4de096(0x1e4)](_0x4de096(0x1fc)+_0x1b374b[_0x4de096(0x204)]+_0x4de096(0x1fe)),0x1;console[_0x4de096(0x1e4)](_0x4de096(0x1ef)+_0x4dfaa6[_0x4de096(0x1f1)]+_0x4de096(0x1d8)+(_0x4dfaa6['length']!==0x1?'s':''));if(isStructuredFormat(_0x2fe8b4))await handleSDKOutput(_0x4dfaa6,{..._0x2fe8b4,'limit':_0x53aac3});else for(const _0x433858 of _0x4dfaa6){const _0xeaa152=_0x433858[_0x4de096(0x1f4)]?_0x433858[_0x4de096(0x1f4)]+'.':'';console['log'](_0x4de096(0x1e3)+_0xeaa152+_0x433858[_0x4de096(0x1e0)]);}return 0x0;}catch(_0x1004d4){if(_0x1004d4 instanceof SDKError)return console[_0x4de096(0x1e4)](_0x4de096(0x1f7)+_0x1004d4[_0x4de096(0x1da)]),_0x1004d4[_0x4de096(0x1f0)]&&console[_0x4de096(0x1e4)]('\x20\x20Cause:\x20'+_0x1004d4['cause']),0x1;throw _0x1004d4;}}[a46_0x2b0420(0x1f2)](_0x274e93){return undefined;}}
@@ -1 +1 @@
1
- function a47_0x34d2(_0x31aa13,_0x3988f4){_0x31aa13=_0x31aa13-0x86;const _0x258254=a47_0x2582();let _0x34d27a=_0x258254[_0x31aa13];return _0x34d27a;}const a47_0x492ad8=a47_0x34d2;function a47_0x2582(){const _0x101bfa=['profile','\x0aRun\x20\x27tdx\x20unset\x20--help\x27\x20for\x20more\x20options','join','error','2331285ZIKDvb','2117358oZEuGQ','\x0aUpdated:\x20','Usage:\x20tdx\x20unset\x20<resource>\x0a','site','description','Session\x20','name','session','parent_segment','engage_workspace','dim','--default\x20can\x20only\x20be\x20used\x20with\x20\x27site\x27\x20or\x20\x27profile\x27.\x20Other\x20resources\x20are\x20session-level\x20only.','unset','5055848fsQfqE','tdx.json','agent','2510628IxTBju','green','cleared','6948672hEPVWi','log','199nGvdKJ','(session:\x20','Default\x20site\x20','message','includes','validate','database','\x0aResources:\x20site,\x20database,\x20parent_segment,\x20llm_project,\x20agent,\x20profile,\x20engage_workspace\x0a','6492hVZTle','Default\x20profile\x20','default','4778544CLccIL','Clear\x20session-level\x20or\x20default\x20context\x20values','.\x20Must\x20be\x20one\x20of:\x20','llm_project','Error:\x20'];a47_0x2582=function(){return _0x101bfa;};return a47_0x2582();}(function(_0x32fe65,_0x1bd5bd){const _0x36db24=a47_0x34d2,_0x4b9b15=_0x32fe65();while(!![]){try{const _0x2b9797=parseInt(_0x36db24(0xac))/0x1*(parseInt(_0x36db24(0x8a))/0x2)+-parseInt(_0x36db24(0x97))/0x3+-parseInt(_0x36db24(0xa7))/0x4+parseInt(_0x36db24(0x96))/0x5+parseInt(_0x36db24(0x8d))/0x6+parseInt(_0x36db24(0xa4))/0x7+-parseInt(_0x36db24(0xaa))/0x8;if(_0x2b9797===_0x1bd5bd)break;else _0x4b9b15['push'](_0x4b9b15['shift']());}catch(_0x179401){_0x4b9b15['push'](_0x4b9b15['shift']());}}}(a47_0x2582,0x68b48));import{BaseCommand}from'./command.js';import{getSessionID,cleanExpiredSessions,clearSessionContextField}from'../core/session.js';import{clearDefaultSiteFromUserConfig,clearActiveProfileFromUserConfig}from'../core/profile.js';import{getConfigDir}from'../core/config.js';import a47_0x307cca from'chalk';import*as a47_0x48f419 from'node:path';export class UnsetCommand extends BaseCommand{[a47_0x492ad8(0x9d)]=a47_0x492ad8(0xa3);[a47_0x492ad8(0x9b)]=a47_0x492ad8(0x8e);[a47_0x492ad8(0x87)](_0x2e8f3e){const _0x27d7cf=a47_0x492ad8,{args:_0x29da57,options:_0x212516}=_0x2e8f3e,_0x3cba1d=_0x212516['default'];if(_0x29da57['length']===0x0)return _0x27d7cf(0x99)+'\x20\x20\x20\x20\x20\x20\x20tdx\x20unset\x20--default\x20<resource>\x20\x20#\x20Clear\x20default\x20from\x20config\x0a'+_0x27d7cf(0x89)+_0x27d7cf(0x93);const _0x3a9e3e=_0x29da57[0x0],_0x4a582c=[_0x27d7cf(0x9a),_0x27d7cf(0x88),'parent_segment',_0x27d7cf(0x90),_0x27d7cf(0xa6),'profile',_0x27d7cf(0xa0)];if(!_0x4a582c[_0x27d7cf(0x86)](_0x3a9e3e))return'Invalid\x20resource:\x20'+_0x3a9e3e+_0x27d7cf(0x8f)+_0x4a582c[_0x27d7cf(0x94)](',\x20');if(_0x3cba1d&&_0x3a9e3e!==_0x27d7cf(0x9a)&&_0x3a9e3e!==_0x27d7cf(0x92))return _0x27d7cf(0xa2);return undefined;}async['execute'](_0x43cfea){const _0x10cf9e=a47_0x492ad8,{args:_0x4b1ddd,options:_0xd25134}=_0x43cfea,_0x1f96ec=_0xd25134[_0x10cf9e(0x8c)];cleanExpiredSessions();try{const _0x3a6596=_0x4b1ddd[0x0],_0x1ee6d6=a47_0x48f419[_0x10cf9e(0x94)](getConfigDir(),_0x10cf9e(0xa5));if(_0x1f96ec){if(_0x3a6596===_0x10cf9e(0x9a))return clearDefaultSiteFromUserConfig(),console[_0x10cf9e(0xab)](_0x10cf9e(0xae)+a47_0x307cca[_0x10cf9e(0xa8)](_0x10cf9e(0xa9))),console[_0x10cf9e(0xab)](a47_0x307cca[_0x10cf9e(0xa1)](_0x10cf9e(0x98)+_0x1ee6d6)),0x0;if(_0x3a6596===_0x10cf9e(0x92))return clearActiveProfileFromUserConfig(),console['log'](_0x10cf9e(0x8b)+a47_0x307cca['green'](_0x10cf9e(0xa9))),console[_0x10cf9e(0xab)](a47_0x307cca[_0x10cf9e(0xa1)]('\x0aUpdated:\x20'+_0x1ee6d6)),0x0;}const _0x26aa82=getSessionID(_0xd25134[_0x10cf9e(0x9e)]),_0x2f0beb={'site':_0x10cf9e(0x9a),'database':_0x10cf9e(0x88),'parent_segment':_0x10cf9e(0x9f),'llm_project':_0x10cf9e(0x90),'agent':'llm_agent','profile':_0x10cf9e(0x92),'engage_workspace':_0x10cf9e(0xa0)},_0x2d16ea=_0x2f0beb[_0x3a6596];return _0x2d16ea&&(clearSessionContextField(_0x2d16ea,_0xd25134[_0x10cf9e(0x9e)]),console[_0x10cf9e(0xab)](_0x10cf9e(0x9c)+_0x3a6596+'\x20'+a47_0x307cca[_0x10cf9e(0xa8)](_0x10cf9e(0xa9))+'\x20'+a47_0x307cca[_0x10cf9e(0xa1)](_0x10cf9e(0xad)+_0x26aa82+')'))),0x0;}catch(_0x5d4011){return _0x5d4011 instanceof Error&&console[_0x10cf9e(0x95)](_0x10cf9e(0x91)+_0x5d4011[_0x10cf9e(0xaf)]),0x1;}}}
1
+ const a47_0x33b280=a47_0xd5fd;(function(_0x5f16f9,_0x538fbb){const _0x32552d=a47_0xd5fd,_0x41cc3a=_0x5f16f9();while(!![]){try{const _0x4d82f2=-parseInt(_0x32552d(0x13c))/0x1+-parseInt(_0x32552d(0x129))/0x2+-parseInt(_0x32552d(0x122))/0x3+-parseInt(_0x32552d(0x135))/0x4*(parseInt(_0x32552d(0x143))/0x5)+-parseInt(_0x32552d(0x139))/0x6+parseInt(_0x32552d(0x121))/0x7*(-parseInt(_0x32552d(0x12b))/0x8)+parseInt(_0x32552d(0x124))/0x9;if(_0x4d82f2===_0x538fbb)break;else _0x41cc3a['push'](_0x41cc3a['shift']());}catch(_0x308408){_0x41cc3a['push'](_0x41cc3a['shift']());}}}(a47_0x315c,0x69f88));function a47_0x315c(){const _0x3aa8ab=['473202YHoDiT','length','25689024yXTLzk','Session\x20','\x0aUpdated:\x20','agent','Default\x20site\x20','902006udpvde','cleared','3023720KsdFsK','engage_workspace','log','Default\x20profile\x20','site','\x20\x20\x20\x20\x20\x20\x20tdx\x20unset\x20--default\x20<resource>\x20\x20#\x20Clear\x20default\x20from\x20config\x0a','execute','green','Usage:\x20tdx\x20unset\x20<resource>\x0a','default','308YwnJsI','unset','dim','database','732648wPatoA','Clear\x20session-level\x20or\x20default\x20context\x20values','(session:\x20','644881xSXoQZ','join','validate','.\x20Must\x20be\x20one\x20of:\x20','error','\x0aResources:\x20site,\x20database,\x20parent_segment,\x20llm_project,\x20agent,\x20profile,\x20engage_workspace\x0a','llm_agent','43285scVlOp','description','message','profile','Invalid\x20resource:\x20','parent_segment','7DLcSoe'];a47_0x315c=function(){return _0x3aa8ab;};return a47_0x315c();}import{BaseCommand}from'./command.js';import{getSessionID,cleanExpiredSessions,clearSessionContextField}from'../core/session.js';function a47_0xd5fd(_0x288867,_0x845842){_0x288867=_0x288867-0x11c;const _0x315cee=a47_0x315c();let _0xd5fd8e=_0x315cee[_0x288867];return _0xd5fd8e;}import{clearDefaultSiteFromUserConfig,clearActiveProfileFromUserConfig}from'../core/profile.js';import{getConfigDir}from'../core/config.js';import a47_0x5651a4 from'chalk';import*as a47_0x547ef6 from'node:path';export class UnsetCommand extends BaseCommand{['name']=a47_0x33b280(0x136);[a47_0x33b280(0x11c)]=a47_0x33b280(0x13a);[a47_0x33b280(0x13e)](_0x3a4576){const _0x1d2d90=a47_0x33b280,{args:_0xd9df3e,options:_0x31098e}=_0x3a4576,_0x475bbe=_0x31098e[_0x1d2d90(0x134)];if(_0xd9df3e[_0x1d2d90(0x123)]===0x0)return _0x1d2d90(0x133)+_0x1d2d90(0x130)+_0x1d2d90(0x141)+'\x0aRun\x20\x27tdx\x20unset\x20--help\x27\x20for\x20more\x20options';const _0x56a3f2=_0xd9df3e[0x0],_0x3342f3=['site',_0x1d2d90(0x138),'parent_segment','llm_project',_0x1d2d90(0x127),_0x1d2d90(0x11e),_0x1d2d90(0x12c)];if(!_0x3342f3['includes'](_0x56a3f2))return _0x1d2d90(0x11f)+_0x56a3f2+_0x1d2d90(0x13f)+_0x3342f3[_0x1d2d90(0x13d)](',\x20');if(_0x475bbe&&_0x56a3f2!==_0x1d2d90(0x12f)&&_0x56a3f2!=='profile')return'--default\x20can\x20only\x20be\x20used\x20with\x20\x27site\x27\x20or\x20\x27profile\x27.\x20Other\x20resources\x20are\x20session-level\x20only.';return undefined;}async[a47_0x33b280(0x131)](_0x66398e){const _0x2c8035=a47_0x33b280,{args:_0x28000f,options:_0x33e3ee}=_0x66398e,_0x788d89=_0x33e3ee[_0x2c8035(0x134)];cleanExpiredSessions();try{const _0x4fccb2=_0x28000f[0x0],_0x39fafd=a47_0x547ef6[_0x2c8035(0x13d)](getConfigDir(),'tdx.json');if(_0x788d89){if(_0x4fccb2===_0x2c8035(0x12f))return clearDefaultSiteFromUserConfig(),console['log'](_0x2c8035(0x128)+a47_0x5651a4[_0x2c8035(0x132)]('cleared')),console['log'](a47_0x5651a4['dim']('\x0aUpdated:\x20'+_0x39fafd)),0x0;if(_0x4fccb2===_0x2c8035(0x11e))return clearActiveProfileFromUserConfig(),console[_0x2c8035(0x12d)](_0x2c8035(0x12e)+a47_0x5651a4[_0x2c8035(0x132)](_0x2c8035(0x12a))),console[_0x2c8035(0x12d)](a47_0x5651a4['dim'](_0x2c8035(0x126)+_0x39fafd)),0x0;}const _0x515aa9=getSessionID(_0x33e3ee['session']),_0x4d3592={'site':_0x2c8035(0x12f),'database':_0x2c8035(0x138),'parent_segment':_0x2c8035(0x120),'llm_project':'llm_project','agent':_0x2c8035(0x142),'profile':_0x2c8035(0x11e),'engage_workspace':_0x2c8035(0x12c)},_0x4bac43=_0x4d3592[_0x4fccb2];return _0x4bac43&&(clearSessionContextField(_0x4bac43,_0x33e3ee['session']),console[_0x2c8035(0x12d)](_0x2c8035(0x125)+_0x4fccb2+'\x20'+a47_0x5651a4[_0x2c8035(0x132)](_0x2c8035(0x12a))+'\x20'+a47_0x5651a4[_0x2c8035(0x137)](_0x2c8035(0x13b)+_0x515aa9+')'))),0x0;}catch(_0x2f9a65){return _0x2f9a65 instanceof Error&&console[_0x2c8035(0x140)]('Error:\x20'+_0x2f9a65[_0x2c8035(0x11d)]),0x1;}}}
@@ -1 +1 @@
1
- const a48_0x219a61=a48_0x4a91;(function(_0x3cfbe8,_0xdf12d4){const _0x3973c9=a48_0x4a91,_0x168dcc=_0x3cfbe8();while(!![]){try{const _0x47e35b=-parseInt(_0x3973c9(0x1d1))/0x1+-parseInt(_0x3973c9(0x201))/0x2+-parseInt(_0x3973c9(0x1f9))/0x3*(parseInt(_0x3973c9(0x1de))/0x4)+-parseInt(_0x3973c9(0x1fb))/0x5+-parseInt(_0x3973c9(0x1ea))/0x6+parseInt(_0x3973c9(0x1e3))/0x7*(-parseInt(_0x3973c9(0x1d0))/0x8)+parseInt(_0x3973c9(0x1d3))/0x9*(parseInt(_0x3973c9(0x1f3))/0xa);if(_0x47e35b===_0xdf12d4)break;else _0x168dcc['push'](_0x168dcc['shift']());}catch(_0x4745cf){_0x168dcc['push'](_0x168dcc['shift']());}}}(a48_0x214a,0xc65a7));import{gt}from'semver';import a48_0x19c5e3 from'chalk';import{BaseCommand}from'./command.js';import{getVersion,isDevVersion}from'../core/version.js';import{loadReleaseChannel}from'../core/config.js';import{fetchLatestVersion}from'../utils/version-check.js';import{crossSpawn}from'../utils/process.js';function a48_0x214a(){const _0x1e8327=['dim','...','2386662GAJcST','Successfully\x20upgraded\x20to\x20','Current\x20version:\x20','Target\x20version:','Running:','npm','argv','close','Failed\x20to\x20run\x20','30jVYMWb','red','toLowerCase','Failed\x20to\x20check\x20for\x20updates:\x20','.bun/','includes','299391iBQDfh','message','777920vBbAqC','cyan','error','next','@treasuredata/tdx','Current\x20version:','3237002LLaGfF','yellow','24oumqfV','983866BUzRvj','Upgrade\x20is\x20not\x20available\x20for\x20development\x20versions.','13736052UgwCpM','name','Latest\x20version:','Would\x20run:','green','add','latest','execute','dryRun','join','yarn','8uoouFM','install','bun','Checking\x20','log','958783EmTcJD','inherit','pnpm','execPath','upgrade'];a48_0x214a=function(){return _0x1e8327;};return a48_0x214a();}const PACKAGE_NAME=a48_0x219a61(0x1ff);export function detectPackageManager(){const _0xf02947=a48_0x219a61,_0x572f4f=process[_0xf02947(0x1e6)][_0xf02947(0x1f5)](),_0x512b00=process[_0xf02947(0x1f0)][0x1]??'';if(_0x572f4f['includes'](_0xf02947(0x1e0))||_0x512b00[_0xf02947(0x1f8)](_0xf02947(0x1f7)))return _0xf02947(0x1e0);if(_0x512b00[_0xf02947(0x1f8)]('pnpm'))return _0xf02947(0x1e5);if(_0x512b00['includes'](_0xf02947(0x1dd)))return _0xf02947(0x1dd);return _0xf02947(0x1ef);}export function buildInstallArgs(_0x1bfae6,_0x363b58){const _0x532443=a48_0x219a61;switch(_0x1bfae6){case'yarn':return['global',_0x532443(0x1d8),_0x363b58];case _0x532443(0x1e5):return[_0x532443(0x1d8),'-g',_0x363b58];default:return[_0x532443(0x1df),'-g',_0x363b58];}}function a48_0x4a91(_0x3401ad,_0x584265){_0x3401ad=_0x3401ad-0x1cf;const _0x214a5d=a48_0x214a();let _0x4a91e7=_0x214a5d[_0x3401ad];return _0x4a91e7;}export class UpgradeCommand extends BaseCommand{[a48_0x219a61(0x1d4)]=a48_0x219a61(0x1e7);['description']='Upgrade\x20tdx\x20to\x20the\x20latest\x20version';async[a48_0x219a61(0x1da)](_0x425018){const _0x225bc1=a48_0x219a61,{options:_0x14914f,args:_0xf08718}=_0x425018,_0x341fd0=!!_0x14914f[_0x225bc1(0x1db)],{next:_0x3202be,method:_0x1122b1}=_0x14914f,_0x4bc948=_0x3202be?_0x225bc1(0x1fe):loadReleaseChannel(),_0x4a063b=_0x4bc948===_0x225bc1(0x1fe)?_0x225bc1(0x1fe):_0x225bc1(0x1d9),_0x1e0488=_0xf08718[0x0]?String(_0xf08718[0x0])['replace'](/^v/,''):undefined,_0x5e1a39=getVersion();if(isDevVersion())return console[_0x225bc1(0x1fd)](a48_0x19c5e3[_0x225bc1(0x1cf)](_0x225bc1(0x1d2))),console[_0x225bc1(0x1fd)](a48_0x19c5e3[_0x225bc1(0x1e8)](_0x225bc1(0x1ec)+_0x5e1a39)),0x1;let _0x29b413;if(_0x1e0488)_0x29b413=_0x1e0488,console[_0x225bc1(0x1e2)](a48_0x19c5e3['dim'](_0x225bc1(0x200))+'\x20'+_0x5e1a39),console[_0x225bc1(0x1e2)](a48_0x19c5e3[_0x225bc1(0x1e8)](_0x225bc1(0x1ed))+'\x20\x20'+a48_0x19c5e3[_0x225bc1(0x1d7)](_0x1e0488)),console[_0x225bc1(0x1e2)]();else{console[_0x225bc1(0x1e2)](a48_0x19c5e3[_0x225bc1(0x1e8)](_0x225bc1(0x1e1)+PACKAGE_NAME+'@'+_0x4a063b+_0x225bc1(0x1e9)));try{_0x29b413=await fetchLatestVersion(_0x4bc948);}catch(_0x39df3d){return console[_0x225bc1(0x1fd)](a48_0x19c5e3[_0x225bc1(0x1f4)](_0x225bc1(0x1f6)+(_0x39df3d instanceof Error?_0x39df3d['message']:String(_0x39df3d)))),0x1;}if(!gt(_0x29b413,_0x5e1a39))return console['log'](a48_0x19c5e3[_0x225bc1(0x1d7)]('Already\x20up\x20to\x20date\x20('+_0x5e1a39+').')),0x0;console['log'](a48_0x19c5e3[_0x225bc1(0x1e8)](_0x225bc1(0x200))+'\x20'+_0x5e1a39),console[_0x225bc1(0x1e2)](a48_0x19c5e3[_0x225bc1(0x1e8)](_0x225bc1(0x1d5))+'\x20\x20'+a48_0x19c5e3[_0x225bc1(0x1d7)](_0x29b413)),console['log']();}const _0x4b84b3=_0x1122b1??detectPackageManager(),_0x264268=_0x1e0488?PACKAGE_NAME+'@'+_0x1e0488:PACKAGE_NAME+'@'+_0x4a063b,_0x139e32=buildInstallArgs(_0x4b84b3,_0x264268);if(_0x341fd0)return console[_0x225bc1(0x1e2)](a48_0x19c5e3[_0x225bc1(0x1e8)](_0x225bc1(0x1d6))),console[_0x225bc1(0x1e2)]('\x20\x20'+a48_0x19c5e3[_0x225bc1(0x1fc)](_0x4b84b3+'\x20'+_0x139e32['join']('\x20'))),0x0;return console['log'](a48_0x19c5e3[_0x225bc1(0x1e8)](_0x225bc1(0x1ee))+'\x20'+_0x4b84b3+'\x20'+_0x139e32[_0x225bc1(0x1dc)]('\x20')),console['log'](),new Promise(_0x55566a=>{const _0x56fead=_0x225bc1,_0xebb1ba=crossSpawn(_0x4b84b3,_0x139e32,{'stdio':_0x56fead(0x1e4)});_0xebb1ba['on'](_0x56fead(0x1f1),_0x28bd21=>{const _0x2f21bd=_0x56fead;console[_0x2f21bd(0x1e2)](),_0x28bd21===0x0?console[_0x2f21bd(0x1e2)](a48_0x19c5e3[_0x2f21bd(0x1d7)](_0x2f21bd(0x1eb)+_0x264268)):console['error'](a48_0x19c5e3[_0x2f21bd(0x1f4)]('Upgrade\x20failed\x20(exit\x20code\x20'+_0x28bd21+').')),_0x55566a(_0x28bd21??0x1);}),_0xebb1ba['on'](_0x56fead(0x1fd),_0x3d6e7e=>{const _0x2b5d8e=_0x56fead;console[_0x2b5d8e(0x1fd)](a48_0x19c5e3[_0x2b5d8e(0x1f4)](_0x2b5d8e(0x1f2)+_0x4b84b3+':\x20'+_0x3d6e7e[_0x2b5d8e(0x1fa)])),_0x55566a(0x1);});});}}
1
+ const a48_0x3e6c07=a48_0x431c;(function(_0x2424fa,_0x5d38ce){const _0x1d7746=a48_0x431c,_0x57cc64=_0x2424fa();while(!![]){try{const _0x52d3e7=-parseInt(_0x1d7746(0x82))/0x1+parseInt(_0x1d7746(0x76))/0x2*(parseInt(_0x1d7746(0x83))/0x3)+-parseInt(_0x1d7746(0x73))/0x4*(parseInt(_0x1d7746(0x87))/0x5)+-parseInt(_0x1d7746(0x75))/0x6+-parseInt(_0x1d7746(0x7c))/0x7*(-parseInt(_0x1d7746(0x91))/0x8)+-parseInt(_0x1d7746(0x79))/0x9+-parseInt(_0x1d7746(0x7f))/0xa*(-parseInt(_0x1d7746(0x9a))/0xb);if(_0x52d3e7===_0x5d38ce)break;else _0x57cc64['push'](_0x57cc64['shift']());}catch(_0x4b40c2){_0x57cc64['push'](_0x57cc64['shift']());}}}(a48_0x2f57,0x512f8));function a48_0x2f57(){const _0xa01980=['Target\x20version:','cyan','Running:','install','1871848RtDckT','Failed\x20to\x20check\x20for\x20updates:\x20','Current\x20version:','replace','...','error','add','execPath','Upgrade\x20tdx\x20to\x20the\x20latest\x20version','33cmqRLY','Current\x20version:\x20','Would\x20run:','Already\x20up\x20to\x20date\x20(','dryRun','green','name','includes','Latest\x20version:','bun','close','pnpm','Failed\x20to\x20run\x20','8VfMHUx','@treasuredata/tdx','312234KpyVVM','22unQdep','next','Checking\x20','4778298nXqGtY','Upgrade\x20failed\x20(exit\x20code\x20','red','7KhNYAc','yarn','dim','2867830aLxPaa','upgrade','join','185834sGUcWs','149697kdmQzm','latest','Successfully\x20upgraded\x20to\x20','log','1354720FXTBHd','message','description','argv','execute','global'];a48_0x2f57=function(){return _0xa01980;};return a48_0x2f57();}import{gt}from'semver';import a48_0x320835 from'chalk';import{BaseCommand}from'./command.js';import{getVersion,isDevVersion}from'../core/version.js';import{loadReleaseChannel}from'../core/config.js';import{fetchLatestVersion}from'../utils/version-check.js';function a48_0x431c(_0xbb4362,_0x45dacb){_0xbb4362=_0xbb4362-0x69;const _0x2f57c5=a48_0x2f57();let _0x431c7e=_0x2f57c5[_0xbb4362];return _0x431c7e;}import{crossSpawn}from'../utils/process.js';const PACKAGE_NAME=a48_0x3e6c07(0x74);export function detectPackageManager(){const _0xda7a53=a48_0x3e6c07,_0x5870f5=process[_0xda7a53(0x98)]['toLowerCase'](),_0x32aa3d=process[_0xda7a53(0x8a)][0x1]??'';if(_0x5870f5[_0xda7a53(0x6d)](_0xda7a53(0x6f))||_0x32aa3d[_0xda7a53(0x6d)]('.bun/'))return _0xda7a53(0x6f);if(_0x32aa3d[_0xda7a53(0x6d)](_0xda7a53(0x71)))return _0xda7a53(0x71);if(_0x32aa3d[_0xda7a53(0x6d)](_0xda7a53(0x7d)))return'yarn';return'npm';}export function buildInstallArgs(_0xbd1f82,_0x347b8f){const _0x4c385f=a48_0x3e6c07;switch(_0xbd1f82){case'yarn':return[_0x4c385f(0x8c),'add',_0x347b8f];case _0x4c385f(0x71):return[_0x4c385f(0x97),'-g',_0x347b8f];default:return[_0x4c385f(0x90),'-g',_0x347b8f];}}export class UpgradeCommand extends BaseCommand{[a48_0x3e6c07(0x6c)]=a48_0x3e6c07(0x80);[a48_0x3e6c07(0x89)]=a48_0x3e6c07(0x99);async[a48_0x3e6c07(0x8b)](_0x28f833){const _0x16fc0c=a48_0x3e6c07,{options:_0x60caa2,args:_0x12b39a}=_0x28f833,_0x10be92=!!_0x60caa2[_0x16fc0c(0x6a)],{next:_0x1a2d28,method:_0x5c9636}=_0x60caa2,_0x3efb4d=_0x1a2d28?'next':loadReleaseChannel(),_0xd37426=_0x3efb4d===_0x16fc0c(0x77)?'next':_0x16fc0c(0x84),_0x1f12cf=_0x12b39a[0x0]?String(_0x12b39a[0x0])[_0x16fc0c(0x94)](/^v/,''):undefined,_0x6651af=getVersion();if(isDevVersion())return console[_0x16fc0c(0x96)](a48_0x320835['yellow']('Upgrade\x20is\x20not\x20available\x20for\x20development\x20versions.')),console[_0x16fc0c(0x96)](a48_0x320835['dim'](_0x16fc0c(0x9b)+_0x6651af)),0x1;let _0x127b11;if(_0x1f12cf)_0x127b11=_0x1f12cf,console['log'](a48_0x320835[_0x16fc0c(0x7e)](_0x16fc0c(0x93))+'\x20'+_0x6651af),console['log'](a48_0x320835[_0x16fc0c(0x7e)](_0x16fc0c(0x8d))+'\x20\x20'+a48_0x320835[_0x16fc0c(0x6b)](_0x1f12cf)),console['log']();else{console[_0x16fc0c(0x86)](a48_0x320835[_0x16fc0c(0x7e)](_0x16fc0c(0x78)+PACKAGE_NAME+'@'+_0xd37426+_0x16fc0c(0x95)));try{_0x127b11=await fetchLatestVersion(_0x3efb4d);}catch(_0x152172){return console[_0x16fc0c(0x96)](a48_0x320835[_0x16fc0c(0x7b)](_0x16fc0c(0x92)+(_0x152172 instanceof Error?_0x152172[_0x16fc0c(0x88)]:String(_0x152172)))),0x1;}if(!gt(_0x127b11,_0x6651af))return console['log'](a48_0x320835[_0x16fc0c(0x6b)](_0x16fc0c(0x69)+_0x6651af+').')),0x0;console[_0x16fc0c(0x86)](a48_0x320835[_0x16fc0c(0x7e)](_0x16fc0c(0x93))+'\x20'+_0x6651af),console[_0x16fc0c(0x86)](a48_0x320835[_0x16fc0c(0x7e)](_0x16fc0c(0x6e))+'\x20\x20'+a48_0x320835['green'](_0x127b11)),console[_0x16fc0c(0x86)]();}const _0xf0ed97=_0x5c9636??detectPackageManager(),_0x233d62=_0x1f12cf?PACKAGE_NAME+'@'+_0x1f12cf:PACKAGE_NAME+'@'+_0xd37426,_0x55f7a3=buildInstallArgs(_0xf0ed97,_0x233d62);if(_0x10be92)return console['log'](a48_0x320835['dim'](_0x16fc0c(0x9c))),console['log']('\x20\x20'+a48_0x320835[_0x16fc0c(0x8e)](_0xf0ed97+'\x20'+_0x55f7a3['join']('\x20'))),0x0;return console['log'](a48_0x320835['dim'](_0x16fc0c(0x8f))+'\x20'+_0xf0ed97+'\x20'+_0x55f7a3[_0x16fc0c(0x81)]('\x20')),console[_0x16fc0c(0x86)](),new Promise(_0x1c4c30=>{const _0x5cabbc=_0x16fc0c,_0x1d8456=crossSpawn(_0xf0ed97,_0x55f7a3,{'stdio':'inherit'});_0x1d8456['on'](_0x5cabbc(0x70),_0x221871=>{const _0x5d3dcb=_0x5cabbc;console[_0x5d3dcb(0x86)](),_0x221871===0x0?console[_0x5d3dcb(0x86)](a48_0x320835['green'](_0x5d3dcb(0x85)+_0x233d62)):console[_0x5d3dcb(0x96)](a48_0x320835[_0x5d3dcb(0x7b)](_0x5d3dcb(0x7a)+_0x221871+').')),_0x1c4c30(_0x221871??0x1);}),_0x1d8456['on'](_0x5cabbc(0x96),_0x4b3920=>{const _0x1acf69=_0x5cabbc;console[_0x1acf69(0x96)](a48_0x320835[_0x1acf69(0x7b)](_0x1acf69(0x72)+_0xf0ed97+':\x20'+_0x4b3920[_0x1acf69(0x88)])),_0x1c4c30(0x1);});});}}
@@ -1 +1 @@
1
- const a49_0x8db7e8=a49_0x25cf;(function(_0x17fa25,_0x58b795){const _0x3c62e1=a49_0x25cf,_0x187499=_0x17fa25();while(!![]){try{const _0xee95ff=parseInt(_0x3c62e1(0x17a))/0x1*(parseInt(_0x3c62e1(0x19f))/0x2)+parseInt(_0x3c62e1(0x172))/0x3+parseInt(_0x3c62e1(0x18a))/0x4+parseInt(_0x3c62e1(0x18d))/0x5+parseInt(_0x3c62e1(0x194))/0x6+parseInt(_0x3c62e1(0x187))/0x7+-parseInt(_0x3c62e1(0x1a0))/0x8;if(_0xee95ff===_0x58b795)break;else _0x187499['push'](_0x187499['shift']());}catch(_0x2bdd28){_0x187499['push'](_0x187499['shift']());}}}(a49_0x2d52,0x4f4f3));import{BaseCommand}from'./command.js';import{saveSessionContext,getSessionID,cleanExpiredSessions,clearSessionContext}from'../core/session.js';import{profileExists,saveActiveProfileToUserConfig,saveDefaultSiteToUserConfig}from'../core/profile.js';import{GlobalContext}from'../core/global-context.js';import{parseAgentRef}from'../sdk/agent/agent-ref-parser.js';function a49_0x2d52(){const _0x2c9bc1=['Usage:\x20tdx\x20use\x20<resource>\x20<value>\x0a','(session:\x20','\x0aUse\x20\x27tdx\x20engage\x20workspace\x20list\x27\x20to\x20see\x20available\x20workspaces','Session\x20agent\x20set\x20to:\x20','code','tdx.json','2068143AzscAX','Session\x20context\x20','use','252428ZTjswR','agent','Session\x20llm_project\x20set\x20to:\x20','655910nYLaJT','site','parent_segment','release_channel','\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20current\x20context\x0a','\x27\x20to\x20save\x20permanently','length','1312530oLRGzw','green','database','Release\x20channel\x20set\x20to:\x20','profile','message','Error:\x20Profile\x20\x27','.\x20Must\x20be\x20one\x20of:\x20','execute','error','\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20--default\x20release_channel\x20<stable|next>\x20\x20#\x20Set\x20release\x20channel\x0a','563362gFBWsz','7790376jWbMkG','\x0aUpdate\x20notifications\x20will\x20check\x20the\x20@latest\x20(stable)\x20channel.','validate','log','Use\x20--default\x20with\x20site,\x20profile,\x20or\x20release_channel\x20to\x20save\x20permanently','next','debug','\x0aTip:\x20Use\x20\x27tdx\x20use\x20--default\x20profile\x20','Session\x20profile\x20set\x20to:\x20','resolveWorkspaceId','join','stable','llm_project','engage_workspace','dim','default','tdx','\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20--default\x20profile\x20<value>\x20\x20#\x20Save\x20default\x20profile\x20to\x20config\x0a','NOT_FOUND','session','displayWithSources','Session\x20engage_workspace\x20set\x20to:\x20','--default\x20can\x20only\x20be\x20used\x20with\x20\x27site\x27,\x20\x27profile\x27,\x20or\x20\x27release_channel\x27.\x20Other\x20resources\x20are\x20session-level\x20only.','\x0aRun\x20\x27tdx\x20use\x20--help\x27\x20for\x20more\x20options','Session\x20parent_segment\x20set\x20to:\x20','cleared','\x27\x20does\x20not\x20exist','llm_agent','description','\x0aSaved\x20to:\x20','release_channel\x20requires\x20--default.\x20Usage:\x20tdx\x20use\x20--default\x20release_channel\x20<stable|next>','\x0aTip:\x20Use\x20\x27tdx\x20use\x20--default\x20site\x20','925422PUtlry','Invalid\x20resource:\x20','.\x20Must\x20be\x20\x27stable\x27\x20or\x20\x27next\x27.','\x0aUse\x20\x27tdx\x20profiles\x27\x20to\x20see\x20available\x20profiles','Session\x20site\x20set\x20to:\x20','clear','Verifying\x20workspace\x20\x27','INVALID_ARGUMENT','1pUAajl','Invalid\x20release\x20channel:\x20','engage','\x27...','Error:\x20','\x0aTip:\x20Use\x20\x27tdx\x20use\x20--clear\x27\x20to\x20clear\x20session\x20overrides','Session\x20database\x20set\x20to:\x20'];a49_0x2d52=function(){return _0x2c9bc1;};return a49_0x2d52();}import{getConfigDir,saveReleaseChannel}from'../core/config.js';import{SDKError,ErrorCode}from'../sdk/errors.js';import{withSpinner}from'../utils/spinner.js';function a49_0x25cf(_0x1f73f7,_0x15a6b0){_0x1f73f7=_0x1f73f7-0x164;const _0x2d5225=a49_0x2d52();let _0x25cf71=_0x2d5225[_0x1f73f7];return _0x25cf71;}import a49_0x30d2b3 from'chalk';import*as a49_0x1b9c7c from'node:path';export class UseCommand extends BaseCommand{['name']=a49_0x8db7e8(0x189);[a49_0x8db7e8(0x16e)]='Set\x20session-level\x20context';[a49_0x8db7e8(0x1a2)](_0x470f60){const _0x482350=a49_0x8db7e8,{args:_0x451402,options:_0xd23042}=_0x470f60,_0x27e645=_0xd23042[_0x482350(0x1af)];if(_0x451402[_0x482350(0x193)]===0x0)return undefined;if(_0x451402[_0x482350(0x193)]===0x1)return _0x482350(0x181)+_0x482350(0x191)+'\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20--clear\x20\x20\x20\x20\x20\x20#\x20Clear\x20session\x20context\x0a'+'\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20--default\x20site\x20<value>\x20\x20\x20\x20\x20#\x20Save\x20default\x20site\x20to\x20config\x0a'+_0x482350(0x1b1)+_0x482350(0x19e)+'\x0aResources:\x20site,\x20database,\x20parent_segment,\x20llm_project,\x20agent,\x20profile,\x20engage_workspace,\x20release_channel\x0a'+_0x482350(0x169);const _0x119007=_0x451402[0x0],_0x3f4831=[_0x482350(0x18e),_0x482350(0x196),_0x482350(0x18f),_0x482350(0x1ac),_0x482350(0x18b),_0x482350(0x198),'engage_workspace',_0x482350(0x190)];if(!_0x3f4831['includes'](_0x119007))return _0x482350(0x173)+_0x119007+_0x482350(0x19b)+_0x3f4831[_0x482350(0x1aa)](',\x20');if(_0x27e645&&_0x119007!==_0x482350(0x18e)&&_0x119007!==_0x482350(0x198)&&_0x119007!=='release_channel')return _0x482350(0x168);if(_0x119007==='release_channel'&&!_0x27e645)return _0x482350(0x170);if(_0x119007===_0x482350(0x190)){const _0x941390=_0x451402[0x1];if(_0x941390!==_0x482350(0x1ab)&&_0x941390!==_0x482350(0x1a5))return _0x482350(0x17b)+_0x941390+_0x482350(0x174);}return undefined;}async[a49_0x8db7e8(0x19c)](_0x130099){const _0x1c64de=a49_0x8db7e8,{args:_0x54034c,options:_0x3cc9e2}=_0x130099,_0x1948fb=_0x3cc9e2[_0x1c64de(0x1a6)],_0x150cd0=_0x3cc9e2[_0x1c64de(0x177)],_0x1d7a0b=_0x3cc9e2[_0x1c64de(0x1af)];cleanExpiredSessions();try{if(_0x150cd0){clearSessionContext(_0x3cc9e2[_0x1c64de(0x165)]);const _0x2ad096=getSessionID(_0x3cc9e2[_0x1c64de(0x165)]);return console[_0x1c64de(0x1a3)](_0x1c64de(0x188)+a49_0x30d2b3['green'](_0x1c64de(0x16b))+'\x20'+a49_0x30d2b3['dim'](_0x1c64de(0x182)+_0x2ad096+')')),0x0;}if(_0x54034c[_0x1c64de(0x193)]===0x0){const _0x58891c=new GlobalContext(_0x3cc9e2);return _0x1948fb?_0x58891c[_0x1c64de(0x166)]():_0x58891c['display'](),console['log'](a49_0x30d2b3[_0x1c64de(0x1ae)]('\x0aSet\x20context:\x20tdx\x20use\x20<resource>\x20<value>')),console['log'](a49_0x30d2b3[_0x1c64de(0x1ae)]('Resources:\x20site,\x20database,\x20parent_segment,\x20llm_project,\x20agent,\x20profile,\x20engage_workspace,\x20release_channel')),console['log'](a49_0x30d2b3['dim'](_0x1c64de(0x1a4))),0x0;}const _0x21cc42=_0x54034c[0x0],_0x32ce76=_0x54034c[0x1],_0x4a4826=a49_0x1b9c7c[_0x1c64de(0x1aa)](getConfigDir(),_0x1c64de(0x186));if(_0x1d7a0b){if(_0x21cc42===_0x1c64de(0x18e))return saveDefaultSiteToUserConfig(_0x32ce76),console[_0x1c64de(0x1a3)]('Default\x20site\x20set\x20to:\x20'+a49_0x30d2b3[_0x1c64de(0x195)](_0x32ce76)),console[_0x1c64de(0x1a3)](a49_0x30d2b3['dim']('\x0aSaved\x20to:\x20'+_0x4a4826)),0x0;if(_0x21cc42===_0x1c64de(0x198)){if(!profileExists(_0x32ce76))return console[_0x1c64de(0x19d)](_0x1c64de(0x19a)+_0x32ce76+_0x1c64de(0x16c)),console[_0x1c64de(0x19d)](_0x1c64de(0x175)),0x1;return saveActiveProfileToUserConfig(_0x32ce76),console[_0x1c64de(0x1a3)]('Default\x20profile\x20set\x20to:\x20'+a49_0x30d2b3[_0x1c64de(0x195)](_0x32ce76)),console['log'](a49_0x30d2b3['dim'](_0x1c64de(0x16f)+_0x4a4826)),0x0;}if(_0x21cc42===_0x1c64de(0x190))return saveReleaseChannel(_0x32ce76),console[_0x1c64de(0x1a3)](_0x1c64de(0x197)+a49_0x30d2b3[_0x1c64de(0x195)](_0x32ce76)),console[_0x1c64de(0x1a3)](a49_0x30d2b3[_0x1c64de(0x1ae)](_0x1c64de(0x16f)+_0x4a4826)),_0x32ce76===_0x1c64de(0x1a5)?(console[_0x1c64de(0x1a3)](a49_0x30d2b3[_0x1c64de(0x1ae)]('\x0aUpdate\x20notifications\x20will\x20now\x20check\x20the\x20@next\x20channel.')),console[_0x1c64de(0x1a3)](a49_0x30d2b3[_0x1c64de(0x1ae)]('Install\x20the\x20latest\x20next\x20version:\x20npm\x20install\x20-g\x20@treasuredata/tdx@next'))):console[_0x1c64de(0x1a3)](a49_0x30d2b3[_0x1c64de(0x1ae)](_0x1c64de(0x1a1))),0x0;}if(_0x21cc42==='site'){const _0x4c8bfb=getSessionID(_0x3cc9e2[_0x1c64de(0x165)]);return saveSessionContext({'site':_0x32ce76},_0x3cc9e2['session']),console[_0x1c64de(0x1a3)](_0x1c64de(0x176)+a49_0x30d2b3['green'](_0x32ce76)+'\x20'+a49_0x30d2b3[_0x1c64de(0x1ae)](_0x1c64de(0x182)+_0x4c8bfb+')')),console[_0x1c64de(0x1a3)](a49_0x30d2b3['dim'](_0x1c64de(0x171)+_0x32ce76+_0x1c64de(0x192))),0x0;}if(_0x21cc42==='profile'){if(!profileExists(_0x32ce76))return console[_0x1c64de(0x19d)](_0x1c64de(0x19a)+_0x32ce76+'\x27\x20does\x20not\x20exist'),console[_0x1c64de(0x19d)](_0x1c64de(0x175)),0x1;const _0x3e32c1=getSessionID(_0x3cc9e2[_0x1c64de(0x165)]);return saveSessionContext({'profile':_0x32ce76},_0x3cc9e2[_0x1c64de(0x165)]),console[_0x1c64de(0x1a3)](_0x1c64de(0x1a8)+a49_0x30d2b3[_0x1c64de(0x195)](_0x32ce76)+'\x20'+a49_0x30d2b3[_0x1c64de(0x1ae)](_0x1c64de(0x182)+_0x3e32c1+')')),console[_0x1c64de(0x1a3)](a49_0x30d2b3['dim'](_0x1c64de(0x1a7)+_0x32ce76+'\x27\x20to\x20save\x20permanently')),0x0;}const _0x11ce1a={},_0x230a24=getSessionID(_0x3cc9e2[_0x1c64de(0x165)]);switch(_0x21cc42){case'database':_0x11ce1a[_0x1c64de(0x196)]=_0x32ce76,console[_0x1c64de(0x1a3)](_0x1c64de(0x180)+a49_0x30d2b3[_0x1c64de(0x195)](_0x32ce76)+'\x20'+a49_0x30d2b3[_0x1c64de(0x1ae)](_0x1c64de(0x182)+_0x230a24+')'));break;case _0x1c64de(0x18f):_0x11ce1a[_0x1c64de(0x18f)]=_0x32ce76,console[_0x1c64de(0x1a3)](_0x1c64de(0x16a)+a49_0x30d2b3[_0x1c64de(0x195)](_0x32ce76)+'\x20'+a49_0x30d2b3['dim']('(session:\x20'+_0x230a24+')'));break;case'llm_project':_0x11ce1a[_0x1c64de(0x1ac)]=_0x32ce76,console[_0x1c64de(0x1a3)](_0x1c64de(0x18c)+a49_0x30d2b3[_0x1c64de(0x195)](_0x32ce76)+'\x20'+a49_0x30d2b3['dim'](_0x1c64de(0x182)+_0x230a24+')'));break;case _0x1c64de(0x18b):{const {projectName:_0x5627ee,agentName:_0x275dee}=parseAgentRef(_0x32ce76);_0x275dee?(_0x11ce1a[_0x1c64de(0x1ac)]=_0x5627ee,_0x11ce1a[_0x1c64de(0x16d)]=_0x275dee,console['log'](_0x1c64de(0x18c)+a49_0x30d2b3['green'](_0x5627ee)+'\x20'+a49_0x30d2b3[_0x1c64de(0x1ae)](_0x1c64de(0x182)+_0x230a24+')')),console[_0x1c64de(0x1a3)](_0x1c64de(0x184)+a49_0x30d2b3[_0x1c64de(0x195)](_0x275dee)+'\x20'+a49_0x30d2b3[_0x1c64de(0x1ae)](_0x1c64de(0x182)+_0x230a24+')'))):(_0x11ce1a[_0x1c64de(0x16d)]=_0x32ce76,console[_0x1c64de(0x1a3)]('Session\x20agent\x20set\x20to:\x20'+a49_0x30d2b3[_0x1c64de(0x195)](_0x32ce76)+'\x20'+a49_0x30d2b3[_0x1c64de(0x1ae)](_0x1c64de(0x182)+_0x230a24+')')));break;}case'engage_workspace':{try{await withSpinner(_0x1c64de(0x178)+_0x32ce76+_0x1c64de(0x17d),()=>_0x130099[_0x1c64de(0x1b0)][_0x1c64de(0x17c)][_0x1c64de(0x1a9)](_0x32ce76));}catch(_0x87d065){if(_0x87d065 instanceof SDKError&&(_0x87d065[_0x1c64de(0x185)]===ErrorCode[_0x1c64de(0x164)]||_0x87d065[_0x1c64de(0x185)]===ErrorCode[_0x1c64de(0x179)]))return console[_0x1c64de(0x19d)](_0x1c64de(0x17e)+_0x87d065[_0x1c64de(0x199)]),console[_0x1c64de(0x19d)](_0x1c64de(0x183)),0x1;throw _0x87d065;}_0x11ce1a[_0x1c64de(0x1ad)]=_0x32ce76,console[_0x1c64de(0x1a3)](_0x1c64de(0x167)+a49_0x30d2b3['green'](_0x32ce76)+'\x20'+a49_0x30d2b3[_0x1c64de(0x1ae)](_0x1c64de(0x182)+_0x230a24+')'));break;}}return saveSessionContext(_0x11ce1a,_0x3cc9e2['session']),console['log'](a49_0x30d2b3[_0x1c64de(0x1ae)](_0x1c64de(0x17f))),0x0;}catch(_0x43511a){return _0x43511a instanceof Error&&console[_0x1c64de(0x19d)](_0x1c64de(0x17e)+_0x43511a[_0x1c64de(0x199)]),0x1;}}}
1
+ const a49_0x5cc206=a49_0x5a79;(function(_0x509b12,_0x163c68){const _0x105883=a49_0x5a79,_0x3ec02a=_0x509b12();while(!![]){try{const _0x2b3034=-parseInt(_0x105883(0xe0))/0x1*(-parseInt(_0x105883(0xe2))/0x2)+-parseInt(_0x105883(0x9b))/0x3+parseInt(_0x105883(0xc9))/0x4+-parseInt(_0x105883(0xbf))/0x5*(parseInt(_0x105883(0xd1))/0x6)+parseInt(_0x105883(0xd8))/0x7*(-parseInt(_0x105883(0xc2))/0x8)+parseInt(_0x105883(0x90))/0x9*(-parseInt(_0x105883(0xb3))/0xa)+-parseInt(_0x105883(0xcb))/0xb*(-parseInt(_0x105883(0xcf))/0xc);if(_0x2b3034===_0x163c68)break;else _0x3ec02a['push'](_0x3ec02a['shift']());}catch(_0x4f344a){_0x3ec02a['push'](_0x3ec02a['shift']());}}}(a49_0x3f19,0xdad60));import{BaseCommand}from'./command.js';import{saveSessionContext,getSessionID,cleanExpiredSessions,clearSessionContext}from'../core/session.js';import{profileExists,saveActiveProfileToUserConfig,saveDefaultSiteToUserConfig}from'../core/profile.js';import{GlobalContext}from'../core/global-context.js';import{parseAgentRef}from'../sdk/agent/agent-ref-parser.js';function a49_0x3f19(){const _0x2c5249=['\x0aUpdate\x20notifications\x20will\x20now\x20check\x20the\x20@next\x20channel.','\x0aSaved\x20to:\x20','use','Session\x20engage_workspace\x20set\x20to:\x20','110opSwsY','.\x20Must\x20be\x20\x27stable\x27\x20or\x20\x27next\x27.','Session\x20profile\x20set\x20to:\x20','message','resolveWorkspaceId','Resources:\x20site,\x20database,\x20parent_segment,\x20llm_project,\x20agent,\x20profile,\x20engage_workspace,\x20release_channel','llm_project','Default\x20profile\x20set\x20to:\x20','Session\x20context\x20','\x0aTip:\x20Use\x20\x27tdx\x20use\x20--default\x20site\x20','\x27\x20to\x20save\x20permanently','stable','10wTBJcF','log','\x27\x20does\x20not\x20exist','4945456fEAPEA','join','Verifying\x20workspace\x20\x27','includes','.\x20Must\x20be\x20one\x20of:\x20','\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20--default\x20release_channel\x20<stable|next>\x20\x20#\x20Set\x20release\x20channel\x0a','Session\x20site\x20set\x20to:\x20','2792832HyAjrn','engage','11vRHUFG','tdx.json','profile','parent_segment','9398868bSPuKp','release_channel\x20requires\x20--default.\x20Usage:\x20tdx\x20use\x20--default\x20release_channel\x20<stable|next>','671646vGElBw','\x0aUse\x20\x27tdx\x20profiles\x27\x20to\x20see\x20available\x20profiles','site','INVALID_ARGUMENT','\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20--default\x20profile\x20<value>\x20\x20#\x20Save\x20default\x20profile\x20to\x20config\x0a','llm_agent','Session\x20llm_project\x20set\x20to:\x20','7EFvGHr','green','description','validate','next','--default\x20can\x20only\x20be\x20used\x20with\x20\x27site\x27,\x20\x27profile\x27,\x20or\x20\x27release_channel\x27.\x20Other\x20resources\x20are\x20session-level\x20only.','\x0aRun\x20\x27tdx\x20use\x20--help\x27\x20for\x20more\x20options','error','49TApmsy','Default\x20site\x20set\x20to:\x20','45982fObbJg','session','release_channel','108369EgaOTI','Install\x20the\x20latest\x20next\x20version:\x20npm\x20install\x20-g\x20@treasuredata/tdx@next','\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20--clear\x20\x20\x20\x20\x20\x20#\x20Clear\x20session\x20context\x0a','(session:\x20','Invalid\x20resource:\x20','display','\x0aUse\x20\x27tdx\x20engage\x20workspace\x20list\x27\x20to\x20see\x20available\x20workspaces','\x0aResources:\x20site,\x20database,\x20parent_segment,\x20llm_project,\x20agent,\x20profile,\x20engage_workspace,\x20release_channel\x0a','agent','Error:\x20Profile\x20\x27','Invalid\x20release\x20channel:\x20','2211417yQKzei','\x0aSet\x20context:\x20tdx\x20use\x20<resource>\x20<value>','default','name','length','Session\x20parent_segment\x20set\x20to:\x20','code','\x0aTip:\x20Use\x20\x27tdx\x20use\x20--default\x20profile\x20','\x0aUpdate\x20notifications\x20will\x20check\x20the\x20@latest\x20(stable)\x20channel.','\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20current\x20context\x0a','Error:\x20','cleared','NOT_FOUND','engage_workspace','Session\x20agent\x20set\x20to:\x20','Use\x20--default\x20with\x20site,\x20profile,\x20or\x20release_channel\x20to\x20save\x20permanently','\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20--default\x20site\x20<value>\x20\x20\x20\x20\x20#\x20Save\x20default\x20site\x20to\x20config\x0a','database','dim','\x0aTip:\x20Use\x20\x27tdx\x20use\x20--clear\x27\x20to\x20clear\x20session\x20overrides'];a49_0x3f19=function(){return _0x2c5249;};return a49_0x3f19();}import{getConfigDir,saveReleaseChannel}from'../core/config.js';import{SDKError,ErrorCode}from'../sdk/errors.js';import{withSpinner}from'../utils/spinner.js';import a49_0x38058f from'chalk';function a49_0x5a79(_0x2e6f6a,_0x13ef5b){_0x2e6f6a=_0x2e6f6a-0x90;const _0x3f195f=a49_0x3f19();let _0x5a7932=_0x3f195f[_0x2e6f6a];return _0x5a7932;}import*as a49_0x2cee2b from'node:path';export class UseCommand extends BaseCommand{[a49_0x5cc206(0x9e)]=a49_0x5cc206(0xb1);[a49_0x5cc206(0xda)]='Set\x20session-level\x20context';[a49_0x5cc206(0xdb)](_0x249dc9){const _0x9cb405=a49_0x5cc206,{args:_0x23869e,options:_0x51758}=_0x249dc9,_0x1bc5e1=_0x51758[_0x9cb405(0x9d)];if(_0x23869e['length']===0x0)return undefined;if(_0x23869e[_0x9cb405(0x9f)]===0x1)return'Usage:\x20tdx\x20use\x20<resource>\x20<value>\x0a'+_0x9cb405(0xa4)+_0x9cb405(0x92)+_0x9cb405(0xab)+_0x9cb405(0xd5)+_0x9cb405(0xc7)+_0x9cb405(0x97)+_0x9cb405(0xde);const _0x59bb2d=_0x23869e[0x0],_0xd5aa70=['site',_0x9cb405(0xac),_0x9cb405(0xce),_0x9cb405(0xb9),_0x9cb405(0x98),_0x9cb405(0xcd),_0x9cb405(0xa8),_0x9cb405(0xe4)];if(!_0xd5aa70[_0x9cb405(0xc5)](_0x59bb2d))return _0x9cb405(0x94)+_0x59bb2d+_0x9cb405(0xc6)+_0xd5aa70['join'](',\x20');if(_0x1bc5e1&&_0x59bb2d!==_0x9cb405(0xd3)&&_0x59bb2d!==_0x9cb405(0xcd)&&_0x59bb2d!==_0x9cb405(0xe4))return _0x9cb405(0xdd);if(_0x59bb2d===_0x9cb405(0xe4)&&!_0x1bc5e1)return _0x9cb405(0xd0);if(_0x59bb2d===_0x9cb405(0xe4)){const _0x4a8a4f=_0x23869e[0x1];if(_0x4a8a4f!==_0x9cb405(0xbe)&&_0x4a8a4f!==_0x9cb405(0xdc))return _0x9cb405(0x9a)+_0x4a8a4f+_0x9cb405(0xb4);}return undefined;}async['execute'](_0x2b2996){const _0x46891d=a49_0x5cc206,{args:_0x4c862d,options:_0x292480}=_0x2b2996,_0x8c9508=_0x292480['debug'],_0xe960ff=_0x292480['clear'],_0x568b38=_0x292480['default'];cleanExpiredSessions();try{if(_0xe960ff){clearSessionContext(_0x292480[_0x46891d(0xe3)]);const _0x42f6a4=getSessionID(_0x292480[_0x46891d(0xe3)]);return console['log'](_0x46891d(0xbb)+a49_0x38058f['green'](_0x46891d(0xa6))+'\x20'+a49_0x38058f[_0x46891d(0xad)](_0x46891d(0x93)+_0x42f6a4+')')),0x0;}if(_0x4c862d[_0x46891d(0x9f)]===0x0){const _0x4546cf=new GlobalContext(_0x292480);return _0x8c9508?_0x4546cf['displayWithSources']():_0x4546cf[_0x46891d(0x95)](),console['log'](a49_0x38058f[_0x46891d(0xad)](_0x46891d(0x9c))),console[_0x46891d(0xc0)](a49_0x38058f[_0x46891d(0xad)](_0x46891d(0xb8))),console[_0x46891d(0xc0)](a49_0x38058f['dim'](_0x46891d(0xaa))),0x0;}const _0x15fce7=_0x4c862d[0x0],_0x255184=_0x4c862d[0x1],_0x4a0c82=a49_0x2cee2b[_0x46891d(0xc3)](getConfigDir(),_0x46891d(0xcc));if(_0x568b38){if(_0x15fce7===_0x46891d(0xd3))return saveDefaultSiteToUserConfig(_0x255184),console[_0x46891d(0xc0)](_0x46891d(0xe1)+a49_0x38058f[_0x46891d(0xd9)](_0x255184)),console[_0x46891d(0xc0)](a49_0x38058f[_0x46891d(0xad)](_0x46891d(0xb0)+_0x4a0c82)),0x0;if(_0x15fce7===_0x46891d(0xcd)){if(!profileExists(_0x255184))return console[_0x46891d(0xdf)]('Error:\x20Profile\x20\x27'+_0x255184+_0x46891d(0xc1)),console[_0x46891d(0xdf)]('\x0aUse\x20\x27tdx\x20profiles\x27\x20to\x20see\x20available\x20profiles'),0x1;return saveActiveProfileToUserConfig(_0x255184),console['log'](_0x46891d(0xba)+a49_0x38058f[_0x46891d(0xd9)](_0x255184)),console[_0x46891d(0xc0)](a49_0x38058f[_0x46891d(0xad)](_0x46891d(0xb0)+_0x4a0c82)),0x0;}if(_0x15fce7===_0x46891d(0xe4))return saveReleaseChannel(_0x255184),console[_0x46891d(0xc0)]('Release\x20channel\x20set\x20to:\x20'+a49_0x38058f[_0x46891d(0xd9)](_0x255184)),console['log'](a49_0x38058f[_0x46891d(0xad)](_0x46891d(0xb0)+_0x4a0c82)),_0x255184===_0x46891d(0xdc)?(console[_0x46891d(0xc0)](a49_0x38058f[_0x46891d(0xad)](_0x46891d(0xaf))),console['log'](a49_0x38058f[_0x46891d(0xad)](_0x46891d(0x91)))):console['log'](a49_0x38058f[_0x46891d(0xad)](_0x46891d(0xa3))),0x0;}if(_0x15fce7===_0x46891d(0xd3)){const _0x51bf9e=getSessionID(_0x292480[_0x46891d(0xe3)]);return saveSessionContext({'site':_0x255184},_0x292480[_0x46891d(0xe3)]),console['log'](_0x46891d(0xc8)+a49_0x38058f[_0x46891d(0xd9)](_0x255184)+'\x20'+a49_0x38058f[_0x46891d(0xad)](_0x46891d(0x93)+_0x51bf9e+')')),console[_0x46891d(0xc0)](a49_0x38058f[_0x46891d(0xad)](_0x46891d(0xbc)+_0x255184+_0x46891d(0xbd))),0x0;}if(_0x15fce7===_0x46891d(0xcd)){if(!profileExists(_0x255184))return console[_0x46891d(0xdf)](_0x46891d(0x99)+_0x255184+_0x46891d(0xc1)),console[_0x46891d(0xdf)](_0x46891d(0xd2)),0x1;const _0x580519=getSessionID(_0x292480[_0x46891d(0xe3)]);return saveSessionContext({'profile':_0x255184},_0x292480[_0x46891d(0xe3)]),console['log'](_0x46891d(0xb5)+a49_0x38058f[_0x46891d(0xd9)](_0x255184)+'\x20'+a49_0x38058f[_0x46891d(0xad)](_0x46891d(0x93)+_0x580519+')')),console[_0x46891d(0xc0)](a49_0x38058f[_0x46891d(0xad)](_0x46891d(0xa2)+_0x255184+_0x46891d(0xbd))),0x0;}const _0x501767={},_0x3d3b6c=getSessionID(_0x292480[_0x46891d(0xe3)]);switch(_0x15fce7){case _0x46891d(0xac):_0x501767[_0x46891d(0xac)]=_0x255184,console[_0x46891d(0xc0)]('Session\x20database\x20set\x20to:\x20'+a49_0x38058f['green'](_0x255184)+'\x20'+a49_0x38058f[_0x46891d(0xad)](_0x46891d(0x93)+_0x3d3b6c+')'));break;case _0x46891d(0xce):_0x501767[_0x46891d(0xce)]=_0x255184,console[_0x46891d(0xc0)](_0x46891d(0xa0)+a49_0x38058f[_0x46891d(0xd9)](_0x255184)+'\x20'+a49_0x38058f[_0x46891d(0xad)]('(session:\x20'+_0x3d3b6c+')'));break;case'llm_project':_0x501767['llm_project']=_0x255184,console[_0x46891d(0xc0)](_0x46891d(0xd7)+a49_0x38058f[_0x46891d(0xd9)](_0x255184)+'\x20'+a49_0x38058f[_0x46891d(0xad)](_0x46891d(0x93)+_0x3d3b6c+')'));break;case _0x46891d(0x98):{const {projectName:_0x26a002,agentName:_0x5eea7c}=parseAgentRef(_0x255184);_0x5eea7c?(_0x501767[_0x46891d(0xb9)]=_0x26a002,_0x501767[_0x46891d(0xd6)]=_0x5eea7c,console[_0x46891d(0xc0)](_0x46891d(0xd7)+a49_0x38058f[_0x46891d(0xd9)](_0x26a002)+'\x20'+a49_0x38058f['dim'](_0x46891d(0x93)+_0x3d3b6c+')')),console[_0x46891d(0xc0)](_0x46891d(0xa9)+a49_0x38058f[_0x46891d(0xd9)](_0x5eea7c)+'\x20'+a49_0x38058f[_0x46891d(0xad)]('(session:\x20'+_0x3d3b6c+')'))):(_0x501767[_0x46891d(0xd6)]=_0x255184,console[_0x46891d(0xc0)](_0x46891d(0xa9)+a49_0x38058f['green'](_0x255184)+'\x20'+a49_0x38058f[_0x46891d(0xad)](_0x46891d(0x93)+_0x3d3b6c+')')));break;}case _0x46891d(0xa8):{try{await withSpinner(_0x46891d(0xc4)+_0x255184+'\x27...',()=>_0x2b2996['tdx'][_0x46891d(0xca)][_0x46891d(0xb7)](_0x255184));}catch(_0x5342a9){if(_0x5342a9 instanceof SDKError&&(_0x5342a9[_0x46891d(0xa1)]===ErrorCode[_0x46891d(0xa7)]||_0x5342a9[_0x46891d(0xa1)]===ErrorCode[_0x46891d(0xd4)]))return console['error'](_0x46891d(0xa5)+_0x5342a9[_0x46891d(0xb6)]),console['error'](_0x46891d(0x96)),0x1;throw _0x5342a9;}_0x501767[_0x46891d(0xa8)]=_0x255184,console['log'](_0x46891d(0xb2)+a49_0x38058f[_0x46891d(0xd9)](_0x255184)+'\x20'+a49_0x38058f[_0x46891d(0xad)]('(session:\x20'+_0x3d3b6c+')'));break;}}return saveSessionContext(_0x501767,_0x292480[_0x46891d(0xe3)]),console['log'](a49_0x38058f[_0x46891d(0xad)](_0x46891d(0xae))),0x0;}catch(_0x27b271){return _0x27b271 instanceof Error&&console['error'](_0x46891d(0xa5)+_0x27b271[_0x46891d(0xb6)]),0x1;}}}
@@ -1 +1 @@
1
- function a50_0xb07e(_0x47d1d9,_0x451bc1){_0x47d1d9=_0x47d1d9-0x187;const _0x3f84ec=a50_0x3f84();let _0xb07e03=_0x3f84ec[_0x47d1d9];return _0xb07e03;}const a50_0x101fc6=a50_0xb07e;(function(_0x1c6da9,_0x1d1ffa){const _0x465f3b=a50_0xb07e,_0x433a8d=_0x1c6da9();while(!![]){try{const _0x2811b3=-parseInt(_0x465f3b(0x188))/0x1*(parseInt(_0x465f3b(0x196))/0x2)+-parseInt(_0x465f3b(0x1a1))/0x3*(-parseInt(_0x465f3b(0x18f))/0x4)+parseInt(_0x465f3b(0x194))/0x5*(parseInt(_0x465f3b(0x193))/0x6)+-parseInt(_0x465f3b(0x1ac))/0x7*(parseInt(_0x465f3b(0x18a))/0x8)+-parseInt(_0x465f3b(0x1a7))/0x9*(parseInt(_0x465f3b(0x1ad))/0xa)+-parseInt(_0x465f3b(0x18e))/0xb+parseInt(_0x465f3b(0x1a2))/0xc;if(_0x2811b3===_0x1d1ffa)break;else _0x433a8d['push'](_0x433a8d['shift']());}catch(_0x3db7f2){_0x433a8d['push'](_0x433a8d['shift']());}}}(a50_0x3f84,0xe9842));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleSDKOutput,handleSingleObjectOutput,isStructuredFormat}from'../core/command-output.js';import{withSpinner}from'../utils/spinner.js';import a50_0x4c1465 from'chalk';export class UserCommand extends BaseCommand{['name']=a50_0x101fc6(0x1a5);[a50_0x101fc6(0x197)]=a50_0x101fc6(0x1aa);async[a50_0x101fc6(0x1a3)](_0x427342){const _0x5a5f7d=a50_0x101fc6,{options:_0xd3f631,tdx:_0x384a0a}=_0x427342;try{const _0x5bd983=await withSpinner(_0x5a5f7d(0x199),()=>_0x384a0a[_0x5a5f7d(0x1a5)][_0x5a5f7d(0x18b)](),{'verbose':_0xd3f631[_0x5a5f7d(0x1a0)]}),_0x170d4a=_0x5bd983['data'];return await handleSingleObjectOutput(_0x170d4a,_0xd3f631),0x0;}catch(_0x3be201){if(_0x3be201 instanceof SDKError)return console[_0x5a5f7d(0x195)](_0x5a5f7d(0x1ab)+_0x3be201['message']),_0x3be201['cause']&&console[_0x5a5f7d(0x195)](_0x5a5f7d(0x18c)+_0x3be201[_0x5a5f7d(0x19b)]),0x1;throw _0x3be201;}}}function a50_0x3f84(){const _0x43e93a=['60441hWLrMX','localeCompare','5608824ldtUvf','getCurrent','\x20\x20Cause:\x20','list','11146410ccKphc','3680364lNOmSF','dim','yellow','name','3213750BGzHYP','10TeVfxL','error','46EqOHRB','description','sort','Fetching\x20user\x20info...','\x20user','cause','administrator','log','List\x20all\x20users\x20in\x20the\x20account','email','verbose','3PobMHB','45715500YYnSEt','execute','data','user','\x20(owner)','729xwNfrr','length','Unknown','Show\x20current\x20user\x20information','Error:\x20','14TyQXGM','128250eXuWTO','✔\x20Found\x20','Listing\x20users...'];a50_0x3f84=function(){return _0x43e93a;};return a50_0x3f84();}export class UserListCommand extends BaseCommand{[a50_0x101fc6(0x192)]='user\x20list';['description']=a50_0x101fc6(0x19e);async['execute'](_0x4d0c40){const _0x303366=a50_0x101fc6,{options:_0x31112e,tdx:_0x3f565c}=_0x4d0c40;try{const _0x14c6b9=await withSpinner(_0x303366(0x187),()=>_0x3f565c['user'][_0x303366(0x18d)](),{'verbose':_0x31112e[_0x303366(0x1a0)]}),_0x1508d4=_0x14c6b9[_0x303366(0x1a4)];console[_0x303366(0x195)](_0x303366(0x1ae)+_0x1508d4['length']+_0x303366(0x19a)+(_0x1508d4[_0x303366(0x1a8)]!==0x1?'s':''));if(isStructuredFormat(_0x31112e))await handleSDKOutput(_0x1508d4,_0x31112e);else{const _0x59948e=[..._0x1508d4][_0x303366(0x198)]((_0x25c7b3,_0x264786)=>String(_0x25c7b3[_0x303366(0x192)]??'')[_0x303366(0x189)](String(_0x264786[_0x303366(0x192)]??'')));for(const _0x2aab7c of _0x59948e){const _0x206687=_0x2aab7c['account_owner']?a50_0x4c1465[_0x303366(0x191)](_0x303366(0x1a6)):_0x2aab7c[_0x303366(0x19c)]?a50_0x4c1465[_0x303366(0x191)]('\x20(admin)'):'',_0x1b5c05=_0x2aab7c['email']&&_0x2aab7c[_0x303366(0x19f)]!==_0x2aab7c[_0x303366(0x192)]?a50_0x4c1465[_0x303366(0x190)]('\x20<'+_0x2aab7c['email']+'>'):'';console[_0x303366(0x19d)]('👤\x20'+(_0x2aab7c[_0x303366(0x192)]??_0x303366(0x1a9))+_0x1b5c05+_0x206687);}}return 0x0;}catch(_0x305338){if(_0x305338 instanceof SDKError)return console[_0x303366(0x195)](_0x303366(0x1ab)+_0x305338['message']),_0x305338[_0x303366(0x19b)]&&console['error'](_0x303366(0x18c)+_0x305338[_0x303366(0x19b)]),0x1;throw _0x305338;}}}
1
+ function a50_0x4e10(_0x12fe44,_0x5716de){_0x12fe44=_0x12fe44-0xe3;const _0x267f1d=a50_0x267f();let _0x4e1081=_0x267f1d[_0x12fe44];return _0x4e1081;}const a50_0x3e4c61=a50_0x4e10;(function(_0x31b388,_0x348996){const _0x58c865=a50_0x4e10,_0x5a0b1e=_0x31b388();while(!![]){try{const _0x3accdd=parseInt(_0x58c865(0xe4))/0x1*(-parseInt(_0x58c865(0x109))/0x2)+-parseInt(_0x58c865(0x10a))/0x3+parseInt(_0x58c865(0xe6))/0x4+parseInt(_0x58c865(0xf5))/0x5*(-parseInt(_0x58c865(0x107))/0x6)+-parseInt(_0x58c865(0xfe))/0x7+parseInt(_0x58c865(0xe9))/0x8*(parseInt(_0x58c865(0x105))/0x9)+parseInt(_0x58c865(0xf9))/0xa;if(_0x3accdd===_0x348996)break;else _0x5a0b1e['push'](_0x5a0b1e['shift']());}catch(_0x11420e){_0x5a0b1e['push'](_0x5a0b1e['shift']());}}}(a50_0x267f,0x60251));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleSDKOutput,handleSingleObjectOutput,isStructuredFormat}from'../core/command-output.js';import{withSpinner}from'../utils/spinner.js';function a50_0x267f(){const _0x537ab4=['account_owner','👤\x20','532017icJbmr','Error:\x20','3519414FJKRUt','length','92702IqwngG','750918LKEKal','yellow','12oEieVS','Listing\x20users...','2126816OpriEe','\x20\x20Cause:\x20','sort','16NVZwBb','error','List\x20all\x20users\x20in\x20the\x20account','message','description','user\x20list','✔\x20Found\x20','verbose','execute','\x20(admin)','Show\x20current\x20user\x20information','user','5VpRbzz','\x20user','email','data','17248230IiKMzo','Unknown','localeCompare','administrator','dim','4114999msICvj','cause','Fetching\x20user\x20info...','name','list'];a50_0x267f=function(){return _0x537ab4;};return a50_0x267f();}import a50_0x371c04 from'chalk';export class UserCommand extends BaseCommand{['name']='user';[a50_0x3e4c61(0xed)]=a50_0x3e4c61(0xf3);async[a50_0x3e4c61(0xf1)](_0x2b72e7){const _0x5bf1c6=a50_0x3e4c61,{options:_0x577b28,tdx:_0x19544f}=_0x2b72e7;try{const _0x829073=await withSpinner(_0x5bf1c6(0x100),()=>_0x19544f[_0x5bf1c6(0xf4)]['getCurrent'](),{'verbose':_0x577b28['verbose']}),_0x5e22c0=_0x829073[_0x5bf1c6(0xf8)];return await handleSingleObjectOutput(_0x5e22c0,_0x577b28),0x0;}catch(_0x3cbced){if(_0x3cbced instanceof SDKError)return console['error'](_0x5bf1c6(0x106)+_0x3cbced[_0x5bf1c6(0xec)]),_0x3cbced[_0x5bf1c6(0xff)]&&console[_0x5bf1c6(0xea)]('\x20\x20Cause:\x20'+_0x3cbced[_0x5bf1c6(0xff)]),0x1;throw _0x3cbced;}}}export class UserListCommand extends BaseCommand{['name']=a50_0x3e4c61(0xee);['description']=a50_0x3e4c61(0xeb);async[a50_0x3e4c61(0xf1)](_0x3bea71){const _0xc0d8f1=a50_0x3e4c61,{options:_0x58992b,tdx:_0x1d4a82}=_0x3bea71;try{const _0x5298d1=await withSpinner(_0xc0d8f1(0xe5),()=>_0x1d4a82['user'][_0xc0d8f1(0x102)](),{'verbose':_0x58992b[_0xc0d8f1(0xf0)]}),_0xd73c28=_0x5298d1[_0xc0d8f1(0xf8)];console[_0xc0d8f1(0xea)](_0xc0d8f1(0xef)+_0xd73c28[_0xc0d8f1(0x108)]+_0xc0d8f1(0xf6)+(_0xd73c28[_0xc0d8f1(0x108)]!==0x1?'s':''));if(isStructuredFormat(_0x58992b))await handleSDKOutput(_0xd73c28,_0x58992b);else{const _0xa649cd=[..._0xd73c28][_0xc0d8f1(0xe8)]((_0x41bcf2,_0x2caf40)=>String(_0x41bcf2['name']??'')[_0xc0d8f1(0xfb)](String(_0x2caf40[_0xc0d8f1(0x101)]??'')));for(const _0x545c93 of _0xa649cd){const _0x35d75d=_0x545c93[_0xc0d8f1(0x103)]?a50_0x371c04[_0xc0d8f1(0xe3)]('\x20(owner)'):_0x545c93[_0xc0d8f1(0xfc)]?a50_0x371c04[_0xc0d8f1(0xe3)](_0xc0d8f1(0xf2)):'',_0x4a5237=_0x545c93[_0xc0d8f1(0xf7)]&&_0x545c93[_0xc0d8f1(0xf7)]!==_0x545c93[_0xc0d8f1(0x101)]?a50_0x371c04[_0xc0d8f1(0xfd)]('\x20<'+_0x545c93['email']+'>'):'';console['log'](_0xc0d8f1(0x104)+(_0x545c93[_0xc0d8f1(0x101)]??_0xc0d8f1(0xfa))+_0x4a5237+_0x35d75d);}}return 0x0;}catch(_0x392df7){if(_0x392df7 instanceof SDKError)return console[_0xc0d8f1(0xea)](_0xc0d8f1(0x106)+_0x392df7[_0xc0d8f1(0xec)]),_0x392df7[_0xc0d8f1(0xff)]&&console[_0xc0d8f1(0xea)](_0xc0d8f1(0xe7)+_0x392df7['cause']),0x1;throw _0x392df7;}}}