@treasuredata/tdx 0.28.2 → 0.28.3

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 (179) hide show
  1. package/dist/bin.js +1 -1
  2. package/dist/build-info.json +3 -3
  3. package/dist/cli-categories.js +1 -1
  4. package/dist/cli.js +1 -1
  5. package/dist/commands/activations.js +1 -1
  6. package/dist/commands/agent-command.js +1 -1
  7. package/dist/commands/agent-test-command.js +1 -1
  8. package/dist/commands/api-command.js +1 -1
  9. package/dist/commands/auth-command.js +1 -1
  10. package/dist/commands/chat-command.js +1 -1
  11. package/dist/commands/claude-command.js +1 -1
  12. package/dist/commands/claude-statusline-command.js +1 -1
  13. package/dist/commands/claude-usage-command.js +1 -1
  14. package/dist/commands/command.js +1 -1
  15. package/dist/commands/connection-command.js +1 -1
  16. package/dist/commands/databases.js +1 -1
  17. package/dist/commands/delivery-command.js +1 -1
  18. package/dist/commands/describe.js +1 -1
  19. package/dist/commands/engage-campaign-pull-command.js +1 -1
  20. package/dist/commands/engage-campaign-push-command.js +1 -1
  21. package/dist/commands/engage-campaign-validate-command.js +1 -1
  22. package/dist/commands/engage-command.js +1 -1
  23. package/dist/commands/job-command.js +1 -1
  24. package/dist/commands/journey-command.js +1 -1
  25. package/dist/commands/journey-validate-command.js +1 -1
  26. package/dist/commands/llm-command.js +1 -1
  27. package/dist/commands/mcp-command.js +1 -1
  28. package/dist/commands/parent-segment-command.js +1 -1
  29. package/dist/commands/profile-command.js +1 -1
  30. package/dist/commands/profiles-command.js +1 -1
  31. package/dist/commands/query-command.js +1 -1
  32. package/dist/commands/schedule-command.js +1 -1
  33. package/dist/commands/segment-command.js +1 -1
  34. package/dist/commands/segment-create-command.js +1 -1
  35. package/dist/commands/segment-fields-command.js +1 -1
  36. package/dist/commands/segment-pull-command.js +1 -1
  37. package/dist/commands/segment-push-command.js +1 -1
  38. package/dist/commands/segment-update-command.js +1 -1
  39. package/dist/commands/segment-use-command.js +1 -1
  40. package/dist/commands/segment-validate-command.js +1 -1
  41. package/dist/commands/segments.js +1 -1
  42. package/dist/commands/show.js +1 -1
  43. package/dist/commands/status-command.js +1 -1
  44. package/dist/commands/tables.js +1 -1
  45. package/dist/commands/unset-command.js +1 -1
  46. package/dist/commands/use-command.js +1 -1
  47. package/dist/commands/user-command.js +1 -1
  48. package/dist/commands/workflow-command.js +1 -1
  49. package/dist/core/auth.js +1 -1
  50. package/dist/core/command-output.js +1 -1
  51. package/dist/core/config.js +1 -1
  52. package/dist/core/connection-cache.js +1 -1
  53. package/dist/core/constants.js +1 -1
  54. package/dist/core/credential-cache.js +1 -1
  55. package/dist/core/global-context.js +1 -1
  56. package/dist/core/keychain.js +1 -1
  57. package/dist/core/profile.js +1 -1
  58. package/dist/core/project-config.js +1 -1
  59. package/dist/core/session.js +1 -1
  60. package/dist/core/user-cache.js +1 -1
  61. package/dist/core/version.js +1 -1
  62. package/dist/index.js +1 -1
  63. package/dist/mcp/server.js +1 -1
  64. package/dist/mcp/tools/index.js +1 -1
  65. package/dist/mcp/tools/tdx-run.js +1 -1
  66. package/dist/mcp/tools/tdx-search.js +1 -1
  67. package/dist/mcp/utils.js +1 -1
  68. package/dist/proxy/claude-usage-tracker.js +1 -1
  69. package/dist/proxy/passthrough-server.js +1 -1
  70. package/dist/proxy/sse-usage-parser.js +1 -1
  71. package/dist/sdk/agent/agent-config.js +1 -1
  72. package/dist/sdk/agent/agent-ref-parser.js +1 -1
  73. package/dist/sdk/agent/agent-yaml.js +1 -1
  74. package/dist/sdk/agent/test/evaluator.js +1 -1
  75. package/dist/sdk/agent/test/executor.js +1 -1
  76. package/dist/sdk/agent/test/index.js +1 -1
  77. package/dist/sdk/agent/test/output.js +1 -1
  78. package/dist/sdk/agent/test/parser.js +1 -1
  79. package/dist/sdk/agent/tool-target-registry.js +1 -1
  80. package/dist/sdk/api.js +1 -1
  81. package/dist/sdk/client/cdp-api-client.js +1 -1
  82. package/dist/sdk/client/delivery-api-client.js +1 -1
  83. package/dist/sdk/client/endpoints.js +1 -1
  84. package/dist/sdk/client/engage-api-client.js +1 -1
  85. package/dist/sdk/client/http-client.js +1 -1
  86. package/dist/sdk/client/llm-api-client.js +1 -1
  87. package/dist/sdk/client/rate-limiter.js +1 -1
  88. package/dist/sdk/client/td-api-client.js +1 -1
  89. package/dist/sdk/client/trino-api-client.js +1 -1
  90. package/dist/sdk/client/workflow-client.js +1 -1
  91. package/dist/sdk/connection-validator.js +1 -1
  92. package/dist/sdk/connection.js +1 -1
  93. package/dist/sdk/delivery.js +1 -1
  94. package/dist/sdk/engage/campaign-pull.js +1 -1
  95. package/dist/sdk/engage/campaign-push.js +1 -1
  96. package/dist/sdk/engage/campaign-validator.js +1 -1
  97. package/dist/sdk/engage/campaign-yaml.js +1 -1
  98. package/dist/sdk/engage/types/campaign-def.js +1 -1
  99. package/dist/sdk/engage/types/campaign-schema.js +1 -1
  100. package/dist/sdk/engage.js +1 -1
  101. package/dist/sdk/errors.js +1 -1
  102. package/dist/sdk/index.js +1 -1
  103. package/dist/sdk/io/index.js +1 -1
  104. package/dist/sdk/io/node-filesystem.js +1 -1
  105. package/dist/sdk/job.js +1 -1
  106. package/dist/sdk/journey.js +1 -1
  107. package/dist/sdk/llm/chat-cache.js +1 -1
  108. package/dist/sdk/llm/index.js +1 -1
  109. package/dist/sdk/llm/llm-backup-utils.js +1 -1
  110. package/dist/sdk/llm/model-factors.js +1 -1
  111. package/dist/sdk/personalization.js +1 -1
  112. package/dist/sdk/query/index.js +1 -1
  113. package/dist/sdk/query/sql-parser.js +1 -1
  114. package/dist/sdk/realtime.js +1 -1
  115. package/dist/sdk/schedule.js +1 -1
  116. package/dist/sdk/segment/child-segment-yaml.js +1 -1
  117. package/dist/sdk/segment/fields-display.js +1 -1
  118. package/dist/sdk/segment/file-discovery.js +1 -1
  119. package/dist/sdk/segment/journey-utils.js +1 -1
  120. package/dist/sdk/segment/journey-validator.js +1 -1
  121. package/dist/sdk/segment/journey-yaml.js +1 -1
  122. package/dist/sdk/segment/parent-segment-preview.js +1 -1
  123. package/dist/sdk/segment/parent-segment-yaml.js +1 -1
  124. package/dist/sdk/segment/pull-workflow.js +1 -1
  125. package/dist/sdk/segment/push-recovery.js +1 -1
  126. package/dist/sdk/segment/push-workflow.js +1 -1
  127. package/dist/sdk/segment/resolution-context.js +1 -1
  128. package/dist/sdk/segment/segment-path-parser.js +1 -1
  129. package/dist/sdk/segment/segment-ref-parser.js +1 -1
  130. package/dist/sdk/segment/target-resolution.js +1 -1
  131. package/dist/sdk/segment/tdx-config.js +1 -1
  132. package/dist/sdk/segment/validate-files.js +1 -1
  133. package/dist/sdk/segment/yaml-validator.js +1 -1
  134. package/dist/sdk/segment.js +1 -1
  135. package/dist/sdk/types/index.js +1 -1
  136. package/dist/sdk/types/progress.js +1 -1
  137. package/dist/sdk/user.js +1 -1
  138. package/dist/sdk/util/format-detector.js +1 -1
  139. package/dist/sdk/util/formatters.js +1 -1
  140. package/dist/sdk/util/index.js +1 -1
  141. package/dist/sdk/util/tree-formatter.js +1 -1
  142. package/dist/sdk/workflow/archive-validation.js +1 -1
  143. package/dist/sdk/workflow/clone-workflow.js +1 -1
  144. package/dist/sdk/workflow/index.js +1 -1
  145. package/dist/sdk/workflow/pull-workflow.js +1 -1
  146. package/dist/sdk/workflow/push-workflow.js +1 -1
  147. package/dist/sdk/workflow/tdx-config.js +1 -1
  148. package/dist/sdk/workflow/workflow-utils.js +1 -1
  149. package/dist/test-utils/command-runner.js +1 -1
  150. package/dist/test-utils/factories.js +1 -1
  151. package/dist/test-utils/fixtures.js +1 -1
  152. package/dist/test-utils/http-mock.js +1 -1
  153. package/dist/test-utils/index.js +1 -1
  154. package/dist/utils/async.js +1 -1
  155. package/dist/utils/colors.js +1 -1
  156. package/dist/utils/diff.js +1 -1
  157. package/dist/utils/file-permissions.js +1 -1
  158. package/dist/utils/global-cache.js +1 -1
  159. package/dist/utils/json-loader.js +1 -1
  160. package/dist/utils/local-cache.js +1 -1
  161. package/dist/utils/logger/formatters/default-formatter.js +1 -1
  162. package/dist/utils/logger/formatters/index.js +1 -1
  163. package/dist/utils/logger/handlers/console-handler.js +1 -1
  164. package/dist/utils/logger/handlers/file-handler.js +1 -1
  165. package/dist/utils/logger/handlers/index.js +1 -1
  166. package/dist/utils/logger/handlers/null-handler.js +1 -1
  167. package/dist/utils/logger/index.js +1 -1
  168. package/dist/utils/logger/logger.js +1 -1
  169. package/dist/utils/logger/types.js +1 -1
  170. package/dist/utils/option-validation.js +1 -1
  171. package/dist/utils/process.js +1 -1
  172. package/dist/utils/prompt.js +1 -1
  173. package/dist/utils/spinner.js +1 -1
  174. package/dist/utils/sse-parser.js +1 -1
  175. package/dist/utils/string-utils.js +1 -1
  176. package/dist/utils/table-ref-parser.js +1 -1
  177. package/dist/utils/tdx-logger.js +1 -1
  178. package/dist/utils/version-check.js +1 -1
  179. package/package.json +1 -1
