@treasuredata/tdx 0.4.5 → 0.4.6

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 (88) 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.js +1 -1
  17. package/dist/commands/command.js +1 -1
  18. package/dist/commands/context-command.js +1 -1
  19. package/dist/commands/databases.js +1 -1
  20. package/dist/commands/describe.js +1 -1
  21. package/dist/commands/engage-command.js +1 -1
  22. package/dist/commands/job-command.js +1 -1
  23. package/dist/commands/llm-command.js +1 -1
  24. package/dist/commands/llm-proxy.js +1 -1
  25. package/dist/commands/parent-segment-command.js +1 -1
  26. package/dist/commands/profiles-command.js +1 -1
  27. package/dist/commands/query-command.js +1 -1
  28. package/dist/commands/segment-command.js +1 -1
  29. package/dist/commands/segment-create-command.js +1 -1
  30. package/dist/commands/segment-fields-command.js +1 -1
  31. package/dist/commands/segment-pwd-command.js +1 -1
  32. package/dist/commands/segment-update-command.js +1 -1
  33. package/dist/commands/segment-use-command.js +1 -1
  34. package/dist/commands/segments.js +1 -1
  35. package/dist/commands/show.js +1 -1
  36. package/dist/commands/tables.js +1 -1
  37. package/dist/commands/use-command.js +1 -1
  38. package/dist/commands/workflow-command.js +1 -1
  39. package/dist/core/auth.js +1 -1
  40. package/dist/core/config.js +1 -1
  41. package/dist/core/credential-cache.js +1 -1
  42. package/dist/core/global-context.js +1 -1
  43. package/dist/core/keychain.js +1 -1
  44. package/dist/core/profile.js +1 -1
  45. package/dist/core/project-config.js +1 -1
  46. package/dist/core/session.js +1 -1
  47. package/dist/index.js +1 -1
  48. package/dist/proxy/anthropic-adapter.js +1 -1
  49. package/dist/proxy/server.js +1 -1
  50. package/dist/proxy/session-cache.js +1 -1
  51. package/dist/sdk/api.js +1 -1
  52. package/dist/sdk/engage.js +1 -1
  53. package/dist/sdk/errors.js +1 -1
  54. package/dist/sdk/index.js +1 -1
  55. package/dist/sdk/job.js +1 -1
  56. package/dist/sdk/llm.js +1 -1
  57. package/dist/sdk/query.js +1 -1
  58. package/dist/sdk/segment.js +1 -1
  59. package/dist/sdk/workflow.js +1 -1
  60. package/dist/types/endpoints.js +1 -1
  61. package/dist/types/index.js +1 -1
  62. package/dist/utils/agent-ref-parser.js +1 -1
  63. package/dist/utils/chat-cache.js +1 -1
  64. package/dist/utils/colors.js +1 -1
  65. package/dist/utils/command-output.js +1 -1
  66. package/dist/utils/constants.js +1 -1
  67. package/dist/utils/file-permissions.js +1 -1
  68. package/dist/utils/format-detector.js +1 -1
  69. package/dist/utils/formatters.js +1 -1
  70. package/dist/utils/json-loader.js +1 -1
  71. package/dist/utils/llm-backup-utils.js +1 -1
  72. package/dist/utils/model-aliases.js +1 -1
  73. package/dist/utils/option-validation.js +1 -1
  74. package/dist/utils/port.js +1 -1
  75. package/dist/utils/process.js +1 -1
  76. package/dist/utils/prompt.js +1 -1
  77. package/dist/utils/segment-path-parser.js +1 -1
  78. package/dist/utils/segment-ref-parser.js +1 -1
  79. package/dist/utils/spinner.js +1 -1
  80. package/dist/utils/sql-parser.js +1 -1
  81. package/dist/utils/sse-parser.js +1 -1
  82. package/dist/utils/string-utils.js +1 -1
  83. package/dist/utils/table-ref-parser.js +1 -1
  84. package/dist/utils/tdx-logger.js +1 -1
  85. package/dist/utils/tree-formatter.js +1 -1
  86. package/dist/utils/version-check.js +1 -1
  87. package/dist/utils/workflow-utils.js +1 -1
  88. package/package.json +1 -1
