@treasuredata/tdx 0.28.1 → 0.28.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (181) hide show
  1. package/dist/bin.js +1 -1
  2. package/dist/build-info.json +3 -3
  3. package/dist/cli-categories.js +1 -1
  4. package/dist/cli.js +1 -1
  5. package/dist/commands/activations.js +1 -1
  6. package/dist/commands/agent-command.js +1 -1
  7. package/dist/commands/agent-test-command.js +1 -1
  8. package/dist/commands/api-command.js +1 -1
  9. package/dist/commands/auth-command.js +1 -1
  10. package/dist/commands/chat-command.js +1 -1
  11. package/dist/commands/claude-command.js +1 -1
  12. package/dist/commands/claude-statusline-command.js +1 -1
  13. package/dist/commands/claude-usage-command.js +1 -1
  14. package/dist/commands/command.js +1 -1
  15. package/dist/commands/connection-command.js +1 -1
  16. package/dist/commands/databases.js +1 -1
  17. package/dist/commands/delivery-command.js +1 -1
  18. package/dist/commands/describe.js +1 -1
  19. package/dist/commands/engage-campaign-pull-command.js +1 -1
  20. package/dist/commands/engage-campaign-push-command.js +1 -1
  21. package/dist/commands/engage-campaign-validate-command.js +1 -1
  22. package/dist/commands/engage-command.js +1 -1
  23. package/dist/commands/job-command.js +1 -1
  24. package/dist/commands/journey-command.js +1 -1
  25. package/dist/commands/journey-validate-command.js +1 -1
  26. package/dist/commands/llm-command.js +1 -1
  27. package/dist/commands/mcp-command.js +1 -1
  28. package/dist/commands/parent-segment-command.js +1 -1
  29. package/dist/commands/profile-command.js +1 -1
  30. package/dist/commands/profiles-command.js +1 -1
  31. package/dist/commands/query-command.js +1 -1
  32. package/dist/commands/schedule-command.js +1 -1
  33. package/dist/commands/segment-command.js +1 -1
  34. package/dist/commands/segment-create-command.js +1 -1
  35. package/dist/commands/segment-fields-command.js +1 -1
  36. package/dist/commands/segment-pull-command.js +1 -1
  37. package/dist/commands/segment-push-command.js +1 -1
  38. package/dist/commands/segment-update-command.js +1 -1
  39. package/dist/commands/segment-use-command.js +1 -1
  40. package/dist/commands/segment-validate-command.js +1 -1
  41. package/dist/commands/segments.js +1 -1
  42. package/dist/commands/show.js +1 -1
  43. package/dist/commands/status-command.js +1 -1
  44. package/dist/commands/tables.js +1 -1
  45. package/dist/commands/unset-command.js +1 -1
  46. package/dist/commands/use-command.js +1 -1
  47. package/dist/commands/user-command.js +1 -1
  48. package/dist/commands/workflow-command.js +1 -1
  49. package/dist/core/auth.js +1 -1
  50. package/dist/core/command-output.js +1 -1
  51. package/dist/core/config.js +1 -1
  52. package/dist/core/connection-cache.js +1 -1
  53. package/dist/core/constants.js +1 -1
  54. package/dist/core/credential-cache.js +1 -1
  55. package/dist/core/global-context.js +1 -1
  56. package/dist/core/keychain.js +1 -1
  57. package/dist/core/profile.js +1 -1
  58. package/dist/core/project-config.js +1 -1
  59. package/dist/core/session.js +1 -1
  60. package/dist/core/user-cache.js +1 -1
  61. package/dist/core/version.js +1 -1
  62. package/dist/index.js +1 -1
  63. package/dist/mcp/server.js +1 -1
  64. package/dist/mcp/tools/index.js +1 -1
  65. package/dist/mcp/tools/tdx-run.js +1 -1
  66. package/dist/mcp/tools/tdx-search.js +1 -1
  67. package/dist/mcp/utils.js +1 -1
  68. package/dist/proxy/claude-usage-tracker.js +1 -1
  69. package/dist/proxy/passthrough-server.js +1 -1
  70. package/dist/proxy/sse-usage-parser.js +1 -1
  71. package/dist/sdk/agent/agent-config.js +1 -1
  72. package/dist/sdk/agent/agent-ref-parser.js +1 -1
  73. package/dist/sdk/agent/agent-yaml.js +1 -1
  74. package/dist/sdk/agent/test/evaluator.js +1 -1
  75. package/dist/sdk/agent/test/executor.js +1 -1
  76. package/dist/sdk/agent/test/index.js +1 -1
  77. package/dist/sdk/agent/test/output.js +1 -1
  78. package/dist/sdk/agent/test/parser.js +1 -1
  79. package/dist/sdk/agent/tool-target-registry.js +1 -1
  80. package/dist/sdk/api.js +1 -1
  81. package/dist/sdk/client/cdp-api-client.js +1 -1
  82. package/dist/sdk/client/delivery-api-client.js +1 -1
  83. package/dist/sdk/client/endpoints.js +1 -1
  84. package/dist/sdk/client/engage-api-client.js +1 -1
  85. package/dist/sdk/client/http-client.js +1 -1
  86. package/dist/sdk/client/llm-api-client.js +1 -1
  87. package/dist/sdk/client/rate-limiter.js +1 -1
  88. package/dist/sdk/client/td-api-client.js +1 -1
  89. package/dist/sdk/client/trino-api-client.js +1 -1
  90. package/dist/sdk/client/workflow-client.js +1 -1
  91. package/dist/sdk/connection-validator.js +1 -1
  92. package/dist/sdk/connection.js +1 -1
  93. package/dist/sdk/delivery.js +1 -1
  94. package/dist/sdk/engage/campaign-pull.js +1 -1
  95. package/dist/sdk/engage/campaign-push.js +1 -1
  96. package/dist/sdk/engage/campaign-validator.js +1 -1
  97. package/dist/sdk/engage/campaign-yaml.js +1 -1
  98. package/dist/sdk/engage/types/campaign-def.js +1 -1
  99. package/dist/sdk/engage/types/campaign-schema.js +1 -1
  100. package/dist/sdk/engage.js +1 -1
  101. package/dist/sdk/errors.js +1 -1
  102. package/dist/sdk/index.js +1 -1
  103. package/dist/sdk/io/index.js +1 -1
  104. package/dist/sdk/io/node-filesystem.js +1 -1
  105. package/dist/sdk/job.js +1 -1
  106. package/dist/sdk/journey.js +1 -1
  107. package/dist/sdk/llm/chat-cache.js +1 -1
  108. package/dist/sdk/llm/index.js +1 -1
  109. package/dist/sdk/llm/llm-backup-utils.js +1 -1
  110. package/dist/sdk/llm/model-factors.js +1 -1
  111. package/dist/sdk/personalization.js +1 -1
  112. package/dist/sdk/query/index.js +1 -1
  113. package/dist/sdk/query/sql-parser.js +1 -1
  114. package/dist/sdk/realtime.js +1 -1
  115. package/dist/sdk/schedule.js +1 -1
  116. package/dist/sdk/segment/child-segment-yaml.js +1 -1
  117. package/dist/sdk/segment/fields-display.js +1 -1
  118. package/dist/sdk/segment/file-discovery.js +1 -1
  119. package/dist/sdk/segment/journey-utils.js +1 -1
  120. package/dist/sdk/segment/journey-validator.d.ts.map +1 -1
  121. package/dist/sdk/segment/journey-validator.js +1 -1
  122. package/dist/sdk/segment/journey-validator.js.map +1 -1
  123. package/dist/sdk/segment/journey-yaml.js +1 -1
  124. package/dist/sdk/segment/parent-segment-preview.js +1 -1
  125. package/dist/sdk/segment/parent-segment-yaml.js +1 -1
  126. package/dist/sdk/segment/pull-workflow.js +1 -1
  127. package/dist/sdk/segment/push-recovery.js +1 -1
  128. package/dist/sdk/segment/push-workflow.js +1 -1
  129. package/dist/sdk/segment/resolution-context.js +1 -1
  130. package/dist/sdk/segment/segment-path-parser.js +1 -1
  131. package/dist/sdk/segment/segment-ref-parser.js +1 -1
  132. package/dist/sdk/segment/target-resolution.js +1 -1
  133. package/dist/sdk/segment/tdx-config.js +1 -1
  134. package/dist/sdk/segment/validate-files.js +1 -1
  135. package/dist/sdk/segment/yaml-validator.js +1 -1
  136. package/dist/sdk/segment.js +1 -1
  137. package/dist/sdk/types/index.js +1 -1
  138. package/dist/sdk/types/progress.js +1 -1
  139. package/dist/sdk/user.js +1 -1
  140. package/dist/sdk/util/format-detector.js +1 -1
  141. package/dist/sdk/util/formatters.js +1 -1
  142. package/dist/sdk/util/index.js +1 -1
  143. package/dist/sdk/util/tree-formatter.js +1 -1
  144. package/dist/sdk/workflow/archive-validation.js +1 -1
  145. package/dist/sdk/workflow/clone-workflow.js +1 -1
  146. package/dist/sdk/workflow/index.js +1 -1
  147. package/dist/sdk/workflow/pull-workflow.js +1 -1
  148. package/dist/sdk/workflow/push-workflow.js +1 -1
  149. package/dist/sdk/workflow/tdx-config.js +1 -1
  150. package/dist/sdk/workflow/workflow-utils.js +1 -1
  151. package/dist/test-utils/command-runner.js +1 -1
  152. package/dist/test-utils/factories.js +1 -1
  153. package/dist/test-utils/fixtures.js +1 -1
  154. package/dist/test-utils/http-mock.js +1 -1
  155. package/dist/test-utils/index.js +1 -1
  156. package/dist/utils/async.js +1 -1
  157. package/dist/utils/colors.js +1 -1
  158. package/dist/utils/diff.js +1 -1
  159. package/dist/utils/file-permissions.js +1 -1
  160. package/dist/utils/global-cache.js +1 -1
  161. package/dist/utils/json-loader.js +1 -1
  162. package/dist/utils/local-cache.js +1 -1
  163. package/dist/utils/logger/formatters/default-formatter.js +1 -1
  164. package/dist/utils/logger/formatters/index.js +1 -1
  165. package/dist/utils/logger/handlers/console-handler.js +1 -1
  166. package/dist/utils/logger/handlers/file-handler.js +1 -1
  167. package/dist/utils/logger/handlers/index.js +1 -1
  168. package/dist/utils/logger/handlers/null-handler.js +1 -1
  169. package/dist/utils/logger/index.js +1 -1
  170. package/dist/utils/logger/logger.js +1 -1
  171. package/dist/utils/logger/types.js +1 -1
  172. package/dist/utils/option-validation.js +1 -1
  173. package/dist/utils/process.js +1 -1
  174. package/dist/utils/prompt.js +1 -1
  175. package/dist/utils/spinner.js +1 -1
  176. package/dist/utils/sse-parser.js +1 -1
  177. package/dist/utils/string-utils.js +1 -1
  178. package/dist/utils/table-ref-parser.js +1 -1
  179. package/dist/utils/tdx-logger.js +1 -1
  180. package/dist/utils/version-check.js +1 -1
  181. package/package.json +1 -1
