@treasuredata/tdx 2026.3.0 → 2026.3.1

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 (200) hide show
  1. package/dist/bin.js +1 -1
  2. package/dist/build-info.json +3 -3
  3. package/dist/cli-categories.js +1 -1
  4. package/dist/cli.js +1 -1
  5. package/dist/commands/activations.js +1 -1
  6. package/dist/commands/agent-command.js +1 -1
  7. package/dist/commands/agent-test-command.js +1 -1
  8. package/dist/commands/api-command.js +1 -1
  9. package/dist/commands/auth-command.js +1 -1
  10. package/dist/commands/chat-command.js +1 -1
  11. package/dist/commands/claude-command.js +1 -1
  12. package/dist/commands/claude-statusline-command.js +1 -1
  13. package/dist/commands/claude-usage-command.js +1 -1
  14. package/dist/commands/command.js +1 -1
  15. package/dist/commands/connection-command.js +1 -1
  16. package/dist/commands/databases.js +1 -1
  17. package/dist/commands/delivery-command.js +1 -1
  18. package/dist/commands/describe.js +1 -1
  19. package/dist/commands/engage-campaign-pull-command.js +1 -1
  20. package/dist/commands/engage-campaign-push-command.js +1 -1
  21. package/dist/commands/engage-campaign-validate-command.js +1 -1
  22. package/dist/commands/engage-command.js +1 -1
  23. package/dist/commands/engage-template-pull-command.js +1 -1
  24. package/dist/commands/engage-template-push-command.js +1 -1
  25. package/dist/commands/engage-template-validate-command.js +1 -1
  26. package/dist/commands/job-command.js +1 -1
  27. package/dist/commands/journey-command.js +1 -1
  28. package/dist/commands/journey-validate-command.js +1 -1
  29. package/dist/commands/llm-command.js +1 -1
  30. package/dist/commands/mcp-command.js +1 -1
  31. package/dist/commands/parent-segment-command.js +1 -1
  32. package/dist/commands/profile-command.js +1 -1
  33. package/dist/commands/profiles-command.js +1 -1
  34. package/dist/commands/query-command.js +1 -1
  35. package/dist/commands/schedule-command.js +1 -1
  36. package/dist/commands/segment-command.js +1 -1
  37. package/dist/commands/segment-create-command.js +1 -1
  38. package/dist/commands/segment-fields-command.js +1 -1
  39. package/dist/commands/segment-pull-command.js +1 -1
  40. package/dist/commands/segment-push-command.js +1 -1
  41. package/dist/commands/segment-update-command.js +1 -1
  42. package/dist/commands/segment-use-command.js +1 -1
  43. package/dist/commands/segment-validate-command.js +1 -1
  44. package/dist/commands/segments.js +1 -1
  45. package/dist/commands/show.js +1 -1
  46. package/dist/commands/status-command.js +1 -1
  47. package/dist/commands/tables.js +1 -1
  48. package/dist/commands/unset-command.js +1 -1
  49. package/dist/commands/upgrade-command.js +1 -1
  50. package/dist/commands/use-command.js +1 -1
  51. package/dist/commands/user-command.js +1 -1
  52. package/dist/commands/workflow-command.js +1 -1
  53. package/dist/core/auth.js +1 -1
  54. package/dist/core/command-output.js +1 -1
  55. package/dist/core/config.d.ts +4 -4
  56. package/dist/core/config.d.ts.map +1 -1
  57. package/dist/core/config.js +1 -1
  58. package/dist/core/config.js.map +1 -1
  59. package/dist/core/connection-cache.js +1 -1
  60. package/dist/core/constants.js +1 -1
  61. package/dist/core/credential-cache.js +1 -1
  62. package/dist/core/global-context.js +1 -1
  63. package/dist/core/keychain.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/rate-limiter.js +1 -1
  95. package/dist/sdk/client/td-api-client.js +1 -1
  96. package/dist/sdk/client/trino-api-client.js +1 -1
  97. package/dist/sdk/client/workflow-client.js +1 -1
  98. package/dist/sdk/connection-validator.js +1 -1
  99. package/dist/sdk/connection.js +1 -1
  100. package/dist/sdk/delivery.js +1 -1
  101. package/dist/sdk/engage/campaign-pull.js +1 -1
  102. package/dist/sdk/engage/campaign-push.js +1 -1
  103. package/dist/sdk/engage/campaign-validator.js +1 -1
  104. package/dist/sdk/engage/campaign-yaml.js +1 -1
  105. package/dist/sdk/engage/template-pull.js +1 -1
  106. package/dist/sdk/engage/template-push.js +1 -1
  107. package/dist/sdk/engage/template-validator.js +1 -1
  108. package/dist/sdk/engage/template-yaml.js +1 -1
  109. package/dist/sdk/engage/types/campaign-def.js +1 -1
  110. package/dist/sdk/engage/types/campaign-schema.js +1 -1
  111. package/dist/sdk/engage/types/template-schema.js +1 -1
  112. package/dist/sdk/engage.js +1 -1
  113. package/dist/sdk/errors.js +1 -1
  114. package/dist/sdk/index.js +1 -1
  115. package/dist/sdk/io/index.js +1 -1
  116. package/dist/sdk/io/node-filesystem.js +1 -1
  117. package/dist/sdk/job.js +1 -1
  118. package/dist/sdk/journey.js +1 -1
  119. package/dist/sdk/llm/chat-cache.js +1 -1
  120. package/dist/sdk/llm/index.js +1 -1
  121. package/dist/sdk/llm/llm-backup-utils.js +1 -1
  122. package/dist/sdk/llm/model-factors.js +1 -1
  123. package/dist/sdk/personalization.js +1 -1
  124. package/dist/sdk/query/index.js +1 -1
  125. package/dist/sdk/query/sql-parser.js +1 -1
  126. package/dist/sdk/realtime.js +1 -1
  127. package/dist/sdk/schedule.js +1 -1
  128. package/dist/sdk/segment/child-segment-yaml.js +1 -1
  129. package/dist/sdk/segment/fields-display.js +1 -1
  130. package/dist/sdk/segment/file-discovery.js +1 -1
  131. package/dist/sdk/segment/journey-utils.js +1 -1
  132. package/dist/sdk/segment/journey-validator.js +1 -1
  133. package/dist/sdk/segment/journey-yaml.js +1 -1
  134. package/dist/sdk/segment/parent-segment-preview.js +1 -1
  135. package/dist/sdk/segment/parent-segment-yaml.js +1 -1
  136. package/dist/sdk/segment/pull-workflow.js +1 -1
  137. package/dist/sdk/segment/push-recovery.js +1 -1
  138. package/dist/sdk/segment/push-workflow.js +1 -1
  139. package/dist/sdk/segment/resolution-context.js +1 -1
  140. package/dist/sdk/segment/segment-path-parser.js +1 -1
  141. package/dist/sdk/segment/segment-ref-parser.js +1 -1
  142. package/dist/sdk/segment/segment-validator.js +1 -1
  143. package/dist/sdk/segment/target-resolution.js +1 -1
  144. package/dist/sdk/segment/tdx-config.js +1 -1
  145. package/dist/sdk/segment/types/activation-schema.js +1 -1
  146. package/dist/sdk/segment/types/journey-def.js +1 -1
  147. package/dist/sdk/segment/types/journey-schema.js +1 -1
  148. package/dist/sdk/segment/types/segment-def.js +1 -1
  149. package/dist/sdk/segment/types/segment-schema.js +1 -1
  150. package/dist/sdk/segment/validate-files.js +1 -1
  151. package/dist/sdk/segment/yaml-validator.js +1 -1
  152. package/dist/sdk/segment.js +1 -1
  153. package/dist/sdk/types/index.js +1 -1
  154. package/dist/sdk/types/progress.js +1 -1
  155. package/dist/sdk/user.js +1 -1
  156. package/dist/sdk/util/format-detector.js +1 -1
  157. package/dist/sdk/util/formatters.js +1 -1
  158. package/dist/sdk/util/index.js +1 -1
  159. package/dist/sdk/util/paginate.js +1 -1
  160. package/dist/sdk/util/tree-formatter.js +1 -1
  161. package/dist/sdk/workflow/archive-validation.js +1 -1
  162. package/dist/sdk/workflow/clone-workflow.js +1 -1
  163. package/dist/sdk/workflow/index.js +1 -1
  164. package/dist/sdk/workflow/pull-workflow.js +1 -1
  165. package/dist/sdk/workflow/push-workflow.js +1 -1
  166. package/dist/sdk/workflow/tdx-config.js +1 -1
  167. package/dist/sdk/workflow/workflow-utils.js +1 -1
  168. package/dist/test-utils/command-runner.js +1 -1
  169. package/dist/test-utils/factories.js +1 -1
  170. package/dist/test-utils/fixtures.js +1 -1
  171. package/dist/test-utils/http-mock.js +1 -1
  172. package/dist/test-utils/index.js +1 -1
  173. package/dist/utils/async.js +1 -1
  174. package/dist/utils/colors.js +1 -1
  175. package/dist/utils/diff.js +1 -1
  176. package/dist/utils/file-permissions.js +1 -1
  177. package/dist/utils/file-reader.js +1 -1
  178. package/dist/utils/github-releases.js +1 -1
  179. package/dist/utils/global-cache.js +1 -1
  180. package/dist/utils/json-loader.js +1 -1
  181. package/dist/utils/local-cache.js +1 -1
  182. package/dist/utils/logger/formatters/default-formatter.js +1 -1
  183. package/dist/utils/logger/formatters/index.js +1 -1
  184. package/dist/utils/logger/handlers/console-handler.js +1 -1
  185. package/dist/utils/logger/handlers/file-handler.js +1 -1
  186. package/dist/utils/logger/handlers/index.js +1 -1
  187. package/dist/utils/logger/handlers/null-handler.js +1 -1
  188. package/dist/utils/logger/index.js +1 -1
  189. package/dist/utils/logger/logger.js +1 -1
  190. package/dist/utils/logger/types.js +1 -1
  191. package/dist/utils/option-validation.js +1 -1
  192. package/dist/utils/process.js +1 -1
  193. package/dist/utils/prompt.js +1 -1
  194. package/dist/utils/spinner.js +1 -1
  195. package/dist/utils/sse-parser.js +1 -1
  196. package/dist/utils/string-utils.js +1 -1
  197. package/dist/utils/table-ref-parser.js +1 -1
  198. package/dist/utils/tdx-logger.js +1 -1
  199. package/dist/utils/version-check.js +1 -1
  200. package/package.json +1 -1
