@treasuredata/tdx 0.23.0 → 0.24.0

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 (164) 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/process.js.map +1 -1
  157. package/dist/utils/prompt.js +1 -1
  158. package/dist/utils/spinner.js +1 -1
  159. package/dist/utils/sse-parser.js +1 -1
  160. package/dist/utils/string-utils.js +1 -1
  161. package/dist/utils/table-ref-parser.js +1 -1
  162. package/dist/utils/tdx-logger.js +1 -1
  163. package/dist/utils/version-check.js +1 -1
  164. 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_0x3921de=a32_0x1c4d;function a32_0x1c4d(_0x409caf,_0x4dcf78){_0x409caf=_0x409caf-0x118;const _0x1ebf93=a32_0x1ebf();let _0x1c4d09=_0x1ebf93[_0x409caf];return _0x1c4d09;}(function(_0x11591c,_0x85dc75){const _0x1d61f5=a32_0x1c4d,_0x5cc810=_0x11591c();while(!![]){try{const _0x4e8d00=parseInt(_0x1d61f5(0x126))/0x1+parseInt(_0x1d61f5(0x11f))/0x2*(-parseInt(_0x1d61f5(0x12c))/0x3)+parseInt(_0x1d61f5(0x12f))/0x4*(parseInt(_0x1d61f5(0x12d))/0x5)+-parseInt(_0x1d61f5(0x12a))/0x6*(parseInt(_0x1d61f5(0x11e))/0x7)+parseInt(_0x1d61f5(0x133))/0x8*(-parseInt(_0x1d61f5(0x142))/0x9)+-parseInt(_0x1d61f5(0x145))/0xa+parseInt(_0x1d61f5(0x125))/0xb*(parseInt(_0x1d61f5(0x144))/0xc);if(_0x4e8d00===_0x85dc75)break;else _0x5cc810['push'](_0x5cc810['shift']());}catch(_0x21d259){_0x5cc810['push'](_0x5cc810['shift']());}}}(a32_0x1ebf,0xd0221));import{BaseCommand}from'./command.js';import{handleSDKOutput}from'../core/command-output.js';import{withSpinner}from'../utils/spinner.js';import{loadJSONFromOptions}from'../utils/json-loader.js';function a32_0x1ebf(){const _0x41fd6e=['resolveFolderId','\x20\x20\x20Path:\x20','type','folder','updateSegmentById','segment:update','parentId','resolvePathToResource','INTERNAL','error','data','yellow','Use:\x20tdx\x20segment\x20update\x20<path_to_segment>\x20[options]','9pvUMcV','includes','130056zDoWkZ','8602410bMrjNT','Segment\x20ID\x20missing\x20from\x20resolved\x20path','description','Resolved\x20folder\x20ID:\x20','verbose','segment','execute','\x20\x20Use\x20`tdx\x20sg\x20push`\x20with\x20YAML\x20files\x20instead.\x0a','Usage:\x20tdx\x20segment\x20update\x20<path>\x20[options]','kind','\x20\x20tdx\x20segment\x20update\x20\x22My\x20Audience/High\x20Value\x22\x20--description\x20\x22...\x22','segmentPath','\x27...','157619dkGkBQ','164QiDViN','segmentName','name','Resolved\x20type:\x20','Segment\x20ID:\x20','Resolving\x20folder\x20\x27','1595nTZvrT','1148450zYYClC','rule','Parent\x20ID:\x20','ruleFile','138gyDRDU','Update\x20existing\x20child\x20segment','26526VMMFxl','1133085SJjUiP','.\x20Only\x20child\x20segments\x20can\x20be\x20updated.','12cIvvFg','Updating\x20segment\x20\x27','segmentId','Error:\x20Segment\x20path\x20or\x20name\x20is\x20required','3552976nvqnFD','Error:\x20Cannot\x20update\x20'];a32_0x1ebf=function(){return _0x41fd6e;};return a32_0x1ebf();}import{SDKError,ErrorCode}from'../sdk/index.js';import a32_0x37a9a7 from'chalk';export class SegmentUpdateCommand extends BaseCommand{['name']=a32_0x3921de(0x13a);[a32_0x3921de(0x147)]=a32_0x3921de(0x12b);async[a32_0x3921de(0x14b)](_0x20acb6){const _0x5454f6=a32_0x3921de;console[_0x5454f6(0x13e)](a32_0x37a9a7['yellow']('⚠\x20Deprecation\x20warning:\x20`segment\x20update`\x20is\x20deprecated.')),console['error'](a32_0x37a9a7[_0x5454f6(0x140)](_0x5454f6(0x118)));const {options:_0x1b43ad,args:_0x2cb12f,tdx:_0x3332e8}=_0x20acb6,_0x3fbe98=_0x1b43ad;if(_0x2cb12f['length']===0x0)return console[_0x5454f6(0x13e)](_0x5454f6(0x132)),console[_0x5454f6(0x13e)](_0x5454f6(0x119)),console['error']('Examples:'),console[_0x5454f6(0x13e)](_0x5454f6(0x11b)),console[_0x5454f6(0x13e)]('\x20\x20tdx\x20segment\x20update\x20\x22High\x20Value\x22\x20--rule\x20\x27...\x27\x20\x20#\x20Relative\x20to\x20context'),0x1;const _0x230edc=_0x2cb12f[0x0],_0xb7c5aa=_0x1b43ad[_0x5454f6(0x11c)];let _0x408c4e=_0x230edc;_0xb7c5aa&&!_0x230edc[_0x5454f6(0x143)]('/')&&(_0x408c4e=_0xb7c5aa+'/'+_0x230edc,_0x3fbe98[_0x5454f6(0x149)]&&console[_0x5454f6(0x13e)]('Resolved\x20relative\x20path\x20to:\x20'+_0x408c4e));const _0x5c83db=await withSpinner('Resolving\x20path\x20\x27'+_0x408c4e+_0x5454f6(0x11d),()=>_0x3332e8[_0x5454f6(0x14a)][_0x5454f6(0x13c)](_0x408c4e),{'verbose':_0x3fbe98[_0x5454f6(0x149)]}),_0x1d6621=_0x5c83db[_0x5454f6(0x13f)];_0x3fbe98[_0x5454f6(0x149)]&&console[_0x5454f6(0x13e)](_0x5454f6(0x122)+_0x1d6621[_0x5454f6(0x137)]);if(_0x1d6621[_0x5454f6(0x137)]!==_0x5454f6(0x14a))return console[_0x5454f6(0x13e)](_0x5454f6(0x134)+_0x1d6621[_0x5454f6(0x137)]+_0x5454f6(0x12e)),console[_0x5454f6(0x13e)](_0x5454f6(0x141)),0x1;if(!_0x1d6621[_0x5454f6(0x131)])throw new SDKError(ErrorCode[_0x5454f6(0x13d)],_0x5454f6(0x146));const _0x3b151b=_0x1d6621[_0x5454f6(0x13b)],_0x131713=_0x1d6621[_0x5454f6(0x131)];_0x3fbe98[_0x5454f6(0x149)]&&(console[_0x5454f6(0x13e)](_0x5454f6(0x128)+_0x3b151b),console[_0x5454f6(0x13e)](_0x5454f6(0x123)+_0x131713));let _0x5c7cca;if(_0x3fbe98['folder']){const _0x169e4e=_0x3fbe98[_0x5454f6(0x138)],_0x3d1626=await withSpinner(_0x5454f6(0x124)+_0x169e4e+_0x5454f6(0x11d),()=>_0x3332e8[_0x5454f6(0x14a)][_0x5454f6(0x135)](_0x3b151b,_0x169e4e),{'verbose':_0x3fbe98[_0x5454f6(0x149)]});_0x5c7cca=parseInt(_0x3d1626['data'],0xa),_0x3fbe98['verbose']&&console[_0x5454f6(0x13e)](_0x5454f6(0x148)+_0x5c7cca);}const _0x45d5a=await loadJSONFromOptions(_0x3fbe98[_0x5454f6(0x127)],_0x3fbe98[_0x5454f6(0x129)]),_0x636b68={'name':_0x3fbe98[_0x5454f6(0x121)],'description':_0x3fbe98['description'],'rule':_0x45d5a,'kind':_0x3fbe98['kind']!==undefined?parseInt(_0x3fbe98[_0x5454f6(0x11a)],0xa):undefined,'segmentFolderId':_0x5c7cca},_0x5040f9=await withSpinner(_0x5454f6(0x130)+_0x1d6621[_0x5454f6(0x120)]+'\x27...',()=>_0x3332e8[_0x5454f6(0x14a)][_0x5454f6(0x139)](_0x3b151b,_0x131713,_0x636b68),{'verbose':_0x3fbe98['verbose']}),_0x1d9be8=_0x5040f9['data'];return console[_0x5454f6(0x13e)]('✔\x20Updated\x20segment\x20\x27'+_0x1d9be8[_0x5454f6(0x121)]+'\x27'),_0x408c4e!==_0x230edc&&console['error'](_0x5454f6(0x136)+_0x408c4e),await handleSDKOutput([_0x1d9be8],_0x3fbe98),0x0;}}