@@ -1 +1 @@
1
- function a36_0x5c01(_0x156eda,_0x5f0ab3){_0x156eda=_0x156eda-0x97;const _0x3196cd=a36_0x3196();let _0x5c0110=_0x3196cd[_0x156eda];return _0x5c0110;}const a36_0x3055df=a36_0x5c01;(function(_0x4590cd,_0x2b9b68){const _0x3b724f=a36_0x5c01,_0x4c8558=_0x4590cd();while(!![]){try{const _0x598e2a=parseInt(_0x3b724f(0xba))/0x1*(-parseInt(_0x3b724f(0xa9))/0x2)+parseInt(_0x3b724f(0xb9))/0x3*(-parseInt(_0x3b724f(0xb4))/0x4)+-parseInt(_0x3b724f(0xab))/0x5+-parseInt(_0x3b724f(0xb8))/0x6*(-parseInt(_0x3b724f(0xbb))/0x7)+parseInt(_0x3b724f(0xaa))/0x8*(-parseInt(_0x3b724f(0xa3))/0x9)+parseInt(_0x3b724f(0xbd))/0xa+parseInt(_0x3b724f(0x9a))/0xb;if(_0x598e2a===_0x2b9b68)break;else _0x4c8558['push'](_0x4c8558['shift']());}catch(_0x136d2e){_0x4c8558['push'](_0x4c8558['shift']());}}}(a36_0x3196,0x5b715));import{BaseCommand}from'./command.js';import{handleSDKOutput}from'../core/command-output.js';import{withSpinner}from'../utils/spinner.js';import{loadJSONFromOptions}from'../utils/json-loader.js';import{SDKError,ErrorCode}from'../sdk/index.js';function a36_0x3196(){const _0x1d4404=['\x20\x20tdx\x20segment\x20update\x20\x22My\x20Audience/High\x20Value\x22\x20--description\x20\x22...\x22','Error:\x20Cannot\x20update\x20','data','yellow','rule','Use:\x20tdx\x20segment\x20update\x20<path_to_segment>\x20[options]','Updating\x20segment\x20\x27','Resolving\x20folder\x20\x27','Usage:\x20tdx\x20segment\x20update\x20<path>\x20[options]','INTERNAL','segment','Resolved\x20relative\x20path\x20to:\x20','\x20\x20Use\x20`tdx\x20sg\x20push`\x20with\x20YAML\x20files\x20instead.\x0a','3539778HGGSHY','\x27...','name','verbose','✔\x20Updated\x20segment\x20\x27','ruleFile','Resolved\x20type:\x20','\x20\x20tdx\x20segment\x20update\x20\x22High\x20Value\x22\x20--rule\x20\x27...\x27\x20\x20#\x20Relative\x20to\x20context','resolveFolderId','1172898MDXEFU','length','segment:update','⚠\x20Deprecation\x20warning:\x20`segment\x20update`\x20is\x20deprecated.','type','parentId','2flmPgY','8LVVNyu','2894400fFljGH','segmentName','error','Segment\x20ID:\x20','description','Update\x20existing\x20child\x20segment','Error:\x20Segment\x20path\x20or\x20name\x20is\x20required','.\x20Only\x20child\x20segments\x20can\x20be\x20updated.','folder','129048bGExRR','resolvePathToResource','segmentId','includes','714YZsuUF','15VQgvwr','161625kgUIeK','40810JCoKyA','updateSegmentById','3911180fqZmTN','Examples:'];a36_0x3196=function(){return _0x1d4404;};return a36_0x3196();}import a36_0x38f196 from'chalk';export class SegmentUpdateCommand extends BaseCommand{[a36_0x3055df(0x9c)]=a36_0x3055df(0xa5);[a36_0x3055df(0xaf)]=a36_0x3055df(0xb0);async['execute'](_0x4cb258){const _0x28ca0c=a36_0x3055df;console[_0x28ca0c(0xad)](a36_0x38f196[_0x28ca0c(0xc2)](_0x28ca0c(0xa6))),console[_0x28ca0c(0xad)](a36_0x38f196[_0x28ca0c(0xc2)](_0x28ca0c(0x99)));const {options:_0x253a56,args:_0x5d06c8,tdx:_0x1b2411}=_0x4cb258,_0x2d1c9d=_0x253a56;if(_0x5d06c8[_0x28ca0c(0xa4)]===0x0)return console[_0x28ca0c(0xad)](_0x28ca0c(0xb1)),console[_0x28ca0c(0xad)](_0x28ca0c(0xc7)),console[_0x28ca0c(0xad)](_0x28ca0c(0xbe)),console[_0x28ca0c(0xad)](_0x28ca0c(0xbf)),console[_0x28ca0c(0xad)](_0x28ca0c(0xa1)),0x1;const _0x59f9e4=_0x5d06c8[0x0],_0x297bc0=_0x253a56['segmentPath'];let _0x22b8da=_0x59f9e4;_0x297bc0&&!_0x59f9e4[_0x28ca0c(0xb7)]('/')&&(_0x22b8da=_0x297bc0+'/'+_0x59f9e4,_0x2d1c9d[_0x28ca0c(0x9d)]&&console['error'](_0x28ca0c(0x98)+_0x22b8da));const _0x6ee34=await withSpinner('Resolving\x20path\x20\x27'+_0x22b8da+_0x28ca0c(0x9b),()=>_0x1b2411[_0x28ca0c(0x97)][_0x28ca0c(0xb5)](_0x22b8da),{'verbose':_0x2d1c9d[_0x28ca0c(0x9d)]}),_0x5594e8=_0x6ee34['data'];_0x2d1c9d[_0x28ca0c(0x9d)]&&console[_0x28ca0c(0xad)](_0x28ca0c(0xa0)+_0x5594e8[_0x28ca0c(0xa7)]);if(_0x5594e8[_0x28ca0c(0xa7)]!=='segment')return console[_0x28ca0c(0xad)](_0x28ca0c(0xc0)+_0x5594e8['type']+_0x28ca0c(0xb2)),console[_0x28ca0c(0xad)](_0x28ca0c(0xc4)),0x1;if(!_0x5594e8[_0x28ca0c(0xb6)])throw new SDKError(ErrorCode[_0x28ca0c(0xc8)],'Segment\x20ID\x20missing\x20from\x20resolved\x20path');const _0x26da58=_0x5594e8[_0x28ca0c(0xa8)],_0x372c3b=_0x5594e8[_0x28ca0c(0xb6)];_0x2d1c9d[_0x28ca0c(0x9d)]&&(console[_0x28ca0c(0xad)]('Parent\x20ID:\x20'+_0x26da58),console['error'](_0x28ca0c(0xae)+_0x372c3b));let _0x2f0b30;if(_0x2d1c9d[_0x28ca0c(0xb3)]){const _0x43dceb=_0x2d1c9d[_0x28ca0c(0xb3)],_0x47f394=await withSpinner(_0x28ca0c(0xc6)+_0x43dceb+_0x28ca0c(0x9b),()=>_0x1b2411[_0x28ca0c(0x97)][_0x28ca0c(0xa2)](_0x26da58,_0x43dceb),{'verbose':_0x2d1c9d['verbose']});_0x2f0b30=parseInt(_0x47f394[_0x28ca0c(0xc1)],0xa),_0x2d1c9d[_0x28ca0c(0x9d)]&&console[_0x28ca0c(0xad)]('Resolved\x20folder\x20ID:\x20'+_0x2f0b30);}const _0x54db27=await loadJSONFromOptions(_0x2d1c9d[_0x28ca0c(0xc3)],_0x2d1c9d[_0x28ca0c(0x9f)]),_0x3c3786={'name':_0x2d1c9d[_0x28ca0c(0x9c)],'description':_0x2d1c9d[_0x28ca0c(0xaf)],'rule':_0x54db27,'kind':_0x2d1c9d['kind']!==undefined?parseInt(_0x2d1c9d['kind'],0xa):undefined,'segmentFolderId':_0x2f0b30},_0x5b8c37=await withSpinner(_0x28ca0c(0xc5)+_0x5594e8[_0x28ca0c(0xac)]+_0x28ca0c(0x9b),()=>_0x1b2411[_0x28ca0c(0x97)][_0x28ca0c(0xbc)](_0x26da58,_0x372c3b,_0x3c3786),{'verbose':_0x2d1c9d[_0x28ca0c(0x9d)]}),_0x5ee197=_0x5b8c37[_0x28ca0c(0xc1)];return console[_0x28ca0c(0xad)](_0x28ca0c(0x9e)+_0x5ee197[_0x28ca0c(0x9c)]+'\x27'),_0x22b8da!==_0x59f9e4&&console[_0x28ca0c(0xad)]('\x20\x20\x20Path:\x20'+_0x22b8da),await handleSDKOutput([_0x5ee197],_0x2d1c9d),0x0;}}
1
+ const a36_0x53047d=a36_0x583a;(function(_0xe5bf12,_0x18f09d){const _0x1f0887=a36_0x583a,_0x2c4123=_0xe5bf12();while(!![]){try{const _0x506fd7=-parseInt(_0x1f0887(0xc8))/0x1+-parseInt(_0x1f0887(0xc4))/0x2*(parseInt(_0x1f0887(0xc5))/0x3)+-parseInt(_0x1f0887(0xcb))/0x4+-parseInt(_0x1f0887(0xe1))/0x5+-parseInt(_0x1f0887(0xba))/0x6+parseInt(_0x1f0887(0xd9))/0x7*(parseInt(_0x1f0887(0xcd))/0x8)+parseInt(_0x1f0887(0xdd))/0x9*(parseInt(_0x1f0887(0xd6))/0xa);if(_0x506fd7===_0x18f09d)break;else _0x2c4123['push'](_0x2c4123['shift']());}catch(_0xa26227){_0x2c4123['push'](_0x2c4123['shift']());}}}(a36_0x1818,0x8fdd0));function a36_0x583a(_0x5b68b2,_0x2a5ebe){_0x5b68b2=_0x5b68b2-0xb7;const _0x18188b=a36_0x1818();let _0x583a91=_0x18188b[_0x5b68b2];return _0x583a91;}import{BaseCommand}from'./command.js';import{handleSDKOutput}from'../core/command-output.js';import{withSpinner}from'../utils/spinner.js';import{loadJSONFromOptions}from'../utils/json-loader.js';function a36_0x1818(){const _0x417ef1=['Examples:','\x20\x20tdx\x20segment\x20update\x20\x22My\x20Audience/High\x20Value\x22\x20--description\x20\x22...\x22','error','400hnVuNX','\x27...','Updating\x20segment\x20\x27','77ojePXt','INTERNAL','execute','✔\x20Updated\x20segment\x20\x27','793278VMCSVF','yellow','\x20\x20Use\x20`tdx\x20sg\x20push`\x20with\x20YAML\x20files\x20instead.\x0a','.\x20Only\x20child\x20segments\x20can\x20be\x20updated.','3610960CkYxzx','Resolved\x20folder\x20ID:\x20','Error:\x20Segment\x20path\x20or\x20name\x20is\x20required','Error:\x20Cannot\x20update\x20','resolveFolderId','3730758dLJady','includes','segmentPath','folder','description','type','data','kind','segment','segmentName','1979918ZfhCjC','3ErcaPP','verbose','name','905503coChIZ','\x20\x20\x20Path:\x20','Update\x20existing\x20child\x20segment','1950904ONiGsJ','segmentId','575096uTWgBw','updateSegmentById','parentId','Resolved\x20relative\x20path\x20to:\x20','Resolving\x20folder\x20\x27','Usage:\x20tdx\x20segment\x20update\x20<path>\x20[options]'];a36_0x1818=function(){return _0x417ef1;};return a36_0x1818();}import{SDKError,ErrorCode}from'../sdk/index.js';import a36_0x96df15 from'chalk';export class SegmentUpdateCommand extends BaseCommand{[a36_0x53047d(0xc7)]='segment:update';[a36_0x53047d(0xbe)]=a36_0x53047d(0xca);async[a36_0x53047d(0xdb)](_0x2d639b){const _0x23e1cd=a36_0x53047d;console[_0x23e1cd(0xd5)](a36_0x96df15[_0x23e1cd(0xde)]('⚠\x20Deprecation\x20warning:\x20`segment\x20update`\x20is\x20deprecated.')),console[_0x23e1cd(0xd5)](a36_0x96df15[_0x23e1cd(0xde)](_0x23e1cd(0xdf)));const {options:_0x1593e6,args:_0x135173,tdx:_0x3165ff}=_0x2d639b,_0x1e6a70=_0x1593e6;if(_0x135173['length']===0x0)return console[_0x23e1cd(0xd5)](_0x23e1cd(0xb7)),console[_0x23e1cd(0xd5)](_0x23e1cd(0xd2)),console[_0x23e1cd(0xd5)](_0x23e1cd(0xd3)),console[_0x23e1cd(0xd5)](_0x23e1cd(0xd4)),console['error']('\x20\x20tdx\x20segment\x20update\x20\x22High\x20Value\x22\x20--rule\x20\x27...\x27\x20\x20#\x20Relative\x20to\x20context'),0x1;const _0x10b334=_0x135173[0x0],_0x7ba835=_0x1593e6[_0x23e1cd(0xbc)];let _0x48328d=_0x10b334;_0x7ba835&&!_0x10b334[_0x23e1cd(0xbb)]('/')&&(_0x48328d=_0x7ba835+'/'+_0x10b334,_0x1e6a70[_0x23e1cd(0xc6)]&&console['error'](_0x23e1cd(0xd0)+_0x48328d));const _0x1cc6fa=await withSpinner('Resolving\x20path\x20\x27'+_0x48328d+_0x23e1cd(0xd7),()=>_0x3165ff[_0x23e1cd(0xc2)]['resolvePathToResource'](_0x48328d),{'verbose':_0x1e6a70['verbose']}),_0x3fff35=_0x1cc6fa[_0x23e1cd(0xc0)];_0x1e6a70[_0x23e1cd(0xc6)]&&console['error']('Resolved\x20type:\x20'+_0x3fff35[_0x23e1cd(0xbf)]);if(_0x3fff35['type']!=='segment')return console[_0x23e1cd(0xd5)](_0x23e1cd(0xb8)+_0x3fff35['type']+_0x23e1cd(0xe0)),console['error']('Use:\x20tdx\x20segment\x20update\x20<path_to_segment>\x20[options]'),0x1;if(!_0x3fff35['segmentId'])throw new SDKError(ErrorCode[_0x23e1cd(0xda)],'Segment\x20ID\x20missing\x20from\x20resolved\x20path');const _0x2eb830=_0x3fff35[_0x23e1cd(0xcf)],_0x2a2649=_0x3fff35[_0x23e1cd(0xcc)];_0x1e6a70['verbose']&&(console[_0x23e1cd(0xd5)]('Parent\x20ID:\x20'+_0x2eb830),console[_0x23e1cd(0xd5)]('Segment\x20ID:\x20'+_0x2a2649));let _0x4b1b5f;if(_0x1e6a70[_0x23e1cd(0xbd)]){const _0x911e4=_0x1e6a70['folder'],_0x35ba7c=await withSpinner(_0x23e1cd(0xd1)+_0x911e4+_0x23e1cd(0xd7),()=>_0x3165ff[_0x23e1cd(0xc2)][_0x23e1cd(0xb9)](_0x2eb830,_0x911e4),{'verbose':_0x1e6a70[_0x23e1cd(0xc6)]});_0x4b1b5f=parseInt(_0x35ba7c[_0x23e1cd(0xc0)],0xa),_0x1e6a70[_0x23e1cd(0xc6)]&&console[_0x23e1cd(0xd5)](_0x23e1cd(0xe2)+_0x4b1b5f);}const _0x528eb7=await loadJSONFromOptions(_0x1e6a70['rule'],_0x1e6a70['ruleFile']),_0x10e97e={'name':_0x1e6a70[_0x23e1cd(0xc7)],'description':_0x1e6a70[_0x23e1cd(0xbe)],'rule':_0x528eb7,'kind':_0x1e6a70[_0x23e1cd(0xc1)]!==undefined?parseInt(_0x1e6a70['kind'],0xa):undefined,'segmentFolderId':_0x4b1b5f},_0x1a386e=await withSpinner(_0x23e1cd(0xd8)+_0x3fff35[_0x23e1cd(0xc3)]+_0x23e1cd(0xd7),()=>_0x3165ff[_0x23e1cd(0xc2)][_0x23e1cd(0xce)](_0x2eb830,_0x2a2649,_0x10e97e),{'verbose':_0x1e6a70[_0x23e1cd(0xc6)]}),_0x1029a4=_0x1a386e['data'];return console[_0x23e1cd(0xd5)](_0x23e1cd(0xdc)+_0x1029a4[_0x23e1cd(0xc7)]+'\x27'),_0x48328d!==_0x10b334&&console[_0x23e1cd(0xd5)](_0x23e1cd(0xc9)+_0x48328d),await handleSDKOutput([_0x1029a4],_0x1e6a70),0x0;}}
@@ -1 +1 @@
1
- const a37_0x23a3dd=a37_0x106f;(function(_0x5fefa8,_0x40d6f5){const _0x3d74b5=a37_0x106f,_0x56ddc2=_0x5fefa8();while(!![]){try{const _0x1bfd64=-parseInt(_0x3d74b5(0x122))/0x1+-parseInt(_0x3d74b5(0x126))/0x2+-parseInt(_0x3d74b5(0x11d))/0x3*(parseInt(_0x3d74b5(0x13f))/0x4)+-parseInt(_0x3d74b5(0x11c))/0x5+parseInt(_0x3d74b5(0x12c))/0x6*(parseInt(_0x3d74b5(0x138))/0x7)+parseInt(_0x3d74b5(0x11f))/0x8*(-parseInt(_0x3d74b5(0x125))/0x9)+-parseInt(_0x3d74b5(0x130))/0xa*(-parseInt(_0x3d74b5(0x139))/0xb);if(_0x1bfd64===_0x40d6f5)break;else _0x56ddc2['push'](_0x56ddc2['shift']());}catch(_0x23ed30){_0x56ddc2['push'](_0x56ddc2['shift']());}}}(a37_0x5a8f,0x45eb2));import{existsSync,statSync}from'fs';import a37_0x488fb1 from'chalk';function a37_0x5a8f(){const _0x48813d=['split','log','verbose','220640IRTNYi','10614fdCCHH','\x20\x20tdx\x20segment\x20use\x20\x22My\x20Audience/Marketing\x22','96032NpIZfR','length','Set\x20current\x20segment/folder\x20context\x20for\x20navigation','335035eLOZQJ','Resolving\x20path\x20\x27','Resolved\x20relative\x20path\x20to:\x20','396jbwdyf','199256CUVNNM','error','Error:\x20No\x20context\x20set.\x20Cannot\x20use\x20relative\x20path.','Usage:\x20tdx\x20segment\x20use\x20<path>','red','execute','1299972AXqIZq','dim','Use\x20\x22tdx\x20segments\x22\x20to\x20list\x20contents\x20in\x20this\x20context','parentName','12138290HCEPgj','folderPath','Use\x20\x22tdx\x20use\x22\x20to\x20see\x20all\x20context\x20parameters','Context\x20can\x20only\x20be\x20set\x20to\x20a\x20parent\x20segment\x20or\x20folder.','slice','Resolved\x20path\x20type:\x20','isDirectory','Examples:','14KpKbUk','11Echksw','Site:\x20','Parent\x20ID:\x20','segments','fullPath','cyan','400IjtlCe','Error:\x20Path\x20is\x20required\x0a','segmentPath','config','join','\x20\x20tdx\x20segment\x20use\x20/\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Clear\x20context','session','\x27...','segment','data','Error:\x20No\x20tdx.json\x20found\x20in\x20or\x20above:\x20','✔\x20Context\x20cleared.\x20Back\x20to\x20root.','isAbsolute','type','green','Tip:\x20Run\x20`tdx\x20sg\x20pull\x20<parent_name>`\x20first\x20to\x20create\x20the\x20folder\x20structure','folderId'];a37_0x5a8f=function(){return _0x48813d;};return a37_0x5a8f();}import{BaseCommand}from'./command.js';import{saveSessionContext}from'../core/session.js';import{withSpinner}from'../utils/spinner.js';import{parsePath,normalizePath}from'../sdk/segment/segment-path-parser.js';function a37_0x106f(_0xb23ba9,_0x9dc3f2){_0xb23ba9=_0xb23ba9-0x118;const _0x5a8ff2=a37_0x5a8f();let _0x106f73=_0x5a8ff2[_0xb23ba9];return _0x106f73;}import{findTdxConfig}from'../sdk/segment/tdx-config.js';export class SegmentUseCommand extends BaseCommand{['name']='segment:use';['description']=a37_0x23a3dd(0x121);async[a37_0x23a3dd(0x12b)](_0x41d999){const _0x29c4df=a37_0x23a3dd,{options:_0x4c3e24,args:_0x3e5c5a,tdx:_0x5e8493}=_0x41d999;if(_0x3e5c5a[_0x29c4df(0x120)]===0x0)return console[_0x29c4df(0x127)](a37_0x488fb1['red'](_0x29c4df(0x140))),console[_0x29c4df(0x127)](_0x29c4df(0x129)),console[_0x29c4df(0x127)](_0x29c4df(0x137)),console[_0x29c4df(0x127)]('\x20\x20tdx\x20segment\x20use\x20\x22My\x20Audience\x22'),console[_0x29c4df(0x127)](_0x29c4df(0x11e)),console[_0x29c4df(0x127)](_0x29c4df(0x144)),console[_0x29c4df(0x127)]('\x20\x20tdx\x20segment\x20use\x20..\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Go\x20to\x20parent'),0x1;const _0x20d183=_0x3e5c5a[0x0],_0x1edaf3=_0x4c3e24[_0x29c4df(0x145)];try{if(_0x20d183==='/')return saveSessionContext({'segment_path':undefined},_0x1edaf3),console[_0x29c4df(0x11a)](a37_0x488fb1[_0x29c4df(0x14d)]('✔\x20Context\x20cleared.\x20Back\x20to\x20root.')),0x0;if(existsSync(_0x20d183)&&statSync(_0x20d183)[_0x29c4df(0x136)]()){let _0x4ae1b8;try{_0x4ae1b8=findTdxConfig(_0x20d183);}catch{return console[_0x29c4df(0x127)](a37_0x488fb1[_0x29c4df(0x12a)](_0x29c4df(0x149)+_0x20d183)),console[_0x29c4df(0x127)](a37_0x488fb1[_0x29c4df(0x13e)](_0x29c4df(0x14e))),0x1;}const _0x5d8d40=_0x4ae1b8[_0x29c4df(0x142)]['parent_segment'];return saveSessionContext({'segment_path':_0x5d8d40,'parent_segment':_0x5d8d40},_0x1edaf3),console['log'](a37_0x488fb1[_0x29c4df(0x14d)]('✔\x20Context\x20set\x20to:\x20'+a37_0x488fb1[_0x29c4df(0x13e)](_0x5d8d40))),0x0;}const _0x47ffb9=_0x4c3e24[_0x29c4df(0x141)];let _0x5ddfbc=_0x20d183;const _0x4fed9d=parsePath(_0x20d183);if(!_0x4fed9d[_0x29c4df(0x14b)]){if(!_0x47ffb9)return console[_0x29c4df(0x127)](a37_0x488fb1[_0x29c4df(0x12a)](_0x29c4df(0x128))),console[_0x29c4df(0x127)](a37_0x488fb1[_0x29c4df(0x13e)]('Use\x20an\x20absolute\x20path\x20or\x20set\x20context\x20with:\x20tdx\x20segment\x20use\x20<parent_name>')),0x1;if(_0x20d183==='..'){const _0x150b59=_0x47ffb9[_0x29c4df(0x119)]('/')[_0x29c4df(0x134)](0x0,-0x1)[_0x29c4df(0x143)]('/');_0x5ddfbc=_0x150b59||'/';}else _0x20d183==='.'?_0x5ddfbc=_0x47ffb9:_0x5ddfbc=_0x47ffb9+'/'+_0x20d183;_0x4c3e24[_0x29c4df(0x11b)]&&console[_0x29c4df(0x127)](_0x29c4df(0x124)+_0x5ddfbc);}if(_0x5ddfbc==='/'||_0x5ddfbc==='')return saveSessionContext({'segment_path':undefined},_0x1edaf3),console['log'](a37_0x488fb1['green'](_0x29c4df(0x14a))),0x0;_0x5ddfbc=normalizePath(_0x5ddfbc);const _0x410541=parsePath(_0x5ddfbc)[_0x29c4df(0x13c)];if(_0x410541[_0x29c4df(0x120)]===0x0)return saveSessionContext({'segment_path':undefined},_0x1edaf3),console[_0x29c4df(0x11a)](a37_0x488fb1[_0x29c4df(0x14d)]('✔\x20Context\x20cleared.\x20Back\x20to\x20root.')),0x0;_0x4c3e24['verbose']&&(console[_0x29c4df(0x127)](_0x29c4df(0x13a)+_0x4c3e24['site']),console[_0x29c4df(0x127)]('Target\x20path:\x20'+_0x5ddfbc));const _0x34acd3=await withSpinner(_0x29c4df(0x123)+_0x5ddfbc+_0x29c4df(0x146),()=>_0x5e8493[_0x29c4df(0x147)]['resolvePathToResource'](_0x5ddfbc),{'verbose':_0x4c3e24[_0x29c4df(0x11b)]}),_0x5bec3f=_0x34acd3[_0x29c4df(0x148)];_0x4c3e24[_0x29c4df(0x11b)]&&(console[_0x29c4df(0x127)](_0x29c4df(0x135)+_0x5bec3f['type']),console[_0x29c4df(0x127)](_0x29c4df(0x13b)+_0x5bec3f['parentId']),_0x5bec3f['folderId']&&console[_0x29c4df(0x127)]('Folder\x20ID:\x20'+_0x5bec3f[_0x29c4df(0x118)]));if(_0x5bec3f[_0x29c4df(0x14c)]===_0x29c4df(0x147))return console[_0x29c4df(0x127)](a37_0x488fb1['red']('Error:\x20Cannot\x20set\x20context\x20to\x20a\x20segment.')),console[_0x29c4df(0x127)](_0x29c4df(0x133)),console['error'](a37_0x488fb1['cyan']('Use:\x20tdx\x20segment\x20use\x20'+_0x5bec3f[_0x29c4df(0x12f)]+(_0x5bec3f['folderPath']?'/'+_0x5bec3f[_0x29c4df(0x131)][_0x29c4df(0x143)]('/'):''))),0x1;return saveSessionContext({'segment_path':_0x5bec3f[_0x29c4df(0x13d)],'parent_segment':_0x5bec3f[_0x29c4df(0x12f)]},_0x1edaf3),console[_0x29c4df(0x11a)](a37_0x488fb1['green']('✔\x20Context\x20set\x20to:\x20'+a37_0x488fb1[_0x29c4df(0x13e)](_0x5bec3f[_0x29c4df(0x13d)]))),_0x4c3e24[_0x29c4df(0x11b)]&&(console[_0x29c4df(0x127)](a37_0x488fb1[_0x29c4df(0x12d)](_0x29c4df(0x12e))),console[_0x29c4df(0x127)](a37_0x488fb1[_0x29c4df(0x12d)](_0x29c4df(0x132)))),0x0;}catch(_0x5249c6){throw _0x5249c6;}}}
1
+ const a37_0x1f3307=a37_0x1a41;(function(_0x2e902c,_0x4d287e){const _0x145744=a37_0x1a41,_0x1a5b0c=_0x2e902c();while(!![]){try{const _0x14d773=parseInt(_0x145744(0x13d))/0x1*(parseInt(_0x145744(0x171))/0x2)+-parseInt(_0x145744(0x168))/0x3+-parseInt(_0x145744(0x163))/0x4+parseInt(_0x145744(0x174))/0x5+-parseInt(_0x145744(0x145))/0x6*(parseInt(_0x145744(0x152))/0x7)+-parseInt(_0x145744(0x14f))/0x8*(parseInt(_0x145744(0x162))/0x9)+parseInt(_0x145744(0x148))/0xa;if(_0x14d773===_0x4d287e)break;else _0x1a5b0c['push'](_0x1a5b0c['shift']());}catch(_0x17ce6f){_0x1a5b0c['push'](_0x1a5b0c['shift']());}}}(a37_0x4433,0xf0e61));import{existsSync,statSync}from'fs';import a37_0x1bfb17 from'chalk';import{BaseCommand}from'./command.js';function a37_0x4433(){const _0x38dd26=['data','Use\x20an\x20absolute\x20path\x20or\x20set\x20context\x20with:\x20tdx\x20segment\x20use\x20<parent_name>','site','length','description','60322MGTXAN','red','log','4224125SdkQib','\x27...','Use\x20\x22tdx\x20use\x22\x20to\x20see\x20all\x20context\x20parameters','\x20\x20tdx\x20segment\x20use\x20/\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Clear\x20context','resolvePathToResource','29BSKMjI','Error:\x20No\x20tdx.json\x20found\x20in\x20or\x20above:\x20','segmentPath','error','cyan','\x20\x20tdx\x20segment\x20use\x20\x22My\x20Audience/Marketing\x22','Resolving\x20path\x20\x27','verbose','600630uRkcVb','Site:\x20','isDirectory','27662380UXrCUM','folderPath','Examples:','segment','parentName','\x20\x20tdx\x20segment\x20use\x20\x22My\x20Audience\x22','Resolved\x20path\x20type:\x20','4554840lJrjvW','join','green','112vporjI','parent_segment','slice','execute','dim','Use\x20\x22tdx\x20segments\x22\x20to\x20list\x20contents\x20in\x20this\x20context','split','isAbsolute','folderId','segments','✔\x20Context\x20set\x20to:\x20','segment:use','Parent\x20ID:\x20','type','Folder\x20ID:\x20','fullPath','9gumfYY','717364tvJlfV','Set\x20current\x20segment/folder\x20context\x20for\x20navigation','session','✔\x20Context\x20cleared.\x20Back\x20to\x20root.','Use:\x20tdx\x20segment\x20use\x20','3445905QuXXQj','Error:\x20Cannot\x20set\x20context\x20to\x20a\x20segment.','Context\x20can\x20only\x20be\x20set\x20to\x20a\x20parent\x20segment\x20or\x20folder.','name'];a37_0x4433=function(){return _0x38dd26;};return a37_0x4433();}import{saveSessionContext}from'../core/session.js';import{withSpinner}from'../utils/spinner.js';function a37_0x1a41(_0x23922f,_0x132a89){_0x23922f=_0x23922f-0x13d;const _0x4433d0=a37_0x4433();let _0x1a4148=_0x4433d0[_0x23922f];return _0x1a4148;}import{parsePath,normalizePath}from'../sdk/segment/segment-path-parser.js';import{findTdxConfig}from'../sdk/segment/tdx-config.js';export class SegmentUseCommand extends BaseCommand{[a37_0x1f3307(0x16b)]=a37_0x1f3307(0x15d);[a37_0x1f3307(0x170)]=a37_0x1f3307(0x164);async[a37_0x1f3307(0x155)](_0x179d83){const _0x266648=a37_0x1f3307,{options:_0x568099,args:_0x1b5ef7,tdx:_0x3de53f}=_0x179d83;if(_0x1b5ef7[_0x266648(0x16f)]===0x0)return console[_0x266648(0x140)](a37_0x1bfb17[_0x266648(0x172)]('Error:\x20Path\x20is\x20required\x0a')),console[_0x266648(0x140)]('Usage:\x20tdx\x20segment\x20use\x20<path>'),console[_0x266648(0x140)](_0x266648(0x14a)),console['error'](_0x266648(0x14d)),console[_0x266648(0x140)](_0x266648(0x142)),console[_0x266648(0x140)](_0x266648(0x177)),console[_0x266648(0x140)]('\x20\x20tdx\x20segment\x20use\x20..\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Go\x20to\x20parent'),0x1;const _0x180d5e=_0x1b5ef7[0x0],_0x641e63=_0x568099[_0x266648(0x165)];try{if(_0x180d5e==='/')return saveSessionContext({'segment_path':undefined},_0x641e63),console['log'](a37_0x1bfb17[_0x266648(0x151)](_0x266648(0x166))),0x0;if(existsSync(_0x180d5e)&&statSync(_0x180d5e)[_0x266648(0x147)]()){let _0x472ea1;try{_0x472ea1=findTdxConfig(_0x180d5e);}catch{return console['error'](a37_0x1bfb17[_0x266648(0x172)](_0x266648(0x13e)+_0x180d5e)),console[_0x266648(0x140)](a37_0x1bfb17['cyan']('Tip:\x20Run\x20`tdx\x20sg\x20pull\x20<parent_name>`\x20first\x20to\x20create\x20the\x20folder\x20structure')),0x1;}const _0x45e316=_0x472ea1['config'][_0x266648(0x153)];return saveSessionContext({'segment_path':_0x45e316,'parent_segment':_0x45e316},_0x641e63),console[_0x266648(0x173)](a37_0x1bfb17[_0x266648(0x151)](_0x266648(0x15c)+a37_0x1bfb17[_0x266648(0x141)](_0x45e316))),0x0;}const _0x26901e=_0x568099[_0x266648(0x13f)];let _0x1a068d=_0x180d5e;const _0x271e01=parsePath(_0x180d5e);if(!_0x271e01[_0x266648(0x159)]){if(!_0x26901e)return console[_0x266648(0x140)](a37_0x1bfb17['red']('Error:\x20No\x20context\x20set.\x20Cannot\x20use\x20relative\x20path.')),console[_0x266648(0x140)](a37_0x1bfb17[_0x266648(0x141)](_0x266648(0x16d))),0x1;if(_0x180d5e==='..'){const _0x173ea6=_0x26901e[_0x266648(0x158)]('/')[_0x266648(0x154)](0x0,-0x1)[_0x266648(0x150)]('/');_0x1a068d=_0x173ea6||'/';}else _0x180d5e==='.'?_0x1a068d=_0x26901e:_0x1a068d=_0x26901e+'/'+_0x180d5e;_0x568099['verbose']&&console['error']('Resolved\x20relative\x20path\x20to:\x20'+_0x1a068d);}if(_0x1a068d==='/'||_0x1a068d==='')return saveSessionContext({'segment_path':undefined},_0x641e63),console['log'](a37_0x1bfb17['green'](_0x266648(0x166))),0x0;_0x1a068d=normalizePath(_0x1a068d);const _0x482105=parsePath(_0x1a068d)[_0x266648(0x15b)];if(_0x482105[_0x266648(0x16f)]===0x0)return saveSessionContext({'segment_path':undefined},_0x641e63),console[_0x266648(0x173)](a37_0x1bfb17[_0x266648(0x151)](_0x266648(0x166))),0x0;_0x568099[_0x266648(0x144)]&&(console[_0x266648(0x140)](_0x266648(0x146)+_0x568099[_0x266648(0x16e)]),console[_0x266648(0x140)]('Target\x20path:\x20'+_0x1a068d));const _0x74aaf7=await withSpinner(_0x266648(0x143)+_0x1a068d+_0x266648(0x175),()=>_0x3de53f[_0x266648(0x14b)][_0x266648(0x178)](_0x1a068d),{'verbose':_0x568099[_0x266648(0x144)]}),_0x457ff0=_0x74aaf7[_0x266648(0x16c)];_0x568099[_0x266648(0x144)]&&(console[_0x266648(0x140)](_0x266648(0x14e)+_0x457ff0[_0x266648(0x15f)]),console[_0x266648(0x140)](_0x266648(0x15e)+_0x457ff0['parentId']),_0x457ff0[_0x266648(0x15a)]&&console[_0x266648(0x140)](_0x266648(0x160)+_0x457ff0[_0x266648(0x15a)]));if(_0x457ff0[_0x266648(0x15f)]===_0x266648(0x14b))return console[_0x266648(0x140)](a37_0x1bfb17[_0x266648(0x172)](_0x266648(0x169))),console['error'](_0x266648(0x16a)),console['error'](a37_0x1bfb17[_0x266648(0x141)](_0x266648(0x167)+_0x457ff0[_0x266648(0x14c)]+(_0x457ff0[_0x266648(0x149)]?'/'+_0x457ff0[_0x266648(0x149)][_0x266648(0x150)]('/'):''))),0x1;return saveSessionContext({'segment_path':_0x457ff0[_0x266648(0x161)],'parent_segment':_0x457ff0['parentName']},_0x641e63),console['log'](a37_0x1bfb17[_0x266648(0x151)](_0x266648(0x15c)+a37_0x1bfb17[_0x266648(0x141)](_0x457ff0[_0x266648(0x161)]))),_0x568099['verbose']&&(console['error'](a37_0x1bfb17[_0x266648(0x156)](_0x266648(0x157))),console[_0x266648(0x140)](a37_0x1bfb17[_0x266648(0x156)](_0x266648(0x176)))),0x0;}catch(_0x37b4c4){throw _0x37b4c4;}}}
@@ -1 +1 @@
1
- function a38_0xf132(){const _0x2066f1=['endsWith','\x20warning(s)\x20found','\x20warning(s)','green','file','2WcpjHf','3zDPbCd','warnings','yellow','280nxUFdB','valid','.yaml','filePath','hasErrors','dim','log','red','3138872tEszns','length','errors','no_parent','cyan','error','Error:\x20No\x20YAML\x20files\x20found\x20in\x20','Validation\x20failed:\x20','invalidCount','type','targetDir','284917zLmgJa','\x20file(s)\x20valid','name','Error:\x20Directory\x20not\x20found:\x20','warningCount','\x20file(s)\x20with\x20errors,\x20','9996768QwtmZL','\x20error(s)','errorCode','4149789ctCKBE','):\x20','message','33867TeYAOl','140tbmDnJ','2472RPfzbd','execute','parent_segment\x20is\x20not\x20set.\x20Use\x20`tdx\x20sg\x20use\x20<parent_name>`\x20to\x20set\x20it.\x0a','segment:validate','\x20valid','Error:\x20','302208SfzGHw','validCount','description','53207EkitSj'];a38_0xf132=function(){return _0x2066f1;};return a38_0xf132();}const a38_0x4dc561=a38_0xc316;(function(_0x12d462,_0x26e6a3){const _0x283cda=a38_0xc316,_0x2ba6cd=_0x12d462();while(!![]){try{const _0x213471=-parseInt(_0x283cda(0x202))/0x1*(parseInt(_0x283cda(0x21f))/0x2)+-parseInt(_0x283cda(0x220))/0x3*(parseInt(_0x283cda(0x1f7))/0x4)+-parseInt(_0x283cda(0x20f))/0x5*(-parseInt(_0x283cda(0x216))/0x6)+parseInt(_0x283cda(0x20b))/0x7+parseInt(_0x283cda(0x210))/0x8*(-parseInt(_0x283cda(0x20e))/0x9)+-parseInt(_0x283cda(0x223))/0xa*(-parseInt(_0x283cda(0x219))/0xb)+parseInt(_0x283cda(0x208))/0xc;if(_0x213471===_0x26e6a3)break;else _0x2ba6cd['push'](_0x2ba6cd['shift']());}catch(_0x352869){_0x2ba6cd['push'](_0x2ba6cd['shift']());}}}(a38_0xf132,0xb479d));import{BaseCommand}from'./command.js';import{resolveTarget,isSuccessfulResolution}from'../sdk/segment/target-resolution.js';import{findYamlFiles}from'../sdk/segment/file-discovery.js';import{existsSync}from'fs';import a38_0x17a5af from'chalk';import{formatValidationResult}from'../sdk/segment/yaml-validator.js';import{validateYamlFiles,isValidationResult,calculateSummary}from'../sdk/segment/validate-files.js';function a38_0xc316(_0x4bf1c2,_0x442eab){_0x4bf1c2=_0x4bf1c2-0x1f3;const _0xf13212=a38_0xf132();let _0xc316ef=_0xf13212[_0x4bf1c2];return _0xc316ef;}export class SegmentValidateCommand extends BaseCommand{[a38_0x4dc561(0x204)]=a38_0x4dc561(0x213);[a38_0x4dc561(0x218)]='Validate\x20segment\x20and\x20journey\x20YAML\x20files';async[a38_0x4dc561(0x211)](_0x15b7f7){const _0x50a46c=a38_0x4dc561,{options:_0x152252,args:_0x39b88c}=_0x15b7f7,_0x49ca56=_0x152252,_0x52b4b2=await resolveTarget({'arg':_0x39b88c[0x0],'contextParent':_0x152252['parentSegment'],'cwd':process['cwd']()});if(!isSuccessfulResolution(_0x52b4b2))return _0x52b4b2[_0x50a46c(0x20a)]===_0x50a46c(0x1fa)?(console['error'](a38_0x17a5af['yellow'](_0x50a46c(0x212))),console[_0x50a46c(0x1fc)]('Usage:\x20tdx\x20sg\x20validate\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Validate\x20all\x20(requires\x20context)'),console[_0x50a46c(0x1fc)]('\x20\x20\x20\x20\x20\x20\x20tdx\x20sg\x20validate\x20.\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Validate\x20current\x20directory'),console['error']('\x20\x20\x20\x20\x20\x20\x20tdx\x20sg\x20validate\x20<file_path>\x20\x20#\x20Validate\x20specific\x20file')):(console['error'](a38_0x17a5af['red'](_0x50a46c(0x215)+_0x52b4b2[_0x50a46c(0x20d)]+'\x0a')),_0x52b4b2['helpText']&&console['error'](a38_0x17a5af[_0x50a46c(0x1fb)](_0x52b4b2['helpText']))),0x1;const _0x29e050=_0x52b4b2[_0x50a46c(0x201)],_0x234345=_0x52b4b2[_0x50a46c(0x200)]===_0x50a46c(0x21e)?_0x52b4b2[_0x50a46c(0x226)]:undefined;if(!_0x234345&&!existsSync(_0x29e050))return console[_0x50a46c(0x1fc)](a38_0x17a5af['red'](_0x50a46c(0x205)+_0x29e050+'\x0a')),0x1;let _0x5d0d6f;if(_0x234345){if(!_0x234345[_0x50a46c(0x21a)]('.yml')&&!_0x234345[_0x50a46c(0x21a)](_0x50a46c(0x225)))return console[_0x50a46c(0x1fc)](a38_0x17a5af[_0x50a46c(0x1f6)]('Error:\x20File\x20must\x20have\x20.yml\x20or\x20.yaml\x20extension:\x20'+_0x234345+'\x0a')),0x1;_0x5d0d6f=[_0x234345];}else _0x5d0d6f=findYamlFiles(_0x29e050);if(_0x5d0d6f[_0x50a46c(0x1f8)]===0x0)return console[_0x50a46c(0x1fc)](a38_0x17a5af[_0x50a46c(0x1f6)](_0x50a46c(0x1fd)+_0x29e050+'\x0a')),0x1;const _0x9bbac0=validateYamlFiles(_0x5d0d6f,_0x29e050),_0x3e839e=calculateSummary(_0x9bbac0);for(const _0x743b4d of _0x9bbac0){if(!isValidationResult(_0x743b4d))continue;const {relativePath:_0x1d23b2,source:_0x561638,result:_0x2a4db7,fileType:_0x54bffd}=_0x743b4d,_0x5d0096=_0x54bffd;if(_0x2a4db7[_0x50a46c(0x224)]&&_0x2a4db7[_0x50a46c(0x221)][_0x50a46c(0x1f8)]===0x0)_0x49ca56['verbose']&&console[_0x50a46c(0x1f5)](a38_0x17a5af['green']('✔\x20'+_0x1d23b2)+a38_0x17a5af['dim']('\x20('+_0x5d0096+')'));else _0x2a4db7[_0x50a46c(0x224)]?(console[_0x50a46c(0x1f5)](a38_0x17a5af['yellow']('⚠\x20'+_0x1d23b2)+a38_0x17a5af[_0x50a46c(0x1f4)]('\x20('+_0x5d0096+'):\x20'+_0x2a4db7['warnings']['length']+_0x50a46c(0x21c))),console['log'](formatValidationResult(_0x2a4db7,_0x561638,_0x1d23b2))):(console[_0x50a46c(0x1f5)](a38_0x17a5af[_0x50a46c(0x1f6)]('✖\x20'+_0x1d23b2)+a38_0x17a5af[_0x50a46c(0x1f4)]('\x20('+_0x5d0096+_0x50a46c(0x20c)+_0x2a4db7[_0x50a46c(0x1f9)][_0x50a46c(0x1f8)]+_0x50a46c(0x209))),console[_0x50a46c(0x1f5)](formatValidationResult(_0x2a4db7,_0x561638,_0x1d23b2)));}return console[_0x50a46c(0x1f5)](''),_0x3e839e[_0x50a46c(0x1f3)]?(console['log'](a38_0x17a5af['red'](_0x50a46c(0x1fe)+_0x3e839e[_0x50a46c(0x1ff)]+_0x50a46c(0x207)+_0x3e839e[_0x50a46c(0x217)]+_0x50a46c(0x214))),_0x3e839e[_0x50a46c(0x206)]>0x0&&console[_0x50a46c(0x1f5)](a38_0x17a5af[_0x50a46c(0x222)](_0x3e839e[_0x50a46c(0x206)]+_0x50a46c(0x21b))),0x1):(console['log'](a38_0x17a5af[_0x50a46c(0x21d)]('✔\x20All\x20'+_0x3e839e['validCount']+_0x50a46c(0x203))),_0x3e839e['warningCount']>0x0&&console['log'](a38_0x17a5af['yellow'](_0x3e839e[_0x50a46c(0x206)]+_0x50a46c(0x21b))),0x0);}}
1
+ const a38_0x1d5bf4=a38_0x30f4;(function(_0x4d8c68,_0x165a98){const _0x2de0d7=a38_0x30f4,_0x4915be=_0x4d8c68();while(!![]){try{const _0x434c47=-parseInt(_0x2de0d7(0x124))/0x1+-parseInt(_0x2de0d7(0x143))/0x2*(-parseInt(_0x2de0d7(0x11c))/0x3)+-parseInt(_0x2de0d7(0x12f))/0x4+parseInt(_0x2de0d7(0x137))/0x5+parseInt(_0x2de0d7(0x11d))/0x6*(parseInt(_0x2de0d7(0x118))/0x7)+parseInt(_0x2de0d7(0x13b))/0x8+parseInt(_0x2de0d7(0x126))/0x9;if(_0x434c47===_0x165a98)break;else _0x4915be['push'](_0x4915be['shift']());}catch(_0x82e95){_0x4915be['push'](_0x4915be['shift']());}}}(a38_0x1ccc,0x18aca));import{BaseCommand}from'./command.js';import{resolveTarget,isSuccessfulResolution}from'../sdk/segment/target-resolution.js';import{findYamlFiles}from'../sdk/segment/file-discovery.js';import{existsSync}from'fs';import a38_0x37a4cf from'chalk';import{formatValidationResult}from'../sdk/segment/yaml-validator.js';import{validateYamlFiles,isValidationResult,calculateSummary}from'../sdk/segment/validate-files.js';function a38_0x30f4(_0x5756cd,_0x3ccaa4){_0x5756cd=_0x5756cd-0x116;const _0x1ccce9=a38_0x1ccc();let _0x30f454=_0x1ccce9[_0x5756cd];return _0x30f454;}export class SegmentValidateCommand extends BaseCommand{[a38_0x1d5bf4(0x12d)]='segment:validate';[a38_0x1d5bf4(0x141)]='Validate\x20segment\x20and\x20journey\x20YAML\x20files';async['execute'](_0x51b460){const _0x40baa7=a38_0x1d5bf4,{options:_0x256cba,args:_0x18161e}=_0x51b460,_0x2f4f06=_0x256cba,_0x3c24c1=await resolveTarget({'arg':_0x18161e[0x0],'contextParent':_0x256cba[_0x40baa7(0x134)],'cwd':process[_0x40baa7(0x13a)]()});if(!isSuccessfulResolution(_0x3c24c1))return _0x3c24c1[_0x40baa7(0x131)]===_0x40baa7(0x11f)?(console[_0x40baa7(0x119)](a38_0x37a4cf[_0x40baa7(0x146)]('parent_segment\x20is\x20not\x20set.\x20Use\x20`tdx\x20sg\x20use\x20<parent_name>`\x20to\x20set\x20it.\x0a')),console['error'](_0x40baa7(0x145)),console['error'](_0x40baa7(0x13d)),console[_0x40baa7(0x119)](_0x40baa7(0x120))):(console[_0x40baa7(0x119)](a38_0x37a4cf[_0x40baa7(0x128)](_0x40baa7(0x12c)+_0x3c24c1[_0x40baa7(0x140)]+'\x0a')),_0x3c24c1[_0x40baa7(0x11e)]&&console[_0x40baa7(0x119)](a38_0x37a4cf[_0x40baa7(0x142)](_0x3c24c1[_0x40baa7(0x11e)]))),0x1;const _0x3e7b47=_0x3c24c1[_0x40baa7(0x135)],_0x104bf7=_0x3c24c1[_0x40baa7(0x132)]==='file'?_0x3c24c1[_0x40baa7(0x12b)]:undefined;if(!_0x104bf7&&!existsSync(_0x3e7b47))return console[_0x40baa7(0x119)](a38_0x37a4cf[_0x40baa7(0x128)]('Error:\x20Directory\x20not\x20found:\x20'+_0x3e7b47+'\x0a')),0x1;let _0x129d73;if(_0x104bf7){if(!_0x104bf7['endsWith'](_0x40baa7(0x136))&&!_0x104bf7[_0x40baa7(0x125)]('.yaml'))return console['error'](a38_0x37a4cf['red'](_0x40baa7(0x13e)+_0x104bf7+'\x0a')),0x1;_0x129d73=[_0x104bf7];}else _0x129d73=findYamlFiles(_0x3e7b47);if(_0x129d73[_0x40baa7(0x147)]===0x0)return console[_0x40baa7(0x119)](a38_0x37a4cf['red'](_0x40baa7(0x129)+_0x3e7b47+'\x0a')),0x1;const _0x5ab35e=validateYamlFiles(_0x129d73,_0x3e7b47),_0x55eba5=calculateSummary(_0x5ab35e);for(const _0x34be63 of _0x5ab35e){if(!isValidationResult(_0x34be63))continue;const {relativePath:_0x39bf51,source:_0x27abf9,result:_0x4f4ff8,fileType:_0x3dd912}=_0x34be63,_0x6188fd=_0x3dd912;if(_0x4f4ff8['valid']&&_0x4f4ff8[_0x40baa7(0x130)][_0x40baa7(0x147)]===0x0)_0x2f4f06[_0x40baa7(0x122)]&&console['log'](a38_0x37a4cf[_0x40baa7(0x127)]('✔\x20'+_0x39bf51)+a38_0x37a4cf[_0x40baa7(0x12e)]('\x20('+_0x6188fd+')'));else _0x4f4ff8[_0x40baa7(0x138)]?(console['log'](a38_0x37a4cf[_0x40baa7(0x146)]('⚠\x20'+_0x39bf51)+a38_0x37a4cf[_0x40baa7(0x12e)]('\x20('+_0x6188fd+'):\x20'+_0x4f4ff8[_0x40baa7(0x130)]['length']+_0x40baa7(0x13f))),console['log'](formatValidationResult(_0x4f4ff8,_0x27abf9,_0x39bf51))):(console[_0x40baa7(0x133)](a38_0x37a4cf['red']('✖\x20'+_0x39bf51)+a38_0x37a4cf[_0x40baa7(0x12e)]('\x20('+_0x6188fd+_0x40baa7(0x11a)+_0x4f4ff8[_0x40baa7(0x121)][_0x40baa7(0x147)]+_0x40baa7(0x13c))),console[_0x40baa7(0x133)](formatValidationResult(_0x4f4ff8,_0x27abf9,_0x39bf51)));}return console[_0x40baa7(0x133)](''),_0x55eba5[_0x40baa7(0x12a)]?(console[_0x40baa7(0x133)](a38_0x37a4cf[_0x40baa7(0x128)]('Validation\x20failed:\x20'+_0x55eba5['invalidCount']+'\x20file(s)\x20with\x20errors,\x20'+_0x55eba5[_0x40baa7(0x139)]+_0x40baa7(0x123))),_0x55eba5[_0x40baa7(0x116)]>0x0&&console[_0x40baa7(0x133)](a38_0x37a4cf[_0x40baa7(0x146)](_0x55eba5[_0x40baa7(0x116)]+'\x20warning(s)\x20found')),0x1):(console[_0x40baa7(0x133)](a38_0x37a4cf[_0x40baa7(0x127)](_0x40baa7(0x144)+_0x55eba5[_0x40baa7(0x139)]+_0x40baa7(0x11b))),_0x55eba5[_0x40baa7(0x116)]>0x0&&console[_0x40baa7(0x133)](a38_0x37a4cf[_0x40baa7(0x146)](_0x55eba5[_0x40baa7(0x116)]+_0x40baa7(0x117))),0x0);}}function a38_0x1ccc(){const _0x56dc0b=['64166fuqlfj','✔\x20All\x20','Usage:\x20tdx\x20sg\x20validate\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Validate\x20all\x20(requires\x20context)','yellow','length','warningCount','\x20warning(s)\x20found','79009wYVAod','error','):\x20','\x20file(s)\x20valid','15ffnouR','48DIUqht','helpText','no_parent','\x20\x20\x20\x20\x20\x20\x20tdx\x20sg\x20validate\x20<file_path>\x20\x20#\x20Validate\x20specific\x20file','errors','verbose','\x20valid','185468nKnftn','endsWith','323469cmwRJT','green','red','Error:\x20No\x20YAML\x20files\x20found\x20in\x20','hasErrors','filePath','Error:\x20','name','dim','255904bNtcny','warnings','errorCode','type','log','parentSegment','targetDir','.yml','112090XUZvtH','valid','validCount','cwd','331520kGPhFh','\x20error(s)','\x20\x20\x20\x20\x20\x20\x20tdx\x20sg\x20validate\x20.\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Validate\x20current\x20directory','Error:\x20File\x20must\x20have\x20.yml\x20or\x20.yaml\x20extension:\x20','\x20warning(s)','message','description','cyan'];a38_0x1ccc=function(){return _0x56dc0b;};return a38_0x1ccc();}
@@ -1 +1 @@
1
- function a39_0x229e(_0x42a075,_0x1d51a5){_0x42a075=_0x42a075-0x1a9;const _0x3bfa89=a39_0x3bfa();let _0x229e72=_0x3bfa89[_0x42a075];return _0x229e72;}const a39_0x302f6c=a39_0x229e;(function(_0x3ccfc6,_0x2f9690){const _0x32361a=a39_0x229e,_0x137815=_0x3ccfc6();while(!![]){try{const _0x4a61b2=-parseInt(_0x32361a(0x1aa))/0x1*(-parseInt(_0x32361a(0x1d9))/0x2)+-parseInt(_0x32361a(0x1b0))/0x3*(parseInt(_0x32361a(0x1d5))/0x4)+-parseInt(_0x32361a(0x1ab))/0x5+parseInt(_0x32361a(0x1e6))/0x6+-parseInt(_0x32361a(0x1d0))/0x7*(parseInt(_0x32361a(0x1c0))/0x8)+-parseInt(_0x32361a(0x1ae))/0x9+parseInt(_0x32361a(0x1d7))/0xa*(parseInt(_0x32361a(0x1b7))/0xb);if(_0x4a61b2===_0x2f9690)break;else _0x137815['push'](_0x137815['shift']());}catch(_0x222744){_0x137815['push'](_0x137815['shift']());}}}(a39_0x3bfa,0x8e155));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleSDKOutput}from'../core/command-output.js';import{withSpinner}from'../utils/spinner.js';import{formatFlatList,formatTree}from'../sdk/util/tree-formatter.js';import{getConsoleNextUrl}from'../sdk/client/endpoints.js';import a39_0x316d8a from'chalk';export class SegmentsCommand extends BaseCommand{[a39_0x302f6c(0x1eb)]=a39_0x302f6c(0x1c4);[a39_0x302f6c(0x1ee)]=a39_0x302f6c(0x1e2);async[a39_0x302f6c(0x1cc)](_0x2e6fca){const _0x1acf1d=a39_0x302f6c,{options:_0x1e9e8a,args:_0x3d8713}=_0x2e6fca,_0x41caa3=_0x1e9e8a['recursive'],_0x1e9cfc=_0x3d8713[0x0];try{const _0x213588=_0x1e9e8a[_0x1acf1d(0x1bf)];_0x1e9e8a[_0x1acf1d(0x1bc)]&&(console['error'](_0x1acf1d(0x1c8)+_0x1e9e8a[_0x1acf1d(0x1ea)]),console['error'](_0x1acf1d(0x1dc)+(_0x213588||_0x1acf1d(0x1bd))),_0x1e9cfc&&console['error']('Folder/pattern\x20arg:\x20'+_0x1e9cfc),_0x41caa3&&console['error'](_0x1acf1d(0x1a9)));if(!_0x213588)return console[_0x1acf1d(0x1c9)](_0x1acf1d(0x1f7)),console['error'](''),console[_0x1acf1d(0x1c9)](_0x1acf1d(0x1ce)),console[_0x1acf1d(0x1c9)]('\x20\x20tdx\x20sg\x20pull\x20\x22My\x20Audience\x22'),console[_0x1acf1d(0x1c9)](_0x1acf1d(0x1df)),console[_0x1acf1d(0x1c9)](''),console[_0x1acf1d(0x1c9)](_0x1acf1d(0x1bb)),0x1;const _0x14abc7=_0x1e9cfc&&(_0x1e9cfc[_0x1acf1d(0x1e1)]('*')||_0x1e9cfc[_0x1acf1d(0x1e1)]('?'));if(_0x14abc7)return await this[_0x1acf1d(0x1e8)](_0x2e6fca,_0x213588,_0x1e9cfc);const _0x4a21a8=_0x1e9cfc?_0x213588+'/'+_0x1e9cfc:_0x213588;return _0x41caa3?await this[_0x1acf1d(0x1de)](_0x2e6fca,_0x4a21a8):await this['listUnified'](_0x2e6fca,_0x4a21a8);}catch(_0xf24176){if(_0xf24176 instanceof SDKError)return console[_0x1acf1d(0x1c9)](_0x1acf1d(0x1c3)+_0xf24176[_0x1acf1d(0x1c2)]),_0xf24176[_0x1acf1d(0x1b2)]&&console[_0x1acf1d(0x1c9)](_0x1acf1d(0x1db)+_0xf24176[_0x1acf1d(0x1b2)]),0x1;throw _0xf24176;}}async[a39_0x302f6c(0x1e8)](_0x4ad1c7,_0x4542a1,_0x1c5d42){const _0x1fe6d8=a39_0x302f6c,{options:_0xf1c58c,tdx:_0x598973}=_0x4ad1c7,_0x4103e0=await withSpinner(_0x1fe6d8(0x1ed)+_0x4542a1+_0x1fe6d8(0x1cf),()=>_0x598973[_0x1fe6d8(0x1f8)][_0x1fe6d8(0x1ec)](_0x4542a1),{'verbose':_0xf1c58c[_0x1fe6d8(0x1bc)]}),_0x246f03=_0x4103e0[_0x1fe6d8(0x1f0)],_0x29abdf=await withSpinner('Listing\x20folders,\x20segments,\x20and\x20journeys...',()=>_0x598973[_0x1fe6d8(0x1f8)][_0x1fe6d8(0x1d3)](_0x246f03[_0x1fe6d8(0x1f5)],_0x246f03[_0x1fe6d8(0x1b1)]),{'verbose':_0xf1c58c['verbose']}),{folders:_0xc2bc43,segments:_0x5570ef,journeys:_0x447fe2}=_0x29abdf['data'],_0xd7c2c0=_0x1c5d42[_0x1fe6d8(0x1c5)](/[.+^${}()|[\]\\]/g,_0x1fe6d8(0x1e7))[_0x1fe6d8(0x1c5)](/\*/g,'.*')[_0x1fe6d8(0x1c5)](/\?/g,'.'),_0x2158f9=new RegExp('^'+_0xd7c2c0+'$','i'),_0x2074ac=_0xc2bc43['filter'](_0x15bf96=>_0x2158f9['test'](_0x15bf96[_0x1fe6d8(0x1eb)])),_0x28ed66=_0x5570ef[_0x1fe6d8(0x1dd)](_0x360f19=>_0x2158f9[_0x1fe6d8(0x1cd)](_0x360f19[_0x1fe6d8(0x1eb)])),_0x4965c0=_0x447fe2[_0x1fe6d8(0x1dd)](_0x229e88=>_0x2158f9['test'](_0x229e88[_0x1fe6d8(0x1b5)])),_0x45ffe7=_0x2074ac[_0x1fe6d8(0x1d8)]+_0x28ed66[_0x1fe6d8(0x1d8)]+_0x4965c0[_0x1fe6d8(0x1d8)];console['error'](_0x1fe6d8(0x1f4)+_0x2074ac['length']+'\x20folder'+(_0x2074ac['length']!==0x1?'s':'')+',\x20'+_0x28ed66[_0x1fe6d8(0x1d8)]+_0x1fe6d8(0x1c1)+(_0x28ed66[_0x1fe6d8(0x1d8)]!==0x1?'s':'')+',\x20and\x20'+_0x4965c0[_0x1fe6d8(0x1d8)]+_0x1fe6d8(0x1be)+(_0x4965c0[_0x1fe6d8(0x1d8)]!==0x1?'s':'')+_0x1fe6d8(0x1b6)+_0x1c5d42+'\x27');const _0xf12e6d=_0x10036b=>{const _0x2ff8c8=_0x1fe6d8;return getConsoleNextUrl(_0xf1c58c[_0x2ff8c8(0x1ea)],_0x2ff8c8(0x1f9)+_0x246f03[_0x2ff8c8(0x1f5)]+_0x2ff8c8(0x1ac)+_0x10036b);},_0x535ad7=_0xf1c58c[_0x1fe6d8(0x1b4)]==='json'||_0xf1c58c[_0x1fe6d8(0x1b4)]===_0x1fe6d8(0x1c7);if(_0x535ad7){const _0x15e374=[..._0x2074ac['map'](_0x3fdfa2=>({..._0x3fdfa2,'type':'folder'})),..._0x28ed66[_0x1fe6d8(0x1e9)](_0x2e9a0f=>({..._0x2e9a0f,'type':'segment','url':_0xf12e6d(_0x2e9a0f['id'])})),..._0x4965c0[_0x1fe6d8(0x1e9)](_0x32fd47=>({..._0x32fd47,'name':_0x32fd47[_0x1fe6d8(0x1b5)],'type':_0x1fe6d8(0x1d2)}))][_0x1fe6d8(0x1f1)]((_0x56f28c,_0x2d0e0a)=>_0x56f28c[_0x1fe6d8(0x1eb)][_0x1fe6d8(0x1d6)](_0x2d0e0a[_0x1fe6d8(0x1eb)]));await handleSDKOutput(_0x15e374,_0xf1c58c);}else{if(_0x45ffe7===0x0)console['log'](_0x1fe6d8(0x1f3)+_0x1c5d42);else{console[_0x1fe6d8(0x1cb)](a39_0x316d8a[_0x1fe6d8(0x1e3)]('['+_0x4542a1+_0x1fe6d8(0x1ef)+_0x1c5d42+'\x27'));const _0x5e60b4=formatFlatList(_0x2074ac,_0x28ed66,{'showMetadata':!![],'getSegmentUrl':_0xf12e6d},_0x4965c0);console[_0x1fe6d8(0x1cb)](_0x5e60b4);}}return 0x0;}async[a39_0x302f6c(0x1e5)](_0x48acd1,_0x546588){const _0x2a2be0=a39_0x302f6c,{options:_0x27fab9,tdx:_0x55000d}=_0x48acd1,_0x4b43fd=await withSpinner(_0x2a2be0(0x1c6)+_0x546588+_0x2a2be0(0x1cf),()=>_0x55000d['segment']['resolvePathToResource'](_0x546588),{'verbose':_0x27fab9['verbose']}),_0xf9a284=_0x4b43fd[_0x2a2be0(0x1f0)];_0x27fab9[_0x2a2be0(0x1bc)]&&(console['error'](_0x2a2be0(0x1d4)+_0xf9a284[_0x2a2be0(0x1f5)]),_0xf9a284[_0x2a2be0(0x1b1)]&&console['error']('Folder\x20ID:\x20'+_0xf9a284[_0x2a2be0(0x1b1)]));const _0x426b31=await withSpinner(_0x2a2be0(0x1b8),()=>_0x55000d[_0x2a2be0(0x1f8)][_0x2a2be0(0x1d3)](_0xf9a284['parentId'],_0xf9a284[_0x2a2be0(0x1b1)]),{'verbose':_0x27fab9[_0x2a2be0(0x1bc)]}),{folders:_0x264e8b,segments:_0x413ec0,journeys:_0x3b4695}=_0x426b31[_0x2a2be0(0x1f0)],_0x567d2b=_0x264e8b[_0x2a2be0(0x1d8)]+_0x413ec0[_0x2a2be0(0x1d8)]+_0x3b4695['length'];console[_0x2a2be0(0x1c9)](_0x2a2be0(0x1f4)+_0x264e8b[_0x2a2be0(0x1d8)]+_0x2a2be0(0x1b9)+(_0x264e8b[_0x2a2be0(0x1d8)]!==0x1?'s':'')+',\x20'+_0x413ec0[_0x2a2be0(0x1d8)]+_0x2a2be0(0x1c1)+(_0x413ec0['length']!==0x1?'s':'')+_0x2a2be0(0x1ca)+_0x3b4695['length']+_0x2a2be0(0x1be)+(_0x3b4695[_0x2a2be0(0x1d8)]!==0x1?'s':''));const _0x1a3575=_0x17e82f=>{const _0x21fd9f=_0x2a2be0;return getConsoleNextUrl(_0x27fab9[_0x21fd9f(0x1ea)],'/app/ps/'+_0xf9a284[_0x21fd9f(0x1f5)]+_0x21fd9f(0x1ac)+_0x17e82f);},_0x3c12c1=_0x4c84c3=>{const _0x1618ad=_0x2a2be0;return getConsoleNextUrl(_0x27fab9[_0x1618ad(0x1ea)],_0x1618ad(0x1f9)+_0xf9a284['parentId']+_0x1618ad(0x1ac)+_0x4c84c3+_0x1618ad(0x1af));},_0x5b7953=_0x27fab9[_0x2a2be0(0x1b4)]==='json'||_0x27fab9[_0x2a2be0(0x1b4)]===_0x2a2be0(0x1c7);if(_0x5b7953){const _0xae926b=[..._0x264e8b['map'](_0x486efb=>({..._0x486efb,'type':_0x2a2be0(0x1da)})),..._0x413ec0[_0x2a2be0(0x1e9)](_0x48fad3=>({..._0x48fad3,'type':_0x2a2be0(0x1f8),'url':_0x1a3575(_0x48fad3['id'])})),..._0x3b4695[_0x2a2be0(0x1e9)](_0x9ea29b=>({..._0x9ea29b,'name':_0x9ea29b[_0x2a2be0(0x1b5)],'type':_0x2a2be0(0x1d2),'url':_0x3c12c1(_0x9ea29b['id'])}))]['sort']((_0x278e3d,_0x7adec5)=>_0x278e3d[_0x2a2be0(0x1eb)][_0x2a2be0(0x1d6)](_0x7adec5[_0x2a2be0(0x1eb)]));await handleSDKOutput(_0xae926b,_0x27fab9);}else{if(_0x567d2b===0x0)console[_0x2a2be0(0x1cb)](a39_0x316d8a[_0x2a2be0(0x1e3)]('['+_0x546588+']')),console['log']('(empty)');else{console[_0x2a2be0(0x1cb)](a39_0x316d8a['dim']('['+_0x546588+']'));const _0xfee867=formatFlatList(_0x264e8b,_0x413ec0,{'showMetadata':!![],'getSegmentUrl':_0x1a3575,'getJourneyUrl':_0x3c12c1},_0x3b4695);console[_0x2a2be0(0x1cb)](_0xfee867);}}return 0x0;}async['listRecursive'](_0x5efd27,_0x2328de){const _0x37599a=a39_0x302f6c,{options:_0x3cb16d,tdx:_0x102df7}=_0x5efd27,_0x24dd1e=await withSpinner('Resolving\x20path\x20\x27'+_0x2328de+_0x37599a(0x1cf),()=>_0x102df7[_0x37599a(0x1f8)][_0x37599a(0x1ec)](_0x2328de),{'verbose':_0x3cb16d['verbose']}),_0x4ed5c5=_0x24dd1e[_0x37599a(0x1f0)];_0x3cb16d[_0x37599a(0x1bc)]&&(console[_0x37599a(0x1c9)](_0x37599a(0x1d4)+_0x4ed5c5[_0x37599a(0x1f5)]),_0x4ed5c5[_0x37599a(0x1b1)]&&console[_0x37599a(0x1c9)](_0x37599a(0x1f2)+_0x4ed5c5['folderId']));const _0xea5e8e=_0x3cb16d[_0x37599a(0x1e4)]||0xa,_0x439437=await withSpinner(_0x37599a(0x1f6),()=>_0x102df7[_0x37599a(0x1f8)][_0x37599a(0x1de)](_0x4ed5c5['parentId'],_0x4ed5c5[_0x37599a(0x1b1)],0x0,_0xea5e8e),{'verbose':_0x3cb16d[_0x37599a(0x1bc)]}),_0x4d05f6=_0x439437['data'],_0x3ac5af=_0x38acca=>{const _0x1a8584=_0x37599a;let _0x48f055=0x0,_0x3bbdf9=0x0,_0x3ffb9b=0x0;for(const _0x4e466e of _0x38acca){if(_0x4e466e['type']===_0x1a8584(0x1da))_0x48f055++;else{if(_0x4e466e[_0x1a8584(0x1fa)]===_0x1a8584(0x1f8))_0x3bbdf9++;else{if(_0x4e466e[_0x1a8584(0x1fa)]===_0x1a8584(0x1d2))_0x3ffb9b++;}}if(_0x4e466e[_0x1a8584(0x1e0)]){const _0xf60b34=_0x3ac5af(_0x4e466e[_0x1a8584(0x1e0)]);_0x48f055+=_0xf60b34[_0x1a8584(0x1b3)],_0x3bbdf9+=_0xf60b34[_0x1a8584(0x1c4)],_0x3ffb9b+=_0xf60b34['journeys'];}}return{'folders':_0x48f055,'segments':_0x3bbdf9,'journeys':_0x3ffb9b};},_0x55b63c=_0x3ac5af(_0x4d05f6);console[_0x37599a(0x1c9)](_0x37599a(0x1ba)+_0x55b63c[_0x37599a(0x1b3)]+_0x37599a(0x1b9)+(_0x55b63c[_0x37599a(0x1b3)]!==0x1?'s':'')+',\x20'+_0x55b63c[_0x37599a(0x1c4)]+'\x20segment'+(_0x55b63c['segments']!==0x1?'s':'')+_0x37599a(0x1ca)+_0x55b63c[_0x37599a(0x1d1)]+_0x37599a(0x1be)+(_0x55b63c[_0x37599a(0x1d1)]!==0x1?'s':''));const _0x51819=_0x192449=>{const _0xf65eeb=_0x37599a;return getConsoleNextUrl(_0x3cb16d[_0xf65eeb(0x1ea)],_0xf65eeb(0x1f9)+_0x4ed5c5['parentId']+'/e/'+_0x192449);},_0x474893=_0x1abec7=>{const _0x55974c=_0x37599a;return getConsoleNextUrl(_0x3cb16d[_0x55974c(0x1ea)],'/app/ps/'+_0x4ed5c5['parentId']+_0x55974c(0x1ac)+_0x1abec7+_0x55974c(0x1af));};if(_0x3cb16d['format']===_0x37599a(0x1ad)||_0x3cb16d['format']===_0x37599a(0x1c7))await handleSDKOutput(_0x4d05f6,_0x3cb16d);else{console['log'](a39_0x316d8a[_0x37599a(0x1e3)]('['+_0x2328de+']'));const _0x133ccd=formatTree(_0x4d05f6,{'showMetadata':!![],'getSegmentUrl':_0x51819,'getJourneyUrl':_0x474893});console[_0x37599a(0x1cb)](_0x133ccd);}return 0x0;}}function a39_0x3bfa(){const _0x368998=['Recursive\x20mode:\x20enabled','1060355JSNSJH','419240PDQQYH','/e/','json','9911223jkeZUV','/j/da','1461462gUlRdl','folderId','cause','folders','format','journeyBundleName','\x20matching\x20\x27','312719anCfOp','Listing\x20folders,\x20segments,\x20and\x20journeys...','\x20folder','✔\x20Built\x20tree\x20with\x20','Use\x20tdx\x20ps\x20list\x20to\x20see\x20available\x20parent\x20segments.','verbose','(not\x20set)','\x20journey','parentSegment','40952NgvAPJ','\x20segment','message','Error:\x20','segments','replace','Resolving\x20path\x20\x27','jsonl','Site:\x20','error',',\x20and\x20','log','execute','test','Set\x20a\x20parent\x20segment\x20context\x20first:','\x27...','7iMpBvB','journeys','journey','listUnifiedWithJourneys','Parent\x20ID:\x20','4ccwsfX','localeCompare','150begiHY','length','2YomyzU','folder','\x20\x20Cause:\x20','Parent\x20segment\x20context:\x20','filter','listRecursive','\x20\x20tdx\x20sg\x20use\x20\x22My\x20Audience\x22','children','includes','List\x20folders\x20and\x20child\x20segments','dim','maxDepth','listUnified','4635306pUquuW','\x5c$&','listWithPattern','map','site','name','resolvePathToResource','Resolving\x20parent\x20segment\x20\x27','description',']\x20matching\x20\x27','data','sort','Folder\x20ID:\x20','No\x20items\x20match\x20pattern:\x20','✔\x20Found\x20','parentId','Building\x20hierarchy\x20tree...','Error:\x20No\x20parent\x20segment\x20context\x20set.','segment','/app/ps/','type'];a39_0x3bfa=function(){return _0x368998;};return a39_0x3bfa();}
1
+ const a39_0x5ce2b6=a39_0x4ef1;(function(_0x1de532,_0x3dd023){const _0x4d7cf1=a39_0x4ef1,_0x103e4c=_0x1de532();while(!![]){try{const _0x40f305=-parseInt(_0x4d7cf1(0x76))/0x1*(parseInt(_0x4d7cf1(0xa8))/0x2)+parseInt(_0x4d7cf1(0x7a))/0x3+-parseInt(_0x4d7cf1(0x91))/0x4*(-parseInt(_0x4d7cf1(0xb3))/0x5)+parseInt(_0x4d7cf1(0x89))/0x6+-parseInt(_0x4d7cf1(0x9e))/0x7*(parseInt(_0x4d7cf1(0x74))/0x8)+-parseInt(_0x4d7cf1(0x71))/0x9+parseInt(_0x4d7cf1(0xa4))/0xa;if(_0x40f305===_0x3dd023)break;else _0x103e4c['push'](_0x103e4c['shift']());}catch(_0x471481){_0x103e4c['push'](_0x103e4c['shift']());}}}(a39_0xeba8,0x79c67));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleSDKOutput}from'../core/command-output.js';import{withSpinner}from'../utils/spinner.js';import{formatFlatList,formatTree}from'../sdk/util/tree-formatter.js';import{getConsoleNextUrl}from'../sdk/client/endpoints.js';function a39_0xeba8(){const _0x1a0717=['68kOJZnV','verbose','test','listUnifiedWithJourneys','children','maxDepth','Listing\x20folders,\x20segments,\x20and\x20journeys...','listUnified','No\x20items\x20match\x20pattern:\x20','message','segments','List\x20folders\x20and\x20child\x20segments','replace','5078031LLvFSk','Parent\x20segment\x20context:\x20','folderId',',\x20and\x20','Folder\x20ID:\x20','\x20segment','11000280GLGfcv','parentId','journeyBundleName','filter','502GuggJt','Error:\x20','/j/da','Site:\x20','log','type','jsonl','data','description','\x27...','dim','132980ynUYNZ','\x20\x20tdx\x20sg\x20pull\x20\x22My\x20Audience\x22','Building\x20hierarchy\x20tree...','Resolving\x20path\x20\x27','execute',']\x20matching\x20\x27','(empty)','Recursive\x20mode:\x20enabled','/e/','site','✔\x20Found\x20','4272543pNnLni','journeys','resolvePathToResource','8UtPCDM','(not\x20set)','2942NRYQEM','Parent\x20ID:\x20','/app/ps/','includes','1538556ObJEHP','\x20matching\x20\x27','Use\x20tdx\x20ps\x20list\x20to\x20see\x20available\x20parent\x20segments.','\x20journey','\x20folder','length','error','Error:\x20No\x20parent\x20segment\x20context\x20set.','Set\x20a\x20parent\x20segment\x20context\x20first:','localeCompare','journey','json','segment','format','listRecursive','2234286vrkNcO','folders','map','listWithPattern','Resolving\x20parent\x20segment\x20\x27','recursive','name','Folder/pattern\x20arg:\x20'];a39_0xeba8=function(){return _0x1a0717;};return a39_0xeba8();}function a39_0x4ef1(_0x34cf23,_0x445d19){_0x34cf23=_0x34cf23-0x6f;const _0xeba86d=a39_0xeba8();let _0x4ef1dc=_0xeba86d[_0x34cf23];return _0x4ef1dc;}import a39_0x550de9 from'chalk';export class SegmentsCommand extends BaseCommand{['name']=a39_0x5ce2b6(0x9b);[a39_0x5ce2b6(0xb0)]=a39_0x5ce2b6(0x9c);async[a39_0x5ce2b6(0xb7)](_0xf43918){const _0x501ee5=a39_0x5ce2b6,{options:_0xb9a5,args:_0x371a89}=_0xf43918,_0x3b2cae=_0xb9a5[_0x501ee5(0x8e)],_0x1cc80c=_0x371a89[0x0];try{const _0x3cb21d=_0xb9a5['parentSegment'];_0xb9a5['verbose']&&(console[_0x501ee5(0x80)](_0x501ee5(0xab)+_0xb9a5[_0x501ee5(0x6f)]),console[_0x501ee5(0x80)](_0x501ee5(0x9f)+(_0x3cb21d||_0x501ee5(0x75))),_0x1cc80c&&console[_0x501ee5(0x80)](_0x501ee5(0x90)+_0x1cc80c),_0x3b2cae&&console[_0x501ee5(0x80)](_0x501ee5(0xba)));if(!_0x3cb21d)return console[_0x501ee5(0x80)](_0x501ee5(0x81)),console[_0x501ee5(0x80)](''),console[_0x501ee5(0x80)](_0x501ee5(0x82)),console[_0x501ee5(0x80)](_0x501ee5(0xb4)),console[_0x501ee5(0x80)]('\x20\x20tdx\x20sg\x20use\x20\x22My\x20Audience\x22'),console[_0x501ee5(0x80)](''),console[_0x501ee5(0x80)](_0x501ee5(0x7c)),0x1;const _0x424419=_0x1cc80c&&(_0x1cc80c[_0x501ee5(0x79)]('*')||_0x1cc80c[_0x501ee5(0x79)]('?'));if(_0x424419)return await this[_0x501ee5(0x8c)](_0xf43918,_0x3cb21d,_0x1cc80c);const _0x4f66a5=_0x1cc80c?_0x3cb21d+'/'+_0x1cc80c:_0x3cb21d;return _0x3b2cae?await this[_0x501ee5(0x88)](_0xf43918,_0x4f66a5):await this['listUnified'](_0xf43918,_0x4f66a5);}catch(_0x13744c){if(_0x13744c instanceof SDKError)return console['error'](_0x501ee5(0xa9)+_0x13744c[_0x501ee5(0x9a)]),_0x13744c['cause']&&console[_0x501ee5(0x80)]('\x20\x20Cause:\x20'+_0x13744c['cause']),0x1;throw _0x13744c;}}async[a39_0x5ce2b6(0x8c)](_0x11c860,_0x1e4cce,_0x861890){const _0x483afe=a39_0x5ce2b6,{options:_0xd2c7d2,tdx:_0x1f3559}=_0x11c860,_0x5964c0=await withSpinner(_0x483afe(0x8d)+_0x1e4cce+_0x483afe(0xb1),()=>_0x1f3559['segment'][_0x483afe(0x73)](_0x1e4cce),{'verbose':_0xd2c7d2[_0x483afe(0x92)]}),_0x28a63b=_0x5964c0[_0x483afe(0xaf)],_0x48d8b2=await withSpinner(_0x483afe(0x97),()=>_0x1f3559['segment'][_0x483afe(0x94)](_0x28a63b[_0x483afe(0xa5)],_0x28a63b[_0x483afe(0xa0)]),{'verbose':_0xd2c7d2[_0x483afe(0x92)]}),{folders:_0x33f760,segments:_0x2ce15e,journeys:_0x1b386c}=_0x48d8b2[_0x483afe(0xaf)],_0x12f597=_0x861890[_0x483afe(0x9d)](/[.+^${}()|[\]\\]/g,'\x5c$&')['replace'](/\*/g,'.*')['replace'](/\?/g,'.'),_0x13b21d=new RegExp('^'+_0x12f597+'$','i'),_0x54135b=_0x33f760['filter'](_0x5ab5b5=>_0x13b21d[_0x483afe(0x93)](_0x5ab5b5[_0x483afe(0x8f)])),_0x2b6447=_0x2ce15e['filter'](_0x1cfe9e=>_0x13b21d['test'](_0x1cfe9e[_0x483afe(0x8f)])),_0x1aaeee=_0x1b386c[_0x483afe(0xa7)](_0x2a6288=>_0x13b21d[_0x483afe(0x93)](_0x2a6288[_0x483afe(0xa6)])),_0x2af11a=_0x54135b['length']+_0x2b6447[_0x483afe(0x7f)]+_0x1aaeee[_0x483afe(0x7f)];console['error'](_0x483afe(0x70)+_0x54135b[_0x483afe(0x7f)]+'\x20folder'+(_0x54135b[_0x483afe(0x7f)]!==0x1?'s':'')+',\x20'+_0x2b6447[_0x483afe(0x7f)]+'\x20segment'+(_0x2b6447['length']!==0x1?'s':'')+_0x483afe(0xa1)+_0x1aaeee[_0x483afe(0x7f)]+_0x483afe(0x7d)+(_0x1aaeee[_0x483afe(0x7f)]!==0x1?'s':'')+_0x483afe(0x7b)+_0x861890+'\x27');const _0x4f4333=_0x3d12ab=>{const _0xb155a1=_0x483afe;return getConsoleNextUrl(_0xd2c7d2[_0xb155a1(0x6f)],'/app/ps/'+_0x28a63b['parentId']+_0xb155a1(0xbb)+_0x3d12ab);},_0x3794c0=_0xd2c7d2[_0x483afe(0x87)]===_0x483afe(0x85)||_0xd2c7d2[_0x483afe(0x87)]==='jsonl';if(_0x3794c0){const _0x55c755=[..._0x54135b['map'](_0x4f10b3=>({..._0x4f10b3,'type':'folder'})),..._0x2b6447[_0x483afe(0x8b)](_0x168431=>({..._0x168431,'type':_0x483afe(0x86),'url':_0x4f4333(_0x168431['id'])})),..._0x1aaeee[_0x483afe(0x8b)](_0x470600=>({..._0x470600,'name':_0x470600[_0x483afe(0xa6)],'type':_0x483afe(0x84)}))]['sort']((_0x1f583b,_0x475672)=>_0x1f583b[_0x483afe(0x8f)][_0x483afe(0x83)](_0x475672[_0x483afe(0x8f)]));await handleSDKOutput(_0x55c755,_0xd2c7d2);}else{if(_0x2af11a===0x0)console[_0x483afe(0xac)](_0x483afe(0x99)+_0x861890);else{console[_0x483afe(0xac)](a39_0x550de9[_0x483afe(0xb2)]('['+_0x1e4cce+_0x483afe(0xb8)+_0x861890+'\x27'));const _0x26322e=formatFlatList(_0x54135b,_0x2b6447,{'showMetadata':!![],'getSegmentUrl':_0x4f4333},_0x1aaeee);console[_0x483afe(0xac)](_0x26322e);}}return 0x0;}async[a39_0x5ce2b6(0x98)](_0x1ea7ea,_0x4b569a){const _0x13f1df=a39_0x5ce2b6,{options:_0x24079e,tdx:_0x1cd724}=_0x1ea7ea,_0x4d7f22=await withSpinner(_0x13f1df(0xb6)+_0x4b569a+'\x27...',()=>_0x1cd724[_0x13f1df(0x86)][_0x13f1df(0x73)](_0x4b569a),{'verbose':_0x24079e['verbose']}),_0x2e5ff3=_0x4d7f22['data'];_0x24079e[_0x13f1df(0x92)]&&(console[_0x13f1df(0x80)](_0x13f1df(0x77)+_0x2e5ff3[_0x13f1df(0xa5)]),_0x2e5ff3[_0x13f1df(0xa0)]&&console[_0x13f1df(0x80)](_0x13f1df(0xa2)+_0x2e5ff3[_0x13f1df(0xa0)]));const _0x229b68=await withSpinner(_0x13f1df(0x97),()=>_0x1cd724[_0x13f1df(0x86)][_0x13f1df(0x94)](_0x2e5ff3[_0x13f1df(0xa5)],_0x2e5ff3[_0x13f1df(0xa0)]),{'verbose':_0x24079e['verbose']}),{folders:_0x249bf3,segments:_0x2e7806,journeys:_0x3dfdce}=_0x229b68[_0x13f1df(0xaf)],_0x4abcdf=_0x249bf3[_0x13f1df(0x7f)]+_0x2e7806[_0x13f1df(0x7f)]+_0x3dfdce[_0x13f1df(0x7f)];console[_0x13f1df(0x80)](_0x13f1df(0x70)+_0x249bf3['length']+_0x13f1df(0x7e)+(_0x249bf3[_0x13f1df(0x7f)]!==0x1?'s':'')+',\x20'+_0x2e7806['length']+_0x13f1df(0xa3)+(_0x2e7806[_0x13f1df(0x7f)]!==0x1?'s':'')+_0x13f1df(0xa1)+_0x3dfdce['length']+_0x13f1df(0x7d)+(_0x3dfdce[_0x13f1df(0x7f)]!==0x1?'s':''));const _0x1ec44a=_0x2d8d07=>{const _0xc77b54=_0x13f1df;return getConsoleNextUrl(_0x24079e[_0xc77b54(0x6f)],'/app/ps/'+_0x2e5ff3[_0xc77b54(0xa5)]+_0xc77b54(0xbb)+_0x2d8d07);},_0x470f2b=_0x77c3d9=>{const _0x1ea540=_0x13f1df;return getConsoleNextUrl(_0x24079e[_0x1ea540(0x6f)],_0x1ea540(0x78)+_0x2e5ff3['parentId']+'/e/'+_0x77c3d9+_0x1ea540(0xaa));},_0x59581d=_0x24079e[_0x13f1df(0x87)]===_0x13f1df(0x85)||_0x24079e[_0x13f1df(0x87)]===_0x13f1df(0xae);if(_0x59581d){const _0xbf7793=[..._0x249bf3[_0x13f1df(0x8b)](_0x10dfcc=>({..._0x10dfcc,'type':'folder'})),..._0x2e7806['map'](_0x47c835=>({..._0x47c835,'type':'segment','url':_0x1ec44a(_0x47c835['id'])})),..._0x3dfdce[_0x13f1df(0x8b)](_0x581808=>({..._0x581808,'name':_0x581808['journeyBundleName'],'type':_0x13f1df(0x84),'url':_0x470f2b(_0x581808['id'])}))]['sort']((_0x592f32,_0x31915f)=>_0x592f32['name'][_0x13f1df(0x83)](_0x31915f[_0x13f1df(0x8f)]));await handleSDKOutput(_0xbf7793,_0x24079e);}else{if(_0x4abcdf===0x0)console[_0x13f1df(0xac)](a39_0x550de9['dim']('['+_0x4b569a+']')),console[_0x13f1df(0xac)](_0x13f1df(0xb9));else{console[_0x13f1df(0xac)](a39_0x550de9['dim']('['+_0x4b569a+']'));const _0x4f2d1e=formatFlatList(_0x249bf3,_0x2e7806,{'showMetadata':!![],'getSegmentUrl':_0x1ec44a,'getJourneyUrl':_0x470f2b},_0x3dfdce);console['log'](_0x4f2d1e);}}return 0x0;}async[a39_0x5ce2b6(0x88)](_0x3f7b81,_0x389927){const _0x48d09d=a39_0x5ce2b6,{options:_0x4c17eb,tdx:_0x43d2c9}=_0x3f7b81,_0x45ef70=await withSpinner(_0x48d09d(0xb6)+_0x389927+'\x27...',()=>_0x43d2c9['segment'][_0x48d09d(0x73)](_0x389927),{'verbose':_0x4c17eb[_0x48d09d(0x92)]}),_0x13b7a4=_0x45ef70['data'];_0x4c17eb[_0x48d09d(0x92)]&&(console['error']('Parent\x20ID:\x20'+_0x13b7a4[_0x48d09d(0xa5)]),_0x13b7a4['folderId']&&console['error']('Folder\x20ID:\x20'+_0x13b7a4[_0x48d09d(0xa0)]));const _0x95047f=_0x4c17eb[_0x48d09d(0x96)]||0xa,_0x5d856a=await withSpinner(_0x48d09d(0xb5),()=>_0x43d2c9[_0x48d09d(0x86)]['listRecursive'](_0x13b7a4['parentId'],_0x13b7a4[_0x48d09d(0xa0)],0x0,_0x95047f),{'verbose':_0x4c17eb[_0x48d09d(0x92)]}),_0x19cf36=_0x5d856a[_0x48d09d(0xaf)],_0x1b1ace=_0x3f5f15=>{const _0x109094=_0x48d09d;let _0x1aa77d=0x0,_0x2176fd=0x0,_0x34732e=0x0;for(const _0x4cf7dd of _0x3f5f15){if(_0x4cf7dd[_0x109094(0xad)]==='folder')_0x1aa77d++;else{if(_0x4cf7dd[_0x109094(0xad)]==='segment')_0x2176fd++;else{if(_0x4cf7dd[_0x109094(0xad)]===_0x109094(0x84))_0x34732e++;}}if(_0x4cf7dd[_0x109094(0x95)]){const _0x33ae9f=_0x1b1ace(_0x4cf7dd['children']);_0x1aa77d+=_0x33ae9f[_0x109094(0x8a)],_0x2176fd+=_0x33ae9f[_0x109094(0x9b)],_0x34732e+=_0x33ae9f['journeys'];}}return{'folders':_0x1aa77d,'segments':_0x2176fd,'journeys':_0x34732e};},_0x416ec8=_0x1b1ace(_0x19cf36);console[_0x48d09d(0x80)]('✔\x20Built\x20tree\x20with\x20'+_0x416ec8['folders']+_0x48d09d(0x7e)+(_0x416ec8['folders']!==0x1?'s':'')+',\x20'+_0x416ec8[_0x48d09d(0x9b)]+_0x48d09d(0xa3)+(_0x416ec8[_0x48d09d(0x9b)]!==0x1?'s':'')+_0x48d09d(0xa1)+_0x416ec8[_0x48d09d(0x72)]+_0x48d09d(0x7d)+(_0x416ec8[_0x48d09d(0x72)]!==0x1?'s':''));const _0x5cbbf5=_0x584d13=>{const _0x4c51dc=_0x48d09d;return getConsoleNextUrl(_0x4c17eb['site'],_0x4c51dc(0x78)+_0x13b7a4[_0x4c51dc(0xa5)]+'/e/'+_0x584d13);},_0x4711be=_0x457ad9=>{const _0x413440=_0x48d09d;return getConsoleNextUrl(_0x4c17eb[_0x413440(0x6f)],_0x413440(0x78)+_0x13b7a4[_0x413440(0xa5)]+'/e/'+_0x457ad9+_0x413440(0xaa));};if(_0x4c17eb[_0x48d09d(0x87)]===_0x48d09d(0x85)||_0x4c17eb['format']===_0x48d09d(0xae))await handleSDKOutput(_0x19cf36,_0x4c17eb);else{console['log'](a39_0x550de9[_0x48d09d(0xb2)]('['+_0x389927+']'));const _0x2d6e67=formatTree(_0x19cf36,{'showMetadata':!![],'getSegmentUrl':_0x5cbbf5,'getJourneyUrl':_0x4711be});console[_0x48d09d(0xac)](_0x2d6e67);}return 0x0;}}
@@ -1 +1 @@
1
- function a40_0x4f94(_0x1e465e,_0x231981){_0x1e465e=_0x1e465e-0xb3;const _0x209aa6=a40_0x209a();let _0x4f9434=_0x209aa6[_0x1e465e];return _0x4f9434;}const a40_0x5359a6=a40_0x4f94;(function(_0x3cd339,_0x4d1318){const _0x3d6bd8=a40_0x4f94,_0x4167d0=_0x3cd339();while(!![]){try{const _0x27251e=parseInt(_0x3d6bd8(0xbd))/0x1*(parseInt(_0x3d6bd8(0xb3))/0x2)+parseInt(_0x3d6bd8(0xc2))/0x3+-parseInt(_0x3d6bd8(0xdb))/0x4*(-parseInt(_0x3d6bd8(0xd2))/0x5)+parseInt(_0x3d6bd8(0xc1))/0x6*(-parseInt(_0x3d6bd8(0xb9))/0x7)+parseInt(_0x3d6bd8(0xbf))/0x8+-parseInt(_0x3d6bd8(0xc9))/0x9*(parseInt(_0x3d6bd8(0xd5))/0xa)+-parseInt(_0x3d6bd8(0xc0))/0xb;if(_0x27251e===_0x4d1318)break;else _0x4167d0['push'](_0x4167d0['shift']());}catch(_0x51c3c6){_0x4167d0['push'](_0x4167d0['shift']());}}}(a40_0x209a,0x313c6));function a40_0x209a(){const _0x5e988c=['data','Catalog:\x20','validate','623kXuRIg','Usage:\x20tdx\x20show\x20<database.table>','name','✔\x20Query\x20successful\x20-\x200\x20rows\x20returned','11mBLlfK','...','232256egQgYp','2031018ellgNq','12156cyqPKJ','290070KYXVBK','Usage:\x20tdx\x20show\x20<database.table>\x0a\x20\x20\x20or:\x20tdx\x20show\x20<catalog.database.table>\x0a\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--database\x20<database>\x0a\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--in\x20<database>\x0a\x0aRun\x20\x27tdx\x20show\x20--help\x27\x20for\x20more\x20options','Show\x20table\x20contents','site','\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--database\x20<database>','Querying\x20','message','294534OzzyiZ','table','Limit:\x20','execute','args','Database:\x20','Site:\x20','Error:\x20','query','275TybiHw','show','Too\x20many\x20arguments\x0aUsage:\x20tdx\x20show\x20<database.table>\x0a\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--database\x20<database>\x0a\x0aRun\x20\x27tdx\x20show\x20--help\x27\x20for\x20more\x20options','20OIsgpj','database','cause','limit','length','\x20\x20\x20or:\x20tdx\x20show\x20<catalog.database.table>','12388uGxYYO','catalog','\x20\x20Cause:\x20','Table:\x20','61094HOZRpO','showTable','error'];a40_0x209a=function(){return _0x5e988c;};return a40_0x209a();}import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleSDKOutput}from'../core/command-output.js';import{parseTableReference,validateTableDescribeReference}from'../utils/table-ref-parser.js';import{withSpinner}from'../utils/spinner.js';import{DEFAULT_DISPLAY_LIMIT,resolveLimit}from'../core/constants.js';export class ShowCommand extends BaseCommand{[a40_0x5359a6(0xbb)]=a40_0x5359a6(0xd3);['description']=a40_0x5359a6(0xc4);async[a40_0x5359a6(0xcc)](_0x2b35b4){const _0x447858=a40_0x5359a6;return this[_0x447858(0xb4)](_0x2b35b4);}async[a40_0x5359a6(0xb4)](_0x564abe){const _0x116ba0=a40_0x5359a6,{options:_0x236519,args:_0x3066df,tdx:_0x163132}=_0x564abe;let _0x2ca472;try{_0x2ca472=parseTableReference(_0x3066df[0x0]);const _0x47292a=_0x236519[_0x116ba0(0xd6)];!_0x2ca472[_0x116ba0(0xd6)]&&_0x47292a&&(_0x2ca472[_0x116ba0(0xd6)]=_0x47292a);const _0xbbe644=validateTableDescribeReference(_0x2ca472);if(_0xbbe644)return console[_0x116ba0(0xb5)](_0x116ba0(0xd0)+_0xbbe644),console[_0x116ba0(0xb5)](_0x116ba0(0xba)),console[_0x116ba0(0xb5)]('\x20\x20\x20or:\x20tdx\x20show\x20<catalog.database.table>'),console[_0x116ba0(0xb5)](_0x116ba0(0xc6)),0x1;}catch(_0x170067){return console[_0x116ba0(0xb5)](_0x116ba0(0xd0)+_0x170067[_0x116ba0(0xc8)]),console['error'](_0x116ba0(0xba)),console[_0x116ba0(0xb5)](_0x116ba0(0xda)),console[_0x116ba0(0xb5)]('\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--database\x20<database>'),0x1;}const _0x3a67b6=_0x2ca472[_0x116ba0(0xdc)],_0x275599=_0x2ca472[_0x116ba0(0xd6)],_0x3fbc73=_0x2ca472[_0x116ba0(0xca)],_0xbcbb27=resolveLimit(_0x236519[_0x116ba0(0xd8)],DEFAULT_DISPLAY_LIMIT);try{_0x236519['verbose']&&(console[_0x116ba0(0xb5)](_0x116ba0(0xcf)+_0x236519[_0x116ba0(0xc5)]),_0x3a67b6&&console['error'](_0x116ba0(0xb7)+_0x3a67b6),console['error'](_0x116ba0(0xce)+_0x275599),console[_0x116ba0(0xb5)](_0x116ba0(0xde)+_0x3fbc73),console[_0x116ba0(0xb5)](_0x116ba0(0xcb)+_0xbcbb27));const _0x3d1bd9=_0x3a67b6?_0x3a67b6+'.'+_0x275599+'.'+_0x3fbc73:_0x275599+'.'+_0x3fbc73,_0x3b9b52=await withSpinner(_0x116ba0(0xc7)+_0x3d1bd9+_0x116ba0(0xbe),()=>_0x163132[_0x116ba0(0xd1)][_0x116ba0(0xb4)](_0x275599,_0x3fbc73,_0xbcbb27,_0x3a67b6),{'verbose':_0x236519['verbose']}),_0x248737=_0x3b9b52[_0x116ba0(0xb6)],_0xe2ea7d=_0x248737[_0x116ba0(0xb6)];return _0xe2ea7d[_0x116ba0(0xd9)]===0x0?console[_0x116ba0(0xb5)](_0x116ba0(0xbc)):console[_0x116ba0(0xb5)]('✔\x20Retrieved\x20'+_0xe2ea7d['length']+'\x20row'+(_0xe2ea7d[_0x116ba0(0xd9)]!==0x1?'s':'')+'\x20from\x20'+_0x3d1bd9),await handleSDKOutput(_0xe2ea7d,_0x236519),0x0;}catch(_0x1cb04f){if(_0x1cb04f instanceof SDKError)return console['error']('Error:\x20'+_0x1cb04f[_0x116ba0(0xc8)]),_0x1cb04f[_0x116ba0(0xd7)]&&console[_0x116ba0(0xb5)](_0x116ba0(0xdd)+_0x1cb04f[_0x116ba0(0xd7)]),0x1;throw _0x1cb04f;}}[a40_0x5359a6(0xb8)](_0x2f9915){const _0x1e8491=a40_0x5359a6;if(_0x2f9915[_0x1e8491(0xcd)][_0x1e8491(0xd9)]===0x0)return _0x1e8491(0xc3);if(_0x2f9915[_0x1e8491(0xcd)][_0x1e8491(0xd9)]>0x1)return _0x1e8491(0xd4);return undefined;}}
1
+ const a40_0x24b28e=a40_0x14c7;function a40_0xf8bb(){const _0x21702c=['table','\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--database\x20<database>','database','message','error','674325SFAVdT','showTable','3ACVMVg','name','show','15680kUghgv','✔\x20Query\x20successful\x20-\x200\x20rows\x20returned','1115NyZFBu','8992539MpfhbV','length','\x20\x20\x20or:\x20tdx\x20show\x20<catalog.database.table>','✔\x20Retrieved\x20','Usage:\x20tdx\x20show\x20<database.table>\x0a\x20\x20\x20or:\x20tdx\x20show\x20<catalog.database.table>\x0a\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--database\x20<database>\x0a\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--in\x20<database>\x0a\x0aRun\x20\x27tdx\x20show\x20--help\x27\x20for\x20more\x20options','site','args','372826AvSZNb','Database:\x20','49Snlzgt','verbose','Show\x20table\x20contents','Site:\x20','catalog','23620900lhFIzn','validate','description','12885368TIzPjT','Catalog:\x20','limit','Error:\x20','Usage:\x20tdx\x20show\x20<database.table>','475098PdpYfQ','Querying\x20','Table:\x20','cause'];a40_0xf8bb=function(){return _0x21702c;};return a40_0xf8bb();}(function(_0x25d99d,_0x394a7c){const _0x5ebd45=a40_0x14c7,_0xcba4e6=_0x25d99d();while(!![]){try{const _0x16bd72=parseInt(_0x5ebd45(0x1a6))/0x1+parseInt(_0x5ebd45(0x1b5))/0x2*(-parseInt(_0x5ebd45(0x1a8))/0x3)+parseInt(_0x5ebd45(0x1ab))/0x4*(-parseInt(_0x5ebd45(0x1ad))/0x5)+-parseInt(_0x5ebd45(0x19d))/0x6*(parseInt(_0x5ebd45(0x1b7))/0x7)+-parseInt(_0x5ebd45(0x198))/0x8+parseInt(_0x5ebd45(0x1ae))/0x9+parseInt(_0x5ebd45(0x195))/0xa;if(_0x16bd72===_0x394a7c)break;else _0xcba4e6['push'](_0xcba4e6['shift']());}catch(_0x13f8c1){_0xcba4e6['push'](_0xcba4e6['shift']());}}}(a40_0xf8bb,0xc5c4d));import{BaseCommand}from'./command.js';function a40_0x14c7(_0xf9a12a,_0x2123ef){_0xf9a12a=_0xf9a12a-0x195;const _0xf8bbe5=a40_0xf8bb();let _0x14c7b5=_0xf8bbe5[_0xf9a12a];return _0x14c7b5;}import{SDKError}from'../sdk/index.js';import{handleSDKOutput}from'../core/command-output.js';import{parseTableReference,validateTableDescribeReference}from'../utils/table-ref-parser.js';import{withSpinner}from'../utils/spinner.js';import{DEFAULT_DISPLAY_LIMIT,resolveLimit}from'../core/constants.js';export class ShowCommand extends BaseCommand{[a40_0x24b28e(0x1a9)]=a40_0x24b28e(0x1aa);[a40_0x24b28e(0x197)]=a40_0x24b28e(0x1b9);async['execute'](_0x4b5b72){const _0x10e5b8=a40_0x24b28e;return this[_0x10e5b8(0x1a7)](_0x4b5b72);}async[a40_0x24b28e(0x1a7)](_0xbd58bb){const _0x1a693c=a40_0x24b28e,{options:_0x536fb7,args:_0x3ed8a5,tdx:_0x469263}=_0xbd58bb;let _0x2a1c1d;try{_0x2a1c1d=parseTableReference(_0x3ed8a5[0x0]);const _0x32cbee=_0x536fb7[_0x1a693c(0x1a3)];!_0x2a1c1d[_0x1a693c(0x1a3)]&&_0x32cbee&&(_0x2a1c1d[_0x1a693c(0x1a3)]=_0x32cbee);const _0x571a29=validateTableDescribeReference(_0x2a1c1d);if(_0x571a29)return console[_0x1a693c(0x1a5)](_0x1a693c(0x19b)+_0x571a29),console[_0x1a693c(0x1a5)](_0x1a693c(0x19c)),console[_0x1a693c(0x1a5)](_0x1a693c(0x1b0)),console[_0x1a693c(0x1a5)](_0x1a693c(0x1a2)),0x1;}catch(_0xad3fbb){return console[_0x1a693c(0x1a5)](_0x1a693c(0x19b)+_0xad3fbb[_0x1a693c(0x1a4)]),console[_0x1a693c(0x1a5)](_0x1a693c(0x19c)),console[_0x1a693c(0x1a5)](_0x1a693c(0x1b0)),console[_0x1a693c(0x1a5)](_0x1a693c(0x1a2)),0x1;}const _0x58a737=_0x2a1c1d[_0x1a693c(0x1bb)],_0x25c106=_0x2a1c1d[_0x1a693c(0x1a3)],_0x1fd751=_0x2a1c1d[_0x1a693c(0x1a1)],_0x25405a=resolveLimit(_0x536fb7[_0x1a693c(0x19a)],DEFAULT_DISPLAY_LIMIT);try{_0x536fb7[_0x1a693c(0x1b8)]&&(console[_0x1a693c(0x1a5)](_0x1a693c(0x1ba)+_0x536fb7[_0x1a693c(0x1b3)]),_0x58a737&&console['error'](_0x1a693c(0x199)+_0x58a737),console[_0x1a693c(0x1a5)](_0x1a693c(0x1b6)+_0x25c106),console[_0x1a693c(0x1a5)](_0x1a693c(0x19f)+_0x1fd751),console['error']('Limit:\x20'+_0x25405a));const _0x4e1e6d=_0x58a737?_0x58a737+'.'+_0x25c106+'.'+_0x1fd751:_0x25c106+'.'+_0x1fd751,_0x3f1d9b=await withSpinner(_0x1a693c(0x19e)+_0x4e1e6d+'...',()=>_0x469263['query'][_0x1a693c(0x1a7)](_0x25c106,_0x1fd751,_0x25405a,_0x58a737),{'verbose':_0x536fb7[_0x1a693c(0x1b8)]}),_0x1498e5=_0x3f1d9b['data'],_0xd3d44e=_0x1498e5['data'];return _0xd3d44e[_0x1a693c(0x1af)]===0x0?console[_0x1a693c(0x1a5)](_0x1a693c(0x1ac)):console[_0x1a693c(0x1a5)](_0x1a693c(0x1b1)+_0xd3d44e['length']+'\x20row'+(_0xd3d44e[_0x1a693c(0x1af)]!==0x1?'s':'')+'\x20from\x20'+_0x4e1e6d),await handleSDKOutput(_0xd3d44e,_0x536fb7),0x0;}catch(_0x6d1e52){if(_0x6d1e52 instanceof SDKError)return console[_0x1a693c(0x1a5)](_0x1a693c(0x19b)+_0x6d1e52[_0x1a693c(0x1a4)]),_0x6d1e52[_0x1a693c(0x1a0)]&&console[_0x1a693c(0x1a5)]('\x20\x20Cause:\x20'+_0x6d1e52[_0x1a693c(0x1a0)]),0x1;throw _0x6d1e52;}}[a40_0x24b28e(0x196)](_0x44f131){const _0x423dc4=a40_0x24b28e;if(_0x44f131[_0x423dc4(0x1b4)][_0x423dc4(0x1af)]===0x0)return _0x423dc4(0x1b2);if(_0x44f131[_0x423dc4(0x1b4)]['length']>0x1)return'Too\x20many\x20arguments\x0aUsage:\x20tdx\x20show\x20<database.table>\x0a\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--database\x20<database>\x0a\x0aRun\x20\x27tdx\x20show\x20--help\x27\x20for\x20more\x20options';return undefined;}}
@@ -1 +1 @@
1
- const a41_0x38ac23=a41_0x91f0;(function(_0x389150,_0xe7d7f6){const _0x45959b=a41_0x91f0,_0x2a8ee8=_0x389150();while(!![]){try{const _0x3408c6=-parseInt(_0x45959b(0xa0))/0x1*(parseInt(_0x45959b(0xaa))/0x2)+parseInt(_0x45959b(0xbe))/0x3*(parseInt(_0x45959b(0xa3))/0x4)+-parseInt(_0x45959b(0xa8))/0x5+parseInt(_0x45959b(0xc0))/0x6*(parseInt(_0x45959b(0xaf))/0x7)+parseInt(_0x45959b(0xcc))/0x8+parseInt(_0x45959b(0xbf))/0x9+parseInt(_0x45959b(0x9f))/0xa*(-parseInt(_0x45959b(0xad))/0xb);if(_0x3408c6===_0xe7d7f6)break;else _0x2a8ee8['push'](_0x2a8ee8['shift']());}catch(_0x24734b){_0x2a8ee8['push'](_0x2a8ee8['shift']());}}}(a41_0x4deb,0xc5059));function a41_0x4deb(){const _0x32bbb7=['message','63393wQhTks','tdx','98zsYWrT','error','site','jobs','name','User:','CLI\x20flag','config','red','Read\x20credential\x20from\x20','first_name','join','dim','bold','env','27stAmNQ','8195850AyiKvT','34278exOcWr','account_id','N/A','session','✓\x20Authentication\x20successful\x0a','TDX_PROFILE\x20env','status','email','execute','log','filter','profile','7268312ZaHuxA','Name:','\x20profile:\x20','Account\x20ID:','site:\x20','80dPYsSW','3509zhlIpD','last_name','cli','493412wYdUdJ','(from\x20','cyan','yellow','green','7886290reTGlz','displayWithSources','330dVztWt','profileSource'];a41_0x4deb=function(){return _0x32bbb7;};return a41_0x4deb();}import{BaseCommand,printAuthError}from'./command.js';import{resolveAPIKeyAsync}from'../core/config.js';import{HTTPClientError}from'../sdk/client/http-client.js';function a41_0x91f0(_0x285d75,_0x59db37){_0x285d75=_0x285d75-0x9e;const _0x4deb86=a41_0x4deb();let _0x91f0d=_0x4deb86[_0x285d75];return _0x91f0d;}import{GlobalContext}from'../core/global-context.js';import a41_0x3d14e9 from'chalk';export class StatusCommand extends BaseCommand{[a41_0x38ac23(0xb3)]='status';['description']='Show\x20authentication\x20status\x20and\x20current\x20context';async[a41_0x38ac23(0xc8)](_0x5f361c){const _0x1114b2=a41_0x38ac23,{options:_0x299154,tdx:_0x4def43}=_0x5f361c,_0x1fd7e7=_0x299154[_0x1114b2(0xb1)],_0x3f234b=new GlobalContext(_0x299154),_0x4f72e3=_0x3f234b[_0x1114b2(0xcb)],_0x3ca202=_0x3f234b[_0x1114b2(0xab)],_0x54019e=_0x3ca202===_0x1114b2(0xa2)?_0x1114b2(0xb5):_0x3ca202===_0x1114b2(0xc3)?_0x1114b2(0xc3):_0x3ca202===_0x1114b2(0xbd)?_0x1114b2(0xc5):_0x3ca202===_0x1114b2(0xb6)?_0x1114b2(0xb6):null,_0x211e18=_0x4f72e3?a41_0x3d14e9[_0x1114b2(0xa5)](_0x4f72e3):a41_0x3d14e9[_0x1114b2(0xbb)](_0x1114b2(0xc2)),_0x3686d0=_0x54019e?'\x20'+a41_0x3d14e9[_0x1114b2(0xbb)](_0x1114b2(0xa4)+_0x54019e+')'):'';console[_0x1114b2(0xc9)](a41_0x3d14e9['bold'](_0x1114b2(0xae))+_0x1114b2(0xce)+_0x211e18+_0x3686d0+'\x20'+a41_0x3d14e9[_0x1114b2(0xbb)]('(')+_0x1114b2(0x9e)+a41_0x3d14e9['cyan'](_0x1fd7e7)+a41_0x3d14e9[_0x1114b2(0xbb)](')'));const _0xd83c53=await resolveAPIKeyAsync(_0x1fd7e7,_0x4f72e3);if(_0xd83c53){const {source:_0x589011,isDeprecated:_0x347535}=_0xd83c53,_0x246bb6=_0x1114b2(0xb8)+a41_0x3d14e9[_0x1114b2(0xa5)](_0x589011);console['log'](_0x347535?a41_0x3d14e9[_0x1114b2(0xa6)](_0x246bb6):_0x246bb6);}else console[_0x1114b2(0xc9)](a41_0x3d14e9[_0x1114b2(0xa6)]('No\x20credential\x20found'));let _0x5f34e4=![];try{const _0xc09b3d=await _0x4def43[_0x1114b2(0xb2)]['getUserInfo']();console[_0x1114b2(0xc9)](a41_0x3d14e9[_0x1114b2(0xa7)](_0x1114b2(0xc4))),console[_0x1114b2(0xc9)](a41_0x3d14e9[_0x1114b2(0xbc)](_0x1114b2(0xb4))+'\x20'+a41_0x3d14e9[_0x1114b2(0xa5)](_0xc09b3d[_0x1114b2(0xc7)]));if(_0xc09b3d[_0x1114b2(0xb9)]||_0xc09b3d[_0x1114b2(0xa1)]){const _0xf36f10=[_0xc09b3d[_0x1114b2(0xb9)],_0xc09b3d['last_name']][_0x1114b2(0xca)](Boolean)[_0x1114b2(0xba)]('\x20');console[_0x1114b2(0xc9)](a41_0x3d14e9['bold'](_0x1114b2(0xcd))+'\x20'+_0xf36f10);}_0xc09b3d[_0x1114b2(0xc1)]&&console[_0x1114b2(0xc9)](a41_0x3d14e9[_0x1114b2(0xbc)](_0x1114b2(0xcf))+'\x20'+a41_0x3d14e9[_0x1114b2(0xa6)](_0xc09b3d[_0x1114b2(0xc1)])),_0x5f34e4=!![];}catch(_0x18e3c1){_0x18e3c1 instanceof HTTPClientError&&_0x18e3c1[_0x1114b2(0xc6)]===0x191?printAuthError(_0x18e3c1,!![],_0x4f72e3):console[_0x1114b2(0xb0)](a41_0x3d14e9[_0x1114b2(0xb7)]('✗\x20Validation\x20failed:\x20'+(_0x18e3c1 instanceof Error?_0x18e3c1[_0x1114b2(0xac)]:String(_0x18e3c1))));}return console['log'](),_0x3f234b[_0x1114b2(0xa9)](),_0x5f34e4?0x0:0x1;}}
1
+ const a41_0x5dcb20=a41_0x348a;function a41_0x348a(_0x49e359,_0x23804c){_0x49e359=_0x49e359-0x14f;const _0x5d445e=a41_0x5d44();let _0x348aa6=_0x5d445e[_0x49e359];return _0x348aa6;}(function(_0x76168d,_0x26a4ca){const _0x58dd4a=a41_0x348a,_0x89d3c8=_0x76168d();while(!![]){try{const _0x2bc811=parseInt(_0x58dd4a(0x16b))/0x1*(parseInt(_0x58dd4a(0x166))/0x2)+parseInt(_0x58dd4a(0x177))/0x3*(-parseInt(_0x58dd4a(0x155))/0x4)+parseInt(_0x58dd4a(0x17b))/0x5+-parseInt(_0x58dd4a(0x160))/0x6*(parseInt(_0x58dd4a(0x16e))/0x7)+parseInt(_0x58dd4a(0x179))/0x8+parseInt(_0x58dd4a(0x158))/0x9*(parseInt(_0x58dd4a(0x16c))/0xa)+parseInt(_0x58dd4a(0x152))/0xb*(-parseInt(_0x58dd4a(0x15a))/0xc);if(_0x2bc811===_0x26a4ca)break;else _0x89d3c8['push'](_0x89d3c8['shift']());}catch(_0x2b6cee){_0x89d3c8['push'](_0x89d3c8['shift']());}}}(a41_0x5d44,0x42830));import{BaseCommand,printAuthError}from'./command.js';import{resolveAPIKeyAsync}from'../core/config.js';function a41_0x5d44(){const _0x561630=['260MGXpjq','Account\x20ID:','12068QaTTfW','email','red','✓\x20Authentication\x20successful\x0a','config','TDX_PROFILE\x20env','(from\x20','name','displayWithSources','3912PbCWJU','cyan','3272000OzKElX','\x20profile:\x20','1332320ARGZjF','account_id','yellow','bold','session','1950113nTnEab','Read\x20credential\x20from\x20','profileSource','504HFKGCJ','last_name','No\x20credential\x20found','101259KSbtpI','green','48XyymBV','message','profile','description','site:\x20','env','444OpMzke','error','dim','✗\x20Validation\x20failed:\x20','site','Name:','101818TmZFGH','N/A','log','cli','filter','6XVVxCF'];a41_0x5d44=function(){return _0x561630;};return a41_0x5d44();}import{HTTPClientError}from'../sdk/client/http-client.js';import{GlobalContext}from'../core/global-context.js';import a41_0x1ef26b from'chalk';export class StatusCommand extends BaseCommand{[a41_0x5dcb20(0x175)]='status';[a41_0x5dcb20(0x15d)]='Show\x20authentication\x20status\x20and\x20current\x20context';async['execute'](_0x2affde){const _0x5e9f87=a41_0x5dcb20,{options:_0x527135,tdx:_0x3e8a2d}=_0x2affde,_0x4e95f5=_0x527135[_0x5e9f87(0x164)],_0x19cc1e=new GlobalContext(_0x527135),_0x1eb301=_0x19cc1e[_0x5e9f87(0x15c)],_0x262db2=_0x19cc1e[_0x5e9f87(0x154)],_0x1181de=_0x262db2===_0x5e9f87(0x169)?'CLI\x20flag':_0x262db2==='session'?_0x5e9f87(0x151):_0x262db2===_0x5e9f87(0x15f)?_0x5e9f87(0x173):_0x262db2===_0x5e9f87(0x172)?_0x5e9f87(0x172):null,_0x412ee5=_0x1eb301?a41_0x1ef26b['cyan'](_0x1eb301):a41_0x1ef26b[_0x5e9f87(0x162)](_0x5e9f87(0x167)),_0x444c67=_0x1181de?'\x20'+a41_0x1ef26b[_0x5e9f87(0x162)](_0x5e9f87(0x174)+_0x1181de+')'):'';console['log'](a41_0x1ef26b[_0x5e9f87(0x150)]('tdx')+_0x5e9f87(0x17a)+_0x412ee5+_0x444c67+'\x20'+a41_0x1ef26b[_0x5e9f87(0x162)]('(')+_0x5e9f87(0x15e)+a41_0x1ef26b[_0x5e9f87(0x178)](_0x4e95f5)+a41_0x1ef26b[_0x5e9f87(0x162)](')'));const _0x50701e=await resolveAPIKeyAsync(_0x4e95f5,_0x1eb301);if(_0x50701e){const {source:_0x458d4d,isDeprecated:_0x5045ba}=_0x50701e,_0x11d87f=_0x5e9f87(0x153)+a41_0x1ef26b[_0x5e9f87(0x178)](_0x458d4d);console[_0x5e9f87(0x168)](_0x5045ba?a41_0x1ef26b[_0x5e9f87(0x14f)](_0x11d87f):_0x11d87f);}else console[_0x5e9f87(0x168)](a41_0x1ef26b[_0x5e9f87(0x14f)](_0x5e9f87(0x157)));let _0x2038f7=![];try{const _0x409d91=await _0x3e8a2d['jobs']['getUserInfo']();console['log'](a41_0x1ef26b[_0x5e9f87(0x159)](_0x5e9f87(0x171))),console[_0x5e9f87(0x168)](a41_0x1ef26b[_0x5e9f87(0x150)]('User:')+'\x20'+a41_0x1ef26b[_0x5e9f87(0x178)](_0x409d91[_0x5e9f87(0x16f)]));if(_0x409d91['first_name']||_0x409d91['last_name']){const _0x7f8f82=[_0x409d91['first_name'],_0x409d91[_0x5e9f87(0x156)]][_0x5e9f87(0x16a)](Boolean)['join']('\x20');console[_0x5e9f87(0x168)](a41_0x1ef26b[_0x5e9f87(0x150)](_0x5e9f87(0x165))+'\x20'+_0x7f8f82);}_0x409d91[_0x5e9f87(0x17c)]&&console[_0x5e9f87(0x168)](a41_0x1ef26b[_0x5e9f87(0x150)](_0x5e9f87(0x16d))+'\x20'+a41_0x1ef26b[_0x5e9f87(0x14f)](_0x409d91[_0x5e9f87(0x17c)])),_0x2038f7=!![];}catch(_0x50b7bb){_0x50b7bb instanceof HTTPClientError&&_0x50b7bb['status']===0x191?printAuthError(_0x50b7bb,!![],_0x1eb301):console[_0x5e9f87(0x161)](a41_0x1ef26b[_0x5e9f87(0x170)](_0x5e9f87(0x163)+(_0x50b7bb instanceof Error?_0x50b7bb[_0x5e9f87(0x15b)]:String(_0x50b7bb))));}return console['log'](),_0x19cc1e[_0x5e9f87(0x176)](),_0x2038f7?0x0:0x1;}}
@@ -1 +1 @@
1
- const a42_0x522d86=a42_0x24ce;(function(_0x36609e,_0x88b79){const _0x55ce8d=a42_0x24ce,_0x2adefb=_0x36609e();while(!![]){try{const _0x487bb9=parseInt(_0x55ce8d(0x188))/0x1+-parseInt(_0x55ce8d(0x1a7))/0x2*(parseInt(_0x55ce8d(0x195))/0x3)+parseInt(_0x55ce8d(0x1a0))/0x4+-parseInt(_0x55ce8d(0x1ac))/0x5*(-parseInt(_0x55ce8d(0x19e))/0x6)+-parseInt(_0x55ce8d(0x1a5))/0x7+parseInt(_0x55ce8d(0x1a2))/0x8+parseInt(_0x55ce8d(0x1a6))/0x9;if(_0x487bb9===_0x88b79)break;else _0x2adefb['push'](_0x2adefb['shift']());}catch(_0x265cad){_0x2adefb['push'](_0x2adefb['shift']());}}}(a42_0x44cb,0x71e8e));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleSDKOutput}from'../core/command-output.js';import{parseTableReference}from'../utils/table-ref-parser.js';import{DEFAULT_LISTING_LIMIT,resolveLimit}from'../core/constants.js';function a42_0x44cb(){const _0x5e9af6=['\x27\x20may\x20not\x20exist\x20or\x20contains\x20no\x20tables','✔\x20Found\x20','Site:\x20','Table\x20pattern:\x20','✖\x20No\x20tables\x20found','Database\x20pattern:\x20','message','database','\x20\x20tdx\x20tables\x20users\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20->\x20table\x20\x22users\x22\x20across\x20all\x20databases','Error:\x20','\x20\x20Or:\x20\x20tdx\x20tables\x20--in\x20','12399FHWBYc','data','verbose','validate','\x20\x20Cause:\x20','includes','length','limit','\x20\x20tdx\x20tables\x20--in\x20mydb\x20\x20\x20\x20\x20\x20\x20->\x20all\x20tables\x20from\x20mydb','8406DsrbdI','Listing\x20tables...','2503452gXGQaT','Or\x20use\x20--in\x20flag:','699240qgbMhF','Did\x20you\x20mean\x20to\x20list\x20all\x20tables\x20from\x20database\x20\x27','Database\x20\x27','3804269TgTuSP','3759255errSxJ','194uwoQYI','\x20table','table','Error:\x20Too\x20many\x20arguments.\x20Use\x20single\x20argument:','error','750mREsBn','description','.*\x22','\x27\x20is\x20ambiguous.','cause','\x20\x20tdx\x20tables\x20\x22*.user*\x22\x20\x20\x20\x20\x20\x20\x20->\x20tables\x20matching\x20user*\x20across\x20databases','query','Database:\x20','Database:\x20all','69829gWtdSD','tables'];a42_0x44cb=function(){return _0x5e9af6;};return a42_0x44cb();}import{withSpinner}from'../utils/spinner.js';function a42_0x24ce(_0x4021b9,_0x27ca52){_0x4021b9=_0x4021b9-0x183;const _0x44cb3c=a42_0x44cb();let _0x24cea9=_0x44cb3c[_0x4021b9];return _0x24cea9;}export class TablesCommand extends BaseCommand{['name']=a42_0x522d86(0x189);[a42_0x522d86(0x1ad)]='List\x20tables\x20in\x20a\x20database';async['execute'](_0x22bd6e){const _0x2becf5=a42_0x522d86,{options:_0x44be39,args:_0x162d0e,tdx:_0x19a8cc}=_0x22bd6e;let _0x30edcb;if(_0x162d0e[_0x2becf5(0x19b)]===0x0)_0x30edcb={'database':undefined,'table':undefined,'original':''};else{if(_0x162d0e['length']===0x1)try{_0x30edcb=parseTableReference(_0x162d0e[0x0]);if(_0x30edcb[_0x2becf5(0x1a9)]&&!_0x30edcb[_0x2becf5(0x191)]&&!_0x30edcb[_0x2becf5(0x1a9)][_0x2becf5(0x19a)]('*')&&!_0x30edcb[_0x2becf5(0x1a9)][_0x2becf5(0x19a)]('?'))return console['error']('Error:\x20Pattern\x20\x27'+_0x162d0e[0x0]+_0x2becf5(0x1af)),console[_0x2becf5(0x1ab)](_0x2becf5(0x1a3)+_0x30edcb[_0x2becf5(0x1a9)]+'\x27?'),console[_0x2becf5(0x1ab)]('\x20\x20Use:\x20tdx\x20tables\x20\x22'+_0x30edcb[_0x2becf5(0x1a9)]+_0x2becf5(0x1ae)),console[_0x2becf5(0x1ab)](_0x2becf5(0x194)+_0x30edcb['table']),console[_0x2becf5(0x1ab)]('\x20\x20Or:\x20\x20tdx\x20tables\x20--database\x20'+_0x30edcb[_0x2becf5(0x1a9)]),console['error'](''),console[_0x2becf5(0x1ab)]('Note:\x20\x27'+_0x162d0e[0x0]+'\x27\x20without\x20wildcards\x20would\x20search\x20for\x20tables\x20named\x20\x27'+_0x30edcb[_0x2becf5(0x1a9)]+'\x27\x20across\x20all\x20databases.'),0x1;}catch(_0x14249b){return console[_0x2becf5(0x1ab)](_0x2becf5(0x193)+_0x14249b[_0x2becf5(0x190)]),0x1;}else return console['error'](_0x2becf5(0x1aa)),console[_0x2becf5(0x1ab)](_0x2becf5(0x192)),console[_0x2becf5(0x1ab)]('\x20\x20tdx\x20tables\x20\x22mydb.*\x22\x20\x20\x20\x20\x20\x20\x20\x20->\x20all\x20tables\x20from\x20mydb'),console['error']('\x20\x20tdx\x20tables\x20\x22mydb.users\x22\x20\x20\x20\x20->\x20table\x20\x22users\x22\x20in\x20database\x20mydb'),console[_0x2becf5(0x1ab)](_0x2becf5(0x184)),console['error'](_0x2becf5(0x1a1)),console[_0x2becf5(0x1ab)](_0x2becf5(0x19d)),0x1;}const _0x354225=_0x44be39[_0x2becf5(0x191)];!_0x30edcb[_0x2becf5(0x191)]&&_0x354225&&(_0x30edcb[_0x2becf5(0x191)]=_0x354225);try{const _0x20c716=_0x7a23e9=>_0x7a23e9&&(_0x7a23e9[_0x2becf5(0x19a)]('*')||_0x7a23e9[_0x2becf5(0x19a)]('?')),_0x119fb0=_0x20c716(_0x30edcb['database']);_0x44be39[_0x2becf5(0x197)]&&(console[_0x2becf5(0x1ab)](_0x2becf5(0x18c)+_0x44be39['site']),_0x30edcb[_0x2becf5(0x191)]?_0x119fb0?console['error'](_0x2becf5(0x18f)+_0x30edcb[_0x2becf5(0x191)]):console[_0x2becf5(0x1ab)](_0x2becf5(0x186)+_0x30edcb['database']):console[_0x2becf5(0x1ab)](_0x2becf5(0x187)),_0x30edcb[_0x2becf5(0x1a9)]&&console[_0x2becf5(0x1ab)](_0x2becf5(0x18d)+_0x30edcb[_0x2becf5(0x1a9)]));const _0x219507=_0x30edcb['database']&&!_0x119fb0?_0x30edcb[_0x2becf5(0x191)]:undefined,_0x733482=_0x119fb0?_0x30edcb['database']:undefined,_0x2dbc23=_0x30edcb[_0x2becf5(0x1a9)],_0x5bbe4a=resolveLimit(_0x44be39[_0x2becf5(0x19c)],DEFAULT_LISTING_LIMIT),_0x221e6c=await withSpinner(_0x2becf5(0x19f),()=>_0x19a8cc[_0x2becf5(0x185)]['listTables'](_0x219507,_0x2dbc23,_0x733482,_0x5bbe4a),{'verbose':_0x44be39[_0x2becf5(0x197)]}),_0x3c45fa=_0x221e6c[_0x2becf5(0x196)];if(_0x3c45fa['length']===0x0&&_0x30edcb[_0x2becf5(0x191)]&&!_0x119fb0)return console['error'](_0x2becf5(0x18e)),console['error'](_0x2becf5(0x1a4)+_0x30edcb[_0x2becf5(0x191)]+_0x2becf5(0x18a)),0x1;return console[_0x2becf5(0x1ab)](_0x2becf5(0x18b)+_0x3c45fa[_0x2becf5(0x19b)]+_0x2becf5(0x1a8)+(_0x3c45fa[_0x2becf5(0x19b)]!==0x1?'s':'')),await handleSDKOutput(_0x3c45fa,{..._0x44be39,'limit':_0x5bbe4a}),0x0;}catch(_0x24f9d9){if(_0x24f9d9 instanceof SDKError)return console[_0x2becf5(0x1ab)](_0x2becf5(0x193)+_0x24f9d9[_0x2becf5(0x190)]),_0x24f9d9[_0x2becf5(0x183)]&&console[_0x2becf5(0x1ab)](_0x2becf5(0x199)+_0x24f9d9[_0x2becf5(0x183)]),0x1;throw _0x24f9d9;}}[a42_0x522d86(0x198)](_0x148df6){return undefined;}}
1
+ const a42_0x2b2dcd=a42_0x166d;(function(_0x15d77d,_0x4ed865){const _0x87751a=a42_0x166d,_0x4373b9=_0x15d77d();while(!![]){try{const _0x3e6816=-parseInt(_0x87751a(0x124))/0x1*(-parseInt(_0x87751a(0x13e))/0x2)+parseInt(_0x87751a(0x136))/0x3*(-parseInt(_0x87751a(0x122))/0x4)+-parseInt(_0x87751a(0x11a))/0x5*(-parseInt(_0x87751a(0x118))/0x6)+parseInt(_0x87751a(0x13f))/0x7*(parseInt(_0x87751a(0x137))/0x8)+-parseInt(_0x87751a(0x138))/0x9*(-parseInt(_0x87751a(0x11f))/0xa)+-parseInt(_0x87751a(0x13b))/0xb+-parseInt(_0x87751a(0x143))/0xc*(-parseInt(_0x87751a(0x140))/0xd);if(_0x3e6816===_0x4ed865)break;else _0x4373b9['push'](_0x4373b9['shift']());}catch(_0x4d4b0c){_0x4373b9['push'](_0x4373b9['shift']());}}}(a42_0x27a4,0x56832));import{BaseCommand}from'./command.js';function a42_0x27a4(){const _0x2f29b5=['data','\x27\x20across\x20all\x20databases.','12uwYqWY','Note:\x20\x27','verbose','\x20\x20tdx\x20tables\x20--in\x20mydb\x20\x20\x20\x20\x20\x20\x20->\x20all\x20tables\x20from\x20mydb','Listing\x20tables...','12tSxNmp','Table\x20pattern:\x20','218615zJSMbw','Database\x20pattern:\x20','message','\x27\x20without\x20wildcards\x20would\x20search\x20for\x20tables\x20named\x20\x27','description','64210YzMzxK','cause','Error:\x20Pattern\x20\x27','267788mggNAR','name','29vQXeTo','Or\x20use\x20--in\x20flag:','length','\x20\x20Or:\x20\x20tdx\x20tables\x20--database\x20','\x27\x20is\x20ambiguous.','listTables','Error:\x20','site','tables','includes','database','error','Database:\x20','Database\x20\x27','Error:\x20Too\x20many\x20arguments.\x20Use\x20single\x20argument:','✖\x20No\x20tables\x20found','✔\x20Found\x20','table','15pfjzLA','200VWPwxG','54Oslvmh','query','\x20\x20Cause:\x20','3963311lgXyuN','Database:\x20all','\x20\x20Use:\x20tdx\x20tables\x20\x22','22006obQBaH','110047wlVIAv','2746978lxAJgz'];a42_0x27a4=function(){return _0x2f29b5;};return a42_0x27a4();}import{SDKError}from'../sdk/index.js';import{handleSDKOutput}from'../core/command-output.js';function a42_0x166d(_0x214d0e,_0x3f0ca4){_0x214d0e=_0x214d0e-0x118;const _0x27a412=a42_0x27a4();let _0x166d8d=_0x27a412[_0x214d0e];return _0x166d8d;}import{parseTableReference}from'../utils/table-ref-parser.js';import{DEFAULT_LISTING_LIMIT,resolveLimit}from'../core/constants.js';import{withSpinner}from'../utils/spinner.js';export class TablesCommand extends BaseCommand{[a42_0x2b2dcd(0x123)]=a42_0x2b2dcd(0x12c);[a42_0x2b2dcd(0x11e)]='List\x20tables\x20in\x20a\x20database';async['execute'](_0x41fd7b){const _0x1e938c=a42_0x2b2dcd,{options:_0x8d695,args:_0x1d2ee6,tdx:_0x5d2d50}=_0x41fd7b;let _0x5f376c;if(_0x1d2ee6['length']===0x0)_0x5f376c={'database':undefined,'table':undefined,'original':''};else{if(_0x1d2ee6[_0x1e938c(0x126)]===0x1)try{_0x5f376c=parseTableReference(_0x1d2ee6[0x0]);if(_0x5f376c[_0x1e938c(0x135)]&&!_0x5f376c[_0x1e938c(0x12e)]&&!_0x5f376c[_0x1e938c(0x135)]['includes']('*')&&!_0x5f376c['table'][_0x1e938c(0x12d)]('?'))return console['error'](_0x1e938c(0x121)+_0x1d2ee6[0x0]+_0x1e938c(0x128)),console[_0x1e938c(0x12f)]('Did\x20you\x20mean\x20to\x20list\x20all\x20tables\x20from\x20database\x20\x27'+_0x5f376c[_0x1e938c(0x135)]+'\x27?'),console['error'](_0x1e938c(0x13d)+_0x5f376c[_0x1e938c(0x135)]+'.*\x22'),console[_0x1e938c(0x12f)]('\x20\x20Or:\x20\x20tdx\x20tables\x20--in\x20'+_0x5f376c[_0x1e938c(0x135)]),console['error'](_0x1e938c(0x127)+_0x5f376c[_0x1e938c(0x135)]),console[_0x1e938c(0x12f)](''),console[_0x1e938c(0x12f)](_0x1e938c(0x144)+_0x1d2ee6[0x0]+_0x1e938c(0x11d)+_0x5f376c[_0x1e938c(0x135)]+_0x1e938c(0x142)),0x1;}catch(_0x1573c9){return console[_0x1e938c(0x12f)](_0x1e938c(0x12a)+_0x1573c9[_0x1e938c(0x11c)]),0x1;}else return console[_0x1e938c(0x12f)](_0x1e938c(0x132)),console[_0x1e938c(0x12f)]('\x20\x20tdx\x20tables\x20users\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20->\x20table\x20\x22users\x22\x20across\x20all\x20databases'),console[_0x1e938c(0x12f)]('\x20\x20tdx\x20tables\x20\x22mydb.*\x22\x20\x20\x20\x20\x20\x20\x20\x20->\x20all\x20tables\x20from\x20mydb'),console[_0x1e938c(0x12f)]('\x20\x20tdx\x20tables\x20\x22mydb.users\x22\x20\x20\x20\x20->\x20table\x20\x22users\x22\x20in\x20database\x20mydb'),console[_0x1e938c(0x12f)]('\x20\x20tdx\x20tables\x20\x22*.user*\x22\x20\x20\x20\x20\x20\x20\x20->\x20tables\x20matching\x20user*\x20across\x20databases'),console[_0x1e938c(0x12f)](_0x1e938c(0x125)),console[_0x1e938c(0x12f)](_0x1e938c(0x146)),0x1;}const _0x43a264=_0x8d695[_0x1e938c(0x12e)];!_0x5f376c[_0x1e938c(0x12e)]&&_0x43a264&&(_0x5f376c[_0x1e938c(0x12e)]=_0x43a264);try{const _0x37d23f=_0x5e2dca=>_0x5e2dca&&(_0x5e2dca[_0x1e938c(0x12d)]('*')||_0x5e2dca[_0x1e938c(0x12d)]('?')),_0x4b8ebb=_0x37d23f(_0x5f376c[_0x1e938c(0x12e)]);_0x8d695[_0x1e938c(0x145)]&&(console[_0x1e938c(0x12f)]('Site:\x20'+_0x8d695[_0x1e938c(0x12b)]),_0x5f376c['database']?_0x4b8ebb?console[_0x1e938c(0x12f)](_0x1e938c(0x11b)+_0x5f376c[_0x1e938c(0x12e)]):console[_0x1e938c(0x12f)](_0x1e938c(0x130)+_0x5f376c[_0x1e938c(0x12e)]):console[_0x1e938c(0x12f)](_0x1e938c(0x13c)),_0x5f376c[_0x1e938c(0x135)]&&console[_0x1e938c(0x12f)](_0x1e938c(0x119)+_0x5f376c[_0x1e938c(0x135)]));const _0x46c331=_0x5f376c[_0x1e938c(0x12e)]&&!_0x4b8ebb?_0x5f376c[_0x1e938c(0x12e)]:undefined,_0x2d41f6=_0x4b8ebb?_0x5f376c[_0x1e938c(0x12e)]:undefined,_0x58dbfb=_0x5f376c[_0x1e938c(0x135)],_0x34726e=resolveLimit(_0x8d695['limit'],DEFAULT_LISTING_LIMIT),_0x9730e5=await withSpinner(_0x1e938c(0x147),()=>_0x5d2d50[_0x1e938c(0x139)][_0x1e938c(0x129)](_0x46c331,_0x58dbfb,_0x2d41f6,_0x34726e),{'verbose':_0x8d695['verbose']}),_0x1344da=_0x9730e5[_0x1e938c(0x141)];if(_0x1344da[_0x1e938c(0x126)]===0x0&&_0x5f376c['database']&&!_0x4b8ebb)return console[_0x1e938c(0x12f)](_0x1e938c(0x133)),console[_0x1e938c(0x12f)](_0x1e938c(0x131)+_0x5f376c['database']+'\x27\x20may\x20not\x20exist\x20or\x20contains\x20no\x20tables'),0x1;return console['error'](_0x1e938c(0x134)+_0x1344da[_0x1e938c(0x126)]+'\x20table'+(_0x1344da[_0x1e938c(0x126)]!==0x1?'s':'')),await handleSDKOutput(_0x1344da,{..._0x8d695,'limit':_0x34726e}),0x0;}catch(_0x25f505){if(_0x25f505 instanceof SDKError)return console['error']('Error:\x20'+_0x25f505['message']),_0x25f505['cause']&&console['error'](_0x1e938c(0x13a)+_0x25f505[_0x1e938c(0x120)]),0x1;throw _0x25f505;}}['validate'](_0x38eff0){return undefined;}}
@@ -1 +1 @@
1
- const a43_0x492c3a=a43_0x1d98;(function(_0x395713,_0x45734a){const _0x5bf67a=a43_0x1d98,_0x3e2594=_0x395713();while(!![]){try{const _0x21331d=-parseInt(_0x5bf67a(0xa2))/0x1+-parseInt(_0x5bf67a(0xba))/0x2+parseInt(_0x5bf67a(0x9c))/0x3+parseInt(_0x5bf67a(0xa5))/0x4*(-parseInt(_0x5bf67a(0xbe))/0x5)+parseInt(_0x5bf67a(0xa9))/0x6+-parseInt(_0x5bf67a(0xa0))/0x7+parseInt(_0x5bf67a(0xb2))/0x8;if(_0x21331d===_0x45734a)break;else _0x3e2594['push'](_0x3e2594['shift']());}catch(_0x1adcdf){_0x3e2594['push'](_0x3e2594['shift']());}}}(a43_0x51f9,0x303d1));import{BaseCommand}from'./command.js';import{getSessionID,cleanExpiredSessions,clearSessionContextField}from'../core/session.js';import{clearDefaultSiteFromUserConfig,clearActiveProfileFromUserConfig}from'../core/profile.js';import{getConfigDir}from'../core/config.js';function a43_0x1d98(_0x185d9c,_0x295760){_0x185d9c=_0x185d9c-0x9a;const _0x51f988=a43_0x51f9();let _0x1d98ae=_0x51f988[_0x185d9c];return _0x1d98ae;}function a43_0x51f9(){const _0x360f82=['Clear\x20session-level\x20or\x20default\x20context\x20values','database','llm_project','Session\x20','745884KZmXAo','Default\x20site\x20','parent_segment','default','1365010sXwyfQ','session','message','--default\x20can\x20only\x20be\x20used\x20with\x20\x27site\x27\x20or\x20\x27profile\x27.\x20Other\x20resources\x20are\x20session-level\x20only.','93114zLfcvM','engage_workspace','profile','Invalid\x20resource:\x20','602126qHjRXm','\x0aUpdated:\x20','280964QuSXvo','dim','log','4BRSxKV','agent','cleared','llm_agent','1999470dwTGjU','site','tdx.json','name','\x0aResources:\x20site,\x20database,\x20parent_segment,\x20llm_project,\x20agent,\x20profile,\x20engage_workspace\x0a','\x20\x20\x20\x20\x20\x20\x20tdx\x20unset\x20--default\x20<resource>\x20\x20#\x20Clear\x20default\x20from\x20config\x0a','(session:\x20','validate','.\x20Must\x20be\x20one\x20of:\x20','6769824bbaGpX','Error:\x20','green','includes'];a43_0x51f9=function(){return _0x360f82;};return a43_0x51f9();}import a43_0x2c97a4 from'chalk';import*as a43_0x253f0b from'node:path';export class UnsetCommand extends BaseCommand{[a43_0x492c3a(0xac)]='unset';['description']=a43_0x492c3a(0xb6);[a43_0x492c3a(0xb0)](_0x1e9a40){const _0x2a0456=a43_0x492c3a,{args:_0x748172,options:_0x4622d5}=_0x1e9a40,_0x49a3dc=_0x4622d5[_0x2a0456(0xbd)];if(_0x748172['length']===0x0)return'Usage:\x20tdx\x20unset\x20<resource>\x0a'+_0x2a0456(0xae)+_0x2a0456(0xad)+'\x0aRun\x20\x27tdx\x20unset\x20--help\x27\x20for\x20more\x20options';const _0x33cd55=_0x748172[0x0],_0x44c35f=[_0x2a0456(0xaa),_0x2a0456(0xb7),_0x2a0456(0xbc),_0x2a0456(0xb8),_0x2a0456(0xa6),_0x2a0456(0x9e),_0x2a0456(0x9d)];if(!_0x44c35f[_0x2a0456(0xb5)](_0x33cd55))return _0x2a0456(0x9f)+_0x33cd55+_0x2a0456(0xb1)+_0x44c35f['join'](',\x20');if(_0x49a3dc&&_0x33cd55!==_0x2a0456(0xaa)&&_0x33cd55!==_0x2a0456(0x9e))return _0x2a0456(0x9b);return undefined;}async['execute'](_0x6fe338){const _0x573642=a43_0x492c3a,{args:_0x5e9aca,options:_0x4e8c9c}=_0x6fe338,_0x3c7f42=_0x4e8c9c[_0x573642(0xbd)];cleanExpiredSessions();try{const _0x5363d6=_0x5e9aca[0x0],_0x4e7473=a43_0x253f0b['join'](getConfigDir(),_0x573642(0xab));if(_0x3c7f42){if(_0x5363d6===_0x573642(0xaa))return clearDefaultSiteFromUserConfig(),console['log'](_0x573642(0xbb)+a43_0x2c97a4[_0x573642(0xb4)]('cleared')),console[_0x573642(0xa4)](a43_0x2c97a4[_0x573642(0xa3)]('\x0aUpdated:\x20'+_0x4e7473)),0x0;if(_0x5363d6===_0x573642(0x9e))return clearActiveProfileFromUserConfig(),console[_0x573642(0xa4)]('Default\x20profile\x20'+a43_0x2c97a4[_0x573642(0xb4)](_0x573642(0xa7))),console[_0x573642(0xa4)](a43_0x2c97a4[_0x573642(0xa3)](_0x573642(0xa1)+_0x4e7473)),0x0;}const _0x3d0d53=getSessionID(_0x4e8c9c['session']),_0x2503ec={'site':_0x573642(0xaa),'database':_0x573642(0xb7),'parent_segment':_0x573642(0xbc),'llm_project':_0x573642(0xb8),'agent':_0x573642(0xa8),'profile':_0x573642(0x9e),'engage_workspace':_0x573642(0x9d)},_0xb9d41=_0x2503ec[_0x5363d6];return _0xb9d41&&(clearSessionContextField(_0xb9d41,_0x4e8c9c[_0x573642(0xbf)]),console[_0x573642(0xa4)](_0x573642(0xb9)+_0x5363d6+'\x20'+a43_0x2c97a4['green']('cleared')+'\x20'+a43_0x2c97a4[_0x573642(0xa3)](_0x573642(0xaf)+_0x3d0d53+')'))),0x0;}catch(_0x4934ce){return _0x4934ce instanceof Error&&console['error'](_0x573642(0xb3)+_0x4934ce[_0x573642(0x9a)]),0x1;}}}
1
+ const a43_0x5de2dc=a43_0x4f01;(function(_0x3b334d,_0x3de0cb){const _0x23529d=a43_0x4f01,_0x32aada=_0x3b334d();while(!![]){try{const _0x72a70=-parseInt(_0x23529d(0xf0))/0x1*(parseInt(_0x23529d(0xf5))/0x2)+parseInt(_0x23529d(0xe5))/0x3*(parseInt(_0x23529d(0xea))/0x4)+-parseInt(_0x23529d(0xf8))/0x5+parseInt(_0x23529d(0xe9))/0x6+parseInt(_0x23529d(0xe2))/0x7+parseInt(_0x23529d(0xe8))/0x8*(parseInt(_0x23529d(0xdf))/0x9)+-parseInt(_0x23529d(0xdc))/0xa;if(_0x72a70===_0x3de0cb)break;else _0x32aada['push'](_0x32aada['shift']());}catch(_0x25d4ab){_0x32aada['push'](_0x32aada['shift']());}}}(a43_0x4176,0xa2e98));function a43_0x4f01(_0x285684,_0x58c53f){_0x285684=_0x285684-0xdb;const _0x4176d1=a43_0x4176();let _0x4f01c0=_0x4176d1[_0x285684];return _0x4f01c0;}import{BaseCommand}from'./command.js';import{getSessionID,cleanExpiredSessions,clearSessionContextField}from'../core/session.js';import{clearDefaultSiteFromUserConfig,clearActiveProfileFromUserConfig}from'../core/profile.js';import{getConfigDir}from'../core/config.js';function a43_0x4176(){const _0x90498a=['54kLlwiU','message','default','7184247HTVzkd','session','--default\x20can\x20only\x20be\x20used\x20with\x20\x27site\x27\x20or\x20\x27profile\x27.\x20Other\x20resources\x20are\x20session-level\x20only.','819471WMZTLL','llm_project','site','1444096rirjYn','4770012aDHFJF','16FRUgaP','execute','dim','Default\x20profile\x20','\x0aRun\x20\x27tdx\x20unset\x20--help\x27\x20for\x20more\x20options','green','98wARWws','engage_workspace','includes','validate','profile','11078RCnUYM','Session\x20','join','759135ZrYphg','unset','(session:\x20','Error:\x20','cleared','log','\x20\x20\x20\x20\x20\x20\x20tdx\x20unset\x20--default\x20<resource>\x20\x20#\x20Clear\x20default\x20from\x20config\x0a','\x0aUpdated:\x20','Clear\x20session-level\x20or\x20default\x20context\x20values','parent_segment','\x0aResources:\x20site,\x20database,\x20parent_segment,\x20llm_project,\x20agent,\x20profile,\x20engage_workspace\x0a','26350860EByqHP','error','database'];a43_0x4176=function(){return _0x90498a;};return a43_0x4176();}import a43_0x2e317d from'chalk';import*as a43_0x49fe30 from'node:path';export class UnsetCommand extends BaseCommand{['name']=a43_0x5de2dc(0xf9);['description']=a43_0x5de2dc(0x100);[a43_0x5de2dc(0xf3)](_0x5eab32){const _0x4fa035=a43_0x5de2dc,{args:_0x47da61,options:_0x1aaf3c}=_0x5eab32,_0xfc8d5f=_0x1aaf3c['default'];if(_0x47da61['length']===0x0)return'Usage:\x20tdx\x20unset\x20<resource>\x0a'+_0x4fa035(0xfe)+_0x4fa035(0xdb)+_0x4fa035(0xee);const _0x498f8b=_0x47da61[0x0],_0x185326=['site','database',_0x4fa035(0x101),'llm_project','agent',_0x4fa035(0xf4),_0x4fa035(0xf1)];if(!_0x185326[_0x4fa035(0xf2)](_0x498f8b))return'Invalid\x20resource:\x20'+_0x498f8b+'.\x20Must\x20be\x20one\x20of:\x20'+_0x185326[_0x4fa035(0xf7)](',\x20');if(_0xfc8d5f&&_0x498f8b!=='site'&&_0x498f8b!=='profile')return _0x4fa035(0xe4);return undefined;}async[a43_0x5de2dc(0xeb)](_0x59ffcb){const _0x1c89b3=a43_0x5de2dc,{args:_0x20f405,options:_0x10fc44}=_0x59ffcb,_0x369cbf=_0x10fc44[_0x1c89b3(0xe1)];cleanExpiredSessions();try{const _0x27da9e=_0x20f405[0x0],_0x35a338=a43_0x49fe30[_0x1c89b3(0xf7)](getConfigDir(),'tdx.json');if(_0x369cbf){if(_0x27da9e===_0x1c89b3(0xe7))return clearDefaultSiteFromUserConfig(),console[_0x1c89b3(0xfd)]('Default\x20site\x20'+a43_0x2e317d[_0x1c89b3(0xef)](_0x1c89b3(0xfc))),console[_0x1c89b3(0xfd)](a43_0x2e317d[_0x1c89b3(0xec)](_0x1c89b3(0xff)+_0x35a338)),0x0;if(_0x27da9e===_0x1c89b3(0xf4))return clearActiveProfileFromUserConfig(),console['log'](_0x1c89b3(0xed)+a43_0x2e317d[_0x1c89b3(0xef)](_0x1c89b3(0xfc))),console[_0x1c89b3(0xfd)](a43_0x2e317d[_0x1c89b3(0xec)](_0x1c89b3(0xff)+_0x35a338)),0x0;}const _0x5db07f=getSessionID(_0x10fc44['session']),_0x27725c={'site':_0x1c89b3(0xe7),'database':_0x1c89b3(0xde),'parent_segment':_0x1c89b3(0x101),'llm_project':_0x1c89b3(0xe6),'agent':'llm_agent','profile':_0x1c89b3(0xf4),'engage_workspace':_0x1c89b3(0xf1)},_0x411ac8=_0x27725c[_0x27da9e];return _0x411ac8&&(clearSessionContextField(_0x411ac8,_0x10fc44[_0x1c89b3(0xe3)]),console[_0x1c89b3(0xfd)](_0x1c89b3(0xf6)+_0x27da9e+'\x20'+a43_0x2e317d[_0x1c89b3(0xef)](_0x1c89b3(0xfc))+'\x20'+a43_0x2e317d['dim'](_0x1c89b3(0xfa)+_0x5db07f+')'))),0x0;}catch(_0x230adf){return _0x230adf instanceof Error&&console[_0x1c89b3(0xdd)](_0x1c89b3(0xfb)+_0x230adf[_0x1c89b3(0xe0)]),0x1;}}}
@@ -1 +1 @@
1
- const a44_0x9c1295=a44_0x5acf;(function(_0x31b5cc,_0x5f5d14){const _0x3b2de8=a44_0x5acf,_0x275c66=_0x31b5cc();while(!![]){try{const _0x1a7d9e=-parseInt(_0x3b2de8(0x1fc))/0x1+parseInt(_0x3b2de8(0x1ef))/0x2*(parseInt(_0x3b2de8(0x232))/0x3)+parseInt(_0x3b2de8(0x235))/0x4*(-parseInt(_0x3b2de8(0x210))/0x5)+-parseInt(_0x3b2de8(0x202))/0x6+-parseInt(_0x3b2de8(0x1f4))/0x7*(-parseInt(_0x3b2de8(0x223))/0x8)+parseInt(_0x3b2de8(0x213))/0x9+parseInt(_0x3b2de8(0x221))/0xa*(parseInt(_0x3b2de8(0x211))/0xb);if(_0x1a7d9e===_0x5f5d14)break;else _0x275c66['push'](_0x275c66['shift']());}catch(_0x19b7d7){_0x275c66['push'](_0x275c66['shift']());}}}(a44_0x2cff,0x6aaab));import{BaseCommand}from'./command.js';import{saveSessionContext,getSessionID,cleanExpiredSessions,clearSessionContext}from'../core/session.js';import{profileExists,saveActiveProfileToUserConfig,saveDefaultSiteToUserConfig}from'../core/profile.js';import{GlobalContext}from'../core/global-context.js';import{parseAgentRef}from'../sdk/agent/agent-ref-parser.js';function a44_0x5acf(_0x28c3bd,_0x4b10bd){_0x28c3bd=_0x28c3bd-0x1ea;const _0x2cff50=a44_0x2cff();let _0x5acfa4=_0x2cff50[_0x28c3bd];return _0x5acfa4;}function a44_0x2cff(){const _0x37797e=['green','site','\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20--default\x20release_channel\x20<stable|next>\x20\x20#\x20Set\x20release\x20channel\x0a','418092GjPZXT','llm_agent','agent','\x27\x20does\x20not\x20exist','join','Install\x20the\x20latest\x20next\x20version:\x20npm\x20install\x20-g\x20@treasuredata/tdx@next','3564738RwoLfR','message','\x0aSaved\x20to:\x20','engage','debug','includes','llm_project','Session\x20context\x20','Verifying\x20workspace\x20\x27','Default\x20site\x20set\x20to:\x20','\x0aSet\x20context:\x20tdx\x20use\x20<resource>\x20<value>','database','\x0aRun\x20\x27tdx\x20use\x20--help\x27\x20for\x20more\x20options','clear','245yiXxLR','23804KlUUBw','Error:\x20','3433302izmpuG','length','displayWithSources','\x27\x20to\x20save\x20permanently','name','\x0aUpdate\x20notifications\x20will\x20check\x20the\x20@latest\x20(stable)\x20channel.','tdx','next','\x27...','Session\x20site\x20set\x20to:\x20','Release\x20channel\x20set\x20to:\x20','Default\x20profile\x20set\x20to:\x20','display','\x0aTip:\x20Use\x20\x27tdx\x20use\x20--clear\x27\x20to\x20clear\x20session\x20overrides','1640WhgdjV','dim','8mWfbwl','default','\x0aTip:\x20Use\x20\x27tdx\x20use\x20--default\x20site\x20','Session\x20profile\x20set\x20to:\x20','\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20--clear\x20\x20\x20\x20\x20\x20#\x20Clear\x20session\x20context\x0a','description','Usage:\x20tdx\x20use\x20<resource>\x20<value>\x0a','Invalid\x20release\x20channel:\x20','NOT_FOUND','release_channel','profile','log','Session\x20parent_segment\x20set\x20to:\x20','code','error','1057836JluPOm','INVALID_ARGUMENT','Session\x20llm_project\x20set\x20to:\x20','16044zAtWCP','Session\x20agent\x20set\x20to:\x20','Set\x20session-level\x20context','use','.\x20Must\x20be\x20\x27stable\x27\x20or\x20\x27next\x27.','.\x20Must\x20be\x20one\x20of:\x20','(session:\x20','tdx.json','session','Error:\x20Profile\x20\x27','parent_segment','4sDfosg','\x0aUse\x20\x27tdx\x20engage\x20workspace\x20list\x27\x20to\x20see\x20available\x20workspaces','Invalid\x20resource:\x20','\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20current\x20context\x0a','cleared','1428441LHgDjr','engage_workspace','\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20--default\x20profile\x20<value>\x20\x20#\x20Save\x20default\x20profile\x20to\x20config\x0a','Session\x20database\x20set\x20to:\x20','\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20--default\x20site\x20<value>\x20\x20\x20\x20\x20#\x20Save\x20default\x20site\x20to\x20config\x0a'];a44_0x2cff=function(){return _0x37797e;};return a44_0x2cff();}import{getConfigDir,saveReleaseChannel}from'../core/config.js';import{SDKError,ErrorCode}from'../sdk/errors.js';import{withSpinner}from'../utils/spinner.js';import a44_0x1cac49 from'chalk';import*as a44_0x38db2f from'node:path';export class UseCommand extends BaseCommand{[a44_0x9c1295(0x217)]=a44_0x9c1295(0x238);[a44_0x9c1295(0x228)]=a44_0x9c1295(0x237);['validate'](_0x3ee340){const _0x21dbd7=a44_0x9c1295,{args:_0x3a618d,options:_0x39368d}=_0x3ee340,_0x10988a=_0x39368d[_0x21dbd7(0x224)];if(_0x3a618d[_0x21dbd7(0x214)]===0x0)return undefined;if(_0x3a618d[_0x21dbd7(0x214)]===0x1)return _0x21dbd7(0x229)+_0x21dbd7(0x1f2)+_0x21dbd7(0x227)+_0x21dbd7(0x1f8)+_0x21dbd7(0x1f6)+_0x21dbd7(0x1fb)+'\x0aResources:\x20site,\x20database,\x20parent_segment,\x20llm_project,\x20agent,\x20profile,\x20engage_workspace,\x20release_channel\x0a'+_0x21dbd7(0x20e);const _0x4bd75e=_0x3a618d[0x0],_0x42d254=['site',_0x21dbd7(0x20d),_0x21dbd7(0x1ee),_0x21dbd7(0x208),_0x21dbd7(0x1fe),_0x21dbd7(0x22d),_0x21dbd7(0x1f5),_0x21dbd7(0x22c)];if(!_0x42d254[_0x21dbd7(0x207)](_0x4bd75e))return _0x21dbd7(0x1f1)+_0x4bd75e+_0x21dbd7(0x23a)+_0x42d254[_0x21dbd7(0x200)](',\x20');if(_0x10988a&&_0x4bd75e!==_0x21dbd7(0x1fa)&&_0x4bd75e!==_0x21dbd7(0x22d)&&_0x4bd75e!==_0x21dbd7(0x22c))return'--default\x20can\x20only\x20be\x20used\x20with\x20\x27site\x27,\x20\x27profile\x27,\x20or\x20\x27release_channel\x27.\x20Other\x20resources\x20are\x20session-level\x20only.';if(_0x4bd75e==='release_channel'&&!_0x10988a)return'release_channel\x20requires\x20--default.\x20Usage:\x20tdx\x20use\x20--default\x20release_channel\x20<stable|next>';if(_0x4bd75e===_0x21dbd7(0x22c)){const _0x158496=_0x3a618d[0x1];if(_0x158496!=='stable'&&_0x158496!==_0x21dbd7(0x21a))return _0x21dbd7(0x22a)+_0x158496+_0x21dbd7(0x239);}return undefined;}async['execute'](_0x2dbf18){const _0x457566=a44_0x9c1295,{args:_0x406c40,options:_0xd7b99a}=_0x2dbf18,_0x6ab1f6=_0xd7b99a[_0x457566(0x206)],_0x1132f9=_0xd7b99a[_0x457566(0x20f)],_0xe33289=_0xd7b99a[_0x457566(0x224)];cleanExpiredSessions();try{if(_0x1132f9){clearSessionContext(_0xd7b99a[_0x457566(0x1ec)]);const _0x490820=getSessionID(_0xd7b99a[_0x457566(0x1ec)]);return console[_0x457566(0x22e)](_0x457566(0x209)+a44_0x1cac49[_0x457566(0x1f9)](_0x457566(0x1f3))+'\x20'+a44_0x1cac49[_0x457566(0x222)]('(session:\x20'+_0x490820+')')),0x0;}if(_0x406c40[_0x457566(0x214)]===0x0){const _0x57c5e8=new GlobalContext(_0xd7b99a);return _0x6ab1f6?_0x57c5e8[_0x457566(0x215)]():_0x57c5e8[_0x457566(0x21f)](),console[_0x457566(0x22e)](a44_0x1cac49[_0x457566(0x222)](_0x457566(0x20c))),console['log'](a44_0x1cac49[_0x457566(0x222)]('Resources:\x20site,\x20database,\x20parent_segment,\x20llm_project,\x20agent,\x20profile,\x20engage_workspace,\x20release_channel')),console[_0x457566(0x22e)](a44_0x1cac49['dim']('Use\x20--default\x20with\x20site,\x20profile,\x20or\x20release_channel\x20to\x20save\x20permanently')),0x0;}const _0x54ae=_0x406c40[0x0],_0x48c472=_0x406c40[0x1],_0x53b570=a44_0x38db2f['join'](getConfigDir(),_0x457566(0x1eb));if(_0xe33289){if(_0x54ae===_0x457566(0x1fa))return saveDefaultSiteToUserConfig(_0x48c472),console['log'](_0x457566(0x20b)+a44_0x1cac49[_0x457566(0x1f9)](_0x48c472)),console[_0x457566(0x22e)](a44_0x1cac49['dim'](_0x457566(0x204)+_0x53b570)),0x0;if(_0x54ae==='profile'){if(!profileExists(_0x48c472))return console[_0x457566(0x231)](_0x457566(0x1ed)+_0x48c472+_0x457566(0x1ff)),console['error']('\x0aUse\x20\x27tdx\x20profiles\x27\x20to\x20see\x20available\x20profiles'),0x1;return saveActiveProfileToUserConfig(_0x48c472),console[_0x457566(0x22e)](_0x457566(0x21e)+a44_0x1cac49[_0x457566(0x1f9)](_0x48c472)),console['log'](a44_0x1cac49[_0x457566(0x222)](_0x457566(0x204)+_0x53b570)),0x0;}if(_0x54ae==='release_channel')return saveReleaseChannel(_0x48c472),console[_0x457566(0x22e)](_0x457566(0x21d)+a44_0x1cac49[_0x457566(0x1f9)](_0x48c472)),console[_0x457566(0x22e)](a44_0x1cac49[_0x457566(0x222)](_0x457566(0x204)+_0x53b570)),_0x48c472===_0x457566(0x21a)?(console['log'](a44_0x1cac49[_0x457566(0x222)]('\x0aUpdate\x20notifications\x20will\x20now\x20check\x20the\x20@next\x20channel.')),console[_0x457566(0x22e)](a44_0x1cac49[_0x457566(0x222)](_0x457566(0x201)))):console['log'](a44_0x1cac49['dim'](_0x457566(0x218))),0x0;}if(_0x54ae===_0x457566(0x1fa)){const _0x879381=getSessionID(_0xd7b99a[_0x457566(0x1ec)]);return saveSessionContext({'site':_0x48c472},_0xd7b99a[_0x457566(0x1ec)]),console[_0x457566(0x22e)](_0x457566(0x21c)+a44_0x1cac49[_0x457566(0x1f9)](_0x48c472)+'\x20'+a44_0x1cac49[_0x457566(0x222)](_0x457566(0x1ea)+_0x879381+')')),console[_0x457566(0x22e)](a44_0x1cac49[_0x457566(0x222)](_0x457566(0x225)+_0x48c472+'\x27\x20to\x20save\x20permanently')),0x0;}if(_0x54ae===_0x457566(0x22d)){if(!profileExists(_0x48c472))return console[_0x457566(0x231)](_0x457566(0x1ed)+_0x48c472+_0x457566(0x1ff)),console['error']('\x0aUse\x20\x27tdx\x20profiles\x27\x20to\x20see\x20available\x20profiles'),0x1;const _0x4d2e84=getSessionID(_0xd7b99a[_0x457566(0x1ec)]);return saveSessionContext({'profile':_0x48c472},_0xd7b99a[_0x457566(0x1ec)]),console[_0x457566(0x22e)](_0x457566(0x226)+a44_0x1cac49[_0x457566(0x1f9)](_0x48c472)+'\x20'+a44_0x1cac49['dim'](_0x457566(0x1ea)+_0x4d2e84+')')),console[_0x457566(0x22e)](a44_0x1cac49['dim']('\x0aTip:\x20Use\x20\x27tdx\x20use\x20--default\x20profile\x20'+_0x48c472+_0x457566(0x216))),0x0;}const _0x35fa48={},_0x1e54a5=getSessionID(_0xd7b99a[_0x457566(0x1ec)]);switch(_0x54ae){case _0x457566(0x20d):_0x35fa48[_0x457566(0x20d)]=_0x48c472,console['log'](_0x457566(0x1f7)+a44_0x1cac49[_0x457566(0x1f9)](_0x48c472)+'\x20'+a44_0x1cac49[_0x457566(0x222)](_0x457566(0x1ea)+_0x1e54a5+')'));break;case _0x457566(0x1ee):_0x35fa48['parent_segment']=_0x48c472,console[_0x457566(0x22e)](_0x457566(0x22f)+a44_0x1cac49['green'](_0x48c472)+'\x20'+a44_0x1cac49[_0x457566(0x222)]('(session:\x20'+_0x1e54a5+')'));break;case _0x457566(0x208):_0x35fa48[_0x457566(0x208)]=_0x48c472,console['log'](_0x457566(0x234)+a44_0x1cac49['green'](_0x48c472)+'\x20'+a44_0x1cac49['dim'](_0x457566(0x1ea)+_0x1e54a5+')'));break;case _0x457566(0x1fe):{const {projectName:_0x3a7a96,agentName:_0x39bf2a}=parseAgentRef(_0x48c472);_0x39bf2a?(_0x35fa48['llm_project']=_0x3a7a96,_0x35fa48[_0x457566(0x1fd)]=_0x39bf2a,console[_0x457566(0x22e)]('Session\x20llm_project\x20set\x20to:\x20'+a44_0x1cac49[_0x457566(0x1f9)](_0x3a7a96)+'\x20'+a44_0x1cac49[_0x457566(0x222)]('(session:\x20'+_0x1e54a5+')')),console['log'](_0x457566(0x236)+a44_0x1cac49['green'](_0x39bf2a)+'\x20'+a44_0x1cac49[_0x457566(0x222)]('(session:\x20'+_0x1e54a5+')'))):(_0x35fa48[_0x457566(0x1fd)]=_0x48c472,console[_0x457566(0x22e)](_0x457566(0x236)+a44_0x1cac49[_0x457566(0x1f9)](_0x48c472)+'\x20'+a44_0x1cac49[_0x457566(0x222)](_0x457566(0x1ea)+_0x1e54a5+')')));break;}case'engage_workspace':{try{await withSpinner(_0x457566(0x20a)+_0x48c472+_0x457566(0x21b),()=>_0x2dbf18[_0x457566(0x219)][_0x457566(0x205)]['resolveWorkspaceId'](_0x48c472));}catch(_0x1657c1){if(_0x1657c1 instanceof SDKError&&(_0x1657c1[_0x457566(0x230)]===ErrorCode[_0x457566(0x22b)]||_0x1657c1['code']===ErrorCode[_0x457566(0x233)]))return console[_0x457566(0x231)](_0x457566(0x212)+_0x1657c1[_0x457566(0x203)]),console[_0x457566(0x231)](_0x457566(0x1f0)),0x1;throw _0x1657c1;}_0x35fa48['engage_workspace']=_0x48c472,console[_0x457566(0x22e)]('Session\x20engage_workspace\x20set\x20to:\x20'+a44_0x1cac49[_0x457566(0x1f9)](_0x48c472)+'\x20'+a44_0x1cac49['dim']('(session:\x20'+_0x1e54a5+')'));break;}}return saveSessionContext(_0x35fa48,_0xd7b99a[_0x457566(0x1ec)]),console[_0x457566(0x22e)](a44_0x1cac49[_0x457566(0x222)](_0x457566(0x220))),0x0;}catch(_0x398f3c){return _0x398f3c instanceof Error&&console['error'](_0x457566(0x212)+_0x398f3c[_0x457566(0x203)]),0x1;}}}
1
+ const a44_0x309475=a44_0xc061;(function(_0x90eb8e,_0x9f9a11){const _0x10d405=a44_0xc061,_0x15535c=_0x90eb8e();while(!![]){try{const _0x1c43f6=-parseInt(_0x10d405(0x131))/0x1*(parseInt(_0x10d405(0x124))/0x2)+-parseInt(_0x10d405(0x160))/0x3+parseInt(_0x10d405(0x155))/0x4+-parseInt(_0x10d405(0x145))/0x5+parseInt(_0x10d405(0x14d))/0x6*(parseInt(_0x10d405(0x15c))/0x7)+-parseInt(_0x10d405(0x122))/0x8*(-parseInt(_0x10d405(0x13e))/0x9)+parseInt(_0x10d405(0x14b))/0xa;if(_0x1c43f6===_0x9f9a11)break;else _0x15535c['push'](_0x15535c['shift']());}catch(_0x280e90){_0x15535c['push'](_0x15535c['shift']());}}}(a44_0x3dbb,0x99ad5));function a44_0xc061(_0x12c14b,_0x4f446b){_0x12c14b=_0x12c14b-0x11e;const _0x3dbbdb=a44_0x3dbb();let _0xc06128=_0x3dbbdb[_0x12c14b];return _0xc06128;}function a44_0x3dbb(){const _0x539c42=['default','release_channel','message','(session:\x20','includes','Session\x20llm_project\x20set\x20to:\x20','\x27\x20to\x20save\x20permanently','displayWithSources','\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20--default\x20site\x20<value>\x20\x20\x20\x20\x20#\x20Save\x20default\x20site\x20to\x20config\x0a','tdx','parent_segment','16wjmaNb','Resources:\x20site,\x20database,\x20parent_segment,\x20llm_project,\x20agent,\x20profile,\x20engage_workspace,\x20release_channel','18zTgibA','Session\x20context\x20','Session\x20parent_segment\x20set\x20to:\x20','\x0aTip:\x20Use\x20\x27tdx\x20use\x20--clear\x27\x20to\x20clear\x20session\x20overrides','\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20--clear\x20\x20\x20\x20\x20\x20#\x20Clear\x20session\x20context\x0a','Usage:\x20tdx\x20use\x20<resource>\x20<value>\x0a','length','NOT_FOUND','next','validate','display','Error:\x20','debug','53731VbXVuf','Install\x20the\x20latest\x20next\x20version:\x20npm\x20install\x20-g\x20@treasuredata/tdx@next','log','\x0aSaved\x20to:\x20','code','use','\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20--default\x20profile\x20<value>\x20\x20#\x20Save\x20default\x20profile\x20to\x20config\x0a','name','\x27\x20does\x20not\x20exist','\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20--default\x20release_channel\x20<stable|next>\x20\x20#\x20Set\x20release\x20channel\x0a','Set\x20session-level\x20context','stable','\x0aUpdate\x20notifications\x20will\x20check\x20the\x20@latest\x20(stable)\x20channel.','4254147gfVjSu','green','\x0aTip:\x20Use\x20\x27tdx\x20use\x20--default\x20site\x20','Error:\x20Profile\x20\x27','Verifying\x20workspace\x20\x27','join','engage','2695445FXPnnk','\x27...','\x0aTip:\x20Use\x20\x27tdx\x20use\x20--default\x20profile\x20','.\x20Must\x20be\x20\x27stable\x27\x20or\x20\x27next\x27.','engage_workspace','session','4072070qDTpOP','Session\x20database\x20set\x20to:\x20','72zTYnPv','tdx.json','Session\x20agent\x20set\x20to:\x20','INVALID_ARGUMENT','dim','llm_project','\x0aRun\x20\x27tdx\x20use\x20--help\x27\x20for\x20more\x20options','Session\x20site\x20set\x20to:\x20','870476uBuBzp','Invalid\x20resource:\x20','profile','site','database','Default\x20site\x20set\x20to:\x20','--default\x20can\x20only\x20be\x20used\x20with\x20\x27site\x27,\x20\x27profile\x27,\x20or\x20\x27release_channel\x27.\x20Other\x20resources\x20are\x20session-level\x20only.','626059nCrtGf','description','llm_agent','agent','2973921gGNKqn','\x0aResources:\x20site,\x20database,\x20parent_segment,\x20llm_project,\x20agent,\x20profile,\x20engage_workspace,\x20release_channel\x0a','\x0aUse\x20\x27tdx\x20profiles\x27\x20to\x20see\x20available\x20profiles','clear','Invalid\x20release\x20channel:\x20','error','Release\x20channel\x20set\x20to:\x20','Default\x20profile\x20set\x20to:\x20','Use\x20--default\x20with\x20site,\x20profile,\x20or\x20release_channel\x20to\x20save\x20permanently'];a44_0x3dbb=function(){return _0x539c42;};return a44_0x3dbb();}import{BaseCommand}from'./command.js';import{saveSessionContext,getSessionID,cleanExpiredSessions,clearSessionContext}from'../core/session.js';import{profileExists,saveActiveProfileToUserConfig,saveDefaultSiteToUserConfig}from'../core/profile.js';import{GlobalContext}from'../core/global-context.js';import{parseAgentRef}from'../sdk/agent/agent-ref-parser.js';import{getConfigDir,saveReleaseChannel}from'../core/config.js';import{SDKError,ErrorCode}from'../sdk/errors.js';import{withSpinner}from'../utils/spinner.js';import a44_0x9be528 from'chalk';import*as a44_0x118633 from'node:path';export class UseCommand extends BaseCommand{[a44_0x309475(0x138)]=a44_0x309475(0x136);[a44_0x309475(0x15d)]=a44_0x309475(0x13b);[a44_0x309475(0x12d)](_0x9f1f9){const _0x39b563=a44_0x309475,{args:_0x19a917,options:_0x504f29}=_0x9f1f9,_0x2e3e8d=_0x504f29[_0x39b563(0x169)];if(_0x19a917['length']===0x0)return undefined;if(_0x19a917['length']===0x1)return _0x39b563(0x129)+'\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20current\x20context\x0a'+_0x39b563(0x128)+_0x39b563(0x11f)+_0x39b563(0x137)+_0x39b563(0x13a)+_0x39b563(0x161)+_0x39b563(0x153);const _0x3c8205=_0x19a917[0x0],_0xa98c3e=[_0x39b563(0x158),_0x39b563(0x159),_0x39b563(0x121),_0x39b563(0x152),_0x39b563(0x15f),_0x39b563(0x157),_0x39b563(0x149),'release_channel'];if(!_0xa98c3e[_0x39b563(0x16d)](_0x3c8205))return _0x39b563(0x156)+_0x3c8205+'.\x20Must\x20be\x20one\x20of:\x20'+_0xa98c3e[_0x39b563(0x143)](',\x20');if(_0x2e3e8d&&_0x3c8205!=='site'&&_0x3c8205!==_0x39b563(0x157)&&_0x3c8205!==_0x39b563(0x16a))return _0x39b563(0x15b);if(_0x3c8205===_0x39b563(0x16a)&&!_0x2e3e8d)return'release_channel\x20requires\x20--default.\x20Usage:\x20tdx\x20use\x20--default\x20release_channel\x20<stable|next>';if(_0x3c8205===_0x39b563(0x16a)){const _0x4584f2=_0x19a917[0x1];if(_0x4584f2!==_0x39b563(0x13c)&&_0x4584f2!==_0x39b563(0x12c))return _0x39b563(0x164)+_0x4584f2+_0x39b563(0x148);}return undefined;}async['execute'](_0x10ca0e){const _0x54dbf5=a44_0x309475,{args:_0x25d0db,options:_0xbfadb}=_0x10ca0e,_0x518f23=_0xbfadb[_0x54dbf5(0x130)],_0x31cf89=_0xbfadb[_0x54dbf5(0x163)],_0xa029dd=_0xbfadb['default'];cleanExpiredSessions();try{if(_0x31cf89){clearSessionContext(_0xbfadb[_0x54dbf5(0x14a)]);const _0x268841=getSessionID(_0xbfadb['session']);return console[_0x54dbf5(0x133)](_0x54dbf5(0x125)+a44_0x9be528[_0x54dbf5(0x13f)]('cleared')+'\x20'+a44_0x9be528[_0x54dbf5(0x151)](_0x54dbf5(0x16c)+_0x268841+')')),0x0;}if(_0x25d0db[_0x54dbf5(0x12a)]===0x0){const _0x274172=new GlobalContext(_0xbfadb);return _0x518f23?_0x274172[_0x54dbf5(0x11e)]():_0x274172[_0x54dbf5(0x12e)](),console['log'](a44_0x9be528['dim']('\x0aSet\x20context:\x20tdx\x20use\x20<resource>\x20<value>')),console['log'](a44_0x9be528[_0x54dbf5(0x151)](_0x54dbf5(0x123))),console['log'](a44_0x9be528[_0x54dbf5(0x151)](_0x54dbf5(0x168))),0x0;}const _0x44f259=_0x25d0db[0x0],_0x22592c=_0x25d0db[0x1],_0x31588a=a44_0x118633[_0x54dbf5(0x143)](getConfigDir(),_0x54dbf5(0x14e));if(_0xa029dd){if(_0x44f259===_0x54dbf5(0x158))return saveDefaultSiteToUserConfig(_0x22592c),console[_0x54dbf5(0x133)](_0x54dbf5(0x15a)+a44_0x9be528[_0x54dbf5(0x13f)](_0x22592c)),console[_0x54dbf5(0x133)](a44_0x9be528[_0x54dbf5(0x151)](_0x54dbf5(0x134)+_0x31588a)),0x0;if(_0x44f259===_0x54dbf5(0x157)){if(!profileExists(_0x22592c))return console[_0x54dbf5(0x165)](_0x54dbf5(0x141)+_0x22592c+'\x27\x20does\x20not\x20exist'),console[_0x54dbf5(0x165)]('\x0aUse\x20\x27tdx\x20profiles\x27\x20to\x20see\x20available\x20profiles'),0x1;return saveActiveProfileToUserConfig(_0x22592c),console[_0x54dbf5(0x133)](_0x54dbf5(0x167)+a44_0x9be528[_0x54dbf5(0x13f)](_0x22592c)),console[_0x54dbf5(0x133)](a44_0x9be528[_0x54dbf5(0x151)](_0x54dbf5(0x134)+_0x31588a)),0x0;}if(_0x44f259==='release_channel')return saveReleaseChannel(_0x22592c),console[_0x54dbf5(0x133)](_0x54dbf5(0x166)+a44_0x9be528[_0x54dbf5(0x13f)](_0x22592c)),console['log'](a44_0x9be528[_0x54dbf5(0x151)](_0x54dbf5(0x134)+_0x31588a)),_0x22592c===_0x54dbf5(0x12c)?(console[_0x54dbf5(0x133)](a44_0x9be528[_0x54dbf5(0x151)]('\x0aUpdate\x20notifications\x20will\x20now\x20check\x20the\x20@next\x20channel.')),console[_0x54dbf5(0x133)](a44_0x9be528[_0x54dbf5(0x151)](_0x54dbf5(0x132)))):console[_0x54dbf5(0x133)](a44_0x9be528[_0x54dbf5(0x151)](_0x54dbf5(0x13d))),0x0;}if(_0x44f259==='site'){const _0x32645b=getSessionID(_0xbfadb[_0x54dbf5(0x14a)]);return saveSessionContext({'site':_0x22592c},_0xbfadb[_0x54dbf5(0x14a)]),console[_0x54dbf5(0x133)](_0x54dbf5(0x154)+a44_0x9be528[_0x54dbf5(0x13f)](_0x22592c)+'\x20'+a44_0x9be528[_0x54dbf5(0x151)]('(session:\x20'+_0x32645b+')')),console[_0x54dbf5(0x133)](a44_0x9be528[_0x54dbf5(0x151)](_0x54dbf5(0x140)+_0x22592c+'\x27\x20to\x20save\x20permanently')),0x0;}if(_0x44f259==='profile'){if(!profileExists(_0x22592c))return console[_0x54dbf5(0x165)](_0x54dbf5(0x141)+_0x22592c+_0x54dbf5(0x139)),console[_0x54dbf5(0x165)](_0x54dbf5(0x162)),0x1;const _0x4aa1b4=getSessionID(_0xbfadb[_0x54dbf5(0x14a)]);return saveSessionContext({'profile':_0x22592c},_0xbfadb['session']),console['log']('Session\x20profile\x20set\x20to:\x20'+a44_0x9be528[_0x54dbf5(0x13f)](_0x22592c)+'\x20'+a44_0x9be528[_0x54dbf5(0x151)](_0x54dbf5(0x16c)+_0x4aa1b4+')')),console[_0x54dbf5(0x133)](a44_0x9be528['dim'](_0x54dbf5(0x147)+_0x22592c+_0x54dbf5(0x16f))),0x0;}const _0x434697={},_0x5ace92=getSessionID(_0xbfadb[_0x54dbf5(0x14a)]);switch(_0x44f259){case _0x54dbf5(0x159):_0x434697[_0x54dbf5(0x159)]=_0x22592c,console[_0x54dbf5(0x133)](_0x54dbf5(0x14c)+a44_0x9be528[_0x54dbf5(0x13f)](_0x22592c)+'\x20'+a44_0x9be528['dim'](_0x54dbf5(0x16c)+_0x5ace92+')'));break;case'parent_segment':_0x434697[_0x54dbf5(0x121)]=_0x22592c,console['log'](_0x54dbf5(0x126)+a44_0x9be528[_0x54dbf5(0x13f)](_0x22592c)+'\x20'+a44_0x9be528['dim'](_0x54dbf5(0x16c)+_0x5ace92+')'));break;case _0x54dbf5(0x152):_0x434697['llm_project']=_0x22592c,console[_0x54dbf5(0x133)](_0x54dbf5(0x16e)+a44_0x9be528['green'](_0x22592c)+'\x20'+a44_0x9be528[_0x54dbf5(0x151)](_0x54dbf5(0x16c)+_0x5ace92+')'));break;case _0x54dbf5(0x15f):{const {projectName:_0x3de856,agentName:_0x4919f6}=parseAgentRef(_0x22592c);_0x4919f6?(_0x434697[_0x54dbf5(0x152)]=_0x3de856,_0x434697[_0x54dbf5(0x15e)]=_0x4919f6,console[_0x54dbf5(0x133)](_0x54dbf5(0x16e)+a44_0x9be528[_0x54dbf5(0x13f)](_0x3de856)+'\x20'+a44_0x9be528['dim'](_0x54dbf5(0x16c)+_0x5ace92+')')),console['log'](_0x54dbf5(0x14f)+a44_0x9be528['green'](_0x4919f6)+'\x20'+a44_0x9be528[_0x54dbf5(0x151)](_0x54dbf5(0x16c)+_0x5ace92+')'))):(_0x434697['llm_agent']=_0x22592c,console[_0x54dbf5(0x133)](_0x54dbf5(0x14f)+a44_0x9be528[_0x54dbf5(0x13f)](_0x22592c)+'\x20'+a44_0x9be528['dim']('(session:\x20'+_0x5ace92+')')));break;}case _0x54dbf5(0x149):{try{await withSpinner(_0x54dbf5(0x142)+_0x22592c+_0x54dbf5(0x146),()=>_0x10ca0e[_0x54dbf5(0x120)][_0x54dbf5(0x144)]['resolveWorkspaceId'](_0x22592c));}catch(_0x3a4d91){if(_0x3a4d91 instanceof SDKError&&(_0x3a4d91['code']===ErrorCode[_0x54dbf5(0x12b)]||_0x3a4d91[_0x54dbf5(0x135)]===ErrorCode[_0x54dbf5(0x150)]))return console['error'](_0x54dbf5(0x12f)+_0x3a4d91[_0x54dbf5(0x16b)]),console[_0x54dbf5(0x165)]('\x0aUse\x20\x27tdx\x20engage\x20workspace\x20list\x27\x20to\x20see\x20available\x20workspaces'),0x1;throw _0x3a4d91;}_0x434697[_0x54dbf5(0x149)]=_0x22592c,console[_0x54dbf5(0x133)]('Session\x20engage_workspace\x20set\x20to:\x20'+a44_0x9be528[_0x54dbf5(0x13f)](_0x22592c)+'\x20'+a44_0x9be528[_0x54dbf5(0x151)](_0x54dbf5(0x16c)+_0x5ace92+')'));break;}}return saveSessionContext(_0x434697,_0xbfadb[_0x54dbf5(0x14a)]),console[_0x54dbf5(0x133)](a44_0x9be528[_0x54dbf5(0x151)](_0x54dbf5(0x127))),0x0;}catch(_0x561efd){return _0x561efd instanceof Error&&console[_0x54dbf5(0x165)](_0x54dbf5(0x12f)+_0x561efd[_0x54dbf5(0x16b)]),0x1;}}}
@@ -1 +1 @@
1
- const a45_0x1a9cca=a45_0xa549;(function(_0x4e16f5,_0x6b6dcc){const _0x1548cb=a45_0xa549,_0x11b290=_0x4e16f5();while(!![]){try{const _0x255ceb=-parseInt(_0x1548cb(0x157))/0x1+-parseInt(_0x1548cb(0x162))/0x2*(parseInt(_0x1548cb(0x14a))/0x3)+-parseInt(_0x1548cb(0x150))/0x4*(parseInt(_0x1548cb(0x14b))/0x5)+-parseInt(_0x1548cb(0x156))/0x6+-parseInt(_0x1548cb(0x158))/0x7*(parseInt(_0x1548cb(0x15c))/0x8)+-parseInt(_0x1548cb(0x15a))/0x9+parseInt(_0x1548cb(0x14e))/0xa*(parseInt(_0x1548cb(0x148))/0xb);if(_0x255ceb===_0x6b6dcc)break;else _0x11b290['push'](_0x11b290['shift']());}catch(_0x414629){_0x11b290['push'](_0x11b290['shift']());}}}(a45_0x1fd7,0x6feec));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleSDKOutput,handleSingleObjectOutput}from'../core/command-output.js';function a45_0xa549(_0x533433,_0xa2fc8e){_0x533433=_0x533433-0x148;const _0x1fd7a8=a45_0x1fd7();let _0xa549dd=_0x1fd7a8[_0x533433];return _0xa549dd;}import{withSpinner}from'../utils/spinner.js';function a45_0x1fd7(){const _0x36295b=['51220dFscYK','data','error','7930aEvCAm','✔\x20Found\x20','312XZwqtw','message','Error:\x20','user\x20list','Listing\x20users...','cause','3535176TfjrIG','295057rYSEfQ','24675KpOfhB','length','3472920IVCDMA','name','936QwFFUj','Show\x20current\x20user\x20information','getCurrent','description','user','verbose','46fGVXnN','Fetching\x20user\x20info...','42779mFqvLw','execute','18771teIDzv'];a45_0x1fd7=function(){return _0x36295b;};return a45_0x1fd7();}export class UserCommand extends BaseCommand{['name']=a45_0x1a9cca(0x160);[a45_0x1a9cca(0x15f)]=a45_0x1a9cca(0x15d);async[a45_0x1a9cca(0x149)](_0x23ee21){const _0x239ee2=a45_0x1a9cca,{options:_0x52cef7,tdx:_0x11ed5f}=_0x23ee21;try{const _0x460a20=await withSpinner(_0x239ee2(0x163),()=>_0x11ed5f[_0x239ee2(0x160)][_0x239ee2(0x15e)](),{'verbose':_0x52cef7['verbose']}),_0x36d2b5=_0x460a20[_0x239ee2(0x14c)];return await handleSingleObjectOutput(_0x36d2b5,_0x52cef7),0x0;}catch(_0x1b9c59){if(_0x1b9c59 instanceof SDKError)return console[_0x239ee2(0x14d)](_0x239ee2(0x152)+_0x1b9c59[_0x239ee2(0x151)]),_0x1b9c59[_0x239ee2(0x155)]&&console['error']('\x20\x20Cause:\x20'+_0x1b9c59[_0x239ee2(0x155)]),0x1;throw _0x1b9c59;}}}export class UserListCommand extends BaseCommand{[a45_0x1a9cca(0x15b)]=a45_0x1a9cca(0x153);['description']='List\x20all\x20users\x20in\x20the\x20account';async[a45_0x1a9cca(0x149)](_0xf8bc16){const _0x43a9b9=a45_0x1a9cca,{options:_0x267881,tdx:_0x2a607a}=_0xf8bc16;try{const _0x4c9de6=await withSpinner(_0x43a9b9(0x154),()=>_0x2a607a['user']['list'](),{'verbose':_0x267881[_0x43a9b9(0x161)]}),_0x57a2e9=_0x4c9de6[_0x43a9b9(0x14c)];return console['error'](_0x43a9b9(0x14f)+_0x57a2e9[_0x43a9b9(0x159)]+'\x20user'+(_0x57a2e9[_0x43a9b9(0x159)]!==0x1?'s':'')),await handleSDKOutput(_0x57a2e9,_0x267881),0x0;}catch(_0x4cb568){if(_0x4cb568 instanceof SDKError)return console[_0x43a9b9(0x14d)](_0x43a9b9(0x152)+_0x4cb568[_0x43a9b9(0x151)]),_0x4cb568[_0x43a9b9(0x155)]&&console[_0x43a9b9(0x14d)]('\x20\x20Cause:\x20'+_0x4cb568[_0x43a9b9(0x155)]),0x1;throw _0x4cb568;}}}
1
+ const a45_0x3e458a=a45_0x2fdb;(function(_0x3c0991,_0x4fe358){const _0x3324f2=a45_0x2fdb,_0x32264d=_0x3c0991();while(!![]){try{const _0x1570ca=-parseInt(_0x3324f2(0x1d0))/0x1+-parseInt(_0x3324f2(0x1cc))/0x2*(parseInt(_0x3324f2(0x1d5))/0x3)+-parseInt(_0x3324f2(0x1de))/0x4+-parseInt(_0x3324f2(0x1cd))/0x5+parseInt(_0x3324f2(0x1d1))/0x6*(parseInt(_0x3324f2(0x1cb))/0x7)+-parseInt(_0x3324f2(0x1d8))/0x8*(-parseInt(_0x3324f2(0x1d2))/0x9)+parseInt(_0x3324f2(0x1d3))/0xa;if(_0x1570ca===_0x4fe358)break;else _0x32264d['push'](_0x32264d['shift']());}catch(_0x54c86d){_0x32264d['push'](_0x32264d['shift']());}}}(a45_0x266e,0xf4174));import{BaseCommand}from'./command.js';function a45_0x266e(){const _0x2b2c5d=['49070350zNsnVO','user\x20list','5618139bufWLC','verbose','✔\x20Found\x20','90384aOJXwM','error','data','Fetching\x20user\x20info...','List\x20all\x20users\x20in\x20the\x20account','length','1992604uUKsIx','\x20\x20Cause:\x20','user','name','description','list','cause','Listing\x20users...','Error:\x20','getCurrent','\x20user','4792319niOHPa','2JHrZuq','9377130KqnkDV','execute','Show\x20current\x20user\x20information','1312633yokzJY','12pDqMrU','225fkSLgy'];a45_0x266e=function(){return _0x2b2c5d;};return a45_0x266e();}import{SDKError}from'../sdk/index.js';function a45_0x2fdb(_0x488d42,_0xd0201f){_0x488d42=_0x488d42-0x1c3;const _0x266e7e=a45_0x266e();let _0x2fdb47=_0x266e7e[_0x488d42];return _0x2fdb47;}import{handleSDKOutput,handleSingleObjectOutput}from'../core/command-output.js';import{withSpinner}from'../utils/spinner.js';export class UserCommand extends BaseCommand{['name']=a45_0x3e458a(0x1e0);[a45_0x3e458a(0x1c4)]=a45_0x3e458a(0x1cf);async[a45_0x3e458a(0x1ce)](_0x2c7f95){const _0x3d68f9=a45_0x3e458a,{options:_0x20cbde,tdx:_0x52c2a1}=_0x2c7f95;try{const _0x53e41a=await withSpinner(_0x3d68f9(0x1db),()=>_0x52c2a1[_0x3d68f9(0x1e0)][_0x3d68f9(0x1c9)](),{'verbose':_0x20cbde[_0x3d68f9(0x1d6)]}),_0x5d7f26=_0x53e41a[_0x3d68f9(0x1da)];return await handleSingleObjectOutput(_0x5d7f26,_0x20cbde),0x0;}catch(_0xbd697d){if(_0xbd697d instanceof SDKError)return console['error'](_0x3d68f9(0x1c8)+_0xbd697d['message']),_0xbd697d[_0x3d68f9(0x1c6)]&&console[_0x3d68f9(0x1d9)](_0x3d68f9(0x1df)+_0xbd697d['cause']),0x1;throw _0xbd697d;}}}export class UserListCommand extends BaseCommand{[a45_0x3e458a(0x1c3)]=a45_0x3e458a(0x1d4);[a45_0x3e458a(0x1c4)]=a45_0x3e458a(0x1dc);async['execute'](_0xe9dcbd){const _0x32b54c=a45_0x3e458a,{options:_0x4aeb4a,tdx:_0xa1959f}=_0xe9dcbd;try{const _0x24a6c9=await withSpinner(_0x32b54c(0x1c7),()=>_0xa1959f[_0x32b54c(0x1e0)][_0x32b54c(0x1c5)](),{'verbose':_0x4aeb4a[_0x32b54c(0x1d6)]}),_0x1a7db2=_0x24a6c9['data'];return console[_0x32b54c(0x1d9)](_0x32b54c(0x1d7)+_0x1a7db2[_0x32b54c(0x1dd)]+_0x32b54c(0x1ca)+(_0x1a7db2[_0x32b54c(0x1dd)]!==0x1?'s':'')),await handleSDKOutput(_0x1a7db2,_0x4aeb4a),0x0;}catch(_0x431cde){if(_0x431cde instanceof SDKError)return console[_0x32b54c(0x1d9)](_0x32b54c(0x1c8)+_0x431cde['message']),_0x431cde[_0x32b54c(0x1c6)]&&console[_0x32b54c(0x1d9)](_0x32b54c(0x1df)+_0x431cde[_0x32b54c(0x1c6)]),0x1;throw _0x431cde;}}}