@treasuredata/tdx 0.23.0 → 0.23.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (163) hide show
  1. package/dist/bin.js +1 -1
  2. package/dist/build-info.json +3 -3
  3. package/dist/cli-categories.js +1 -1
  4. package/dist/cli.js +1 -1
  5. package/dist/commands/activations.js +1 -1
  6. package/dist/commands/agent-command.js +1 -1
  7. package/dist/commands/agent-test-command.js +1 -1
  8. package/dist/commands/api-command.js +1 -1
  9. package/dist/commands/auth-command.js +1 -1
  10. package/dist/commands/chat-command.js +1 -1
  11. package/dist/commands/claude-command.js +1 -1
  12. package/dist/commands/claude-statusline-command.js +1 -1
  13. package/dist/commands/claude-usage-command.js +1 -1
  14. package/dist/commands/command.js +1 -1
  15. package/dist/commands/connection-command.js +1 -1
  16. package/dist/commands/databases.js +1 -1
  17. package/dist/commands/describe.js +1 -1
  18. package/dist/commands/engage-command.js +1 -1
  19. package/dist/commands/job-command.js +1 -1
  20. package/dist/commands/journey-command.js +1 -1
  21. package/dist/commands/journey-validate-command.js +1 -1
  22. package/dist/commands/llm-command.js +1 -1
  23. package/dist/commands/mcp-command.js +1 -1
  24. package/dist/commands/parent-segment-command.js +1 -1
  25. package/dist/commands/profile-command.js +1 -1
  26. package/dist/commands/profiles-command.js +1 -1
  27. package/dist/commands/query-command.js +1 -1
  28. package/dist/commands/schedule-command.js +1 -1
  29. package/dist/commands/segment-command.js +1 -1
  30. package/dist/commands/segment-create-command.js +1 -1
  31. package/dist/commands/segment-fields-command.js +1 -1
  32. package/dist/commands/segment-pull-command.js +1 -1
  33. package/dist/commands/segment-push-command.js +1 -1
  34. package/dist/commands/segment-update-command.js +1 -1
  35. package/dist/commands/segment-use-command.js +1 -1
  36. package/dist/commands/segment-validate-command.js +1 -1
  37. package/dist/commands/segments.js +1 -1
  38. package/dist/commands/show.js +1 -1
  39. package/dist/commands/status-command.js +1 -1
  40. package/dist/commands/tables.js +1 -1
  41. package/dist/commands/unset-command.js +1 -1
  42. package/dist/commands/use-command.js +1 -1
  43. package/dist/commands/user-command.js +1 -1
  44. package/dist/commands/workflow-command.js +1 -1
  45. package/dist/core/auth.js +1 -1
  46. package/dist/core/command-output.js +1 -1
  47. package/dist/core/config.js +1 -1
  48. package/dist/core/connection-cache.js +1 -1
  49. package/dist/core/constants.js +1 -1
  50. package/dist/core/credential-cache.js +1 -1
  51. package/dist/core/global-context.js +1 -1
  52. package/dist/core/keychain.js +1 -1
  53. package/dist/core/profile.js +1 -1
  54. package/dist/core/project-config.js +1 -1
  55. package/dist/core/session.js +1 -1
  56. package/dist/core/user-cache.js +1 -1
  57. package/dist/core/version.js +1 -1
  58. package/dist/index.js +1 -1
  59. package/dist/mcp/server.js +1 -1
  60. package/dist/mcp/tools/index.js +1 -1
  61. package/dist/mcp/tools/tdx-run.js +1 -1
  62. package/dist/mcp/tools/tdx-search.js +1 -1
  63. package/dist/mcp/utils.js +1 -1
  64. package/dist/proxy/claude-usage-tracker.js +1 -1
  65. package/dist/proxy/passthrough-server.js +1 -1
  66. package/dist/proxy/sse-usage-parser.js +1 -1
  67. package/dist/sdk/agent/agent-config.js +1 -1
  68. package/dist/sdk/agent/agent-ref-parser.js +1 -1
  69. package/dist/sdk/agent/agent-yaml.js +1 -1
  70. package/dist/sdk/agent/test/evaluator.js +1 -1
  71. package/dist/sdk/agent/test/executor.js +1 -1
  72. package/dist/sdk/agent/test/index.js +1 -1
  73. package/dist/sdk/agent/test/output.js +1 -1
  74. package/dist/sdk/agent/test/parser.js +1 -1
  75. package/dist/sdk/api.js +1 -1
  76. package/dist/sdk/client/cdp-api-client.js +1 -1
  77. package/dist/sdk/client/endpoints.js +1 -1
  78. package/dist/sdk/client/engage-api-client.js +1 -1
  79. package/dist/sdk/client/http-client.js +1 -1
  80. package/dist/sdk/client/llm-api-client.js +1 -1
  81. package/dist/sdk/client/rate-limiter.js +1 -1
  82. package/dist/sdk/client/td-api-client.js +1 -1
  83. package/dist/sdk/client/trino-api-client.js +1 -1
  84. package/dist/sdk/client/workflow-client.js +1 -1
  85. package/dist/sdk/connection-validator.js +1 -1
  86. package/dist/sdk/connection.js +1 -1
  87. package/dist/sdk/engage.js +1 -1
  88. package/dist/sdk/errors.js +1 -1
  89. package/dist/sdk/index.js +1 -1
  90. package/dist/sdk/io/index.js +1 -1
  91. package/dist/sdk/io/node-filesystem.js +1 -1
  92. package/dist/sdk/job.js +1 -1
  93. package/dist/sdk/journey.js +1 -1
  94. package/dist/sdk/llm/chat-cache.js +1 -1
  95. package/dist/sdk/llm/index.js +1 -1
  96. package/dist/sdk/llm/llm-backup-utils.js +1 -1
  97. package/dist/sdk/llm/model-factors.js +1 -1
  98. package/dist/sdk/query/index.js +1 -1
  99. package/dist/sdk/query/sql-parser.js +1 -1
  100. package/dist/sdk/schedule.js +1 -1
  101. package/dist/sdk/segment/child-segment-yaml.js +1 -1
  102. package/dist/sdk/segment/fields-display.js +1 -1
  103. package/dist/sdk/segment/file-discovery.js +1 -1
  104. package/dist/sdk/segment/journey-utils.js +1 -1
  105. package/dist/sdk/segment/journey-yaml.js +1 -1
  106. package/dist/sdk/segment/parent-segment-preview.js +1 -1
  107. package/dist/sdk/segment/parent-segment-yaml.js +1 -1
  108. package/dist/sdk/segment/pull-workflow.js +1 -1
  109. package/dist/sdk/segment/push-workflow.js +1 -1
  110. package/dist/sdk/segment/resolution-context.js +1 -1
  111. package/dist/sdk/segment/segment-path-parser.js +1 -1
  112. package/dist/sdk/segment/segment-ref-parser.js +1 -1
  113. package/dist/sdk/segment/target-resolution.js +1 -1
  114. package/dist/sdk/segment/tdx-config.js +1 -1
  115. package/dist/sdk/segment/validate-files.js +1 -1
  116. package/dist/sdk/segment/yaml-validator.js +1 -1
  117. package/dist/sdk/segment.js +1 -1
  118. package/dist/sdk/types/index.js +1 -1
  119. package/dist/sdk/types/progress.js +1 -1
  120. package/dist/sdk/user.js +1 -1
  121. package/dist/sdk/util/format-detector.js +1 -1
  122. package/dist/sdk/util/formatters.js +1 -1
  123. package/dist/sdk/util/index.js +1 -1
  124. package/dist/sdk/util/tree-formatter.js +1 -1
  125. package/dist/sdk/workflow/archive-validation.js +1 -1
  126. package/dist/sdk/workflow/clone-workflow.js +1 -1
  127. package/dist/sdk/workflow/index.js +1 -1
  128. package/dist/sdk/workflow/pull-workflow.js +1 -1
  129. package/dist/sdk/workflow/push-workflow.js +1 -1
  130. package/dist/sdk/workflow/tdx-config.js +1 -1
  131. package/dist/sdk/workflow/workflow-utils.js +1 -1
  132. package/dist/test-utils/command-runner.js +1 -1
  133. package/dist/test-utils/factories.js +1 -1
  134. package/dist/test-utils/fixtures.js +1 -1
  135. package/dist/test-utils/http-mock.js +1 -1
  136. package/dist/test-utils/index.js +1 -1
  137. package/dist/utils/async.js +1 -1
  138. package/dist/utils/colors.js +1 -1
  139. package/dist/utils/diff.js +1 -1
  140. package/dist/utils/file-permissions.js +1 -1
  141. package/dist/utils/global-cache.js +1 -1
  142. package/dist/utils/json-loader.js +1 -1
  143. package/dist/utils/local-cache.js +1 -1
  144. package/dist/utils/logger/formatters/default-formatter.js +1 -1
  145. package/dist/utils/logger/formatters/index.js +1 -1
  146. package/dist/utils/logger/handlers/console-handler.js +1 -1
  147. package/dist/utils/logger/handlers/file-handler.js +1 -1
  148. package/dist/utils/logger/handlers/index.js +1 -1
  149. package/dist/utils/logger/handlers/null-handler.js +1 -1
  150. package/dist/utils/logger/index.js +1 -1
  151. package/dist/utils/logger/logger.js +1 -1
  152. package/dist/utils/logger/types.js +1 -1
  153. package/dist/utils/option-validation.js +1 -1
  154. package/dist/utils/port.js +1 -1
  155. package/dist/utils/process.js +1 -1
  156. package/dist/utils/prompt.js +1 -1
  157. package/dist/utils/spinner.js +1 -1
  158. package/dist/utils/sse-parser.js +1 -1
  159. package/dist/utils/string-utils.js +1 -1
  160. package/dist/utils/table-ref-parser.js +1 -1
  161. package/dist/utils/tdx-logger.js +1 -1
  162. package/dist/utils/version-check.js +1 -1
  163. package/package.json +1 -1
