@treasuredata/tdx 0.1.18 → 0.1.19

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 (111) hide show
  1. package/dist/cli.js +1 -1
  2. package/dist/cli.js.map +1 -1
  3. package/dist/client/cdp-client.js +1 -1
  4. package/dist/client/http-client.js +1 -1
  5. package/dist/client/llm-client.d.ts +2 -2
  6. package/dist/client/llm-client.d.ts.map +1 -1
  7. package/dist/client/llm-client.js +1 -1
  8. package/dist/client/rate-limiter.js +1 -1
  9. package/dist/client/td-client.js +1 -1
  10. package/dist/client/trino-client.js +1 -1
  11. package/dist/client/workflow-client.js +1 -1
  12. package/dist/commands/activations.js +1 -1
  13. package/dist/commands/api-command.js +1 -1
  14. package/dist/commands/chat-command.js +1 -1
  15. package/dist/commands/chat-command.js.map +1 -1
  16. package/dist/commands/claude-command.d.ts.map +1 -1
  17. package/dist/commands/claude-command.js +1 -1
  18. package/dist/commands/claude-command.js.map +1 -1
  19. package/dist/commands/command.js +1 -1
  20. package/dist/commands/context-command.js +1 -1
  21. package/dist/commands/databases.js +1 -1
  22. package/dist/commands/describe.js +1 -1
  23. package/dist/commands/job-command.js +1 -1
  24. package/dist/commands/llm-command.d.ts.map +1 -1
  25. package/dist/commands/llm-command.js +1 -1
  26. package/dist/commands/llm-command.js.map +1 -1
  27. package/dist/commands/llm-proxy.d.ts.map +1 -1
  28. package/dist/commands/llm-proxy.js +1 -1
  29. package/dist/commands/llm-proxy.js.map +1 -1
  30. package/dist/commands/parent-segment-command.js +1 -1
  31. package/dist/commands/profiles-command.js +1 -1
  32. package/dist/commands/query-command.js +1 -1
  33. package/dist/commands/segment-command.js +1 -1
  34. package/dist/commands/segment-create-command.js +1 -1
  35. package/dist/commands/segment-fields-command.js +1 -1
  36. package/dist/commands/segment-pwd-command.js +1 -1
  37. package/dist/commands/segment-update-command.js +1 -1
  38. package/dist/commands/segment-use-command.js +1 -1
  39. package/dist/commands/segments.js +1 -1
  40. package/dist/commands/show.js +1 -1
  41. package/dist/commands/tables.js +1 -1
  42. package/dist/commands/use-command.js +1 -1
  43. package/dist/commands/workflow-command.js +1 -1
  44. package/dist/core/auth.js +1 -1
  45. package/dist/core/config.js +1 -1
  46. package/dist/core/global-context.js +1 -1
  47. package/dist/core/profile.js +1 -1
  48. package/dist/core/project-config.js +1 -1
  49. package/dist/core/session.js +1 -1
  50. package/dist/index.js +1 -1
  51. package/dist/proxy/anthropic-adapter.d.ts +3 -3
  52. package/dist/proxy/anthropic-adapter.d.ts.map +1 -1
  53. package/dist/proxy/anthropic-adapter.js +1 -1
  54. package/dist/proxy/anthropic-adapter.js.map +1 -1
  55. package/dist/proxy/server.d.ts +5 -3
  56. package/dist/proxy/server.d.ts.map +1 -1
  57. package/dist/proxy/server.js +1 -1
  58. package/dist/proxy/server.js.map +1 -1
  59. package/dist/sdk/api.js +1 -1
  60. package/dist/sdk/database.js +1 -1
  61. package/dist/sdk/errors.js +1 -1
  62. package/dist/sdk/index.js +1 -1
  63. package/dist/sdk/job.js +1 -1
  64. package/dist/sdk/llm.d.ts +14 -0
  65. package/dist/sdk/llm.d.ts.map +1 -1
  66. package/dist/sdk/llm.js +1 -1
  67. package/dist/sdk/llm.js.map +1 -1
  68. package/dist/sdk/query.js +1 -1
  69. package/dist/sdk/segment.js +1 -1
  70. package/dist/sdk/table.js +1 -1
  71. package/dist/sdk/workflow.js +1 -1
  72. package/dist/types/endpoints.js +1 -1
  73. package/dist/types/index.d.ts +41 -21
  74. package/dist/types/index.d.ts.map +1 -1
  75. package/dist/types/index.js +1 -1
  76. package/dist/utils/agent-ref-parser.js +1 -1
  77. package/dist/utils/chat-cache.js +1 -1
  78. package/dist/utils/colors.d.ts +4 -0
  79. package/dist/utils/colors.d.ts.map +1 -1
  80. package/dist/utils/colors.js +1 -1
  81. package/dist/utils/colors.js.map +1 -1
  82. package/dist/utils/command-output.js +1 -1
  83. package/dist/utils/file-permissions.js +1 -1
  84. package/dist/utils/format-detector.js +1 -1
  85. package/dist/utils/formatters.js +1 -1
  86. package/dist/utils/json-loader.js +1 -1
  87. package/dist/utils/model-aliases.d.ts +15 -0
  88. package/dist/utils/model-aliases.d.ts.map +1 -1
  89. package/dist/utils/model-aliases.js +1 -1
  90. package/dist/utils/model-aliases.js.map +1 -1
  91. package/dist/utils/option-validation.js +1 -1
  92. package/dist/utils/port.js +1 -1
  93. package/dist/utils/process.js +1 -1
  94. package/dist/utils/prompt.js +1 -1
  95. package/dist/utils/segment-path-parser.js +1 -1
  96. package/dist/utils/segment-ref-parser.js +1 -1
  97. package/dist/utils/spinner.js +1 -1
  98. package/dist/utils/sql-parser.js +1 -1
  99. package/dist/utils/sse-parser.d.ts +2 -2
  100. package/dist/utils/sse-parser.d.ts.map +1 -1
  101. package/dist/utils/sse-parser.js +1 -1
  102. package/dist/utils/sse-parser.js.map +1 -1
  103. package/dist/utils/string-utils.js +1 -1
  104. package/dist/utils/table-ref-parser.js +1 -1
  105. package/dist/utils/tree-formatter.js +1 -1
  106. package/dist/utils/version-check.d.ts +28 -0
  107. package/dist/utils/version-check.d.ts.map +1 -0
  108. package/dist/utils/version-check.js +1 -0
  109. package/dist/utils/version-check.js.map +1 -0
  110. package/dist/utils/workflow-utils.js +1 -1
  111. package/package.json +3 -1
