@treasuredata/tdx 0.26.3 → 0.26.5

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 (171) 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.d.ts.map +1 -1
  5. package/dist/cli.js +1 -1
  6. package/dist/cli.js.map +1 -1
  7. package/dist/commands/activations.js +1 -1
  8. package/dist/commands/agent-command.js +1 -1
  9. package/dist/commands/agent-test-command.js +1 -1
  10. package/dist/commands/api-command.js +1 -1
  11. package/dist/commands/auth-command.js +1 -1
  12. package/dist/commands/chat-command.js +1 -1
  13. package/dist/commands/claude-command.js +1 -1
  14. package/dist/commands/claude-statusline-command.js +1 -1
  15. package/dist/commands/claude-usage-command.js +1 -1
  16. package/dist/commands/command.js +1 -1
  17. package/dist/commands/connection-command.js +1 -1
  18. package/dist/commands/databases.js +1 -1
  19. package/dist/commands/describe.js +1 -1
  20. package/dist/commands/engage-command.js +1 -1
  21. package/dist/commands/job-command.js +1 -1
  22. package/dist/commands/journey-command.js +1 -1
  23. package/dist/commands/journey-validate-command.js +1 -1
  24. package/dist/commands/llm-command.js +1 -1
  25. package/dist/commands/mcp-command.js +1 -1
  26. package/dist/commands/parent-segment-command.js +1 -1
  27. package/dist/commands/profile-command.js +1 -1
  28. package/dist/commands/profiles-command.js +1 -1
  29. package/dist/commands/query-command.js +1 -1
  30. package/dist/commands/schedule-command.js +1 -1
  31. package/dist/commands/segment-command.js +1 -1
  32. package/dist/commands/segment-create-command.js +1 -1
  33. package/dist/commands/segment-fields-command.js +1 -1
  34. package/dist/commands/segment-pull-command.js +1 -1
  35. package/dist/commands/segment-push-command.js +1 -1
  36. package/dist/commands/segment-update-command.js +1 -1
  37. package/dist/commands/segment-use-command.js +1 -1
  38. package/dist/commands/segment-validate-command.js +1 -1
  39. package/dist/commands/segments.js +1 -1
  40. package/dist/commands/show.js +1 -1
  41. package/dist/commands/status-command.js +1 -1
  42. package/dist/commands/tables.js +1 -1
  43. package/dist/commands/unset-command.js +1 -1
  44. package/dist/commands/use-command.js +1 -1
  45. package/dist/commands/user-command.js +1 -1
  46. package/dist/commands/workflow-command.js +1 -1
  47. package/dist/core/auth.js +1 -1
  48. package/dist/core/command-output.js +1 -1
  49. package/dist/core/config.js +1 -1
  50. package/dist/core/connection-cache.js +1 -1
  51. package/dist/core/constants.js +1 -1
  52. package/dist/core/credential-cache.js +1 -1
  53. package/dist/core/global-context.js +1 -1
  54. package/dist/core/keychain.js +1 -1
  55. package/dist/core/profile.js +1 -1
  56. package/dist/core/project-config.js +1 -1
  57. package/dist/core/session.js +1 -1
  58. package/dist/core/user-cache.js +1 -1
  59. package/dist/core/version.js +1 -1
  60. package/dist/index.js +1 -1
  61. package/dist/mcp/server.js +1 -1
  62. package/dist/mcp/tools/index.js +1 -1
  63. package/dist/mcp/tools/tdx-run.js +1 -1
  64. package/dist/mcp/tools/tdx-search.js +1 -1
  65. package/dist/mcp/utils.js +1 -1
  66. package/dist/proxy/claude-usage-tracker.js +1 -1
  67. package/dist/proxy/passthrough-server.js +1 -1
  68. package/dist/proxy/sse-usage-parser.js +1 -1
  69. package/dist/sdk/agent/agent-config.js +1 -1
  70. package/dist/sdk/agent/agent-ref-parser.js +1 -1
  71. package/dist/sdk/agent/agent-yaml.js +1 -1
  72. package/dist/sdk/agent/test/evaluator.js +1 -1
  73. package/dist/sdk/agent/test/executor.js +1 -1
  74. package/dist/sdk/agent/test/index.js +1 -1
  75. package/dist/sdk/agent/test/output.js +1 -1
  76. package/dist/sdk/agent/test/parser.js +1 -1
  77. package/dist/sdk/api.js +1 -1
  78. package/dist/sdk/client/cdp-api-client.js +1 -1
  79. package/dist/sdk/client/endpoints.js +1 -1
  80. package/dist/sdk/client/engage-api-client.js +1 -1
  81. package/dist/sdk/client/http-client.js +1 -1
  82. package/dist/sdk/client/llm-api-client.js +1 -1
  83. package/dist/sdk/client/rate-limiter.js +1 -1
  84. package/dist/sdk/client/td-api-client.js +1 -1
  85. package/dist/sdk/client/trino-api-client.js +1 -1
  86. package/dist/sdk/client/workflow-client.js +1 -1
  87. package/dist/sdk/connection-validator.js +1 -1
  88. package/dist/sdk/connection.js +1 -1
  89. package/dist/sdk/engage.js +1 -1
  90. package/dist/sdk/errors.js +1 -1
  91. package/dist/sdk/index.js +1 -1
  92. package/dist/sdk/io/index.js +1 -1
  93. package/dist/sdk/io/node-filesystem.js +1 -1
  94. package/dist/sdk/job.js +1 -1
  95. package/dist/sdk/journey.js +1 -1
  96. package/dist/sdk/llm/chat-cache.js +1 -1
  97. package/dist/sdk/llm/index.js +1 -1
  98. package/dist/sdk/llm/llm-backup-utils.js +1 -1
  99. package/dist/sdk/llm/model-factors.js +1 -1
  100. package/dist/sdk/personalization.js +1 -1
  101. package/dist/sdk/query/index.js +1 -1
  102. package/dist/sdk/query/sql-parser.js +1 -1
  103. package/dist/sdk/realtime.js +1 -1
  104. package/dist/sdk/schedule.js +1 -1
  105. package/dist/sdk/segment/child-segment-yaml.js +1 -1
  106. package/dist/sdk/segment/fields-display.js +1 -1
  107. package/dist/sdk/segment/file-discovery.js +1 -1
  108. package/dist/sdk/segment/journey-utils.js +1 -1
  109. package/dist/sdk/segment/journey-validator.js +1 -1
  110. package/dist/sdk/segment/journey-yaml.js +1 -1
  111. package/dist/sdk/segment/parent-segment-preview.js +1 -1
  112. package/dist/sdk/segment/parent-segment-yaml.js +1 -1
  113. package/dist/sdk/segment/pull-workflow.js +1 -1
  114. package/dist/sdk/segment/push-recovery.js +1 -1
  115. package/dist/sdk/segment/push-workflow.js +1 -1
  116. package/dist/sdk/segment/resolution-context.js +1 -1
  117. package/dist/sdk/segment/segment-path-parser.js +1 -1
  118. package/dist/sdk/segment/segment-ref-parser.js +1 -1
  119. package/dist/sdk/segment/target-resolution.js +1 -1
  120. package/dist/sdk/segment/tdx-config.js +1 -1
  121. package/dist/sdk/segment/validate-files.js +1 -1
  122. package/dist/sdk/segment/yaml-validator.d.ts.map +1 -1
  123. package/dist/sdk/segment/yaml-validator.js +1 -1
  124. package/dist/sdk/segment/yaml-validator.js.map +1 -1
  125. package/dist/sdk/segment.js +1 -1
  126. package/dist/sdk/types/index.js +1 -1
  127. package/dist/sdk/types/progress.js +1 -1
  128. package/dist/sdk/user.js +1 -1
  129. package/dist/sdk/util/format-detector.js +1 -1
  130. package/dist/sdk/util/formatters.js +1 -1
  131. package/dist/sdk/util/index.js +1 -1
  132. package/dist/sdk/util/tree-formatter.js +1 -1
  133. package/dist/sdk/workflow/archive-validation.js +1 -1
  134. package/dist/sdk/workflow/clone-workflow.js +1 -1
  135. package/dist/sdk/workflow/index.js +1 -1
  136. package/dist/sdk/workflow/pull-workflow.js +1 -1
  137. package/dist/sdk/workflow/push-workflow.js +1 -1
  138. package/dist/sdk/workflow/tdx-config.js +1 -1
  139. package/dist/sdk/workflow/workflow-utils.js +1 -1
  140. package/dist/test-utils/command-runner.js +1 -1
  141. package/dist/test-utils/factories.js +1 -1
  142. package/dist/test-utils/fixtures.js +1 -1
  143. package/dist/test-utils/http-mock.js +1 -1
  144. package/dist/test-utils/index.js +1 -1
  145. package/dist/utils/async.js +1 -1
  146. package/dist/utils/colors.js +1 -1
  147. package/dist/utils/diff.js +1 -1
  148. package/dist/utils/file-permissions.js +1 -1
  149. package/dist/utils/global-cache.js +1 -1
  150. package/dist/utils/json-loader.js +1 -1
  151. package/dist/utils/local-cache.js +1 -1
  152. package/dist/utils/logger/formatters/default-formatter.js +1 -1
  153. package/dist/utils/logger/formatters/index.js +1 -1
  154. package/dist/utils/logger/handlers/console-handler.js +1 -1
  155. package/dist/utils/logger/handlers/file-handler.js +1 -1
  156. package/dist/utils/logger/handlers/index.js +1 -1
  157. package/dist/utils/logger/handlers/null-handler.js +1 -1
  158. package/dist/utils/logger/index.js +1 -1
  159. package/dist/utils/logger/logger.js +1 -1
  160. package/dist/utils/logger/types.js +1 -1
  161. package/dist/utils/option-validation.js +1 -1
  162. package/dist/utils/port.js +1 -1
  163. package/dist/utils/process.js +1 -1
  164. package/dist/utils/prompt.js +1 -1
  165. package/dist/utils/spinner.js +1 -1
  166. package/dist/utils/sse-parser.js +1 -1
  167. package/dist/utils/string-utils.js +1 -1
  168. package/dist/utils/table-ref-parser.js +1 -1
  169. package/dist/utils/tdx-logger.js +1 -1
  170. package/dist/utils/version-check.js +1 -1
  171. package/package.json +1 -1
