@treasuredata/tdx 0.28.1 → 0.28.2

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 (181) hide show
  1. package/dist/bin.js +1 -1
  2. package/dist/build-info.json +3 -3
  3. package/dist/cli-categories.js +1 -1
  4. package/dist/cli.js +1 -1
  5. package/dist/commands/activations.js +1 -1
  6. package/dist/commands/agent-command.js +1 -1
  7. package/dist/commands/agent-test-command.js +1 -1
  8. package/dist/commands/api-command.js +1 -1
  9. package/dist/commands/auth-command.js +1 -1
  10. package/dist/commands/chat-command.js +1 -1
  11. package/dist/commands/claude-command.js +1 -1
  12. package/dist/commands/claude-statusline-command.js +1 -1
  13. package/dist/commands/claude-usage-command.js +1 -1
  14. package/dist/commands/command.js +1 -1
  15. package/dist/commands/connection-command.js +1 -1
  16. package/dist/commands/databases.js +1 -1
  17. package/dist/commands/delivery-command.js +1 -1
  18. package/dist/commands/describe.js +1 -1
  19. package/dist/commands/engage-campaign-pull-command.js +1 -1
  20. package/dist/commands/engage-campaign-push-command.js +1 -1
  21. package/dist/commands/engage-campaign-validate-command.js +1 -1
  22. package/dist/commands/engage-command.js +1 -1
  23. package/dist/commands/job-command.js +1 -1
  24. package/dist/commands/journey-command.js +1 -1
  25. package/dist/commands/journey-validate-command.js +1 -1
  26. package/dist/commands/llm-command.js +1 -1
  27. package/dist/commands/mcp-command.js +1 -1
  28. package/dist/commands/parent-segment-command.js +1 -1
  29. package/dist/commands/profile-command.js +1 -1
  30. package/dist/commands/profiles-command.js +1 -1
  31. package/dist/commands/query-command.js +1 -1
  32. package/dist/commands/schedule-command.js +1 -1
  33. package/dist/commands/segment-command.js +1 -1
  34. package/dist/commands/segment-create-command.js +1 -1
  35. package/dist/commands/segment-fields-command.js +1 -1
  36. package/dist/commands/segment-pull-command.js +1 -1
  37. package/dist/commands/segment-push-command.js +1 -1
  38. package/dist/commands/segment-update-command.js +1 -1
  39. package/dist/commands/segment-use-command.js +1 -1
  40. package/dist/commands/segment-validate-command.js +1 -1
  41. package/dist/commands/segments.js +1 -1
  42. package/dist/commands/show.js +1 -1
  43. package/dist/commands/status-command.js +1 -1
  44. package/dist/commands/tables.js +1 -1
  45. package/dist/commands/unset-command.js +1 -1
  46. package/dist/commands/use-command.js +1 -1
  47. package/dist/commands/user-command.js +1 -1
  48. package/dist/commands/workflow-command.js +1 -1
  49. package/dist/core/auth.js +1 -1
  50. package/dist/core/command-output.js +1 -1
  51. package/dist/core/config.js +1 -1
  52. package/dist/core/connection-cache.js +1 -1
  53. package/dist/core/constants.js +1 -1
  54. package/dist/core/credential-cache.js +1 -1
  55. package/dist/core/global-context.js +1 -1
  56. package/dist/core/keychain.js +1 -1
  57. package/dist/core/profile.js +1 -1
  58. package/dist/core/project-config.js +1 -1
  59. package/dist/core/session.js +1 -1
  60. package/dist/core/user-cache.js +1 -1
  61. package/dist/core/version.js +1 -1
  62. package/dist/index.js +1 -1
  63. package/dist/mcp/server.js +1 -1
  64. package/dist/mcp/tools/index.js +1 -1
  65. package/dist/mcp/tools/tdx-run.js +1 -1
  66. package/dist/mcp/tools/tdx-search.js +1 -1
  67. package/dist/mcp/utils.js +1 -1
  68. package/dist/proxy/claude-usage-tracker.js +1 -1
  69. package/dist/proxy/passthrough-server.js +1 -1
  70. package/dist/proxy/sse-usage-parser.js +1 -1
  71. package/dist/sdk/agent/agent-config.js +1 -1
  72. package/dist/sdk/agent/agent-ref-parser.js +1 -1
  73. package/dist/sdk/agent/agent-yaml.js +1 -1
  74. package/dist/sdk/agent/test/evaluator.js +1 -1
  75. package/dist/sdk/agent/test/executor.js +1 -1
  76. package/dist/sdk/agent/test/index.js +1 -1
  77. package/dist/sdk/agent/test/output.js +1 -1
  78. package/dist/sdk/agent/test/parser.js +1 -1
  79. package/dist/sdk/agent/tool-target-registry.js +1 -1
  80. package/dist/sdk/api.js +1 -1
  81. package/dist/sdk/client/cdp-api-client.js +1 -1
  82. package/dist/sdk/client/delivery-api-client.js +1 -1
  83. package/dist/sdk/client/endpoints.js +1 -1
  84. package/dist/sdk/client/engage-api-client.js +1 -1
  85. package/dist/sdk/client/http-client.js +1 -1
  86. package/dist/sdk/client/llm-api-client.js +1 -1
  87. package/dist/sdk/client/rate-limiter.js +1 -1
  88. package/dist/sdk/client/td-api-client.js +1 -1
  89. package/dist/sdk/client/trino-api-client.js +1 -1
  90. package/dist/sdk/client/workflow-client.js +1 -1
  91. package/dist/sdk/connection-validator.js +1 -1
  92. package/dist/sdk/connection.js +1 -1
  93. package/dist/sdk/delivery.js +1 -1
  94. package/dist/sdk/engage/campaign-pull.js +1 -1
  95. package/dist/sdk/engage/campaign-push.js +1 -1
  96. package/dist/sdk/engage/campaign-validator.js +1 -1
  97. package/dist/sdk/engage/campaign-yaml.js +1 -1
  98. package/dist/sdk/engage/types/campaign-def.js +1 -1
  99. package/dist/sdk/engage/types/campaign-schema.js +1 -1
  100. package/dist/sdk/engage.js +1 -1
  101. package/dist/sdk/errors.js +1 -1
  102. package/dist/sdk/index.js +1 -1
  103. package/dist/sdk/io/index.js +1 -1
  104. package/dist/sdk/io/node-filesystem.js +1 -1
  105. package/dist/sdk/job.js +1 -1
  106. package/dist/sdk/journey.js +1 -1
  107. package/dist/sdk/llm/chat-cache.js +1 -1
  108. package/dist/sdk/llm/index.js +1 -1
  109. package/dist/sdk/llm/llm-backup-utils.js +1 -1
  110. package/dist/sdk/llm/model-factors.js +1 -1
  111. package/dist/sdk/personalization.js +1 -1
  112. package/dist/sdk/query/index.js +1 -1
  113. package/dist/sdk/query/sql-parser.js +1 -1
  114. package/dist/sdk/realtime.js +1 -1
  115. package/dist/sdk/schedule.js +1 -1
  116. package/dist/sdk/segment/child-segment-yaml.js +1 -1
  117. package/dist/sdk/segment/fields-display.js +1 -1
  118. package/dist/sdk/segment/file-discovery.js +1 -1
  119. package/dist/sdk/segment/journey-utils.js +1 -1
  120. package/dist/sdk/segment/journey-validator.d.ts.map +1 -1
  121. package/dist/sdk/segment/journey-validator.js +1 -1
  122. package/dist/sdk/segment/journey-validator.js.map +1 -1
  123. package/dist/sdk/segment/journey-yaml.js +1 -1
  124. package/dist/sdk/segment/parent-segment-preview.js +1 -1
  125. package/dist/sdk/segment/parent-segment-yaml.js +1 -1
  126. package/dist/sdk/segment/pull-workflow.js +1 -1
  127. package/dist/sdk/segment/push-recovery.js +1 -1
  128. package/dist/sdk/segment/push-workflow.js +1 -1
  129. package/dist/sdk/segment/resolution-context.js +1 -1
  130. package/dist/sdk/segment/segment-path-parser.js +1 -1
  131. package/dist/sdk/segment/segment-ref-parser.js +1 -1
  132. package/dist/sdk/segment/target-resolution.js +1 -1
  133. package/dist/sdk/segment/tdx-config.js +1 -1
  134. package/dist/sdk/segment/validate-files.js +1 -1
  135. package/dist/sdk/segment/yaml-validator.js +1 -1
  136. package/dist/sdk/segment.js +1 -1
  137. package/dist/sdk/types/index.js +1 -1
  138. package/dist/sdk/types/progress.js +1 -1
  139. package/dist/sdk/user.js +1 -1
  140. package/dist/sdk/util/format-detector.js +1 -1
  141. package/dist/sdk/util/formatters.js +1 -1
  142. package/dist/sdk/util/index.js +1 -1
  143. package/dist/sdk/util/tree-formatter.js +1 -1
  144. package/dist/sdk/workflow/archive-validation.js +1 -1
  145. package/dist/sdk/workflow/clone-workflow.js +1 -1
  146. package/dist/sdk/workflow/index.js +1 -1
  147. package/dist/sdk/workflow/pull-workflow.js +1 -1
  148. package/dist/sdk/workflow/push-workflow.js +1 -1
  149. package/dist/sdk/workflow/tdx-config.js +1 -1
  150. package/dist/sdk/workflow/workflow-utils.js +1 -1
  151. package/dist/test-utils/command-runner.js +1 -1
  152. package/dist/test-utils/factories.js +1 -1
  153. package/dist/test-utils/fixtures.js +1 -1
  154. package/dist/test-utils/http-mock.js +1 -1
  155. package/dist/test-utils/index.js +1 -1
  156. package/dist/utils/async.js +1 -1
  157. package/dist/utils/colors.js +1 -1
  158. package/dist/utils/diff.js +1 -1
  159. package/dist/utils/file-permissions.js +1 -1
  160. package/dist/utils/global-cache.js +1 -1
  161. package/dist/utils/json-loader.js +1 -1
  162. package/dist/utils/local-cache.js +1 -1
  163. package/dist/utils/logger/formatters/default-formatter.js +1 -1
  164. package/dist/utils/logger/formatters/index.js +1 -1
  165. package/dist/utils/logger/handlers/console-handler.js +1 -1
  166. package/dist/utils/logger/handlers/file-handler.js +1 -1
  167. package/dist/utils/logger/handlers/index.js +1 -1
  168. package/dist/utils/logger/handlers/null-handler.js +1 -1
  169. package/dist/utils/logger/index.js +1 -1
  170. package/dist/utils/logger/logger.js +1 -1
  171. package/dist/utils/logger/types.js +1 -1
  172. package/dist/utils/option-validation.js +1 -1
  173. package/dist/utils/process.js +1 -1
  174. package/dist/utils/prompt.js +1 -1
  175. package/dist/utils/spinner.js +1 -1
  176. package/dist/utils/sse-parser.js +1 -1
  177. package/dist/utils/string-utils.js +1 -1
  178. package/dist/utils/table-ref-parser.js +1 -1
  179. package/dist/utils/tdx-logger.js +1 -1
  180. package/dist/utils/version-check.js +1 -1
  181. package/package.json +1 -1
