@treasuredata/tdx 2026.3.11 → 2026.3.12

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_0x382340=a40_0x33a0;(function(_0x513d02,_0x468a24){const _0x4651fa=a40_0x33a0,_0xe02a61=_0x513d02();while(!![]){try{const _0x3e12fd=-parseInt(_0x4651fa(0x175))/0x1*(-parseInt(_0x4651fa(0x178))/0x2)+-parseInt(_0x4651fa(0x176))/0x3+-parseInt(_0x4651fa(0x17a))/0x4+parseInt(_0x4651fa(0x17d))/0x5*(-parseInt(_0x4651fa(0x180))/0x6)+-parseInt(_0x4651fa(0x185))/0x7*(parseInt(_0x4651fa(0x193))/0x8)+-parseInt(_0x4651fa(0x177))/0x9+parseInt(_0x4651fa(0x16d))/0xa;if(_0x3e12fd===_0x468a24)break;else _0xe02a61['push'](_0xe02a61['shift']());}catch(_0x60b226){_0xe02a61['push'](_0xe02a61['shift']());}}}(a40_0x6bea,0x32c48));import{BaseCommand}from'./command.js';import{handleSDKOutput}from'../core/command-output.js';import{withSpinner}from'../utils/spinner.js';function a40_0x6bea(){const _0x29af4d=['\x20\x20tdx\x20segment\x20update\x20\x22High\x20Value\x22\x20--rule\x20\x27...\x27\x20\x20#\x20Relative\x20to\x20context','verbose','includes','Error:\x20Cannot\x20update\x20','segment','.\x20Only\x20child\x20segments\x20can\x20be\x20updated.','yellow','Resolving\x20path\x20\x27','⚠\x20Deprecation\x20warning:\x20`segment\x20update`\x20is\x20deprecated.','type','8fNkaez','Parent\x20ID:\x20','Resolved\x20folder\x20ID:\x20','Segment\x20ID:\x20','Examples:','execute','\x20\x20\x20Path:\x20','data','9804730IliSsk','name','Error:\x20Segment\x20path\x20or\x20name\x20is\x20required','segmentId','\x20\x20tdx\x20segment\x20update\x20\x22My\x20Audience/High\x20Value\x22\x20--description\x20\x22...\x22','error','Resolving\x20folder\x20\x27','segmentPath','1rQZmgC','1197417WDEMCP','1807308kPoDOI','731996tOJSJE','segment:update','570500vLZLaw','\x27...','folder','1105960mrEFMw','Segment\x20ID\x20missing\x20from\x20resolved\x20path','description','6ZFVAgX','\x20\x20Use\x20`tdx\x20sg\x20push`\x20with\x20YAML\x20files\x20instead.\x0a','✔\x20Updated\x20segment\x20\x27','resolvePathToResource','resolveFolderId','1223313CskGLt','Use:\x20tdx\x20segment\x20update\x20<path_to_segment>\x20[options]','Resolved\x20type:\x20','parentId'];a40_0x6bea=function(){return _0x29af4d;};return a40_0x6bea();}import{loadJSONFromOptions}from'../utils/json-loader.js';import{SDKError,ErrorCode}from'../sdk/index.js';function a40_0x33a0(_0x5979fb,_0x1e03f5){_0x5979fb=_0x5979fb-0x16b;const _0x6bea0b=a40_0x6bea();let _0x33a0de=_0x6bea0b[_0x5979fb];return _0x33a0de;}import a40_0x549126 from'chalk';export class SegmentUpdateCommand extends BaseCommand{[a40_0x382340(0x16e)]=a40_0x382340(0x179);[a40_0x382340(0x17f)]='Update\x20existing\x20child\x20segment';async[a40_0x382340(0x198)](_0x121fda){const _0x22a38d=a40_0x382340;console[_0x22a38d(0x172)](a40_0x549126['yellow'](_0x22a38d(0x191))),console[_0x22a38d(0x172)](a40_0x549126[_0x22a38d(0x18f)](_0x22a38d(0x181)));const {options:_0x192094,args:_0x55aa9e,tdx:_0x35c001}=_0x121fda,_0x3f215e=_0x192094;if(_0x55aa9e['length']===0x0)return console['error'](_0x22a38d(0x16f)),console[_0x22a38d(0x172)]('Usage:\x20tdx\x20segment\x20update\x20<path>\x20[options]'),console[_0x22a38d(0x172)](_0x22a38d(0x197)),console[_0x22a38d(0x172)](_0x22a38d(0x171)),console[_0x22a38d(0x172)](_0x22a38d(0x189)),0x1;const _0x1044c7=_0x55aa9e[0x0],_0x34869b=_0x192094[_0x22a38d(0x174)];let _0x2f9e82=_0x1044c7;_0x34869b&&!_0x1044c7[_0x22a38d(0x18b)]('/')&&(_0x2f9e82=_0x34869b+'/'+_0x1044c7,_0x3f215e[_0x22a38d(0x18a)]&&console[_0x22a38d(0x172)]('Resolved\x20relative\x20path\x20to:\x20'+_0x2f9e82));const _0x1cbdd3=await withSpinner(_0x22a38d(0x190)+_0x2f9e82+_0x22a38d(0x17b),()=>_0x35c001[_0x22a38d(0x18d)][_0x22a38d(0x183)](_0x2f9e82),{'verbose':_0x3f215e['verbose']}),_0x18fea3=_0x1cbdd3[_0x22a38d(0x16c)];_0x3f215e[_0x22a38d(0x18a)]&&console['error'](_0x22a38d(0x187)+_0x18fea3[_0x22a38d(0x192)]);if(_0x18fea3['type']!=='segment')return console['error'](_0x22a38d(0x18c)+_0x18fea3[_0x22a38d(0x192)]+_0x22a38d(0x18e)),console[_0x22a38d(0x172)](_0x22a38d(0x186)),0x1;if(!_0x18fea3[_0x22a38d(0x170)])throw new SDKError(ErrorCode['INTERNAL'],_0x22a38d(0x17e));const _0x450f2d=_0x18fea3[_0x22a38d(0x188)],_0x470e51=_0x18fea3[_0x22a38d(0x170)];_0x3f215e[_0x22a38d(0x18a)]&&(console[_0x22a38d(0x172)](_0x22a38d(0x194)+_0x450f2d),console[_0x22a38d(0x172)](_0x22a38d(0x196)+_0x470e51));let _0x453f28;if(_0x3f215e[_0x22a38d(0x17c)]){const _0x8e6929=_0x3f215e[_0x22a38d(0x17c)],_0x26eab2=await withSpinner(_0x22a38d(0x173)+_0x8e6929+_0x22a38d(0x17b),()=>_0x35c001['segment'][_0x22a38d(0x184)](_0x450f2d,_0x8e6929),{'verbose':_0x3f215e[_0x22a38d(0x18a)]});_0x453f28=parseInt(_0x26eab2['data'],0xa),_0x3f215e[_0x22a38d(0x18a)]&&console[_0x22a38d(0x172)](_0x22a38d(0x195)+_0x453f28);}const _0x588513=await loadJSONFromOptions(_0x3f215e['rule'],_0x3f215e['ruleFile']),_0x44150d={'name':_0x3f215e[_0x22a38d(0x16e)],'description':_0x3f215e['description'],'rule':_0x588513,'kind':_0x3f215e['kind']!==undefined?parseInt(_0x3f215e['kind'],0xa):undefined,'segmentFolderId':_0x453f28},_0x6090d2=await withSpinner('Updating\x20segment\x20\x27'+_0x18fea3['segmentName']+_0x22a38d(0x17b),()=>_0x35c001[_0x22a38d(0x18d)]['updateSegmentById'](_0x450f2d,_0x470e51,_0x44150d),{'verbose':_0x3f215e['verbose']}),_0x53ac6b=_0x6090d2[_0x22a38d(0x16c)];return console[_0x22a38d(0x172)](_0x22a38d(0x182)+_0x53ac6b['name']+'\x27'),_0x2f9e82!==_0x1044c7&&console[_0x22a38d(0x172)](_0x22a38d(0x16b)+_0x2f9e82),await handleSDKOutput([_0x53ac6b],_0x3f215e),0x0;}}
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 +1 @@
1
- function a41_0x50da(_0x22ef80,_0xca084f){_0x22ef80=_0x22ef80-0xfe;const _0x4320d3=a41_0x4320();let _0x50da96=_0x4320d3[_0x22ef80];return _0x50da96;}const a41_0x3ce7cd=a41_0x50da;(function(_0x378ab2,_0x1ddaf2){const _0x20fe3b=a41_0x50da,_0x16be5e=_0x378ab2();while(!![]){try{const _0x166331=-parseInt(_0x20fe3b(0x128))/0x1*(parseInt(_0x20fe3b(0x139))/0x2)+-parseInt(_0x20fe3b(0x10f))/0x3*(parseInt(_0x20fe3b(0x126))/0x4)+parseInt(_0x20fe3b(0x10e))/0x5*(-parseInt(_0x20fe3b(0x12e))/0x6)+-parseInt(_0x20fe3b(0x118))/0x7+-parseInt(_0x20fe3b(0x12a))/0x8+-parseInt(_0x20fe3b(0x114))/0x9*(-parseInt(_0x20fe3b(0x116))/0xa)+parseInt(_0x20fe3b(0x121))/0xb;if(_0x166331===_0x1ddaf2)break;else _0x16be5e['push'](_0x16be5e['shift']());}catch(_0xed4e43){_0x16be5e['push'](_0x16be5e['shift']());}}}(a41_0x4320,0xb2dbf));function a41_0x4320(){const _0x58b847=['folderPath','type','parentId','\x27...','Context\x20can\x20only\x20be\x20set\x20to\x20a\x20parent\x20segment\x20or\x20folder.','Resolved\x20path\x20type:\x20','verbose','Resolving\x20path\x20\x27','Use:\x20tdx\x20segment\x20use\x20','parent_segment','segments','join','✔\x20Context\x20set\x20to:\x20','folderId','segment','Use\x20\x22tdx\x20use\x22\x20to\x20see\x20all\x20context\x20parameters','green','2987905JAfVOS','3qEpCfy','error','Error:\x20No\x20context\x20set.\x20Cannot\x20use\x20relative\x20path.','name','Parent\x20ID:\x20','129213tctGEG','Site:\x20','570VfeuZX','isDirectory','1018465cIieIH','config','length','Error:\x20Cannot\x20set\x20context\x20to\x20a\x20segment.','split','Target\x20path:\x20','Error:\x20Path\x20is\x20required\x0a','dim','Resolved\x20relative\x20path\x20to:\x20','29246767Qinvny','✔\x20Context\x20cleared.\x20Back\x20to\x20root.','Usage:\x20tdx\x20segment\x20use\x20<path>','segment:use','red','4589228ThEuhz','Set\x20current\x20segment/folder\x20context\x20for\x20navigation','117454WNqVsT','\x20\x20tdx\x20segment\x20use\x20..\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Go\x20to\x20parent','4953984QDmhfv','cyan','Use\x20an\x20absolute\x20path\x20or\x20set\x20context\x20with:\x20tdx\x20segment\x20use\x20<parent_name>','Folder\x20ID:\x20','6itoLRs','slice','Use\x20\x22tdx\x20segments\x22\x20to\x20list\x20contents\x20in\x20this\x20context','isAbsolute','log','site','Tip:\x20Run\x20`tdx\x20sg\x20pull\x20<parent_name>`\x20first\x20to\x20create\x20the\x20folder\x20structure','fullPath','description','\x20\x20tdx\x20segment\x20use\x20/\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Clear\x20context','Error:\x20No\x20tdx.json\x20found\x20in\x20or\x20above:\x20','4tLhaUU','Examples:'];a41_0x4320=function(){return _0x58b847;};return a41_0x4320();}import{existsSync,statSync}from'fs';import a41_0x37f1e9 from'chalk';import{BaseCommand}from'./command.js';import{saveSessionContext}from'../core/session.js';import{withSpinner}from'../utils/spinner.js';import{parsePath,normalizePath}from'../sdk/segment/segment-path-parser.js';import{findTdxConfig}from'../sdk/segment/tdx-config.js';export class SegmentUseCommand extends BaseCommand{[a41_0x3ce7cd(0x112)]=a41_0x3ce7cd(0x124);[a41_0x3ce7cd(0x136)]=a41_0x3ce7cd(0x127);async['execute'](_0x17f729){const _0x466a0c=a41_0x3ce7cd,{options:_0x47999e,args:_0x5ed076,tdx:_0x1b4eb3}=_0x17f729;if(_0x5ed076[_0x466a0c(0x11a)]===0x0)return console[_0x466a0c(0x110)](a41_0x37f1e9[_0x466a0c(0x125)](_0x466a0c(0x11e))),console['error'](_0x466a0c(0x123)),console['error'](_0x466a0c(0x13a)),console[_0x466a0c(0x110)]('\x20\x20tdx\x20segment\x20use\x20\x22My\x20Audience\x22'),console[_0x466a0c(0x110)]('\x20\x20tdx\x20segment\x20use\x20\x22My\x20Audience/Marketing\x22'),console[_0x466a0c(0x110)](_0x466a0c(0x137)),console[_0x466a0c(0x110)](_0x466a0c(0x129)),0x1;const _0xe7c9f4=_0x5ed076[0x0],_0x156d72=_0x47999e['session'];try{if(_0xe7c9f4==='/')return saveSessionContext({'segment_path':undefined},_0x156d72),console['log'](a41_0x37f1e9[_0x466a0c(0x10d)](_0x466a0c(0x122))),0x0;if(existsSync(_0xe7c9f4)&&statSync(_0xe7c9f4)[_0x466a0c(0x117)]()){let _0x3c48d2;try{_0x3c48d2=findTdxConfig(_0xe7c9f4);}catch{return console[_0x466a0c(0x110)](a41_0x37f1e9[_0x466a0c(0x125)](_0x466a0c(0x138)+_0xe7c9f4)),console[_0x466a0c(0x110)](a41_0x37f1e9[_0x466a0c(0x12b)](_0x466a0c(0x134))),0x1;}const _0xccd45f=_0x3c48d2[_0x466a0c(0x119)][_0x466a0c(0x106)];return saveSessionContext({'segment_path':_0xccd45f,'parent_segment':_0xccd45f},_0x156d72),console[_0x466a0c(0x132)](a41_0x37f1e9[_0x466a0c(0x10d)]('✔\x20Context\x20set\x20to:\x20'+a41_0x37f1e9[_0x466a0c(0x12b)](_0xccd45f))),0x0;}const _0x2b3835=_0x47999e['segmentPath'];let _0x225194=_0xe7c9f4;const _0x2c2839=parsePath(_0xe7c9f4);if(!_0x2c2839[_0x466a0c(0x131)]){if(!_0x2b3835)return console['error'](a41_0x37f1e9[_0x466a0c(0x125)](_0x466a0c(0x111))),console[_0x466a0c(0x110)](a41_0x37f1e9[_0x466a0c(0x12b)](_0x466a0c(0x12c))),0x1;if(_0xe7c9f4==='..'){const _0x4e0494=_0x2b3835[_0x466a0c(0x11c)]('/')[_0x466a0c(0x12f)](0x0,-0x1)[_0x466a0c(0x108)]('/');_0x225194=_0x4e0494||'/';}else _0xe7c9f4==='.'?_0x225194=_0x2b3835:_0x225194=_0x2b3835+'/'+_0xe7c9f4;_0x47999e['verbose']&&console['error'](_0x466a0c(0x120)+_0x225194);}if(_0x225194==='/'||_0x225194==='')return saveSessionContext({'segment_path':undefined},_0x156d72),console[_0x466a0c(0x132)](a41_0x37f1e9[_0x466a0c(0x10d)](_0x466a0c(0x122))),0x0;_0x225194=normalizePath(_0x225194);const _0x52d721=parsePath(_0x225194)[_0x466a0c(0x107)];if(_0x52d721[_0x466a0c(0x11a)]===0x0)return saveSessionContext({'segment_path':undefined},_0x156d72),console[_0x466a0c(0x132)](a41_0x37f1e9['green']('✔\x20Context\x20cleared.\x20Back\x20to\x20root.')),0x0;_0x47999e[_0x466a0c(0x103)]&&(console[_0x466a0c(0x110)](_0x466a0c(0x115)+_0x47999e[_0x466a0c(0x133)]),console['error'](_0x466a0c(0x11d)+_0x225194));const _0x44a160=await withSpinner(_0x466a0c(0x104)+_0x225194+_0x466a0c(0x100),()=>_0x1b4eb3[_0x466a0c(0x10b)]['resolvePathToResource'](_0x225194),{'verbose':_0x47999e[_0x466a0c(0x103)]}),_0x1d72c8=_0x44a160['data'];_0x47999e['verbose']&&(console[_0x466a0c(0x110)](_0x466a0c(0x102)+_0x1d72c8['type']),console[_0x466a0c(0x110)](_0x466a0c(0x113)+_0x1d72c8[_0x466a0c(0xff)]),_0x1d72c8[_0x466a0c(0x10a)]&&console[_0x466a0c(0x110)](_0x466a0c(0x12d)+_0x1d72c8[_0x466a0c(0x10a)]));if(_0x1d72c8[_0x466a0c(0xfe)]===_0x466a0c(0x10b))return console[_0x466a0c(0x110)](a41_0x37f1e9[_0x466a0c(0x125)](_0x466a0c(0x11b))),console[_0x466a0c(0x110)](_0x466a0c(0x101)),console[_0x466a0c(0x110)](a41_0x37f1e9[_0x466a0c(0x12b)](_0x466a0c(0x105)+_0x1d72c8['parentName']+(_0x1d72c8[_0x466a0c(0x13b)]?'/'+_0x1d72c8[_0x466a0c(0x13b)][_0x466a0c(0x108)]('/'):''))),0x1;return saveSessionContext({'segment_path':_0x1d72c8[_0x466a0c(0x135)],'parent_segment':_0x1d72c8['parentName']},_0x156d72),console['log'](a41_0x37f1e9['green'](_0x466a0c(0x109)+a41_0x37f1e9[_0x466a0c(0x12b)](_0x1d72c8[_0x466a0c(0x135)]))),_0x47999e['verbose']&&(console['error'](a41_0x37f1e9[_0x466a0c(0x11f)](_0x466a0c(0x130))),console[_0x466a0c(0x110)](a41_0x37f1e9[_0x466a0c(0x11f)](_0x466a0c(0x10c)))),0x0;}catch(_0x40501b){throw _0x40501b;}}}
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 +1 @@
1
- const a42_0x5033a2=a42_0x586d;(function(_0x41d9b3,_0x540fa9){const _0x32ac0d=a42_0x586d,_0x5e9c08=_0x41d9b3();while(!![]){try{const _0x482d52=parseInt(_0x32ac0d(0x120))/0x1*(-parseInt(_0x32ac0d(0x13e))/0x2)+-parseInt(_0x32ac0d(0x10e))/0x3+parseInt(_0x32ac0d(0x118))/0x4+parseInt(_0x32ac0d(0x114))/0x5+parseInt(_0x32ac0d(0x135))/0x6*(parseInt(_0x32ac0d(0x123))/0x7)+parseInt(_0x32ac0d(0x113))/0x8*(parseInt(_0x32ac0d(0x11c))/0x9)+-parseInt(_0x32ac0d(0x10f))/0xa*(parseInt(_0x32ac0d(0x134))/0xb);if(_0x482d52===_0x540fa9)break;else _0x5e9c08['push'](_0x5e9c08['shift']());}catch(_0x36238a){_0x5e9c08['push'](_0x5e9c08['shift']());}}}(a42_0xc457,0x540b4));import{BaseCommand}from'./command.js';function a42_0x586d(_0xd66990,_0x475b28){_0xd66990=_0xd66990-0x10b;const _0xc45768=a42_0xc457();let _0x586d41=_0xc45768[_0xd66990];return _0x586d41;}import{resolveTarget,isSuccessfulResolution}from'../sdk/segment/target-resolution.js';import{findYamlFiles}from'../sdk/segment/file-discovery.js';function a42_0xc457(){const _0x4a31a2=['Error:\x20','targetDir','invalidCount','Validation\x20failed:\x20','red','yellow','dim','869JMnxQB','1591314qdoiEE','errors','Validate\x20segment\x20and\x20journey\x20YAML\x20files','Usage:\x20tdx\x20sg\x20validate\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Validate\x20all\x20(requires\x20context)','\x20file(s)\x20with\x20errors,\x20','.yml','Error:\x20File\x20must\x20have\x20.yml\x20or\x20.yaml\x20extension:\x20','name','Error:\x20No\x20YAML\x20files\x20found\x20in\x20','232618UYPrEO','validCount','\x20error(s)','✔\x20All\x20','parent_segment\x20is\x20not\x20set.\x20Use\x20`tdx\x20sg\x20use\x20<parent_name>`\x20to\x20set\x20it.\x0a','279207GLcfPR','39910qLvxUI','length','valid','verbose','32DmPrFj','288905dJoAch','\x20warning(s)\x20found','execute','.yaml','1844636dJRFjG','message','segment:validate','error','190692whYrgQ','parentSegment','warnings','\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','1yHlmlf','\x20file(s)\x20valid','log','7BTDuUB','helpText','description','type','errorCode','green','warningCount','\x20valid','cyan','\x20warning(s)'];a42_0xc457=function(){return _0x4a31a2;};return a42_0xc457();}import{existsSync}from'fs';import a42_0x2235f8 from'chalk';import{formatValidationResult}from'../sdk/segment/yaml-validator.js';import{validateYamlFiles,isValidationResult,calculateSummary}from'../sdk/segment/validate-files.js';export class SegmentValidateCommand extends BaseCommand{[a42_0x5033a2(0x13c)]=a42_0x5033a2(0x11a);[a42_0x5033a2(0x125)]=a42_0x5033a2(0x137);async[a42_0x5033a2(0x116)](_0x134d33){const _0x428b6f=a42_0x5033a2,{options:_0x5ea082,args:_0x414ff1}=_0x134d33,_0x423118=_0x5ea082,_0x1020d2=await resolveTarget({'arg':_0x414ff1[0x0],'contextParent':_0x5ea082[_0x428b6f(0x11d)],'cwd':process['cwd']()});if(!isSuccessfulResolution(_0x1020d2))return _0x1020d2[_0x428b6f(0x127)]==='no_parent'?(console[_0x428b6f(0x11b)](a42_0x2235f8['yellow'](_0x428b6f(0x10d))),console['error'](_0x428b6f(0x138)),console[_0x428b6f(0x11b)](_0x428b6f(0x11f)),console['error']('\x20\x20\x20\x20\x20\x20\x20tdx\x20sg\x20validate\x20<file_path>\x20\x20#\x20Validate\x20specific\x20file')):(console[_0x428b6f(0x11b)](a42_0x2235f8[_0x428b6f(0x131)](_0x428b6f(0x12d)+_0x1020d2[_0x428b6f(0x119)]+'\x0a')),_0x1020d2[_0x428b6f(0x124)]&&console[_0x428b6f(0x11b)](a42_0x2235f8[_0x428b6f(0x12b)](_0x1020d2['helpText']))),0x1;const _0x48d938=_0x1020d2[_0x428b6f(0x12e)],_0x4f3c2b=_0x1020d2[_0x428b6f(0x126)]==='file'?_0x1020d2['filePath']:undefined;if(!_0x4f3c2b&&!existsSync(_0x48d938))return console[_0x428b6f(0x11b)](a42_0x2235f8[_0x428b6f(0x131)]('Error:\x20Directory\x20not\x20found:\x20'+_0x48d938+'\x0a')),0x1;let _0x3c4322;if(_0x4f3c2b){if(!_0x4f3c2b['endsWith'](_0x428b6f(0x13a))&&!_0x4f3c2b['endsWith'](_0x428b6f(0x117)))return console[_0x428b6f(0x11b)](a42_0x2235f8[_0x428b6f(0x131)](_0x428b6f(0x13b)+_0x4f3c2b+'\x0a')),0x1;_0x3c4322=[_0x4f3c2b];}else _0x3c4322=findYamlFiles(_0x48d938);if(_0x3c4322[_0x428b6f(0x110)]===0x0)return console[_0x428b6f(0x11b)](a42_0x2235f8[_0x428b6f(0x131)](_0x428b6f(0x13d)+_0x48d938+'\x0a')),0x1;const _0xdde567=validateYamlFiles(_0x3c4322,_0x48d938),_0x30e31b=calculateSummary(_0xdde567);for(const _0x1a7436 of _0xdde567){if(!isValidationResult(_0x1a7436))continue;const {relativePath:_0x5952aa,source:_0x2c6b4f,result:_0x506e16,fileType:_0x59ef84}=_0x1a7436,_0x1c0234=_0x59ef84;if(_0x506e16[_0x428b6f(0x111)]&&_0x506e16[_0x428b6f(0x11e)]['length']===0x0)_0x423118[_0x428b6f(0x112)]&&console[_0x428b6f(0x122)](a42_0x2235f8['green']('✔\x20'+_0x5952aa)+a42_0x2235f8[_0x428b6f(0x133)]('\x20('+_0x1c0234+')'));else _0x506e16['valid']?(console[_0x428b6f(0x122)](a42_0x2235f8['yellow']('⚠\x20'+_0x5952aa)+a42_0x2235f8[_0x428b6f(0x133)]('\x20('+_0x1c0234+'):\x20'+_0x506e16[_0x428b6f(0x11e)]['length']+_0x428b6f(0x12c))),console[_0x428b6f(0x122)](formatValidationResult(_0x506e16,_0x2c6b4f,_0x5952aa))):(console[_0x428b6f(0x122)](a42_0x2235f8['red']('✖\x20'+_0x5952aa)+a42_0x2235f8['dim']('\x20('+_0x1c0234+'):\x20'+_0x506e16[_0x428b6f(0x136)][_0x428b6f(0x110)]+_0x428b6f(0x10b))),console[_0x428b6f(0x122)](formatValidationResult(_0x506e16,_0x2c6b4f,_0x5952aa)));}return console[_0x428b6f(0x122)](''),_0x30e31b['hasErrors']?(console[_0x428b6f(0x122)](a42_0x2235f8['red'](_0x428b6f(0x130)+_0x30e31b[_0x428b6f(0x12f)]+_0x428b6f(0x139)+_0x30e31b[_0x428b6f(0x13f)]+_0x428b6f(0x12a))),_0x30e31b[_0x428b6f(0x129)]>0x0&&console[_0x428b6f(0x122)](a42_0x2235f8[_0x428b6f(0x132)](_0x30e31b['warningCount']+'\x20warning(s)\x20found')),0x1):(console[_0x428b6f(0x122)](a42_0x2235f8[_0x428b6f(0x128)](_0x428b6f(0x10c)+_0x30e31b[_0x428b6f(0x13f)]+_0x428b6f(0x121))),_0x30e31b[_0x428b6f(0x129)]>0x0&&console[_0x428b6f(0x122)](a42_0x2235f8[_0x428b6f(0x132)](_0x30e31b[_0x428b6f(0x129)]+_0x428b6f(0x115))),0x0);}}
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 +1 @@
1
- const a43_0x2a00dc=a43_0x1705;(function(_0x184bf3,_0x50832f){const _0x1b364e=a43_0x1705,_0x30b604=_0x184bf3();while(!![]){try{const _0x368f1a=parseInt(_0x1b364e(0xc2))/0x1*(parseInt(_0x1b364e(0xde))/0x2)+parseInt(_0x1b364e(0xac))/0x3+-parseInt(_0x1b364e(0x92))/0x4+-parseInt(_0x1b364e(0xdc))/0x5+-parseInt(_0x1b364e(0xd5))/0x6+-parseInt(_0x1b364e(0xcb))/0x7*(-parseInt(_0x1b364e(0xb0))/0x8)+parseInt(_0x1b364e(0x9b))/0x9*(parseInt(_0x1b364e(0xa4))/0xa);if(_0x368f1a===_0x50832f)break;else _0x30b604['push'](_0x30b604['shift']());}catch(_0x17cb9d){_0x30b604['push'](_0x30b604['shift']());}}}(a43_0xed70,0xd01bb));function a43_0xed70(){const _0x596436=['segments','replace','\x20\x20Cause:\x20','jsonl','298wVurgm','map','dim','Resolving\x20path\x20\x27','message','/j/da','folder','error','\x20\x20tdx\x20sg\x20pull\x20\x22My\x20Audience\x22','7JZRigi','site','localeCompare','Use\x20tdx\x20ps\x20list\x20to\x20see\x20available\x20parent\x20segments.','format','Error:\x20No\x20parent\x20segment\x20context\x20set.','children',',\x20and\x20','Recursive\x20mode:\x20enabled','json','5353110VtvpAK','listUnified','segment','parentId','listRecursive','(not\x20set)','\x20\x20tdx\x20sg\x20use\x20\x22My\x20Audience\x22','4764165XAJrbY','filter','4054JnRFEa','verbose','name','2513664LJCQcS','sort','journeyBundleName','\x20matching\x20\x27','length','List\x20folders\x20and\x20child\x20segments','journey','description','Set\x20a\x20parent\x20segment\x20context\x20first:','16938dVkaRp',']\x20matching\x20\x27','✔\x20Found\x20','/app/ps/','\x5c$&','cause','✔\x20Built\x20tree\x20with\x20','test','resolvePathToResource','4790qzGoEk','listUnifiedWithJourneys','Folder\x20ID:\x20','\x27...','Building\x20hierarchy\x20tree...','listWithPattern','folders','Parent\x20segment\x20context:\x20','3646578PKSPOg','\x20folder','Error:\x20','\x20journey','4838360CJwtpR','data','Site:\x20','includes','Listing\x20folders,\x20segments,\x20and\x20journeys...','\x20segment','/e/','Parent\x20ID:\x20','log','journeys','type','maxDepth','folderId','(empty)'];a43_0xed70=function(){return _0x596436;};return a43_0xed70();}import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleSDKOutput}from'../core/command-output.js';function a43_0x1705(_0x563327,_0x59c88d){_0x563327=_0x563327-0x92;const _0xed7053=a43_0xed70();let _0x17054a=_0xed7053[_0x563327];return _0x17054a;}import{withSpinner}from'../utils/spinner.js';import{formatFlatList,formatTree}from'../sdk/util/tree-formatter.js';import{getConsoleNextUrl}from'../sdk/client/endpoints.js';import a43_0x148e1a from'chalk';export class SegmentsCommand extends BaseCommand{['name']=a43_0x2a00dc(0xbe);[a43_0x2a00dc(0x99)]=a43_0x2a00dc(0x97);async['execute'](_0x4742e6){const _0x40b75b=a43_0x2a00dc,{options:_0xf6c053,args:_0x2f3fbc}=_0x4742e6,_0x1883ef=_0xf6c053['recursive'],_0x2b0721=_0x2f3fbc[0x0];try{const _0x614644=_0xf6c053['parentSegment'];_0xf6c053[_0x40b75b(0xdf)]&&(console[_0x40b75b(0xc9)](_0x40b75b(0xb2)+_0xf6c053[_0x40b75b(0xcc)]),console[_0x40b75b(0xc9)](_0x40b75b(0xab)+(_0x614644||_0x40b75b(0xda))),_0x2b0721&&console[_0x40b75b(0xc9)]('Folder/pattern\x20arg:\x20'+_0x2b0721),_0x1883ef&&console[_0x40b75b(0xc9)](_0x40b75b(0xd3)));if(!_0x614644)return console[_0x40b75b(0xc9)](_0x40b75b(0xd0)),console[_0x40b75b(0xc9)](''),console[_0x40b75b(0xc9)](_0x40b75b(0x9a)),console['error'](_0x40b75b(0xca)),console[_0x40b75b(0xc9)](_0x40b75b(0xdb)),console[_0x40b75b(0xc9)](''),console[_0x40b75b(0xc9)](_0x40b75b(0xce)),0x1;const _0x55a4eb=_0x2b0721&&(_0x2b0721[_0x40b75b(0xb3)]('*')||_0x2b0721[_0x40b75b(0xb3)]('?'));if(_0x55a4eb)return await this[_0x40b75b(0xa9)](_0x4742e6,_0x614644,_0x2b0721);const _0x593f89=_0x2b0721?_0x614644+'/'+_0x2b0721:_0x614644;return _0x1883ef?await this['listRecursive'](_0x4742e6,_0x593f89):await this[_0x40b75b(0xd6)](_0x4742e6,_0x593f89);}catch(_0x507203){if(_0x507203 instanceof SDKError)return console[_0x40b75b(0xc9)](_0x40b75b(0xae)+_0x507203[_0x40b75b(0xc6)]),_0x507203[_0x40b75b(0xa0)]&&console[_0x40b75b(0xc9)](_0x40b75b(0xc0)+_0x507203[_0x40b75b(0xa0)]),0x1;throw _0x507203;}}async[a43_0x2a00dc(0xa9)](_0x3694c2,_0x23488a,_0xb36196){const _0x227f6b=a43_0x2a00dc,{options:_0x458d81,tdx:_0x33de37}=_0x3694c2,_0x55649d=await withSpinner('Resolving\x20parent\x20segment\x20\x27'+_0x23488a+_0x227f6b(0xa7),()=>_0x33de37[_0x227f6b(0xd7)][_0x227f6b(0xa3)](_0x23488a),{'verbose':_0x458d81['verbose']}),_0x495a31=_0x55649d[_0x227f6b(0xb1)],_0x49db27=await withSpinner('Listing\x20folders,\x20segments,\x20and\x20journeys...',()=>_0x33de37[_0x227f6b(0xd7)][_0x227f6b(0xa5)](_0x495a31[_0x227f6b(0xd8)],_0x495a31[_0x227f6b(0xbc)]),{'verbose':_0x458d81['verbose']}),{folders:_0x5c2b2c,segments:_0x3e369d,journeys:_0x452a04}=_0x49db27[_0x227f6b(0xb1)],_0x3ab4be=_0xb36196[_0x227f6b(0xbf)](/[.+^${}()|[\]\\]/g,_0x227f6b(0x9f))[_0x227f6b(0xbf)](/\*/g,'.*')[_0x227f6b(0xbf)](/\?/g,'.'),_0xfa06f2=new RegExp('^'+_0x3ab4be+'$','i'),_0x1127e5=_0x5c2b2c['filter'](_0x42177b=>_0xfa06f2[_0x227f6b(0xa2)](_0x42177b[_0x227f6b(0xe0)])),_0x468a2b=_0x3e369d[_0x227f6b(0xdd)](_0x1b95ef=>_0xfa06f2[_0x227f6b(0xa2)](_0x1b95ef[_0x227f6b(0xe0)])),_0x380a28=_0x452a04[_0x227f6b(0xdd)](_0x5905b7=>_0xfa06f2[_0x227f6b(0xa2)](_0x5905b7[_0x227f6b(0x94)])),_0x5a2fb4=_0x1127e5['length']+_0x468a2b[_0x227f6b(0x96)]+_0x380a28[_0x227f6b(0x96)];console[_0x227f6b(0xc9)](_0x227f6b(0x9d)+_0x1127e5[_0x227f6b(0x96)]+'\x20folder'+(_0x1127e5[_0x227f6b(0x96)]!==0x1?'s':'')+',\x20'+_0x468a2b[_0x227f6b(0x96)]+_0x227f6b(0xb5)+(_0x468a2b[_0x227f6b(0x96)]!==0x1?'s':'')+_0x227f6b(0xd2)+_0x380a28[_0x227f6b(0x96)]+_0x227f6b(0xaf)+(_0x380a28[_0x227f6b(0x96)]!==0x1?'s':'')+_0x227f6b(0x95)+_0xb36196+'\x27');const _0x1d5e03=_0x17f0e9=>{const _0x2957b9=_0x227f6b;return getConsoleNextUrl(_0x458d81[_0x2957b9(0xcc)],_0x2957b9(0x9e)+_0x495a31[_0x2957b9(0xd8)]+_0x2957b9(0xb6)+_0x17f0e9);},_0x278c8d=_0x458d81[_0x227f6b(0xcf)]==='json'||_0x458d81[_0x227f6b(0xcf)]===_0x227f6b(0xc1);if(_0x278c8d){const _0x53fcac=[..._0x1127e5[_0x227f6b(0xc3)](_0x3bb9f4=>({..._0x3bb9f4,'type':_0x227f6b(0xc8)})),..._0x468a2b[_0x227f6b(0xc3)](_0x5b9331=>({..._0x5b9331,'type':_0x227f6b(0xd7),'url':_0x1d5e03(_0x5b9331['id'])})),..._0x380a28[_0x227f6b(0xc3)](_0x529352=>({..._0x529352,'name':_0x529352[_0x227f6b(0x94)],'type':'journey'}))][_0x227f6b(0x93)]((_0x33f49b,_0x48b60b)=>_0x33f49b['name'][_0x227f6b(0xcd)](_0x48b60b[_0x227f6b(0xe0)]));await handleSDKOutput(_0x53fcac,_0x458d81);}else{if(_0x5a2fb4===0x0)console[_0x227f6b(0xb8)]('No\x20items\x20match\x20pattern:\x20'+_0xb36196);else{console[_0x227f6b(0xb8)](a43_0x148e1a['dim']('['+_0x23488a+_0x227f6b(0x9c)+_0xb36196+'\x27'));const _0x1e5e9d=formatFlatList(_0x1127e5,_0x468a2b,{'showMetadata':!![],'getSegmentUrl':_0x1d5e03},_0x380a28);console[_0x227f6b(0xb8)](_0x1e5e9d);}}return 0x0;}async['listUnified'](_0x4d7875,_0x4b64f5){const _0x4c258b=a43_0x2a00dc,{options:_0x2ae5c6,tdx:_0xaa28a0}=_0x4d7875,_0x4318f3=await withSpinner(_0x4c258b(0xc5)+_0x4b64f5+_0x4c258b(0xa7),()=>_0xaa28a0['segment'][_0x4c258b(0xa3)](_0x4b64f5),{'verbose':_0x2ae5c6[_0x4c258b(0xdf)]}),_0x2ea228=_0x4318f3['data'];_0x2ae5c6[_0x4c258b(0xdf)]&&(console['error'](_0x4c258b(0xb7)+_0x2ea228[_0x4c258b(0xd8)]),_0x2ea228[_0x4c258b(0xbc)]&&console[_0x4c258b(0xc9)](_0x4c258b(0xa6)+_0x2ea228[_0x4c258b(0xbc)]));const _0x295653=await withSpinner(_0x4c258b(0xb4),()=>_0xaa28a0['segment'][_0x4c258b(0xa5)](_0x2ea228['parentId'],_0x2ea228[_0x4c258b(0xbc)]),{'verbose':_0x2ae5c6[_0x4c258b(0xdf)]}),{folders:_0x3bad5a,segments:_0x4b0abc,journeys:_0x154206}=_0x295653['data'],_0x339daf=_0x3bad5a[_0x4c258b(0x96)]+_0x4b0abc[_0x4c258b(0x96)]+_0x154206[_0x4c258b(0x96)];console['error'](_0x4c258b(0x9d)+_0x3bad5a[_0x4c258b(0x96)]+_0x4c258b(0xad)+(_0x3bad5a[_0x4c258b(0x96)]!==0x1?'s':'')+',\x20'+_0x4b0abc[_0x4c258b(0x96)]+_0x4c258b(0xb5)+(_0x4b0abc[_0x4c258b(0x96)]!==0x1?'s':'')+_0x4c258b(0xd2)+_0x154206[_0x4c258b(0x96)]+_0x4c258b(0xaf)+(_0x154206['length']!==0x1?'s':''));const _0x5f2815=_0x1d6d93=>{const _0x2a3a91=_0x4c258b;return getConsoleNextUrl(_0x2ae5c6[_0x2a3a91(0xcc)],_0x2a3a91(0x9e)+_0x2ea228[_0x2a3a91(0xd8)]+'/e/'+_0x1d6d93);},_0x86b14d=_0x24ea24=>{const _0x15ea4c=_0x4c258b;return getConsoleNextUrl(_0x2ae5c6[_0x15ea4c(0xcc)],'/app/ps/'+_0x2ea228['parentId']+_0x15ea4c(0xb6)+_0x24ea24+_0x15ea4c(0xc7));},_0x16c21b=_0x2ae5c6[_0x4c258b(0xcf)]==='json'||_0x2ae5c6['format']===_0x4c258b(0xc1);if(_0x16c21b){const _0x3df113=[..._0x3bad5a[_0x4c258b(0xc3)](_0x34bf54=>({..._0x34bf54,'type':_0x4c258b(0xc8)})),..._0x4b0abc['map'](_0x4f76f5=>({..._0x4f76f5,'type':_0x4c258b(0xd7),'url':_0x5f2815(_0x4f76f5['id'])})),..._0x154206[_0x4c258b(0xc3)](_0x420626=>({..._0x420626,'name':_0x420626['journeyBundleName'],'type':'journey','url':_0x86b14d(_0x420626['id'])}))][_0x4c258b(0x93)]((_0x263543,_0x3dc912)=>_0x263543['name'][_0x4c258b(0xcd)](_0x3dc912['name']));await handleSDKOutput(_0x3df113,_0x2ae5c6);}else{if(_0x339daf===0x0)console['log'](a43_0x148e1a[_0x4c258b(0xc4)]('['+_0x4b64f5+']')),console['log'](_0x4c258b(0xbd));else{console[_0x4c258b(0xb8)](a43_0x148e1a[_0x4c258b(0xc4)]('['+_0x4b64f5+']'));const _0x4864e6=formatFlatList(_0x3bad5a,_0x4b0abc,{'showMetadata':!![],'getSegmentUrl':_0x5f2815,'getJourneyUrl':_0x86b14d},_0x154206);console['log'](_0x4864e6);}}return 0x0;}async[a43_0x2a00dc(0xd9)](_0x57c20c,_0x5a0de2){const _0x3c6d24=a43_0x2a00dc,{options:_0x59f495,tdx:_0x475255}=_0x57c20c,_0x9ffcf7=await withSpinner(_0x3c6d24(0xc5)+_0x5a0de2+_0x3c6d24(0xa7),()=>_0x475255['segment'][_0x3c6d24(0xa3)](_0x5a0de2),{'verbose':_0x59f495[_0x3c6d24(0xdf)]}),_0x5d54a0=_0x9ffcf7[_0x3c6d24(0xb1)];_0x59f495['verbose']&&(console['error']('Parent\x20ID:\x20'+_0x5d54a0[_0x3c6d24(0xd8)]),_0x5d54a0[_0x3c6d24(0xbc)]&&console[_0x3c6d24(0xc9)](_0x3c6d24(0xa6)+_0x5d54a0[_0x3c6d24(0xbc)]));const _0x2701b4=_0x59f495[_0x3c6d24(0xbb)]||0xa,_0x19361e=await withSpinner(_0x3c6d24(0xa8),()=>_0x475255[_0x3c6d24(0xd7)][_0x3c6d24(0xd9)](_0x5d54a0[_0x3c6d24(0xd8)],_0x5d54a0[_0x3c6d24(0xbc)],0x0,_0x2701b4),{'verbose':_0x59f495[_0x3c6d24(0xdf)]}),_0x25949d=_0x19361e[_0x3c6d24(0xb1)],_0x29e6da=_0xa930ee=>{const _0x53f70d=_0x3c6d24;let _0x5ad8fa=0x0,_0x289963=0x0,_0x5170ae=0x0;for(const _0x27c3a1 of _0xa930ee){if(_0x27c3a1['type']===_0x53f70d(0xc8))_0x5ad8fa++;else{if(_0x27c3a1['type']===_0x53f70d(0xd7))_0x289963++;else{if(_0x27c3a1[_0x53f70d(0xba)]===_0x53f70d(0x98))_0x5170ae++;}}if(_0x27c3a1[_0x53f70d(0xd1)]){const _0xb03b87=_0x29e6da(_0x27c3a1[_0x53f70d(0xd1)]);_0x5ad8fa+=_0xb03b87[_0x53f70d(0xaa)],_0x289963+=_0xb03b87[_0x53f70d(0xbe)],_0x5170ae+=_0xb03b87['journeys'];}}return{'folders':_0x5ad8fa,'segments':_0x289963,'journeys':_0x5170ae};},_0x570014=_0x29e6da(_0x25949d);console['error'](_0x3c6d24(0xa1)+_0x570014[_0x3c6d24(0xaa)]+_0x3c6d24(0xad)+(_0x570014['folders']!==0x1?'s':'')+',\x20'+_0x570014[_0x3c6d24(0xbe)]+_0x3c6d24(0xb5)+(_0x570014[_0x3c6d24(0xbe)]!==0x1?'s':'')+_0x3c6d24(0xd2)+_0x570014[_0x3c6d24(0xb9)]+'\x20journey'+(_0x570014[_0x3c6d24(0xb9)]!==0x1?'s':''));const _0x1d165d=_0x481419=>{const _0x1204a4=_0x3c6d24;return getConsoleNextUrl(_0x59f495[_0x1204a4(0xcc)],_0x1204a4(0x9e)+_0x5d54a0[_0x1204a4(0xd8)]+_0x1204a4(0xb6)+_0x481419);},_0x515243=_0x3dff37=>{const _0x5f3a4e=_0x3c6d24;return getConsoleNextUrl(_0x59f495['site'],_0x5f3a4e(0x9e)+_0x5d54a0[_0x5f3a4e(0xd8)]+_0x5f3a4e(0xb6)+_0x3dff37+_0x5f3a4e(0xc7));};if(_0x59f495[_0x3c6d24(0xcf)]===_0x3c6d24(0xd4)||_0x59f495[_0x3c6d24(0xcf)]===_0x3c6d24(0xc1))await handleSDKOutput(_0x25949d,_0x59f495);else{console[_0x3c6d24(0xb8)](a43_0x148e1a[_0x3c6d24(0xc4)]('['+_0x5a0de2+']'));const _0x4ff38b=formatTree(_0x25949d,{'showMetadata':!![],'getSegmentUrl':_0x1d165d,'getJourneyUrl':_0x515243});console['log'](_0x4ff38b);}return 0x0;}}
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 +1 @@
1
- function a44_0x4688(_0x47a384,_0x333f61){_0x47a384=_0x47a384-0x1e0;const _0x11e30a=a44_0x11e3();let _0x468885=_0x11e30a[_0x47a384];return _0x468885;}const a44_0x22ecc9=a44_0x4688;(function(_0x3c3a13,_0x500eda){const _0x21ceae=a44_0x4688,_0x1adec5=_0x3c3a13();while(!![]){try{const _0x535b2a=-parseInt(_0x21ceae(0x1fb))/0x1*(parseInt(_0x21ceae(0x1fd))/0x2)+parseInt(_0x21ceae(0x1f4))/0x3+parseInt(_0x21ceae(0x206))/0x4+-parseInt(_0x21ceae(0x1e7))/0x5*(-parseInt(_0x21ceae(0x1ff))/0x6)+parseInt(_0x21ceae(0x1e2))/0x7+-parseInt(_0x21ceae(0x1e1))/0x8+-parseInt(_0x21ceae(0x1e5))/0x9;if(_0x535b2a===_0x500eda)break;else _0x1adec5['push'](_0x1adec5['shift']());}catch(_0x570dfa){_0x1adec5['push'](_0x1adec5['shift']());}}}(a44_0x11e3,0x75e7c));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleSDKOutput}from'../core/command-output.js';function a44_0x11e3(){const _0xf8d024=['2535496qBHjdM','args','message','2319336kfQtDH','2970394GAziSk','\x20from\x20','database','13320027rGfdDM','length','5fWDwik','Usage:\x20tdx\x20show\x20<database.table>','description','data','verbose','query','Querying\x20','Too\x20many\x20arguments\x0aUsage:\x20tdx\x20show\x20<database.table>\x0a\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--database\x20<database>\x0a\x0aRun\x20\x27tdx\x20show\x20--help\x27\x20for\x20more\x20options','table','name','show','Database:\x20','limit','2840163QedANE','Table:\x20','\x20\x20Cause:\x20','catalog','Catalog:\x20','showTable','cause','4lXSuYc','error','74274vDKPwY','Site:\x20','2378826qojqWi','execute','\x20\x20\x20or:\x20tdx\x20show\x20<catalog.database.table>','✔\x20Retrieved\x20','\x20row','Error:\x20','validate'];a44_0x11e3=function(){return _0xf8d024;};return a44_0x11e3();}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_0x22ecc9(0x1f0)]=a44_0x22ecc9(0x1f1);[a44_0x22ecc9(0x1e9)]='Show\x20table\x20contents';async[a44_0x22ecc9(0x200)](_0x2c45b3){const _0xc80588=a44_0x22ecc9;return this[_0xc80588(0x1f9)](_0x2c45b3);}async[a44_0x22ecc9(0x1f9)](_0x520658){const _0x423304=a44_0x22ecc9,{options:_0x11799f,args:_0x2ae953,tdx:_0x26b753}=_0x520658;let _0x31df56;try{_0x31df56=parseTableReference(_0x2ae953[0x0]);const _0x383fd1=_0x11799f['database'];!_0x31df56[_0x423304(0x1e4)]&&_0x383fd1&&(_0x31df56['database']=_0x383fd1);const _0x4367d7=validateTableDescribeReference(_0x31df56);if(_0x4367d7)return console[_0x423304(0x1fc)](_0x423304(0x204)+_0x4367d7),console['error'](_0x423304(0x1e8)),console[_0x423304(0x1fc)](_0x423304(0x201)),console[_0x423304(0x1fc)]('\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--database\x20<database>'),0x1;}catch(_0x4ecef4){return console[_0x423304(0x1fc)](_0x423304(0x204)+_0x4ecef4[_0x423304(0x1e0)]),console[_0x423304(0x1fc)](_0x423304(0x1e8)),console[_0x423304(0x1fc)](_0x423304(0x201)),console[_0x423304(0x1fc)]('\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--database\x20<database>'),0x1;}const _0x28e80f=_0x31df56[_0x423304(0x1f7)],_0x338a68=_0x31df56[_0x423304(0x1e4)],_0x1535a7=_0x31df56[_0x423304(0x1ef)],_0x361685=resolveLimit(_0x11799f[_0x423304(0x1f3)],DEFAULT_DISPLAY_LIMIT);try{_0x11799f[_0x423304(0x1eb)]&&(console[_0x423304(0x1fc)](_0x423304(0x1fe)+_0x11799f['site']),_0x28e80f&&console[_0x423304(0x1fc)](_0x423304(0x1f8)+_0x28e80f),console['error'](_0x423304(0x1f2)+_0x338a68),console[_0x423304(0x1fc)](_0x423304(0x1f5)+_0x1535a7),console[_0x423304(0x1fc)]('Limit:\x20'+_0x361685));const _0x2bd966=_0x28e80f?_0x28e80f+'.'+_0x338a68+'.'+_0x1535a7:_0x338a68+'.'+_0x1535a7,_0x561a2d=await withSpinner(_0x423304(0x1ed)+_0x2bd966+'...',()=>_0x26b753[_0x423304(0x1ec)]['showTable'](_0x338a68,_0x1535a7,_0x361685,_0x28e80f),{'verbose':_0x11799f[_0x423304(0x1eb)]}),_0x581ded=_0x561a2d[_0x423304(0x1ea)],_0x19eef6=_0x581ded['data'];return _0x19eef6['length']===0x0?console[_0x423304(0x1fc)]('✔\x20Query\x20successful\x20-\x200\x20rows\x20returned'):console[_0x423304(0x1fc)](_0x423304(0x202)+_0x19eef6['length']+_0x423304(0x203)+(_0x19eef6[_0x423304(0x1e6)]!==0x1?'s':'')+_0x423304(0x1e3)+_0x2bd966),await handleSDKOutput(_0x19eef6,_0x11799f),0x0;}catch(_0x5b4bfd){if(_0x5b4bfd instanceof SDKError)return console[_0x423304(0x1fc)](_0x423304(0x204)+_0x5b4bfd[_0x423304(0x1e0)]),_0x5b4bfd[_0x423304(0x1fa)]&&console['error'](_0x423304(0x1f6)+_0x5b4bfd['cause']),0x1;throw _0x5b4bfd;}}[a44_0x22ecc9(0x205)](_0x287a38){const _0x191701=a44_0x22ecc9;if(_0x287a38[_0x191701(0x207)][_0x191701(0x1e6)]===0x0)return'Usage:\x20tdx\x20show\x20<database.table>\x0a\x20\x20\x20or:\x20tdx\x20show\x20<catalog.database.table>\x0a\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--database\x20<database>\x0a\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--in\x20<database>\x0a\x0aRun\x20\x27tdx\x20show\x20--help\x27\x20for\x20more\x20options';if(_0x287a38['args'][_0x191701(0x1e6)]>0x1)return _0x191701(0x1ee);return undefined;}}
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 +1 @@
1
- const a45_0x5ca26f=a45_0x2b08;(function(_0x50e59a,_0x37c407){const _0x14e581=a45_0x2b08,_0x1cc8cf=_0x50e59a();while(!![]){try{const _0x478d5a=parseInt(_0x14e581(0xef))/0x1+parseInt(_0x14e581(0x104))/0x2+-parseInt(_0x14e581(0x116))/0x3*(-parseInt(_0x14e581(0xed))/0x4)+parseInt(_0x14e581(0x103))/0x5*(-parseInt(_0x14e581(0x117))/0x6)+-parseInt(_0x14e581(0xf6))/0x7*(-parseInt(_0x14e581(0x106))/0x8)+-parseInt(_0x14e581(0xec))/0x9*(-parseInt(_0x14e581(0xf5))/0xa)+-parseInt(_0x14e581(0xfa))/0xb;if(_0x478d5a===_0x37c407)break;else _0x1cc8cf['push'](_0x1cc8cf['shift']());}catch(_0x521e89){_0x1cc8cf['push'](_0x1cc8cf['shift']());}}}(a45_0x176f,0xd3936));function a45_0x2b08(_0x187b25,_0x29ffcf){_0x187b25=_0x187b25-0xeb;const _0x176f1e=a45_0x176f();let _0x2b08fc=_0x176f1e[_0x187b25];return _0x2b08fc;}import{BaseCommand,printAuthError}from'./command.js';import{resolveAPIKeyAsync}from'../core/config.js';import{getOAuthTokens}from'../core/oauth-keychain.js';function a45_0x176f(){const _0x552518=['Name:','cli','\x20profile:\x20','6xjUiZO','58176SaGXBw','✗\x20Validation\x20failed:\x20','18yUhNrM','373012nLacFn','last_name','722785fxjIlG','dim','error','Read\x20credential\x20from\x20','CLI\x20flag','description','7294460dcPcBK','7dwGMtE','bold','cyan','status','29015602QhNytt','session','(from\x20','site:\x20','Credential\x20type:\x20','account_id','first_name','site','green','390lIUxDx','1110368BcFlKS','getUserInfo','10698536eAmRxR','filter','env','join','red','yellow','User:','jobs','message','profile','TDX_PROFILE\x20env','N/A','log'];a45_0x176f=function(){return _0x552518;};return a45_0x176f();}import{HTTPClientError}from'../sdk/client/http-client.js';import{GlobalContext}from'../core/global-context.js';import a45_0x1d54aa from'chalk';export class StatusCommand extends BaseCommand{['name']=a45_0x5ca26f(0xf9);[a45_0x5ca26f(0xf4)]='Show\x20authentication\x20status\x20and\x20current\x20context';async['execute'](_0x4622f3){const _0x5d3bb4=a45_0x5ca26f,{options:_0x19b239,tdx:_0x66cbc6}=_0x4622f3,_0x4c0203=_0x19b239[_0x5d3bb4(0x101)],_0x4875f9=new GlobalContext(_0x19b239),_0x1a16c7=_0x4875f9[_0x5d3bb4(0x10f)],_0x2b4a3a=_0x4875f9['profileSource'],_0x24d744=_0x2b4a3a===_0x5d3bb4(0x114)?_0x5d3bb4(0xf3):_0x2b4a3a===_0x5d3bb4(0xfb)?_0x5d3bb4(0xfb):_0x2b4a3a===_0x5d3bb4(0x108)?_0x5d3bb4(0x110):_0x2b4a3a==='config'?'config':null,_0x39edcb=_0x1a16c7?a45_0x1d54aa[_0x5d3bb4(0xf8)](_0x1a16c7):a45_0x1d54aa[_0x5d3bb4(0xf0)](_0x5d3bb4(0x111)),_0x2e1bd9=_0x24d744?'\x20'+a45_0x1d54aa[_0x5d3bb4(0xf0)](_0x5d3bb4(0xfc)+_0x24d744+')'):'';console['log'](a45_0x1d54aa[_0x5d3bb4(0xf7)]('tdx')+_0x5d3bb4(0x115)+_0x39edcb+_0x2e1bd9+'\x20'+a45_0x1d54aa[_0x5d3bb4(0xf0)]('(')+_0x5d3bb4(0xfd)+a45_0x1d54aa['cyan'](_0x4c0203)+a45_0x1d54aa['dim'](')'));const _0x66bc0e=await getOAuthTokens(_0x1a16c7);if(_0x66bc0e)console['log'](_0x5d3bb4(0xfe)+a45_0x1d54aa[_0x5d3bb4(0xf8)]('OAuth'));else{const _0x497d91=await resolveAPIKeyAsync(_0x4c0203,_0x1a16c7);if(_0x497d91){const {source:_0x42a6f4,isDeprecated:_0x1be1ac}=_0x497d91,_0x3f60d6=_0x5d3bb4(0xf2)+a45_0x1d54aa['cyan'](_0x42a6f4);console[_0x5d3bb4(0x112)](_0x1be1ac?a45_0x1d54aa[_0x5d3bb4(0x10b)](_0x3f60d6):_0x3f60d6);}else console['log'](a45_0x1d54aa['yellow']('No\x20credential\x20found'));}let _0x4181de=![];try{const _0x1e9a57=await _0x66cbc6[_0x5d3bb4(0x10d)][_0x5d3bb4(0x105)]();console[_0x5d3bb4(0x112)](a45_0x1d54aa[_0x5d3bb4(0x102)]('✓\x20Authentication\x20successful\x0a')),console['log'](a45_0x1d54aa[_0x5d3bb4(0xf7)](_0x5d3bb4(0x10c))+'\x20'+a45_0x1d54aa[_0x5d3bb4(0xf8)](_0x1e9a57['email']));if(_0x1e9a57[_0x5d3bb4(0x100)]||_0x1e9a57['last_name']){const _0x456a96=[_0x1e9a57['first_name'],_0x1e9a57[_0x5d3bb4(0xee)]][_0x5d3bb4(0x107)](Boolean)[_0x5d3bb4(0x109)]('\x20');console[_0x5d3bb4(0x112)](a45_0x1d54aa[_0x5d3bb4(0xf7)](_0x5d3bb4(0x113))+'\x20'+_0x456a96);}_0x1e9a57[_0x5d3bb4(0xff)]&&console['log'](a45_0x1d54aa[_0x5d3bb4(0xf7)]('Account\x20ID:')+'\x20'+a45_0x1d54aa[_0x5d3bb4(0x10b)](_0x1e9a57[_0x5d3bb4(0xff)])),_0x4181de=!![];}catch(_0x575a9a){_0x575a9a instanceof HTTPClientError&&_0x575a9a[_0x5d3bb4(0xf9)]===0x191?printAuthError(_0x575a9a,!![],_0x1a16c7):console[_0x5d3bb4(0xf1)](a45_0x1d54aa[_0x5d3bb4(0x10a)](_0x5d3bb4(0xeb)+(_0x575a9a instanceof Error?_0x575a9a[_0x5d3bb4(0x10e)]:String(_0x575a9a))));}return console['log'](),_0x4875f9['displayWithSources'](),_0x4181de?0x0:0x1;}}
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 +1 @@
1
- const a46_0x14f574=a46_0x2a87;(function(_0x4d7eb2,_0xb3109b){const _0x122220=a46_0x2a87,_0x1d4fa0=_0x4d7eb2();while(!![]){try{const _0x5ad0e0=parseInt(_0x122220(0x1c1))/0x1+parseInt(_0x122220(0x1e5))/0x2+parseInt(_0x122220(0x1d9))/0x3*(parseInt(_0x122220(0x1dc))/0x4)+-parseInt(_0x122220(0x1cd))/0x5+parseInt(_0x122220(0x1db))/0x6+-parseInt(_0x122220(0x1e3))/0x7+-parseInt(_0x122220(0x1e4))/0x8*(parseInt(_0x122220(0x1bd))/0x9);if(_0x5ad0e0===_0xb3109b)break;else _0x1d4fa0['push'](_0x1d4fa0['shift']());}catch(_0xc78ff9){_0x1d4fa0['push'](_0x1d4fa0['shift']());}}}(a46_0x36d6,0x8ab16));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleSDKOutput,isStructuredFormat}from'../core/command-output.js';import{parseTableReference}from'../utils/table-ref-parser.js';import{DEFAULT_LISTING_LIMIT,resolveLimit}from'../core/constants.js';function a46_0x2a87(_0x48645c,_0x302036){_0x48645c=_0x48645c-0x1bb;const _0x36d620=a46_0x36d6();let _0x2a8744=_0x36d620[_0x48645c];return _0x2a8744;}import{withSpinner}from'../utils/spinner.js';export class TablesCommand extends BaseCommand{[a46_0x14f574(0x1bc)]=a46_0x14f574(0x1d0);[a46_0x14f574(0x1d4)]=a46_0x14f574(0x1c2);async['execute'](_0x470397){const _0x4efb11=a46_0x14f574,{options:_0x1d5c4d,args:_0x301e94,tdx:_0x414ea9}=_0x470397;let _0x492bf8;if(_0x301e94[_0x4efb11(0x1ce)]===0x0)_0x492bf8={'database':undefined,'table':undefined,'original':''};else{if(_0x301e94[_0x4efb11(0x1ce)]===0x1)try{_0x492bf8=parseTableReference(_0x301e94[0x0]);if(_0x492bf8[_0x4efb11(0x1c5)]&&!_0x492bf8[_0x4efb11(0x1cf)]&&!_0x492bf8['table'][_0x4efb11(0x1dd)]('*')&&!_0x492bf8[_0x4efb11(0x1c5)][_0x4efb11(0x1dd)]('?'))return console[_0x4efb11(0x1c6)](_0x4efb11(0x1e2)+_0x301e94[0x0]+'\x27\x20is\x20ambiguous.'),console[_0x4efb11(0x1c6)](_0x4efb11(0x1bb)+_0x492bf8[_0x4efb11(0x1c5)]+'\x27?'),console['error'](_0x4efb11(0x1e0)+_0x492bf8[_0x4efb11(0x1c5)]+_0x4efb11(0x1df)),console['error'](_0x4efb11(0x1d5)+_0x492bf8[_0x4efb11(0x1c5)]),console[_0x4efb11(0x1c6)]('\x20\x20Or:\x20\x20tdx\x20tables\x20--database\x20'+_0x492bf8[_0x4efb11(0x1c5)]),console[_0x4efb11(0x1c6)](''),console[_0x4efb11(0x1c6)]('Note:\x20\x27'+_0x301e94[0x0]+_0x4efb11(0x1d2)+_0x492bf8['table']+'\x27\x20across\x20all\x20databases.'),0x1;}catch(_0x24238d){return console[_0x4efb11(0x1c6)](_0x4efb11(0x1c4)+_0x24238d['message']),0x1;}else return console[_0x4efb11(0x1c6)]('Error:\x20Too\x20many\x20arguments.\x20Use\x20single\x20argument:'),console[_0x4efb11(0x1c6)](_0x4efb11(0x1c3)),console['error'](_0x4efb11(0x1c7)),console[_0x4efb11(0x1c6)]('\x20\x20tdx\x20tables\x20\x22mydb.users\x22\x20\x20\x20\x20->\x20table\x20\x22users\x22\x20in\x20database\x20mydb'),console[_0x4efb11(0x1c6)](_0x4efb11(0x1cc)),console[_0x4efb11(0x1c6)]('Or\x20use\x20--in\x20flag:'),console['error']('\x20\x20tdx\x20tables\x20--in\x20mydb\x20\x20\x20\x20\x20\x20\x20->\x20all\x20tables\x20from\x20mydb'),0x1;}const _0x387cbc=_0x1d5c4d[_0x4efb11(0x1cf)];!_0x492bf8[_0x4efb11(0x1cf)]&&_0x387cbc&&(_0x492bf8[_0x4efb11(0x1cf)]=_0x387cbc);try{const _0x2dfd45=_0x3646c2=>_0x3646c2&&(_0x3646c2[_0x4efb11(0x1dd)]('*')||_0x3646c2['includes']('?')),_0x3c26f0=_0x2dfd45(_0x492bf8[_0x4efb11(0x1cf)]);_0x1d5c4d[_0x4efb11(0x1c0)]&&(console[_0x4efb11(0x1c6)]('Site:\x20'+_0x1d5c4d[_0x4efb11(0x1c9)]),_0x492bf8['database']?_0x3c26f0?console[_0x4efb11(0x1c6)]('Database\x20pattern:\x20'+_0x492bf8[_0x4efb11(0x1cf)]):console[_0x4efb11(0x1c6)](_0x4efb11(0x1c8)+_0x492bf8[_0x4efb11(0x1cf)]):console[_0x4efb11(0x1c6)](_0x4efb11(0x1d6)),_0x492bf8[_0x4efb11(0x1c5)]&&console['error'](_0x4efb11(0x1d8)+_0x492bf8[_0x4efb11(0x1c5)]));const _0xb65c1c=_0x492bf8['database']&&!_0x3c26f0?_0x492bf8[_0x4efb11(0x1cf)]:undefined,_0x45d470=_0x3c26f0?_0x492bf8[_0x4efb11(0x1cf)]:undefined,_0x401b5a=_0x492bf8[_0x4efb11(0x1c5)],_0x58992d=resolveLimit(_0x1d5c4d['limit'],DEFAULT_LISTING_LIMIT),_0x4b5ead=await withSpinner('Listing\x20tables...',()=>_0x414ea9['query'][_0x4efb11(0x1d1)](_0xb65c1c,_0x401b5a,_0x45d470,_0x58992d),{'verbose':_0x1d5c4d['verbose']}),_0x223685=_0x4b5ead[_0x4efb11(0x1cb)];if(_0x223685[_0x4efb11(0x1ce)]===0x0&&_0x492bf8[_0x4efb11(0x1cf)]&&!_0x3c26f0)return console[_0x4efb11(0x1c6)](_0x4efb11(0x1da)),console[_0x4efb11(0x1c6)]('Database\x20\x27'+_0x492bf8['database']+_0x4efb11(0x1bf)),0x1;console['error'](_0x4efb11(0x1d7)+_0x223685[_0x4efb11(0x1ce)]+'\x20table'+(_0x223685[_0x4efb11(0x1ce)]!==0x1?'s':''));if(isStructuredFormat(_0x1d5c4d))await handleSDKOutput(_0x223685,{..._0x1d5c4d,'limit':_0x58992d});else for(const _0x265918 of _0x223685){const _0x37a060=_0x265918[_0x4efb11(0x1be)]?_0x265918['database_name']+'.':'';console['log'](_0x4efb11(0x1ca)+_0x37a060+_0x265918[_0x4efb11(0x1e7)]);}return 0x0;}catch(_0x57f591){if(_0x57f591 instanceof SDKError)return console[_0x4efb11(0x1c6)](_0x4efb11(0x1c4)+_0x57f591[_0x4efb11(0x1e1)]),_0x57f591[_0x4efb11(0x1e6)]&&console['error'](_0x4efb11(0x1de)+_0x57f591[_0x4efb11(0x1e6)]),0x1;throw _0x57f591;}}[a46_0x14f574(0x1d3)](_0x2d01e7){return undefined;}}function a46_0x36d6(){const _0x19bdf6=['verbose','362781xNLncG','List\x20tables\x20in\x20a\x20database','\x20\x20tdx\x20tables\x20users\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20->\x20table\x20\x22users\x22\x20across\x20all\x20databases','Error:\x20','table','error','\x20\x20tdx\x20tables\x20\x22mydb.*\x22\x20\x20\x20\x20\x20\x20\x20\x20->\x20all\x20tables\x20from\x20mydb','Database:\x20','site','📋\x20','data','\x20\x20tdx\x20tables\x20\x22*.user*\x22\x20\x20\x20\x20\x20\x20\x20->\x20tables\x20matching\x20user*\x20across\x20databases','1359375xcYcvd','length','database','tables','listTables','\x27\x20without\x20wildcards\x20would\x20search\x20for\x20tables\x20named\x20\x27','validate','description','\x20\x20Or:\x20\x20tdx\x20tables\x20--in\x20','Database:\x20all','✔\x20Found\x20','Table\x20pattern:\x20','63594qfkLiQ','✖\x20No\x20tables\x20found','4995978HgKJRt','192vhnfQK','includes','\x20\x20Cause:\x20','.*\x22','\x20\x20Use:\x20tdx\x20tables\x20\x22','message','Error:\x20Pattern\x20\x27','3277099qkOhmx','80skRyKj','2063620wqvmdE','cause','table_name','Did\x20you\x20mean\x20to\x20list\x20all\x20tables\x20from\x20database\x20\x27','name','1742976GxugsK','database_name','\x27\x20may\x20not\x20exist\x20or\x20contains\x20no\x20tables'];a46_0x36d6=function(){return _0x19bdf6;};return a46_0x36d6();}
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 +1 @@
1
- const a47_0x2db043=a47_0x2cbf;(function(_0x106812,_0x114ca6){const _0x2f852a=a47_0x2cbf,_0x31fd4f=_0x106812();while(!![]){try{const _0x8a4806=parseInt(_0x2f852a(0x12e))/0x1+-parseInt(_0x2f852a(0x135))/0x2+parseInt(_0x2f852a(0x143))/0x3*(parseInt(_0x2f852a(0x123))/0x4)+-parseInt(_0x2f852a(0x13f))/0x5*(parseInt(_0x2f852a(0x129))/0x6)+-parseInt(_0x2f852a(0x12b))/0x7+parseInt(_0x2f852a(0x138))/0x8*(-parseInt(_0x2f852a(0x122))/0x9)+parseInt(_0x2f852a(0x139))/0xa;if(_0x8a4806===_0x114ca6)break;else _0x31fd4f['push'](_0x31fd4f['shift']());}catch(_0xd8eec3){_0x31fd4f['push'](_0x31fd4f['shift']());}}}(a47_0x436b,0xaf31e));function a47_0x2cbf(_0xa9794b,_0x4fff09){_0xa9794b=_0xa9794b-0x121;const _0x436bea=a47_0x436b();let _0x2cbfb8=_0x436bea[_0xa9794b];return _0x2cbfb8;}import{BaseCommand}from'./command.js';import{getSessionID,cleanExpiredSessions,clearSessionContextField}from'../core/session.js';import{clearDefaultSiteFromUserConfig,clearActiveProfileFromUserConfig}from'../core/profile.js';import{getConfigDir}from'../core/config.js';import a47_0x2903e0 from'chalk';import*as a47_0x82d82b from'node:path';export class UnsetCommand extends BaseCommand{[a47_0x2db043(0x147)]='unset';['description']='Clear\x20session-level\x20or\x20default\x20context\x20values';[a47_0x2db043(0x132)](_0x25555d){const _0xac8012=a47_0x2db043,{args:_0x481186,options:_0x5398e4}=_0x25555d,_0x5af945=_0x5398e4[_0xac8012(0x12c)];if(_0x481186[_0xac8012(0x136)]===0x0)return _0xac8012(0x125)+_0xac8012(0x142)+_0xac8012(0x12f)+_0xac8012(0x121);const _0x488234=_0x481186[0x0],_0x2c7d27=[_0xac8012(0x148),_0xac8012(0x146),'parent_segment',_0xac8012(0x140),'agent',_0xac8012(0x130),'engage_workspace'];if(!_0x2c7d27[_0xac8012(0x145)](_0x488234))return _0xac8012(0x126)+_0x488234+_0xac8012(0x124)+_0x2c7d27[_0xac8012(0x144)](',\x20');if(_0x5af945&&_0x488234!==_0xac8012(0x148)&&_0x488234!==_0xac8012(0x130))return _0xac8012(0x137);return undefined;}async['execute'](_0x5a2613){const _0x4f64f0=a47_0x2db043,{args:_0x244c18,options:_0xe9112d}=_0x5a2613,_0x5c6e81=_0xe9112d['default'];cleanExpiredSessions();try{const _0xd1eda9=_0x244c18[0x0],_0xad28da=a47_0x82d82b[_0x4f64f0(0x144)](getConfigDir(),_0x4f64f0(0x13e));if(_0x5c6e81){if(_0xd1eda9==='site')return clearDefaultSiteFromUserConfig(),console['log'](_0x4f64f0(0x149)+a47_0x2903e0[_0x4f64f0(0x13d)](_0x4f64f0(0x131))),console['log'](a47_0x2903e0['dim']('\x0aUpdated:\x20'+_0xad28da)),0x0;if(_0xd1eda9===_0x4f64f0(0x130))return clearActiveProfileFromUserConfig(),console[_0x4f64f0(0x12a)]('Default\x20profile\x20'+a47_0x2903e0['green']('cleared')),console[_0x4f64f0(0x12a)](a47_0x2903e0[_0x4f64f0(0x13c)](_0x4f64f0(0x127)+_0xad28da)),0x0;}const _0x36afef=getSessionID(_0xe9112d['session']),_0x3a528e={'site':_0x4f64f0(0x148),'database':_0x4f64f0(0x146),'parent_segment':_0x4f64f0(0x13b),'llm_project':_0x4f64f0(0x140),'agent':_0x4f64f0(0x133),'profile':_0x4f64f0(0x130),'engage_workspace':_0x4f64f0(0x128)},_0x3a89e9=_0x3a528e[_0xd1eda9];return _0x3a89e9&&(clearSessionContextField(_0x3a89e9,_0xe9112d[_0x4f64f0(0x13a)]),console[_0x4f64f0(0x12a)]('Session\x20'+_0xd1eda9+'\x20'+a47_0x2903e0['green'](_0x4f64f0(0x131))+'\x20'+a47_0x2903e0[_0x4f64f0(0x13c)](_0x4f64f0(0x141)+_0x36afef+')'))),0x0;}catch(_0x345a6e){return _0x345a6e instanceof Error&&console[_0x4f64f0(0x134)]('Error:\x20'+_0x345a6e[_0x4f64f0(0x12d)]),0x1;}}}function a47_0x436b(){const _0x31650b=['message','443221tlfXTx','\x0aResources:\x20site,\x20database,\x20parent_segment,\x20llm_project,\x20agent,\x20profile,\x20engage_workspace\x0a','profile','cleared','validate','llm_agent','error','2325184aAcNZR','length','--default\x20can\x20only\x20be\x20used\x20with\x20\x27site\x27\x20or\x20\x27profile\x27.\x20Other\x20resources\x20are\x20session-level\x20only.','1683008ZGGxMG','20361900ToeaVq','session','parent_segment','dim','green','tdx.json','1455540voqSig','llm_project','(session:\x20','\x20\x20\x20\x20\x20\x20\x20tdx\x20unset\x20--default\x20<resource>\x20\x20#\x20Clear\x20default\x20from\x20config\x0a','447xGfmSR','join','includes','database','name','site','Default\x20site\x20','\x0aRun\x20\x27tdx\x20unset\x20--help\x27\x20for\x20more\x20options','18IFQuKG','4456LIImpr','.\x20Must\x20be\x20one\x20of:\x20','Usage:\x20tdx\x20unset\x20<resource>\x0a','Invalid\x20resource:\x20','\x0aUpdated:\x20','engage_workspace','6SCidqS','log','373429mjxeEm','default'];a47_0x436b=function(){return _0x31650b;};return a47_0x436b();}
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 +1 @@
1
- const a48_0x16bce9=a48_0x5bef;(function(_0x127e49,_0x456a53){const _0x4786a2=a48_0x5bef,_0x59b38c=_0x127e49();while(!![]){try{const _0x5ea726=-parseInt(_0x4786a2(0x165))/0x1+-parseInt(_0x4786a2(0x14d))/0x2+-parseInt(_0x4786a2(0x160))/0x3*(parseInt(_0x4786a2(0x16d))/0x4)+parseInt(_0x4786a2(0x172))/0x5+-parseInt(_0x4786a2(0x14e))/0x6+parseInt(_0x4786a2(0x169))/0x7+parseInt(_0x4786a2(0x158))/0x8;if(_0x5ea726===_0x456a53)break;else _0x59b38c['push'](_0x59b38c['shift']());}catch(_0x88d468){_0x59b38c['push'](_0x59b38c['shift']());}}}(a48_0x55cb,0x3c6ba));function a48_0x55cb(){const _0x1b663a=['toLowerCase','Upgrade\x20tdx\x20to\x20the\x20latest\x20version','Successfully\x20upgraded\x20to\x20','3hqFeFF','Running:','Target\x20version:','Upgrade\x20failed\x20(exit\x20code\x20','next','163930BjkaZv','yarn','Failed\x20to\x20check\x20for\x20updates:\x20','Checking\x20','715421EyqMuV','add','cyan','argv','485188LBOaKi','latest','log','Latest\x20version:','dryRun','2399065RtdaGi','npm','Already\x20up\x20to\x20date\x20(','pnpm','includes','Upgrade\x20is\x20not\x20available\x20for\x20development\x20versions.','green','...','message','698796BCxTHw','858576YyXUpS','bun','Failed\x20to\x20run\x20','close','error','yellow','red','dim','inherit','join','3545496DGAXGv','Current\x20version:','.bun/','Current\x20version:\x20','execute'];a48_0x55cb=function(){return _0x1b663a;};return a48_0x55cb();}import{gt}from'semver';import a48_0x5e8b3a from'chalk';import{BaseCommand}from'./command.js';import{getVersion,isDevVersion}from'../core/version.js';import{loadReleaseChannel}from'../core/config.js';import{fetchLatestVersion}from'../utils/version-check.js';import{crossSpawn}from'../utils/process.js';const PACKAGE_NAME='@treasuredata/tdx';export function detectPackageManager(){const _0x42a817=a48_0x5bef,_0x50bf9f=process['execPath'][_0x42a817(0x15d)](),_0x38de4e=process[_0x42a817(0x16c)][0x1]??'';if(_0x50bf9f[_0x42a817(0x176)](_0x42a817(0x14f))||_0x38de4e[_0x42a817(0x176)](_0x42a817(0x15a)))return _0x42a817(0x14f);if(_0x38de4e[_0x42a817(0x176)](_0x42a817(0x175)))return _0x42a817(0x175);if(_0x38de4e[_0x42a817(0x176)](_0x42a817(0x166)))return _0x42a817(0x166);return _0x42a817(0x173);}function a48_0x5bef(_0x2374b8,_0xe9f29a){_0x2374b8=_0x2374b8-0x14a;const _0x55cbce=a48_0x55cb();let _0x5bef90=_0x55cbce[_0x2374b8];return _0x5bef90;}export function buildInstallArgs(_0x3f49e9,_0x202f3b){const _0x569b22=a48_0x5bef;switch(_0x3f49e9){case _0x569b22(0x166):return['global',_0x569b22(0x16a),_0x202f3b];case'pnpm':return[_0x569b22(0x16a),'-g',_0x202f3b];default:return['install','-g',_0x202f3b];}}export class UpgradeCommand extends BaseCommand{['name']='upgrade';['description']=a48_0x16bce9(0x15e);async[a48_0x16bce9(0x15c)](_0x1241d1){const _0x46a7e5=a48_0x16bce9,{options:_0x1b2929,args:_0x4cc060}=_0x1241d1,_0x5ef98f=!!_0x1b2929[_0x46a7e5(0x171)],{next:_0x5e7fdb,method:_0x264643}=_0x1b2929,_0xeac122=_0x5e7fdb?'next':loadReleaseChannel(),_0x2e0d52=_0xeac122===_0x46a7e5(0x164)?_0x46a7e5(0x164):_0x46a7e5(0x16e),_0x45d3eb=_0x4cc060[0x0]?String(_0x4cc060[0x0])['replace'](/^v/,''):undefined,_0x447248=getVersion();if(isDevVersion())return console[_0x46a7e5(0x152)](a48_0x5e8b3a[_0x46a7e5(0x153)](_0x46a7e5(0x177))),console[_0x46a7e5(0x152)](a48_0x5e8b3a[_0x46a7e5(0x155)](_0x46a7e5(0x15b)+_0x447248)),0x1;let _0x5b7f97;if(_0x45d3eb)_0x5b7f97=_0x45d3eb,console[_0x46a7e5(0x16f)](a48_0x5e8b3a['dim'](_0x46a7e5(0x159))+'\x20'+_0x447248),console['log'](a48_0x5e8b3a['dim'](_0x46a7e5(0x162))+'\x20\x20'+a48_0x5e8b3a[_0x46a7e5(0x14a)](_0x45d3eb)),console['log']();else{console['log'](a48_0x5e8b3a[_0x46a7e5(0x155)](_0x46a7e5(0x168)+PACKAGE_NAME+'@'+_0x2e0d52+_0x46a7e5(0x14b)));try{_0x5b7f97=await fetchLatestVersion(_0xeac122);}catch(_0x51e4d8){return console[_0x46a7e5(0x152)](a48_0x5e8b3a['red'](_0x46a7e5(0x167)+(_0x51e4d8 instanceof Error?_0x51e4d8[_0x46a7e5(0x14c)]:String(_0x51e4d8)))),0x1;}if(!gt(_0x5b7f97,_0x447248))return console['log'](a48_0x5e8b3a[_0x46a7e5(0x14a)](_0x46a7e5(0x174)+_0x447248+').')),0x0;console['log'](a48_0x5e8b3a[_0x46a7e5(0x155)](_0x46a7e5(0x159))+'\x20'+_0x447248),console[_0x46a7e5(0x16f)](a48_0x5e8b3a['dim'](_0x46a7e5(0x170))+'\x20\x20'+a48_0x5e8b3a[_0x46a7e5(0x14a)](_0x5b7f97)),console[_0x46a7e5(0x16f)]();}const _0x4f8082=_0x264643??detectPackageManager(),_0xd1e517=_0x45d3eb?PACKAGE_NAME+'@'+_0x45d3eb:PACKAGE_NAME+'@'+_0x2e0d52,_0x48157f=buildInstallArgs(_0x4f8082,_0xd1e517);if(_0x5ef98f)return console[_0x46a7e5(0x16f)](a48_0x5e8b3a['dim']('Would\x20run:')),console[_0x46a7e5(0x16f)]('\x20\x20'+a48_0x5e8b3a[_0x46a7e5(0x16b)](_0x4f8082+'\x20'+_0x48157f[_0x46a7e5(0x157)]('\x20'))),0x0;return console[_0x46a7e5(0x16f)](a48_0x5e8b3a['dim'](_0x46a7e5(0x161))+'\x20'+_0x4f8082+'\x20'+_0x48157f[_0x46a7e5(0x157)]('\x20')),console[_0x46a7e5(0x16f)](),new Promise(_0x55023e=>{const _0xe63f3e=_0x46a7e5,_0x47c926=crossSpawn(_0x4f8082,_0x48157f,{'stdio':_0xe63f3e(0x156)});_0x47c926['on'](_0xe63f3e(0x151),_0x505828=>{const _0xb36fca=_0xe63f3e;console[_0xb36fca(0x16f)](),_0x505828===0x0?console[_0xb36fca(0x16f)](a48_0x5e8b3a[_0xb36fca(0x14a)](_0xb36fca(0x15f)+_0xd1e517)):console[_0xb36fca(0x152)](a48_0x5e8b3a[_0xb36fca(0x154)](_0xb36fca(0x163)+_0x505828+').')),_0x55023e(_0x505828??0x1);}),_0x47c926['on'](_0xe63f3e(0x152),_0x29a2a7=>{const _0x36b79d=_0xe63f3e;console[_0x36b79d(0x152)](a48_0x5e8b3a[_0x36b79d(0x154)](_0x36b79d(0x150)+_0x4f8082+':\x20'+_0x29a2a7[_0x36b79d(0x14c)])),_0x55023e(0x1);});});}}
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 +1 @@
1
- function a49_0x21d3(_0x823829,_0x29cd5b){_0x823829=_0x823829-0xb6;const _0xf39ae4=a49_0xf39a();let _0x21d356=_0xf39ae4[_0x823829];return _0x21d356;}const a49_0x1dda9b=a49_0x21d3;(function(_0x2f4a9a,_0x4f834a){const _0x23f2a4=a49_0x21d3,_0x3491a2=_0x2f4a9a();while(!![]){try{const _0x2b840=parseInt(_0x23f2a4(0xd6))/0x1*(parseInt(_0x23f2a4(0xda))/0x2)+-parseInt(_0x23f2a4(0xe3))/0x3+parseInt(_0x23f2a4(0xc6))/0x4*(-parseInt(_0x23f2a4(0xed))/0x5)+parseInt(_0x23f2a4(0x103))/0x6*(parseInt(_0x23f2a4(0xfb))/0x7)+parseInt(_0x23f2a4(0x109))/0x8*(parseInt(_0x23f2a4(0xef))/0x9)+parseInt(_0x23f2a4(0xf6))/0xa+parseInt(_0x23f2a4(0xdd))/0xb*(-parseInt(_0x23f2a4(0xbd))/0xc);if(_0x2b840===_0x4f834a)break;else _0x3491a2['push'](_0x3491a2['shift']());}catch(_0x534597){_0x3491a2['push'](_0x3491a2['shift']());}}}(a49_0xf39a,0xb0883));import{BaseCommand}from'./command.js';import{saveSessionContext,getSessionID,cleanExpiredSessions,clearSessionContext}from'../core/session.js';import{profileExists,saveActiveProfileToUserConfig,saveDefaultSiteToUserConfig}from'../core/profile.js';import{GlobalContext}from'../core/global-context.js';import{parseAgentRef}from'../sdk/agent/agent-ref-parser.js';import{getConfigDir,saveReleaseChannel}from'../core/config.js';import{SDKError,ErrorCode}from'../sdk/errors.js';import{withSpinner}from'../utils/spinner.js';import a49_0x3f6761 from'chalk';import*as a49_0x4c71d7 from'node:path';function a49_0xf39a(){const _0x2c8ab9=['displayWithSources','dim','3746898TgZObl','execute','length','Usage:\x20tdx\x20use\x20<resource>\x20<value>\x0a','.\x20Must\x20be\x20one\x20of:\x20','llm_agent','next','Session\x20engage_workspace\x20set\x20to:\x20','green','display','5soeBij','Error:\x20Profile\x20\x27','1108413jdpXVR','Default\x20profile\x20set\x20to:\x20','release_channel','\x0aSaved\x20to:\x20','Session\x20agent\x20set\x20to:\x20','tdx','\x0aUse\x20\x27tdx\x20profiles\x27\x20to\x20see\x20available\x20profiles','9486940DzXvpq','Error:\x20','agent','llm_project','profile','14ijCeNT','\x27...','(session:\x20','debug','join','default','Use\x20--default\x20with\x20site,\x20profile,\x20or\x20release_channel\x20to\x20save\x20permanently','tdx.json','886968baxbfK','\x0aTip:\x20Use\x20\x27tdx\x20use\x20--clear\x27\x20to\x20clear\x20session\x20overrides','message','\x0aUpdate\x20notifications\x20will\x20now\x20check\x20the\x20@next\x20channel.','log','\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20--default\x20profile\x20<value>\x20\x20#\x20Save\x20default\x20profile\x20to\x20config\x0a','56tuQSsp','--default\x20can\x20only\x20be\x20used\x20with\x20\x27site\x27,\x20\x27profile\x27,\x20or\x20\x27release_channel\x27.\x20Other\x20resources\x20are\x20session-level\x20only.','error','\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20--clear\x20\x20\x20\x20\x20\x20#\x20Clear\x20session\x20context\x0a','resolveWorkspaceId','description','site','.\x20Must\x20be\x20\x27stable\x27\x20or\x20\x27next\x27.','5102688OgAfOC','Session\x20context\x20','\x0aSet\x20context:\x20tdx\x20use\x20<resource>\x20<value>','release_channel\x20requires\x20--default.\x20Usage:\x20tdx\x20use\x20--default\x20release_channel\x20<stable|next>','database','\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20--default\x20release_channel\x20<stable|next>\x20\x20#\x20Set\x20release\x20channel\x0a','\x0aUse\x20\x27tdx\x20engage\x20workspace\x20list\x27\x20to\x20see\x20available\x20workspaces','validate','use','1028084ZnxBKX','stable','code','\x0aRun\x20\x27tdx\x20use\x20--help\x27\x20for\x20more\x20options','engage','parent_segment','Invalid\x20resource:\x20','Session\x20profile\x20set\x20to:\x20','Set\x20session-level\x20context','NOT_FOUND','includes','\x27\x20to\x20save\x20permanently','Invalid\x20release\x20channel:\x20','Release\x20channel\x20set\x20to:\x20','Install\x20the\x20latest\x20next\x20version:\x20npm\x20install\x20-g\x20@treasuredata/tdx@next','name','42307mCGxle','INVALID_ARGUMENT','session','\x27\x20does\x20not\x20exist','46EVgRel','clear','engage_workspace','22tIVcmN','\x0aTip:\x20Use\x20\x27tdx\x20use\x20--default\x20profile\x20','Session\x20llm_project\x20set\x20to:\x20','Default\x20site\x20set\x20to:\x20'];a49_0xf39a=function(){return _0x2c8ab9;};return a49_0xf39a();}export class UseCommand extends BaseCommand{[a49_0x1dda9b(0xd5)]=a49_0x1dda9b(0xc5);[a49_0x1dda9b(0xba)]=a49_0x1dda9b(0xce);[a49_0x1dda9b(0xc4)](_0x383d0c){const _0x45e53c=a49_0x1dda9b,{args:_0x4d7c04,options:_0x38e5be}=_0x383d0c,_0x5e60ed=_0x38e5be[_0x45e53c(0x100)];if(_0x4d7c04[_0x45e53c(0xe5)]===0x0)return undefined;if(_0x4d7c04[_0x45e53c(0xe5)]===0x1)return _0x45e53c(0xe6)+'\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'+_0x45e53c(0xb8)+'\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20--default\x20site\x20<value>\x20\x20\x20\x20\x20#\x20Save\x20default\x20site\x20to\x20config\x0a'+_0x45e53c(0x108)+_0x45e53c(0xc2)+'\x0aResources:\x20site,\x20database,\x20parent_segment,\x20llm_project,\x20agent,\x20profile,\x20engage_workspace,\x20release_channel\x0a'+_0x45e53c(0xc9);const _0x449e53=_0x4d7c04[0x0],_0x33ddda=[_0x45e53c(0xbb),'database',_0x45e53c(0xcb),_0x45e53c(0xf9),_0x45e53c(0xf8),'profile','engage_workspace',_0x45e53c(0xf1)];if(!_0x33ddda[_0x45e53c(0xd0)](_0x449e53))return _0x45e53c(0xcc)+_0x449e53+_0x45e53c(0xe7)+_0x33ddda[_0x45e53c(0xff)](',\x20');if(_0x5e60ed&&_0x449e53!=='site'&&_0x449e53!==_0x45e53c(0xfa)&&_0x449e53!==_0x45e53c(0xf1))return _0x45e53c(0xb6);if(_0x449e53===_0x45e53c(0xf1)&&!_0x5e60ed)return _0x45e53c(0xc0);if(_0x449e53==='release_channel'){const _0x401b00=_0x4d7c04[0x1];if(_0x401b00!==_0x45e53c(0xc7)&&_0x401b00!==_0x45e53c(0xe9))return _0x45e53c(0xd2)+_0x401b00+_0x45e53c(0xbc);}return undefined;}async[a49_0x1dda9b(0xe4)](_0x2287a0){const _0x151364=a49_0x1dda9b,{args:_0xeb69a,options:_0x5893ce}=_0x2287a0,_0x405e83=_0x5893ce[_0x151364(0xfe)],_0x461175=_0x5893ce[_0x151364(0xdb)],_0x2375fc=_0x5893ce[_0x151364(0x100)];cleanExpiredSessions();try{if(_0x461175){clearSessionContext(_0x5893ce[_0x151364(0xd8)]);const _0x55533f=getSessionID(_0x5893ce[_0x151364(0xd8)]);return console['log'](_0x151364(0xbe)+a49_0x3f6761[_0x151364(0xeb)]('cleared')+'\x20'+a49_0x3f6761[_0x151364(0xe2)](_0x151364(0xfd)+_0x55533f+')')),0x0;}if(_0xeb69a[_0x151364(0xe5)]===0x0){const _0x5582ba=new GlobalContext(_0x5893ce);return _0x405e83?_0x5582ba[_0x151364(0xe1)]():_0x5582ba[_0x151364(0xec)](),console[_0x151364(0x107)](a49_0x3f6761['dim'](_0x151364(0xbf))),console['log'](a49_0x3f6761[_0x151364(0xe2)]('Resources:\x20site,\x20database,\x20parent_segment,\x20llm_project,\x20agent,\x20profile,\x20engage_workspace,\x20release_channel')),console[_0x151364(0x107)](a49_0x3f6761[_0x151364(0xe2)](_0x151364(0x101))),0x0;}const _0x41d5df=_0xeb69a[0x0],_0x2f6367=_0xeb69a[0x1],_0x51e3e4=a49_0x4c71d7[_0x151364(0xff)](getConfigDir(),_0x151364(0x102));if(_0x2375fc){if(_0x41d5df===_0x151364(0xbb))return saveDefaultSiteToUserConfig(_0x2f6367),console['log'](_0x151364(0xe0)+a49_0x3f6761[_0x151364(0xeb)](_0x2f6367)),console[_0x151364(0x107)](a49_0x3f6761['dim'](_0x151364(0xf2)+_0x51e3e4)),0x0;if(_0x41d5df===_0x151364(0xfa)){if(!profileExists(_0x2f6367))return console[_0x151364(0xb7)](_0x151364(0xee)+_0x2f6367+'\x27\x20does\x20not\x20exist'),console[_0x151364(0xb7)](_0x151364(0xf5)),0x1;return saveActiveProfileToUserConfig(_0x2f6367),console['log'](_0x151364(0xf0)+a49_0x3f6761['green'](_0x2f6367)),console[_0x151364(0x107)](a49_0x3f6761[_0x151364(0xe2)](_0x151364(0xf2)+_0x51e3e4)),0x0;}if(_0x41d5df===_0x151364(0xf1))return saveReleaseChannel(_0x2f6367),console[_0x151364(0x107)](_0x151364(0xd3)+a49_0x3f6761[_0x151364(0xeb)](_0x2f6367)),console[_0x151364(0x107)](a49_0x3f6761['dim']('\x0aSaved\x20to:\x20'+_0x51e3e4)),_0x2f6367===_0x151364(0xe9)?(console[_0x151364(0x107)](a49_0x3f6761['dim'](_0x151364(0x106))),console[_0x151364(0x107)](a49_0x3f6761[_0x151364(0xe2)](_0x151364(0xd4)))):console[_0x151364(0x107)](a49_0x3f6761[_0x151364(0xe2)]('\x0aUpdate\x20notifications\x20will\x20check\x20the\x20@latest\x20(stable)\x20channel.')),0x0;}if(_0x41d5df===_0x151364(0xbb)){const _0x402061=getSessionID(_0x5893ce['session']);return saveSessionContext({'site':_0x2f6367},_0x5893ce['session']),console[_0x151364(0x107)]('Session\x20site\x20set\x20to:\x20'+a49_0x3f6761[_0x151364(0xeb)](_0x2f6367)+'\x20'+a49_0x3f6761[_0x151364(0xe2)](_0x151364(0xfd)+_0x402061+')')),console[_0x151364(0x107)](a49_0x3f6761[_0x151364(0xe2)]('\x0aTip:\x20Use\x20\x27tdx\x20use\x20--default\x20site\x20'+_0x2f6367+_0x151364(0xd1))),0x0;}if(_0x41d5df===_0x151364(0xfa)){if(!profileExists(_0x2f6367))return console[_0x151364(0xb7)](_0x151364(0xee)+_0x2f6367+_0x151364(0xd9)),console['error'](_0x151364(0xf5)),0x1;const _0x3ca8b1=getSessionID(_0x5893ce[_0x151364(0xd8)]);return saveSessionContext({'profile':_0x2f6367},_0x5893ce[_0x151364(0xd8)]),console[_0x151364(0x107)](_0x151364(0xcd)+a49_0x3f6761['green'](_0x2f6367)+'\x20'+a49_0x3f6761[_0x151364(0xe2)](_0x151364(0xfd)+_0x3ca8b1+')')),console[_0x151364(0x107)](a49_0x3f6761['dim'](_0x151364(0xde)+_0x2f6367+'\x27\x20to\x20save\x20permanently')),0x0;}const _0x337cc4={},_0x5a9238=getSessionID(_0x5893ce['session']);switch(_0x41d5df){case _0x151364(0xc1):_0x337cc4[_0x151364(0xc1)]=_0x2f6367,console['log']('Session\x20database\x20set\x20to:\x20'+a49_0x3f6761['green'](_0x2f6367)+'\x20'+a49_0x3f6761[_0x151364(0xe2)](_0x151364(0xfd)+_0x5a9238+')'));break;case'parent_segment':_0x337cc4[_0x151364(0xcb)]=_0x2f6367,console[_0x151364(0x107)]('Session\x20parent_segment\x20set\x20to:\x20'+a49_0x3f6761['green'](_0x2f6367)+'\x20'+a49_0x3f6761[_0x151364(0xe2)]('(session:\x20'+_0x5a9238+')'));break;case _0x151364(0xf9):_0x337cc4[_0x151364(0xf9)]=_0x2f6367,console[_0x151364(0x107)](_0x151364(0xdf)+a49_0x3f6761[_0x151364(0xeb)](_0x2f6367)+'\x20'+a49_0x3f6761[_0x151364(0xe2)](_0x151364(0xfd)+_0x5a9238+')'));break;case'agent':{const {projectName:_0x68a3a0,agentName:_0x188827}=parseAgentRef(_0x2f6367);_0x188827?(_0x337cc4[_0x151364(0xf9)]=_0x68a3a0,_0x337cc4[_0x151364(0xe8)]=_0x188827,console[_0x151364(0x107)](_0x151364(0xdf)+a49_0x3f6761['green'](_0x68a3a0)+'\x20'+a49_0x3f6761[_0x151364(0xe2)]('(session:\x20'+_0x5a9238+')')),console[_0x151364(0x107)]('Session\x20agent\x20set\x20to:\x20'+a49_0x3f6761[_0x151364(0xeb)](_0x188827)+'\x20'+a49_0x3f6761[_0x151364(0xe2)](_0x151364(0xfd)+_0x5a9238+')'))):(_0x337cc4['llm_agent']=_0x2f6367,console['log'](_0x151364(0xf3)+a49_0x3f6761['green'](_0x2f6367)+'\x20'+a49_0x3f6761[_0x151364(0xe2)](_0x151364(0xfd)+_0x5a9238+')')));break;}case _0x151364(0xdc):{try{await withSpinner('Verifying\x20workspace\x20\x27'+_0x2f6367+_0x151364(0xfc),()=>_0x2287a0[_0x151364(0xf4)][_0x151364(0xca)][_0x151364(0xb9)](_0x2f6367));}catch(_0x3e8ec4){if(_0x3e8ec4 instanceof SDKError&&(_0x3e8ec4['code']===ErrorCode[_0x151364(0xcf)]||_0x3e8ec4[_0x151364(0xc8)]===ErrorCode[_0x151364(0xd7)]))return console[_0x151364(0xb7)](_0x151364(0xf7)+_0x3e8ec4[_0x151364(0x105)]),console['error'](_0x151364(0xc3)),0x1;throw _0x3e8ec4;}_0x337cc4['engage_workspace']=_0x2f6367,console[_0x151364(0x107)](_0x151364(0xea)+a49_0x3f6761[_0x151364(0xeb)](_0x2f6367)+'\x20'+a49_0x3f6761[_0x151364(0xe2)](_0x151364(0xfd)+_0x5a9238+')'));break;}}return saveSessionContext(_0x337cc4,_0x5893ce[_0x151364(0xd8)]),console[_0x151364(0x107)](a49_0x3f6761[_0x151364(0xe2)](_0x151364(0x104))),0x0;}catch(_0x38b58c){return _0x38b58c instanceof Error&&console[_0x151364(0xb7)](_0x151364(0xf7)+_0x38b58c[_0x151364(0x105)]),0x1;}}}
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 +1 @@
1
- const a50_0x38c937=a50_0x50d7;function a50_0x50d7(_0xbb3ffa,_0x15ec8a){_0xbb3ffa=_0xbb3ffa-0x98;const _0x2e6902=a50_0x2e69();let _0x50d72b=_0x2e6902[_0xbb3ffa];return _0x50d72b;}(function(_0x404a5a,_0x3f21c5){const _0xc96ddb=a50_0x50d7,_0x50052c=_0x404a5a();while(!![]){try{const _0x4df7ac=-parseInt(_0xc96ddb(0x9b))/0x1*(parseInt(_0xc96ddb(0x98))/0x2)+parseInt(_0xc96ddb(0xb3))/0x3*(parseInt(_0xc96ddb(0x9d))/0x4)+-parseInt(_0xc96ddb(0xbc))/0x5+parseInt(_0xc96ddb(0xb6))/0x6+-parseInt(_0xc96ddb(0xaa))/0x7*(parseInt(_0xc96ddb(0xbe))/0x8)+-parseInt(_0xc96ddb(0xa6))/0x9+parseInt(_0xc96ddb(0xbd))/0xa;if(_0x4df7ac===_0x3f21c5)break;else _0x50052c['push'](_0x50052c['shift']());}catch(_0x679c94){_0x50052c['push'](_0x50052c['shift']());}}}(a50_0x2e69,0x87682));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';function a50_0x2e69(){const _0x500a7f=['execute','5453826gtzXkl','length','name','verbose','\x20\x20Cause:\x20','getCurrent','371430xIZAen','23681750xQjuNo','32584eEEYCE','2UVDvVj','cause','user\x20list','1002450prcQkq','data','311708miyzbO','administrator','yellow','error','Fetching\x20user\x20info...','\x20(admin)','user','Listing\x20users...','👤\x20','9672579VtwmPr','List\x20all\x20users\x20in\x20the\x20account','localeCompare','list','1785UAykhI','sort','account_owner','Error:\x20','dim','Unknown','message','description','\x20user','18gcKNXU','email'];a50_0x2e69=function(){return _0x500a7f;};return a50_0x2e69();}import{handleSDKOutput,handleSingleObjectOutput,isStructuredFormat}from'../core/command-output.js';import{withSpinner}from'../utils/spinner.js';import a50_0x3f714a from'chalk';export class UserCommand extends BaseCommand{['name']='user';['description']='Show\x20current\x20user\x20information';async['execute'](_0x428178){const _0x3885d8=a50_0x50d7,{options:_0x404ee8,tdx:_0x10805f}=_0x428178;try{const _0x57b4fd=await withSpinner(_0x3885d8(0xa1),()=>_0x10805f[_0x3885d8(0xa3)][_0x3885d8(0xbb)](),{'verbose':_0x404ee8['verbose']}),_0x1f1883=_0x57b4fd[_0x3885d8(0x9c)];return await handleSingleObjectOutput(_0x1f1883,_0x404ee8),0x0;}catch(_0x220241){if(_0x220241 instanceof SDKError)return console[_0x3885d8(0xa0)](_0x3885d8(0xad)+_0x220241[_0x3885d8(0xb0)]),_0x220241[_0x3885d8(0x99)]&&console[_0x3885d8(0xa0)](_0x3885d8(0xba)+_0x220241['cause']),0x1;throw _0x220241;}}}export class UserListCommand extends BaseCommand{[a50_0x38c937(0xb8)]=a50_0x38c937(0x9a);[a50_0x38c937(0xb1)]=a50_0x38c937(0xa7);async[a50_0x38c937(0xb5)](_0x341611){const _0x519f84=a50_0x38c937,{options:_0x2b6cc7,tdx:_0x57e29e}=_0x341611;try{const _0x2d06a6=await withSpinner(_0x519f84(0xa4),()=>_0x57e29e[_0x519f84(0xa3)][_0x519f84(0xa9)](),{'verbose':_0x2b6cc7[_0x519f84(0xb9)]}),_0x4a9e08=_0x2d06a6[_0x519f84(0x9c)];console[_0x519f84(0xa0)]('✔\x20Found\x20'+_0x4a9e08[_0x519f84(0xb7)]+_0x519f84(0xb2)+(_0x4a9e08[_0x519f84(0xb7)]!==0x1?'s':''));if(isStructuredFormat(_0x2b6cc7))await handleSDKOutput(_0x4a9e08,_0x2b6cc7);else{const _0x154fc0=[..._0x4a9e08][_0x519f84(0xab)]((_0x3a532f,_0x4afac9)=>String(_0x3a532f[_0x519f84(0xb8)]??'')[_0x519f84(0xa8)](String(_0x4afac9[_0x519f84(0xb8)]??'')));for(const _0x18c035 of _0x154fc0){const _0x1aea70=_0x18c035[_0x519f84(0xac)]?a50_0x3f714a[_0x519f84(0x9f)]('\x20(owner)'):_0x18c035[_0x519f84(0x9e)]?a50_0x3f714a['yellow'](_0x519f84(0xa2)):'',_0x1c91cb=_0x18c035['email']&&_0x18c035[_0x519f84(0xb4)]!==_0x18c035[_0x519f84(0xb8)]?a50_0x3f714a[_0x519f84(0xae)]('\x20<'+_0x18c035['email']+'>'):'';console['log'](_0x519f84(0xa5)+(_0x18c035[_0x519f84(0xb8)]??_0x519f84(0xaf))+_0x1c91cb+_0x1aea70);}}return 0x0;}catch(_0x66c36b){if(_0x66c36b instanceof SDKError)return console[_0x519f84(0xa0)](_0x519f84(0xad)+_0x66c36b['message']),_0x66c36b['cause']&&console['error']('\x20\x20Cause:\x20'+_0x66c36b[_0x519f84(0x99)]),0x1;throw _0x66c36b;}}}
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;}}}