@@ -1 +1 @@
1
- const a32_0x27e58c=a32_0x51ee;(function(_0xb9e0d7,_0x534749){const _0x1a2695=a32_0x51ee,_0x176072=_0xb9e0d7();while(!![]){try{const _0x6e37a3=parseInt(_0x1a2695(0xaa))/0x1+parseInt(_0x1a2695(0xa0))/0x2+parseInt(_0x1a2695(0xa6))/0x3+-parseInt(_0x1a2695(0xb1))/0x4*(parseInt(_0x1a2695(0xb9))/0x5)+parseInt(_0x1a2695(0x9e))/0x6+parseInt(_0x1a2695(0xbb))/0x7+-parseInt(_0x1a2695(0xab))/0x8*(parseInt(_0x1a2695(0xbd))/0x9);if(_0x6e37a3===_0x534749)break;else _0x176072['push'](_0x176072['shift']());}catch(_0x23ae19){_0x176072['push'](_0x176072['shift']());}}}(a32_0x2fd6,0x7b888));function a32_0x51ee(_0x2c3be4,_0x54fa1b){_0x2c3be4=_0x2c3be4-0x9d;const _0x2fd61a=a32_0x2fd6();let _0x51ee75=_0x2fd61a[_0x2c3be4];return _0x51ee75;}import{BaseCommand}from'./command.js';import{handleSDKOutput}from'../core/command-output.js';function a32_0x2fd6(){const _0xd97407=['Error:\x20Segment\x20path\x20or\x20name\x20is\x20required','ruleFile','380381hqLssR','5560XnXRCD','\x27...','Usage:\x20tdx\x20segment\x20update\x20<path>\x20[options]','segmentName','segmentPath','Resolved\x20type:\x20','4HulZUA','Update\x20existing\x20child\x20segment','Parent\x20ID:\x20','segmentId','type','includes','segment:update','Resolving\x20folder\x20\x27','4687685TzHXGf','⚠\x20Deprecation\x20warning:\x20`segment\x20update`\x20is\x20deprecated.','2646357XvAnvp','name','2466aUBLzG','folder','length','parentId','segment','INTERNAL','description','Error:\x20Cannot\x20update\x20','error','resolveFolderId','data','1655322FgcwCT','yellow','824074jjixZw','kind','✔\x20Updated\x20segment\x20\x27','verbose','Updating\x20segment\x20\x27','Examples:','562809CcgWdr','\x20\x20Use\x20`tdx\x20sg\x20push`\x20with\x20YAML\x20files\x20instead.\x0a'];a32_0x2fd6=function(){return _0xd97407;};return a32_0x2fd6();}import{withSpinner}from'../utils/spinner.js';import{loadJSONFromOptions}from'../utils/json-loader.js';import{SDKError,ErrorCode}from'../sdk/index.js';import a32_0x4e81fd from'chalk';export class SegmentUpdateCommand extends BaseCommand{['name']=a32_0x27e58c(0xb7);[a32_0x27e58c(0xc3)]=a32_0x27e58c(0xb2);async['execute'](_0x5dee16){const _0x547536=a32_0x27e58c;console[_0x547536(0xc5)](a32_0x4e81fd[_0x547536(0x9f)](_0x547536(0xba))),console[_0x547536(0xc5)](a32_0x4e81fd[_0x547536(0x9f)](_0x547536(0xa7)));const {options:_0x39470e,args:_0x5e71ea,tdx:_0x5caad5}=_0x5dee16,_0x522393=_0x39470e;if(_0x5e71ea[_0x547536(0xbf)]===0x0)return console['error'](_0x547536(0xa8)),console[_0x547536(0xc5)](_0x547536(0xad)),console[_0x547536(0xc5)](_0x547536(0xa5)),console[_0x547536(0xc5)]('\x20\x20tdx\x20segment\x20update\x20\x22My\x20Audience/High\x20Value\x22\x20--description\x20\x22...\x22'),console[_0x547536(0xc5)]('\x20\x20tdx\x20segment\x20update\x20\x22High\x20Value\x22\x20--rule\x20\x27...\x27\x20\x20#\x20Relative\x20to\x20context'),0x1;const _0x329098=_0x5e71ea[0x0],_0x391e3f=_0x39470e[_0x547536(0xaf)];let _0x500efe=_0x329098;_0x391e3f&&!_0x329098[_0x547536(0xb6)]('/')&&(_0x500efe=_0x391e3f+'/'+_0x329098,_0x522393[_0x547536(0xa3)]&&console['error']('Resolved\x20relative\x20path\x20to:\x20'+_0x500efe));const _0x48ea97=await withSpinner('Resolving\x20path\x20\x27'+_0x500efe+_0x547536(0xac),()=>_0x5caad5[_0x547536(0xc1)]['resolvePathToResource'](_0x500efe),{'verbose':_0x522393[_0x547536(0xa3)]}),_0x1b0765=_0x48ea97[_0x547536(0x9d)];_0x522393[_0x547536(0xa3)]&&console['error'](_0x547536(0xb0)+_0x1b0765[_0x547536(0xb5)]);if(_0x1b0765[_0x547536(0xb5)]!==_0x547536(0xc1))return console[_0x547536(0xc5)](_0x547536(0xc4)+_0x1b0765['type']+'.\x20Only\x20child\x20segments\x20can\x20be\x20updated.'),console['error']('Use:\x20tdx\x20segment\x20update\x20<path_to_segment>\x20[options]'),0x1;if(!_0x1b0765[_0x547536(0xb4)])throw new SDKError(ErrorCode[_0x547536(0xc2)],'Segment\x20ID\x20missing\x20from\x20resolved\x20path');const _0x266e32=_0x1b0765[_0x547536(0xc0)],_0x55e1a0=_0x1b0765['segmentId'];_0x522393['verbose']&&(console[_0x547536(0xc5)](_0x547536(0xb3)+_0x266e32),console[_0x547536(0xc5)]('Segment\x20ID:\x20'+_0x55e1a0));let _0x1506b4;if(_0x522393[_0x547536(0xbe)]){const _0x3129ed=_0x522393['folder'],_0x129553=await withSpinner(_0x547536(0xb8)+_0x3129ed+_0x547536(0xac),()=>_0x5caad5[_0x547536(0xc1)][_0x547536(0xc6)](_0x266e32,_0x3129ed),{'verbose':_0x522393[_0x547536(0xa3)]});_0x1506b4=parseInt(_0x129553['data'],0xa),_0x522393[_0x547536(0xa3)]&&console[_0x547536(0xc5)]('Resolved\x20folder\x20ID:\x20'+_0x1506b4);}const _0x42638d=await loadJSONFromOptions(_0x522393['rule'],_0x522393[_0x547536(0xa9)]),_0x30c8f5={'name':_0x522393[_0x547536(0xbc)],'description':_0x522393[_0x547536(0xc3)],'rule':_0x42638d,'kind':_0x522393[_0x547536(0xa1)]!==undefined?parseInt(_0x522393[_0x547536(0xa1)],0xa):undefined,'segmentFolderId':_0x1506b4},_0x3aac6b=await withSpinner(_0x547536(0xa4)+_0x1b0765[_0x547536(0xae)]+_0x547536(0xac),()=>_0x5caad5[_0x547536(0xc1)]['updateSegmentById'](_0x266e32,_0x55e1a0,_0x30c8f5),{'verbose':_0x522393['verbose']}),_0x34a227=_0x3aac6b[_0x547536(0x9d)];return console['error'](_0x547536(0xa2)+_0x34a227['name']+'\x27'),_0x500efe!==_0x329098&&console[_0x547536(0xc5)]('\x20\x20\x20Path:\x20'+_0x500efe),await handleSDKOutput([_0x34a227],_0x522393),0x0;}}
1
+ const a32_0x12d2af=a32_0x274d;(function(_0x18bc6e,_0x405f4a){const _0xf1e1e4=a32_0x274d,_0x43c6cd=_0x18bc6e();while(!![]){try{const _0x58d82f=-parseInt(_0xf1e1e4(0x165))/0x1+parseInt(_0xf1e1e4(0x176))/0x2+parseInt(_0xf1e1e4(0x178))/0x3*(parseInt(_0xf1e1e4(0x164))/0x4)+-parseInt(_0xf1e1e4(0x160))/0x5*(parseInt(_0xf1e1e4(0x15a))/0x6)+parseInt(_0xf1e1e4(0x161))/0x7+parseInt(_0xf1e1e4(0x16d))/0x8+-parseInt(_0xf1e1e4(0x156))/0x9*(parseInt(_0xf1e1e4(0x173))/0xa);if(_0x58d82f===_0x405f4a)break;else _0x43c6cd['push'](_0x43c6cd['shift']());}catch(_0xc02116){_0x43c6cd['push'](_0x43c6cd['shift']());}}}(a32_0xcff5,0xf0113));import{BaseCommand}from'./command.js';import{handleSDKOutput}from'../core/command-output.js';function a32_0x274d(_0x598386,_0x24c855){_0x598386=_0x598386-0x151;const _0xcff514=a32_0xcff5();let _0x274d99=_0xcff514[_0x598386];return _0x274d99;}import{withSpinner}from'../utils/spinner.js';import{loadJSONFromOptions}from'../utils/json-loader.js';import{SDKError,ErrorCode}from'../sdk/index.js';import a32_0x4edd02 from'chalk';export class SegmentUpdateCommand extends BaseCommand{[a32_0x12d2af(0x174)]=a32_0x12d2af(0x162);[a32_0x12d2af(0x16f)]=a32_0x12d2af(0x17c);async[a32_0x12d2af(0x17b)](_0x4ffdf6){const _0x594427=a32_0x12d2af;console[_0x594427(0x17e)](a32_0x4edd02[_0x594427(0x17a)](_0x594427(0x159))),console[_0x594427(0x17e)](a32_0x4edd02[_0x594427(0x17a)](_0x594427(0x170)));const {options:_0x3b1ab5,args:_0x59b7ab,tdx:_0x38b8d9}=_0x4ffdf6,_0x127d29=_0x3b1ab5;if(_0x59b7ab[_0x594427(0x179)]===0x0)return console[_0x594427(0x17e)](_0x594427(0x182)),console[_0x594427(0x17e)](_0x594427(0x163)),console['error']('Examples:'),console[_0x594427(0x17e)](_0x594427(0x152)),console[_0x594427(0x17e)](_0x594427(0x183)),0x1;const _0x39e6e2=_0x59b7ab[0x0],_0x3fccbc=_0x3b1ab5[_0x594427(0x184)];let _0x2e59af=_0x39e6e2;_0x3fccbc&&!_0x39e6e2[_0x594427(0x15c)]('/')&&(_0x2e59af=_0x3fccbc+'/'+_0x39e6e2,_0x127d29[_0x594427(0x16c)]&&console[_0x594427(0x17e)](_0x594427(0x15b)+_0x2e59af));const _0x54182b=await withSpinner(_0x594427(0x171)+_0x2e59af+_0x594427(0x172),()=>_0x38b8d9[_0x594427(0x15f)][_0x594427(0x16a)](_0x2e59af),{'verbose':_0x127d29['verbose']}),_0x43aad1=_0x54182b[_0x594427(0x168)];_0x127d29['verbose']&&console['error']('Resolved\x20type:\x20'+_0x43aad1[_0x594427(0x167)]);if(_0x43aad1['type']!==_0x594427(0x15f))return console[_0x594427(0x17e)]('Error:\x20Cannot\x20update\x20'+_0x43aad1['type']+_0x594427(0x154)),console[_0x594427(0x17e)](_0x594427(0x177)),0x1;if(!_0x43aad1[_0x594427(0x16b)])throw new SDKError(ErrorCode[_0x594427(0x15d)],_0x594427(0x17d));const _0x5c725b=_0x43aad1[_0x594427(0x180)],_0x5e1e93=_0x43aad1['segmentId'];_0x127d29[_0x594427(0x16c)]&&(console[_0x594427(0x17e)](_0x594427(0x185)+_0x5c725b),console['error'](_0x594427(0x17f)+_0x5e1e93));let _0xdba0dc;if(_0x127d29[_0x594427(0x169)]){const _0x444864=_0x127d29[_0x594427(0x169)],_0x11f417=await withSpinner(_0x594427(0x157)+_0x444864+_0x594427(0x172),()=>_0x38b8d9[_0x594427(0x15f)][_0x594427(0x181)](_0x5c725b,_0x444864),{'verbose':_0x127d29[_0x594427(0x16c)]});_0xdba0dc=parseInt(_0x11f417[_0x594427(0x168)],0xa),_0x127d29[_0x594427(0x16c)]&&console[_0x594427(0x17e)](_0x594427(0x166)+_0xdba0dc);}const _0x3dd312=await loadJSONFromOptions(_0x127d29['rule'],_0x127d29[_0x594427(0x155)]),_0x5e5ba5={'name':_0x127d29[_0x594427(0x174)],'description':_0x127d29[_0x594427(0x16f)],'rule':_0x3dd312,'kind':_0x127d29[_0x594427(0x151)]!==undefined?parseInt(_0x127d29[_0x594427(0x151)],0xa):undefined,'segmentFolderId':_0xdba0dc},_0x20ffe0=await withSpinner(_0x594427(0x16e)+_0x43aad1[_0x594427(0x15e)]+'\x27...',()=>_0x38b8d9['segment'][_0x594427(0x153)](_0x5c725b,_0x5e1e93,_0x5e5ba5),{'verbose':_0x127d29[_0x594427(0x16c)]}),_0x395fea=_0x20ffe0[_0x594427(0x168)];return console[_0x594427(0x17e)](_0x594427(0x175)+_0x395fea[_0x594427(0x174)]+'\x27'),_0x2e59af!==_0x39e6e2&&console['error'](_0x594427(0x158)+_0x2e59af),await handleSDKOutput([_0x395fea],_0x127d29),0x0;}}function a32_0xcff5(){const _0x43abe3=['ruleFile','18tdLGoW','Resolving\x20folder\x20\x27','\x20\x20\x20Path:\x20','⚠\x20Deprecation\x20warning:\x20`segment\x20update`\x20is\x20deprecated.','3194832jHaitZ','Resolved\x20relative\x20path\x20to:\x20','includes','INTERNAL','segmentName','segment','10PIhnhV','3624257zEcfIs','segment:update','Usage:\x20tdx\x20segment\x20update\x20<path>\x20[options]','23216jEXLif','561451XijLYp','Resolved\x20folder\x20ID:\x20','type','data','folder','resolvePathToResource','segmentId','verbose','11041304omXMJQ','Updating\x20segment\x20\x27','description','\x20\x20Use\x20`tdx\x20sg\x20push`\x20with\x20YAML\x20files\x20instead.\x0a','Resolving\x20path\x20\x27','\x27...','10022030kRMdCv','name','✔\x20Updated\x20segment\x20\x27','2391108PAsuOy','Use:\x20tdx\x20segment\x20update\x20<path_to_segment>\x20[options]','786kQYHct','length','yellow','execute','Update\x20existing\x20child\x20segment','Segment\x20ID\x20missing\x20from\x20resolved\x20path','error','Segment\x20ID:\x20','parentId','resolveFolderId','Error:\x20Segment\x20path\x20or\x20name\x20is\x20required','\x20\x20tdx\x20segment\x20update\x20\x22High\x20Value\x22\x20--rule\x20\x27...\x27\x20\x20#\x20Relative\x20to\x20context','segmentPath','Parent\x20ID:\x20','kind','\x20\x20tdx\x20segment\x20update\x20\x22My\x20Audience/High\x20Value\x22\x20--description\x20\x22...\x22','updateSegmentById','.\x20Only\x20child\x20segments\x20can\x20be\x20updated.'];a32_0xcff5=function(){return _0x43abe3;};return a32_0xcff5();}
@@ -1 +1 @@
1
- const a33_0x1d13b7=a33_0xab30;(function(_0x57abd5,_0x19e162){const _0x26234c=a33_0xab30,_0x4f53ce=_0x57abd5();while(!![]){try{const _0x433aad=-parseInt(_0x26234c(0xca))/0x1*(-parseInt(_0x26234c(0xf4))/0x2)+-parseInt(_0x26234c(0xf7))/0x3+-parseInt(_0x26234c(0xcb))/0x4*(parseInt(_0x26234c(0xd3))/0x5)+parseInt(_0x26234c(0xdf))/0x6*(parseInt(_0x26234c(0xdb))/0x7)+parseInt(_0x26234c(0xd5))/0x8+-parseInt(_0x26234c(0xfc))/0x9+-parseInt(_0x26234c(0xf9))/0xa*(-parseInt(_0x26234c(0xf1))/0xb);if(_0x433aad===_0x19e162)break;else _0x4f53ce['push'](_0x4f53ce['shift']());}catch(_0x22d53a){_0x4f53ce['push'](_0x4f53ce['shift']());}}}(a33_0x3caf,0xeb78f));import{existsSync,statSync}from'fs';function a33_0x3caf(){const _0x30eb8e=['\x27...','11oWxVFu','slice','folderPath','357148nHXQUU','Parent\x20ID:\x20','Context\x20can\x20only\x20be\x20set\x20to\x20a\x20parent\x20segment\x20or\x20folder.','4184142RDEJsB','green','20694970quzxMP','verbose','execute','3421017lxbSxC','folderId','Usage:\x20tdx\x20segment\x20use\x20<path>','segments','2RsziTZ','365732qXVfeX','\x20\x20tdx\x20segment\x20use\x20\x22My\x20Audience/Marketing\x22','join','red','fullPath','segment','Resolved\x20path\x20type:\x20','Use:\x20tdx\x20segment\x20use\x20','75fWGZPd','config','1776672bTXOIE','Resolved\x20relative\x20path\x20to:\x20','name','split','segmentPath','✔\x20Context\x20set\x20to:\x20','10234616eDkSYe','type','length','\x20\x20tdx\x20segment\x20use\x20..\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Go\x20to\x20parent','6QMgIup','log','Target\x20path:\x20','parent_segment','parentName','Set\x20current\x20segment/folder\x20context\x20for\x20navigation','error','Error:\x20No\x20tdx.json\x20found\x20in\x20or\x20above:\x20','session','isAbsolute','Folder\x20ID:\x20','\x20\x20tdx\x20segment\x20use\x20\x22My\x20Audience\x22','isDirectory','cyan','✔\x20Context\x20cleared.\x20Back\x20to\x20root.','Error:\x20No\x20context\x20set.\x20Cannot\x20use\x20relative\x20path.','dim'];a33_0x3caf=function(){return _0x30eb8e;};return a33_0x3caf();}import a33_0x24ea2c from'chalk';import{BaseCommand}from'./command.js';import{saveSessionContext}from'../core/session.js';import{withSpinner}from'../utils/spinner.js';import{parsePath,normalizePath}from'../sdk/segment/segment-path-parser.js';function a33_0xab30(_0x54aff9,_0xfe1f15){_0x54aff9=_0x54aff9-0xc9;const _0x3caf78=a33_0x3caf();let _0xab30b8=_0x3caf78[_0x54aff9];return _0xab30b8;}import{findTdxConfig}from'../sdk/segment/tdx-config.js';export class SegmentUseCommand extends BaseCommand{[a33_0x1d13b7(0xd7)]='segment:use';['description']=a33_0x1d13b7(0xe4);async[a33_0x1d13b7(0xfb)](_0x5bde62){const _0x5cabba=a33_0x1d13b7,{options:_0x37d0a3,args:_0x20ac9d,tdx:_0x54529a}=_0x5bde62;if(_0x20ac9d['length']===0x0)return console[_0x5cabba(0xe5)](a33_0x24ea2c[_0x5cabba(0xce)]('Error:\x20Path\x20is\x20required\x0a')),console[_0x5cabba(0xe5)](_0x5cabba(0xfe)),console[_0x5cabba(0xe5)]('Examples:'),console['error'](_0x5cabba(0xea)),console[_0x5cabba(0xe5)](_0x5cabba(0xcc)),console['error']('\x20\x20tdx\x20segment\x20use\x20/\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Clear\x20context'),console[_0x5cabba(0xe5)](_0x5cabba(0xde)),0x1;const _0xe27ed7=_0x20ac9d[0x0],_0x2094e4=_0x37d0a3[_0x5cabba(0xe7)];try{if(_0xe27ed7==='/')return saveSessionContext({'segment_path':undefined},_0x2094e4),console['log'](a33_0x24ea2c['green']('✔\x20Context\x20cleared.\x20Back\x20to\x20root.')),0x0;if(existsSync(_0xe27ed7)&&statSync(_0xe27ed7)[_0x5cabba(0xeb)]()){let _0x5be866;try{_0x5be866=findTdxConfig(_0xe27ed7);}catch{return console[_0x5cabba(0xe5)](a33_0x24ea2c[_0x5cabba(0xce)](_0x5cabba(0xe6)+_0xe27ed7)),console[_0x5cabba(0xe5)](a33_0x24ea2c[_0x5cabba(0xec)]('Tip:\x20Run\x20`tdx\x20sg\x20pull\x20<parent_name>`\x20first\x20to\x20create\x20the\x20folder\x20structure')),0x1;}const _0x5c444e=_0x5be866[_0x5cabba(0xd4)][_0x5cabba(0xe2)];return saveSessionContext({'segment_path':_0x5c444e,'parent_segment':_0x5c444e},_0x2094e4),console['log'](a33_0x24ea2c[_0x5cabba(0xf8)]('✔\x20Context\x20set\x20to:\x20'+a33_0x24ea2c[_0x5cabba(0xec)](_0x5c444e))),0x0;}const _0x4205a2=_0x37d0a3[_0x5cabba(0xd9)];let _0x25f804=_0xe27ed7;const _0x2f7eb7=parsePath(_0xe27ed7);if(!_0x2f7eb7[_0x5cabba(0xe8)]){if(!_0x4205a2)return console[_0x5cabba(0xe5)](a33_0x24ea2c['red'](_0x5cabba(0xee))),console['error'](a33_0x24ea2c[_0x5cabba(0xec)]('Use\x20an\x20absolute\x20path\x20or\x20set\x20context\x20with:\x20tdx\x20segment\x20use\x20<parent_name>')),0x1;if(_0xe27ed7==='..'){const _0xb41e81=_0x4205a2[_0x5cabba(0xd8)]('/')[_0x5cabba(0xf2)](0x0,-0x1)[_0x5cabba(0xcd)]('/');_0x25f804=_0xb41e81||'/';}else _0xe27ed7==='.'?_0x25f804=_0x4205a2:_0x25f804=_0x4205a2+'/'+_0xe27ed7;_0x37d0a3[_0x5cabba(0xfa)]&&console[_0x5cabba(0xe5)](_0x5cabba(0xd6)+_0x25f804);}if(_0x25f804==='/'||_0x25f804==='')return saveSessionContext({'segment_path':undefined},_0x2094e4),console[_0x5cabba(0xe0)](a33_0x24ea2c[_0x5cabba(0xf8)]('✔\x20Context\x20cleared.\x20Back\x20to\x20root.')),0x0;_0x25f804=normalizePath(_0x25f804);const _0x3966be=parsePath(_0x25f804)[_0x5cabba(0xc9)];if(_0x3966be[_0x5cabba(0xdd)]===0x0)return saveSessionContext({'segment_path':undefined},_0x2094e4),console[_0x5cabba(0xe0)](a33_0x24ea2c['green'](_0x5cabba(0xed))),0x0;_0x37d0a3[_0x5cabba(0xfa)]&&(console[_0x5cabba(0xe5)]('Site:\x20'+_0x37d0a3['site']),console[_0x5cabba(0xe5)](_0x5cabba(0xe1)+_0x25f804));const _0x1f5f70=await withSpinner('Resolving\x20path\x20\x27'+_0x25f804+_0x5cabba(0xf0),()=>_0x54529a[_0x5cabba(0xd0)]['resolvePathToResource'](_0x25f804),{'verbose':_0x37d0a3[_0x5cabba(0xfa)]}),_0x130dd1=_0x1f5f70['data'];_0x37d0a3[_0x5cabba(0xfa)]&&(console[_0x5cabba(0xe5)](_0x5cabba(0xd1)+_0x130dd1[_0x5cabba(0xdc)]),console[_0x5cabba(0xe5)](_0x5cabba(0xf5)+_0x130dd1['parentId']),_0x130dd1['folderId']&&console[_0x5cabba(0xe5)](_0x5cabba(0xe9)+_0x130dd1[_0x5cabba(0xfd)]));if(_0x130dd1[_0x5cabba(0xdc)]===_0x5cabba(0xd0))return console['error'](a33_0x24ea2c[_0x5cabba(0xce)]('Error:\x20Cannot\x20set\x20context\x20to\x20a\x20segment.')),console[_0x5cabba(0xe5)](_0x5cabba(0xf6)),console[_0x5cabba(0xe5)](a33_0x24ea2c['cyan'](_0x5cabba(0xd2)+_0x130dd1[_0x5cabba(0xe3)]+(_0x130dd1['folderPath']?'/'+_0x130dd1[_0x5cabba(0xf3)][_0x5cabba(0xcd)]('/'):''))),0x1;return saveSessionContext({'segment_path':_0x130dd1['fullPath'],'parent_segment':_0x130dd1[_0x5cabba(0xe3)]},_0x2094e4),console[_0x5cabba(0xe0)](a33_0x24ea2c[_0x5cabba(0xf8)](_0x5cabba(0xda)+a33_0x24ea2c['cyan'](_0x130dd1[_0x5cabba(0xcf)]))),_0x37d0a3[_0x5cabba(0xfa)]&&(console[_0x5cabba(0xe5)](a33_0x24ea2c[_0x5cabba(0xef)]('Use\x20\x22tdx\x20segments\x22\x20to\x20list\x20contents\x20in\x20this\x20context')),console['error'](a33_0x24ea2c[_0x5cabba(0xef)]('Use\x20\x22tdx\x20use\x22\x20to\x20see\x20all\x20context\x20parameters'))),0x0;}catch(_0x5880b2){throw _0x5880b2;}}}
1
+ const a33_0x1f0fc6=a33_0x557f;(function(_0x42c13d,_0x5c206f){const _0x2ed91d=a33_0x557f,_0x2031d0=_0x42c13d();while(!![]){try{const _0x13dd5a=parseInt(_0x2ed91d(0x18c))/0x1+parseInt(_0x2ed91d(0x1bc))/0x2*(-parseInt(_0x2ed91d(0x1a3))/0x3)+parseInt(_0x2ed91d(0x191))/0x4*(parseInt(_0x2ed91d(0x195))/0x5)+parseInt(_0x2ed91d(0x1b3))/0x6+parseInt(_0x2ed91d(0x1b0))/0x7+parseInt(_0x2ed91d(0x1b2))/0x8*(-parseInt(_0x2ed91d(0x1a8))/0x9)+-parseInt(_0x2ed91d(0x1b1))/0xa;if(_0x13dd5a===_0x5c206f)break;else _0x2031d0['push'](_0x2031d0['shift']());}catch(_0x565056){_0x2031d0['push'](_0x2031d0['shift']());}}}(a33_0x2c63,0x8bac6));function a33_0x2c63(){const _0x14d01e=['1006672FSWaRP','3032442DuqVvr','verbose','split','folderPath','Context\x20can\x20only\x20be\x20set\x20to\x20a\x20parent\x20segment\x20or\x20folder.','\x20\x20tdx\x20segment\x20use\x20\x22My\x20Audience/Marketing\x22','fullPath','Resolving\x20path\x20\x27','cyan','6SImOlW','join','Use\x20\x22tdx\x20use\x22\x20to\x20see\x20all\x20context\x20parameters','resolvePathToResource','site','execute','Resolved\x20relative\x20path\x20to:\x20','log','segments','slice','parent_segment','Error:\x20Path\x20is\x20required\x0a','Use\x20\x22tdx\x20segments\x22\x20to\x20list\x20contents\x20in\x20this\x20context','169584mtusFs','parentName','\x20\x20tdx\x20segment\x20use\x20\x22My\x20Audience\x22','Set\x20current\x20segment/folder\x20context\x20for\x20navigation','Error:\x20No\x20context\x20set.\x20Cannot\x20use\x20relative\x20path.','66520EitMwj','green','config','segment:use','185orireL','Examples:','isDirectory','✔\x20Context\x20set\x20to:\x20','error','Resolved\x20path\x20type:\x20','Error:\x20Cannot\x20set\x20context\x20to\x20a\x20segment.','Target\x20path:\x20','Parent\x20ID:\x20','length','red','Usage:\x20tdx\x20segment\x20use\x20<path>','Tip:\x20Run\x20`tdx\x20sg\x20pull\x20<parent_name>`\x20first\x20to\x20create\x20the\x20folder\x20structure','name','559902BoqhcI','description','Site:\x20','dim','type','36IJGZfB','Error:\x20No\x20tdx.json\x20found\x20in\x20or\x20above:\x20','parentId','segment','data','✔\x20Context\x20cleared.\x20Back\x20to\x20root.','\x27...','\x20\x20tdx\x20segment\x20use\x20/\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Clear\x20context','7579250jAPFRP','7377110KNewTE'];a33_0x2c63=function(){return _0x14d01e;};return a33_0x2c63();}import{existsSync,statSync}from'fs';import a33_0x209ef1 from'chalk';import{BaseCommand}from'./command.js';function a33_0x557f(_0x3e3645,_0x3a6a26){_0x3e3645=_0x3e3645-0x184;const _0x2c6314=a33_0x2c63();let _0x557fdc=_0x2c6314[_0x3e3645];return _0x557fdc;}import{saveSessionContext}from'../core/session.js';import{withSpinner}from'../utils/spinner.js';import{parsePath,normalizePath}from'../sdk/segment/segment-path-parser.js';import{findTdxConfig}from'../sdk/segment/tdx-config.js';export class SegmentUseCommand extends BaseCommand{[a33_0x1f0fc6(0x1a2)]=a33_0x1f0fc6(0x194);[a33_0x1f0fc6(0x1a4)]=a33_0x1f0fc6(0x18f);async[a33_0x1f0fc6(0x184)](_0x3b1bf3){const _0x395d6f=a33_0x1f0fc6,{options:_0x29a2cb,args:_0x3a93ad,tdx:_0x29cec9}=_0x3b1bf3;if(_0x3a93ad[_0x395d6f(0x19e)]===0x0)return console['error'](a33_0x209ef1['red'](_0x395d6f(0x18a))),console['error'](_0x395d6f(0x1a0)),console[_0x395d6f(0x199)](_0x395d6f(0x196)),console[_0x395d6f(0x199)](_0x395d6f(0x18e)),console[_0x395d6f(0x199)](_0x395d6f(0x1b8)),console['error'](_0x395d6f(0x1af)),console['error']('\x20\x20tdx\x20segment\x20use\x20..\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Go\x20to\x20parent'),0x1;const _0x14388f=_0x3a93ad[0x0],_0x4f65fe=_0x29a2cb['session'];try{if(_0x14388f==='/')return saveSessionContext({'segment_path':undefined},_0x4f65fe),console[_0x395d6f(0x186)](a33_0x209ef1[_0x395d6f(0x192)](_0x395d6f(0x1ad))),0x0;if(existsSync(_0x14388f)&&statSync(_0x14388f)[_0x395d6f(0x197)]()){let _0x19dfaa;try{_0x19dfaa=findTdxConfig(_0x14388f);}catch{return console[_0x395d6f(0x199)](a33_0x209ef1[_0x395d6f(0x19f)](_0x395d6f(0x1a9)+_0x14388f)),console[_0x395d6f(0x199)](a33_0x209ef1['cyan'](_0x395d6f(0x1a1))),0x1;}const _0xd16341=_0x19dfaa[_0x395d6f(0x193)][_0x395d6f(0x189)];return saveSessionContext({'segment_path':_0xd16341,'parent_segment':_0xd16341},_0x4f65fe),console[_0x395d6f(0x186)](a33_0x209ef1[_0x395d6f(0x192)](_0x395d6f(0x198)+a33_0x209ef1[_0x395d6f(0x1bb)](_0xd16341))),0x0;}const _0x30bd44=_0x29a2cb['segmentPath'];let _0x583065=_0x14388f;const _0x3a38b7=parsePath(_0x14388f);if(!_0x3a38b7['isAbsolute']){if(!_0x30bd44)return console[_0x395d6f(0x199)](a33_0x209ef1[_0x395d6f(0x19f)](_0x395d6f(0x190))),console['error'](a33_0x209ef1[_0x395d6f(0x1bb)]('Use\x20an\x20absolute\x20path\x20or\x20set\x20context\x20with:\x20tdx\x20segment\x20use\x20<parent_name>')),0x1;if(_0x14388f==='..'){const _0x3fac8a=_0x30bd44[_0x395d6f(0x1b5)]('/')[_0x395d6f(0x188)](0x0,-0x1)[_0x395d6f(0x1bd)]('/');_0x583065=_0x3fac8a||'/';}else _0x14388f==='.'?_0x583065=_0x30bd44:_0x583065=_0x30bd44+'/'+_0x14388f;_0x29a2cb[_0x395d6f(0x1b4)]&&console['error'](_0x395d6f(0x185)+_0x583065);}if(_0x583065==='/'||_0x583065==='')return saveSessionContext({'segment_path':undefined},_0x4f65fe),console[_0x395d6f(0x186)](a33_0x209ef1['green']('✔\x20Context\x20cleared.\x20Back\x20to\x20root.')),0x0;_0x583065=normalizePath(_0x583065);const _0x506bac=parsePath(_0x583065)[_0x395d6f(0x187)];if(_0x506bac['length']===0x0)return saveSessionContext({'segment_path':undefined},_0x4f65fe),console[_0x395d6f(0x186)](a33_0x209ef1[_0x395d6f(0x192)]('✔\x20Context\x20cleared.\x20Back\x20to\x20root.')),0x0;_0x29a2cb[_0x395d6f(0x1b4)]&&(console[_0x395d6f(0x199)](_0x395d6f(0x1a5)+_0x29a2cb[_0x395d6f(0x1c0)]),console[_0x395d6f(0x199)](_0x395d6f(0x19c)+_0x583065));const _0x179461=await withSpinner(_0x395d6f(0x1ba)+_0x583065+_0x395d6f(0x1ae),()=>_0x29cec9[_0x395d6f(0x1ab)][_0x395d6f(0x1bf)](_0x583065),{'verbose':_0x29a2cb['verbose']}),_0x3c18c4=_0x179461[_0x395d6f(0x1ac)];_0x29a2cb[_0x395d6f(0x1b4)]&&(console['error'](_0x395d6f(0x19a)+_0x3c18c4[_0x395d6f(0x1a7)]),console['error'](_0x395d6f(0x19d)+_0x3c18c4[_0x395d6f(0x1aa)]),_0x3c18c4['folderId']&&console['error']('Folder\x20ID:\x20'+_0x3c18c4['folderId']));if(_0x3c18c4[_0x395d6f(0x1a7)]===_0x395d6f(0x1ab))return console[_0x395d6f(0x199)](a33_0x209ef1[_0x395d6f(0x19f)](_0x395d6f(0x19b))),console[_0x395d6f(0x199)](_0x395d6f(0x1b7)),console[_0x395d6f(0x199)](a33_0x209ef1[_0x395d6f(0x1bb)]('Use:\x20tdx\x20segment\x20use\x20'+_0x3c18c4[_0x395d6f(0x18d)]+(_0x3c18c4[_0x395d6f(0x1b6)]?'/'+_0x3c18c4['folderPath'][_0x395d6f(0x1bd)]('/'):''))),0x1;return saveSessionContext({'segment_path':_0x3c18c4[_0x395d6f(0x1b9)],'parent_segment':_0x3c18c4[_0x395d6f(0x18d)]},_0x4f65fe),console[_0x395d6f(0x186)](a33_0x209ef1['green'](_0x395d6f(0x198)+a33_0x209ef1[_0x395d6f(0x1bb)](_0x3c18c4[_0x395d6f(0x1b9)]))),_0x29a2cb[_0x395d6f(0x1b4)]&&(console[_0x395d6f(0x199)](a33_0x209ef1[_0x395d6f(0x1a6)](_0x395d6f(0x18b))),console[_0x395d6f(0x199)](a33_0x209ef1[_0x395d6f(0x1a6)](_0x395d6f(0x1be)))),0x0;}catch(_0x49a0a2){throw _0x49a0a2;}}}
@@ -1 +1 @@
1
- const a34_0x4fb95d=a34_0x4537;(function(_0x273bed,_0x294eb4){const _0x47c833=a34_0x4537,_0x2a21eb=_0x273bed();while(!![]){try{const _0x5a5802=parseInt(_0x47c833(0x1e4))/0x1*(-parseInt(_0x47c833(0x1ec))/0x2)+parseInt(_0x47c833(0x201))/0x3+parseInt(_0x47c833(0x1db))/0x4+-parseInt(_0x47c833(0x1d7))/0x5+-parseInt(_0x47c833(0x1ee))/0x6+-parseInt(_0x47c833(0x1fb))/0x7*(-parseInt(_0x47c833(0x1dc))/0x8)+parseInt(_0x47c833(0x1f3))/0x9;if(_0x5a5802===_0x294eb4)break;else _0x2a21eb['push'](_0x2a21eb['shift']());}catch(_0x5caeda){_0x2a21eb['push'](_0x2a21eb['shift']());}}}(a34_0x1853,0x2c0a5));function a34_0x4537(_0x5cfc56,_0x519017){_0x5cfc56=_0x5cfc56-0x1d2;const _0x185381=a34_0x1853();let _0x4537f4=_0x185381[_0x5cfc56];return _0x4537f4;}import{BaseCommand}from'./command.js';import{resolveTarget,isSuccessfulResolution}from'../sdk/segment/target-resolution.js';import{findYamlFiles}from'../sdk/segment/file-discovery.js';import{existsSync}from'fs';import a34_0x5e203a from'chalk';function a34_0x1853(){const _0x4a302b=['warningCount','yellow','targetDir','green','valid','\x20valid','verbose','Usage:\x20tdx\x20sg\x20validate\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Validate\x20all\x20(requires\x20context)','Error:\x20No\x20YAML\x20files\x20found\x20in\x20','\x20warning(s)\x20found','1596785HHygre','endsWith','length','cyan','923028yYdbxG','544GnlctT','segment:validate','warnings','cwd','.yaml','error','✔\x20All\x20','invalidCount','61mPnzWZ','dim','log','.yml','description','helpText','errorCode','Error:\x20','5828OqOXVI','red','2029788kMooUZ','parentSegment','\x20file(s)\x20with\x20errors,\x20','no_parent','\x20error(s)','3758688ELBeJo','Validation\x20failed:\x20','\x20\x20\x20\x20\x20\x20\x20tdx\x20sg\x20validate\x20<file_path>\x20\x20#\x20Validate\x20specific\x20file','):\x20','Error:\x20File\x20must\x20have\x20.yml\x20or\x20.yaml\x20extension:\x20','execute','parent_segment\x20is\x20not\x20set.\x20Use\x20`tdx\x20sg\x20use\x20<parent_name>`\x20to\x20set\x20it.\x0a','Validate\x20segment\x20and\x20journey\x20YAML\x20files','3808GPlRZN','hasErrors','type','file','\x20warning(s)','\x20file(s)\x20valid','991251TVXxXg','errors'];a34_0x1853=function(){return _0x4a302b;};return a34_0x1853();}import{formatValidationResult}from'../sdk/segment/yaml-validator.js';import{validateYamlFiles,isValidationResult,calculateSummary}from'../sdk/segment/validate-files.js';export class SegmentValidateCommand extends BaseCommand{['name']=a34_0x4fb95d(0x1dd);[a34_0x4fb95d(0x1e8)]=a34_0x4fb95d(0x1fa);async[a34_0x4fb95d(0x1f8)](_0x5a2955){const _0x4ed3d4=a34_0x4fb95d,{options:_0x498015,args:_0x7d33fe}=_0x5a2955,_0x3ce822=_0x498015,_0x50172b=await resolveTarget({'arg':_0x7d33fe[0x0],'contextParent':_0x498015[_0x4ed3d4(0x1ef)],'cwd':process[_0x4ed3d4(0x1df)]()});if(!isSuccessfulResolution(_0x50172b))return _0x50172b[_0x4ed3d4(0x1ea)]===_0x4ed3d4(0x1f1)?(console['error'](a34_0x5e203a['yellow'](_0x4ed3d4(0x1f9))),console['error'](_0x4ed3d4(0x1d4)),console[_0x4ed3d4(0x1e1)]('\x20\x20\x20\x20\x20\x20\x20tdx\x20sg\x20validate\x20.\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Validate\x20current\x20directory'),console[_0x4ed3d4(0x1e1)](_0x4ed3d4(0x1f5))):(console[_0x4ed3d4(0x1e1)](a34_0x5e203a[_0x4ed3d4(0x1ed)](_0x4ed3d4(0x1eb)+_0x50172b['message']+'\x0a')),_0x50172b['helpText']&&console[_0x4ed3d4(0x1e1)](a34_0x5e203a[_0x4ed3d4(0x1da)](_0x50172b[_0x4ed3d4(0x1e9)]))),0x1;const _0x30778a=_0x50172b[_0x4ed3d4(0x205)],_0x25e47f=_0x50172b[_0x4ed3d4(0x1fd)]===_0x4ed3d4(0x1fe)?_0x50172b['filePath']:undefined;if(!_0x25e47f&&!existsSync(_0x30778a))return console[_0x4ed3d4(0x1e1)](a34_0x5e203a[_0x4ed3d4(0x1ed)]('Error:\x20Directory\x20not\x20found:\x20'+_0x30778a+'\x0a')),0x1;let _0x12cbbf;if(_0x25e47f){if(!_0x25e47f['endsWith'](_0x4ed3d4(0x1e7))&&!_0x25e47f[_0x4ed3d4(0x1d8)](_0x4ed3d4(0x1e0)))return console[_0x4ed3d4(0x1e1)](a34_0x5e203a[_0x4ed3d4(0x1ed)](_0x4ed3d4(0x1f7)+_0x25e47f+'\x0a')),0x1;_0x12cbbf=[_0x25e47f];}else _0x12cbbf=findYamlFiles(_0x30778a);if(_0x12cbbf['length']===0x0)return console['error'](a34_0x5e203a[_0x4ed3d4(0x1ed)](_0x4ed3d4(0x1d5)+_0x30778a+'\x0a')),0x1;const _0x3f4043=validateYamlFiles(_0x12cbbf,_0x30778a),_0x38fc8e=calculateSummary(_0x3f4043);for(const _0x3d460a of _0x3f4043){if(!isValidationResult(_0x3d460a))continue;const {relativePath:_0x43366b,source:_0xd34b6f,result:_0x32f396,fileType:_0x2eb284}=_0x3d460a,_0x3a73e7=_0x2eb284;if(_0x32f396[_0x4ed3d4(0x207)]&&_0x32f396[_0x4ed3d4(0x1de)][_0x4ed3d4(0x1d9)]===0x0)_0x3ce822[_0x4ed3d4(0x1d3)]&&console[_0x4ed3d4(0x1e6)](a34_0x5e203a['green']('✔\x20'+_0x43366b)+a34_0x5e203a['dim']('\x20('+_0x3a73e7+')'));else _0x32f396[_0x4ed3d4(0x207)]?(console['log'](a34_0x5e203a[_0x4ed3d4(0x204)]('⚠\x20'+_0x43366b)+a34_0x5e203a['dim']('\x20('+_0x3a73e7+_0x4ed3d4(0x1f6)+_0x32f396[_0x4ed3d4(0x1de)][_0x4ed3d4(0x1d9)]+_0x4ed3d4(0x1ff))),console['log'](formatValidationResult(_0x32f396,_0xd34b6f,_0x43366b))):(console[_0x4ed3d4(0x1e6)](a34_0x5e203a[_0x4ed3d4(0x1ed)]('✖\x20'+_0x43366b)+a34_0x5e203a[_0x4ed3d4(0x1e5)]('\x20('+_0x3a73e7+_0x4ed3d4(0x1f6)+_0x32f396[_0x4ed3d4(0x202)][_0x4ed3d4(0x1d9)]+_0x4ed3d4(0x1f2))),console[_0x4ed3d4(0x1e6)](formatValidationResult(_0x32f396,_0xd34b6f,_0x43366b)));}return console[_0x4ed3d4(0x1e6)](''),_0x38fc8e[_0x4ed3d4(0x1fc)]?(console[_0x4ed3d4(0x1e6)](a34_0x5e203a[_0x4ed3d4(0x1ed)](_0x4ed3d4(0x1f4)+_0x38fc8e[_0x4ed3d4(0x1e3)]+_0x4ed3d4(0x1f0)+_0x38fc8e['validCount']+_0x4ed3d4(0x1d2))),_0x38fc8e['warningCount']>0x0&&console[_0x4ed3d4(0x1e6)](a34_0x5e203a['yellow'](_0x38fc8e[_0x4ed3d4(0x203)]+_0x4ed3d4(0x1d6))),0x1):(console[_0x4ed3d4(0x1e6)](a34_0x5e203a[_0x4ed3d4(0x206)](_0x4ed3d4(0x1e2)+_0x38fc8e['validCount']+_0x4ed3d4(0x200))),_0x38fc8e[_0x4ed3d4(0x203)]>0x0&&console[_0x4ed3d4(0x1e6)](a34_0x5e203a[_0x4ed3d4(0x204)](_0x38fc8e[_0x4ed3d4(0x203)]+_0x4ed3d4(0x1d6))),0x0);}}
1
+ const a34_0x3d4285=a34_0x13a7;(function(_0x52c32c,_0xef18ab){const _0x829650=a34_0x13a7,_0x43df81=_0x52c32c();while(!![]){try{const _0x39f682=-parseInt(_0x829650(0x14f))/0x1+parseInt(_0x829650(0x140))/0x2+-parseInt(_0x829650(0x139))/0x3*(-parseInt(_0x829650(0x131))/0x4)+-parseInt(_0x829650(0x132))/0x5*(-parseInt(_0x829650(0x13b))/0x6)+-parseInt(_0x829650(0x150))/0x7+-parseInt(_0x829650(0x12c))/0x8*(parseInt(_0x829650(0x133))/0x9)+parseInt(_0x829650(0x141))/0xa;if(_0x39f682===_0xef18ab)break;else _0x43df81['push'](_0x43df81['shift']());}catch(_0xd3e6d8){_0x43df81['push'](_0x43df81['shift']());}}}(a34_0x35a5,0x9e557));import{BaseCommand}from'./command.js';import{resolveTarget,isSuccessfulResolution}from'../sdk/segment/target-resolution.js';import{findYamlFiles}from'../sdk/segment/file-discovery.js';function a34_0x13a7(_0x412ac5,_0x2deba4){_0x412ac5=_0x412ac5-0x124;const _0x35a5de=a34_0x35a5();let _0x13a7c5=_0x35a5de[_0x412ac5];return _0x13a7c5;}import{existsSync}from'fs';import a34_0x3e4e5f 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{['name']=a34_0x3d4285(0x147);[a34_0x3d4285(0x145)]='Validate\x20segment\x20and\x20journey\x20YAML\x20files';async[a34_0x3d4285(0x126)](_0x46747b){const _0x253998=a34_0x3d4285,{options:_0x292a2f,args:_0x33b5d3}=_0x46747b,_0x59542b=_0x292a2f,_0x11c21a=await resolveTarget({'arg':_0x33b5d3[0x0],'contextParent':_0x292a2f['parentSegment'],'cwd':process['cwd']()});if(!isSuccessfulResolution(_0x11c21a))return _0x11c21a[_0x253998(0x127)]==='no_parent'?(console[_0x253998(0x14d)](a34_0x3e4e5f[_0x253998(0x144)](_0x253998(0x13d))),console['error'](_0x253998(0x12d)),console[_0x253998(0x14d)](_0x253998(0x152)),console[_0x253998(0x14d)](_0x253998(0x138))):(console[_0x253998(0x14d)](a34_0x3e4e5f['red']('Error:\x20'+_0x11c21a[_0x253998(0x14b)]+'\x0a')),_0x11c21a[_0x253998(0x12a)]&&console['error'](a34_0x3e4e5f[_0x253998(0x13c)](_0x11c21a[_0x253998(0x12a)]))),0x1;const _0x38f273=_0x11c21a[_0x253998(0x13e)],_0x35b121=_0x11c21a[_0x253998(0x129)]==='file'?_0x11c21a[_0x253998(0x12f)]:undefined;if(!_0x35b121&&!existsSync(_0x38f273))return console[_0x253998(0x14d)](a34_0x3e4e5f[_0x253998(0x124)]('Error:\x20Directory\x20not\x20found:\x20'+_0x38f273+'\x0a')),0x1;let _0x4a73ec;if(_0x35b121){if(!_0x35b121[_0x253998(0x154)](_0x253998(0x148))&&!_0x35b121['endsWith'](_0x253998(0x151)))return console['error'](a34_0x3e4e5f[_0x253998(0x124)](_0x253998(0x125)+_0x35b121+'\x0a')),0x1;_0x4a73ec=[_0x35b121];}else _0x4a73ec=findYamlFiles(_0x38f273);if(_0x4a73ec[_0x253998(0x14c)]===0x0)return console[_0x253998(0x14d)](a34_0x3e4e5f[_0x253998(0x124)](_0x253998(0x14e)+_0x38f273+'\x0a')),0x1;const _0x4516db=validateYamlFiles(_0x4a73ec,_0x38f273),_0x5054b4=calculateSummary(_0x4516db);for(const _0x226fe1 of _0x4516db){if(!isValidationResult(_0x226fe1))continue;const {relativePath:_0x57cfad,source:_0x531a3d,result:_0x2e738a,fileType:_0x42df4c}=_0x226fe1,_0x5b94a7=_0x42df4c;if(_0x2e738a[_0x253998(0x13f)]&&_0x2e738a[_0x253998(0x146)][_0x253998(0x14c)]===0x0)_0x59542b[_0x253998(0x149)]&&console[_0x253998(0x130)](a34_0x3e4e5f[_0x253998(0x14a)]('✔\x20'+_0x57cfad)+a34_0x3e4e5f[_0x253998(0x136)]('\x20('+_0x5b94a7+')'));else _0x2e738a[_0x253998(0x13f)]?(console[_0x253998(0x130)](a34_0x3e4e5f[_0x253998(0x144)]('⚠\x20'+_0x57cfad)+a34_0x3e4e5f['dim']('\x20('+_0x5b94a7+_0x253998(0x128)+_0x2e738a[_0x253998(0x146)][_0x253998(0x14c)]+'\x20warning(s)')),console[_0x253998(0x130)](formatValidationResult(_0x2e738a,_0x531a3d,_0x57cfad))):(console['log'](a34_0x3e4e5f['red']('✖\x20'+_0x57cfad)+a34_0x3e4e5f['dim']('\x20('+_0x5b94a7+_0x253998(0x128)+_0x2e738a['errors'][_0x253998(0x14c)]+_0x253998(0x12e))),console[_0x253998(0x130)](formatValidationResult(_0x2e738a,_0x531a3d,_0x57cfad)));}return console['log'](''),_0x5054b4[_0x253998(0x153)]?(console['log'](a34_0x3e4e5f[_0x253998(0x124)](_0x253998(0x142)+_0x5054b4['invalidCount']+_0x253998(0x135)+_0x5054b4[_0x253998(0x137)]+_0x253998(0x134))),_0x5054b4['warningCount']>0x0&&console['log'](a34_0x3e4e5f['yellow'](_0x5054b4[_0x253998(0x12b)]+_0x253998(0x13a))),0x1):(console[_0x253998(0x130)](a34_0x3e4e5f[_0x253998(0x14a)]('✔\x20All\x20'+_0x5054b4['validCount']+_0x253998(0x143))),_0x5054b4[_0x253998(0x12b)]>0x0&&console[_0x253998(0x130)](a34_0x3e4e5f[_0x253998(0x144)](_0x5054b4[_0x253998(0x12b)]+_0x253998(0x13a))),0x0);}}function a34_0x35a5(){const _0x19833b=['173986NXdKud','6748710UvTwON','Validation\x20failed:\x20','\x20file(s)\x20valid','yellow','description','warnings','segment:validate','.yml','verbose','green','message','length','error','Error:\x20No\x20YAML\x20files\x20found\x20in\x20','1017813iFamer','228613SCjIck','.yaml','\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','hasErrors','endsWith','red','Error:\x20File\x20must\x20have\x20.yml\x20or\x20.yaml\x20extension:\x20','execute','errorCode','):\x20','type','helpText','warningCount','212792ZzOHDP','Usage:\x20tdx\x20sg\x20validate\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Validate\x20all\x20(requires\x20context)','\x20error(s)','filePath','log','4SgGUkr','15ZXdMyo','423UGGDAl','\x20valid','\x20file(s)\x20with\x20errors,\x20','dim','validCount','\x20\x20\x20\x20\x20\x20\x20tdx\x20sg\x20validate\x20<file_path>\x20\x20#\x20Validate\x20specific\x20file','2976171MfYlIx','\x20warning(s)\x20found','2390478MQOlVG','cyan','parent_segment\x20is\x20not\x20set.\x20Use\x20`tdx\x20sg\x20use\x20<parent_name>`\x20to\x20set\x20it.\x0a','targetDir','valid'];a34_0x35a5=function(){return _0x19833b;};return a34_0x35a5();}
@@ -1 +1 @@
1
- const a35_0x111ff2=a35_0x39ea;function a35_0x5b2f(){const _0x3e9523=['verbose','✔\x20Built\x20tree\x20with\x20','363145DAyHbn','segments',']\x20matching\x20\x27','/e/','218940yHgAsM','segment','List\x20folders\x20and\x20child\x20segments','dim','includes','✔\x20Found\x20','cause','json','Resolving\x20path\x20\x27','description','type','resolvePathToResource','Use\x20tdx\x20ps\x20list\x20to\x20see\x20available\x20parent\x20segments.','message','Error:\x20','Building\x20hierarchy\x20tree...','639LDbgAn','14XPrgKg','site','journeys','error','\x20journey','folderId','parentId','listWithPattern','\x20folder','name','\x20\x20tdx\x20sg\x20use\x20\x22My\x20Audience\x22','data','/app/ps/','replace','filter','Error:\x20No\x20parent\x20segment\x20context\x20set.','\x27...','jsonl','localeCompare','675760nafJvp','maxDepth','recursive','format','Folder\x20ID:\x20','folders','journey','Listing\x20folders,\x20segments,\x20and\x20journeys...','folder','map','312846FMCusW','125608qwlZhe','sort','30XgQkpV','/j/da','Parent\x20segment\x20context:\x20','listUnified',',\x20and\x20','Resolving\x20parent\x20segment\x20\x27','2573640qNaEJT','log','(empty)','length','Parent\x20ID:\x20','test','1720njVaBI','listRecursive','\x20\x20Cause:\x20','\x20segment','execute','(not\x20set)','Set\x20a\x20parent\x20segment\x20context\x20first:','children'];a35_0x5b2f=function(){return _0x3e9523;};return a35_0x5b2f();}function a35_0x39ea(_0x51c0a7,_0x4be024){_0x51c0a7=_0x51c0a7-0x14c;const _0x5b2f95=a35_0x5b2f();let _0x39eaad=_0x5b2f95[_0x51c0a7];return _0x39eaad;}(function(_0x4f2c6e,_0x470666){const _0x346f98=a35_0x39ea,_0xd8b381=_0x4f2c6e();while(!![]){try{const _0xb4f74f=parseInt(_0x346f98(0x176))/0x1+-parseInt(_0x346f98(0x15d))/0x2+-parseInt(_0x346f98(0x160))/0x3*(parseInt(_0x346f98(0x15e))/0x4)+parseInt(_0x346f98(0x166))/0x5+parseInt(_0x346f98(0x17a))/0x6+parseInt(_0x346f98(0x18b))/0x7*(-parseInt(_0x346f98(0x153))/0x8)+-parseInt(_0x346f98(0x18a))/0x9*(parseInt(_0x346f98(0x16c))/0xa);if(_0xb4f74f===_0x470666)break;else _0xd8b381['push'](_0xd8b381['shift']());}catch(_0x586b5b){_0xd8b381['push'](_0xd8b381['shift']());}}}(a35_0x5b2f,0x40270));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleSDKOutput}from'../core/command-output.js';import{withSpinner}from'../utils/spinner.js';import{formatFlatList,formatTree}from'../sdk/util/tree-formatter.js';import{getConsoleNextUrl}from'../sdk/client/endpoints.js';import a35_0x4688a4 from'chalk';export class SegmentsCommand extends BaseCommand{[a35_0x111ff2(0x194)]=a35_0x111ff2(0x177);[a35_0x111ff2(0x183)]=a35_0x111ff2(0x17c);async[a35_0x111ff2(0x170)](_0x303896){const _0x4abd38=a35_0x111ff2,{options:_0x1fd1b9,args:_0x2fb711}=_0x303896,_0x339047=_0x1fd1b9[_0x4abd38(0x155)],_0xbf0607=_0x2fb711[0x0];try{const _0x5ca3e0=_0x1fd1b9['parentSegment'];_0x1fd1b9['verbose']&&(console[_0x4abd38(0x18e)]('Site:\x20'+_0x1fd1b9[_0x4abd38(0x18c)]),console[_0x4abd38(0x18e)](_0x4abd38(0x162)+(_0x5ca3e0||_0x4abd38(0x171))),_0xbf0607&&console[_0x4abd38(0x18e)]('Folder/pattern\x20arg:\x20'+_0xbf0607),_0x339047&&console['error']('Recursive\x20mode:\x20enabled'));if(!_0x5ca3e0)return console[_0x4abd38(0x18e)](_0x4abd38(0x14f)),console['error'](''),console[_0x4abd38(0x18e)](_0x4abd38(0x172)),console[_0x4abd38(0x18e)]('\x20\x20tdx\x20sg\x20pull\x20\x22My\x20Audience\x22'),console[_0x4abd38(0x18e)](_0x4abd38(0x195)),console[_0x4abd38(0x18e)](''),console[_0x4abd38(0x18e)](_0x4abd38(0x186)),0x1;const _0x1160e2=_0xbf0607&&(_0xbf0607[_0x4abd38(0x17e)]('*')||_0xbf0607[_0x4abd38(0x17e)]('?'));if(_0x1160e2)return await this[_0x4abd38(0x192)](_0x303896,_0x5ca3e0,_0xbf0607);const _0x592d07=_0xbf0607?_0x5ca3e0+'/'+_0xbf0607:_0x5ca3e0;return _0x339047?await this[_0x4abd38(0x16d)](_0x303896,_0x592d07):await this[_0x4abd38(0x163)](_0x303896,_0x592d07);}catch(_0x520a5d){if(_0x520a5d instanceof SDKError)return console[_0x4abd38(0x18e)](_0x4abd38(0x188)+_0x520a5d[_0x4abd38(0x187)]),_0x520a5d[_0x4abd38(0x180)]&&console['error'](_0x4abd38(0x16e)+_0x520a5d[_0x4abd38(0x180)]),0x1;throw _0x520a5d;}}async[a35_0x111ff2(0x192)](_0xf42e9d,_0x31c63d,_0x2a6410){const _0x32dc07=a35_0x111ff2,{options:_0x8954a0,tdx:_0x5aafe4}=_0xf42e9d,_0x349cff=await withSpinner(_0x32dc07(0x165)+_0x31c63d+'\x27...',()=>_0x5aafe4[_0x32dc07(0x17b)]['resolvePathToResource'](_0x31c63d),{'verbose':_0x8954a0[_0x32dc07(0x174)]}),_0x75d74a=_0x349cff[_0x32dc07(0x196)],_0x107891=await withSpinner(_0x32dc07(0x15a),()=>_0x5aafe4[_0x32dc07(0x17b)]['listUnifiedWithJourneys'](_0x75d74a[_0x32dc07(0x191)],_0x75d74a[_0x32dc07(0x190)]),{'verbose':_0x8954a0[_0x32dc07(0x174)]}),{folders:_0x155802,segments:_0x11efc9,journeys:_0x30592e}=_0x107891[_0x32dc07(0x196)],_0x1708ae=_0x2a6410[_0x32dc07(0x14d)](/[.+^${}()|[\]\\]/g,'\x5c$&')[_0x32dc07(0x14d)](/\*/g,'.*')[_0x32dc07(0x14d)](/\?/g,'.'),_0x2bee73=new RegExp('^'+_0x1708ae+'$','i'),_0x5a7f1b=_0x155802[_0x32dc07(0x14e)](_0x56e6ae=>_0x2bee73[_0x32dc07(0x16b)](_0x56e6ae['name'])),_0xcf7ee2=_0x11efc9[_0x32dc07(0x14e)](_0x1ca58b=>_0x2bee73[_0x32dc07(0x16b)](_0x1ca58b[_0x32dc07(0x194)])),_0x2077de=_0x30592e['filter'](_0x169a2e=>_0x2bee73['test'](_0x169a2e['journeyBundleName'])),_0x33ddf8=_0x5a7f1b[_0x32dc07(0x169)]+_0xcf7ee2[_0x32dc07(0x169)]+_0x2077de[_0x32dc07(0x169)];console[_0x32dc07(0x18e)]('✔\x20Found\x20'+_0x5a7f1b['length']+_0x32dc07(0x193)+(_0x5a7f1b['length']!==0x1?'s':'')+',\x20'+_0xcf7ee2[_0x32dc07(0x169)]+'\x20segment'+(_0xcf7ee2[_0x32dc07(0x169)]!==0x1?'s':'')+_0x32dc07(0x164)+_0x2077de[_0x32dc07(0x169)]+_0x32dc07(0x18f)+(_0x2077de[_0x32dc07(0x169)]!==0x1?'s':'')+'\x20matching\x20\x27'+_0x2a6410+'\x27');const _0x210cef=_0x12a348=>{const _0x58d7b4=_0x32dc07;return getConsoleNextUrl(_0x8954a0['site'],_0x58d7b4(0x14c)+_0x75d74a[_0x58d7b4(0x191)]+_0x58d7b4(0x179)+_0x12a348);},_0x600b06=_0x8954a0['format']===_0x32dc07(0x181)||_0x8954a0['format']==='jsonl';if(_0x600b06){const _0x3ecfdc=[..._0x5a7f1b[_0x32dc07(0x15c)](_0x3d4254=>({..._0x3d4254,'type':_0x32dc07(0x15b)})),..._0xcf7ee2[_0x32dc07(0x15c)](_0x195292=>({..._0x195292,'type':_0x32dc07(0x17b),'url':_0x210cef(_0x195292['id'])})),..._0x2077de[_0x32dc07(0x15c)](_0x1cdab6=>({..._0x1cdab6,'name':_0x1cdab6['journeyBundleName'],'type':_0x32dc07(0x159)}))][_0x32dc07(0x15f)]((_0xf9e776,_0x3d364a)=>_0xf9e776[_0x32dc07(0x194)][_0x32dc07(0x152)](_0x3d364a[_0x32dc07(0x194)]));await handleSDKOutput(_0x3ecfdc,_0x8954a0);}else{if(_0x33ddf8===0x0)console[_0x32dc07(0x167)]('No\x20items\x20match\x20pattern:\x20'+_0x2a6410);else{console['log'](a35_0x4688a4[_0x32dc07(0x17d)]('['+_0x31c63d+_0x32dc07(0x178)+_0x2a6410+'\x27'));const _0x555b43=formatFlatList(_0x5a7f1b,_0xcf7ee2,{'showMetadata':!![],'getSegmentUrl':_0x210cef},_0x2077de);console[_0x32dc07(0x167)](_0x555b43);}}return 0x0;}async[a35_0x111ff2(0x163)](_0xa9cce5,_0x4dce3f){const _0x2e024d=a35_0x111ff2,{options:_0x54ffaa,tdx:_0x350eb4}=_0xa9cce5,_0x36f7d0=await withSpinner('Resolving\x20path\x20\x27'+_0x4dce3f+_0x2e024d(0x150),()=>_0x350eb4[_0x2e024d(0x17b)][_0x2e024d(0x185)](_0x4dce3f),{'verbose':_0x54ffaa[_0x2e024d(0x174)]}),_0x5a2dfd=_0x36f7d0[_0x2e024d(0x196)];_0x54ffaa[_0x2e024d(0x174)]&&(console[_0x2e024d(0x18e)](_0x2e024d(0x16a)+_0x5a2dfd[_0x2e024d(0x191)]),_0x5a2dfd[_0x2e024d(0x190)]&&console[_0x2e024d(0x18e)](_0x2e024d(0x157)+_0x5a2dfd[_0x2e024d(0x190)]));const _0x56970c=await withSpinner(_0x2e024d(0x15a),()=>_0x350eb4['segment']['listUnifiedWithJourneys'](_0x5a2dfd[_0x2e024d(0x191)],_0x5a2dfd['folderId']),{'verbose':_0x54ffaa[_0x2e024d(0x174)]}),{folders:_0x8cbd03,segments:_0x1697d6,journeys:_0x839606}=_0x56970c['data'],_0x4377ea=_0x8cbd03['length']+_0x1697d6[_0x2e024d(0x169)]+_0x839606[_0x2e024d(0x169)];console['error'](_0x2e024d(0x17f)+_0x8cbd03['length']+'\x20folder'+(_0x8cbd03[_0x2e024d(0x169)]!==0x1?'s':'')+',\x20'+_0x1697d6[_0x2e024d(0x169)]+_0x2e024d(0x16f)+(_0x1697d6[_0x2e024d(0x169)]!==0x1?'s':'')+_0x2e024d(0x164)+_0x839606[_0x2e024d(0x169)]+'\x20journey'+(_0x839606['length']!==0x1?'s':''));const _0xdd6575=_0x438b12=>{const _0x4dc5fe=_0x2e024d;return getConsoleNextUrl(_0x54ffaa['site'],_0x4dc5fe(0x14c)+_0x5a2dfd[_0x4dc5fe(0x191)]+_0x4dc5fe(0x179)+_0x438b12);},_0x1815fd=_0x20de64=>{const _0x526e58=_0x2e024d;return getConsoleNextUrl(_0x54ffaa['site'],_0x526e58(0x14c)+_0x5a2dfd[_0x526e58(0x191)]+_0x526e58(0x179)+_0x20de64+'/j/da');},_0x2eaadd=_0x54ffaa[_0x2e024d(0x156)]===_0x2e024d(0x181)||_0x54ffaa[_0x2e024d(0x156)]===_0x2e024d(0x151);if(_0x2eaadd){const _0x8e15eb=[..._0x8cbd03['map'](_0x8fa4fe=>({..._0x8fa4fe,'type':_0x2e024d(0x15b)})),..._0x1697d6[_0x2e024d(0x15c)](_0x454907=>({..._0x454907,'type':'segment','url':_0xdd6575(_0x454907['id'])})),..._0x839606[_0x2e024d(0x15c)](_0x519a5e=>({..._0x519a5e,'name':_0x519a5e['journeyBundleName'],'type':'journey','url':_0x1815fd(_0x519a5e['id'])}))]['sort']((_0x164172,_0x2e8ecd)=>_0x164172[_0x2e024d(0x194)][_0x2e024d(0x152)](_0x2e8ecd['name']));await handleSDKOutput(_0x8e15eb,_0x54ffaa);}else{if(_0x4377ea===0x0)console['log'](a35_0x4688a4[_0x2e024d(0x17d)]('['+_0x4dce3f+']')),console[_0x2e024d(0x167)](_0x2e024d(0x168));else{console[_0x2e024d(0x167)](a35_0x4688a4[_0x2e024d(0x17d)]('['+_0x4dce3f+']'));const _0x110f3e=formatFlatList(_0x8cbd03,_0x1697d6,{'showMetadata':!![],'getSegmentUrl':_0xdd6575,'getJourneyUrl':_0x1815fd},_0x839606);console['log'](_0x110f3e);}}return 0x0;}async[a35_0x111ff2(0x16d)](_0x23f830,_0x44fa6a){const _0x3587a5=a35_0x111ff2,{options:_0x34aaad,tdx:_0xadb699}=_0x23f830,_0x1d7075=await withSpinner(_0x3587a5(0x182)+_0x44fa6a+'\x27...',()=>_0xadb699['segment'][_0x3587a5(0x185)](_0x44fa6a),{'verbose':_0x34aaad[_0x3587a5(0x174)]}),_0x271442=_0x1d7075[_0x3587a5(0x196)];_0x34aaad['verbose']&&(console[_0x3587a5(0x18e)]('Parent\x20ID:\x20'+_0x271442[_0x3587a5(0x191)]),_0x271442[_0x3587a5(0x190)]&&console[_0x3587a5(0x18e)](_0x3587a5(0x157)+_0x271442[_0x3587a5(0x190)]));const _0x3b1223=_0x34aaad[_0x3587a5(0x154)]||0xa,_0x29c91f=await withSpinner(_0x3587a5(0x189),()=>_0xadb699[_0x3587a5(0x17b)]['listRecursive'](_0x271442['parentId'],_0x271442['folderId'],0x0,_0x3b1223),{'verbose':_0x34aaad[_0x3587a5(0x174)]}),_0x392348=_0x29c91f[_0x3587a5(0x196)],_0x56a74b=_0x428607=>{const _0xbc2735=_0x3587a5;let _0x3eff5b=0x0,_0x3318bb=0x0,_0x3a0398=0x0;for(const _0x17fe53 of _0x428607){if(_0x17fe53['type']===_0xbc2735(0x15b))_0x3eff5b++;else{if(_0x17fe53[_0xbc2735(0x184)]===_0xbc2735(0x17b))_0x3318bb++;else{if(_0x17fe53['type']===_0xbc2735(0x159))_0x3a0398++;}}if(_0x17fe53[_0xbc2735(0x173)]){const _0x97caf2=_0x56a74b(_0x17fe53[_0xbc2735(0x173)]);_0x3eff5b+=_0x97caf2[_0xbc2735(0x158)],_0x3318bb+=_0x97caf2[_0xbc2735(0x177)],_0x3a0398+=_0x97caf2[_0xbc2735(0x18d)];}}return{'folders':_0x3eff5b,'segments':_0x3318bb,'journeys':_0x3a0398};},_0x14b80d=_0x56a74b(_0x392348);console[_0x3587a5(0x18e)](_0x3587a5(0x175)+_0x14b80d[_0x3587a5(0x158)]+_0x3587a5(0x193)+(_0x14b80d[_0x3587a5(0x158)]!==0x1?'s':'')+',\x20'+_0x14b80d[_0x3587a5(0x177)]+'\x20segment'+(_0x14b80d[_0x3587a5(0x177)]!==0x1?'s':'')+_0x3587a5(0x164)+_0x14b80d[_0x3587a5(0x18d)]+_0x3587a5(0x18f)+(_0x14b80d[_0x3587a5(0x18d)]!==0x1?'s':''));const _0x4951ae=_0x8be72a=>{const _0x202d64=_0x3587a5;return getConsoleNextUrl(_0x34aaad[_0x202d64(0x18c)],_0x202d64(0x14c)+_0x271442[_0x202d64(0x191)]+_0x202d64(0x179)+_0x8be72a);},_0x14bfb5=_0x584b79=>{const _0x3bb4c2=_0x3587a5;return getConsoleNextUrl(_0x34aaad[_0x3bb4c2(0x18c)],_0x3bb4c2(0x14c)+_0x271442[_0x3bb4c2(0x191)]+_0x3bb4c2(0x179)+_0x584b79+_0x3bb4c2(0x161));};if(_0x34aaad['format']===_0x3587a5(0x181)||_0x34aaad[_0x3587a5(0x156)]===_0x3587a5(0x151))await handleSDKOutput(_0x392348,_0x34aaad);else{console[_0x3587a5(0x167)](a35_0x4688a4[_0x3587a5(0x17d)]('['+_0x44fa6a+']'));const _0x13e137=formatTree(_0x392348,{'showMetadata':!![],'getSegmentUrl':_0x4951ae,'getJourneyUrl':_0x14bfb5});console[_0x3587a5(0x167)](_0x13e137);}return 0x0;}}
1
+ const a35_0x1dd658=a35_0x5908;(function(_0x4d28f0,_0x4fee6){const _0x1417f0=a35_0x5908,_0x55e2c7=_0x4d28f0();while(!![]){try{const _0x171c5e=parseInt(_0x1417f0(0xa2))/0x1*(-parseInt(_0x1417f0(0x83))/0x2)+-parseInt(_0x1417f0(0x7f))/0x3+-parseInt(_0x1417f0(0x78))/0x4+-parseInt(_0x1417f0(0x86))/0x5+-parseInt(_0x1417f0(0xa8))/0x6*(parseInt(_0x1417f0(0x89))/0x7)+parseInt(_0x1417f0(0x7e))/0x8*(-parseInt(_0x1417f0(0x77))/0x9)+-parseInt(_0x1417f0(0xb0))/0xa*(-parseInt(_0x1417f0(0x65))/0xb);if(_0x171c5e===_0x4fee6)break;else _0x55e2c7['push'](_0x55e2c7['shift']());}catch(_0x474dc0){_0x55e2c7['push'](_0x55e2c7['shift']());}}}(a35_0x14df,0x4e88e));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';function a35_0x5908(_0x20e7d1,_0x2e557f){_0x20e7d1=_0x20e7d1-0x64;const _0x14df07=a35_0x14df();let _0x59083d=_0x14df07[_0x20e7d1];return _0x59083d;}import{handleSDKOutput}from'../core/command-output.js';import{withSpinner}from'../utils/spinner.js';function a35_0x14df(){const _0x340f17=['filter','includes','Folder/pattern\x20arg:\x20','folderId','\x5c$&','name','\x27...','Use\x20tdx\x20ps\x20list\x20to\x20see\x20available\x20parent\x20segments.','(not\x20set)','No\x20items\x20match\x20pattern:\x20','(empty)','\x20journey','Parent\x20ID:\x20','localeCompare','segments','sort','List\x20folders\x20and\x20child\x20segments','journeyBundleName','\x20\x20tdx\x20sg\x20use\x20\x22My\x20Audience\x22','children','36019djlZmD','segment','replace','execute',']\x20matching\x20\x27','json','6zEmRNk','description','cause','/j/da','Building\x20hierarchy\x20tree...','\x20segment','journeys','✔\x20Built\x20tree\x20with\x20','21084260IZtUef','folders','11jblzPl','parentId','Folder\x20ID:\x20','maxDepth','error','Error:\x20','test','Error:\x20No\x20parent\x20segment\x20context\x20set.','verbose','listWithPattern','\x20folder','resolvePathToResource','/e/','data','journey',',\x20and\x20','log','map','9ethWHP','1004664ILvfdq','listUnifiedWithJourneys','site','type','recursive','listRecursive','1229264pGIZsV','1451433XMeErr','/app/ps/','jsonl','length','14oAfuvl','format','folder','3068055bAYoXX','Listing\x20folders,\x20segments,\x20and\x20journeys...','Resolving\x20path\x20\x27','226583RXADJT','✔\x20Found\x20','Site:\x20','dim','Parent\x20segment\x20context:\x20'];a35_0x14df=function(){return _0x340f17;};return a35_0x14df();}import{formatFlatList,formatTree}from'../sdk/util/tree-formatter.js';import{getConsoleNextUrl}from'../sdk/client/endpoints.js';import a35_0xe77cc0 from'chalk';export class SegmentsCommand extends BaseCommand{['name']=a35_0x1dd658(0x9c);[a35_0x1dd658(0xa9)]=a35_0x1dd658(0x9e);async[a35_0x1dd658(0xa5)](_0xedaa3f){const _0x3aa832=a35_0x1dd658,{options:_0x162c3e,args:_0x4743a5}=_0xedaa3f,_0x566374=_0x162c3e[_0x3aa832(0x7c)],_0x1cfc6c=_0x4743a5[0x0];try{const _0xe90d79=_0x162c3e['parentSegment'];_0x162c3e['verbose']&&(console[_0x3aa832(0x69)](_0x3aa832(0x8b)+_0x162c3e[_0x3aa832(0x7a)]),console[_0x3aa832(0x69)](_0x3aa832(0x8d)+(_0xe90d79||_0x3aa832(0x96))),_0x1cfc6c&&console[_0x3aa832(0x69)](_0x3aa832(0x90)+_0x1cfc6c),_0x566374&&console[_0x3aa832(0x69)]('Recursive\x20mode:\x20enabled'));if(!_0xe90d79)return console[_0x3aa832(0x69)](_0x3aa832(0x6c)),console[_0x3aa832(0x69)](''),console[_0x3aa832(0x69)]('Set\x20a\x20parent\x20segment\x20context\x20first:'),console[_0x3aa832(0x69)]('\x20\x20tdx\x20sg\x20pull\x20\x22My\x20Audience\x22'),console[_0x3aa832(0x69)](_0x3aa832(0xa0)),console[_0x3aa832(0x69)](''),console['error'](_0x3aa832(0x95)),0x1;const _0x4a27e6=_0x1cfc6c&&(_0x1cfc6c[_0x3aa832(0x8f)]('*')||_0x1cfc6c[_0x3aa832(0x8f)]('?'));if(_0x4a27e6)return await this[_0x3aa832(0x6e)](_0xedaa3f,_0xe90d79,_0x1cfc6c);const _0x2ce96b=_0x1cfc6c?_0xe90d79+'/'+_0x1cfc6c:_0xe90d79;return _0x566374?await this[_0x3aa832(0x7d)](_0xedaa3f,_0x2ce96b):await this['listUnified'](_0xedaa3f,_0x2ce96b);}catch(_0x5e103c){if(_0x5e103c instanceof SDKError)return console[_0x3aa832(0x69)](_0x3aa832(0x6a)+_0x5e103c['message']),_0x5e103c['cause']&&console[_0x3aa832(0x69)]('\x20\x20Cause:\x20'+_0x5e103c[_0x3aa832(0xaa)]),0x1;throw _0x5e103c;}}async[a35_0x1dd658(0x6e)](_0x387761,_0x21da93,_0x428097){const _0x118862=a35_0x1dd658,{options:_0x5d2eae,tdx:_0x4d2e24}=_0x387761,_0x1b32c1=await withSpinner('Resolving\x20parent\x20segment\x20\x27'+_0x21da93+'\x27...',()=>_0x4d2e24[_0x118862(0xa3)][_0x118862(0x70)](_0x21da93),{'verbose':_0x5d2eae['verbose']}),_0x6c137f=_0x1b32c1['data'],_0x407a3a=await withSpinner('Listing\x20folders,\x20segments,\x20and\x20journeys...',()=>_0x4d2e24[_0x118862(0xa3)][_0x118862(0x79)](_0x6c137f[_0x118862(0x66)],_0x6c137f[_0x118862(0x91)]),{'verbose':_0x5d2eae['verbose']}),{folders:_0x5dfa64,segments:_0x1576bb,journeys:_0x1a580c}=_0x407a3a[_0x118862(0x72)],_0x549ea3=_0x428097[_0x118862(0xa4)](/[.+^${}()|[\]\\]/g,_0x118862(0x92))[_0x118862(0xa4)](/\*/g,'.*')[_0x118862(0xa4)](/\?/g,'.'),_0x33d8ab=new RegExp('^'+_0x549ea3+'$','i'),_0x44cd15=_0x5dfa64['filter'](_0x112a4b=>_0x33d8ab['test'](_0x112a4b[_0x118862(0x93)])),_0x37b9a2=_0x1576bb[_0x118862(0x8e)](_0x3673b6=>_0x33d8ab[_0x118862(0x6b)](_0x3673b6[_0x118862(0x93)])),_0x377e9b=_0x1a580c[_0x118862(0x8e)](_0x10a77f=>_0x33d8ab['test'](_0x10a77f['journeyBundleName'])),_0x1a1a42=_0x44cd15[_0x118862(0x82)]+_0x37b9a2[_0x118862(0x82)]+_0x377e9b[_0x118862(0x82)];console['error'](_0x118862(0x8a)+_0x44cd15[_0x118862(0x82)]+_0x118862(0x6f)+(_0x44cd15[_0x118862(0x82)]!==0x1?'s':'')+',\x20'+_0x37b9a2[_0x118862(0x82)]+_0x118862(0xad)+(_0x37b9a2[_0x118862(0x82)]!==0x1?'s':'')+',\x20and\x20'+_0x377e9b[_0x118862(0x82)]+_0x118862(0x99)+(_0x377e9b[_0x118862(0x82)]!==0x1?'s':'')+'\x20matching\x20\x27'+_0x428097+'\x27');const _0xc65144=_0x4d8d13=>{const _0x4dcaaf=_0x118862;return getConsoleNextUrl(_0x5d2eae[_0x4dcaaf(0x7a)],_0x4dcaaf(0x80)+_0x6c137f[_0x4dcaaf(0x66)]+_0x4dcaaf(0x71)+_0x4d8d13);},_0x2a0290=_0x5d2eae[_0x118862(0x84)]==='json'||_0x5d2eae[_0x118862(0x84)]==='jsonl';if(_0x2a0290){const _0x2ad539=[..._0x44cd15[_0x118862(0x76)](_0x296a45=>({..._0x296a45,'type':'folder'})),..._0x37b9a2[_0x118862(0x76)](_0x44df28=>({..._0x44df28,'type':_0x118862(0xa3),'url':_0xc65144(_0x44df28['id'])})),..._0x377e9b[_0x118862(0x76)](_0x45bfae=>({..._0x45bfae,'name':_0x45bfae[_0x118862(0x9f)],'type':_0x118862(0x73)}))][_0x118862(0x9d)]((_0x1c7fd9,_0x572c35)=>_0x1c7fd9[_0x118862(0x93)][_0x118862(0x9b)](_0x572c35[_0x118862(0x93)]));await handleSDKOutput(_0x2ad539,_0x5d2eae);}else{if(_0x1a1a42===0x0)console[_0x118862(0x75)](_0x118862(0x97)+_0x428097);else{console[_0x118862(0x75)](a35_0xe77cc0[_0x118862(0x8c)]('['+_0x21da93+_0x118862(0xa6)+_0x428097+'\x27'));const _0x262b0c=formatFlatList(_0x44cd15,_0x37b9a2,{'showMetadata':!![],'getSegmentUrl':_0xc65144},_0x377e9b);console['log'](_0x262b0c);}}return 0x0;}async['listUnified'](_0x4b8ea6,_0xd9a317){const _0x31d631=a35_0x1dd658,{options:_0x152f11,tdx:_0x40480a}=_0x4b8ea6,_0x452083=await withSpinner(_0x31d631(0x88)+_0xd9a317+_0x31d631(0x94),()=>_0x40480a[_0x31d631(0xa3)][_0x31d631(0x70)](_0xd9a317),{'verbose':_0x152f11[_0x31d631(0x6d)]}),_0x401b7e=_0x452083[_0x31d631(0x72)];_0x152f11[_0x31d631(0x6d)]&&(console[_0x31d631(0x69)](_0x31d631(0x9a)+_0x401b7e[_0x31d631(0x66)]),_0x401b7e['folderId']&&console[_0x31d631(0x69)](_0x31d631(0x67)+_0x401b7e[_0x31d631(0x91)]));const _0x1c9f70=await withSpinner(_0x31d631(0x87),()=>_0x40480a[_0x31d631(0xa3)][_0x31d631(0x79)](_0x401b7e[_0x31d631(0x66)],_0x401b7e[_0x31d631(0x91)]),{'verbose':_0x152f11[_0x31d631(0x6d)]}),{folders:_0x2d5c23,segments:_0x2dc791,journeys:_0xc81f34}=_0x1c9f70[_0x31d631(0x72)],_0x510ffa=_0x2d5c23['length']+_0x2dc791[_0x31d631(0x82)]+_0xc81f34[_0x31d631(0x82)];console[_0x31d631(0x69)](_0x31d631(0x8a)+_0x2d5c23[_0x31d631(0x82)]+_0x31d631(0x6f)+(_0x2d5c23[_0x31d631(0x82)]!==0x1?'s':'')+',\x20'+_0x2dc791[_0x31d631(0x82)]+_0x31d631(0xad)+(_0x2dc791[_0x31d631(0x82)]!==0x1?'s':'')+_0x31d631(0x74)+_0xc81f34[_0x31d631(0x82)]+'\x20journey'+(_0xc81f34[_0x31d631(0x82)]!==0x1?'s':''));const _0x470fe5=_0x15d913=>{const _0x97471f=_0x31d631;return getConsoleNextUrl(_0x152f11[_0x97471f(0x7a)],_0x97471f(0x80)+_0x401b7e[_0x97471f(0x66)]+'/e/'+_0x15d913);},_0x217d9e=_0x285392=>{const _0xe7fef7=_0x31d631;return getConsoleNextUrl(_0x152f11[_0xe7fef7(0x7a)],_0xe7fef7(0x80)+_0x401b7e[_0xe7fef7(0x66)]+_0xe7fef7(0x71)+_0x285392+_0xe7fef7(0xab));},_0xe1c2f3=_0x152f11['format']===_0x31d631(0xa7)||_0x152f11[_0x31d631(0x84)]===_0x31d631(0x81);if(_0xe1c2f3){const _0x318f04=[..._0x2d5c23[_0x31d631(0x76)](_0x4027e5=>({..._0x4027e5,'type':_0x31d631(0x85)})),..._0x2dc791['map'](_0x54ea7f=>({..._0x54ea7f,'type':'segment','url':_0x470fe5(_0x54ea7f['id'])})),..._0xc81f34[_0x31d631(0x76)](_0x413a0f=>({..._0x413a0f,'name':_0x413a0f[_0x31d631(0x9f)],'type':'journey','url':_0x217d9e(_0x413a0f['id'])}))][_0x31d631(0x9d)]((_0x44e7cd,_0x36e71e)=>_0x44e7cd[_0x31d631(0x93)]['localeCompare'](_0x36e71e[_0x31d631(0x93)]));await handleSDKOutput(_0x318f04,_0x152f11);}else{if(_0x510ffa===0x0)console[_0x31d631(0x75)](a35_0xe77cc0[_0x31d631(0x8c)]('['+_0xd9a317+']')),console[_0x31d631(0x75)](_0x31d631(0x98));else{console[_0x31d631(0x75)](a35_0xe77cc0[_0x31d631(0x8c)]('['+_0xd9a317+']'));const _0x2bd367=formatFlatList(_0x2d5c23,_0x2dc791,{'showMetadata':!![],'getSegmentUrl':_0x470fe5,'getJourneyUrl':_0x217d9e},_0xc81f34);console[_0x31d631(0x75)](_0x2bd367);}}return 0x0;}async[a35_0x1dd658(0x7d)](_0x19ed9c,_0xe17d09){const _0x31ce9a=a35_0x1dd658,{options:_0x16b125,tdx:_0x706644}=_0x19ed9c,_0x698522=await withSpinner(_0x31ce9a(0x88)+_0xe17d09+_0x31ce9a(0x94),()=>_0x706644[_0x31ce9a(0xa3)][_0x31ce9a(0x70)](_0xe17d09),{'verbose':_0x16b125[_0x31ce9a(0x6d)]}),_0x59a7fe=_0x698522[_0x31ce9a(0x72)];_0x16b125[_0x31ce9a(0x6d)]&&(console[_0x31ce9a(0x69)](_0x31ce9a(0x9a)+_0x59a7fe[_0x31ce9a(0x66)]),_0x59a7fe[_0x31ce9a(0x91)]&&console[_0x31ce9a(0x69)](_0x31ce9a(0x67)+_0x59a7fe['folderId']));const _0x2a4f69=_0x16b125[_0x31ce9a(0x68)]||0xa,_0x1c2398=await withSpinner(_0x31ce9a(0xac),()=>_0x706644[_0x31ce9a(0xa3)][_0x31ce9a(0x7d)](_0x59a7fe[_0x31ce9a(0x66)],_0x59a7fe[_0x31ce9a(0x91)],0x0,_0x2a4f69),{'verbose':_0x16b125[_0x31ce9a(0x6d)]}),_0x184515=_0x1c2398['data'],_0x49651f=_0x1e06f4=>{const _0x676e05=_0x31ce9a;let _0x5782ad=0x0,_0x503684=0x0,_0x4dca27=0x0;for(const _0x3b38a7 of _0x1e06f4){if(_0x3b38a7[_0x676e05(0x7b)]===_0x676e05(0x85))_0x5782ad++;else{if(_0x3b38a7[_0x676e05(0x7b)]==='segment')_0x503684++;else{if(_0x3b38a7[_0x676e05(0x7b)]===_0x676e05(0x73))_0x4dca27++;}}if(_0x3b38a7[_0x676e05(0xa1)]){const _0x4e8d7b=_0x49651f(_0x3b38a7['children']);_0x5782ad+=_0x4e8d7b[_0x676e05(0x64)],_0x503684+=_0x4e8d7b[_0x676e05(0x9c)],_0x4dca27+=_0x4e8d7b[_0x676e05(0xae)];}}return{'folders':_0x5782ad,'segments':_0x503684,'journeys':_0x4dca27};},_0x127663=_0x49651f(_0x184515);console[_0x31ce9a(0x69)](_0x31ce9a(0xaf)+_0x127663[_0x31ce9a(0x64)]+_0x31ce9a(0x6f)+(_0x127663[_0x31ce9a(0x64)]!==0x1?'s':'')+',\x20'+_0x127663['segments']+_0x31ce9a(0xad)+(_0x127663[_0x31ce9a(0x9c)]!==0x1?'s':'')+_0x31ce9a(0x74)+_0x127663[_0x31ce9a(0xae)]+_0x31ce9a(0x99)+(_0x127663[_0x31ce9a(0xae)]!==0x1?'s':''));const _0x236e70=_0x28019d=>{const _0x36ced4=_0x31ce9a;return getConsoleNextUrl(_0x16b125['site'],_0x36ced4(0x80)+_0x59a7fe['parentId']+_0x36ced4(0x71)+_0x28019d);},_0x5465cb=_0x5430de=>{const _0x30d277=_0x31ce9a;return getConsoleNextUrl(_0x16b125[_0x30d277(0x7a)],_0x30d277(0x80)+_0x59a7fe[_0x30d277(0x66)]+_0x30d277(0x71)+_0x5430de+_0x30d277(0xab));};if(_0x16b125['format']===_0x31ce9a(0xa7)||_0x16b125[_0x31ce9a(0x84)]==='jsonl')await handleSDKOutput(_0x184515,_0x16b125);else{console[_0x31ce9a(0x75)](a35_0xe77cc0[_0x31ce9a(0x8c)]('['+_0xe17d09+']'));const _0x4c5062=formatTree(_0x184515,{'showMetadata':!![],'getSegmentUrl':_0x236e70,'getJourneyUrl':_0x5465cb});console['log'](_0x4c5062);}return 0x0;}}
@@ -1 +1 @@
1
- const a36_0x285605=a36_0x5108;(function(_0x1ed5d9,_0x47f77d){const _0x33fa66=a36_0x5108,_0x3b2aca=_0x1ed5d9();while(!![]){try{const _0x206503=-parseInt(_0x33fa66(0x10a))/0x1+-parseInt(_0x33fa66(0xeb))/0x2*(-parseInt(_0x33fa66(0x104))/0x3)+-parseInt(_0x33fa66(0xf8))/0x4*(-parseInt(_0x33fa66(0xf6))/0x5)+parseInt(_0x33fa66(0xf3))/0x6*(-parseInt(_0x33fa66(0x108))/0x7)+parseInt(_0x33fa66(0x100))/0x8*(parseInt(_0x33fa66(0x10f))/0x9)+parseInt(_0x33fa66(0xe6))/0xa+-parseInt(_0x33fa66(0xe9))/0xb;if(_0x206503===_0x47f77d)break;else _0x3b2aca['push'](_0x3b2aca['shift']());}catch(_0x16b50e){_0x3b2aca['push'](_0x3b2aca['shift']());}}}(a36_0x27e1,0x873a6));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleSDKOutput}from'../core/command-output.js';function a36_0x27e1(){const _0x34c062=['Usage:\x20tdx\x20show\x20<database.table>','520462DTYLai','✔\x20Retrieved\x20','limit','execute','\x20from\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','error','data','34050UHMOoI','Show\x20table\x20contents','length','2583395sPNKua','verbose','8zepgzH','description','\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--database\x20<database>','showTable','Catalog:\x20','cause','site','✔\x20Query\x20successful\x20-\x200\x20rows\x20returned','2364176rIOJdG','table','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','Database:\x20','9LfAxqS','Limit:\x20','Error:\x20','catalog','973yodrsP','show','213897FFlTpB','...','validate','\x20row','message','9vcQLSb','\x20\x20Cause:\x20','args','6402670vieupP','database','\x20\x20\x20or:\x20tdx\x20show\x20<catalog.database.table>','13125464aWHaQD'];a36_0x27e1=function(){return _0x34c062;};return a36_0x27e1();}import{parseTableReference,validateTableDescribeReference}from'../utils/table-ref-parser.js';function a36_0x5108(_0x1f994e,_0x45dbd0){_0x1f994e=_0x1f994e-0xe6;const _0x27e17b=a36_0x27e1();let _0x510826=_0x27e17b[_0x1f994e];return _0x510826;}import{withSpinner}from'../utils/spinner.js';import{DEFAULT_DISPLAY_LIMIT,resolveLimit}from'../core/constants.js';export class ShowCommand extends BaseCommand{['name']=a36_0x285605(0x109);[a36_0x285605(0xf9)]=a36_0x285605(0xf4);async[a36_0x285605(0xee)](_0x56d5c8){return this['showTable'](_0x56d5c8);}async[a36_0x285605(0xfb)](_0x462052){const _0x114c0d=a36_0x285605,{options:_0x1d8dbe,args:_0x775685,tdx:_0x357772}=_0x462052;let _0x1a4314;try{_0x1a4314=parseTableReference(_0x775685[0x0]);const _0x136a8d=_0x1d8dbe[_0x114c0d(0xe7)];!_0x1a4314[_0x114c0d(0xe7)]&&_0x136a8d&&(_0x1a4314['database']=_0x136a8d);const _0x43547a=validateTableDescribeReference(_0x1a4314);if(_0x43547a)return console[_0x114c0d(0xf1)](_0x114c0d(0x106)+_0x43547a),console[_0x114c0d(0xf1)](_0x114c0d(0xea)),console[_0x114c0d(0xf1)](_0x114c0d(0xe8)),console['error'](_0x114c0d(0xfa)),0x1;}catch(_0xf3b0cc){return console[_0x114c0d(0xf1)]('Error:\x20'+_0xf3b0cc[_0x114c0d(0x10e)]),console['error'](_0x114c0d(0xea)),console[_0x114c0d(0xf1)](_0x114c0d(0xe8)),console[_0x114c0d(0xf1)](_0x114c0d(0xfa)),0x1;}const _0x58f08e=_0x1a4314[_0x114c0d(0x107)],_0x27f442=_0x1a4314['database'],_0x58723a=_0x1a4314[_0x114c0d(0x101)],_0xf6282a=resolveLimit(_0x1d8dbe[_0x114c0d(0xed)],DEFAULT_DISPLAY_LIMIT);try{_0x1d8dbe[_0x114c0d(0xf7)]&&(console[_0x114c0d(0xf1)]('Site:\x20'+_0x1d8dbe[_0x114c0d(0xfe)]),_0x58f08e&&console[_0x114c0d(0xf1)](_0x114c0d(0xfc)+_0x58f08e),console[_0x114c0d(0xf1)](_0x114c0d(0x103)+_0x27f442),console[_0x114c0d(0xf1)]('Table:\x20'+_0x58723a),console[_0x114c0d(0xf1)](_0x114c0d(0x105)+_0xf6282a));const _0x30b4dc=_0x58f08e?_0x58f08e+'.'+_0x27f442+'.'+_0x58723a:_0x27f442+'.'+_0x58723a,_0x18d0c9=await withSpinner('Querying\x20'+_0x30b4dc+_0x114c0d(0x10b),()=>_0x357772['query'][_0x114c0d(0xfb)](_0x27f442,_0x58723a,_0xf6282a,_0x58f08e),{'verbose':_0x1d8dbe[_0x114c0d(0xf7)]}),_0x4b76af=_0x18d0c9[_0x114c0d(0xf2)],_0x2b3cda=_0x4b76af[_0x114c0d(0xf2)];return _0x2b3cda[_0x114c0d(0xf5)]===0x0?console[_0x114c0d(0xf1)](_0x114c0d(0xff)):console[_0x114c0d(0xf1)](_0x114c0d(0xec)+_0x2b3cda['length']+_0x114c0d(0x10d)+(_0x2b3cda['length']!==0x1?'s':'')+_0x114c0d(0xef)+_0x30b4dc),await handleSDKOutput(_0x2b3cda,_0x1d8dbe),0x0;}catch(_0x525e8c){if(_0x525e8c instanceof SDKError)return console[_0x114c0d(0xf1)](_0x114c0d(0x106)+_0x525e8c[_0x114c0d(0x10e)]),_0x525e8c['cause']&&console['error'](_0x114c0d(0x110)+_0x525e8c[_0x114c0d(0xfd)]),0x1;throw _0x525e8c;}}[a36_0x285605(0x10c)](_0x356a39){const _0x3bb165=a36_0x285605;if(_0x356a39[_0x3bb165(0x111)][_0x3bb165(0xf5)]===0x0)return _0x3bb165(0xf0);if(_0x356a39[_0x3bb165(0x111)][_0x3bb165(0xf5)]>0x1)return _0x3bb165(0x102);return undefined;}}
1
+ const a36_0x5b957=a36_0x2274;function a36_0x10ad(){const _0x1d4f3e=['Site:\x20','66546IVupbc','data','614340SOHWWO','database','Limit:\x20','✔\x20Retrieved\x20','name','site','Table:\x20','Usage:\x20tdx\x20show\x20<database.table>','error','args','2658urYOKz','Querying\x20','validate','verbose','Database:\x20','cause','22GEPkoi','374005aJAVXt','catalog','length','575295zPbxAt','\x20\x20\x20or:\x20tdx\x20show\x20<catalog.database.table>','7PSCrXT','2208744JvVaLg','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','4RrOUVc','Catalog:\x20','description','\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--database\x20<database>','...','query','execute','8928282iLQETF','show','50ybBFTf','\x20\x20Cause:\x20','showTable','Error:\x20'];a36_0x10ad=function(){return _0x1d4f3e;};return a36_0x10ad();}(function(_0x4349f6,_0x34eda1){const _0x1e9f26=a36_0x2274,_0x37a85b=_0x4349f6();while(!![]){try{const _0x5afaac=-parseInt(_0x1e9f26(0x77))/0x1*(-parseInt(_0x1e9f26(0x7d))/0x2)+-parseInt(_0x1e9f26(0x81))/0x3+parseInt(_0x1e9f26(0x86))/0x4*(-parseInt(_0x1e9f26(0x7e))/0x5)+parseInt(_0x1e9f26(0x6d))/0x6*(-parseInt(_0x1e9f26(0x83))/0x7)+-parseInt(_0x1e9f26(0x84))/0x8+-parseInt(_0x1e9f26(0x6b))/0x9*(parseInt(_0x1e9f26(0x66))/0xa)+parseInt(_0x1e9f26(0x64))/0xb;if(_0x5afaac===_0x34eda1)break;else _0x37a85b['push'](_0x37a85b['shift']());}catch(_0x236c5a){_0x37a85b['push'](_0x37a85b['shift']());}}}(a36_0x10ad,0x26ca1));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 a36_0x2274(_0x1a98ef,_0x3557d9){_0x1a98ef=_0x1a98ef-0x64;const _0x10ad32=a36_0x10ad();let _0x227449=_0x10ad32[_0x1a98ef];return _0x227449;}export class ShowCommand extends BaseCommand{[a36_0x5b957(0x71)]=a36_0x5b957(0x65);[a36_0x5b957(0x88)]='Show\x20table\x20contents';async[a36_0x5b957(0x8c)](_0x5db608){return this['showTable'](_0x5db608);}async[a36_0x5b957(0x68)](_0x3af598){const _0x160714=a36_0x5b957,{options:_0x4b9fd3,args:_0x54fbcb,tdx:_0x1011e5}=_0x3af598;let _0x15deb2;try{_0x15deb2=parseTableReference(_0x54fbcb[0x0]);const _0x322c7b=_0x4b9fd3['database'];!_0x15deb2['database']&&_0x322c7b&&(_0x15deb2[_0x160714(0x6e)]=_0x322c7b);const _0x2d012b=validateTableDescribeReference(_0x15deb2);if(_0x2d012b)return console[_0x160714(0x75)](_0x160714(0x69)+_0x2d012b),console[_0x160714(0x75)]('Usage:\x20tdx\x20show\x20<database.table>'),console[_0x160714(0x75)](_0x160714(0x82)),console[_0x160714(0x75)](_0x160714(0x89)),0x1;}catch(_0x596572){return console[_0x160714(0x75)](_0x160714(0x69)+_0x596572['message']),console[_0x160714(0x75)](_0x160714(0x74)),console[_0x160714(0x75)](_0x160714(0x82)),console[_0x160714(0x75)](_0x160714(0x89)),0x1;}const _0x948321=_0x15deb2[_0x160714(0x7f)],_0xfb1ca1=_0x15deb2[_0x160714(0x6e)],_0x7eb2fc=_0x15deb2['table'],_0x3c8c5a=resolveLimit(_0x4b9fd3['limit'],DEFAULT_DISPLAY_LIMIT);try{_0x4b9fd3['verbose']&&(console['error'](_0x160714(0x6a)+_0x4b9fd3[_0x160714(0x72)]),_0x948321&&console['error'](_0x160714(0x87)+_0x948321),console[_0x160714(0x75)](_0x160714(0x7b)+_0xfb1ca1),console['error'](_0x160714(0x73)+_0x7eb2fc),console[_0x160714(0x75)](_0x160714(0x6f)+_0x3c8c5a));const _0x3fd04a=_0x948321?_0x948321+'.'+_0xfb1ca1+'.'+_0x7eb2fc:_0xfb1ca1+'.'+_0x7eb2fc,_0x232c5f=await withSpinner(_0x160714(0x78)+_0x3fd04a+_0x160714(0x8a),()=>_0x1011e5[_0x160714(0x8b)][_0x160714(0x68)](_0xfb1ca1,_0x7eb2fc,_0x3c8c5a,_0x948321),{'verbose':_0x4b9fd3[_0x160714(0x7a)]}),_0x4a2c9d=_0x232c5f[_0x160714(0x6c)],_0x268cf3=_0x4a2c9d[_0x160714(0x6c)];return _0x268cf3['length']===0x0?console[_0x160714(0x75)]('✔\x20Query\x20successful\x20-\x200\x20rows\x20returned'):console[_0x160714(0x75)](_0x160714(0x70)+_0x268cf3[_0x160714(0x80)]+'\x20row'+(_0x268cf3[_0x160714(0x80)]!==0x1?'s':'')+'\x20from\x20'+_0x3fd04a),await handleSDKOutput(_0x268cf3,_0x4b9fd3),0x0;}catch(_0x3fd9ca){if(_0x3fd9ca instanceof SDKError)return console[_0x160714(0x75)](_0x160714(0x69)+_0x3fd9ca['message']),_0x3fd9ca['cause']&&console[_0x160714(0x75)](_0x160714(0x67)+_0x3fd9ca[_0x160714(0x7c)]),0x1;throw _0x3fd9ca;}}[a36_0x5b957(0x79)](_0x462300){const _0x258059=a36_0x5b957;if(_0x462300[_0x258059(0x76)][_0x258059(0x80)]===0x0)return'Usage:\x20tdx\x20show\x20<database.table>\x0a\x20\x20\x20or:\x20tdx\x20show\x20<catalog.database.table>\x0a\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--database\x20<database>\x0a\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--in\x20<database>\x0a\x0aRun\x20\x27tdx\x20show\x20--help\x27\x20for\x20more\x20options';if(_0x462300['args'][_0x258059(0x80)]>0x1)return _0x258059(0x85);return undefined;}}
@@ -1 +1 @@
1
- const a37_0x17caae=a37_0x5a2f;function a37_0x4d1d(){const _0x2baa37=['TDX_PROFILE\x20env','session','14331670xoEYnx','957gWKVIu','cli','name','yellow','✓\x20Authentication\x20successful\x0a','bold','log','profileSource','9454970bkQOfV','message','862KQnHbE','email','filter','CLI\x20flag','(from\x20','first_name','Name:','env','site','2194004GhPObG','Account\x20ID:','displayWithSources','Read\x20credential\x20from\x20','description','Show\x20authentication\x20status\x20and\x20current\x20context','jobs','dim','site:\x20','join','\x20profile:\x20','8PFtBvz','5prPAaq','status','red','271458iEJTZR','cyan','7178694xXNTJZ','profile','config','getUserInfo','741693GsQgBI'];a37_0x4d1d=function(){return _0x2baa37;};return a37_0x4d1d();}function a37_0x5a2f(_0x6ebc12,_0x220de8){_0x6ebc12=_0x6ebc12-0x115;const _0x4d1de6=a37_0x4d1d();let _0x5a2f54=_0x4d1de6[_0x6ebc12];return _0x5a2f54;}(function(_0x1d7d39,_0x2da624){const _0x1b9b08=a37_0x5a2f,_0x3e41a1=_0x1d7d39();while(!![]){try{const _0x5d3590=parseInt(_0x1b9b08(0x11d))/0x1*(parseInt(_0x1b9b08(0x127))/0x2)+-parseInt(_0x1b9b08(0x119))/0x3+-parseInt(_0x1b9b08(0x130))/0x4*(parseInt(_0x1b9b08(0x13c))/0x5)+parseInt(_0x1b9b08(0x115))/0x6+parseInt(_0x1b9b08(0x125))/0x7+parseInt(_0x1b9b08(0x13b))/0x8*(-parseInt(_0x1b9b08(0x13f))/0x9)+-parseInt(_0x1b9b08(0x11c))/0xa;if(_0x5d3590===_0x2da624)break;else _0x3e41a1['push'](_0x3e41a1['shift']());}catch(_0x405c73){_0x3e41a1['push'](_0x3e41a1['shift']());}}}(a37_0x4d1d,0xab095));import{BaseCommand,printAuthError}from'./command.js';import{resolveAPIKeyAsync}from'../core/config.js';import{HTTPClientError}from'../sdk/client/http-client.js';import{GlobalContext}from'../core/global-context.js';import a37_0x343953 from'chalk';export class StatusCommand extends BaseCommand{[a37_0x17caae(0x11f)]=a37_0x17caae(0x13d);[a37_0x17caae(0x134)]=a37_0x17caae(0x135);async['execute'](_0xf0a247){const _0x405ea1=a37_0x17caae,{options:_0x43d094,tdx:_0x3ab76a}=_0xf0a247,_0x19b95b=_0x43d094[_0x405ea1(0x12f)],_0x262441=new GlobalContext(_0x43d094),_0x45686d=_0x262441[_0x405ea1(0x116)],_0x27ed0c=_0x262441[_0x405ea1(0x124)],_0xaf2894=_0x27ed0c===_0x405ea1(0x11e)?_0x405ea1(0x12a):_0x27ed0c==='session'?_0x405ea1(0x11b):_0x27ed0c===_0x405ea1(0x12e)?_0x405ea1(0x11a):_0x27ed0c===_0x405ea1(0x117)?'config':null,_0x1841d6=_0x45686d?a37_0x343953[_0x405ea1(0x140)](_0x45686d):a37_0x343953['dim']('N/A'),_0xbb414a=_0xaf2894?'\x20'+a37_0x343953[_0x405ea1(0x137)](_0x405ea1(0x12b)+_0xaf2894+')'):'';console[_0x405ea1(0x123)](a37_0x343953[_0x405ea1(0x122)]('tdx')+_0x405ea1(0x13a)+_0x1841d6+_0xbb414a+'\x20'+a37_0x343953[_0x405ea1(0x137)]('(')+_0x405ea1(0x138)+a37_0x343953[_0x405ea1(0x140)](_0x19b95b)+a37_0x343953[_0x405ea1(0x137)](')'));const _0x1cfe8c=await resolveAPIKeyAsync(_0x19b95b,_0x45686d);if(_0x1cfe8c){const {source:_0xf8d687,isDeprecated:_0x2cf17e}=_0x1cfe8c,_0x3be7ac=_0x405ea1(0x133)+a37_0x343953[_0x405ea1(0x140)](_0xf8d687);console['log'](_0x2cf17e?a37_0x343953[_0x405ea1(0x120)](_0x3be7ac):_0x3be7ac);}else console[_0x405ea1(0x123)](a37_0x343953[_0x405ea1(0x120)]('No\x20credential\x20found'));let _0x236aed=![];try{const _0x4cce53=await _0x3ab76a[_0x405ea1(0x136)][_0x405ea1(0x118)]();console['log'](a37_0x343953['green'](_0x405ea1(0x121))),console['log'](a37_0x343953[_0x405ea1(0x122)]('User:')+'\x20'+a37_0x343953[_0x405ea1(0x140)](_0x4cce53[_0x405ea1(0x128)]));if(_0x4cce53[_0x405ea1(0x12c)]||_0x4cce53['last_name']){const _0x3b3283=[_0x4cce53[_0x405ea1(0x12c)],_0x4cce53['last_name']][_0x405ea1(0x129)](Boolean)[_0x405ea1(0x139)]('\x20');console['log'](a37_0x343953[_0x405ea1(0x122)](_0x405ea1(0x12d))+'\x20'+_0x3b3283);}_0x4cce53['account_id']&&console[_0x405ea1(0x123)](a37_0x343953['bold'](_0x405ea1(0x131))+'\x20'+a37_0x343953['yellow'](_0x4cce53['account_id'])),_0x236aed=!![];}catch(_0xfb202f){_0xfb202f instanceof HTTPClientError&&_0xfb202f['status']===0x191?printAuthError(_0xfb202f,!![],_0x45686d):console['error'](a37_0x343953[_0x405ea1(0x13e)]('✗\x20Validation\x20failed:\x20'+(_0xfb202f instanceof Error?_0xfb202f[_0x405ea1(0x126)]:String(_0xfb202f))));}return console[_0x405ea1(0x123)](),_0x262441[_0x405ea1(0x132)](),_0x236aed?0x0:0x1;}}
1
+ const a37_0x3015f2=a37_0x3872;function a37_0x188b(){const _0x4e91d9=['status','filter','email','config','4ZhcfNf','last_name','site','5VBlSAy','log','env','13794867zIXeMR','2591080CVBRPD','account_id','jobs','message','cli','746103WieLxW','profileSource','Read\x20credential\x20from\x20','10128566DlMiIi','green','bold','2vHupee','name','TDX_PROFILE\x20env','yellow','CLI\x20flag','388406dFKGzk','Show\x20authentication\x20status\x20and\x20current\x20context','session','dim','N/A','(from\x20','site:\x20','1495070IxNdXF','first_name','Account\x20ID:','6400902bAxVew','cyan'];a37_0x188b=function(){return _0x4e91d9;};return a37_0x188b();}(function(_0x24881b,_0x8f4ee3){const _0x44f180=a37_0x3872,_0x18544b=_0x24881b();while(!![]){try{const _0x3f1bb4=parseInt(_0x44f180(0x1aa))/0x1*(parseInt(_0x44f180(0x1a5))/0x2)+-parseInt(_0x44f180(0x19f))/0x3*(parseInt(_0x44f180(0x1ba))/0x4)+parseInt(_0x44f180(0x1bd))/0x5*(parseInt(_0x44f180(0x1b4))/0x6)+parseInt(_0x44f180(0x1a2))/0x7+-parseInt(_0x44f180(0x1c1))/0x8+-parseInt(_0x44f180(0x1c0))/0x9+parseInt(_0x44f180(0x1b1))/0xa;if(_0x3f1bb4===_0x8f4ee3)break;else _0x18544b['push'](_0x18544b['shift']());}catch(_0x57b70b){_0x18544b['push'](_0x18544b['shift']());}}}(a37_0x188b,0xe708f));import{BaseCommand,printAuthError}from'./command.js';import{resolveAPIKeyAsync}from'../core/config.js';import{HTTPClientError}from'../sdk/client/http-client.js';import{GlobalContext}from'../core/global-context.js';import a37_0x4879f5 from'chalk';function a37_0x3872(_0x3f2ceb,_0x14c42b){_0x3f2ceb=_0x3f2ceb-0x19d;const _0x188b81=a37_0x188b();let _0x38725b=_0x188b81[_0x3f2ceb];return _0x38725b;}export class StatusCommand extends BaseCommand{[a37_0x3015f2(0x1a6)]=a37_0x3015f2(0x1b6);['description']=a37_0x3015f2(0x1ab);async['execute'](_0x1aabe3){const _0xa9ab66=a37_0x3015f2,{options:_0x4661b9,tdx:_0x4a65e8}=_0x1aabe3,_0x30437a=_0x4661b9[_0xa9ab66(0x1bc)],_0xf7ff1a=new GlobalContext(_0x4661b9),_0x422914=_0xf7ff1a['profile'],_0x812a24=_0xf7ff1a[_0xa9ab66(0x1a0)],_0x5cd744=_0x812a24===_0xa9ab66(0x19e)?_0xa9ab66(0x1a9):_0x812a24===_0xa9ab66(0x1ac)?_0xa9ab66(0x1ac):_0x812a24===_0xa9ab66(0x1bf)?_0xa9ab66(0x1a7):_0x812a24===_0xa9ab66(0x1b9)?_0xa9ab66(0x1b9):null,_0x2e1268=_0x422914?a37_0x4879f5[_0xa9ab66(0x1b5)](_0x422914):a37_0x4879f5[_0xa9ab66(0x1ad)](_0xa9ab66(0x1ae)),_0x2c3ba0=_0x5cd744?'\x20'+a37_0x4879f5[_0xa9ab66(0x1ad)](_0xa9ab66(0x1af)+_0x5cd744+')'):'';console['log'](a37_0x4879f5['bold']('tdx')+'\x20profile:\x20'+_0x2e1268+_0x2c3ba0+'\x20'+a37_0x4879f5['dim']('(')+_0xa9ab66(0x1b0)+a37_0x4879f5[_0xa9ab66(0x1b5)](_0x30437a)+a37_0x4879f5[_0xa9ab66(0x1ad)](')'));const _0x510260=await resolveAPIKeyAsync(_0x30437a,_0x422914);if(_0x510260){const {source:_0x486d0f,isDeprecated:_0x3ada15}=_0x510260,_0x1c5324=_0xa9ab66(0x1a1)+a37_0x4879f5[_0xa9ab66(0x1b5)](_0x486d0f);console[_0xa9ab66(0x1be)](_0x3ada15?a37_0x4879f5['yellow'](_0x1c5324):_0x1c5324);}else console[_0xa9ab66(0x1be)](a37_0x4879f5['yellow']('No\x20credential\x20found'));let _0x30a6fe=![];try{const _0x5a6074=await _0x4a65e8[_0xa9ab66(0x1c3)]['getUserInfo']();console[_0xa9ab66(0x1be)](a37_0x4879f5[_0xa9ab66(0x1a3)]('✓\x20Authentication\x20successful\x0a')),console['log'](a37_0x4879f5[_0xa9ab66(0x1a4)]('User:')+'\x20'+a37_0x4879f5[_0xa9ab66(0x1b5)](_0x5a6074[_0xa9ab66(0x1b8)]));if(_0x5a6074[_0xa9ab66(0x1b2)]||_0x5a6074[_0xa9ab66(0x1bb)]){const _0x1098eb=[_0x5a6074[_0xa9ab66(0x1b2)],_0x5a6074['last_name']][_0xa9ab66(0x1b7)](Boolean)['join']('\x20');console[_0xa9ab66(0x1be)](a37_0x4879f5['bold']('Name:')+'\x20'+_0x1098eb);}_0x5a6074['account_id']&&console['log'](a37_0x4879f5[_0xa9ab66(0x1a4)](_0xa9ab66(0x1b3))+'\x20'+a37_0x4879f5[_0xa9ab66(0x1a8)](_0x5a6074[_0xa9ab66(0x1c2)])),_0x30a6fe=!![];}catch(_0x3ec119){_0x3ec119 instanceof HTTPClientError&&_0x3ec119['status']===0x191?printAuthError(_0x3ec119,!![],_0x422914):console['error'](a37_0x4879f5['red']('✗\x20Validation\x20failed:\x20'+(_0x3ec119 instanceof Error?_0x3ec119[_0xa9ab66(0x19d)]:String(_0x3ec119))));}return console[_0xa9ab66(0x1be)](),_0xf7ff1a['displayWithSources'](),_0x30a6fe?0x0:0x1;}}
@@ -1 +1 @@
1
- function a38_0x3338(){const _0x222562=['Database\x20pattern:\x20','tables','\x20\x20Cause:\x20','\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','24302tiJGJe','\x20\x20tdx\x20tables\x20\x22mydb.users\x22\x20\x20\x20\x20->\x20table\x20\x22users\x22\x20in\x20database\x20mydb','12KZOhWC','error','✖\x20No\x20tables\x20found','5673815svSHda','✔\x20Found\x20','message','table','24enVneA','2046532qefxPh','includes','\x20\x20Use:\x20tdx\x20tables\x20\x22','\x27\x20is\x20ambiguous.','Site:\x20','\x20\x20Or:\x20\x20tdx\x20tables\x20--in\x20','\x20table','4101282gzOXQf','890796NTmBOo','Error:\x20Pattern\x20\x27','data','Database:\x20all','database','listTables','\x20\x20Or:\x20\x20tdx\x20tables\x20--database\x20','\x27\x20without\x20wildcards\x20would\x20search\x20for\x20tables\x20named\x20\x27','site','cause','\x20\x20tdx\x20tables\x20\x22*.user*\x22\x20\x20\x20\x20\x20\x20\x20->\x20tables\x20matching\x20user*\x20across\x20databases','execute','Table\x20pattern:\x20','\x27\x20across\x20all\x20databases.','Did\x20you\x20mean\x20to\x20list\x20all\x20tables\x20from\x20database\x20\x27','query','Or\x20use\x20--in\x20flag:','Error:\x20','28wTcpdu','length','\x20\x20tdx\x20tables\x20--in\x20mydb\x20\x20\x20\x20\x20\x20\x20->\x20all\x20tables\x20from\x20mydb','9CdTPpn','4449680SyJXgc','20jlPrYz','limit','Error:\x20Too\x20many\x20arguments.\x20Use\x20single\x20argument:','Note:\x20\x27','13314125VVkOlM','Database:\x20','\x20\x20tdx\x20tables\x20\x22mydb.*\x22\x20\x20\x20\x20\x20\x20\x20\x20->\x20all\x20tables\x20from\x20mydb'];a38_0x3338=function(){return _0x222562;};return a38_0x3338();}const a38_0x4ae06c=a38_0x2469;(function(_0x29167a,_0x5c4479){const _0x2bfb02=a38_0x2469,_0x1b273d=_0x29167a();while(!![]){try{const _0x3d186d=-parseInt(_0x2bfb02(0x1a9))/0x1*(-parseInt(_0x2bfb02(0x1a0))/0x2)+parseInt(_0x2bfb02(0x191))/0x3*(-parseInt(_0x2bfb02(0x1aa))/0x4)+parseInt(_0x2bfb02(0x1a5))/0x5+-parseInt(_0x2bfb02(0x1b2))/0x6*(parseInt(_0x2bfb02(0x18e))/0x7)+-parseInt(_0x2bfb02(0x192))/0x8+-parseInt(_0x2bfb02(0x1b1))/0x9*(-parseInt(_0x2bfb02(0x193))/0xa)+-parseInt(_0x2bfb02(0x197))/0xb*(-parseInt(_0x2bfb02(0x1a2))/0xc);if(_0x3d186d===_0x5c4479)break;else _0x1b273d['push'](_0x1b273d['shift']());}catch(_0x35471e){_0x1b273d['push'](_0x1b273d['shift']());}}}(a38_0x3338,0xd2bd1));function a38_0x2469(_0x12a8a8,_0x134800){_0x12a8a8=_0x12a8a8-0x188;const _0x33381c=a38_0x3338();let _0x2469a2=_0x33381c[_0x12a8a8];return _0x2469a2;}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';export class TablesCommand extends BaseCommand{['name']=a38_0x4ae06c(0x19b);['description']='List\x20tables\x20in\x20a\x20database';async[a38_0x4ae06c(0x1bd)](_0x172c8a){const _0x2624ba=a38_0x4ae06c,{options:_0x1e235f,args:_0x4d3dec,tdx:_0xf0c851}=_0x172c8a;let _0x46bf49;if(_0x4d3dec['length']===0x0)_0x46bf49={'database':undefined,'table':undefined,'original':''};else{if(_0x4d3dec['length']===0x1)try{_0x46bf49=parseTableReference(_0x4d3dec[0x0]);if(_0x46bf49['table']&&!_0x46bf49[_0x2624ba(0x1b6)]&&!_0x46bf49[_0x2624ba(0x1a8)][_0x2624ba(0x1ab)]('*')&&!_0x46bf49['table'][_0x2624ba(0x1ab)]('?'))return console[_0x2624ba(0x1a3)](_0x2624ba(0x1b3)+_0x4d3dec[0x0]+_0x2624ba(0x1ad)),console[_0x2624ba(0x1a3)](_0x2624ba(0x18a)+_0x46bf49['table']+'\x27?'),console[_0x2624ba(0x1a3)](_0x2624ba(0x1ac)+_0x46bf49[_0x2624ba(0x1a8)]+'.*\x22'),console[_0x2624ba(0x1a3)](_0x2624ba(0x1af)+_0x46bf49['table']),console[_0x2624ba(0x1a3)](_0x2624ba(0x1b8)+_0x46bf49[_0x2624ba(0x1a8)]),console['error'](''),console[_0x2624ba(0x1a3)](_0x2624ba(0x196)+_0x4d3dec[0x0]+_0x2624ba(0x1b9)+_0x46bf49[_0x2624ba(0x1a8)]+_0x2624ba(0x189)),0x1;}catch(_0x828f36){return console[_0x2624ba(0x1a3)](_0x2624ba(0x18d)+_0x828f36[_0x2624ba(0x1a7)]),0x1;}else return console[_0x2624ba(0x1a3)](_0x2624ba(0x195)),console['error'](_0x2624ba(0x19d)),console['error'](_0x2624ba(0x199)),console[_0x2624ba(0x1a3)](_0x2624ba(0x1a1)),console[_0x2624ba(0x1a3)](_0x2624ba(0x1bc)),console['error'](_0x2624ba(0x18c)),console['error'](_0x2624ba(0x190)),0x1;}const _0x4c392d=_0x1e235f[_0x2624ba(0x1b6)];!_0x46bf49[_0x2624ba(0x1b6)]&&_0x4c392d&&(_0x46bf49[_0x2624ba(0x1b6)]=_0x4c392d);try{const _0x26bc18=_0x57f3af=>_0x57f3af&&(_0x57f3af[_0x2624ba(0x1ab)]('*')||_0x57f3af[_0x2624ba(0x1ab)]('?')),_0x212ab5=_0x26bc18(_0x46bf49[_0x2624ba(0x1b6)]);_0x1e235f[_0x2624ba(0x19f)]&&(console['error'](_0x2624ba(0x1ae)+_0x1e235f[_0x2624ba(0x1ba)]),_0x46bf49[_0x2624ba(0x1b6)]?_0x212ab5?console[_0x2624ba(0x1a3)](_0x2624ba(0x19a)+_0x46bf49[_0x2624ba(0x1b6)]):console[_0x2624ba(0x1a3)](_0x2624ba(0x198)+_0x46bf49[_0x2624ba(0x1b6)]):console[_0x2624ba(0x1a3)](_0x2624ba(0x1b5)),_0x46bf49[_0x2624ba(0x1a8)]&&console[_0x2624ba(0x1a3)](_0x2624ba(0x188)+_0x46bf49[_0x2624ba(0x1a8)]));const _0x13d3f7=_0x46bf49[_0x2624ba(0x1b6)]&&!_0x212ab5?_0x46bf49['database']:undefined,_0x5299cd=_0x212ab5?_0x46bf49[_0x2624ba(0x1b6)]:undefined,_0xb1be0a=_0x46bf49[_0x2624ba(0x1a8)],_0x3fd640=resolveLimit(_0x1e235f[_0x2624ba(0x194)],DEFAULT_LISTING_LIMIT),_0x5a9018=await withSpinner('Listing\x20tables...',()=>_0xf0c851[_0x2624ba(0x18b)][_0x2624ba(0x1b7)](_0x13d3f7,_0xb1be0a,_0x5299cd,_0x3fd640),{'verbose':_0x1e235f[_0x2624ba(0x19f)]}),_0x5379d1=_0x5a9018[_0x2624ba(0x1b4)];if(_0x5379d1[_0x2624ba(0x18f)]===0x0&&_0x46bf49['database']&&!_0x212ab5)return console[_0x2624ba(0x1a3)](_0x2624ba(0x1a4)),console['error']('Database\x20\x27'+_0x46bf49[_0x2624ba(0x1b6)]+_0x2624ba(0x19e)),0x1;return console[_0x2624ba(0x1a3)](_0x2624ba(0x1a6)+_0x5379d1[_0x2624ba(0x18f)]+_0x2624ba(0x1b0)+(_0x5379d1[_0x2624ba(0x18f)]!==0x1?'s':'')),await handleSDKOutput(_0x5379d1,{..._0x1e235f,'limit':_0x3fd640}),0x0;}catch(_0x45eba2){if(_0x45eba2 instanceof SDKError)return console['error'](_0x2624ba(0x18d)+_0x45eba2['message']),_0x45eba2[_0x2624ba(0x1bb)]&&console[_0x2624ba(0x1a3)](_0x2624ba(0x19c)+_0x45eba2[_0x2624ba(0x1bb)]),0x1;throw _0x45eba2;}}['validate'](_0x33eeee){return undefined;}}
1
+ const a38_0x217dd1=a38_0x11bb;(function(_0x4682b7,_0x437cb2){const _0x308687=a38_0x11bb,_0x2038c0=_0x4682b7();while(!![]){try{const _0xb22879=-parseInt(_0x308687(0xdc))/0x1+parseInt(_0x308687(0x100))/0x2+parseInt(_0x308687(0xd9))/0x3+-parseInt(_0x308687(0xf5))/0x4+parseInt(_0x308687(0xe9))/0x5+-parseInt(_0x308687(0xfe))/0x6*(-parseInt(_0x308687(0xf4))/0x7)+-parseInt(_0x308687(0xf7))/0x8;if(_0xb22879===_0x437cb2)break;else _0x2038c0['push'](_0x2038c0['shift']());}catch(_0x45c8dc){_0x2038c0['push'](_0x2038c0['shift']());}}}(a38_0x9e16,0x9dff0));function a38_0x11bb(_0x2844af,_0x22f957){_0x2844af=_0x2844af-0xd9;const _0x9e163a=a38_0x9e16();let _0x11bb0e=_0x9e163a[_0x2844af];return _0x11bb0e;}import{BaseCommand}from'./command.js';function a38_0x9e16(){const _0x428b37=['Note:\x20\x27','\x27\x20is\x20ambiguous.','Database\x20\x27','98sceLYQ','4811008NWmlPU','Or\x20use\x20--in\x20flag:','8112344YRCOxx','Error:\x20Pattern\x20\x27','includes','verbose','execute','\x20\x20Or:\x20\x20tdx\x20tables\x20--database\x20','description','351546LsSAKX','table','1196410NOZcQB','\x20\x20tdx\x20tables\x20\x22mydb.users\x22\x20\x20\x20\x20->\x20table\x20\x22users\x22\x20in\x20database\x20mydb','Listing\x20tables...','data','✔\x20Found\x20','Did\x20you\x20mean\x20to\x20list\x20all\x20tables\x20from\x20database\x20\x27','name','List\x20tables\x20in\x20a\x20database','2975715gwIqdY','site','listTables','790662DKpuaT','Site:\x20','\x20table','\x20\x20tdx\x20tables\x20\x22*.user*\x22\x20\x20\x20\x20\x20\x20\x20->\x20tables\x20matching\x20user*\x20across\x20databases','length','\x27\x20may\x20not\x20exist\x20or\x20contains\x20no\x20tables','error','\x20\x20Cause:\x20','Error:\x20Too\x20many\x20arguments.\x20Use\x20single\x20argument:','database','Database:\x20','cause','validate','6221125HNzNdB','\x27\x20without\x20wildcards\x20would\x20search\x20for\x20tables\x20named\x20\x27','\x27\x20across\x20all\x20databases.','Database:\x20all','tables','Error:\x20','message','Database\x20pattern:\x20'];a38_0x9e16=function(){return _0x428b37;};return a38_0x9e16();}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';export class TablesCommand extends BaseCommand{[a38_0x217dd1(0x106)]=a38_0x217dd1(0xed);[a38_0x217dd1(0xfd)]=a38_0x217dd1(0x107);async[a38_0x217dd1(0xfb)](_0x4a810c){const _0x5e570f=a38_0x217dd1,{options:_0x29fe96,args:_0x1bb73a,tdx:_0x2a3aae}=_0x4a810c;let _0x341bdf;if(_0x1bb73a[_0x5e570f(0xe0)]===0x0)_0x341bdf={'database':undefined,'table':undefined,'original':''};else{if(_0x1bb73a['length']===0x1)try{_0x341bdf=parseTableReference(_0x1bb73a[0x0]);if(_0x341bdf[_0x5e570f(0xff)]&&!_0x341bdf['database']&&!_0x341bdf[_0x5e570f(0xff)][_0x5e570f(0xf9)]('*')&&!_0x341bdf['table']['includes']('?'))return console[_0x5e570f(0xe2)](_0x5e570f(0xf8)+_0x1bb73a[0x0]+_0x5e570f(0xf2)),console[_0x5e570f(0xe2)](_0x5e570f(0x105)+_0x341bdf[_0x5e570f(0xff)]+'\x27?'),console[_0x5e570f(0xe2)]('\x20\x20Use:\x20tdx\x20tables\x20\x22'+_0x341bdf[_0x5e570f(0xff)]+'.*\x22'),console[_0x5e570f(0xe2)]('\x20\x20Or:\x20\x20tdx\x20tables\x20--in\x20'+_0x341bdf[_0x5e570f(0xff)]),console[_0x5e570f(0xe2)](_0x5e570f(0xfc)+_0x341bdf['table']),console[_0x5e570f(0xe2)](''),console[_0x5e570f(0xe2)](_0x5e570f(0xf1)+_0x1bb73a[0x0]+_0x5e570f(0xea)+_0x341bdf[_0x5e570f(0xff)]+_0x5e570f(0xeb)),0x1;}catch(_0x3d813f){return console[_0x5e570f(0xe2)](_0x5e570f(0xee)+_0x3d813f[_0x5e570f(0xef)]),0x1;}else return console[_0x5e570f(0xe2)](_0x5e570f(0xe4)),console['error']('\x20\x20tdx\x20tables\x20users\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20->\x20table\x20\x22users\x22\x20across\x20all\x20databases'),console[_0x5e570f(0xe2)]('\x20\x20tdx\x20tables\x20\x22mydb.*\x22\x20\x20\x20\x20\x20\x20\x20\x20->\x20all\x20tables\x20from\x20mydb'),console[_0x5e570f(0xe2)](_0x5e570f(0x101)),console[_0x5e570f(0xe2)](_0x5e570f(0xdf)),console['error'](_0x5e570f(0xf6)),console[_0x5e570f(0xe2)]('\x20\x20tdx\x20tables\x20--in\x20mydb\x20\x20\x20\x20\x20\x20\x20->\x20all\x20tables\x20from\x20mydb'),0x1;}const _0x5bf132=_0x29fe96[_0x5e570f(0xe5)];!_0x341bdf[_0x5e570f(0xe5)]&&_0x5bf132&&(_0x341bdf[_0x5e570f(0xe5)]=_0x5bf132);try{const _0x38f785=_0x2325a3=>_0x2325a3&&(_0x2325a3[_0x5e570f(0xf9)]('*')||_0x2325a3['includes']('?')),_0x293072=_0x38f785(_0x341bdf[_0x5e570f(0xe5)]);_0x29fe96[_0x5e570f(0xfa)]&&(console[_0x5e570f(0xe2)](_0x5e570f(0xdd)+_0x29fe96[_0x5e570f(0xda)]),_0x341bdf[_0x5e570f(0xe5)]?_0x293072?console[_0x5e570f(0xe2)](_0x5e570f(0xf0)+_0x341bdf[_0x5e570f(0xe5)]):console[_0x5e570f(0xe2)](_0x5e570f(0xe6)+_0x341bdf['database']):console[_0x5e570f(0xe2)](_0x5e570f(0xec)),_0x341bdf[_0x5e570f(0xff)]&&console[_0x5e570f(0xe2)]('Table\x20pattern:\x20'+_0x341bdf[_0x5e570f(0xff)]));const _0x42bc5e=_0x341bdf['database']&&!_0x293072?_0x341bdf['database']:undefined,_0x48bab5=_0x293072?_0x341bdf['database']:undefined,_0x23fa9a=_0x341bdf['table'],_0x31a796=resolveLimit(_0x29fe96['limit'],DEFAULT_LISTING_LIMIT),_0x2bc730=await withSpinner(_0x5e570f(0x102),()=>_0x2a3aae['query'][_0x5e570f(0xdb)](_0x42bc5e,_0x23fa9a,_0x48bab5,_0x31a796),{'verbose':_0x29fe96[_0x5e570f(0xfa)]}),_0x384579=_0x2bc730[_0x5e570f(0x103)];if(_0x384579[_0x5e570f(0xe0)]===0x0&&_0x341bdf['database']&&!_0x293072)return console[_0x5e570f(0xe2)]('✖\x20No\x20tables\x20found'),console[_0x5e570f(0xe2)](_0x5e570f(0xf3)+_0x341bdf[_0x5e570f(0xe5)]+_0x5e570f(0xe1)),0x1;return console[_0x5e570f(0xe2)](_0x5e570f(0x104)+_0x384579[_0x5e570f(0xe0)]+_0x5e570f(0xde)+(_0x384579[_0x5e570f(0xe0)]!==0x1?'s':'')),await handleSDKOutput(_0x384579,{..._0x29fe96,'limit':_0x31a796}),0x0;}catch(_0xa5e430){if(_0xa5e430 instanceof SDKError)return console[_0x5e570f(0xe2)](_0x5e570f(0xee)+_0xa5e430[_0x5e570f(0xef)]),_0xa5e430['cause']&&console[_0x5e570f(0xe2)](_0x5e570f(0xe3)+_0xa5e430[_0x5e570f(0xe7)]),0x1;throw _0xa5e430;}}[a38_0x217dd1(0xe8)](_0x5d2ba9){return undefined;}}
@@ -1 +1 @@
1
- const a39_0x3afb63=a39_0x4365;(function(_0x55f231,_0x172ee9){const _0x3993ed=a39_0x4365,_0x3cc9c7=_0x55f231();while(!![]){try{const _0x1b647d=parseInt(_0x3993ed(0x1dd))/0x1+-parseInt(_0x3993ed(0x1ff))/0x2+parseInt(_0x3993ed(0x1d9))/0x3+-parseInt(_0x3993ed(0x1e3))/0x4*(-parseInt(_0x3993ed(0x1f9))/0x5)+-parseInt(_0x3993ed(0x1f1))/0x6*(parseInt(_0x3993ed(0x1e2))/0x7)+parseInt(_0x3993ed(0x1fe))/0x8+parseInt(_0x3993ed(0x1d8))/0x9*(parseInt(_0x3993ed(0x1fd))/0xa);if(_0x1b647d===_0x172ee9)break;else _0x3cc9c7['push'](_0x3cc9c7['shift']());}catch(_0x1c4dab){_0x3cc9c7['push'](_0x3cc9c7['shift']());}}}(a39_0x1259,0x7fab7));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 a39_0x4365(_0xbfbdb0,_0x557fac){_0xbfbdb0=_0xbfbdb0-0x1d7;const _0x1259aa=a39_0x1259();let _0x436516=_0x1259aa[_0xbfbdb0];return _0x436516;}import a39_0x1d2a5c from'chalk';import*as a39_0x283a98 from'node:path';export class UnsetCommand extends BaseCommand{['name']=a39_0x3afb63(0x1e5);[a39_0x3afb63(0x1d7)]='Clear\x20session-level\x20or\x20default\x20context\x20values';['validate'](_0x29de43){const _0x2f9f21=a39_0x3afb63,{args:_0x383aa1,options:_0x578fb0}=_0x29de43,_0x1bf359=_0x578fb0[_0x2f9f21(0x1ef)];if(_0x383aa1[_0x2f9f21(0x1fa)]===0x0)return _0x2f9f21(0x1e4)+_0x2f9f21(0x1ea)+_0x2f9f21(0x1e8)+_0x2f9f21(0x1de);const _0x29c67a=_0x383aa1[0x0],_0x22eae4=['site','database',_0x2f9f21(0x1f3),_0x2f9f21(0x1db),_0x2f9f21(0x1fb),'profile',_0x2f9f21(0x1f6)];if(!_0x22eae4['includes'](_0x29c67a))return'Invalid\x20resource:\x20'+_0x29c67a+_0x2f9f21(0x1eb)+_0x22eae4[_0x2f9f21(0x1e0)](',\x20');if(_0x1bf359&&_0x29c67a!=='site'&&_0x29c67a!=='profile')return _0x2f9f21(0x1dc);return undefined;}async[a39_0x3afb63(0x1ee)](_0x4abbd2){const _0x36f236=a39_0x3afb63,{args:_0x2fc713,options:_0x3add4e}=_0x4abbd2,_0x228e0f=_0x3add4e[_0x36f236(0x1ef)];cleanExpiredSessions();try{const _0x4a81b1=_0x2fc713[0x0],_0x1ab990=a39_0x283a98['join'](getConfigDir(),_0x36f236(0x1ec));if(_0x228e0f){if(_0x4a81b1===_0x36f236(0x1f2))return clearDefaultSiteFromUserConfig(),console[_0x36f236(0x1fc)](_0x36f236(0x1da)+a39_0x1d2a5c['green']('cleared')),console['log'](a39_0x1d2a5c[_0x36f236(0x1f7)](_0x36f236(0x1ed)+_0x1ab990)),0x0;if(_0x4a81b1===_0x36f236(0x1df))return clearActiveProfileFromUserConfig(),console[_0x36f236(0x1fc)](_0x36f236(0x1e1)+a39_0x1d2a5c[_0x36f236(0x1e6)]('cleared')),console[_0x36f236(0x1fc)](a39_0x1d2a5c['dim'](_0x36f236(0x1ed)+_0x1ab990)),0x0;}const _0x55c3e4=getSessionID(_0x3add4e[_0x36f236(0x1e7)]),_0x499c93={'site':_0x36f236(0x1f2),'database':_0x36f236(0x1f0),'parent_segment':_0x36f236(0x1f3),'llm_project':_0x36f236(0x1db),'agent':'llm_agent','profile':_0x36f236(0x1df),'engage_workspace':_0x36f236(0x1f6)},_0x541e9d=_0x499c93[_0x4a81b1];return _0x541e9d&&(clearSessionContextField(_0x541e9d,_0x3add4e[_0x36f236(0x1e7)]),console['log'](_0x36f236(0x1f5)+_0x4a81b1+'\x20'+a39_0x1d2a5c[_0x36f236(0x1e6)](_0x36f236(0x200))+'\x20'+a39_0x1d2a5c['dim'](_0x36f236(0x1e9)+_0x55c3e4+')'))),0x0;}catch(_0x5af6fd){return _0x5af6fd instanceof Error&&console['error'](_0x36f236(0x1f8)+_0x5af6fd[_0x36f236(0x1f4)]),0x1;}}}function a39_0x1259(){const _0x523ba6=['\x0aResources:\x20site,\x20database,\x20parent_segment,\x20llm_project,\x20agent,\x20profile,\x20engage_workspace\x0a','(session:\x20','\x20\x20\x20\x20\x20\x20\x20tdx\x20unset\x20--default\x20<resource>\x20\x20#\x20Clear\x20default\x20from\x20config\x0a','.\x20Must\x20be\x20one\x20of:\x20','tdx.json','\x0aUpdated:\x20','execute','default','database','462nssxdn','site','parent_segment','message','Session\x20','engage_workspace','dim','Error:\x20','3540245EcNVrr','length','agent','log','3960700cSLMTK','911040NsbhxK','2085144rDaAay','cleared','description','9zQPqgj','156528eTFJQh','Default\x20site\x20','llm_project','--default\x20can\x20only\x20be\x20used\x20with\x20\x27site\x27\x20or\x20\x27profile\x27.\x20Other\x20resources\x20are\x20session-level\x20only.','455877CaGlgN','\x0aRun\x20\x27tdx\x20unset\x20--help\x27\x20for\x20more\x20options','profile','join','Default\x20profile\x20','14595iQuJoN','4maascc','Usage:\x20tdx\x20unset\x20<resource>\x0a','unset','green','session'];a39_0x1259=function(){return _0x523ba6;};return a39_0x1259();}
1
+ function a39_0x5087(_0x1ca482,_0x81e446){_0x1ca482=_0x1ca482-0x87;const _0x2af100=a39_0x2af1();let _0x5087aa=_0x2af100[_0x1ca482];return _0x5087aa;}const a39_0x33b171=a39_0x5087;(function(_0x7647f3,_0x552270){const _0x6a30f7=a39_0x5087,_0x67a0b3=_0x7647f3();while(!![]){try{const _0x4c6011=-parseInt(_0x6a30f7(0xa3))/0x1+-parseInt(_0x6a30f7(0xa5))/0x2+-parseInt(_0x6a30f7(0x93))/0x3*(parseInt(_0x6a30f7(0x9a))/0x4)+parseInt(_0x6a30f7(0x94))/0x5+-parseInt(_0x6a30f7(0x89))/0x6*(parseInt(_0x6a30f7(0x9c))/0x7)+-parseInt(_0x6a30f7(0x8a))/0x8+parseInt(_0x6a30f7(0xaa))/0x9;if(_0x4c6011===_0x552270)break;else _0x67a0b3['push'](_0x67a0b3['shift']());}catch(_0x1ee716){_0x67a0b3['push'](_0x67a0b3['shift']());}}}(a39_0x2af1,0x3be91));import{BaseCommand}from'./command.js';import{getSessionID,cleanExpiredSessions,clearSessionContextField}from'../core/session.js';import{clearDefaultSiteFromUserConfig,clearActiveProfileFromUserConfig}from'../core/profile.js';import{getConfigDir}from'../core/config.js';import a39_0x4f56c0 from'chalk';import*as a39_0xf5a304 from'node:path';export class UnsetCommand extends BaseCommand{['name']=a39_0x33b171(0xa8);['description']='Clear\x20session-level\x20or\x20default\x20context\x20values';[a39_0x33b171(0xa7)](_0x115f27){const _0x53b6fc=a39_0x33b171,{args:_0x2423b8,options:_0x4d5502}=_0x115f27,_0x205cc1=_0x4d5502[_0x53b6fc(0x9d)];if(_0x2423b8['length']===0x0)return _0x53b6fc(0xa1)+_0x53b6fc(0x8c)+_0x53b6fc(0x8d)+'\x0aRun\x20\x27tdx\x20unset\x20--help\x27\x20for\x20more\x20options';const _0xe8f8ea=_0x2423b8[0x0],_0x2bb889=['site',_0x53b6fc(0xa2),'parent_segment','llm_project','agent','profile',_0x53b6fc(0x95)];if(!_0x2bb889[_0x53b6fc(0xa4)](_0xe8f8ea))return _0x53b6fc(0x99)+_0xe8f8ea+_0x53b6fc(0xa6)+_0x2bb889['join'](',\x20');if(_0x205cc1&&_0xe8f8ea!==_0x53b6fc(0x8b)&&_0xe8f8ea!==_0x53b6fc(0x97))return _0x53b6fc(0x88);return undefined;}async['execute'](_0xbd0093){const _0x36bc22=a39_0x33b171,{args:_0x28820b,options:_0x7d0dc}=_0xbd0093,_0x410d0a=_0x7d0dc[_0x36bc22(0x9d)];cleanExpiredSessions();try{const _0x5183f9=_0x28820b[0x0],_0x41ebcb=a39_0xf5a304[_0x36bc22(0xa9)](getConfigDir(),_0x36bc22(0x87));if(_0x410d0a){if(_0x5183f9===_0x36bc22(0x8b))return clearDefaultSiteFromUserConfig(),console[_0x36bc22(0x9f)]('Default\x20site\x20'+a39_0x4f56c0[_0x36bc22(0x98)](_0x36bc22(0x90))),console[_0x36bc22(0x9f)](a39_0x4f56c0[_0x36bc22(0xab)](_0x36bc22(0x8e)+_0x41ebcb)),0x0;if(_0x5183f9===_0x36bc22(0x97))return clearActiveProfileFromUserConfig(),console[_0x36bc22(0x9f)](_0x36bc22(0x8f)+a39_0x4f56c0[_0x36bc22(0x98)](_0x36bc22(0x90))),console[_0x36bc22(0x9f)](a39_0x4f56c0[_0x36bc22(0xab)]('\x0aUpdated:\x20'+_0x41ebcb)),0x0;}const _0x2743f5=getSessionID(_0x7d0dc[_0x36bc22(0xa0)]),_0x2e6fd5={'site':_0x36bc22(0x8b),'database':_0x36bc22(0xa2),'parent_segment':_0x36bc22(0x96),'llm_project':'llm_project','agent':_0x36bc22(0x92),'profile':_0x36bc22(0x97),'engage_workspace':'engage_workspace'},_0x4ceba9=_0x2e6fd5[_0x5183f9];return _0x4ceba9&&(clearSessionContextField(_0x4ceba9,_0x7d0dc[_0x36bc22(0xa0)]),console[_0x36bc22(0x9f)](_0x36bc22(0x9b)+_0x5183f9+'\x20'+a39_0x4f56c0[_0x36bc22(0x98)]('cleared')+'\x20'+a39_0x4f56c0[_0x36bc22(0xab)]('(session:\x20'+_0x2743f5+')'))),0x0;}catch(_0x5e04b1){return _0x5e04b1 instanceof Error&&console[_0x36bc22(0x9e)]('Error:\x20'+_0x5e04b1[_0x36bc22(0x91)]),0x1;}}}function a39_0x2af1(){const _0x1e2f73=['validate','unset','join','14624388IYIJkz','dim','tdx.json','--default\x20can\x20only\x20be\x20used\x20with\x20\x27site\x27\x20or\x20\x27profile\x27.\x20Other\x20resources\x20are\x20session-level\x20only.','270hzqvck','1034000uOfwwP','site','\x20\x20\x20\x20\x20\x20\x20tdx\x20unset\x20--default\x20<resource>\x20\x20#\x20Clear\x20default\x20from\x20config\x0a','\x0aResources:\x20site,\x20database,\x20parent_segment,\x20llm_project,\x20agent,\x20profile,\x20engage_workspace\x0a','\x0aUpdated:\x20','Default\x20profile\x20','cleared','message','llm_agent','3mHjfvv','682210TcADUy','engage_workspace','parent_segment','profile','green','Invalid\x20resource:\x20','412156UtUyrj','Session\x20','52801lRzWQL','default','error','log','session','Usage:\x20tdx\x20unset\x20<resource>\x0a','database','453653YxhgbA','includes','981208CeReCZ','.\x20Must\x20be\x20one\x20of:\x20'];a39_0x2af1=function(){return _0x1e2f73;};return a39_0x2af1();}
@@ -1 +1 @@
1
- const a40_0x12bbdd=a40_0x4224;(function(_0x1dd600,_0x4e5ded){const _0x350cb8=a40_0x4224,_0x1368c5=_0x1dd600();while(!![]){try{const _0x2896f4=-parseInt(_0x350cb8(0xaf))/0x1+parseInt(_0x350cb8(0x7c))/0x2+parseInt(_0x350cb8(0xa5))/0x3*(parseInt(_0x350cb8(0xa6))/0x4)+parseInt(_0x350cb8(0x91))/0x5+-parseInt(_0x350cb8(0x77))/0x6+parseInt(_0x350cb8(0x8b))/0x7+-parseInt(_0x350cb8(0xac))/0x8*(parseInt(_0x350cb8(0xa7))/0x9);if(_0x2896f4===_0x4e5ded)break;else _0x1368c5['push'](_0x1368c5['shift']());}catch(_0x4fd2fa){_0x1368c5['push'](_0x1368c5['shift']());}}}(a40_0x1ff2,0x445f8));function a40_0x1ff2(){const _0x42c945=['(session:\x20','\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20--clear\x20\x20\x20\x20\x20\x20#\x20Clear\x20session\x20context\x0a','length','name','llm_project','database','agent','default','\x0aTip:\x20Use\x20\x27tdx\x20use\x20--default\x20profile\x20','Session\x20engage_workspace\x20set\x20to:\x20','Session\x20database\x20set\x20to:\x20','404259FhmMhu','4vKjgkO','252dWHfga','error','validate','Session\x20context\x20','session','151464BIysYQ','use','engage_workspace','13953fcGKzv','parent_segment','includes','\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20--default\x20site\x20<value>\x20\x20\x20\x20\x20#\x20Save\x20default\x20site\x20to\x20config\x0a','.\x20Must\x20be\x20one\x20of:\x20','1398780ZAzjbl','dim','llm_agent','Session\x20agent\x20set\x20to:\x20','Invalid\x20resource:\x20','591816nmofSK','cleared','\x0aSet\x20context:\x20tdx\x20use\x20<resource>\x20<value>','Resources:\x20site,\x20database,\x20parent_segment,\x20llm_project,\x20agent,\x20profile,\x20engage_workspace','Default\x20site\x20set\x20to:\x20','profile','Session\x20site\x20set\x20to:\x20','\x27\x20does\x20not\x20exist','\x0aUse\x20\x27tdx\x20profiles\x27\x20to\x20see\x20available\x20profiles','Set\x20session-level\x20context','green','execute','description','tdx.json','\x0aSaved\x20to:\x20','895104DoJiqW','Session\x20llm_project\x20set\x20to:\x20','displayWithSources','Use\x20--default\x20with\x20site\x20or\x20profile\x20to\x20save\x20permanently','Error:\x20Profile\x20\x27','site','2493650derXKh','\x27\x20to\x20save\x20permanently','join','display','--default\x20can\x20only\x20be\x20used\x20with\x20\x27site\x27\x20or\x20\x27profile\x27.\x20Other\x20resources\x20are\x20session-level\x20only.','log','Usage:\x20tdx\x20use\x20<resource>\x20<value>\x0a','\x0aResources:\x20site,\x20database,\x20parent_segment,\x20llm_project,\x20agent,\x20profile,\x20engage_workspace\x0a','debug'];a40_0x1ff2=function(){return _0x42c945;};return a40_0x1ff2();}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';function a40_0x4224(_0x7ebda0,_0x57838a){_0x7ebda0=_0x7ebda0-0x76;const _0x1ff297=a40_0x1ff2();let _0x422438=_0x1ff297[_0x7ebda0];return _0x422438;}import{parseAgentRef}from'../sdk/agent/agent-ref-parser.js';import{getConfigDir}from'../core/config.js';import a40_0x4076c2 from'chalk';import*as a40_0x3f3168 from'node:path';export class UseCommand extends BaseCommand{[a40_0x12bbdd(0x9d)]=a40_0x12bbdd(0xad);[a40_0x12bbdd(0x88)]=a40_0x12bbdd(0x85);[a40_0x12bbdd(0xa9)](_0x332070){const _0x121108=a40_0x12bbdd,{args:_0x25fc7b,options:_0x2c54c2}=_0x332070,_0x4cb721=_0x2c54c2[_0x121108(0xa1)];if(_0x25fc7b[_0x121108(0x9c)]===0x0)return undefined;if(_0x25fc7b[_0x121108(0x9c)]===0x1)return _0x121108(0x97)+'\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'+_0x121108(0x9b)+_0x121108(0xb2)+'\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20--default\x20profile\x20<value>\x20\x20#\x20Save\x20default\x20profile\x20to\x20config\x0a'+_0x121108(0x98)+'\x0aRun\x20\x27tdx\x20use\x20--help\x27\x20for\x20more\x20options';const _0x5aa807=_0x25fc7b[0x0],_0x4d8b6b=['site',_0x121108(0x9f),_0x121108(0xb0),_0x121108(0x9e),_0x121108(0xa0),_0x121108(0x81),'engage_workspace'];if(!_0x4d8b6b[_0x121108(0xb1)](_0x5aa807))return _0x121108(0x7b)+_0x5aa807+_0x121108(0x76)+_0x4d8b6b[_0x121108(0x93)](',\x20');if(_0x4cb721&&_0x5aa807!==_0x121108(0x90)&&_0x5aa807!=='profile')return _0x121108(0x95);return undefined;}async[a40_0x12bbdd(0x87)](_0x1d184e){const _0x5a67e4=a40_0x12bbdd,{args:_0x2b3392,options:_0x475145}=_0x1d184e,_0x35cc7f=_0x475145[_0x5a67e4(0x99)],_0x5ea4ab=_0x475145['clear'],_0x4f9a53=_0x475145[_0x5a67e4(0xa1)];cleanExpiredSessions();try{if(_0x5ea4ab){clearSessionContext(_0x475145['session']);const _0x429599=getSessionID(_0x475145[_0x5a67e4(0xab)]);return console[_0x5a67e4(0x96)](_0x5a67e4(0xaa)+a40_0x4076c2['green'](_0x5a67e4(0x7d))+'\x20'+a40_0x4076c2[_0x5a67e4(0x78)]('(session:\x20'+_0x429599+')')),0x0;}if(_0x2b3392[_0x5a67e4(0x9c)]===0x0){const _0x3e5f58=new GlobalContext(_0x475145);return _0x35cc7f?_0x3e5f58[_0x5a67e4(0x8d)]():_0x3e5f58[_0x5a67e4(0x94)](),console[_0x5a67e4(0x96)](a40_0x4076c2[_0x5a67e4(0x78)](_0x5a67e4(0x7e))),console['log'](a40_0x4076c2['dim'](_0x5a67e4(0x7f))),console[_0x5a67e4(0x96)](a40_0x4076c2[_0x5a67e4(0x78)](_0x5a67e4(0x8e))),0x0;}const _0x5d53ef=_0x2b3392[0x0],_0x487e25=_0x2b3392[0x1],_0x2e5745=a40_0x3f3168[_0x5a67e4(0x93)](getConfigDir(),_0x5a67e4(0x89));if(_0x4f9a53){if(_0x5d53ef===_0x5a67e4(0x90))return saveDefaultSiteToUserConfig(_0x487e25),console[_0x5a67e4(0x96)](_0x5a67e4(0x80)+a40_0x4076c2[_0x5a67e4(0x86)](_0x487e25)),console['log'](a40_0x4076c2[_0x5a67e4(0x78)](_0x5a67e4(0x8a)+_0x2e5745)),0x0;if(_0x5d53ef===_0x5a67e4(0x81)){if(!profileExists(_0x487e25))return console[_0x5a67e4(0xa8)](_0x5a67e4(0x8f)+_0x487e25+_0x5a67e4(0x83)),console[_0x5a67e4(0xa8)](_0x5a67e4(0x84)),0x1;return saveActiveProfileToUserConfig(_0x487e25),console[_0x5a67e4(0x96)]('Default\x20profile\x20set\x20to:\x20'+a40_0x4076c2[_0x5a67e4(0x86)](_0x487e25)),console[_0x5a67e4(0x96)](a40_0x4076c2['dim'](_0x5a67e4(0x8a)+_0x2e5745)),0x0;}}if(_0x5d53ef===_0x5a67e4(0x90)){const _0x4446de=getSessionID(_0x475145[_0x5a67e4(0xab)]);return saveSessionContext({'site':_0x487e25},_0x475145[_0x5a67e4(0xab)]),console[_0x5a67e4(0x96)](_0x5a67e4(0x82)+a40_0x4076c2[_0x5a67e4(0x86)](_0x487e25)+'\x20'+a40_0x4076c2[_0x5a67e4(0x78)](_0x5a67e4(0x9a)+_0x4446de+')')),console['log'](a40_0x4076c2[_0x5a67e4(0x78)]('\x0aTip:\x20Use\x20\x27tdx\x20use\x20--default\x20site\x20'+_0x487e25+_0x5a67e4(0x92))),0x0;}if(_0x5d53ef===_0x5a67e4(0x81)){if(!profileExists(_0x487e25))return console[_0x5a67e4(0xa8)](_0x5a67e4(0x8f)+_0x487e25+'\x27\x20does\x20not\x20exist'),console['error'](_0x5a67e4(0x84)),0x1;const _0x35f9b7=getSessionID(_0x475145[_0x5a67e4(0xab)]);return saveSessionContext({'profile':_0x487e25},_0x475145['session']),console[_0x5a67e4(0x96)]('Session\x20profile\x20set\x20to:\x20'+a40_0x4076c2[_0x5a67e4(0x86)](_0x487e25)+'\x20'+a40_0x4076c2[_0x5a67e4(0x78)](_0x5a67e4(0x9a)+_0x35f9b7+')')),console['log'](a40_0x4076c2[_0x5a67e4(0x78)](_0x5a67e4(0xa2)+_0x487e25+_0x5a67e4(0x92))),0x0;}const _0x2c94b7={},_0x5967a8=getSessionID(_0x475145[_0x5a67e4(0xab)]);switch(_0x5d53ef){case'database':_0x2c94b7[_0x5a67e4(0x9f)]=_0x487e25,console['log'](_0x5a67e4(0xa4)+a40_0x4076c2[_0x5a67e4(0x86)](_0x487e25)+'\x20'+a40_0x4076c2['dim'](_0x5a67e4(0x9a)+_0x5967a8+')'));break;case _0x5a67e4(0xb0):_0x2c94b7[_0x5a67e4(0xb0)]=_0x487e25,console['log']('Session\x20parent_segment\x20set\x20to:\x20'+a40_0x4076c2[_0x5a67e4(0x86)](_0x487e25)+'\x20'+a40_0x4076c2[_0x5a67e4(0x78)](_0x5a67e4(0x9a)+_0x5967a8+')'));break;case _0x5a67e4(0x9e):_0x2c94b7['llm_project']=_0x487e25,console['log']('Session\x20llm_project\x20set\x20to:\x20'+a40_0x4076c2[_0x5a67e4(0x86)](_0x487e25)+'\x20'+a40_0x4076c2['dim'](_0x5a67e4(0x9a)+_0x5967a8+')'));break;case'agent':{const {projectName:_0x28b27a,agentName:_0x22a799}=parseAgentRef(_0x487e25);_0x22a799?(_0x2c94b7[_0x5a67e4(0x9e)]=_0x28b27a,_0x2c94b7['llm_agent']=_0x22a799,console['log'](_0x5a67e4(0x8c)+a40_0x4076c2[_0x5a67e4(0x86)](_0x28b27a)+'\x20'+a40_0x4076c2['dim'](_0x5a67e4(0x9a)+_0x5967a8+')')),console[_0x5a67e4(0x96)](_0x5a67e4(0x7a)+a40_0x4076c2[_0x5a67e4(0x86)](_0x22a799)+'\x20'+a40_0x4076c2[_0x5a67e4(0x78)]('(session:\x20'+_0x5967a8+')'))):(_0x2c94b7[_0x5a67e4(0x79)]=_0x487e25,console[_0x5a67e4(0x96)]('Session\x20agent\x20set\x20to:\x20'+a40_0x4076c2[_0x5a67e4(0x86)](_0x487e25)+'\x20'+a40_0x4076c2['dim'](_0x5a67e4(0x9a)+_0x5967a8+')')));break;}case _0x5a67e4(0xae):_0x2c94b7[_0x5a67e4(0xae)]=_0x487e25,console[_0x5a67e4(0x96)](_0x5a67e4(0xa3)+a40_0x4076c2['green'](_0x487e25)+'\x20'+a40_0x4076c2[_0x5a67e4(0x78)]('(session:\x20'+_0x5967a8+')'));break;}return saveSessionContext(_0x2c94b7,_0x475145[_0x5a67e4(0xab)]),console[_0x5a67e4(0x96)](a40_0x4076c2[_0x5a67e4(0x78)]('\x0aTip:\x20Use\x20\x27tdx\x20use\x20--clear\x27\x20to\x20clear\x20session\x20overrides')),0x0;}catch(_0x16f2bf){return _0x16f2bf instanceof Error&&console[_0x5a67e4(0xa8)]('Error:\x20'+_0x16f2bf['message']),0x1;}}}
1
+ const a40_0x47295b=a40_0x3297;(function(_0x520165,_0x4db6d9){const _0x230e95=a40_0x3297,_0xa26785=_0x520165();while(!![]){try{const _0x10ea0d=-parseInt(_0x230e95(0x213))/0x1+parseInt(_0x230e95(0x220))/0x2+-parseInt(_0x230e95(0x218))/0x3+parseInt(_0x230e95(0x227))/0x4*(parseInt(_0x230e95(0x1fb))/0x5)+parseInt(_0x230e95(0x217))/0x6*(-parseInt(_0x230e95(0x20a))/0x7)+parseInt(_0x230e95(0x206))/0x8+-parseInt(_0x230e95(0x219))/0x9;if(_0x10ea0d===_0x4db6d9)break;else _0xa26785['push'](_0xa26785['shift']());}catch(_0xf2bcfb){_0xa26785['push'](_0xa26785['shift']());}}}(a40_0x3c7d,0x931bb));import{BaseCommand}from'./command.js';import{saveSessionContext,getSessionID,cleanExpiredSessions,clearSessionContext}from'../core/session.js';import{profileExists,saveActiveProfileToUserConfig,saveDefaultSiteToUserConfig}from'../core/profile.js';function a40_0x3297(_0xd004bd,_0xd6b2cd){_0xd004bd=_0xd004bd-0x1ec;const _0x3c7d13=a40_0x3c7d();let _0x3297d2=_0x3c7d13[_0xd004bd];return _0x3297d2;}import{GlobalContext}from'../core/global-context.js';import{parseAgentRef}from'../sdk/agent/agent-ref-parser.js';import{getConfigDir}from'../core/config.js';import a40_0x4fe7a9 from'chalk';import*as a40_0x31fa68 from'node:path';export class UseCommand extends BaseCommand{[a40_0x47295b(0x1ee)]=a40_0x47295b(0x202);[a40_0x47295b(0x21e)]=a40_0x47295b(0x223);[a40_0x47295b(0x200)](_0x47c5c7){const _0xb05851=a40_0x47295b,{args:_0x37affa,options:_0x2ac8d3}=_0x47c5c7,_0x55cb19=_0x2ac8d3['default'];if(_0x37affa[_0xb05851(0x1fc)]===0x0)return undefined;if(_0x37affa[_0xb05851(0x1fc)]===0x1)return _0xb05851(0x1ff)+_0xb05851(0x207)+_0xb05851(0x1f9)+'\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20--default\x20site\x20<value>\x20\x20\x20\x20\x20#\x20Save\x20default\x20site\x20to\x20config\x0a'+_0xb05851(0x209)+_0xb05851(0x20d)+_0xb05851(0x20c);const _0x505ba5=_0x37affa[0x0],_0x3c6165=[_0xb05851(0x22a),_0xb05851(0x1f2),'parent_segment',_0xb05851(0x1f6),_0xb05851(0x22b),'profile','engage_workspace'];if(!_0x3c6165[_0xb05851(0x216)](_0x505ba5))return'Invalid\x20resource:\x20'+_0x505ba5+_0xb05851(0x225)+_0x3c6165[_0xb05851(0x20b)](',\x20');if(_0x55cb19&&_0x505ba5!==_0xb05851(0x22a)&&_0x505ba5!=='profile')return _0xb05851(0x211);return undefined;}async[a40_0x47295b(0x1f0)](_0x38c08f){const _0x5e0c7b=a40_0x47295b,{args:_0x4b87a1,options:_0x477dcf}=_0x38c08f,_0x4be2fe=_0x477dcf[_0x5e0c7b(0x21f)],_0x43e87d=_0x477dcf['clear'],_0x2dc174=_0x477dcf[_0x5e0c7b(0x1f1)];cleanExpiredSessions();try{if(_0x43e87d){clearSessionContext(_0x477dcf[_0x5e0c7b(0x1f8)]);const _0x3d78aa=getSessionID(_0x477dcf['session']);return console[_0x5e0c7b(0x226)]('Session\x20context\x20'+a40_0x4fe7a9[_0x5e0c7b(0x1f4)]('cleared')+'\x20'+a40_0x4fe7a9[_0x5e0c7b(0x208)](_0x5e0c7b(0x1fd)+_0x3d78aa+')')),0x0;}if(_0x4b87a1[_0x5e0c7b(0x1fc)]===0x0){const _0x4c6520=new GlobalContext(_0x477dcf);return _0x4be2fe?_0x4c6520[_0x5e0c7b(0x229)]():_0x4c6520[_0x5e0c7b(0x201)](),console[_0x5e0c7b(0x226)](a40_0x4fe7a9[_0x5e0c7b(0x208)](_0x5e0c7b(0x222))),console[_0x5e0c7b(0x226)](a40_0x4fe7a9[_0x5e0c7b(0x208)](_0x5e0c7b(0x204))),console[_0x5e0c7b(0x226)](a40_0x4fe7a9[_0x5e0c7b(0x208)]('Use\x20--default\x20with\x20site\x20or\x20profile\x20to\x20save\x20permanently')),0x0;}const _0x26d3d9=_0x4b87a1[0x0],_0x5dd296=_0x4b87a1[0x1],_0x4f1f08=a40_0x31fa68[_0x5e0c7b(0x20b)](getConfigDir(),_0x5e0c7b(0x221));if(_0x2dc174){if(_0x26d3d9===_0x5e0c7b(0x22a))return saveDefaultSiteToUserConfig(_0x5dd296),console['log'](_0x5e0c7b(0x224)+a40_0x4fe7a9[_0x5e0c7b(0x1f4)](_0x5dd296)),console[_0x5e0c7b(0x226)](a40_0x4fe7a9[_0x5e0c7b(0x208)](_0x5e0c7b(0x210)+_0x4f1f08)),0x0;if(_0x26d3d9===_0x5e0c7b(0x22c)){if(!profileExists(_0x5dd296))return console[_0x5e0c7b(0x203)](_0x5e0c7b(0x1ed)+_0x5dd296+_0x5e0c7b(0x21a)),console['error'](_0x5e0c7b(0x21b)),0x1;return saveActiveProfileToUserConfig(_0x5dd296),console[_0x5e0c7b(0x226)](_0x5e0c7b(0x1f3)+a40_0x4fe7a9['green'](_0x5dd296)),console['log'](a40_0x4fe7a9[_0x5e0c7b(0x208)](_0x5e0c7b(0x210)+_0x4f1f08)),0x0;}}if(_0x26d3d9==='site'){const _0x33ba25=getSessionID(_0x477dcf['session']);return saveSessionContext({'site':_0x5dd296},_0x477dcf[_0x5e0c7b(0x1f8)]),console[_0x5e0c7b(0x226)](_0x5e0c7b(0x1ec)+a40_0x4fe7a9[_0x5e0c7b(0x1f4)](_0x5dd296)+'\x20'+a40_0x4fe7a9[_0x5e0c7b(0x208)](_0x5e0c7b(0x1fd)+_0x33ba25+')')),console[_0x5e0c7b(0x226)](a40_0x4fe7a9[_0x5e0c7b(0x208)](_0x5e0c7b(0x212)+_0x5dd296+_0x5e0c7b(0x228))),0x0;}if(_0x26d3d9==='profile'){if(!profileExists(_0x5dd296))return console[_0x5e0c7b(0x203)](_0x5e0c7b(0x1ed)+_0x5dd296+'\x27\x20does\x20not\x20exist'),console[_0x5e0c7b(0x203)](_0x5e0c7b(0x21b)),0x1;const _0x388335=getSessionID(_0x477dcf['session']);return saveSessionContext({'profile':_0x5dd296},_0x477dcf[_0x5e0c7b(0x1f8)]),console[_0x5e0c7b(0x226)](_0x5e0c7b(0x1fe)+a40_0x4fe7a9[_0x5e0c7b(0x1f4)](_0x5dd296)+'\x20'+a40_0x4fe7a9['dim']('(session:\x20'+_0x388335+')')),console[_0x5e0c7b(0x226)](a40_0x4fe7a9[_0x5e0c7b(0x208)](_0x5e0c7b(0x1ef)+_0x5dd296+_0x5e0c7b(0x228))),0x0;}const _0x72815f={},_0xdca373=getSessionID(_0x477dcf[_0x5e0c7b(0x1f8)]);switch(_0x26d3d9){case _0x5e0c7b(0x1f2):_0x72815f[_0x5e0c7b(0x1f2)]=_0x5dd296,console[_0x5e0c7b(0x226)](_0x5e0c7b(0x214)+a40_0x4fe7a9[_0x5e0c7b(0x1f4)](_0x5dd296)+'\x20'+a40_0x4fe7a9[_0x5e0c7b(0x208)](_0x5e0c7b(0x1fd)+_0xdca373+')'));break;case _0x5e0c7b(0x205):_0x72815f['parent_segment']=_0x5dd296,console['log'](_0x5e0c7b(0x21d)+a40_0x4fe7a9[_0x5e0c7b(0x1f4)](_0x5dd296)+'\x20'+a40_0x4fe7a9[_0x5e0c7b(0x208)]('(session:\x20'+_0xdca373+')'));break;case _0x5e0c7b(0x1f6):_0x72815f['llm_project']=_0x5dd296,console['log'](_0x5e0c7b(0x1f7)+a40_0x4fe7a9[_0x5e0c7b(0x1f4)](_0x5dd296)+'\x20'+a40_0x4fe7a9[_0x5e0c7b(0x208)](_0x5e0c7b(0x1fd)+_0xdca373+')'));break;case _0x5e0c7b(0x22b):{const {projectName:_0x9619ab,agentName:_0x4d7b1f}=parseAgentRef(_0x5dd296);_0x4d7b1f?(_0x72815f[_0x5e0c7b(0x1f6)]=_0x9619ab,_0x72815f['llm_agent']=_0x4d7b1f,console['log'](_0x5e0c7b(0x1f7)+a40_0x4fe7a9['green'](_0x9619ab)+'\x20'+a40_0x4fe7a9[_0x5e0c7b(0x208)](_0x5e0c7b(0x1fd)+_0xdca373+')')),console[_0x5e0c7b(0x226)]('Session\x20agent\x20set\x20to:\x20'+a40_0x4fe7a9[_0x5e0c7b(0x1f4)](_0x4d7b1f)+'\x20'+a40_0x4fe7a9['dim'](_0x5e0c7b(0x1fd)+_0xdca373+')'))):(_0x72815f['llm_agent']=_0x5dd296,console['log'](_0x5e0c7b(0x1fa)+a40_0x4fe7a9[_0x5e0c7b(0x1f4)](_0x5dd296)+'\x20'+a40_0x4fe7a9[_0x5e0c7b(0x208)](_0x5e0c7b(0x1fd)+_0xdca373+')')));break;}case _0x5e0c7b(0x20f):_0x72815f[_0x5e0c7b(0x20f)]=_0x5dd296,console[_0x5e0c7b(0x226)](_0x5e0c7b(0x20e)+a40_0x4fe7a9[_0x5e0c7b(0x1f4)](_0x5dd296)+'\x20'+a40_0x4fe7a9[_0x5e0c7b(0x208)](_0x5e0c7b(0x1fd)+_0xdca373+')'));break;}return saveSessionContext(_0x72815f,_0x477dcf[_0x5e0c7b(0x1f8)]),console['log'](a40_0x4fe7a9[_0x5e0c7b(0x208)](_0x5e0c7b(0x1f5))),0x0;}catch(_0x5ccbd9){return _0x5ccbd9 instanceof Error&&console['error'](_0x5e0c7b(0x21c)+_0x5ccbd9[_0x5e0c7b(0x215)]),0x1;}}}function a40_0x3c7d(){const _0x560410=['site','agent','profile','Session\x20site\x20set\x20to:\x20','Error:\x20Profile\x20\x27','name','\x0aTip:\x20Use\x20\x27tdx\x20use\x20--default\x20profile\x20','execute','default','database','Default\x20profile\x20set\x20to:\x20','green','\x0aTip:\x20Use\x20\x27tdx\x20use\x20--clear\x27\x20to\x20clear\x20session\x20overrides','llm_project','Session\x20llm_project\x20set\x20to:\x20','session','\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20--clear\x20\x20\x20\x20\x20\x20#\x20Clear\x20session\x20context\x0a','Session\x20agent\x20set\x20to:\x20','75pyqdEE','length','(session:\x20','Session\x20profile\x20set\x20to:\x20','Usage:\x20tdx\x20use\x20<resource>\x20<value>\x0a','validate','display','use','error','Resources:\x20site,\x20database,\x20parent_segment,\x20llm_project,\x20agent,\x20profile,\x20engage_workspace','parent_segment','5799168CeWgvI','\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','dim','\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20--default\x20profile\x20<value>\x20\x20#\x20Save\x20default\x20profile\x20to\x20config\x0a','183204IhlDOQ','join','\x0aRun\x20\x27tdx\x20use\x20--help\x27\x20for\x20more\x20options','\x0aResources:\x20site,\x20database,\x20parent_segment,\x20llm_project,\x20agent,\x20profile,\x20engage_workspace\x0a','Session\x20engage_workspace\x20set\x20to:\x20','engage_workspace','\x0aSaved\x20to:\x20','--default\x20can\x20only\x20be\x20used\x20with\x20\x27site\x27\x20or\x20\x27profile\x27.\x20Other\x20resources\x20are\x20session-level\x20only.','\x0aTip:\x20Use\x20\x27tdx\x20use\x20--default\x20site\x20','680672zZyYPH','Session\x20database\x20set\x20to:\x20','message','includes','84fsQZfU','567666NYgguk','3352455kHIcQw','\x27\x20does\x20not\x20exist','\x0aUse\x20\x27tdx\x20profiles\x27\x20to\x20see\x20available\x20profiles','Error:\x20','Session\x20parent_segment\x20set\x20to:\x20','description','debug','2307812rjXodc','tdx.json','\x0aSet\x20context:\x20tdx\x20use\x20<resource>\x20<value>','Set\x20session-level\x20context','Default\x20site\x20set\x20to:\x20','.\x20Must\x20be\x20one\x20of:\x20','log','88680TvmGCZ','\x27\x20to\x20save\x20permanently','displayWithSources'];a40_0x3c7d=function(){return _0x560410;};return a40_0x3c7d();}
@@ -1 +1 @@
1
- const a41_0x20f1c8=a41_0x4bfd;(function(_0x2c9d3c,_0xf78ae8){const _0x560bd6=a41_0x4bfd,_0x4fc886=_0x2c9d3c();while(!![]){try{const _0x100b57=parseInt(_0x560bd6(0x89))/0x1+parseInt(_0x560bd6(0x8f))/0x2+-parseInt(_0x560bd6(0x7a))/0x3+-parseInt(_0x560bd6(0x87))/0x4+parseInt(_0x560bd6(0x7c))/0x5*(parseInt(_0x560bd6(0x8e))/0x6)+-parseInt(_0x560bd6(0x83))/0x7+parseInt(_0x560bd6(0x8c))/0x8;if(_0x100b57===_0xf78ae8)break;else _0x4fc886['push'](_0x4fc886['shift']());}catch(_0xb2de2d){_0x4fc886['push'](_0x4fc886['shift']());}}}(a41_0xc0c9,0x9c2b7));import{BaseCommand}from'./command.js';function a41_0xc0c9(){const _0x344ff9=['3443940QHeTme','data','263651wwkMkS','error','getCurrent','3196064kawuFV','verbose','6JLIDHY','2284840sFPjmA','\x20\x20Cause:\x20','message','Show\x20current\x20user\x20information','cause','length','list','description','1530111RVjFcZ','name','6147165wJXRwO','Error:\x20','user','Listing\x20users...','List\x20all\x20users\x20in\x20the\x20account','Fetching\x20user\x20info...','✔\x20Found\x20','7170233ubuMmr','execute','user\x20list','\x20user'];a41_0xc0c9=function(){return _0x344ff9;};return a41_0xc0c9();}import{SDKError}from'../sdk/index.js';function a41_0x4bfd(_0x30f08c,_0xae69e0){_0x30f08c=_0x30f08c-0x75;const _0xc0c903=a41_0xc0c9();let _0x4bfdce=_0xc0c903[_0x30f08c];return _0x4bfdce;}import{handleSDKOutput,handleSingleObjectOutput}from'../core/command-output.js';import{withSpinner}from'../utils/spinner.js';export class UserCommand extends BaseCommand{[a41_0x20f1c8(0x7b)]=a41_0x20f1c8(0x7e);['description']=a41_0x20f1c8(0x75);async[a41_0x20f1c8(0x84)](_0x1f2ac5){const _0x3c5943=a41_0x20f1c8,{options:_0x3b714f,tdx:_0x380a7d}=_0x1f2ac5;try{const _0x4934ca=await withSpinner(_0x3c5943(0x81),()=>_0x380a7d[_0x3c5943(0x7e)][_0x3c5943(0x8b)](),{'verbose':_0x3b714f[_0x3c5943(0x8d)]}),_0x121762=_0x4934ca[_0x3c5943(0x88)];return await handleSingleObjectOutput(_0x121762,_0x3b714f),0x0;}catch(_0x5c8ebd){if(_0x5c8ebd instanceof SDKError)return console[_0x3c5943(0x8a)]('Error:\x20'+_0x5c8ebd[_0x3c5943(0x91)]),_0x5c8ebd['cause']&&console[_0x3c5943(0x8a)](_0x3c5943(0x90)+_0x5c8ebd[_0x3c5943(0x76)]),0x1;throw _0x5c8ebd;}}}export class UserListCommand extends BaseCommand{[a41_0x20f1c8(0x7b)]=a41_0x20f1c8(0x85);[a41_0x20f1c8(0x79)]=a41_0x20f1c8(0x80);async[a41_0x20f1c8(0x84)](_0x268472){const _0x593123=a41_0x20f1c8,{options:_0x5052b9,tdx:_0x4f163c}=_0x268472;try{const _0x454a0a=await withSpinner(_0x593123(0x7f),()=>_0x4f163c[_0x593123(0x7e)][_0x593123(0x78)](),{'verbose':_0x5052b9[_0x593123(0x8d)]}),_0x281378=_0x454a0a['data'];return console[_0x593123(0x8a)](_0x593123(0x82)+_0x281378['length']+_0x593123(0x86)+(_0x281378[_0x593123(0x77)]!==0x1?'s':'')),await handleSDKOutput(_0x281378,_0x5052b9),0x0;}catch(_0x1e341f){if(_0x1e341f instanceof SDKError)return console[_0x593123(0x8a)](_0x593123(0x7d)+_0x1e341f[_0x593123(0x91)]),_0x1e341f['cause']&&console[_0x593123(0x8a)](_0x593123(0x90)+_0x1e341f['cause']),0x1;throw _0x1e341f;}}}
1
+ const a41_0x313422=a41_0x22e0;(function(_0xe3fbd1,_0x239054){const _0x28766a=a41_0x22e0,_0x476baf=_0xe3fbd1();while(!![]){try{const _0x4d0ca3=parseInt(_0x28766a(0x19c))/0x1+-parseInt(_0x28766a(0x197))/0x2*(-parseInt(_0x28766a(0x196))/0x3)+parseInt(_0x28766a(0x1a9))/0x4*(parseInt(_0x28766a(0x19a))/0x5)+parseInt(_0x28766a(0x1ad))/0x6+parseInt(_0x28766a(0x1aa))/0x7*(parseInt(_0x28766a(0x1ae))/0x8)+parseInt(_0x28766a(0x1a4))/0x9+-parseInt(_0x28766a(0x1ab))/0xa;if(_0x4d0ca3===_0x239054)break;else _0x476baf['push'](_0x476baf['shift']());}catch(_0x1267e3){_0x476baf['push'](_0x476baf['shift']());}}}(a41_0x1e1d,0x574d1));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';function a41_0x22e0(_0x5dd0ce,_0x4a19fe){_0x5dd0ce=_0x5dd0ce-0x196;const _0x1e1dc3=a41_0x1e1d();let _0x22e054=_0x1e1dc3[_0x5dd0ce];return _0x22e054;}import{handleSDKOutput,handleSingleObjectOutput}from'../core/command-output.js';import{withSpinner}from'../utils/spinner.js';export class UserCommand extends BaseCommand{[a41_0x313422(0x19f)]=a41_0x313422(0x1a6);[a41_0x313422(0x1a1)]=a41_0x313422(0x19d);async[a41_0x313422(0x19e)](_0x5f471b){const _0x20b65c=a41_0x313422,{options:_0x1f1c7e,tdx:_0x415bb0}=_0x5f471b;try{const _0x146630=await withSpinner('Fetching\x20user\x20info...',()=>_0x415bb0[_0x20b65c(0x1a6)]['getCurrent'](),{'verbose':_0x1f1c7e[_0x20b65c(0x1af)]}),_0x37cc00=_0x146630[_0x20b65c(0x1a0)];return await handleSingleObjectOutput(_0x37cc00,_0x1f1c7e),0x0;}catch(_0x3a739b){if(_0x3a739b instanceof SDKError)return console[_0x20b65c(0x1a7)](_0x20b65c(0x1b0)+_0x3a739b[_0x20b65c(0x198)]),_0x3a739b[_0x20b65c(0x1b2)]&&console[_0x20b65c(0x1a7)]('\x20\x20Cause:\x20'+_0x3a739b['cause']),0x1;throw _0x3a739b;}}}function a41_0x1e1d(){const _0x5c8ade=['\x20user','3600504cInLyr','list','user','error','List\x20all\x20users\x20in\x20the\x20account','8eGYGFu','39683uKktAP','18639270jHyfEV','✔\x20Found\x20','3070866kZZoRw','536EFKFpA','verbose','Error:\x20','user\x20list','cause','3153PNaPmz','6AzrCVV','message','Listing\x20users...','1030270AhrsGG','\x20\x20Cause:\x20','514561yyfnlB','Show\x20current\x20user\x20information','execute','name','data','description','length'];a41_0x1e1d=function(){return _0x5c8ade;};return a41_0x1e1d();}export class UserListCommand extends BaseCommand{[a41_0x313422(0x19f)]=a41_0x313422(0x1b1);[a41_0x313422(0x1a1)]=a41_0x313422(0x1a8);async[a41_0x313422(0x19e)](_0x4fc546){const _0x36a3eb=a41_0x313422,{options:_0x4ee714,tdx:_0x21eff3}=_0x4fc546;try{const _0x431ec8=await withSpinner(_0x36a3eb(0x199),()=>_0x21eff3[_0x36a3eb(0x1a6)][_0x36a3eb(0x1a5)](),{'verbose':_0x4ee714[_0x36a3eb(0x1af)]}),_0x56ffd8=_0x431ec8[_0x36a3eb(0x1a0)];return console[_0x36a3eb(0x1a7)](_0x36a3eb(0x1ac)+_0x56ffd8['length']+_0x36a3eb(0x1a3)+(_0x56ffd8[_0x36a3eb(0x1a2)]!==0x1?'s':'')),await handleSDKOutput(_0x56ffd8,_0x4ee714),0x0;}catch(_0x53767b){if(_0x53767b instanceof SDKError)return console['error'](_0x36a3eb(0x1b0)+_0x53767b[_0x36a3eb(0x198)]),_0x53767b[_0x36a3eb(0x1b2)]&&console[_0x36a3eb(0x1a7)](_0x36a3eb(0x19b)+_0x53767b[_0x36a3eb(0x1b2)]),0x1;throw _0x53767b;}}}