@@ -1 +1 @@
1
- const a39_0x1b71ae=a39_0x4cac;function a39_0x4cac(_0x429008,_0x22369c){_0x429008=_0x429008-0x168;const _0x1ac568=a39_0x1ac5();let _0x4cac12=_0x1ac568[_0x429008];return _0x4cac12;}(function(_0x4e0492,_0x5f2467){const _0x4329d5=a39_0x4cac,_0x15f08e=_0x4e0492();while(!![]){try{const _0x5e1566=parseInt(_0x4329d5(0x175))/0x1*(-parseInt(_0x4329d5(0x19b))/0x2)+-parseInt(_0x4329d5(0x19c))/0x3+parseInt(_0x4329d5(0x183))/0x4*(parseInt(_0x4329d5(0x186))/0x5)+-parseInt(_0x4329d5(0x176))/0x6*(parseInt(_0x4329d5(0x17f))/0x7)+parseInt(_0x4329d5(0x189))/0x8*(-parseInt(_0x4329d5(0x190))/0x9)+-parseInt(_0x4329d5(0x193))/0xa*(-parseInt(_0x4329d5(0x169))/0xb)+parseInt(_0x4329d5(0x168))/0xc;if(_0x5e1566===_0x5f2467)break;else _0x15f08e['push'](_0x15f08e['shift']());}catch(_0x3bdb71){_0x15f08e['push'](_0x15f08e['shift']());}}}(a39_0x1ac5,0x88fe3));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 a39_0x1ac5(){const _0x4e8135=['length','Resolved\x20folder\x20ID:\x20','Segment\x20ID:\x20','yellow','parentId','rule','.\x20Only\x20child\x20segments\x20can\x20be\x20updated.','Usage:\x20tdx\x20segment\x20update\x20<path>\x20[options]','folder','Error:\x20Segment\x20path\x20or\x20name\x20is\x20required','1NaxCGf','9390fAIpHi','kind','Resolving\x20path\x20\x27','Examples:','segment:update','INTERNAL','Update\x20existing\x20child\x20segment','execute','Parent\x20ID:\x20','1729NJCiNP','ruleFile','updateSegmentById','name','4jAnNIb','data','error','316085XUvOTr','⚠\x20Deprecation\x20warning:\x20`segment\x20update`\x20is\x20deprecated.','\x27...','8azkejD','segmentId','verbose','Error:\x20Cannot\x20update\x20','\x20\x20\x20Path:\x20','description','✔\x20Updated\x20segment\x20\x27','4388481jAOcRm','Resolved\x20relative\x20path\x20to:\x20','\x20\x20tdx\x20segment\x20update\x20\x22My\x20Audience/High\x20Value\x22\x20--description\x20\x22...\x22','490quJkUT','Updating\x20segment\x20\x27','Resolved\x20type:\x20','Use:\x20tdx\x20segment\x20update\x20<path_to_segment>\x20[options]','segment','type','resolveFolderId','segmentName','1040678WxwNYD','2016288LLDAQl','19953684pYHdpV','202422PEuOLq','Segment\x20ID\x20missing\x20from\x20resolved\x20path'];a39_0x1ac5=function(){return _0x4e8135;};return a39_0x1ac5();}import{SDKError,ErrorCode}from'../sdk/index.js';import a39_0x13d1fb from'chalk';export class SegmentUpdateCommand extends BaseCommand{[a39_0x1b71ae(0x182)]=a39_0x1b71ae(0x17a);[a39_0x1b71ae(0x18e)]=a39_0x1b71ae(0x17c);async[a39_0x1b71ae(0x17d)](_0x4f9057){const _0xcc23d5=a39_0x1b71ae;console[_0xcc23d5(0x185)](a39_0x13d1fb[_0xcc23d5(0x16e)](_0xcc23d5(0x187))),console[_0xcc23d5(0x185)](a39_0x13d1fb[_0xcc23d5(0x16e)]('\x20\x20Use\x20`tdx\x20sg\x20push`\x20with\x20YAML\x20files\x20instead.\x0a'));const {options:_0x5457b8,args:_0x24658a,tdx:_0x5c87da}=_0x4f9057,_0x176d63=_0x5457b8;if(_0x24658a[_0xcc23d5(0x16b)]===0x0)return console[_0xcc23d5(0x185)](_0xcc23d5(0x174)),console['error'](_0xcc23d5(0x172)),console[_0xcc23d5(0x185)](_0xcc23d5(0x179)),console[_0xcc23d5(0x185)](_0xcc23d5(0x192)),console[_0xcc23d5(0x185)]('\x20\x20tdx\x20segment\x20update\x20\x22High\x20Value\x22\x20--rule\x20\x27...\x27\x20\x20#\x20Relative\x20to\x20context'),0x1;const _0x235eaa=_0x24658a[0x0],_0x44e83c=_0x5457b8['segmentPath'];let _0x839635=_0x235eaa;_0x44e83c&&!_0x235eaa['includes']('/')&&(_0x839635=_0x44e83c+'/'+_0x235eaa,_0x176d63[_0xcc23d5(0x18b)]&&console['error'](_0xcc23d5(0x191)+_0x839635));const _0x1a1183=await withSpinner(_0xcc23d5(0x178)+_0x839635+_0xcc23d5(0x188),()=>_0x5c87da[_0xcc23d5(0x197)]['resolvePathToResource'](_0x839635),{'verbose':_0x176d63[_0xcc23d5(0x18b)]}),_0xeebd1b=_0x1a1183[_0xcc23d5(0x184)];_0x176d63[_0xcc23d5(0x18b)]&&console[_0xcc23d5(0x185)](_0xcc23d5(0x195)+_0xeebd1b[_0xcc23d5(0x198)]);if(_0xeebd1b[_0xcc23d5(0x198)]!==_0xcc23d5(0x197))return console['error'](_0xcc23d5(0x18c)+_0xeebd1b[_0xcc23d5(0x198)]+_0xcc23d5(0x171)),console[_0xcc23d5(0x185)](_0xcc23d5(0x196)),0x1;if(!_0xeebd1b[_0xcc23d5(0x18a)])throw new SDKError(ErrorCode[_0xcc23d5(0x17b)],_0xcc23d5(0x16a));const _0x3c6476=_0xeebd1b[_0xcc23d5(0x16f)],_0x597bc0=_0xeebd1b['segmentId'];_0x176d63['verbose']&&(console[_0xcc23d5(0x185)](_0xcc23d5(0x17e)+_0x3c6476),console['error'](_0xcc23d5(0x16d)+_0x597bc0));let _0x5525cf;if(_0x176d63[_0xcc23d5(0x173)]){const _0x11fffb=_0x176d63[_0xcc23d5(0x173)],_0x33cd67=await withSpinner('Resolving\x20folder\x20\x27'+_0x11fffb+_0xcc23d5(0x188),()=>_0x5c87da[_0xcc23d5(0x197)][_0xcc23d5(0x199)](_0x3c6476,_0x11fffb),{'verbose':_0x176d63['verbose']});_0x5525cf=parseInt(_0x33cd67[_0xcc23d5(0x184)],0xa),_0x176d63['verbose']&&console[_0xcc23d5(0x185)](_0xcc23d5(0x16c)+_0x5525cf);}const _0x2f4d0f=await loadJSONFromOptions(_0x176d63[_0xcc23d5(0x170)],_0x176d63[_0xcc23d5(0x180)]),_0x25d042={'name':_0x176d63['name'],'description':_0x176d63[_0xcc23d5(0x18e)],'rule':_0x2f4d0f,'kind':_0x176d63[_0xcc23d5(0x177)]!==undefined?parseInt(_0x176d63[_0xcc23d5(0x177)],0xa):undefined,'segmentFolderId':_0x5525cf},_0x2a0243=await withSpinner(_0xcc23d5(0x194)+_0xeebd1b[_0xcc23d5(0x19a)]+_0xcc23d5(0x188),()=>_0x5c87da['segment'][_0xcc23d5(0x181)](_0x3c6476,_0x597bc0,_0x25d042),{'verbose':_0x176d63[_0xcc23d5(0x18b)]}),_0x5e7b86=_0x2a0243['data'];return console[_0xcc23d5(0x185)](_0xcc23d5(0x18f)+_0x5e7b86['name']+'\x27'),_0x839635!==_0x235eaa&&console[_0xcc23d5(0x185)](_0xcc23d5(0x18d)+_0x839635),await handleSDKOutput([_0x5e7b86],_0x176d63),0x0;}}
1
+ const a39_0x8cfae4=a39_0x5bb3;function a39_0x5bb3(_0x32ca4a,_0x596785){_0x32ca4a=_0x32ca4a-0x87;const _0x4142a5=a39_0x4142();let _0x5bb3b0=_0x4142a5[_0x32ca4a];return _0x5bb3b0;}(function(_0x334ff7,_0x3951e4){const _0x17381e=a39_0x5bb3,_0x2281ea=_0x334ff7();while(!![]){try{const _0x14af2b=-parseInt(_0x17381e(0xb0))/0x1*(-parseInt(_0x17381e(0xa0))/0x2)+parseInt(_0x17381e(0x9b))/0x3+parseInt(_0x17381e(0xa9))/0x4+-parseInt(_0x17381e(0x94))/0x5*(-parseInt(_0x17381e(0x97))/0x6)+-parseInt(_0x17381e(0x90))/0x7*(-parseInt(_0x17381e(0xa7))/0x8)+parseInt(_0x17381e(0x9e))/0x9+parseInt(_0x17381e(0x8a))/0xa*(-parseInt(_0x17381e(0x88))/0xb);if(_0x14af2b===_0x3951e4)break;else _0x2281ea['push'](_0x2281ea['shift']());}catch(_0x57af30){_0x2281ea['push'](_0x2281ea['shift']());}}}(a39_0x4142,0xdb054));import{BaseCommand}from'./command.js';import{handleSDKOutput}from'../core/command-output.js';import{withSpinner}from'../utils/spinner.js';import{loadJSONFromOptions}from'../utils/json-loader.js';import{SDKError,ErrorCode}from'../sdk/index.js';import a39_0xda8e03 from'chalk';function a39_0x4142(){const _0x4d6a8f=['49cSsJRU','type','updateSegmentById','Resolving\x20path\x20\x27','2395UDzsMw','\x27...','segment','14508rnyEQH','name','data','parentId','687456HLuOaB','error','execute','7040655IewbHn','Segment\x20ID\x20missing\x20from\x20resolved\x20path','1756754aWuxbl','resolvePathToResource','kind','folder','Error:\x20Cannot\x20update\x20','\x20\x20tdx\x20segment\x20update\x20\x22My\x20Audience/High\x20Value\x22\x20--description\x20\x22...\x22','Resolved\x20relative\x20path\x20to:\x20','18376UTOQfF','Resolving\x20folder\x20\x27','2162660BJUSOd','segment:update','segmentName','description','segmentId','\x20\x20Use\x20`tdx\x20sg\x20push`\x20with\x20YAML\x20files\x20instead.\x0a','.\x20Only\x20child\x20segments\x20can\x20be\x20updated.','1EEvwYd','⚠\x20Deprecation\x20warning:\x20`segment\x20update`\x20is\x20deprecated.','Parent\x20ID:\x20','verbose','yellow','ruleFile','INTERNAL','12562QygXAq','Error:\x20Segment\x20path\x20or\x20name\x20is\x20required','23710DZDOVa','Use:\x20tdx\x20segment\x20update\x20<path_to_segment>\x20[options]','\x20\x20tdx\x20segment\x20update\x20\x22High\x20Value\x22\x20--rule\x20\x27...\x27\x20\x20#\x20Relative\x20to\x20context','Examples:','Resolved\x20type:\x20','Usage:\x20tdx\x20segment\x20update\x20<path>\x20[options]'];a39_0x4142=function(){return _0x4d6a8f;};return a39_0x4142();}export class SegmentUpdateCommand extends BaseCommand{['name']=a39_0x8cfae4(0xaa);['description']='Update\x20existing\x20child\x20segment';async[a39_0x8cfae4(0x9d)](_0x157724){const _0x1a4df2=a39_0x8cfae4;console[_0x1a4df2(0x9c)](a39_0xda8e03[_0x1a4df2(0xb4)](_0x1a4df2(0xb1))),console['error'](a39_0xda8e03['yellow'](_0x1a4df2(0xae)));const {options:_0x39c317,args:_0x4056f5,tdx:_0x511509}=_0x157724,_0x5c1c77=_0x39c317;if(_0x4056f5['length']===0x0)return console['error'](_0x1a4df2(0x89)),console[_0x1a4df2(0x9c)](_0x1a4df2(0x8f)),console['error'](_0x1a4df2(0x8d)),console[_0x1a4df2(0x9c)](_0x1a4df2(0xa5)),console['error'](_0x1a4df2(0x8c)),0x1;const _0x3bced6=_0x4056f5[0x0],_0x2b21c1=_0x39c317['segmentPath'];let _0x44cb1f=_0x3bced6;_0x2b21c1&&!_0x3bced6['includes']('/')&&(_0x44cb1f=_0x2b21c1+'/'+_0x3bced6,_0x5c1c77['verbose']&&console[_0x1a4df2(0x9c)](_0x1a4df2(0xa6)+_0x44cb1f));const _0x2b8ee8=await withSpinner(_0x1a4df2(0x93)+_0x44cb1f+_0x1a4df2(0x95),()=>_0x511509[_0x1a4df2(0x96)][_0x1a4df2(0xa1)](_0x44cb1f),{'verbose':_0x5c1c77[_0x1a4df2(0xb3)]}),_0x336516=_0x2b8ee8[_0x1a4df2(0x99)];_0x5c1c77[_0x1a4df2(0xb3)]&&console[_0x1a4df2(0x9c)](_0x1a4df2(0x8e)+_0x336516['type']);if(_0x336516['type']!==_0x1a4df2(0x96))return console[_0x1a4df2(0x9c)](_0x1a4df2(0xa4)+_0x336516[_0x1a4df2(0x91)]+_0x1a4df2(0xaf)),console[_0x1a4df2(0x9c)](_0x1a4df2(0x8b)),0x1;if(!_0x336516[_0x1a4df2(0xad)])throw new SDKError(ErrorCode[_0x1a4df2(0x87)],_0x1a4df2(0x9f));const _0x33230d=_0x336516[_0x1a4df2(0x9a)],_0x9fbee7=_0x336516[_0x1a4df2(0xad)];_0x5c1c77[_0x1a4df2(0xb3)]&&(console[_0x1a4df2(0x9c)](_0x1a4df2(0xb2)+_0x33230d),console[_0x1a4df2(0x9c)]('Segment\x20ID:\x20'+_0x9fbee7));let _0x141986;if(_0x5c1c77[_0x1a4df2(0xa3)]){const _0x38e2b1=_0x5c1c77[_0x1a4df2(0xa3)],_0x3f3876=await withSpinner(_0x1a4df2(0xa8)+_0x38e2b1+_0x1a4df2(0x95),()=>_0x511509[_0x1a4df2(0x96)]['resolveFolderId'](_0x33230d,_0x38e2b1),{'verbose':_0x5c1c77[_0x1a4df2(0xb3)]});_0x141986=parseInt(_0x3f3876[_0x1a4df2(0x99)],0xa),_0x5c1c77[_0x1a4df2(0xb3)]&&console[_0x1a4df2(0x9c)]('Resolved\x20folder\x20ID:\x20'+_0x141986);}const _0x176044=await loadJSONFromOptions(_0x5c1c77['rule'],_0x5c1c77[_0x1a4df2(0xb5)]),_0x4780a6={'name':_0x5c1c77['name'],'description':_0x5c1c77[_0x1a4df2(0xac)],'rule':_0x176044,'kind':_0x5c1c77[_0x1a4df2(0xa2)]!==undefined?parseInt(_0x5c1c77['kind'],0xa):undefined,'segmentFolderId':_0x141986},_0x4cc784=await withSpinner('Updating\x20segment\x20\x27'+_0x336516[_0x1a4df2(0xab)]+_0x1a4df2(0x95),()=>_0x511509[_0x1a4df2(0x96)][_0x1a4df2(0x92)](_0x33230d,_0x9fbee7,_0x4780a6),{'verbose':_0x5c1c77[_0x1a4df2(0xb3)]}),_0xef7d37=_0x4cc784['data'];return console[_0x1a4df2(0x9c)]('✔\x20Updated\x20segment\x20\x27'+_0xef7d37[_0x1a4df2(0x98)]+'\x27'),_0x44cb1f!==_0x3bced6&&console[_0x1a4df2(0x9c)]('\x20\x20\x20Path:\x20'+_0x44cb1f),await handleSDKOutput([_0xef7d37],_0x5c1c77),0x0;}}
@@ -1 +1 @@
1
- const a40_0x3b1be8=a40_0x5ace;(function(_0x4f17e4,_0x3a077f){const _0x4abf0c=a40_0x5ace,_0x5dcad9=_0x4f17e4();while(!![]){try{const _0x3fd4f9=parseInt(_0x4abf0c(0x11a))/0x1*(-parseInt(_0x4abf0c(0x117))/0x2)+parseInt(_0x4abf0c(0xec))/0x3*(parseInt(_0x4abf0c(0xe7))/0x4)+parseInt(_0x4abf0c(0xf2))/0x5*(-parseInt(_0x4abf0c(0x108))/0x6)+-parseInt(_0x4abf0c(0xfa))/0x7*(parseInt(_0x4abf0c(0xf4))/0x8)+parseInt(_0x4abf0c(0x10d))/0x9*(-parseInt(_0x4abf0c(0x100))/0xa)+-parseInt(_0x4abf0c(0xf6))/0xb*(parseInt(_0x4abf0c(0xfc))/0xc)+-parseInt(_0x4abf0c(0x11b))/0xd*(-parseInt(_0x4abf0c(0xe4))/0xe);if(_0x3fd4f9===_0x3a077f)break;else _0x5dcad9['push'](_0x5dcad9['shift']());}catch(_0x2f3323){_0x5dcad9['push'](_0x5dcad9['shift']());}}}(a40_0x1289,0xe1c7d));function a40_0x1289(){const _0x15647f=['segments','parent_segment','\x27...','177PNHLnu','description','folderId','Error:\x20Cannot\x20set\x20context\x20to\x20a\x20segment.','\x20\x20tdx\x20segment\x20use\x20\x22My\x20Audience\x22','segmentPath','501555RylvvE','Resolved\x20relative\x20path\x20to:\x20','368ibDSRr','length','17358Ehrnan','dim','Resolved\x20path\x20type:\x20','log','23002UsKXcP','Use\x20\x22tdx\x20use\x22\x20to\x20see\x20all\x20context\x20parameters','7284eniBLt','Folder\x20ID:\x20','join','isAbsolute','55610mgDjzy','Use\x20an\x20absolute\x20path\x20or\x20set\x20context\x20with:\x20tdx\x20segment\x20use\x20<parent_name>','parentName','fullPath','site','name','Target\x20path:\x20','Set\x20current\x20segment/folder\x20context\x20for\x20navigation','66YsbzdE','folderPath','\x20\x20tdx\x20segment\x20use\x20..\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Go\x20to\x20parent','✔\x20Context\x20cleared.\x20Back\x20to\x20root.','verbose','27tILyVV','Site:\x20','cyan','isDirectory','session','Parent\x20ID:\x20','type','data','resolvePathToResource','execute','2505334UyJkWV','Error:\x20Path\x20is\x20required\x0a','Usage:\x20tdx\x20segment\x20use\x20<path>','1emcZig','476983cbPhsD','segment','segment:use','green','red','error','split','\x20\x20tdx\x20segment\x20use\x20\x22My\x20Audience/Marketing\x22','Tip:\x20Run\x20`tdx\x20sg\x20pull\x20<parent_name>`\x20first\x20to\x20create\x20the\x20folder\x20structure','1106ZYqwzB','Examples:','✔\x20Context\x20set\x20to:\x20','102236cTzYnf','Error:\x20No\x20context\x20set.\x20Cannot\x20use\x20relative\x20path.'];a40_0x1289=function(){return _0x15647f;};return a40_0x1289();}import{existsSync,statSync}from'fs';import a40_0x59de6c from'chalk';import{BaseCommand}from'./command.js';import{saveSessionContext}from'../core/session.js';function a40_0x5ace(_0x15141e,_0x3a4d46){_0x15141e=_0x15141e-0xe4;const _0x1289c5=a40_0x1289();let _0x5ace8a=_0x1289c5[_0x15141e];return _0x5ace8a;}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{[a40_0x3b1be8(0x105)]=a40_0x3b1be8(0x11d);[a40_0x3b1be8(0xed)]=a40_0x3b1be8(0x107);async[a40_0x3b1be8(0x116)](_0x2eb14b){const _0xfc9a8=a40_0x3b1be8,{options:_0x492576,args:_0x4f63f6,tdx:_0x18feaf}=_0x2eb14b;if(_0x4f63f6[_0xfc9a8(0xf5)]===0x0)return console[_0xfc9a8(0x120)](a40_0x59de6c[_0xfc9a8(0x11f)](_0xfc9a8(0x118))),console[_0xfc9a8(0x120)](_0xfc9a8(0x119)),console[_0xfc9a8(0x120)](_0xfc9a8(0xe5)),console['error'](_0xfc9a8(0xf0)),console[_0xfc9a8(0x120)](_0xfc9a8(0x122)),console['error']('\x20\x20tdx\x20segment\x20use\x20/\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Clear\x20context'),console[_0xfc9a8(0x120)](_0xfc9a8(0x10a)),0x1;const _0x32e6ea=_0x4f63f6[0x0],_0x2a4ec2=_0x492576[_0xfc9a8(0x111)];try{if(_0x32e6ea==='/')return saveSessionContext({'segment_path':undefined},_0x2a4ec2),console['log'](a40_0x59de6c[_0xfc9a8(0x11e)](_0xfc9a8(0x10b))),0x0;if(existsSync(_0x32e6ea)&&statSync(_0x32e6ea)[_0xfc9a8(0x110)]()){let _0x3becf2;try{_0x3becf2=findTdxConfig(_0x32e6ea);}catch{return console['error'](a40_0x59de6c[_0xfc9a8(0x11f)]('Error:\x20No\x20tdx.json\x20found\x20in\x20or\x20above:\x20'+_0x32e6ea)),console[_0xfc9a8(0x120)](a40_0x59de6c[_0xfc9a8(0x10f)](_0xfc9a8(0x123))),0x1;}const _0x2cfb5d=_0x3becf2['config'][_0xfc9a8(0xea)];return saveSessionContext({'segment_path':_0x2cfb5d,'parent_segment':_0x2cfb5d},_0x2a4ec2),console[_0xfc9a8(0xf9)](a40_0x59de6c[_0xfc9a8(0x11e)](_0xfc9a8(0xe6)+a40_0x59de6c['cyan'](_0x2cfb5d))),0x0;}const _0xb71ee4=_0x492576[_0xfc9a8(0xf1)];let _0x18a0ee=_0x32e6ea;const _0x152998=parsePath(_0x32e6ea);if(!_0x152998[_0xfc9a8(0xff)]){if(!_0xb71ee4)return console[_0xfc9a8(0x120)](a40_0x59de6c[_0xfc9a8(0x11f)](_0xfc9a8(0xe8))),console[_0xfc9a8(0x120)](a40_0x59de6c[_0xfc9a8(0x10f)](_0xfc9a8(0x101))),0x1;if(_0x32e6ea==='..'){const _0x1127a0=_0xb71ee4[_0xfc9a8(0x121)]('/')['slice'](0x0,-0x1)[_0xfc9a8(0xfe)]('/');_0x18a0ee=_0x1127a0||'/';}else _0x32e6ea==='.'?_0x18a0ee=_0xb71ee4:_0x18a0ee=_0xb71ee4+'/'+_0x32e6ea;_0x492576[_0xfc9a8(0x10c)]&&console[_0xfc9a8(0x120)](_0xfc9a8(0xf3)+_0x18a0ee);}if(_0x18a0ee==='/'||_0x18a0ee==='')return saveSessionContext({'segment_path':undefined},_0x2a4ec2),console[_0xfc9a8(0xf9)](a40_0x59de6c['green'](_0xfc9a8(0x10b))),0x0;_0x18a0ee=normalizePath(_0x18a0ee);const _0x12a239=parsePath(_0x18a0ee)[_0xfc9a8(0xe9)];if(_0x12a239[_0xfc9a8(0xf5)]===0x0)return saveSessionContext({'segment_path':undefined},_0x2a4ec2),console['log'](a40_0x59de6c['green'](_0xfc9a8(0x10b))),0x0;_0x492576[_0xfc9a8(0x10c)]&&(console['error'](_0xfc9a8(0x10e)+_0x492576[_0xfc9a8(0x104)]),console[_0xfc9a8(0x120)](_0xfc9a8(0x106)+_0x18a0ee));const _0x2db12a=await withSpinner('Resolving\x20path\x20\x27'+_0x18a0ee+_0xfc9a8(0xeb),()=>_0x18feaf[_0xfc9a8(0x11c)][_0xfc9a8(0x115)](_0x18a0ee),{'verbose':_0x492576[_0xfc9a8(0x10c)]}),_0x41988c=_0x2db12a[_0xfc9a8(0x114)];_0x492576['verbose']&&(console[_0xfc9a8(0x120)](_0xfc9a8(0xf8)+_0x41988c[_0xfc9a8(0x113)]),console[_0xfc9a8(0x120)](_0xfc9a8(0x112)+_0x41988c['parentId']),_0x41988c[_0xfc9a8(0xee)]&&console['error'](_0xfc9a8(0xfd)+_0x41988c[_0xfc9a8(0xee)]));if(_0x41988c['type']===_0xfc9a8(0x11c))return console[_0xfc9a8(0x120)](a40_0x59de6c[_0xfc9a8(0x11f)](_0xfc9a8(0xef))),console[_0xfc9a8(0x120)]('Context\x20can\x20only\x20be\x20set\x20to\x20a\x20parent\x20segment\x20or\x20folder.'),console[_0xfc9a8(0x120)](a40_0x59de6c[_0xfc9a8(0x10f)]('Use:\x20tdx\x20segment\x20use\x20'+_0x41988c['parentName']+(_0x41988c[_0xfc9a8(0x109)]?'/'+_0x41988c[_0xfc9a8(0x109)][_0xfc9a8(0xfe)]('/'):''))),0x1;return saveSessionContext({'segment_path':_0x41988c[_0xfc9a8(0x103)],'parent_segment':_0x41988c[_0xfc9a8(0x102)]},_0x2a4ec2),console['log'](a40_0x59de6c[_0xfc9a8(0x11e)](_0xfc9a8(0xe6)+a40_0x59de6c[_0xfc9a8(0x10f)](_0x41988c[_0xfc9a8(0x103)]))),_0x492576['verbose']&&(console[_0xfc9a8(0x120)](a40_0x59de6c[_0xfc9a8(0xf7)]('Use\x20\x22tdx\x20segments\x22\x20to\x20list\x20contents\x20in\x20this\x20context')),console[_0xfc9a8(0x120)](a40_0x59de6c['dim'](_0xfc9a8(0xfb)))),0x0;}catch(_0x57fa5d){throw _0x57fa5d;}}}
1
+ const a40_0x569ac6=a40_0x4c1e;(function(_0x5f1c4d,_0x55e16a){const _0x3e7ccf=a40_0x4c1e,_0xfad0a0=_0x5f1c4d();while(!![]){try{const _0x200798=-parseInt(_0x3e7ccf(0x151))/0x1*(-parseInt(_0x3e7ccf(0x152))/0x2)+parseInt(_0x3e7ccf(0x14c))/0x3*(parseInt(_0x3e7ccf(0x166))/0x4)+parseInt(_0x3e7ccf(0x14b))/0x5+parseInt(_0x3e7ccf(0x168))/0x6+parseInt(_0x3e7ccf(0x16f))/0x7*(parseInt(_0x3e7ccf(0x157))/0x8)+-parseInt(_0x3e7ccf(0x161))/0x9*(parseInt(_0x3e7ccf(0x163))/0xa)+-parseInt(_0x3e7ccf(0x16e))/0xb*(parseInt(_0x3e7ccf(0x169))/0xc);if(_0x200798===_0x55e16a)break;else _0xfad0a0['push'](_0xfad0a0['shift']());}catch(_0x18f2ee){_0xfad0a0['push'](_0xfad0a0['shift']());}}}(a40_0x100b,0xec6b9));function a40_0x100b(){const _0x29a529=['1981jBOpiI','verbose','Use:\x20tdx\x20segment\x20use\x20','Target\x20path:\x20','Resolving\x20path\x20\x27','✔\x20Context\x20cleared.\x20Back\x20to\x20root.','green','site','Folder\x20ID:\x20','join','session','log','segment:use','type','cyan','name','828730fbItJb','21bvZCza','red','fullPath','split','parentId','58480YXIBJW','46ygTprJ','length','isAbsolute','Site:\x20','Use\x20an\x20absolute\x20path\x20or\x20set\x20context\x20with:\x20tdx\x20segment\x20use\x20<parent_name>','41848lYFIvu','✔\x20Context\x20set\x20to:\x20','folderPath','description','segment','data','Error:\x20Path\x20is\x20required\x0a','folderId','error','Set\x20current\x20segment/folder\x20context\x20for\x20navigation','2935557RhrTEz','Tip:\x20Run\x20`tdx\x20sg\x20pull\x20<parent_name>`\x20first\x20to\x20create\x20the\x20folder\x20structure','40xrUYTe','Usage:\x20tdx\x20segment\x20use\x20<path>','execute','444508ksJWUA','segments','6726588nbwAfo','36tveHAt','Error:\x20No\x20tdx.json\x20found\x20in\x20or\x20above:\x20','Resolved\x20relative\x20path\x20to:\x20','Use\x20\x22tdx\x20use\x22\x20to\x20see\x20all\x20context\x20parameters','Examples:','9595949MPzljY'];a40_0x100b=function(){return _0x29a529;};return a40_0x100b();}import{existsSync,statSync}from'fs';function a40_0x4c1e(_0x43f1cb,_0x593509){_0x43f1cb=_0x43f1cb-0x13c;const _0x100bcc=a40_0x100b();let _0x4c1ee9=_0x100bcc[_0x43f1cb];return _0x4c1ee9;}import a40_0x15adb0 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{[a40_0x569ac6(0x14a)]=a40_0x569ac6(0x147);[a40_0x569ac6(0x15a)]=a40_0x569ac6(0x160);async[a40_0x569ac6(0x165)](_0xb1b952){const _0x2daea3=a40_0x569ac6,{options:_0x5c8727,args:_0x19b398,tdx:_0x28197e}=_0xb1b952;if(_0x19b398['length']===0x0)return console[_0x2daea3(0x15f)](a40_0x15adb0[_0x2daea3(0x14d)](_0x2daea3(0x15d))),console[_0x2daea3(0x15f)](_0x2daea3(0x164)),console[_0x2daea3(0x15f)](_0x2daea3(0x16d)),console[_0x2daea3(0x15f)]('\x20\x20tdx\x20segment\x20use\x20\x22My\x20Audience\x22'),console['error']('\x20\x20tdx\x20segment\x20use\x20\x22My\x20Audience/Marketing\x22'),console['error']('\x20\x20tdx\x20segment\x20use\x20/\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Clear\x20context'),console[_0x2daea3(0x15f)]('\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 _0x43b9e6=_0x19b398[0x0],_0x344161=_0x5c8727[_0x2daea3(0x145)];try{if(_0x43b9e6==='/')return saveSessionContext({'segment_path':undefined},_0x344161),console[_0x2daea3(0x146)](a40_0x15adb0[_0x2daea3(0x141)](_0x2daea3(0x140))),0x0;if(existsSync(_0x43b9e6)&&statSync(_0x43b9e6)['isDirectory']()){let _0x147965;try{_0x147965=findTdxConfig(_0x43b9e6);}catch{return console['error'](a40_0x15adb0[_0x2daea3(0x14d)](_0x2daea3(0x16a)+_0x43b9e6)),console['error'](a40_0x15adb0['cyan'](_0x2daea3(0x162))),0x1;}const _0x6ec005=_0x147965['config']['parent_segment'];return saveSessionContext({'segment_path':_0x6ec005,'parent_segment':_0x6ec005},_0x344161),console[_0x2daea3(0x146)](a40_0x15adb0[_0x2daea3(0x141)](_0x2daea3(0x158)+a40_0x15adb0[_0x2daea3(0x149)](_0x6ec005))),0x0;}const _0x345506=_0x5c8727['segmentPath'];let _0x275249=_0x43b9e6;const _0x41643e=parsePath(_0x43b9e6);if(!_0x41643e[_0x2daea3(0x154)]){if(!_0x345506)return console['error'](a40_0x15adb0[_0x2daea3(0x14d)]('Error:\x20No\x20context\x20set.\x20Cannot\x20use\x20relative\x20path.')),console['error'](a40_0x15adb0['cyan'](_0x2daea3(0x156))),0x1;if(_0x43b9e6==='..'){const _0x121393=_0x345506[_0x2daea3(0x14f)]('/')['slice'](0x0,-0x1)['join']('/');_0x275249=_0x121393||'/';}else _0x43b9e6==='.'?_0x275249=_0x345506:_0x275249=_0x345506+'/'+_0x43b9e6;_0x5c8727['verbose']&&console[_0x2daea3(0x15f)](_0x2daea3(0x16b)+_0x275249);}if(_0x275249==='/'||_0x275249==='')return saveSessionContext({'segment_path':undefined},_0x344161),console[_0x2daea3(0x146)](a40_0x15adb0[_0x2daea3(0x141)](_0x2daea3(0x140))),0x0;_0x275249=normalizePath(_0x275249);const _0x33e5fb=parsePath(_0x275249)[_0x2daea3(0x167)];if(_0x33e5fb[_0x2daea3(0x153)]===0x0)return saveSessionContext({'segment_path':undefined},_0x344161),console[_0x2daea3(0x146)](a40_0x15adb0['green']('✔\x20Context\x20cleared.\x20Back\x20to\x20root.')),0x0;_0x5c8727[_0x2daea3(0x13c)]&&(console[_0x2daea3(0x15f)](_0x2daea3(0x155)+_0x5c8727[_0x2daea3(0x142)]),console['error'](_0x2daea3(0x13e)+_0x275249));const _0x3ad4c7=await withSpinner(_0x2daea3(0x13f)+_0x275249+'\x27...',()=>_0x28197e[_0x2daea3(0x15b)]['resolvePathToResource'](_0x275249),{'verbose':_0x5c8727[_0x2daea3(0x13c)]}),_0x3263ff=_0x3ad4c7[_0x2daea3(0x15c)];_0x5c8727['verbose']&&(console['error']('Resolved\x20path\x20type:\x20'+_0x3263ff['type']),console['error']('Parent\x20ID:\x20'+_0x3263ff[_0x2daea3(0x150)]),_0x3263ff[_0x2daea3(0x15e)]&&console[_0x2daea3(0x15f)](_0x2daea3(0x143)+_0x3263ff[_0x2daea3(0x15e)]));if(_0x3263ff[_0x2daea3(0x148)]===_0x2daea3(0x15b))return console[_0x2daea3(0x15f)](a40_0x15adb0['red']('Error:\x20Cannot\x20set\x20context\x20to\x20a\x20segment.')),console[_0x2daea3(0x15f)]('Context\x20can\x20only\x20be\x20set\x20to\x20a\x20parent\x20segment\x20or\x20folder.'),console[_0x2daea3(0x15f)](a40_0x15adb0['cyan'](_0x2daea3(0x13d)+_0x3263ff['parentName']+(_0x3263ff[_0x2daea3(0x159)]?'/'+_0x3263ff[_0x2daea3(0x159)][_0x2daea3(0x144)]('/'):''))),0x1;return saveSessionContext({'segment_path':_0x3263ff[_0x2daea3(0x14e)],'parent_segment':_0x3263ff['parentName']},_0x344161),console[_0x2daea3(0x146)](a40_0x15adb0[_0x2daea3(0x141)](_0x2daea3(0x158)+a40_0x15adb0[_0x2daea3(0x149)](_0x3263ff[_0x2daea3(0x14e)]))),_0x5c8727['verbose']&&(console[_0x2daea3(0x15f)](a40_0x15adb0['dim']('Use\x20\x22tdx\x20segments\x22\x20to\x20list\x20contents\x20in\x20this\x20context')),console['error'](a40_0x15adb0['dim'](_0x2daea3(0x16c)))),0x0;}catch(_0x930815){throw _0x930815;}}}
@@ -1 +1 @@
1
- const a41_0x583295=a41_0x35bc;(function(_0x1cb90b,_0x3f7c3e){const _0x11919e=a41_0x35bc,_0x5a0e83=_0x1cb90b();while(!![]){try{const _0x2a8d1d=parseInt(_0x11919e(0xc8))/0x1*(-parseInt(_0x11919e(0x9f))/0x2)+-parseInt(_0x11919e(0xc7))/0x3*(-parseInt(_0x11919e(0xa9))/0x4)+-parseInt(_0x11919e(0x98))/0x5*(parseInt(_0x11919e(0xa8))/0x6)+-parseInt(_0x11919e(0xb4))/0x7*(parseInt(_0x11919e(0xac))/0x8)+parseInt(_0x11919e(0xc3))/0x9*(-parseInt(_0x11919e(0xb6))/0xa)+parseInt(_0x11919e(0xaa))/0xb*(-parseInt(_0x11919e(0xa4))/0xc)+parseInt(_0x11919e(0xb0))/0xd*(parseInt(_0x11919e(0xb7))/0xe);if(_0x2a8d1d===_0x3f7c3e)break;else _0x5a0e83['push'](_0x5a0e83['shift']());}catch(_0x3c1a29){_0x5a0e83['push'](_0x5a0e83['shift']());}}}(a41_0x3e10,0x1f8ed));function a41_0x35bc(_0x302938,_0x11d798){_0x302938=_0x302938-0x96;const _0x3e109f=a41_0x3e10();let _0x35bc22=_0x3e109f[_0x302938];return _0x35bc22;}import{BaseCommand}from'./command.js';import{resolveTarget,isSuccessfulResolution}from'../sdk/segment/target-resolution.js';import{findYamlFiles}from'../sdk/segment/file-discovery.js';function a41_0x3e10(){const _0x304338=['\x20warning(s)\x20found','helpText','log','errors','dim','.yaml','error','filePath','315JSyyZc','\x20file(s)\x20valid','parentSegment','\x20valid','1536QJxJii','9181wbemrI','Validation\x20failed:\x20','✔\x20All\x20','description','execute','72035cqzvsJ','hasErrors','warningCount','name','targetDir','length','green','2akQxHz','cwd','message','\x20warning(s)','\x20\x20\x20\x20\x20\x20\x20tdx\x20sg\x20validate\x20<file_path>\x20\x20#\x20Validate\x20specific\x20file','629028wdRYHp','errorCode','\x20error(s)','yellow','42NJVDjP','1248rQEENT','11cgnQMa','warnings','272uJhPAj','type','no_parent','cyan','13lYMdJq','\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','invalidCount','valid','7707xTIGep','Error:\x20File\x20must\x20have\x20.yml\x20or\x20.yaml\x20extension:\x20','67510emDsAk','5679590uyGOPU','segment:validate','red','endsWith'];a41_0x3e10=function(){return _0x304338;};return a41_0x3e10();}import{existsSync}from'fs';import a41_0x2a3a8a 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{[a41_0x583295(0x9b)]=a41_0x583295(0xb8);[a41_0x583295(0x96)]='Validate\x20segment\x20and\x20journey\x20YAML\x20files';async[a41_0x583295(0x97)](_0x4b9b41){const _0x176673=a41_0x583295,{options:_0x16a836,args:_0x1d4b5f}=_0x4b9b41,_0x366dbe=_0x16a836,_0x41a676=await resolveTarget({'arg':_0x1d4b5f[0x0],'contextParent':_0x16a836[_0x176673(0xc5)],'cwd':process[_0x176673(0xa0)]()});if(!isSuccessfulResolution(_0x41a676))return _0x41a676[_0x176673(0xa5)]===_0x176673(0xae)?(console[_0x176673(0xc1)](a41_0x2a3a8a[_0x176673(0xa7)]('parent_segment\x20is\x20not\x20set.\x20Use\x20`tdx\x20sg\x20use\x20<parent_name>`\x20to\x20set\x20it.\x0a')),console[_0x176673(0xc1)]('Usage:\x20tdx\x20sg\x20validate\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Validate\x20all\x20(requires\x20context)'),console[_0x176673(0xc1)](_0x176673(0xb1)),console[_0x176673(0xc1)](_0x176673(0xa3))):(console['error'](a41_0x2a3a8a[_0x176673(0xb9)]('Error:\x20'+_0x41a676[_0x176673(0xa1)]+'\x0a')),_0x41a676[_0x176673(0xbc)]&&console[_0x176673(0xc1)](a41_0x2a3a8a[_0x176673(0xaf)](_0x41a676[_0x176673(0xbc)]))),0x1;const _0x11b09d=_0x41a676[_0x176673(0x9c)],_0x15fc7d=_0x41a676[_0x176673(0xad)]==='file'?_0x41a676[_0x176673(0xc2)]:undefined;if(!_0x15fc7d&&!existsSync(_0x11b09d))return console[_0x176673(0xc1)](a41_0x2a3a8a['red']('Error:\x20Directory\x20not\x20found:\x20'+_0x11b09d+'\x0a')),0x1;let _0x3b789d;if(_0x15fc7d){if(!_0x15fc7d[_0x176673(0xba)]('.yml')&&!_0x15fc7d['endsWith'](_0x176673(0xc0)))return console['error'](a41_0x2a3a8a[_0x176673(0xb9)](_0x176673(0xb5)+_0x15fc7d+'\x0a')),0x1;_0x3b789d=[_0x15fc7d];}else _0x3b789d=findYamlFiles(_0x11b09d);if(_0x3b789d[_0x176673(0x9d)]===0x0)return console[_0x176673(0xc1)](a41_0x2a3a8a[_0x176673(0xb9)]('Error:\x20No\x20YAML\x20files\x20found\x20in\x20'+_0x11b09d+'\x0a')),0x1;const _0x5dfbd7=validateYamlFiles(_0x3b789d,_0x11b09d),_0x1d9753=calculateSummary(_0x5dfbd7);for(const _0x462a8b of _0x5dfbd7){if(!isValidationResult(_0x462a8b))continue;const {relativePath:_0x359e21,source:_0x582968,result:_0x2001a7,fileType:_0x14d83a}=_0x462a8b,_0x30dfd4=_0x14d83a;if(_0x2001a7[_0x176673(0xb3)]&&_0x2001a7[_0x176673(0xab)][_0x176673(0x9d)]===0x0)_0x366dbe['verbose']&&console[_0x176673(0xbd)](a41_0x2a3a8a[_0x176673(0x9e)]('✔\x20'+_0x359e21)+a41_0x2a3a8a['dim']('\x20('+_0x30dfd4+')'));else _0x2001a7['valid']?(console[_0x176673(0xbd)](a41_0x2a3a8a['yellow']('⚠\x20'+_0x359e21)+a41_0x2a3a8a[_0x176673(0xbf)]('\x20('+_0x30dfd4+'):\x20'+_0x2001a7['warnings']['length']+_0x176673(0xa2))),console[_0x176673(0xbd)](formatValidationResult(_0x2001a7,_0x582968,_0x359e21))):(console[_0x176673(0xbd)](a41_0x2a3a8a[_0x176673(0xb9)]('✖\x20'+_0x359e21)+a41_0x2a3a8a[_0x176673(0xbf)]('\x20('+_0x30dfd4+'):\x20'+_0x2001a7[_0x176673(0xbe)][_0x176673(0x9d)]+_0x176673(0xa6))),console[_0x176673(0xbd)](formatValidationResult(_0x2001a7,_0x582968,_0x359e21)));}return console[_0x176673(0xbd)](''),_0x1d9753[_0x176673(0x99)]?(console[_0x176673(0xbd)](a41_0x2a3a8a[_0x176673(0xb9)](_0x176673(0xc9)+_0x1d9753[_0x176673(0xb2)]+'\x20file(s)\x20with\x20errors,\x20'+_0x1d9753['validCount']+_0x176673(0xc6))),_0x1d9753[_0x176673(0x9a)]>0x0&&console[_0x176673(0xbd)](a41_0x2a3a8a['yellow'](_0x1d9753[_0x176673(0x9a)]+_0x176673(0xbb))),0x1):(console['log'](a41_0x2a3a8a[_0x176673(0x9e)](_0x176673(0xca)+_0x1d9753['validCount']+_0x176673(0xc4))),_0x1d9753[_0x176673(0x9a)]>0x0&&console[_0x176673(0xbd)](a41_0x2a3a8a['yellow'](_0x1d9753['warningCount']+_0x176673(0xbb))),0x0);}}
1
+ const a41_0x4e1a36=a41_0x1087;(function(_0x4c7203,_0x57f831){const _0x273478=a41_0x1087,_0x4a58ef=_0x4c7203();while(!![]){try{const _0x3acf14=parseInt(_0x273478(0x1fb))/0x1+parseInt(_0x273478(0x210))/0x2*(parseInt(_0x273478(0x1f7))/0x3)+parseInt(_0x273478(0x216))/0x4*(-parseInt(_0x273478(0x1f3))/0x5)+parseInt(_0x273478(0x220))/0x6*(parseInt(_0x273478(0x20a))/0x7)+parseInt(_0x273478(0x21a))/0x8+-parseInt(_0x273478(0x20e))/0x9+parseInt(_0x273478(0x219))/0xa;if(_0x3acf14===_0x57f831)break;else _0x4a58ef['push'](_0x4a58ef['shift']());}catch(_0x15438b){_0x4a58ef['push'](_0x4a58ef['shift']());}}}(a41_0x3581,0x2dea7));function a41_0x3581(){const _0x131f86=['execute','428215OholAW','error','\x20warning(s)\x20found','):\x20','1022967WHXADM','errorCode','green','warningCount','100328PsLGyC','validCount','.yml','\x20warning(s)','dim','cyan','parentSegment','description','\x20\x20\x20\x20\x20\x20\x20tdx\x20sg\x20validate\x20<file_path>\x20\x20#\x20Validate\x20specific\x20file','valid','targetDir','Usage:\x20tdx\x20sg\x20validate\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Validate\x20all\x20(requires\x20context)','warnings','filePath','red','56798esxIbx','no_parent','\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','\x20valid','3278250rNxYYH','segment:validate','2JbasHF','\x20error(s)','helpText','✔\x20All\x20','Validate\x20segment\x20and\x20journey\x20YAML\x20files','\x20file(s)\x20with\x20errors,\x20','12iioHcy','errors','hasErrors','1144910UUrblA','1573152PnvtYa','name','verbose','yellow','Error:\x20','parent_segment\x20is\x20not\x20set.\x20Use\x20`tdx\x20sg\x20use\x20<parent_name>`\x20to\x20set\x20it.\x0a','42NPeseM','cwd','Error:\x20Directory\x20not\x20found:\x20','log','length'];a41_0x3581=function(){return _0x131f86;};return a41_0x3581();}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';function a41_0x1087(_0xae9d47,_0x2a8f40){_0xae9d47=_0xae9d47-0x1f3;const _0x3581b3=a41_0x3581();let _0x10870d=_0x3581b3[_0xae9d47];return _0x10870d;}import a41_0xa7648f 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{[a41_0x4e1a36(0x21b)]=a41_0x4e1a36(0x20f);[a41_0x4e1a36(0x202)]=a41_0x4e1a36(0x214);async[a41_0x4e1a36(0x225)](_0x36754f){const _0x2b09c8=a41_0x4e1a36,{options:_0x862e01,args:_0x3aa039}=_0x36754f,_0x47f5b1=_0x862e01,_0x2c1c0a=await resolveTarget({'arg':_0x3aa039[0x0],'contextParent':_0x862e01[_0x2b09c8(0x201)],'cwd':process[_0x2b09c8(0x221)]()});if(!isSuccessfulResolution(_0x2c1c0a))return _0x2c1c0a[_0x2b09c8(0x1f8)]===_0x2b09c8(0x20b)?(console['error'](a41_0xa7648f[_0x2b09c8(0x21d)](_0x2b09c8(0x21f))),console['error'](_0x2b09c8(0x206)),console['error'](_0x2b09c8(0x20c)),console[_0x2b09c8(0x1f4)](_0x2b09c8(0x203))):(console[_0x2b09c8(0x1f4)](a41_0xa7648f['red'](_0x2b09c8(0x21e)+_0x2c1c0a['message']+'\x0a')),_0x2c1c0a['helpText']&&console[_0x2b09c8(0x1f4)](a41_0xa7648f[_0x2b09c8(0x200)](_0x2c1c0a[_0x2b09c8(0x212)]))),0x1;const _0x493cfa=_0x2c1c0a[_0x2b09c8(0x205)],_0x18f161=_0x2c1c0a['type']==='file'?_0x2c1c0a[_0x2b09c8(0x208)]:undefined;if(!_0x18f161&&!existsSync(_0x493cfa))return console[_0x2b09c8(0x1f4)](a41_0xa7648f[_0x2b09c8(0x209)](_0x2b09c8(0x222)+_0x493cfa+'\x0a')),0x1;let _0x28eee9;if(_0x18f161){if(!_0x18f161['endsWith'](_0x2b09c8(0x1fd))&&!_0x18f161['endsWith']('.yaml'))return console['error'](a41_0xa7648f[_0x2b09c8(0x209)]('Error:\x20File\x20must\x20have\x20.yml\x20or\x20.yaml\x20extension:\x20'+_0x18f161+'\x0a')),0x1;_0x28eee9=[_0x18f161];}else _0x28eee9=findYamlFiles(_0x493cfa);if(_0x28eee9['length']===0x0)return console['error'](a41_0xa7648f[_0x2b09c8(0x209)]('Error:\x20No\x20YAML\x20files\x20found\x20in\x20'+_0x493cfa+'\x0a')),0x1;const _0x4984cd=validateYamlFiles(_0x28eee9,_0x493cfa),_0xe9d273=calculateSummary(_0x4984cd);for(const _0x498218 of _0x4984cd){if(!isValidationResult(_0x498218))continue;const {relativePath:_0x444ab1,source:_0x519f37,result:_0x51bd24,fileType:_0x3c98ed}=_0x498218,_0x5e32d0=_0x3c98ed;if(_0x51bd24[_0x2b09c8(0x204)]&&_0x51bd24[_0x2b09c8(0x207)][_0x2b09c8(0x224)]===0x0)_0x47f5b1[_0x2b09c8(0x21c)]&&console[_0x2b09c8(0x223)](a41_0xa7648f[_0x2b09c8(0x1f9)]('✔\x20'+_0x444ab1)+a41_0xa7648f[_0x2b09c8(0x1ff)]('\x20('+_0x5e32d0+')'));else _0x51bd24[_0x2b09c8(0x204)]?(console[_0x2b09c8(0x223)](a41_0xa7648f[_0x2b09c8(0x21d)]('⚠\x20'+_0x444ab1)+a41_0xa7648f[_0x2b09c8(0x1ff)]('\x20('+_0x5e32d0+_0x2b09c8(0x1f6)+_0x51bd24['warnings'][_0x2b09c8(0x224)]+_0x2b09c8(0x1fe))),console[_0x2b09c8(0x223)](formatValidationResult(_0x51bd24,_0x519f37,_0x444ab1))):(console[_0x2b09c8(0x223)](a41_0xa7648f[_0x2b09c8(0x209)]('✖\x20'+_0x444ab1)+a41_0xa7648f[_0x2b09c8(0x1ff)]('\x20('+_0x5e32d0+'):\x20'+_0x51bd24[_0x2b09c8(0x217)]['length']+_0x2b09c8(0x211))),console[_0x2b09c8(0x223)](formatValidationResult(_0x51bd24,_0x519f37,_0x444ab1)));}return console[_0x2b09c8(0x223)](''),_0xe9d273[_0x2b09c8(0x218)]?(console[_0x2b09c8(0x223)](a41_0xa7648f['red']('Validation\x20failed:\x20'+_0xe9d273['invalidCount']+_0x2b09c8(0x215)+_0xe9d273['validCount']+_0x2b09c8(0x20d))),_0xe9d273[_0x2b09c8(0x1fa)]>0x0&&console[_0x2b09c8(0x223)](a41_0xa7648f[_0x2b09c8(0x21d)](_0xe9d273[_0x2b09c8(0x1fa)]+'\x20warning(s)\x20found')),0x1):(console[_0x2b09c8(0x223)](a41_0xa7648f[_0x2b09c8(0x1f9)](_0x2b09c8(0x213)+_0xe9d273[_0x2b09c8(0x1fc)]+'\x20file(s)\x20valid')),_0xe9d273[_0x2b09c8(0x1fa)]>0x0&&console[_0x2b09c8(0x223)](a41_0xa7648f[_0x2b09c8(0x21d)](_0xe9d273[_0x2b09c8(0x1fa)]+_0x2b09c8(0x1f5))),0x0);}}
@@ -1 +1 @@
1
- const a42_0x32f65a=a42_0x9263;function a42_0x30bc(){const _0x43ef29=['folder','✔\x20Found\x20','json','filter','413412fOjmXU','\x5c$&','Building\x20hierarchy\x20tree...','261884DDmttQ','message','localeCompare','test','maxDepth','1825866mjupUT','dim','name','format','listWithPattern','Site:\x20','List\x20folders\x20and\x20child\x20segments','11kkCGFb','sort','includes','✔\x20Built\x20tree\x20with\x20',',\x20and\x20','jsonl','Parent\x20segment\x20context:\x20','parentSegment','length','replace','\x20\x20tdx\x20sg\x20pull\x20\x22My\x20Audience\x22','10fJFMuY','execute','33682ZnzurR','33hHxkXl','listRecursive','\x20folder','/app/ps/','parentId','segments','log','folderId','208EWyZGa','error','Parent\x20ID:\x20','894440PBwJhU','/e/','resolvePathToResource','segment','listUnified','6306kUfxdj','Folder\x20ID:\x20','site','Listing\x20folders,\x20segments,\x20and\x20journeys...','\x20\x20tdx\x20sg\x20use\x20\x22My\x20Audience\x22','description','\x20journey','No\x20items\x20match\x20pattern:\x20','\x20segment',']\x20matching\x20\x27','journeyBundleName','/j/da','Use\x20tdx\x20ps\x20list\x20to\x20see\x20available\x20parent\x20segments.','children','1365040KLDQBe','Resolving\x20path\x20\x27','listUnifiedWithJourneys','folders','Resolving\x20parent\x20segment\x20\x27','data','\x27...','journeys','journey','Folder/pattern\x20arg:\x20','verbose','Set\x20a\x20parent\x20segment\x20context\x20first:','map','type'];a42_0x30bc=function(){return _0x43ef29;};return a42_0x30bc();}(function(_0x2e6458,_0x5aff51){const _0x26446e=a42_0x9263,_0xa0dfad=_0x2e6458();while(!![]){try{const _0x1392f0=parseInt(_0x26446e(0x18f))/0x1*(-parseInt(_0x26446e(0x19c))/0x2)+parseInt(_0x26446e(0x1ad))/0x3*(parseInt(_0x26446e(0x1a5))/0x4)+parseInt(_0x26446e(0x19a))/0x5*(-parseInt(_0x26446e(0x1cd))/0x6)+parseInt(_0x26446e(0x183))/0x7+-parseInt(_0x26446e(0x1bb))/0x8+parseInt(_0x26446e(0x188))/0x9+parseInt(_0x26446e(0x1a8))/0xa*(parseInt(_0x26446e(0x19d))/0xb);if(_0x1392f0===_0x5aff51)break;else _0xa0dfad['push'](_0xa0dfad['shift']());}catch(_0x2ad415){_0xa0dfad['push'](_0xa0dfad['shift']());}}}(a42_0x30bc,0x1e54d));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';function a42_0x9263(_0x3c0221,_0x41a592){_0x3c0221=_0x3c0221-0x182;const _0x30bc50=a42_0x30bc();let _0x9263a3=_0x30bc50[_0x3c0221];return _0x9263a3;}import{getConsoleNextUrl}from'../sdk/client/endpoints.js';import a42_0x45e1a6 from'chalk';export class SegmentsCommand extends BaseCommand{['name']='segments';[a42_0x32f65a(0x1b2)]=a42_0x32f65a(0x18e);async[a42_0x32f65a(0x19b)](_0x299d2e){const _0x3ab521=a42_0x32f65a,{options:_0x1ca801,args:_0x159592}=_0x299d2e,_0x14fb31=_0x1ca801['recursive'],_0x588333=_0x159592[0x0];try{const _0x5220bb=_0x1ca801[_0x3ab521(0x196)];_0x1ca801[_0x3ab521(0x1c5)]&&(console[_0x3ab521(0x1a6)](_0x3ab521(0x18d)+_0x1ca801['site']),console['error'](_0x3ab521(0x195)+(_0x5220bb||'(not\x20set)')),_0x588333&&console['error'](_0x3ab521(0x1c4)+_0x588333),_0x14fb31&&console['error']('Recursive\x20mode:\x20enabled'));if(!_0x5220bb)return console[_0x3ab521(0x1a6)]('Error:\x20No\x20parent\x20segment\x20context\x20set.'),console[_0x3ab521(0x1a6)](''),console[_0x3ab521(0x1a6)](_0x3ab521(0x1c6)),console[_0x3ab521(0x1a6)](_0x3ab521(0x199)),console[_0x3ab521(0x1a6)](_0x3ab521(0x1b1)),console[_0x3ab521(0x1a6)](''),console[_0x3ab521(0x1a6)](_0x3ab521(0x1b9)),0x1;const _0xae4614=_0x588333&&(_0x588333[_0x3ab521(0x191)]('*')||_0x588333['includes']('?'));if(_0xae4614)return await this[_0x3ab521(0x18c)](_0x299d2e,_0x5220bb,_0x588333);const _0x48f932=_0x588333?_0x5220bb+'/'+_0x588333:_0x5220bb;return _0x14fb31?await this[_0x3ab521(0x19e)](_0x299d2e,_0x48f932):await this[_0x3ab521(0x1ac)](_0x299d2e,_0x48f932);}catch(_0x2891d9){if(_0x2891d9 instanceof SDKError)return console['error']('Error:\x20'+_0x2891d9[_0x3ab521(0x184)]),_0x2891d9['cause']&&console['error']('\x20\x20Cause:\x20'+_0x2891d9['cause']),0x1;throw _0x2891d9;}}async[a42_0x32f65a(0x18c)](_0x57b2ac,_0x39fa31,_0x39cdf6){const _0x1dafe8=a42_0x32f65a,{options:_0x1a24e3,tdx:_0x3a32ef}=_0x57b2ac,_0x5eb9a2=await withSpinner(_0x1dafe8(0x1bf)+_0x39fa31+_0x1dafe8(0x1c1),()=>_0x3a32ef[_0x1dafe8(0x1ab)][_0x1dafe8(0x1aa)](_0x39fa31),{'verbose':_0x1a24e3[_0x1dafe8(0x1c5)]}),_0x3ff41c=_0x5eb9a2[_0x1dafe8(0x1c0)],_0x1b4cd6=await withSpinner(_0x1dafe8(0x1b0),()=>_0x3a32ef[_0x1dafe8(0x1ab)][_0x1dafe8(0x1bd)](_0x3ff41c[_0x1dafe8(0x1a1)],_0x3ff41c['folderId']),{'verbose':_0x1a24e3[_0x1dafe8(0x1c5)]}),{folders:_0x27f05d,segments:_0x4b50f9,journeys:_0x2e79c0}=_0x1b4cd6[_0x1dafe8(0x1c0)],_0x5c6e42=_0x39cdf6[_0x1dafe8(0x198)](/[.+^${}()|[\]\\]/g,_0x1dafe8(0x1ce))[_0x1dafe8(0x198)](/\*/g,'.*')[_0x1dafe8(0x198)](/\?/g,'.'),_0x36c7b8=new RegExp('^'+_0x5c6e42+'$','i'),_0x2a1cef=_0x27f05d[_0x1dafe8(0x1cc)](_0x154fd2=>_0x36c7b8[_0x1dafe8(0x186)](_0x154fd2['name'])),_0x49a985=_0x4b50f9[_0x1dafe8(0x1cc)](_0x1e80d7=>_0x36c7b8[_0x1dafe8(0x186)](_0x1e80d7[_0x1dafe8(0x18a)])),_0x5156df=_0x2e79c0[_0x1dafe8(0x1cc)](_0x5a4fdc=>_0x36c7b8[_0x1dafe8(0x186)](_0x5a4fdc[_0x1dafe8(0x1b7)])),_0x582075=_0x2a1cef[_0x1dafe8(0x197)]+_0x49a985[_0x1dafe8(0x197)]+_0x5156df[_0x1dafe8(0x197)];console[_0x1dafe8(0x1a6)](_0x1dafe8(0x1ca)+_0x2a1cef[_0x1dafe8(0x197)]+_0x1dafe8(0x19f)+(_0x2a1cef[_0x1dafe8(0x197)]!==0x1?'s':'')+',\x20'+_0x49a985[_0x1dafe8(0x197)]+_0x1dafe8(0x1b5)+(_0x49a985[_0x1dafe8(0x197)]!==0x1?'s':'')+_0x1dafe8(0x193)+_0x5156df[_0x1dafe8(0x197)]+_0x1dafe8(0x1b3)+(_0x5156df[_0x1dafe8(0x197)]!==0x1?'s':'')+'\x20matching\x20\x27'+_0x39cdf6+'\x27');const _0x27efb1=_0x298ec1=>{const _0x58cacc=_0x1dafe8;return getConsoleNextUrl(_0x1a24e3[_0x58cacc(0x1af)],_0x58cacc(0x1a0)+_0x3ff41c[_0x58cacc(0x1a1)]+'/e/'+_0x298ec1);},_0x451a28=_0x1a24e3[_0x1dafe8(0x18b)]===_0x1dafe8(0x1cb)||_0x1a24e3[_0x1dafe8(0x18b)]===_0x1dafe8(0x194);if(_0x451a28){const _0x2eb489=[..._0x2a1cef[_0x1dafe8(0x1c7)](_0x2c2b6b=>({..._0x2c2b6b,'type':_0x1dafe8(0x1c9)})),..._0x49a985[_0x1dafe8(0x1c7)](_0xe0e5f3=>({..._0xe0e5f3,'type':_0x1dafe8(0x1ab),'url':_0x27efb1(_0xe0e5f3['id'])})),..._0x5156df['map'](_0xecc101=>({..._0xecc101,'name':_0xecc101['journeyBundleName'],'type':_0x1dafe8(0x1c3)}))][_0x1dafe8(0x190)]((_0x2db358,_0xf9c664)=>_0x2db358['name'][_0x1dafe8(0x185)](_0xf9c664['name']));await handleSDKOutput(_0x2eb489,_0x1a24e3);}else{if(_0x582075===0x0)console[_0x1dafe8(0x1a3)](_0x1dafe8(0x1b4)+_0x39cdf6);else{console[_0x1dafe8(0x1a3)](a42_0x45e1a6[_0x1dafe8(0x189)]('['+_0x39fa31+_0x1dafe8(0x1b6)+_0x39cdf6+'\x27'));const _0xa03af2=formatFlatList(_0x2a1cef,_0x49a985,{'showMetadata':!![],'getSegmentUrl':_0x27efb1},_0x5156df);console[_0x1dafe8(0x1a3)](_0xa03af2);}}return 0x0;}async[a42_0x32f65a(0x1ac)](_0x108971,_0x5d659a){const _0x51fa9a=a42_0x32f65a,{options:_0x4ef777,tdx:_0x2d30d9}=_0x108971,_0x48f780=await withSpinner('Resolving\x20path\x20\x27'+_0x5d659a+'\x27...',()=>_0x2d30d9[_0x51fa9a(0x1ab)][_0x51fa9a(0x1aa)](_0x5d659a),{'verbose':_0x4ef777[_0x51fa9a(0x1c5)]}),_0x12fc7f=_0x48f780[_0x51fa9a(0x1c0)];_0x4ef777[_0x51fa9a(0x1c5)]&&(console[_0x51fa9a(0x1a6)](_0x51fa9a(0x1a7)+_0x12fc7f['parentId']),_0x12fc7f[_0x51fa9a(0x1a4)]&&console[_0x51fa9a(0x1a6)](_0x51fa9a(0x1ae)+_0x12fc7f[_0x51fa9a(0x1a4)]));const _0x3677e9=await withSpinner(_0x51fa9a(0x1b0),()=>_0x2d30d9[_0x51fa9a(0x1ab)]['listUnifiedWithJourneys'](_0x12fc7f[_0x51fa9a(0x1a1)],_0x12fc7f[_0x51fa9a(0x1a4)]),{'verbose':_0x4ef777[_0x51fa9a(0x1c5)]}),{folders:_0x13b1e9,segments:_0x4f4bd0,journeys:_0x4d8f30}=_0x3677e9['data'],_0x1c982a=_0x13b1e9[_0x51fa9a(0x197)]+_0x4f4bd0[_0x51fa9a(0x197)]+_0x4d8f30[_0x51fa9a(0x197)];console[_0x51fa9a(0x1a6)](_0x51fa9a(0x1ca)+_0x13b1e9['length']+'\x20folder'+(_0x13b1e9[_0x51fa9a(0x197)]!==0x1?'s':'')+',\x20'+_0x4f4bd0[_0x51fa9a(0x197)]+_0x51fa9a(0x1b5)+(_0x4f4bd0[_0x51fa9a(0x197)]!==0x1?'s':'')+',\x20and\x20'+_0x4d8f30['length']+_0x51fa9a(0x1b3)+(_0x4d8f30[_0x51fa9a(0x197)]!==0x1?'s':''));const _0x33a1e0=_0x1e2733=>{const _0x405132=_0x51fa9a;return getConsoleNextUrl(_0x4ef777[_0x405132(0x1af)],'/app/ps/'+_0x12fc7f[_0x405132(0x1a1)]+'/e/'+_0x1e2733);},_0x1dc5be=_0x298d6b=>{const _0x3d610f=_0x51fa9a;return getConsoleNextUrl(_0x4ef777[_0x3d610f(0x1af)],_0x3d610f(0x1a0)+_0x12fc7f['parentId']+'/e/'+_0x298d6b+_0x3d610f(0x1b8));},_0x343aff=_0x4ef777[_0x51fa9a(0x18b)]===_0x51fa9a(0x1cb)||_0x4ef777[_0x51fa9a(0x18b)]===_0x51fa9a(0x194);if(_0x343aff){const _0x24ce62=[..._0x13b1e9['map'](_0x42d002=>({..._0x42d002,'type':_0x51fa9a(0x1c9)})),..._0x4f4bd0[_0x51fa9a(0x1c7)](_0x5d1e62=>({..._0x5d1e62,'type':_0x51fa9a(0x1ab),'url':_0x33a1e0(_0x5d1e62['id'])})),..._0x4d8f30[_0x51fa9a(0x1c7)](_0x3e809f=>({..._0x3e809f,'name':_0x3e809f[_0x51fa9a(0x1b7)],'type':_0x51fa9a(0x1c3),'url':_0x1dc5be(_0x3e809f['id'])}))][_0x51fa9a(0x190)]((_0x1d97a5,_0x331856)=>_0x1d97a5['name'][_0x51fa9a(0x185)](_0x331856[_0x51fa9a(0x18a)]));await handleSDKOutput(_0x24ce62,_0x4ef777);}else{if(_0x1c982a===0x0)console['log'](a42_0x45e1a6[_0x51fa9a(0x189)]('['+_0x5d659a+']')),console[_0x51fa9a(0x1a3)]('(empty)');else{console['log'](a42_0x45e1a6['dim']('['+_0x5d659a+']'));const _0xbb88c=formatFlatList(_0x13b1e9,_0x4f4bd0,{'showMetadata':!![],'getSegmentUrl':_0x33a1e0,'getJourneyUrl':_0x1dc5be},_0x4d8f30);console[_0x51fa9a(0x1a3)](_0xbb88c);}}return 0x0;}async['listRecursive'](_0x193c4e,_0x28d67a){const _0x2f96da=a42_0x32f65a,{options:_0x38d525,tdx:_0x2d5f82}=_0x193c4e,_0x4418f9=await withSpinner(_0x2f96da(0x1bc)+_0x28d67a+_0x2f96da(0x1c1),()=>_0x2d5f82[_0x2f96da(0x1ab)][_0x2f96da(0x1aa)](_0x28d67a),{'verbose':_0x38d525[_0x2f96da(0x1c5)]}),_0x3a8c43=_0x4418f9['data'];_0x38d525[_0x2f96da(0x1c5)]&&(console[_0x2f96da(0x1a6)](_0x2f96da(0x1a7)+_0x3a8c43['parentId']),_0x3a8c43[_0x2f96da(0x1a4)]&&console['error'](_0x2f96da(0x1ae)+_0x3a8c43['folderId']));const _0x3f1269=_0x38d525[_0x2f96da(0x187)]||0xa,_0x4d7f23=await withSpinner(_0x2f96da(0x182),()=>_0x2d5f82[_0x2f96da(0x1ab)][_0x2f96da(0x19e)](_0x3a8c43[_0x2f96da(0x1a1)],_0x3a8c43['folderId'],0x0,_0x3f1269),{'verbose':_0x38d525[_0x2f96da(0x1c5)]}),_0x4c8c34=_0x4d7f23['data'],_0x4aef3e=_0x28a225=>{const _0x5788f6=_0x2f96da;let _0x44d9c6=0x0,_0x59d5c0=0x0,_0x29ab4d=0x0;for(const _0x4ae922 of _0x28a225){if(_0x4ae922[_0x5788f6(0x1c8)]===_0x5788f6(0x1c9))_0x44d9c6++;else{if(_0x4ae922[_0x5788f6(0x1c8)]===_0x5788f6(0x1ab))_0x59d5c0++;else{if(_0x4ae922[_0x5788f6(0x1c8)]==='journey')_0x29ab4d++;}}if(_0x4ae922[_0x5788f6(0x1ba)]){const _0x1ec6c5=_0x4aef3e(_0x4ae922[_0x5788f6(0x1ba)]);_0x44d9c6+=_0x1ec6c5[_0x5788f6(0x1be)],_0x59d5c0+=_0x1ec6c5[_0x5788f6(0x1a2)],_0x29ab4d+=_0x1ec6c5['journeys'];}}return{'folders':_0x44d9c6,'segments':_0x59d5c0,'journeys':_0x29ab4d};},_0x2ca3a8=_0x4aef3e(_0x4c8c34);console['error'](_0x2f96da(0x192)+_0x2ca3a8[_0x2f96da(0x1be)]+_0x2f96da(0x19f)+(_0x2ca3a8[_0x2f96da(0x1be)]!==0x1?'s':'')+',\x20'+_0x2ca3a8['segments']+_0x2f96da(0x1b5)+(_0x2ca3a8[_0x2f96da(0x1a2)]!==0x1?'s':'')+',\x20and\x20'+_0x2ca3a8[_0x2f96da(0x1c2)]+'\x20journey'+(_0x2ca3a8[_0x2f96da(0x1c2)]!==0x1?'s':''));const _0x4c79f3=_0x13b411=>{const _0x2a16=_0x2f96da;return getConsoleNextUrl(_0x38d525[_0x2a16(0x1af)],_0x2a16(0x1a0)+_0x3a8c43['parentId']+_0x2a16(0x1a9)+_0x13b411);},_0x2761de=_0x5e0ece=>{const _0x686730=_0x2f96da;return getConsoleNextUrl(_0x38d525['site'],_0x686730(0x1a0)+_0x3a8c43[_0x686730(0x1a1)]+'/e/'+_0x5e0ece+_0x686730(0x1b8));};if(_0x38d525[_0x2f96da(0x18b)]===_0x2f96da(0x1cb)||_0x38d525['format']==='jsonl')await handleSDKOutput(_0x4c8c34,_0x38d525);else{console[_0x2f96da(0x1a3)](a42_0x45e1a6[_0x2f96da(0x189)]('['+_0x28d67a+']'));const _0x97d1c7=formatTree(_0x4c8c34,{'showMetadata':!![],'getSegmentUrl':_0x4c79f3,'getJourneyUrl':_0x2761de});console[_0x2f96da(0x1a3)](_0x97d1c7);}return 0x0;}}
1
+ const a42_0x4c1676=a42_0x3971;(function(_0x20dc73,_0x529bbc){const _0x9bf7bb=a42_0x3971,_0x3c9ff9=_0x20dc73();while(!![]){try{const _0x1ab6d9=parseInt(_0x9bf7bb(0x184))/0x1*(parseInt(_0x9bf7bb(0x177))/0x2)+-parseInt(_0x9bf7bb(0x1a7))/0x3+parseInt(_0x9bf7bb(0x166))/0x4+-parseInt(_0x9bf7bb(0x170))/0x5+parseInt(_0x9bf7bb(0x16c))/0x6*(-parseInt(_0x9bf7bb(0x1a6))/0x7)+-parseInt(_0x9bf7bb(0x163))/0x8*(-parseInt(_0x9bf7bb(0x174))/0x9)+parseInt(_0x9bf7bb(0x169))/0xa;if(_0x1ab6d9===_0x529bbc)break;else _0x3c9ff9['push'](_0x3c9ff9['shift']());}catch(_0x187a3b){_0x3c9ff9['push'](_0x3c9ff9['shift']());}}}(a42_0x297b,0x8edd2));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';function a42_0x3971(_0x91003d,_0x517b93){_0x91003d=_0x91003d-0x160;const _0x297b68=a42_0x297b();let _0x397103=_0x297b68[_0x91003d];return _0x397103;}import{handleSDKOutput}from'../core/command-output.js';import{withSpinner}from'../utils/spinner.js';function a42_0x297b(){const _0x48229f=['\x5c$&','5447780DmDAak','Error:\x20','\x20\x20Cause:\x20','21744wRlnmO','sort','recursive','cause','4547215gZlyeJ','data','Resolving\x20path\x20\x27','format','2097OmJMyf','(empty)',',\x20and\x20','562FaLKsd','Folder/pattern\x20arg:\x20','No\x20items\x20match\x20pattern:\x20','includes','error',']\x20matching\x20\x27','verbose','Parent\x20ID:\x20','folderId','✔\x20Built\x20tree\x20with\x20','site','Parent\x20segment\x20context:\x20','Error:\x20No\x20parent\x20segment\x20context\x20set.','1897rjrtXt','\x20\x20tdx\x20sg\x20use\x20\x22My\x20Audience\x22','description','dim','\x20matching\x20\x27','listUnifiedWithJourneys','name','\x20folder','/e/','segment','segments','\x27...','jsonl','\x20journey','type','journeys','Set\x20a\x20parent\x20segment\x20context\x20first:','\x20\x20tdx\x20sg\x20pull\x20\x22My\x20Audience\x22','localeCompare','/j/da','✔\x20Found\x20','\x20segment','Listing\x20folders,\x20segments,\x20and\x20journeys...','Building\x20hierarchy\x20tree...','folder','journey','children','maxDepth','log','map','json','replace','Resolving\x20parent\x20segment\x20\x27','journeyBundleName','203wZjqbD','1294005RYQJNr','test','parentId','folders','Site:\x20','length','filter','/app/ps/','message','listUnified','listRecursive','Folder\x20ID:\x20','18488Aomgbl','(not\x20set)','resolvePathToResource','1658984HLDgEd','Recursive\x20mode:\x20enabled'];a42_0x297b=function(){return _0x48229f;};return a42_0x297b();}import{formatFlatList,formatTree}from'../sdk/util/tree-formatter.js';import{getConsoleNextUrl}from'../sdk/client/endpoints.js';import a42_0xcc2825 from'chalk';export class SegmentsCommand extends BaseCommand{[a42_0x4c1676(0x18a)]=a42_0x4c1676(0x18e);[a42_0x4c1676(0x186)]='List\x20folders\x20and\x20child\x20segments';async['execute'](_0x462e1c){const _0x597f29=a42_0x4c1676,{options:_0x21da75,args:_0x35579d}=_0x462e1c,_0x104a6c=_0x21da75[_0x597f29(0x16e)],_0x4dcc01=_0x35579d[0x0];try{const _0x3489ac=_0x21da75['parentSegment'];_0x21da75[_0x597f29(0x17d)]&&(console[_0x597f29(0x17b)](_0x597f29(0x1ab)+_0x21da75[_0x597f29(0x181)]),console[_0x597f29(0x17b)](_0x597f29(0x182)+(_0x3489ac||_0x597f29(0x164))),_0x4dcc01&&console[_0x597f29(0x17b)](_0x597f29(0x178)+_0x4dcc01),_0x104a6c&&console[_0x597f29(0x17b)](_0x597f29(0x167)));if(!_0x3489ac)return console['error'](_0x597f29(0x183)),console[_0x597f29(0x17b)](''),console[_0x597f29(0x17b)](_0x597f29(0x194)),console[_0x597f29(0x17b)](_0x597f29(0x195)),console[_0x597f29(0x17b)](_0x597f29(0x185)),console[_0x597f29(0x17b)](''),console['error']('Use\x20tdx\x20ps\x20list\x20to\x20see\x20available\x20parent\x20segments.'),0x1;const _0x535acf=_0x4dcc01&&(_0x4dcc01[_0x597f29(0x17a)]('*')||_0x4dcc01[_0x597f29(0x17a)]('?'));if(_0x535acf)return await this['listWithPattern'](_0x462e1c,_0x3489ac,_0x4dcc01);const _0xc3e7a7=_0x4dcc01?_0x3489ac+'/'+_0x4dcc01:_0x3489ac;return _0x104a6c?await this[_0x597f29(0x161)](_0x462e1c,_0xc3e7a7):await this['listUnified'](_0x462e1c,_0xc3e7a7);}catch(_0x4d6fc0){if(_0x4d6fc0 instanceof SDKError)return console[_0x597f29(0x17b)](_0x597f29(0x16a)+_0x4d6fc0[_0x597f29(0x1af)]),_0x4d6fc0[_0x597f29(0x16f)]&&console[_0x597f29(0x17b)](_0x597f29(0x16b)+_0x4d6fc0[_0x597f29(0x16f)]),0x1;throw _0x4d6fc0;}}async['listWithPattern'](_0x1cacd4,_0xac0711,_0xfafb02){const _0x16cd02=a42_0x4c1676,{options:_0x46beb5,tdx:_0x3b3670}=_0x1cacd4,_0x51612a=await withSpinner(_0x16cd02(0x1a4)+_0xac0711+_0x16cd02(0x18f),()=>_0x3b3670[_0x16cd02(0x18d)][_0x16cd02(0x165)](_0xac0711),{'verbose':_0x46beb5[_0x16cd02(0x17d)]}),_0x3559c2=_0x51612a[_0x16cd02(0x171)],_0x3d2fc6=await withSpinner(_0x16cd02(0x19a),()=>_0x3b3670[_0x16cd02(0x18d)][_0x16cd02(0x189)](_0x3559c2['parentId'],_0x3559c2[_0x16cd02(0x17f)]),{'verbose':_0x46beb5[_0x16cd02(0x17d)]}),{folders:_0x5c6962,segments:_0x380860,journeys:_0x8e9b88}=_0x3d2fc6[_0x16cd02(0x171)],_0x3138e3=_0xfafb02[_0x16cd02(0x1a3)](/[.+^${}()|[\]\\]/g,_0x16cd02(0x168))['replace'](/\*/g,'.*')[_0x16cd02(0x1a3)](/\?/g,'.'),_0x3b9bbc=new RegExp('^'+_0x3138e3+'$','i'),_0x25f664=_0x5c6962[_0x16cd02(0x1ad)](_0x49d478=>_0x3b9bbc[_0x16cd02(0x1a8)](_0x49d478[_0x16cd02(0x18a)])),_0xc8e57=_0x380860[_0x16cd02(0x1ad)](_0x641124=>_0x3b9bbc[_0x16cd02(0x1a8)](_0x641124[_0x16cd02(0x18a)])),_0x38d1c1=_0x8e9b88[_0x16cd02(0x1ad)](_0x4398d3=>_0x3b9bbc['test'](_0x4398d3['journeyBundleName'])),_0x3956b8=_0x25f664[_0x16cd02(0x1ac)]+_0xc8e57[_0x16cd02(0x1ac)]+_0x38d1c1[_0x16cd02(0x1ac)];console['error'](_0x16cd02(0x198)+_0x25f664[_0x16cd02(0x1ac)]+_0x16cd02(0x18b)+(_0x25f664['length']!==0x1?'s':'')+',\x20'+_0xc8e57[_0x16cd02(0x1ac)]+_0x16cd02(0x199)+(_0xc8e57[_0x16cd02(0x1ac)]!==0x1?'s':'')+',\x20and\x20'+_0x38d1c1[_0x16cd02(0x1ac)]+_0x16cd02(0x191)+(_0x38d1c1[_0x16cd02(0x1ac)]!==0x1?'s':'')+_0x16cd02(0x188)+_0xfafb02+'\x27');const _0x30e0b8=_0x4569cc=>{const _0x323d81=_0x16cd02;return getConsoleNextUrl(_0x46beb5[_0x323d81(0x181)],_0x323d81(0x1ae)+_0x3559c2[_0x323d81(0x1a9)]+_0x323d81(0x18c)+_0x4569cc);},_0x1548cc=_0x46beb5[_0x16cd02(0x173)]===_0x16cd02(0x1a2)||_0x46beb5[_0x16cd02(0x173)]===_0x16cd02(0x190);if(_0x1548cc){const _0x3afcb9=[..._0x25f664['map'](_0x3146c6=>({..._0x3146c6,'type':_0x16cd02(0x19c)})),..._0xc8e57[_0x16cd02(0x1a1)](_0x1111de=>({..._0x1111de,'type':_0x16cd02(0x18d),'url':_0x30e0b8(_0x1111de['id'])})),..._0x38d1c1[_0x16cd02(0x1a1)](_0x28f40d=>({..._0x28f40d,'name':_0x28f40d['journeyBundleName'],'type':_0x16cd02(0x19d)}))][_0x16cd02(0x16d)]((_0x22dc7e,_0x522d21)=>_0x22dc7e[_0x16cd02(0x18a)]['localeCompare'](_0x522d21[_0x16cd02(0x18a)]));await handleSDKOutput(_0x3afcb9,_0x46beb5);}else{if(_0x3956b8===0x0)console[_0x16cd02(0x1a0)](_0x16cd02(0x179)+_0xfafb02);else{console[_0x16cd02(0x1a0)](a42_0xcc2825[_0x16cd02(0x187)]('['+_0xac0711+_0x16cd02(0x17c)+_0xfafb02+'\x27'));const _0x575fdd=formatFlatList(_0x25f664,_0xc8e57,{'showMetadata':!![],'getSegmentUrl':_0x30e0b8},_0x38d1c1);console[_0x16cd02(0x1a0)](_0x575fdd);}}return 0x0;}async[a42_0x4c1676(0x160)](_0x5e92ce,_0x5c0e4a){const _0x36290f=a42_0x4c1676,{options:_0xab2acc,tdx:_0x48ce95}=_0x5e92ce,_0x2a697d=await withSpinner(_0x36290f(0x172)+_0x5c0e4a+_0x36290f(0x18f),()=>_0x48ce95[_0x36290f(0x18d)]['resolvePathToResource'](_0x5c0e4a),{'verbose':_0xab2acc[_0x36290f(0x17d)]}),_0x14f607=_0x2a697d[_0x36290f(0x171)];_0xab2acc[_0x36290f(0x17d)]&&(console['error'](_0x36290f(0x17e)+_0x14f607['parentId']),_0x14f607['folderId']&&console['error']('Folder\x20ID:\x20'+_0x14f607[_0x36290f(0x17f)]));const _0xdde396=await withSpinner(_0x36290f(0x19a),()=>_0x48ce95['segment'][_0x36290f(0x189)](_0x14f607[_0x36290f(0x1a9)],_0x14f607[_0x36290f(0x17f)]),{'verbose':_0xab2acc[_0x36290f(0x17d)]}),{folders:_0x2b9241,segments:_0x15f747,journeys:_0x38cf19}=_0xdde396[_0x36290f(0x171)],_0x4dff6f=_0x2b9241[_0x36290f(0x1ac)]+_0x15f747[_0x36290f(0x1ac)]+_0x38cf19[_0x36290f(0x1ac)];console[_0x36290f(0x17b)](_0x36290f(0x198)+_0x2b9241[_0x36290f(0x1ac)]+'\x20folder'+(_0x2b9241[_0x36290f(0x1ac)]!==0x1?'s':'')+',\x20'+_0x15f747[_0x36290f(0x1ac)]+_0x36290f(0x199)+(_0x15f747['length']!==0x1?'s':'')+_0x36290f(0x176)+_0x38cf19[_0x36290f(0x1ac)]+_0x36290f(0x191)+(_0x38cf19[_0x36290f(0x1ac)]!==0x1?'s':''));const _0x19b7cf=_0x3483fb=>{const _0x5daf78=_0x36290f;return getConsoleNextUrl(_0xab2acc[_0x5daf78(0x181)],_0x5daf78(0x1ae)+_0x14f607[_0x5daf78(0x1a9)]+_0x5daf78(0x18c)+_0x3483fb);},_0x5661ac=_0x99f8fb=>{const _0xde54ec=_0x36290f;return getConsoleNextUrl(_0xab2acc[_0xde54ec(0x181)],_0xde54ec(0x1ae)+_0x14f607['parentId']+'/e/'+_0x99f8fb+_0xde54ec(0x197));},_0x12ace0=_0xab2acc[_0x36290f(0x173)]===_0x36290f(0x1a2)||_0xab2acc[_0x36290f(0x173)]===_0x36290f(0x190);if(_0x12ace0){const _0x4661f1=[..._0x2b9241[_0x36290f(0x1a1)](_0xaf5f22=>({..._0xaf5f22,'type':_0x36290f(0x19c)})),..._0x15f747[_0x36290f(0x1a1)](_0x2d4335=>({..._0x2d4335,'type':_0x36290f(0x18d),'url':_0x19b7cf(_0x2d4335['id'])})),..._0x38cf19[_0x36290f(0x1a1)](_0x47a960=>({..._0x47a960,'name':_0x47a960[_0x36290f(0x1a5)],'type':_0x36290f(0x19d),'url':_0x5661ac(_0x47a960['id'])}))]['sort']((_0x3b8cce,_0x7aa832)=>_0x3b8cce[_0x36290f(0x18a)][_0x36290f(0x196)](_0x7aa832[_0x36290f(0x18a)]));await handleSDKOutput(_0x4661f1,_0xab2acc);}else{if(_0x4dff6f===0x0)console[_0x36290f(0x1a0)](a42_0xcc2825['dim']('['+_0x5c0e4a+']')),console[_0x36290f(0x1a0)](_0x36290f(0x175));else{console[_0x36290f(0x1a0)](a42_0xcc2825['dim']('['+_0x5c0e4a+']'));const _0x2f895e=formatFlatList(_0x2b9241,_0x15f747,{'showMetadata':!![],'getSegmentUrl':_0x19b7cf,'getJourneyUrl':_0x5661ac},_0x38cf19);console[_0x36290f(0x1a0)](_0x2f895e);}}return 0x0;}async[a42_0x4c1676(0x161)](_0xadcdaa,_0x4c7d1b){const _0x18fdf3=a42_0x4c1676,{options:_0x2ddac0,tdx:_0x2fbe97}=_0xadcdaa,_0x1ae154=await withSpinner(_0x18fdf3(0x172)+_0x4c7d1b+_0x18fdf3(0x18f),()=>_0x2fbe97['segment'][_0x18fdf3(0x165)](_0x4c7d1b),{'verbose':_0x2ddac0['verbose']}),_0x4b194c=_0x1ae154[_0x18fdf3(0x171)];_0x2ddac0[_0x18fdf3(0x17d)]&&(console[_0x18fdf3(0x17b)](_0x18fdf3(0x17e)+_0x4b194c[_0x18fdf3(0x1a9)]),_0x4b194c[_0x18fdf3(0x17f)]&&console[_0x18fdf3(0x17b)](_0x18fdf3(0x162)+_0x4b194c[_0x18fdf3(0x17f)]));const _0xf06632=_0x2ddac0[_0x18fdf3(0x19f)]||0xa,_0x1e171b=await withSpinner(_0x18fdf3(0x19b),()=>_0x2fbe97[_0x18fdf3(0x18d)][_0x18fdf3(0x161)](_0x4b194c[_0x18fdf3(0x1a9)],_0x4b194c[_0x18fdf3(0x17f)],0x0,_0xf06632),{'verbose':_0x2ddac0[_0x18fdf3(0x17d)]}),_0x1819d7=_0x1e171b['data'],_0x5b8a64=_0x37c1d9=>{const _0xccf773=_0x18fdf3;let _0x41c570=0x0,_0x57f43a=0x0,_0x386019=0x0;for(const _0x3822d5 of _0x37c1d9){if(_0x3822d5[_0xccf773(0x192)]===_0xccf773(0x19c))_0x41c570++;else{if(_0x3822d5[_0xccf773(0x192)]==='segment')_0x57f43a++;else{if(_0x3822d5[_0xccf773(0x192)]===_0xccf773(0x19d))_0x386019++;}}if(_0x3822d5[_0xccf773(0x19e)]){const _0x55fc6d=_0x5b8a64(_0x3822d5[_0xccf773(0x19e)]);_0x41c570+=_0x55fc6d[_0xccf773(0x1aa)],_0x57f43a+=_0x55fc6d[_0xccf773(0x18e)],_0x386019+=_0x55fc6d[_0xccf773(0x193)];}}return{'folders':_0x41c570,'segments':_0x57f43a,'journeys':_0x386019};},_0x1eb6a0=_0x5b8a64(_0x1819d7);console['error'](_0x18fdf3(0x180)+_0x1eb6a0['folders']+_0x18fdf3(0x18b)+(_0x1eb6a0[_0x18fdf3(0x1aa)]!==0x1?'s':'')+',\x20'+_0x1eb6a0['segments']+'\x20segment'+(_0x1eb6a0['segments']!==0x1?'s':'')+_0x18fdf3(0x176)+_0x1eb6a0[_0x18fdf3(0x193)]+_0x18fdf3(0x191)+(_0x1eb6a0[_0x18fdf3(0x193)]!==0x1?'s':''));const _0x10bacf=_0x26b330=>{const _0x128f00=_0x18fdf3;return getConsoleNextUrl(_0x2ddac0[_0x128f00(0x181)],_0x128f00(0x1ae)+_0x4b194c[_0x128f00(0x1a9)]+_0x128f00(0x18c)+_0x26b330);},_0x2f291a=_0x3e3bab=>{const _0x13ffda=_0x18fdf3;return getConsoleNextUrl(_0x2ddac0[_0x13ffda(0x181)],_0x13ffda(0x1ae)+_0x4b194c[_0x13ffda(0x1a9)]+_0x13ffda(0x18c)+_0x3e3bab+_0x13ffda(0x197));};if(_0x2ddac0[_0x18fdf3(0x173)]===_0x18fdf3(0x1a2)||_0x2ddac0[_0x18fdf3(0x173)]===_0x18fdf3(0x190))await handleSDKOutput(_0x1819d7,_0x2ddac0);else{console['log'](a42_0xcc2825[_0x18fdf3(0x187)]('['+_0x4c7d1b+']'));const _0x56b9e4=formatTree(_0x1819d7,{'showMetadata':!![],'getSegmentUrl':_0x10bacf,'getJourneyUrl':_0x2f291a});console['log'](_0x56b9e4);}return 0x0;}}
@@ -1 +1 @@
1
- const a43_0x9c0853=a43_0x486a;function a43_0x5ed7(){const _0x14dbe4=['7812435cwphaj','args','56jtcDXQ','Querying\x20','data','length','✔\x20Query\x20successful\x20-\x200\x20rows\x20returned','...','catalog','site','error','67460PCzCyZ','validate','Catalog:\x20','\x20\x20\x20or:\x20tdx\x20show\x20<catalog.database.table>','Show\x20table\x20contents','name','database','verbose','table','4931577ebovcr','limit','execute','Usage:\x20tdx\x20show\x20<database.table>','1718374UJCBjM','Limit:\x20','description','query','Usage:\x20tdx\x20show\x20<database.table>\x0a\x20\x20\x20or:\x20tdx\x20show\x20<catalog.database.table>\x0a\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--database\x20<database>\x0a\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--in\x20<database>\x0a\x0aRun\x20\x27tdx\x20show\x20--help\x27\x20for\x20more\x20options','Site:\x20','cause','1474372oxBZLL','Error:\x20','message','\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--database\x20<database>','6156174UMtXVv','showTable','1488994bFJTko','255rYMrcM','Database:\x20','\x20\x20Cause:\x20','Table:\x20'];a43_0x5ed7=function(){return _0x14dbe4;};return a43_0x5ed7();}(function(_0x231b55,_0x84dff6){const _0x2ccc20=a43_0x486a,_0x2a73de=_0x231b55();while(!![]){try{const _0x587a21=parseInt(_0x2ccc20(0x1e5))/0x1+-parseInt(_0x2ccc20(0x1eb))/0x2+parseInt(_0x2ccc20(0x1ec))/0x3*(-parseInt(_0x2ccc20(0x1fb))/0x4)+-parseInt(_0x2ccc20(0x1f0))/0x5+-parseInt(_0x2ccc20(0x1e9))/0x6+parseInt(_0x2ccc20(0x1de))/0x7+-parseInt(_0x2ccc20(0x1f2))/0x8*(-parseInt(_0x2ccc20(0x1da))/0x9);if(_0x587a21===_0x84dff6)break;else _0x2a73de['push'](_0x2a73de['shift']());}catch(_0x22ef1e){_0x2a73de['push'](_0x2a73de['shift']());}}}(a43_0x5ed7,0xc09fb));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';function a43_0x486a(_0x5d558e,_0x1cddb3){_0x5d558e=_0x5d558e-0x1da;const _0x5ed771=a43_0x5ed7();let _0x486a9b=_0x5ed771[_0x5d558e];return _0x486a9b;}import{DEFAULT_DISPLAY_LIMIT,resolveLimit}from'../core/constants.js';export class ShowCommand extends BaseCommand{[a43_0x9c0853(0x200)]='show';[a43_0x9c0853(0x1e0)]=a43_0x9c0853(0x1ff);async[a43_0x9c0853(0x1dc)](_0x5afaa2){const _0x2457bd=a43_0x9c0853;return this[_0x2457bd(0x1ea)](_0x5afaa2);}async[a43_0x9c0853(0x1ea)](_0x331d0a){const _0x5c0734=a43_0x9c0853,{options:_0x627c58,args:_0x4a92ca,tdx:_0x50276f}=_0x331d0a;let _0x2c5eb0;try{_0x2c5eb0=parseTableReference(_0x4a92ca[0x0]);const _0x3a6fd5=_0x627c58['database'];!_0x2c5eb0[_0x5c0734(0x201)]&&_0x3a6fd5&&(_0x2c5eb0[_0x5c0734(0x201)]=_0x3a6fd5);const _0x485789=validateTableDescribeReference(_0x2c5eb0);if(_0x485789)return console[_0x5c0734(0x1fa)](_0x5c0734(0x1e6)+_0x485789),console['error'](_0x5c0734(0x1dd)),console[_0x5c0734(0x1fa)](_0x5c0734(0x1fe)),console[_0x5c0734(0x1fa)](_0x5c0734(0x1e8)),0x1;}catch(_0x4a98ef){return console[_0x5c0734(0x1fa)](_0x5c0734(0x1e6)+_0x4a98ef[_0x5c0734(0x1e7)]),console[_0x5c0734(0x1fa)](_0x5c0734(0x1dd)),console['error'](_0x5c0734(0x1fe)),console[_0x5c0734(0x1fa)](_0x5c0734(0x1e8)),0x1;}const _0x1cfa17=_0x2c5eb0[_0x5c0734(0x1f8)],_0x4809b3=_0x2c5eb0[_0x5c0734(0x201)],_0x34c694=_0x2c5eb0[_0x5c0734(0x203)],_0x3c1b33=resolveLimit(_0x627c58[_0x5c0734(0x1db)],DEFAULT_DISPLAY_LIMIT);try{_0x627c58[_0x5c0734(0x202)]&&(console[_0x5c0734(0x1fa)](_0x5c0734(0x1e3)+_0x627c58[_0x5c0734(0x1f9)]),_0x1cfa17&&console[_0x5c0734(0x1fa)](_0x5c0734(0x1fd)+_0x1cfa17),console['error'](_0x5c0734(0x1ed)+_0x4809b3),console['error'](_0x5c0734(0x1ef)+_0x34c694),console['error'](_0x5c0734(0x1df)+_0x3c1b33));const _0x3661a1=_0x1cfa17?_0x1cfa17+'.'+_0x4809b3+'.'+_0x34c694:_0x4809b3+'.'+_0x34c694,_0x31a2c8=await withSpinner(_0x5c0734(0x1f3)+_0x3661a1+_0x5c0734(0x1f7),()=>_0x50276f[_0x5c0734(0x1e1)]['showTable'](_0x4809b3,_0x34c694,_0x3c1b33,_0x1cfa17),{'verbose':_0x627c58['verbose']}),_0x36821c=_0x31a2c8[_0x5c0734(0x1f4)],_0x20fb76=_0x36821c[_0x5c0734(0x1f4)];return _0x20fb76[_0x5c0734(0x1f5)]===0x0?console['error'](_0x5c0734(0x1f6)):console['error']('✔\x20Retrieved\x20'+_0x20fb76[_0x5c0734(0x1f5)]+'\x20row'+(_0x20fb76['length']!==0x1?'s':'')+'\x20from\x20'+_0x3661a1),await handleSDKOutput(_0x20fb76,_0x627c58),0x0;}catch(_0x5601f4){if(_0x5601f4 instanceof SDKError)return console['error'](_0x5c0734(0x1e6)+_0x5601f4[_0x5c0734(0x1e7)]),_0x5601f4[_0x5c0734(0x1e4)]&&console[_0x5c0734(0x1fa)](_0x5c0734(0x1ee)+_0x5601f4[_0x5c0734(0x1e4)]),0x1;throw _0x5601f4;}}[a43_0x9c0853(0x1fc)](_0x9c6b30){const _0x9eac74=a43_0x9c0853;if(_0x9c6b30[_0x9eac74(0x1f1)][_0x9eac74(0x1f5)]===0x0)return _0x9eac74(0x1e2);if(_0x9c6b30['args'][_0x9eac74(0x1f5)]>0x1)return'Too\x20many\x20arguments\x0aUsage:\x20tdx\x20show\x20<database.table>\x0a\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--database\x20<database>\x0a\x0aRun\x20\x27tdx\x20show\x20--help\x27\x20for\x20more\x20options';return undefined;}}
1
+ const a43_0x3d3edf=a43_0x254c;(function(_0x530fdf,_0x3b093b){const _0x2e29cd=a43_0x254c,_0xe9d59d=_0x530fdf();while(!![]){try{const _0x23f32c=parseInt(_0x2e29cd(0x158))/0x1+-parseInt(_0x2e29cd(0x147))/0x2+parseInt(_0x2e29cd(0x13c))/0x3+parseInt(_0x2e29cd(0x133))/0x4*(parseInt(_0x2e29cd(0x155))/0x5)+parseInt(_0x2e29cd(0x145))/0x6*(parseInt(_0x2e29cd(0x14f))/0x7)+-parseInt(_0x2e29cd(0x156))/0x8*(parseInt(_0x2e29cd(0x150))/0x9)+-parseInt(_0x2e29cd(0x136))/0xa;if(_0x23f32c===_0x3b093b)break;else _0xe9d59d['push'](_0xe9d59d['shift']());}catch(_0x4e5955){_0xe9d59d['push'](_0xe9d59d['shift']());}}}(a43_0x4965,0x3f3cd));import{BaseCommand}from'./command.js';function a43_0x4965(){const _0x1071c7=['site','79814rmlPCw','142911IYGDek','Site:\x20','showTable','\x20row','table','100pmoiNX','8GRZYZz','database','516088JtHCUo','show','\x20from\x20','✔\x20Retrieved\x20','Usage:\x20tdx\x20show\x20<database.table>\x0a\x20\x20\x20or:\x20tdx\x20show\x20<catalog.database.table>\x0a\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--database\x20<database>\x0a\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--in\x20<database>\x0a\x0aRun\x20\x27tdx\x20show\x20--help\x27\x20for\x20more\x20options','508JwMWdE','...','error','3806240jrepIK','catalog','Limit:\x20','Usage:\x20tdx\x20show\x20<database.table>','length','message','462702ABnSUN','\x20\x20\x20or:\x20tdx\x20show\x20<catalog.database.table>','data','Table:\x20','query','execute','\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--database\x20<database>','cause','✔\x20Query\x20successful\x20-\x200\x20rows\x20returned','30BYigRI','verbose','148696WNIkev','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','Querying\x20','Error:\x20','args','name','limit'];a43_0x4965=function(){return _0x1071c7;};return a43_0x4965();}import{SDKError}from'../sdk/index.js';function a43_0x254c(_0x174a4d,_0x4a3284){_0x174a4d=_0x174a4d-0x132;const _0x4965fb=a43_0x4965();let _0x254c00=_0x4965fb[_0x174a4d];return _0x254c00;}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{[a43_0x3d3edf(0x14c)]=a43_0x3d3edf(0x159);['description']='Show\x20table\x20contents';async[a43_0x3d3edf(0x141)](_0x4005a7){return this['showTable'](_0x4005a7);}async[a43_0x3d3edf(0x152)](_0x19ce70){const _0x2947ee=a43_0x3d3edf,{options:_0x243fcd,args:_0x27c2f1,tdx:_0xd3ddf5}=_0x19ce70;let _0x20c9a3;try{_0x20c9a3=parseTableReference(_0x27c2f1[0x0]);const _0x4fea86=_0x243fcd[_0x2947ee(0x157)];!_0x20c9a3[_0x2947ee(0x157)]&&_0x4fea86&&(_0x20c9a3[_0x2947ee(0x157)]=_0x4fea86);const _0x54a59e=validateTableDescribeReference(_0x20c9a3);if(_0x54a59e)return console[_0x2947ee(0x135)](_0x2947ee(0x14a)+_0x54a59e),console[_0x2947ee(0x135)](_0x2947ee(0x139)),console[_0x2947ee(0x135)](_0x2947ee(0x13d)),console[_0x2947ee(0x135)](_0x2947ee(0x142)),0x1;}catch(_0x50c033){return console[_0x2947ee(0x135)]('Error:\x20'+_0x50c033['message']),console[_0x2947ee(0x135)]('Usage:\x20tdx\x20show\x20<database.table>'),console[_0x2947ee(0x135)]('\x20\x20\x20or:\x20tdx\x20show\x20<catalog.database.table>'),console['error'](_0x2947ee(0x142)),0x1;}const _0x2c32dc=_0x20c9a3[_0x2947ee(0x137)],_0x4520a3=_0x20c9a3['database'],_0x23924a=_0x20c9a3[_0x2947ee(0x154)],_0x2f0604=resolveLimit(_0x243fcd[_0x2947ee(0x14d)],DEFAULT_DISPLAY_LIMIT);try{_0x243fcd[_0x2947ee(0x146)]&&(console[_0x2947ee(0x135)](_0x2947ee(0x151)+_0x243fcd[_0x2947ee(0x14e)]),_0x2c32dc&&console['error']('Catalog:\x20'+_0x2c32dc),console['error']('Database:\x20'+_0x4520a3),console[_0x2947ee(0x135)](_0x2947ee(0x13f)+_0x23924a),console[_0x2947ee(0x135)](_0x2947ee(0x138)+_0x2f0604));const _0x18c8b8=_0x2c32dc?_0x2c32dc+'.'+_0x4520a3+'.'+_0x23924a:_0x4520a3+'.'+_0x23924a,_0x4cc90b=await withSpinner(_0x2947ee(0x149)+_0x18c8b8+_0x2947ee(0x134),()=>_0xd3ddf5[_0x2947ee(0x140)][_0x2947ee(0x152)](_0x4520a3,_0x23924a,_0x2f0604,_0x2c32dc),{'verbose':_0x243fcd[_0x2947ee(0x146)]}),_0x49d1ac=_0x4cc90b[_0x2947ee(0x13e)],_0x5f1b4d=_0x49d1ac['data'];return _0x5f1b4d[_0x2947ee(0x13a)]===0x0?console[_0x2947ee(0x135)](_0x2947ee(0x144)):console['error'](_0x2947ee(0x15b)+_0x5f1b4d[_0x2947ee(0x13a)]+_0x2947ee(0x153)+(_0x5f1b4d[_0x2947ee(0x13a)]!==0x1?'s':'')+_0x2947ee(0x15a)+_0x18c8b8),await handleSDKOutput(_0x5f1b4d,_0x243fcd),0x0;}catch(_0x366ed1){if(_0x366ed1 instanceof SDKError)return console['error'](_0x2947ee(0x14a)+_0x366ed1[_0x2947ee(0x13b)]),_0x366ed1[_0x2947ee(0x143)]&&console[_0x2947ee(0x135)]('\x20\x20Cause:\x20'+_0x366ed1[_0x2947ee(0x143)]),0x1;throw _0x366ed1;}}['validate'](_0x430a8e){const _0x2347cd=a43_0x3d3edf;if(_0x430a8e[_0x2347cd(0x14b)][_0x2347cd(0x13a)]===0x0)return _0x2347cd(0x132);if(_0x430a8e[_0x2347cd(0x14b)]['length']>0x1)return _0x2347cd(0x148);return undefined;}}
@@ -1 +1 @@
1
- const a44_0x5cb9d3=a44_0x8009;(function(_0x5af651,_0x54a7f5){const _0x440bfc=a44_0x8009,_0x56739b=_0x5af651();while(!![]){try{const _0x1fd768=parseInt(_0x440bfc(0xf0))/0x1+parseInt(_0x440bfc(0xd6))/0x2+parseInt(_0x440bfc(0xe0))/0x3+-parseInt(_0x440bfc(0xee))/0x4+parseInt(_0x440bfc(0xd3))/0x5*(-parseInt(_0x440bfc(0xf6))/0x6)+-parseInt(_0x440bfc(0xec))/0x7*(parseInt(_0x440bfc(0xf5))/0x8)+parseInt(_0x440bfc(0xe7))/0x9;if(_0x1fd768===_0x54a7f5)break;else _0x56739b['push'](_0x56739b['shift']());}catch(_0x1a1bca){_0x56739b['push'](_0x56739b['shift']());}}}(a44_0x3a73,0x62d34));import{BaseCommand,printAuthError}from'./command.js';function a44_0x3a73(){const _0x1d0e1d=['site:\x20','✓\x20Authentication\x20successful\x0a','N/A','last_name','Account\x20ID:','bold','env','\x20profile:\x20','message','5INhhCZ','filter','account_id','471614FwXidP','red','dim','status','CLI\x20flag','No\x20credential\x20found','description','(from\x20','jobs','log','130728xkYmGi','tdx','profileSource','Show\x20authentication\x20status\x20and\x20current\x20context','User:','Name:','displayWithSources','5423760urwYsP','getUserInfo','error','TDX_PROFILE\x20env','first_name','391678vAzYCG','cyan','1820700RjskxQ','session','763841cZZAmg','profile','config','yellow','join','32JdNvRE','3372510SukXDT'];a44_0x3a73=function(){return _0x1d0e1d;};return a44_0x3a73();}function a44_0x8009(_0x17e4d9,_0x4bc94e){_0x17e4d9=_0x17e4d9-0xcf;const _0x3a73a4=a44_0x3a73();let _0x8009e3=_0x3a73a4[_0x17e4d9];return _0x8009e3;}import{resolveAPIKeyAsync}from'../core/config.js';import{HTTPClientError}from'../sdk/client/http-client.js';import{GlobalContext}from'../core/global-context.js';import a44_0x7a196a from'chalk';export class StatusCommand extends BaseCommand{['name']=a44_0x5cb9d3(0xd9);[a44_0x5cb9d3(0xdc)]=a44_0x5cb9d3(0xe3);async['execute'](_0x2a70df){const _0x303e63=a44_0x5cb9d3,{options:_0x147af7,tdx:_0x28fc59}=_0x2a70df,_0x26e411=_0x147af7['site'],_0x1db99b=new GlobalContext(_0x147af7),_0x50fc66=_0x1db99b[_0x303e63(0xf1)],_0x450e0c=_0x1db99b[_0x303e63(0xe2)],_0x1d213c=_0x450e0c==='cli'?_0x303e63(0xda):_0x450e0c===_0x303e63(0xef)?'session':_0x450e0c===_0x303e63(0xd0)?_0x303e63(0xea):_0x450e0c===_0x303e63(0xf2)?_0x303e63(0xf2):null,_0x5abc0c=_0x50fc66?a44_0x7a196a['cyan'](_0x50fc66):a44_0x7a196a[_0x303e63(0xd8)](_0x303e63(0xf9)),_0x3edcf1=_0x1d213c?'\x20'+a44_0x7a196a['dim'](_0x303e63(0xdd)+_0x1d213c+')'):'';console['log'](a44_0x7a196a[_0x303e63(0xcf)](_0x303e63(0xe1))+_0x303e63(0xd1)+_0x5abc0c+_0x3edcf1+'\x20'+a44_0x7a196a[_0x303e63(0xd8)]('(')+_0x303e63(0xf7)+a44_0x7a196a[_0x303e63(0xed)](_0x26e411)+a44_0x7a196a[_0x303e63(0xd8)](')'));const _0x17cee8=await resolveAPIKeyAsync(_0x26e411,_0x50fc66);if(_0x17cee8){const {source:_0x588243,isDeprecated:_0x3e4609}=_0x17cee8,_0x2a3b45='Read\x20credential\x20from\x20'+a44_0x7a196a[_0x303e63(0xed)](_0x588243);console[_0x303e63(0xdf)](_0x3e4609?a44_0x7a196a[_0x303e63(0xf3)](_0x2a3b45):_0x2a3b45);}else console[_0x303e63(0xdf)](a44_0x7a196a[_0x303e63(0xf3)](_0x303e63(0xdb)));let _0x42dbde=![];try{const _0x4bfcb4=await _0x28fc59[_0x303e63(0xde)][_0x303e63(0xe8)]();console['log'](a44_0x7a196a['green'](_0x303e63(0xf8))),console[_0x303e63(0xdf)](a44_0x7a196a['bold'](_0x303e63(0xe4))+'\x20'+a44_0x7a196a['cyan'](_0x4bfcb4['email']));if(_0x4bfcb4['first_name']||_0x4bfcb4[_0x303e63(0xfa)]){const _0x2e724d=[_0x4bfcb4[_0x303e63(0xeb)],_0x4bfcb4[_0x303e63(0xfa)]][_0x303e63(0xd4)](Boolean)[_0x303e63(0xf4)]('\x20');console[_0x303e63(0xdf)](a44_0x7a196a['bold'](_0x303e63(0xe5))+'\x20'+_0x2e724d);}_0x4bfcb4[_0x303e63(0xd5)]&&console[_0x303e63(0xdf)](a44_0x7a196a[_0x303e63(0xcf)](_0x303e63(0xfb))+'\x20'+a44_0x7a196a['yellow'](_0x4bfcb4['account_id'])),_0x42dbde=!![];}catch(_0x564ac7){_0x564ac7 instanceof HTTPClientError&&_0x564ac7[_0x303e63(0xd9)]===0x191?printAuthError(_0x564ac7,!![],_0x50fc66):console[_0x303e63(0xe9)](a44_0x7a196a[_0x303e63(0xd7)]('✗\x20Validation\x20failed:\x20'+(_0x564ac7 instanceof Error?_0x564ac7[_0x303e63(0xd2)]:String(_0x564ac7))));}return console[_0x303e63(0xdf)](),_0x1db99b[_0x303e63(0xe6)](),_0x42dbde?0x0:0x1;}}
1
+ function a44_0xf5bf(){const _0x45f8bf=['displayWithSources','first_name','✗\x20Validation\x20failed:\x20','550186pGckEq','status','env','Read\x20credential\x20from\x20','4580320JDchpr','CLI\x20flag','4260515IGZXjG','site:\x20','yellow','last_name','N/A','✓\x20Authentication\x20successful\x0a','1720MRAPau','7335gQtamh','getUserInfo','dim','tdx','1125750iMctHo','session','config','cyan','execute','message','account_id','profile','1317282SUpohl','log','6LTZNxj','join','User:','Show\x20authentication\x20status\x20and\x20current\x20context','description','jobs','Account\x20ID:','error','bold','\x20profile:\x20','(from\x20','email','227343EbRORp','24CtMkwE'];a44_0xf5bf=function(){return _0x45f8bf;};return a44_0xf5bf();}function a44_0x59a3(_0x5bc9d4,_0x1deead){_0x5bc9d4=_0x5bc9d4-0x120;const _0xf5bf38=a44_0xf5bf();let _0x59a323=_0xf5bf38[_0x5bc9d4];return _0x59a323;}const a44_0x4d5f58=a44_0x59a3;(function(_0x425b94,_0x5105a7){const _0xa12ccb=a44_0x59a3,_0x19758e=_0x425b94();while(!![]){try{const _0x25bd51=-parseInt(_0xa12ccb(0x13e))/0x1+parseInt(_0xa12ccb(0x146))/0x2+-parseInt(_0xa12ccb(0x128))/0x3*(parseInt(_0xa12ccb(0x129))/0x4)+parseInt(_0xa12ccb(0x133))/0x5*(parseInt(_0xa12ccb(0x148))/0x6)+parseInt(_0xa12ccb(0x12d))/0x7+-parseInt(_0xa12ccb(0x139))/0x8*(-parseInt(_0xa12ccb(0x13a))/0x9)+parseInt(_0xa12ccb(0x131))/0xa;if(_0x25bd51===_0x5105a7)break;else _0x19758e['push'](_0x19758e['shift']());}catch(_0x5bcbe3){_0x19758e['push'](_0x19758e['shift']());}}}(a44_0xf5bf,0x9cc73));import{BaseCommand,printAuthError}from'./command.js';import{resolveAPIKeyAsync}from'../core/config.js';import{HTTPClientError}from'../sdk/client/http-client.js';import{GlobalContext}from'../core/global-context.js';import a44_0x303711 from'chalk';export class StatusCommand extends BaseCommand{['name']=a44_0x4d5f58(0x12e);[a44_0x4d5f58(0x120)]=a44_0x4d5f58(0x14b);async[a44_0x4d5f58(0x142)](_0x3867e8){const _0x5e2ea1=a44_0x4d5f58,{options:_0x138ea8,tdx:_0x1160eb}=_0x3867e8,_0x1b3e9d=_0x138ea8['site'],_0x2a9dc7=new GlobalContext(_0x138ea8),_0x46a630=_0x2a9dc7[_0x5e2ea1(0x145)],_0xbe893c=_0x2a9dc7['profileSource'],_0x527c17=_0xbe893c==='cli'?_0x5e2ea1(0x132):_0xbe893c===_0x5e2ea1(0x13f)?'session':_0xbe893c===_0x5e2ea1(0x12f)?'TDX_PROFILE\x20env':_0xbe893c===_0x5e2ea1(0x140)?_0x5e2ea1(0x140):null,_0x320540=_0x46a630?a44_0x303711[_0x5e2ea1(0x141)](_0x46a630):a44_0x303711[_0x5e2ea1(0x13c)](_0x5e2ea1(0x137)),_0x6ad088=_0x527c17?'\x20'+a44_0x303711[_0x5e2ea1(0x13c)](_0x5e2ea1(0x126)+_0x527c17+')'):'';console[_0x5e2ea1(0x147)](a44_0x303711[_0x5e2ea1(0x124)](_0x5e2ea1(0x13d))+_0x5e2ea1(0x125)+_0x320540+_0x6ad088+'\x20'+a44_0x303711[_0x5e2ea1(0x13c)]('(')+_0x5e2ea1(0x134)+a44_0x303711[_0x5e2ea1(0x141)](_0x1b3e9d)+a44_0x303711['dim'](')'));const _0x1aa3ef=await resolveAPIKeyAsync(_0x1b3e9d,_0x46a630);if(_0x1aa3ef){const {source:_0x3b2181,isDeprecated:_0x22d462}=_0x1aa3ef,_0x1a493c=_0x5e2ea1(0x130)+a44_0x303711[_0x5e2ea1(0x141)](_0x3b2181);console[_0x5e2ea1(0x147)](_0x22d462?a44_0x303711['yellow'](_0x1a493c):_0x1a493c);}else console['log'](a44_0x303711['yellow']('No\x20credential\x20found'));let _0x485df1=![];try{const _0x4f48c0=await _0x1160eb[_0x5e2ea1(0x121)][_0x5e2ea1(0x13b)]();console[_0x5e2ea1(0x147)](a44_0x303711['green'](_0x5e2ea1(0x138))),console[_0x5e2ea1(0x147)](a44_0x303711['bold'](_0x5e2ea1(0x14a))+'\x20'+a44_0x303711[_0x5e2ea1(0x141)](_0x4f48c0[_0x5e2ea1(0x127)]));if(_0x4f48c0[_0x5e2ea1(0x12b)]||_0x4f48c0[_0x5e2ea1(0x136)]){const _0x1499e1=[_0x4f48c0[_0x5e2ea1(0x12b)],_0x4f48c0[_0x5e2ea1(0x136)]]['filter'](Boolean)[_0x5e2ea1(0x149)]('\x20');console[_0x5e2ea1(0x147)](a44_0x303711[_0x5e2ea1(0x124)]('Name:')+'\x20'+_0x1499e1);}_0x4f48c0['account_id']&&console[_0x5e2ea1(0x147)](a44_0x303711[_0x5e2ea1(0x124)](_0x5e2ea1(0x122))+'\x20'+a44_0x303711[_0x5e2ea1(0x135)](_0x4f48c0[_0x5e2ea1(0x144)])),_0x485df1=!![];}catch(_0x2cda90){_0x2cda90 instanceof HTTPClientError&&_0x2cda90['status']===0x191?printAuthError(_0x2cda90,!![],_0x46a630):console[_0x5e2ea1(0x123)](a44_0x303711['red'](_0x5e2ea1(0x12c)+(_0x2cda90 instanceof Error?_0x2cda90[_0x5e2ea1(0x143)]:String(_0x2cda90))));}return console['log'](),_0x2a9dc7[_0x5e2ea1(0x12a)](),_0x485df1?0x0:0x1;}}
@@ -1 +1 @@
1
- function a45_0x3520(){const _0x1eabe0=['\x20\x20tdx\x20tables\x20\x22mydb.users\x22\x20\x20\x20\x20->\x20table\x20\x22users\x22\x20in\x20database\x20mydb','6bBiiSZ','table','\x20\x20Or:\x20\x20tdx\x20tables\x20--in\x20','\x27\x20across\x20all\x20databases.','3122870TFKETG','251613UQVxsO','description','1159455HEJaHr','database_name','Database\x20\x27','verbose','validate','Database\x20pattern:\x20','\x20table','database','Database:\x20','Database:\x20all','Listing\x20tables...','Error:\x20Pattern\x20\x27','\x20\x20tdx\x20tables\x20\x22*.user*\x22\x20\x20\x20\x20\x20\x20\x20->\x20tables\x20matching\x20user*\x20across\x20databases','error','data','message','tables','Table\x20pattern:\x20','Site:\x20','✔\x20Found\x20','40rRTyrQ','70336FDSYIT','\x20\x20tdx\x20tables\x20users\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20->\x20table\x20\x22users\x22\x20across\x20all\x20databases','Error:\x20','listTables','\x27\x20may\x20not\x20exist\x20or\x20contains\x20no\x20tables','length','3229776dGRjDX','1007923UcjewB','includes','name','\x27\x20is\x20ambiguous.','39722JyMFwj','\x20\x20Use:\x20tdx\x20tables\x20\x22','\x20\x20tdx\x20tables\x20\x22mydb.*\x22\x20\x20\x20\x20\x20\x20\x20\x20->\x20all\x20tables\x20from\x20mydb','57uoxuGP','📋\x20','site','cause','12nDNjvT','\x27\x20without\x20wildcards\x20would\x20search\x20for\x20tables\x20named\x20\x27'];a45_0x3520=function(){return _0x1eabe0;};return a45_0x3520();}const a45_0x4af6b0=a45_0x1389;(function(_0x491cb1,_0x4e872f){const _0x287af7=a45_0x1389,_0x53dd04=_0x491cb1();while(!![]){try{const _0x4efecb=parseInt(_0x287af7(0x15d))/0x1*(parseInt(_0x287af7(0x153))/0x2)+-parseInt(_0x287af7(0x156))/0x3*(parseInt(_0x287af7(0x148))/0x4)+parseInt(_0x287af7(0x133))/0x5*(parseInt(_0x287af7(0x15a))/0x6)+-parseInt(_0x287af7(0x14f))/0x7+parseInt(_0x287af7(0x147))/0x8*(parseInt(_0x287af7(0x162))/0x9)+parseInt(_0x287af7(0x161))/0xa+-parseInt(_0x287af7(0x14e))/0xb;if(_0x4efecb===_0x4e872f)break;else _0x53dd04['push'](_0x53dd04['shift']());}catch(_0x5e3f3b){_0x53dd04['push'](_0x53dd04['shift']());}}}(a45_0x3520,0x40497));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 a45_0x1389(_0x2ca227,_0x2b90fb){_0x2ca227=_0x2ca227-0x133;const _0x3520fc=a45_0x3520();let _0x138907=_0x3520fc[_0x2ca227];return _0x138907;}import{withSpinner}from'../utils/spinner.js';export class TablesCommand extends BaseCommand{[a45_0x4af6b0(0x151)]=a45_0x4af6b0(0x143);[a45_0x4af6b0(0x163)]='List\x20tables\x20in\x20a\x20database';async['execute'](_0x432681){const _0x27616c=a45_0x4af6b0,{options:_0x1252e6,args:_0x2417a2,tdx:_0x74671f}=_0x432681;let _0x4eabad;if(_0x2417a2[_0x27616c(0x14d)]===0x0)_0x4eabad={'database':undefined,'table':undefined,'original':''};else{if(_0x2417a2[_0x27616c(0x14d)]===0x1)try{_0x4eabad=parseTableReference(_0x2417a2[0x0]);if(_0x4eabad[_0x27616c(0x15e)]&&!_0x4eabad[_0x27616c(0x13a)]&&!_0x4eabad[_0x27616c(0x15e)][_0x27616c(0x150)]('*')&&!_0x4eabad[_0x27616c(0x15e)][_0x27616c(0x150)]('?'))return console['error'](_0x27616c(0x13e)+_0x2417a2[0x0]+_0x27616c(0x152)),console[_0x27616c(0x140)]('Did\x20you\x20mean\x20to\x20list\x20all\x20tables\x20from\x20database\x20\x27'+_0x4eabad[_0x27616c(0x15e)]+'\x27?'),console[_0x27616c(0x140)](_0x27616c(0x154)+_0x4eabad[_0x27616c(0x15e)]+'.*\x22'),console['error'](_0x27616c(0x15f)+_0x4eabad[_0x27616c(0x15e)]),console[_0x27616c(0x140)]('\x20\x20Or:\x20\x20tdx\x20tables\x20--database\x20'+_0x4eabad[_0x27616c(0x15e)]),console[_0x27616c(0x140)](''),console['error']('Note:\x20\x27'+_0x2417a2[0x0]+_0x27616c(0x15b)+_0x4eabad[_0x27616c(0x15e)]+_0x27616c(0x160)),0x1;}catch(_0x514bcf){return console[_0x27616c(0x140)]('Error:\x20'+_0x514bcf[_0x27616c(0x142)]),0x1;}else return console['error']('Error:\x20Too\x20many\x20arguments.\x20Use\x20single\x20argument:'),console[_0x27616c(0x140)](_0x27616c(0x149)),console['error'](_0x27616c(0x155)),console[_0x27616c(0x140)](_0x27616c(0x15c)),console['error'](_0x27616c(0x13f)),console['error']('Or\x20use\x20--in\x20flag:'),console[_0x27616c(0x140)]('\x20\x20tdx\x20tables\x20--in\x20mydb\x20\x20\x20\x20\x20\x20\x20->\x20all\x20tables\x20from\x20mydb'),0x1;}const _0x426646=_0x1252e6[_0x27616c(0x13a)];!_0x4eabad[_0x27616c(0x13a)]&&_0x426646&&(_0x4eabad[_0x27616c(0x13a)]=_0x426646);try{const _0x3112d8=_0x312cd6=>_0x312cd6&&(_0x312cd6[_0x27616c(0x150)]('*')||_0x312cd6['includes']('?')),_0x3d49b4=_0x3112d8(_0x4eabad[_0x27616c(0x13a)]);_0x1252e6[_0x27616c(0x136)]&&(console[_0x27616c(0x140)](_0x27616c(0x145)+_0x1252e6[_0x27616c(0x158)]),_0x4eabad['database']?_0x3d49b4?console[_0x27616c(0x140)](_0x27616c(0x138)+_0x4eabad[_0x27616c(0x13a)]):console[_0x27616c(0x140)](_0x27616c(0x13b)+_0x4eabad[_0x27616c(0x13a)]):console['error'](_0x27616c(0x13c)),_0x4eabad[_0x27616c(0x15e)]&&console[_0x27616c(0x140)](_0x27616c(0x144)+_0x4eabad[_0x27616c(0x15e)]));const _0x16a28f=_0x4eabad['database']&&!_0x3d49b4?_0x4eabad[_0x27616c(0x13a)]:undefined,_0x35849a=_0x3d49b4?_0x4eabad[_0x27616c(0x13a)]:undefined,_0x3aec44=_0x4eabad[_0x27616c(0x15e)],_0x78bc9a=resolveLimit(_0x1252e6['limit'],DEFAULT_LISTING_LIMIT),_0xeb71e7=await withSpinner(_0x27616c(0x13d),()=>_0x74671f['query'][_0x27616c(0x14b)](_0x16a28f,_0x3aec44,_0x35849a,_0x78bc9a),{'verbose':_0x1252e6['verbose']}),_0x4ed590=_0xeb71e7[_0x27616c(0x141)];if(_0x4ed590['length']===0x0&&_0x4eabad[_0x27616c(0x13a)]&&!_0x3d49b4)return console[_0x27616c(0x140)]('✖\x20No\x20tables\x20found'),console[_0x27616c(0x140)](_0x27616c(0x135)+_0x4eabad['database']+_0x27616c(0x14c)),0x1;console['error'](_0x27616c(0x146)+_0x4ed590[_0x27616c(0x14d)]+_0x27616c(0x139)+(_0x4ed590[_0x27616c(0x14d)]!==0x1?'s':''));if(isStructuredFormat(_0x1252e6))await handleSDKOutput(_0x4ed590,{..._0x1252e6,'limit':_0x78bc9a});else for(const _0x431048 of _0x4ed590){const _0x2856f9=_0x431048[_0x27616c(0x134)]?_0x431048['database_name']+'.':'';console['log'](_0x27616c(0x157)+_0x2856f9+_0x431048['table_name']);}return 0x0;}catch(_0x20ba9f){if(_0x20ba9f instanceof SDKError)return console['error'](_0x27616c(0x14a)+_0x20ba9f['message']),_0x20ba9f[_0x27616c(0x159)]&&console[_0x27616c(0x140)]('\x20\x20Cause:\x20'+_0x20ba9f[_0x27616c(0x159)]),0x1;throw _0x20ba9f;}}[a45_0x4af6b0(0x137)](_0x15c2ae){return undefined;}}
1
+ const a45_0x393f59=a45_0x21fc;(function(_0x976860,_0x10006a){const _0x38a091=a45_0x21fc,_0x55ad7b=_0x976860();while(!![]){try{const _0x4dee6d=parseInt(_0x38a091(0x1d3))/0x1+-parseInt(_0x38a091(0x1c3))/0x2*(-parseInt(_0x38a091(0x1c5))/0x3)+-parseInt(_0x38a091(0x1e9))/0x4+parseInt(_0x38a091(0x1dd))/0x5+parseInt(_0x38a091(0x1d4))/0x6+parseInt(_0x38a091(0x1df))/0x7+parseInt(_0x38a091(0x1d2))/0x8*(-parseInt(_0x38a091(0x1e3))/0x9);if(_0x4dee6d===_0x10006a)break;else _0x55ad7b['push'](_0x55ad7b['shift']());}catch(_0x42c3ff){_0x55ad7b['push'](_0x55ad7b['shift']());}}}(a45_0x3288,0xade8e));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 a45_0x21fc(_0x4a713a,_0x13df18){_0x4a713a=_0x4a713a-0x1b4;const _0x3288e8=a45_0x3288();let _0x21fc03=_0x3288e8[_0x4a713a];return _0x21fc03;}import{withSpinner}from'../utils/spinner.js';function a45_0x3288(){const _0x3bf40c=['\x20\x20tdx\x20tables\x20\x22mydb.*\x22\x20\x20\x20\x20\x20\x20\x20\x20->\x20all\x20tables\x20from\x20mydb','\x20\x20tdx\x20tables\x20--in\x20mydb\x20\x20\x20\x20\x20\x20\x20->\x20all\x20tables\x20from\x20mydb','name','includes','database','tables','\x20\x20tdx\x20tables\x20\x22*.user*\x22\x20\x20\x20\x20\x20\x20\x20->\x20tables\x20matching\x20user*\x20across\x20databases','\x20\x20Or:\x20\x20tdx\x20tables\x20--database\x20','Database:\x20','database_name','validate','log','64424EmObuQ','1088729efHiYD','7205892POCNKm','.*\x22','✖\x20No\x20tables\x20found','verbose','Error:\x20Too\x20many\x20arguments.\x20Use\x20single\x20argument:','Error:\x20','Did\x20you\x20mean\x20to\x20list\x20all\x20tables\x20from\x20database\x20\x27','listTables','\x27\x20without\x20wildcards\x20would\x20search\x20for\x20tables\x20named\x20\x27','5133145LEoOGD','table','9609047cuyIqu','Table\x20pattern:\x20','Error:\x20Pattern\x20\x27','📋\x20','3987lHNoVM','Database\x20\x27','List\x20tables\x20in\x20a\x20database','\x27\x20across\x20all\x20databases.','Note:\x20\x27','✔\x20Found\x20','2405760rJHybj','\x27\x20may\x20not\x20exist\x20or\x20contains\x20no\x20tables','Database\x20pattern:\x20','Database:\x20all','execute','\x20table','site','length','\x27\x20is\x20ambiguous.','Listing\x20tables...','data','description','cause','Site:\x20','message','error','624VPlgZu','\x20\x20tdx\x20tables\x20users\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20->\x20table\x20\x22users\x22\x20across\x20all\x20databases','1848CzaoRU'];a45_0x3288=function(){return _0x3bf40c;};return a45_0x3288();}export class TablesCommand extends BaseCommand{[a45_0x393f59(0x1c8)]=a45_0x393f59(0x1cb);[a45_0x393f59(0x1be)]=a45_0x393f59(0x1e5);async[a45_0x393f59(0x1b7)](_0x315099){const _0x5aae6d=a45_0x393f59,{options:_0x593678,args:_0x106c0a,tdx:_0x4cc4a9}=_0x315099;let _0x428c94;if(_0x106c0a[_0x5aae6d(0x1ba)]===0x0)_0x428c94={'database':undefined,'table':undefined,'original':''};else{if(_0x106c0a[_0x5aae6d(0x1ba)]===0x1)try{_0x428c94=parseTableReference(_0x106c0a[0x0]);if(_0x428c94[_0x5aae6d(0x1de)]&&!_0x428c94['database']&&!_0x428c94[_0x5aae6d(0x1de)]['includes']('*')&&!_0x428c94[_0x5aae6d(0x1de)]['includes']('?'))return console[_0x5aae6d(0x1c2)](_0x5aae6d(0x1e1)+_0x106c0a[0x0]+_0x5aae6d(0x1bb)),console['error'](_0x5aae6d(0x1da)+_0x428c94[_0x5aae6d(0x1de)]+'\x27?'),console['error']('\x20\x20Use:\x20tdx\x20tables\x20\x22'+_0x428c94[_0x5aae6d(0x1de)]+_0x5aae6d(0x1d5)),console[_0x5aae6d(0x1c2)]('\x20\x20Or:\x20\x20tdx\x20tables\x20--in\x20'+_0x428c94[_0x5aae6d(0x1de)]),console['error'](_0x5aae6d(0x1cd)+_0x428c94[_0x5aae6d(0x1de)]),console[_0x5aae6d(0x1c2)](''),console[_0x5aae6d(0x1c2)](_0x5aae6d(0x1e7)+_0x106c0a[0x0]+_0x5aae6d(0x1dc)+_0x428c94[_0x5aae6d(0x1de)]+_0x5aae6d(0x1e6)),0x1;}catch(_0x569ee7){return console['error']('Error:\x20'+_0x569ee7[_0x5aae6d(0x1c1)]),0x1;}else return console[_0x5aae6d(0x1c2)](_0x5aae6d(0x1d8)),console[_0x5aae6d(0x1c2)](_0x5aae6d(0x1c4)),console['error'](_0x5aae6d(0x1c6)),console[_0x5aae6d(0x1c2)]('\x20\x20tdx\x20tables\x20\x22mydb.users\x22\x20\x20\x20\x20->\x20table\x20\x22users\x22\x20in\x20database\x20mydb'),console[_0x5aae6d(0x1c2)](_0x5aae6d(0x1cc)),console[_0x5aae6d(0x1c2)]('Or\x20use\x20--in\x20flag:'),console[_0x5aae6d(0x1c2)](_0x5aae6d(0x1c7)),0x1;}const _0x56f173=_0x593678[_0x5aae6d(0x1ca)];!_0x428c94[_0x5aae6d(0x1ca)]&&_0x56f173&&(_0x428c94[_0x5aae6d(0x1ca)]=_0x56f173);try{const _0x5b95e0=_0x13323d=>_0x13323d&&(_0x13323d[_0x5aae6d(0x1c9)]('*')||_0x13323d['includes']('?')),_0x96e426=_0x5b95e0(_0x428c94[_0x5aae6d(0x1ca)]);_0x593678['verbose']&&(console['error'](_0x5aae6d(0x1c0)+_0x593678[_0x5aae6d(0x1b9)]),_0x428c94[_0x5aae6d(0x1ca)]?_0x96e426?console['error'](_0x5aae6d(0x1b5)+_0x428c94[_0x5aae6d(0x1ca)]):console[_0x5aae6d(0x1c2)](_0x5aae6d(0x1ce)+_0x428c94[_0x5aae6d(0x1ca)]):console[_0x5aae6d(0x1c2)](_0x5aae6d(0x1b6)),_0x428c94['table']&&console[_0x5aae6d(0x1c2)](_0x5aae6d(0x1e0)+_0x428c94[_0x5aae6d(0x1de)]));const _0x5650e6=_0x428c94[_0x5aae6d(0x1ca)]&&!_0x96e426?_0x428c94[_0x5aae6d(0x1ca)]:undefined,_0x36dea3=_0x96e426?_0x428c94[_0x5aae6d(0x1ca)]:undefined,_0x2985e0=_0x428c94['table'],_0x5e7858=resolveLimit(_0x593678['limit'],DEFAULT_LISTING_LIMIT),_0x3bb728=await withSpinner(_0x5aae6d(0x1bc),()=>_0x4cc4a9['query'][_0x5aae6d(0x1db)](_0x5650e6,_0x2985e0,_0x36dea3,_0x5e7858),{'verbose':_0x593678[_0x5aae6d(0x1d7)]}),_0x2dc3ba=_0x3bb728[_0x5aae6d(0x1bd)];if(_0x2dc3ba['length']===0x0&&_0x428c94[_0x5aae6d(0x1ca)]&&!_0x96e426)return console[_0x5aae6d(0x1c2)](_0x5aae6d(0x1d6)),console[_0x5aae6d(0x1c2)](_0x5aae6d(0x1e4)+_0x428c94[_0x5aae6d(0x1ca)]+_0x5aae6d(0x1b4)),0x1;console['error'](_0x5aae6d(0x1e8)+_0x2dc3ba[_0x5aae6d(0x1ba)]+_0x5aae6d(0x1b8)+(_0x2dc3ba[_0x5aae6d(0x1ba)]!==0x1?'s':''));if(isStructuredFormat(_0x593678))await handleSDKOutput(_0x2dc3ba,{..._0x593678,'limit':_0x5e7858});else for(const _0x46ad7d of _0x2dc3ba){const _0x3fbbc3=_0x46ad7d['database_name']?_0x46ad7d[_0x5aae6d(0x1cf)]+'.':'';console[_0x5aae6d(0x1d1)](_0x5aae6d(0x1e2)+_0x3fbbc3+_0x46ad7d['table_name']);}return 0x0;}catch(_0x389024){if(_0x389024 instanceof SDKError)return console[_0x5aae6d(0x1c2)](_0x5aae6d(0x1d9)+_0x389024[_0x5aae6d(0x1c1)]),_0x389024['cause']&&console[_0x5aae6d(0x1c2)]('\x20\x20Cause:\x20'+_0x389024[_0x5aae6d(0x1bf)]),0x1;throw _0x389024;}}[a45_0x393f59(0x1d0)](_0x3f00b4){return undefined;}}
@@ -1 +1 @@
1
- const a46_0x22df60=a46_0x43d0;(function(_0x758c3e,_0x237ea0){const _0x1fbe3f=a46_0x43d0,_0x2ad3f1=_0x758c3e();while(!![]){try{const _0x4a84f7=parseInt(_0x1fbe3f(0x181))/0x1+-parseInt(_0x1fbe3f(0x18d))/0x2*(-parseInt(_0x1fbe3f(0x184))/0x3)+parseInt(_0x1fbe3f(0x193))/0x4*(-parseInt(_0x1fbe3f(0x180))/0x5)+-parseInt(_0x1fbe3f(0x18b))/0x6*(-parseInt(_0x1fbe3f(0x19a))/0x7)+-parseInt(_0x1fbe3f(0x195))/0x8*(parseInt(_0x1fbe3f(0x191))/0x9)+parseInt(_0x1fbe3f(0x175))/0xa+parseInt(_0x1fbe3f(0x197))/0xb*(-parseInt(_0x1fbe3f(0x196))/0xc);if(_0x4a84f7===_0x237ea0)break;else _0x2ad3f1['push'](_0x2ad3f1['shift']());}catch(_0x276f4f){_0x2ad3f1['push'](_0x2ad3f1['shift']());}}}(a46_0x20a2,0x955a4));import{BaseCommand}from'./command.js';function a46_0x43d0(_0x43c6f0,_0x3325d5){_0x43c6f0=_0x43c6f0-0x170;const _0x20a24f=a46_0x20a2();let _0x43d018=_0x20a24f[_0x43c6f0];return _0x43d018;}import{getSessionID,cleanExpiredSessions,clearSessionContextField}from'../core/session.js';import{clearDefaultSiteFromUserConfig,clearActiveProfileFromUserConfig}from'../core/profile.js';import{getConfigDir}from'../core/config.js';function a46_0x20a2(){const _0x17e343=['length','name','llm_project','9JQZmVg','profile','33844KqffCH','llm_agent','1892656LnUFCP','1803996duUmuJ','132kDzITX','session','\x0aRun\x20\x27tdx\x20unset\x20--help\x27\x20for\x20more\x20options','1236445hihEVx','cleared','join','log','Invalid\x20resource:\x20','.\x20Must\x20be\x20one\x20of:\x20','dim','5613530gKBsHQ','description','validate','default','Session\x20','site','Error:\x20','includes','Clear\x20session-level\x20or\x20default\x20context\x20values','\x20\x20\x20\x20\x20\x20\x20tdx\x20unset\x20--default\x20<resource>\x20\x20#\x20Clear\x20default\x20from\x20config\x0a','unset','195VkmAcf','1182297ztFaau','engage_workspace','\x0aUpdated:\x20','69osRBmE','parent_segment','Default\x20site\x20','green','message','agent','(session:\x20','12SWHoyV','database','76990ksvyLs'];a46_0x20a2=function(){return _0x17e343;};return a46_0x20a2();}import a46_0x5b5c7b from'chalk';import*as a46_0x2f9c09 from'node:path';export class UnsetCommand extends BaseCommand{[a46_0x22df60(0x18f)]=a46_0x22df60(0x17f);[a46_0x22df60(0x176)]=a46_0x22df60(0x17d);[a46_0x22df60(0x177)](_0x5d314b){const _0x5d3cd4=a46_0x22df60,{args:_0x3914c8,options:_0xfd5944}=_0x5d314b,_0x2d65af=_0xfd5944[_0x5d3cd4(0x178)];if(_0x3914c8[_0x5d3cd4(0x18e)]===0x0)return'Usage:\x20tdx\x20unset\x20<resource>\x0a'+_0x5d3cd4(0x17e)+'\x0aResources:\x20site,\x20database,\x20parent_segment,\x20llm_project,\x20agent,\x20profile,\x20engage_workspace\x0a'+_0x5d3cd4(0x199);const _0x269989=_0x3914c8[0x0],_0xcb2e23=['site',_0x5d3cd4(0x18c),_0x5d3cd4(0x185),'llm_project',_0x5d3cd4(0x189),_0x5d3cd4(0x192),_0x5d3cd4(0x182)];if(!_0xcb2e23[_0x5d3cd4(0x17c)](_0x269989))return _0x5d3cd4(0x172)+_0x269989+_0x5d3cd4(0x173)+_0xcb2e23[_0x5d3cd4(0x170)](',\x20');if(_0x2d65af&&_0x269989!==_0x5d3cd4(0x17a)&&_0x269989!==_0x5d3cd4(0x192))return'--default\x20can\x20only\x20be\x20used\x20with\x20\x27site\x27\x20or\x20\x27profile\x27.\x20Other\x20resources\x20are\x20session-level\x20only.';return undefined;}async['execute'](_0x5393b9){const _0x54644d=a46_0x22df60,{args:_0x316d86,options:_0x40abca}=_0x5393b9,_0x36aad6=_0x40abca[_0x54644d(0x178)];cleanExpiredSessions();try{const _0x48dbe4=_0x316d86[0x0],_0x586efd=a46_0x2f9c09[_0x54644d(0x170)](getConfigDir(),'tdx.json');if(_0x36aad6){if(_0x48dbe4==='site')return clearDefaultSiteFromUserConfig(),console['log'](_0x54644d(0x186)+a46_0x5b5c7b['green'](_0x54644d(0x19b))),console[_0x54644d(0x171)](a46_0x5b5c7b[_0x54644d(0x174)](_0x54644d(0x183)+_0x586efd)),0x0;if(_0x48dbe4===_0x54644d(0x192))return clearActiveProfileFromUserConfig(),console['log']('Default\x20profile\x20'+a46_0x5b5c7b[_0x54644d(0x187)]('cleared')),console[_0x54644d(0x171)](a46_0x5b5c7b['dim'](_0x54644d(0x183)+_0x586efd)),0x0;}const _0x384d23=getSessionID(_0x40abca['session']),_0x31de06={'site':_0x54644d(0x17a),'database':_0x54644d(0x18c),'parent_segment':'parent_segment','llm_project':_0x54644d(0x190),'agent':_0x54644d(0x194),'profile':_0x54644d(0x192),'engage_workspace':_0x54644d(0x182)},_0x97d45c=_0x31de06[_0x48dbe4];return _0x97d45c&&(clearSessionContextField(_0x97d45c,_0x40abca[_0x54644d(0x198)]),console['log'](_0x54644d(0x179)+_0x48dbe4+'\x20'+a46_0x5b5c7b['green']('cleared')+'\x20'+a46_0x5b5c7b[_0x54644d(0x174)](_0x54644d(0x18a)+_0x384d23+')'))),0x0;}catch(_0x9047ce){return _0x9047ce instanceof Error&&console['error'](_0x54644d(0x17b)+_0x9047ce[_0x54644d(0x188)]),0x1;}}}
1
+ function a46_0x4217(){const _0x1e3014=['Default\x20site\x20','description','3718qYxmsg','tdx.json','llm_agent','1576TsgbjZ','message','site','5484lChHQl','1120918TevDIL','.\x20Must\x20be\x20one\x20of:\x20','3QvyTTJ','profile','\x0aUpdated:\x20','Error:\x20','3939790mcJLCb','parent_segment','Default\x20profile\x20','error','default','dim','551928IvDWgu','2513Sucply','database','\x0aResources:\x20site,\x20database,\x20parent_segment,\x20llm_project,\x20agent,\x20profile,\x20engage_workspace\x0a','(session:\x20','name','cleared','501063rnEnQg','\x20\x20\x20\x20\x20\x20\x20tdx\x20unset\x20--default\x20<resource>\x20\x20#\x20Clear\x20default\x20from\x20config\x0a','length','Invalid\x20resource:\x20','5HemIAX','928590GemecW','9VOpTIm','llm_project','engage_workspace','--default\x20can\x20only\x20be\x20used\x20with\x20\x27site\x27\x20or\x20\x27profile\x27.\x20Other\x20resources\x20are\x20session-level\x20only.','log','green','Session\x20','agent','join','session'];a46_0x4217=function(){return _0x1e3014;};return a46_0x4217();}const a46_0x5eb366=a46_0xaa5c;(function(_0x53c28f,_0xacb653){const _0x7af82c=a46_0xaa5c,_0x5b40e4=_0x53c28f();while(!![]){try{const _0x562b0c=-parseInt(_0x7af82c(0xed))/0x1+parseInt(_0x7af82c(0x106))/0x2*(parseInt(_0x7af82c(0x108))/0x3)+parseInt(_0x7af82c(0x112))/0x4+-parseInt(_0x7af82c(0xf1))/0x5*(parseInt(_0x7af82c(0xf2))/0x6)+parseInt(_0x7af82c(0x113))/0x7*(-parseInt(_0x7af82c(0x102))/0x8)+-parseInt(_0x7af82c(0xf3))/0x9*(-parseInt(_0x7af82c(0x10c))/0xa)+parseInt(_0x7af82c(0xff))/0xb*(parseInt(_0x7af82c(0x105))/0xc);if(_0x562b0c===_0xacb653)break;else _0x5b40e4['push'](_0x5b40e4['shift']());}catch(_0x2b8837){_0x5b40e4['push'](_0x5b40e4['shift']());}}}(a46_0x4217,0x7f08f));import{BaseCommand}from'./command.js';import{getSessionID,cleanExpiredSessions,clearSessionContextField}from'../core/session.js';function a46_0xaa5c(_0x4201c7,_0x5b910c){_0x4201c7=_0x4201c7-0xe8;const _0x42178f=a46_0x4217();let _0xaa5c88=_0x42178f[_0x4201c7];return _0xaa5c88;}import{clearDefaultSiteFromUserConfig,clearActiveProfileFromUserConfig}from'../core/profile.js';import{getConfigDir}from'../core/config.js';import a46_0x44f61c from'chalk';import*as a46_0x27e732 from'node:path';export class UnsetCommand extends BaseCommand{[a46_0x5eb366(0xeb)]='unset';[a46_0x5eb366(0xfe)]='Clear\x20session-level\x20or\x20default\x20context\x20values';['validate'](_0x3b6292){const _0x36395a=a46_0x5eb366,{args:_0x4afddc,options:_0x29e97a}=_0x3b6292,_0x1edfa7=_0x29e97a[_0x36395a(0x110)];if(_0x4afddc[_0x36395a(0xef)]===0x0)return'Usage:\x20tdx\x20unset\x20<resource>\x0a'+_0x36395a(0xee)+_0x36395a(0xe9)+'\x0aRun\x20\x27tdx\x20unset\x20--help\x27\x20for\x20more\x20options';const _0x14c825=_0x4afddc[0x0],_0x190765=[_0x36395a(0x104),_0x36395a(0xe8),_0x36395a(0x10d),_0x36395a(0xf4),_0x36395a(0xfa),_0x36395a(0x109),_0x36395a(0xf5)];if(!_0x190765['includes'](_0x14c825))return _0x36395a(0xf0)+_0x14c825+_0x36395a(0x107)+_0x190765[_0x36395a(0xfb)](',\x20');if(_0x1edfa7&&_0x14c825!=='site'&&_0x14c825!==_0x36395a(0x109))return _0x36395a(0xf6);return undefined;}async['execute'](_0x2f64e0){const _0x1b3f61=a46_0x5eb366,{args:_0x170a2c,options:_0x207003}=_0x2f64e0,_0x4bc7b0=_0x207003[_0x1b3f61(0x110)];cleanExpiredSessions();try{const _0x10238b=_0x170a2c[0x0],_0x38ad3c=a46_0x27e732[_0x1b3f61(0xfb)](getConfigDir(),_0x1b3f61(0x100));if(_0x4bc7b0){if(_0x10238b==='site')return clearDefaultSiteFromUserConfig(),console['log'](_0x1b3f61(0xfd)+a46_0x44f61c[_0x1b3f61(0xf8)]('cleared')),console[_0x1b3f61(0xf7)](a46_0x44f61c[_0x1b3f61(0x111)]('\x0aUpdated:\x20'+_0x38ad3c)),0x0;if(_0x10238b==='profile')return clearActiveProfileFromUserConfig(),console['log'](_0x1b3f61(0x10e)+a46_0x44f61c[_0x1b3f61(0xf8)](_0x1b3f61(0xec))),console[_0x1b3f61(0xf7)](a46_0x44f61c[_0x1b3f61(0x111)](_0x1b3f61(0x10a)+_0x38ad3c)),0x0;}const _0x5d3ab3=getSessionID(_0x207003[_0x1b3f61(0xfc)]),_0x250bb1={'site':'site','database':_0x1b3f61(0xe8),'parent_segment':_0x1b3f61(0x10d),'llm_project':_0x1b3f61(0xf4),'agent':_0x1b3f61(0x101),'profile':_0x1b3f61(0x109),'engage_workspace':_0x1b3f61(0xf5)},_0x57c457=_0x250bb1[_0x10238b];return _0x57c457&&(clearSessionContextField(_0x57c457,_0x207003[_0x1b3f61(0xfc)]),console[_0x1b3f61(0xf7)](_0x1b3f61(0xf9)+_0x10238b+'\x20'+a46_0x44f61c[_0x1b3f61(0xf8)]('cleared')+'\x20'+a46_0x44f61c[_0x1b3f61(0x111)](_0x1b3f61(0xea)+_0x5d3ab3+')'))),0x0;}catch(_0x37944f){return _0x37944f instanceof Error&&console[_0x1b3f61(0x10f)](_0x1b3f61(0x10b)+_0x37944f[_0x1b3f61(0x103)]),0x1;}}}
@@ -1 +1 @@
1
- const a47_0x268cf9=a47_0x54d1;function a47_0x5bbd(){const _0x277a06=['Current\x20version:\x20','next','execute','22rIPCFI','3194198tpPkwg','bun','install','845468TMeeUE','inherit','11144gInAkB','Failed\x20to\x20run\x20','message','execPath','green','error','5434098krbXPU','1476NdSSVh','Running:','toLowerCase','2466276yKGWbS','1864412iYkQxc','Would\x20run:','includes','cyan','log','add','pnpm','170ArYdug','15NMYoGS','close','Target\x20version:','96414cxgNSA','Latest\x20version:','global','Already\x20up\x20to\x20date\x20(','@treasuredata/tdx','dim','Upgrade\x20failed\x20(exit\x20code\x20','upgrade','red','Current\x20version:','join','replace','yarn','argv','Successfully\x20upgraded\x20to\x20'];a47_0x5bbd=function(){return _0x277a06;};return a47_0x5bbd();}(function(_0x55aa21,_0x4e763a){const _0x42dc78=a47_0x54d1,_0xa2e6db=_0x55aa21();while(!![]){try{const _0x4c7b1e=parseInt(_0x42dc78(0xaa))/0x1*(-parseInt(_0x42dc78(0xbc))/0x2)+-parseInt(_0x42dc78(0xcc))/0x3+parseInt(_0x42dc78(0xc0))/0x4*(-parseInt(_0x42dc78(0xa7))/0x5)+parseInt(_0x42dc78(0xc8))/0x6+-parseInt(_0x42dc78(0xbd))/0x7+parseInt(_0x42dc78(0xc2))/0x8*(-parseInt(_0x42dc78(0xc9))/0x9)+-parseInt(_0x42dc78(0xa6))/0xa*(-parseInt(_0x42dc78(0xcd))/0xb);if(_0x4c7b1e===_0x4e763a)break;else _0xa2e6db['push'](_0xa2e6db['shift']());}catch(_0x125ff2){_0xa2e6db['push'](_0xa2e6db['shift']());}}}(a47_0x5bbd,0x8ef3e));import{gt}from'semver';import a47_0xebb1df 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=a47_0x268cf9(0xae);export function detectPackageManager(){const _0x47f061=a47_0x268cf9,_0x27fae3=process[_0x47f061(0xc5)][_0x47f061(0xcb)](),_0x1bedf9=process[_0x47f061(0xb7)][0x1]??'';if(_0x27fae3['includes'](_0x47f061(0xbe))||_0x1bedf9[_0x47f061(0xa1)]('.bun/'))return'bun';if(_0x1bedf9[_0x47f061(0xa1)](_0x47f061(0xa5)))return'pnpm';if(_0x1bedf9['includes'](_0x47f061(0xb6)))return'yarn';return'npm';}function a47_0x54d1(_0x4ef491,_0x4677b7){_0x4ef491=_0x4ef491-0xa0;const _0x5bbda6=a47_0x5bbd();let _0x54d118=_0x5bbda6[_0x4ef491];return _0x54d118;}export function buildInstallArgs(_0x344926,_0x40d7ae){const _0x486428=a47_0x268cf9;switch(_0x344926){case _0x486428(0xb6):return[_0x486428(0xac),'add',_0x40d7ae];case _0x486428(0xa5):return[_0x486428(0xa4),'-g',_0x40d7ae];default:return[_0x486428(0xbf),'-g',_0x40d7ae];}}export class UpgradeCommand extends BaseCommand{['name']=a47_0x268cf9(0xb1);['description']='Upgrade\x20tdx\x20to\x20the\x20latest\x20version';async[a47_0x268cf9(0xbb)](_0x4c1d46){const _0x1823e0=a47_0x268cf9,{options:_0x57032a,args:_0xf3c229}=_0x4c1d46,_0x31ed8e=!!_0x57032a['dryRun'],{next:_0x4e5f70,method:_0x300603}=_0x57032a,_0x2de529=_0x4e5f70?'next':loadReleaseChannel(),_0x2f325c=_0x2de529===_0x1823e0(0xba)?_0x1823e0(0xba):'latest',_0x1cb3c3=_0xf3c229[0x0]?String(_0xf3c229[0x0])[_0x1823e0(0xb5)](/^v/,''):undefined,_0x1422f9=getVersion();if(isDevVersion())return console['error'](a47_0xebb1df['yellow']('Upgrade\x20is\x20not\x20available\x20for\x20development\x20versions.')),console[_0x1823e0(0xc7)](a47_0xebb1df[_0x1823e0(0xaf)](_0x1823e0(0xb9)+_0x1422f9)),0x1;let _0xd13c12;if(_0x1cb3c3)_0xd13c12=_0x1cb3c3,console['log'](a47_0xebb1df[_0x1823e0(0xaf)](_0x1823e0(0xb3))+'\x20'+_0x1422f9),console[_0x1823e0(0xa3)](a47_0xebb1df[_0x1823e0(0xaf)](_0x1823e0(0xa9))+'\x20\x20'+a47_0xebb1df[_0x1823e0(0xc6)](_0x1cb3c3)),console[_0x1823e0(0xa3)]();else{console[_0x1823e0(0xa3)](a47_0xebb1df[_0x1823e0(0xaf)]('Checking\x20'+PACKAGE_NAME+'@'+_0x2f325c+'...'));try{_0xd13c12=await fetchLatestVersion(_0x2de529);}catch(_0x4850ef){return console[_0x1823e0(0xc7)](a47_0xebb1df[_0x1823e0(0xb2)]('Failed\x20to\x20check\x20for\x20updates:\x20'+(_0x4850ef instanceof Error?_0x4850ef['message']:String(_0x4850ef)))),0x1;}if(!gt(_0xd13c12,_0x1422f9))return console[_0x1823e0(0xa3)](a47_0xebb1df[_0x1823e0(0xc6)](_0x1823e0(0xad)+_0x1422f9+').')),0x0;console[_0x1823e0(0xa3)](a47_0xebb1df['dim'](_0x1823e0(0xb3))+'\x20'+_0x1422f9),console[_0x1823e0(0xa3)](a47_0xebb1df[_0x1823e0(0xaf)](_0x1823e0(0xab))+'\x20\x20'+a47_0xebb1df['green'](_0xd13c12)),console['log']();}const _0x2c2f5d=_0x300603??detectPackageManager(),_0x30e088=_0x1cb3c3?PACKAGE_NAME+'@'+_0x1cb3c3:PACKAGE_NAME+'@'+_0x2f325c,_0x41b0f9=buildInstallArgs(_0x2c2f5d,_0x30e088);if(_0x31ed8e)return console[_0x1823e0(0xa3)](a47_0xebb1df[_0x1823e0(0xaf)](_0x1823e0(0xa0))),console['log']('\x20\x20'+a47_0xebb1df[_0x1823e0(0xa2)](_0x2c2f5d+'\x20'+_0x41b0f9['join']('\x20'))),0x0;return console[_0x1823e0(0xa3)](a47_0xebb1df[_0x1823e0(0xaf)](_0x1823e0(0xca))+'\x20'+_0x2c2f5d+'\x20'+_0x41b0f9[_0x1823e0(0xb4)]('\x20')),console[_0x1823e0(0xa3)](),new Promise(_0x2af4c9=>{const _0xc465bb=_0x1823e0,_0x1561f3=crossSpawn(_0x2c2f5d,_0x41b0f9,{'stdio':_0xc465bb(0xc1)});_0x1561f3['on'](_0xc465bb(0xa8),_0x35d330=>{const _0x51c0b8=_0xc465bb;console['log'](),_0x35d330===0x0?console[_0x51c0b8(0xa3)](a47_0xebb1df[_0x51c0b8(0xc6)](_0x51c0b8(0xb8)+_0x30e088)):console['error'](a47_0xebb1df[_0x51c0b8(0xb2)](_0x51c0b8(0xb0)+_0x35d330+').')),_0x2af4c9(_0x35d330??0x1);}),_0x1561f3['on'](_0xc465bb(0xc7),_0x3dffcf=>{const _0x5f2814=_0xc465bb;console[_0x5f2814(0xc7)](a47_0xebb1df[_0x5f2814(0xb2)](_0x5f2814(0xc3)+_0x2c2f5d+':\x20'+_0x3dffcf[_0x5f2814(0xc4)])),_0x2af4c9(0x1);});});}}
1
+ const a47_0x33a6f0=a47_0x40ce;(function(_0x2e2924,_0x2159a5){const _0x37071a=a47_0x40ce,_0x573875=_0x2e2924();while(!![]){try{const _0xfc34f7=parseInt(_0x37071a(0x106))/0x1+parseInt(_0x37071a(0xf7))/0x2+-parseInt(_0x37071a(0x123))/0x3*(parseInt(_0x37071a(0x10a))/0x4)+parseInt(_0x37071a(0x115))/0x5+-parseInt(_0x37071a(0x119))/0x6*(-parseInt(_0x37071a(0x120))/0x7)+-parseInt(_0x37071a(0x100))/0x8+parseInt(_0x37071a(0x110))/0x9*(-parseInt(_0x37071a(0xf9))/0xa);if(_0xfc34f7===_0x2159a5)break;else _0x573875['push'](_0x573875['shift']());}catch(_0x17ca48){_0x573875['push'](_0x573875['shift']());}}}(a47_0xfa8c,0x9d610));import{gt}from'semver';import a47_0x1deec8 from'chalk';import{BaseCommand}from'./command.js';import{getVersion,isDevVersion}from'../core/version.js';function a47_0x40ce(_0x198f08,_0xe16aae){_0x198f08=_0x198f08-0xf7;const _0xfa8cf=a47_0xfa8c();let _0x40ce8c=_0xfa8cf[_0x198f08];return _0x40ce8c;}import{loadReleaseChannel}from'../core/config.js';import{fetchLatestVersion}from'../utils/version-check.js';import{crossSpawn}from'../utils/process.js';const PACKAGE_NAME=a47_0x33a6f0(0x11d);function a47_0xfa8c(){const _0x44a9b1=['name','replace','6327ZJOBte','error','Current\x20version:\x20','global','log','5000235veGmGe','argv','Would\x20run:','pnpm','4684176reBJgF','bun','cyan','Already\x20up\x20to\x20date\x20(','@treasuredata/tdx','dim','dryRun','7ssHyle','toLowerCase','description','3ZIErns','202024XXLNGh','upgrade','21860typxBO','Upgrade\x20failed\x20(exit\x20code\x20','green','includes','npm','Latest\x20version:','execute','66960BKjeEu','latest','.bun/','Running:','next','execPath','644908XkyKuj','yellow','red','install','1347644eZpYIT','add','Target\x20version:','yarn'];a47_0xfa8c=function(){return _0x44a9b1;};return a47_0xfa8c();}export function detectPackageManager(){const _0x3a4a25=a47_0x33a6f0,_0x586d71=process[_0x3a4a25(0x105)][_0x3a4a25(0x121)](),_0x482d20=process[_0x3a4a25(0x116)][0x1]??'';if(_0x586d71[_0x3a4a25(0xfc)](_0x3a4a25(0x11a))||_0x482d20['includes'](_0x3a4a25(0x102)))return _0x3a4a25(0x11a);if(_0x482d20[_0x3a4a25(0xfc)](_0x3a4a25(0x118)))return'pnpm';if(_0x482d20[_0x3a4a25(0xfc)](_0x3a4a25(0x10d)))return _0x3a4a25(0x10d);return _0x3a4a25(0xfd);}export function buildInstallArgs(_0x226b83,_0x379a08){const _0x2b6114=a47_0x33a6f0;switch(_0x226b83){case _0x2b6114(0x10d):return[_0x2b6114(0x113),_0x2b6114(0x10b),_0x379a08];case _0x2b6114(0x118):return[_0x2b6114(0x10b),'-g',_0x379a08];default:return[_0x2b6114(0x109),'-g',_0x379a08];}}export class UpgradeCommand extends BaseCommand{[a47_0x33a6f0(0x10e)]=a47_0x33a6f0(0xf8);[a47_0x33a6f0(0x122)]='Upgrade\x20tdx\x20to\x20the\x20latest\x20version';async[a47_0x33a6f0(0xff)](_0x50fd49){const _0xd3fd5c=a47_0x33a6f0,{options:_0x2af238,args:_0x36979e}=_0x50fd49,_0x530d49=!!_0x2af238[_0xd3fd5c(0x11f)],{next:_0x4e0dc5,method:_0x2311b6}=_0x2af238,_0x575db4=_0x4e0dc5?_0xd3fd5c(0x104):loadReleaseChannel(),_0x2685bd=_0x575db4===_0xd3fd5c(0x104)?'next':_0xd3fd5c(0x101),_0x55eceb=_0x36979e[0x0]?String(_0x36979e[0x0])[_0xd3fd5c(0x10f)](/^v/,''):undefined,_0x1b5684=getVersion();if(isDevVersion())return console[_0xd3fd5c(0x111)](a47_0x1deec8[_0xd3fd5c(0x107)]('Upgrade\x20is\x20not\x20available\x20for\x20development\x20versions.')),console['error'](a47_0x1deec8[_0xd3fd5c(0x11e)](_0xd3fd5c(0x112)+_0x1b5684)),0x1;let _0x4ac731;if(_0x55eceb)_0x4ac731=_0x55eceb,console[_0xd3fd5c(0x114)](a47_0x1deec8[_0xd3fd5c(0x11e)]('Current\x20version:')+'\x20'+_0x1b5684),console[_0xd3fd5c(0x114)](a47_0x1deec8[_0xd3fd5c(0x11e)](_0xd3fd5c(0x10c))+'\x20\x20'+a47_0x1deec8['green'](_0x55eceb)),console['log']();else{console['log'](a47_0x1deec8[_0xd3fd5c(0x11e)]('Checking\x20'+PACKAGE_NAME+'@'+_0x2685bd+'...'));try{_0x4ac731=await fetchLatestVersion(_0x575db4);}catch(_0x56b0bd){return console[_0xd3fd5c(0x111)](a47_0x1deec8[_0xd3fd5c(0x108)]('Failed\x20to\x20check\x20for\x20updates:\x20'+(_0x56b0bd instanceof Error?_0x56b0bd['message']:String(_0x56b0bd)))),0x1;}if(!gt(_0x4ac731,_0x1b5684))return console[_0xd3fd5c(0x114)](a47_0x1deec8[_0xd3fd5c(0xfb)](_0xd3fd5c(0x11c)+_0x1b5684+').')),0x0;console[_0xd3fd5c(0x114)](a47_0x1deec8[_0xd3fd5c(0x11e)]('Current\x20version:')+'\x20'+_0x1b5684),console[_0xd3fd5c(0x114)](a47_0x1deec8['dim'](_0xd3fd5c(0xfe))+'\x20\x20'+a47_0x1deec8[_0xd3fd5c(0xfb)](_0x4ac731)),console[_0xd3fd5c(0x114)]();}const _0x478c90=_0x2311b6??detectPackageManager(),_0x1f4cba=_0x55eceb?PACKAGE_NAME+'@'+_0x55eceb:PACKAGE_NAME+'@'+_0x2685bd,_0x954730=buildInstallArgs(_0x478c90,_0x1f4cba);if(_0x530d49)return console[_0xd3fd5c(0x114)](a47_0x1deec8[_0xd3fd5c(0x11e)](_0xd3fd5c(0x117))),console[_0xd3fd5c(0x114)]('\x20\x20'+a47_0x1deec8[_0xd3fd5c(0x11b)](_0x478c90+'\x20'+_0x954730['join']('\x20'))),0x0;return console['log'](a47_0x1deec8[_0xd3fd5c(0x11e)](_0xd3fd5c(0x103))+'\x20'+_0x478c90+'\x20'+_0x954730['join']('\x20')),console['log'](),new Promise(_0x58924f=>{const _0x3295c4=crossSpawn(_0x478c90,_0x954730,{'stdio':'inherit'});_0x3295c4['on']('close',_0x440808=>{const _0x5c71c5=a47_0x40ce;console['log'](),_0x440808===0x0?console['log'](a47_0x1deec8['green']('Successfully\x20upgraded\x20to\x20'+_0x1f4cba)):console[_0x5c71c5(0x111)](a47_0x1deec8[_0x5c71c5(0x108)](_0x5c71c5(0xfa)+_0x440808+').')),_0x58924f(_0x440808??0x1);}),_0x3295c4['on']('error',_0x1a79ee=>{const _0x1d8e5c=a47_0x40ce;console[_0x1d8e5c(0x111)](a47_0x1deec8[_0x1d8e5c(0x108)]('Failed\x20to\x20run\x20'+_0x478c90+':\x20'+_0x1a79ee['message'])),_0x58924f(0x1);});});}}
@@ -1 +1 @@
1
- function a48_0x2bbb(){const _0x14d2f8=['database','Error:\x20Profile\x20\x27','\x0aSaved\x20to:\x20','clear','tdx.json','release_channel\x20requires\x20--default.\x20Usage:\x20tdx\x20use\x20--default\x20release_channel\x20<stable|next>','Verifying\x20workspace\x20\x27','.\x20Must\x20be\x20one\x20of:\x20','Error:\x20','session','INVALID_ARGUMENT','7668740AMsDKj','log','168456AaXIbq','Session\x20context\x20','\x0aUse\x20\x27tdx\x20engage\x20workspace\x20list\x27\x20to\x20see\x20available\x20workspaces','2041568mjlKRo','dim','\x0aRun\x20\x27tdx\x20use\x20--help\x27\x20for\x20more\x20options','1366010MoUskh','validate','display','tdx','40855nRUbqf','Resources:\x20site,\x20database,\x20parent_segment,\x20llm_project,\x20agent,\x20profile,\x20engage_workspace,\x20release_channel','use','\x0aTip:\x20Use\x20\x27tdx\x20use\x20--default\x20site\x20','parent_segment','Use\x20--default\x20with\x20site,\x20profile,\x20or\x20release_channel\x20to\x20save\x20permanently','\x27\x20does\x20not\x20exist','profile','default','Set\x20session-level\x20context','\x0aTip:\x20Use\x20\x27tdx\x20use\x20--clear\x27\x20to\x20clear\x20session\x20overrides','Session\x20site\x20set\x20to:\x20','next','execute','Release\x20channel\x20set\x20to:\x20','displayWithSources','green','Session\x20profile\x20set\x20to:\x20','length','Default\x20site\x20set\x20to:\x20','description','\x27\x20to\x20save\x20permanently','Session\x20llm_project\x20set\x20to:\x20','\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','852xDYTfA','llm_agent','6494391XbqzOT','stable','name','release_channel','\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20--default\x20site\x20<value>\x20\x20\x20\x20\x20#\x20Save\x20default\x20site\x20to\x20config\x0a','\x0aUse\x20\x27tdx\x20profiles\x27\x20to\x20see\x20available\x20profiles','llm_project','712VxCRPr','cleared','\x0aTip:\x20Use\x20\x27tdx\x20use\x20--default\x20profile\x20','\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20--default\x20profile\x20<value>\x20\x20#\x20Save\x20default\x20profile\x20to\x20config\x0a','join','.\x20Must\x20be\x20\x27stable\x27\x20or\x20\x27next\x27.','message','Session\x20database\x20set\x20to:\x20','Usage:\x20tdx\x20use\x20<resource>\x20<value>\x0a','Invalid\x20release\x20channel:\x20','102081MeuUDL','Invalid\x20resource:\x20','error','code','2tIzbTT','agent','Session\x20engage_workspace\x20set\x20to:\x20','Install\x20the\x20latest\x20next\x20version:\x20npm\x20install\x20-g\x20@treasuredata/tdx@next','engage_workspace','Default\x20profile\x20set\x20to:\x20','site','\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20--default\x20release_channel\x20<stable|next>\x20\x20#\x20Set\x20release\x20channel\x0a','\x27...','Session\x20agent\x20set\x20to:\x20','(session:\x20'];a48_0x2bbb=function(){return _0x14d2f8;};return a48_0x2bbb();}const a48_0xa061dd=a48_0x32f5;(function(_0x2989fb,_0x132a08){const _0x25c92b=a48_0x32f5,_0x44ca22=_0x2989fb();while(!![]){try{const _0x21aa84=parseInt(_0x25c92b(0xd9))/0x1+-parseInt(_0x25c92b(0xbb))/0x2*(parseInt(_0x25c92b(0xd3))/0x3)+-parseInt(_0x25c92b(0xd6))/0x4+parseInt(_0x25c92b(0xdd))/0x5*(parseInt(_0x25c92b(0xa4))/0x6)+-parseInt(_0x25c92b(0xb7))/0x7*(parseInt(_0x25c92b(0xad))/0x8)+-parseInt(_0x25c92b(0xa6))/0x9+parseInt(_0x25c92b(0xd1))/0xa;if(_0x21aa84===_0x132a08)break;else _0x44ca22['push'](_0x44ca22['shift']());}catch(_0x102a09){_0x44ca22['push'](_0x44ca22['shift']());}}}(a48_0x2bbb,0xaca40));import{BaseCommand}from'./command.js';function a48_0x32f5(_0x3d7ab2,_0xdf615c){_0x3d7ab2=_0x3d7ab2-0x9a;const _0x2bbbe9=a48_0x2bbb();let _0x32f5f3=_0x2bbbe9[_0x3d7ab2];return _0x32f5f3;}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 a48_0x12b43a from'chalk';import*as a48_0x15f316 from'node:path';export class UseCommand extends BaseCommand{[a48_0xa061dd(0xa8)]=a48_0xa061dd(0xdf);[a48_0xa061dd(0xa0)]=a48_0xa061dd(0xe6);[a48_0xa061dd(0xda)](_0x4fa42c){const _0x27df8d=a48_0xa061dd,{args:_0x56683b,options:_0x128586}=_0x4fa42c,_0x3a53b3=_0x128586['default'];if(_0x56683b['length']===0x0)return undefined;if(_0x56683b['length']===0x1)return _0x27df8d(0xb5)+_0x27df8d(0xa3)+'\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20--clear\x20\x20\x20\x20\x20\x20#\x20Clear\x20session\x20context\x0a'+_0x27df8d(0xaa)+_0x27df8d(0xb0)+_0x27df8d(0xc2)+'\x0aResources:\x20site,\x20database,\x20parent_segment,\x20llm_project,\x20agent,\x20profile,\x20engage_workspace,\x20release_channel\x0a'+_0x27df8d(0xd8);const _0x42be74=_0x56683b[0x0],_0x41aa9e=['site','database','parent_segment',_0x27df8d(0xac),_0x27df8d(0xbc),_0x27df8d(0xe4),_0x27df8d(0xbf),_0x27df8d(0xa9)];if(!_0x41aa9e['includes'](_0x42be74))return _0x27df8d(0xb8)+_0x42be74+_0x27df8d(0xcd)+_0x41aa9e['join'](',\x20');if(_0x3a53b3&&_0x42be74!=='site'&&_0x42be74!==_0x27df8d(0xe4)&&_0x42be74!=='release_channel')return'--default\x20can\x20only\x20be\x20used\x20with\x20\x27site\x27,\x20\x27profile\x27,\x20or\x20\x27release_channel\x27.\x20Other\x20resources\x20are\x20session-level\x20only.';if(_0x42be74==='release_channel'&&!_0x3a53b3)return _0x27df8d(0xcb);if(_0x42be74===_0x27df8d(0xa9)){const _0xf04b03=_0x56683b[0x1];if(_0xf04b03!==_0x27df8d(0xa7)&&_0xf04b03!==_0x27df8d(0xe9))return _0x27df8d(0xb6)+_0xf04b03+_0x27df8d(0xb2);}return undefined;}async[a48_0xa061dd(0xea)](_0x56d0e3){const _0x391af8=a48_0xa061dd,{args:_0x26e747,options:_0x5e16b0}=_0x56d0e3,_0x170657=_0x5e16b0['debug'],_0x4d9d77=_0x5e16b0[_0x391af8(0xc9)],_0x1ebbad=_0x5e16b0[_0x391af8(0xe5)];cleanExpiredSessions();try{if(_0x4d9d77){clearSessionContext(_0x5e16b0[_0x391af8(0xcf)]);const _0xa8dc4b=getSessionID(_0x5e16b0[_0x391af8(0xcf)]);return console[_0x391af8(0xd2)](_0x391af8(0xd4)+a48_0x12b43a[_0x391af8(0x9c)](_0x391af8(0xae))+'\x20'+a48_0x12b43a[_0x391af8(0xd7)](_0x391af8(0xc5)+_0xa8dc4b+')')),0x0;}if(_0x26e747[_0x391af8(0x9e)]===0x0){const _0x451e17=new GlobalContext(_0x5e16b0);return _0x170657?_0x451e17[_0x391af8(0x9b)]():_0x451e17[_0x391af8(0xdb)](),console[_0x391af8(0xd2)](a48_0x12b43a[_0x391af8(0xd7)]('\x0aSet\x20context:\x20tdx\x20use\x20<resource>\x20<value>')),console['log'](a48_0x12b43a[_0x391af8(0xd7)](_0x391af8(0xde))),console['log'](a48_0x12b43a[_0x391af8(0xd7)](_0x391af8(0xe2))),0x0;}const _0x50b43b=_0x26e747[0x0],_0x5cfa41=_0x26e747[0x1],_0x338c7=a48_0x15f316[_0x391af8(0xb1)](getConfigDir(),_0x391af8(0xca));if(_0x1ebbad){if(_0x50b43b==='site')return saveDefaultSiteToUserConfig(_0x5cfa41),console[_0x391af8(0xd2)](_0x391af8(0x9f)+a48_0x12b43a[_0x391af8(0x9c)](_0x5cfa41)),console[_0x391af8(0xd2)](a48_0x12b43a[_0x391af8(0xd7)](_0x391af8(0xc8)+_0x338c7)),0x0;if(_0x50b43b==='profile'){if(!profileExists(_0x5cfa41))return console['error'](_0x391af8(0xc7)+_0x5cfa41+_0x391af8(0xe3)),console[_0x391af8(0xb9)](_0x391af8(0xab)),0x1;return saveActiveProfileToUserConfig(_0x5cfa41),console['log'](_0x391af8(0xc0)+a48_0x12b43a[_0x391af8(0x9c)](_0x5cfa41)),console[_0x391af8(0xd2)](a48_0x12b43a[_0x391af8(0xd7)](_0x391af8(0xc8)+_0x338c7)),0x0;}if(_0x50b43b===_0x391af8(0xa9))return saveReleaseChannel(_0x5cfa41),console[_0x391af8(0xd2)](_0x391af8(0x9a)+a48_0x12b43a['green'](_0x5cfa41)),console[_0x391af8(0xd2)](a48_0x12b43a[_0x391af8(0xd7)]('\x0aSaved\x20to:\x20'+_0x338c7)),_0x5cfa41===_0x391af8(0xe9)?(console['log'](a48_0x12b43a['dim']('\x0aUpdate\x20notifications\x20will\x20now\x20check\x20the\x20@next\x20channel.')),console['log'](a48_0x12b43a[_0x391af8(0xd7)](_0x391af8(0xbe)))):console[_0x391af8(0xd2)](a48_0x12b43a['dim']('\x0aUpdate\x20notifications\x20will\x20check\x20the\x20@latest\x20(stable)\x20channel.')),0x0;}if(_0x50b43b===_0x391af8(0xc1)){const _0x20ed4f=getSessionID(_0x5e16b0[_0x391af8(0xcf)]);return saveSessionContext({'site':_0x5cfa41},_0x5e16b0[_0x391af8(0xcf)]),console[_0x391af8(0xd2)](_0x391af8(0xe8)+a48_0x12b43a[_0x391af8(0x9c)](_0x5cfa41)+'\x20'+a48_0x12b43a[_0x391af8(0xd7)](_0x391af8(0xc5)+_0x20ed4f+')')),console['log'](a48_0x12b43a[_0x391af8(0xd7)](_0x391af8(0xe0)+_0x5cfa41+_0x391af8(0xa1))),0x0;}if(_0x50b43b===_0x391af8(0xe4)){if(!profileExists(_0x5cfa41))return console['error']('Error:\x20Profile\x20\x27'+_0x5cfa41+_0x391af8(0xe3)),console[_0x391af8(0xb9)](_0x391af8(0xab)),0x1;const _0x356d4b=getSessionID(_0x5e16b0[_0x391af8(0xcf)]);return saveSessionContext({'profile':_0x5cfa41},_0x5e16b0['session']),console[_0x391af8(0xd2)](_0x391af8(0x9d)+a48_0x12b43a[_0x391af8(0x9c)](_0x5cfa41)+'\x20'+a48_0x12b43a[_0x391af8(0xd7)](_0x391af8(0xc5)+_0x356d4b+')')),console[_0x391af8(0xd2)](a48_0x12b43a[_0x391af8(0xd7)](_0x391af8(0xaf)+_0x5cfa41+_0x391af8(0xa1))),0x0;}const _0x181cf8={},_0x397e80=getSessionID(_0x5e16b0['session']);switch(_0x50b43b){case _0x391af8(0xc6):_0x181cf8[_0x391af8(0xc6)]=_0x5cfa41,console[_0x391af8(0xd2)](_0x391af8(0xb4)+a48_0x12b43a[_0x391af8(0x9c)](_0x5cfa41)+'\x20'+a48_0x12b43a[_0x391af8(0xd7)](_0x391af8(0xc5)+_0x397e80+')'));break;case _0x391af8(0xe1):_0x181cf8['parent_segment']=_0x5cfa41,console[_0x391af8(0xd2)]('Session\x20parent_segment\x20set\x20to:\x20'+a48_0x12b43a[_0x391af8(0x9c)](_0x5cfa41)+'\x20'+a48_0x12b43a['dim'](_0x391af8(0xc5)+_0x397e80+')'));break;case'llm_project':_0x181cf8[_0x391af8(0xac)]=_0x5cfa41,console[_0x391af8(0xd2)]('Session\x20llm_project\x20set\x20to:\x20'+a48_0x12b43a[_0x391af8(0x9c)](_0x5cfa41)+'\x20'+a48_0x12b43a[_0x391af8(0xd7)](_0x391af8(0xc5)+_0x397e80+')'));break;case _0x391af8(0xbc):{const {projectName:_0x27c785,agentName:_0x163ec9}=parseAgentRef(_0x5cfa41);_0x163ec9?(_0x181cf8[_0x391af8(0xac)]=_0x27c785,_0x181cf8[_0x391af8(0xa5)]=_0x163ec9,console['log'](_0x391af8(0xa2)+a48_0x12b43a[_0x391af8(0x9c)](_0x27c785)+'\x20'+a48_0x12b43a[_0x391af8(0xd7)](_0x391af8(0xc5)+_0x397e80+')')),console['log']('Session\x20agent\x20set\x20to:\x20'+a48_0x12b43a['green'](_0x163ec9)+'\x20'+a48_0x12b43a[_0x391af8(0xd7)](_0x391af8(0xc5)+_0x397e80+')'))):(_0x181cf8['llm_agent']=_0x5cfa41,console[_0x391af8(0xd2)](_0x391af8(0xc4)+a48_0x12b43a[_0x391af8(0x9c)](_0x5cfa41)+'\x20'+a48_0x12b43a[_0x391af8(0xd7)]('(session:\x20'+_0x397e80+')')));break;}case _0x391af8(0xbf):{try{await withSpinner(_0x391af8(0xcc)+_0x5cfa41+_0x391af8(0xc3),()=>_0x56d0e3[_0x391af8(0xdc)]['engage']['resolveWorkspaceId'](_0x5cfa41));}catch(_0x4ee3fd){if(_0x4ee3fd instanceof SDKError&&(_0x4ee3fd['code']===ErrorCode['NOT_FOUND']||_0x4ee3fd[_0x391af8(0xba)]===ErrorCode[_0x391af8(0xd0)]))return console[_0x391af8(0xb9)](_0x391af8(0xce)+_0x4ee3fd['message']),console[_0x391af8(0xb9)](_0x391af8(0xd5)),0x1;throw _0x4ee3fd;}_0x181cf8[_0x391af8(0xbf)]=_0x5cfa41,console[_0x391af8(0xd2)](_0x391af8(0xbd)+a48_0x12b43a['green'](_0x5cfa41)+'\x20'+a48_0x12b43a[_0x391af8(0xd7)](_0x391af8(0xc5)+_0x397e80+')'));break;}}return saveSessionContext(_0x181cf8,_0x5e16b0[_0x391af8(0xcf)]),console['log'](a48_0x12b43a[_0x391af8(0xd7)](_0x391af8(0xe7))),0x0;}catch(_0x264088){return _0x264088 instanceof Error&&console['error'](_0x391af8(0xce)+_0x264088[_0x391af8(0xb3)]),0x1;}}}
1
+ const a48_0x341990=a48_0x19ba;function a48_0x495f(){const _0x78e464=['\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20--default\x20profile\x20<value>\x20\x20#\x20Save\x20default\x20profile\x20to\x20config\x0a','Session\x20context\x20','message','\x0aUse\x20\x27tdx\x20profiles\x27\x20to\x20see\x20available\x20profiles','Install\x20the\x20latest\x20next\x20version:\x20npm\x20install\x20-g\x20@treasuredata/tdx@next','4194448DDPKZK','INVALID_ARGUMENT','\x0aUse\x20\x27tdx\x20engage\x20workspace\x20list\x27\x20to\x20see\x20available\x20workspaces','Error:\x20Profile\x20\x27','\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20--default\x20site\x20<value>\x20\x20\x20\x20\x20#\x20Save\x20default\x20site\x20to\x20config\x0a','database','error','\x0aTip:\x20Use\x20\x27tdx\x20use\x20--default\x20profile\x20','\x27\x20to\x20save\x20permanently','7375bjQKLq','(session:\x20','\x0aRun\x20\x27tdx\x20use\x20--help\x27\x20for\x20more\x20options','.\x20Must\x20be\x20one\x20of:\x20','debug','stable','log','Session\x20parent_segment\x20set\x20to:\x20','4676301oMRnaS','tdx.json','\x27\x20does\x20not\x20exist','parent_segment','Invalid\x20release\x20channel:\x20','Session\x20site\x20set\x20to:\x20','\x0aSaved\x20to:\x20','join','session','clear','\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20--default\x20release_channel\x20<stable|next>\x20\x20#\x20Set\x20release\x20channel\x0a','Invalid\x20resource:\x20','green','site','1574763tzNnNv','Error:\x20','release_channel','name','engage_workspace','dim','length','Session\x20engage_workspace\x20set\x20to:\x20','next','5400416RVZfkZ','profile','release_channel\x20requires\x20--default.\x20Usage:\x20tdx\x20use\x20--default\x20release_channel\x20<stable|next>','execute','validate','\x0aUpdate\x20notifications\x20will\x20check\x20the\x20@latest\x20(stable)\x20channel.','llm_project','llm_agent','Usage:\x20tdx\x20use\x20<resource>\x20<value>\x0a','\x0aTip:\x20Use\x20\x27tdx\x20use\x20--clear\x27\x20to\x20clear\x20session\x20overrides','Default\x20site\x20set\x20to:\x20','\x0aResources:\x20site,\x20database,\x20parent_segment,\x20llm_project,\x20agent,\x20profile,\x20engage_workspace,\x20release_channel\x0a','code','Use\x20--default\x20with\x20site,\x20profile,\x20or\x20release_channel\x20to\x20save\x20permanently','agent','engage','Session\x20llm_project\x20set\x20to:\x20','542877ZSMwVi','Set\x20session-level\x20context','description','\x0aUpdate\x20notifications\x20will\x20now\x20check\x20the\x20@next\x20channel.','NOT_FOUND','\x0aSet\x20context:\x20tdx\x20use\x20<resource>\x20<value>','displayWithSources','Session\x20profile\x20set\x20to:\x20','640388rVASVG','2dYhalK','2778tWlKyx','resolveWorkspaceId','.\x20Must\x20be\x20\x27stable\x27\x20or\x20\x27next\x27.','Release\x20channel\x20set\x20to:\x20','Session\x20database\x20set\x20to:\x20','\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20--clear\x20\x20\x20\x20\x20\x20#\x20Clear\x20session\x20context\x0a','--default\x20can\x20only\x20be\x20used\x20with\x20\x27site\x27,\x20\x27profile\x27,\x20or\x20\x27release_channel\x27.\x20Other\x20resources\x20are\x20session-level\x20only.'];a48_0x495f=function(){return _0x78e464;};return a48_0x495f();}(function(_0x547614,_0x5a55d6){const _0x83da76=a48_0x19ba,_0x7cc495=_0x547614();while(!![]){try{const _0x22236b=parseInt(_0x83da76(0xd4))/0x1*(parseInt(_0x83da76(0xdd))/0x2)+-parseInt(_0x83da76(0xba))/0x3+-parseInt(_0x83da76(0xea))/0x4+-parseInt(_0x83da76(0xf3))/0x5*(-parseInt(_0x83da76(0xde))/0x6)+-parseInt(_0x83da76(0xdc))/0x7+parseInt(_0x83da76(0xc3))/0x8+parseInt(_0x83da76(0xfb))/0x9;if(_0x22236b===_0x5a55d6)break;else _0x7cc495['push'](_0x7cc495['shift']());}catch(_0xc8e6ce){_0x7cc495['push'](_0x7cc495['shift']());}}}(a48_0x495f,0xb86e2));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 a48_0x2c5303 from'chalk';function a48_0x19ba(_0x4d1107,_0x3ed647){_0x4d1107=_0x4d1107-0xb4;const _0x495f8f=a48_0x495f();let _0x19ba83=_0x495f8f[_0x4d1107];return _0x19ba83;}import*as a48_0x6dce58 from'node:path';export class UseCommand extends BaseCommand{[a48_0x341990(0xbd)]='use';[a48_0x341990(0xd6)]=a48_0x341990(0xd5);[a48_0x341990(0xc7)](_0x3d8736){const _0x21531e=a48_0x341990,{args:_0x4ccd80,options:_0x394c33}=_0x3d8736,_0x1e72a2=_0x394c33['default'];if(_0x4ccd80[_0x21531e(0xc0)]===0x0)return undefined;if(_0x4ccd80[_0x21531e(0xc0)]===0x1)return _0x21531e(0xcb)+'\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'+_0x21531e(0xe3)+_0x21531e(0xee)+_0x21531e(0xe5)+_0x21531e(0xb6)+_0x21531e(0xce)+_0x21531e(0xf5);const _0x2b7cb7=_0x4ccd80[0x0],_0x3e4835=[_0x21531e(0xb9),_0x21531e(0xef),_0x21531e(0xfe),_0x21531e(0xc9),_0x21531e(0xd1),_0x21531e(0xc4),_0x21531e(0xbe),_0x21531e(0xbc)];if(!_0x3e4835['includes'](_0x2b7cb7))return _0x21531e(0xb7)+_0x2b7cb7+_0x21531e(0xf6)+_0x3e4835[_0x21531e(0x102)](',\x20');if(_0x1e72a2&&_0x2b7cb7!=='site'&&_0x2b7cb7!==_0x21531e(0xc4)&&_0x2b7cb7!==_0x21531e(0xbc))return _0x21531e(0xe4);if(_0x2b7cb7===_0x21531e(0xbc)&&!_0x1e72a2)return _0x21531e(0xc5);if(_0x2b7cb7===_0x21531e(0xbc)){const _0x7b5695=_0x4ccd80[0x1];if(_0x7b5695!==_0x21531e(0xf8)&&_0x7b5695!==_0x21531e(0xc2))return _0x21531e(0xff)+_0x7b5695+_0x21531e(0xe0);}return undefined;}async[a48_0x341990(0xc6)](_0x25d04c){const _0x18e7c3=a48_0x341990,{args:_0x5b8560,options:_0x5a18c1}=_0x25d04c,_0x591a51=_0x5a18c1[_0x18e7c3(0xf7)],_0x59e6fb=_0x5a18c1[_0x18e7c3(0xb5)],_0x363a6b=_0x5a18c1['default'];cleanExpiredSessions();try{if(_0x59e6fb){clearSessionContext(_0x5a18c1[_0x18e7c3(0xb4)]);const _0x5d476f=getSessionID(_0x5a18c1['session']);return console['log'](_0x18e7c3(0xe6)+a48_0x2c5303[_0x18e7c3(0xb8)]('cleared')+'\x20'+a48_0x2c5303[_0x18e7c3(0xbf)](_0x18e7c3(0xf4)+_0x5d476f+')')),0x0;}if(_0x5b8560[_0x18e7c3(0xc0)]===0x0){const _0x23a6f5=new GlobalContext(_0x5a18c1);return _0x591a51?_0x23a6f5[_0x18e7c3(0xda)]():_0x23a6f5['display'](),console[_0x18e7c3(0xf9)](a48_0x2c5303['dim'](_0x18e7c3(0xd9))),console[_0x18e7c3(0xf9)](a48_0x2c5303[_0x18e7c3(0xbf)]('Resources:\x20site,\x20database,\x20parent_segment,\x20llm_project,\x20agent,\x20profile,\x20engage_workspace,\x20release_channel')),console[_0x18e7c3(0xf9)](a48_0x2c5303['dim'](_0x18e7c3(0xd0))),0x0;}const _0x1a00e0=_0x5b8560[0x0],_0x534635=_0x5b8560[0x1],_0x53e931=a48_0x6dce58[_0x18e7c3(0x102)](getConfigDir(),_0x18e7c3(0xfc));if(_0x363a6b){if(_0x1a00e0==='site')return saveDefaultSiteToUserConfig(_0x534635),console[_0x18e7c3(0xf9)](_0x18e7c3(0xcd)+a48_0x2c5303[_0x18e7c3(0xb8)](_0x534635)),console[_0x18e7c3(0xf9)](a48_0x2c5303['dim'](_0x18e7c3(0x101)+_0x53e931)),0x0;if(_0x1a00e0===_0x18e7c3(0xc4)){if(!profileExists(_0x534635))return console['error']('Error:\x20Profile\x20\x27'+_0x534635+_0x18e7c3(0xfd)),console[_0x18e7c3(0xf0)]('\x0aUse\x20\x27tdx\x20profiles\x27\x20to\x20see\x20available\x20profiles'),0x1;return saveActiveProfileToUserConfig(_0x534635),console['log']('Default\x20profile\x20set\x20to:\x20'+a48_0x2c5303[_0x18e7c3(0xb8)](_0x534635)),console[_0x18e7c3(0xf9)](a48_0x2c5303[_0x18e7c3(0xbf)]('\x0aSaved\x20to:\x20'+_0x53e931)),0x0;}if(_0x1a00e0===_0x18e7c3(0xbc))return saveReleaseChannel(_0x534635),console[_0x18e7c3(0xf9)](_0x18e7c3(0xe1)+a48_0x2c5303[_0x18e7c3(0xb8)](_0x534635)),console['log'](a48_0x2c5303['dim'](_0x18e7c3(0x101)+_0x53e931)),_0x534635===_0x18e7c3(0xc2)?(console[_0x18e7c3(0xf9)](a48_0x2c5303['dim'](_0x18e7c3(0xd7))),console['log'](a48_0x2c5303[_0x18e7c3(0xbf)](_0x18e7c3(0xe9)))):console[_0x18e7c3(0xf9)](a48_0x2c5303[_0x18e7c3(0xbf)](_0x18e7c3(0xc8))),0x0;}if(_0x1a00e0===_0x18e7c3(0xb9)){const _0x5eee20=getSessionID(_0x5a18c1[_0x18e7c3(0xb4)]);return saveSessionContext({'site':_0x534635},_0x5a18c1['session']),console[_0x18e7c3(0xf9)](_0x18e7c3(0x100)+a48_0x2c5303['green'](_0x534635)+'\x20'+a48_0x2c5303[_0x18e7c3(0xbf)](_0x18e7c3(0xf4)+_0x5eee20+')')),console[_0x18e7c3(0xf9)](a48_0x2c5303['dim']('\x0aTip:\x20Use\x20\x27tdx\x20use\x20--default\x20site\x20'+_0x534635+_0x18e7c3(0xf2))),0x0;}if(_0x1a00e0==='profile'){if(!profileExists(_0x534635))return console[_0x18e7c3(0xf0)](_0x18e7c3(0xed)+_0x534635+_0x18e7c3(0xfd)),console[_0x18e7c3(0xf0)](_0x18e7c3(0xe8)),0x1;const _0x4af444=getSessionID(_0x5a18c1[_0x18e7c3(0xb4)]);return saveSessionContext({'profile':_0x534635},_0x5a18c1['session']),console[_0x18e7c3(0xf9)](_0x18e7c3(0xdb)+a48_0x2c5303[_0x18e7c3(0xb8)](_0x534635)+'\x20'+a48_0x2c5303['dim'](_0x18e7c3(0xf4)+_0x4af444+')')),console['log'](a48_0x2c5303[_0x18e7c3(0xbf)](_0x18e7c3(0xf1)+_0x534635+_0x18e7c3(0xf2))),0x0;}const _0x50da14={},_0x234f2d=getSessionID(_0x5a18c1[_0x18e7c3(0xb4)]);switch(_0x1a00e0){case'database':_0x50da14[_0x18e7c3(0xef)]=_0x534635,console[_0x18e7c3(0xf9)](_0x18e7c3(0xe2)+a48_0x2c5303[_0x18e7c3(0xb8)](_0x534635)+'\x20'+a48_0x2c5303['dim']('(session:\x20'+_0x234f2d+')'));break;case _0x18e7c3(0xfe):_0x50da14[_0x18e7c3(0xfe)]=_0x534635,console['log'](_0x18e7c3(0xfa)+a48_0x2c5303[_0x18e7c3(0xb8)](_0x534635)+'\x20'+a48_0x2c5303['dim'](_0x18e7c3(0xf4)+_0x234f2d+')'));break;case _0x18e7c3(0xc9):_0x50da14[_0x18e7c3(0xc9)]=_0x534635,console[_0x18e7c3(0xf9)](_0x18e7c3(0xd3)+a48_0x2c5303[_0x18e7c3(0xb8)](_0x534635)+'\x20'+a48_0x2c5303['dim']('(session:\x20'+_0x234f2d+')'));break;case'agent':{const {projectName:_0x43d8e1,agentName:_0x4881ce}=parseAgentRef(_0x534635);_0x4881ce?(_0x50da14[_0x18e7c3(0xc9)]=_0x43d8e1,_0x50da14[_0x18e7c3(0xca)]=_0x4881ce,console[_0x18e7c3(0xf9)](_0x18e7c3(0xd3)+a48_0x2c5303[_0x18e7c3(0xb8)](_0x43d8e1)+'\x20'+a48_0x2c5303[_0x18e7c3(0xbf)](_0x18e7c3(0xf4)+_0x234f2d+')')),console[_0x18e7c3(0xf9)]('Session\x20agent\x20set\x20to:\x20'+a48_0x2c5303[_0x18e7c3(0xb8)](_0x4881ce)+'\x20'+a48_0x2c5303[_0x18e7c3(0xbf)](_0x18e7c3(0xf4)+_0x234f2d+')'))):(_0x50da14['llm_agent']=_0x534635,console[_0x18e7c3(0xf9)]('Session\x20agent\x20set\x20to:\x20'+a48_0x2c5303[_0x18e7c3(0xb8)](_0x534635)+'\x20'+a48_0x2c5303['dim']('(session:\x20'+_0x234f2d+')')));break;}case _0x18e7c3(0xbe):{try{await withSpinner('Verifying\x20workspace\x20\x27'+_0x534635+'\x27...',()=>_0x25d04c['tdx'][_0x18e7c3(0xd2)][_0x18e7c3(0xdf)](_0x534635));}catch(_0x1f1211){if(_0x1f1211 instanceof SDKError&&(_0x1f1211[_0x18e7c3(0xcf)]===ErrorCode[_0x18e7c3(0xd8)]||_0x1f1211[_0x18e7c3(0xcf)]===ErrorCode[_0x18e7c3(0xeb)]))return console[_0x18e7c3(0xf0)](_0x18e7c3(0xbb)+_0x1f1211['message']),console[_0x18e7c3(0xf0)](_0x18e7c3(0xec)),0x1;throw _0x1f1211;}_0x50da14['engage_workspace']=_0x534635,console[_0x18e7c3(0xf9)](_0x18e7c3(0xc1)+a48_0x2c5303[_0x18e7c3(0xb8)](_0x534635)+'\x20'+a48_0x2c5303[_0x18e7c3(0xbf)](_0x18e7c3(0xf4)+_0x234f2d+')'));break;}}return saveSessionContext(_0x50da14,_0x5a18c1[_0x18e7c3(0xb4)]),console[_0x18e7c3(0xf9)](a48_0x2c5303[_0x18e7c3(0xbf)](_0x18e7c3(0xcc))),0x0;}catch(_0x29b1b8){return _0x29b1b8 instanceof Error&&console[_0x18e7c3(0xf0)](_0x18e7c3(0xbb)+_0x29b1b8[_0x18e7c3(0xe7)]),0x1;}}}
@@ -1 +1 @@
1
- const a49_0x3d6add=a49_0x4581;function a49_0x4581(_0x15c7a1,_0x558bc6){_0x15c7a1=_0x15c7a1-0xff;const _0x545372=a49_0x5453();let _0x4581b4=_0x545372[_0x15c7a1];return _0x4581b4;}(function(_0x5934c2,_0xd6f2e9){const _0x45bae5=a49_0x4581,_0xe8e4b4=_0x5934c2();while(!![]){try{const _0x19cfea=parseInt(_0x45bae5(0xff))/0x1+parseInt(_0x45bae5(0x110))/0x2+-parseInt(_0x45bae5(0x102))/0x3+-parseInt(_0x45bae5(0x101))/0x4*(-parseInt(_0x45bae5(0x100))/0x5)+parseInt(_0x45bae5(0x117))/0x6+parseInt(_0x45bae5(0x113))/0x7+parseInt(_0x45bae5(0x118))/0x8*(-parseInt(_0x45bae5(0x106))/0x9);if(_0x19cfea===_0xd6f2e9)break;else _0xe8e4b4['push'](_0xe8e4b4['shift']());}catch(_0x470e44){_0xe8e4b4['push'](_0xe8e4b4['shift']());}}}(a49_0x5453,0x7d3cf));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleSDKOutput,handleSingleObjectOutput}from'../core/command-output.js';function a49_0x5453(){const _0x525015=['470550jgGCmI','length','list','7134211hzoaCt','execute','\x20\x20Cause:\x20','verbose','5391858vJFuqE','1214264ewEfUn','error','66707ihpnEu','278370KXKbUb','8dObGPI','1811721eHlEOx','message','name','✔\x20Found\x20','72BZVcSz','\x20user','Listing\x20users...','getCurrent','List\x20all\x20users\x20in\x20the\x20account','user\x20list','cause','user','description','Error:\x20'];a49_0x5453=function(){return _0x525015;};return a49_0x5453();}import{withSpinner}from'../utils/spinner.js';export class UserCommand extends BaseCommand{[a49_0x3d6add(0x104)]='user';['description']='Show\x20current\x20user\x20information';async['execute'](_0x2f801e){const _0x37d10e=a49_0x3d6add,{options:_0x52f730,tdx:_0x3730c4}=_0x2f801e;try{const _0x1ff15=await withSpinner('Fetching\x20user\x20info...',()=>_0x3730c4[_0x37d10e(0x10d)][_0x37d10e(0x109)](),{'verbose':_0x52f730[_0x37d10e(0x116)]}),_0x5a5c70=_0x1ff15['data'];return await handleSingleObjectOutput(_0x5a5c70,_0x52f730),0x0;}catch(_0x59e1ee){if(_0x59e1ee instanceof SDKError)return console[_0x37d10e(0x119)](_0x37d10e(0x10f)+_0x59e1ee['message']),_0x59e1ee[_0x37d10e(0x10c)]&&console[_0x37d10e(0x119)](_0x37d10e(0x115)+_0x59e1ee[_0x37d10e(0x10c)]),0x1;throw _0x59e1ee;}}}export class UserListCommand extends BaseCommand{['name']=a49_0x3d6add(0x10b);[a49_0x3d6add(0x10e)]=a49_0x3d6add(0x10a);async[a49_0x3d6add(0x114)](_0x35d013){const _0xd7b13f=a49_0x3d6add,{options:_0x2426ee,tdx:_0x31c0c6}=_0x35d013;try{const _0x4568b5=await withSpinner(_0xd7b13f(0x108),()=>_0x31c0c6[_0xd7b13f(0x10d)][_0xd7b13f(0x112)](),{'verbose':_0x2426ee[_0xd7b13f(0x116)]}),_0x11654f=_0x4568b5['data'];return console['error'](_0xd7b13f(0x105)+_0x11654f['length']+_0xd7b13f(0x107)+(_0x11654f[_0xd7b13f(0x111)]!==0x1?'s':'')),await handleSDKOutput(_0x11654f,_0x2426ee),0x0;}catch(_0x4c0e1b){if(_0x4c0e1b instanceof SDKError)return console['error'](_0xd7b13f(0x10f)+_0x4c0e1b[_0xd7b13f(0x103)]),_0x4c0e1b[_0xd7b13f(0x10c)]&&console['error'](_0xd7b13f(0x115)+_0x4c0e1b[_0xd7b13f(0x10c)]),0x1;throw _0x4c0e1b;}}}
1
+ const a49_0x4187ce=a49_0x4c63;(function(_0x2062e3,_0x5857dc){const _0x540623=a49_0x4c63,_0x2481bd=_0x2062e3();while(!![]){try{const _0x13fba5=-parseInt(_0x540623(0xda))/0x1+-parseInt(_0x540623(0xde))/0x2+parseInt(_0x540623(0xcd))/0x3+-parseInt(_0x540623(0xd2))/0x4+parseInt(_0x540623(0xdd))/0x5+-parseInt(_0x540623(0xd0))/0x6*(parseInt(_0x540623(0xdc))/0x7)+parseInt(_0x540623(0xce))/0x8;if(_0x13fba5===_0x5857dc)break;else _0x2481bd['push'](_0x2481bd['shift']());}catch(_0x3fc875){_0x2481bd['push'](_0x2481bd['shift']());}}}(a49_0x2ec4,0x33514));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleSDKOutput,handleSingleObjectOutput}from'../core/command-output.js';function a49_0x4c63(_0x38cfbd,_0x18e23e){_0x38cfbd=_0x38cfbd-0xca;const _0x2ec4af=a49_0x2ec4();let _0x4c6310=_0x2ec4af[_0x38cfbd];return _0x4c6310;}import{withSpinner}from'../utils/spinner.js';export class UserCommand extends BaseCommand{[a49_0x4187ce(0xd6)]=a49_0x4187ce(0xd7);['description']=a49_0x4187ce(0xcf);async[a49_0x4187ce(0xdf)](_0x4ea7ba){const _0x117617=a49_0x4187ce,{options:_0x28915b,tdx:_0x28a571}=_0x4ea7ba;try{const _0x8ae4d2=await withSpinner(_0x117617(0xd3),()=>_0x28a571['user'][_0x117617(0xd4)](),{'verbose':_0x28915b[_0x117617(0xe2)]}),_0x4f14e2=_0x8ae4d2['data'];return await handleSingleObjectOutput(_0x4f14e2,_0x28915b),0x0;}catch(_0x3f541a){if(_0x3f541a instanceof SDKError)return console[_0x117617(0xe0)](_0x117617(0xcb)+_0x3f541a[_0x117617(0xcc)]),_0x3f541a[_0x117617(0xd8)]&&console[_0x117617(0xe0)](_0x117617(0xd1)+_0x3f541a[_0x117617(0xd8)]),0x1;throw _0x3f541a;}}}function a49_0x2ec4(){const _0x6787e6=['683460eSWtzC','229502LBabyy','execute','error','✔\x20Found\x20','verbose','\x20user','user\x20list','data','Listing\x20users...','length','Error:\x20','message','1243116qbwilz','4528104ZHHUWi','Show\x20current\x20user\x20information','749442rdUsMB','\x20\x20Cause:\x20','1242320syxJNX','Fetching\x20user\x20info...','getCurrent','List\x20all\x20users\x20in\x20the\x20account','name','user','cause','list','231736pFtUap','description','14TGEoXJ'];a49_0x2ec4=function(){return _0x6787e6;};return a49_0x2ec4();}export class UserListCommand extends BaseCommand{[a49_0x4187ce(0xd6)]=a49_0x4187ce(0xe4);[a49_0x4187ce(0xdb)]=a49_0x4187ce(0xd5);async[a49_0x4187ce(0xdf)](_0x3a4df2){const _0x54d3a6=a49_0x4187ce,{options:_0x5884be,tdx:_0x454c3a}=_0x3a4df2;try{const _0x142fd8=await withSpinner(_0x54d3a6(0xe6),()=>_0x454c3a[_0x54d3a6(0xd7)][_0x54d3a6(0xd9)](),{'verbose':_0x5884be[_0x54d3a6(0xe2)]}),_0x325b9a=_0x142fd8[_0x54d3a6(0xe5)];return console['error'](_0x54d3a6(0xe1)+_0x325b9a[_0x54d3a6(0xca)]+_0x54d3a6(0xe3)+(_0x325b9a[_0x54d3a6(0xca)]!==0x1?'s':'')),await handleSDKOutput(_0x325b9a,_0x5884be),0x0;}catch(_0xac12ef){if(_0xac12ef instanceof SDKError)return console[_0x54d3a6(0xe0)](_0x54d3a6(0xcb)+_0xac12ef[_0x54d3a6(0xcc)]),_0xac12ef['cause']&&console['error'](_0x54d3a6(0xd1)+_0xac12ef['cause']),0x1;throw _0xac12ef;}}}