@@ -1 +1 @@
1
- function a36_0x5c01(_0x156eda,_0x5f0ab3){_0x156eda=_0x156eda-0x97;const _0x3196cd=a36_0x3196();let _0x5c0110=_0x3196cd[_0x156eda];return _0x5c0110;}const a36_0x3055df=a36_0x5c01;(function(_0x4590cd,_0x2b9b68){const _0x3b724f=a36_0x5c01,_0x4c8558=_0x4590cd();while(!![]){try{const _0x598e2a=parseInt(_0x3b724f(0xba))/0x1*(-parseInt(_0x3b724f(0xa9))/0x2)+parseInt(_0x3b724f(0xb9))/0x3*(-parseInt(_0x3b724f(0xb4))/0x4)+-parseInt(_0x3b724f(0xab))/0x5+-parseInt(_0x3b724f(0xb8))/0x6*(-parseInt(_0x3b724f(0xbb))/0x7)+parseInt(_0x3b724f(0xaa))/0x8*(-parseInt(_0x3b724f(0xa3))/0x9)+parseInt(_0x3b724f(0xbd))/0xa+parseInt(_0x3b724f(0x9a))/0xb;if(_0x598e2a===_0x2b9b68)break;else _0x4c8558['push'](_0x4c8558['shift']());}catch(_0x136d2e){_0x4c8558['push'](_0x4c8558['shift']());}}}(a36_0x3196,0x5b715));import{BaseCommand}from'./command.js';import{handleSDKOutput}from'../core/command-output.js';import{withSpinner}from'../utils/spinner.js';import{loadJSONFromOptions}from'../utils/json-loader.js';import{SDKError,ErrorCode}from'../sdk/index.js';function a36_0x3196(){const _0x1d4404=['\x20\x20tdx\x20segment\x20update\x20\x22My\x20Audience/High\x20Value\x22\x20--description\x20\x22...\x22','Error:\x20Cannot\x20update\x20','data','yellow','rule','Use:\x20tdx\x20segment\x20update\x20<path_to_segment>\x20[options]','Updating\x20segment\x20\x27','Resolving\x20folder\x20\x27','Usage:\x20tdx\x20segment\x20update\x20<path>\x20[options]','INTERNAL','segment','Resolved\x20relative\x20path\x20to:\x20','\x20\x20Use\x20`tdx\x20sg\x20push`\x20with\x20YAML\x20files\x20instead.\x0a','3539778HGGSHY','\x27...','name','verbose','✔\x20Updated\x20segment\x20\x27','ruleFile','Resolved\x20type:\x20','\x20\x20tdx\x20segment\x20update\x20\x22High\x20Value\x22\x20--rule\x20\x27...\x27\x20\x20#\x20Relative\x20to\x20context','resolveFolderId','1172898MDXEFU','length','segment:update','⚠\x20Deprecation\x20warning:\x20`segment\x20update`\x20is\x20deprecated.','type','parentId','2flmPgY','8LVVNyu','2894400fFljGH','segmentName','error','Segment\x20ID:\x20','description','Update\x20existing\x20child\x20segment','Error:\x20Segment\x20path\x20or\x20name\x20is\x20required','.\x20Only\x20child\x20segments\x20can\x20be\x20updated.','folder','129048bGExRR','resolvePathToResource','segmentId','includes','714YZsuUF','15VQgvwr','161625kgUIeK','40810JCoKyA','updateSegmentById','3911180fqZmTN','Examples:'];a36_0x3196=function(){return _0x1d4404;};return a36_0x3196();}import a36_0x38f196 from'chalk';export class SegmentUpdateCommand extends BaseCommand{[a36_0x3055df(0x9c)]=a36_0x3055df(0xa5);[a36_0x3055df(0xaf)]=a36_0x3055df(0xb0);async['execute'](_0x4cb258){const _0x28ca0c=a36_0x3055df;console[_0x28ca0c(0xad)](a36_0x38f196[_0x28ca0c(0xc2)](_0x28ca0c(0xa6))),console[_0x28ca0c(0xad)](a36_0x38f196[_0x28ca0c(0xc2)](_0x28ca0c(0x99)));const {options:_0x253a56,args:_0x5d06c8,tdx:_0x1b2411}=_0x4cb258,_0x2d1c9d=_0x253a56;if(_0x5d06c8[_0x28ca0c(0xa4)]===0x0)return console[_0x28ca0c(0xad)](_0x28ca0c(0xb1)),console[_0x28ca0c(0xad)](_0x28ca0c(0xc7)),console[_0x28ca0c(0xad)](_0x28ca0c(0xbe)),console[_0x28ca0c(0xad)](_0x28ca0c(0xbf)),console[_0x28ca0c(0xad)](_0x28ca0c(0xa1)),0x1;const _0x59f9e4=_0x5d06c8[0x0],_0x297bc0=_0x253a56['segmentPath'];let _0x22b8da=_0x59f9e4;_0x297bc0&&!_0x59f9e4[_0x28ca0c(0xb7)]('/')&&(_0x22b8da=_0x297bc0+'/'+_0x59f9e4,_0x2d1c9d[_0x28ca0c(0x9d)]&&console['error'](_0x28ca0c(0x98)+_0x22b8da));const _0x6ee34=await withSpinner('Resolving\x20path\x20\x27'+_0x22b8da+_0x28ca0c(0x9b),()=>_0x1b2411[_0x28ca0c(0x97)][_0x28ca0c(0xb5)](_0x22b8da),{'verbose':_0x2d1c9d[_0x28ca0c(0x9d)]}),_0x5594e8=_0x6ee34['data'];_0x2d1c9d[_0x28ca0c(0x9d)]&&console[_0x28ca0c(0xad)](_0x28ca0c(0xa0)+_0x5594e8[_0x28ca0c(0xa7)]);if(_0x5594e8[_0x28ca0c(0xa7)]!=='segment')return console[_0x28ca0c(0xad)](_0x28ca0c(0xc0)+_0x5594e8['type']+_0x28ca0c(0xb2)),console[_0x28ca0c(0xad)](_0x28ca0c(0xc4)),0x1;if(!_0x5594e8[_0x28ca0c(0xb6)])throw new SDKError(ErrorCode[_0x28ca0c(0xc8)],'Segment\x20ID\x20missing\x20from\x20resolved\x20path');const _0x26da58=_0x5594e8[_0x28ca0c(0xa8)],_0x372c3b=_0x5594e8[_0x28ca0c(0xb6)];_0x2d1c9d[_0x28ca0c(0x9d)]&&(console[_0x28ca0c(0xad)]('Parent\x20ID:\x20'+_0x26da58),console['error'](_0x28ca0c(0xae)+_0x372c3b));let _0x2f0b30;if(_0x2d1c9d[_0x28ca0c(0xb3)]){const _0x43dceb=_0x2d1c9d[_0x28ca0c(0xb3)],_0x47f394=await withSpinner(_0x28ca0c(0xc6)+_0x43dceb+_0x28ca0c(0x9b),()=>_0x1b2411[_0x28ca0c(0x97)][_0x28ca0c(0xa2)](_0x26da58,_0x43dceb),{'verbose':_0x2d1c9d['verbose']});_0x2f0b30=parseInt(_0x47f394[_0x28ca0c(0xc1)],0xa),_0x2d1c9d[_0x28ca0c(0x9d)]&&console[_0x28ca0c(0xad)]('Resolved\x20folder\x20ID:\x20'+_0x2f0b30);}const _0x54db27=await loadJSONFromOptions(_0x2d1c9d[_0x28ca0c(0xc3)],_0x2d1c9d[_0x28ca0c(0x9f)]),_0x3c3786={'name':_0x2d1c9d[_0x28ca0c(0x9c)],'description':_0x2d1c9d[_0x28ca0c(0xaf)],'rule':_0x54db27,'kind':_0x2d1c9d['kind']!==undefined?parseInt(_0x2d1c9d['kind'],0xa):undefined,'segmentFolderId':_0x2f0b30},_0x5b8c37=await withSpinner(_0x28ca0c(0xc5)+_0x5594e8[_0x28ca0c(0xac)]+_0x28ca0c(0x9b),()=>_0x1b2411[_0x28ca0c(0x97)][_0x28ca0c(0xbc)](_0x26da58,_0x372c3b,_0x3c3786),{'verbose':_0x2d1c9d[_0x28ca0c(0x9d)]}),_0x5ee197=_0x5b8c37[_0x28ca0c(0xc1)];return console[_0x28ca0c(0xad)](_0x28ca0c(0x9e)+_0x5ee197[_0x28ca0c(0x9c)]+'\x27'),_0x22b8da!==_0x59f9e4&&console[_0x28ca0c(0xad)]('\x20\x20\x20Path:\x20'+_0x22b8da),await handleSDKOutput([_0x5ee197],_0x2d1c9d),0x0;}}
1
+ const a36_0x3838a6=a36_0x30a6;function a36_0x2879(){const _0x4a7e0f=['error','✔\x20Updated\x20segment\x20\x27','Resolving\x20folder\x20\x27','execute','7127540yfpJDo','2923626kjVjBG','type','resolvePathToResource','segmentPath','\x20\x20tdx\x20segment\x20update\x20\x22My\x20Audience/High\x20Value\x22\x20--description\x20\x22...\x22','segment','7tvxHiS','updateSegmentById','includes','Resolved\x20relative\x20path\x20to:\x20','886756NBNiSZ','Parent\x20ID:\x20','Resolved\x20folder\x20ID:\x20','.\x20Only\x20child\x20segments\x20can\x20be\x20updated.','867654hXUiKS','4141850obhNOz','\x27...','⚠\x20Deprecation\x20warning:\x20`segment\x20update`\x20is\x20deprecated.','Error:\x20Cannot\x20update\x20','data','kind','resolveFolderId','segmentId','verbose','ruleFile','Updating\x20segment\x20\x27','1314QVHuDo','Resolving\x20path\x20\x27','\x20\x20tdx\x20segment\x20update\x20\x22High\x20Value\x22\x20--rule\x20\x27...\x27\x20\x20#\x20Relative\x20to\x20context','1446SEIIVi','Examples:','Use:\x20tdx\x20segment\x20update\x20<path_to_segment>\x20[options]','808QejYlC','\x20\x20Use\x20`tdx\x20sg\x20push`\x20with\x20YAML\x20files\x20instead.\x0a','yellow','description','segmentName','length','name','folder','segment:update','Resolved\x20type:\x20','6120gXeJUT','Error:\x20Segment\x20path\x20or\x20name\x20is\x20required'];a36_0x2879=function(){return _0x4a7e0f;};return a36_0x2879();}(function(_0x56f759,_0x2047f7){const _0x22814d=a36_0x30a6,_0x5334f4=_0x56f759();while(!![]){try{const _0x1317a9=-parseInt(_0x22814d(0x150))/0x1+-parseInt(_0x22814d(0x15c))/0x2*(-parseInt(_0x22814d(0x15f))/0x3)+-parseInt(_0x22814d(0x14c))/0x4+parseInt(_0x22814d(0x141))/0x5+-parseInt(_0x22814d(0x142))/0x6*(-parseInt(_0x22814d(0x148))/0x7)+-parseInt(_0x22814d(0x131))/0x8*(-parseInt(_0x22814d(0x13b))/0x9)+-parseInt(_0x22814d(0x151))/0xa;if(_0x1317a9===_0x2047f7)break;else _0x5334f4['push'](_0x5334f4['shift']());}catch(_0x31e6fb){_0x5334f4['push'](_0x5334f4['shift']());}}}(a36_0x2879,0xc1fed));import{BaseCommand}from'./command.js';import{handleSDKOutput}from'../core/command-output.js';import{withSpinner}from'../utils/spinner.js';import{loadJSONFromOptions}from'../utils/json-loader.js';import{SDKError,ErrorCode}from'../sdk/index.js';function a36_0x30a6(_0x19f029,_0x1f0af0){_0x19f029=_0x19f029-0x131;const _0x2879a3=a36_0x2879();let _0x30a6cc=_0x2879a3[_0x19f029];return _0x30a6cc;}import a36_0x10f9ae from'chalk';export class SegmentUpdateCommand extends BaseCommand{[a36_0x3838a6(0x137)]=a36_0x3838a6(0x139);[a36_0x3838a6(0x134)]='Update\x20existing\x20child\x20segment';async[a36_0x3838a6(0x140)](_0x576f0f){const _0x8508a9=a36_0x3838a6;console[_0x8508a9(0x13d)](a36_0x10f9ae[_0x8508a9(0x133)](_0x8508a9(0x153))),console[_0x8508a9(0x13d)](a36_0x10f9ae['yellow'](_0x8508a9(0x132)));const {options:_0xbac8e7,args:_0x3599aa,tdx:_0x29169c}=_0x576f0f,_0x1b2dea=_0xbac8e7;if(_0x3599aa[_0x8508a9(0x136)]===0x0)return console[_0x8508a9(0x13d)](_0x8508a9(0x13c)),console[_0x8508a9(0x13d)]('Usage:\x20tdx\x20segment\x20update\x20<path>\x20[options]'),console[_0x8508a9(0x13d)](_0x8508a9(0x160)),console['error'](_0x8508a9(0x146)),console[_0x8508a9(0x13d)](_0x8508a9(0x15e)),0x1;const _0x70a91e=_0x3599aa[0x0],_0x2b43ea=_0xbac8e7[_0x8508a9(0x145)];let _0x2f9490=_0x70a91e;_0x2b43ea&&!_0x70a91e[_0x8508a9(0x14a)]('/')&&(_0x2f9490=_0x2b43ea+'/'+_0x70a91e,_0x1b2dea[_0x8508a9(0x159)]&&console[_0x8508a9(0x13d)](_0x8508a9(0x14b)+_0x2f9490));const _0x2e3b6a=await withSpinner(_0x8508a9(0x15d)+_0x2f9490+'\x27...',()=>_0x29169c['segment'][_0x8508a9(0x144)](_0x2f9490),{'verbose':_0x1b2dea[_0x8508a9(0x159)]}),_0x4e253a=_0x2e3b6a[_0x8508a9(0x155)];_0x1b2dea['verbose']&&console[_0x8508a9(0x13d)](_0x8508a9(0x13a)+_0x4e253a['type']);if(_0x4e253a[_0x8508a9(0x143)]!==_0x8508a9(0x147))return console[_0x8508a9(0x13d)](_0x8508a9(0x154)+_0x4e253a['type']+_0x8508a9(0x14f)),console[_0x8508a9(0x13d)](_0x8508a9(0x161)),0x1;if(!_0x4e253a['segmentId'])throw new SDKError(ErrorCode['INTERNAL'],'Segment\x20ID\x20missing\x20from\x20resolved\x20path');const _0x1389dc=_0x4e253a['parentId'],_0x2a2c99=_0x4e253a[_0x8508a9(0x158)];_0x1b2dea['verbose']&&(console['error'](_0x8508a9(0x14d)+_0x1389dc),console[_0x8508a9(0x13d)]('Segment\x20ID:\x20'+_0x2a2c99));let _0x279dea;if(_0x1b2dea['folder']){const _0x3f2dd8=_0x1b2dea[_0x8508a9(0x138)],_0xfbe392=await withSpinner(_0x8508a9(0x13f)+_0x3f2dd8+_0x8508a9(0x152),()=>_0x29169c[_0x8508a9(0x147)][_0x8508a9(0x157)](_0x1389dc,_0x3f2dd8),{'verbose':_0x1b2dea['verbose']});_0x279dea=parseInt(_0xfbe392[_0x8508a9(0x155)],0xa),_0x1b2dea[_0x8508a9(0x159)]&&console['error'](_0x8508a9(0x14e)+_0x279dea);}const _0x19cc60=await loadJSONFromOptions(_0x1b2dea['rule'],_0x1b2dea[_0x8508a9(0x15a)]),_0x1140e5={'name':_0x1b2dea[_0x8508a9(0x137)],'description':_0x1b2dea[_0x8508a9(0x134)],'rule':_0x19cc60,'kind':_0x1b2dea[_0x8508a9(0x156)]!==undefined?parseInt(_0x1b2dea['kind'],0xa):undefined,'segmentFolderId':_0x279dea},_0x1c3aa3=await withSpinner(_0x8508a9(0x15b)+_0x4e253a[_0x8508a9(0x135)]+_0x8508a9(0x152),()=>_0x29169c[_0x8508a9(0x147)][_0x8508a9(0x149)](_0x1389dc,_0x2a2c99,_0x1140e5),{'verbose':_0x1b2dea['verbose']}),_0x3613d7=_0x1c3aa3[_0x8508a9(0x155)];return console['error'](_0x8508a9(0x13e)+_0x3613d7['name']+'\x27'),_0x2f9490!==_0x70a91e&&console[_0x8508a9(0x13d)]('\x20\x20\x20Path:\x20'+_0x2f9490),await handleSDKOutput([_0x3613d7],_0x1b2dea),0x0;}}
@@ -1 +1 @@
1
- const a37_0x23a3dd=a37_0x106f;(function(_0x5fefa8,_0x40d6f5){const _0x3d74b5=a37_0x106f,_0x56ddc2=_0x5fefa8();while(!![]){try{const _0x1bfd64=-parseInt(_0x3d74b5(0x122))/0x1+-parseInt(_0x3d74b5(0x126))/0x2+-parseInt(_0x3d74b5(0x11d))/0x3*(parseInt(_0x3d74b5(0x13f))/0x4)+-parseInt(_0x3d74b5(0x11c))/0x5+parseInt(_0x3d74b5(0x12c))/0x6*(parseInt(_0x3d74b5(0x138))/0x7)+parseInt(_0x3d74b5(0x11f))/0x8*(-parseInt(_0x3d74b5(0x125))/0x9)+-parseInt(_0x3d74b5(0x130))/0xa*(-parseInt(_0x3d74b5(0x139))/0xb);if(_0x1bfd64===_0x40d6f5)break;else _0x56ddc2['push'](_0x56ddc2['shift']());}catch(_0x23ed30){_0x56ddc2['push'](_0x56ddc2['shift']());}}}(a37_0x5a8f,0x45eb2));import{existsSync,statSync}from'fs';import a37_0x488fb1 from'chalk';function a37_0x5a8f(){const _0x48813d=['split','log','verbose','220640IRTNYi','10614fdCCHH','\x20\x20tdx\x20segment\x20use\x20\x22My\x20Audience/Marketing\x22','96032NpIZfR','length','Set\x20current\x20segment/folder\x20context\x20for\x20navigation','335035eLOZQJ','Resolving\x20path\x20\x27','Resolved\x20relative\x20path\x20to:\x20','396jbwdyf','199256CUVNNM','error','Error:\x20No\x20context\x20set.\x20Cannot\x20use\x20relative\x20path.','Usage:\x20tdx\x20segment\x20use\x20<path>','red','execute','1299972AXqIZq','dim','Use\x20\x22tdx\x20segments\x22\x20to\x20list\x20contents\x20in\x20this\x20context','parentName','12138290HCEPgj','folderPath','Use\x20\x22tdx\x20use\x22\x20to\x20see\x20all\x20context\x20parameters','Context\x20can\x20only\x20be\x20set\x20to\x20a\x20parent\x20segment\x20or\x20folder.','slice','Resolved\x20path\x20type:\x20','isDirectory','Examples:','14KpKbUk','11Echksw','Site:\x20','Parent\x20ID:\x20','segments','fullPath','cyan','400IjtlCe','Error:\x20Path\x20is\x20required\x0a','segmentPath','config','join','\x20\x20tdx\x20segment\x20use\x20/\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Clear\x20context','session','\x27...','segment','data','Error:\x20No\x20tdx.json\x20found\x20in\x20or\x20above:\x20','✔\x20Context\x20cleared.\x20Back\x20to\x20root.','isAbsolute','type','green','Tip:\x20Run\x20`tdx\x20sg\x20pull\x20<parent_name>`\x20first\x20to\x20create\x20the\x20folder\x20structure','folderId'];a37_0x5a8f=function(){return _0x48813d;};return a37_0x5a8f();}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';function a37_0x106f(_0xb23ba9,_0x9dc3f2){_0xb23ba9=_0xb23ba9-0x118;const _0x5a8ff2=a37_0x5a8f();let _0x106f73=_0x5a8ff2[_0xb23ba9];return _0x106f73;}import{findTdxConfig}from'../sdk/segment/tdx-config.js';export class SegmentUseCommand extends BaseCommand{['name']='segment:use';['description']=a37_0x23a3dd(0x121);async[a37_0x23a3dd(0x12b)](_0x41d999){const _0x29c4df=a37_0x23a3dd,{options:_0x4c3e24,args:_0x3e5c5a,tdx:_0x5e8493}=_0x41d999;if(_0x3e5c5a[_0x29c4df(0x120)]===0x0)return console[_0x29c4df(0x127)](a37_0x488fb1['red'](_0x29c4df(0x140))),console[_0x29c4df(0x127)](_0x29c4df(0x129)),console[_0x29c4df(0x127)](_0x29c4df(0x137)),console[_0x29c4df(0x127)]('\x20\x20tdx\x20segment\x20use\x20\x22My\x20Audience\x22'),console[_0x29c4df(0x127)](_0x29c4df(0x11e)),console[_0x29c4df(0x127)](_0x29c4df(0x144)),console[_0x29c4df(0x127)]('\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 _0x20d183=_0x3e5c5a[0x0],_0x1edaf3=_0x4c3e24[_0x29c4df(0x145)];try{if(_0x20d183==='/')return saveSessionContext({'segment_path':undefined},_0x1edaf3),console[_0x29c4df(0x11a)](a37_0x488fb1[_0x29c4df(0x14d)]('✔\x20Context\x20cleared.\x20Back\x20to\x20root.')),0x0;if(existsSync(_0x20d183)&&statSync(_0x20d183)[_0x29c4df(0x136)]()){let _0x4ae1b8;try{_0x4ae1b8=findTdxConfig(_0x20d183);}catch{return console[_0x29c4df(0x127)](a37_0x488fb1[_0x29c4df(0x12a)](_0x29c4df(0x149)+_0x20d183)),console[_0x29c4df(0x127)](a37_0x488fb1[_0x29c4df(0x13e)](_0x29c4df(0x14e))),0x1;}const _0x5d8d40=_0x4ae1b8[_0x29c4df(0x142)]['parent_segment'];return saveSessionContext({'segment_path':_0x5d8d40,'parent_segment':_0x5d8d40},_0x1edaf3),console['log'](a37_0x488fb1[_0x29c4df(0x14d)]('✔\x20Context\x20set\x20to:\x20'+a37_0x488fb1[_0x29c4df(0x13e)](_0x5d8d40))),0x0;}const _0x47ffb9=_0x4c3e24[_0x29c4df(0x141)];let _0x5ddfbc=_0x20d183;const _0x4fed9d=parsePath(_0x20d183);if(!_0x4fed9d[_0x29c4df(0x14b)]){if(!_0x47ffb9)return console[_0x29c4df(0x127)](a37_0x488fb1[_0x29c4df(0x12a)](_0x29c4df(0x128))),console[_0x29c4df(0x127)](a37_0x488fb1[_0x29c4df(0x13e)]('Use\x20an\x20absolute\x20path\x20or\x20set\x20context\x20with:\x20tdx\x20segment\x20use\x20<parent_name>')),0x1;if(_0x20d183==='..'){const _0x150b59=_0x47ffb9[_0x29c4df(0x119)]('/')[_0x29c4df(0x134)](0x0,-0x1)[_0x29c4df(0x143)]('/');_0x5ddfbc=_0x150b59||'/';}else _0x20d183==='.'?_0x5ddfbc=_0x47ffb9:_0x5ddfbc=_0x47ffb9+'/'+_0x20d183;_0x4c3e24[_0x29c4df(0x11b)]&&console[_0x29c4df(0x127)](_0x29c4df(0x124)+_0x5ddfbc);}if(_0x5ddfbc==='/'||_0x5ddfbc==='')return saveSessionContext({'segment_path':undefined},_0x1edaf3),console['log'](a37_0x488fb1['green'](_0x29c4df(0x14a))),0x0;_0x5ddfbc=normalizePath(_0x5ddfbc);const _0x410541=parsePath(_0x5ddfbc)[_0x29c4df(0x13c)];if(_0x410541[_0x29c4df(0x120)]===0x0)return saveSessionContext({'segment_path':undefined},_0x1edaf3),console[_0x29c4df(0x11a)](a37_0x488fb1[_0x29c4df(0x14d)]('✔\x20Context\x20cleared.\x20Back\x20to\x20root.')),0x0;_0x4c3e24['verbose']&&(console[_0x29c4df(0x127)](_0x29c4df(0x13a)+_0x4c3e24['site']),console[_0x29c4df(0x127)]('Target\x20path:\x20'+_0x5ddfbc));const _0x34acd3=await withSpinner(_0x29c4df(0x123)+_0x5ddfbc+_0x29c4df(0x146),()=>_0x5e8493[_0x29c4df(0x147)]['resolvePathToResource'](_0x5ddfbc),{'verbose':_0x4c3e24[_0x29c4df(0x11b)]}),_0x5bec3f=_0x34acd3[_0x29c4df(0x148)];_0x4c3e24[_0x29c4df(0x11b)]&&(console[_0x29c4df(0x127)](_0x29c4df(0x135)+_0x5bec3f['type']),console[_0x29c4df(0x127)](_0x29c4df(0x13b)+_0x5bec3f['parentId']),_0x5bec3f['folderId']&&console[_0x29c4df(0x127)]('Folder\x20ID:\x20'+_0x5bec3f[_0x29c4df(0x118)]));if(_0x5bec3f[_0x29c4df(0x14c)]===_0x29c4df(0x147))return console[_0x29c4df(0x127)](a37_0x488fb1['red']('Error:\x20Cannot\x20set\x20context\x20to\x20a\x20segment.')),console[_0x29c4df(0x127)](_0x29c4df(0x133)),console['error'](a37_0x488fb1['cyan']('Use:\x20tdx\x20segment\x20use\x20'+_0x5bec3f[_0x29c4df(0x12f)]+(_0x5bec3f['folderPath']?'/'+_0x5bec3f[_0x29c4df(0x131)][_0x29c4df(0x143)]('/'):''))),0x1;return saveSessionContext({'segment_path':_0x5bec3f[_0x29c4df(0x13d)],'parent_segment':_0x5bec3f[_0x29c4df(0x12f)]},_0x1edaf3),console[_0x29c4df(0x11a)](a37_0x488fb1['green']('✔\x20Context\x20set\x20to:\x20'+a37_0x488fb1[_0x29c4df(0x13e)](_0x5bec3f[_0x29c4df(0x13d)]))),_0x4c3e24[_0x29c4df(0x11b)]&&(console[_0x29c4df(0x127)](a37_0x488fb1[_0x29c4df(0x12d)](_0x29c4df(0x12e))),console[_0x29c4df(0x127)](a37_0x488fb1[_0x29c4df(0x12d)](_0x29c4df(0x132)))),0x0;}catch(_0x5249c6){throw _0x5249c6;}}}
1
+ const a37_0x311eeb=a37_0xc925;(function(_0x69da48,_0x3e6b54){const _0x49e417=a37_0xc925,_0x390c86=_0x69da48();while(!![]){try{const _0x16cb46=parseInt(_0x49e417(0x1ad))/0x1+parseInt(_0x49e417(0x199))/0x2*(-parseInt(_0x49e417(0x1a1))/0x3)+parseInt(_0x49e417(0x1a5))/0x4+parseInt(_0x49e417(0x19e))/0x5*(-parseInt(_0x49e417(0x1bc))/0x6)+-parseInt(_0x49e417(0x1ac))/0x7+-parseInt(_0x49e417(0x1c0))/0x8+parseInt(_0x49e417(0x1af))/0x9;if(_0x16cb46===_0x3e6b54)break;else _0x390c86['push'](_0x390c86['shift']());}catch(_0x8a5762){_0x390c86['push'](_0x390c86['shift']());}}}(a37_0xef02,0xd96fe));import{existsSync,statSync}from'fs';function a37_0xc925(_0x28b7c7,_0x164293){_0x28b7c7=_0x28b7c7-0x194;const _0xef028a=a37_0xef02();let _0xc925da=_0xef028a[_0x28b7c7];return _0xc925da;}import a37_0x53182a from'chalk';function a37_0xef02(){const _0x17faa7=['type','12335uREIHW','data','log','18Upfehq','folderId','\x27...','fullPath','568936QvTqhp','Examples:','cyan','✔\x20Context\x20set\x20to:\x20','\x20\x20tdx\x20segment\x20use\x20..\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Go\x20to\x20parent','error','Error:\x20No\x20context\x20set.\x20Cannot\x20use\x20relative\x20path.','1959132BvpLSJ','171448fXfsIi','Set\x20current\x20segment/folder\x20context\x20for\x20navigation','31281795iiNcYS','join','parentName','Target\x20path:\x20','segment','session','\x20\x20tdx\x20segment\x20use\x20\x22My\x20Audience\x22','length','verbose','Usage:\x20tdx\x20segment\x20use\x20<path>','site','✔\x20Context\x20cleared.\x20Back\x20to\x20root.','red','1038fuHIPS','description','Use\x20\x22tdx\x20segments\x22\x20to\x20list\x20contents\x20in\x20this\x20context','Use\x20\x22tdx\x20use\x22\x20to\x20see\x20all\x20context\x20parameters','5930592IgBdJt','Site:\x20','dim','segment:use','slice','segmentPath','Use\x20an\x20absolute\x20path\x20or\x20set\x20context\x20with:\x20tdx\x20segment\x20use\x20<parent_name>','Tip:\x20Run\x20`tdx\x20sg\x20pull\x20<parent_name>`\x20first\x20to\x20create\x20the\x20folder\x20structure','config','Parent\x20ID:\x20','split','Error:\x20Cannot\x20set\x20context\x20to\x20a\x20segment.','folderPath','parent_segment','Error:\x20Path\x20is\x20required\x0a','\x20\x20tdx\x20segment\x20use\x20/\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Clear\x20context','Resolving\x20path\x20\x27','isDirectory','green','name','483608Hyhwpq','Resolved\x20path\x20type:\x20','Error:\x20No\x20tdx.json\x20found\x20in\x20or\x20above:\x20','execute'];a37_0xef02=function(){return _0x17faa7;};return a37_0xef02();}import{BaseCommand}from'./command.js';import{saveSessionContext}from'../core/session.js';import{withSpinner}from'../utils/spinner.js';import{parsePath,normalizePath}from'../sdk/segment/segment-path-parser.js';import{findTdxConfig}from'../sdk/segment/tdx-config.js';export class SegmentUseCommand extends BaseCommand{[a37_0x311eeb(0x198)]=a37_0x311eeb(0x1c3);[a37_0x311eeb(0x1bd)]=a37_0x311eeb(0x1ae);async[a37_0x311eeb(0x19c)](_0x3e5255){const _0x46387c=a37_0x311eeb,{options:_0x4a8f57,args:_0x21b601,tdx:_0x795b1d}=_0x3e5255;if(_0x21b601[_0x46387c(0x1b6)]===0x0)return console['error'](a37_0x53182a['red'](_0x46387c(0x1ce))),console[_0x46387c(0x1aa)](_0x46387c(0x1b8)),console[_0x46387c(0x1aa)](_0x46387c(0x1a6)),console[_0x46387c(0x1aa)](_0x46387c(0x1b5)),console['error']('\x20\x20tdx\x20segment\x20use\x20\x22My\x20Audience/Marketing\x22'),console['error'](_0x46387c(0x194)),console[_0x46387c(0x1aa)](_0x46387c(0x1a9)),0x1;const _0xbb6a7b=_0x21b601[0x0],_0x2f0563=_0x4a8f57[_0x46387c(0x1b4)];try{if(_0xbb6a7b==='/')return saveSessionContext({'segment_path':undefined},_0x2f0563),console[_0x46387c(0x1a0)](a37_0x53182a[_0x46387c(0x197)]('✔\x20Context\x20cleared.\x20Back\x20to\x20root.')),0x0;if(existsSync(_0xbb6a7b)&&statSync(_0xbb6a7b)[_0x46387c(0x196)]()){let _0x561e8f;try{_0x561e8f=findTdxConfig(_0xbb6a7b);}catch{return console[_0x46387c(0x1aa)](a37_0x53182a['red'](_0x46387c(0x19b)+_0xbb6a7b)),console[_0x46387c(0x1aa)](a37_0x53182a['cyan'](_0x46387c(0x1c7))),0x1;}const _0x545f69=_0x561e8f[_0x46387c(0x1c8)][_0x46387c(0x1cd)];return saveSessionContext({'segment_path':_0x545f69,'parent_segment':_0x545f69},_0x2f0563),console[_0x46387c(0x1a0)](a37_0x53182a[_0x46387c(0x197)](_0x46387c(0x1a8)+a37_0x53182a[_0x46387c(0x1a7)](_0x545f69))),0x0;}const _0x12470b=_0x4a8f57[_0x46387c(0x1c5)];let _0xa3f91e=_0xbb6a7b;const _0x127263=parsePath(_0xbb6a7b);if(!_0x127263['isAbsolute']){if(!_0x12470b)return console['error'](a37_0x53182a[_0x46387c(0x1bb)](_0x46387c(0x1ab))),console[_0x46387c(0x1aa)](a37_0x53182a[_0x46387c(0x1a7)](_0x46387c(0x1c6))),0x1;if(_0xbb6a7b==='..'){const _0x7030aa=_0x12470b[_0x46387c(0x1ca)]('/')[_0x46387c(0x1c4)](0x0,-0x1)[_0x46387c(0x1b0)]('/');_0xa3f91e=_0x7030aa||'/';}else _0xbb6a7b==='.'?_0xa3f91e=_0x12470b:_0xa3f91e=_0x12470b+'/'+_0xbb6a7b;_0x4a8f57[_0x46387c(0x1b7)]&&console[_0x46387c(0x1aa)]('Resolved\x20relative\x20path\x20to:\x20'+_0xa3f91e);}if(_0xa3f91e==='/'||_0xa3f91e==='')return saveSessionContext({'segment_path':undefined},_0x2f0563),console[_0x46387c(0x1a0)](a37_0x53182a['green'](_0x46387c(0x1ba))),0x0;_0xa3f91e=normalizePath(_0xa3f91e);const _0x1d287d=parsePath(_0xa3f91e)['segments'];if(_0x1d287d['length']===0x0)return saveSessionContext({'segment_path':undefined},_0x2f0563),console[_0x46387c(0x1a0)](a37_0x53182a[_0x46387c(0x197)]('✔\x20Context\x20cleared.\x20Back\x20to\x20root.')),0x0;_0x4a8f57[_0x46387c(0x1b7)]&&(console[_0x46387c(0x1aa)](_0x46387c(0x1c1)+_0x4a8f57[_0x46387c(0x1b9)]),console[_0x46387c(0x1aa)](_0x46387c(0x1b2)+_0xa3f91e));const _0x472727=await withSpinner(_0x46387c(0x195)+_0xa3f91e+_0x46387c(0x1a3),()=>_0x795b1d['segment']['resolvePathToResource'](_0xa3f91e),{'verbose':_0x4a8f57['verbose']}),_0x11dc00=_0x472727[_0x46387c(0x19f)];_0x4a8f57[_0x46387c(0x1b7)]&&(console['error'](_0x46387c(0x19a)+_0x11dc00[_0x46387c(0x19d)]),console[_0x46387c(0x1aa)](_0x46387c(0x1c9)+_0x11dc00['parentId']),_0x11dc00[_0x46387c(0x1a2)]&&console[_0x46387c(0x1aa)]('Folder\x20ID:\x20'+_0x11dc00[_0x46387c(0x1a2)]));if(_0x11dc00[_0x46387c(0x19d)]===_0x46387c(0x1b3))return console[_0x46387c(0x1aa)](a37_0x53182a['red'](_0x46387c(0x1cb))),console[_0x46387c(0x1aa)]('Context\x20can\x20only\x20be\x20set\x20to\x20a\x20parent\x20segment\x20or\x20folder.'),console[_0x46387c(0x1aa)](a37_0x53182a[_0x46387c(0x1a7)]('Use:\x20tdx\x20segment\x20use\x20'+_0x11dc00[_0x46387c(0x1b1)]+(_0x11dc00[_0x46387c(0x1cc)]?'/'+_0x11dc00['folderPath']['join']('/'):''))),0x1;return saveSessionContext({'segment_path':_0x11dc00[_0x46387c(0x1a4)],'parent_segment':_0x11dc00[_0x46387c(0x1b1)]},_0x2f0563),console[_0x46387c(0x1a0)](a37_0x53182a[_0x46387c(0x197)](_0x46387c(0x1a8)+a37_0x53182a[_0x46387c(0x1a7)](_0x11dc00[_0x46387c(0x1a4)]))),_0x4a8f57[_0x46387c(0x1b7)]&&(console['error'](a37_0x53182a['dim'](_0x46387c(0x1be))),console['error'](a37_0x53182a[_0x46387c(0x1c2)](_0x46387c(0x1bf)))),0x0;}catch(_0x384976){throw _0x384976;}}}
@@ -1 +1 @@
1
- function a38_0xf132(){const _0x2066f1=['endsWith','\x20warning(s)\x20found','\x20warning(s)','green','file','2WcpjHf','3zDPbCd','warnings','yellow','280nxUFdB','valid','.yaml','filePath','hasErrors','dim','log','red','3138872tEszns','length','errors','no_parent','cyan','error','Error:\x20No\x20YAML\x20files\x20found\x20in\x20','Validation\x20failed:\x20','invalidCount','type','targetDir','284917zLmgJa','\x20file(s)\x20valid','name','Error:\x20Directory\x20not\x20found:\x20','warningCount','\x20file(s)\x20with\x20errors,\x20','9996768QwtmZL','\x20error(s)','errorCode','4149789ctCKBE','):\x20','message','33867TeYAOl','140tbmDnJ','2472RPfzbd','execute','parent_segment\x20is\x20not\x20set.\x20Use\x20`tdx\x20sg\x20use\x20<parent_name>`\x20to\x20set\x20it.\x0a','segment:validate','\x20valid','Error:\x20','302208SfzGHw','validCount','description','53207EkitSj'];a38_0xf132=function(){return _0x2066f1;};return a38_0xf132();}const a38_0x4dc561=a38_0xc316;(function(_0x12d462,_0x26e6a3){const _0x283cda=a38_0xc316,_0x2ba6cd=_0x12d462();while(!![]){try{const _0x213471=-parseInt(_0x283cda(0x202))/0x1*(parseInt(_0x283cda(0x21f))/0x2)+-parseInt(_0x283cda(0x220))/0x3*(parseInt(_0x283cda(0x1f7))/0x4)+-parseInt(_0x283cda(0x20f))/0x5*(-parseInt(_0x283cda(0x216))/0x6)+parseInt(_0x283cda(0x20b))/0x7+parseInt(_0x283cda(0x210))/0x8*(-parseInt(_0x283cda(0x20e))/0x9)+-parseInt(_0x283cda(0x223))/0xa*(-parseInt(_0x283cda(0x219))/0xb)+parseInt(_0x283cda(0x208))/0xc;if(_0x213471===_0x26e6a3)break;else _0x2ba6cd['push'](_0x2ba6cd['shift']());}catch(_0x352869){_0x2ba6cd['push'](_0x2ba6cd['shift']());}}}(a38_0xf132,0xb479d));import{BaseCommand}from'./command.js';import{resolveTarget,isSuccessfulResolution}from'../sdk/segment/target-resolution.js';import{findYamlFiles}from'../sdk/segment/file-discovery.js';import{existsSync}from'fs';import a38_0x17a5af from'chalk';import{formatValidationResult}from'../sdk/segment/yaml-validator.js';import{validateYamlFiles,isValidationResult,calculateSummary}from'../sdk/segment/validate-files.js';function a38_0xc316(_0x4bf1c2,_0x442eab){_0x4bf1c2=_0x4bf1c2-0x1f3;const _0xf13212=a38_0xf132();let _0xc316ef=_0xf13212[_0x4bf1c2];return _0xc316ef;}export class SegmentValidateCommand extends BaseCommand{[a38_0x4dc561(0x204)]=a38_0x4dc561(0x213);[a38_0x4dc561(0x218)]='Validate\x20segment\x20and\x20journey\x20YAML\x20files';async[a38_0x4dc561(0x211)](_0x15b7f7){const _0x50a46c=a38_0x4dc561,{options:_0x152252,args:_0x39b88c}=_0x15b7f7,_0x49ca56=_0x152252,_0x52b4b2=await resolveTarget({'arg':_0x39b88c[0x0],'contextParent':_0x152252['parentSegment'],'cwd':process['cwd']()});if(!isSuccessfulResolution(_0x52b4b2))return _0x52b4b2[_0x50a46c(0x20a)]===_0x50a46c(0x1fa)?(console['error'](a38_0x17a5af['yellow'](_0x50a46c(0x212))),console[_0x50a46c(0x1fc)]('Usage:\x20tdx\x20sg\x20validate\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Validate\x20all\x20(requires\x20context)'),console[_0x50a46c(0x1fc)]('\x20\x20\x20\x20\x20\x20\x20tdx\x20sg\x20validate\x20.\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Validate\x20current\x20directory'),console['error']('\x20\x20\x20\x20\x20\x20\x20tdx\x20sg\x20validate\x20<file_path>\x20\x20#\x20Validate\x20specific\x20file')):(console['error'](a38_0x17a5af['red'](_0x50a46c(0x215)+_0x52b4b2[_0x50a46c(0x20d)]+'\x0a')),_0x52b4b2['helpText']&&console['error'](a38_0x17a5af[_0x50a46c(0x1fb)](_0x52b4b2['helpText']))),0x1;const _0x29e050=_0x52b4b2[_0x50a46c(0x201)],_0x234345=_0x52b4b2[_0x50a46c(0x200)]===_0x50a46c(0x21e)?_0x52b4b2[_0x50a46c(0x226)]:undefined;if(!_0x234345&&!existsSync(_0x29e050))return console[_0x50a46c(0x1fc)](a38_0x17a5af['red'](_0x50a46c(0x205)+_0x29e050+'\x0a')),0x1;let _0x5d0d6f;if(_0x234345){if(!_0x234345[_0x50a46c(0x21a)]('.yml')&&!_0x234345[_0x50a46c(0x21a)](_0x50a46c(0x225)))return console[_0x50a46c(0x1fc)](a38_0x17a5af[_0x50a46c(0x1f6)]('Error:\x20File\x20must\x20have\x20.yml\x20or\x20.yaml\x20extension:\x20'+_0x234345+'\x0a')),0x1;_0x5d0d6f=[_0x234345];}else _0x5d0d6f=findYamlFiles(_0x29e050);if(_0x5d0d6f[_0x50a46c(0x1f8)]===0x0)return console[_0x50a46c(0x1fc)](a38_0x17a5af[_0x50a46c(0x1f6)](_0x50a46c(0x1fd)+_0x29e050+'\x0a')),0x1;const _0x9bbac0=validateYamlFiles(_0x5d0d6f,_0x29e050),_0x3e839e=calculateSummary(_0x9bbac0);for(const _0x743b4d of _0x9bbac0){if(!isValidationResult(_0x743b4d))continue;const {relativePath:_0x1d23b2,source:_0x561638,result:_0x2a4db7,fileType:_0x54bffd}=_0x743b4d,_0x5d0096=_0x54bffd;if(_0x2a4db7[_0x50a46c(0x224)]&&_0x2a4db7[_0x50a46c(0x221)][_0x50a46c(0x1f8)]===0x0)_0x49ca56['verbose']&&console[_0x50a46c(0x1f5)](a38_0x17a5af['green']('✔\x20'+_0x1d23b2)+a38_0x17a5af['dim']('\x20('+_0x5d0096+')'));else _0x2a4db7[_0x50a46c(0x224)]?(console[_0x50a46c(0x1f5)](a38_0x17a5af['yellow']('⚠\x20'+_0x1d23b2)+a38_0x17a5af[_0x50a46c(0x1f4)]('\x20('+_0x5d0096+'):\x20'+_0x2a4db7['warnings']['length']+_0x50a46c(0x21c))),console['log'](formatValidationResult(_0x2a4db7,_0x561638,_0x1d23b2))):(console[_0x50a46c(0x1f5)](a38_0x17a5af[_0x50a46c(0x1f6)]('✖\x20'+_0x1d23b2)+a38_0x17a5af[_0x50a46c(0x1f4)]('\x20('+_0x5d0096+_0x50a46c(0x20c)+_0x2a4db7[_0x50a46c(0x1f9)][_0x50a46c(0x1f8)]+_0x50a46c(0x209))),console[_0x50a46c(0x1f5)](formatValidationResult(_0x2a4db7,_0x561638,_0x1d23b2)));}return console[_0x50a46c(0x1f5)](''),_0x3e839e[_0x50a46c(0x1f3)]?(console['log'](a38_0x17a5af['red'](_0x50a46c(0x1fe)+_0x3e839e[_0x50a46c(0x1ff)]+_0x50a46c(0x207)+_0x3e839e[_0x50a46c(0x217)]+_0x50a46c(0x214))),_0x3e839e[_0x50a46c(0x206)]>0x0&&console[_0x50a46c(0x1f5)](a38_0x17a5af[_0x50a46c(0x222)](_0x3e839e[_0x50a46c(0x206)]+_0x50a46c(0x21b))),0x1):(console['log'](a38_0x17a5af[_0x50a46c(0x21d)]('✔\x20All\x20'+_0x3e839e['validCount']+_0x50a46c(0x203))),_0x3e839e['warningCount']>0x0&&console['log'](a38_0x17a5af['yellow'](_0x3e839e[_0x50a46c(0x206)]+_0x50a46c(0x21b))),0x0);}}
1
+ const a38_0x2422ec=a38_0x1d35;(function(_0x58044c,_0x313277){const _0x359978=a38_0x1d35,_0x1dd323=_0x58044c();while(!![]){try{const _0x1836a4=parseInt(_0x359978(0x100))/0x1*(-parseInt(_0x359978(0xfc))/0x2)+parseInt(_0x359978(0xe5))/0x3*(parseInt(_0x359978(0xe8))/0x4)+parseInt(_0x359978(0x103))/0x5+-parseInt(_0x359978(0xd7))/0x6+parseInt(_0x359978(0xff))/0x7*(-parseInt(_0x359978(0xf5))/0x8)+parseInt(_0x359978(0xe3))/0x9*(parseInt(_0x359978(0xda))/0xa)+parseInt(_0x359978(0xe2))/0xb;if(_0x1836a4===_0x313277)break;else _0x1dd323['push'](_0x1dd323['shift']());}catch(_0x168d56){_0x1dd323['push'](_0x1dd323['shift']());}}}(a38_0x5f0e,0x3a803));import{BaseCommand}from'./command.js';import{resolveTarget,isSuccessfulResolution}from'../sdk/segment/target-resolution.js';import{findYamlFiles}from'../sdk/segment/file-discovery.js';function a38_0x5f0e(){const _0x285859=['\x20warning(s)','963805Rbysjd','Error:\x20Directory\x20not\x20found:\x20','file','errorCode','type','\x20\x20\x20\x20\x20\x20\x20tdx\x20sg\x20validate\x20.\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Validate\x20current\x20directory','.yaml','helpText','message','log','green','\x20file(s)\x20valid','Error:\x20','848226qfIEed','description','Error:\x20File\x20must\x20have\x20.yml\x20or\x20.yaml\x20extension:\x20','221830dEmSWr','parent_segment\x20is\x20not\x20set.\x20Use\x20`tdx\x20sg\x20use\x20<parent_name>`\x20to\x20set\x20it.\x0a','error','warningCount','valid','no_parent','execute','Validation\x20failed:\x20','4101460aAxmUj','189OUSkvj','\x20warning(s)\x20found','9201QahpzL','.yml','✔\x20All\x20','92fEpWOh','red','yellow','Error:\x20No\x20YAML\x20files\x20found\x20in\x20','\x20valid','warnings','errors','validCount','cwd','endsWith','verbose','name','\x20error(s)','8enCmjp','hasErrors','dim','):\x20','\x20file(s)\x20with\x20errors,\x20','segment:validate','Validate\x20segment\x20and\x20journey\x20YAML\x20files','40094PHADvj','length','Usage:\x20tdx\x20sg\x20validate\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Validate\x20all\x20(requires\x20context)','2661512QUsVWu','17OcvPxj','targetDir'];a38_0x5f0e=function(){return _0x285859;};return a38_0x5f0e();}import{existsSync}from'fs';function a38_0x1d35(_0x549894,_0x493309){_0x549894=_0x549894-0xd1;const _0x5f0e42=a38_0x5f0e();let _0x1d35da=_0x5f0e42[_0x549894];return _0x1d35da;}import a38_0x13a42b from'chalk';import{formatValidationResult}from'../sdk/segment/yaml-validator.js';import{validateYamlFiles,isValidationResult,calculateSummary}from'../sdk/segment/validate-files.js';export class SegmentValidateCommand extends BaseCommand{[a38_0x2422ec(0xf3)]=a38_0x2422ec(0xfa);[a38_0x2422ec(0xd8)]=a38_0x2422ec(0xfb);async[a38_0x2422ec(0xe0)](_0x121666){const _0x1527ff=a38_0x2422ec,{options:_0x444c81,args:_0x2fe88d}=_0x121666,_0x508fbd=_0x444c81,_0x36b0eb=await resolveTarget({'arg':_0x2fe88d[0x0],'contextParent':_0x444c81['parentSegment'],'cwd':process[_0x1527ff(0xf0)]()});if(!isSuccessfulResolution(_0x36b0eb))return _0x36b0eb[_0x1527ff(0x106)]===_0x1527ff(0xdf)?(console['error'](a38_0x13a42b[_0x1527ff(0xea)](_0x1527ff(0xdb))),console[_0x1527ff(0xdc)](_0x1527ff(0xfe)),console[_0x1527ff(0xdc)](_0x1527ff(0x108)),console[_0x1527ff(0xdc)]('\x20\x20\x20\x20\x20\x20\x20tdx\x20sg\x20validate\x20<file_path>\x20\x20#\x20Validate\x20specific\x20file')):(console['error'](a38_0x13a42b[_0x1527ff(0xe9)](_0x1527ff(0xd6)+_0x36b0eb[_0x1527ff(0xd2)]+'\x0a')),_0x36b0eb[_0x1527ff(0xd1)]&&console[_0x1527ff(0xdc)](a38_0x13a42b['cyan'](_0x36b0eb[_0x1527ff(0xd1)]))),0x1;const _0x35c282=_0x36b0eb[_0x1527ff(0x101)],_0xe7e025=_0x36b0eb[_0x1527ff(0x107)]===_0x1527ff(0x105)?_0x36b0eb['filePath']:undefined;if(!_0xe7e025&&!existsSync(_0x35c282))return console['error'](a38_0x13a42b[_0x1527ff(0xe9)](_0x1527ff(0x104)+_0x35c282+'\x0a')),0x1;let _0x1c1f7f;if(_0xe7e025){if(!_0xe7e025[_0x1527ff(0xf1)](_0x1527ff(0xe6))&&!_0xe7e025[_0x1527ff(0xf1)](_0x1527ff(0x109)))return console['error'](a38_0x13a42b[_0x1527ff(0xe9)](_0x1527ff(0xd9)+_0xe7e025+'\x0a')),0x1;_0x1c1f7f=[_0xe7e025];}else _0x1c1f7f=findYamlFiles(_0x35c282);if(_0x1c1f7f[_0x1527ff(0xfd)]===0x0)return console[_0x1527ff(0xdc)](a38_0x13a42b['red'](_0x1527ff(0xeb)+_0x35c282+'\x0a')),0x1;const _0x41cd4b=validateYamlFiles(_0x1c1f7f,_0x35c282),_0x28de85=calculateSummary(_0x41cd4b);for(const _0x5342f4 of _0x41cd4b){if(!isValidationResult(_0x5342f4))continue;const {relativePath:_0x37c5c5,source:_0x537aee,result:_0x3bae4b,fileType:_0x1c873b}=_0x5342f4,_0x5b2108=_0x1c873b;if(_0x3bae4b[_0x1527ff(0xde)]&&_0x3bae4b['warnings']['length']===0x0)_0x508fbd[_0x1527ff(0xf2)]&&console[_0x1527ff(0xd3)](a38_0x13a42b[_0x1527ff(0xd4)]('✔\x20'+_0x37c5c5)+a38_0x13a42b[_0x1527ff(0xf7)]('\x20('+_0x5b2108+')'));else _0x3bae4b[_0x1527ff(0xde)]?(console[_0x1527ff(0xd3)](a38_0x13a42b[_0x1527ff(0xea)]('⚠\x20'+_0x37c5c5)+a38_0x13a42b[_0x1527ff(0xf7)]('\x20('+_0x5b2108+_0x1527ff(0xf8)+_0x3bae4b[_0x1527ff(0xed)][_0x1527ff(0xfd)]+_0x1527ff(0x102))),console[_0x1527ff(0xd3)](formatValidationResult(_0x3bae4b,_0x537aee,_0x37c5c5))):(console[_0x1527ff(0xd3)](a38_0x13a42b[_0x1527ff(0xe9)]('✖\x20'+_0x37c5c5)+a38_0x13a42b[_0x1527ff(0xf7)]('\x20('+_0x5b2108+_0x1527ff(0xf8)+_0x3bae4b[_0x1527ff(0xee)][_0x1527ff(0xfd)]+_0x1527ff(0xf4))),console['log'](formatValidationResult(_0x3bae4b,_0x537aee,_0x37c5c5)));}return console['log'](''),_0x28de85[_0x1527ff(0xf6)]?(console[_0x1527ff(0xd3)](a38_0x13a42b[_0x1527ff(0xe9)](_0x1527ff(0xe1)+_0x28de85['invalidCount']+_0x1527ff(0xf9)+_0x28de85[_0x1527ff(0xef)]+_0x1527ff(0xec))),_0x28de85['warningCount']>0x0&&console[_0x1527ff(0xd3)](a38_0x13a42b[_0x1527ff(0xea)](_0x28de85[_0x1527ff(0xdd)]+_0x1527ff(0xe4))),0x1):(console[_0x1527ff(0xd3)](a38_0x13a42b[_0x1527ff(0xd4)](_0x1527ff(0xe7)+_0x28de85[_0x1527ff(0xef)]+_0x1527ff(0xd5))),_0x28de85['warningCount']>0x0&&console['log'](a38_0x13a42b[_0x1527ff(0xea)](_0x28de85[_0x1527ff(0xdd)]+_0x1527ff(0xe4))),0x0);}}
@@ -1 +1 @@
1
- function a39_0x229e(_0x42a075,_0x1d51a5){_0x42a075=_0x42a075-0x1a9;const _0x3bfa89=a39_0x3bfa();let _0x229e72=_0x3bfa89[_0x42a075];return _0x229e72;}const a39_0x302f6c=a39_0x229e;(function(_0x3ccfc6,_0x2f9690){const _0x32361a=a39_0x229e,_0x137815=_0x3ccfc6();while(!![]){try{const _0x4a61b2=-parseInt(_0x32361a(0x1aa))/0x1*(-parseInt(_0x32361a(0x1d9))/0x2)+-parseInt(_0x32361a(0x1b0))/0x3*(parseInt(_0x32361a(0x1d5))/0x4)+-parseInt(_0x32361a(0x1ab))/0x5+parseInt(_0x32361a(0x1e6))/0x6+-parseInt(_0x32361a(0x1d0))/0x7*(parseInt(_0x32361a(0x1c0))/0x8)+-parseInt(_0x32361a(0x1ae))/0x9+parseInt(_0x32361a(0x1d7))/0xa*(parseInt(_0x32361a(0x1b7))/0xb);if(_0x4a61b2===_0x2f9690)break;else _0x137815['push'](_0x137815['shift']());}catch(_0x222744){_0x137815['push'](_0x137815['shift']());}}}(a39_0x3bfa,0x8e155));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleSDKOutput}from'../core/command-output.js';import{withSpinner}from'../utils/spinner.js';import{formatFlatList,formatTree}from'../sdk/util/tree-formatter.js';import{getConsoleNextUrl}from'../sdk/client/endpoints.js';import a39_0x316d8a from'chalk';export class SegmentsCommand extends BaseCommand{[a39_0x302f6c(0x1eb)]=a39_0x302f6c(0x1c4);[a39_0x302f6c(0x1ee)]=a39_0x302f6c(0x1e2);async[a39_0x302f6c(0x1cc)](_0x2e6fca){const _0x1acf1d=a39_0x302f6c,{options:_0x1e9e8a,args:_0x3d8713}=_0x2e6fca,_0x41caa3=_0x1e9e8a['recursive'],_0x1e9cfc=_0x3d8713[0x0];try{const _0x213588=_0x1e9e8a[_0x1acf1d(0x1bf)];_0x1e9e8a[_0x1acf1d(0x1bc)]&&(console['error'](_0x1acf1d(0x1c8)+_0x1e9e8a[_0x1acf1d(0x1ea)]),console['error'](_0x1acf1d(0x1dc)+(_0x213588||_0x1acf1d(0x1bd))),_0x1e9cfc&&console['error']('Folder/pattern\x20arg:\x20'+_0x1e9cfc),_0x41caa3&&console['error'](_0x1acf1d(0x1a9)));if(!_0x213588)return console[_0x1acf1d(0x1c9)](_0x1acf1d(0x1f7)),console['error'](''),console[_0x1acf1d(0x1c9)](_0x1acf1d(0x1ce)),console[_0x1acf1d(0x1c9)]('\x20\x20tdx\x20sg\x20pull\x20\x22My\x20Audience\x22'),console[_0x1acf1d(0x1c9)](_0x1acf1d(0x1df)),console[_0x1acf1d(0x1c9)](''),console[_0x1acf1d(0x1c9)](_0x1acf1d(0x1bb)),0x1;const _0x14abc7=_0x1e9cfc&&(_0x1e9cfc[_0x1acf1d(0x1e1)]('*')||_0x1e9cfc[_0x1acf1d(0x1e1)]('?'));if(_0x14abc7)return await this[_0x1acf1d(0x1e8)](_0x2e6fca,_0x213588,_0x1e9cfc);const _0x4a21a8=_0x1e9cfc?_0x213588+'/'+_0x1e9cfc:_0x213588;return _0x41caa3?await this[_0x1acf1d(0x1de)](_0x2e6fca,_0x4a21a8):await this['listUnified'](_0x2e6fca,_0x4a21a8);}catch(_0xf24176){if(_0xf24176 instanceof SDKError)return console[_0x1acf1d(0x1c9)](_0x1acf1d(0x1c3)+_0xf24176[_0x1acf1d(0x1c2)]),_0xf24176[_0x1acf1d(0x1b2)]&&console[_0x1acf1d(0x1c9)](_0x1acf1d(0x1db)+_0xf24176[_0x1acf1d(0x1b2)]),0x1;throw _0xf24176;}}async[a39_0x302f6c(0x1e8)](_0x4ad1c7,_0x4542a1,_0x1c5d42){const _0x1fe6d8=a39_0x302f6c,{options:_0xf1c58c,tdx:_0x598973}=_0x4ad1c7,_0x4103e0=await withSpinner(_0x1fe6d8(0x1ed)+_0x4542a1+_0x1fe6d8(0x1cf),()=>_0x598973[_0x1fe6d8(0x1f8)][_0x1fe6d8(0x1ec)](_0x4542a1),{'verbose':_0xf1c58c[_0x1fe6d8(0x1bc)]}),_0x246f03=_0x4103e0[_0x1fe6d8(0x1f0)],_0x29abdf=await withSpinner('Listing\x20folders,\x20segments,\x20and\x20journeys...',()=>_0x598973[_0x1fe6d8(0x1f8)][_0x1fe6d8(0x1d3)](_0x246f03[_0x1fe6d8(0x1f5)],_0x246f03[_0x1fe6d8(0x1b1)]),{'verbose':_0xf1c58c['verbose']}),{folders:_0xc2bc43,segments:_0x5570ef,journeys:_0x447fe2}=_0x29abdf['data'],_0xd7c2c0=_0x1c5d42[_0x1fe6d8(0x1c5)](/[.+^${}()|[\]\\]/g,_0x1fe6d8(0x1e7))[_0x1fe6d8(0x1c5)](/\*/g,'.*')[_0x1fe6d8(0x1c5)](/\?/g,'.'),_0x2158f9=new RegExp('^'+_0xd7c2c0+'$','i'),_0x2074ac=_0xc2bc43['filter'](_0x15bf96=>_0x2158f9['test'](_0x15bf96[_0x1fe6d8(0x1eb)])),_0x28ed66=_0x5570ef[_0x1fe6d8(0x1dd)](_0x360f19=>_0x2158f9[_0x1fe6d8(0x1cd)](_0x360f19[_0x1fe6d8(0x1eb)])),_0x4965c0=_0x447fe2[_0x1fe6d8(0x1dd)](_0x229e88=>_0x2158f9['test'](_0x229e88[_0x1fe6d8(0x1b5)])),_0x45ffe7=_0x2074ac[_0x1fe6d8(0x1d8)]+_0x28ed66[_0x1fe6d8(0x1d8)]+_0x4965c0[_0x1fe6d8(0x1d8)];console['error'](_0x1fe6d8(0x1f4)+_0x2074ac['length']+'\x20folder'+(_0x2074ac['length']!==0x1?'s':'')+',\x20'+_0x28ed66[_0x1fe6d8(0x1d8)]+_0x1fe6d8(0x1c1)+(_0x28ed66[_0x1fe6d8(0x1d8)]!==0x1?'s':'')+',\x20and\x20'+_0x4965c0[_0x1fe6d8(0x1d8)]+_0x1fe6d8(0x1be)+(_0x4965c0[_0x1fe6d8(0x1d8)]!==0x1?'s':'')+_0x1fe6d8(0x1b6)+_0x1c5d42+'\x27');const _0xf12e6d=_0x10036b=>{const _0x2ff8c8=_0x1fe6d8;return getConsoleNextUrl(_0xf1c58c[_0x2ff8c8(0x1ea)],_0x2ff8c8(0x1f9)+_0x246f03[_0x2ff8c8(0x1f5)]+_0x2ff8c8(0x1ac)+_0x10036b);},_0x535ad7=_0xf1c58c[_0x1fe6d8(0x1b4)]==='json'||_0xf1c58c[_0x1fe6d8(0x1b4)]===_0x1fe6d8(0x1c7);if(_0x535ad7){const _0x15e374=[..._0x2074ac['map'](_0x3fdfa2=>({..._0x3fdfa2,'type':'folder'})),..._0x28ed66[_0x1fe6d8(0x1e9)](_0x2e9a0f=>({..._0x2e9a0f,'type':'segment','url':_0xf12e6d(_0x2e9a0f['id'])})),..._0x4965c0[_0x1fe6d8(0x1e9)](_0x32fd47=>({..._0x32fd47,'name':_0x32fd47[_0x1fe6d8(0x1b5)],'type':_0x1fe6d8(0x1d2)}))][_0x1fe6d8(0x1f1)]((_0x56f28c,_0x2d0e0a)=>_0x56f28c[_0x1fe6d8(0x1eb)][_0x1fe6d8(0x1d6)](_0x2d0e0a[_0x1fe6d8(0x1eb)]));await handleSDKOutput(_0x15e374,_0xf1c58c);}else{if(_0x45ffe7===0x0)console['log'](_0x1fe6d8(0x1f3)+_0x1c5d42);else{console[_0x1fe6d8(0x1cb)](a39_0x316d8a[_0x1fe6d8(0x1e3)]('['+_0x4542a1+_0x1fe6d8(0x1ef)+_0x1c5d42+'\x27'));const _0x5e60b4=formatFlatList(_0x2074ac,_0x28ed66,{'showMetadata':!![],'getSegmentUrl':_0xf12e6d},_0x4965c0);console[_0x1fe6d8(0x1cb)](_0x5e60b4);}}return 0x0;}async[a39_0x302f6c(0x1e5)](_0x48acd1,_0x546588){const _0x2a2be0=a39_0x302f6c,{options:_0x27fab9,tdx:_0x55000d}=_0x48acd1,_0x4b43fd=await withSpinner(_0x2a2be0(0x1c6)+_0x546588+_0x2a2be0(0x1cf),()=>_0x55000d['segment']['resolvePathToResource'](_0x546588),{'verbose':_0x27fab9['verbose']}),_0xf9a284=_0x4b43fd[_0x2a2be0(0x1f0)];_0x27fab9[_0x2a2be0(0x1bc)]&&(console['error'](_0x2a2be0(0x1d4)+_0xf9a284[_0x2a2be0(0x1f5)]),_0xf9a284[_0x2a2be0(0x1b1)]&&console['error']('Folder\x20ID:\x20'+_0xf9a284[_0x2a2be0(0x1b1)]));const _0x426b31=await withSpinner(_0x2a2be0(0x1b8),()=>_0x55000d[_0x2a2be0(0x1f8)][_0x2a2be0(0x1d3)](_0xf9a284['parentId'],_0xf9a284[_0x2a2be0(0x1b1)]),{'verbose':_0x27fab9[_0x2a2be0(0x1bc)]}),{folders:_0x264e8b,segments:_0x413ec0,journeys:_0x3b4695}=_0x426b31[_0x2a2be0(0x1f0)],_0x567d2b=_0x264e8b[_0x2a2be0(0x1d8)]+_0x413ec0[_0x2a2be0(0x1d8)]+_0x3b4695['length'];console[_0x2a2be0(0x1c9)](_0x2a2be0(0x1f4)+_0x264e8b[_0x2a2be0(0x1d8)]+_0x2a2be0(0x1b9)+(_0x264e8b[_0x2a2be0(0x1d8)]!==0x1?'s':'')+',\x20'+_0x413ec0[_0x2a2be0(0x1d8)]+_0x2a2be0(0x1c1)+(_0x413ec0['length']!==0x1?'s':'')+_0x2a2be0(0x1ca)+_0x3b4695['length']+_0x2a2be0(0x1be)+(_0x3b4695[_0x2a2be0(0x1d8)]!==0x1?'s':''));const _0x1a3575=_0x17e82f=>{const _0x21fd9f=_0x2a2be0;return getConsoleNextUrl(_0x27fab9[_0x21fd9f(0x1ea)],'/app/ps/'+_0xf9a284[_0x21fd9f(0x1f5)]+_0x21fd9f(0x1ac)+_0x17e82f);},_0x3c12c1=_0x4c84c3=>{const _0x1618ad=_0x2a2be0;return getConsoleNextUrl(_0x27fab9[_0x1618ad(0x1ea)],_0x1618ad(0x1f9)+_0xf9a284['parentId']+_0x1618ad(0x1ac)+_0x4c84c3+_0x1618ad(0x1af));},_0x5b7953=_0x27fab9[_0x2a2be0(0x1b4)]==='json'||_0x27fab9[_0x2a2be0(0x1b4)]===_0x2a2be0(0x1c7);if(_0x5b7953){const _0xae926b=[..._0x264e8b['map'](_0x486efb=>({..._0x486efb,'type':_0x2a2be0(0x1da)})),..._0x413ec0[_0x2a2be0(0x1e9)](_0x48fad3=>({..._0x48fad3,'type':_0x2a2be0(0x1f8),'url':_0x1a3575(_0x48fad3['id'])})),..._0x3b4695[_0x2a2be0(0x1e9)](_0x9ea29b=>({..._0x9ea29b,'name':_0x9ea29b[_0x2a2be0(0x1b5)],'type':_0x2a2be0(0x1d2),'url':_0x3c12c1(_0x9ea29b['id'])}))]['sort']((_0x278e3d,_0x7adec5)=>_0x278e3d[_0x2a2be0(0x1eb)][_0x2a2be0(0x1d6)](_0x7adec5[_0x2a2be0(0x1eb)]));await handleSDKOutput(_0xae926b,_0x27fab9);}else{if(_0x567d2b===0x0)console[_0x2a2be0(0x1cb)](a39_0x316d8a[_0x2a2be0(0x1e3)]('['+_0x546588+']')),console['log']('(empty)');else{console[_0x2a2be0(0x1cb)](a39_0x316d8a['dim']('['+_0x546588+']'));const _0xfee867=formatFlatList(_0x264e8b,_0x413ec0,{'showMetadata':!![],'getSegmentUrl':_0x1a3575,'getJourneyUrl':_0x3c12c1},_0x3b4695);console[_0x2a2be0(0x1cb)](_0xfee867);}}return 0x0;}async['listRecursive'](_0x5efd27,_0x2328de){const _0x37599a=a39_0x302f6c,{options:_0x3cb16d,tdx:_0x102df7}=_0x5efd27,_0x24dd1e=await withSpinner('Resolving\x20path\x20\x27'+_0x2328de+_0x37599a(0x1cf),()=>_0x102df7[_0x37599a(0x1f8)][_0x37599a(0x1ec)](_0x2328de),{'verbose':_0x3cb16d['verbose']}),_0x4ed5c5=_0x24dd1e[_0x37599a(0x1f0)];_0x3cb16d[_0x37599a(0x1bc)]&&(console[_0x37599a(0x1c9)](_0x37599a(0x1d4)+_0x4ed5c5[_0x37599a(0x1f5)]),_0x4ed5c5[_0x37599a(0x1b1)]&&console[_0x37599a(0x1c9)](_0x37599a(0x1f2)+_0x4ed5c5['folderId']));const _0xea5e8e=_0x3cb16d[_0x37599a(0x1e4)]||0xa,_0x439437=await withSpinner(_0x37599a(0x1f6),()=>_0x102df7[_0x37599a(0x1f8)][_0x37599a(0x1de)](_0x4ed5c5['parentId'],_0x4ed5c5[_0x37599a(0x1b1)],0x0,_0xea5e8e),{'verbose':_0x3cb16d[_0x37599a(0x1bc)]}),_0x4d05f6=_0x439437['data'],_0x3ac5af=_0x38acca=>{const _0x1a8584=_0x37599a;let _0x48f055=0x0,_0x3bbdf9=0x0,_0x3ffb9b=0x0;for(const _0x4e466e of _0x38acca){if(_0x4e466e['type']===_0x1a8584(0x1da))_0x48f055++;else{if(_0x4e466e[_0x1a8584(0x1fa)]===_0x1a8584(0x1f8))_0x3bbdf9++;else{if(_0x4e466e[_0x1a8584(0x1fa)]===_0x1a8584(0x1d2))_0x3ffb9b++;}}if(_0x4e466e[_0x1a8584(0x1e0)]){const _0xf60b34=_0x3ac5af(_0x4e466e[_0x1a8584(0x1e0)]);_0x48f055+=_0xf60b34[_0x1a8584(0x1b3)],_0x3bbdf9+=_0xf60b34[_0x1a8584(0x1c4)],_0x3ffb9b+=_0xf60b34['journeys'];}}return{'folders':_0x48f055,'segments':_0x3bbdf9,'journeys':_0x3ffb9b};},_0x55b63c=_0x3ac5af(_0x4d05f6);console[_0x37599a(0x1c9)](_0x37599a(0x1ba)+_0x55b63c[_0x37599a(0x1b3)]+_0x37599a(0x1b9)+(_0x55b63c[_0x37599a(0x1b3)]!==0x1?'s':'')+',\x20'+_0x55b63c[_0x37599a(0x1c4)]+'\x20segment'+(_0x55b63c['segments']!==0x1?'s':'')+_0x37599a(0x1ca)+_0x55b63c[_0x37599a(0x1d1)]+_0x37599a(0x1be)+(_0x55b63c[_0x37599a(0x1d1)]!==0x1?'s':''));const _0x51819=_0x192449=>{const _0xf65eeb=_0x37599a;return getConsoleNextUrl(_0x3cb16d[_0xf65eeb(0x1ea)],_0xf65eeb(0x1f9)+_0x4ed5c5['parentId']+'/e/'+_0x192449);},_0x474893=_0x1abec7=>{const _0x55974c=_0x37599a;return getConsoleNextUrl(_0x3cb16d[_0x55974c(0x1ea)],'/app/ps/'+_0x4ed5c5['parentId']+_0x55974c(0x1ac)+_0x1abec7+_0x55974c(0x1af));};if(_0x3cb16d['format']===_0x37599a(0x1ad)||_0x3cb16d['format']===_0x37599a(0x1c7))await handleSDKOutput(_0x4d05f6,_0x3cb16d);else{console['log'](a39_0x316d8a[_0x37599a(0x1e3)]('['+_0x2328de+']'));const _0x133ccd=formatTree(_0x4d05f6,{'showMetadata':!![],'getSegmentUrl':_0x51819,'getJourneyUrl':_0x474893});console[_0x37599a(0x1cb)](_0x133ccd);}return 0x0;}}function a39_0x3bfa(){const _0x368998=['Recursive\x20mode:\x20enabled','1060355JSNSJH','419240PDQQYH','/e/','json','9911223jkeZUV','/j/da','1461462gUlRdl','folderId','cause','folders','format','journeyBundleName','\x20matching\x20\x27','312719anCfOp','Listing\x20folders,\x20segments,\x20and\x20journeys...','\x20folder','✔\x20Built\x20tree\x20with\x20','Use\x20tdx\x20ps\x20list\x20to\x20see\x20available\x20parent\x20segments.','verbose','(not\x20set)','\x20journey','parentSegment','40952NgvAPJ','\x20segment','message','Error:\x20','segments','replace','Resolving\x20path\x20\x27','jsonl','Site:\x20','error',',\x20and\x20','log','execute','test','Set\x20a\x20parent\x20segment\x20context\x20first:','\x27...','7iMpBvB','journeys','journey','listUnifiedWithJourneys','Parent\x20ID:\x20','4ccwsfX','localeCompare','150begiHY','length','2YomyzU','folder','\x20\x20Cause:\x20','Parent\x20segment\x20context:\x20','filter','listRecursive','\x20\x20tdx\x20sg\x20use\x20\x22My\x20Audience\x22','children','includes','List\x20folders\x20and\x20child\x20segments','dim','maxDepth','listUnified','4635306pUquuW','\x5c$&','listWithPattern','map','site','name','resolvePathToResource','Resolving\x20parent\x20segment\x20\x27','description',']\x20matching\x20\x27','data','sort','Folder\x20ID:\x20','No\x20items\x20match\x20pattern:\x20','✔\x20Found\x20','parentId','Building\x20hierarchy\x20tree...','Error:\x20No\x20parent\x20segment\x20context\x20set.','segment','/app/ps/','type'];a39_0x3bfa=function(){return _0x368998;};return a39_0x3bfa();}
1
+ const a39_0x5b33b1=a39_0x46d4;function a39_0x46d4(_0x5002ff,_0x55e69d){_0x5002ff=_0x5002ff-0x12b;const _0xa953c8=a39_0xa953();let _0x46d4d5=_0xa953c8[_0x5002ff];return _0x46d4d5;}(function(_0x23b622,_0x2338e9){const _0x43fb84=a39_0x46d4,_0x5be167=_0x23b622();while(!![]){try{const _0x138fb3=-parseInt(_0x43fb84(0x164))/0x1*(-parseInt(_0x43fb84(0x158))/0x2)+-parseInt(_0x43fb84(0x130))/0x3*(-parseInt(_0x43fb84(0x12e))/0x4)+parseInt(_0x43fb84(0x171))/0x5*(-parseInt(_0x43fb84(0x14f))/0x6)+-parseInt(_0x43fb84(0x153))/0x7+-parseInt(_0x43fb84(0x154))/0x8+parseInt(_0x43fb84(0x16e))/0x9+-parseInt(_0x43fb84(0x14d))/0xa*(-parseInt(_0x43fb84(0x15e))/0xb);if(_0x138fb3===_0x2338e9)break;else _0x5be167['push'](_0x5be167['shift']());}catch(_0x2670f4){_0x5be167['push'](_0x5be167['shift']());}}}(a39_0xa953,0x9c500));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';function a39_0xa953(){const _0x1d576b=['replace','listRecursive','name','Folder/pattern\x20arg:\x20','\x5c$&','length','✔\x20Built\x20tree\x20with\x20','journeyBundleName','\x20\x20tdx\x20sg\x20pull\x20\x22My\x20Audience\x22','message','Resolving\x20path\x20\x27','verbose','\x20\x20tdx\x20sg\x20use\x20\x22My\x20Audience\x22','Site:\x20','parentId','resolvePathToResource','(empty)','recursive','dim','/j/da','/e/','test','jsonl','data','parentSegment','Use\x20tdx\x20ps\x20list\x20to\x20see\x20available\x20parent\x20segments.','24727330aCLHcI','type','6UEGvCF',']\x20matching\x20\x27','\x20\x20Cause:\x20','log','6884269qTRKBV','5001936beVNbG','✔\x20Found\x20','No\x20items\x20match\x20pattern:\x20','\x20matching\x20\x27','2BKKjFm','journey','\x20journey','\x20folder','Building\x20hierarchy\x20tree...','Error:\x20No\x20parent\x20segment\x20context\x20set.','11KEbjwE','Error:\x20','error','/app/ps/','map','Parent\x20segment\x20context:\x20','151252tdXcEi','localeCompare','listUnified','\x27...','site','sort','json','folderId','\x20segment','Set\x20a\x20parent\x20segment\x20context\x20first:','1691964HMtqCI','journeys','cause','3042315eeglLD','Listing\x20folders,\x20segments,\x20and\x20journeys...','segments','folders','listWithPattern','List\x20folders\x20and\x20child\x20segments','Resolving\x20parent\x20segment\x20\x27','children','segment','filter','folder','format','181788OWmjhk','Parent\x20ID:\x20','3dhJFAT','Recursive\x20mode:\x20enabled',',\x20and\x20'];a39_0xa953=function(){return _0x1d576b;};return a39_0xa953();}import{handleSDKOutput}from'../core/command-output.js';import{withSpinner}from'../utils/spinner.js';import{formatFlatList,formatTree}from'../sdk/util/tree-formatter.js';import{getConsoleNextUrl}from'../sdk/client/endpoints.js';import a39_0x159aa7 from'chalk';export class SegmentsCommand extends BaseCommand{['name']=a39_0x5b33b1(0x173);['description']=a39_0x5b33b1(0x176);async['execute'](_0xc7ae90){const _0x3a11c5=a39_0x5b33b1,{options:_0x2b91b1,args:_0x149d65}=_0xc7ae90,_0x1c13a1=_0x2b91b1[_0x3a11c5(0x144)],_0x475874=_0x149d65[0x0];try{const _0x122cff=_0x2b91b1[_0x3a11c5(0x14b)];_0x2b91b1[_0x3a11c5(0x13e)]&&(console[_0x3a11c5(0x160)](_0x3a11c5(0x140)+_0x2b91b1[_0x3a11c5(0x168)]),console['error'](_0x3a11c5(0x163)+(_0x122cff||'(not\x20set)')),_0x475874&&console[_0x3a11c5(0x160)](_0x3a11c5(0x136)+_0x475874),_0x1c13a1&&console[_0x3a11c5(0x160)](_0x3a11c5(0x131)));if(!_0x122cff)return console[_0x3a11c5(0x160)](_0x3a11c5(0x15d)),console['error'](''),console[_0x3a11c5(0x160)](_0x3a11c5(0x16d)),console[_0x3a11c5(0x160)](_0x3a11c5(0x13b)),console[_0x3a11c5(0x160)](_0x3a11c5(0x13f)),console['error'](''),console[_0x3a11c5(0x160)](_0x3a11c5(0x14c)),0x1;const _0x2c0c27=_0x475874&&(_0x475874['includes']('*')||_0x475874['includes']('?'));if(_0x2c0c27)return await this['listWithPattern'](_0xc7ae90,_0x122cff,_0x475874);const _0x4346c0=_0x475874?_0x122cff+'/'+_0x475874:_0x122cff;return _0x1c13a1?await this[_0x3a11c5(0x134)](_0xc7ae90,_0x4346c0):await this[_0x3a11c5(0x166)](_0xc7ae90,_0x4346c0);}catch(_0x682c4f){if(_0x682c4f instanceof SDKError)return console['error'](_0x3a11c5(0x15f)+_0x682c4f[_0x3a11c5(0x13c)]),_0x682c4f[_0x3a11c5(0x170)]&&console[_0x3a11c5(0x160)](_0x3a11c5(0x151)+_0x682c4f[_0x3a11c5(0x170)]),0x1;throw _0x682c4f;}}async[a39_0x5b33b1(0x175)](_0x4a8388,_0x547165,_0x262669){const _0xc95752=a39_0x5b33b1,{options:_0x4da334,tdx:_0x39f633}=_0x4a8388,_0x4d72cc=await withSpinner(_0xc95752(0x177)+_0x547165+_0xc95752(0x167),()=>_0x39f633[_0xc95752(0x179)][_0xc95752(0x142)](_0x547165),{'verbose':_0x4da334[_0xc95752(0x13e)]}),_0x32f327=_0x4d72cc['data'],_0x4e1d0e=await withSpinner('Listing\x20folders,\x20segments,\x20and\x20journeys...',()=>_0x39f633['segment']['listUnifiedWithJourneys'](_0x32f327[_0xc95752(0x141)],_0x32f327[_0xc95752(0x16b)]),{'verbose':_0x4da334[_0xc95752(0x13e)]}),{folders:_0x3fe161,segments:_0x3672c8,journeys:_0x1a5b5b}=_0x4e1d0e['data'],_0x50a6ed=_0x262669[_0xc95752(0x133)](/[.+^${}()|[\]\\]/g,_0xc95752(0x137))[_0xc95752(0x133)](/\*/g,'.*')[_0xc95752(0x133)](/\?/g,'.'),_0x30f87f=new RegExp('^'+_0x50a6ed+'$','i'),_0x4f31d4=_0x3fe161[_0xc95752(0x12b)](_0x24aff7=>_0x30f87f[_0xc95752(0x148)](_0x24aff7[_0xc95752(0x135)])),_0x4a1906=_0x3672c8[_0xc95752(0x12b)](_0x4234b5=>_0x30f87f[_0xc95752(0x148)](_0x4234b5[_0xc95752(0x135)])),_0x2912a0=_0x1a5b5b[_0xc95752(0x12b)](_0x30e033=>_0x30f87f['test'](_0x30e033[_0xc95752(0x13a)])),_0x33cde8=_0x4f31d4[_0xc95752(0x138)]+_0x4a1906[_0xc95752(0x138)]+_0x2912a0[_0xc95752(0x138)];console[_0xc95752(0x160)](_0xc95752(0x155)+_0x4f31d4['length']+_0xc95752(0x15b)+(_0x4f31d4[_0xc95752(0x138)]!==0x1?'s':'')+',\x20'+_0x4a1906[_0xc95752(0x138)]+_0xc95752(0x16c)+(_0x4a1906[_0xc95752(0x138)]!==0x1?'s':'')+',\x20and\x20'+_0x2912a0['length']+_0xc95752(0x15a)+(_0x2912a0[_0xc95752(0x138)]!==0x1?'s':'')+_0xc95752(0x157)+_0x262669+'\x27');const _0x239445=_0x553471=>{const _0x38ddcb=_0xc95752;return getConsoleNextUrl(_0x4da334[_0x38ddcb(0x168)],_0x38ddcb(0x161)+_0x32f327['parentId']+_0x38ddcb(0x147)+_0x553471);},_0x447b79=_0x4da334[_0xc95752(0x12d)]===_0xc95752(0x16a)||_0x4da334['format']===_0xc95752(0x149);if(_0x447b79){const _0x1469e6=[..._0x4f31d4[_0xc95752(0x162)](_0x24204a=>({..._0x24204a,'type':_0xc95752(0x12c)})),..._0x4a1906[_0xc95752(0x162)](_0x32be1f=>({..._0x32be1f,'type':'segment','url':_0x239445(_0x32be1f['id'])})),..._0x2912a0[_0xc95752(0x162)](_0x6751f2=>({..._0x6751f2,'name':_0x6751f2[_0xc95752(0x13a)],'type':_0xc95752(0x159)}))][_0xc95752(0x169)]((_0x295b70,_0x379507)=>_0x295b70['name']['localeCompare'](_0x379507[_0xc95752(0x135)]));await handleSDKOutput(_0x1469e6,_0x4da334);}else{if(_0x33cde8===0x0)console[_0xc95752(0x152)](_0xc95752(0x156)+_0x262669);else{console[_0xc95752(0x152)](a39_0x159aa7[_0xc95752(0x145)]('['+_0x547165+_0xc95752(0x150)+_0x262669+'\x27'));const _0x72f31=formatFlatList(_0x4f31d4,_0x4a1906,{'showMetadata':!![],'getSegmentUrl':_0x239445},_0x2912a0);console[_0xc95752(0x152)](_0x72f31);}}return 0x0;}async['listUnified'](_0x3afb00,_0x2b746f){const _0x16de15=a39_0x5b33b1,{options:_0x3cb141,tdx:_0xf5f9fe}=_0x3afb00,_0x3c0af8=await withSpinner(_0x16de15(0x13d)+_0x2b746f+_0x16de15(0x167),()=>_0xf5f9fe[_0x16de15(0x179)]['resolvePathToResource'](_0x2b746f),{'verbose':_0x3cb141['verbose']}),_0x226262=_0x3c0af8['data'];_0x3cb141[_0x16de15(0x13e)]&&(console[_0x16de15(0x160)](_0x16de15(0x12f)+_0x226262[_0x16de15(0x141)]),_0x226262[_0x16de15(0x16b)]&&console[_0x16de15(0x160)]('Folder\x20ID:\x20'+_0x226262[_0x16de15(0x16b)]));const _0x2ef7d5=await withSpinner(_0x16de15(0x172),()=>_0xf5f9fe[_0x16de15(0x179)]['listUnifiedWithJourneys'](_0x226262['parentId'],_0x226262[_0x16de15(0x16b)]),{'verbose':_0x3cb141[_0x16de15(0x13e)]}),{folders:_0x2ed58a,segments:_0x5ba9ef,journeys:_0xdf90d6}=_0x2ef7d5[_0x16de15(0x14a)],_0x142e9e=_0x2ed58a[_0x16de15(0x138)]+_0x5ba9ef['length']+_0xdf90d6[_0x16de15(0x138)];console[_0x16de15(0x160)](_0x16de15(0x155)+_0x2ed58a[_0x16de15(0x138)]+_0x16de15(0x15b)+(_0x2ed58a[_0x16de15(0x138)]!==0x1?'s':'')+',\x20'+_0x5ba9ef[_0x16de15(0x138)]+'\x20segment'+(_0x5ba9ef[_0x16de15(0x138)]!==0x1?'s':'')+',\x20and\x20'+_0xdf90d6[_0x16de15(0x138)]+_0x16de15(0x15a)+(_0xdf90d6['length']!==0x1?'s':''));const _0x58ab2a=_0x365ecb=>{const _0x4e522e=_0x16de15;return getConsoleNextUrl(_0x3cb141[_0x4e522e(0x168)],'/app/ps/'+_0x226262[_0x4e522e(0x141)]+_0x4e522e(0x147)+_0x365ecb);},_0x14e3f9=_0x5f531b=>{const _0xeb8ec9=_0x16de15;return getConsoleNextUrl(_0x3cb141['site'],_0xeb8ec9(0x161)+_0x226262[_0xeb8ec9(0x141)]+_0xeb8ec9(0x147)+_0x5f531b+'/j/da');},_0x3df366=_0x3cb141[_0x16de15(0x12d)]===_0x16de15(0x16a)||_0x3cb141[_0x16de15(0x12d)]===_0x16de15(0x149);if(_0x3df366){const _0x1a6fe9=[..._0x2ed58a[_0x16de15(0x162)](_0x3d1e90=>({..._0x3d1e90,'type':_0x16de15(0x12c)})),..._0x5ba9ef['map'](_0x3412e3=>({..._0x3412e3,'type':_0x16de15(0x179),'url':_0x58ab2a(_0x3412e3['id'])})),..._0xdf90d6[_0x16de15(0x162)](_0xfd4038=>({..._0xfd4038,'name':_0xfd4038['journeyBundleName'],'type':_0x16de15(0x159),'url':_0x14e3f9(_0xfd4038['id'])}))][_0x16de15(0x169)]((_0x6de6cd,_0x93c124)=>_0x6de6cd[_0x16de15(0x135)][_0x16de15(0x165)](_0x93c124[_0x16de15(0x135)]));await handleSDKOutput(_0x1a6fe9,_0x3cb141);}else{if(_0x142e9e===0x0)console[_0x16de15(0x152)](a39_0x159aa7['dim']('['+_0x2b746f+']')),console[_0x16de15(0x152)](_0x16de15(0x143));else{console[_0x16de15(0x152)](a39_0x159aa7['dim']('['+_0x2b746f+']'));const _0x351dd3=formatFlatList(_0x2ed58a,_0x5ba9ef,{'showMetadata':!![],'getSegmentUrl':_0x58ab2a,'getJourneyUrl':_0x14e3f9},_0xdf90d6);console[_0x16de15(0x152)](_0x351dd3);}}return 0x0;}async[a39_0x5b33b1(0x134)](_0x569439,_0x10bde4){const _0x2c8d9c=a39_0x5b33b1,{options:_0x56dbcc,tdx:_0x37ddb2}=_0x569439,_0x4f7979=await withSpinner(_0x2c8d9c(0x13d)+_0x10bde4+_0x2c8d9c(0x167),()=>_0x37ddb2[_0x2c8d9c(0x179)]['resolvePathToResource'](_0x10bde4),{'verbose':_0x56dbcc[_0x2c8d9c(0x13e)]}),_0xd8da10=_0x4f7979['data'];_0x56dbcc['verbose']&&(console['error'](_0x2c8d9c(0x12f)+_0xd8da10[_0x2c8d9c(0x141)]),_0xd8da10['folderId']&&console[_0x2c8d9c(0x160)]('Folder\x20ID:\x20'+_0xd8da10[_0x2c8d9c(0x16b)]));const _0x1dfdb8=_0x56dbcc['maxDepth']||0xa,_0x13c87c=await withSpinner(_0x2c8d9c(0x15c),()=>_0x37ddb2[_0x2c8d9c(0x179)]['listRecursive'](_0xd8da10[_0x2c8d9c(0x141)],_0xd8da10[_0x2c8d9c(0x16b)],0x0,_0x1dfdb8),{'verbose':_0x56dbcc[_0x2c8d9c(0x13e)]}),_0x2329b4=_0x13c87c['data'],_0x20cd0b=_0x13dcf9=>{const _0x1ec125=_0x2c8d9c;let _0x5c12bd=0x0,_0x48a317=0x0,_0x51d6c6=0x0;for(const _0x542bcf of _0x13dcf9){if(_0x542bcf['type']==='folder')_0x5c12bd++;else{if(_0x542bcf[_0x1ec125(0x14e)]===_0x1ec125(0x179))_0x48a317++;else{if(_0x542bcf['type']==='journey')_0x51d6c6++;}}if(_0x542bcf[_0x1ec125(0x178)]){const _0x344d58=_0x20cd0b(_0x542bcf['children']);_0x5c12bd+=_0x344d58[_0x1ec125(0x174)],_0x48a317+=_0x344d58['segments'],_0x51d6c6+=_0x344d58[_0x1ec125(0x16f)];}}return{'folders':_0x5c12bd,'segments':_0x48a317,'journeys':_0x51d6c6};},_0x5b08ad=_0x20cd0b(_0x2329b4);console['error'](_0x2c8d9c(0x139)+_0x5b08ad[_0x2c8d9c(0x174)]+'\x20folder'+(_0x5b08ad[_0x2c8d9c(0x174)]!==0x1?'s':'')+',\x20'+_0x5b08ad['segments']+'\x20segment'+(_0x5b08ad['segments']!==0x1?'s':'')+_0x2c8d9c(0x132)+_0x5b08ad[_0x2c8d9c(0x16f)]+_0x2c8d9c(0x15a)+(_0x5b08ad[_0x2c8d9c(0x16f)]!==0x1?'s':''));const _0xa1cf68=_0x35ee3e=>{const _0x288094=_0x2c8d9c;return getConsoleNextUrl(_0x56dbcc[_0x288094(0x168)],'/app/ps/'+_0xd8da10[_0x288094(0x141)]+_0x288094(0x147)+_0x35ee3e);},_0x1fafba=_0x425f80=>{const _0x20dc32=_0x2c8d9c;return getConsoleNextUrl(_0x56dbcc['site'],'/app/ps/'+_0xd8da10['parentId']+_0x20dc32(0x147)+_0x425f80+_0x20dc32(0x146));};if(_0x56dbcc['format']===_0x2c8d9c(0x16a)||_0x56dbcc[_0x2c8d9c(0x12d)]===_0x2c8d9c(0x149))await handleSDKOutput(_0x2329b4,_0x56dbcc);else{console[_0x2c8d9c(0x152)](a39_0x159aa7[_0x2c8d9c(0x145)]('['+_0x10bde4+']'));const _0x353023=formatTree(_0x2329b4,{'showMetadata':!![],'getSegmentUrl':_0xa1cf68,'getJourneyUrl':_0x1fafba});console[_0x2c8d9c(0x152)](_0x353023);}return 0x0;}}
@@ -1 +1 @@
1
- function a40_0x4f94(_0x1e465e,_0x231981){_0x1e465e=_0x1e465e-0xb3;const _0x209aa6=a40_0x209a();let _0x4f9434=_0x209aa6[_0x1e465e];return _0x4f9434;}const a40_0x5359a6=a40_0x4f94;(function(_0x3cd339,_0x4d1318){const _0x3d6bd8=a40_0x4f94,_0x4167d0=_0x3cd339();while(!![]){try{const _0x27251e=parseInt(_0x3d6bd8(0xbd))/0x1*(parseInt(_0x3d6bd8(0xb3))/0x2)+parseInt(_0x3d6bd8(0xc2))/0x3+-parseInt(_0x3d6bd8(0xdb))/0x4*(-parseInt(_0x3d6bd8(0xd2))/0x5)+parseInt(_0x3d6bd8(0xc1))/0x6*(-parseInt(_0x3d6bd8(0xb9))/0x7)+parseInt(_0x3d6bd8(0xbf))/0x8+-parseInt(_0x3d6bd8(0xc9))/0x9*(parseInt(_0x3d6bd8(0xd5))/0xa)+-parseInt(_0x3d6bd8(0xc0))/0xb;if(_0x27251e===_0x4d1318)break;else _0x4167d0['push'](_0x4167d0['shift']());}catch(_0x51c3c6){_0x4167d0['push'](_0x4167d0['shift']());}}}(a40_0x209a,0x313c6));function a40_0x209a(){const _0x5e988c=['data','Catalog:\x20','validate','623kXuRIg','Usage:\x20tdx\x20show\x20<database.table>','name','✔\x20Query\x20successful\x20-\x200\x20rows\x20returned','11mBLlfK','...','232256egQgYp','2031018ellgNq','12156cyqPKJ','290070KYXVBK','Usage:\x20tdx\x20show\x20<database.table>\x0a\x20\x20\x20or:\x20tdx\x20show\x20<catalog.database.table>\x0a\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--database\x20<database>\x0a\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--in\x20<database>\x0a\x0aRun\x20\x27tdx\x20show\x20--help\x27\x20for\x20more\x20options','Show\x20table\x20contents','site','\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--database\x20<database>','Querying\x20','message','294534OzzyiZ','table','Limit:\x20','execute','args','Database:\x20','Site:\x20','Error:\x20','query','275TybiHw','show','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','20OIsgpj','database','cause','limit','length','\x20\x20\x20or:\x20tdx\x20show\x20<catalog.database.table>','12388uGxYYO','catalog','\x20\x20Cause:\x20','Table:\x20','61094HOZRpO','showTable','error'];a40_0x209a=function(){return _0x5e988c;};return a40_0x209a();}import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleSDKOutput}from'../core/command-output.js';import{parseTableReference,validateTableDescribeReference}from'../utils/table-ref-parser.js';import{withSpinner}from'../utils/spinner.js';import{DEFAULT_DISPLAY_LIMIT,resolveLimit}from'../core/constants.js';export class ShowCommand extends BaseCommand{[a40_0x5359a6(0xbb)]=a40_0x5359a6(0xd3);['description']=a40_0x5359a6(0xc4);async[a40_0x5359a6(0xcc)](_0x2b35b4){const _0x447858=a40_0x5359a6;return this[_0x447858(0xb4)](_0x2b35b4);}async[a40_0x5359a6(0xb4)](_0x564abe){const _0x116ba0=a40_0x5359a6,{options:_0x236519,args:_0x3066df,tdx:_0x163132}=_0x564abe;let _0x2ca472;try{_0x2ca472=parseTableReference(_0x3066df[0x0]);const _0x47292a=_0x236519[_0x116ba0(0xd6)];!_0x2ca472[_0x116ba0(0xd6)]&&_0x47292a&&(_0x2ca472[_0x116ba0(0xd6)]=_0x47292a);const _0xbbe644=validateTableDescribeReference(_0x2ca472);if(_0xbbe644)return console[_0x116ba0(0xb5)](_0x116ba0(0xd0)+_0xbbe644),console[_0x116ba0(0xb5)](_0x116ba0(0xba)),console[_0x116ba0(0xb5)]('\x20\x20\x20or:\x20tdx\x20show\x20<catalog.database.table>'),console[_0x116ba0(0xb5)](_0x116ba0(0xc6)),0x1;}catch(_0x170067){return console[_0x116ba0(0xb5)](_0x116ba0(0xd0)+_0x170067[_0x116ba0(0xc8)]),console['error'](_0x116ba0(0xba)),console[_0x116ba0(0xb5)](_0x116ba0(0xda)),console[_0x116ba0(0xb5)]('\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--database\x20<database>'),0x1;}const _0x3a67b6=_0x2ca472[_0x116ba0(0xdc)],_0x275599=_0x2ca472[_0x116ba0(0xd6)],_0x3fbc73=_0x2ca472[_0x116ba0(0xca)],_0xbcbb27=resolveLimit(_0x236519[_0x116ba0(0xd8)],DEFAULT_DISPLAY_LIMIT);try{_0x236519['verbose']&&(console[_0x116ba0(0xb5)](_0x116ba0(0xcf)+_0x236519[_0x116ba0(0xc5)]),_0x3a67b6&&console['error'](_0x116ba0(0xb7)+_0x3a67b6),console['error'](_0x116ba0(0xce)+_0x275599),console[_0x116ba0(0xb5)](_0x116ba0(0xde)+_0x3fbc73),console[_0x116ba0(0xb5)](_0x116ba0(0xcb)+_0xbcbb27));const _0x3d1bd9=_0x3a67b6?_0x3a67b6+'.'+_0x275599+'.'+_0x3fbc73:_0x275599+'.'+_0x3fbc73,_0x3b9b52=await withSpinner(_0x116ba0(0xc7)+_0x3d1bd9+_0x116ba0(0xbe),()=>_0x163132[_0x116ba0(0xd1)][_0x116ba0(0xb4)](_0x275599,_0x3fbc73,_0xbcbb27,_0x3a67b6),{'verbose':_0x236519['verbose']}),_0x248737=_0x3b9b52[_0x116ba0(0xb6)],_0xe2ea7d=_0x248737[_0x116ba0(0xb6)];return _0xe2ea7d[_0x116ba0(0xd9)]===0x0?console[_0x116ba0(0xb5)](_0x116ba0(0xbc)):console[_0x116ba0(0xb5)]('✔\x20Retrieved\x20'+_0xe2ea7d['length']+'\x20row'+(_0xe2ea7d[_0x116ba0(0xd9)]!==0x1?'s':'')+'\x20from\x20'+_0x3d1bd9),await handleSDKOutput(_0xe2ea7d,_0x236519),0x0;}catch(_0x1cb04f){if(_0x1cb04f instanceof SDKError)return console['error']('Error:\x20'+_0x1cb04f[_0x116ba0(0xc8)]),_0x1cb04f[_0x116ba0(0xd7)]&&console[_0x116ba0(0xb5)](_0x116ba0(0xdd)+_0x1cb04f[_0x116ba0(0xd7)]),0x1;throw _0x1cb04f;}}[a40_0x5359a6(0xb8)](_0x2f9915){const _0x1e8491=a40_0x5359a6;if(_0x2f9915[_0x1e8491(0xcd)][_0x1e8491(0xd9)]===0x0)return _0x1e8491(0xc3);if(_0x2f9915[_0x1e8491(0xcd)][_0x1e8491(0xd9)]>0x1)return _0x1e8491(0xd4);return undefined;}}
1
+ const a40_0x40dcd7=a40_0x5d96;(function(_0x96139e,_0x23ea86){const _0x3a01b3=a40_0x5d96,_0x489309=_0x96139e();while(!![]){try{const _0x57d029=parseInt(_0x3a01b3(0xa6))/0x1*(-parseInt(_0x3a01b3(0xad))/0x2)+-parseInt(_0x3a01b3(0xa9))/0x3+-parseInt(_0x3a01b3(0xb2))/0x4*(parseInt(_0x3a01b3(0x9a))/0x5)+-parseInt(_0x3a01b3(0xb0))/0x6+parseInt(_0x3a01b3(0xa5))/0x7*(-parseInt(_0x3a01b3(0xa8))/0x8)+-parseInt(_0x3a01b3(0xb5))/0x9*(-parseInt(_0x3a01b3(0xbd))/0xa)+parseInt(_0x3a01b3(0xa3))/0xb;if(_0x57d029===_0x23ea86)break;else _0x489309['push'](_0x489309['shift']());}catch(_0x408fa7){_0x489309['push'](_0x489309['shift']());}}}(a40_0x31ae,0x7b18c));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleSDKOutput}from'../core/command-output.js';import{parseTableReference,validateTableDescribeReference}from'../utils/table-ref-parser.js';import{withSpinner}from'../utils/spinner.js';import{DEFAULT_DISPLAY_LIMIT,resolveLimit}from'../core/constants.js';function a40_0x5d96(_0x13a480,_0x59f3f7){_0x13a480=_0x13a480-0x99;const _0x31ae5a=a40_0x31ae();let _0x5d967e=_0x31ae5a[_0x13a480];return _0x5d967e;}function a40_0x31ae(){const _0x321791=['5HaYotz','\x20row','\x20\x20\x20or:\x20tdx\x20show\x20<catalog.database.table>','...','description','verbose','✔\x20Query\x20successful\x20-\x200\x20rows\x20returned','Catalog:\x20','args','37504280ZbmEnd','cause','14gWgNOT','1277RbjuGG','\x20from\x20','3863096FrzHlj','855687StTGeE','length','Querying\x20','error','1398YNnLFy','Table:\x20','limit','5201718xtGtRt','show','2449144gkcYnk','Database:\x20','site','9WbuaLe','showTable','Usage:\x20tdx\x20show\x20<database.table>','message','\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--database\x20<database>','Show\x20table\x20contents','Error:\x20','name','7175890qCIElP','query','Usage:\x20tdx\x20show\x20<database.table>\x0a\x20\x20\x20or:\x20tdx\x20show\x20<catalog.database.table>\x0a\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--database\x20<database>\x0a\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--in\x20<database>\x0a\x0aRun\x20\x27tdx\x20show\x20--help\x27\x20for\x20more\x20options','database','execute','Site:\x20','\x20\x20Cause:\x20','✔\x20Retrieved\x20'];a40_0x31ae=function(){return _0x321791;};return a40_0x31ae();}export class ShowCommand extends BaseCommand{[a40_0x40dcd7(0xbc)]=a40_0x40dcd7(0xb1);[a40_0x40dcd7(0x9e)]=a40_0x40dcd7(0xba);async[a40_0x40dcd7(0xc1)](_0x3d2578){return this['showTable'](_0x3d2578);}async[a40_0x40dcd7(0xb6)](_0x25e33c){const _0x197f83=a40_0x40dcd7,{options:_0x1abbac,args:_0x4866fa,tdx:_0x5057c5}=_0x25e33c;let _0x4c0b62;try{_0x4c0b62=parseTableReference(_0x4866fa[0x0]);const _0x4df043=_0x1abbac[_0x197f83(0xc0)];!_0x4c0b62[_0x197f83(0xc0)]&&_0x4df043&&(_0x4c0b62[_0x197f83(0xc0)]=_0x4df043);const _0x4f8463=validateTableDescribeReference(_0x4c0b62);if(_0x4f8463)return console['error']('Error:\x20'+_0x4f8463),console[_0x197f83(0xac)]('Usage:\x20tdx\x20show\x20<database.table>'),console[_0x197f83(0xac)](_0x197f83(0x9c)),console[_0x197f83(0xac)](_0x197f83(0xb9)),0x1;}catch(_0x7bf10){return console[_0x197f83(0xac)]('Error:\x20'+_0x7bf10[_0x197f83(0xb8)]),console['error'](_0x197f83(0xb7)),console[_0x197f83(0xac)](_0x197f83(0x9c)),console[_0x197f83(0xac)](_0x197f83(0xb9)),0x1;}const _0xdcd45=_0x4c0b62['catalog'],_0x5d235b=_0x4c0b62['database'],_0x36b780=_0x4c0b62['table'],_0x2bd128=resolveLimit(_0x1abbac[_0x197f83(0xaf)],DEFAULT_DISPLAY_LIMIT);try{_0x1abbac[_0x197f83(0x9f)]&&(console[_0x197f83(0xac)](_0x197f83(0xc2)+_0x1abbac[_0x197f83(0xb4)]),_0xdcd45&&console['error'](_0x197f83(0xa1)+_0xdcd45),console[_0x197f83(0xac)](_0x197f83(0xb3)+_0x5d235b),console[_0x197f83(0xac)](_0x197f83(0xae)+_0x36b780),console[_0x197f83(0xac)]('Limit:\x20'+_0x2bd128));const _0x4dfdca=_0xdcd45?_0xdcd45+'.'+_0x5d235b+'.'+_0x36b780:_0x5d235b+'.'+_0x36b780,_0x5d5300=await withSpinner(_0x197f83(0xab)+_0x4dfdca+_0x197f83(0x9d),()=>_0x5057c5[_0x197f83(0xbe)][_0x197f83(0xb6)](_0x5d235b,_0x36b780,_0x2bd128,_0xdcd45),{'verbose':_0x1abbac['verbose']}),_0x1b6be4=_0x5d5300['data'],_0x2b2f00=_0x1b6be4['data'];return _0x2b2f00[_0x197f83(0xaa)]===0x0?console[_0x197f83(0xac)](_0x197f83(0xa0)):console[_0x197f83(0xac)](_0x197f83(0x99)+_0x2b2f00['length']+_0x197f83(0x9b)+(_0x2b2f00[_0x197f83(0xaa)]!==0x1?'s':'')+_0x197f83(0xa7)+_0x4dfdca),await handleSDKOutput(_0x2b2f00,_0x1abbac),0x0;}catch(_0x384f07){if(_0x384f07 instanceof SDKError)return console[_0x197f83(0xac)](_0x197f83(0xbb)+_0x384f07[_0x197f83(0xb8)]),_0x384f07[_0x197f83(0xa4)]&&console[_0x197f83(0xac)](_0x197f83(0xc3)+_0x384f07['cause']),0x1;throw _0x384f07;}}['validate'](_0x5b73fa){const _0x57341f=a40_0x40dcd7;if(_0x5b73fa[_0x57341f(0xa2)][_0x57341f(0xaa)]===0x0)return _0x57341f(0xbf);if(_0x5b73fa[_0x57341f(0xa2)][_0x57341f(0xaa)]>0x1)return'Too\x20many\x20arguments\x0aUsage:\x20tdx\x20show\x20<database.table>\x0a\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--database\x20<database>\x0a\x0aRun\x20\x27tdx\x20show\x20--help\x27\x20for\x20more\x20options';return undefined;}}
@@ -1 +1 @@
1
- const a41_0x38ac23=a41_0x91f0;(function(_0x389150,_0xe7d7f6){const _0x45959b=a41_0x91f0,_0x2a8ee8=_0x389150();while(!![]){try{const _0x3408c6=-parseInt(_0x45959b(0xa0))/0x1*(parseInt(_0x45959b(0xaa))/0x2)+parseInt(_0x45959b(0xbe))/0x3*(parseInt(_0x45959b(0xa3))/0x4)+-parseInt(_0x45959b(0xa8))/0x5+parseInt(_0x45959b(0xc0))/0x6*(parseInt(_0x45959b(0xaf))/0x7)+parseInt(_0x45959b(0xcc))/0x8+parseInt(_0x45959b(0xbf))/0x9+parseInt(_0x45959b(0x9f))/0xa*(-parseInt(_0x45959b(0xad))/0xb);if(_0x3408c6===_0xe7d7f6)break;else _0x2a8ee8['push'](_0x2a8ee8['shift']());}catch(_0x24734b){_0x2a8ee8['push'](_0x2a8ee8['shift']());}}}(a41_0x4deb,0xc5059));function a41_0x4deb(){const _0x32bbb7=['message','63393wQhTks','tdx','98zsYWrT','error','site','jobs','name','User:','CLI\x20flag','config','red','Read\x20credential\x20from\x20','first_name','join','dim','bold','env','27stAmNQ','8195850AyiKvT','34278exOcWr','account_id','N/A','session','✓\x20Authentication\x20successful\x0a','TDX_PROFILE\x20env','status','email','execute','log','filter','profile','7268312ZaHuxA','Name:','\x20profile:\x20','Account\x20ID:','site:\x20','80dPYsSW','3509zhlIpD','last_name','cli','493412wYdUdJ','(from\x20','cyan','yellow','green','7886290reTGlz','displayWithSources','330dVztWt','profileSource'];a41_0x4deb=function(){return _0x32bbb7;};return a41_0x4deb();}import{BaseCommand,printAuthError}from'./command.js';import{resolveAPIKeyAsync}from'../core/config.js';import{HTTPClientError}from'../sdk/client/http-client.js';function a41_0x91f0(_0x285d75,_0x59db37){_0x285d75=_0x285d75-0x9e;const _0x4deb86=a41_0x4deb();let _0x91f0d=_0x4deb86[_0x285d75];return _0x91f0d;}import{GlobalContext}from'../core/global-context.js';import a41_0x3d14e9 from'chalk';export class StatusCommand extends BaseCommand{[a41_0x38ac23(0xb3)]='status';['description']='Show\x20authentication\x20status\x20and\x20current\x20context';async[a41_0x38ac23(0xc8)](_0x5f361c){const _0x1114b2=a41_0x38ac23,{options:_0x299154,tdx:_0x4def43}=_0x5f361c,_0x1fd7e7=_0x299154[_0x1114b2(0xb1)],_0x3f234b=new GlobalContext(_0x299154),_0x4f72e3=_0x3f234b[_0x1114b2(0xcb)],_0x3ca202=_0x3f234b[_0x1114b2(0xab)],_0x54019e=_0x3ca202===_0x1114b2(0xa2)?_0x1114b2(0xb5):_0x3ca202===_0x1114b2(0xc3)?_0x1114b2(0xc3):_0x3ca202===_0x1114b2(0xbd)?_0x1114b2(0xc5):_0x3ca202===_0x1114b2(0xb6)?_0x1114b2(0xb6):null,_0x211e18=_0x4f72e3?a41_0x3d14e9[_0x1114b2(0xa5)](_0x4f72e3):a41_0x3d14e9[_0x1114b2(0xbb)](_0x1114b2(0xc2)),_0x3686d0=_0x54019e?'\x20'+a41_0x3d14e9[_0x1114b2(0xbb)](_0x1114b2(0xa4)+_0x54019e+')'):'';console[_0x1114b2(0xc9)](a41_0x3d14e9['bold'](_0x1114b2(0xae))+_0x1114b2(0xce)+_0x211e18+_0x3686d0+'\x20'+a41_0x3d14e9[_0x1114b2(0xbb)]('(')+_0x1114b2(0x9e)+a41_0x3d14e9['cyan'](_0x1fd7e7)+a41_0x3d14e9[_0x1114b2(0xbb)](')'));const _0xd83c53=await resolveAPIKeyAsync(_0x1fd7e7,_0x4f72e3);if(_0xd83c53){const {source:_0x589011,isDeprecated:_0x347535}=_0xd83c53,_0x246bb6=_0x1114b2(0xb8)+a41_0x3d14e9[_0x1114b2(0xa5)](_0x589011);console['log'](_0x347535?a41_0x3d14e9[_0x1114b2(0xa6)](_0x246bb6):_0x246bb6);}else console[_0x1114b2(0xc9)](a41_0x3d14e9[_0x1114b2(0xa6)]('No\x20credential\x20found'));let _0x5f34e4=![];try{const _0xc09b3d=await _0x4def43[_0x1114b2(0xb2)]['getUserInfo']();console[_0x1114b2(0xc9)](a41_0x3d14e9[_0x1114b2(0xa7)](_0x1114b2(0xc4))),console[_0x1114b2(0xc9)](a41_0x3d14e9[_0x1114b2(0xbc)](_0x1114b2(0xb4))+'\x20'+a41_0x3d14e9[_0x1114b2(0xa5)](_0xc09b3d[_0x1114b2(0xc7)]));if(_0xc09b3d[_0x1114b2(0xb9)]||_0xc09b3d[_0x1114b2(0xa1)]){const _0xf36f10=[_0xc09b3d[_0x1114b2(0xb9)],_0xc09b3d['last_name']][_0x1114b2(0xca)](Boolean)[_0x1114b2(0xba)]('\x20');console[_0x1114b2(0xc9)](a41_0x3d14e9['bold'](_0x1114b2(0xcd))+'\x20'+_0xf36f10);}_0xc09b3d[_0x1114b2(0xc1)]&&console[_0x1114b2(0xc9)](a41_0x3d14e9[_0x1114b2(0xbc)](_0x1114b2(0xcf))+'\x20'+a41_0x3d14e9[_0x1114b2(0xa6)](_0xc09b3d[_0x1114b2(0xc1)])),_0x5f34e4=!![];}catch(_0x18e3c1){_0x18e3c1 instanceof HTTPClientError&&_0x18e3c1[_0x1114b2(0xc6)]===0x191?printAuthError(_0x18e3c1,!![],_0x4f72e3):console[_0x1114b2(0xb0)](a41_0x3d14e9[_0x1114b2(0xb7)]('✗\x20Validation\x20failed:\x20'+(_0x18e3c1 instanceof Error?_0x18e3c1[_0x1114b2(0xac)]:String(_0x18e3c1))));}return console['log'](),_0x3f234b[_0x1114b2(0xa9)](),_0x5f34e4?0x0:0x1;}}
1
+ const a41_0x3bd9ec=a41_0x5dca;function a41_0x1db4(){const _0x437a7d=['tdx','16WFYRMl','19479ENVFzJ','1855968OBedWp','filter','green','3290670Uviyyk','profile','204auGjEw','site:\x20','yellow','3478174ZcAQic','249822RRNrPO','status','red','name','cyan','join','execute','✗\x20Validation\x20failed:\x20','dim','jobs','cli','description','User:','2942802WmLsbG','config','bold','account_id','email','site','TDX_PROFILE\x20env','first_name','displayWithSources','message','error','Show\x20authentication\x20status\x20and\x20current\x20context','Read\x20credential\x20from\x20','(from\x20','✓\x20Authentication\x20successful\x0a','No\x20credential\x20found','4688130fAVYRV','log'];a41_0x1db4=function(){return _0x437a7d;};return a41_0x1db4();}(function(_0x2faa92,_0xa6084a){const _0x8d6d41=a41_0x5dca,_0x2e67ee=_0x2faa92();while(!![]){try{const _0x16ea5f=parseInt(_0x8d6d41(0x152))/0x1+parseInt(_0x8d6d41(0x14e))/0x2*(parseInt(_0x8d6d41(0x148))/0x3)+parseInt(_0x8d6d41(0x149))/0x4+-parseInt(_0x8d6d41(0x144))/0x5+-parseInt(_0x8d6d41(0x14c))/0x6+parseInt(_0x8d6d41(0x151))/0x7*(parseInt(_0x8d6d41(0x147))/0x8)+-parseInt(_0x8d6d41(0x15f))/0x9;if(_0x16ea5f===_0xa6084a)break;else _0x2e67ee['push'](_0x2e67ee['shift']());}catch(_0x38e9a0){_0x2e67ee['push'](_0x2e67ee['shift']());}}}(a41_0x1db4,0x87f0f));import{BaseCommand,printAuthError}from'./command.js';function a41_0x5dca(_0x3abd18,_0x129925){_0x3abd18=_0x3abd18-0x13a;const _0x1db4b2=a41_0x1db4();let _0x5dca4b=_0x1db4b2[_0x3abd18];return _0x5dca4b;}import{resolveAPIKeyAsync}from'../core/config.js';import{HTTPClientError}from'../sdk/client/http-client.js';import{GlobalContext}from'../core/global-context.js';import a41_0x428f9e from'chalk';export class StatusCommand extends BaseCommand{[a41_0x3bd9ec(0x155)]=a41_0x3bd9ec(0x153);[a41_0x3bd9ec(0x15d)]=a41_0x3bd9ec(0x13f);async[a41_0x3bd9ec(0x158)](_0x33bbc9){const _0xecc35b=a41_0x3bd9ec,{options:_0x1ee196,tdx:_0x5c24ad}=_0x33bbc9,_0x302a46=_0x1ee196[_0xecc35b(0x164)],_0x32ec0c=new GlobalContext(_0x1ee196),_0x5a940f=_0x32ec0c[_0xecc35b(0x14d)],_0x223cdb=_0x32ec0c['profileSource'],_0x279748=_0x223cdb===_0xecc35b(0x15c)?'CLI\x20flag':_0x223cdb==='session'?'session':_0x223cdb==='env'?_0xecc35b(0x13a):_0x223cdb===_0xecc35b(0x160)?_0xecc35b(0x160):null,_0x4503f4=_0x5a940f?a41_0x428f9e[_0xecc35b(0x156)](_0x5a940f):a41_0x428f9e[_0xecc35b(0x15a)]('N/A'),_0x132b4c=_0x279748?'\x20'+a41_0x428f9e[_0xecc35b(0x15a)](_0xecc35b(0x141)+_0x279748+')'):'';console['log'](a41_0x428f9e['bold'](_0xecc35b(0x146))+'\x20profile:\x20'+_0x4503f4+_0x132b4c+'\x20'+a41_0x428f9e['dim']('(')+_0xecc35b(0x14f)+a41_0x428f9e['cyan'](_0x302a46)+a41_0x428f9e[_0xecc35b(0x15a)](')'));const _0x2190b0=await resolveAPIKeyAsync(_0x302a46,_0x5a940f);if(_0x2190b0){const {source:_0x3c1ee4,isDeprecated:_0x1e42d9}=_0x2190b0,_0x223f96=_0xecc35b(0x140)+a41_0x428f9e['cyan'](_0x3c1ee4);console['log'](_0x1e42d9?a41_0x428f9e[_0xecc35b(0x150)](_0x223f96):_0x223f96);}else console[_0xecc35b(0x145)](a41_0x428f9e[_0xecc35b(0x150)](_0xecc35b(0x143)));let _0x2d567b=![];try{const _0x1d778d=await _0x5c24ad[_0xecc35b(0x15b)]['getUserInfo']();console[_0xecc35b(0x145)](a41_0x428f9e[_0xecc35b(0x14b)](_0xecc35b(0x142))),console[_0xecc35b(0x145)](a41_0x428f9e[_0xecc35b(0x161)](_0xecc35b(0x15e))+'\x20'+a41_0x428f9e['cyan'](_0x1d778d[_0xecc35b(0x163)]));if(_0x1d778d[_0xecc35b(0x13b)]||_0x1d778d['last_name']){const _0x3ffa36=[_0x1d778d[_0xecc35b(0x13b)],_0x1d778d['last_name']][_0xecc35b(0x14a)](Boolean)[_0xecc35b(0x157)]('\x20');console['log'](a41_0x428f9e[_0xecc35b(0x161)]('Name:')+'\x20'+_0x3ffa36);}_0x1d778d[_0xecc35b(0x162)]&&console['log'](a41_0x428f9e['bold']('Account\x20ID:')+'\x20'+a41_0x428f9e[_0xecc35b(0x150)](_0x1d778d[_0xecc35b(0x162)])),_0x2d567b=!![];}catch(_0x44cf4f){_0x44cf4f instanceof HTTPClientError&&_0x44cf4f[_0xecc35b(0x153)]===0x191?printAuthError(_0x44cf4f,!![],_0x5a940f):console[_0xecc35b(0x13e)](a41_0x428f9e[_0xecc35b(0x154)](_0xecc35b(0x159)+(_0x44cf4f instanceof Error?_0x44cf4f[_0xecc35b(0x13d)]:String(_0x44cf4f))));}return console['log'](),_0x32ec0c[_0xecc35b(0x13c)](),_0x2d567b?0x0:0x1;}}
@@ -1 +1 @@
1
- const a42_0x522d86=a42_0x24ce;(function(_0x36609e,_0x88b79){const _0x55ce8d=a42_0x24ce,_0x2adefb=_0x36609e();while(!![]){try{const _0x487bb9=parseInt(_0x55ce8d(0x188))/0x1+-parseInt(_0x55ce8d(0x1a7))/0x2*(parseInt(_0x55ce8d(0x195))/0x3)+parseInt(_0x55ce8d(0x1a0))/0x4+-parseInt(_0x55ce8d(0x1ac))/0x5*(-parseInt(_0x55ce8d(0x19e))/0x6)+-parseInt(_0x55ce8d(0x1a5))/0x7+parseInt(_0x55ce8d(0x1a2))/0x8+parseInt(_0x55ce8d(0x1a6))/0x9;if(_0x487bb9===_0x88b79)break;else _0x2adefb['push'](_0x2adefb['shift']());}catch(_0x265cad){_0x2adefb['push'](_0x2adefb['shift']());}}}(a42_0x44cb,0x71e8e));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleSDKOutput}from'../core/command-output.js';import{parseTableReference}from'../utils/table-ref-parser.js';import{DEFAULT_LISTING_LIMIT,resolveLimit}from'../core/constants.js';function a42_0x44cb(){const _0x5e9af6=['\x27\x20may\x20not\x20exist\x20or\x20contains\x20no\x20tables','✔\x20Found\x20','Site:\x20','Table\x20pattern:\x20','✖\x20No\x20tables\x20found','Database\x20pattern:\x20','message','database','\x20\x20tdx\x20tables\x20users\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20->\x20table\x20\x22users\x22\x20across\x20all\x20databases','Error:\x20','\x20\x20Or:\x20\x20tdx\x20tables\x20--in\x20','12399FHWBYc','data','verbose','validate','\x20\x20Cause:\x20','includes','length','limit','\x20\x20tdx\x20tables\x20--in\x20mydb\x20\x20\x20\x20\x20\x20\x20->\x20all\x20tables\x20from\x20mydb','8406DsrbdI','Listing\x20tables...','2503452gXGQaT','Or\x20use\x20--in\x20flag:','699240qgbMhF','Did\x20you\x20mean\x20to\x20list\x20all\x20tables\x20from\x20database\x20\x27','Database\x20\x27','3804269TgTuSP','3759255errSxJ','194uwoQYI','\x20table','table','Error:\x20Too\x20many\x20arguments.\x20Use\x20single\x20argument:','error','750mREsBn','description','.*\x22','\x27\x20is\x20ambiguous.','cause','\x20\x20tdx\x20tables\x20\x22*.user*\x22\x20\x20\x20\x20\x20\x20\x20->\x20tables\x20matching\x20user*\x20across\x20databases','query','Database:\x20','Database:\x20all','69829gWtdSD','tables'];a42_0x44cb=function(){return _0x5e9af6;};return a42_0x44cb();}import{withSpinner}from'../utils/spinner.js';function a42_0x24ce(_0x4021b9,_0x27ca52){_0x4021b9=_0x4021b9-0x183;const _0x44cb3c=a42_0x44cb();let _0x24cea9=_0x44cb3c[_0x4021b9];return _0x24cea9;}export class TablesCommand extends BaseCommand{['name']=a42_0x522d86(0x189);[a42_0x522d86(0x1ad)]='List\x20tables\x20in\x20a\x20database';async['execute'](_0x22bd6e){const _0x2becf5=a42_0x522d86,{options:_0x44be39,args:_0x162d0e,tdx:_0x19a8cc}=_0x22bd6e;let _0x30edcb;if(_0x162d0e[_0x2becf5(0x19b)]===0x0)_0x30edcb={'database':undefined,'table':undefined,'original':''};else{if(_0x162d0e['length']===0x1)try{_0x30edcb=parseTableReference(_0x162d0e[0x0]);if(_0x30edcb[_0x2becf5(0x1a9)]&&!_0x30edcb[_0x2becf5(0x191)]&&!_0x30edcb[_0x2becf5(0x1a9)][_0x2becf5(0x19a)]('*')&&!_0x30edcb[_0x2becf5(0x1a9)][_0x2becf5(0x19a)]('?'))return console['error']('Error:\x20Pattern\x20\x27'+_0x162d0e[0x0]+_0x2becf5(0x1af)),console[_0x2becf5(0x1ab)](_0x2becf5(0x1a3)+_0x30edcb[_0x2becf5(0x1a9)]+'\x27?'),console[_0x2becf5(0x1ab)]('\x20\x20Use:\x20tdx\x20tables\x20\x22'+_0x30edcb[_0x2becf5(0x1a9)]+_0x2becf5(0x1ae)),console[_0x2becf5(0x1ab)](_0x2becf5(0x194)+_0x30edcb['table']),console[_0x2becf5(0x1ab)]('\x20\x20Or:\x20\x20tdx\x20tables\x20--database\x20'+_0x30edcb[_0x2becf5(0x1a9)]),console['error'](''),console[_0x2becf5(0x1ab)]('Note:\x20\x27'+_0x162d0e[0x0]+'\x27\x20without\x20wildcards\x20would\x20search\x20for\x20tables\x20named\x20\x27'+_0x30edcb[_0x2becf5(0x1a9)]+'\x27\x20across\x20all\x20databases.'),0x1;}catch(_0x14249b){return console[_0x2becf5(0x1ab)](_0x2becf5(0x193)+_0x14249b[_0x2becf5(0x190)]),0x1;}else return console['error'](_0x2becf5(0x1aa)),console[_0x2becf5(0x1ab)](_0x2becf5(0x192)),console[_0x2becf5(0x1ab)]('\x20\x20tdx\x20tables\x20\x22mydb.*\x22\x20\x20\x20\x20\x20\x20\x20\x20->\x20all\x20tables\x20from\x20mydb'),console['error']('\x20\x20tdx\x20tables\x20\x22mydb.users\x22\x20\x20\x20\x20->\x20table\x20\x22users\x22\x20in\x20database\x20mydb'),console[_0x2becf5(0x1ab)](_0x2becf5(0x184)),console['error'](_0x2becf5(0x1a1)),console[_0x2becf5(0x1ab)](_0x2becf5(0x19d)),0x1;}const _0x354225=_0x44be39[_0x2becf5(0x191)];!_0x30edcb[_0x2becf5(0x191)]&&_0x354225&&(_0x30edcb[_0x2becf5(0x191)]=_0x354225);try{const _0x20c716=_0x7a23e9=>_0x7a23e9&&(_0x7a23e9[_0x2becf5(0x19a)]('*')||_0x7a23e9[_0x2becf5(0x19a)]('?')),_0x119fb0=_0x20c716(_0x30edcb['database']);_0x44be39[_0x2becf5(0x197)]&&(console[_0x2becf5(0x1ab)](_0x2becf5(0x18c)+_0x44be39['site']),_0x30edcb[_0x2becf5(0x191)]?_0x119fb0?console['error'](_0x2becf5(0x18f)+_0x30edcb[_0x2becf5(0x191)]):console[_0x2becf5(0x1ab)](_0x2becf5(0x186)+_0x30edcb['database']):console[_0x2becf5(0x1ab)](_0x2becf5(0x187)),_0x30edcb[_0x2becf5(0x1a9)]&&console[_0x2becf5(0x1ab)](_0x2becf5(0x18d)+_0x30edcb[_0x2becf5(0x1a9)]));const _0x219507=_0x30edcb['database']&&!_0x119fb0?_0x30edcb[_0x2becf5(0x191)]:undefined,_0x733482=_0x119fb0?_0x30edcb['database']:undefined,_0x2dbc23=_0x30edcb[_0x2becf5(0x1a9)],_0x5bbe4a=resolveLimit(_0x44be39[_0x2becf5(0x19c)],DEFAULT_LISTING_LIMIT),_0x221e6c=await withSpinner(_0x2becf5(0x19f),()=>_0x19a8cc[_0x2becf5(0x185)]['listTables'](_0x219507,_0x2dbc23,_0x733482,_0x5bbe4a),{'verbose':_0x44be39[_0x2becf5(0x197)]}),_0x3c45fa=_0x221e6c[_0x2becf5(0x196)];if(_0x3c45fa['length']===0x0&&_0x30edcb[_0x2becf5(0x191)]&&!_0x119fb0)return console['error'](_0x2becf5(0x18e)),console['error'](_0x2becf5(0x1a4)+_0x30edcb[_0x2becf5(0x191)]+_0x2becf5(0x18a)),0x1;return console[_0x2becf5(0x1ab)](_0x2becf5(0x18b)+_0x3c45fa[_0x2becf5(0x19b)]+_0x2becf5(0x1a8)+(_0x3c45fa[_0x2becf5(0x19b)]!==0x1?'s':'')),await handleSDKOutput(_0x3c45fa,{..._0x44be39,'limit':_0x5bbe4a}),0x0;}catch(_0x24f9d9){if(_0x24f9d9 instanceof SDKError)return console[_0x2becf5(0x1ab)](_0x2becf5(0x193)+_0x24f9d9[_0x2becf5(0x190)]),_0x24f9d9[_0x2becf5(0x183)]&&console[_0x2becf5(0x1ab)](_0x2becf5(0x199)+_0x24f9d9[_0x2becf5(0x183)]),0x1;throw _0x24f9d9;}}[a42_0x522d86(0x198)](_0x148df6){return undefined;}}
1
+ const a42_0x152645=a42_0x41a2;function a42_0x41a2(_0x408fb1,_0x7fd973){_0x408fb1=_0x408fb1-0x109;const _0x2a908e=a42_0x2a90();let _0x41a250=_0x2a908e[_0x408fb1];return _0x41a250;}(function(_0x3d682f,_0x2c7d3c){const _0x1c0273=a42_0x41a2,_0xc29e60=_0x3d682f();while(!![]){try{const _0x35e0b4=parseInt(_0x1c0273(0x125))/0x1+-parseInt(_0x1c0273(0x119))/0x2*(-parseInt(_0x1c0273(0x136))/0x3)+-parseInt(_0x1c0273(0x112))/0x4+parseInt(_0x1c0273(0x11a))/0x5*(parseInt(_0x1c0273(0x11f))/0x6)+parseInt(_0x1c0273(0x11e))/0x7*(parseInt(_0x1c0273(0x12d))/0x8)+parseInt(_0x1c0273(0x10c))/0x9+-parseInt(_0x1c0273(0x11b))/0xa;if(_0x35e0b4===_0x2c7d3c)break;else _0xc29e60['push'](_0xc29e60['shift']());}catch(_0x33ddc9){_0xc29e60['push'](_0xc29e60['shift']());}}}(a42_0x2a90,0x1ee01));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleSDKOutput}from'../core/command-output.js';import{parseTableReference}from'../utils/table-ref-parser.js';import{DEFAULT_LISTING_LIMIT,resolveLimit}from'../core/constants.js';import{withSpinner}from'../utils/spinner.js';function a42_0x2a90(){const _0x3426be=['182338MMOuMT','database','\x20\x20Or:\x20\x20tdx\x20tables\x20--database\x20','\x27\x20is\x20ambiguous.','message','Table\x20pattern:\x20','Error:\x20Too\x20many\x20arguments.\x20Use\x20single\x20argument:','table','949016SGGTkY','tables','Did\x20you\x20mean\x20to\x20list\x20all\x20tables\x20from\x20database\x20\x27','✖\x20No\x20tables\x20found','includes','\x20\x20tdx\x20tables\x20\x22mydb.*\x22\x20\x20\x20\x20\x20\x20\x20\x20->\x20all\x20tables\x20from\x20mydb','Listing\x20tables...','✔\x20Found\x20','site','294891ztuhSI','length','query','listTables','2207403vLrHVj','data','description','\x20\x20Or:\x20\x20tdx\x20tables\x20--in\x20','name','Error:\x20Pattern\x20\x27','428368kbAGMH','\x27\x20across\x20all\x20databases.','error','Site:\x20','\x20\x20Cause:\x20','Database\x20pattern:\x20','\x20table','2LVOlKy','5hHtqzW','6127380xnUuUI','Error:\x20','\x20\x20Use:\x20tdx\x20tables\x20\x22','7cVUYWS','1210596YZSRJQ','Or\x20use\x20--in\x20flag:','\x20\x20tdx\x20tables\x20users\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20->\x20table\x20\x22users\x22\x20across\x20all\x20databases','\x27\x20may\x20not\x20exist\x20or\x20contains\x20no\x20tables','verbose','cause'];a42_0x2a90=function(){return _0x3426be;};return a42_0x2a90();}export class TablesCommand extends BaseCommand{[a42_0x152645(0x110)]=a42_0x152645(0x12e);[a42_0x152645(0x10e)]='List\x20tables\x20in\x20a\x20database';async['execute'](_0x45ca9f){const _0x587293=a42_0x152645,{options:_0x2eff6b,args:_0x5bb02e,tdx:_0x4cff99}=_0x45ca9f;let _0xbddd85;if(_0x5bb02e[_0x587293(0x109)]===0x0)_0xbddd85={'database':undefined,'table':undefined,'original':''};else{if(_0x5bb02e[_0x587293(0x109)]===0x1)try{_0xbddd85=parseTableReference(_0x5bb02e[0x0]);if(_0xbddd85[_0x587293(0x12c)]&&!_0xbddd85[_0x587293(0x126)]&&!_0xbddd85[_0x587293(0x12c)][_0x587293(0x131)]('*')&&!_0xbddd85[_0x587293(0x12c)][_0x587293(0x131)]('?'))return console[_0x587293(0x114)](_0x587293(0x111)+_0x5bb02e[0x0]+_0x587293(0x128)),console[_0x587293(0x114)](_0x587293(0x12f)+_0xbddd85['table']+'\x27?'),console[_0x587293(0x114)](_0x587293(0x11d)+_0xbddd85[_0x587293(0x12c)]+'.*\x22'),console[_0x587293(0x114)](_0x587293(0x10f)+_0xbddd85[_0x587293(0x12c)]),console['error'](_0x587293(0x127)+_0xbddd85[_0x587293(0x12c)]),console[_0x587293(0x114)](''),console[_0x587293(0x114)]('Note:\x20\x27'+_0x5bb02e[0x0]+'\x27\x20without\x20wildcards\x20would\x20search\x20for\x20tables\x20named\x20\x27'+_0xbddd85[_0x587293(0x12c)]+_0x587293(0x113)),0x1;}catch(_0x4aba1e){return console[_0x587293(0x114)](_0x587293(0x11c)+_0x4aba1e[_0x587293(0x129)]),0x1;}else return console['error'](_0x587293(0x12b)),console[_0x587293(0x114)](_0x587293(0x121)),console[_0x587293(0x114)](_0x587293(0x132)),console[_0x587293(0x114)]('\x20\x20tdx\x20tables\x20\x22mydb.users\x22\x20\x20\x20\x20->\x20table\x20\x22users\x22\x20in\x20database\x20mydb'),console[_0x587293(0x114)]('\x20\x20tdx\x20tables\x20\x22*.user*\x22\x20\x20\x20\x20\x20\x20\x20->\x20tables\x20matching\x20user*\x20across\x20databases'),console[_0x587293(0x114)](_0x587293(0x120)),console['error']('\x20\x20tdx\x20tables\x20--in\x20mydb\x20\x20\x20\x20\x20\x20\x20->\x20all\x20tables\x20from\x20mydb'),0x1;}const _0x576cc6=_0x2eff6b[_0x587293(0x126)];!_0xbddd85[_0x587293(0x126)]&&_0x576cc6&&(_0xbddd85[_0x587293(0x126)]=_0x576cc6);try{const _0x53e192=_0x7b457d=>_0x7b457d&&(_0x7b457d['includes']('*')||_0x7b457d[_0x587293(0x131)]('?')),_0x4ead03=_0x53e192(_0xbddd85[_0x587293(0x126)]);_0x2eff6b[_0x587293(0x123)]&&(console['error'](_0x587293(0x115)+_0x2eff6b[_0x587293(0x135)]),_0xbddd85[_0x587293(0x126)]?_0x4ead03?console[_0x587293(0x114)](_0x587293(0x117)+_0xbddd85[_0x587293(0x126)]):console[_0x587293(0x114)]('Database:\x20'+_0xbddd85[_0x587293(0x126)]):console[_0x587293(0x114)]('Database:\x20all'),_0xbddd85['table']&&console[_0x587293(0x114)](_0x587293(0x12a)+_0xbddd85['table']));const _0x43b1da=_0xbddd85['database']&&!_0x4ead03?_0xbddd85['database']:undefined,_0x381b29=_0x4ead03?_0xbddd85[_0x587293(0x126)]:undefined,_0x42c4ef=_0xbddd85[_0x587293(0x12c)],_0x11c04f=resolveLimit(_0x2eff6b['limit'],DEFAULT_LISTING_LIMIT),_0x2ef1b1=await withSpinner(_0x587293(0x133),()=>_0x4cff99[_0x587293(0x10a)][_0x587293(0x10b)](_0x43b1da,_0x42c4ef,_0x381b29,_0x11c04f),{'verbose':_0x2eff6b[_0x587293(0x123)]}),_0x1e6114=_0x2ef1b1[_0x587293(0x10d)];if(_0x1e6114[_0x587293(0x109)]===0x0&&_0xbddd85[_0x587293(0x126)]&&!_0x4ead03)return console[_0x587293(0x114)](_0x587293(0x130)),console['error']('Database\x20\x27'+_0xbddd85['database']+_0x587293(0x122)),0x1;return console['error'](_0x587293(0x134)+_0x1e6114[_0x587293(0x109)]+_0x587293(0x118)+(_0x1e6114[_0x587293(0x109)]!==0x1?'s':'')),await handleSDKOutput(_0x1e6114,{..._0x2eff6b,'limit':_0x11c04f}),0x0;}catch(_0x5de907){if(_0x5de907 instanceof SDKError)return console[_0x587293(0x114)]('Error:\x20'+_0x5de907[_0x587293(0x129)]),_0x5de907[_0x587293(0x124)]&&console[_0x587293(0x114)](_0x587293(0x116)+_0x5de907[_0x587293(0x124)]),0x1;throw _0x5de907;}}['validate'](_0x3452e6){return undefined;}}
@@ -1 +1 @@
1
- const a43_0x492c3a=a43_0x1d98;(function(_0x395713,_0x45734a){const _0x5bf67a=a43_0x1d98,_0x3e2594=_0x395713();while(!![]){try{const _0x21331d=-parseInt(_0x5bf67a(0xa2))/0x1+-parseInt(_0x5bf67a(0xba))/0x2+parseInt(_0x5bf67a(0x9c))/0x3+parseInt(_0x5bf67a(0xa5))/0x4*(-parseInt(_0x5bf67a(0xbe))/0x5)+parseInt(_0x5bf67a(0xa9))/0x6+-parseInt(_0x5bf67a(0xa0))/0x7+parseInt(_0x5bf67a(0xb2))/0x8;if(_0x21331d===_0x45734a)break;else _0x3e2594['push'](_0x3e2594['shift']());}catch(_0x1adcdf){_0x3e2594['push'](_0x3e2594['shift']());}}}(a43_0x51f9,0x303d1));import{BaseCommand}from'./command.js';import{getSessionID,cleanExpiredSessions,clearSessionContextField}from'../core/session.js';import{clearDefaultSiteFromUserConfig,clearActiveProfileFromUserConfig}from'../core/profile.js';import{getConfigDir}from'../core/config.js';function a43_0x1d98(_0x185d9c,_0x295760){_0x185d9c=_0x185d9c-0x9a;const _0x51f988=a43_0x51f9();let _0x1d98ae=_0x51f988[_0x185d9c];return _0x1d98ae;}function a43_0x51f9(){const _0x360f82=['Clear\x20session-level\x20or\x20default\x20context\x20values','database','llm_project','Session\x20','745884KZmXAo','Default\x20site\x20','parent_segment','default','1365010sXwyfQ','session','message','--default\x20can\x20only\x20be\x20used\x20with\x20\x27site\x27\x20or\x20\x27profile\x27.\x20Other\x20resources\x20are\x20session-level\x20only.','93114zLfcvM','engage_workspace','profile','Invalid\x20resource:\x20','602126qHjRXm','\x0aUpdated:\x20','280964QuSXvo','dim','log','4BRSxKV','agent','cleared','llm_agent','1999470dwTGjU','site','tdx.json','name','\x0aResources:\x20site,\x20database,\x20parent_segment,\x20llm_project,\x20agent,\x20profile,\x20engage_workspace\x0a','\x20\x20\x20\x20\x20\x20\x20tdx\x20unset\x20--default\x20<resource>\x20\x20#\x20Clear\x20default\x20from\x20config\x0a','(session:\x20','validate','.\x20Must\x20be\x20one\x20of:\x20','6769824bbaGpX','Error:\x20','green','includes'];a43_0x51f9=function(){return _0x360f82;};return a43_0x51f9();}import a43_0x2c97a4 from'chalk';import*as a43_0x253f0b from'node:path';export class UnsetCommand extends BaseCommand{[a43_0x492c3a(0xac)]='unset';['description']=a43_0x492c3a(0xb6);[a43_0x492c3a(0xb0)](_0x1e9a40){const _0x2a0456=a43_0x492c3a,{args:_0x748172,options:_0x4622d5}=_0x1e9a40,_0x49a3dc=_0x4622d5[_0x2a0456(0xbd)];if(_0x748172['length']===0x0)return'Usage:\x20tdx\x20unset\x20<resource>\x0a'+_0x2a0456(0xae)+_0x2a0456(0xad)+'\x0aRun\x20\x27tdx\x20unset\x20--help\x27\x20for\x20more\x20options';const _0x33cd55=_0x748172[0x0],_0x44c35f=[_0x2a0456(0xaa),_0x2a0456(0xb7),_0x2a0456(0xbc),_0x2a0456(0xb8),_0x2a0456(0xa6),_0x2a0456(0x9e),_0x2a0456(0x9d)];if(!_0x44c35f[_0x2a0456(0xb5)](_0x33cd55))return _0x2a0456(0x9f)+_0x33cd55+_0x2a0456(0xb1)+_0x44c35f['join'](',\x20');if(_0x49a3dc&&_0x33cd55!==_0x2a0456(0xaa)&&_0x33cd55!==_0x2a0456(0x9e))return _0x2a0456(0x9b);return undefined;}async['execute'](_0x6fe338){const _0x573642=a43_0x492c3a,{args:_0x5e9aca,options:_0x4e8c9c}=_0x6fe338,_0x3c7f42=_0x4e8c9c[_0x573642(0xbd)];cleanExpiredSessions();try{const _0x5363d6=_0x5e9aca[0x0],_0x4e7473=a43_0x253f0b['join'](getConfigDir(),_0x573642(0xab));if(_0x3c7f42){if(_0x5363d6===_0x573642(0xaa))return clearDefaultSiteFromUserConfig(),console['log'](_0x573642(0xbb)+a43_0x2c97a4[_0x573642(0xb4)]('cleared')),console[_0x573642(0xa4)](a43_0x2c97a4[_0x573642(0xa3)]('\x0aUpdated:\x20'+_0x4e7473)),0x0;if(_0x5363d6===_0x573642(0x9e))return clearActiveProfileFromUserConfig(),console[_0x573642(0xa4)]('Default\x20profile\x20'+a43_0x2c97a4[_0x573642(0xb4)](_0x573642(0xa7))),console[_0x573642(0xa4)](a43_0x2c97a4[_0x573642(0xa3)](_0x573642(0xa1)+_0x4e7473)),0x0;}const _0x3d0d53=getSessionID(_0x4e8c9c['session']),_0x2503ec={'site':_0x573642(0xaa),'database':_0x573642(0xb7),'parent_segment':_0x573642(0xbc),'llm_project':_0x573642(0xb8),'agent':_0x573642(0xa8),'profile':_0x573642(0x9e),'engage_workspace':_0x573642(0x9d)},_0xb9d41=_0x2503ec[_0x5363d6];return _0xb9d41&&(clearSessionContextField(_0xb9d41,_0x4e8c9c[_0x573642(0xbf)]),console[_0x573642(0xa4)](_0x573642(0xb9)+_0x5363d6+'\x20'+a43_0x2c97a4['green']('cleared')+'\x20'+a43_0x2c97a4[_0x573642(0xa3)](_0x573642(0xaf)+_0x3d0d53+')'))),0x0;}catch(_0x4934ce){return _0x4934ce instanceof Error&&console['error'](_0x573642(0xb3)+_0x4934ce[_0x573642(0x9a)]),0x1;}}}
1
+ const a43_0x21d84f=a43_0x5345;function a43_0x5345(_0x2a8617,_0x18f5eb){_0x2a8617=_0x2a8617-0x89;const _0x38450c=a43_0x3845();let _0x5345a3=_0x38450c[_0x2a8617];return _0x5345a3;}(function(_0x1e81b4,_0x4fac38){const _0x147473=a43_0x5345,_0x2f9fb2=_0x1e81b4();while(!![]){try{const _0x4da8e9=-parseInt(_0x147473(0xb4))/0x1+-parseInt(_0x147473(0xa4))/0x2*(-parseInt(_0x147473(0xb2))/0x3)+parseInt(_0x147473(0x8e))/0x4*(parseInt(_0x147473(0x8c))/0x5)+-parseInt(_0x147473(0x93))/0x6+parseInt(_0x147473(0xb3))/0x7*(-parseInt(_0x147473(0x8f))/0x8)+-parseInt(_0x147473(0xb5))/0x9*(parseInt(_0x147473(0xa6))/0xa)+parseInt(_0x147473(0x95))/0xb;if(_0x4da8e9===_0x4fac38)break;else _0x2f9fb2['push'](_0x2f9fb2['shift']());}catch(_0x109195){_0x2f9fb2['push'](_0x2f9fb2['shift']());}}}(a43_0x3845,0xe8a7e));import{BaseCommand}from'./command.js';import{getSessionID,cleanExpiredSessions,clearSessionContextField}from'../core/session.js';import{clearDefaultSiteFromUserConfig,clearActiveProfileFromUserConfig}from'../core/profile.js';import{getConfigDir}from'../core/config.js';function a43_0x3845(){const _0x4e539b=['site','message','llm_agent','llm_project','tdx.json','includes','Usage:\x20tdx\x20unset\x20<resource>\x0a','Default\x20site\x20','database','\x0aUpdated:\x20','Default\x20profile\x20','error','2138lbiIpY','(session:\x20','5211190CIiMnO','green','name','.\x20Must\x20be\x20one\x20of:\x20','execute','--default\x20can\x20only\x20be\x20used\x20with\x20\x27site\x27\x20or\x20\x27profile\x27.\x20Other\x20resources\x20are\x20session-level\x20only.','default','Invalid\x20resource:\x20','log','dim','agent','engage_workspace','2991oDcVGd','4605391EmPmTB','1821898IhoSBK','9tkWKBF','profile','cleared','session','10hRqUBy','\x20\x20\x20\x20\x20\x20\x20tdx\x20unset\x20--default\x20<resource>\x20\x20#\x20Clear\x20default\x20from\x20config\x0a','3546592VUJUDO','8poAOjV','description','parent_segment','join','3731880LuMheQ','length','19104569pYWYFB','validate','\x0aResources:\x20site,\x20database,\x20parent_segment,\x20llm_project,\x20agent,\x20profile,\x20engage_workspace\x0a'];a43_0x3845=function(){return _0x4e539b;};return a43_0x3845();}import a43_0x42ea0e from'chalk';import*as a43_0x64002e from'node:path';export class UnsetCommand extends BaseCommand{[a43_0x21d84f(0xa8)]='unset';[a43_0x21d84f(0x90)]='Clear\x20session-level\x20or\x20default\x20context\x20values';[a43_0x21d84f(0x96)](_0x2c07e7){const _0x103b59=a43_0x21d84f,{args:_0x2db306,options:_0x205ae6}=_0x2c07e7,_0x3424ee=_0x205ae6[_0x103b59(0xac)];if(_0x2db306[_0x103b59(0x94)]===0x0)return _0x103b59(0x9e)+_0x103b59(0x8d)+_0x103b59(0x97)+'\x0aRun\x20\x27tdx\x20unset\x20--help\x27\x20for\x20more\x20options';const _0x4515f6=_0x2db306[0x0],_0xd9c3a2=[_0x103b59(0x98),_0x103b59(0xa0),_0x103b59(0x91),_0x103b59(0x9b),_0x103b59(0xb0),_0x103b59(0x89),'engage_workspace'];if(!_0xd9c3a2[_0x103b59(0x9d)](_0x4515f6))return _0x103b59(0xad)+_0x4515f6+_0x103b59(0xa9)+_0xd9c3a2[_0x103b59(0x92)](',\x20');if(_0x3424ee&&_0x4515f6!==_0x103b59(0x98)&&_0x4515f6!==_0x103b59(0x89))return _0x103b59(0xab);return undefined;}async[a43_0x21d84f(0xaa)](_0x1e26e5){const _0x512103=a43_0x21d84f,{args:_0x2c3a06,options:_0x4e4432}=_0x1e26e5,_0x169965=_0x4e4432[_0x512103(0xac)];cleanExpiredSessions();try{const _0x569c61=_0x2c3a06[0x0],_0x10a085=a43_0x64002e['join'](getConfigDir(),_0x512103(0x9c));if(_0x169965){if(_0x569c61==='site')return clearDefaultSiteFromUserConfig(),console[_0x512103(0xae)](_0x512103(0x9f)+a43_0x42ea0e[_0x512103(0xa7)](_0x512103(0x8a))),console[_0x512103(0xae)](a43_0x42ea0e['dim'](_0x512103(0xa1)+_0x10a085)),0x0;if(_0x569c61===_0x512103(0x89))return clearActiveProfileFromUserConfig(),console[_0x512103(0xae)](_0x512103(0xa2)+a43_0x42ea0e[_0x512103(0xa7)](_0x512103(0x8a))),console[_0x512103(0xae)](a43_0x42ea0e['dim'](_0x512103(0xa1)+_0x10a085)),0x0;}const _0x3c04b4=getSessionID(_0x4e4432['session']),_0x1b7d34={'site':_0x512103(0x98),'database':_0x512103(0xa0),'parent_segment':_0x512103(0x91),'llm_project':_0x512103(0x9b),'agent':_0x512103(0x9a),'profile':_0x512103(0x89),'engage_workspace':_0x512103(0xb1)},_0x56006f=_0x1b7d34[_0x569c61];return _0x56006f&&(clearSessionContextField(_0x56006f,_0x4e4432[_0x512103(0x8b)]),console[_0x512103(0xae)]('Session\x20'+_0x569c61+'\x20'+a43_0x42ea0e[_0x512103(0xa7)](_0x512103(0x8a))+'\x20'+a43_0x42ea0e[_0x512103(0xaf)](_0x512103(0xa5)+_0x3c04b4+')'))),0x0;}catch(_0x4c9f8a){return _0x4c9f8a instanceof Error&&console[_0x512103(0xa3)]('Error:\x20'+_0x4c9f8a[_0x512103(0x99)]),0x1;}}}
@@ -1 +1 @@
1
- const a44_0x9c1295=a44_0x5acf;(function(_0x31b5cc,_0x5f5d14){const _0x3b2de8=a44_0x5acf,_0x275c66=_0x31b5cc();while(!![]){try{const _0x1a7d9e=-parseInt(_0x3b2de8(0x1fc))/0x1+parseInt(_0x3b2de8(0x1ef))/0x2*(parseInt(_0x3b2de8(0x232))/0x3)+parseInt(_0x3b2de8(0x235))/0x4*(-parseInt(_0x3b2de8(0x210))/0x5)+-parseInt(_0x3b2de8(0x202))/0x6+-parseInt(_0x3b2de8(0x1f4))/0x7*(-parseInt(_0x3b2de8(0x223))/0x8)+parseInt(_0x3b2de8(0x213))/0x9+parseInt(_0x3b2de8(0x221))/0xa*(parseInt(_0x3b2de8(0x211))/0xb);if(_0x1a7d9e===_0x5f5d14)break;else _0x275c66['push'](_0x275c66['shift']());}catch(_0x19b7d7){_0x275c66['push'](_0x275c66['shift']());}}}(a44_0x2cff,0x6aaab));import{BaseCommand}from'./command.js';import{saveSessionContext,getSessionID,cleanExpiredSessions,clearSessionContext}from'../core/session.js';import{profileExists,saveActiveProfileToUserConfig,saveDefaultSiteToUserConfig}from'../core/profile.js';import{GlobalContext}from'../core/global-context.js';import{parseAgentRef}from'../sdk/agent/agent-ref-parser.js';function a44_0x5acf(_0x28c3bd,_0x4b10bd){_0x28c3bd=_0x28c3bd-0x1ea;const _0x2cff50=a44_0x2cff();let _0x5acfa4=_0x2cff50[_0x28c3bd];return _0x5acfa4;}function a44_0x2cff(){const _0x37797e=['green','site','\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20--default\x20release_channel\x20<stable|next>\x20\x20#\x20Set\x20release\x20channel\x0a','418092GjPZXT','llm_agent','agent','\x27\x20does\x20not\x20exist','join','Install\x20the\x20latest\x20next\x20version:\x20npm\x20install\x20-g\x20@treasuredata/tdx@next','3564738RwoLfR','message','\x0aSaved\x20to:\x20','engage','debug','includes','llm_project','Session\x20context\x20','Verifying\x20workspace\x20\x27','Default\x20site\x20set\x20to:\x20','\x0aSet\x20context:\x20tdx\x20use\x20<resource>\x20<value>','database','\x0aRun\x20\x27tdx\x20use\x20--help\x27\x20for\x20more\x20options','clear','245yiXxLR','23804KlUUBw','Error:\x20','3433302izmpuG','length','displayWithSources','\x27\x20to\x20save\x20permanently','name','\x0aUpdate\x20notifications\x20will\x20check\x20the\x20@latest\x20(stable)\x20channel.','tdx','next','\x27...','Session\x20site\x20set\x20to:\x20','Release\x20channel\x20set\x20to:\x20','Default\x20profile\x20set\x20to:\x20','display','\x0aTip:\x20Use\x20\x27tdx\x20use\x20--clear\x27\x20to\x20clear\x20session\x20overrides','1640WhgdjV','dim','8mWfbwl','default','\x0aTip:\x20Use\x20\x27tdx\x20use\x20--default\x20site\x20','Session\x20profile\x20set\x20to:\x20','\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20--clear\x20\x20\x20\x20\x20\x20#\x20Clear\x20session\x20context\x0a','description','Usage:\x20tdx\x20use\x20<resource>\x20<value>\x0a','Invalid\x20release\x20channel:\x20','NOT_FOUND','release_channel','profile','log','Session\x20parent_segment\x20set\x20to:\x20','code','error','1057836JluPOm','INVALID_ARGUMENT','Session\x20llm_project\x20set\x20to:\x20','16044zAtWCP','Session\x20agent\x20set\x20to:\x20','Set\x20session-level\x20context','use','.\x20Must\x20be\x20\x27stable\x27\x20or\x20\x27next\x27.','.\x20Must\x20be\x20one\x20of:\x20','(session:\x20','tdx.json','session','Error:\x20Profile\x20\x27','parent_segment','4sDfosg','\x0aUse\x20\x27tdx\x20engage\x20workspace\x20list\x27\x20to\x20see\x20available\x20workspaces','Invalid\x20resource:\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','cleared','1428441LHgDjr','engage_workspace','\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20--default\x20profile\x20<value>\x20\x20#\x20Save\x20default\x20profile\x20to\x20config\x0a','Session\x20database\x20set\x20to:\x20','\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20--default\x20site\x20<value>\x20\x20\x20\x20\x20#\x20Save\x20default\x20site\x20to\x20config\x0a'];a44_0x2cff=function(){return _0x37797e;};return a44_0x2cff();}import{getConfigDir,saveReleaseChannel}from'../core/config.js';import{SDKError,ErrorCode}from'../sdk/errors.js';import{withSpinner}from'../utils/spinner.js';import a44_0x1cac49 from'chalk';import*as a44_0x38db2f from'node:path';export class UseCommand extends BaseCommand{[a44_0x9c1295(0x217)]=a44_0x9c1295(0x238);[a44_0x9c1295(0x228)]=a44_0x9c1295(0x237);['validate'](_0x3ee340){const _0x21dbd7=a44_0x9c1295,{args:_0x3a618d,options:_0x39368d}=_0x3ee340,_0x10988a=_0x39368d[_0x21dbd7(0x224)];if(_0x3a618d[_0x21dbd7(0x214)]===0x0)return undefined;if(_0x3a618d[_0x21dbd7(0x214)]===0x1)return _0x21dbd7(0x229)+_0x21dbd7(0x1f2)+_0x21dbd7(0x227)+_0x21dbd7(0x1f8)+_0x21dbd7(0x1f6)+_0x21dbd7(0x1fb)+'\x0aResources:\x20site,\x20database,\x20parent_segment,\x20llm_project,\x20agent,\x20profile,\x20engage_workspace,\x20release_channel\x0a'+_0x21dbd7(0x20e);const _0x4bd75e=_0x3a618d[0x0],_0x42d254=['site',_0x21dbd7(0x20d),_0x21dbd7(0x1ee),_0x21dbd7(0x208),_0x21dbd7(0x1fe),_0x21dbd7(0x22d),_0x21dbd7(0x1f5),_0x21dbd7(0x22c)];if(!_0x42d254[_0x21dbd7(0x207)](_0x4bd75e))return _0x21dbd7(0x1f1)+_0x4bd75e+_0x21dbd7(0x23a)+_0x42d254[_0x21dbd7(0x200)](',\x20');if(_0x10988a&&_0x4bd75e!==_0x21dbd7(0x1fa)&&_0x4bd75e!==_0x21dbd7(0x22d)&&_0x4bd75e!==_0x21dbd7(0x22c))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(_0x4bd75e==='release_channel'&&!_0x10988a)return'release_channel\x20requires\x20--default.\x20Usage:\x20tdx\x20use\x20--default\x20release_channel\x20<stable|next>';if(_0x4bd75e===_0x21dbd7(0x22c)){const _0x158496=_0x3a618d[0x1];if(_0x158496!=='stable'&&_0x158496!==_0x21dbd7(0x21a))return _0x21dbd7(0x22a)+_0x158496+_0x21dbd7(0x239);}return undefined;}async['execute'](_0x2dbf18){const _0x457566=a44_0x9c1295,{args:_0x406c40,options:_0xd7b99a}=_0x2dbf18,_0x6ab1f6=_0xd7b99a[_0x457566(0x206)],_0x1132f9=_0xd7b99a[_0x457566(0x20f)],_0xe33289=_0xd7b99a[_0x457566(0x224)];cleanExpiredSessions();try{if(_0x1132f9){clearSessionContext(_0xd7b99a[_0x457566(0x1ec)]);const _0x490820=getSessionID(_0xd7b99a[_0x457566(0x1ec)]);return console[_0x457566(0x22e)](_0x457566(0x209)+a44_0x1cac49[_0x457566(0x1f9)](_0x457566(0x1f3))+'\x20'+a44_0x1cac49[_0x457566(0x222)]('(session:\x20'+_0x490820+')')),0x0;}if(_0x406c40[_0x457566(0x214)]===0x0){const _0x57c5e8=new GlobalContext(_0xd7b99a);return _0x6ab1f6?_0x57c5e8[_0x457566(0x215)]():_0x57c5e8[_0x457566(0x21f)](),console[_0x457566(0x22e)](a44_0x1cac49[_0x457566(0x222)](_0x457566(0x20c))),console['log'](a44_0x1cac49[_0x457566(0x222)]('Resources:\x20site,\x20database,\x20parent_segment,\x20llm_project,\x20agent,\x20profile,\x20engage_workspace,\x20release_channel')),console[_0x457566(0x22e)](a44_0x1cac49['dim']('Use\x20--default\x20with\x20site,\x20profile,\x20or\x20release_channel\x20to\x20save\x20permanently')),0x0;}const _0x54ae=_0x406c40[0x0],_0x48c472=_0x406c40[0x1],_0x53b570=a44_0x38db2f['join'](getConfigDir(),_0x457566(0x1eb));if(_0xe33289){if(_0x54ae===_0x457566(0x1fa))return saveDefaultSiteToUserConfig(_0x48c472),console['log'](_0x457566(0x20b)+a44_0x1cac49[_0x457566(0x1f9)](_0x48c472)),console[_0x457566(0x22e)](a44_0x1cac49['dim'](_0x457566(0x204)+_0x53b570)),0x0;if(_0x54ae==='profile'){if(!profileExists(_0x48c472))return console[_0x457566(0x231)](_0x457566(0x1ed)+_0x48c472+_0x457566(0x1ff)),console['error']('\x0aUse\x20\x27tdx\x20profiles\x27\x20to\x20see\x20available\x20profiles'),0x1;return saveActiveProfileToUserConfig(_0x48c472),console[_0x457566(0x22e)](_0x457566(0x21e)+a44_0x1cac49[_0x457566(0x1f9)](_0x48c472)),console['log'](a44_0x1cac49[_0x457566(0x222)](_0x457566(0x204)+_0x53b570)),0x0;}if(_0x54ae==='release_channel')return saveReleaseChannel(_0x48c472),console[_0x457566(0x22e)](_0x457566(0x21d)+a44_0x1cac49[_0x457566(0x1f9)](_0x48c472)),console[_0x457566(0x22e)](a44_0x1cac49[_0x457566(0x222)](_0x457566(0x204)+_0x53b570)),_0x48c472===_0x457566(0x21a)?(console['log'](a44_0x1cac49[_0x457566(0x222)]('\x0aUpdate\x20notifications\x20will\x20now\x20check\x20the\x20@next\x20channel.')),console[_0x457566(0x22e)](a44_0x1cac49[_0x457566(0x222)](_0x457566(0x201)))):console['log'](a44_0x1cac49['dim'](_0x457566(0x218))),0x0;}if(_0x54ae===_0x457566(0x1fa)){const _0x879381=getSessionID(_0xd7b99a[_0x457566(0x1ec)]);return saveSessionContext({'site':_0x48c472},_0xd7b99a[_0x457566(0x1ec)]),console[_0x457566(0x22e)](_0x457566(0x21c)+a44_0x1cac49[_0x457566(0x1f9)](_0x48c472)+'\x20'+a44_0x1cac49[_0x457566(0x222)](_0x457566(0x1ea)+_0x879381+')')),console[_0x457566(0x22e)](a44_0x1cac49[_0x457566(0x222)](_0x457566(0x225)+_0x48c472+'\x27\x20to\x20save\x20permanently')),0x0;}if(_0x54ae===_0x457566(0x22d)){if(!profileExists(_0x48c472))return console[_0x457566(0x231)](_0x457566(0x1ed)+_0x48c472+_0x457566(0x1ff)),console['error']('\x0aUse\x20\x27tdx\x20profiles\x27\x20to\x20see\x20available\x20profiles'),0x1;const _0x4d2e84=getSessionID(_0xd7b99a[_0x457566(0x1ec)]);return saveSessionContext({'profile':_0x48c472},_0xd7b99a[_0x457566(0x1ec)]),console[_0x457566(0x22e)](_0x457566(0x226)+a44_0x1cac49[_0x457566(0x1f9)](_0x48c472)+'\x20'+a44_0x1cac49['dim'](_0x457566(0x1ea)+_0x4d2e84+')')),console[_0x457566(0x22e)](a44_0x1cac49['dim']('\x0aTip:\x20Use\x20\x27tdx\x20use\x20--default\x20profile\x20'+_0x48c472+_0x457566(0x216))),0x0;}const _0x35fa48={},_0x1e54a5=getSessionID(_0xd7b99a[_0x457566(0x1ec)]);switch(_0x54ae){case _0x457566(0x20d):_0x35fa48[_0x457566(0x20d)]=_0x48c472,console['log'](_0x457566(0x1f7)+a44_0x1cac49[_0x457566(0x1f9)](_0x48c472)+'\x20'+a44_0x1cac49[_0x457566(0x222)](_0x457566(0x1ea)+_0x1e54a5+')'));break;case _0x457566(0x1ee):_0x35fa48['parent_segment']=_0x48c472,console[_0x457566(0x22e)](_0x457566(0x22f)+a44_0x1cac49['green'](_0x48c472)+'\x20'+a44_0x1cac49[_0x457566(0x222)]('(session:\x20'+_0x1e54a5+')'));break;case _0x457566(0x208):_0x35fa48[_0x457566(0x208)]=_0x48c472,console['log'](_0x457566(0x234)+a44_0x1cac49['green'](_0x48c472)+'\x20'+a44_0x1cac49['dim'](_0x457566(0x1ea)+_0x1e54a5+')'));break;case _0x457566(0x1fe):{const {projectName:_0x3a7a96,agentName:_0x39bf2a}=parseAgentRef(_0x48c472);_0x39bf2a?(_0x35fa48['llm_project']=_0x3a7a96,_0x35fa48[_0x457566(0x1fd)]=_0x39bf2a,console[_0x457566(0x22e)]('Session\x20llm_project\x20set\x20to:\x20'+a44_0x1cac49[_0x457566(0x1f9)](_0x3a7a96)+'\x20'+a44_0x1cac49[_0x457566(0x222)]('(session:\x20'+_0x1e54a5+')')),console['log'](_0x457566(0x236)+a44_0x1cac49['green'](_0x39bf2a)+'\x20'+a44_0x1cac49[_0x457566(0x222)]('(session:\x20'+_0x1e54a5+')'))):(_0x35fa48[_0x457566(0x1fd)]=_0x48c472,console[_0x457566(0x22e)](_0x457566(0x236)+a44_0x1cac49[_0x457566(0x1f9)](_0x48c472)+'\x20'+a44_0x1cac49[_0x457566(0x222)](_0x457566(0x1ea)+_0x1e54a5+')')));break;}case'engage_workspace':{try{await withSpinner(_0x457566(0x20a)+_0x48c472+_0x457566(0x21b),()=>_0x2dbf18[_0x457566(0x219)][_0x457566(0x205)]['resolveWorkspaceId'](_0x48c472));}catch(_0x1657c1){if(_0x1657c1 instanceof SDKError&&(_0x1657c1[_0x457566(0x230)]===ErrorCode[_0x457566(0x22b)]||_0x1657c1['code']===ErrorCode[_0x457566(0x233)]))return console[_0x457566(0x231)](_0x457566(0x212)+_0x1657c1[_0x457566(0x203)]),console[_0x457566(0x231)](_0x457566(0x1f0)),0x1;throw _0x1657c1;}_0x35fa48['engage_workspace']=_0x48c472,console[_0x457566(0x22e)]('Session\x20engage_workspace\x20set\x20to:\x20'+a44_0x1cac49[_0x457566(0x1f9)](_0x48c472)+'\x20'+a44_0x1cac49['dim']('(session:\x20'+_0x1e54a5+')'));break;}}return saveSessionContext(_0x35fa48,_0xd7b99a[_0x457566(0x1ec)]),console[_0x457566(0x22e)](a44_0x1cac49[_0x457566(0x222)](_0x457566(0x220))),0x0;}catch(_0x398f3c){return _0x398f3c instanceof Error&&console['error'](_0x457566(0x212)+_0x398f3c[_0x457566(0x203)]),0x1;}}}
1
+ const a44_0x13f190=a44_0x4a3d;(function(_0x509ba1,_0x10baf3){const _0x158c03=a44_0x4a3d,_0x30b2dc=_0x509ba1();while(!![]){try{const _0x3b9a47=-parseInt(_0x158c03(0x138))/0x1*(parseInt(_0x158c03(0x15f))/0x2)+-parseInt(_0x158c03(0x17e))/0x3*(parseInt(_0x158c03(0x139))/0x4)+parseInt(_0x158c03(0x130))/0x5*(-parseInt(_0x158c03(0x14b))/0x6)+parseInt(_0x158c03(0x148))/0x7*(-parseInt(_0x158c03(0x176))/0x8)+parseInt(_0x158c03(0x173))/0x9+-parseInt(_0x158c03(0x164))/0xa+parseInt(_0x158c03(0x170))/0xb*(parseInt(_0x158c03(0x15c))/0xc);if(_0x3b9a47===_0x10baf3)break;else _0x30b2dc['push'](_0x30b2dc['shift']());}catch(_0x41372b){_0x30b2dc['push'](_0x30b2dc['shift']());}}}(a44_0x34d7,0x5aeed));import{BaseCommand}from'./command.js';import{saveSessionContext,getSessionID,cleanExpiredSessions,clearSessionContext}from'../core/session.js';import{profileExists,saveActiveProfileToUserConfig,saveDefaultSiteToUserConfig}from'../core/profile.js';import{GlobalContext}from'../core/global-context.js';import{parseAgentRef}from'../sdk/agent/agent-ref-parser.js';import{getConfigDir,saveReleaseChannel}from'../core/config.js';function a44_0x4a3d(_0x18c1c0,_0x4c98f4){_0x18c1c0=_0x18c1c0-0x12e;const _0x34d7e9=a44_0x34d7();let _0x4a3d39=_0x34d7e9[_0x18c1c0];return _0x4a3d39;}import{SDKError,ErrorCode}from'../sdk/errors.js';import{withSpinner}from'../utils/spinner.js';import a44_0x1580fb from'chalk';function a44_0x34d7(){const _0x1851ed=['\x0aSaved\x20to:\x20','tdx.json','agent','log','12VFvdlm','tdx','\x0aSet\x20context:\x20tdx\x20use\x20<resource>\x20<value>','16246whLLLD','profile','Install\x20the\x20latest\x20next\x20version:\x20npm\x20install\x20-g\x20@treasuredata/tdx@next','Session\x20context\x20','\x0aUse\x20\x27tdx\x20profiles\x27\x20to\x20see\x20available\x20profiles','2106810flQYCf','\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20--clear\x20\x20\x20\x20\x20\x20#\x20Clear\x20session\x20context\x0a','name','Set\x20session-level\x20context','Error:\x20Profile\x20\x27','engage_workspace','\x0aTip:\x20Use\x20\x27tdx\x20use\x20--default\x20site\x20','Use\x20--default\x20with\x20site,\x20profile,\x20or\x20release_channel\x20to\x20save\x20permanently','debug','\x0aResources:\x20site,\x20database,\x20parent_segment,\x20llm_project,\x20agent,\x20profile,\x20engage_workspace,\x20release_channel\x0a','engage','Default\x20profile\x20set\x20to:\x20','21480107VZOtqi','release_channel','dim','2160288khMIrq','release_channel\x20requires\x20--default.\x20Usage:\x20tdx\x20use\x20--default\x20release_channel\x20<stable|next>','\x27...','7784FYDWhH','llm_project','Error:\x20','Session\x20parent_segment\x20set\x20to:\x20','Release\x20channel\x20set\x20to:\x20','site','--default\x20can\x20only\x20be\x20used\x20with\x20\x27site\x27,\x20\x27profile\x27,\x20or\x20\x27release_channel\x27.\x20Other\x20resources\x20are\x20session-level\x20only.','clear','3dlNDkN','.\x20Must\x20be\x20one\x20of:\x20','green','database','\x0aTip:\x20Use\x20\x27tdx\x20use\x20--clear\x27\x20to\x20clear\x20session\x20overrides','\x0aUpdate\x20notifications\x20will\x20now\x20check\x20the\x20@next\x20channel.','145NacCjD','\x0aUpdate\x20notifications\x20will\x20check\x20the\x20@latest\x20(stable)\x20channel.','join','Default\x20site\x20set\x20to:\x20','Session\x20profile\x20set\x20to:\x20','NOT_FOUND','displayWithSources','validate','37BMLaCr','2493688BNCpko','next','\x27\x20does\x20not\x20exist','Session\x20agent\x20set\x20to:\x20','Verifying\x20workspace\x20\x27','Invalid\x20release\x20channel:\x20','includes','message','\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20--default\x20release_channel\x20<stable|next>\x20\x20#\x20Set\x20release\x20channel\x0a','Session\x20database\x20set\x20to:\x20','session','(session:\x20','description','llm_agent','error','371EBOXML','code','\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20--default\x20profile\x20<value>\x20\x20#\x20Save\x20default\x20profile\x20to\x20config\x0a','131190aROPbL','\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20current\x20context\x0a','length','stable','\x0aTip:\x20Use\x20\x27tdx\x20use\x20--default\x20profile\x20','.\x20Must\x20be\x20\x27stable\x27\x20or\x20\x27next\x27.','parent_segment','Session\x20site\x20set\x20to:\x20','INVALID_ARGUMENT','\x27\x20to\x20save\x20permanently','\x0aUse\x20\x27tdx\x20engage\x20workspace\x20list\x27\x20to\x20see\x20available\x20workspaces','Session\x20engage_workspace\x20set\x20to:\x20','execute'];a44_0x34d7=function(){return _0x1851ed;};return a44_0x34d7();}import*as a44_0x1c40ea from'node:path';export class UseCommand extends BaseCommand{[a44_0x13f190(0x166)]='use';[a44_0x13f190(0x145)]=a44_0x13f190(0x167);[a44_0x13f190(0x137)](_0x75427f){const _0x2d56df=a44_0x13f190,{args:_0x31fae3,options:_0x51f410}=_0x75427f,_0x2f63c8=_0x51f410['default'];if(_0x31fae3[_0x2d56df(0x14d)]===0x0)return undefined;if(_0x31fae3[_0x2d56df(0x14d)]===0x1)return'Usage:\x20tdx\x20use\x20<resource>\x20<value>\x0a'+_0x2d56df(0x14c)+_0x2d56df(0x165)+'\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20--default\x20site\x20<value>\x20\x20\x20\x20\x20#\x20Save\x20default\x20site\x20to\x20config\x0a'+_0x2d56df(0x14a)+_0x2d56df(0x141)+_0x2d56df(0x16d)+'\x0aRun\x20\x27tdx\x20use\x20--help\x27\x20for\x20more\x20options';const _0x30a191=_0x31fae3[0x0],_0xc3e1b3=['site',_0x2d56df(0x181),'parent_segment',_0x2d56df(0x177),_0x2d56df(0x15a),_0x2d56df(0x160),_0x2d56df(0x169),_0x2d56df(0x171)];if(!_0xc3e1b3[_0x2d56df(0x13f)](_0x30a191))return'Invalid\x20resource:\x20'+_0x30a191+_0x2d56df(0x17f)+_0xc3e1b3['join'](',\x20');if(_0x2f63c8&&_0x30a191!==_0x2d56df(0x17b)&&_0x30a191!==_0x2d56df(0x160)&&_0x30a191!==_0x2d56df(0x171))return _0x2d56df(0x17c);if(_0x30a191===_0x2d56df(0x171)&&!_0x2f63c8)return _0x2d56df(0x174);if(_0x30a191===_0x2d56df(0x171)){const _0x75e158=_0x31fae3[0x1];if(_0x75e158!==_0x2d56df(0x14e)&&_0x75e158!==_0x2d56df(0x13a))return _0x2d56df(0x13e)+_0x75e158+_0x2d56df(0x150);}return undefined;}async[a44_0x13f190(0x157)](_0x580337){const _0x1c3a42=a44_0x13f190,{args:_0x4483ec,options:_0x30ccee}=_0x580337,_0x515e71=_0x30ccee[_0x1c3a42(0x16c)],_0x23d20d=_0x30ccee[_0x1c3a42(0x17d)],_0x1e674a=_0x30ccee['default'];cleanExpiredSessions();try{if(_0x23d20d){clearSessionContext(_0x30ccee[_0x1c3a42(0x143)]);const _0x1e5348=getSessionID(_0x30ccee['session']);return console[_0x1c3a42(0x15b)](_0x1c3a42(0x162)+a44_0x1580fb['green']('cleared')+'\x20'+a44_0x1580fb[_0x1c3a42(0x172)](_0x1c3a42(0x144)+_0x1e5348+')')),0x0;}if(_0x4483ec[_0x1c3a42(0x14d)]===0x0){const _0x34e311=new GlobalContext(_0x30ccee);return _0x515e71?_0x34e311[_0x1c3a42(0x136)]():_0x34e311['display'](),console[_0x1c3a42(0x15b)](a44_0x1580fb[_0x1c3a42(0x172)](_0x1c3a42(0x15e))),console[_0x1c3a42(0x15b)](a44_0x1580fb['dim']('Resources:\x20site,\x20database,\x20parent_segment,\x20llm_project,\x20agent,\x20profile,\x20engage_workspace,\x20release_channel')),console[_0x1c3a42(0x15b)](a44_0x1580fb[_0x1c3a42(0x172)](_0x1c3a42(0x16b))),0x0;}const _0x30673c=_0x4483ec[0x0],_0x5160a9=_0x4483ec[0x1],_0x5e125e=a44_0x1c40ea[_0x1c3a42(0x132)](getConfigDir(),_0x1c3a42(0x159));if(_0x1e674a){if(_0x30673c===_0x1c3a42(0x17b))return saveDefaultSiteToUserConfig(_0x5160a9),console[_0x1c3a42(0x15b)](_0x1c3a42(0x133)+a44_0x1580fb[_0x1c3a42(0x180)](_0x5160a9)),console['log'](a44_0x1580fb['dim'](_0x1c3a42(0x158)+_0x5e125e)),0x0;if(_0x30673c===_0x1c3a42(0x160)){if(!profileExists(_0x5160a9))return console[_0x1c3a42(0x147)](_0x1c3a42(0x168)+_0x5160a9+'\x27\x20does\x20not\x20exist'),console['error'](_0x1c3a42(0x163)),0x1;return saveActiveProfileToUserConfig(_0x5160a9),console[_0x1c3a42(0x15b)](_0x1c3a42(0x16f)+a44_0x1580fb[_0x1c3a42(0x180)](_0x5160a9)),console['log'](a44_0x1580fb[_0x1c3a42(0x172)]('\x0aSaved\x20to:\x20'+_0x5e125e)),0x0;}if(_0x30673c===_0x1c3a42(0x171))return saveReleaseChannel(_0x5160a9),console[_0x1c3a42(0x15b)](_0x1c3a42(0x17a)+a44_0x1580fb[_0x1c3a42(0x180)](_0x5160a9)),console[_0x1c3a42(0x15b)](a44_0x1580fb['dim']('\x0aSaved\x20to:\x20'+_0x5e125e)),_0x5160a9===_0x1c3a42(0x13a)?(console[_0x1c3a42(0x15b)](a44_0x1580fb['dim'](_0x1c3a42(0x12f))),console[_0x1c3a42(0x15b)](a44_0x1580fb[_0x1c3a42(0x172)](_0x1c3a42(0x161)))):console[_0x1c3a42(0x15b)](a44_0x1580fb['dim'](_0x1c3a42(0x131))),0x0;}if(_0x30673c==='site'){const _0x380a73=getSessionID(_0x30ccee[_0x1c3a42(0x143)]);return saveSessionContext({'site':_0x5160a9},_0x30ccee['session']),console['log'](_0x1c3a42(0x152)+a44_0x1580fb[_0x1c3a42(0x180)](_0x5160a9)+'\x20'+a44_0x1580fb['dim'](_0x1c3a42(0x144)+_0x380a73+')')),console['log'](a44_0x1580fb[_0x1c3a42(0x172)](_0x1c3a42(0x16a)+_0x5160a9+_0x1c3a42(0x154))),0x0;}if(_0x30673c===_0x1c3a42(0x160)){if(!profileExists(_0x5160a9))return console['error'](_0x1c3a42(0x168)+_0x5160a9+_0x1c3a42(0x13b)),console[_0x1c3a42(0x147)]('\x0aUse\x20\x27tdx\x20profiles\x27\x20to\x20see\x20available\x20profiles'),0x1;const _0x6d6d0c=getSessionID(_0x30ccee['session']);return saveSessionContext({'profile':_0x5160a9},_0x30ccee[_0x1c3a42(0x143)]),console[_0x1c3a42(0x15b)](_0x1c3a42(0x134)+a44_0x1580fb['green'](_0x5160a9)+'\x20'+a44_0x1580fb[_0x1c3a42(0x172)](_0x1c3a42(0x144)+_0x6d6d0c+')')),console['log'](a44_0x1580fb['dim'](_0x1c3a42(0x14f)+_0x5160a9+_0x1c3a42(0x154))),0x0;}const _0x532e04={},_0x59d113=getSessionID(_0x30ccee[_0x1c3a42(0x143)]);switch(_0x30673c){case _0x1c3a42(0x181):_0x532e04[_0x1c3a42(0x181)]=_0x5160a9,console[_0x1c3a42(0x15b)](_0x1c3a42(0x142)+a44_0x1580fb[_0x1c3a42(0x180)](_0x5160a9)+'\x20'+a44_0x1580fb[_0x1c3a42(0x172)](_0x1c3a42(0x144)+_0x59d113+')'));break;case _0x1c3a42(0x151):_0x532e04[_0x1c3a42(0x151)]=_0x5160a9,console[_0x1c3a42(0x15b)](_0x1c3a42(0x179)+a44_0x1580fb[_0x1c3a42(0x180)](_0x5160a9)+'\x20'+a44_0x1580fb[_0x1c3a42(0x172)](_0x1c3a42(0x144)+_0x59d113+')'));break;case'llm_project':_0x532e04[_0x1c3a42(0x177)]=_0x5160a9,console[_0x1c3a42(0x15b)]('Session\x20llm_project\x20set\x20to:\x20'+a44_0x1580fb[_0x1c3a42(0x180)](_0x5160a9)+'\x20'+a44_0x1580fb[_0x1c3a42(0x172)](_0x1c3a42(0x144)+_0x59d113+')'));break;case _0x1c3a42(0x15a):{const {projectName:_0x35a673,agentName:_0x3e794b}=parseAgentRef(_0x5160a9);_0x3e794b?(_0x532e04[_0x1c3a42(0x177)]=_0x35a673,_0x532e04['llm_agent']=_0x3e794b,console[_0x1c3a42(0x15b)]('Session\x20llm_project\x20set\x20to:\x20'+a44_0x1580fb['green'](_0x35a673)+'\x20'+a44_0x1580fb[_0x1c3a42(0x172)](_0x1c3a42(0x144)+_0x59d113+')')),console[_0x1c3a42(0x15b)](_0x1c3a42(0x13c)+a44_0x1580fb[_0x1c3a42(0x180)](_0x3e794b)+'\x20'+a44_0x1580fb[_0x1c3a42(0x172)](_0x1c3a42(0x144)+_0x59d113+')'))):(_0x532e04[_0x1c3a42(0x146)]=_0x5160a9,console['log'](_0x1c3a42(0x13c)+a44_0x1580fb['green'](_0x5160a9)+'\x20'+a44_0x1580fb[_0x1c3a42(0x172)](_0x1c3a42(0x144)+_0x59d113+')')));break;}case _0x1c3a42(0x169):{try{await withSpinner(_0x1c3a42(0x13d)+_0x5160a9+_0x1c3a42(0x175),()=>_0x580337[_0x1c3a42(0x15d)][_0x1c3a42(0x16e)]['resolveWorkspaceId'](_0x5160a9));}catch(_0xc4317f){if(_0xc4317f instanceof SDKError&&(_0xc4317f[_0x1c3a42(0x149)]===ErrorCode[_0x1c3a42(0x135)]||_0xc4317f['code']===ErrorCode[_0x1c3a42(0x153)]))return console[_0x1c3a42(0x147)](_0x1c3a42(0x178)+_0xc4317f[_0x1c3a42(0x140)]),console[_0x1c3a42(0x147)](_0x1c3a42(0x155)),0x1;throw _0xc4317f;}_0x532e04[_0x1c3a42(0x169)]=_0x5160a9,console['log'](_0x1c3a42(0x156)+a44_0x1580fb[_0x1c3a42(0x180)](_0x5160a9)+'\x20'+a44_0x1580fb['dim'](_0x1c3a42(0x144)+_0x59d113+')'));break;}}return saveSessionContext(_0x532e04,_0x30ccee[_0x1c3a42(0x143)]),console[_0x1c3a42(0x15b)](a44_0x1580fb[_0x1c3a42(0x172)](_0x1c3a42(0x12e))),0x0;}catch(_0x11976e){return _0x11976e instanceof Error&&console[_0x1c3a42(0x147)]('Error:\x20'+_0x11976e[_0x1c3a42(0x140)]),0x1;}}}
@@ -1 +1 @@
1
- const a45_0x1a9cca=a45_0xa549;(function(_0x4e16f5,_0x6b6dcc){const _0x1548cb=a45_0xa549,_0x11b290=_0x4e16f5();while(!![]){try{const _0x255ceb=-parseInt(_0x1548cb(0x157))/0x1+-parseInt(_0x1548cb(0x162))/0x2*(parseInt(_0x1548cb(0x14a))/0x3)+-parseInt(_0x1548cb(0x150))/0x4*(parseInt(_0x1548cb(0x14b))/0x5)+-parseInt(_0x1548cb(0x156))/0x6+-parseInt(_0x1548cb(0x158))/0x7*(parseInt(_0x1548cb(0x15c))/0x8)+-parseInt(_0x1548cb(0x15a))/0x9+parseInt(_0x1548cb(0x14e))/0xa*(parseInt(_0x1548cb(0x148))/0xb);if(_0x255ceb===_0x6b6dcc)break;else _0x11b290['push'](_0x11b290['shift']());}catch(_0x414629){_0x11b290['push'](_0x11b290['shift']());}}}(a45_0x1fd7,0x6feec));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleSDKOutput,handleSingleObjectOutput}from'../core/command-output.js';function a45_0xa549(_0x533433,_0xa2fc8e){_0x533433=_0x533433-0x148;const _0x1fd7a8=a45_0x1fd7();let _0xa549dd=_0x1fd7a8[_0x533433];return _0xa549dd;}import{withSpinner}from'../utils/spinner.js';function a45_0x1fd7(){const _0x36295b=['51220dFscYK','data','error','7930aEvCAm','✔\x20Found\x20','312XZwqtw','message','Error:\x20','user\x20list','Listing\x20users...','cause','3535176TfjrIG','295057rYSEfQ','24675KpOfhB','length','3472920IVCDMA','name','936QwFFUj','Show\x20current\x20user\x20information','getCurrent','description','user','verbose','46fGVXnN','Fetching\x20user\x20info...','42779mFqvLw','execute','18771teIDzv'];a45_0x1fd7=function(){return _0x36295b;};return a45_0x1fd7();}export class UserCommand extends BaseCommand{['name']=a45_0x1a9cca(0x160);[a45_0x1a9cca(0x15f)]=a45_0x1a9cca(0x15d);async[a45_0x1a9cca(0x149)](_0x23ee21){const _0x239ee2=a45_0x1a9cca,{options:_0x52cef7,tdx:_0x11ed5f}=_0x23ee21;try{const _0x460a20=await withSpinner(_0x239ee2(0x163),()=>_0x11ed5f[_0x239ee2(0x160)][_0x239ee2(0x15e)](),{'verbose':_0x52cef7['verbose']}),_0x36d2b5=_0x460a20[_0x239ee2(0x14c)];return await handleSingleObjectOutput(_0x36d2b5,_0x52cef7),0x0;}catch(_0x1b9c59){if(_0x1b9c59 instanceof SDKError)return console[_0x239ee2(0x14d)](_0x239ee2(0x152)+_0x1b9c59[_0x239ee2(0x151)]),_0x1b9c59[_0x239ee2(0x155)]&&console['error']('\x20\x20Cause:\x20'+_0x1b9c59[_0x239ee2(0x155)]),0x1;throw _0x1b9c59;}}}export class UserListCommand extends BaseCommand{[a45_0x1a9cca(0x15b)]=a45_0x1a9cca(0x153);['description']='List\x20all\x20users\x20in\x20the\x20account';async[a45_0x1a9cca(0x149)](_0xf8bc16){const _0x43a9b9=a45_0x1a9cca,{options:_0x267881,tdx:_0x2a607a}=_0xf8bc16;try{const _0x4c9de6=await withSpinner(_0x43a9b9(0x154),()=>_0x2a607a['user']['list'](),{'verbose':_0x267881[_0x43a9b9(0x161)]}),_0x57a2e9=_0x4c9de6[_0x43a9b9(0x14c)];return console['error'](_0x43a9b9(0x14f)+_0x57a2e9[_0x43a9b9(0x159)]+'\x20user'+(_0x57a2e9[_0x43a9b9(0x159)]!==0x1?'s':'')),await handleSDKOutput(_0x57a2e9,_0x267881),0x0;}catch(_0x4cb568){if(_0x4cb568 instanceof SDKError)return console[_0x43a9b9(0x14d)](_0x43a9b9(0x152)+_0x4cb568[_0x43a9b9(0x151)]),_0x4cb568[_0x43a9b9(0x155)]&&console[_0x43a9b9(0x14d)]('\x20\x20Cause:\x20'+_0x4cb568[_0x43a9b9(0x155)]),0x1;throw _0x4cb568;}}}
1
+ const a45_0x3b9456=a45_0x1650;(function(_0x42d01f,_0x4f1b66){const _0x135806=a45_0x1650,_0x4aea55=_0x42d01f();while(!![]){try{const _0x421d2c=-parseInt(_0x135806(0x161))/0x1*(parseInt(_0x135806(0x154))/0x2)+parseInt(_0x135806(0x159))/0x3+parseInt(_0x135806(0x15c))/0x4*(parseInt(_0x135806(0x15b))/0x5)+-parseInt(_0x135806(0x147))/0x6+parseInt(_0x135806(0x153))/0x7+-parseInt(_0x135806(0x14d))/0x8*(parseInt(_0x135806(0x14a))/0x9)+parseInt(_0x135806(0x155))/0xa;if(_0x421d2c===_0x4f1b66)break;else _0x4aea55['push'](_0x4aea55['shift']());}catch(_0x5609ae){_0x4aea55['push'](_0x4aea55['shift']());}}}(a45_0x4669,0xcb24d));import{BaseCommand}from'./command.js';function a45_0x1650(_0x349177,_0x4239fc){_0x349177=_0x349177-0x147;const _0x466900=a45_0x4669();let _0x1650e4=_0x466900[_0x349177];return _0x1650e4;}import{SDKError}from'../sdk/index.js';import{handleSDKOutput,handleSingleObjectOutput}from'../core/command-output.js';function a45_0x4669(){const _0x1038e1=['\x20user','7981015JuPcea','1986962mxybhQ','14706710bEJKYd','Show\x20current\x20user\x20information','execute','name','1105803ZSnrFq','data','66440rQfYoM','268bjqPVr','\x20\x20Cause:\x20','verbose','getCurrent','length','1rgMPTb','6162768nSvUjv','Error:\x20','Fetching\x20user\x20info...','3051081gcHvtd','error','user','24UaNzAr','message','✔\x20Found\x20','Listing\x20users...','cause'];a45_0x4669=function(){return _0x1038e1;};return a45_0x4669();}import{withSpinner}from'../utils/spinner.js';export class UserCommand extends BaseCommand{[a45_0x3b9456(0x158)]='user';['description']=a45_0x3b9456(0x156);async[a45_0x3b9456(0x157)](_0x549010){const _0x4e79dc=a45_0x3b9456,{options:_0x2042bd,tdx:_0x2281c3}=_0x549010;try{const _0x49b82f=await withSpinner(_0x4e79dc(0x149),()=>_0x2281c3['user'][_0x4e79dc(0x15f)](),{'verbose':_0x2042bd[_0x4e79dc(0x15e)]}),_0x47dc35=_0x49b82f[_0x4e79dc(0x15a)];return await handleSingleObjectOutput(_0x47dc35,_0x2042bd),0x0;}catch(_0x50bd98){if(_0x50bd98 instanceof SDKError)return console[_0x4e79dc(0x14b)](_0x4e79dc(0x148)+_0x50bd98[_0x4e79dc(0x14e)]),_0x50bd98[_0x4e79dc(0x151)]&&console[_0x4e79dc(0x14b)](_0x4e79dc(0x15d)+_0x50bd98[_0x4e79dc(0x151)]),0x1;throw _0x50bd98;}}}export class UserListCommand extends BaseCommand{[a45_0x3b9456(0x158)]='user\x20list';['description']='List\x20all\x20users\x20in\x20the\x20account';async[a45_0x3b9456(0x157)](_0x6fc8ef){const _0x5e5992=a45_0x3b9456,{options:_0x5287c3,tdx:_0x45e051}=_0x6fc8ef;try{const _0x53e1c5=await withSpinner(_0x5e5992(0x150),()=>_0x45e051[_0x5e5992(0x14c)]['list'](),{'verbose':_0x5287c3[_0x5e5992(0x15e)]}),_0x23ba52=_0x53e1c5[_0x5e5992(0x15a)];return console[_0x5e5992(0x14b)](_0x5e5992(0x14f)+_0x23ba52[_0x5e5992(0x160)]+_0x5e5992(0x152)+(_0x23ba52[_0x5e5992(0x160)]!==0x1?'s':'')),await handleSDKOutput(_0x23ba52,_0x5287c3),0x0;}catch(_0x420349){if(_0x420349 instanceof SDKError)return console['error'](_0x5e5992(0x148)+_0x420349[_0x5e5992(0x14e)]),_0x420349['cause']&&console[_0x5e5992(0x14b)](_0x5e5992(0x15d)+_0x420349[_0x5e5992(0x151)]),0x1;throw _0x420349;}}}