@treasuredata/tdx 0.4.6 → 0.4.7

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 (90) hide show
  1. package/dist/build-info.json +2 -2
  2. package/dist/cli.js +1 -1
  3. package/dist/cli.js.map +1 -1
  4. package/dist/client/cdp-api-client.js +1 -1
  5. package/dist/client/engage-api-client.js +1 -1
  6. package/dist/client/http-client.js +1 -1
  7. package/dist/client/llm-api-client.js +1 -1
  8. package/dist/client/rate-limiter.js +1 -1
  9. package/dist/client/td-api-client.js +1 -1
  10. package/dist/client/trino-api-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/auth-command.js +1 -1
  15. package/dist/commands/chat-command.js +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/engage-command.js +1 -1
  24. package/dist/commands/job-command.js +1 -1
  25. package/dist/commands/llm-command.js +1 -1
  26. package/dist/commands/llm-proxy.js +1 -1
  27. package/dist/commands/parent-segment-command.js +1 -1
  28. package/dist/commands/profiles-command.js +1 -1
  29. package/dist/commands/query-command.js +1 -1
  30. package/dist/commands/segment-command.js +1 -1
  31. package/dist/commands/segment-create-command.js +1 -1
  32. package/dist/commands/segment-fields-command.js +1 -1
  33. package/dist/commands/segment-pwd-command.js +1 -1
  34. package/dist/commands/segment-update-command.js +1 -1
  35. package/dist/commands/segment-use-command.js +1 -1
  36. package/dist/commands/segments.js +1 -1
  37. package/dist/commands/show.js +1 -1
  38. package/dist/commands/tables.js +1 -1
  39. package/dist/commands/use-command.js +1 -1
  40. package/dist/commands/workflow-command.js +1 -1
  41. package/dist/core/auth.js +1 -1
  42. package/dist/core/config.js +1 -1
  43. package/dist/core/credential-cache.js +1 -1
  44. package/dist/core/global-context.js +1 -1
  45. package/dist/core/keychain.js +1 -1
  46. package/dist/core/profile.js +1 -1
  47. package/dist/core/project-config.js +1 -1
  48. package/dist/core/session.js +1 -1
  49. package/dist/index.js +1 -1
  50. package/dist/proxy/anthropic-adapter.js +1 -1
  51. package/dist/proxy/server.js +1 -1
  52. package/dist/proxy/session-cache.js +1 -1
  53. package/dist/sdk/api.js +1 -1
  54. package/dist/sdk/engage.js +1 -1
  55. package/dist/sdk/errors.js +1 -1
  56. package/dist/sdk/index.js +1 -1
  57. package/dist/sdk/job.js +1 -1
  58. package/dist/sdk/llm.js +1 -1
  59. package/dist/sdk/query.js +1 -1
  60. package/dist/sdk/segment.js +1 -1
  61. package/dist/sdk/workflow.js +1 -1
  62. package/dist/types/endpoints.js +1 -1
  63. package/dist/types/index.js +1 -1
  64. package/dist/utils/agent-ref-parser.js +1 -1
  65. package/dist/utils/chat-cache.js +1 -1
  66. package/dist/utils/colors.js +1 -1
  67. package/dist/utils/command-output.js +1 -1
  68. package/dist/utils/constants.js +1 -1
  69. package/dist/utils/file-permissions.js +1 -1
  70. package/dist/utils/format-detector.js +1 -1
  71. package/dist/utils/formatters.js +1 -1
  72. package/dist/utils/json-loader.js +1 -1
  73. package/dist/utils/llm-backup-utils.js +1 -1
  74. package/dist/utils/model-aliases.js +1 -1
  75. package/dist/utils/option-validation.js +1 -1
  76. package/dist/utils/port.js +1 -1
  77. package/dist/utils/process.js +1 -1
  78. package/dist/utils/prompt.js +1 -1
  79. package/dist/utils/segment-path-parser.js +1 -1
  80. package/dist/utils/segment-ref-parser.js +1 -1
  81. package/dist/utils/spinner.js +1 -1
  82. package/dist/utils/sql-parser.js +1 -1
  83. package/dist/utils/sse-parser.js +1 -1
  84. package/dist/utils/string-utils.js +1 -1
  85. package/dist/utils/table-ref-parser.js +1 -1
  86. package/dist/utils/tdx-logger.js +1 -1
  87. package/dist/utils/tree-formatter.js +1 -1
  88. package/dist/utils/version-check.js +1 -1
  89. package/dist/utils/workflow-utils.js +1 -1
  90. package/package.json +6 -5
