@treasuredata/tdx 0.25.3 → 0.25.4

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 (163) 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/describe.js +1 -1
  18. package/dist/commands/engage-command.js +1 -1
  19. package/dist/commands/job-command.js +1 -1
  20. package/dist/commands/journey-command.js +1 -1
  21. package/dist/commands/journey-validate-command.js +1 -1
  22. package/dist/commands/llm-command.js +1 -1
  23. package/dist/commands/mcp-command.js +1 -1
  24. package/dist/commands/parent-segment-command.js +1 -1
  25. package/dist/commands/profile-command.js +1 -1
  26. package/dist/commands/profiles-command.js +1 -1
  27. package/dist/commands/query-command.js +1 -1
  28. package/dist/commands/schedule-command.js +1 -1
  29. package/dist/commands/segment-command.js +1 -1
  30. package/dist/commands/segment-create-command.js +1 -1
  31. package/dist/commands/segment-fields-command.js +1 -1
  32. package/dist/commands/segment-pull-command.js +1 -1
  33. package/dist/commands/segment-push-command.js +1 -1
  34. package/dist/commands/segment-update-command.js +1 -1
  35. package/dist/commands/segment-use-command.js +1 -1
  36. package/dist/commands/segment-validate-command.js +1 -1
  37. package/dist/commands/segments.js +1 -1
  38. package/dist/commands/show.js +1 -1
  39. package/dist/commands/status-command.js +1 -1
  40. package/dist/commands/tables.js +1 -1
  41. package/dist/commands/unset-command.js +1 -1
  42. package/dist/commands/use-command.js +1 -1
  43. package/dist/commands/user-command.js +1 -1
  44. package/dist/commands/workflow-command.js +1 -1
  45. package/dist/core/auth.js +1 -1
  46. package/dist/core/command-output.js +1 -1
  47. package/dist/core/config.js +1 -1
  48. package/dist/core/connection-cache.js +1 -1
  49. package/dist/core/constants.js +1 -1
  50. package/dist/core/credential-cache.js +1 -1
  51. package/dist/core/global-context.js +1 -1
  52. package/dist/core/keychain.js +1 -1
  53. package/dist/core/profile.js +1 -1
  54. package/dist/core/project-config.js +1 -1
  55. package/dist/core/session.js +1 -1
  56. package/dist/core/user-cache.js +1 -1
  57. package/dist/core/version.js +1 -1
  58. package/dist/index.js +1 -1
  59. package/dist/mcp/server.js +1 -1
  60. package/dist/mcp/tools/index.js +1 -1
  61. package/dist/mcp/tools/tdx-run.js +1 -1
  62. package/dist/mcp/tools/tdx-search.js +1 -1
  63. package/dist/mcp/utils.js +1 -1
  64. package/dist/proxy/claude-usage-tracker.js +1 -1
  65. package/dist/proxy/passthrough-server.js +1 -1
  66. package/dist/proxy/sse-usage-parser.js +1 -1
  67. package/dist/sdk/agent/agent-config.js +1 -1
  68. package/dist/sdk/agent/agent-ref-parser.js +1 -1
  69. package/dist/sdk/agent/agent-yaml.js +1 -1
  70. package/dist/sdk/agent/test/evaluator.js +1 -1
  71. package/dist/sdk/agent/test/executor.js +1 -1
  72. package/dist/sdk/agent/test/index.js +1 -1
  73. package/dist/sdk/agent/test/output.js +1 -1
  74. package/dist/sdk/agent/test/parser.js +1 -1
  75. package/dist/sdk/api.js +1 -1
  76. package/dist/sdk/client/cdp-api-client.js +1 -1
  77. package/dist/sdk/client/endpoints.js +1 -1
  78. package/dist/sdk/client/engage-api-client.js +1 -1
  79. package/dist/sdk/client/http-client.js +1 -1
  80. package/dist/sdk/client/llm-api-client.js +1 -1
  81. package/dist/sdk/client/rate-limiter.js +1 -1
  82. package/dist/sdk/client/td-api-client.js +1 -1
  83. package/dist/sdk/client/trino-api-client.js +1 -1
  84. package/dist/sdk/client/workflow-client.js +1 -1
  85. package/dist/sdk/connection-validator.js +1 -1
  86. package/dist/sdk/connection.js +1 -1
  87. package/dist/sdk/engage.js +1 -1
  88. package/dist/sdk/errors.js +1 -1
  89. package/dist/sdk/index.js +1 -1
  90. package/dist/sdk/io/index.js +1 -1
  91. package/dist/sdk/io/node-filesystem.js +1 -1
  92. package/dist/sdk/job.js +1 -1
  93. package/dist/sdk/journey.js +1 -1
  94. package/dist/sdk/llm/chat-cache.js +1 -1
  95. package/dist/sdk/llm/index.js +1 -1
  96. package/dist/sdk/llm/llm-backup-utils.js +1 -1
  97. package/dist/sdk/llm/model-factors.js +1 -1
  98. package/dist/sdk/query/index.js +1 -1
  99. package/dist/sdk/query/sql-parser.js +1 -1
  100. package/dist/sdk/schedule.js +1 -1
  101. package/dist/sdk/segment/child-segment-yaml.js +1 -1
  102. package/dist/sdk/segment/fields-display.js +1 -1
  103. package/dist/sdk/segment/file-discovery.js +1 -1
  104. package/dist/sdk/segment/journey-utils.js +1 -1
  105. package/dist/sdk/segment/journey-yaml.js +1 -1
  106. package/dist/sdk/segment/parent-segment-preview.js +1 -1
  107. package/dist/sdk/segment/parent-segment-yaml.js +1 -1
  108. package/dist/sdk/segment/pull-workflow.js +1 -1
  109. package/dist/sdk/segment/push-workflow.js +1 -1
  110. package/dist/sdk/segment/resolution-context.js +1 -1
  111. package/dist/sdk/segment/segment-path-parser.js +1 -1
  112. package/dist/sdk/segment/segment-ref-parser.js +1 -1
  113. package/dist/sdk/segment/target-resolution.js +1 -1
  114. package/dist/sdk/segment/tdx-config.js +1 -1
  115. package/dist/sdk/segment/validate-files.js +1 -1
  116. package/dist/sdk/segment/yaml-validator.js +1 -1
  117. package/dist/sdk/segment.js +1 -1
  118. package/dist/sdk/types/index.js +1 -1
  119. package/dist/sdk/types/progress.js +1 -1
  120. package/dist/sdk/user.js +1 -1
  121. package/dist/sdk/util/format-detector.js +1 -1
  122. package/dist/sdk/util/formatters.js +1 -1
  123. package/dist/sdk/util/index.js +1 -1
  124. package/dist/sdk/util/tree-formatter.js +1 -1
  125. package/dist/sdk/workflow/archive-validation.js +1 -1
  126. package/dist/sdk/workflow/clone-workflow.js +1 -1
  127. package/dist/sdk/workflow/index.js +1 -1
  128. package/dist/sdk/workflow/pull-workflow.js +1 -1
  129. package/dist/sdk/workflow/push-workflow.js +1 -1
  130. package/dist/sdk/workflow/tdx-config.js +1 -1
  131. package/dist/sdk/workflow/workflow-utils.js +1 -1
  132. package/dist/test-utils/command-runner.js +1 -1
  133. package/dist/test-utils/factories.js +1 -1
  134. package/dist/test-utils/fixtures.js +1 -1
  135. package/dist/test-utils/http-mock.js +1 -1
  136. package/dist/test-utils/index.js +1 -1
  137. package/dist/utils/async.js +1 -1
  138. package/dist/utils/colors.js +1 -1
  139. package/dist/utils/diff.js +1 -1
  140. package/dist/utils/file-permissions.js +1 -1
  141. package/dist/utils/global-cache.js +1 -1
  142. package/dist/utils/json-loader.js +1 -1
  143. package/dist/utils/local-cache.js +1 -1
  144. package/dist/utils/logger/formatters/default-formatter.js +1 -1
  145. package/dist/utils/logger/formatters/index.js +1 -1
  146. package/dist/utils/logger/handlers/console-handler.js +1 -1
  147. package/dist/utils/logger/handlers/file-handler.js +1 -1
  148. package/dist/utils/logger/handlers/index.js +1 -1
  149. package/dist/utils/logger/handlers/null-handler.js +1 -1
  150. package/dist/utils/logger/index.js +1 -1
  151. package/dist/utils/logger/logger.js +1 -1
  152. package/dist/utils/logger/types.js +1 -1
  153. package/dist/utils/option-validation.js +1 -1
  154. package/dist/utils/port.js +1 -1
  155. package/dist/utils/process.js +1 -1
  156. package/dist/utils/prompt.js +1 -1
  157. package/dist/utils/spinner.js +1 -1
  158. package/dist/utils/sse-parser.js +1 -1
  159. package/dist/utils/string-utils.js +1 -1
  160. package/dist/utils/table-ref-parser.js +1 -1
  161. package/dist/utils/tdx-logger.js +1 -1
  162. package/dist/utils/version-check.js +1 -1
  163. package/package.json +1 -1