@@ -1 +1 @@
1
- const a32_0x4d6044=a32_0x528b;function a32_0x185e(){const _0x3bfe67=['Resolved\x20type:\x20','data','26883360Hrjjgy','Resolved\x20folder\x20ID:\x20','kind','type','45367XazjZE','Parent\x20ID:\x20','length','error','⚠\x20Deprecation\x20warning:\x20`segment\x20update`\x20is\x20deprecated.','✔\x20Updated\x20segment\x20\x27','Updating\x20segment\x20\x27','4041340gLqKPl','12mpAJJa','176430ZStlwF','segment','Usage:\x20tdx\x20segment\x20update\x20<path>\x20[options]','33GwpetL','\x20\x20Use\x20`tdx\x20sg\x20push`\x20with\x20YAML\x20files\x20instead.\x0a','updateSegmentById','38LWVIJj','Use:\x20tdx\x20segment\x20update\x20<path_to_segment>\x20[options]','.\x20Only\x20child\x20segments\x20can\x20be\x20updated.','148064NBNvYK','6zBxkwB','36cTjPks','\x20\x20tdx\x20segment\x20update\x20\x22My\x20Audience/High\x20Value\x22\x20--description\x20\x22...\x22','name','segment:update','resolveFolderId','\x20\x20\x20Path:\x20','segmentId','segmentPath','\x27...','Resolved\x20relative\x20path\x20to:\x20','Error:\x20Segment\x20path\x20or\x20name\x20is\x20required','\x20\x20tdx\x20segment\x20update\x20\x22High\x20Value\x22\x20--rule\x20\x27...\x27\x20\x20#\x20Relative\x20to\x20context','1933976VpvlJD','parentId','folder','1855693ZNbpdu','rule','execute','ruleFile','INTERNAL','verbose','description','Resolving\x20path\x20\x27','Resolving\x20folder\x20\x27'];a32_0x185e=function(){return _0x3bfe67;};return a32_0x185e();}(function(_0x329a01,_0x450c8c){const _0x4e4b69=a32_0x528b,_0x4deb40=_0x329a01();while(!![]){try{const _0x3a8e39=parseInt(_0x4e4b69(0xf6))/0x1*(parseInt(_0x4e4b69(0xd3))/0x2)+-parseInt(_0x4e4b69(0xcc))/0x3*(-parseInt(_0x4e4b69(0xd6))/0x4)+-parseInt(_0x4e4b69(0xcd))/0x5+parseInt(_0x4e4b69(0xd7))/0x6*(-parseInt(_0x4e4b69(0xe7))/0x7)+-parseInt(_0x4e4b69(0xe4))/0x8*(-parseInt(_0x4e4b69(0xd8))/0x9)+parseInt(_0x4e4b69(0xcb))/0xa*(parseInt(_0x4e4b69(0xd0))/0xb)+-parseInt(_0x4e4b69(0xf2))/0xc;if(_0x3a8e39===_0x450c8c)break;else _0x4deb40['push'](_0x4deb40['shift']());}catch(_0x56a389){_0x4deb40['push'](_0x4deb40['shift']());}}}(a32_0x185e,0x9e63a));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 a32_0x528b(_0x27d6ab,_0x221d41){_0x27d6ab=_0x27d6ab-0xca;const _0x185ec7=a32_0x185e();let _0x528b56=_0x185ec7[_0x27d6ab];return _0x528b56;}import a32_0x2d7f9e from'chalk';export class SegmentUpdateCommand extends BaseCommand{[a32_0x4d6044(0xda)]=a32_0x4d6044(0xdb);[a32_0x4d6044(0xed)]='Update\x20existing\x20child\x20segment';async[a32_0x4d6044(0xe9)](_0xd8072d){const _0x4b7f5a=a32_0x4d6044;console['error'](a32_0x2d7f9e['yellow'](_0x4b7f5a(0xfa))),console[_0x4b7f5a(0xf9)](a32_0x2d7f9e['yellow'](_0x4b7f5a(0xd1)));const {options:_0x4b65e7,args:_0x43d3f1,tdx:_0x320fd8}=_0xd8072d,_0x6d9ffc=_0x4b65e7;if(_0x43d3f1[_0x4b7f5a(0xf8)]===0x0)return console[_0x4b7f5a(0xf9)](_0x4b7f5a(0xe2)),console[_0x4b7f5a(0xf9)](_0x4b7f5a(0xcf)),console[_0x4b7f5a(0xf9)]('Examples:'),console[_0x4b7f5a(0xf9)](_0x4b7f5a(0xd9)),console['error'](_0x4b7f5a(0xe3)),0x1;const _0x483d12=_0x43d3f1[0x0],_0xb8bd3f=_0x4b65e7[_0x4b7f5a(0xdf)];let _0x145ab4=_0x483d12;_0xb8bd3f&&!_0x483d12['includes']('/')&&(_0x145ab4=_0xb8bd3f+'/'+_0x483d12,_0x6d9ffc[_0x4b7f5a(0xec)]&&console[_0x4b7f5a(0xf9)](_0x4b7f5a(0xe1)+_0x145ab4));const _0x39eb16=await withSpinner(_0x4b7f5a(0xee)+_0x145ab4+_0x4b7f5a(0xe0),()=>_0x320fd8[_0x4b7f5a(0xce)]['resolvePathToResource'](_0x145ab4),{'verbose':_0x6d9ffc[_0x4b7f5a(0xec)]}),_0x3f73c5=_0x39eb16['data'];_0x6d9ffc[_0x4b7f5a(0xec)]&&console['error'](_0x4b7f5a(0xf0)+_0x3f73c5['type']);if(_0x3f73c5[_0x4b7f5a(0xf5)]!==_0x4b7f5a(0xce))return console['error']('Error:\x20Cannot\x20update\x20'+_0x3f73c5[_0x4b7f5a(0xf5)]+_0x4b7f5a(0xd5)),console['error'](_0x4b7f5a(0xd4)),0x1;if(!_0x3f73c5[_0x4b7f5a(0xde)])throw new SDKError(ErrorCode[_0x4b7f5a(0xeb)],'Segment\x20ID\x20missing\x20from\x20resolved\x20path');const _0x2f6c9a=_0x3f73c5[_0x4b7f5a(0xe5)],_0x3581a0=_0x3f73c5['segmentId'];_0x6d9ffc[_0x4b7f5a(0xec)]&&(console['error'](_0x4b7f5a(0xf7)+_0x2f6c9a),console[_0x4b7f5a(0xf9)]('Segment\x20ID:\x20'+_0x3581a0));let _0x65a496;if(_0x6d9ffc[_0x4b7f5a(0xe6)]){const _0x48e160=_0x6d9ffc[_0x4b7f5a(0xe6)],_0x5235a2=await withSpinner(_0x4b7f5a(0xef)+_0x48e160+_0x4b7f5a(0xe0),()=>_0x320fd8['segment'][_0x4b7f5a(0xdc)](_0x2f6c9a,_0x48e160),{'verbose':_0x6d9ffc['verbose']});_0x65a496=parseInt(_0x5235a2[_0x4b7f5a(0xf1)],0xa),_0x6d9ffc[_0x4b7f5a(0xec)]&&console[_0x4b7f5a(0xf9)](_0x4b7f5a(0xf3)+_0x65a496);}const _0x228d4a=await loadJSONFromOptions(_0x6d9ffc[_0x4b7f5a(0xe8)],_0x6d9ffc[_0x4b7f5a(0xea)]),_0x3e8fd3={'name':_0x6d9ffc['name'],'description':_0x6d9ffc[_0x4b7f5a(0xed)],'rule':_0x228d4a,'kind':_0x6d9ffc['kind']!==undefined?parseInt(_0x6d9ffc[_0x4b7f5a(0xf4)],0xa):undefined,'segmentFolderId':_0x65a496},_0x5ef1d4=await withSpinner(_0x4b7f5a(0xca)+_0x3f73c5['segmentName']+_0x4b7f5a(0xe0),()=>_0x320fd8[_0x4b7f5a(0xce)][_0x4b7f5a(0xd2)](_0x2f6c9a,_0x3581a0,_0x3e8fd3),{'verbose':_0x6d9ffc[_0x4b7f5a(0xec)]}),_0x7af6d4=_0x5ef1d4[_0x4b7f5a(0xf1)];return console['error'](_0x4b7f5a(0xfb)+_0x7af6d4['name']+'\x27'),_0x145ab4!==_0x483d12&&console[_0x4b7f5a(0xf9)](_0x4b7f5a(0xdd)+_0x145ab4),await handleSDKOutput([_0x7af6d4],_0x6d9ffc),0x0;}}
1
+ const a32_0x2505de=a32_0x64d9;(function(_0x5652aa,_0x199363){const _0x186ca2=a32_0x64d9,_0x7556a1=_0x5652aa();while(!![]){try{const _0x37c540=parseInt(_0x186ca2(0x7d))/0x1*(parseInt(_0x186ca2(0x8a))/0x2)+-parseInt(_0x186ca2(0x91))/0x3+-parseInt(_0x186ca2(0x9b))/0x4*(-parseInt(_0x186ca2(0x7b))/0x5)+parseInt(_0x186ca2(0x8d))/0x6*(parseInt(_0x186ca2(0x8c))/0x7)+-parseInt(_0x186ca2(0x78))/0x8+-parseInt(_0x186ca2(0x90))/0x9+-parseInt(_0x186ca2(0x9f))/0xa;if(_0x37c540===_0x199363)break;else _0x7556a1['push'](_0x7556a1['shift']());}catch(_0x232169){_0x7556a1['push'](_0x7556a1['shift']());}}}(a32_0x1b2e,0x3e850));function a32_0x64d9(_0x1db09e,_0x2600d9){_0x1db09e=_0x1db09e-0x76;const _0x1b2ec3=a32_0x1b2e();let _0x64d921=_0x1b2ec3[_0x1db09e];return _0x64d921;}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';import a32_0x2f058e from'chalk';export class SegmentUpdateCommand extends BaseCommand{[a32_0x2505de(0x94)]=a32_0x2505de(0x81);[a32_0x2505de(0x9d)]=a32_0x2505de(0x7f);async['execute'](_0xfc234f){const _0x104ad9=a32_0x2505de;console['error'](a32_0x2f058e[_0x104ad9(0x98)]('⚠\x20Deprecation\x20warning:\x20`segment\x20update`\x20is\x20deprecated.')),console[_0x104ad9(0x85)](a32_0x2f058e[_0x104ad9(0x98)](_0x104ad9(0x7e)));const {options:_0x10143c,args:_0x43fc18,tdx:_0x2523c6}=_0xfc234f,_0x142f96=_0x10143c;if(_0x43fc18['length']===0x0)return console['error'](_0x104ad9(0x88)),console[_0x104ad9(0x85)]('Usage:\x20tdx\x20segment\x20update\x20<path>\x20[options]'),console[_0x104ad9(0x85)](_0x104ad9(0x77)),console['error']('\x20\x20tdx\x20segment\x20update\x20\x22My\x20Audience/High\x20Value\x22\x20--description\x20\x22...\x22'),console['error'](_0x104ad9(0x82)),0x1;const _0x45cb13=_0x43fc18[0x0],_0x3d882c=_0x10143c[_0x104ad9(0x8f)];let _0x2d630b=_0x45cb13;_0x3d882c&&!_0x45cb13[_0x104ad9(0x8e)]('/')&&(_0x2d630b=_0x3d882c+'/'+_0x45cb13,_0x142f96['verbose']&&console[_0x104ad9(0x85)](_0x104ad9(0x89)+_0x2d630b));const _0x584d51=await withSpinner('Resolving\x20path\x20\x27'+_0x2d630b+_0x104ad9(0xa1),()=>_0x2523c6[_0x104ad9(0x93)][_0x104ad9(0x8b)](_0x2d630b),{'verbose':_0x142f96[_0x104ad9(0x7c)]}),_0x3c6817=_0x584d51['data'];_0x142f96[_0x104ad9(0x7c)]&&console[_0x104ad9(0x85)]('Resolved\x20type:\x20'+_0x3c6817['type']);if(_0x3c6817['type']!==_0x104ad9(0x93))return console[_0x104ad9(0x85)](_0x104ad9(0x96)+_0x3c6817['type']+_0x104ad9(0x84)),console[_0x104ad9(0x85)](_0x104ad9(0x99)),0x1;if(!_0x3c6817[_0x104ad9(0x97)])throw new SDKError(ErrorCode[_0x104ad9(0x79)],_0x104ad9(0x87));const _0x4e3573=_0x3c6817[_0x104ad9(0xa0)],_0xb4927=_0x3c6817[_0x104ad9(0x97)];_0x142f96[_0x104ad9(0x7c)]&&(console[_0x104ad9(0x85)](_0x104ad9(0x9c)+_0x4e3573),console[_0x104ad9(0x85)]('Segment\x20ID:\x20'+_0xb4927));let _0x3d0de0;if(_0x142f96[_0x104ad9(0x86)]){const _0x124d3c=_0x142f96[_0x104ad9(0x86)],_0x9f4797=await withSpinner(_0x104ad9(0x7a)+_0x124d3c+_0x104ad9(0xa1),()=>_0x2523c6['segment'][_0x104ad9(0x83)](_0x4e3573,_0x124d3c),{'verbose':_0x142f96[_0x104ad9(0x7c)]});_0x3d0de0=parseInt(_0x9f4797[_0x104ad9(0x95)],0xa),_0x142f96[_0x104ad9(0x7c)]&&console[_0x104ad9(0x85)]('Resolved\x20folder\x20ID:\x20'+_0x3d0de0);}const _0x30f639=await loadJSONFromOptions(_0x142f96[_0x104ad9(0x92)],_0x142f96[_0x104ad9(0x9a)]),_0x2ca240={'name':_0x142f96[_0x104ad9(0x94)],'description':_0x142f96['description'],'rule':_0x30f639,'kind':_0x142f96['kind']!==undefined?parseInt(_0x142f96[_0x104ad9(0x9e)],0xa):undefined,'segmentFolderId':_0x3d0de0},_0x570db4=await withSpinner(_0x104ad9(0x80)+_0x3c6817['segmentName']+_0x104ad9(0xa1),()=>_0x2523c6['segment']['updateSegmentById'](_0x4e3573,_0xb4927,_0x2ca240),{'verbose':_0x142f96['verbose']}),_0x435582=_0x570db4[_0x104ad9(0x95)];return console[_0x104ad9(0x85)]('✔\x20Updated\x20segment\x20\x27'+_0x435582[_0x104ad9(0x94)]+'\x27'),_0x2d630b!==_0x45cb13&&console['error'](_0x104ad9(0x76)+_0x2d630b),await handleSDKOutput([_0x435582],_0x142f96),0x0;}}function a32_0x1b2e(){const _0x1492df=['rule','segment','name','data','Error:\x20Cannot\x20update\x20','segmentId','yellow','Use:\x20tdx\x20segment\x20update\x20<path_to_segment>\x20[options]','ruleFile','308lePETd','Parent\x20ID:\x20','description','kind','3840110MUBghb','parentId','\x27...','\x20\x20\x20Path:\x20','Examples:','1304136rpnVPu','INTERNAL','Resolving\x20folder\x20\x27','19745RBMvlC','verbose','35973ByPbBc','\x20\x20Use\x20`tdx\x20sg\x20push`\x20with\x20YAML\x20files\x20instead.\x0a','Update\x20existing\x20child\x20segment','Updating\x20segment\x20\x27','segment:update','\x20\x20tdx\x20segment\x20update\x20\x22High\x20Value\x22\x20--rule\x20\x27...\x27\x20\x20#\x20Relative\x20to\x20context','resolveFolderId','.\x20Only\x20child\x20segments\x20can\x20be\x20updated.','error','folder','Segment\x20ID\x20missing\x20from\x20resolved\x20path','Error:\x20Segment\x20path\x20or\x20name\x20is\x20required','Resolved\x20relative\x20path\x20to:\x20','26REcqVF','resolvePathToResource','326284hVavRq','42POdlVz','includes','segmentPath','1773747fllKnO','293445bevufB'];a32_0x1b2e=function(){return _0x1492df;};return a32_0x1b2e();}
@@ -1 +1 @@
1
- const a33_0x3dc00c=a33_0x5bfa;(function(_0x326b55,_0x5c6b62){const _0x211102=a33_0x5bfa,_0xe43e5=_0x326b55();while(!![]){try{const _0x2d8c5e=parseInt(_0x211102(0x178))/0x1+parseInt(_0x211102(0x187))/0x2*(parseInt(_0x211102(0x181))/0x3)+parseInt(_0x211102(0x171))/0x4+-parseInt(_0x211102(0x1a5))/0x5+-parseInt(_0x211102(0x193))/0x6*(-parseInt(_0x211102(0x175))/0x7)+-parseInt(_0x211102(0x192))/0x8+parseInt(_0x211102(0x179))/0x9*(-parseInt(_0x211102(0x188))/0xa);if(_0x2d8c5e===_0x5c6b62)break;else _0xe43e5['push'](_0xe43e5['shift']());}catch(_0x77519e){_0xe43e5['push'](_0xe43e5['shift']());}}}(a33_0x41de,0x9a225));import{existsSync,statSync}from'fs';import a33_0x3c27e9 from'chalk';import{BaseCommand}from'./command.js';function a33_0x5bfa(_0x236885,_0x1f1e24){_0x236885=_0x236885-0x171;const _0x41de4b=a33_0x41de();let _0x5bfa2e=_0x41de4b[_0x236885];return _0x5bfa2e;}import{saveSessionContext}from'../core/session.js';function a33_0x41de(){const _0x416c61=['Use\x20\x22tdx\x20segments\x22\x20to\x20list\x20contents\x20in\x20this\x20context','Target\x20path:\x20','Usage:\x20tdx\x20segment\x20use\x20<path>','execute','log','site','4063935lacsyw','Context\x20can\x20only\x20be\x20set\x20to\x20a\x20parent\x20segment\x20or\x20folder.','name','length','segment:use','fullPath','Examples:','join','4155088bLXetk','Set\x20current\x20segment/folder\x20context\x20for\x20navigation','segments','Use\x20an\x20absolute\x20path\x20or\x20set\x20context\x20with:\x20tdx\x20segment\x20use\x20<parent_name>','497KSdKPD','Resolved\x20path\x20type:\x20','cyan','593269eyflSf','15255LKReNP','Tip:\x20Run\x20`tdx\x20sg\x20pull\x20<parent_name>`\x20first\x20to\x20create\x20the\x20folder\x20structure','\x20\x20tdx\x20segment\x20use\x20..\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Go\x20to\x20parent','type','session','Site:\x20','✔\x20Context\x20cleared.\x20Back\x20to\x20root.','split','12cLJfOf','description','Error:\x20No\x20tdx.json\x20found\x20in\x20or\x20above:\x20','Use:\x20tdx\x20segment\x20use\x20','\x20\x20tdx\x20segment\x20use\x20/\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Clear\x20context','✔\x20Context\x20set\x20to:\x20','202154ronWXj','340kHrSMH','parentName','isDirectory','parent_segment','\x27...','\x20\x20tdx\x20segment\x20use\x20\x22My\x20Audience\x22','Folder\x20ID:\x20','error','Error:\x20Path\x20is\x20required\x0a','green','4531824JoMTPF','2694HhJjHV','resolvePathToResource','verbose','dim','Error:\x20No\x20context\x20set.\x20Cannot\x20use\x20relative\x20path.','Resolved\x20relative\x20path\x20to:\x20','folderPath','segment','folderId','data','Use\x20\x22tdx\x20use\x22\x20to\x20see\x20all\x20context\x20parameters','red'];a33_0x41de=function(){return _0x416c61;};return a33_0x41de();}import{withSpinner}from'../utils/spinner.js';import{parsePath,normalizePath}from'../sdk/segment/segment-path-parser.js';import{findTdxConfig}from'../sdk/segment/tdx-config.js';export class SegmentUseCommand extends BaseCommand{[a33_0x3dc00c(0x1a7)]=a33_0x3dc00c(0x1a9);[a33_0x3dc00c(0x182)]=a33_0x3dc00c(0x172);async[a33_0x3dc00c(0x1a2)](_0x12415d){const _0x2a1658=a33_0x3dc00c,{options:_0x3cc5d6,args:_0x2b373e,tdx:_0x1b685c}=_0x12415d;if(_0x2b373e[_0x2a1658(0x1a8)]===0x0)return console[_0x2a1658(0x18f)](a33_0x3c27e9[_0x2a1658(0x19e)](_0x2a1658(0x190))),console['error'](_0x2a1658(0x1a1)),console[_0x2a1658(0x18f)](_0x2a1658(0x1ab)),console[_0x2a1658(0x18f)](_0x2a1658(0x18d)),console['error']('\x20\x20tdx\x20segment\x20use\x20\x22My\x20Audience/Marketing\x22'),console['error'](_0x2a1658(0x185)),console[_0x2a1658(0x18f)](_0x2a1658(0x17b)),0x1;const _0x4c3eec=_0x2b373e[0x0],_0x25f490=_0x3cc5d6[_0x2a1658(0x17d)];try{if(_0x4c3eec==='/')return saveSessionContext({'segment_path':undefined},_0x25f490),console[_0x2a1658(0x1a3)](a33_0x3c27e9['green'](_0x2a1658(0x17f))),0x0;if(existsSync(_0x4c3eec)&&statSync(_0x4c3eec)[_0x2a1658(0x18a)]()){let _0x5140c5;try{_0x5140c5=findTdxConfig(_0x4c3eec);}catch{return console[_0x2a1658(0x18f)](a33_0x3c27e9[_0x2a1658(0x19e)](_0x2a1658(0x183)+_0x4c3eec)),console[_0x2a1658(0x18f)](a33_0x3c27e9[_0x2a1658(0x177)](_0x2a1658(0x17a))),0x1;}const _0x10c4c9=_0x5140c5['config'][_0x2a1658(0x18b)];return saveSessionContext({'segment_path':_0x10c4c9,'parent_segment':_0x10c4c9},_0x25f490),console[_0x2a1658(0x1a3)](a33_0x3c27e9['green']('✔\x20Context\x20set\x20to:\x20'+a33_0x3c27e9[_0x2a1658(0x177)](_0x10c4c9))),0x0;}const _0xd75fd=_0x3cc5d6['segmentPath'];let _0x54abe7=_0x4c3eec;const _0x431523=parsePath(_0x4c3eec);if(!_0x431523['isAbsolute']){if(!_0xd75fd)return console[_0x2a1658(0x18f)](a33_0x3c27e9[_0x2a1658(0x19e)](_0x2a1658(0x197))),console[_0x2a1658(0x18f)](a33_0x3c27e9['cyan'](_0x2a1658(0x174))),0x1;if(_0x4c3eec==='..'){const _0x2766d4=_0xd75fd[_0x2a1658(0x180)]('/')['slice'](0x0,-0x1)[_0x2a1658(0x1ac)]('/');_0x54abe7=_0x2766d4||'/';}else _0x4c3eec==='.'?_0x54abe7=_0xd75fd:_0x54abe7=_0xd75fd+'/'+_0x4c3eec;_0x3cc5d6[_0x2a1658(0x195)]&&console[_0x2a1658(0x18f)](_0x2a1658(0x198)+_0x54abe7);}if(_0x54abe7==='/'||_0x54abe7==='')return saveSessionContext({'segment_path':undefined},_0x25f490),console['log'](a33_0x3c27e9['green'](_0x2a1658(0x17f))),0x0;_0x54abe7=normalizePath(_0x54abe7);const _0x10d6f5=parsePath(_0x54abe7)[_0x2a1658(0x173)];if(_0x10d6f5[_0x2a1658(0x1a8)]===0x0)return saveSessionContext({'segment_path':undefined},_0x25f490),console[_0x2a1658(0x1a3)](a33_0x3c27e9['green'](_0x2a1658(0x17f))),0x0;_0x3cc5d6[_0x2a1658(0x195)]&&(console['error'](_0x2a1658(0x17e)+_0x3cc5d6[_0x2a1658(0x1a4)]),console[_0x2a1658(0x18f)](_0x2a1658(0x1a0)+_0x54abe7));const _0x4f0e5a=await withSpinner('Resolving\x20path\x20\x27'+_0x54abe7+_0x2a1658(0x18c),()=>_0x1b685c[_0x2a1658(0x19a)][_0x2a1658(0x194)](_0x54abe7),{'verbose':_0x3cc5d6['verbose']}),_0xfeb8d4=_0x4f0e5a[_0x2a1658(0x19c)];_0x3cc5d6[_0x2a1658(0x195)]&&(console['error'](_0x2a1658(0x176)+_0xfeb8d4[_0x2a1658(0x17c)]),console[_0x2a1658(0x18f)]('Parent\x20ID:\x20'+_0xfeb8d4['parentId']),_0xfeb8d4['folderId']&&console[_0x2a1658(0x18f)](_0x2a1658(0x18e)+_0xfeb8d4[_0x2a1658(0x19b)]));if(_0xfeb8d4['type']==='segment')return console[_0x2a1658(0x18f)](a33_0x3c27e9[_0x2a1658(0x19e)]('Error:\x20Cannot\x20set\x20context\x20to\x20a\x20segment.')),console[_0x2a1658(0x18f)](_0x2a1658(0x1a6)),console[_0x2a1658(0x18f)](a33_0x3c27e9['cyan'](_0x2a1658(0x184)+_0xfeb8d4['parentName']+(_0xfeb8d4['folderPath']?'/'+_0xfeb8d4[_0x2a1658(0x199)][_0x2a1658(0x1ac)]('/'):''))),0x1;return saveSessionContext({'segment_path':_0xfeb8d4[_0x2a1658(0x1aa)],'parent_segment':_0xfeb8d4[_0x2a1658(0x189)]},_0x25f490),console[_0x2a1658(0x1a3)](a33_0x3c27e9[_0x2a1658(0x191)](_0x2a1658(0x186)+a33_0x3c27e9[_0x2a1658(0x177)](_0xfeb8d4[_0x2a1658(0x1aa)]))),_0x3cc5d6['verbose']&&(console[_0x2a1658(0x18f)](a33_0x3c27e9[_0x2a1658(0x196)](_0x2a1658(0x19f))),console[_0x2a1658(0x18f)](a33_0x3c27e9[_0x2a1658(0x196)](_0x2a1658(0x19d)))),0x0;}catch(_0x39d2de){throw _0x39d2de;}}}
1
+ const a33_0x2087ef=a33_0x1a26;function a33_0x1a26(_0x489adf,_0x3df834){_0x489adf=_0x489adf-0x185;const _0xbb9ca5=a33_0xbb9c();let _0x1a266d=_0xbb9ca5[_0x489adf];return _0x1a266d;}(function(_0x1a4c5f,_0x1535ad){const _0x41af4c=a33_0x1a26,_0x2c2102=_0x1a4c5f();while(!![]){try{const _0x48715e=parseInt(_0x41af4c(0x1a4))/0x1*(-parseInt(_0x41af4c(0x1b3))/0x2)+-parseInt(_0x41af4c(0x1a2))/0x3*(parseInt(_0x41af4c(0x1b9))/0x4)+-parseInt(_0x41af4c(0x1b6))/0x5+parseInt(_0x41af4c(0x1b2))/0x6+-parseInt(_0x41af4c(0x190))/0x7*(parseInt(_0x41af4c(0x18a))/0x8)+parseInt(_0x41af4c(0x1a6))/0x9*(parseInt(_0x41af4c(0x194))/0xa)+parseInt(_0x41af4c(0x1ba))/0xb;if(_0x48715e===_0x1535ad)break;else _0x2c2102['push'](_0x2c2102['shift']());}catch(_0x2135c3){_0x2c2102['push'](_0x2c2102['shift']());}}}(a33_0xbb9c,0xcb640));import{existsSync,statSync}from'fs';function a33_0xbb9c(){const _0x4662a1=['5GEzfjw','resolvePathToResource','9vuJRDf','Error:\x20No\x20context\x20set.\x20Cannot\x20use\x20relative\x20path.','config','name','error','session','Use:\x20tdx\x20segment\x20use\x20','data','fullPath','\x27...','Use\x20an\x20absolute\x20path\x20or\x20set\x20context\x20with:\x20tdx\x20segment\x20use\x20<parent_name>','parent_segment','4126746WfjGpH','125194SKHcdE','slice','log','6248230GPeEFu','segments','join','339532TwupmQ','26854322vFECkd','Error:\x20Cannot\x20set\x20context\x20to\x20a\x20segment.','parentId','✔\x20Context\x20set\x20to:\x20','red','segment','Resolving\x20path\x20\x27','\x20\x20tdx\x20segment\x20use\x20/\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Clear\x20context','Set\x20current\x20segment/folder\x20context\x20for\x20navigation','Context\x20can\x20only\x20be\x20set\x20to\x20a\x20parent\x20segment\x20or\x20folder.','Resolved\x20relative\x20path\x20to:\x20','segmentPath','isAbsolute','78464njITXm','Error:\x20Path\x20is\x20required\x0a','Parent\x20ID:\x20','green','verbose','parentName','938DzrWHK','cyan','isDirectory','\x20\x20tdx\x20segment\x20use\x20\x22My\x20Audience/Marketing\x22','11750790IQDLye','✔\x20Context\x20cleared.\x20Back\x20to\x20root.','\x20\x20tdx\x20segment\x20use\x20..\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Go\x20to\x20parent','folderPath','execute','site','Error:\x20No\x20tdx.json\x20found\x20in\x20or\x20above:\x20','dim','Use\x20\x22tdx\x20use\x22\x20to\x20see\x20all\x20context\x20parameters','description','folderId','Use\x20\x22tdx\x20segments\x22\x20to\x20list\x20contents\x20in\x20this\x20context','type','Folder\x20ID:\x20','21kvJarP','length'];a33_0xbb9c=function(){return _0x4662a1;};return a33_0xbb9c();}import a33_0x3233ca from'chalk';import{BaseCommand}from'./command.js';import{saveSessionContext}from'../core/session.js';import{withSpinner}from'../utils/spinner.js';import{parsePath,normalizePath}from'../sdk/segment/segment-path-parser.js';import{findTdxConfig}from'../sdk/segment/tdx-config.js';export class SegmentUseCommand extends BaseCommand{[a33_0x2087ef(0x1a9)]='segment:use';[a33_0x2087ef(0x19d)]=a33_0x2087ef(0x185);async[a33_0x2087ef(0x198)](_0x596489){const _0x839440=a33_0x2087ef,{options:_0x1b3edc,args:_0x246e93,tdx:_0x1cb5ad}=_0x596489;if(_0x246e93[_0x839440(0x1a3)]===0x0)return console['error'](a33_0x3233ca['red'](_0x839440(0x18b))),console[_0x839440(0x1aa)]('Usage:\x20tdx\x20segment\x20use\x20<path>'),console[_0x839440(0x1aa)]('Examples:'),console['error']('\x20\x20tdx\x20segment\x20use\x20\x22My\x20Audience\x22'),console[_0x839440(0x1aa)](_0x839440(0x193)),console[_0x839440(0x1aa)](_0x839440(0x1c1)),console[_0x839440(0x1aa)](_0x839440(0x196)),0x1;const _0x56bf7f=_0x246e93[0x0],_0xd1460a=_0x1b3edc[_0x839440(0x1ab)];try{if(_0x56bf7f==='/')return saveSessionContext({'segment_path':undefined},_0xd1460a),console[_0x839440(0x1b5)](a33_0x3233ca[_0x839440(0x18d)](_0x839440(0x195))),0x0;if(existsSync(_0x56bf7f)&&statSync(_0x56bf7f)[_0x839440(0x192)]()){let _0x11ddca;try{_0x11ddca=findTdxConfig(_0x56bf7f);}catch{return console[_0x839440(0x1aa)](a33_0x3233ca[_0x839440(0x1be)](_0x839440(0x19a)+_0x56bf7f)),console[_0x839440(0x1aa)](a33_0x3233ca[_0x839440(0x191)]('Tip:\x20Run\x20`tdx\x20sg\x20pull\x20<parent_name>`\x20first\x20to\x20create\x20the\x20folder\x20structure')),0x1;}const _0x2e8b3e=_0x11ddca[_0x839440(0x1a8)][_0x839440(0x1b1)];return saveSessionContext({'segment_path':_0x2e8b3e,'parent_segment':_0x2e8b3e},_0xd1460a),console[_0x839440(0x1b5)](a33_0x3233ca[_0x839440(0x18d)](_0x839440(0x1bd)+a33_0x3233ca['cyan'](_0x2e8b3e))),0x0;}const _0xeb31f3=_0x1b3edc[_0x839440(0x188)];let _0x576ccf=_0x56bf7f;const _0x2535e6=parsePath(_0x56bf7f);if(!_0x2535e6[_0x839440(0x189)]){if(!_0xeb31f3)return console[_0x839440(0x1aa)](a33_0x3233ca[_0x839440(0x1be)](_0x839440(0x1a7))),console[_0x839440(0x1aa)](a33_0x3233ca[_0x839440(0x191)](_0x839440(0x1b0))),0x1;if(_0x56bf7f==='..'){const _0x3fe448=_0xeb31f3['split']('/')[_0x839440(0x1b4)](0x0,-0x1)[_0x839440(0x1b8)]('/');_0x576ccf=_0x3fe448||'/';}else _0x56bf7f==='.'?_0x576ccf=_0xeb31f3:_0x576ccf=_0xeb31f3+'/'+_0x56bf7f;_0x1b3edc[_0x839440(0x18e)]&&console['error'](_0x839440(0x187)+_0x576ccf);}if(_0x576ccf==='/'||_0x576ccf==='')return saveSessionContext({'segment_path':undefined},_0xd1460a),console['log'](a33_0x3233ca[_0x839440(0x18d)]('✔\x20Context\x20cleared.\x20Back\x20to\x20root.')),0x0;_0x576ccf=normalizePath(_0x576ccf);const _0x6b86fd=parsePath(_0x576ccf)[_0x839440(0x1b7)];if(_0x6b86fd[_0x839440(0x1a3)]===0x0)return saveSessionContext({'segment_path':undefined},_0xd1460a),console[_0x839440(0x1b5)](a33_0x3233ca['green'](_0x839440(0x195))),0x0;_0x1b3edc[_0x839440(0x18e)]&&(console[_0x839440(0x1aa)]('Site:\x20'+_0x1b3edc[_0x839440(0x199)]),console[_0x839440(0x1aa)]('Target\x20path:\x20'+_0x576ccf));const _0x2dfaaa=await withSpinner(_0x839440(0x1c0)+_0x576ccf+_0x839440(0x1af),()=>_0x1cb5ad['segment'][_0x839440(0x1a5)](_0x576ccf),{'verbose':_0x1b3edc[_0x839440(0x18e)]}),_0x122e04=_0x2dfaaa[_0x839440(0x1ad)];_0x1b3edc[_0x839440(0x18e)]&&(console[_0x839440(0x1aa)]('Resolved\x20path\x20type:\x20'+_0x122e04['type']),console['error'](_0x839440(0x18c)+_0x122e04[_0x839440(0x1bc)]),_0x122e04[_0x839440(0x19e)]&&console[_0x839440(0x1aa)](_0x839440(0x1a1)+_0x122e04[_0x839440(0x19e)]));if(_0x122e04[_0x839440(0x1a0)]===_0x839440(0x1bf))return console['error'](a33_0x3233ca['red'](_0x839440(0x1bb))),console[_0x839440(0x1aa)](_0x839440(0x186)),console[_0x839440(0x1aa)](a33_0x3233ca['cyan'](_0x839440(0x1ac)+_0x122e04[_0x839440(0x18f)]+(_0x122e04[_0x839440(0x197)]?'/'+_0x122e04['folderPath'][_0x839440(0x1b8)]('/'):''))),0x1;return saveSessionContext({'segment_path':_0x122e04[_0x839440(0x1ae)],'parent_segment':_0x122e04[_0x839440(0x18f)]},_0xd1460a),console[_0x839440(0x1b5)](a33_0x3233ca[_0x839440(0x18d)](_0x839440(0x1bd)+a33_0x3233ca[_0x839440(0x191)](_0x122e04[_0x839440(0x1ae)]))),_0x1b3edc[_0x839440(0x18e)]&&(console[_0x839440(0x1aa)](a33_0x3233ca[_0x839440(0x19b)](_0x839440(0x19f))),console[_0x839440(0x1aa)](a33_0x3233ca[_0x839440(0x19b)](_0x839440(0x19c)))),0x0;}catch(_0x216653){throw _0x216653;}}}
@@ -1 +1 @@
1
- const a34_0x3038eb=a34_0x310f;function a34_0x310f(_0x8c4375,_0x1d4b60){_0x8c4375=_0x8c4375-0x92;const _0x32cec5=a34_0x32ce();let _0x310f4a=_0x32cec5[_0x8c4375];return _0x310f4a;}(function(_0xb230a3,_0x551513){const _0x12c684=a34_0x310f,_0x478653=_0xb230a3();while(!![]){try{const _0x2c7974=-parseInt(_0x12c684(0xae))/0x1+-parseInt(_0x12c684(0xa2))/0x2+parseInt(_0x12c684(0xa1))/0x3*(-parseInt(_0x12c684(0xc3))/0x4)+parseInt(_0x12c684(0xc0))/0x5+parseInt(_0x12c684(0xa0))/0x6*(-parseInt(_0x12c684(0x99))/0x7)+-parseInt(_0x12c684(0x92))/0x8+-parseInt(_0x12c684(0x94))/0x9*(-parseInt(_0x12c684(0xab))/0xa);if(_0x2c7974===_0x551513)break;else _0x478653['push'](_0x478653['shift']());}catch(_0x1c98f){_0x478653['push'](_0x478653['shift']());}}}(a34_0x32ce,0xd8295));import{BaseCommand}from'./command.js';function a34_0x32ce(){const _0x38f830=['endsWith','5110530JXdsLv','red','validCount','1604ZuBpsO','13269584CiooVP','warnings','3078eNwHEk','warningCount','cyan','parent_segment\x20is\x20not\x20set.\x20Use\x20`tdx\x20sg\x20use\x20<parent_name>`\x20to\x20set\x20it.\x0a','errors','14arUdzB','hasErrors','\x20warning(s)\x20found','length','\x20file(s)\x20valid','no_parent','green','4385802QDcBIf','9777sCFMxV','3498078RjOKcF','log','description','dim','\x20warning(s)','helpText','errorCode','\x20\x20\x20\x20\x20\x20\x20tdx\x20sg\x20validate\x20<file_path>\x20\x20#\x20Validate\x20specific\x20file','Validation\x20failed:\x20','206760BplLFp','parentSegment','):\x20','1031371fXeJKp','valid','Validate\x20segment\x20and\x20journey\x20YAML\x20files','\x20error(s)','type','\x20file(s)\x20with\x20errors,\x20','yellow','execute','\x20valid','invalidCount','message','verbose','Error:\x20File\x20must\x20have\x20.yml\x20or\x20.yaml\x20extension:\x20','segment:validate','targetDir','cwd','error'];a34_0x32ce=function(){return _0x38f830;};return a34_0x32ce();}import{resolveTarget,isSuccessfulResolution}from'../sdk/segment/target-resolution.js';import{findYamlFiles}from'../sdk/segment/file-discovery.js';import{existsSync}from'fs';import a34_0xc6b619 from'chalk';import{formatValidationResult}from'../sdk/segment/yaml-validator.js';import{validateYamlFiles,isValidationResult,calculateSummary}from'../sdk/segment/validate-files.js';export class SegmentValidateCommand extends BaseCommand{['name']=a34_0x3038eb(0xbb);[a34_0x3038eb(0xa4)]=a34_0x3038eb(0xb0);async[a34_0x3038eb(0xb5)](_0x3bf3ea){const _0x1f0843=a34_0x3038eb,{options:_0x1a2555,args:_0x492216}=_0x3bf3ea,_0x35e4c5=_0x1a2555,_0x4f8dba=await resolveTarget({'arg':_0x492216[0x0],'contextParent':_0x1a2555[_0x1f0843(0xac)],'cwd':process[_0x1f0843(0xbd)]()});if(!isSuccessfulResolution(_0x4f8dba))return _0x4f8dba[_0x1f0843(0xa8)]===_0x1f0843(0x9e)?(console[_0x1f0843(0xbe)](a34_0xc6b619[_0x1f0843(0xb4)](_0x1f0843(0x97))),console['error']('Usage:\x20tdx\x20sg\x20validate\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Validate\x20all\x20(requires\x20context)'),console[_0x1f0843(0xbe)]('\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[_0x1f0843(0xbe)](_0x1f0843(0xa9))):(console[_0x1f0843(0xbe)](a34_0xc6b619[_0x1f0843(0xc1)]('Error:\x20'+_0x4f8dba[_0x1f0843(0xb8)]+'\x0a')),_0x4f8dba['helpText']&&console[_0x1f0843(0xbe)](a34_0xc6b619[_0x1f0843(0x96)](_0x4f8dba[_0x1f0843(0xa7)]))),0x1;const _0x1e69a5=_0x4f8dba[_0x1f0843(0xbc)],_0x4a4531=_0x4f8dba[_0x1f0843(0xb2)]==='file'?_0x4f8dba['filePath']:undefined;if(!_0x4a4531&&!existsSync(_0x1e69a5))return console[_0x1f0843(0xbe)](a34_0xc6b619['red']('Error:\x20Directory\x20not\x20found:\x20'+_0x1e69a5+'\x0a')),0x1;let _0x5bd466;if(_0x4a4531){if(!_0x4a4531[_0x1f0843(0xbf)]('.yml')&&!_0x4a4531[_0x1f0843(0xbf)]('.yaml'))return console[_0x1f0843(0xbe)](a34_0xc6b619['red'](_0x1f0843(0xba)+_0x4a4531+'\x0a')),0x1;_0x5bd466=[_0x4a4531];}else _0x5bd466=findYamlFiles(_0x1e69a5);if(_0x5bd466[_0x1f0843(0x9c)]===0x0)return console[_0x1f0843(0xbe)](a34_0xc6b619[_0x1f0843(0xc1)]('Error:\x20No\x20YAML\x20files\x20found\x20in\x20'+_0x1e69a5+'\x0a')),0x1;const _0x329f84=validateYamlFiles(_0x5bd466,_0x1e69a5),_0xb5f814=calculateSummary(_0x329f84);for(const _0x785496 of _0x329f84){if(!isValidationResult(_0x785496))continue;const {relativePath:_0x45df25,source:_0x2cecb3,result:_0x582996,fileType:_0x2a7a97}=_0x785496,_0x221a3b=_0x2a7a97;if(_0x582996[_0x1f0843(0xaf)]&&_0x582996[_0x1f0843(0x93)]['length']===0x0)_0x35e4c5[_0x1f0843(0xb9)]&&console['log'](a34_0xc6b619[_0x1f0843(0x9f)]('✔\x20'+_0x45df25)+a34_0xc6b619[_0x1f0843(0xa5)]('\x20('+_0x221a3b+')'));else _0x582996['valid']?(console['log'](a34_0xc6b619[_0x1f0843(0xb4)]('⚠\x20'+_0x45df25)+a34_0xc6b619[_0x1f0843(0xa5)]('\x20('+_0x221a3b+_0x1f0843(0xad)+_0x582996[_0x1f0843(0x93)][_0x1f0843(0x9c)]+_0x1f0843(0xa6))),console['log'](formatValidationResult(_0x582996,_0x2cecb3,_0x45df25))):(console['log'](a34_0xc6b619[_0x1f0843(0xc1)]('✖\x20'+_0x45df25)+a34_0xc6b619[_0x1f0843(0xa5)]('\x20('+_0x221a3b+_0x1f0843(0xad)+_0x582996[_0x1f0843(0x98)][_0x1f0843(0x9c)]+_0x1f0843(0xb1))),console[_0x1f0843(0xa3)](formatValidationResult(_0x582996,_0x2cecb3,_0x45df25)));}return console[_0x1f0843(0xa3)](''),_0xb5f814[_0x1f0843(0x9a)]?(console['log'](a34_0xc6b619[_0x1f0843(0xc1)](_0x1f0843(0xaa)+_0xb5f814[_0x1f0843(0xb7)]+_0x1f0843(0xb3)+_0xb5f814[_0x1f0843(0xc2)]+_0x1f0843(0xb6))),_0xb5f814[_0x1f0843(0x95)]>0x0&&console[_0x1f0843(0xa3)](a34_0xc6b619[_0x1f0843(0xb4)](_0xb5f814[_0x1f0843(0x95)]+'\x20warning(s)\x20found')),0x1):(console[_0x1f0843(0xa3)](a34_0xc6b619[_0x1f0843(0x9f)]('✔\x20All\x20'+_0xb5f814['validCount']+_0x1f0843(0x9d))),_0xb5f814[_0x1f0843(0x95)]>0x0&&console[_0x1f0843(0xa3)](a34_0xc6b619[_0x1f0843(0xb4)](_0xb5f814[_0x1f0843(0x95)]+_0x1f0843(0x9b))),0x0);}}
1
+ function a34_0x5b3d(){const _0x53ee9b=['execute','Usage:\x20tdx\x20sg\x20validate\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Validate\x20all\x20(requires\x20context)','Validation\x20failed:\x20','log','verbose','107820LaBNuu','warnings','):\x20','1190755lAQyDL','Error:\x20Directory\x20not\x20found:\x20','Error:\x20No\x20YAML\x20files\x20found\x20in\x20','✔\x20All\x20','\x20\x20\x20\x20\x20\x20\x20tdx\x20sg\x20validate\x20<file_path>\x20\x20#\x20Validate\x20specific\x20file','2IMVGNp','398202fNdloU','type','hasErrors','51499FXDzKC','name','Validate\x20segment\x20and\x20journey\x20YAML\x20files','length','invalidCount','cwd','cyan','valid','warningCount','279117zycchk','10OocFij','helpText','description','1295979QQXLiP','dim','.yaml','green','\x20file(s)\x20with\x20errors,\x20','validCount','141078uhtqlY','yellow','red','endsWith','80SNKhKA','error','Error:\x20File\x20must\x20have\x20.yml\x20or\x20.yaml\x20extension:\x20','.yml','\x20valid','\x20warning(s)\x20found','file'];a34_0x5b3d=function(){return _0x53ee9b;};return a34_0x5b3d();}const a34_0x1f89e1=a34_0x4cb2;(function(_0xc52138,_0x3086ec){const _0x1b9ca9=a34_0x4cb2,_0x19609f=_0xc52138();while(!![]){try{const _0x1de742=parseInt(_0x1b9ca9(0x1f1))/0x1+parseInt(_0x1b9ca9(0x1f0))/0x2*(-parseInt(_0x1b9ca9(0x201))/0x3)+-parseInt(_0x1b9ca9(0x1e8))/0x4+parseInt(_0x1b9ca9(0x1eb))/0x5+parseInt(_0x1b9ca9(0x207))/0x6+-parseInt(_0x1b9ca9(0x1f4))/0x7*(-parseInt(_0x1b9ca9(0x20b))/0x8)+-parseInt(_0x1b9ca9(0x1fd))/0x9*(parseInt(_0x1b9ca9(0x1fe))/0xa);if(_0x1de742===_0x3086ec)break;else _0x19609f['push'](_0x19609f['shift']());}catch(_0x3cdaea){_0x19609f['push'](_0x19609f['shift']());}}}(a34_0x5b3d,0x3b713));import{BaseCommand}from'./command.js';import{resolveTarget,isSuccessfulResolution}from'../sdk/segment/target-resolution.js';function a34_0x4cb2(_0x1a0afb,_0x4c9fb4){_0x1a0afb=_0x1a0afb-0x1e6;const _0x5b3d71=a34_0x5b3d();let _0x4cb2b3=_0x5b3d71[_0x1a0afb];return _0x4cb2b3;}import{findYamlFiles}from'../sdk/segment/file-discovery.js';import{existsSync}from'fs';import a34_0x7b4263 from'chalk';import{formatValidationResult}from'../sdk/segment/yaml-validator.js';import{validateYamlFiles,isValidationResult,calculateSummary}from'../sdk/segment/validate-files.js';export class SegmentValidateCommand extends BaseCommand{[a34_0x1f89e1(0x1f5)]='segment:validate';[a34_0x1f89e1(0x200)]=a34_0x1f89e1(0x1f6);async[a34_0x1f89e1(0x212)](_0x2ea39e){const _0x5711bc=a34_0x1f89e1,{options:_0x4ed1e1,args:_0x3aff77}=_0x2ea39e,_0x2550ed=_0x4ed1e1,_0x53b1f=await resolveTarget({'arg':_0x3aff77[0x0],'contextParent':_0x4ed1e1['parentSegment'],'cwd':process[_0x5711bc(0x1f9)]()});if(!isSuccessfulResolution(_0x53b1f))return _0x53b1f['errorCode']==='no_parent'?(console['error'](a34_0x7b4263[_0x5711bc(0x208)]('parent_segment\x20is\x20not\x20set.\x20Use\x20`tdx\x20sg\x20use\x20<parent_name>`\x20to\x20set\x20it.\x0a')),console[_0x5711bc(0x20c)](_0x5711bc(0x213)),console['error']('\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[_0x5711bc(0x20c)](_0x5711bc(0x1ef))):(console[_0x5711bc(0x20c)](a34_0x7b4263['red']('Error:\x20'+_0x53b1f['message']+'\x0a')),_0x53b1f[_0x5711bc(0x1ff)]&&console[_0x5711bc(0x20c)](a34_0x7b4263[_0x5711bc(0x1fa)](_0x53b1f[_0x5711bc(0x1ff)]))),0x1;const _0x1c0e76=_0x53b1f['targetDir'],_0x4ab096=_0x53b1f[_0x5711bc(0x1f2)]===_0x5711bc(0x211)?_0x53b1f['filePath']:undefined;if(!_0x4ab096&&!existsSync(_0x1c0e76))return console[_0x5711bc(0x20c)](a34_0x7b4263['red'](_0x5711bc(0x1ec)+_0x1c0e76+'\x0a')),0x1;let _0x5d181c;if(_0x4ab096){if(!_0x4ab096['endsWith'](_0x5711bc(0x20e))&&!_0x4ab096[_0x5711bc(0x20a)](_0x5711bc(0x203)))return console[_0x5711bc(0x20c)](a34_0x7b4263[_0x5711bc(0x209)](_0x5711bc(0x20d)+_0x4ab096+'\x0a')),0x1;_0x5d181c=[_0x4ab096];}else _0x5d181c=findYamlFiles(_0x1c0e76);if(_0x5d181c[_0x5711bc(0x1f7)]===0x0)return console[_0x5711bc(0x20c)](a34_0x7b4263[_0x5711bc(0x209)](_0x5711bc(0x1ed)+_0x1c0e76+'\x0a')),0x1;const _0x161ca8=validateYamlFiles(_0x5d181c,_0x1c0e76),_0x194688=calculateSummary(_0x161ca8);for(const _0x21ef5f of _0x161ca8){if(!isValidationResult(_0x21ef5f))continue;const {relativePath:_0x18854d,source:_0x308886,result:_0x54150b,fileType:_0xf70ef4}=_0x21ef5f,_0x521f50=_0xf70ef4;if(_0x54150b[_0x5711bc(0x1fb)]&&_0x54150b[_0x5711bc(0x1e9)][_0x5711bc(0x1f7)]===0x0)_0x2550ed[_0x5711bc(0x1e7)]&&console[_0x5711bc(0x1e6)](a34_0x7b4263[_0x5711bc(0x204)]('✔\x20'+_0x18854d)+a34_0x7b4263[_0x5711bc(0x202)]('\x20('+_0x521f50+')'));else _0x54150b[_0x5711bc(0x1fb)]?(console[_0x5711bc(0x1e6)](a34_0x7b4263['yellow']('⚠\x20'+_0x18854d)+a34_0x7b4263['dim']('\x20('+_0x521f50+_0x5711bc(0x1ea)+_0x54150b['warnings'][_0x5711bc(0x1f7)]+'\x20warning(s)')),console[_0x5711bc(0x1e6)](formatValidationResult(_0x54150b,_0x308886,_0x18854d))):(console[_0x5711bc(0x1e6)](a34_0x7b4263[_0x5711bc(0x209)]('✖\x20'+_0x18854d)+a34_0x7b4263[_0x5711bc(0x202)]('\x20('+_0x521f50+_0x5711bc(0x1ea)+_0x54150b['errors'][_0x5711bc(0x1f7)]+'\x20error(s)')),console[_0x5711bc(0x1e6)](formatValidationResult(_0x54150b,_0x308886,_0x18854d)));}return console[_0x5711bc(0x1e6)](''),_0x194688[_0x5711bc(0x1f3)]?(console['log'](a34_0x7b4263['red'](_0x5711bc(0x214)+_0x194688[_0x5711bc(0x1f8)]+_0x5711bc(0x205)+_0x194688[_0x5711bc(0x206)]+_0x5711bc(0x20f))),_0x194688['warningCount']>0x0&&console['log'](a34_0x7b4263[_0x5711bc(0x208)](_0x194688[_0x5711bc(0x1fc)]+_0x5711bc(0x210))),0x1):(console[_0x5711bc(0x1e6)](a34_0x7b4263[_0x5711bc(0x204)](_0x5711bc(0x1ee)+_0x194688[_0x5711bc(0x206)]+'\x20file(s)\x20valid')),_0x194688[_0x5711bc(0x1fc)]>0x0&&console[_0x5711bc(0x1e6)](a34_0x7b4263[_0x5711bc(0x208)](_0x194688[_0x5711bc(0x1fc)]+'\x20warning(s)\x20found')),0x0);}}
@@ -1 +1 @@
1
- const a35_0x43e2ca=a35_0x269f;(function(_0x31961a,_0x35debc){const _0x225631=a35_0x269f,_0x1090bc=_0x31961a();while(!![]){try{const _0x23ab88=-parseInt(_0x225631(0x1f0))/0x1+parseInt(_0x225631(0x1f2))/0x2+-parseInt(_0x225631(0x1f3))/0x3*(parseInt(_0x225631(0x1c4))/0x4)+-parseInt(_0x225631(0x1cb))/0x5+-parseInt(_0x225631(0x1ed))/0x6+parseInt(_0x225631(0x1e1))/0x7+parseInt(_0x225631(0x1f1))/0x8*(parseInt(_0x225631(0x1c0))/0x9);if(_0x23ab88===_0x35debc)break;else _0x1090bc['push'](_0x1090bc['shift']());}catch(_0x237aa8){_0x1090bc['push'](_0x1090bc['shift']());}}}(a35_0x3998,0x63ff7));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleSDKOutput}from'../core/command-output.js';function a35_0x3998(){const _0x1f0560=['maxDepth','262086lWJWGH','No\x20items\x20match\x20pattern:\x20',']\x20matching\x20\x27','84139iuIAMA','44424aIcSeN','853994zFbSoA','33IgSbVI','journey','Listing\x20folders,\x20segments,\x20and\x20journeys...','✔\x20Found\x20','folder','listRecursive','execute','cause','/e/','replace','✔\x20Built\x20tree\x20with\x20','error','\x5c$&','filter','listUnifiedWithJourneys','jsonl','folderId','\x20folder','\x27...','resolvePathToResource','length','\x20journey','map','Site:\x20','description','477kReLrh','site','Recursive\x20mode:\x20enabled','parentSegment','83240LvkfMu','children','recursive','\x20segment','listUnified','data','Resolving\x20path\x20\x27','2759590oITNGx','/j/da','Error:\x20No\x20parent\x20segment\x20context\x20set.','Error:\x20','Folder/pattern\x20arg:\x20','listWithPattern','dim','localeCompare','Folder\x20ID:\x20','json','type','segments','includes','Building\x20hierarchy\x20tree...','journeys','\x20\x20tdx\x20sg\x20use\x20\x22My\x20Audience\x22','name','Parent\x20ID:\x20','test','log','sort','\x20\x20Cause:\x20','4178531kOyuHB','(not\x20set)','folders','parentId','segment','verbose','Use\x20tdx\x20ps\x20list\x20to\x20see\x20available\x20parent\x20segments.','format','journeyBundleName','/app/ps/',',\x20and\x20'];a35_0x3998=function(){return _0x1f0560;};return a35_0x3998();}function a35_0x269f(_0x5c96b5,_0x285d07){_0x5c96b5=_0x5c96b5-0x1c0;const _0x399899=a35_0x3998();let _0x269f20=_0x399899[_0x5c96b5];return _0x269f20;}import{withSpinner}from'../utils/spinner.js';import{formatFlatList,formatTree}from'../sdk/util/tree-formatter.js';import{getConsoleNextUrl}from'../sdk/client/endpoints.js';import a35_0x2d9e33 from'chalk';export class SegmentsCommand extends BaseCommand{['name']='segments';[a35_0x43e2ca(0x20b)]='List\x20folders\x20and\x20child\x20segments';async[a35_0x43e2ca(0x1f9)](_0x3e290b){const _0x144fb8=a35_0x43e2ca,{options:_0x8d7050,args:_0x27d646}=_0x3e290b,_0x430c1f=_0x8d7050[_0x144fb8(0x1c6)],_0x94cab5=_0x27d646[0x0];try{const _0x4acc78=_0x8d7050[_0x144fb8(0x1c3)];_0x8d7050['verbose']&&(console[_0x144fb8(0x1fe)](_0x144fb8(0x20a)+_0x8d7050['site']),console['error']('Parent\x20segment\x20context:\x20'+(_0x4acc78||_0x144fb8(0x1e2))),_0x94cab5&&console['error'](_0x144fb8(0x1cf)+_0x94cab5),_0x430c1f&&console[_0x144fb8(0x1fe)](_0x144fb8(0x1c2)));if(!_0x4acc78)return console[_0x144fb8(0x1fe)](_0x144fb8(0x1cd)),console[_0x144fb8(0x1fe)](''),console[_0x144fb8(0x1fe)]('Set\x20a\x20parent\x20segment\x20context\x20first:'),console[_0x144fb8(0x1fe)]('\x20\x20tdx\x20sg\x20pull\x20\x22My\x20Audience\x22'),console[_0x144fb8(0x1fe)](_0x144fb8(0x1da)),console['error'](''),console[_0x144fb8(0x1fe)](_0x144fb8(0x1e7)),0x1;const _0x1389c4=_0x94cab5&&(_0x94cab5[_0x144fb8(0x1d7)]('*')||_0x94cab5[_0x144fb8(0x1d7)]('?'));if(_0x1389c4)return await this[_0x144fb8(0x1d0)](_0x3e290b,_0x4acc78,_0x94cab5);const _0x163249=_0x94cab5?_0x4acc78+'/'+_0x94cab5:_0x4acc78;return _0x430c1f?await this['listRecursive'](_0x3e290b,_0x163249):await this[_0x144fb8(0x1c8)](_0x3e290b,_0x163249);}catch(_0x28e0f2){if(_0x28e0f2 instanceof SDKError)return console[_0x144fb8(0x1fe)](_0x144fb8(0x1ce)+_0x28e0f2['message']),_0x28e0f2['cause']&&console[_0x144fb8(0x1fe)](_0x144fb8(0x1e0)+_0x28e0f2[_0x144fb8(0x1fa)]),0x1;throw _0x28e0f2;}}async[a35_0x43e2ca(0x1d0)](_0x823b10,_0x3d7800,_0x54a9ed){const _0x5a8011=a35_0x43e2ca,{options:_0x244a31,tdx:_0x2a343d}=_0x823b10,_0x3f7999=await withSpinner('Resolving\x20parent\x20segment\x20\x27'+_0x3d7800+_0x5a8011(0x205),()=>_0x2a343d[_0x5a8011(0x1e5)][_0x5a8011(0x206)](_0x3d7800),{'verbose':_0x244a31[_0x5a8011(0x1e6)]}),_0x3df4f8=_0x3f7999[_0x5a8011(0x1c9)],_0x598118=await withSpinner(_0x5a8011(0x1f5),()=>_0x2a343d['segment']['listUnifiedWithJourneys'](_0x3df4f8[_0x5a8011(0x1e4)],_0x3df4f8[_0x5a8011(0x203)]),{'verbose':_0x244a31[_0x5a8011(0x1e6)]}),{folders:_0xb171,segments:_0x2ffbd8,journeys:_0x4ae158}=_0x598118[_0x5a8011(0x1c9)],_0x4749c3=_0x54a9ed[_0x5a8011(0x1fc)](/[.+^${}()|[\]\\]/g,_0x5a8011(0x1ff))[_0x5a8011(0x1fc)](/\*/g,'.*')[_0x5a8011(0x1fc)](/\?/g,'.'),_0x2575af=new RegExp('^'+_0x4749c3+'$','i'),_0xb4547=_0xb171[_0x5a8011(0x200)](_0x5b2bce=>_0x2575af['test'](_0x5b2bce[_0x5a8011(0x1db)])),_0x8185af=_0x2ffbd8[_0x5a8011(0x200)](_0x4b4018=>_0x2575af['test'](_0x4b4018[_0x5a8011(0x1db)])),_0x7ba8d0=_0x4ae158[_0x5a8011(0x200)](_0xaeee26=>_0x2575af[_0x5a8011(0x1dd)](_0xaeee26['journeyBundleName'])),_0x5d6f9a=_0xb4547[_0x5a8011(0x207)]+_0x8185af[_0x5a8011(0x207)]+_0x7ba8d0['length'];console[_0x5a8011(0x1fe)](_0x5a8011(0x1f6)+_0xb4547[_0x5a8011(0x207)]+_0x5a8011(0x204)+(_0xb4547[_0x5a8011(0x207)]!==0x1?'s':'')+',\x20'+_0x8185af[_0x5a8011(0x207)]+_0x5a8011(0x1c7)+(_0x8185af['length']!==0x1?'s':'')+_0x5a8011(0x1eb)+_0x7ba8d0['length']+_0x5a8011(0x208)+(_0x7ba8d0[_0x5a8011(0x207)]!==0x1?'s':'')+'\x20matching\x20\x27'+_0x54a9ed+'\x27');const _0x45a183=_0x35657f=>{const _0x164b72=_0x5a8011;return getConsoleNextUrl(_0x244a31[_0x164b72(0x1c1)],_0x164b72(0x1ea)+_0x3df4f8['parentId']+_0x164b72(0x1fb)+_0x35657f);},_0x254d45=_0x244a31['format']===_0x5a8011(0x1d4)||_0x244a31['format']==='jsonl';if(_0x254d45){const _0x584101=[..._0xb4547['map'](_0x292199=>({..._0x292199,'type':'folder'})),..._0x8185af[_0x5a8011(0x209)](_0x508c17=>({..._0x508c17,'type':_0x5a8011(0x1e5),'url':_0x45a183(_0x508c17['id'])})),..._0x7ba8d0[_0x5a8011(0x209)](_0x12e5bf=>({..._0x12e5bf,'name':_0x12e5bf[_0x5a8011(0x1e9)],'type':'journey'}))][_0x5a8011(0x1df)]((_0xac4797,_0x5128a0)=>_0xac4797[_0x5a8011(0x1db)][_0x5a8011(0x1d2)](_0x5128a0[_0x5a8011(0x1db)]));await handleSDKOutput(_0x584101,_0x244a31);}else{if(_0x5d6f9a===0x0)console['log'](_0x5a8011(0x1ee)+_0x54a9ed);else{console[_0x5a8011(0x1de)](a35_0x2d9e33[_0x5a8011(0x1d1)]('['+_0x3d7800+_0x5a8011(0x1ef)+_0x54a9ed+'\x27'));const _0x44f4fc=formatFlatList(_0xb4547,_0x8185af,{'showMetadata':!![],'getSegmentUrl':_0x45a183},_0x7ba8d0);console[_0x5a8011(0x1de)](_0x44f4fc);}}return 0x0;}async[a35_0x43e2ca(0x1c8)](_0x145718,_0xa591e8){const _0x562df4=a35_0x43e2ca,{options:_0x34d22e,tdx:_0x4b816d}=_0x145718,_0xb5f146=await withSpinner(_0x562df4(0x1ca)+_0xa591e8+_0x562df4(0x205),()=>_0x4b816d['segment']['resolvePathToResource'](_0xa591e8),{'verbose':_0x34d22e[_0x562df4(0x1e6)]}),_0x33a624=_0xb5f146[_0x562df4(0x1c9)];_0x34d22e['verbose']&&(console['error'](_0x562df4(0x1dc)+_0x33a624[_0x562df4(0x1e4)]),_0x33a624[_0x562df4(0x203)]&&console['error'](_0x562df4(0x1d3)+_0x33a624[_0x562df4(0x203)]));const _0x3e254a=await withSpinner('Listing\x20folders,\x20segments,\x20and\x20journeys...',()=>_0x4b816d[_0x562df4(0x1e5)][_0x562df4(0x201)](_0x33a624[_0x562df4(0x1e4)],_0x33a624[_0x562df4(0x203)]),{'verbose':_0x34d22e['verbose']}),{folders:_0x5c8fec,segments:_0x402dc8,journeys:_0x440b32}=_0x3e254a[_0x562df4(0x1c9)],_0x301e8c=_0x5c8fec[_0x562df4(0x207)]+_0x402dc8[_0x562df4(0x207)]+_0x440b32['length'];console['error'](_0x562df4(0x1f6)+_0x5c8fec[_0x562df4(0x207)]+'\x20folder'+(_0x5c8fec[_0x562df4(0x207)]!==0x1?'s':'')+',\x20'+_0x402dc8[_0x562df4(0x207)]+'\x20segment'+(_0x402dc8[_0x562df4(0x207)]!==0x1?'s':'')+_0x562df4(0x1eb)+_0x440b32[_0x562df4(0x207)]+'\x20journey'+(_0x440b32[_0x562df4(0x207)]!==0x1?'s':''));const _0x87e3dc=_0x46cfc=>{const _0x570387=_0x562df4;return getConsoleNextUrl(_0x34d22e[_0x570387(0x1c1)],_0x570387(0x1ea)+_0x33a624[_0x570387(0x1e4)]+_0x570387(0x1fb)+_0x46cfc);},_0x52667d=_0x512711=>{const _0xff1c6f=_0x562df4;return getConsoleNextUrl(_0x34d22e[_0xff1c6f(0x1c1)],'/app/ps/'+_0x33a624[_0xff1c6f(0x1e4)]+_0xff1c6f(0x1fb)+_0x512711+_0xff1c6f(0x1cc));},_0x5a139c=_0x34d22e[_0x562df4(0x1e8)]===_0x562df4(0x1d4)||_0x34d22e['format']===_0x562df4(0x202);if(_0x5a139c){const _0x35c218=[..._0x5c8fec['map'](_0x5cb4ff=>({..._0x5cb4ff,'type':_0x562df4(0x1f7)})),..._0x402dc8['map'](_0x1b6700=>({..._0x1b6700,'type':_0x562df4(0x1e5),'url':_0x87e3dc(_0x1b6700['id'])})),..._0x440b32[_0x562df4(0x209)](_0x143f9f=>({..._0x143f9f,'name':_0x143f9f[_0x562df4(0x1e9)],'type':'journey','url':_0x52667d(_0x143f9f['id'])}))][_0x562df4(0x1df)]((_0x2d262f,_0x525901)=>_0x2d262f[_0x562df4(0x1db)][_0x562df4(0x1d2)](_0x525901['name']));await handleSDKOutput(_0x35c218,_0x34d22e);}else{if(_0x301e8c===0x0)console['log'](a35_0x2d9e33['dim']('['+_0xa591e8+']')),console['log']('(empty)');else{console['log'](a35_0x2d9e33[_0x562df4(0x1d1)]('['+_0xa591e8+']'));const _0x4dba7e=formatFlatList(_0x5c8fec,_0x402dc8,{'showMetadata':!![],'getSegmentUrl':_0x87e3dc,'getJourneyUrl':_0x52667d},_0x440b32);console[_0x562df4(0x1de)](_0x4dba7e);}}return 0x0;}async[a35_0x43e2ca(0x1f8)](_0x1efae2,_0x4d18f9){const _0x1ea3d8=a35_0x43e2ca,{options:_0x12a8a7,tdx:_0x34c5c1}=_0x1efae2,_0x37121a=await withSpinner(_0x1ea3d8(0x1ca)+_0x4d18f9+_0x1ea3d8(0x205),()=>_0x34c5c1[_0x1ea3d8(0x1e5)][_0x1ea3d8(0x206)](_0x4d18f9),{'verbose':_0x12a8a7[_0x1ea3d8(0x1e6)]}),_0x5335fb=_0x37121a[_0x1ea3d8(0x1c9)];_0x12a8a7[_0x1ea3d8(0x1e6)]&&(console[_0x1ea3d8(0x1fe)](_0x1ea3d8(0x1dc)+_0x5335fb['parentId']),_0x5335fb[_0x1ea3d8(0x203)]&&console[_0x1ea3d8(0x1fe)](_0x1ea3d8(0x1d3)+_0x5335fb[_0x1ea3d8(0x203)]));const _0x20c33e=_0x12a8a7[_0x1ea3d8(0x1ec)]||0xa,_0x161433=await withSpinner(_0x1ea3d8(0x1d8),()=>_0x34c5c1['segment'][_0x1ea3d8(0x1f8)](_0x5335fb[_0x1ea3d8(0x1e4)],_0x5335fb[_0x1ea3d8(0x203)],0x0,_0x20c33e),{'verbose':_0x12a8a7[_0x1ea3d8(0x1e6)]}),_0x2c82d2=_0x161433[_0x1ea3d8(0x1c9)],_0x5eee31=_0x63a8e7=>{const _0x3e1bb2=_0x1ea3d8;let _0x266137=0x0,_0x952781=0x0,_0x3c1c46=0x0;for(const _0xbc780c of _0x63a8e7){if(_0xbc780c[_0x3e1bb2(0x1d5)]===_0x3e1bb2(0x1f7))_0x266137++;else{if(_0xbc780c[_0x3e1bb2(0x1d5)]===_0x3e1bb2(0x1e5))_0x952781++;else{if(_0xbc780c[_0x3e1bb2(0x1d5)]===_0x3e1bb2(0x1f4))_0x3c1c46++;}}if(_0xbc780c[_0x3e1bb2(0x1c5)]){const _0x9613a3=_0x5eee31(_0xbc780c[_0x3e1bb2(0x1c5)]);_0x266137+=_0x9613a3[_0x3e1bb2(0x1e3)],_0x952781+=_0x9613a3[_0x3e1bb2(0x1d6)],_0x3c1c46+=_0x9613a3[_0x3e1bb2(0x1d9)];}}return{'folders':_0x266137,'segments':_0x952781,'journeys':_0x3c1c46};},_0x14b36f=_0x5eee31(_0x2c82d2);console[_0x1ea3d8(0x1fe)](_0x1ea3d8(0x1fd)+_0x14b36f[_0x1ea3d8(0x1e3)]+_0x1ea3d8(0x204)+(_0x14b36f[_0x1ea3d8(0x1e3)]!==0x1?'s':'')+',\x20'+_0x14b36f[_0x1ea3d8(0x1d6)]+'\x20segment'+(_0x14b36f[_0x1ea3d8(0x1d6)]!==0x1?'s':'')+_0x1ea3d8(0x1eb)+_0x14b36f[_0x1ea3d8(0x1d9)]+_0x1ea3d8(0x208)+(_0x14b36f['journeys']!==0x1?'s':''));const _0x5df09c=_0x5960fc=>{const _0x3b2c35=_0x1ea3d8;return getConsoleNextUrl(_0x12a8a7['site'],'/app/ps/'+_0x5335fb[_0x3b2c35(0x1e4)]+_0x3b2c35(0x1fb)+_0x5960fc);},_0x330e70=_0x4ae175=>{const _0x16ccaf=_0x1ea3d8;return getConsoleNextUrl(_0x12a8a7[_0x16ccaf(0x1c1)],'/app/ps/'+_0x5335fb[_0x16ccaf(0x1e4)]+_0x16ccaf(0x1fb)+_0x4ae175+'/j/da');};if(_0x12a8a7[_0x1ea3d8(0x1e8)]===_0x1ea3d8(0x1d4)||_0x12a8a7[_0x1ea3d8(0x1e8)]===_0x1ea3d8(0x202))await handleSDKOutput(_0x2c82d2,_0x12a8a7);else{console[_0x1ea3d8(0x1de)](a35_0x2d9e33['dim']('['+_0x4d18f9+']'));const _0x4720e2=formatTree(_0x2c82d2,{'showMetadata':!![],'getSegmentUrl':_0x5df09c,'getJourneyUrl':_0x330e70});console['log'](_0x4720e2);}return 0x0;}}
1
+ function a35_0x2fc1(_0x56eae7,_0x48cbb3){_0x56eae7=_0x56eae7-0xff;const _0x19ab49=a35_0x19ab();let _0x2fc196=_0x19ab49[_0x56eae7];return _0x2fc196;}const a35_0x8f8e4f=a35_0x2fc1;(function(_0x3935d7,_0x449c13){const _0x1bbc18=a35_0x2fc1,_0x361fbd=_0x3935d7();while(!![]){try{const _0x1d5845=-parseInt(_0x1bbc18(0x141))/0x1*(-parseInt(_0x1bbc18(0x110))/0x2)+-parseInt(_0x1bbc18(0x10b))/0x3*(parseInt(_0x1bbc18(0x11a))/0x4)+-parseInt(_0x1bbc18(0x129))/0x5+parseInt(_0x1bbc18(0x121))/0x6+-parseInt(_0x1bbc18(0x144))/0x7+parseInt(_0x1bbc18(0x101))/0x8+-parseInt(_0x1bbc18(0x12f))/0x9*(-parseInt(_0x1bbc18(0x107))/0xa);if(_0x1d5845===_0x449c13)break;else _0x361fbd['push'](_0x361fbd['shift']());}catch(_0x36a1ac){_0x361fbd['push'](_0x361fbd['shift']());}}}(a35_0x19ab,0xd58ef));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleSDKOutput}from'../core/command-output.js';function a35_0x19ab(){const _0x31b375=['jsonl','Folder\x20ID:\x20','description','includes','Site:\x20','Resolving\x20path\x20\x27','4dRJYGf','\x20\x20Cause:\x20','\x27...','8781787trnczj','folderId','Listing\x20folders,\x20segments,\x20and\x20journeys...',']\x20matching\x20\x27','\x20\x20tdx\x20sg\x20pull\x20\x22My\x20Audience\x22','data','map','parentSegment','parentId','\x20segment','segment','8174872TcYjCb','segments','sort','error','Error:\x20','message','2930nBKimZ','children','journeyBundleName','Folder/pattern\x20arg:\x20','18ctVIFi','listRecursive','cause','/j/da','\x20folder','121810duGwsp','\x20matching\x20\x27','/app/ps/','maxDepth','listUnified','json','No\x20items\x20match\x20pattern:\x20','journey','Resolving\x20parent\x20segment\x20\x27','Parent\x20ID:\x20','472844YpQkaA','resolvePathToResource','\x20\x20tdx\x20sg\x20use\x20\x22My\x20Audience\x22','replace','execute',',\x20and\x20','filter','9998610SEHRga','site','length','journeys','type','folders','name','dim','5291105tXWSlG','Recursive\x20mode:\x20enabled','folder','Parent\x20segment\x20context:\x20','localeCompare','✔\x20Built\x20tree\x20with\x20','29637fFaOAE','\x20journey','verbose','format','listWithPattern','✔\x20Found\x20','test','List\x20folders\x20and\x20child\x20segments','recursive','listUnifiedWithJourneys','/e/','log'];a35_0x19ab=function(){return _0x31b375;};return a35_0x19ab();}import{withSpinner}from'../utils/spinner.js';import{formatFlatList,formatTree}from'../sdk/util/tree-formatter.js';import{getConsoleNextUrl}from'../sdk/client/endpoints.js';import a35_0x540871 from'chalk';export class SegmentsCommand extends BaseCommand{[a35_0x8f8e4f(0x127)]='segments';[a35_0x8f8e4f(0x13d)]=a35_0x8f8e4f(0x136);async[a35_0x8f8e4f(0x11e)](_0x1a3e64){const _0x1fa465=a35_0x8f8e4f,{options:_0x3f6287,args:_0x339990}=_0x1a3e64,_0x46e40b=_0x3f6287[_0x1fa465(0x137)],_0x399e51=_0x339990[0x0];try{const _0x4041bf=_0x3f6287[_0x1fa465(0x14b)];_0x3f6287[_0x1fa465(0x131)]&&(console[_0x1fa465(0x104)](_0x1fa465(0x13f)+_0x3f6287[_0x1fa465(0x122)]),console[_0x1fa465(0x104)](_0x1fa465(0x12c)+(_0x4041bf||'(not\x20set)')),_0x399e51&&console[_0x1fa465(0x104)](_0x1fa465(0x10a)+_0x399e51),_0x46e40b&&console[_0x1fa465(0x104)](_0x1fa465(0x12a)));if(!_0x4041bf)return console[_0x1fa465(0x104)]('Error:\x20No\x20parent\x20segment\x20context\x20set.'),console[_0x1fa465(0x104)](''),console[_0x1fa465(0x104)]('Set\x20a\x20parent\x20segment\x20context\x20first:'),console['error'](_0x1fa465(0x148)),console['error'](_0x1fa465(0x11c)),console['error'](''),console[_0x1fa465(0x104)]('Use\x20tdx\x20ps\x20list\x20to\x20see\x20available\x20parent\x20segments.'),0x1;const _0x36c7f3=_0x399e51&&(_0x399e51['includes']('*')||_0x399e51[_0x1fa465(0x13e)]('?'));if(_0x36c7f3)return await this[_0x1fa465(0x133)](_0x1a3e64,_0x4041bf,_0x399e51);const _0xb410d2=_0x399e51?_0x4041bf+'/'+_0x399e51:_0x4041bf;return _0x46e40b?await this[_0x1fa465(0x10c)](_0x1a3e64,_0xb410d2):await this['listUnified'](_0x1a3e64,_0xb410d2);}catch(_0x25a354){if(_0x25a354 instanceof SDKError)return console[_0x1fa465(0x104)](_0x1fa465(0x105)+_0x25a354[_0x1fa465(0x106)]),_0x25a354[_0x1fa465(0x10d)]&&console[_0x1fa465(0x104)](_0x1fa465(0x142)+_0x25a354[_0x1fa465(0x10d)]),0x1;throw _0x25a354;}}async[a35_0x8f8e4f(0x133)](_0x38291a,_0x249e88,_0x1de734){const _0x1f6380=a35_0x8f8e4f,{options:_0x595fab,tdx:_0x200f82}=_0x38291a,_0x3d4bb4=await withSpinner(_0x1f6380(0x118)+_0x249e88+_0x1f6380(0x143),()=>_0x200f82[_0x1f6380(0x100)][_0x1f6380(0x11b)](_0x249e88),{'verbose':_0x595fab['verbose']}),_0x18646d=_0x3d4bb4['data'],_0x1e7ee0=await withSpinner(_0x1f6380(0x146),()=>_0x200f82[_0x1f6380(0x100)][_0x1f6380(0x138)](_0x18646d[_0x1f6380(0x14c)],_0x18646d[_0x1f6380(0x145)]),{'verbose':_0x595fab[_0x1f6380(0x131)]}),{folders:_0x54fefd,segments:_0x1394c0,journeys:_0x5e0348}=_0x1e7ee0['data'],_0x638065=_0x1de734['replace'](/[.+^${}()|[\]\\]/g,'\x5c$&')[_0x1f6380(0x11d)](/\*/g,'.*')[_0x1f6380(0x11d)](/\?/g,'.'),_0x444ceb=new RegExp('^'+_0x638065+'$','i'),_0x1601fb=_0x54fefd[_0x1f6380(0x120)](_0x114c20=>_0x444ceb[_0x1f6380(0x135)](_0x114c20[_0x1f6380(0x127)])),_0x31a32b=_0x1394c0[_0x1f6380(0x120)](_0x5432c7=>_0x444ceb[_0x1f6380(0x135)](_0x5432c7[_0x1f6380(0x127)])),_0x54d7f3=_0x5e0348['filter'](_0x3d45ef=>_0x444ceb[_0x1f6380(0x135)](_0x3d45ef[_0x1f6380(0x109)])),_0x5acfac=_0x1601fb[_0x1f6380(0x123)]+_0x31a32b[_0x1f6380(0x123)]+_0x54d7f3[_0x1f6380(0x123)];console[_0x1f6380(0x104)](_0x1f6380(0x134)+_0x1601fb[_0x1f6380(0x123)]+_0x1f6380(0x10f)+(_0x1601fb[_0x1f6380(0x123)]!==0x1?'s':'')+',\x20'+_0x31a32b['length']+_0x1f6380(0xff)+(_0x31a32b[_0x1f6380(0x123)]!==0x1?'s':'')+_0x1f6380(0x11f)+_0x54d7f3['length']+_0x1f6380(0x130)+(_0x54d7f3[_0x1f6380(0x123)]!==0x1?'s':'')+_0x1f6380(0x111)+_0x1de734+'\x27');const _0x334c8b=_0x2245d1=>{const _0x34d6d7=_0x1f6380;return getConsoleNextUrl(_0x595fab[_0x34d6d7(0x122)],_0x34d6d7(0x112)+_0x18646d[_0x34d6d7(0x14c)]+'/e/'+_0x2245d1);},_0x3b9c52=_0x595fab[_0x1f6380(0x132)]==='json'||_0x595fab['format']==='jsonl';if(_0x3b9c52){const _0x1bcf91=[..._0x1601fb['map'](_0x394574=>({..._0x394574,'type':_0x1f6380(0x12b)})),..._0x31a32b[_0x1f6380(0x14a)](_0x10913b=>({..._0x10913b,'type':_0x1f6380(0x100),'url':_0x334c8b(_0x10913b['id'])})),..._0x54d7f3[_0x1f6380(0x14a)](_0x4dcd5d=>({..._0x4dcd5d,'name':_0x4dcd5d['journeyBundleName'],'type':_0x1f6380(0x117)}))][_0x1f6380(0x103)]((_0x2406d4,_0x1037e7)=>_0x2406d4[_0x1f6380(0x127)][_0x1f6380(0x12d)](_0x1037e7['name']));await handleSDKOutput(_0x1bcf91,_0x595fab);}else{if(_0x5acfac===0x0)console[_0x1f6380(0x13a)](_0x1f6380(0x116)+_0x1de734);else{console[_0x1f6380(0x13a)](a35_0x540871['dim']('['+_0x249e88+_0x1f6380(0x147)+_0x1de734+'\x27'));const _0x543917=formatFlatList(_0x1601fb,_0x31a32b,{'showMetadata':!![],'getSegmentUrl':_0x334c8b},_0x54d7f3);console[_0x1f6380(0x13a)](_0x543917);}}return 0x0;}async[a35_0x8f8e4f(0x114)](_0x26870b,_0x588a6a){const _0x514f00=a35_0x8f8e4f,{options:_0x3de5b5,tdx:_0x7348ef}=_0x26870b,_0x1a87fc=await withSpinner('Resolving\x20path\x20\x27'+_0x588a6a+_0x514f00(0x143),()=>_0x7348ef[_0x514f00(0x100)][_0x514f00(0x11b)](_0x588a6a),{'verbose':_0x3de5b5['verbose']}),_0x56d648=_0x1a87fc['data'];_0x3de5b5['verbose']&&(console[_0x514f00(0x104)](_0x514f00(0x119)+_0x56d648[_0x514f00(0x14c)]),_0x56d648[_0x514f00(0x145)]&&console['error'](_0x514f00(0x13c)+_0x56d648['folderId']));const _0x3ca50e=await withSpinner(_0x514f00(0x146),()=>_0x7348ef[_0x514f00(0x100)][_0x514f00(0x138)](_0x56d648[_0x514f00(0x14c)],_0x56d648['folderId']),{'verbose':_0x3de5b5[_0x514f00(0x131)]}),{folders:_0x469001,segments:_0x428446,journeys:_0x44884b}=_0x3ca50e[_0x514f00(0x149)],_0x2dbbe8=_0x469001[_0x514f00(0x123)]+_0x428446[_0x514f00(0x123)]+_0x44884b[_0x514f00(0x123)];console[_0x514f00(0x104)](_0x514f00(0x134)+_0x469001[_0x514f00(0x123)]+_0x514f00(0x10f)+(_0x469001[_0x514f00(0x123)]!==0x1?'s':'')+',\x20'+_0x428446[_0x514f00(0x123)]+_0x514f00(0xff)+(_0x428446[_0x514f00(0x123)]!==0x1?'s':'')+_0x514f00(0x11f)+_0x44884b[_0x514f00(0x123)]+_0x514f00(0x130)+(_0x44884b['length']!==0x1?'s':''));const _0x278b09=_0x462617=>{const _0x1c8a4f=_0x514f00;return getConsoleNextUrl(_0x3de5b5['site'],'/app/ps/'+_0x56d648[_0x1c8a4f(0x14c)]+_0x1c8a4f(0x139)+_0x462617);},_0x4284ed=_0x4b5419=>{const _0xbb67ec=_0x514f00;return getConsoleNextUrl(_0x3de5b5[_0xbb67ec(0x122)],'/app/ps/'+_0x56d648[_0xbb67ec(0x14c)]+_0xbb67ec(0x139)+_0x4b5419+_0xbb67ec(0x10e));},_0x2e4be3=_0x3de5b5[_0x514f00(0x132)]===_0x514f00(0x115)||_0x3de5b5['format']===_0x514f00(0x13b);if(_0x2e4be3){const _0xaaea17=[..._0x469001[_0x514f00(0x14a)](_0x1e02ae=>({..._0x1e02ae,'type':_0x514f00(0x12b)})),..._0x428446[_0x514f00(0x14a)](_0x765530=>({..._0x765530,'type':_0x514f00(0x100),'url':_0x278b09(_0x765530['id'])})),..._0x44884b[_0x514f00(0x14a)](_0x4cc2a4=>({..._0x4cc2a4,'name':_0x4cc2a4[_0x514f00(0x109)],'type':_0x514f00(0x117),'url':_0x4284ed(_0x4cc2a4['id'])}))][_0x514f00(0x103)]((_0x2c8578,_0x9f79e4)=>_0x2c8578[_0x514f00(0x127)][_0x514f00(0x12d)](_0x9f79e4[_0x514f00(0x127)]));await handleSDKOutput(_0xaaea17,_0x3de5b5);}else{if(_0x2dbbe8===0x0)console[_0x514f00(0x13a)](a35_0x540871[_0x514f00(0x128)]('['+_0x588a6a+']')),console['log']('(empty)');else{console[_0x514f00(0x13a)](a35_0x540871[_0x514f00(0x128)]('['+_0x588a6a+']'));const _0xf9d11a=formatFlatList(_0x469001,_0x428446,{'showMetadata':!![],'getSegmentUrl':_0x278b09,'getJourneyUrl':_0x4284ed},_0x44884b);console[_0x514f00(0x13a)](_0xf9d11a);}}return 0x0;}async[a35_0x8f8e4f(0x10c)](_0x35e31b,_0x2eb81b){const _0x1efd71=a35_0x8f8e4f,{options:_0x26286c,tdx:_0x4f02bb}=_0x35e31b,_0x2be7b5=await withSpinner(_0x1efd71(0x140)+_0x2eb81b+_0x1efd71(0x143),()=>_0x4f02bb[_0x1efd71(0x100)]['resolvePathToResource'](_0x2eb81b),{'verbose':_0x26286c[_0x1efd71(0x131)]}),_0x2404d2=_0x2be7b5[_0x1efd71(0x149)];_0x26286c['verbose']&&(console[_0x1efd71(0x104)](_0x1efd71(0x119)+_0x2404d2[_0x1efd71(0x14c)]),_0x2404d2[_0x1efd71(0x145)]&&console[_0x1efd71(0x104)](_0x1efd71(0x13c)+_0x2404d2[_0x1efd71(0x145)]));const _0x31c1ca=_0x26286c[_0x1efd71(0x113)]||0xa,_0x197aef=await withSpinner('Building\x20hierarchy\x20tree...',()=>_0x4f02bb[_0x1efd71(0x100)]['listRecursive'](_0x2404d2[_0x1efd71(0x14c)],_0x2404d2[_0x1efd71(0x145)],0x0,_0x31c1ca),{'verbose':_0x26286c[_0x1efd71(0x131)]}),_0x4f30ce=_0x197aef[_0x1efd71(0x149)],_0x242951=_0xd27d6=>{const _0x9ecd87=_0x1efd71;let _0x419a3a=0x0,_0x5bbffa=0x0,_0x385cb4=0x0;for(const _0x189491 of _0xd27d6){if(_0x189491[_0x9ecd87(0x125)]==='folder')_0x419a3a++;else{if(_0x189491[_0x9ecd87(0x125)]===_0x9ecd87(0x100))_0x5bbffa++;else{if(_0x189491[_0x9ecd87(0x125)]===_0x9ecd87(0x117))_0x385cb4++;}}if(_0x189491[_0x9ecd87(0x108)]){const _0x11ed49=_0x242951(_0x189491[_0x9ecd87(0x108)]);_0x419a3a+=_0x11ed49[_0x9ecd87(0x126)],_0x5bbffa+=_0x11ed49['segments'],_0x385cb4+=_0x11ed49[_0x9ecd87(0x124)];}}return{'folders':_0x419a3a,'segments':_0x5bbffa,'journeys':_0x385cb4};},_0xecdfa9=_0x242951(_0x4f30ce);console[_0x1efd71(0x104)](_0x1efd71(0x12e)+_0xecdfa9[_0x1efd71(0x126)]+_0x1efd71(0x10f)+(_0xecdfa9['folders']!==0x1?'s':'')+',\x20'+_0xecdfa9[_0x1efd71(0x102)]+_0x1efd71(0xff)+(_0xecdfa9[_0x1efd71(0x102)]!==0x1?'s':'')+_0x1efd71(0x11f)+_0xecdfa9[_0x1efd71(0x124)]+_0x1efd71(0x130)+(_0xecdfa9[_0x1efd71(0x124)]!==0x1?'s':''));const _0xe4cee9=_0x20b0fd=>{const _0x3dcfb1=_0x1efd71;return getConsoleNextUrl(_0x26286c[_0x3dcfb1(0x122)],_0x3dcfb1(0x112)+_0x2404d2['parentId']+_0x3dcfb1(0x139)+_0x20b0fd);},_0x21392c=_0x169df7=>{const _0x3779c1=_0x1efd71;return getConsoleNextUrl(_0x26286c['site'],'/app/ps/'+_0x2404d2['parentId']+_0x3779c1(0x139)+_0x169df7+_0x3779c1(0x10e));};if(_0x26286c[_0x1efd71(0x132)]===_0x1efd71(0x115)||_0x26286c[_0x1efd71(0x132)]===_0x1efd71(0x13b))await handleSDKOutput(_0x4f30ce,_0x26286c);else{console[_0x1efd71(0x13a)](a35_0x540871[_0x1efd71(0x128)]('['+_0x2eb81b+']'));const _0x1cbb3d=formatTree(_0x4f30ce,{'showMetadata':!![],'getSegmentUrl':_0xe4cee9,'getJourneyUrl':_0x21392c});console[_0x1efd71(0x13a)](_0x1cbb3d);}return 0x0;}}
@@ -1 +1 @@
1
- const a36_0x4004aa=a36_0x1533;function a36_0x1533(_0x16d0b6,_0x1ffb64){_0x16d0b6=_0x16d0b6-0x17e;const _0x2f4a7a=a36_0x2f4a();let _0x1533c9=_0x2f4a7a[_0x16d0b6];return _0x1533c9;}(function(_0x1389c5,_0x3eb798){const _0x4df4e5=a36_0x1533,_0x488c45=_0x1389c5();while(!![]){try{const _0xff0889=parseInt(_0x4df4e5(0x19c))/0x1*(-parseInt(_0x4df4e5(0x181))/0x2)+-parseInt(_0x4df4e5(0x1a8))/0x3+-parseInt(_0x4df4e5(0x191))/0x4*(parseInt(_0x4df4e5(0x199))/0x5)+parseInt(_0x4df4e5(0x194))/0x6*(parseInt(_0x4df4e5(0x1a3))/0x7)+parseInt(_0x4df4e5(0x18e))/0x8*(-parseInt(_0x4df4e5(0x19d))/0x9)+-parseInt(_0x4df4e5(0x19a))/0xa*(-parseInt(_0x4df4e5(0x1a0))/0xb)+parseInt(_0x4df4e5(0x19f))/0xc*(parseInt(_0x4df4e5(0x188))/0xd);if(_0xff0889===_0x3eb798)break;else _0x488c45['push'](_0x488c45['shift']());}catch(_0x42a513){_0x488c45['push'](_0x488c45['shift']());}}}(a36_0x2f4a,0x98fdc));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleSDKOutput}from'../core/command-output.js';import{parseTableReference,validateTableDescribeReference}from'../utils/table-ref-parser.js';import{withSpinner}from'../utils/spinner.js';function a36_0x2f4a(){const _0x2037b1=['620mullzs','170egQgyQ','Database:\x20','295342SolaPr','18bDvVpQ','query','1555692LhtlAR','438097cZFpqO','error','database','863359MCHZkR','\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--database\x20<database>','table','message','Error:\x20','1443573fyuVLU','args','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','data','6WrPMfx','Show\x20table\x20contents','\x20row','description','verbose','\x20\x20\x20or:\x20tdx\x20show\x20<catalog.database.table>','showTable','195poTItJ','Site:\x20','length','limit','show','name','157336DXyiMJ','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','✔\x20Retrieved\x20','38876OYQDdW','execute','Usage:\x20tdx\x20show\x20<database.table>','30ZNWrKv','catalog','cause','✔\x20Query\x20successful\x20-\x200\x20rows\x20returned','Limit:\x20'];a36_0x2f4a=function(){return _0x2037b1;};return a36_0x2f4a();}import{DEFAULT_DISPLAY_LIMIT,resolveLimit}from'../core/constants.js';export class ShowCommand extends BaseCommand{[a36_0x4004aa(0x18d)]=a36_0x4004aa(0x18c);[a36_0x4004aa(0x184)]=a36_0x4004aa(0x182);async[a36_0x4004aa(0x192)](_0x404500){const _0x5c4a13=a36_0x4004aa;return this[_0x5c4a13(0x187)](_0x404500);}async[a36_0x4004aa(0x187)](_0x35f02f){const _0x468d50=a36_0x4004aa,{options:_0x1d9758,args:_0x3d79f3,tdx:_0x10fcb9}=_0x35f02f;let _0x25e68c;try{_0x25e68c=parseTableReference(_0x3d79f3[0x0]);const _0x3c928d=_0x1d9758['database'];!_0x25e68c[_0x468d50(0x1a2)]&&_0x3c928d&&(_0x25e68c[_0x468d50(0x1a2)]=_0x3c928d);const _0x407402=validateTableDescribeReference(_0x25e68c);if(_0x407402)return console[_0x468d50(0x1a1)](_0x468d50(0x1a7)+_0x407402),console[_0x468d50(0x1a1)](_0x468d50(0x193)),console['error'](_0x468d50(0x186)),console[_0x468d50(0x1a1)](_0x468d50(0x1a4)),0x1;}catch(_0x43314e){return console[_0x468d50(0x1a1)]('Error:\x20'+_0x43314e[_0x468d50(0x1a6)]),console[_0x468d50(0x1a1)](_0x468d50(0x193)),console[_0x468d50(0x1a1)]('\x20\x20\x20or:\x20tdx\x20show\x20<catalog.database.table>'),console[_0x468d50(0x1a1)](_0x468d50(0x1a4)),0x1;}const _0x3d1c79=_0x25e68c[_0x468d50(0x195)],_0x2fb0af=_0x25e68c[_0x468d50(0x1a2)],_0x3beb6c=_0x25e68c[_0x468d50(0x1a5)],_0x409e93=resolveLimit(_0x1d9758[_0x468d50(0x18b)],DEFAULT_DISPLAY_LIMIT);try{_0x1d9758[_0x468d50(0x185)]&&(console[_0x468d50(0x1a1)](_0x468d50(0x189)+_0x1d9758['site']),_0x3d1c79&&console['error']('Catalog:\x20'+_0x3d1c79),console[_0x468d50(0x1a1)](_0x468d50(0x19b)+_0x2fb0af),console[_0x468d50(0x1a1)]('Table:\x20'+_0x3beb6c),console[_0x468d50(0x1a1)](_0x468d50(0x198)+_0x409e93));const _0x5ef4a8=_0x3d1c79?_0x3d1c79+'.'+_0x2fb0af+'.'+_0x3beb6c:_0x2fb0af+'.'+_0x3beb6c,_0x9f2499=await withSpinner('Querying\x20'+_0x5ef4a8+'...',()=>_0x10fcb9[_0x468d50(0x19e)][_0x468d50(0x187)](_0x2fb0af,_0x3beb6c,_0x409e93,_0x3d1c79),{'verbose':_0x1d9758['verbose']}),_0x47014c=_0x9f2499[_0x468d50(0x180)],_0x4703c6=_0x47014c[_0x468d50(0x180)];return _0x4703c6[_0x468d50(0x18a)]===0x0?console[_0x468d50(0x1a1)](_0x468d50(0x197)):console['error'](_0x468d50(0x190)+_0x4703c6['length']+_0x468d50(0x183)+(_0x4703c6['length']!==0x1?'s':'')+'\x20from\x20'+_0x5ef4a8),await handleSDKOutput(_0x4703c6,_0x1d9758),0x0;}catch(_0x1269c3){if(_0x1269c3 instanceof SDKError)return console['error'](_0x468d50(0x1a7)+_0x1269c3[_0x468d50(0x1a6)]),_0x1269c3['cause']&&console['error']('\x20\x20Cause:\x20'+_0x1269c3[_0x468d50(0x196)]),0x1;throw _0x1269c3;}}['validate'](_0x24d9a3){const _0x512df7=a36_0x4004aa;if(_0x24d9a3[_0x512df7(0x17e)][_0x512df7(0x18a)]===0x0)return _0x512df7(0x18f);if(_0x24d9a3[_0x512df7(0x17e)][_0x512df7(0x18a)]>0x1)return _0x512df7(0x17f);return undefined;}}
1
+ const a36_0x39246e=a36_0xe888;function a36_0xe888(_0x29f3e9,_0x43fdab){_0x29f3e9=_0x29f3e9-0xcb;const _0x420f9a=a36_0x420f();let _0xe888eb=_0x420f9a[_0x29f3e9];return _0xe888eb;}(function(_0x368629,_0x1d243b){const _0x278028=a36_0xe888,_0x31745a=_0x368629();while(!![]){try{const _0xb1177d=-parseInt(_0x278028(0xd0))/0x1*(-parseInt(_0x278028(0xe6))/0x2)+-parseInt(_0x278028(0xed))/0x3*(-parseInt(_0x278028(0xd3))/0x4)+-parseInt(_0x278028(0xd6))/0x5*(parseInt(_0x278028(0xf1))/0x6)+parseInt(_0x278028(0xe2))/0x7*(parseInt(_0x278028(0xdc))/0x8)+-parseInt(_0x278028(0xd8))/0x9+parseInt(_0x278028(0xf7))/0xa*(parseInt(_0x278028(0xe5))/0xb)+-parseInt(_0x278028(0xde))/0xc*(parseInt(_0x278028(0xee))/0xd);if(_0xb1177d===_0x1d243b)break;else _0x31745a['push'](_0x31745a['shift']());}catch(_0x1b072a){_0x31745a['push'](_0x31745a['shift']());}}}(a36_0x420f,0xa9fea));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';function a36_0x420f(){const _0x817341=['✔\x20Query\x20successful\x20-\x200\x20rows\x20returned','table','124FyeEyi','message','Database:\x20','1113320jVDYSA','execute','6274359aWDRiC','args','\x20\x20\x20or:\x20tdx\x20show\x20<catalog.database.table>','data','944CMslai','Catalog:\x20','57912fgOuPB','Site:\x20','name','description','70553ImFHSX','Usage:\x20tdx\x20show\x20<database.table>','site','11StMDDE','2VbZKdh','\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--database\x20<database>','showTable','verbose','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','length','Show\x20table\x20contents','4989kuKcnO','338vmsiLq','database','cause','12CuUoDZ','Usage:\x20tdx\x20show\x20<database.table>\x0a\x20\x20\x20or:\x20tdx\x20show\x20<catalog.database.table>\x0a\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--database\x20<database>\x0a\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--in\x20<database>\x0a\x0aRun\x20\x27tdx\x20show\x20--help\x27\x20for\x20more\x20options','Error:\x20','catalog','query','Limit:\x20','911530nxxNAK','error','\x20from\x20','limit','show','\x20row','632225NXvmGe'];a36_0x420f=function(){return _0x817341;};return a36_0x420f();}import{handleSDKOutput}from'../core/command-output.js';import{parseTableReference,validateTableDescribeReference}from'../utils/table-ref-parser.js';import{withSpinner}from'../utils/spinner.js';import{DEFAULT_DISPLAY_LIMIT,resolveLimit}from'../core/constants.js';export class ShowCommand extends BaseCommand{[a36_0x39246e(0xe0)]=a36_0x39246e(0xce);[a36_0x39246e(0xe1)]=a36_0x39246e(0xec);async[a36_0x39246e(0xd7)](_0x2f85b9){const _0xf50dd9=a36_0x39246e;return this[_0xf50dd9(0xe8)](_0x2f85b9);}async['showTable'](_0x421678){const _0x31975b=a36_0x39246e,{options:_0x4fe027,args:_0x115cdc,tdx:_0x544fef}=_0x421678;let _0x1dfc7a;try{_0x1dfc7a=parseTableReference(_0x115cdc[0x0]);const _0x30ca40=_0x4fe027[_0x31975b(0xef)];!_0x1dfc7a[_0x31975b(0xef)]&&_0x30ca40&&(_0x1dfc7a[_0x31975b(0xef)]=_0x30ca40);const _0x2ae8ba=validateTableDescribeReference(_0x1dfc7a);if(_0x2ae8ba)return console['error'](_0x31975b(0xf3)+_0x2ae8ba),console[_0x31975b(0xcb)](_0x31975b(0xe3)),console[_0x31975b(0xcb)]('\x20\x20\x20or:\x20tdx\x20show\x20<catalog.database.table>'),console[_0x31975b(0xcb)](_0x31975b(0xe7)),0x1;}catch(_0xf8328a){return console[_0x31975b(0xcb)](_0x31975b(0xf3)+_0xf8328a[_0x31975b(0xd4)]),console[_0x31975b(0xcb)](_0x31975b(0xe3)),console[_0x31975b(0xcb)](_0x31975b(0xda)),console[_0x31975b(0xcb)]('\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--database\x20<database>'),0x1;}const _0x46b3c0=_0x1dfc7a[_0x31975b(0xf4)],_0x35598e=_0x1dfc7a[_0x31975b(0xef)],_0x138d60=_0x1dfc7a[_0x31975b(0xd2)],_0x7aaa8a=resolveLimit(_0x4fe027[_0x31975b(0xcd)],DEFAULT_DISPLAY_LIMIT);try{_0x4fe027[_0x31975b(0xe9)]&&(console[_0x31975b(0xcb)](_0x31975b(0xdf)+_0x4fe027[_0x31975b(0xe4)]),_0x46b3c0&&console[_0x31975b(0xcb)](_0x31975b(0xdd)+_0x46b3c0),console[_0x31975b(0xcb)](_0x31975b(0xd5)+_0x35598e),console[_0x31975b(0xcb)]('Table:\x20'+_0x138d60),console[_0x31975b(0xcb)](_0x31975b(0xf6)+_0x7aaa8a));const _0x58e724=_0x46b3c0?_0x46b3c0+'.'+_0x35598e+'.'+_0x138d60:_0x35598e+'.'+_0x138d60,_0x324ffb=await withSpinner('Querying\x20'+_0x58e724+'...',()=>_0x544fef[_0x31975b(0xf5)][_0x31975b(0xe8)](_0x35598e,_0x138d60,_0x7aaa8a,_0x46b3c0),{'verbose':_0x4fe027[_0x31975b(0xe9)]}),_0x5ba68c=_0x324ffb[_0x31975b(0xdb)],_0x221244=_0x5ba68c[_0x31975b(0xdb)];return _0x221244[_0x31975b(0xeb)]===0x0?console[_0x31975b(0xcb)](_0x31975b(0xd1)):console[_0x31975b(0xcb)]('✔\x20Retrieved\x20'+_0x221244['length']+_0x31975b(0xcf)+(_0x221244['length']!==0x1?'s':'')+_0x31975b(0xcc)+_0x58e724),await handleSDKOutput(_0x221244,_0x4fe027),0x0;}catch(_0xf910b6){if(_0xf910b6 instanceof SDKError)return console[_0x31975b(0xcb)](_0x31975b(0xf3)+_0xf910b6['message']),_0xf910b6[_0x31975b(0xf0)]&&console[_0x31975b(0xcb)]('\x20\x20Cause:\x20'+_0xf910b6[_0x31975b(0xf0)]),0x1;throw _0xf910b6;}}['validate'](_0x32c80b){const _0x43ac80=a36_0x39246e;if(_0x32c80b['args'][_0x43ac80(0xeb)]===0x0)return _0x43ac80(0xf2);if(_0x32c80b[_0x43ac80(0xd9)][_0x43ac80(0xeb)]>0x1)return _0x43ac80(0xea);return undefined;}}
@@ -1 +1 @@
1
- function a37_0x310b(){const _0xbf99e6=['email','first_name','config','CLI\x20flag','(from\x20','profileSource','description','status','4757250APaAHi','getUserInfo','execute','cli','log','971940vJSVWk','cyan','390819NFDzqb','bold','dim','TDX_PROFILE\x20env','site','7746648LgTVqp','account_id','30PwzIzD','N/A','Name:','red','7481872lJWWjl','✓\x20Authentication\x20successful\x0a','Show\x20authentication\x20status\x20and\x20current\x20context','profile','1078420SNDACI','green','env','displayWithSources','yellow','18VKSXCU','join','tdx','site:\x20','323812OuCgdZ','filter','name','jobs','User:','✗\x20Validation\x20failed:\x20'];a37_0x310b=function(){return _0xbf99e6;};return a37_0x310b();}const a37_0x22e84b=a37_0x452b;(function(_0x34e794,_0x1e1336){const _0x456642=a37_0x452b,_0x46cad2=_0x34e794();while(!![]){try{const _0x9275d3=-parseInt(_0x456642(0xde))/0x1+parseInt(_0x456642(0xed))/0x2+-parseInt(_0x456642(0xe5))/0x3*(-parseInt(_0x456642(0xc9))/0x4)+-parseInt(_0x456642(0xdc))/0x5+-parseInt(_0x456642(0xd7))/0x6+-parseInt(_0x456642(0xe3))/0x7+parseInt(_0x456642(0xe9))/0x8*(parseInt(_0x456642(0xc5))/0x9);if(_0x9275d3===_0x1e1336)break;else _0x46cad2['push'](_0x46cad2['shift']());}catch(_0x2a8285){_0x46cad2['push'](_0x46cad2['shift']());}}}(a37_0x310b,0xb34fe));import{BaseCommand,printAuthError}from'./command.js';import{resolveAPIKeyAsync}from'../core/config.js';import{HTTPClientError}from'../sdk/client/http-client.js';import{GlobalContext}from'../core/global-context.js';function a37_0x452b(_0x1a36f8,_0x3d15fa){_0x1a36f8=_0x1a36f8-0xc4;const _0x310b8e=a37_0x310b();let _0x452b1d=_0x310b8e[_0x1a36f8];return _0x452b1d;}import a37_0x349e3c from'chalk';export class StatusCommand extends BaseCommand{[a37_0x22e84b(0xcb)]='status';[a37_0x22e84b(0xd5)]=a37_0x22e84b(0xeb);async[a37_0x22e84b(0xd9)](_0x267e45){const _0x573181=a37_0x22e84b,{options:_0x694380,tdx:_0x127314}=_0x267e45,_0x147262=_0x694380[_0x573181(0xe2)],_0x4b380e=new GlobalContext(_0x694380),_0x8fcd3=_0x4b380e[_0x573181(0xec)],_0x3fc9f2=_0x4b380e[_0x573181(0xd4)],_0xc19ba9=_0x3fc9f2===_0x573181(0xda)?_0x573181(0xd2):_0x3fc9f2==='session'?'session':_0x3fc9f2===_0x573181(0xef)?_0x573181(0xe1):_0x3fc9f2===_0x573181(0xd1)?_0x573181(0xd1):null,_0x56b3e1=_0x8fcd3?a37_0x349e3c[_0x573181(0xdd)](_0x8fcd3):a37_0x349e3c[_0x573181(0xe0)](_0x573181(0xe6)),_0x374520=_0xc19ba9?'\x20'+a37_0x349e3c['dim'](_0x573181(0xd3)+_0xc19ba9+')'):'';console[_0x573181(0xdb)](a37_0x349e3c['bold'](_0x573181(0xc7))+'\x20profile:\x20'+_0x56b3e1+_0x374520+'\x20'+a37_0x349e3c['dim']('(')+_0x573181(0xc8)+a37_0x349e3c[_0x573181(0xdd)](_0x147262)+a37_0x349e3c[_0x573181(0xe0)](')'));const _0xb730=await resolveAPIKeyAsync(_0x147262,_0x8fcd3);if(_0xb730){const {source:_0x5e1571,isDeprecated:_0x5a2fb9}=_0xb730,_0x234b75='Read\x20credential\x20from\x20'+a37_0x349e3c[_0x573181(0xdd)](_0x5e1571);console['log'](_0x5a2fb9?a37_0x349e3c[_0x573181(0xc4)](_0x234b75):_0x234b75);}else console[_0x573181(0xdb)](a37_0x349e3c[_0x573181(0xc4)]('No\x20credential\x20found'));let _0xb942e2=![];try{const _0x2ec852=await _0x127314[_0x573181(0xcc)][_0x573181(0xd8)]();console['log'](a37_0x349e3c[_0x573181(0xee)](_0x573181(0xea))),console['log'](a37_0x349e3c[_0x573181(0xdf)](_0x573181(0xcd))+'\x20'+a37_0x349e3c[_0x573181(0xdd)](_0x2ec852[_0x573181(0xcf)]));if(_0x2ec852[_0x573181(0xd0)]||_0x2ec852['last_name']){const _0x4f2e8a=[_0x2ec852[_0x573181(0xd0)],_0x2ec852['last_name']][_0x573181(0xca)](Boolean)[_0x573181(0xc6)]('\x20');console[_0x573181(0xdb)](a37_0x349e3c[_0x573181(0xdf)](_0x573181(0xe7))+'\x20'+_0x4f2e8a);}_0x2ec852[_0x573181(0xe4)]&&console[_0x573181(0xdb)](a37_0x349e3c[_0x573181(0xdf)]('Account\x20ID:')+'\x20'+a37_0x349e3c[_0x573181(0xc4)](_0x2ec852['account_id'])),_0xb942e2=!![];}catch(_0xd745bd){_0xd745bd instanceof HTTPClientError&&_0xd745bd[_0x573181(0xd6)]===0x191?printAuthError(_0xd745bd,!![],_0x8fcd3):console['error'](a37_0x349e3c[_0x573181(0xe8)](_0x573181(0xce)+(_0xd745bd instanceof Error?_0xd745bd['message']:String(_0xd745bd))));}return console['log'](),_0x4b380e[_0x573181(0xf0)](),_0xb942e2?0x0:0x1;}}
1
+ const a37_0x3ccbe7=a37_0x573e;(function(_0x444c24,_0x5ae976){const _0x292614=a37_0x573e,_0x3d6e30=_0x444c24();while(!![]){try{const _0x412f8f=-parseInt(_0x292614(0x18a))/0x1+parseInt(_0x292614(0x191))/0x2+-parseInt(_0x292614(0x194))/0x3+-parseInt(_0x292614(0x1a4))/0x4*(parseInt(_0x292614(0x197))/0x5)+parseInt(_0x292614(0x186))/0x6*(parseInt(_0x292614(0x199))/0x7)+-parseInt(_0x292614(0x182))/0x8*(parseInt(_0x292614(0x1a8))/0x9)+parseInt(_0x292614(0x1a6))/0xa;if(_0x412f8f===_0x5ae976)break;else _0x3d6e30['push'](_0x3d6e30['shift']());}catch(_0x5d789d){_0x3d6e30['push'](_0x3d6e30['shift']());}}}(a37_0x41fa,0x4c745));function a37_0x41fa(){const _0x4700d2=['last_name','filter','site:\x20','Read\x20credential\x20from\x20','✓\x20Authentication\x20successful\x0a','jobs','description','tdx','getUserInfo','5060weXbgC','join','8838350UAuUza','Show\x20authentication\x20status\x20and\x20current\x20context','1833831YRlzXq','yellow','cyan','(from\x20','session','16yxcSiA','config','TDX_PROFILE\x20env','User:','840tCakTU','profileSource','name','Account\x20ID:','250734mnHnws','displayWithSources','message','N/A','red','green','account_id','1174874avRIlB','dim','log','1288494HTmsNQ','site','bold','1205FxMeiB','first_name','11725YjPJCU','No\x20credential\x20found'];a37_0x41fa=function(){return _0x4700d2;};return a37_0x41fa();}import{BaseCommand,printAuthError}from'./command.js';import{resolveAPIKeyAsync}from'../core/config.js';import{HTTPClientError}from'../sdk/client/http-client.js';function a37_0x573e(_0x3b1051,_0x2762b0){_0x3b1051=_0x3b1051-0x182;const _0x41fa7d=a37_0x41fa();let _0x573ef5=_0x41fa7d[_0x3b1051];return _0x573ef5;}import{GlobalContext}from'../core/global-context.js';import a37_0x5eaeb3 from'chalk';export class StatusCommand extends BaseCommand{[a37_0x3ccbe7(0x188)]='status';[a37_0x3ccbe7(0x1a1)]=a37_0x3ccbe7(0x1a7);async['execute'](_0x34ef2b){const _0x1b67e8=a37_0x3ccbe7,{options:_0x4f2da9,tdx:_0x3e4751}=_0x34ef2b,_0x4750cf=_0x4f2da9[_0x1b67e8(0x195)],_0x38007c=new GlobalContext(_0x4f2da9),_0x3045d1=_0x38007c['profile'],_0x5581a6=_0x38007c[_0x1b67e8(0x187)],_0x5e9761=_0x5581a6==='cli'?'CLI\x20flag':_0x5581a6==='session'?_0x1b67e8(0x1ac):_0x5581a6==='env'?_0x1b67e8(0x184):_0x5581a6==='config'?_0x1b67e8(0x183):null,_0x311b61=_0x3045d1?a37_0x5eaeb3['cyan'](_0x3045d1):a37_0x5eaeb3['dim'](_0x1b67e8(0x18d)),_0x4562a9=_0x5e9761?'\x20'+a37_0x5eaeb3[_0x1b67e8(0x192)](_0x1b67e8(0x1ab)+_0x5e9761+')'):'';console[_0x1b67e8(0x193)](a37_0x5eaeb3[_0x1b67e8(0x196)](_0x1b67e8(0x1a2))+'\x20profile:\x20'+_0x311b61+_0x4562a9+'\x20'+a37_0x5eaeb3['dim']('(')+_0x1b67e8(0x19d)+a37_0x5eaeb3['cyan'](_0x4750cf)+a37_0x5eaeb3[_0x1b67e8(0x192)](')'));const _0x5d581d=await resolveAPIKeyAsync(_0x4750cf,_0x3045d1);if(_0x5d581d){const {source:_0x437b96,isDeprecated:_0x44c909}=_0x5d581d,_0x56b28f=_0x1b67e8(0x19e)+a37_0x5eaeb3[_0x1b67e8(0x1aa)](_0x437b96);console[_0x1b67e8(0x193)](_0x44c909?a37_0x5eaeb3[_0x1b67e8(0x1a9)](_0x56b28f):_0x56b28f);}else console[_0x1b67e8(0x193)](a37_0x5eaeb3[_0x1b67e8(0x1a9)](_0x1b67e8(0x19a)));let _0x1dd42a=![];try{const _0x59a379=await _0x3e4751[_0x1b67e8(0x1a0)][_0x1b67e8(0x1a3)]();console[_0x1b67e8(0x193)](a37_0x5eaeb3[_0x1b67e8(0x18f)](_0x1b67e8(0x19f))),console[_0x1b67e8(0x193)](a37_0x5eaeb3[_0x1b67e8(0x196)](_0x1b67e8(0x185))+'\x20'+a37_0x5eaeb3[_0x1b67e8(0x1aa)](_0x59a379['email']));if(_0x59a379[_0x1b67e8(0x198)]||_0x59a379['last_name']){const _0xe63afc=[_0x59a379[_0x1b67e8(0x198)],_0x59a379[_0x1b67e8(0x19b)]][_0x1b67e8(0x19c)](Boolean)[_0x1b67e8(0x1a5)]('\x20');console[_0x1b67e8(0x193)](a37_0x5eaeb3['bold']('Name:')+'\x20'+_0xe63afc);}_0x59a379[_0x1b67e8(0x190)]&&console[_0x1b67e8(0x193)](a37_0x5eaeb3['bold'](_0x1b67e8(0x189))+'\x20'+a37_0x5eaeb3[_0x1b67e8(0x1a9)](_0x59a379[_0x1b67e8(0x190)])),_0x1dd42a=!![];}catch(_0x4f972e){_0x4f972e instanceof HTTPClientError&&_0x4f972e['status']===0x191?printAuthError(_0x4f972e,!![],_0x3045d1):console['error'](a37_0x5eaeb3[_0x1b67e8(0x18e)]('✗\x20Validation\x20failed:\x20'+(_0x4f972e instanceof Error?_0x4f972e[_0x1b67e8(0x18c)]:String(_0x4f972e))));}return console['log'](),_0x38007c[_0x1b67e8(0x18b)](),_0x1dd42a?0x0:0x1;}}
@@ -1 +1 @@
1
- const a38_0x184d61=a38_0x2795;(function(_0x14d667,_0x45a99e){const _0x161b10=a38_0x2795,_0x343082=_0x14d667();while(!![]){try{const _0x5931cc=-parseInt(_0x161b10(0x190))/0x1+-parseInt(_0x161b10(0x1a8))/0x2+parseInt(_0x161b10(0x1a0))/0x3+parseInt(_0x161b10(0x195))/0x4*(-parseInt(_0x161b10(0x1ad))/0x5)+parseInt(_0x161b10(0x19b))/0x6+parseInt(_0x161b10(0x19c))/0x7*(parseInt(_0x161b10(0x1b8))/0x8)+parseInt(_0x161b10(0x19e))/0x9*(parseInt(_0x161b10(0x1ab))/0xa);if(_0x5931cc===_0x45a99e)break;else _0x343082['push'](_0x343082['shift']());}catch(_0x49fa97){_0x343082['push'](_0x343082['shift']());}}}(a38_0x3b8d,0xd65e6));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleSDKOutput}from'../core/command-output.js';import{parseTableReference}from'../utils/table-ref-parser.js';function a38_0x3b8d(){const _0x1c5809=['\x20\x20Or:\x20\x20tdx\x20tables\x20--in\x20','name','Database\x20\x27','✖\x20No\x20tables\x20found','data','\x20\x20tdx\x20tables\x20users\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20->\x20table\x20\x22users\x22\x20across\x20all\x20databases','\x20\x20tdx\x20tables\x20\x22mydb.users\x22\x20\x20\x20\x20->\x20table\x20\x22users\x22\x20in\x20database\x20mydb','site','14944BzFaAr','validate','includes','\x27\x20without\x20wildcards\x20would\x20search\x20for\x20tables\x20named\x20\x27','query','description','database','Error:\x20Pattern\x20\x27','\x20\x20Or:\x20\x20tdx\x20tables\x20--database\x20','Table\x20pattern:\x20','length','195665jEjZtr','Site:\x20','\x20\x20tdx\x20tables\x20--in\x20mydb\x20\x20\x20\x20\x20\x20\x20->\x20all\x20tables\x20from\x20mydb','\x27\x20across\x20all\x20databases.','Error:\x20Too\x20many\x20arguments.\x20Use\x20single\x20argument:','2348424sBPbUv','error','\x20\x20Use:\x20tdx\x20tables\x20\x22','cause','tables','List\x20tables\x20in\x20a\x20database','3885192ICiADd','2282FnjuHS','table','9pEXyPU','\x20\x20Cause:\x20','3834960urklAs','Or\x20use\x20--in\x20flag:','listTables','Database:\x20all','Note:\x20\x27','verbose','\x27\x20is\x20ambiguous.','\x20\x20tdx\x20tables\x20\x22mydb.*\x22\x20\x20\x20\x20\x20\x20\x20\x20->\x20all\x20tables\x20from\x20mydb','1562306dPggOx','execute','message','4942640gnDtqZ','Error:\x20','10MpaSET','Database:\x20','Database\x20pattern:\x20'];a38_0x3b8d=function(){return _0x1c5809;};return a38_0x3b8d();}import{DEFAULT_LISTING_LIMIT,resolveLimit}from'../core/constants.js';function a38_0x2795(_0x3350d3,_0x36d74e){_0x3350d3=_0x3350d3-0x186;const _0x3b8d9a=a38_0x3b8d();let _0x2795df=_0x3b8d9a[_0x3350d3];return _0x2795df;}import{withSpinner}from'../utils/spinner.js';export class TablesCommand extends BaseCommand{[a38_0x184d61(0x1b1)]=a38_0x184d61(0x199);[a38_0x184d61(0x18a)]=a38_0x184d61(0x19a);async[a38_0x184d61(0x1a9)](_0x5020c2){const _0x5c48a2=a38_0x184d61,{options:_0x4a9709,args:_0x59db7c,tdx:_0x46680e}=_0x5020c2;let _0x2a2809;if(_0x59db7c[_0x5c48a2(0x18f)]===0x0)_0x2a2809={'database':undefined,'table':undefined,'original':''};else{if(_0x59db7c[_0x5c48a2(0x18f)]===0x1)try{_0x2a2809=parseTableReference(_0x59db7c[0x0]);if(_0x2a2809[_0x5c48a2(0x19d)]&&!_0x2a2809[_0x5c48a2(0x18b)]&&!_0x2a2809[_0x5c48a2(0x19d)][_0x5c48a2(0x187)]('*')&&!_0x2a2809['table'][_0x5c48a2(0x187)]('?'))return console['error'](_0x5c48a2(0x18c)+_0x59db7c[0x0]+_0x5c48a2(0x1a6)),console[_0x5c48a2(0x196)]('Did\x20you\x20mean\x20to\x20list\x20all\x20tables\x20from\x20database\x20\x27'+_0x2a2809['table']+'\x27?'),console['error'](_0x5c48a2(0x197)+_0x2a2809[_0x5c48a2(0x19d)]+'.*\x22'),console[_0x5c48a2(0x196)](_0x5c48a2(0x1b0)+_0x2a2809[_0x5c48a2(0x19d)]),console[_0x5c48a2(0x196)](_0x5c48a2(0x18d)+_0x2a2809[_0x5c48a2(0x19d)]),console[_0x5c48a2(0x196)](''),console[_0x5c48a2(0x196)](_0x5c48a2(0x1a4)+_0x59db7c[0x0]+_0x5c48a2(0x188)+_0x2a2809[_0x5c48a2(0x19d)]+_0x5c48a2(0x193)),0x1;}catch(_0x4a1426){return console['error'](_0x5c48a2(0x1ac)+_0x4a1426[_0x5c48a2(0x1aa)]),0x1;}else return console[_0x5c48a2(0x196)](_0x5c48a2(0x194)),console[_0x5c48a2(0x196)](_0x5c48a2(0x1b5)),console[_0x5c48a2(0x196)](_0x5c48a2(0x1a7)),console[_0x5c48a2(0x196)](_0x5c48a2(0x1b6)),console[_0x5c48a2(0x196)]('\x20\x20tdx\x20tables\x20\x22*.user*\x22\x20\x20\x20\x20\x20\x20\x20->\x20tables\x20matching\x20user*\x20across\x20databases'),console[_0x5c48a2(0x196)](_0x5c48a2(0x1a1)),console['error'](_0x5c48a2(0x192)),0x1;}const _0x4853b2=_0x4a9709[_0x5c48a2(0x18b)];!_0x2a2809[_0x5c48a2(0x18b)]&&_0x4853b2&&(_0x2a2809[_0x5c48a2(0x18b)]=_0x4853b2);try{const _0x54eb47=_0x546b42=>_0x546b42&&(_0x546b42[_0x5c48a2(0x187)]('*')||_0x546b42[_0x5c48a2(0x187)]('?')),_0x337ce7=_0x54eb47(_0x2a2809[_0x5c48a2(0x18b)]);_0x4a9709['verbose']&&(console[_0x5c48a2(0x196)](_0x5c48a2(0x191)+_0x4a9709[_0x5c48a2(0x1b7)]),_0x2a2809[_0x5c48a2(0x18b)]?_0x337ce7?console['error'](_0x5c48a2(0x1af)+_0x2a2809[_0x5c48a2(0x18b)]):console['error'](_0x5c48a2(0x1ae)+_0x2a2809['database']):console[_0x5c48a2(0x196)](_0x5c48a2(0x1a3)),_0x2a2809[_0x5c48a2(0x19d)]&&console['error'](_0x5c48a2(0x18e)+_0x2a2809[_0x5c48a2(0x19d)]));const _0x271e0a=_0x2a2809['database']&&!_0x337ce7?_0x2a2809[_0x5c48a2(0x18b)]:undefined,_0x2a4950=_0x337ce7?_0x2a2809[_0x5c48a2(0x18b)]:undefined,_0x2c037b=_0x2a2809[_0x5c48a2(0x19d)],_0x1fb357=resolveLimit(_0x4a9709['limit'],DEFAULT_LISTING_LIMIT),_0x136555=await withSpinner('Listing\x20tables...',()=>_0x46680e[_0x5c48a2(0x189)][_0x5c48a2(0x1a2)](_0x271e0a,_0x2c037b,_0x2a4950,_0x1fb357),{'verbose':_0x4a9709[_0x5c48a2(0x1a5)]}),_0x2e00c2=_0x136555[_0x5c48a2(0x1b4)];if(_0x2e00c2[_0x5c48a2(0x18f)]===0x0&&_0x2a2809[_0x5c48a2(0x18b)]&&!_0x337ce7)return console['error'](_0x5c48a2(0x1b3)),console[_0x5c48a2(0x196)](_0x5c48a2(0x1b2)+_0x2a2809[_0x5c48a2(0x18b)]+'\x27\x20may\x20not\x20exist\x20or\x20contains\x20no\x20tables'),0x1;return console[_0x5c48a2(0x196)]('✔\x20Found\x20'+_0x2e00c2[_0x5c48a2(0x18f)]+'\x20table'+(_0x2e00c2[_0x5c48a2(0x18f)]!==0x1?'s':'')),await handleSDKOutput(_0x2e00c2,{..._0x4a9709,'limit':_0x1fb357}),0x0;}catch(_0x5b3993){if(_0x5b3993 instanceof SDKError)return console['error'](_0x5c48a2(0x1ac)+_0x5b3993[_0x5c48a2(0x1aa)]),_0x5b3993[_0x5c48a2(0x198)]&&console[_0x5c48a2(0x196)](_0x5c48a2(0x19f)+_0x5b3993[_0x5c48a2(0x198)]),0x1;throw _0x5b3993;}}[a38_0x184d61(0x186)](_0x522f0b){return undefined;}}
1
+ const a38_0x22f37d=a38_0x5dd9;(function(_0x1e0e78,_0x5afc02){const _0x20333f=a38_0x5dd9,_0x2c7406=_0x1e0e78();while(!![]){try{const _0x40f567=parseInt(_0x20333f(0x13e))/0x1*(-parseInt(_0x20333f(0x12b))/0x2)+parseInt(_0x20333f(0x11f))/0x3*(-parseInt(_0x20333f(0x13d))/0x4)+-parseInt(_0x20333f(0x124))/0x5*(-parseInt(_0x20333f(0x143))/0x6)+parseInt(_0x20333f(0x120))/0x7*(-parseInt(_0x20333f(0x122))/0x8)+parseInt(_0x20333f(0x146))/0x9*(-parseInt(_0x20333f(0x12d))/0xa)+-parseInt(_0x20333f(0x141))/0xb+parseInt(_0x20333f(0x137))/0xc;if(_0x40f567===_0x5afc02)break;else _0x2c7406['push'](_0x2c7406['shift']());}catch(_0x16dde7){_0x2c7406['push'](_0x2c7406['shift']());}}}(a38_0x2dbd,0x26952));import{BaseCommand}from'./command.js';function a38_0x2dbd(){const _0x1e52a3=['error','data','✔\x20Found\x20','\x27\x20without\x20wildcards\x20would\x20search\x20for\x20tables\x20named\x20\x27','\x27\x20is\x20ambiguous.','\x20\x20Cause:\x20','8iwIzwr','Database\x20pattern:\x20','52850rDmUMg','Error:\x20Pattern\x20\x27','Database:\x20','limit','cause','validate','\x20\x20tdx\x20tables\x20users\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20->\x20table\x20\x22users\x22\x20across\x20all\x20databases','✖\x20No\x20tables\x20found','Table\x20pattern:\x20','site','9418632kiryjw','List\x20tables\x20in\x20a\x20database','verbose','\x20\x20tdx\x20tables\x20\x22*.user*\x22\x20\x20\x20\x20\x20\x20\x20->\x20tables\x20matching\x20user*\x20across\x20databases','\x20\x20tdx\x20tables\x20\x22mydb.users\x22\x20\x20\x20\x20->\x20table\x20\x22users\x22\x20in\x20database\x20mydb','length','793688ngHybV','51955ofvLEQ','\x27\x20may\x20not\x20exist\x20or\x20contains\x20no\x20tables','description','190696jKUjzn','tables','102OKhiAk','\x20table','\x20\x20Use:\x20tdx\x20tables\x20\x22','18MOpRKc','name','\x20\x20Or:\x20\x20tdx\x20tables\x20--database\x20','Or\x20use\x20--in\x20flag:','message','includes','Listing\x20tables...','.*\x22','database','table','\x20\x20tdx\x20tables\x20\x22mydb.*\x22\x20\x20\x20\x20\x20\x20\x20\x20->\x20all\x20tables\x20from\x20mydb','3uSRMdM','26859gSIORm','\x27\x20across\x20all\x20databases.','584NyYpnJ','Database\x20\x27','25705wRbAoe'];a38_0x2dbd=function(){return _0x1e52a3;};return a38_0x2dbd();}import{SDKError}from'../sdk/index.js';import{handleSDKOutput}from'../core/command-output.js';import{parseTableReference}from'../utils/table-ref-parser.js';function a38_0x5dd9(_0x324c23,_0x4efb3b){_0x324c23=_0x324c23-0x11a;const _0x2dbd49=a38_0x2dbd();let _0x5dd97b=_0x2dbd49[_0x324c23];return _0x5dd97b;}import{DEFAULT_LISTING_LIMIT,resolveLimit}from'../core/constants.js';import{withSpinner}from'../utils/spinner.js';export class TablesCommand extends BaseCommand{[a38_0x22f37d(0x147)]=a38_0x22f37d(0x142);[a38_0x22f37d(0x140)]=a38_0x22f37d(0x138);async['execute'](_0x1ed37c){const _0xe314e0=a38_0x22f37d,{options:_0x5c52f8,args:_0x2733de,tdx:_0xc17ec1}=_0x1ed37c;let _0x3ac8ec;if(_0x2733de[_0xe314e0(0x13c)]===0x0)_0x3ac8ec={'database':undefined,'table':undefined,'original':''};else{if(_0x2733de[_0xe314e0(0x13c)]===0x1)try{_0x3ac8ec=parseTableReference(_0x2733de[0x0]);if(_0x3ac8ec[_0xe314e0(0x11d)]&&!_0x3ac8ec['database']&&!_0x3ac8ec[_0xe314e0(0x11d)][_0xe314e0(0x14b)]('*')&&!_0x3ac8ec[_0xe314e0(0x11d)][_0xe314e0(0x14b)]('?'))return console[_0xe314e0(0x125)](_0xe314e0(0x12e)+_0x2733de[0x0]+_0xe314e0(0x129)),console[_0xe314e0(0x125)]('Did\x20you\x20mean\x20to\x20list\x20all\x20tables\x20from\x20database\x20\x27'+_0x3ac8ec[_0xe314e0(0x11d)]+'\x27?'),console['error'](_0xe314e0(0x145)+_0x3ac8ec[_0xe314e0(0x11d)]+_0xe314e0(0x11b)),console['error']('\x20\x20Or:\x20\x20tdx\x20tables\x20--in\x20'+_0x3ac8ec['table']),console['error'](_0xe314e0(0x148)+_0x3ac8ec['table']),console[_0xe314e0(0x125)](''),console[_0xe314e0(0x125)]('Note:\x20\x27'+_0x2733de[0x0]+_0xe314e0(0x128)+_0x3ac8ec[_0xe314e0(0x11d)]+_0xe314e0(0x121)),0x1;}catch(_0x5ad70f){return console[_0xe314e0(0x125)]('Error:\x20'+_0x5ad70f['message']),0x1;}else return console[_0xe314e0(0x125)]('Error:\x20Too\x20many\x20arguments.\x20Use\x20single\x20argument:'),console[_0xe314e0(0x125)](_0xe314e0(0x133)),console['error'](_0xe314e0(0x11e)),console['error'](_0xe314e0(0x13b)),console[_0xe314e0(0x125)](_0xe314e0(0x13a)),console['error'](_0xe314e0(0x149)),console[_0xe314e0(0x125)]('\x20\x20tdx\x20tables\x20--in\x20mydb\x20\x20\x20\x20\x20\x20\x20->\x20all\x20tables\x20from\x20mydb'),0x1;}const _0x190ca0=_0x5c52f8['database'];!_0x3ac8ec['database']&&_0x190ca0&&(_0x3ac8ec[_0xe314e0(0x11c)]=_0x190ca0);try{const _0x34cd4b=_0x4c95be=>_0x4c95be&&(_0x4c95be['includes']('*')||_0x4c95be[_0xe314e0(0x14b)]('?')),_0x368246=_0x34cd4b(_0x3ac8ec[_0xe314e0(0x11c)]);_0x5c52f8['verbose']&&(console[_0xe314e0(0x125)]('Site:\x20'+_0x5c52f8[_0xe314e0(0x136)]),_0x3ac8ec[_0xe314e0(0x11c)]?_0x368246?console[_0xe314e0(0x125)](_0xe314e0(0x12c)+_0x3ac8ec[_0xe314e0(0x11c)]):console[_0xe314e0(0x125)](_0xe314e0(0x12f)+_0x3ac8ec[_0xe314e0(0x11c)]):console['error']('Database:\x20all'),_0x3ac8ec['table']&&console[_0xe314e0(0x125)](_0xe314e0(0x135)+_0x3ac8ec['table']));const _0x33c435=_0x3ac8ec['database']&&!_0x368246?_0x3ac8ec[_0xe314e0(0x11c)]:undefined,_0x5ccf53=_0x368246?_0x3ac8ec[_0xe314e0(0x11c)]:undefined,_0x1e17ba=_0x3ac8ec['table'],_0x31cc17=resolveLimit(_0x5c52f8[_0xe314e0(0x130)],DEFAULT_LISTING_LIMIT),_0x1e0d8b=await withSpinner(_0xe314e0(0x11a),()=>_0xc17ec1['query']['listTables'](_0x33c435,_0x1e17ba,_0x5ccf53,_0x31cc17),{'verbose':_0x5c52f8[_0xe314e0(0x139)]}),_0x5498bd=_0x1e0d8b[_0xe314e0(0x126)];if(_0x5498bd[_0xe314e0(0x13c)]===0x0&&_0x3ac8ec[_0xe314e0(0x11c)]&&!_0x368246)return console[_0xe314e0(0x125)](_0xe314e0(0x134)),console['error'](_0xe314e0(0x123)+_0x3ac8ec[_0xe314e0(0x11c)]+_0xe314e0(0x13f)),0x1;return console['error'](_0xe314e0(0x127)+_0x5498bd[_0xe314e0(0x13c)]+_0xe314e0(0x144)+(_0x5498bd[_0xe314e0(0x13c)]!==0x1?'s':'')),await handleSDKOutput(_0x5498bd,{..._0x5c52f8,'limit':_0x31cc17}),0x0;}catch(_0x41b8a8){if(_0x41b8a8 instanceof SDKError)return console['error']('Error:\x20'+_0x41b8a8[_0xe314e0(0x14a)]),_0x41b8a8['cause']&&console[_0xe314e0(0x125)](_0xe314e0(0x12a)+_0x41b8a8[_0xe314e0(0x131)]),0x1;throw _0x41b8a8;}}[a38_0x22f37d(0x132)](_0x5c406f){return undefined;}}
@@ -1 +1 @@
1
- function a39_0x44e3(){const _0xad53cc=['Default\x20site\x20','391768TyqRRm','description','31192eHEbmR','99RPjOae','session','cleared','execute','log','engage_workspace','\x20\x20\x20\x20\x20\x20\x20tdx\x20unset\x20--default\x20<resource>\x20\x20#\x20Clear\x20default\x20from\x20config\x0a','green','460tOvhIj','Usage:\x20tdx\x20unset\x20<resource>\x0a','(session:\x20','.\x20Must\x20be\x20one\x20of:\x20','join','14182030XDEEXX','\x0aUpdated:\x20','message','Invalid\x20resource:\x20','dim','Default\x20profile\x20','site','408282TWkgai','234OcugJb','llm_project','tdx.json','profile','38365lHAYzG','length','\x0aRun\x20\x27tdx\x20unset\x20--help\x27\x20for\x20more\x20options','parent_segment','94801wLmoqx','database','validate','1730073EAFkvA','Error:\x20','default'];a39_0x44e3=function(){return _0xad53cc;};return a39_0x44e3();}function a39_0x434d(_0x5b14d2,_0x53f1c4){_0x5b14d2=_0x5b14d2-0x1bd;const _0x44e369=a39_0x44e3();let _0x434d38=_0x44e369[_0x5b14d2];return _0x434d38;}const a39_0x368370=a39_0x434d;(function(_0x284a82,_0x16766b){const _0x1e3b03=a39_0x434d,_0x4e39d8=_0x284a82();while(!![]){try{const _0x5dfc28=parseInt(_0x1e3b03(0x1c9))/0x1+-parseInt(_0x1e3b03(0x1db))/0x2+parseInt(_0x1e3b03(0x1d5))/0x3+parseInt(_0x1e3b03(0x1bd))/0x4*(parseInt(_0x1e3b03(0x1ce))/0x5)+parseInt(_0x1e3b03(0x1ca))/0x6*(-parseInt(_0x1e3b03(0x1d2))/0x7)+-parseInt(_0x1e3b03(0x1d9))/0x8*(-parseInt(_0x1e3b03(0x1dc))/0x9)+-parseInt(_0x1e3b03(0x1c2))/0xa;if(_0x5dfc28===_0x16766b)break;else _0x4e39d8['push'](_0x4e39d8['shift']());}catch(_0x508142){_0x4e39d8['push'](_0x4e39d8['shift']());}}}(a39_0x44e3,0x6c6a9));import{BaseCommand}from'./command.js';import{getSessionID,cleanExpiredSessions,clearSessionContextField}from'../core/session.js';import{clearDefaultSiteFromUserConfig,clearActiveProfileFromUserConfig}from'../core/profile.js';import{getConfigDir}from'../core/config.js';import a39_0x4994bb from'chalk';import*as a39_0x4ea621 from'node:path';export class UnsetCommand extends BaseCommand{['name']='unset';[a39_0x368370(0x1da)]='Clear\x20session-level\x20or\x20default\x20context\x20values';[a39_0x368370(0x1d4)](_0x322a73){const _0x5c3ecd=a39_0x368370,{args:_0x34e9ea,options:_0x3db713}=_0x322a73,_0x594479=_0x3db713[_0x5c3ecd(0x1d7)];if(_0x34e9ea[_0x5c3ecd(0x1cf)]===0x0)return _0x5c3ecd(0x1be)+_0x5c3ecd(0x1e2)+'\x0aResources:\x20site,\x20database,\x20parent_segment,\x20llm_project,\x20agent,\x20profile,\x20engage_workspace\x0a'+_0x5c3ecd(0x1d0);const _0x5e9dfe=_0x34e9ea[0x0],_0x2b573b=[_0x5c3ecd(0x1c8),_0x5c3ecd(0x1d3),_0x5c3ecd(0x1d1),_0x5c3ecd(0x1cb),'agent','profile',_0x5c3ecd(0x1e1)];if(!_0x2b573b['includes'](_0x5e9dfe))return _0x5c3ecd(0x1c5)+_0x5e9dfe+_0x5c3ecd(0x1c0)+_0x2b573b[_0x5c3ecd(0x1c1)](',\x20');if(_0x594479&&_0x5e9dfe!==_0x5c3ecd(0x1c8)&&_0x5e9dfe!==_0x5c3ecd(0x1cd))return'--default\x20can\x20only\x20be\x20used\x20with\x20\x27site\x27\x20or\x20\x27profile\x27.\x20Other\x20resources\x20are\x20session-level\x20only.';return undefined;}async[a39_0x368370(0x1df)](_0x2983d1){const _0x34f1b9=a39_0x368370,{args:_0x2268af,options:_0x483af0}=_0x2983d1,_0x3f0973=_0x483af0[_0x34f1b9(0x1d7)];cleanExpiredSessions();try{const _0x570edf=_0x2268af[0x0],_0x465502=a39_0x4ea621[_0x34f1b9(0x1c1)](getConfigDir(),_0x34f1b9(0x1cc));if(_0x3f0973){if(_0x570edf===_0x34f1b9(0x1c8))return clearDefaultSiteFromUserConfig(),console[_0x34f1b9(0x1e0)](_0x34f1b9(0x1d8)+a39_0x4994bb[_0x34f1b9(0x1e3)](_0x34f1b9(0x1de))),console[_0x34f1b9(0x1e0)](a39_0x4994bb[_0x34f1b9(0x1c6)](_0x34f1b9(0x1c3)+_0x465502)),0x0;if(_0x570edf===_0x34f1b9(0x1cd))return clearActiveProfileFromUserConfig(),console['log'](_0x34f1b9(0x1c7)+a39_0x4994bb[_0x34f1b9(0x1e3)](_0x34f1b9(0x1de))),console[_0x34f1b9(0x1e0)](a39_0x4994bb[_0x34f1b9(0x1c6)](_0x34f1b9(0x1c3)+_0x465502)),0x0;}const _0x374394=getSessionID(_0x483af0[_0x34f1b9(0x1dd)]),_0x48dbf0={'site':_0x34f1b9(0x1c8),'database':_0x34f1b9(0x1d3),'parent_segment':_0x34f1b9(0x1d1),'llm_project':_0x34f1b9(0x1cb),'agent':'llm_agent','profile':'profile','engage_workspace':_0x34f1b9(0x1e1)},_0x35b2a1=_0x48dbf0[_0x570edf];return _0x35b2a1&&(clearSessionContextField(_0x35b2a1,_0x483af0[_0x34f1b9(0x1dd)]),console['log']('Session\x20'+_0x570edf+'\x20'+a39_0x4994bb[_0x34f1b9(0x1e3)](_0x34f1b9(0x1de))+'\x20'+a39_0x4994bb[_0x34f1b9(0x1c6)](_0x34f1b9(0x1bf)+_0x374394+')'))),0x0;}catch(_0x4c6078){return _0x4c6078 instanceof Error&&console['error'](_0x34f1b9(0x1d6)+_0x4c6078[_0x34f1b9(0x1c4)]),0x1;}}}
1
+ const a39_0x5acfb4=a39_0x5c20;function a39_0x5547(){const _0x4a43a2=['--default\x20can\x20only\x20be\x20used\x20with\x20\x27site\x27\x20or\x20\x27profile\x27.\x20Other\x20resources\x20are\x20session-level\x20only.','session','102230ARyuMh','Default\x20profile\x20','(session:\x20','engage_workspace','default','18044aUuFre','includes','Invalid\x20resource:\x20','cleared','parent_segment','green','Default\x20site\x20','agent','description','length','446688JqWKsH','\x0aUpdated:\x20','2007GrqLEH','llm_project','Error:\x20','validate','dim','database','3431335WTTtpC','345jLRKmZ','\x0aRun\x20\x27tdx\x20unset\x20--help\x27\x20for\x20more\x20options','join','execute','\x20\x20\x20\x20\x20\x20\x20tdx\x20unset\x20--default\x20<resource>\x20\x20#\x20Clear\x20default\x20from\x20config\x0a','site','66914iKxsbQ','Clear\x20session-level\x20or\x20default\x20context\x20values','Usage:\x20tdx\x20unset\x20<resource>\x0a','log','7184xwJCZw','error','Session\x20','1205194QNIqrC','8078kcNKjE','profile'];a39_0x5547=function(){return _0x4a43a2;};return a39_0x5547();}(function(_0x1d4b91,_0xae86c6){const _0x313821=a39_0x5c20,_0x4727e0=_0x1d4b91();while(!![]){try{const _0x58ba16=parseInt(_0x313821(0x1c1))/0x1+parseInt(_0x313821(0x1c8))/0x2+parseInt(_0x313821(0x1e5))/0x3*(parseInt(_0x313821(0x1d2))/0x4)+parseInt(_0x313821(0x1e4))/0x5+-parseInt(_0x313821(0x1dc))/0x6+parseInt(_0x313821(0x1c9))/0x7*(parseInt(_0x313821(0x1c5))/0x8)+parseInt(_0x313821(0x1de))/0x9*(-parseInt(_0x313821(0x1cd))/0xa);if(_0x58ba16===_0xae86c6)break;else _0x4727e0['push'](_0x4727e0['shift']());}catch(_0xb24a1f){_0x4727e0['push'](_0x4727e0['shift']());}}}(a39_0x5547,0x87e72));import{BaseCommand}from'./command.js';import{getSessionID,cleanExpiredSessions,clearSessionContextField}from'../core/session.js';import{clearDefaultSiteFromUserConfig,clearActiveProfileFromUserConfig}from'../core/profile.js';import{getConfigDir}from'../core/config.js';import a39_0x3f101a from'chalk';import*as a39_0x1bfec1 from'node:path';function a39_0x5c20(_0x28aac5,_0x23680c){_0x28aac5=_0x28aac5-0x1bf;const _0x554727=a39_0x5547();let _0x5c20fa=_0x554727[_0x28aac5];return _0x5c20fa;}export class UnsetCommand extends BaseCommand{['name']='unset';[a39_0x5acfb4(0x1da)]=a39_0x5acfb4(0x1c2);[a39_0x5acfb4(0x1e1)](_0x43b322){const _0x2479b6=a39_0x5acfb4,{args:_0x2dbd9c,options:_0x4e3e91}=_0x43b322,_0x4b2015=_0x4e3e91[_0x2479b6(0x1d1)];if(_0x2dbd9c[_0x2479b6(0x1db)]===0x0)return _0x2479b6(0x1c3)+_0x2479b6(0x1bf)+'\x0aResources:\x20site,\x20database,\x20parent_segment,\x20llm_project,\x20agent,\x20profile,\x20engage_workspace\x0a'+_0x2479b6(0x1e6);const _0x2f6740=_0x2dbd9c[0x0],_0x3a6416=[_0x2479b6(0x1c0),_0x2479b6(0x1e3),_0x2479b6(0x1d6),'llm_project',_0x2479b6(0x1d9),_0x2479b6(0x1ca),_0x2479b6(0x1d0)];if(!_0x3a6416[_0x2479b6(0x1d3)](_0x2f6740))return _0x2479b6(0x1d4)+_0x2f6740+'.\x20Must\x20be\x20one\x20of:\x20'+_0x3a6416[_0x2479b6(0x1e7)](',\x20');if(_0x4b2015&&_0x2f6740!=='site'&&_0x2f6740!==_0x2479b6(0x1ca))return _0x2479b6(0x1cb);return undefined;}async[a39_0x5acfb4(0x1e8)](_0x1410c5){const _0x17a6eb=a39_0x5acfb4,{args:_0x71845d,options:_0x5ce54c}=_0x1410c5,_0x4ba5e9=_0x5ce54c['default'];cleanExpiredSessions();try{const _0x2f74cd=_0x71845d[0x0],_0x1a5b9c=a39_0x1bfec1[_0x17a6eb(0x1e7)](getConfigDir(),'tdx.json');if(_0x4ba5e9){if(_0x2f74cd===_0x17a6eb(0x1c0))return clearDefaultSiteFromUserConfig(),console[_0x17a6eb(0x1c4)](_0x17a6eb(0x1d8)+a39_0x3f101a['green']('cleared')),console[_0x17a6eb(0x1c4)](a39_0x3f101a[_0x17a6eb(0x1e2)](_0x17a6eb(0x1dd)+_0x1a5b9c)),0x0;if(_0x2f74cd===_0x17a6eb(0x1ca))return clearActiveProfileFromUserConfig(),console[_0x17a6eb(0x1c4)](_0x17a6eb(0x1ce)+a39_0x3f101a['green'](_0x17a6eb(0x1d5))),console['log'](a39_0x3f101a[_0x17a6eb(0x1e2)](_0x17a6eb(0x1dd)+_0x1a5b9c)),0x0;}const _0xa95e8c=getSessionID(_0x5ce54c['session']),_0x1d1130={'site':_0x17a6eb(0x1c0),'database':_0x17a6eb(0x1e3),'parent_segment':_0x17a6eb(0x1d6),'llm_project':_0x17a6eb(0x1df),'agent':'llm_agent','profile':_0x17a6eb(0x1ca),'engage_workspace':_0x17a6eb(0x1d0)},_0x346651=_0x1d1130[_0x2f74cd];return _0x346651&&(clearSessionContextField(_0x346651,_0x5ce54c[_0x17a6eb(0x1cc)]),console[_0x17a6eb(0x1c4)](_0x17a6eb(0x1c7)+_0x2f74cd+'\x20'+a39_0x3f101a[_0x17a6eb(0x1d7)](_0x17a6eb(0x1d5))+'\x20'+a39_0x3f101a[_0x17a6eb(0x1e2)](_0x17a6eb(0x1cf)+_0xa95e8c+')'))),0x0;}catch(_0x99abc0){return _0x99abc0 instanceof Error&&console[_0x17a6eb(0x1c6)](_0x17a6eb(0x1e0)+_0x99abc0['message']),0x1;}}}
@@ -1 +1 @@
1
- const a40_0x575498=a40_0xb193;(function(_0x5ed1cc,_0x241230){const _0x15ab84=a40_0xb193,_0x42ded7=_0x5ed1cc();while(!![]){try{const _0x439e2c=parseInt(_0x15ab84(0x177))/0x1*(-parseInt(_0x15ab84(0x164))/0x2)+parseInt(_0x15ab84(0x158))/0x3+-parseInt(_0x15ab84(0x19b))/0x4+-parseInt(_0x15ab84(0x169))/0x5+-parseInt(_0x15ab84(0x17d))/0x6*(-parseInt(_0x15ab84(0x192))/0x7)+-parseInt(_0x15ab84(0x185))/0x8+parseInt(_0x15ab84(0x198))/0x9*(parseInt(_0x15ab84(0x182))/0xa);if(_0x439e2c===_0x241230)break;else _0x42ded7['push'](_0x42ded7['shift']());}catch(_0xb25381){_0x42ded7['push'](_0x42ded7['shift']());}}}(a40_0x1908,0x60ae7));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 a40_0xb193(_0x555239,_0x69fcd7){_0x555239=_0x555239-0x158;const _0x19089b=a40_0x1908();let _0xb1938c=_0x19089b[_0x555239];return _0xb1938c;}import{getConfigDir,saveReleaseChannel}from'../core/config.js';function a40_0x1908(){const _0x199850=['\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20--default\x20site\x20<value>\x20\x20\x20\x20\x20#\x20Save\x20default\x20site\x20to\x20config\x0a','\x0aSaved\x20to:\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','Session\x20agent\x20set\x20to:\x20','\x0aTip:\x20Use\x20\x27tdx\x20use\x20--clear\x27\x20to\x20clear\x20session\x20overrides','\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20--default\x20profile\x20<value>\x20\x20#\x20Save\x20default\x20profile\x20to\x20config\x0a','58048jXuKJO','error','Error:\x20','\x0aUpdate\x20notifications\x20will\x20now\x20check\x20the\x20@next\x20channel.','Session\x20parent_segment\x20set\x20to:\x20','3933055KkmVtN','default','join','includes','site','\x0aRun\x20\x27tdx\x20use\x20--help\x27\x20for\x20more\x20options','execute','length','Session\x20engage_workspace\x20set\x20to:\x20','green','\x0aTip:\x20Use\x20\x27tdx\x20use\x20--default\x20profile\x20','Invalid\x20release\x20channel:\x20','engage_workspace','log','26LLpIvn','llm_project','Usage:\x20tdx\x20use\x20<resource>\x20<value>\x0a','session','Error:\x20Profile\x20\x27','\x27\x20to\x20save\x20permanently','29634qFWjGh','\x0aResources:\x20site,\x20database,\x20parent_segment,\x20llm_project,\x20agent,\x20profile,\x20engage_workspace,\x20release_channel\x0a','(session:\x20','Default\x20site\x20set\x20to:\x20','parent_segment','14671120OZuNEZ','Session\x20llm_project\x20set\x20to:\x20','validate','1890200CMLmfA','clear','Default\x20profile\x20set\x20to:\x20','.\x20Must\x20be\x20one\x20of:\x20','Session\x20profile\x20set\x20to:\x20','.\x20Must\x20be\x20\x27stable\x27\x20or\x20\x27next\x27.','profile','agent','cleared','\x27\x20does\x20not\x20exist','stable','release_channel','Use\x20--default\x20with\x20site,\x20profile,\x20or\x20release_channel\x20to\x20save\x20permanently','14ViOwor','message','\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20--default\x20release_channel\x20<stable|next>\x20\x20#\x20Set\x20release\x20channel\x0a','llm_agent','use','dim','9vjrTIC','\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20--clear\x20\x20\x20\x20\x20\x20#\x20Clear\x20session\x20context\x0a','database','290952OEXtpG','release_channel\x20requires\x20--default.\x20Usage:\x20tdx\x20use\x20--default\x20release_channel\x20<stable|next>','Release\x20channel\x20set\x20to:\x20','2307795EwsOjU','\x0aUpdate\x20notifications\x20will\x20check\x20the\x20@latest\x20(stable)\x20channel.','debug','\x0aUse\x20\x27tdx\x20profiles\x27\x20to\x20see\x20available\x20profiles','next','tdx.json'];a40_0x1908=function(){return _0x199850;};return a40_0x1908();}import a40_0x23161a from'chalk';import*as a40_0x2eb99e from'node:path';export class UseCommand extends BaseCommand{['name']=a40_0x575498(0x196);['description']='Set\x20session-level\x20context';[a40_0x575498(0x184)](_0x22e4cd){const _0x1b78e0=a40_0x575498,{args:_0x1ee308,options:_0x508c39}=_0x22e4cd,_0x1cd2be=_0x508c39[_0x1b78e0(0x16a)];if(_0x1ee308['length']===0x0)return undefined;if(_0x1ee308[_0x1b78e0(0x170)]===0x1)return _0x1b78e0(0x179)+_0x1b78e0(0x160)+_0x1b78e0(0x199)+_0x1b78e0(0x15e)+_0x1b78e0(0x163)+_0x1b78e0(0x194)+_0x1b78e0(0x17e)+_0x1b78e0(0x16e);const _0x54eae8=_0x1ee308[0x0],_0x17253c=[_0x1b78e0(0x16d),_0x1b78e0(0x19a),'parent_segment',_0x1b78e0(0x178),_0x1b78e0(0x18c),'profile',_0x1b78e0(0x175),_0x1b78e0(0x190)];if(!_0x17253c[_0x1b78e0(0x16c)](_0x54eae8))return'Invalid\x20resource:\x20'+_0x54eae8+_0x1b78e0(0x188)+_0x17253c[_0x1b78e0(0x16b)](',\x20');if(_0x1cd2be&&_0x54eae8!==_0x1b78e0(0x16d)&&_0x54eae8!==_0x1b78e0(0x18b)&&_0x54eae8!==_0x1b78e0(0x190))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(_0x54eae8===_0x1b78e0(0x190)&&!_0x1cd2be)return _0x1b78e0(0x19c);if(_0x54eae8===_0x1b78e0(0x190)){const _0x32759e=_0x1ee308[0x1];if(_0x32759e!==_0x1b78e0(0x18f)&&_0x32759e!==_0x1b78e0(0x15c))return _0x1b78e0(0x174)+_0x32759e+_0x1b78e0(0x18a);}return undefined;}async[a40_0x575498(0x16f)](_0x22c654){const _0x1fedcd=a40_0x575498,{args:_0x342dec,options:_0x5cedc0}=_0x22c654,_0x4e2a7c=_0x5cedc0[_0x1fedcd(0x15a)],_0x564f92=_0x5cedc0[_0x1fedcd(0x186)],_0x2802c9=_0x5cedc0[_0x1fedcd(0x16a)];cleanExpiredSessions();try{if(_0x564f92){clearSessionContext(_0x5cedc0[_0x1fedcd(0x17a)]);const _0x578129=getSessionID(_0x5cedc0['session']);return console['log']('Session\x20context\x20'+a40_0x23161a[_0x1fedcd(0x172)](_0x1fedcd(0x18d))+'\x20'+a40_0x23161a[_0x1fedcd(0x197)](_0x1fedcd(0x17f)+_0x578129+')')),0x0;}if(_0x342dec[_0x1fedcd(0x170)]===0x0){const _0x5aed9e=new GlobalContext(_0x5cedc0);return _0x4e2a7c?_0x5aed9e['displayWithSources']():_0x5aed9e['display'](),console[_0x1fedcd(0x176)](a40_0x23161a[_0x1fedcd(0x197)]('\x0aSet\x20context:\x20tdx\x20use\x20<resource>\x20<value>')),console[_0x1fedcd(0x176)](a40_0x23161a[_0x1fedcd(0x197)]('Resources:\x20site,\x20database,\x20parent_segment,\x20llm_project,\x20agent,\x20profile,\x20engage_workspace,\x20release_channel')),console[_0x1fedcd(0x176)](a40_0x23161a[_0x1fedcd(0x197)](_0x1fedcd(0x191))),0x0;}const _0x3cd0c5=_0x342dec[0x0],_0xbc5a7f=_0x342dec[0x1],_0x3ad7b8=a40_0x2eb99e['join'](getConfigDir(),_0x1fedcd(0x15d));if(_0x2802c9){if(_0x3cd0c5==='site')return saveDefaultSiteToUserConfig(_0xbc5a7f),console[_0x1fedcd(0x176)](_0x1fedcd(0x180)+a40_0x23161a[_0x1fedcd(0x172)](_0xbc5a7f)),console[_0x1fedcd(0x176)](a40_0x23161a[_0x1fedcd(0x197)](_0x1fedcd(0x15f)+_0x3ad7b8)),0x0;if(_0x3cd0c5===_0x1fedcd(0x18b)){if(!profileExists(_0xbc5a7f))return console[_0x1fedcd(0x165)]('Error:\x20Profile\x20\x27'+_0xbc5a7f+_0x1fedcd(0x18e)),console['error']('\x0aUse\x20\x27tdx\x20profiles\x27\x20to\x20see\x20available\x20profiles'),0x1;return saveActiveProfileToUserConfig(_0xbc5a7f),console[_0x1fedcd(0x176)](_0x1fedcd(0x187)+a40_0x23161a[_0x1fedcd(0x172)](_0xbc5a7f)),console[_0x1fedcd(0x176)](a40_0x23161a[_0x1fedcd(0x197)](_0x1fedcd(0x15f)+_0x3ad7b8)),0x0;}if(_0x3cd0c5===_0x1fedcd(0x190))return saveReleaseChannel(_0xbc5a7f),console[_0x1fedcd(0x176)](_0x1fedcd(0x19d)+a40_0x23161a[_0x1fedcd(0x172)](_0xbc5a7f)),console[_0x1fedcd(0x176)](a40_0x23161a[_0x1fedcd(0x197)]('\x0aSaved\x20to:\x20'+_0x3ad7b8)),_0xbc5a7f==='next'?(console[_0x1fedcd(0x176)](a40_0x23161a[_0x1fedcd(0x197)](_0x1fedcd(0x167))),console['log'](a40_0x23161a[_0x1fedcd(0x197)]('Install\x20the\x20latest\x20next\x20version:\x20npm\x20install\x20-g\x20@treasuredata/tdx@next'))):console['log'](a40_0x23161a['dim'](_0x1fedcd(0x159))),0x0;}if(_0x3cd0c5===_0x1fedcd(0x16d)){const _0x20a86f=getSessionID(_0x5cedc0['session']);return saveSessionContext({'site':_0xbc5a7f},_0x5cedc0['session']),console[_0x1fedcd(0x176)]('Session\x20site\x20set\x20to:\x20'+a40_0x23161a['green'](_0xbc5a7f)+'\x20'+a40_0x23161a[_0x1fedcd(0x197)](_0x1fedcd(0x17f)+_0x20a86f+')')),console[_0x1fedcd(0x176)](a40_0x23161a[_0x1fedcd(0x197)]('\x0aTip:\x20Use\x20\x27tdx\x20use\x20--default\x20site\x20'+_0xbc5a7f+_0x1fedcd(0x17c))),0x0;}if(_0x3cd0c5===_0x1fedcd(0x18b)){if(!profileExists(_0xbc5a7f))return console[_0x1fedcd(0x165)](_0x1fedcd(0x17b)+_0xbc5a7f+_0x1fedcd(0x18e)),console['error'](_0x1fedcd(0x15b)),0x1;const _0x1b400b=getSessionID(_0x5cedc0[_0x1fedcd(0x17a)]);return saveSessionContext({'profile':_0xbc5a7f},_0x5cedc0[_0x1fedcd(0x17a)]),console[_0x1fedcd(0x176)](_0x1fedcd(0x189)+a40_0x23161a[_0x1fedcd(0x172)](_0xbc5a7f)+'\x20'+a40_0x23161a['dim'](_0x1fedcd(0x17f)+_0x1b400b+')')),console[_0x1fedcd(0x176)](a40_0x23161a[_0x1fedcd(0x197)](_0x1fedcd(0x173)+_0xbc5a7f+_0x1fedcd(0x17c))),0x0;}const _0x2ea823={},_0x433c6=getSessionID(_0x5cedc0['session']);switch(_0x3cd0c5){case _0x1fedcd(0x19a):_0x2ea823[_0x1fedcd(0x19a)]=_0xbc5a7f,console[_0x1fedcd(0x176)]('Session\x20database\x20set\x20to:\x20'+a40_0x23161a[_0x1fedcd(0x172)](_0xbc5a7f)+'\x20'+a40_0x23161a[_0x1fedcd(0x197)](_0x1fedcd(0x17f)+_0x433c6+')'));break;case _0x1fedcd(0x181):_0x2ea823[_0x1fedcd(0x181)]=_0xbc5a7f,console[_0x1fedcd(0x176)](_0x1fedcd(0x168)+a40_0x23161a['green'](_0xbc5a7f)+'\x20'+a40_0x23161a[_0x1fedcd(0x197)](_0x1fedcd(0x17f)+_0x433c6+')'));break;case _0x1fedcd(0x178):_0x2ea823[_0x1fedcd(0x178)]=_0xbc5a7f,console[_0x1fedcd(0x176)](_0x1fedcd(0x183)+a40_0x23161a['green'](_0xbc5a7f)+'\x20'+a40_0x23161a[_0x1fedcd(0x197)]('(session:\x20'+_0x433c6+')'));break;case'agent':{const {projectName:_0x59021b,agentName:_0x25bfbe}=parseAgentRef(_0xbc5a7f);_0x25bfbe?(_0x2ea823[_0x1fedcd(0x178)]=_0x59021b,_0x2ea823[_0x1fedcd(0x195)]=_0x25bfbe,console[_0x1fedcd(0x176)](_0x1fedcd(0x183)+a40_0x23161a['green'](_0x59021b)+'\x20'+a40_0x23161a['dim']('(session:\x20'+_0x433c6+')')),console[_0x1fedcd(0x176)](_0x1fedcd(0x161)+a40_0x23161a['green'](_0x25bfbe)+'\x20'+a40_0x23161a['dim'](_0x1fedcd(0x17f)+_0x433c6+')'))):(_0x2ea823[_0x1fedcd(0x195)]=_0xbc5a7f,console[_0x1fedcd(0x176)]('Session\x20agent\x20set\x20to:\x20'+a40_0x23161a['green'](_0xbc5a7f)+'\x20'+a40_0x23161a[_0x1fedcd(0x197)](_0x1fedcd(0x17f)+_0x433c6+')')));break;}case _0x1fedcd(0x175):_0x2ea823[_0x1fedcd(0x175)]=_0xbc5a7f,console['log'](_0x1fedcd(0x171)+a40_0x23161a[_0x1fedcd(0x172)](_0xbc5a7f)+'\x20'+a40_0x23161a[_0x1fedcd(0x197)](_0x1fedcd(0x17f)+_0x433c6+')'));break;}return saveSessionContext(_0x2ea823,_0x5cedc0[_0x1fedcd(0x17a)]),console[_0x1fedcd(0x176)](a40_0x23161a[_0x1fedcd(0x197)](_0x1fedcd(0x162))),0x0;}catch(_0x21fe45){return _0x21fe45 instanceof Error&&console[_0x1fedcd(0x165)](_0x1fedcd(0x166)+_0x21fe45[_0x1fedcd(0x193)]),0x1;}}}
1
+ const a40_0x6396fd=a40_0x19b9;(function(_0x233f22,_0x55c8e1){const _0x9ca376=a40_0x19b9,_0x2beed1=_0x233f22();while(!![]){try{const _0x3e00f4=parseInt(_0x9ca376(0x1ec))/0x1*(-parseInt(_0x9ca376(0x1d4))/0x2)+parseInt(_0x9ca376(0x1ee))/0x3*(-parseInt(_0x9ca376(0x1f2))/0x4)+parseInt(_0x9ca376(0x1d8))/0x5+-parseInt(_0x9ca376(0x1f4))/0x6+-parseInt(_0x9ca376(0x1dc))/0x7*(-parseInt(_0x9ca376(0x1d9))/0x8)+-parseInt(_0x9ca376(0x1b6))/0x9*(-parseInt(_0x9ca376(0x1c3))/0xa)+parseInt(_0x9ca376(0x1f3))/0xb;if(_0x3e00f4===_0x55c8e1)break;else _0x2beed1['push'](_0x2beed1['shift']());}catch(_0x2e1b31){_0x2beed1['push'](_0x2beed1['shift']());}}}(a40_0x51e8,0x565a0));function a40_0x51e8(){const _0x49cb6e=['27SSlTuG','\x0aSaved\x20to:\x20','\x0aUpdate\x20notifications\x20will\x20now\x20check\x20the\x20@next\x20channel.','\x0aUse\x20\x27tdx\x20profiles\x27\x20to\x20see\x20available\x20profiles','\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20--default\x20profile\x20<value>\x20\x20#\x20Save\x20default\x20profile\x20to\x20config\x0a','message','dim','\x27\x20to\x20save\x20permanently','next','Error:\x20Profile\x20\x27','\x0aTip:\x20Use\x20\x27tdx\x20use\x20--default\x20site\x20','Session\x20database\x20set\x20to:\x20','llm_agent','2268980CXcpIe','--default\x20can\x20only\x20be\x20used\x20with\x20\x27site\x27,\x20\x27profile\x27,\x20or\x20\x27release_channel\x27.\x20Other\x20resources\x20are\x20session-level\x20only.','.\x20Must\x20be\x20\x27stable\x27\x20or\x20\x27next\x27.','Release\x20channel\x20set\x20to:\x20','Resources:\x20site,\x20database,\x20parent_segment,\x20llm_project,\x20agent,\x20profile,\x20engage_workspace,\x20release_channel','display','release_channel','\x0aUpdate\x20notifications\x20will\x20check\x20the\x20@latest\x20(stable)\x20channel.','validate','execute','profile','stable','name','engage_workspace','join','\x0aResources:\x20site,\x20database,\x20parent_segment,\x20llm_project,\x20agent,\x20profile,\x20engage_workspace,\x20release_channel\x0a','error','831958hyHkiM','Session\x20parent_segment\x20set\x20to:\x20','Default\x20profile\x20set\x20to:\x20','\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20--clear\x20\x20\x20\x20\x20\x20#\x20Clear\x20session\x20context\x0a','3449345INzRJb','208GuqOoA','Error:\x20','length','69902lQhBKJ','(session:\x20','\x0aRun\x20\x27tdx\x20use\x20--help\x27\x20for\x20more\x20options','\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20--default\x20release_channel\x20<stable|next>\x20\x20#\x20Set\x20release\x20channel\x0a','Default\x20site\x20set\x20to:\x20','parent_segment','database','green','agent','release_channel\x20requires\x20--default.\x20Usage:\x20tdx\x20use\x20--default\x20release_channel\x20<stable|next>','Set\x20session-level\x20context','default','Session\x20agent\x20set\x20to:\x20','description','displayWithSources','Usage:\x20tdx\x20use\x20<resource>\x20<value>\x0a','1gMozPg','cleared','57SJeoRi','Session\x20context\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','use','76740TlYnSy','566709lfECqJ','3285168gONROx','tdx.json','\x0aSet\x20context:\x20tdx\x20use\x20<resource>\x20<value>','session','site','log','clear','\x27\x20does\x20not\x20exist','llm_project'];a40_0x51e8=function(){return _0x49cb6e;};return a40_0x51e8();}import{BaseCommand}from'./command.js';function a40_0x19b9(_0xfa0561,_0xd85732){_0xfa0561=_0xfa0561-0x1ae;const _0x51e884=a40_0x51e8();let _0x19b9c6=_0x51e884[_0xfa0561];return _0x19b9c6;}import{saveSessionContext,getSessionID,cleanExpiredSessions,clearSessionContext}from'../core/session.js';import{profileExists,saveActiveProfileToUserConfig,saveDefaultSiteToUserConfig}from'../core/profile.js';import{GlobalContext}from'../core/global-context.js';import{parseAgentRef}from'../sdk/agent/agent-ref-parser.js';import{getConfigDir,saveReleaseChannel}from'../core/config.js';import a40_0x413b27 from'chalk';import*as a40_0x5e6dc3 from'node:path';export class UseCommand extends BaseCommand{[a40_0x6396fd(0x1cf)]=a40_0x6396fd(0x1f1);[a40_0x6396fd(0x1e9)]=a40_0x6396fd(0x1e6);[a40_0x6396fd(0x1cb)](_0x53bf3d){const _0x4fdb1c=a40_0x6396fd,{args:_0x2bc87c,options:_0x2c77df}=_0x53bf3d,_0x2ec616=_0x2c77df[_0x4fdb1c(0x1e7)];if(_0x2bc87c[_0x4fdb1c(0x1db)]===0x0)return undefined;if(_0x2bc87c[_0x4fdb1c(0x1db)]===0x1)return _0x4fdb1c(0x1eb)+'\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'+_0x4fdb1c(0x1d7)+_0x4fdb1c(0x1f0)+_0x4fdb1c(0x1ba)+_0x4fdb1c(0x1df)+_0x4fdb1c(0x1d2)+_0x4fdb1c(0x1de);const _0x2f9e2e=_0x2bc87c[0x0],_0x5a82b3=[_0x4fdb1c(0x1b1),_0x4fdb1c(0x1e2),_0x4fdb1c(0x1e1),'llm_project',_0x4fdb1c(0x1e4),_0x4fdb1c(0x1cd),_0x4fdb1c(0x1d0),_0x4fdb1c(0x1c9)];if(!_0x5a82b3['includes'](_0x2f9e2e))return'Invalid\x20resource:\x20'+_0x2f9e2e+'.\x20Must\x20be\x20one\x20of:\x20'+_0x5a82b3[_0x4fdb1c(0x1d1)](',\x20');if(_0x2ec616&&_0x2f9e2e!==_0x4fdb1c(0x1b1)&&_0x2f9e2e!==_0x4fdb1c(0x1cd)&&_0x2f9e2e!=='release_channel')return _0x4fdb1c(0x1c4);if(_0x2f9e2e===_0x4fdb1c(0x1c9)&&!_0x2ec616)return _0x4fdb1c(0x1e5);if(_0x2f9e2e===_0x4fdb1c(0x1c9)){const _0x588952=_0x2bc87c[0x1];if(_0x588952!==_0x4fdb1c(0x1ce)&&_0x588952!==_0x4fdb1c(0x1be))return'Invalid\x20release\x20channel:\x20'+_0x588952+_0x4fdb1c(0x1c5);}return undefined;}async[a40_0x6396fd(0x1cc)](_0x44e73f){const _0x3e1f7b=a40_0x6396fd,{args:_0x4be927,options:_0x14ea02}=_0x44e73f,_0x1f16f6=_0x14ea02['debug'],_0x139842=_0x14ea02[_0x3e1f7b(0x1b3)],_0x46c459=_0x14ea02[_0x3e1f7b(0x1e7)];cleanExpiredSessions();try{if(_0x139842){clearSessionContext(_0x14ea02['session']);const _0x5d2708=getSessionID(_0x14ea02['session']);return console[_0x3e1f7b(0x1b2)](_0x3e1f7b(0x1ef)+a40_0x413b27[_0x3e1f7b(0x1e3)](_0x3e1f7b(0x1ed))+'\x20'+a40_0x413b27['dim'](_0x3e1f7b(0x1dd)+_0x5d2708+')')),0x0;}if(_0x4be927[_0x3e1f7b(0x1db)]===0x0){const _0x2668cf=new GlobalContext(_0x14ea02);return _0x1f16f6?_0x2668cf[_0x3e1f7b(0x1ea)]():_0x2668cf[_0x3e1f7b(0x1c8)](),console['log'](a40_0x413b27[_0x3e1f7b(0x1bc)](_0x3e1f7b(0x1af))),console[_0x3e1f7b(0x1b2)](a40_0x413b27[_0x3e1f7b(0x1bc)](_0x3e1f7b(0x1c7))),console[_0x3e1f7b(0x1b2)](a40_0x413b27['dim']('Use\x20--default\x20with\x20site,\x20profile,\x20or\x20release_channel\x20to\x20save\x20permanently')),0x0;}const _0x118c1f=_0x4be927[0x0],_0x3df74e=_0x4be927[0x1],_0x34a9a0=a40_0x5e6dc3[_0x3e1f7b(0x1d1)](getConfigDir(),_0x3e1f7b(0x1ae));if(_0x46c459){if(_0x118c1f===_0x3e1f7b(0x1b1))return saveDefaultSiteToUserConfig(_0x3df74e),console['log'](_0x3e1f7b(0x1e0)+a40_0x413b27[_0x3e1f7b(0x1e3)](_0x3df74e)),console['log'](a40_0x413b27[_0x3e1f7b(0x1bc)]('\x0aSaved\x20to:\x20'+_0x34a9a0)),0x0;if(_0x118c1f===_0x3e1f7b(0x1cd)){if(!profileExists(_0x3df74e))return console[_0x3e1f7b(0x1d3)](_0x3e1f7b(0x1bf)+_0x3df74e+_0x3e1f7b(0x1b4)),console[_0x3e1f7b(0x1d3)](_0x3e1f7b(0x1b9)),0x1;return saveActiveProfileToUserConfig(_0x3df74e),console[_0x3e1f7b(0x1b2)](_0x3e1f7b(0x1d6)+a40_0x413b27[_0x3e1f7b(0x1e3)](_0x3df74e)),console[_0x3e1f7b(0x1b2)](a40_0x413b27[_0x3e1f7b(0x1bc)](_0x3e1f7b(0x1b7)+_0x34a9a0)),0x0;}if(_0x118c1f===_0x3e1f7b(0x1c9))return saveReleaseChannel(_0x3df74e),console[_0x3e1f7b(0x1b2)](_0x3e1f7b(0x1c6)+a40_0x413b27[_0x3e1f7b(0x1e3)](_0x3df74e)),console[_0x3e1f7b(0x1b2)](a40_0x413b27[_0x3e1f7b(0x1bc)](_0x3e1f7b(0x1b7)+_0x34a9a0)),_0x3df74e==='next'?(console['log'](a40_0x413b27[_0x3e1f7b(0x1bc)](_0x3e1f7b(0x1b8))),console[_0x3e1f7b(0x1b2)](a40_0x413b27['dim']('Install\x20the\x20latest\x20next\x20version:\x20npm\x20install\x20-g\x20@treasuredata/tdx@next'))):console[_0x3e1f7b(0x1b2)](a40_0x413b27[_0x3e1f7b(0x1bc)](_0x3e1f7b(0x1ca))),0x0;}if(_0x118c1f===_0x3e1f7b(0x1b1)){const _0x466b33=getSessionID(_0x14ea02[_0x3e1f7b(0x1b0)]);return saveSessionContext({'site':_0x3df74e},_0x14ea02[_0x3e1f7b(0x1b0)]),console[_0x3e1f7b(0x1b2)]('Session\x20site\x20set\x20to:\x20'+a40_0x413b27['green'](_0x3df74e)+'\x20'+a40_0x413b27[_0x3e1f7b(0x1bc)](_0x3e1f7b(0x1dd)+_0x466b33+')')),console[_0x3e1f7b(0x1b2)](a40_0x413b27[_0x3e1f7b(0x1bc)](_0x3e1f7b(0x1c0)+_0x3df74e+_0x3e1f7b(0x1bd))),0x0;}if(_0x118c1f==='profile'){if(!profileExists(_0x3df74e))return console['error'](_0x3e1f7b(0x1bf)+_0x3df74e+_0x3e1f7b(0x1b4)),console['error']('\x0aUse\x20\x27tdx\x20profiles\x27\x20to\x20see\x20available\x20profiles'),0x1;const _0x320fe9=getSessionID(_0x14ea02['session']);return saveSessionContext({'profile':_0x3df74e},_0x14ea02[_0x3e1f7b(0x1b0)]),console[_0x3e1f7b(0x1b2)]('Session\x20profile\x20set\x20to:\x20'+a40_0x413b27[_0x3e1f7b(0x1e3)](_0x3df74e)+'\x20'+a40_0x413b27[_0x3e1f7b(0x1bc)](_0x3e1f7b(0x1dd)+_0x320fe9+')')),console['log'](a40_0x413b27[_0x3e1f7b(0x1bc)]('\x0aTip:\x20Use\x20\x27tdx\x20use\x20--default\x20profile\x20'+_0x3df74e+_0x3e1f7b(0x1bd))),0x0;}const _0x2ee40e={},_0x104405=getSessionID(_0x14ea02[_0x3e1f7b(0x1b0)]);switch(_0x118c1f){case _0x3e1f7b(0x1e2):_0x2ee40e[_0x3e1f7b(0x1e2)]=_0x3df74e,console[_0x3e1f7b(0x1b2)](_0x3e1f7b(0x1c1)+a40_0x413b27[_0x3e1f7b(0x1e3)](_0x3df74e)+'\x20'+a40_0x413b27[_0x3e1f7b(0x1bc)]('(session:\x20'+_0x104405+')'));break;case _0x3e1f7b(0x1e1):_0x2ee40e[_0x3e1f7b(0x1e1)]=_0x3df74e,console[_0x3e1f7b(0x1b2)](_0x3e1f7b(0x1d5)+a40_0x413b27[_0x3e1f7b(0x1e3)](_0x3df74e)+'\x20'+a40_0x413b27[_0x3e1f7b(0x1bc)]('(session:\x20'+_0x104405+')'));break;case'llm_project':_0x2ee40e['llm_project']=_0x3df74e,console[_0x3e1f7b(0x1b2)]('Session\x20llm_project\x20set\x20to:\x20'+a40_0x413b27['green'](_0x3df74e)+'\x20'+a40_0x413b27['dim']('(session:\x20'+_0x104405+')'));break;case'agent':{const {projectName:_0x149652,agentName:_0x3648e2}=parseAgentRef(_0x3df74e);_0x3648e2?(_0x2ee40e[_0x3e1f7b(0x1b5)]=_0x149652,_0x2ee40e[_0x3e1f7b(0x1c2)]=_0x3648e2,console[_0x3e1f7b(0x1b2)]('Session\x20llm_project\x20set\x20to:\x20'+a40_0x413b27[_0x3e1f7b(0x1e3)](_0x149652)+'\x20'+a40_0x413b27['dim'](_0x3e1f7b(0x1dd)+_0x104405+')')),console[_0x3e1f7b(0x1b2)](_0x3e1f7b(0x1e8)+a40_0x413b27[_0x3e1f7b(0x1e3)](_0x3648e2)+'\x20'+a40_0x413b27[_0x3e1f7b(0x1bc)](_0x3e1f7b(0x1dd)+_0x104405+')'))):(_0x2ee40e[_0x3e1f7b(0x1c2)]=_0x3df74e,console[_0x3e1f7b(0x1b2)]('Session\x20agent\x20set\x20to:\x20'+a40_0x413b27[_0x3e1f7b(0x1e3)](_0x3df74e)+'\x20'+a40_0x413b27[_0x3e1f7b(0x1bc)]('(session:\x20'+_0x104405+')')));break;}case _0x3e1f7b(0x1d0):_0x2ee40e['engage_workspace']=_0x3df74e,console[_0x3e1f7b(0x1b2)]('Session\x20engage_workspace\x20set\x20to:\x20'+a40_0x413b27[_0x3e1f7b(0x1e3)](_0x3df74e)+'\x20'+a40_0x413b27[_0x3e1f7b(0x1bc)](_0x3e1f7b(0x1dd)+_0x104405+')'));break;}return saveSessionContext(_0x2ee40e,_0x14ea02[_0x3e1f7b(0x1b0)]),console[_0x3e1f7b(0x1b2)](a40_0x413b27[_0x3e1f7b(0x1bc)]('\x0aTip:\x20Use\x20\x27tdx\x20use\x20--clear\x27\x20to\x20clear\x20session\x20overrides')),0x0;}catch(_0x1742d9){return _0x1742d9 instanceof Error&&console[_0x3e1f7b(0x1d3)](_0x3e1f7b(0x1da)+_0x1742d9[_0x3e1f7b(0x1bb)]),0x1;}}}
@@ -1 +1 @@
1
- const a41_0x3f2c12=a41_0x568e;(function(_0xa92bd5,_0x4bfc9e){const _0x576a2e=a41_0x568e,_0x115a2c=_0xa92bd5();while(!![]){try{const _0x12fcef=-parseInt(_0x576a2e(0x183))/0x1+parseInt(_0x576a2e(0x190))/0x2*(-parseInt(_0x576a2e(0x188))/0x3)+-parseInt(_0x576a2e(0x19b))/0x4*(parseInt(_0x576a2e(0x185))/0x5)+parseInt(_0x576a2e(0x186))/0x6*(parseInt(_0x576a2e(0x187))/0x7)+-parseInt(_0x576a2e(0x195))/0x8+parseInt(_0x576a2e(0x18f))/0x9*(parseInt(_0x576a2e(0x19c))/0xa)+parseInt(_0x576a2e(0x196))/0xb*(parseInt(_0x576a2e(0x197))/0xc);if(_0x12fcef===_0x4bfc9e)break;else _0x115a2c['push'](_0x115a2c['shift']());}catch(_0x1fe49c){_0x115a2c['push'](_0x115a2c['shift']());}}}(a41_0x3ddf,0x51d54));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';function a41_0x3ddf(){const _0x39219c=['length','400EtikjF','3210NNdjLt','5635kZpjqr','12QCkLbJ','Listing\x20users...','user','list','execute','message','List\x20all\x20users\x20in\x20the\x20account','135hIwbex','295102GFUwwx','\x20\x20Cause:\x20','error','✔\x20Found\x20','Fetching\x20user\x20info...','398288CntLvl','16018926eRqGrf','12MzbKnr','Error:\x20','user\x20list','cause','29708QhxtRM','71710JpJyZX','data','\x20user','Show\x20current\x20user\x20information','description','425168cRaAyV'];a41_0x3ddf=function(){return _0x39219c;};return a41_0x3ddf();}import{handleSDKOutput,handleSingleObjectOutput}from'../core/command-output.js';import{withSpinner}from'../utils/spinner.js';export class UserCommand extends BaseCommand{['name']=a41_0x3f2c12(0x18a);[a41_0x3f2c12(0x182)]=a41_0x3f2c12(0x19f);async[a41_0x3f2c12(0x18c)](_0x1ea255){const _0x46c35b=a41_0x3f2c12,{options:_0x305cdc,tdx:_0xbcd4e}=_0x1ea255;try{const _0x45a3b4=await withSpinner(_0x46c35b(0x194),()=>_0xbcd4e['user']['getCurrent'](),{'verbose':_0x305cdc['verbose']}),_0xb2b1d7=_0x45a3b4[_0x46c35b(0x19d)];return await handleSingleObjectOutput(_0xb2b1d7,_0x305cdc),0x0;}catch(_0x58ca74){if(_0x58ca74 instanceof SDKError)return console[_0x46c35b(0x192)]('Error:\x20'+_0x58ca74['message']),_0x58ca74[_0x46c35b(0x19a)]&&console[_0x46c35b(0x192)]('\x20\x20Cause:\x20'+_0x58ca74[_0x46c35b(0x19a)]),0x1;throw _0x58ca74;}}}function a41_0x568e(_0x1d60a7,_0x18bfdb){_0x1d60a7=_0x1d60a7-0x182;const _0x3ddfa7=a41_0x3ddf();let _0x568e20=_0x3ddfa7[_0x1d60a7];return _0x568e20;}export class UserListCommand extends BaseCommand{['name']=a41_0x3f2c12(0x199);['description']=a41_0x3f2c12(0x18e);async[a41_0x3f2c12(0x18c)](_0x5edd33){const _0x40a1a6=a41_0x3f2c12,{options:_0x40384f,tdx:_0x13ab88}=_0x5edd33;try{const _0x456cca=await withSpinner(_0x40a1a6(0x189),()=>_0x13ab88['user'][_0x40a1a6(0x18b)](),{'verbose':_0x40384f['verbose']}),_0xcb9516=_0x456cca['data'];return console[_0x40a1a6(0x192)](_0x40a1a6(0x193)+_0xcb9516[_0x40a1a6(0x184)]+_0x40a1a6(0x19e)+(_0xcb9516[_0x40a1a6(0x184)]!==0x1?'s':'')),await handleSDKOutput(_0xcb9516,_0x40384f),0x0;}catch(_0x19ef3c){if(_0x19ef3c instanceof SDKError)return console[_0x40a1a6(0x192)](_0x40a1a6(0x198)+_0x19ef3c[_0x40a1a6(0x18d)]),_0x19ef3c[_0x40a1a6(0x19a)]&&console[_0x40a1a6(0x192)](_0x40a1a6(0x191)+_0x19ef3c[_0x40a1a6(0x19a)]),0x1;throw _0x19ef3c;}}}
1
+ const a41_0x46e43c=a41_0x2bed;(function(_0x165c0a,_0x32fc3e){const _0x120bfe=a41_0x2bed,_0x53261a=_0x165c0a();while(!![]){try{const _0x4e89ff=parseInt(_0x120bfe(0x110))/0x1+parseInt(_0x120bfe(0x10c))/0x2+parseInt(_0x120bfe(0x10b))/0x3+parseInt(_0x120bfe(0x116))/0x4+parseInt(_0x120bfe(0x114))/0x5+parseInt(_0x120bfe(0x115))/0x6+parseInt(_0x120bfe(0x10d))/0x7*(-parseInt(_0x120bfe(0x11a))/0x8);if(_0x4e89ff===_0x32fc3e)break;else _0x53261a['push'](_0x53261a['shift']());}catch(_0x3486f0){_0x53261a['push'](_0x53261a['shift']());}}}(a41_0x1665,0xa80a2));function a41_0x1665(){const _0xcc889=['253220dtGcRP','112567IZWBTf','Show\x20current\x20user\x20information','message','488739UzVDOI','✔\x20Found\x20','Listing\x20users...','length','1100600jkzXzV','2152206OWYdnJ','3948936zihhTv','data','name','cause','880zkcNek','description','verbose','\x20user','Error:\x20','execute','error','\x20\x20Cause:\x20','user','user\x20list','827388CBXbxu'];a41_0x1665=function(){return _0xcc889;};return a41_0x1665();}import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';function a41_0x2bed(_0x2f6945,_0x17213a){_0x2f6945=_0x2f6945-0x10a;const _0x1665ca=a41_0x1665();let _0x2bed88=_0x1665ca[_0x2f6945];return _0x2bed88;}import{handleSDKOutput,handleSingleObjectOutput}from'../core/command-output.js';import{withSpinner}from'../utils/spinner.js';export class UserCommand extends BaseCommand{[a41_0x46e43c(0x118)]=a41_0x46e43c(0x122);['description']=a41_0x46e43c(0x10e);async[a41_0x46e43c(0x11f)](_0x63c954){const _0x51b015=a41_0x46e43c,{options:_0x3ceca0,tdx:_0x1153a6}=_0x63c954;try{const _0xc4f5d=await withSpinner('Fetching\x20user\x20info...',()=>_0x1153a6[_0x51b015(0x122)]['getCurrent'](),{'verbose':_0x3ceca0[_0x51b015(0x11c)]}),_0x32c7a3=_0xc4f5d[_0x51b015(0x117)];return await handleSingleObjectOutput(_0x32c7a3,_0x3ceca0),0x0;}catch(_0x293960){if(_0x293960 instanceof SDKError)return console['error']('Error:\x20'+_0x293960[_0x51b015(0x10f)]),_0x293960[_0x51b015(0x119)]&&console['error'](_0x51b015(0x121)+_0x293960[_0x51b015(0x119)]),0x1;throw _0x293960;}}}export class UserListCommand extends BaseCommand{[a41_0x46e43c(0x118)]=a41_0x46e43c(0x10a);[a41_0x46e43c(0x11b)]='List\x20all\x20users\x20in\x20the\x20account';async[a41_0x46e43c(0x11f)](_0x4570da){const _0x316857=a41_0x46e43c,{options:_0x2bfbd0,tdx:_0x5ade46}=_0x4570da;try{const _0x3c646c=await withSpinner(_0x316857(0x112),()=>_0x5ade46[_0x316857(0x122)]['list'](),{'verbose':_0x2bfbd0['verbose']}),_0xa9c3b5=_0x3c646c[_0x316857(0x117)];return console[_0x316857(0x120)](_0x316857(0x111)+_0xa9c3b5[_0x316857(0x113)]+_0x316857(0x11d)+(_0xa9c3b5['length']!==0x1?'s':'')),await handleSDKOutput(_0xa9c3b5,_0x2bfbd0),0x0;}catch(_0x556162){if(_0x556162 instanceof SDKError)return console['error'](_0x316857(0x11e)+_0x556162['message']),_0x556162[_0x316857(0x119)]&&console[_0x316857(0x120)](_0x316857(0x121)+_0x556162[_0x316857(0x119)]),0x1;throw _0x556162;}}}