@treasuredata/tdx 2026.3.12 → 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_0x37655e=a40_0x3101;(function(_0x1ddeac,_0x2befde){const _0x4bf627=a40_0x3101,_0x853d2b=_0x1ddeac();while(!![]){try{const _0x558dd7=-parseInt(_0x4bf627(0x74))/0x1*(parseInt(_0x4bf627(0x8c))/0x2)+-parseInt(_0x4bf627(0x93))/0x3+-parseInt(_0x4bf627(0x98))/0x4*(parseInt(_0x4bf627(0x96))/0x5)+parseInt(_0x4bf627(0x69))/0x6*(parseInt(_0x4bf627(0x95))/0x7)+-parseInt(_0x4bf627(0x6b))/0x8*(parseInt(_0x4bf627(0x9a))/0x9)+-parseInt(_0x4bf627(0x92))/0xa*(parseInt(_0x4bf627(0x6d))/0xb)+parseInt(_0x4bf627(0x99))/0xc;if(_0x558dd7===_0x2befde)break;else _0x853d2b['push'](_0x853d2b['shift']());}catch(_0x4d43aa){_0x853d2b['push'](_0x853d2b['shift']());}}}(a40_0x1ad9,0x89846));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';function a40_0x1ad9(){const _0x322909=['error','Usage:\x20tdx\x20segment\x20update\x20<path>\x20[options]','INTERNAL','896113aupwaJ','Segment\x20ID:\x20','Error:\x20Cannot\x20update\x20','execute','Resolved\x20type:\x20','segment:update','includes','Examples:','kind','.\x20Only\x20child\x20segments\x20can\x20be\x20updated.','\x20\x20\x20Path:\x20','type','Segment\x20ID\x20missing\x20from\x20resolved\x20path','Updating\x20segment\x20\x27','resolvePathToResource','resolveFolderId','updateSegmentById','description','⚠\x20Deprecation\x20warning:\x20`segment\x20update`\x20is\x20deprecated.','Resolved\x20relative\x20path\x20to:\x20','segmentId','\x20\x20tdx\x20segment\x20update\x20\x22High\x20Value\x22\x20--rule\x20\x27...\x27\x20\x20#\x20Relative\x20to\x20context','\x27...','verbose','2lgFyxM','Resolving\x20path\x20\x27','segmentName','Error:\x20Segment\x20path\x20or\x20name\x20is\x20required','\x20\x20Use\x20`tdx\x20sg\x20push`\x20with\x20YAML\x20files\x20instead.\x0a','name','10czzqJY','3067317vpAipR','segment','49shRlCz','155FKbGzt','\x20\x20tdx\x20segment\x20update\x20\x22My\x20Audience/High\x20Value\x22\x20--description\x20\x22...\x22','43796dNMhZf','31760676gbhKTJ','1134mvUMoG','Resolving\x20folder\x20\x27','parentId','✔\x20Updated\x20segment\x20\x27','length','490290ylVcQH','yellow','19120CZulQx','Use:\x20tdx\x20segment\x20update\x20<path_to_segment>\x20[options]','1059817ttTfZL','data','folder','Parent\x20ID:\x20'];a40_0x1ad9=function(){return _0x322909;};return a40_0x1ad9();}import{SDKError,ErrorCode}from'../sdk/index.js';import a40_0x5f5a38 from'chalk';function a40_0x3101(_0x25d087,_0x2a64de){_0x25d087=_0x25d087-0x68;const _0x1ad950=a40_0x1ad9();let _0x310184=_0x1ad950[_0x25d087];return _0x310184;}export class SegmentUpdateCommand extends BaseCommand{[a40_0x37655e(0x91)]=a40_0x37655e(0x79);[a40_0x37655e(0x85)]='Update\x20existing\x20child\x20segment';async[a40_0x37655e(0x77)](_0x378623){const _0x1c2b49=a40_0x37655e;console[_0x1c2b49(0x71)](a40_0x5f5a38[_0x1c2b49(0x6a)](_0x1c2b49(0x86))),console[_0x1c2b49(0x71)](a40_0x5f5a38[_0x1c2b49(0x6a)](_0x1c2b49(0x90)));const {options:_0x13ba7f,args:_0x60a7a9,tdx:_0x41afbb}=_0x378623,_0x32ce45=_0x13ba7f;if(_0x60a7a9[_0x1c2b49(0x68)]===0x0)return console[_0x1c2b49(0x71)](_0x1c2b49(0x8f)),console[_0x1c2b49(0x71)](_0x1c2b49(0x72)),console['error'](_0x1c2b49(0x7b)),console['error'](_0x1c2b49(0x97)),console[_0x1c2b49(0x71)](_0x1c2b49(0x89)),0x1;const _0x401e05=_0x60a7a9[0x0],_0x5733d0=_0x13ba7f['segmentPath'];let _0x37109d=_0x401e05;_0x5733d0&&!_0x401e05[_0x1c2b49(0x7a)]('/')&&(_0x37109d=_0x5733d0+'/'+_0x401e05,_0x32ce45['verbose']&&console[_0x1c2b49(0x71)](_0x1c2b49(0x87)+_0x37109d));const _0x20a267=await withSpinner(_0x1c2b49(0x8d)+_0x37109d+_0x1c2b49(0x8a),()=>_0x41afbb['segment'][_0x1c2b49(0x82)](_0x37109d),{'verbose':_0x32ce45['verbose']}),_0x292e28=_0x20a267[_0x1c2b49(0x6e)];_0x32ce45[_0x1c2b49(0x8b)]&&console[_0x1c2b49(0x71)](_0x1c2b49(0x78)+_0x292e28[_0x1c2b49(0x7f)]);if(_0x292e28[_0x1c2b49(0x7f)]!==_0x1c2b49(0x94))return console[_0x1c2b49(0x71)](_0x1c2b49(0x76)+_0x292e28['type']+_0x1c2b49(0x7d)),console[_0x1c2b49(0x71)](_0x1c2b49(0x6c)),0x1;if(!_0x292e28[_0x1c2b49(0x88)])throw new SDKError(ErrorCode[_0x1c2b49(0x73)],_0x1c2b49(0x80));const _0x412a56=_0x292e28[_0x1c2b49(0x9c)],_0x4db84b=_0x292e28[_0x1c2b49(0x88)];_0x32ce45[_0x1c2b49(0x8b)]&&(console['error'](_0x1c2b49(0x70)+_0x412a56),console[_0x1c2b49(0x71)](_0x1c2b49(0x75)+_0x4db84b));let _0x514b25;if(_0x32ce45['folder']){const _0x2fb22e=_0x32ce45[_0x1c2b49(0x6f)],_0x1f052d=await withSpinner(_0x1c2b49(0x9b)+_0x2fb22e+_0x1c2b49(0x8a),()=>_0x41afbb['segment'][_0x1c2b49(0x83)](_0x412a56,_0x2fb22e),{'verbose':_0x32ce45[_0x1c2b49(0x8b)]});_0x514b25=parseInt(_0x1f052d[_0x1c2b49(0x6e)],0xa),_0x32ce45[_0x1c2b49(0x8b)]&&console[_0x1c2b49(0x71)]('Resolved\x20folder\x20ID:\x20'+_0x514b25);}const _0x3563dc=await loadJSONFromOptions(_0x32ce45['rule'],_0x32ce45['ruleFile']),_0x5d99fd={'name':_0x32ce45[_0x1c2b49(0x91)],'description':_0x32ce45[_0x1c2b49(0x85)],'rule':_0x3563dc,'kind':_0x32ce45[_0x1c2b49(0x7c)]!==undefined?parseInt(_0x32ce45[_0x1c2b49(0x7c)],0xa):undefined,'segmentFolderId':_0x514b25},_0xd0de59=await withSpinner(_0x1c2b49(0x81)+_0x292e28[_0x1c2b49(0x8e)]+_0x1c2b49(0x8a),()=>_0x41afbb['segment'][_0x1c2b49(0x84)](_0x412a56,_0x4db84b,_0x5d99fd),{'verbose':_0x32ce45[_0x1c2b49(0x8b)]}),_0x2bdd07=_0xd0de59[_0x1c2b49(0x6e)];return console['error'](_0x1c2b49(0x9d)+_0x2bdd07['name']+'\x27'),_0x37109d!==_0x401e05&&console[_0x1c2b49(0x71)](_0x1c2b49(0x7e)+_0x37109d),await handleSDKOutput([_0x2bdd07],_0x32ce45),0x0;}}
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_0x2c46a0=a41_0x1750;(function(_0x29c386,_0x53ea64){const _0x4341b4=a41_0x1750,_0x1b99a4=_0x29c386();while(!![]){try{const _0x335940=parseInt(_0x4341b4(0x1fa))/0x1+parseInt(_0x4341b4(0x1df))/0x2*(parseInt(_0x4341b4(0x1f1))/0x3)+parseInt(_0x4341b4(0x1c8))/0x4+-parseInt(_0x4341b4(0x1f8))/0x5+parseInt(_0x4341b4(0x1d2))/0x6*(-parseInt(_0x4341b4(0x1f2))/0x7)+-parseInt(_0x4341b4(0x1f5))/0x8+-parseInt(_0x4341b4(0x1e5))/0x9*(-parseInt(_0x4341b4(0x1d5))/0xa);if(_0x335940===_0x53ea64)break;else _0x1b99a4['push'](_0x1b99a4['shift']());}catch(_0x55646e){_0x1b99a4['push'](_0x1b99a4['shift']());}}}(a41_0x47c2,0x6e154));import{existsSync,statSync}from'fs';import a41_0x509cf5 from'chalk';import{BaseCommand}from'./command.js';function a41_0x47c2(){const _0x462893=['Error:\x20No\x20context\x20set.\x20Cannot\x20use\x20relative\x20path.','731105YvWrCo','✔\x20Context\x20set\x20to:\x20','12828uuiUcH','Tip:\x20Run\x20`tdx\x20sg\x20pull\x20<parent_name>`\x20first\x20to\x20create\x20the\x20folder\x20structure','Use\x20\x22tdx\x20segments\x22\x20to\x20list\x20contents\x20in\x20this\x20context','verbose','segmentPath','fullPath','description','3566656XciIQl','slice','Use:\x20tdx\x20segment\x20use\x20','Error:\x20Path\x20is\x20required\x0a','isDirectory','Resolved\x20relative\x20path\x20to:\x20','type','split','data','Folder\x20ID:\x20','1256796rkSwkx','Target\x20path:\x20','Parent\x20ID:\x20','7981770EmEXCq','config','segment','log','join','Set\x20current\x20segment/folder\x20context\x20for\x20navigation','parentId','dim','Context\x20can\x20only\x20be\x20set\x20to\x20a\x20parent\x20segment\x20or\x20folder.','Error:\x20Cannot\x20set\x20context\x20to\x20a\x20segment.','482278piaItK','✔\x20Context\x20cleared.\x20Back\x20to\x20root.','length','green','Examples:','Error:\x20No\x20tdx.json\x20found\x20in\x20or\x20above:\x20','9CzOwAW','red','segment:use','parentName','folderPath','\x27...','Use\x20\x22tdx\x20use\x22\x20to\x20see\x20all\x20context\x20parameters','Usage:\x20tdx\x20segment\x20use\x20<path>','folderId','segments','cyan','\x20\x20tdx\x20segment\x20use\x20/\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Clear\x20context','3iuambs','28YHEllB','execute','error','4070584YIMvIR','Use\x20an\x20absolute\x20path\x20or\x20set\x20context\x20with:\x20tdx\x20segment\x20use\x20<parent_name>'];a41_0x47c2=function(){return _0x462893;};return a41_0x47c2();}import{saveSessionContext}from'../core/session.js';import{withSpinner}from'../utils/spinner.js';import{parsePath,normalizePath}from'../sdk/segment/segment-path-parser.js';function a41_0x1750(_0xd1a8ef,_0x25ce83){_0xd1a8ef=_0xd1a8ef-0x1c4;const _0x47c268=a41_0x47c2();let _0x1750b0=_0x47c268[_0xd1a8ef];return _0x1750b0;}import{findTdxConfig}from'../sdk/segment/tdx-config.js';export class SegmentUseCommand extends BaseCommand{['name']=a41_0x2c46a0(0x1e7);[a41_0x2c46a0(0x1c7)]=a41_0x2c46a0(0x1da);async[a41_0x2c46a0(0x1f3)](_0x44f756){const _0x132849=a41_0x2c46a0,{options:_0x53370c,args:_0xabbc83,tdx:_0x1b4154}=_0x44f756;if(_0xabbc83[_0x132849(0x1e1)]===0x0)return console['error'](a41_0x509cf5[_0x132849(0x1e6)](_0x132849(0x1cb))),console['error'](_0x132849(0x1ec)),console[_0x132849(0x1f4)](_0x132849(0x1e3)),console[_0x132849(0x1f4)]('\x20\x20tdx\x20segment\x20use\x20\x22My\x20Audience\x22'),console[_0x132849(0x1f4)]('\x20\x20tdx\x20segment\x20use\x20\x22My\x20Audience/Marketing\x22'),console[_0x132849(0x1f4)](_0x132849(0x1f0)),console['error']('\x20\x20tdx\x20segment\x20use\x20..\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Go\x20to\x20parent'),0x1;const _0x22fcbd=_0xabbc83[0x0],_0x4e6cdb=_0x53370c['session'];try{if(_0x22fcbd==='/')return saveSessionContext({'segment_path':undefined},_0x4e6cdb),console['log'](a41_0x509cf5[_0x132849(0x1e2)](_0x132849(0x1e0))),0x0;if(existsSync(_0x22fcbd)&&statSync(_0x22fcbd)[_0x132849(0x1cc)]()){let _0x406e7f;try{_0x406e7f=findTdxConfig(_0x22fcbd);}catch{return console[_0x132849(0x1f4)](a41_0x509cf5[_0x132849(0x1e6)](_0x132849(0x1e4)+_0x22fcbd)),console[_0x132849(0x1f4)](a41_0x509cf5[_0x132849(0x1ef)](_0x132849(0x1fb))),0x1;}const _0x26ed11=_0x406e7f[_0x132849(0x1d6)]['parent_segment'];return saveSessionContext({'segment_path':_0x26ed11,'parent_segment':_0x26ed11},_0x4e6cdb),console['log'](a41_0x509cf5[_0x132849(0x1e2)](_0x132849(0x1f9)+a41_0x509cf5[_0x132849(0x1ef)](_0x26ed11))),0x0;}const _0x409964=_0x53370c[_0x132849(0x1c5)];let _0x138d82=_0x22fcbd;const _0x177993=parsePath(_0x22fcbd);if(!_0x177993['isAbsolute']){if(!_0x409964)return console[_0x132849(0x1f4)](a41_0x509cf5[_0x132849(0x1e6)](_0x132849(0x1f7))),console[_0x132849(0x1f4)](a41_0x509cf5[_0x132849(0x1ef)](_0x132849(0x1f6))),0x1;if(_0x22fcbd==='..'){const _0x5b1e1d=_0x409964[_0x132849(0x1cf)]('/')[_0x132849(0x1c9)](0x0,-0x1)[_0x132849(0x1d9)]('/');_0x138d82=_0x5b1e1d||'/';}else _0x22fcbd==='.'?_0x138d82=_0x409964:_0x138d82=_0x409964+'/'+_0x22fcbd;_0x53370c['verbose']&&console[_0x132849(0x1f4)](_0x132849(0x1cd)+_0x138d82);}if(_0x138d82==='/'||_0x138d82==='')return saveSessionContext({'segment_path':undefined},_0x4e6cdb),console[_0x132849(0x1d8)](a41_0x509cf5[_0x132849(0x1e2)](_0x132849(0x1e0))),0x0;_0x138d82=normalizePath(_0x138d82);const _0x6ce2a5=parsePath(_0x138d82)[_0x132849(0x1ee)];if(_0x6ce2a5[_0x132849(0x1e1)]===0x0)return saveSessionContext({'segment_path':undefined},_0x4e6cdb),console[_0x132849(0x1d8)](a41_0x509cf5['green']('✔\x20Context\x20cleared.\x20Back\x20to\x20root.')),0x0;_0x53370c[_0x132849(0x1c4)]&&(console['error']('Site:\x20'+_0x53370c['site']),console['error'](_0x132849(0x1d3)+_0x138d82));const _0xf127f1=await withSpinner('Resolving\x20path\x20\x27'+_0x138d82+_0x132849(0x1ea),()=>_0x1b4154['segment']['resolvePathToResource'](_0x138d82),{'verbose':_0x53370c[_0x132849(0x1c4)]}),_0x56f912=_0xf127f1[_0x132849(0x1d0)];_0x53370c[_0x132849(0x1c4)]&&(console[_0x132849(0x1f4)]('Resolved\x20path\x20type:\x20'+_0x56f912[_0x132849(0x1ce)]),console['error'](_0x132849(0x1d4)+_0x56f912[_0x132849(0x1db)]),_0x56f912[_0x132849(0x1ed)]&&console[_0x132849(0x1f4)](_0x132849(0x1d1)+_0x56f912[_0x132849(0x1ed)]));if(_0x56f912[_0x132849(0x1ce)]===_0x132849(0x1d7))return console['error'](a41_0x509cf5[_0x132849(0x1e6)](_0x132849(0x1de))),console[_0x132849(0x1f4)](_0x132849(0x1dd)),console[_0x132849(0x1f4)](a41_0x509cf5[_0x132849(0x1ef)](_0x132849(0x1ca)+_0x56f912[_0x132849(0x1e8)]+(_0x56f912[_0x132849(0x1e9)]?'/'+_0x56f912[_0x132849(0x1e9)]['join']('/'):''))),0x1;return saveSessionContext({'segment_path':_0x56f912[_0x132849(0x1c6)],'parent_segment':_0x56f912[_0x132849(0x1e8)]},_0x4e6cdb),console[_0x132849(0x1d8)](a41_0x509cf5[_0x132849(0x1e2)]('✔\x20Context\x20set\x20to:\x20'+a41_0x509cf5[_0x132849(0x1ef)](_0x56f912['fullPath']))),_0x53370c[_0x132849(0x1c4)]&&(console[_0x132849(0x1f4)](a41_0x509cf5['dim'](_0x132849(0x1fc))),console['error'](a41_0x509cf5[_0x132849(0x1dc)](_0x132849(0x1eb)))),0x0;}catch(_0x15827b){throw _0x15827b;}}}
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_0x495618=a42_0x2c7d;(function(_0x574e20,_0x56e83e){const _0x182236=a42_0x2c7d,_0x375840=_0x574e20();while(!![]){try{const _0x384beb=parseInt(_0x182236(0x111))/0x1+-parseInt(_0x182236(0x11d))/0x2*(parseInt(_0x182236(0x102))/0x3)+-parseInt(_0x182236(0x11e))/0x4*(-parseInt(_0x182236(0x118))/0x5)+-parseInt(_0x182236(0x121))/0x6+parseInt(_0x182236(0x129))/0x7*(-parseInt(_0x182236(0x11c))/0x8)+-parseInt(_0x182236(0x103))/0x9*(-parseInt(_0x182236(0xf7))/0xa)+parseInt(_0x182236(0x101))/0xb;if(_0x384beb===_0x56e83e)break;else _0x375840['push'](_0x375840['shift']());}catch(_0x10d6ee){_0x375840['push'](_0x375840['shift']());}}}(a42_0x292e,0xe68d2));function a42_0x292e(){const _0x90fe4d=['2PvUZKL','5556FnnMiI','parentSegment','helpText','6368718FfsVrL','message','verbose','dim','filePath','Validation\x20failed:\x20','log','\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','7zsNZuQ','✔\x20All\x20','Error:\x20Directory\x20not\x20found:\x20','837230PgveyA','\x20error(s)','yellow','.yml','hasErrors','execute','red','file','name','Usage:\x20tdx\x20sg\x20validate\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Validate\x20all\x20(requires\x20context)','6094836jFefbz','414303YgiuQs','126MSSxTN','warningCount','endsWith','\x20\x20\x20\x20\x20\x20\x20tdx\x20sg\x20validate\x20<file_path>\x20\x20#\x20Validate\x20specific\x20file','errorCode','targetDir','type','\x20file(s)\x20with\x20errors,\x20','cyan','error','\x20warning(s)\x20found','):\x20','no_parent','.yaml','1334787uDFkZa','valid','Validate\x20segment\x20and\x20journey\x20YAML\x20files','errors','Error:\x20No\x20YAML\x20files\x20found\x20in\x20','\x20warning(s)','length','450unvvRA','green','Error:\x20','parent_segment\x20is\x20not\x20set.\x20Use\x20`tdx\x20sg\x20use\x20<parent_name>`\x20to\x20set\x20it.\x0a','8336824XUWAqb'];a42_0x292e=function(){return _0x90fe4d;};return a42_0x292e();}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_0x886b83 from'chalk';function a42_0x2c7d(_0x17dbf7,_0x464752){_0x17dbf7=_0x17dbf7-0xf7;const _0x292e41=a42_0x292e();let _0x2c7d3d=_0x292e41[_0x17dbf7];return _0x2c7d3d;}import{formatValidationResult}from'../sdk/segment/yaml-validator.js';import{validateYamlFiles,isValidationResult,calculateSummary}from'../sdk/segment/validate-files.js';export class SegmentValidateCommand extends BaseCommand{[a42_0x495618(0xff)]='segment:validate';['description']=a42_0x495618(0x113);async[a42_0x495618(0xfc)](_0x212943){const _0x2f8e5d=a42_0x495618,{options:_0x3dc983,args:_0x267867}=_0x212943,_0x3ba608=_0x3dc983,_0x4a0706=await resolveTarget({'arg':_0x267867[0x0],'contextParent':_0x3dc983[_0x2f8e5d(0x11f)],'cwd':process['cwd']()});if(!isSuccessfulResolution(_0x4a0706))return _0x4a0706[_0x2f8e5d(0x107)]===_0x2f8e5d(0x10f)?(console[_0x2f8e5d(0x10c)](a42_0x886b83['yellow'](_0x2f8e5d(0x11b))),console[_0x2f8e5d(0x10c)](_0x2f8e5d(0x100)),console[_0x2f8e5d(0x10c)](_0x2f8e5d(0x128)),console[_0x2f8e5d(0x10c)](_0x2f8e5d(0x106))):(console[_0x2f8e5d(0x10c)](a42_0x886b83[_0x2f8e5d(0xfd)](_0x2f8e5d(0x11a)+_0x4a0706[_0x2f8e5d(0x122)]+'\x0a')),_0x4a0706[_0x2f8e5d(0x120)]&&console[_0x2f8e5d(0x10c)](a42_0x886b83[_0x2f8e5d(0x10b)](_0x4a0706[_0x2f8e5d(0x120)]))),0x1;const _0x323e11=_0x4a0706[_0x2f8e5d(0x108)],_0x3fcd24=_0x4a0706[_0x2f8e5d(0x109)]===_0x2f8e5d(0xfe)?_0x4a0706[_0x2f8e5d(0x125)]:undefined;if(!_0x3fcd24&&!existsSync(_0x323e11))return console[_0x2f8e5d(0x10c)](a42_0x886b83[_0x2f8e5d(0xfd)](_0x2f8e5d(0x12b)+_0x323e11+'\x0a')),0x1;let _0xa56507;if(_0x3fcd24){if(!_0x3fcd24[_0x2f8e5d(0x105)](_0x2f8e5d(0xfa))&&!_0x3fcd24[_0x2f8e5d(0x105)](_0x2f8e5d(0x110)))return console[_0x2f8e5d(0x10c)](a42_0x886b83['red']('Error:\x20File\x20must\x20have\x20.yml\x20or\x20.yaml\x20extension:\x20'+_0x3fcd24+'\x0a')),0x1;_0xa56507=[_0x3fcd24];}else _0xa56507=findYamlFiles(_0x323e11);if(_0xa56507[_0x2f8e5d(0x117)]===0x0)return console[_0x2f8e5d(0x10c)](a42_0x886b83[_0x2f8e5d(0xfd)](_0x2f8e5d(0x115)+_0x323e11+'\x0a')),0x1;const _0x1005dd=validateYamlFiles(_0xa56507,_0x323e11),_0x1e2625=calculateSummary(_0x1005dd);for(const _0x4803bf of _0x1005dd){if(!isValidationResult(_0x4803bf))continue;const {relativePath:_0x2f8157,source:_0xd48c6d,result:_0xbc2ab7,fileType:_0x47b370}=_0x4803bf,_0x486216=_0x47b370;if(_0xbc2ab7[_0x2f8e5d(0x112)]&&_0xbc2ab7['warnings'][_0x2f8e5d(0x117)]===0x0)_0x3ba608[_0x2f8e5d(0x123)]&&console[_0x2f8e5d(0x127)](a42_0x886b83[_0x2f8e5d(0x119)]('✔\x20'+_0x2f8157)+a42_0x886b83[_0x2f8e5d(0x124)]('\x20('+_0x486216+')'));else _0xbc2ab7['valid']?(console[_0x2f8e5d(0x127)](a42_0x886b83[_0x2f8e5d(0xf9)]('⚠\x20'+_0x2f8157)+a42_0x886b83[_0x2f8e5d(0x124)]('\x20('+_0x486216+_0x2f8e5d(0x10e)+_0xbc2ab7['warnings'][_0x2f8e5d(0x117)]+_0x2f8e5d(0x116))),console[_0x2f8e5d(0x127)](formatValidationResult(_0xbc2ab7,_0xd48c6d,_0x2f8157))):(console[_0x2f8e5d(0x127)](a42_0x886b83[_0x2f8e5d(0xfd)]('✖\x20'+_0x2f8157)+a42_0x886b83[_0x2f8e5d(0x124)]('\x20('+_0x486216+'):\x20'+_0xbc2ab7[_0x2f8e5d(0x114)][_0x2f8e5d(0x117)]+_0x2f8e5d(0xf8))),console[_0x2f8e5d(0x127)](formatValidationResult(_0xbc2ab7,_0xd48c6d,_0x2f8157)));}return console[_0x2f8e5d(0x127)](''),_0x1e2625[_0x2f8e5d(0xfb)]?(console[_0x2f8e5d(0x127)](a42_0x886b83['red'](_0x2f8e5d(0x126)+_0x1e2625['invalidCount']+_0x2f8e5d(0x10a)+_0x1e2625['validCount']+'\x20valid')),_0x1e2625[_0x2f8e5d(0x104)]>0x0&&console[_0x2f8e5d(0x127)](a42_0x886b83[_0x2f8e5d(0xf9)](_0x1e2625[_0x2f8e5d(0x104)]+_0x2f8e5d(0x10d))),0x1):(console[_0x2f8e5d(0x127)](a42_0x886b83[_0x2f8e5d(0x119)](_0x2f8e5d(0x12a)+_0x1e2625['validCount']+'\x20file(s)\x20valid')),_0x1e2625[_0x2f8e5d(0x104)]>0x0&&console[_0x2f8e5d(0x127)](a42_0x886b83['yellow'](_0x1e2625[_0x2f8e5d(0x104)]+_0x2f8e5d(0x10d))),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_0x53158e=a43_0x5ae5;function a43_0x5ae5(_0x203cb5,_0x14a99e){_0x203cb5=_0x203cb5-0x19b;const _0x24cde6=a43_0x24cd();let _0x5ae594=_0x24cde6[_0x203cb5];return _0x5ae594;}(function(_0x583c4d,_0x3a5d61){const _0x5b71df=a43_0x5ae5,_0x11b609=_0x583c4d();while(!![]){try{const _0x1d6d0a=parseInt(_0x5b71df(0x1b0))/0x1*(parseInt(_0x5b71df(0x1ce))/0x2)+parseInt(_0x5b71df(0x1c4))/0x3*(parseInt(_0x5b71df(0x1c8))/0x4)+parseInt(_0x5b71df(0x1e7))/0x5*(parseInt(_0x5b71df(0x1b3))/0x6)+-parseInt(_0x5b71df(0x1a3))/0x7+-parseInt(_0x5b71df(0x1d5))/0x8+-parseInt(_0x5b71df(0x1dc))/0x9*(-parseInt(_0x5b71df(0x1c6))/0xa)+parseInt(_0x5b71df(0x1ac))/0xb*(parseInt(_0x5b71df(0x1bc))/0xc);if(_0x1d6d0a===_0x3a5d61)break;else _0x11b609['push'](_0x11b609['shift']());}catch(_0x8ec0d2){_0x11b609['push'](_0x11b609['shift']());}}}(a43_0x24cd,0x1afcd));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_0x2a7a71 from'chalk';function a43_0x24cd(){const _0x35ae5e=['segment','error','sort','log','type','parentId','replace','45840ngWZXU','\x5c$&','Folder\x20ID:\x20','name','No\x20items\x20match\x20pattern:\x20','site','listUnified','listRecursive','4107KoTIXP','segments','10OBiMIS','parentSegment','340wUSbqc','✔\x20Found\x20','filter','journeys','\x27...','listWithPattern','2qeGyAi','/app/ps/','message','/e/','map','\x20segment','journey','996800RTfHvb','journeyBundleName','listUnifiedWithJourneys','✔\x20Built\x20tree\x20with\x20','json','resolvePathToResource','folder','1450017wVmYJc','folders',']\x20matching\x20\x27','Listing\x20folders,\x20segments,\x20and\x20journeys...','\x20folder','(not\x20set)','dim','folderId','format','children','Parent\x20segment\x20context:\x20','75FKLnEm','maxDepth','Site:\x20','includes','(empty)','test','Use\x20tdx\x20ps\x20list\x20to\x20see\x20available\x20parent\x20segments.',',\x20and\x20','\x20matching\x20\x27','Set\x20a\x20parent\x20segment\x20context\x20first:','jsonl','length','481733oMhgLK','Resolving\x20path\x20\x27','Parent\x20ID:\x20','\x20journey','localeCompare','execute','/j/da','cause','\x20\x20tdx\x20sg\x20use\x20\x22My\x20Audience\x22','33YGEXCr','Folder/pattern\x20arg:\x20','data','Resolving\x20parent\x20segment\x20\x27','8107qHYvUp','verbose','\x20\x20tdx\x20sg\x20pull\x20\x22My\x20Audience\x22','2766YLWiAr','List\x20folders\x20and\x20child\x20segments'];a43_0x24cd=function(){return _0x35ae5e;};return a43_0x24cd();}export class SegmentsCommand extends BaseCommand{[a43_0x53158e(0x1bf)]=a43_0x53158e(0x1c5);['description']=a43_0x53158e(0x1b4);async[a43_0x53158e(0x1a8)](_0x3066b){const _0x1d23a5=a43_0x53158e,{options:_0xf5cf41,args:_0x11af65}=_0x3066b,_0x182f5e=_0xf5cf41['recursive'],_0x2f1008=_0x11af65[0x0];try{const _0x401661=_0xf5cf41[_0x1d23a5(0x1c7)];_0xf5cf41[_0x1d23a5(0x1b1)]&&(console[_0x1d23a5(0x1b6)](_0x1d23a5(0x1e9)+_0xf5cf41[_0x1d23a5(0x1c1)]),console[_0x1d23a5(0x1b6)](_0x1d23a5(0x1e6)+(_0x401661||_0x1d23a5(0x1e1))),_0x2f1008&&console['error'](_0x1d23a5(0x1ad)+_0x2f1008),_0x182f5e&&console[_0x1d23a5(0x1b6)]('Recursive\x20mode:\x20enabled'));if(!_0x401661)return console[_0x1d23a5(0x1b6)]('Error:\x20No\x20parent\x20segment\x20context\x20set.'),console['error'](''),console[_0x1d23a5(0x1b6)](_0x1d23a5(0x1a0)),console[_0x1d23a5(0x1b6)](_0x1d23a5(0x1b2)),console['error'](_0x1d23a5(0x1ab)),console[_0x1d23a5(0x1b6)](''),console[_0x1d23a5(0x1b6)](_0x1d23a5(0x19d)),0x1;const _0x2fbe32=_0x2f1008&&(_0x2f1008[_0x1d23a5(0x1ea)]('*')||_0x2f1008[_0x1d23a5(0x1ea)]('?'));if(_0x2fbe32)return await this[_0x1d23a5(0x1cd)](_0x3066b,_0x401661,_0x2f1008);const _0x42be77=_0x2f1008?_0x401661+'/'+_0x2f1008:_0x401661;return _0x182f5e?await this['listRecursive'](_0x3066b,_0x42be77):await this[_0x1d23a5(0x1c2)](_0x3066b,_0x42be77);}catch(_0x418c26){if(_0x418c26 instanceof SDKError)return console['error']('Error:\x20'+_0x418c26[_0x1d23a5(0x1d0)]),_0x418c26[_0x1d23a5(0x1aa)]&&console[_0x1d23a5(0x1b6)]('\x20\x20Cause:\x20'+_0x418c26['cause']),0x1;throw _0x418c26;}}async['listWithPattern'](_0xf89c14,_0x19d534,_0x53a232){const _0x792392=a43_0x53158e,{options:_0x4c5183,tdx:_0x2904d7}=_0xf89c14,_0x58069c=await withSpinner(_0x792392(0x1af)+_0x19d534+_0x792392(0x1cc),()=>_0x2904d7[_0x792392(0x1b5)][_0x792392(0x1da)](_0x19d534),{'verbose':_0x4c5183[_0x792392(0x1b1)]}),_0x156410=_0x58069c[_0x792392(0x1ae)],_0x2f4257=await withSpinner(_0x792392(0x1df),()=>_0x2904d7[_0x792392(0x1b5)][_0x792392(0x1d7)](_0x156410[_0x792392(0x1ba)],_0x156410[_0x792392(0x1e3)]),{'verbose':_0x4c5183[_0x792392(0x1b1)]}),{folders:_0x52fec0,segments:_0x560cd4,journeys:_0x5d64c6}=_0x2f4257[_0x792392(0x1ae)],_0x5525a5=_0x53a232[_0x792392(0x1bb)](/[.+^${}()|[\]\\]/g,_0x792392(0x1bd))[_0x792392(0x1bb)](/\*/g,'.*')['replace'](/\?/g,'.'),_0x3f372c=new RegExp('^'+_0x5525a5+'$','i'),_0x5d69dc=_0x52fec0['filter'](_0x4f3359=>_0x3f372c['test'](_0x4f3359[_0x792392(0x1bf)])),_0x51c9cd=_0x560cd4[_0x792392(0x1ca)](_0x430bfc=>_0x3f372c[_0x792392(0x19c)](_0x430bfc['name'])),_0x183258=_0x5d64c6[_0x792392(0x1ca)](_0x487e80=>_0x3f372c[_0x792392(0x19c)](_0x487e80[_0x792392(0x1d6)])),_0x4e384d=_0x5d69dc['length']+_0x51c9cd[_0x792392(0x1a2)]+_0x183258[_0x792392(0x1a2)];console[_0x792392(0x1b6)](_0x792392(0x1c9)+_0x5d69dc[_0x792392(0x1a2)]+_0x792392(0x1e0)+(_0x5d69dc[_0x792392(0x1a2)]!==0x1?'s':'')+',\x20'+_0x51c9cd[_0x792392(0x1a2)]+_0x792392(0x1d3)+(_0x51c9cd[_0x792392(0x1a2)]!==0x1?'s':'')+_0x792392(0x19e)+_0x183258['length']+_0x792392(0x1a6)+(_0x183258[_0x792392(0x1a2)]!==0x1?'s':'')+_0x792392(0x19f)+_0x53a232+'\x27');const _0x4590ea=_0x4eed03=>{const _0x4df7dc=_0x792392;return getConsoleNextUrl(_0x4c5183[_0x4df7dc(0x1c1)],_0x4df7dc(0x1cf)+_0x156410[_0x4df7dc(0x1ba)]+_0x4df7dc(0x1d1)+_0x4eed03);},_0x1727c8=_0x4c5183[_0x792392(0x1e4)]===_0x792392(0x1d9)||_0x4c5183['format']==='jsonl';if(_0x1727c8){const _0x21299d=[..._0x5d69dc[_0x792392(0x1d2)](_0x5cb049=>({..._0x5cb049,'type':_0x792392(0x1db)})),..._0x51c9cd[_0x792392(0x1d2)](_0x2c7d08=>({..._0x2c7d08,'type':'segment','url':_0x4590ea(_0x2c7d08['id'])})),..._0x183258[_0x792392(0x1d2)](_0x34c5c1=>({..._0x34c5c1,'name':_0x34c5c1[_0x792392(0x1d6)],'type':_0x792392(0x1d4)}))][_0x792392(0x1b7)]((_0x265fc8,_0x52fff4)=>_0x265fc8[_0x792392(0x1bf)][_0x792392(0x1a7)](_0x52fff4[_0x792392(0x1bf)]));await handleSDKOutput(_0x21299d,_0x4c5183);}else{if(_0x4e384d===0x0)console[_0x792392(0x1b8)](_0x792392(0x1c0)+_0x53a232);else{console['log'](a43_0x2a7a71[_0x792392(0x1e2)]('['+_0x19d534+_0x792392(0x1de)+_0x53a232+'\x27'));const _0x5e2155=formatFlatList(_0x5d69dc,_0x51c9cd,{'showMetadata':!![],'getSegmentUrl':_0x4590ea},_0x183258);console['log'](_0x5e2155);}}return 0x0;}async[a43_0x53158e(0x1c2)](_0x3fc3e0,_0x1160b1){const _0x192376=a43_0x53158e,{options:_0x42029e,tdx:_0x2d52fe}=_0x3fc3e0,_0x52fdfb=await withSpinner(_0x192376(0x1a4)+_0x1160b1+_0x192376(0x1cc),()=>_0x2d52fe[_0x192376(0x1b5)][_0x192376(0x1da)](_0x1160b1),{'verbose':_0x42029e['verbose']}),_0x4fc4b2=_0x52fdfb[_0x192376(0x1ae)];_0x42029e['verbose']&&(console[_0x192376(0x1b6)](_0x192376(0x1a5)+_0x4fc4b2['parentId']),_0x4fc4b2[_0x192376(0x1e3)]&&console[_0x192376(0x1b6)](_0x192376(0x1be)+_0x4fc4b2[_0x192376(0x1e3)]));const _0x4af82c=await withSpinner(_0x192376(0x1df),()=>_0x2d52fe['segment'][_0x192376(0x1d7)](_0x4fc4b2[_0x192376(0x1ba)],_0x4fc4b2[_0x192376(0x1e3)]),{'verbose':_0x42029e[_0x192376(0x1b1)]}),{folders:_0x3b0434,segments:_0x524659,journeys:_0x2a4e00}=_0x4af82c['data'],_0x43f557=_0x3b0434[_0x192376(0x1a2)]+_0x524659[_0x192376(0x1a2)]+_0x2a4e00[_0x192376(0x1a2)];console[_0x192376(0x1b6)](_0x192376(0x1c9)+_0x3b0434[_0x192376(0x1a2)]+_0x192376(0x1e0)+(_0x3b0434[_0x192376(0x1a2)]!==0x1?'s':'')+',\x20'+_0x524659[_0x192376(0x1a2)]+_0x192376(0x1d3)+(_0x524659[_0x192376(0x1a2)]!==0x1?'s':'')+',\x20and\x20'+_0x2a4e00[_0x192376(0x1a2)]+'\x20journey'+(_0x2a4e00['length']!==0x1?'s':''));const _0x157ff7=_0x438288=>{const _0x42e139=_0x192376;return getConsoleNextUrl(_0x42029e[_0x42e139(0x1c1)],'/app/ps/'+_0x4fc4b2[_0x42e139(0x1ba)]+_0x42e139(0x1d1)+_0x438288);},_0x4913f7=_0x165bfd=>{const _0x13b395=_0x192376;return getConsoleNextUrl(_0x42029e['site'],'/app/ps/'+_0x4fc4b2['parentId']+_0x13b395(0x1d1)+_0x165bfd+_0x13b395(0x1a9));},_0x4f985f=_0x42029e[_0x192376(0x1e4)]===_0x192376(0x1d9)||_0x42029e['format']===_0x192376(0x1a1);if(_0x4f985f){const _0x4bc30e=[..._0x3b0434[_0x192376(0x1d2)](_0x5d869f=>({..._0x5d869f,'type':_0x192376(0x1db)})),..._0x524659['map'](_0x56efd6=>({..._0x56efd6,'type':'segment','url':_0x157ff7(_0x56efd6['id'])})),..._0x2a4e00[_0x192376(0x1d2)](_0xec9244=>({..._0xec9244,'name':_0xec9244[_0x192376(0x1d6)],'type':'journey','url':_0x4913f7(_0xec9244['id'])}))]['sort']((_0xfb6350,_0x5b0c15)=>_0xfb6350[_0x192376(0x1bf)][_0x192376(0x1a7)](_0x5b0c15[_0x192376(0x1bf)]));await handleSDKOutput(_0x4bc30e,_0x42029e);}else{if(_0x43f557===0x0)console[_0x192376(0x1b8)](a43_0x2a7a71[_0x192376(0x1e2)]('['+_0x1160b1+']')),console[_0x192376(0x1b8)](_0x192376(0x19b));else{console[_0x192376(0x1b8)](a43_0x2a7a71[_0x192376(0x1e2)]('['+_0x1160b1+']'));const _0x272472=formatFlatList(_0x3b0434,_0x524659,{'showMetadata':!![],'getSegmentUrl':_0x157ff7,'getJourneyUrl':_0x4913f7},_0x2a4e00);console[_0x192376(0x1b8)](_0x272472);}}return 0x0;}async[a43_0x53158e(0x1c3)](_0x457136,_0x2e43fd){const _0x71204=a43_0x53158e,{options:_0x3b00c9,tdx:_0x30c78d}=_0x457136,_0x49cd78=await withSpinner('Resolving\x20path\x20\x27'+_0x2e43fd+_0x71204(0x1cc),()=>_0x30c78d['segment'][_0x71204(0x1da)](_0x2e43fd),{'verbose':_0x3b00c9[_0x71204(0x1b1)]}),_0x33ad8a=_0x49cd78[_0x71204(0x1ae)];_0x3b00c9[_0x71204(0x1b1)]&&(console[_0x71204(0x1b6)](_0x71204(0x1a5)+_0x33ad8a[_0x71204(0x1ba)]),_0x33ad8a['folderId']&&console[_0x71204(0x1b6)](_0x71204(0x1be)+_0x33ad8a[_0x71204(0x1e3)]));const _0x16bf65=_0x3b00c9[_0x71204(0x1e8)]||0xa,_0x10c7d0=await withSpinner('Building\x20hierarchy\x20tree...',()=>_0x30c78d[_0x71204(0x1b5)][_0x71204(0x1c3)](_0x33ad8a[_0x71204(0x1ba)],_0x33ad8a[_0x71204(0x1e3)],0x0,_0x16bf65),{'verbose':_0x3b00c9[_0x71204(0x1b1)]}),_0x5c5546=_0x10c7d0['data'],_0x5c3326=_0x510577=>{const _0x5b540a=_0x71204;let _0x5c5017=0x0,_0x42e630=0x0,_0x285983=0x0;for(const _0x7a87af of _0x510577){if(_0x7a87af['type']===_0x5b540a(0x1db))_0x5c5017++;else{if(_0x7a87af[_0x5b540a(0x1b9)]===_0x5b540a(0x1b5))_0x42e630++;else{if(_0x7a87af['type']==='journey')_0x285983++;}}if(_0x7a87af['children']){const _0x5d649d=_0x5c3326(_0x7a87af[_0x5b540a(0x1e5)]);_0x5c5017+=_0x5d649d['folders'],_0x42e630+=_0x5d649d['segments'],_0x285983+=_0x5d649d[_0x5b540a(0x1cb)];}}return{'folders':_0x5c5017,'segments':_0x42e630,'journeys':_0x285983};},_0xbd3cbe=_0x5c3326(_0x5c5546);console['error'](_0x71204(0x1d8)+_0xbd3cbe[_0x71204(0x1dd)]+_0x71204(0x1e0)+(_0xbd3cbe[_0x71204(0x1dd)]!==0x1?'s':'')+',\x20'+_0xbd3cbe[_0x71204(0x1c5)]+'\x20segment'+(_0xbd3cbe['segments']!==0x1?'s':'')+_0x71204(0x19e)+_0xbd3cbe['journeys']+_0x71204(0x1a6)+(_0xbd3cbe[_0x71204(0x1cb)]!==0x1?'s':''));const _0xcdbd87=_0x346ade=>{const _0x4b9c09=_0x71204;return getConsoleNextUrl(_0x3b00c9[_0x4b9c09(0x1c1)],_0x4b9c09(0x1cf)+_0x33ad8a[_0x4b9c09(0x1ba)]+_0x4b9c09(0x1d1)+_0x346ade);},_0x56ea49=_0x5d3571=>{const _0x2e8c2d=_0x71204;return getConsoleNextUrl(_0x3b00c9[_0x2e8c2d(0x1c1)],_0x2e8c2d(0x1cf)+_0x33ad8a[_0x2e8c2d(0x1ba)]+_0x2e8c2d(0x1d1)+_0x5d3571+_0x2e8c2d(0x1a9));};if(_0x3b00c9['format']===_0x71204(0x1d9)||_0x3b00c9[_0x71204(0x1e4)]==='jsonl')await handleSDKOutput(_0x5c5546,_0x3b00c9);else{console[_0x71204(0x1b8)](a43_0x2a7a71['dim']('['+_0x2e43fd+']'));const _0x3bd88c=formatTree(_0x5c5546,{'showMetadata':!![],'getSegmentUrl':_0xcdbd87,'getJourneyUrl':_0x56ea49});console[_0x71204(0x1b8)](_0x3bd88c);}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_0x57e233=a44_0x30ca;(function(_0x382429,_0x45cc76){const _0x203947=a44_0x30ca,_0x3d49f9=_0x382429();while(!![]){try{const _0x5517d=-parseInt(_0x203947(0x181))/0x1*(-parseInt(_0x203947(0x16e))/0x2)+-parseInt(_0x203947(0x16c))/0x3*(-parseInt(_0x203947(0x174))/0x4)+-parseInt(_0x203947(0x171))/0x5*(-parseInt(_0x203947(0x166))/0x6)+-parseInt(_0x203947(0x176))/0x7*(-parseInt(_0x203947(0x163))/0x8)+-parseInt(_0x203947(0x182))/0x9+-parseInt(_0x203947(0x169))/0xa*(parseInt(_0x203947(0x16f))/0xb)+parseInt(_0x203947(0x17d))/0xc*(-parseInt(_0x203947(0x188))/0xd);if(_0x5517d===_0x45cc76)break;else _0x3d49f9['push'](_0x3d49f9['shift']());}catch(_0x458d05){_0x3d49f9['push'](_0x3d49f9['shift']());}}}(a44_0x39e3,0xa3c96));function a44_0x39e3(){const _0x1c61ca=['✔\x20Retrieved\x20','\x20\x20\x20or:\x20tdx\x20show\x20<catalog.database.table>','Error:\x20','12vuFvMF','error','verbose','\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--database\x20<database>','572582tigCsT','7093908qnfiKl','Table:\x20','site','length','message','\x20\x20Cause:\x20','11994190EZpzJe','show','Site:\x20','Catalog:\x20','limit','...','438296IBZYUc','Querying\x20','cause','1582536rSctxr','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','Show\x20table\x20contents','710340tPfSKZ','showTable','name','258891PsJPPE','Usage:\x20tdx\x20show\x20<database.table>','2rrPvwO','77TrrfiV','table','25yVZSfG','database','Limit:\x20','28AmHqzJ','data','49zYOCDw','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','args','\x20row'];a44_0x39e3=function(){return _0x1c61ca;};return a44_0x39e3();}function a44_0x30ca(_0x4c1cfc,_0x101f5a){_0x4c1cfc=_0x4c1cfc-0x15e;const _0x39e3c3=a44_0x39e3();let _0x30ca78=_0x39e3c3[_0x4c1cfc];return _0x30ca78;}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_0x57e233(0x16b)]=a44_0x57e233(0x15e);['description']=a44_0x57e233(0x168);async['execute'](_0x246381){const _0x4ca549=a44_0x57e233;return this[_0x4ca549(0x16a)](_0x246381);}async[a44_0x57e233(0x16a)](_0x442085){const _0x265255=a44_0x57e233,{options:_0x375c6b,args:_0x4c3257,tdx:_0x58a563}=_0x442085;let _0x25ab93;try{_0x25ab93=parseTableReference(_0x4c3257[0x0]);const _0x5b8414=_0x375c6b[_0x265255(0x172)];!_0x25ab93[_0x265255(0x172)]&&_0x5b8414&&(_0x25ab93[_0x265255(0x172)]=_0x5b8414);const _0x550876=validateTableDescribeReference(_0x25ab93);if(_0x550876)return console[_0x265255(0x17e)](_0x265255(0x17c)+_0x550876),console[_0x265255(0x17e)](_0x265255(0x16d)),console[_0x265255(0x17e)](_0x265255(0x17b)),console[_0x265255(0x17e)](_0x265255(0x180)),0x1;}catch(_0x704572){return console[_0x265255(0x17e)](_0x265255(0x17c)+_0x704572[_0x265255(0x186)]),console[_0x265255(0x17e)]('Usage:\x20tdx\x20show\x20<database.table>'),console[_0x265255(0x17e)](_0x265255(0x17b)),console[_0x265255(0x17e)](_0x265255(0x180)),0x1;}const _0x1b986e=_0x25ab93['catalog'],_0x26b09e=_0x25ab93[_0x265255(0x172)],_0x1ab0bf=_0x25ab93[_0x265255(0x170)],_0x22ec69=resolveLimit(_0x375c6b[_0x265255(0x161)],DEFAULT_DISPLAY_LIMIT);try{_0x375c6b['verbose']&&(console[_0x265255(0x17e)](_0x265255(0x15f)+_0x375c6b[_0x265255(0x184)]),_0x1b986e&&console[_0x265255(0x17e)](_0x265255(0x160)+_0x1b986e),console[_0x265255(0x17e)]('Database:\x20'+_0x26b09e),console[_0x265255(0x17e)](_0x265255(0x183)+_0x1ab0bf),console[_0x265255(0x17e)](_0x265255(0x173)+_0x22ec69));const _0x2bc466=_0x1b986e?_0x1b986e+'.'+_0x26b09e+'.'+_0x1ab0bf:_0x26b09e+'.'+_0x1ab0bf,_0x10f45b=await withSpinner(_0x265255(0x164)+_0x2bc466+_0x265255(0x162),()=>_0x58a563['query'][_0x265255(0x16a)](_0x26b09e,_0x1ab0bf,_0x22ec69,_0x1b986e),{'verbose':_0x375c6b[_0x265255(0x17f)]}),_0x5768e0=_0x10f45b[_0x265255(0x175)],_0x2e83e8=_0x5768e0['data'];return _0x2e83e8['length']===0x0?console[_0x265255(0x17e)]('✔\x20Query\x20successful\x20-\x200\x20rows\x20returned'):console['error'](_0x265255(0x17a)+_0x2e83e8[_0x265255(0x185)]+_0x265255(0x179)+(_0x2e83e8[_0x265255(0x185)]!==0x1?'s':'')+'\x20from\x20'+_0x2bc466),await handleSDKOutput(_0x2e83e8,_0x375c6b),0x0;}catch(_0x475708){if(_0x475708 instanceof SDKError)return console[_0x265255(0x17e)](_0x265255(0x17c)+_0x475708['message']),_0x475708[_0x265255(0x165)]&&console[_0x265255(0x17e)](_0x265255(0x187)+_0x475708[_0x265255(0x165)]),0x1;throw _0x475708;}}['validate'](_0x553578){const _0x3cf817=a44_0x57e233;if(_0x553578['args']['length']===0x0)return _0x3cf817(0x167);if(_0x553578[_0x3cf817(0x178)][_0x3cf817(0x185)]>0x1)return _0x3cf817(0x177);return undefined;}}
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_0x91be5f=a45_0x18af;(function(_0x549ee0,_0x211ded){const _0x47ba17=a45_0x18af,_0x40da3a=_0x549ee0();while(!![]){try{const _0x363d69=-parseInt(_0x47ba17(0x145))/0x1*(parseInt(_0x47ba17(0x15a))/0x2)+parseInt(_0x47ba17(0x156))/0x3+-parseInt(_0x47ba17(0x143))/0x4*(-parseInt(_0x47ba17(0x164))/0x5)+-parseInt(_0x47ba17(0x150))/0x6*(parseInt(_0x47ba17(0x147))/0x7)+parseInt(_0x47ba17(0x13c))/0x8*(-parseInt(_0x47ba17(0x14a))/0x9)+-parseInt(_0x47ba17(0x14e))/0xa+parseInt(_0x47ba17(0x158))/0xb;if(_0x363d69===_0x211ded)break;else _0x40da3a['push'](_0x40da3a['shift']());}catch(_0x583851){_0x40da3a['push'](_0x40da3a['shift']());}}}(a45_0x5d68,0xabbed));function a45_0x18af(_0x45d6c2,_0x4a6d0c){_0x45d6c2=_0x45d6c2-0x135;const _0x5d6836=a45_0x5d68();let _0x18afa4=_0x5d6836[_0x45d6c2];return _0x18afa4;}function a45_0x5d68(){const _0x303260=['last_name','122250tWklGd','log','23181169ZOhRWt','User:','509318VgQZNd','account_id','status','(from\x20','bold','✗\x20Validation\x20failed:\x20','Account\x20ID:','TDX_PROFILE\x20env','Credential\x20type:\x20','session','29745VrFQnN','profile','red','env','join','N/A','green','filter','first_name','8ndkYNM','Read\x20credential\x20from\x20','cyan','CLI\x20flag','site','jobs','site:\x20','716iXdDsC','email','1oRepsg','yellow','7427btdWXM','\x20profile:\x20','Name:','6303384dvGTRS','tdx','dim','description','6887200bMaZky','config','4896cuzglo','✓\x20Authentication\x20successful\x0a','error','cli','No\x20credential\x20found'];a45_0x5d68=function(){return _0x303260;};return a45_0x5d68();}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_0x367c8f from'chalk';export class StatusCommand extends BaseCommand{['name']='status';[a45_0x91be5f(0x14d)]='Show\x20authentication\x20status\x20and\x20current\x20context';async['execute'](_0x14d22b){const _0x54f14b=a45_0x91be5f,{options:_0x4905b7,tdx:_0x472f6b}=_0x14d22b,_0x122e4b=_0x4905b7[_0x54f14b(0x140)],_0x582962=new GlobalContext(_0x4905b7),_0xad16eb=_0x582962[_0x54f14b(0x165)],_0x528d4b=_0x582962['profileSource'],_0x206a17=_0x528d4b===_0x54f14b(0x153)?_0x54f14b(0x13f):_0x528d4b===_0x54f14b(0x163)?_0x54f14b(0x163):_0x528d4b===_0x54f14b(0x136)?_0x54f14b(0x161):_0x528d4b===_0x54f14b(0x14f)?'config':null,_0x4e00f1=_0xad16eb?a45_0x367c8f['cyan'](_0xad16eb):a45_0x367c8f[_0x54f14b(0x14c)](_0x54f14b(0x138)),_0x5c2758=_0x206a17?'\x20'+a45_0x367c8f[_0x54f14b(0x14c)](_0x54f14b(0x15d)+_0x206a17+')'):'';console[_0x54f14b(0x157)](a45_0x367c8f[_0x54f14b(0x15e)](_0x54f14b(0x14b))+_0x54f14b(0x148)+_0x4e00f1+_0x5c2758+'\x20'+a45_0x367c8f['dim']('(')+_0x54f14b(0x142)+a45_0x367c8f[_0x54f14b(0x13e)](_0x122e4b)+a45_0x367c8f[_0x54f14b(0x14c)](')'));const _0x3db64a=await getOAuthTokens(_0xad16eb);if(_0x3db64a)console[_0x54f14b(0x157)](_0x54f14b(0x162)+a45_0x367c8f['cyan']('OAuth'));else{const _0xdc16b4=await resolveAPIKeyAsync(_0x122e4b,_0xad16eb);if(_0xdc16b4){const {source:_0x4fe7dd,isDeprecated:_0x34cfd6}=_0xdc16b4,_0x511151=_0x54f14b(0x13d)+a45_0x367c8f[_0x54f14b(0x13e)](_0x4fe7dd);console[_0x54f14b(0x157)](_0x34cfd6?a45_0x367c8f[_0x54f14b(0x146)](_0x511151):_0x511151);}else console[_0x54f14b(0x157)](a45_0x367c8f[_0x54f14b(0x146)](_0x54f14b(0x154)));}let _0xdb64bd=![];try{const _0x4e33fb=await _0x472f6b[_0x54f14b(0x141)]['getUserInfo']();console['log'](a45_0x367c8f[_0x54f14b(0x139)](_0x54f14b(0x151))),console[_0x54f14b(0x157)](a45_0x367c8f[_0x54f14b(0x15e)](_0x54f14b(0x159))+'\x20'+a45_0x367c8f[_0x54f14b(0x13e)](_0x4e33fb[_0x54f14b(0x144)]));if(_0x4e33fb['first_name']||_0x4e33fb[_0x54f14b(0x155)]){const _0x5bf008=[_0x4e33fb[_0x54f14b(0x13b)],_0x4e33fb[_0x54f14b(0x155)]][_0x54f14b(0x13a)](Boolean)[_0x54f14b(0x137)]('\x20');console[_0x54f14b(0x157)](a45_0x367c8f['bold'](_0x54f14b(0x149))+'\x20'+_0x5bf008);}_0x4e33fb[_0x54f14b(0x15b)]&&console['log'](a45_0x367c8f['bold'](_0x54f14b(0x160))+'\x20'+a45_0x367c8f['yellow'](_0x4e33fb[_0x54f14b(0x15b)])),_0xdb64bd=!![];}catch(_0x14b872){_0x14b872 instanceof HTTPClientError&&_0x14b872[_0x54f14b(0x15c)]===0x191?printAuthError(_0x14b872,!![],_0xad16eb):console[_0x54f14b(0x152)](a45_0x367c8f[_0x54f14b(0x135)](_0x54f14b(0x15f)+(_0x14b872 instanceof Error?_0x14b872['message']:String(_0x14b872))));}return console[_0x54f14b(0x157)](),_0x582962['displayWithSources'](),_0xdb64bd?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
- function a46_0x3069(){const _0x13bd83=['query','Database:\x20','execute','database','error','20oaXvDF','\x20\x20tdx\x20tables\x20--in\x20mydb\x20\x20\x20\x20\x20\x20\x20->\x20all\x20tables\x20from\x20mydb','cause','name','✖\x20No\x20tables\x20found','26BYjZAD','Error:\x20Pattern\x20\x27','listTables','message','1035806oGltcZ','4889696mThmCf','\x20\x20tdx\x20tables\x20\x22*.user*\x22\x20\x20\x20\x20\x20\x20\x20->\x20tables\x20matching\x20user*\x20across\x20databases','table','table_name','573sFIkfM','\x20\x20Or:\x20\x20tdx\x20tables\x20--database\x20','Database:\x20all','\x20\x20Or:\x20\x20tdx\x20tables\x20--in\x20','570veoQHc','length','Note:\x20\x27','4470719cGPYDZ','log','\x27\x20without\x20wildcards\x20would\x20search\x20for\x20tables\x20named\x20\x27','✔\x20Found\x20','\x20\x20tdx\x20tables\x20users\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20->\x20table\x20\x22users\x22\x20across\x20all\x20databases','\x20\x20Cause:\x20','includes','Error:\x20','📋\x20','Database\x20pattern:\x20','\x20\x20tdx\x20tables\x20\x22mydb.users\x22\x20\x20\x20\x20->\x20table\x20\x22users\x22\x20in\x20database\x20mydb','161HPEssn','96198yRuVar','tables','16832oSoDdf','data','\x20table','Table\x20pattern:\x20','\x27\x20may\x20not\x20exist\x20or\x20contains\x20no\x20tables','verbose','813870dbnULc','Error:\x20Too\x20many\x20arguments.\x20Use\x20single\x20argument:','List\x20tables\x20in\x20a\x20database'];a46_0x3069=function(){return _0x13bd83;};return a46_0x3069();}const a46_0x40cdc8=a46_0x1e8e;(function(_0x2665e5,_0x347d25){const _0x4e2f7c=a46_0x1e8e,_0xa8fff0=_0x2665e5();while(!![]){try{const _0xcf41cd=-parseInt(_0x4e2f7c(0x150))/0x1+parseInt(_0x4e2f7c(0x14c))/0x2*(-parseInt(_0x4e2f7c(0x124))/0x3)+parseInt(_0x4e2f7c(0x139))/0x4*(parseInt(_0x4e2f7c(0x128))/0x5)+parseInt(_0x4e2f7c(0x137))/0x6*(-parseInt(_0x4e2f7c(0x136))/0x7)+parseInt(_0x4e2f7c(0x120))/0x8+parseInt(_0x4e2f7c(0x13f))/0x9+-parseInt(_0x4e2f7c(0x147))/0xa*(-parseInt(_0x4e2f7c(0x12b))/0xb);if(_0xcf41cd===_0x347d25)break;else _0xa8fff0['push'](_0xa8fff0['shift']());}catch(_0x55fa28){_0xa8fff0['push'](_0xa8fff0['shift']());}}}(a46_0x3069,0x8f59c));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';function a46_0x1e8e(_0x46dd70,_0x1eb176){_0x46dd70=_0x46dd70-0x120;const _0x30693c=a46_0x3069();let _0x1e8e9e=_0x30693c[_0x46dd70];return _0x1e8e9e;}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';export class TablesCommand extends BaseCommand{[a46_0x40cdc8(0x14a)]=a46_0x40cdc8(0x138);['description']=a46_0x40cdc8(0x141);async[a46_0x40cdc8(0x144)](_0x5b3e50){const _0x5e07bd=a46_0x40cdc8,{options:_0x2bdf42,args:_0x20253e,tdx:_0x409126}=_0x5b3e50;let _0x56138d;if(_0x20253e[_0x5e07bd(0x129)]===0x0)_0x56138d={'database':undefined,'table':undefined,'original':''};else{if(_0x20253e[_0x5e07bd(0x129)]===0x1)try{_0x56138d=parseTableReference(_0x20253e[0x0]);if(_0x56138d[_0x5e07bd(0x122)]&&!_0x56138d['database']&&!_0x56138d[_0x5e07bd(0x122)][_0x5e07bd(0x131)]('*')&&!_0x56138d[_0x5e07bd(0x122)]['includes']('?'))return console['error'](_0x5e07bd(0x14d)+_0x20253e[0x0]+'\x27\x20is\x20ambiguous.'),console[_0x5e07bd(0x146)]('Did\x20you\x20mean\x20to\x20list\x20all\x20tables\x20from\x20database\x20\x27'+_0x56138d[_0x5e07bd(0x122)]+'\x27?'),console[_0x5e07bd(0x146)]('\x20\x20Use:\x20tdx\x20tables\x20\x22'+_0x56138d[_0x5e07bd(0x122)]+'.*\x22'),console[_0x5e07bd(0x146)](_0x5e07bd(0x127)+_0x56138d[_0x5e07bd(0x122)]),console[_0x5e07bd(0x146)](_0x5e07bd(0x125)+_0x56138d['table']),console['error'](''),console[_0x5e07bd(0x146)](_0x5e07bd(0x12a)+_0x20253e[0x0]+_0x5e07bd(0x12d)+_0x56138d[_0x5e07bd(0x122)]+'\x27\x20across\x20all\x20databases.'),0x1;}catch(_0x564222){return console[_0x5e07bd(0x146)](_0x5e07bd(0x132)+_0x564222[_0x5e07bd(0x14f)]),0x1;}else return console['error'](_0x5e07bd(0x140)),console[_0x5e07bd(0x146)](_0x5e07bd(0x12f)),console['error']('\x20\x20tdx\x20tables\x20\x22mydb.*\x22\x20\x20\x20\x20\x20\x20\x20\x20->\x20all\x20tables\x20from\x20mydb'),console['error'](_0x5e07bd(0x135)),console[_0x5e07bd(0x146)](_0x5e07bd(0x121)),console[_0x5e07bd(0x146)]('Or\x20use\x20--in\x20flag:'),console[_0x5e07bd(0x146)](_0x5e07bd(0x148)),0x1;}const _0x2d08be=_0x2bdf42[_0x5e07bd(0x145)];!_0x56138d['database']&&_0x2d08be&&(_0x56138d[_0x5e07bd(0x145)]=_0x2d08be);try{const _0x1957b7=_0x2f1612=>_0x2f1612&&(_0x2f1612[_0x5e07bd(0x131)]('*')||_0x2f1612[_0x5e07bd(0x131)]('?')),_0x1044e6=_0x1957b7(_0x56138d[_0x5e07bd(0x145)]);_0x2bdf42[_0x5e07bd(0x13e)]&&(console['error']('Site:\x20'+_0x2bdf42['site']),_0x56138d['database']?_0x1044e6?console[_0x5e07bd(0x146)](_0x5e07bd(0x134)+_0x56138d['database']):console[_0x5e07bd(0x146)](_0x5e07bd(0x143)+_0x56138d['database']):console[_0x5e07bd(0x146)](_0x5e07bd(0x126)),_0x56138d['table']&&console[_0x5e07bd(0x146)](_0x5e07bd(0x13c)+_0x56138d[_0x5e07bd(0x122)]));const _0x48cae5=_0x56138d[_0x5e07bd(0x145)]&&!_0x1044e6?_0x56138d[_0x5e07bd(0x145)]:undefined,_0xe78294=_0x1044e6?_0x56138d[_0x5e07bd(0x145)]:undefined,_0x569b5a=_0x56138d[_0x5e07bd(0x122)],_0x57847b=resolveLimit(_0x2bdf42['limit'],DEFAULT_LISTING_LIMIT),_0x1ed3dd=await withSpinner('Listing\x20tables...',()=>_0x409126[_0x5e07bd(0x142)][_0x5e07bd(0x14e)](_0x48cae5,_0x569b5a,_0xe78294,_0x57847b),{'verbose':_0x2bdf42['verbose']}),_0x1cbeb4=_0x1ed3dd[_0x5e07bd(0x13a)];if(_0x1cbeb4[_0x5e07bd(0x129)]===0x0&&_0x56138d[_0x5e07bd(0x145)]&&!_0x1044e6)return console[_0x5e07bd(0x146)](_0x5e07bd(0x14b)),console[_0x5e07bd(0x146)]('Database\x20\x27'+_0x56138d[_0x5e07bd(0x145)]+_0x5e07bd(0x13d)),0x1;console[_0x5e07bd(0x146)](_0x5e07bd(0x12e)+_0x1cbeb4[_0x5e07bd(0x129)]+_0x5e07bd(0x13b)+(_0x1cbeb4[_0x5e07bd(0x129)]!==0x1?'s':''));if(isStructuredFormat(_0x2bdf42))await handleSDKOutput(_0x1cbeb4,{..._0x2bdf42,'limit':_0x57847b});else for(const _0x2b46c1 of _0x1cbeb4){const _0x137f93=_0x2b46c1['database_name']?_0x2b46c1['database_name']+'.':'';console[_0x5e07bd(0x12c)](_0x5e07bd(0x133)+_0x137f93+_0x2b46c1[_0x5e07bd(0x123)]);}return 0x0;}catch(_0x1f43d2){if(_0x1f43d2 instanceof SDKError)return console[_0x5e07bd(0x146)](_0x5e07bd(0x132)+_0x1f43d2['message']),_0x1f43d2['cause']&&console[_0x5e07bd(0x146)](_0x5e07bd(0x130)+_0x1f43d2[_0x5e07bd(0x149)]),0x1;throw _0x1f43d2;}}['validate'](_0x22af46){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
- const a47_0x5273a0=a47_0x191e;(function(_0x3df51c,_0x3cb40c){const _0x450e8a=a47_0x191e,_0x1d0925=_0x3df51c();while(!![]){try{const _0x46d49c=-parseInt(_0x450e8a(0x1bb))/0x1+parseInt(_0x450e8a(0x1a9))/0x2+-parseInt(_0x450e8a(0x1b3))/0x3*(parseInt(_0x450e8a(0x1a3))/0x4)+-parseInt(_0x450e8a(0x1bc))/0x5+-parseInt(_0x450e8a(0x1b5))/0x6+parseInt(_0x450e8a(0x1bd))/0x7+parseInt(_0x450e8a(0x1ad))/0x8*(parseInt(_0x450e8a(0x1ac))/0x9);if(_0x46d49c===_0x3cb40c)break;else _0x1d0925['push'](_0x1d0925['shift']());}catch(_0x5e980d){_0x1d0925['push'](_0x1d0925['shift']());}}}(a47_0x1550,0xc4f8c));import{BaseCommand}from'./command.js';import{getSessionID,cleanExpiredSessions,clearSessionContextField}from'../core/session.js';import{clearDefaultSiteFromUserConfig,clearActiveProfileFromUserConfig}from'../core/profile.js';function a47_0x191e(_0x183434,_0x1b770a){_0x183434=_0x183434-0x1a0;const _0x15507d=a47_0x1550();let _0x191e03=_0x15507d[_0x183434];return _0x191e03;}import{getConfigDir}from'../core/config.js';import a47_0x5544d7 from'chalk';import*as a47_0x17bcde from'node:path';export class UnsetCommand extends BaseCommand{[a47_0x5273a0(0x1c1)]=a47_0x5273a0(0x1a1);[a47_0x5273a0(0x1c4)]='Clear\x20session-level\x20or\x20default\x20context\x20values';[a47_0x5273a0(0x1b1)](_0x33a1b9){const _0x13e24d=a47_0x5273a0,{args:_0x309e1c,options:_0x267a0d}=_0x33a1b9,_0x2d8873=_0x267a0d['default'];if(_0x309e1c[_0x13e24d(0x1aa)]===0x0)return'Usage:\x20tdx\x20unset\x20<resource>\x0a'+_0x13e24d(0x1a6)+'\x0aResources:\x20site,\x20database,\x20parent_segment,\x20llm_project,\x20agent,\x20profile,\x20engage_workspace\x0a'+_0x13e24d(0x1b9);const _0x3b4874=_0x309e1c[0x0],_0x439b24=[_0x13e24d(0x1a5),_0x13e24d(0x1b7),_0x13e24d(0x1a0),_0x13e24d(0x1c3),'agent',_0x13e24d(0x1b4),'engage_workspace'];if(!_0x439b24[_0x13e24d(0x1a8)](_0x3b4874))return _0x13e24d(0x1a2)+_0x3b4874+_0x13e24d(0x1b8)+_0x439b24[_0x13e24d(0x1ae)](',\x20');if(_0x2d8873&&_0x3b4874!==_0x13e24d(0x1a5)&&_0x3b4874!==_0x13e24d(0x1b4))return'--default\x20can\x20only\x20be\x20used\x20with\x20\x27site\x27\x20or\x20\x27profile\x27.\x20Other\x20resources\x20are\x20session-level\x20only.';return undefined;}async[a47_0x5273a0(0x1c2)](_0x52a7ea){const _0x216f30=a47_0x5273a0,{args:_0x9b7b8c,options:_0x249ef2}=_0x52a7ea,_0x19328e=_0x249ef2['default'];cleanExpiredSessions();try{const _0x3c8167=_0x9b7b8c[0x0],_0x4b1341=a47_0x17bcde[_0x216f30(0x1ae)](getConfigDir(),_0x216f30(0x1a4));if(_0x19328e){if(_0x3c8167===_0x216f30(0x1a5))return clearDefaultSiteFromUserConfig(),console[_0x216f30(0x1a7)](_0x216f30(0x1b6)+a47_0x5544d7[_0x216f30(0x1b0)]('cleared')),console['log'](a47_0x5544d7['dim'](_0x216f30(0x1be)+_0x4b1341)),0x0;if(_0x3c8167===_0x216f30(0x1b4))return clearActiveProfileFromUserConfig(),console[_0x216f30(0x1a7)](_0x216f30(0x1af)+a47_0x5544d7[_0x216f30(0x1b0)](_0x216f30(0x1ab))),console['log'](a47_0x5544d7['dim'](_0x216f30(0x1be)+_0x4b1341)),0x0;}const _0x28ee26=getSessionID(_0x249ef2[_0x216f30(0x1bf)]),_0x24ea72={'site':_0x216f30(0x1a5),'database':_0x216f30(0x1b7),'parent_segment':'parent_segment','llm_project':_0x216f30(0x1c3),'agent':'llm_agent','profile':'profile','engage_workspace':'engage_workspace'},_0x6fb297=_0x24ea72[_0x3c8167];return _0x6fb297&&(clearSessionContextField(_0x6fb297,_0x249ef2['session']),console[_0x216f30(0x1a7)](_0x216f30(0x1ba)+_0x3c8167+'\x20'+a47_0x5544d7[_0x216f30(0x1b0)](_0x216f30(0x1ab))+'\x20'+a47_0x5544d7[_0x216f30(0x1b2)](_0x216f30(0x1c0)+_0x28ee26+')'))),0x0;}catch(_0x4dd229){return _0x4dd229 instanceof Error&&console['error']('Error:\x20'+_0x4dd229['message']),0x1;}}}function a47_0x1550(){const _0x293a6e=['length','cleared','459ATJmqt','238864fYOxQj','join','Default\x20profile\x20','green','validate','dim','1319907mxDXzw','profile','2052816xejKoq','Default\x20site\x20','database','.\x20Must\x20be\x20one\x20of:\x20','\x0aRun\x20\x27tdx\x20unset\x20--help\x27\x20for\x20more\x20options','Session\x20','897717GEKJnv','990000iDpmzX','5215000Lniqky','\x0aUpdated:\x20','session','(session:\x20','name','execute','llm_project','description','parent_segment','unset','Invalid\x20resource:\x20','12ejACQl','tdx.json','site','\x20\x20\x20\x20\x20\x20\x20tdx\x20unset\x20--default\x20<resource>\x20\x20#\x20Clear\x20default\x20from\x20config\x0a','log','includes','2593596BbOWsJ'];a47_0x1550=function(){return _0x293a6e;};return a47_0x1550();}
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_0x3ec0e3=a48_0x245a;(function(_0xb368e2,_0x516e06){const _0x3e37a1=a48_0x245a,_0x28dba8=_0xb368e2();while(!![]){try{const _0x40ccc0=-parseInt(_0x3e37a1(0x1a0))/0x1+parseInt(_0x3e37a1(0x183))/0x2*(-parseInt(_0x3e37a1(0x1a6))/0x3)+parseInt(_0x3e37a1(0x188))/0x4*(-parseInt(_0x3e37a1(0x19a))/0x5)+-parseInt(_0x3e37a1(0x17c))/0x6*(-parseInt(_0x3e37a1(0x1a8))/0x7)+parseInt(_0x3e37a1(0x194))/0x8*(-parseInt(_0x3e37a1(0x1a9))/0x9)+parseInt(_0x3e37a1(0x18d))/0xa+-parseInt(_0x3e37a1(0x1a1))/0xb*(-parseInt(_0x3e37a1(0x189))/0xc);if(_0x40ccc0===_0x516e06)break;else _0x28dba8['push'](_0x28dba8['shift']());}catch(_0x2f41e9){_0x28dba8['push'](_0x28dba8['shift']());}}}(a48_0x3e98,0x746c7));import{gt}from'semver';import a48_0x2137d0 from'chalk';import{BaseCommand}from'./command.js';import{getVersion,isDevVersion}from'../core/version.js';function a48_0x3e98(){const _0xee285b=['2cONAlq','name','replace','red','Current\x20version:','69868uZNlkQ','33008244xIkEkN','includes','execute','Upgrade\x20failed\x20(exit\x20code\x20','591100uALcUn','Failed\x20to\x20run\x20','yellow','toLowerCase','inherit','.bun/','log','232nPanpx','...','global','dryRun','join','Running:','155YjfdAs','add','pnpm','cyan','Target\x20version:','yarn','845841felBpm','11nrXkJu','Failed\x20to\x20check\x20for\x20updates:\x20','Already\x20up\x20to\x20date\x20(','Checking\x20','install','2429022KxJWuN','Would\x20run:','1721279jADrkI','271125sElarA','Latest\x20version:','next','18BvYkTE','dim','upgrade','execPath','error','description','green'];a48_0x3e98=function(){return _0xee285b;};return a48_0x3e98();}import{loadReleaseChannel}from'../core/config.js';function a48_0x245a(_0x22cffc,_0x2f70db){_0x22cffc=_0x22cffc-0x17b;const _0x3e982a=a48_0x3e98();let _0x245aba=_0x3e982a[_0x22cffc];return _0x245aba;}import{fetchLatestVersion}from'../utils/version-check.js';import{crossSpawn}from'../utils/process.js';const PACKAGE_NAME='@treasuredata/tdx';export function detectPackageManager(){const _0xfada85=a48_0x245a,_0x87c184=process[_0xfada85(0x17f)][_0xfada85(0x190)](),_0x268605=process['argv'][0x1]??'';if(_0x87c184[_0xfada85(0x18a)]('bun')||_0x268605[_0xfada85(0x18a)](_0xfada85(0x192)))return'bun';if(_0x268605[_0xfada85(0x18a)](_0xfada85(0x19c)))return _0xfada85(0x19c);if(_0x268605[_0xfada85(0x18a)](_0xfada85(0x19f)))return _0xfada85(0x19f);return'npm';}export function buildInstallArgs(_0x46648b,_0xc7befb){const _0x595f79=a48_0x245a;switch(_0x46648b){case _0x595f79(0x19f):return[_0x595f79(0x196),_0x595f79(0x19b),_0xc7befb];case _0x595f79(0x19c):return[_0x595f79(0x19b),'-g',_0xc7befb];default:return[_0x595f79(0x1a5),'-g',_0xc7befb];}}export class UpgradeCommand extends BaseCommand{[a48_0x3ec0e3(0x184)]=a48_0x3ec0e3(0x17e);[a48_0x3ec0e3(0x181)]='Upgrade\x20tdx\x20to\x20the\x20latest\x20version';async[a48_0x3ec0e3(0x18b)](_0x3f8901){const _0x40e8cb=a48_0x3ec0e3,{options:_0x12ee0a,args:_0x41ba09}=_0x3f8901,_0x4cc87f=!!_0x12ee0a[_0x40e8cb(0x197)],{next:_0x1031ac,method:_0x45fb05}=_0x12ee0a,_0x43444=_0x1031ac?_0x40e8cb(0x17b):loadReleaseChannel(),_0x3b3f05=_0x43444==='next'?_0x40e8cb(0x17b):'latest',_0x56ff48=_0x41ba09[0x0]?String(_0x41ba09[0x0])[_0x40e8cb(0x185)](/^v/,''):undefined,_0x26e8b3=getVersion();if(isDevVersion())return console[_0x40e8cb(0x180)](a48_0x2137d0[_0x40e8cb(0x18f)]('Upgrade\x20is\x20not\x20available\x20for\x20development\x20versions.')),console[_0x40e8cb(0x180)](a48_0x2137d0[_0x40e8cb(0x17d)]('Current\x20version:\x20'+_0x26e8b3)),0x1;let _0x37d16f;if(_0x56ff48)_0x37d16f=_0x56ff48,console[_0x40e8cb(0x193)](a48_0x2137d0[_0x40e8cb(0x17d)](_0x40e8cb(0x187))+'\x20'+_0x26e8b3),console[_0x40e8cb(0x193)](a48_0x2137d0[_0x40e8cb(0x17d)](_0x40e8cb(0x19e))+'\x20\x20'+a48_0x2137d0[_0x40e8cb(0x182)](_0x56ff48)),console[_0x40e8cb(0x193)]();else{console[_0x40e8cb(0x193)](a48_0x2137d0[_0x40e8cb(0x17d)](_0x40e8cb(0x1a4)+PACKAGE_NAME+'@'+_0x3b3f05+_0x40e8cb(0x195)));try{_0x37d16f=await fetchLatestVersion(_0x43444);}catch(_0x4edcc1){return console['error'](a48_0x2137d0[_0x40e8cb(0x186)](_0x40e8cb(0x1a2)+(_0x4edcc1 instanceof Error?_0x4edcc1['message']:String(_0x4edcc1)))),0x1;}if(!gt(_0x37d16f,_0x26e8b3))return console[_0x40e8cb(0x193)](a48_0x2137d0[_0x40e8cb(0x182)](_0x40e8cb(0x1a3)+_0x26e8b3+').')),0x0;console[_0x40e8cb(0x193)](a48_0x2137d0[_0x40e8cb(0x17d)](_0x40e8cb(0x187))+'\x20'+_0x26e8b3),console['log'](a48_0x2137d0[_0x40e8cb(0x17d)](_0x40e8cb(0x1aa))+'\x20\x20'+a48_0x2137d0[_0x40e8cb(0x182)](_0x37d16f)),console[_0x40e8cb(0x193)]();}const _0x3ce58d=_0x45fb05??detectPackageManager(),_0x3e8957=_0x56ff48?PACKAGE_NAME+'@'+_0x56ff48:PACKAGE_NAME+'@'+_0x3b3f05,_0xf81c29=buildInstallArgs(_0x3ce58d,_0x3e8957);if(_0x4cc87f)return console[_0x40e8cb(0x193)](a48_0x2137d0['dim'](_0x40e8cb(0x1a7))),console[_0x40e8cb(0x193)]('\x20\x20'+a48_0x2137d0[_0x40e8cb(0x19d)](_0x3ce58d+'\x20'+_0xf81c29[_0x40e8cb(0x198)]('\x20'))),0x0;return console[_0x40e8cb(0x193)](a48_0x2137d0['dim'](_0x40e8cb(0x199))+'\x20'+_0x3ce58d+'\x20'+_0xf81c29['join']('\x20')),console[_0x40e8cb(0x193)](),new Promise(_0x1952f2=>{const _0x5776ac=_0x40e8cb,_0x15d888=crossSpawn(_0x3ce58d,_0xf81c29,{'stdio':_0x5776ac(0x191)});_0x15d888['on']('close',_0x1590e0=>{const _0x3ebc24=_0x5776ac;console[_0x3ebc24(0x193)](),_0x1590e0===0x0?console[_0x3ebc24(0x193)](a48_0x2137d0[_0x3ebc24(0x182)]('Successfully\x20upgraded\x20to\x20'+_0x3e8957)):console['error'](a48_0x2137d0['red'](_0x3ebc24(0x18c)+_0x1590e0+').')),_0x1952f2(_0x1590e0??0x1);}),_0x15d888['on'](_0x5776ac(0x180),_0x4c5fab=>{const _0x2f23e1=_0x5776ac;console[_0x2f23e1(0x180)](a48_0x2137d0[_0x2f23e1(0x186)](_0x2f23e1(0x18e)+_0x3ce58d+':\x20'+_0x4c5fab['message'])),_0x1952f2(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_0x576c82=a49_0x3b1d;(function(_0x389431,_0x1f01d3){const _0x1d911a=a49_0x3b1d,_0x583bf5=_0x389431();while(!![]){try{const _0x1f1c66=parseInt(_0x1d911a(0x1c0))/0x1*(-parseInt(_0x1d911a(0x1a6))/0x2)+parseInt(_0x1d911a(0x18c))/0x3*(parseInt(_0x1d911a(0x19c))/0x4)+-parseInt(_0x1d911a(0x1ab))/0x5*(-parseInt(_0x1d911a(0x198))/0x6)+parseInt(_0x1d911a(0x1b8))/0x7*(-parseInt(_0x1d911a(0x182))/0x8)+-parseInt(_0x1d911a(0x1b1))/0x9*(-parseInt(_0x1d911a(0x197))/0xa)+-parseInt(_0x1d911a(0x177))/0xb*(parseInt(_0x1d911a(0x17f))/0xc)+parseInt(_0x1d911a(0x187))/0xd;if(_0x1f1c66===_0x1f01d3)break;else _0x583bf5['push'](_0x583bf5['shift']());}catch(_0x4190de){_0x583bf5['push'](_0x583bf5['shift']());}}}(a49_0x471a,0x279c7));import{BaseCommand}from'./command.js';import{saveSessionContext,getSessionID,cleanExpiredSessions,clearSessionContext}from'../core/session.js';function a49_0x3b1d(_0xb210d8,_0x362de1){_0xb210d8=_0xb210d8-0x173;const _0x471a2b=a49_0x471a();let _0x3b1db0=_0x471a2b[_0xb210d8];return _0x3b1db0;}import{profileExists,saveActiveProfileToUserConfig,saveDefaultSiteToUserConfig}from'../core/profile.js';import{GlobalContext}from'../core/global-context.js';import{parseAgentRef}from'../sdk/agent/agent-ref-parser.js';import{getConfigDir,saveReleaseChannel}from'../core/config.js';function a49_0x471a(){const _0x4cd2e6=['NOT_FOUND','Session\x20engage_workspace\x20set\x20to:\x20','tdx.json','parent_segment','.\x20Must\x20be\x20\x27stable\x27\x20or\x20\x27next\x27.','3385580jZUYfk','\x27\x20to\x20save\x20permanently','release_channel\x20requires\x20--default.\x20Usage:\x20tdx\x20use\x20--default\x20release_channel\x20<stable|next>','Install\x20the\x20latest\x20next\x20version:\x20npm\x20install\x20-g\x20@treasuredata/tdx@next','Release\x20channel\x20set\x20to:\x20','name','debug','\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','12bgbYDP','stable','\x0aUse\x20\x27tdx\x20engage\x20workspace\x20list\x27\x20to\x20see\x20available\x20workspaces','24zFWQzU','tdx','Session\x20llm_project\x20set\x20to:\x20','resolveWorkspaceId','\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20--default\x20release_channel\x20<stable|next>\x20\x20#\x20Set\x20release\x20channel\x0a','38077YWihBP','log','execute','Invalid\x20release\x20channel:\x20','agent','330axVvka','Session\x20parent_segment\x20set\x20to:\x20','\x0aSaved\x20to:\x20','\x0aRun\x20\x27tdx\x20use\x20--help\x27\x20for\x20more\x20options','Use\x20--default\x20with\x20site,\x20profile,\x20or\x20release_channel\x20to\x20save\x20permanently','Session\x20database\x20set\x20to:\x20','green','use','Resources:\x20site,\x20database,\x20parent_segment,\x20llm_project,\x20agent,\x20profile,\x20engage_workspace,\x20release_channel','profile','(session:\x20','20kytTtO','48NcgcMx','site','\x0aUse\x20\x27tdx\x20profiles\x27\x20to\x20see\x20available\x20profiles','Session\x20site\x20set\x20to:\x20','10988ZucELW','\x27\x20does\x20not\x20exist','\x0aUpdate\x20notifications\x20will\x20now\x20check\x20the\x20@next\x20channel.','database','Session\x20agent\x20set\x20to:\x20','error','join','Default\x20site\x20set\x20to:\x20','clear','description','398vVzeZh','release_channel','\x0aTip:\x20Use\x20\x27tdx\x20use\x20--default\x20profile\x20','code','\x0aUpdate\x20notifications\x20will\x20check\x20the\x20@latest\x20(stable)\x20channel.','145920UzJJiK','validate','session','Verifying\x20workspace\x20\x27','default','llm_project','1165464onPvrL','cleared','Set\x20session-level\x20context','Error:\x20','\x27...','display','engage_workspace','491687RXIlmh','\x0aTip:\x20Use\x20\x27tdx\x20use\x20--clear\x27\x20to\x20clear\x20session\x20overrides','llm_agent','Invalid\x20resource:\x20','next','dim','.\x20Must\x20be\x20one\x20of:\x20','--default\x20can\x20only\x20be\x20used\x20with\x20\x27site\x27,\x20\x27profile\x27,\x20or\x20\x27release_channel\x27.\x20Other\x20resources\x20are\x20session-level\x20only.','587jJffgu','message','length','engage'];a49_0x471a=function(){return _0x4cd2e6;};return a49_0x471a();}import{SDKError,ErrorCode}from'../sdk/errors.js';import{withSpinner}from'../utils/spinner.js';import a49_0x2a41c6 from'chalk';import*as a49_0x5ec8fe from'node:path';export class UseCommand extends BaseCommand{[a49_0x576c82(0x17c)]=a49_0x576c82(0x193);[a49_0x576c82(0x1a5)]=a49_0x576c82(0x1b3);[a49_0x576c82(0x1ac)](_0x164e56){const _0x2779df=a49_0x576c82,{args:_0x401089,options:_0x3de7b}=_0x164e56,_0x75370b=_0x3de7b[_0x2779df(0x1af)];if(_0x401089[_0x2779df(0x1c2)]===0x0)return undefined;if(_0x401089[_0x2779df(0x1c2)]===0x1)return'Usage:\x20tdx\x20use\x20<resource>\x20<value>\x0a'+_0x2779df(0x17e)+'\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20--clear\x20\x20\x20\x20\x20\x20#\x20Clear\x20session\x20context\x0a'+'\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20--default\x20site\x20<value>\x20\x20\x20\x20\x20#\x20Save\x20default\x20site\x20to\x20config\x0a'+'\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20--default\x20profile\x20<value>\x20\x20#\x20Save\x20default\x20profile\x20to\x20config\x0a'+_0x2779df(0x186)+'\x0aResources:\x20site,\x20database,\x20parent_segment,\x20llm_project,\x20agent,\x20profile,\x20engage_workspace,\x20release_channel\x0a'+_0x2779df(0x18f);const _0x337d7d=_0x401089[0x0],_0x1f19b5=[_0x2779df(0x199),_0x2779df(0x19f),_0x2779df(0x175),'llm_project',_0x2779df(0x18b),_0x2779df(0x195),_0x2779df(0x1b7),_0x2779df(0x1a7)];if(!_0x1f19b5['includes'](_0x337d7d))return _0x2779df(0x1bb)+_0x337d7d+_0x2779df(0x1be)+_0x1f19b5[_0x2779df(0x1a2)](',\x20');if(_0x75370b&&_0x337d7d!=='site'&&_0x337d7d!==_0x2779df(0x195)&&_0x337d7d!==_0x2779df(0x1a7))return _0x2779df(0x1bf);if(_0x337d7d===_0x2779df(0x1a7)&&!_0x75370b)return _0x2779df(0x179);if(_0x337d7d==='release_channel'){const _0x37a705=_0x401089[0x1];if(_0x37a705!==_0x2779df(0x180)&&_0x37a705!==_0x2779df(0x1bc))return _0x2779df(0x18a)+_0x37a705+_0x2779df(0x176);}return undefined;}async[a49_0x576c82(0x189)](_0x141963){const _0xb1ce93=a49_0x576c82,{args:_0x949fad,options:_0x464159}=_0x141963,_0x309b6f=_0x464159[_0xb1ce93(0x17d)],_0x523ebf=_0x464159[_0xb1ce93(0x1a4)],_0x3bc60a=_0x464159[_0xb1ce93(0x1af)];cleanExpiredSessions();try{if(_0x523ebf){clearSessionContext(_0x464159[_0xb1ce93(0x1ad)]);const _0x330020=getSessionID(_0x464159[_0xb1ce93(0x1ad)]);return console[_0xb1ce93(0x188)]('Session\x20context\x20'+a49_0x2a41c6[_0xb1ce93(0x192)](_0xb1ce93(0x1b2))+'\x20'+a49_0x2a41c6[_0xb1ce93(0x1bd)](_0xb1ce93(0x196)+_0x330020+')')),0x0;}if(_0x949fad[_0xb1ce93(0x1c2)]===0x0){const _0x30436c=new GlobalContext(_0x464159);return _0x309b6f?_0x30436c['displayWithSources']():_0x30436c[_0xb1ce93(0x1b6)](),console[_0xb1ce93(0x188)](a49_0x2a41c6[_0xb1ce93(0x1bd)]('\x0aSet\x20context:\x20tdx\x20use\x20<resource>\x20<value>')),console[_0xb1ce93(0x188)](a49_0x2a41c6[_0xb1ce93(0x1bd)](_0xb1ce93(0x194))),console[_0xb1ce93(0x188)](a49_0x2a41c6[_0xb1ce93(0x1bd)](_0xb1ce93(0x190))),0x0;}const _0x49e10c=_0x949fad[0x0],_0x518b22=_0x949fad[0x1],_0x22d316=a49_0x5ec8fe[_0xb1ce93(0x1a2)](getConfigDir(),_0xb1ce93(0x174));if(_0x3bc60a){if(_0x49e10c===_0xb1ce93(0x199))return saveDefaultSiteToUserConfig(_0x518b22),console[_0xb1ce93(0x188)](_0xb1ce93(0x1a3)+a49_0x2a41c6[_0xb1ce93(0x192)](_0x518b22)),console[_0xb1ce93(0x188)](a49_0x2a41c6[_0xb1ce93(0x1bd)](_0xb1ce93(0x18e)+_0x22d316)),0x0;if(_0x49e10c===_0xb1ce93(0x195)){if(!profileExists(_0x518b22))return console[_0xb1ce93(0x1a1)]('Error:\x20Profile\x20\x27'+_0x518b22+_0xb1ce93(0x19d)),console[_0xb1ce93(0x1a1)](_0xb1ce93(0x19a)),0x1;return saveActiveProfileToUserConfig(_0x518b22),console[_0xb1ce93(0x188)]('Default\x20profile\x20set\x20to:\x20'+a49_0x2a41c6[_0xb1ce93(0x192)](_0x518b22)),console[_0xb1ce93(0x188)](a49_0x2a41c6[_0xb1ce93(0x1bd)]('\x0aSaved\x20to:\x20'+_0x22d316)),0x0;}if(_0x49e10c===_0xb1ce93(0x1a7))return saveReleaseChannel(_0x518b22),console[_0xb1ce93(0x188)](_0xb1ce93(0x17b)+a49_0x2a41c6[_0xb1ce93(0x192)](_0x518b22)),console[_0xb1ce93(0x188)](a49_0x2a41c6[_0xb1ce93(0x1bd)]('\x0aSaved\x20to:\x20'+_0x22d316)),_0x518b22===_0xb1ce93(0x1bc)?(console[_0xb1ce93(0x188)](a49_0x2a41c6[_0xb1ce93(0x1bd)](_0xb1ce93(0x19e))),console[_0xb1ce93(0x188)](a49_0x2a41c6['dim'](_0xb1ce93(0x17a)))):console[_0xb1ce93(0x188)](a49_0x2a41c6['dim'](_0xb1ce93(0x1aa))),0x0;}if(_0x49e10c===_0xb1ce93(0x199)){const _0x493a1e=getSessionID(_0x464159['session']);return saveSessionContext({'site':_0x518b22},_0x464159[_0xb1ce93(0x1ad)]),console[_0xb1ce93(0x188)](_0xb1ce93(0x19b)+a49_0x2a41c6[_0xb1ce93(0x192)](_0x518b22)+'\x20'+a49_0x2a41c6[_0xb1ce93(0x1bd)](_0xb1ce93(0x196)+_0x493a1e+')')),console[_0xb1ce93(0x188)](a49_0x2a41c6[_0xb1ce93(0x1bd)]('\x0aTip:\x20Use\x20\x27tdx\x20use\x20--default\x20site\x20'+_0x518b22+_0xb1ce93(0x178))),0x0;}if(_0x49e10c===_0xb1ce93(0x195)){if(!profileExists(_0x518b22))return console[_0xb1ce93(0x1a1)]('Error:\x20Profile\x20\x27'+_0x518b22+'\x27\x20does\x20not\x20exist'),console[_0xb1ce93(0x1a1)]('\x0aUse\x20\x27tdx\x20profiles\x27\x20to\x20see\x20available\x20profiles'),0x1;const _0xea42e6=getSessionID(_0x464159[_0xb1ce93(0x1ad)]);return saveSessionContext({'profile':_0x518b22},_0x464159[_0xb1ce93(0x1ad)]),console['log']('Session\x20profile\x20set\x20to:\x20'+a49_0x2a41c6[_0xb1ce93(0x192)](_0x518b22)+'\x20'+a49_0x2a41c6[_0xb1ce93(0x1bd)](_0xb1ce93(0x196)+_0xea42e6+')')),console['log'](a49_0x2a41c6['dim'](_0xb1ce93(0x1a8)+_0x518b22+'\x27\x20to\x20save\x20permanently')),0x0;}const _0xfe89a1={},_0x469a63=getSessionID(_0x464159[_0xb1ce93(0x1ad)]);switch(_0x49e10c){case _0xb1ce93(0x19f):_0xfe89a1[_0xb1ce93(0x19f)]=_0x518b22,console[_0xb1ce93(0x188)](_0xb1ce93(0x191)+a49_0x2a41c6['green'](_0x518b22)+'\x20'+a49_0x2a41c6[_0xb1ce93(0x1bd)](_0xb1ce93(0x196)+_0x469a63+')'));break;case _0xb1ce93(0x175):_0xfe89a1[_0xb1ce93(0x175)]=_0x518b22,console[_0xb1ce93(0x188)](_0xb1ce93(0x18d)+a49_0x2a41c6[_0xb1ce93(0x192)](_0x518b22)+'\x20'+a49_0x2a41c6[_0xb1ce93(0x1bd)](_0xb1ce93(0x196)+_0x469a63+')'));break;case _0xb1ce93(0x1b0):_0xfe89a1[_0xb1ce93(0x1b0)]=_0x518b22,console[_0xb1ce93(0x188)](_0xb1ce93(0x184)+a49_0x2a41c6['green'](_0x518b22)+'\x20'+a49_0x2a41c6['dim'](_0xb1ce93(0x196)+_0x469a63+')'));break;case _0xb1ce93(0x18b):{const {projectName:_0x2bb624,agentName:_0x3b771a}=parseAgentRef(_0x518b22);_0x3b771a?(_0xfe89a1[_0xb1ce93(0x1b0)]=_0x2bb624,_0xfe89a1[_0xb1ce93(0x1ba)]=_0x3b771a,console[_0xb1ce93(0x188)](_0xb1ce93(0x184)+a49_0x2a41c6[_0xb1ce93(0x192)](_0x2bb624)+'\x20'+a49_0x2a41c6[_0xb1ce93(0x1bd)]('(session:\x20'+_0x469a63+')')),console[_0xb1ce93(0x188)](_0xb1ce93(0x1a0)+a49_0x2a41c6[_0xb1ce93(0x192)](_0x3b771a)+'\x20'+a49_0x2a41c6[_0xb1ce93(0x1bd)](_0xb1ce93(0x196)+_0x469a63+')'))):(_0xfe89a1[_0xb1ce93(0x1ba)]=_0x518b22,console['log'](_0xb1ce93(0x1a0)+a49_0x2a41c6[_0xb1ce93(0x192)](_0x518b22)+'\x20'+a49_0x2a41c6['dim'](_0xb1ce93(0x196)+_0x469a63+')')));break;}case _0xb1ce93(0x1b7):{try{await withSpinner(_0xb1ce93(0x1ae)+_0x518b22+_0xb1ce93(0x1b5),()=>_0x141963[_0xb1ce93(0x183)][_0xb1ce93(0x1c3)][_0xb1ce93(0x185)](_0x518b22));}catch(_0x196888){if(_0x196888 instanceof SDKError&&(_0x196888['code']===ErrorCode[_0xb1ce93(0x1c4)]||_0x196888[_0xb1ce93(0x1a9)]===ErrorCode['INVALID_ARGUMENT']))return console[_0xb1ce93(0x1a1)]('Error:\x20'+_0x196888[_0xb1ce93(0x1c1)]),console[_0xb1ce93(0x1a1)](_0xb1ce93(0x181)),0x1;throw _0x196888;}_0xfe89a1[_0xb1ce93(0x1b7)]=_0x518b22,console[_0xb1ce93(0x188)](_0xb1ce93(0x173)+a49_0x2a41c6[_0xb1ce93(0x192)](_0x518b22)+'\x20'+a49_0x2a41c6[_0xb1ce93(0x1bd)](_0xb1ce93(0x196)+_0x469a63+')'));break;}}return saveSessionContext(_0xfe89a1,_0x464159['session']),console['log'](a49_0x2a41c6[_0xb1ce93(0x1bd)](_0xb1ce93(0x1b9))),0x0;}catch(_0x48933f){return _0x48933f instanceof Error&&console[_0xb1ce93(0x1a1)](_0xb1ce93(0x1b4)+_0x48933f[_0xb1ce93(0x1c1)]),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
- const a50_0xbc3699=a50_0xff98;(function(_0x38b9b7,_0x3bc12a){const _0x45ff41=a50_0xff98,_0x3ae1d3=_0x38b9b7();while(!![]){try{const _0x195ef3=-parseInt(_0x45ff41(0x161))/0x1*(parseInt(_0x45ff41(0x162))/0x2)+parseInt(_0x45ff41(0x156))/0x3+parseInt(_0x45ff41(0x172))/0x4+parseInt(_0x45ff41(0x169))/0x5*(-parseInt(_0x45ff41(0x168))/0x6)+parseInt(_0x45ff41(0x164))/0x7*(parseInt(_0x45ff41(0x16c))/0x8)+parseInt(_0x45ff41(0x16e))/0x9+-parseInt(_0x45ff41(0x15b))/0xa;if(_0x195ef3===_0x3bc12a)break;else _0x3ae1d3['push'](_0x3ae1d3['shift']());}catch(_0x11aa41){_0x3ae1d3['push'](_0x3ae1d3['shift']());}}}(a50_0x3a2d,0xaf672));import{BaseCommand}from'./command.js';function a50_0xff98(_0x5dbb71,_0x397f95){_0x5dbb71=_0x5dbb71-0x14f;const _0x3a2dbd=a50_0x3a2d();let _0xff9864=_0x3a2dbd[_0x5dbb71];return _0xff9864;}function a50_0x3a2d(){const _0x3f03f3=['length','21lWPlZr','Fetching\x20user\x20info...','execute','account_owner','7176066UJHUMS','5PlrhOf','cause','list','3218888PdgwpZ','log','9974412VypHHK','email','List\x20all\x20users\x20in\x20the\x20account','error','2814352OOrZwg','user','message','\x20\x20Cause:\x20','👤\x20','\x20(admin)','Show\x20current\x20user\x20information','verbose','3821889tmwmKC','sort','getCurrent','Listing\x20users...','Unknown','22631030VcxFuT','description','yellow','Error:\x20','administrator','name','2BNyara','115338kXKIku'];a50_0x3a2d=function(){return _0x3f03f3;};return a50_0x3a2d();}import{SDKError}from'../sdk/index.js';import{handleSDKOutput,handleSingleObjectOutput,isStructuredFormat}from'../core/command-output.js';import{withSpinner}from'../utils/spinner.js';import a50_0x59b991 from'chalk';export class UserCommand extends BaseCommand{[a50_0xbc3699(0x160)]=a50_0xbc3699(0x14f);[a50_0xbc3699(0x15c)]=a50_0xbc3699(0x154);async['execute'](_0x31ceb3){const _0x508804=a50_0xbc3699,{options:_0x3bedfc,tdx:_0x4483ac}=_0x31ceb3;try{const _0x421edb=await withSpinner(_0x508804(0x165),()=>_0x4483ac['user'][_0x508804(0x158)](),{'verbose':_0x3bedfc[_0x508804(0x155)]}),_0x5670da=_0x421edb['data'];return await handleSingleObjectOutput(_0x5670da,_0x3bedfc),0x0;}catch(_0x34abbb){if(_0x34abbb instanceof SDKError)return console[_0x508804(0x171)](_0x508804(0x15e)+_0x34abbb[_0x508804(0x150)]),_0x34abbb[_0x508804(0x16a)]&&console[_0x508804(0x171)](_0x508804(0x151)+_0x34abbb[_0x508804(0x16a)]),0x1;throw _0x34abbb;}}}export class UserListCommand extends BaseCommand{[a50_0xbc3699(0x160)]='user\x20list';[a50_0xbc3699(0x15c)]=a50_0xbc3699(0x170);async[a50_0xbc3699(0x166)](_0x51b395){const _0x40f960=a50_0xbc3699,{options:_0x1fa7a0,tdx:_0x5aaa4e}=_0x51b395;try{const _0x55753c=await withSpinner(_0x40f960(0x159),()=>_0x5aaa4e[_0x40f960(0x14f)][_0x40f960(0x16b)](),{'verbose':_0x1fa7a0[_0x40f960(0x155)]}),_0x43892e=_0x55753c['data'];console['error']('✔\x20Found\x20'+_0x43892e[_0x40f960(0x163)]+'\x20user'+(_0x43892e[_0x40f960(0x163)]!==0x1?'s':''));if(isStructuredFormat(_0x1fa7a0))await handleSDKOutput(_0x43892e,_0x1fa7a0);else{const _0x1e5f23=[..._0x43892e][_0x40f960(0x157)]((_0x3df904,_0x5538f0)=>String(_0x3df904['name']??'')['localeCompare'](String(_0x5538f0['name']??'')));for(const _0xd19f35 of _0x1e5f23){const _0x2bb2d8=_0xd19f35[_0x40f960(0x167)]?a50_0x59b991[_0x40f960(0x15d)]('\x20(owner)'):_0xd19f35[_0x40f960(0x15f)]?a50_0x59b991[_0x40f960(0x15d)](_0x40f960(0x153)):'',_0x55a43c=_0xd19f35[_0x40f960(0x16f)]&&_0xd19f35[_0x40f960(0x16f)]!==_0xd19f35[_0x40f960(0x160)]?a50_0x59b991['dim']('\x20<'+_0xd19f35[_0x40f960(0x16f)]+'>'):'';console[_0x40f960(0x16d)](_0x40f960(0x152)+(_0xd19f35['name']??_0x40f960(0x15a))+_0x55a43c+_0x2bb2d8);}}return 0x0;}catch(_0x33cddc){if(_0x33cddc instanceof SDKError)return console[_0x40f960(0x171)](_0x40f960(0x15e)+_0x33cddc['message']),_0x33cddc[_0x40f960(0x16a)]&&console['error'](_0x40f960(0x151)+_0x33cddc[_0x40f960(0x16a)]),0x1;throw _0x33cddc;}}}
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;}}}