@treasuredata/tdx 0.1.16 → 0.1.17

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 (85) hide show
  1. package/README.md +10 -0
  2. package/dist/cli.js +1 -1
  3. package/dist/cli.js.map +1 -1
  4. package/dist/client/cdp-client.js +1 -1
  5. package/dist/client/http-client.js +1 -1
  6. package/dist/client/llm-client.js +1 -1
  7. package/dist/client/rate-limiter.js +1 -1
  8. package/dist/client/td-client.js +1 -1
  9. package/dist/client/trino-client.js +1 -1
  10. package/dist/client/workflow-client.js +1 -1
  11. package/dist/commands/activations.js +1 -1
  12. package/dist/commands/api-command.js +1 -1
  13. package/dist/commands/chat-command.js +1 -1
  14. package/dist/commands/claude-command.js +1 -1
  15. package/dist/commands/claude-command.js.map +1 -1
  16. package/dist/commands/command.js +1 -1
  17. package/dist/commands/context-command.js +1 -1
  18. package/dist/commands/databases.js +1 -1
  19. package/dist/commands/describe.js +1 -1
  20. package/dist/commands/job-command.js +1 -1
  21. package/dist/commands/llm-command.js +1 -1
  22. package/dist/commands/llm-proxy.js +1 -1
  23. package/dist/commands/parent-segment-command.js +1 -1
  24. package/dist/commands/profiles-command.js +1 -1
  25. package/dist/commands/query-command.js +1 -1
  26. package/dist/commands/segment-command.js +1 -1
  27. package/dist/commands/segment-create-command.js +1 -1
  28. package/dist/commands/segment-fields-command.js +1 -1
  29. package/dist/commands/segment-pwd-command.js +1 -1
  30. package/dist/commands/segment-update-command.js +1 -1
  31. package/dist/commands/segment-use-command.js +1 -1
  32. package/dist/commands/segments.js +1 -1
  33. package/dist/commands/show.js +1 -1
  34. package/dist/commands/tables.js +1 -1
  35. package/dist/commands/use-command.js +1 -1
  36. package/dist/commands/workflow-command.js +1 -1
  37. package/dist/core/auth.js +1 -1
  38. package/dist/core/config.js +1 -1
  39. package/dist/core/global-context.js +1 -1
  40. package/dist/core/profile.js +1 -1
  41. package/dist/core/project-config.js +1 -1
  42. package/dist/core/session.js +1 -1
  43. package/dist/index.js +1 -1
  44. package/dist/proxy/anthropic-adapter.d.ts +20 -2
  45. package/dist/proxy/anthropic-adapter.d.ts.map +1 -1
  46. package/dist/proxy/anthropic-adapter.js +1 -1
  47. package/dist/proxy/anthropic-adapter.js.map +1 -1
  48. package/dist/proxy/server.d.ts.map +1 -1
  49. package/dist/proxy/server.js +1 -1
  50. package/dist/proxy/server.js.map +1 -1
  51. package/dist/sdk/api.js +1 -1
  52. package/dist/sdk/database.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/table.js +1 -1
  60. package/dist/sdk/workflow.js +1 -1
  61. package/dist/types/endpoints.js +1 -1
  62. package/dist/types/index.js +1 -1
  63. package/dist/utils/agent-ref-parser.js +1 -1
  64. package/dist/utils/chat-cache.js +1 -1
  65. package/dist/utils/colors.js +1 -1
  66. package/dist/utils/command-output.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/model-aliases.js +1 -1
  72. package/dist/utils/option-validation.js +1 -1
  73. package/dist/utils/port.js +1 -1
  74. package/dist/utils/process.js +1 -1
  75. package/dist/utils/prompt.js +1 -1
  76. package/dist/utils/segment-path-parser.js +1 -1
  77. package/dist/utils/segment-ref-parser.js +1 -1
  78. package/dist/utils/spinner.js +1 -1
  79. package/dist/utils/sql-parser.js +1 -1
  80. package/dist/utils/sse-parser.js +1 -1
  81. package/dist/utils/string-utils.js +1 -1
  82. package/dist/utils/table-ref-parser.js +1 -1
  83. package/dist/utils/tree-formatter.js +1 -1
  84. package/dist/utils/workflow-utils.js +1 -1
  85. package/package.json +1 -1