@@ -1 +1 @@
1
- const a24_0x5d2fc6=a24_0x1b00;function a24_0x1b00(_0x1ee25e,_0x314001){const _0x587708=a24_0x5877();return a24_0x1b00=function(_0x1b0002,_0x5bc754){_0x1b0002=_0x1b0002-0xaf;let _0x229aff=_0x587708[_0x1b0002];return _0x229aff;},a24_0x1b00(_0x1ee25e,_0x314001);}(function(_0x536666,_0x47977f){const _0x1b3127=a24_0x1b00,_0x309d77=_0x536666();while(!![]){try{const _0x33024f=parseInt(_0x1b3127(0xd9))/0x1*(parseInt(_0x1b3127(0xc1))/0x2)+-parseInt(_0x1b3127(0xd7))/0x3+parseInt(_0x1b3127(0xc3))/0x4*(parseInt(_0x1b3127(0xb7))/0x5)+parseInt(_0x1b3127(0xd4))/0x6+parseInt(_0x1b3127(0xca))/0x7+parseInt(_0x1b3127(0xe0))/0x8*(parseInt(_0x1b3127(0xd6))/0x9)+-parseInt(_0x1b3127(0xb1))/0xa*(parseInt(_0x1b3127(0xbf))/0xb);if(_0x33024f===_0x47977f)break;else _0x309d77['push'](_0x309d77['shift']());}catch(_0x1fbd7f){_0x309d77['push'](_0x309d77['shift']());}}}(a24_0x5877,0x81bfe));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';function a24_0x5877(){const _0x5afb20=['information_schema','3687576LAzqSj','query','state','Error:\x20','5590zAKZsx','file','jobId','\x20[Job\x20ID:\x20','error','Schema:\x20','4509705UhSUKN','processedRows','Executing\x20query\x20[','database','name','verbose','message','setExtra','43483tTjukx','elapsedTimeMillis','1975882AFNuAu','originalMessage','4HkSikZ','\x20splits','description','\x20rows\x20','Executing\x20query...','output','\x0aAll\x20results\x20saved\x20to\x20','4591524AORgPF','Cannot\x20specify\x20both\x20SQL\x20argument\x20and\x20--file\x20option','args','\x20-\x20','join','Query\x20completed:\x20Processed\x20','validate','Statement\x20','options','data','471618zYFcau','site','9PVSdHr','1032549GPyVia','completedSplits','1FhYLRI','push','length','Site:\x20','stats','setJobId'];a24_0x5877=function(){return _0x5afb20;};return a24_0x5877();}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{[a24_0x5d2fc6(0xbb)]=a24_0x5d2fc6(0xe1);[a24_0x5d2fc6(0xc5)]='Run\x20Trino\x20queries\x20(streaming)';async['execute'](_0x360ba9){const _0x1b7c82=a24_0x5d2fc6,{options:_0x3d76e7,args:_0x558ec6,tdx:_0xbee988}=_0x360ba9,_0x274569=_0x558ec6[0x0],_0x4d464c=_0x3d76e7['file'];let _0x6b21d9;if(_0x4d464c)try{_0x6b21d9=readSqlStatementsFromFile(_0x4d464c);}catch(_0x1992af){return console[_0x1b7c82(0xb5)]('Error:\x20'+_0x1992af[_0x1b7c82(0xbd)]),0x1;}else try{_0x6b21d9=splitSqlStatements(_0x274569);}catch(_0x217dd4){return console['error'](_0x1b7c82(0xb0)+_0x217dd4['message']),0x1;}const _0x24ef0e=_0x3d76e7[_0x1b7c82(0xba)]||_0x1b7c82(0xdf),_0x2db84a=_0x3d76e7['catalog'];try{const _0x167e7e=[],_0x377a4c=!!_0x3d76e7[_0x1b7c82(0xc8)];for(let _0x230bf5=0x0;_0x230bf5<_0x6b21d9[_0x1b7c82(0xdb)];_0x230bf5++){const _0x213f10=_0x6b21d9[_0x230bf5],_0x9b4fd6=_0x230bf5+0x1,_0x3461db=_0x6b21d9['length'],_0xb79fa=_0x3461db>0x1;_0x3d76e7[_0x1b7c82(0xbc)]&&(console[_0x1b7c82(0xb5)]('\x0a'+(_0xb79fa?_0x1b7c82(0xd1)+_0x9b4fd6+'/'+_0x3461db+':':'')),console[_0x1b7c82(0xb5)](_0x1b7c82(0xdc)+_0x3d76e7[_0x1b7c82(0xd5)]),console['error']('Catalog:\x20'+(_0x2db84a||'td')),console['error'](_0x1b7c82(0xb6)+_0x24ef0e),console['error']('SQL:\x20'+_0x213f10));const _0x330c2b=_0xb79fa?'Executing\x20statement\x20'+_0x9b4fd6+'/'+_0x3461db+'...':_0x1b7c82(0xc7);try{const _0x43c712=await withQuerySpinner(_0x330c2b,async _0x13ebd6=>{const _0xabc58b=_0x1b7c82,_0x559451=await _0xbee988[_0xabc58b(0xe1)]['execute'](_0x213f10,{'catalog':_0x2db84a,'schema':_0x24ef0e,'onJobId':_0x261d83=>{const _0x577102=_0xabc58b;_0x13ebd6[_0x577102(0xde)](_0x261d83);},'onProgress':_0x23375e=>{const _0x344db3=_0xabc58b;_0x13ebd6['setPhase'](_0x344db3(0xb9)+_0x23375e[_0x344db3(0xaf)]+']'),_0x13ebd6[_0x344db3(0xbe)](formatRows(_0x23375e[_0x344db3(0xb8)])+'\x20rows\x20'+_0x23375e[_0x344db3(0xd8)]+'/'+_0x23375e['totalSplits']+_0x344db3(0xc4));}});return _0x559451;},{'verbose':_0x3d76e7[_0x1b7c82(0xbc)]}),_0x5de81c=_0x43c712[_0x1b7c82(0xd3)],_0x222119=_0x5de81c[_0x1b7c82(0xb3)]?_0x1b7c82(0xb4)+_0x5de81c[_0x1b7c82(0xb3)]+']':'',_0x38dafc=_0xb79fa?_0x1b7c82(0xd1)+_0x9b4fd6+'/'+_0x3461db+_0x1b7c82(0xcd):'';console[_0x1b7c82(0xb5)]('✔\x20'+_0x38dafc+_0x1b7c82(0xcf)+formatRows(_0x5de81c['stats'][_0x1b7c82(0xb8)])+_0x1b7c82(0xc6)+('in\x20'+formatElapsed(_0x5de81c[_0x1b7c82(0xdd)][_0x1b7c82(0xc0)])+_0x222119));if(_0xb79fa&&_0x377a4c){const _0x43e04b=resolveOutputOptions(_0x3d76e7),_0x415449=await formatQueryOutput(_0x5de81c,_0x43e04b);_0x167e7e[_0x1b7c82(0xda)](_0x415449);}else await handleQueryOutput(_0x5de81c,_0x3d76e7);}catch(_0x3c4e58){const _0x167cce=_0xb79fa?_0x1b7c82(0xd1)+_0x9b4fd6+'/'+_0x3461db+':\x0a':'',_0x27df0c=_0x3c4e58 instanceof SDKError?_0x3c4e58[_0x1b7c82(0xc2)]:_0x3c4e58[_0x1b7c82(0xbd)];return console[_0x1b7c82(0xb5)](''+_0x167cce+_0x27df0c),0x1;}}if(_0x6b21d9[_0x1b7c82(0xdb)]>0x1&&_0x377a4c&&_0x167e7e[_0x1b7c82(0xdb)]>0x0){const _0xfb328e=_0x167e7e[_0x1b7c82(0xce)]('\x0a');writeFileSync(_0x3d76e7['output'],_0xfb328e),console[_0x1b7c82(0xb5)](_0x1b7c82(0xc9)+_0x3d76e7['output']);}return 0x0;}catch(_0x2ec349){throw _0x2ec349;}}[a24_0x5d2fc6(0xd0)](_0x59dc21){const _0x37dd2d=a24_0x5d2fc6,_0x3f5271=_0x59dc21[_0x37dd2d(0xcc)][0x0],_0x1dfbd4=_0x59dc21[_0x37dd2d(0xd2)][_0x37dd2d(0xb2)];if(!_0x3f5271&&!_0x1dfbd4)return'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';if(_0x3f5271&&_0x1dfbd4)return _0x37dd2d(0xcb);return undefined;}}
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 +1 @@
1
- function a25_0x6f8b(){const _0x475cc4=['error','\x27\x20with\x20ID:\x20','Segment\x20ID\x20missing\x20from\x20resolved\x20path','SELECT\x20*\x20FROM\x20(\x0a','getParent','Examples:','Resolving\x20parent\x20folder\x20\x27','Listing\x20folders\x20for\x20parent\x20\x27','folderId','Error:\x20Segment\x20path\x20or\x20name\x20is\x20required','Usage:\x20tdx\x20segment\x20show\x20<path>','\x20rows\x20','Error:\x20','cause','4VCaAJM','log','Fetching\x20folder\x20details...','Error:\x20Folder\x20name\x20is\x20required\x20(use\x20parent_name/folder_name\x20format)','name','parentFolder','INTERNAL','Resolving\x20parent\x20segment\x20\x27','segmentPath','getSegment','format','parent','folder','Site:\x20','type','\x20\x20tdx\x20segment\x20show\x20\x22High\x20Value\x22\x20\x20\x20\x20#\x20Relative\x20to\x20current\x20context','getSegmentSQL','4nsDItI','Executing\x20segment\x20query...','\x27...','Parent\x20segment:\x20','execute','length','Show\x20segment\x20folder\x20details','listFolders','resolvePathToResource','trim','Usage:\x20tdx\x20segment\x20sql\x20<path>','Usage:\x20tdx\x20segment\x20folder\x20list\x20<parent_name>','\x20\x20Or\x20set\x20context:\x20tdx\x20use\x20parent_segment\x20<name>','json','✖\x20Query\x20failed\x20[','segment:folder:list','178407UUqJBb','Error:\x20Folder\x20reference\x20is\x20required','Resolved\x20type:\x20','segmentId','4911080kYQcPh','parentId','Error:\x20Parent\x20segment\x20name\x20is\x20required','site','Fetching\x20folder\x20\x27','jobId','\x20\x20tdx\x20segment\x20sql\x20\x22My\x20Audience/Marketing/High\x20Value\x22','elapsedTimeMillis','in\x20','✔\x20Found\x20','Creating\x20folder\x20\x27','segment','✔\x20Query\x20completed:\x20Processed\x20','replace','description','Show\x20segment\x20or\x20folder\x20details','Folder\x20ID:\x20','query','507085wQRyXX','21197946YqHZEO','2466600shmbEi','\x20\x20tdx\x20segment\x20sql\x20\x22High\x20Value\x22\x20\x20\x20\x20#\x20Relative\x20to\x20current\x20context','jsonl','segment:folder:create','Fetching\x20parent\x20segment\x20details...','verbose','✔\x20Created\x20folder\x20\x27','resolveFolderId','processedRows','message','Fetching\x20SQL\x20for\x20segment...','createFolder','\x20\x20tdx\x20segment\x20describe\x20\x22My\x20Audience/Marketing/High\x20Value\x22','Error:\x20Cannot\x20get\x20SQL\x20query\x20for\x20a\x20folder.','Error:\x20Path\x20or\x20name\x20is\x20required','Folders\x20are\x20organizational\x20containers,\x20not\x20queryable\x20segments.','1031859uMEnZJ','Resolving\x20path\x20\x27','60893YBbIYY','\x20\x20tdx\x20segment\x20show\x20\x22My\x20Audience/Marketing/High\x20Value\x22','segment:describe','248zckXGY','Get\x20SQL\x20query\x20for\x20parent\x20or\x20child\x20segment','\x20\x20tdx\x20segment\x20sql\x20\x22My\x20Audience\x22','includes','getFolder','Resolved\x20relative\x20path\x20to:\x20','code','Usage:\x20tdx\x20segment\x20describe\x20<path>','Parent\x20name:\x20','\x20\x20tdx\x20segment\x20describe\x20\x22High\x20Value\x22\x20\x20\x20\x20#\x20Relative\x20to\x20current\x20context','84dyxcZH','parentSegment','data','\x20\x20tdx\x20segment\x20describe\x20\x22My\x20Audience\x22','test','\x20\x20Cause:\x20','Parent\x20ID:\x20','limit','Usage:\x20tdx\x20segment\x20folder\x20show\x20<parent_name/folder_name>','information_schema','Resolved\x20parent\x20ID:\x20','getParentSQL','Error:\x20Parent\x20segment\x20name\x20and\x20folder\x20name\x20are\x20required','resolveParentId','Resolved\x20folder\x20ID:\x20','Resolving\x20folder\x20\x27','Error:\x20Cannot\x20execute\x20SQL\x20query\x20on\x20a\x20folder.','setJobId'];a25_0x6f8b=function(){return _0x475cc4;};return a25_0x6f8b();}const a25_0x15c124=a25_0x3915;(function(_0x1edfa0,_0x4334d2){const _0x28cd45=a25_0x3915,_0x216b98=_0x1edfa0();while(!![]){try{const _0x42df5b=-parseInt(_0x28cd45(0xcd))/0x1*(-parseInt(_0x28cd45(0x11f))/0x2)+parseInt(_0x28cd45(0xdf))/0x3+-parseInt(_0x28cd45(0x10e))/0x4*(-parseInt(_0x28cd45(0x133))/0x5)+parseInt(_0x28cd45(0xee))/0x6*(-parseInt(_0x28cd45(0xe1))/0x7)+-parseInt(_0x28cd45(0xe4))/0x8*(-parseInt(_0x28cd45(0x12f))/0x9)+-parseInt(_0x28cd45(0xcf))/0xa+-parseInt(_0x28cd45(0xce))/0xb;if(_0x42df5b===_0x4334d2)break;else _0x216b98['push'](_0x216b98['shift']());}catch(_0x2bf282){_0x216b98['push'](_0x216b98['shift']());}}}(a25_0x6f8b,0xa0f78));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';function a25_0x3915(_0x185223,_0x399166){const _0x6f8b7d=a25_0x6f8b();return a25_0x3915=function(_0x3915ad,_0x5cde36){_0x3915ad=_0x3915ad-0xc5;let _0x158695=_0x6f8b7d[_0x3915ad];return _0x158695;},a25_0x3915(_0x185223,_0x399166);}export class SegmentDescribeCommand extends BaseCommand{[a25_0x15c124(0x112)]=a25_0x15c124(0xe3);[a25_0x15c124(0xc9)]=a25_0x15c124(0xca);async[a25_0x15c124(0x123)](_0x239716){const _0x3dac85=a25_0x15c124,{options:_0x315d08,args:_0xf898f0,tdx:_0x2ec315}=_0x239716,_0x5b9330=_0xf898f0[0x0],_0x548f7c=!_0x5b9330&&!!_0x315d08['parentSegment'],_0x380002=_0x5b9330||_0x315d08[_0x3dac85(0xef)];if(!_0x380002)return console['error'](_0x3dac85(0xdd)),console[_0x3dac85(0x100)](_0x3dac85(0xeb)),console[_0x3dac85(0x100)](_0x3dac85(0x105)),console[_0x3dac85(0x100)](_0x3dac85(0xf1)),console[_0x3dac85(0x100)](_0x3dac85(0xdb)),console[_0x3dac85(0x100)](_0x3dac85(0xed)),console[_0x3dac85(0x100)](_0x3dac85(0x12b)),0x1;try{const _0x3b342e=_0x315d08[_0x3dac85(0x116)];let _0xb1d3af=_0x380002;!_0x548f7c&&_0x3b342e&&!_0x380002[_0x3dac85(0xe7)]('/')&&(_0xb1d3af=_0x3b342e+'/'+_0x380002,_0x315d08[_0x3dac85(0xd4)]&&console[_0x3dac85(0x100)]('Resolved\x20relative\x20path\x20to:\x20'+_0xb1d3af));const _0xbeacd6=await withSpinner(_0x3dac85(0xe0)+_0xb1d3af+_0x3dac85(0x121),()=>_0x2ec315[_0x3dac85(0xc6)][_0x3dac85(0x127)](_0xb1d3af),{'verbose':_0x315d08['verbose']}),_0x50f256=_0xbeacd6[_0x3dac85(0xf0)];_0x315d08[_0x3dac85(0xd4)]&&(console[_0x3dac85(0x100)](_0x3dac85(0x131)+_0x50f256[_0x3dac85(0x11c)]),console['error']('Parent\x20ID:\x20'+_0x50f256['parentId']),_0x50f256['folderId']&&console[_0x3dac85(0x100)](_0x3dac85(0xcb)+_0x50f256[_0x3dac85(0x108)]),_0x50f256[_0x3dac85(0x132)]&&console[_0x3dac85(0x100)]('Segment\x20ID:\x20'+_0x50f256[_0x3dac85(0x132)]));if(_0x50f256[_0x3dac85(0x11c)]==='parent'){const _0x50a450=await withSpinner(_0x3dac85(0xd3),()=>_0x2ec315[_0x3dac85(0xc6)][_0x3dac85(0x104)](_0x50f256[_0x3dac85(0x134)]),{'verbose':_0x315d08[_0x3dac85(0xd4)]});await handleSingleObjectOutput(_0x50a450[_0x3dac85(0xf0)],_0x315d08);}else{if(_0x50f256[_0x3dac85(0x11c)]===_0x3dac85(0x11a)){if(!_0x50f256[_0x3dac85(0x108)])throw new SDKError(ErrorCode[_0x3dac85(0x114)],'Folder\x20ID\x20missing\x20from\x20resolved\x20path');const _0x3e6086=await withSpinner(_0x3dac85(0x110),()=>_0x2ec315[_0x3dac85(0xc6)][_0x3dac85(0xe8)](_0x50f256[_0x3dac85(0x108)]),{'verbose':_0x315d08[_0x3dac85(0xd4)]});await handleSingleObjectOutput(_0x3e6086[_0x3dac85(0xf0)],_0x315d08);}else{if(_0x50f256[_0x3dac85(0x11c)]===_0x3dac85(0xc6)){if(!_0x50f256[_0x3dac85(0x132)])throw new SDKError(ErrorCode[_0x3dac85(0x114)],_0x3dac85(0x102));const _0x3aba0b=await withSpinner('Fetching\x20segment\x20details...',()=>_0x2ec315[_0x3dac85(0xc6)][_0x3dac85(0x117)](_0x50f256['parentId'],_0x50f256[_0x3dac85(0x132)]),{'verbose':_0x315d08[_0x3dac85(0xd4)]});await handleSingleObjectOutput(_0x3aba0b[_0x3dac85(0xf0)],_0x315d08);}}}return 0x0;}catch(_0x7eb1a6){if(_0x7eb1a6 instanceof SDKError)return console[_0x3dac85(0x100)](_0x3dac85(0x10c)+_0x7eb1a6[_0x3dac85(0xd8)]),_0x7eb1a6[_0x3dac85(0x10d)]&&console[_0x3dac85(0x100)](_0x3dac85(0xf3)+_0x7eb1a6[_0x3dac85(0x10d)]),0x1;throw _0x7eb1a6;}}}export class SegmentShowCommand extends BaseCommand{['name']='segment:show';[a25_0x15c124(0xc9)]='Execute\x20segment\x20SQL\x20query\x20and\x20show\x20results';async[a25_0x15c124(0x123)](_0x38d1d8){const _0x4e7b1d=a25_0x15c124,{options:_0x233f15,args:_0x28a870,tdx:_0x540aeb}=_0x38d1d8,_0x23ba64=_0x28a870[0x0],_0x20c89a=!_0x23ba64&&!!_0x233f15[_0x4e7b1d(0xef)],_0x287ffb=_0x23ba64||_0x233f15['parentSegment'];if(!_0x287ffb)return console[_0x4e7b1d(0x100)](_0x4e7b1d(0x109)),console[_0x4e7b1d(0x100)](_0x4e7b1d(0x10a)),console[_0x4e7b1d(0x100)](_0x4e7b1d(0x105)),console[_0x4e7b1d(0x100)]('\x20\x20tdx\x20segment\x20show\x20\x22My\x20Audience\x22'),console[_0x4e7b1d(0x100)](_0x4e7b1d(0xe2)),console[_0x4e7b1d(0x100)](_0x4e7b1d(0x11d)),console[_0x4e7b1d(0x100)]('\x20\x20Or\x20set\x20context:\x20tdx\x20use\x20parent_segment\x20<name>'),0x1;try{const _0x36d5a3=_0x233f15[_0x4e7b1d(0x116)];let _0x1e9dc4=_0x287ffb;!_0x20c89a&&_0x36d5a3&&!_0x287ffb[_0x4e7b1d(0xe7)]('/')&&(_0x1e9dc4=_0x36d5a3+'/'+_0x287ffb,_0x233f15[_0x4e7b1d(0xd4)]&&console[_0x4e7b1d(0x100)](_0x4e7b1d(0xe9)+_0x1e9dc4));const _0x197d99=await withSpinner(_0x4e7b1d(0xe0)+_0x1e9dc4+_0x4e7b1d(0x121),()=>_0x540aeb['segment'][_0x4e7b1d(0x127)](_0x1e9dc4),{'verbose':_0x233f15['verbose']}),_0xe0b1bb=_0x197d99[_0x4e7b1d(0xf0)];_0x233f15[_0x4e7b1d(0xd4)]&&(console['error'](_0x4e7b1d(0x131)+_0xe0b1bb[_0x4e7b1d(0x11c)]),console['error'](_0x4e7b1d(0xf4)+_0xe0b1bb[_0x4e7b1d(0x134)]));if(_0xe0b1bb[_0x4e7b1d(0x11c)]===_0x4e7b1d(0x11a))return console[_0x4e7b1d(0x100)](_0x4e7b1d(0xfe)),console['error']('Use:\x20tdx\x20segment\x20describe\x20<path>\x20\x20#\x20To\x20show\x20folder\x20details'),0x1;let _0x324610;if(_0xe0b1bb[_0x4e7b1d(0x11c)]===_0x4e7b1d(0x119)){const _0x518dfc=await withSpinner('Fetching\x20SQL\x20for\x20parent\x20segment...',()=>_0x540aeb[_0x4e7b1d(0xc6)][_0x4e7b1d(0xf9)](_0xe0b1bb[_0x4e7b1d(0x134)]),{'verbose':_0x233f15[_0x4e7b1d(0xd4)]});_0x324610=_0x518dfc[_0x4e7b1d(0xf0)];}else{if(!_0xe0b1bb[_0x4e7b1d(0x132)])throw new SDKError(ErrorCode[_0x4e7b1d(0x114)],_0x4e7b1d(0x102));const _0x234910=await withSpinner(_0x4e7b1d(0xd9),()=>_0x540aeb[_0x4e7b1d(0xc6)][_0x4e7b1d(0x11e)](_0xe0b1bb[_0x4e7b1d(0x134)],_0xe0b1bb['segmentId']),{'verbose':_0x233f15[_0x4e7b1d(0xd4)]});_0x324610=_0x234910[_0x4e7b1d(0xf0)];}const _0x39f23f=resolveLimit(_0x233f15[_0x4e7b1d(0xf5)],DEFAULT_DISPLAY_LIMIT),_0x4051c4=/\bLIMIT\s+\d+/i[_0x4e7b1d(0xf2)](_0x324610);!_0x4051c4&&(_0x324610=_0x324610[_0x4e7b1d(0x128)]()[_0x4e7b1d(0xc8)](/;+$/,''),_0x324610=_0x4e7b1d(0x103)+_0x324610+'\x0a)\x20AS\x20segment_query\x0aLIMIT\x20'+_0x39f23f);_0x233f15[_0x4e7b1d(0xd4)]&&console['error']('SQL\x20query:\x0a'+_0x324610);const _0x45cd9d=await withQuerySpinner(_0x4e7b1d(0x120),async _0x561463=>{const _0x5b7fac=_0x4e7b1d,_0x40fb20=await _0x540aeb[_0x5b7fac(0xcc)]['execute'](_0x324610,{'catalog':'td','schema':_0x5b7fac(0xf7),'onJobId':_0x1006e9=>{const _0x1f9583=_0x5b7fac;_0x561463[_0x1f9583(0xff)](_0x1006e9);}});return _0x40fb20;},{'verbose':_0x233f15['verbose']}),_0x14897f=_0x45cd9d['data'],_0x429f12=_0x14897f[_0x4e7b1d(0x138)]?'\x20[Job\x20ID:\x20'+_0x14897f['jobId']+']':'';return console[_0x4e7b1d(0x100)](_0x4e7b1d(0xc7)+_0x14897f['stats'][_0x4e7b1d(0xd7)]['toLocaleString']()+_0x4e7b1d(0x10b)+(_0x4e7b1d(0x13b)+formatElapsed(_0x14897f['stats'][_0x4e7b1d(0x13a)])+_0x429f12)),await handleQueryOutput(_0x14897f,_0x233f15),0x0;}catch(_0x564381){if(_0x564381 instanceof SDKError)return console[_0x4e7b1d(0x100)](_0x4e7b1d(0x12d)+_0x564381[_0x4e7b1d(0xea)]+']'),console[_0x4e7b1d(0x100)]('\x0a'+_0x564381['message']),0x1;throw _0x564381;}}}export class SegmentFolderListCommand extends BaseCommand{[a25_0x15c124(0x112)]=a25_0x15c124(0x12e);['description']='List\x20segment\x20folders\x20under\x20a\x20parent\x20segment';async[a25_0x15c124(0x123)](_0x579ac5){const _0x5393a6=a25_0x15c124,{options:_0x60c820,args:_0x4a5820,tdx:_0x37dfba}=_0x579ac5;if(_0x4a5820[_0x5393a6(0x124)]===0x0)return console[_0x5393a6(0x100)](_0x5393a6(0x135)),console['error'](_0x5393a6(0x12a)),0x1;const _0x3ab948=_0x4a5820[0x0];try{_0x60c820['verbose']&&(console['error'](_0x5393a6(0x11b)+_0x60c820['site']),console[_0x5393a6(0x100)](_0x5393a6(0xec)+_0x3ab948));const _0x32520c=await withSpinner(_0x5393a6(0x115)+_0x3ab948+_0x5393a6(0x121),()=>_0x37dfba['segment'][_0x5393a6(0xfb)](_0x3ab948),{'verbose':_0x60c820[_0x5393a6(0xd4)]}),_0x3ca0a4=_0x32520c[_0x5393a6(0xf0)];_0x60c820[_0x5393a6(0xd4)]&&console[_0x5393a6(0x100)](_0x5393a6(0xf8)+_0x3ca0a4);const _0x14189a=await withSpinner(_0x5393a6(0x107)+_0x3ab948+_0x5393a6(0x121),()=>_0x37dfba['segment'][_0x5393a6(0x126)](_0x3ca0a4),{'verbose':_0x60c820[_0x5393a6(0xd4)]}),_0x301d0d=_0x14189a[_0x5393a6(0xf0)];return console[_0x5393a6(0x100)](_0x5393a6(0x13c)+_0x301d0d[_0x5393a6(0x124)]+'\x20folder'+(_0x301d0d[_0x5393a6(0x124)]!==0x1?'s':'')),await handleSDKOutput(_0x301d0d,_0x60c820),0x0;}catch(_0x3e1331){if(_0x3e1331 instanceof SDKError)return console['error'](_0x5393a6(0x10c)+_0x3e1331[_0x5393a6(0xd8)]),_0x3e1331[_0x5393a6(0x10d)]&&console['error'](_0x5393a6(0xf3)+_0x3e1331[_0x5393a6(0x10d)]),0x1;throw _0x3e1331;}}}export class SegmentFolderShowCommand extends BaseCommand{[a25_0x15c124(0x112)]='segment:folder:show';['description']=a25_0x15c124(0x125);async[a25_0x15c124(0x123)](_0x4d659e){const _0x223219=a25_0x15c124,{options:_0x54352b,args:_0x110592,tdx:_0x3a3941}=_0x4d659e;if(_0x110592[_0x223219(0x124)]===0x0)return console[_0x223219(0x100)](_0x223219(0x130)),console[_0x223219(0x100)](_0x223219(0xf6)),0x1;try{const {parentId:_0x59ae7c,childId:_0xfecd51}=parseSegmentRef(_0x110592[0x0]);_0x54352b[_0x223219(0xd4)]&&(console[_0x223219(0x100)]('Site:\x20'+_0x54352b[_0x223219(0x136)]),console['error'](_0x223219(0xec)+_0x59ae7c),_0xfecd51&&console[_0x223219(0x100)]('Folder\x20name:\x20'+_0xfecd51));if(!_0xfecd51)return console[_0x223219(0x100)](_0x223219(0x111)),0x1;const _0x1e3aa9=await withSpinner('Resolving\x20parent\x20segment\x20\x27'+_0x59ae7c+'\x27...',()=>_0x3a3941[_0x223219(0xc6)][_0x223219(0xfb)](_0x59ae7c),{'verbose':_0x54352b[_0x223219(0xd4)]}),_0x539f96=_0x1e3aa9[_0x223219(0xf0)];_0x54352b[_0x223219(0xd4)]&&console[_0x223219(0x100)](_0x223219(0xf8)+_0x539f96);const _0x147a71=await withSpinner(_0x223219(0xfd)+_0xfecd51+_0x223219(0x121),()=>_0x3a3941['segment'][_0x223219(0xd6)](_0x539f96,_0xfecd51),{'verbose':_0x54352b[_0x223219(0xd4)]}),_0x234923=_0x147a71['data'];_0x54352b[_0x223219(0xd4)]&&console[_0x223219(0x100)](_0x223219(0xfc)+_0x234923);const _0xa87699=await withSpinner(_0x223219(0x137)+_0xfecd51+_0x223219(0x121),()=>_0x3a3941[_0x223219(0xc6)][_0x223219(0xe8)](_0x234923),{'verbose':_0x54352b[_0x223219(0xd4)]});return await handleSDKOutput([_0xa87699[_0x223219(0xf0)]],_0x54352b),0x0;}catch(_0x393ed0){if(_0x393ed0 instanceof SDKError)return console['error']('Error:\x20'+_0x393ed0[_0x223219(0xd8)]),_0x393ed0[_0x223219(0x10d)]&&console['error'](_0x223219(0xf3)+_0x393ed0[_0x223219(0x10d)]),0x1;throw _0x393ed0;}}}export class SegmentSQLCommand extends BaseCommand{[a25_0x15c124(0x112)]='segment:sql';[a25_0x15c124(0xc9)]=a25_0x15c124(0xe5);async[a25_0x15c124(0x123)](_0x1db591){const _0x5d5c89=a25_0x15c124,{options:_0x11de56,args:_0x273500,tdx:_0x240785}=_0x1db591,_0x1575b7=_0x273500[0x0],_0x1c5001=!_0x1575b7&&!!_0x11de56[_0x5d5c89(0xef)],_0x392b42=_0x1575b7||_0x11de56[_0x5d5c89(0xef)];if(!_0x392b42)return console[_0x5d5c89(0x100)](_0x5d5c89(0x109)),console[_0x5d5c89(0x100)](_0x5d5c89(0x129)),console[_0x5d5c89(0x100)](_0x5d5c89(0x105)),console[_0x5d5c89(0x100)](_0x5d5c89(0xe6)),console[_0x5d5c89(0x100)](_0x5d5c89(0x139)),console[_0x5d5c89(0x100)](_0x5d5c89(0xd0)),console[_0x5d5c89(0x100)](_0x5d5c89(0x12b)),0x1;try{const _0x4715d5=_0x11de56[_0x5d5c89(0x116)];let _0x4718e6=_0x392b42;!_0x1c5001&&_0x4715d5&&!_0x392b42['includes']('/')&&(_0x4718e6=_0x4715d5+'/'+_0x392b42,_0x11de56['verbose']&&console[_0x5d5c89(0x100)](_0x5d5c89(0xe9)+_0x4718e6));const _0x75663b=await withSpinner(_0x5d5c89(0xe0)+_0x4718e6+_0x5d5c89(0x121),()=>_0x240785['segment'][_0x5d5c89(0x127)](_0x4718e6),{'verbose':_0x11de56[_0x5d5c89(0xd4)]}),_0x44198f=_0x75663b['data'];_0x11de56['verbose']&&(console[_0x5d5c89(0x100)](_0x5d5c89(0x131)+_0x44198f[_0x5d5c89(0x11c)]),console[_0x5d5c89(0x100)]('Parent\x20ID:\x20'+_0x44198f[_0x5d5c89(0x134)]));if(_0x44198f['type']===_0x5d5c89(0x11a))return console['error'](_0x5d5c89(0xdc)),console[_0x5d5c89(0x100)](_0x5d5c89(0xde)),0x1;let _0x3dfece;if(_0x44198f[_0x5d5c89(0x11c)]===_0x5d5c89(0x119)){const _0x3acb69=await withSpinner('Fetching\x20SQL\x20for\x20parent\x20segment...',()=>_0x240785['segment'][_0x5d5c89(0xf9)](_0x44198f['parentId']),{'verbose':_0x11de56['verbose']});_0x3dfece=_0x3acb69['data'];}else{if(!_0x44198f[_0x5d5c89(0x132)])throw new SDKError(ErrorCode['INTERNAL'],_0x5d5c89(0x102));const _0x5e2894=await withSpinner('Fetching\x20SQL\x20for\x20segment...',()=>_0x240785[_0x5d5c89(0xc6)][_0x5d5c89(0x11e)](_0x44198f[_0x5d5c89(0x134)],_0x44198f[_0x5d5c89(0x132)]),{'verbose':_0x11de56[_0x5d5c89(0xd4)]});_0x3dfece=_0x5e2894[_0x5d5c89(0xf0)];}return _0x11de56[_0x5d5c89(0x118)]===_0x5d5c89(0x12c)||_0x11de56[_0x5d5c89(0x118)]===_0x5d5c89(0xd1)?await handleSDKOutput([{'sql':_0x3dfece}],_0x11de56):console[_0x5d5c89(0x10f)](_0x3dfece),0x0;}catch(_0x9b1e02){if(_0x9b1e02 instanceof SDKError)return console[_0x5d5c89(0x100)](_0x5d5c89(0x10c)+_0x9b1e02[_0x5d5c89(0xd8)]),_0x9b1e02['cause']&&console[_0x5d5c89(0x100)]('\x20\x20Cause:\x20'+_0x9b1e02[_0x5d5c89(0x10d)]),0x1;throw _0x9b1e02;}}}export class SegmentFolderCreateCommand extends BaseCommand{[a25_0x15c124(0x112)]=a25_0x15c124(0xd2);['description']='Create\x20segment\x20folder\x20for\x20organization';async[a25_0x15c124(0x123)](_0x292458){const _0x4f9487=a25_0x15c124,{options:_0x302cfa,args:_0x473409,tdx:_0x2108fe}=_0x292458,_0x8b89f9=_0x302cfa;if(_0x473409[_0x4f9487(0x124)]<0x2)return console[_0x4f9487(0x100)](_0x4f9487(0xfa)),console[_0x4f9487(0x100)]('Usage:\x20tdx\x20segment\x20folder\x20create\x20<parent_name>\x20<folder_name>\x20[options]'),0x1;const _0x36ab76=_0x473409[0x0],_0x19be06=_0x473409[0x1];_0x8b89f9[_0x4f9487(0xd4)]&&(console[_0x4f9487(0x100)](_0x4f9487(0x11b)+_0x8b89f9[_0x4f9487(0x136)]),console[_0x4f9487(0x100)](_0x4f9487(0x122)+_0x36ab76),console['error']('Folder\x20name:\x20'+_0x19be06));let _0x2eefc4;if(_0x8b89f9['parentFolder']){const _0x34c054=_0x8b89f9[_0x4f9487(0x113)],_0x539e2e=await withSpinner(_0x4f9487(0x115)+_0x36ab76+_0x4f9487(0x121),()=>_0x2108fe[_0x4f9487(0xc6)]['resolveParentId'](_0x36ab76),{'verbose':_0x8b89f9[_0x4f9487(0xd4)]}),_0x2480f0=_0x539e2e[_0x4f9487(0xf0)],_0x4ba96a=await withSpinner(_0x4f9487(0x106)+_0x34c054+_0x4f9487(0x121),()=>_0x2108fe[_0x4f9487(0xc6)][_0x4f9487(0xd6)](_0x2480f0,_0x34c054),{'verbose':_0x8b89f9[_0x4f9487(0xd4)]});_0x2eefc4=_0x4ba96a['data'],_0x8b89f9[_0x4f9487(0xd4)]&&console[_0x4f9487(0x100)]('Resolved\x20parent\x20folder\x20ID:\x20'+_0x2eefc4);}const _0x14605b={'name':_0x19be06,'description':_0x8b89f9[_0x4f9487(0xc9)],'parentFolderId':_0x2eefc4},_0x32126b=await withSpinner(_0x4f9487(0xc5)+_0x19be06+_0x4f9487(0x121),()=>_0x2108fe[_0x4f9487(0xc6)][_0x4f9487(0xda)](_0x36ab76,_0x14605b),{'verbose':_0x8b89f9['verbose']}),_0x2e8de0=_0x32126b[_0x4f9487(0xf0)];return console[_0x4f9487(0x100)](_0x4f9487(0xd5)+_0x2e8de0[_0x4f9487(0x112)]+_0x4f9487(0x101)+_0x2e8de0['id']),await handleSDKOutput([_0x2e8de0],_0x8b89f9),0x0;}}
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 +1 @@
1
- const a26_0x30ce8d=a26_0x5d6d;(function(_0x52b78f,_0x4dcb34){const _0xf24e76=a26_0x5d6d,_0x27ed35=_0x52b78f();while(!![]){try{const _0x17f71b=-parseInt(_0xf24e76(0xb7))/0x1*(parseInt(_0xf24e76(0xc3))/0x2)+parseInt(_0xf24e76(0xb8))/0x3+parseInt(_0xf24e76(0xca))/0x4+-parseInt(_0xf24e76(0xb1))/0x5*(-parseInt(_0xf24e76(0xdb))/0x6)+parseInt(_0xf24e76(0xdd))/0x7+-parseInt(_0xf24e76(0xb5))/0x8*(parseInt(_0xf24e76(0xdc))/0x9)+-parseInt(_0xf24e76(0xcf))/0xa;if(_0x17f71b===_0x4dcb34)break;else _0x27ed35['push'](_0x27ed35['shift']());}catch(_0x18d6f4){_0x27ed35['push'](_0x27ed35['shift']());}}}(a26_0x5395,0xb8c11));import{BaseCommand}from'./command.js';import{handleSDKOutput}from'../utils/command-output.js';import{withSpinner}from'../utils/spinner.js';function a26_0x5d6d(_0x43d277,_0x32af43){const _0x5395d7=a26_0x5395();return a26_0x5d6d=function(_0x5d6df1,_0x446a0a){_0x5d6df1=_0x5d6df1-0xac;let _0x374b0f=_0x5395d7[_0x5d6df1];return _0x374b0f;},a26_0x5d6d(_0x43d277,_0x32af43);}import{loadJSONFromOptions}from'../utils/json-loader.js';function a26_0x5395(){const _0x6fc99f=['1564192whYqvE','type','Resolved\x20relative\x20path\x20to:\x20','invisible','Error:\x20Segment\x20path\x20or\x20name\x20is\x20required','execute','createSegment','5xHVrFU','includes','segment','Usage:\x20tdx\x20segment\x20create\x20<path>\x20[options]','1601528WReLls','error','99xvvzuF','3861225HAqgOn','Error:\x20Cannot\x20create\x20segment\x20in\x20a\x20segment.\x20Parent\x20path\x20must\x20be\x20a\x20folder\x20or\x20parent.','\x20\x20tdx\x20segment\x20create\x20\x22My\x20Audience/Marketing/Premium\x22\x20--rule\x20\x27...\x27','kind','✔\x20Created\x20segment\x20\x27','Resolving\x20parent\x20segment\x20\x27','site','folder','Error:\x20Full\x20path\x20required\x20(parent/segment_name\x20or\x20parent/folder/segment_name)','name','\x27\x20with\x20ID:\x20','13132wJaFOl','Parent:\x20','description','\x27...','Resolving\x20folder\x20path\x20\x27','noCountPopulation','\x20\x20tdx\x20segment\x20create\x20\x22Premium\x22\x20--rule\x20\x27...\x27\x20\x20#\x20Relative\x20to\x20context','3675372DlTmal','Target\x20path:\x20','folderId','verbose','segmentPath','14109360vzBtEe','length','Segment\x20name:\x20','segment:create','Usage:\x20tdx\x20segment\x20create\x20<parent/segment_name>\x20[options]','data','parent','Site:\x20','segments','Resolving\x20folder\x20\x27','\x20\x20\x20Path:\x20','Examples:','4732386dqLcoB','18rfdBIS'];a26_0x5395=function(){return _0x6fc99f;};return a26_0x5395();}import{parsePath,getParentPath,getBaseName}from'../utils/segment-path-parser.js';export class SegmentCreateCommand extends BaseCommand{[a26_0x30ce8d(0xc1)]=a26_0x30ce8d(0xd2);['description']='Create\x20child\x20segment\x20with\x20filtering\x20rules';async[a26_0x30ce8d(0xaf)](_0x1e0a21){const _0x8bf6b=a26_0x30ce8d,{options:_0x59a94f,args:_0x49f1a3,tdx:_0xe8c863}=_0x1e0a21,_0x532d60=_0x59a94f;if(_0x49f1a3[_0x8bf6b(0xd0)]===0x0)return console[_0x8bf6b(0xb6)](_0x8bf6b(0xae)),console['error'](_0x8bf6b(0xb4)),console[_0x8bf6b(0xb6)](_0x8bf6b(0xda)),console[_0x8bf6b(0xb6)]('\x20\x20tdx\x20segment\x20create\x20\x22My\x20Audience/High\x20Value\x22\x20--rule\x20\x27...\x27'),console[_0x8bf6b(0xb6)](_0x8bf6b(0xba)),console[_0x8bf6b(0xb6)](_0x8bf6b(0xc9)),0x1;const _0x469bed=_0x49f1a3[0x0],_0x431527=_0x59a94f[_0x8bf6b(0xce)];let _0x275cae=_0x469bed;_0x431527&&!_0x469bed[_0x8bf6b(0xb2)]('/')&&(_0x275cae=_0x431527+'/'+_0x469bed,_0x532d60[_0x8bf6b(0xcd)]&&console[_0x8bf6b(0xb6)](_0x8bf6b(0xac)+_0x275cae));const _0x22a24b=parsePath(_0x275cae);if(_0x22a24b[_0x8bf6b(0xd7)][_0x8bf6b(0xd0)]<0x2)return console[_0x8bf6b(0xb6)](_0x8bf6b(0xc0)),console['error'](_0x8bf6b(0xd3)),0x1;const _0x4970c1=_0x22a24b[_0x8bf6b(0xd7)][0x0],_0x592bc8=getBaseName(_0x275cae),_0x50d62e=getParentPath(_0x275cae);_0x532d60[_0x8bf6b(0xcd)]&&(console[_0x8bf6b(0xb6)](_0x8bf6b(0xd6)+_0x532d60[_0x8bf6b(0xbe)]),console[_0x8bf6b(0xb6)](_0x8bf6b(0xcb)+_0x275cae),console[_0x8bf6b(0xb6)](_0x8bf6b(0xc4)+_0x4970c1),console[_0x8bf6b(0xb6)](_0x8bf6b(0xd1)+_0x592bc8),console[_0x8bf6b(0xb6)]('Parent\x20path:\x20'+_0x50d62e));const _0x377b31=await withSpinner(_0x8bf6b(0xbd)+_0x4970c1+_0x8bf6b(0xc6),()=>_0xe8c863[_0x8bf6b(0xb3)]['resolveParentId'](_0x4970c1),{'verbose':_0x532d60['verbose']}),_0x537dd0=_0x377b31['data'];let _0x5e2673;if(_0x22a24b[_0x8bf6b(0xd7)][_0x8bf6b(0xd0)]>0x2){const _0x359ad8=await withSpinner(_0x8bf6b(0xc7)+_0x50d62e+_0x8bf6b(0xc6),()=>_0xe8c863[_0x8bf6b(0xb3)]['resolvePathToResource'](_0x50d62e),{'verbose':_0x532d60[_0x8bf6b(0xcd)]}),_0x4b71a8=_0x359ad8[_0x8bf6b(0xd4)];if(_0x4b71a8[_0x8bf6b(0xde)]!==_0x8bf6b(0xbf)&&_0x4b71a8[_0x8bf6b(0xde)]!==_0x8bf6b(0xd5))return console[_0x8bf6b(0xb6)](_0x8bf6b(0xb9)),0x1;_0x5e2673=_0x4b71a8[_0x8bf6b(0xcc)];}else{if(_0x532d60[_0x8bf6b(0xbf)]){const _0x1d2bb7=await withSpinner(_0x8bf6b(0xd8)+_0x532d60[_0x8bf6b(0xbf)]+_0x8bf6b(0xc6),()=>_0xe8c863[_0x8bf6b(0xb3)]['resolveFolderId'](_0x537dd0,_0x532d60[_0x8bf6b(0xbf)]),{'verbose':_0x532d60[_0x8bf6b(0xcd)]});_0x5e2673=_0x1d2bb7[_0x8bf6b(0xd4)];}}_0x532d60[_0x8bf6b(0xcd)]&&_0x5e2673&&console[_0x8bf6b(0xb6)]('Resolved\x20folder\x20ID:\x20'+_0x5e2673);const _0x23271b=await loadJSONFromOptions(_0x532d60['rule'],_0x532d60['ruleFile']),_0x53f600={'name':_0x592bc8,'description':_0x532d60[_0x8bf6b(0xc5)],'rule':_0x23271b,'kind':_0x532d60[_0x8bf6b(0xbb)]!==undefined?parseInt(_0x532d60[_0x8bf6b(0xbb)],0xa):undefined,'isVisible':_0x532d60[_0x8bf6b(0xad)]?![]:undefined,'segmentFolderId':_0x5e2673,'countPopulation':_0x532d60[_0x8bf6b(0xc8)]?![]:undefined},_0xb0256a=await withSpinner('Creating\x20segment\x20\x27'+_0x592bc8+_0x8bf6b(0xc6),()=>_0xe8c863[_0x8bf6b(0xb3)][_0x8bf6b(0xb0)](_0x537dd0,_0x53f600),{'verbose':_0x532d60['verbose']}),_0x188325=_0xb0256a[_0x8bf6b(0xd4)];return console[_0x8bf6b(0xb6)](_0x8bf6b(0xbc)+_0x188325[_0x8bf6b(0xc1)]+_0x8bf6b(0xc2)+_0x188325['id']),_0x275cae!==_0x469bed&&console[_0x8bf6b(0xb6)](_0x8bf6b(0xd9)+_0x275cae),await handleSDKOutput([_0x188325],_0x532d60),0x0;}}
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 +1 @@
1
- function a27_0xa3e3(){const _0x3c7810=['50RGdrwi','✔\x20Found\x20','data','Error:\x20Parent\x20segment\x20name\x20is\x20required','5717880CBkIWc','68cnhyAV','Parent\x20segment:\x20','Usage:\x20tdx\x20segment\x20fields\x20<parent_name>','8dxYddn','parentSegment','454uTDMLk','name','Listing\x20fields\x20for\x20\x27','1035083sHWHpF','description','\x20\x20Or\x20set\x20context:\x20tdx\x20use\x20parent_segment\x20<name>','listFields','segment','328818idVYPi','List\x20available\x20fields\x20for\x20segmentation','error','27564OQeVWW','1166eulwIf','\x20field','verbose','133890NoQfIq','2129xxyhQr','12835251UeUyBQ','length'];a27_0xa3e3=function(){return _0x3c7810;};return a27_0xa3e3();}const a27_0x5a8095=a27_0x3bff;(function(_0x2632be,_0x70e19a){const _0x843b7c=a27_0x3bff,_0x5adb9d=_0x2632be();while(!![]){try{const _0x49f5eb=parseInt(_0x843b7c(0x198))/0x1*(parseInt(_0x843b7c(0x1a5))/0x2)+parseInt(_0x843b7c(0x1b4))/0x3*(-parseInt(_0x843b7c(0x1a0))/0x4)+-parseInt(_0x843b7c(0x19b))/0x5*(-parseInt(_0x843b7c(0x1ad))/0x6)+parseInt(_0x843b7c(0x1a8))/0x7*(-parseInt(_0x843b7c(0x1a3))/0x8)+parseInt(_0x843b7c(0x199))/0x9+-parseInt(_0x843b7c(0x19f))/0xa+-parseInt(_0x843b7c(0x1b1))/0xb*(parseInt(_0x843b7c(0x1b0))/0xc);if(_0x49f5eb===_0x70e19a)break;else _0x5adb9d['push'](_0x5adb9d['shift']());}catch(_0x2b3524){_0x5adb9d['push'](_0x5adb9d['shift']());}}}(a27_0xa3e3,0xb3973));function a27_0x3bff(_0x45f764,_0xa03f33){const _0xa3e3e=a27_0xa3e3();return a27_0x3bff=function(_0x3bff67,_0x2737a4){_0x3bff67=_0x3bff67-0x198;let _0x5878f3=_0xa3e3e[_0x3bff67];return _0x5878f3;},a27_0x3bff(_0x45f764,_0xa03f33);}import{BaseCommand}from'./command.js';import{handleSDKOutput}from'../utils/command-output.js';import{withSpinner}from'../utils/spinner.js';export class SegmentFieldsCommand extends BaseCommand{[a27_0x5a8095(0x1a6)]='segment:fields';[a27_0x5a8095(0x1a9)]=a27_0x5a8095(0x1ae);async['execute'](_0x5e7e2f){const _0x5f19af=a27_0x5a8095,{options:_0x2d08c1,args:_0x21bcae,tdx:_0x10f6e0}=_0x5e7e2f,_0x5a688c=_0x21bcae[0x0]||_0x2d08c1[_0x5f19af(0x1a4)];if(!_0x5a688c)return console[_0x5f19af(0x1af)](_0x5f19af(0x19e)),console[_0x5f19af(0x1af)](_0x5f19af(0x1a2)),console[_0x5f19af(0x1af)](_0x5f19af(0x1aa)),0x1;_0x2d08c1[_0x5f19af(0x1b3)]&&(console[_0x5f19af(0x1af)]('Site:\x20'+_0x2d08c1['site']),console[_0x5f19af(0x1af)](_0x5f19af(0x1a1)+_0x5a688c));const _0x1fbd88=await withSpinner(_0x5f19af(0x1a7)+_0x5a688c+'\x27...',()=>_0x10f6e0[_0x5f19af(0x1ac)][_0x5f19af(0x1ab)](_0x5a688c),{'verbose':_0x2d08c1[_0x5f19af(0x1b3)]}),_0x496f55=_0x1fbd88[_0x5f19af(0x19d)];return console[_0x5f19af(0x1af)](_0x5f19af(0x19c)+_0x496f55['length']+_0x5f19af(0x1b2)+(_0x496f55[_0x5f19af(0x19a)]!==0x1?'s':'')),await handleSDKOutput(_0x496f55,_0x2d08c1),0x0;}}
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 +1 @@
1
- function a28_0x3250(_0x398df8,_0x3e9812){const _0x2c521a=a28_0x2c52();return a28_0x3250=function(_0x32506,_0x453c97){_0x32506=_0x32506-0xf2;let _0x169b3e=_0x2c521a[_0x32506];return _0x169b3e;},a28_0x3250(_0x398df8,_0x3e9812);}function a28_0x2c52(){const _0x3a8641=['stringify','root','94806OwDJed','\x20\x20Path:\x20','error','126wtbqXj','11jmIQpQ','3JgVSzI','3152388VzQoZV','22037292rwygCh','name','4ystidF','4374675rJRPFb','segmentPath','4421310TEDquI','Use\x20\x22tdx\x20context\x20--debug\x22\x20to\x20see\x20context\x20sources','format','582066NgNFTO','verbose','json','Context\x20details:','segment:pwd','description','log','24VIjFRh','362034BRAzRL'];a28_0x2c52=function(){return _0x3a8641;};return a28_0x2c52();}const a28_0x5f0cb4=a28_0x3250;(function(_0x739ac9,_0x26af47){const _0x17928e=a28_0x3250,_0x36f44d=_0x739ac9();while(!![]){try{const _0x217083=-parseInt(_0x17928e(0xf4))/0x1*(parseInt(_0x17928e(0x109))/0x2)+-parseInt(_0x17928e(0xf5))/0x3*(parseInt(_0x17928e(0xf8))/0x4)+-parseInt(_0x17928e(0xf9))/0x5+parseInt(_0x17928e(0x106))/0x6*(parseInt(_0x17928e(0xf2))/0x7)+parseInt(_0x17928e(0x105))/0x8*(parseInt(_0x17928e(0xfe))/0x9)+-parseInt(_0x17928e(0xfb))/0xa*(parseInt(_0x17928e(0xf3))/0xb)+parseInt(_0x17928e(0xf6))/0xc;if(_0x217083===_0x26af47)break;else _0x36f44d['push'](_0x36f44d['shift']());}catch(_0x1afb97){_0x36f44d['push'](_0x36f44d['shift']());}}}(a28_0x2c52,0x9411e));import{BaseCommand}from'./command.js';export class SegmentPwdCommand extends BaseCommand{[a28_0x5f0cb4(0xf7)]=a28_0x5f0cb4(0x102);[a28_0x5f0cb4(0x103)]='Show\x20current\x20segment/folder\x20context';async['execute'](_0x4bc9d1){const _0x223220=a28_0x5f0cb4,{options:_0x145043}=_0x4bc9d1;try{const _0x13e454=_0x145043[_0x223220(0xfa)];if(!_0x13e454)return _0x145043[_0x223220(0xfd)]===_0x223220(0x100)||_0x145043[_0x223220(0xfd)]==='jsonl'?console[_0x223220(0x104)](JSON[_0x223220(0x107)]({'path':'/','type':_0x223220(0x108)})):console[_0x223220(0x104)]('/'),0x0;if(_0x145043[_0x223220(0xfd)]==='json'||_0x145043[_0x223220(0xfd)]==='jsonl'){const _0x166a9c={'path':_0x13e454};console[_0x223220(0x104)](JSON['stringify'](_0x166a9c));}else console[_0x223220(0x104)](_0x13e454),_0x145043[_0x223220(0xff)]&&(console['error'](''),console[_0x223220(0x10b)](_0x223220(0x101)),console['error'](_0x223220(0x10a)+_0x13e454),console[_0x223220(0x10b)](''),console[_0x223220(0x10b)]('Use\x20\x22tdx\x20context\x22\x20to\x20see\x20all\x20context\x20parameters'),console['error'](_0x223220(0xfc)));return 0x0;}catch(_0x13e731){throw _0x13e731;}}}
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 +1 @@
1
- const a29_0x112769=a29_0x4551;(function(_0x17abea,_0x2d9900){const _0x4dc7d9=a29_0x4551,_0x3518c3=_0x17abea();while(!![]){try{const _0x4404bb=-parseInt(_0x4dc7d9(0x204))/0x1*(-parseInt(_0x4dc7d9(0x1e3))/0x2)+-parseInt(_0x4dc7d9(0x1f2))/0x3+parseInt(_0x4dc7d9(0x1da))/0x4*(parseInt(_0x4dc7d9(0x1d7))/0x5)+parseInt(_0x4dc7d9(0x1eb))/0x6*(-parseInt(_0x4dc7d9(0x1ec))/0x7)+-parseInt(_0x4dc7d9(0x208))/0x8+-parseInt(_0x4dc7d9(0x1f8))/0x9*(-parseInt(_0x4dc7d9(0x1f1))/0xa)+parseInt(_0x4dc7d9(0x1e1))/0xb*(parseInt(_0x4dc7d9(0x1e9))/0xc);if(_0x4404bb===_0x2d9900)break;else _0x3518c3['push'](_0x3518c3['shift']());}catch(_0x333cdc){_0x3518c3['push'](_0x3518c3['shift']());}}}(a29_0x1f25,0xa24b9));import{BaseCommand}from'./command.js';import{handleSDKOutput}from'../utils/command-output.js';import{withSpinner}from'../utils/spinner.js';function a29_0x4551(_0x33bbfa,_0x394d37){const _0x1f25e2=a29_0x1f25();return a29_0x4551=function(_0x455111,_0x49f967){_0x455111=_0x455111-0x1d5;let _0x503293=_0x1f25e2[_0x455111];return _0x503293;},a29_0x4551(_0x33bbfa,_0x394d37);}import{loadJSONFromOptions}from'../utils/json-loader.js';function a29_0x1f25(){const _0x1da124=['Resolving\x20folder\x20\x27','error','132cmHEIb','updateSegmentById','1006762zzjlJd','\x20\x20\x20Path:\x20','Updating\x20segment\x20\x27','includes','segment:update','INTERNAL','944796TyotyE','rule','2411052XyICRG','21YzgqoJ','Resolved\x20folder\x20ID:\x20','Parent\x20ID:\x20','segmentId','Update\x20existing\x20child\x20segment','10392170CuUhMI','2378859foXKeC','.\x20Only\x20child\x20segments\x20can\x20be\x20updated.','Error:\x20Segment\x20path\x20or\x20name\x20is\x20required','segment','\x20\x20tdx\x20segment\x20update\x20\x22My\x20Audience/High\x20Value\x22\x20--description\x20\x22...\x22','length','9kwRwDX','segmentPath','verbose','ruleFile','type','parentId','\x27...','execute','name','folder','data','resolveFolderId','2wAoUIV','Usage:\x20tdx\x20segment\x20update\x20<path>\x20[options]','\x20\x20tdx\x20segment\x20update\x20\x22High\x20Value\x22\x20--rule\x20\x27...\x27\x20\x20#\x20Relative\x20to\x20context','Use:\x20tdx\x20segment\x20update\x20<path_to_segment>\x20[options]','3364136LGBQjf','kind','Resolving\x20path\x20\x27','Segment\x20ID:\x20','77485jSSVpD','segmentName','resolvePathToResource','24VuQnfv','Examples:','Segment\x20ID\x20missing\x20from\x20resolved\x20path','✔\x20Updated\x20segment\x20\x27','description'];a29_0x1f25=function(){return _0x1da124;};return a29_0x1f25();}import{SDKError,ErrorCode}from'../sdk/index.js';export class SegmentUpdateCommand extends BaseCommand{['name']=a29_0x112769(0x1e7);[a29_0x112769(0x1de)]=a29_0x112769(0x1f0);async[a29_0x112769(0x1ff)](_0x365e4e){const _0x58ca38=a29_0x112769,{options:_0x3f2f35,args:_0x2d55cf,tdx:_0x50e905}=_0x365e4e,_0x10f6b9=_0x3f2f35;if(_0x2d55cf[_0x58ca38(0x1f7)]===0x0)return console['error'](_0x58ca38(0x1f4)),console[_0x58ca38(0x1e0)](_0x58ca38(0x205)),console['error'](_0x58ca38(0x1db)),console['error'](_0x58ca38(0x1f6)),console[_0x58ca38(0x1e0)](_0x58ca38(0x206)),0x1;const _0x54122f=_0x2d55cf[0x0],_0x22a3dd=_0x3f2f35[_0x58ca38(0x1f9)];let _0x245cec=_0x54122f;_0x22a3dd&&!_0x54122f[_0x58ca38(0x1e6)]('/')&&(_0x245cec=_0x22a3dd+'/'+_0x54122f,_0x10f6b9['verbose']&&console['error']('Resolved\x20relative\x20path\x20to:\x20'+_0x245cec));const _0x4c7f1f=await withSpinner(_0x58ca38(0x1d5)+_0x245cec+_0x58ca38(0x1fe),()=>_0x50e905[_0x58ca38(0x1f5)][_0x58ca38(0x1d9)](_0x245cec),{'verbose':_0x10f6b9[_0x58ca38(0x1fa)]}),_0x437f03=_0x4c7f1f['data'];_0x10f6b9['verbose']&&console[_0x58ca38(0x1e0)]('Resolved\x20type:\x20'+_0x437f03[_0x58ca38(0x1fc)]);if(_0x437f03[_0x58ca38(0x1fc)]!=='segment')return console[_0x58ca38(0x1e0)]('Error:\x20Cannot\x20update\x20'+_0x437f03['type']+_0x58ca38(0x1f3)),console[_0x58ca38(0x1e0)](_0x58ca38(0x207)),0x1;if(!_0x437f03[_0x58ca38(0x1ef)])throw new SDKError(ErrorCode[_0x58ca38(0x1e8)],_0x58ca38(0x1dc));const _0x49de2f=_0x437f03[_0x58ca38(0x1fd)],_0x499395=_0x437f03[_0x58ca38(0x1ef)];_0x10f6b9['verbose']&&(console[_0x58ca38(0x1e0)](_0x58ca38(0x1ee)+_0x49de2f),console[_0x58ca38(0x1e0)](_0x58ca38(0x1d6)+_0x499395));let _0x150bc0;if(_0x10f6b9[_0x58ca38(0x201)]){const _0x32e06e=_0x10f6b9[_0x58ca38(0x201)],_0x3c05b9=await withSpinner(_0x58ca38(0x1df)+_0x32e06e+_0x58ca38(0x1fe),()=>_0x50e905[_0x58ca38(0x1f5)][_0x58ca38(0x203)](_0x49de2f,_0x32e06e),{'verbose':_0x10f6b9[_0x58ca38(0x1fa)]});_0x150bc0=parseInt(_0x3c05b9[_0x58ca38(0x202)],0xa),_0x10f6b9[_0x58ca38(0x1fa)]&&console[_0x58ca38(0x1e0)](_0x58ca38(0x1ed)+_0x150bc0);}const _0x5a4343=await loadJSONFromOptions(_0x10f6b9[_0x58ca38(0x1ea)],_0x10f6b9[_0x58ca38(0x1fb)]),_0x585f01={'name':_0x10f6b9[_0x58ca38(0x200)],'description':_0x10f6b9[_0x58ca38(0x1de)],'rule':_0x5a4343,'kind':_0x10f6b9[_0x58ca38(0x209)]!==undefined?parseInt(_0x10f6b9[_0x58ca38(0x209)],0xa):undefined,'segmentFolderId':_0x150bc0},_0x54e7d9=await withSpinner(_0x58ca38(0x1e5)+_0x437f03[_0x58ca38(0x1d8)]+_0x58ca38(0x1fe),()=>_0x50e905[_0x58ca38(0x1f5)][_0x58ca38(0x1e2)](_0x49de2f,_0x499395,_0x585f01),{'verbose':_0x10f6b9[_0x58ca38(0x1fa)]}),_0x23f468=_0x54e7d9[_0x58ca38(0x202)];return console['error'](_0x58ca38(0x1dd)+_0x23f468[_0x58ca38(0x200)]+'\x27'),_0x245cec!==_0x54122f&&console['error'](_0x58ca38(0x1e4)+_0x245cec),await handleSDKOutput([_0x23f468],_0x10f6b9),0x0;}}
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 +1 @@
1
- const a30_0x50b0c9=a30_0x1056;(function(_0x3e588b,_0x494549){const _0x249d3d=a30_0x1056,_0x7e0446=_0x3e588b();while(!![]){try{const _0x288e87=parseInt(_0x249d3d(0x161))/0x1+-parseInt(_0x249d3d(0x167))/0x2*(parseInt(_0x249d3d(0x160))/0x3)+-parseInt(_0x249d3d(0x163))/0x4+parseInt(_0x249d3d(0x144))/0x5*(parseInt(_0x249d3d(0x172))/0x6)+-parseInt(_0x249d3d(0x171))/0x7+parseInt(_0x249d3d(0x140))/0x8*(-parseInt(_0x249d3d(0x13f))/0x9)+parseInt(_0x249d3d(0x164))/0xa;if(_0x288e87===_0x494549)break;else _0x7e0446['push'](_0x7e0446['shift']());}catch(_0x8e1849){_0x7e0446['push'](_0x7e0446['shift']());}}}(a30_0x58ce,0xdb6e6));function a30_0x58ce(){const _0x28b98b=['65CjPqpA','\x20\x20tdx\x20segment\x20use\x20/\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Clear\x20context','segmentPath','folderId','Target\x20path:\x20','split','Resolving\x20path\x20\x27','execute','Error:\x20No\x20context\x20set.\x20Cannot\x20use\x20relative\x20path.','Error:\x20Path\x20is\x20required','length','Use\x20an\x20absolute\x20path\x20or\x20set\x20context\x20with:\x20tdx\x20segment\x20use\x20<parent_name>','Usage:\x20tdx\x20segment\x20use\x20<path>','parentId','Use\x20\x22tdx\x20context\x22\x20to\x20see\x20all\x20context\x20parameters','Parent\x20ID:\x20','Use:\x20tdx\x20segment\x20use\x20','error','Context\x20can\x20only\x20be\x20set\x20to\x20a\x20parent\x20segment\x20or\x20folder.','Resolved\x20relative\x20path\x20to:\x20','fullPath','join','Error:\x20Cannot\x20set\x20context\x20to\x20a\x20segment.','verbose','log','Folder\x20ID:\x20','segment','slice','3kQAhcy','246365mgMxdg','\x20\x20tdx\x20segment\x20use\x20\x22My\x20Audience\x22','1148788lFaheY','29762700aDqcuk','segment:use','isAbsolute','983842idZbdy','Examples:','Resolved\x20path\x20type:\x20','data','\x20\x20tdx\x20segment\x20use\x20..\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Go\x20to\x20parent','description','\x20\x20tdx\x20segment\x20use\x20\x22My\x20Audience/Marketing\x22','Site:\x20','Set\x20current\x20segment/folder\x20context\x20for\x20navigation','parentName','11279800omsTDe','211518JVtppG','resolvePathToResource','site','Context\x20cleared.\x20Back\x20to\x20root.','Use\x20\x22tdx\x20segments\x22\x20to\x20list\x20contents\x20in\x20this\x20context','8352NjoLzk','3376auPRom','folderPath','\x27...','type'];a30_0x58ce=function(){return _0x28b98b;};return a30_0x58ce();}import{BaseCommand}from'./command.js';function a30_0x1056(_0x45f6f3,_0x103927){const _0x58ce13=a30_0x58ce();return a30_0x1056=function(_0x105670,_0x2ae3b9){_0x105670=_0x105670-0x13b;let _0x5c3d42=_0x58ce13[_0x105670];return _0x5c3d42;},a30_0x1056(_0x45f6f3,_0x103927);}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']=a30_0x50b0c9(0x165);[a30_0x50b0c9(0x16c)]=a30_0x50b0c9(0x16f);async[a30_0x50b0c9(0x14b)](_0x273695){const _0x1e2ced=a30_0x50b0c9,{options:_0x3703f3,args:_0x2880b8,tdx:_0x49b664}=_0x273695;if(_0x2880b8[_0x1e2ced(0x14e)]===0x0)return console[_0x1e2ced(0x155)](_0x1e2ced(0x14d)),console[_0x1e2ced(0x155)](_0x1e2ced(0x150)),console[_0x1e2ced(0x155)](_0x1e2ced(0x168)),console[_0x1e2ced(0x155)](_0x1e2ced(0x162)),console[_0x1e2ced(0x155)](_0x1e2ced(0x16d)),console['error'](_0x1e2ced(0x145)),console['error'](_0x1e2ced(0x16b)),0x1;const _0x500701=_0x2880b8[0x0],_0x380690=_0x3703f3['session'];try{if(_0x500701==='/')return saveSessionContext({'segment_path':undefined},_0x380690),console[_0x1e2ced(0x15c)]('Context\x20cleared.\x20Back\x20to\x20root.'),0x0;const _0x558681=_0x3703f3[_0x1e2ced(0x146)];let _0x5697d4=_0x500701;const _0x23a50f=parsePath(_0x500701);if(!_0x23a50f[_0x1e2ced(0x166)]){if(!_0x558681)return console[_0x1e2ced(0x155)](_0x1e2ced(0x14c)),console[_0x1e2ced(0x155)](_0x1e2ced(0x14f)),0x1;if(_0x500701==='..'){const _0x3c8962=_0x558681[_0x1e2ced(0x149)]('/')[_0x1e2ced(0x15f)](0x0,-0x1)[_0x1e2ced(0x159)]('/');_0x5697d4=_0x3c8962||'/';}else _0x500701==='.'?_0x5697d4=_0x558681:_0x5697d4=_0x558681+'/'+_0x500701;_0x3703f3[_0x1e2ced(0x15b)]&&console[_0x1e2ced(0x155)](_0x1e2ced(0x157)+_0x5697d4);}if(_0x5697d4==='/'||_0x5697d4==='')return saveSessionContext({'segment_path':undefined},_0x380690),console[_0x1e2ced(0x15c)](_0x1e2ced(0x13d)),0x0;_0x5697d4=normalizePath(_0x5697d4);const _0x3df30a=parsePath(_0x5697d4)['segments'];if(_0x3df30a[_0x1e2ced(0x14e)]===0x0)return saveSessionContext({'segment_path':undefined},_0x380690),console[_0x1e2ced(0x15c)](_0x1e2ced(0x13d)),0x0;_0x3703f3['verbose']&&(console[_0x1e2ced(0x155)](_0x1e2ced(0x16e)+_0x3703f3[_0x1e2ced(0x13c)]),console[_0x1e2ced(0x155)](_0x1e2ced(0x148)+_0x5697d4));const _0x4892ec=await withSpinner(_0x1e2ced(0x14a)+_0x5697d4+_0x1e2ced(0x142),()=>_0x49b664[_0x1e2ced(0x15e)][_0x1e2ced(0x13b)](_0x5697d4),{'verbose':_0x3703f3['verbose']}),_0x16d59b=_0x4892ec[_0x1e2ced(0x16a)];_0x3703f3[_0x1e2ced(0x15b)]&&(console[_0x1e2ced(0x155)](_0x1e2ced(0x169)+_0x16d59b['type']),console[_0x1e2ced(0x155)](_0x1e2ced(0x153)+_0x16d59b[_0x1e2ced(0x151)]),_0x16d59b[_0x1e2ced(0x147)]&&console[_0x1e2ced(0x155)](_0x1e2ced(0x15d)+_0x16d59b['folderId']));if(_0x16d59b[_0x1e2ced(0x143)]===_0x1e2ced(0x15e))return console[_0x1e2ced(0x155)](_0x1e2ced(0x15a)),console[_0x1e2ced(0x155)](_0x1e2ced(0x156)),console[_0x1e2ced(0x155)](_0x1e2ced(0x154)+_0x16d59b[_0x1e2ced(0x170)]+(_0x16d59b[_0x1e2ced(0x141)]?'/'+_0x16d59b['folderPath'][_0x1e2ced(0x159)]('/'):'')),0x1;return saveSessionContext({'segment_path':_0x16d59b[_0x1e2ced(0x158)],'parent_segment':_0x16d59b[_0x1e2ced(0x170)]},_0x380690),console[_0x1e2ced(0x15c)]('Context\x20set\x20to:\x20'+_0x16d59b['fullPath']),_0x3703f3['verbose']&&(console[_0x1e2ced(0x155)](_0x1e2ced(0x13e)),console[_0x1e2ced(0x155)]('Use\x20\x22tdx\x20segment\x20pwd\x22\x20to\x20show\x20current\x20context'),console[_0x1e2ced(0x155)](_0x1e2ced(0x152))),0x0;}catch(_0x12178e){throw _0x12178e;}}}
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 +1 @@
1
- function a31_0x33cd(_0x425ec8,_0x29d04b){const _0xb14919=a31_0xb149();return a31_0x33cd=function(_0x33cd88,_0x2b6c86){_0x33cd88=_0x33cd88-0x125;let _0x2bcc52=_0xb14919[_0x33cd88];return _0x2bcc52;},a31_0x33cd(_0x425ec8,_0x29d04b);}function a31_0xb149(){const _0x18ee8f=['418jYtidj','resolvePathToResource','Error:\x20','Listing\x20parent\x20segments...','cause','execute','listUnified','Building\x20hierarchy\x20tree...','\x20parent\x20segment','Error:\x20Pattern\x20matching\x20is\x20only\x20supported\x20at\x20root\x20level\x20(no\x20context\x20set).','attributes','includes','maxDepth','listRecursive','test','Current\x20context:\x20','name','sort','4660588nLfWtF','\x27...','Listing\x20folders\x20and\x20segments...','5AVQNdX','segments','jsonl','folder','Resolving\x20context\x20path\x20\x27','\x5c$&','279117iCBbpz','population','4687074gTaqid','verbose','2270317yhgLhF','map','Clear\x20context\x20with:\x20tdx\x20segment\x20use\x20/','segment','json','listParents','message','filter','45ZCpSBJ','\x20segment','\x20and\x20','description','14AYMjIt','417810FLVFQk','(empty)','folderId','length','[parent\x20segments]','data','List\x20parent\x20segments,\x20folders,\x20and\x20child\x20segments','✔\x20Found\x20','dim','segmentPath','Parent\x20ID:\x20','parentId','error','replace','format','No\x20parent\x20segments\x20match\x20pattern:\x20','log','Path/pattern\x20arg:\x20','675815XrtqTB','listParentsWithPattern','\x20matching\x20\x27','2645024DKqokD'];a31_0xb149=function(){return _0x18ee8f;};return a31_0xb149();}const a31_0x3472ad=a31_0x33cd;(function(_0x15a493,_0xa21c5){const _0x1b4bc2=a31_0x33cd,_0xfee7e4=_0x15a493();while(!![]){try{const _0x1006fa=parseInt(_0x1b4bc2(0x139))/0x1+-parseInt(_0x1b4bc2(0x126))/0x2*(parseInt(_0x1b4bc2(0x158))/0x3)+-parseInt(_0x1b4bc2(0x14f))/0x4*(parseInt(_0x1b4bc2(0x152))/0x5)+-parseInt(_0x1b4bc2(0x15a))/0x6+-parseInt(_0x1b4bc2(0x15c))/0x7+-parseInt(_0x1b4bc2(0x13c))/0x8*(-parseInt(_0x1b4bc2(0x164))/0x9)+parseInt(_0x1b4bc2(0x127))/0xa*(parseInt(_0x1b4bc2(0x13d))/0xb);if(_0x1006fa===_0xa21c5)break;else _0xfee7e4['push'](_0xfee7e4['shift']());}catch(_0xce0ba0){_0xfee7e4['push'](_0xfee7e4['shift']());}}}(a31_0xb149,0xf2d8f));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_0x261bf0 from'chalk';export class SegmentsCommand extends BaseCommand{['name']=a31_0x3472ad(0x153);[a31_0x3472ad(0x125)]=a31_0x3472ad(0x12d);async[a31_0x3472ad(0x142)](_0x372984){const _0xdd96a6=a31_0x3472ad,{options:_0x8a8f57,args:_0x1bc63c}=_0x372984,_0x5db954=_0x8a8f57['recursive'],_0x538ab9=_0x1bc63c[0x0];try{const _0xa07db0=_0x8a8f57[_0xdd96a6(0x130)];_0x8a8f57['verbose']&&(console['error']('Site:\x20'+_0x8a8f57['site']),console[_0xdd96a6(0x133)](_0xdd96a6(0x14c)+(_0xa07db0||'/')),_0x538ab9&&console[_0xdd96a6(0x133)](_0xdd96a6(0x138)+_0x538ab9),_0x5db954&&console[_0xdd96a6(0x133)]('Recursive\x20mode:\x20enabled'));if(_0x538ab9){const _0x274171=_0x538ab9[_0xdd96a6(0x148)]('*')||_0x538ab9[_0xdd96a6(0x148)]('?');if(_0x274171&&!_0xa07db0)return await this[_0xdd96a6(0x13a)](_0x372984,_0x538ab9);else return _0x274171?(console[_0xdd96a6(0x133)](_0xdd96a6(0x146)),console[_0xdd96a6(0x133)](_0xdd96a6(0x15e)),0x1):_0x5db954?await this['listRecursive'](_0x372984,_0x538ab9):await this['listUnified'](_0x372984,_0x538ab9);}if(!_0xa07db0)return await this['listParents'](_0x372984);return _0x5db954?await this['listRecursive'](_0x372984,_0xa07db0):await this[_0xdd96a6(0x143)](_0x372984,_0xa07db0);}catch(_0x217071){if(_0x217071 instanceof SDKError)return console[_0xdd96a6(0x133)](_0xdd96a6(0x13f)+_0x217071[_0xdd96a6(0x162)]),_0x217071[_0xdd96a6(0x141)]&&console['error']('\x20\x20Cause:\x20'+_0x217071[_0xdd96a6(0x141)]),0x1;throw _0x217071;}}async[a31_0x3472ad(0x13a)](_0x20abfb,_0x18768e){const _0x4b6c2d=a31_0x3472ad,{options:_0xbce650,tdx:_0x365716}=_0x20abfb,_0xc5c9ad=await withSpinner('Listing\x20parent\x20segments\x20matching\x20\x27'+_0x18768e+'\x27...',()=>_0x365716[_0x4b6c2d(0x15f)]['listParents'](),{'verbose':_0xbce650[_0x4b6c2d(0x15b)]}),_0x1a035b=_0xc5c9ad[_0x4b6c2d(0x12c)],_0x45bdf1=_0x18768e[_0x4b6c2d(0x134)](/[.+^${}()|[\]\\]/g,_0x4b6c2d(0x157))[_0x4b6c2d(0x134)](/\*/g,'.*')[_0x4b6c2d(0x134)](/\?/g,'.'),_0x12a79c=new RegExp('^'+_0x45bdf1+'$','i'),_0x112942=_0x1a035b[_0x4b6c2d(0x163)](_0x5222d0=>_0x12a79c[_0x4b6c2d(0x14b)](_0x5222d0[_0x4b6c2d(0x147)]['name']));console[_0x4b6c2d(0x133)](_0x4b6c2d(0x12e)+_0x112942[_0x4b6c2d(0x12a)]+_0x4b6c2d(0x145)+(_0x112942[_0x4b6c2d(0x12a)]!==0x1?'s':'')+_0x4b6c2d(0x13b)+_0x18768e+'\x27');if(_0xbce650[_0x4b6c2d(0x135)]===_0x4b6c2d(0x160)||_0xbce650['format']==='jsonl')await handleSDKOutput(_0x112942,_0xbce650);else{if(_0x112942['length']===0x0)console[_0x4b6c2d(0x137)](_0x4b6c2d(0x136)+_0x18768e);else{console[_0x4b6c2d(0x137)](_0x4b6c2d(0x12b));for(const _0x2d0000 of _0x112942){const _0x40d39e=_0x2d0000[_0x4b6c2d(0x147)][_0x4b6c2d(0x159)]?a31_0x261bf0['dim']('\x20('+formatRows(_0x2d0000[_0x4b6c2d(0x147)][_0x4b6c2d(0x159)])+')'):'';console['log']('👥\x20'+_0x2d0000[_0x4b6c2d(0x147)][_0x4b6c2d(0x14d)]+_0x40d39e);}}}return 0x0;}async['listParents'](_0x42cbfd){const _0x477032=a31_0x3472ad,{options:_0x56f054,tdx:_0x84bb66}=_0x42cbfd,_0x21d847=await withSpinner(_0x477032(0x140),()=>_0x84bb66[_0x477032(0x15f)][_0x477032(0x161)](),{'verbose':_0x56f054[_0x477032(0x15b)]}),_0x4aa04d=_0x21d847[_0x477032(0x12c)];console['error'](_0x477032(0x12e)+_0x4aa04d['length']+_0x477032(0x145)+(_0x4aa04d[_0x477032(0x12a)]!==0x1?'s':''));if(_0x56f054[_0x477032(0x135)]===_0x477032(0x160)||_0x56f054['format']===_0x477032(0x154))await handleSDKOutput(_0x4aa04d,_0x56f054);else{console['log'](_0x477032(0x12b));for(const _0x2a3df0 of _0x4aa04d){const _0x57db37=_0x2a3df0[_0x477032(0x147)]['population']?a31_0x261bf0[_0x477032(0x12f)]('\x20('+formatRows(_0x2a3df0['attributes'][_0x477032(0x159)])+')'):'';console[_0x477032(0x137)]('👥\x20'+_0x2a3df0[_0x477032(0x147)][_0x477032(0x14d)]+_0x57db37);}}return 0x0;}async['listUnified'](_0x20788e,_0xf7d658){const _0x3603d7=a31_0x3472ad,{options:_0x57b762,tdx:_0x3e0eda}=_0x20788e,_0x412206=await withSpinner(_0x3603d7(0x156)+_0xf7d658+'\x27...',()=>_0x3e0eda[_0x3603d7(0x15f)][_0x3603d7(0x13e)](_0xf7d658),{'verbose':_0x57b762[_0x3603d7(0x15b)]}),_0xe0f522=_0x412206[_0x3603d7(0x12c)];_0x57b762[_0x3603d7(0x15b)]&&(console['error'](_0x3603d7(0x131)+_0xe0f522[_0x3603d7(0x132)]),_0xe0f522[_0x3603d7(0x129)]&&console['error']('Folder\x20ID:\x20'+_0xe0f522[_0x3603d7(0x129)]));const _0x40a7e7=await withSpinner(_0x3603d7(0x151),()=>_0x3e0eda[_0x3603d7(0x15f)][_0x3603d7(0x143)](_0xe0f522['parentId'],_0xe0f522[_0x3603d7(0x129)]),{'verbose':_0x57b762[_0x3603d7(0x15b)]}),{folders:_0x5772c5,segments:_0x2c3f5f}=_0x40a7e7[_0x3603d7(0x12c)],_0x186497=_0x5772c5['length']+_0x2c3f5f[_0x3603d7(0x12a)];console[_0x3603d7(0x133)](_0x3603d7(0x12e)+_0x5772c5[_0x3603d7(0x12a)]+'\x20folder'+(_0x5772c5['length']!==0x1?'s':'')+_0x3603d7(0x166)+_0x2c3f5f['length']+_0x3603d7(0x165)+(_0x2c3f5f['length']!==0x1?'s':''));if(_0x57b762[_0x3603d7(0x135)]===_0x3603d7(0x160)||_0x57b762[_0x3603d7(0x135)]===_0x3603d7(0x154)){const _0x41fc78=[..._0x5772c5[_0x3603d7(0x15d)](_0x55f783=>({..._0x55f783,'type':_0x3603d7(0x155)})),..._0x2c3f5f[_0x3603d7(0x15d)](_0x278c15=>({..._0x278c15,'type':_0x3603d7(0x15f)}))][_0x3603d7(0x14e)]((_0x2efc06,_0xbcee2c)=>_0x2efc06[_0x3603d7(0x14d)]['localeCompare'](_0xbcee2c['name']));await handleSDKOutput(_0x41fc78,_0x57b762);}else{if(_0x186497===0x0)console[_0x3603d7(0x137)](a31_0x261bf0[_0x3603d7(0x12f)]('[/'+_0xf7d658+']')),console[_0x3603d7(0x137)](_0x3603d7(0x128));else{console[_0x3603d7(0x137)](a31_0x261bf0[_0x3603d7(0x12f)]('[/'+_0xf7d658+']'));const _0x98613a=formatFlatList(_0x5772c5,_0x2c3f5f,{'showMetadata':!![]});console[_0x3603d7(0x137)](_0x98613a);}}return 0x0;}async[a31_0x3472ad(0x14a)](_0x5b8b79,_0x52f306){const _0xae4b77=a31_0x3472ad,{options:_0x413e16,tdx:_0xd6fa5}=_0x5b8b79,_0x5ce794=await withSpinner(_0xae4b77(0x156)+_0x52f306+_0xae4b77(0x150),()=>_0xd6fa5[_0xae4b77(0x15f)][_0xae4b77(0x13e)](_0x52f306),{'verbose':_0x413e16[_0xae4b77(0x15b)]}),_0x1cccf5=_0x5ce794[_0xae4b77(0x12c)];_0x413e16[_0xae4b77(0x15b)]&&(console[_0xae4b77(0x133)](_0xae4b77(0x131)+_0x1cccf5[_0xae4b77(0x132)]),_0x1cccf5[_0xae4b77(0x129)]&&console['error']('Folder\x20ID:\x20'+_0x1cccf5[_0xae4b77(0x129)]));const _0x562c78=_0x413e16[_0xae4b77(0x149)]||0xa,_0x5b696d=await withSpinner(_0xae4b77(0x144),()=>_0xd6fa5[_0xae4b77(0x15f)]['listRecursive'](_0x1cccf5[_0xae4b77(0x132)],_0x1cccf5[_0xae4b77(0x129)],0x0,_0x562c78),{'verbose':_0x413e16[_0xae4b77(0x15b)]}),_0x43825a=_0x5b696d[_0xae4b77(0x12c)];console[_0xae4b77(0x133)]('✔\x20Built\x20tree\x20with\x20'+_0x43825a[_0xae4b77(0x12a)]+'\x20top-level\x20items');if(_0x413e16[_0xae4b77(0x135)]===_0xae4b77(0x160)||_0x413e16[_0xae4b77(0x135)]===_0xae4b77(0x154))await handleSDKOutput(_0x43825a,_0x413e16);else{console[_0xae4b77(0x137)](a31_0x261bf0[_0xae4b77(0x12f)]('[/'+_0x52f306+']'));const _0x1fb913=formatTree(_0x43825a,{'showMetadata':!![]});console['log'](_0x1fb913);}return 0x0;}}
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 +1 @@
1
- function a32_0x1bff(){const _0x364879=['cause','27007640veiJjq','475846WYMPSO','Database:\x20','Limit:\x20','data','5354503AugtQB','Show\x20table\x20contents','\x20row','database','\x20from\x20','Usage:\x20tdx\x20show\x20<database.table>','9thvAKU','868236nJbQxG','6217380XSYMPM','371388iNduVq','error','\x20\x20Cause:\x20','1359017wpnRpn','name','Table:\x20','site','\x20\x20\x20or:\x20tdx\x20show\x20<catalog.database.table>','Error:\x20','table','args','validate','Site:\x20','12cKaVHH','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','length','\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--database\x20<database>','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','verbose','limit'];a32_0x1bff=function(){return _0x364879;};return a32_0x1bff();}const a32_0x3ca521=a32_0x3187;function a32_0x3187(_0x4dc7de,_0x527f7a){const _0x1bff1a=a32_0x1bff();return a32_0x3187=function(_0x318748,_0x3fcc9b){_0x318748=_0x318748-0x155;let _0x1fb040=_0x1bff1a[_0x318748];return _0x1fb040;},a32_0x3187(_0x4dc7de,_0x527f7a);}(function(_0x361cd6,_0x133561){const _0x2e9e23=a32_0x3187,_0x5f84ee=_0x361cd6();while(!![]){try{const _0x15bc15=-parseInt(_0x2e9e23(0x165))/0x1+-parseInt(_0x2e9e23(0x155))/0x2+parseInt(_0x2e9e23(0x16f))/0x3*(parseInt(_0x2e9e23(0x160))/0x4)+-parseInt(_0x2e9e23(0x161))/0x5+parseInt(_0x2e9e23(0x162))/0x6+-parseInt(_0x2e9e23(0x159))/0x7+parseInt(_0x2e9e23(0x179))/0x8*(parseInt(_0x2e9e23(0x15f))/0x9);if(_0x15bc15===_0x133561)break;else _0x5f84ee['push'](_0x5f84ee['shift']());}catch(_0x47cbb8){_0x5f84ee['push'](_0x5f84ee['shift']());}}}(a32_0x1bff,0xab148));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleSDKOutput}from'../utils/command-output.js';import{parseTableReference,validateTableDescribeReference}from'../utils/table-ref-parser.js';import{withSpinner}from'../utils/spinner.js';import{DEFAULT_DISPLAY_LIMIT,resolveLimit}from'../utils/constants.js';export class ShowCommand extends BaseCommand{[a32_0x3ca521(0x166)]='show';['description']=a32_0x3ca521(0x15a);async['execute'](_0x422a23){return this['showTable'](_0x422a23);}async['showTable'](_0x5597ec){const _0x4b74e8=a32_0x3ca521,{options:_0x168d2e,args:_0x411d81,tdx:_0x4a7367}=_0x5597ec;let _0x332b95;try{_0x332b95=parseTableReference(_0x411d81[0x0]);const _0x87583=_0x168d2e[_0x4b74e8(0x15c)];!_0x332b95[_0x4b74e8(0x15c)]&&_0x87583&&(_0x332b95[_0x4b74e8(0x15c)]=_0x87583);const _0x20cf72=validateTableDescribeReference(_0x332b95);if(_0x20cf72)return console[_0x4b74e8(0x163)](_0x4b74e8(0x16a)+_0x20cf72),console[_0x4b74e8(0x163)](_0x4b74e8(0x15e)),console[_0x4b74e8(0x163)](_0x4b74e8(0x169)),console[_0x4b74e8(0x163)](_0x4b74e8(0x174)),0x1;}catch(_0x48f0a5){return console[_0x4b74e8(0x163)](_0x4b74e8(0x16a)+_0x48f0a5[_0x4b74e8(0x170)]),console[_0x4b74e8(0x163)](_0x4b74e8(0x15e)),console[_0x4b74e8(0x163)]('\x20\x20\x20or:\x20tdx\x20show\x20<catalog.database.table>'),console['error'](_0x4b74e8(0x174)),0x1;}const _0x101b07=_0x332b95['catalog'],_0x465ec8=_0x332b95['database'],_0x4a76a3=_0x332b95[_0x4b74e8(0x16b)],_0x9ae95d=resolveLimit(_0x168d2e[_0x4b74e8(0x177)],DEFAULT_DISPLAY_LIMIT);try{_0x168d2e[_0x4b74e8(0x176)]&&(console[_0x4b74e8(0x163)](_0x4b74e8(0x16e)+_0x168d2e[_0x4b74e8(0x168)]),_0x101b07&&console[_0x4b74e8(0x163)]('Catalog:\x20'+_0x101b07),console[_0x4b74e8(0x163)](_0x4b74e8(0x156)+_0x465ec8),console[_0x4b74e8(0x163)](_0x4b74e8(0x167)+_0x4a76a3),console[_0x4b74e8(0x163)](_0x4b74e8(0x157)+_0x9ae95d));const _0x4ab16d=_0x101b07?_0x101b07+'.'+_0x465ec8+'.'+_0x4a76a3:_0x465ec8+'.'+_0x4a76a3,_0x5c8c62=await withSpinner('Querying\x20'+_0x4ab16d+_0x4b74e8(0x171),()=>_0x4a7367['query']['showTable'](_0x465ec8,_0x4a76a3,_0x9ae95d,_0x101b07),{'verbose':_0x168d2e[_0x4b74e8(0x176)]}),_0x326480=_0x5c8c62[_0x4b74e8(0x158)],_0x9a70b9=_0x326480[_0x4b74e8(0x158)];return _0x9a70b9[_0x4b74e8(0x173)]===0x0?console[_0x4b74e8(0x163)]('✔\x20Query\x20successful\x20-\x200\x20rows\x20returned'):console[_0x4b74e8(0x163)]('✔\x20Retrieved\x20'+_0x9a70b9[_0x4b74e8(0x173)]+_0x4b74e8(0x15b)+(_0x9a70b9[_0x4b74e8(0x173)]!==0x1?'s':'')+_0x4b74e8(0x15d)+_0x4ab16d),await handleSDKOutput(_0x9a70b9,_0x168d2e),0x0;}catch(_0x154779){if(_0x154779 instanceof SDKError)return console[_0x4b74e8(0x163)](_0x4b74e8(0x16a)+_0x154779[_0x4b74e8(0x170)]),_0x154779[_0x4b74e8(0x178)]&&console[_0x4b74e8(0x163)](_0x4b74e8(0x164)+_0x154779['cause']),0x1;throw _0x154779;}}[a32_0x3ca521(0x16d)](_0x3a1d3d){const _0x57d7d5=a32_0x3ca521;if(_0x3a1d3d[_0x57d7d5(0x16c)]['length']===0x0)return _0x57d7d5(0x172);if(_0x3a1d3d[_0x57d7d5(0x16c)][_0x57d7d5(0x173)]>0x1)return _0x57d7d5(0x175);return undefined;}}
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 +1 @@
1
- const a33_0x5ce0e7=a33_0x3834;(function(_0xb365a2,_0x355ec1){const _0x3bf592=a33_0x3834,_0x1630a1=_0xb365a2();while(!![]){try{const _0x7a709f=-parseInt(_0x3bf592(0x116))/0x1*(-parseInt(_0x3bf592(0x137))/0x2)+-parseInt(_0x3bf592(0x111))/0x3*(parseInt(_0x3bf592(0x126))/0x4)+-parseInt(_0x3bf592(0x112))/0x5*(-parseInt(_0x3bf592(0x115))/0x6)+parseInt(_0x3bf592(0x10f))/0x7*(-parseInt(_0x3bf592(0x134))/0x8)+-parseInt(_0x3bf592(0x12c))/0x9*(-parseInt(_0x3bf592(0x113))/0xa)+parseInt(_0x3bf592(0x13c))/0xb*(-parseInt(_0x3bf592(0x12b))/0xc)+parseInt(_0x3bf592(0x118))/0xd;if(_0x7a709f===_0x355ec1)break;else _0x1630a1['push'](_0x1630a1['shift']());}catch(_0x3912f2){_0x1630a1['push'](_0x1630a1['shift']());}}}(a33_0x4a95,0x72f99));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleSDKOutput}from'../utils/command-output.js';import{parseTableReference}from'../utils/table-ref-parser.js';import{DEFAULT_LISTING_LIMIT,resolveLimit}from'../utils/constants.js';function a33_0x4a95(){const _0x1afac9=['\x20table','List\x20tables\x20in\x20a\x20database','Note:\x20\x27','Database\x20pattern:\x20','1293492wJRMYK','Table\x20pattern:\x20','\x20\x20tdx\x20tables\x20\x22*.user*\x22\x20\x20\x20\x20\x20\x20\x20->\x20tables\x20matching\x20user*\x20across\x20databases','error','\x20\x20Or:\x20\x20tdx\x20tables\x20--database\x20','815304jvdydV','747450dCRjAs','includes','\x20\x20tdx\x20tables\x20users\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20->\x20table\x20\x22users\x22\x20across\x20all\x20databases','query','\x27\x20may\x20not\x20exist\x20or\x20contains\x20no\x20tables','cause','.*\x22','limit','24uRmYPv','Did\x20you\x20mean\x20to\x20list\x20all\x20tables\x20from\x20database\x20\x27','name','36AjbRSQ','Site:\x20','listTables','\x20\x20Use:\x20tdx\x20tables\x20\x22','\x20\x20tdx\x20tables\x20\x22mydb.*\x22\x20\x20\x20\x20\x20\x20\x20\x20->\x20all\x20tables\x20from\x20mydb','55CCVqmv','Error:\x20Too\x20many\x20arguments.\x20Use\x20single\x20argument:','✔\x20Found\x20','445403jchHRt','length','3GfZswQ','1180mlVGUp','50abjKAM','validate','11958psVgfe','14834bUBxeR','execute','2239861DMcmQr','\x20\x20Or:\x20\x20tdx\x20tables\x20--in\x20','table','\x27\x20is\x20ambiguous.','data','database','Error:\x20Pattern\x20\x27','message','Error:\x20','Database:\x20all'];a33_0x4a95=function(){return _0x1afac9;};return a33_0x4a95();}import{withSpinner}from'../utils/spinner.js';function a33_0x3834(_0x4cf22e,_0x76cabf){const _0x4a9591=a33_0x4a95();return a33_0x3834=function(_0x38342a,_0x4c2eb6){_0x38342a=_0x38342a-0x10f;let _0x2d2246=_0x4a9591[_0x38342a];return _0x2d2246;},a33_0x3834(_0x4cf22e,_0x76cabf);}export class TablesCommand extends BaseCommand{[a33_0x5ce0e7(0x136)]='tables';['description']=a33_0x5ce0e7(0x123);async[a33_0x5ce0e7(0x117)](_0x486628){const _0x4589e7=a33_0x5ce0e7,{options:_0x1a41dd,args:_0x33cb9b,tdx:_0x52c051}=_0x486628;let _0x2e29f2;if(_0x33cb9b[_0x4589e7(0x110)]===0x0)_0x2e29f2={'database':undefined,'table':undefined,'original':''};else{if(_0x33cb9b[_0x4589e7(0x110)]===0x1)try{_0x2e29f2=parseTableReference(_0x33cb9b[0x0]);if(_0x2e29f2[_0x4589e7(0x11a)]&&!_0x2e29f2['database']&&!_0x2e29f2[_0x4589e7(0x11a)][_0x4589e7(0x12d)]('*')&&!_0x2e29f2[_0x4589e7(0x11a)][_0x4589e7(0x12d)]('?'))return console[_0x4589e7(0x129)](_0x4589e7(0x11e)+_0x33cb9b[0x0]+_0x4589e7(0x11b)),console[_0x4589e7(0x129)](_0x4589e7(0x135)+_0x2e29f2[_0x4589e7(0x11a)]+'\x27?'),console[_0x4589e7(0x129)](_0x4589e7(0x13a)+_0x2e29f2[_0x4589e7(0x11a)]+_0x4589e7(0x132)),console['error'](_0x4589e7(0x119)+_0x2e29f2[_0x4589e7(0x11a)]),console[_0x4589e7(0x129)](_0x4589e7(0x12a)+_0x2e29f2['table']),console[_0x4589e7(0x129)](''),console[_0x4589e7(0x129)](_0x4589e7(0x124)+_0x33cb9b[0x0]+'\x27\x20without\x20wildcards\x20would\x20search\x20for\x20tables\x20named\x20\x27'+_0x2e29f2[_0x4589e7(0x11a)]+'\x27\x20across\x20all\x20databases.'),0x1;}catch(_0x3d735f){return console[_0x4589e7(0x129)](_0x4589e7(0x120)+_0x3d735f[_0x4589e7(0x11f)]),0x1;}else return console[_0x4589e7(0x129)](_0x4589e7(0x13d)),console['error'](_0x4589e7(0x12e)),console[_0x4589e7(0x129)](_0x4589e7(0x13b)),console[_0x4589e7(0x129)]('\x20\x20tdx\x20tables\x20\x22mydb.users\x22\x20\x20\x20\x20->\x20table\x20\x22users\x22\x20in\x20database\x20mydb'),console[_0x4589e7(0x129)](_0x4589e7(0x128)),console[_0x4589e7(0x129)]('Or\x20use\x20--in\x20flag:'),console[_0x4589e7(0x129)]('\x20\x20tdx\x20tables\x20--in\x20mydb\x20\x20\x20\x20\x20\x20\x20->\x20all\x20tables\x20from\x20mydb'),0x1;}const _0x32971e=_0x1a41dd['database'];!_0x2e29f2[_0x4589e7(0x11d)]&&_0x32971e&&(_0x2e29f2[_0x4589e7(0x11d)]=_0x32971e);try{const _0x437961=_0x310e71=>_0x310e71&&(_0x310e71['includes']('*')||_0x310e71['includes']('?')),_0x2204d2=_0x437961(_0x2e29f2[_0x4589e7(0x11d)]);_0x1a41dd['verbose']&&(console['error'](_0x4589e7(0x138)+_0x1a41dd['site']),_0x2e29f2[_0x4589e7(0x11d)]?_0x2204d2?console[_0x4589e7(0x129)](_0x4589e7(0x125)+_0x2e29f2[_0x4589e7(0x11d)]):console[_0x4589e7(0x129)]('Database:\x20'+_0x2e29f2[_0x4589e7(0x11d)]):console[_0x4589e7(0x129)](_0x4589e7(0x121)),_0x2e29f2[_0x4589e7(0x11a)]&&console[_0x4589e7(0x129)](_0x4589e7(0x127)+_0x2e29f2[_0x4589e7(0x11a)]));const _0x3df4a8=_0x2e29f2['database']&&!_0x2204d2?_0x2e29f2['database']:undefined,_0x7e88c7=_0x2204d2?_0x2e29f2[_0x4589e7(0x11d)]:undefined,_0xd35ece=_0x2e29f2[_0x4589e7(0x11a)],_0x1a76db=resolveLimit(_0x1a41dd[_0x4589e7(0x133)],DEFAULT_LISTING_LIMIT),_0x59d0eb=await withSpinner('Listing\x20tables...',()=>_0x52c051[_0x4589e7(0x12f)][_0x4589e7(0x139)](_0x3df4a8,_0xd35ece,_0x7e88c7,_0x1a76db),{'verbose':_0x1a41dd['verbose']}),_0x498739=_0x59d0eb[_0x4589e7(0x11c)];if(_0x498739[_0x4589e7(0x110)]===0x0&&_0x2e29f2[_0x4589e7(0x11d)]&&!_0x2204d2)return console[_0x4589e7(0x129)]('✖\x20No\x20tables\x20found'),console[_0x4589e7(0x129)]('Database\x20\x27'+_0x2e29f2[_0x4589e7(0x11d)]+_0x4589e7(0x130)),0x1;return console[_0x4589e7(0x129)](_0x4589e7(0x13e)+_0x498739[_0x4589e7(0x110)]+_0x4589e7(0x122)+(_0x498739[_0x4589e7(0x110)]!==0x1?'s':'')),await handleSDKOutput(_0x498739,{..._0x1a41dd,'limit':_0x1a76db}),0x0;}catch(_0x3dd599){if(_0x3dd599 instanceof SDKError)return console['error'](_0x4589e7(0x120)+_0x3dd599[_0x4589e7(0x11f)]),_0x3dd599[_0x4589e7(0x131)]&&console['error']('\x20\x20Cause:\x20'+_0x3dd599['cause']),0x1;throw _0x3dd599;}}[a33_0x5ce0e7(0x114)](_0xb7edf0){return undefined;}}
1
+ const a33_0x5b9b7b=a33_0x18d8;function a33_0x8550(){const _0x26de10=['\x20\x20tdx\x20tables\x20\x22mydb.*\x22\x20\x20\x20\x20\x20\x20\x20\x20->\x20all\x20tables\x20from\x20mydb','1031217STmtgp','Database:\x20','✔\x20Found\x20','error','\x27\x20across\x20all\x20databases.','Or\x20use\x20--in\x20flag:','\x27\x20without\x20wildcards\x20would\x20search\x20for\x20tables\x20named\x20\x27','validate','6ObgCNU','Error:\x20','name','database','Table\x20pattern:\x20','query','50880kBkSCH','verbose','483556vdfNjf','\x20\x20Or:\x20\x20tdx\x20tables\x20--database\x20','63vRIhlX','\x27\x20is\x20ambiguous.','Database:\x20all','Database\x20\x27','242568wFFVcN','\x20\x20Use:\x20tdx\x20tables\x20\x22','\x20\x20Or:\x20\x20tdx\x20tables\x20--in\x20','128469qCDRsu','tables','description','execute','719411lUURTR','Note:\x20\x27','.*\x22','table','cause','1382064BudLSv','length','includes','Did\x20you\x20mean\x20to\x20list\x20all\x20tables\x20from\x20database\x20\x27','data','site','message','\x20\x20tdx\x20tables\x20\x22mydb.users\x22\x20\x20\x20\x20->\x20table\x20\x22users\x22\x20in\x20database\x20mydb','✖\x20No\x20tables\x20found','Site:\x20','Database\x20pattern:\x20'];a33_0x8550=function(){return _0x26de10;};return a33_0x8550();}(function(_0x5ec1f9,_0xd1b881){const _0x3e048a=a33_0x18d8,_0x40e3e7=_0x5ec1f9();while(!![]){try{const _0x53b230=parseInt(_0x3e048a(0x13e))/0x1+-parseInt(_0x3e048a(0x135))/0x2+-parseInt(_0x3e048a(0x125))/0x3+parseInt(_0x3e048a(0x147))/0x4+parseInt(_0x3e048a(0x133))/0x5*(-parseInt(_0x3e048a(0x12d))/0x6)+parseInt(_0x3e048a(0x142))/0x7+-parseInt(_0x3e048a(0x13b))/0x8*(-parseInt(_0x3e048a(0x137))/0x9);if(_0x53b230===_0xd1b881)break;else _0x40e3e7['push'](_0x40e3e7['shift']());}catch(_0xa3932c){_0x40e3e7['push'](_0x40e3e7['shift']());}}}(a33_0x8550,0x2f320));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleSDKOutput}from'../utils/command-output.js';import{parseTableReference}from'../utils/table-ref-parser.js';import{DEFAULT_LISTING_LIMIT,resolveLimit}from'../utils/constants.js';import{withSpinner}from'../utils/spinner.js';function a33_0x18d8(_0x26f590,_0x59a023){const _0x855063=a33_0x8550();return a33_0x18d8=function(_0x18d81c,_0x3c0c35){_0x18d81c=_0x18d81c-0x11e;let _0x4bcdc2=_0x855063[_0x18d81c];return _0x4bcdc2;},a33_0x18d8(_0x26f590,_0x59a023);}export class TablesCommand extends BaseCommand{[a33_0x5b9b7b(0x12f)]=a33_0x5b9b7b(0x13f);[a33_0x5b9b7b(0x140)]='List\x20tables\x20in\x20a\x20database';async[a33_0x5b9b7b(0x141)](_0x246d69){const _0x380b6e=a33_0x5b9b7b,{options:_0x3bbc2a,args:_0x1e0ce5,tdx:_0xbec6b0}=_0x246d69;let _0x328ca7;if(_0x1e0ce5[_0x380b6e(0x148)]===0x0)_0x328ca7={'database':undefined,'table':undefined,'original':''};else{if(_0x1e0ce5[_0x380b6e(0x148)]===0x1)try{_0x328ca7=parseTableReference(_0x1e0ce5[0x0]);if(_0x328ca7[_0x380b6e(0x145)]&&!_0x328ca7[_0x380b6e(0x130)]&&!_0x328ca7[_0x380b6e(0x145)][_0x380b6e(0x149)]('*')&&!_0x328ca7[_0x380b6e(0x145)][_0x380b6e(0x149)]('?'))return console['error']('Error:\x20Pattern\x20\x27'+_0x1e0ce5[0x0]+_0x380b6e(0x138)),console[_0x380b6e(0x128)](_0x380b6e(0x14a)+_0x328ca7[_0x380b6e(0x145)]+'\x27?'),console['error'](_0x380b6e(0x13c)+_0x328ca7[_0x380b6e(0x145)]+_0x380b6e(0x144)),console[_0x380b6e(0x128)](_0x380b6e(0x13d)+_0x328ca7[_0x380b6e(0x145)]),console[_0x380b6e(0x128)](_0x380b6e(0x136)+_0x328ca7['table']),console[_0x380b6e(0x128)](''),console[_0x380b6e(0x128)](_0x380b6e(0x143)+_0x1e0ce5[0x0]+_0x380b6e(0x12b)+_0x328ca7['table']+_0x380b6e(0x129)),0x1;}catch(_0x5bc60f){return console[_0x380b6e(0x128)]('Error:\x20'+_0x5bc60f[_0x380b6e(0x11f)]),0x1;}else return console[_0x380b6e(0x128)]('Error:\x20Too\x20many\x20arguments.\x20Use\x20single\x20argument:'),console[_0x380b6e(0x128)]('\x20\x20tdx\x20tables\x20users\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20->\x20table\x20\x22users\x22\x20across\x20all\x20databases'),console[_0x380b6e(0x128)](_0x380b6e(0x124)),console[_0x380b6e(0x128)](_0x380b6e(0x120)),console[_0x380b6e(0x128)]('\x20\x20tdx\x20tables\x20\x22*.user*\x22\x20\x20\x20\x20\x20\x20\x20->\x20tables\x20matching\x20user*\x20across\x20databases'),console['error'](_0x380b6e(0x12a)),console[_0x380b6e(0x128)]('\x20\x20tdx\x20tables\x20--in\x20mydb\x20\x20\x20\x20\x20\x20\x20->\x20all\x20tables\x20from\x20mydb'),0x1;}const _0xbe853f=_0x3bbc2a[_0x380b6e(0x130)];!_0x328ca7['database']&&_0xbe853f&&(_0x328ca7[_0x380b6e(0x130)]=_0xbe853f);try{const _0xdff1fe=_0x3dc05c=>_0x3dc05c&&(_0x3dc05c[_0x380b6e(0x149)]('*')||_0x3dc05c[_0x380b6e(0x149)]('?')),_0x441cd0=_0xdff1fe(_0x328ca7[_0x380b6e(0x130)]);_0x3bbc2a[_0x380b6e(0x134)]&&(console[_0x380b6e(0x128)](_0x380b6e(0x122)+_0x3bbc2a[_0x380b6e(0x11e)]),_0x328ca7[_0x380b6e(0x130)]?_0x441cd0?console[_0x380b6e(0x128)](_0x380b6e(0x123)+_0x328ca7[_0x380b6e(0x130)]):console['error'](_0x380b6e(0x126)+_0x328ca7[_0x380b6e(0x130)]):console[_0x380b6e(0x128)](_0x380b6e(0x139)),_0x328ca7[_0x380b6e(0x145)]&&console['error'](_0x380b6e(0x131)+_0x328ca7[_0x380b6e(0x145)]));const _0x20fd12=_0x328ca7['database']&&!_0x441cd0?_0x328ca7[_0x380b6e(0x130)]:undefined,_0xd09209=_0x441cd0?_0x328ca7[_0x380b6e(0x130)]:undefined,_0x4a1e9f=_0x328ca7[_0x380b6e(0x145)],_0x47dd5c=resolveLimit(_0x3bbc2a['limit'],DEFAULT_LISTING_LIMIT),_0x6a62f5=await withSpinner('Listing\x20tables...',()=>_0xbec6b0[_0x380b6e(0x132)]['listTables'](_0x20fd12,_0x4a1e9f,_0xd09209,_0x47dd5c),{'verbose':_0x3bbc2a[_0x380b6e(0x134)]}),_0xa7bdd0=_0x6a62f5[_0x380b6e(0x14b)];if(_0xa7bdd0[_0x380b6e(0x148)]===0x0&&_0x328ca7['database']&&!_0x441cd0)return console['error'](_0x380b6e(0x121)),console[_0x380b6e(0x128)](_0x380b6e(0x13a)+_0x328ca7[_0x380b6e(0x130)]+'\x27\x20may\x20not\x20exist\x20or\x20contains\x20no\x20tables'),0x1;return console[_0x380b6e(0x128)](_0x380b6e(0x127)+_0xa7bdd0[_0x380b6e(0x148)]+'\x20table'+(_0xa7bdd0[_0x380b6e(0x148)]!==0x1?'s':'')),await handleSDKOutput(_0xa7bdd0,{..._0x3bbc2a,'limit':_0x47dd5c}),0x0;}catch(_0x78befa){if(_0x78befa instanceof SDKError)return console['error'](_0x380b6e(0x12e)+_0x78befa[_0x380b6e(0x11f)]),_0x78befa[_0x380b6e(0x146)]&&console[_0x380b6e(0x128)]('\x20\x20Cause:\x20'+_0x78befa[_0x380b6e(0x146)]),0x1;throw _0x78befa;}}[a33_0x5b9b7b(0x12c)](_0x491898){return undefined;}}
@@ -1 +1 @@
1
- function a34_0x4a18(_0x272dbf,_0x3f6dc8){const _0x4290c0=a34_0x4290();return a34_0x4a18=function(_0x4a1823,_0x87e3a6){_0x4a1823=_0x4a1823-0xef;let _0x5411cc=_0x4290c0[_0x4a1823];return _0x5411cc;},a34_0x4a18(_0x272dbf,_0x3f6dc8);}const a34_0x113830=a34_0x4a18;function a34_0x4290(){const _0x59f721=['engage_workspace','use','Usage:\x20tdx\x20use\x20<resource>\x20<value>\x0a','606240xeemvC','\x0aTip:\x20Use\x20\x27tdx\x20context\x20--clear\x27\x20to\x20clear\x20session\x20overrides','388258jwhyQH','1cckcJo','Session\x20engage_workspace\x20set\x20to:\x20','416FoBjUF','message','\x0aRun\x20\x27tdx\x20use\x20--help\x27\x20for\x20more\x20options','join','llm_project','Session\x20llm_project\x20set\x20to:\x20','Error:\x20','Session\x20parent_segment\x20set\x20to:\x20','includes','Invalid\x20resource:\x20','log','description','273880rHZwHC','name','\x20(session:\x20','database','length','session','1391964zBItga','profile','Session\x20profile\x20set\x20to:\x20','Resources:\x20database,\x20parent_segment,\x20llm_project,\x20profile\x0a','Error:\x20Profile\x20\x27','612900bgMLbS','Set\x20session-level\x20context','6430rXDUxh','\x0aUse\x20\x27tdx\x20profiles\x27\x20to\x20see\x20available\x20profiles','166854QPZQlx','parent_segment','error','Or\x20use:\x20tdx\x20context\x20--clear\x20to\x20clear\x20session\x20context\x0a'];a34_0x4290=function(){return _0x59f721;};return a34_0x4290();}(function(_0xd4efb,_0xe2eeab){const _0x4389f6=a34_0x4a18,_0xb76948=_0xd4efb();while(!![]){try{const _0x230c89=parseInt(_0x4389f6(0xfc))/0x1*(parseInt(_0x4389f6(0xfb))/0x2)+parseInt(_0x4389f6(0xf2))/0x3+-parseInt(_0x4389f6(0xfe))/0x4*(parseInt(_0x4389f6(0xf0))/0x5)+-parseInt(_0x4389f6(0xf9))/0x6+parseInt(_0x4389f6(0x110))/0x7+-parseInt(_0x4389f6(0x10a))/0x8+-parseInt(_0x4389f6(0x115))/0x9;if(_0x230c89===_0xe2eeab)break;else _0xb76948['push'](_0xb76948['shift']());}catch(_0x204d62){_0xb76948['push'](_0xb76948['shift']());}}}(a34_0x4290,0x1b378));import{BaseCommand}from'./command.js';import{saveSessionContext,getCurrentSessionPID}from'../core/session.js';import{profileExists}from'../core/profile.js';export class UseCommand extends BaseCommand{[a34_0x113830(0x10b)]=a34_0x113830(0xf7);[a34_0x113830(0x109)]=a34_0x113830(0xef);['validate'](_0x310383){const _0x52be40=a34_0x113830,{args:_0x359a5c}=_0x310383;if(_0x359a5c[_0x52be40(0x10e)]<0x2)return _0x52be40(0xf8)+_0x52be40(0x113)+_0x52be40(0xf5)+_0x52be40(0x100);const _0xcdb549=_0x359a5c[0x0],_0x242ca6=[_0x52be40(0x10d),_0x52be40(0xf3),_0x52be40(0x102),'profile',_0x52be40(0xf6)];if(!_0x242ca6[_0x52be40(0x106)](_0xcdb549))return _0x52be40(0x107)+_0xcdb549+'.\x20Must\x20be\x20one\x20of:\x20'+_0x242ca6[_0x52be40(0x101)](',\x20');return undefined;}async['execute'](_0x27760d){const _0x5290b3=a34_0x113830,{args:_0x4819de,options:_0x5677dc}=_0x27760d;try{const _0xa62d5b=_0x4819de[0x0],_0x521477=_0x4819de[0x1];if(_0xa62d5b===_0x5290b3(0x111)){if(!profileExists(_0x521477))return console[_0x5290b3(0xf4)](_0x5290b3(0x114)+_0x521477+'\x27\x20does\x20not\x20exist'),console['error'](_0x5290b3(0xf1)),0x1;const _0x3bd5b5=_0x5677dc[_0x5290b3(0x10f)]||getCurrentSessionPID()['toString']();return saveSessionContext({'profile':_0x521477},_0x5677dc[_0x5290b3(0x10f)]),console[_0x5290b3(0x108)](_0x5290b3(0x112)+_0x521477+_0x5290b3(0x10c)+_0x3bd5b5+')'),console['log'](_0x5290b3(0xfa)),0x0;}const _0x4bf4a0={},_0x3b4243=_0x5677dc[_0x5290b3(0x10f)]||getCurrentSessionPID()['toString']();switch(_0xa62d5b){case _0x5290b3(0x10d):_0x4bf4a0['database']=_0x521477,console[_0x5290b3(0x108)]('Session\x20database\x20set\x20to:\x20'+_0x521477+_0x5290b3(0x10c)+_0x3b4243+')');break;case'parent_segment':_0x4bf4a0[_0x5290b3(0xf3)]=_0x521477,console[_0x5290b3(0x108)](_0x5290b3(0x105)+_0x521477+_0x5290b3(0x10c)+_0x3b4243+')');break;case _0x5290b3(0x102):_0x4bf4a0[_0x5290b3(0x102)]=_0x521477,console[_0x5290b3(0x108)](_0x5290b3(0x103)+_0x521477+_0x5290b3(0x10c)+_0x3b4243+')');break;case _0x5290b3(0xf6):_0x4bf4a0['engage_workspace']=_0x521477,console['log'](_0x5290b3(0xfd)+_0x521477+'\x20(session:\x20'+_0x3b4243+')');break;}return saveSessionContext(_0x4bf4a0,_0x5677dc[_0x5290b3(0x10f)]),console['log']('\x0aTip:\x20Use\x20\x27tdx\x20context\x20--clear\x27\x20to\x20clear\x20session\x20overrides'),0x0;}catch(_0x41ab0e){return _0x41ab0e instanceof Error&&console[_0x5290b3(0xf4)](_0x5290b3(0x104)+_0x41ab0e[_0x5290b3(0xff)]),0x1;}}}
1
+ const a34_0x32ce9d=a34_0x1a64;(function(_0x5ffe8e,_0x289c29){const _0x267e52=a34_0x1a64,_0x199e60=_0x5ffe8e();while(!![]){try{const _0x444d0b=-parseInt(_0x267e52(0x134))/0x1*(-parseInt(_0x267e52(0x12d))/0x2)+parseInt(_0x267e52(0x122))/0x3+parseInt(_0x267e52(0x11f))/0x4*(-parseInt(_0x267e52(0x110))/0x5)+-parseInt(_0x267e52(0x129))/0x6*(parseInt(_0x267e52(0x11c))/0x7)+-parseInt(_0x267e52(0x113))/0x8+parseInt(_0x267e52(0x111))/0x9*(parseInt(_0x267e52(0x120))/0xa)+-parseInt(_0x267e52(0x126))/0xb*(-parseInt(_0x267e52(0x130))/0xc);if(_0x444d0b===_0x289c29)break;else _0x199e60['push'](_0x199e60['shift']());}catch(_0x5ed447){_0x199e60['push'](_0x199e60['shift']());}}}(a34_0x2de0,0x9dd9b));import{BaseCommand}from'./command.js';import{saveSessionContext,getCurrentSessionPID}from'../core/session.js';function a34_0x1a64(_0x366c60,_0xcb2cd3){const _0x2de04c=a34_0x2de0();return a34_0x1a64=function(_0x1a64e6,_0x21f3fc){_0x1a64e6=_0x1a64e6-0x10e;let _0x15a9b3=_0x2de04c[_0x1a64e6];return _0x15a9b3;},a34_0x1a64(_0x366c60,_0xcb2cd3);}import{profileExists}from'../core/profile.js';export class UseCommand extends BaseCommand{['name']='use';[a34_0x32ce9d(0x132)]=a34_0x32ce9d(0x116);[a34_0x32ce9d(0x12a)](_0x45161f){const _0x3816ad=a34_0x32ce9d,{args:_0x53054b}=_0x45161f;if(_0x53054b['length']<0x2)return _0x3816ad(0x11e)+_0x3816ad(0x127)+_0x3816ad(0x11a)+_0x3816ad(0x12c);const _0x21f7db=_0x53054b[0x0],_0x5236e9=[_0x3816ad(0x125),_0x3816ad(0x117),_0x3816ad(0x112),_0x3816ad(0x131),_0x3816ad(0x118)];if(!_0x5236e9[_0x3816ad(0x124)](_0x21f7db))return'Invalid\x20resource:\x20'+_0x21f7db+_0x3816ad(0x133)+_0x5236e9[_0x3816ad(0x115)](',\x20');return undefined;}async[a34_0x32ce9d(0x135)](_0x57be73){const _0x4a226e=a34_0x32ce9d,{args:_0x21b640,options:_0x2ba6b9}=_0x57be73;try{const _0x3f8b3e=_0x21b640[0x0],_0x3b247b=_0x21b640[0x1];if(_0x3f8b3e===_0x4a226e(0x131)){if(!profileExists(_0x3b247b))return console[_0x4a226e(0x12e)](_0x4a226e(0x12f)+_0x3b247b+_0x4a226e(0x123)),console[_0x4a226e(0x12e)]('\x0aUse\x20\x27tdx\x20profiles\x27\x20to\x20see\x20available\x20profiles'),0x1;const _0x113b4d=_0x2ba6b9[_0x4a226e(0x121)]||getCurrentSessionPID()[_0x4a226e(0x12b)]();return saveSessionContext({'profile':_0x3b247b},_0x2ba6b9[_0x4a226e(0x121)]),console[_0x4a226e(0x10e)](_0x4a226e(0x119)+_0x3b247b+_0x4a226e(0x114)+_0x113b4d+')'),console['log'](_0x4a226e(0x11d)),0x0;}const _0x5703ec={},_0x4c64c7=_0x2ba6b9[_0x4a226e(0x121)]||getCurrentSessionPID()[_0x4a226e(0x12b)]();switch(_0x3f8b3e){case _0x4a226e(0x125):_0x5703ec['database']=_0x3b247b,console['log']('Session\x20database\x20set\x20to:\x20'+_0x3b247b+'\x20(session:\x20'+_0x4c64c7+')');break;case _0x4a226e(0x117):_0x5703ec['parent_segment']=_0x3b247b,console['log'](_0x4a226e(0x128)+_0x3b247b+_0x4a226e(0x114)+_0x4c64c7+')');break;case _0x4a226e(0x112):_0x5703ec[_0x4a226e(0x112)]=_0x3b247b,console[_0x4a226e(0x10e)]('Session\x20llm_project\x20set\x20to:\x20'+_0x3b247b+'\x20(session:\x20'+_0x4c64c7+')');break;case _0x4a226e(0x118):_0x5703ec[_0x4a226e(0x118)]=_0x3b247b,console[_0x4a226e(0x10e)](_0x4a226e(0x10f)+_0x3b247b+'\x20(session:\x20'+_0x4c64c7+')');break;}return saveSessionContext(_0x5703ec,_0x2ba6b9[_0x4a226e(0x121)]),console[_0x4a226e(0x10e)](_0x4a226e(0x11d)),0x0;}catch(_0x39d5ac){return _0x39d5ac instanceof Error&&console[_0x4a226e(0x12e)](_0x4a226e(0x11b)+_0x39d5ac['message']),0x1;}}}function a34_0x2de0(){const _0x3e73e3=['Error:\x20Profile\x20\x27','37788BIMdWl','profile','description','.\x20Must\x20be\x20one\x20of:\x20','442324lOgKzO','execute','log','Session\x20engage_workspace\x20set\x20to:\x20','365nLszFh','4203VugKYX','llm_project','9465896wdNwaU','\x20(session:\x20','join','Set\x20session-level\x20context','parent_segment','engage_workspace','Session\x20profile\x20set\x20to:\x20','Or\x20use:\x20tdx\x20context\x20--clear\x20to\x20clear\x20session\x20context\x0a','Error:\x20','175tgqyoo','\x0aTip:\x20Use\x20\x27tdx\x20context\x20--clear\x27\x20to\x20clear\x20session\x20overrides','Usage:\x20tdx\x20use\x20<resource>\x20<value>\x0a','11596lashdD','12290CgIsuW','session','1161105ExCnWT','\x27\x20does\x20not\x20exist','includes','database','5027oeXAXR','Resources:\x20database,\x20parent_segment,\x20llm_project,\x20profile\x0a','Session\x20parent_segment\x20set\x20to:\x20','298392OFJdDK','validate','toString','\x0aRun\x20\x27tdx\x20use\x20--help\x27\x20for\x20more\x20options','4FHUGUG','error'];a34_0x2de0=function(){return _0x3e73e3;};return a34_0x2de0();}