@@ -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_0xc9bda6=a33_0x2777;(function(_0x221ea8,_0x49e2a6){const _0x286823=a33_0x2777,_0x285ea9=_0x221ea8();while(!![]){try{const _0xe477e7=parseInt(_0x286823(0x167))/0x1+parseInt(_0x286823(0x15c))/0x2+-parseInt(_0x286823(0x14d))/0x3*(parseInt(_0x286823(0x156))/0x4)+-parseInt(_0x286823(0x17d))/0x5+-parseInt(_0x286823(0x15b))/0x6+parseInt(_0x286823(0x171))/0x7+parseInt(_0x286823(0x175))/0x8;if(_0xe477e7===_0x49e2a6)break;else _0x285ea9['push'](_0x285ea9['shift']());}catch(_0x17f732){_0x285ea9['push'](_0x285ea9['shift']());}}}(a33_0x42a1,0x2d34f));import{existsSync,statSync}from'fs';import a33_0xb32378 from'chalk';import{BaseCommand}from'./command.js';import{saveSessionContext}from'../core/session.js';function a33_0x2777(_0x1b9c80,_0x1c2183){_0x1b9c80=_0x1b9c80-0x14b;const _0x42a1c3=a33_0x42a1();let _0x277793=_0x42a1c3[_0x1b9c80];return _0x277793;}import{withSpinner}from'../utils/spinner.js';function a33_0x42a1(){const _0x44da9a=['dim','Resolved\x20path\x20type:\x20','log','join','Use:\x20tdx\x20segment\x20use\x20','Context\x20can\x20only\x20be\x20set\x20to\x20a\x20parent\x20segment\x20or\x20folder.','type','1462307VjrnMQ','Usage:\x20tdx\x20segment\x20use\x20<path>','parent_segment','\x20\x20tdx\x20segment\x20use\x20\x22My\x20Audience\x22','1477784cJOcST','\x20\x20tdx\x20segment\x20use\x20..\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Go\x20to\x20parent','error','✔\x20Context\x20set\x20to:\x20','verbose','Resolving\x20path\x20\x27','Site:\x20','execute','930275aDkSir','Examples:','isAbsolute','Use\x20\x22tdx\x20segments\x22\x20to\x20list\x20contents\x20in\x20this\x20context','\x27...','\x20\x20tdx\x20segment\x20use\x20\x22My\x20Audience/Marketing\x22','resolvePathToResource','folderId','length','3JKqNKl','Target\x20path:\x20','isDirectory','Tip:\x20Run\x20`tdx\x20sg\x20pull\x20<parent_name>`\x20first\x20to\x20create\x20the\x20folder\x20structure','green','Error:\x20No\x20context\x20set.\x20Cannot\x20use\x20relative\x20path.','✔\x20Context\x20cleared.\x20Back\x20to\x20root.','parentName','name','822940InRDRG','red','config','Use\x20an\x20absolute\x20path\x20or\x20set\x20context\x20with:\x20tdx\x20segment\x20use\x20<parent_name>','Resolved\x20relative\x20path\x20to:\x20','1946232RVNRdQ','586790SEfIVb','Error:\x20Cannot\x20set\x20context\x20to\x20a\x20segment.','parentId','session','segmentPath','site','slice','Error:\x20Path\x20is\x20required\x0a','segment','description','segment:use','214310BSboqR','folderPath','cyan'];a33_0x42a1=function(){return _0x44da9a;};return a33_0x42a1();}import{parsePath,normalizePath}from'../sdk/segment/segment-path-parser.js';import{findTdxConfig}from'../sdk/segment/tdx-config.js';export class SegmentUseCommand extends BaseCommand{[a33_0xc9bda6(0x155)]=a33_0xc9bda6(0x166);[a33_0xc9bda6(0x165)]='Set\x20current\x20segment/folder\x20context\x20for\x20navigation';async[a33_0xc9bda6(0x17c)](_0x5f56d4){const _0x2ff7ce=a33_0xc9bda6,{options:_0x8b2fd5,args:_0x1acc4f,tdx:_0x46b719}=_0x5f56d4;if(_0x1acc4f[_0x2ff7ce(0x14c)]===0x0)return console[_0x2ff7ce(0x177)](a33_0xb32378['red'](_0x2ff7ce(0x163))),console[_0x2ff7ce(0x177)](_0x2ff7ce(0x172)),console['error'](_0x2ff7ce(0x17e)),console[_0x2ff7ce(0x177)](_0x2ff7ce(0x174)),console[_0x2ff7ce(0x177)](_0x2ff7ce(0x182)),console[_0x2ff7ce(0x177)]('\x20\x20tdx\x20segment\x20use\x20/\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Clear\x20context'),console[_0x2ff7ce(0x177)](_0x2ff7ce(0x176)),0x1;const _0x3af2cd=_0x1acc4f[0x0],_0x562996=_0x8b2fd5[_0x2ff7ce(0x15f)];try{if(_0x3af2cd==='/')return saveSessionContext({'segment_path':undefined},_0x562996),console[_0x2ff7ce(0x16c)](a33_0xb32378[_0x2ff7ce(0x151)]('✔\x20Context\x20cleared.\x20Back\x20to\x20root.')),0x0;if(existsSync(_0x3af2cd)&&statSync(_0x3af2cd)[_0x2ff7ce(0x14f)]()){let _0x4d3cab;try{_0x4d3cab=findTdxConfig(_0x3af2cd);}catch{return console[_0x2ff7ce(0x177)](a33_0xb32378['red']('Error:\x20No\x20tdx.json\x20found\x20in\x20or\x20above:\x20'+_0x3af2cd)),console[_0x2ff7ce(0x177)](a33_0xb32378['cyan'](_0x2ff7ce(0x150))),0x1;}const _0x148086=_0x4d3cab[_0x2ff7ce(0x158)][_0x2ff7ce(0x173)];return saveSessionContext({'segment_path':_0x148086,'parent_segment':_0x148086},_0x562996),console[_0x2ff7ce(0x16c)](a33_0xb32378[_0x2ff7ce(0x151)](_0x2ff7ce(0x178)+a33_0xb32378[_0x2ff7ce(0x169)](_0x148086))),0x0;}const _0x2a7ab0=_0x8b2fd5[_0x2ff7ce(0x160)];let _0x197f9f=_0x3af2cd;const _0x441a5d=parsePath(_0x3af2cd);if(!_0x441a5d[_0x2ff7ce(0x17f)]){if(!_0x2a7ab0)return console[_0x2ff7ce(0x177)](a33_0xb32378[_0x2ff7ce(0x157)](_0x2ff7ce(0x152))),console[_0x2ff7ce(0x177)](a33_0xb32378['cyan'](_0x2ff7ce(0x159))),0x1;if(_0x3af2cd==='..'){const _0x39fb35=_0x2a7ab0['split']('/')[_0x2ff7ce(0x162)](0x0,-0x1)[_0x2ff7ce(0x16d)]('/');_0x197f9f=_0x39fb35||'/';}else _0x3af2cd==='.'?_0x197f9f=_0x2a7ab0:_0x197f9f=_0x2a7ab0+'/'+_0x3af2cd;_0x8b2fd5[_0x2ff7ce(0x179)]&&console[_0x2ff7ce(0x177)](_0x2ff7ce(0x15a)+_0x197f9f);}if(_0x197f9f==='/'||_0x197f9f==='')return saveSessionContext({'segment_path':undefined},_0x562996),console['log'](a33_0xb32378[_0x2ff7ce(0x151)]('✔\x20Context\x20cleared.\x20Back\x20to\x20root.')),0x0;_0x197f9f=normalizePath(_0x197f9f);const _0x57b026=parsePath(_0x197f9f)['segments'];if(_0x57b026[_0x2ff7ce(0x14c)]===0x0)return saveSessionContext({'segment_path':undefined},_0x562996),console['log'](a33_0xb32378[_0x2ff7ce(0x151)](_0x2ff7ce(0x153))),0x0;_0x8b2fd5['verbose']&&(console[_0x2ff7ce(0x177)](_0x2ff7ce(0x17b)+_0x8b2fd5[_0x2ff7ce(0x161)]),console[_0x2ff7ce(0x177)](_0x2ff7ce(0x14e)+_0x197f9f));const _0x2372a4=await withSpinner(_0x2ff7ce(0x17a)+_0x197f9f+_0x2ff7ce(0x181),()=>_0x46b719[_0x2ff7ce(0x164)][_0x2ff7ce(0x183)](_0x197f9f),{'verbose':_0x8b2fd5[_0x2ff7ce(0x179)]}),_0x11a012=_0x2372a4['data'];_0x8b2fd5['verbose']&&(console['error'](_0x2ff7ce(0x16b)+_0x11a012['type']),console[_0x2ff7ce(0x177)]('Parent\x20ID:\x20'+_0x11a012[_0x2ff7ce(0x15e)]),_0x11a012[_0x2ff7ce(0x14b)]&&console[_0x2ff7ce(0x177)]('Folder\x20ID:\x20'+_0x11a012[_0x2ff7ce(0x14b)]));if(_0x11a012[_0x2ff7ce(0x170)]===_0x2ff7ce(0x164))return console['error'](a33_0xb32378[_0x2ff7ce(0x157)](_0x2ff7ce(0x15d))),console['error'](_0x2ff7ce(0x16f)),console[_0x2ff7ce(0x177)](a33_0xb32378[_0x2ff7ce(0x169)](_0x2ff7ce(0x16e)+_0x11a012[_0x2ff7ce(0x154)]+(_0x11a012[_0x2ff7ce(0x168)]?'/'+_0x11a012[_0x2ff7ce(0x168)]['join']('/'):''))),0x1;return saveSessionContext({'segment_path':_0x11a012['fullPath'],'parent_segment':_0x11a012[_0x2ff7ce(0x154)]},_0x562996),console[_0x2ff7ce(0x16c)](a33_0xb32378[_0x2ff7ce(0x151)](_0x2ff7ce(0x178)+a33_0xb32378[_0x2ff7ce(0x169)](_0x11a012['fullPath']))),_0x8b2fd5['verbose']&&(console[_0x2ff7ce(0x177)](a33_0xb32378[_0x2ff7ce(0x16a)](_0x2ff7ce(0x180))),console[_0x2ff7ce(0x177)](a33_0xb32378[_0x2ff7ce(0x16a)]('Use\x20\x22tdx\x20use\x22\x20to\x20see\x20all\x20context\x20parameters'))),0x0;}catch(_0x544808){throw _0x544808;}}}
@@ -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
+ function a34_0x1878(){const _0x379604=['segment:validate','valid','warningCount','546GsEtRO','dim','length','\x20file(s)\x20valid','.yml','green','678WvCneF','Error:\x20Directory\x20not\x20found:\x20','\x20\x20\x20\x20\x20\x20\x20tdx\x20sg\x20validate\x20<file_path>\x20\x20#\x20Validate\x20specific\x20file','file','):\x20','cyan','\x20warning(s)\x20found','message','warnings','cwd','685437AgzCHW','parentSegment','\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','Usage:\x20tdx\x20sg\x20validate\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Validate\x20all\x20(requires\x20context)','type','log','Error:\x20','156665gMQlaS','verbose','endsWith','9bYRgsD','1227618snzEYY','.yaml','Validate\x20segment\x20and\x20journey\x20YAML\x20files','7137144bTZHzX','\x20file(s)\x20with\x20errors,\x20','\x20valid','red','errorCode','error','errors','helpText','28zfOKky','yellow','Validation\x20failed:\x20','39818300KHdGXq','2467168MzUtuz'];a34_0x1878=function(){return _0x379604;};return a34_0x1878();}const a34_0x5d6f3a=a34_0x3bd8;(function(_0x45eb02,_0x3f7d5d){const _0x522ce3=a34_0x3bd8,_0x4c7bfc=_0x45eb02();while(!![]){try{const _0x4020e5=-parseInt(_0x522ce3(0x1b8))/0x1+-parseInt(_0x522ce3(0x1c7))/0x2+parseInt(_0x522ce3(0x1db))/0x3+-parseInt(_0x522ce3(0x1c3))/0x4*(parseInt(_0x522ce3(0x1b4))/0x5)+parseInt(_0x522ce3(0x1d1))/0x6*(parseInt(_0x522ce3(0x1cb))/0x7)+-parseInt(_0x522ce3(0x1bb))/0x8*(parseInt(_0x522ce3(0x1b7))/0x9)+parseInt(_0x522ce3(0x1c6))/0xa;if(_0x4020e5===_0x3f7d5d)break;else _0x4c7bfc['push'](_0x4c7bfc['shift']());}catch(_0x4c2f5c){_0x4c7bfc['push'](_0x4c7bfc['shift']());}}}(a34_0x1878,0x9dd2f));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_0x179f3f from'chalk';function a34_0x3bd8(_0x1572b3,_0x525042){_0x1572b3=_0x1572b3-0x1b3;const _0x1878b8=a34_0x1878();let _0x3bd8ec=_0x1878b8[_0x1572b3];return _0x3bd8ec;}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_0x5d6f3a(0x1c8);['description']=a34_0x5d6f3a(0x1ba);async['execute'](_0x48f321){const _0x68f2f4=a34_0x5d6f3a,{options:_0x5a3974,args:_0x21a8cc}=_0x48f321,_0x360dc0=_0x5a3974,_0x56dd79=await resolveTarget({'arg':_0x21a8cc[0x0],'contextParent':_0x5a3974[_0x68f2f4(0x1dc)],'cwd':process[_0x68f2f4(0x1da)]()});if(!isSuccessfulResolution(_0x56dd79))return _0x56dd79[_0x68f2f4(0x1bf)]==='no_parent'?(console[_0x68f2f4(0x1c0)](a34_0x179f3f['yellow']('parent_segment\x20is\x20not\x20set.\x20Use\x20`tdx\x20sg\x20use\x20<parent_name>`\x20to\x20set\x20it.\x0a')),console[_0x68f2f4(0x1c0)](_0x68f2f4(0x1de)),console['error'](_0x68f2f4(0x1dd)),console[_0x68f2f4(0x1c0)](_0x68f2f4(0x1d3))):(console[_0x68f2f4(0x1c0)](a34_0x179f3f[_0x68f2f4(0x1be)](_0x68f2f4(0x1b3)+_0x56dd79[_0x68f2f4(0x1d8)]+'\x0a')),_0x56dd79[_0x68f2f4(0x1c2)]&&console[_0x68f2f4(0x1c0)](a34_0x179f3f[_0x68f2f4(0x1d6)](_0x56dd79[_0x68f2f4(0x1c2)]))),0x1;const _0x45a6e9=_0x56dd79['targetDir'],_0x5a93b3=_0x56dd79[_0x68f2f4(0x1df)]===_0x68f2f4(0x1d4)?_0x56dd79['filePath']:undefined;if(!_0x5a93b3&&!existsSync(_0x45a6e9))return console['error'](a34_0x179f3f[_0x68f2f4(0x1be)](_0x68f2f4(0x1d2)+_0x45a6e9+'\x0a')),0x1;let _0x18edad;if(_0x5a93b3){if(!_0x5a93b3[_0x68f2f4(0x1b6)](_0x68f2f4(0x1cf))&&!_0x5a93b3[_0x68f2f4(0x1b6)](_0x68f2f4(0x1b9)))return console['error'](a34_0x179f3f[_0x68f2f4(0x1be)]('Error:\x20File\x20must\x20have\x20.yml\x20or\x20.yaml\x20extension:\x20'+_0x5a93b3+'\x0a')),0x1;_0x18edad=[_0x5a93b3];}else _0x18edad=findYamlFiles(_0x45a6e9);if(_0x18edad[_0x68f2f4(0x1cd)]===0x0)return console[_0x68f2f4(0x1c0)](a34_0x179f3f[_0x68f2f4(0x1be)]('Error:\x20No\x20YAML\x20files\x20found\x20in\x20'+_0x45a6e9+'\x0a')),0x1;const _0x5bd731=validateYamlFiles(_0x18edad,_0x45a6e9),_0x59dca0=calculateSummary(_0x5bd731);for(const _0x358bca of _0x5bd731){if(!isValidationResult(_0x358bca))continue;const {relativePath:_0x25cc87,source:_0x14f108,result:_0x246d4e,fileType:_0x89431d}=_0x358bca,_0x363d44=_0x89431d;if(_0x246d4e[_0x68f2f4(0x1c9)]&&_0x246d4e[_0x68f2f4(0x1d9)][_0x68f2f4(0x1cd)]===0x0)_0x360dc0[_0x68f2f4(0x1b5)]&&console['log'](a34_0x179f3f[_0x68f2f4(0x1d0)]('✔\x20'+_0x25cc87)+a34_0x179f3f[_0x68f2f4(0x1cc)]('\x20('+_0x363d44+')'));else _0x246d4e['valid']?(console['log'](a34_0x179f3f['yellow']('⚠\x20'+_0x25cc87)+a34_0x179f3f[_0x68f2f4(0x1cc)]('\x20('+_0x363d44+_0x68f2f4(0x1d5)+_0x246d4e['warnings'][_0x68f2f4(0x1cd)]+'\x20warning(s)')),console['log'](formatValidationResult(_0x246d4e,_0x14f108,_0x25cc87))):(console['log'](a34_0x179f3f[_0x68f2f4(0x1be)]('✖\x20'+_0x25cc87)+a34_0x179f3f[_0x68f2f4(0x1cc)]('\x20('+_0x363d44+_0x68f2f4(0x1d5)+_0x246d4e[_0x68f2f4(0x1c1)][_0x68f2f4(0x1cd)]+'\x20error(s)')),console[_0x68f2f4(0x1e0)](formatValidationResult(_0x246d4e,_0x14f108,_0x25cc87)));}return console['log'](''),_0x59dca0['hasErrors']?(console['log'](a34_0x179f3f[_0x68f2f4(0x1be)](_0x68f2f4(0x1c5)+_0x59dca0['invalidCount']+_0x68f2f4(0x1bc)+_0x59dca0['validCount']+_0x68f2f4(0x1bd))),_0x59dca0[_0x68f2f4(0x1ca)]>0x0&&console[_0x68f2f4(0x1e0)](a34_0x179f3f[_0x68f2f4(0x1c4)](_0x59dca0[_0x68f2f4(0x1ca)]+_0x68f2f4(0x1d7))),0x1):(console[_0x68f2f4(0x1e0)](a34_0x179f3f[_0x68f2f4(0x1d0)]('✔\x20All\x20'+_0x59dca0['validCount']+_0x68f2f4(0x1ce))),_0x59dca0[_0x68f2f4(0x1ca)]>0x0&&console['log'](a34_0x179f3f[_0x68f2f4(0x1c4)](_0x59dca0['warningCount']+_0x68f2f4(0x1d7))),0x0);}}
@@ -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_0xe75e98=a35_0x24ae;function a35_0x36b6(){const _0x366e6f=['\x5c$&','folderId','description','Folder\x20ID:\x20','124BmKJMq','/j/da',']\x20matching\x20\x27','folder','site','log','Set\x20a\x20parent\x20segment\x20context\x20first:','listUnifiedWithJourneys','sort','execute','46292wiveCd','✔\x20Built\x20tree\x20with\x20',',\x20and\x20','22NMKNLb','children','Use\x20tdx\x20ps\x20list\x20to\x20see\x20available\x20parent\x20segments.','journey','maxDepth','jsonl','localeCompare','Listing\x20folders,\x20segments,\x20and\x20journeys...','parentSegment','segment','json','parentId','1496928KlCmEY','Error:\x20No\x20parent\x20segment\x20context\x20set.','name','length','45dGftlA','\x20journey','135hjGLhg','\x27...','error','\x20folder','journeyBundleName','463815bCkgtY','\x20segment','filter','2340360BBmwdH','test','data','\x20\x20Cause:\x20','No\x20items\x20match\x20pattern:\x20','Recursive\x20mode:\x20enabled','dim','/app/ps/','listUnified','2038981VhmCCk','Folder/pattern\x20arg:\x20','(empty)','map','listRecursive','recursive','List\x20folders\x20and\x20child\x20segments','\x20\x20tdx\x20sg\x20use\x20\x22My\x20Audience\x22','(not\x20set)','\x20\x20tdx\x20sg\x20pull\x20\x22My\x20Audience\x22','resolvePathToResource','6pjiAOV','type','✔\x20Found\x20','cause','segments','includes','verbose','message','Error:\x20','Parent\x20segment\x20context:\x20','journeys','replace','Parent\x20ID:\x20','/e/','6119TPmlDl','format','Site:\x20','folders','106060ZHRHBa'];a35_0x36b6=function(){return _0x366e6f;};return a35_0x36b6();}(function(_0x37e3b8,_0x593319){const _0x3c21c4=a35_0x24ae,_0x7f8b5e=_0x37e3b8();while(!![]){try{const _0x4f3970=-parseInt(_0x3c21c4(0xe9))/0x1*(-parseInt(_0x3c21c4(0xf2))/0x2)+-parseInt(_0x3c21c4(0x10f))/0x3*(parseInt(_0x3c21c4(0xfc))/0x4)+parseInt(_0x3c21c4(0x116))/0x5+parseInt(_0x3c21c4(0xdb))/0x6*(-parseInt(_0x3c21c4(0x122))/0x7)+parseInt(_0x3c21c4(0x119))/0x8+-parseInt(_0x3c21c4(0x111))/0x9*(-parseInt(_0x3c21c4(0xed))/0xa)+parseInt(_0x3c21c4(0xff))/0xb*(-parseInt(_0x3c21c4(0x10b))/0xc);if(_0x4f3970===_0x593319)break;else _0x7f8b5e['push'](_0x7f8b5e['shift']());}catch(_0x1563a3){_0x7f8b5e['push'](_0x7f8b5e['shift']());}}}(a35_0x36b6,0x33202));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleSDKOutput}from'../core/command-output.js';import{withSpinner}from'../utils/spinner.js';import{formatFlatList,formatTree}from'../sdk/util/tree-formatter.js';import{getConsoleNextUrl}from'../sdk/client/endpoints.js';function a35_0x24ae(_0x4ac089,_0x358cb3){_0x4ac089=_0x4ac089-0xd6;const _0x36b664=a35_0x36b6();let _0x24ae39=_0x36b664[_0x4ac089];return _0x24ae39;}import a35_0x459b1b from'chalk';export class SegmentsCommand extends BaseCommand{['name']=a35_0xe75e98(0xdf);[a35_0xe75e98(0xf0)]=a35_0xe75e98(0xd6);async[a35_0xe75e98(0xfb)](_0x3e2a9c){const _0x3d7a91=a35_0xe75e98,{options:_0x19a18f,args:_0x231b06}=_0x3e2a9c,_0x129e67=_0x19a18f[_0x3d7a91(0x127)],_0x184b3c=_0x231b06[0x0];try{const _0x183cc6=_0x19a18f[_0x3d7a91(0x107)];_0x19a18f[_0x3d7a91(0xe1)]&&(console[_0x3d7a91(0x113)](_0x3d7a91(0xeb)+_0x19a18f[_0x3d7a91(0xf6)]),console[_0x3d7a91(0x113)](_0x3d7a91(0xe4)+(_0x183cc6||_0x3d7a91(0xd8))),_0x184b3c&&console['error'](_0x3d7a91(0x123)+_0x184b3c),_0x129e67&&console['error'](_0x3d7a91(0x11e)));if(!_0x183cc6)return console[_0x3d7a91(0x113)](_0x3d7a91(0x10c)),console[_0x3d7a91(0x113)](''),console[_0x3d7a91(0x113)](_0x3d7a91(0xf8)),console[_0x3d7a91(0x113)](_0x3d7a91(0xd9)),console[_0x3d7a91(0x113)](_0x3d7a91(0xd7)),console['error'](''),console['error'](_0x3d7a91(0x101)),0x1;const _0x10311a=_0x184b3c&&(_0x184b3c[_0x3d7a91(0xe0)]('*')||_0x184b3c[_0x3d7a91(0xe0)]('?'));if(_0x10311a)return await this['listWithPattern'](_0x3e2a9c,_0x183cc6,_0x184b3c);const _0x3654a4=_0x184b3c?_0x183cc6+'/'+_0x184b3c:_0x183cc6;return _0x129e67?await this['listRecursive'](_0x3e2a9c,_0x3654a4):await this['listUnified'](_0x3e2a9c,_0x3654a4);}catch(_0x314e4e){if(_0x314e4e instanceof SDKError)return console[_0x3d7a91(0x113)](_0x3d7a91(0xe3)+_0x314e4e[_0x3d7a91(0xe2)]),_0x314e4e['cause']&&console[_0x3d7a91(0x113)](_0x3d7a91(0x11c)+_0x314e4e[_0x3d7a91(0xde)]),0x1;throw _0x314e4e;}}async['listWithPattern'](_0x33e419,_0x29c1c2,_0x4d681a){const _0x308889=a35_0xe75e98,{options:_0x5ba767,tdx:_0xefa31f}=_0x33e419,_0x289305=await withSpinner('Resolving\x20parent\x20segment\x20\x27'+_0x29c1c2+_0x308889(0x112),()=>_0xefa31f['segment']['resolvePathToResource'](_0x29c1c2),{'verbose':_0x5ba767[_0x308889(0xe1)]}),_0x38ce2f=_0x289305['data'],_0x21b9c9=await withSpinner(_0x308889(0x106),()=>_0xefa31f[_0x308889(0x108)][_0x308889(0xf9)](_0x38ce2f[_0x308889(0x10a)],_0x38ce2f[_0x308889(0xef)]),{'verbose':_0x5ba767[_0x308889(0xe1)]}),{folders:_0x5360c9,segments:_0x2c36bc,journeys:_0x40c386}=_0x21b9c9['data'],_0xb326d3=_0x4d681a[_0x308889(0xe6)](/[.+^${}()|[\]\\]/g,_0x308889(0xee))[_0x308889(0xe6)](/\*/g,'.*')[_0x308889(0xe6)](/\?/g,'.'),_0x173170=new RegExp('^'+_0xb326d3+'$','i'),_0x539d2d=_0x5360c9['filter'](_0x1a3aef=>_0x173170['test'](_0x1a3aef[_0x308889(0x10d)])),_0x2c03fb=_0x2c36bc['filter'](_0x3243bc=>_0x173170[_0x308889(0x11a)](_0x3243bc[_0x308889(0x10d)])),_0x105a98=_0x40c386[_0x308889(0x118)](_0xe95c95=>_0x173170[_0x308889(0x11a)](_0xe95c95['journeyBundleName'])),_0x16a27f=_0x539d2d['length']+_0x2c03fb[_0x308889(0x10e)]+_0x105a98[_0x308889(0x10e)];console[_0x308889(0x113)](_0x308889(0xdd)+_0x539d2d['length']+'\x20folder'+(_0x539d2d['length']!==0x1?'s':'')+',\x20'+_0x2c03fb[_0x308889(0x10e)]+_0x308889(0x117)+(_0x2c03fb[_0x308889(0x10e)]!==0x1?'s':'')+',\x20and\x20'+_0x105a98['length']+'\x20journey'+(_0x105a98['length']!==0x1?'s':'')+'\x20matching\x20\x27'+_0x4d681a+'\x27');const _0x4b3eb8=_0x527a73=>{const _0x554b75=_0x308889;return getConsoleNextUrl(_0x5ba767['site'],_0x554b75(0x120)+_0x38ce2f[_0x554b75(0x10a)]+'/e/'+_0x527a73);},_0x48ab88=_0x5ba767['format']==='json'||_0x5ba767[_0x308889(0xea)]==='jsonl';if(_0x48ab88){const _0x28ef6d=[..._0x539d2d[_0x308889(0x125)](_0x514b92=>({..._0x514b92,'type':_0x308889(0xf5)})),..._0x2c03fb[_0x308889(0x125)](_0x4a08f6=>({..._0x4a08f6,'type':_0x308889(0x108),'url':_0x4b3eb8(_0x4a08f6['id'])})),..._0x105a98[_0x308889(0x125)](_0x295687=>({..._0x295687,'name':_0x295687[_0x308889(0x115)],'type':_0x308889(0x102)}))]['sort']((_0x1ab336,_0x4d6a40)=>_0x1ab336[_0x308889(0x10d)]['localeCompare'](_0x4d6a40[_0x308889(0x10d)]));await handleSDKOutput(_0x28ef6d,_0x5ba767);}else{if(_0x16a27f===0x0)console[_0x308889(0xf7)](_0x308889(0x11d)+_0x4d681a);else{console['log'](a35_0x459b1b[_0x308889(0x11f)]('['+_0x29c1c2+_0x308889(0xf4)+_0x4d681a+'\x27'));const _0x182e8a=formatFlatList(_0x539d2d,_0x2c03fb,{'showMetadata':!![],'getSegmentUrl':_0x4b3eb8},_0x105a98);console[_0x308889(0xf7)](_0x182e8a);}}return 0x0;}async[a35_0xe75e98(0x121)](_0x13faec,_0x53f9a9){const _0x2b1e56=a35_0xe75e98,{options:_0x54766a,tdx:_0x75b22b}=_0x13faec,_0x11b611=await withSpinner('Resolving\x20path\x20\x27'+_0x53f9a9+_0x2b1e56(0x112),()=>_0x75b22b[_0x2b1e56(0x108)]['resolvePathToResource'](_0x53f9a9),{'verbose':_0x54766a['verbose']}),_0x1e98f4=_0x11b611[_0x2b1e56(0x11b)];_0x54766a[_0x2b1e56(0xe1)]&&(console[_0x2b1e56(0x113)](_0x2b1e56(0xe7)+_0x1e98f4[_0x2b1e56(0x10a)]),_0x1e98f4[_0x2b1e56(0xef)]&&console[_0x2b1e56(0x113)](_0x2b1e56(0xf1)+_0x1e98f4[_0x2b1e56(0xef)]));const _0x541ab5=await withSpinner('Listing\x20folders,\x20segments,\x20and\x20journeys...',()=>_0x75b22b['segment'][_0x2b1e56(0xf9)](_0x1e98f4[_0x2b1e56(0x10a)],_0x1e98f4['folderId']),{'verbose':_0x54766a[_0x2b1e56(0xe1)]}),{folders:_0x1f110c,segments:_0x313277,journeys:_0x5ded63}=_0x541ab5['data'],_0x3b99ec=_0x1f110c[_0x2b1e56(0x10e)]+_0x313277[_0x2b1e56(0x10e)]+_0x5ded63['length'];console[_0x2b1e56(0x113)](_0x2b1e56(0xdd)+_0x1f110c['length']+_0x2b1e56(0x114)+(_0x1f110c[_0x2b1e56(0x10e)]!==0x1?'s':'')+',\x20'+_0x313277[_0x2b1e56(0x10e)]+'\x20segment'+(_0x313277[_0x2b1e56(0x10e)]!==0x1?'s':'')+_0x2b1e56(0xfe)+_0x5ded63[_0x2b1e56(0x10e)]+_0x2b1e56(0x110)+(_0x5ded63[_0x2b1e56(0x10e)]!==0x1?'s':''));const _0x17ade9=_0x41a2ea=>{const _0x5bb678=_0x2b1e56;return getConsoleNextUrl(_0x54766a[_0x5bb678(0xf6)],_0x5bb678(0x120)+_0x1e98f4[_0x5bb678(0x10a)]+'/e/'+_0x41a2ea);},_0x376e53=_0x44c070=>{const _0x4097b4=_0x2b1e56;return getConsoleNextUrl(_0x54766a['site'],_0x4097b4(0x120)+_0x1e98f4[_0x4097b4(0x10a)]+_0x4097b4(0xe8)+_0x44c070+_0x4097b4(0xf3));},_0x209a97=_0x54766a['format']==='json'||_0x54766a[_0x2b1e56(0xea)]==='jsonl';if(_0x209a97){const _0xe79d6=[..._0x1f110c['map'](_0x462be3=>({..._0x462be3,'type':_0x2b1e56(0xf5)})),..._0x313277['map'](_0xeffbba=>({..._0xeffbba,'type':_0x2b1e56(0x108),'url':_0x17ade9(_0xeffbba['id'])})),..._0x5ded63[_0x2b1e56(0x125)](_0x14449b=>({..._0x14449b,'name':_0x14449b[_0x2b1e56(0x115)],'type':'journey','url':_0x376e53(_0x14449b['id'])}))][_0x2b1e56(0xfa)]((_0x29776b,_0x20bdbf)=>_0x29776b[_0x2b1e56(0x10d)][_0x2b1e56(0x105)](_0x20bdbf['name']));await handleSDKOutput(_0xe79d6,_0x54766a);}else{if(_0x3b99ec===0x0)console['log'](a35_0x459b1b[_0x2b1e56(0x11f)]('['+_0x53f9a9+']')),console[_0x2b1e56(0xf7)](_0x2b1e56(0x124));else{console['log'](a35_0x459b1b[_0x2b1e56(0x11f)]('['+_0x53f9a9+']'));const _0x3eb567=formatFlatList(_0x1f110c,_0x313277,{'showMetadata':!![],'getSegmentUrl':_0x17ade9,'getJourneyUrl':_0x376e53},_0x5ded63);console[_0x2b1e56(0xf7)](_0x3eb567);}}return 0x0;}async[a35_0xe75e98(0x126)](_0x309cf2,_0x190f58){const _0x5488e6=a35_0xe75e98,{options:_0x272254,tdx:_0x1ba001}=_0x309cf2,_0x215a63=await withSpinner('Resolving\x20path\x20\x27'+_0x190f58+_0x5488e6(0x112),()=>_0x1ba001['segment'][_0x5488e6(0xda)](_0x190f58),{'verbose':_0x272254['verbose']}),_0x31f94f=_0x215a63['data'];_0x272254['verbose']&&(console[_0x5488e6(0x113)]('Parent\x20ID:\x20'+_0x31f94f['parentId']),_0x31f94f['folderId']&&console[_0x5488e6(0x113)](_0x5488e6(0xf1)+_0x31f94f['folderId']));const _0x2e0109=_0x272254[_0x5488e6(0x103)]||0xa,_0x1406d1=await withSpinner('Building\x20hierarchy\x20tree...',()=>_0x1ba001[_0x5488e6(0x108)][_0x5488e6(0x126)](_0x31f94f[_0x5488e6(0x10a)],_0x31f94f[_0x5488e6(0xef)],0x0,_0x2e0109),{'verbose':_0x272254[_0x5488e6(0xe1)]}),_0x4c2444=_0x1406d1[_0x5488e6(0x11b)],_0x13e630=_0x5b7e55=>{const _0x186a42=_0x5488e6;let _0xfc9074=0x0,_0x263fb5=0x0,_0x1b951e=0x0;for(const _0x545745 of _0x5b7e55){if(_0x545745[_0x186a42(0xdc)]==='folder')_0xfc9074++;else{if(_0x545745[_0x186a42(0xdc)]===_0x186a42(0x108))_0x263fb5++;else{if(_0x545745[_0x186a42(0xdc)]===_0x186a42(0x102))_0x1b951e++;}}if(_0x545745[_0x186a42(0x100)]){const _0x424995=_0x13e630(_0x545745[_0x186a42(0x100)]);_0xfc9074+=_0x424995[_0x186a42(0xec)],_0x263fb5+=_0x424995[_0x186a42(0xdf)],_0x1b951e+=_0x424995[_0x186a42(0xe5)];}}return{'folders':_0xfc9074,'segments':_0x263fb5,'journeys':_0x1b951e};},_0x2dc440=_0x13e630(_0x4c2444);console['error'](_0x5488e6(0xfd)+_0x2dc440[_0x5488e6(0xec)]+'\x20folder'+(_0x2dc440[_0x5488e6(0xec)]!==0x1?'s':'')+',\x20'+_0x2dc440[_0x5488e6(0xdf)]+_0x5488e6(0x117)+(_0x2dc440['segments']!==0x1?'s':'')+_0x5488e6(0xfe)+_0x2dc440[_0x5488e6(0xe5)]+_0x5488e6(0x110)+(_0x2dc440[_0x5488e6(0xe5)]!==0x1?'s':''));const _0x43ada0=_0x4a3a1b=>{const _0x2203b4=_0x5488e6;return getConsoleNextUrl(_0x272254[_0x2203b4(0xf6)],'/app/ps/'+_0x31f94f[_0x2203b4(0x10a)]+'/e/'+_0x4a3a1b);},_0xfb47a5=_0x85d414=>{const _0x44adef=_0x5488e6;return getConsoleNextUrl(_0x272254[_0x44adef(0xf6)],_0x44adef(0x120)+_0x31f94f[_0x44adef(0x10a)]+_0x44adef(0xe8)+_0x85d414+'/j/da');};if(_0x272254[_0x5488e6(0xea)]===_0x5488e6(0x109)||_0x272254[_0x5488e6(0xea)]===_0x5488e6(0x104))await handleSDKOutput(_0x4c2444,_0x272254);else{console[_0x5488e6(0xf7)](a35_0x459b1b[_0x5488e6(0x11f)]('['+_0x190f58+']'));const _0x149d1a=formatTree(_0x4c2444,{'showMetadata':!![],'getSegmentUrl':_0x43ada0,'getJourneyUrl':_0xfb47a5});console['log'](_0x149d1a);}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
+ function a36_0x324c(){const _0x346ffe=['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','8607144mOliaP','2CZAaHL','limit','6eWzDdp','2212167QICeTD','\x20\x20Cause:\x20','Database:\x20','\x20row','Table:\x20','3796ZtFKMo','33XkXDob','207086TCirNv','message','args','name','table','Usage:\x20tdx\x20show\x20<database.table>','validate','Catalog:\x20','error','execute','showTable','Querying\x20','130QiDPTH','cause','3994407UBBtzy','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','...','\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--database\x20<database>','Error:\x20','Show\x20table\x20contents','5619170yznBEY','verbose','database','6158208HEpyNi','length','data','description','Site:\x20','site','query','\x20\x20\x20or:\x20tdx\x20show\x20<catalog.database.table>'];a36_0x324c=function(){return _0x346ffe;};return a36_0x324c();}const a36_0x250d4f=a36_0x1968;(function(_0x7535b3,_0x2aec4e){const _0x1064de=a36_0x1968,_0x3abc88=_0x7535b3();while(!![]){try{const _0xc570bb=parseInt(_0x1064de(0xd1))/0x1*(parseInt(_0x1064de(0xdb))/0x2)+-parseInt(_0x1064de(0xd4))/0x3+parseInt(_0x1064de(0xd9))/0x4*(parseInt(_0x1064de(0xbc))/0x5)+-parseInt(_0x1064de(0xd3))/0x6*(-parseInt(_0x1064de(0xc7))/0x7)+-parseInt(_0x1064de(0xd0))/0x8+-parseInt(_0x1064de(0xbe))/0x9+parseInt(_0x1064de(0xc4))/0xa*(parseInt(_0x1064de(0xda))/0xb);if(_0xc570bb===_0x2aec4e)break;else _0x3abc88['push'](_0x3abc88['shift']());}catch(_0x73ee54){_0x3abc88['push'](_0x3abc88['shift']());}}}(a36_0x324c,0x83df6));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleSDKOutput}from'../core/command-output.js';import{parseTableReference,validateTableDescribeReference}from'../utils/table-ref-parser.js';import{withSpinner}from'../utils/spinner.js';function a36_0x1968(_0x801ed4,_0x3d5daa){_0x801ed4=_0x801ed4-0xb6;const _0x324cf1=a36_0x324c();let _0x196897=_0x324cf1[_0x801ed4];return _0x196897;}import{DEFAULT_DISPLAY_LIMIT,resolveLimit}from'../core/constants.js';export class ShowCommand extends BaseCommand{[a36_0x250d4f(0xde)]='show';[a36_0x250d4f(0xca)]=a36_0x250d4f(0xc3);async[a36_0x250d4f(0xb9)](_0x5c480d){const _0x9d2a17=a36_0x250d4f;return this[_0x9d2a17(0xba)](_0x5c480d);}async[a36_0x250d4f(0xba)](_0x585dfd){const _0xa1c51a=a36_0x250d4f,{options:_0x41fc4a,args:_0x4a9232,tdx:_0x5f7d7f}=_0x585dfd;let _0x5c1b46;try{_0x5c1b46=parseTableReference(_0x4a9232[0x0]);const _0x535aed=_0x41fc4a['database'];!_0x5c1b46[_0xa1c51a(0xc6)]&&_0x535aed&&(_0x5c1b46[_0xa1c51a(0xc6)]=_0x535aed);const _0x422803=validateTableDescribeReference(_0x5c1b46);if(_0x422803)return console[_0xa1c51a(0xb8)](_0xa1c51a(0xc2)+_0x422803),console[_0xa1c51a(0xb8)](_0xa1c51a(0xe0)),console[_0xa1c51a(0xb8)](_0xa1c51a(0xce)),console[_0xa1c51a(0xb8)](_0xa1c51a(0xc1)),0x1;}catch(_0x106004){return console['error'](_0xa1c51a(0xc2)+_0x106004[_0xa1c51a(0xdc)]),console[_0xa1c51a(0xb8)](_0xa1c51a(0xe0)),console[_0xa1c51a(0xb8)](_0xa1c51a(0xce)),console[_0xa1c51a(0xb8)](_0xa1c51a(0xc1)),0x1;}const _0x320666=_0x5c1b46['catalog'],_0x36ac0c=_0x5c1b46['database'],_0x370590=_0x5c1b46[_0xa1c51a(0xdf)],_0x26d133=resolveLimit(_0x41fc4a[_0xa1c51a(0xd2)],DEFAULT_DISPLAY_LIMIT);try{_0x41fc4a[_0xa1c51a(0xc5)]&&(console[_0xa1c51a(0xb8)](_0xa1c51a(0xcb)+_0x41fc4a[_0xa1c51a(0xcc)]),_0x320666&&console[_0xa1c51a(0xb8)](_0xa1c51a(0xb7)+_0x320666),console[_0xa1c51a(0xb8)](_0xa1c51a(0xd6)+_0x36ac0c),console[_0xa1c51a(0xb8)](_0xa1c51a(0xd8)+_0x370590),console[_0xa1c51a(0xb8)]('Limit:\x20'+_0x26d133));const _0x1bf2e2=_0x320666?_0x320666+'.'+_0x36ac0c+'.'+_0x370590:_0x36ac0c+'.'+_0x370590,_0x11faa0=await withSpinner(_0xa1c51a(0xbb)+_0x1bf2e2+_0xa1c51a(0xc0),()=>_0x5f7d7f[_0xa1c51a(0xcd)][_0xa1c51a(0xba)](_0x36ac0c,_0x370590,_0x26d133,_0x320666),{'verbose':_0x41fc4a[_0xa1c51a(0xc5)]}),_0x29cc0b=_0x11faa0[_0xa1c51a(0xc9)],_0x5e8293=_0x29cc0b[_0xa1c51a(0xc9)];return _0x5e8293[_0xa1c51a(0xc8)]===0x0?console[_0xa1c51a(0xb8)]('✔\x20Query\x20successful\x20-\x200\x20rows\x20returned'):console[_0xa1c51a(0xb8)]('✔\x20Retrieved\x20'+_0x5e8293[_0xa1c51a(0xc8)]+_0xa1c51a(0xd7)+(_0x5e8293['length']!==0x1?'s':'')+'\x20from\x20'+_0x1bf2e2),await handleSDKOutput(_0x5e8293,_0x41fc4a),0x0;}catch(_0x23b090){if(_0x23b090 instanceof SDKError)return console['error'](_0xa1c51a(0xc2)+_0x23b090[_0xa1c51a(0xdc)]),_0x23b090['cause']&&console[_0xa1c51a(0xb8)](_0xa1c51a(0xd5)+_0x23b090[_0xa1c51a(0xbd)]),0x1;throw _0x23b090;}}[a36_0x250d4f(0xb6)](_0x1678c8){const _0xc56f60=a36_0x250d4f;if(_0x1678c8[_0xc56f60(0xdd)]['length']===0x0)return _0xc56f60(0xcf);if(_0x1678c8['args'][_0xc56f60(0xc8)]>0x1)return _0xc56f60(0xbf);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_0x26ceb9=a37_0xb094;(function(_0x1ee404,_0x2d75b0){const _0x4325f7=a37_0xb094,_0x50a66e=_0x1ee404();while(!![]){try{const _0x29d95a=-parseInt(_0x4325f7(0x17b))/0x1+-parseInt(_0x4325f7(0x16a))/0x2+parseInt(_0x4325f7(0x17a))/0x3*(parseInt(_0x4325f7(0x16f))/0x4)+-parseInt(_0x4325f7(0x178))/0x5+parseInt(_0x4325f7(0x162))/0x6+-parseInt(_0x4325f7(0x174))/0x7+-parseInt(_0x4325f7(0x16d))/0x8*(-parseInt(_0x4325f7(0x187))/0x9);if(_0x29d95a===_0x2d75b0)break;else _0x50a66e['push'](_0x50a66e['shift']());}catch(_0x1514da){_0x50a66e['push'](_0x50a66e['shift']());}}}(a37_0x4dea,0xc810c));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_0x13ba3 from'chalk';function a37_0x4dea(){const _0x55c04f=['155416gXbPpI','CLI\x20flag','getUserInfo','dim','message','2204979UpTXAx','description','log','yellow','6768665bAKXQS','User:','27xmGOgh','531671xQUaeW','✗\x20Validation\x20failed:\x20','N/A','Account\x20ID:','filter','site:\x20','✓\x20Authentication\x20successful\x0a','profileSource','Show\x20authentication\x20status\x20and\x20current\x20context','env','account_id','error','28987587lEDdgE','displayWithSources','green','last_name','email','No\x20credential\x20found','\x20profile:\x20','tdx','status','4113426FfdhHl','profile','jobs','Name:','first_name','name','join','cyan','2472462uMmuPm','config','execute','8xChOYO','bold'];a37_0x4dea=function(){return _0x55c04f;};return a37_0x4dea();}function a37_0xb094(_0x567b5d,_0x4204e4){_0x567b5d=_0x567b5d-0x162;const _0x4deaff=a37_0x4dea();let _0xb094b7=_0x4deaff[_0x567b5d];return _0xb094b7;}export class StatusCommand extends BaseCommand{[a37_0x26ceb9(0x167)]=a37_0x26ceb9(0x18f);[a37_0x26ceb9(0x175)]=a37_0x26ceb9(0x183);async[a37_0x26ceb9(0x16c)](_0xef8114){const _0x4e7383=a37_0x26ceb9,{options:_0x3ad27b,tdx:_0x21c998}=_0xef8114,_0x975e6b=_0x3ad27b['site'],_0x19fca8=new GlobalContext(_0x3ad27b),_0x131d75=_0x19fca8[_0x4e7383(0x163)],_0x2656b7=_0x19fca8[_0x4e7383(0x182)],_0xd49324=_0x2656b7==='cli'?_0x4e7383(0x170):_0x2656b7==='session'?'session':_0x2656b7===_0x4e7383(0x184)?'TDX_PROFILE\x20env':_0x2656b7==='config'?_0x4e7383(0x16b):null,_0x57543f=_0x131d75?a37_0x13ba3['cyan'](_0x131d75):a37_0x13ba3[_0x4e7383(0x172)](_0x4e7383(0x17d)),_0x390835=_0xd49324?'\x20'+a37_0x13ba3['dim']('(from\x20'+_0xd49324+')'):'';console[_0x4e7383(0x176)](a37_0x13ba3[_0x4e7383(0x16e)](_0x4e7383(0x18e))+_0x4e7383(0x18d)+_0x57543f+_0x390835+'\x20'+a37_0x13ba3[_0x4e7383(0x172)]('(')+_0x4e7383(0x180)+a37_0x13ba3[_0x4e7383(0x169)](_0x975e6b)+a37_0x13ba3[_0x4e7383(0x172)](')'));const _0x58c373=await resolveAPIKeyAsync(_0x975e6b,_0x131d75);if(_0x58c373){const {source:_0x118e43,isDeprecated:_0x1e1807}=_0x58c373,_0x3d6352='Read\x20credential\x20from\x20'+a37_0x13ba3[_0x4e7383(0x169)](_0x118e43);console['log'](_0x1e1807?a37_0x13ba3[_0x4e7383(0x177)](_0x3d6352):_0x3d6352);}else console['log'](a37_0x13ba3[_0x4e7383(0x177)](_0x4e7383(0x18c)));let _0x2f4be9=![];try{const _0x3568ac=await _0x21c998[_0x4e7383(0x164)][_0x4e7383(0x171)]();console[_0x4e7383(0x176)](a37_0x13ba3[_0x4e7383(0x189)](_0x4e7383(0x181))),console[_0x4e7383(0x176)](a37_0x13ba3[_0x4e7383(0x16e)](_0x4e7383(0x179))+'\x20'+a37_0x13ba3[_0x4e7383(0x169)](_0x3568ac[_0x4e7383(0x18b)]));if(_0x3568ac[_0x4e7383(0x166)]||_0x3568ac['last_name']){const _0x281954=[_0x3568ac[_0x4e7383(0x166)],_0x3568ac[_0x4e7383(0x18a)]][_0x4e7383(0x17f)](Boolean)[_0x4e7383(0x168)]('\x20');console['log'](a37_0x13ba3[_0x4e7383(0x16e)](_0x4e7383(0x165))+'\x20'+_0x281954);}_0x3568ac[_0x4e7383(0x185)]&&console['log'](a37_0x13ba3[_0x4e7383(0x16e)](_0x4e7383(0x17e))+'\x20'+a37_0x13ba3[_0x4e7383(0x177)](_0x3568ac[_0x4e7383(0x185)])),_0x2f4be9=!![];}catch(_0x2cd83b){_0x2cd83b instanceof HTTPClientError&&_0x2cd83b[_0x4e7383(0x18f)]===0x191?printAuthError(_0x2cd83b,!![],_0x131d75):console[_0x4e7383(0x186)](a37_0x13ba3['red'](_0x4e7383(0x17c)+(_0x2cd83b instanceof Error?_0x2cd83b[_0x4e7383(0x173)]:String(_0x2cd83b))));}return console[_0x4e7383(0x176)](),_0x19fca8[_0x4e7383(0x188)](),_0x2f4be9?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_0x2beaca=a38_0x262e;(function(_0x4457f6,_0x335547){const _0x12e0aa=a38_0x262e,_0x594db6=_0x4457f6();while(!![]){try{const _0x555e9a=parseInt(_0x12e0aa(0xbb))/0x1*(-parseInt(_0x12e0aa(0xad))/0x2)+parseInt(_0x12e0aa(0xa3))/0x3*(-parseInt(_0x12e0aa(0xb9))/0x4)+parseInt(_0x12e0aa(0xa7))/0x5+-parseInt(_0x12e0aa(0xb2))/0x6+parseInt(_0x12e0aa(0xb7))/0x7+parseInt(_0x12e0aa(0xac))/0x8+parseInt(_0x12e0aa(0xc7))/0x9;if(_0x555e9a===_0x335547)break;else _0x594db6['push'](_0x594db6['shift']());}catch(_0x4637cb){_0x594db6['push'](_0x594db6['shift']());}}}(a38_0x4e39,0xcadee));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';function a38_0x262e(_0x5e4de8,_0x3fffc0){_0x5e4de8=_0x5e4de8-0x9d;const _0x4e39ab=a38_0x4e39();let _0x262e55=_0x4e39ab[_0x5e4de8];return _0x262e55;}import{DEFAULT_LISTING_LIMIT,resolveLimit}from'../core/constants.js';function a38_0x4e39(){const _0x581581=['238gBzRlk','\x20\x20Or:\x20\x20tdx\x20tables\x20--database\x20','error','\x20\x20tdx\x20tables\x20users\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20->\x20table\x20\x22users\x22\x20across\x20all\x20databases','List\x20tables\x20in\x20a\x20database','5647722wpPPSd','limit','Or\x20use\x20--in\x20flag:','verbose','\x20table','11578oErfcZ','\x20\x20tdx\x20tables\x20--in\x20mydb\x20\x20\x20\x20\x20\x20\x20->\x20all\x20tables\x20from\x20mydb','14572FXISru','length','7987SZphTU','Database\x20\x27','Database:\x20all','validate','✔\x20Found\x20','database','tables','\x20\x20Use:\x20tdx\x20tables\x20\x22','\x27\x20across\x20all\x20databases.','Error:\x20','Error:\x20Too\x20many\x20arguments.\x20Use\x20single\x20argument:','\x20\x20tdx\x20tables\x20\x22mydb.users\x22\x20\x20\x20\x20->\x20table\x20\x22users\x22\x20in\x20database\x20mydb','25485084XIwqUN','Database:\x20','\x20\x20Cause:\x20','Note:\x20\x27','name','message','Listing\x20tables...','cause','execute','includes','1047jutLVT','Error:\x20Pattern\x20\x27','table','\x20\x20Or:\x20\x20tdx\x20tables\x20--in\x20','2386230yCZMqR','\x27\x20may\x20not\x20exist\x20or\x20contains\x20no\x20tables','✖\x20No\x20tables\x20found','\x20\x20tdx\x20tables\x20\x22*.user*\x22\x20\x20\x20\x20\x20\x20\x20->\x20tables\x20matching\x20user*\x20across\x20databases','\x20\x20tdx\x20tables\x20\x22mydb.*\x22\x20\x20\x20\x20\x20\x20\x20\x20->\x20all\x20tables\x20from\x20mydb','5468232olTcQS'];a38_0x4e39=function(){return _0x581581;};return a38_0x4e39();}import{withSpinner}from'../utils/spinner.js';export class TablesCommand extends BaseCommand{[a38_0x2beaca(0x9d)]=a38_0x2beaca(0xc1);['description']=a38_0x2beaca(0xb1);async[a38_0x2beaca(0xa1)](_0x9f2185){const _0x1381f3=a38_0x2beaca,{options:_0x2b4bee,args:_0x44dc0e,tdx:_0x5c0055}=_0x9f2185;let _0x2ace9a;if(_0x44dc0e[_0x1381f3(0xba)]===0x0)_0x2ace9a={'database':undefined,'table':undefined,'original':''};else{if(_0x44dc0e[_0x1381f3(0xba)]===0x1)try{_0x2ace9a=parseTableReference(_0x44dc0e[0x0]);if(_0x2ace9a[_0x1381f3(0xa5)]&&!_0x2ace9a[_0x1381f3(0xc0)]&&!_0x2ace9a[_0x1381f3(0xa5)][_0x1381f3(0xa2)]('*')&&!_0x2ace9a[_0x1381f3(0xa5)]['includes']('?'))return console[_0x1381f3(0xaf)](_0x1381f3(0xa4)+_0x44dc0e[0x0]+'\x27\x20is\x20ambiguous.'),console[_0x1381f3(0xaf)]('Did\x20you\x20mean\x20to\x20list\x20all\x20tables\x20from\x20database\x20\x27'+_0x2ace9a[_0x1381f3(0xa5)]+'\x27?'),console[_0x1381f3(0xaf)](_0x1381f3(0xc2)+_0x2ace9a[_0x1381f3(0xa5)]+'.*\x22'),console[_0x1381f3(0xaf)](_0x1381f3(0xa6)+_0x2ace9a[_0x1381f3(0xa5)]),console[_0x1381f3(0xaf)](_0x1381f3(0xae)+_0x2ace9a['table']),console[_0x1381f3(0xaf)](''),console[_0x1381f3(0xaf)](_0x1381f3(0xca)+_0x44dc0e[0x0]+'\x27\x20without\x20wildcards\x20would\x20search\x20for\x20tables\x20named\x20\x27'+_0x2ace9a[_0x1381f3(0xa5)]+_0x1381f3(0xc3)),0x1;}catch(_0x5b6d06){return console[_0x1381f3(0xaf)](_0x1381f3(0xc4)+_0x5b6d06[_0x1381f3(0x9e)]),0x1;}else return console['error'](_0x1381f3(0xc5)),console[_0x1381f3(0xaf)](_0x1381f3(0xb0)),console[_0x1381f3(0xaf)](_0x1381f3(0xab)),console[_0x1381f3(0xaf)](_0x1381f3(0xc6)),console[_0x1381f3(0xaf)](_0x1381f3(0xaa)),console[_0x1381f3(0xaf)](_0x1381f3(0xb4)),console['error'](_0x1381f3(0xb8)),0x1;}const _0xaff621=_0x2b4bee[_0x1381f3(0xc0)];!_0x2ace9a[_0x1381f3(0xc0)]&&_0xaff621&&(_0x2ace9a[_0x1381f3(0xc0)]=_0xaff621);try{const _0x71e262=_0x409b01=>_0x409b01&&(_0x409b01[_0x1381f3(0xa2)]('*')||_0x409b01[_0x1381f3(0xa2)]('?')),_0x5d8122=_0x71e262(_0x2ace9a['database']);_0x2b4bee[_0x1381f3(0xb5)]&&(console[_0x1381f3(0xaf)]('Site:\x20'+_0x2b4bee['site']),_0x2ace9a['database']?_0x5d8122?console[_0x1381f3(0xaf)]('Database\x20pattern:\x20'+_0x2ace9a[_0x1381f3(0xc0)]):console[_0x1381f3(0xaf)](_0x1381f3(0xc8)+_0x2ace9a[_0x1381f3(0xc0)]):console['error'](_0x1381f3(0xbd)),_0x2ace9a[_0x1381f3(0xa5)]&&console['error']('Table\x20pattern:\x20'+_0x2ace9a[_0x1381f3(0xa5)]));const _0x31a277=_0x2ace9a['database']&&!_0x5d8122?_0x2ace9a['database']:undefined,_0x4d68df=_0x5d8122?_0x2ace9a[_0x1381f3(0xc0)]:undefined,_0x2f1049=_0x2ace9a[_0x1381f3(0xa5)],_0x112ba3=resolveLimit(_0x2b4bee[_0x1381f3(0xb3)],DEFAULT_LISTING_LIMIT),_0x463c9b=await withSpinner(_0x1381f3(0x9f),()=>_0x5c0055['query']['listTables'](_0x31a277,_0x2f1049,_0x4d68df,_0x112ba3),{'verbose':_0x2b4bee['verbose']}),_0x12b715=_0x463c9b['data'];if(_0x12b715['length']===0x0&&_0x2ace9a[_0x1381f3(0xc0)]&&!_0x5d8122)return console[_0x1381f3(0xaf)](_0x1381f3(0xa9)),console[_0x1381f3(0xaf)](_0x1381f3(0xbc)+_0x2ace9a[_0x1381f3(0xc0)]+_0x1381f3(0xa8)),0x1;return console[_0x1381f3(0xaf)](_0x1381f3(0xbf)+_0x12b715[_0x1381f3(0xba)]+_0x1381f3(0xb6)+(_0x12b715[_0x1381f3(0xba)]!==0x1?'s':'')),await handleSDKOutput(_0x12b715,{..._0x2b4bee,'limit':_0x112ba3}),0x0;}catch(_0x40a017){if(_0x40a017 instanceof SDKError)return console[_0x1381f3(0xaf)](_0x1381f3(0xc4)+_0x40a017[_0x1381f3(0x9e)]),_0x40a017[_0x1381f3(0xa0)]&&console[_0x1381f3(0xaf)](_0x1381f3(0xc9)+_0x40a017[_0x1381f3(0xa0)]),0x1;throw _0x40a017;}}[a38_0x2beaca(0xbe)](_0x29f90c){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
+ const a39_0x5f2113=a39_0x515e;(function(_0x1811f6,_0x3dbd1d){const _0x4efc25=a39_0x515e,_0xcadec9=_0x1811f6();while(!![]){try{const _0x31dd2d=parseInt(_0x4efc25(0x1f1))/0x1+-parseInt(_0x4efc25(0x1f8))/0x2+parseInt(_0x4efc25(0x20b))/0x3+-parseInt(_0x4efc25(0x1fb))/0x4+parseInt(_0x4efc25(0x1f3))/0x5+-parseInt(_0x4efc25(0x20c))/0x6*(-parseInt(_0x4efc25(0x20d))/0x7)+-parseInt(_0x4efc25(0x203))/0x8*(parseInt(_0x4efc25(0x206))/0x9);if(_0x31dd2d===_0x3dbd1d)break;else _0xcadec9['push'](_0xcadec9['shift']());}catch(_0x2b9c27){_0xcadec9['push'](_0xcadec9['shift']());}}}(a39_0x198e,0x2d17c));function a39_0x198e(){const _0x2f9195=['log','unset','description','181737mfJVCI','Default\x20site\x20','1338030RWNRTN','(session:\x20','default','Session\x20','profile','77984EGPXBB','Clear\x20session-level\x20or\x20default\x20context\x20values','Error:\x20','1038516sOciMG','dim','includes','Usage:\x20tdx\x20unset\x20<resource>\x0a','tdx.json','site','--default\x20can\x20only\x20be\x20used\x20with\x20\x27site\x27\x20or\x20\x27profile\x27.\x20Other\x20resources\x20are\x20session-level\x20only.','message','3088pgjNhE','parent_segment','join','3123PflCsY','Default\x20profile\x20','\x20\x20\x20\x20\x20\x20\x20tdx\x20unset\x20--default\x20<resource>\x20\x20#\x20Clear\x20default\x20from\x20config\x0a','session','engage_workspace','126708gOlWAH','156MPqfei','33838tqKBDL','\x0aResources:\x20site,\x20database,\x20parent_segment,\x20llm_project,\x20agent,\x20profile,\x20engage_workspace\x0a','cleared','database','length','validate','\x0aUpdated:\x20','Invalid\x20resource:\x20','green'];a39_0x198e=function(){return _0x2f9195;};return a39_0x198e();}import{BaseCommand}from'./command.js';import{getSessionID,cleanExpiredSessions,clearSessionContextField}from'../core/session.js';import{clearDefaultSiteFromUserConfig,clearActiveProfileFromUserConfig}from'../core/profile.js';function a39_0x515e(_0x4f50e8,_0x53c0b1){_0x4f50e8=_0x4f50e8-0x1ea;const _0x198e5c=a39_0x198e();let _0x515e0e=_0x198e5c[_0x4f50e8];return _0x515e0e;}import{getConfigDir}from'../core/config.js';import a39_0x244505 from'chalk';import*as a39_0x175987 from'node:path';export class UnsetCommand extends BaseCommand{['name']=a39_0x5f2113(0x1ef);[a39_0x5f2113(0x1f0)]=a39_0x5f2113(0x1f9);[a39_0x5f2113(0x1ea)](_0xf4c342){const _0x2f764f=a39_0x5f2113,{args:_0x34c78c,options:_0x2d219f}=_0xf4c342,_0x116757=_0x2d219f[_0x2f764f(0x1f5)];if(_0x34c78c[_0x2f764f(0x211)]===0x0)return _0x2f764f(0x1fe)+_0x2f764f(0x208)+_0x2f764f(0x20e)+'\x0aRun\x20\x27tdx\x20unset\x20--help\x27\x20for\x20more\x20options';const _0xcf2fa1=_0x34c78c[0x0],_0x14ab03=[_0x2f764f(0x200),_0x2f764f(0x210),_0x2f764f(0x204),'llm_project','agent',_0x2f764f(0x1f7),_0x2f764f(0x20a)];if(!_0x14ab03[_0x2f764f(0x1fd)](_0xcf2fa1))return _0x2f764f(0x1ec)+_0xcf2fa1+'.\x20Must\x20be\x20one\x20of:\x20'+_0x14ab03[_0x2f764f(0x205)](',\x20');if(_0x116757&&_0xcf2fa1!==_0x2f764f(0x200)&&_0xcf2fa1!=='profile')return _0x2f764f(0x201);return undefined;}async['execute'](_0x269245){const _0x423d66=a39_0x5f2113,{args:_0x5a7ba9,options:_0x5c3b8f}=_0x269245,_0x318e6a=_0x5c3b8f[_0x423d66(0x1f5)];cleanExpiredSessions();try{const _0x25b552=_0x5a7ba9[0x0],_0x312cd3=a39_0x175987[_0x423d66(0x205)](getConfigDir(),_0x423d66(0x1ff));if(_0x318e6a){if(_0x25b552===_0x423d66(0x200))return clearDefaultSiteFromUserConfig(),console[_0x423d66(0x1ee)](_0x423d66(0x1f2)+a39_0x244505[_0x423d66(0x1ed)](_0x423d66(0x20f))),console['log'](a39_0x244505[_0x423d66(0x1fc)](_0x423d66(0x1eb)+_0x312cd3)),0x0;if(_0x25b552===_0x423d66(0x1f7))return clearActiveProfileFromUserConfig(),console['log'](_0x423d66(0x207)+a39_0x244505[_0x423d66(0x1ed)](_0x423d66(0x20f))),console[_0x423d66(0x1ee)](a39_0x244505[_0x423d66(0x1fc)]('\x0aUpdated:\x20'+_0x312cd3)),0x0;}const _0x5edad0=getSessionID(_0x5c3b8f['session']),_0x5a024a={'site':_0x423d66(0x200),'database':_0x423d66(0x210),'parent_segment':'parent_segment','llm_project':'llm_project','agent':'llm_agent','profile':_0x423d66(0x1f7),'engage_workspace':'engage_workspace'},_0x191c8b=_0x5a024a[_0x25b552];return _0x191c8b&&(clearSessionContextField(_0x191c8b,_0x5c3b8f[_0x423d66(0x209)]),console[_0x423d66(0x1ee)](_0x423d66(0x1f6)+_0x25b552+'\x20'+a39_0x244505[_0x423d66(0x1ed)](_0x423d66(0x20f))+'\x20'+a39_0x244505[_0x423d66(0x1fc)](_0x423d66(0x1f4)+_0x5edad0+')'))),0x0;}catch(_0x1a3aa7){return _0x1a3aa7 instanceof Error&&console['error'](_0x423d66(0x1fa)+_0x1a3aa7[_0x423d66(0x202)]),0x1;}}}
@@ -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_0x1a496c=a40_0x536d;function a40_0x2c38(){const _0x3979de=['\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20--clear\x20\x20\x20\x20\x20\x20#\x20Clear\x20session\x20context\x0a','length','validate','tdx.json','201796joiXjZ','dim','green','session','Session\x20profile\x20set\x20to:\x20','llm_project','includes','default','--default\x20can\x20only\x20be\x20used\x20with\x20\x27site\x27\x20or\x20\x27profile\x27.\x20Other\x20resources\x20are\x20session-level\x20only.','database','message','Session\x20agent\x20set\x20to:\x20','cleared','display','(session:\x20','error','agent','\x0aSet\x20context:\x20tdx\x20use\x20<resource>\x20<value>','\x0aTip:\x20Use\x20\x27tdx\x20use\x20--default\x20site\x20','\x27\x20to\x20save\x20permanently','site','103bfOdzW','\x0aTip:\x20Use\x20\x27tdx\x20use\x20--default\x20profile\x20','Default\x20site\x20set\x20to:\x20','profile','llm_agent','name','6254430pjUUoE','parent_segment','\x0aUse\x20\x27tdx\x20profiles\x27\x20to\x20see\x20available\x20profiles','Invalid\x20resource:\x20','Session\x20parent_segment\x20set\x20to:\x20','.\x20Must\x20be\x20one\x20of:\x20','log','\x0aRun\x20\x27tdx\x20use\x20--help\x27\x20for\x20more\x20options','execute','Session\x20database\x20set\x20to:\x20','\x27\x20does\x20not\x20exist','Error:\x20Profile\x20\x27','join','5589960AvKtxv','debug','49TwOshe','\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20--default\x20profile\x20<value>\x20\x20#\x20Save\x20default\x20profile\x20to\x20config\x0a','40084nZKLXI','Usage:\x20tdx\x20use\x20<resource>\x20<value>\x0a','\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','27HXigQz','10812Amoras','33ECvJow','2764504MLeXvu','\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20--default\x20site\x20<value>\x20\x20\x20\x20\x20#\x20Save\x20default\x20site\x20to\x20config\x0a','\x0aTip:\x20Use\x20\x27tdx\x20use\x20--clear\x27\x20to\x20clear\x20session\x20overrides','displayWithSources','Session\x20llm_project\x20set\x20to:\x20','Resources:\x20site,\x20database,\x20parent_segment,\x20llm_project,\x20agent,\x20profile,\x20engage_workspace','use','14758vwkade','236676xneRKz','engage_workspace','Default\x20profile\x20set\x20to:\x20','Session\x20context\x20'];a40_0x2c38=function(){return _0x3979de;};return a40_0x2c38();}(function(_0x4cf457,_0x34ed3d){const _0x3a1e7a=a40_0x536d,_0x3654be=_0x4cf457();while(!![]){try{const _0x32478e=-parseInt(_0x3a1e7a(0xff))/0x1*(parseInt(_0x3a1e7a(0xe1))/0x2)+-parseInt(_0x3a1e7a(0xd9))/0x3*(parseInt(_0x3a1e7a(0xea))/0x4)+-parseInt(_0x3a1e7a(0x112))/0x5+parseInt(_0x3a1e7a(0xe2))/0x6*(parseInt(_0x3a1e7a(0xd2))/0x7)+-parseInt(_0x3a1e7a(0xda))/0x8*(parseInt(_0x3a1e7a(0xd7))/0x9)+parseInt(_0x3a1e7a(0x105))/0xa+parseInt(_0x3a1e7a(0xd4))/0xb*(parseInt(_0x3a1e7a(0xd8))/0xc);if(_0x32478e===_0x34ed3d)break;else _0x3654be['push'](_0x3654be['shift']());}catch(_0x5d72c4){_0x3654be['push'](_0x3654be['shift']());}}}(a40_0x2c38,0xae990));import{BaseCommand}from'./command.js';import{saveSessionContext,getSessionID,cleanExpiredSessions,clearSessionContext}from'../core/session.js';import{profileExists,saveActiveProfileToUserConfig,saveDefaultSiteToUserConfig}from'../core/profile.js';import{GlobalContext}from'../core/global-context.js';import{parseAgentRef}from'../sdk/agent/agent-ref-parser.js';import{getConfigDir}from'../core/config.js';import a40_0x6ecd0a from'chalk';import*as a40_0xce11d7 from'node:path';function a40_0x536d(_0x447480,_0x36cd8f){_0x447480=_0x447480-0xd1;const _0x2c38a6=a40_0x2c38();let _0x536d3a=_0x2c38a6[_0x447480];return _0x536d3a;}export class UseCommand extends BaseCommand{[a40_0x1a496c(0x104)]=a40_0x1a496c(0xe0);['description']='Set\x20session-level\x20context';[a40_0x1a496c(0xe8)](_0x546a4f){const _0xb8f69a=a40_0x1a496c,{args:_0x310732,options:_0x1a8fe8}=_0x546a4f,_0x46fa1a=_0x1a8fe8[_0xb8f69a(0xf1)];if(_0x310732[_0xb8f69a(0xe7)]===0x0)return undefined;if(_0x310732[_0xb8f69a(0xe7)]===0x1)return _0xb8f69a(0xd5)+_0xb8f69a(0xd6)+_0xb8f69a(0xe6)+_0xb8f69a(0xdb)+_0xb8f69a(0xd3)+'\x0aResources:\x20site,\x20database,\x20parent_segment,\x20llm_project,\x20agent,\x20profile,\x20engage_workspace\x0a'+_0xb8f69a(0x10c);const _0x31316c=_0x310732[0x0],_0x267fcb=[_0xb8f69a(0xfe),'database',_0xb8f69a(0x106),'llm_project',_0xb8f69a(0xfa),_0xb8f69a(0x102),'engage_workspace'];if(!_0x267fcb[_0xb8f69a(0xf0)](_0x31316c))return _0xb8f69a(0x108)+_0x31316c+_0xb8f69a(0x10a)+_0x267fcb[_0xb8f69a(0x111)](',\x20');if(_0x46fa1a&&_0x31316c!=='site'&&_0x31316c!=='profile')return _0xb8f69a(0xf2);return undefined;}async[a40_0x1a496c(0x10d)](_0x247610){const _0xa9dfc9=a40_0x1a496c,{args:_0x34608c,options:_0xc5ddd1}=_0x247610,_0x49890e=_0xc5ddd1[_0xa9dfc9(0xd1)],_0x4022a0=_0xc5ddd1['clear'],_0x4c4fda=_0xc5ddd1[_0xa9dfc9(0xf1)];cleanExpiredSessions();try{if(_0x4022a0){clearSessionContext(_0xc5ddd1[_0xa9dfc9(0xed)]);const _0x49c9c9=getSessionID(_0xc5ddd1[_0xa9dfc9(0xed)]);return console[_0xa9dfc9(0x10b)](_0xa9dfc9(0xe5)+a40_0x6ecd0a[_0xa9dfc9(0xec)](_0xa9dfc9(0xf6))+'\x20'+a40_0x6ecd0a[_0xa9dfc9(0xeb)]('(session:\x20'+_0x49c9c9+')')),0x0;}if(_0x34608c[_0xa9dfc9(0xe7)]===0x0){const _0x1ec1bb=new GlobalContext(_0xc5ddd1);return _0x49890e?_0x1ec1bb[_0xa9dfc9(0xdd)]():_0x1ec1bb[_0xa9dfc9(0xf7)](),console[_0xa9dfc9(0x10b)](a40_0x6ecd0a['dim'](_0xa9dfc9(0xfb))),console[_0xa9dfc9(0x10b)](a40_0x6ecd0a[_0xa9dfc9(0xeb)](_0xa9dfc9(0xdf))),console['log'](a40_0x6ecd0a['dim']('Use\x20--default\x20with\x20site\x20or\x20profile\x20to\x20save\x20permanently')),0x0;}const _0x354d54=_0x34608c[0x0],_0x12c62a=_0x34608c[0x1],_0x1a0350=a40_0xce11d7[_0xa9dfc9(0x111)](getConfigDir(),_0xa9dfc9(0xe9));if(_0x4c4fda){if(_0x354d54===_0xa9dfc9(0xfe))return saveDefaultSiteToUserConfig(_0x12c62a),console[_0xa9dfc9(0x10b)](_0xa9dfc9(0x101)+a40_0x6ecd0a[_0xa9dfc9(0xec)](_0x12c62a)),console['log'](a40_0x6ecd0a[_0xa9dfc9(0xeb)]('\x0aSaved\x20to:\x20'+_0x1a0350)),0x0;if(_0x354d54===_0xa9dfc9(0x102)){if(!profileExists(_0x12c62a))return console[_0xa9dfc9(0xf9)](_0xa9dfc9(0x110)+_0x12c62a+_0xa9dfc9(0x10f)),console[_0xa9dfc9(0xf9)](_0xa9dfc9(0x107)),0x1;return saveActiveProfileToUserConfig(_0x12c62a),console[_0xa9dfc9(0x10b)](_0xa9dfc9(0xe4)+a40_0x6ecd0a[_0xa9dfc9(0xec)](_0x12c62a)),console[_0xa9dfc9(0x10b)](a40_0x6ecd0a[_0xa9dfc9(0xeb)]('\x0aSaved\x20to:\x20'+_0x1a0350)),0x0;}}if(_0x354d54==='site'){const _0x3f04f1=getSessionID(_0xc5ddd1[_0xa9dfc9(0xed)]);return saveSessionContext({'site':_0x12c62a},_0xc5ddd1[_0xa9dfc9(0xed)]),console[_0xa9dfc9(0x10b)]('Session\x20site\x20set\x20to:\x20'+a40_0x6ecd0a['green'](_0x12c62a)+'\x20'+a40_0x6ecd0a['dim'](_0xa9dfc9(0xf8)+_0x3f04f1+')')),console['log'](a40_0x6ecd0a[_0xa9dfc9(0xeb)](_0xa9dfc9(0xfc)+_0x12c62a+_0xa9dfc9(0xfd))),0x0;}if(_0x354d54===_0xa9dfc9(0x102)){if(!profileExists(_0x12c62a))return console[_0xa9dfc9(0xf9)]('Error:\x20Profile\x20\x27'+_0x12c62a+_0xa9dfc9(0x10f)),console['error'](_0xa9dfc9(0x107)),0x1;const _0x1e9bf9=getSessionID(_0xc5ddd1[_0xa9dfc9(0xed)]);return saveSessionContext({'profile':_0x12c62a},_0xc5ddd1[_0xa9dfc9(0xed)]),console[_0xa9dfc9(0x10b)](_0xa9dfc9(0xee)+a40_0x6ecd0a['green'](_0x12c62a)+'\x20'+a40_0x6ecd0a[_0xa9dfc9(0xeb)](_0xa9dfc9(0xf8)+_0x1e9bf9+')')),console['log'](a40_0x6ecd0a[_0xa9dfc9(0xeb)](_0xa9dfc9(0x100)+_0x12c62a+_0xa9dfc9(0xfd))),0x0;}const _0x1d4c17={},_0x31b9b=getSessionID(_0xc5ddd1[_0xa9dfc9(0xed)]);switch(_0x354d54){case'database':_0x1d4c17[_0xa9dfc9(0xf3)]=_0x12c62a,console[_0xa9dfc9(0x10b)](_0xa9dfc9(0x10e)+a40_0x6ecd0a[_0xa9dfc9(0xec)](_0x12c62a)+'\x20'+a40_0x6ecd0a[_0xa9dfc9(0xeb)](_0xa9dfc9(0xf8)+_0x31b9b+')'));break;case'parent_segment':_0x1d4c17[_0xa9dfc9(0x106)]=_0x12c62a,console['log'](_0xa9dfc9(0x109)+a40_0x6ecd0a[_0xa9dfc9(0xec)](_0x12c62a)+'\x20'+a40_0x6ecd0a[_0xa9dfc9(0xeb)](_0xa9dfc9(0xf8)+_0x31b9b+')'));break;case _0xa9dfc9(0xef):_0x1d4c17[_0xa9dfc9(0xef)]=_0x12c62a,console[_0xa9dfc9(0x10b)](_0xa9dfc9(0xde)+a40_0x6ecd0a[_0xa9dfc9(0xec)](_0x12c62a)+'\x20'+a40_0x6ecd0a[_0xa9dfc9(0xeb)](_0xa9dfc9(0xf8)+_0x31b9b+')'));break;case'agent':{const {projectName:_0x134b52,agentName:_0x2aa80e}=parseAgentRef(_0x12c62a);_0x2aa80e?(_0x1d4c17['llm_project']=_0x134b52,_0x1d4c17[_0xa9dfc9(0x103)]=_0x2aa80e,console[_0xa9dfc9(0x10b)]('Session\x20llm_project\x20set\x20to:\x20'+a40_0x6ecd0a['green'](_0x134b52)+'\x20'+a40_0x6ecd0a['dim'](_0xa9dfc9(0xf8)+_0x31b9b+')')),console[_0xa9dfc9(0x10b)](_0xa9dfc9(0xf5)+a40_0x6ecd0a[_0xa9dfc9(0xec)](_0x2aa80e)+'\x20'+a40_0x6ecd0a[_0xa9dfc9(0xeb)](_0xa9dfc9(0xf8)+_0x31b9b+')'))):(_0x1d4c17[_0xa9dfc9(0x103)]=_0x12c62a,console[_0xa9dfc9(0x10b)]('Session\x20agent\x20set\x20to:\x20'+a40_0x6ecd0a[_0xa9dfc9(0xec)](_0x12c62a)+'\x20'+a40_0x6ecd0a['dim']('(session:\x20'+_0x31b9b+')')));break;}case _0xa9dfc9(0xe3):_0x1d4c17['engage_workspace']=_0x12c62a,console[_0xa9dfc9(0x10b)]('Session\x20engage_workspace\x20set\x20to:\x20'+a40_0x6ecd0a[_0xa9dfc9(0xec)](_0x12c62a)+'\x20'+a40_0x6ecd0a[_0xa9dfc9(0xeb)](_0xa9dfc9(0xf8)+_0x31b9b+')'));break;}return saveSessionContext(_0x1d4c17,_0xc5ddd1['session']),console[_0xa9dfc9(0x10b)](a40_0x6ecd0a[_0xa9dfc9(0xeb)](_0xa9dfc9(0xdc))),0x0;}catch(_0x5800c1){return _0x5800c1 instanceof Error&&console['error']('Error:\x20'+_0x5800c1[_0xa9dfc9(0xf4)]),0x1;}}}
@@ -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_0x38bb76=a41_0x1a23;(function(_0x154e02,_0x5cb651){const _0x12594b=a41_0x1a23,_0x3c46d5=_0x154e02();while(!![]){try{const _0x3eaa6b=parseInt(_0x12594b(0x10b))/0x1+parseInt(_0x12594b(0x115))/0x2+-parseInt(_0x12594b(0x107))/0x3+-parseInt(_0x12594b(0x102))/0x4+parseInt(_0x12594b(0x111))/0x5*(parseInt(_0x12594b(0x112))/0x6)+-parseInt(_0x12594b(0x117))/0x7*(-parseInt(_0x12594b(0x11b))/0x8)+-parseInt(_0x12594b(0x10e))/0x9*(parseInt(_0x12594b(0x114))/0xa);if(_0x3eaa6b===_0x5cb651)break;else _0x3c46d5['push'](_0x3c46d5['shift']());}catch(_0x344124){_0x3c46d5['push'](_0x3c46d5['shift']());}}}(a41_0x2774,0x53c83));function a41_0x1a23(_0xc34e84,_0x22633b){_0xc34e84=_0xc34e84-0x101;const _0x2774b4=a41_0x2774();let _0x1a2346=_0x2774b4[_0xc34e84];return _0x1a2346;}import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleSDKOutput,handleSingleObjectOutput}from'../core/command-output.js';function a41_0x2774(){const _0x1ed620=['data','8KRxFhT','\x20\x20Cause:\x20','getCurrent','1008344TVtytF','user','execute','Fetching\x20user\x20info...','✔\x20Found\x20','1730487eosmYn','Error:\x20','user\x20list','length','380777GuLCTb','cause','name','4332897AtkkGP','message','verbose','23400QDOoRN','354kJBBdV','description','10otsylk','816648znegGZ','error','4118086VKVboH','list','Listing\x20users...'];a41_0x2774=function(){return _0x1ed620;};return a41_0x2774();}import{withSpinner}from'../utils/spinner.js';export class UserCommand extends BaseCommand{[a41_0x38bb76(0x10d)]=a41_0x38bb76(0x103);[a41_0x38bb76(0x113)]='Show\x20current\x20user\x20information';async[a41_0x38bb76(0x104)](_0xd22eeb){const _0x3c403b=a41_0x38bb76,{options:_0x5315da,tdx:_0x4e5bd9}=_0xd22eeb;try{const _0x1fd96b=await withSpinner(_0x3c403b(0x105),()=>_0x4e5bd9[_0x3c403b(0x103)][_0x3c403b(0x101)](),{'verbose':_0x5315da[_0x3c403b(0x110)]}),_0x5c66bb=_0x1fd96b[_0x3c403b(0x11a)];return await handleSingleObjectOutput(_0x5c66bb,_0x5315da),0x0;}catch(_0x263fff){if(_0x263fff instanceof SDKError)return console[_0x3c403b(0x116)](_0x3c403b(0x108)+_0x263fff['message']),_0x263fff[_0x3c403b(0x10c)]&&console[_0x3c403b(0x116)]('\x20\x20Cause:\x20'+_0x263fff[_0x3c403b(0x10c)]),0x1;throw _0x263fff;}}}export class UserListCommand extends BaseCommand{[a41_0x38bb76(0x10d)]=a41_0x38bb76(0x109);[a41_0x38bb76(0x113)]='List\x20all\x20users\x20in\x20the\x20account';async['execute'](_0x4cf9f2){const _0x1176a4=a41_0x38bb76,{options:_0x13cbb3,tdx:_0x2ecd55}=_0x4cf9f2;try{const _0x57e74f=await withSpinner(_0x1176a4(0x119),()=>_0x2ecd55[_0x1176a4(0x103)][_0x1176a4(0x118)](),{'verbose':_0x13cbb3[_0x1176a4(0x110)]}),_0x5c9503=_0x57e74f[_0x1176a4(0x11a)];return console[_0x1176a4(0x116)](_0x1176a4(0x106)+_0x5c9503[_0x1176a4(0x10a)]+'\x20user'+(_0x5c9503['length']!==0x1?'s':'')),await handleSDKOutput(_0x5c9503,_0x13cbb3),0x0;}catch(_0xca27c3){if(_0xca27c3 instanceof SDKError)return console[_0x1176a4(0x116)](_0x1176a4(0x108)+_0xca27c3[_0x1176a4(0x10f)]),_0xca27c3['cause']&&console[_0x1176a4(0x116)](_0x1176a4(0x11c)+_0xca27c3['cause']),0x1;throw _0xca27c3;}}}