@@ -1 +1 @@
1
- const a22_0x46744b=a22_0x2c84;(function(_0x3494be,_0x295675){const _0x3eb4a2=a22_0x2c84,_0x40d238=_0x3494be();while(!![]){try{const _0x59d90d=-parseInt(_0x3eb4a2(0x1bc))/0x1*(-parseInt(_0x3eb4a2(0x1ae))/0x2)+parseInt(_0x3eb4a2(0x1b8))/0x3*(parseInt(_0x3eb4a2(0x1ad))/0x4)+parseInt(_0x3eb4a2(0x1b1))/0x5+-parseInt(_0x3eb4a2(0x1b4))/0x6*(-parseInt(_0x3eb4a2(0x1c2))/0x7)+-parseInt(_0x3eb4a2(0x1b2))/0x8+-parseInt(_0x3eb4a2(0x1af))/0x9+parseInt(_0x3eb4a2(0x1bb))/0xa;if(_0x59d90d===_0x295675)break;else _0x40d238['push'](_0x40d238['shift']());}catch(_0x8bbb06){_0x40d238['push'](_0x40d238['shift']());}}}(a22_0x24a9,0x224a9));import{BaseCommand}from'./command.js';function a22_0x24a9(){const _0xca2419=['8343VrJmLc','verbose','behaviors','2018720GHIJBz','5NWYUom','✔\x20Updated\x20parent\x20segment\x20\x27','Parent\x20segment:\x20','site','Fetching\x20current\x20configuration\x20for\x20\x27','scheduleType','1105685kmlYBJ','error','✔\x20Created\x20parent\x20segment\x20\x27','customerGroupFile','segment','\x27\x20with\x20ID:\x20','data','length','Name:\x20','attributes','addBehaviorsFile','Error:\x20Parent\x20segment\x20name\x20is\x20required','Error:\x20--database\x20and\x20--table\x20are\x20required','Create\x20new\x20parent\x20segment\x20(audience)','addBehaviors','Updating\x20parent\x20segment\x20\x27','scheduleOption','database','Site:\x20','description','addAttributes','\x27...','timezone','name','Creating\x20parent\x20segment\x20\x27','152XMClnB','38490LmSiJQ','2022354wDuIpD','Usage:\x20tdx\x20segment\x20parent\x20create\x20<name>\x20--database\x20<db>\x20--table\x20<table>','101910PVNMrH','1735592PxTRBn','addAttributesFile','6qvdGBc','createParent','table','Update\x20existing\x20parent\x20segment\x20(audience)'];a22_0x24a9=function(){return _0xca2419;};return a22_0x24a9();}import{handleSDKOutput}from'../utils/command-output.js';function a22_0x2c84(_0x918f1f,_0x59a6c1){const _0x24a969=a22_0x24a9();return a22_0x2c84=function(_0x2c84df,_0xe1f9d2){_0x2c84df=_0x2c84df-0x1a6;let _0x133a7b=_0x24a969[_0x2c84df];return _0x133a7b;},a22_0x2c84(_0x918f1f,_0x59a6c1);}import{withSpinner}from'../utils/spinner.js';import{loadJSONFromOptions}from'../utils/json-loader.js';export class ParentSegmentCreateCommand extends BaseCommand{['name']='segment:parent:create';[a22_0x46744b(0x1a7)]=a22_0x46744b(0x1cf);async['execute'](_0x46fea9){const _0x261f02=a22_0x46744b,{options:_0x297ea9,args:_0x45fc24,tdx:_0x3f6241}=_0x46fea9,_0xddb26c=_0x297ea9;if(_0x45fc24[_0x261f02(0x1c9)]===0x0)return console[_0x261f02(0x1c3)](_0x261f02(0x1cd)),console[_0x261f02(0x1c3)]('Usage:\x20tdx\x20segment\x20parent\x20create\x20<name>\x20--database\x20<db>\x20--table\x20<table>'),0x1;const _0xa20a1d=_0x45fc24[0x0];if(!_0xddb26c[_0x261f02(0x1d3)]||!_0xddb26c[_0x261f02(0x1b6)])return console[_0x261f02(0x1c3)](_0x261f02(0x1ce)),console[_0x261f02(0x1c3)](_0x261f02(0x1b0)),0x1;_0xddb26c[_0x261f02(0x1b9)]&&(console[_0x261f02(0x1c3)]('Site:\x20'+_0xddb26c[_0x261f02(0x1bf)]),console[_0x261f02(0x1c3)](_0x261f02(0x1ca)+_0xa20a1d),console['error']('Database:\x20'+_0xddb26c[_0x261f02(0x1d3)]),console[_0x261f02(0x1c3)]('Table:\x20'+_0xddb26c[_0x261f02(0x1b6)]));const _0x2475ef=await loadJSONFromOptions(_0xddb26c[_0x261f02(0x1cb)],_0xddb26c['attributesFile']),_0x16fcd8=await loadJSONFromOptions(_0xddb26c[_0x261f02(0x1ba)],_0xddb26c['behaviorsFile']),_0x5de111=await loadJSONFromOptions(_0xddb26c['customerGroup'],_0xddb26c[_0x261f02(0x1c5)]),_0x3b0281={'name':_0xa20a1d,'description':_0xddb26c[_0x261f02(0x1a7)],'scheduleType':_0xddb26c[_0x261f02(0x1c1)],'scheduleOption':_0xddb26c[_0x261f02(0x1d2)],'timezone':_0xddb26c['timezone'],'master':{'parentDatabaseName':_0xddb26c[_0x261f02(0x1d3)],'parentTableName':_0xddb26c[_0x261f02(0x1b6)]},'attributes':_0x2475ef,'behaviors':_0x16fcd8,'customerGroup':_0x5de111},_0xded994=await withSpinner(_0x261f02(0x1ac)+_0xa20a1d+_0x261f02(0x1a9),()=>_0x3f6241[_0x261f02(0x1c6)][_0x261f02(0x1b5)](_0x3b0281),{'verbose':_0x297ea9[_0x261f02(0x1b9)]}),_0x290cff=_0xded994[_0x261f02(0x1c8)];return console[_0x261f02(0x1c3)](_0x261f02(0x1c4)+_0x290cff[_0x261f02(0x1ab)]+_0x261f02(0x1c7)+_0x290cff['id']),await handleSDKOutput([_0x290cff],_0x297ea9),0x0;}}export class ParentSegmentUpdateCommand extends BaseCommand{[a22_0x46744b(0x1ab)]='segment:parent:update';[a22_0x46744b(0x1a7)]=a22_0x46744b(0x1b7);async['execute'](_0x4756fc){const _0x28a691=a22_0x46744b,{options:_0x517289,args:_0x559f8b,tdx:_0x5e6621}=_0x4756fc,_0x2139ac=_0x517289;if(_0x559f8b[_0x28a691(0x1c9)]===0x0)return console['error']('Error:\x20Parent\x20segment\x20name\x20is\x20required'),console[_0x28a691(0x1c3)]('Usage:\x20tdx\x20segment\x20parent\x20update\x20<name>\x20[options]'),0x1;const _0x2ca158=_0x559f8b[0x0];_0x2139ac[_0x28a691(0x1b9)]&&(console[_0x28a691(0x1c3)](_0x28a691(0x1a6)+_0x2139ac[_0x28a691(0x1bf)]),console['error'](_0x28a691(0x1be)+_0x2ca158));const _0x4e1fc0=await withSpinner(_0x28a691(0x1c0)+_0x2ca158+'\x27...',()=>_0x5e6621[_0x28a691(0x1c6)]['getParentFull'](_0x2ca158),{'verbose':_0x2139ac[_0x28a691(0x1b9)]}),_0x2ac517=_0x4e1fc0['data'],_0x5b1b81=await loadJSONFromOptions(_0x2139ac[_0x28a691(0x1a8)],_0x2139ac[_0x28a691(0x1b3)]),_0x406315=await loadJSONFromOptions(_0x2139ac[_0x28a691(0x1d0)],_0x2139ac[_0x28a691(0x1cc)]),_0x44f532={'name':_0x2ac517[_0x28a691(0x1ab)],'description':_0x2139ac[_0x28a691(0x1a7)]!==undefined?_0x2139ac['description']:_0x2ac517[_0x28a691(0x1a7)],'scheduleType':_0x2139ac[_0x28a691(0x1c1)]!==undefined?_0x2139ac['scheduleType']:_0x2ac517[_0x28a691(0x1c1)],'scheduleOption':_0x2139ac['scheduleOption']!==undefined?_0x2139ac[_0x28a691(0x1d2)]:_0x2ac517['scheduleOption'],'timezone':_0x2139ac[_0x28a691(0x1aa)]!==undefined?_0x2139ac[_0x28a691(0x1aa)]:_0x2ac517[_0x28a691(0x1aa)],'master':_0x2ac517['master'],'attributes':_0x5b1b81?[..._0x2ac517[_0x28a691(0x1cb)]||[],..._0x5b1b81]:_0x2ac517['attributes'],'behaviors':_0x406315?[..._0x2ac517[_0x28a691(0x1ba)]||[],..._0x406315]:_0x2ac517[_0x28a691(0x1ba)],'customerGroup':_0x2ac517['customerGroup']},_0x51da3b=await withSpinner(_0x28a691(0x1d1)+_0x2ca158+_0x28a691(0x1a9),()=>_0x5e6621['segment']['updateParent'](_0x2ca158,_0x44f532),{'verbose':_0x2139ac[_0x28a691(0x1b9)]}),_0x3bb9c6=_0x51da3b[_0x28a691(0x1c8)];return console['error'](_0x28a691(0x1bd)+_0x3bb9c6[_0x28a691(0x1ab)]+'\x27'),await handleSDKOutput([_0x3bb9c6],_0x2139ac),0x0;}}
1
+ const a22_0x12ccdc=a22_0x5923;(function(_0xc92f5a,_0x463b05){const _0x50294a=a22_0x5923,_0x309fcb=_0xc92f5a();while(!![]){try{const _0x43d191=-parseInt(_0x50294a(0x1b7))/0x1*(parseInt(_0x50294a(0x196))/0x2)+parseInt(_0x50294a(0x199))/0x3+parseInt(_0x50294a(0x1b3))/0x4+parseInt(_0x50294a(0x1b6))/0x5+parseInt(_0x50294a(0x1b5))/0x6*(-parseInt(_0x50294a(0x19a))/0x7)+parseInt(_0x50294a(0x1ad))/0x8*(parseInt(_0x50294a(0x1c0))/0x9)+-parseInt(_0x50294a(0x1a0))/0xa;if(_0x43d191===_0x463b05)break;else _0x309fcb['push'](_0x309fcb['shift']());}catch(_0x74eeb1){_0x309fcb['push'](_0x309fcb['shift']());}}}(a22_0x31cc,0xd8c92));function a22_0x5923(_0x58d15c,_0x16c2e0){const _0x31ccab=a22_0x31cc();return a22_0x5923=function(_0x592336,_0x5532c3){_0x592336=_0x592336-0x191;let _0xeed090=_0x31ccab[_0x592336];return _0xeed090;},a22_0x5923(_0x58d15c,_0x16c2e0);}function a22_0x31cc(){const _0x213587=['8767620NnKjfL','Usage:\x20tdx\x20segment\x20parent\x20create\x20<name>\x20--database\x20<db>\x20--table\x20<table>','Site:\x20','description','data','scheduleOption','segment','Fetching\x20current\x20configuration\x20for\x20\x27','behaviorsFile','execute','\x27...','customerGroupFile','site','3931920axCDzH','✔\x20Updated\x20parent\x20segment\x20\x27','timezone','database','Usage:\x20tdx\x20segment\x20parent\x20update\x20<name>\x20[options]','length','1423564gxagId','Parent\x20segment:\x20','6eYirBS','4956925YIIjoI','450lqAjfa','error','behaviors','verbose','createParent','addBehaviors','✔\x20Created\x20parent\x20segment\x20\x27','Error:\x20Parent\x20segment\x20name\x20is\x20required','name','9JMqKFv','Database:\x20','addAttributesFile','segment:parent:create','Create\x20new\x20parent\x20segment\x20(audience)','customerGroup','Update\x20existing\x20parent\x20segment\x20(audience)','table','attributes','4358oxVSCP','addAttributes','Creating\x20parent\x20segment\x20\x27','3160665VhDdBq','1029385yhVUhm','scheduleType','attributesFile','addBehaviorsFile','Updating\x20parent\x20segment\x20\x27','master'];a22_0x31cc=function(){return _0x213587;};return a22_0x31cc();}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']=a22_0x12ccdc(0x1c3);[a22_0x12ccdc(0x1a3)]=a22_0x12ccdc(0x191);async[a22_0x12ccdc(0x1a9)](_0x345661){const _0x165804=a22_0x12ccdc,{options:_0x49c8d6,args:_0x2b098,tdx:_0x375d50}=_0x345661,_0x19ed2c=_0x49c8d6;if(_0x2b098[_0x165804(0x1b2)]===0x0)return console[_0x165804(0x1b8)](_0x165804(0x1be)),console['error'](_0x165804(0x1a1)),0x1;const _0x26db2f=_0x2b098[0x0];if(!_0x19ed2c[_0x165804(0x1b0)]||!_0x19ed2c['table'])return console[_0x165804(0x1b8)]('Error:\x20--database\x20and\x20--table\x20are\x20required'),console[_0x165804(0x1b8)](_0x165804(0x1a1)),0x1;_0x19ed2c[_0x165804(0x1ba)]&&(console[_0x165804(0x1b8)](_0x165804(0x1a2)+_0x19ed2c[_0x165804(0x1ac)]),console[_0x165804(0x1b8)]('Name:\x20'+_0x26db2f),console[_0x165804(0x1b8)](_0x165804(0x1c1)+_0x19ed2c['database']),console[_0x165804(0x1b8)]('Table:\x20'+_0x19ed2c[_0x165804(0x194)]));const _0x12d713=await loadJSONFromOptions(_0x19ed2c[_0x165804(0x195)],_0x19ed2c[_0x165804(0x19c)]),_0xcbed50=await loadJSONFromOptions(_0x19ed2c[_0x165804(0x1b9)],_0x19ed2c[_0x165804(0x1a8)]),_0x136f7=await loadJSONFromOptions(_0x19ed2c[_0x165804(0x192)],_0x19ed2c[_0x165804(0x1ab)]),_0x3bb3b2={'name':_0x26db2f,'description':_0x19ed2c[_0x165804(0x1a3)],'scheduleType':_0x19ed2c[_0x165804(0x19b)],'scheduleOption':_0x19ed2c[_0x165804(0x1a5)],'timezone':_0x19ed2c[_0x165804(0x1af)],'master':{'parentDatabaseName':_0x19ed2c[_0x165804(0x1b0)],'parentTableName':_0x19ed2c[_0x165804(0x194)]},'attributes':_0x12d713,'behaviors':_0xcbed50,'customerGroup':_0x136f7},_0x326e24=await withSpinner(_0x165804(0x198)+_0x26db2f+'\x27...',()=>_0x375d50[_0x165804(0x1a6)][_0x165804(0x1bb)](_0x3bb3b2),{'verbose':_0x49c8d6[_0x165804(0x1ba)]}),_0x226caf=_0x326e24[_0x165804(0x1a4)];return console['error'](_0x165804(0x1bd)+_0x226caf[_0x165804(0x1bf)]+'\x27\x20with\x20ID:\x20'+_0x226caf['id']),await handleSDKOutput([_0x226caf],_0x49c8d6),0x0;}}export class ParentSegmentUpdateCommand extends BaseCommand{[a22_0x12ccdc(0x1bf)]='segment:parent:update';[a22_0x12ccdc(0x1a3)]=a22_0x12ccdc(0x193);async[a22_0x12ccdc(0x1a9)](_0x64e871){const _0x4253cd=a22_0x12ccdc,{options:_0x1afa17,args:_0x4de8ed,tdx:_0x5ea16d}=_0x64e871,_0x5f5456=_0x1afa17;if(_0x4de8ed[_0x4253cd(0x1b2)]===0x0)return console['error'](_0x4253cd(0x1be)),console[_0x4253cd(0x1b8)](_0x4253cd(0x1b1)),0x1;const _0x1af36c=_0x4de8ed[0x0];_0x5f5456[_0x4253cd(0x1ba)]&&(console[_0x4253cd(0x1b8)](_0x4253cd(0x1a2)+_0x5f5456[_0x4253cd(0x1ac)]),console[_0x4253cd(0x1b8)](_0x4253cd(0x1b4)+_0x1af36c));const _0x29cec8=await withSpinner(_0x4253cd(0x1a7)+_0x1af36c+_0x4253cd(0x1aa),()=>_0x5ea16d[_0x4253cd(0x1a6)]['getParentFull'](_0x1af36c),{'verbose':_0x5f5456['verbose']}),_0x5ae4f4=_0x29cec8[_0x4253cd(0x1a4)],_0x189da9=await loadJSONFromOptions(_0x5f5456[_0x4253cd(0x197)],_0x5f5456[_0x4253cd(0x1c2)]),_0x238e17=await loadJSONFromOptions(_0x5f5456[_0x4253cd(0x1bc)],_0x5f5456[_0x4253cd(0x19d)]),_0x51cb6f={'name':_0x5ae4f4[_0x4253cd(0x1bf)],'description':_0x5f5456[_0x4253cd(0x1a3)]!==undefined?_0x5f5456[_0x4253cd(0x1a3)]:_0x5ae4f4[_0x4253cd(0x1a3)],'scheduleType':_0x5f5456[_0x4253cd(0x19b)]!==undefined?_0x5f5456[_0x4253cd(0x19b)]:_0x5ae4f4[_0x4253cd(0x19b)],'scheduleOption':_0x5f5456['scheduleOption']!==undefined?_0x5f5456[_0x4253cd(0x1a5)]:_0x5ae4f4['scheduleOption'],'timezone':_0x5f5456[_0x4253cd(0x1af)]!==undefined?_0x5f5456['timezone']:_0x5ae4f4[_0x4253cd(0x1af)],'master':_0x5ae4f4[_0x4253cd(0x19f)],'attributes':_0x189da9?[..._0x5ae4f4[_0x4253cd(0x195)]||[],..._0x189da9]:_0x5ae4f4[_0x4253cd(0x195)],'behaviors':_0x238e17?[..._0x5ae4f4[_0x4253cd(0x1b9)]||[],..._0x238e17]:_0x5ae4f4[_0x4253cd(0x1b9)],'customerGroup':_0x5ae4f4['customerGroup']},_0x275139=await withSpinner(_0x4253cd(0x19e)+_0x1af36c+_0x4253cd(0x1aa),()=>_0x5ea16d['segment']['updateParent'](_0x1af36c,_0x51cb6f),{'verbose':_0x5f5456['verbose']}),_0x21df39=_0x275139[_0x4253cd(0x1a4)];return console[_0x4253cd(0x1b8)](_0x4253cd(0x1ae)+_0x21df39[_0x4253cd(0x1bf)]+'\x27'),await handleSDKOutput([_0x21df39],_0x5f5456),0x0;}}
@@ -1 +1 @@
1
- const a23_0x5420d4=a23_0x1dde;(function(_0x5ab10d,_0x301128){const _0x2dc611=a23_0x1dde,_0x360ff4=_0x5ab10d();while(!![]){try{const _0x2cf87a=-parseInt(_0x2dc611(0x154))/0x1*(parseInt(_0x2dc611(0x14b))/0x2)+-parseInt(_0x2dc611(0x14d))/0x3*(-parseInt(_0x2dc611(0x146))/0x4)+parseInt(_0x2dc611(0x159))/0x5+parseInt(_0x2dc611(0x153))/0x6+parseInt(_0x2dc611(0x148))/0x7*(parseInt(_0x2dc611(0x152))/0x8)+parseInt(_0x2dc611(0x15a))/0x9*(parseInt(_0x2dc611(0x14a))/0xa)+-parseInt(_0x2dc611(0x143))/0xb;if(_0x2cf87a===_0x301128)break;else _0x360ff4['push'](_0x360ff4['shift']());}catch(_0xc06fd9){_0x360ff4['push'](_0x360ff4['shift']());}}}(a23_0x3a87,0x64111));import{BaseCommand}from'./command.js';function a23_0x1dde(_0x19f54c,_0x3a3ac0){const _0x3a874b=a23_0x3a87();return a23_0x1dde=function(_0x1dde4e,_0x38510d){_0x1dde4e=_0x1dde4e-0x143;let _0x267db2=_0x3a874b[_0x1dde4e];return _0x267db2;},a23_0x1dde(_0x19f54c,_0x3a3ac0);}import{listProfiles,getActiveProfile,getProfileParams}from'../core/profile.js';import{handleSDKOutput}from'../utils/command-output.js';export class ProfilesCommand extends BaseCommand{['name']=a23_0x5420d4(0x145);['description']='List\x20all\x20available\x20profiles';async[a23_0x5420d4(0x158)](_0x1503a0){const _0x3822e5=a23_0x5420d4,{options:_0x6f5c46}=_0x1503a0;try{const _0xe77fe3=listProfiles(),_0x4a1a43=getActiveProfile();if(_0xe77fe3[_0x3822e5(0x144)]===0x0)return console['log'](_0x3822e5(0x147)),console[_0x3822e5(0x14c)](_0x3822e5(0x14e)),console[_0x3822e5(0x14c)]('\x20\x20Global:\x20~/.config/tdx/tdx.json'),0x0;const _0x2dcc48=_0xe77fe3[_0x3822e5(0x149)](_0x3fcad9=>{const _0x431686=_0x3822e5,_0x50d1a1=_0x3fcad9[_0x431686(0x150)]===_0x4a1a43,_0x18e18e=getProfileParams(_0x3fcad9[_0x431686(0x151)]);return{'name':_0x3fcad9[_0x431686(0x150)],'active':_0x50d1a1,'scope':_0x3fcad9[_0x431686(0x156)],'description':_0x3fcad9[_0x431686(0x151)][_0x431686(0x14f)]||'','params':_0x18e18e};});return await handleSDKOutput(_0x2dcc48,_0x6f5c46),0x0;}catch(_0x1b2625){return _0x1b2625 instanceof Error&&console[_0x3822e5(0x155)]('Error:\x20'+_0x1b2625[_0x3822e5(0x157)]),0x1;}}}function a23_0x3a87(){const _0x6ce810=['profiles','76672NoATEH','No\x20profiles\x20found.\x20Define\x20profiles\x20in\x20tdx.json:\x0a','4598657pasPXx','map','50cLzFNF','2XuZjCC','log','3uwexoo','\x20\x20Local:\x20\x20(project\x20folder)/tdx.json','description','name','config','8aVUuNT','360780bJlRjw','289589JycnZF','error','scope','message','execute','63550HktDyf','505026aDiMUt','3630737fLheCc','length'];a23_0x3a87=function(){return _0x6ce810;};return a23_0x3a87();}
1
+ const a23_0x2d6f8f=a23_0x6c6b;function a23_0x5df6(){const _0xccc886=['58852442XdRNkW','length','10876134XmQvCo','\x20\x20Local:\x20\x20(project\x20folder)/tdx.json','1697668CBulcZ','10sPelgT','5730513QfJxFH','917384stTAim','7NBpgZJ','1zOVoJe','config','13833801eAjGUt','1641800fWOidr','name','5qpEfKr','\x20\x20Global:\x20~/.config/tdx/tdx.json','List\x20all\x20available\x20profiles','log','profiles','description','message','scope','12ihQtuq'];a23_0x5df6=function(){return _0xccc886;};return a23_0x5df6();}function a23_0x6c6b(_0x522efe,_0x423c8c){const _0x5df689=a23_0x5df6();return a23_0x6c6b=function(_0x6c6bb5,_0x53a7ba){_0x6c6bb5=_0x6c6bb5-0x6e;let _0x43a7d5=_0x5df689[_0x6c6bb5];return _0x43a7d5;},a23_0x6c6b(_0x522efe,_0x423c8c);}(function(_0xc539f,_0x1d502b){const _0x287931=a23_0x6c6b,_0x3f8b03=_0xc539f();while(!![]){try{const _0xad7772=parseInt(_0x287931(0x7a))/0x1*(parseInt(_0x287931(0x78))/0x2)+parseInt(_0x287931(0x77))/0x3+parseInt(_0x287931(0x75))/0x4*(parseInt(_0x287931(0x7f))/0x5)+parseInt(_0x287931(0x73))/0x6*(parseInt(_0x287931(0x79))/0x7)+parseInt(_0x287931(0x7d))/0x8+-parseInt(_0x287931(0x7c))/0x9*(-parseInt(_0x287931(0x76))/0xa)+-parseInt(_0x287931(0x71))/0xb*(parseInt(_0x287931(0x70))/0xc);if(_0xad7772===_0x1d502b)break;else _0x3f8b03['push'](_0x3f8b03['shift']());}catch(_0x2b77e0){_0x3f8b03['push'](_0x3f8b03['shift']());}}}(a23_0x5df6,0xf3aad));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{[a23_0x2d6f8f(0x7e)]=a23_0x2d6f8f(0x83);['description']=a23_0x2d6f8f(0x81);async['execute'](_0x52235c){const _0x2dd73a=a23_0x2d6f8f,{options:_0xc83717}=_0x52235c;try{const _0x2cd4cf=listProfiles(),_0x40f5cf=getActiveProfile();if(_0x2cd4cf[_0x2dd73a(0x72)]===0x0)return console[_0x2dd73a(0x82)]('No\x20profiles\x20found.\x20Define\x20profiles\x20in\x20tdx.json:\x0a'),console[_0x2dd73a(0x82)](_0x2dd73a(0x74)),console['log'](_0x2dd73a(0x80)),0x0;const _0x2ebe6f=_0x2cd4cf['map'](_0x2ec0c3=>{const _0x555cf0=_0x2dd73a,_0x24d212=_0x2ec0c3[_0x555cf0(0x7e)]===_0x40f5cf,_0x2505cd=getProfileParams(_0x2ec0c3[_0x555cf0(0x7b)]);return{'name':_0x2ec0c3[_0x555cf0(0x7e)],'active':_0x24d212,'scope':_0x2ec0c3[_0x555cf0(0x6f)],'description':_0x2ec0c3[_0x555cf0(0x7b)][_0x555cf0(0x84)]||'','params':_0x2505cd};});return await handleSDKOutput(_0x2ebe6f,_0xc83717),0x0;}catch(_0x5e1b3f){return _0x5e1b3f instanceof Error&&console['error']('Error:\x20'+_0x5e1b3f[_0x2dd73a(0x6e)]),0x1;}}}
@@ -1 +1 @@
1
- const a24_0x37c12c=a24_0x4391;(function(_0x136602,_0x1f544c){const _0x303fe2=a24_0x4391,_0x586f81=_0x136602();while(!![]){try{const _0x1bab50=parseInt(_0x303fe2(0xda))/0x1+parseInt(_0x303fe2(0xed))/0x2+parseInt(_0x303fe2(0xf5))/0x3*(-parseInt(_0x303fe2(0xd8))/0x4)+-parseInt(_0x303fe2(0xe7))/0x5+parseInt(_0x303fe2(0xfd))/0x6+parseInt(_0x303fe2(0xee))/0x7+parseInt(_0x303fe2(0xe0))/0x8*(-parseInt(_0x303fe2(0xe2))/0x9);if(_0x1bab50===_0x1f544c)break;else _0x586f81['push'](_0x586f81['shift']());}catch(_0x42b143){_0x586f81['push'](_0x586f81['shift']());}}}(a24_0x2013,0x96774));import{BaseCommand}from'./command.js';function a24_0x4391(_0x4a282b,_0xaec69a){const _0x20135f=a24_0x2013();return a24_0x4391=function(_0x439164,_0x1e9323){_0x439164=_0x439164-0xd6;let _0x395b2d=_0x20135f[_0x439164];return _0x395b2d;},a24_0x4391(_0x4a282b,_0xaec69a);}function a24_0x2013(){const _0x379bc3=['Statement\x20','1392900HQIecF','\x20splits','setExtra','length','elapsedTimeMillis','Run\x20Trino\x20queries\x20(streaming)','1854496tUjONi','8535534OznrGM','\x20rows\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','SQL:\x20','Executing\x20query...','Cannot\x20specify\x20both\x20SQL\x20argument\x20and\x20--file\x20option','file','3qBLuyS','completedSplits','Query\x20completed:\x20Processed\x20','push','jobId','data','message','description','3484488UNmUWE','totalSplits','output','verbose','query','join','\x20[Job\x20ID:\x20','3901888FjKgKM','originalMessage','287657mLBtqr','execute','Executing\x20query\x20[','information_schema','in\x20','error','96392aHMisH','catalog','855tlJHtr','Error:\x20','\x0aAll\x20results\x20saved\x20to\x20','stats'];a24_0x2013=function(){return _0x379bc3;};return a24_0x2013();}import{SDKError}from'../sdk/index.js';import{handleQueryOutput,formatQueryOutput,resolveOutputOptions}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{['name']=a24_0x37c12c(0x101);[a24_0x37c12c(0xfc)]=a24_0x37c12c(0xec);async['execute'](_0x24f93a){const _0x37fe17=a24_0x37c12c,{options:_0x4beb43,args:_0x353846,tdx:_0xf6a69d}=_0x24f93a,_0x3c7551=_0x353846[0x0],_0x295e11=_0x4beb43['file'];let _0x398d62;if(_0x295e11)try{_0x398d62=readSqlStatementsFromFile(_0x295e11);}catch(_0x371d84){return console['error'](_0x37fe17(0xe3)+_0x371d84[_0x37fe17(0xfb)]),0x1;}else try{_0x398d62=splitSqlStatements(_0x3c7551);}catch(_0x252fe7){return console[_0x37fe17(0xdf)]('Error:\x20'+_0x252fe7[_0x37fe17(0xfb)]),0x1;}const _0x4901ad=_0x4beb43['database']||_0x37fe17(0xdd),_0x123901=_0x4beb43[_0x37fe17(0xe1)];try{const _0x5017c0=[],_0x2d0b7a=!!_0x4beb43[_0x37fe17(0xff)];for(let _0x17cc14=0x0;_0x17cc14<_0x398d62[_0x37fe17(0xea)];_0x17cc14++){const _0x4ced28=_0x398d62[_0x17cc14],_0x592e32=_0x17cc14+0x1,_0x3d073e=_0x398d62[_0x37fe17(0xea)],_0x11f1ac=_0x3d073e>0x1;_0x4beb43[_0x37fe17(0x100)]&&(console[_0x37fe17(0xdf)]('\x0a'+(_0x11f1ac?'Statement\x20'+_0x592e32+'/'+_0x3d073e+':':'')),console['error']('Site:\x20'+_0x4beb43['site']),console[_0x37fe17(0xdf)]('Catalog:\x20'+(_0x123901||'td')),console[_0x37fe17(0xdf)]('Schema:\x20'+_0x4901ad),console[_0x37fe17(0xdf)](_0x37fe17(0xf1)+_0x4ced28));const _0x20bb83=_0x11f1ac?'Executing\x20statement\x20'+_0x592e32+'/'+_0x3d073e+'...':_0x37fe17(0xf2);try{const _0x5c09a2=await withQuerySpinner(_0x20bb83,async _0x2b70bd=>{const _0x1cb9df=_0x37fe17,_0x56b19f=await _0xf6a69d['query'][_0x1cb9df(0xdb)](_0x4ced28,{'catalog':_0x123901,'schema':_0x4901ad,'onJobId':_0x721d52=>{_0x2b70bd['setJobId'](_0x721d52);},'onProgress':_0x5b4a07=>{const _0x2fe00c=_0x1cb9df;_0x2b70bd['setPhase'](_0x2fe00c(0xdc)+_0x5b4a07['state']+']'),_0x2b70bd[_0x2fe00c(0xe9)](formatRows(_0x5b4a07['processedRows'])+_0x2fe00c(0xef)+_0x5b4a07[_0x2fe00c(0xf6)]+'/'+_0x5b4a07[_0x2fe00c(0xfe)]+_0x2fe00c(0xe8));}});return _0x56b19f;},{'verbose':_0x4beb43[_0x37fe17(0x100)]}),_0x50b3cb=_0x5c09a2[_0x37fe17(0xfa)],_0x23ca8d=_0x50b3cb[_0x37fe17(0xf9)]?_0x37fe17(0xd7)+_0x50b3cb[_0x37fe17(0xf9)]+']':'',_0x44d18c=_0x11f1ac?_0x37fe17(0xe6)+_0x592e32+'/'+_0x3d073e+'\x20-\x20':'';console[_0x37fe17(0xdf)]('✔\x20'+_0x44d18c+_0x37fe17(0xf7)+formatRows(_0x50b3cb['stats']['processedRows'])+_0x37fe17(0xef)+(_0x37fe17(0xde)+formatElapsed(_0x50b3cb[_0x37fe17(0xe5)][_0x37fe17(0xeb)])+_0x23ca8d));if(_0x11f1ac&&_0x2d0b7a){const _0x3266bc=resolveOutputOptions(_0x4beb43),_0x11df36=await formatQueryOutput(_0x50b3cb,_0x3266bc);_0x5017c0[_0x37fe17(0xf8)](_0x11df36);}else await handleQueryOutput(_0x50b3cb,_0x4beb43);}catch(_0x53ad17){const _0x264283=_0x11f1ac?'Statement\x20'+_0x592e32+'/'+_0x3d073e+':\x0a':'',_0x1645e2=_0x53ad17 instanceof SDKError?_0x53ad17[_0x37fe17(0xd9)]:_0x53ad17[_0x37fe17(0xfb)];return console['error'](''+_0x264283+_0x1645e2),0x1;}}if(_0x398d62[_0x37fe17(0xea)]>0x1&&_0x2d0b7a&&_0x5017c0[_0x37fe17(0xea)]>0x0){const _0x54d00c=_0x5017c0[_0x37fe17(0xd6)]('\x0a');writeFileSync(_0x4beb43['output'],_0x54d00c),console[_0x37fe17(0xdf)](_0x37fe17(0xe4)+_0x4beb43['output']);}return 0x0;}catch(_0xa42598){throw _0xa42598;}}['validate'](_0x167f16){const _0x3a1c56=a24_0x37c12c,_0xa85e68=_0x167f16['args'][0x0],_0x1e07cb=_0x167f16['options'][_0x3a1c56(0xf4)];if(!_0xa85e68&&!_0x1e07cb)return _0x3a1c56(0xf0);if(_0xa85e68&&_0x1e07cb)return _0x3a1c56(0xf3);return undefined;}}
1
+ const a24_0x365ce1=a24_0xdac9;function a24_0x5028(){const _0xd837dd=['in\x20','18554LXimLt','...','name','data','error','jobId','224150QriRiN','information_schema','47652xWWUpx','elapsedTimeMillis','Executing\x20statement\x20','options','database','Executing\x20query\x20[','message','SQL:\x20','Error:\x20','1195348djFLQo','setPhase','output','args','\x20rows\x20','length','verbose','file','20kOBkaz','Site:\x20','processedRows','9BJmyVX','completedSplits','site','Statement\x20','query','stats','\x20splits','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','3118866YDlezt','state','735664mcFxgU','originalMessage','Run\x20Trino\x20queries\x20(streaming)','setExtra','\x20[Job\x20ID:\x20','47176wGiXcr','Cannot\x20specify\x20both\x20SQL\x20argument\x20and\x20--file\x20option','totalSplits','push','Schema:\x20','execute','catalog','253JkSJSv','177rLxJRv'];a24_0x5028=function(){return _0xd837dd;};return a24_0x5028();}(function(_0x3f7c81,_0x5afcce){const _0x1f474b=a24_0xdac9,_0x132530=_0x3f7c81();while(!![]){try{const _0x493e95=parseInt(_0x1f474b(0xea))/0x1+-parseInt(_0x1f474b(0xe2))/0x2*(parseInt(_0x1f474b(0xe0))/0x3)+-parseInt(_0x1f474b(0x10d))/0x4*(-parseInt(_0x1f474b(0xfb))/0x5)+parseInt(_0x1f474b(0x106))/0x6+-parseInt(_0x1f474b(0xf3))/0x7+parseInt(_0x1f474b(0x108))/0x8*(-parseInt(_0x1f474b(0xfe))/0x9)+-parseInt(_0x1f474b(0xe8))/0xa*(-parseInt(_0x1f474b(0xdf))/0xb);if(_0x493e95===_0x5afcce)break;else _0x132530['push'](_0x132530['shift']());}catch(_0x2ee7a1){_0x132530['push'](_0x132530['shift']());}}}(a24_0x5028,0x4e277));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleQueryOutput,formatQueryOutput,resolveOutputOptions}from'../utils/command-output.js';function a24_0xdac9(_0x4b5489,_0x5f2ece){const _0x502890=a24_0x5028();return a24_0xdac9=function(_0xdac9dd,_0x85b661){_0xdac9dd=_0xdac9dd-0xdd;let _0x59d2cd=_0x502890[_0xdac9dd];return _0x59d2cd;},a24_0xdac9(_0x4b5489,_0x5f2ece);}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{[a24_0x365ce1(0xe4)]=a24_0x365ce1(0x102);['description']=a24_0x365ce1(0x10a);async[a24_0x365ce1(0xdd)](_0x3e65a2){const _0x47abc1=a24_0x365ce1,{options:_0x1bb65d,args:_0x148db1,tdx:_0x321889}=_0x3e65a2,_0x31b686=_0x148db1[0x0],_0x297cf9=_0x1bb65d[_0x47abc1(0xfa)];let _0x10add6;if(_0x297cf9)try{_0x10add6=readSqlStatementsFromFile(_0x297cf9);}catch(_0x1c058c){return console[_0x47abc1(0xe6)]('Error:\x20'+_0x1c058c['message']),0x1;}else try{_0x10add6=splitSqlStatements(_0x31b686);}catch(_0x53d4d2){return console[_0x47abc1(0xe6)](_0x47abc1(0xf2)+_0x53d4d2[_0x47abc1(0xf0)]),0x1;}const _0x4cad19=_0x1bb65d[_0x47abc1(0xee)]||_0x47abc1(0xe9),_0x49dd6c=_0x1bb65d[_0x47abc1(0xde)];try{const _0x53d1b6=[],_0x320bbb=!!_0x1bb65d['output'];for(let _0x186f86=0x0;_0x186f86<_0x10add6[_0x47abc1(0xf8)];_0x186f86++){const _0x5397cf=_0x10add6[_0x186f86],_0xd9d50c=_0x186f86+0x1,_0x42a969=_0x10add6['length'],_0x2dcced=_0x42a969>0x1;_0x1bb65d[_0x47abc1(0xf9)]&&(console['error']('\x0a'+(_0x2dcced?_0x47abc1(0x101)+_0xd9d50c+'/'+_0x42a969+':':'')),console[_0x47abc1(0xe6)](_0x47abc1(0xfc)+_0x1bb65d[_0x47abc1(0x100)]),console[_0x47abc1(0xe6)]('Catalog:\x20'+(_0x49dd6c||'td')),console[_0x47abc1(0xe6)](_0x47abc1(0x111)+_0x4cad19),console['error'](_0x47abc1(0xf1)+_0x5397cf));const _0x4ca589=_0x2dcced?_0x47abc1(0xec)+_0xd9d50c+'/'+_0x42a969+_0x47abc1(0xe3):'Executing\x20query...';try{const _0x2e7d21=await withQuerySpinner(_0x4ca589,async _0xd30094=>{const _0x13a28d=_0x47abc1,_0x140eed=await _0x321889[_0x13a28d(0x102)][_0x13a28d(0xdd)](_0x5397cf,{'catalog':_0x49dd6c,'schema':_0x4cad19,'onJobId':_0x75b85=>{_0xd30094['setJobId'](_0x75b85);},'onProgress':_0xd5f7c4=>{const _0x12c1d7=_0x13a28d;_0xd30094[_0x12c1d7(0xf4)](_0x12c1d7(0xef)+_0xd5f7c4[_0x12c1d7(0x107)]+']'),_0xd30094[_0x12c1d7(0x10b)](formatRows(_0xd5f7c4[_0x12c1d7(0xfd)])+_0x12c1d7(0xf7)+_0xd5f7c4[_0x12c1d7(0xff)]+'/'+_0xd5f7c4[_0x12c1d7(0x10f)]+_0x12c1d7(0x104));}});return _0x140eed;},{'verbose':_0x1bb65d[_0x47abc1(0xf9)]}),_0xad5912=_0x2e7d21[_0x47abc1(0xe5)],_0x227078=_0xad5912['jobId']?_0x47abc1(0x10c)+_0xad5912[_0x47abc1(0xe7)]+']':'',_0x1b8e9e=_0x2dcced?_0x47abc1(0x101)+_0xd9d50c+'/'+_0x42a969+'\x20-\x20':'';console[_0x47abc1(0xe6)]('✔\x20'+_0x1b8e9e+'Query\x20completed:\x20Processed\x20'+formatRows(_0xad5912[_0x47abc1(0x103)][_0x47abc1(0xfd)])+_0x47abc1(0xf7)+(_0x47abc1(0xe1)+formatElapsed(_0xad5912[_0x47abc1(0x103)][_0x47abc1(0xeb)])+_0x227078));if(_0x2dcced&&_0x320bbb){const _0x1a3b03=resolveOutputOptions(_0x1bb65d),_0x25cd51=await formatQueryOutput(_0xad5912,_0x1a3b03);_0x53d1b6[_0x47abc1(0x110)](_0x25cd51);}else await handleQueryOutput(_0xad5912,_0x1bb65d);}catch(_0x7a2cc){const _0x11382a=_0x2dcced?_0x47abc1(0x101)+_0xd9d50c+'/'+_0x42a969+':\x0a':'',_0x321dc0=_0x7a2cc instanceof SDKError?_0x7a2cc[_0x47abc1(0x109)]:_0x7a2cc[_0x47abc1(0xf0)];return console[_0x47abc1(0xe6)](''+_0x11382a+_0x321dc0),0x1;}}if(_0x10add6[_0x47abc1(0xf8)]>0x1&&_0x320bbb&&_0x53d1b6['length']>0x0){const _0x3cc1da=_0x53d1b6['join']('\x0a');writeFileSync(_0x1bb65d[_0x47abc1(0xf5)],_0x3cc1da),console[_0x47abc1(0xe6)]('\x0aAll\x20results\x20saved\x20to\x20'+_0x1bb65d[_0x47abc1(0xf5)]);}return 0x0;}catch(_0x111321){throw _0x111321;}}['validate'](_0x554f67){const _0x65bfb9=a24_0x365ce1,_0x36eee7=_0x554f67[_0x65bfb9(0xf6)][0x0],_0x148ac9=_0x554f67[_0x65bfb9(0xed)]['file'];if(!_0x36eee7&&!_0x148ac9)return _0x65bfb9(0x105);if(_0x36eee7&&_0x148ac9)return _0x65bfb9(0x10e);return undefined;}}
@@ -1 +1 @@
1
- const a25_0x15aaa8=a25_0x8202;(function(_0x534430,_0x5b04c2){const _0x3f1715=a25_0x8202,_0x359cf5=_0x534430();while(!![]){try{const _0x592d40=parseInt(_0x3f1715(0x1cf))/0x1+-parseInt(_0x3f1715(0x19b))/0x2*(parseInt(_0x3f1715(0x1a1))/0x3)+parseInt(_0x3f1715(0x1b3))/0x4+-parseInt(_0x3f1715(0x186))/0x5*(parseInt(_0x3f1715(0x192))/0x6)+-parseInt(_0x3f1715(0x1d5))/0x7+-parseInt(_0x3f1715(0x18e))/0x8+parseInt(_0x3f1715(0x189))/0x9;if(_0x592d40===_0x5b04c2)break;else _0x359cf5['push'](_0x359cf5['shift']());}catch(_0x4f55fb){_0x359cf5['push'](_0x359cf5['shift']());}}}(a25_0xe77d,0xf365b));function a25_0x8202(_0x4ab654,_0x3b5394){const _0xe77dd9=a25_0xe77d();return a25_0x8202=function(_0x820231,_0x11ee06){_0x820231=_0x820231-0x16d;let _0x537b4b=_0xe77dd9[_0x820231];return _0x537b4b;},a25_0x8202(_0x4ab654,_0x3b5394);}function a25_0xe77d(){const _0x26760b=['Get\x20SQL\x20query\x20for\x20parent\x20or\x20child\x20segment','SELECT\x20*\x20FROM\x20(\x0a','\x20\x20Cause:\x20','folder','Usage:\x20tdx\x20segment\x20sql\x20<path>','Folders\x20are\x20organizational\x20containers,\x20not\x20queryable\x20segments.','execute','Resolved\x20parent\x20folder\x20ID:\x20','Segment\x20ID:\x20','information_schema','segmentId','Error:\x20','segment','✔\x20Query\x20completed:\x20Processed\x20','Parent\x20name:\x20','Folder\x20ID\x20missing\x20from\x20resolved\x20path','Execute\x20segment\x20SQL\x20query\x20and\x20show\x20results','Examples:','Folder\x20name:\x20','Resolving\x20folder\x20\x27','INTERNAL','message','Site:\x20','Resolved\x20relative\x20path\x20to:\x20','Fetching\x20folder\x20\x27','5ZlmkfO','Fetching\x20SQL\x20for\x20parent\x20segment...','in\x20','8599464FyaUTR','Error:\x20Segment\x20path\x20or\x20name\x20is\x20required','Show\x20segment\x20or\x20folder\x20details','error','\x20\x20tdx\x20segment\x20describe\x20\x22My\x20Audience/Marketing/High\x20Value\x22','9631808IMnKiF','resolvePathToResource','parentSegment','segment:folder:list','5754786SgjTcf','test','getFolder','segmentPath','parentId','data','Resolved\x20type:\x20','Usage:\x20tdx\x20segment\x20folder\x20show\x20<parent_name/folder_name>','Usage:\x20tdx\x20segment\x20show\x20<path>','2kFeppL','\x27...','Error:\x20Folder\x20name\x20is\x20required\x20(use\x20parent_name/folder_name\x20format)','code','resolveFolderId','Error:\x20Parent\x20segment\x20name\x20and\x20folder\x20name\x20are\x20required','55575uvDNIb','Resolving\x20path\x20\x27','\x20\x20tdx\x20segment\x20sql\x20\x22My\x20Audience/Marketing/High\x20Value\x22','\x20\x20tdx\x20segment\x20show\x20\x22High\x20Value\x22\x20\x20\x20\x20#\x20Relative\x20to\x20current\x20context','getSegmentSQL','\x0a)\x20AS\x20segment_query\x0aLIMIT\x20','cause','includes','length','parentFolder','replace','query','name','\x20[Job\x20ID:\x20','segment:folder:create','\x20\x20tdx\x20segment\x20show\x20\x22My\x20Audience/Marketing/High\x20Value\x22','Resolving\x20parent\x20folder\x20\x27','segment:sql','5893692NpRXOX','Parent\x20segment:\x20','Show\x20segment\x20folder\x20details','Error:\x20Cannot\x20get\x20SQL\x20query\x20for\x20a\x20folder.','processedRows','\x27\x20with\x20ID:\x20','\x20\x20tdx\x20segment\x20sql\x20\x22High\x20Value\x22\x20\x20\x20\x20#\x20Relative\x20to\x20current\x20context','site','segment:describe','Creating\x20folder\x20\x27','resolveParentId','Fetching\x20SQL\x20for\x20segment...','Error:\x20Path\x20or\x20name\x20is\x20required','type','verbose','\x20\x20Or\x20set\x20context:\x20tdx\x20use\x20parent_segment\x20<name>','getParentSQL','getSegment','Fetching\x20parent\x20segment\x20details...','Segment\x20ID\x20missing\x20from\x20resolved\x20path','Listing\x20folders\x20for\x20parent\x20\x27','\x20\x20tdx\x20segment\x20describe\x20\x22My\x20Audience\x22','setJobId','description','\x20rows\x20','Error:\x20Folder\x20reference\x20is\x20required','Use:\x20tdx\x20segment\x20describe\x20<path>\x20\x20#\x20To\x20show\x20folder\x20details','segment:show','1368012jfFSqi','Resolving\x20parent\x20segment\x20\x27','Error:\x20Cannot\x20execute\x20SQL\x20query\x20on\x20a\x20folder.','Parent\x20ID:\x20','elapsedTimeMillis','json','4328408KsaOmQ','Executing\x20segment\x20query...','format','parent','folderId','createFolder','jobId','listFolders','\x20\x20tdx\x20segment\x20describe\x20\x22High\x20Value\x22\x20\x20\x20\x20#\x20Relative\x20to\x20current\x20context'];a25_0xe77d=function(){return _0x26760b;};return a25_0xe77d();}import{BaseCommand}from'./command.js';import{SDKError,ErrorCode}from'../sdk/index.js';import{handleSDKOutput,handleQueryOutput,handleSingleObjectOutput}from'../utils/command-output.js';import{withSpinner,withQuerySpinner,formatElapsed}from'../utils/spinner.js';import{parseSegmentRef}from'../utils/segment-ref-parser.js';import{DEFAULT_DISPLAY_LIMIT,resolveLimit}from'../utils/constants.js';export class SegmentDescribeCommand extends BaseCommand{[a25_0x15aaa8(0x1ad)]=a25_0x15aaa8(0x1bb);[a25_0x15aaa8(0x1ca)]=a25_0x15aaa8(0x18b);async[a25_0x15aaa8(0x173)](_0x47287e){const _0x957c70=a25_0x15aaa8,{options:_0x49d14e,args:_0x4ceeab,tdx:_0x1c9f82}=_0x47287e,_0x518931=_0x4ceeab[0x0],_0x104247=!_0x518931&&!!_0x49d14e[_0x957c70(0x190)],_0x1825d6=_0x518931||_0x49d14e['parentSegment'];if(!_0x1825d6)return console[_0x957c70(0x18c)](_0x957c70(0x1bf)),console['error']('Usage:\x20tdx\x20segment\x20describe\x20<path>'),console[_0x957c70(0x18c)](_0x957c70(0x17e)),console[_0x957c70(0x18c)](_0x957c70(0x1c8)),console[_0x957c70(0x18c)](_0x957c70(0x18d)),console[_0x957c70(0x18c)](_0x957c70(0x1dd)),console[_0x957c70(0x18c)](_0x957c70(0x1c2)),0x1;try{const _0x5d64b9=_0x49d14e[_0x957c70(0x195)];let _0x328145=_0x1825d6;!_0x104247&&_0x5d64b9&&!_0x1825d6[_0x957c70(0x1a8)]('/')&&(_0x328145=_0x5d64b9+'/'+_0x1825d6,_0x49d14e[_0x957c70(0x1c1)]&&console['error'](_0x957c70(0x184)+_0x328145));const _0x5f3f20=await withSpinner(_0x957c70(0x1a2)+_0x328145+_0x957c70(0x19c),()=>_0x1c9f82[_0x957c70(0x179)][_0x957c70(0x18f)](_0x328145),{'verbose':_0x49d14e[_0x957c70(0x1c1)]}),_0x53c549=_0x5f3f20['data'];_0x49d14e[_0x957c70(0x1c1)]&&(console[_0x957c70(0x18c)](_0x957c70(0x198)+_0x53c549['type']),console[_0x957c70(0x18c)](_0x957c70(0x1d2)+_0x53c549[_0x957c70(0x196)]),_0x53c549[_0x957c70(0x1d9)]&&console[_0x957c70(0x18c)]('Folder\x20ID:\x20'+_0x53c549[_0x957c70(0x1d9)]),_0x53c549[_0x957c70(0x177)]&&console[_0x957c70(0x18c)](_0x957c70(0x175)+_0x53c549['segmentId']));if(_0x53c549[_0x957c70(0x1c0)]===_0x957c70(0x1d8)){const _0x4753f6=await withSpinner(_0x957c70(0x1c5),()=>_0x1c9f82[_0x957c70(0x179)]['getParent'](_0x53c549[_0x957c70(0x196)]),{'verbose':_0x49d14e[_0x957c70(0x1c1)]});await handleSingleObjectOutput(_0x4753f6[_0x957c70(0x197)],_0x49d14e);}else{if(_0x53c549[_0x957c70(0x1c0)]===_0x957c70(0x170)){if(!_0x53c549[_0x957c70(0x1d9)])throw new SDKError(ErrorCode['INTERNAL'],_0x957c70(0x17c));const _0x4d23e2=await withSpinner('Fetching\x20folder\x20details...',()=>_0x1c9f82[_0x957c70(0x179)][_0x957c70(0x194)](_0x53c549[_0x957c70(0x1d9)]),{'verbose':_0x49d14e[_0x957c70(0x1c1)]});await handleSingleObjectOutput(_0x4d23e2['data'],_0x49d14e);}else{if(_0x53c549['type']===_0x957c70(0x179)){if(!_0x53c549[_0x957c70(0x177)])throw new SDKError(ErrorCode[_0x957c70(0x181)],'Segment\x20ID\x20missing\x20from\x20resolved\x20path');const _0x46fbf3=await withSpinner('Fetching\x20segment\x20details...',()=>_0x1c9f82[_0x957c70(0x179)][_0x957c70(0x1c4)](_0x53c549[_0x957c70(0x196)],_0x53c549['segmentId']),{'verbose':_0x49d14e[_0x957c70(0x1c1)]});await handleSingleObjectOutput(_0x46fbf3[_0x957c70(0x197)],_0x49d14e);}}}return 0x0;}catch(_0x5ef358){if(_0x5ef358 instanceof SDKError)return console['error'](_0x957c70(0x178)+_0x5ef358[_0x957c70(0x182)]),_0x5ef358[_0x957c70(0x1a7)]&&console[_0x957c70(0x18c)](_0x957c70(0x16f)+_0x5ef358[_0x957c70(0x1a7)]),0x1;throw _0x5ef358;}}}export class SegmentShowCommand extends BaseCommand{[a25_0x15aaa8(0x1ad)]=a25_0x15aaa8(0x1ce);['description']=a25_0x15aaa8(0x17d);async[a25_0x15aaa8(0x173)](_0xd6c8f2){const _0x3d24e3=a25_0x15aaa8,{options:_0x2bfb65,args:_0x227edc,tdx:_0x471b0f}=_0xd6c8f2,_0x45996d=_0x227edc[0x0],_0x3b2972=!_0x45996d&&!!_0x2bfb65[_0x3d24e3(0x190)],_0x76d8d4=_0x45996d||_0x2bfb65[_0x3d24e3(0x190)];if(!_0x76d8d4)return console[_0x3d24e3(0x18c)](_0x3d24e3(0x18a)),console[_0x3d24e3(0x18c)](_0x3d24e3(0x19a)),console[_0x3d24e3(0x18c)](_0x3d24e3(0x17e)),console['error']('\x20\x20tdx\x20segment\x20show\x20\x22My\x20Audience\x22'),console['error'](_0x3d24e3(0x1b0)),console[_0x3d24e3(0x18c)](_0x3d24e3(0x1a4)),console[_0x3d24e3(0x18c)](_0x3d24e3(0x1c2)),0x1;try{const _0x4d722f=_0x2bfb65[_0x3d24e3(0x195)];let _0x277ab9=_0x76d8d4;!_0x3b2972&&_0x4d722f&&!_0x76d8d4['includes']('/')&&(_0x277ab9=_0x4d722f+'/'+_0x76d8d4,_0x2bfb65['verbose']&&console[_0x3d24e3(0x18c)](_0x3d24e3(0x184)+_0x277ab9));const _0x23b806=await withSpinner(_0x3d24e3(0x1a2)+_0x277ab9+_0x3d24e3(0x19c),()=>_0x471b0f[_0x3d24e3(0x179)][_0x3d24e3(0x18f)](_0x277ab9),{'verbose':_0x2bfb65['verbose']}),_0x1db230=_0x23b806['data'];_0x2bfb65['verbose']&&(console['error']('Resolved\x20type:\x20'+_0x1db230[_0x3d24e3(0x1c0)]),console[_0x3d24e3(0x18c)]('Parent\x20ID:\x20'+_0x1db230[_0x3d24e3(0x196)]));if(_0x1db230['type']===_0x3d24e3(0x170))return console['error'](_0x3d24e3(0x1d1)),console[_0x3d24e3(0x18c)](_0x3d24e3(0x1cd)),0x1;let _0x3539ce;if(_0x1db230[_0x3d24e3(0x1c0)]===_0x3d24e3(0x1d8)){const _0x2da93b=await withSpinner('Fetching\x20SQL\x20for\x20parent\x20segment...',()=>_0x471b0f[_0x3d24e3(0x179)][_0x3d24e3(0x1c3)](_0x1db230[_0x3d24e3(0x196)]),{'verbose':_0x2bfb65[_0x3d24e3(0x1c1)]});_0x3539ce=_0x2da93b['data'];}else{if(!_0x1db230['segmentId'])throw new SDKError(ErrorCode[_0x3d24e3(0x181)],_0x3d24e3(0x1c6));const _0x4baf60=await withSpinner(_0x3d24e3(0x1be),()=>_0x471b0f[_0x3d24e3(0x179)][_0x3d24e3(0x1a5)](_0x1db230[_0x3d24e3(0x196)],_0x1db230[_0x3d24e3(0x177)]),{'verbose':_0x2bfb65['verbose']});_0x3539ce=_0x4baf60[_0x3d24e3(0x197)];}const _0x1ef396=resolveLimit(_0x2bfb65['limit'],DEFAULT_DISPLAY_LIMIT),_0x1283b7=/\bLIMIT\s+\d+/i[_0x3d24e3(0x193)](_0x3539ce);!_0x1283b7&&(_0x3539ce=_0x3539ce['trim']()[_0x3d24e3(0x1ab)](/;+$/,''),_0x3539ce=_0x3d24e3(0x16e)+_0x3539ce+_0x3d24e3(0x1a6)+_0x1ef396);_0x2bfb65['verbose']&&console[_0x3d24e3(0x18c)]('SQL\x20query:\x0a'+_0x3539ce);const _0x798ecb=await withQuerySpinner(_0x3d24e3(0x1d6),async _0x1d465c=>{const _0x2b7aa1=_0x3d24e3,_0x4cfb6d=await _0x471b0f[_0x2b7aa1(0x1ac)][_0x2b7aa1(0x173)](_0x3539ce,{'catalog':'td','schema':_0x2b7aa1(0x176),'onJobId':_0x18c24e=>{const _0x41a918=_0x2b7aa1;_0x1d465c[_0x41a918(0x1c9)](_0x18c24e);}});return _0x4cfb6d;},{'verbose':_0x2bfb65[_0x3d24e3(0x1c1)]}),_0x4b2c04=_0x798ecb[_0x3d24e3(0x197)],_0x5b8376=_0x4b2c04['jobId']?_0x3d24e3(0x1ae)+_0x4b2c04[_0x3d24e3(0x1db)]+']':'';return console[_0x3d24e3(0x18c)](_0x3d24e3(0x17a)+_0x4b2c04['stats'][_0x3d24e3(0x1b7)]['toLocaleString']()+_0x3d24e3(0x1cb)+(_0x3d24e3(0x188)+formatElapsed(_0x4b2c04['stats'][_0x3d24e3(0x1d3)])+_0x5b8376)),await handleQueryOutput(_0x4b2c04,_0x2bfb65),0x0;}catch(_0x26a9e1){if(_0x26a9e1 instanceof SDKError)return console['error']('✖\x20Query\x20failed\x20['+_0x26a9e1[_0x3d24e3(0x19e)]+']'),console[_0x3d24e3(0x18c)]('\x0a'+_0x26a9e1[_0x3d24e3(0x182)]),0x1;throw _0x26a9e1;}}}export class SegmentFolderListCommand extends BaseCommand{['name']=a25_0x15aaa8(0x191);['description']='List\x20segment\x20folders\x20under\x20a\x20parent\x20segment';async['execute'](_0x14b286){const _0x5e1552=a25_0x15aaa8,{options:_0x3378c2,args:_0x1a2219,tdx:_0x3d521e}=_0x14b286;if(_0x1a2219[_0x5e1552(0x1a9)]===0x0)return console[_0x5e1552(0x18c)]('Error:\x20Parent\x20segment\x20name\x20is\x20required'),console['error']('Usage:\x20tdx\x20segment\x20folder\x20list\x20<parent_name>'),0x1;const _0x46cc31=_0x1a2219[0x0];try{_0x3378c2['verbose']&&(console[_0x5e1552(0x18c)]('Site:\x20'+_0x3378c2['site']),console[_0x5e1552(0x18c)](_0x5e1552(0x17b)+_0x46cc31));const _0x263b9b=await withSpinner(_0x5e1552(0x1d0)+_0x46cc31+_0x5e1552(0x19c),()=>_0x3d521e[_0x5e1552(0x179)][_0x5e1552(0x1bd)](_0x46cc31),{'verbose':_0x3378c2[_0x5e1552(0x1c1)]}),_0x4871a9=_0x263b9b[_0x5e1552(0x197)];_0x3378c2[_0x5e1552(0x1c1)]&&console[_0x5e1552(0x18c)]('Resolved\x20parent\x20ID:\x20'+_0x4871a9);const _0x14719c=await withSpinner(_0x5e1552(0x1c7)+_0x46cc31+_0x5e1552(0x19c),()=>_0x3d521e[_0x5e1552(0x179)][_0x5e1552(0x1dc)](_0x4871a9),{'verbose':_0x3378c2[_0x5e1552(0x1c1)]}),_0x57d9d9=_0x14719c[_0x5e1552(0x197)];return console[_0x5e1552(0x18c)]('✔\x20Found\x20'+_0x57d9d9[_0x5e1552(0x1a9)]+'\x20folder'+(_0x57d9d9[_0x5e1552(0x1a9)]!==0x1?'s':'')),await handleSDKOutput(_0x57d9d9,_0x3378c2),0x0;}catch(_0x13b468){if(_0x13b468 instanceof SDKError)return console[_0x5e1552(0x18c)](_0x5e1552(0x178)+_0x13b468['message']),_0x13b468[_0x5e1552(0x1a7)]&&console[_0x5e1552(0x18c)](_0x5e1552(0x16f)+_0x13b468[_0x5e1552(0x1a7)]),0x1;throw _0x13b468;}}}export class SegmentFolderShowCommand extends BaseCommand{[a25_0x15aaa8(0x1ad)]='segment:folder:show';[a25_0x15aaa8(0x1ca)]=a25_0x15aaa8(0x1b5);async[a25_0x15aaa8(0x173)](_0x20fe75){const _0x51c4d3=a25_0x15aaa8,{options:_0x1f2d12,args:_0x117325,tdx:_0xa20f48}=_0x20fe75;if(_0x117325[_0x51c4d3(0x1a9)]===0x0)return console[_0x51c4d3(0x18c)](_0x51c4d3(0x1cc)),console['error'](_0x51c4d3(0x199)),0x1;try{const {parentId:_0x1ec915,childId:_0x5e18b3}=parseSegmentRef(_0x117325[0x0]);_0x1f2d12[_0x51c4d3(0x1c1)]&&(console['error']('Site:\x20'+_0x1f2d12[_0x51c4d3(0x1ba)]),console[_0x51c4d3(0x18c)](_0x51c4d3(0x17b)+_0x1ec915),_0x5e18b3&&console[_0x51c4d3(0x18c)](_0x51c4d3(0x17f)+_0x5e18b3));if(!_0x5e18b3)return console[_0x51c4d3(0x18c)](_0x51c4d3(0x19d)),0x1;const _0x27e23c=await withSpinner('Resolving\x20parent\x20segment\x20\x27'+_0x1ec915+_0x51c4d3(0x19c),()=>_0xa20f48[_0x51c4d3(0x179)][_0x51c4d3(0x1bd)](_0x1ec915),{'verbose':_0x1f2d12['verbose']}),_0x257fcd=_0x27e23c[_0x51c4d3(0x197)];_0x1f2d12[_0x51c4d3(0x1c1)]&&console[_0x51c4d3(0x18c)]('Resolved\x20parent\x20ID:\x20'+_0x257fcd);const _0x361b9d=await withSpinner(_0x51c4d3(0x180)+_0x5e18b3+_0x51c4d3(0x19c),()=>_0xa20f48[_0x51c4d3(0x179)][_0x51c4d3(0x19f)](_0x257fcd,_0x5e18b3),{'verbose':_0x1f2d12['verbose']}),_0x52c856=_0x361b9d[_0x51c4d3(0x197)];_0x1f2d12[_0x51c4d3(0x1c1)]&&console[_0x51c4d3(0x18c)]('Resolved\x20folder\x20ID:\x20'+_0x52c856);const _0x3876b2=await withSpinner(_0x51c4d3(0x185)+_0x5e18b3+_0x51c4d3(0x19c),()=>_0xa20f48['segment'][_0x51c4d3(0x194)](_0x52c856),{'verbose':_0x1f2d12[_0x51c4d3(0x1c1)]});return await handleSDKOutput([_0x3876b2['data']],_0x1f2d12),0x0;}catch(_0x26bfef){if(_0x26bfef instanceof SDKError)return console['error'](_0x51c4d3(0x178)+_0x26bfef[_0x51c4d3(0x182)]),_0x26bfef[_0x51c4d3(0x1a7)]&&console[_0x51c4d3(0x18c)]('\x20\x20Cause:\x20'+_0x26bfef[_0x51c4d3(0x1a7)]),0x1;throw _0x26bfef;}}}export class SegmentSQLCommand extends BaseCommand{['name']=a25_0x15aaa8(0x1b2);['description']=a25_0x15aaa8(0x16d);async[a25_0x15aaa8(0x173)](_0x275d2b){const _0x5c715a=a25_0x15aaa8,{options:_0x39abdc,args:_0x3ded75,tdx:_0x2a4355}=_0x275d2b,_0x33127d=_0x3ded75[0x0],_0x24be16=!_0x33127d&&!!_0x39abdc['parentSegment'],_0xfb8e21=_0x33127d||_0x39abdc[_0x5c715a(0x190)];if(!_0xfb8e21)return console[_0x5c715a(0x18c)](_0x5c715a(0x18a)),console[_0x5c715a(0x18c)](_0x5c715a(0x171)),console['error']('Examples:'),console[_0x5c715a(0x18c)]('\x20\x20tdx\x20segment\x20sql\x20\x22My\x20Audience\x22'),console[_0x5c715a(0x18c)](_0x5c715a(0x1a3)),console['error'](_0x5c715a(0x1b9)),console[_0x5c715a(0x18c)](_0x5c715a(0x1c2)),0x1;try{const _0x3a00b7=_0x39abdc[_0x5c715a(0x195)];let _0xc92fb7=_0xfb8e21;!_0x24be16&&_0x3a00b7&&!_0xfb8e21[_0x5c715a(0x1a8)]('/')&&(_0xc92fb7=_0x3a00b7+'/'+_0xfb8e21,_0x39abdc[_0x5c715a(0x1c1)]&&console['error'](_0x5c715a(0x184)+_0xc92fb7));const _0x43b794=await withSpinner(_0x5c715a(0x1a2)+_0xc92fb7+'\x27...',()=>_0x2a4355[_0x5c715a(0x179)][_0x5c715a(0x18f)](_0xc92fb7),{'verbose':_0x39abdc[_0x5c715a(0x1c1)]}),_0x250ca1=_0x43b794[_0x5c715a(0x197)];_0x39abdc['verbose']&&(console[_0x5c715a(0x18c)](_0x5c715a(0x198)+_0x250ca1['type']),console[_0x5c715a(0x18c)](_0x5c715a(0x1d2)+_0x250ca1[_0x5c715a(0x196)]));if(_0x250ca1['type']===_0x5c715a(0x170))return console[_0x5c715a(0x18c)](_0x5c715a(0x1b6)),console[_0x5c715a(0x18c)](_0x5c715a(0x172)),0x1;let _0x2694a0;if(_0x250ca1[_0x5c715a(0x1c0)]==='parent'){const _0x2bedd7=await withSpinner(_0x5c715a(0x187),()=>_0x2a4355[_0x5c715a(0x179)]['getParentSQL'](_0x250ca1[_0x5c715a(0x196)]),{'verbose':_0x39abdc[_0x5c715a(0x1c1)]});_0x2694a0=_0x2bedd7[_0x5c715a(0x197)];}else{if(!_0x250ca1[_0x5c715a(0x177)])throw new SDKError(ErrorCode[_0x5c715a(0x181)],_0x5c715a(0x1c6));const _0x3466ac=await withSpinner(_0x5c715a(0x1be),()=>_0x2a4355[_0x5c715a(0x179)][_0x5c715a(0x1a5)](_0x250ca1[_0x5c715a(0x196)],_0x250ca1['segmentId']),{'verbose':_0x39abdc['verbose']});_0x2694a0=_0x3466ac[_0x5c715a(0x197)];}return _0x39abdc['format']===_0x5c715a(0x1d4)||_0x39abdc[_0x5c715a(0x1d7)]==='jsonl'?await handleSDKOutput([{'sql':_0x2694a0}],_0x39abdc):console['log'](_0x2694a0),0x0;}catch(_0x554bf5){if(_0x554bf5 instanceof SDKError)return console[_0x5c715a(0x18c)](_0x5c715a(0x178)+_0x554bf5[_0x5c715a(0x182)]),_0x554bf5['cause']&&console[_0x5c715a(0x18c)](_0x5c715a(0x16f)+_0x554bf5[_0x5c715a(0x1a7)]),0x1;throw _0x554bf5;}}}export class SegmentFolderCreateCommand extends BaseCommand{[a25_0x15aaa8(0x1ad)]=a25_0x15aaa8(0x1af);[a25_0x15aaa8(0x1ca)]='Create\x20segment\x20folder\x20for\x20organization';async[a25_0x15aaa8(0x173)](_0x4b58b9){const _0x1a2046=a25_0x15aaa8,{options:_0x8db778,args:_0x2c68e9,tdx:_0x5ea963}=_0x4b58b9,_0x12b92b=_0x8db778;if(_0x2c68e9[_0x1a2046(0x1a9)]<0x2)return console[_0x1a2046(0x18c)](_0x1a2046(0x1a0)),console[_0x1a2046(0x18c)]('Usage:\x20tdx\x20segment\x20folder\x20create\x20<parent_name>\x20<folder_name>\x20[options]'),0x1;const _0x2fb101=_0x2c68e9[0x0],_0x4e6615=_0x2c68e9[0x1];_0x12b92b[_0x1a2046(0x1c1)]&&(console[_0x1a2046(0x18c)](_0x1a2046(0x183)+_0x12b92b[_0x1a2046(0x1ba)]),console[_0x1a2046(0x18c)](_0x1a2046(0x1b4)+_0x2fb101),console[_0x1a2046(0x18c)](_0x1a2046(0x17f)+_0x4e6615));let _0x285426;if(_0x12b92b[_0x1a2046(0x1aa)]){const _0x3990b0=_0x12b92b['parentFolder'],_0xe10687=await withSpinner(_0x1a2046(0x1d0)+_0x2fb101+_0x1a2046(0x19c),()=>_0x5ea963[_0x1a2046(0x179)][_0x1a2046(0x1bd)](_0x2fb101),{'verbose':_0x12b92b[_0x1a2046(0x1c1)]}),_0xb8efb9=_0xe10687[_0x1a2046(0x197)],_0x3507ef=await withSpinner(_0x1a2046(0x1b1)+_0x3990b0+_0x1a2046(0x19c),()=>_0x5ea963['segment'][_0x1a2046(0x19f)](_0xb8efb9,_0x3990b0),{'verbose':_0x12b92b[_0x1a2046(0x1c1)]});_0x285426=_0x3507ef[_0x1a2046(0x197)],_0x12b92b['verbose']&&console[_0x1a2046(0x18c)](_0x1a2046(0x174)+_0x285426);}const _0x163ece={'name':_0x4e6615,'description':_0x12b92b[_0x1a2046(0x1ca)],'parentFolderId':_0x285426},_0xff1b48=await withSpinner(_0x1a2046(0x1bc)+_0x4e6615+_0x1a2046(0x19c),()=>_0x5ea963[_0x1a2046(0x179)][_0x1a2046(0x1da)](_0x2fb101,_0x163ece),{'verbose':_0x12b92b[_0x1a2046(0x1c1)]}),_0xdb52f3=_0xff1b48[_0x1a2046(0x197)];return console[_0x1a2046(0x18c)]('✔\x20Created\x20folder\x20\x27'+_0xdb52f3['name']+_0x1a2046(0x1b8)+_0xdb52f3['id']),await handleSDKOutput([_0xdb52f3],_0x12b92b),0x0;}}
1
+ const a25_0x1b0f17=a25_0x37b6;(function(_0x5c2395,_0x4f1bc3){const _0xcd0356=a25_0x37b6,_0x48ac3e=_0x5c2395();while(!![]){try{const _0x255244=-parseInt(_0xcd0356(0x1f5))/0x1*(parseInt(_0xcd0356(0x1fe))/0x2)+parseInt(_0xcd0356(0x216))/0x3*(-parseInt(_0xcd0356(0x1fc))/0x4)+parseInt(_0xcd0356(0x1d6))/0x5+-parseInt(_0xcd0356(0x21d))/0x6*(parseInt(_0xcd0356(0x1c2))/0x7)+-parseInt(_0xcd0356(0x20f))/0x8*(-parseInt(_0xcd0356(0x1fb))/0x9)+-parseInt(_0xcd0356(0x1be))/0xa*(-parseInt(_0xcd0356(0x1ed))/0xb)+parseInt(_0xcd0356(0x1ea))/0xc;if(_0x255244===_0x4f1bc3)break;else _0x48ac3e['push'](_0x48ac3e['shift']());}catch(_0x48889a){_0x48ac3e['push'](_0x48ac3e['shift']());}}}(a25_0xe305,0x8cc74));import{BaseCommand}from'./command.js';import{SDKError,ErrorCode}from'../sdk/index.js';import{handleSDKOutput,handleQueryOutput,handleSingleObjectOutput}from'../utils/command-output.js';import{withSpinner,withQuerySpinner,formatElapsed}from'../utils/spinner.js';import{parseSegmentRef}from'../utils/segment-ref-parser.js';function a25_0x37b6(_0x4ef331,_0x59df51){const _0xe30599=a25_0xe305();return a25_0x37b6=function(_0x37b604,_0x245eb5){_0x37b604=_0x37b604-0x1b7;let _0x16f59e=_0xe30599[_0x37b604];return _0x16f59e;},a25_0x37b6(_0x4ef331,_0x59df51);}import{DEFAULT_DISPLAY_LIMIT,resolveLimit}from'../utils/constants.js';export class SegmentDescribeCommand extends BaseCommand{[a25_0x1b0f17(0x1ce)]='segment:describe';[a25_0x1b0f17(0x1f0)]='Show\x20segment\x20or\x20folder\x20details';async[a25_0x1b0f17(0x20d)](_0x55844b){const _0x99d294=a25_0x1b0f17,{options:_0x56210a,args:_0x11d6c9,tdx:_0x4acf09}=_0x55844b,_0x2f5dc2=_0x11d6c9[0x0],_0x53e4d4=!_0x2f5dc2&&!!_0x56210a[_0x99d294(0x1d5)],_0x239ce9=_0x2f5dc2||_0x56210a['parentSegment'];if(!_0x239ce9)return console[_0x99d294(0x1d8)](_0x99d294(0x22a)),console['error'](_0x99d294(0x1bb)),console[_0x99d294(0x1d8)](_0x99d294(0x222)),console[_0x99d294(0x1d8)](_0x99d294(0x20e)),console['error'](_0x99d294(0x20b)),console[_0x99d294(0x1d8)](_0x99d294(0x1d7)),console['error']('\x20\x20Or\x20set\x20context:\x20tdx\x20use\x20parent_segment\x20<name>'),0x1;try{const _0x49c597=_0x56210a[_0x99d294(0x209)];let _0x24a2b0=_0x239ce9;!_0x53e4d4&&_0x49c597&&!_0x239ce9[_0x99d294(0x21c)]('/')&&(_0x24a2b0=_0x49c597+'/'+_0x239ce9,_0x56210a[_0x99d294(0x1f4)]&&console[_0x99d294(0x1d8)](_0x99d294(0x1b9)+_0x24a2b0));const _0x4a9170=await withSpinner(_0x99d294(0x228)+_0x24a2b0+_0x99d294(0x1f3),()=>_0x4acf09[_0x99d294(0x1e7)][_0x99d294(0x217)](_0x24a2b0),{'verbose':_0x56210a[_0x99d294(0x1f4)]}),_0x408c8e=_0x4a9170[_0x99d294(0x1bd)];_0x56210a[_0x99d294(0x1f4)]&&(console[_0x99d294(0x1d8)](_0x99d294(0x1cd)+_0x408c8e[_0x99d294(0x201)]),console[_0x99d294(0x1d8)](_0x99d294(0x1ba)+_0x408c8e[_0x99d294(0x1c9)]),_0x408c8e[_0x99d294(0x1fa)]&&console[_0x99d294(0x1d8)](_0x99d294(0x1c7)+_0x408c8e[_0x99d294(0x1fa)]),_0x408c8e['segmentId']&&console[_0x99d294(0x1d8)](_0x99d294(0x1d0)+_0x408c8e[_0x99d294(0x1de)]));if(_0x408c8e[_0x99d294(0x201)]===_0x99d294(0x1eb)){const _0x311572=await withSpinner(_0x99d294(0x1ef),()=>_0x4acf09[_0x99d294(0x1e7)][_0x99d294(0x1c4)](_0x408c8e['parentId']),{'verbose':_0x56210a[_0x99d294(0x1f4)]});await handleSingleObjectOutput(_0x311572[_0x99d294(0x1bd)],_0x56210a);}else{if(_0x408c8e[_0x99d294(0x201)]===_0x99d294(0x1f7)){if(!_0x408c8e[_0x99d294(0x1fa)])throw new SDKError(ErrorCode[_0x99d294(0x21a)],_0x99d294(0x226));const _0x4bed17=await withSpinner(_0x99d294(0x1da),()=>_0x4acf09[_0x99d294(0x1e7)][_0x99d294(0x1f6)](_0x408c8e['folderId']),{'verbose':_0x56210a[_0x99d294(0x1f4)]});await handleSingleObjectOutput(_0x4bed17[_0x99d294(0x1bd)],_0x56210a);}else{if(_0x408c8e[_0x99d294(0x201)]===_0x99d294(0x1e7)){if(!_0x408c8e['segmentId'])throw new SDKError(ErrorCode[_0x99d294(0x21a)],'Segment\x20ID\x20missing\x20from\x20resolved\x20path');const _0x5ec586=await withSpinner(_0x99d294(0x214),()=>_0x4acf09[_0x99d294(0x1e7)][_0x99d294(0x200)](_0x408c8e['parentId'],_0x408c8e[_0x99d294(0x1de)]),{'verbose':_0x56210a['verbose']});await handleSingleObjectOutput(_0x5ec586[_0x99d294(0x1bd)],_0x56210a);}}}return 0x0;}catch(_0x34b0ba){if(_0x34b0ba instanceof SDKError)return console[_0x99d294(0x1d8)](_0x99d294(0x1c1)+_0x34b0ba[_0x99d294(0x21e)]),_0x34b0ba['cause']&&console['error'](_0x99d294(0x22d)+_0x34b0ba[_0x99d294(0x1e2)]),0x1;throw _0x34b0ba;}}}export class SegmentShowCommand extends BaseCommand{[a25_0x1b0f17(0x1ce)]='segment:show';['description']='Execute\x20segment\x20SQL\x20query\x20and\x20show\x20results';async[a25_0x1b0f17(0x20d)](_0x1e6275){const _0xede804=a25_0x1b0f17,{options:_0x5e1eb5,args:_0xb36816,tdx:_0x14ac8b}=_0x1e6275,_0x31dc93=_0xb36816[0x0],_0x2d0b68=!_0x31dc93&&!!_0x5e1eb5[_0xede804(0x1d5)],_0x44c0b6=_0x31dc93||_0x5e1eb5[_0xede804(0x1d5)];if(!_0x44c0b6)return console[_0xede804(0x1d8)](_0xede804(0x1cb)),console[_0xede804(0x1d8)](_0xede804(0x1e3)),console[_0xede804(0x1d8)]('Examples:'),console[_0xede804(0x1d8)](_0xede804(0x1e4)),console[_0xede804(0x1d8)](_0xede804(0x1c6)),console[_0xede804(0x1d8)]('\x20\x20tdx\x20segment\x20show\x20\x22High\x20Value\x22\x20\x20\x20\x20#\x20Relative\x20to\x20current\x20context'),console[_0xede804(0x1d8)](_0xede804(0x1cc)),0x1;try{const _0xab8c99=_0x5e1eb5['segmentPath'];let _0x183e4c=_0x44c0b6;!_0x2d0b68&&_0xab8c99&&!_0x44c0b6[_0xede804(0x21c)]('/')&&(_0x183e4c=_0xab8c99+'/'+_0x44c0b6,_0x5e1eb5[_0xede804(0x1f4)]&&console['error'](_0xede804(0x1b9)+_0x183e4c));const _0x231d5f=await withSpinner(_0xede804(0x228)+_0x183e4c+_0xede804(0x1f3),()=>_0x14ac8b[_0xede804(0x1e7)][_0xede804(0x217)](_0x183e4c),{'verbose':_0x5e1eb5['verbose']}),_0xf3b081=_0x231d5f[_0xede804(0x1bd)];_0x5e1eb5[_0xede804(0x1f4)]&&(console[_0xede804(0x1d8)]('Resolved\x20type:\x20'+_0xf3b081[_0xede804(0x201)]),console[_0xede804(0x1d8)](_0xede804(0x1ba)+_0xf3b081[_0xede804(0x1c9)]));if(_0xf3b081[_0xede804(0x201)]===_0xede804(0x1f7))return console['error'](_0xede804(0x1c8)),console[_0xede804(0x1d8)](_0xede804(0x210)),0x1;let _0x18ba74;if(_0xf3b081[_0xede804(0x201)]===_0xede804(0x1eb)){const _0x1d7174=await withSpinner(_0xede804(0x1ec),()=>_0x14ac8b['segment']['getParentSQL'](_0xf3b081[_0xede804(0x1c9)]),{'verbose':_0x5e1eb5[_0xede804(0x1f4)]});_0x18ba74=_0x1d7174[_0xede804(0x1bd)];}else{if(!_0xf3b081[_0xede804(0x1de)])throw new SDKError(ErrorCode[_0xede804(0x21a)],'Segment\x20ID\x20missing\x20from\x20resolved\x20path');const _0x302d5c=await withSpinner('Fetching\x20SQL\x20for\x20segment...',()=>_0x14ac8b['segment']['getSegmentSQL'](_0xf3b081[_0xede804(0x1c9)],_0xf3b081[_0xede804(0x1de)]),{'verbose':_0x5e1eb5[_0xede804(0x1f4)]});_0x18ba74=_0x302d5c['data'];}const _0x4d9ba3=resolveLimit(_0x5e1eb5[_0xede804(0x21f)],DEFAULT_DISPLAY_LIMIT),_0x39d193=/\bLIMIT\s+\d+/i['test'](_0x18ba74);!_0x39d193&&(_0x18ba74=_0x18ba74[_0xede804(0x1e0)]()[_0xede804(0x1c3)](/;+$/,''),_0x18ba74='SELECT\x20*\x20FROM\x20(\x0a'+_0x18ba74+'\x0a)\x20AS\x20segment_query\x0aLIMIT\x20'+_0x4d9ba3);_0x5e1eb5[_0xede804(0x1f4)]&&console[_0xede804(0x1d8)](_0xede804(0x229)+_0x18ba74);const _0x4995f9=await withQuerySpinner(_0xede804(0x219),async _0x1963db=>{const _0x2d2371=_0xede804,_0x38241d=await _0x14ac8b[_0x2d2371(0x221)][_0x2d2371(0x20d)](_0x18ba74,{'catalog':'td','schema':_0x2d2371(0x21b),'onJobId':_0x426d93=>{_0x1963db['setJobId'](_0x426d93);}});return _0x38241d;},{'verbose':_0x5e1eb5['verbose']}),_0x5a3843=_0x4995f9[_0xede804(0x1bd)],_0x2ec146=_0x5a3843['jobId']?_0xede804(0x1d4)+_0x5a3843[_0xede804(0x215)]+']':'';return console['error'](_0xede804(0x225)+_0x5a3843['stats'][_0xede804(0x204)][_0xede804(0x20c)]()+_0xede804(0x227)+('in\x20'+formatElapsed(_0x5a3843[_0xede804(0x1f1)]['elapsedTimeMillis'])+_0x2ec146)),await handleQueryOutput(_0x5a3843,_0x5e1eb5),0x0;}catch(_0x58154a){if(_0x58154a instanceof SDKError)return console[_0xede804(0x1d8)](_0xede804(0x202)+_0x58154a[_0xede804(0x1bf)]+']'),console[_0xede804(0x1d8)]('\x0a'+_0x58154a['message']),0x1;throw _0x58154a;}}}export class SegmentFolderListCommand extends BaseCommand{['name']=a25_0x1b0f17(0x212);['description']=a25_0x1b0f17(0x1b8);async[a25_0x1b0f17(0x20d)](_0x384e35){const _0x3a790a=a25_0x1b0f17,{options:_0x43f92a,args:_0x422a11,tdx:_0x503511}=_0x384e35;if(_0x422a11[_0x3a790a(0x218)]===0x0)return console['error'](_0x3a790a(0x1d2)),console['error'](_0x3a790a(0x1b7)),0x1;const _0x402c6f=_0x422a11[0x0];try{_0x43f92a[_0x3a790a(0x1f4)]&&(console['error']('Site:\x20'+_0x43f92a[_0x3a790a(0x1f8)]),console[_0x3a790a(0x1d8)](_0x3a790a(0x205)+_0x402c6f));const _0x87cfc4=await withSpinner(_0x3a790a(0x1e6)+_0x402c6f+_0x3a790a(0x1f3),()=>_0x503511['segment'][_0x3a790a(0x1c5)](_0x402c6f),{'verbose':_0x43f92a['verbose']}),_0x4873e9=_0x87cfc4[_0x3a790a(0x1bd)];_0x43f92a[_0x3a790a(0x1f4)]&&console['error'](_0x3a790a(0x1df)+_0x4873e9);const _0x5104b8=await withSpinner(_0x3a790a(0x20a)+_0x402c6f+'\x27...',()=>_0x503511[_0x3a790a(0x1e7)][_0x3a790a(0x22b)](_0x4873e9),{'verbose':_0x43f92a['verbose']}),_0x3b4155=_0x5104b8[_0x3a790a(0x1bd)];return console[_0x3a790a(0x1d8)](_0x3a790a(0x1dd)+_0x3b4155['length']+_0x3a790a(0x1c0)+(_0x3b4155[_0x3a790a(0x218)]!==0x1?'s':'')),await handleSDKOutput(_0x3b4155,_0x43f92a),0x0;}catch(_0x41818f){if(_0x41818f instanceof SDKError)return console['error'](_0x3a790a(0x1c1)+_0x41818f[_0x3a790a(0x21e)]),_0x41818f[_0x3a790a(0x1e2)]&&console[_0x3a790a(0x1d8)](_0x3a790a(0x22d)+_0x41818f['cause']),0x1;throw _0x41818f;}}}export class SegmentFolderShowCommand extends BaseCommand{[a25_0x1b0f17(0x1ce)]=a25_0x1b0f17(0x220);[a25_0x1b0f17(0x1f0)]=a25_0x1b0f17(0x1fd);async[a25_0x1b0f17(0x20d)](_0x526d97){const _0x5998d5=a25_0x1b0f17,{options:_0x432624,args:_0x2ead07,tdx:_0x22f56d}=_0x526d97;if(_0x2ead07[_0x5998d5(0x218)]===0x0)return console['error']('Error:\x20Folder\x20reference\x20is\x20required'),console[_0x5998d5(0x1d8)](_0x5998d5(0x213)),0x1;try{const {parentId:_0x4bca9b,childId:_0x5c1e47}=parseSegmentRef(_0x2ead07[0x0]);_0x432624[_0x5998d5(0x1f4)]&&(console['error'](_0x5998d5(0x1e1)+_0x432624[_0x5998d5(0x1f8)]),console['error']('Parent\x20name:\x20'+_0x4bca9b),_0x5c1e47&&console[_0x5998d5(0x1d8)]('Folder\x20name:\x20'+_0x5c1e47));if(!_0x5c1e47)return console['error'](_0x5998d5(0x211)),0x1;const _0x534075=await withSpinner(_0x5998d5(0x1e6)+_0x4bca9b+_0x5998d5(0x1f3),()=>_0x22f56d[_0x5998d5(0x1e7)][_0x5998d5(0x1c5)](_0x4bca9b),{'verbose':_0x432624[_0x5998d5(0x1f4)]}),_0x21182b=_0x534075[_0x5998d5(0x1bd)];_0x432624['verbose']&&console['error'](_0x5998d5(0x1df)+_0x21182b);const _0xe9f565=await withSpinner(_0x5998d5(0x1db)+_0x5c1e47+_0x5998d5(0x1f3),()=>_0x22f56d['segment'][_0x5998d5(0x1ca)](_0x21182b,_0x5c1e47),{'verbose':_0x432624[_0x5998d5(0x1f4)]}),_0x1b7074=_0xe9f565['data'];_0x432624[_0x5998d5(0x1f4)]&&console['error'](_0x5998d5(0x1ff)+_0x1b7074);const _0x506548=await withSpinner('Fetching\x20folder\x20\x27'+_0x5c1e47+'\x27...',()=>_0x22f56d['segment']['getFolder'](_0x1b7074),{'verbose':_0x432624[_0x5998d5(0x1f4)]});return await handleSDKOutput([_0x506548[_0x5998d5(0x1bd)]],_0x432624),0x0;}catch(_0x20d040){if(_0x20d040 instanceof SDKError)return console[_0x5998d5(0x1d8)]('Error:\x20'+_0x20d040[_0x5998d5(0x21e)]),_0x20d040[_0x5998d5(0x1e2)]&&console[_0x5998d5(0x1d8)](_0x5998d5(0x22d)+_0x20d040[_0x5998d5(0x1e2)]),0x1;throw _0x20d040;}}}function a25_0xe305(){const _0x4a5cd9=['\x20\x20tdx\x20segment\x20show\x20\x22My\x20Audience\x22','Create\x20segment\x20folder\x20for\x20organization','Resolving\x20parent\x20segment\x20\x27','segment','Creating\x20folder\x20\x27','Segment\x20ID\x20missing\x20from\x20resolved\x20path','8156088dhVXuP','parent','Fetching\x20SQL\x20for\x20parent\x20segment...','224642aYcTDx','log','Fetching\x20parent\x20segment\x20details...','description','stats','Folder\x20name:\x20','\x27...','verbose','92520kcuSle','getFolder','folder','site','\x27\x20with\x20ID:\x20','folderId','9806301DjAroA','4448FsmKnL','Show\x20segment\x20folder\x20details','2HRpwlV','Resolved\x20folder\x20ID:\x20','getSegment','type','✖\x20Query\x20failed\x20[','format','processedRows','Parent\x20name:\x20','Error:\x20Cannot\x20get\x20SQL\x20query\x20for\x20a\x20folder.','Usage:\x20tdx\x20segment\x20sql\x20<path>','json','segmentPath','Listing\x20folders\x20for\x20parent\x20\x27','\x20\x20tdx\x20segment\x20describe\x20\x22My\x20Audience/Marketing/High\x20Value\x22','toLocaleString','execute','\x20\x20tdx\x20segment\x20describe\x20\x22My\x20Audience\x22','8QVgDZb','Use:\x20tdx\x20segment\x20describe\x20<path>\x20\x20#\x20To\x20show\x20folder\x20details','Error:\x20Folder\x20name\x20is\x20required\x20(use\x20parent_name/folder_name\x20format)','segment:folder:list','Usage:\x20tdx\x20segment\x20folder\x20show\x20<parent_name/folder_name>','Fetching\x20segment\x20details...','jobId','2469Wyjmwm','resolvePathToResource','length','Executing\x20segment\x20query...','INTERNAL','information_schema','includes','258864PKlKxI','message','limit','segment:folder:show','query','Examples:','Parent\x20segment:\x20','parentFolder','✔\x20Query\x20completed:\x20Processed\x20','Folder\x20ID\x20missing\x20from\x20resolved\x20path','\x20rows\x20','Resolving\x20path\x20\x27','SQL\x20query:\x0a','Error:\x20Path\x20or\x20name\x20is\x20required','listFolders','segment:sql','\x20\x20Cause:\x20','Usage:\x20tdx\x20segment\x20folder\x20list\x20<parent_name>','List\x20segment\x20folders\x20under\x20a\x20parent\x20segment','Resolved\x20relative\x20path\x20to:\x20','Parent\x20ID:\x20','Usage:\x20tdx\x20segment\x20describe\x20<path>','getSegmentSQL','data','220eZdMzX','code','\x20folder','Error:\x20','140pysEpP','replace','getParent','resolveParentId','\x20\x20tdx\x20segment\x20show\x20\x22My\x20Audience/Marketing/High\x20Value\x22','Folder\x20ID:\x20','Error:\x20Cannot\x20execute\x20SQL\x20query\x20on\x20a\x20folder.','parentId','resolveFolderId','Error:\x20Segment\x20path\x20or\x20name\x20is\x20required','\x20\x20Or\x20set\x20context:\x20tdx\x20use\x20parent_segment\x20<name>','Resolved\x20type:\x20','name','Folders\x20are\x20organizational\x20containers,\x20not\x20queryable\x20segments.','Segment\x20ID:\x20','createFolder','Error:\x20Parent\x20segment\x20name\x20is\x20required','\x20\x20tdx\x20segment\x20sql\x20\x22My\x20Audience/Marketing/High\x20Value\x22','\x20[Job\x20ID:\x20','parentSegment','1143285VLkozo','\x20\x20tdx\x20segment\x20describe\x20\x22High\x20Value\x22\x20\x20\x20\x20#\x20Relative\x20to\x20current\x20context','error','Resolved\x20parent\x20folder\x20ID:\x20','Fetching\x20folder\x20details...','Resolving\x20folder\x20\x27','segment:folder:create','✔\x20Found\x20','segmentId','Resolved\x20parent\x20ID:\x20','trim','Site:\x20','cause','Usage:\x20tdx\x20segment\x20show\x20<path>'];a25_0xe305=function(){return _0x4a5cd9;};return a25_0xe305();}export class SegmentSQLCommand extends BaseCommand{['name']=a25_0x1b0f17(0x22c);[a25_0x1b0f17(0x1f0)]='Get\x20SQL\x20query\x20for\x20parent\x20or\x20child\x20segment';async['execute'](_0x17d2db){const _0x5f504d=a25_0x1b0f17,{options:_0x1981f3,args:_0x147b09,tdx:_0x3919a8}=_0x17d2db,_0x3dc8ac=_0x147b09[0x0],_0x2a6240=!_0x3dc8ac&&!!_0x1981f3[_0x5f504d(0x1d5)],_0x4a9ad7=_0x3dc8ac||_0x1981f3[_0x5f504d(0x1d5)];if(!_0x4a9ad7)return console[_0x5f504d(0x1d8)](_0x5f504d(0x1cb)),console[_0x5f504d(0x1d8)](_0x5f504d(0x207)),console[_0x5f504d(0x1d8)](_0x5f504d(0x222)),console[_0x5f504d(0x1d8)]('\x20\x20tdx\x20segment\x20sql\x20\x22My\x20Audience\x22'),console[_0x5f504d(0x1d8)](_0x5f504d(0x1d3)),console[_0x5f504d(0x1d8)]('\x20\x20tdx\x20segment\x20sql\x20\x22High\x20Value\x22\x20\x20\x20\x20#\x20Relative\x20to\x20current\x20context'),console[_0x5f504d(0x1d8)](_0x5f504d(0x1cc)),0x1;try{const _0x37f8d3=_0x1981f3[_0x5f504d(0x209)];let _0x144d03=_0x4a9ad7;!_0x2a6240&&_0x37f8d3&&!_0x4a9ad7[_0x5f504d(0x21c)]('/')&&(_0x144d03=_0x37f8d3+'/'+_0x4a9ad7,_0x1981f3[_0x5f504d(0x1f4)]&&console['error'](_0x5f504d(0x1b9)+_0x144d03));const _0x554c5d=await withSpinner('Resolving\x20path\x20\x27'+_0x144d03+_0x5f504d(0x1f3),()=>_0x3919a8[_0x5f504d(0x1e7)][_0x5f504d(0x217)](_0x144d03),{'verbose':_0x1981f3['verbose']}),_0x54a4dd=_0x554c5d[_0x5f504d(0x1bd)];_0x1981f3[_0x5f504d(0x1f4)]&&(console[_0x5f504d(0x1d8)](_0x5f504d(0x1cd)+_0x54a4dd[_0x5f504d(0x201)]),console['error']('Parent\x20ID:\x20'+_0x54a4dd['parentId']));if(_0x54a4dd['type']===_0x5f504d(0x1f7))return console['error'](_0x5f504d(0x206)),console[_0x5f504d(0x1d8)](_0x5f504d(0x1cf)),0x1;let _0x2afb69;if(_0x54a4dd[_0x5f504d(0x201)]==='parent'){const _0x1698f0=await withSpinner(_0x5f504d(0x1ec),()=>_0x3919a8[_0x5f504d(0x1e7)]['getParentSQL'](_0x54a4dd[_0x5f504d(0x1c9)]),{'verbose':_0x1981f3[_0x5f504d(0x1f4)]});_0x2afb69=_0x1698f0['data'];}else{if(!_0x54a4dd['segmentId'])throw new SDKError(ErrorCode[_0x5f504d(0x21a)],_0x5f504d(0x1e9));const _0x25f36c=await withSpinner('Fetching\x20SQL\x20for\x20segment...',()=>_0x3919a8[_0x5f504d(0x1e7)][_0x5f504d(0x1bc)](_0x54a4dd[_0x5f504d(0x1c9)],_0x54a4dd['segmentId']),{'verbose':_0x1981f3['verbose']});_0x2afb69=_0x25f36c[_0x5f504d(0x1bd)];}return _0x1981f3[_0x5f504d(0x203)]===_0x5f504d(0x208)||_0x1981f3['format']==='jsonl'?await handleSDKOutput([{'sql':_0x2afb69}],_0x1981f3):console[_0x5f504d(0x1ee)](_0x2afb69),0x0;}catch(_0x50a941){if(_0x50a941 instanceof SDKError)return console[_0x5f504d(0x1d8)](_0x5f504d(0x1c1)+_0x50a941[_0x5f504d(0x21e)]),_0x50a941[_0x5f504d(0x1e2)]&&console[_0x5f504d(0x1d8)]('\x20\x20Cause:\x20'+_0x50a941[_0x5f504d(0x1e2)]),0x1;throw _0x50a941;}}}export class SegmentFolderCreateCommand extends BaseCommand{[a25_0x1b0f17(0x1ce)]=a25_0x1b0f17(0x1dc);[a25_0x1b0f17(0x1f0)]=a25_0x1b0f17(0x1e5);async[a25_0x1b0f17(0x20d)](_0x3aa82d){const _0x225e55=a25_0x1b0f17,{options:_0x392d90,args:_0x1e4b27,tdx:_0x3726ef}=_0x3aa82d,_0x557434=_0x392d90;if(_0x1e4b27[_0x225e55(0x218)]<0x2)return console['error']('Error:\x20Parent\x20segment\x20name\x20and\x20folder\x20name\x20are\x20required'),console['error']('Usage:\x20tdx\x20segment\x20folder\x20create\x20<parent_name>\x20<folder_name>\x20[options]'),0x1;const _0x299027=_0x1e4b27[0x0],_0x2fa1e9=_0x1e4b27[0x1];_0x557434['verbose']&&(console[_0x225e55(0x1d8)]('Site:\x20'+_0x557434[_0x225e55(0x1f8)]),console['error'](_0x225e55(0x223)+_0x299027),console[_0x225e55(0x1d8)](_0x225e55(0x1f2)+_0x2fa1e9));let _0x52b75e;if(_0x557434[_0x225e55(0x224)]){const _0x518e29=_0x557434[_0x225e55(0x224)],_0x2861c3=await withSpinner(_0x225e55(0x1e6)+_0x299027+_0x225e55(0x1f3),()=>_0x3726ef[_0x225e55(0x1e7)][_0x225e55(0x1c5)](_0x299027),{'verbose':_0x557434[_0x225e55(0x1f4)]}),_0x32e73a=_0x2861c3[_0x225e55(0x1bd)],_0x596f2b=await withSpinner('Resolving\x20parent\x20folder\x20\x27'+_0x518e29+_0x225e55(0x1f3),()=>_0x3726ef[_0x225e55(0x1e7)]['resolveFolderId'](_0x32e73a,_0x518e29),{'verbose':_0x557434[_0x225e55(0x1f4)]});_0x52b75e=_0x596f2b['data'],_0x557434[_0x225e55(0x1f4)]&&console[_0x225e55(0x1d8)](_0x225e55(0x1d9)+_0x52b75e);}const _0x1043ff={'name':_0x2fa1e9,'description':_0x557434[_0x225e55(0x1f0)],'parentFolderId':_0x52b75e},_0xc906b9=await withSpinner(_0x225e55(0x1e8)+_0x2fa1e9+_0x225e55(0x1f3),()=>_0x3726ef[_0x225e55(0x1e7)][_0x225e55(0x1d1)](_0x299027,_0x1043ff),{'verbose':_0x557434[_0x225e55(0x1f4)]}),_0xaa0cf9=_0xc906b9['data'];return console['error']('✔\x20Created\x20folder\x20\x27'+_0xaa0cf9[_0x225e55(0x1ce)]+_0x225e55(0x1f9)+_0xaa0cf9['id']),await handleSDKOutput([_0xaa0cf9],_0x557434),0x0;}}
@@ -1 +1 @@
1
- const a26_0x3aec0d=a26_0x4dcb;(function(_0x2b279a,_0x137b76){const _0x3bd39c=a26_0x4dcb,_0x1fa76c=_0x2b279a();while(!![]){try{const _0x5659ca=parseInt(_0x3bd39c(0x17d))/0x1+parseInt(_0x3bd39c(0x189))/0x2+parseInt(_0x3bd39c(0x198))/0x3*(parseInt(_0x3bd39c(0x19a))/0x4)+-parseInt(_0x3bd39c(0x197))/0x5+parseInt(_0x3bd39c(0x199))/0x6+parseInt(_0x3bd39c(0x186))/0x7*(-parseInt(_0x3bd39c(0x19d))/0x8)+-parseInt(_0x3bd39c(0x196))/0x9;if(_0x5659ca===_0x137b76)break;else _0x1fa76c['push'](_0x1fa76c['shift']());}catch(_0x2e22ce){_0x1fa76c['push'](_0x1fa76c['shift']());}}}(a26_0x2b37,0xcdc58));import{BaseCommand}from'./command.js';import{handleSDKOutput}from'../utils/command-output.js';import{withSpinner}from'../utils/spinner.js';function a26_0x2b37(){const _0x540295=['✔\x20Created\x20segment\x20\x27','error','data','type','43677ENGMce','\x20\x20tdx\x20segment\x20create\x20\x22My\x20Audience/Marketing/Premium\x22\x20--rule\x20\x27...\x27','Error:\x20Cannot\x20create\x20segment\x20in\x20a\x20segment.\x20Parent\x20path\x20must\x20be\x20a\x20folder\x20or\x20parent.','site','Error:\x20Full\x20path\x20required\x20(parent/segment_name\x20or\x20parent/folder/segment_name)','kind','segment:create','createSegment','description','12607MtKhQY','\x27\x20with\x20ID:\x20','ruleFile','2508950zzhThe','Target\x20path:\x20','noCountPopulation','name','parent','Parent\x20path:\x20','Usage:\x20tdx\x20segment\x20create\x20<parent/segment_name>\x20[options]','verbose','Resolving\x20folder\x20\x27','segmentPath','Create\x20child\x20segment\x20with\x20filtering\x20rules','resolveFolderId','execute','8473113guPEaC','4838120fhSnpU','24wpWJwj','2458128oePBKa','751668LSeQTN','folder','includes','2040ELtcZv','segment','length','Resolving\x20folder\x20path\x20\x27','Error:\x20Segment\x20path\x20or\x20name\x20is\x20required','Segment\x20name:\x20','\x20\x20tdx\x20segment\x20create\x20\x22My\x20Audience/High\x20Value\x22\x20--rule\x20\x27...\x27','Resolving\x20parent\x20segment\x20\x27','Creating\x20segment\x20\x27','resolveParentId','\x27...'];a26_0x2b37=function(){return _0x540295;};return a26_0x2b37();}import{loadJSONFromOptions}from'../utils/json-loader.js';import{parsePath,getParentPath,getBaseName}from'../utils/segment-path-parser.js';function a26_0x4dcb(_0x55d023,_0x2c2227){const _0x2b3737=a26_0x2b37();return a26_0x4dcb=function(_0x4dcb03,_0xbc295f){_0x4dcb03=_0x4dcb03-0x17c;let _0xabe035=_0x2b3737[_0x4dcb03];return _0xabe035;},a26_0x4dcb(_0x55d023,_0x2c2227);}export class SegmentCreateCommand extends BaseCommand{[a26_0x3aec0d(0x18c)]=a26_0x3aec0d(0x183);[a26_0x3aec0d(0x185)]=a26_0x3aec0d(0x193);async[a26_0x3aec0d(0x195)](_0x365255){const _0x56e4a0=a26_0x3aec0d,{options:_0x45b028,args:_0x4285b8,tdx:_0x2efe45}=_0x365255,_0x346ca1=_0x45b028;if(_0x4285b8[_0x56e4a0(0x19f)]===0x0)return console[_0x56e4a0(0x1a9)](_0x56e4a0(0x1a1)),console['error']('Usage:\x20tdx\x20segment\x20create\x20<path>\x20[options]'),console['error']('Examples:'),console[_0x56e4a0(0x1a9)](_0x56e4a0(0x1a3)),console[_0x56e4a0(0x1a9)](_0x56e4a0(0x17e)),console[_0x56e4a0(0x1a9)]('\x20\x20tdx\x20segment\x20create\x20\x22Premium\x22\x20--rule\x20\x27...\x27\x20\x20#\x20Relative\x20to\x20context'),0x1;const _0x334e94=_0x4285b8[0x0],_0x169fbd=_0x45b028[_0x56e4a0(0x192)];let _0x213179=_0x334e94;_0x169fbd&&!_0x334e94[_0x56e4a0(0x19c)]('/')&&(_0x213179=_0x169fbd+'/'+_0x334e94,_0x346ca1[_0x56e4a0(0x190)]&&console[_0x56e4a0(0x1a9)]('Resolved\x20relative\x20path\x20to:\x20'+_0x213179));const _0x469a0b=parsePath(_0x213179);if(_0x469a0b['segments']['length']<0x2)return console[_0x56e4a0(0x1a9)](_0x56e4a0(0x181)),console['error'](_0x56e4a0(0x18f)),0x1;const _0xcc9fc1=_0x469a0b['segments'][0x0],_0x39bba1=getBaseName(_0x213179),_0x3310c9=getParentPath(_0x213179);_0x346ca1['verbose']&&(console[_0x56e4a0(0x1a9)]('Site:\x20'+_0x346ca1[_0x56e4a0(0x180)]),console[_0x56e4a0(0x1a9)](_0x56e4a0(0x18a)+_0x213179),console[_0x56e4a0(0x1a9)]('Parent:\x20'+_0xcc9fc1),console[_0x56e4a0(0x1a9)](_0x56e4a0(0x1a2)+_0x39bba1),console[_0x56e4a0(0x1a9)](_0x56e4a0(0x18e)+_0x3310c9));const _0x16a2d7=await withSpinner(_0x56e4a0(0x1a4)+_0xcc9fc1+_0x56e4a0(0x1a7),()=>_0x2efe45['segment'][_0x56e4a0(0x1a6)](_0xcc9fc1),{'verbose':_0x346ca1['verbose']}),_0x3584cb=_0x16a2d7[_0x56e4a0(0x1aa)];let _0x136d34;if(_0x469a0b['segments'][_0x56e4a0(0x19f)]>0x2){const _0x27f30d=await withSpinner(_0x56e4a0(0x1a0)+_0x3310c9+_0x56e4a0(0x1a7),()=>_0x2efe45[_0x56e4a0(0x19e)]['resolvePathToResource'](_0x3310c9),{'verbose':_0x346ca1[_0x56e4a0(0x190)]}),_0x3db2ed=_0x27f30d[_0x56e4a0(0x1aa)];if(_0x3db2ed[_0x56e4a0(0x17c)]!=='folder'&&_0x3db2ed[_0x56e4a0(0x17c)]!==_0x56e4a0(0x18d))return console[_0x56e4a0(0x1a9)](_0x56e4a0(0x17f)),0x1;_0x136d34=_0x3db2ed['folderId'];}else{if(_0x346ca1[_0x56e4a0(0x19b)]){const _0x42ec20=await withSpinner(_0x56e4a0(0x191)+_0x346ca1[_0x56e4a0(0x19b)]+_0x56e4a0(0x1a7),()=>_0x2efe45[_0x56e4a0(0x19e)][_0x56e4a0(0x194)](_0x3584cb,_0x346ca1[_0x56e4a0(0x19b)]),{'verbose':_0x346ca1[_0x56e4a0(0x190)]});_0x136d34=_0x42ec20['data'];}}_0x346ca1[_0x56e4a0(0x190)]&&_0x136d34&&console['error']('Resolved\x20folder\x20ID:\x20'+_0x136d34);const _0x718090=await loadJSONFromOptions(_0x346ca1['rule'],_0x346ca1[_0x56e4a0(0x188)]),_0x45b30a={'name':_0x39bba1,'description':_0x346ca1[_0x56e4a0(0x185)],'rule':_0x718090,'kind':_0x346ca1[_0x56e4a0(0x182)]!==undefined?parseInt(_0x346ca1[_0x56e4a0(0x182)],0xa):undefined,'isVisible':_0x346ca1['invisible']?![]:undefined,'segmentFolderId':_0x136d34,'countPopulation':_0x346ca1[_0x56e4a0(0x18b)]?![]:undefined},_0x387d06=await withSpinner(_0x56e4a0(0x1a5)+_0x39bba1+_0x56e4a0(0x1a7),()=>_0x2efe45[_0x56e4a0(0x19e)][_0x56e4a0(0x184)](_0x3584cb,_0x45b30a),{'verbose':_0x346ca1['verbose']}),_0x409940=_0x387d06[_0x56e4a0(0x1aa)];return console[_0x56e4a0(0x1a9)](_0x56e4a0(0x1a8)+_0x409940[_0x56e4a0(0x18c)]+_0x56e4a0(0x187)+_0x409940['id']),_0x213179!==_0x334e94&&console[_0x56e4a0(0x1a9)]('\x20\x20\x20Path:\x20'+_0x213179),await handleSDKOutput([_0x409940],_0x346ca1),0x0;}}
1
+ function a26_0x4d40(_0x2ff981,_0x4ccc82){const _0x373882=a26_0x3738();return a26_0x4d40=function(_0x4d4095,_0x4eb633){_0x4d4095=_0x4d4095-0xf0;let _0x352260=_0x373882[_0x4d4095];return _0x352260;},a26_0x4d40(_0x2ff981,_0x4ccc82);}const a26_0xeb3d08=a26_0x4d40;(function(_0x6e5b8,_0x381ea6){const _0x15c448=a26_0x4d40,_0x34feac=_0x6e5b8();while(!![]){try{const _0x503f19=-parseInt(_0x15c448(0x115))/0x1+-parseInt(_0x15c448(0x106))/0x2+parseInt(_0x15c448(0xf7))/0x3+parseInt(_0x15c448(0x122))/0x4*(-parseInt(_0x15c448(0x121))/0x5)+-parseInt(_0x15c448(0x11d))/0x6*(parseInt(_0x15c448(0x11b))/0x7)+-parseInt(_0x15c448(0x114))/0x8*(-parseInt(_0x15c448(0x116))/0x9)+-parseInt(_0x15c448(0xfc))/0xa*(-parseInt(_0x15c448(0xfb))/0xb);if(_0x503f19===_0x381ea6)break;else _0x34feac['push'](_0x34feac['shift']());}catch(_0x128227){_0x34feac['push'](_0x34feac['shift']());}}}(a26_0x3738,0x494b5));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{parsePath,getParentPath,getBaseName}from'../utils/segment-path-parser.js';function a26_0x3738(){const _0x5dfb63=['Resolved\x20relative\x20path\x20to:\x20','kind','resolveFolderId','3419997ubeXrL','Parent:\x20','6dRPArH','Usage:\x20tdx\x20segment\x20create\x20<path>\x20[options]','Resolving\x20parent\x20segment\x20\x27','Resolving\x20folder\x20path\x20\x27','245mNcqVz','30144fJDOUi','Target\x20path:\x20','Usage:\x20tdx\x20segment\x20create\x20<parent/segment_name>\x20[options]','Parent\x20path:\x20','rule','parent','noCountPopulation','type','createSegment','error','ruleFile','data','1309638tYKstV','verbose','folderId','Creating\x20segment\x20\x27','392194cpksdZ','190VbAaSR','\x20\x20\x20Path:\x20','site','\x20\x20tdx\x20segment\x20create\x20\x22My\x20Audience/High\x20Value\x22\x20--rule\x20\x27...\x27','name','segment:create','includes','segmentPath','\x20\x20tdx\x20segment\x20create\x20\x22Premium\x22\x20--rule\x20\x27...\x27\x20\x20#\x20Relative\x20to\x20context','execute','702992eoMime','Site:\x20','segment','\x27...','✔\x20Created\x20segment\x20\x27','resolvePathToResource','invisible','Error:\x20Full\x20path\x20required\x20(parent/segment_name\x20or\x20parent/folder/segment_name)','folder','Error:\x20Cannot\x20create\x20segment\x20in\x20a\x20segment.\x20Parent\x20path\x20must\x20be\x20a\x20folder\x20or\x20parent.','description','length','Create\x20child\x20segment\x20with\x20filtering\x20rules','segments','4428272lXToWl','157962GYQhZW','9pBDvNt','Resolving\x20folder\x20\x27'];a26_0x3738=function(){return _0x5dfb63;};return a26_0x3738();}export class SegmentCreateCommand extends BaseCommand{[a26_0xeb3d08(0x100)]=a26_0xeb3d08(0x101);['description']=a26_0xeb3d08(0x112);async[a26_0xeb3d08(0x105)](_0x29a6d4){const _0x53a78b=a26_0xeb3d08,{options:_0x14cc45,args:_0x47689e,tdx:_0x5bf94b}=_0x29a6d4,_0x2c9382=_0x14cc45;if(_0x47689e[_0x53a78b(0x111)]===0x0)return console[_0x53a78b(0xf4)]('Error:\x20Segment\x20path\x20or\x20name\x20is\x20required'),console['error'](_0x53a78b(0x11e)),console[_0x53a78b(0xf4)]('Examples:'),console[_0x53a78b(0xf4)](_0x53a78b(0xff)),console['error']('\x20\x20tdx\x20segment\x20create\x20\x22My\x20Audience/Marketing/Premium\x22\x20--rule\x20\x27...\x27'),console[_0x53a78b(0xf4)](_0x53a78b(0x104)),0x1;const _0x18659c=_0x47689e[0x0],_0x29f1ab=_0x14cc45[_0x53a78b(0x103)];let _0x56f0a3=_0x18659c;_0x29f1ab&&!_0x18659c[_0x53a78b(0x102)]('/')&&(_0x56f0a3=_0x29f1ab+'/'+_0x18659c,_0x2c9382['verbose']&&console['error'](_0x53a78b(0x118)+_0x56f0a3));const _0x48495d=parsePath(_0x56f0a3);if(_0x48495d[_0x53a78b(0x113)][_0x53a78b(0x111)]<0x2)return console['error'](_0x53a78b(0x10d)),console[_0x53a78b(0xf4)](_0x53a78b(0x124)),0x1;const _0x15d473=_0x48495d[_0x53a78b(0x113)][0x0],_0x24b3a3=getBaseName(_0x56f0a3),_0x3e9d1b=getParentPath(_0x56f0a3);_0x2c9382[_0x53a78b(0xf8)]&&(console[_0x53a78b(0xf4)](_0x53a78b(0x107)+_0x2c9382[_0x53a78b(0xfe)]),console['error'](_0x53a78b(0x123)+_0x56f0a3),console[_0x53a78b(0xf4)](_0x53a78b(0x11c)+_0x15d473),console[_0x53a78b(0xf4)]('Segment\x20name:\x20'+_0x24b3a3),console[_0x53a78b(0xf4)](_0x53a78b(0x125)+_0x3e9d1b));const _0x2bd0eb=await withSpinner(_0x53a78b(0x11f)+_0x15d473+_0x53a78b(0x109),()=>_0x5bf94b['segment']['resolveParentId'](_0x15d473),{'verbose':_0x2c9382[_0x53a78b(0xf8)]}),_0x3f9e70=_0x2bd0eb[_0x53a78b(0xf6)];let _0x241ccc;if(_0x48495d[_0x53a78b(0x113)][_0x53a78b(0x111)]>0x2){const _0x143af6=await withSpinner(_0x53a78b(0x120)+_0x3e9d1b+_0x53a78b(0x109),()=>_0x5bf94b[_0x53a78b(0x108)][_0x53a78b(0x10b)](_0x3e9d1b),{'verbose':_0x2c9382['verbose']}),_0x4e7ac8=_0x143af6[_0x53a78b(0xf6)];if(_0x4e7ac8[_0x53a78b(0xf2)]!==_0x53a78b(0x10e)&&_0x4e7ac8[_0x53a78b(0xf2)]!==_0x53a78b(0xf0))return console[_0x53a78b(0xf4)](_0x53a78b(0x10f)),0x1;_0x241ccc=_0x4e7ac8[_0x53a78b(0xf9)];}else{if(_0x2c9382[_0x53a78b(0x10e)]){const _0x35e7d0=await withSpinner(_0x53a78b(0x117)+_0x2c9382[_0x53a78b(0x10e)]+_0x53a78b(0x109),()=>_0x5bf94b[_0x53a78b(0x108)][_0x53a78b(0x11a)](_0x3f9e70,_0x2c9382[_0x53a78b(0x10e)]),{'verbose':_0x2c9382[_0x53a78b(0xf8)]});_0x241ccc=_0x35e7d0['data'];}}_0x2c9382[_0x53a78b(0xf8)]&&_0x241ccc&&console[_0x53a78b(0xf4)]('Resolved\x20folder\x20ID:\x20'+_0x241ccc);const _0x201b39=await loadJSONFromOptions(_0x2c9382[_0x53a78b(0x126)],_0x2c9382[_0x53a78b(0xf5)]),_0x540f10={'name':_0x24b3a3,'description':_0x2c9382[_0x53a78b(0x110)],'rule':_0x201b39,'kind':_0x2c9382[_0x53a78b(0x119)]!==undefined?parseInt(_0x2c9382[_0x53a78b(0x119)],0xa):undefined,'isVisible':_0x2c9382[_0x53a78b(0x10c)]?![]:undefined,'segmentFolderId':_0x241ccc,'countPopulation':_0x2c9382[_0x53a78b(0xf1)]?![]:undefined},_0x465db8=await withSpinner(_0x53a78b(0xfa)+_0x24b3a3+_0x53a78b(0x109),()=>_0x5bf94b[_0x53a78b(0x108)][_0x53a78b(0xf3)](_0x3f9e70,_0x540f10),{'verbose':_0x2c9382['verbose']}),_0x41c69c=_0x465db8[_0x53a78b(0xf6)];return console['error'](_0x53a78b(0x10a)+_0x41c69c[_0x53a78b(0x100)]+'\x27\x20with\x20ID:\x20'+_0x41c69c['id']),_0x56f0a3!==_0x18659c&&console['error'](_0x53a78b(0xfd)+_0x56f0a3),await handleSDKOutput([_0x41c69c],_0x2c9382),0x0;}}
@@ -1 +1 @@
1
- const a27_0x6f6a4d=a27_0x394a;function a27_0x394a(_0x1c925a,_0x4a5659){const _0x256b40=a27_0x256b();return a27_0x394a=function(_0x394ab1,_0x15fead){_0x394ab1=_0x394ab1-0xaf;let _0x3f425c=_0x256b40[_0x394ab1];return _0x3f425c;},a27_0x394a(_0x1c925a,_0x4a5659);}(function(_0x51f940,_0x3ccd89){const _0x53cc6f=a27_0x394a,_0x4a2f7d=_0x51f940();while(!![]){try{const _0x565002=parseInt(_0x53cc6f(0xb2))/0x1+parseInt(_0x53cc6f(0xb9))/0x2+-parseInt(_0x53cc6f(0xbb))/0x3+-parseInt(_0x53cc6f(0xb6))/0x4*(parseInt(_0x53cc6f(0xba))/0x5)+parseInt(_0x53cc6f(0xb1))/0x6*(parseInt(_0x53cc6f(0xc3))/0x7)+-parseInt(_0x53cc6f(0xc1))/0x8+parseInt(_0x53cc6f(0xaf))/0x9;if(_0x565002===_0x3ccd89)break;else _0x4a2f7d['push'](_0x4a2f7d['shift']());}catch(_0x444f36){_0x4a2f7d['push'](_0x4a2f7d['shift']());}}}(a27_0x256b,0x3d544));function a27_0x256b(){const _0x364a4d=['4pqHQhK','data','✔\x20Found\x20','42546flUTdt','263155LAyGgT','139785kWyToa','\x20field','Parent\x20segment:\x20','Error:\x20Parent\x20segment\x20name\x20is\x20required','Site:\x20','error','2040656TJkoRV','segment','812HynVfU','Listing\x20fields\x20for\x20\x27','\x20\x20Or\x20set\x20context:\x20tdx\x20use\x20parent_segment\x20<name>','segment:fields','description','name','length','4083246FXEsgA','Usage:\x20tdx\x20segment\x20fields\x20<parent_name>','3726FYavUl','58509NqJODr','parentSegment','verbose','execute'];a27_0x256b=function(){return _0x364a4d;};return a27_0x256b();}import{BaseCommand}from'./command.js';import{handleSDKOutput}from'../utils/command-output.js';import{withSpinner}from'../utils/spinner.js';export class SegmentFieldsCommand extends BaseCommand{[a27_0x6f6a4d(0xc8)]=a27_0x6f6a4d(0xc6);[a27_0x6f6a4d(0xc7)]='List\x20available\x20fields\x20for\x20segmentation';async[a27_0x6f6a4d(0xb5)](_0x1909a1){const _0x5a5ca3=a27_0x6f6a4d,{options:_0x477b0e,args:_0x511063,tdx:_0x31dcb2}=_0x1909a1,_0x5a3e0d=_0x511063[0x0]||_0x477b0e[_0x5a5ca3(0xb3)];if(!_0x5a3e0d)return console[_0x5a5ca3(0xc0)](_0x5a5ca3(0xbe)),console[_0x5a5ca3(0xc0)](_0x5a5ca3(0xb0)),console[_0x5a5ca3(0xc0)](_0x5a5ca3(0xc5)),0x1;_0x477b0e[_0x5a5ca3(0xb4)]&&(console['error'](_0x5a5ca3(0xbf)+_0x477b0e['site']),console[_0x5a5ca3(0xc0)](_0x5a5ca3(0xbd)+_0x5a3e0d));const _0x15560c=await withSpinner(_0x5a5ca3(0xc4)+_0x5a3e0d+'\x27...',()=>_0x31dcb2[_0x5a5ca3(0xc2)]['listFields'](_0x5a3e0d),{'verbose':_0x477b0e[_0x5a5ca3(0xb4)]}),_0x4dff6f=_0x15560c[_0x5a5ca3(0xb7)];return console['error'](_0x5a5ca3(0xb8)+_0x4dff6f[_0x5a5ca3(0xc9)]+_0x5a5ca3(0xbc)+(_0x4dff6f[_0x5a5ca3(0xc9)]!==0x1?'s':'')),await handleSDKOutput(_0x4dff6f,_0x477b0e),0x0;}}
1
+ function a27_0x52b8(){const _0x42104f=['\x20field','parentSegment','1IjGNQm','8133160smIstk','19812089KLVxEJ','4950zYirfQ','Parent\x20segment:\x20','listFields','List\x20available\x20fields\x20for\x20segmentation','verbose','Error:\x20Parent\x20segment\x20name\x20is\x20required','length','40216cUQUkV','name','segment:fields','4164SQgsRa','error','\x27...','643517xpRTHX','segment','16BZgTZG','7705107PJOBMh','site','600774OEynuB','264uzhZoP','Site:\x20','data','✔\x20Found\x20'];a27_0x52b8=function(){return _0x42104f;};return a27_0x52b8();}const a27_0x15235e=a27_0x19e0;(function(_0x1bbdd7,_0x193f92){const _0x59233a=a27_0x19e0,_0x4c44bf=_0x1bbdd7();while(!![]){try{const _0x56029c=-parseInt(_0x59233a(0x163))/0x1*(-parseInt(_0x59233a(0x15c))/0x2)+-parseInt(_0x59233a(0x15d))/0x3*(-parseInt(_0x59233a(0x151))/0x4)+-parseInt(_0x59233a(0x14a))/0x5*(parseInt(_0x59233a(0x154))/0x6)+parseInt(_0x59233a(0x157))/0x7*(parseInt(_0x59233a(0x159))/0x8)+parseInt(_0x59233a(0x15a))/0x9+parseInt(_0x59233a(0x164))/0xa+-parseInt(_0x59233a(0x149))/0xb;if(_0x56029c===_0x193f92)break;else _0x4c44bf['push'](_0x4c44bf['shift']());}catch(_0x10631d){_0x4c44bf['push'](_0x4c44bf['shift']());}}}(a27_0x52b8,0x86589));import{BaseCommand}from'./command.js';function a27_0x19e0(_0x1b4e27,_0x277b78){const _0x52b818=a27_0x52b8();return a27_0x19e0=function(_0x19e0f6,_0x4bd0b1){_0x19e0f6=_0x19e0f6-0x149;let _0x5281e5=_0x52b818[_0x19e0f6];return _0x5281e5;},a27_0x19e0(_0x1b4e27,_0x277b78);}import{handleSDKOutput}from'../utils/command-output.js';import{withSpinner}from'../utils/spinner.js';export class SegmentFieldsCommand extends BaseCommand{[a27_0x15235e(0x152)]=a27_0x15235e(0x153);['description']=a27_0x15235e(0x14d);async['execute'](_0x40160a){const _0x52b268=a27_0x15235e,{options:_0xac331b,args:_0x1280a4,tdx:_0x16d6dd}=_0x40160a,_0x440db2=_0x1280a4[0x0]||_0xac331b[_0x52b268(0x162)];if(!_0x440db2)return console[_0x52b268(0x155)](_0x52b268(0x14f)),console[_0x52b268(0x155)]('Usage:\x20tdx\x20segment\x20fields\x20<parent_name>'),console[_0x52b268(0x155)]('\x20\x20Or\x20set\x20context:\x20tdx\x20use\x20parent_segment\x20<name>'),0x1;_0xac331b[_0x52b268(0x14e)]&&(console[_0x52b268(0x155)](_0x52b268(0x15e)+_0xac331b[_0x52b268(0x15b)]),console[_0x52b268(0x155)](_0x52b268(0x14b)+_0x440db2));const _0x19fa47=await withSpinner('Listing\x20fields\x20for\x20\x27'+_0x440db2+_0x52b268(0x156),()=>_0x16d6dd[_0x52b268(0x158)][_0x52b268(0x14c)](_0x440db2),{'verbose':_0xac331b[_0x52b268(0x14e)]}),_0x4cdac9=_0x19fa47[_0x52b268(0x15f)];return console['error'](_0x52b268(0x160)+_0x4cdac9[_0x52b268(0x150)]+_0x52b268(0x161)+(_0x4cdac9[_0x52b268(0x150)]!==0x1?'s':'')),await handleSDKOutput(_0x4cdac9,_0xac331b),0x0;}}
@@ -1 +1 @@
1
- function a28_0x2ce7(_0xbb396c,_0x2d90f7){const _0x387018=a28_0x3870();return a28_0x2ce7=function(_0x2ce72d,_0x2300c8){_0x2ce72d=_0x2ce72d-0xc1;let _0x588356=_0x387018[_0x2ce72d];return _0x588356;},a28_0x2ce7(_0xbb396c,_0x2d90f7);}const a28_0x15b173=a28_0x2ce7;(function(_0x472bac,_0x122b4c){const _0x518bcf=a28_0x2ce7,_0x5bfe4e=_0x472bac();while(!![]){try{const _0x1f8445=-parseInt(_0x518bcf(0xc1))/0x1*(parseInt(_0x518bcf(0xc4))/0x2)+-parseInt(_0x518bcf(0xc9))/0x3+parseInt(_0x518bcf(0xcb))/0x4*(-parseInt(_0x518bcf(0xd6))/0x5)+-parseInt(_0x518bcf(0xc8))/0x6+-parseInt(_0x518bcf(0xc6))/0x7*(-parseInt(_0x518bcf(0xca))/0x8)+parseInt(_0x518bcf(0xcf))/0x9*(parseInt(_0x518bcf(0xd3))/0xa)+-parseInt(_0x518bcf(0xcc))/0xb*(-parseInt(_0x518bcf(0xd8))/0xc);if(_0x1f8445===_0x122b4c)break;else _0x5bfe4e['push'](_0x5bfe4e['shift']());}catch(_0x54b3df){_0x5bfe4e['push'](_0x5bfe4e['shift']());}}}(a28_0x3870,0x2d574));import{BaseCommand}from'./command.js';function a28_0x3870(){const _0x55a58a=['json','1830231rdyaQk','stringify','segment:pwd','format','10BuPvOJ','error','root','10Pjqrid','segmentPath','4858740xfPeEY','67jtdIkX','verbose','log','6884dvARbu','jsonl','919247HeeldE','Use\x20\x22tdx\x20context\x20--debug\x22\x20to\x20see\x20context\x20sources','272610CilkEB','625470sXBcPx','8jHHlxg','138640RzjXCV','11TizjjL','name'];a28_0x3870=function(){return _0x55a58a;};return a28_0x3870();}export class SegmentPwdCommand extends BaseCommand{[a28_0x15b173(0xcd)]=a28_0x15b173(0xd1);['description']='Show\x20current\x20segment/folder\x20context';async['execute'](_0xc087ff){const _0x13ba35=a28_0x15b173,{options:_0x268e8f}=_0xc087ff;try{const _0x1b6b8b=_0x268e8f[_0x13ba35(0xd7)];if(!_0x1b6b8b)return _0x268e8f[_0x13ba35(0xd2)]===_0x13ba35(0xce)||_0x268e8f[_0x13ba35(0xd2)]===_0x13ba35(0xc5)?console[_0x13ba35(0xc3)](JSON[_0x13ba35(0xd0)]({'path':'/','type':_0x13ba35(0xd5)})):console['log']('/'),0x0;if(_0x268e8f[_0x13ba35(0xd2)]==='json'||_0x268e8f[_0x13ba35(0xd2)]===_0x13ba35(0xc5)){const _0x2be081={'path':_0x1b6b8b};console[_0x13ba35(0xc3)](JSON['stringify'](_0x2be081));}else console[_0x13ba35(0xc3)](_0x1b6b8b),_0x268e8f[_0x13ba35(0xc2)]&&(console[_0x13ba35(0xd4)](''),console[_0x13ba35(0xd4)]('Context\x20details:'),console['error']('\x20\x20Path:\x20'+_0x1b6b8b),console[_0x13ba35(0xd4)](''),console[_0x13ba35(0xd4)]('Use\x20\x22tdx\x20context\x22\x20to\x20see\x20all\x20context\x20parameters'),console[_0x13ba35(0xd4)](_0x13ba35(0xc7)));return 0x0;}catch(_0x481c24){throw _0x481c24;}}}
1
+ function a28_0x2979(_0x303c42,_0x1a529c){const _0x52b8ee=a28_0x52b8();return a28_0x2979=function(_0x2979a7,_0x17c11){_0x2979a7=_0x2979a7-0x114;let _0x733daf=_0x52b8ee[_0x2979a7];return _0x733daf;},a28_0x2979(_0x303c42,_0x1a529c);}const a28_0xa6d3a6=a28_0x2979;(function(_0xa9ee0d,_0x15a985){const _0x331624=a28_0x2979,_0x24a354=_0xa9ee0d();while(!![]){try{const _0x4d6f3d=-parseInt(_0x331624(0x128))/0x1*(parseInt(_0x331624(0x118))/0x2)+parseInt(_0x331624(0x11c))/0x3+parseInt(_0x331624(0x114))/0x4+parseInt(_0x331624(0x125))/0x5+-parseInt(_0x331624(0x122))/0x6*(parseInt(_0x331624(0x117))/0x7)+parseInt(_0x331624(0x11b))/0x8+parseInt(_0x331624(0x116))/0x9;if(_0x4d6f3d===_0x15a985)break;else _0x24a354['push'](_0x24a354['shift']());}catch(_0x32cb88){_0x24a354['push'](_0x24a354['shift']());}}}(a28_0x52b8,0x2d5da));import{BaseCommand}from'./command.js';function a28_0x52b8(){const _0x2b4127=['segmentPath','stringify','name','Show\x20current\x20segment/folder\x20context','16956elSKrM','error','2492982XasUzc','334369Xzteax','1414AryZTn','Use\x20\x22tdx\x20context\x22\x20to\x20see\x20all\x20context\x20parameters','verbose','337840VEmnsS','65202cCJTWY','log','json','execute','root','Context\x20details:','18ocZKEh','format','jsonl','615985eRWRdp','segment:pwd','\x20\x20Path:\x20','197DzWzZy'];a28_0x52b8=function(){return _0x2b4127;};return a28_0x52b8();}export class SegmentPwdCommand extends BaseCommand{[a28_0xa6d3a6(0x12b)]=a28_0xa6d3a6(0x126);['description']=a28_0xa6d3a6(0x12c);async[a28_0xa6d3a6(0x11f)](_0x4ff85b){const _0x113a8a=a28_0xa6d3a6,{options:_0x23d409}=_0x4ff85b;try{const _0x59ee20=_0x23d409[_0x113a8a(0x129)];if(!_0x59ee20)return _0x23d409[_0x113a8a(0x123)]===_0x113a8a(0x11e)||_0x23d409[_0x113a8a(0x123)]===_0x113a8a(0x124)?console[_0x113a8a(0x11d)](JSON[_0x113a8a(0x12a)]({'path':'/','type':_0x113a8a(0x120)})):console[_0x113a8a(0x11d)]('/'),0x0;if(_0x23d409[_0x113a8a(0x123)]===_0x113a8a(0x11e)||_0x23d409[_0x113a8a(0x123)]===_0x113a8a(0x124)){const _0x5d9dd0={'path':_0x59ee20};console[_0x113a8a(0x11d)](JSON[_0x113a8a(0x12a)](_0x5d9dd0));}else console['log'](_0x59ee20),_0x23d409[_0x113a8a(0x11a)]&&(console[_0x113a8a(0x115)](''),console[_0x113a8a(0x115)](_0x113a8a(0x121)),console[_0x113a8a(0x115)](_0x113a8a(0x127)+_0x59ee20),console['error'](''),console[_0x113a8a(0x115)](_0x113a8a(0x119)),console[_0x113a8a(0x115)]('Use\x20\x22tdx\x20context\x20--debug\x22\x20to\x20see\x20context\x20sources'));return 0x0;}catch(_0x1afe1f){throw _0x1afe1f;}}}
@@ -1 +1 @@
1
- const a29_0x49413e=a29_0xb9dc;(function(_0x3745c4,_0x102cd9){const _0x1f75f7=a29_0xb9dc,_0x2cfda4=_0x3745c4();while(!![]){try{const _0x9f4190=parseInt(_0x1f75f7(0x18d))/0x1*(parseInt(_0x1f75f7(0x193))/0x2)+-parseInt(_0x1f75f7(0x191))/0x3+-parseInt(_0x1f75f7(0x1b7))/0x4+-parseInt(_0x1f75f7(0x1b9))/0x5*(-parseInt(_0x1f75f7(0x18f))/0x6)+parseInt(_0x1f75f7(0x190))/0x7*(parseInt(_0x1f75f7(0x19e))/0x8)+-parseInt(_0x1f75f7(0x1a3))/0x9*(-parseInt(_0x1f75f7(0x18e))/0xa)+-parseInt(_0x1f75f7(0x196))/0xb;if(_0x9f4190===_0x102cd9)break;else _0x2cfda4['push'](_0x2cfda4['shift']());}catch(_0x4c7fe7){_0x2cfda4['push'](_0x2cfda4['shift']());}}}(a29_0x1301,0xcfd15));import{BaseCommand}from'./command.js';function a29_0x1301(){const _0x1d9799=['39714GcrSKd','7fupAJS','3488319dqaCag','segment','177358aPGjIp','name','\x20\x20\x20Path:\x20','7927260dSfosU','Parent\x20ID:\x20','Error:\x20Cannot\x20update\x20','\x20\x20tdx\x20segment\x20update\x20\x22My\x20Audience/High\x20Value\x22\x20--description\x20\x22...\x22','Resolving\x20folder\x20\x27','length','resolvePathToResource','Segment\x20ID\x20missing\x20from\x20resolved\x20path','3997048pgNwJN','type','verbose','folder','.\x20Only\x20child\x20segments\x20can\x20be\x20updated.','3942ifCAPD','Use:\x20tdx\x20segment\x20update\x20<path_to_segment>\x20[options]','rule','includes','resolveFolderId','Resolved\x20type:\x20','parentId','\x20\x20tdx\x20segment\x20update\x20\x22High\x20Value\x22\x20--rule\x20\x27...\x27\x20\x20#\x20Relative\x20to\x20context','INTERNAL','Update\x20existing\x20child\x20segment','segmentName','segmentPath','ruleFile','Usage:\x20tdx\x20segment\x20update\x20<path>\x20[options]','kind','✔\x20Updated\x20segment\x20\x27','data','Resolved\x20folder\x20ID:\x20','Error:\x20Segment\x20path\x20or\x20name\x20is\x20required','description','2577004zatifD','error','665BfuRkd','Updating\x20segment\x20\x27','segmentId','\x27...','Examples:','updateSegmentById','19VkIdPo','7170bJRHCI'];a29_0x1301=function(){return _0x1d9799;};return a29_0x1301();}function a29_0xb9dc(_0x5c4c61,_0x1cb9e7){const _0x130184=a29_0x1301();return a29_0xb9dc=function(_0xb9dcaa,_0x1a2438){_0xb9dcaa=_0xb9dcaa-0x18d;let _0x271391=_0x130184[_0xb9dcaa];return _0x271391;},a29_0xb9dc(_0x5c4c61,_0x1cb9e7);}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{[a29_0x49413e(0x194)]='segment:update';['description']=a29_0x49413e(0x1ac);async['execute'](_0x5d35fe){const _0x1e056f=a29_0x49413e,{options:_0x44441b,args:_0x14ffe8,tdx:_0x49f6a3}=_0x5d35fe,_0x593835=_0x44441b;if(_0x14ffe8[_0x1e056f(0x19b)]===0x0)return console[_0x1e056f(0x1b8)](_0x1e056f(0x1b5)),console[_0x1e056f(0x1b8)](_0x1e056f(0x1b0)),console[_0x1e056f(0x1b8)](_0x1e056f(0x1bd)),console[_0x1e056f(0x1b8)](_0x1e056f(0x199)),console[_0x1e056f(0x1b8)](_0x1e056f(0x1aa)),0x1;const _0x849b93=_0x14ffe8[0x0],_0x38131f=_0x44441b[_0x1e056f(0x1ae)];let _0x2b21a1=_0x849b93;_0x38131f&&!_0x849b93[_0x1e056f(0x1a6)]('/')&&(_0x2b21a1=_0x38131f+'/'+_0x849b93,_0x593835[_0x1e056f(0x1a0)]&&console['error']('Resolved\x20relative\x20path\x20to:\x20'+_0x2b21a1));const _0x31f294=await withSpinner('Resolving\x20path\x20\x27'+_0x2b21a1+_0x1e056f(0x1bc),()=>_0x49f6a3[_0x1e056f(0x192)][_0x1e056f(0x19c)](_0x2b21a1),{'verbose':_0x593835['verbose']}),_0x3ab269=_0x31f294[_0x1e056f(0x1b3)];_0x593835[_0x1e056f(0x1a0)]&&console['error'](_0x1e056f(0x1a8)+_0x3ab269[_0x1e056f(0x19f)]);if(_0x3ab269['type']!==_0x1e056f(0x192))return console[_0x1e056f(0x1b8)](_0x1e056f(0x198)+_0x3ab269['type']+_0x1e056f(0x1a2)),console[_0x1e056f(0x1b8)](_0x1e056f(0x1a4)),0x1;if(!_0x3ab269[_0x1e056f(0x1bb)])throw new SDKError(ErrorCode[_0x1e056f(0x1ab)],_0x1e056f(0x19d));const _0x54c37d=_0x3ab269[_0x1e056f(0x1a9)],_0x442160=_0x3ab269[_0x1e056f(0x1bb)];_0x593835[_0x1e056f(0x1a0)]&&(console[_0x1e056f(0x1b8)](_0x1e056f(0x197)+_0x54c37d),console[_0x1e056f(0x1b8)]('Segment\x20ID:\x20'+_0x442160));let _0xc5d3e;if(_0x593835[_0x1e056f(0x1a1)]){const _0x54579e=_0x593835[_0x1e056f(0x1a1)],_0x2961fb=await withSpinner(_0x1e056f(0x19a)+_0x54579e+_0x1e056f(0x1bc),()=>_0x49f6a3[_0x1e056f(0x192)][_0x1e056f(0x1a7)](_0x54c37d,_0x54579e),{'verbose':_0x593835[_0x1e056f(0x1a0)]});_0xc5d3e=parseInt(_0x2961fb['data'],0xa),_0x593835[_0x1e056f(0x1a0)]&&console[_0x1e056f(0x1b8)](_0x1e056f(0x1b4)+_0xc5d3e);}const _0x148ee8=await loadJSONFromOptions(_0x593835[_0x1e056f(0x1a5)],_0x593835[_0x1e056f(0x1af)]),_0x1c982d={'name':_0x593835[_0x1e056f(0x194)],'description':_0x593835[_0x1e056f(0x1b6)],'rule':_0x148ee8,'kind':_0x593835[_0x1e056f(0x1b1)]!==undefined?parseInt(_0x593835[_0x1e056f(0x1b1)],0xa):undefined,'segmentFolderId':_0xc5d3e},_0xc441bd=await withSpinner(_0x1e056f(0x1ba)+_0x3ab269[_0x1e056f(0x1ad)]+_0x1e056f(0x1bc),()=>_0x49f6a3[_0x1e056f(0x192)][_0x1e056f(0x1be)](_0x54c37d,_0x442160,_0x1c982d),{'verbose':_0x593835[_0x1e056f(0x1a0)]}),_0x4de48f=_0xc441bd[_0x1e056f(0x1b3)];return console[_0x1e056f(0x1b8)](_0x1e056f(0x1b2)+_0x4de48f[_0x1e056f(0x194)]+'\x27'),_0x2b21a1!==_0x849b93&&console[_0x1e056f(0x1b8)](_0x1e056f(0x195)+_0x2b21a1),await handleSDKOutput([_0x4de48f],_0x593835),0x0;}}
1
+ const a29_0x375358=a29_0x31e0;(function(_0x26154d,_0x2456b9){const _0x1ab87c=a29_0x31e0,_0x55b982=_0x26154d();while(!![]){try{const _0x2ae3fa=parseInt(_0x1ab87c(0xe2))/0x1+-parseInt(_0x1ab87c(0xbf))/0x2*(-parseInt(_0x1ab87c(0xcf))/0x3)+-parseInt(_0x1ab87c(0xc1))/0x4*(parseInt(_0x1ab87c(0xe7))/0x5)+-parseInt(_0x1ab87c(0xcc))/0x6+parseInt(_0x1ab87c(0xde))/0x7*(-parseInt(_0x1ab87c(0xba))/0x8)+parseInt(_0x1ab87c(0xc3))/0x9+parseInt(_0x1ab87c(0xd6))/0xa;if(_0x2ae3fa===_0x2456b9)break;else _0x55b982['push'](_0x55b982['shift']());}catch(_0x1c0a22){_0x55b982['push'](_0x55b982['shift']());}}}(a29_0x2e05,0x4897c));import{BaseCommand}from'./command.js';import{handleSDKOutput}from'../utils/command-output.js';import{withSpinner}from'../utils/spinner.js';function a29_0x2e05(){const _0x40306c=['Parent\x20ID:\x20','Resolving\x20folder\x20\x27','segmentId','updateSegmentById','245rNgIQA','\x27...','4504ZNIVhH','includes','Examples:','✔\x20Updated\x20segment\x20\x27','Error:\x20Segment\x20path\x20or\x20name\x20is\x20required','106KGCosd','Resolved\x20folder\x20ID:\x20','16280NFhoKm','description','821907ImGbQa','Updating\x20segment\x20\x27','Resolved\x20type:\x20','segment:update','data','.\x20Only\x20child\x20segments\x20can\x20be\x20updated.','execute','\x20\x20tdx\x20segment\x20update\x20\x22High\x20Value\x22\x20--rule\x20\x27...\x27\x20\x20#\x20Relative\x20to\x20context','\x20\x20tdx\x20segment\x20update\x20\x22My\x20Audience/High\x20Value\x22\x20--description\x20\x22...\x22','217056TSXZRV','length','parentId','32847CwVkPt','error','folder','segmentName','Update\x20existing\x20child\x20segment','segment','resolvePathToResource','291120KJmzvs','\x20\x20\x20Path:\x20','type','Use:\x20tdx\x20segment\x20update\x20<path_to_segment>\x20[options]','resolveFolderId','INTERNAL','kind','verbose','6111jTxLBb','name','Error:\x20Cannot\x20update\x20','Segment\x20ID:\x20','323713CbJqMC'];a29_0x2e05=function(){return _0x40306c;};return a29_0x2e05();}import{loadJSONFromOptions}from'../utils/json-loader.js';import{SDKError,ErrorCode}from'../sdk/index.js';function a29_0x31e0(_0x1a8fa0,_0x3327a3){const _0x2e0582=a29_0x2e05();return a29_0x31e0=function(_0x31e0d1,_0x16c9ee){_0x31e0d1=_0x31e0d1-0xba;let _0x21e644=_0x2e0582[_0x31e0d1];return _0x21e644;},a29_0x31e0(_0x1a8fa0,_0x3327a3);}export class SegmentUpdateCommand extends BaseCommand{[a29_0x375358(0xdf)]=a29_0x375358(0xc6);[a29_0x375358(0xc2)]=a29_0x375358(0xd3);async[a29_0x375358(0xc9)](_0x177bec){const _0x1366f7=a29_0x375358,{options:_0x2fbd1c,args:_0x19e746,tdx:_0x211796}=_0x177bec,_0x310771=_0x2fbd1c;if(_0x19e746[_0x1366f7(0xcd)]===0x0)return console[_0x1366f7(0xd0)](_0x1366f7(0xbe)),console[_0x1366f7(0xd0)]('Usage:\x20tdx\x20segment\x20update\x20<path>\x20[options]'),console[_0x1366f7(0xd0)](_0x1366f7(0xbc)),console[_0x1366f7(0xd0)](_0x1366f7(0xcb)),console['error'](_0x1366f7(0xca)),0x1;const _0x2ba233=_0x19e746[0x0],_0x3537bc=_0x2fbd1c['segmentPath'];let _0x260337=_0x2ba233;_0x3537bc&&!_0x2ba233[_0x1366f7(0xbb)]('/')&&(_0x260337=_0x3537bc+'/'+_0x2ba233,_0x310771['verbose']&&console['error']('Resolved\x20relative\x20path\x20to:\x20'+_0x260337));const _0x173e7c=await withSpinner('Resolving\x20path\x20\x27'+_0x260337+'\x27...',()=>_0x211796[_0x1366f7(0xd4)][_0x1366f7(0xd5)](_0x260337),{'verbose':_0x310771[_0x1366f7(0xdd)]}),_0x6173c1=_0x173e7c[_0x1366f7(0xc7)];_0x310771[_0x1366f7(0xdd)]&&console[_0x1366f7(0xd0)](_0x1366f7(0xc5)+_0x6173c1[_0x1366f7(0xd8)]);if(_0x6173c1[_0x1366f7(0xd8)]!=='segment')return console[_0x1366f7(0xd0)](_0x1366f7(0xe0)+_0x6173c1[_0x1366f7(0xd8)]+_0x1366f7(0xc8)),console[_0x1366f7(0xd0)](_0x1366f7(0xd9)),0x1;if(!_0x6173c1[_0x1366f7(0xe5)])throw new SDKError(ErrorCode[_0x1366f7(0xdb)],'Segment\x20ID\x20missing\x20from\x20resolved\x20path');const _0x1d286d=_0x6173c1[_0x1366f7(0xce)],_0x52182e=_0x6173c1[_0x1366f7(0xe5)];_0x310771['verbose']&&(console[_0x1366f7(0xd0)](_0x1366f7(0xe3)+_0x1d286d),console[_0x1366f7(0xd0)](_0x1366f7(0xe1)+_0x52182e));let _0x210340;if(_0x310771[_0x1366f7(0xd1)]){const _0xcf5877=_0x310771[_0x1366f7(0xd1)],_0x4cc510=await withSpinner(_0x1366f7(0xe4)+_0xcf5877+_0x1366f7(0xe8),()=>_0x211796[_0x1366f7(0xd4)][_0x1366f7(0xda)](_0x1d286d,_0xcf5877),{'verbose':_0x310771[_0x1366f7(0xdd)]});_0x210340=parseInt(_0x4cc510[_0x1366f7(0xc7)],0xa),_0x310771[_0x1366f7(0xdd)]&&console[_0x1366f7(0xd0)](_0x1366f7(0xc0)+_0x210340);}const _0xa68a0c=await loadJSONFromOptions(_0x310771['rule'],_0x310771['ruleFile']),_0x11e394={'name':_0x310771[_0x1366f7(0xdf)],'description':_0x310771[_0x1366f7(0xc2)],'rule':_0xa68a0c,'kind':_0x310771[_0x1366f7(0xdc)]!==undefined?parseInt(_0x310771[_0x1366f7(0xdc)],0xa):undefined,'segmentFolderId':_0x210340},_0x8cb0ce=await withSpinner(_0x1366f7(0xc4)+_0x6173c1[_0x1366f7(0xd2)]+_0x1366f7(0xe8),()=>_0x211796[_0x1366f7(0xd4)][_0x1366f7(0xe6)](_0x1d286d,_0x52182e,_0x11e394),{'verbose':_0x310771[_0x1366f7(0xdd)]}),_0x51e99c=_0x8cb0ce[_0x1366f7(0xc7)];return console['error'](_0x1366f7(0xbd)+_0x51e99c['name']+'\x27'),_0x260337!==_0x2ba233&&console['error'](_0x1366f7(0xd7)+_0x260337),await handleSDKOutput([_0x51e99c],_0x310771),0x0;}}
@@ -1 +1 @@
1
- const a30_0x4c5c1c=a30_0xc054;function a30_0x2564(){const _0x517be2=['Examples:','Context\x20cleared.\x20Back\x20to\x20root.','Error:\x20Path\x20is\x20required','Usage:\x20tdx\x20segment\x20use\x20<path>','12IRIMnv','Error:\x20Cannot\x20set\x20context\x20to\x20a\x20segment.','Resolving\x20path\x20\x27','segment','log','site','join','Use\x20\x22tdx\x20segment\x20pwd\x22\x20to\x20show\x20current\x20context','\x20\x20tdx\x20segment\x20use\x20/\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Clear\x20context','parentId','350553rXftbG','Use\x20an\x20absolute\x20path\x20or\x20set\x20context\x20with:\x20tdx\x20segment\x20use\x20<parent_name>','\x27...','isAbsolute','209055DkfYDp','250rOjMro','folderId','8069397zKvwEu','\x20\x20tdx\x20segment\x20use\x20\x22My\x20Audience\x22','Error:\x20No\x20context\x20set.\x20Cannot\x20use\x20relative\x20path.','verbose','length','8JVBilp','84lpZssL','Context\x20can\x20only\x20be\x20set\x20to\x20a\x20parent\x20segment\x20or\x20folder.','Context\x20set\x20to:\x20','\x20\x20tdx\x20segment\x20use\x20\x22My\x20Audience/Marketing\x22','execute','fullPath','Parent\x20ID:\x20','resolvePathToResource','segments','description','type','Target\x20path:\x20','parentName','Resolved\x20path\x20type:\x20','1963750cavnKy','2696968rwNCQU','2532194juVTdR','249912xQCVUY','Set\x20current\x20segment/folder\x20context\x20for\x20navigation','Site:\x20','segmentPath','error','data','split','Use\x20\x22tdx\x20segments\x22\x20to\x20list\x20contents\x20in\x20this\x20context','Use:\x20tdx\x20segment\x20use\x20','1BBacCX'];a30_0x2564=function(){return _0x517be2;};return a30_0x2564();}(function(_0x3780f8,_0x2ad34a){const _0x141da0=a30_0xc054,_0x2988d2=_0x3780f8();while(!![]){try{const _0x51f337=-parseInt(_0x141da0(0x168))/0x1*(-parseInt(_0x141da0(0x15e))/0x2)+-parseInt(_0x141da0(0x141))/0x3+parseInt(_0x141da0(0x15d))/0x4+-parseInt(_0x141da0(0x15c))/0x5*(parseInt(_0x141da0(0x137))/0x6)+parseInt(_0x141da0(0x148))/0x7*(-parseInt(_0x141da0(0x14d))/0x8)+-parseInt(_0x141da0(0x15f))/0x9*(-parseInt(_0x141da0(0x146))/0xa)+-parseInt(_0x141da0(0x145))/0xb*(-parseInt(_0x141da0(0x14e))/0xc);if(_0x51f337===_0x2ad34a)break;else _0x2988d2['push'](_0x2988d2['shift']());}catch(_0x8b780){_0x2988d2['push'](_0x2988d2['shift']());}}}(a30_0x2564,0xadf04));function a30_0xc054(_0x360a71,_0x5ef088){const _0x256463=a30_0x2564();return a30_0xc054=function(_0xc0543e,_0x97bfb3){_0xc0543e=_0xc0543e-0x136;let _0x4c8099=_0x256463[_0xc0543e];return _0x4c8099;},a30_0xc054(_0x360a71,_0x5ef088);}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']='segment:use';[a30_0x4c5c1c(0x157)]=a30_0x4c5c1c(0x160);async[a30_0x4c5c1c(0x152)](_0x4280ce){const _0x528527=a30_0x4c5c1c,{options:_0x541c65,args:_0x387157,tdx:_0x76b8b3}=_0x4280ce;if(_0x387157['length']===0x0)return console['error'](_0x528527(0x16b)),console[_0x528527(0x163)](_0x528527(0x136)),console[_0x528527(0x163)](_0x528527(0x169)),console[_0x528527(0x163)](_0x528527(0x149)),console['error'](_0x528527(0x151)),console[_0x528527(0x163)](_0x528527(0x13f)),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 _0x2b2e91=_0x387157[0x0],_0x10d870=_0x541c65['session'];try{if(_0x2b2e91==='/')return saveSessionContext({'segment_path':undefined},_0x10d870),console[_0x528527(0x13b)](_0x528527(0x16a)),0x0;const _0x5d4086=_0x541c65[_0x528527(0x162)];let _0x553f0a=_0x2b2e91;const _0x150e08=parsePath(_0x2b2e91);if(!_0x150e08[_0x528527(0x144)]){if(!_0x5d4086)return console[_0x528527(0x163)](_0x528527(0x14a)),console[_0x528527(0x163)](_0x528527(0x142)),0x1;if(_0x2b2e91==='..'){const _0x353551=_0x5d4086[_0x528527(0x165)]('/')['slice'](0x0,-0x1)[_0x528527(0x13d)]('/');_0x553f0a=_0x353551||'/';}else _0x2b2e91==='.'?_0x553f0a=_0x5d4086:_0x553f0a=_0x5d4086+'/'+_0x2b2e91;_0x541c65[_0x528527(0x14b)]&&console['error']('Resolved\x20relative\x20path\x20to:\x20'+_0x553f0a);}if(_0x553f0a==='/'||_0x553f0a==='')return saveSessionContext({'segment_path':undefined},_0x10d870),console['log'](_0x528527(0x16a)),0x0;_0x553f0a=normalizePath(_0x553f0a);const _0x2b2cd1=parsePath(_0x553f0a)[_0x528527(0x156)];if(_0x2b2cd1[_0x528527(0x14c)]===0x0)return saveSessionContext({'segment_path':undefined},_0x10d870),console[_0x528527(0x13b)](_0x528527(0x16a)),0x0;_0x541c65[_0x528527(0x14b)]&&(console[_0x528527(0x163)](_0x528527(0x161)+_0x541c65[_0x528527(0x13c)]),console[_0x528527(0x163)](_0x528527(0x159)+_0x553f0a));const _0x5375bd=await withSpinner(_0x528527(0x139)+_0x553f0a+_0x528527(0x143),()=>_0x76b8b3[_0x528527(0x13a)][_0x528527(0x155)](_0x553f0a),{'verbose':_0x541c65[_0x528527(0x14b)]}),_0x221ff0=_0x5375bd[_0x528527(0x164)];_0x541c65[_0x528527(0x14b)]&&(console[_0x528527(0x163)](_0x528527(0x15b)+_0x221ff0[_0x528527(0x158)]),console[_0x528527(0x163)](_0x528527(0x154)+_0x221ff0[_0x528527(0x140)]),_0x221ff0[_0x528527(0x147)]&&console[_0x528527(0x163)]('Folder\x20ID:\x20'+_0x221ff0[_0x528527(0x147)]));if(_0x221ff0[_0x528527(0x158)]==='segment')return console['error'](_0x528527(0x138)),console[_0x528527(0x163)](_0x528527(0x14f)),console['error'](_0x528527(0x167)+_0x221ff0[_0x528527(0x15a)]+(_0x221ff0['folderPath']?'/'+_0x221ff0['folderPath'][_0x528527(0x13d)]('/'):'')),0x1;return saveSessionContext({'segment_path':_0x221ff0['fullPath'],'parent_segment':_0x221ff0[_0x528527(0x15a)]},_0x10d870),console[_0x528527(0x13b)](_0x528527(0x150)+_0x221ff0[_0x528527(0x153)]),_0x541c65[_0x528527(0x14b)]&&(console['error'](_0x528527(0x166)),console['error'](_0x528527(0x13e)),console[_0x528527(0x163)]('Use\x20\x22tdx\x20context\x22\x20to\x20see\x20all\x20context\x20parameters')),0x0;}catch(_0x42e149){throw _0x42e149;}}}
1
+ function a30_0x4d5a(){const _0x4719b1=['1856822PdMRvq','resolvePathToResource','session','Examples:','Set\x20current\x20segment/folder\x20context\x20for\x20navigation','slice','segment:use','Context\x20cleared.\x20Back\x20to\x20root.','name','\x20\x20tdx\x20segment\x20use\x20\x22My\x20Audience\x22','isAbsolute','Target\x20path:\x20','Usage:\x20tdx\x20segment\x20use\x20<path>','folderPath','\x20\x20tdx\x20segment\x20use\x20/\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Clear\x20context','Resolved\x20path\x20type:\x20','parentId','Resolving\x20path\x20\x27','site','61512tJYCTA','Error:\x20Cannot\x20set\x20context\x20to\x20a\x20segment.','folderId','4897270nSZcPD','segments','log','5nbpsLU','\x20\x20tdx\x20segment\x20use\x20..\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Go\x20to\x20parent','32320128tCngFl','data','parentName','verbose','\x20\x20tdx\x20segment\x20use\x20\x22My\x20Audience/Marketing\x22','length','fullPath','join','type','split','5472864OIqPFu','Use\x20\x22tdx\x20segment\x20pwd\x22\x20to\x20show\x20current\x20context','Error:\x20Path\x20is\x20required','execute','167598axlICd','Use\x20\x22tdx\x20context\x22\x20to\x20see\x20all\x20context\x20parameters','Parent\x20ID:\x20','Folder\x20ID:\x20','3423788gsBHbT','Context\x20set\x20to:\x20','\x27...','error','segment'];a30_0x4d5a=function(){return _0x4719b1;};return a30_0x4d5a();}const a30_0x1f1c61=a30_0x2b72;function a30_0x2b72(_0x5a210a,_0x440e80){const _0x4d5a75=a30_0x4d5a();return a30_0x2b72=function(_0x2b724a,_0x13a25e){_0x2b724a=_0x2b724a-0xc7;let _0x41e001=_0x4d5a75[_0x2b724a];return _0x41e001;},a30_0x2b72(_0x5a210a,_0x440e80);}(function(_0x55998f,_0x468cec){const _0x6db71f=a30_0x2b72,_0x4b24a9=_0x55998f();while(!![]){try{const _0x40e57d=-parseInt(_0x6db71f(0xcc))/0x1+-parseInt(_0x6db71f(0xd5))/0x2+parseInt(_0x6db71f(0xe8))/0x3+-parseInt(_0x6db71f(0xd0))/0x4*(parseInt(_0x6db71f(0xee))/0x5)+-parseInt(_0x6db71f(0xc8))/0x6+-parseInt(_0x6db71f(0xeb))/0x7+parseInt(_0x6db71f(0xf0))/0x8;if(_0x40e57d===_0x468cec)break;else _0x4b24a9['push'](_0x4b24a9['shift']());}catch(_0x192b31){_0x4b24a9['push'](_0x4b24a9['shift']());}}}(a30_0x4d5a,0x794aa));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{[a30_0x1f1c61(0xdd)]=a30_0x1f1c61(0xdb);['description']=a30_0x1f1c61(0xd9);async[a30_0x1f1c61(0xcb)](_0x143b61){const _0x389798=a30_0x1f1c61,{options:_0x13ffb7,args:_0x508333,tdx:_0x1e77e1}=_0x143b61;if(_0x508333[_0x389798(0xf5)]===0x0)return console[_0x389798(0xd3)](_0x389798(0xca)),console[_0x389798(0xd3)](_0x389798(0xe1)),console['error'](_0x389798(0xd8)),console[_0x389798(0xd3)](_0x389798(0xde)),console[_0x389798(0xd3)](_0x389798(0xf4)),console[_0x389798(0xd3)](_0x389798(0xe3)),console[_0x389798(0xd3)](_0x389798(0xef)),0x1;const _0x7fbfca=_0x508333[0x0],_0x5829bf=_0x13ffb7[_0x389798(0xd7)];try{if(_0x7fbfca==='/')return saveSessionContext({'segment_path':undefined},_0x5829bf),console[_0x389798(0xed)](_0x389798(0xdc)),0x0;const _0x453515=_0x13ffb7['segmentPath'];let _0x1585a3=_0x7fbfca;const _0x2c19a4=parsePath(_0x7fbfca);if(!_0x2c19a4[_0x389798(0xdf)]){if(!_0x453515)return console[_0x389798(0xd3)]('Error:\x20No\x20context\x20set.\x20Cannot\x20use\x20relative\x20path.'),console[_0x389798(0xd3)]('Use\x20an\x20absolute\x20path\x20or\x20set\x20context\x20with:\x20tdx\x20segment\x20use\x20<parent_name>'),0x1;if(_0x7fbfca==='..'){const _0x184eaa=_0x453515[_0x389798(0xc7)]('/')[_0x389798(0xda)](0x0,-0x1)[_0x389798(0xf7)]('/');_0x1585a3=_0x184eaa||'/';}else _0x7fbfca==='.'?_0x1585a3=_0x453515:_0x1585a3=_0x453515+'/'+_0x7fbfca;_0x13ffb7[_0x389798(0xf3)]&&console['error']('Resolved\x20relative\x20path\x20to:\x20'+_0x1585a3);}if(_0x1585a3==='/'||_0x1585a3==='')return saveSessionContext({'segment_path':undefined},_0x5829bf),console[_0x389798(0xed)](_0x389798(0xdc)),0x0;_0x1585a3=normalizePath(_0x1585a3);const _0x2a863f=parsePath(_0x1585a3)[_0x389798(0xec)];if(_0x2a863f[_0x389798(0xf5)]===0x0)return saveSessionContext({'segment_path':undefined},_0x5829bf),console[_0x389798(0xed)](_0x389798(0xdc)),0x0;_0x13ffb7['verbose']&&(console['error']('Site:\x20'+_0x13ffb7[_0x389798(0xe7)]),console['error'](_0x389798(0xe0)+_0x1585a3));const _0x16b0a2=await withSpinner(_0x389798(0xe6)+_0x1585a3+_0x389798(0xd2),()=>_0x1e77e1[_0x389798(0xd4)][_0x389798(0xd6)](_0x1585a3),{'verbose':_0x13ffb7['verbose']}),_0x432c53=_0x16b0a2[_0x389798(0xf1)];_0x13ffb7['verbose']&&(console[_0x389798(0xd3)](_0x389798(0xe4)+_0x432c53[_0x389798(0xf8)]),console[_0x389798(0xd3)](_0x389798(0xce)+_0x432c53[_0x389798(0xe5)]),_0x432c53[_0x389798(0xea)]&&console[_0x389798(0xd3)](_0x389798(0xcf)+_0x432c53[_0x389798(0xea)]));if(_0x432c53[_0x389798(0xf8)]===_0x389798(0xd4))return console[_0x389798(0xd3)](_0x389798(0xe9)),console[_0x389798(0xd3)]('Context\x20can\x20only\x20be\x20set\x20to\x20a\x20parent\x20segment\x20or\x20folder.'),console['error']('Use:\x20tdx\x20segment\x20use\x20'+_0x432c53[_0x389798(0xf2)]+(_0x432c53[_0x389798(0xe2)]?'/'+_0x432c53[_0x389798(0xe2)]['join']('/'):'')),0x1;return saveSessionContext({'segment_path':_0x432c53[_0x389798(0xf6)],'parent_segment':_0x432c53[_0x389798(0xf2)]},_0x5829bf),console[_0x389798(0xed)](_0x389798(0xd1)+_0x432c53[_0x389798(0xf6)]),_0x13ffb7[_0x389798(0xf3)]&&(console['error']('Use\x20\x22tdx\x20segments\x22\x20to\x20list\x20contents\x20in\x20this\x20context'),console[_0x389798(0xd3)](_0x389798(0xc9)),console[_0x389798(0xd3)](_0x389798(0xcd))),0x0;}catch(_0x4da47b){throw _0x4da47b;}}}
@@ -1 +1 @@
1
- const a31_0x3a866c=a31_0x1929;(function(_0x1116be,_0x359379){const _0x36bb5a=a31_0x1929,_0x536e16=_0x1116be();while(!![]){try{const _0x567323=parseInt(_0x36bb5a(0xfd))/0x1*(-parseInt(_0x36bb5a(0xbb))/0x2)+-parseInt(_0x36bb5a(0xdb))/0x3+parseInt(_0x36bb5a(0xcc))/0x4+-parseInt(_0x36bb5a(0xe9))/0x5+-parseInt(_0x36bb5a(0xe2))/0x6*(parseInt(_0x36bb5a(0xe0))/0x7)+parseInt(_0x36bb5a(0xf6))/0x8*(-parseInt(_0x36bb5a(0xd0))/0x9)+parseInt(_0x36bb5a(0xbd))/0xa;if(_0x567323===_0x359379)break;else _0x536e16['push'](_0x536e16['shift']());}catch(_0x4f55d7){_0x536e16['push'](_0x536e16['shift']());}}}(a31_0x1b22,0x28214));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';function a31_0x1929(_0x2dc12e,_0x2d90e3){const _0x1b22b1=a31_0x1b22();return a31_0x1929=function(_0x192909,_0x4a2859){_0x192909=_0x192909-0xbb;let _0x1004f2=_0x1b22b1[_0x192909];return _0x1004f2;},a31_0x1929(_0x2dc12e,_0x2d90e3);}function a31_0x1b22(){const _0x576373=['Building\x20hierarchy\x20tree...','No\x20parent\x20segments\x20match\x20pattern:\x20','Listing\x20parent\x20segments\x20matching\x20\x27','Resolving\x20context\x20path\x20\x27','listUnified','site','json','population','👥\x20','jsonl','8glLpGs','parentId','name','[parent\x20segments]','replace','attributes','format','1jzIUli','✔\x20Found\x20','description','\x20and\x20','message','384586GjaoBw','map','8230670IDylnj','dim','\x20folder','length','sort','\x27...','log','error','verbose','Error:\x20','Current\x20context:\x20','(empty)','\x20top-level\x20items','\x20\x20Cause:\x20','\x20segment','895556oyZkzG','folder','execute','data','116856vwFdVd','includes','Listing\x20parent\x20segments...','✔\x20Built\x20tree\x20with\x20','\x20parent\x20segment','resolvePathToResource','listParentsWithPattern','segment','Folder\x20ID:\x20','Path/pattern\x20arg:\x20','\x20matching\x20\x27','912495OcahQo','segmentPath','recursive','List\x20parent\x20segments,\x20folders,\x20and\x20child\x20segments','Parent\x20ID:\x20','53753PRwnPJ','Listing\x20folders\x20and\x20segments...','186PMChwn','localeCompare','listRecursive','Error:\x20Pattern\x20matching\x20is\x20only\x20supported\x20at\x20root\x20level\x20(no\x20context\x20set).','cause','folderId','segments','675465atfsTP','listParents','filter'];a31_0x1b22=function(){return _0x576373;};return a31_0x1b22();}import{handleSDKOutput}from'../utils/command-output.js';import{withSpinner}from'../utils/spinner.js';import{formatFlatList,formatTree}from'../utils/tree-formatter.js';import{formatRows}from'../utils/formatters.js';import a31_0x265af8 from'chalk';export class SegmentsCommand extends BaseCommand{[a31_0x3a866c(0xf8)]=a31_0x3a866c(0xe8);[a31_0x3a866c(0xff)]=a31_0x3a866c(0xde);async[a31_0x3a866c(0xce)](_0x54d841){const _0x4d200a=a31_0x3a866c,{options:_0x4a89af,args:_0x221874}=_0x54d841,_0x28b278=_0x4a89af[_0x4d200a(0xdd)],_0x353207=_0x221874[0x0];try{const _0x4784ee=_0x4a89af[_0x4d200a(0xdc)];_0x4a89af[_0x4d200a(0xc5)]&&(console['error']('Site:\x20'+_0x4a89af[_0x4d200a(0xf1)]),console[_0x4d200a(0xc4)](_0x4d200a(0xc7)+(_0x4784ee||'/')),_0x353207&&console[_0x4d200a(0xc4)](_0x4d200a(0xd9)+_0x353207),_0x28b278&&console[_0x4d200a(0xc4)]('Recursive\x20mode:\x20enabled'));if(_0x353207){const _0xc53a5f=_0x353207[_0x4d200a(0xd1)]('*')||_0x353207['includes']('?');if(_0xc53a5f&&!_0x4784ee)return await this[_0x4d200a(0xd6)](_0x54d841,_0x353207);else return _0xc53a5f?(console[_0x4d200a(0xc4)](_0x4d200a(0xe5)),console['error']('Clear\x20context\x20with:\x20tdx\x20segment\x20use\x20/'),0x1):_0x28b278?await this[_0x4d200a(0xe4)](_0x54d841,_0x353207):await this[_0x4d200a(0xf0)](_0x54d841,_0x353207);}if(!_0x4784ee)return await this[_0x4d200a(0xea)](_0x54d841);return _0x28b278?await this[_0x4d200a(0xe4)](_0x54d841,_0x4784ee):await this[_0x4d200a(0xf0)](_0x54d841,_0x4784ee);}catch(_0x4babe4){if(_0x4babe4 instanceof SDKError)return console[_0x4d200a(0xc4)](_0x4d200a(0xc6)+_0x4babe4[_0x4d200a(0x101)]),_0x4babe4[_0x4d200a(0xe6)]&&console[_0x4d200a(0xc4)](_0x4d200a(0xca)+_0x4babe4[_0x4d200a(0xe6)]),0x1;throw _0x4babe4;}}async[a31_0x3a866c(0xd6)](_0x484135,_0x4dd5c0){const _0x37cf3d=a31_0x3a866c,{options:_0x154890,tdx:_0x41aa99}=_0x484135,_0x483a86=await withSpinner(_0x37cf3d(0xee)+_0x4dd5c0+_0x37cf3d(0xc2),()=>_0x41aa99['segment'][_0x37cf3d(0xea)](),{'verbose':_0x154890['verbose']}),_0x1599cf=_0x483a86[_0x37cf3d(0xcf)],_0x49d799=_0x4dd5c0[_0x37cf3d(0xfa)](/[.+^${}()|[\]\\]/g,'\x5c$&')[_0x37cf3d(0xfa)](/\*/g,'.*')[_0x37cf3d(0xfa)](/\?/g,'.'),_0x25371f=new RegExp('^'+_0x49d799+'$','i'),_0x55c40e=_0x1599cf[_0x37cf3d(0xeb)](_0x57e3be=>_0x25371f['test'](_0x57e3be[_0x37cf3d(0xfb)][_0x37cf3d(0xf8)]));console[_0x37cf3d(0xc4)](_0x37cf3d(0xfe)+_0x55c40e[_0x37cf3d(0xc0)]+'\x20parent\x20segment'+(_0x55c40e[_0x37cf3d(0xc0)]!==0x1?'s':'')+_0x37cf3d(0xda)+_0x4dd5c0+'\x27');if(_0x154890[_0x37cf3d(0xfc)]==='json'||_0x154890[_0x37cf3d(0xfc)]==='jsonl')await handleSDKOutput(_0x55c40e,_0x154890);else{if(_0x55c40e[_0x37cf3d(0xc0)]===0x0)console[_0x37cf3d(0xc3)](_0x37cf3d(0xed)+_0x4dd5c0);else{console[_0x37cf3d(0xc3)](_0x37cf3d(0xf9));for(const _0xef1282 of _0x55c40e){const _0x137fdd=_0xef1282['attributes'][_0x37cf3d(0xf3)]?a31_0x265af8[_0x37cf3d(0xbe)]('\x20('+formatRows(_0xef1282[_0x37cf3d(0xfb)]['population'])+')'):'';console[_0x37cf3d(0xc3)](_0x37cf3d(0xf4)+_0xef1282['attributes'][_0x37cf3d(0xf8)]+_0x137fdd);}}}return 0x0;}async[a31_0x3a866c(0xea)](_0x494688){const _0x1af95e=a31_0x3a866c,{options:_0x1d6e76,tdx:_0x1533b0}=_0x494688,_0x2cab75=await withSpinner(_0x1af95e(0xd2),()=>_0x1533b0[_0x1af95e(0xd7)][_0x1af95e(0xea)](),{'verbose':_0x1d6e76[_0x1af95e(0xc5)]}),_0x1f3d90=_0x2cab75[_0x1af95e(0xcf)];console[_0x1af95e(0xc4)](_0x1af95e(0xfe)+_0x1f3d90['length']+_0x1af95e(0xd4)+(_0x1f3d90['length']!==0x1?'s':''));if(_0x1d6e76['format']==='json'||_0x1d6e76[_0x1af95e(0xfc)]===_0x1af95e(0xf5))await handleSDKOutput(_0x1f3d90,_0x1d6e76);else{console[_0x1af95e(0xc3)](_0x1af95e(0xf9));for(const _0x2d0aa1 of _0x1f3d90){const _0x3d98bc=_0x2d0aa1[_0x1af95e(0xfb)][_0x1af95e(0xf3)]?a31_0x265af8[_0x1af95e(0xbe)]('\x20('+formatRows(_0x2d0aa1[_0x1af95e(0xfb)][_0x1af95e(0xf3)])+')'):'';console['log'](_0x1af95e(0xf4)+_0x2d0aa1['attributes'][_0x1af95e(0xf8)]+_0x3d98bc);}}return 0x0;}async['listUnified'](_0x432855,_0x1ec297){const _0x2fd924=a31_0x3a866c,{options:_0x2104e6,tdx:_0x5c8d49}=_0x432855,_0xd1ad28=await withSpinner(_0x2fd924(0xef)+_0x1ec297+_0x2fd924(0xc2),()=>_0x5c8d49[_0x2fd924(0xd7)][_0x2fd924(0xd5)](_0x1ec297),{'verbose':_0x2104e6['verbose']}),_0x6216af=_0xd1ad28[_0x2fd924(0xcf)];_0x2104e6[_0x2fd924(0xc5)]&&(console[_0x2fd924(0xc4)](_0x2fd924(0xdf)+_0x6216af[_0x2fd924(0xf7)]),_0x6216af[_0x2fd924(0xe7)]&&console[_0x2fd924(0xc4)]('Folder\x20ID:\x20'+_0x6216af['folderId']));const _0x1505fe=await withSpinner(_0x2fd924(0xe1),()=>_0x5c8d49[_0x2fd924(0xd7)]['listUnified'](_0x6216af[_0x2fd924(0xf7)],_0x6216af[_0x2fd924(0xe7)]),{'verbose':_0x2104e6['verbose']}),{folders:_0x2a2f6b,segments:_0x13ff6b}=_0x1505fe[_0x2fd924(0xcf)],_0x585b56=_0x2a2f6b[_0x2fd924(0xc0)]+_0x13ff6b['length'];console[_0x2fd924(0xc4)](_0x2fd924(0xfe)+_0x2a2f6b['length']+_0x2fd924(0xbf)+(_0x2a2f6b[_0x2fd924(0xc0)]!==0x1?'s':'')+_0x2fd924(0x100)+_0x13ff6b['length']+_0x2fd924(0xcb)+(_0x13ff6b['length']!==0x1?'s':''));if(_0x2104e6[_0x2fd924(0xfc)]===_0x2fd924(0xf2)||_0x2104e6[_0x2fd924(0xfc)]===_0x2fd924(0xf5)){const _0x1da45a=[..._0x2a2f6b['map'](_0x107841=>({..._0x107841,'type':_0x2fd924(0xcd)})),..._0x13ff6b[_0x2fd924(0xbc)](_0x9bd33=>({..._0x9bd33,'type':'segment'}))][_0x2fd924(0xc1)]((_0x2e7a76,_0x38c332)=>_0x2e7a76[_0x2fd924(0xf8)][_0x2fd924(0xe3)](_0x38c332[_0x2fd924(0xf8)]));await handleSDKOutput(_0x1da45a,_0x2104e6);}else{if(_0x585b56===0x0)console['log'](a31_0x265af8[_0x2fd924(0xbe)]('[/'+_0x1ec297+']')),console['log'](_0x2fd924(0xc8));else{console['log'](a31_0x265af8[_0x2fd924(0xbe)]('[/'+_0x1ec297+']'));const _0x4806bb=formatFlatList(_0x2a2f6b,_0x13ff6b,{'showMetadata':!![]});console[_0x2fd924(0xc3)](_0x4806bb);}}return 0x0;}async['listRecursive'](_0x4a6142,_0x584686){const _0x2cda3d=a31_0x3a866c,{options:_0xd28628,tdx:_0x2f41d3}=_0x4a6142,_0x52610e=await withSpinner(_0x2cda3d(0xef)+_0x584686+_0x2cda3d(0xc2),()=>_0x2f41d3[_0x2cda3d(0xd7)][_0x2cda3d(0xd5)](_0x584686),{'verbose':_0xd28628[_0x2cda3d(0xc5)]}),_0x3dd461=_0x52610e[_0x2cda3d(0xcf)];_0xd28628['verbose']&&(console['error'](_0x2cda3d(0xdf)+_0x3dd461['parentId']),_0x3dd461[_0x2cda3d(0xe7)]&&console[_0x2cda3d(0xc4)](_0x2cda3d(0xd8)+_0x3dd461[_0x2cda3d(0xe7)]));const _0x564fa9=_0xd28628['maxDepth']||0xa,_0x47d656=await withSpinner(_0x2cda3d(0xec),()=>_0x2f41d3[_0x2cda3d(0xd7)][_0x2cda3d(0xe4)](_0x3dd461[_0x2cda3d(0xf7)],_0x3dd461[_0x2cda3d(0xe7)],0x0,_0x564fa9),{'verbose':_0xd28628[_0x2cda3d(0xc5)]}),_0x3d6295=_0x47d656[_0x2cda3d(0xcf)];console['error'](_0x2cda3d(0xd3)+_0x3d6295[_0x2cda3d(0xc0)]+_0x2cda3d(0xc9));if(_0xd28628[_0x2cda3d(0xfc)]==='json'||_0xd28628['format']===_0x2cda3d(0xf5))await handleSDKOutput(_0x3d6295,_0xd28628);else{console[_0x2cda3d(0xc3)](a31_0x265af8['dim']('[/'+_0x584686+']'));const _0x5340f5=formatTree(_0x3d6295,{'showMetadata':!![]});console[_0x2cda3d(0xc3)](_0x5340f5);}return 0x0;}}
1
+ const a31_0xd97055=a31_0x58a8;function a31_0x58a8(_0x3e88a8,_0x48d2ff){const _0x1855b1=a31_0x1855();return a31_0x58a8=function(_0x58a8ba,_0x18f779){_0x58a8ba=_0x58a8ba-0x182;let _0x76c2d=_0x1855b1[_0x58a8ba];return _0x76c2d;},a31_0x58a8(_0x3e88a8,_0x48d2ff);}(function(_0x3e3b88,_0x50aa0b){const _0xd412af=a31_0x58a8,_0x4c613a=_0x3e3b88();while(!![]){try{const _0x161b57=parseInt(_0xd412af(0x19a))/0x1*(parseInt(_0xd412af(0x1b8))/0x2)+-parseInt(_0xd412af(0x1b0))/0x3*(parseInt(_0xd412af(0x1b2))/0x4)+-parseInt(_0xd412af(0x1b6))/0x5+parseInt(_0xd412af(0x1bc))/0x6+-parseInt(_0xd412af(0x1a2))/0x7+-parseInt(_0xd412af(0x1a7))/0x8*(-parseInt(_0xd412af(0x18a))/0x9)+parseInt(_0xd412af(0x18f))/0xa;if(_0x161b57===_0x50aa0b)break;else _0x4c613a['push'](_0x4c613a['shift']());}catch(_0x557556){_0x4c613a['push'](_0x4c613a['shift']());}}}(a31_0x1855,0x1edbc));function a31_0x1855(){const _0xc4c1c=['876820kDRsFI','cause','50iitLVk','Error:\x20','dim','length','1083810YbZetU','folder','json','listRecursive','filter','map','[parent\x20segments]','replace','No\x20parent\x20segments\x20match\x20pattern:\x20','👥\x20','parentId','listParentsWithPattern','name','(empty)','Error:\x20Pattern\x20matching\x20is\x20only\x20supported\x20at\x20root\x20level\x20(no\x20context\x20set).','Recursive\x20mode:\x20enabled','jsonl','531JPrUyQ','listUnified','\x20matching\x20\x27','Parent\x20ID:\x20','\x20and\x20','3607230KfwAhX','error','Folder\x20ID:\x20','\x20parent\x20segment','format','segmentPath','population','Path/pattern\x20arg:\x20','Site:\x20','List\x20parent\x20segments,\x20folders,\x20and\x20child\x20segments','recursive','1726DxEpGq','includes','\x27...','Resolving\x20context\x20path\x20\x27','verbose','sort','segment','resolvePathToResource','1590036wLGihX','data','Building\x20hierarchy\x20tree...','\x20\x20Cause:\x20','site','10448ggZjZP','folderId','listParents','Listing\x20parent\x20segments\x20matching\x20\x27','Current\x20context:\x20','Listing\x20folders\x20and\x20segments...','\x20top-level\x20items','description','maxDepth','132654CzQWkn','attributes','12ouewvr','\x5c$&','test','log'];a31_0x1855=function(){return _0xc4c1c;};return a31_0x1855();}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';import{formatRows}from'../utils/formatters.js';import a31_0x41a23c from'chalk';export class SegmentsCommand extends BaseCommand{[a31_0xd97055(0x185)]='segments';[a31_0xd97055(0x1ae)]=a31_0xd97055(0x198);async['execute'](_0x3ca6a6){const _0x4f7238=a31_0xd97055,{options:_0xf65e9c,args:_0x273220}=_0x3ca6a6,_0x5da89b=_0xf65e9c[_0x4f7238(0x199)],_0x3a5b38=_0x273220[0x0];try{const _0x47e89b=_0xf65e9c[_0x4f7238(0x194)];_0xf65e9c[_0x4f7238(0x19e)]&&(console[_0x4f7238(0x190)](_0x4f7238(0x197)+_0xf65e9c[_0x4f7238(0x1a6)]),console[_0x4f7238(0x190)](_0x4f7238(0x1ab)+(_0x47e89b||'/')),_0x3a5b38&&console[_0x4f7238(0x190)](_0x4f7238(0x196)+_0x3a5b38),_0x5da89b&&console['error'](_0x4f7238(0x188)));if(_0x3a5b38){const _0x1aa260=_0x3a5b38[_0x4f7238(0x19b)]('*')||_0x3a5b38[_0x4f7238(0x19b)]('?');if(_0x1aa260&&!_0x47e89b)return await this[_0x4f7238(0x184)](_0x3ca6a6,_0x3a5b38);else return _0x1aa260?(console['error'](_0x4f7238(0x187)),console[_0x4f7238(0x190)]('Clear\x20context\x20with:\x20tdx\x20segment\x20use\x20/'),0x1):_0x5da89b?await this[_0x4f7238(0x1bf)](_0x3ca6a6,_0x3a5b38):await this[_0x4f7238(0x18b)](_0x3ca6a6,_0x3a5b38);}if(!_0x47e89b)return await this[_0x4f7238(0x1a9)](_0x3ca6a6);return _0x5da89b?await this[_0x4f7238(0x1bf)](_0x3ca6a6,_0x47e89b):await this[_0x4f7238(0x18b)](_0x3ca6a6,_0x47e89b);}catch(_0x537f2e){if(_0x537f2e instanceof SDKError)return console[_0x4f7238(0x190)](_0x4f7238(0x1b9)+_0x537f2e['message']),_0x537f2e[_0x4f7238(0x1b7)]&&console[_0x4f7238(0x190)](_0x4f7238(0x1a5)+_0x537f2e[_0x4f7238(0x1b7)]),0x1;throw _0x537f2e;}}async[a31_0xd97055(0x184)](_0x2285e4,_0x3f54fb){const _0x80155c=a31_0xd97055,{options:_0x42df97,tdx:_0xcdda5f}=_0x2285e4,_0x24cdd3=await withSpinner(_0x80155c(0x1aa)+_0x3f54fb+_0x80155c(0x19c),()=>_0xcdda5f[_0x80155c(0x1a0)][_0x80155c(0x1a9)](),{'verbose':_0x42df97[_0x80155c(0x19e)]}),_0x3dfc80=_0x24cdd3['data'],_0x257927=_0x3f54fb[_0x80155c(0x1c3)](/[.+^${}()|[\]\\]/g,_0x80155c(0x1b3))[_0x80155c(0x1c3)](/\*/g,'.*')[_0x80155c(0x1c3)](/\?/g,'.'),_0x28a4ab=new RegExp('^'+_0x257927+'$','i'),_0x1ddd8e=_0x3dfc80[_0x80155c(0x1c0)](_0x40a2a8=>_0x28a4ab[_0x80155c(0x1b4)](_0x40a2a8[_0x80155c(0x1b1)][_0x80155c(0x185)]));console[_0x80155c(0x190)]('✔\x20Found\x20'+_0x1ddd8e['length']+_0x80155c(0x192)+(_0x1ddd8e['length']!==0x1?'s':'')+_0x80155c(0x18c)+_0x3f54fb+'\x27');if(_0x42df97[_0x80155c(0x193)]===_0x80155c(0x1be)||_0x42df97[_0x80155c(0x193)]===_0x80155c(0x189))await handleSDKOutput(_0x1ddd8e,_0x42df97);else{if(_0x1ddd8e[_0x80155c(0x1bb)]===0x0)console[_0x80155c(0x1b5)](_0x80155c(0x1c4)+_0x3f54fb);else{console[_0x80155c(0x1b5)](_0x80155c(0x1c2));for(const _0x57caf1 of _0x1ddd8e){const _0x25e006=_0x57caf1[_0x80155c(0x1b1)][_0x80155c(0x195)]?a31_0x41a23c['dim']('\x20('+formatRows(_0x57caf1[_0x80155c(0x1b1)][_0x80155c(0x195)])+')'):'';console[_0x80155c(0x1b5)](_0x80155c(0x182)+_0x57caf1[_0x80155c(0x1b1)][_0x80155c(0x185)]+_0x25e006);}}}return 0x0;}async[a31_0xd97055(0x1a9)](_0x4b4adc){const _0x498916=a31_0xd97055,{options:_0x5b1f21,tdx:_0x48b8ad}=_0x4b4adc,_0x3b33a9=await withSpinner('Listing\x20parent\x20segments...',()=>_0x48b8ad[_0x498916(0x1a0)][_0x498916(0x1a9)](),{'verbose':_0x5b1f21['verbose']}),_0x57fee5=_0x3b33a9[_0x498916(0x1a3)];console[_0x498916(0x190)]('✔\x20Found\x20'+_0x57fee5[_0x498916(0x1bb)]+'\x20parent\x20segment'+(_0x57fee5['length']!==0x1?'s':''));if(_0x5b1f21[_0x498916(0x193)]===_0x498916(0x1be)||_0x5b1f21[_0x498916(0x193)]===_0x498916(0x189))await handleSDKOutput(_0x57fee5,_0x5b1f21);else{console[_0x498916(0x1b5)](_0x498916(0x1c2));for(const _0x4e4a31 of _0x57fee5){const _0x49b110=_0x4e4a31['attributes'][_0x498916(0x195)]?a31_0x41a23c['dim']('\x20('+formatRows(_0x4e4a31[_0x498916(0x1b1)][_0x498916(0x195)])+')'):'';console['log']('👥\x20'+_0x4e4a31['attributes'][_0x498916(0x185)]+_0x49b110);}}return 0x0;}async[a31_0xd97055(0x18b)](_0x333146,_0x455eac){const _0x29792b=a31_0xd97055,{options:_0x9c9087,tdx:_0x267a60}=_0x333146,_0x404f55=await withSpinner(_0x29792b(0x19d)+_0x455eac+_0x29792b(0x19c),()=>_0x267a60[_0x29792b(0x1a0)][_0x29792b(0x1a1)](_0x455eac),{'verbose':_0x9c9087[_0x29792b(0x19e)]}),_0x246628=_0x404f55[_0x29792b(0x1a3)];_0x9c9087['verbose']&&(console[_0x29792b(0x190)](_0x29792b(0x18d)+_0x246628[_0x29792b(0x183)]),_0x246628[_0x29792b(0x1a8)]&&console[_0x29792b(0x190)](_0x29792b(0x191)+_0x246628[_0x29792b(0x1a8)]));const _0x14f7bc=await withSpinner(_0x29792b(0x1ac),()=>_0x267a60[_0x29792b(0x1a0)][_0x29792b(0x18b)](_0x246628[_0x29792b(0x183)],_0x246628[_0x29792b(0x1a8)]),{'verbose':_0x9c9087['verbose']}),{folders:_0x47e2a0,segments:_0x2746bf}=_0x14f7bc['data'],_0x52d044=_0x47e2a0[_0x29792b(0x1bb)]+_0x2746bf[_0x29792b(0x1bb)];console['error']('✔\x20Found\x20'+_0x47e2a0['length']+'\x20folder'+(_0x47e2a0[_0x29792b(0x1bb)]!==0x1?'s':'')+_0x29792b(0x18e)+_0x2746bf['length']+'\x20segment'+(_0x2746bf['length']!==0x1?'s':''));if(_0x9c9087[_0x29792b(0x193)]===_0x29792b(0x1be)||_0x9c9087['format']===_0x29792b(0x189)){const _0x5b3efa=[..._0x47e2a0[_0x29792b(0x1c1)](_0x329cbc=>({..._0x329cbc,'type':_0x29792b(0x1bd)})),..._0x2746bf[_0x29792b(0x1c1)](_0x32b26e=>({..._0x32b26e,'type':_0x29792b(0x1a0)}))][_0x29792b(0x19f)]((_0x3a8cfc,_0x864550)=>_0x3a8cfc[_0x29792b(0x185)]['localeCompare'](_0x864550[_0x29792b(0x185)]));await handleSDKOutput(_0x5b3efa,_0x9c9087);}else{if(_0x52d044===0x0)console[_0x29792b(0x1b5)](a31_0x41a23c[_0x29792b(0x1ba)]('[/'+_0x455eac+']')),console[_0x29792b(0x1b5)](_0x29792b(0x186));else{console[_0x29792b(0x1b5)](a31_0x41a23c[_0x29792b(0x1ba)]('[/'+_0x455eac+']'));const _0x23b43e=formatFlatList(_0x47e2a0,_0x2746bf,{'showMetadata':!![]});console[_0x29792b(0x1b5)](_0x23b43e);}}return 0x0;}async['listRecursive'](_0x1ae084,_0x618895){const _0x35f2be=a31_0xd97055,{options:_0x2bb321,tdx:_0x4ec0b6}=_0x1ae084,_0x17c6ee=await withSpinner(_0x35f2be(0x19d)+_0x618895+'\x27...',()=>_0x4ec0b6['segment']['resolvePathToResource'](_0x618895),{'verbose':_0x2bb321['verbose']}),_0x250cc1=_0x17c6ee[_0x35f2be(0x1a3)];_0x2bb321[_0x35f2be(0x19e)]&&(console[_0x35f2be(0x190)]('Parent\x20ID:\x20'+_0x250cc1[_0x35f2be(0x183)]),_0x250cc1['folderId']&&console[_0x35f2be(0x190)](_0x35f2be(0x191)+_0x250cc1[_0x35f2be(0x1a8)]));const _0x226b93=_0x2bb321[_0x35f2be(0x1af)]||0xa,_0xc26d62=await withSpinner(_0x35f2be(0x1a4),()=>_0x4ec0b6[_0x35f2be(0x1a0)][_0x35f2be(0x1bf)](_0x250cc1['parentId'],_0x250cc1[_0x35f2be(0x1a8)],0x0,_0x226b93),{'verbose':_0x2bb321['verbose']}),_0x26c5c0=_0xc26d62[_0x35f2be(0x1a3)];console[_0x35f2be(0x190)]('✔\x20Built\x20tree\x20with\x20'+_0x26c5c0['length']+_0x35f2be(0x1ad));if(_0x2bb321[_0x35f2be(0x193)]===_0x35f2be(0x1be)||_0x2bb321[_0x35f2be(0x193)]===_0x35f2be(0x189))await handleSDKOutput(_0x26c5c0,_0x2bb321);else{console[_0x35f2be(0x1b5)](a31_0x41a23c[_0x35f2be(0x1ba)]('[/'+_0x618895+']'));const _0x1521a7=formatTree(_0x26c5c0,{'showMetadata':!![]});console[_0x35f2be(0x1b5)](_0x1521a7);}return 0x0;}}
@@ -1 +1 @@
1
- const a32_0x46eb0e=a32_0x1a4d;(function(_0x4efa2b,_0x1ad061){const _0x143bc6=a32_0x1a4d,_0x45cc20=_0x4efa2b();while(!![]){try{const _0x2dd0ee=-parseInt(_0x143bc6(0x12f))/0x1+-parseInt(_0x143bc6(0x148))/0x2*(-parseInt(_0x143bc6(0x137))/0x3)+parseInt(_0x143bc6(0x129))/0x4+-parseInt(_0x143bc6(0x13c))/0x5+parseInt(_0x143bc6(0x121))/0x6+parseInt(_0x143bc6(0x127))/0x7*(-parseInt(_0x143bc6(0x134))/0x8)+parseInt(_0x143bc6(0x12d))/0x9;if(_0x2dd0ee===_0x1ad061)break;else _0x45cc20['push'](_0x45cc20['shift']());}catch(_0x6bc262){_0x45cc20['push'](_0x45cc20['shift']());}}}(a32_0x5853,0x368be));import{BaseCommand}from'./command.js';function a32_0x1a4d(_0x40ad4f,_0x34cdad){const _0x5853c3=a32_0x5853();return a32_0x1a4d=function(_0x1a4d98,_0x26fba9){_0x1a4d98=_0x1a4d98-0x11f;let _0x990dd6=_0x5853c3[_0x1a4d98];return _0x990dd6;},a32_0x1a4d(_0x40ad4f,_0x34cdad);}import{SDKError}from'../sdk/index.js';function a32_0x5853(){const _0x8df7b2=['length','\x20\x20Cause:\x20','Limit:\x20','Querying\x20','name','query','\x20\x20\x20or:\x20tdx\x20show\x20<catalog.database.table>','34xNoMKv','table','Error:\x20','554472BjOmfk','error','Show\x20table\x20contents','\x20from\x20','✔\x20Query\x20successful\x20-\x200\x20rows\x20returned','showTable','1381562MptJlT','limit','860984LrtjuJ','validate','args','message','5442255rxqaHp','Usage:\x20tdx\x20show\x20<database.table>','104843CxHDlE','Table:\x20','\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--database\x20<database>','catalog','data','16wFkEfH','cause','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','39909zzLbgP','verbose','site','✔\x20Retrieved\x20','Catalog:\x20','2077535eFkXEb','Site:\x20','Too\x20many\x20arguments\x0aUsage:\x20tdx\x20show\x20<database.table>\x0a\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--database\x20<database>\x0a\x0aRun\x20\x27tdx\x20show\x20--help\x27\x20for\x20more\x20options','...','database'];a32_0x5853=function(){return _0x8df7b2;};return a32_0x5853();}import{handleSDKOutput}from'../utils/command-output.js';import{parseTableReference,validateTableDescribeReference}from'../utils/table-ref-parser.js';import{withSpinner}from'../utils/spinner.js';import{DEFAULT_DISPLAY_LIMIT,resolveLimit}from'../utils/constants.js';export class ShowCommand extends BaseCommand{[a32_0x46eb0e(0x145)]='show';['description']=a32_0x46eb0e(0x123);async['execute'](_0x7c1b60){const _0x7a88f=a32_0x46eb0e;return this[_0x7a88f(0x126)](_0x7c1b60);}async[a32_0x46eb0e(0x126)](_0x17600a){const _0x5f0966=a32_0x46eb0e,{options:_0x428a1b,args:_0x2ece18,tdx:_0x2f3556}=_0x17600a;let _0x4e652e;try{_0x4e652e=parseTableReference(_0x2ece18[0x0]);const _0x5755a6=_0x428a1b[_0x5f0966(0x140)];!_0x4e652e[_0x5f0966(0x140)]&&_0x5755a6&&(_0x4e652e[_0x5f0966(0x140)]=_0x5755a6);const _0x3e02ac=validateTableDescribeReference(_0x4e652e);if(_0x3e02ac)return console[_0x5f0966(0x122)]('Error:\x20'+_0x3e02ac),console['error'](_0x5f0966(0x12e)),console[_0x5f0966(0x122)](_0x5f0966(0x147)),console[_0x5f0966(0x122)](_0x5f0966(0x131)),0x1;}catch(_0x1568a9){return console['error'](_0x5f0966(0x120)+_0x1568a9[_0x5f0966(0x12c)]),console[_0x5f0966(0x122)](_0x5f0966(0x12e)),console[_0x5f0966(0x122)](_0x5f0966(0x147)),console[_0x5f0966(0x122)](_0x5f0966(0x131)),0x1;}const _0x556c79=_0x4e652e[_0x5f0966(0x132)],_0x5cd72b=_0x4e652e[_0x5f0966(0x140)],_0x356965=_0x4e652e[_0x5f0966(0x11f)],_0x37d605=resolveLimit(_0x428a1b[_0x5f0966(0x128)],DEFAULT_DISPLAY_LIMIT);try{_0x428a1b['verbose']&&(console[_0x5f0966(0x122)](_0x5f0966(0x13d)+_0x428a1b[_0x5f0966(0x139)]),_0x556c79&&console['error'](_0x5f0966(0x13b)+_0x556c79),console[_0x5f0966(0x122)]('Database:\x20'+_0x5cd72b),console[_0x5f0966(0x122)](_0x5f0966(0x130)+_0x356965),console[_0x5f0966(0x122)](_0x5f0966(0x143)+_0x37d605));const _0xecfe7e=_0x556c79?_0x556c79+'.'+_0x5cd72b+'.'+_0x356965:_0x5cd72b+'.'+_0x356965,_0x4e9a61=await withSpinner(_0x5f0966(0x144)+_0xecfe7e+_0x5f0966(0x13f),()=>_0x2f3556[_0x5f0966(0x146)][_0x5f0966(0x126)](_0x5cd72b,_0x356965,_0x37d605,_0x556c79),{'verbose':_0x428a1b[_0x5f0966(0x138)]}),_0x27cff4=_0x4e9a61[_0x5f0966(0x133)],_0x49b7a9=_0x27cff4[_0x5f0966(0x133)];return _0x49b7a9['length']===0x0?console[_0x5f0966(0x122)](_0x5f0966(0x125)):console[_0x5f0966(0x122)](_0x5f0966(0x13a)+_0x49b7a9['length']+'\x20row'+(_0x49b7a9[_0x5f0966(0x141)]!==0x1?'s':'')+_0x5f0966(0x124)+_0xecfe7e),await handleSDKOutput(_0x49b7a9,_0x428a1b),0x0;}catch(_0x211af2){if(_0x211af2 instanceof SDKError)return console[_0x5f0966(0x122)]('Error:\x20'+_0x211af2[_0x5f0966(0x12c)]),_0x211af2['cause']&&console[_0x5f0966(0x122)](_0x5f0966(0x142)+_0x211af2[_0x5f0966(0x135)]),0x1;throw _0x211af2;}}[a32_0x46eb0e(0x12a)](_0x72e254){const _0x572837=a32_0x46eb0e;if(_0x72e254[_0x572837(0x12b)]['length']===0x0)return _0x572837(0x136);if(_0x72e254['args'][_0x572837(0x141)]>0x1)return _0x572837(0x13e);return undefined;}}
1
+ const a32_0x4369a2=a32_0x26de;(function(_0x26b078,_0x3deefd){const _0xb969b0=a32_0x26de,_0x9faab5=_0x26b078();while(!![]){try{const _0x165bc0=parseInt(_0xb969b0(0x91))/0x1*(parseInt(_0xb969b0(0x86))/0x2)+-parseInt(_0xb969b0(0xaa))/0x3*(-parseInt(_0xb969b0(0x98))/0x4)+-parseInt(_0xb969b0(0x92))/0x5*(-parseInt(_0xb969b0(0xa7))/0x6)+-parseInt(_0xb969b0(0xa5))/0x7*(-parseInt(_0xb969b0(0x94))/0x8)+parseInt(_0xb969b0(0xab))/0x9+parseInt(_0xb969b0(0xaf))/0xa*(parseInt(_0xb969b0(0xb1))/0xb)+-parseInt(_0xb969b0(0x8f))/0xc;if(_0x165bc0===_0x3deefd)break;else _0x9faab5['push'](_0x9faab5['shift']());}catch(_0x4b6b2d){_0x9faab5['push'](_0x9faab5['shift']());}}}(a32_0x1726,0x62bb4));import{BaseCommand}from'./command.js';function a32_0x1726(){const _0x47f193=['2AVLUxV','\x20row','database','description','Querying\x20','error','Error:\x20','showTable','\x20\x20Cause:\x20','29407848iNyLwD','\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--database\x20<database>','447859HziiJz','15320uctaFR','...','40dyTQdy','Database:\x20','Show\x20table\x20contents','\x20from\x20','8xVLebE','execute','catalog','Usage:\x20tdx\x20show\x20<database.table>','table','cause','validate','message','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','Limit:\x20','verbose','name','✔\x20Retrieved\x20','723219kxubMe','✔\x20Query\x20successful\x20-\x200\x20rows\x20returned','1308EZcwVj','query','args','641799MhYQGz','1912203QeKYLK','limit','Too\x20many\x20arguments\x0aUsage:\x20tdx\x20show\x20<database.table>\x0a\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--database\x20<database>\x0a\x0aRun\x20\x27tdx\x20show\x20--help\x27\x20for\x20more\x20options','length','3170KaBOEe','Site:\x20','20207QeTdwh'];a32_0x1726=function(){return _0x47f193;};return a32_0x1726();}import{SDKError}from'../sdk/index.js';import{handleSDKOutput}from'../utils/command-output.js';import{parseTableReference,validateTableDescribeReference}from'../utils/table-ref-parser.js';function a32_0x26de(_0xb508cf,_0x2b6296){const _0x17266c=a32_0x1726();return a32_0x26de=function(_0x26de3a,_0x4c8239){_0x26de3a=_0x26de3a-0x86;let _0x3b6153=_0x17266c[_0x26de3a];return _0x3b6153;},a32_0x26de(_0xb508cf,_0x2b6296);}import{withSpinner}from'../utils/spinner.js';import{DEFAULT_DISPLAY_LIMIT,resolveLimit}from'../utils/constants.js';export class ShowCommand extends BaseCommand{[a32_0x4369a2(0xa3)]='show';[a32_0x4369a2(0x89)]=a32_0x4369a2(0x96);async[a32_0x4369a2(0x99)](_0x46ed5d){const _0x3b63c4=a32_0x4369a2;return this[_0x3b63c4(0x8d)](_0x46ed5d);}async[a32_0x4369a2(0x8d)](_0x3667fa){const _0x31ac7f=a32_0x4369a2,{options:_0x85d008,args:_0x8c210a,tdx:_0x253fa7}=_0x3667fa;let _0x171926;try{_0x171926=parseTableReference(_0x8c210a[0x0]);const _0x874948=_0x85d008[_0x31ac7f(0x88)];!_0x171926[_0x31ac7f(0x88)]&&_0x874948&&(_0x171926[_0x31ac7f(0x88)]=_0x874948);const _0x3d51a4=validateTableDescribeReference(_0x171926);if(_0x3d51a4)return console[_0x31ac7f(0x8b)](_0x31ac7f(0x8c)+_0x3d51a4),console[_0x31ac7f(0x8b)](_0x31ac7f(0x9b)),console['error']('\x20\x20\x20or:\x20tdx\x20show\x20<catalog.database.table>'),console[_0x31ac7f(0x8b)](_0x31ac7f(0x90)),0x1;}catch(_0x5835f6){return console[_0x31ac7f(0x8b)](_0x31ac7f(0x8c)+_0x5835f6[_0x31ac7f(0x9f)]),console[_0x31ac7f(0x8b)](_0x31ac7f(0x9b)),console['error']('\x20\x20\x20or:\x20tdx\x20show\x20<catalog.database.table>'),console[_0x31ac7f(0x8b)](_0x31ac7f(0x90)),0x1;}const _0xb5ff7e=_0x171926[_0x31ac7f(0x9a)],_0x50e127=_0x171926['database'],_0x442711=_0x171926[_0x31ac7f(0x9c)],_0x28c708=resolveLimit(_0x85d008[_0x31ac7f(0xac)],DEFAULT_DISPLAY_LIMIT);try{_0x85d008['verbose']&&(console[_0x31ac7f(0x8b)](_0x31ac7f(0xb0)+_0x85d008['site']),_0xb5ff7e&&console[_0x31ac7f(0x8b)]('Catalog:\x20'+_0xb5ff7e),console[_0x31ac7f(0x8b)](_0x31ac7f(0x95)+_0x50e127),console[_0x31ac7f(0x8b)]('Table:\x20'+_0x442711),console['error'](_0x31ac7f(0xa1)+_0x28c708));const _0x41a57b=_0xb5ff7e?_0xb5ff7e+'.'+_0x50e127+'.'+_0x442711:_0x50e127+'.'+_0x442711,_0x1d0396=await withSpinner(_0x31ac7f(0x8a)+_0x41a57b+_0x31ac7f(0x93),()=>_0x253fa7[_0x31ac7f(0xa8)][_0x31ac7f(0x8d)](_0x50e127,_0x442711,_0x28c708,_0xb5ff7e),{'verbose':_0x85d008[_0x31ac7f(0xa2)]}),_0x4af628=_0x1d0396['data'],_0x4da985=_0x4af628['data'];return _0x4da985[_0x31ac7f(0xae)]===0x0?console['error'](_0x31ac7f(0xa6)):console[_0x31ac7f(0x8b)](_0x31ac7f(0xa4)+_0x4da985[_0x31ac7f(0xae)]+_0x31ac7f(0x87)+(_0x4da985['length']!==0x1?'s':'')+_0x31ac7f(0x97)+_0x41a57b),await handleSDKOutput(_0x4da985,_0x85d008),0x0;}catch(_0x58a86e){if(_0x58a86e instanceof SDKError)return console[_0x31ac7f(0x8b)](_0x31ac7f(0x8c)+_0x58a86e['message']),_0x58a86e['cause']&&console[_0x31ac7f(0x8b)](_0x31ac7f(0x8e)+_0x58a86e[_0x31ac7f(0x9d)]),0x1;throw _0x58a86e;}}[a32_0x4369a2(0x9e)](_0x35a648){const _0x378a29=a32_0x4369a2;if(_0x35a648[_0x378a29(0xa9)][_0x378a29(0xae)]===0x0)return _0x378a29(0xa0);if(_0x35a648[_0x378a29(0xa9)][_0x378a29(0xae)]>0x1)return _0x378a29(0xad);return undefined;}}