@@ -1 +1 @@
1
- function a19_0x1a84(){const _0x38dd27=['data','behaviorsFile','scheduleType','Error:\x20Parent\x20segment\x20name\x20is\x20required','customerGroupFile','site','addBehaviors','2618830xGKRes','execute','length','Creating\x20parent\x20segment\x20\x27','Name:\x20','getParentFull','name','4587805szYljn','attributes','attributesFile','14hncgtS','Table:\x20','Update\x20existing\x20parent\x20segment\x20(audience)','addAttributesFile','verbose','behaviors','1256hfbBlW','segment:parent:update','description','database','segment:parent:create','addBehaviorsFile','2855919wYCtCh','9QlPjtn','✔\x20Created\x20parent\x20segment\x20\x27','14539qtPBnC','timezone','\x27\x20with\x20ID:\x20','Database:\x20','✔\x20Updated\x20parent\x20segment\x20\x27','263708glDPEZ','error','7724694LoGRWz','Usage:\x20tdx\x20segment\x20parent\x20create\x20<name>\x20--database\x20<db>\x20--table\x20<table>','Site:\x20','111209UBlBDn','addAttributes','\x27...','Parent\x20segment:\x20','3ywiCWJ','customerGroup','Usage:\x20tdx\x20segment\x20parent\x20update\x20<name>\x20[options]','segment','scheduleOption','table'];a19_0x1a84=function(){return _0x38dd27;};return a19_0x1a84();}const a19_0x321176=a19_0x5406;function a19_0x5406(_0xa6b6ba,_0x5baf72){const _0x1a8488=a19_0x1a84();return a19_0x5406=function(_0x5406ff,_0xd48b1f){_0x5406ff=_0x5406ff-0x18d;let _0x17f17b=_0x1a8488[_0x5406ff];return _0x17f17b;},a19_0x5406(_0xa6b6ba,_0x5baf72);}(function(_0x2285c5,_0x4df444){const _0x85a0fb=a19_0x5406,_0x5660fe=_0x2285c5();while(!![]){try{const _0x37e869=parseInt(_0x85a0fb(0x1b6))/0x1*(parseInt(_0x85a0fb(0x19d))/0x2)+-parseInt(_0x85a0fb(0x1ba))/0x3*(-parseInt(_0x85a0fb(0x1b1))/0x4)+parseInt(_0x85a0fb(0x19a))/0x5+-parseInt(_0x85a0fb(0x1b3))/0x6+parseInt(_0x85a0fb(0x1ac))/0x7*(parseInt(_0x85a0fb(0x1a3))/0x8)+-parseInt(_0x85a0fb(0x1aa))/0x9*(-parseInt(_0x85a0fb(0x193))/0xa)+-parseInt(_0x85a0fb(0x1a9))/0xb;if(_0x37e869===_0x4df444)break;else _0x5660fe['push'](_0x5660fe['shift']());}catch(_0x46fa6f){_0x5660fe['push'](_0x5660fe['shift']());}}}(a19_0x1a84,0xc401d));import{BaseCommand}from'./command.js';import{handleSDKOutput}from'../utils/command-output.js';import{withSpinner}from'../utils/spinner.js';import{loadJSONFromOptions}from'../utils/json-loader.js';export class ParentSegmentCreateCommand extends BaseCommand{['name']=a19_0x321176(0x1a7);[a19_0x321176(0x1a5)]='Create\x20new\x20parent\x20segment\x20(audience)';async[a19_0x321176(0x194)](_0x3ad8f){const _0x47d837=a19_0x321176,{options:_0x3d8ffc,args:_0x1ebd97,tdx:_0x459ef6}=_0x3ad8f,_0x227b73=_0x3d8ffc;if(_0x1ebd97[_0x47d837(0x195)]===0x0)return console['error']('Error:\x20Parent\x20segment\x20name\x20is\x20required'),console[_0x47d837(0x1b2)](_0x47d837(0x1b4)),0x1;const _0x91cad8=_0x1ebd97[0x0];if(!_0x227b73[_0x47d837(0x1a6)]||!_0x227b73['table'])return console[_0x47d837(0x1b2)]('Error:\x20--database\x20and\x20--table\x20are\x20required'),console[_0x47d837(0x1b2)](_0x47d837(0x1b4)),0x1;_0x227b73[_0x47d837(0x1a1)]&&(console[_0x47d837(0x1b2)](_0x47d837(0x1b5)+_0x227b73[_0x47d837(0x191)]),console[_0x47d837(0x1b2)](_0x47d837(0x197)+_0x91cad8),console[_0x47d837(0x1b2)](_0x47d837(0x1af)+_0x227b73['database']),console[_0x47d837(0x1b2)](_0x47d837(0x19e)+_0x227b73[_0x47d837(0x1bf)]));const _0x459f2e=await loadJSONFromOptions(_0x227b73[_0x47d837(0x19b)],_0x227b73[_0x47d837(0x19c)]),_0x532065=await loadJSONFromOptions(_0x227b73[_0x47d837(0x1a2)],_0x227b73[_0x47d837(0x18d)]),_0x343cfa=await loadJSONFromOptions(_0x227b73[_0x47d837(0x1bb)],_0x227b73[_0x47d837(0x190)]),_0x56cb3b={'name':_0x91cad8,'description':_0x227b73['description'],'scheduleType':_0x227b73[_0x47d837(0x18e)],'scheduleOption':_0x227b73[_0x47d837(0x1be)],'timezone':_0x227b73[_0x47d837(0x1ad)],'master':{'parentDatabaseName':_0x227b73[_0x47d837(0x1a6)],'parentTableName':_0x227b73[_0x47d837(0x1bf)]},'attributes':_0x459f2e,'behaviors':_0x532065,'customerGroup':_0x343cfa},_0x382beb=await withSpinner(_0x47d837(0x196)+_0x91cad8+_0x47d837(0x1b8),()=>_0x459ef6[_0x47d837(0x1bd)]['createParent'](_0x56cb3b),{'verbose':_0x3d8ffc[_0x47d837(0x1a1)]}),_0xc296c4=_0x382beb[_0x47d837(0x1c0)];return console[_0x47d837(0x1b2)](_0x47d837(0x1ab)+_0xc296c4[_0x47d837(0x199)]+_0x47d837(0x1ae)+_0xc296c4['id']),await handleSDKOutput([_0xc296c4],_0x3d8ffc),0x0;}}export class ParentSegmentUpdateCommand extends BaseCommand{[a19_0x321176(0x199)]=a19_0x321176(0x1a4);['description']=a19_0x321176(0x19f);async[a19_0x321176(0x194)](_0xd62f62){const _0x265c41=a19_0x321176,{options:_0xcaacf0,args:_0x11dd5d,tdx:_0x131c31}=_0xd62f62,_0x5a783c=_0xcaacf0;if(_0x11dd5d[_0x265c41(0x195)]===0x0)return console['error'](_0x265c41(0x18f)),console['error'](_0x265c41(0x1bc)),0x1;const _0x31bdb9=_0x11dd5d[0x0];_0x5a783c[_0x265c41(0x1a1)]&&(console[_0x265c41(0x1b2)](_0x265c41(0x1b5)+_0x5a783c[_0x265c41(0x191)]),console[_0x265c41(0x1b2)](_0x265c41(0x1b9)+_0x31bdb9));const _0x300fc3=await withSpinner('Fetching\x20current\x20configuration\x20for\x20\x27'+_0x31bdb9+'\x27...',()=>_0x131c31['segment'][_0x265c41(0x198)](_0x31bdb9),{'verbose':_0x5a783c['verbose']}),_0x324f3e=_0x300fc3[_0x265c41(0x1c0)],_0x2545bc=await loadJSONFromOptions(_0x5a783c[_0x265c41(0x1b7)],_0x5a783c[_0x265c41(0x1a0)]),_0x1f7135=await loadJSONFromOptions(_0x5a783c[_0x265c41(0x192)],_0x5a783c[_0x265c41(0x1a8)]),_0x54bc58={'name':_0x324f3e['name'],'description':_0x5a783c['description']!==undefined?_0x5a783c['description']:_0x324f3e[_0x265c41(0x1a5)],'scheduleType':_0x5a783c['scheduleType']!==undefined?_0x5a783c[_0x265c41(0x18e)]:_0x324f3e[_0x265c41(0x18e)],'scheduleOption':_0x5a783c['scheduleOption']!==undefined?_0x5a783c[_0x265c41(0x1be)]:_0x324f3e[_0x265c41(0x1be)],'timezone':_0x5a783c[_0x265c41(0x1ad)]!==undefined?_0x5a783c[_0x265c41(0x1ad)]:_0x324f3e[_0x265c41(0x1ad)],'master':_0x324f3e['master'],'attributes':_0x2545bc?[..._0x324f3e[_0x265c41(0x19b)]||[],..._0x2545bc]:_0x324f3e['attributes'],'behaviors':_0x1f7135?[..._0x324f3e[_0x265c41(0x1a2)]||[],..._0x1f7135]:_0x324f3e['behaviors'],'customerGroup':_0x324f3e[_0x265c41(0x1bb)]},_0x1d39c3=await withSpinner('Updating\x20parent\x20segment\x20\x27'+_0x31bdb9+_0x265c41(0x1b8),()=>_0x131c31[_0x265c41(0x1bd)]['updateParent'](_0x31bdb9,_0x54bc58),{'verbose':_0x5a783c[_0x265c41(0x1a1)]}),_0x80b8e6=_0x1d39c3[_0x265c41(0x1c0)];return console['error'](_0x265c41(0x1b0)+_0x80b8e6['name']+'\x27'),await handleSDKOutput([_0x80b8e6],_0x5a783c),0x0;}}
1
+ const a19_0x938094=a19_0x551a;function a19_0x551a(_0x26fe72,_0x3970e4){const _0x516324=a19_0x5163();return a19_0x551a=function(_0x551acd,_0x38cb13){_0x551acd=_0x551acd-0x14c;let _0x468aab=_0x516324[_0x551acd];return _0x468aab;},a19_0x551a(_0x26fe72,_0x3970e4);}(function(_0x46f05b,_0x5a592c){const _0x215f73=a19_0x551a,_0x124c35=_0x46f05b();while(!![]){try{const _0x49f105=parseInt(_0x215f73(0x162))/0x1+-parseInt(_0x215f73(0x157))/0x2+-parseInt(_0x215f73(0x15e))/0x3+parseInt(_0x215f73(0x165))/0x4*(-parseInt(_0x215f73(0x178))/0x5)+-parseInt(_0x215f73(0x169))/0x6+parseInt(_0x215f73(0x16e))/0x7*(parseInt(_0x215f73(0x15b))/0x8)+-parseInt(_0x215f73(0x155))/0x9*(-parseInt(_0x215f73(0x14f))/0xa);if(_0x49f105===_0x5a592c)break;else _0x124c35['push'](_0x124c35['shift']());}catch(_0xb64f4e){_0x124c35['push'](_0x124c35['shift']());}}}(a19_0x5163,0x45e7b));import{BaseCommand}from'./command.js';import{handleSDKOutput}from'../utils/command-output.js';import{withSpinner}from'../utils/spinner.js';import{loadJSONFromOptions}from'../utils/json-loader.js';function a19_0x5163(){const _0x21038e=['table','createParent','site','9rxSPWG','master','612858JPLFPs','segment:parent:create','addAttributes','addBehaviorsFile','248gfkOwK','✔\x20Created\x20parent\x20segment\x20\x27','Create\x20new\x20parent\x20segment\x20(audience)','250974wgSKxo','\x27...','customerGroup','Site:\x20','11021sxvmPX','execute','description','2032588JVVFHq','addAttributesFile','Update\x20existing\x20parent\x20segment\x20(audience)','name','3115740GkBnpF','Error:\x20--database\x20and\x20--table\x20are\x20required','Parent\x20segment:\x20','updateParent','attributes','58933BkPAyl','addBehaviors','data','verbose','behaviorsFile','Usage:\x20tdx\x20segment\x20parent\x20create\x20<name>\x20--database\x20<db>\x20--table\x20<table>','Database:\x20','scheduleOption','behaviors','timezone','5CXklld','scheduleType','length','Updating\x20parent\x20segment\x20\x27','Usage:\x20tdx\x20segment\x20parent\x20update\x20<name>\x20[options]','Error:\x20Parent\x20segment\x20name\x20is\x20required','database','Name:\x20','segment','segment:parent:update','Table:\x20','14318450OerlxW','error','\x27\x20with\x20ID:\x20'];a19_0x5163=function(){return _0x21038e;};return a19_0x5163();}export class ParentSegmentCreateCommand extends BaseCommand{[a19_0x938094(0x168)]=a19_0x938094(0x158);[a19_0x938094(0x164)]=a19_0x938094(0x15d);async['execute'](_0x2023bb){const _0x5bb1ec=a19_0x938094,{options:_0x2d3622,args:_0x4cb9ae,tdx:_0x2b4ddc}=_0x2023bb,_0x2a4541=_0x2d3622;if(_0x4cb9ae[_0x5bb1ec(0x17a)]===0x0)return console[_0x5bb1ec(0x150)]('Error:\x20Parent\x20segment\x20name\x20is\x20required'),console[_0x5bb1ec(0x150)](_0x5bb1ec(0x173)),0x1;const _0x122c9e=_0x4cb9ae[0x0];if(!_0x2a4541['database']||!_0x2a4541[_0x5bb1ec(0x152)])return console[_0x5bb1ec(0x150)](_0x5bb1ec(0x16a)),console[_0x5bb1ec(0x150)](_0x5bb1ec(0x173)),0x1;_0x2a4541[_0x5bb1ec(0x171)]&&(console[_0x5bb1ec(0x150)](_0x5bb1ec(0x161)+_0x2a4541[_0x5bb1ec(0x154)]),console['error'](_0x5bb1ec(0x17f)+_0x122c9e),console[_0x5bb1ec(0x150)](_0x5bb1ec(0x174)+_0x2a4541[_0x5bb1ec(0x17e)]),console[_0x5bb1ec(0x150)](_0x5bb1ec(0x14e)+_0x2a4541[_0x5bb1ec(0x152)]));const _0x379b24=await loadJSONFromOptions(_0x2a4541[_0x5bb1ec(0x16d)],_0x2a4541['attributesFile']),_0x548968=await loadJSONFromOptions(_0x2a4541['behaviors'],_0x2a4541[_0x5bb1ec(0x172)]),_0x29a622=await loadJSONFromOptions(_0x2a4541[_0x5bb1ec(0x160)],_0x2a4541['customerGroupFile']),_0x528207={'name':_0x122c9e,'description':_0x2a4541[_0x5bb1ec(0x164)],'scheduleType':_0x2a4541['scheduleType'],'scheduleOption':_0x2a4541[_0x5bb1ec(0x175)],'timezone':_0x2a4541[_0x5bb1ec(0x177)],'master':{'parentDatabaseName':_0x2a4541[_0x5bb1ec(0x17e)],'parentTableName':_0x2a4541[_0x5bb1ec(0x152)]},'attributes':_0x379b24,'behaviors':_0x548968,'customerGroup':_0x29a622},_0x27d8de=await withSpinner('Creating\x20parent\x20segment\x20\x27'+_0x122c9e+'\x27...',()=>_0x2b4ddc[_0x5bb1ec(0x14c)][_0x5bb1ec(0x153)](_0x528207),{'verbose':_0x2d3622[_0x5bb1ec(0x171)]}),_0x3c8499=_0x27d8de[_0x5bb1ec(0x170)];return console[_0x5bb1ec(0x150)](_0x5bb1ec(0x15c)+_0x3c8499[_0x5bb1ec(0x168)]+_0x5bb1ec(0x151)+_0x3c8499['id']),await handleSDKOutput([_0x3c8499],_0x2d3622),0x0;}}export class ParentSegmentUpdateCommand extends BaseCommand{['name']=a19_0x938094(0x14d);[a19_0x938094(0x164)]=a19_0x938094(0x167);async[a19_0x938094(0x163)](_0x449d80){const _0x3e3f98=a19_0x938094,{options:_0x3afa42,args:_0xc42d71,tdx:_0x154290}=_0x449d80,_0x4c6ea3=_0x3afa42;if(_0xc42d71[_0x3e3f98(0x17a)]===0x0)return console[_0x3e3f98(0x150)](_0x3e3f98(0x17d)),console[_0x3e3f98(0x150)](_0x3e3f98(0x17c)),0x1;const _0x55798c=_0xc42d71[0x0];_0x4c6ea3[_0x3e3f98(0x171)]&&(console[_0x3e3f98(0x150)](_0x3e3f98(0x161)+_0x4c6ea3[_0x3e3f98(0x154)]),console[_0x3e3f98(0x150)](_0x3e3f98(0x16b)+_0x55798c));const _0x5b6263=await withSpinner('Fetching\x20current\x20configuration\x20for\x20\x27'+_0x55798c+_0x3e3f98(0x15f),()=>_0x154290[_0x3e3f98(0x14c)]['getParentFull'](_0x55798c),{'verbose':_0x4c6ea3[_0x3e3f98(0x171)]}),_0x28acde=_0x5b6263['data'],_0x1ec822=await loadJSONFromOptions(_0x4c6ea3[_0x3e3f98(0x159)],_0x4c6ea3[_0x3e3f98(0x166)]),_0x3b326e=await loadJSONFromOptions(_0x4c6ea3[_0x3e3f98(0x16f)],_0x4c6ea3[_0x3e3f98(0x15a)]),_0x227b18={'name':_0x28acde[_0x3e3f98(0x168)],'description':_0x4c6ea3[_0x3e3f98(0x164)]!==undefined?_0x4c6ea3['description']:_0x28acde[_0x3e3f98(0x164)],'scheduleType':_0x4c6ea3[_0x3e3f98(0x179)]!==undefined?_0x4c6ea3[_0x3e3f98(0x179)]:_0x28acde[_0x3e3f98(0x179)],'scheduleOption':_0x4c6ea3['scheduleOption']!==undefined?_0x4c6ea3[_0x3e3f98(0x175)]:_0x28acde[_0x3e3f98(0x175)],'timezone':_0x4c6ea3[_0x3e3f98(0x177)]!==undefined?_0x4c6ea3[_0x3e3f98(0x177)]:_0x28acde[_0x3e3f98(0x177)],'master':_0x28acde[_0x3e3f98(0x156)],'attributes':_0x1ec822?[..._0x28acde[_0x3e3f98(0x16d)]||[],..._0x1ec822]:_0x28acde[_0x3e3f98(0x16d)],'behaviors':_0x3b326e?[..._0x28acde[_0x3e3f98(0x176)]||[],..._0x3b326e]:_0x28acde[_0x3e3f98(0x176)],'customerGroup':_0x28acde['customerGroup']},_0x14652e=await withSpinner(_0x3e3f98(0x17b)+_0x55798c+'\x27...',()=>_0x154290[_0x3e3f98(0x14c)][_0x3e3f98(0x16c)](_0x55798c,_0x227b18),{'verbose':_0x4c6ea3[_0x3e3f98(0x171)]}),_0xbde26b=_0x14652e[_0x3e3f98(0x170)];return console[_0x3e3f98(0x150)]('✔\x20Updated\x20parent\x20segment\x20\x27'+_0xbde26b[_0x3e3f98(0x168)]+'\x27'),await handleSDKOutput([_0xbde26b],_0x4c6ea3),0x0;}}
@@ -1 +1 @@
1
- function a20_0xdda5(_0x1642ff,_0x324444){const _0x3e773f=a20_0x3e77();return a20_0xdda5=function(_0xdda50,_0x5b1c80){_0xdda50=_0xdda50-0x18e;let _0x37729b=_0x3e773f[_0xdda50];return _0x37729b;},a20_0xdda5(_0x1642ff,_0x324444);}function a20_0x3e77(){const _0x4a39ed=['566992EFRAYq','\x20\x20Local:\x20\x20(project\x20folder)/tdx.json','error','374TGnqLW','Error:\x20','15TFqRtX','\x20\x20Global:\x20~/.config/tdx/tdx.json','log','map','4883103zmJNHT','List\x20all\x20available\x20profiles','No\x20profiles\x20found.\x20Define\x20profiles\x20in\x20tdx.json:\x0a','name','1559THwRWx','description','1486ISFAzu','20kZkAla','81907cMzLXT','2724lZpswM','4120fXCJQQ','318324DHDrUs','19707220GyEMeq','56qBjluM','config','message'];a20_0x3e77=function(){return _0x4a39ed;};return a20_0x3e77();}const a20_0x3d3356=a20_0xdda5;(function(_0x278af9,_0x31cd6b){const _0x52bddc=a20_0xdda5,_0x3a92ec=_0x278af9();while(!![]){try{const _0x5739e1=parseInt(_0x52bddc(0x18f))/0x1*(parseInt(_0x52bddc(0x191))/0x2)+-parseInt(_0x52bddc(0x1a0))/0x3*(-parseInt(_0x52bddc(0x19b))/0x4)+-parseInt(_0x52bddc(0x195))/0x5*(-parseInt(_0x52bddc(0x194))/0x6)+parseInt(_0x52bddc(0x193))/0x7*(parseInt(_0x52bddc(0x198))/0x8)+-parseInt(_0x52bddc(0x1a4))/0x9*(parseInt(_0x52bddc(0x192))/0xa)+-parseInt(_0x52bddc(0x19e))/0xb*(-parseInt(_0x52bddc(0x196))/0xc)+-parseInt(_0x52bddc(0x197))/0xd;if(_0x5739e1===_0x31cd6b)break;else _0x3a92ec['push'](_0x3a92ec['shift']());}catch(_0x394ec4){_0x3a92ec['push'](_0x3a92ec['shift']());}}}(a20_0x3e77,0x98534));import{BaseCommand}from'./command.js';import{listProfiles,getActiveProfile,getProfileParams}from'../core/profile.js';import{handleSDKOutput}from'../utils/command-output.js';export class ProfilesCommand extends BaseCommand{[a20_0x3d3356(0x18e)]='profiles';[a20_0x3d3356(0x190)]=a20_0x3d3356(0x1a5);async['execute'](_0x4b458e){const _0xf32c23=a20_0x3d3356,{options:_0x5523fb}=_0x4b458e;try{const _0x2d3d3a=listProfiles(),_0x5f2a4d=getActiveProfile();if(_0x2d3d3a['length']===0x0)return console[_0xf32c23(0x1a2)](_0xf32c23(0x1a6)),console[_0xf32c23(0x1a2)](_0xf32c23(0x19c)),console[_0xf32c23(0x1a2)](_0xf32c23(0x1a1)),0x0;const _0x50f8d5=_0x2d3d3a[_0xf32c23(0x1a3)](_0x205c3d=>{const _0x15d544=_0xf32c23,_0x47deb0=_0x205c3d[_0x15d544(0x18e)]===_0x5f2a4d,_0x2881f0=getProfileParams(_0x205c3d[_0x15d544(0x199)]);return{'name':_0x205c3d['name'],'active':_0x47deb0,'scope':_0x205c3d['scope'],'description':_0x205c3d['config'][_0x15d544(0x190)]||'','params':_0x2881f0};});return await handleSDKOutput(_0x50f8d5,_0x5523fb),0x0;}catch(_0x5f3de){return _0x5f3de instanceof Error&&console[_0xf32c23(0x19d)](_0xf32c23(0x19f)+_0x5f3de[_0xf32c23(0x19a)]),0x1;}}}
1
+ const a20_0x12d757=a20_0x2b38;(function(_0x4b86fd,_0x40cf69){const _0x458848=a20_0x2b38,_0x5721c2=_0x4b86fd();while(!![]){try{const _0x72a340=-parseInt(_0x458848(0x190))/0x1*(-parseInt(_0x458848(0x18e))/0x2)+-parseInt(_0x458848(0x18f))/0x3*(parseInt(_0x458848(0x184))/0x4)+parseInt(_0x458848(0x183))/0x5+-parseInt(_0x458848(0x186))/0x6+parseInt(_0x458848(0x181))/0x7+-parseInt(_0x458848(0x193))/0x8+parseInt(_0x458848(0x192))/0x9;if(_0x72a340===_0x40cf69)break;else _0x5721c2['push'](_0x5721c2['shift']());}catch(_0x45f5b7){_0x5721c2['push'](_0x5721c2['shift']());}}}(a20_0x47de,0x35965));import{BaseCommand}from'./command.js';function a20_0x47de(){const _0x26b90c=['profiles','log','109576CmYEaq','3bbXcyw','3aLSpFi','config','3113856TpUbIU','582904RJUCwb','672588dFGpwP','name','1024890RfntDE','1507228aPWZsy','\x20\x20Local:\x20\x20(project\x20folder)/tdx.json','853482UDYdPD','description','scope','map','Error:\x20','List\x20all\x20available\x20profiles'];a20_0x47de=function(){return _0x26b90c;};return a20_0x47de();}function a20_0x2b38(_0x4b529c,_0x166fef){const _0x47de18=a20_0x47de();return a20_0x2b38=function(_0x2b386e,_0x2c0824){_0x2b386e=_0x2b386e-0x181;let _0x22e925=_0x47de18[_0x2b386e];return _0x22e925;},a20_0x2b38(_0x4b529c,_0x166fef);}import{listProfiles,getActiveProfile,getProfileParams}from'../core/profile.js';import{handleSDKOutput}from'../utils/command-output.js';export class ProfilesCommand extends BaseCommand{[a20_0x12d757(0x182)]=a20_0x12d757(0x18c);['description']=a20_0x12d757(0x18b);async['execute'](_0x74c12a){const _0x236bf9=a20_0x12d757,{options:_0x518daf}=_0x74c12a;try{const _0x8eb783=listProfiles(),_0xeed69d=getActiveProfile();if(_0x8eb783['length']===0x0)return console[_0x236bf9(0x18d)]('No\x20profiles\x20found.\x20Define\x20profiles\x20in\x20tdx.json:\x0a'),console[_0x236bf9(0x18d)](_0x236bf9(0x185)),console[_0x236bf9(0x18d)]('\x20\x20Global:\x20~/.config/tdx/tdx.json'),0x0;const _0x4098c5=_0x8eb783[_0x236bf9(0x189)](_0x10aac2=>{const _0x118d46=_0x236bf9,_0x40e6a7=_0x10aac2['name']===_0xeed69d,_0x422e92=getProfileParams(_0x10aac2[_0x118d46(0x191)]);return{'name':_0x10aac2['name'],'active':_0x40e6a7,'scope':_0x10aac2[_0x118d46(0x188)],'description':_0x10aac2[_0x118d46(0x191)][_0x118d46(0x187)]||'','params':_0x422e92};});return await handleSDKOutput(_0x4098c5,_0x518daf),0x0;}catch(_0x1935d4){return _0x1935d4 instanceof Error&&console['error'](_0x236bf9(0x18a)+_0x1935d4['message']),0x1;}}}
@@ -1 +1 @@
1
- function a21_0x5345(){const _0x263aa4=['args','../utils/command-output.js','execute','Run\x20Trino\x20queries\x20(streaming)','file','push','name','join','verbose','jobId','processedRows','6771440mQWulR','Query\x20completed:\x20Processed\x20','\x20-\x20','error','1061982Qmhqoy','...','17757LDjSyi','\x20rows\x20','query','Usage:\x20tdx\x20query\x20\x22SELECT\x20*\x20FROM\x20table\x22\x0a\x20\x20\x20or:\x20tdx\x20query\x20--file\x20query.sql\x0a\x0aRun\x20\x27tdx\x20query\x20--help\x27\x20for\x20more\x20options','Site:\x20','database','Executing\x20query\x20[','Statement\x20','catalog','SQL:\x20','\x0aAll\x20results\x20saved\x20to\x20','6aibNao','in\x20','description','Executing\x20query...','18223700jFoFJe','\x20[Job\x20ID:\x20','message','setJobId','Catalog:\x20','setPhase','stats','Executing\x20statement\x20','information_schema','2883545AzOrGM','648AmRvnW','site','totalSplits','Error:\x20','6302952DhmScT','49473vZuQaL','originalMessage','length','274RZJIno','output'];a21_0x5345=function(){return _0x263aa4;};return a21_0x5345();}const a21_0xbb1a16=a21_0x13e7;(function(_0x4db785,_0x440e4f){const _0x512755=a21_0x13e7,_0x4119cf=_0x4db785();while(!![]){try{const _0x5332cf=parseInt(_0x512755(0x207))/0x1+parseInt(_0x512755(0x1f6))/0x2*(parseInt(_0x512755(0x209))/0x3)+-parseInt(_0x512755(0x1f2))/0x4+-parseInt(_0x512755(0x203))/0x5+parseInt(_0x512755(0x1e0))/0x6*(-parseInt(_0x512755(0x1ed))/0x7)+-parseInt(_0x512755(0x1ee))/0x8*(-parseInt(_0x512755(0x1f3))/0x9)+parseInt(_0x512755(0x1e4))/0xa;if(_0x5332cf===_0x440e4f)break;else _0x4119cf['push'](_0x4119cf['shift']());}catch(_0x16bc67){_0x4119cf['push'](_0x4119cf['shift']());}}}(a21_0x5345,0xc2f57));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleQueryOutput}from'../utils/command-output.js';import{readSqlStatementsFromFile,splitSqlStatements}from'../utils/sql-parser.js';import{writeFileSync}from'fs';function a21_0x13e7(_0x1c5ecc,_0x4bd951){const _0x534594=a21_0x5345();return a21_0x13e7=function(_0x13e7a0,_0x4e2a17){_0x13e7a0=_0x13e7a0-0x1dc;let _0x218d76=_0x534594[_0x13e7a0];return _0x218d76;},a21_0x13e7(_0x1c5ecc,_0x4bd951);}import{withQuerySpinner,formatElapsed}from'../utils/spinner.js';import{formatRows}from'../utils/formatters.js';export class QueryCommand extends BaseCommand{[a21_0xbb1a16(0x1fe)]=a21_0xbb1a16(0x20b);[a21_0xbb1a16(0x1e2)]=a21_0xbb1a16(0x1fb);async[a21_0xbb1a16(0x1fa)](_0x409d3e){const _0x344553=a21_0xbb1a16,{options:_0xcb2696,args:_0x1d81fe,tdx:_0x48b266}=_0x409d3e,_0x51dfa9=_0x1d81fe[0x0],_0xb1bf9b=_0xcb2696[_0x344553(0x1fc)];let _0x3248e2;if(_0xb1bf9b)try{_0x3248e2=readSqlStatementsFromFile(_0xb1bf9b);}catch(_0x2d414e){return console['error'](_0x344553(0x1f1)+_0x2d414e[_0x344553(0x1e6)]),0x1;}else try{_0x3248e2=splitSqlStatements(_0x51dfa9);}catch(_0x41740d){return console[_0x344553(0x206)](_0x344553(0x1f1)+_0x41740d[_0x344553(0x1e6)]),0x1;}const _0x291401=_0xcb2696[_0x344553(0x20e)]||_0x344553(0x1ec),_0x3fbc9f=_0xcb2696[_0x344553(0x1dd)];try{const _0x1086e8=[],_0x443d6d=!!_0xcb2696[_0x344553(0x1f7)];for(let _0x49936e=0x0;_0x49936e<_0x3248e2[_0x344553(0x1f5)];_0x49936e++){const _0x324796=_0x3248e2[_0x49936e],_0x4f3d2f=_0x49936e+0x1,_0x186b11=_0x3248e2[_0x344553(0x1f5)],_0x494c9a=_0x186b11>0x1;_0xcb2696[_0x344553(0x200)]&&(console[_0x344553(0x206)]('\x0a'+(_0x494c9a?_0x344553(0x1dc)+_0x4f3d2f+'/'+_0x186b11+':':'')),console['error'](_0x344553(0x20d)+_0xcb2696[_0x344553(0x1ef)]),console['error'](_0x344553(0x1e8)+(_0x3fbc9f||'td')),console['error']('Schema:\x20'+_0x291401),console[_0x344553(0x206)](_0x344553(0x1de)+_0x324796));const _0x248b90=_0x494c9a?_0x344553(0x1eb)+_0x4f3d2f+'/'+_0x186b11+_0x344553(0x208):_0x344553(0x1e3);try{const _0x47f9bf=await withQuerySpinner(_0x248b90,async _0x102739=>{const _0x527e84=_0x344553,_0xc6b4d3=await _0x48b266[_0x527e84(0x20b)](_0x324796,{'catalog':_0x3fbc9f,'schema':_0x291401,'onJobId':_0x54143f=>{const _0x3a22bb=_0x527e84;_0x102739[_0x3a22bb(0x1e7)](_0x54143f);},'onProgress':_0x21c932=>{const _0x32f5d1=_0x527e84;_0x102739[_0x32f5d1(0x1e9)](_0x32f5d1(0x20f)+_0x21c932['state']+']'),_0x102739['setExtra'](formatRows(_0x21c932[_0x32f5d1(0x202)])+_0x32f5d1(0x20a)+_0x21c932['completedSplits']+'/'+_0x21c932[_0x32f5d1(0x1f0)]+'\x20splits');}});return _0xc6b4d3;},{'verbose':_0xcb2696[_0x344553(0x200)]}),_0x131253=_0x47f9bf['data'],_0x307f55=_0x131253[_0x344553(0x201)]?_0x344553(0x1e5)+_0x131253[_0x344553(0x201)]+']':'',_0x2cd302=_0x494c9a?'Statement\x20'+_0x4f3d2f+'/'+_0x186b11+_0x344553(0x205):'';console['error']('✔\x20'+_0x2cd302+_0x344553(0x204)+formatRows(_0x131253[_0x344553(0x1ea)][_0x344553(0x202)])+_0x344553(0x20a)+(_0x344553(0x1e1)+formatElapsed(_0x131253[_0x344553(0x1ea)]['elapsedTimeMillis'])+_0x307f55));if(_0x494c9a&&_0x443d6d){const {formatQueryOutput:_0x18645c,resolveOutputOptions:_0x388b2d}=await import(_0x344553(0x1f9)),_0x4100c9=_0x388b2d(_0xcb2696),_0x3c188a=await _0x18645c(_0x131253,_0x4100c9);_0x1086e8[_0x344553(0x1fd)](_0x3c188a);}else await handleQueryOutput(_0x131253,_0xcb2696);}catch(_0x1a5148){const _0x2cd626=_0x494c9a?_0x344553(0x1dc)+_0x4f3d2f+'/'+_0x186b11+':\x0a':'',_0x1f3977=_0x1a5148 instanceof SDKError?_0x1a5148[_0x344553(0x1f4)]:_0x1a5148[_0x344553(0x1e6)];return console[_0x344553(0x206)](''+_0x2cd626+_0x1f3977),0x1;}}if(_0x3248e2['length']>0x1&&_0x443d6d&&_0x1086e8[_0x344553(0x1f5)]>0x0){const _0x2f99d7=_0x1086e8[_0x344553(0x1ff)]('\x0a');writeFileSync(_0xcb2696[_0x344553(0x1f7)],_0x2f99d7),console[_0x344553(0x206)](_0x344553(0x1df)+_0xcb2696[_0x344553(0x1f7)]);}return 0x0;}catch(_0x261c15){throw _0x261c15;}}['validate'](_0x3ad142){const _0x40b5cc=a21_0xbb1a16,_0x2b6e67=_0x3ad142[_0x40b5cc(0x1f8)][0x0],_0x30806c=_0x3ad142['options']['file'];if(!_0x2b6e67&&!_0x30806c)return _0x40b5cc(0x20c);if(_0x2b6e67&&_0x30806c)return'Cannot\x20specify\x20both\x20SQL\x20argument\x20and\x20--file\x20option';return undefined;}}
1
+ const a21_0x2fb6b=a21_0x1252;function a21_0x3933(){const _0x5ca5fa=['elapsedTimeMillis','completedSplits','output','\x20splits','execute','Executing\x20query...','length','4UtOPjx','stats','\x20rows\x20','../utils/command-output.js','Error:\x20','Executing\x20query\x20[','state','processedRows','totalSplits','information_schema','message','\x20[Job\x20ID:\x20','args','in\x20','file','originalMessage','22itnegc','608594iokuHL','catalog','...','Catalog:\x20','Usage:\x20tdx\x20query\x20\x22SELECT\x20*\x20FROM\x20table\x22\x0a\x20\x20\x20or:\x20tdx\x20query\x20--file\x20query.sql\x0a\x0aRun\x20\x27tdx\x20query\x20--help\x27\x20for\x20more\x20options','name','setPhase','Statement\x20','verbose','4537550lcRcig','\x20-\x20','2725479PsqBgj','27856WzDNnw','options','data','query','Cannot\x20specify\x20both\x20SQL\x20argument\x20and\x20--file\x20option','1300953XgACMP','setExtra','Run\x20Trino\x20queries\x20(streaming)','741480bpkwLP','description','8iTIWCi','error','485375uLzGmK','validate','setJobId','join'];a21_0x3933=function(){return _0x5ca5fa;};return a21_0x3933();}function a21_0x1252(_0x5dd3d4,_0x54a4d5){const _0x39335b=a21_0x3933();return a21_0x1252=function(_0x125227,_0x259bdd){_0x125227=_0x125227-0xd2;let _0x4f076a=_0x39335b[_0x125227];return _0x4f076a;},a21_0x1252(_0x5dd3d4,_0x54a4d5);}(function(_0x32da85,_0x5ec800){const _0x53b3ce=a21_0x1252,_0x249d2a=_0x32da85();while(!![]){try{const _0x5b9c31=parseInt(_0x53b3ce(0xe0))/0x1*(-parseInt(_0x53b3ce(0xd3))/0x2)+-parseInt(_0x53b3ce(0xe5))/0x3*(-parseInt(_0x53b3ce(0xf7))/0x4)+-parseInt(_0x53b3ce(0xec))/0x5+parseInt(_0x53b3ce(0xe8))/0x6+-parseInt(_0x53b3ce(0xd4))/0x7*(parseInt(_0x53b3ce(0xea))/0x8)+-parseInt(_0x53b3ce(0xdf))/0x9+parseInt(_0x53b3ce(0xdd))/0xa;if(_0x5b9c31===_0x5ec800)break;else _0x249d2a['push'](_0x249d2a['shift']());}catch(_0x363dfa){_0x249d2a['push'](_0x249d2a['shift']());}}}(a21_0x3933,0x3527a));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleQueryOutput}from'../utils/command-output.js';import{readSqlStatementsFromFile,splitSqlStatements}from'../utils/sql-parser.js';import{writeFileSync}from'fs';import{withQuerySpinner,formatElapsed}from'../utils/spinner.js';import{formatRows}from'../utils/formatters.js';export class QueryCommand extends BaseCommand{[a21_0x2fb6b(0xd9)]=a21_0x2fb6b(0xe3);[a21_0x2fb6b(0xe9)]=a21_0x2fb6b(0xe7);async[a21_0x2fb6b(0xf4)](_0x5784dd){const _0x21f479=a21_0x2fb6b,{options:_0x4df3f8,args:_0x3c59cc,tdx:_0x558e91}=_0x5784dd,_0x382c98=_0x3c59cc[0x0],_0x53a612=_0x4df3f8[_0x21f479(0x105)];let _0x4f3e25;if(_0x53a612)try{_0x4f3e25=readSqlStatementsFromFile(_0x53a612);}catch(_0x53a798){return console[_0x21f479(0xeb)]('Error:\x20'+_0x53a798[_0x21f479(0x101)]),0x1;}else try{_0x4f3e25=splitSqlStatements(_0x382c98);}catch(_0x420cff){return console[_0x21f479(0xeb)](_0x21f479(0xfb)+_0x420cff[_0x21f479(0x101)]),0x1;}const _0x3c078e=_0x4df3f8['database']||_0x21f479(0x100),_0x3281d7=_0x4df3f8[_0x21f479(0xd5)];try{const _0x191f75=[],_0x54ecce=!!_0x4df3f8[_0x21f479(0xf2)];for(let _0x4bc93e=0x0;_0x4bc93e<_0x4f3e25[_0x21f479(0xf6)];_0x4bc93e++){const _0x44bab3=_0x4f3e25[_0x4bc93e],_0x5a10f0=_0x4bc93e+0x1,_0x2642fc=_0x4f3e25[_0x21f479(0xf6)],_0x101ce8=_0x2642fc>0x1;_0x4df3f8['verbose']&&(console[_0x21f479(0xeb)]('\x0a'+(_0x101ce8?_0x21f479(0xdb)+_0x5a10f0+'/'+_0x2642fc+':':'')),console[_0x21f479(0xeb)]('Site:\x20'+_0x4df3f8['site']),console['error'](_0x21f479(0xd7)+(_0x3281d7||'td')),console[_0x21f479(0xeb)]('Schema:\x20'+_0x3c078e),console['error']('SQL:\x20'+_0x44bab3));const _0x1bb932=_0x101ce8?'Executing\x20statement\x20'+_0x5a10f0+'/'+_0x2642fc+_0x21f479(0xd6):_0x21f479(0xf5);try{const _0x3dd4cf=await withQuerySpinner(_0x1bb932,async _0x173b25=>{const _0x47b6b3=_0x21f479,_0xf76101=await _0x558e91[_0x47b6b3(0xe3)](_0x44bab3,{'catalog':_0x3281d7,'schema':_0x3c078e,'onJobId':_0x5aec23=>{const _0x4eab1e=_0x47b6b3;_0x173b25[_0x4eab1e(0xee)](_0x5aec23);},'onProgress':_0x31445a=>{const _0x240a1d=_0x47b6b3;_0x173b25[_0x240a1d(0xda)](_0x240a1d(0xfc)+_0x31445a[_0x240a1d(0xfd)]+']'),_0x173b25[_0x240a1d(0xe6)](formatRows(_0x31445a['processedRows'])+_0x240a1d(0xf9)+_0x31445a[_0x240a1d(0xf1)]+'/'+_0x31445a[_0x240a1d(0xff)]+_0x240a1d(0xf3));}});return _0xf76101;},{'verbose':_0x4df3f8[_0x21f479(0xdc)]}),_0x2b8f28=_0x3dd4cf[_0x21f479(0xe2)],_0x1a42e2=_0x2b8f28['jobId']?_0x21f479(0x102)+_0x2b8f28['jobId']+']':'',_0x1d6d18=_0x101ce8?_0x21f479(0xdb)+_0x5a10f0+'/'+_0x2642fc+_0x21f479(0xde):'';console[_0x21f479(0xeb)]('✔\x20'+_0x1d6d18+'Query\x20completed:\x20Processed\x20'+formatRows(_0x2b8f28[_0x21f479(0xf8)][_0x21f479(0xfe)])+_0x21f479(0xf9)+(_0x21f479(0x104)+formatElapsed(_0x2b8f28[_0x21f479(0xf8)][_0x21f479(0xf0)])+_0x1a42e2));if(_0x101ce8&&_0x54ecce){const {formatQueryOutput:_0x28ad07,resolveOutputOptions:_0x5deb13}=await import(_0x21f479(0xfa)),_0x57ee0d=_0x5deb13(_0x4df3f8),_0xb4fc32=await _0x28ad07(_0x2b8f28,_0x57ee0d);_0x191f75['push'](_0xb4fc32);}else await handleQueryOutput(_0x2b8f28,_0x4df3f8);}catch(_0x28a531){const _0x3b55a7=_0x101ce8?'Statement\x20'+_0x5a10f0+'/'+_0x2642fc+':\x0a':'',_0x19e3cf=_0x28a531 instanceof SDKError?_0x28a531[_0x21f479(0xd2)]:_0x28a531['message'];return console[_0x21f479(0xeb)](''+_0x3b55a7+_0x19e3cf),0x1;}}if(_0x4f3e25[_0x21f479(0xf6)]>0x1&&_0x54ecce&&_0x191f75[_0x21f479(0xf6)]>0x0){const _0x12b324=_0x191f75[_0x21f479(0xef)]('\x0a');writeFileSync(_0x4df3f8['output'],_0x12b324),console['error']('\x0aAll\x20results\x20saved\x20to\x20'+_0x4df3f8[_0x21f479(0xf2)]);}return 0x0;}catch(_0x144df1){throw _0x144df1;}}[a21_0x2fb6b(0xed)](_0x2fccb4){const _0x53475d=a21_0x2fb6b,_0x23e1e8=_0x2fccb4[_0x53475d(0x103)][0x0],_0x4eb242=_0x2fccb4[_0x53475d(0xe1)][_0x53475d(0x105)];if(!_0x23e1e8&&!_0x4eb242)return _0x53475d(0xd8);if(_0x23e1e8&&_0x4eb242)return _0x53475d(0xe4);return undefined;}}
@@ -1 +1 @@
1
- const a22_0x14b7e1=a22_0x25ac;(function(_0x3cfa12,_0x47cd52){const _0xd2da4f=a22_0x25ac,_0x1ac2a1=_0x3cfa12();while(!![]){try{const _0xb453e6=parseInt(_0xd2da4f(0x1f4))/0x1*(-parseInt(_0xd2da4f(0x1c9))/0x2)+parseInt(_0xd2da4f(0x1da))/0x3*(parseInt(_0xd2da4f(0x1a1))/0x4)+parseInt(_0xd2da4f(0x18d))/0x5+-parseInt(_0xd2da4f(0x19d))/0x6+-parseInt(_0xd2da4f(0x1ba))/0x7*(-parseInt(_0xd2da4f(0x1e0))/0x8)+parseInt(_0xd2da4f(0x183))/0x9+parseInt(_0xd2da4f(0x1ab))/0xa*(parseInt(_0xd2da4f(0x1b3))/0xb);if(_0xb453e6===_0x47cd52)break;else _0x1ac2a1['push'](_0x1ac2a1['shift']());}catch(_0x59d00e){_0x1ac2a1['push'](_0x1ac2a1['shift']());}}}(a22_0x4f69,0x4bd78));function a22_0x4f69(){const _0x85d79=['Examples:','Resolved\x20parent\x20folder\x20ID:\x20','verbose','Folder\x20name:\x20','Creating\x20folder\x20\x27','Usage:\x20tdx\x20segment\x20folder\x20list\x20<parent_name>','Parent\x20ID:\x20','1347756mQcmNd','in\x20','\x20rows\x20','elapsedTimeMillis','32TWeTMs','segment:sql','✔\x20Found\x20','\x20\x20tdx\x20segment\x20show\x20\x22High\x20Value\x22\x20\x20\x20\x20#\x20Relative\x20to\x20current\x20context','Execute\x20segment\x20SQL\x20query\x20and\x20show\x20results','Parent\x20segment:\x20','Error:\x20Folder\x20reference\x20is\x20required','Use:\x20tdx\x20segment\x20describe\x20<path>\x20\x20#\x20To\x20show\x20folder\x20details','information_schema','Usage:\x20tdx\x20segment\x20show\x20<path>','22160omiylI','✖\x20Query\x20failed\x20[','✔\x20Created\x20folder\x20\x27','\x20\x20tdx\x20segment\x20describe\x20\x22High\x20Value\x22\x20\x20\x20\x20#\x20Relative\x20to\x20current\x20context','Usage:\x20tdx\x20segment\x20folder\x20create\x20<parent_name>\x20<folder_name>\x20[options]','resolvePathToResource','Site:\x20','folderId','3388RlcohA','site','segment:describe','data','Fetching\x20SQL\x20for\x20parent\x20segment...','parentId','Error:\x20Parent\x20segment\x20name\x20is\x20required','7XrpJOp','setJobId','length','Resolving\x20path\x20\x27','trim','Error:\x20','segmentId','Resolving\x20folder\x20\x27','Folder\x20ID\x20missing\x20from\x20resolved\x20path','Fetching\x20folder\x20details...','INTERNAL','resolveFolderId','jsonl','query','getParent','2QIrYjU','segment','format','stats','Resolved\x20parent\x20ID:\x20','listFolders','Error:\x20Segment\x20path\x20or\x20name\x20is\x20required','List\x20segment\x20folders\x20under\x20a\x20parent\x20segment','\x20\x20tdx\x20segment\x20show\x20\x22My\x20Audience\x22','resolveParentId','message','getParentSQL','Resolved\x20folder\x20ID:\x20','Fetching\x20SQL\x20for\x20segment...','Listing\x20folders\x20for\x20parent\x20\x27','Error:\x20Path\x20or\x20name\x20is\x20required','createFolder','70539hOJOKD','getSegment','SELECT\x20*\x20FROM\x20(\x0a','✔\x20Query\x20completed:\x20Processed\x20','parentFolder','description','541088otePME','Error:\x20Cannot\x20execute\x20SQL\x20query\x20on\x20a\x20folder.','jobId','folder','Folder\x20ID:\x20','Show\x20segment\x20folder\x20details','SQL\x20query:\x0a','segment:folder:show','Executing\x20segment\x20query...','parent','segment:show','processedRows','test','\x27...','cause','Resolving\x20parent\x20folder\x20\x27','Fetching\x20segment\x20details...','Fetching\x20parent\x20segment\x20details...','segmentPath','getSegmentSQL','590422absqOd','Segment\x20ID:\x20','125334cZEZsD','execute','getFolder','Resolved\x20type:\x20','name','Usage:\x20tdx\x20segment\x20describe\x20<path>','Parent\x20name:\x20','Segment\x20ID\x20missing\x20from\x20resolved\x20path','Error:\x20Parent\x20segment\x20name\x20and\x20folder\x20name\x20are\x20required','Resolved\x20relative\x20path\x20to:\x20','867510eImwBF','Folders\x20are\x20organizational\x20containers,\x20not\x20queryable\x20segments.','type','\x0a)\x20AS\x20segment_query\x0aLIMIT\x20','Resolving\x20parent\x20segment\x20\x27','error','Show\x20segment\x20or\x20folder\x20details','includes','\x20\x20Cause:\x20'];a22_0x4f69=function(){return _0x85d79;};return a22_0x4f69();}import{BaseCommand}from'./command.js';import{SDKError,ErrorCode}from'../sdk/index.js';import{handleSDKOutput,handleQueryOutput}from'../utils/command-output.js';import{withSpinner,withQuerySpinner,formatElapsed}from'../utils/spinner.js';function a22_0x25ac(_0x37e3c3,_0x44864c){const _0x4f69f1=a22_0x4f69();return a22_0x25ac=function(_0x25acc8,_0x11b0c4){_0x25acc8=_0x25acc8-0x183;let _0x4cb02a=_0x4f69f1[_0x25acc8];return _0x4cb02a;},a22_0x25ac(_0x37e3c3,_0x44864c);}import{parseSegmentRef}from'../utils/segment-ref-parser.js';export class SegmentDescribeCommand extends BaseCommand{[a22_0x14b7e1(0x187)]=a22_0x14b7e1(0x1b5);[a22_0x14b7e1(0x1df)]=a22_0x14b7e1(0x193);async[a22_0x14b7e1(0x184)](_0x4a6a5b){const _0x3bbebd=a22_0x14b7e1,{options:_0x58fd3a,args:_0xd9ca7c,tdx:_0x46e972}=_0x4a6a5b;if(_0xd9ca7c[_0x3bbebd(0x1bc)]===0x0)return console[_0x3bbebd(0x192)](_0x3bbebd(0x1d8)),console[_0x3bbebd(0x192)](_0x3bbebd(0x188)),console[_0x3bbebd(0x192)](_0x3bbebd(0x196)),console['error']('\x20\x20tdx\x20segment\x20describe\x20\x22My\x20Audience\x22'),console[_0x3bbebd(0x192)]('\x20\x20tdx\x20segment\x20describe\x20\x22My\x20Audience/Marketing/High\x20Value\x22'),console[_0x3bbebd(0x192)](_0x3bbebd(0x1ae)),0x1;try{const _0x260c47=_0xd9ca7c[0x0],_0x1485b0=_0x58fd3a[_0x3bbebd(0x1f2)];let _0x256c14=_0x260c47;_0x1485b0&&!_0x260c47[_0x3bbebd(0x194)]('/')&&(_0x256c14=_0x1485b0+'/'+_0x260c47,_0x58fd3a['verbose']&&console[_0x3bbebd(0x192)](_0x3bbebd(0x18c)+_0x256c14));const _0x28581d=await withSpinner(_0x3bbebd(0x1bd)+_0x256c14+_0x3bbebd(0x1ed),()=>_0x46e972[_0x3bbebd(0x1ca)][_0x3bbebd(0x1b0)](_0x256c14),{'verbose':_0x58fd3a[_0x3bbebd(0x198)]}),_0x328f7c=_0x28581d[_0x3bbebd(0x1b6)];_0x58fd3a[_0x3bbebd(0x198)]&&(console['error'](_0x3bbebd(0x186)+_0x328f7c[_0x3bbebd(0x18f)]),console[_0x3bbebd(0x192)](_0x3bbebd(0x19c)+_0x328f7c['parentId']),_0x328f7c[_0x3bbebd(0x1b2)]&&console['error'](_0x3bbebd(0x1e4)+_0x328f7c[_0x3bbebd(0x1b2)]),_0x328f7c['segmentId']&&console[_0x3bbebd(0x192)](_0x3bbebd(0x1f5)+_0x328f7c['segmentId']));if(_0x328f7c['type']===_0x3bbebd(0x1e9)){const _0x544792=await withSpinner(_0x3bbebd(0x1f1),()=>_0x46e972[_0x3bbebd(0x1ca)][_0x3bbebd(0x1c8)](_0x328f7c[_0x3bbebd(0x1b8)]),{'verbose':_0x58fd3a[_0x3bbebd(0x198)]});await handleSDKOutput([_0x544792[_0x3bbebd(0x1b6)]],_0x58fd3a);}else{if(_0x328f7c['type']===_0x3bbebd(0x1e3)){if(!_0x328f7c[_0x3bbebd(0x1b2)])throw new SDKError(ErrorCode[_0x3bbebd(0x1c4)],_0x3bbebd(0x1c2));const _0x2b0e9e=await withSpinner(_0x3bbebd(0x1c3),()=>_0x46e972['segment'][_0x3bbebd(0x185)](_0x328f7c[_0x3bbebd(0x1b2)]),{'verbose':_0x58fd3a[_0x3bbebd(0x198)]});await handleSDKOutput([_0x2b0e9e['data']],_0x58fd3a);}else{if(_0x328f7c['type']==='segment'){if(!_0x328f7c[_0x3bbebd(0x1c0)])throw new SDKError(ErrorCode[_0x3bbebd(0x1c4)],_0x3bbebd(0x18a));const _0x1886e5=await withSpinner(_0x3bbebd(0x1f0),()=>_0x46e972[_0x3bbebd(0x1ca)][_0x3bbebd(0x1db)](_0x328f7c['parentId'],_0x328f7c[_0x3bbebd(0x1c0)]),{'verbose':_0x58fd3a[_0x3bbebd(0x198)]});await handleSDKOutput([_0x1886e5[_0x3bbebd(0x1b6)]],_0x58fd3a);}}}return 0x0;}catch(_0x51a417){if(_0x51a417 instanceof SDKError)return console[_0x3bbebd(0x192)](_0x3bbebd(0x1bf)+_0x51a417[_0x3bbebd(0x1d3)]),_0x51a417[_0x3bbebd(0x1ee)]&&console['error'](_0x3bbebd(0x195)+_0x51a417['cause']),0x1;throw _0x51a417;}}}export class SegmentShowCommand extends BaseCommand{[a22_0x14b7e1(0x187)]=a22_0x14b7e1(0x1ea);[a22_0x14b7e1(0x1df)]=a22_0x14b7e1(0x1a5);async['execute'](_0x504d46){const _0x3b15df=a22_0x14b7e1,{options:_0x518090,args:_0x1dfe93,tdx:_0x2ee8df}=_0x504d46;if(_0x1dfe93['length']===0x0)return console['error'](_0x3b15df(0x1cf)),console[_0x3b15df(0x192)](_0x3b15df(0x1aa)),console['error'](_0x3b15df(0x196)),console[_0x3b15df(0x192)](_0x3b15df(0x1d1)),console[_0x3b15df(0x192)]('\x20\x20tdx\x20segment\x20show\x20\x22My\x20Audience/Marketing/High\x20Value\x22'),console[_0x3b15df(0x192)](_0x3b15df(0x1a4)),0x1;try{const _0x4f0c46=_0x1dfe93[0x0],_0x46e3f0=_0x518090['segmentPath'];let _0x1d6361=_0x4f0c46;_0x46e3f0&&!_0x4f0c46[_0x3b15df(0x194)]('/')&&(_0x1d6361=_0x46e3f0+'/'+_0x4f0c46,_0x518090[_0x3b15df(0x198)]&&console[_0x3b15df(0x192)]('Resolved\x20relative\x20path\x20to:\x20'+_0x1d6361));const _0x512bef=await withSpinner(_0x3b15df(0x1bd)+_0x1d6361+_0x3b15df(0x1ed),()=>_0x2ee8df['segment'][_0x3b15df(0x1b0)](_0x1d6361),{'verbose':_0x518090[_0x3b15df(0x198)]}),_0x33835c=_0x512bef[_0x3b15df(0x1b6)];_0x518090[_0x3b15df(0x198)]&&(console[_0x3b15df(0x192)](_0x3b15df(0x186)+_0x33835c[_0x3b15df(0x18f)]),console[_0x3b15df(0x192)]('Parent\x20ID:\x20'+_0x33835c[_0x3b15df(0x1b8)]));if(_0x33835c['type']===_0x3b15df(0x1e3))return console[_0x3b15df(0x192)](_0x3b15df(0x1e1)),console[_0x3b15df(0x192)](_0x3b15df(0x1a8)),0x1;let _0x1a1381;if(_0x33835c[_0x3b15df(0x18f)]==='parent'){const _0x1b7edd=await withSpinner(_0x3b15df(0x1b7),()=>_0x2ee8df[_0x3b15df(0x1ca)][_0x3b15df(0x1d4)](_0x33835c[_0x3b15df(0x1b8)]),{'verbose':_0x518090[_0x3b15df(0x198)]});_0x1a1381=_0x1b7edd['data'];}else{if(!_0x33835c[_0x3b15df(0x1c0)])throw new SDKError(ErrorCode[_0x3b15df(0x1c4)],_0x3b15df(0x18a));const _0x58920a=await withSpinner(_0x3b15df(0x1d6),()=>_0x2ee8df[_0x3b15df(0x1ca)]['getSegmentSQL'](_0x33835c[_0x3b15df(0x1b8)],_0x33835c[_0x3b15df(0x1c0)]),{'verbose':_0x518090[_0x3b15df(0x198)]});_0x1a1381=_0x58920a[_0x3b15df(0x1b6)];}const _0x474261=_0x518090['limit'],_0x1cbbfc=/\bLIMIT\s+\d+/i[_0x3b15df(0x1ec)](_0x1a1381);!_0x1cbbfc&&(_0x1a1381=_0x1a1381[_0x3b15df(0x1be)]()['replace'](/;+$/,''),_0x1a1381=_0x3b15df(0x1dc)+_0x1a1381+_0x3b15df(0x190)+_0x474261);_0x518090[_0x3b15df(0x198)]&&console['error'](_0x3b15df(0x1e6)+_0x1a1381);const _0x202444=await withQuerySpinner(_0x3b15df(0x1e8),async _0x3a7a22=>{const _0x4ff6f2=_0x3b15df,_0x4e763e=await _0x2ee8df[_0x4ff6f2(0x1c7)](_0x1a1381,{'catalog':'td','schema':_0x4ff6f2(0x1a9),'onJobId':_0x34b6bf=>{const _0x498a74=_0x4ff6f2;_0x3a7a22[_0x498a74(0x1bb)](_0x34b6bf);}});return _0x4e763e;},{'verbose':_0x518090[_0x3b15df(0x198)]}),_0x1d07c9=_0x202444[_0x3b15df(0x1b6)],_0x3bfba6=_0x1d07c9[_0x3b15df(0x1e2)]?'\x20[Job\x20ID:\x20'+_0x1d07c9['jobId']+']':'';return console[_0x3b15df(0x192)](_0x3b15df(0x1dd)+_0x1d07c9['stats'][_0x3b15df(0x1eb)]['toLocaleString']()+_0x3b15df(0x19f)+(_0x3b15df(0x19e)+formatElapsed(_0x1d07c9[_0x3b15df(0x1cc)][_0x3b15df(0x1a0)])+_0x3bfba6)),await handleQueryOutput(_0x1d07c9,_0x518090),0x0;}catch(_0x4cb028){if(_0x4cb028 instanceof SDKError)return console['error'](_0x3b15df(0x1ac)+_0x4cb028['code']+']'),console[_0x3b15df(0x192)]('\x0a'+_0x4cb028[_0x3b15df(0x1d3)]),0x1;throw _0x4cb028;}}}export class SegmentFolderListCommand extends BaseCommand{['name']='segment:folder:list';[a22_0x14b7e1(0x1df)]=a22_0x14b7e1(0x1d0);async['execute'](_0x38cdaf){const _0x2efa88=a22_0x14b7e1,{options:_0x12da7e,args:_0x904d31,tdx:_0x15b9c6}=_0x38cdaf;if(_0x904d31[_0x2efa88(0x1bc)]===0x0)return console[_0x2efa88(0x192)](_0x2efa88(0x1b9)),console[_0x2efa88(0x192)](_0x2efa88(0x19b)),0x1;const _0x27e3a6=_0x904d31[0x0];try{_0x12da7e[_0x2efa88(0x198)]&&(console[_0x2efa88(0x192)](_0x2efa88(0x1b1)+_0x12da7e[_0x2efa88(0x1b4)]),console[_0x2efa88(0x192)](_0x2efa88(0x189)+_0x27e3a6));const _0x2d4c8c=await withSpinner(_0x2efa88(0x191)+_0x27e3a6+_0x2efa88(0x1ed),()=>_0x15b9c6[_0x2efa88(0x1ca)]['resolveParentId'](_0x27e3a6),{'verbose':_0x12da7e['verbose']}),_0x1edba7=_0x2d4c8c[_0x2efa88(0x1b6)];_0x12da7e[_0x2efa88(0x198)]&&console[_0x2efa88(0x192)](_0x2efa88(0x1cd)+_0x1edba7);const _0xea6e08=await withSpinner(_0x2efa88(0x1d7)+_0x27e3a6+_0x2efa88(0x1ed),()=>_0x15b9c6[_0x2efa88(0x1ca)][_0x2efa88(0x1ce)](_0x1edba7),{'verbose':_0x12da7e[_0x2efa88(0x198)]}),_0x3e162e=_0xea6e08[_0x2efa88(0x1b6)];return console[_0x2efa88(0x192)](_0x2efa88(0x1a3)+_0x3e162e['length']+'\x20folder'+(_0x3e162e['length']!==0x1?'s':'')),await handleSDKOutput(_0x3e162e,_0x12da7e),0x0;}catch(_0x34f15d){if(_0x34f15d instanceof SDKError)return console[_0x2efa88(0x192)](_0x2efa88(0x1bf)+_0x34f15d[_0x2efa88(0x1d3)]),_0x34f15d[_0x2efa88(0x1ee)]&&console[_0x2efa88(0x192)](_0x2efa88(0x195)+_0x34f15d[_0x2efa88(0x1ee)]),0x1;throw _0x34f15d;}}}export class SegmentFolderShowCommand extends BaseCommand{['name']=a22_0x14b7e1(0x1e7);[a22_0x14b7e1(0x1df)]=a22_0x14b7e1(0x1e5);async['execute'](_0x33e7a4){const _0x123cb9=a22_0x14b7e1,{options:_0x276c76,args:_0x33ecd2,tdx:_0x5199ae}=_0x33e7a4;if(_0x33ecd2[_0x123cb9(0x1bc)]===0x0)return console[_0x123cb9(0x192)](_0x123cb9(0x1a7)),console[_0x123cb9(0x192)]('Usage:\x20tdx\x20segment\x20folder\x20show\x20<parent_name/folder_name>'),0x1;try{const {parentId:_0x4369e6,childId:_0x4feaa9}=parseSegmentRef(_0x33ecd2[0x0]);_0x276c76['verbose']&&(console[_0x123cb9(0x192)](_0x123cb9(0x1b1)+_0x276c76[_0x123cb9(0x1b4)]),console[_0x123cb9(0x192)](_0x123cb9(0x189)+_0x4369e6),_0x4feaa9&&console['error']('Folder\x20name:\x20'+_0x4feaa9));if(!_0x4feaa9)return console[_0x123cb9(0x192)]('Error:\x20Folder\x20name\x20is\x20required\x20(use\x20parent_name/folder_name\x20format)'),0x1;const _0x1b25d4=await withSpinner('Resolving\x20parent\x20segment\x20\x27'+_0x4369e6+_0x123cb9(0x1ed),()=>_0x5199ae[_0x123cb9(0x1ca)][_0x123cb9(0x1d2)](_0x4369e6),{'verbose':_0x276c76['verbose']}),_0x55c5dc=_0x1b25d4['data'];_0x276c76[_0x123cb9(0x198)]&&console[_0x123cb9(0x192)](_0x123cb9(0x1cd)+_0x55c5dc);const _0x39cb58=await withSpinner(_0x123cb9(0x1c1)+_0x4feaa9+'\x27...',()=>_0x5199ae[_0x123cb9(0x1ca)][_0x123cb9(0x1c5)](_0x55c5dc,_0x4feaa9),{'verbose':_0x276c76[_0x123cb9(0x198)]}),_0x25ffaa=_0x39cb58[_0x123cb9(0x1b6)];_0x276c76[_0x123cb9(0x198)]&&console[_0x123cb9(0x192)](_0x123cb9(0x1d5)+_0x25ffaa);const _0x2c14a9=await withSpinner('Fetching\x20folder\x20\x27'+_0x4feaa9+'\x27...',()=>_0x5199ae[_0x123cb9(0x1ca)]['getFolder'](_0x25ffaa),{'verbose':_0x276c76[_0x123cb9(0x198)]});return await handleSDKOutput([_0x2c14a9[_0x123cb9(0x1b6)]],_0x276c76),0x0;}catch(_0x279d2f){if(_0x279d2f instanceof SDKError)return console['error']('Error:\x20'+_0x279d2f['message']),_0x279d2f['cause']&&console[_0x123cb9(0x192)]('\x20\x20Cause:\x20'+_0x279d2f[_0x123cb9(0x1ee)]),0x1;throw _0x279d2f;}}}export class SegmentSQLCommand extends BaseCommand{[a22_0x14b7e1(0x187)]=a22_0x14b7e1(0x1a2);[a22_0x14b7e1(0x1df)]='Get\x20SQL\x20query\x20for\x20parent\x20or\x20child\x20segment';async['execute'](_0x23a57a){const _0x4d68e8=a22_0x14b7e1,{options:_0x4334c1,args:_0x31e420,tdx:_0x3ed2c1}=_0x23a57a;if(_0x31e420[_0x4d68e8(0x1bc)]===0x0)return console[_0x4d68e8(0x192)](_0x4d68e8(0x1cf)),console[_0x4d68e8(0x192)]('Usage:\x20tdx\x20segment\x20sql\x20<path>'),console[_0x4d68e8(0x192)]('Examples:'),console[_0x4d68e8(0x192)]('\x20\x20tdx\x20segment\x20sql\x20\x22My\x20Audience\x22'),console[_0x4d68e8(0x192)]('\x20\x20tdx\x20segment\x20sql\x20\x22My\x20Audience/Marketing/High\x20Value\x22'),console[_0x4d68e8(0x192)]('\x20\x20tdx\x20segment\x20sql\x20\x22High\x20Value\x22\x20\x20\x20\x20#\x20Relative\x20to\x20current\x20context'),0x1;try{const _0x3cb893=_0x31e420[0x0],_0x45b301=_0x4334c1[_0x4d68e8(0x1f2)];let _0x35e528=_0x3cb893;_0x45b301&&!_0x3cb893[_0x4d68e8(0x194)]('/')&&(_0x35e528=_0x45b301+'/'+_0x3cb893,_0x4334c1[_0x4d68e8(0x198)]&&console[_0x4d68e8(0x192)](_0x4d68e8(0x18c)+_0x35e528));const _0x107bf9=await withSpinner('Resolving\x20path\x20\x27'+_0x35e528+'\x27...',()=>_0x3ed2c1[_0x4d68e8(0x1ca)][_0x4d68e8(0x1b0)](_0x35e528),{'verbose':_0x4334c1[_0x4d68e8(0x198)]}),_0x212abe=_0x107bf9[_0x4d68e8(0x1b6)];_0x4334c1['verbose']&&(console[_0x4d68e8(0x192)]('Resolved\x20type:\x20'+_0x212abe[_0x4d68e8(0x18f)]),console[_0x4d68e8(0x192)](_0x4d68e8(0x19c)+_0x212abe[_0x4d68e8(0x1b8)]));if(_0x212abe[_0x4d68e8(0x18f)]===_0x4d68e8(0x1e3))return console[_0x4d68e8(0x192)]('Error:\x20Cannot\x20get\x20SQL\x20query\x20for\x20a\x20folder.'),console[_0x4d68e8(0x192)](_0x4d68e8(0x18e)),0x1;let _0x4a29c8;if(_0x212abe['type']===_0x4d68e8(0x1e9)){const _0x1b8bb6=await withSpinner(_0x4d68e8(0x1b7),()=>_0x3ed2c1[_0x4d68e8(0x1ca)][_0x4d68e8(0x1d4)](_0x212abe[_0x4d68e8(0x1b8)]),{'verbose':_0x4334c1[_0x4d68e8(0x198)]});_0x4a29c8=_0x1b8bb6[_0x4d68e8(0x1b6)];}else{if(!_0x212abe[_0x4d68e8(0x1c0)])throw new SDKError(ErrorCode['INTERNAL'],'Segment\x20ID\x20missing\x20from\x20resolved\x20path');const _0x58aee9=await withSpinner(_0x4d68e8(0x1d6),()=>_0x3ed2c1[_0x4d68e8(0x1ca)][_0x4d68e8(0x1f3)](_0x212abe['parentId'],_0x212abe[_0x4d68e8(0x1c0)]),{'verbose':_0x4334c1[_0x4d68e8(0x198)]});_0x4a29c8=_0x58aee9[_0x4d68e8(0x1b6)];}return _0x4334c1[_0x4d68e8(0x1cb)]==='json'||_0x4334c1['format']===_0x4d68e8(0x1c6)?await handleSDKOutput([{'sql':_0x4a29c8}],_0x4334c1):console['log'](_0x4a29c8),0x0;}catch(_0x43a378){if(_0x43a378 instanceof SDKError)return console['error']('Error:\x20'+_0x43a378[_0x4d68e8(0x1d3)]),_0x43a378['cause']&&console[_0x4d68e8(0x192)](_0x4d68e8(0x195)+_0x43a378['cause']),0x1;throw _0x43a378;}}}export class SegmentFolderCreateCommand extends BaseCommand{[a22_0x14b7e1(0x187)]='segment:folder:create';[a22_0x14b7e1(0x1df)]='Create\x20segment\x20folder\x20for\x20organization';async['execute'](_0x4159c2){const _0x5e0b57=a22_0x14b7e1,{options:_0x3889fe,args:_0x400ef1,tdx:_0x3e378f}=_0x4159c2,_0x50ec8a=_0x3889fe;if(_0x400ef1['length']<0x2)return console[_0x5e0b57(0x192)](_0x5e0b57(0x18b)),console[_0x5e0b57(0x192)](_0x5e0b57(0x1af)),0x1;const _0x519321=_0x400ef1[0x0],_0x3530a4=_0x400ef1[0x1];_0x50ec8a[_0x5e0b57(0x198)]&&(console[_0x5e0b57(0x192)]('Site:\x20'+_0x50ec8a[_0x5e0b57(0x1b4)]),console[_0x5e0b57(0x192)](_0x5e0b57(0x1a6)+_0x519321),console[_0x5e0b57(0x192)](_0x5e0b57(0x199)+_0x3530a4));let _0x15355f;if(_0x50ec8a[_0x5e0b57(0x1de)]){const _0x325b3d=_0x50ec8a[_0x5e0b57(0x1de)],_0x1784b6=await withSpinner(_0x5e0b57(0x191)+_0x519321+_0x5e0b57(0x1ed),()=>_0x3e378f[_0x5e0b57(0x1ca)][_0x5e0b57(0x1d2)](_0x519321),{'verbose':_0x50ec8a[_0x5e0b57(0x198)]}),_0x20e870=_0x1784b6[_0x5e0b57(0x1b6)],_0x495e1a=await withSpinner(_0x5e0b57(0x1ef)+_0x325b3d+'\x27...',()=>_0x3e378f[_0x5e0b57(0x1ca)][_0x5e0b57(0x1c5)](_0x20e870,_0x325b3d),{'verbose':_0x50ec8a['verbose']});_0x15355f=_0x495e1a['data'],_0x50ec8a[_0x5e0b57(0x198)]&&console[_0x5e0b57(0x192)](_0x5e0b57(0x197)+_0x15355f);}const _0x3a194a={'name':_0x3530a4,'description':_0x50ec8a[_0x5e0b57(0x1df)],'parentFolderId':_0x15355f},_0x1ee4c2=await withSpinner(_0x5e0b57(0x19a)+_0x3530a4+_0x5e0b57(0x1ed),()=>_0x3e378f[_0x5e0b57(0x1ca)][_0x5e0b57(0x1d9)](_0x519321,_0x3a194a),{'verbose':_0x50ec8a[_0x5e0b57(0x198)]}),_0x438e24=_0x1ee4c2[_0x5e0b57(0x1b6)];return console[_0x5e0b57(0x192)](_0x5e0b57(0x1ad)+_0x438e24[_0x5e0b57(0x187)]+'\x27\x20with\x20ID:\x20'+_0x438e24['id']),await handleSDKOutput([_0x438e24],_0x50ec8a),0x0;}}
1
+ const a22_0x6aa9a0=a22_0x3b02;(function(_0x536975,_0x3669ab){const _0x3654f2=a22_0x3b02,_0x76324d=_0x536975();while(!![]){try{const _0x324ffa=parseInt(_0x3654f2(0x18c))/0x1+-parseInt(_0x3654f2(0x164))/0x2+parseInt(_0x3654f2(0x187))/0x3*(parseInt(_0x3654f2(0x141))/0x4)+parseInt(_0x3654f2(0x16f))/0x5+-parseInt(_0x3654f2(0x14e))/0x6*(-parseInt(_0x3654f2(0x179))/0x7)+parseInt(_0x3654f2(0x14c))/0x8+parseInt(_0x3654f2(0x13a))/0x9*(-parseInt(_0x3654f2(0x17d))/0xa);if(_0x324ffa===_0x3669ab)break;else _0x76324d['push'](_0x76324d['shift']());}catch(_0x40de57){_0x76324d['push'](_0x76324d['shift']());}}}(a22_0x3554,0xd5145));import{BaseCommand}from'./command.js';import{SDKError,ErrorCode}from'../sdk/index.js';import{handleSDKOutput,handleQueryOutput}from'../utils/command-output.js';import{withSpinner,withQuerySpinner,formatElapsed}from'../utils/spinner.js';function a22_0x3554(){const _0x56f382=['message','folder','Fetching\x20folder\x20\x27','getSegmentSQL','\x20\x20tdx\x20segment\x20show\x20\x22My\x20Audience\x22','Fetching\x20folder\x20details...','INTERNAL','query','toLocaleString','261GztdPi','description','\x20\x20tdx\x20segment\x20sql\x20\x22My\x20Audience\x22','length','folderId','segmentId','name','4lVZRpb','Resolved\x20parent\x20ID:\x20','Resolved\x20parent\x20folder\x20ID:\x20','in\x20','segment','Creating\x20folder\x20\x27','Parent\x20name:\x20','stats','parent','site','includes','9280000lZxrLS','Fetching\x20SQL\x20for\x20segment...','1230GghRYf','limit','cause','format','Usage:\x20tdx\x20segment\x20describe\x20<path>','code','Use:\x20tdx\x20segment\x20describe\x20<path>\x20\x20#\x20To\x20show\x20folder\x20details','Resolving\x20path\x20\x27','createFolder','segment:describe','jobId','error','✔\x20Created\x20folder\x20\x27','Usage:\x20tdx\x20segment\x20folder\x20list\x20<parent_name>','Resolved\x20type:\x20','\x20\x20tdx\x20segment\x20describe\x20\x22My\x20Audience\x22','Examples:','setJobId','Execute\x20segment\x20SQL\x20query\x20and\x20show\x20results','execute','Fetching\x20segment\x20details...','parentId','1384396NjIffa','List\x20segment\x20folders\x20under\x20a\x20parent\x20segment','parentFolder','Executing\x20segment\x20query...','\x20\x20tdx\x20segment\x20sql\x20\x22High\x20Value\x22\x20\x20\x20\x20#\x20Relative\x20to\x20current\x20context','getParentSQL','\x27\x20with\x20ID:\x20','Fetching\x20SQL\x20for\x20parent\x20segment...','resolveParentId','Error:\x20Path\x20or\x20name\x20is\x20required','getFolder','5145555VcXTKg','Parent\x20segment:\x20','\x20folder','Create\x20segment\x20folder\x20for\x20organization','type','Usage:\x20tdx\x20segment\x20show\x20<path>','processedRows','Error:\x20Folder\x20name\x20is\x20required\x20(use\x20parent_name/folder_name\x20format)','✖\x20Query\x20failed\x20[','Resolved\x20relative\x20path\x20to:\x20','7406dzstvq','segment:folder:list','Error:\x20Segment\x20path\x20or\x20name\x20is\x20required','\x27...','1034560MPQgWE','segment:show','getSegment','Get\x20SQL\x20query\x20for\x20parent\x20or\x20child\x20segment','segment:sql','Folder\x20name:\x20','Resolved\x20folder\x20ID:\x20','\x20[Job\x20ID:\x20','SELECT\x20*\x20FROM\x20(\x0a','Segment\x20ID:\x20','2720871wnkSzH','\x20rows\x20','information_schema','resolvePathToResource','SQL\x20query:\x0a','1252237sudulw','Error:\x20Folder\x20reference\x20is\x20required','Usage:\x20tdx\x20segment\x20folder\x20create\x20<parent_name>\x20<folder_name>\x20[options]','verbose','Error:\x20','segmentPath','Error:\x20Cannot\x20get\x20SQL\x20query\x20for\x20a\x20folder.','resolveFolderId','Resolving\x20folder\x20\x27','\x20\x20tdx\x20segment\x20describe\x20\x22High\x20Value\x22\x20\x20\x20\x20#\x20Relative\x20to\x20current\x20context','Folders\x20are\x20organizational\x20containers,\x20not\x20queryable\x20segments.','Usage:\x20tdx\x20segment\x20folder\x20show\x20<parent_name/folder_name>','Site:\x20','Show\x20segment\x20folder\x20details','data','\x20\x20Cause:\x20','Segment\x20ID\x20missing\x20from\x20resolved\x20path','✔\x20Query\x20completed:\x20Processed\x20','Error:\x20Parent\x20segment\x20name\x20is\x20required','Parent\x20ID:\x20','\x20\x20tdx\x20segment\x20show\x20\x22My\x20Audience/Marketing/High\x20Value\x22'];a22_0x3554=function(){return _0x56f382;};return a22_0x3554();}import{parseSegmentRef}from'../utils/segment-ref-parser.js';export class SegmentDescribeCommand extends BaseCommand{['name']=a22_0x6aa9a0(0x157);[a22_0x6aa9a0(0x13b)]='Show\x20segment\x20or\x20folder\x20details';async[a22_0x6aa9a0(0x161)](_0x3efd96){const _0x546715=a22_0x6aa9a0,{options:_0x25a5ab,args:_0x28554f,tdx:_0x4a26e7}=_0x3efd96;if(_0x28554f[_0x546715(0x13d)]===0x0)return console['error'](_0x546715(0x16d)),console['error'](_0x546715(0x152)),console[_0x546715(0x159)](_0x546715(0x15e)),console[_0x546715(0x159)](_0x546715(0x15d)),console[_0x546715(0x159)]('\x20\x20tdx\x20segment\x20describe\x20\x22My\x20Audience/Marketing/High\x20Value\x22'),console['error'](_0x546715(0x195)),0x1;try{const _0x34bf27=_0x28554f[0x0],_0x3f80a9=_0x25a5ab[_0x546715(0x191)];let _0x582eff=_0x34bf27;_0x3f80a9&&!_0x34bf27[_0x546715(0x14b)]('/')&&(_0x582eff=_0x3f80a9+'/'+_0x34bf27,_0x25a5ab[_0x546715(0x18f)]&&console[_0x546715(0x159)](_0x546715(0x178)+_0x582eff));const _0x418dd7=await withSpinner(_0x546715(0x155)+_0x582eff+_0x546715(0x17c),()=>_0x4a26e7[_0x546715(0x145)][_0x546715(0x18a)](_0x582eff),{'verbose':_0x25a5ab['verbose']}),_0x14e66e=_0x418dd7[_0x546715(0x19a)];_0x25a5ab[_0x546715(0x18f)]&&(console['error'](_0x546715(0x15c)+_0x14e66e[_0x546715(0x173)]),console[_0x546715(0x159)](_0x546715(0x19f)+_0x14e66e[_0x546715(0x163)]),_0x14e66e[_0x546715(0x13e)]&&console[_0x546715(0x159)]('Folder\x20ID:\x20'+_0x14e66e['folderId']),_0x14e66e[_0x546715(0x13f)]&&console[_0x546715(0x159)](_0x546715(0x186)+_0x14e66e[_0x546715(0x13f)]));if(_0x14e66e[_0x546715(0x173)]===_0x546715(0x149)){const _0x4823ee=await withSpinner('Fetching\x20parent\x20segment\x20details...',()=>_0x4a26e7[_0x546715(0x145)]['getParent'](_0x14e66e[_0x546715(0x163)]),{'verbose':_0x25a5ab[_0x546715(0x18f)]});await handleSDKOutput([_0x4823ee['data']],_0x25a5ab);}else{if(_0x14e66e['type']===_0x546715(0x132)){if(!_0x14e66e[_0x546715(0x13e)])throw new SDKError(ErrorCode[_0x546715(0x137)],'Folder\x20ID\x20missing\x20from\x20resolved\x20path');const _0x824cf9=await withSpinner(_0x546715(0x136),()=>_0x4a26e7['segment']['getFolder'](_0x14e66e[_0x546715(0x13e)]),{'verbose':_0x25a5ab[_0x546715(0x18f)]});await handleSDKOutput([_0x824cf9[_0x546715(0x19a)]],_0x25a5ab);}else{if(_0x14e66e['type']===_0x546715(0x145)){if(!_0x14e66e['segmentId'])throw new SDKError(ErrorCode[_0x546715(0x137)],_0x546715(0x19c));const _0x55e291=await withSpinner(_0x546715(0x162),()=>_0x4a26e7[_0x546715(0x145)][_0x546715(0x17f)](_0x14e66e[_0x546715(0x163)],_0x14e66e[_0x546715(0x13f)]),{'verbose':_0x25a5ab[_0x546715(0x18f)]});await handleSDKOutput([_0x55e291['data']],_0x25a5ab);}}}return 0x0;}catch(_0x58902d){if(_0x58902d instanceof SDKError)return console[_0x546715(0x159)](_0x546715(0x190)+_0x58902d[_0x546715(0x1a1)]),_0x58902d[_0x546715(0x150)]&&console[_0x546715(0x159)]('\x20\x20Cause:\x20'+_0x58902d[_0x546715(0x150)]),0x1;throw _0x58902d;}}}export class SegmentShowCommand extends BaseCommand{[a22_0x6aa9a0(0x140)]=a22_0x6aa9a0(0x17e);[a22_0x6aa9a0(0x13b)]=a22_0x6aa9a0(0x160);async[a22_0x6aa9a0(0x161)](_0x8887f8){const _0x1ab5b2=a22_0x6aa9a0,{options:_0x4de180,args:_0x30df0b,tdx:_0x1285ef}=_0x8887f8;if(_0x30df0b[_0x1ab5b2(0x13d)]===0x0)return console['error'](_0x1ab5b2(0x17b)),console[_0x1ab5b2(0x159)](_0x1ab5b2(0x174)),console[_0x1ab5b2(0x159)](_0x1ab5b2(0x15e)),console['error'](_0x1ab5b2(0x135)),console[_0x1ab5b2(0x159)](_0x1ab5b2(0x1a0)),console[_0x1ab5b2(0x159)]('\x20\x20tdx\x20segment\x20show\x20\x22High\x20Value\x22\x20\x20\x20\x20#\x20Relative\x20to\x20current\x20context'),0x1;try{const _0x21fb9b=_0x30df0b[0x0],_0xf06781=_0x4de180[_0x1ab5b2(0x191)];let _0x4e0def=_0x21fb9b;_0xf06781&&!_0x21fb9b[_0x1ab5b2(0x14b)]('/')&&(_0x4e0def=_0xf06781+'/'+_0x21fb9b,_0x4de180[_0x1ab5b2(0x18f)]&&console[_0x1ab5b2(0x159)](_0x1ab5b2(0x178)+_0x4e0def));const _0x15dc8a=await withSpinner('Resolving\x20path\x20\x27'+_0x4e0def+'\x27...',()=>_0x1285ef[_0x1ab5b2(0x145)][_0x1ab5b2(0x18a)](_0x4e0def),{'verbose':_0x4de180['verbose']}),_0x4e620b=_0x15dc8a['data'];_0x4de180[_0x1ab5b2(0x18f)]&&(console['error'](_0x1ab5b2(0x15c)+_0x4e620b['type']),console[_0x1ab5b2(0x159)](_0x1ab5b2(0x19f)+_0x4e620b['parentId']));if(_0x4e620b[_0x1ab5b2(0x173)]==='folder')return console[_0x1ab5b2(0x159)]('Error:\x20Cannot\x20execute\x20SQL\x20query\x20on\x20a\x20folder.'),console['error'](_0x1ab5b2(0x154)),0x1;let _0x1b38c3;if(_0x4e620b[_0x1ab5b2(0x173)]===_0x1ab5b2(0x149)){const _0x5adf4f=await withSpinner(_0x1ab5b2(0x16b),()=>_0x1285ef[_0x1ab5b2(0x145)][_0x1ab5b2(0x169)](_0x4e620b[_0x1ab5b2(0x163)]),{'verbose':_0x4de180[_0x1ab5b2(0x18f)]});_0x1b38c3=_0x5adf4f[_0x1ab5b2(0x19a)];}else{if(!_0x4e620b[_0x1ab5b2(0x13f)])throw new SDKError(ErrorCode['INTERNAL'],'Segment\x20ID\x20missing\x20from\x20resolved\x20path');const _0x2e708f=await withSpinner(_0x1ab5b2(0x14d),()=>_0x1285ef['segment'][_0x1ab5b2(0x134)](_0x4e620b[_0x1ab5b2(0x163)],_0x4e620b[_0x1ab5b2(0x13f)]),{'verbose':_0x4de180['verbose']});_0x1b38c3=_0x2e708f['data'];}const _0x2724b6=_0x4de180[_0x1ab5b2(0x14f)],_0xbea732=/\bLIMIT\s+\d+/i['test'](_0x1b38c3);!_0xbea732&&(_0x1b38c3=_0x1b38c3['trim']()['replace'](/;+$/,''),_0x1b38c3=_0x1ab5b2(0x185)+_0x1b38c3+'\x0a)\x20AS\x20segment_query\x0aLIMIT\x20'+_0x2724b6);_0x4de180['verbose']&&console[_0x1ab5b2(0x159)](_0x1ab5b2(0x18b)+_0x1b38c3);const _0x34ea77=await withQuerySpinner(_0x1ab5b2(0x167),async _0x1f0db9=>{const _0x2c3104=_0x1ab5b2,_0x4ebfca=await _0x1285ef[_0x2c3104(0x138)](_0x1b38c3,{'catalog':'td','schema':_0x2c3104(0x189),'onJobId':_0x51a2d8=>{const _0x2bc4c6=_0x2c3104;_0x1f0db9[_0x2bc4c6(0x15f)](_0x51a2d8);}});return _0x4ebfca;},{'verbose':_0x4de180[_0x1ab5b2(0x18f)]}),_0xaef9d7=_0x34ea77[_0x1ab5b2(0x19a)],_0x42fef9=_0xaef9d7['jobId']?_0x1ab5b2(0x184)+_0xaef9d7[_0x1ab5b2(0x158)]+']':'';return console[_0x1ab5b2(0x159)](_0x1ab5b2(0x19d)+_0xaef9d7[_0x1ab5b2(0x148)][_0x1ab5b2(0x175)][_0x1ab5b2(0x139)]()+_0x1ab5b2(0x188)+(_0x1ab5b2(0x144)+formatElapsed(_0xaef9d7[_0x1ab5b2(0x148)]['elapsedTimeMillis'])+_0x42fef9)),await handleQueryOutput(_0xaef9d7,_0x4de180),0x0;}catch(_0x580257){if(_0x580257 instanceof SDKError)return console[_0x1ab5b2(0x159)](_0x1ab5b2(0x177)+_0x580257[_0x1ab5b2(0x153)]+']'),console['error']('\x0a'+_0x580257[_0x1ab5b2(0x1a1)]),0x1;throw _0x580257;}}}export class SegmentFolderListCommand extends BaseCommand{['name']=a22_0x6aa9a0(0x17a);[a22_0x6aa9a0(0x13b)]=a22_0x6aa9a0(0x165);async[a22_0x6aa9a0(0x161)](_0x32b433){const _0x443c18=a22_0x6aa9a0,{options:_0x3868e5,args:_0x57962c,tdx:_0x1c438f}=_0x32b433;if(_0x57962c[_0x443c18(0x13d)]===0x0)return console[_0x443c18(0x159)](_0x443c18(0x19e)),console[_0x443c18(0x159)](_0x443c18(0x15b)),0x1;const _0x34b24e=_0x57962c[0x0];try{_0x3868e5[_0x443c18(0x18f)]&&(console['error'](_0x443c18(0x198)+_0x3868e5[_0x443c18(0x14a)]),console[_0x443c18(0x159)](_0x443c18(0x147)+_0x34b24e));const _0x4c6d3c=await withSpinner('Resolving\x20parent\x20segment\x20\x27'+_0x34b24e+_0x443c18(0x17c),()=>_0x1c438f[_0x443c18(0x145)][_0x443c18(0x16c)](_0x34b24e),{'verbose':_0x3868e5['verbose']}),_0x59b5cc=_0x4c6d3c[_0x443c18(0x19a)];_0x3868e5[_0x443c18(0x18f)]&&console['error'](_0x443c18(0x142)+_0x59b5cc);const _0x1e1fc8=await withSpinner('Listing\x20folders\x20for\x20parent\x20\x27'+_0x34b24e+'\x27...',()=>_0x1c438f[_0x443c18(0x145)]['listFolders'](_0x59b5cc),{'verbose':_0x3868e5[_0x443c18(0x18f)]}),_0x3700ee=_0x1e1fc8['data'];return console[_0x443c18(0x159)]('✔\x20Found\x20'+_0x3700ee[_0x443c18(0x13d)]+_0x443c18(0x171)+(_0x3700ee[_0x443c18(0x13d)]!==0x1?'s':'')),await handleSDKOutput(_0x3700ee,_0x3868e5),0x0;}catch(_0x29a081){if(_0x29a081 instanceof SDKError)return console[_0x443c18(0x159)](_0x443c18(0x190)+_0x29a081[_0x443c18(0x1a1)]),_0x29a081[_0x443c18(0x150)]&&console[_0x443c18(0x159)](_0x443c18(0x19b)+_0x29a081[_0x443c18(0x150)]),0x1;throw _0x29a081;}}}export class SegmentFolderShowCommand extends BaseCommand{[a22_0x6aa9a0(0x140)]='segment:folder:show';['description']=a22_0x6aa9a0(0x199);async[a22_0x6aa9a0(0x161)](_0x3ddd1d){const _0x32d27d=a22_0x6aa9a0,{options:_0x3409ec,args:_0x2e6ef3,tdx:_0x5215d5}=_0x3ddd1d;if(_0x2e6ef3[_0x32d27d(0x13d)]===0x0)return console[_0x32d27d(0x159)](_0x32d27d(0x18d)),console[_0x32d27d(0x159)](_0x32d27d(0x197)),0x1;try{const {parentId:_0x394bed,childId:_0x2f3af2}=parseSegmentRef(_0x2e6ef3[0x0]);_0x3409ec[_0x32d27d(0x18f)]&&(console[_0x32d27d(0x159)](_0x32d27d(0x198)+_0x3409ec[_0x32d27d(0x14a)]),console['error'](_0x32d27d(0x147)+_0x394bed),_0x2f3af2&&console[_0x32d27d(0x159)](_0x32d27d(0x182)+_0x2f3af2));if(!_0x2f3af2)return console[_0x32d27d(0x159)](_0x32d27d(0x176)),0x1;const _0x3b9823=await withSpinner('Resolving\x20parent\x20segment\x20\x27'+_0x394bed+'\x27...',()=>_0x5215d5[_0x32d27d(0x145)][_0x32d27d(0x16c)](_0x394bed),{'verbose':_0x3409ec[_0x32d27d(0x18f)]}),_0x55123f=_0x3b9823[_0x32d27d(0x19a)];_0x3409ec[_0x32d27d(0x18f)]&&console[_0x32d27d(0x159)](_0x32d27d(0x142)+_0x55123f);const _0x320e8d=await withSpinner(_0x32d27d(0x194)+_0x2f3af2+_0x32d27d(0x17c),()=>_0x5215d5['segment'][_0x32d27d(0x193)](_0x55123f,_0x2f3af2),{'verbose':_0x3409ec[_0x32d27d(0x18f)]}),_0x520c9d=_0x320e8d[_0x32d27d(0x19a)];_0x3409ec[_0x32d27d(0x18f)]&&console[_0x32d27d(0x159)](_0x32d27d(0x183)+_0x520c9d);const _0x2a5f35=await withSpinner(_0x32d27d(0x133)+_0x2f3af2+_0x32d27d(0x17c),()=>_0x5215d5[_0x32d27d(0x145)][_0x32d27d(0x16e)](_0x520c9d),{'verbose':_0x3409ec[_0x32d27d(0x18f)]});return await handleSDKOutput([_0x2a5f35['data']],_0x3409ec),0x0;}catch(_0x22c1ee){if(_0x22c1ee instanceof SDKError)return console[_0x32d27d(0x159)]('Error:\x20'+_0x22c1ee['message']),_0x22c1ee['cause']&&console['error'](_0x32d27d(0x19b)+_0x22c1ee[_0x32d27d(0x150)]),0x1;throw _0x22c1ee;}}}function a22_0x3b02(_0x6324fb,_0x266986){const _0x35546f=a22_0x3554();return a22_0x3b02=function(_0x3b027d,_0x2a9953){_0x3b027d=_0x3b027d-0x132;let _0xb1f282=_0x35546f[_0x3b027d];return _0xb1f282;},a22_0x3b02(_0x6324fb,_0x266986);}export class SegmentSQLCommand extends BaseCommand{[a22_0x6aa9a0(0x140)]=a22_0x6aa9a0(0x181);[a22_0x6aa9a0(0x13b)]=a22_0x6aa9a0(0x180);async[a22_0x6aa9a0(0x161)](_0x2b1818){const _0x4fecc8=a22_0x6aa9a0,{options:_0x45d9a6,args:_0x9e977e,tdx:_0x2dfa98}=_0x2b1818;if(_0x9e977e[_0x4fecc8(0x13d)]===0x0)return console['error'](_0x4fecc8(0x17b)),console[_0x4fecc8(0x159)]('Usage:\x20tdx\x20segment\x20sql\x20<path>'),console[_0x4fecc8(0x159)]('Examples:'),console[_0x4fecc8(0x159)](_0x4fecc8(0x13c)),console['error']('\x20\x20tdx\x20segment\x20sql\x20\x22My\x20Audience/Marketing/High\x20Value\x22'),console['error'](_0x4fecc8(0x168)),0x1;try{const _0x2ac7c6=_0x9e977e[0x0],_0x5e0878=_0x45d9a6[_0x4fecc8(0x191)];let _0x345913=_0x2ac7c6;_0x5e0878&&!_0x2ac7c6[_0x4fecc8(0x14b)]('/')&&(_0x345913=_0x5e0878+'/'+_0x2ac7c6,_0x45d9a6[_0x4fecc8(0x18f)]&&console[_0x4fecc8(0x159)](_0x4fecc8(0x178)+_0x345913));const _0x41efb3=await withSpinner(_0x4fecc8(0x155)+_0x345913+_0x4fecc8(0x17c),()=>_0x2dfa98[_0x4fecc8(0x145)][_0x4fecc8(0x18a)](_0x345913),{'verbose':_0x45d9a6[_0x4fecc8(0x18f)]}),_0x8a293=_0x41efb3['data'];_0x45d9a6[_0x4fecc8(0x18f)]&&(console[_0x4fecc8(0x159)]('Resolved\x20type:\x20'+_0x8a293['type']),console[_0x4fecc8(0x159)](_0x4fecc8(0x19f)+_0x8a293[_0x4fecc8(0x163)]));if(_0x8a293[_0x4fecc8(0x173)]===_0x4fecc8(0x132))return console[_0x4fecc8(0x159)](_0x4fecc8(0x192)),console[_0x4fecc8(0x159)](_0x4fecc8(0x196)),0x1;let _0x395275;if(_0x8a293[_0x4fecc8(0x173)]===_0x4fecc8(0x149)){const _0x47caa5=await withSpinner(_0x4fecc8(0x16b),()=>_0x2dfa98[_0x4fecc8(0x145)][_0x4fecc8(0x169)](_0x8a293[_0x4fecc8(0x163)]),{'verbose':_0x45d9a6[_0x4fecc8(0x18f)]});_0x395275=_0x47caa5[_0x4fecc8(0x19a)];}else{if(!_0x8a293[_0x4fecc8(0x13f)])throw new SDKError(ErrorCode[_0x4fecc8(0x137)],_0x4fecc8(0x19c));const _0x40cf93=await withSpinner(_0x4fecc8(0x14d),()=>_0x2dfa98[_0x4fecc8(0x145)][_0x4fecc8(0x134)](_0x8a293[_0x4fecc8(0x163)],_0x8a293[_0x4fecc8(0x13f)]),{'verbose':_0x45d9a6['verbose']});_0x395275=_0x40cf93[_0x4fecc8(0x19a)];}return _0x45d9a6[_0x4fecc8(0x151)]==='json'||_0x45d9a6[_0x4fecc8(0x151)]==='jsonl'?await handleSDKOutput([{'sql':_0x395275}],_0x45d9a6):console['log'](_0x395275),0x0;}catch(_0x168178){if(_0x168178 instanceof SDKError)return console[_0x4fecc8(0x159)](_0x4fecc8(0x190)+_0x168178['message']),_0x168178['cause']&&console[_0x4fecc8(0x159)]('\x20\x20Cause:\x20'+_0x168178[_0x4fecc8(0x150)]),0x1;throw _0x168178;}}}export class SegmentFolderCreateCommand extends BaseCommand{[a22_0x6aa9a0(0x140)]='segment:folder:create';[a22_0x6aa9a0(0x13b)]=a22_0x6aa9a0(0x172);async['execute'](_0x4fe84a){const _0x1e983e=a22_0x6aa9a0,{options:_0x4de514,args:_0x5ef6dd,tdx:_0x3d488f}=_0x4fe84a,_0xd0590a=_0x4de514;if(_0x5ef6dd[_0x1e983e(0x13d)]<0x2)return console['error']('Error:\x20Parent\x20segment\x20name\x20and\x20folder\x20name\x20are\x20required'),console[_0x1e983e(0x159)](_0x1e983e(0x18e)),0x1;const _0x150b8c=_0x5ef6dd[0x0],_0x44bf63=_0x5ef6dd[0x1];_0xd0590a[_0x1e983e(0x18f)]&&(console[_0x1e983e(0x159)]('Site:\x20'+_0xd0590a['site']),console[_0x1e983e(0x159)](_0x1e983e(0x170)+_0x150b8c),console[_0x1e983e(0x159)](_0x1e983e(0x182)+_0x44bf63));let _0xdd43e;if(_0xd0590a[_0x1e983e(0x166)]){const _0x383b9b=_0xd0590a[_0x1e983e(0x166)],_0x3c4c63=await withSpinner('Resolving\x20parent\x20segment\x20\x27'+_0x150b8c+_0x1e983e(0x17c),()=>_0x3d488f[_0x1e983e(0x145)][_0x1e983e(0x16c)](_0x150b8c),{'verbose':_0xd0590a['verbose']}),_0x4dc232=_0x3c4c63[_0x1e983e(0x19a)],_0x44b3c1=await withSpinner('Resolving\x20parent\x20folder\x20\x27'+_0x383b9b+'\x27...',()=>_0x3d488f['segment'][_0x1e983e(0x193)](_0x4dc232,_0x383b9b),{'verbose':_0xd0590a[_0x1e983e(0x18f)]});_0xdd43e=_0x44b3c1[_0x1e983e(0x19a)],_0xd0590a[_0x1e983e(0x18f)]&&console[_0x1e983e(0x159)](_0x1e983e(0x143)+_0xdd43e);}const _0x4f2318={'name':_0x44bf63,'description':_0xd0590a[_0x1e983e(0x13b)],'parentFolderId':_0xdd43e},_0x1c731c=await withSpinner(_0x1e983e(0x146)+_0x44bf63+_0x1e983e(0x17c),()=>_0x3d488f['segment'][_0x1e983e(0x156)](_0x150b8c,_0x4f2318),{'verbose':_0xd0590a[_0x1e983e(0x18f)]}),_0x9180=_0x1c731c[_0x1e983e(0x19a)];return console[_0x1e983e(0x159)](_0x1e983e(0x15a)+_0x9180[_0x1e983e(0x140)]+_0x1e983e(0x16a)+_0x9180['id']),await handleSDKOutput([_0x9180],_0xd0590a),0x0;}}
@@ -1 +1 @@
1
- const a23_0x19a1af=a23_0xd175;(function(_0x2e135d,_0x663958){const _0x45ae55=a23_0xd175,_0x561cc0=_0x2e135d();while(!![]){try{const _0x391daf=-parseInt(_0x45ae55(0x1fc))/0x1*(parseInt(_0x45ae55(0x1e4))/0x2)+parseInt(_0x45ae55(0x209))/0x3+parseInt(_0x45ae55(0x208))/0x4+parseInt(_0x45ae55(0x1f2))/0x5*(parseInt(_0x45ae55(0x1eb))/0x6)+parseInt(_0x45ae55(0x204))/0x7*(-parseInt(_0x45ae55(0x1e7))/0x8)+parseInt(_0x45ae55(0x1f4))/0x9+-parseInt(_0x45ae55(0x1fe))/0xa;if(_0x391daf===_0x663958)break;else _0x561cc0['push'](_0x561cc0['shift']());}catch(_0x462183){_0x561cc0['push'](_0x561cc0['shift']());}}}(a23_0x408f,0x678de));import{BaseCommand}from'./command.js';function a23_0x408f(){const _0x237912=['\x20\x20tdx\x20segment\x20create\x20\x22My\x20Audience/Marketing/Premium\x22\x20--rule\x20\x27...\x27','\x20\x20\x20Path:\x20','execute','invisible','type','Creating\x20segment\x20\x27','244eBtzSz','resolveFolderId','resolvePathToResource','260152hxxtlF','Examples:','parent','createSegment','930ZdpbyM','Error:\x20Segment\x20path\x20or\x20name\x20is\x20required','Parent:\x20','folder','\x27...','description','ruleFile','20665QhCKDW','Site:\x20','1241685kiQOjV','error','Resolved\x20relative\x20path\x20to:\x20','segment','Resolving\x20parent\x20segment\x20\x27','Error:\x20Cannot\x20create\x20segment\x20in\x20a\x20segment.\x20Parent\x20path\x20must\x20be\x20a\x20folder\x20or\x20parent.','site','name','4000buuCLE','Parent\x20path:\x20','943530qwVFWd','data','Usage:\x20tdx\x20segment\x20create\x20<parent/segment_name>\x20[options]','Segment\x20name:\x20','noCountPopulation','rule','175fbxHmH','verbose','Usage:\x20tdx\x20segment\x20create\x20<path>\x20[options]','\x20\x20tdx\x20segment\x20create\x20\x22My\x20Audience/High\x20Value\x22\x20--rule\x20\x27...\x27','3304124RvMFUy','644625qNiMVy','length','Error:\x20Full\x20path\x20required\x20(parent/segment_name\x20or\x20parent/folder/segment_name)','segments','kind','\x27\x20with\x20ID:\x20'];a23_0x408f=function(){return _0x237912;};return a23_0x408f();}import{handleSDKOutput}from'../utils/command-output.js';import{withSpinner}from'../utils/spinner.js';function a23_0xd175(_0x3fc8e7,_0x5bc5b2){const _0x408f90=a23_0x408f();return a23_0xd175=function(_0xd1755e,_0x2ca9e1){_0xd1755e=_0xd1755e-0x1de;let _0xde8712=_0x408f90[_0xd1755e];return _0xde8712;},a23_0xd175(_0x3fc8e7,_0x5bc5b2);}import{loadJSONFromOptions}from'../utils/json-loader.js';import{parsePath,getParentPath,getBaseName}from'../utils/segment-path-parser.js';export class SegmentCreateCommand extends BaseCommand{['name']='segment:create';[a23_0x19a1af(0x1f0)]='Create\x20child\x20segment\x20with\x20filtering\x20rules';async[a23_0x19a1af(0x1e0)](_0x51ca16){const _0xee6a22=a23_0x19a1af,{options:_0x162bec,args:_0x2f2c0d,tdx:_0x4815cd}=_0x51ca16,_0x5c1d40=_0x162bec;if(_0x2f2c0d[_0xee6a22(0x20a)]===0x0)return console[_0xee6a22(0x1f5)](_0xee6a22(0x1ec)),console[_0xee6a22(0x1f5)](_0xee6a22(0x206)),console[_0xee6a22(0x1f5)](_0xee6a22(0x1e8)),console[_0xee6a22(0x1f5)](_0xee6a22(0x207)),console[_0xee6a22(0x1f5)](_0xee6a22(0x1de)),console[_0xee6a22(0x1f5)]('\x20\x20tdx\x20segment\x20create\x20\x22Premium\x22\x20--rule\x20\x27...\x27\x20\x20#\x20Relative\x20to\x20context'),0x1;const _0x160626=_0x2f2c0d[0x0],_0x50925f=_0x162bec['segmentPath'];let _0x17f674=_0x160626;_0x50925f&&!_0x160626['includes']('/')&&(_0x17f674=_0x50925f+'/'+_0x160626,_0x5c1d40[_0xee6a22(0x205)]&&console['error'](_0xee6a22(0x1f6)+_0x17f674));const _0x55de20=parsePath(_0x17f674);if(_0x55de20[_0xee6a22(0x20c)][_0xee6a22(0x20a)]<0x2)return console[_0xee6a22(0x1f5)](_0xee6a22(0x20b)),console[_0xee6a22(0x1f5)](_0xee6a22(0x200)),0x1;const _0x56896f=_0x55de20['segments'][0x0],_0x53949f=getBaseName(_0x17f674),_0x5a2917=getParentPath(_0x17f674);_0x5c1d40['verbose']&&(console[_0xee6a22(0x1f5)](_0xee6a22(0x1f3)+_0x5c1d40[_0xee6a22(0x1fa)]),console[_0xee6a22(0x1f5)]('Target\x20path:\x20'+_0x17f674),console[_0xee6a22(0x1f5)](_0xee6a22(0x1ed)+_0x56896f),console[_0xee6a22(0x1f5)](_0xee6a22(0x201)+_0x53949f),console[_0xee6a22(0x1f5)](_0xee6a22(0x1fd)+_0x5a2917));const _0x507b9d=await withSpinner(_0xee6a22(0x1f8)+_0x56896f+_0xee6a22(0x1ef),()=>_0x4815cd[_0xee6a22(0x1f7)]['resolveParentId'](_0x56896f),{'verbose':_0x5c1d40['verbose']}),_0x579871=_0x507b9d['data'];let _0x211400;if(_0x55de20['segments'][_0xee6a22(0x20a)]>0x2){const _0x15fde8=await withSpinner('Resolving\x20folder\x20path\x20\x27'+_0x5a2917+_0xee6a22(0x1ef),()=>_0x4815cd[_0xee6a22(0x1f7)][_0xee6a22(0x1e6)](_0x5a2917),{'verbose':_0x5c1d40[_0xee6a22(0x205)]}),_0x11cd77=_0x15fde8['data'];if(_0x11cd77[_0xee6a22(0x1e2)]!==_0xee6a22(0x1ee)&&_0x11cd77[_0xee6a22(0x1e2)]!==_0xee6a22(0x1e9))return console[_0xee6a22(0x1f5)](_0xee6a22(0x1f9)),0x1;_0x211400=_0x11cd77['folderId'];}else{if(_0x5c1d40['folder']){const _0xb708ab=await withSpinner('Resolving\x20folder\x20\x27'+_0x5c1d40['folder']+_0xee6a22(0x1ef),()=>_0x4815cd[_0xee6a22(0x1f7)][_0xee6a22(0x1e5)](_0x579871,_0x5c1d40[_0xee6a22(0x1ee)]),{'verbose':_0x5c1d40[_0xee6a22(0x205)]});_0x211400=_0xb708ab[_0xee6a22(0x1ff)];}}_0x5c1d40[_0xee6a22(0x205)]&&_0x211400&&console[_0xee6a22(0x1f5)]('Resolved\x20folder\x20ID:\x20'+_0x211400);const _0xf0638=await loadJSONFromOptions(_0x5c1d40[_0xee6a22(0x203)],_0x5c1d40[_0xee6a22(0x1f1)]),_0x30e416={'name':_0x53949f,'description':_0x5c1d40[_0xee6a22(0x1f0)],'rule':_0xf0638,'kind':_0x5c1d40['kind']!==undefined?parseInt(_0x5c1d40[_0xee6a22(0x20d)],0xa):undefined,'isVisible':_0x5c1d40[_0xee6a22(0x1e1)]?![]:undefined,'segmentFolderId':_0x211400,'countPopulation':_0x5c1d40[_0xee6a22(0x202)]?![]:undefined},_0x3f6131=await withSpinner(_0xee6a22(0x1e3)+_0x53949f+_0xee6a22(0x1ef),()=>_0x4815cd['segment'][_0xee6a22(0x1ea)](_0x579871,_0x30e416),{'verbose':_0x5c1d40['verbose']}),_0x22a49d=_0x3f6131[_0xee6a22(0x1ff)];return console[_0xee6a22(0x1f5)]('✔\x20Created\x20segment\x20\x27'+_0x22a49d[_0xee6a22(0x1fb)]+_0xee6a22(0x20e)+_0x22a49d['id']),_0x17f674!==_0x160626&&console[_0xee6a22(0x1f5)](_0xee6a22(0x1df)+_0x17f674),await handleSDKOutput([_0x22a49d],_0x5c1d40),0x0;}}
1
+ function a23_0x2a18(_0x184c67,_0x54b034){const _0x9a2c83=a23_0x9a2c();return a23_0x2a18=function(_0x2a18fd,_0x4a81c6){_0x2a18fd=_0x2a18fd-0x146;let _0x105870=_0x9a2c83[_0x2a18fd];return _0x105870;},a23_0x2a18(_0x184c67,_0x54b034);}const a23_0x5b6c97=a23_0x2a18;(function(_0x1f74f0,_0xe94a1b){const _0x691b96=a23_0x2a18,_0x14f8c4=_0x1f74f0();while(!![]){try{const _0x3494e4=-parseInt(_0x691b96(0x151))/0x1*(-parseInt(_0x691b96(0x16c))/0x2)+-parseInt(_0x691b96(0x175))/0x3+-parseInt(_0x691b96(0x149))/0x4*(parseInt(_0x691b96(0x174))/0x5)+-parseInt(_0x691b96(0x147))/0x6+-parseInt(_0x691b96(0x171))/0x7*(-parseInt(_0x691b96(0x165))/0x8)+-parseInt(_0x691b96(0x16f))/0x9*(parseInt(_0x691b96(0x14c))/0xa)+parseInt(_0x691b96(0x167))/0xb*(parseInt(_0x691b96(0x148))/0xc);if(_0x3494e4===_0xe94a1b)break;else _0x14f8c4['push'](_0x14f8c4['shift']());}catch(_0x24a7b2){_0x14f8c4['push'](_0x14f8c4['shift']());}}}(a23_0x9a2c,0x39850));import{BaseCommand}from'./command.js';import{handleSDKOutput}from'../utils/command-output.js';import{withSpinner}from'../utils/spinner.js';import{loadJSONFromOptions}from'../utils/json-loader.js';function a23_0x9a2c(){const _0x3b067c=['name','Resolved\x20relative\x20path\x20to:\x20','kind','424gLkkYT','error','3005244dgGWrH','Resolving\x20folder\x20\x27','verbose','Resolving\x20parent\x20segment\x20\x27','createSegment','2dLzDBR','includes','\x20\x20tdx\x20segment\x20create\x20\x22My\x20Audience/High\x20Value\x22\x20--rule\x20\x27...\x27','1322019sHDyaV','segmentPath','7483GvWSGK','resolvePathToResource','Parent\x20path:\x20','1752280ErDGyY','750996miKvaq','Site:\x20','segment','\x27...','920562GDJhnf','36XcnoON','4IqWSKR','Usage:\x20tdx\x20segment\x20create\x20<path>\x20[options]','resolveFolderId','10OLFJYz','Creating\x20segment\x20\x27','✔\x20Created\x20segment\x20\x27','Error:\x20Cannot\x20create\x20segment\x20in\x20a\x20segment.\x20Parent\x20path\x20must\x20be\x20a\x20folder\x20or\x20parent.','Create\x20child\x20segment\x20with\x20filtering\x20rules','260437eiOmcX','data','parent','Usage:\x20tdx\x20segment\x20create\x20<parent/segment_name>\x20[options]','folder','segments','Resolved\x20folder\x20ID:\x20','description','\x27\x20with\x20ID:\x20','ruleFile','length','type','execute','Parent:\x20','noCountPopulation','site','Resolving\x20folder\x20path\x20\x27'];a23_0x9a2c=function(){return _0x3b067c;};return a23_0x9a2c();}import{parsePath,getParentPath,getBaseName}from'../utils/segment-path-parser.js';export class SegmentCreateCommand extends BaseCommand{[a23_0x5b6c97(0x162)]='segment:create';[a23_0x5b6c97(0x158)]=a23_0x5b6c97(0x150);async[a23_0x5b6c97(0x15d)](_0x27c989){const _0x2a00e1=a23_0x5b6c97,{options:_0x4eed8e,args:_0x144f61,tdx:_0x31cfcf}=_0x27c989,_0x335060=_0x4eed8e;if(_0x144f61[_0x2a00e1(0x15b)]===0x0)return console[_0x2a00e1(0x166)]('Error:\x20Segment\x20path\x20or\x20name\x20is\x20required'),console[_0x2a00e1(0x166)](_0x2a00e1(0x14a)),console[_0x2a00e1(0x166)]('Examples:'),console[_0x2a00e1(0x166)](_0x2a00e1(0x16e)),console[_0x2a00e1(0x166)]('\x20\x20tdx\x20segment\x20create\x20\x22My\x20Audience/Marketing/Premium\x22\x20--rule\x20\x27...\x27'),console[_0x2a00e1(0x166)]('\x20\x20tdx\x20segment\x20create\x20\x22Premium\x22\x20--rule\x20\x27...\x27\x20\x20#\x20Relative\x20to\x20context'),0x1;const _0x38a4db=_0x144f61[0x0],_0x297738=_0x4eed8e[_0x2a00e1(0x170)];let _0x32efed=_0x38a4db;_0x297738&&!_0x38a4db[_0x2a00e1(0x16d)]('/')&&(_0x32efed=_0x297738+'/'+_0x38a4db,_0x335060['verbose']&&console[_0x2a00e1(0x166)](_0x2a00e1(0x163)+_0x32efed));const _0x155d93=parsePath(_0x32efed);if(_0x155d93[_0x2a00e1(0x156)][_0x2a00e1(0x15b)]<0x2)return console['error']('Error:\x20Full\x20path\x20required\x20(parent/segment_name\x20or\x20parent/folder/segment_name)'),console[_0x2a00e1(0x166)](_0x2a00e1(0x154)),0x1;const _0x8f3147=_0x155d93[_0x2a00e1(0x156)][0x0],_0x4b40fd=getBaseName(_0x32efed),_0x3c98fc=getParentPath(_0x32efed);_0x335060['verbose']&&(console['error'](_0x2a00e1(0x176)+_0x335060[_0x2a00e1(0x160)]),console['error']('Target\x20path:\x20'+_0x32efed),console['error'](_0x2a00e1(0x15e)+_0x8f3147),console[_0x2a00e1(0x166)]('Segment\x20name:\x20'+_0x4b40fd),console[_0x2a00e1(0x166)](_0x2a00e1(0x173)+_0x3c98fc));const _0x544d9b=await withSpinner(_0x2a00e1(0x16a)+_0x8f3147+_0x2a00e1(0x146),()=>_0x31cfcf['segment']['resolveParentId'](_0x8f3147),{'verbose':_0x335060[_0x2a00e1(0x169)]}),_0x29261d=_0x544d9b[_0x2a00e1(0x152)];let _0x2800dd;if(_0x155d93[_0x2a00e1(0x156)][_0x2a00e1(0x15b)]>0x2){const _0x39c570=await withSpinner(_0x2a00e1(0x161)+_0x3c98fc+_0x2a00e1(0x146),()=>_0x31cfcf[_0x2a00e1(0x177)][_0x2a00e1(0x172)](_0x3c98fc),{'verbose':_0x335060[_0x2a00e1(0x169)]}),_0x418f9d=_0x39c570[_0x2a00e1(0x152)];if(_0x418f9d[_0x2a00e1(0x15c)]!==_0x2a00e1(0x155)&&_0x418f9d['type']!==_0x2a00e1(0x153))return console['error'](_0x2a00e1(0x14f)),0x1;_0x2800dd=_0x418f9d['folderId'];}else{if(_0x335060[_0x2a00e1(0x155)]){const _0x1c4e93=await withSpinner(_0x2a00e1(0x168)+_0x335060[_0x2a00e1(0x155)]+_0x2a00e1(0x146),()=>_0x31cfcf[_0x2a00e1(0x177)][_0x2a00e1(0x14b)](_0x29261d,_0x335060[_0x2a00e1(0x155)]),{'verbose':_0x335060[_0x2a00e1(0x169)]});_0x2800dd=_0x1c4e93['data'];}}_0x335060[_0x2a00e1(0x169)]&&_0x2800dd&&console['error'](_0x2a00e1(0x157)+_0x2800dd);const _0x1d6197=await loadJSONFromOptions(_0x335060['rule'],_0x335060[_0x2a00e1(0x15a)]),_0x2efe4c={'name':_0x4b40fd,'description':_0x335060[_0x2a00e1(0x158)],'rule':_0x1d6197,'kind':_0x335060[_0x2a00e1(0x164)]!==undefined?parseInt(_0x335060[_0x2a00e1(0x164)],0xa):undefined,'isVisible':_0x335060['invisible']?![]:undefined,'segmentFolderId':_0x2800dd,'countPopulation':_0x335060[_0x2a00e1(0x15f)]?![]:undefined},_0xa41fd1=await withSpinner(_0x2a00e1(0x14d)+_0x4b40fd+_0x2a00e1(0x146),()=>_0x31cfcf[_0x2a00e1(0x177)][_0x2a00e1(0x16b)](_0x29261d,_0x2efe4c),{'verbose':_0x335060[_0x2a00e1(0x169)]}),_0x47332b=_0xa41fd1[_0x2a00e1(0x152)];return console['error'](_0x2a00e1(0x14e)+_0x47332b[_0x2a00e1(0x162)]+_0x2a00e1(0x159)+_0x47332b['id']),_0x32efed!==_0x38a4db&&console[_0x2a00e1(0x166)]('\x20\x20\x20Path:\x20'+_0x32efed),await handleSDKOutput([_0x47332b],_0x335060),0x0;}}
@@ -1 +1 @@
1
- const a24_0x41f898=a24_0x3fc9;function a24_0x3fc9(_0x508ac4,_0x3b4e70){const _0x4ba170=a24_0x4ba1();return a24_0x3fc9=function(_0x3fc93c,_0x4c49dc){_0x3fc93c=_0x3fc93c-0x140;let _0x4a31b4=_0x4ba170[_0x3fc93c];return _0x4a31b4;},a24_0x3fc9(_0x508ac4,_0x3b4e70);}function a24_0x4ba1(){const _0x597a86=['Site:\x20','\x27...','24130719jnDZHW','404438IhKTZM','Listing\x20fields\x20for\x20\x27','segment','description','\x20field','2ZzhpiX','3414776HCLaOX','Usage:\x20tdx\x20segment\x20fields\x20<parent_name>','2165051jbjSjo','site','verbose','segment:fields','error','List\x20available\x20fields\x20for\x20segmentation','2785rhRjZo','length','4383330lQaAJP','2306169opLFZJ','1868dFgYay'];a24_0x4ba1=function(){return _0x597a86;};return a24_0x4ba1();}(function(_0x5317ec,_0x406522){const _0x1af11d=a24_0x3fc9,_0x512058=_0x5317ec();while(!![]){try{const _0x2294e5=parseInt(_0x1af11d(0x148))/0x1*(-parseInt(_0x1af11d(0x14d))/0x2)+-parseInt(_0x1af11d(0x143))/0x3+parseInt(_0x1af11d(0x144))/0x4*(-parseInt(_0x1af11d(0x140))/0x5)+-parseInt(_0x1af11d(0x142))/0x6+parseInt(_0x1af11d(0x150))/0x7+-parseInt(_0x1af11d(0x14e))/0x8+parseInt(_0x1af11d(0x147))/0x9;if(_0x2294e5===_0x406522)break;else _0x512058['push'](_0x512058['shift']());}catch(_0x3aaad1){_0x512058['push'](_0x512058['shift']());}}}(a24_0x4ba1,0x619ba));import{BaseCommand}from'./command.js';import{handleSDKOutput}from'../utils/command-output.js';import{withSpinner}from'../utils/spinner.js';export class SegmentFieldsCommand extends BaseCommand{['name']=a24_0x41f898(0x153);[a24_0x41f898(0x14b)]=a24_0x41f898(0x155);async['execute'](_0x429a68){const _0x9aa037=a24_0x41f898,{options:_0x5b287a,args:_0x542ef5,tdx:_0x303511}=_0x429a68;if(_0x542ef5[_0x9aa037(0x141)]===0x0)return console[_0x9aa037(0x154)]('Error:\x20Parent\x20segment\x20name\x20is\x20required'),console[_0x9aa037(0x154)](_0x9aa037(0x14f)),0x1;const _0x3f7205=_0x542ef5[0x0];_0x5b287a[_0x9aa037(0x152)]&&(console[_0x9aa037(0x154)](_0x9aa037(0x145)+_0x5b287a[_0x9aa037(0x151)]),console[_0x9aa037(0x154)]('Parent\x20segment:\x20'+_0x3f7205));const _0x157605=await withSpinner(_0x9aa037(0x149)+_0x3f7205+_0x9aa037(0x146),()=>_0x303511[_0x9aa037(0x14a)]['listFields'](_0x3f7205),{'verbose':_0x5b287a[_0x9aa037(0x152)]}),_0x17a75f=_0x157605['data'];return console[_0x9aa037(0x154)]('✔\x20Found\x20'+_0x17a75f['length']+_0x9aa037(0x14c)+(_0x17a75f[_0x9aa037(0x141)]!==0x1?'s':'')),await handleSDKOutput(_0x17a75f,_0x5b287a),0x0;}}
1
+ function a24_0x4cd3(_0x5f508a,_0x1c91bf){const _0x174aab=a24_0x174a();return a24_0x4cd3=function(_0x4cd3f4,_0x182b1a){_0x4cd3f4=_0x4cd3f4-0x95;let _0x3a27fd=_0x174aab[_0x4cd3f4];return _0x3a27fd;},a24_0x4cd3(_0x5f508a,_0x1c91bf);}const a24_0x37f92c=a24_0x4cd3;function a24_0x174a(){const _0x2a1925=['Site:\x20','6wEWIjx','✔\x20Found\x20','Error:\x20Parent\x20segment\x20name\x20is\x20required','393833GUizdK','2483852WmZJWX','error','segment:fields','4925970elsGrO','8880504BuYWcs','segment','data','name','20601495dfgLGN','Usage:\x20tdx\x20segment\x20fields\x20<parent_name>','\x27...','length','execute','List\x20available\x20fields\x20for\x20segmentation','1447786bGEKbP','24kHOWqO','description','\x20field','verbose','listFields','site','4566472NGvRFh'];a24_0x174a=function(){return _0x2a1925;};return a24_0x174a();}(function(_0x13e138,_0xb54547){const _0x278799=a24_0x4cd3,_0x51e1db=_0x13e138();while(!![]){try{const _0x356a3c=-parseInt(_0x278799(0x9f))/0x1+parseInt(_0x278799(0xae))/0x2*(parseInt(_0x278799(0x9c))/0x3)+parseInt(_0x278799(0x9a))/0x4+-parseInt(_0x278799(0xa3))/0x5+-parseInt(_0x278799(0xa4))/0x6+-parseInt(_0x278799(0xa0))/0x7*(parseInt(_0x278799(0xaf))/0x8)+parseInt(_0x278799(0xa8))/0x9;if(_0x356a3c===_0xb54547)break;else _0x51e1db['push'](_0x51e1db['shift']());}catch(_0x4ae25d){_0x51e1db['push'](_0x51e1db['shift']());}}}(a24_0x174a,0xe91d8));import{BaseCommand}from'./command.js';import{handleSDKOutput}from'../utils/command-output.js';import{withSpinner}from'../utils/spinner.js';export class SegmentFieldsCommand extends BaseCommand{[a24_0x37f92c(0xa7)]=a24_0x37f92c(0xa2);[a24_0x37f92c(0x95)]=a24_0x37f92c(0xad);async[a24_0x37f92c(0xac)](_0x4217d8){const _0x5f3ef5=a24_0x37f92c,{options:_0x5e12cc,args:_0x5644cd,tdx:_0x1ece1f}=_0x4217d8;if(_0x5644cd[_0x5f3ef5(0xab)]===0x0)return console[_0x5f3ef5(0xa1)](_0x5f3ef5(0x9e)),console[_0x5f3ef5(0xa1)](_0x5f3ef5(0xa9)),0x1;const _0x50975c=_0x5644cd[0x0];_0x5e12cc[_0x5f3ef5(0x97)]&&(console[_0x5f3ef5(0xa1)](_0x5f3ef5(0x9b)+_0x5e12cc[_0x5f3ef5(0x99)]),console[_0x5f3ef5(0xa1)]('Parent\x20segment:\x20'+_0x50975c));const _0xd7ad14=await withSpinner('Listing\x20fields\x20for\x20\x27'+_0x50975c+_0x5f3ef5(0xaa),()=>_0x1ece1f[_0x5f3ef5(0xa5)][_0x5f3ef5(0x98)](_0x50975c),{'verbose':_0x5e12cc[_0x5f3ef5(0x97)]}),_0x55b2ac=_0xd7ad14[_0x5f3ef5(0xa6)];return console[_0x5f3ef5(0xa1)](_0x5f3ef5(0x9d)+_0x55b2ac[_0x5f3ef5(0xab)]+_0x5f3ef5(0x96)+(_0x55b2ac['length']!==0x1?'s':'')),await handleSDKOutput(_0x55b2ac,_0x5e12cc),0x0;}}
@@ -1 +1 @@
1
- const a25_0x2e744b=a25_0x2e6c;function a25_0x2e6c(_0x3f387a,_0x58176c){const _0x547b87=a25_0x547b();return a25_0x2e6c=function(_0x2e6caa,_0x502150){_0x2e6caa=_0x2e6caa-0x106;let _0xfecbe1=_0x547b87[_0x2e6caa];return _0xfecbe1;},a25_0x2e6c(_0x3f387a,_0x58176c);}(function(_0x56d376,_0x2b096e){const _0x50d10d=a25_0x2e6c,_0x1a6b0c=_0x56d376();while(!![]){try{const _0x578a47=parseInt(_0x50d10d(0x120))/0x1*(parseInt(_0x50d10d(0x10b))/0x2)+-parseInt(_0x50d10d(0x107))/0x3+parseInt(_0x50d10d(0x106))/0x4*(-parseInt(_0x50d10d(0x116))/0x5)+-parseInt(_0x50d10d(0x121))/0x6+parseInt(_0x50d10d(0x10e))/0x7*(-parseInt(_0x50d10d(0x114))/0x8)+parseInt(_0x50d10d(0x11b))/0x9+parseInt(_0x50d10d(0x11f))/0xa*(parseInt(_0x50d10d(0x112))/0xb);if(_0x578a47===_0x2b096e)break;else _0x1a6b0c['push'](_0x1a6b0c['shift']());}catch(_0x4fe9cf){_0x1a6b0c['push'](_0x1a6b0c['shift']());}}}(a25_0x547b,0xbbd25));import{BaseCommand}from'./command.js';function a25_0x547b(){const _0x30adfd=['error','verbose','1500202qIHNln','name','8maUMyU','Show\x20current\x20segment/folder\x20context','315415DlPmLw','Context\x20details:','segment:pwd','\x20\x20Path:\x20','execute','4185333TTNDyA','stringify','segmentPath','format','120zeICZM','1005457WdPdzY','7254366FPFPLz','4nbUFie','608541jvUjSc','jsonl','json','Use\x20\x22tdx\x20context\x22\x20to\x20see\x20all\x20context\x20parameters','2VDBDga','description','log','6039390WDRZtI','root'];a25_0x547b=function(){return _0x30adfd;};return a25_0x547b();}export class SegmentPwdCommand extends BaseCommand{[a25_0x2e744b(0x113)]=a25_0x2e744b(0x118);[a25_0x2e744b(0x10c)]=a25_0x2e744b(0x115);async[a25_0x2e744b(0x11a)](_0x9827b0){const _0x4a8c53=a25_0x2e744b,{options:_0x6e6d0a}=_0x9827b0;try{const _0x2be092=_0x6e6d0a[_0x4a8c53(0x11d)];if(!_0x2be092)return _0x6e6d0a['format']===_0x4a8c53(0x109)||_0x6e6d0a[_0x4a8c53(0x11e)]===_0x4a8c53(0x108)?console[_0x4a8c53(0x10d)](JSON[_0x4a8c53(0x11c)]({'path':'/','type':_0x4a8c53(0x10f)})):console[_0x4a8c53(0x10d)]('/'),0x0;if(_0x6e6d0a['format']==='json'||_0x6e6d0a[_0x4a8c53(0x11e)]===_0x4a8c53(0x108)){const _0x21e985={'path':_0x2be092};console[_0x4a8c53(0x10d)](JSON['stringify'](_0x21e985));}else console[_0x4a8c53(0x10d)](_0x2be092),_0x6e6d0a[_0x4a8c53(0x111)]&&(console[_0x4a8c53(0x110)](''),console[_0x4a8c53(0x110)](_0x4a8c53(0x117)),console[_0x4a8c53(0x110)](_0x4a8c53(0x119)+_0x2be092),console[_0x4a8c53(0x110)](''),console[_0x4a8c53(0x110)](_0x4a8c53(0x10a)),console[_0x4a8c53(0x110)]('Use\x20\x22tdx\x20context\x20--debug\x22\x20to\x20see\x20context\x20sources'));return 0x0;}catch(_0xb2e594){throw _0xb2e594;}}}
1
+ const a25_0x228263=a25_0x9fa6;function a25_0x9fa6(_0x406f8c,_0x5978fb){const _0x2a9b24=a25_0x2a9b();return a25_0x9fa6=function(_0x9fa6c9,_0x299e79){_0x9fa6c9=_0x9fa6c9-0x87;let _0x142005=_0x2a9b24[_0x9fa6c9];return _0x142005;},a25_0x9fa6(_0x406f8c,_0x5978fb);}function a25_0x2a9b(){const _0x44971d=['2593947AWUMLn','log','error','format','json','1vmeQDK','jsonl','120zYNVmz','1852982oFAGNm','979240OLSobL','Show\x20current\x20segment/folder\x20context','18746541sWCLAU','Use\x20\x22tdx\x20context\x22\x20to\x20see\x20all\x20context\x20parameters','8NkMWWH','Context\x20details:','execute','description','1022316otiHGQ','root','187254PEQyjY','Use\x20\x22tdx\x20context\x20--debug\x22\x20to\x20see\x20context\x20sources','\x20\x20Path:\x20','name','6728554UGmCBZ','segment:pwd','stringify','5ydQVGx'];a25_0x2a9b=function(){return _0x44971d;};return a25_0x2a9b();}(function(_0x201501,_0xe03d06){const _0x8ad86c=a25_0x9fa6,_0x37a5e0=_0x201501();while(!![]){try{const _0x4fcf39=parseInt(_0x8ad86c(0x93))/0x1*(parseInt(_0x8ad86c(0x96))/0x2)+-parseInt(_0x8ad86c(0x8e))/0x3+parseInt(_0x8ad86c(0x97))/0x4*(-parseInt(_0x8ad86c(0x8d))/0x5)+parseInt(_0x8ad86c(0x9f))/0x6+parseInt(_0x8ad86c(0x8a))/0x7*(-parseInt(_0x8ad86c(0x9b))/0x8)+-parseInt(_0x8ad86c(0xa1))/0x9*(parseInt(_0x8ad86c(0x95))/0xa)+parseInt(_0x8ad86c(0x99))/0xb;if(_0x4fcf39===_0xe03d06)break;else _0x37a5e0['push'](_0x37a5e0['shift']());}catch(_0x373d44){_0x37a5e0['push'](_0x37a5e0['shift']());}}}(a25_0x2a9b,0x755f3));import{BaseCommand}from'./command.js';export class SegmentPwdCommand extends BaseCommand{[a25_0x228263(0x89)]=a25_0x228263(0x8b);[a25_0x228263(0x9e)]=a25_0x228263(0x98);async[a25_0x228263(0x9d)](_0x375f1d){const _0x3d3b02=a25_0x228263,{options:_0x1d2d49}=_0x375f1d;try{const _0x2cd60d=_0x1d2d49['segmentPath'];if(!_0x2cd60d)return _0x1d2d49[_0x3d3b02(0x91)]==='json'||_0x1d2d49[_0x3d3b02(0x91)]===_0x3d3b02(0x94)?console[_0x3d3b02(0x8f)](JSON[_0x3d3b02(0x8c)]({'path':'/','type':_0x3d3b02(0xa0)})):console[_0x3d3b02(0x8f)]('/'),0x0;if(_0x1d2d49[_0x3d3b02(0x91)]===_0x3d3b02(0x92)||_0x1d2d49[_0x3d3b02(0x91)]===_0x3d3b02(0x94)){const _0x69cbf1={'path':_0x2cd60d};console[_0x3d3b02(0x8f)](JSON[_0x3d3b02(0x8c)](_0x69cbf1));}else console[_0x3d3b02(0x8f)](_0x2cd60d),_0x1d2d49['verbose']&&(console['error'](''),console[_0x3d3b02(0x90)](_0x3d3b02(0x9c)),console[_0x3d3b02(0x90)](_0x3d3b02(0x88)+_0x2cd60d),console['error'](''),console['error'](_0x3d3b02(0x9a)),console['error'](_0x3d3b02(0x87)));return 0x0;}catch(_0x367c91){throw _0x367c91;}}}
@@ -1 +1 @@
1
- const a26_0x1c4733=a26_0x565d;(function(_0x3dd3f8,_0x25d620){const _0x2a04d7=a26_0x565d,_0x54b54d=_0x3dd3f8();while(!![]){try{const _0x451aa1=-parseInt(_0x2a04d7(0xf9))/0x1+-parseInt(_0x2a04d7(0xf1))/0x2+-parseInt(_0x2a04d7(0xe5))/0x3+parseInt(_0x2a04d7(0xeb))/0x4*(parseInt(_0x2a04d7(0xf8))/0x5)+-parseInt(_0x2a04d7(0x101))/0x6+-parseInt(_0x2a04d7(0xe8))/0x7+parseInt(_0x2a04d7(0xfd))/0x8;if(_0x451aa1===_0x25d620)break;else _0x54b54d['push'](_0x54b54d['shift']());}catch(_0x4f2eb3){_0x54b54d['push'](_0x54b54d['shift']());}}}(a26_0x12e0,0xb9925));function a26_0x12e0(){const _0x3b95e5=['Error:\x20Cannot\x20update\x20','42987688SmCUnR','\x27...','Use:\x20tdx\x20segment\x20update\x20<path_to_segment>\x20[options]','✔\x20Updated\x20segment\x20\x27','2480250RJEzNz','includes','error','resolvePathToResource','folder','verbose','\x20\x20tdx\x20segment\x20update\x20\x22My\x20Audience/High\x20Value\x22\x20--description\x20\x22...\x22','type','Resolved\x20relative\x20path\x20to:\x20','Examples:','rule','Segment\x20ID\x20missing\x20from\x20resolved\x20path','.\x20Only\x20child\x20segments\x20can\x20be\x20updated.','3640722BYzrVq','Resolved\x20folder\x20ID:\x20','Resolved\x20type:\x20','7525539bYnOUO','parentId','segmentId','8zODtTM','Usage:\x20tdx\x20segment\x20update\x20<path>\x20[options]','segmentPath','data','updateSegmentById','kind','2570728qVbTBQ','Error:\x20Segment\x20path\x20or\x20name\x20is\x20required','Resolving\x20path\x20\x27','description','Update\x20existing\x20child\x20segment','segment','name','1049210pojYCk','1045654priDlM','\x20\x20\x20Path:\x20','segment:update'];a26_0x12e0=function(){return _0x3b95e5;};return a26_0x12e0();}import{BaseCommand}from'./command.js';import{handleSDKOutput}from'../utils/command-output.js';import{withSpinner}from'../utils/spinner.js';import{loadJSONFromOptions}from'../utils/json-loader.js';function a26_0x565d(_0x2569d7,_0x24ce53){const _0x12e07e=a26_0x12e0();return a26_0x565d=function(_0x565d8e,_0x4d9885){_0x565d8e=_0x565d8e-0xde;let _0x257402=_0x12e07e[_0x565d8e];return _0x257402;},a26_0x565d(_0x2569d7,_0x24ce53);}import{SDKError,ErrorCode}from'../sdk/index.js';export class SegmentUpdateCommand extends BaseCommand{[a26_0x1c4733(0xf7)]=a26_0x1c4733(0xfb);[a26_0x1c4733(0xf4)]=a26_0x1c4733(0xf5);async['execute'](_0x5cc718){const _0x403ded=a26_0x1c4733,{options:_0x4919a0,args:_0xc5f995,tdx:_0x32bf1f}=_0x5cc718,_0x42e320=_0x4919a0;if(_0xc5f995['length']===0x0)return console['error'](_0x403ded(0xf2)),console[_0x403ded(0x103)](_0x403ded(0xec)),console[_0x403ded(0x103)](_0x403ded(0xe1)),console['error'](_0x403ded(0xde)),console[_0x403ded(0x103)]('\x20\x20tdx\x20segment\x20update\x20\x22High\x20Value\x22\x20--rule\x20\x27...\x27\x20\x20#\x20Relative\x20to\x20context'),0x1;const _0x1442bf=_0xc5f995[0x0],_0x5bf24f=_0x4919a0[_0x403ded(0xed)];let _0x37d24c=_0x1442bf;_0x5bf24f&&!_0x1442bf[_0x403ded(0x102)]('/')&&(_0x37d24c=_0x5bf24f+'/'+_0x1442bf,_0x42e320[_0x403ded(0x106)]&&console[_0x403ded(0x103)](_0x403ded(0xe0)+_0x37d24c));const _0x1b5ec8=await withSpinner(_0x403ded(0xf3)+_0x37d24c+'\x27...',()=>_0x32bf1f[_0x403ded(0xf6)][_0x403ded(0x104)](_0x37d24c),{'verbose':_0x42e320['verbose']}),_0x1a7f86=_0x1b5ec8[_0x403ded(0xee)];_0x42e320['verbose']&&console[_0x403ded(0x103)](_0x403ded(0xe7)+_0x1a7f86[_0x403ded(0xdf)]);if(_0x1a7f86[_0x403ded(0xdf)]!==_0x403ded(0xf6))return console[_0x403ded(0x103)](_0x403ded(0xfc)+_0x1a7f86[_0x403ded(0xdf)]+_0x403ded(0xe4)),console[_0x403ded(0x103)](_0x403ded(0xff)),0x1;if(!_0x1a7f86['segmentId'])throw new SDKError(ErrorCode['INTERNAL'],_0x403ded(0xe3));const _0x43218a=_0x1a7f86[_0x403ded(0xe9)],_0x133215=_0x1a7f86[_0x403ded(0xea)];_0x42e320[_0x403ded(0x106)]&&(console['error']('Parent\x20ID:\x20'+_0x43218a),console[_0x403ded(0x103)]('Segment\x20ID:\x20'+_0x133215));let _0x377f0b;if(_0x42e320[_0x403ded(0x105)]){const _0xf68345=_0x42e320[_0x403ded(0x105)],_0x5b6b2b=await withSpinner('Resolving\x20folder\x20\x27'+_0xf68345+_0x403ded(0xfe),()=>_0x32bf1f[_0x403ded(0xf6)]['resolveFolderId'](_0x43218a,_0xf68345),{'verbose':_0x42e320[_0x403ded(0x106)]});_0x377f0b=parseInt(_0x5b6b2b[_0x403ded(0xee)],0xa),_0x42e320['verbose']&&console[_0x403ded(0x103)](_0x403ded(0xe6)+_0x377f0b);}const _0x1b8e42=await loadJSONFromOptions(_0x42e320[_0x403ded(0xe2)],_0x42e320['ruleFile']),_0x155287={'name':_0x42e320[_0x403ded(0xf7)],'description':_0x42e320[_0x403ded(0xf4)],'rule':_0x1b8e42,'kind':_0x42e320[_0x403ded(0xf0)]!==undefined?parseInt(_0x42e320[_0x403ded(0xf0)],0xa):undefined,'segmentFolderId':_0x377f0b},_0x4fdcc0=await withSpinner('Updating\x20segment\x20\x27'+_0x1a7f86['segmentName']+_0x403ded(0xfe),()=>_0x32bf1f[_0x403ded(0xf6)][_0x403ded(0xef)](_0x43218a,_0x133215,_0x155287),{'verbose':_0x42e320['verbose']}),_0x354034=_0x4fdcc0['data'];return console['error'](_0x403ded(0x100)+_0x354034[_0x403ded(0xf7)]+'\x27'),_0x37d24c!==_0x1442bf&&console['error'](_0x403ded(0xfa)+_0x37d24c),await handleSDKOutput([_0x354034],_0x42e320),0x0;}}
1
+ function a26_0x3996(_0x518b39,_0x32686e){const _0x4a39ef=a26_0x4a39();return a26_0x3996=function(_0x39962c,_0x45fa00){_0x39962c=_0x39962c-0x17e;let _0x3e1bf5=_0x4a39ef[_0x39962c];return _0x3e1bf5;},a26_0x3996(_0x518b39,_0x32686e);}const a26_0x3102da=a26_0x3996;(function(_0xfb4f3e,_0x2326ca){const _0x3cfbac=a26_0x3996,_0x54dde6=_0xfb4f3e();while(!![]){try{const _0x353ed4=parseInt(_0x3cfbac(0x19c))/0x1*(parseInt(_0x3cfbac(0x1a4))/0x2)+parseInt(_0x3cfbac(0x18e))/0x3*(parseInt(_0x3cfbac(0x198))/0x4)+parseInt(_0x3cfbac(0x197))/0x5+-parseInt(_0x3cfbac(0x18a))/0x6*(parseInt(_0x3cfbac(0x1a9))/0x7)+parseInt(_0x3cfbac(0x19f))/0x8*(-parseInt(_0x3cfbac(0x182))/0x9)+parseInt(_0x3cfbac(0x192))/0xa+-parseInt(_0x3cfbac(0x1a5))/0xb*(parseInt(_0x3cfbac(0x18d))/0xc);if(_0x353ed4===_0x2326ca)break;else _0x54dde6['push'](_0x54dde6['shift']());}catch(_0x16ceb7){_0x54dde6['push'](_0x54dde6['shift']());}}}(a26_0x4a39,0xc15c2));import{BaseCommand}from'./command.js';import{handleSDKOutput}from'../utils/command-output.js';import{withSpinner}from'../utils/spinner.js';import{loadJSONFromOptions}from'../utils/json-loader.js';import{SDKError,ErrorCode}from'../sdk/index.js';export class SegmentUpdateCommand extends BaseCommand{[a26_0x3102da(0x188)]=a26_0x3102da(0x191);[a26_0x3102da(0x183)]='Update\x20existing\x20child\x20segment';async[a26_0x3102da(0x19b)](_0x6a4808){const _0x4f0ab3=a26_0x3102da,{options:_0x218d70,args:_0x514146,tdx:_0x1a9b73}=_0x6a4808,_0x1e0b4a=_0x218d70;if(_0x514146[_0x4f0ab3(0x1ad)]===0x0)return console[_0x4f0ab3(0x184)]('Error:\x20Segment\x20path\x20or\x20name\x20is\x20required'),console[_0x4f0ab3(0x184)](_0x4f0ab3(0x1a7)),console[_0x4f0ab3(0x184)]('Examples:'),console[_0x4f0ab3(0x184)](_0x4f0ab3(0x19a)),console[_0x4f0ab3(0x184)](_0x4f0ab3(0x19d)),0x1;const _0xed911e=_0x514146[0x0],_0xef7c09=_0x218d70[_0x4f0ab3(0x199)];let _0x1dc514=_0xed911e;_0xef7c09&&!_0xed911e[_0x4f0ab3(0x1aa)]('/')&&(_0x1dc514=_0xef7c09+'/'+_0xed911e,_0x1e0b4a['verbose']&&console[_0x4f0ab3(0x184)](_0x4f0ab3(0x187)+_0x1dc514));const _0x528064=await withSpinner(_0x4f0ab3(0x189)+_0x1dc514+_0x4f0ab3(0x196),()=>_0x1a9b73[_0x4f0ab3(0x185)][_0x4f0ab3(0x1ab)](_0x1dc514),{'verbose':_0x1e0b4a[_0x4f0ab3(0x1ac)]}),_0x5d9f63=_0x528064[_0x4f0ab3(0x18c)];_0x1e0b4a['verbose']&&console[_0x4f0ab3(0x184)]('Resolved\x20type:\x20'+_0x5d9f63['type']);if(_0x5d9f63[_0x4f0ab3(0x1ae)]!==_0x4f0ab3(0x185))return console['error'](_0x4f0ab3(0x18f)+_0x5d9f63[_0x4f0ab3(0x1ae)]+_0x4f0ab3(0x17e)),console[_0x4f0ab3(0x184)](_0x4f0ab3(0x1a2)),0x1;if(!_0x5d9f63[_0x4f0ab3(0x193)])throw new SDKError(ErrorCode['INTERNAL'],_0x4f0ab3(0x186));const _0x49b666=_0x5d9f63[_0x4f0ab3(0x1a1)],_0x40cd41=_0x5d9f63[_0x4f0ab3(0x193)];_0x1e0b4a[_0x4f0ab3(0x1ac)]&&(console['error'](_0x4f0ab3(0x1a0)+_0x49b666),console['error']('Segment\x20ID:\x20'+_0x40cd41));let _0x53d266;if(_0x1e0b4a[_0x4f0ab3(0x190)]){const _0x3b49e9=_0x1e0b4a[_0x4f0ab3(0x190)],_0x18758a=await withSpinner(_0x4f0ab3(0x19e)+_0x3b49e9+'\x27...',()=>_0x1a9b73[_0x4f0ab3(0x185)][_0x4f0ab3(0x1a6)](_0x49b666,_0x3b49e9),{'verbose':_0x1e0b4a[_0x4f0ab3(0x1ac)]});_0x53d266=parseInt(_0x18758a['data'],0xa),_0x1e0b4a[_0x4f0ab3(0x1ac)]&&console[_0x4f0ab3(0x184)](_0x4f0ab3(0x181)+_0x53d266);}const _0x383830=await loadJSONFromOptions(_0x1e0b4a[_0x4f0ab3(0x18b)],_0x1e0b4a[_0x4f0ab3(0x180)]),_0x2a9460={'name':_0x1e0b4a[_0x4f0ab3(0x188)],'description':_0x1e0b4a[_0x4f0ab3(0x183)],'rule':_0x383830,'kind':_0x1e0b4a['kind']!==undefined?parseInt(_0x1e0b4a[_0x4f0ab3(0x1a8)],0xa):undefined,'segmentFolderId':_0x53d266},_0x52d082=await withSpinner(_0x4f0ab3(0x195)+_0x5d9f63[_0x4f0ab3(0x194)]+'\x27...',()=>_0x1a9b73['segment'][_0x4f0ab3(0x1a3)](_0x49b666,_0x40cd41,_0x2a9460),{'verbose':_0x1e0b4a[_0x4f0ab3(0x1ac)]}),_0x217105=_0x52d082['data'];return console[_0x4f0ab3(0x184)]('✔\x20Updated\x20segment\x20\x27'+_0x217105[_0x4f0ab3(0x188)]+'\x27'),_0x1dc514!==_0xed911e&&console[_0x4f0ab3(0x184)](_0x4f0ab3(0x17f)+_0x1dc514),await handleSDKOutput([_0x217105],_0x1e0b4a),0x0;}}function a26_0x4a39(){const _0x4d0eef=['Resolving\x20path\x20\x27','2889294hrxhPT','rule','data','6559068OtvHaF','534pFVPaE','Error:\x20Cannot\x20update\x20','folder','segment:update','2867510WnGqas','segmentId','segmentName','Updating\x20segment\x20\x27','\x27...','652545ZHuoAr','10072VXMhMZ','segmentPath','\x20\x20tdx\x20segment\x20update\x20\x22My\x20Audience/High\x20Value\x22\x20--description\x20\x22...\x22','execute','1ubZjBR','\x20\x20tdx\x20segment\x20update\x20\x22High\x20Value\x22\x20--rule\x20\x27...\x27\x20\x20#\x20Relative\x20to\x20context','Resolving\x20folder\x20\x27','7256smIxoL','Parent\x20ID:\x20','parentId','Use:\x20tdx\x20segment\x20update\x20<path_to_segment>\x20[options]','updateSegmentById','2894218qyiYnK','11hRyKEz','resolveFolderId','Usage:\x20tdx\x20segment\x20update\x20<path>\x20[options]','kind','14WeiNkp','includes','resolvePathToResource','verbose','length','type','.\x20Only\x20child\x20segments\x20can\x20be\x20updated.','\x20\x20\x20Path:\x20','ruleFile','Resolved\x20folder\x20ID:\x20','108JkyLlx','description','error','segment','Segment\x20ID\x20missing\x20from\x20resolved\x20path','Resolved\x20relative\x20path\x20to:\x20','name'];a26_0x4a39=function(){return _0x4d0eef;};return a26_0x4a39();}
@@ -1 +1 @@
1
- const a27_0x247628=a27_0x1c20;(function(_0x7bca58,_0x3bd679){const _0x18496f=a27_0x1c20,_0x200c63=_0x7bca58();while(!![]){try{const _0x5cd9f0=parseInt(_0x18496f(0x149))/0x1+-parseInt(_0x18496f(0x153))/0x2+-parseInt(_0x18496f(0x15d))/0x3+parseInt(_0x18496f(0x143))/0x4+parseInt(_0x18496f(0x148))/0x5*(-parseInt(_0x18496f(0x13e))/0x6)+-parseInt(_0x18496f(0x157))/0x7+parseInt(_0x18496f(0x14f))/0x8;if(_0x5cd9f0===_0x3bd679)break;else _0x200c63['push'](_0x200c63['shift']());}catch(_0x18a3d2){_0x200c63['push'](_0x200c63['shift']());}}}(a27_0x1f01,0x49651));function a27_0x1f01(){const _0x2c994f=['Parent\x20ID:\x20','\x27...','42UHKNhY','name','isAbsolute','folderPath','verbose','739124QBCFfJ','resolvePathToResource','Context\x20set\x20to:\x20','\x20\x20tdx\x20segment\x20use\x20\x22My\x20Audience/Marketing\x22','Resolved\x20path\x20type:\x20','163675eeeOJr','239920kbYKSJ','Examples:','Use\x20\x22tdx\x20context\x22\x20to\x20see\x20all\x20context\x20parameters','Context\x20cleared.\x20Back\x20to\x20root.','split','folderId','11836688qhOUFD','Resolved\x20relative\x20path\x20to:\x20','Use:\x20tdx\x20segment\x20use\x20','Site:\x20','676706Siojgl','parentName','Error:\x20Path\x20is\x20required','Use\x20an\x20absolute\x20path\x20or\x20set\x20context\x20with:\x20tdx\x20segment\x20use\x20<parent_name>','3335892mVKBaf','\x20\x20tdx\x20segment\x20use\x20/\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Clear\x20context','log','Resolving\x20path\x20\x27','\x20\x20tdx\x20segment\x20use\x20\x22My\x20Audience\x22','session','1678824lLoSLk','site','segments','type','slice','fullPath','Set\x20current\x20segment/folder\x20context\x20for\x20navigation','Error:\x20Cannot\x20set\x20context\x20to\x20a\x20segment.','Use\x20\x22tdx\x20segments\x22\x20to\x20list\x20contents\x20in\x20this\x20context','join','error','data','segmentPath','segment','length','Context\x20can\x20only\x20be\x20set\x20to\x20a\x20parent\x20segment\x20or\x20folder.','description'];a27_0x1f01=function(){return _0x2c994f;};return a27_0x1f01();}import{BaseCommand}from'./command.js';import{saveSessionContext}from'../core/session.js';import{withSpinner}from'../utils/spinner.js';import{parsePath,normalizePath}from'../utils/segment-path-parser.js';function a27_0x1c20(_0x265817,_0x2ae963){const _0x1f0179=a27_0x1f01();return a27_0x1c20=function(_0x1c2054,_0x4e1e4b){_0x1c2054=_0x1c2054-0x137;let _0x29ab09=_0x1f0179[_0x1c2054];return _0x29ab09;},a27_0x1c20(_0x265817,_0x2ae963);}export class SegmentUseCommand extends BaseCommand{[a27_0x247628(0x13f)]='segment:use';[a27_0x247628(0x13b)]=a27_0x247628(0x163);async['execute'](_0x11d146){const _0x266926=a27_0x247628,{options:_0x192c7a,args:_0x55440b,tdx:_0xb5cad0}=_0x11d146;if(_0x55440b[_0x266926(0x139)]===0x0)return console[_0x266926(0x167)](_0x266926(0x155)),console[_0x266926(0x167)]('Usage:\x20tdx\x20segment\x20use\x20<path>'),console[_0x266926(0x167)](_0x266926(0x14a)),console[_0x266926(0x167)](_0x266926(0x15b)),console[_0x266926(0x167)](_0x266926(0x146)),console['error'](_0x266926(0x158)),console['error']('\x20\x20tdx\x20segment\x20use\x20..\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Go\x20to\x20parent'),0x1;const _0x22b1fc=_0x55440b[0x0],_0x228d78=_0x192c7a[_0x266926(0x15c)];try{if(_0x22b1fc==='/')return saveSessionContext({'segment_path':undefined},_0x228d78),console['log'](_0x266926(0x14c)),0x0;const _0x571643=_0x192c7a[_0x266926(0x137)];let _0x119c2d=_0x22b1fc;const _0x3acf3c=parsePath(_0x22b1fc);if(!_0x3acf3c[_0x266926(0x140)]){if(!_0x571643)return console[_0x266926(0x167)]('Error:\x20No\x20context\x20set.\x20Cannot\x20use\x20relative\x20path.'),console['error'](_0x266926(0x156)),0x1;if(_0x22b1fc==='..'){const _0x3f2300=_0x571643[_0x266926(0x14d)]('/')[_0x266926(0x161)](0x0,-0x1)[_0x266926(0x166)]('/');_0x119c2d=_0x3f2300||'/';}else _0x22b1fc==='.'?_0x119c2d=_0x571643:_0x119c2d=_0x571643+'/'+_0x22b1fc;_0x192c7a[_0x266926(0x142)]&&console['error'](_0x266926(0x150)+_0x119c2d);}if(_0x119c2d==='/'||_0x119c2d==='')return saveSessionContext({'segment_path':undefined},_0x228d78),console[_0x266926(0x159)](_0x266926(0x14c)),0x0;_0x119c2d=normalizePath(_0x119c2d);const _0xeef7ee=parsePath(_0x119c2d)[_0x266926(0x15f)];if(_0xeef7ee[_0x266926(0x139)]===0x0)return saveSessionContext({'segment_path':undefined},_0x228d78),console[_0x266926(0x159)](_0x266926(0x14c)),0x0;_0x192c7a[_0x266926(0x142)]&&(console[_0x266926(0x167)](_0x266926(0x152)+_0x192c7a[_0x266926(0x15e)]),console[_0x266926(0x167)]('Target\x20path:\x20'+_0x119c2d));const _0x4979dc=await withSpinner(_0x266926(0x15a)+_0x119c2d+_0x266926(0x13d),()=>_0xb5cad0[_0x266926(0x138)][_0x266926(0x144)](_0x119c2d),{'verbose':_0x192c7a[_0x266926(0x142)]}),_0x36053e=_0x4979dc[_0x266926(0x168)];_0x192c7a[_0x266926(0x142)]&&(console[_0x266926(0x167)](_0x266926(0x147)+_0x36053e[_0x266926(0x160)]),console[_0x266926(0x167)](_0x266926(0x13c)+_0x36053e['parentId']),_0x36053e['folderId']&&console[_0x266926(0x167)]('Folder\x20ID:\x20'+_0x36053e[_0x266926(0x14e)]));if(_0x36053e[_0x266926(0x160)]===_0x266926(0x138))return console[_0x266926(0x167)](_0x266926(0x164)),console['error'](_0x266926(0x13a)),console[_0x266926(0x167)](_0x266926(0x151)+_0x36053e[_0x266926(0x154)]+(_0x36053e[_0x266926(0x141)]?'/'+_0x36053e[_0x266926(0x141)][_0x266926(0x166)]('/'):'')),0x1;return saveSessionContext({'segment_path':_0x36053e[_0x266926(0x162)],'parent_segment':_0x36053e[_0x266926(0x154)]},_0x228d78),console[_0x266926(0x159)](_0x266926(0x145)+_0x36053e['fullPath']),_0x192c7a['verbose']&&(console[_0x266926(0x167)](_0x266926(0x165)),console['error']('Use\x20\x22tdx\x20segment\x20pwd\x22\x20to\x20show\x20current\x20context'),console[_0x266926(0x167)](_0x266926(0x14b))),0x0;}catch(_0x2799aa){throw _0x2799aa;}}}
1
+ function a27_0x3927(_0x1895ee,_0x16bd68){const _0x5a6cac=a27_0x5a6c();return a27_0x3927=function(_0x392719,_0x4dbe79){_0x392719=_0x392719-0x19e;let _0x359118=_0x5a6cac[_0x392719];return _0x359118;},a27_0x3927(_0x1895ee,_0x16bd68);}const a27_0x4fed3b=a27_0x3927;(function(_0x504700,_0x4d01c3){const _0x2e2a69=a27_0x3927,_0x55ef70=_0x504700();while(!![]){try{const _0x5da315=parseInt(_0x2e2a69(0x1a7))/0x1*(parseInt(_0x2e2a69(0x1c4))/0x2)+-parseInt(_0x2e2a69(0x1bb))/0x3*(-parseInt(_0x2e2a69(0x1c8))/0x4)+-parseInt(_0x2e2a69(0x1cd))/0x5*(parseInt(_0x2e2a69(0x1a0))/0x6)+parseInt(_0x2e2a69(0x1a5))/0x7*(parseInt(_0x2e2a69(0x1bf))/0x8)+parseInt(_0x2e2a69(0x1a4))/0x9*(parseInt(_0x2e2a69(0x1bd))/0xa)+parseInt(_0x2e2a69(0x1b9))/0xb*(-parseInt(_0x2e2a69(0x1c2))/0xc)+-parseInt(_0x2e2a69(0x1ac))/0xd;if(_0x5da315===_0x4d01c3)break;else _0x55ef70['push'](_0x55ef70['shift']());}catch(_0x26cc6e){_0x55ef70['push'](_0x55ef70['shift']());}}}(a27_0x5a6c,0x4bf94));import{BaseCommand}from'./command.js';import{saveSessionContext}from'../core/session.js';import{withSpinner}from'../utils/spinner.js';import{parsePath,normalizePath}from'../utils/segment-path-parser.js';export class SegmentUseCommand extends BaseCommand{['name']=a27_0x4fed3b(0x1b0);['description']=a27_0x4fed3b(0x1cf);async[a27_0x4fed3b(0x1af)](_0x2c7206){const _0x5e2de5=a27_0x4fed3b,{options:_0x502a11,args:_0xf050ba,tdx:_0x199d3d}=_0x2c7206;if(_0xf050ba[_0x5e2de5(0x1b3)]===0x0)return console['error']('Error:\x20Path\x20is\x20required'),console[_0x5e2de5(0x1ad)](_0x5e2de5(0x1ca)),console[_0x5e2de5(0x1ad)]('Examples:'),console[_0x5e2de5(0x1ad)](_0x5e2de5(0x1bc)),console[_0x5e2de5(0x1ad)]('\x20\x20tdx\x20segment\x20use\x20\x22My\x20Audience/Marketing\x22'),console['error'](_0x5e2de5(0x1a6)),console['error']('\x20\x20tdx\x20segment\x20use\x20..\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Go\x20to\x20parent'),0x1;const _0x1bc056=_0xf050ba[0x0],_0x3a13fd=_0x502a11['session'];try{if(_0x1bc056==='/')return saveSessionContext({'segment_path':undefined},_0x3a13fd),console['log'](_0x5e2de5(0x1c7)),0x0;const _0x47c227=_0x502a11[_0x5e2de5(0x1aa)];let _0x4c785f=_0x1bc056;const _0x4f942c=parsePath(_0x1bc056);if(!_0x4f942c[_0x5e2de5(0x1b4)]){if(!_0x47c227)return console[_0x5e2de5(0x1ad)]('Error:\x20No\x20context\x20set.\x20Cannot\x20use\x20relative\x20path.'),console[_0x5e2de5(0x1ad)](_0x5e2de5(0x1cc)),0x1;if(_0x1bc056==='..'){const _0x26b5c1=_0x47c227[_0x5e2de5(0x1a2)]('/')[_0x5e2de5(0x1b1)](0x0,-0x1)[_0x5e2de5(0x1a3)]('/');_0x4c785f=_0x26b5c1||'/';}else _0x1bc056==='.'?_0x4c785f=_0x47c227:_0x4c785f=_0x47c227+'/'+_0x1bc056;_0x502a11[_0x5e2de5(0x1b8)]&&console[_0x5e2de5(0x1ad)](_0x5e2de5(0x1c5)+_0x4c785f);}if(_0x4c785f==='/'||_0x4c785f==='')return saveSessionContext({'segment_path':undefined},_0x3a13fd),console[_0x5e2de5(0x1ba)]('Context\x20cleared.\x20Back\x20to\x20root.'),0x0;_0x4c785f=normalizePath(_0x4c785f);const _0x4c7132=parsePath(_0x4c785f)['segments'];if(_0x4c7132['length']===0x0)return saveSessionContext({'segment_path':undefined},_0x3a13fd),console[_0x5e2de5(0x1ba)](_0x5e2de5(0x1c7)),0x0;_0x502a11['verbose']&&(console['error'](_0x5e2de5(0x1b2)+_0x502a11[_0x5e2de5(0x1a9)]),console['error'](_0x5e2de5(0x19f)+_0x4c785f));const _0x38567f=await withSpinner('Resolving\x20path\x20\x27'+_0x4c785f+'\x27...',()=>_0x199d3d[_0x5e2de5(0x1ae)]['resolvePathToResource'](_0x4c785f),{'verbose':_0x502a11['verbose']}),_0xd0bd8f=_0x38567f[_0x5e2de5(0x1b6)];_0x502a11[_0x5e2de5(0x1b8)]&&(console[_0x5e2de5(0x1ad)](_0x5e2de5(0x1ce)+_0xd0bd8f[_0x5e2de5(0x1c1)]),console[_0x5e2de5(0x1ad)](_0x5e2de5(0x1c9)+_0xd0bd8f[_0x5e2de5(0x19e)]),_0xd0bd8f[_0x5e2de5(0x1ab)]&&console[_0x5e2de5(0x1ad)](_0x5e2de5(0x1b7)+_0xd0bd8f[_0x5e2de5(0x1ab)]));if(_0xd0bd8f[_0x5e2de5(0x1c1)]==='segment')return console[_0x5e2de5(0x1ad)](_0x5e2de5(0x1a1)),console[_0x5e2de5(0x1ad)]('Context\x20can\x20only\x20be\x20set\x20to\x20a\x20parent\x20segment\x20or\x20folder.'),console['error']('Use:\x20tdx\x20segment\x20use\x20'+_0xd0bd8f[_0x5e2de5(0x1be)]+(_0xd0bd8f['folderPath']?'/'+_0xd0bd8f[_0x5e2de5(0x1b5)][_0x5e2de5(0x1a3)]('/'):'')),0x1;return saveSessionContext({'segment_path':_0xd0bd8f[_0x5e2de5(0x1c3)],'parent_segment':_0xd0bd8f[_0x5e2de5(0x1be)]},_0x3a13fd),console[_0x5e2de5(0x1ba)](_0x5e2de5(0x1c0)+_0xd0bd8f['fullPath']),_0x502a11['verbose']&&(console['error'](_0x5e2de5(0x1c6)),console[_0x5e2de5(0x1ad)](_0x5e2de5(0x1a8)),console[_0x5e2de5(0x1ad)](_0x5e2de5(0x1cb))),0x0;}catch(_0x69d296){throw _0x69d296;}}}function a27_0x5a6c(){const _0x1630c3=['execute','segment:use','slice','Site:\x20','length','isAbsolute','folderPath','data','Folder\x20ID:\x20','verbose','1507qREaIG','log','3HjlywA','\x20\x20tdx\x20segment\x20use\x20\x22My\x20Audience\x22','1609320zuDAfy','parentName','2989928Lzyfty','Context\x20set\x20to:\x20','type','27780XgZjvy','fullPath','2SdefvP','Resolved\x20relative\x20path\x20to:\x20','Use\x20\x22tdx\x20segments\x22\x20to\x20list\x20contents\x20in\x20this\x20context','Context\x20cleared.\x20Back\x20to\x20root.','1032684QcFkKM','Parent\x20ID:\x20','Usage:\x20tdx\x20segment\x20use\x20<path>','Use\x20\x22tdx\x20context\x22\x20to\x20see\x20all\x20context\x20parameters','Use\x20an\x20absolute\x20path\x20or\x20set\x20context\x20with:\x20tdx\x20segment\x20use\x20<parent_name>','15DtUjpd','Resolved\x20path\x20type:\x20','Set\x20current\x20segment/folder\x20context\x20for\x20navigation','parentId','Target\x20path:\x20','667890HafgaF','Error:\x20Cannot\x20set\x20context\x20to\x20a\x20segment.','split','join','18NYpDXC','7uZvHqQ','\x20\x20tdx\x20segment\x20use\x20/\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Clear\x20context','109315zpDevj','Use\x20\x22tdx\x20segment\x20pwd\x22\x20to\x20show\x20current\x20context','site','segmentPath','folderId','1310439aEowDA','error','segment'];a27_0x5a6c=function(){return _0x1630c3;};return a27_0x5a6c();}
@@ -1 +1 @@
1
- const a28_0x1dc4c6=a28_0x4c0f;(function(_0x205937,_0x1cd109){const _0x66c1c3=a28_0x4c0f,_0xe97810=_0x205937();while(!![]){try{const _0x3b6be0=parseInt(_0x66c1c3(0x103))/0x1+-parseInt(_0x66c1c3(0x119))/0x2*(parseInt(_0x66c1c3(0x10d))/0x3)+parseInt(_0x66c1c3(0x11b))/0x4*(-parseInt(_0x66c1c3(0x13a))/0x5)+parseInt(_0x66c1c3(0x128))/0x6+-parseInt(_0x66c1c3(0x126))/0x7+-parseInt(_0x66c1c3(0x116))/0x8+parseInt(_0x66c1c3(0x118))/0x9*(parseInt(_0x66c1c3(0x10f))/0xa);if(_0x3b6be0===_0x1cd109)break;else _0xe97810['push'](_0xe97810['shift']());}catch(_0xc0855b){_0xe97810['push'](_0xe97810['shift']());}}}(a28_0x3a4f,0x9aadf));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';function a28_0x4c0f(_0x26209d,_0x2d5b2a){const _0x3a4fed=a28_0x3a4f();return a28_0x4c0f=function(_0x4c0f34,_0x5d8a8b){_0x4c0f34=_0x4c0f34-0xfd;let _0x1dd75e=_0x3a4fed[_0x4c0f34];return _0x1dd75e;},a28_0x4c0f(_0x26209d,_0x2d5b2a);}import{handleSDKOutput}from'../utils/command-output.js';import{withSpinner}from'../utils/spinner.js';import{formatFlatList,formatTree}from'../utils/tree-formatter.js';function a28_0x3a4f(){const _0x266949=['2017036XjVjBS','execute','✔\x20Found\x20','No\x20parent\x20segments\x20match\x20pattern:\x20','Parent\x20ID:\x20','map','replace','resolvePathToResource','filter','length','site','348250bQUkCg','segment','138342NOeBCW','includes','description','\x20\x20Cause:\x20','(empty)','error','Listing\x20folders\x20and\x20segments...','listParentsWithPattern','List\x20parent\x20segments,\x20folders,\x20and\x20child\x20segments','cause','\x20folder','listRecursive','verbose','\x20segment','Resolving\x20context\x20path\x20\x27','Folder\x20ID:\x20','\x20parent\x20segment','localeCompare','5MWSJBh','Building\x20hierarchy\x20tree...','Path/pattern\x20arg:\x20','dim','segments','[parent\x20segments]','Site:\x20','format','491698WKThLB','Listing\x20parent\x20segments...','listUnified','\x20top-level\x20items','attributes','jsonl','parentId','listParents','Listing\x20parent\x20segments\x20matching\x20\x27','recursive','78YlKIOU','name','22178670ZzeCAO','folderId','json','👥\x20','\x5c$&','log','\x27...','8203072WUdpug','population','9uCresW','39974HgHYGG','data'];a28_0x3a4f=function(){return _0x266949;};return a28_0x3a4f();}import{formatRows}from'../utils/formatters.js';import a28_0x52f7c9 from'chalk';export class SegmentsCommand extends BaseCommand{[a28_0x1dc4c6(0x10e)]=a28_0x1dc4c6(0xff);[a28_0x1dc4c6(0x12a)]=a28_0x1dc4c6(0x130);async[a28_0x1dc4c6(0x11c)](_0x459eae){const _0x8489e7=a28_0x1dc4c6,{options:_0x565ab8,args:_0x288c21}=_0x459eae,_0x2c42b9=_0x565ab8[_0x8489e7(0x10c)],_0x228617=_0x288c21[0x0];try{const _0x4a0e23=_0x565ab8['segmentPath'];_0x565ab8['verbose']&&(console[_0x8489e7(0x12d)](_0x8489e7(0x101)+_0x565ab8[_0x8489e7(0x125)]),console[_0x8489e7(0x12d)]('Current\x20context:\x20'+(_0x4a0e23||'/')),_0x228617&&console[_0x8489e7(0x12d)](_0x8489e7(0xfd)+_0x228617),_0x2c42b9&&console['error']('Recursive\x20mode:\x20enabled'));if(_0x228617){const _0x275e15=_0x228617[_0x8489e7(0x129)]('*')||_0x228617[_0x8489e7(0x129)]('?');if(_0x275e15&&!_0x4a0e23)return await this[_0x8489e7(0x12f)](_0x459eae,_0x228617);else return _0x275e15?(console['error']('Error:\x20Pattern\x20matching\x20is\x20only\x20supported\x20at\x20root\x20level\x20(no\x20context\x20set).'),console[_0x8489e7(0x12d)]('Clear\x20context\x20with:\x20tdx\x20segment\x20use\x20/'),0x1):_0x2c42b9?await this['listRecursive'](_0x459eae,_0x228617):await this[_0x8489e7(0x105)](_0x459eae,_0x228617);}if(!_0x4a0e23)return await this[_0x8489e7(0x10a)](_0x459eae);return _0x2c42b9?await this['listRecursive'](_0x459eae,_0x4a0e23):await this[_0x8489e7(0x105)](_0x459eae,_0x4a0e23);}catch(_0x3d4250){if(_0x3d4250 instanceof SDKError)return console[_0x8489e7(0x12d)]('Error:\x20'+_0x3d4250['message']),_0x3d4250[_0x8489e7(0x131)]&&console[_0x8489e7(0x12d)](_0x8489e7(0x12b)+_0x3d4250[_0x8489e7(0x131)]),0x1;throw _0x3d4250;}}async['listParentsWithPattern'](_0x20f16a,_0x56c077){const _0x15832a=a28_0x1dc4c6,{options:_0x2e17f3,tdx:_0x27b6ff}=_0x20f16a,_0x2345cb=await withSpinner(_0x15832a(0x10b)+_0x56c077+_0x15832a(0x115),()=>_0x27b6ff[_0x15832a(0x127)]['listParents'](),{'verbose':_0x2e17f3[_0x15832a(0x134)]}),_0x27a3a5=_0x2345cb['data'],_0x58fd33=_0x56c077[_0x15832a(0x121)](/[.+^${}()|[\]\\]/g,_0x15832a(0x113))[_0x15832a(0x121)](/\*/g,'.*')[_0x15832a(0x121)](/\?/g,'.'),_0x92ab0=new RegExp('^'+_0x58fd33+'$','i'),_0x47986a=_0x27a3a5[_0x15832a(0x123)](_0x4d84ff=>_0x92ab0['test'](_0x4d84ff[_0x15832a(0x107)][_0x15832a(0x10e)]));console[_0x15832a(0x12d)](_0x15832a(0x11d)+_0x47986a['length']+_0x15832a(0x138)+(_0x47986a[_0x15832a(0x124)]!==0x1?'s':'')+'\x20matching\x20\x27'+_0x56c077+'\x27');if(_0x2e17f3[_0x15832a(0x102)]===_0x15832a(0x111)||_0x2e17f3['format']===_0x15832a(0x108))await handleSDKOutput(_0x47986a,_0x2e17f3);else{if(_0x47986a[_0x15832a(0x124)]===0x0)console[_0x15832a(0x114)](_0x15832a(0x11e)+_0x56c077);else{console[_0x15832a(0x114)](_0x15832a(0x100));for(const _0x53ffdd of _0x47986a){const _0x21fb9f=_0x53ffdd[_0x15832a(0x107)][_0x15832a(0x117)]?a28_0x52f7c9[_0x15832a(0xfe)]('\x20('+formatRows(_0x53ffdd['attributes'][_0x15832a(0x117)])+')'):'';console[_0x15832a(0x114)](_0x15832a(0x112)+_0x53ffdd[_0x15832a(0x107)][_0x15832a(0x10e)]+_0x21fb9f);}}}return 0x0;}async[a28_0x1dc4c6(0x10a)](_0x1bcf57){const _0x3633ac=a28_0x1dc4c6,{options:_0x113726,tdx:_0x52d9f4}=_0x1bcf57,_0x482d02=await withSpinner(_0x3633ac(0x104),()=>_0x52d9f4[_0x3633ac(0x127)][_0x3633ac(0x10a)](),{'verbose':_0x113726[_0x3633ac(0x134)]}),_0x42b758=_0x482d02['data'];console[_0x3633ac(0x12d)](_0x3633ac(0x11d)+_0x42b758[_0x3633ac(0x124)]+_0x3633ac(0x138)+(_0x42b758[_0x3633ac(0x124)]!==0x1?'s':''));if(_0x113726[_0x3633ac(0x102)]===_0x3633ac(0x111)||_0x113726[_0x3633ac(0x102)]==='jsonl')await handleSDKOutput(_0x42b758,_0x113726);else{console[_0x3633ac(0x114)](_0x3633ac(0x100));for(const _0x121fd0 of _0x42b758){const _0x53fe33=_0x121fd0['attributes'][_0x3633ac(0x117)]?a28_0x52f7c9[_0x3633ac(0xfe)]('\x20('+formatRows(_0x121fd0[_0x3633ac(0x107)][_0x3633ac(0x117)])+')'):'';console[_0x3633ac(0x114)](_0x3633ac(0x112)+_0x121fd0[_0x3633ac(0x107)][_0x3633ac(0x10e)]+_0x53fe33);}}return 0x0;}async[a28_0x1dc4c6(0x105)](_0x2b9dac,_0x84e14b){const _0x485c65=a28_0x1dc4c6,{options:_0x3007ad,tdx:_0x50a694}=_0x2b9dac,_0x2a20a5=await withSpinner(_0x485c65(0x136)+_0x84e14b+_0x485c65(0x115),()=>_0x50a694[_0x485c65(0x127)][_0x485c65(0x122)](_0x84e14b),{'verbose':_0x3007ad[_0x485c65(0x134)]}),_0x27eebf=_0x2a20a5['data'];_0x3007ad['verbose']&&(console[_0x485c65(0x12d)](_0x485c65(0x11f)+_0x27eebf['parentId']),_0x27eebf['folderId']&&console['error'](_0x485c65(0x137)+_0x27eebf[_0x485c65(0x110)]));const _0x586625=await withSpinner(_0x485c65(0x12e),()=>_0x50a694[_0x485c65(0x127)][_0x485c65(0x105)](_0x27eebf['parentId'],_0x27eebf[_0x485c65(0x110)]),{'verbose':_0x3007ad[_0x485c65(0x134)]}),{folders:_0x57df89,segments:_0x34e46e}=_0x586625[_0x485c65(0x11a)],_0xea7ae8=_0x57df89[_0x485c65(0x124)]+_0x34e46e[_0x485c65(0x124)];console['error'](_0x485c65(0x11d)+_0x57df89['length']+_0x485c65(0x132)+(_0x57df89[_0x485c65(0x124)]!==0x1?'s':'')+'\x20and\x20'+_0x34e46e['length']+_0x485c65(0x135)+(_0x34e46e['length']!==0x1?'s':''));if(_0x3007ad[_0x485c65(0x102)]===_0x485c65(0x111)||_0x3007ad[_0x485c65(0x102)]===_0x485c65(0x108)){const _0x271ac3=[..._0x57df89[_0x485c65(0x120)](_0x53da88=>({..._0x53da88,'type':'folder'})),..._0x34e46e['map'](_0x1f857a=>({..._0x1f857a,'type':_0x485c65(0x127)}))]['sort']((_0x2c3d34,_0x34e0b5)=>_0x2c3d34[_0x485c65(0x10e)][_0x485c65(0x139)](_0x34e0b5['name']));await handleSDKOutput(_0x271ac3,_0x3007ad);}else{if(_0xea7ae8===0x0)console[_0x485c65(0x114)](a28_0x52f7c9[_0x485c65(0xfe)]('[/'+_0x84e14b+']')),console[_0x485c65(0x114)](_0x485c65(0x12c));else{console[_0x485c65(0x114)](a28_0x52f7c9[_0x485c65(0xfe)]('[/'+_0x84e14b+']'));const _0x5aeb22=formatFlatList(_0x57df89,_0x34e46e,{'showMetadata':!![]});console[_0x485c65(0x114)](_0x5aeb22);}}return 0x0;}async[a28_0x1dc4c6(0x133)](_0x1c8f96,_0x409872){const _0x585247=a28_0x1dc4c6,{options:_0x2d87be,tdx:_0x5acdbf}=_0x1c8f96,_0x14518a=await withSpinner(_0x585247(0x136)+_0x409872+_0x585247(0x115),()=>_0x5acdbf[_0x585247(0x127)][_0x585247(0x122)](_0x409872),{'verbose':_0x2d87be[_0x585247(0x134)]}),_0x2be6b3=_0x14518a[_0x585247(0x11a)];_0x2d87be['verbose']&&(console['error'](_0x585247(0x11f)+_0x2be6b3[_0x585247(0x109)]),_0x2be6b3[_0x585247(0x110)]&&console[_0x585247(0x12d)]('Folder\x20ID:\x20'+_0x2be6b3[_0x585247(0x110)]));const _0x56fe4f=_0x2d87be['maxDepth']||0xa,_0x1348d6=await withSpinner(_0x585247(0x13b),()=>_0x5acdbf[_0x585247(0x127)][_0x585247(0x133)](_0x2be6b3[_0x585247(0x109)],_0x2be6b3[_0x585247(0x110)],0x0,_0x56fe4f),{'verbose':_0x2d87be[_0x585247(0x134)]}),_0x1800a3=_0x1348d6[_0x585247(0x11a)];console[_0x585247(0x12d)]('✔\x20Built\x20tree\x20with\x20'+_0x1800a3[_0x585247(0x124)]+_0x585247(0x106));if(_0x2d87be[_0x585247(0x102)]===_0x585247(0x111)||_0x2d87be[_0x585247(0x102)]===_0x585247(0x108))await handleSDKOutput(_0x1800a3,_0x2d87be);else{console['log'](a28_0x52f7c9[_0x585247(0xfe)]('[/'+_0x409872+']'));const _0x41551c=formatTree(_0x1800a3,{'showMetadata':!![]});console[_0x585247(0x114)](_0x41551c);}return 0x0;}}
1
+ const a28_0x21e6b6=a28_0x6ec0;(function(_0x5151cc,_0x2884c1){const _0x14eb2f=a28_0x6ec0,_0xda4bf3=_0x5151cc();while(!![]){try{const _0x5372a1=-parseInt(_0x14eb2f(0x115))/0x1+-parseInt(_0x14eb2f(0x109))/0x2*(parseInt(_0x14eb2f(0x123))/0x3)+-parseInt(_0x14eb2f(0x120))/0x4*(parseInt(_0x14eb2f(0xe9))/0x5)+-parseInt(_0x14eb2f(0x125))/0x6*(parseInt(_0x14eb2f(0x11e))/0x7)+parseInt(_0x14eb2f(0x11a))/0x8+parseInt(_0x14eb2f(0x129))/0x9+parseInt(_0x14eb2f(0x110))/0xa;if(_0x5372a1===_0x2884c1)break;else _0xda4bf3['push'](_0xda4bf3['shift']());}catch(_0x398e6c){_0xda4bf3['push'](_0xda4bf3['shift']());}}}(a28_0x4528,0xb62af));function a28_0x4528(){const _0x2a5f10=['filter','Path/pattern\x20arg:\x20','Listing\x20folders\x20and\x20segments...','11315178HfHOwA','format','\x20parent\x20segment','listRecursive','Error:\x20','\x27...','65lIYmbN','verbose','localeCompare','Parent\x20ID:\x20','test','log','\x20\x20Cause:\x20','data','json','parentId','listUnified','segmentPath','length','✔\x20Built\x20tree\x20with\x20','recursive','\x20folder','listParents','Current\x20context:\x20','site','Listing\x20parent\x20segments...','description','No\x20parent\x20segments\x20match\x20pattern:\x20','✔\x20Found\x20','Error:\x20Pattern\x20matching\x20is\x20only\x20supported\x20at\x20root\x20level\x20(no\x20context\x20set).','\x20matching\x20\x27','Building\x20hierarchy\x20tree...','map','\x20and\x20','attributes','(empty)','\x20segment','segments','96814dALnaH','population','replace','Recursive\x20mode:\x20enabled','error','includes','\x20top-level\x20items','6450230XrOOrv','dim','Folder\x20ID:\x20','sort','cause','48605CYvkGi','jsonl','List\x20parent\x20segments,\x20folders,\x20and\x20child\x20segments','resolvePathToResource','execute','6442008tuyVio','maxDepth','\x5c$&','folderId','2227162fGWTZs','Resolving\x20context\x20path\x20\x27','237436nXZVas','segment','👥\x20','51zUamuo','name','6xyTTEb'];a28_0x4528=function(){return _0x2a5f10;};return a28_0x4528();}import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleSDKOutput}from'../utils/command-output.js';import{withSpinner}from'../utils/spinner.js';import{formatFlatList,formatTree}from'../utils/tree-formatter.js';function a28_0x6ec0(_0x3940ad,_0x3eb636){const _0x45280d=a28_0x4528();return a28_0x6ec0=function(_0x6ec0a8,_0x3175fd){_0x6ec0a8=_0x6ec0a8-0xe5;let _0x2484c6=_0x45280d[_0x6ec0a8];return _0x2484c6;},a28_0x6ec0(_0x3940ad,_0x3eb636);}import{formatRows}from'../utils/formatters.js';import a28_0x31c6cb from'chalk';export class SegmentsCommand extends BaseCommand{[a28_0x21e6b6(0x124)]=a28_0x21e6b6(0x108);[a28_0x21e6b6(0xfd)]=a28_0x21e6b6(0x117);async[a28_0x21e6b6(0x119)](_0x487ee5){const _0x4e3b62=a28_0x21e6b6,{options:_0x54a6d7,args:_0x47534f}=_0x487ee5,_0x7d3e6a=_0x54a6d7[_0x4e3b62(0xf7)],_0x3d61c=_0x47534f[0x0];try{const _0xae1c31=_0x54a6d7[_0x4e3b62(0xf4)];_0x54a6d7[_0x4e3b62(0xea)]&&(console[_0x4e3b62(0x10d)]('Site:\x20'+_0x54a6d7[_0x4e3b62(0xfb)]),console[_0x4e3b62(0x10d)](_0x4e3b62(0xfa)+(_0xae1c31||'/')),_0x3d61c&&console[_0x4e3b62(0x10d)](_0x4e3b62(0x127)+_0x3d61c),_0x7d3e6a&&console['error'](_0x4e3b62(0x10c)));if(_0x3d61c){const _0x5b8ec4=_0x3d61c[_0x4e3b62(0x10e)]('*')||_0x3d61c[_0x4e3b62(0x10e)]('?');if(_0x5b8ec4&&!_0xae1c31)return await this['listParentsWithPattern'](_0x487ee5,_0x3d61c);else return _0x5b8ec4?(console['error'](_0x4e3b62(0x100)),console[_0x4e3b62(0x10d)]('Clear\x20context\x20with:\x20tdx\x20segment\x20use\x20/'),0x1):_0x7d3e6a?await this[_0x4e3b62(0xe6)](_0x487ee5,_0x3d61c):await this[_0x4e3b62(0xf3)](_0x487ee5,_0x3d61c);}if(!_0xae1c31)return await this[_0x4e3b62(0xf9)](_0x487ee5);return _0x7d3e6a?await this['listRecursive'](_0x487ee5,_0xae1c31):await this['listUnified'](_0x487ee5,_0xae1c31);}catch(_0x5aeef2){if(_0x5aeef2 instanceof SDKError)return console[_0x4e3b62(0x10d)](_0x4e3b62(0xe7)+_0x5aeef2['message']),_0x5aeef2[_0x4e3b62(0x114)]&&console[_0x4e3b62(0x10d)](_0x4e3b62(0xef)+_0x5aeef2[_0x4e3b62(0x114)]),0x1;throw _0x5aeef2;}}async['listParentsWithPattern'](_0x1cf3f5,_0x88e0d2){const _0x3f5563=a28_0x21e6b6,{options:_0x159758,tdx:_0x1fabc2}=_0x1cf3f5,_0x6c2c3d=await withSpinner('Listing\x20parent\x20segments\x20matching\x20\x27'+_0x88e0d2+_0x3f5563(0xe8),()=>_0x1fabc2[_0x3f5563(0x121)][_0x3f5563(0xf9)](),{'verbose':_0x159758[_0x3f5563(0xea)]}),_0x23f92b=_0x6c2c3d['data'],_0x3ab225=_0x88e0d2[_0x3f5563(0x10b)](/[.+^${}()|[\]\\]/g,_0x3f5563(0x11c))[_0x3f5563(0x10b)](/\*/g,'.*')[_0x3f5563(0x10b)](/\?/g,'.'),_0x44e6a0=new RegExp('^'+_0x3ab225+'$','i'),_0x392442=_0x23f92b[_0x3f5563(0x126)](_0x43dfb6=>_0x44e6a0[_0x3f5563(0xed)](_0x43dfb6[_0x3f5563(0x105)][_0x3f5563(0x124)]));console[_0x3f5563(0x10d)](_0x3f5563(0xff)+_0x392442[_0x3f5563(0xf5)]+_0x3f5563(0xe5)+(_0x392442[_0x3f5563(0xf5)]!==0x1?'s':'')+_0x3f5563(0x101)+_0x88e0d2+'\x27');if(_0x159758[_0x3f5563(0x12a)]==='json'||_0x159758[_0x3f5563(0x12a)]===_0x3f5563(0x116))await handleSDKOutput(_0x392442,_0x159758);else{if(_0x392442[_0x3f5563(0xf5)]===0x0)console['log'](_0x3f5563(0xfe)+_0x88e0d2);else{console['log']('[parent\x20segments]');for(const _0x8dc583 of _0x392442){const _0x28d2ba=_0x8dc583[_0x3f5563(0x105)]['population']?a28_0x31c6cb[_0x3f5563(0x111)]('\x20('+formatRows(_0x8dc583[_0x3f5563(0x105)][_0x3f5563(0x10a)])+')'):'';console[_0x3f5563(0xee)]('👥\x20'+_0x8dc583['attributes']['name']+_0x28d2ba);}}}return 0x0;}async['listParents'](_0x5fe53b){const _0xbdd117=a28_0x21e6b6,{options:_0x237e36,tdx:_0x56cfa6}=_0x5fe53b,_0x341142=await withSpinner(_0xbdd117(0xfc),()=>_0x56cfa6[_0xbdd117(0x121)][_0xbdd117(0xf9)](),{'verbose':_0x237e36[_0xbdd117(0xea)]}),_0x1588d1=_0x341142[_0xbdd117(0xf0)];console[_0xbdd117(0x10d)](_0xbdd117(0xff)+_0x1588d1['length']+'\x20parent\x20segment'+(_0x1588d1[_0xbdd117(0xf5)]!==0x1?'s':''));if(_0x237e36[_0xbdd117(0x12a)]==='json'||_0x237e36[_0xbdd117(0x12a)]===_0xbdd117(0x116))await handleSDKOutput(_0x1588d1,_0x237e36);else{console[_0xbdd117(0xee)]('[parent\x20segments]');for(const _0x557be9 of _0x1588d1){const _0x204671=_0x557be9[_0xbdd117(0x105)][_0xbdd117(0x10a)]?a28_0x31c6cb[_0xbdd117(0x111)]('\x20('+formatRows(_0x557be9[_0xbdd117(0x105)]['population'])+')'):'';console['log'](_0xbdd117(0x122)+_0x557be9[_0xbdd117(0x105)][_0xbdd117(0x124)]+_0x204671);}}return 0x0;}async[a28_0x21e6b6(0xf3)](_0x48d2b5,_0x4edf63){const _0x2b71e6=a28_0x21e6b6,{options:_0x3d60b5,tdx:_0x1bd803}=_0x48d2b5,_0x2ca4a3=await withSpinner(_0x2b71e6(0x11f)+_0x4edf63+_0x2b71e6(0xe8),()=>_0x1bd803[_0x2b71e6(0x121)][_0x2b71e6(0x118)](_0x4edf63),{'verbose':_0x3d60b5[_0x2b71e6(0xea)]}),_0xf73b6=_0x2ca4a3[_0x2b71e6(0xf0)];_0x3d60b5[_0x2b71e6(0xea)]&&(console[_0x2b71e6(0x10d)]('Parent\x20ID:\x20'+_0xf73b6[_0x2b71e6(0xf2)]),_0xf73b6[_0x2b71e6(0x11d)]&&console[_0x2b71e6(0x10d)](_0x2b71e6(0x112)+_0xf73b6[_0x2b71e6(0x11d)]));const _0x2e89e5=await withSpinner(_0x2b71e6(0x128),()=>_0x1bd803['segment'][_0x2b71e6(0xf3)](_0xf73b6[_0x2b71e6(0xf2)],_0xf73b6[_0x2b71e6(0x11d)]),{'verbose':_0x3d60b5[_0x2b71e6(0xea)]}),{folders:_0x2e6a60,segments:_0x7f17dc}=_0x2e89e5[_0x2b71e6(0xf0)],_0x29846b=_0x2e6a60[_0x2b71e6(0xf5)]+_0x7f17dc[_0x2b71e6(0xf5)];console[_0x2b71e6(0x10d)](_0x2b71e6(0xff)+_0x2e6a60[_0x2b71e6(0xf5)]+_0x2b71e6(0xf8)+(_0x2e6a60[_0x2b71e6(0xf5)]!==0x1?'s':'')+_0x2b71e6(0x104)+_0x7f17dc[_0x2b71e6(0xf5)]+_0x2b71e6(0x107)+(_0x7f17dc[_0x2b71e6(0xf5)]!==0x1?'s':''));if(_0x3d60b5[_0x2b71e6(0x12a)]===_0x2b71e6(0xf1)||_0x3d60b5['format']===_0x2b71e6(0x116)){const _0x5c4baf=[..._0x2e6a60[_0x2b71e6(0x103)](_0x23dcea=>({..._0x23dcea,'type':'folder'})),..._0x7f17dc[_0x2b71e6(0x103)](_0x36b459=>({..._0x36b459,'type':'segment'}))][_0x2b71e6(0x113)]((_0x3c61a2,_0x3b9823)=>_0x3c61a2[_0x2b71e6(0x124)][_0x2b71e6(0xeb)](_0x3b9823['name']));await handleSDKOutput(_0x5c4baf,_0x3d60b5);}else{if(_0x29846b===0x0)console[_0x2b71e6(0xee)](a28_0x31c6cb[_0x2b71e6(0x111)]('[/'+_0x4edf63+']')),console['log'](_0x2b71e6(0x106));else{console['log'](a28_0x31c6cb[_0x2b71e6(0x111)]('[/'+_0x4edf63+']'));const _0x498585=formatFlatList(_0x2e6a60,_0x7f17dc,{'showMetadata':!![]});console[_0x2b71e6(0xee)](_0x498585);}}return 0x0;}async[a28_0x21e6b6(0xe6)](_0x4f7a51,_0x5428df){const _0x5a3e6a=a28_0x21e6b6,{options:_0x553c22,tdx:_0x3ee72c}=_0x4f7a51,_0x207639=await withSpinner(_0x5a3e6a(0x11f)+_0x5428df+_0x5a3e6a(0xe8),()=>_0x3ee72c[_0x5a3e6a(0x121)][_0x5a3e6a(0x118)](_0x5428df),{'verbose':_0x553c22[_0x5a3e6a(0xea)]}),_0x4350cd=_0x207639[_0x5a3e6a(0xf0)];_0x553c22[_0x5a3e6a(0xea)]&&(console['error'](_0x5a3e6a(0xec)+_0x4350cd[_0x5a3e6a(0xf2)]),_0x4350cd[_0x5a3e6a(0x11d)]&&console['error'](_0x5a3e6a(0x112)+_0x4350cd[_0x5a3e6a(0x11d)]));const _0x4565ac=_0x553c22[_0x5a3e6a(0x11b)]||0xa,_0x4d7dd8=await withSpinner(_0x5a3e6a(0x102),()=>_0x3ee72c[_0x5a3e6a(0x121)][_0x5a3e6a(0xe6)](_0x4350cd[_0x5a3e6a(0xf2)],_0x4350cd[_0x5a3e6a(0x11d)],0x0,_0x4565ac),{'verbose':_0x553c22['verbose']}),_0x552a50=_0x4d7dd8[_0x5a3e6a(0xf0)];console['error'](_0x5a3e6a(0xf6)+_0x552a50[_0x5a3e6a(0xf5)]+_0x5a3e6a(0x10f));if(_0x553c22[_0x5a3e6a(0x12a)]===_0x5a3e6a(0xf1)||_0x553c22[_0x5a3e6a(0x12a)]===_0x5a3e6a(0x116))await handleSDKOutput(_0x552a50,_0x553c22);else{console[_0x5a3e6a(0xee)](a28_0x31c6cb['dim']('[/'+_0x5428df+']'));const _0x4fe12a=formatTree(_0x552a50,{'showMetadata':!![]});console[_0x5a3e6a(0xee)](_0x4fe12a);}return 0x0;}}
@@ -1 +1 @@
1
- const a29_0x4162b1=a29_0x114f;function a29_0x114f(_0x25f2d1,_0x51e5e3){const _0x52a07a=a29_0x52a0();return a29_0x114f=function(_0x114f04,_0x1dfe2d){_0x114f04=_0x114f04-0xc3;let _0x30d1f3=_0x52a07a[_0x114f04];return _0x30d1f3;},a29_0x114f(_0x25f2d1,_0x51e5e3);}(function(_0x399f35,_0x38e9d9){const _0x5970eb=a29_0x114f,_0x10ebb9=_0x399f35();while(!![]){try{const _0x36a104=-parseInt(_0x5970eb(0xc8))/0x1*(-parseInt(_0x5970eb(0xc6))/0x2)+-parseInt(_0x5970eb(0xc9))/0x3*(-parseInt(_0x5970eb(0xcd))/0x4)+parseInt(_0x5970eb(0xe3))/0x5*(parseInt(_0x5970eb(0xe2))/0x6)+-parseInt(_0x5970eb(0xc4))/0x7*(parseInt(_0x5970eb(0xdd))/0x8)+-parseInt(_0x5970eb(0xcb))/0x9*(parseInt(_0x5970eb(0xde))/0xa)+-parseInt(_0x5970eb(0xe5))/0xb+parseInt(_0x5970eb(0xec))/0xc;if(_0x36a104===_0x38e9d9)break;else _0x10ebb9['push'](_0x10ebb9['shift']());}catch(_0x38c13b){_0x10ebb9['push'](_0x10ebb9['shift']());}}}(a29_0x52a0,0xabdc3));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleSDKOutput}from'../utils/command-output.js';import{parseTableReference,validateTableDescribeReference}from'../utils/table-ref-parser.js';function a29_0x52a0(){const _0x2000d6=['\x20row','verbose','Show\x20table\x20contents','Error:\x20','site','error','message','cause','2325936fhWtqv','489950MKIpXj','✔\x20Retrieved\x20','database','showTable','30yGztca','618675DWgMDx','description','7820351OcOlaZ','table','...','Site:\x20','Catalog:\x20','show','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','7919100gmDilL','args','14aKLSBg','length','30ETAfCT','catalog','79791TNyjiy','473502wEHCNA','✔\x20Query\x20successful\x20-\x200\x20rows\x20returned','117UWTOkq','Usage:\x20tdx\x20show\x20<database.table>','4HQNhZr','validate','name','Table:\x20','\x20\x20\x20or:\x20tdx\x20show\x20<catalog.database.table>','\x20from\x20','data','execute'];a29_0x52a0=function(){return _0x2000d6;};return a29_0x52a0();}import{withSpinner}from'../utils/spinner.js';export class ShowCommand extends BaseCommand{[a29_0x4162b1(0xcf)]=a29_0x4162b1(0xea);[a29_0x4162b1(0xe4)]=a29_0x4162b1(0xd7);async[a29_0x4162b1(0xd4)](_0x32e594){const _0x4afef4=a29_0x4162b1;return this[_0x4afef4(0xe1)](_0x32e594);}async[a29_0x4162b1(0xe1)](_0x2535d7){const _0x47b16f=a29_0x4162b1,{options:_0x57b520,args:_0x4e7444,tdx:_0x292c75}=_0x2535d7;let _0x383d53;try{_0x383d53=parseTableReference(_0x4e7444[0x0]);const _0x450373=_0x57b520[_0x47b16f(0xe0)];!_0x383d53[_0x47b16f(0xe0)]&&_0x450373&&(_0x383d53[_0x47b16f(0xe0)]=_0x450373);const _0x1ba9c7=validateTableDescribeReference(_0x383d53);if(_0x1ba9c7)return console[_0x47b16f(0xda)]('Error:\x20'+_0x1ba9c7),console[_0x47b16f(0xda)]('Usage:\x20tdx\x20show\x20<database.table>'),console[_0x47b16f(0xda)](_0x47b16f(0xd1)),console[_0x47b16f(0xda)]('\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--database\x20<database>'),0x1;}catch(_0xea9fbf){return console[_0x47b16f(0xda)](_0x47b16f(0xd8)+_0xea9fbf[_0x47b16f(0xdb)]),console[_0x47b16f(0xda)](_0x47b16f(0xcc)),console[_0x47b16f(0xda)](_0x47b16f(0xd1)),console[_0x47b16f(0xda)]('\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--database\x20<database>'),0x1;}const _0x471d7b=_0x383d53[_0x47b16f(0xc7)],_0x105906=_0x383d53[_0x47b16f(0xe0)],_0x3c2dbe=_0x383d53[_0x47b16f(0xe6)],_0x54e283=_0x57b520['limit'];try{_0x57b520[_0x47b16f(0xd6)]&&(console[_0x47b16f(0xda)](_0x47b16f(0xe8)+_0x57b520[_0x47b16f(0xd9)]),_0x471d7b&&console[_0x47b16f(0xda)](_0x47b16f(0xe9)+_0x471d7b),console[_0x47b16f(0xda)]('Database:\x20'+_0x105906),console[_0x47b16f(0xda)](_0x47b16f(0xd0)+_0x3c2dbe),console[_0x47b16f(0xda)]('Limit:\x20'+_0x54e283));const _0x5ce6fe=_0x471d7b?_0x471d7b+'.'+_0x105906+'.'+_0x3c2dbe:_0x105906+'.'+_0x3c2dbe,_0x4fb5b0=await withSpinner('Querying\x20'+_0x5ce6fe+_0x47b16f(0xe7),()=>_0x292c75[_0x47b16f(0xe6)][_0x47b16f(0xea)](_0x105906,_0x3c2dbe,_0x54e283,_0x471d7b),{'verbose':_0x57b520['verbose']}),_0xa172e1=_0x4fb5b0[_0x47b16f(0xd3)],_0x51808f=_0xa172e1[_0x47b16f(0xd3)];return _0x51808f[_0x47b16f(0xc5)]===0x0?console[_0x47b16f(0xda)](_0x47b16f(0xca)):console[_0x47b16f(0xda)](_0x47b16f(0xdf)+_0x51808f[_0x47b16f(0xc5)]+_0x47b16f(0xd5)+(_0x51808f[_0x47b16f(0xc5)]!==0x1?'s':'')+_0x47b16f(0xd2)+_0x5ce6fe),await handleSDKOutput(_0x51808f,_0x57b520),0x0;}catch(_0x26a6d0){if(_0x26a6d0 instanceof SDKError)return console[_0x47b16f(0xda)]('Error:\x20'+_0x26a6d0['message']),_0x26a6d0[_0x47b16f(0xdc)]&&console[_0x47b16f(0xda)]('\x20\x20Cause:\x20'+_0x26a6d0[_0x47b16f(0xdc)]),0x1;throw _0x26a6d0;}}[a29_0x4162b1(0xce)](_0xd331c7){const _0x572f82=a29_0x4162b1;if(_0xd331c7[_0x572f82(0xc3)][_0x572f82(0xc5)]===0x0)return _0x572f82(0xeb);if(_0xd331c7[_0x572f82(0xc3)][_0x572f82(0xc5)]>0x1)return'Too\x20many\x20arguments\x0aUsage:\x20tdx\x20show\x20<database.table>\x0a\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--database\x20<database>\x0a\x0aRun\x20\x27tdx\x20show\x20--help\x27\x20for\x20more\x20options';return undefined;}}
1
+ const a29_0x332c9d=a29_0x5df9;(function(_0x371ae8,_0x7167d7){const _0x2c8c02=a29_0x5df9,_0x41a13a=_0x371ae8();while(!![]){try{const _0x28521e=parseInt(_0x2c8c02(0xbf))/0x1*(-parseInt(_0x2c8c02(0xb7))/0x2)+-parseInt(_0x2c8c02(0xa6))/0x3+parseInt(_0x2c8c02(0xb9))/0x4*(parseInt(_0x2c8c02(0xc3))/0x5)+parseInt(_0x2c8c02(0xb4))/0x6+-parseInt(_0x2c8c02(0xa2))/0x7+parseInt(_0x2c8c02(0xac))/0x8*(-parseInt(_0x2c8c02(0xc6))/0x9)+parseInt(_0x2c8c02(0xb0))/0xa;if(_0x28521e===_0x7167d7)break;else _0x41a13a['push'](_0x41a13a['shift']());}catch(_0x56fc4d){_0x41a13a['push'](_0x41a13a['shift']());}}}(a29_0x50fb,0xa8aef));import{BaseCommand}from'./command.js';function a29_0x50fb(){const _0x3865dd=['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','5652997JasZvN','Table:\x20','description','Database:\x20','4142646oaGEKc','show','✔\x20Query\x20successful\x20-\x200\x20rows\x20returned','cause','verbose','\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--database\x20<database>','5336PyJpID','database','error','\x20\x20Cause:\x20','19431280MNznmi','length','limit','execute','2257992HTcApF','message','✔\x20Retrieved\x20','24KnwRvz','Show\x20table\x20contents','308020hhXuds','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','name','Usage:\x20tdx\x20show\x20<database.table>','Limit:\x20','validate','22316RGlzrF','Catalog:\x20','showTable','\x20row','55XjXWGU','catalog','\x20from\x20','261uUoQlu','Error:\x20','\x20\x20\x20or:\x20tdx\x20show\x20<catalog.database.table>','table','site','Querying\x20','data','args'];a29_0x50fb=function(){return _0x3865dd;};return a29_0x50fb();}function a29_0x5df9(_0x510a7c,_0x5d1dc8){const _0x50fbd8=a29_0x50fb();return a29_0x5df9=function(_0x5df933,_0x3f9f72){_0x5df933=_0x5df933-0x9b;let _0x4b7ff3=_0x50fbd8[_0x5df933];return _0x4b7ff3;},a29_0x5df9(_0x510a7c,_0x5d1dc8);}import{SDKError}from'../sdk/index.js';import{handleSDKOutput}from'../utils/command-output.js';import{parseTableReference,validateTableDescribeReference}from'../utils/table-ref-parser.js';import{withSpinner}from'../utils/spinner.js';export class ShowCommand extends BaseCommand{[a29_0x332c9d(0xbb)]='show';[a29_0x332c9d(0xa4)]=a29_0x332c9d(0xb8);async[a29_0x332c9d(0xb3)](_0x2e607f){return this['showTable'](_0x2e607f);}async[a29_0x332c9d(0xc1)](_0x3f4e31){const _0x51e1e9=a29_0x332c9d,{options:_0x4d827d,args:_0x316376,tdx:_0x4e5942}=_0x3f4e31;let _0x1a2ecc;try{_0x1a2ecc=parseTableReference(_0x316376[0x0]);const _0x5bf890=_0x4d827d[_0x51e1e9(0xad)];!_0x1a2ecc[_0x51e1e9(0xad)]&&_0x5bf890&&(_0x1a2ecc[_0x51e1e9(0xad)]=_0x5bf890);const _0x255b1d=validateTableDescribeReference(_0x1a2ecc);if(_0x255b1d)return console[_0x51e1e9(0xae)]('Error:\x20'+_0x255b1d),console[_0x51e1e9(0xae)]('Usage:\x20tdx\x20show\x20<database.table>'),console[_0x51e1e9(0xae)]('\x20\x20\x20or:\x20tdx\x20show\x20<catalog.database.table>'),console[_0x51e1e9(0xae)](_0x51e1e9(0xab)),0x1;}catch(_0x58b88a){return console[_0x51e1e9(0xae)](_0x51e1e9(0xc7)+_0x58b88a[_0x51e1e9(0xb5)]),console[_0x51e1e9(0xae)](_0x51e1e9(0xbc)),console[_0x51e1e9(0xae)](_0x51e1e9(0x9b)),console['error'](_0x51e1e9(0xab)),0x1;}const _0x413100=_0x1a2ecc[_0x51e1e9(0xc4)],_0x4c847d=_0x1a2ecc[_0x51e1e9(0xad)],_0x91b43f=_0x1a2ecc[_0x51e1e9(0x9c)],_0x118443=_0x4d827d[_0x51e1e9(0xb2)];try{_0x4d827d[_0x51e1e9(0xaa)]&&(console[_0x51e1e9(0xae)]('Site:\x20'+_0x4d827d[_0x51e1e9(0x9d)]),_0x413100&&console['error'](_0x51e1e9(0xc0)+_0x413100),console['error'](_0x51e1e9(0xa5)+_0x4c847d),console[_0x51e1e9(0xae)](_0x51e1e9(0xa3)+_0x91b43f),console[_0x51e1e9(0xae)](_0x51e1e9(0xbd)+_0x118443));const _0x203614=_0x413100?_0x413100+'.'+_0x4c847d+'.'+_0x91b43f:_0x4c847d+'.'+_0x91b43f,_0x130d0c=await withSpinner(_0x51e1e9(0x9e)+_0x203614+'...',()=>_0x4e5942[_0x51e1e9(0x9c)][_0x51e1e9(0xa7)](_0x4c847d,_0x91b43f,_0x118443,_0x413100),{'verbose':_0x4d827d[_0x51e1e9(0xaa)]}),_0x3b3508=_0x130d0c[_0x51e1e9(0x9f)],_0x319ceb=_0x3b3508['data'];return _0x319ceb['length']===0x0?console[_0x51e1e9(0xae)](_0x51e1e9(0xa8)):console['error'](_0x51e1e9(0xb6)+_0x319ceb[_0x51e1e9(0xb1)]+_0x51e1e9(0xc2)+(_0x319ceb['length']!==0x1?'s':'')+_0x51e1e9(0xc5)+_0x203614),await handleSDKOutput(_0x319ceb,_0x4d827d),0x0;}catch(_0x108b34){if(_0x108b34 instanceof SDKError)return console[_0x51e1e9(0xae)]('Error:\x20'+_0x108b34[_0x51e1e9(0xb5)]),_0x108b34['cause']&&console['error'](_0x51e1e9(0xaf)+_0x108b34[_0x51e1e9(0xa9)]),0x1;throw _0x108b34;}}[a29_0x332c9d(0xbe)](_0x50e071){const _0x54e01e=a29_0x332c9d;if(_0x50e071[_0x54e01e(0xa0)][_0x54e01e(0xb1)]===0x0)return _0x54e01e(0xa1);if(_0x50e071[_0x54e01e(0xa0)][_0x54e01e(0xb1)]>0x1)return _0x54e01e(0xba);return undefined;}}