@@ -1 +1 @@
1
- const a32_0x4888e2=a32_0xa5cf;(function(_0x3e372c,_0x2dbadf){const _0x53a1fe=a32_0xa5cf,_0x176e66=_0x3e372c();while(!![]){try{const _0x2e35e5=parseInt(_0x53a1fe(0xb3))/0x1+parseInt(_0x53a1fe(0xc3))/0x2+parseInt(_0x53a1fe(0xa9))/0x3*(-parseInt(_0x53a1fe(0xad))/0x4)+parseInt(_0x53a1fe(0x9f))/0x5+parseInt(_0x53a1fe(0x9b))/0x6+parseInt(_0x53a1fe(0xa1))/0x7+-parseInt(_0x53a1fe(0xae))/0x8*(parseInt(_0x53a1fe(0xb7))/0x9);if(_0x2e35e5===_0x2dbadf)break;else _0x176e66['push'](_0x176e66['shift']());}catch(_0x3f3f02){_0x176e66['push'](_0x176e66['shift']());}}}(a32_0x1098,0xd3fe7));import{BaseCommand}from'./command.js';import{handleSDKOutput}from'../core/command-output.js';function a32_0x1098(){const _0x4049b3=['20968wpSTUv','INTERNAL','name','Resolved\x20folder\x20ID:\x20','description','1670142dGhjan','yellow','.\x20Only\x20child\x20segments\x20can\x20be\x20updated.','segment','8523qPKcmA','kind','verbose','Resolving\x20folder\x20\x27','error','execute','\x20\x20Use\x20`tdx\x20sg\x20push`\x20with\x20YAML\x20files\x20instead.\x0a','folder','\x20\x20\x20Path:\x20','ruleFile','\x20\x20tdx\x20segment\x20update\x20\x22High\x20Value\x22\x20--rule\x20\x27...\x27\x20\x20#\x20Relative\x20to\x20context','Segment\x20ID:\x20','268530FEIjkM','includes','Usage:\x20tdx\x20segment\x20update\x20<path>\x20[options]','data','length','segment:update','Error:\x20Segment\x20path\x20or\x20name\x20is\x20required','5316096qfXVkK','resolvePathToResource','updateSegmentById','\x27...','36875EMMzkp','Resolving\x20path\x20\x27','7502327Scedns','segmentName','resolveFolderId','Segment\x20ID\x20missing\x20from\x20resolved\x20path','⚠\x20Deprecation\x20warning:\x20`segment\x20update`\x20is\x20deprecated.','Updating\x20segment\x20\x27','Resolved\x20relative\x20path\x20to:\x20','Update\x20existing\x20child\x20segment','3jQujly','✔\x20Updated\x20segment\x20\x27','Resolved\x20type:\x20','Parent\x20ID:\x20','1676580frFxmt'];a32_0x1098=function(){return _0x4049b3;};return a32_0x1098();}import{withSpinner}from'../utils/spinner.js';function a32_0xa5cf(_0xc83d42,_0x19ee32){_0xc83d42=_0xc83d42-0x98;const _0x10989a=a32_0x1098();let _0xa5cf1c=_0x10989a[_0xc83d42];return _0xa5cf1c;}import{loadJSONFromOptions}from'../utils/json-loader.js';import{SDKError,ErrorCode}from'../sdk/index.js';import a32_0x56530a from'chalk';export class SegmentUpdateCommand extends BaseCommand{[a32_0x4888e2(0xb0)]=a32_0x4888e2(0x99);['description']=a32_0x4888e2(0xa8);async[a32_0x4888e2(0xbc)](_0x1e40be){const _0x3de3dc=a32_0x4888e2;console[_0x3de3dc(0xbb)](a32_0x56530a[_0x3de3dc(0xb4)](_0x3de3dc(0xa5))),console['error'](a32_0x56530a['yellow'](_0x3de3dc(0xbd)));const {options:_0x2060f5,args:_0x579a65,tdx:_0xa9b2a5}=_0x1e40be,_0x39a220=_0x2060f5;if(_0x579a65[_0x3de3dc(0x98)]===0x0)return console['error'](_0x3de3dc(0x9a)),console['error'](_0x3de3dc(0xc5)),console[_0x3de3dc(0xbb)]('Examples:'),console['error']('\x20\x20tdx\x20segment\x20update\x20\x22My\x20Audience/High\x20Value\x22\x20--description\x20\x22...\x22'),console[_0x3de3dc(0xbb)](_0x3de3dc(0xc1)),0x1;const _0x533a92=_0x579a65[0x0],_0x4370e4=_0x2060f5['segmentPath'];let _0x288e73=_0x533a92;_0x4370e4&&!_0x533a92[_0x3de3dc(0xc4)]('/')&&(_0x288e73=_0x4370e4+'/'+_0x533a92,_0x39a220[_0x3de3dc(0xb9)]&&console['error'](_0x3de3dc(0xa7)+_0x288e73));const _0x160c1a=await withSpinner(_0x3de3dc(0xa0)+_0x288e73+_0x3de3dc(0x9e),()=>_0xa9b2a5['segment'][_0x3de3dc(0x9c)](_0x288e73),{'verbose':_0x39a220['verbose']}),_0x269c97=_0x160c1a[_0x3de3dc(0xc6)];_0x39a220[_0x3de3dc(0xb9)]&&console['error'](_0x3de3dc(0xab)+_0x269c97['type']);if(_0x269c97['type']!==_0x3de3dc(0xb6))return console[_0x3de3dc(0xbb)]('Error:\x20Cannot\x20update\x20'+_0x269c97['type']+_0x3de3dc(0xb5)),console['error']('Use:\x20tdx\x20segment\x20update\x20<path_to_segment>\x20[options]'),0x1;if(!_0x269c97['segmentId'])throw new SDKError(ErrorCode[_0x3de3dc(0xaf)],_0x3de3dc(0xa4));const _0x49e1a7=_0x269c97['parentId'],_0x208cb3=_0x269c97['segmentId'];_0x39a220['verbose']&&(console[_0x3de3dc(0xbb)](_0x3de3dc(0xac)+_0x49e1a7),console['error'](_0x3de3dc(0xc2)+_0x208cb3));let _0x36ad72;if(_0x39a220[_0x3de3dc(0xbe)]){const _0x232752=_0x39a220['folder'],_0x25ddbd=await withSpinner(_0x3de3dc(0xba)+_0x232752+_0x3de3dc(0x9e),()=>_0xa9b2a5['segment'][_0x3de3dc(0xa3)](_0x49e1a7,_0x232752),{'verbose':_0x39a220[_0x3de3dc(0xb9)]});_0x36ad72=parseInt(_0x25ddbd['data'],0xa),_0x39a220[_0x3de3dc(0xb9)]&&console[_0x3de3dc(0xbb)](_0x3de3dc(0xb1)+_0x36ad72);}const _0x1baff9=await loadJSONFromOptions(_0x39a220['rule'],_0x39a220[_0x3de3dc(0xc0)]),_0x3e89e5={'name':_0x39a220[_0x3de3dc(0xb0)],'description':_0x39a220[_0x3de3dc(0xb2)],'rule':_0x1baff9,'kind':_0x39a220[_0x3de3dc(0xb8)]!==undefined?parseInt(_0x39a220[_0x3de3dc(0xb8)],0xa):undefined,'segmentFolderId':_0x36ad72},_0x30f592=await withSpinner(_0x3de3dc(0xa6)+_0x269c97[_0x3de3dc(0xa2)]+'\x27...',()=>_0xa9b2a5[_0x3de3dc(0xb6)][_0x3de3dc(0x9d)](_0x49e1a7,_0x208cb3,_0x3e89e5),{'verbose':_0x39a220[_0x3de3dc(0xb9)]}),_0x303bb8=_0x30f592[_0x3de3dc(0xc6)];return console['error'](_0x3de3dc(0xaa)+_0x303bb8[_0x3de3dc(0xb0)]+'\x27'),_0x288e73!==_0x533a92&&console['error'](_0x3de3dc(0xbf)+_0x288e73),await handleSDKOutput([_0x303bb8],_0x39a220),0x0;}}
1
+ const a32_0x368863=a32_0x59b2;function a32_0x191b(){const _0x233785=['Resolved\x20type:\x20','2uMNRGg','verbose','2412179qJokUz','\x27...','Error:\x20Segment\x20path\x20or\x20name\x20is\x20required','Error:\x20Cannot\x20update\x20','Parent\x20ID:\x20','segmentId','yellow','resolvePathToResource','type','\x20\x20tdx\x20segment\x20update\x20\x22High\x20Value\x22\x20--rule\x20\x27...\x27\x20\x20#\x20Relative\x20to\x20context','error','name','35242FHhLnA','kind','execute','ruleFile','\x20\x20\x20Path:\x20','segment','Use:\x20tdx\x20segment\x20update\x20<path_to_segment>\x20[options]','66bMzzkZ','30itFxBa','description','data','4KvzMnd','601542EBNtPq','Resolved\x20folder\x20ID:\x20','899332nrYZIv','parentId','Segment\x20ID\x20missing\x20from\x20resolved\x20path','Segment\x20ID:\x20','Resolving\x20path\x20\x27','\x20\x20Use\x20`tdx\x20sg\x20push`\x20with\x20YAML\x20files\x20instead.\x0a','INTERNAL','32gzBGyW','Updating\x20segment\x20\x27','includes','Usage:\x20tdx\x20segment\x20update\x20<path>\x20[options]','rule','2975703iQQmhp','.\x20Only\x20child\x20segments\x20can\x20be\x20updated.','resolveFolderId','segmentName','1753945xPCkGp','updateSegmentById','10977432wArylQ','✔\x20Updated\x20segment\x20\x27','⚠\x20Deprecation\x20warning:\x20`segment\x20update`\x20is\x20deprecated.','Update\x20existing\x20child\x20segment','folder','segment:update'];a32_0x191b=function(){return _0x233785;};return a32_0x191b();}(function(_0x5d10ef,_0x46ff9c){const _0x99a2d5=a32_0x59b2,_0x246a51=_0x5d10ef();while(!![]){try{const _0x331dd9=-parseInt(_0x99a2d5(0x14c))/0x1+-parseInt(_0x99a2d5(0x13e))/0x2*(parseInt(_0x99a2d5(0x166))/0x3)+-parseInt(_0x99a2d5(0x157))/0x4*(-parseInt(_0x99a2d5(0x135))/0x5)+-parseInt(_0x99a2d5(0x153))/0x6*(-parseInt(_0x99a2d5(0x15a))/0x7)+-parseInt(_0x99a2d5(0x161))/0x8*(parseInt(_0x99a2d5(0x158))/0x9)+parseInt(_0x99a2d5(0x154))/0xa*(-parseInt(_0x99a2d5(0x140))/0xb)+parseInt(_0x99a2d5(0x137))/0xc;if(_0x331dd9===_0x46ff9c)break;else _0x246a51['push'](_0x246a51['shift']());}catch(_0x5dd1ea){_0x246a51['push'](_0x246a51['shift']());}}}(a32_0x191b,0xb15b1));import{BaseCommand}from'./command.js';import{handleSDKOutput}from'../core/command-output.js';function a32_0x59b2(_0x1ce8cf,_0x3e2a1a){_0x1ce8cf=_0x1ce8cf-0x132;const _0x191b61=a32_0x191b();let _0x59b262=_0x191b61[_0x1ce8cf];return _0x59b262;}import{withSpinner}from'../utils/spinner.js';import{loadJSONFromOptions}from'../utils/json-loader.js';import{SDKError,ErrorCode}from'../sdk/index.js';import a32_0x45cfc9 from'chalk';export class SegmentUpdateCommand extends BaseCommand{[a32_0x368863(0x14b)]=a32_0x368863(0x13c);[a32_0x368863(0x155)]=a32_0x368863(0x13a);async[a32_0x368863(0x14e)](_0x2eddbe){const _0x286ae7=a32_0x368863;console[_0x286ae7(0x14a)](a32_0x45cfc9[_0x286ae7(0x146)](_0x286ae7(0x139))),console[_0x286ae7(0x14a)](a32_0x45cfc9['yellow'](_0x286ae7(0x15f)));const {options:_0x39af9d,args:_0x84dd77,tdx:_0x186028}=_0x2eddbe,_0x37144d=_0x39af9d;if(_0x84dd77['length']===0x0)return console[_0x286ae7(0x14a)](_0x286ae7(0x142)),console[_0x286ae7(0x14a)](_0x286ae7(0x164)),console[_0x286ae7(0x14a)]('Examples:'),console['error']('\x20\x20tdx\x20segment\x20update\x20\x22My\x20Audience/High\x20Value\x22\x20--description\x20\x22...\x22'),console[_0x286ae7(0x14a)](_0x286ae7(0x149)),0x1;const _0x1f3eea=_0x84dd77[0x0],_0x5e0ee0=_0x39af9d['segmentPath'];let _0x3cc56b=_0x1f3eea;_0x5e0ee0&&!_0x1f3eea[_0x286ae7(0x163)]('/')&&(_0x3cc56b=_0x5e0ee0+'/'+_0x1f3eea,_0x37144d[_0x286ae7(0x13f)]&&console[_0x286ae7(0x14a)]('Resolved\x20relative\x20path\x20to:\x20'+_0x3cc56b));const _0xe6b534=await withSpinner(_0x286ae7(0x15e)+_0x3cc56b+_0x286ae7(0x141),()=>_0x186028[_0x286ae7(0x151)][_0x286ae7(0x147)](_0x3cc56b),{'verbose':_0x37144d[_0x286ae7(0x13f)]}),_0x4abee6=_0xe6b534[_0x286ae7(0x156)];_0x37144d['verbose']&&console[_0x286ae7(0x14a)](_0x286ae7(0x13d)+_0x4abee6[_0x286ae7(0x148)]);if(_0x4abee6[_0x286ae7(0x148)]!==_0x286ae7(0x151))return console[_0x286ae7(0x14a)](_0x286ae7(0x143)+_0x4abee6[_0x286ae7(0x148)]+_0x286ae7(0x132)),console['error'](_0x286ae7(0x152)),0x1;if(!_0x4abee6[_0x286ae7(0x145)])throw new SDKError(ErrorCode[_0x286ae7(0x160)],_0x286ae7(0x15c));const _0xf521c6=_0x4abee6[_0x286ae7(0x15b)],_0x5a35cf=_0x4abee6['segmentId'];_0x37144d[_0x286ae7(0x13f)]&&(console[_0x286ae7(0x14a)](_0x286ae7(0x144)+_0xf521c6),console[_0x286ae7(0x14a)](_0x286ae7(0x15d)+_0x5a35cf));let _0x1e11cc;if(_0x37144d[_0x286ae7(0x13b)]){const _0x3fb5b8=_0x37144d[_0x286ae7(0x13b)],_0x139775=await withSpinner('Resolving\x20folder\x20\x27'+_0x3fb5b8+_0x286ae7(0x141),()=>_0x186028[_0x286ae7(0x151)][_0x286ae7(0x133)](_0xf521c6,_0x3fb5b8),{'verbose':_0x37144d[_0x286ae7(0x13f)]});_0x1e11cc=parseInt(_0x139775[_0x286ae7(0x156)],0xa),_0x37144d['verbose']&&console[_0x286ae7(0x14a)](_0x286ae7(0x159)+_0x1e11cc);}const _0xc5558f=await loadJSONFromOptions(_0x37144d[_0x286ae7(0x165)],_0x37144d[_0x286ae7(0x14f)]),_0x56f533={'name':_0x37144d[_0x286ae7(0x14b)],'description':_0x37144d[_0x286ae7(0x155)],'rule':_0xc5558f,'kind':_0x37144d[_0x286ae7(0x14d)]!==undefined?parseInt(_0x37144d[_0x286ae7(0x14d)],0xa):undefined,'segmentFolderId':_0x1e11cc},_0x284154=await withSpinner(_0x286ae7(0x162)+_0x4abee6[_0x286ae7(0x134)]+_0x286ae7(0x141),()=>_0x186028[_0x286ae7(0x151)][_0x286ae7(0x136)](_0xf521c6,_0x5a35cf,_0x56f533),{'verbose':_0x37144d[_0x286ae7(0x13f)]}),_0x2301d5=_0x284154[_0x286ae7(0x156)];return console[_0x286ae7(0x14a)](_0x286ae7(0x138)+_0x2301d5[_0x286ae7(0x14b)]+'\x27'),_0x3cc56b!==_0x1f3eea&&console[_0x286ae7(0x14a)](_0x286ae7(0x150)+_0x3cc56b),await handleSDKOutput([_0x2301d5],_0x37144d),0x0;}}
@@ -1 +1 @@
1
- const a33_0x1e39fe=a33_0x4980;(function(_0x103bc7,_0x40134f){const _0x3d76f8=a33_0x4980,_0x1f3dfe=_0x103bc7();while(!![]){try{const _0x43f07d=parseInt(_0x3d76f8(0x86))/0x1*(parseInt(_0x3d76f8(0x8a))/0x2)+-parseInt(_0x3d76f8(0xb1))/0x3*(-parseInt(_0x3d76f8(0x94))/0x4)+-parseInt(_0x3d76f8(0x9a))/0x5+parseInt(_0x3d76f8(0xaf))/0x6+parseInt(_0x3d76f8(0x91))/0x7+parseInt(_0x3d76f8(0x9e))/0x8+-parseInt(_0x3d76f8(0x95))/0x9*(parseInt(_0x3d76f8(0x9f))/0xa);if(_0x43f07d===_0x40134f)break;else _0x1f3dfe['push'](_0x1f3dfe['shift']());}catch(_0x2ba8fb){_0x1f3dfe['push'](_0x1f3dfe['shift']());}}}(a33_0x2e0c,0xc3c55));function a33_0x4980(_0x3656cd,_0x43e5b5){_0x3656cd=_0x3656cd-0x84;const _0x2e0c58=a33_0x2e0c();let _0x4980e3=_0x2e0c58[_0x3656cd];return _0x4980e3;}import{existsSync,statSync}from'fs';import a33_0x46cc14 from'chalk';import{BaseCommand}from'./command.js';import{saveSessionContext}from'../core/session.js';import{withSpinner}from'../utils/spinner.js';import{parsePath,normalizePath}from'../sdk/segment/segment-path-parser.js';import{findTdxConfig}from'../sdk/segment/tdx-config.js';export class SegmentUseCommand extends BaseCommand{[a33_0x1e39fe(0x97)]=a33_0x1e39fe(0xa0);[a33_0x1e39fe(0x9c)]=a33_0x1e39fe(0xb2);async[a33_0x1e39fe(0xac)](_0x45332b){const _0x1580ed=a33_0x1e39fe,{options:_0x5f1f8e,args:_0x3a6bc8,tdx:_0x330da7}=_0x45332b;if(_0x3a6bc8[_0x1580ed(0xaa)]===0x0)return console[_0x1580ed(0xba)](a33_0x46cc14[_0x1580ed(0xc0)](_0x1580ed(0x85))),console['error'](_0x1580ed(0x84)),console[_0x1580ed(0xba)](_0x1580ed(0x8e)),console[_0x1580ed(0xba)](_0x1580ed(0x8c)),console['error'](_0x1580ed(0x92)),console[_0x1580ed(0xba)]('\x20\x20tdx\x20segment\x20use\x20/\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Clear\x20context'),console[_0x1580ed(0xba)](_0x1580ed(0x96)),0x1;const _0x117387=_0x3a6bc8[0x0],_0x51405a=_0x5f1f8e[_0x1580ed(0x88)];try{if(_0x117387==='/')return saveSessionContext({'segment_path':undefined},_0x51405a),console[_0x1580ed(0xb0)](a33_0x46cc14['green'](_0x1580ed(0x8d))),0x0;if(existsSync(_0x117387)&&statSync(_0x117387)[_0x1580ed(0xad)]()){let _0x134cf4;try{_0x134cf4=findTdxConfig(_0x117387);}catch{return console['error'](a33_0x46cc14['red'](_0x1580ed(0x98)+_0x117387)),console[_0x1580ed(0xba)](a33_0x46cc14[_0x1580ed(0xa9)](_0x1580ed(0xa3))),0x1;}const _0x32a245=_0x134cf4[_0x1580ed(0xbc)]['parent_segment'];return saveSessionContext({'segment_path':_0x32a245,'parent_segment':_0x32a245},_0x51405a),console[_0x1580ed(0xb0)](a33_0x46cc14[_0x1580ed(0xc1)](_0x1580ed(0xb8)+a33_0x46cc14['cyan'](_0x32a245))),0x0;}const _0x362472=_0x5f1f8e['segmentPath'];let _0x16ee5a=_0x117387;const _0x3a37aa=parsePath(_0x117387);if(!_0x3a37aa['isAbsolute']){if(!_0x362472)return console[_0x1580ed(0xba)](a33_0x46cc14['red'](_0x1580ed(0xbe))),console[_0x1580ed(0xba)](a33_0x46cc14['cyan'](_0x1580ed(0x99))),0x1;if(_0x117387==='..'){const _0x52f337=_0x362472[_0x1580ed(0xb9)]('/')[_0x1580ed(0xa2)](0x0,-0x1)['join']('/');_0x16ee5a=_0x52f337||'/';}else _0x117387==='.'?_0x16ee5a=_0x362472:_0x16ee5a=_0x362472+'/'+_0x117387;_0x5f1f8e[_0x1580ed(0xbd)]&&console[_0x1580ed(0xba)](_0x1580ed(0x9d)+_0x16ee5a);}if(_0x16ee5a==='/'||_0x16ee5a==='')return saveSessionContext({'segment_path':undefined},_0x51405a),console[_0x1580ed(0xb0)](a33_0x46cc14[_0x1580ed(0xc1)](_0x1580ed(0x8d))),0x0;_0x16ee5a=normalizePath(_0x16ee5a);const _0x366dfe=parsePath(_0x16ee5a)[_0x1580ed(0xab)];if(_0x366dfe[_0x1580ed(0xaa)]===0x0)return saveSessionContext({'segment_path':undefined},_0x51405a),console[_0x1580ed(0xb0)](a33_0x46cc14[_0x1580ed(0xc1)](_0x1580ed(0x8d))),0x0;_0x5f1f8e[_0x1580ed(0xbd)]&&(console[_0x1580ed(0xba)](_0x1580ed(0xa1)+_0x5f1f8e[_0x1580ed(0xbf)]),console[_0x1580ed(0xba)]('Target\x20path:\x20'+_0x16ee5a));const _0x52e9b5=await withSpinner(_0x1580ed(0xa6)+_0x16ee5a+_0x1580ed(0xbb),()=>_0x330da7[_0x1580ed(0xa7)][_0x1580ed(0xa4)](_0x16ee5a),{'verbose':_0x5f1f8e[_0x1580ed(0xbd)]}),_0x2b80dc=_0x52e9b5[_0x1580ed(0xb4)];_0x5f1f8e['verbose']&&(console['error'](_0x1580ed(0xb6)+_0x2b80dc['type']),console[_0x1580ed(0xba)](_0x1580ed(0xae)+_0x2b80dc[_0x1580ed(0x93)]),_0x2b80dc[_0x1580ed(0x8f)]&&console[_0x1580ed(0xba)]('Folder\x20ID:\x20'+_0x2b80dc['folderId']));if(_0x2b80dc[_0x1580ed(0x8b)]===_0x1580ed(0xa7))return console[_0x1580ed(0xba)](a33_0x46cc14[_0x1580ed(0xc0)](_0x1580ed(0xb3))),console[_0x1580ed(0xba)](_0x1580ed(0xa8)),console[_0x1580ed(0xba)](a33_0x46cc14['cyan'](_0x1580ed(0xb7)+_0x2b80dc['parentName']+(_0x2b80dc[_0x1580ed(0x9b)]?'/'+_0x2b80dc[_0x1580ed(0x9b)][_0x1580ed(0x87)]('/'):''))),0x1;return saveSessionContext({'segment_path':_0x2b80dc[_0x1580ed(0x89)],'parent_segment':_0x2b80dc[_0x1580ed(0xa5)]},_0x51405a),console[_0x1580ed(0xb0)](a33_0x46cc14[_0x1580ed(0xc1)](_0x1580ed(0xb8)+a33_0x46cc14[_0x1580ed(0xa9)](_0x2b80dc['fullPath']))),_0x5f1f8e[_0x1580ed(0xbd)]&&(console[_0x1580ed(0xba)](a33_0x46cc14['dim'](_0x1580ed(0xb5))),console[_0x1580ed(0xba)](a33_0x46cc14['dim'](_0x1580ed(0x90)))),0x0;}catch(_0x4adfd7){throw _0x4adfd7;}}}function a33_0x2e0c(){const _0x4ba2cc=['type','\x20\x20tdx\x20segment\x20use\x20\x22My\x20Audience\x22','✔\x20Context\x20cleared.\x20Back\x20to\x20root.','Examples:','folderId','Use\x20\x22tdx\x20use\x22\x20to\x20see\x20all\x20context\x20parameters','10880681qHavMi','\x20\x20tdx\x20segment\x20use\x20\x22My\x20Audience/Marketing\x22','parentId','62632EPJDzh','18usgxwx','\x20\x20tdx\x20segment\x20use\x20..\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Go\x20to\x20parent','name','Error:\x20No\x20tdx.json\x20found\x20in\x20or\x20above:\x20','Use\x20an\x20absolute\x20path\x20or\x20set\x20context\x20with:\x20tdx\x20segment\x20use\x20<parent_name>','6928295kfcmAf','folderPath','description','Resolved\x20relative\x20path\x20to:\x20','6757152xdshFn','11405020QDHGDp','segment:use','Site:\x20','slice','Tip:\x20Run\x20`tdx\x20sg\x20pull\x20<parent_name>`\x20first\x20to\x20create\x20the\x20folder\x20structure','resolvePathToResource','parentName','Resolving\x20path\x20\x27','segment','Context\x20can\x20only\x20be\x20set\x20to\x20a\x20parent\x20segment\x20or\x20folder.','cyan','length','segments','execute','isDirectory','Parent\x20ID:\x20','3580122NbhIdY','log','282RYIOUm','Set\x20current\x20segment/folder\x20context\x20for\x20navigation','Error:\x20Cannot\x20set\x20context\x20to\x20a\x20segment.','data','Use\x20\x22tdx\x20segments\x22\x20to\x20list\x20contents\x20in\x20this\x20context','Resolved\x20path\x20type:\x20','Use:\x20tdx\x20segment\x20use\x20','✔\x20Context\x20set\x20to:\x20','split','error','\x27...','config','verbose','Error:\x20No\x20context\x20set.\x20Cannot\x20use\x20relative\x20path.','site','red','green','Usage:\x20tdx\x20segment\x20use\x20<path>','Error:\x20Path\x20is\x20required\x0a','1YELaFy','join','session','fullPath','1948hNXzMe'];a33_0x2e0c=function(){return _0x4ba2cc;};return a33_0x2e0c();}
1
+ function a33_0x4483(_0x326dd1,_0x339f52){_0x326dd1=_0x326dd1-0x105;const _0x117a0a=a33_0x117a();let _0x4483c3=_0x117a0a[_0x326dd1];return _0x4483c3;}const a33_0x36ce19=a33_0x4483;(function(_0x38868a,_0x412806){const _0x3a502d=a33_0x4483,_0x5346af=_0x38868a();while(!![]){try{const _0x5f494c=parseInt(_0x3a502d(0x141))/0x1+parseInt(_0x3a502d(0x12b))/0x2*(-parseInt(_0x3a502d(0x10f))/0x3)+-parseInt(_0x3a502d(0x118))/0x4*(-parseInt(_0x3a502d(0x116))/0x5)+parseInt(_0x3a502d(0x10e))/0x6*(-parseInt(_0x3a502d(0x140))/0x7)+-parseInt(_0x3a502d(0x135))/0x8*(parseInt(_0x3a502d(0x113))/0x9)+parseInt(_0x3a502d(0x127))/0xa*(parseInt(_0x3a502d(0x112))/0xb)+parseInt(_0x3a502d(0x120))/0xc*(parseInt(_0x3a502d(0x125))/0xd);if(_0x5f494c===_0x412806)break;else _0x5346af['push'](_0x5346af['shift']());}catch(_0x3c59cf){_0x5346af['push'](_0x5346af['shift']());}}}(a33_0x117a,0x4a0f3));import{existsSync,statSync}from'fs';function a33_0x117a(){const _0x2b6d8e=['site','Error:\x20No\x20context\x20set.\x20Cannot\x20use\x20relative\x20path.','Resolved\x20relative\x20path\x20to:\x20','4303689PQSQcR','description','6730rhkOBZ','dim','fullPath','parentId','50702NdbUZQ','isDirectory','green','cyan','execute','length','type','log','✔\x20Context\x20set\x20to:\x20','split','2812504FgCyXK','Error:\x20Path\x20is\x20required\x0a','isAbsolute','Parent\x20ID:\x20','name','Usage:\x20tdx\x20segment\x20use\x20<path>','folderPath','Context\x20can\x20only\x20be\x20set\x20to\x20a\x20parent\x20segment\x20or\x20folder.','\x20\x20tdx\x20segment\x20use\x20/\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Clear\x20context','\x20\x20tdx\x20segment\x20use\x20\x22My\x20Audience\x22','data','7oSUgwH','46973QQfcoJ','\x20\x20tdx\x20segment\x20use\x20\x22My\x20Audience/Marketing\x22','Folder\x20ID:\x20','segment','red','parentName','join','session','\x27...','folderId','config','1151022EOfDyF','12VbjGwt','segments','Resolving\x20path\x20\x27','759iotBXx','9xocgZP','error','\x20\x20tdx\x20segment\x20use\x20..\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Go\x20to\x20parent','5KTiBHr','segment:use','770540yGFHkk','Error:\x20Cannot\x20set\x20context\x20to\x20a\x20segment.','Site:\x20','verbose','Use\x20\x22tdx\x20segments\x22\x20to\x20list\x20contents\x20in\x20this\x20context','Set\x20current\x20segment/folder\x20context\x20for\x20navigation','Use\x20an\x20absolute\x20path\x20or\x20set\x20context\x20with:\x20tdx\x20segment\x20use\x20<parent_name>','segmentPath','24XcXvyS','✔\x20Context\x20cleared.\x20Back\x20to\x20root.'];a33_0x117a=function(){return _0x2b6d8e;};return a33_0x117a();}import a33_0xc1d003 from'chalk';import{BaseCommand}from'./command.js';import{saveSessionContext}from'../core/session.js';import{withSpinner}from'../utils/spinner.js';import{parsePath,normalizePath}from'../sdk/segment/segment-path-parser.js';import{findTdxConfig}from'../sdk/segment/tdx-config.js';export class SegmentUseCommand extends BaseCommand{[a33_0x36ce19(0x139)]=a33_0x36ce19(0x117);[a33_0x36ce19(0x126)]=a33_0x36ce19(0x11d);async[a33_0x36ce19(0x12f)](_0x2597f5){const _0x513074=a33_0x36ce19,{options:_0x4fef2b,args:_0x1de24d,tdx:_0x58765d}=_0x2597f5;if(_0x1de24d['length']===0x0)return console[_0x513074(0x114)](a33_0xc1d003[_0x513074(0x107)](_0x513074(0x136))),console[_0x513074(0x114)](_0x513074(0x13a)),console[_0x513074(0x114)]('Examples:'),console[_0x513074(0x114)](_0x513074(0x13e)),console[_0x513074(0x114)](_0x513074(0x142)),console[_0x513074(0x114)](_0x513074(0x13d)),console['error'](_0x513074(0x115)),0x1;const _0x51c10e=_0x1de24d[0x0],_0x12c7e7=_0x4fef2b[_0x513074(0x10a)];try{if(_0x51c10e==='/')return saveSessionContext({'segment_path':undefined},_0x12c7e7),console[_0x513074(0x132)](a33_0xc1d003['green']('✔\x20Context\x20cleared.\x20Back\x20to\x20root.')),0x0;if(existsSync(_0x51c10e)&&statSync(_0x51c10e)[_0x513074(0x12c)]()){let _0x438f47;try{_0x438f47=findTdxConfig(_0x51c10e);}catch{return console[_0x513074(0x114)](a33_0xc1d003[_0x513074(0x107)]('Error:\x20No\x20tdx.json\x20found\x20in\x20or\x20above:\x20'+_0x51c10e)),console['error'](a33_0xc1d003[_0x513074(0x12e)]('Tip:\x20Run\x20`tdx\x20sg\x20pull\x20<parent_name>`\x20first\x20to\x20create\x20the\x20folder\x20structure')),0x1;}const _0x1cdecf=_0x438f47[_0x513074(0x10d)]['parent_segment'];return saveSessionContext({'segment_path':_0x1cdecf,'parent_segment':_0x1cdecf},_0x12c7e7),console[_0x513074(0x132)](a33_0xc1d003[_0x513074(0x12d)](_0x513074(0x133)+a33_0xc1d003['cyan'](_0x1cdecf))),0x0;}const _0x228ec2=_0x4fef2b[_0x513074(0x11f)];let _0x425c64=_0x51c10e;const _0xab7d07=parsePath(_0x51c10e);if(!_0xab7d07[_0x513074(0x137)]){if(!_0x228ec2)return console['error'](a33_0xc1d003[_0x513074(0x107)](_0x513074(0x123))),console['error'](a33_0xc1d003[_0x513074(0x12e)](_0x513074(0x11e))),0x1;if(_0x51c10e==='..'){const _0x2502f4=_0x228ec2[_0x513074(0x134)]('/')['slice'](0x0,-0x1)['join']('/');_0x425c64=_0x2502f4||'/';}else _0x51c10e==='.'?_0x425c64=_0x228ec2:_0x425c64=_0x228ec2+'/'+_0x51c10e;_0x4fef2b[_0x513074(0x11b)]&&console['error'](_0x513074(0x124)+_0x425c64);}if(_0x425c64==='/'||_0x425c64==='')return saveSessionContext({'segment_path':undefined},_0x12c7e7),console[_0x513074(0x132)](a33_0xc1d003[_0x513074(0x12d)]('✔\x20Context\x20cleared.\x20Back\x20to\x20root.')),0x0;_0x425c64=normalizePath(_0x425c64);const _0x29b5df=parsePath(_0x425c64)[_0x513074(0x110)];if(_0x29b5df[_0x513074(0x130)]===0x0)return saveSessionContext({'segment_path':undefined},_0x12c7e7),console[_0x513074(0x132)](a33_0xc1d003[_0x513074(0x12d)](_0x513074(0x121))),0x0;_0x4fef2b[_0x513074(0x11b)]&&(console[_0x513074(0x114)](_0x513074(0x11a)+_0x4fef2b[_0x513074(0x122)]),console[_0x513074(0x114)]('Target\x20path:\x20'+_0x425c64));const _0x59e914=await withSpinner(_0x513074(0x111)+_0x425c64+_0x513074(0x10b),()=>_0x58765d[_0x513074(0x106)]['resolvePathToResource'](_0x425c64),{'verbose':_0x4fef2b[_0x513074(0x11b)]}),_0x28225c=_0x59e914[_0x513074(0x13f)];_0x4fef2b[_0x513074(0x11b)]&&(console['error']('Resolved\x20path\x20type:\x20'+_0x28225c['type']),console[_0x513074(0x114)](_0x513074(0x138)+_0x28225c[_0x513074(0x12a)]),_0x28225c[_0x513074(0x10c)]&&console['error'](_0x513074(0x105)+_0x28225c[_0x513074(0x10c)]));if(_0x28225c[_0x513074(0x131)]===_0x513074(0x106))return console[_0x513074(0x114)](a33_0xc1d003[_0x513074(0x107)](_0x513074(0x119))),console['error'](_0x513074(0x13c)),console[_0x513074(0x114)](a33_0xc1d003['cyan']('Use:\x20tdx\x20segment\x20use\x20'+_0x28225c['parentName']+(_0x28225c['folderPath']?'/'+_0x28225c[_0x513074(0x13b)][_0x513074(0x109)]('/'):''))),0x1;return saveSessionContext({'segment_path':_0x28225c[_0x513074(0x129)],'parent_segment':_0x28225c[_0x513074(0x108)]},_0x12c7e7),console[_0x513074(0x132)](a33_0xc1d003[_0x513074(0x12d)](_0x513074(0x133)+a33_0xc1d003[_0x513074(0x12e)](_0x28225c[_0x513074(0x129)]))),_0x4fef2b[_0x513074(0x11b)]&&(console[_0x513074(0x114)](a33_0xc1d003['dim'](_0x513074(0x11c))),console[_0x513074(0x114)](a33_0xc1d003[_0x513074(0x128)]('Use\x20\x22tdx\x20use\x22\x20to\x20see\x20all\x20context\x20parameters'))),0x0;}catch(_0x36822a){throw _0x36822a;}}}
@@ -1 +1 @@
1
- function a34_0x4996(){const _0x4d1ac3=['\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','cwd','filePath','name','errorCode','333987vCJLsT','type','.yml','\x20warning(s)\x20found','segment:validate','.yaml','warningCount','invalidCount','\x20error(s)','error','message','valid','\x20\x20\x20\x20\x20\x20\x20tdx\x20sg\x20validate\x20<file_path>\x20\x20#\x20Validate\x20specific\x20file','Usage:\x20tdx\x20sg\x20validate\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Validate\x20all\x20(requires\x20context)','\x20valid','execute','helpText','cyan','\x20warning(s)','red','yellow','length','hasErrors','Error:\x20File\x20must\x20have\x20.yml\x20or\x20.yaml\x20extension:\x20','verbose','warnings','Error:\x20','):\x20','\x20file(s)\x20with\x20errors,\x20','validCount','2076650bgCFrS','description','1974308TatnBb','file','5043060yOaaNH','targetDir','endsWith','log','errors','Error:\x20No\x20YAML\x20files\x20found\x20in\x20','2xMfywI','726036DmSgmv','parentSegment','dim','3561257DccbHu','parent_segment\x20is\x20not\x20set.\x20Use\x20`tdx\x20sg\x20use\x20<parent_name>`\x20to\x20set\x20it.\x0a','396648ORAQqE'];a34_0x4996=function(){return _0x4d1ac3;};return a34_0x4996();}function a34_0x3e67(_0x4e046a,_0x1b2cfa){_0x4e046a=_0x4e046a-0xe0;const _0x4996dc=a34_0x4996();let _0x3e676e=_0x4996dc[_0x4e046a];return _0x3e676e;}const a34_0x4929b3=a34_0x3e67;(function(_0x3ed92,_0x10f4f2){const _0x1bdf7d=a34_0x3e67,_0x83148e=_0x3ed92();while(!![]){try{const _0x13801a=-parseInt(_0x1bdf7d(0xe1))/0x1*(parseInt(_0x1bdf7d(0x109))/0x2)+parseInt(_0x1bdf7d(0x10a))/0x3+parseInt(_0x1bdf7d(0x101))/0x4+parseInt(_0x1bdf7d(0xff))/0x5+-parseInt(_0x1bdf7d(0x103))/0x6+parseInt(_0x1bdf7d(0x10d))/0x7+-parseInt(_0x1bdf7d(0x10f))/0x8;if(_0x13801a===_0x10f4f2)break;else _0x83148e['push'](_0x83148e['shift']());}catch(_0x4d107c){_0x83148e['push'](_0x83148e['shift']());}}}(a34_0x4996,0x6a588));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 a34_0x2ae7fe 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{[a34_0x4929b3(0x113)]=a34_0x4929b3(0xe5);[a34_0x4929b3(0x100)]='Validate\x20segment\x20and\x20journey\x20YAML\x20files';async[a34_0x4929b3(0xf0)](_0x2951dd){const _0x58b4f8=a34_0x4929b3,{options:_0x416085,args:_0x20045a}=_0x2951dd,_0x4a8ec0=_0x416085,_0x7b0462=await resolveTarget({'arg':_0x20045a[0x0],'contextParent':_0x416085[_0x58b4f8(0x10b)],'cwd':process[_0x58b4f8(0x111)]()});if(!isSuccessfulResolution(_0x7b0462))return _0x7b0462[_0x58b4f8(0xe0)]==='no_parent'?(console['error'](a34_0x2ae7fe[_0x58b4f8(0xf5)](_0x58b4f8(0x10e))),console[_0x58b4f8(0xea)](_0x58b4f8(0xee)),console[_0x58b4f8(0xea)](_0x58b4f8(0x110)),console[_0x58b4f8(0xea)](_0x58b4f8(0xed))):(console['error'](a34_0x2ae7fe[_0x58b4f8(0xf4)](_0x58b4f8(0xfb)+_0x7b0462[_0x58b4f8(0xeb)]+'\x0a')),_0x7b0462['helpText']&&console['error'](a34_0x2ae7fe[_0x58b4f8(0xf2)](_0x7b0462[_0x58b4f8(0xf1)]))),0x1;const _0x48d785=_0x7b0462[_0x58b4f8(0x104)],_0x29136d=_0x7b0462[_0x58b4f8(0xe2)]===_0x58b4f8(0x102)?_0x7b0462[_0x58b4f8(0x112)]:undefined;if(!_0x29136d&&!existsSync(_0x48d785))return console[_0x58b4f8(0xea)](a34_0x2ae7fe[_0x58b4f8(0xf4)]('Error:\x20Directory\x20not\x20found:\x20'+_0x48d785+'\x0a')),0x1;let _0x36cdc0;if(_0x29136d){if(!_0x29136d[_0x58b4f8(0x105)](_0x58b4f8(0xe3))&&!_0x29136d[_0x58b4f8(0x105)](_0x58b4f8(0xe6)))return console[_0x58b4f8(0xea)](a34_0x2ae7fe[_0x58b4f8(0xf4)](_0x58b4f8(0xf8)+_0x29136d+'\x0a')),0x1;_0x36cdc0=[_0x29136d];}else _0x36cdc0=findYamlFiles(_0x48d785);if(_0x36cdc0[_0x58b4f8(0xf6)]===0x0)return console['error'](a34_0x2ae7fe['red'](_0x58b4f8(0x108)+_0x48d785+'\x0a')),0x1;const _0x3264ec=validateYamlFiles(_0x36cdc0,_0x48d785),_0x520f2e=calculateSummary(_0x3264ec);for(const _0x4792ac of _0x3264ec){if(!isValidationResult(_0x4792ac))continue;const {relativePath:_0x3e7a55,source:_0x57c466,result:_0x2930c0,fileType:_0x33e7d0}=_0x4792ac,_0x16f721=_0x33e7d0;if(_0x2930c0['valid']&&_0x2930c0[_0x58b4f8(0xfa)][_0x58b4f8(0xf6)]===0x0)_0x4a8ec0[_0x58b4f8(0xf9)]&&console[_0x58b4f8(0x106)](a34_0x2ae7fe['green']('✔\x20'+_0x3e7a55)+a34_0x2ae7fe[_0x58b4f8(0x10c)]('\x20('+_0x16f721+')'));else _0x2930c0[_0x58b4f8(0xec)]?(console[_0x58b4f8(0x106)](a34_0x2ae7fe['yellow']('⚠\x20'+_0x3e7a55)+a34_0x2ae7fe[_0x58b4f8(0x10c)]('\x20('+_0x16f721+_0x58b4f8(0xfc)+_0x2930c0[_0x58b4f8(0xfa)][_0x58b4f8(0xf6)]+_0x58b4f8(0xf3))),console[_0x58b4f8(0x106)](formatValidationResult(_0x2930c0,_0x57c466,_0x3e7a55))):(console[_0x58b4f8(0x106)](a34_0x2ae7fe[_0x58b4f8(0xf4)]('✖\x20'+_0x3e7a55)+a34_0x2ae7fe['dim']('\x20('+_0x16f721+_0x58b4f8(0xfc)+_0x2930c0[_0x58b4f8(0x107)][_0x58b4f8(0xf6)]+_0x58b4f8(0xe9))),console['log'](formatValidationResult(_0x2930c0,_0x57c466,_0x3e7a55)));}return console[_0x58b4f8(0x106)](''),_0x520f2e[_0x58b4f8(0xf7)]?(console['log'](a34_0x2ae7fe['red']('Validation\x20failed:\x20'+_0x520f2e[_0x58b4f8(0xe8)]+_0x58b4f8(0xfd)+_0x520f2e[_0x58b4f8(0xfe)]+_0x58b4f8(0xef))),_0x520f2e[_0x58b4f8(0xe7)]>0x0&&console['log'](a34_0x2ae7fe[_0x58b4f8(0xf5)](_0x520f2e[_0x58b4f8(0xe7)]+_0x58b4f8(0xe4))),0x1):(console[_0x58b4f8(0x106)](a34_0x2ae7fe['green']('✔\x20All\x20'+_0x520f2e[_0x58b4f8(0xfe)]+'\x20file(s)\x20valid')),_0x520f2e[_0x58b4f8(0xe7)]>0x0&&console[_0x58b4f8(0x106)](a34_0x2ae7fe[_0x58b4f8(0xf5)](_0x520f2e[_0x58b4f8(0xe7)]+_0x58b4f8(0xe4))),0x0);}}
1
+ function a34_0x5a92(){const _0x234b99=['60269CXOvoe','Error:\x20File\x20must\x20have\x20.yml\x20or\x20.yaml\x20extension:\x20','endsWith','warnings','Error:\x20No\x20YAML\x20files\x20found\x20in\x20','1952MTFaZl','yellow','validCount','12786620oeJCOy','2569866cQpUpR','no_parent','.yml','Error:\x20Directory\x20not\x20found:\x20','red','description','name','):\x20','Usage:\x20tdx\x20sg\x20validate\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Validate\x20all\x20(requires\x20context)','green','\x20file(s)\x20valid','\x20\x20\x20\x20\x20\x20\x20tdx\x20sg\x20validate\x20<file_path>\x20\x20#\x20Validate\x20specific\x20file','1038cPfJek','errors','.yaml','file','invalidCount','segment:validate','Error:\x20','\x20error(s)','cyan','valid','288UTpSkH','parentSegment','Validation\x20failed:\x20','hasErrors','filePath','length','error','Validate\x20segment\x20and\x20journey\x20YAML\x20files','execute','verbose','cwd','log','10XsfkPF','type','helpText','\x20\x20\x20\x20\x20\x20\x20tdx\x20sg\x20validate\x20.\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Validate\x20current\x20directory','✔\x20All\x20','message','5jLSiQP','563986NEZvcQ','\x20file(s)\x20with\x20errors,\x20','dim','\x20warning(s)\x20found','6685xzeTAo','warningCount','1853284NnjUKu','39942IoqnNl'];a34_0x5a92=function(){return _0x234b99;};return a34_0x5a92();}const a34_0x2f1452=a34_0x5bc4;(function(_0x167c5a,_0x26841a){const _0x1ed453=a34_0x5bc4,_0x3be56c=_0x167c5a();while(!![]){try{const _0x538f4c=-parseInt(_0x1ed453(0x228))/0x1*(parseInt(_0x1ed453(0x229))/0x2)+-parseInt(_0x1ed453(0x200))/0x3+parseInt(_0x1ed453(0x1f5))/0x4*(parseInt(_0x1ed453(0x222))/0x5)+-parseInt(_0x1ed453(0x20c))/0x6*(parseInt(_0x1ed453(0x1f3))/0x7)+-parseInt(_0x1ed453(0x1fc))/0x8*(-parseInt(_0x1ed453(0x1f6))/0x9)+parseInt(_0x1ed453(0x1ff))/0xa+parseInt(_0x1ed453(0x1f7))/0xb*(parseInt(_0x1ed453(0x216))/0xc);if(_0x538f4c===_0x26841a)break;else _0x3be56c['push'](_0x3be56c['shift']());}catch(_0x34bd13){_0x3be56c['push'](_0x3be56c['shift']());}}}(a34_0x5a92,0xf12de));import{BaseCommand}from'./command.js';import{resolveTarget,isSuccessfulResolution}from'../sdk/segment/target-resolution.js';import{findYamlFiles}from'../sdk/segment/file-discovery.js';import{existsSync}from'fs';function a34_0x5bc4(_0x58a647,_0x3e04bb){_0x58a647=_0x58a647-0x1f1;const _0x5a9266=a34_0x5a92();let _0x5bc402=_0x5a9266[_0x58a647];return _0x5bc402;}import a34_0x41d0b8 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{[a34_0x2f1452(0x206)]=a34_0x2f1452(0x211);[a34_0x2f1452(0x205)]=a34_0x2f1452(0x21d);async[a34_0x2f1452(0x21e)](_0x5f12a5){const _0x2a5d8a=a34_0x2f1452,{options:_0x3d765e,args:_0x37c6da}=_0x5f12a5,_0x14541a=_0x3d765e,_0x331f98=await resolveTarget({'arg':_0x37c6da[0x0],'contextParent':_0x3d765e[_0x2a5d8a(0x217)],'cwd':process[_0x2a5d8a(0x220)]()});if(!isSuccessfulResolution(_0x331f98))return _0x331f98['errorCode']===_0x2a5d8a(0x201)?(console['error'](a34_0x41d0b8[_0x2a5d8a(0x1fd)]('parent_segment\x20is\x20not\x20set.\x20Use\x20`tdx\x20sg\x20use\x20<parent_name>`\x20to\x20set\x20it.\x0a')),console['error'](_0x2a5d8a(0x208)),console['error'](_0x2a5d8a(0x225)),console[_0x2a5d8a(0x21c)](_0x2a5d8a(0x20b))):(console[_0x2a5d8a(0x21c)](a34_0x41d0b8[_0x2a5d8a(0x204)](_0x2a5d8a(0x212)+_0x331f98[_0x2a5d8a(0x227)]+'\x0a')),_0x331f98[_0x2a5d8a(0x224)]&&console[_0x2a5d8a(0x21c)](a34_0x41d0b8[_0x2a5d8a(0x214)](_0x331f98[_0x2a5d8a(0x224)]))),0x1;const _0xebce73=_0x331f98['targetDir'],_0x3aba83=_0x331f98[_0x2a5d8a(0x223)]===_0x2a5d8a(0x20f)?_0x331f98[_0x2a5d8a(0x21a)]:undefined;if(!_0x3aba83&&!existsSync(_0xebce73))return console[_0x2a5d8a(0x21c)](a34_0x41d0b8['red'](_0x2a5d8a(0x203)+_0xebce73+'\x0a')),0x1;let _0x4dbeb5;if(_0x3aba83){if(!_0x3aba83[_0x2a5d8a(0x1f9)](_0x2a5d8a(0x202))&&!_0x3aba83[_0x2a5d8a(0x1f9)](_0x2a5d8a(0x20e)))return console[_0x2a5d8a(0x21c)](a34_0x41d0b8[_0x2a5d8a(0x204)](_0x2a5d8a(0x1f8)+_0x3aba83+'\x0a')),0x1;_0x4dbeb5=[_0x3aba83];}else _0x4dbeb5=findYamlFiles(_0xebce73);if(_0x4dbeb5[_0x2a5d8a(0x21b)]===0x0)return console[_0x2a5d8a(0x21c)](a34_0x41d0b8[_0x2a5d8a(0x204)](_0x2a5d8a(0x1fb)+_0xebce73+'\x0a')),0x1;const _0x1cbc4c=validateYamlFiles(_0x4dbeb5,_0xebce73),_0x17d66c=calculateSummary(_0x1cbc4c);for(const _0x1109a7 of _0x1cbc4c){if(!isValidationResult(_0x1109a7))continue;const {relativePath:_0x4ada0b,source:_0x14b1a5,result:_0xb139ee,fileType:_0x44aeb9}=_0x1109a7,_0x3ae542=_0x44aeb9;if(_0xb139ee[_0x2a5d8a(0x215)]&&_0xb139ee[_0x2a5d8a(0x1fa)][_0x2a5d8a(0x21b)]===0x0)_0x14541a[_0x2a5d8a(0x21f)]&&console[_0x2a5d8a(0x221)](a34_0x41d0b8[_0x2a5d8a(0x209)]('✔\x20'+_0x4ada0b)+a34_0x41d0b8[_0x2a5d8a(0x1f1)]('\x20('+_0x3ae542+')'));else _0xb139ee[_0x2a5d8a(0x215)]?(console['log'](a34_0x41d0b8[_0x2a5d8a(0x1fd)]('⚠\x20'+_0x4ada0b)+a34_0x41d0b8[_0x2a5d8a(0x1f1)]('\x20('+_0x3ae542+'):\x20'+_0xb139ee[_0x2a5d8a(0x1fa)][_0x2a5d8a(0x21b)]+'\x20warning(s)')),console[_0x2a5d8a(0x221)](formatValidationResult(_0xb139ee,_0x14b1a5,_0x4ada0b))):(console['log'](a34_0x41d0b8[_0x2a5d8a(0x204)]('✖\x20'+_0x4ada0b)+a34_0x41d0b8[_0x2a5d8a(0x1f1)]('\x20('+_0x3ae542+_0x2a5d8a(0x207)+_0xb139ee[_0x2a5d8a(0x20d)][_0x2a5d8a(0x21b)]+_0x2a5d8a(0x213))),console['log'](formatValidationResult(_0xb139ee,_0x14b1a5,_0x4ada0b)));}return console[_0x2a5d8a(0x221)](''),_0x17d66c[_0x2a5d8a(0x219)]?(console[_0x2a5d8a(0x221)](a34_0x41d0b8[_0x2a5d8a(0x204)](_0x2a5d8a(0x218)+_0x17d66c[_0x2a5d8a(0x210)]+_0x2a5d8a(0x22a)+_0x17d66c[_0x2a5d8a(0x1fe)]+'\x20valid')),_0x17d66c[_0x2a5d8a(0x1f4)]>0x0&&console[_0x2a5d8a(0x221)](a34_0x41d0b8[_0x2a5d8a(0x1fd)](_0x17d66c['warningCount']+_0x2a5d8a(0x1f2))),0x1):(console[_0x2a5d8a(0x221)](a34_0x41d0b8[_0x2a5d8a(0x209)](_0x2a5d8a(0x226)+_0x17d66c[_0x2a5d8a(0x1fe)]+_0x2a5d8a(0x20a))),_0x17d66c[_0x2a5d8a(0x1f4)]>0x0&&console[_0x2a5d8a(0x221)](a34_0x41d0b8['yellow'](_0x17d66c[_0x2a5d8a(0x1f4)]+_0x2a5d8a(0x1f2))),0x0);}}
@@ -1 +1 @@
1
- const a35_0x256b28=a35_0x65a0;function a35_0x65a0(_0x20fe20,_0x3797db){_0x20fe20=_0x20fe20-0x167;const _0x287204=a35_0x2872();let _0x65a0ad=_0x287204[_0x20fe20];return _0x65a0ad;}(function(_0x42b0e3,_0x2a7108){const _0xb56ae7=a35_0x65a0,_0x38ea0f=_0x42b0e3();while(!![]){try{const _0x33e3f2=-parseInt(_0xb56ae7(0x1a0))/0x1+parseInt(_0xb56ae7(0x192))/0x2+-parseInt(_0xb56ae7(0x16e))/0x3*(-parseInt(_0xb56ae7(0x19a))/0x4)+-parseInt(_0xb56ae7(0x180))/0x5+-parseInt(_0xb56ae7(0x193))/0x6+-parseInt(_0xb56ae7(0x1a2))/0x7*(-parseInt(_0xb56ae7(0x184))/0x8)+-parseInt(_0xb56ae7(0x19d))/0x9;if(_0x33e3f2===_0x2a7108)break;else _0x38ea0f['push'](_0x38ea0f['shift']());}catch(_0x5845ed){_0x38ea0f['push'](_0x38ea0f['shift']());}}}(a35_0x2872,0xc4cd3));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleSDKOutput}from'../core/command-output.js';import{withSpinner}from'../utils/spinner.js';import{formatFlatList,formatTree}from'../sdk/util/tree-formatter.js';function a35_0x2872(){const _0xc32802=['name','\x20segment','map','2722292xrpCNk','2538234hNSmHY','Folder/pattern\x20arg:\x20','resolvePathToResource','json','Listing\x20folders,\x20segments,\x20and\x20journeys...',']\x20matching\x20\x27','✔\x20Built\x20tree\x20with\x20','6092592WHdtjL','/app/ps/','Resolving\x20parent\x20segment\x20\x27','14057568IpeSpB','test','Recursive\x20mode:\x20enabled','810771qyuCDe','Use\x20tdx\x20ps\x20list\x20to\x20see\x20available\x20parent\x20segments.','7ADPFKa','\x20\x20tdx\x20sg\x20use\x20\x22My\x20Audience\x22','Building\x20hierarchy\x20tree...','journeys','folderId','maxDepth','Site:\x20','filter','listRecursive','folder','execute','\x20folder','Parent\x20ID:\x20','\x27...','journeyBundleName','data',',\x20and\x20','/j/da','log','✔\x20Found\x20','segments','parentId','3WmzIsd','cause','listWithPattern','Resolving\x20path\x20\x27','/e/','listUnified','listUnifiedWithJourneys','\x20journey','length','journey','Set\x20a\x20parent\x20segment\x20context\x20first:','Error:\x20','localeCompare','error','\x5c$&','segment','folders','format','2797320CiUKzU','jsonl','includes','Error:\x20No\x20parent\x20segment\x20context\x20set.','10216248RigcsB','\x20\x20tdx\x20sg\x20pull\x20\x22My\x20Audience\x22','verbose','sort','dim','parentSegment','site','\x20matching\x20\x27','children','type','replace'];a35_0x2872=function(){return _0xc32802;};return a35_0x2872();}import{getConsoleNextUrl}from'../sdk/client/endpoints.js';import a35_0x1aeacb from'chalk';export class SegmentsCommand extends BaseCommand{['name']=a35_0x256b28(0x16c);['description']='List\x20folders\x20and\x20child\x20segments';async[a35_0x256b28(0x1ac)](_0x2fbff7){const _0x585062=a35_0x256b28,{options:_0x6af830,args:_0x4fc319}=_0x2fbff7,_0xb966bb=_0x6af830['recursive'],_0x2c689f=_0x4fc319[0x0];try{const _0x2364ea=_0x6af830[_0x585062(0x189)];_0x6af830[_0x585062(0x186)]&&(console[_0x585062(0x17b)](_0x585062(0x1a8)+_0x6af830['site']),console['error']('Parent\x20segment\x20context:\x20'+(_0x2364ea||'(not\x20set)')),_0x2c689f&&console[_0x585062(0x17b)](_0x585062(0x194)+_0x2c689f),_0xb966bb&&console['error'](_0x585062(0x19f)));if(!_0x2364ea)return console[_0x585062(0x17b)](_0x585062(0x183)),console[_0x585062(0x17b)](''),console[_0x585062(0x17b)](_0x585062(0x178)),console[_0x585062(0x17b)](_0x585062(0x185)),console[_0x585062(0x17b)](_0x585062(0x1a3)),console[_0x585062(0x17b)](''),console[_0x585062(0x17b)](_0x585062(0x1a1)),0x1;const _0x149196=_0x2c689f&&(_0x2c689f['includes']('*')||_0x2c689f[_0x585062(0x182)]('?'));if(_0x149196)return await this[_0x585062(0x170)](_0x2fbff7,_0x2364ea,_0x2c689f);const _0x2b0da4=_0x2c689f?_0x2364ea+'/'+_0x2c689f:_0x2364ea;return _0xb966bb?await this[_0x585062(0x1aa)](_0x2fbff7,_0x2b0da4):await this[_0x585062(0x173)](_0x2fbff7,_0x2b0da4);}catch(_0x163679){if(_0x163679 instanceof SDKError)return console[_0x585062(0x17b)](_0x585062(0x179)+_0x163679['message']),_0x163679[_0x585062(0x16f)]&&console[_0x585062(0x17b)]('\x20\x20Cause:\x20'+_0x163679[_0x585062(0x16f)]),0x1;throw _0x163679;}}async[a35_0x256b28(0x170)](_0x41da43,_0x2a4b3c,_0x515e5f){const _0xa1fb3c=a35_0x256b28,{options:_0x420390,tdx:_0x2036e1}=_0x41da43,_0x5c2187=await withSpinner(_0xa1fb3c(0x19c)+_0x2a4b3c+_0xa1fb3c(0x1af),()=>_0x2036e1['segment'][_0xa1fb3c(0x195)](_0x2a4b3c),{'verbose':_0x420390[_0xa1fb3c(0x186)]}),_0x2fec8f=_0x5c2187[_0xa1fb3c(0x167)],_0x587fc5=await withSpinner(_0xa1fb3c(0x197),()=>_0x2036e1[_0xa1fb3c(0x17d)]['listUnifiedWithJourneys'](_0x2fec8f[_0xa1fb3c(0x16d)],_0x2fec8f['folderId']),{'verbose':_0x420390[_0xa1fb3c(0x186)]}),{folders:_0xe60a66,segments:_0x411f66,journeys:_0x20edaa}=_0x587fc5[_0xa1fb3c(0x167)],_0x197ec7=_0x515e5f[_0xa1fb3c(0x18e)](/[.+^${}()|[\]\\]/g,_0xa1fb3c(0x17c))[_0xa1fb3c(0x18e)](/\*/g,'.*')[_0xa1fb3c(0x18e)](/\?/g,'.'),_0x45aeca=new RegExp('^'+_0x197ec7+'$','i'),_0x1792d2=_0xe60a66[_0xa1fb3c(0x1a9)](_0x51eab8=>_0x45aeca[_0xa1fb3c(0x19e)](_0x51eab8[_0xa1fb3c(0x18f)])),_0xa2d6fc=_0x411f66[_0xa1fb3c(0x1a9)](_0x3ab61f=>_0x45aeca[_0xa1fb3c(0x19e)](_0x3ab61f[_0xa1fb3c(0x18f)])),_0x2dc9ce=_0x20edaa[_0xa1fb3c(0x1a9)](_0x566b28=>_0x45aeca[_0xa1fb3c(0x19e)](_0x566b28[_0xa1fb3c(0x1b0)])),_0xa939fb=_0x1792d2[_0xa1fb3c(0x176)]+_0xa2d6fc['length']+_0x2dc9ce[_0xa1fb3c(0x176)];console[_0xa1fb3c(0x17b)](_0xa1fb3c(0x16b)+_0x1792d2[_0xa1fb3c(0x176)]+_0xa1fb3c(0x1ad)+(_0x1792d2[_0xa1fb3c(0x176)]!==0x1?'s':'')+',\x20'+_0xa2d6fc['length']+_0xa1fb3c(0x190)+(_0xa2d6fc[_0xa1fb3c(0x176)]!==0x1?'s':'')+',\x20and\x20'+_0x2dc9ce[_0xa1fb3c(0x176)]+'\x20journey'+(_0x2dc9ce[_0xa1fb3c(0x176)]!==0x1?'s':'')+_0xa1fb3c(0x18b)+_0x515e5f+'\x27');const _0x133ba9=_0x2580d2=>{const _0x5f4005=_0xa1fb3c;return getConsoleNextUrl(_0x420390[_0x5f4005(0x18a)],'/app/ps/'+_0x2fec8f[_0x5f4005(0x16d)]+_0x5f4005(0x172)+_0x2580d2);},_0x2c6b56=_0x420390[_0xa1fb3c(0x17f)]===_0xa1fb3c(0x196)||_0x420390['format']===_0xa1fb3c(0x181);if(_0x2c6b56){const _0x6bf0d5=[..._0x1792d2[_0xa1fb3c(0x191)](_0x2b6507=>({..._0x2b6507,'type':_0xa1fb3c(0x1ab)})),..._0xa2d6fc[_0xa1fb3c(0x191)](_0x497700=>({..._0x497700,'type':'segment','url':_0x133ba9(_0x497700['id'])})),..._0x2dc9ce[_0xa1fb3c(0x191)](_0x9c7c38=>({..._0x9c7c38,'name':_0x9c7c38[_0xa1fb3c(0x1b0)],'type':'journey'}))][_0xa1fb3c(0x187)]((_0x4d0552,_0x1abf9d)=>_0x4d0552[_0xa1fb3c(0x18f)][_0xa1fb3c(0x17a)](_0x1abf9d[_0xa1fb3c(0x18f)]));await handleSDKOutput(_0x6bf0d5,_0x420390);}else{if(_0xa939fb===0x0)console[_0xa1fb3c(0x16a)]('No\x20items\x20match\x20pattern:\x20'+_0x515e5f);else{console[_0xa1fb3c(0x16a)](a35_0x1aeacb[_0xa1fb3c(0x188)]('['+_0x2a4b3c+_0xa1fb3c(0x198)+_0x515e5f+'\x27'));const _0xfd12b8=formatFlatList(_0x1792d2,_0xa2d6fc,{'showMetadata':!![],'getSegmentUrl':_0x133ba9},_0x2dc9ce);console[_0xa1fb3c(0x16a)](_0xfd12b8);}}return 0x0;}async[a35_0x256b28(0x173)](_0x252ae6,_0x1598a6){const _0x519e5b=a35_0x256b28,{options:_0x48bdbb,tdx:_0x171816}=_0x252ae6,_0x117a50=await withSpinner(_0x519e5b(0x171)+_0x1598a6+_0x519e5b(0x1af),()=>_0x171816[_0x519e5b(0x17d)][_0x519e5b(0x195)](_0x1598a6),{'verbose':_0x48bdbb[_0x519e5b(0x186)]}),_0x2c1c31=_0x117a50[_0x519e5b(0x167)];_0x48bdbb[_0x519e5b(0x186)]&&(console['error'](_0x519e5b(0x1ae)+_0x2c1c31['parentId']),_0x2c1c31[_0x519e5b(0x1a6)]&&console[_0x519e5b(0x17b)]('Folder\x20ID:\x20'+_0x2c1c31[_0x519e5b(0x1a6)]));const _0x3fa7d6=await withSpinner(_0x519e5b(0x197),()=>_0x171816[_0x519e5b(0x17d)][_0x519e5b(0x174)](_0x2c1c31[_0x519e5b(0x16d)],_0x2c1c31[_0x519e5b(0x1a6)]),{'verbose':_0x48bdbb[_0x519e5b(0x186)]}),{folders:_0xdff41b,segments:_0x5a6dcb,journeys:_0x3157ec}=_0x3fa7d6[_0x519e5b(0x167)],_0xfb6e42=_0xdff41b['length']+_0x5a6dcb[_0x519e5b(0x176)]+_0x3157ec[_0x519e5b(0x176)];console[_0x519e5b(0x17b)](_0x519e5b(0x16b)+_0xdff41b['length']+_0x519e5b(0x1ad)+(_0xdff41b['length']!==0x1?'s':'')+',\x20'+_0x5a6dcb['length']+_0x519e5b(0x190)+(_0x5a6dcb[_0x519e5b(0x176)]!==0x1?'s':'')+',\x20and\x20'+_0x3157ec[_0x519e5b(0x176)]+_0x519e5b(0x175)+(_0x3157ec[_0x519e5b(0x176)]!==0x1?'s':''));const _0x376a5e=_0x5af0e1=>{const _0x1cfeae=_0x519e5b;return getConsoleNextUrl(_0x48bdbb[_0x1cfeae(0x18a)],_0x1cfeae(0x19b)+_0x2c1c31[_0x1cfeae(0x16d)]+_0x1cfeae(0x172)+_0x5af0e1);},_0x4aaeab=_0x1a1b49=>{const _0x34db76=_0x519e5b;return getConsoleNextUrl(_0x48bdbb[_0x34db76(0x18a)],_0x34db76(0x19b)+_0x2c1c31[_0x34db76(0x16d)]+'/e/'+_0x1a1b49+_0x34db76(0x169));},_0x902362=_0x48bdbb[_0x519e5b(0x17f)]===_0x519e5b(0x196)||_0x48bdbb['format']==='jsonl';if(_0x902362){const _0x38f6c6=[..._0xdff41b['map'](_0x515eac=>({..._0x515eac,'type':_0x519e5b(0x1ab)})),..._0x5a6dcb[_0x519e5b(0x191)](_0x16dd7c=>({..._0x16dd7c,'type':_0x519e5b(0x17d),'url':_0x376a5e(_0x16dd7c['id'])})),..._0x3157ec['map'](_0x233a29=>({..._0x233a29,'name':_0x233a29[_0x519e5b(0x1b0)],'type':_0x519e5b(0x177),'url':_0x4aaeab(_0x233a29['id'])}))][_0x519e5b(0x187)]((_0x25c677,_0x1392b1)=>_0x25c677[_0x519e5b(0x18f)][_0x519e5b(0x17a)](_0x1392b1[_0x519e5b(0x18f)]));await handleSDKOutput(_0x38f6c6,_0x48bdbb);}else{if(_0xfb6e42===0x0)console[_0x519e5b(0x16a)](a35_0x1aeacb[_0x519e5b(0x188)]('['+_0x1598a6+']')),console['log']('(empty)');else{console[_0x519e5b(0x16a)](a35_0x1aeacb[_0x519e5b(0x188)]('['+_0x1598a6+']'));const _0x18a862=formatFlatList(_0xdff41b,_0x5a6dcb,{'showMetadata':!![],'getSegmentUrl':_0x376a5e,'getJourneyUrl':_0x4aaeab},_0x3157ec);console[_0x519e5b(0x16a)](_0x18a862);}}return 0x0;}async['listRecursive'](_0x48dd3e,_0xaa48a0){const _0x4cef69=a35_0x256b28,{options:_0x5961b1,tdx:_0x313365}=_0x48dd3e,_0x2fcfd3=await withSpinner(_0x4cef69(0x171)+_0xaa48a0+_0x4cef69(0x1af),()=>_0x313365[_0x4cef69(0x17d)][_0x4cef69(0x195)](_0xaa48a0),{'verbose':_0x5961b1[_0x4cef69(0x186)]}),_0x15ee1b=_0x2fcfd3[_0x4cef69(0x167)];_0x5961b1['verbose']&&(console['error'](_0x4cef69(0x1ae)+_0x15ee1b[_0x4cef69(0x16d)]),_0x15ee1b[_0x4cef69(0x1a6)]&&console[_0x4cef69(0x17b)]('Folder\x20ID:\x20'+_0x15ee1b[_0x4cef69(0x1a6)]));const _0x4ee699=_0x5961b1[_0x4cef69(0x1a7)]||0xa,_0x48bc54=await withSpinner(_0x4cef69(0x1a4),()=>_0x313365[_0x4cef69(0x17d)]['listRecursive'](_0x15ee1b[_0x4cef69(0x16d)],_0x15ee1b[_0x4cef69(0x1a6)],0x0,_0x4ee699),{'verbose':_0x5961b1[_0x4cef69(0x186)]}),_0x4dcf21=_0x48bc54[_0x4cef69(0x167)],_0x2039ca=_0x48a599=>{const _0xc0b54c=_0x4cef69;let _0x1ea742=0x0,_0x325a2e=0x0,_0x30bf43=0x0;for(const _0x4e1b5f of _0x48a599){if(_0x4e1b5f[_0xc0b54c(0x18d)]===_0xc0b54c(0x1ab))_0x1ea742++;else{if(_0x4e1b5f[_0xc0b54c(0x18d)]==='segment')_0x325a2e++;else{if(_0x4e1b5f[_0xc0b54c(0x18d)]===_0xc0b54c(0x177))_0x30bf43++;}}if(_0x4e1b5f['children']){const _0x441442=_0x2039ca(_0x4e1b5f[_0xc0b54c(0x18c)]);_0x1ea742+=_0x441442[_0xc0b54c(0x17e)],_0x325a2e+=_0x441442[_0xc0b54c(0x16c)],_0x30bf43+=_0x441442['journeys'];}}return{'folders':_0x1ea742,'segments':_0x325a2e,'journeys':_0x30bf43};},_0x27516e=_0x2039ca(_0x4dcf21);console[_0x4cef69(0x17b)](_0x4cef69(0x199)+_0x27516e['folders']+'\x20folder'+(_0x27516e[_0x4cef69(0x17e)]!==0x1?'s':'')+',\x20'+_0x27516e[_0x4cef69(0x16c)]+_0x4cef69(0x190)+(_0x27516e[_0x4cef69(0x16c)]!==0x1?'s':'')+_0x4cef69(0x168)+_0x27516e[_0x4cef69(0x1a5)]+_0x4cef69(0x175)+(_0x27516e[_0x4cef69(0x1a5)]!==0x1?'s':''));const _0x40a280=_0x4e043b=>{const _0x46d72f=_0x4cef69;return getConsoleNextUrl(_0x5961b1['site'],_0x46d72f(0x19b)+_0x15ee1b[_0x46d72f(0x16d)]+_0x46d72f(0x172)+_0x4e043b);},_0x4ff8de=_0x2367f1=>{const _0xa697de=_0x4cef69;return getConsoleNextUrl(_0x5961b1[_0xa697de(0x18a)],'/app/ps/'+_0x15ee1b[_0xa697de(0x16d)]+'/e/'+_0x2367f1+_0xa697de(0x169));};if(_0x5961b1[_0x4cef69(0x17f)]===_0x4cef69(0x196)||_0x5961b1[_0x4cef69(0x17f)]==='jsonl')await handleSDKOutput(_0x4dcf21,_0x5961b1);else{console[_0x4cef69(0x16a)](a35_0x1aeacb[_0x4cef69(0x188)]('['+_0xaa48a0+']'));const _0x3b8b5f=formatTree(_0x4dcf21,{'showMetadata':!![],'getSegmentUrl':_0x40a280,'getJourneyUrl':_0x4ff8de});console[_0x4cef69(0x16a)](_0x3b8b5f);}return 0x0;}}
1
+ function a35_0x5710(_0x5323ee,_0x46884e){_0x5323ee=_0x5323ee-0xcb;const _0x1418b5=a35_0x1418();let _0x5710b3=_0x1418b5[_0x5323ee];return _0x5710b3;}const a35_0x4d953d=a35_0x5710;(function(_0x2b6352,_0x5b216b){const _0x3d6175=a35_0x5710,_0x2bff58=_0x2b6352();while(!![]){try{const _0x43fb81=parseInt(_0x3d6175(0xf5))/0x1*(parseInt(_0x3d6175(0x106))/0x2)+parseInt(_0x3d6175(0xfa))/0x3*(parseInt(_0x3d6175(0x116))/0x4)+parseInt(_0x3d6175(0x10b))/0x5*(parseInt(_0x3d6175(0x11a))/0x6)+-parseInt(_0x3d6175(0xcd))/0x7*(-parseInt(_0x3d6175(0xd5))/0x8)+-parseInt(_0x3d6175(0xce))/0x9+-parseInt(_0x3d6175(0xda))/0xa+-parseInt(_0x3d6175(0xeb))/0xb*(parseInt(_0x3d6175(0xe1))/0xc);if(_0x43fb81===_0x5b216b)break;else _0x2bff58['push'](_0x2bff58['shift']());}catch(_0x141e4e){_0x2bff58['push'](_0x2bff58['shift']());}}}(a35_0x1418,0x59fca));import{BaseCommand}from'./command.js';function a35_0x1418(){const _0x436819=['cause','type','435fBaOtp','message','parentSegment','localeCompare','/app/ps/','\x5c$&','folders','resolvePathToResource','folder','✔\x20Built\x20tree\x20with\x20','\x20folder','4eJhdKT','children','\x20journey','\x20segment','13506zrsXkS','Resolving\x20path\x20\x27','Parent\x20segment\x20context:\x20','1967GQsdCY','1022193OsoiCC','listUnified','description','Error:\x20No\x20parent\x20segment\x20context\x20set.','Error:\x20','(not\x20set)','execute','5176BaKzjt','format','dim','Recursive\x20mode:\x20enabled','sort','5383990rfPFwL','Building\x20hierarchy\x20tree...','length',',\x20and\x20','\x27...','journeys','List\x20folders\x20and\x20child\x20segments','12hwYroL','journey','replace','listWithPattern','/e/','Folder/pattern\x20arg:\x20',']\x20matching\x20\x27','recursive','json','Listing\x20folders,\x20segments,\x20and\x20journeys...','5200613onAXdh','listRecursive','test','maxDepth','name','folderId','jsonl','Parent\x20ID:\x20','listUnifiedWithJourneys','segment','10THnLPQ','Folder\x20ID:\x20','filter','journeyBundleName','error','2059653kVvUuv','segments','site','\x20matching\x20\x27','includes','parentId','log','Resolving\x20parent\x20segment\x20\x27','✔\x20Found\x20','Site:\x20','map','/j/da','85830ScJYgy','data','verbose'];a35_0x1418=function(){return _0x436819;};return a35_0x1418();}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 a35_0x4ebe70 from'chalk';export class SegmentsCommand extends BaseCommand{['name']=a35_0x4d953d(0xfb);[a35_0x4d953d(0xd0)]=a35_0x4d953d(0xe0);async[a35_0x4d953d(0xd4)](_0x780214){const _0x388333=a35_0x4d953d,{options:_0x456177,args:_0x2a365c}=_0x780214,_0x16fa28=_0x456177[_0x388333(0xe8)],_0x63b220=_0x2a365c[0x0];try{const _0x2df718=_0x456177[_0x388333(0x10d)];_0x456177[_0x388333(0x108)]&&(console['error'](_0x388333(0x103)+_0x456177[_0x388333(0xfc)]),console[_0x388333(0xf9)](_0x388333(0xcc)+(_0x2df718||_0x388333(0xd3))),_0x63b220&&console['error'](_0x388333(0xe6)+_0x63b220),_0x16fa28&&console['error'](_0x388333(0xd8)));if(!_0x2df718)return console['error'](_0x388333(0xd1)),console['error'](''),console[_0x388333(0xf9)]('Set\x20a\x20parent\x20segment\x20context\x20first:'),console[_0x388333(0xf9)]('\x20\x20tdx\x20sg\x20pull\x20\x22My\x20Audience\x22'),console[_0x388333(0xf9)]('\x20\x20tdx\x20sg\x20use\x20\x22My\x20Audience\x22'),console[_0x388333(0xf9)](''),console['error']('Use\x20tdx\x20ps\x20list\x20to\x20see\x20available\x20parent\x20segments.'),0x1;const _0x2c3037=_0x63b220&&(_0x63b220[_0x388333(0xfe)]('*')||_0x63b220[_0x388333(0xfe)]('?'));if(_0x2c3037)return await this[_0x388333(0xe4)](_0x780214,_0x2df718,_0x63b220);const _0x5286ca=_0x63b220?_0x2df718+'/'+_0x63b220:_0x2df718;return _0x16fa28?await this[_0x388333(0xec)](_0x780214,_0x5286ca):await this[_0x388333(0xcf)](_0x780214,_0x5286ca);}catch(_0x176883){if(_0x176883 instanceof SDKError)return console['error'](_0x388333(0xd2)+_0x176883[_0x388333(0x10c)]),_0x176883[_0x388333(0x109)]&&console['error']('\x20\x20Cause:\x20'+_0x176883[_0x388333(0x109)]),0x1;throw _0x176883;}}async[a35_0x4d953d(0xe4)](_0x275ba3,_0x5ab7b8,_0x509e07){const _0x5a47cf=a35_0x4d953d,{options:_0x47b600,tdx:_0x558890}=_0x275ba3,_0xddd5a8=await withSpinner(_0x5a47cf(0x101)+_0x5ab7b8+_0x5a47cf(0xde),()=>_0x558890[_0x5a47cf(0xf4)][_0x5a47cf(0x112)](_0x5ab7b8),{'verbose':_0x47b600[_0x5a47cf(0x108)]}),_0x4537c2=_0xddd5a8['data'],_0x5765c5=await withSpinner(_0x5a47cf(0xea),()=>_0x558890['segment'][_0x5a47cf(0xf3)](_0x4537c2[_0x5a47cf(0xff)],_0x4537c2[_0x5a47cf(0xf0)]),{'verbose':_0x47b600[_0x5a47cf(0x108)]}),{folders:_0x38094b,segments:_0x5c6a5,journeys:_0x18efef}=_0x5765c5['data'],_0xd7f888=_0x509e07[_0x5a47cf(0xe3)](/[.+^${}()|[\]\\]/g,_0x5a47cf(0x110))[_0x5a47cf(0xe3)](/\*/g,'.*')['replace'](/\?/g,'.'),_0x842289=new RegExp('^'+_0xd7f888+'$','i'),_0x20dca9=_0x38094b[_0x5a47cf(0xf7)](_0x6a5ef0=>_0x842289['test'](_0x6a5ef0['name'])),_0x4f3602=_0x5c6a5['filter'](_0x4a334b=>_0x842289['test'](_0x4a334b[_0x5a47cf(0xef)])),_0x219396=_0x18efef[_0x5a47cf(0xf7)](_0x2db449=>_0x842289[_0x5a47cf(0xed)](_0x2db449[_0x5a47cf(0xf8)])),_0x155de0=_0x20dca9[_0x5a47cf(0xdc)]+_0x4f3602[_0x5a47cf(0xdc)]+_0x219396[_0x5a47cf(0xdc)];console[_0x5a47cf(0xf9)](_0x5a47cf(0x102)+_0x20dca9[_0x5a47cf(0xdc)]+'\x20folder'+(_0x20dca9[_0x5a47cf(0xdc)]!==0x1?'s':'')+',\x20'+_0x4f3602[_0x5a47cf(0xdc)]+'\x20segment'+(_0x4f3602[_0x5a47cf(0xdc)]!==0x1?'s':'')+_0x5a47cf(0xdd)+_0x219396[_0x5a47cf(0xdc)]+_0x5a47cf(0x118)+(_0x219396['length']!==0x1?'s':'')+_0x5a47cf(0xfd)+_0x509e07+'\x27');const _0x192b26=_0x2d3ea3=>{const _0x3c9425=_0x5a47cf;return getConsoleNextUrl(_0x47b600[_0x3c9425(0xfc)],_0x3c9425(0x10f)+_0x4537c2[_0x3c9425(0xff)]+'/e/'+_0x2d3ea3);},_0xfc038d=_0x47b600[_0x5a47cf(0xd6)]===_0x5a47cf(0xe9)||_0x47b600['format']===_0x5a47cf(0xf1);if(_0xfc038d){const _0x4e3009=[..._0x20dca9['map'](_0x4d05ab=>({..._0x4d05ab,'type':'folder'})),..._0x4f3602[_0x5a47cf(0x104)](_0x388d02=>({..._0x388d02,'type':'segment','url':_0x192b26(_0x388d02['id'])})),..._0x219396['map'](_0x44e7c8=>({..._0x44e7c8,'name':_0x44e7c8['journeyBundleName'],'type':'journey'}))]['sort']((_0x20a59f,_0x2cfed8)=>_0x20a59f[_0x5a47cf(0xef)][_0x5a47cf(0x10e)](_0x2cfed8[_0x5a47cf(0xef)]));await handleSDKOutput(_0x4e3009,_0x47b600);}else{if(_0x155de0===0x0)console[_0x5a47cf(0x100)]('No\x20items\x20match\x20pattern:\x20'+_0x509e07);else{console[_0x5a47cf(0x100)](a35_0x4ebe70['dim']('['+_0x5ab7b8+_0x5a47cf(0xe7)+_0x509e07+'\x27'));const _0x1b1cdb=formatFlatList(_0x20dca9,_0x4f3602,{'showMetadata':!![],'getSegmentUrl':_0x192b26},_0x219396);console[_0x5a47cf(0x100)](_0x1b1cdb);}}return 0x0;}async['listUnified'](_0x56ec89,_0x483b28){const _0x228130=a35_0x4d953d,{options:_0x474f01,tdx:_0x50e62e}=_0x56ec89,_0x259c35=await withSpinner(_0x228130(0xcb)+_0x483b28+_0x228130(0xde),()=>_0x50e62e['segment'][_0x228130(0x112)](_0x483b28),{'verbose':_0x474f01['verbose']}),_0x48af0f=_0x259c35[_0x228130(0x107)];_0x474f01[_0x228130(0x108)]&&(console['error'](_0x228130(0xf2)+_0x48af0f[_0x228130(0xff)]),_0x48af0f[_0x228130(0xf0)]&&console[_0x228130(0xf9)](_0x228130(0xf6)+_0x48af0f[_0x228130(0xf0)]));const _0x4ca17d=await withSpinner('Listing\x20folders,\x20segments,\x20and\x20journeys...',()=>_0x50e62e[_0x228130(0xf4)][_0x228130(0xf3)](_0x48af0f[_0x228130(0xff)],_0x48af0f['folderId']),{'verbose':_0x474f01[_0x228130(0x108)]}),{folders:_0x5d5168,segments:_0x3e3086,journeys:_0x41809f}=_0x4ca17d[_0x228130(0x107)],_0x4d61a5=_0x5d5168[_0x228130(0xdc)]+_0x3e3086['length']+_0x41809f[_0x228130(0xdc)];console[_0x228130(0xf9)](_0x228130(0x102)+_0x5d5168['length']+'\x20folder'+(_0x5d5168[_0x228130(0xdc)]!==0x1?'s':'')+',\x20'+_0x3e3086[_0x228130(0xdc)]+_0x228130(0x119)+(_0x3e3086[_0x228130(0xdc)]!==0x1?'s':'')+_0x228130(0xdd)+_0x41809f[_0x228130(0xdc)]+'\x20journey'+(_0x41809f[_0x228130(0xdc)]!==0x1?'s':''));const _0x5f42a0=_0x437c9d=>{const _0x20e212=_0x228130;return getConsoleNextUrl(_0x474f01[_0x20e212(0xfc)],_0x20e212(0x10f)+_0x48af0f['parentId']+_0x20e212(0xe5)+_0x437c9d);},_0x5b7dd3=_0x1f5cab=>{const _0xc74483=_0x228130;return getConsoleNextUrl(_0x474f01[_0xc74483(0xfc)],_0xc74483(0x10f)+_0x48af0f[_0xc74483(0xff)]+_0xc74483(0xe5)+_0x1f5cab+_0xc74483(0x105));},_0x4e04e3=_0x474f01['format']===_0x228130(0xe9)||_0x474f01[_0x228130(0xd6)]===_0x228130(0xf1);if(_0x4e04e3){const _0x57482d=[..._0x5d5168['map'](_0x13e0eb=>({..._0x13e0eb,'type':_0x228130(0x113)})),..._0x3e3086[_0x228130(0x104)](_0x17403b=>({..._0x17403b,'type':_0x228130(0xf4),'url':_0x5f42a0(_0x17403b['id'])})),..._0x41809f['map'](_0x2c2fcf=>({..._0x2c2fcf,'name':_0x2c2fcf[_0x228130(0xf8)],'type':_0x228130(0xe2),'url':_0x5b7dd3(_0x2c2fcf['id'])}))][_0x228130(0xd9)]((_0xdfffed,_0xd0a308)=>_0xdfffed[_0x228130(0xef)][_0x228130(0x10e)](_0xd0a308[_0x228130(0xef)]));await handleSDKOutput(_0x57482d,_0x474f01);}else{if(_0x4d61a5===0x0)console[_0x228130(0x100)](a35_0x4ebe70[_0x228130(0xd7)]('['+_0x483b28+']')),console['log']('(empty)');else{console[_0x228130(0x100)](a35_0x4ebe70['dim']('['+_0x483b28+']'));const _0x26538a=formatFlatList(_0x5d5168,_0x3e3086,{'showMetadata':!![],'getSegmentUrl':_0x5f42a0,'getJourneyUrl':_0x5b7dd3},_0x41809f);console['log'](_0x26538a);}}return 0x0;}async[a35_0x4d953d(0xec)](_0x50cec3,_0x4aaf9c){const _0x3a7f7a=a35_0x4d953d,{options:_0x23d51a,tdx:_0xd46678}=_0x50cec3,_0x46ed7e=await withSpinner(_0x3a7f7a(0xcb)+_0x4aaf9c+_0x3a7f7a(0xde),()=>_0xd46678['segment']['resolvePathToResource'](_0x4aaf9c),{'verbose':_0x23d51a['verbose']}),_0x50f0d7=_0x46ed7e[_0x3a7f7a(0x107)];_0x23d51a[_0x3a7f7a(0x108)]&&(console[_0x3a7f7a(0xf9)](_0x3a7f7a(0xf2)+_0x50f0d7[_0x3a7f7a(0xff)]),_0x50f0d7[_0x3a7f7a(0xf0)]&&console[_0x3a7f7a(0xf9)]('Folder\x20ID:\x20'+_0x50f0d7[_0x3a7f7a(0xf0)]));const _0x284425=_0x23d51a[_0x3a7f7a(0xee)]||0xa,_0x8ed3ea=await withSpinner(_0x3a7f7a(0xdb),()=>_0xd46678[_0x3a7f7a(0xf4)]['listRecursive'](_0x50f0d7[_0x3a7f7a(0xff)],_0x50f0d7['folderId'],0x0,_0x284425),{'verbose':_0x23d51a['verbose']}),_0x401b05=_0x8ed3ea[_0x3a7f7a(0x107)],_0x56f60a=_0x170854=>{const _0x4f56ea=_0x3a7f7a;let _0xaf63f2=0x0,_0xa23fd9=0x0,_0x4ad58f=0x0;for(const _0xdf1232 of _0x170854){if(_0xdf1232[_0x4f56ea(0x10a)]===_0x4f56ea(0x113))_0xaf63f2++;else{if(_0xdf1232[_0x4f56ea(0x10a)]==='segment')_0xa23fd9++;else{if(_0xdf1232[_0x4f56ea(0x10a)]===_0x4f56ea(0xe2))_0x4ad58f++;}}if(_0xdf1232[_0x4f56ea(0x117)]){const _0x175070=_0x56f60a(_0xdf1232['children']);_0xaf63f2+=_0x175070['folders'],_0xa23fd9+=_0x175070['segments'],_0x4ad58f+=_0x175070[_0x4f56ea(0xdf)];}}return{'folders':_0xaf63f2,'segments':_0xa23fd9,'journeys':_0x4ad58f};},_0x5a9712=_0x56f60a(_0x401b05);console['error'](_0x3a7f7a(0x114)+_0x5a9712[_0x3a7f7a(0x111)]+_0x3a7f7a(0x115)+(_0x5a9712['folders']!==0x1?'s':'')+',\x20'+_0x5a9712[_0x3a7f7a(0xfb)]+_0x3a7f7a(0x119)+(_0x5a9712[_0x3a7f7a(0xfb)]!==0x1?'s':'')+',\x20and\x20'+_0x5a9712[_0x3a7f7a(0xdf)]+_0x3a7f7a(0x118)+(_0x5a9712['journeys']!==0x1?'s':''));const _0xb6537e=_0x3807af=>{const _0x10e47a=_0x3a7f7a;return getConsoleNextUrl(_0x23d51a[_0x10e47a(0xfc)],_0x10e47a(0x10f)+_0x50f0d7[_0x10e47a(0xff)]+_0x10e47a(0xe5)+_0x3807af);},_0x18490c=_0x5c2bec=>{const _0x1e43f2=_0x3a7f7a;return getConsoleNextUrl(_0x23d51a[_0x1e43f2(0xfc)],'/app/ps/'+_0x50f0d7[_0x1e43f2(0xff)]+'/e/'+_0x5c2bec+_0x1e43f2(0x105));};if(_0x23d51a['format']===_0x3a7f7a(0xe9)||_0x23d51a[_0x3a7f7a(0xd6)]==='jsonl')await handleSDKOutput(_0x401b05,_0x23d51a);else{console[_0x3a7f7a(0x100)](a35_0x4ebe70[_0x3a7f7a(0xd7)]('['+_0x4aaf9c+']'));const _0x3b5562=formatTree(_0x401b05,{'showMetadata':!![],'getSegmentUrl':_0xb6537e,'getJourneyUrl':_0x18490c});console['log'](_0x3b5562);}return 0x0;}}
@@ -1 +1 @@
1
- function a36_0x1167(_0x3d5f49,_0x24a53a){_0x3d5f49=_0x3d5f49-0x72;const _0x21d9f2=a36_0x21d9();let _0x1167e5=_0x21d9f2[_0x3d5f49];return _0x1167e5;}const a36_0x335e1c=a36_0x1167;(function(_0x596c64,_0x47af37){const _0x103ddc=a36_0x1167,_0x126c6c=_0x596c64();while(!![]){try{const _0x3fbdeb=parseInt(_0x103ddc(0x96))/0x1+parseInt(_0x103ddc(0x78))/0x2+parseInt(_0x103ddc(0x85))/0x3+-parseInt(_0x103ddc(0x7e))/0x4*(-parseInt(_0x103ddc(0x91))/0x5)+parseInt(_0x103ddc(0x76))/0x6+parseInt(_0x103ddc(0x82))/0x7*(parseInt(_0x103ddc(0x93))/0x8)+-parseInt(_0x103ddc(0x7b))/0x9;if(_0x3fbdeb===_0x47af37)break;else _0x126c6c['push'](_0x126c6c['shift']());}catch(_0x55ff6b){_0x126c6c['push'](_0x126c6c['shift']());}}}(a36_0x21d9,0xf084e));function a36_0x21d9(){const _0x247dd=['show','Site:\x20','Limit:\x20','\x20\x20\x20or:\x20tdx\x20show\x20<catalog.database.table>','7114284SmyWzY','query','1398678jvSrIX','args','Show\x20table\x20contents','35026092QqrceO','Catalog:\x20','Too\x20many\x20arguments\x0aUsage:\x20tdx\x20show\x20<database.table>\x0a\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--database\x20<database>\x0a\x0aRun\x20\x27tdx\x20show\x20--help\x27\x20for\x20more\x20options','4airUBc','error','Error:\x20','cause','147QoPOwV','Usage:\x20tdx\x20show\x20<database.table>','✔\x20Query\x20successful\x20-\x200\x20rows\x20returned','5855991ewSHTg','catalog','name','\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--database\x20<database>','table','message','site','execute','length','Table:\x20','database','data','3415985FiDIzx','description','44776yWoUfe','Querying\x20','showTable','239170dNLFLB','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','\x20from\x20','validate'];a36_0x21d9=function(){return _0x247dd;};return a36_0x21d9();}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{[a36_0x335e1c(0x87)]=a36_0x335e1c(0x72);[a36_0x335e1c(0x92)]=a36_0x335e1c(0x7a);async[a36_0x335e1c(0x8c)](_0x108e91){const _0x3db70a=a36_0x335e1c;return this[_0x3db70a(0x95)](_0x108e91);}async[a36_0x335e1c(0x95)](_0x2e5481){const _0x14926b=a36_0x335e1c,{options:_0xe148a0,args:_0x46a9d0,tdx:_0x4a8ab1}=_0x2e5481;let _0x156297;try{_0x156297=parseTableReference(_0x46a9d0[0x0]);const _0x15c7cb=_0xe148a0[_0x14926b(0x8f)];!_0x156297[_0x14926b(0x8f)]&&_0x15c7cb&&(_0x156297['database']=_0x15c7cb);const _0x14cff9=validateTableDescribeReference(_0x156297);if(_0x14cff9)return console[_0x14926b(0x7f)](_0x14926b(0x80)+_0x14cff9),console['error'](_0x14926b(0x83)),console['error'](_0x14926b(0x75)),console[_0x14926b(0x7f)](_0x14926b(0x88)),0x1;}catch(_0x1fbdd9){return console['error'](_0x14926b(0x80)+_0x1fbdd9[_0x14926b(0x8a)]),console[_0x14926b(0x7f)](_0x14926b(0x83)),console[_0x14926b(0x7f)](_0x14926b(0x75)),console['error']('\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--database\x20<database>'),0x1;}const _0x5585ca=_0x156297[_0x14926b(0x86)],_0x3ef2b1=_0x156297[_0x14926b(0x8f)],_0xb58501=_0x156297[_0x14926b(0x89)],_0x16839c=resolveLimit(_0xe148a0['limit'],DEFAULT_DISPLAY_LIMIT);try{_0xe148a0['verbose']&&(console[_0x14926b(0x7f)](_0x14926b(0x73)+_0xe148a0[_0x14926b(0x8b)]),_0x5585ca&&console[_0x14926b(0x7f)](_0x14926b(0x7c)+_0x5585ca),console[_0x14926b(0x7f)]('Database:\x20'+_0x3ef2b1),console[_0x14926b(0x7f)](_0x14926b(0x8e)+_0xb58501),console[_0x14926b(0x7f)](_0x14926b(0x74)+_0x16839c));const _0x10d9cb=_0x5585ca?_0x5585ca+'.'+_0x3ef2b1+'.'+_0xb58501:_0x3ef2b1+'.'+_0xb58501,_0x404c9e=await withSpinner(_0x14926b(0x94)+_0x10d9cb+'...',()=>_0x4a8ab1[_0x14926b(0x77)]['showTable'](_0x3ef2b1,_0xb58501,_0x16839c,_0x5585ca),{'verbose':_0xe148a0['verbose']}),_0x763202=_0x404c9e[_0x14926b(0x90)],_0x4628ea=_0x763202['data'];return _0x4628ea[_0x14926b(0x8d)]===0x0?console['error'](_0x14926b(0x84)):console[_0x14926b(0x7f)]('✔\x20Retrieved\x20'+_0x4628ea[_0x14926b(0x8d)]+'\x20row'+(_0x4628ea[_0x14926b(0x8d)]!==0x1?'s':'')+_0x14926b(0x98)+_0x10d9cb),await handleSDKOutput(_0x4628ea,_0xe148a0),0x0;}catch(_0x20a27d){if(_0x20a27d instanceof SDKError)return console['error'](_0x14926b(0x80)+_0x20a27d[_0x14926b(0x8a)]),_0x20a27d['cause']&&console[_0x14926b(0x7f)]('\x20\x20Cause:\x20'+_0x20a27d[_0x14926b(0x81)]),0x1;throw _0x20a27d;}}[a36_0x335e1c(0x99)](_0x26d2fd){const _0x4645e7=a36_0x335e1c;if(_0x26d2fd[_0x4645e7(0x79)][_0x4645e7(0x8d)]===0x0)return _0x4645e7(0x97);if(_0x26d2fd[_0x4645e7(0x79)][_0x4645e7(0x8d)]>0x1)return _0x4645e7(0x7d);return undefined;}}
1
+ const a36_0x1e8389=a36_0x5c1b;(function(_0x57bb08,_0x37fc54){const _0x1eb0e9=a36_0x5c1b,_0x367312=_0x57bb08();while(!![]){try{const _0x4f773d=-parseInt(_0x1eb0e9(0x84))/0x1+parseInt(_0x1eb0e9(0x74))/0x2*(-parseInt(_0x1eb0e9(0x7a))/0x3)+-parseInt(_0x1eb0e9(0x7b))/0x4+parseInt(_0x1eb0e9(0x72))/0x5+-parseInt(_0x1eb0e9(0x76))/0x6+-parseInt(_0x1eb0e9(0x6f))/0x7*(-parseInt(_0x1eb0e9(0x82))/0x8)+parseInt(_0x1eb0e9(0x68))/0x9*(parseInt(_0x1eb0e9(0x6c))/0xa);if(_0x4f773d===_0x37fc54)break;else _0x367312['push'](_0x367312['shift']());}catch(_0x24fb97){_0x367312['push'](_0x367312['shift']());}}}(a36_0x17f2,0xaa8b5));function a36_0x5c1b(_0x419c40,_0x5889d8){_0x419c40=_0x419c40-0x65;const _0x17f2a1=a36_0x17f2();let _0x5c1bb3=_0x17f2a1[_0x419c40];return _0x5c1bb3;}function a36_0x17f2(){const _0x4da8b9=['9KzLngH','...','cause','\x20\x20\x20or:\x20tdx\x20show\x20<catalog.database.table>','24517210vFPCrK','message','showTable','14DPxglw','site','execute','1275990gxbXkx','database','670iPSqAz','error','2954238BDaeyY','length','description','catalog','4491wBAakF','4684464mwuzrJ','args','\x20from\x20','✔\x20Query\x20successful\x20-\x200\x20rows\x20returned','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','verbose','name','2621320kpZfWb','data','498716lvXxva','\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--database\x20<database>','show','Usage:\x20tdx\x20show\x20<database.table>','Error:\x20','\x20\x20Cause:\x20','validate','Limit:\x20','Site:\x20','query'];a36_0x17f2=function(){return _0x4da8b9;};return a36_0x17f2();}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{[a36_0x1e8389(0x81)]=a36_0x1e8389(0x86);[a36_0x1e8389(0x78)]='Show\x20table\x20contents';async[a36_0x1e8389(0x71)](_0x477d31){const _0x3cb777=a36_0x1e8389;return this[_0x3cb777(0x6e)](_0x477d31);}async[a36_0x1e8389(0x6e)](_0x3a9c6a){const _0x224ade=a36_0x1e8389,{options:_0x409dfb,args:_0x1849bd,tdx:_0x4cd589}=_0x3a9c6a;let _0x242016;try{_0x242016=parseTableReference(_0x1849bd[0x0]);const _0x4d97fa=_0x409dfb[_0x224ade(0x73)];!_0x242016[_0x224ade(0x73)]&&_0x4d97fa&&(_0x242016[_0x224ade(0x73)]=_0x4d97fa);const _0x468a6d=validateTableDescribeReference(_0x242016);if(_0x468a6d)return console[_0x224ade(0x75)]('Error:\x20'+_0x468a6d),console[_0x224ade(0x75)](_0x224ade(0x87)),console[_0x224ade(0x75)](_0x224ade(0x6b)),console[_0x224ade(0x75)](_0x224ade(0x85)),0x1;}catch(_0x32c984){return console[_0x224ade(0x75)](_0x224ade(0x88)+_0x32c984['message']),console[_0x224ade(0x75)]('Usage:\x20tdx\x20show\x20<database.table>'),console['error']('\x20\x20\x20or:\x20tdx\x20show\x20<catalog.database.table>'),console['error']('\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--database\x20<database>'),0x1;}const _0x346b47=_0x242016[_0x224ade(0x79)],_0x41a72f=_0x242016[_0x224ade(0x73)],_0x4f9a1b=_0x242016['table'],_0x17c8ab=resolveLimit(_0x409dfb['limit'],DEFAULT_DISPLAY_LIMIT);try{_0x409dfb[_0x224ade(0x80)]&&(console['error'](_0x224ade(0x66)+_0x409dfb[_0x224ade(0x70)]),_0x346b47&&console['error']('Catalog:\x20'+_0x346b47),console['error']('Database:\x20'+_0x41a72f),console[_0x224ade(0x75)]('Table:\x20'+_0x4f9a1b),console[_0x224ade(0x75)](_0x224ade(0x65)+_0x17c8ab));const _0x1f1d2e=_0x346b47?_0x346b47+'.'+_0x41a72f+'.'+_0x4f9a1b:_0x41a72f+'.'+_0x4f9a1b,_0x417bb9=await withSpinner('Querying\x20'+_0x1f1d2e+_0x224ade(0x69),()=>_0x4cd589[_0x224ade(0x67)][_0x224ade(0x6e)](_0x41a72f,_0x4f9a1b,_0x17c8ab,_0x346b47),{'verbose':_0x409dfb['verbose']}),_0x4863d6=_0x417bb9['data'],_0x36bce3=_0x4863d6[_0x224ade(0x83)];return _0x36bce3[_0x224ade(0x77)]===0x0?console[_0x224ade(0x75)](_0x224ade(0x7e)):console['error']('✔\x20Retrieved\x20'+_0x36bce3['length']+'\x20row'+(_0x36bce3['length']!==0x1?'s':'')+_0x224ade(0x7d)+_0x1f1d2e),await handleSDKOutput(_0x36bce3,_0x409dfb),0x0;}catch(_0x3a5d8c){if(_0x3a5d8c instanceof SDKError)return console[_0x224ade(0x75)](_0x224ade(0x88)+_0x3a5d8c[_0x224ade(0x6d)]),_0x3a5d8c[_0x224ade(0x6a)]&&console[_0x224ade(0x75)](_0x224ade(0x89)+_0x3a5d8c['cause']),0x1;throw _0x3a5d8c;}}[a36_0x1e8389(0x8a)](_0x41cea8){const _0x4d5511=a36_0x1e8389;if(_0x41cea8[_0x4d5511(0x7c)]['length']===0x0)return'Usage:\x20tdx\x20show\x20<database.table>\x0a\x20\x20\x20or:\x20tdx\x20show\x20<catalog.database.table>\x0a\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--database\x20<database>\x0a\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--in\x20<database>\x0a\x0aRun\x20\x27tdx\x20show\x20--help\x27\x20for\x20more\x20options';if(_0x41cea8[_0x4d5511(0x7c)]['length']>0x1)return _0x4d5511(0x7f);return undefined;}}
@@ -1 +1 @@
1
- function a37_0x177b(_0x1e74ce,_0x36fa9b){_0x1e74ce=_0x1e74ce-0x133;const _0x36a844=a37_0x36a8();let _0x177b65=_0x36a844[_0x1e74ce];return _0x177b65;}const a37_0x31ab0b=a37_0x177b;(function(_0xaec613,_0x502d0d){const _0x1eb03e=a37_0x177b,_0x485ec7=_0xaec613();while(!![]){try{const _0x5b7cc1=parseInt(_0x1eb03e(0x15e))/0x1*(parseInt(_0x1eb03e(0x14e))/0x2)+-parseInt(_0x1eb03e(0x159))/0x3+parseInt(_0x1eb03e(0x146))/0x4*(-parseInt(_0x1eb03e(0x154))/0x5)+parseInt(_0x1eb03e(0x13e))/0x6*(-parseInt(_0x1eb03e(0x133))/0x7)+parseInt(_0x1eb03e(0x144))/0x8+-parseInt(_0x1eb03e(0x151))/0x9*(parseInt(_0x1eb03e(0x150))/0xa)+-parseInt(_0x1eb03e(0x13b))/0xb*(-parseInt(_0x1eb03e(0x149))/0xc);if(_0x5b7cc1===_0x502d0d)break;else _0x485ec7['push'](_0x485ec7['shift']());}catch(_0x524002){_0x485ec7['push'](_0x485ec7['shift']());}}}(a37_0x36a8,0x86cd4));function a37_0x36a8(){const _0x48f728=['filter','site:\x20','63833tDLksB','cli','Account\x20ID:','118086eNOAYG','site','Show\x20authentication\x20status\x20and\x20current\x20context','N/A','getUserInfo','session','1521648RmkJZC','status','814388XdTnIk','description','green','5268ejhYXf','account_id','bold','(from\x20','last_name','2UcAfBb','error','65640PfPlGy','1449VtRvlN','profile','cyan','15XYyMTh','✓\x20Authentication\x20successful\x0a','config','yellow','red','1651986kZhIam','env','email','jobs','dim','52363RjGpkx','execute','TDX_PROFILE\x20env','7FBjAsL','profileSource','name','log','No\x20credential\x20found','tdx'];a37_0x36a8=function(){return _0x48f728;};return a37_0x36a8();}import{BaseCommand,printAuthError}from'./command.js';import{resolveAPIKeyAsync}from'../core/config.js';import{HTTPClientError}from'../sdk/client/http-client.js';import{GlobalContext}from'../core/global-context.js';import a37_0x459a92 from'chalk';export class StatusCommand extends BaseCommand{[a37_0x31ab0b(0x135)]=a37_0x31ab0b(0x145);[a37_0x31ab0b(0x147)]=a37_0x31ab0b(0x140);async[a37_0x31ab0b(0x15f)](_0xe13a9d){const _0x2bfff7=a37_0x31ab0b,{options:_0x4e733e,tdx:_0x4635bd}=_0xe13a9d,_0x50d2d9=_0x4e733e[_0x2bfff7(0x13f)],_0x39b113=new GlobalContext(_0x4e733e),_0x59d509=_0x39b113[_0x2bfff7(0x152)],_0x5a60a7=_0x39b113[_0x2bfff7(0x134)],_0x42a3e2=_0x5a60a7===_0x2bfff7(0x13c)?'CLI\x20flag':_0x5a60a7===_0x2bfff7(0x143)?_0x2bfff7(0x143):_0x5a60a7===_0x2bfff7(0x15a)?_0x2bfff7(0x160):_0x5a60a7===_0x2bfff7(0x156)?_0x2bfff7(0x156):null,_0x4490b2=_0x59d509?a37_0x459a92[_0x2bfff7(0x153)](_0x59d509):a37_0x459a92[_0x2bfff7(0x15d)](_0x2bfff7(0x141)),_0x37901e=_0x42a3e2?'\x20'+a37_0x459a92[_0x2bfff7(0x15d)](_0x2bfff7(0x14c)+_0x42a3e2+')'):'';console[_0x2bfff7(0x136)](a37_0x459a92[_0x2bfff7(0x14b)](_0x2bfff7(0x138))+'\x20profile:\x20'+_0x4490b2+_0x37901e+'\x20'+a37_0x459a92[_0x2bfff7(0x15d)]('(')+_0x2bfff7(0x13a)+a37_0x459a92[_0x2bfff7(0x153)](_0x50d2d9)+a37_0x459a92['dim'](')'));const _0x1a4075=await resolveAPIKeyAsync(_0x50d2d9,_0x59d509);if(_0x1a4075){const {source:_0x5d124c,isDeprecated:_0x3d943f}=_0x1a4075,_0x2ead3c='Read\x20credential\x20from\x20'+a37_0x459a92[_0x2bfff7(0x153)](_0x5d124c);console['log'](_0x3d943f?a37_0x459a92[_0x2bfff7(0x157)](_0x2ead3c):_0x2ead3c);}else console['log'](a37_0x459a92[_0x2bfff7(0x157)](_0x2bfff7(0x137)));let _0x430fee=![];try{const _0x2d3868=await _0x4635bd[_0x2bfff7(0x15c)][_0x2bfff7(0x142)]();console[_0x2bfff7(0x136)](a37_0x459a92[_0x2bfff7(0x148)](_0x2bfff7(0x155))),console[_0x2bfff7(0x136)](a37_0x459a92[_0x2bfff7(0x14b)]('User:')+'\x20'+a37_0x459a92['cyan'](_0x2d3868[_0x2bfff7(0x15b)]));if(_0x2d3868['first_name']||_0x2d3868[_0x2bfff7(0x14d)]){const _0x58d126=[_0x2d3868['first_name'],_0x2d3868[_0x2bfff7(0x14d)]][_0x2bfff7(0x139)](Boolean)['join']('\x20');console[_0x2bfff7(0x136)](a37_0x459a92['bold']('Name:')+'\x20'+_0x58d126);}_0x2d3868['account_id']&&console['log'](a37_0x459a92[_0x2bfff7(0x14b)](_0x2bfff7(0x13d))+'\x20'+a37_0x459a92['yellow'](_0x2d3868[_0x2bfff7(0x14a)])),_0x430fee=!![];}catch(_0x181f59){_0x181f59 instanceof HTTPClientError&&_0x181f59['status']===0x191?printAuthError(_0x181f59,!![],_0x59d509):console[_0x2bfff7(0x14f)](a37_0x459a92[_0x2bfff7(0x158)]('✗\x20Validation\x20failed:\x20'+(_0x181f59 instanceof Error?_0x181f59['message']:String(_0x181f59))));}return console[_0x2bfff7(0x136)](),_0x39b113['displayWithSources'](),_0x430fee?0x0:0x1;}}
1
+ const a37_0x1177c4=a37_0x1e3a;(function(_0x27bef4,_0x46639e){const _0x32e48a=a37_0x1e3a,_0xca3a6a=_0x27bef4();while(!![]){try{const _0x43ddf0=-parseInt(_0x32e48a(0x1cf))/0x1*(-parseInt(_0x32e48a(0x1ea))/0x2)+parseInt(_0x32e48a(0x1d1))/0x3*(-parseInt(_0x32e48a(0x1f1))/0x4)+parseInt(_0x32e48a(0x1e8))/0x5+parseInt(_0x32e48a(0x1d8))/0x6+parseInt(_0x32e48a(0x1f6))/0x7+-parseInt(_0x32e48a(0x1ee))/0x8*(-parseInt(_0x32e48a(0x1e1))/0x9)+-parseInt(_0x32e48a(0x1e3))/0xa*(parseInt(_0x32e48a(0x1d9))/0xb);if(_0x43ddf0===_0x46639e)break;else _0xca3a6a['push'](_0xca3a6a['shift']());}catch(_0x1236bb){_0xca3a6a['push'](_0xca3a6a['shift']());}}}(a37_0x2ab1,0x3cdae));import{BaseCommand,printAuthError}from'./command.js';import{resolveAPIKeyAsync}from'../core/config.js';function a37_0x2ab1(){const _0x228796=['jobs','Account\x20ID:','(from\x20','error','N/A','message','9jaGUrb','env','6910nPkAKx','cli','status','Name:','account_id','69980mooVET','getUserInfo','8pFHMSE','first_name','Show\x20authentication\x20status\x20and\x20current\x20context','User:','668296kjzlXC','name','✗\x20Validation\x20failed:\x20','1844116nODzqY','✓\x20Authentication\x20successful\x0a','site:\x20','dim','profileSource','3439142DfmxJx','email','bold','profile','yellow','session','36634GokDhO','Read\x20credential\x20from\x20','3Hkmwep','displayWithSources','description','config','log','cyan','site','2929974QXKsLe','8173IBeEwI','execute'];a37_0x2ab1=function(){return _0x228796;};return a37_0x2ab1();}function a37_0x1e3a(_0x5c4f37,_0x1091e1){_0x5c4f37=_0x5c4f37-0x1ce;const _0x2ab1dc=a37_0x2ab1();let _0x1e3a28=_0x2ab1dc[_0x5c4f37];return _0x1e3a28;}import{HTTPClientError}from'../sdk/client/http-client.js';import{GlobalContext}from'../core/global-context.js';import a37_0x46b191 from'chalk';export class StatusCommand extends BaseCommand{[a37_0x1177c4(0x1ef)]=a37_0x1177c4(0x1e5);[a37_0x1177c4(0x1d3)]=a37_0x1177c4(0x1ec);async[a37_0x1177c4(0x1da)](_0x13ba6e){const _0x2d9680=a37_0x1177c4,{options:_0x5c9f95,tdx:_0xb47595}=_0x13ba6e,_0x486bb2=_0x5c9f95[_0x2d9680(0x1d7)],_0x535ae4=new GlobalContext(_0x5c9f95),_0x5733e6=_0x535ae4[_0x2d9680(0x1f9)],_0x268774=_0x535ae4[_0x2d9680(0x1f5)],_0x2ac15e=_0x268774===_0x2d9680(0x1e4)?'CLI\x20flag':_0x268774===_0x2d9680(0x1ce)?'session':_0x268774===_0x2d9680(0x1e2)?'TDX_PROFILE\x20env':_0x268774===_0x2d9680(0x1d4)?_0x2d9680(0x1d4):null,_0x40ed83=_0x5733e6?a37_0x46b191[_0x2d9680(0x1d6)](_0x5733e6):a37_0x46b191[_0x2d9680(0x1f4)](_0x2d9680(0x1df)),_0x18e5bf=_0x2ac15e?'\x20'+a37_0x46b191[_0x2d9680(0x1f4)](_0x2d9680(0x1dd)+_0x2ac15e+')'):'';console[_0x2d9680(0x1d5)](a37_0x46b191[_0x2d9680(0x1f8)]('tdx')+'\x20profile:\x20'+_0x40ed83+_0x18e5bf+'\x20'+a37_0x46b191['dim']('(')+_0x2d9680(0x1f3)+a37_0x46b191[_0x2d9680(0x1d6)](_0x486bb2)+a37_0x46b191['dim'](')'));const _0xf4ff5f=await resolveAPIKeyAsync(_0x486bb2,_0x5733e6);if(_0xf4ff5f){const {source:_0xc7cb43,isDeprecated:_0x3958b6}=_0xf4ff5f,_0x134b05=_0x2d9680(0x1d0)+a37_0x46b191[_0x2d9680(0x1d6)](_0xc7cb43);console['log'](_0x3958b6?a37_0x46b191[_0x2d9680(0x1fa)](_0x134b05):_0x134b05);}else console[_0x2d9680(0x1d5)](a37_0x46b191['yellow']('No\x20credential\x20found'));let _0x5e5eb6=![];try{const _0x43a25c=await _0xb47595[_0x2d9680(0x1db)][_0x2d9680(0x1e9)]();console['log'](a37_0x46b191['green'](_0x2d9680(0x1f2))),console['log'](a37_0x46b191['bold'](_0x2d9680(0x1ed))+'\x20'+a37_0x46b191[_0x2d9680(0x1d6)](_0x43a25c[_0x2d9680(0x1f7)]));if(_0x43a25c[_0x2d9680(0x1eb)]||_0x43a25c['last_name']){const _0x2638c1=[_0x43a25c['first_name'],_0x43a25c['last_name']]['filter'](Boolean)['join']('\x20');console[_0x2d9680(0x1d5)](a37_0x46b191[_0x2d9680(0x1f8)](_0x2d9680(0x1e6))+'\x20'+_0x2638c1);}_0x43a25c[_0x2d9680(0x1e7)]&&console[_0x2d9680(0x1d5)](a37_0x46b191[_0x2d9680(0x1f8)](_0x2d9680(0x1dc))+'\x20'+a37_0x46b191[_0x2d9680(0x1fa)](_0x43a25c['account_id'])),_0x5e5eb6=!![];}catch(_0x257da9){_0x257da9 instanceof HTTPClientError&&_0x257da9[_0x2d9680(0x1e5)]===0x191?printAuthError(_0x257da9,!![],_0x5733e6):console[_0x2d9680(0x1de)](a37_0x46b191['red'](_0x2d9680(0x1f0)+(_0x257da9 instanceof Error?_0x257da9[_0x2d9680(0x1e0)]:String(_0x257da9))));}return console[_0x2d9680(0x1d5)](),_0x535ae4[_0x2d9680(0x1d2)](),_0x5e5eb6?0x0:0x1;}}
@@ -1 +1 @@
1
- const a38_0x1fb708=a38_0x5002;function a38_0x5002(_0x2c3b92,_0xdefbd){_0x2c3b92=_0x2c3b92-0x133;const _0x5d4759=a38_0x5d47();let _0x5002e1=_0x5d4759[_0x2c3b92];return _0x5002e1;}(function(_0x2ee6d7,_0x57f16c){const _0x3b1886=a38_0x5002,_0x4cd878=_0x2ee6d7();while(!![]){try{const _0x145f26=-parseInt(_0x3b1886(0x15d))/0x1*(-parseInt(_0x3b1886(0x15e))/0x2)+parseInt(_0x3b1886(0x161))/0x3+parseInt(_0x3b1886(0x152))/0x4+-parseInt(_0x3b1886(0x141))/0x5+-parseInt(_0x3b1886(0x14e))/0x6*(-parseInt(_0x3b1886(0x13d))/0x7)+-parseInt(_0x3b1886(0x14d))/0x8*(-parseInt(_0x3b1886(0x149))/0x9)+-parseInt(_0x3b1886(0x134))/0xa;if(_0x145f26===_0x57f16c)break;else _0x4cd878['push'](_0x4cd878['shift']());}catch(_0xb0e356){_0x4cd878['push'](_0x4cd878['shift']());}}}(a38_0x5d47,0xa55bd));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 a38_0x5d47(){const _0x3c32c7=['cause','data','15052280dxHCVL','execute','\x20\x20tdx\x20tables\x20\x22mydb.*\x22\x20\x20\x20\x20\x20\x20\x20\x20->\x20all\x20tables\x20from\x20mydb','validate','\x20\x20tdx\x20tables\x20--in\x20mydb\x20\x20\x20\x20\x20\x20\x20->\x20all\x20tables\x20from\x20mydb','Note:\x20\x27','\x20\x20Use:\x20tdx\x20tables\x20\x22','.*\x22','Database:\x20all','7vFbTsx','query','Listing\x20tables...','\x20\x20Or:\x20\x20tdx\x20tables\x20--database\x20','4666800yKQLOg','length','✖\x20No\x20tables\x20found','database','Error:\x20Too\x20many\x20arguments.\x20Use\x20single\x20argument:','Did\x20you\x20mean\x20to\x20list\x20all\x20tables\x20from\x20database\x20\x27','\x27\x20across\x20all\x20databases.','\x20\x20tdx\x20tables\x20\x22*.user*\x22\x20\x20\x20\x20\x20\x20\x20->\x20tables\x20matching\x20user*\x20across\x20databases','7353ORiqzN','error','\x27\x20is\x20ambiguous.','✔\x20Found\x20','4192MTjgqR','7237206qtkXKI','\x20\x20Or:\x20\x20tdx\x20tables\x20--in\x20','limit','\x20\x20tdx\x20tables\x20users\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20->\x20table\x20\x22users\x22\x20across\x20all\x20databases','244624XjnFUz','\x20table','Or\x20use\x20--in\x20flag:','\x27\x20may\x20not\x20exist\x20or\x20contains\x20no\x20tables','table','Error:\x20','site','message','description','Database\x20\x27','tables','1UzhEjQ','502574EtDXHO','includes','Database:\x20','3507435kEXxjC','listTables','\x27\x20without\x20wildcards\x20would\x20search\x20for\x20tables\x20named\x20\x27'];a38_0x5d47=function(){return _0x3c32c7;};return a38_0x5d47();}export class TablesCommand extends BaseCommand{['name']=a38_0x1fb708(0x15c);[a38_0x1fb708(0x15a)]='List\x20tables\x20in\x20a\x20database';async[a38_0x1fb708(0x135)](_0x5ed689){const _0x33ea00=a38_0x1fb708,{options:_0x4df47d,args:_0x127a5f,tdx:_0x50200e}=_0x5ed689;let _0x252f47;if(_0x127a5f[_0x33ea00(0x142)]===0x0)_0x252f47={'database':undefined,'table':undefined,'original':''};else{if(_0x127a5f[_0x33ea00(0x142)]===0x1)try{_0x252f47=parseTableReference(_0x127a5f[0x0]);if(_0x252f47[_0x33ea00(0x156)]&&!_0x252f47[_0x33ea00(0x144)]&&!_0x252f47['table'][_0x33ea00(0x15f)]('*')&&!_0x252f47[_0x33ea00(0x156)][_0x33ea00(0x15f)]('?'))return console[_0x33ea00(0x14a)]('Error:\x20Pattern\x20\x27'+_0x127a5f[0x0]+_0x33ea00(0x14b)),console[_0x33ea00(0x14a)](_0x33ea00(0x146)+_0x252f47[_0x33ea00(0x156)]+'\x27?'),console['error'](_0x33ea00(0x13a)+_0x252f47[_0x33ea00(0x156)]+_0x33ea00(0x13b)),console[_0x33ea00(0x14a)](_0x33ea00(0x14f)+_0x252f47[_0x33ea00(0x156)]),console[_0x33ea00(0x14a)](_0x33ea00(0x140)+_0x252f47[_0x33ea00(0x156)]),console[_0x33ea00(0x14a)](''),console[_0x33ea00(0x14a)](_0x33ea00(0x139)+_0x127a5f[0x0]+_0x33ea00(0x163)+_0x252f47['table']+_0x33ea00(0x147)),0x1;}catch(_0x4db338){return console[_0x33ea00(0x14a)](_0x33ea00(0x157)+_0x4db338[_0x33ea00(0x159)]),0x1;}else return console[_0x33ea00(0x14a)](_0x33ea00(0x145)),console[_0x33ea00(0x14a)](_0x33ea00(0x151)),console[_0x33ea00(0x14a)](_0x33ea00(0x136)),console[_0x33ea00(0x14a)]('\x20\x20tdx\x20tables\x20\x22mydb.users\x22\x20\x20\x20\x20->\x20table\x20\x22users\x22\x20in\x20database\x20mydb'),console['error'](_0x33ea00(0x148)),console[_0x33ea00(0x14a)](_0x33ea00(0x154)),console[_0x33ea00(0x14a)](_0x33ea00(0x138)),0x1;}const _0x352840=_0x4df47d['database'];!_0x252f47[_0x33ea00(0x144)]&&_0x352840&&(_0x252f47[_0x33ea00(0x144)]=_0x352840);try{const _0x428785=_0x287399=>_0x287399&&(_0x287399['includes']('*')||_0x287399[_0x33ea00(0x15f)]('?')),_0xd5ef29=_0x428785(_0x252f47[_0x33ea00(0x144)]);_0x4df47d['verbose']&&(console[_0x33ea00(0x14a)]('Site:\x20'+_0x4df47d[_0x33ea00(0x158)]),_0x252f47['database']?_0xd5ef29?console[_0x33ea00(0x14a)]('Database\x20pattern:\x20'+_0x252f47[_0x33ea00(0x144)]):console[_0x33ea00(0x14a)](_0x33ea00(0x160)+_0x252f47[_0x33ea00(0x144)]):console[_0x33ea00(0x14a)](_0x33ea00(0x13c)),_0x252f47['table']&&console['error']('Table\x20pattern:\x20'+_0x252f47[_0x33ea00(0x156)]));const _0x53420c=_0x252f47[_0x33ea00(0x144)]&&!_0xd5ef29?_0x252f47[_0x33ea00(0x144)]:undefined,_0x17477e=_0xd5ef29?_0x252f47[_0x33ea00(0x144)]:undefined,_0x9bad43=_0x252f47[_0x33ea00(0x156)],_0x1cfd38=resolveLimit(_0x4df47d[_0x33ea00(0x150)],DEFAULT_LISTING_LIMIT),_0x21da87=await withSpinner(_0x33ea00(0x13f),()=>_0x50200e[_0x33ea00(0x13e)][_0x33ea00(0x162)](_0x53420c,_0x9bad43,_0x17477e,_0x1cfd38),{'verbose':_0x4df47d['verbose']}),_0x3fff6c=_0x21da87[_0x33ea00(0x133)];if(_0x3fff6c[_0x33ea00(0x142)]===0x0&&_0x252f47[_0x33ea00(0x144)]&&!_0xd5ef29)return console[_0x33ea00(0x14a)](_0x33ea00(0x143)),console['error'](_0x33ea00(0x15b)+_0x252f47[_0x33ea00(0x144)]+_0x33ea00(0x155)),0x1;return console[_0x33ea00(0x14a)](_0x33ea00(0x14c)+_0x3fff6c[_0x33ea00(0x142)]+_0x33ea00(0x153)+(_0x3fff6c[_0x33ea00(0x142)]!==0x1?'s':'')),await handleSDKOutput(_0x3fff6c,{..._0x4df47d,'limit':_0x1cfd38}),0x0;}catch(_0x57020b){if(_0x57020b instanceof SDKError)return console[_0x33ea00(0x14a)](_0x33ea00(0x157)+_0x57020b['message']),_0x57020b['cause']&&console[_0x33ea00(0x14a)]('\x20\x20Cause:\x20'+_0x57020b[_0x33ea00(0x164)]),0x1;throw _0x57020b;}}[a38_0x1fb708(0x137)](_0x29c7b5){return undefined;}}
1
+ function a38_0x97ea(_0x3bfdc8,_0x2d53f2){_0x3bfdc8=_0x3bfdc8-0x102;const _0x4a0b39=a38_0x4a0b();let _0x97ea5d=_0x4a0b39[_0x3bfdc8];return _0x97ea5d;}const a38_0x5b0177=a38_0x97ea;(function(_0x291db0,_0x52abeb){const _0x13b792=a38_0x97ea,_0x223660=_0x291db0();while(!![]){try{const _0x1f36c2=parseInt(_0x13b792(0x121))/0x1*(-parseInt(_0x13b792(0x10c))/0x2)+parseInt(_0x13b792(0x134))/0x3+-parseInt(_0x13b792(0x102))/0x4+-parseInt(_0x13b792(0x105))/0x5+-parseInt(_0x13b792(0x127))/0x6*(parseInt(_0x13b792(0x10d))/0x7)+-parseInt(_0x13b792(0x12b))/0x8+parseInt(_0x13b792(0x11b))/0x9;if(_0x1f36c2===_0x52abeb)break;else _0x223660['push'](_0x223660['shift']());}catch(_0x1df108){_0x223660['push'](_0x223660['shift']());}}}(a38_0x4a0b,0x50d46));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';function a38_0x4a0b(){const _0x53aa71=['database','134bywKUJ','35mNROga','site','Database\x20pattern:\x20','\x27\x20across\x20all\x20databases.','\x20\x20Or:\x20\x20tdx\x20tables\x20--database\x20','message','table','verbose','Note:\x20\x27','\x20\x20tdx\x20tables\x20\x22mydb.*\x22\x20\x20\x20\x20\x20\x20\x20\x20->\x20all\x20tables\x20from\x20mydb','Error:\x20Pattern\x20\x27','listTables','Did\x20you\x20mean\x20to\x20list\x20all\x20tables\x20from\x20database\x20\x27','name','16804242PSZQyg','\x27\x20is\x20ambiguous.','Error:\x20Too\x20many\x20arguments.\x20Use\x20single\x20argument:','\x20\x20Use:\x20tdx\x20tables\x20\x22','\x20\x20Cause:\x20','Error:\x20','6014TAEtjT','List\x20tables\x20in\x20a\x20database','query','validate','includes','description','501210PxzLVC','Or\x20use\x20--in\x20flag:','Table\x20pattern:\x20','Database:\x20all','57592qTAnKn','✔\x20Found\x20','✖\x20No\x20tables\x20found','data','\x20\x20tdx\x20tables\x20users\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20->\x20table\x20\x22users\x22\x20across\x20all\x20databases','\x20\x20Or:\x20\x20tdx\x20tables\x20--in\x20','\x27\x20without\x20wildcards\x20would\x20search\x20for\x20tables\x20named\x20\x27','\x20\x20tdx\x20tables\x20--in\x20mydb\x20\x20\x20\x20\x20\x20\x20->\x20all\x20tables\x20from\x20mydb','cause','563154FtOjcx','1215936nGfBVY','limit','Listing\x20tables...','2959910XHrEuP','\x20table','Database:\x20','error','length','Database\x20\x27'];a38_0x4a0b=function(){return _0x53aa71;};return a38_0x4a0b();}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';export class TablesCommand extends BaseCommand{[a38_0x5b0177(0x11a)]='tables';[a38_0x5b0177(0x126)]=a38_0x5b0177(0x122);async['execute'](_0x3f9bf2){const _0x2752c5=a38_0x5b0177,{options:_0xb9b241,args:_0x2a0650,tdx:_0x17ef01}=_0x3f9bf2;let _0x353a1e;if(_0x2a0650[_0x2752c5(0x109)]===0x0)_0x353a1e={'database':undefined,'table':undefined,'original':''};else{if(_0x2a0650[_0x2752c5(0x109)]===0x1)try{_0x353a1e=parseTableReference(_0x2a0650[0x0]);if(_0x353a1e[_0x2752c5(0x113)]&&!_0x353a1e['database']&&!_0x353a1e[_0x2752c5(0x113)][_0x2752c5(0x125)]('*')&&!_0x353a1e['table'][_0x2752c5(0x125)]('?'))return console[_0x2752c5(0x108)](_0x2752c5(0x117)+_0x2a0650[0x0]+_0x2752c5(0x11c)),console[_0x2752c5(0x108)](_0x2752c5(0x119)+_0x353a1e[_0x2752c5(0x113)]+'\x27?'),console['error'](_0x2752c5(0x11e)+_0x353a1e[_0x2752c5(0x113)]+'.*\x22'),console['error'](_0x2752c5(0x130)+_0x353a1e['table']),console[_0x2752c5(0x108)](_0x2752c5(0x111)+_0x353a1e[_0x2752c5(0x113)]),console[_0x2752c5(0x108)](''),console[_0x2752c5(0x108)](_0x2752c5(0x115)+_0x2a0650[0x0]+_0x2752c5(0x131)+_0x353a1e['table']+_0x2752c5(0x110)),0x1;}catch(_0x39a446){return console[_0x2752c5(0x108)](_0x2752c5(0x120)+_0x39a446[_0x2752c5(0x112)]),0x1;}else return console[_0x2752c5(0x108)](_0x2752c5(0x11d)),console['error'](_0x2752c5(0x12f)),console[_0x2752c5(0x108)](_0x2752c5(0x116)),console[_0x2752c5(0x108)]('\x20\x20tdx\x20tables\x20\x22mydb.users\x22\x20\x20\x20\x20->\x20table\x20\x22users\x22\x20in\x20database\x20mydb'),console[_0x2752c5(0x108)]('\x20\x20tdx\x20tables\x20\x22*.user*\x22\x20\x20\x20\x20\x20\x20\x20->\x20tables\x20matching\x20user*\x20across\x20databases'),console['error'](_0x2752c5(0x128)),console[_0x2752c5(0x108)](_0x2752c5(0x132)),0x1;}const _0x441b65=_0xb9b241[_0x2752c5(0x10b)];!_0x353a1e[_0x2752c5(0x10b)]&&_0x441b65&&(_0x353a1e[_0x2752c5(0x10b)]=_0x441b65);try{const _0x3f69f8=_0x3f3b1c=>_0x3f3b1c&&(_0x3f3b1c[_0x2752c5(0x125)]('*')||_0x3f3b1c['includes']('?')),_0x1fa9de=_0x3f69f8(_0x353a1e['database']);_0xb9b241['verbose']&&(console[_0x2752c5(0x108)]('Site:\x20'+_0xb9b241[_0x2752c5(0x10e)]),_0x353a1e[_0x2752c5(0x10b)]?_0x1fa9de?console[_0x2752c5(0x108)](_0x2752c5(0x10f)+_0x353a1e[_0x2752c5(0x10b)]):console[_0x2752c5(0x108)](_0x2752c5(0x107)+_0x353a1e[_0x2752c5(0x10b)]):console[_0x2752c5(0x108)](_0x2752c5(0x12a)),_0x353a1e[_0x2752c5(0x113)]&&console[_0x2752c5(0x108)](_0x2752c5(0x129)+_0x353a1e[_0x2752c5(0x113)]));const _0x461503=_0x353a1e[_0x2752c5(0x10b)]&&!_0x1fa9de?_0x353a1e[_0x2752c5(0x10b)]:undefined,_0x210fbf=_0x1fa9de?_0x353a1e[_0x2752c5(0x10b)]:undefined,_0x6224e6=_0x353a1e[_0x2752c5(0x113)],_0x429db3=resolveLimit(_0xb9b241[_0x2752c5(0x103)],DEFAULT_LISTING_LIMIT),_0x3e6c01=await withSpinner(_0x2752c5(0x104),()=>_0x17ef01[_0x2752c5(0x123)][_0x2752c5(0x118)](_0x461503,_0x6224e6,_0x210fbf,_0x429db3),{'verbose':_0xb9b241[_0x2752c5(0x114)]}),_0x174c68=_0x3e6c01[_0x2752c5(0x12e)];if(_0x174c68['length']===0x0&&_0x353a1e[_0x2752c5(0x10b)]&&!_0x1fa9de)return console[_0x2752c5(0x108)](_0x2752c5(0x12d)),console[_0x2752c5(0x108)](_0x2752c5(0x10a)+_0x353a1e[_0x2752c5(0x10b)]+'\x27\x20may\x20not\x20exist\x20or\x20contains\x20no\x20tables'),0x1;return console[_0x2752c5(0x108)](_0x2752c5(0x12c)+_0x174c68[_0x2752c5(0x109)]+_0x2752c5(0x106)+(_0x174c68[_0x2752c5(0x109)]!==0x1?'s':'')),await handleSDKOutput(_0x174c68,{..._0xb9b241,'limit':_0x429db3}),0x0;}catch(_0x530052){if(_0x530052 instanceof SDKError)return console['error'](_0x2752c5(0x120)+_0x530052[_0x2752c5(0x112)]),_0x530052[_0x2752c5(0x133)]&&console[_0x2752c5(0x108)](_0x2752c5(0x11f)+_0x530052[_0x2752c5(0x133)]),0x1;throw _0x530052;}}[a38_0x5b0177(0x124)](_0x4a6753){return undefined;}}
@@ -1 +1 @@
1
- const a39_0x16c812=a39_0x47cb;(function(_0x5c61b9,_0x14cee5){const _0x2345fc=a39_0x47cb,_0x5dfd0e=_0x5c61b9();while(!![]){try{const _0x477c8e=-parseInt(_0x2345fc(0x1f6))/0x1+-parseInt(_0x2345fc(0x1ee))/0x2*(-parseInt(_0x2345fc(0x208))/0x3)+-parseInt(_0x2345fc(0x212))/0x4*(parseInt(_0x2345fc(0x1f5))/0x5)+parseInt(_0x2345fc(0x201))/0x6+-parseInt(_0x2345fc(0x203))/0x7*(-parseInt(_0x2345fc(0x1fe))/0x8)+-parseInt(_0x2345fc(0x1fa))/0x9*(parseInt(_0x2345fc(0x1f1))/0xa)+-parseInt(_0x2345fc(0x20c))/0xb;if(_0x477c8e===_0x14cee5)break;else _0x5dfd0e['push'](_0x5dfd0e['shift']());}catch(_0x551cc8){_0x5dfd0e['push'](_0x5dfd0e['shift']());}}}(a39_0x5074,0xae3f2));import{BaseCommand}from'./command.js';import{getSessionID,cleanExpiredSessions,clearSessionContextField}from'../core/session.js';function a39_0x47cb(_0x8739cf,_0x47200c){_0x8739cf=_0x8739cf-0x1ec;const _0x50746d=a39_0x5074();let _0x47cb1c=_0x50746d[_0x8739cf];return _0x47cb1c;}import{clearDefaultSiteFromUserConfig,clearActiveProfileFromUserConfig}from'../core/profile.js';import{getConfigDir}from'../core/config.js';import a39_0x5ac0fe from'chalk';import*as a39_0x32749f from'node:path';function a39_0x5074(){const _0x479191=['session','Default\x20profile\x20','414927bCwbRV','Clear\x20session-level\x20or\x20default\x20context\x20values','engage_workspace','dim','1592CRtLHo','execute','profile','3301272dpAnYX','join','19922emdXDL','database','includes','\x0aResources:\x20site,\x20database,\x20parent_segment,\x20llm_project,\x20agent,\x20profile,\x20engage_workspace\x0a','--default\x20can\x20only\x20be\x20used\x20with\x20\x27site\x27\x20or\x20\x27profile\x27.\x20Other\x20resources\x20are\x20session-level\x20only.','3453654FZeUSh','llm_project','description','(session:\x20','11819181scJnZW','log','site','.\x20Must\x20be\x20one\x20of:\x20','\x0aUpdated:\x20','Default\x20site\x20','179580UPfrNi','error','llm_agent','parent_segment','default','2hCJjmW','cleared','unset','70NtrQQy','Usage:\x20tdx\x20unset\x20<resource>\x0a','message','green','15naxWoy','22193RCRRut','tdx.json'];a39_0x5074=function(){return _0x479191;};return a39_0x5074();}export class UnsetCommand extends BaseCommand{['name']=a39_0x16c812(0x1f0);[a39_0x16c812(0x20a)]=a39_0x16c812(0x1fb);['validate'](_0x226ad5){const _0x5768c7=a39_0x16c812,{args:_0x1fcab0,options:_0x464d0c}=_0x226ad5,_0x30377c=_0x464d0c[_0x5768c7(0x1ed)];if(_0x1fcab0['length']===0x0)return _0x5768c7(0x1f2)+'\x20\x20\x20\x20\x20\x20\x20tdx\x20unset\x20--default\x20<resource>\x20\x20#\x20Clear\x20default\x20from\x20config\x0a'+_0x5768c7(0x206)+'\x0aRun\x20\x27tdx\x20unset\x20--help\x27\x20for\x20more\x20options';const _0x30b801=_0x1fcab0[0x0],_0x4cd44f=['site','database',_0x5768c7(0x1ec),_0x5768c7(0x209),'agent',_0x5768c7(0x200),_0x5768c7(0x1fc)];if(!_0x4cd44f[_0x5768c7(0x205)](_0x30b801))return'Invalid\x20resource:\x20'+_0x30b801+_0x5768c7(0x20f)+_0x4cd44f['join'](',\x20');if(_0x30377c&&_0x30b801!==_0x5768c7(0x20e)&&_0x30b801!==_0x5768c7(0x200))return _0x5768c7(0x207);return undefined;}async[a39_0x16c812(0x1ff)](_0x2d0360){const _0x151217=a39_0x16c812,{args:_0x22a5ae,options:_0x1811d3}=_0x2d0360,_0x5c748b=_0x1811d3['default'];cleanExpiredSessions();try{const _0x5922cc=_0x22a5ae[0x0],_0x19de6e=a39_0x32749f[_0x151217(0x202)](getConfigDir(),_0x151217(0x1f7));if(_0x5c748b){if(_0x5922cc===_0x151217(0x20e))return clearDefaultSiteFromUserConfig(),console['log'](_0x151217(0x211)+a39_0x5ac0fe['green'](_0x151217(0x1ef))),console[_0x151217(0x20d)](a39_0x5ac0fe['dim'](_0x151217(0x210)+_0x19de6e)),0x0;if(_0x5922cc===_0x151217(0x200))return clearActiveProfileFromUserConfig(),console[_0x151217(0x20d)](_0x151217(0x1f9)+a39_0x5ac0fe['green'](_0x151217(0x1ef))),console['log'](a39_0x5ac0fe[_0x151217(0x1fd)](_0x151217(0x210)+_0x19de6e)),0x0;}const _0x271b16=getSessionID(_0x1811d3[_0x151217(0x1f8)]),_0x3550de={'site':_0x151217(0x20e),'database':_0x151217(0x204),'parent_segment':_0x151217(0x1ec),'llm_project':_0x151217(0x209),'agent':_0x151217(0x214),'profile':'profile','engage_workspace':'engage_workspace'},_0x10c5a1=_0x3550de[_0x5922cc];return _0x10c5a1&&(clearSessionContextField(_0x10c5a1,_0x1811d3[_0x151217(0x1f8)]),console['log']('Session\x20'+_0x5922cc+'\x20'+a39_0x5ac0fe[_0x151217(0x1f4)](_0x151217(0x1ef))+'\x20'+a39_0x5ac0fe[_0x151217(0x1fd)](_0x151217(0x20b)+_0x271b16+')'))),0x0;}catch(_0x3771af){return _0x3771af instanceof Error&&console[_0x151217(0x213)]('Error:\x20'+_0x3771af[_0x151217(0x1f3)]),0x1;}}}
1
+ const a39_0x28c16e=a39_0x3fe3;(function(_0x592f4a,_0x30cf3b){const _0x189f20=a39_0x3fe3,_0x22dc0e=_0x592f4a();while(!![]){try{const _0x87b067=parseInt(_0x189f20(0xdd))/0x1+-parseInt(_0x189f20(0xe2))/0x2*(-parseInt(_0x189f20(0xfc))/0x3)+parseInt(_0x189f20(0x100))/0x4+-parseInt(_0x189f20(0xdb))/0x5*(-parseInt(_0x189f20(0xff))/0x6)+-parseInt(_0x189f20(0xf4))/0x7+parseInt(_0x189f20(0xec))/0x8+-parseInt(_0x189f20(0xf7))/0x9;if(_0x87b067===_0x30cf3b)break;else _0x22dc0e['push'](_0x22dc0e['shift']());}catch(_0x10e0f5){_0x22dc0e['push'](_0x22dc0e['shift']());}}}(a39_0x3f22,0x534be));import{BaseCommand}from'./command.js';function a39_0x3fe3(_0x5b7dbb,_0x569763){_0x5b7dbb=_0x5b7dbb-0xd8;const _0x3f22dd=a39_0x3f22();let _0x3fe3dc=_0x3f22dd[_0x5b7dbb];return _0x3fe3dc;}import{getSessionID,cleanExpiredSessions,clearSessionContextField}from'../core/session.js';import{clearDefaultSiteFromUserConfig,clearActiveProfileFromUserConfig}from'../core/profile.js';import{getConfigDir}from'../core/config.js';import a39_0x206c84 from'chalk';import*as a39_0xd91623 from'node:path';export class UnsetCommand extends BaseCommand{['name']='unset';[a39_0x28c16e(0xfe)]='Clear\x20session-level\x20or\x20default\x20context\x20values';[a39_0x28c16e(0xe7)](_0x3f2d74){const _0x34d5b9=a39_0x28c16e,{args:_0x13c3ba,options:_0x43ae57}=_0x3f2d74,_0x3cb71f=_0x43ae57[_0x34d5b9(0xe5)];if(_0x13c3ba[_0x34d5b9(0xfb)]===0x0)return _0x34d5b9(0xef)+_0x34d5b9(0xf0)+'\x0aResources:\x20site,\x20database,\x20parent_segment,\x20llm_project,\x20agent,\x20profile,\x20engage_workspace\x0a'+_0x34d5b9(0xdc);const _0x15e478=_0x13c3ba[0x0],_0xf346ec=[_0x34d5b9(0xd8),_0x34d5b9(0xe6),_0x34d5b9(0xf3),'llm_project',_0x34d5b9(0xe4),'profile',_0x34d5b9(0xde)];if(!_0xf346ec[_0x34d5b9(0xe9)](_0x15e478))return _0x34d5b9(0xf6)+_0x15e478+_0x34d5b9(0xee)+_0xf346ec[_0x34d5b9(0xda)](',\x20');if(_0x3cb71f&&_0x15e478!==_0x34d5b9(0xd8)&&_0x15e478!==_0x34d5b9(0xe1))return'--default\x20can\x20only\x20be\x20used\x20with\x20\x27site\x27\x20or\x20\x27profile\x27.\x20Other\x20resources\x20are\x20session-level\x20only.';return undefined;}async[a39_0x28c16e(0xea)](_0x2bb32c){const _0x1f9b8a=a39_0x28c16e,{args:_0x5b08cf,options:_0xe357e7}=_0x2bb32c,_0xbf96fb=_0xe357e7[_0x1f9b8a(0xe5)];cleanExpiredSessions();try{const _0x45ddee=_0x5b08cf[0x0],_0x496fed=a39_0xd91623[_0x1f9b8a(0xda)](getConfigDir(),_0x1f9b8a(0xe0));if(_0xbf96fb){if(_0x45ddee===_0x1f9b8a(0xd8))return clearDefaultSiteFromUserConfig(),console[_0x1f9b8a(0xf5)](_0x1f9b8a(0xf2)+a39_0x206c84[_0x1f9b8a(0xfa)]('cleared')),console[_0x1f9b8a(0xf5)](a39_0x206c84['dim']('\x0aUpdated:\x20'+_0x496fed)),0x0;if(_0x45ddee===_0x1f9b8a(0xe1))return clearActiveProfileFromUserConfig(),console[_0x1f9b8a(0xf5)](_0x1f9b8a(0xf8)+a39_0x206c84[_0x1f9b8a(0xfa)](_0x1f9b8a(0xd9))),console['log'](a39_0x206c84[_0x1f9b8a(0xe3)]('\x0aUpdated:\x20'+_0x496fed)),0x0;}const _0x47140f=getSessionID(_0xe357e7['session']),_0x4aeb49={'site':_0x1f9b8a(0xd8),'database':_0x1f9b8a(0xe6),'parent_segment':_0x1f9b8a(0xf3),'llm_project':'llm_project','agent':_0x1f9b8a(0xfd),'profile':_0x1f9b8a(0xe1),'engage_workspace':_0x1f9b8a(0xde)},_0x55ecd7=_0x4aeb49[_0x45ddee];return _0x55ecd7&&(clearSessionContextField(_0x55ecd7,_0xe357e7[_0x1f9b8a(0xdf)]),console[_0x1f9b8a(0xf5)](_0x1f9b8a(0xf1)+_0x45ddee+'\x20'+a39_0x206c84['green'](_0x1f9b8a(0xd9))+'\x20'+a39_0x206c84[_0x1f9b8a(0xe3)](_0x1f9b8a(0xed)+_0x47140f+')'))),0x0;}catch(_0x1e95c4){return _0x1e95c4 instanceof Error&&console[_0x1f9b8a(0xe8)](_0x1f9b8a(0xeb)+_0x1e95c4[_0x1f9b8a(0xf9)]),0x1;}}}function a39_0x3f22(){const _0x41a6fc=['Usage:\x20tdx\x20unset\x20<resource>\x0a','\x20\x20\x20\x20\x20\x20\x20tdx\x20unset\x20--default\x20<resource>\x20\x20#\x20Clear\x20default\x20from\x20config\x0a','Session\x20','Default\x20site\x20','parent_segment','3365817zNeYhc','log','Invalid\x20resource:\x20','6052779DHuBYN','Default\x20profile\x20','message','green','length','39iHcADz','llm_agent','description','90CswKuK','1286948ahGxfs','site','cleared','join','55465tGYAMQ','\x0aRun\x20\x27tdx\x20unset\x20--help\x27\x20for\x20more\x20options','522727BGdnTQ','engage_workspace','session','tdx.json','profile','7702ggwPLh','dim','agent','default','database','validate','error','includes','execute','Error:\x20','3468976BfIbwc','(session:\x20','.\x20Must\x20be\x20one\x20of:\x20'];a39_0x3f22=function(){return _0x41a6fc;};return a39_0x3f22();}
@@ -1 +1 @@
1
- function a40_0x34f0(){const _0x39d5fa=['70881qfVIEp','Invalid\x20release\x20channel:\x20','default','use','Session\x20llm_project\x20set\x20to:\x20','cleared','(session:\x20','displayWithSources','session','\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20--clear\x20\x20\x20\x20\x20\x20#\x20Clear\x20session\x20context\x0a','\x27\x20does\x20not\x20exist','Session\x20agent\x20set\x20to:\x20','validate','\x0aUpdate\x20notifications\x20will\x20check\x20the\x20@latest\x20(stable)\x20channel.','name','display','Session\x20parent_segment\x20set\x20to:\x20','Session\x20site\x20set\x20to:\x20','\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20--default\x20release_channel\x20<stable|next>\x20\x20#\x20Set\x20release\x20channel\x0a','Error:\x20Profile\x20\x27','\x27\x20to\x20save\x20permanently','Set\x20session-level\x20context','llm_project','\x0aTip:\x20Use\x20\x27tdx\x20use\x20--clear\x27\x20to\x20clear\x20session\x20overrides','Resources:\x20site,\x20database,\x20parent_segment,\x20llm_project,\x20agent,\x20profile,\x20engage_workspace,\x20release_channel','release_channel','3275000GezrmP','message','\x0aSaved\x20to:\x20','\x0aResources:\x20site,\x20database,\x20parent_segment,\x20llm_project,\x20agent,\x20profile,\x20engage_workspace,\x20release_channel\x0a','\x0aRun\x20\x27tdx\x20use\x20--help\x27\x20for\x20more\x20options','llm_agent','Release\x20channel\x20set\x20to:\x20','length','3vuMsQf','2443876wPxaKK','Session\x20database\x20set\x20to:\x20','\x0aUse\x20\x27tdx\x20profiles\x27\x20to\x20see\x20available\x20profiles','release_channel\x20requires\x20--default.\x20Usage:\x20tdx\x20use\x20--default\x20release_channel\x20<stable|next>','agent','Invalid\x20resource:\x20','execute','5034834TXsvzL','clear','includes','--default\x20can\x20only\x20be\x20used\x20with\x20\x27site\x27,\x20\x27profile\x27,\x20or\x20\x27release_channel\x27.\x20Other\x20resources\x20are\x20session-level\x20only.','2597rnAzst','database','log','site','tdx.json','profile','stable','5085984FrnpMS','join','green','Error:\x20','engage_workspace','14gljBKr','Default\x20profile\x20set\x20to:\x20','6660UGlijX','Session\x20engage_workspace\x20set\x20to:\x20','parent_segment','\x0aUpdate\x20notifications\x20will\x20now\x20check\x20the\x20@next\x20channel.','dim','1110550rgRVTc','error','next','Usage:\x20tdx\x20use\x20<resource>\x20<value>\x0a','debug','Default\x20site\x20set\x20to:\x20','Use\x20--default\x20with\x20site,\x20profile,\x20or\x20release_channel\x20to\x20save\x20permanently','\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20--default\x20site\x20<value>\x20\x20\x20\x20\x20#\x20Save\x20default\x20site\x20to\x20config\x0a'];a40_0x34f0=function(){return _0x39d5fa;};return a40_0x34f0();}const a40_0x9ff4b6=a40_0x4862;(function(_0x5de0fb,_0xd5f0ce){const _0x3c138a=a40_0x4862,_0x41af1d=_0x5de0fb();while(!![]){try{const _0x20eb1f=parseInt(_0x3c138a(0xff))/0x1*(parseInt(_0x3c138a(0xf0))/0x2)+-parseInt(_0x3c138a(0xd8))/0x3*(parseInt(_0x3c138a(0xd9))/0x4)+-parseInt(_0x3c138a(0xf7))/0x5+-parseInt(_0x3c138a(0xf2))/0x6*(-parseInt(_0x3c138a(0xe4))/0x7)+-parseInt(_0x3c138a(0xeb))/0x8+parseInt(_0x3c138a(0xe0))/0x9+parseInt(_0x3c138a(0xd0))/0xa;if(_0x20eb1f===_0xd5f0ce)break;else _0x41af1d['push'](_0x41af1d['shift']());}catch(_0x2d0676){_0x41af1d['push'](_0x41af1d['shift']());}}}(a40_0x34f0,0x4f9bc));import{BaseCommand}from'./command.js';function a40_0x4862(_0x1b207e,_0x2d533f){_0x1b207e=_0x1b207e-0xcd;const _0x34f0b5=a40_0x34f0();let _0x4862e6=_0x34f0b5[_0x1b207e];return _0x4862e6;}import{saveSessionContext,getSessionID,cleanExpiredSessions,clearSessionContext}from'../core/session.js';import{profileExists,saveActiveProfileToUserConfig,saveDefaultSiteToUserConfig}from'../core/profile.js';import{GlobalContext}from'../core/global-context.js';import{parseAgentRef}from'../sdk/agent/agent-ref-parser.js';import{getConfigDir,saveReleaseChannel}from'../core/config.js';import a40_0x17d361 from'chalk';import*as a40_0x34bd29 from'node:path';export class UseCommand extends BaseCommand{[a40_0x9ff4b6(0x10d)]=a40_0x9ff4b6(0x102);['description']=a40_0x9ff4b6(0x114);[a40_0x9ff4b6(0x10b)](_0x1b9c66){const _0x29f37c=a40_0x9ff4b6,{args:_0x5f1ec8,options:_0x5d40bb}=_0x1b9c66,_0x4ca707=_0x5d40bb[_0x29f37c(0x101)];if(_0x5f1ec8['length']===0x0)return undefined;if(_0x5f1ec8[_0x29f37c(0xd7)]===0x1)return _0x29f37c(0xfa)+'\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'+_0x29f37c(0x108)+_0x29f37c(0xfe)+'\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20--default\x20profile\x20<value>\x20\x20#\x20Save\x20default\x20profile\x20to\x20config\x0a'+_0x29f37c(0x111)+_0x29f37c(0xd3)+_0x29f37c(0xd4);const _0x30d645=_0x5f1ec8[0x0],_0x412c0f=['site',_0x29f37c(0xe5),'parent_segment',_0x29f37c(0x115),_0x29f37c(0xdd),'profile',_0x29f37c(0xef),_0x29f37c(0xcf)];if(!_0x412c0f[_0x29f37c(0xe2)](_0x30d645))return _0x29f37c(0xde)+_0x30d645+'.\x20Must\x20be\x20one\x20of:\x20'+_0x412c0f[_0x29f37c(0xec)](',\x20');if(_0x4ca707&&_0x30d645!==_0x29f37c(0xe7)&&_0x30d645!=='profile'&&_0x30d645!==_0x29f37c(0xcf))return _0x29f37c(0xe3);if(_0x30d645==='release_channel'&&!_0x4ca707)return _0x29f37c(0xdc);if(_0x30d645==='release_channel'){const _0x51a408=_0x5f1ec8[0x1];if(_0x51a408!==_0x29f37c(0xea)&&_0x51a408!==_0x29f37c(0xf9))return _0x29f37c(0x100)+_0x51a408+'.\x20Must\x20be\x20\x27stable\x27\x20or\x20\x27next\x27.';}return undefined;}async[a40_0x9ff4b6(0xdf)](_0x125d52){const _0x188858=a40_0x9ff4b6,{args:_0x860802,options:_0x326d94}=_0x125d52,_0x36ee2f=_0x326d94[_0x188858(0xfb)],_0x4a5ce8=_0x326d94[_0x188858(0xe1)],_0x3a76d6=_0x326d94[_0x188858(0x101)];cleanExpiredSessions();try{if(_0x4a5ce8){clearSessionContext(_0x326d94['session']);const _0x52f926=getSessionID(_0x326d94['session']);return console[_0x188858(0xe6)]('Session\x20context\x20'+a40_0x17d361[_0x188858(0xed)](_0x188858(0x104))+'\x20'+a40_0x17d361['dim'](_0x188858(0x105)+_0x52f926+')')),0x0;}if(_0x860802[_0x188858(0xd7)]===0x0){const _0x49ee1d=new GlobalContext(_0x326d94);return _0x36ee2f?_0x49ee1d[_0x188858(0x106)]():_0x49ee1d[_0x188858(0x10e)](),console[_0x188858(0xe6)](a40_0x17d361[_0x188858(0xf6)]('\x0aSet\x20context:\x20tdx\x20use\x20<resource>\x20<value>')),console[_0x188858(0xe6)](a40_0x17d361['dim'](_0x188858(0xce))),console['log'](a40_0x17d361[_0x188858(0xf6)](_0x188858(0xfd))),0x0;}const _0x585c3f=_0x860802[0x0],_0x82dac7=_0x860802[0x1],_0x3ee39b=a40_0x34bd29['join'](getConfigDir(),_0x188858(0xe8));if(_0x3a76d6){if(_0x585c3f===_0x188858(0xe7))return saveDefaultSiteToUserConfig(_0x82dac7),console[_0x188858(0xe6)](_0x188858(0xfc)+a40_0x17d361['green'](_0x82dac7)),console['log'](a40_0x17d361[_0x188858(0xf6)](_0x188858(0xd2)+_0x3ee39b)),0x0;if(_0x585c3f==='profile'){if(!profileExists(_0x82dac7))return console['error'](_0x188858(0x112)+_0x82dac7+'\x27\x20does\x20not\x20exist'),console['error']('\x0aUse\x20\x27tdx\x20profiles\x27\x20to\x20see\x20available\x20profiles'),0x1;return saveActiveProfileToUserConfig(_0x82dac7),console['log'](_0x188858(0xf1)+a40_0x17d361[_0x188858(0xed)](_0x82dac7)),console['log'](a40_0x17d361[_0x188858(0xf6)]('\x0aSaved\x20to:\x20'+_0x3ee39b)),0x0;}if(_0x585c3f==='release_channel')return saveReleaseChannel(_0x82dac7),console[_0x188858(0xe6)](_0x188858(0xd6)+a40_0x17d361[_0x188858(0xed)](_0x82dac7)),console['log'](a40_0x17d361[_0x188858(0xf6)](_0x188858(0xd2)+_0x3ee39b)),_0x82dac7===_0x188858(0xf9)?(console[_0x188858(0xe6)](a40_0x17d361[_0x188858(0xf6)](_0x188858(0xf5))),console[_0x188858(0xe6)](a40_0x17d361['dim']('Install\x20the\x20latest\x20next\x20version:\x20npm\x20install\x20-g\x20@treasuredata/tdx@next'))):console[_0x188858(0xe6)](a40_0x17d361[_0x188858(0xf6)](_0x188858(0x10c))),0x0;}if(_0x585c3f===_0x188858(0xe7)){const _0x18ee27=getSessionID(_0x326d94[_0x188858(0x107)]);return saveSessionContext({'site':_0x82dac7},_0x326d94[_0x188858(0x107)]),console[_0x188858(0xe6)](_0x188858(0x110)+a40_0x17d361['green'](_0x82dac7)+'\x20'+a40_0x17d361[_0x188858(0xf6)](_0x188858(0x105)+_0x18ee27+')')),console['log'](a40_0x17d361['dim']('\x0aTip:\x20Use\x20\x27tdx\x20use\x20--default\x20site\x20'+_0x82dac7+_0x188858(0x113))),0x0;}if(_0x585c3f===_0x188858(0xe9)){if(!profileExists(_0x82dac7))return console['error'](_0x188858(0x112)+_0x82dac7+_0x188858(0x109)),console['error'](_0x188858(0xdb)),0x1;const _0x306967=getSessionID(_0x326d94['session']);return saveSessionContext({'profile':_0x82dac7},_0x326d94['session']),console[_0x188858(0xe6)]('Session\x20profile\x20set\x20to:\x20'+a40_0x17d361['green'](_0x82dac7)+'\x20'+a40_0x17d361[_0x188858(0xf6)]('(session:\x20'+_0x306967+')')),console[_0x188858(0xe6)](a40_0x17d361[_0x188858(0xf6)]('\x0aTip:\x20Use\x20\x27tdx\x20use\x20--default\x20profile\x20'+_0x82dac7+'\x27\x20to\x20save\x20permanently')),0x0;}const _0x552156={},_0x1b14fa=getSessionID(_0x326d94[_0x188858(0x107)]);switch(_0x585c3f){case _0x188858(0xe5):_0x552156[_0x188858(0xe5)]=_0x82dac7,console['log'](_0x188858(0xda)+a40_0x17d361[_0x188858(0xed)](_0x82dac7)+'\x20'+a40_0x17d361[_0x188858(0xf6)](_0x188858(0x105)+_0x1b14fa+')'));break;case _0x188858(0xf4):_0x552156[_0x188858(0xf4)]=_0x82dac7,console[_0x188858(0xe6)](_0x188858(0x10f)+a40_0x17d361['green'](_0x82dac7)+'\x20'+a40_0x17d361[_0x188858(0xf6)]('(session:\x20'+_0x1b14fa+')'));break;case _0x188858(0x115):_0x552156[_0x188858(0x115)]=_0x82dac7,console['log']('Session\x20llm_project\x20set\x20to:\x20'+a40_0x17d361[_0x188858(0xed)](_0x82dac7)+'\x20'+a40_0x17d361[_0x188858(0xf6)](_0x188858(0x105)+_0x1b14fa+')'));break;case'agent':{const {projectName:_0x16daf9,agentName:_0x5d9c3b}=parseAgentRef(_0x82dac7);_0x5d9c3b?(_0x552156['llm_project']=_0x16daf9,_0x552156[_0x188858(0xd5)]=_0x5d9c3b,console[_0x188858(0xe6)](_0x188858(0x103)+a40_0x17d361[_0x188858(0xed)](_0x16daf9)+'\x20'+a40_0x17d361[_0x188858(0xf6)]('(session:\x20'+_0x1b14fa+')')),console[_0x188858(0xe6)]('Session\x20agent\x20set\x20to:\x20'+a40_0x17d361[_0x188858(0xed)](_0x5d9c3b)+'\x20'+a40_0x17d361[_0x188858(0xf6)]('(session:\x20'+_0x1b14fa+')'))):(_0x552156[_0x188858(0xd5)]=_0x82dac7,console[_0x188858(0xe6)](_0x188858(0x10a)+a40_0x17d361['green'](_0x82dac7)+'\x20'+a40_0x17d361[_0x188858(0xf6)](_0x188858(0x105)+_0x1b14fa+')')));break;}case _0x188858(0xef):_0x552156[_0x188858(0xef)]=_0x82dac7,console[_0x188858(0xe6)](_0x188858(0xf3)+a40_0x17d361[_0x188858(0xed)](_0x82dac7)+'\x20'+a40_0x17d361['dim']('(session:\x20'+_0x1b14fa+')'));break;}return saveSessionContext(_0x552156,_0x326d94['session']),console[_0x188858(0xe6)](a40_0x17d361[_0x188858(0xf6)](_0x188858(0xcd))),0x0;}catch(_0xc0d4f3){return _0xc0d4f3 instanceof Error&&console[_0x188858(0xf8)](_0x188858(0xee)+_0xc0d4f3[_0x188858(0xd1)]),0x1;}}}
1
+ const a40_0x3ba0bd=a40_0x42cd;(function(_0x3ff8a0,_0x3ec80f){const _0x35bd9c=a40_0x42cd,_0x554700=_0x3ff8a0();while(!![]){try{const _0x1c5f4f=-parseInt(_0x35bd9c(0xdb))/0x1+parseInt(_0x35bd9c(0xc3))/0x2*(-parseInt(_0x35bd9c(0xba))/0x3)+-parseInt(_0x35bd9c(0xe0))/0x4+parseInt(_0x35bd9c(0xd5))/0x5+parseInt(_0x35bd9c(0xb1))/0x6+parseInt(_0x35bd9c(0xc7))/0x7*(-parseInt(_0x35bd9c(0xe6))/0x8)+-parseInt(_0x35bd9c(0xac))/0x9*(-parseInt(_0x35bd9c(0xb3))/0xa);if(_0x1c5f4f===_0x3ec80f)break;else _0x554700['push'](_0x554700['shift']());}catch(_0x5b7f59){_0x554700['push'](_0x554700['shift']());}}}(a40_0x3690,0xe05c3));function a40_0x3690(){const _0x138507=['join','Error:\x20Profile\x20\x27','Default\x20profile\x20set\x20to:\x20','2664328NmAFqZ','database','Default\x20site\x20set\x20to:\x20','next','Install\x20the\x20latest\x20next\x20version:\x20npm\x20install\x20-g\x20@treasuredata/tdx@next','parent_segment','release_channel\x20requires\x20--default.\x20Usage:\x20tdx\x20use\x20--default\x20release_channel\x20<stable|next>','clear','Session\x20site\x20set\x20to:\x20','length','display','Invalid\x20release\x20channel:\x20','\x0aResources:\x20site,\x20database,\x20parent_segment,\x20llm_project,\x20agent,\x20profile,\x20engage_workspace,\x20release_channel\x0a','77643YyKiSA','Usage:\x20tdx\x20use\x20<resource>\x20<value>\x0a','includes','llm_project','Release\x20channel\x20set\x20to:\x20','7805934RvSmsE','Use\x20--default\x20with\x20site,\x20profile,\x20or\x20release_channel\x20to\x20save\x20permanently','430zahUWW','.\x20Must\x20be\x20one\x20of:\x20','\x0aTip:\x20Use\x20\x27tdx\x20use\x20--default\x20profile\x20','\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20--clear\x20\x20\x20\x20\x20\x20#\x20Clear\x20session\x20context\x0a','\x27\x20does\x20not\x20exist','\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','Invalid\x20resource:\x20','12wTRQHL','release_channel','displayWithSources','site','execute','agent','llm_agent','\x0aTip:\x20Use\x20\x27tdx\x20use\x20--clear\x27\x20to\x20clear\x20session\x20overrides','dim','131316RGykgv','session','stable','profile','14pYbEwR','log','Session\x20context\x20','Session\x20agent\x20set\x20to:\x20','\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20--default\x20profile\x20<value>\x20\x20#\x20Save\x20default\x20profile\x20to\x20config\x0a','Session\x20engage_workspace\x20set\x20to:\x20','validate','\x0aUpdate\x20notifications\x20will\x20check\x20the\x20@latest\x20(stable)\x20channel.','Session\x20llm_project\x20set\x20to:\x20','Set\x20session-level\x20context','(session:\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','green','--default\x20can\x20only\x20be\x20used\x20with\x20\x27site\x27,\x20\x27profile\x27,\x20or\x20\x27release_channel\x27.\x20Other\x20resources\x20are\x20session-level\x20only.','2558275DRnELJ','engage_workspace','Session\x20database\x20set\x20to:\x20','message','\x0aUse\x20\x27tdx\x20profiles\x27\x20to\x20see\x20available\x20profiles','Session\x20parent_segment\x20set\x20to:\x20','326318IwFfGv','\x27\x20to\x20save\x20permanently','tdx.json','Error:\x20','\x0aSaved\x20to:\x20','38376GrfdbL','error','debug'];a40_0x3690=function(){return _0x138507;};return a40_0x3690();}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 a40_0x42cd(_0x19b94e,_0x1cac6c){_0x19b94e=_0x19b94e-0xa6;const _0x36907a=a40_0x3690();let _0x42cdac=_0x36907a[_0x19b94e];return _0x42cdac;}import a40_0x1effb7 from'chalk';import*as a40_0x252bfb from'node:path';export class UseCommand extends BaseCommand{['name']='use';['description']=a40_0x3ba0bd(0xd0);[a40_0x3ba0bd(0xcd)](_0x1a8130){const _0x66f4da=a40_0x3ba0bd,{args:_0x3b70f7,options:_0x3f74e9}=_0x1a8130,_0x4cd170=_0x3f74e9['default'];if(_0x3b70f7[_0x66f4da(0xa8)]===0x0)return undefined;if(_0x3b70f7['length']===0x1)return _0x66f4da(0xad)+_0x66f4da(0xb8)+_0x66f4da(0xb6)+_0x66f4da(0xd2)+_0x66f4da(0xcb)+'\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20--default\x20release_channel\x20<stable|next>\x20\x20#\x20Set\x20release\x20channel\x0a'+_0x66f4da(0xab)+'\x0aRun\x20\x27tdx\x20use\x20--help\x27\x20for\x20more\x20options';const _0x1188ed=_0x3b70f7[0x0],_0x3722b0=[_0x66f4da(0xbd),_0x66f4da(0xe7),'parent_segment',_0x66f4da(0xaf),_0x66f4da(0xbf),_0x66f4da(0xc6),'engage_workspace',_0x66f4da(0xbb)];if(!_0x3722b0[_0x66f4da(0xae)](_0x1188ed))return _0x66f4da(0xb9)+_0x1188ed+_0x66f4da(0xb4)+_0x3722b0['join'](',\x20');if(_0x4cd170&&_0x1188ed!=='site'&&_0x1188ed!==_0x66f4da(0xc6)&&_0x1188ed!==_0x66f4da(0xbb))return _0x66f4da(0xd4);if(_0x1188ed===_0x66f4da(0xbb)&&!_0x4cd170)return _0x66f4da(0xec);if(_0x1188ed===_0x66f4da(0xbb)){const _0x20a9a5=_0x3b70f7[0x1];if(_0x20a9a5!==_0x66f4da(0xc5)&&_0x20a9a5!==_0x66f4da(0xe9))return _0x66f4da(0xaa)+_0x20a9a5+'.\x20Must\x20be\x20\x27stable\x27\x20or\x20\x27next\x27.';}return undefined;}async[a40_0x3ba0bd(0xbe)](_0x3e79a1){const _0x1dfca4=a40_0x3ba0bd,{args:_0x4d476d,options:_0x327b54}=_0x3e79a1,_0x3c88e8=_0x327b54[_0x1dfca4(0xe2)],_0xf31b36=_0x327b54[_0x1dfca4(0xa6)],_0x2e2cf7=_0x327b54['default'];cleanExpiredSessions();try{if(_0xf31b36){clearSessionContext(_0x327b54['session']);const _0x3f58f1=getSessionID(_0x327b54[_0x1dfca4(0xc4)]);return console['log'](_0x1dfca4(0xc9)+a40_0x1effb7['green']('cleared')+'\x20'+a40_0x1effb7['dim'](_0x1dfca4(0xd1)+_0x3f58f1+')')),0x0;}if(_0x4d476d['length']===0x0){const _0x2e3b2d=new GlobalContext(_0x327b54);return _0x3c88e8?_0x2e3b2d[_0x1dfca4(0xbc)]():_0x2e3b2d[_0x1dfca4(0xa9)](),console[_0x1dfca4(0xc8)](a40_0x1effb7['dim']('\x0aSet\x20context:\x20tdx\x20use\x20<resource>\x20<value>')),console[_0x1dfca4(0xc8)](a40_0x1effb7[_0x1dfca4(0xc2)]('Resources:\x20site,\x20database,\x20parent_segment,\x20llm_project,\x20agent,\x20profile,\x20engage_workspace,\x20release_channel')),console['log'](a40_0x1effb7[_0x1dfca4(0xc2)](_0x1dfca4(0xb2))),0x0;}const _0x331837=_0x4d476d[0x0],_0x500db1=_0x4d476d[0x1],_0x94c6d3=a40_0x252bfb[_0x1dfca4(0xe3)](getConfigDir(),_0x1dfca4(0xdd));if(_0x2e2cf7){if(_0x331837===_0x1dfca4(0xbd))return saveDefaultSiteToUserConfig(_0x500db1),console[_0x1dfca4(0xc8)](_0x1dfca4(0xe8)+a40_0x1effb7[_0x1dfca4(0xd3)](_0x500db1)),console['log'](a40_0x1effb7['dim'](_0x1dfca4(0xdf)+_0x94c6d3)),0x0;if(_0x331837===_0x1dfca4(0xc6)){if(!profileExists(_0x500db1))return console[_0x1dfca4(0xe1)](_0x1dfca4(0xe4)+_0x500db1+_0x1dfca4(0xb7)),console[_0x1dfca4(0xe1)]('\x0aUse\x20\x27tdx\x20profiles\x27\x20to\x20see\x20available\x20profiles'),0x1;return saveActiveProfileToUserConfig(_0x500db1),console[_0x1dfca4(0xc8)](_0x1dfca4(0xe5)+a40_0x1effb7[_0x1dfca4(0xd3)](_0x500db1)),console[_0x1dfca4(0xc8)](a40_0x1effb7['dim'](_0x1dfca4(0xdf)+_0x94c6d3)),0x0;}if(_0x331837===_0x1dfca4(0xbb))return saveReleaseChannel(_0x500db1),console[_0x1dfca4(0xc8)](_0x1dfca4(0xb0)+a40_0x1effb7[_0x1dfca4(0xd3)](_0x500db1)),console[_0x1dfca4(0xc8)](a40_0x1effb7['dim'](_0x1dfca4(0xdf)+_0x94c6d3)),_0x500db1===_0x1dfca4(0xe9)?(console[_0x1dfca4(0xc8)](a40_0x1effb7[_0x1dfca4(0xc2)]('\x0aUpdate\x20notifications\x20will\x20now\x20check\x20the\x20@next\x20channel.')),console[_0x1dfca4(0xc8)](a40_0x1effb7[_0x1dfca4(0xc2)](_0x1dfca4(0xea)))):console[_0x1dfca4(0xc8)](a40_0x1effb7[_0x1dfca4(0xc2)](_0x1dfca4(0xce))),0x0;}if(_0x331837===_0x1dfca4(0xbd)){const _0x1107b1=getSessionID(_0x327b54[_0x1dfca4(0xc4)]);return saveSessionContext({'site':_0x500db1},_0x327b54[_0x1dfca4(0xc4)]),console[_0x1dfca4(0xc8)](_0x1dfca4(0xa7)+a40_0x1effb7[_0x1dfca4(0xd3)](_0x500db1)+'\x20'+a40_0x1effb7[_0x1dfca4(0xc2)](_0x1dfca4(0xd1)+_0x1107b1+')')),console['log'](a40_0x1effb7[_0x1dfca4(0xc2)]('\x0aTip:\x20Use\x20\x27tdx\x20use\x20--default\x20site\x20'+_0x500db1+_0x1dfca4(0xdc))),0x0;}if(_0x331837===_0x1dfca4(0xc6)){if(!profileExists(_0x500db1))return console[_0x1dfca4(0xe1)](_0x1dfca4(0xe4)+_0x500db1+_0x1dfca4(0xb7)),console[_0x1dfca4(0xe1)](_0x1dfca4(0xd9)),0x1;const _0x10988d=getSessionID(_0x327b54[_0x1dfca4(0xc4)]);return saveSessionContext({'profile':_0x500db1},_0x327b54[_0x1dfca4(0xc4)]),console['log']('Session\x20profile\x20set\x20to:\x20'+a40_0x1effb7['green'](_0x500db1)+'\x20'+a40_0x1effb7[_0x1dfca4(0xc2)](_0x1dfca4(0xd1)+_0x10988d+')')),console['log'](a40_0x1effb7['dim'](_0x1dfca4(0xb5)+_0x500db1+_0x1dfca4(0xdc))),0x0;}const _0x6880c9={},_0x4cf3e9=getSessionID(_0x327b54[_0x1dfca4(0xc4)]);switch(_0x331837){case _0x1dfca4(0xe7):_0x6880c9['database']=_0x500db1,console[_0x1dfca4(0xc8)](_0x1dfca4(0xd7)+a40_0x1effb7['green'](_0x500db1)+'\x20'+a40_0x1effb7['dim']('(session:\x20'+_0x4cf3e9+')'));break;case _0x1dfca4(0xeb):_0x6880c9[_0x1dfca4(0xeb)]=_0x500db1,console[_0x1dfca4(0xc8)](_0x1dfca4(0xda)+a40_0x1effb7[_0x1dfca4(0xd3)](_0x500db1)+'\x20'+a40_0x1effb7['dim'](_0x1dfca4(0xd1)+_0x4cf3e9+')'));break;case'llm_project':_0x6880c9[_0x1dfca4(0xaf)]=_0x500db1,console['log']('Session\x20llm_project\x20set\x20to:\x20'+a40_0x1effb7[_0x1dfca4(0xd3)](_0x500db1)+'\x20'+a40_0x1effb7[_0x1dfca4(0xc2)]('(session:\x20'+_0x4cf3e9+')'));break;case _0x1dfca4(0xbf):{const {projectName:_0x5ae5d8,agentName:_0x4589eb}=parseAgentRef(_0x500db1);_0x4589eb?(_0x6880c9[_0x1dfca4(0xaf)]=_0x5ae5d8,_0x6880c9['llm_agent']=_0x4589eb,console[_0x1dfca4(0xc8)](_0x1dfca4(0xcf)+a40_0x1effb7[_0x1dfca4(0xd3)](_0x5ae5d8)+'\x20'+a40_0x1effb7[_0x1dfca4(0xc2)](_0x1dfca4(0xd1)+_0x4cf3e9+')')),console[_0x1dfca4(0xc8)]('Session\x20agent\x20set\x20to:\x20'+a40_0x1effb7[_0x1dfca4(0xd3)](_0x4589eb)+'\x20'+a40_0x1effb7[_0x1dfca4(0xc2)](_0x1dfca4(0xd1)+_0x4cf3e9+')'))):(_0x6880c9[_0x1dfca4(0xc0)]=_0x500db1,console['log'](_0x1dfca4(0xca)+a40_0x1effb7['green'](_0x500db1)+'\x20'+a40_0x1effb7['dim']('(session:\x20'+_0x4cf3e9+')')));break;}case'engage_workspace':_0x6880c9[_0x1dfca4(0xd6)]=_0x500db1,console[_0x1dfca4(0xc8)](_0x1dfca4(0xcc)+a40_0x1effb7[_0x1dfca4(0xd3)](_0x500db1)+'\x20'+a40_0x1effb7['dim'](_0x1dfca4(0xd1)+_0x4cf3e9+')'));break;}return saveSessionContext(_0x6880c9,_0x327b54[_0x1dfca4(0xc4)]),console[_0x1dfca4(0xc8)](a40_0x1effb7[_0x1dfca4(0xc2)](_0x1dfca4(0xc1))),0x0;}catch(_0x1a0fc6){return _0x1a0fc6 instanceof Error&&console[_0x1dfca4(0xe1)](_0x1dfca4(0xde)+_0x1a0fc6[_0x1dfca4(0xd8)]),0x1;}}}
@@ -1 +1 @@
1
- const a41_0x2baed5=a41_0x4295;(function(_0x123224,_0x58db04){const _0x417044=a41_0x4295,_0x21f7fe=_0x123224();while(!![]){try{const _0x51d085=parseInt(_0x417044(0x1de))/0x1+parseInt(_0x417044(0x1e6))/0x2*(parseInt(_0x417044(0x1e5))/0x3)+-parseInt(_0x417044(0x1d2))/0x4*(parseInt(_0x417044(0x1ce))/0x5)+-parseInt(_0x417044(0x1da))/0x6+-parseInt(_0x417044(0x1d3))/0x7+-parseInt(_0x417044(0x1d4))/0x8*(-parseInt(_0x417044(0x1d7))/0x9)+-parseInt(_0x417044(0x1d0))/0xa*(parseInt(_0x417044(0x1e7))/0xb);if(_0x51d085===_0x58db04)break;else _0x21f7fe['push'](_0x21f7fe['shift']());}catch(_0x283311){_0x21f7fe['push'](_0x21f7fe['shift']());}}}(a41_0x432a,0x7d88f));function a41_0x432a(){const _0x4e4bf5=['cause','882670pOdJAq','\x20user','32zNcibJ','1581552cgLQWY','32kMloXR','description','list','945162iVibpW','data','execute','112584vIVylT','user\x20list','Error:\x20','length','8724tFwPCs','message','error','getCurrent','\x20\x20Cause:\x20','Show\x20current\x20user\x20information','Fetching\x20user\x20info...','954987OpGXao','4sUGXOp','11sZPnQq','user','Listing\x20users...','name','✔\x20Found\x20','136435LKMYKl'];a41_0x432a=function(){return _0x4e4bf5;};return a41_0x432a();}import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';function a41_0x4295(_0xbd9773,_0x56cdd8){_0xbd9773=_0xbd9773-0x1ce;const _0x432a5d=a41_0x432a();let _0x4295dc=_0x432a5d[_0xbd9773];return _0x4295dc;}import{handleSDKOutput,handleSingleObjectOutput}from'../core/command-output.js';import{withSpinner}from'../utils/spinner.js';export class UserCommand extends BaseCommand{[a41_0x2baed5(0x1ea)]=a41_0x2baed5(0x1e8);[a41_0x2baed5(0x1d5)]=a41_0x2baed5(0x1e3);async[a41_0x2baed5(0x1d9)](_0x58ef81){const _0x488d93=a41_0x2baed5,{options:_0x58851e,tdx:_0x5b99bf}=_0x58ef81;try{const _0x4f4ed1=await withSpinner(_0x488d93(0x1e4),()=>_0x5b99bf[_0x488d93(0x1e8)][_0x488d93(0x1e1)](),{'verbose':_0x58851e['verbose']}),_0x296e16=_0x4f4ed1[_0x488d93(0x1d8)];return await handleSingleObjectOutput(_0x296e16,_0x58851e),0x0;}catch(_0x5dcd41){if(_0x5dcd41 instanceof SDKError)return console[_0x488d93(0x1e0)](_0x488d93(0x1dc)+_0x5dcd41[_0x488d93(0x1df)]),_0x5dcd41[_0x488d93(0x1cf)]&&console[_0x488d93(0x1e0)](_0x488d93(0x1e2)+_0x5dcd41[_0x488d93(0x1cf)]),0x1;throw _0x5dcd41;}}}export class UserListCommand extends BaseCommand{[a41_0x2baed5(0x1ea)]=a41_0x2baed5(0x1db);['description']='List\x20all\x20users\x20in\x20the\x20account';async['execute'](_0x88660d){const _0x54cd20=a41_0x2baed5,{options:_0x58c2f3,tdx:_0x1e8055}=_0x88660d;try{const _0xbde3aa=await withSpinner(_0x54cd20(0x1e9),()=>_0x1e8055[_0x54cd20(0x1e8)][_0x54cd20(0x1d6)](),{'verbose':_0x58c2f3['verbose']}),_0x99c857=_0xbde3aa[_0x54cd20(0x1d8)];return console[_0x54cd20(0x1e0)](_0x54cd20(0x1eb)+_0x99c857[_0x54cd20(0x1dd)]+_0x54cd20(0x1d1)+(_0x99c857[_0x54cd20(0x1dd)]!==0x1?'s':'')),await handleSDKOutput(_0x99c857,_0x58c2f3),0x0;}catch(_0x49bbca){if(_0x49bbca instanceof SDKError)return console[_0x54cd20(0x1e0)](_0x54cd20(0x1dc)+_0x49bbca['message']),_0x49bbca[_0x54cd20(0x1cf)]&&console[_0x54cd20(0x1e0)](_0x54cd20(0x1e2)+_0x49bbca['cause']),0x1;throw _0x49bbca;}}}
1
+ const a41_0x3fd61d=a41_0x2593;function a41_0x1f57(){const _0x263678=['13983ngKnjv','List\x20all\x20users\x20in\x20the\x20account','10VYGNuX','38493gaqPNN','86dEkrHu','length','description','error','1781541eNQtTX','Error:\x20','3416932hOlmCJ','783255hJXryg','verbose','\x20user','✔\x20Found\x20','Show\x20current\x20user\x20information','447347DMxNFR','\x20\x20Cause:\x20','data','user\x20list','Fetching\x20user\x20info...','948FCYOjz','execute','Listing\x20users...','list','cause','9477336XtDnUb','user','message'];a41_0x1f57=function(){return _0x263678;};return a41_0x1f57();}(function(_0x41f4ba,_0x3901c3){const _0x2c7e66=a41_0x2593,_0x5167fd=_0x41f4ba();while(!![]){try{const _0x16aa96=-parseInt(_0x2c7e66(0x13f))/0x1+parseInt(_0x2c7e66(0x133))/0x2*(-parseInt(_0x2c7e66(0x12f))/0x3)+-parseInt(_0x2c7e66(0x139))/0x4+-parseInt(_0x2c7e66(0x13a))/0x5+-parseInt(_0x2c7e66(0x144))/0x6*(-parseInt(_0x2c7e66(0x132))/0x7)+parseInt(_0x2c7e66(0x149))/0x8+-parseInt(_0x2c7e66(0x137))/0x9*(-parseInt(_0x2c7e66(0x131))/0xa);if(_0x16aa96===_0x3901c3)break;else _0x5167fd['push'](_0x5167fd['shift']());}catch(_0x574c59){_0x5167fd['push'](_0x5167fd['shift']());}}}(a41_0x1f57,0x90ba4));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleSDKOutput,handleSingleObjectOutput}from'../core/command-output.js';import{withSpinner}from'../utils/spinner.js';function a41_0x2593(_0x43ec28,_0x194611){_0x43ec28=_0x43ec28-0x12e;const _0x1f5700=a41_0x1f57();let _0x25933c=_0x1f5700[_0x43ec28];return _0x25933c;}export class UserCommand extends BaseCommand{['name']=a41_0x3fd61d(0x14a);[a41_0x3fd61d(0x135)]=a41_0x3fd61d(0x13e);async[a41_0x3fd61d(0x145)](_0x40330d){const _0x33361d=a41_0x3fd61d,{options:_0x2b3535,tdx:_0x4752c0}=_0x40330d;try{const _0x2dfbcf=await withSpinner(_0x33361d(0x143),()=>_0x4752c0[_0x33361d(0x14a)]['getCurrent'](),{'verbose':_0x2b3535[_0x33361d(0x13b)]}),_0x46a026=_0x2dfbcf[_0x33361d(0x141)];return await handleSingleObjectOutput(_0x46a026,_0x2b3535),0x0;}catch(_0x32beb7){if(_0x32beb7 instanceof SDKError)return console[_0x33361d(0x136)](_0x33361d(0x138)+_0x32beb7['message']),_0x32beb7['cause']&&console[_0x33361d(0x136)]('\x20\x20Cause:\x20'+_0x32beb7[_0x33361d(0x148)]),0x1;throw _0x32beb7;}}}export class UserListCommand extends BaseCommand{['name']=a41_0x3fd61d(0x142);[a41_0x3fd61d(0x135)]=a41_0x3fd61d(0x130);async['execute'](_0x9f99c9){const _0x1320c5=a41_0x3fd61d,{options:_0x28c629,tdx:_0x2498ef}=_0x9f99c9;try{const _0x3f5ff3=await withSpinner(_0x1320c5(0x146),()=>_0x2498ef[_0x1320c5(0x14a)][_0x1320c5(0x147)](),{'verbose':_0x28c629[_0x1320c5(0x13b)]}),_0x2e4690=_0x3f5ff3['data'];return console[_0x1320c5(0x136)](_0x1320c5(0x13d)+_0x2e4690['length']+_0x1320c5(0x13c)+(_0x2e4690[_0x1320c5(0x134)]!==0x1?'s':'')),await handleSDKOutput(_0x2e4690,_0x28c629),0x0;}catch(_0x222dce){if(_0x222dce instanceof SDKError)return console['error']('Error:\x20'+_0x222dce[_0x1320c5(0x12e)]),_0x222dce[_0x1320c5(0x148)]&&console[_0x1320c5(0x136)](_0x1320c5(0x140)+_0x222dce[_0x1320c5(0x148)]),0x1;throw _0x222dce;}}}