@@ -1 +1 @@
1
- const a22_0x2f57a5=a22_0x548f;(function(_0x451db9,_0x268c7b){const _0x452b88=a22_0x548f,_0x5e533e=_0x451db9();while(!![]){try{const _0xb452f0=-parseInt(_0x452b88(0x1d5))/0x1*(-parseInt(_0x452b88(0x1ad))/0x2)+parseInt(_0x452b88(0x1f1))/0x3*(parseInt(_0x452b88(0x1bd))/0x4)+parseInt(_0x452b88(0x1c8))/0x5+-parseInt(_0x452b88(0x1e7))/0x6+parseInt(_0x452b88(0x1c1))/0x7+-parseInt(_0x452b88(0x1ba))/0x8*(parseInt(_0x452b88(0x19e))/0x9)+-parseInt(_0x452b88(0x1b6))/0xa*(parseInt(_0x452b88(0x1ab))/0xb);if(_0xb452f0===_0x268c7b)break;else _0x5e533e['push'](_0x5e533e['shift']());}catch(_0x3425f1){_0x5e533e['push'](_0x5e533e['shift']());}}}(a22_0x3f09,0x8304d));import{BaseCommand}from'./command.js';import{SDKError,ErrorCode}from'../sdk/index.js';import{handleSDKOutput,handleQueryOutput}from'../utils/command-output.js';function a22_0x548f(_0x3b2740,_0xf08107){const _0x3f09d6=a22_0x3f09();return a22_0x548f=function(_0x548f55,_0x257fcd){_0x548f55=_0x548f55-0x17b;let _0x2d2de1=_0x3f09d6[_0x548f55];return _0x2d2de1;},a22_0x548f(_0x3b2740,_0xf08107);}import{withSpinner,withQuerySpinner,formatElapsed}from'../utils/spinner.js';function a22_0x3f09(){const _0x2c5cec=['8680370iRHbYV','Resolving\x20parent\x20folder\x20\x27','jsonl','Creating\x20folder\x20\x27','496248eUeblv','Fetching\x20folder\x20\x27','Segment\x20ID\x20missing\x20from\x20resolved\x20path','2492JWcVOj','resolvePathToResource','length','execute','3643010UVvXKA','Parent\x20ID:\x20','SQL\x20query:\x0a','code','Parent\x20name:\x20','segmentId','Site:\x20','4059080wTfqMU','Error:\x20','Resolving\x20parent\x20segment\x20\x27','test','cause','site','createFolder','\x20folder','getSegmentSQL','\x20\x20Cause:\x20','getFolder','Execute\x20segment\x20SQL\x20query\x20and\x20show\x20results','data','1cDZfOY','segment:describe','\x20\x20tdx\x20segment\x20describe\x20\x22My\x20Audience\x22','toLocaleString','jobId','setJobId','Fetching\x20SQL\x20for\x20parent\x20segment...','format','\x20\x20tdx\x20segment\x20show\x20\x22My\x20Audience/Marketing/High\x20Value\x22','\x20rows\x20','Resolved\x20type:\x20','\x20\x20tdx\x20segment\x20describe\x20\x22My\x20Audience/Marketing/High\x20Value\x22','getSegment','folder','Usage:\x20tdx\x20segment\x20folder\x20list\x20<parent_name>','description','includes','parentFolder','2421132KKtjKr','\x20\x20tdx\x20segment\x20sql\x20\x22My\x20Audience/Marketing/High\x20Value\x22','Use:\x20tdx\x20segment\x20describe\x20<path>\x20\x20#\x20To\x20show\x20folder\x20details','segment:folder:create','\x27...','Show\x20segment\x20folder\x20details','Resolved\x20folder\x20ID:\x20','\x20\x20tdx\x20segment\x20show\x20\x22My\x20Audience\x22','Usage:\x20tdx\x20segment\x20describe\x20<path>','segment:folder:show','3099dJKSvM','Folder\x20name:\x20','Usage:\x20tdx\x20segment\x20folder\x20create\x20<parent_name>\x20<folder_name>\x20[options]','json','trim','\x0a)\x20AS\x20segment_query\x0aLIMIT\x20','Create\x20segment\x20folder\x20for\x20organization','Error:\x20Path\x20or\x20name\x20is\x20required','Error:\x20Cannot\x20execute\x20SQL\x20query\x20on\x20a\x20folder.','getParentSQL','Resolved\x20parent\x20ID:\x20','Show\x20segment\x20or\x20folder\x20details','type','\x20\x20tdx\x20segment\x20sql\x20\x22My\x20Audience\x22','resolveParentId','✖\x20Query\x20failed\x20[','Resolved\x20parent\x20folder\x20ID:\x20','Listing\x20folders\x20for\x20parent\x20\x27','Examples:','Resolved\x20relative\x20path\x20to:\x20','Usage:\x20tdx\x20segment\x20sql\x20<path>','Parent\x20segment:\x20','in\x20','processedRows','Usage:\x20tdx\x20segment\x20folder\x20show\x20<parent_name/folder_name>','replace','Executing\x20segment\x20query...','segmentPath','Error:\x20Parent\x20segment\x20name\x20and\x20folder\x20name\x20are\x20required','SELECT\x20*\x20FROM\x20(\x0a','query','✔\x20Found\x20','segment:show','listFolders','\x20\x20tdx\x20segment\x20describe\x20\x22High\x20Value\x22\x20\x20\x20\x20#\x20Relative\x20to\x20current\x20context','segment','Resolving\x20folder\x20\x27','144uIcOYs','parent','name','message','log','segment:folder:list','Folders\x20are\x20organizational\x20containers,\x20not\x20queryable\x20segments.','information_schema','folderId','parentId','Resolving\x20path\x20\x27','stats','verbose','11TKiPYg','INTERNAL','1649806SoZEAw','Error:\x20Segment\x20path\x20or\x20name\x20is\x20required','error','Fetching\x20segment\x20details...','List\x20segment\x20folders\x20under\x20a\x20parent\x20segment','Folder\x20ID:\x20','Segment\x20ID:\x20','✔\x20Query\x20completed:\x20Processed\x20','Fetching\x20SQL\x20for\x20segment...'];a22_0x3f09=function(){return _0x2c5cec;};return a22_0x3f09();}import{parseSegmentRef}from'../utils/segment-ref-parser.js';export class SegmentDescribeCommand extends BaseCommand{[a22_0x2f57a5(0x1a0)]=a22_0x2f57a5(0x1d6);[a22_0x2f57a5(0x1e4)]=a22_0x2f57a5(0x184);async[a22_0x2f57a5(0x1c0)](_0xdf8316){const _0x530318=a22_0x2f57a5,{options:_0x8909d4,args:_0x23ccf9,tdx:_0x271b9b}=_0xdf8316;if(_0x23ccf9[_0x530318(0x1bf)]===0x0)return console['error'](_0x530318(0x180)),console['error'](_0x530318(0x1ef)),console[_0x530318(0x1af)](_0x530318(0x18b)),console['error'](_0x530318(0x1d7)),console[_0x530318(0x1af)](_0x530318(0x1e0)),console[_0x530318(0x1af)](_0x530318(0x19b)),0x1;try{const _0x7e0034=_0x23ccf9[0x0],_0x1c0073=_0x8909d4['segmentPath'];let _0x48463c=_0x7e0034;_0x1c0073&&!_0x7e0034[_0x530318(0x1e5)]('/')&&(_0x48463c=_0x1c0073+'/'+_0x7e0034,_0x8909d4[_0x530318(0x1aa)]&&console['error'](_0x530318(0x18c)+_0x48463c));const _0x2385e0=await withSpinner(_0x530318(0x1a8)+_0x48463c+'\x27...',()=>_0x271b9b[_0x530318(0x19c)][_0x530318(0x1be)](_0x48463c),{'verbose':_0x8909d4[_0x530318(0x1aa)]}),_0x4ea133=_0x2385e0['data'];_0x8909d4[_0x530318(0x1aa)]&&(console[_0x530318(0x1af)](_0x530318(0x1df)+_0x4ea133[_0x530318(0x185)]),console['error'](_0x530318(0x1c2)+_0x4ea133[_0x530318(0x1a7)]),_0x4ea133['folderId']&&console[_0x530318(0x1af)](_0x530318(0x1b2)+_0x4ea133['folderId']),_0x4ea133[_0x530318(0x1c6)]&&console[_0x530318(0x1af)](_0x530318(0x1b3)+_0x4ea133['segmentId']));if(_0x4ea133[_0x530318(0x185)]===_0x530318(0x19f)){const _0x3e7a5c=await withSpinner('Fetching\x20parent\x20segment\x20details...',()=>_0x271b9b['segment']['getParent'](_0x4ea133[_0x530318(0x1a7)]),{'verbose':_0x8909d4[_0x530318(0x1aa)]});await handleSDKOutput([_0x3e7a5c[_0x530318(0x1d4)]],_0x8909d4);}else{if(_0x4ea133[_0x530318(0x185)]===_0x530318(0x1e2)){if(!_0x4ea133[_0x530318(0x1a6)])throw new SDKError(ErrorCode['INTERNAL'],'Folder\x20ID\x20missing\x20from\x20resolved\x20path');const _0x281bdc=await withSpinner('Fetching\x20folder\x20details...',()=>_0x271b9b[_0x530318(0x19c)]['getFolder'](_0x4ea133[_0x530318(0x1a6)]),{'verbose':_0x8909d4[_0x530318(0x1aa)]});await handleSDKOutput([_0x281bdc['data']],_0x8909d4);}else{if(_0x4ea133[_0x530318(0x185)]===_0x530318(0x19c)){if(!_0x4ea133[_0x530318(0x1c6)])throw new SDKError(ErrorCode[_0x530318(0x1ac)],_0x530318(0x1bc));const _0x35edc3=await withSpinner(_0x530318(0x1b0),()=>_0x271b9b['segment'][_0x530318(0x1e1)](_0x4ea133[_0x530318(0x1a7)],_0x4ea133[_0x530318(0x1c6)]),{'verbose':_0x8909d4['verbose']});await handleSDKOutput([_0x35edc3[_0x530318(0x1d4)]],_0x8909d4);}}}return 0x0;}catch(_0x4503f5){if(_0x4503f5 instanceof SDKError)return console[_0x530318(0x1af)](_0x530318(0x1c9)+_0x4503f5['message']),_0x4503f5[_0x530318(0x1cc)]&&console['error'](_0x530318(0x1d1)+_0x4503f5[_0x530318(0x1cc)]),0x1;throw _0x4503f5;}}}export class SegmentShowCommand extends BaseCommand{['name']=a22_0x2f57a5(0x199);[a22_0x2f57a5(0x1e4)]=a22_0x2f57a5(0x1d3);async['execute'](_0x344cab){const _0x2b3ac2=a22_0x2f57a5,{options:_0x48def8,args:_0x295898,tdx:_0x1cb361}=_0x344cab;if(_0x295898['length']===0x0)return console[_0x2b3ac2(0x1af)]('Error:\x20Segment\x20path\x20or\x20name\x20is\x20required'),console[_0x2b3ac2(0x1af)]('Usage:\x20tdx\x20segment\x20show\x20<path>'),console[_0x2b3ac2(0x1af)](_0x2b3ac2(0x18b)),console[_0x2b3ac2(0x1af)](_0x2b3ac2(0x1ee)),console['error'](_0x2b3ac2(0x1dd)),console[_0x2b3ac2(0x1af)]('\x20\x20tdx\x20segment\x20show\x20\x22High\x20Value\x22\x20\x20\x20\x20#\x20Relative\x20to\x20current\x20context'),0x1;try{const _0x35cf47=_0x295898[0x0],_0x270537=_0x48def8[_0x2b3ac2(0x194)];let _0x30ab55=_0x35cf47;_0x270537&&!_0x35cf47[_0x2b3ac2(0x1e5)]('/')&&(_0x30ab55=_0x270537+'/'+_0x35cf47,_0x48def8[_0x2b3ac2(0x1aa)]&&console[_0x2b3ac2(0x1af)](_0x2b3ac2(0x18c)+_0x30ab55));const _0x179e59=await withSpinner(_0x2b3ac2(0x1a8)+_0x30ab55+_0x2b3ac2(0x1eb),()=>_0x1cb361[_0x2b3ac2(0x19c)][_0x2b3ac2(0x1be)](_0x30ab55),{'verbose':_0x48def8['verbose']}),_0x1255e6=_0x179e59[_0x2b3ac2(0x1d4)];_0x48def8[_0x2b3ac2(0x1aa)]&&(console[_0x2b3ac2(0x1af)](_0x2b3ac2(0x1df)+_0x1255e6['type']),console[_0x2b3ac2(0x1af)](_0x2b3ac2(0x1c2)+_0x1255e6[_0x2b3ac2(0x1a7)]));if(_0x1255e6[_0x2b3ac2(0x185)]==='folder')return console[_0x2b3ac2(0x1af)](_0x2b3ac2(0x181)),console[_0x2b3ac2(0x1af)](_0x2b3ac2(0x1e9)),0x1;let _0x5ab848;if(_0x1255e6['type']==='parent'){const _0x4f7f56=await withSpinner(_0x2b3ac2(0x1db),()=>_0x1cb361[_0x2b3ac2(0x19c)][_0x2b3ac2(0x182)](_0x1255e6[_0x2b3ac2(0x1a7)]),{'verbose':_0x48def8[_0x2b3ac2(0x1aa)]});_0x5ab848=_0x4f7f56['data'];}else{if(!_0x1255e6[_0x2b3ac2(0x1c6)])throw new SDKError(ErrorCode[_0x2b3ac2(0x1ac)],_0x2b3ac2(0x1bc));const _0x5c3101=await withSpinner('Fetching\x20SQL\x20for\x20segment...',()=>_0x1cb361[_0x2b3ac2(0x19c)]['getSegmentSQL'](_0x1255e6['parentId'],_0x1255e6[_0x2b3ac2(0x1c6)]),{'verbose':_0x48def8[_0x2b3ac2(0x1aa)]});_0x5ab848=_0x5c3101['data'];}const _0x46b838=_0x48def8['limit'],_0x105dec=/\bLIMIT\s+\d+/i[_0x2b3ac2(0x1cb)](_0x5ab848);!_0x105dec&&(_0x5ab848=_0x5ab848[_0x2b3ac2(0x17d)]()[_0x2b3ac2(0x192)](/;+$/,''),_0x5ab848=_0x2b3ac2(0x196)+_0x5ab848+_0x2b3ac2(0x17e)+_0x46b838);_0x48def8['verbose']&&console[_0x2b3ac2(0x1af)](_0x2b3ac2(0x1c3)+_0x5ab848);const _0x273405=await withQuerySpinner(_0x2b3ac2(0x193),async _0x374402=>{const _0x1fee18=_0x2b3ac2,_0x4db2c2=await _0x1cb361[_0x1fee18(0x197)](_0x5ab848,{'catalog':'td','schema':_0x1fee18(0x1a5),'onJobId':_0x259cd3=>{const _0x18b73d=_0x1fee18;_0x374402[_0x18b73d(0x1da)](_0x259cd3);}});return _0x4db2c2;},{'verbose':_0x48def8[_0x2b3ac2(0x1aa)]}),_0x13dc84=_0x273405[_0x2b3ac2(0x1d4)],_0x1f2c6d=_0x13dc84[_0x2b3ac2(0x1d9)]?'\x20[Job\x20ID:\x20'+_0x13dc84[_0x2b3ac2(0x1d9)]+']':'';return console[_0x2b3ac2(0x1af)](_0x2b3ac2(0x1b4)+_0x13dc84[_0x2b3ac2(0x1a9)][_0x2b3ac2(0x190)][_0x2b3ac2(0x1d8)]()+_0x2b3ac2(0x1de)+(_0x2b3ac2(0x18f)+formatElapsed(_0x13dc84[_0x2b3ac2(0x1a9)]['elapsedTimeMillis'])+_0x1f2c6d)),await handleQueryOutput(_0x13dc84,_0x48def8),0x0;}catch(_0x5ac234){if(_0x5ac234 instanceof SDKError)return console[_0x2b3ac2(0x1af)](_0x2b3ac2(0x188)+_0x5ac234[_0x2b3ac2(0x1c4)]+']'),console[_0x2b3ac2(0x1af)]('\x0a'+_0x5ac234['message']),0x1;throw _0x5ac234;}}}export class SegmentFolderListCommand extends BaseCommand{[a22_0x2f57a5(0x1a0)]=a22_0x2f57a5(0x1a3);[a22_0x2f57a5(0x1e4)]=a22_0x2f57a5(0x1b1);async[a22_0x2f57a5(0x1c0)](_0x3fb56e){const _0x1ee06e=a22_0x2f57a5,{options:_0x502be1,args:_0x40c82c,tdx:_0x29b20d}=_0x3fb56e;if(_0x40c82c[_0x1ee06e(0x1bf)]===0x0)return console[_0x1ee06e(0x1af)]('Error:\x20Parent\x20segment\x20name\x20is\x20required'),console[_0x1ee06e(0x1af)](_0x1ee06e(0x1e3)),0x1;const _0x993b=_0x40c82c[0x0];try{_0x502be1[_0x1ee06e(0x1aa)]&&(console['error'](_0x1ee06e(0x1c7)+_0x502be1[_0x1ee06e(0x1cd)]),console[_0x1ee06e(0x1af)](_0x1ee06e(0x1c5)+_0x993b));const _0x5e61bd=await withSpinner(_0x1ee06e(0x1ca)+_0x993b+_0x1ee06e(0x1eb),()=>_0x29b20d['segment'][_0x1ee06e(0x187)](_0x993b),{'verbose':_0x502be1[_0x1ee06e(0x1aa)]}),_0x26238f=_0x5e61bd['data'];_0x502be1['verbose']&&console[_0x1ee06e(0x1af)](_0x1ee06e(0x183)+_0x26238f);const _0x3b6d8b=await withSpinner(_0x1ee06e(0x18a)+_0x993b+'\x27...',()=>_0x29b20d[_0x1ee06e(0x19c)][_0x1ee06e(0x19a)](_0x26238f),{'verbose':_0x502be1[_0x1ee06e(0x1aa)]}),_0x498981=_0x3b6d8b[_0x1ee06e(0x1d4)];return console[_0x1ee06e(0x1af)](_0x1ee06e(0x198)+_0x498981[_0x1ee06e(0x1bf)]+_0x1ee06e(0x1cf)+(_0x498981[_0x1ee06e(0x1bf)]!==0x1?'s':'')),await handleSDKOutput(_0x498981,_0x502be1),0x0;}catch(_0x1b38d8){if(_0x1b38d8 instanceof SDKError)return console['error'](_0x1ee06e(0x1c9)+_0x1b38d8[_0x1ee06e(0x1a1)]),_0x1b38d8[_0x1ee06e(0x1cc)]&&console[_0x1ee06e(0x1af)](_0x1ee06e(0x1d1)+_0x1b38d8[_0x1ee06e(0x1cc)]),0x1;throw _0x1b38d8;}}}export class SegmentFolderShowCommand extends BaseCommand{['name']=a22_0x2f57a5(0x1f0);[a22_0x2f57a5(0x1e4)]=a22_0x2f57a5(0x1ec);async[a22_0x2f57a5(0x1c0)](_0x474dca){const _0xe94027=a22_0x2f57a5,{options:_0x53e75d,args:_0x3f836d,tdx:_0x4bc095}=_0x474dca;if(_0x3f836d[_0xe94027(0x1bf)]===0x0)return console['error']('Error:\x20Folder\x20reference\x20is\x20required'),console[_0xe94027(0x1af)](_0xe94027(0x191)),0x1;try{const {parentId:_0x56fffe,childId:_0x88f5a1}=parseSegmentRef(_0x3f836d[0x0]);_0x53e75d['verbose']&&(console[_0xe94027(0x1af)](_0xe94027(0x1c7)+_0x53e75d[_0xe94027(0x1cd)]),console[_0xe94027(0x1af)]('Parent\x20name:\x20'+_0x56fffe),_0x88f5a1&&console[_0xe94027(0x1af)](_0xe94027(0x1f2)+_0x88f5a1));if(!_0x88f5a1)return console[_0xe94027(0x1af)]('Error:\x20Folder\x20name\x20is\x20required\x20(use\x20parent_name/folder_name\x20format)'),0x1;const _0x5c8715=await withSpinner(_0xe94027(0x1ca)+_0x56fffe+_0xe94027(0x1eb),()=>_0x4bc095[_0xe94027(0x19c)][_0xe94027(0x187)](_0x56fffe),{'verbose':_0x53e75d['verbose']}),_0x656f0a=_0x5c8715['data'];_0x53e75d['verbose']&&console[_0xe94027(0x1af)](_0xe94027(0x183)+_0x656f0a);const _0x6c7402=await withSpinner(_0xe94027(0x19d)+_0x88f5a1+_0xe94027(0x1eb),()=>_0x4bc095[_0xe94027(0x19c)]['resolveFolderId'](_0x656f0a,_0x88f5a1),{'verbose':_0x53e75d[_0xe94027(0x1aa)]}),_0x20c6dc=_0x6c7402[_0xe94027(0x1d4)];_0x53e75d['verbose']&&console[_0xe94027(0x1af)](_0xe94027(0x1ed)+_0x20c6dc);const _0x5804cf=await withSpinner(_0xe94027(0x1bb)+_0x88f5a1+'\x27...',()=>_0x4bc095[_0xe94027(0x19c)][_0xe94027(0x1d2)](_0x20c6dc),{'verbose':_0x53e75d[_0xe94027(0x1aa)]});return await handleSDKOutput([_0x5804cf[_0xe94027(0x1d4)]],_0x53e75d),0x0;}catch(_0xf4c115){if(_0xf4c115 instanceof SDKError)return console[_0xe94027(0x1af)](_0xe94027(0x1c9)+_0xf4c115['message']),_0xf4c115['cause']&&console[_0xe94027(0x1af)](_0xe94027(0x1d1)+_0xf4c115[_0xe94027(0x1cc)]),0x1;throw _0xf4c115;}}}export class SegmentSQLCommand extends BaseCommand{[a22_0x2f57a5(0x1a0)]='segment:sql';['description']='Get\x20SQL\x20query\x20for\x20parent\x20or\x20child\x20segment';async[a22_0x2f57a5(0x1c0)](_0x27fa26){const _0x5c7a54=a22_0x2f57a5,{options:_0x56cffa,args:_0x49628a,tdx:_0x2c2671}=_0x27fa26;if(_0x49628a[_0x5c7a54(0x1bf)]===0x0)return console[_0x5c7a54(0x1af)](_0x5c7a54(0x1ae)),console[_0x5c7a54(0x1af)](_0x5c7a54(0x18d)),console[_0x5c7a54(0x1af)](_0x5c7a54(0x18b)),console[_0x5c7a54(0x1af)](_0x5c7a54(0x186)),console[_0x5c7a54(0x1af)](_0x5c7a54(0x1e8)),console[_0x5c7a54(0x1af)]('\x20\x20tdx\x20segment\x20sql\x20\x22High\x20Value\x22\x20\x20\x20\x20#\x20Relative\x20to\x20current\x20context'),0x1;try{const _0x121271=_0x49628a[0x0],_0x50232c=_0x56cffa['segmentPath'];let _0x1538ae=_0x121271;_0x50232c&&!_0x121271[_0x5c7a54(0x1e5)]('/')&&(_0x1538ae=_0x50232c+'/'+_0x121271,_0x56cffa[_0x5c7a54(0x1aa)]&&console[_0x5c7a54(0x1af)](_0x5c7a54(0x18c)+_0x1538ae));const _0x86d665=await withSpinner(_0x5c7a54(0x1a8)+_0x1538ae+'\x27...',()=>_0x2c2671['segment'][_0x5c7a54(0x1be)](_0x1538ae),{'verbose':_0x56cffa[_0x5c7a54(0x1aa)]}),_0x1736c3=_0x86d665[_0x5c7a54(0x1d4)];_0x56cffa['verbose']&&(console[_0x5c7a54(0x1af)]('Resolved\x20type:\x20'+_0x1736c3[_0x5c7a54(0x185)]),console['error'](_0x5c7a54(0x1c2)+_0x1736c3[_0x5c7a54(0x1a7)]));if(_0x1736c3['type']===_0x5c7a54(0x1e2))return console[_0x5c7a54(0x1af)]('Error:\x20Cannot\x20get\x20SQL\x20query\x20for\x20a\x20folder.'),console[_0x5c7a54(0x1af)](_0x5c7a54(0x1a4)),0x1;let _0x194a7f;if(_0x1736c3[_0x5c7a54(0x185)]===_0x5c7a54(0x19f)){const _0x4ba06f=await withSpinner(_0x5c7a54(0x1db),()=>_0x2c2671[_0x5c7a54(0x19c)][_0x5c7a54(0x182)](_0x1736c3[_0x5c7a54(0x1a7)]),{'verbose':_0x56cffa[_0x5c7a54(0x1aa)]});_0x194a7f=_0x4ba06f['data'];}else{if(!_0x1736c3[_0x5c7a54(0x1c6)])throw new SDKError(ErrorCode[_0x5c7a54(0x1ac)],_0x5c7a54(0x1bc));const _0x22aeec=await withSpinner(_0x5c7a54(0x1b5),()=>_0x2c2671['segment'][_0x5c7a54(0x1d0)](_0x1736c3[_0x5c7a54(0x1a7)],_0x1736c3['segmentId']),{'verbose':_0x56cffa[_0x5c7a54(0x1aa)]});_0x194a7f=_0x22aeec[_0x5c7a54(0x1d4)];}return _0x56cffa[_0x5c7a54(0x1dc)]===_0x5c7a54(0x17c)||_0x56cffa['format']===_0x5c7a54(0x1b8)?await handleSDKOutput([{'sql':_0x194a7f}],_0x56cffa):console[_0x5c7a54(0x1a2)](_0x194a7f),0x0;}catch(_0x2e7197){if(_0x2e7197 instanceof SDKError)return console[_0x5c7a54(0x1af)]('Error:\x20'+_0x2e7197['message']),_0x2e7197[_0x5c7a54(0x1cc)]&&console[_0x5c7a54(0x1af)](_0x5c7a54(0x1d1)+_0x2e7197['cause']),0x1;throw _0x2e7197;}}}export class SegmentFolderCreateCommand extends BaseCommand{['name']=a22_0x2f57a5(0x1ea);[a22_0x2f57a5(0x1e4)]=a22_0x2f57a5(0x17f);async[a22_0x2f57a5(0x1c0)](_0x3abfdd){const _0x4da58f=a22_0x2f57a5,{options:_0x12ce4f,args:_0x543c12,tdx:_0x11e3c2}=_0x3abfdd,_0x53a0b5=_0x12ce4f;if(_0x543c12['length']<0x2)return console[_0x4da58f(0x1af)](_0x4da58f(0x195)),console[_0x4da58f(0x1af)](_0x4da58f(0x17b)),0x1;const _0x3c3824=_0x543c12[0x0],_0x21df32=_0x543c12[0x1];_0x53a0b5['verbose']&&(console[_0x4da58f(0x1af)](_0x4da58f(0x1c7)+_0x53a0b5[_0x4da58f(0x1cd)]),console[_0x4da58f(0x1af)](_0x4da58f(0x18e)+_0x3c3824),console['error'](_0x4da58f(0x1f2)+_0x21df32));let _0x4d3576;if(_0x53a0b5[_0x4da58f(0x1e6)]){const _0x5bcd67=_0x53a0b5[_0x4da58f(0x1e6)],_0xb60423=await withSpinner(_0x4da58f(0x1ca)+_0x3c3824+_0x4da58f(0x1eb),()=>_0x11e3c2['segment'][_0x4da58f(0x187)](_0x3c3824),{'verbose':_0x53a0b5[_0x4da58f(0x1aa)]}),_0x5b2aa2=_0xb60423[_0x4da58f(0x1d4)],_0x6b42a5=await withSpinner(_0x4da58f(0x1b7)+_0x5bcd67+'\x27...',()=>_0x11e3c2[_0x4da58f(0x19c)]['resolveFolderId'](_0x5b2aa2,_0x5bcd67),{'verbose':_0x53a0b5[_0x4da58f(0x1aa)]});_0x4d3576=_0x6b42a5[_0x4da58f(0x1d4)],_0x53a0b5[_0x4da58f(0x1aa)]&&console['error'](_0x4da58f(0x189)+_0x4d3576);}const _0x1193a0={'name':_0x21df32,'description':_0x53a0b5[_0x4da58f(0x1e4)],'parentFolderId':_0x4d3576},_0x4ad705=await withSpinner(_0x4da58f(0x1b9)+_0x21df32+_0x4da58f(0x1eb),()=>_0x11e3c2[_0x4da58f(0x19c)][_0x4da58f(0x1ce)](_0x3c3824,_0x1193a0),{'verbose':_0x53a0b5[_0x4da58f(0x1aa)]}),_0x292192=_0x4ad705[_0x4da58f(0x1d4)];return console[_0x4da58f(0x1af)]('✔\x20Created\x20folder\x20\x27'+_0x292192[_0x4da58f(0x1a0)]+'\x27\x20with\x20ID:\x20'+_0x292192['id']),await handleSDKOutput([_0x292192],_0x53a0b5),0x0;}}
1
+ const a22_0x43e269=a22_0x2c81;(function(_0x181fbd,_0x18b3f7){const _0x5179b6=a22_0x2c81,_0x1bb1dc=_0x181fbd();while(!![]){try{const _0x308956=parseInt(_0x5179b6(0x108))/0x1+parseInt(_0x5179b6(0x14d))/0x2+parseInt(_0x5179b6(0x127))/0x3+-parseInt(_0x5179b6(0x152))/0x4*(-parseInt(_0x5179b6(0x128))/0x5)+parseInt(_0x5179b6(0x143))/0x6+-parseInt(_0x5179b6(0x15d))/0x7+-parseInt(_0x5179b6(0x15f))/0x8;if(_0x308956===_0x18b3f7)break;else _0x1bb1dc['push'](_0x1bb1dc['shift']());}catch(_0x33721a){_0x1bb1dc['push'](_0x1bb1dc['shift']());}}}(a22_0x309e,0x2e981));import{BaseCommand}from'./command.js';import{SDKError,ErrorCode}from'../sdk/index.js';import{handleSDKOutput,handleQueryOutput}from'../utils/command-output.js';function a22_0x2c81(_0x5a87b4,_0x4b684a){const _0x309eee=a22_0x309e();return a22_0x2c81=function(_0x2c81a3,_0x3f805d){_0x2c81a3=_0x2c81a3-0xf5;let _0x3f348f=_0x309eee[_0x2c81a3];return _0x3f348f;},a22_0x2c81(_0x5a87b4,_0x4b684a);}import{withSpinner,withQuerySpinner,formatElapsed}from'../utils/spinner.js';import{parseSegmentRef}from'../utils/segment-ref-parser.js';export class SegmentDescribeCommand extends BaseCommand{[a22_0x43e269(0x134)]=a22_0x43e269(0x105);['description']=a22_0x43e269(0x149);async[a22_0x43e269(0x14c)](_0xe3f6a1){const _0x2c8874=a22_0x43e269,{options:_0x263427,args:_0x108bfd,tdx:_0x53a6ba}=_0xe3f6a1;if(_0x108bfd[_0x2c8874(0x109)]===0x0)return console[_0x2c8874(0x164)](_0x2c8874(0x142)),console[_0x2c8874(0x164)]('Usage:\x20tdx\x20segment\x20describe\x20<path>'),console[_0x2c8874(0x164)]('Examples:'),console['error']('\x20\x20tdx\x20segment\x20describe\x20\x22My\x20Audience\x22'),console[_0x2c8874(0x164)]('\x20\x20tdx\x20segment\x20describe\x20\x22My\x20Audience/Marketing/High\x20Value\x22'),console['error']('\x20\x20tdx\x20segment\x20describe\x20\x22High\x20Value\x22\x20\x20\x20\x20#\x20Relative\x20to\x20current\x20context'),0x1;try{const _0x32abcc=_0x108bfd[0x0],_0x27ac2b=_0x263427[_0x2c8874(0x121)];let _0x5c38af=_0x32abcc;_0x27ac2b&&!_0x32abcc[_0x2c8874(0xf9)]('/')&&(_0x5c38af=_0x27ac2b+'/'+_0x32abcc,_0x263427[_0x2c8874(0x123)]&&console[_0x2c8874(0x164)]('Resolved\x20relative\x20path\x20to:\x20'+_0x5c38af));const _0x5497ac=await withSpinner(_0x2c8874(0xfd)+_0x5c38af+_0x2c8874(0x10e),()=>_0x53a6ba[_0x2c8874(0x141)][_0x2c8874(0x102)](_0x5c38af),{'verbose':_0x263427['verbose']}),_0x558a21=_0x5497ac[_0x2c8874(0x12c)];_0x263427[_0x2c8874(0x123)]&&(console['error'](_0x2c8874(0x13c)+_0x558a21['type']),console['error'](_0x2c8874(0x15b)+_0x558a21['parentId']),_0x558a21[_0x2c8874(0x14f)]&&console[_0x2c8874(0x164)](_0x2c8874(0xf6)+_0x558a21[_0x2c8874(0x14f)]),_0x558a21[_0x2c8874(0x122)]&&console[_0x2c8874(0x164)](_0x2c8874(0x129)+_0x558a21[_0x2c8874(0x122)]));if(_0x558a21[_0x2c8874(0x157)]===_0x2c8874(0x13d)){const _0x4d450f=await withSpinner(_0x2c8874(0x110),()=>_0x53a6ba[_0x2c8874(0x141)][_0x2c8874(0x119)](_0x558a21[_0x2c8874(0x144)]),{'verbose':_0x263427[_0x2c8874(0x123)]});await handleSDKOutput([_0x4d450f['data']],_0x263427);}else{if(_0x558a21['type']===_0x2c8874(0x114)){if(!_0x558a21[_0x2c8874(0x14f)])throw new SDKError(ErrorCode[_0x2c8874(0x150)],_0x2c8874(0x130));const _0x36cbf1=await withSpinner(_0x2c8874(0x136),()=>_0x53a6ba['segment'][_0x2c8874(0x10f)](_0x558a21[_0x2c8874(0x14f)]),{'verbose':_0x263427[_0x2c8874(0x123)]});await handleSDKOutput([_0x36cbf1[_0x2c8874(0x12c)]],_0x263427);}else{if(_0x558a21[_0x2c8874(0x157)]===_0x2c8874(0x141)){if(!_0x558a21['segmentId'])throw new SDKError(ErrorCode[_0x2c8874(0x150)],_0x2c8874(0x10c));const _0x4fc4f8=await withSpinner(_0x2c8874(0x10d),()=>_0x53a6ba[_0x2c8874(0x141)]['getSegment'](_0x558a21[_0x2c8874(0x144)],_0x558a21['segmentId']),{'verbose':_0x263427[_0x2c8874(0x123)]});await handleSDKOutput([_0x4fc4f8[_0x2c8874(0x12c)]],_0x263427);}}}return 0x0;}catch(_0x3c273b){if(_0x3c273b instanceof SDKError)return console[_0x2c8874(0x164)](_0x2c8874(0xf7)+_0x3c273b['message']),_0x3c273b[_0x2c8874(0x16a)]&&console[_0x2c8874(0x164)](_0x2c8874(0xfb)+_0x3c273b[_0x2c8874(0x16a)]),0x1;throw _0x3c273b;}}}export class SegmentShowCommand extends BaseCommand{[a22_0x43e269(0x134)]=a22_0x43e269(0xf8);['description']=a22_0x43e269(0x117);async[a22_0x43e269(0x14c)](_0x301690){const _0x31db38=a22_0x43e269,{options:_0x41c626,args:_0xd00321,tdx:_0x163a1d}=_0x301690;if(_0xd00321['length']===0x0)return console[_0x31db38(0x164)](_0x31db38(0x13b)),console[_0x31db38(0x164)]('Usage:\x20tdx\x20segment\x20show\x20<path>'),console[_0x31db38(0x164)]('Examples:'),console[_0x31db38(0x164)]('\x20\x20tdx\x20segment\x20show\x20\x22My\x20Audience\x22'),console['error'](_0x31db38(0x161)),console[_0x31db38(0x164)](_0x31db38(0x125)),0x1;try{const _0x38fef2=_0xd00321[0x0],_0x11fa3e=_0x41c626[_0x31db38(0x121)];let _0x41e696=_0x38fef2;_0x11fa3e&&!_0x38fef2[_0x31db38(0xf9)]('/')&&(_0x41e696=_0x11fa3e+'/'+_0x38fef2,_0x41c626[_0x31db38(0x123)]&&console[_0x31db38(0x164)](_0x31db38(0x11d)+_0x41e696));const _0x1ecbd1=await withSpinner(_0x31db38(0xfd)+_0x41e696+_0x31db38(0x10e),()=>_0x163a1d[_0x31db38(0x141)][_0x31db38(0x102)](_0x41e696),{'verbose':_0x41c626[_0x31db38(0x123)]}),_0x5f0561=_0x1ecbd1[_0x31db38(0x12c)];_0x41c626['verbose']&&(console[_0x31db38(0x164)](_0x31db38(0x13c)+_0x5f0561[_0x31db38(0x157)]),console['error']('Parent\x20ID:\x20'+_0x5f0561[_0x31db38(0x144)]));if(_0x5f0561[_0x31db38(0x157)]===_0x31db38(0x114))return console['error']('Error:\x20Cannot\x20execute\x20SQL\x20query\x20on\x20a\x20folder.'),console['error'](_0x31db38(0x15a)),0x1;let _0x4e8e4a;if(_0x5f0561['type']==='parent'){const _0x592a5d=await withSpinner(_0x31db38(0x163),()=>_0x163a1d[_0x31db38(0x141)]['getParentSQL'](_0x5f0561[_0x31db38(0x144)]),{'verbose':_0x41c626[_0x31db38(0x123)]});_0x4e8e4a=_0x592a5d[_0x31db38(0x12c)];}else{if(!_0x5f0561[_0x31db38(0x122)])throw new SDKError(ErrorCode[_0x31db38(0x150)],_0x31db38(0x10c));const _0x2f9856=await withSpinner('Fetching\x20SQL\x20for\x20segment...',()=>_0x163a1d['segment'][_0x31db38(0x169)](_0x5f0561[_0x31db38(0x144)],_0x5f0561[_0x31db38(0x122)]),{'verbose':_0x41c626[_0x31db38(0x123)]});_0x4e8e4a=_0x2f9856[_0x31db38(0x12c)];}const _0x4ddf7e=_0x41c626[_0x31db38(0xfe)],_0x8b4867=/\bLIMIT\s+\d+/i[_0x31db38(0x14b)](_0x4e8e4a);!_0x8b4867&&(_0x4e8e4a=_0x4e8e4a[_0x31db38(0x104)]()[_0x31db38(0x131)](/;+$/,''),_0x4e8e4a=_0x31db38(0x11b)+_0x4e8e4a+_0x31db38(0x106)+_0x4ddf7e);_0x41c626[_0x31db38(0x123)]&&console[_0x31db38(0x164)](_0x31db38(0x118)+_0x4e8e4a);const _0x320709=await withQuerySpinner(_0x31db38(0x140),async _0x11e928=>{const _0x59d7c=await _0x163a1d['query'](_0x4e8e4a,{'catalog':'td','schema':'information_schema','onJobId':_0x54f212=>{const _0x3ddc6f=a22_0x2c81;_0x11e928[_0x3ddc6f(0x162)](_0x54f212);}});return _0x59d7c;},{'verbose':_0x41c626['verbose']}),_0x44fc09=_0x320709[_0x31db38(0x12c)],_0x1d6035=_0x44fc09[_0x31db38(0x154)]?'\x20[Job\x20ID:\x20'+_0x44fc09['jobId']+']':'';return console[_0x31db38(0x164)](_0x31db38(0x10b)+_0x44fc09[_0x31db38(0x13f)][_0x31db38(0x167)][_0x31db38(0x16b)]()+_0x31db38(0x13e)+(_0x31db38(0x135)+formatElapsed(_0x44fc09[_0x31db38(0x13f)][_0x31db38(0x111)])+_0x1d6035)),await handleQueryOutput(_0x44fc09,_0x41c626),0x0;}catch(_0x1b320b){if(_0x1b320b instanceof SDKError)return console[_0x31db38(0x164)](_0x31db38(0x14e)+_0x1b320b[_0x31db38(0xfc)]+']'),console[_0x31db38(0x164)]('\x0a'+_0x1b320b[_0x31db38(0x12f)]),0x1;throw _0x1b320b;}}}export class SegmentFolderListCommand extends BaseCommand{[a22_0x43e269(0x134)]='segment:folder:list';[a22_0x43e269(0x103)]='List\x20segment\x20folders\x20under\x20a\x20parent\x20segment';async['execute'](_0x5b96e6){const _0x13c805=a22_0x43e269,{options:_0x19fcb8,args:_0x409c17,tdx:_0x1fe7c5}=_0x5b96e6;if(_0x409c17['length']===0x0)return console[_0x13c805(0x164)](_0x13c805(0x11c)),console[_0x13c805(0x164)](_0x13c805(0x155)),0x1;const _0x218d20=_0x409c17[0x0];try{_0x19fcb8['verbose']&&(console[_0x13c805(0x164)](_0x13c805(0x137)+_0x19fcb8[_0x13c805(0x115)]),console[_0x13c805(0x164)]('Parent\x20name:\x20'+_0x218d20));const _0x213587=await withSpinner(_0x13c805(0x11e)+_0x218d20+_0x13c805(0x10e),()=>_0x1fe7c5['segment'][_0x13c805(0x166)](_0x218d20),{'verbose':_0x19fcb8[_0x13c805(0x123)]}),_0x934d68=_0x213587['data'];_0x19fcb8[_0x13c805(0x123)]&&console[_0x13c805(0x164)](_0x13c805(0x112)+_0x934d68);const _0x4a554e=await withSpinner(_0x13c805(0x13a)+_0x218d20+_0x13c805(0x10e),()=>_0x1fe7c5[_0x13c805(0x141)][_0x13c805(0x159)](_0x934d68),{'verbose':_0x19fcb8[_0x13c805(0x123)]}),_0x232c5b=_0x4a554e[_0x13c805(0x12c)];return console['error'](_0x13c805(0x147)+_0x232c5b[_0x13c805(0x109)]+_0x13c805(0x138)+(_0x232c5b[_0x13c805(0x109)]!==0x1?'s':'')),await handleSDKOutput(_0x232c5b,_0x19fcb8),0x0;}catch(_0x1243ce){if(_0x1243ce instanceof SDKError)return console['error']('Error:\x20'+_0x1243ce[_0x13c805(0x12f)]),_0x1243ce[_0x13c805(0x16a)]&&console[_0x13c805(0x164)]('\x20\x20Cause:\x20'+_0x1243ce[_0x13c805(0x16a)]),0x1;throw _0x1243ce;}}}export class SegmentFolderShowCommand extends BaseCommand{[a22_0x43e269(0x134)]=a22_0x43e269(0x12d);[a22_0x43e269(0x103)]=a22_0x43e269(0x14a);async[a22_0x43e269(0x14c)](_0x3b7575){const _0x16e446=a22_0x43e269,{options:_0x4acd3a,args:_0x474c5d,tdx:_0x3ee2a3}=_0x3b7575;if(_0x474c5d[_0x16e446(0x109)]===0x0)return console['error'](_0x16e446(0xfa)),console[_0x16e446(0x164)](_0x16e446(0x12a)),0x1;try{const {parentId:_0x1858b9,childId:_0x13eac7}=parseSegmentRef(_0x474c5d[0x0]);_0x4acd3a[_0x16e446(0x123)]&&(console[_0x16e446(0x164)]('Site:\x20'+_0x4acd3a[_0x16e446(0x115)]),console[_0x16e446(0x164)](_0x16e446(0x11a)+_0x1858b9),_0x13eac7&&console[_0x16e446(0x164)]('Folder\x20name:\x20'+_0x13eac7));if(!_0x13eac7)return console[_0x16e446(0x164)](_0x16e446(0x120)),0x1;const _0x4e68cb=await withSpinner(_0x16e446(0x11e)+_0x1858b9+_0x16e446(0x10e),()=>_0x3ee2a3[_0x16e446(0x141)]['resolveParentId'](_0x1858b9),{'verbose':_0x4acd3a['verbose']}),_0x2076d4=_0x4e68cb[_0x16e446(0x12c)];_0x4acd3a[_0x16e446(0x123)]&&console[_0x16e446(0x164)](_0x16e446(0x112)+_0x2076d4);const _0x310f17=await withSpinner(_0x16e446(0x153)+_0x13eac7+_0x16e446(0x10e),()=>_0x3ee2a3['segment']['resolveFolderId'](_0x2076d4,_0x13eac7),{'verbose':_0x4acd3a[_0x16e446(0x123)]}),_0x7d756e=_0x310f17['data'];_0x4acd3a[_0x16e446(0x123)]&&console[_0x16e446(0x164)](_0x16e446(0x101)+_0x7d756e);const _0x1edd91=await withSpinner(_0x16e446(0x160)+_0x13eac7+_0x16e446(0x10e),()=>_0x3ee2a3[_0x16e446(0x141)][_0x16e446(0x10f)](_0x7d756e),{'verbose':_0x4acd3a[_0x16e446(0x123)]});return await handleSDKOutput([_0x1edd91[_0x16e446(0x12c)]],_0x4acd3a),0x0;}catch(_0x154655){if(_0x154655 instanceof SDKError)return console[_0x16e446(0x164)]('Error:\x20'+_0x154655['message']),_0x154655[_0x16e446(0x16a)]&&console['error'](_0x16e446(0xfb)+_0x154655[_0x16e446(0x16a)]),0x1;throw _0x154655;}}}function a22_0x309e(){const _0x33108a=['\x20\x20tdx\x20segment\x20show\x20\x22High\x20Value\x22\x20\x20\x20\x20#\x20Relative\x20to\x20current\x20context','\x20\x20tdx\x20segment\x20sql\x20\x22My\x20Audience/Marketing/High\x20Value\x22','203454dEhpcm','15IPZgCi','Segment\x20ID:\x20','Usage:\x20tdx\x20segment\x20folder\x20show\x20<parent_name/folder_name>','format','data','segment:folder:show','Folder\x20name:\x20','message','Folder\x20ID\x20missing\x20from\x20resolved\x20path','replace','Error:\x20Cannot\x20get\x20SQL\x20query\x20for\x20a\x20folder.','log','name','in\x20','Fetching\x20folder\x20details...','Site:\x20','\x20folder','segment:folder:create','Listing\x20folders\x20for\x20parent\x20\x27','Error:\x20Segment\x20path\x20or\x20name\x20is\x20required','Resolved\x20type:\x20','parent','\x20rows\x20','stats','Executing\x20segment\x20query...','segment','Error:\x20Path\x20or\x20name\x20is\x20required','2141544gtjVpQ','parentId','parentFolder','\x20\x20tdx\x20segment\x20sql\x20\x22High\x20Value\x22\x20\x20\x20\x20#\x20Relative\x20to\x20current\x20context','✔\x20Found\x20','Error:\x20Parent\x20segment\x20name\x20and\x20folder\x20name\x20are\x20required','Show\x20segment\x20or\x20folder\x20details','Show\x20segment\x20folder\x20details','test','execute','410650TdhcXN','✖\x20Query\x20failed\x20[','folderId','INTERNAL','Usage:\x20tdx\x20segment\x20sql\x20<path>','478508mQwaag','Resolving\x20folder\x20\x27','jobId','Usage:\x20tdx\x20segment\x20folder\x20list\x20<parent_name>','Examples:','type','Parent\x20segment:\x20','listFolders','Use:\x20tdx\x20segment\x20describe\x20<path>\x20\x20#\x20To\x20show\x20folder\x20details','Parent\x20ID:\x20','json','875056mQpIEP','resolveFolderId','7280136rBdTwn','Fetching\x20folder\x20\x27','\x20\x20tdx\x20segment\x20show\x20\x22My\x20Audience/Marketing/High\x20Value\x22','setJobId','Fetching\x20SQL\x20for\x20parent\x20segment...','error','segment:sql','resolveParentId','processedRows','\x27\x20with\x20ID:\x20','getSegmentSQL','cause','toLocaleString','Resolving\x20parent\x20folder\x20\x27','Folder\x20ID:\x20','Error:\x20','segment:show','includes','Error:\x20Folder\x20reference\x20is\x20required','\x20\x20Cause:\x20','code','Resolving\x20path\x20\x27','limit','\x20\x20tdx\x20segment\x20sql\x20\x22My\x20Audience\x22','getParentSQL','Resolved\x20folder\x20ID:\x20','resolvePathToResource','description','trim','segment:describe','\x0a)\x20AS\x20segment_query\x0aLIMIT\x20','Folders\x20are\x20organizational\x20containers,\x20not\x20queryable\x20segments.','236926rykrAP','length','jsonl','✔\x20Query\x20completed:\x20Processed\x20','Segment\x20ID\x20missing\x20from\x20resolved\x20path','Fetching\x20segment\x20details...','\x27...','getFolder','Fetching\x20parent\x20segment\x20details...','elapsedTimeMillis','Resolved\x20parent\x20ID:\x20','Usage:\x20tdx\x20segment\x20folder\x20create\x20<parent_name>\x20<folder_name>\x20[options]','folder','site','Get\x20SQL\x20query\x20for\x20parent\x20or\x20child\x20segment','Execute\x20segment\x20SQL\x20query\x20and\x20show\x20results','SQL\x20query:\x0a','getParent','Parent\x20name:\x20','SELECT\x20*\x20FROM\x20(\x0a','Error:\x20Parent\x20segment\x20name\x20is\x20required','Resolved\x20relative\x20path\x20to:\x20','Resolving\x20parent\x20segment\x20\x27','Creating\x20folder\x20\x27','Error:\x20Folder\x20name\x20is\x20required\x20(use\x20parent_name/folder_name\x20format)','segmentPath','segmentId','verbose','Fetching\x20SQL\x20for\x20segment...'];a22_0x309e=function(){return _0x33108a;};return a22_0x309e();}export class SegmentSQLCommand extends BaseCommand{['name']=a22_0x43e269(0x165);[a22_0x43e269(0x103)]=a22_0x43e269(0x116);async[a22_0x43e269(0x14c)](_0x1fa8e6){const _0x56ef9f=a22_0x43e269,{options:_0x530963,args:_0x2f970b,tdx:_0xf567ca}=_0x1fa8e6;if(_0x2f970b[_0x56ef9f(0x109)]===0x0)return console['error'](_0x56ef9f(0x13b)),console[_0x56ef9f(0x164)](_0x56ef9f(0x151)),console[_0x56ef9f(0x164)](_0x56ef9f(0x156)),console['error'](_0x56ef9f(0xff)),console[_0x56ef9f(0x164)](_0x56ef9f(0x126)),console[_0x56ef9f(0x164)](_0x56ef9f(0x146)),0x1;try{const _0x166a2d=_0x2f970b[0x0],_0x3bcb05=_0x530963[_0x56ef9f(0x121)];let _0x71ed64=_0x166a2d;_0x3bcb05&&!_0x166a2d[_0x56ef9f(0xf9)]('/')&&(_0x71ed64=_0x3bcb05+'/'+_0x166a2d,_0x530963[_0x56ef9f(0x123)]&&console[_0x56ef9f(0x164)](_0x56ef9f(0x11d)+_0x71ed64));const _0x385119=await withSpinner(_0x56ef9f(0xfd)+_0x71ed64+'\x27...',()=>_0xf567ca[_0x56ef9f(0x141)][_0x56ef9f(0x102)](_0x71ed64),{'verbose':_0x530963['verbose']}),_0x735123=_0x385119['data'];_0x530963[_0x56ef9f(0x123)]&&(console[_0x56ef9f(0x164)]('Resolved\x20type:\x20'+_0x735123[_0x56ef9f(0x157)]),console[_0x56ef9f(0x164)](_0x56ef9f(0x15b)+_0x735123[_0x56ef9f(0x144)]));if(_0x735123[_0x56ef9f(0x157)]===_0x56ef9f(0x114))return console[_0x56ef9f(0x164)](_0x56ef9f(0x132)),console[_0x56ef9f(0x164)](_0x56ef9f(0x107)),0x1;let _0x18b505;if(_0x735123[_0x56ef9f(0x157)]==='parent'){const _0x106022=await withSpinner(_0x56ef9f(0x163),()=>_0xf567ca[_0x56ef9f(0x141)][_0x56ef9f(0x100)](_0x735123[_0x56ef9f(0x144)]),{'verbose':_0x530963[_0x56ef9f(0x123)]});_0x18b505=_0x106022[_0x56ef9f(0x12c)];}else{if(!_0x735123[_0x56ef9f(0x122)])throw new SDKError(ErrorCode[_0x56ef9f(0x150)],'Segment\x20ID\x20missing\x20from\x20resolved\x20path');const _0x2816f8=await withSpinner(_0x56ef9f(0x124),()=>_0xf567ca[_0x56ef9f(0x141)][_0x56ef9f(0x169)](_0x735123[_0x56ef9f(0x144)],_0x735123[_0x56ef9f(0x122)]),{'verbose':_0x530963[_0x56ef9f(0x123)]});_0x18b505=_0x2816f8['data'];}return _0x530963[_0x56ef9f(0x12b)]===_0x56ef9f(0x15c)||_0x530963['format']===_0x56ef9f(0x10a)?await handleSDKOutput([{'sql':_0x18b505}],_0x530963):console[_0x56ef9f(0x133)](_0x18b505),0x0;}catch(_0x5e74bf){if(_0x5e74bf instanceof SDKError)return console['error'](_0x56ef9f(0xf7)+_0x5e74bf['message']),_0x5e74bf['cause']&&console[_0x56ef9f(0x164)](_0x56ef9f(0xfb)+_0x5e74bf[_0x56ef9f(0x16a)]),0x1;throw _0x5e74bf;}}}export class SegmentFolderCreateCommand extends BaseCommand{[a22_0x43e269(0x134)]=a22_0x43e269(0x139);['description']='Create\x20segment\x20folder\x20for\x20organization';async[a22_0x43e269(0x14c)](_0x2f29a){const _0x3f09cd=a22_0x43e269,{options:_0x47d47b,args:_0x5abf6f,tdx:_0x4b0a18}=_0x2f29a,_0x3aa974=_0x47d47b;if(_0x5abf6f[_0x3f09cd(0x109)]<0x2)return console['error'](_0x3f09cd(0x148)),console[_0x3f09cd(0x164)](_0x3f09cd(0x113)),0x1;const _0x52273a=_0x5abf6f[0x0],_0x462bbd=_0x5abf6f[0x1];_0x3aa974[_0x3f09cd(0x123)]&&(console['error'](_0x3f09cd(0x137)+_0x3aa974['site']),console[_0x3f09cd(0x164)](_0x3f09cd(0x158)+_0x52273a),console[_0x3f09cd(0x164)](_0x3f09cd(0x12e)+_0x462bbd));let _0x410320;if(_0x3aa974[_0x3f09cd(0x145)]){const _0x538609=_0x3aa974[_0x3f09cd(0x145)],_0x202ff3=await withSpinner(_0x3f09cd(0x11e)+_0x52273a+_0x3f09cd(0x10e),()=>_0x4b0a18[_0x3f09cd(0x141)][_0x3f09cd(0x166)](_0x52273a),{'verbose':_0x3aa974[_0x3f09cd(0x123)]}),_0x5abd43=_0x202ff3[_0x3f09cd(0x12c)],_0x475819=await withSpinner(_0x3f09cd(0xf5)+_0x538609+_0x3f09cd(0x10e),()=>_0x4b0a18[_0x3f09cd(0x141)][_0x3f09cd(0x15e)](_0x5abd43,_0x538609),{'verbose':_0x3aa974[_0x3f09cd(0x123)]});_0x410320=_0x475819[_0x3f09cd(0x12c)],_0x3aa974[_0x3f09cd(0x123)]&&console[_0x3f09cd(0x164)]('Resolved\x20parent\x20folder\x20ID:\x20'+_0x410320);}const _0x414dc7={'name':_0x462bbd,'description':_0x3aa974['description'],'parentFolderId':_0x410320},_0x12dd4b=await withSpinner(_0x3f09cd(0x11f)+_0x462bbd+_0x3f09cd(0x10e),()=>_0x4b0a18['segment']['createFolder'](_0x52273a,_0x414dc7),{'verbose':_0x3aa974[_0x3f09cd(0x123)]}),_0x13d5f0=_0x12dd4b['data'];return console[_0x3f09cd(0x164)]('✔\x20Created\x20folder\x20\x27'+_0x13d5f0[_0x3f09cd(0x134)]+_0x3f09cd(0x168)+_0x13d5f0['id']),await handleSDKOutput([_0x13d5f0],_0x3aa974),0x0;}}
@@ -1 +1 @@
1
- const a23_0x3364f1=a23_0x104b;function a23_0x104b(_0x368e21,_0xf8200b){const _0x2677d6=a23_0x2677();return a23_0x104b=function(_0x104be9,_0x15fcd8){_0x104be9=_0x104be9-0xfc;let _0x538f80=_0x2677d6[_0x104be9];return _0x538f80;},a23_0x104b(_0x368e21,_0xf8200b);}(function(_0x56bf4a,_0x52ff9d){const _0x32cbb9=a23_0x104b,_0x572642=_0x56bf4a();while(!![]){try{const _0x5b7118=parseInt(_0x32cbb9(0x121))/0x1+parseInt(_0x32cbb9(0x12c))/0x2*(parseInt(_0x32cbb9(0x11e))/0x3)+-parseInt(_0x32cbb9(0x103))/0x4*(-parseInt(_0x32cbb9(0x119))/0x5)+parseInt(_0x32cbb9(0x122))/0x6*(-parseInt(_0x32cbb9(0x10c))/0x7)+parseInt(_0x32cbb9(0x120))/0x8*(parseInt(_0x32cbb9(0x107))/0x9)+-parseInt(_0x32cbb9(0x11d))/0xa*(parseInt(_0x32cbb9(0x125))/0xb)+-parseInt(_0x32cbb9(0x105))/0xc*(parseInt(_0x32cbb9(0x10b))/0xd);if(_0x5b7118===_0x52ff9d)break;else _0x572642['push'](_0x572642['shift']());}catch(_0x3f71d9){_0x572642['push'](_0x572642['shift']());}}}(a23_0x2677,0xa3430));import{BaseCommand}from'./command.js';import{handleSDKOutput}from'../utils/command-output.js';function a23_0x2677(){const _0x1f4fda=['segments','Error:\x20Full\x20path\x20required\x20(parent/segment_name\x20or\x20parent/folder/segment_name)','18514015YOqmPr','14WwVHeW','ruleFile','kind','verbose','description','\x27...','Resolved\x20folder\x20ID:\x20','segment','segment:create','length','Error:\x20Cannot\x20create\x20segment\x20in\x20a\x20segment.\x20Parent\x20path\x20must\x20be\x20a\x20folder\x20or\x20parent.','createSegment','error','8420oErqHb','invisible','Examples:','data','10oKpnvS','703533JGIDOd','Usage:\x20tdx\x20segment\x20create\x20<path>\x20[options]','1664MgYJjO','318627SUUgQc','215466JoCcuG','resolveFolderId','execute','12575134nFtzRJ','\x27\x20with\x20ID:\x20','folderId','resolvePathToResource','Usage:\x20tdx\x20segment\x20create\x20<parent/segment_name>\x20[options]','Segment\x20name:\x20','name','8GaRZLR','resolveParentId','✔\x20Created\x20segment\x20\x27','Error:\x20Segment\x20path\x20or\x20name\x20is\x20required','Target\x20path:\x20','Parent:\x20','includes','site','\x20\x20tdx\x20segment\x20create\x20\x22My\x20Audience/Marketing/Premium\x22\x20--rule\x20\x27...\x27','Site:\x20','2980MclMxV','Resolving\x20folder\x20path\x20\x27','12XcPElm','folder','34470WkNDFL','Create\x20child\x20segment\x20with\x20filtering\x20rules'];a23_0x2677=function(){return _0x1f4fda;};return a23_0x2677();}import{withSpinner}from'../utils/spinner.js';import{loadJSONFromOptions}from'../utils/json-loader.js';import{parsePath,getParentPath,getBaseName}from'../utils/segment-path-parser.js';export class SegmentCreateCommand extends BaseCommand{[a23_0x3364f1(0x12b)]=a23_0x3364f1(0x114);[a23_0x3364f1(0x110)]=a23_0x3364f1(0x108);async[a23_0x3364f1(0x124)](_0x24baec){const _0x228f27=a23_0x3364f1,{options:_0x49b21a,args:_0x35e0d3,tdx:_0x2c109b}=_0x24baec,_0x4b3823=_0x49b21a;if(_0x35e0d3['length']===0x0)return console['error'](_0x228f27(0xfc)),console['error'](_0x228f27(0x11f)),console[_0x228f27(0x118)](_0x228f27(0x11b)),console[_0x228f27(0x118)]('\x20\x20tdx\x20segment\x20create\x20\x22My\x20Audience/High\x20Value\x22\x20--rule\x20\x27...\x27'),console[_0x228f27(0x118)](_0x228f27(0x101)),console['error']('\x20\x20tdx\x20segment\x20create\x20\x22Premium\x22\x20--rule\x20\x27...\x27\x20\x20#\x20Relative\x20to\x20context'),0x1;const _0x3a3e9c=_0x35e0d3[0x0],_0x3e690d=_0x49b21a['segmentPath'];let _0x16d20b=_0x3a3e9c;_0x3e690d&&!_0x3a3e9c[_0x228f27(0xff)]('/')&&(_0x16d20b=_0x3e690d+'/'+_0x3a3e9c,_0x4b3823[_0x228f27(0x10f)]&&console['error']('Resolved\x20relative\x20path\x20to:\x20'+_0x16d20b));const _0x3ec7cf=parsePath(_0x16d20b);if(_0x3ec7cf[_0x228f27(0x109)][_0x228f27(0x115)]<0x2)return console[_0x228f27(0x118)](_0x228f27(0x10a)),console[_0x228f27(0x118)](_0x228f27(0x129)),0x1;const _0x15e13f=_0x3ec7cf[_0x228f27(0x109)][0x0],_0x61c335=getBaseName(_0x16d20b),_0x58e6bd=getParentPath(_0x16d20b);_0x4b3823[_0x228f27(0x10f)]&&(console['error'](_0x228f27(0x102)+_0x4b3823[_0x228f27(0x100)]),console[_0x228f27(0x118)](_0x228f27(0xfd)+_0x16d20b),console[_0x228f27(0x118)](_0x228f27(0xfe)+_0x15e13f),console['error'](_0x228f27(0x12a)+_0x61c335),console[_0x228f27(0x118)]('Parent\x20path:\x20'+_0x58e6bd));const _0x36eb5a=await withSpinner('Resolving\x20parent\x20segment\x20\x27'+_0x15e13f+'\x27...',()=>_0x2c109b[_0x228f27(0x113)][_0x228f27(0x12d)](_0x15e13f),{'verbose':_0x4b3823[_0x228f27(0x10f)]}),_0x379ec9=_0x36eb5a[_0x228f27(0x11c)];let _0x4da8aa;if(_0x3ec7cf['segments'][_0x228f27(0x115)]>0x2){const _0x112565=await withSpinner(_0x228f27(0x104)+_0x58e6bd+_0x228f27(0x111),()=>_0x2c109b['segment'][_0x228f27(0x128)](_0x58e6bd),{'verbose':_0x4b3823['verbose']}),_0x34e17c=_0x112565[_0x228f27(0x11c)];if(_0x34e17c['type']!==_0x228f27(0x106)&&_0x34e17c['type']!=='parent')return console[_0x228f27(0x118)](_0x228f27(0x116)),0x1;_0x4da8aa=_0x34e17c[_0x228f27(0x127)];}else{if(_0x4b3823['folder']){const _0x201f43=await withSpinner('Resolving\x20folder\x20\x27'+_0x4b3823[_0x228f27(0x106)]+_0x228f27(0x111),()=>_0x2c109b[_0x228f27(0x113)][_0x228f27(0x123)](_0x379ec9,_0x4b3823[_0x228f27(0x106)]),{'verbose':_0x4b3823[_0x228f27(0x10f)]});_0x4da8aa=_0x201f43[_0x228f27(0x11c)];}}_0x4b3823['verbose']&&_0x4da8aa&&console[_0x228f27(0x118)](_0x228f27(0x112)+_0x4da8aa);const _0x3be43e=await loadJSONFromOptions(_0x4b3823['rule'],_0x4b3823[_0x228f27(0x10d)]),_0x436679={'name':_0x61c335,'description':_0x4b3823['description'],'rule':_0x3be43e,'kind':_0x4b3823[_0x228f27(0x10e)]!==undefined?parseInt(_0x4b3823[_0x228f27(0x10e)],0xa):undefined,'isVisible':_0x4b3823[_0x228f27(0x11a)]?![]:undefined,'segmentFolderId':_0x4da8aa,'countPopulation':_0x4b3823['noCountPopulation']?![]:undefined},_0x5091f6=await withSpinner('Creating\x20segment\x20\x27'+_0x61c335+_0x228f27(0x111),()=>_0x2c109b[_0x228f27(0x113)][_0x228f27(0x117)](_0x379ec9,_0x436679),{'verbose':_0x4b3823[_0x228f27(0x10f)]}),_0x242332=_0x5091f6['data'];return console['error'](_0x228f27(0x12e)+_0x242332[_0x228f27(0x12b)]+_0x228f27(0x126)+_0x242332['id']),_0x16d20b!==_0x3a3e9c&&console[_0x228f27(0x118)]('\x20\x20\x20Path:\x20'+_0x16d20b),await handleSDKOutput([_0x242332],_0x4b3823),0x0;}}
1
+ const a23_0x56e567=a23_0x51aa;function a23_0x4e44(){const _0x2bfe0f=['2786PtycMq','kind','\x20\x20tdx\x20segment\x20create\x20\x22My\x20Audience/High\x20Value\x22\x20--rule\x20\x27...\x27','Parent:\x20','\x20\x20tdx\x20segment\x20create\x20\x22Premium\x22\x20--rule\x20\x27...\x27\x20\x20#\x20Relative\x20to\x20context','Resolving\x20folder\x20path\x20\x27','resolvePathToResource','Resolved\x20relative\x20path\x20to:\x20','Resolving\x20parent\x20segment\x20\x27','invisible','Create\x20child\x20segment\x20with\x20filtering\x20rules','Creating\x20segment\x20\x27','description','5oNiYpD','Parent\x20path:\x20','24EVoAUf','rule','6912356iEUCQq','segmentPath','verbose','ruleFile','4167KVVFeh','segment','createSegment','1254yyXWmD','Site:\x20','type','Resolving\x20folder\x20\x27','execute','parent','31560oWoASY','error','name','32050EnYPof','noCountPopulation','folder','\x20\x20\x20Path:\x20','site','folderId','Target\x20path:\x20','Segment\x20name:\x20','197308kTOAmp','84hqKSxb','Examples:','segments','data','Usage:\x20tdx\x20segment\x20create\x20<parent/segment_name>\x20[options]','\x27...','10359132WrCQSW','Resolved\x20folder\x20ID:\x20','length','13437263mRZuWw','✔\x20Created\x20segment\x20\x27'];a23_0x4e44=function(){return _0x2bfe0f;};return a23_0x4e44();}(function(_0x1f5f0a,_0x27614c){const _0x37fb7a=a23_0x51aa,_0x5e54ae=_0x1f5f0a();while(!![]){try{const _0xba7bac=parseInt(_0x37fb7a(0x190))/0x1*(-parseInt(_0x37fb7a(0x1ad))/0x2)+-parseInt(_0x37fb7a(0x1bc))/0x3*(parseInt(_0x37fb7a(0x1a1))/0x4)+-parseInt(_0x37fb7a(0x1ba))/0x5*(parseInt(_0x37fb7a(0x1a8))/0x6)+parseInt(_0x37fb7a(0x1ab))/0x7+-parseInt(_0x37fb7a(0x196))/0x8+parseInt(_0x37fb7a(0x18d))/0x9*(-parseInt(_0x37fb7a(0x199))/0xa)+parseInt(_0x37fb7a(0x189))/0xb*(parseInt(_0x37fb7a(0x1a2))/0xc);if(_0xba7bac===_0x27614c)break;else _0x5e54ae['push'](_0x5e54ae['shift']());}catch(_0x2482b2){_0x5e54ae['push'](_0x5e54ae['shift']());}}}(a23_0x4e44,0xeb001));import{BaseCommand}from'./command.js';function a23_0x51aa(_0x16ebf7,_0xf1b3ee){const _0x4e441d=a23_0x4e44();return a23_0x51aa=function(_0x51aaa7,_0x5cba34){_0x51aaa7=_0x51aaa7-0x188;let _0xefebfa=_0x4e441d[_0x51aaa7];return _0xefebfa;},a23_0x51aa(_0x16ebf7,_0xf1b3ee);}import{handleSDKOutput}from'../utils/command-output.js';import{withSpinner}from'../utils/spinner.js';import{loadJSONFromOptions}from'../utils/json-loader.js';import{parsePath,getParentPath,getBaseName}from'../utils/segment-path-parser.js';export class SegmentCreateCommand extends BaseCommand{[a23_0x56e567(0x198)]='segment:create';[a23_0x56e567(0x1b9)]=a23_0x56e567(0x1b7);async[a23_0x56e567(0x194)](_0x5a33d5){const _0xb61423=a23_0x56e567,{options:_0x162a5a,args:_0x1e3751,tdx:_0x31dcef}=_0x5a33d5,_0x2cfbb9=_0x162a5a;if(_0x1e3751['length']===0x0)return console[_0xb61423(0x197)]('Error:\x20Segment\x20path\x20or\x20name\x20is\x20required'),console['error']('Usage:\x20tdx\x20segment\x20create\x20<path>\x20[options]'),console['error'](_0xb61423(0x1a3)),console[_0xb61423(0x197)](_0xb61423(0x1af)),console['error']('\x20\x20tdx\x20segment\x20create\x20\x22My\x20Audience/Marketing/Premium\x22\x20--rule\x20\x27...\x27'),console[_0xb61423(0x197)](_0xb61423(0x1b1)),0x1;const _0x4a5ea3=_0x1e3751[0x0],_0x43a180=_0x162a5a[_0xb61423(0x18a)];let _0x2301fe=_0x4a5ea3;_0x43a180&&!_0x4a5ea3['includes']('/')&&(_0x2301fe=_0x43a180+'/'+_0x4a5ea3,_0x2cfbb9[_0xb61423(0x18b)]&&console['error'](_0xb61423(0x1b4)+_0x2301fe));const _0x16e190=parsePath(_0x2301fe);if(_0x16e190['segments'][_0xb61423(0x1aa)]<0x2)return console['error']('Error:\x20Full\x20path\x20required\x20(parent/segment_name\x20or\x20parent/folder/segment_name)'),console['error'](_0xb61423(0x1a6)),0x1;const _0x28611f=_0x16e190[_0xb61423(0x1a4)][0x0],_0xb8861d=getBaseName(_0x2301fe),_0x3456f7=getParentPath(_0x2301fe);_0x2cfbb9[_0xb61423(0x18b)]&&(console[_0xb61423(0x197)](_0xb61423(0x191)+_0x2cfbb9[_0xb61423(0x19d)]),console['error'](_0xb61423(0x19f)+_0x2301fe),console[_0xb61423(0x197)](_0xb61423(0x1b0)+_0x28611f),console[_0xb61423(0x197)](_0xb61423(0x1a0)+_0xb8861d),console[_0xb61423(0x197)](_0xb61423(0x1bb)+_0x3456f7));const _0x2fc386=await withSpinner(_0xb61423(0x1b5)+_0x28611f+_0xb61423(0x1a7),()=>_0x31dcef[_0xb61423(0x18e)]['resolveParentId'](_0x28611f),{'verbose':_0x2cfbb9[_0xb61423(0x18b)]}),_0x352d94=_0x2fc386[_0xb61423(0x1a5)];let _0xbf961a;if(_0x16e190[_0xb61423(0x1a4)][_0xb61423(0x1aa)]>0x2){const _0x1caa2a=await withSpinner(_0xb61423(0x1b2)+_0x3456f7+'\x27...',()=>_0x31dcef[_0xb61423(0x18e)][_0xb61423(0x1b3)](_0x3456f7),{'verbose':_0x2cfbb9[_0xb61423(0x18b)]}),_0x13c915=_0x1caa2a[_0xb61423(0x1a5)];if(_0x13c915[_0xb61423(0x192)]!==_0xb61423(0x19b)&&_0x13c915[_0xb61423(0x192)]!==_0xb61423(0x195))return console['error']('Error:\x20Cannot\x20create\x20segment\x20in\x20a\x20segment.\x20Parent\x20path\x20must\x20be\x20a\x20folder\x20or\x20parent.'),0x1;_0xbf961a=_0x13c915[_0xb61423(0x19e)];}else{if(_0x2cfbb9['folder']){const _0x4e8ace=await withSpinner(_0xb61423(0x193)+_0x2cfbb9['folder']+_0xb61423(0x1a7),()=>_0x31dcef[_0xb61423(0x18e)]['resolveFolderId'](_0x352d94,_0x2cfbb9[_0xb61423(0x19b)]),{'verbose':_0x2cfbb9[_0xb61423(0x18b)]});_0xbf961a=_0x4e8ace[_0xb61423(0x1a5)];}}_0x2cfbb9[_0xb61423(0x18b)]&&_0xbf961a&&console[_0xb61423(0x197)](_0xb61423(0x1a9)+_0xbf961a);const _0x26c5ce=await loadJSONFromOptions(_0x2cfbb9[_0xb61423(0x188)],_0x2cfbb9[_0xb61423(0x18c)]),_0x5689fa={'name':_0xb8861d,'description':_0x2cfbb9[_0xb61423(0x1b9)],'rule':_0x26c5ce,'kind':_0x2cfbb9['kind']!==undefined?parseInt(_0x2cfbb9[_0xb61423(0x1ae)],0xa):undefined,'isVisible':_0x2cfbb9[_0xb61423(0x1b6)]?![]:undefined,'segmentFolderId':_0xbf961a,'countPopulation':_0x2cfbb9[_0xb61423(0x19a)]?![]:undefined},_0x756e01=await withSpinner(_0xb61423(0x1b8)+_0xb8861d+'\x27...',()=>_0x31dcef[_0xb61423(0x18e)][_0xb61423(0x18f)](_0x352d94,_0x5689fa),{'verbose':_0x2cfbb9[_0xb61423(0x18b)]}),_0x551d97=_0x756e01[_0xb61423(0x1a5)];return console[_0xb61423(0x197)](_0xb61423(0x1ac)+_0x551d97[_0xb61423(0x198)]+'\x27\x20with\x20ID:\x20'+_0x551d97['id']),_0x2301fe!==_0x4a5ea3&&console[_0xb61423(0x197)](_0xb61423(0x19c)+_0x2301fe),await handleSDKOutput([_0x551d97],_0x2cfbb9),0x0;}}
@@ -1 +1 @@
1
- function a24_0xef35(_0x2163fb,_0x1c95e9){const _0x262157=a24_0x2621();return a24_0xef35=function(_0xef356f,_0x550d00){_0xef356f=_0xef356f-0x1ee;let _0x5ca62a=_0x262157[_0xef356f];return _0x5ca62a;},a24_0xef35(_0x2163fb,_0x1c95e9);}const a24_0x4e09f0=a24_0xef35;(function(_0x75511e,_0x3a5e65){const _0x387a8e=a24_0xef35,_0x29c0d1=_0x75511e();while(!![]){try{const _0x527775=parseInt(_0x387a8e(0x1f2))/0x1+-parseInt(_0x387a8e(0x1f6))/0x2+-parseInt(_0x387a8e(0x1fd))/0x3*(-parseInt(_0x387a8e(0x1ee))/0x4)+-parseInt(_0x387a8e(0x201))/0x5+-parseInt(_0x387a8e(0x204))/0x6*(-parseInt(_0x387a8e(0x1f0))/0x7)+-parseInt(_0x387a8e(0x1f1))/0x8+parseInt(_0x387a8e(0x1f4))/0x9*(parseInt(_0x387a8e(0x203))/0xa);if(_0x527775===_0x3a5e65)break;else _0x29c0d1['push'](_0x29c0d1['shift']());}catch(_0x737075){_0x29c0d1['push'](_0x29c0d1['shift']());}}}(a24_0x2621,0xbd255));import{BaseCommand}from'./command.js';import{handleSDKOutput}from'../utils/command-output.js';function a24_0x2621(){const _0x272638=['site','Parent\x20segment:\x20','2477210lmMwLf','description','24257620yacRBn','496860cmxuId','name','20ARhNvb','\x27...','21JdfCAG','6326488BrfyLh','127082zSkuUV','error','9aIVUmk','execute','1694580mIGuRc','segment:fields','\x20field','segment','✔\x20Found\x20','verbose','length','64206DWiWiN','List\x20available\x20fields\x20for\x20segmentation'];a24_0x2621=function(){return _0x272638;};return a24_0x2621();}import{withSpinner}from'../utils/spinner.js';export class SegmentFieldsCommand extends BaseCommand{[a24_0x4e09f0(0x205)]=a24_0x4e09f0(0x1f7);[a24_0x4e09f0(0x202)]=a24_0x4e09f0(0x1fe);async[a24_0x4e09f0(0x1f5)](_0x480787){const _0x67d960=a24_0x4e09f0,{options:_0x291939,args:_0x15c3dc,tdx:_0x17cbc1}=_0x480787;if(_0x15c3dc['length']===0x0)return console[_0x67d960(0x1f3)]('Error:\x20Parent\x20segment\x20name\x20is\x20required'),console[_0x67d960(0x1f3)]('Usage:\x20tdx\x20segment\x20fields\x20<parent_name>'),0x1;const _0x4c2ede=_0x15c3dc[0x0];_0x291939[_0x67d960(0x1fb)]&&(console[_0x67d960(0x1f3)]('Site:\x20'+_0x291939[_0x67d960(0x1ff)]),console[_0x67d960(0x1f3)](_0x67d960(0x200)+_0x4c2ede));const _0x3a8e62=await withSpinner('Listing\x20fields\x20for\x20\x27'+_0x4c2ede+_0x67d960(0x1ef),()=>_0x17cbc1[_0x67d960(0x1f9)]['listFields'](_0x4c2ede),{'verbose':_0x291939[_0x67d960(0x1fb)]}),_0x551142=_0x3a8e62['data'];return console[_0x67d960(0x1f3)](_0x67d960(0x1fa)+_0x551142[_0x67d960(0x1fc)]+_0x67d960(0x1f8)+(_0x551142[_0x67d960(0x1fc)]!==0x1?'s':'')),await handleSDKOutput(_0x551142,_0x291939),0x0;}}
1
+ const a24_0x5329d7=a24_0x2560;(function(_0x114485,_0x310943){const _0x1881d1=a24_0x2560,_0x3b5dd6=_0x114485();while(!![]){try{const _0x2dec3f=parseInt(_0x1881d1(0x1e4))/0x1*(parseInt(_0x1881d1(0x1e1))/0x2)+parseInt(_0x1881d1(0x1e8))/0x3*(-parseInt(_0x1881d1(0x1f7))/0x4)+parseInt(_0x1881d1(0x1f3))/0x5+-parseInt(_0x1881d1(0x1eb))/0x6+-parseInt(_0x1881d1(0x1ea))/0x7+parseInt(_0x1881d1(0x1e2))/0x8+parseInt(_0x1881d1(0x1f1))/0x9;if(_0x2dec3f===_0x310943)break;else _0x3b5dd6['push'](_0x3b5dd6['shift']());}catch(_0x2a0c3c){_0x3b5dd6['push'](_0x3b5dd6['shift']());}}}(a24_0x4132,0x6a7fa));function a24_0x4132(){const _0x1fe830=['Usage:\x20tdx\x20segment\x20fields\x20<parent_name>','✔\x20Found\x20','length','476488yWHdvz','verbose','Parent\x20segment:\x20','Site:\x20','32816rsuSwQ','5049392TRRlaK','site','8dQQDzn','execute','error','listFields','15qeaBRb','segment:fields','520275QXoIRW','4457274RwBEUm','List\x20available\x20fields\x20for\x20segmentation','\x27...','segment','name','data','8542125vRsbdl','\x20field','687345kmWuUP'];a24_0x4132=function(){return _0x1fe830;};return a24_0x4132();}import{BaseCommand}from'./command.js';function a24_0x2560(_0x1da7b9,_0x2a59d6){const _0x413246=a24_0x4132();return a24_0x2560=function(_0x2560f0,_0x3ad551){_0x2560f0=_0x2560f0-0x1e0;let _0x412e87=_0x413246[_0x2560f0];return _0x412e87;},a24_0x2560(_0x1da7b9,_0x2a59d6);}import{handleSDKOutput}from'../utils/command-output.js';import{withSpinner}from'../utils/spinner.js';export class SegmentFieldsCommand extends BaseCommand{[a24_0x5329d7(0x1ef)]=a24_0x5329d7(0x1e9);['description']=a24_0x5329d7(0x1ec);async[a24_0x5329d7(0x1e5)](_0x411011){const _0x34d5f4=a24_0x5329d7,{options:_0x3be565,args:_0x1bc5e0,tdx:_0x2897bc}=_0x411011;if(_0x1bc5e0[_0x34d5f4(0x1f6)]===0x0)return console[_0x34d5f4(0x1e6)]('Error:\x20Parent\x20segment\x20name\x20is\x20required'),console[_0x34d5f4(0x1e6)](_0x34d5f4(0x1f4)),0x1;const _0x451a1b=_0x1bc5e0[0x0];_0x3be565[_0x34d5f4(0x1f8)]&&(console['error'](_0x34d5f4(0x1e0)+_0x3be565[_0x34d5f4(0x1e3)]),console[_0x34d5f4(0x1e6)](_0x34d5f4(0x1f9)+_0x451a1b));const _0x557274=await withSpinner('Listing\x20fields\x20for\x20\x27'+_0x451a1b+_0x34d5f4(0x1ed),()=>_0x2897bc[_0x34d5f4(0x1ee)][_0x34d5f4(0x1e7)](_0x451a1b),{'verbose':_0x3be565['verbose']}),_0x8584=_0x557274[_0x34d5f4(0x1f0)];return console[_0x34d5f4(0x1e6)](_0x34d5f4(0x1f5)+_0x8584['length']+_0x34d5f4(0x1f2)+(_0x8584[_0x34d5f4(0x1f6)]!==0x1?'s':'')),await handleSDKOutput(_0x8584,_0x3be565),0x0;}}
@@ -1 +1 @@
1
- const a25_0x3a78cc=a25_0x1867;(function(_0x35027e,_0x291182){const _0x23630d=a25_0x1867,_0x539128=_0x35027e();while(!![]){try{const _0x4dd3d0=parseInt(_0x23630d(0x1a3))/0x1*(parseInt(_0x23630d(0x1a4))/0x2)+-parseInt(_0x23630d(0x193))/0x3*(-parseInt(_0x23630d(0x1a2))/0x4)+parseInt(_0x23630d(0x19f))/0x5*(parseInt(_0x23630d(0x195))/0x6)+-parseInt(_0x23630d(0x190))/0x7*(-parseInt(_0x23630d(0x19d))/0x8)+parseInt(_0x23630d(0x1a1))/0x9+-parseInt(_0x23630d(0x196))/0xa+-parseInt(_0x23630d(0x18f))/0xb*(parseInt(_0x23630d(0x18c))/0xc);if(_0x4dd3d0===_0x291182)break;else _0x539128['push'](_0x539128['shift']());}catch(_0x2191ba){_0x539128['push'](_0x539128['shift']());}}}(a25_0x4f58,0x23f63));import{BaseCommand}from'./command.js';function a25_0x4f58(){const _0x5cf978=['4bLKFYm','46ImTToS','8434Rhulyo','name','89748iYKgyd','segmentPath','jsonl','1111AAraFw','1077209gMqczh','json','Show\x20current\x20segment/folder\x20context','392613yQpKka','error','1340634dcoZVg','48340tJGTkQ','format','execute','stringify','verbose','Context\x20details:','log','8driAAj','description','5LDdQaz','\x20\x20Path:\x20','1847997NoSfbn'];a25_0x4f58=function(){return _0x5cf978;};return a25_0x4f58();}function a25_0x1867(_0x4f2f06,_0x33f80f){const _0x4f5848=a25_0x4f58();return a25_0x1867=function(_0x186755,_0x31d83b){_0x186755=_0x186755-0x18c;let _0x2bdb64=_0x4f5848[_0x186755];return _0x2bdb64;},a25_0x1867(_0x4f2f06,_0x33f80f);}export class SegmentPwdCommand extends BaseCommand{[a25_0x3a78cc(0x1a5)]='segment:pwd';[a25_0x3a78cc(0x19e)]=a25_0x3a78cc(0x192);async[a25_0x3a78cc(0x198)](_0x4ad7d6){const _0x5e3ab3=a25_0x3a78cc,{options:_0x39d0a1}=_0x4ad7d6;try{const _0x2bd4f0=_0x39d0a1[_0x5e3ab3(0x18d)];if(!_0x2bd4f0)return _0x39d0a1[_0x5e3ab3(0x197)]==='json'||_0x39d0a1[_0x5e3ab3(0x197)]===_0x5e3ab3(0x18e)?console[_0x5e3ab3(0x19c)](JSON['stringify']({'path':'/','type':'root'})):console['log']('/'),0x0;if(_0x39d0a1[_0x5e3ab3(0x197)]===_0x5e3ab3(0x191)||_0x39d0a1[_0x5e3ab3(0x197)]===_0x5e3ab3(0x18e)){const _0x4a5aec={'path':_0x2bd4f0};console[_0x5e3ab3(0x19c)](JSON[_0x5e3ab3(0x199)](_0x4a5aec));}else console[_0x5e3ab3(0x19c)](_0x2bd4f0),_0x39d0a1[_0x5e3ab3(0x19a)]&&(console[_0x5e3ab3(0x194)](''),console[_0x5e3ab3(0x194)](_0x5e3ab3(0x19b)),console[_0x5e3ab3(0x194)](_0x5e3ab3(0x1a0)+_0x2bd4f0),console['error'](''),console[_0x5e3ab3(0x194)]('Use\x20\x22tdx\x20context\x22\x20to\x20see\x20all\x20context\x20parameters'),console[_0x5e3ab3(0x194)]('Use\x20\x22tdx\x20context\x20--debug\x22\x20to\x20see\x20context\x20sources'));return 0x0;}catch(_0x26f9f2){throw _0x26f9f2;}}}
1
+ const a25_0x20f662=a25_0x5207;(function(_0x4e9130,_0x27bfd1){const _0x4db32b=a25_0x5207,_0x1aa8f0=_0x4e9130();while(!![]){try{const _0xc7dd91=parseInt(_0x4db32b(0x1d7))/0x1*(-parseInt(_0x4db32b(0x1d3))/0x2)+parseInt(_0x4db32b(0x1c9))/0x3+parseInt(_0x4db32b(0x1cb))/0x4+-parseInt(_0x4db32b(0x1cc))/0x5*(parseInt(_0x4db32b(0x1c8))/0x6)+parseInt(_0x4db32b(0x1dc))/0x7+parseInt(_0x4db32b(0x1ce))/0x8+parseInt(_0x4db32b(0x1d8))/0x9*(-parseInt(_0x4db32b(0x1da))/0xa);if(_0xc7dd91===_0x27bfd1)break;else _0x1aa8f0['push'](_0x1aa8f0['shift']());}catch(_0x2f71bd){_0x1aa8f0['push'](_0x1aa8f0['shift']());}}}(a25_0x9798,0x4b4ae));function a25_0x5207(_0x5399f1,_0x42ca3f){const _0x9798af=a25_0x9798();return a25_0x5207=function(_0x52070f,_0x268f6a){_0x52070f=_0x52070f-0x1c8;let _0x4f7c6c=_0x9798af[_0x52070f];return _0x4f7c6c;},a25_0x5207(_0x5399f1,_0x42ca3f);}import{BaseCommand}from'./command.js';function a25_0x9798(){const _0x4a34a1=['root','3417799NIcsDT','format','json','Use\x20\x22tdx\x20context\x20--debug\x22\x20to\x20see\x20context\x20sources','jsonl','730326kRFKDi','1718961tAMMMy','segmentPath','1933028phIvtN','5JktmxR','name','683560NXoygP','segment:pwd','Context\x20details:','log','error','103198xevIOB','description','execute','\x20\x20Path:\x20','3zrMMfW','315WplnBe','stringify','298580EZgBBc'];a25_0x9798=function(){return _0x4a34a1;};return a25_0x9798();}export class SegmentPwdCommand extends BaseCommand{[a25_0x20f662(0x1cd)]=a25_0x20f662(0x1cf);[a25_0x20f662(0x1d4)]='Show\x20current\x20segment/folder\x20context';async[a25_0x20f662(0x1d5)](_0x2760ac){const _0x2115fb=a25_0x20f662,{options:_0x1d6317}=_0x2760ac;try{const _0x3904ad=_0x1d6317[_0x2115fb(0x1ca)];if(!_0x3904ad)return _0x1d6317[_0x2115fb(0x1dd)]===_0x2115fb(0x1de)||_0x1d6317['format']===_0x2115fb(0x1e0)?console[_0x2115fb(0x1d1)](JSON[_0x2115fb(0x1d9)]({'path':'/','type':_0x2115fb(0x1db)})):console[_0x2115fb(0x1d1)]('/'),0x0;if(_0x1d6317[_0x2115fb(0x1dd)]===_0x2115fb(0x1de)||_0x1d6317['format']===_0x2115fb(0x1e0)){const _0x5a10be={'path':_0x3904ad};console[_0x2115fb(0x1d1)](JSON['stringify'](_0x5a10be));}else console[_0x2115fb(0x1d1)](_0x3904ad),_0x1d6317['verbose']&&(console[_0x2115fb(0x1d2)](''),console[_0x2115fb(0x1d2)](_0x2115fb(0x1d0)),console['error'](_0x2115fb(0x1d6)+_0x3904ad),console[_0x2115fb(0x1d2)](''),console[_0x2115fb(0x1d2)]('Use\x20\x22tdx\x20context\x22\x20to\x20see\x20all\x20context\x20parameters'),console[_0x2115fb(0x1d2)](_0x2115fb(0x1df)));return 0x0;}catch(_0x58714f){throw _0x58714f;}}}
@@ -1 +1 @@
1
- const a26_0x52befe=a26_0x3420;function a26_0x3420(_0xf5d057,_0x36a1fe){const _0x49abf7=a26_0x49ab();return a26_0x3420=function(_0x342046,_0x187542){_0x342046=_0x342046-0x1bb;let _0x1f08f9=_0x49abf7[_0x342046];return _0x1f08f9;},a26_0x3420(_0xf5d057,_0x36a1fe);}(function(_0x48dff0,_0x996baa){const _0x4a3353=a26_0x3420,_0x42d448=_0x48dff0();while(!![]){try{const _0x5e8947=parseInt(_0x4a3353(0x1d9))/0x1+-parseInt(_0x4a3353(0x1e5))/0x2+parseInt(_0x4a3353(0x1bd))/0x3+-parseInt(_0x4a3353(0x1c7))/0x4*(-parseInt(_0x4a3353(0x1d1))/0x5)+-parseInt(_0x4a3353(0x1c8))/0x6+parseInt(_0x4a3353(0x1dd))/0x7+-parseInt(_0x4a3353(0x1c2))/0x8;if(_0x5e8947===_0x996baa)break;else _0x42d448['push'](_0x42d448['shift']());}catch(_0x355f93){_0x42d448['push'](_0x42d448['shift']());}}}(a26_0x49ab,0x383ab));import{BaseCommand}from'./command.js';import{handleSDKOutput}from'../utils/command-output.js';import{withSpinner}from'../utils/spinner.js';import{loadJSONFromOptions}from'../utils/json-loader.js';import{SDKError,ErrorCode}from'../sdk/index.js';function a26_0x49ab(){const _0x2df24a=['Resolved\x20folder\x20ID:\x20','Resolving\x20folder\x20\x27','ruleFile','type','Parent\x20ID:\x20','857335DvTtCM','Usage:\x20tdx\x20segment\x20update\x20<path>\x20[options]','verbose','\x20\x20tdx\x20segment\x20update\x20\x22My\x20Audience/High\x20Value\x22\x20--description\x20\x22...\x22','segment','Examples:','Use:\x20tdx\x20segment\x20update\x20<path_to_segment>\x20[options]','Resolving\x20path\x20\x27','166220SLuLuv','\x27...','\x20\x20\x20Path:\x20','parentId','606263omQCbQ','error','segmentId','folder','segmentPath','length','kind','Updating\x20segment\x20\x27','232858zcsqHB','Resolved\x20relative\x20path\x20to:\x20','.\x20Only\x20child\x20segments\x20can\x20be\x20updated.','1026090AHbJIB','Error:\x20Segment\x20path\x20or\x20name\x20is\x20required','Resolved\x20type:\x20','\x20\x20tdx\x20segment\x20update\x20\x22High\x20Value\x22\x20--rule\x20\x27...\x27\x20\x20#\x20Relative\x20to\x20context','execute','2706184xkdNWS','resolvePathToResource','name','data','description','8nFbOQn','1516656cLwgHV','Segment\x20ID\x20missing\x20from\x20resolved\x20path','updateSegmentById','Error:\x20Cannot\x20update\x20'];a26_0x49ab=function(){return _0x2df24a;};return a26_0x49ab();}export class SegmentUpdateCommand extends BaseCommand{['name']='segment:update';[a26_0x52befe(0x1c6)]='Update\x20existing\x20child\x20segment';async[a26_0x52befe(0x1c1)](_0x91471b){const _0x5534b5=a26_0x52befe,{options:_0x273776,args:_0x853bb4,tdx:_0x5d3971}=_0x91471b,_0x1d21b2=_0x273776;if(_0x853bb4[_0x5534b5(0x1e2)]===0x0)return console[_0x5534b5(0x1de)](_0x5534b5(0x1be)),console[_0x5534b5(0x1de)](_0x5534b5(0x1d2)),console[_0x5534b5(0x1de)](_0x5534b5(0x1d6)),console[_0x5534b5(0x1de)](_0x5534b5(0x1d4)),console[_0x5534b5(0x1de)](_0x5534b5(0x1c0)),0x1;const _0x55e0e1=_0x853bb4[0x0],_0x33553=_0x273776[_0x5534b5(0x1e1)];let _0x88cb5e=_0x55e0e1;_0x33553&&!_0x55e0e1['includes']('/')&&(_0x88cb5e=_0x33553+'/'+_0x55e0e1,_0x1d21b2[_0x5534b5(0x1d3)]&&console[_0x5534b5(0x1de)](_0x5534b5(0x1bb)+_0x88cb5e));const _0x3ec8ce=await withSpinner(_0x5534b5(0x1d8)+_0x88cb5e+_0x5534b5(0x1da),()=>_0x5d3971[_0x5534b5(0x1d5)][_0x5534b5(0x1c3)](_0x88cb5e),{'verbose':_0x1d21b2['verbose']}),_0x7c58b4=_0x3ec8ce[_0x5534b5(0x1c5)];_0x1d21b2[_0x5534b5(0x1d3)]&&console[_0x5534b5(0x1de)](_0x5534b5(0x1bf)+_0x7c58b4[_0x5534b5(0x1cf)]);if(_0x7c58b4[_0x5534b5(0x1cf)]!==_0x5534b5(0x1d5))return console['error'](_0x5534b5(0x1cb)+_0x7c58b4['type']+_0x5534b5(0x1bc)),console[_0x5534b5(0x1de)](_0x5534b5(0x1d7)),0x1;if(!_0x7c58b4[_0x5534b5(0x1df)])throw new SDKError(ErrorCode['INTERNAL'],_0x5534b5(0x1c9));const _0x2ef99d=_0x7c58b4[_0x5534b5(0x1dc)],_0x2682a0=_0x7c58b4['segmentId'];_0x1d21b2[_0x5534b5(0x1d3)]&&(console[_0x5534b5(0x1de)](_0x5534b5(0x1d0)+_0x2ef99d),console[_0x5534b5(0x1de)]('Segment\x20ID:\x20'+_0x2682a0));let _0x129921;if(_0x1d21b2[_0x5534b5(0x1e0)]){const _0x44b224=_0x1d21b2[_0x5534b5(0x1e0)],_0x2eee0e=await withSpinner(_0x5534b5(0x1cd)+_0x44b224+'\x27...',()=>_0x5d3971[_0x5534b5(0x1d5)]['resolveFolderId'](_0x2ef99d,_0x44b224),{'verbose':_0x1d21b2[_0x5534b5(0x1d3)]});_0x129921=parseInt(_0x2eee0e[_0x5534b5(0x1c5)],0xa),_0x1d21b2[_0x5534b5(0x1d3)]&&console['error'](_0x5534b5(0x1cc)+_0x129921);}const _0x43f0eb=await loadJSONFromOptions(_0x1d21b2['rule'],_0x1d21b2[_0x5534b5(0x1ce)]),_0x4c01d2={'name':_0x1d21b2[_0x5534b5(0x1c4)],'description':_0x1d21b2[_0x5534b5(0x1c6)],'rule':_0x43f0eb,'kind':_0x1d21b2[_0x5534b5(0x1e3)]!==undefined?parseInt(_0x1d21b2['kind'],0xa):undefined,'segmentFolderId':_0x129921},_0x39a9d8=await withSpinner(_0x5534b5(0x1e4)+_0x7c58b4['segmentName']+_0x5534b5(0x1da),()=>_0x5d3971[_0x5534b5(0x1d5)][_0x5534b5(0x1ca)](_0x2ef99d,_0x2682a0,_0x4c01d2),{'verbose':_0x1d21b2[_0x5534b5(0x1d3)]}),_0x53bacd=_0x39a9d8[_0x5534b5(0x1c5)];return console[_0x5534b5(0x1de)]('✔\x20Updated\x20segment\x20\x27'+_0x53bacd[_0x5534b5(0x1c4)]+'\x27'),_0x88cb5e!==_0x55e0e1&&console[_0x5534b5(0x1de)](_0x5534b5(0x1db)+_0x88cb5e),await handleSDKOutput([_0x53bacd],_0x1d21b2),0x0;}}
1
+ const a26_0x3cd972=a26_0x55c7;(function(_0x191788,_0x6b95c1){const _0x557f3a=a26_0x55c7,_0xba089b=_0x191788();while(!![]){try{const _0x28c6be=-parseInt(_0x557f3a(0x171))/0x1+-parseInt(_0x557f3a(0x167))/0x2*(-parseInt(_0x557f3a(0x14d))/0x3)+-parseInt(_0x557f3a(0x157))/0x4*(parseInt(_0x557f3a(0x169))/0x5)+parseInt(_0x557f3a(0x158))/0x6+parseInt(_0x557f3a(0x16e))/0x7+parseInt(_0x557f3a(0x16b))/0x8*(parseInt(_0x557f3a(0x168))/0x9)+-parseInt(_0x557f3a(0x174))/0xa;if(_0x28c6be===_0x6b95c1)break;else _0xba089b['push'](_0xba089b['shift']());}catch(_0x27ebb1){_0xba089b['push'](_0xba089b['shift']());}}}(a26_0x1548,0x438d1));import{BaseCommand}from'./command.js';function a26_0x1548(){const _0x64d201=['kind','\x20\x20tdx\x20segment\x20update\x20\x22My\x20Audience/High\x20Value\x22\x20--description\x20\x22...\x22','length','updateSegmentById','execute','.\x20Only\x20child\x20segments\x20can\x20be\x20updated.','name','Segment\x20ID:\x20','Segment\x20ID\x20missing\x20from\x20resolved\x20path','data','1059006LduWUJ','63kOxjRF','2360VJhoIr','includes','141080TGDEqD','folder','Update\x20existing\x20child\x20segment','1797999DCeIhJ','✔\x20Updated\x20segment\x20\x27','Error:\x20Cannot\x20update\x20','503129IFOSij','rule','Examples:','365210XpqUau','\x27...','description','Error:\x20Segment\x20path\x20or\x20name\x20is\x20required','segmentId','Resolved\x20folder\x20ID:\x20','3lDXNIf','Resolved\x20type:\x20','Updating\x20segment\x20\x27','error','parentId','Resolving\x20folder\x20\x27','Parent\x20ID:\x20','segmentName','segment','type','4148ynwkrh','2375988ozbeRN','verbose','INTERNAL','Usage:\x20tdx\x20segment\x20update\x20<path>\x20[options]','\x20\x20\x20Path:\x20'];a26_0x1548=function(){return _0x64d201;};return a26_0x1548();}import{handleSDKOutput}from'../utils/command-output.js';function a26_0x55c7(_0x2467b6,_0x5c3d37){const _0x1548a7=a26_0x1548();return a26_0x55c7=function(_0x55c75f,_0x4f36a3){_0x55c75f=_0x55c75f-0x14d;let _0x5d3ee6=_0x1548a7[_0x55c75f];return _0x5d3ee6;},a26_0x55c7(_0x2467b6,_0x5c3d37);}import{withSpinner}from'../utils/spinner.js';import{loadJSONFromOptions}from'../utils/json-loader.js';import{SDKError,ErrorCode}from'../sdk/index.js';export class SegmentUpdateCommand extends BaseCommand{[a26_0x3cd972(0x163)]='segment:update';['description']=a26_0x3cd972(0x16d);async[a26_0x3cd972(0x161)](_0x314c44){const _0x2dd5e7=a26_0x3cd972,{options:_0x30070c,args:_0x1d62ca,tdx:_0x1213ac}=_0x314c44,_0x48d990=_0x30070c;if(_0x1d62ca[_0x2dd5e7(0x15f)]===0x0)return console['error'](_0x2dd5e7(0x177)),console[_0x2dd5e7(0x150)](_0x2dd5e7(0x15b)),console[_0x2dd5e7(0x150)](_0x2dd5e7(0x173)),console[_0x2dd5e7(0x150)](_0x2dd5e7(0x15e)),console[_0x2dd5e7(0x150)]('\x20\x20tdx\x20segment\x20update\x20\x22High\x20Value\x22\x20--rule\x20\x27...\x27\x20\x20#\x20Relative\x20to\x20context'),0x1;const _0x19e233=_0x1d62ca[0x0],_0x2ef3eb=_0x30070c['segmentPath'];let _0x1ea9e9=_0x19e233;_0x2ef3eb&&!_0x19e233[_0x2dd5e7(0x16a)]('/')&&(_0x1ea9e9=_0x2ef3eb+'/'+_0x19e233,_0x48d990[_0x2dd5e7(0x159)]&&console['error']('Resolved\x20relative\x20path\x20to:\x20'+_0x1ea9e9));const _0x3d3d80=await withSpinner('Resolving\x20path\x20\x27'+_0x1ea9e9+'\x27...',()=>_0x1213ac['segment']['resolvePathToResource'](_0x1ea9e9),{'verbose':_0x48d990['verbose']}),_0xc820b4=_0x3d3d80['data'];_0x48d990[_0x2dd5e7(0x159)]&&console[_0x2dd5e7(0x150)](_0x2dd5e7(0x14e)+_0xc820b4[_0x2dd5e7(0x156)]);if(_0xc820b4[_0x2dd5e7(0x156)]!==_0x2dd5e7(0x155))return console[_0x2dd5e7(0x150)](_0x2dd5e7(0x170)+_0xc820b4[_0x2dd5e7(0x156)]+_0x2dd5e7(0x162)),console['error']('Use:\x20tdx\x20segment\x20update\x20<path_to_segment>\x20[options]'),0x1;if(!_0xc820b4['segmentId'])throw new SDKError(ErrorCode[_0x2dd5e7(0x15a)],_0x2dd5e7(0x165));const _0x54a9bf=_0xc820b4[_0x2dd5e7(0x151)],_0x429a6a=_0xc820b4[_0x2dd5e7(0x178)];_0x48d990[_0x2dd5e7(0x159)]&&(console[_0x2dd5e7(0x150)](_0x2dd5e7(0x153)+_0x54a9bf),console[_0x2dd5e7(0x150)](_0x2dd5e7(0x164)+_0x429a6a));let _0x24b871;if(_0x48d990[_0x2dd5e7(0x16c)]){const _0x4e212c=_0x48d990[_0x2dd5e7(0x16c)],_0x3805e3=await withSpinner(_0x2dd5e7(0x152)+_0x4e212c+_0x2dd5e7(0x175),()=>_0x1213ac[_0x2dd5e7(0x155)]['resolveFolderId'](_0x54a9bf,_0x4e212c),{'verbose':_0x48d990['verbose']});_0x24b871=parseInt(_0x3805e3[_0x2dd5e7(0x166)],0xa),_0x48d990[_0x2dd5e7(0x159)]&&console[_0x2dd5e7(0x150)](_0x2dd5e7(0x179)+_0x24b871);}const _0x36fa5c=await loadJSONFromOptions(_0x48d990[_0x2dd5e7(0x172)],_0x48d990['ruleFile']),_0x1ae0cd={'name':_0x48d990[_0x2dd5e7(0x163)],'description':_0x48d990[_0x2dd5e7(0x176)],'rule':_0x36fa5c,'kind':_0x48d990[_0x2dd5e7(0x15d)]!==undefined?parseInt(_0x48d990[_0x2dd5e7(0x15d)],0xa):undefined,'segmentFolderId':_0x24b871},_0x13e072=await withSpinner(_0x2dd5e7(0x14f)+_0xc820b4[_0x2dd5e7(0x154)]+_0x2dd5e7(0x175),()=>_0x1213ac[_0x2dd5e7(0x155)][_0x2dd5e7(0x160)](_0x54a9bf,_0x429a6a,_0x1ae0cd),{'verbose':_0x48d990[_0x2dd5e7(0x159)]}),_0x5afc32=_0x13e072[_0x2dd5e7(0x166)];return console[_0x2dd5e7(0x150)](_0x2dd5e7(0x16f)+_0x5afc32[_0x2dd5e7(0x163)]+'\x27'),_0x1ea9e9!==_0x19e233&&console[_0x2dd5e7(0x150)](_0x2dd5e7(0x15c)+_0x1ea9e9),await handleSDKOutput([_0x5afc32],_0x48d990),0x0;}}
@@ -1 +1 @@
1
- const a27_0x11164a=a27_0x1258;function a27_0x1258(_0x3a67e2,_0x36bb2a){const _0x40c9b8=a27_0x40c9();return a27_0x1258=function(_0x125855,_0x5b77a9){_0x125855=_0x125855-0xba;let _0x30044c=_0x40c9b8[_0x125855];return _0x30044c;},a27_0x1258(_0x3a67e2,_0x36bb2a);}function a27_0x40c9(){const _0x38d5d5=['Context\x20cleared.\x20Back\x20to\x20root.','resolvePathToResource','Use\x20\x22tdx\x20segment\x20pwd\x22\x20to\x20show\x20current\x20context','Use\x20\x22tdx\x20segments\x22\x20to\x20list\x20contents\x20in\x20this\x20context','segment','segmentPath','execute','Site:\x20','Usage:\x20tdx\x20segment\x20use\x20<path>','join','Parent\x20ID:\x20','Examples:','Context\x20can\x20only\x20be\x20set\x20to\x20a\x20parent\x20segment\x20or\x20folder.','length','Use\x20\x22tdx\x20context\x22\x20to\x20see\x20all\x20context\x20parameters','315845dfvnRa','\x20\x20tdx\x20segment\x20use\x20\x22My\x20Audience/Marketing\x22','329418mQJFbW','site','Set\x20current\x20segment/folder\x20context\x20for\x20navigation','\x20\x20tdx\x20segment\x20use\x20/\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Clear\x20context','3771901KYplxa','slice','data','823616PTzfdh','description','Error:\x20Cannot\x20set\x20context\x20to\x20a\x20segment.','parentName','14FRRZLj','log','folderId','\x20\x20tdx\x20segment\x20use\x20\x22My\x20Audience\x22','verbose','Use:\x20tdx\x20segment\x20use\x20','segments','fullPath','parentId','type','Resolved\x20path\x20type:\x20','Resolving\x20path\x20\x27','session','Target\x20path:\x20','72gnzjvd','Use\x20an\x20absolute\x20path\x20or\x20set\x20context\x20with:\x20tdx\x20segment\x20use\x20<parent_name>','folderPath','26244252ymDVyH','name','Resolved\x20relative\x20path\x20to:\x20','949324YYtNFz','error','7542736VXjbGd'];a27_0x40c9=function(){return _0x38d5d5;};return a27_0x40c9();}(function(_0x3faf78,_0x26443d){const _0x37df89=a27_0x1258,_0x451c2d=_0x3faf78();while(!![]){try{const _0x1eb383=-parseInt(_0x37df89(0xd2))/0x1+-parseInt(_0x37df89(0xbe))/0x2*(parseInt(_0x37df89(0xe6))/0x3)+parseInt(_0x37df89(0xba))/0x4+-parseInt(_0x37df89(0xe4))/0x5*(-parseInt(_0x37df89(0xcc))/0x6)+-parseInt(_0x37df89(0xea))/0x7+-parseInt(_0x37df89(0xd4))/0x8+parseInt(_0x37df89(0xcf))/0x9;if(_0x1eb383===_0x26443d)break;else _0x451c2d['push'](_0x451c2d['shift']());}catch(_0x40221a){_0x451c2d['push'](_0x451c2d['shift']());}}}(a27_0x40c9,0xa6175));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{[a27_0x11164a(0xd0)]='segment:use';[a27_0x11164a(0xbb)]=a27_0x11164a(0xe8);async[a27_0x11164a(0xdb)](_0x4932ad){const _0x5ceb23=a27_0x11164a,{options:_0x49b034,args:_0x1e5cee,tdx:_0x4ffeb6}=_0x4932ad;if(_0x1e5cee[_0x5ceb23(0xe2)]===0x0)return console['error']('Error:\x20Path\x20is\x20required'),console[_0x5ceb23(0xd3)](_0x5ceb23(0xdd)),console['error'](_0x5ceb23(0xe0)),console[_0x5ceb23(0xd3)](_0x5ceb23(0xc1)),console[_0x5ceb23(0xd3)](_0x5ceb23(0xe5)),console[_0x5ceb23(0xd3)](_0x5ceb23(0xe9)),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 _0x5a520d=_0x1e5cee[0x0],_0x22090f=_0x49b034[_0x5ceb23(0xca)];try{if(_0x5a520d==='/')return saveSessionContext({'segment_path':undefined},_0x22090f),console['log'](_0x5ceb23(0xd5)),0x0;const _0x5226de=_0x49b034[_0x5ceb23(0xda)];let _0x4705ae=_0x5a520d;const _0x3e4d42=parsePath(_0x5a520d);if(!_0x3e4d42['isAbsolute']){if(!_0x5226de)return console[_0x5ceb23(0xd3)]('Error:\x20No\x20context\x20set.\x20Cannot\x20use\x20relative\x20path.'),console[_0x5ceb23(0xd3)](_0x5ceb23(0xcd)),0x1;if(_0x5a520d==='..'){const _0x5d4d0a=_0x5226de['split']('/')[_0x5ceb23(0xeb)](0x0,-0x1)[_0x5ceb23(0xde)]('/');_0x4705ae=_0x5d4d0a||'/';}else _0x5a520d==='.'?_0x4705ae=_0x5226de:_0x4705ae=_0x5226de+'/'+_0x5a520d;_0x49b034[_0x5ceb23(0xc2)]&&console[_0x5ceb23(0xd3)](_0x5ceb23(0xd1)+_0x4705ae);}if(_0x4705ae==='/'||_0x4705ae==='')return saveSessionContext({'segment_path':undefined},_0x22090f),console[_0x5ceb23(0xbf)](_0x5ceb23(0xd5)),0x0;_0x4705ae=normalizePath(_0x4705ae);const _0x53b865=parsePath(_0x4705ae)[_0x5ceb23(0xc4)];if(_0x53b865[_0x5ceb23(0xe2)]===0x0)return saveSessionContext({'segment_path':undefined},_0x22090f),console['log']('Context\x20cleared.\x20Back\x20to\x20root.'),0x0;_0x49b034['verbose']&&(console[_0x5ceb23(0xd3)](_0x5ceb23(0xdc)+_0x49b034[_0x5ceb23(0xe7)]),console[_0x5ceb23(0xd3)](_0x5ceb23(0xcb)+_0x4705ae));const _0x4d99f1=await withSpinner(_0x5ceb23(0xc9)+_0x4705ae+'\x27...',()=>_0x4ffeb6[_0x5ceb23(0xd9)][_0x5ceb23(0xd6)](_0x4705ae),{'verbose':_0x49b034[_0x5ceb23(0xc2)]}),_0x17ff94=_0x4d99f1[_0x5ceb23(0xec)];_0x49b034[_0x5ceb23(0xc2)]&&(console[_0x5ceb23(0xd3)](_0x5ceb23(0xc8)+_0x17ff94[_0x5ceb23(0xc7)]),console['error'](_0x5ceb23(0xdf)+_0x17ff94[_0x5ceb23(0xc6)]),_0x17ff94[_0x5ceb23(0xc0)]&&console[_0x5ceb23(0xd3)]('Folder\x20ID:\x20'+_0x17ff94['folderId']));if(_0x17ff94[_0x5ceb23(0xc7)]==='segment')return console[_0x5ceb23(0xd3)](_0x5ceb23(0xbc)),console[_0x5ceb23(0xd3)](_0x5ceb23(0xe1)),console[_0x5ceb23(0xd3)](_0x5ceb23(0xc3)+_0x17ff94['parentName']+(_0x17ff94['folderPath']?'/'+_0x17ff94[_0x5ceb23(0xce)]['join']('/'):'')),0x1;return saveSessionContext({'segment_path':_0x17ff94[_0x5ceb23(0xc5)],'parent_segment':_0x17ff94[_0x5ceb23(0xbd)]},_0x22090f),console[_0x5ceb23(0xbf)]('Context\x20set\x20to:\x20'+_0x17ff94[_0x5ceb23(0xc5)]),_0x49b034[_0x5ceb23(0xc2)]&&(console[_0x5ceb23(0xd3)](_0x5ceb23(0xd8)),console[_0x5ceb23(0xd3)](_0x5ceb23(0xd7)),console[_0x5ceb23(0xd3)](_0x5ceb23(0xe3))),0x0;}catch(_0x278f8c){throw _0x278f8c;}}}
1
+ const a27_0x8348b4=a27_0x4c00;(function(_0x203811,_0x4b286d){const _0x590c4c=a27_0x4c00,_0x1390eb=_0x203811();while(!![]){try{const _0x213332=-parseInt(_0x590c4c(0x8f))/0x1+-parseInt(_0x590c4c(0x97))/0x2+parseInt(_0x590c4c(0x7d))/0x3+-parseInt(_0x590c4c(0x7e))/0x4+-parseInt(_0x590c4c(0x80))/0x5+parseInt(_0x590c4c(0x92))/0x6*(parseInt(_0x590c4c(0x71))/0x7)+parseInt(_0x590c4c(0x75))/0x8;if(_0x213332===_0x4b286d)break;else _0x1390eb['push'](_0x1390eb['shift']());}catch(_0x3e7627){_0x1390eb['push'](_0x1390eb['shift']());}}}(a27_0x20df,0x483ea));function a27_0x20df(){const _0x2cc423=['folderId','64044ZkniAy','1711348DweyWH','segments','56240Ljcwke','split','\x20\x20tdx\x20segment\x20use\x20/\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Clear\x20context','description','Use\x20\x22tdx\x20segment\x20pwd\x22\x20to\x20show\x20current\x20context','execute','Set\x20current\x20segment/folder\x20context\x20for\x20navigation','\x20\x20tdx\x20segment\x20use\x20\x22My\x20Audience/Marketing\x22','length','Use\x20\x22tdx\x20segments\x22\x20to\x20list\x20contents\x20in\x20this\x20context','parentName','session','folderPath','Use:\x20tdx\x20segment\x20use\x20','segment','498462bfysis','Resolved\x20path\x20type:\x20','log','6eMiGYm','site','Use\x20\x22tdx\x20context\x22\x20to\x20see\x20all\x20context\x20parameters','Usage:\x20tdx\x20segment\x20use\x20<path>','fullPath','38466UjTWfK','Examples:','data','\x20\x20tdx\x20segment\x20use\x20\x22My\x20Audience\x22','Error:\x20Cannot\x20set\x20context\x20to\x20a\x20segment.','Error:\x20Path\x20is\x20required','join','segmentPath','error','Resolved\x20relative\x20path\x20to:\x20','slice','Context\x20set\x20to:\x20','resolvePathToResource','verbose','isAbsolute','424571avqvuP','Target\x20path:\x20','Context\x20cleared.\x20Back\x20to\x20root.','\x20\x20tdx\x20segment\x20use\x20..\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Go\x20to\x20parent','9365544QSROBq','Parent\x20ID:\x20','\x27...','type','parentId','Resolving\x20path\x20\x27','Use\x20an\x20absolute\x20path\x20or\x20set\x20context\x20with:\x20tdx\x20segment\x20use\x20<parent_name>'];a27_0x20df=function(){return _0x2cc423;};return a27_0x20df();}function a27_0x4c00(_0x4957da,_0x6a2fc4){const _0x20df7f=a27_0x20df();return a27_0x4c00=function(_0x4c00d8,_0x5b4025){_0x4c00d8=_0x4c00d8-0x68;let _0x2ee101=_0x20df7f[_0x4c00d8];return _0x2ee101;},a27_0x4c00(_0x4957da,_0x6a2fc4);}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';[a27_0x8348b4(0x83)]=a27_0x8348b4(0x86);async[a27_0x8348b4(0x85)](_0x53dab0){const _0x38bf41=a27_0x8348b4,{options:_0x4aabdc,args:_0x46c390,tdx:_0x850414}=_0x53dab0;if(_0x46c390[_0x38bf41(0x88)]===0x0)return console[_0x38bf41(0x6a)](_0x38bf41(0x9c)),console['error'](_0x38bf41(0x95)),console[_0x38bf41(0x6a)](_0x38bf41(0x98)),console['error'](_0x38bf41(0x9a)),console[_0x38bf41(0x6a)](_0x38bf41(0x87)),console[_0x38bf41(0x6a)](_0x38bf41(0x82)),console[_0x38bf41(0x6a)](_0x38bf41(0x74)),0x1;const _0x56caef=_0x46c390[0x0],_0x164f39=_0x4aabdc[_0x38bf41(0x8b)];try{if(_0x56caef==='/')return saveSessionContext({'segment_path':undefined},_0x164f39),console[_0x38bf41(0x91)]('Context\x20cleared.\x20Back\x20to\x20root.'),0x0;const _0x53c32e=_0x4aabdc[_0x38bf41(0x69)];let _0x4e990b=_0x56caef;const _0x521396=parsePath(_0x56caef);if(!_0x521396[_0x38bf41(0x70)]){if(!_0x53c32e)return console[_0x38bf41(0x6a)]('Error:\x20No\x20context\x20set.\x20Cannot\x20use\x20relative\x20path.'),console[_0x38bf41(0x6a)](_0x38bf41(0x7b)),0x1;if(_0x56caef==='..'){const _0x25f060=_0x53c32e[_0x38bf41(0x81)]('/')[_0x38bf41(0x6c)](0x0,-0x1)[_0x38bf41(0x68)]('/');_0x4e990b=_0x25f060||'/';}else _0x56caef==='.'?_0x4e990b=_0x53c32e:_0x4e990b=_0x53c32e+'/'+_0x56caef;_0x4aabdc[_0x38bf41(0x6f)]&&console[_0x38bf41(0x6a)](_0x38bf41(0x6b)+_0x4e990b);}if(_0x4e990b==='/'||_0x4e990b==='')return saveSessionContext({'segment_path':undefined},_0x164f39),console[_0x38bf41(0x91)]('Context\x20cleared.\x20Back\x20to\x20root.'),0x0;_0x4e990b=normalizePath(_0x4e990b);const _0x39952c=parsePath(_0x4e990b)[_0x38bf41(0x7f)];if(_0x39952c[_0x38bf41(0x88)]===0x0)return saveSessionContext({'segment_path':undefined},_0x164f39),console[_0x38bf41(0x91)](_0x38bf41(0x73)),0x0;_0x4aabdc['verbose']&&(console[_0x38bf41(0x6a)]('Site:\x20'+_0x4aabdc[_0x38bf41(0x93)]),console[_0x38bf41(0x6a)](_0x38bf41(0x72)+_0x4e990b));const _0x3f9449=await withSpinner(_0x38bf41(0x7a)+_0x4e990b+_0x38bf41(0x77),()=>_0x850414[_0x38bf41(0x8e)][_0x38bf41(0x6e)](_0x4e990b),{'verbose':_0x4aabdc[_0x38bf41(0x6f)]}),_0x12ce0e=_0x3f9449[_0x38bf41(0x99)];_0x4aabdc['verbose']&&(console[_0x38bf41(0x6a)](_0x38bf41(0x90)+_0x12ce0e[_0x38bf41(0x78)]),console[_0x38bf41(0x6a)](_0x38bf41(0x76)+_0x12ce0e[_0x38bf41(0x79)]),_0x12ce0e['folderId']&&console[_0x38bf41(0x6a)]('Folder\x20ID:\x20'+_0x12ce0e[_0x38bf41(0x7c)]));if(_0x12ce0e[_0x38bf41(0x78)]===_0x38bf41(0x8e))return console['error'](_0x38bf41(0x9b)),console[_0x38bf41(0x6a)]('Context\x20can\x20only\x20be\x20set\x20to\x20a\x20parent\x20segment\x20or\x20folder.'),console[_0x38bf41(0x6a)](_0x38bf41(0x8d)+_0x12ce0e[_0x38bf41(0x8a)]+(_0x12ce0e[_0x38bf41(0x8c)]?'/'+_0x12ce0e[_0x38bf41(0x8c)][_0x38bf41(0x68)]('/'):'')),0x1;return saveSessionContext({'segment_path':_0x12ce0e['fullPath'],'parent_segment':_0x12ce0e[_0x38bf41(0x8a)]},_0x164f39),console[_0x38bf41(0x91)](_0x38bf41(0x6d)+_0x12ce0e[_0x38bf41(0x96)]),_0x4aabdc[_0x38bf41(0x6f)]&&(console['error'](_0x38bf41(0x89)),console[_0x38bf41(0x6a)](_0x38bf41(0x84)),console[_0x38bf41(0x6a)](_0x38bf41(0x94))),0x0;}catch(_0x1ea298){throw _0x1ea298;}}}
@@ -1 +1 @@
1
- const a28_0x34baa7=a28_0x2f66;(function(_0x1eab11,_0x5694af){const _0x4d3c33=a28_0x2f66,_0x473b8d=_0x1eab11();while(!![]){try{const _0x58e2b0=-parseInt(_0x4d3c33(0x21d))/0x1+-parseInt(_0x4d3c33(0x1f3))/0x2*(-parseInt(_0x4d3c33(0x20f))/0x3)+-parseInt(_0x4d3c33(0x223))/0x4+parseInt(_0x4d3c33(0x20b))/0x5*(-parseInt(_0x4d3c33(0x21f))/0x6)+-parseInt(_0x4d3c33(0x210))/0x7*(parseInt(_0x4d3c33(0x1e9))/0x8)+parseInt(_0x4d3c33(0x222))/0x9+parseInt(_0x4d3c33(0x209))/0xa;if(_0x58e2b0===_0x5694af)break;else _0x473b8d['push'](_0x473b8d['shift']());}catch(_0x1ea52f){_0x473b8d['push'](_0x473b8d['shift']());}}}(a28_0x4f7b,0xa4811));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';function a28_0x2f66(_0xe58cb1,_0x1a82b3){const _0x4f7b3e=a28_0x4f7b();return a28_0x2f66=function(_0x2f6676,_0xb75d8){_0x2f6676=_0x2f6676-0x1e5;let _0x130d4f=_0x4f7b3e[_0x2f6676];return _0x130d4f;},a28_0x2f66(_0xe58cb1,_0x1a82b3);}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 a28_0x2df25f from'chalk';export class SegmentsCommand extends BaseCommand{[a28_0x34baa7(0x202)]=a28_0x34baa7(0x1ff);['description']='List\x20parent\x20segments,\x20folders,\x20and\x20child\x20segments';async[a28_0x34baa7(0x216)](_0x42f665){const _0x448f4b=a28_0x34baa7,{options:_0x3e93f5,args:_0x4389d3}=_0x42f665,_0x4d8630=_0x3e93f5[_0x448f4b(0x1ef)],_0x5c861e=_0x4389d3[0x0];try{const _0x5c9e56=_0x3e93f5['segmentPath'];_0x3e93f5[_0x448f4b(0x20c)]&&(console[_0x448f4b(0x208)]('Site:\x20'+_0x3e93f5[_0x448f4b(0x1ee)]),console[_0x448f4b(0x208)]('Current\x20context:\x20'+(_0x5c9e56||'/')),_0x5c861e&&console['error'](_0x448f4b(0x1ed)+_0x5c861e),_0x4d8630&&console[_0x448f4b(0x208)]('Recursive\x20mode:\x20enabled'));if(_0x5c861e){const _0x5d1a16=_0x5c861e['includes']('*')||_0x5c861e['includes']('?');if(_0x5d1a16&&!_0x5c9e56)return await this[_0x448f4b(0x1fa)](_0x42f665,_0x5c861e);else return _0x5d1a16?(console[_0x448f4b(0x208)](_0x448f4b(0x214)),console[_0x448f4b(0x208)]('Clear\x20context\x20with:\x20tdx\x20segment\x20use\x20/'),0x1):_0x4d8630?await this[_0x448f4b(0x20d)](_0x42f665,_0x5c861e):await this['listUnified'](_0x42f665,_0x5c861e);}if(!_0x5c9e56)return await this[_0x448f4b(0x213)](_0x42f665);return _0x4d8630?await this['listRecursive'](_0x42f665,_0x5c9e56):await this[_0x448f4b(0x1e8)](_0x42f665,_0x5c9e56);}catch(_0x5375d9){if(_0x5375d9 instanceof SDKError)return console[_0x448f4b(0x208)](_0x448f4b(0x1f4)+_0x5375d9[_0x448f4b(0x1f0)]),_0x5375d9[_0x448f4b(0x1f6)]&&console['error'](_0x448f4b(0x217)+_0x5375d9[_0x448f4b(0x1f6)]),0x1;throw _0x5375d9;}}async[a28_0x34baa7(0x1fa)](_0x44839d,_0x20460c){const _0x14607a=a28_0x34baa7,{options:_0x2e06ef,tdx:_0x5dfec7}=_0x44839d,_0x1a0b19=await withSpinner(_0x14607a(0x1fb)+_0x20460c+'\x27...',()=>_0x5dfec7[_0x14607a(0x224)][_0x14607a(0x213)](),{'verbose':_0x2e06ef['verbose']}),_0x96f0b9=_0x1a0b19['data'],_0x4a2e02=_0x20460c[_0x14607a(0x201)](/[.+^${}()|[\]\\]/g,_0x14607a(0x21e))[_0x14607a(0x201)](/\*/g,'.*')['replace'](/\?/g,'.'),_0x1b9650=new RegExp('^'+_0x4a2e02+'$','i'),_0x169ef7=_0x96f0b9[_0x14607a(0x1e5)](_0x4c571f=>_0x1b9650[_0x14607a(0x1f1)](_0x4c571f[_0x14607a(0x1ea)]['name']));console[_0x14607a(0x208)]('✔\x20Found\x20'+_0x169ef7[_0x14607a(0x21b)]+'\x20parent\x20segment'+(_0x169ef7[_0x14607a(0x21b)]!==0x1?'s':'')+_0x14607a(0x20a)+_0x20460c+'\x27');if(_0x2e06ef[_0x14607a(0x211)]===_0x14607a(0x221)||_0x2e06ef[_0x14607a(0x211)]===_0x14607a(0x219))await handleSDKOutput(_0x169ef7,_0x2e06ef);else{if(_0x169ef7['length']===0x0)console[_0x14607a(0x1ec)](_0x14607a(0x1f2)+_0x20460c);else{console['log'](_0x14607a(0x21a));for(const _0x1272dd of _0x169ef7){const _0x37fd17=_0x1272dd[_0x14607a(0x1ea)][_0x14607a(0x1fc)]?a28_0x2df25f[_0x14607a(0x205)]('\x20('+formatRows(_0x1272dd[_0x14607a(0x1ea)][_0x14607a(0x1fc)])+')'):'';console[_0x14607a(0x1ec)]('👥\x20'+_0x1272dd[_0x14607a(0x1ea)][_0x14607a(0x202)]+_0x37fd17);}}}return 0x0;}async[a28_0x34baa7(0x213)](_0x55ce6e){const _0x5d4b46=a28_0x34baa7,{options:_0x1f75f8,tdx:_0x5b9d1e}=_0x55ce6e,_0x27768d=await withSpinner(_0x5d4b46(0x204),()=>_0x5b9d1e[_0x5d4b46(0x224)][_0x5d4b46(0x213)](),{'verbose':_0x1f75f8['verbose']}),_0x5ea374=_0x27768d['data'];console['error']('✔\x20Found\x20'+_0x5ea374[_0x5d4b46(0x21b)]+'\x20parent\x20segment'+(_0x5ea374[_0x5d4b46(0x21b)]!==0x1?'s':''));if(_0x1f75f8['format']===_0x5d4b46(0x221)||_0x1f75f8[_0x5d4b46(0x211)]==='jsonl')await handleSDKOutput(_0x5ea374,_0x1f75f8);else{console[_0x5d4b46(0x1ec)](_0x5d4b46(0x21a));for(const _0x3b7c83 of _0x5ea374){const _0x2e9ade=_0x3b7c83[_0x5d4b46(0x1ea)][_0x5d4b46(0x1fc)]?a28_0x2df25f[_0x5d4b46(0x205)]('\x20('+formatRows(_0x3b7c83[_0x5d4b46(0x1ea)][_0x5d4b46(0x1fc)])+')'):'';console['log'](_0x5d4b46(0x1f8)+_0x3b7c83['attributes'][_0x5d4b46(0x202)]+_0x2e9ade);}}return 0x0;}async['listUnified'](_0x1cc21d,_0x1120e9){const _0x18849d=a28_0x34baa7,{options:_0x438bf0,tdx:_0x283ee7}=_0x1cc21d,_0x301f07=await withSpinner(_0x18849d(0x218)+_0x1120e9+'\x27...',()=>_0x283ee7[_0x18849d(0x224)]['resolvePathToResource'](_0x1120e9),{'verbose':_0x438bf0[_0x18849d(0x20c)]}),_0x3c991c=_0x301f07[_0x18849d(0x1fe)];_0x438bf0[_0x18849d(0x20c)]&&(console[_0x18849d(0x208)](_0x18849d(0x1f9)+_0x3c991c[_0x18849d(0x200)]),_0x3c991c[_0x18849d(0x20e)]&&console[_0x18849d(0x208)](_0x18849d(0x207)+_0x3c991c[_0x18849d(0x20e)]));const _0x1e75d2=await withSpinner(_0x18849d(0x212),()=>_0x283ee7[_0x18849d(0x224)][_0x18849d(0x1e8)](_0x3c991c['parentId'],_0x3c991c[_0x18849d(0x20e)]),{'verbose':_0x438bf0['verbose']}),{folders:_0x36e239,segments:_0x586df0}=_0x1e75d2[_0x18849d(0x1fe)],_0x2ff133=_0x36e239[_0x18849d(0x21b)]+_0x586df0['length'];console[_0x18849d(0x208)](_0x18849d(0x206)+_0x36e239[_0x18849d(0x21b)]+'\x20folder'+(_0x36e239['length']!==0x1?'s':'')+'\x20and\x20'+_0x586df0[_0x18849d(0x21b)]+_0x18849d(0x220)+(_0x586df0['length']!==0x1?'s':''));if(_0x438bf0[_0x18849d(0x211)]===_0x18849d(0x221)||_0x438bf0[_0x18849d(0x211)]===_0x18849d(0x219)){const _0xabccc2=[..._0x36e239['map'](_0x2d07f3=>({..._0x2d07f3,'type':_0x18849d(0x203)})),..._0x586df0[_0x18849d(0x1e7)](_0x2d6517=>({..._0x2d6517,'type':_0x18849d(0x224)}))][_0x18849d(0x215)]((_0x586aeb,_0x3c79f1)=>_0x586aeb[_0x18849d(0x202)][_0x18849d(0x1e6)](_0x3c79f1[_0x18849d(0x202)]));await handleSDKOutput(_0xabccc2,_0x438bf0);}else{if(_0x2ff133===0x0)console[_0x18849d(0x1ec)](a28_0x2df25f[_0x18849d(0x205)]('[/'+_0x1120e9+']')),console[_0x18849d(0x1ec)](_0x18849d(0x21c));else{console[_0x18849d(0x1ec)](a28_0x2df25f[_0x18849d(0x205)]('[/'+_0x1120e9+']'));const _0xd3286a=formatFlatList(_0x36e239,_0x586df0,{'showMetadata':!![]});console[_0x18849d(0x1ec)](_0xd3286a);}}return 0x0;}async[a28_0x34baa7(0x20d)](_0x3e896f,_0x3fd5e6){const _0x5900e9=a28_0x34baa7,{options:_0x30f81e,tdx:_0x1c248a}=_0x3e896f,_0x4c4d54=await withSpinner('Resolving\x20context\x20path\x20\x27'+_0x3fd5e6+_0x5900e9(0x1eb),()=>_0x1c248a[_0x5900e9(0x224)]['resolvePathToResource'](_0x3fd5e6),{'verbose':_0x30f81e[_0x5900e9(0x20c)]}),_0xb6f80e=_0x4c4d54[_0x5900e9(0x1fe)];_0x30f81e['verbose']&&(console[_0x5900e9(0x208)](_0x5900e9(0x1f9)+_0xb6f80e[_0x5900e9(0x200)]),_0xb6f80e[_0x5900e9(0x20e)]&&console['error'](_0x5900e9(0x207)+_0xb6f80e[_0x5900e9(0x20e)]));const _0x58eb8c=_0x30f81e[_0x5900e9(0x1f5)]||0xa,_0x2395d1=await withSpinner(_0x5900e9(0x1fd),()=>_0x1c248a[_0x5900e9(0x224)]['listRecursive'](_0xb6f80e['parentId'],_0xb6f80e['folderId'],0x0,_0x58eb8c),{'verbose':_0x30f81e['verbose']}),_0x5456ff=_0x2395d1['data'];console[_0x5900e9(0x208)]('✔\x20Built\x20tree\x20with\x20'+_0x5456ff[_0x5900e9(0x21b)]+_0x5900e9(0x1f7));if(_0x30f81e['format']===_0x5900e9(0x221)||_0x30f81e[_0x5900e9(0x211)]===_0x5900e9(0x219))await handleSDKOutput(_0x5456ff,_0x30f81e);else{console[_0x5900e9(0x1ec)](a28_0x2df25f['dim']('[/'+_0x3fd5e6+']'));const _0x21e9f8=formatTree(_0x5456ff,{'showMetadata':!![]});console[_0x5900e9(0x1ec)](_0x21e9f8);}return 0x0;}}function a28_0x4f7b(){const _0x414a2b=['json','1033128TvGSWU','196964vFfxoU','segment','filter','localeCompare','map','listUnified','1827792NDTmMP','attributes','\x27...','log','Path/pattern\x20arg:\x20','site','recursive','message','test','No\x20parent\x20segments\x20match\x20pattern:\x20','2FhmmDq','Error:\x20','maxDepth','cause','\x20top-level\x20items','👥\x20','Parent\x20ID:\x20','listParentsWithPattern','Listing\x20parent\x20segments\x20matching\x20\x27','population','Building\x20hierarchy\x20tree...','data','segments','parentId','replace','name','folder','Listing\x20parent\x20segments...','dim','✔\x20Found\x20','Folder\x20ID:\x20','error','16259330uxSGmS','\x20matching\x20\x27','1996525RauyxL','verbose','listRecursive','folderId','1510503NoZhfW','28ZMTIop','format','Listing\x20folders\x20and\x20segments...','listParents','Error:\x20Pattern\x20matching\x20is\x20only\x20supported\x20at\x20root\x20level\x20(no\x20context\x20set).','sort','execute','\x20\x20Cause:\x20','Resolving\x20context\x20path\x20\x27','jsonl','[parent\x20segments]','length','(empty)','207975zQxrZM','\x5c$&','6gVOhdZ','\x20segment'];a28_0x4f7b=function(){return _0x414a2b;};return a28_0x4f7b();}
1
+ const a28_0x5c2266=a28_0x39ed;function a28_0x39ed(_0x537bbe,_0x3ea9f3){const _0x5a06c9=a28_0x5a06();return a28_0x39ed=function(_0x39ed6f,_0x12fab2){_0x39ed6f=_0x39ed6f-0x104;let _0x295459=_0x5a06c9[_0x39ed6f];return _0x295459;},a28_0x39ed(_0x537bbe,_0x3ea9f3);}(function(_0x33e92e,_0x497abd){const _0x33e3ee=a28_0x39ed,_0x2ef7ad=_0x33e92e();while(!![]){try{const _0x48ff57=parseInt(_0x33e3ee(0x121))/0x1+-parseInt(_0x33e3ee(0x127))/0x2+-parseInt(_0x33e3ee(0x140))/0x3*(-parseInt(_0x33e3ee(0x10e))/0x4)+parseInt(_0x33e3ee(0x13d))/0x5*(-parseInt(_0x33e3ee(0x145))/0x6)+parseInt(_0x33e3ee(0x128))/0x7*(-parseInt(_0x33e3ee(0x10f))/0x8)+-parseInt(_0x33e3ee(0x12c))/0x9*(-parseInt(_0x33e3ee(0x133))/0xa)+-parseInt(_0x33e3ee(0x148))/0xb*(-parseInt(_0x33e3ee(0x123))/0xc);if(_0x48ff57===_0x497abd)break;else _0x2ef7ad['push'](_0x2ef7ad['shift']());}catch(_0x3c8ca4){_0x2ef7ad['push'](_0x2ef7ad['shift']());}}}(a28_0x5a06,0x7fd9c));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 a28_0x6bbc90 from'chalk';export class SegmentsCommand extends BaseCommand{[a28_0x5c2266(0x107)]=a28_0x5c2266(0x106);[a28_0x5c2266(0x12a)]=a28_0x5c2266(0x12e);async[a28_0x5c2266(0x10c)](_0x5ca625){const _0x3d6bf0=a28_0x5c2266,{options:_0x2b805e,args:_0xb18279}=_0x5ca625,_0x5b1193=_0x2b805e[_0x3d6bf0(0x117)],_0x14dd2f=_0xb18279[0x0];try{const _0x5b7d7b=_0x2b805e[_0x3d6bf0(0x13e)];_0x2b805e[_0x3d6bf0(0x13a)]&&(console[_0x3d6bf0(0x138)]('Site:\x20'+_0x2b805e[_0x3d6bf0(0x10a)]),console[_0x3d6bf0(0x138)](_0x3d6bf0(0x122)+(_0x5b7d7b||'/')),_0x14dd2f&&console[_0x3d6bf0(0x138)](_0x3d6bf0(0x111)+_0x14dd2f),_0x5b1193&&console[_0x3d6bf0(0x138)](_0x3d6bf0(0x12b)));if(_0x14dd2f){const _0x301993=_0x14dd2f[_0x3d6bf0(0x146)]('*')||_0x14dd2f[_0x3d6bf0(0x146)]('?');if(_0x301993&&!_0x5b7d7b)return await this[_0x3d6bf0(0x118)](_0x5ca625,_0x14dd2f);else return _0x301993?(console[_0x3d6bf0(0x138)]('Error:\x20Pattern\x20matching\x20is\x20only\x20supported\x20at\x20root\x20level\x20(no\x20context\x20set).'),console[_0x3d6bf0(0x138)](_0x3d6bf0(0x12f)),0x1):_0x5b1193?await this[_0x3d6bf0(0x109)](_0x5ca625,_0x14dd2f):await this[_0x3d6bf0(0x120)](_0x5ca625,_0x14dd2f);}if(!_0x5b7d7b)return await this[_0x3d6bf0(0x129)](_0x5ca625);return _0x5b1193?await this[_0x3d6bf0(0x109)](_0x5ca625,_0x5b7d7b):await this[_0x3d6bf0(0x120)](_0x5ca625,_0x5b7d7b);}catch(_0x59d1ba){if(_0x59d1ba instanceof SDKError)return console['error']('Error:\x20'+_0x59d1ba[_0x3d6bf0(0x13f)]),_0x59d1ba[_0x3d6bf0(0x110)]&&console[_0x3d6bf0(0x138)](_0x3d6bf0(0x14a)+_0x59d1ba['cause']),0x1;throw _0x59d1ba;}}async[a28_0x5c2266(0x118)](_0xdcea58,_0x344111){const _0x3c6f9a=a28_0x5c2266,{options:_0x4002ab,tdx:_0x7436c5}=_0xdcea58,_0x9a0cfe=await withSpinner(_0x3c6f9a(0x13c)+_0x344111+_0x3c6f9a(0x119),()=>_0x7436c5[_0x3c6f9a(0x141)][_0x3c6f9a(0x129)](),{'verbose':_0x4002ab[_0x3c6f9a(0x13a)]}),_0xc7a196=_0x9a0cfe[_0x3c6f9a(0x114)],_0x106449=_0x344111[_0x3c6f9a(0x126)](/[.+^${}()|[\]\\]/g,_0x3c6f9a(0x149))[_0x3c6f9a(0x126)](/\*/g,'.*')[_0x3c6f9a(0x126)](/\?/g,'.'),_0x5885a9=new RegExp('^'+_0x106449+'$','i'),_0x4f9ef2=_0xc7a196[_0x3c6f9a(0x11d)](_0x3ae503=>_0x5885a9['test'](_0x3ae503[_0x3c6f9a(0x113)][_0x3c6f9a(0x107)]));console[_0x3c6f9a(0x138)]('✔\x20Found\x20'+_0x4f9ef2[_0x3c6f9a(0x131)]+_0x3c6f9a(0x104)+(_0x4f9ef2[_0x3c6f9a(0x131)]!==0x1?'s':'')+_0x3c6f9a(0x11b)+_0x344111+'\x27');if(_0x4002ab[_0x3c6f9a(0x130)]===_0x3c6f9a(0x124)||_0x4002ab['format']===_0x3c6f9a(0x137))await handleSDKOutput(_0x4f9ef2,_0x4002ab);else{if(_0x4f9ef2['length']===0x0)console[_0x3c6f9a(0x11e)]('No\x20parent\x20segments\x20match\x20pattern:\x20'+_0x344111);else{console[_0x3c6f9a(0x11e)](_0x3c6f9a(0x147));for(const _0x4f8e3c of _0x4f9ef2){const _0x47f047=_0x4f8e3c[_0x3c6f9a(0x113)][_0x3c6f9a(0x139)]?a28_0x6bbc90[_0x3c6f9a(0x13b)]('\x20('+formatRows(_0x4f8e3c[_0x3c6f9a(0x113)]['population'])+')'):'';console[_0x3c6f9a(0x11e)]('👥\x20'+_0x4f8e3c[_0x3c6f9a(0x113)][_0x3c6f9a(0x107)]+_0x47f047);}}}return 0x0;}async[a28_0x5c2266(0x129)](_0x265b87){const _0x4bf4b2=a28_0x5c2266,{options:_0x5f346d,tdx:_0x27131c}=_0x265b87,_0xcea1af=await withSpinner(_0x4bf4b2(0x142),()=>_0x27131c[_0x4bf4b2(0x141)]['listParents'](),{'verbose':_0x5f346d[_0x4bf4b2(0x13a)]}),_0x28ad6b=_0xcea1af[_0x4bf4b2(0x114)];console[_0x4bf4b2(0x138)](_0x4bf4b2(0x116)+_0x28ad6b['length']+_0x4bf4b2(0x104)+(_0x28ad6b[_0x4bf4b2(0x131)]!==0x1?'s':''));if(_0x5f346d['format']===_0x4bf4b2(0x124)||_0x5f346d['format']==='jsonl')await handleSDKOutput(_0x28ad6b,_0x5f346d);else{console[_0x4bf4b2(0x11e)](_0x4bf4b2(0x147));for(const _0x52170a of _0x28ad6b){const _0x3f8447=_0x52170a[_0x4bf4b2(0x113)]['population']?a28_0x6bbc90[_0x4bf4b2(0x13b)]('\x20('+formatRows(_0x52170a[_0x4bf4b2(0x113)][_0x4bf4b2(0x139)])+')'):'';console[_0x4bf4b2(0x11e)]('👥\x20'+_0x52170a['attributes'][_0x4bf4b2(0x107)]+_0x3f8447);}}return 0x0;}async[a28_0x5c2266(0x120)](_0x98f116,_0x556130){const _0x10b7c5=a28_0x5c2266,{options:_0x4fd90b,tdx:_0x5507b5}=_0x98f116,_0x11bf62=await withSpinner(_0x10b7c5(0x11c)+_0x556130+'\x27...',()=>_0x5507b5[_0x10b7c5(0x141)]['resolvePathToResource'](_0x556130),{'verbose':_0x4fd90b[_0x10b7c5(0x13a)]}),_0x77c79e=_0x11bf62['data'];_0x4fd90b[_0x10b7c5(0x13a)]&&(console['error'](_0x10b7c5(0x135)+_0x77c79e[_0x10b7c5(0x134)]),_0x77c79e[_0x10b7c5(0x11f)]&&console[_0x10b7c5(0x138)](_0x10b7c5(0x105)+_0x77c79e[_0x10b7c5(0x11f)]));const _0x41ba8e=await withSpinner(_0x10b7c5(0x10d),()=>_0x5507b5['segment']['listUnified'](_0x77c79e[_0x10b7c5(0x134)],_0x77c79e[_0x10b7c5(0x11f)]),{'verbose':_0x4fd90b['verbose']}),{folders:_0x992c0f,segments:_0x22afff}=_0x41ba8e[_0x10b7c5(0x114)],_0x351327=_0x992c0f[_0x10b7c5(0x131)]+_0x22afff[_0x10b7c5(0x131)];console[_0x10b7c5(0x138)](_0x10b7c5(0x116)+_0x992c0f['length']+_0x10b7c5(0x10b)+(_0x992c0f[_0x10b7c5(0x131)]!==0x1?'s':'')+_0x10b7c5(0x12d)+_0x22afff[_0x10b7c5(0x131)]+_0x10b7c5(0x11a)+(_0x22afff['length']!==0x1?'s':''));if(_0x4fd90b[_0x10b7c5(0x130)]===_0x10b7c5(0x124)||_0x4fd90b[_0x10b7c5(0x130)]===_0x10b7c5(0x137)){const _0x413ce6=[..._0x992c0f[_0x10b7c5(0x136)](_0x4b7379=>({..._0x4b7379,'type':_0x10b7c5(0x143)})),..._0x22afff['map'](_0x43e15e=>({..._0x43e15e,'type':_0x10b7c5(0x141)}))][_0x10b7c5(0x125)]((_0x101a10,_0x39015c)=>_0x101a10[_0x10b7c5(0x107)]['localeCompare'](_0x39015c[_0x10b7c5(0x107)]));await handleSDKOutput(_0x413ce6,_0x4fd90b);}else{if(_0x351327===0x0)console['log'](a28_0x6bbc90[_0x10b7c5(0x13b)]('[/'+_0x556130+']')),console[_0x10b7c5(0x11e)](_0x10b7c5(0x115));else{console[_0x10b7c5(0x11e)](a28_0x6bbc90[_0x10b7c5(0x13b)]('[/'+_0x556130+']'));const _0x26059b=formatFlatList(_0x992c0f,_0x22afff,{'showMetadata':!![]});console['log'](_0x26059b);}}return 0x0;}async[a28_0x5c2266(0x109)](_0x1cbb1f,_0x43cf4c){const _0x15f754=a28_0x5c2266,{options:_0x3506e3,tdx:_0x1bda1a}=_0x1cbb1f,_0x1e75bd=await withSpinner(_0x15f754(0x11c)+_0x43cf4c+_0x15f754(0x119),()=>_0x1bda1a[_0x15f754(0x141)][_0x15f754(0x108)](_0x43cf4c),{'verbose':_0x3506e3[_0x15f754(0x13a)]}),_0x2f6b58=_0x1e75bd['data'];_0x3506e3['verbose']&&(console[_0x15f754(0x138)]('Parent\x20ID:\x20'+_0x2f6b58[_0x15f754(0x134)]),_0x2f6b58[_0x15f754(0x11f)]&&console['error'](_0x15f754(0x105)+_0x2f6b58[_0x15f754(0x11f)]));const _0x422f86=_0x3506e3[_0x15f754(0x112)]||0xa,_0x17f3b6=await withSpinner('Building\x20hierarchy\x20tree...',()=>_0x1bda1a[_0x15f754(0x141)]['listRecursive'](_0x2f6b58[_0x15f754(0x134)],_0x2f6b58['folderId'],0x0,_0x422f86),{'verbose':_0x3506e3[_0x15f754(0x13a)]}),_0x5696e4=_0x17f3b6[_0x15f754(0x114)];console[_0x15f754(0x138)](_0x15f754(0x144)+_0x5696e4[_0x15f754(0x131)]+_0x15f754(0x132));if(_0x3506e3[_0x15f754(0x130)]===_0x15f754(0x124)||_0x3506e3[_0x15f754(0x130)]===_0x15f754(0x137))await handleSDKOutput(_0x5696e4,_0x3506e3);else{console[_0x15f754(0x11e)](a28_0x6bbc90[_0x15f754(0x13b)]('[/'+_0x43cf4c+']'));const _0xd29824=formatTree(_0x5696e4,{'showMetadata':!![]});console[_0x15f754(0x11e)](_0xd29824);}return 0x0;}}function a28_0x5a06(){const _0xbdd31b=['(empty)','✔\x20Found\x20','recursive','listParentsWithPattern','\x27...','\x20segment','\x20matching\x20\x27','Resolving\x20context\x20path\x20\x27','filter','log','folderId','listUnified','14068mlnofE','Current\x20context:\x20','65676ewWzwm','json','sort','replace','1583318JVvhqO','7XXdkWC','listParents','description','Recursive\x20mode:\x20enabled','8497278UjjOQB','\x20and\x20','List\x20parent\x20segments,\x20folders,\x20and\x20child\x20segments','Clear\x20context\x20with:\x20tdx\x20segment\x20use\x20/','format','length','\x20top-level\x20items','10SoaFxi','parentId','Parent\x20ID:\x20','map','jsonl','error','population','verbose','dim','Listing\x20parent\x20segments\x20matching\x20\x27','3722855nbXxLf','segmentPath','message','1122DikmYo','segment','Listing\x20parent\x20segments...','folder','✔\x20Built\x20tree\x20with\x20','6JRULtD','includes','[parent\x20segments]','1045yJEGYT','\x5c$&','\x20\x20Cause:\x20','\x20parent\x20segment','Folder\x20ID:\x20','segments','name','resolvePathToResource','listRecursive','site','\x20folder','execute','Listing\x20folders\x20and\x20segments...','9840cYyhnh','2706232UdJwnZ','cause','Path/pattern\x20arg:\x20','maxDepth','attributes','data'];a28_0x5a06=function(){return _0xbdd31b;};return a28_0x5a06();}
@@ -1 +1 @@
1
- const a29_0x461745=a29_0x14f2;function a29_0x4cf8(){const _0x5868a0=['Database:\x20','verbose','Table:\x20','args','\x20\x20Cause:\x20','743788VirWwJ','Limit:\x20','✔\x20Query\x20successful\x20-\x200\x20rows\x20returned','database','length','table','data','\x20row','2438530wBHMrg','\x20\x20\x20or:\x20tdx\x20show\x20<catalog.database.table>','1521xiXsrb','843270kbQzOd','1848300tJDkbE','272964DjXaGF','Show\x20table\x20contents','message','Querying\x20','\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--database\x20<database>','cause','show','showTable','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','validate','\x20from\x20','name','error','limit','Site:\x20','23224ORwiSU','Usage:\x20tdx\x20show\x20<database.table>','execute','68968lVuGOl','Error:\x20','21AltEYW','site'];a29_0x4cf8=function(){return _0x5868a0;};return a29_0x4cf8();}(function(_0xc44888,_0x25c752){const _0x1eff81=a29_0x14f2,_0x5e82e7=_0xc44888();while(!![]){try{const _0xa718aa=parseInt(_0x1eff81(0x1b1))/0x1+parseInt(_0x1eff81(0x1ba))/0x2+-parseInt(_0x1eff81(0x1c7))/0x3+parseInt(_0x1eff81(0x1c6))/0x4+-parseInt(_0x1eff81(0x1c2))/0x5+parseInt(_0x1eff81(0x1c5))/0x6*(parseInt(_0x1eff81(0x1b3))/0x7)+parseInt(_0x1eff81(0x1ae))/0x8*(-parseInt(_0x1eff81(0x1c4))/0x9);if(_0xa718aa===_0x25c752)break;else _0x5e82e7['push'](_0x5e82e7['shift']());}catch(_0x3367aa){_0x5e82e7['push'](_0x5e82e7['shift']());}}}(a29_0x4cf8,0x3e527));import{BaseCommand}from'./command.js';function a29_0x14f2(_0x509498,_0x3439b4){const _0x4cf884=a29_0x4cf8();return a29_0x14f2=function(_0x14f26c,_0x3023cf){_0x14f26c=_0x14f26c-0x1a6;let _0x457882=_0x4cf884[_0x14f26c];return _0x457882;},a29_0x14f2(_0x509498,_0x3439b4);}import{SDKError}from'../sdk/index.js';import{handleSDKOutput}from'../utils/command-output.js';import{parseTableReference,validateTableDescribeReference}from'../utils/table-ref-parser.js';import{withSpinner}from'../utils/spinner.js';export class ShowCommand extends BaseCommand{[a29_0x461745(0x1aa)]=a29_0x461745(0x1cd);['description']=a29_0x461745(0x1c8);async[a29_0x461745(0x1b0)](_0x2729bf){const _0x51ac5a=a29_0x461745;return this[_0x51ac5a(0x1a6)](_0x2729bf);}async['showTable'](_0x4eefe7){const _0x23382f=a29_0x461745,{options:_0x3a7ef6,args:_0x31f914,tdx:_0x2f861a}=_0x4eefe7;let _0x47172a;try{_0x47172a=parseTableReference(_0x31f914[0x0]);const _0xee5188=_0x3a7ef6['database'];!_0x47172a[_0x23382f(0x1bd)]&&_0xee5188&&(_0x47172a[_0x23382f(0x1bd)]=_0xee5188);const _0x4e5ea4=validateTableDescribeReference(_0x47172a);if(_0x4e5ea4)return console[_0x23382f(0x1ab)](_0x23382f(0x1b2)+_0x4e5ea4),console[_0x23382f(0x1ab)](_0x23382f(0x1af)),console[_0x23382f(0x1ab)](_0x23382f(0x1c3)),console[_0x23382f(0x1ab)](_0x23382f(0x1cb)),0x1;}catch(_0x1f5f10){return console[_0x23382f(0x1ab)](_0x23382f(0x1b2)+_0x1f5f10[_0x23382f(0x1c9)]),console[_0x23382f(0x1ab)](_0x23382f(0x1af)),console[_0x23382f(0x1ab)](_0x23382f(0x1c3)),console['error'](_0x23382f(0x1cb)),0x1;}const _0x1abd27=_0x47172a['catalog'],_0x53b250=_0x47172a[_0x23382f(0x1bd)],_0x520768=_0x47172a[_0x23382f(0x1bf)],_0x4a3259=_0x3a7ef6[_0x23382f(0x1ac)];try{_0x3a7ef6[_0x23382f(0x1b6)]&&(console[_0x23382f(0x1ab)](_0x23382f(0x1ad)+_0x3a7ef6[_0x23382f(0x1b4)]),_0x1abd27&&console[_0x23382f(0x1ab)]('Catalog:\x20'+_0x1abd27),console[_0x23382f(0x1ab)](_0x23382f(0x1b5)+_0x53b250),console['error'](_0x23382f(0x1b7)+_0x520768),console[_0x23382f(0x1ab)](_0x23382f(0x1bb)+_0x4a3259));const _0x25dde7=_0x1abd27?_0x1abd27+'.'+_0x53b250+'.'+_0x520768:_0x53b250+'.'+_0x520768,_0x737159=await withSpinner(_0x23382f(0x1ca)+_0x25dde7+'...',()=>_0x2f861a[_0x23382f(0x1bf)][_0x23382f(0x1cd)](_0x53b250,_0x520768,_0x4a3259,_0x1abd27),{'verbose':_0x3a7ef6[_0x23382f(0x1b6)]}),_0x9d8686=_0x737159[_0x23382f(0x1c0)],_0x41cece=_0x9d8686['data'];return _0x41cece[_0x23382f(0x1be)]===0x0?console[_0x23382f(0x1ab)](_0x23382f(0x1bc)):console['error']('✔\x20Retrieved\x20'+_0x41cece[_0x23382f(0x1be)]+_0x23382f(0x1c1)+(_0x41cece[_0x23382f(0x1be)]!==0x1?'s':'')+_0x23382f(0x1a9)+_0x25dde7),await handleSDKOutput(_0x41cece,_0x3a7ef6),0x0;}catch(_0x110f5f){if(_0x110f5f instanceof SDKError)return console[_0x23382f(0x1ab)](_0x23382f(0x1b2)+_0x110f5f[_0x23382f(0x1c9)]),_0x110f5f['cause']&&console[_0x23382f(0x1ab)](_0x23382f(0x1b9)+_0x110f5f[_0x23382f(0x1cc)]),0x1;throw _0x110f5f;}}[a29_0x461745(0x1a8)](_0x30ec61){const _0x23e8ab=a29_0x461745;if(_0x30ec61['args'][_0x23e8ab(0x1be)]===0x0)return _0x23e8ab(0x1a7);if(_0x30ec61[_0x23e8ab(0x1b8)][_0x23e8ab(0x1be)]>0x1)return'Too\x20many\x20arguments\x0aUsage:\x20tdx\x20show\x20<database.table>\x0a\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--database\x20<database>\x0a\x0aRun\x20\x27tdx\x20show\x20--help\x27\x20for\x20more\x20options';return undefined;}}
1
+ const a29_0x1ed28d=a29_0x1a92;(function(_0x20bbdf,_0x43265b){const _0x369a15=a29_0x1a92,_0x279ff0=_0x20bbdf();while(!![]){try{const _0x8f62a4=-parseInt(_0x369a15(0x1cd))/0x1+-parseInt(_0x369a15(0x1e3))/0x2+-parseInt(_0x369a15(0x1c6))/0x3+-parseInt(_0x369a15(0x1d0))/0x4*(parseInt(_0x369a15(0x1e1))/0x5)+-parseInt(_0x369a15(0x1dd))/0x6+parseInt(_0x369a15(0x1d8))/0x7+parseInt(_0x369a15(0x1e6))/0x8;if(_0x8f62a4===_0x43265b)break;else _0x279ff0['push'](_0x279ff0['shift']());}catch(_0x4ddbbe){_0x279ff0['push'](_0x279ff0['shift']());}}}(a29_0xd942,0xe753e));import{BaseCommand}from'./command.js';function a29_0x1a92(_0xb83a23,_0x5aef10){const _0xd94230=a29_0xd942();return a29_0x1a92=function(_0x1a9296,_0x5e3c0a){_0x1a9296=_0x1a9296-0x1c5;let _0x46e14f=_0xd94230[_0x1a9296];return _0x46e14f;},a29_0x1a92(_0xb83a23,_0x5aef10);}import{SDKError}from'../sdk/index.js';import{handleSDKOutput}from'../utils/command-output.js';import{parseTableReference,validateTableDescribeReference}from'../utils/table-ref-parser.js';function a29_0xd942(){const _0x4fb2b7=['length','message','490856WeBKqi','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','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','\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--database\x20<database>','data','verbose','description','show','4972450eYmoFL','Usage:\x20tdx\x20show\x20<database.table>','error','execute','database','6567360IFXFLf','✔\x20Retrieved\x20','...','✔\x20Query\x20successful\x20-\x200\x20rows\x20returned','50TtRvlw','Catalog:\x20','2530518MCtdVq','args','name','35497888GdNFOv','cause','\x20\x20Cause:\x20','validate','1298985LveKJR','Error:\x20','Site:\x20','Limit:\x20','showTable','table','\x20\x20\x20or:\x20tdx\x20show\x20<catalog.database.table>','180114rHBkvZ'];a29_0xd942=function(){return _0x4fb2b7;};return a29_0xd942();}import{withSpinner}from'../utils/spinner.js';export class ShowCommand extends BaseCommand{[a29_0x1ed28d(0x1e5)]='show';[a29_0x1ed28d(0x1d6)]='Show\x20table\x20contents';async[a29_0x1ed28d(0x1db)](_0x3f1900){const _0x56b62f=a29_0x1ed28d;return this[_0x56b62f(0x1ca)](_0x3f1900);}async['showTable'](_0x5872c3){const _0x1b0f3e=a29_0x1ed28d,{options:_0x2326cf,args:_0x300a4d,tdx:_0x34f8b1}=_0x5872c3;let _0x5a10a6;try{_0x5a10a6=parseTableReference(_0x300a4d[0x0]);const _0x49cde9=_0x2326cf[_0x1b0f3e(0x1dc)];!_0x5a10a6[_0x1b0f3e(0x1dc)]&&_0x49cde9&&(_0x5a10a6[_0x1b0f3e(0x1dc)]=_0x49cde9);const _0x240d76=validateTableDescribeReference(_0x5a10a6);if(_0x240d76)return console[_0x1b0f3e(0x1da)]('Error:\x20'+_0x240d76),console['error'](_0x1b0f3e(0x1d9)),console[_0x1b0f3e(0x1da)](_0x1b0f3e(0x1cc)),console[_0x1b0f3e(0x1da)]('\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--database\x20<database>'),0x1;}catch(_0x57b5fe){return console['error'](_0x1b0f3e(0x1c7)+_0x57b5fe['message']),console[_0x1b0f3e(0x1da)](_0x1b0f3e(0x1d9)),console['error'](_0x1b0f3e(0x1cc)),console[_0x1b0f3e(0x1da)](_0x1b0f3e(0x1d3)),0x1;}const _0x1fd10f=_0x5a10a6['catalog'],_0x3c7e6f=_0x5a10a6[_0x1b0f3e(0x1dc)],_0x4bf580=_0x5a10a6[_0x1b0f3e(0x1cb)],_0x261382=_0x2326cf['limit'];try{_0x2326cf[_0x1b0f3e(0x1d5)]&&(console[_0x1b0f3e(0x1da)](_0x1b0f3e(0x1c8)+_0x2326cf['site']),_0x1fd10f&&console[_0x1b0f3e(0x1da)](_0x1b0f3e(0x1e2)+_0x1fd10f),console[_0x1b0f3e(0x1da)]('Database:\x20'+_0x3c7e6f),console['error']('Table:\x20'+_0x4bf580),console['error'](_0x1b0f3e(0x1c9)+_0x261382));const _0x4032a0=_0x1fd10f?_0x1fd10f+'.'+_0x3c7e6f+'.'+_0x4bf580:_0x3c7e6f+'.'+_0x4bf580,_0x17d031=await withSpinner('Querying\x20'+_0x4032a0+_0x1b0f3e(0x1df),()=>_0x34f8b1['table'][_0x1b0f3e(0x1d7)](_0x3c7e6f,_0x4bf580,_0x261382,_0x1fd10f),{'verbose':_0x2326cf[_0x1b0f3e(0x1d5)]}),_0x53db01=_0x17d031[_0x1b0f3e(0x1d4)],_0x308f32=_0x53db01['data'];return _0x308f32[_0x1b0f3e(0x1ce)]===0x0?console['error'](_0x1b0f3e(0x1e0)):console['error'](_0x1b0f3e(0x1de)+_0x308f32[_0x1b0f3e(0x1ce)]+'\x20row'+(_0x308f32['length']!==0x1?'s':'')+'\x20from\x20'+_0x4032a0),await handleSDKOutput(_0x308f32,_0x2326cf),0x0;}catch(_0x31d9d1){if(_0x31d9d1 instanceof SDKError)return console[_0x1b0f3e(0x1da)]('Error:\x20'+_0x31d9d1[_0x1b0f3e(0x1cf)]),_0x31d9d1[_0x1b0f3e(0x1e7)]&&console[_0x1b0f3e(0x1da)](_0x1b0f3e(0x1e8)+_0x31d9d1[_0x1b0f3e(0x1e7)]),0x1;throw _0x31d9d1;}}[a29_0x1ed28d(0x1c5)](_0x25db93){const _0x24430c=a29_0x1ed28d;if(_0x25db93[_0x24430c(0x1e4)]['length']===0x0)return _0x24430c(0x1d2);if(_0x25db93[_0x24430c(0x1e4)]['length']>0x1)return _0x24430c(0x1d1);return undefined;}}
@@ -1 +1 @@
1
- function a30_0x4004(){const _0x26827f=['validate','\x20\x20tdx\x20tables\x20\x22*.user*\x22\x20\x20\x20\x20\x20\x20\x20->\x20tables\x20matching\x20user*\x20across\x20databases','Error:\x20','.*\x22','cause','list','Database\x20pattern:\x20','\x27\x20may\x20not\x20exist\x20or\x20contains\x20no\x20tables','Database:\x20','\x20\x20tdx\x20tables\x20\x22mydb.*\x22\x20\x20\x20\x20\x20\x20\x20\x20->\x20all\x20tables\x20from\x20mydb','\x20\x20Use:\x20tdx\x20tables\x20\x22','\x20\x20tdx\x20tables\x20\x22mydb.users\x22\x20\x20\x20\x20->\x20table\x20\x22users\x22\x20in\x20database\x20mydb','verbose','300IAbnyF','length','\x20table','site','277096OQAWIO','description','Did\x20you\x20mean\x20to\x20list\x20all\x20tables\x20from\x20database\x20\x27','473886WeKePZ','357302BGNhtr','error','Note:\x20\x27','27ehDIpC','execute','table','\x27\x20across\x20all\x20databases.','includes','name','1250136mZefHL','450366Cmjbrp','✖\x20No\x20tables\x20found','Listing\x20tables...','tables','3308207poTwum','55adFhob','18296qpxvwt','\x20\x20tdx\x20tables\x20users\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20->\x20table\x20\x22users\x22\x20across\x20all\x20databases','Error:\x20Too\x20many\x20arguments.\x20Use\x20single\x20argument:','database','message','219OREUTS','✔\x20Found\x20','Table\x20pattern:\x20','data'];a30_0x4004=function(){return _0x26827f;};return a30_0x4004();}const a30_0x132627=a30_0x5284;function a30_0x5284(_0x4eb0fa,_0x146682){const _0x4004da=a30_0x4004();return a30_0x5284=function(_0x5284b0,_0x138ad7){_0x5284b0=_0x5284b0-0xcc;let _0x2e9a17=_0x4004da[_0x5284b0];return _0x2e9a17;},a30_0x5284(_0x4eb0fa,_0x146682);}(function(_0x34bc5d,_0x10ab6b){const _0x33eda3=a30_0x5284,_0x27d77b=_0x34bc5d();while(!![]){try{const _0x30f8fd=parseInt(_0x33eda3(0xd5))/0x1+-parseInt(_0x33eda3(0xe3))/0x2+parseInt(_0x33eda3(0xee))/0x3*(-parseInt(_0x33eda3(0xe9))/0x4)+parseInt(_0x33eda3(0xe8))/0x5*(parseInt(_0x33eda3(0xd8))/0x6)+parseInt(_0x33eda3(0xe7))/0x7+parseInt(_0x33eda3(0xe2))/0x8*(parseInt(_0x33eda3(0xdc))/0x9)+-parseInt(_0x33eda3(0xd1))/0xa*(parseInt(_0x33eda3(0xd9))/0xb);if(_0x30f8fd===_0x10ab6b)break;else _0x27d77b['push'](_0x27d77b['shift']());}catch(_0x2cca15){_0x27d77b['push'](_0x27d77b['shift']());}}}(a30_0x4004,0x87310));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{withSpinner}from'../utils/spinner.js';export class TablesCommand extends BaseCommand{[a30_0x132627(0xe1)]=a30_0x132627(0xe6);[a30_0x132627(0xd6)]='List\x20tables\x20in\x20a\x20database';async[a30_0x132627(0xdd)](_0x1572f4){const _0x1f80ae=a30_0x132627,{options:_0x32e0c6,args:_0x51d474,tdx:_0x52b47e}=_0x1572f4;let _0x1e65b8;if(_0x51d474[_0x1f80ae(0xd2)]===0x0)_0x1e65b8={'database':undefined,'table':undefined,'original':''};else{if(_0x51d474[_0x1f80ae(0xd2)]===0x1)try{_0x1e65b8=parseTableReference(_0x51d474[0x0]);if(_0x1e65b8['table']&&!_0x1e65b8[_0x1f80ae(0xec)]&&!_0x1e65b8[_0x1f80ae(0xde)]['includes']('*')&&!_0x1e65b8[_0x1f80ae(0xde)]['includes']('?'))return console[_0x1f80ae(0xda)]('Error:\x20Pattern\x20\x27'+_0x51d474[0x0]+'\x27\x20is\x20ambiguous.'),console['error'](_0x1f80ae(0xd7)+_0x1e65b8[_0x1f80ae(0xde)]+'\x27?'),console['error'](_0x1f80ae(0xce)+_0x1e65b8[_0x1f80ae(0xde)]+_0x1f80ae(0xf5)),console[_0x1f80ae(0xda)]('\x20\x20Or:\x20\x20tdx\x20tables\x20--in\x20'+_0x1e65b8[_0x1f80ae(0xde)]),console['error']('\x20\x20Or:\x20\x20tdx\x20tables\x20--database\x20'+_0x1e65b8[_0x1f80ae(0xde)]),console[_0x1f80ae(0xda)](''),console[_0x1f80ae(0xda)](_0x1f80ae(0xdb)+_0x51d474[0x0]+'\x27\x20without\x20wildcards\x20would\x20search\x20for\x20tables\x20named\x20\x27'+_0x1e65b8[_0x1f80ae(0xde)]+_0x1f80ae(0xdf)),0x1;}catch(_0xcfc31a){return console[_0x1f80ae(0xda)](_0x1f80ae(0xf4)+_0xcfc31a[_0x1f80ae(0xed)]),0x1;}else return console[_0x1f80ae(0xda)](_0x1f80ae(0xeb)),console[_0x1f80ae(0xda)](_0x1f80ae(0xea)),console['error'](_0x1f80ae(0xcd)),console[_0x1f80ae(0xda)](_0x1f80ae(0xcf)),console[_0x1f80ae(0xda)](_0x1f80ae(0xf3)),console[_0x1f80ae(0xda)]('Or\x20use\x20--in\x20flag:'),console[_0x1f80ae(0xda)]('\x20\x20tdx\x20tables\x20--in\x20mydb\x20\x20\x20\x20\x20\x20\x20->\x20all\x20tables\x20from\x20mydb'),0x1;}const _0xfa84df=_0x32e0c6[_0x1f80ae(0xec)];!_0x1e65b8[_0x1f80ae(0xec)]&&_0xfa84df&&(_0x1e65b8[_0x1f80ae(0xec)]=_0xfa84df);try{const _0x5f1bac=_0x6313dc=>_0x6313dc&&(_0x6313dc[_0x1f80ae(0xe0)]('*')||_0x6313dc[_0x1f80ae(0xe0)]('?')),_0x520e75=_0x5f1bac(_0x1e65b8['database']);_0x32e0c6[_0x1f80ae(0xd0)]&&(console[_0x1f80ae(0xda)]('Site:\x20'+_0x32e0c6[_0x1f80ae(0xd4)]),_0x1e65b8[_0x1f80ae(0xec)]?_0x520e75?console[_0x1f80ae(0xda)](_0x1f80ae(0xf8)+_0x1e65b8[_0x1f80ae(0xec)]):console[_0x1f80ae(0xda)](_0x1f80ae(0xcc)+_0x1e65b8[_0x1f80ae(0xec)]):console[_0x1f80ae(0xda)]('Database:\x20all'),_0x1e65b8[_0x1f80ae(0xde)]&&console[_0x1f80ae(0xda)](_0x1f80ae(0xf0)+_0x1e65b8['table']));const _0x283565=_0x1e65b8[_0x1f80ae(0xec)]&&!_0x520e75?_0x1e65b8[_0x1f80ae(0xec)]:undefined,_0x52cfc1=_0x520e75?_0x1e65b8[_0x1f80ae(0xec)]:undefined,_0x3452bb=_0x1e65b8['table'],_0xd0945c=await withSpinner(_0x1f80ae(0xe5),()=>_0x52b47e['table'][_0x1f80ae(0xf7)](_0x283565,_0x3452bb,_0x52cfc1),{'verbose':_0x32e0c6[_0x1f80ae(0xd0)]}),_0x161c23=_0xd0945c[_0x1f80ae(0xf1)];if(_0x161c23['length']===0x0&&_0x1e65b8[_0x1f80ae(0xec)]&&!_0x520e75)return console[_0x1f80ae(0xda)](_0x1f80ae(0xe4)),console['error']('Database\x20\x27'+_0x1e65b8[_0x1f80ae(0xec)]+_0x1f80ae(0xf9)),0x1;return console[_0x1f80ae(0xda)](_0x1f80ae(0xef)+_0x161c23[_0x1f80ae(0xd2)]+_0x1f80ae(0xd3)+(_0x161c23['length']!==0x1?'s':'')),await handleSDKOutput(_0x161c23,_0x32e0c6),0x0;}catch(_0x271898){if(_0x271898 instanceof SDKError)return console['error']('Error:\x20'+_0x271898[_0x1f80ae(0xed)]),_0x271898['cause']&&console['error']('\x20\x20Cause:\x20'+_0x271898[_0x1f80ae(0xf6)]),0x1;throw _0x271898;}}[a30_0x132627(0xf2)](_0x13c38a){return undefined;}}
1
+ const a30_0x5e2a56=a30_0x424d;(function(_0x318d62,_0x1accfb){const _0x3f7d72=a30_0x424d,_0x390a1d=_0x318d62();while(!![]){try{const _0x2362a4=-parseInt(_0x3f7d72(0xf0))/0x1*(-parseInt(_0x3f7d72(0x106))/0x2)+-parseInt(_0x3f7d72(0xf2))/0x3*(-parseInt(_0x3f7d72(0xdc))/0x4)+-parseInt(_0x3f7d72(0xd8))/0x5*(parseInt(_0x3f7d72(0xdd))/0x6)+parseInt(_0x3f7d72(0xd7))/0x7*(-parseInt(_0x3f7d72(0xe9))/0x8)+parseInt(_0x3f7d72(0x101))/0x9+parseInt(_0x3f7d72(0xfa))/0xa*(-parseInt(_0x3f7d72(0x108))/0xb)+-parseInt(_0x3f7d72(0xf4))/0xc*(-parseInt(_0x3f7d72(0x10b))/0xd);if(_0x2362a4===_0x1accfb)break;else _0x390a1d['push'](_0x390a1d['shift']());}catch(_0x1a67db){_0x390a1d['push'](_0x390a1d['shift']());}}}(a30_0x47dd,0xaed9c));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleSDKOutput}from'../utils/command-output.js';function a30_0x47dd(){const _0xc92794=['name','Error:\x20Too\x20many\x20arguments.\x20Use\x20single\x20argument:','table','Error:\x20Pattern\x20\x27','\x27\x20is\x20ambiguous.','\x20\x20Or:\x20\x20tdx\x20tables\x20--database\x20','1152056OJSXWe','\x27\x20across\x20all\x20databases.','verbose','length','message','Database:\x20','database','606201GtUQxw','Or\x20use\x20--in\x20flag:','2567043TnxRiU','\x20\x20tdx\x20tables\x20\x22mydb.users\x22\x20\x20\x20\x20->\x20table\x20\x22users\x22\x20in\x20database\x20mydb','2388xUlXaz','tables','Site:\x20','\x27\x20without\x20wildcards\x20would\x20search\x20for\x20tables\x20named\x20\x27','✔\x20Found\x20','Error:\x20','3992750AMbpfI','Database\x20pattern:\x20','\x20\x20tdx\x20tables\x20\x22*.user*\x22\x20\x20\x20\x20\x20\x20\x20->\x20tables\x20matching\x20user*\x20across\x20databases','includes','\x20\x20tdx\x20tables\x20users\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20->\x20table\x20\x22users\x22\x20across\x20all\x20databases','execute','Database:\x20all','5024898UXCZXV','list','data','site','description','2gPzQNB','\x20table','33pSawiE','Database\x20\x27','validate','72475eZqLIf','cause','\x27\x20may\x20not\x20exist\x20or\x20contains\x20no\x20tables','14bGtBUw','356770JszBUK','\x20\x20Cause:\x20','Note:\x20\x27','Listing\x20tables...','4JDIjAc','78jWjimP','error','\x20\x20Use:\x20tdx\x20tables\x20\x22','✖\x20No\x20tables\x20found','\x20\x20Or:\x20\x20tdx\x20tables\x20--in\x20','\x20\x20tdx\x20tables\x20--in\x20mydb\x20\x20\x20\x20\x20\x20\x20->\x20all\x20tables\x20from\x20mydb'];a30_0x47dd=function(){return _0xc92794;};return a30_0x47dd();}function a30_0x424d(_0x3e734b,_0x1c4d0b){const _0x47dd61=a30_0x47dd();return a30_0x424d=function(_0x424dd1,_0x50462c){_0x424dd1=_0x424dd1-0xd6;let _0x398ec4=_0x47dd61[_0x424dd1];return _0x398ec4;},a30_0x424d(_0x3e734b,_0x1c4d0b);}import{parseTableReference}from'../utils/table-ref-parser.js';import{withSpinner}from'../utils/spinner.js';export class TablesCommand extends BaseCommand{[a30_0x5e2a56(0xe3)]=a30_0x5e2a56(0xf5);[a30_0x5e2a56(0x105)]='List\x20tables\x20in\x20a\x20database';async[a30_0x5e2a56(0xff)](_0x16f315){const _0x1eb65d=a30_0x5e2a56,{options:_0x2c8067,args:_0x53af21,tdx:_0x5b6802}=_0x16f315;let _0x4576f4;if(_0x53af21[_0x1eb65d(0xec)]===0x0)_0x4576f4={'database':undefined,'table':undefined,'original':''};else{if(_0x53af21[_0x1eb65d(0xec)]===0x1)try{_0x4576f4=parseTableReference(_0x53af21[0x0]);if(_0x4576f4[_0x1eb65d(0xe5)]&&!_0x4576f4['database']&&!_0x4576f4['table'][_0x1eb65d(0xfd)]('*')&&!_0x4576f4[_0x1eb65d(0xe5)][_0x1eb65d(0xfd)]('?'))return console['error'](_0x1eb65d(0xe6)+_0x53af21[0x0]+_0x1eb65d(0xe7)),console[_0x1eb65d(0xde)]('Did\x20you\x20mean\x20to\x20list\x20all\x20tables\x20from\x20database\x20\x27'+_0x4576f4['table']+'\x27?'),console[_0x1eb65d(0xde)](_0x1eb65d(0xdf)+_0x4576f4[_0x1eb65d(0xe5)]+'.*\x22'),console[_0x1eb65d(0xde)](_0x1eb65d(0xe1)+_0x4576f4[_0x1eb65d(0xe5)]),console[_0x1eb65d(0xde)](_0x1eb65d(0xe8)+_0x4576f4[_0x1eb65d(0xe5)]),console[_0x1eb65d(0xde)](''),console['error'](_0x1eb65d(0xda)+_0x53af21[0x0]+_0x1eb65d(0xf7)+_0x4576f4[_0x1eb65d(0xe5)]+_0x1eb65d(0xea)),0x1;}catch(_0x5095fa){return console[_0x1eb65d(0xde)]('Error:\x20'+_0x5095fa[_0x1eb65d(0xed)]),0x1;}else return console['error'](_0x1eb65d(0xe4)),console['error'](_0x1eb65d(0xfe)),console['error']('\x20\x20tdx\x20tables\x20\x22mydb.*\x22\x20\x20\x20\x20\x20\x20\x20\x20->\x20all\x20tables\x20from\x20mydb'),console[_0x1eb65d(0xde)](_0x1eb65d(0xf3)),console[_0x1eb65d(0xde)](_0x1eb65d(0xfc)),console[_0x1eb65d(0xde)](_0x1eb65d(0xf1)),console[_0x1eb65d(0xde)](_0x1eb65d(0xe2)),0x1;}const _0x5e984e=_0x2c8067[_0x1eb65d(0xef)];!_0x4576f4[_0x1eb65d(0xef)]&&_0x5e984e&&(_0x4576f4[_0x1eb65d(0xef)]=_0x5e984e);try{const _0x44c759=_0x393f6d=>_0x393f6d&&(_0x393f6d[_0x1eb65d(0xfd)]('*')||_0x393f6d[_0x1eb65d(0xfd)]('?')),_0x20b1ff=_0x44c759(_0x4576f4[_0x1eb65d(0xef)]);_0x2c8067['verbose']&&(console[_0x1eb65d(0xde)](_0x1eb65d(0xf6)+_0x2c8067[_0x1eb65d(0x104)]),_0x4576f4[_0x1eb65d(0xef)]?_0x20b1ff?console[_0x1eb65d(0xde)](_0x1eb65d(0xfb)+_0x4576f4['database']):console[_0x1eb65d(0xde)](_0x1eb65d(0xee)+_0x4576f4['database']):console[_0x1eb65d(0xde)](_0x1eb65d(0x100)),_0x4576f4[_0x1eb65d(0xe5)]&&console[_0x1eb65d(0xde)]('Table\x20pattern:\x20'+_0x4576f4[_0x1eb65d(0xe5)]));const _0x6cb1f5=_0x4576f4['database']&&!_0x20b1ff?_0x4576f4['database']:undefined,_0x492d63=_0x20b1ff?_0x4576f4['database']:undefined,_0x32a5d6=_0x4576f4[_0x1eb65d(0xe5)],_0x3b79ea=await withSpinner(_0x1eb65d(0xdb),()=>_0x5b6802[_0x1eb65d(0xe5)][_0x1eb65d(0x102)](_0x6cb1f5,_0x32a5d6,_0x492d63),{'verbose':_0x2c8067[_0x1eb65d(0xeb)]}),_0x3c2c65=_0x3b79ea[_0x1eb65d(0x103)];if(_0x3c2c65['length']===0x0&&_0x4576f4[_0x1eb65d(0xef)]&&!_0x20b1ff)return console[_0x1eb65d(0xde)](_0x1eb65d(0xe0)),console[_0x1eb65d(0xde)](_0x1eb65d(0x109)+_0x4576f4['database']+_0x1eb65d(0xd6)),0x1;return console[_0x1eb65d(0xde)](_0x1eb65d(0xf8)+_0x3c2c65[_0x1eb65d(0xec)]+_0x1eb65d(0x107)+(_0x3c2c65[_0x1eb65d(0xec)]!==0x1?'s':'')),await handleSDKOutput(_0x3c2c65,_0x2c8067),0x0;}catch(_0x3fa4ba){if(_0x3fa4ba instanceof SDKError)return console[_0x1eb65d(0xde)](_0x1eb65d(0xf9)+_0x3fa4ba[_0x1eb65d(0xed)]),_0x3fa4ba[_0x1eb65d(0x10c)]&&console[_0x1eb65d(0xde)](_0x1eb65d(0xd9)+_0x3fa4ba[_0x1eb65d(0x10c)]),0x1;throw _0x3fa4ba;}}[a30_0x5e2a56(0x10a)](_0x222dab){return undefined;}}
@@ -1 +1 @@
1
- function a31_0x2044(_0x9b03a3,_0x17e313){const _0x213f63=a31_0x213f();return a31_0x2044=function(_0x20447f,_0x2123dd){_0x20447f=_0x20447f-0x172;let _0x306ad4=_0x213f63[_0x20447f];return _0x306ad4;},a31_0x2044(_0x9b03a3,_0x17e313);}const a31_0x1613dd=a31_0x2044;function a31_0x213f(){const _0x326654=['validate','join','Usage:\x20tdx\x20use\x20<resource>\x20<value>\x0a','execute','Session\x20database\x20set\x20to:\x20','5768yvWHoZ','9rcldlP','Invalid\x20resource:\x20','toString','1206340brihrx','5399530xRzKKG','Session\x20llm_project\x20set\x20to:\x20','699014XQRHAW','245pFwUUO','description','session','includes','llm_project','3sQhFzT','\x0aTip:\x20Use\x20\x27tdx\x20context\x20--clear\x27\x20to\x20clear\x20session\x20overrides','6109776fcYpjB','Error:\x20Profile\x20\x27','parent_segment','log','\x27\x20does\x20not\x20exist','\x0aRun\x20\x27tdx\x20use\x20--help\x27\x20for\x20more\x20options','use','error','Error:\x20','41556053gLPteL','2100744mvMgVD','profile','database','\x20(session:\x20','.\x20Must\x20be\x20one\x20of:\x20','length','name','28jIAIYH','Session\x20profile\x20set\x20to:\x20'];a31_0x213f=function(){return _0x326654;};return a31_0x213f();}(function(_0x18fd28,_0x436ec0){const _0x3ffc30=a31_0x2044,_0x1ca7ef=_0x18fd28();while(!![]){try{const _0x1569a8=-parseInt(_0x3ffc30(0x192))/0x1+-parseInt(_0x3ffc30(0x195))/0x2*(parseInt(_0x3ffc30(0x174))/0x3)+parseInt(_0x3ffc30(0x18e))/0x4*(parseInt(_0x3ffc30(0x196))/0x5)+-parseInt(_0x3ffc30(0x176))/0x6+parseInt(_0x3ffc30(0x187))/0x7*(-parseInt(_0x3ffc30(0x180))/0x8)+-parseInt(_0x3ffc30(0x18f))/0x9*(-parseInt(_0x3ffc30(0x193))/0xa)+parseInt(_0x3ffc30(0x17f))/0xb;if(_0x1569a8===_0x436ec0)break;else _0x1ca7ef['push'](_0x1ca7ef['shift']());}catch(_0x17837e){_0x1ca7ef['push'](_0x1ca7ef['shift']());}}}(a31_0x213f,0xba80f));import{BaseCommand}from'./command.js';import{saveSessionContext,getCurrentSessionPID}from'../core/session.js';import{profileExists}from'../core/profile.js';export class UseCommand extends BaseCommand{[a31_0x1613dd(0x186)]=a31_0x1613dd(0x17c);[a31_0x1613dd(0x197)]='Set\x20session-level\x20context';[a31_0x1613dd(0x189)](_0xa54840){const _0x622c10=a31_0x1613dd,{args:_0x175d6b}=_0xa54840;if(_0x175d6b[_0x622c10(0x185)]<0x2)return _0x622c10(0x18b)+'Resources:\x20database,\x20parent_segment,\x20llm_project,\x20profile\x0a'+'Or\x20use:\x20tdx\x20context\x20--clear\x20to\x20clear\x20session\x20context\x0a'+_0x622c10(0x17b);const _0x46a0d4=_0x175d6b[0x0],_0x44505c=[_0x622c10(0x182),_0x622c10(0x178),_0x622c10(0x173),_0x622c10(0x181)];if(!_0x44505c[_0x622c10(0x172)](_0x46a0d4))return _0x622c10(0x190)+_0x46a0d4+_0x622c10(0x184)+_0x44505c[_0x622c10(0x18a)](',\x20');return undefined;}async[a31_0x1613dd(0x18c)](_0xab0fc7){const _0x1acc5c=a31_0x1613dd,{args:_0xd6bed6,options:_0xaeda1c}=_0xab0fc7;try{const _0x2c6bfd=_0xd6bed6[0x0],_0x2b7c5e=_0xd6bed6[0x1];if(_0x2c6bfd===_0x1acc5c(0x181)){if(!profileExists(_0x2b7c5e))return console[_0x1acc5c(0x17d)](_0x1acc5c(0x177)+_0x2b7c5e+_0x1acc5c(0x17a)),console['error']('\x0aUse\x20\x27tdx\x20profiles\x27\x20to\x20see\x20available\x20profiles'),0x1;const _0x46df0e=_0xaeda1c[_0x1acc5c(0x198)]||getCurrentSessionPID()[_0x1acc5c(0x191)]();return saveSessionContext({'profile':_0x2b7c5e},_0xaeda1c[_0x1acc5c(0x198)]),console[_0x1acc5c(0x179)](_0x1acc5c(0x188)+_0x2b7c5e+_0x1acc5c(0x183)+_0x46df0e+')'),console['log'](_0x1acc5c(0x175)),0x0;}const _0x49561a={},_0x5ca48=_0xaeda1c['session']||getCurrentSessionPID()[_0x1acc5c(0x191)]();switch(_0x2c6bfd){case _0x1acc5c(0x182):_0x49561a[_0x1acc5c(0x182)]=_0x2b7c5e,console[_0x1acc5c(0x179)](_0x1acc5c(0x18d)+_0x2b7c5e+_0x1acc5c(0x183)+_0x5ca48+')');break;case _0x1acc5c(0x178):_0x49561a[_0x1acc5c(0x178)]=_0x2b7c5e,console[_0x1acc5c(0x179)]('Session\x20parent_segment\x20set\x20to:\x20'+_0x2b7c5e+'\x20(session:\x20'+_0x5ca48+')');break;case _0x1acc5c(0x173):_0x49561a['llm_project']=_0x2b7c5e,console['log'](_0x1acc5c(0x194)+_0x2b7c5e+'\x20(session:\x20'+_0x5ca48+')');break;}return saveSessionContext(_0x49561a,_0xaeda1c[_0x1acc5c(0x198)]),console[_0x1acc5c(0x179)](_0x1acc5c(0x175)),0x0;}catch(_0x1e69dd){return _0x1e69dd instanceof Error&&console[_0x1acc5c(0x17d)](_0x1acc5c(0x17e)+_0x1e69dd['message']),0x1;}}}
1
+ function a31_0x1721(_0x3ce16a,_0x1d4c6b){const _0xe38504=a31_0xe385();return a31_0x1721=function(_0x172102,_0x2aa969){_0x172102=_0x172102-0x14c;let _0x1c8ad4=_0xe38504[_0x172102];return _0x1c8ad4;},a31_0x1721(_0x3ce16a,_0x1d4c6b);}const a31_0x3d0a2e=a31_0x1721;(function(_0x33c59e,_0x508e3a){const _0x42ca3b=a31_0x1721,_0x529809=_0x33c59e();while(!![]){try{const _0x543ba=-parseInt(_0x42ca3b(0x14d))/0x1+parseInt(_0x42ca3b(0x159))/0x2+-parseInt(_0x42ca3b(0x14e))/0x3+-parseInt(_0x42ca3b(0x15e))/0x4*(-parseInt(_0x42ca3b(0x16b))/0x5)+parseInt(_0x42ca3b(0x161))/0x6+parseInt(_0x42ca3b(0x154))/0x7*(parseInt(_0x42ca3b(0x14c))/0x8)+parseInt(_0x42ca3b(0x153))/0x9*(-parseInt(_0x42ca3b(0x164))/0xa);if(_0x543ba===_0x508e3a)break;else _0x529809['push'](_0x529809['shift']());}catch(_0x12d5d6){_0x529809['push'](_0x529809['shift']());}}}(a31_0xe385,0xd9483));import{BaseCommand}from'./command.js';import{saveSessionContext,getCurrentSessionPID}from'../core/session.js';function a31_0xe385(){const _0x12d837=['\x0aRun\x20\x27tdx\x20use\x20--help\x27\x20for\x20more\x20options','log','31044yVIBwr','Session\x20database\x20set\x20to:\x20','validate','5344692wGjInQ','name','length','6927380KjbEJB','database','join','Invalid\x20resource:\x20','llm_project','\x0aTip:\x20Use\x20\x27tdx\x20context\x20--clear\x27\x20to\x20clear\x20session\x20overrides','includes','395GQJvxv','session','use','\x27\x20does\x20not\x20exist','Error:\x20','description','toString','\x20(session:\x20','8ARYOUC','1284699eXgkfj','3414780FAJZhG','.\x20Must\x20be\x20one\x20of:\x20','execute','error','message','9VTReSU','9161579ygoVeO','profile','Set\x20session-level\x20context','Error:\x20Profile\x20\x27','parent_segment','2385972snbyRF','Or\x20use:\x20tdx\x20context\x20--clear\x20to\x20clear\x20session\x20context\x0a','\x0aUse\x20\x27tdx\x20profiles\x27\x20to\x20see\x20available\x20profiles'];a31_0xe385=function(){return _0x12d837;};return a31_0xe385();}import{profileExists}from'../core/profile.js';export class UseCommand extends BaseCommand{[a31_0x3d0a2e(0x162)]=a31_0x3d0a2e(0x16d);[a31_0x3d0a2e(0x170)]=a31_0x3d0a2e(0x156);[a31_0x3d0a2e(0x160)](_0x2c95bc){const _0x5e2afe=a31_0x3d0a2e,{args:_0x174992}=_0x2c95bc;if(_0x174992[_0x5e2afe(0x163)]<0x2)return'Usage:\x20tdx\x20use\x20<resource>\x20<value>\x0a'+'Resources:\x20database,\x20parent_segment,\x20llm_project,\x20profile\x0a'+_0x5e2afe(0x15a)+_0x5e2afe(0x15c);const _0x5d0394=_0x174992[0x0],_0x3f3e9b=[_0x5e2afe(0x165),_0x5e2afe(0x158),_0x5e2afe(0x168),_0x5e2afe(0x155)];if(!_0x3f3e9b[_0x5e2afe(0x16a)](_0x5d0394))return _0x5e2afe(0x167)+_0x5d0394+_0x5e2afe(0x14f)+_0x3f3e9b[_0x5e2afe(0x166)](',\x20');return undefined;}async[a31_0x3d0a2e(0x150)](_0x25c628){const _0xa799e8=a31_0x3d0a2e,{args:_0x2470cc,options:_0x417dfb}=_0x25c628;try{const _0x2b1275=_0x2470cc[0x0],_0xaabab3=_0x2470cc[0x1];if(_0x2b1275==='profile'){if(!profileExists(_0xaabab3))return console['error'](_0xa799e8(0x157)+_0xaabab3+_0xa799e8(0x16e)),console[_0xa799e8(0x151)](_0xa799e8(0x15b)),0x1;const _0x34b1be=_0x417dfb[_0xa799e8(0x16c)]||getCurrentSessionPID()[_0xa799e8(0x171)]();return saveSessionContext({'profile':_0xaabab3},_0x417dfb[_0xa799e8(0x16c)]),console[_0xa799e8(0x15d)]('Session\x20profile\x20set\x20to:\x20'+_0xaabab3+_0xa799e8(0x172)+_0x34b1be+')'),console[_0xa799e8(0x15d)](_0xa799e8(0x169)),0x0;}const _0x52565e={},_0xe178c6=_0x417dfb['session']||getCurrentSessionPID()['toString']();switch(_0x2b1275){case'database':_0x52565e[_0xa799e8(0x165)]=_0xaabab3,console[_0xa799e8(0x15d)](_0xa799e8(0x15f)+_0xaabab3+_0xa799e8(0x172)+_0xe178c6+')');break;case _0xa799e8(0x158):_0x52565e[_0xa799e8(0x158)]=_0xaabab3,console['log']('Session\x20parent_segment\x20set\x20to:\x20'+_0xaabab3+_0xa799e8(0x172)+_0xe178c6+')');break;case'llm_project':_0x52565e['llm_project']=_0xaabab3,console[_0xa799e8(0x15d)]('Session\x20llm_project\x20set\x20to:\x20'+_0xaabab3+_0xa799e8(0x172)+_0xe178c6+')');break;}return saveSessionContext(_0x52565e,_0x417dfb[_0xa799e8(0x16c)]),console[_0xa799e8(0x15d)](_0xa799e8(0x169)),0x0;}catch(_0x4f8c18){return _0x4f8c18 instanceof Error&&console[_0xa799e8(0x151)](_0xa799e8(0x16f)+_0x4f8c18[_0xa799e8(0x152)]),0x1;}}}