@@ -1 +1 @@
1
- const a36_0x3838a6=a36_0x30a6;function a36_0x2879(){const _0x4a7e0f=['error','✔\x20Updated\x20segment\x20\x27','Resolving\x20folder\x20\x27','execute','7127540yfpJDo','2923626kjVjBG','type','resolvePathToResource','segmentPath','\x20\x20tdx\x20segment\x20update\x20\x22My\x20Audience/High\x20Value\x22\x20--description\x20\x22...\x22','segment','7tvxHiS','updateSegmentById','includes','Resolved\x20relative\x20path\x20to:\x20','886756NBNiSZ','Parent\x20ID:\x20','Resolved\x20folder\x20ID:\x20','.\x20Only\x20child\x20segments\x20can\x20be\x20updated.','867654hXUiKS','4141850obhNOz','\x27...','⚠\x20Deprecation\x20warning:\x20`segment\x20update`\x20is\x20deprecated.','Error:\x20Cannot\x20update\x20','data','kind','resolveFolderId','segmentId','verbose','ruleFile','Updating\x20segment\x20\x27','1314QVHuDo','Resolving\x20path\x20\x27','\x20\x20tdx\x20segment\x20update\x20\x22High\x20Value\x22\x20--rule\x20\x27...\x27\x20\x20#\x20Relative\x20to\x20context','1446SEIIVi','Examples:','Use:\x20tdx\x20segment\x20update\x20<path_to_segment>\x20[options]','808QejYlC','\x20\x20Use\x20`tdx\x20sg\x20push`\x20with\x20YAML\x20files\x20instead.\x0a','yellow','description','segmentName','length','name','folder','segment:update','Resolved\x20type:\x20','6120gXeJUT','Error:\x20Segment\x20path\x20or\x20name\x20is\x20required'];a36_0x2879=function(){return _0x4a7e0f;};return a36_0x2879();}(function(_0x56f759,_0x2047f7){const _0x22814d=a36_0x30a6,_0x5334f4=_0x56f759();while(!![]){try{const _0x1317a9=-parseInt(_0x22814d(0x150))/0x1+-parseInt(_0x22814d(0x15c))/0x2*(-parseInt(_0x22814d(0x15f))/0x3)+-parseInt(_0x22814d(0x14c))/0x4+parseInt(_0x22814d(0x141))/0x5+-parseInt(_0x22814d(0x142))/0x6*(-parseInt(_0x22814d(0x148))/0x7)+-parseInt(_0x22814d(0x131))/0x8*(-parseInt(_0x22814d(0x13b))/0x9)+-parseInt(_0x22814d(0x151))/0xa;if(_0x1317a9===_0x2047f7)break;else _0x5334f4['push'](_0x5334f4['shift']());}catch(_0x31e6fb){_0x5334f4['push'](_0x5334f4['shift']());}}}(a36_0x2879,0xc1fed));import{BaseCommand}from'./command.js';import{handleSDKOutput}from'../core/command-output.js';import{withSpinner}from'../utils/spinner.js';import{loadJSONFromOptions}from'../utils/json-loader.js';import{SDKError,ErrorCode}from'../sdk/index.js';function a36_0x30a6(_0x19f029,_0x1f0af0){_0x19f029=_0x19f029-0x131;const _0x2879a3=a36_0x2879();let _0x30a6cc=_0x2879a3[_0x19f029];return _0x30a6cc;}import a36_0x10f9ae from'chalk';export class SegmentUpdateCommand extends BaseCommand{[a36_0x3838a6(0x137)]=a36_0x3838a6(0x139);[a36_0x3838a6(0x134)]='Update\x20existing\x20child\x20segment';async[a36_0x3838a6(0x140)](_0x576f0f){const _0x8508a9=a36_0x3838a6;console[_0x8508a9(0x13d)](a36_0x10f9ae[_0x8508a9(0x133)](_0x8508a9(0x153))),console[_0x8508a9(0x13d)](a36_0x10f9ae['yellow'](_0x8508a9(0x132)));const {options:_0xbac8e7,args:_0x3599aa,tdx:_0x29169c}=_0x576f0f,_0x1b2dea=_0xbac8e7;if(_0x3599aa[_0x8508a9(0x136)]===0x0)return console[_0x8508a9(0x13d)](_0x8508a9(0x13c)),console[_0x8508a9(0x13d)]('Usage:\x20tdx\x20segment\x20update\x20<path>\x20[options]'),console[_0x8508a9(0x13d)](_0x8508a9(0x160)),console['error'](_0x8508a9(0x146)),console[_0x8508a9(0x13d)](_0x8508a9(0x15e)),0x1;const _0x70a91e=_0x3599aa[0x0],_0x2b43ea=_0xbac8e7[_0x8508a9(0x145)];let _0x2f9490=_0x70a91e;_0x2b43ea&&!_0x70a91e[_0x8508a9(0x14a)]('/')&&(_0x2f9490=_0x2b43ea+'/'+_0x70a91e,_0x1b2dea[_0x8508a9(0x159)]&&console[_0x8508a9(0x13d)](_0x8508a9(0x14b)+_0x2f9490));const _0x2e3b6a=await withSpinner(_0x8508a9(0x15d)+_0x2f9490+'\x27...',()=>_0x29169c['segment'][_0x8508a9(0x144)](_0x2f9490),{'verbose':_0x1b2dea[_0x8508a9(0x159)]}),_0x4e253a=_0x2e3b6a[_0x8508a9(0x155)];_0x1b2dea['verbose']&&console[_0x8508a9(0x13d)](_0x8508a9(0x13a)+_0x4e253a['type']);if(_0x4e253a[_0x8508a9(0x143)]!==_0x8508a9(0x147))return console[_0x8508a9(0x13d)](_0x8508a9(0x154)+_0x4e253a['type']+_0x8508a9(0x14f)),console[_0x8508a9(0x13d)](_0x8508a9(0x161)),0x1;if(!_0x4e253a['segmentId'])throw new SDKError(ErrorCode['INTERNAL'],'Segment\x20ID\x20missing\x20from\x20resolved\x20path');const _0x1389dc=_0x4e253a['parentId'],_0x2a2c99=_0x4e253a[_0x8508a9(0x158)];_0x1b2dea['verbose']&&(console['error'](_0x8508a9(0x14d)+_0x1389dc),console[_0x8508a9(0x13d)]('Segment\x20ID:\x20'+_0x2a2c99));let _0x279dea;if(_0x1b2dea['folder']){const _0x3f2dd8=_0x1b2dea[_0x8508a9(0x138)],_0xfbe392=await withSpinner(_0x8508a9(0x13f)+_0x3f2dd8+_0x8508a9(0x152),()=>_0x29169c[_0x8508a9(0x147)][_0x8508a9(0x157)](_0x1389dc,_0x3f2dd8),{'verbose':_0x1b2dea['verbose']});_0x279dea=parseInt(_0xfbe392[_0x8508a9(0x155)],0xa),_0x1b2dea[_0x8508a9(0x159)]&&console['error'](_0x8508a9(0x14e)+_0x279dea);}const _0x19cc60=await loadJSONFromOptions(_0x1b2dea['rule'],_0x1b2dea[_0x8508a9(0x15a)]),_0x1140e5={'name':_0x1b2dea[_0x8508a9(0x137)],'description':_0x1b2dea[_0x8508a9(0x134)],'rule':_0x19cc60,'kind':_0x1b2dea[_0x8508a9(0x156)]!==undefined?parseInt(_0x1b2dea['kind'],0xa):undefined,'segmentFolderId':_0x279dea},_0x1c3aa3=await withSpinner(_0x8508a9(0x15b)+_0x4e253a[_0x8508a9(0x135)]+_0x8508a9(0x152),()=>_0x29169c[_0x8508a9(0x147)][_0x8508a9(0x149)](_0x1389dc,_0x2a2c99,_0x1140e5),{'verbose':_0x1b2dea['verbose']}),_0x3613d7=_0x1c3aa3[_0x8508a9(0x155)];return console['error'](_0x8508a9(0x13e)+_0x3613d7['name']+'\x27'),_0x2f9490!==_0x70a91e&&console[_0x8508a9(0x13d)]('\x20\x20\x20Path:\x20'+_0x2f9490),await handleSDKOutput([_0x3613d7],_0x1b2dea),0x0;}}
1
+ const a36_0x53047d=a36_0x583a;(function(_0xe5bf12,_0x18f09d){const _0x1f0887=a36_0x583a,_0x2c4123=_0xe5bf12();while(!![]){try{const _0x506fd7=-parseInt(_0x1f0887(0xc8))/0x1+-parseInt(_0x1f0887(0xc4))/0x2*(parseInt(_0x1f0887(0xc5))/0x3)+-parseInt(_0x1f0887(0xcb))/0x4+-parseInt(_0x1f0887(0xe1))/0x5+-parseInt(_0x1f0887(0xba))/0x6+parseInt(_0x1f0887(0xd9))/0x7*(parseInt(_0x1f0887(0xcd))/0x8)+parseInt(_0x1f0887(0xdd))/0x9*(parseInt(_0x1f0887(0xd6))/0xa);if(_0x506fd7===_0x18f09d)break;else _0x2c4123['push'](_0x2c4123['shift']());}catch(_0xa26227){_0x2c4123['push'](_0x2c4123['shift']());}}}(a36_0x1818,0x8fdd0));function a36_0x583a(_0x5b68b2,_0x2a5ebe){_0x5b68b2=_0x5b68b2-0xb7;const _0x18188b=a36_0x1818();let _0x583a91=_0x18188b[_0x5b68b2];return _0x583a91;}import{BaseCommand}from'./command.js';import{handleSDKOutput}from'../core/command-output.js';import{withSpinner}from'../utils/spinner.js';import{loadJSONFromOptions}from'../utils/json-loader.js';function a36_0x1818(){const _0x417ef1=['Examples:','\x20\x20tdx\x20segment\x20update\x20\x22My\x20Audience/High\x20Value\x22\x20--description\x20\x22...\x22','error','400hnVuNX','\x27...','Updating\x20segment\x20\x27','77ojePXt','INTERNAL','execute','✔\x20Updated\x20segment\x20\x27','793278VMCSVF','yellow','\x20\x20Use\x20`tdx\x20sg\x20push`\x20with\x20YAML\x20files\x20instead.\x0a','.\x20Only\x20child\x20segments\x20can\x20be\x20updated.','3610960CkYxzx','Resolved\x20folder\x20ID:\x20','Error:\x20Segment\x20path\x20or\x20name\x20is\x20required','Error:\x20Cannot\x20update\x20','resolveFolderId','3730758dLJady','includes','segmentPath','folder','description','type','data','kind','segment','segmentName','1979918ZfhCjC','3ErcaPP','verbose','name','905503coChIZ','\x20\x20\x20Path:\x20','Update\x20existing\x20child\x20segment','1950904ONiGsJ','segmentId','575096uTWgBw','updateSegmentById','parentId','Resolved\x20relative\x20path\x20to:\x20','Resolving\x20folder\x20\x27','Usage:\x20tdx\x20segment\x20update\x20<path>\x20[options]'];a36_0x1818=function(){return _0x417ef1;};return a36_0x1818();}import{SDKError,ErrorCode}from'../sdk/index.js';import a36_0x96df15 from'chalk';export class SegmentUpdateCommand extends BaseCommand{[a36_0x53047d(0xc7)]='segment:update';[a36_0x53047d(0xbe)]=a36_0x53047d(0xca);async[a36_0x53047d(0xdb)](_0x2d639b){const _0x23e1cd=a36_0x53047d;console[_0x23e1cd(0xd5)](a36_0x96df15[_0x23e1cd(0xde)]('⚠\x20Deprecation\x20warning:\x20`segment\x20update`\x20is\x20deprecated.')),console[_0x23e1cd(0xd5)](a36_0x96df15[_0x23e1cd(0xde)](_0x23e1cd(0xdf)));const {options:_0x1593e6,args:_0x135173,tdx:_0x3165ff}=_0x2d639b,_0x1e6a70=_0x1593e6;if(_0x135173['length']===0x0)return console[_0x23e1cd(0xd5)](_0x23e1cd(0xb7)),console[_0x23e1cd(0xd5)](_0x23e1cd(0xd2)),console[_0x23e1cd(0xd5)](_0x23e1cd(0xd3)),console[_0x23e1cd(0xd5)](_0x23e1cd(0xd4)),console['error']('\x20\x20tdx\x20segment\x20update\x20\x22High\x20Value\x22\x20--rule\x20\x27...\x27\x20\x20#\x20Relative\x20to\x20context'),0x1;const _0x10b334=_0x135173[0x0],_0x7ba835=_0x1593e6[_0x23e1cd(0xbc)];let _0x48328d=_0x10b334;_0x7ba835&&!_0x10b334[_0x23e1cd(0xbb)]('/')&&(_0x48328d=_0x7ba835+'/'+_0x10b334,_0x1e6a70[_0x23e1cd(0xc6)]&&console['error'](_0x23e1cd(0xd0)+_0x48328d));const _0x1cc6fa=await withSpinner('Resolving\x20path\x20\x27'+_0x48328d+_0x23e1cd(0xd7),()=>_0x3165ff[_0x23e1cd(0xc2)]['resolvePathToResource'](_0x48328d),{'verbose':_0x1e6a70['verbose']}),_0x3fff35=_0x1cc6fa[_0x23e1cd(0xc0)];_0x1e6a70[_0x23e1cd(0xc6)]&&console['error']('Resolved\x20type:\x20'+_0x3fff35[_0x23e1cd(0xbf)]);if(_0x3fff35['type']!=='segment')return console[_0x23e1cd(0xd5)](_0x23e1cd(0xb8)+_0x3fff35['type']+_0x23e1cd(0xe0)),console['error']('Use:\x20tdx\x20segment\x20update\x20<path_to_segment>\x20[options]'),0x1;if(!_0x3fff35['segmentId'])throw new SDKError(ErrorCode[_0x23e1cd(0xda)],'Segment\x20ID\x20missing\x20from\x20resolved\x20path');const _0x2eb830=_0x3fff35[_0x23e1cd(0xcf)],_0x2a2649=_0x3fff35[_0x23e1cd(0xcc)];_0x1e6a70['verbose']&&(console[_0x23e1cd(0xd5)]('Parent\x20ID:\x20'+_0x2eb830),console[_0x23e1cd(0xd5)]('Segment\x20ID:\x20'+_0x2a2649));let _0x4b1b5f;if(_0x1e6a70[_0x23e1cd(0xbd)]){const _0x911e4=_0x1e6a70['folder'],_0x35ba7c=await withSpinner(_0x23e1cd(0xd1)+_0x911e4+_0x23e1cd(0xd7),()=>_0x3165ff[_0x23e1cd(0xc2)][_0x23e1cd(0xb9)](_0x2eb830,_0x911e4),{'verbose':_0x1e6a70[_0x23e1cd(0xc6)]});_0x4b1b5f=parseInt(_0x35ba7c[_0x23e1cd(0xc0)],0xa),_0x1e6a70[_0x23e1cd(0xc6)]&&console[_0x23e1cd(0xd5)](_0x23e1cd(0xe2)+_0x4b1b5f);}const _0x528eb7=await loadJSONFromOptions(_0x1e6a70['rule'],_0x1e6a70['ruleFile']),_0x10e97e={'name':_0x1e6a70[_0x23e1cd(0xc7)],'description':_0x1e6a70[_0x23e1cd(0xbe)],'rule':_0x528eb7,'kind':_0x1e6a70[_0x23e1cd(0xc1)]!==undefined?parseInt(_0x1e6a70['kind'],0xa):undefined,'segmentFolderId':_0x4b1b5f},_0x1a386e=await withSpinner(_0x23e1cd(0xd8)+_0x3fff35[_0x23e1cd(0xc3)]+_0x23e1cd(0xd7),()=>_0x3165ff[_0x23e1cd(0xc2)][_0x23e1cd(0xce)](_0x2eb830,_0x2a2649,_0x10e97e),{'verbose':_0x1e6a70[_0x23e1cd(0xc6)]}),_0x1029a4=_0x1a386e['data'];return console[_0x23e1cd(0xd5)](_0x23e1cd(0xdc)+_0x1029a4[_0x23e1cd(0xc7)]+'\x27'),_0x48328d!==_0x10b334&&console[_0x23e1cd(0xd5)](_0x23e1cd(0xc9)+_0x48328d),await handleSDKOutput([_0x1029a4],_0x1e6a70),0x0;}}
@@ -1 +1 @@
1
- const a37_0x311eeb=a37_0xc925;(function(_0x69da48,_0x3e6b54){const _0x49e417=a37_0xc925,_0x390c86=_0x69da48();while(!![]){try{const _0x16cb46=parseInt(_0x49e417(0x1ad))/0x1+parseInt(_0x49e417(0x199))/0x2*(-parseInt(_0x49e417(0x1a1))/0x3)+parseInt(_0x49e417(0x1a5))/0x4+parseInt(_0x49e417(0x19e))/0x5*(-parseInt(_0x49e417(0x1bc))/0x6)+-parseInt(_0x49e417(0x1ac))/0x7+-parseInt(_0x49e417(0x1c0))/0x8+parseInt(_0x49e417(0x1af))/0x9;if(_0x16cb46===_0x3e6b54)break;else _0x390c86['push'](_0x390c86['shift']());}catch(_0x8a5762){_0x390c86['push'](_0x390c86['shift']());}}}(a37_0xef02,0xd96fe));import{existsSync,statSync}from'fs';function a37_0xc925(_0x28b7c7,_0x164293){_0x28b7c7=_0x28b7c7-0x194;const _0xef028a=a37_0xef02();let _0xc925da=_0xef028a[_0x28b7c7];return _0xc925da;}import a37_0x53182a from'chalk';function a37_0xef02(){const _0x17faa7=['type','12335uREIHW','data','log','18Upfehq','folderId','\x27...','fullPath','568936QvTqhp','Examples:','cyan','✔\x20Context\x20set\x20to:\x20','\x20\x20tdx\x20segment\x20use\x20..\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Go\x20to\x20parent','error','Error:\x20No\x20context\x20set.\x20Cannot\x20use\x20relative\x20path.','1959132BvpLSJ','171448fXfsIi','Set\x20current\x20segment/folder\x20context\x20for\x20navigation','31281795iiNcYS','join','parentName','Target\x20path:\x20','segment','session','\x20\x20tdx\x20segment\x20use\x20\x22My\x20Audience\x22','length','verbose','Usage:\x20tdx\x20segment\x20use\x20<path>','site','✔\x20Context\x20cleared.\x20Back\x20to\x20root.','red','1038fuHIPS','description','Use\x20\x22tdx\x20segments\x22\x20to\x20list\x20contents\x20in\x20this\x20context','Use\x20\x22tdx\x20use\x22\x20to\x20see\x20all\x20context\x20parameters','5930592IgBdJt','Site:\x20','dim','segment:use','slice','segmentPath','Use\x20an\x20absolute\x20path\x20or\x20set\x20context\x20with:\x20tdx\x20segment\x20use\x20<parent_name>','Tip:\x20Run\x20`tdx\x20sg\x20pull\x20<parent_name>`\x20first\x20to\x20create\x20the\x20folder\x20structure','config','Parent\x20ID:\x20','split','Error:\x20Cannot\x20set\x20context\x20to\x20a\x20segment.','folderPath','parent_segment','Error:\x20Path\x20is\x20required\x0a','\x20\x20tdx\x20segment\x20use\x20/\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Clear\x20context','Resolving\x20path\x20\x27','isDirectory','green','name','483608Hyhwpq','Resolved\x20path\x20type:\x20','Error:\x20No\x20tdx.json\x20found\x20in\x20or\x20above:\x20','execute'];a37_0xef02=function(){return _0x17faa7;};return a37_0xef02();}import{BaseCommand}from'./command.js';import{saveSessionContext}from'../core/session.js';import{withSpinner}from'../utils/spinner.js';import{parsePath,normalizePath}from'../sdk/segment/segment-path-parser.js';import{findTdxConfig}from'../sdk/segment/tdx-config.js';export class SegmentUseCommand extends BaseCommand{[a37_0x311eeb(0x198)]=a37_0x311eeb(0x1c3);[a37_0x311eeb(0x1bd)]=a37_0x311eeb(0x1ae);async[a37_0x311eeb(0x19c)](_0x3e5255){const _0x46387c=a37_0x311eeb,{options:_0x4a8f57,args:_0x21b601,tdx:_0x795b1d}=_0x3e5255;if(_0x21b601[_0x46387c(0x1b6)]===0x0)return console['error'](a37_0x53182a['red'](_0x46387c(0x1ce))),console[_0x46387c(0x1aa)](_0x46387c(0x1b8)),console[_0x46387c(0x1aa)](_0x46387c(0x1a6)),console[_0x46387c(0x1aa)](_0x46387c(0x1b5)),console['error']('\x20\x20tdx\x20segment\x20use\x20\x22My\x20Audience/Marketing\x22'),console['error'](_0x46387c(0x194)),console[_0x46387c(0x1aa)](_0x46387c(0x1a9)),0x1;const _0xbb6a7b=_0x21b601[0x0],_0x2f0563=_0x4a8f57[_0x46387c(0x1b4)];try{if(_0xbb6a7b==='/')return saveSessionContext({'segment_path':undefined},_0x2f0563),console[_0x46387c(0x1a0)](a37_0x53182a[_0x46387c(0x197)]('✔\x20Context\x20cleared.\x20Back\x20to\x20root.')),0x0;if(existsSync(_0xbb6a7b)&&statSync(_0xbb6a7b)[_0x46387c(0x196)]()){let _0x561e8f;try{_0x561e8f=findTdxConfig(_0xbb6a7b);}catch{return console[_0x46387c(0x1aa)](a37_0x53182a['red'](_0x46387c(0x19b)+_0xbb6a7b)),console[_0x46387c(0x1aa)](a37_0x53182a['cyan'](_0x46387c(0x1c7))),0x1;}const _0x545f69=_0x561e8f[_0x46387c(0x1c8)][_0x46387c(0x1cd)];return saveSessionContext({'segment_path':_0x545f69,'parent_segment':_0x545f69},_0x2f0563),console[_0x46387c(0x1a0)](a37_0x53182a[_0x46387c(0x197)](_0x46387c(0x1a8)+a37_0x53182a[_0x46387c(0x1a7)](_0x545f69))),0x0;}const _0x12470b=_0x4a8f57[_0x46387c(0x1c5)];let _0xa3f91e=_0xbb6a7b;const _0x127263=parsePath(_0xbb6a7b);if(!_0x127263['isAbsolute']){if(!_0x12470b)return console['error'](a37_0x53182a[_0x46387c(0x1bb)](_0x46387c(0x1ab))),console[_0x46387c(0x1aa)](a37_0x53182a[_0x46387c(0x1a7)](_0x46387c(0x1c6))),0x1;if(_0xbb6a7b==='..'){const _0x7030aa=_0x12470b[_0x46387c(0x1ca)]('/')[_0x46387c(0x1c4)](0x0,-0x1)[_0x46387c(0x1b0)]('/');_0xa3f91e=_0x7030aa||'/';}else _0xbb6a7b==='.'?_0xa3f91e=_0x12470b:_0xa3f91e=_0x12470b+'/'+_0xbb6a7b;_0x4a8f57[_0x46387c(0x1b7)]&&console[_0x46387c(0x1aa)]('Resolved\x20relative\x20path\x20to:\x20'+_0xa3f91e);}if(_0xa3f91e==='/'||_0xa3f91e==='')return saveSessionContext({'segment_path':undefined},_0x2f0563),console[_0x46387c(0x1a0)](a37_0x53182a['green'](_0x46387c(0x1ba))),0x0;_0xa3f91e=normalizePath(_0xa3f91e);const _0x1d287d=parsePath(_0xa3f91e)['segments'];if(_0x1d287d['length']===0x0)return saveSessionContext({'segment_path':undefined},_0x2f0563),console[_0x46387c(0x1a0)](a37_0x53182a[_0x46387c(0x197)]('✔\x20Context\x20cleared.\x20Back\x20to\x20root.')),0x0;_0x4a8f57[_0x46387c(0x1b7)]&&(console[_0x46387c(0x1aa)](_0x46387c(0x1c1)+_0x4a8f57[_0x46387c(0x1b9)]),console[_0x46387c(0x1aa)](_0x46387c(0x1b2)+_0xa3f91e));const _0x472727=await withSpinner(_0x46387c(0x195)+_0xa3f91e+_0x46387c(0x1a3),()=>_0x795b1d['segment']['resolvePathToResource'](_0xa3f91e),{'verbose':_0x4a8f57['verbose']}),_0x11dc00=_0x472727[_0x46387c(0x19f)];_0x4a8f57[_0x46387c(0x1b7)]&&(console['error'](_0x46387c(0x19a)+_0x11dc00[_0x46387c(0x19d)]),console[_0x46387c(0x1aa)](_0x46387c(0x1c9)+_0x11dc00['parentId']),_0x11dc00[_0x46387c(0x1a2)]&&console[_0x46387c(0x1aa)]('Folder\x20ID:\x20'+_0x11dc00[_0x46387c(0x1a2)]));if(_0x11dc00[_0x46387c(0x19d)]===_0x46387c(0x1b3))return console[_0x46387c(0x1aa)](a37_0x53182a['red'](_0x46387c(0x1cb))),console[_0x46387c(0x1aa)]('Context\x20can\x20only\x20be\x20set\x20to\x20a\x20parent\x20segment\x20or\x20folder.'),console[_0x46387c(0x1aa)](a37_0x53182a[_0x46387c(0x1a7)]('Use:\x20tdx\x20segment\x20use\x20'+_0x11dc00[_0x46387c(0x1b1)]+(_0x11dc00[_0x46387c(0x1cc)]?'/'+_0x11dc00['folderPath']['join']('/'):''))),0x1;return saveSessionContext({'segment_path':_0x11dc00[_0x46387c(0x1a4)],'parent_segment':_0x11dc00[_0x46387c(0x1b1)]},_0x2f0563),console[_0x46387c(0x1a0)](a37_0x53182a[_0x46387c(0x197)](_0x46387c(0x1a8)+a37_0x53182a[_0x46387c(0x1a7)](_0x11dc00[_0x46387c(0x1a4)]))),_0x4a8f57[_0x46387c(0x1b7)]&&(console['error'](a37_0x53182a['dim'](_0x46387c(0x1be))),console['error'](a37_0x53182a[_0x46387c(0x1c2)](_0x46387c(0x1bf)))),0x0;}catch(_0x384976){throw _0x384976;}}}
1
+ const a37_0x1f3307=a37_0x1a41;(function(_0x2e902c,_0x4d287e){const _0x145744=a37_0x1a41,_0x1a5b0c=_0x2e902c();while(!![]){try{const _0x14d773=parseInt(_0x145744(0x13d))/0x1*(parseInt(_0x145744(0x171))/0x2)+-parseInt(_0x145744(0x168))/0x3+-parseInt(_0x145744(0x163))/0x4+parseInt(_0x145744(0x174))/0x5+-parseInt(_0x145744(0x145))/0x6*(parseInt(_0x145744(0x152))/0x7)+-parseInt(_0x145744(0x14f))/0x8*(parseInt(_0x145744(0x162))/0x9)+parseInt(_0x145744(0x148))/0xa;if(_0x14d773===_0x4d287e)break;else _0x1a5b0c['push'](_0x1a5b0c['shift']());}catch(_0x17ce6f){_0x1a5b0c['push'](_0x1a5b0c['shift']());}}}(a37_0x4433,0xf0e61));import{existsSync,statSync}from'fs';import a37_0x1bfb17 from'chalk';import{BaseCommand}from'./command.js';function a37_0x4433(){const _0x38dd26=['data','Use\x20an\x20absolute\x20path\x20or\x20set\x20context\x20with:\x20tdx\x20segment\x20use\x20<parent_name>','site','length','description','60322MGTXAN','red','log','4224125SdkQib','\x27...','Use\x20\x22tdx\x20use\x22\x20to\x20see\x20all\x20context\x20parameters','\x20\x20tdx\x20segment\x20use\x20/\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Clear\x20context','resolvePathToResource','29BSKMjI','Error:\x20No\x20tdx.json\x20found\x20in\x20or\x20above:\x20','segmentPath','error','cyan','\x20\x20tdx\x20segment\x20use\x20\x22My\x20Audience/Marketing\x22','Resolving\x20path\x20\x27','verbose','600630uRkcVb','Site:\x20','isDirectory','27662380UXrCUM','folderPath','Examples:','segment','parentName','\x20\x20tdx\x20segment\x20use\x20\x22My\x20Audience\x22','Resolved\x20path\x20type:\x20','4554840lJrjvW','join','green','112vporjI','parent_segment','slice','execute','dim','Use\x20\x22tdx\x20segments\x22\x20to\x20list\x20contents\x20in\x20this\x20context','split','isAbsolute','folderId','segments','✔\x20Context\x20set\x20to:\x20','segment:use','Parent\x20ID:\x20','type','Folder\x20ID:\x20','fullPath','9gumfYY','717364tvJlfV','Set\x20current\x20segment/folder\x20context\x20for\x20navigation','session','✔\x20Context\x20cleared.\x20Back\x20to\x20root.','Use:\x20tdx\x20segment\x20use\x20','3445905QuXXQj','Error:\x20Cannot\x20set\x20context\x20to\x20a\x20segment.','Context\x20can\x20only\x20be\x20set\x20to\x20a\x20parent\x20segment\x20or\x20folder.','name'];a37_0x4433=function(){return _0x38dd26;};return a37_0x4433();}import{saveSessionContext}from'../core/session.js';import{withSpinner}from'../utils/spinner.js';function a37_0x1a41(_0x23922f,_0x132a89){_0x23922f=_0x23922f-0x13d;const _0x4433d0=a37_0x4433();let _0x1a4148=_0x4433d0[_0x23922f];return _0x1a4148;}import{parsePath,normalizePath}from'../sdk/segment/segment-path-parser.js';import{findTdxConfig}from'../sdk/segment/tdx-config.js';export class SegmentUseCommand extends BaseCommand{[a37_0x1f3307(0x16b)]=a37_0x1f3307(0x15d);[a37_0x1f3307(0x170)]=a37_0x1f3307(0x164);async[a37_0x1f3307(0x155)](_0x179d83){const _0x266648=a37_0x1f3307,{options:_0x568099,args:_0x1b5ef7,tdx:_0x3de53f}=_0x179d83;if(_0x1b5ef7[_0x266648(0x16f)]===0x0)return console[_0x266648(0x140)](a37_0x1bfb17[_0x266648(0x172)]('Error:\x20Path\x20is\x20required\x0a')),console[_0x266648(0x140)]('Usage:\x20tdx\x20segment\x20use\x20<path>'),console[_0x266648(0x140)](_0x266648(0x14a)),console['error'](_0x266648(0x14d)),console[_0x266648(0x140)](_0x266648(0x142)),console[_0x266648(0x140)](_0x266648(0x177)),console[_0x266648(0x140)]('\x20\x20tdx\x20segment\x20use\x20..\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Go\x20to\x20parent'),0x1;const _0x180d5e=_0x1b5ef7[0x0],_0x641e63=_0x568099[_0x266648(0x165)];try{if(_0x180d5e==='/')return saveSessionContext({'segment_path':undefined},_0x641e63),console['log'](a37_0x1bfb17[_0x266648(0x151)](_0x266648(0x166))),0x0;if(existsSync(_0x180d5e)&&statSync(_0x180d5e)[_0x266648(0x147)]()){let _0x472ea1;try{_0x472ea1=findTdxConfig(_0x180d5e);}catch{return console['error'](a37_0x1bfb17[_0x266648(0x172)](_0x266648(0x13e)+_0x180d5e)),console[_0x266648(0x140)](a37_0x1bfb17['cyan']('Tip:\x20Run\x20`tdx\x20sg\x20pull\x20<parent_name>`\x20first\x20to\x20create\x20the\x20folder\x20structure')),0x1;}const _0x45e316=_0x472ea1['config'][_0x266648(0x153)];return saveSessionContext({'segment_path':_0x45e316,'parent_segment':_0x45e316},_0x641e63),console[_0x266648(0x173)](a37_0x1bfb17[_0x266648(0x151)](_0x266648(0x15c)+a37_0x1bfb17[_0x266648(0x141)](_0x45e316))),0x0;}const _0x26901e=_0x568099[_0x266648(0x13f)];let _0x1a068d=_0x180d5e;const _0x271e01=parsePath(_0x180d5e);if(!_0x271e01[_0x266648(0x159)]){if(!_0x26901e)return console[_0x266648(0x140)](a37_0x1bfb17['red']('Error:\x20No\x20context\x20set.\x20Cannot\x20use\x20relative\x20path.')),console[_0x266648(0x140)](a37_0x1bfb17[_0x266648(0x141)](_0x266648(0x16d))),0x1;if(_0x180d5e==='..'){const _0x173ea6=_0x26901e[_0x266648(0x158)]('/')[_0x266648(0x154)](0x0,-0x1)[_0x266648(0x150)]('/');_0x1a068d=_0x173ea6||'/';}else _0x180d5e==='.'?_0x1a068d=_0x26901e:_0x1a068d=_0x26901e+'/'+_0x180d5e;_0x568099['verbose']&&console['error']('Resolved\x20relative\x20path\x20to:\x20'+_0x1a068d);}if(_0x1a068d==='/'||_0x1a068d==='')return saveSessionContext({'segment_path':undefined},_0x641e63),console['log'](a37_0x1bfb17['green'](_0x266648(0x166))),0x0;_0x1a068d=normalizePath(_0x1a068d);const _0x482105=parsePath(_0x1a068d)[_0x266648(0x15b)];if(_0x482105[_0x266648(0x16f)]===0x0)return saveSessionContext({'segment_path':undefined},_0x641e63),console[_0x266648(0x173)](a37_0x1bfb17[_0x266648(0x151)](_0x266648(0x166))),0x0;_0x568099[_0x266648(0x144)]&&(console[_0x266648(0x140)](_0x266648(0x146)+_0x568099[_0x266648(0x16e)]),console[_0x266648(0x140)]('Target\x20path:\x20'+_0x1a068d));const _0x74aaf7=await withSpinner(_0x266648(0x143)+_0x1a068d+_0x266648(0x175),()=>_0x3de53f[_0x266648(0x14b)][_0x266648(0x178)](_0x1a068d),{'verbose':_0x568099[_0x266648(0x144)]}),_0x457ff0=_0x74aaf7[_0x266648(0x16c)];_0x568099[_0x266648(0x144)]&&(console[_0x266648(0x140)](_0x266648(0x14e)+_0x457ff0[_0x266648(0x15f)]),console[_0x266648(0x140)](_0x266648(0x15e)+_0x457ff0['parentId']),_0x457ff0[_0x266648(0x15a)]&&console[_0x266648(0x140)](_0x266648(0x160)+_0x457ff0[_0x266648(0x15a)]));if(_0x457ff0[_0x266648(0x15f)]===_0x266648(0x14b))return console[_0x266648(0x140)](a37_0x1bfb17[_0x266648(0x172)](_0x266648(0x169))),console['error'](_0x266648(0x16a)),console['error'](a37_0x1bfb17[_0x266648(0x141)](_0x266648(0x167)+_0x457ff0[_0x266648(0x14c)]+(_0x457ff0[_0x266648(0x149)]?'/'+_0x457ff0[_0x266648(0x149)][_0x266648(0x150)]('/'):''))),0x1;return saveSessionContext({'segment_path':_0x457ff0[_0x266648(0x161)],'parent_segment':_0x457ff0['parentName']},_0x641e63),console['log'](a37_0x1bfb17[_0x266648(0x151)](_0x266648(0x15c)+a37_0x1bfb17[_0x266648(0x141)](_0x457ff0[_0x266648(0x161)]))),_0x568099['verbose']&&(console['error'](a37_0x1bfb17[_0x266648(0x156)](_0x266648(0x157))),console[_0x266648(0x140)](a37_0x1bfb17[_0x266648(0x156)](_0x266648(0x176)))),0x0;}catch(_0x37b4c4){throw _0x37b4c4;}}}
@@ -1 +1 @@
1
- const a38_0x2422ec=a38_0x1d35;(function(_0x58044c,_0x313277){const _0x359978=a38_0x1d35,_0x1dd323=_0x58044c();while(!![]){try{const _0x1836a4=parseInt(_0x359978(0x100))/0x1*(-parseInt(_0x359978(0xfc))/0x2)+parseInt(_0x359978(0xe5))/0x3*(parseInt(_0x359978(0xe8))/0x4)+parseInt(_0x359978(0x103))/0x5+-parseInt(_0x359978(0xd7))/0x6+parseInt(_0x359978(0xff))/0x7*(-parseInt(_0x359978(0xf5))/0x8)+parseInt(_0x359978(0xe3))/0x9*(parseInt(_0x359978(0xda))/0xa)+parseInt(_0x359978(0xe2))/0xb;if(_0x1836a4===_0x313277)break;else _0x1dd323['push'](_0x1dd323['shift']());}catch(_0x168d56){_0x1dd323['push'](_0x1dd323['shift']());}}}(a38_0x5f0e,0x3a803));import{BaseCommand}from'./command.js';import{resolveTarget,isSuccessfulResolution}from'../sdk/segment/target-resolution.js';import{findYamlFiles}from'../sdk/segment/file-discovery.js';function a38_0x5f0e(){const _0x285859=['\x20warning(s)','963805Rbysjd','Error:\x20Directory\x20not\x20found:\x20','file','errorCode','type','\x20\x20\x20\x20\x20\x20\x20tdx\x20sg\x20validate\x20.\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Validate\x20current\x20directory','.yaml','helpText','message','log','green','\x20file(s)\x20valid','Error:\x20','848226qfIEed','description','Error:\x20File\x20must\x20have\x20.yml\x20or\x20.yaml\x20extension:\x20','221830dEmSWr','parent_segment\x20is\x20not\x20set.\x20Use\x20`tdx\x20sg\x20use\x20<parent_name>`\x20to\x20set\x20it.\x0a','error','warningCount','valid','no_parent','execute','Validation\x20failed:\x20','4101460aAxmUj','189OUSkvj','\x20warning(s)\x20found','9201QahpzL','.yml','✔\x20All\x20','92fEpWOh','red','yellow','Error:\x20No\x20YAML\x20files\x20found\x20in\x20','\x20valid','warnings','errors','validCount','cwd','endsWith','verbose','name','\x20error(s)','8enCmjp','hasErrors','dim','):\x20','\x20file(s)\x20with\x20errors,\x20','segment:validate','Validate\x20segment\x20and\x20journey\x20YAML\x20files','40094PHADvj','length','Usage:\x20tdx\x20sg\x20validate\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Validate\x20all\x20(requires\x20context)','2661512QUsVWu','17OcvPxj','targetDir'];a38_0x5f0e=function(){return _0x285859;};return a38_0x5f0e();}import{existsSync}from'fs';function a38_0x1d35(_0x549894,_0x493309){_0x549894=_0x549894-0xd1;const _0x5f0e42=a38_0x5f0e();let _0x1d35da=_0x5f0e42[_0x549894];return _0x1d35da;}import a38_0x13a42b from'chalk';import{formatValidationResult}from'../sdk/segment/yaml-validator.js';import{validateYamlFiles,isValidationResult,calculateSummary}from'../sdk/segment/validate-files.js';export class SegmentValidateCommand extends BaseCommand{[a38_0x2422ec(0xf3)]=a38_0x2422ec(0xfa);[a38_0x2422ec(0xd8)]=a38_0x2422ec(0xfb);async[a38_0x2422ec(0xe0)](_0x121666){const _0x1527ff=a38_0x2422ec,{options:_0x444c81,args:_0x2fe88d}=_0x121666,_0x508fbd=_0x444c81,_0x36b0eb=await resolveTarget({'arg':_0x2fe88d[0x0],'contextParent':_0x444c81['parentSegment'],'cwd':process[_0x1527ff(0xf0)]()});if(!isSuccessfulResolution(_0x36b0eb))return _0x36b0eb[_0x1527ff(0x106)]===_0x1527ff(0xdf)?(console['error'](a38_0x13a42b[_0x1527ff(0xea)](_0x1527ff(0xdb))),console[_0x1527ff(0xdc)](_0x1527ff(0xfe)),console[_0x1527ff(0xdc)](_0x1527ff(0x108)),console[_0x1527ff(0xdc)]('\x20\x20\x20\x20\x20\x20\x20tdx\x20sg\x20validate\x20<file_path>\x20\x20#\x20Validate\x20specific\x20file')):(console['error'](a38_0x13a42b[_0x1527ff(0xe9)](_0x1527ff(0xd6)+_0x36b0eb[_0x1527ff(0xd2)]+'\x0a')),_0x36b0eb[_0x1527ff(0xd1)]&&console[_0x1527ff(0xdc)](a38_0x13a42b['cyan'](_0x36b0eb[_0x1527ff(0xd1)]))),0x1;const _0x35c282=_0x36b0eb[_0x1527ff(0x101)],_0xe7e025=_0x36b0eb[_0x1527ff(0x107)]===_0x1527ff(0x105)?_0x36b0eb['filePath']:undefined;if(!_0xe7e025&&!existsSync(_0x35c282))return console['error'](a38_0x13a42b[_0x1527ff(0xe9)](_0x1527ff(0x104)+_0x35c282+'\x0a')),0x1;let _0x1c1f7f;if(_0xe7e025){if(!_0xe7e025[_0x1527ff(0xf1)](_0x1527ff(0xe6))&&!_0xe7e025[_0x1527ff(0xf1)](_0x1527ff(0x109)))return console['error'](a38_0x13a42b[_0x1527ff(0xe9)](_0x1527ff(0xd9)+_0xe7e025+'\x0a')),0x1;_0x1c1f7f=[_0xe7e025];}else _0x1c1f7f=findYamlFiles(_0x35c282);if(_0x1c1f7f[_0x1527ff(0xfd)]===0x0)return console[_0x1527ff(0xdc)](a38_0x13a42b['red'](_0x1527ff(0xeb)+_0x35c282+'\x0a')),0x1;const _0x41cd4b=validateYamlFiles(_0x1c1f7f,_0x35c282),_0x28de85=calculateSummary(_0x41cd4b);for(const _0x5342f4 of _0x41cd4b){if(!isValidationResult(_0x5342f4))continue;const {relativePath:_0x37c5c5,source:_0x537aee,result:_0x3bae4b,fileType:_0x1c873b}=_0x5342f4,_0x5b2108=_0x1c873b;if(_0x3bae4b[_0x1527ff(0xde)]&&_0x3bae4b['warnings']['length']===0x0)_0x508fbd[_0x1527ff(0xf2)]&&console[_0x1527ff(0xd3)](a38_0x13a42b[_0x1527ff(0xd4)]('✔\x20'+_0x37c5c5)+a38_0x13a42b[_0x1527ff(0xf7)]('\x20('+_0x5b2108+')'));else _0x3bae4b[_0x1527ff(0xde)]?(console[_0x1527ff(0xd3)](a38_0x13a42b[_0x1527ff(0xea)]('⚠\x20'+_0x37c5c5)+a38_0x13a42b[_0x1527ff(0xf7)]('\x20('+_0x5b2108+_0x1527ff(0xf8)+_0x3bae4b[_0x1527ff(0xed)][_0x1527ff(0xfd)]+_0x1527ff(0x102))),console[_0x1527ff(0xd3)](formatValidationResult(_0x3bae4b,_0x537aee,_0x37c5c5))):(console[_0x1527ff(0xd3)](a38_0x13a42b[_0x1527ff(0xe9)]('✖\x20'+_0x37c5c5)+a38_0x13a42b[_0x1527ff(0xf7)]('\x20('+_0x5b2108+_0x1527ff(0xf8)+_0x3bae4b[_0x1527ff(0xee)][_0x1527ff(0xfd)]+_0x1527ff(0xf4))),console['log'](formatValidationResult(_0x3bae4b,_0x537aee,_0x37c5c5)));}return console['log'](''),_0x28de85[_0x1527ff(0xf6)]?(console[_0x1527ff(0xd3)](a38_0x13a42b[_0x1527ff(0xe9)](_0x1527ff(0xe1)+_0x28de85['invalidCount']+_0x1527ff(0xf9)+_0x28de85[_0x1527ff(0xef)]+_0x1527ff(0xec))),_0x28de85['warningCount']>0x0&&console[_0x1527ff(0xd3)](a38_0x13a42b[_0x1527ff(0xea)](_0x28de85[_0x1527ff(0xdd)]+_0x1527ff(0xe4))),0x1):(console[_0x1527ff(0xd3)](a38_0x13a42b[_0x1527ff(0xd4)](_0x1527ff(0xe7)+_0x28de85[_0x1527ff(0xef)]+_0x1527ff(0xd5))),_0x28de85['warningCount']>0x0&&console['log'](a38_0x13a42b[_0x1527ff(0xea)](_0x28de85[_0x1527ff(0xdd)]+_0x1527ff(0xe4))),0x0);}}
1
+ const a38_0x1d5bf4=a38_0x30f4;(function(_0x4d8c68,_0x165a98){const _0x2de0d7=a38_0x30f4,_0x4915be=_0x4d8c68();while(!![]){try{const _0x434c47=-parseInt(_0x2de0d7(0x124))/0x1+-parseInt(_0x2de0d7(0x143))/0x2*(-parseInt(_0x2de0d7(0x11c))/0x3)+-parseInt(_0x2de0d7(0x12f))/0x4+parseInt(_0x2de0d7(0x137))/0x5+parseInt(_0x2de0d7(0x11d))/0x6*(parseInt(_0x2de0d7(0x118))/0x7)+parseInt(_0x2de0d7(0x13b))/0x8+parseInt(_0x2de0d7(0x126))/0x9;if(_0x434c47===_0x165a98)break;else _0x4915be['push'](_0x4915be['shift']());}catch(_0x82e95){_0x4915be['push'](_0x4915be['shift']());}}}(a38_0x1ccc,0x18aca));import{BaseCommand}from'./command.js';import{resolveTarget,isSuccessfulResolution}from'../sdk/segment/target-resolution.js';import{findYamlFiles}from'../sdk/segment/file-discovery.js';import{existsSync}from'fs';import a38_0x37a4cf from'chalk';import{formatValidationResult}from'../sdk/segment/yaml-validator.js';import{validateYamlFiles,isValidationResult,calculateSummary}from'../sdk/segment/validate-files.js';function a38_0x30f4(_0x5756cd,_0x3ccaa4){_0x5756cd=_0x5756cd-0x116;const _0x1ccce9=a38_0x1ccc();let _0x30f454=_0x1ccce9[_0x5756cd];return _0x30f454;}export class SegmentValidateCommand extends BaseCommand{[a38_0x1d5bf4(0x12d)]='segment:validate';[a38_0x1d5bf4(0x141)]='Validate\x20segment\x20and\x20journey\x20YAML\x20files';async['execute'](_0x51b460){const _0x40baa7=a38_0x1d5bf4,{options:_0x256cba,args:_0x18161e}=_0x51b460,_0x2f4f06=_0x256cba,_0x3c24c1=await resolveTarget({'arg':_0x18161e[0x0],'contextParent':_0x256cba[_0x40baa7(0x134)],'cwd':process[_0x40baa7(0x13a)]()});if(!isSuccessfulResolution(_0x3c24c1))return _0x3c24c1[_0x40baa7(0x131)]===_0x40baa7(0x11f)?(console[_0x40baa7(0x119)](a38_0x37a4cf[_0x40baa7(0x146)]('parent_segment\x20is\x20not\x20set.\x20Use\x20`tdx\x20sg\x20use\x20<parent_name>`\x20to\x20set\x20it.\x0a')),console['error'](_0x40baa7(0x145)),console['error'](_0x40baa7(0x13d)),console[_0x40baa7(0x119)](_0x40baa7(0x120))):(console[_0x40baa7(0x119)](a38_0x37a4cf[_0x40baa7(0x128)](_0x40baa7(0x12c)+_0x3c24c1[_0x40baa7(0x140)]+'\x0a')),_0x3c24c1[_0x40baa7(0x11e)]&&console[_0x40baa7(0x119)](a38_0x37a4cf[_0x40baa7(0x142)](_0x3c24c1[_0x40baa7(0x11e)]))),0x1;const _0x3e7b47=_0x3c24c1[_0x40baa7(0x135)],_0x104bf7=_0x3c24c1[_0x40baa7(0x132)]==='file'?_0x3c24c1[_0x40baa7(0x12b)]:undefined;if(!_0x104bf7&&!existsSync(_0x3e7b47))return console[_0x40baa7(0x119)](a38_0x37a4cf[_0x40baa7(0x128)]('Error:\x20Directory\x20not\x20found:\x20'+_0x3e7b47+'\x0a')),0x1;let _0x129d73;if(_0x104bf7){if(!_0x104bf7['endsWith'](_0x40baa7(0x136))&&!_0x104bf7[_0x40baa7(0x125)]('.yaml'))return console['error'](a38_0x37a4cf['red'](_0x40baa7(0x13e)+_0x104bf7+'\x0a')),0x1;_0x129d73=[_0x104bf7];}else _0x129d73=findYamlFiles(_0x3e7b47);if(_0x129d73[_0x40baa7(0x147)]===0x0)return console[_0x40baa7(0x119)](a38_0x37a4cf['red'](_0x40baa7(0x129)+_0x3e7b47+'\x0a')),0x1;const _0x5ab35e=validateYamlFiles(_0x129d73,_0x3e7b47),_0x55eba5=calculateSummary(_0x5ab35e);for(const _0x34be63 of _0x5ab35e){if(!isValidationResult(_0x34be63))continue;const {relativePath:_0x39bf51,source:_0x27abf9,result:_0x4f4ff8,fileType:_0x3dd912}=_0x34be63,_0x6188fd=_0x3dd912;if(_0x4f4ff8['valid']&&_0x4f4ff8[_0x40baa7(0x130)][_0x40baa7(0x147)]===0x0)_0x2f4f06[_0x40baa7(0x122)]&&console['log'](a38_0x37a4cf[_0x40baa7(0x127)]('✔\x20'+_0x39bf51)+a38_0x37a4cf[_0x40baa7(0x12e)]('\x20('+_0x6188fd+')'));else _0x4f4ff8[_0x40baa7(0x138)]?(console['log'](a38_0x37a4cf[_0x40baa7(0x146)]('⚠\x20'+_0x39bf51)+a38_0x37a4cf[_0x40baa7(0x12e)]('\x20('+_0x6188fd+'):\x20'+_0x4f4ff8[_0x40baa7(0x130)]['length']+_0x40baa7(0x13f))),console['log'](formatValidationResult(_0x4f4ff8,_0x27abf9,_0x39bf51))):(console[_0x40baa7(0x133)](a38_0x37a4cf['red']('✖\x20'+_0x39bf51)+a38_0x37a4cf[_0x40baa7(0x12e)]('\x20('+_0x6188fd+_0x40baa7(0x11a)+_0x4f4ff8[_0x40baa7(0x121)][_0x40baa7(0x147)]+_0x40baa7(0x13c))),console[_0x40baa7(0x133)](formatValidationResult(_0x4f4ff8,_0x27abf9,_0x39bf51)));}return console[_0x40baa7(0x133)](''),_0x55eba5[_0x40baa7(0x12a)]?(console[_0x40baa7(0x133)](a38_0x37a4cf[_0x40baa7(0x128)]('Validation\x20failed:\x20'+_0x55eba5['invalidCount']+'\x20file(s)\x20with\x20errors,\x20'+_0x55eba5[_0x40baa7(0x139)]+_0x40baa7(0x123))),_0x55eba5[_0x40baa7(0x116)]>0x0&&console[_0x40baa7(0x133)](a38_0x37a4cf[_0x40baa7(0x146)](_0x55eba5[_0x40baa7(0x116)]+'\x20warning(s)\x20found')),0x1):(console[_0x40baa7(0x133)](a38_0x37a4cf[_0x40baa7(0x127)](_0x40baa7(0x144)+_0x55eba5[_0x40baa7(0x139)]+_0x40baa7(0x11b))),_0x55eba5[_0x40baa7(0x116)]>0x0&&console[_0x40baa7(0x133)](a38_0x37a4cf[_0x40baa7(0x146)](_0x55eba5[_0x40baa7(0x116)]+_0x40baa7(0x117))),0x0);}}function a38_0x1ccc(){const _0x56dc0b=['64166fuqlfj','✔\x20All\x20','Usage:\x20tdx\x20sg\x20validate\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Validate\x20all\x20(requires\x20context)','yellow','length','warningCount','\x20warning(s)\x20found','79009wYVAod','error','):\x20','\x20file(s)\x20valid','15ffnouR','48DIUqht','helpText','no_parent','\x20\x20\x20\x20\x20\x20\x20tdx\x20sg\x20validate\x20<file_path>\x20\x20#\x20Validate\x20specific\x20file','errors','verbose','\x20valid','185468nKnftn','endsWith','323469cmwRJT','green','red','Error:\x20No\x20YAML\x20files\x20found\x20in\x20','hasErrors','filePath','Error:\x20','name','dim','255904bNtcny','warnings','errorCode','type','log','parentSegment','targetDir','.yml','112090XUZvtH','valid','validCount','cwd','331520kGPhFh','\x20error(s)','\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','Error:\x20File\x20must\x20have\x20.yml\x20or\x20.yaml\x20extension:\x20','\x20warning(s)','message','description','cyan'];a38_0x1ccc=function(){return _0x56dc0b;};return a38_0x1ccc();}
@@ -1 +1 @@
1
- const a39_0x5b33b1=a39_0x46d4;function a39_0x46d4(_0x5002ff,_0x55e69d){_0x5002ff=_0x5002ff-0x12b;const _0xa953c8=a39_0xa953();let _0x46d4d5=_0xa953c8[_0x5002ff];return _0x46d4d5;}(function(_0x23b622,_0x2338e9){const _0x43fb84=a39_0x46d4,_0x5be167=_0x23b622();while(!![]){try{const _0x138fb3=-parseInt(_0x43fb84(0x164))/0x1*(-parseInt(_0x43fb84(0x158))/0x2)+-parseInt(_0x43fb84(0x130))/0x3*(-parseInt(_0x43fb84(0x12e))/0x4)+parseInt(_0x43fb84(0x171))/0x5*(-parseInt(_0x43fb84(0x14f))/0x6)+-parseInt(_0x43fb84(0x153))/0x7+-parseInt(_0x43fb84(0x154))/0x8+parseInt(_0x43fb84(0x16e))/0x9+-parseInt(_0x43fb84(0x14d))/0xa*(-parseInt(_0x43fb84(0x15e))/0xb);if(_0x138fb3===_0x2338e9)break;else _0x5be167['push'](_0x5be167['shift']());}catch(_0x2670f4){_0x5be167['push'](_0x5be167['shift']());}}}(a39_0xa953,0x9c500));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';function a39_0xa953(){const _0x1d576b=['replace','listRecursive','name','Folder/pattern\x20arg:\x20','\x5c$&','length','✔\x20Built\x20tree\x20with\x20','journeyBundleName','\x20\x20tdx\x20sg\x20pull\x20\x22My\x20Audience\x22','message','Resolving\x20path\x20\x27','verbose','\x20\x20tdx\x20sg\x20use\x20\x22My\x20Audience\x22','Site:\x20','parentId','resolvePathToResource','(empty)','recursive','dim','/j/da','/e/','test','jsonl','data','parentSegment','Use\x20tdx\x20ps\x20list\x20to\x20see\x20available\x20parent\x20segments.','24727330aCLHcI','type','6UEGvCF',']\x20matching\x20\x27','\x20\x20Cause:\x20','log','6884269qTRKBV','5001936beVNbG','✔\x20Found\x20','No\x20items\x20match\x20pattern:\x20','\x20matching\x20\x27','2BKKjFm','journey','\x20journey','\x20folder','Building\x20hierarchy\x20tree...','Error:\x20No\x20parent\x20segment\x20context\x20set.','11KEbjwE','Error:\x20','error','/app/ps/','map','Parent\x20segment\x20context:\x20','151252tdXcEi','localeCompare','listUnified','\x27...','site','sort','json','folderId','\x20segment','Set\x20a\x20parent\x20segment\x20context\x20first:','1691964HMtqCI','journeys','cause','3042315eeglLD','Listing\x20folders,\x20segments,\x20and\x20journeys...','segments','folders','listWithPattern','List\x20folders\x20and\x20child\x20segments','Resolving\x20parent\x20segment\x20\x27','children','segment','filter','folder','format','181788OWmjhk','Parent\x20ID:\x20','3dhJFAT','Recursive\x20mode:\x20enabled',',\x20and\x20'];a39_0xa953=function(){return _0x1d576b;};return a39_0xa953();}import{handleSDKOutput}from'../core/command-output.js';import{withSpinner}from'../utils/spinner.js';import{formatFlatList,formatTree}from'../sdk/util/tree-formatter.js';import{getConsoleNextUrl}from'../sdk/client/endpoints.js';import a39_0x159aa7 from'chalk';export class SegmentsCommand extends BaseCommand{['name']=a39_0x5b33b1(0x173);['description']=a39_0x5b33b1(0x176);async['execute'](_0xc7ae90){const _0x3a11c5=a39_0x5b33b1,{options:_0x2b91b1,args:_0x149d65}=_0xc7ae90,_0x1c13a1=_0x2b91b1[_0x3a11c5(0x144)],_0x475874=_0x149d65[0x0];try{const _0x122cff=_0x2b91b1[_0x3a11c5(0x14b)];_0x2b91b1[_0x3a11c5(0x13e)]&&(console[_0x3a11c5(0x160)](_0x3a11c5(0x140)+_0x2b91b1[_0x3a11c5(0x168)]),console['error'](_0x3a11c5(0x163)+(_0x122cff||'(not\x20set)')),_0x475874&&console[_0x3a11c5(0x160)](_0x3a11c5(0x136)+_0x475874),_0x1c13a1&&console[_0x3a11c5(0x160)](_0x3a11c5(0x131)));if(!_0x122cff)return console[_0x3a11c5(0x160)](_0x3a11c5(0x15d)),console['error'](''),console[_0x3a11c5(0x160)](_0x3a11c5(0x16d)),console[_0x3a11c5(0x160)](_0x3a11c5(0x13b)),console[_0x3a11c5(0x160)](_0x3a11c5(0x13f)),console['error'](''),console[_0x3a11c5(0x160)](_0x3a11c5(0x14c)),0x1;const _0x2c0c27=_0x475874&&(_0x475874['includes']('*')||_0x475874['includes']('?'));if(_0x2c0c27)return await this['listWithPattern'](_0xc7ae90,_0x122cff,_0x475874);const _0x4346c0=_0x475874?_0x122cff+'/'+_0x475874:_0x122cff;return _0x1c13a1?await this[_0x3a11c5(0x134)](_0xc7ae90,_0x4346c0):await this[_0x3a11c5(0x166)](_0xc7ae90,_0x4346c0);}catch(_0x682c4f){if(_0x682c4f instanceof SDKError)return console['error'](_0x3a11c5(0x15f)+_0x682c4f[_0x3a11c5(0x13c)]),_0x682c4f[_0x3a11c5(0x170)]&&console[_0x3a11c5(0x160)](_0x3a11c5(0x151)+_0x682c4f[_0x3a11c5(0x170)]),0x1;throw _0x682c4f;}}async[a39_0x5b33b1(0x175)](_0x4a8388,_0x547165,_0x262669){const _0xc95752=a39_0x5b33b1,{options:_0x4da334,tdx:_0x39f633}=_0x4a8388,_0x4d72cc=await withSpinner(_0xc95752(0x177)+_0x547165+_0xc95752(0x167),()=>_0x39f633[_0xc95752(0x179)][_0xc95752(0x142)](_0x547165),{'verbose':_0x4da334[_0xc95752(0x13e)]}),_0x32f327=_0x4d72cc['data'],_0x4e1d0e=await withSpinner('Listing\x20folders,\x20segments,\x20and\x20journeys...',()=>_0x39f633['segment']['listUnifiedWithJourneys'](_0x32f327[_0xc95752(0x141)],_0x32f327[_0xc95752(0x16b)]),{'verbose':_0x4da334[_0xc95752(0x13e)]}),{folders:_0x3fe161,segments:_0x3672c8,journeys:_0x1a5b5b}=_0x4e1d0e['data'],_0x50a6ed=_0x262669[_0xc95752(0x133)](/[.+^${}()|[\]\\]/g,_0xc95752(0x137))[_0xc95752(0x133)](/\*/g,'.*')[_0xc95752(0x133)](/\?/g,'.'),_0x30f87f=new RegExp('^'+_0x50a6ed+'$','i'),_0x4f31d4=_0x3fe161[_0xc95752(0x12b)](_0x24aff7=>_0x30f87f[_0xc95752(0x148)](_0x24aff7[_0xc95752(0x135)])),_0x4a1906=_0x3672c8[_0xc95752(0x12b)](_0x4234b5=>_0x30f87f[_0xc95752(0x148)](_0x4234b5[_0xc95752(0x135)])),_0x2912a0=_0x1a5b5b[_0xc95752(0x12b)](_0x30e033=>_0x30f87f['test'](_0x30e033[_0xc95752(0x13a)])),_0x33cde8=_0x4f31d4[_0xc95752(0x138)]+_0x4a1906[_0xc95752(0x138)]+_0x2912a0[_0xc95752(0x138)];console[_0xc95752(0x160)](_0xc95752(0x155)+_0x4f31d4['length']+_0xc95752(0x15b)+(_0x4f31d4[_0xc95752(0x138)]!==0x1?'s':'')+',\x20'+_0x4a1906[_0xc95752(0x138)]+_0xc95752(0x16c)+(_0x4a1906[_0xc95752(0x138)]!==0x1?'s':'')+',\x20and\x20'+_0x2912a0['length']+_0xc95752(0x15a)+(_0x2912a0[_0xc95752(0x138)]!==0x1?'s':'')+_0xc95752(0x157)+_0x262669+'\x27');const _0x239445=_0x553471=>{const _0x38ddcb=_0xc95752;return getConsoleNextUrl(_0x4da334[_0x38ddcb(0x168)],_0x38ddcb(0x161)+_0x32f327['parentId']+_0x38ddcb(0x147)+_0x553471);},_0x447b79=_0x4da334[_0xc95752(0x12d)]===_0xc95752(0x16a)||_0x4da334['format']===_0xc95752(0x149);if(_0x447b79){const _0x1469e6=[..._0x4f31d4[_0xc95752(0x162)](_0x24204a=>({..._0x24204a,'type':_0xc95752(0x12c)})),..._0x4a1906[_0xc95752(0x162)](_0x32be1f=>({..._0x32be1f,'type':'segment','url':_0x239445(_0x32be1f['id'])})),..._0x2912a0[_0xc95752(0x162)](_0x6751f2=>({..._0x6751f2,'name':_0x6751f2[_0xc95752(0x13a)],'type':_0xc95752(0x159)}))][_0xc95752(0x169)]((_0x295b70,_0x379507)=>_0x295b70['name']['localeCompare'](_0x379507[_0xc95752(0x135)]));await handleSDKOutput(_0x1469e6,_0x4da334);}else{if(_0x33cde8===0x0)console[_0xc95752(0x152)](_0xc95752(0x156)+_0x262669);else{console[_0xc95752(0x152)](a39_0x159aa7[_0xc95752(0x145)]('['+_0x547165+_0xc95752(0x150)+_0x262669+'\x27'));const _0x72f31=formatFlatList(_0x4f31d4,_0x4a1906,{'showMetadata':!![],'getSegmentUrl':_0x239445},_0x2912a0);console[_0xc95752(0x152)](_0x72f31);}}return 0x0;}async['listUnified'](_0x3afb00,_0x2b746f){const _0x16de15=a39_0x5b33b1,{options:_0x3cb141,tdx:_0xf5f9fe}=_0x3afb00,_0x3c0af8=await withSpinner(_0x16de15(0x13d)+_0x2b746f+_0x16de15(0x167),()=>_0xf5f9fe[_0x16de15(0x179)]['resolvePathToResource'](_0x2b746f),{'verbose':_0x3cb141['verbose']}),_0x226262=_0x3c0af8['data'];_0x3cb141[_0x16de15(0x13e)]&&(console[_0x16de15(0x160)](_0x16de15(0x12f)+_0x226262[_0x16de15(0x141)]),_0x226262[_0x16de15(0x16b)]&&console[_0x16de15(0x160)]('Folder\x20ID:\x20'+_0x226262[_0x16de15(0x16b)]));const _0x2ef7d5=await withSpinner(_0x16de15(0x172),()=>_0xf5f9fe[_0x16de15(0x179)]['listUnifiedWithJourneys'](_0x226262['parentId'],_0x226262[_0x16de15(0x16b)]),{'verbose':_0x3cb141[_0x16de15(0x13e)]}),{folders:_0x2ed58a,segments:_0x5ba9ef,journeys:_0xdf90d6}=_0x2ef7d5[_0x16de15(0x14a)],_0x142e9e=_0x2ed58a[_0x16de15(0x138)]+_0x5ba9ef['length']+_0xdf90d6[_0x16de15(0x138)];console[_0x16de15(0x160)](_0x16de15(0x155)+_0x2ed58a[_0x16de15(0x138)]+_0x16de15(0x15b)+(_0x2ed58a[_0x16de15(0x138)]!==0x1?'s':'')+',\x20'+_0x5ba9ef[_0x16de15(0x138)]+'\x20segment'+(_0x5ba9ef[_0x16de15(0x138)]!==0x1?'s':'')+',\x20and\x20'+_0xdf90d6[_0x16de15(0x138)]+_0x16de15(0x15a)+(_0xdf90d6['length']!==0x1?'s':''));const _0x58ab2a=_0x365ecb=>{const _0x4e522e=_0x16de15;return getConsoleNextUrl(_0x3cb141[_0x4e522e(0x168)],'/app/ps/'+_0x226262[_0x4e522e(0x141)]+_0x4e522e(0x147)+_0x365ecb);},_0x14e3f9=_0x5f531b=>{const _0xeb8ec9=_0x16de15;return getConsoleNextUrl(_0x3cb141['site'],_0xeb8ec9(0x161)+_0x226262[_0xeb8ec9(0x141)]+_0xeb8ec9(0x147)+_0x5f531b+'/j/da');},_0x3df366=_0x3cb141[_0x16de15(0x12d)]===_0x16de15(0x16a)||_0x3cb141[_0x16de15(0x12d)]===_0x16de15(0x149);if(_0x3df366){const _0x1a6fe9=[..._0x2ed58a[_0x16de15(0x162)](_0x3d1e90=>({..._0x3d1e90,'type':_0x16de15(0x12c)})),..._0x5ba9ef['map'](_0x3412e3=>({..._0x3412e3,'type':_0x16de15(0x179),'url':_0x58ab2a(_0x3412e3['id'])})),..._0xdf90d6[_0x16de15(0x162)](_0xfd4038=>({..._0xfd4038,'name':_0xfd4038['journeyBundleName'],'type':_0x16de15(0x159),'url':_0x14e3f9(_0xfd4038['id'])}))][_0x16de15(0x169)]((_0x6de6cd,_0x93c124)=>_0x6de6cd[_0x16de15(0x135)][_0x16de15(0x165)](_0x93c124[_0x16de15(0x135)]));await handleSDKOutput(_0x1a6fe9,_0x3cb141);}else{if(_0x142e9e===0x0)console[_0x16de15(0x152)](a39_0x159aa7['dim']('['+_0x2b746f+']')),console[_0x16de15(0x152)](_0x16de15(0x143));else{console[_0x16de15(0x152)](a39_0x159aa7['dim']('['+_0x2b746f+']'));const _0x351dd3=formatFlatList(_0x2ed58a,_0x5ba9ef,{'showMetadata':!![],'getSegmentUrl':_0x58ab2a,'getJourneyUrl':_0x14e3f9},_0xdf90d6);console[_0x16de15(0x152)](_0x351dd3);}}return 0x0;}async[a39_0x5b33b1(0x134)](_0x569439,_0x10bde4){const _0x2c8d9c=a39_0x5b33b1,{options:_0x56dbcc,tdx:_0x37ddb2}=_0x569439,_0x4f7979=await withSpinner(_0x2c8d9c(0x13d)+_0x10bde4+_0x2c8d9c(0x167),()=>_0x37ddb2[_0x2c8d9c(0x179)]['resolvePathToResource'](_0x10bde4),{'verbose':_0x56dbcc[_0x2c8d9c(0x13e)]}),_0xd8da10=_0x4f7979['data'];_0x56dbcc['verbose']&&(console['error'](_0x2c8d9c(0x12f)+_0xd8da10[_0x2c8d9c(0x141)]),_0xd8da10['folderId']&&console[_0x2c8d9c(0x160)]('Folder\x20ID:\x20'+_0xd8da10[_0x2c8d9c(0x16b)]));const _0x1dfdb8=_0x56dbcc['maxDepth']||0xa,_0x13c87c=await withSpinner(_0x2c8d9c(0x15c),()=>_0x37ddb2[_0x2c8d9c(0x179)]['listRecursive'](_0xd8da10[_0x2c8d9c(0x141)],_0xd8da10[_0x2c8d9c(0x16b)],0x0,_0x1dfdb8),{'verbose':_0x56dbcc[_0x2c8d9c(0x13e)]}),_0x2329b4=_0x13c87c['data'],_0x20cd0b=_0x13dcf9=>{const _0x1ec125=_0x2c8d9c;let _0x5c12bd=0x0,_0x48a317=0x0,_0x51d6c6=0x0;for(const _0x542bcf of _0x13dcf9){if(_0x542bcf['type']==='folder')_0x5c12bd++;else{if(_0x542bcf[_0x1ec125(0x14e)]===_0x1ec125(0x179))_0x48a317++;else{if(_0x542bcf['type']==='journey')_0x51d6c6++;}}if(_0x542bcf[_0x1ec125(0x178)]){const _0x344d58=_0x20cd0b(_0x542bcf['children']);_0x5c12bd+=_0x344d58[_0x1ec125(0x174)],_0x48a317+=_0x344d58['segments'],_0x51d6c6+=_0x344d58[_0x1ec125(0x16f)];}}return{'folders':_0x5c12bd,'segments':_0x48a317,'journeys':_0x51d6c6};},_0x5b08ad=_0x20cd0b(_0x2329b4);console['error'](_0x2c8d9c(0x139)+_0x5b08ad[_0x2c8d9c(0x174)]+'\x20folder'+(_0x5b08ad[_0x2c8d9c(0x174)]!==0x1?'s':'')+',\x20'+_0x5b08ad['segments']+'\x20segment'+(_0x5b08ad['segments']!==0x1?'s':'')+_0x2c8d9c(0x132)+_0x5b08ad[_0x2c8d9c(0x16f)]+_0x2c8d9c(0x15a)+(_0x5b08ad[_0x2c8d9c(0x16f)]!==0x1?'s':''));const _0xa1cf68=_0x35ee3e=>{const _0x288094=_0x2c8d9c;return getConsoleNextUrl(_0x56dbcc[_0x288094(0x168)],'/app/ps/'+_0xd8da10[_0x288094(0x141)]+_0x288094(0x147)+_0x35ee3e);},_0x1fafba=_0x425f80=>{const _0x20dc32=_0x2c8d9c;return getConsoleNextUrl(_0x56dbcc['site'],'/app/ps/'+_0xd8da10['parentId']+_0x20dc32(0x147)+_0x425f80+_0x20dc32(0x146));};if(_0x56dbcc['format']===_0x2c8d9c(0x16a)||_0x56dbcc[_0x2c8d9c(0x12d)]===_0x2c8d9c(0x149))await handleSDKOutput(_0x2329b4,_0x56dbcc);else{console[_0x2c8d9c(0x152)](a39_0x159aa7[_0x2c8d9c(0x145)]('['+_0x10bde4+']'));const _0x353023=formatTree(_0x2329b4,{'showMetadata':!![],'getSegmentUrl':_0xa1cf68,'getJourneyUrl':_0x1fafba});console[_0x2c8d9c(0x152)](_0x353023);}return 0x0;}}
1
+ const a39_0x5ce2b6=a39_0x4ef1;(function(_0x1de532,_0x3dd023){const _0x4d7cf1=a39_0x4ef1,_0x103e4c=_0x1de532();while(!![]){try{const _0x40f305=-parseInt(_0x4d7cf1(0x76))/0x1*(parseInt(_0x4d7cf1(0xa8))/0x2)+parseInt(_0x4d7cf1(0x7a))/0x3+-parseInt(_0x4d7cf1(0x91))/0x4*(-parseInt(_0x4d7cf1(0xb3))/0x5)+parseInt(_0x4d7cf1(0x89))/0x6+-parseInt(_0x4d7cf1(0x9e))/0x7*(parseInt(_0x4d7cf1(0x74))/0x8)+-parseInt(_0x4d7cf1(0x71))/0x9+parseInt(_0x4d7cf1(0xa4))/0xa;if(_0x40f305===_0x3dd023)break;else _0x103e4c['push'](_0x103e4c['shift']());}catch(_0x471481){_0x103e4c['push'](_0x103e4c['shift']());}}}(a39_0xeba8,0x79c67));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleSDKOutput}from'../core/command-output.js';import{withSpinner}from'../utils/spinner.js';import{formatFlatList,formatTree}from'../sdk/util/tree-formatter.js';import{getConsoleNextUrl}from'../sdk/client/endpoints.js';function a39_0xeba8(){const _0x1a0717=['68kOJZnV','verbose','test','listUnifiedWithJourneys','children','maxDepth','Listing\x20folders,\x20segments,\x20and\x20journeys...','listUnified','No\x20items\x20match\x20pattern:\x20','message','segments','List\x20folders\x20and\x20child\x20segments','replace','5078031LLvFSk','Parent\x20segment\x20context:\x20','folderId',',\x20and\x20','Folder\x20ID:\x20','\x20segment','11000280GLGfcv','parentId','journeyBundleName','filter','502GuggJt','Error:\x20','/j/da','Site:\x20','log','type','jsonl','data','description','\x27...','dim','132980ynUYNZ','\x20\x20tdx\x20sg\x20pull\x20\x22My\x20Audience\x22','Building\x20hierarchy\x20tree...','Resolving\x20path\x20\x27','execute',']\x20matching\x20\x27','(empty)','Recursive\x20mode:\x20enabled','/e/','site','✔\x20Found\x20','4272543pNnLni','journeys','resolvePathToResource','8UtPCDM','(not\x20set)','2942NRYQEM','Parent\x20ID:\x20','/app/ps/','includes','1538556ObJEHP','\x20matching\x20\x27','Use\x20tdx\x20ps\x20list\x20to\x20see\x20available\x20parent\x20segments.','\x20journey','\x20folder','length','error','Error:\x20No\x20parent\x20segment\x20context\x20set.','Set\x20a\x20parent\x20segment\x20context\x20first:','localeCompare','journey','json','segment','format','listRecursive','2234286vrkNcO','folders','map','listWithPattern','Resolving\x20parent\x20segment\x20\x27','recursive','name','Folder/pattern\x20arg:\x20'];a39_0xeba8=function(){return _0x1a0717;};return a39_0xeba8();}function a39_0x4ef1(_0x34cf23,_0x445d19){_0x34cf23=_0x34cf23-0x6f;const _0xeba86d=a39_0xeba8();let _0x4ef1dc=_0xeba86d[_0x34cf23];return _0x4ef1dc;}import a39_0x550de9 from'chalk';export class SegmentsCommand extends BaseCommand{['name']=a39_0x5ce2b6(0x9b);[a39_0x5ce2b6(0xb0)]=a39_0x5ce2b6(0x9c);async[a39_0x5ce2b6(0xb7)](_0xf43918){const _0x501ee5=a39_0x5ce2b6,{options:_0xb9a5,args:_0x371a89}=_0xf43918,_0x3b2cae=_0xb9a5[_0x501ee5(0x8e)],_0x1cc80c=_0x371a89[0x0];try{const _0x3cb21d=_0xb9a5['parentSegment'];_0xb9a5['verbose']&&(console[_0x501ee5(0x80)](_0x501ee5(0xab)+_0xb9a5[_0x501ee5(0x6f)]),console[_0x501ee5(0x80)](_0x501ee5(0x9f)+(_0x3cb21d||_0x501ee5(0x75))),_0x1cc80c&&console[_0x501ee5(0x80)](_0x501ee5(0x90)+_0x1cc80c),_0x3b2cae&&console[_0x501ee5(0x80)](_0x501ee5(0xba)));if(!_0x3cb21d)return console[_0x501ee5(0x80)](_0x501ee5(0x81)),console[_0x501ee5(0x80)](''),console[_0x501ee5(0x80)](_0x501ee5(0x82)),console[_0x501ee5(0x80)](_0x501ee5(0xb4)),console[_0x501ee5(0x80)]('\x20\x20tdx\x20sg\x20use\x20\x22My\x20Audience\x22'),console[_0x501ee5(0x80)](''),console[_0x501ee5(0x80)](_0x501ee5(0x7c)),0x1;const _0x424419=_0x1cc80c&&(_0x1cc80c[_0x501ee5(0x79)]('*')||_0x1cc80c[_0x501ee5(0x79)]('?'));if(_0x424419)return await this[_0x501ee5(0x8c)](_0xf43918,_0x3cb21d,_0x1cc80c);const _0x4f66a5=_0x1cc80c?_0x3cb21d+'/'+_0x1cc80c:_0x3cb21d;return _0x3b2cae?await this[_0x501ee5(0x88)](_0xf43918,_0x4f66a5):await this['listUnified'](_0xf43918,_0x4f66a5);}catch(_0x13744c){if(_0x13744c instanceof SDKError)return console['error'](_0x501ee5(0xa9)+_0x13744c[_0x501ee5(0x9a)]),_0x13744c['cause']&&console[_0x501ee5(0x80)]('\x20\x20Cause:\x20'+_0x13744c['cause']),0x1;throw _0x13744c;}}async[a39_0x5ce2b6(0x8c)](_0x11c860,_0x1e4cce,_0x861890){const _0x483afe=a39_0x5ce2b6,{options:_0xd2c7d2,tdx:_0x1f3559}=_0x11c860,_0x5964c0=await withSpinner(_0x483afe(0x8d)+_0x1e4cce+_0x483afe(0xb1),()=>_0x1f3559['segment'][_0x483afe(0x73)](_0x1e4cce),{'verbose':_0xd2c7d2[_0x483afe(0x92)]}),_0x28a63b=_0x5964c0[_0x483afe(0xaf)],_0x48d8b2=await withSpinner(_0x483afe(0x97),()=>_0x1f3559['segment'][_0x483afe(0x94)](_0x28a63b[_0x483afe(0xa5)],_0x28a63b[_0x483afe(0xa0)]),{'verbose':_0xd2c7d2[_0x483afe(0x92)]}),{folders:_0x33f760,segments:_0x2ce15e,journeys:_0x1b386c}=_0x48d8b2[_0x483afe(0xaf)],_0x12f597=_0x861890[_0x483afe(0x9d)](/[.+^${}()|[\]\\]/g,'\x5c$&')['replace'](/\*/g,'.*')['replace'](/\?/g,'.'),_0x13b21d=new RegExp('^'+_0x12f597+'$','i'),_0x54135b=_0x33f760['filter'](_0x5ab5b5=>_0x13b21d[_0x483afe(0x93)](_0x5ab5b5[_0x483afe(0x8f)])),_0x2b6447=_0x2ce15e['filter'](_0x1cfe9e=>_0x13b21d['test'](_0x1cfe9e[_0x483afe(0x8f)])),_0x1aaeee=_0x1b386c[_0x483afe(0xa7)](_0x2a6288=>_0x13b21d[_0x483afe(0x93)](_0x2a6288[_0x483afe(0xa6)])),_0x2af11a=_0x54135b['length']+_0x2b6447[_0x483afe(0x7f)]+_0x1aaeee[_0x483afe(0x7f)];console['error'](_0x483afe(0x70)+_0x54135b[_0x483afe(0x7f)]+'\x20folder'+(_0x54135b[_0x483afe(0x7f)]!==0x1?'s':'')+',\x20'+_0x2b6447[_0x483afe(0x7f)]+'\x20segment'+(_0x2b6447['length']!==0x1?'s':'')+_0x483afe(0xa1)+_0x1aaeee[_0x483afe(0x7f)]+_0x483afe(0x7d)+(_0x1aaeee[_0x483afe(0x7f)]!==0x1?'s':'')+_0x483afe(0x7b)+_0x861890+'\x27');const _0x4f4333=_0x3d12ab=>{const _0xb155a1=_0x483afe;return getConsoleNextUrl(_0xd2c7d2[_0xb155a1(0x6f)],'/app/ps/'+_0x28a63b['parentId']+_0xb155a1(0xbb)+_0x3d12ab);},_0x3794c0=_0xd2c7d2[_0x483afe(0x87)]===_0x483afe(0x85)||_0xd2c7d2[_0x483afe(0x87)]==='jsonl';if(_0x3794c0){const _0x55c755=[..._0x54135b['map'](_0x4f10b3=>({..._0x4f10b3,'type':'folder'})),..._0x2b6447[_0x483afe(0x8b)](_0x168431=>({..._0x168431,'type':_0x483afe(0x86),'url':_0x4f4333(_0x168431['id'])})),..._0x1aaeee[_0x483afe(0x8b)](_0x470600=>({..._0x470600,'name':_0x470600[_0x483afe(0xa6)],'type':_0x483afe(0x84)}))]['sort']((_0x1f583b,_0x475672)=>_0x1f583b[_0x483afe(0x8f)][_0x483afe(0x83)](_0x475672[_0x483afe(0x8f)]));await handleSDKOutput(_0x55c755,_0xd2c7d2);}else{if(_0x2af11a===0x0)console[_0x483afe(0xac)](_0x483afe(0x99)+_0x861890);else{console[_0x483afe(0xac)](a39_0x550de9[_0x483afe(0xb2)]('['+_0x1e4cce+_0x483afe(0xb8)+_0x861890+'\x27'));const _0x26322e=formatFlatList(_0x54135b,_0x2b6447,{'showMetadata':!![],'getSegmentUrl':_0x4f4333},_0x1aaeee);console[_0x483afe(0xac)](_0x26322e);}}return 0x0;}async[a39_0x5ce2b6(0x98)](_0x1ea7ea,_0x4b569a){const _0x13f1df=a39_0x5ce2b6,{options:_0x24079e,tdx:_0x1cd724}=_0x1ea7ea,_0x4d7f22=await withSpinner(_0x13f1df(0xb6)+_0x4b569a+'\x27...',()=>_0x1cd724[_0x13f1df(0x86)][_0x13f1df(0x73)](_0x4b569a),{'verbose':_0x24079e['verbose']}),_0x2e5ff3=_0x4d7f22['data'];_0x24079e[_0x13f1df(0x92)]&&(console[_0x13f1df(0x80)](_0x13f1df(0x77)+_0x2e5ff3[_0x13f1df(0xa5)]),_0x2e5ff3[_0x13f1df(0xa0)]&&console[_0x13f1df(0x80)](_0x13f1df(0xa2)+_0x2e5ff3[_0x13f1df(0xa0)]));const _0x229b68=await withSpinner(_0x13f1df(0x97),()=>_0x1cd724[_0x13f1df(0x86)][_0x13f1df(0x94)](_0x2e5ff3[_0x13f1df(0xa5)],_0x2e5ff3[_0x13f1df(0xa0)]),{'verbose':_0x24079e['verbose']}),{folders:_0x249bf3,segments:_0x2e7806,journeys:_0x3dfdce}=_0x229b68[_0x13f1df(0xaf)],_0x4abcdf=_0x249bf3[_0x13f1df(0x7f)]+_0x2e7806[_0x13f1df(0x7f)]+_0x3dfdce[_0x13f1df(0x7f)];console[_0x13f1df(0x80)](_0x13f1df(0x70)+_0x249bf3['length']+_0x13f1df(0x7e)+(_0x249bf3[_0x13f1df(0x7f)]!==0x1?'s':'')+',\x20'+_0x2e7806['length']+_0x13f1df(0xa3)+(_0x2e7806[_0x13f1df(0x7f)]!==0x1?'s':'')+_0x13f1df(0xa1)+_0x3dfdce['length']+_0x13f1df(0x7d)+(_0x3dfdce[_0x13f1df(0x7f)]!==0x1?'s':''));const _0x1ec44a=_0x2d8d07=>{const _0xc77b54=_0x13f1df;return getConsoleNextUrl(_0x24079e[_0xc77b54(0x6f)],'/app/ps/'+_0x2e5ff3[_0xc77b54(0xa5)]+_0xc77b54(0xbb)+_0x2d8d07);},_0x470f2b=_0x77c3d9=>{const _0x1ea540=_0x13f1df;return getConsoleNextUrl(_0x24079e[_0x1ea540(0x6f)],_0x1ea540(0x78)+_0x2e5ff3['parentId']+'/e/'+_0x77c3d9+_0x1ea540(0xaa));},_0x59581d=_0x24079e[_0x13f1df(0x87)]===_0x13f1df(0x85)||_0x24079e[_0x13f1df(0x87)]===_0x13f1df(0xae);if(_0x59581d){const _0xbf7793=[..._0x249bf3[_0x13f1df(0x8b)](_0x10dfcc=>({..._0x10dfcc,'type':'folder'})),..._0x2e7806['map'](_0x47c835=>({..._0x47c835,'type':'segment','url':_0x1ec44a(_0x47c835['id'])})),..._0x3dfdce[_0x13f1df(0x8b)](_0x581808=>({..._0x581808,'name':_0x581808['journeyBundleName'],'type':_0x13f1df(0x84),'url':_0x470f2b(_0x581808['id'])}))]['sort']((_0x592f32,_0x31915f)=>_0x592f32['name'][_0x13f1df(0x83)](_0x31915f[_0x13f1df(0x8f)]));await handleSDKOutput(_0xbf7793,_0x24079e);}else{if(_0x4abcdf===0x0)console[_0x13f1df(0xac)](a39_0x550de9['dim']('['+_0x4b569a+']')),console[_0x13f1df(0xac)](_0x13f1df(0xb9));else{console[_0x13f1df(0xac)](a39_0x550de9['dim']('['+_0x4b569a+']'));const _0x4f2d1e=formatFlatList(_0x249bf3,_0x2e7806,{'showMetadata':!![],'getSegmentUrl':_0x1ec44a,'getJourneyUrl':_0x470f2b},_0x3dfdce);console['log'](_0x4f2d1e);}}return 0x0;}async[a39_0x5ce2b6(0x88)](_0x3f7b81,_0x389927){const _0x48d09d=a39_0x5ce2b6,{options:_0x4c17eb,tdx:_0x43d2c9}=_0x3f7b81,_0x45ef70=await withSpinner(_0x48d09d(0xb6)+_0x389927+'\x27...',()=>_0x43d2c9['segment'][_0x48d09d(0x73)](_0x389927),{'verbose':_0x4c17eb[_0x48d09d(0x92)]}),_0x13b7a4=_0x45ef70['data'];_0x4c17eb[_0x48d09d(0x92)]&&(console['error']('Parent\x20ID:\x20'+_0x13b7a4[_0x48d09d(0xa5)]),_0x13b7a4['folderId']&&console['error']('Folder\x20ID:\x20'+_0x13b7a4[_0x48d09d(0xa0)]));const _0x95047f=_0x4c17eb[_0x48d09d(0x96)]||0xa,_0x5d856a=await withSpinner(_0x48d09d(0xb5),()=>_0x43d2c9[_0x48d09d(0x86)]['listRecursive'](_0x13b7a4['parentId'],_0x13b7a4[_0x48d09d(0xa0)],0x0,_0x95047f),{'verbose':_0x4c17eb[_0x48d09d(0x92)]}),_0x19cf36=_0x5d856a[_0x48d09d(0xaf)],_0x1b1ace=_0x3f5f15=>{const _0x109094=_0x48d09d;let _0x1aa77d=0x0,_0x2176fd=0x0,_0x34732e=0x0;for(const _0x4cf7dd of _0x3f5f15){if(_0x4cf7dd[_0x109094(0xad)]==='folder')_0x1aa77d++;else{if(_0x4cf7dd[_0x109094(0xad)]==='segment')_0x2176fd++;else{if(_0x4cf7dd[_0x109094(0xad)]===_0x109094(0x84))_0x34732e++;}}if(_0x4cf7dd[_0x109094(0x95)]){const _0x33ae9f=_0x1b1ace(_0x4cf7dd['children']);_0x1aa77d+=_0x33ae9f[_0x109094(0x8a)],_0x2176fd+=_0x33ae9f[_0x109094(0x9b)],_0x34732e+=_0x33ae9f['journeys'];}}return{'folders':_0x1aa77d,'segments':_0x2176fd,'journeys':_0x34732e};},_0x416ec8=_0x1b1ace(_0x19cf36);console[_0x48d09d(0x80)]('✔\x20Built\x20tree\x20with\x20'+_0x416ec8['folders']+_0x48d09d(0x7e)+(_0x416ec8['folders']!==0x1?'s':'')+',\x20'+_0x416ec8[_0x48d09d(0x9b)]+_0x48d09d(0xa3)+(_0x416ec8[_0x48d09d(0x9b)]!==0x1?'s':'')+_0x48d09d(0xa1)+_0x416ec8[_0x48d09d(0x72)]+_0x48d09d(0x7d)+(_0x416ec8[_0x48d09d(0x72)]!==0x1?'s':''));const _0x5cbbf5=_0x584d13=>{const _0x4c51dc=_0x48d09d;return getConsoleNextUrl(_0x4c17eb['site'],_0x4c51dc(0x78)+_0x13b7a4[_0x4c51dc(0xa5)]+'/e/'+_0x584d13);},_0x4711be=_0x457ad9=>{const _0x413440=_0x48d09d;return getConsoleNextUrl(_0x4c17eb[_0x413440(0x6f)],_0x413440(0x78)+_0x13b7a4[_0x413440(0xa5)]+'/e/'+_0x457ad9+_0x413440(0xaa));};if(_0x4c17eb[_0x48d09d(0x87)]===_0x48d09d(0x85)||_0x4c17eb['format']===_0x48d09d(0xae))await handleSDKOutput(_0x19cf36,_0x4c17eb);else{console['log'](a39_0x550de9[_0x48d09d(0xb2)]('['+_0x389927+']'));const _0x2d6e67=formatTree(_0x19cf36,{'showMetadata':!![],'getSegmentUrl':_0x5cbbf5,'getJourneyUrl':_0x4711be});console[_0x48d09d(0xac)](_0x2d6e67);}return 0x0;}}
@@ -1 +1 @@
1
- const a40_0x40dcd7=a40_0x5d96;(function(_0x96139e,_0x23ea86){const _0x3a01b3=a40_0x5d96,_0x489309=_0x96139e();while(!![]){try{const _0x57d029=parseInt(_0x3a01b3(0xa6))/0x1*(-parseInt(_0x3a01b3(0xad))/0x2)+-parseInt(_0x3a01b3(0xa9))/0x3+-parseInt(_0x3a01b3(0xb2))/0x4*(parseInt(_0x3a01b3(0x9a))/0x5)+-parseInt(_0x3a01b3(0xb0))/0x6+parseInt(_0x3a01b3(0xa5))/0x7*(-parseInt(_0x3a01b3(0xa8))/0x8)+-parseInt(_0x3a01b3(0xb5))/0x9*(-parseInt(_0x3a01b3(0xbd))/0xa)+parseInt(_0x3a01b3(0xa3))/0xb;if(_0x57d029===_0x23ea86)break;else _0x489309['push'](_0x489309['shift']());}catch(_0x408fa7){_0x489309['push'](_0x489309['shift']());}}}(a40_0x31ae,0x7b18c));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleSDKOutput}from'../core/command-output.js';import{parseTableReference,validateTableDescribeReference}from'../utils/table-ref-parser.js';import{withSpinner}from'../utils/spinner.js';import{DEFAULT_DISPLAY_LIMIT,resolveLimit}from'../core/constants.js';function a40_0x5d96(_0x13a480,_0x59f3f7){_0x13a480=_0x13a480-0x99;const _0x31ae5a=a40_0x31ae();let _0x5d967e=_0x31ae5a[_0x13a480];return _0x5d967e;}function a40_0x31ae(){const _0x321791=['5HaYotz','\x20row','\x20\x20\x20or:\x20tdx\x20show\x20<catalog.database.table>','...','description','verbose','✔\x20Query\x20successful\x20-\x200\x20rows\x20returned','Catalog:\x20','args','37504280ZbmEnd','cause','14gWgNOT','1277RbjuGG','\x20from\x20','3863096FrzHlj','855687StTGeE','length','Querying\x20','error','1398YNnLFy','Table:\x20','limit','5201718xtGtRt','show','2449144gkcYnk','Database:\x20','site','9WbuaLe','showTable','Usage:\x20tdx\x20show\x20<database.table>','message','\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--database\x20<database>','Show\x20table\x20contents','Error:\x20','name','7175890qCIElP','query','Usage:\x20tdx\x20show\x20<database.table>\x0a\x20\x20\x20or:\x20tdx\x20show\x20<catalog.database.table>\x0a\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--database\x20<database>\x0a\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--in\x20<database>\x0a\x0aRun\x20\x27tdx\x20show\x20--help\x27\x20for\x20more\x20options','database','execute','Site:\x20','\x20\x20Cause:\x20','✔\x20Retrieved\x20'];a40_0x31ae=function(){return _0x321791;};return a40_0x31ae();}export class ShowCommand extends BaseCommand{[a40_0x40dcd7(0xbc)]=a40_0x40dcd7(0xb1);[a40_0x40dcd7(0x9e)]=a40_0x40dcd7(0xba);async[a40_0x40dcd7(0xc1)](_0x3d2578){return this['showTable'](_0x3d2578);}async[a40_0x40dcd7(0xb6)](_0x25e33c){const _0x197f83=a40_0x40dcd7,{options:_0x1abbac,args:_0x4866fa,tdx:_0x5057c5}=_0x25e33c;let _0x4c0b62;try{_0x4c0b62=parseTableReference(_0x4866fa[0x0]);const _0x4df043=_0x1abbac[_0x197f83(0xc0)];!_0x4c0b62[_0x197f83(0xc0)]&&_0x4df043&&(_0x4c0b62[_0x197f83(0xc0)]=_0x4df043);const _0x4f8463=validateTableDescribeReference(_0x4c0b62);if(_0x4f8463)return console['error']('Error:\x20'+_0x4f8463),console[_0x197f83(0xac)]('Usage:\x20tdx\x20show\x20<database.table>'),console[_0x197f83(0xac)](_0x197f83(0x9c)),console[_0x197f83(0xac)](_0x197f83(0xb9)),0x1;}catch(_0x7bf10){return console[_0x197f83(0xac)]('Error:\x20'+_0x7bf10[_0x197f83(0xb8)]),console['error'](_0x197f83(0xb7)),console[_0x197f83(0xac)](_0x197f83(0x9c)),console[_0x197f83(0xac)](_0x197f83(0xb9)),0x1;}const _0xdcd45=_0x4c0b62['catalog'],_0x5d235b=_0x4c0b62['database'],_0x36b780=_0x4c0b62['table'],_0x2bd128=resolveLimit(_0x1abbac[_0x197f83(0xaf)],DEFAULT_DISPLAY_LIMIT);try{_0x1abbac[_0x197f83(0x9f)]&&(console[_0x197f83(0xac)](_0x197f83(0xc2)+_0x1abbac[_0x197f83(0xb4)]),_0xdcd45&&console['error'](_0x197f83(0xa1)+_0xdcd45),console[_0x197f83(0xac)](_0x197f83(0xb3)+_0x5d235b),console[_0x197f83(0xac)](_0x197f83(0xae)+_0x36b780),console[_0x197f83(0xac)]('Limit:\x20'+_0x2bd128));const _0x4dfdca=_0xdcd45?_0xdcd45+'.'+_0x5d235b+'.'+_0x36b780:_0x5d235b+'.'+_0x36b780,_0x5d5300=await withSpinner(_0x197f83(0xab)+_0x4dfdca+_0x197f83(0x9d),()=>_0x5057c5[_0x197f83(0xbe)][_0x197f83(0xb6)](_0x5d235b,_0x36b780,_0x2bd128,_0xdcd45),{'verbose':_0x1abbac['verbose']}),_0x1b6be4=_0x5d5300['data'],_0x2b2f00=_0x1b6be4['data'];return _0x2b2f00[_0x197f83(0xaa)]===0x0?console[_0x197f83(0xac)](_0x197f83(0xa0)):console[_0x197f83(0xac)](_0x197f83(0x99)+_0x2b2f00['length']+_0x197f83(0x9b)+(_0x2b2f00[_0x197f83(0xaa)]!==0x1?'s':'')+_0x197f83(0xa7)+_0x4dfdca),await handleSDKOutput(_0x2b2f00,_0x1abbac),0x0;}catch(_0x384f07){if(_0x384f07 instanceof SDKError)return console[_0x197f83(0xac)](_0x197f83(0xbb)+_0x384f07[_0x197f83(0xb8)]),_0x384f07[_0x197f83(0xa4)]&&console[_0x197f83(0xac)](_0x197f83(0xc3)+_0x384f07['cause']),0x1;throw _0x384f07;}}['validate'](_0x5b73fa){const _0x57341f=a40_0x40dcd7;if(_0x5b73fa[_0x57341f(0xa2)][_0x57341f(0xaa)]===0x0)return _0x57341f(0xbf);if(_0x5b73fa[_0x57341f(0xa2)][_0x57341f(0xaa)]>0x1)return'Too\x20many\x20arguments\x0aUsage:\x20tdx\x20show\x20<database.table>\x0a\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--database\x20<database>\x0a\x0aRun\x20\x27tdx\x20show\x20--help\x27\x20for\x20more\x20options';return undefined;}}
1
+ const a40_0x24b28e=a40_0x14c7;function a40_0xf8bb(){const _0x21702c=['table','\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--database\x20<database>','database','message','error','674325SFAVdT','showTable','3ACVMVg','name','show','15680kUghgv','✔\x20Query\x20successful\x20-\x200\x20rows\x20returned','1115NyZFBu','8992539MpfhbV','length','\x20\x20\x20or:\x20tdx\x20show\x20<catalog.database.table>','✔\x20Retrieved\x20','Usage:\x20tdx\x20show\x20<database.table>\x0a\x20\x20\x20or:\x20tdx\x20show\x20<catalog.database.table>\x0a\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--database\x20<database>\x0a\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--in\x20<database>\x0a\x0aRun\x20\x27tdx\x20show\x20--help\x27\x20for\x20more\x20options','site','args','372826AvSZNb','Database:\x20','49Snlzgt','verbose','Show\x20table\x20contents','Site:\x20','catalog','23620900lhFIzn','validate','description','12885368TIzPjT','Catalog:\x20','limit','Error:\x20','Usage:\x20tdx\x20show\x20<database.table>','475098PdpYfQ','Querying\x20','Table:\x20','cause'];a40_0xf8bb=function(){return _0x21702c;};return a40_0xf8bb();}(function(_0x25d99d,_0x394a7c){const _0x5ebd45=a40_0x14c7,_0xcba4e6=_0x25d99d();while(!![]){try{const _0x16bd72=parseInt(_0x5ebd45(0x1a6))/0x1+parseInt(_0x5ebd45(0x1b5))/0x2*(-parseInt(_0x5ebd45(0x1a8))/0x3)+parseInt(_0x5ebd45(0x1ab))/0x4*(-parseInt(_0x5ebd45(0x1ad))/0x5)+-parseInt(_0x5ebd45(0x19d))/0x6*(parseInt(_0x5ebd45(0x1b7))/0x7)+-parseInt(_0x5ebd45(0x198))/0x8+parseInt(_0x5ebd45(0x1ae))/0x9+parseInt(_0x5ebd45(0x195))/0xa;if(_0x16bd72===_0x394a7c)break;else _0xcba4e6['push'](_0xcba4e6['shift']());}catch(_0x13f8c1){_0xcba4e6['push'](_0xcba4e6['shift']());}}}(a40_0xf8bb,0xc5c4d));import{BaseCommand}from'./command.js';function a40_0x14c7(_0xf9a12a,_0x2123ef){_0xf9a12a=_0xf9a12a-0x195;const _0xf8bbe5=a40_0xf8bb();let _0x14c7b5=_0xf8bbe5[_0xf9a12a];return _0x14c7b5;}import{SDKError}from'../sdk/index.js';import{handleSDKOutput}from'../core/command-output.js';import{parseTableReference,validateTableDescribeReference}from'../utils/table-ref-parser.js';import{withSpinner}from'../utils/spinner.js';import{DEFAULT_DISPLAY_LIMIT,resolveLimit}from'../core/constants.js';export class ShowCommand extends BaseCommand{[a40_0x24b28e(0x1a9)]=a40_0x24b28e(0x1aa);[a40_0x24b28e(0x197)]=a40_0x24b28e(0x1b9);async['execute'](_0x4b5b72){const _0x10e5b8=a40_0x24b28e;return this[_0x10e5b8(0x1a7)](_0x4b5b72);}async[a40_0x24b28e(0x1a7)](_0xbd58bb){const _0x1a693c=a40_0x24b28e,{options:_0x536fb7,args:_0x3ed8a5,tdx:_0x469263}=_0xbd58bb;let _0x2a1c1d;try{_0x2a1c1d=parseTableReference(_0x3ed8a5[0x0]);const _0x32cbee=_0x536fb7[_0x1a693c(0x1a3)];!_0x2a1c1d[_0x1a693c(0x1a3)]&&_0x32cbee&&(_0x2a1c1d[_0x1a693c(0x1a3)]=_0x32cbee);const _0x571a29=validateTableDescribeReference(_0x2a1c1d);if(_0x571a29)return console[_0x1a693c(0x1a5)](_0x1a693c(0x19b)+_0x571a29),console[_0x1a693c(0x1a5)](_0x1a693c(0x19c)),console[_0x1a693c(0x1a5)](_0x1a693c(0x1b0)),console[_0x1a693c(0x1a5)](_0x1a693c(0x1a2)),0x1;}catch(_0xad3fbb){return console[_0x1a693c(0x1a5)](_0x1a693c(0x19b)+_0xad3fbb[_0x1a693c(0x1a4)]),console[_0x1a693c(0x1a5)](_0x1a693c(0x19c)),console[_0x1a693c(0x1a5)](_0x1a693c(0x1b0)),console[_0x1a693c(0x1a5)](_0x1a693c(0x1a2)),0x1;}const _0x58a737=_0x2a1c1d[_0x1a693c(0x1bb)],_0x25c106=_0x2a1c1d[_0x1a693c(0x1a3)],_0x1fd751=_0x2a1c1d[_0x1a693c(0x1a1)],_0x25405a=resolveLimit(_0x536fb7[_0x1a693c(0x19a)],DEFAULT_DISPLAY_LIMIT);try{_0x536fb7[_0x1a693c(0x1b8)]&&(console[_0x1a693c(0x1a5)](_0x1a693c(0x1ba)+_0x536fb7[_0x1a693c(0x1b3)]),_0x58a737&&console['error'](_0x1a693c(0x199)+_0x58a737),console[_0x1a693c(0x1a5)](_0x1a693c(0x1b6)+_0x25c106),console[_0x1a693c(0x1a5)](_0x1a693c(0x19f)+_0x1fd751),console['error']('Limit:\x20'+_0x25405a));const _0x4e1e6d=_0x58a737?_0x58a737+'.'+_0x25c106+'.'+_0x1fd751:_0x25c106+'.'+_0x1fd751,_0x3f1d9b=await withSpinner(_0x1a693c(0x19e)+_0x4e1e6d+'...',()=>_0x469263['query'][_0x1a693c(0x1a7)](_0x25c106,_0x1fd751,_0x25405a,_0x58a737),{'verbose':_0x536fb7[_0x1a693c(0x1b8)]}),_0x1498e5=_0x3f1d9b['data'],_0xd3d44e=_0x1498e5['data'];return _0xd3d44e[_0x1a693c(0x1af)]===0x0?console[_0x1a693c(0x1a5)](_0x1a693c(0x1ac)):console[_0x1a693c(0x1a5)](_0x1a693c(0x1b1)+_0xd3d44e['length']+'\x20row'+(_0xd3d44e[_0x1a693c(0x1af)]!==0x1?'s':'')+'\x20from\x20'+_0x4e1e6d),await handleSDKOutput(_0xd3d44e,_0x536fb7),0x0;}catch(_0x6d1e52){if(_0x6d1e52 instanceof SDKError)return console[_0x1a693c(0x1a5)](_0x1a693c(0x19b)+_0x6d1e52[_0x1a693c(0x1a4)]),_0x6d1e52[_0x1a693c(0x1a0)]&&console[_0x1a693c(0x1a5)]('\x20\x20Cause:\x20'+_0x6d1e52[_0x1a693c(0x1a0)]),0x1;throw _0x6d1e52;}}[a40_0x24b28e(0x196)](_0x44f131){const _0x423dc4=a40_0x24b28e;if(_0x44f131[_0x423dc4(0x1b4)][_0x423dc4(0x1af)]===0x0)return _0x423dc4(0x1b2);if(_0x44f131[_0x423dc4(0x1b4)]['length']>0x1)return'Too\x20many\x20arguments\x0aUsage:\x20tdx\x20show\x20<database.table>\x0a\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--database\x20<database>\x0a\x0aRun\x20\x27tdx\x20show\x20--help\x27\x20for\x20more\x20options';return undefined;}}
@@ -1 +1 @@
1
- const a41_0x3bd9ec=a41_0x5dca;function a41_0x1db4(){const _0x437a7d=['tdx','16WFYRMl','19479ENVFzJ','1855968OBedWp','filter','green','3290670Uviyyk','profile','204auGjEw','site:\x20','yellow','3478174ZcAQic','249822RRNrPO','status','red','name','cyan','join','execute','✗\x20Validation\x20failed:\x20','dim','jobs','cli','description','User:','2942802WmLsbG','config','bold','account_id','email','site','TDX_PROFILE\x20env','first_name','displayWithSources','message','error','Show\x20authentication\x20status\x20and\x20current\x20context','Read\x20credential\x20from\x20','(from\x20','✓\x20Authentication\x20successful\x0a','No\x20credential\x20found','4688130fAVYRV','log'];a41_0x1db4=function(){return _0x437a7d;};return a41_0x1db4();}(function(_0x2faa92,_0xa6084a){const _0x8d6d41=a41_0x5dca,_0x2e67ee=_0x2faa92();while(!![]){try{const _0x16ea5f=parseInt(_0x8d6d41(0x152))/0x1+parseInt(_0x8d6d41(0x14e))/0x2*(parseInt(_0x8d6d41(0x148))/0x3)+parseInt(_0x8d6d41(0x149))/0x4+-parseInt(_0x8d6d41(0x144))/0x5+-parseInt(_0x8d6d41(0x14c))/0x6+parseInt(_0x8d6d41(0x151))/0x7*(parseInt(_0x8d6d41(0x147))/0x8)+-parseInt(_0x8d6d41(0x15f))/0x9;if(_0x16ea5f===_0xa6084a)break;else _0x2e67ee['push'](_0x2e67ee['shift']());}catch(_0x38e9a0){_0x2e67ee['push'](_0x2e67ee['shift']());}}}(a41_0x1db4,0x87f0f));import{BaseCommand,printAuthError}from'./command.js';function a41_0x5dca(_0x3abd18,_0x129925){_0x3abd18=_0x3abd18-0x13a;const _0x1db4b2=a41_0x1db4();let _0x5dca4b=_0x1db4b2[_0x3abd18];return _0x5dca4b;}import{resolveAPIKeyAsync}from'../core/config.js';import{HTTPClientError}from'../sdk/client/http-client.js';import{GlobalContext}from'../core/global-context.js';import a41_0x428f9e from'chalk';export class StatusCommand extends BaseCommand{[a41_0x3bd9ec(0x155)]=a41_0x3bd9ec(0x153);[a41_0x3bd9ec(0x15d)]=a41_0x3bd9ec(0x13f);async[a41_0x3bd9ec(0x158)](_0x33bbc9){const _0xecc35b=a41_0x3bd9ec,{options:_0x1ee196,tdx:_0x5c24ad}=_0x33bbc9,_0x302a46=_0x1ee196[_0xecc35b(0x164)],_0x32ec0c=new GlobalContext(_0x1ee196),_0x5a940f=_0x32ec0c[_0xecc35b(0x14d)],_0x223cdb=_0x32ec0c['profileSource'],_0x279748=_0x223cdb===_0xecc35b(0x15c)?'CLI\x20flag':_0x223cdb==='session'?'session':_0x223cdb==='env'?_0xecc35b(0x13a):_0x223cdb===_0xecc35b(0x160)?_0xecc35b(0x160):null,_0x4503f4=_0x5a940f?a41_0x428f9e[_0xecc35b(0x156)](_0x5a940f):a41_0x428f9e[_0xecc35b(0x15a)]('N/A'),_0x132b4c=_0x279748?'\x20'+a41_0x428f9e[_0xecc35b(0x15a)](_0xecc35b(0x141)+_0x279748+')'):'';console['log'](a41_0x428f9e['bold'](_0xecc35b(0x146))+'\x20profile:\x20'+_0x4503f4+_0x132b4c+'\x20'+a41_0x428f9e['dim']('(')+_0xecc35b(0x14f)+a41_0x428f9e['cyan'](_0x302a46)+a41_0x428f9e[_0xecc35b(0x15a)](')'));const _0x2190b0=await resolveAPIKeyAsync(_0x302a46,_0x5a940f);if(_0x2190b0){const {source:_0x3c1ee4,isDeprecated:_0x1e42d9}=_0x2190b0,_0x223f96=_0xecc35b(0x140)+a41_0x428f9e['cyan'](_0x3c1ee4);console['log'](_0x1e42d9?a41_0x428f9e[_0xecc35b(0x150)](_0x223f96):_0x223f96);}else console[_0xecc35b(0x145)](a41_0x428f9e[_0xecc35b(0x150)](_0xecc35b(0x143)));let _0x2d567b=![];try{const _0x1d778d=await _0x5c24ad[_0xecc35b(0x15b)]['getUserInfo']();console[_0xecc35b(0x145)](a41_0x428f9e[_0xecc35b(0x14b)](_0xecc35b(0x142))),console[_0xecc35b(0x145)](a41_0x428f9e[_0xecc35b(0x161)](_0xecc35b(0x15e))+'\x20'+a41_0x428f9e['cyan'](_0x1d778d[_0xecc35b(0x163)]));if(_0x1d778d[_0xecc35b(0x13b)]||_0x1d778d['last_name']){const _0x3ffa36=[_0x1d778d[_0xecc35b(0x13b)],_0x1d778d['last_name']][_0xecc35b(0x14a)](Boolean)[_0xecc35b(0x157)]('\x20');console['log'](a41_0x428f9e[_0xecc35b(0x161)]('Name:')+'\x20'+_0x3ffa36);}_0x1d778d[_0xecc35b(0x162)]&&console['log'](a41_0x428f9e['bold']('Account\x20ID:')+'\x20'+a41_0x428f9e[_0xecc35b(0x150)](_0x1d778d[_0xecc35b(0x162)])),_0x2d567b=!![];}catch(_0x44cf4f){_0x44cf4f instanceof HTTPClientError&&_0x44cf4f[_0xecc35b(0x153)]===0x191?printAuthError(_0x44cf4f,!![],_0x5a940f):console[_0xecc35b(0x13e)](a41_0x428f9e[_0xecc35b(0x154)](_0xecc35b(0x159)+(_0x44cf4f instanceof Error?_0x44cf4f[_0xecc35b(0x13d)]:String(_0x44cf4f))));}return console['log'](),_0x32ec0c[_0xecc35b(0x13c)](),_0x2d567b?0x0:0x1;}}
1
+ const a41_0x5dcb20=a41_0x348a;function a41_0x348a(_0x49e359,_0x23804c){_0x49e359=_0x49e359-0x14f;const _0x5d445e=a41_0x5d44();let _0x348aa6=_0x5d445e[_0x49e359];return _0x348aa6;}(function(_0x76168d,_0x26a4ca){const _0x58dd4a=a41_0x348a,_0x89d3c8=_0x76168d();while(!![]){try{const _0x2bc811=parseInt(_0x58dd4a(0x16b))/0x1*(parseInt(_0x58dd4a(0x166))/0x2)+parseInt(_0x58dd4a(0x177))/0x3*(-parseInt(_0x58dd4a(0x155))/0x4)+parseInt(_0x58dd4a(0x17b))/0x5+-parseInt(_0x58dd4a(0x160))/0x6*(parseInt(_0x58dd4a(0x16e))/0x7)+parseInt(_0x58dd4a(0x179))/0x8+parseInt(_0x58dd4a(0x158))/0x9*(parseInt(_0x58dd4a(0x16c))/0xa)+parseInt(_0x58dd4a(0x152))/0xb*(-parseInt(_0x58dd4a(0x15a))/0xc);if(_0x2bc811===_0x26a4ca)break;else _0x89d3c8['push'](_0x89d3c8['shift']());}catch(_0x2b6cee){_0x89d3c8['push'](_0x89d3c8['shift']());}}}(a41_0x5d44,0x42830));import{BaseCommand,printAuthError}from'./command.js';import{resolveAPIKeyAsync}from'../core/config.js';function a41_0x5d44(){const _0x561630=['260MGXpjq','Account\x20ID:','12068QaTTfW','email','red','✓\x20Authentication\x20successful\x0a','config','TDX_PROFILE\x20env','(from\x20','name','displayWithSources','3912PbCWJU','cyan','3272000OzKElX','\x20profile:\x20','1332320ARGZjF','account_id','yellow','bold','session','1950113nTnEab','Read\x20credential\x20from\x20','profileSource','504HFKGCJ','last_name','No\x20credential\x20found','101259KSbtpI','green','48XyymBV','message','profile','description','site:\x20','env','444OpMzke','error','dim','✗\x20Validation\x20failed:\x20','site','Name:','101818TmZFGH','N/A','log','cli','filter','6XVVxCF'];a41_0x5d44=function(){return _0x561630;};return a41_0x5d44();}import{HTTPClientError}from'../sdk/client/http-client.js';import{GlobalContext}from'../core/global-context.js';import a41_0x1ef26b from'chalk';export class StatusCommand extends BaseCommand{[a41_0x5dcb20(0x175)]='status';[a41_0x5dcb20(0x15d)]='Show\x20authentication\x20status\x20and\x20current\x20context';async['execute'](_0x2affde){const _0x5e9f87=a41_0x5dcb20,{options:_0x527135,tdx:_0x3e8a2d}=_0x2affde,_0x4e95f5=_0x527135[_0x5e9f87(0x164)],_0x19cc1e=new GlobalContext(_0x527135),_0x1eb301=_0x19cc1e[_0x5e9f87(0x15c)],_0x262db2=_0x19cc1e[_0x5e9f87(0x154)],_0x1181de=_0x262db2===_0x5e9f87(0x169)?'CLI\x20flag':_0x262db2==='session'?_0x5e9f87(0x151):_0x262db2===_0x5e9f87(0x15f)?_0x5e9f87(0x173):_0x262db2===_0x5e9f87(0x172)?_0x5e9f87(0x172):null,_0x412ee5=_0x1eb301?a41_0x1ef26b['cyan'](_0x1eb301):a41_0x1ef26b[_0x5e9f87(0x162)](_0x5e9f87(0x167)),_0x444c67=_0x1181de?'\x20'+a41_0x1ef26b[_0x5e9f87(0x162)](_0x5e9f87(0x174)+_0x1181de+')'):'';console['log'](a41_0x1ef26b[_0x5e9f87(0x150)]('tdx')+_0x5e9f87(0x17a)+_0x412ee5+_0x444c67+'\x20'+a41_0x1ef26b[_0x5e9f87(0x162)]('(')+_0x5e9f87(0x15e)+a41_0x1ef26b[_0x5e9f87(0x178)](_0x4e95f5)+a41_0x1ef26b[_0x5e9f87(0x162)](')'));const _0x50701e=await resolveAPIKeyAsync(_0x4e95f5,_0x1eb301);if(_0x50701e){const {source:_0x458d4d,isDeprecated:_0x5045ba}=_0x50701e,_0x11d87f=_0x5e9f87(0x153)+a41_0x1ef26b[_0x5e9f87(0x178)](_0x458d4d);console[_0x5e9f87(0x168)](_0x5045ba?a41_0x1ef26b[_0x5e9f87(0x14f)](_0x11d87f):_0x11d87f);}else console[_0x5e9f87(0x168)](a41_0x1ef26b[_0x5e9f87(0x14f)](_0x5e9f87(0x157)));let _0x2038f7=![];try{const _0x409d91=await _0x3e8a2d['jobs']['getUserInfo']();console['log'](a41_0x1ef26b[_0x5e9f87(0x159)](_0x5e9f87(0x171))),console[_0x5e9f87(0x168)](a41_0x1ef26b[_0x5e9f87(0x150)]('User:')+'\x20'+a41_0x1ef26b[_0x5e9f87(0x178)](_0x409d91[_0x5e9f87(0x16f)]));if(_0x409d91['first_name']||_0x409d91['last_name']){const _0x7f8f82=[_0x409d91['first_name'],_0x409d91[_0x5e9f87(0x156)]][_0x5e9f87(0x16a)](Boolean)['join']('\x20');console[_0x5e9f87(0x168)](a41_0x1ef26b[_0x5e9f87(0x150)](_0x5e9f87(0x165))+'\x20'+_0x7f8f82);}_0x409d91[_0x5e9f87(0x17c)]&&console[_0x5e9f87(0x168)](a41_0x1ef26b[_0x5e9f87(0x150)](_0x5e9f87(0x16d))+'\x20'+a41_0x1ef26b[_0x5e9f87(0x14f)](_0x409d91[_0x5e9f87(0x17c)])),_0x2038f7=!![];}catch(_0x50b7bb){_0x50b7bb instanceof HTTPClientError&&_0x50b7bb['status']===0x191?printAuthError(_0x50b7bb,!![],_0x1eb301):console[_0x5e9f87(0x161)](a41_0x1ef26b[_0x5e9f87(0x170)](_0x5e9f87(0x163)+(_0x50b7bb instanceof Error?_0x50b7bb[_0x5e9f87(0x15b)]:String(_0x50b7bb))));}return console['log'](),_0x19cc1e[_0x5e9f87(0x176)](),_0x2038f7?0x0:0x1;}}
@@ -1 +1 @@
1
- const a42_0x152645=a42_0x41a2;function a42_0x41a2(_0x408fb1,_0x7fd973){_0x408fb1=_0x408fb1-0x109;const _0x2a908e=a42_0x2a90();let _0x41a250=_0x2a908e[_0x408fb1];return _0x41a250;}(function(_0x3d682f,_0x2c7d3c){const _0x1c0273=a42_0x41a2,_0xc29e60=_0x3d682f();while(!![]){try{const _0x35e0b4=parseInt(_0x1c0273(0x125))/0x1+-parseInt(_0x1c0273(0x119))/0x2*(-parseInt(_0x1c0273(0x136))/0x3)+-parseInt(_0x1c0273(0x112))/0x4+parseInt(_0x1c0273(0x11a))/0x5*(parseInt(_0x1c0273(0x11f))/0x6)+parseInt(_0x1c0273(0x11e))/0x7*(parseInt(_0x1c0273(0x12d))/0x8)+parseInt(_0x1c0273(0x10c))/0x9+-parseInt(_0x1c0273(0x11b))/0xa;if(_0x35e0b4===_0x2c7d3c)break;else _0xc29e60['push'](_0xc29e60['shift']());}catch(_0x33ddc9){_0xc29e60['push'](_0xc29e60['shift']());}}}(a42_0x2a90,0x1ee01));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleSDKOutput}from'../core/command-output.js';import{parseTableReference}from'../utils/table-ref-parser.js';import{DEFAULT_LISTING_LIMIT,resolveLimit}from'../core/constants.js';import{withSpinner}from'../utils/spinner.js';function a42_0x2a90(){const _0x3426be=['182338MMOuMT','database','\x20\x20Or:\x20\x20tdx\x20tables\x20--database\x20','\x27\x20is\x20ambiguous.','message','Table\x20pattern:\x20','Error:\x20Too\x20many\x20arguments.\x20Use\x20single\x20argument:','table','949016SGGTkY','tables','Did\x20you\x20mean\x20to\x20list\x20all\x20tables\x20from\x20database\x20\x27','✖\x20No\x20tables\x20found','includes','\x20\x20tdx\x20tables\x20\x22mydb.*\x22\x20\x20\x20\x20\x20\x20\x20\x20->\x20all\x20tables\x20from\x20mydb','Listing\x20tables...','✔\x20Found\x20','site','294891ztuhSI','length','query','listTables','2207403vLrHVj','data','description','\x20\x20Or:\x20\x20tdx\x20tables\x20--in\x20','name','Error:\x20Pattern\x20\x27','428368kbAGMH','\x27\x20across\x20all\x20databases.','error','Site:\x20','\x20\x20Cause:\x20','Database\x20pattern:\x20','\x20table','2LVOlKy','5hHtqzW','6127380xnUuUI','Error:\x20','\x20\x20Use:\x20tdx\x20tables\x20\x22','7cVUYWS','1210596YZSRJQ','Or\x20use\x20--in\x20flag:','\x20\x20tdx\x20tables\x20users\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20->\x20table\x20\x22users\x22\x20across\x20all\x20databases','\x27\x20may\x20not\x20exist\x20or\x20contains\x20no\x20tables','verbose','cause'];a42_0x2a90=function(){return _0x3426be;};return a42_0x2a90();}export class TablesCommand extends BaseCommand{[a42_0x152645(0x110)]=a42_0x152645(0x12e);[a42_0x152645(0x10e)]='List\x20tables\x20in\x20a\x20database';async['execute'](_0x45ca9f){const _0x587293=a42_0x152645,{options:_0x2eff6b,args:_0x5bb02e,tdx:_0x4cff99}=_0x45ca9f;let _0xbddd85;if(_0x5bb02e[_0x587293(0x109)]===0x0)_0xbddd85={'database':undefined,'table':undefined,'original':''};else{if(_0x5bb02e[_0x587293(0x109)]===0x1)try{_0xbddd85=parseTableReference(_0x5bb02e[0x0]);if(_0xbddd85[_0x587293(0x12c)]&&!_0xbddd85[_0x587293(0x126)]&&!_0xbddd85[_0x587293(0x12c)][_0x587293(0x131)]('*')&&!_0xbddd85[_0x587293(0x12c)][_0x587293(0x131)]('?'))return console[_0x587293(0x114)](_0x587293(0x111)+_0x5bb02e[0x0]+_0x587293(0x128)),console[_0x587293(0x114)](_0x587293(0x12f)+_0xbddd85['table']+'\x27?'),console[_0x587293(0x114)](_0x587293(0x11d)+_0xbddd85[_0x587293(0x12c)]+'.*\x22'),console[_0x587293(0x114)](_0x587293(0x10f)+_0xbddd85[_0x587293(0x12c)]),console['error'](_0x587293(0x127)+_0xbddd85[_0x587293(0x12c)]),console[_0x587293(0x114)](''),console[_0x587293(0x114)]('Note:\x20\x27'+_0x5bb02e[0x0]+'\x27\x20without\x20wildcards\x20would\x20search\x20for\x20tables\x20named\x20\x27'+_0xbddd85[_0x587293(0x12c)]+_0x587293(0x113)),0x1;}catch(_0x4aba1e){return console[_0x587293(0x114)](_0x587293(0x11c)+_0x4aba1e[_0x587293(0x129)]),0x1;}else return console['error'](_0x587293(0x12b)),console[_0x587293(0x114)](_0x587293(0x121)),console[_0x587293(0x114)](_0x587293(0x132)),console[_0x587293(0x114)]('\x20\x20tdx\x20tables\x20\x22mydb.users\x22\x20\x20\x20\x20->\x20table\x20\x22users\x22\x20in\x20database\x20mydb'),console[_0x587293(0x114)]('\x20\x20tdx\x20tables\x20\x22*.user*\x22\x20\x20\x20\x20\x20\x20\x20->\x20tables\x20matching\x20user*\x20across\x20databases'),console[_0x587293(0x114)](_0x587293(0x120)),console['error']('\x20\x20tdx\x20tables\x20--in\x20mydb\x20\x20\x20\x20\x20\x20\x20->\x20all\x20tables\x20from\x20mydb'),0x1;}const _0x576cc6=_0x2eff6b[_0x587293(0x126)];!_0xbddd85[_0x587293(0x126)]&&_0x576cc6&&(_0xbddd85[_0x587293(0x126)]=_0x576cc6);try{const _0x53e192=_0x7b457d=>_0x7b457d&&(_0x7b457d['includes']('*')||_0x7b457d[_0x587293(0x131)]('?')),_0x4ead03=_0x53e192(_0xbddd85[_0x587293(0x126)]);_0x2eff6b[_0x587293(0x123)]&&(console['error'](_0x587293(0x115)+_0x2eff6b[_0x587293(0x135)]),_0xbddd85[_0x587293(0x126)]?_0x4ead03?console[_0x587293(0x114)](_0x587293(0x117)+_0xbddd85[_0x587293(0x126)]):console[_0x587293(0x114)]('Database:\x20'+_0xbddd85[_0x587293(0x126)]):console[_0x587293(0x114)]('Database:\x20all'),_0xbddd85['table']&&console[_0x587293(0x114)](_0x587293(0x12a)+_0xbddd85['table']));const _0x43b1da=_0xbddd85['database']&&!_0x4ead03?_0xbddd85['database']:undefined,_0x381b29=_0x4ead03?_0xbddd85[_0x587293(0x126)]:undefined,_0x42c4ef=_0xbddd85[_0x587293(0x12c)],_0x11c04f=resolveLimit(_0x2eff6b['limit'],DEFAULT_LISTING_LIMIT),_0x2ef1b1=await withSpinner(_0x587293(0x133),()=>_0x4cff99[_0x587293(0x10a)][_0x587293(0x10b)](_0x43b1da,_0x42c4ef,_0x381b29,_0x11c04f),{'verbose':_0x2eff6b[_0x587293(0x123)]}),_0x1e6114=_0x2ef1b1[_0x587293(0x10d)];if(_0x1e6114[_0x587293(0x109)]===0x0&&_0xbddd85[_0x587293(0x126)]&&!_0x4ead03)return console[_0x587293(0x114)](_0x587293(0x130)),console['error']('Database\x20\x27'+_0xbddd85['database']+_0x587293(0x122)),0x1;return console['error'](_0x587293(0x134)+_0x1e6114[_0x587293(0x109)]+_0x587293(0x118)+(_0x1e6114[_0x587293(0x109)]!==0x1?'s':'')),await handleSDKOutput(_0x1e6114,{..._0x2eff6b,'limit':_0x11c04f}),0x0;}catch(_0x5de907){if(_0x5de907 instanceof SDKError)return console[_0x587293(0x114)]('Error:\x20'+_0x5de907[_0x587293(0x129)]),_0x5de907[_0x587293(0x124)]&&console[_0x587293(0x114)](_0x587293(0x116)+_0x5de907[_0x587293(0x124)]),0x1;throw _0x5de907;}}['validate'](_0x3452e6){return undefined;}}
1
+ const a42_0x2b2dcd=a42_0x166d;(function(_0x15d77d,_0x4ed865){const _0x87751a=a42_0x166d,_0x4373b9=_0x15d77d();while(!![]){try{const _0x3e6816=-parseInt(_0x87751a(0x124))/0x1*(-parseInt(_0x87751a(0x13e))/0x2)+parseInt(_0x87751a(0x136))/0x3*(-parseInt(_0x87751a(0x122))/0x4)+-parseInt(_0x87751a(0x11a))/0x5*(-parseInt(_0x87751a(0x118))/0x6)+parseInt(_0x87751a(0x13f))/0x7*(parseInt(_0x87751a(0x137))/0x8)+-parseInt(_0x87751a(0x138))/0x9*(-parseInt(_0x87751a(0x11f))/0xa)+-parseInt(_0x87751a(0x13b))/0xb+-parseInt(_0x87751a(0x143))/0xc*(-parseInt(_0x87751a(0x140))/0xd);if(_0x3e6816===_0x4ed865)break;else _0x4373b9['push'](_0x4373b9['shift']());}catch(_0x4d4b0c){_0x4373b9['push'](_0x4373b9['shift']());}}}(a42_0x27a4,0x56832));import{BaseCommand}from'./command.js';function a42_0x27a4(){const _0x2f29b5=['data','\x27\x20across\x20all\x20databases.','12uwYqWY','Note:\x20\x27','verbose','\x20\x20tdx\x20tables\x20--in\x20mydb\x20\x20\x20\x20\x20\x20\x20->\x20all\x20tables\x20from\x20mydb','Listing\x20tables...','12tSxNmp','Table\x20pattern:\x20','218615zJSMbw','Database\x20pattern:\x20','message','\x27\x20without\x20wildcards\x20would\x20search\x20for\x20tables\x20named\x20\x27','description','64210YzMzxK','cause','Error:\x20Pattern\x20\x27','267788mggNAR','name','29vQXeTo','Or\x20use\x20--in\x20flag:','length','\x20\x20Or:\x20\x20tdx\x20tables\x20--database\x20','\x27\x20is\x20ambiguous.','listTables','Error:\x20','site','tables','includes','database','error','Database:\x20','Database\x20\x27','Error:\x20Too\x20many\x20arguments.\x20Use\x20single\x20argument:','✖\x20No\x20tables\x20found','✔\x20Found\x20','table','15pfjzLA','200VWPwxG','54Oslvmh','query','\x20\x20Cause:\x20','3963311lgXyuN','Database:\x20all','\x20\x20Use:\x20tdx\x20tables\x20\x22','22006obQBaH','110047wlVIAv','2746978lxAJgz'];a42_0x27a4=function(){return _0x2f29b5;};return a42_0x27a4();}import{SDKError}from'../sdk/index.js';import{handleSDKOutput}from'../core/command-output.js';function a42_0x166d(_0x214d0e,_0x3f0ca4){_0x214d0e=_0x214d0e-0x118;const _0x27a412=a42_0x27a4();let _0x166d8d=_0x27a412[_0x214d0e];return _0x166d8d;}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{[a42_0x2b2dcd(0x123)]=a42_0x2b2dcd(0x12c);[a42_0x2b2dcd(0x11e)]='List\x20tables\x20in\x20a\x20database';async['execute'](_0x41fd7b){const _0x1e938c=a42_0x2b2dcd,{options:_0x8d695,args:_0x1d2ee6,tdx:_0x5d2d50}=_0x41fd7b;let _0x5f376c;if(_0x1d2ee6['length']===0x0)_0x5f376c={'database':undefined,'table':undefined,'original':''};else{if(_0x1d2ee6[_0x1e938c(0x126)]===0x1)try{_0x5f376c=parseTableReference(_0x1d2ee6[0x0]);if(_0x5f376c[_0x1e938c(0x135)]&&!_0x5f376c[_0x1e938c(0x12e)]&&!_0x5f376c[_0x1e938c(0x135)]['includes']('*')&&!_0x5f376c['table'][_0x1e938c(0x12d)]('?'))return console['error'](_0x1e938c(0x121)+_0x1d2ee6[0x0]+_0x1e938c(0x128)),console[_0x1e938c(0x12f)]('Did\x20you\x20mean\x20to\x20list\x20all\x20tables\x20from\x20database\x20\x27'+_0x5f376c[_0x1e938c(0x135)]+'\x27?'),console['error'](_0x1e938c(0x13d)+_0x5f376c[_0x1e938c(0x135)]+'.*\x22'),console[_0x1e938c(0x12f)]('\x20\x20Or:\x20\x20tdx\x20tables\x20--in\x20'+_0x5f376c[_0x1e938c(0x135)]),console['error'](_0x1e938c(0x127)+_0x5f376c[_0x1e938c(0x135)]),console[_0x1e938c(0x12f)](''),console[_0x1e938c(0x12f)](_0x1e938c(0x144)+_0x1d2ee6[0x0]+_0x1e938c(0x11d)+_0x5f376c[_0x1e938c(0x135)]+_0x1e938c(0x142)),0x1;}catch(_0x1573c9){return console[_0x1e938c(0x12f)](_0x1e938c(0x12a)+_0x1573c9[_0x1e938c(0x11c)]),0x1;}else return console[_0x1e938c(0x12f)](_0x1e938c(0x132)),console[_0x1e938c(0x12f)]('\x20\x20tdx\x20tables\x20users\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20->\x20table\x20\x22users\x22\x20across\x20all\x20databases'),console[_0x1e938c(0x12f)]('\x20\x20tdx\x20tables\x20\x22mydb.*\x22\x20\x20\x20\x20\x20\x20\x20\x20->\x20all\x20tables\x20from\x20mydb'),console[_0x1e938c(0x12f)]('\x20\x20tdx\x20tables\x20\x22mydb.users\x22\x20\x20\x20\x20->\x20table\x20\x22users\x22\x20in\x20database\x20mydb'),console[_0x1e938c(0x12f)]('\x20\x20tdx\x20tables\x20\x22*.user*\x22\x20\x20\x20\x20\x20\x20\x20->\x20tables\x20matching\x20user*\x20across\x20databases'),console[_0x1e938c(0x12f)](_0x1e938c(0x125)),console[_0x1e938c(0x12f)](_0x1e938c(0x146)),0x1;}const _0x43a264=_0x8d695[_0x1e938c(0x12e)];!_0x5f376c[_0x1e938c(0x12e)]&&_0x43a264&&(_0x5f376c[_0x1e938c(0x12e)]=_0x43a264);try{const _0x37d23f=_0x5e2dca=>_0x5e2dca&&(_0x5e2dca[_0x1e938c(0x12d)]('*')||_0x5e2dca[_0x1e938c(0x12d)]('?')),_0x4b8ebb=_0x37d23f(_0x5f376c[_0x1e938c(0x12e)]);_0x8d695[_0x1e938c(0x145)]&&(console[_0x1e938c(0x12f)]('Site:\x20'+_0x8d695[_0x1e938c(0x12b)]),_0x5f376c['database']?_0x4b8ebb?console[_0x1e938c(0x12f)](_0x1e938c(0x11b)+_0x5f376c[_0x1e938c(0x12e)]):console[_0x1e938c(0x12f)](_0x1e938c(0x130)+_0x5f376c[_0x1e938c(0x12e)]):console[_0x1e938c(0x12f)](_0x1e938c(0x13c)),_0x5f376c[_0x1e938c(0x135)]&&console[_0x1e938c(0x12f)](_0x1e938c(0x119)+_0x5f376c[_0x1e938c(0x135)]));const _0x46c331=_0x5f376c[_0x1e938c(0x12e)]&&!_0x4b8ebb?_0x5f376c[_0x1e938c(0x12e)]:undefined,_0x2d41f6=_0x4b8ebb?_0x5f376c[_0x1e938c(0x12e)]:undefined,_0x58dbfb=_0x5f376c[_0x1e938c(0x135)],_0x34726e=resolveLimit(_0x8d695['limit'],DEFAULT_LISTING_LIMIT),_0x9730e5=await withSpinner(_0x1e938c(0x147),()=>_0x5d2d50[_0x1e938c(0x139)][_0x1e938c(0x129)](_0x46c331,_0x58dbfb,_0x2d41f6,_0x34726e),{'verbose':_0x8d695['verbose']}),_0x1344da=_0x9730e5[_0x1e938c(0x141)];if(_0x1344da[_0x1e938c(0x126)]===0x0&&_0x5f376c['database']&&!_0x4b8ebb)return console[_0x1e938c(0x12f)](_0x1e938c(0x133)),console[_0x1e938c(0x12f)](_0x1e938c(0x131)+_0x5f376c['database']+'\x27\x20may\x20not\x20exist\x20or\x20contains\x20no\x20tables'),0x1;return console['error'](_0x1e938c(0x134)+_0x1344da[_0x1e938c(0x126)]+'\x20table'+(_0x1344da[_0x1e938c(0x126)]!==0x1?'s':'')),await handleSDKOutput(_0x1344da,{..._0x8d695,'limit':_0x34726e}),0x0;}catch(_0x25f505){if(_0x25f505 instanceof SDKError)return console['error']('Error:\x20'+_0x25f505['message']),_0x25f505['cause']&&console['error'](_0x1e938c(0x13a)+_0x25f505[_0x1e938c(0x120)]),0x1;throw _0x25f505;}}['validate'](_0x38eff0){return undefined;}}
@@ -1 +1 @@
1
- const a43_0x21d84f=a43_0x5345;function a43_0x5345(_0x2a8617,_0x18f5eb){_0x2a8617=_0x2a8617-0x89;const _0x38450c=a43_0x3845();let _0x5345a3=_0x38450c[_0x2a8617];return _0x5345a3;}(function(_0x1e81b4,_0x4fac38){const _0x147473=a43_0x5345,_0x2f9fb2=_0x1e81b4();while(!![]){try{const _0x4da8e9=-parseInt(_0x147473(0xb4))/0x1+-parseInt(_0x147473(0xa4))/0x2*(-parseInt(_0x147473(0xb2))/0x3)+parseInt(_0x147473(0x8e))/0x4*(parseInt(_0x147473(0x8c))/0x5)+-parseInt(_0x147473(0x93))/0x6+parseInt(_0x147473(0xb3))/0x7*(-parseInt(_0x147473(0x8f))/0x8)+-parseInt(_0x147473(0xb5))/0x9*(parseInt(_0x147473(0xa6))/0xa)+parseInt(_0x147473(0x95))/0xb;if(_0x4da8e9===_0x4fac38)break;else _0x2f9fb2['push'](_0x2f9fb2['shift']());}catch(_0x109195){_0x2f9fb2['push'](_0x2f9fb2['shift']());}}}(a43_0x3845,0xe8a7e));import{BaseCommand}from'./command.js';import{getSessionID,cleanExpiredSessions,clearSessionContextField}from'../core/session.js';import{clearDefaultSiteFromUserConfig,clearActiveProfileFromUserConfig}from'../core/profile.js';import{getConfigDir}from'../core/config.js';function a43_0x3845(){const _0x4e539b=['site','message','llm_agent','llm_project','tdx.json','includes','Usage:\x20tdx\x20unset\x20<resource>\x0a','Default\x20site\x20','database','\x0aUpdated:\x20','Default\x20profile\x20','error','2138lbiIpY','(session:\x20','5211190CIiMnO','green','name','.\x20Must\x20be\x20one\x20of:\x20','execute','--default\x20can\x20only\x20be\x20used\x20with\x20\x27site\x27\x20or\x20\x27profile\x27.\x20Other\x20resources\x20are\x20session-level\x20only.','default','Invalid\x20resource:\x20','log','dim','agent','engage_workspace','2991oDcVGd','4605391EmPmTB','1821898IhoSBK','9tkWKBF','profile','cleared','session','10hRqUBy','\x20\x20\x20\x20\x20\x20\x20tdx\x20unset\x20--default\x20<resource>\x20\x20#\x20Clear\x20default\x20from\x20config\x0a','3546592VUJUDO','8poAOjV','description','parent_segment','join','3731880LuMheQ','length','19104569pYWYFB','validate','\x0aResources:\x20site,\x20database,\x20parent_segment,\x20llm_project,\x20agent,\x20profile,\x20engage_workspace\x0a'];a43_0x3845=function(){return _0x4e539b;};return a43_0x3845();}import a43_0x42ea0e from'chalk';import*as a43_0x64002e from'node:path';export class UnsetCommand extends BaseCommand{[a43_0x21d84f(0xa8)]='unset';[a43_0x21d84f(0x90)]='Clear\x20session-level\x20or\x20default\x20context\x20values';[a43_0x21d84f(0x96)](_0x2c07e7){const _0x103b59=a43_0x21d84f,{args:_0x2db306,options:_0x205ae6}=_0x2c07e7,_0x3424ee=_0x205ae6[_0x103b59(0xac)];if(_0x2db306[_0x103b59(0x94)]===0x0)return _0x103b59(0x9e)+_0x103b59(0x8d)+_0x103b59(0x97)+'\x0aRun\x20\x27tdx\x20unset\x20--help\x27\x20for\x20more\x20options';const _0x4515f6=_0x2db306[0x0],_0xd9c3a2=[_0x103b59(0x98),_0x103b59(0xa0),_0x103b59(0x91),_0x103b59(0x9b),_0x103b59(0xb0),_0x103b59(0x89),'engage_workspace'];if(!_0xd9c3a2[_0x103b59(0x9d)](_0x4515f6))return _0x103b59(0xad)+_0x4515f6+_0x103b59(0xa9)+_0xd9c3a2[_0x103b59(0x92)](',\x20');if(_0x3424ee&&_0x4515f6!==_0x103b59(0x98)&&_0x4515f6!==_0x103b59(0x89))return _0x103b59(0xab);return undefined;}async[a43_0x21d84f(0xaa)](_0x1e26e5){const _0x512103=a43_0x21d84f,{args:_0x2c3a06,options:_0x4e4432}=_0x1e26e5,_0x169965=_0x4e4432[_0x512103(0xac)];cleanExpiredSessions();try{const _0x569c61=_0x2c3a06[0x0],_0x10a085=a43_0x64002e['join'](getConfigDir(),_0x512103(0x9c));if(_0x169965){if(_0x569c61==='site')return clearDefaultSiteFromUserConfig(),console[_0x512103(0xae)](_0x512103(0x9f)+a43_0x42ea0e[_0x512103(0xa7)](_0x512103(0x8a))),console[_0x512103(0xae)](a43_0x42ea0e['dim'](_0x512103(0xa1)+_0x10a085)),0x0;if(_0x569c61===_0x512103(0x89))return clearActiveProfileFromUserConfig(),console[_0x512103(0xae)](_0x512103(0xa2)+a43_0x42ea0e[_0x512103(0xa7)](_0x512103(0x8a))),console[_0x512103(0xae)](a43_0x42ea0e['dim'](_0x512103(0xa1)+_0x10a085)),0x0;}const _0x3c04b4=getSessionID(_0x4e4432['session']),_0x1b7d34={'site':_0x512103(0x98),'database':_0x512103(0xa0),'parent_segment':_0x512103(0x91),'llm_project':_0x512103(0x9b),'agent':_0x512103(0x9a),'profile':_0x512103(0x89),'engage_workspace':_0x512103(0xb1)},_0x56006f=_0x1b7d34[_0x569c61];return _0x56006f&&(clearSessionContextField(_0x56006f,_0x4e4432[_0x512103(0x8b)]),console[_0x512103(0xae)]('Session\x20'+_0x569c61+'\x20'+a43_0x42ea0e[_0x512103(0xa7)](_0x512103(0x8a))+'\x20'+a43_0x42ea0e[_0x512103(0xaf)](_0x512103(0xa5)+_0x3c04b4+')'))),0x0;}catch(_0x4c9f8a){return _0x4c9f8a instanceof Error&&console[_0x512103(0xa3)]('Error:\x20'+_0x4c9f8a[_0x512103(0x99)]),0x1;}}}
1
+ const a43_0x5de2dc=a43_0x4f01;(function(_0x3b334d,_0x3de0cb){const _0x23529d=a43_0x4f01,_0x32aada=_0x3b334d();while(!![]){try{const _0x72a70=-parseInt(_0x23529d(0xf0))/0x1*(parseInt(_0x23529d(0xf5))/0x2)+parseInt(_0x23529d(0xe5))/0x3*(parseInt(_0x23529d(0xea))/0x4)+-parseInt(_0x23529d(0xf8))/0x5+parseInt(_0x23529d(0xe9))/0x6+parseInt(_0x23529d(0xe2))/0x7+parseInt(_0x23529d(0xe8))/0x8*(parseInt(_0x23529d(0xdf))/0x9)+-parseInt(_0x23529d(0xdc))/0xa;if(_0x72a70===_0x3de0cb)break;else _0x32aada['push'](_0x32aada['shift']());}catch(_0x25d4ab){_0x32aada['push'](_0x32aada['shift']());}}}(a43_0x4176,0xa2e98));function a43_0x4f01(_0x285684,_0x58c53f){_0x285684=_0x285684-0xdb;const _0x4176d1=a43_0x4176();let _0x4f01c0=_0x4176d1[_0x285684];return _0x4f01c0;}import{BaseCommand}from'./command.js';import{getSessionID,cleanExpiredSessions,clearSessionContextField}from'../core/session.js';import{clearDefaultSiteFromUserConfig,clearActiveProfileFromUserConfig}from'../core/profile.js';import{getConfigDir}from'../core/config.js';function a43_0x4176(){const _0x90498a=['54kLlwiU','message','default','7184247HTVzkd','session','--default\x20can\x20only\x20be\x20used\x20with\x20\x27site\x27\x20or\x20\x27profile\x27.\x20Other\x20resources\x20are\x20session-level\x20only.','819471WMZTLL','llm_project','site','1444096rirjYn','4770012aDHFJF','16FRUgaP','execute','dim','Default\x20profile\x20','\x0aRun\x20\x27tdx\x20unset\x20--help\x27\x20for\x20more\x20options','green','98wARWws','engage_workspace','includes','validate','profile','11078RCnUYM','Session\x20','join','759135ZrYphg','unset','(session:\x20','Error:\x20','cleared','log','\x20\x20\x20\x20\x20\x20\x20tdx\x20unset\x20--default\x20<resource>\x20\x20#\x20Clear\x20default\x20from\x20config\x0a','\x0aUpdated:\x20','Clear\x20session-level\x20or\x20default\x20context\x20values','parent_segment','\x0aResources:\x20site,\x20database,\x20parent_segment,\x20llm_project,\x20agent,\x20profile,\x20engage_workspace\x0a','26350860EByqHP','error','database'];a43_0x4176=function(){return _0x90498a;};return a43_0x4176();}import a43_0x2e317d from'chalk';import*as a43_0x49fe30 from'node:path';export class UnsetCommand extends BaseCommand{['name']=a43_0x5de2dc(0xf9);['description']=a43_0x5de2dc(0x100);[a43_0x5de2dc(0xf3)](_0x5eab32){const _0x4fa035=a43_0x5de2dc,{args:_0x47da61,options:_0x1aaf3c}=_0x5eab32,_0xfc8d5f=_0x1aaf3c['default'];if(_0x47da61['length']===0x0)return'Usage:\x20tdx\x20unset\x20<resource>\x0a'+_0x4fa035(0xfe)+_0x4fa035(0xdb)+_0x4fa035(0xee);const _0x498f8b=_0x47da61[0x0],_0x185326=['site','database',_0x4fa035(0x101),'llm_project','agent',_0x4fa035(0xf4),_0x4fa035(0xf1)];if(!_0x185326[_0x4fa035(0xf2)](_0x498f8b))return'Invalid\x20resource:\x20'+_0x498f8b+'.\x20Must\x20be\x20one\x20of:\x20'+_0x185326[_0x4fa035(0xf7)](',\x20');if(_0xfc8d5f&&_0x498f8b!=='site'&&_0x498f8b!=='profile')return _0x4fa035(0xe4);return undefined;}async[a43_0x5de2dc(0xeb)](_0x59ffcb){const _0x1c89b3=a43_0x5de2dc,{args:_0x20f405,options:_0x10fc44}=_0x59ffcb,_0x369cbf=_0x10fc44[_0x1c89b3(0xe1)];cleanExpiredSessions();try{const _0x27da9e=_0x20f405[0x0],_0x35a338=a43_0x49fe30[_0x1c89b3(0xf7)](getConfigDir(),'tdx.json');if(_0x369cbf){if(_0x27da9e===_0x1c89b3(0xe7))return clearDefaultSiteFromUserConfig(),console[_0x1c89b3(0xfd)]('Default\x20site\x20'+a43_0x2e317d[_0x1c89b3(0xef)](_0x1c89b3(0xfc))),console[_0x1c89b3(0xfd)](a43_0x2e317d[_0x1c89b3(0xec)](_0x1c89b3(0xff)+_0x35a338)),0x0;if(_0x27da9e===_0x1c89b3(0xf4))return clearActiveProfileFromUserConfig(),console['log'](_0x1c89b3(0xed)+a43_0x2e317d[_0x1c89b3(0xef)](_0x1c89b3(0xfc))),console[_0x1c89b3(0xfd)](a43_0x2e317d[_0x1c89b3(0xec)](_0x1c89b3(0xff)+_0x35a338)),0x0;}const _0x5db07f=getSessionID(_0x10fc44['session']),_0x27725c={'site':_0x1c89b3(0xe7),'database':_0x1c89b3(0xde),'parent_segment':_0x1c89b3(0x101),'llm_project':_0x1c89b3(0xe6),'agent':'llm_agent','profile':_0x1c89b3(0xf4),'engage_workspace':_0x1c89b3(0xf1)},_0x411ac8=_0x27725c[_0x27da9e];return _0x411ac8&&(clearSessionContextField(_0x411ac8,_0x10fc44[_0x1c89b3(0xe3)]),console[_0x1c89b3(0xfd)](_0x1c89b3(0xf6)+_0x27da9e+'\x20'+a43_0x2e317d[_0x1c89b3(0xef)](_0x1c89b3(0xfc))+'\x20'+a43_0x2e317d['dim'](_0x1c89b3(0xfa)+_0x5db07f+')'))),0x0;}catch(_0x230adf){return _0x230adf instanceof Error&&console[_0x1c89b3(0xdd)](_0x1c89b3(0xfb)+_0x230adf[_0x1c89b3(0xe0)]),0x1;}}}
@@ -1 +1 @@
1
- const a44_0x13f190=a44_0x4a3d;(function(_0x509ba1,_0x10baf3){const _0x158c03=a44_0x4a3d,_0x30b2dc=_0x509ba1();while(!![]){try{const _0x3b9a47=-parseInt(_0x158c03(0x138))/0x1*(parseInt(_0x158c03(0x15f))/0x2)+-parseInt(_0x158c03(0x17e))/0x3*(parseInt(_0x158c03(0x139))/0x4)+parseInt(_0x158c03(0x130))/0x5*(-parseInt(_0x158c03(0x14b))/0x6)+parseInt(_0x158c03(0x148))/0x7*(-parseInt(_0x158c03(0x176))/0x8)+parseInt(_0x158c03(0x173))/0x9+-parseInt(_0x158c03(0x164))/0xa+parseInt(_0x158c03(0x170))/0xb*(parseInt(_0x158c03(0x15c))/0xc);if(_0x3b9a47===_0x10baf3)break;else _0x30b2dc['push'](_0x30b2dc['shift']());}catch(_0x41372b){_0x30b2dc['push'](_0x30b2dc['shift']());}}}(a44_0x34d7,0x5aeed));import{BaseCommand}from'./command.js';import{saveSessionContext,getSessionID,cleanExpiredSessions,clearSessionContext}from'../core/session.js';import{profileExists,saveActiveProfileToUserConfig,saveDefaultSiteToUserConfig}from'../core/profile.js';import{GlobalContext}from'../core/global-context.js';import{parseAgentRef}from'../sdk/agent/agent-ref-parser.js';import{getConfigDir,saveReleaseChannel}from'../core/config.js';function a44_0x4a3d(_0x18c1c0,_0x4c98f4){_0x18c1c0=_0x18c1c0-0x12e;const _0x34d7e9=a44_0x34d7();let _0x4a3d39=_0x34d7e9[_0x18c1c0];return _0x4a3d39;}import{SDKError,ErrorCode}from'../sdk/errors.js';import{withSpinner}from'../utils/spinner.js';import a44_0x1580fb from'chalk';function a44_0x34d7(){const _0x1851ed=['\x0aSaved\x20to:\x20','tdx.json','agent','log','12VFvdlm','tdx','\x0aSet\x20context:\x20tdx\x20use\x20<resource>\x20<value>','16246whLLLD','profile','Install\x20the\x20latest\x20next\x20version:\x20npm\x20install\x20-g\x20@treasuredata/tdx@next','Session\x20context\x20','\x0aUse\x20\x27tdx\x20profiles\x27\x20to\x20see\x20available\x20profiles','2106810flQYCf','\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20--clear\x20\x20\x20\x20\x20\x20#\x20Clear\x20session\x20context\x0a','name','Set\x20session-level\x20context','Error:\x20Profile\x20\x27','engage_workspace','\x0aTip:\x20Use\x20\x27tdx\x20use\x20--default\x20site\x20','Use\x20--default\x20with\x20site,\x20profile,\x20or\x20release_channel\x20to\x20save\x20permanently','debug','\x0aResources:\x20site,\x20database,\x20parent_segment,\x20llm_project,\x20agent,\x20profile,\x20engage_workspace,\x20release_channel\x0a','engage','Default\x20profile\x20set\x20to:\x20','21480107VZOtqi','release_channel','dim','2160288khMIrq','release_channel\x20requires\x20--default.\x20Usage:\x20tdx\x20use\x20--default\x20release_channel\x20<stable|next>','\x27...','7784FYDWhH','llm_project','Error:\x20','Session\x20parent_segment\x20set\x20to:\x20','Release\x20channel\x20set\x20to:\x20','site','--default\x20can\x20only\x20be\x20used\x20with\x20\x27site\x27,\x20\x27profile\x27,\x20or\x20\x27release_channel\x27.\x20Other\x20resources\x20are\x20session-level\x20only.','clear','3dlNDkN','.\x20Must\x20be\x20one\x20of:\x20','green','database','\x0aTip:\x20Use\x20\x27tdx\x20use\x20--clear\x27\x20to\x20clear\x20session\x20overrides','\x0aUpdate\x20notifications\x20will\x20now\x20check\x20the\x20@next\x20channel.','145NacCjD','\x0aUpdate\x20notifications\x20will\x20check\x20the\x20@latest\x20(stable)\x20channel.','join','Default\x20site\x20set\x20to:\x20','Session\x20profile\x20set\x20to:\x20','NOT_FOUND','displayWithSources','validate','37BMLaCr','2493688BNCpko','next','\x27\x20does\x20not\x20exist','Session\x20agent\x20set\x20to:\x20','Verifying\x20workspace\x20\x27','Invalid\x20release\x20channel:\x20','includes','message','\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20--default\x20release_channel\x20<stable|next>\x20\x20#\x20Set\x20release\x20channel\x0a','Session\x20database\x20set\x20to:\x20','session','(session:\x20','description','llm_agent','error','371EBOXML','code','\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20--default\x20profile\x20<value>\x20\x20#\x20Save\x20default\x20profile\x20to\x20config\x0a','131190aROPbL','\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20current\x20context\x0a','length','stable','\x0aTip:\x20Use\x20\x27tdx\x20use\x20--default\x20profile\x20','.\x20Must\x20be\x20\x27stable\x27\x20or\x20\x27next\x27.','parent_segment','Session\x20site\x20set\x20to:\x20','INVALID_ARGUMENT','\x27\x20to\x20save\x20permanently','\x0aUse\x20\x27tdx\x20engage\x20workspace\x20list\x27\x20to\x20see\x20available\x20workspaces','Session\x20engage_workspace\x20set\x20to:\x20','execute'];a44_0x34d7=function(){return _0x1851ed;};return a44_0x34d7();}import*as a44_0x1c40ea from'node:path';export class UseCommand extends BaseCommand{[a44_0x13f190(0x166)]='use';[a44_0x13f190(0x145)]=a44_0x13f190(0x167);[a44_0x13f190(0x137)](_0x75427f){const _0x2d56df=a44_0x13f190,{args:_0x31fae3,options:_0x51f410}=_0x75427f,_0x2f63c8=_0x51f410['default'];if(_0x31fae3[_0x2d56df(0x14d)]===0x0)return undefined;if(_0x31fae3[_0x2d56df(0x14d)]===0x1)return'Usage:\x20tdx\x20use\x20<resource>\x20<value>\x0a'+_0x2d56df(0x14c)+_0x2d56df(0x165)+'\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20--default\x20site\x20<value>\x20\x20\x20\x20\x20#\x20Save\x20default\x20site\x20to\x20config\x0a'+_0x2d56df(0x14a)+_0x2d56df(0x141)+_0x2d56df(0x16d)+'\x0aRun\x20\x27tdx\x20use\x20--help\x27\x20for\x20more\x20options';const _0x30a191=_0x31fae3[0x0],_0xc3e1b3=['site',_0x2d56df(0x181),'parent_segment',_0x2d56df(0x177),_0x2d56df(0x15a),_0x2d56df(0x160),_0x2d56df(0x169),_0x2d56df(0x171)];if(!_0xc3e1b3[_0x2d56df(0x13f)](_0x30a191))return'Invalid\x20resource:\x20'+_0x30a191+_0x2d56df(0x17f)+_0xc3e1b3['join'](',\x20');if(_0x2f63c8&&_0x30a191!==_0x2d56df(0x17b)&&_0x30a191!==_0x2d56df(0x160)&&_0x30a191!==_0x2d56df(0x171))return _0x2d56df(0x17c);if(_0x30a191===_0x2d56df(0x171)&&!_0x2f63c8)return _0x2d56df(0x174);if(_0x30a191===_0x2d56df(0x171)){const _0x75e158=_0x31fae3[0x1];if(_0x75e158!==_0x2d56df(0x14e)&&_0x75e158!==_0x2d56df(0x13a))return _0x2d56df(0x13e)+_0x75e158+_0x2d56df(0x150);}return undefined;}async[a44_0x13f190(0x157)](_0x580337){const _0x1c3a42=a44_0x13f190,{args:_0x4483ec,options:_0x30ccee}=_0x580337,_0x515e71=_0x30ccee[_0x1c3a42(0x16c)],_0x23d20d=_0x30ccee[_0x1c3a42(0x17d)],_0x1e674a=_0x30ccee['default'];cleanExpiredSessions();try{if(_0x23d20d){clearSessionContext(_0x30ccee[_0x1c3a42(0x143)]);const _0x1e5348=getSessionID(_0x30ccee['session']);return console[_0x1c3a42(0x15b)](_0x1c3a42(0x162)+a44_0x1580fb['green']('cleared')+'\x20'+a44_0x1580fb[_0x1c3a42(0x172)](_0x1c3a42(0x144)+_0x1e5348+')')),0x0;}if(_0x4483ec[_0x1c3a42(0x14d)]===0x0){const _0x34e311=new GlobalContext(_0x30ccee);return _0x515e71?_0x34e311[_0x1c3a42(0x136)]():_0x34e311['display'](),console[_0x1c3a42(0x15b)](a44_0x1580fb[_0x1c3a42(0x172)](_0x1c3a42(0x15e))),console[_0x1c3a42(0x15b)](a44_0x1580fb['dim']('Resources:\x20site,\x20database,\x20parent_segment,\x20llm_project,\x20agent,\x20profile,\x20engage_workspace,\x20release_channel')),console[_0x1c3a42(0x15b)](a44_0x1580fb[_0x1c3a42(0x172)](_0x1c3a42(0x16b))),0x0;}const _0x30673c=_0x4483ec[0x0],_0x5160a9=_0x4483ec[0x1],_0x5e125e=a44_0x1c40ea[_0x1c3a42(0x132)](getConfigDir(),_0x1c3a42(0x159));if(_0x1e674a){if(_0x30673c===_0x1c3a42(0x17b))return saveDefaultSiteToUserConfig(_0x5160a9),console[_0x1c3a42(0x15b)](_0x1c3a42(0x133)+a44_0x1580fb[_0x1c3a42(0x180)](_0x5160a9)),console['log'](a44_0x1580fb['dim'](_0x1c3a42(0x158)+_0x5e125e)),0x0;if(_0x30673c===_0x1c3a42(0x160)){if(!profileExists(_0x5160a9))return console[_0x1c3a42(0x147)](_0x1c3a42(0x168)+_0x5160a9+'\x27\x20does\x20not\x20exist'),console['error'](_0x1c3a42(0x163)),0x1;return saveActiveProfileToUserConfig(_0x5160a9),console[_0x1c3a42(0x15b)](_0x1c3a42(0x16f)+a44_0x1580fb[_0x1c3a42(0x180)](_0x5160a9)),console['log'](a44_0x1580fb[_0x1c3a42(0x172)]('\x0aSaved\x20to:\x20'+_0x5e125e)),0x0;}if(_0x30673c===_0x1c3a42(0x171))return saveReleaseChannel(_0x5160a9),console[_0x1c3a42(0x15b)](_0x1c3a42(0x17a)+a44_0x1580fb[_0x1c3a42(0x180)](_0x5160a9)),console[_0x1c3a42(0x15b)](a44_0x1580fb['dim']('\x0aSaved\x20to:\x20'+_0x5e125e)),_0x5160a9===_0x1c3a42(0x13a)?(console[_0x1c3a42(0x15b)](a44_0x1580fb['dim'](_0x1c3a42(0x12f))),console[_0x1c3a42(0x15b)](a44_0x1580fb[_0x1c3a42(0x172)](_0x1c3a42(0x161)))):console[_0x1c3a42(0x15b)](a44_0x1580fb['dim'](_0x1c3a42(0x131))),0x0;}if(_0x30673c==='site'){const _0x380a73=getSessionID(_0x30ccee[_0x1c3a42(0x143)]);return saveSessionContext({'site':_0x5160a9},_0x30ccee['session']),console['log'](_0x1c3a42(0x152)+a44_0x1580fb[_0x1c3a42(0x180)](_0x5160a9)+'\x20'+a44_0x1580fb['dim'](_0x1c3a42(0x144)+_0x380a73+')')),console['log'](a44_0x1580fb[_0x1c3a42(0x172)](_0x1c3a42(0x16a)+_0x5160a9+_0x1c3a42(0x154))),0x0;}if(_0x30673c===_0x1c3a42(0x160)){if(!profileExists(_0x5160a9))return console['error'](_0x1c3a42(0x168)+_0x5160a9+_0x1c3a42(0x13b)),console[_0x1c3a42(0x147)]('\x0aUse\x20\x27tdx\x20profiles\x27\x20to\x20see\x20available\x20profiles'),0x1;const _0x6d6d0c=getSessionID(_0x30ccee['session']);return saveSessionContext({'profile':_0x5160a9},_0x30ccee[_0x1c3a42(0x143)]),console[_0x1c3a42(0x15b)](_0x1c3a42(0x134)+a44_0x1580fb['green'](_0x5160a9)+'\x20'+a44_0x1580fb[_0x1c3a42(0x172)](_0x1c3a42(0x144)+_0x6d6d0c+')')),console['log'](a44_0x1580fb['dim'](_0x1c3a42(0x14f)+_0x5160a9+_0x1c3a42(0x154))),0x0;}const _0x532e04={},_0x59d113=getSessionID(_0x30ccee[_0x1c3a42(0x143)]);switch(_0x30673c){case _0x1c3a42(0x181):_0x532e04[_0x1c3a42(0x181)]=_0x5160a9,console[_0x1c3a42(0x15b)](_0x1c3a42(0x142)+a44_0x1580fb[_0x1c3a42(0x180)](_0x5160a9)+'\x20'+a44_0x1580fb[_0x1c3a42(0x172)](_0x1c3a42(0x144)+_0x59d113+')'));break;case _0x1c3a42(0x151):_0x532e04[_0x1c3a42(0x151)]=_0x5160a9,console[_0x1c3a42(0x15b)](_0x1c3a42(0x179)+a44_0x1580fb[_0x1c3a42(0x180)](_0x5160a9)+'\x20'+a44_0x1580fb[_0x1c3a42(0x172)](_0x1c3a42(0x144)+_0x59d113+')'));break;case'llm_project':_0x532e04[_0x1c3a42(0x177)]=_0x5160a9,console[_0x1c3a42(0x15b)]('Session\x20llm_project\x20set\x20to:\x20'+a44_0x1580fb[_0x1c3a42(0x180)](_0x5160a9)+'\x20'+a44_0x1580fb[_0x1c3a42(0x172)](_0x1c3a42(0x144)+_0x59d113+')'));break;case _0x1c3a42(0x15a):{const {projectName:_0x35a673,agentName:_0x3e794b}=parseAgentRef(_0x5160a9);_0x3e794b?(_0x532e04[_0x1c3a42(0x177)]=_0x35a673,_0x532e04['llm_agent']=_0x3e794b,console[_0x1c3a42(0x15b)]('Session\x20llm_project\x20set\x20to:\x20'+a44_0x1580fb['green'](_0x35a673)+'\x20'+a44_0x1580fb[_0x1c3a42(0x172)](_0x1c3a42(0x144)+_0x59d113+')')),console[_0x1c3a42(0x15b)](_0x1c3a42(0x13c)+a44_0x1580fb[_0x1c3a42(0x180)](_0x3e794b)+'\x20'+a44_0x1580fb[_0x1c3a42(0x172)](_0x1c3a42(0x144)+_0x59d113+')'))):(_0x532e04[_0x1c3a42(0x146)]=_0x5160a9,console['log'](_0x1c3a42(0x13c)+a44_0x1580fb['green'](_0x5160a9)+'\x20'+a44_0x1580fb[_0x1c3a42(0x172)](_0x1c3a42(0x144)+_0x59d113+')')));break;}case _0x1c3a42(0x169):{try{await withSpinner(_0x1c3a42(0x13d)+_0x5160a9+_0x1c3a42(0x175),()=>_0x580337[_0x1c3a42(0x15d)][_0x1c3a42(0x16e)]['resolveWorkspaceId'](_0x5160a9));}catch(_0xc4317f){if(_0xc4317f instanceof SDKError&&(_0xc4317f[_0x1c3a42(0x149)]===ErrorCode[_0x1c3a42(0x135)]||_0xc4317f['code']===ErrorCode[_0x1c3a42(0x153)]))return console[_0x1c3a42(0x147)](_0x1c3a42(0x178)+_0xc4317f[_0x1c3a42(0x140)]),console[_0x1c3a42(0x147)](_0x1c3a42(0x155)),0x1;throw _0xc4317f;}_0x532e04[_0x1c3a42(0x169)]=_0x5160a9,console['log'](_0x1c3a42(0x156)+a44_0x1580fb[_0x1c3a42(0x180)](_0x5160a9)+'\x20'+a44_0x1580fb['dim'](_0x1c3a42(0x144)+_0x59d113+')'));break;}}return saveSessionContext(_0x532e04,_0x30ccee[_0x1c3a42(0x143)]),console[_0x1c3a42(0x15b)](a44_0x1580fb[_0x1c3a42(0x172)](_0x1c3a42(0x12e))),0x0;}catch(_0x11976e){return _0x11976e instanceof Error&&console[_0x1c3a42(0x147)]('Error:\x20'+_0x11976e[_0x1c3a42(0x140)]),0x1;}}}
1
+ const a44_0x309475=a44_0xc061;(function(_0x90eb8e,_0x9f9a11){const _0x10d405=a44_0xc061,_0x15535c=_0x90eb8e();while(!![]){try{const _0x1c43f6=-parseInt(_0x10d405(0x131))/0x1*(parseInt(_0x10d405(0x124))/0x2)+-parseInt(_0x10d405(0x160))/0x3+parseInt(_0x10d405(0x155))/0x4+-parseInt(_0x10d405(0x145))/0x5+parseInt(_0x10d405(0x14d))/0x6*(parseInt(_0x10d405(0x15c))/0x7)+-parseInt(_0x10d405(0x122))/0x8*(-parseInt(_0x10d405(0x13e))/0x9)+parseInt(_0x10d405(0x14b))/0xa;if(_0x1c43f6===_0x9f9a11)break;else _0x15535c['push'](_0x15535c['shift']());}catch(_0x280e90){_0x15535c['push'](_0x15535c['shift']());}}}(a44_0x3dbb,0x99ad5));function a44_0xc061(_0x12c14b,_0x4f446b){_0x12c14b=_0x12c14b-0x11e;const _0x3dbbdb=a44_0x3dbb();let _0xc06128=_0x3dbbdb[_0x12c14b];return _0xc06128;}function a44_0x3dbb(){const _0x539c42=['default','release_channel','message','(session:\x20','includes','Session\x20llm_project\x20set\x20to:\x20','\x27\x20to\x20save\x20permanently','displayWithSources','\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20--default\x20site\x20<value>\x20\x20\x20\x20\x20#\x20Save\x20default\x20site\x20to\x20config\x0a','tdx','parent_segment','16wjmaNb','Resources:\x20site,\x20database,\x20parent_segment,\x20llm_project,\x20agent,\x20profile,\x20engage_workspace,\x20release_channel','18zTgibA','Session\x20context\x20','Session\x20parent_segment\x20set\x20to:\x20','\x0aTip:\x20Use\x20\x27tdx\x20use\x20--clear\x27\x20to\x20clear\x20session\x20overrides','\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20--clear\x20\x20\x20\x20\x20\x20#\x20Clear\x20session\x20context\x0a','Usage:\x20tdx\x20use\x20<resource>\x20<value>\x0a','length','NOT_FOUND','next','validate','display','Error:\x20','debug','53731VbXVuf','Install\x20the\x20latest\x20next\x20version:\x20npm\x20install\x20-g\x20@treasuredata/tdx@next','log','\x0aSaved\x20to:\x20','code','use','\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20--default\x20profile\x20<value>\x20\x20#\x20Save\x20default\x20profile\x20to\x20config\x0a','name','\x27\x20does\x20not\x20exist','\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20--default\x20release_channel\x20<stable|next>\x20\x20#\x20Set\x20release\x20channel\x0a','Set\x20session-level\x20context','stable','\x0aUpdate\x20notifications\x20will\x20check\x20the\x20@latest\x20(stable)\x20channel.','4254147gfVjSu','green','\x0aTip:\x20Use\x20\x27tdx\x20use\x20--default\x20site\x20','Error:\x20Profile\x20\x27','Verifying\x20workspace\x20\x27','join','engage','2695445FXPnnk','\x27...','\x0aTip:\x20Use\x20\x27tdx\x20use\x20--default\x20profile\x20','.\x20Must\x20be\x20\x27stable\x27\x20or\x20\x27next\x27.','engage_workspace','session','4072070qDTpOP','Session\x20database\x20set\x20to:\x20','72zTYnPv','tdx.json','Session\x20agent\x20set\x20to:\x20','INVALID_ARGUMENT','dim','llm_project','\x0aRun\x20\x27tdx\x20use\x20--help\x27\x20for\x20more\x20options','Session\x20site\x20set\x20to:\x20','870476uBuBzp','Invalid\x20resource:\x20','profile','site','database','Default\x20site\x20set\x20to:\x20','--default\x20can\x20only\x20be\x20used\x20with\x20\x27site\x27,\x20\x27profile\x27,\x20or\x20\x27release_channel\x27.\x20Other\x20resources\x20are\x20session-level\x20only.','626059nCrtGf','description','llm_agent','agent','2973921gGNKqn','\x0aResources:\x20site,\x20database,\x20parent_segment,\x20llm_project,\x20agent,\x20profile,\x20engage_workspace,\x20release_channel\x0a','\x0aUse\x20\x27tdx\x20profiles\x27\x20to\x20see\x20available\x20profiles','clear','Invalid\x20release\x20channel:\x20','error','Release\x20channel\x20set\x20to:\x20','Default\x20profile\x20set\x20to:\x20','Use\x20--default\x20with\x20site,\x20profile,\x20or\x20release_channel\x20to\x20save\x20permanently'];a44_0x3dbb=function(){return _0x539c42;};return a44_0x3dbb();}import{BaseCommand}from'./command.js';import{saveSessionContext,getSessionID,cleanExpiredSessions,clearSessionContext}from'../core/session.js';import{profileExists,saveActiveProfileToUserConfig,saveDefaultSiteToUserConfig}from'../core/profile.js';import{GlobalContext}from'../core/global-context.js';import{parseAgentRef}from'../sdk/agent/agent-ref-parser.js';import{getConfigDir,saveReleaseChannel}from'../core/config.js';import{SDKError,ErrorCode}from'../sdk/errors.js';import{withSpinner}from'../utils/spinner.js';import a44_0x9be528 from'chalk';import*as a44_0x118633 from'node:path';export class UseCommand extends BaseCommand{[a44_0x309475(0x138)]=a44_0x309475(0x136);[a44_0x309475(0x15d)]=a44_0x309475(0x13b);[a44_0x309475(0x12d)](_0x9f1f9){const _0x39b563=a44_0x309475,{args:_0x19a917,options:_0x504f29}=_0x9f1f9,_0x2e3e8d=_0x504f29[_0x39b563(0x169)];if(_0x19a917['length']===0x0)return undefined;if(_0x19a917['length']===0x1)return _0x39b563(0x129)+'\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'+_0x39b563(0x128)+_0x39b563(0x11f)+_0x39b563(0x137)+_0x39b563(0x13a)+_0x39b563(0x161)+_0x39b563(0x153);const _0x3c8205=_0x19a917[0x0],_0xa98c3e=[_0x39b563(0x158),_0x39b563(0x159),_0x39b563(0x121),_0x39b563(0x152),_0x39b563(0x15f),_0x39b563(0x157),_0x39b563(0x149),'release_channel'];if(!_0xa98c3e[_0x39b563(0x16d)](_0x3c8205))return _0x39b563(0x156)+_0x3c8205+'.\x20Must\x20be\x20one\x20of:\x20'+_0xa98c3e[_0x39b563(0x143)](',\x20');if(_0x2e3e8d&&_0x3c8205!=='site'&&_0x3c8205!==_0x39b563(0x157)&&_0x3c8205!==_0x39b563(0x16a))return _0x39b563(0x15b);if(_0x3c8205===_0x39b563(0x16a)&&!_0x2e3e8d)return'release_channel\x20requires\x20--default.\x20Usage:\x20tdx\x20use\x20--default\x20release_channel\x20<stable|next>';if(_0x3c8205===_0x39b563(0x16a)){const _0x4584f2=_0x19a917[0x1];if(_0x4584f2!==_0x39b563(0x13c)&&_0x4584f2!==_0x39b563(0x12c))return _0x39b563(0x164)+_0x4584f2+_0x39b563(0x148);}return undefined;}async['execute'](_0x10ca0e){const _0x54dbf5=a44_0x309475,{args:_0x25d0db,options:_0xbfadb}=_0x10ca0e,_0x518f23=_0xbfadb[_0x54dbf5(0x130)],_0x31cf89=_0xbfadb[_0x54dbf5(0x163)],_0xa029dd=_0xbfadb['default'];cleanExpiredSessions();try{if(_0x31cf89){clearSessionContext(_0xbfadb[_0x54dbf5(0x14a)]);const _0x268841=getSessionID(_0xbfadb['session']);return console[_0x54dbf5(0x133)](_0x54dbf5(0x125)+a44_0x9be528[_0x54dbf5(0x13f)]('cleared')+'\x20'+a44_0x9be528[_0x54dbf5(0x151)](_0x54dbf5(0x16c)+_0x268841+')')),0x0;}if(_0x25d0db[_0x54dbf5(0x12a)]===0x0){const _0x274172=new GlobalContext(_0xbfadb);return _0x518f23?_0x274172[_0x54dbf5(0x11e)]():_0x274172[_0x54dbf5(0x12e)](),console['log'](a44_0x9be528['dim']('\x0aSet\x20context:\x20tdx\x20use\x20<resource>\x20<value>')),console['log'](a44_0x9be528[_0x54dbf5(0x151)](_0x54dbf5(0x123))),console['log'](a44_0x9be528[_0x54dbf5(0x151)](_0x54dbf5(0x168))),0x0;}const _0x44f259=_0x25d0db[0x0],_0x22592c=_0x25d0db[0x1],_0x31588a=a44_0x118633[_0x54dbf5(0x143)](getConfigDir(),_0x54dbf5(0x14e));if(_0xa029dd){if(_0x44f259===_0x54dbf5(0x158))return saveDefaultSiteToUserConfig(_0x22592c),console[_0x54dbf5(0x133)](_0x54dbf5(0x15a)+a44_0x9be528[_0x54dbf5(0x13f)](_0x22592c)),console[_0x54dbf5(0x133)](a44_0x9be528[_0x54dbf5(0x151)](_0x54dbf5(0x134)+_0x31588a)),0x0;if(_0x44f259===_0x54dbf5(0x157)){if(!profileExists(_0x22592c))return console[_0x54dbf5(0x165)](_0x54dbf5(0x141)+_0x22592c+'\x27\x20does\x20not\x20exist'),console[_0x54dbf5(0x165)]('\x0aUse\x20\x27tdx\x20profiles\x27\x20to\x20see\x20available\x20profiles'),0x1;return saveActiveProfileToUserConfig(_0x22592c),console[_0x54dbf5(0x133)](_0x54dbf5(0x167)+a44_0x9be528[_0x54dbf5(0x13f)](_0x22592c)),console[_0x54dbf5(0x133)](a44_0x9be528[_0x54dbf5(0x151)](_0x54dbf5(0x134)+_0x31588a)),0x0;}if(_0x44f259==='release_channel')return saveReleaseChannel(_0x22592c),console[_0x54dbf5(0x133)](_0x54dbf5(0x166)+a44_0x9be528[_0x54dbf5(0x13f)](_0x22592c)),console['log'](a44_0x9be528[_0x54dbf5(0x151)](_0x54dbf5(0x134)+_0x31588a)),_0x22592c===_0x54dbf5(0x12c)?(console[_0x54dbf5(0x133)](a44_0x9be528[_0x54dbf5(0x151)]('\x0aUpdate\x20notifications\x20will\x20now\x20check\x20the\x20@next\x20channel.')),console[_0x54dbf5(0x133)](a44_0x9be528[_0x54dbf5(0x151)](_0x54dbf5(0x132)))):console[_0x54dbf5(0x133)](a44_0x9be528[_0x54dbf5(0x151)](_0x54dbf5(0x13d))),0x0;}if(_0x44f259==='site'){const _0x32645b=getSessionID(_0xbfadb[_0x54dbf5(0x14a)]);return saveSessionContext({'site':_0x22592c},_0xbfadb[_0x54dbf5(0x14a)]),console[_0x54dbf5(0x133)](_0x54dbf5(0x154)+a44_0x9be528[_0x54dbf5(0x13f)](_0x22592c)+'\x20'+a44_0x9be528[_0x54dbf5(0x151)]('(session:\x20'+_0x32645b+')')),console[_0x54dbf5(0x133)](a44_0x9be528[_0x54dbf5(0x151)](_0x54dbf5(0x140)+_0x22592c+'\x27\x20to\x20save\x20permanently')),0x0;}if(_0x44f259==='profile'){if(!profileExists(_0x22592c))return console[_0x54dbf5(0x165)](_0x54dbf5(0x141)+_0x22592c+_0x54dbf5(0x139)),console[_0x54dbf5(0x165)](_0x54dbf5(0x162)),0x1;const _0x4aa1b4=getSessionID(_0xbfadb[_0x54dbf5(0x14a)]);return saveSessionContext({'profile':_0x22592c},_0xbfadb['session']),console['log']('Session\x20profile\x20set\x20to:\x20'+a44_0x9be528[_0x54dbf5(0x13f)](_0x22592c)+'\x20'+a44_0x9be528[_0x54dbf5(0x151)](_0x54dbf5(0x16c)+_0x4aa1b4+')')),console[_0x54dbf5(0x133)](a44_0x9be528['dim'](_0x54dbf5(0x147)+_0x22592c+_0x54dbf5(0x16f))),0x0;}const _0x434697={},_0x5ace92=getSessionID(_0xbfadb[_0x54dbf5(0x14a)]);switch(_0x44f259){case _0x54dbf5(0x159):_0x434697[_0x54dbf5(0x159)]=_0x22592c,console[_0x54dbf5(0x133)](_0x54dbf5(0x14c)+a44_0x9be528[_0x54dbf5(0x13f)](_0x22592c)+'\x20'+a44_0x9be528['dim'](_0x54dbf5(0x16c)+_0x5ace92+')'));break;case'parent_segment':_0x434697[_0x54dbf5(0x121)]=_0x22592c,console['log'](_0x54dbf5(0x126)+a44_0x9be528[_0x54dbf5(0x13f)](_0x22592c)+'\x20'+a44_0x9be528['dim'](_0x54dbf5(0x16c)+_0x5ace92+')'));break;case _0x54dbf5(0x152):_0x434697['llm_project']=_0x22592c,console[_0x54dbf5(0x133)](_0x54dbf5(0x16e)+a44_0x9be528['green'](_0x22592c)+'\x20'+a44_0x9be528[_0x54dbf5(0x151)](_0x54dbf5(0x16c)+_0x5ace92+')'));break;case _0x54dbf5(0x15f):{const {projectName:_0x3de856,agentName:_0x4919f6}=parseAgentRef(_0x22592c);_0x4919f6?(_0x434697[_0x54dbf5(0x152)]=_0x3de856,_0x434697[_0x54dbf5(0x15e)]=_0x4919f6,console[_0x54dbf5(0x133)](_0x54dbf5(0x16e)+a44_0x9be528[_0x54dbf5(0x13f)](_0x3de856)+'\x20'+a44_0x9be528['dim'](_0x54dbf5(0x16c)+_0x5ace92+')')),console['log'](_0x54dbf5(0x14f)+a44_0x9be528['green'](_0x4919f6)+'\x20'+a44_0x9be528[_0x54dbf5(0x151)](_0x54dbf5(0x16c)+_0x5ace92+')'))):(_0x434697['llm_agent']=_0x22592c,console[_0x54dbf5(0x133)](_0x54dbf5(0x14f)+a44_0x9be528[_0x54dbf5(0x13f)](_0x22592c)+'\x20'+a44_0x9be528['dim']('(session:\x20'+_0x5ace92+')')));break;}case _0x54dbf5(0x149):{try{await withSpinner(_0x54dbf5(0x142)+_0x22592c+_0x54dbf5(0x146),()=>_0x10ca0e[_0x54dbf5(0x120)][_0x54dbf5(0x144)]['resolveWorkspaceId'](_0x22592c));}catch(_0x3a4d91){if(_0x3a4d91 instanceof SDKError&&(_0x3a4d91['code']===ErrorCode[_0x54dbf5(0x12b)]||_0x3a4d91[_0x54dbf5(0x135)]===ErrorCode[_0x54dbf5(0x150)]))return console['error'](_0x54dbf5(0x12f)+_0x3a4d91[_0x54dbf5(0x16b)]),console[_0x54dbf5(0x165)]('\x0aUse\x20\x27tdx\x20engage\x20workspace\x20list\x27\x20to\x20see\x20available\x20workspaces'),0x1;throw _0x3a4d91;}_0x434697[_0x54dbf5(0x149)]=_0x22592c,console[_0x54dbf5(0x133)]('Session\x20engage_workspace\x20set\x20to:\x20'+a44_0x9be528[_0x54dbf5(0x13f)](_0x22592c)+'\x20'+a44_0x9be528[_0x54dbf5(0x151)](_0x54dbf5(0x16c)+_0x5ace92+')'));break;}}return saveSessionContext(_0x434697,_0xbfadb[_0x54dbf5(0x14a)]),console[_0x54dbf5(0x133)](a44_0x9be528[_0x54dbf5(0x151)](_0x54dbf5(0x127))),0x0;}catch(_0x561efd){return _0x561efd instanceof Error&&console[_0x54dbf5(0x165)](_0x54dbf5(0x12f)+_0x561efd[_0x54dbf5(0x16b)]),0x1;}}}
@@ -1 +1 @@
1
- const a45_0x3b9456=a45_0x1650;(function(_0x42d01f,_0x4f1b66){const _0x135806=a45_0x1650,_0x4aea55=_0x42d01f();while(!![]){try{const _0x421d2c=-parseInt(_0x135806(0x161))/0x1*(parseInt(_0x135806(0x154))/0x2)+parseInt(_0x135806(0x159))/0x3+parseInt(_0x135806(0x15c))/0x4*(parseInt(_0x135806(0x15b))/0x5)+-parseInt(_0x135806(0x147))/0x6+parseInt(_0x135806(0x153))/0x7+-parseInt(_0x135806(0x14d))/0x8*(parseInt(_0x135806(0x14a))/0x9)+parseInt(_0x135806(0x155))/0xa;if(_0x421d2c===_0x4f1b66)break;else _0x4aea55['push'](_0x4aea55['shift']());}catch(_0x5609ae){_0x4aea55['push'](_0x4aea55['shift']());}}}(a45_0x4669,0xcb24d));import{BaseCommand}from'./command.js';function a45_0x1650(_0x349177,_0x4239fc){_0x349177=_0x349177-0x147;const _0x466900=a45_0x4669();let _0x1650e4=_0x466900[_0x349177];return _0x1650e4;}import{SDKError}from'../sdk/index.js';import{handleSDKOutput,handleSingleObjectOutput}from'../core/command-output.js';function a45_0x4669(){const _0x1038e1=['\x20user','7981015JuPcea','1986962mxybhQ','14706710bEJKYd','Show\x20current\x20user\x20information','execute','name','1105803ZSnrFq','data','66440rQfYoM','268bjqPVr','\x20\x20Cause:\x20','verbose','getCurrent','length','1rgMPTb','6162768nSvUjv','Error:\x20','Fetching\x20user\x20info...','3051081gcHvtd','error','user','24UaNzAr','message','✔\x20Found\x20','Listing\x20users...','cause'];a45_0x4669=function(){return _0x1038e1;};return a45_0x4669();}import{withSpinner}from'../utils/spinner.js';export class UserCommand extends BaseCommand{[a45_0x3b9456(0x158)]='user';['description']=a45_0x3b9456(0x156);async[a45_0x3b9456(0x157)](_0x549010){const _0x4e79dc=a45_0x3b9456,{options:_0x2042bd,tdx:_0x2281c3}=_0x549010;try{const _0x49b82f=await withSpinner(_0x4e79dc(0x149),()=>_0x2281c3['user'][_0x4e79dc(0x15f)](),{'verbose':_0x2042bd[_0x4e79dc(0x15e)]}),_0x47dc35=_0x49b82f[_0x4e79dc(0x15a)];return await handleSingleObjectOutput(_0x47dc35,_0x2042bd),0x0;}catch(_0x50bd98){if(_0x50bd98 instanceof SDKError)return console[_0x4e79dc(0x14b)](_0x4e79dc(0x148)+_0x50bd98[_0x4e79dc(0x14e)]),_0x50bd98[_0x4e79dc(0x151)]&&console[_0x4e79dc(0x14b)](_0x4e79dc(0x15d)+_0x50bd98[_0x4e79dc(0x151)]),0x1;throw _0x50bd98;}}}export class UserListCommand extends BaseCommand{[a45_0x3b9456(0x158)]='user\x20list';['description']='List\x20all\x20users\x20in\x20the\x20account';async[a45_0x3b9456(0x157)](_0x6fc8ef){const _0x5e5992=a45_0x3b9456,{options:_0x5287c3,tdx:_0x45e051}=_0x6fc8ef;try{const _0x53e1c5=await withSpinner(_0x5e5992(0x150),()=>_0x45e051[_0x5e5992(0x14c)]['list'](),{'verbose':_0x5287c3[_0x5e5992(0x15e)]}),_0x23ba52=_0x53e1c5[_0x5e5992(0x15a)];return console[_0x5e5992(0x14b)](_0x5e5992(0x14f)+_0x23ba52[_0x5e5992(0x160)]+_0x5e5992(0x152)+(_0x23ba52[_0x5e5992(0x160)]!==0x1?'s':'')),await handleSDKOutput(_0x23ba52,_0x5287c3),0x0;}catch(_0x420349){if(_0x420349 instanceof SDKError)return console['error'](_0x5e5992(0x148)+_0x420349[_0x5e5992(0x14e)]),_0x420349['cause']&&console[_0x5e5992(0x14b)](_0x5e5992(0x15d)+_0x420349[_0x5e5992(0x151)]),0x1;throw _0x420349;}}}
1
+ const a45_0x3e458a=a45_0x2fdb;(function(_0x3c0991,_0x4fe358){const _0x3324f2=a45_0x2fdb,_0x32264d=_0x3c0991();while(!![]){try{const _0x1570ca=-parseInt(_0x3324f2(0x1d0))/0x1+-parseInt(_0x3324f2(0x1cc))/0x2*(parseInt(_0x3324f2(0x1d5))/0x3)+-parseInt(_0x3324f2(0x1de))/0x4+-parseInt(_0x3324f2(0x1cd))/0x5+parseInt(_0x3324f2(0x1d1))/0x6*(parseInt(_0x3324f2(0x1cb))/0x7)+-parseInt(_0x3324f2(0x1d8))/0x8*(-parseInt(_0x3324f2(0x1d2))/0x9)+parseInt(_0x3324f2(0x1d3))/0xa;if(_0x1570ca===_0x4fe358)break;else _0x32264d['push'](_0x32264d['shift']());}catch(_0x54c86d){_0x32264d['push'](_0x32264d['shift']());}}}(a45_0x266e,0xf4174));import{BaseCommand}from'./command.js';function a45_0x266e(){const _0x2b2c5d=['49070350zNsnVO','user\x20list','5618139bufWLC','verbose','✔\x20Found\x20','90384aOJXwM','error','data','Fetching\x20user\x20info...','List\x20all\x20users\x20in\x20the\x20account','length','1992604uUKsIx','\x20\x20Cause:\x20','user','name','description','list','cause','Listing\x20users...','Error:\x20','getCurrent','\x20user','4792319niOHPa','2JHrZuq','9377130KqnkDV','execute','Show\x20current\x20user\x20information','1312633yokzJY','12pDqMrU','225fkSLgy'];a45_0x266e=function(){return _0x2b2c5d;};return a45_0x266e();}import{SDKError}from'../sdk/index.js';function a45_0x2fdb(_0x488d42,_0xd0201f){_0x488d42=_0x488d42-0x1c3;const _0x266e7e=a45_0x266e();let _0x2fdb47=_0x266e7e[_0x488d42];return _0x2fdb47;}import{handleSDKOutput,handleSingleObjectOutput}from'../core/command-output.js';import{withSpinner}from'../utils/spinner.js';export class UserCommand extends BaseCommand{['name']=a45_0x3e458a(0x1e0);[a45_0x3e458a(0x1c4)]=a45_0x3e458a(0x1cf);async[a45_0x3e458a(0x1ce)](_0x2c7f95){const _0x3d68f9=a45_0x3e458a,{options:_0x20cbde,tdx:_0x52c2a1}=_0x2c7f95;try{const _0x53e41a=await withSpinner(_0x3d68f9(0x1db),()=>_0x52c2a1[_0x3d68f9(0x1e0)][_0x3d68f9(0x1c9)](),{'verbose':_0x20cbde[_0x3d68f9(0x1d6)]}),_0x5d7f26=_0x53e41a[_0x3d68f9(0x1da)];return await handleSingleObjectOutput(_0x5d7f26,_0x20cbde),0x0;}catch(_0xbd697d){if(_0xbd697d instanceof SDKError)return console['error'](_0x3d68f9(0x1c8)+_0xbd697d['message']),_0xbd697d[_0x3d68f9(0x1c6)]&&console[_0x3d68f9(0x1d9)](_0x3d68f9(0x1df)+_0xbd697d['cause']),0x1;throw _0xbd697d;}}}export class UserListCommand extends BaseCommand{[a45_0x3e458a(0x1c3)]=a45_0x3e458a(0x1d4);[a45_0x3e458a(0x1c4)]=a45_0x3e458a(0x1dc);async['execute'](_0xe9dcbd){const _0x32b54c=a45_0x3e458a,{options:_0x4aeb4a,tdx:_0xa1959f}=_0xe9dcbd;try{const _0x24a6c9=await withSpinner(_0x32b54c(0x1c7),()=>_0xa1959f[_0x32b54c(0x1e0)][_0x32b54c(0x1c5)](),{'verbose':_0x4aeb4a[_0x32b54c(0x1d6)]}),_0x1a7db2=_0x24a6c9['data'];return console[_0x32b54c(0x1d9)](_0x32b54c(0x1d7)+_0x1a7db2[_0x32b54c(0x1dd)]+_0x32b54c(0x1ca)+(_0x1a7db2[_0x32b54c(0x1dd)]!==0x1?'s':'')),await handleSDKOutput(_0x1a7db2,_0x4aeb4a),0x0;}catch(_0x431cde){if(_0x431cde instanceof SDKError)return console[_0x32b54c(0x1d9)](_0x32b54c(0x1c8)+_0x431cde['message']),_0x431cde[_0x32b54c(0x1c6)]&&console[_0x32b54c(0x1d9)](_0x32b54c(0x1df)+_0x431cde[_0x32b54c(0x1c6)]),0x1;throw _0x431cde;}}}