@treasuredata/tdx 0.3.0 → 0.3.1

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 (118) hide show
  1. package/README.md +28 -1690
  2. package/dist/build-info.json +2 -2
  3. package/dist/cli.js +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/auth-command.js +1 -1
  14. package/dist/commands/chat-command.js +1 -1
  15. package/dist/commands/claude-command.js +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/global-context.js.map +1 -1
  41. package/dist/core/profile.js +1 -1
  42. package/dist/core/project-config.js +1 -1
  43. package/dist/core/session.js +1 -1
  44. package/dist/index.js +1 -1
  45. package/dist/proxy/anthropic-adapter.js +1 -1
  46. package/dist/proxy/server.d.ts.map +1 -1
  47. package/dist/proxy/server.js +1 -1
  48. package/dist/proxy/server.js.map +1 -1
  49. package/dist/proxy/session-cache.js +1 -1
  50. package/dist/sdk/api.d.ts +3 -0
  51. package/dist/sdk/api.d.ts.map +1 -1
  52. package/dist/sdk/api.js +1 -1
  53. package/dist/sdk/api.js.map +1 -1
  54. package/dist/sdk/database.d.ts +1 -0
  55. package/dist/sdk/database.d.ts.map +1 -1
  56. package/dist/sdk/database.js +1 -1
  57. package/dist/sdk/database.js.map +1 -1
  58. package/dist/sdk/errors.js +1 -1
  59. package/dist/sdk/index.d.ts +14 -1
  60. package/dist/sdk/index.d.ts.map +1 -1
  61. package/dist/sdk/index.js +1 -1
  62. package/dist/sdk/index.js.map +1 -1
  63. package/dist/sdk/job.d.ts +1 -0
  64. package/dist/sdk/job.d.ts.map +1 -1
  65. package/dist/sdk/job.js +1 -1
  66. package/dist/sdk/job.js.map +1 -1
  67. package/dist/sdk/llm.d.ts +1 -0
  68. package/dist/sdk/llm.d.ts.map +1 -1
  69. package/dist/sdk/llm.js +1 -1
  70. package/dist/sdk/llm.js.map +1 -1
  71. package/dist/sdk/query.d.ts +1 -0
  72. package/dist/sdk/query.d.ts.map +1 -1
  73. package/dist/sdk/query.js +1 -1
  74. package/dist/sdk/query.js.map +1 -1
  75. package/dist/sdk/segment.d.ts +1 -0
  76. package/dist/sdk/segment.d.ts.map +1 -1
  77. package/dist/sdk/segment.js +1 -1
  78. package/dist/sdk/segment.js.map +1 -1
  79. package/dist/sdk/table.d.ts +1 -0
  80. package/dist/sdk/table.d.ts.map +1 -1
  81. package/dist/sdk/table.js +1 -1
  82. package/dist/sdk/table.js.map +1 -1
  83. package/dist/sdk/workflow.d.ts +1 -0
  84. package/dist/sdk/workflow.d.ts.map +1 -1
  85. package/dist/sdk/workflow.js +1 -1
  86. package/dist/sdk/workflow.js.map +1 -1
  87. package/dist/types/endpoints.js +1 -1
  88. package/dist/types/index.js +1 -1
  89. package/dist/utils/agent-ref-parser.js +1 -1
  90. package/dist/utils/chat-cache.js +1 -1
  91. package/dist/utils/colors.js +1 -1
  92. package/dist/utils/command-output.js +1 -1
  93. package/dist/utils/constants.js +1 -1
  94. package/dist/utils/file-permissions.js +1 -1
  95. package/dist/utils/format-detector.js +1 -1
  96. package/dist/utils/formatters.js +1 -1
  97. package/dist/utils/json-loader.js +1 -1
  98. package/dist/utils/model-aliases.js +1 -1
  99. package/dist/utils/option-validation.js +1 -1
  100. package/dist/utils/port.js +1 -1
  101. package/dist/utils/process.d.ts.map +1 -1
  102. package/dist/utils/process.js +1 -1
  103. package/dist/utils/process.js.map +1 -1
  104. package/dist/utils/prompt.js +1 -1
  105. package/dist/utils/segment-path-parser.js +1 -1
  106. package/dist/utils/segment-ref-parser.js +1 -1
  107. package/dist/utils/spinner.js +1 -1
  108. package/dist/utils/sql-parser.js +1 -1
  109. package/dist/utils/sse-parser.js +1 -1
  110. package/dist/utils/string-utils.js +1 -1
  111. package/dist/utils/table-ref-parser.js +1 -1
  112. package/dist/utils/tdx-logger.d.ts.map +1 -1
  113. package/dist/utils/tdx-logger.js +1 -1
  114. package/dist/utils/tdx-logger.js.map +1 -1
  115. package/dist/utils/tree-formatter.js +1 -1
  116. package/dist/utils/version-check.js +1 -1
  117. package/dist/utils/workflow-utils.js +1 -1
  118. package/package.json +9 -2
@@ -1 +1 @@
1
- function a25_0x497a(_0x5ef630,_0x4e57d6){const _0x5aad47=a25_0x5aad();return a25_0x497a=function(_0x497a09,_0x315e40){_0x497a09=_0x497a09-0x1d4;let _0x314eb3=_0x5aad47[_0x497a09];return _0x314eb3;},a25_0x497a(_0x5ef630,_0x4e57d6);}const a25_0xd1f998=a25_0x497a;(function(_0x40d86e,_0x51ba1d){const _0x333688=a25_0x497a,_0x152987=_0x40d86e();while(!![]){try{const _0x31e12a=parseInt(_0x333688(0x1d9))/0x1+parseInt(_0x333688(0x1d6))/0x2+parseInt(_0x333688(0x1e6))/0x3*(parseInt(_0x333688(0x1ec))/0x4)+-parseInt(_0x333688(0x1e5))/0x5*(parseInt(_0x333688(0x1d8))/0x6)+-parseInt(_0x333688(0x1dd))/0x7+parseInt(_0x333688(0x1dc))/0x8*(parseInt(_0x333688(0x1d4))/0x9)+parseInt(_0x333688(0x1e4))/0xa*(-parseInt(_0x333688(0x1e1))/0xb);if(_0x31e12a===_0x51ba1d)break;else _0x152987['push'](_0x152987['shift']());}catch(_0x4c2090){_0x152987['push'](_0x152987['shift']());}}}(a25_0x5aad,0xceb35));import{BaseCommand}from'./command.js';import{handleSDKOutput}from'../utils/command-output.js';import{withSpinner}from'../utils/spinner.js';function a25_0x5aad(){const _0x21fc44=['Parent\x20segment:\x20','Site:\x20','50788BCyOUl','Error:\x20Parent\x20segment\x20name\x20is\x20required','✔\x20Found\x20','verbose','9594vnPATZ','segment:fields','1801786saeNXY','Usage:\x20tdx\x20segment\x20fields\x20<parent_name>','36jYMylH','593656aMjcOb','\x27...','execute','304yEqUfY','3328871jaEzPL','segment','Listing\x20fields\x20for\x20\x27','error','118228HJReBu','length','List\x20available\x20fields\x20for\x20segmentation','500qZWoWV','311495nsqLdM','165ELnaKs','\x20field','listFields','site'];a25_0x5aad=function(){return _0x21fc44;};return a25_0x5aad();}export class SegmentFieldsCommand extends BaseCommand{['name']=a25_0xd1f998(0x1d5);['description']=a25_0xd1f998(0x1e3);async[a25_0xd1f998(0x1db)](_0x46993f){const _0x273ab6=a25_0xd1f998,{options:_0x52bf2f,args:_0x5e8b73,tdx:_0x1f7618}=_0x46993f;if(_0x5e8b73['length']===0x0)return console[_0x273ab6(0x1e0)](_0x273ab6(0x1ed)),console['error'](_0x273ab6(0x1d7)),0x1;const _0x54b588=_0x5e8b73[0x0];_0x52bf2f['verbose']&&(console['error'](_0x273ab6(0x1eb)+_0x52bf2f[_0x273ab6(0x1e9)]),console['error'](_0x273ab6(0x1ea)+_0x54b588));const _0x1b5e17=await withSpinner(_0x273ab6(0x1df)+_0x54b588+_0x273ab6(0x1da),()=>_0x1f7618[_0x273ab6(0x1de)][_0x273ab6(0x1e8)](_0x54b588),{'verbose':_0x52bf2f[_0x273ab6(0x1ef)]}),_0x120bba=_0x1b5e17['data'];return console[_0x273ab6(0x1e0)](_0x273ab6(0x1ee)+_0x120bba[_0x273ab6(0x1e2)]+_0x273ab6(0x1e7)+(_0x120bba[_0x273ab6(0x1e2)]!==0x1?'s':'')),await handleSDKOutput(_0x120bba,_0x52bf2f),0x0;}}
1
+ const a25_0x10d3d1=a25_0xb4d5;(function(_0xc4f0af,_0x11adea){const _0x15e719=a25_0xb4d5,_0x349bbc=_0xc4f0af();while(!![]){try{const _0x544103=-parseInt(_0x15e719(0x1a6))/0x1*(parseInt(_0x15e719(0x1ac))/0x2)+-parseInt(_0x15e719(0x19f))/0x3*(parseInt(_0x15e719(0x1a0))/0x4)+-parseInt(_0x15e719(0x1ab))/0x5*(parseInt(_0x15e719(0x1ae))/0x6)+-parseInt(_0x15e719(0x19a))/0x7+parseInt(_0x15e719(0x19b))/0x8+parseInt(_0x15e719(0x19e))/0x9*(-parseInt(_0x15e719(0x1a1))/0xa)+-parseInt(_0x15e719(0x1a8))/0xb*(-parseInt(_0x15e719(0x1aa))/0xc);if(_0x544103===_0x11adea)break;else _0x349bbc['push'](_0x349bbc['shift']());}catch(_0x3c6533){_0x349bbc['push'](_0x349bbc['shift']());}}}(a25_0x28de,0x79561));import{BaseCommand}from'./command.js';import{handleSDKOutput}from'../utils/command-output.js';function a25_0x28de(){const _0x4f18a8=['Usage:\x20tdx\x20segment\x20fields\x20<parent_name>','Parent\x20segment:\x20','execute','Site:\x20','data','✔\x20Found\x20','verbose','error','2851555xEYyFE','3312744lTgzif','segment:fields','\x27...','43137SJxGqn','10590sWYFey','28VUGCrs','2060BzJxuX','description','listFields','List\x20available\x20fields\x20for\x20segmentation','Error:\x20Parent\x20segment\x20name\x20is\x20required','1009QVBrHt','name','24057JAzutS','length','12108AYydgo','2749865KfFCQj','306ZyrGhz','Listing\x20fields\x20for\x20\x27','6suWBPt'];a25_0x28de=function(){return _0x4f18a8;};return a25_0x28de();}function a25_0xb4d5(_0x43b9c5,_0x62e4bf){const _0x28defd=a25_0x28de();return a25_0xb4d5=function(_0xb4d5e7,_0x8094f5){_0xb4d5e7=_0xb4d5e7-0x198;let _0x56b272=_0x28defd[_0xb4d5e7];return _0x56b272;},a25_0xb4d5(_0x43b9c5,_0x62e4bf);}import{withSpinner}from'../utils/spinner.js';export class SegmentFieldsCommand extends BaseCommand{[a25_0x10d3d1(0x1a7)]=a25_0x10d3d1(0x19c);[a25_0x10d3d1(0x1a2)]=a25_0x10d3d1(0x1a4);async[a25_0x10d3d1(0x1b1)](_0x29bcef){const _0x379823=a25_0x10d3d1,{options:_0x4dac40,args:_0x141864,tdx:_0x520446}=_0x29bcef;if(_0x141864['length']===0x0)return console[_0x379823(0x199)](_0x379823(0x1a5)),console['error'](_0x379823(0x1af)),0x1;const _0xb3cf8=_0x141864[0x0];_0x4dac40[_0x379823(0x198)]&&(console[_0x379823(0x199)](_0x379823(0x1b2)+_0x4dac40['site']),console['error'](_0x379823(0x1b0)+_0xb3cf8));const _0x2fd283=await withSpinner(_0x379823(0x1ad)+_0xb3cf8+_0x379823(0x19d),()=>_0x520446['segment'][_0x379823(0x1a3)](_0xb3cf8),{'verbose':_0x4dac40[_0x379823(0x198)]}),_0x14f704=_0x2fd283[_0x379823(0x1b3)];return console[_0x379823(0x199)](_0x379823(0x1b4)+_0x14f704['length']+'\x20field'+(_0x14f704[_0x379823(0x1a9)]!==0x1?'s':'')),await handleSDKOutput(_0x14f704,_0x4dac40),0x0;}}
@@ -1 +1 @@
1
- function a26_0x1ecf(_0xf07b1b,_0x44da16){const _0x4023d9=a26_0x4023();return a26_0x1ecf=function(_0x1ecfc3,_0x253e9a){_0x1ecfc3=_0x1ecfc3-0x78;let _0x38b5e6=_0x4023d9[_0x1ecfc3];return _0x38b5e6;},a26_0x1ecf(_0xf07b1b,_0x44da16);}const a26_0x823619=a26_0x1ecf;(function(_0xcebbba,_0x2f10fe){const _0x149b42=a26_0x1ecf,_0x3f7c0a=_0xcebbba();while(!![]){try{const _0x3eac96=parseInt(_0x149b42(0x82))/0x1*(-parseInt(_0x149b42(0x7a))/0x2)+parseInt(_0x149b42(0x8e))/0x3*(parseInt(_0x149b42(0x8b))/0x4)+parseInt(_0x149b42(0x7c))/0x5*(-parseInt(_0x149b42(0x91))/0x6)+-parseInt(_0x149b42(0x8c))/0x7*(parseInt(_0x149b42(0x93))/0x8)+-parseInt(_0x149b42(0x86))/0x9*(-parseInt(_0x149b42(0x84))/0xa)+-parseInt(_0x149b42(0x92))/0xb+-parseInt(_0x149b42(0x89))/0xc*(-parseInt(_0x149b42(0x88))/0xd);if(_0x3eac96===_0x2f10fe)break;else _0x3f7c0a['push'](_0x3f7c0a['shift']());}catch(_0x44000f){_0x3f7c0a['push'](_0x3f7c0a['shift']());}}}(a26_0x4023,0x95ad6));import{BaseCommand}from'./command.js';export class SegmentPwdCommand extends BaseCommand{['name']=a26_0x823619(0x7f);[a26_0x823619(0x7b)]='Show\x20current\x20segment/folder\x20context';async[a26_0x823619(0x79)](_0x1dc332){const _0x2b8e1c=a26_0x823619,{options:_0x403e76}=_0x1dc332;try{const _0x330689=_0x403e76[_0x2b8e1c(0x85)];if(!_0x330689)return _0x403e76[_0x2b8e1c(0x7e)]==='json'||_0x403e76[_0x2b8e1c(0x7e)]===_0x2b8e1c(0x8a)?console['log'](JSON[_0x2b8e1c(0x8f)]({'path':'/','type':_0x2b8e1c(0x87)})):console[_0x2b8e1c(0x8d)]('/'),0x0;if(_0x403e76[_0x2b8e1c(0x7e)]===_0x2b8e1c(0x94)||_0x403e76[_0x2b8e1c(0x7e)]===_0x2b8e1c(0x8a)){const _0x476c38={'path':_0x330689};console[_0x2b8e1c(0x8d)](JSON['stringify'](_0x476c38));}else console['log'](_0x330689),_0x403e76[_0x2b8e1c(0x7d)]&&(console[_0x2b8e1c(0x78)](''),console[_0x2b8e1c(0x78)](_0x2b8e1c(0x80)),console[_0x2b8e1c(0x78)](_0x2b8e1c(0x83)+_0x330689),console[_0x2b8e1c(0x78)](''),console[_0x2b8e1c(0x78)](_0x2b8e1c(0x81)),console[_0x2b8e1c(0x78)](_0x2b8e1c(0x90)));return 0x0;}catch(_0x1b8280){throw _0x1b8280;}}}function a26_0x4023(){const _0x5e4aae=['61350IVanqm','segmentPath','909fDNaKe','root','1016587KPoBLM','204IyuEqD','jsonl','230196BUnEoP','26383GBEKJC','log','9jLKxPu','stringify','Use\x20\x22tdx\x20context\x20--debug\x22\x20to\x20see\x20context\x20sources','14724ZfAKjw','5549709FikWns','1096coQWsG','json','error','execute','2AZPMyC','description','850LJJClN','verbose','format','segment:pwd','Context\x20details:','Use\x20\x22tdx\x20context\x22\x20to\x20see\x20all\x20context\x20parameters','70535VzqfbU','\x20\x20Path:\x20'];a26_0x4023=function(){return _0x5e4aae;};return a26_0x4023();}
1
+ const a26_0x2fa883=a26_0x51e9;(function(_0x20a18a,_0x4176c9){const _0x29c306=a26_0x51e9,_0x22e35b=_0x20a18a();while(!![]){try{const _0x11aa7a=parseInt(_0x29c306(0x1d1))/0x1+parseInt(_0x29c306(0x1c6))/0x2*(-parseInt(_0x29c306(0x1d7))/0x3)+parseInt(_0x29c306(0x1c5))/0x4*(-parseInt(_0x29c306(0x1d4))/0x5)+-parseInt(_0x29c306(0x1c9))/0x6+-parseInt(_0x29c306(0x1d6))/0x7+parseInt(_0x29c306(0x1d2))/0x8+parseInt(_0x29c306(0x1ce))/0x9*(parseInt(_0x29c306(0x1c8))/0xa);if(_0x11aa7a===_0x4176c9)break;else _0x22e35b['push'](_0x22e35b['shift']());}catch(_0x2c31a3){_0x22e35b['push'](_0x22e35b['shift']());}}}(a26_0x5d72,0x2e136));import{BaseCommand}from'./command.js';export class SegmentPwdCommand extends BaseCommand{['name']=a26_0x2fa883(0x1d5);['description']=a26_0x2fa883(0x1da);async[a26_0x2fa883(0x1c7)](_0x1b4a7f){const _0x5272bc=a26_0x2fa883,{options:_0x4348d4}=_0x1b4a7f;try{const _0x589942=_0x4348d4['segmentPath'];if(!_0x589942)return _0x4348d4[_0x5272bc(0x1d9)]===_0x5272bc(0x1d3)||_0x4348d4[_0x5272bc(0x1d9)]===_0x5272bc(0x1cc)?console[_0x5272bc(0x1d8)](JSON[_0x5272bc(0x1ca)]({'path':'/','type':'root'})):console[_0x5272bc(0x1d8)]('/'),0x0;if(_0x4348d4['format']===_0x5272bc(0x1d3)||_0x4348d4[_0x5272bc(0x1d9)]===_0x5272bc(0x1cc)){const _0x4b3de7={'path':_0x589942};console[_0x5272bc(0x1d8)](JSON['stringify'](_0x4b3de7));}else console['log'](_0x589942),_0x4348d4[_0x5272bc(0x1db)]&&(console[_0x5272bc(0x1cf)](''),console['error'](_0x5272bc(0x1cb)),console[_0x5272bc(0x1cf)](_0x5272bc(0x1d0)+_0x589942),console[_0x5272bc(0x1cf)](''),console['error'](_0x5272bc(0x1cd)),console[_0x5272bc(0x1cf)]('Use\x20\x22tdx\x20context\x20--debug\x22\x20to\x20see\x20context\x20sources'));return 0x0;}catch(_0x3133b4){throw _0x3133b4;}}}function a26_0x51e9(_0x177f45,_0x1e3be9){const _0x5d720e=a26_0x5d72();return a26_0x51e9=function(_0x51e9e2,_0x4d16b9){_0x51e9e2=_0x51e9e2-0x1c5;let _0x11722b=_0x5d720e[_0x51e9e2];return _0x11722b;},a26_0x51e9(_0x177f45,_0x1e3be9);}function a26_0x5d72(){const _0x1c89a4=['segment:pwd','1854776PqwIOU','18efJPjh','log','format','Show\x20current\x20segment/folder\x20context','verbose','4BEBOZo','26348joJdAJ','execute','150IQaZiF','2068050xhECcE','stringify','Context\x20details:','jsonl','Use\x20\x22tdx\x20context\x22\x20to\x20see\x20all\x20context\x20parameters','270927zngwtg','error','\x20\x20Path:\x20','294508DeZHNF','2968024epzuYR','json','1198215JUhnEP'];a26_0x5d72=function(){return _0x1c89a4;};return a26_0x5d72();}
@@ -1 +1 @@
1
- function a27_0x5703(_0x203df6,_0x3db6c){const _0x8e8391=a27_0x8e83();return a27_0x5703=function(_0x5703af,_0x1777ec){_0x5703af=_0x5703af-0x16f;let _0x44100c=_0x8e8391[_0x5703af];return _0x44100c;},a27_0x5703(_0x203df6,_0x3db6c);}const a27_0x1532e2=a27_0x5703;(function(_0x5747c0,_0xd821b2){const _0x4e3370=a27_0x5703,_0x9972ef=_0x5747c0();while(!![]){try{const _0x5bd051=-parseInt(_0x4e3370(0x194))/0x1+-parseInt(_0x4e3370(0x173))/0x2+-parseInt(_0x4e3370(0x171))/0x3*(parseInt(_0x4e3370(0x172))/0x4)+parseInt(_0x4e3370(0x187))/0x5+parseInt(_0x4e3370(0x180))/0x6*(-parseInt(_0x4e3370(0x193))/0x7)+parseInt(_0x4e3370(0x184))/0x8*(-parseInt(_0x4e3370(0x17e))/0x9)+parseInt(_0x4e3370(0x170))/0xa;if(_0x5bd051===_0xd821b2)break;else _0x9972ef['push'](_0x9972ef['shift']());}catch(_0x1bb6e4){_0x9972ef['push'](_0x9972ef['shift']());}}}(a27_0x8e83,0x27a6d));import{BaseCommand}from'./command.js';import{handleSDKOutput}from'../utils/command-output.js';import{withSpinner}from'../utils/spinner.js';import{loadJSONFromOptions}from'../utils/json-loader.js';function a27_0x8e83(){const _0x3c4d9c=['2239384UYOQEh','\x27...','kind','1330245zWSgMe','Update\x20existing\x20child\x20segment','Resolved\x20folder\x20ID:\x20','Error:\x20Cannot\x20update\x20','Segment\x20ID:\x20','error','resolveFolderId','verbose','rule','Parent\x20ID:\x20','length','Resolving\x20folder\x20\x27','119hXHnNK','62699xVJOIV','\x20\x20\x20Path:\x20','segment:update','execute','Resolving\x20path\x20\x27','Updating\x20segment\x20\x27','Segment\x20ID\x20missing\x20from\x20resolved\x20path','INTERNAL','parentId','7533370CbEliu','348JRoGAs','9780mdGIcZ','416446GhRGgu','resolvePathToResource','folder','Error:\x20Segment\x20path\x20or\x20name\x20is\x20required','segmentId','segmentName','data','type','segment','description','name','9iFQZSE','Use:\x20tdx\x20segment\x20update\x20<path_to_segment>\x20[options]','7944SiMhOs','Examples:','segmentPath','✔\x20Updated\x20segment\x20\x27'];a27_0x8e83=function(){return _0x3c4d9c;};return a27_0x8e83();}import{SDKError,ErrorCode}from'../sdk/index.js';export class SegmentUpdateCommand extends BaseCommand{[a27_0x1532e2(0x17d)]=a27_0x1532e2(0x196);['description']=a27_0x1532e2(0x188);async[a27_0x1532e2(0x197)](_0x417827){const _0x49cb8a=a27_0x1532e2,{options:_0xdaa1b7,args:_0x5d8446,tdx:_0x5df945}=_0x417827,_0x50db6a=_0xdaa1b7;if(_0x5d8446[_0x49cb8a(0x191)]===0x0)return console['error'](_0x49cb8a(0x176)),console[_0x49cb8a(0x18c)]('Usage:\x20tdx\x20segment\x20update\x20<path>\x20[options]'),console[_0x49cb8a(0x18c)](_0x49cb8a(0x181)),console['error']('\x20\x20tdx\x20segment\x20update\x20\x22My\x20Audience/High\x20Value\x22\x20--description\x20\x22...\x22'),console[_0x49cb8a(0x18c)]('\x20\x20tdx\x20segment\x20update\x20\x22High\x20Value\x22\x20--rule\x20\x27...\x27\x20\x20#\x20Relative\x20to\x20context'),0x1;const _0x2a5e42=_0x5d8446[0x0],_0x34b8db=_0xdaa1b7[_0x49cb8a(0x182)];let _0x4d7196=_0x2a5e42;_0x34b8db&&!_0x2a5e42['includes']('/')&&(_0x4d7196=_0x34b8db+'/'+_0x2a5e42,_0x50db6a[_0x49cb8a(0x18e)]&&console[_0x49cb8a(0x18c)]('Resolved\x20relative\x20path\x20to:\x20'+_0x4d7196));const _0x19c5d6=await withSpinner(_0x49cb8a(0x198)+_0x4d7196+'\x27...',()=>_0x5df945[_0x49cb8a(0x17b)][_0x49cb8a(0x174)](_0x4d7196),{'verbose':_0x50db6a[_0x49cb8a(0x18e)]}),_0x1db437=_0x19c5d6['data'];_0x50db6a[_0x49cb8a(0x18e)]&&console[_0x49cb8a(0x18c)]('Resolved\x20type:\x20'+_0x1db437['type']);if(_0x1db437[_0x49cb8a(0x17a)]!=='segment')return console[_0x49cb8a(0x18c)](_0x49cb8a(0x18a)+_0x1db437['type']+'.\x20Only\x20child\x20segments\x20can\x20be\x20updated.'),console[_0x49cb8a(0x18c)](_0x49cb8a(0x17f)),0x1;if(!_0x1db437[_0x49cb8a(0x177)])throw new SDKError(ErrorCode[_0x49cb8a(0x19b)],_0x49cb8a(0x19a));const _0x4ac118=_0x1db437[_0x49cb8a(0x16f)],_0x3ccd1c=_0x1db437[_0x49cb8a(0x177)];_0x50db6a[_0x49cb8a(0x18e)]&&(console[_0x49cb8a(0x18c)](_0x49cb8a(0x190)+_0x4ac118),console[_0x49cb8a(0x18c)](_0x49cb8a(0x18b)+_0x3ccd1c));let _0x40b853;if(_0x50db6a[_0x49cb8a(0x175)]){const _0x366305=_0x50db6a[_0x49cb8a(0x175)],_0x3bdde6=await withSpinner(_0x49cb8a(0x192)+_0x366305+'\x27...',()=>_0x5df945['segment'][_0x49cb8a(0x18d)](_0x4ac118,_0x366305),{'verbose':_0x50db6a['verbose']});_0x40b853=parseInt(_0x3bdde6[_0x49cb8a(0x179)],0xa),_0x50db6a['verbose']&&console[_0x49cb8a(0x18c)](_0x49cb8a(0x189)+_0x40b853);}const _0x4d2c30=await loadJSONFromOptions(_0x50db6a[_0x49cb8a(0x18f)],_0x50db6a['ruleFile']),_0x22c7ca={'name':_0x50db6a[_0x49cb8a(0x17d)],'description':_0x50db6a[_0x49cb8a(0x17c)],'rule':_0x4d2c30,'kind':_0x50db6a[_0x49cb8a(0x186)]!==undefined?parseInt(_0x50db6a[_0x49cb8a(0x186)],0xa):undefined,'segmentFolderId':_0x40b853},_0x2ce931=await withSpinner(_0x49cb8a(0x199)+_0x1db437[_0x49cb8a(0x178)]+_0x49cb8a(0x185),()=>_0x5df945['segment']['updateSegmentById'](_0x4ac118,_0x3ccd1c,_0x22c7ca),{'verbose':_0x50db6a[_0x49cb8a(0x18e)]}),_0xc57ce1=_0x2ce931[_0x49cb8a(0x179)];return console['error'](_0x49cb8a(0x183)+_0xc57ce1[_0x49cb8a(0x17d)]+'\x27'),_0x4d7196!==_0x2a5e42&&console[_0x49cb8a(0x18c)](_0x49cb8a(0x195)+_0x4d7196),await handleSDKOutput([_0xc57ce1],_0x50db6a),0x0;}}
1
+ const a27_0x546165=a27_0x343a;(function(_0x12b1f7,_0x10034b){const _0x13fad8=a27_0x343a,_0x19425b=_0x12b1f7();while(!![]){try{const _0x2adb3a=parseInt(_0x13fad8(0x103))/0x1*(parseInt(_0x13fad8(0x11b))/0x2)+-parseInt(_0x13fad8(0x117))/0x3+parseInt(_0x13fad8(0xf9))/0x4*(-parseInt(_0x13fad8(0xff))/0x5)+-parseInt(_0x13fad8(0xf5))/0x6*(-parseInt(_0x13fad8(0xf0))/0x7)+-parseInt(_0x13fad8(0x114))/0x8+-parseInt(_0x13fad8(0xef))/0x9+parseInt(_0x13fad8(0xf6))/0xa;if(_0x2adb3a===_0x10034b)break;else _0x19425b['push'](_0x19425b['shift']());}catch(_0x541ae3){_0x19425b['push'](_0x19425b['shift']());}}}(a27_0x136a,0xc4272));import{BaseCommand}from'./command.js';import{handleSDKOutput}from'../utils/command-output.js';function a27_0x136a(){const _0x43a5dc=['3136021zYuxhl','segmentPath','folder','includes','Usage:\x20tdx\x20segment\x20update\x20<path>\x20[options]','6pqGcIc','23439490BCoOUR','error','✔\x20Updated\x20segment\x20\x27','28IOPLXg','Resolved\x20relative\x20path\x20to:\x20','\x20\x20tdx\x20segment\x20update\x20\x22High\x20Value\x22\x20--rule\x20\x27...\x27\x20\x20#\x20Relative\x20to\x20context','ruleFile','Segment\x20ID:\x20','Use:\x20tdx\x20segment\x20update\x20<path_to_segment>\x20[options]','1085170QpuVRL','Error:\x20Segment\x20path\x20or\x20name\x20is\x20required','resolvePathToResource','description','93591bUCvsb','data','kind','segmentName','INTERNAL','\x20\x20tdx\x20segment\x20update\x20\x22My\x20Audience/High\x20Value\x22\x20--description\x20\x22...\x22','parentId','execute','Resolved\x20folder\x20ID:\x20','verbose','\x27...','Resolving\x20folder\x20\x27','name','.\x20Only\x20child\x20segments\x20can\x20be\x20updated.','segmentId','segment:update','type','285280jjtJgL','updateSegmentById','Segment\x20ID\x20missing\x20from\x20resolved\x20path','370686rKwDUk','Updating\x20segment\x20\x27','segment','length','2kcXUKi','3632769froVrg'];a27_0x136a=function(){return _0x43a5dc;};return a27_0x136a();}import{withSpinner}from'../utils/spinner.js';import{loadJSONFromOptions}from'../utils/json-loader.js';import{SDKError,ErrorCode}from'../sdk/index.js';function a27_0x343a(_0x4f74f7,_0xe931f8){const _0x136a0b=a27_0x136a();return a27_0x343a=function(_0x343a93,_0x408f9c){_0x343a93=_0x343a93-0xef;let _0x587853=_0x136a0b[_0x343a93];return _0x587853;},a27_0x343a(_0x4f74f7,_0xe931f8);}export class SegmentUpdateCommand extends BaseCommand{['name']=a27_0x546165(0x112);[a27_0x546165(0x102)]='Update\x20existing\x20child\x20segment';async[a27_0x546165(0x10a)](_0x235e98){const _0x3fd86a=a27_0x546165,{options:_0x5d7e63,args:_0x3f1df6,tdx:_0x26bc4c}=_0x235e98,_0x3ef352=_0x5d7e63;if(_0x3f1df6[_0x3fd86a(0x11a)]===0x0)return console[_0x3fd86a(0xf7)](_0x3fd86a(0x100)),console['error'](_0x3fd86a(0xf4)),console[_0x3fd86a(0xf7)]('Examples:'),console[_0x3fd86a(0xf7)](_0x3fd86a(0x108)),console[_0x3fd86a(0xf7)](_0x3fd86a(0xfb)),0x1;const _0x45b5cb=_0x3f1df6[0x0],_0x1f29cd=_0x5d7e63[_0x3fd86a(0xf1)];let _0x4cdbc8=_0x45b5cb;_0x1f29cd&&!_0x45b5cb[_0x3fd86a(0xf3)]('/')&&(_0x4cdbc8=_0x1f29cd+'/'+_0x45b5cb,_0x3ef352[_0x3fd86a(0x10c)]&&console[_0x3fd86a(0xf7)](_0x3fd86a(0xfa)+_0x4cdbc8));const _0x3fdf8f=await withSpinner('Resolving\x20path\x20\x27'+_0x4cdbc8+_0x3fd86a(0x10d),()=>_0x26bc4c[_0x3fd86a(0x119)][_0x3fd86a(0x101)](_0x4cdbc8),{'verbose':_0x3ef352[_0x3fd86a(0x10c)]}),_0x4f1f6f=_0x3fdf8f['data'];_0x3ef352[_0x3fd86a(0x10c)]&&console[_0x3fd86a(0xf7)]('Resolved\x20type:\x20'+_0x4f1f6f[_0x3fd86a(0x113)]);if(_0x4f1f6f[_0x3fd86a(0x113)]!==_0x3fd86a(0x119))return console['error']('Error:\x20Cannot\x20update\x20'+_0x4f1f6f[_0x3fd86a(0x113)]+_0x3fd86a(0x110)),console[_0x3fd86a(0xf7)](_0x3fd86a(0xfe)),0x1;if(!_0x4f1f6f[_0x3fd86a(0x111)])throw new SDKError(ErrorCode[_0x3fd86a(0x107)],_0x3fd86a(0x116));const _0x1664ac=_0x4f1f6f[_0x3fd86a(0x109)],_0x8a3b9f=_0x4f1f6f[_0x3fd86a(0x111)];_0x3ef352[_0x3fd86a(0x10c)]&&(console[_0x3fd86a(0xf7)]('Parent\x20ID:\x20'+_0x1664ac),console[_0x3fd86a(0xf7)](_0x3fd86a(0xfd)+_0x8a3b9f));let _0x5a27ce;if(_0x3ef352[_0x3fd86a(0xf2)]){const _0x2904fa=_0x3ef352[_0x3fd86a(0xf2)],_0x1fcade=await withSpinner(_0x3fd86a(0x10e)+_0x2904fa+_0x3fd86a(0x10d),()=>_0x26bc4c[_0x3fd86a(0x119)]['resolveFolderId'](_0x1664ac,_0x2904fa),{'verbose':_0x3ef352[_0x3fd86a(0x10c)]});_0x5a27ce=parseInt(_0x1fcade[_0x3fd86a(0x104)],0xa),_0x3ef352['verbose']&&console['error'](_0x3fd86a(0x10b)+_0x5a27ce);}const _0x19adea=await loadJSONFromOptions(_0x3ef352['rule'],_0x3ef352[_0x3fd86a(0xfc)]),_0x446d9f={'name':_0x3ef352['name'],'description':_0x3ef352[_0x3fd86a(0x102)],'rule':_0x19adea,'kind':_0x3ef352[_0x3fd86a(0x105)]!==undefined?parseInt(_0x3ef352[_0x3fd86a(0x105)],0xa):undefined,'segmentFolderId':_0x5a27ce},_0xf72886=await withSpinner(_0x3fd86a(0x118)+_0x4f1f6f[_0x3fd86a(0x106)]+_0x3fd86a(0x10d),()=>_0x26bc4c['segment'][_0x3fd86a(0x115)](_0x1664ac,_0x8a3b9f,_0x446d9f),{'verbose':_0x3ef352[_0x3fd86a(0x10c)]}),_0xa3fee6=_0xf72886['data'];return console[_0x3fd86a(0xf7)](_0x3fd86a(0xf8)+_0xa3fee6[_0x3fd86a(0x10f)]+'\x27'),_0x4cdbc8!==_0x45b5cb&&console[_0x3fd86a(0xf7)]('\x20\x20\x20Path:\x20'+_0x4cdbc8),await handleSDKOutput([_0xa3fee6],_0x3ef352),0x0;}}
@@ -1 +1 @@
1
- const a28_0x40cf62=a28_0x5ad5;function a28_0x3756(){const _0x12131b=['segment','11cpaEKR','Usage:\x20tdx\x20segment\x20use\x20<path>','Use\x20\x22tdx\x20segments\x22\x20to\x20list\x20contents\x20in\x20this\x20context','108HqEheh','Error:\x20No\x20context\x20set.\x20Cannot\x20use\x20relative\x20path.','155vKZSti','segment:use','execute','98YUByLz','Use\x20an\x20absolute\x20path\x20or\x20set\x20context\x20with:\x20tdx\x20segment\x20use\x20<parent_name>','8134650Hzckip','isAbsolute','Context\x20set\x20to:\x20','Error:\x20Cannot\x20set\x20context\x20to\x20a\x20segment.','join','Parent\x20ID:\x20','Resolved\x20relative\x20path\x20to:\x20','Error:\x20Path\x20is\x20required','\x20\x20tdx\x20segment\x20use\x20..\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Go\x20to\x20parent','log','name','7888464iOdIBi','parentName','slice','27739060wqdPHI','split','verbose','session','Folder\x20ID:\x20','description','\x20\x20tdx\x20segment\x20use\x20\x22My\x20Audience\x22','Examples:','type','Resolved\x20path\x20type:\x20','folderPath','error','326PTPvmj','Use:\x20tdx\x20segment\x20use\x20','\x20\x20tdx\x20segment\x20use\x20/\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Clear\x20context','\x20\x20tdx\x20segment\x20use\x20\x22My\x20Audience/Marketing\x22','Context\x20can\x20only\x20be\x20set\x20to\x20a\x20parent\x20segment\x20or\x20folder.','\x27...','3694124ArCIXH','115698qhiQnD','length','parentId','resolvePathToResource','folderId','Context\x20cleared.\x20Back\x20to\x20root.','Use\x20\x22tdx\x20context\x22\x20to\x20see\x20all\x20context\x20parameters','segmentPath','Use\x20\x22tdx\x20segment\x20pwd\x22\x20to\x20show\x20current\x20context','site','Site:\x20','fullPath','102549zayRzM'];a28_0x3756=function(){return _0x12131b;};return a28_0x3756();}(function(_0x4f13af,_0x2a952f){const _0x38ea09=a28_0x5ad5,_0x2afb5f=_0x4f13af();while(!![]){try{const _0x370f25=parseInt(_0x38ea09(0xbf))/0x1*(parseInt(_0x38ea09(0xdb))/0x2)+parseInt(_0x38ea09(0xee))/0x3*(-parseInt(_0x38ea09(0xf3))/0x4)+parseInt(_0x38ea09(0xf5))/0x5*(-parseInt(_0x38ea09(0xe2))/0x6)+-parseInt(_0x38ea09(0xe1))/0x7+-parseInt(_0x38ea09(0xcc))/0x8+parseInt(_0x38ea09(0xc1))/0x9+-parseInt(_0x38ea09(0xcf))/0xa*(-parseInt(_0x38ea09(0xf0))/0xb);if(_0x370f25===_0x2a952f)break;else _0x2afb5f['push'](_0x2afb5f['shift']());}catch(_0x59b4d6){_0x2afb5f['push'](_0x2afb5f['shift']());}}}(a28_0x3756,0xa0f1a));import{BaseCommand}from'./command.js';import{saveSessionContext}from'../core/session.js';function a28_0x5ad5(_0x2d437e,_0x20c6a8){const _0x37561c=a28_0x3756();return a28_0x5ad5=function(_0x5ad5be,_0x39dda3){_0x5ad5be=_0x5ad5be-0xbd;let _0x54d493=_0x37561c[_0x5ad5be];return _0x54d493;},a28_0x5ad5(_0x2d437e,_0x20c6a8);}import{withSpinner}from'../utils/spinner.js';import{parsePath,normalizePath}from'../utils/segment-path-parser.js';export class SegmentUseCommand extends BaseCommand{[a28_0x40cf62(0xcb)]=a28_0x40cf62(0xbd);[a28_0x40cf62(0xd4)]='Set\x20current\x20segment/folder\x20context\x20for\x20navigation';async[a28_0x40cf62(0xbe)](_0x2b4a7e){const _0x4db49b=a28_0x40cf62,{options:_0x152f02,args:_0x4b7e4a,tdx:_0x3bf0fb}=_0x2b4a7e;if(_0x4b7e4a[_0x4db49b(0xe3)]===0x0)return console[_0x4db49b(0xda)](_0x4db49b(0xc8)),console['error'](_0x4db49b(0xf1)),console[_0x4db49b(0xda)](_0x4db49b(0xd6)),console[_0x4db49b(0xda)](_0x4db49b(0xd5)),console['error'](_0x4db49b(0xde)),console[_0x4db49b(0xda)](_0x4db49b(0xdd)),console['error'](_0x4db49b(0xc9)),0x1;const _0xef4bc6=_0x4b7e4a[0x0],_0x3a0b30=_0x152f02[_0x4db49b(0xd2)];try{if(_0xef4bc6==='/')return saveSessionContext({'segment_path':undefined},_0x3a0b30),console['log'](_0x4db49b(0xe7)),0x0;const _0x38bb39=_0x152f02[_0x4db49b(0xe9)];let _0x55f091=_0xef4bc6;const _0x233685=parsePath(_0xef4bc6);if(!_0x233685[_0x4db49b(0xc2)]){if(!_0x38bb39)return console[_0x4db49b(0xda)](_0x4db49b(0xf4)),console['error'](_0x4db49b(0xc0)),0x1;if(_0xef4bc6==='..'){const _0x286023=_0x38bb39[_0x4db49b(0xd0)]('/')[_0x4db49b(0xce)](0x0,-0x1)[_0x4db49b(0xc5)]('/');_0x55f091=_0x286023||'/';}else _0xef4bc6==='.'?_0x55f091=_0x38bb39:_0x55f091=_0x38bb39+'/'+_0xef4bc6;_0x152f02[_0x4db49b(0xd1)]&&console[_0x4db49b(0xda)](_0x4db49b(0xc7)+_0x55f091);}if(_0x55f091==='/'||_0x55f091==='')return saveSessionContext({'segment_path':undefined},_0x3a0b30),console[_0x4db49b(0xca)](_0x4db49b(0xe7)),0x0;_0x55f091=normalizePath(_0x55f091);const _0x208307=parsePath(_0x55f091)['segments'];if(_0x208307['length']===0x0)return saveSessionContext({'segment_path':undefined},_0x3a0b30),console[_0x4db49b(0xca)](_0x4db49b(0xe7)),0x0;_0x152f02[_0x4db49b(0xd1)]&&(console['error'](_0x4db49b(0xec)+_0x152f02[_0x4db49b(0xeb)]),console['error']('Target\x20path:\x20'+_0x55f091));const _0xef0a03=await withSpinner('Resolving\x20path\x20\x27'+_0x55f091+_0x4db49b(0xe0),()=>_0x3bf0fb[_0x4db49b(0xef)][_0x4db49b(0xe5)](_0x55f091),{'verbose':_0x152f02['verbose']}),_0x433c37=_0xef0a03['data'];_0x152f02[_0x4db49b(0xd1)]&&(console['error'](_0x4db49b(0xd8)+_0x433c37[_0x4db49b(0xd7)]),console[_0x4db49b(0xda)](_0x4db49b(0xc6)+_0x433c37[_0x4db49b(0xe4)]),_0x433c37['folderId']&&console[_0x4db49b(0xda)](_0x4db49b(0xd3)+_0x433c37[_0x4db49b(0xe6)]));if(_0x433c37[_0x4db49b(0xd7)]===_0x4db49b(0xef))return console['error'](_0x4db49b(0xc4)),console['error'](_0x4db49b(0xdf)),console[_0x4db49b(0xda)](_0x4db49b(0xdc)+_0x433c37[_0x4db49b(0xcd)]+(_0x433c37[_0x4db49b(0xd9)]?'/'+_0x433c37[_0x4db49b(0xd9)][_0x4db49b(0xc5)]('/'):'')),0x1;return saveSessionContext({'segment_path':_0x433c37[_0x4db49b(0xed)],'parent_segment':_0x433c37['parentName']},_0x3a0b30),console[_0x4db49b(0xca)](_0x4db49b(0xc3)+_0x433c37[_0x4db49b(0xed)]),_0x152f02[_0x4db49b(0xd1)]&&(console[_0x4db49b(0xda)](_0x4db49b(0xf2)),console[_0x4db49b(0xda)](_0x4db49b(0xea)),console[_0x4db49b(0xda)](_0x4db49b(0xe8))),0x0;}catch(_0x464609){throw _0x464609;}}}
1
+ function a28_0x1e6f(_0x3ebed3,_0x322ee3){const _0xf5e0f5=a28_0xf5e0();return a28_0x1e6f=function(_0x1e6fcd,_0x24a030){_0x1e6fcd=_0x1e6fcd-0x10d;let _0xe17533=_0xf5e0f5[_0x1e6fcd];return _0xe17533;},a28_0x1e6f(_0x3ebed3,_0x322ee3);}const a28_0x495bb8=a28_0x1e6f;(function(_0x4e90c2,_0x150cbc){const _0x49f38f=a28_0x1e6f,_0x48b6ca=_0x4e90c2();while(!![]){try{const _0x4c39cb=parseInt(_0x49f38f(0x114))/0x1+parseInt(_0x49f38f(0x11e))/0x2*(parseInt(_0x49f38f(0x12a))/0x3)+parseInt(_0x49f38f(0x112))/0x4+-parseInt(_0x49f38f(0x137))/0x5*(-parseInt(_0x49f38f(0x135))/0x6)+parseInt(_0x49f38f(0x125))/0x7+parseInt(_0x49f38f(0x115))/0x8*(parseInt(_0x49f38f(0x130))/0x9)+-parseInt(_0x49f38f(0x120))/0xa*(parseInt(_0x49f38f(0x134))/0xb);if(_0x4c39cb===_0x150cbc)break;else _0x48b6ca['push'](_0x48b6ca['shift']());}catch(_0x24d752){_0x48b6ca['push'](_0x48b6ca['shift']());}}}(a28_0xf5e0,0x4231f));import{BaseCommand}from'./command.js';function a28_0xf5e0(){const _0x421148=['folderId','folderPath','Target\x20path:\x20','Use\x20\x22tdx\x20context\x22\x20to\x20see\x20all\x20context\x20parameters','Resolved\x20path\x20type:\x20','name','join','Folder\x20ID:\x20','isAbsolute','parentId','Context\x20cleared.\x20Back\x20to\x20root.','session','log','1432920WHRjqP','resolvePathToResource','126583EhVghf','8OZfdPz','Error:\x20No\x20context\x20set.\x20Cannot\x20use\x20relative\x20path.','Use\x20an\x20absolute\x20path\x20or\x20set\x20context\x20with:\x20tdx\x20segment\x20use\x20<parent_name>','Site:\x20','fullPath','Resolved\x20relative\x20path\x20to:\x20','Context\x20can\x20only\x20be\x20set\x20to\x20a\x20parent\x20segment\x20or\x20folder.','segment:use','Examples:','18QSOFps','Error:\x20Path\x20is\x20required','10MjOkBU','segmentPath','\x20\x20tdx\x20segment\x20use\x20\x22My\x20Audience\x22','parentName','error','1572760HjfACq','\x20\x20tdx\x20segment\x20use\x20\x22My\x20Audience/Marketing\x22','segment','Resolving\x20path\x20\x27','verbose','39999xYZFrU','\x20\x20tdx\x20segment\x20use\x20/\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Clear\x20context','length','slice','Use\x20\x22tdx\x20segment\x20pwd\x22\x20to\x20show\x20current\x20context','segments','4588965jQIGUf','Use\x20\x22tdx\x20segments\x22\x20to\x20list\x20contents\x20in\x20this\x20context','type','\x20\x20tdx\x20segment\x20use\x20..\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Go\x20to\x20parent','16680829XdOjbk','2689194SHtSFC','Parent\x20ID:\x20','5dmikzN','description','data','split'];a28_0xf5e0=function(){return _0x421148;};return a28_0xf5e0();}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{[a28_0x495bb8(0x140)]=a28_0x495bb8(0x11c);[a28_0x495bb8(0x138)]='Set\x20current\x20segment/folder\x20context\x20for\x20navigation';async['execute'](_0x1d5529){const _0x12953c=a28_0x495bb8,{options:_0x3d24c6,args:_0xb1d99f,tdx:_0x11090d}=_0x1d5529;if(_0xb1d99f[_0x12953c(0x12c)]===0x0)return console['error'](_0x12953c(0x11f)),console[_0x12953c(0x124)]('Usage:\x20tdx\x20segment\x20use\x20<path>'),console[_0x12953c(0x124)](_0x12953c(0x11d)),console['error'](_0x12953c(0x122)),console[_0x12953c(0x124)](_0x12953c(0x126)),console[_0x12953c(0x124)](_0x12953c(0x12b)),console['error'](_0x12953c(0x133)),0x1;const _0x13997c=_0xb1d99f[0x0],_0x15ffa2=_0x3d24c6[_0x12953c(0x110)];try{if(_0x13997c==='/')return saveSessionContext({'segment_path':undefined},_0x15ffa2),console['log'](_0x12953c(0x10f)),0x0;const _0x5cf14a=_0x3d24c6[_0x12953c(0x121)];let _0x20bbc=_0x13997c;const _0x42b87d=parsePath(_0x13997c);if(!_0x42b87d[_0x12953c(0x10d)]){if(!_0x5cf14a)return console[_0x12953c(0x124)](_0x12953c(0x116)),console[_0x12953c(0x124)](_0x12953c(0x117)),0x1;if(_0x13997c==='..'){const _0xf44c94=_0x5cf14a[_0x12953c(0x13a)]('/')[_0x12953c(0x12d)](0x0,-0x1)[_0x12953c(0x141)]('/');_0x20bbc=_0xf44c94||'/';}else _0x13997c==='.'?_0x20bbc=_0x5cf14a:_0x20bbc=_0x5cf14a+'/'+_0x13997c;_0x3d24c6['verbose']&&console[_0x12953c(0x124)](_0x12953c(0x11a)+_0x20bbc);}if(_0x20bbc==='/'||_0x20bbc==='')return saveSessionContext({'segment_path':undefined},_0x15ffa2),console['log'](_0x12953c(0x10f)),0x0;_0x20bbc=normalizePath(_0x20bbc);const _0x5efff0=parsePath(_0x20bbc)[_0x12953c(0x12f)];if(_0x5efff0[_0x12953c(0x12c)]===0x0)return saveSessionContext({'segment_path':undefined},_0x15ffa2),console[_0x12953c(0x111)]('Context\x20cleared.\x20Back\x20to\x20root.'),0x0;_0x3d24c6[_0x12953c(0x129)]&&(console['error'](_0x12953c(0x118)+_0x3d24c6['site']),console[_0x12953c(0x124)](_0x12953c(0x13d)+_0x20bbc));const _0x2d3f5e=await withSpinner(_0x12953c(0x128)+_0x20bbc+'\x27...',()=>_0x11090d[_0x12953c(0x127)][_0x12953c(0x113)](_0x20bbc),{'verbose':_0x3d24c6[_0x12953c(0x129)]}),_0x315f78=_0x2d3f5e[_0x12953c(0x139)];_0x3d24c6[_0x12953c(0x129)]&&(console['error'](_0x12953c(0x13f)+_0x315f78[_0x12953c(0x132)]),console[_0x12953c(0x124)](_0x12953c(0x136)+_0x315f78[_0x12953c(0x10e)]),_0x315f78[_0x12953c(0x13b)]&&console['error'](_0x12953c(0x142)+_0x315f78[_0x12953c(0x13b)]));if(_0x315f78[_0x12953c(0x132)]===_0x12953c(0x127))return console[_0x12953c(0x124)]('Error:\x20Cannot\x20set\x20context\x20to\x20a\x20segment.'),console[_0x12953c(0x124)](_0x12953c(0x11b)),console[_0x12953c(0x124)]('Use:\x20tdx\x20segment\x20use\x20'+_0x315f78[_0x12953c(0x123)]+(_0x315f78[_0x12953c(0x13c)]?'/'+_0x315f78['folderPath'][_0x12953c(0x141)]('/'):'')),0x1;return saveSessionContext({'segment_path':_0x315f78[_0x12953c(0x119)],'parent_segment':_0x315f78['parentName']},_0x15ffa2),console[_0x12953c(0x111)]('Context\x20set\x20to:\x20'+_0x315f78[_0x12953c(0x119)]),_0x3d24c6[_0x12953c(0x129)]&&(console['error'](_0x12953c(0x131)),console[_0x12953c(0x124)](_0x12953c(0x12e)),console[_0x12953c(0x124)](_0x12953c(0x13e))),0x0;}catch(_0x45ac54){throw _0x45ac54;}}}
@@ -1 +1 @@
1
- const a29_0x1d27de=a29_0x609e;(function(_0x22bbb0,_0x4d7878){const _0x514766=a29_0x609e,_0x429b4f=_0x22bbb0();while(!![]){try{const _0x4e7c83=-parseInt(_0x514766(0x11a))/0x1*(parseInt(_0x514766(0x133))/0x2)+parseInt(_0x514766(0x14a))/0x3*(-parseInt(_0x514766(0x14e))/0x4)+parseInt(_0x514766(0x139))/0x5*(parseInt(_0x514766(0x115))/0x6)+-parseInt(_0x514766(0x12c))/0x7*(parseInt(_0x514766(0x12b))/0x8)+-parseInt(_0x514766(0x119))/0x9+-parseInt(_0x514766(0x145))/0xa*(-parseInt(_0x514766(0x143))/0xb)+parseInt(_0x514766(0x127))/0xc;if(_0x4e7c83===_0x4d7878)break;else _0x429b4f['push'](_0x429b4f['shift']());}catch(_0x143f0e){_0x429b4f['push'](_0x429b4f['shift']());}}}(a29_0x2a0b,0x99023));import{BaseCommand}from'./command.js';function a29_0x2a0b(){const _0x1153c2=['No\x20parent\x20segments\x20match\x20pattern:\x20','Recursive\x20mode:\x20enabled','replace','Resolving\x20context\x20path\x20\x27','1086BcgcFe','map','cause','segment','2467791koeedD','427532tcHIbx','length','data','Clear\x20context\x20with:\x20tdx\x20segment\x20use\x20/','name','message','\x20\x20Cause:\x20','resolvePathToResource','listRecursive','filter','\x20top-level\x20items','verbose','folderId','12457188oDwFoD','dim','folder','List\x20parent\x20segments,\x20folders,\x20and\x20child\x20segments','72VuLsQp','99169wsgNZj','jsonl','👥\x20','parentId','description','Site:\x20','✔\x20Found\x20','2HAxKSh','segmentPath','site','\x20folder','listUnified','Path/pattern\x20arg:\x20','21905XvIGyy','\x20segment','execute','includes','format','localeCompare','[parent\x20segments]','Listing\x20parent\x20segments\x20matching\x20\x27','error','\x27...','1018897PmTcmY','\x5c$&','20YMUVpX','json','listParents','(empty)','Parent\x20ID:\x20','3njVMJF','sort','log','Error:\x20','2241428pMSxLK','\x20and\x20','maxDepth','✔\x20Built\x20tree\x20with\x20','\x20parent\x20segment','Folder\x20ID:\x20','attributes','test','listParentsWithPattern','population'];a29_0x2a0b=function(){return _0x1153c2;};return a29_0x2a0b();}import{SDKError}from'../sdk/index.js';import{handleSDKOutput}from'../utils/command-output.js';import{withSpinner}from'../utils/spinner.js';import{formatFlatList,formatTree}from'../utils/tree-formatter.js';function a29_0x609e(_0x51c1f0,_0x1ef7a8){const _0x2a0b4d=a29_0x2a0b();return a29_0x609e=function(_0x609eff,_0x13a87e){_0x609eff=_0x609eff-0x110;let _0x4d5d60=_0x2a0b4d[_0x609eff];return _0x4d5d60;},a29_0x609e(_0x51c1f0,_0x1ef7a8);}import{formatRows}from'../utils/formatters.js';import a29_0x37c102 from'chalk';export class SegmentsCommand extends BaseCommand{[a29_0x1d27de(0x11e)]='segments';[a29_0x1d27de(0x130)]=a29_0x1d27de(0x12a);async[a29_0x1d27de(0x13b)](_0x46a23d){const _0x3a86af=a29_0x1d27de,{options:_0x2fb85e,args:_0x3b4352}=_0x46a23d,_0x1d5ade=_0x2fb85e['recursive'],_0x1a8894=_0x3b4352[0x0];try{const _0x10ab82=_0x2fb85e[_0x3a86af(0x134)];_0x2fb85e['verbose']&&(console[_0x3a86af(0x141)](_0x3a86af(0x131)+_0x2fb85e[_0x3a86af(0x135)]),console['error']('Current\x20context:\x20'+(_0x10ab82||'/')),_0x1a8894&&console[_0x3a86af(0x141)](_0x3a86af(0x138)+_0x1a8894),_0x1d5ade&&console[_0x3a86af(0x141)](_0x3a86af(0x112)));if(_0x1a8894){const _0x4d668d=_0x1a8894['includes']('*')||_0x1a8894[_0x3a86af(0x13c)]('?');if(_0x4d668d&&!_0x10ab82)return await this[_0x3a86af(0x156)](_0x46a23d,_0x1a8894);else return _0x4d668d?(console[_0x3a86af(0x141)]('Error:\x20Pattern\x20matching\x20is\x20only\x20supported\x20at\x20root\x20level\x20(no\x20context\x20set).'),console[_0x3a86af(0x141)](_0x3a86af(0x11d)),0x1):_0x1d5ade?await this[_0x3a86af(0x122)](_0x46a23d,_0x1a8894):await this[_0x3a86af(0x137)](_0x46a23d,_0x1a8894);}if(!_0x10ab82)return await this[_0x3a86af(0x147)](_0x46a23d);return _0x1d5ade?await this['listRecursive'](_0x46a23d,_0x10ab82):await this['listUnified'](_0x46a23d,_0x10ab82);}catch(_0xad1faf){if(_0xad1faf instanceof SDKError)return console[_0x3a86af(0x141)](_0x3a86af(0x14d)+_0xad1faf[_0x3a86af(0x11f)]),_0xad1faf[_0x3a86af(0x117)]&&console['error'](_0x3a86af(0x120)+_0xad1faf[_0x3a86af(0x117)]),0x1;throw _0xad1faf;}}async[a29_0x1d27de(0x156)](_0x100263,_0x2af208){const _0x37c0b7=a29_0x1d27de,{options:_0x130e17,tdx:_0x5d41b2}=_0x100263,_0x18156c=await withSpinner(_0x37c0b7(0x140)+_0x2af208+'\x27...',()=>_0x5d41b2[_0x37c0b7(0x118)][_0x37c0b7(0x147)](),{'verbose':_0x130e17[_0x37c0b7(0x125)]}),_0x5dfcc6=_0x18156c[_0x37c0b7(0x11c)],_0x7b83e7=_0x2af208[_0x37c0b7(0x113)](/[.+^${}()|[\]\\]/g,_0x37c0b7(0x144))['replace'](/\*/g,'.*')[_0x37c0b7(0x113)](/\?/g,'.'),_0x24397e=new RegExp('^'+_0x7b83e7+'$','i'),_0x1d0f46=_0x5dfcc6[_0x37c0b7(0x123)](_0x2a0d9d=>_0x24397e[_0x37c0b7(0x155)](_0x2a0d9d[_0x37c0b7(0x154)][_0x37c0b7(0x11e)]));console[_0x37c0b7(0x141)](_0x37c0b7(0x132)+_0x1d0f46[_0x37c0b7(0x11b)]+_0x37c0b7(0x152)+(_0x1d0f46[_0x37c0b7(0x11b)]!==0x1?'s':'')+'\x20matching\x20\x27'+_0x2af208+'\x27');if(_0x130e17[_0x37c0b7(0x13d)]===_0x37c0b7(0x146)||_0x130e17[_0x37c0b7(0x13d)]===_0x37c0b7(0x12d))await handleSDKOutput(_0x1d0f46,_0x130e17);else{if(_0x1d0f46['length']===0x0)console[_0x37c0b7(0x14c)](_0x37c0b7(0x111)+_0x2af208);else{console[_0x37c0b7(0x14c)](_0x37c0b7(0x13f));for(const _0x113771 of _0x1d0f46){const _0x566b0a=_0x113771[_0x37c0b7(0x154)][_0x37c0b7(0x110)]?a29_0x37c102[_0x37c0b7(0x128)]('\x20('+formatRows(_0x113771[_0x37c0b7(0x154)][_0x37c0b7(0x110)])+')'):'';console['log'](_0x37c0b7(0x12e)+_0x113771[_0x37c0b7(0x154)]['name']+_0x566b0a);}}}return 0x0;}async[a29_0x1d27de(0x147)](_0x1b96e5){const _0x5dddf0=a29_0x1d27de,{options:_0x31e659,tdx:_0x10c272}=_0x1b96e5,_0x188efd=await withSpinner('Listing\x20parent\x20segments...',()=>_0x10c272[_0x5dddf0(0x118)][_0x5dddf0(0x147)](),{'verbose':_0x31e659['verbose']}),_0x72e64b=_0x188efd[_0x5dddf0(0x11c)];console[_0x5dddf0(0x141)]('✔\x20Found\x20'+_0x72e64b['length']+_0x5dddf0(0x152)+(_0x72e64b['length']!==0x1?'s':''));if(_0x31e659[_0x5dddf0(0x13d)]===_0x5dddf0(0x146)||_0x31e659[_0x5dddf0(0x13d)]==='jsonl')await handleSDKOutput(_0x72e64b,_0x31e659);else{console['log'](_0x5dddf0(0x13f));for(const _0x2073b2 of _0x72e64b){const _0x2ceb17=_0x2073b2['attributes']['population']?a29_0x37c102['dim']('\x20('+formatRows(_0x2073b2['attributes']['population'])+')'):'';console[_0x5dddf0(0x14c)](_0x5dddf0(0x12e)+_0x2073b2['attributes'][_0x5dddf0(0x11e)]+_0x2ceb17);}}return 0x0;}async[a29_0x1d27de(0x137)](_0x1a6ca7,_0x2b8678){const _0x5ecf2c=a29_0x1d27de,{options:_0x3f9855,tdx:_0xecea5c}=_0x1a6ca7,_0x4ae065=await withSpinner(_0x5ecf2c(0x114)+_0x2b8678+'\x27...',()=>_0xecea5c[_0x5ecf2c(0x118)][_0x5ecf2c(0x121)](_0x2b8678),{'verbose':_0x3f9855['verbose']}),_0xd941bd=_0x4ae065[_0x5ecf2c(0x11c)];_0x3f9855['verbose']&&(console[_0x5ecf2c(0x141)](_0x5ecf2c(0x149)+_0xd941bd[_0x5ecf2c(0x12f)]),_0xd941bd[_0x5ecf2c(0x126)]&&console[_0x5ecf2c(0x141)](_0x5ecf2c(0x153)+_0xd941bd[_0x5ecf2c(0x126)]));const _0x5da3e3=await withSpinner('Listing\x20folders\x20and\x20segments...',()=>_0xecea5c[_0x5ecf2c(0x118)][_0x5ecf2c(0x137)](_0xd941bd['parentId'],_0xd941bd[_0x5ecf2c(0x126)]),{'verbose':_0x3f9855[_0x5ecf2c(0x125)]}),{folders:_0x436d49,segments:_0x2ed50c}=_0x5da3e3[_0x5ecf2c(0x11c)],_0x2c5698=_0x436d49[_0x5ecf2c(0x11b)]+_0x2ed50c[_0x5ecf2c(0x11b)];console[_0x5ecf2c(0x141)](_0x5ecf2c(0x132)+_0x436d49['length']+_0x5ecf2c(0x136)+(_0x436d49[_0x5ecf2c(0x11b)]!==0x1?'s':'')+_0x5ecf2c(0x14f)+_0x2ed50c['length']+_0x5ecf2c(0x13a)+(_0x2ed50c['length']!==0x1?'s':''));if(_0x3f9855['format']===_0x5ecf2c(0x146)||_0x3f9855[_0x5ecf2c(0x13d)]===_0x5ecf2c(0x12d)){const _0x5d15fc=[..._0x436d49['map'](_0x2d2655=>({..._0x2d2655,'type':_0x5ecf2c(0x129)})),..._0x2ed50c[_0x5ecf2c(0x116)](_0x5e622b=>({..._0x5e622b,'type':'segment'}))][_0x5ecf2c(0x14b)]((_0x6c5670,_0x511aa7)=>_0x6c5670[_0x5ecf2c(0x11e)][_0x5ecf2c(0x13e)](_0x511aa7[_0x5ecf2c(0x11e)]));await handleSDKOutput(_0x5d15fc,_0x3f9855);}else{if(_0x2c5698===0x0)console[_0x5ecf2c(0x14c)](a29_0x37c102['dim']('[/'+_0x2b8678+']')),console[_0x5ecf2c(0x14c)](_0x5ecf2c(0x148));else{console[_0x5ecf2c(0x14c)](a29_0x37c102[_0x5ecf2c(0x128)]('[/'+_0x2b8678+']'));const _0x84f9ab=formatFlatList(_0x436d49,_0x2ed50c,{'showMetadata':!![]});console[_0x5ecf2c(0x14c)](_0x84f9ab);}}return 0x0;}async[a29_0x1d27de(0x122)](_0x517540,_0x423b4c){const _0x1221c4=a29_0x1d27de,{options:_0x1901d8,tdx:_0x22f062}=_0x517540,_0x504cdb=await withSpinner(_0x1221c4(0x114)+_0x423b4c+_0x1221c4(0x142),()=>_0x22f062[_0x1221c4(0x118)][_0x1221c4(0x121)](_0x423b4c),{'verbose':_0x1901d8[_0x1221c4(0x125)]}),_0x55aca5=_0x504cdb[_0x1221c4(0x11c)];_0x1901d8[_0x1221c4(0x125)]&&(console[_0x1221c4(0x141)](_0x1221c4(0x149)+_0x55aca5[_0x1221c4(0x12f)]),_0x55aca5['folderId']&&console[_0x1221c4(0x141)]('Folder\x20ID:\x20'+_0x55aca5[_0x1221c4(0x126)]));const _0x1aa348=_0x1901d8[_0x1221c4(0x150)]||0xa,_0xba1e32=await withSpinner('Building\x20hierarchy\x20tree...',()=>_0x22f062[_0x1221c4(0x118)]['listRecursive'](_0x55aca5[_0x1221c4(0x12f)],_0x55aca5[_0x1221c4(0x126)],0x0,_0x1aa348),{'verbose':_0x1901d8[_0x1221c4(0x125)]}),_0x5c238f=_0xba1e32[_0x1221c4(0x11c)];console[_0x1221c4(0x141)](_0x1221c4(0x151)+_0x5c238f[_0x1221c4(0x11b)]+_0x1221c4(0x124));if(_0x1901d8[_0x1221c4(0x13d)]===_0x1221c4(0x146)||_0x1901d8['format']===_0x1221c4(0x12d))await handleSDKOutput(_0x5c238f,_0x1901d8);else{console[_0x1221c4(0x14c)](a29_0x37c102[_0x1221c4(0x128)]('[/'+_0x423b4c+']'));const _0x206be2=formatTree(_0x5c238f,{'showMetadata':!![]});console[_0x1221c4(0x14c)](_0x206be2);}return 0x0;}}
1
+ const a29_0x50a514=a29_0x451e;(function(_0xebbebe,_0x26ea82){const _0x2cd233=a29_0x451e,_0x269eb7=_0xebbebe();while(!![]){try{const _0x869140=parseInt(_0x2cd233(0x1c0))/0x1+-parseInt(_0x2cd233(0x194))/0x2*(-parseInt(_0x2cd233(0x198))/0x3)+parseInt(_0x2cd233(0x1b0))/0x4*(-parseInt(_0x2cd233(0x1b8))/0x5)+-parseInt(_0x2cd233(0x1b3))/0x6*(-parseInt(_0x2cd233(0x1bd))/0x7)+-parseInt(_0x2cd233(0x1b2))/0x8+-parseInt(_0x2cd233(0x182))/0x9+-parseInt(_0x2cd233(0x189))/0xa*(-parseInt(_0x2cd233(0x1c1))/0xb);if(_0x869140===_0x26ea82)break;else _0x269eb7['push'](_0x269eb7['shift']());}catch(_0x3eea3c){_0x269eb7['push'](_0x269eb7['shift']());}}}(a29_0x5c78,0x57010));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';function a29_0x5c78(){const _0x115541=['Recursive\x20mode:\x20enabled','\x20folder','dim','log','verbose','✔\x20Found\x20','Resolving\x20context\x20path\x20\x27','Error:\x20Pattern\x20matching\x20is\x20only\x20supported\x20at\x20root\x20level\x20(no\x20context\x20set).','[parent\x20segments]','Listing\x20parent\x20segments...','localeCompare','execute','parentId','2789656vCsJUJ','site','3810240nymKLS','12cKXrEc','folderId','cause','listRecursive','listParents','5PRkeVP','population','replace','format','maxDepth','1061137GVQCwF','Clear\x20context\x20with:\x20tdx\x20segment\x20use\x20/','Listing\x20parent\x20segments\x20matching\x20\x27','304645nhlGrm','325996KyNVZh','\x20top-level\x20items','Site:\x20','data','\x20and\x20','recursive','listParentsWithPattern','json','filter','5052456PDtAam','segment','message','error','Folder\x20ID:\x20','Building\x20hierarchy\x20tree...','Current\x20context:\x20','410EBZSkC','description','Path/pattern\x20arg:\x20','👥\x20','\x20segment','test','✔\x20Built\x20tree\x20with\x20','List\x20parent\x20segments,\x20folders,\x20and\x20child\x20segments','listUnified','jsonl','attributes','2WcZPDe','includes','resolvePathToResource','length','805629Esvcod','Listing\x20folders\x20and\x20segments...','\x27...','\x5c$&','Error:\x20','folder','map','No\x20parent\x20segments\x20match\x20pattern:\x20','name','\x20\x20Cause:\x20','Parent\x20ID:\x20'];a29_0x5c78=function(){return _0x115541;};return a29_0x5c78();}function a29_0x451e(_0x8d822a,_0x3624f3){const _0x5c78d5=a29_0x5c78();return a29_0x451e=function(_0x451e4f,_0x449a95){_0x451e4f=_0x451e4f-0x17e;let _0x302d93=_0x5c78d5[_0x451e4f];return _0x302d93;},a29_0x451e(_0x8d822a,_0x3624f3);}import a29_0x1aea9e from'chalk';export class SegmentsCommand extends BaseCommand{[a29_0x50a514(0x1a0)]='segments';[a29_0x50a514(0x18a)]=a29_0x50a514(0x190);async[a29_0x50a514(0x1ae)](_0x31b1f4){const _0x2cfd68=a29_0x50a514,{options:_0x3e96c3,args:_0x2c5b80}=_0x31b1f4,_0xd9cf04=_0x3e96c3[_0x2cfd68(0x17e)],_0x862eae=_0x2c5b80[0x0];try{const _0x1745a8=_0x3e96c3['segmentPath'];_0x3e96c3[_0x2cfd68(0x1a7)]&&(console[_0x2cfd68(0x185)](_0x2cfd68(0x1c3)+_0x3e96c3[_0x2cfd68(0x1b1)]),console['error'](_0x2cfd68(0x188)+(_0x1745a8||'/')),_0x862eae&&console[_0x2cfd68(0x185)](_0x2cfd68(0x18b)+_0x862eae),_0xd9cf04&&console['error'](_0x2cfd68(0x1a3)));if(_0x862eae){const _0x5da42c=_0x862eae['includes']('*')||_0x862eae[_0x2cfd68(0x195)]('?');if(_0x5da42c&&!_0x1745a8)return await this[_0x2cfd68(0x17f)](_0x31b1f4,_0x862eae);else return _0x5da42c?(console['error'](_0x2cfd68(0x1aa)),console[_0x2cfd68(0x185)](_0x2cfd68(0x1be)),0x1):_0xd9cf04?await this[_0x2cfd68(0x1b6)](_0x31b1f4,_0x862eae):await this[_0x2cfd68(0x191)](_0x31b1f4,_0x862eae);}if(!_0x1745a8)return await this['listParents'](_0x31b1f4);return _0xd9cf04?await this['listRecursive'](_0x31b1f4,_0x1745a8):await this[_0x2cfd68(0x191)](_0x31b1f4,_0x1745a8);}catch(_0x5f1b29){if(_0x5f1b29 instanceof SDKError)return console[_0x2cfd68(0x185)](_0x2cfd68(0x19c)+_0x5f1b29[_0x2cfd68(0x184)]),_0x5f1b29[_0x2cfd68(0x1b5)]&&console[_0x2cfd68(0x185)](_0x2cfd68(0x1a1)+_0x5f1b29[_0x2cfd68(0x1b5)]),0x1;throw _0x5f1b29;}}async[a29_0x50a514(0x17f)](_0x17fb82,_0x48203f){const _0x2e1922=a29_0x50a514,{options:_0x246f88,tdx:_0x5dd8c9}=_0x17fb82,_0x4d5985=await withSpinner(_0x2e1922(0x1bf)+_0x48203f+_0x2e1922(0x19a),()=>_0x5dd8c9[_0x2e1922(0x183)][_0x2e1922(0x1b7)](),{'verbose':_0x246f88[_0x2e1922(0x1a7)]}),_0x161275=_0x4d5985[_0x2e1922(0x1c4)],_0x1c28dd=_0x48203f[_0x2e1922(0x1ba)](/[.+^${}()|[\]\\]/g,_0x2e1922(0x19b))[_0x2e1922(0x1ba)](/\*/g,'.*')['replace'](/\?/g,'.'),_0x1732e2=new RegExp('^'+_0x1c28dd+'$','i'),_0x456205=_0x161275[_0x2e1922(0x181)](_0x5ae6f6=>_0x1732e2[_0x2e1922(0x18e)](_0x5ae6f6[_0x2e1922(0x193)][_0x2e1922(0x1a0)]));console[_0x2e1922(0x185)](_0x2e1922(0x1a8)+_0x456205['length']+'\x20parent\x20segment'+(_0x456205[_0x2e1922(0x197)]!==0x1?'s':'')+'\x20matching\x20\x27'+_0x48203f+'\x27');if(_0x246f88[_0x2e1922(0x1bb)]===_0x2e1922(0x180)||_0x246f88[_0x2e1922(0x1bb)]===_0x2e1922(0x192))await handleSDKOutput(_0x456205,_0x246f88);else{if(_0x456205[_0x2e1922(0x197)]===0x0)console[_0x2e1922(0x1a6)](_0x2e1922(0x19f)+_0x48203f);else{console[_0x2e1922(0x1a6)](_0x2e1922(0x1ab));for(const _0x4548dc of _0x456205){const _0x3ca19a=_0x4548dc['attributes'][_0x2e1922(0x1b9)]?a29_0x1aea9e['dim']('\x20('+formatRows(_0x4548dc[_0x2e1922(0x193)][_0x2e1922(0x1b9)])+')'):'';console[_0x2e1922(0x1a6)](_0x2e1922(0x18c)+_0x4548dc[_0x2e1922(0x193)][_0x2e1922(0x1a0)]+_0x3ca19a);}}}return 0x0;}async[a29_0x50a514(0x1b7)](_0x17fb8b){const _0x4df3b0=a29_0x50a514,{options:_0x3a2cfd,tdx:_0x55f5b7}=_0x17fb8b,_0x30fe10=await withSpinner(_0x4df3b0(0x1ac),()=>_0x55f5b7[_0x4df3b0(0x183)][_0x4df3b0(0x1b7)](),{'verbose':_0x3a2cfd['verbose']}),_0x2ff98b=_0x30fe10['data'];console[_0x4df3b0(0x185)](_0x4df3b0(0x1a8)+_0x2ff98b['length']+'\x20parent\x20segment'+(_0x2ff98b['length']!==0x1?'s':''));if(_0x3a2cfd[_0x4df3b0(0x1bb)]===_0x4df3b0(0x180)||_0x3a2cfd[_0x4df3b0(0x1bb)]==='jsonl')await handleSDKOutput(_0x2ff98b,_0x3a2cfd);else{console[_0x4df3b0(0x1a6)]('[parent\x20segments]');for(const _0x366d1e of _0x2ff98b){const _0x15a54c=_0x366d1e['attributes'][_0x4df3b0(0x1b9)]?a29_0x1aea9e[_0x4df3b0(0x1a5)]('\x20('+formatRows(_0x366d1e[_0x4df3b0(0x193)]['population'])+')'):'';console[_0x4df3b0(0x1a6)](_0x4df3b0(0x18c)+_0x366d1e['attributes'][_0x4df3b0(0x1a0)]+_0x15a54c);}}return 0x0;}async[a29_0x50a514(0x191)](_0x3f81b3,_0x6dbae2){const _0x2f1509=a29_0x50a514,{options:_0x55cee3,tdx:_0x4a7a51}=_0x3f81b3,_0x494117=await withSpinner(_0x2f1509(0x1a9)+_0x6dbae2+_0x2f1509(0x19a),()=>_0x4a7a51[_0x2f1509(0x183)]['resolvePathToResource'](_0x6dbae2),{'verbose':_0x55cee3[_0x2f1509(0x1a7)]}),_0x34d58f=_0x494117[_0x2f1509(0x1c4)];_0x55cee3[_0x2f1509(0x1a7)]&&(console[_0x2f1509(0x185)]('Parent\x20ID:\x20'+_0x34d58f[_0x2f1509(0x1af)]),_0x34d58f[_0x2f1509(0x1b4)]&&console[_0x2f1509(0x185)](_0x2f1509(0x186)+_0x34d58f[_0x2f1509(0x1b4)]));const _0x4c22e4=await withSpinner(_0x2f1509(0x199),()=>_0x4a7a51[_0x2f1509(0x183)][_0x2f1509(0x191)](_0x34d58f['parentId'],_0x34d58f[_0x2f1509(0x1b4)]),{'verbose':_0x55cee3[_0x2f1509(0x1a7)]}),{folders:_0x18716d,segments:_0x29c860}=_0x4c22e4[_0x2f1509(0x1c4)],_0x96b4a0=_0x18716d['length']+_0x29c860[_0x2f1509(0x197)];console[_0x2f1509(0x185)]('✔\x20Found\x20'+_0x18716d[_0x2f1509(0x197)]+_0x2f1509(0x1a4)+(_0x18716d['length']!==0x1?'s':'')+_0x2f1509(0x1c5)+_0x29c860[_0x2f1509(0x197)]+_0x2f1509(0x18d)+(_0x29c860[_0x2f1509(0x197)]!==0x1?'s':''));if(_0x55cee3['format']===_0x2f1509(0x180)||_0x55cee3[_0x2f1509(0x1bb)]===_0x2f1509(0x192)){const _0x4f0131=[..._0x18716d[_0x2f1509(0x19e)](_0x3d162a=>({..._0x3d162a,'type':_0x2f1509(0x19d)})),..._0x29c860[_0x2f1509(0x19e)](_0x2310dd=>({..._0x2310dd,'type':_0x2f1509(0x183)}))]['sort']((_0x244e8f,_0x255f25)=>_0x244e8f[_0x2f1509(0x1a0)][_0x2f1509(0x1ad)](_0x255f25[_0x2f1509(0x1a0)]));await handleSDKOutput(_0x4f0131,_0x55cee3);}else{if(_0x96b4a0===0x0)console[_0x2f1509(0x1a6)](a29_0x1aea9e[_0x2f1509(0x1a5)]('[/'+_0x6dbae2+']')),console[_0x2f1509(0x1a6)]('(empty)');else{console['log'](a29_0x1aea9e[_0x2f1509(0x1a5)]('[/'+_0x6dbae2+']'));const _0x1cf76a=formatFlatList(_0x18716d,_0x29c860,{'showMetadata':!![]});console[_0x2f1509(0x1a6)](_0x1cf76a);}}return 0x0;}async[a29_0x50a514(0x1b6)](_0x3435f6,_0x1c7546){const _0x4aa700=a29_0x50a514,{options:_0x2b9994,tdx:_0x43bc21}=_0x3435f6,_0x1be978=await withSpinner(_0x4aa700(0x1a9)+_0x1c7546+_0x4aa700(0x19a),()=>_0x43bc21[_0x4aa700(0x183)][_0x4aa700(0x196)](_0x1c7546),{'verbose':_0x2b9994[_0x4aa700(0x1a7)]}),_0x28eb41=_0x1be978['data'];_0x2b9994[_0x4aa700(0x1a7)]&&(console[_0x4aa700(0x185)](_0x4aa700(0x1a2)+_0x28eb41[_0x4aa700(0x1af)]),_0x28eb41['folderId']&&console[_0x4aa700(0x185)](_0x4aa700(0x186)+_0x28eb41[_0x4aa700(0x1b4)]));const _0x1f3763=_0x2b9994[_0x4aa700(0x1bc)]||0xa,_0x3fa513=await withSpinner(_0x4aa700(0x187),()=>_0x43bc21['segment'][_0x4aa700(0x1b6)](_0x28eb41['parentId'],_0x28eb41['folderId'],0x0,_0x1f3763),{'verbose':_0x2b9994[_0x4aa700(0x1a7)]}),_0x802f08=_0x3fa513[_0x4aa700(0x1c4)];console[_0x4aa700(0x185)](_0x4aa700(0x18f)+_0x802f08[_0x4aa700(0x197)]+_0x4aa700(0x1c2));if(_0x2b9994[_0x4aa700(0x1bb)]===_0x4aa700(0x180)||_0x2b9994[_0x4aa700(0x1bb)]===_0x4aa700(0x192))await handleSDKOutput(_0x802f08,_0x2b9994);else{console[_0x4aa700(0x1a6)](a29_0x1aea9e[_0x4aa700(0x1a5)]('[/'+_0x1c7546+']'));const _0x4294d2=formatTree(_0x802f08,{'showMetadata':!![]});console['log'](_0x4294d2);}return 0x0;}}
@@ -1 +1 @@
1
- const a30_0x329060=a30_0x1a9a;(function(_0x246029,_0x264209){const _0xfd5708=a30_0x1a9a,_0x1da4e2=_0x246029();while(!![]){try{const _0x3152b0=parseInt(_0xfd5708(0xcd))/0x1+parseInt(_0xfd5708(0xbd))/0x2+-parseInt(_0xfd5708(0xdb))/0x3+-parseInt(_0xfd5708(0xc8))/0x4*(-parseInt(_0xfd5708(0xc0))/0x5)+parseInt(_0xfd5708(0xbe))/0x6+parseInt(_0xfd5708(0xe0))/0x7+-parseInt(_0xfd5708(0xd6))/0x8;if(_0x3152b0===_0x264209)break;else _0x1da4e2['push'](_0x1da4e2['shift']());}catch(_0xe0a0d7){_0x1da4e2['push'](_0x1da4e2['shift']());}}}(a30_0x2f58,0x9e675));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleSDKOutput}from'../utils/command-output.js';function a30_0x1a9a(_0x3d8a5f,_0x446c6f){const _0x2f5886=a30_0x2f58();return a30_0x1a9a=function(_0x1a9aa3,_0x329cbc){_0x1a9aa3=_0x1a9aa3-0xba;let _0x4d5290=_0x2f5886[_0x1a9aa3];return _0x4d5290;},a30_0x1a9a(_0x3d8a5f,_0x446c6f);}import{parseTableReference,validateTableDescribeReference}from'../utils/table-ref-parser.js';import{withSpinner}from'../utils/spinner.js';function a30_0x2f58(){const _0xb0bf45=['site','verbose','Usage:\x20tdx\x20show\x20<database.table>\x0a\x20\x20\x20or:\x20tdx\x20show\x20<catalog.database.table>\x0a\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--database\x20<database>\x0a\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--in\x20<database>\x0a\x0aRun\x20\x27tdx\x20show\x20--help\x27\x20for\x20more\x20options','length','Error:\x20','Catalog:\x20','Database:\x20','\x20\x20Cause:\x20','15242096BlTIKz','\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--database\x20<database>','data','description','Usage:\x20tdx\x20show\x20<database.table>','2339526eaKxzb','database','...','catalog','Site:\x20','6886103VHpIIQ','showTable','cause','\x20row','156180fifhFQ','312492OBJbUR','table','5251655QeZxoJ','\x20\x20\x20or:\x20tdx\x20show\x20<catalog.database.table>','✔\x20Query\x20successful\x20-\x200\x20rows\x20returned','args','Querying\x20','execute','message','error','4GROsUK','Show\x20table\x20contents','Table:\x20','\x20from\x20','show','1169693mSyEon'];a30_0x2f58=function(){return _0xb0bf45;};return a30_0x2f58();}import{DEFAULT_DISPLAY_LIMIT,resolveLimit}from'../utils/constants.js';export class ShowCommand extends BaseCommand{['name']=a30_0x329060(0xcc);[a30_0x329060(0xd9)]=a30_0x329060(0xc9);async[a30_0x329060(0xc5)](_0x37d594){const _0x3dfeb6=a30_0x329060;return this[_0x3dfeb6(0xba)](_0x37d594);}async[a30_0x329060(0xba)](_0x272381){const _0x1c338f=a30_0x329060,{options:_0x4d58e6,args:_0x87965c,tdx:_0x20a0be}=_0x272381;let _0x55c32f;try{_0x55c32f=parseTableReference(_0x87965c[0x0]);const _0x3f7971=_0x4d58e6[_0x1c338f(0xdc)];!_0x55c32f[_0x1c338f(0xdc)]&&_0x3f7971&&(_0x55c32f[_0x1c338f(0xdc)]=_0x3f7971);const _0x4d4c60=validateTableDescribeReference(_0x55c32f);if(_0x4d4c60)return console['error'](_0x1c338f(0xd2)+_0x4d4c60),console['error'](_0x1c338f(0xda)),console[_0x1c338f(0xc7)](_0x1c338f(0xc1)),console[_0x1c338f(0xc7)](_0x1c338f(0xd7)),0x1;}catch(_0x662e46){return console[_0x1c338f(0xc7)](_0x1c338f(0xd2)+_0x662e46[_0x1c338f(0xc6)]),console[_0x1c338f(0xc7)](_0x1c338f(0xda)),console['error'](_0x1c338f(0xc1)),console['error']('\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--database\x20<database>'),0x1;}const _0x5887b6=_0x55c32f[_0x1c338f(0xde)],_0x40c26d=_0x55c32f[_0x1c338f(0xdc)],_0x51292a=_0x55c32f[_0x1c338f(0xbf)],_0x3dfdd0=resolveLimit(_0x4d58e6['limit'],DEFAULT_DISPLAY_LIMIT);try{_0x4d58e6['verbose']&&(console[_0x1c338f(0xc7)](_0x1c338f(0xdf)+_0x4d58e6[_0x1c338f(0xce)]),_0x5887b6&&console[_0x1c338f(0xc7)](_0x1c338f(0xd3)+_0x5887b6),console['error'](_0x1c338f(0xd4)+_0x40c26d),console[_0x1c338f(0xc7)](_0x1c338f(0xca)+_0x51292a),console[_0x1c338f(0xc7)]('Limit:\x20'+_0x3dfdd0));const _0x1f028a=_0x5887b6?_0x5887b6+'.'+_0x40c26d+'.'+_0x51292a:_0x40c26d+'.'+_0x51292a,_0x202e1d=await withSpinner(_0x1c338f(0xc4)+_0x1f028a+_0x1c338f(0xdd),()=>_0x20a0be[_0x1c338f(0xbf)][_0x1c338f(0xcc)](_0x40c26d,_0x51292a,_0x3dfdd0,_0x5887b6),{'verbose':_0x4d58e6[_0x1c338f(0xcf)]}),_0x2db84b=_0x202e1d['data'],_0x1fc87c=_0x2db84b[_0x1c338f(0xd8)];return _0x1fc87c['length']===0x0?console[_0x1c338f(0xc7)](_0x1c338f(0xc2)):console['error']('✔\x20Retrieved\x20'+_0x1fc87c[_0x1c338f(0xd1)]+_0x1c338f(0xbc)+(_0x1fc87c[_0x1c338f(0xd1)]!==0x1?'s':'')+_0x1c338f(0xcb)+_0x1f028a),await handleSDKOutput(_0x1fc87c,_0x4d58e6),0x0;}catch(_0x353d83){if(_0x353d83 instanceof SDKError)return console[_0x1c338f(0xc7)](_0x1c338f(0xd2)+_0x353d83['message']),_0x353d83[_0x1c338f(0xbb)]&&console[_0x1c338f(0xc7)](_0x1c338f(0xd5)+_0x353d83[_0x1c338f(0xbb)]),0x1;throw _0x353d83;}}['validate'](_0x25830e){const _0x4f3e54=a30_0x329060;if(_0x25830e[_0x4f3e54(0xc3)]['length']===0x0)return _0x4f3e54(0xd0);if(_0x25830e[_0x4f3e54(0xc3)][_0x4f3e54(0xd1)]>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 a30_0x2c772e=a30_0x208f;(function(_0x28c073,_0x47197d){const _0x4db450=a30_0x208f,_0x485eca=_0x28c073();while(!![]){try{const _0xcc1bbd=-parseInt(_0x4db450(0x176))/0x1*(-parseInt(_0x4db450(0x15e))/0x2)+parseInt(_0x4db450(0x14d))/0x3*(parseInt(_0x4db450(0x155))/0x4)+-parseInt(_0x4db450(0x150))/0x5*(-parseInt(_0x4db450(0x170))/0x6)+-parseInt(_0x4db450(0x168))/0x7*(parseInt(_0x4db450(0x175))/0x8)+parseInt(_0x4db450(0x16c))/0x9*(-parseInt(_0x4db450(0x14f))/0xa)+parseInt(_0x4db450(0x15b))/0xb*(parseInt(_0x4db450(0x14b))/0xc)+parseInt(_0x4db450(0x167))/0xd*(-parseInt(_0x4db450(0x173))/0xe);if(_0xcc1bbd===_0x47197d)break;else _0x485eca['push'](_0x485eca['shift']());}catch(_0x181052){_0x485eca['push'](_0x485eca['shift']());}}}(a30_0x47bd,0x4b295));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleSDKOutput}from'../utils/command-output.js';import{parseTableReference,validateTableDescribeReference}from'../utils/table-ref-parser.js';function a30_0x208f(_0xbbcb3,_0x4e7a95){const _0x47bdea=a30_0x47bd();return a30_0x208f=function(_0x208f3f,_0x367a0e){_0x208f3f=_0x208f3f-0x14b;let _0x4f1301=_0x47bdea[_0x208f3f];return _0x4f1301;},a30_0x208f(_0xbbcb3,_0x4e7a95);}function a30_0x47bd(){const _0x134351=['315052edhEfS','catalog','message','showTable','Catalog:\x20','Site:\x20','Usage:\x20tdx\x20show\x20<database.table>','✔\x20Retrieved\x20','✔\x20Query\x20successful\x20-\x200\x20rows\x20returned','65OWhVJy','510223uEBoHp','error','data','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','1811421uvzgTq','database','description','execute','276zdCtVe','table','Querying\x20','131362PHhmTW','name','48YDTsTz','1nxhEbo','validate','limit','cause','\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--database\x20<database>','15864mbBZuw','length','15JwffYq','Table:\x20','20GIDhPw','52410uzZeiT','\x20\x20\x20or:\x20tdx\x20show\x20<catalog.database.table>','args','\x20from\x20','Too\x20many\x20arguments\x0aUsage:\x20tdx\x20show\x20<database.table>\x0a\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--database\x20<database>\x0a\x0aRun\x20\x27tdx\x20show\x20--help\x27\x20for\x20more\x20options','354064JIvcCs','...','Database:\x20','\x20row','Error:\x20','show','935pGDXlq','Limit:\x20','site'];a30_0x47bd=function(){return _0x134351;};return a30_0x47bd();}import{withSpinner}from'../utils/spinner.js';import{DEFAULT_DISPLAY_LIMIT,resolveLimit}from'../utils/constants.js';export class ShowCommand extends BaseCommand{[a30_0x2c772e(0x174)]=a30_0x2c772e(0x15a);[a30_0x2c772e(0x16e)]='Show\x20table\x20contents';async[a30_0x2c772e(0x16f)](_0x2d5079){const _0xaad505=a30_0x2c772e;return this[_0xaad505(0x161)](_0x2d5079);}async[a30_0x2c772e(0x161)](_0x578dde){const _0x4412d7=a30_0x2c772e,{options:_0x5dbd2e,args:_0x3ba653,tdx:_0x339d6b}=_0x578dde;let _0x245ea4;try{_0x245ea4=parseTableReference(_0x3ba653[0x0]);const _0x4227e7=_0x5dbd2e['database'];!_0x245ea4['database']&&_0x4227e7&&(_0x245ea4[_0x4412d7(0x16d)]=_0x4227e7);const _0x2c9cc0=validateTableDescribeReference(_0x245ea4);if(_0x2c9cc0)return console['error'](_0x4412d7(0x159)+_0x2c9cc0),console[_0x4412d7(0x169)](_0x4412d7(0x164)),console[_0x4412d7(0x169)](_0x4412d7(0x151)),console['error'](_0x4412d7(0x17a)),0x1;}catch(_0x92e342){return console[_0x4412d7(0x169)](_0x4412d7(0x159)+_0x92e342[_0x4412d7(0x160)]),console[_0x4412d7(0x169)](_0x4412d7(0x164)),console[_0x4412d7(0x169)]('\x20\x20\x20or:\x20tdx\x20show\x20<catalog.database.table>'),console['error'](_0x4412d7(0x17a)),0x1;}const _0x31c29f=_0x245ea4[_0x4412d7(0x15f)],_0x2c47ce=_0x245ea4[_0x4412d7(0x16d)],_0x442160=_0x245ea4[_0x4412d7(0x171)],_0x513988=resolveLimit(_0x5dbd2e[_0x4412d7(0x178)],DEFAULT_DISPLAY_LIMIT);try{_0x5dbd2e['verbose']&&(console['error'](_0x4412d7(0x163)+_0x5dbd2e[_0x4412d7(0x15d)]),_0x31c29f&&console[_0x4412d7(0x169)](_0x4412d7(0x162)+_0x31c29f),console[_0x4412d7(0x169)](_0x4412d7(0x157)+_0x2c47ce),console['error'](_0x4412d7(0x14e)+_0x442160),console[_0x4412d7(0x169)](_0x4412d7(0x15c)+_0x513988));const _0x1b51bf=_0x31c29f?_0x31c29f+'.'+_0x2c47ce+'.'+_0x442160:_0x2c47ce+'.'+_0x442160,_0x375a98=await withSpinner(_0x4412d7(0x172)+_0x1b51bf+_0x4412d7(0x156),()=>_0x339d6b[_0x4412d7(0x171)][_0x4412d7(0x15a)](_0x2c47ce,_0x442160,_0x513988,_0x31c29f),{'verbose':_0x5dbd2e['verbose']}),_0x26d9b1=_0x375a98[_0x4412d7(0x16a)],_0x5023fb=_0x26d9b1['data'];return _0x5023fb[_0x4412d7(0x14c)]===0x0?console[_0x4412d7(0x169)](_0x4412d7(0x166)):console[_0x4412d7(0x169)](_0x4412d7(0x165)+_0x5023fb[_0x4412d7(0x14c)]+_0x4412d7(0x158)+(_0x5023fb[_0x4412d7(0x14c)]!==0x1?'s':'')+_0x4412d7(0x153)+_0x1b51bf),await handleSDKOutput(_0x5023fb,_0x5dbd2e),0x0;}catch(_0x261038){if(_0x261038 instanceof SDKError)return console[_0x4412d7(0x169)](_0x4412d7(0x159)+_0x261038[_0x4412d7(0x160)]),_0x261038[_0x4412d7(0x179)]&&console[_0x4412d7(0x169)]('\x20\x20Cause:\x20'+_0x261038['cause']),0x1;throw _0x261038;}}[a30_0x2c772e(0x177)](_0x1aea8d){const _0x21be79=a30_0x2c772e;if(_0x1aea8d[_0x21be79(0x152)][_0x21be79(0x14c)]===0x0)return _0x21be79(0x16b);if(_0x1aea8d[_0x21be79(0x152)][_0x21be79(0x14c)]>0x1)return _0x21be79(0x154);return undefined;}}
@@ -1 +1 @@
1
- function a31_0x14e2(){const _0x28b904=['Table\x20pattern:\x20','List\x20tables\x20in\x20a\x20database','list','verbose','737944Qwubkk','site','Database\x20pattern:\x20','3036544XnGesU','error','\x20\x20tdx\x20tables\x20\x22mydb.users\x22\x20\x20\x20\x20->\x20table\x20\x22users\x22\x20in\x20database\x20mydb','message','\x20\x20tdx\x20tables\x20--in\x20mydb\x20\x20\x20\x20\x20\x20\x20->\x20all\x20tables\x20from\x20mydb','\x20\x20Cause:\x20','\x20\x20tdx\x20tables\x20\x22*.user*\x22\x20\x20\x20\x20\x20\x20\x20->\x20tables\x20matching\x20user*\x20across\x20databases','510129vuKBvK','26fAZCVJ','2179700yofsgr','Error:\x20Too\x20many\x20arguments.\x20Use\x20single\x20argument:','\x20\x20Use:\x20tdx\x20tables\x20\x22','5265090QLYCvY','\x20\x20tdx\x20tables\x20users\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20->\x20table\x20\x22users\x22\x20across\x20all\x20databases','Database\x20\x27','description','Listing\x20tables...','Note:\x20\x27','\x20table','execute','\x20\x20Or:\x20\x20tdx\x20tables\x20--database\x20','database','table','\x27\x20is\x20ambiguous.','1200318jhBKmQ','8gjQAkS','includes','\x20\x20tdx\x20tables\x20\x22mydb.*\x22\x20\x20\x20\x20\x20\x20\x20\x20->\x20all\x20tables\x20from\x20mydb','length','Error:\x20Pattern\x20\x27','\x27\x20may\x20not\x20exist\x20or\x20contains\x20no\x20tables','42017YuedDR','cause','name','data','Database:\x20all','36MRUKbf','validate','tables','✖\x20No\x20tables\x20found','Error:\x20'];a31_0x14e2=function(){return _0x28b904;};return a31_0x14e2();}const a31_0x2cad47=a31_0x199f;(function(_0x46bca6,_0x1a05dd){const _0x1a5212=a31_0x199f,_0xaec3cf=_0x46bca6();while(!![]){try{const _0x1c6a11=parseInt(_0x1a5212(0x204))/0x1*(parseInt(_0x1a5212(0x1ed))/0x2)+-parseInt(_0x1a5212(0x1ec))/0x3*(-parseInt(_0x1a5212(0x1fe))/0x4)+parseInt(_0x1a5212(0x1ee))/0x5+-parseInt(_0x1a5212(0x1fd))/0x6+-parseInt(_0x1a5212(0x1e5))/0x7+-parseInt(_0x1a5212(0x1e2))/0x8*(-parseInt(_0x1a5212(0x209))/0x9)+-parseInt(_0x1a5212(0x1f1))/0xa;if(_0x1c6a11===_0x1a05dd)break;else _0xaec3cf['push'](_0xaec3cf['shift']());}catch(_0x3fe4e1){_0xaec3cf['push'](_0xaec3cf['shift']());}}}(a31_0x14e2,0x819b1));import{BaseCommand}from'./command.js';function a31_0x199f(_0x56169a,_0x5504e3){const _0x14e256=a31_0x14e2();return a31_0x199f=function(_0x199f7d,_0x5d0693){_0x199f7d=_0x199f7d-0x1e1;let _0xb142ec=_0x14e256[_0x199f7d];return _0xb142ec;},a31_0x199f(_0x56169a,_0x5504e3);}import{SDKError}from'../sdk/index.js';import{handleSDKOutput}from'../utils/command-output.js';import{parseTableReference}from'../utils/table-ref-parser.js';import{DEFAULT_LISTING_LIMIT,resolveLimit}from'../utils/constants.js';import{withSpinner}from'../utils/spinner.js';export class TablesCommand extends BaseCommand{[a31_0x2cad47(0x206)]=a31_0x2cad47(0x20b);[a31_0x2cad47(0x1f4)]=a31_0x2cad47(0x20f);async[a31_0x2cad47(0x1f8)](_0x29c760){const _0x39bc29=a31_0x2cad47,{options:_0x6c48ff,args:_0x544aa7,tdx:_0x2fe04c}=_0x29c760;let _0x289ed4;if(_0x544aa7[_0x39bc29(0x201)]===0x0)_0x289ed4={'database':undefined,'table':undefined,'original':''};else{if(_0x544aa7[_0x39bc29(0x201)]===0x1)try{_0x289ed4=parseTableReference(_0x544aa7[0x0]);if(_0x289ed4[_0x39bc29(0x1fb)]&&!_0x289ed4[_0x39bc29(0x1fa)]&&!_0x289ed4[_0x39bc29(0x1fb)]['includes']('*')&&!_0x289ed4[_0x39bc29(0x1fb)][_0x39bc29(0x1ff)]('?'))return console[_0x39bc29(0x1e6)](_0x39bc29(0x202)+_0x544aa7[0x0]+_0x39bc29(0x1fc)),console[_0x39bc29(0x1e6)]('Did\x20you\x20mean\x20to\x20list\x20all\x20tables\x20from\x20database\x20\x27'+_0x289ed4['table']+'\x27?'),console[_0x39bc29(0x1e6)](_0x39bc29(0x1f0)+_0x289ed4[_0x39bc29(0x1fb)]+'.*\x22'),console[_0x39bc29(0x1e6)]('\x20\x20Or:\x20\x20tdx\x20tables\x20--in\x20'+_0x289ed4[_0x39bc29(0x1fb)]),console[_0x39bc29(0x1e6)](_0x39bc29(0x1f9)+_0x289ed4[_0x39bc29(0x1fb)]),console[_0x39bc29(0x1e6)](''),console['error'](_0x39bc29(0x1f6)+_0x544aa7[0x0]+'\x27\x20without\x20wildcards\x20would\x20search\x20for\x20tables\x20named\x20\x27'+_0x289ed4[_0x39bc29(0x1fb)]+'\x27\x20across\x20all\x20databases.'),0x1;}catch(_0x11b16e){return console[_0x39bc29(0x1e6)](_0x39bc29(0x20d)+_0x11b16e[_0x39bc29(0x1e8)]),0x1;}else return console[_0x39bc29(0x1e6)](_0x39bc29(0x1ef)),console[_0x39bc29(0x1e6)](_0x39bc29(0x1f2)),console[_0x39bc29(0x1e6)](_0x39bc29(0x200)),console['error'](_0x39bc29(0x1e7)),console[_0x39bc29(0x1e6)](_0x39bc29(0x1eb)),console[_0x39bc29(0x1e6)]('Or\x20use\x20--in\x20flag:'),console[_0x39bc29(0x1e6)](_0x39bc29(0x1e9)),0x1;}const _0x51d610=_0x6c48ff[_0x39bc29(0x1fa)];!_0x289ed4[_0x39bc29(0x1fa)]&&_0x51d610&&(_0x289ed4[_0x39bc29(0x1fa)]=_0x51d610);try{const _0x4b7acc=_0x5e55d8=>_0x5e55d8&&(_0x5e55d8[_0x39bc29(0x1ff)]('*')||_0x5e55d8[_0x39bc29(0x1ff)]('?')),_0x5bf206=_0x4b7acc(_0x289ed4[_0x39bc29(0x1fa)]);_0x6c48ff[_0x39bc29(0x1e1)]&&(console[_0x39bc29(0x1e6)]('Site:\x20'+_0x6c48ff[_0x39bc29(0x1e3)]),_0x289ed4['database']?_0x5bf206?console[_0x39bc29(0x1e6)](_0x39bc29(0x1e4)+_0x289ed4[_0x39bc29(0x1fa)]):console[_0x39bc29(0x1e6)]('Database:\x20'+_0x289ed4[_0x39bc29(0x1fa)]):console[_0x39bc29(0x1e6)](_0x39bc29(0x208)),_0x289ed4[_0x39bc29(0x1fb)]&&console[_0x39bc29(0x1e6)](_0x39bc29(0x20e)+_0x289ed4['table']));const _0x33c5c9=_0x289ed4[_0x39bc29(0x1fa)]&&!_0x5bf206?_0x289ed4[_0x39bc29(0x1fa)]:undefined,_0x175634=_0x5bf206?_0x289ed4[_0x39bc29(0x1fa)]:undefined,_0x5b424a=_0x289ed4[_0x39bc29(0x1fb)],_0xaf96f4=resolveLimit(_0x6c48ff['limit'],DEFAULT_LISTING_LIMIT),_0x2487ca=await withSpinner(_0x39bc29(0x1f5),()=>_0x2fe04c[_0x39bc29(0x1fb)][_0x39bc29(0x210)](_0x33c5c9,_0x5b424a,_0x175634,_0xaf96f4),{'verbose':_0x6c48ff['verbose']}),_0x24ab31=_0x2487ca[_0x39bc29(0x207)];if(_0x24ab31[_0x39bc29(0x201)]===0x0&&_0x289ed4[_0x39bc29(0x1fa)]&&!_0x5bf206)return console[_0x39bc29(0x1e6)](_0x39bc29(0x20c)),console[_0x39bc29(0x1e6)](_0x39bc29(0x1f3)+_0x289ed4[_0x39bc29(0x1fa)]+_0x39bc29(0x203)),0x1;return console['error']('✔\x20Found\x20'+_0x24ab31[_0x39bc29(0x201)]+_0x39bc29(0x1f7)+(_0x24ab31[_0x39bc29(0x201)]!==0x1?'s':'')),await handleSDKOutput(_0x24ab31,{..._0x6c48ff,'limit':_0xaf96f4}),0x0;}catch(_0x847bf4){if(_0x847bf4 instanceof SDKError)return console[_0x39bc29(0x1e6)](_0x39bc29(0x20d)+_0x847bf4[_0x39bc29(0x1e8)]),_0x847bf4['cause']&&console['error'](_0x39bc29(0x1ea)+_0x847bf4[_0x39bc29(0x205)]),0x1;throw _0x847bf4;}}[a31_0x2cad47(0x20a)](_0x38b65e){return undefined;}}
1
+ const a31_0xc87ab9=a31_0x18ca;(function(_0x7dac08,_0x4f034a){const _0x239c57=a31_0x18ca,_0x57a439=_0x7dac08();while(!![]){try{const _0x514d30=-parseInt(_0x239c57(0xab))/0x1*(-parseInt(_0x239c57(0x9e))/0x2)+-parseInt(_0x239c57(0xb0))/0x3+-parseInt(_0x239c57(0xba))/0x4+parseInt(_0x239c57(0xb3))/0x5*(-parseInt(_0x239c57(0xa6))/0x6)+-parseInt(_0x239c57(0xc2))/0x7*(parseInt(_0x239c57(0xbd))/0x8)+-parseInt(_0x239c57(0xa4))/0x9+parseInt(_0x239c57(0xad))/0xa;if(_0x514d30===_0x4f034a)break;else _0x57a439['push'](_0x57a439['shift']());}catch(_0x5732fa){_0x57a439['push'](_0x57a439['shift']());}}}(a31_0x4035,0xd697d));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleSDKOutput}from'../utils/command-output.js';function a31_0x4035(){const _0x45b6c0=['\x20\x20Or:\x20\x20tdx\x20tables\x20--database\x20','database','7QbplNj','\x20\x20Cause:\x20','✔\x20Found\x20','\x20\x20tdx\x20tables\x20users\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20->\x20table\x20\x22users\x22\x20across\x20all\x20databases','message','list','.*\x22','includes','89288oaCacG','\x27\x20is\x20ambiguous.','length','\x20\x20tdx\x20tables\x20--in\x20mydb\x20\x20\x20\x20\x20\x20\x20->\x20all\x20tables\x20from\x20mydb','\x27\x20may\x20not\x20exist\x20or\x20contains\x20no\x20tables','Site:\x20','4429179GewoiQ','\x20table','6XudcZB','Note:\x20\x27','Did\x20you\x20mean\x20to\x20list\x20all\x20tables\x20from\x20database\x20\x27','\x20\x20Or:\x20\x20tdx\x20tables\x20--in\x20','error','35mBNaEY','\x27\x20across\x20all\x20databases.','24801920qgBttB','validate','site','152871ggaKsp','Error:\x20','Or\x20use\x20--in\x20flag:','7500405WrPTOa','verbose','description','Listing\x20tables...','cause','\x20\x20tdx\x20tables\x20\x22mydb.*\x22\x20\x20\x20\x20\x20\x20\x20\x20->\x20all\x20tables\x20from\x20mydb','tables','3127612SAStjL','table','Database:\x20all','2709496oedMNg','\x20\x20tdx\x20tables\x20\x22mydb.users\x22\x20\x20\x20\x20->\x20table\x20\x22users\x22\x20in\x20database\x20mydb','\x27\x20without\x20wildcards\x20would\x20search\x20for\x20tables\x20named\x20\x27'];a31_0x4035=function(){return _0x45b6c0;};return a31_0x4035();}function a31_0x18ca(_0x5034f2,_0x26f1b6){const _0x40354e=a31_0x4035();return a31_0x18ca=function(_0x18ca48,_0xfc8013){_0x18ca48=_0x18ca48-0x98;let _0x5ad09d=_0x40354e[_0x18ca48];return _0x5ad09d;},a31_0x18ca(_0x5034f2,_0x26f1b6);}import{parseTableReference}from'../utils/table-ref-parser.js';import{DEFAULT_LISTING_LIMIT,resolveLimit}from'../utils/constants.js';import{withSpinner}from'../utils/spinner.js';export class TablesCommand extends BaseCommand{['name']=a31_0xc87ab9(0xb9);[a31_0xc87ab9(0xb5)]='List\x20tables\x20in\x20a\x20database';async['execute'](_0xbca6ba){const _0x30b9ef=a31_0xc87ab9,{options:_0x1a1965,args:_0x1f7859,tdx:_0x162080}=_0xbca6ba;let _0x3610b8;if(_0x1f7859[_0x30b9ef(0xa0)]===0x0)_0x3610b8={'database':undefined,'table':undefined,'original':''};else{if(_0x1f7859[_0x30b9ef(0xa0)]===0x1)try{_0x3610b8=parseTableReference(_0x1f7859[0x0]);if(_0x3610b8[_0x30b9ef(0xbb)]&&!_0x3610b8[_0x30b9ef(0xc1)]&&!_0x3610b8[_0x30b9ef(0xbb)][_0x30b9ef(0x9d)]('*')&&!_0x3610b8[_0x30b9ef(0xbb)][_0x30b9ef(0x9d)]('?'))return console['error']('Error:\x20Pattern\x20\x27'+_0x1f7859[0x0]+_0x30b9ef(0x9f)),console[_0x30b9ef(0xaa)](_0x30b9ef(0xa8)+_0x3610b8[_0x30b9ef(0xbb)]+'\x27?'),console[_0x30b9ef(0xaa)]('\x20\x20Use:\x20tdx\x20tables\x20\x22'+_0x3610b8[_0x30b9ef(0xbb)]+_0x30b9ef(0x9c)),console['error'](_0x30b9ef(0xa9)+_0x3610b8[_0x30b9ef(0xbb)]),console[_0x30b9ef(0xaa)](_0x30b9ef(0xc0)+_0x3610b8[_0x30b9ef(0xbb)]),console[_0x30b9ef(0xaa)](''),console['error'](_0x30b9ef(0xa7)+_0x1f7859[0x0]+_0x30b9ef(0xbf)+_0x3610b8['table']+_0x30b9ef(0xac)),0x1;}catch(_0x23ef03){return console['error']('Error:\x20'+_0x23ef03[_0x30b9ef(0x9a)]),0x1;}else return console['error']('Error:\x20Too\x20many\x20arguments.\x20Use\x20single\x20argument:'),console[_0x30b9ef(0xaa)](_0x30b9ef(0x99)),console['error'](_0x30b9ef(0xb8)),console[_0x30b9ef(0xaa)](_0x30b9ef(0xbe)),console['error']('\x20\x20tdx\x20tables\x20\x22*.user*\x22\x20\x20\x20\x20\x20\x20\x20->\x20tables\x20matching\x20user*\x20across\x20databases'),console[_0x30b9ef(0xaa)](_0x30b9ef(0xb2)),console[_0x30b9ef(0xaa)](_0x30b9ef(0xa1)),0x1;}const _0x242e08=_0x1a1965[_0x30b9ef(0xc1)];!_0x3610b8['database']&&_0x242e08&&(_0x3610b8[_0x30b9ef(0xc1)]=_0x242e08);try{const _0x33562d=_0x42ffe5=>_0x42ffe5&&(_0x42ffe5[_0x30b9ef(0x9d)]('*')||_0x42ffe5[_0x30b9ef(0x9d)]('?')),_0x45799c=_0x33562d(_0x3610b8[_0x30b9ef(0xc1)]);_0x1a1965['verbose']&&(console[_0x30b9ef(0xaa)](_0x30b9ef(0xa3)+_0x1a1965[_0x30b9ef(0xaf)]),_0x3610b8[_0x30b9ef(0xc1)]?_0x45799c?console[_0x30b9ef(0xaa)]('Database\x20pattern:\x20'+_0x3610b8['database']):console[_0x30b9ef(0xaa)]('Database:\x20'+_0x3610b8[_0x30b9ef(0xc1)]):console['error'](_0x30b9ef(0xbc)),_0x3610b8[_0x30b9ef(0xbb)]&&console[_0x30b9ef(0xaa)]('Table\x20pattern:\x20'+_0x3610b8[_0x30b9ef(0xbb)]));const _0x2887a8=_0x3610b8[_0x30b9ef(0xc1)]&&!_0x45799c?_0x3610b8[_0x30b9ef(0xc1)]:undefined,_0x5d5a32=_0x45799c?_0x3610b8['database']:undefined,_0x30c13a=_0x3610b8[_0x30b9ef(0xbb)],_0x222822=resolveLimit(_0x1a1965['limit'],DEFAULT_LISTING_LIMIT),_0x599c2c=await withSpinner(_0x30b9ef(0xb6),()=>_0x162080[_0x30b9ef(0xbb)][_0x30b9ef(0x9b)](_0x2887a8,_0x30c13a,_0x5d5a32,_0x222822),{'verbose':_0x1a1965[_0x30b9ef(0xb4)]}),_0x216268=_0x599c2c['data'];if(_0x216268[_0x30b9ef(0xa0)]===0x0&&_0x3610b8[_0x30b9ef(0xc1)]&&!_0x45799c)return console[_0x30b9ef(0xaa)]('✖\x20No\x20tables\x20found'),console[_0x30b9ef(0xaa)]('Database\x20\x27'+_0x3610b8[_0x30b9ef(0xc1)]+_0x30b9ef(0xa2)),0x1;return console['error'](_0x30b9ef(0x98)+_0x216268[_0x30b9ef(0xa0)]+_0x30b9ef(0xa5)+(_0x216268[_0x30b9ef(0xa0)]!==0x1?'s':'')),await handleSDKOutput(_0x216268,{..._0x1a1965,'limit':_0x222822}),0x0;}catch(_0xb7801d){if(_0xb7801d instanceof SDKError)return console[_0x30b9ef(0xaa)](_0x30b9ef(0xb1)+_0xb7801d[_0x30b9ef(0x9a)]),_0xb7801d[_0x30b9ef(0xb7)]&&console[_0x30b9ef(0xaa)](_0x30b9ef(0xc3)+_0xb7801d[_0x30b9ef(0xb7)]),0x1;throw _0xb7801d;}}[a31_0xc87ab9(0xae)](_0x2e67bb){return undefined;}}
@@ -1 +1 @@
1
- const a32_0x20d9f9=a32_0x58f8;(function(_0x4fc340,_0x537cbd){const _0x2df72b=a32_0x58f8,_0x4c1ffe=_0x4fc340();while(!![]){try{const _0x516e0b=parseInt(_0x2df72b(0x1ba))/0x1*(parseInt(_0x2df72b(0x1a9))/0x2)+parseInt(_0x2df72b(0x1bc))/0x3*(-parseInt(_0x2df72b(0x1b7))/0x4)+-parseInt(_0x2df72b(0x1c2))/0x5+-parseInt(_0x2df72b(0x1ad))/0x6+parseInt(_0x2df72b(0x1c4))/0x7*(parseInt(_0x2df72b(0x1b8))/0x8)+parseInt(_0x2df72b(0x1c5))/0x9+parseInt(_0x2df72b(0x1af))/0xa;if(_0x516e0b===_0x537cbd)break;else _0x4c1ffe['push'](_0x4c1ffe['shift']());}catch(_0x4ae72d){_0x4c1ffe['push'](_0x4c1ffe['shift']());}}}(a32_0x5e64,0xc3b7a));function a32_0x58f8(_0x3404ef,_0x5f24d6){const _0x5e648b=a32_0x5e64();return a32_0x58f8=function(_0x58f807,_0x2745e0){_0x58f807=_0x58f807-0x1a5;let _0x56151c=_0x5e648b[_0x58f807];return _0x56151c;},a32_0x58f8(_0x3404ef,_0x5f24d6);}import{BaseCommand}from'./command.js';import{saveSessionContext,getCurrentSessionPID}from'../core/session.js';function a32_0x5e64(){const _0x2fa10e=['1276636USjbBw','\x20(session:\x20','Set\x20session-level\x20context','profile','9005934XpGoXn','toString','19624070CKgtUd','log','Resources:\x20database,\x20parent_segment,\x20llm_project,\x20profile\x0a','Session\x20profile\x20set\x20to:\x20','parent_segment','Invalid\x20resource:\x20','\x0aTip:\x20Use\x20\x27tdx\x20context\x20--clear\x27\x20to\x20clear\x20session\x20overrides','description','618344YXKdoT','1613992BYCKDB','use','1pfIPsN','database','24MxqlJM','Session\x20database\x20set\x20to:\x20','includes','validate','Error:\x20','llm_project','237895ZcFYnJ','session','28jJgDLd','1612737wbNgwq','error','execute','length','\x0aRun\x20\x27tdx\x20use\x20--help\x27\x20for\x20more\x20options','\x27\x20does\x20not\x20exist'];a32_0x5e64=function(){return _0x2fa10e;};return a32_0x5e64();}import{profileExists}from'../core/profile.js';export class UseCommand extends BaseCommand{['name']=a32_0x20d9f9(0x1b9);[a32_0x20d9f9(0x1b6)]=a32_0x20d9f9(0x1ab);[a32_0x20d9f9(0x1bf)](_0x1e0b67){const _0x298d15=a32_0x20d9f9,{args:_0x451551}=_0x1e0b67;if(_0x451551[_0x298d15(0x1a6)]<0x2)return'Usage:\x20tdx\x20use\x20<resource>\x20<value>\x0a'+_0x298d15(0x1b1)+'Or\x20use:\x20tdx\x20context\x20--clear\x20to\x20clear\x20session\x20context\x0a'+_0x298d15(0x1a7);const _0x3cbae7=_0x451551[0x0],_0x55b9fc=[_0x298d15(0x1bb),'parent_segment',_0x298d15(0x1c1),_0x298d15(0x1ac)];if(!_0x55b9fc[_0x298d15(0x1be)](_0x3cbae7))return _0x298d15(0x1b4)+_0x3cbae7+'.\x20Must\x20be\x20one\x20of:\x20'+_0x55b9fc['join'](',\x20');return undefined;}async[a32_0x20d9f9(0x1a5)](_0x14f97a){const _0x129b3b=a32_0x20d9f9,{args:_0x377fe6,options:_0x1ef1f8}=_0x14f97a;try{const _0x483aaf=_0x377fe6[0x0],_0x4f5599=_0x377fe6[0x1];if(_0x483aaf==='profile'){if(!profileExists(_0x4f5599))return console[_0x129b3b(0x1c6)]('Error:\x20Profile\x20\x27'+_0x4f5599+_0x129b3b(0x1a8)),console[_0x129b3b(0x1c6)]('\x0aUse\x20\x27tdx\x20profiles\x27\x20to\x20see\x20available\x20profiles'),0x1;const _0x4de5a6=_0x1ef1f8['session']||getCurrentSessionPID()[_0x129b3b(0x1ae)]();return saveSessionContext({'profile':_0x4f5599},_0x1ef1f8[_0x129b3b(0x1c3)]),console[_0x129b3b(0x1b0)](_0x129b3b(0x1b2)+_0x4f5599+'\x20(session:\x20'+_0x4de5a6+')'),console[_0x129b3b(0x1b0)](_0x129b3b(0x1b5)),0x0;}const _0x1bbc44={},_0x1d73ae=_0x1ef1f8['session']||getCurrentSessionPID()[_0x129b3b(0x1ae)]();switch(_0x483aaf){case'database':_0x1bbc44[_0x129b3b(0x1bb)]=_0x4f5599,console[_0x129b3b(0x1b0)](_0x129b3b(0x1bd)+_0x4f5599+_0x129b3b(0x1aa)+_0x1d73ae+')');break;case'parent_segment':_0x1bbc44[_0x129b3b(0x1b3)]=_0x4f5599,console[_0x129b3b(0x1b0)]('Session\x20parent_segment\x20set\x20to:\x20'+_0x4f5599+_0x129b3b(0x1aa)+_0x1d73ae+')');break;case _0x129b3b(0x1c1):_0x1bbc44['llm_project']=_0x4f5599,console[_0x129b3b(0x1b0)]('Session\x20llm_project\x20set\x20to:\x20'+_0x4f5599+'\x20(session:\x20'+_0x1d73ae+')');break;}return saveSessionContext(_0x1bbc44,_0x1ef1f8[_0x129b3b(0x1c3)]),console['log'](_0x129b3b(0x1b5)),0x0;}catch(_0x408bb3){return _0x408bb3 instanceof Error&&console[_0x129b3b(0x1c6)](_0x129b3b(0x1c0)+_0x408bb3['message']),0x1;}}}
1
+ const a32_0xa86586=a32_0x2721;(function(_0x6392f2,_0x132cc9){const _0x9e83c3=a32_0x2721,_0x135cdd=_0x6392f2();while(!![]){try{const _0x42c8f1=-parseInt(_0x9e83c3(0x15e))/0x1+-parseInt(_0x9e83c3(0x14a))/0x2*(parseInt(_0x9e83c3(0x146))/0x3)+parseInt(_0x9e83c3(0x159))/0x4+parseInt(_0x9e83c3(0x160))/0x5*(-parseInt(_0x9e83c3(0x157))/0x6)+-parseInt(_0x9e83c3(0x14c))/0x7+-parseInt(_0x9e83c3(0x148))/0x8+parseInt(_0x9e83c3(0x15c))/0x9;if(_0x42c8f1===_0x132cc9)break;else _0x135cdd['push'](_0x135cdd['shift']());}catch(_0x161e30){_0x135cdd['push'](_0x135cdd['shift']());}}}(a32_0x5121,0x6bd5e));import{BaseCommand}from'./command.js';import{saveSessionContext,getCurrentSessionPID}from'../core/session.js';function a32_0x5121(){const _0x5d9ec0=['482758wgBpEP','Usage:\x20tdx\x20use\x20<resource>\x20<value>\x0a','91085dMxnqf','includes','description','Session\x20llm_project\x20set\x20to:\x20','\x0aTip:\x20Use\x20\x27tdx\x20context\x20--clear\x27\x20to\x20clear\x20session\x20overrides','message','Session\x20parent_segment\x20set\x20to:\x20','.\x20Must\x20be\x20one\x20of:\x20','\x0aRun\x20\x27tdx\x20use\x20--help\x27\x20for\x20more\x20options','length','Session\x20profile\x20set\x20to:\x20','6381Vwbxum','execute','3727200SrWNca','database','822cKDgBU','join','522179pwYHFg','error','\x20(session:\x20','validate','toString','session','Invalid\x20resource:\x20','profile','name','use','log','138bSbWKU','parent_segment','3321844WxdlXq','llm_project','\x0aUse\x20\x27tdx\x20profiles\x27\x20to\x20see\x20available\x20profiles','17349084qfdshg','Session\x20database\x20set\x20to:\x20'];a32_0x5121=function(){return _0x5d9ec0;};return a32_0x5121();}function a32_0x2721(_0x297606,_0xd2b863){const _0x5121dc=a32_0x5121();return a32_0x2721=function(_0x27214d,_0x348d2e){_0x27214d=_0x27214d-0x13e;let _0x1badcd=_0x5121dc[_0x27214d];return _0x1badcd;},a32_0x2721(_0x297606,_0xd2b863);}import{profileExists}from'../core/profile.js';export class UseCommand extends BaseCommand{[a32_0xa86586(0x154)]=a32_0xa86586(0x155);[a32_0xa86586(0x162)]='Set\x20session-level\x20context';[a32_0xa86586(0x14f)](_0xa61a83){const _0xbfdc6b=a32_0xa86586,{args:_0x45d859}=_0xa61a83;if(_0x45d859[_0xbfdc6b(0x144)]<0x2)return _0xbfdc6b(0x15f)+'Resources:\x20database,\x20parent_segment,\x20llm_project,\x20profile\x0a'+'Or\x20use:\x20tdx\x20context\x20--clear\x20to\x20clear\x20session\x20context\x0a'+_0xbfdc6b(0x143);const _0x31c6a3=_0x45d859[0x0],_0x133430=[_0xbfdc6b(0x149),_0xbfdc6b(0x158),_0xbfdc6b(0x15a),_0xbfdc6b(0x153)];if(!_0x133430[_0xbfdc6b(0x161)](_0x31c6a3))return _0xbfdc6b(0x152)+_0x31c6a3+_0xbfdc6b(0x142)+_0x133430[_0xbfdc6b(0x14b)](',\x20');return undefined;}async[a32_0xa86586(0x147)](_0x127a6a){const _0x1e0c64=a32_0xa86586,{args:_0x506fcb,options:_0x31bf8c}=_0x127a6a;try{const _0x542613=_0x506fcb[0x0],_0x59da47=_0x506fcb[0x1];if(_0x542613===_0x1e0c64(0x153)){if(!profileExists(_0x59da47))return console[_0x1e0c64(0x14d)]('Error:\x20Profile\x20\x27'+_0x59da47+'\x27\x20does\x20not\x20exist'),console['error'](_0x1e0c64(0x15b)),0x1;const _0x5e2360=_0x31bf8c[_0x1e0c64(0x151)]||getCurrentSessionPID()[_0x1e0c64(0x150)]();return saveSessionContext({'profile':_0x59da47},_0x31bf8c[_0x1e0c64(0x151)]),console[_0x1e0c64(0x156)](_0x1e0c64(0x145)+_0x59da47+'\x20(session:\x20'+_0x5e2360+')'),console['log']('\x0aTip:\x20Use\x20\x27tdx\x20context\x20--clear\x27\x20to\x20clear\x20session\x20overrides'),0x0;}const _0x2b6679={},_0x495c8a=_0x31bf8c['session']||getCurrentSessionPID()[_0x1e0c64(0x150)]();switch(_0x542613){case'database':_0x2b6679[_0x1e0c64(0x149)]=_0x59da47,console['log'](_0x1e0c64(0x15d)+_0x59da47+'\x20(session:\x20'+_0x495c8a+')');break;case _0x1e0c64(0x158):_0x2b6679[_0x1e0c64(0x158)]=_0x59da47,console[_0x1e0c64(0x156)](_0x1e0c64(0x141)+_0x59da47+_0x1e0c64(0x14e)+_0x495c8a+')');break;case _0x1e0c64(0x15a):_0x2b6679['llm_project']=_0x59da47,console[_0x1e0c64(0x156)](_0x1e0c64(0x13e)+_0x59da47+_0x1e0c64(0x14e)+_0x495c8a+')');break;}return saveSessionContext(_0x2b6679,_0x31bf8c[_0x1e0c64(0x151)]),console[_0x1e0c64(0x156)](_0x1e0c64(0x13f)),0x0;}catch(_0x31e119){return _0x31e119 instanceof Error&&console[_0x1e0c64(0x14d)]('Error:\x20'+_0x31e119[_0x1e0c64(0x140)]),0x1;}}}
@@ -1 +1 @@
1
- const a33_0x33ac8a=a33_0x4b98;(function(_0x38b005,_0x4898cc){const _0x21104c=a33_0x4b98,_0x4b0e45=_0x38b005();while(!![]){try{const _0x312199=parseInt(_0x21104c(0xd9))/0x1*(-parseInt(_0x21104c(0xc7))/0x2)+parseInt(_0x21104c(0xfb))/0x3+parseInt(_0x21104c(0x94))/0x4*(parseInt(_0x21104c(0xf3))/0x5)+parseInt(_0x21104c(0xc5))/0x6*(-parseInt(_0x21104c(0xd6))/0x7)+parseInt(_0x21104c(0x8d))/0x8*(parseInt(_0x21104c(0xef))/0x9)+-parseInt(_0x21104c(0x95))/0xa*(parseInt(_0x21104c(0x91))/0xb)+parseInt(_0x21104c(0xc2))/0xc*(parseInt(_0x21104c(0xd7))/0xd);if(_0x312199===_0x4898cc)break;else _0x4b0e45['push'](_0x4b0e45['shift']());}catch(_0x22e848){_0x4b0e45['push'](_0x4b0e45['shift']());}}}(a33_0x4fe5,0x88802));import{BaseCommand}from'./command.js';function a33_0x4b98(_0xe7bd9f,_0x1909e9){const _0x4fe52b=a33_0x4fe5();return a33_0x4b98=function(_0x4b9852,_0x5615eb){_0x4b9852=_0x4b9852-0x89;let _0x4e2700=_0x4fe52b[_0x4b9852];return _0x4e2700;},a33_0x4b98(_0xe7bd9f,_0x1909e9);}import{SDKError}from'../sdk/index.js';import{handleSDKOutput}from'../utils/command-output.js';import{withSpinner}from'../utils/spinner.js';function a33_0x4fe5(){const _0x25cd5b=['\x20attempt','attempt:','✔\x20Pushed\x20','Include\x20retried:\x20yes','params','Usage:\x20workflow\x20retry\x20session:<id>\x20or\x20workflow\x20retry\x20attempt:<id>','35703qXsDQA','cause','Error:\x20Attempt\x20ID\x20and\x20task\x20name\x20are\x20required','Listing\x20workflows...','568025ZNmtpy','yes','Output\x20directory:\x20','revision','Project\x20directory:\x20','substring','Error:\x20Project\x20name\x20or\x20ID\x20is\x20required','Delete\x20workflow\x20project\x20from\x20Treasure\x20Data','1846563JzKWII','limit','Getting\x20task\x20logs...','execute','✔\x20Deleted\x20project\x20','\x20workflow','\x20\x20Project\x20ID:\x20','message','Target:\x20','Deleting\x20project\x20','Project\x20name:\x20','Error:\x20Session\x20ID\x20or\x20attempt\x20ID\x20is\x20required','workflow:push','Show\x20logs\x20for\x20a\x20specific\x20task','Filter:\x20project=','includeRetried','projectId','startsWith','Listing\x20workflow\x20attempts...','workflow:kill','1136YxmhAQ','Error:\x20Invalid\x20pattern.\x20Use\x20format:\x20project\x20or\x20project.workflow','Killing\x20attempt...','\x20log\x20entr','8481BQeuas','\x20\x20Files\x20extracted:\x20','workflow:workflows','20DxsvXX','11820EQhquB','\x20is\x20not\x20a\x20directory','Pattern:\x20','Project:\x20','workflow','includeSubtasks','sessions','filesExtracted','ies','\x20task','Getting\x20attempt\x20tasks...','resumeFrom','Filter:\x20','...','Cancelled','from','isDirectory','Show\x20specific\x20attempt\x20details','workflow:download','status','Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20project\x20\x22','parse','error','readFile','Error:\x20','✔\x20Found\x20','reason','List\x20workflow\x20attempts','force','Listing\x20workflow\x20sessions...','\x20session','stat','tasks','push','workflow:delete','workflow:attempt','Push\x20workflow\x20project\x20to\x20Treasure\x20Data','Pushing\x20workflow\x20project...','\x20\x20Cause:\x20','session:','Resume\x20from:\x20','\x20\x20Location:\x20','attemptId','workflow:sessions','✔\x20Downloaded\x20','1164baoCYB','verbose','length','170412bPgbQx','Show\x20tasks\x20for\x20an\x20attempt','2GeQwus','Retrying\x20session...','description','Error:\x20Project\x20name\x20is\x20required','\x20project','skipValidation','Are\x20you\x20sure\x20you\x20want\x20to\x20retry\x20','Usage:\x20workflow:download\x20<project-name>\x20[output-dir]','name','kill','Attempt\x20ID:\x20','fromTask','Kill\x20a\x20running\x20attempt','projects','List\x20workflows','231HWgLdL','219973EUUBBl','✔\x20Retry\x20started','980503ZKqzpQ','session','List\x20workflow\x20execution\x20sessions','offset','projectName','Reason:\x20','attempts','attempt','Listing\x20workflow\x20projects...','retrySession','split','Error:\x20Attempt\x20ID\x20is\x20required','Status:\x20','data','Revision:\x20','workflows'];a33_0x4fe5=function(){return _0x25cd5b;};return a33_0x4fe5();}import{confirm}from'../utils/prompt.js';export class WorkflowProjectsCommand extends BaseCommand{[a33_0x33ac8a(0xcf)]='workflow:projects';['description']='List\x20all\x20workflow\x20projects';async['execute'](_0x1adecf){const _0x46cb1=a33_0x33ac8a,{options:_0x569ff6,args:_0x5c748c,tdx:_0x5a4fde}=_0x1adecf,_0x2f34eb=_0x5c748c[0x0];try{_0x569ff6[_0x46cb1(0xc3)]&&_0x2f34eb&&console[_0x46cb1(0xab)](_0x46cb1(0x97)+_0x2f34eb);const _0x5aa265=await withSpinner(_0x46cb1(0xe1),()=>_0x5a4fde[_0x46cb1(0x99)][_0x46cb1(0xd4)](_0x2f34eb,{'limit':_0x569ff6[_0x46cb1(0xfc)]}),{'verbose':_0x569ff6[_0x46cb1(0xc3)]}),_0x40dd7e=_0x5aa265[_0x46cb1(0xe6)];return console[_0x46cb1(0xab)]('✔\x20Found\x20'+_0x40dd7e[_0x46cb1(0xc4)]+_0x46cb1(0xcb)+(_0x40dd7e[_0x46cb1(0xc4)]!==0x1?'s':'')),await handleSDKOutput(_0x40dd7e,_0x569ff6),0x0;}catch(_0x131388){if(_0x131388 instanceof SDKError)return console[_0x46cb1(0xab)](_0x46cb1(0xad)+_0x131388[_0x46cb1(0x102)]),_0x131388[_0x46cb1(0xf0)]&&console[_0x46cb1(0xab)]('\x20\x20Cause:\x20'+_0x131388[_0x46cb1(0xf0)]),0x1;throw _0x131388;}}}export class WorkflowWorkflowsCommand extends BaseCommand{[a33_0x33ac8a(0xcf)]=a33_0x33ac8a(0x93);[a33_0x33ac8a(0xc9)]=a33_0x33ac8a(0xd5);async[a33_0x33ac8a(0xfe)](_0x5b8918){const _0x1b42c2=a33_0x33ac8a,{options:_0xf2d4b2,args:_0x52c714,tdx:_0x3660d9}=_0x5b8918,_0x5ceb73=_0x52c714[0x0];try{_0xf2d4b2[_0x1b42c2(0xc3)]&&_0x5ceb73&&console['error']('Project\x20filter:\x20'+_0x5ceb73);const _0x2855b1=await withSpinner(_0x1b42c2(0xf2),()=>_0x3660d9[_0x1b42c2(0x99)][_0x1b42c2(0xe8)](_0x5ceb73,{'limit':_0xf2d4b2[_0x1b42c2(0xfc)]}),{'verbose':_0xf2d4b2[_0x1b42c2(0xc3)]}),_0x3c812c=_0x2855b1[_0x1b42c2(0xe6)];return console['error'](_0x1b42c2(0xae)+_0x3c812c[_0x1b42c2(0xc4)]+_0x1b42c2(0x100)+(_0x3c812c[_0x1b42c2(0xc4)]!==0x1?'s':'')),await handleSDKOutput(_0x3c812c,_0xf2d4b2),0x0;}catch(_0x172dd0){if(_0x172dd0 instanceof SDKError)return console[_0x1b42c2(0xab)](_0x1b42c2(0xad)+_0x172dd0[_0x1b42c2(0x102)]),_0x172dd0[_0x1b42c2(0xf0)]&&console['error']('\x20\x20Cause:\x20'+_0x172dd0[_0x1b42c2(0xf0)]),0x1;throw _0x172dd0;}}}export class WorkflowSessionsCommand extends BaseCommand{[a33_0x33ac8a(0xcf)]=a33_0x33ac8a(0xc0);[a33_0x33ac8a(0xc9)]=a33_0x33ac8a(0xdb);async[a33_0x33ac8a(0xfe)](_0x41816a){const _0x22a7ee=a33_0x33ac8a,{options:_0xfc0c34,args:_0x41619c,tdx:_0x1407ff}=_0x41816a;let _0x1301fb,_0x520f7a;if(_0x41619c[0x0]){const _0x1af54f=_0x41619c[0x0][_0x22a7ee(0xe3)]('.');if(_0x1af54f[_0x22a7ee(0xc4)]===0x1)_0x1301fb=_0x1af54f[0x0];else{if(_0x1af54f['length']===0x2)[_0x1301fb,_0x520f7a]=_0x1af54f;else return console['error'](_0x22a7ee(0x8e)),0x1;}}try{if(_0xfc0c34['verbose']){if(_0x1301fb&&_0x520f7a)console[_0x22a7ee(0xab)](_0x22a7ee(0xa1)+_0x1301fb+'.'+_0x520f7a);else _0x1301fb&&console[_0x22a7ee(0xab)](_0x22a7ee(0x109)+_0x1301fb);const _0x535381=_0xfc0c34[_0x22a7ee(0xa8)];_0x535381&&console[_0x22a7ee(0xab)](_0x22a7ee(0xe5)+_0x535381);}const _0x5344bb=await withSpinner(_0x22a7ee(0xb2),()=>_0x1407ff[_0x22a7ee(0x99)][_0x22a7ee(0x9b)]({'projectName':_0x1301fb,'workflowName':_0x520f7a,'status':_0xfc0c34['status'],'fromTime':_0xfc0c34[_0x22a7ee(0xa4)],'toTime':_0xfc0c34['to'],'limit':_0xfc0c34[_0x22a7ee(0xfc)]}),{'verbose':_0xfc0c34[_0x22a7ee(0xc3)]}),_0x57ffed=_0x5344bb[_0x22a7ee(0xe6)];return console[_0x22a7ee(0xab)](_0x22a7ee(0xae)+_0x57ffed[_0x22a7ee(0xc4)]+_0x22a7ee(0xb3)+(_0x57ffed[_0x22a7ee(0xc4)]!==0x1?'s':'')),await handleSDKOutput(_0x57ffed,_0xfc0c34),0x0;}catch(_0x10a170){if(_0x10a170 instanceof SDKError)return console[_0x22a7ee(0xab)](_0x22a7ee(0xad)+_0x10a170[_0x22a7ee(0x102)]),_0x10a170[_0x22a7ee(0xf0)]&&console[_0x22a7ee(0xab)]('\x20\x20Cause:\x20'+_0x10a170['cause']),0x1;throw _0x10a170;}}}export class WorkflowAttemptsCommand extends BaseCommand{['name']='workflow:attempts';[a33_0x33ac8a(0xc9)]=a33_0x33ac8a(0xb0);async[a33_0x33ac8a(0xfe)](_0x525982){const _0x45a660=a33_0x33ac8a,{options:_0x1674a9,args:_0x2fcc4c,tdx:_0x56e67c}=_0x525982;let _0x556115,_0x364d28;if(_0x2fcc4c[0x0]){const _0x266718=_0x2fcc4c[0x0][_0x45a660(0xe3)]('.');if(_0x266718['length']===0x1)_0x556115=_0x266718[0x0];else{if(_0x266718[_0x45a660(0xc4)]===0x2)[_0x556115,_0x364d28]=_0x266718;else return console[_0x45a660(0xab)]('Error:\x20Invalid\x20pattern.\x20Use\x20format:\x20project\x20or\x20project.workflow'),0x1;}}try{const _0x1a18f7=_0x1674a9[_0x45a660(0x10a)];if(_0x1674a9[_0x45a660(0xc3)]){if(_0x556115&&_0x364d28)console['error'](_0x45a660(0xa1)+_0x556115+'.'+_0x364d28);else _0x556115&&console[_0x45a660(0xab)](_0x45a660(0x109)+_0x556115);_0x1a18f7&&console[_0x45a660(0xab)](_0x45a660(0xec));}const _0x1fb1c5=await withSpinner(_0x45a660(0x8b),()=>_0x56e67c[_0x45a660(0x99)][_0x45a660(0xdf)]({'projectName':_0x556115,'workflowName':_0x364d28,'includeRetried':_0x1a18f7,'limit':_0x1674a9[_0x45a660(0xfc)]}),{'verbose':_0x1674a9['verbose']}),_0x240e52=_0x1fb1c5[_0x45a660(0xe6)];return console[_0x45a660(0xab)](_0x45a660(0xae)+_0x240e52[_0x45a660(0xc4)]+_0x45a660(0xe9)+(_0x240e52['length']!==0x1?'s':'')),await handleSDKOutput(_0x240e52,_0x1674a9),0x0;}catch(_0x48ccba){if(_0x48ccba instanceof SDKError)return console[_0x45a660(0xab)]('Error:\x20'+_0x48ccba[_0x45a660(0x102)]),_0x48ccba[_0x45a660(0xf0)]&&console['error'](_0x45a660(0xbb)+_0x48ccba['cause']),0x1;throw _0x48ccba;}}}export class WorkflowAttemptCommand extends BaseCommand{[a33_0x33ac8a(0xcf)]=a33_0x33ac8a(0xb8);[a33_0x33ac8a(0xc9)]=a33_0x33ac8a(0xa6);async[a33_0x33ac8a(0xfe)](_0x462294){const _0x4be2e9=a33_0x33ac8a,{options:_0x52c75e,args:_0xf3718c,tdx:_0x5725ee}=_0x462294,_0x5a5ee1=_0xf3718c[0x0];if(!_0x5a5ee1)return console[_0x4be2e9(0xab)](_0x4be2e9(0xe4)),0x1;try{_0x52c75e['verbose']&&console[_0x4be2e9(0xab)](_0x4be2e9(0xd1)+_0x5a5ee1);const _0x58476e=await withSpinner('Getting\x20attempt\x20details...',()=>_0x5725ee[_0x4be2e9(0x99)][_0x4be2e9(0xe0)](_0x5a5ee1),{'verbose':_0x52c75e['verbose']}),_0x20734c=_0x58476e['data'];return await handleSDKOutput([_0x20734c],_0x52c75e),0x0;}catch(_0x83aaa){if(_0x83aaa instanceof SDKError)return console[_0x4be2e9(0xab)]('Error:\x20'+_0x83aaa[_0x4be2e9(0x102)]),_0x83aaa[_0x4be2e9(0xf0)]&&console[_0x4be2e9(0xab)](_0x4be2e9(0xbb)+_0x83aaa[_0x4be2e9(0xf0)]),0x1;throw _0x83aaa;}}}export class WorkflowTasksCommand extends BaseCommand{[a33_0x33ac8a(0xcf)]='workflow:tasks';['description']=a33_0x33ac8a(0xc6);async[a33_0x33ac8a(0xfe)](_0x374ee4){const _0xdeb3e5=a33_0x33ac8a,{options:_0x305bf3,args:_0x2d969e,tdx:_0x1ea5a9}=_0x374ee4,_0x21f7a2=_0x2d969e[0x0];if(!_0x21f7a2)return console['error']('Error:\x20Attempt\x20ID\x20is\x20required'),0x1;try{const _0x3845ce=_0x305bf3[_0xdeb3e5(0x9a)];_0x305bf3[_0xdeb3e5(0xc3)]&&(console[_0xdeb3e5(0xab)]('Attempt\x20ID:\x20'+_0x21f7a2),_0x3845ce&&console[_0xdeb3e5(0xab)]('Including\x20subtasks:\x20yes'));const _0x534a19=await withSpinner(_0xdeb3e5(0x9f),()=>_0x1ea5a9[_0xdeb3e5(0x99)][_0xdeb3e5(0xb5)](_0x21f7a2,_0x3845ce||![]),{'verbose':_0x305bf3[_0xdeb3e5(0xc3)]}),_0x3fb5fc=_0x534a19[_0xdeb3e5(0xe6)];return console[_0xdeb3e5(0xab)](_0xdeb3e5(0xae)+_0x3fb5fc[_0xdeb3e5(0xc4)]+_0xdeb3e5(0x9e)+(_0x3fb5fc[_0xdeb3e5(0xc4)]!==0x1?'s':'')),await handleSDKOutput(_0x3fb5fc,_0x305bf3),0x0;}catch(_0x32baba){if(_0x32baba instanceof SDKError)return console[_0xdeb3e5(0xab)]('Error:\x20'+_0x32baba[_0xdeb3e5(0x102)]),_0x32baba[_0xdeb3e5(0xf0)]&&console['error'](_0xdeb3e5(0xbb)+_0x32baba['cause']),0x1;throw _0x32baba;}}}export class WorkflowLogsCommand extends BaseCommand{['name']='workflow:logs';[a33_0x33ac8a(0xc9)]=a33_0x33ac8a(0x108);async[a33_0x33ac8a(0xfe)](_0x566e79){const _0x52bba7=a33_0x33ac8a,{options:_0x5b52a4,args:_0x4c8db7,tdx:_0x1dd4e2}=_0x566e79,_0x198193=_0x4c8db7[0x0],_0x5ee90d=_0x4c8db7[0x1];if(!_0x198193||!_0x5ee90d)return console[_0x52bba7(0xab)](_0x52bba7(0xf1)),0x1;try{_0x5b52a4['verbose']&&(console[_0x52bba7(0xab)](_0x52bba7(0xd1)+_0x198193),console[_0x52bba7(0xab)]('Task\x20name:\x20'+_0x5ee90d));const _0x4ba80a=_0x5b52a4[_0x52bba7(0xdc)],_0x4c4c8d=await withSpinner(_0x52bba7(0xfd),()=>_0x1dd4e2[_0x52bba7(0x99)]['logs'](_0x198193,_0x5ee90d,{'offset':_0x4ba80a,'limit':_0x5b52a4[_0x52bba7(0xfc)]}),{'verbose':_0x5b52a4[_0x52bba7(0xc3)]}),_0x25699a=_0x4c4c8d[_0x52bba7(0xe6)];return console['error']('✔\x20Found\x20'+_0x25699a[_0x52bba7(0xc4)]+_0x52bba7(0x90)+(_0x25699a[_0x52bba7(0xc4)]!==0x1?_0x52bba7(0x9d):'y')),await handleSDKOutput(_0x25699a,_0x5b52a4),0x0;}catch(_0x489dda){if(_0x489dda instanceof SDKError)return console[_0x52bba7(0xab)](_0x52bba7(0xad)+_0x489dda[_0x52bba7(0x102)]),_0x489dda[_0x52bba7(0xf0)]&&console[_0x52bba7(0xab)](_0x52bba7(0xbb)+_0x489dda['cause']),0x1;throw _0x489dda;}}}export class WorkflowKillCommand extends BaseCommand{[a33_0x33ac8a(0xcf)]=a33_0x33ac8a(0x8c);[a33_0x33ac8a(0xc9)]=a33_0x33ac8a(0xd3);async['execute'](_0x4f3507){const _0x5c6724=a33_0x33ac8a,{options:_0x5000af,args:_0x4a25a3,tdx:_0x16ab9e}=_0x4f3507,_0x5cc87f=_0x4a25a3[0x0];if(!_0x5cc87f)return console[_0x5c6724(0xab)](_0x5c6724(0xe4)),0x1;try{const _0xb6e6c2=_0x5000af[_0x5c6724(0xaf)];_0x5000af[_0x5c6724(0xc3)]&&(console['error'](_0x5c6724(0xd1)+_0x5cc87f),_0xb6e6c2&&console[_0x5c6724(0xab)](_0x5c6724(0xde)+_0xb6e6c2));if(!_0x5000af[_0x5c6724(0xf4)]){const _0x32e09f=await confirm('Are\x20you\x20sure\x20you\x20want\x20to\x20kill\x20attempt\x20'+_0x5cc87f+'?');if(!_0x32e09f)return console[_0x5c6724(0xab)](_0x5c6724(0xa3)),0x0;}const _0x5db2d4=await withSpinner(_0x5c6724(0x8f),()=>_0x16ab9e['workflow'][_0x5c6724(0xd0)](_0x5cc87f,_0xb6e6c2),{'verbose':_0x5000af[_0x5c6724(0xc3)]}),_0x4be374=_0x5db2d4[_0x5c6724(0xe6)];return console[_0x5c6724(0xab)]('✔\x20'+_0x4be374),0x0;}catch(_0xec468c){if(_0xec468c instanceof SDKError)return console['error']('Error:\x20'+_0xec468c[_0x5c6724(0x102)]),_0xec468c[_0x5c6724(0xf0)]&&console[_0x5c6724(0xab)]('\x20\x20Cause:\x20'+_0xec468c['cause']),0x1;throw _0xec468c;}}}export class WorkflowRetryCommand extends BaseCommand{[a33_0x33ac8a(0xcf)]='workflow:retry';['description']='Retry\x20a\x20session\x20or\x20attempt';async['execute'](_0x5f2e06){const _0x3e407c=a33_0x33ac8a,{options:_0x19f32a,args:_0xf1b2cd,tdx:_0x5225ea}=_0x5f2e06,_0x29db58=_0xf1b2cd[0x0];if(!_0x29db58)return console[_0x3e407c(0xab)](_0x3e407c(0x106)),console[_0x3e407c(0xab)](_0x3e407c(0xee)),0x1;let _0x3a33ba=![],_0x6489d6=_0x29db58;if(_0x29db58[_0x3e407c(0x8a)](_0x3e407c(0xbc)))_0x3a33ba=!![],_0x6489d6=_0x29db58[_0x3e407c(0xf8)](0x8);else{if(_0x29db58[_0x3e407c(0x8a)](_0x3e407c(0xea)))_0x3a33ba=![],_0x6489d6=_0x29db58[_0x3e407c(0xf8)](0x8);else return console[_0x3e407c(0xab)]('Error:\x20Target\x20must\x20be\x20prefixed\x20with\x20\x22session:\x22\x20or\x20\x22attempt:\x22'),console[_0x3e407c(0xab)]('Usage:\x20workflow\x20retry\x20session:<id>\x20or\x20workflow\x20retry\x20attempt:<id>'),0x1;}try{const _0x329435=_0x19f32a[_0x3e407c(0xd2)],_0x1566c3=_0x19f32a[_0x3e407c(0xa0)],_0x1c518f=_0x19f32a[_0x3e407c(0xed)],_0x455d7d=_0x19f32a[_0x3e407c(0xb1)];_0x19f32a[_0x3e407c(0xc3)]&&(console[_0x3e407c(0xab)](_0x3e407c(0x103)+(_0x3a33ba?_0x3e407c(0xda):_0x3e407c(0xe0))+'\x20'+_0x6489d6),_0x329435&&console[_0x3e407c(0xab)]('From\x20task:\x20'+_0x329435),_0x1566c3&&console[_0x3e407c(0xab)](_0x3e407c(0xbd)+_0x1566c3),_0x1c518f&&console[_0x3e407c(0xab)]('Params:\x20'+_0x1c518f),_0x455d7d&&console[_0x3e407c(0xab)]('Force:\x20yes'));let _0x2ed599;if(_0x1c518f)try{if(_0x1c518f[_0x3e407c(0x8a)]('@')){const _0xa447e4=await import('fs/promises'),_0x124ceb=_0x1c518f[_0x3e407c(0xf8)](0x1),_0x516d51=await _0xa447e4[_0x3e407c(0xac)](_0x124ceb,'utf-8');_0x2ed599=JSON[_0x3e407c(0xaa)](_0x516d51);}else _0x2ed599=JSON[_0x3e407c(0xaa)](_0x1c518f);}catch{return console['error']('Error:\x20Invalid\x20JSON\x20in\x20--params'),0x1;}if(!_0x19f32a['yes']){const _0x19c4f4=await confirm(_0x3e407c(0xcd)+(_0x3a33ba?_0x3e407c(0xda):'attempt')+'\x20'+_0x6489d6+'?');if(!_0x19c4f4)return console[_0x3e407c(0xab)](_0x3e407c(0xa3)),0x0;}let _0x21b9f7;_0x3a33ba?_0x21b9f7=await withSpinner(_0x3e407c(0xc8),()=>_0x5225ea['workflow'][_0x3e407c(0xe2)](_0x6489d6,{'fromTask':_0x329435,'retryParams':_0x2ed599}),{'verbose':_0x19f32a[_0x3e407c(0xc3)]}):_0x21b9f7=await withSpinner('Retrying\x20attempt...',()=>_0x5225ea[_0x3e407c(0x99)]['retryAttempt'](_0x6489d6,{'resumeFrom':_0x1566c3,'retryParams':_0x2ed599,'force':_0x455d7d}),{'verbose':_0x19f32a[_0x3e407c(0xc3)]});const _0x59589d=_0x21b9f7[_0x3e407c(0xe6)];return console[_0x3e407c(0xab)](_0x3e407c(0xd8)),console['error']('\x20\x20New\x20attempt\x20ID:\x20'+_0x59589d[_0x3e407c(0xbf)]),console['error']('\x20\x20Session\x20ID:\x20'+_0x59589d['sessionId']),0x0;}catch(_0x116c7f){if(_0x116c7f instanceof SDKError)return console[_0x3e407c(0xab)](_0x3e407c(0xad)+_0x116c7f['message']),_0x116c7f['cause']&&console[_0x3e407c(0xab)](_0x3e407c(0xbb)+_0x116c7f[_0x3e407c(0xf0)]),0x1;throw _0x116c7f;}}}export class WorkflowDownloadCommand extends BaseCommand{[a33_0x33ac8a(0xcf)]=a33_0x33ac8a(0xa7);[a33_0x33ac8a(0xc9)]='Download\x20workflow\x20project\x20from\x20Treasure\x20Data';async[a33_0x33ac8a(0xfe)](_0x2ab464){const _0x3dc9be=a33_0x33ac8a,{options:_0x3afcf6,args:_0x3707e3,tdx:_0x7e0608}=_0x2ab464,_0x38ec50=_0x3707e3[0x0],_0x95af32=_0x3707e3[0x1]||'.';if(!_0x38ec50)return console['error'](_0x3dc9be(0xca)),console[_0x3dc9be(0xab)](_0x3dc9be(0xce)),0x1;const _0xa4be3a=_0x3afcf6[_0x3dc9be(0xf6)];_0x3afcf6[_0x3dc9be(0xc3)]&&(console[_0x3dc9be(0xab)](_0x3dc9be(0x98)+_0x38ec50),console[_0x3dc9be(0xab)](_0x3dc9be(0xf5)+_0x95af32),_0xa4be3a&&console[_0x3dc9be(0xab)](_0x3dc9be(0xe7)+_0xa4be3a));const _0x2e3293=await withSpinner('Downloading\x20project\x20'+_0x38ec50+'...',()=>_0x7e0608['workflow']['download'](_0x38ec50,_0x95af32,{'revision':_0xa4be3a}),{'verbose':_0x3afcf6[_0x3dc9be(0xc3)]}),_0x4670de=_0x2e3293[_0x3dc9be(0xe6)];return console['error'](_0x3dc9be(0xc1)+_0x4670de[_0x3dc9be(0xdd)]),console[_0x3dc9be(0xab)]('\x20\x20Revision:\x20'+_0x4670de['revision']),console[_0x3dc9be(0xab)](_0x3dc9be(0x92)+_0x4670de[_0x3dc9be(0x9c)]),console[_0x3dc9be(0xab)](_0x3dc9be(0xbe)+_0x95af32+'/'+_0x4670de['projectName']),0x0;}}export class WorkflowPushCommand extends BaseCommand{[a33_0x33ac8a(0xcf)]=a33_0x33ac8a(0x107);[a33_0x33ac8a(0xc9)]=a33_0x33ac8a(0xb9);async[a33_0x33ac8a(0xfe)](_0x280af7){const _0x4fa2b5=a33_0x33ac8a,{options:_0x3aa97b,args:_0x15e382,tdx:_0x2ea9a7}=_0x280af7;let _0x4ee651='.',_0x314b2f=_0x3aa97b['name'];if(_0x15e382[0x0]){const {promises:_0x477629}=await import('fs');try{const _0x4cefe0=await _0x477629[_0x4fa2b5(0xb4)](_0x15e382[0x0]);if(_0x4cefe0[_0x4fa2b5(0xa5)]())_0x4ee651=_0x15e382[0x0];else return console[_0x4fa2b5(0xab)](_0x4fa2b5(0xad)+_0x15e382[0x0]+_0x4fa2b5(0x96)),0x1;}catch{_0x314b2f=_0x15e382[0x0],_0x4ee651='.';}}const _0x40f23d=_0x3aa97b[_0x4fa2b5(0xf6)],_0x46e628=_0x3aa97b[_0x4fa2b5(0xcc)];_0x3aa97b[_0x4fa2b5(0xc3)]&&(console[_0x4fa2b5(0xab)](_0x4fa2b5(0xf7)+_0x4ee651),_0x314b2f&&console[_0x4fa2b5(0xab)](_0x4fa2b5(0x105)+_0x314b2f),_0x40f23d&&console[_0x4fa2b5(0xab)](_0x4fa2b5(0xe7)+_0x40f23d),_0x46e628&&console[_0x4fa2b5(0xab)]('Validation:\x20skipped'));const _0x52f0a4=await withSpinner(_0x4fa2b5(0xba),()=>_0x2ea9a7[_0x4fa2b5(0x99)][_0x4fa2b5(0xb6)](_0x4ee651,{'projectName':_0x314b2f,'revision':_0x40f23d,'skipValidation':_0x46e628}),{'verbose':_0x3aa97b[_0x4fa2b5(0xc3)]}),_0x35bc64=_0x52f0a4[_0x4fa2b5(0xe6)];return console['error'](_0x4fa2b5(0xeb)+_0x35bc64[_0x4fa2b5(0xdd)]),console['error']('\x20\x20Project\x20ID:\x20'+_0x35bc64[_0x4fa2b5(0x89)]),console[_0x4fa2b5(0xab)]('\x20\x20Revision:\x20'+_0x35bc64[_0x4fa2b5(0xf6)]),0x0;}}export class WorkflowDeleteCommand extends BaseCommand{[a33_0x33ac8a(0xcf)]=a33_0x33ac8a(0xb7);[a33_0x33ac8a(0xc9)]=a33_0x33ac8a(0xfa);async[a33_0x33ac8a(0xfe)](_0x4f51a0){const _0x42b1fc=a33_0x33ac8a,{options:_0xa359d6,args:_0x554fc0,tdx:_0x4610e8}=_0x4f51a0,_0x4ea145=_0x554fc0[0x0];if(!_0x4ea145)return console[_0x42b1fc(0xab)](_0x42b1fc(0xf9)),console[_0x42b1fc(0xab)]('Usage:\x20workflow:delete\x20<project-name-or-id>'),0x1;_0xa359d6[_0x42b1fc(0xc3)]&&console['error'](_0x42b1fc(0x98)+_0x4ea145);if(!_0xa359d6[_0x42b1fc(0xf4)]){const _0x234bd6=await confirm(_0x42b1fc(0xa9)+_0x4ea145+'\x22?\x20This\x20cannot\x20be\x20undone.');if(!_0x234bd6)return console[_0x42b1fc(0xab)](_0x42b1fc(0xa3)),0x0;}const _0x36b7d4=await withSpinner(_0x42b1fc(0x104)+_0x4ea145+_0x42b1fc(0xa2),()=>_0x4610e8[_0x42b1fc(0x99)]['delete'](_0x4ea145),{'verbose':_0xa359d6[_0x42b1fc(0xc3)]}),_0x49f61f=_0x36b7d4[_0x42b1fc(0xe6)];return console[_0x42b1fc(0xab)](_0x42b1fc(0xff)+_0x49f61f['projectName']),console['error'](_0x42b1fc(0x101)+_0x49f61f[_0x42b1fc(0x89)]),0x0;}}
1
+ const a33_0x1e907c=a33_0x31c7;(function(_0x2aaef9,_0x19a0fa){const _0xe2db7d=a33_0x31c7,_0xe03335=_0x2aaef9();while(!![]){try{const _0x59cf21=parseInt(_0xe2db7d(0x121))/0x1+-parseInt(_0xe2db7d(0x169))/0x2+parseInt(_0xe2db7d(0x191))/0x3+-parseInt(_0xe2db7d(0x184))/0x4+-parseInt(_0xe2db7d(0x129))/0x5*(parseInt(_0xe2db7d(0x12e))/0x6)+-parseInt(_0xe2db7d(0x193))/0x7*(-parseInt(_0xe2db7d(0x15d))/0x8)+parseInt(_0xe2db7d(0x13a))/0x9*(parseInt(_0xe2db7d(0x167))/0xa);if(_0x59cf21===_0x19a0fa)break;else _0xe03335['push'](_0xe03335['shift']());}catch(_0xefde92){_0xe03335['push'](_0xe03335['shift']());}}}(a33_0x58c9,0xe6ddf));import{BaseCommand}from'./command.js';function a33_0x58c9(){const _0x4eed0d=['\x20\x20Session\x20ID:\x20','2418898dktEHZ','Project\x20filter:\x20','List\x20workflows','isDirectory','Retry\x20a\x20session\x20or\x20attempt','projectName','yes','revision','attemptId','✔\x20Deleted\x20project\x20','Usage:\x20workflow:download\x20<project-name>\x20[output-dir]','error','Show\x20logs\x20for\x20a\x20specific\x20task','✔\x20Pushed\x20','Listing\x20workflows...','verbose','attempt:','fs/promises','params','Listing\x20workflow\x20sessions...','workflow:attempts','Show\x20specific\x20attempt\x20details','\x20\x20Files\x20extracted:\x20','Validation:\x20skipped','Error:\x20Attempt\x20ID\x20is\x20required','tasks','Show\x20tasks\x20for\x20an\x20attempt','1161232sjHFWp','ies','push','Cancelled','cause','Revision:\x20','Project\x20directory:\x20','workflow:sessions','From\x20task:\x20','substring','Retrying\x20attempt...','Params:\x20','Error:\x20Invalid\x20JSON\x20in\x20--params','1070352yAQbTQ','Killing\x20attempt...','546259cWGTQF','✔\x20Found\x20','Pushing\x20workflow\x20project...','Error:\x20','projects','\x20project','...','Task\x20name:\x20','Attempt\x20ID:\x20','Deleting\x20project\x20','338039jPjGyW','List\x20workflow\x20attempts','retryAttempt','Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20project\x20\x22','✔\x20Downloaded\x20','workflows','parse','sessionId','20390MIOfuT','utf-8','\x20log\x20entr','Filter:\x20','workflow:push','210kcYRZX','\x20session','Getting\x20attempt\x20tasks...','projectId','✔\x20Retry\x20started','\x20\x20Location:\x20','Error:\x20Session\x20ID\x20or\x20attempt\x20ID\x20is\x20required','\x20\x20Revision:\x20','execute','Error:\x20Invalid\x20pattern.\x20Use\x20format:\x20project\x20or\x20project.workflow','\x22?\x20This\x20cannot\x20be\x20undone.','offset','168426PJlxpH','\x20\x20New\x20attempt\x20ID:\x20','Project:\x20','name','session:','resumeFrom','\x20\x20Cause:\x20','workflow:workflows','Usage:\x20workflow:delete\x20<project-name-or-id>','workflow:kill','limit','workflow:download','Getting\x20task\x20logs...','\x20\x20Project\x20ID:\x20','\x20workflow','Force:\x20yes','Filter:\x20project=','Retrying\x20session...','Error:\x20Target\x20must\x20be\x20prefixed\x20with\x20\x22session:\x22\x20or\x20\x22attempt:\x22','data','Push\x20workflow\x20project\x20to\x20Treasure\x20Data','download','Usage:\x20workflow\x20retry\x20session:<id>\x20or\x20workflow\x20retry\x20attempt:<id>','Listing\x20workflow\x20attempts...','workflow:retry','message','Include\x20retried:\x20yes','length','sessions','Kill\x20a\x20running\x20attempt','includeRetried','Output\x20directory:\x20','workflow:attempt','status','attempts','8WCAFQn','readFile','Target:\x20','skipValidation','Pattern:\x20','attempt','stat','description','workflow:tasks','workflow','970EdhqHc'];a33_0x58c9=function(){return _0x4eed0d;};return a33_0x58c9();}import{SDKError}from'../sdk/index.js';import{handleSDKOutput}from'../utils/command-output.js';import{withSpinner}from'../utils/spinner.js';import{confirm}from'../utils/prompt.js';export class WorkflowProjectsCommand extends BaseCommand{[a33_0x1e907c(0x13d)]='workflow:projects';[a33_0x1e907c(0x164)]='List\x20all\x20workflow\x20projects';async[a33_0x1e907c(0x136)](_0x5d6dc2){const _0x489aa3=a33_0x1e907c,{options:_0x1c6ce6,args:_0x597215,tdx:_0x5b8e1c}=_0x5d6dc2,_0x256944=_0x597215[0x0];try{_0x1c6ce6[_0x489aa3(0x178)]&&_0x256944&&console[_0x489aa3(0x174)](_0x489aa3(0x161)+_0x256944);const _0x313431=await withSpinner('Listing\x20workflow\x20projects...',()=>_0x5b8e1c[_0x489aa3(0x166)][_0x489aa3(0x197)](_0x256944,{'limit':_0x1c6ce6[_0x489aa3(0x144)]}),{'verbose':_0x1c6ce6[_0x489aa3(0x178)]}),_0x5877bb=_0x313431['data'];return console[_0x489aa3(0x174)](_0x489aa3(0x194)+_0x5877bb[_0x489aa3(0x155)]+_0x489aa3(0x198)+(_0x5877bb[_0x489aa3(0x155)]!==0x1?'s':'')),await handleSDKOutput(_0x5877bb,_0x1c6ce6),0x0;}catch(_0x4f6547){if(_0x4f6547 instanceof SDKError)return console[_0x489aa3(0x174)](_0x489aa3(0x196)+_0x4f6547['message']),_0x4f6547[_0x489aa3(0x188)]&&console[_0x489aa3(0x174)](_0x489aa3(0x140)+_0x4f6547['cause']),0x1;throw _0x4f6547;}}}function a33_0x31c7(_0x26503f,_0x375148){const _0x58c9f8=a33_0x58c9();return a33_0x31c7=function(_0x31c738,_0xdcb8d2){_0x31c738=_0x31c738-0x121;let _0x47f7aa=_0x58c9f8[_0x31c738];return _0x47f7aa;},a33_0x31c7(_0x26503f,_0x375148);}export class WorkflowWorkflowsCommand extends BaseCommand{[a33_0x1e907c(0x13d)]=a33_0x1e907c(0x141);[a33_0x1e907c(0x164)]=a33_0x1e907c(0x16b);async['execute'](_0x1b747a){const _0x5a8976=a33_0x1e907c,{options:_0x4522cb,args:_0x4385a1,tdx:_0x30893e}=_0x1b747a,_0x4f9dbe=_0x4385a1[0x0];try{_0x4522cb['verbose']&&_0x4f9dbe&&console[_0x5a8976(0x174)](_0x5a8976(0x16a)+_0x4f9dbe);const _0x50d39e=await withSpinner(_0x5a8976(0x177),()=>_0x30893e[_0x5a8976(0x166)][_0x5a8976(0x126)](_0x4f9dbe,{'limit':_0x4522cb['limit']}),{'verbose':_0x4522cb[_0x5a8976(0x178)]}),_0x3b1477=_0x50d39e[_0x5a8976(0x14d)];return console['error'](_0x5a8976(0x194)+_0x3b1477[_0x5a8976(0x155)]+_0x5a8976(0x148)+(_0x3b1477[_0x5a8976(0x155)]!==0x1?'s':'')),await handleSDKOutput(_0x3b1477,_0x4522cb),0x0;}catch(_0x551f62){if(_0x551f62 instanceof SDKError)return console[_0x5a8976(0x174)](_0x5a8976(0x196)+_0x551f62[_0x5a8976(0x153)]),_0x551f62['cause']&&console[_0x5a8976(0x174)](_0x5a8976(0x140)+_0x551f62[_0x5a8976(0x188)]),0x1;throw _0x551f62;}}}export class WorkflowSessionsCommand extends BaseCommand{[a33_0x1e907c(0x13d)]=a33_0x1e907c(0x18b);[a33_0x1e907c(0x164)]='List\x20workflow\x20execution\x20sessions';async[a33_0x1e907c(0x136)](_0x270d71){const _0x468977=a33_0x1e907c,{options:_0x20d497,args:_0x2f1375,tdx:_0x37790d}=_0x270d71;let _0xf4610d,_0x94072;if(_0x2f1375[0x0]){const _0x561115=_0x2f1375[0x0]['split']('.');if(_0x561115[_0x468977(0x155)]===0x1)_0xf4610d=_0x561115[0x0];else{if(_0x561115[_0x468977(0x155)]===0x2)[_0xf4610d,_0x94072]=_0x561115;else return console[_0x468977(0x174)](_0x468977(0x137)),0x1;}}try{if(_0x20d497[_0x468977(0x178)]){if(_0xf4610d&&_0x94072)console[_0x468977(0x174)](_0x468977(0x12c)+_0xf4610d+'.'+_0x94072);else _0xf4610d&&console[_0x468977(0x174)](_0x468977(0x14a)+_0xf4610d);const _0x37bcd8=_0x20d497[_0x468977(0x15b)];_0x37bcd8&&console[_0x468977(0x174)]('Status:\x20'+_0x37bcd8);}const _0x50e684=await withSpinner(_0x468977(0x17c),()=>_0x37790d[_0x468977(0x166)][_0x468977(0x156)]({'projectName':_0xf4610d,'workflowName':_0x94072,'status':_0x20d497[_0x468977(0x15b)],'fromTime':_0x20d497['from'],'toTime':_0x20d497['to'],'limit':_0x20d497['limit']}),{'verbose':_0x20d497['verbose']}),_0x109122=_0x50e684[_0x468977(0x14d)];return console[_0x468977(0x174)](_0x468977(0x194)+_0x109122[_0x468977(0x155)]+_0x468977(0x12f)+(_0x109122[_0x468977(0x155)]!==0x1?'s':'')),await handleSDKOutput(_0x109122,_0x20d497),0x0;}catch(_0x23dce6){if(_0x23dce6 instanceof SDKError)return console[_0x468977(0x174)](_0x468977(0x196)+_0x23dce6[_0x468977(0x153)]),_0x23dce6[_0x468977(0x188)]&&console[_0x468977(0x174)](_0x468977(0x140)+_0x23dce6[_0x468977(0x188)]),0x1;throw _0x23dce6;}}}export class WorkflowAttemptsCommand extends BaseCommand{[a33_0x1e907c(0x13d)]=a33_0x1e907c(0x17d);['description']=a33_0x1e907c(0x122);async[a33_0x1e907c(0x136)](_0x126458){const _0x1635c0=a33_0x1e907c,{options:_0x1ed1ec,args:_0x4edd98,tdx:_0x454a9f}=_0x126458;let _0x2e5a9b,_0x395465;if(_0x4edd98[0x0]){const _0x1c9924=_0x4edd98[0x0]['split']('.');if(_0x1c9924['length']===0x1)_0x2e5a9b=_0x1c9924[0x0];else{if(_0x1c9924[_0x1635c0(0x155)]===0x2)[_0x2e5a9b,_0x395465]=_0x1c9924;else return console[_0x1635c0(0x174)](_0x1635c0(0x137)),0x1;}}try{const _0x539031=_0x1ed1ec[_0x1635c0(0x158)];if(_0x1ed1ec[_0x1635c0(0x178)]){if(_0x2e5a9b&&_0x395465)console['error'](_0x1635c0(0x12c)+_0x2e5a9b+'.'+_0x395465);else _0x2e5a9b&&console['error']('Filter:\x20project='+_0x2e5a9b);_0x539031&&console[_0x1635c0(0x174)](_0x1635c0(0x154));}const _0x1a7e03=await withSpinner(_0x1635c0(0x151),()=>_0x454a9f[_0x1635c0(0x166)][_0x1635c0(0x15c)]({'projectName':_0x2e5a9b,'workflowName':_0x395465,'includeRetried':_0x539031,'limit':_0x1ed1ec[_0x1635c0(0x144)]}),{'verbose':_0x1ed1ec[_0x1635c0(0x178)]}),_0x4c3f6d=_0x1a7e03['data'];return console[_0x1635c0(0x174)]('✔\x20Found\x20'+_0x4c3f6d['length']+'\x20attempt'+(_0x4c3f6d[_0x1635c0(0x155)]!==0x1?'s':'')),await handleSDKOutput(_0x4c3f6d,_0x1ed1ec),0x0;}catch(_0xd17ef7){if(_0xd17ef7 instanceof SDKError)return console[_0x1635c0(0x174)](_0x1635c0(0x196)+_0xd17ef7[_0x1635c0(0x153)]),_0xd17ef7[_0x1635c0(0x188)]&&console['error'](_0x1635c0(0x140)+_0xd17ef7['cause']),0x1;throw _0xd17ef7;}}}export class WorkflowAttemptCommand extends BaseCommand{[a33_0x1e907c(0x13d)]=a33_0x1e907c(0x15a);[a33_0x1e907c(0x164)]=a33_0x1e907c(0x17e);async[a33_0x1e907c(0x136)](_0x2b97f1){const _0x4359af=a33_0x1e907c,{options:_0x442124,args:_0x40d26c,tdx:_0x33bae0}=_0x2b97f1,_0x2e65b4=_0x40d26c[0x0];if(!_0x2e65b4)return console[_0x4359af(0x174)](_0x4359af(0x181)),0x1;try{_0x442124['verbose']&&console[_0x4359af(0x174)](_0x4359af(0x19b)+_0x2e65b4);const _0x1f821d=await withSpinner('Getting\x20attempt\x20details...',()=>_0x33bae0['workflow'][_0x4359af(0x162)](_0x2e65b4),{'verbose':_0x442124['verbose']}),_0xbb09ee=_0x1f821d['data'];return await handleSDKOutput([_0xbb09ee],_0x442124),0x0;}catch(_0x1e291b){if(_0x1e291b instanceof SDKError)return console[_0x4359af(0x174)](_0x4359af(0x196)+_0x1e291b[_0x4359af(0x153)]),_0x1e291b[_0x4359af(0x188)]&&console[_0x4359af(0x174)](_0x4359af(0x140)+_0x1e291b[_0x4359af(0x188)]),0x1;throw _0x1e291b;}}}export class WorkflowTasksCommand extends BaseCommand{[a33_0x1e907c(0x13d)]=a33_0x1e907c(0x165);[a33_0x1e907c(0x164)]=a33_0x1e907c(0x183);async['execute'](_0x2781fe){const _0x839413=a33_0x1e907c,{options:_0x42be86,args:_0x26b936,tdx:_0x498af7}=_0x2781fe,_0x333203=_0x26b936[0x0];if(!_0x333203)return console['error'](_0x839413(0x181)),0x1;try{const _0x7bf6bb=_0x42be86['includeSubtasks'];_0x42be86[_0x839413(0x178)]&&(console[_0x839413(0x174)](_0x839413(0x19b)+_0x333203),_0x7bf6bb&&console['error']('Including\x20subtasks:\x20yes'));const _0x420371=await withSpinner(_0x839413(0x130),()=>_0x498af7['workflow'][_0x839413(0x182)](_0x333203,_0x7bf6bb||![]),{'verbose':_0x42be86[_0x839413(0x178)]}),_0x12f319=_0x420371[_0x839413(0x14d)];return console[_0x839413(0x174)]('✔\x20Found\x20'+_0x12f319[_0x839413(0x155)]+'\x20task'+(_0x12f319['length']!==0x1?'s':'')),await handleSDKOutput(_0x12f319,_0x42be86),0x0;}catch(_0x4dbef9){if(_0x4dbef9 instanceof SDKError)return console['error'](_0x839413(0x196)+_0x4dbef9[_0x839413(0x153)]),_0x4dbef9[_0x839413(0x188)]&&console[_0x839413(0x174)](_0x839413(0x140)+_0x4dbef9[_0x839413(0x188)]),0x1;throw _0x4dbef9;}}}export class WorkflowLogsCommand extends BaseCommand{[a33_0x1e907c(0x13d)]='workflow:logs';[a33_0x1e907c(0x164)]=a33_0x1e907c(0x175);async[a33_0x1e907c(0x136)](_0x47adb9){const _0x5e58bd=a33_0x1e907c,{options:_0x691665,args:_0x886864,tdx:_0x5dc8c7}=_0x47adb9,_0x34cad1=_0x886864[0x0],_0x276920=_0x886864[0x1];if(!_0x34cad1||!_0x276920)return console[_0x5e58bd(0x174)]('Error:\x20Attempt\x20ID\x20and\x20task\x20name\x20are\x20required'),0x1;try{_0x691665[_0x5e58bd(0x178)]&&(console[_0x5e58bd(0x174)]('Attempt\x20ID:\x20'+_0x34cad1),console[_0x5e58bd(0x174)](_0x5e58bd(0x19a)+_0x276920));const _0x1d5b8c=_0x691665[_0x5e58bd(0x139)],_0x46b583=await withSpinner(_0x5e58bd(0x146),()=>_0x5dc8c7['workflow']['logs'](_0x34cad1,_0x276920,{'offset':_0x1d5b8c,'limit':_0x691665['limit']}),{'verbose':_0x691665[_0x5e58bd(0x178)]}),_0xaa6119=_0x46b583[_0x5e58bd(0x14d)];return console[_0x5e58bd(0x174)](_0x5e58bd(0x194)+_0xaa6119[_0x5e58bd(0x155)]+_0x5e58bd(0x12b)+(_0xaa6119[_0x5e58bd(0x155)]!==0x1?_0x5e58bd(0x185):'y')),await handleSDKOutput(_0xaa6119,_0x691665),0x0;}catch(_0x10fb68){if(_0x10fb68 instanceof SDKError)return console['error']('Error:\x20'+_0x10fb68[_0x5e58bd(0x153)]),_0x10fb68['cause']&&console[_0x5e58bd(0x174)]('\x20\x20Cause:\x20'+_0x10fb68[_0x5e58bd(0x188)]),0x1;throw _0x10fb68;}}}export class WorkflowKillCommand extends BaseCommand{['name']=a33_0x1e907c(0x143);['description']=a33_0x1e907c(0x157);async[a33_0x1e907c(0x136)](_0xa8ce2e){const _0x1a24ee=a33_0x1e907c,{options:_0x51e80a,args:_0x1abc00,tdx:_0x20b662}=_0xa8ce2e,_0x3bac23=_0x1abc00[0x0];if(!_0x3bac23)return console[_0x1a24ee(0x174)]('Error:\x20Attempt\x20ID\x20is\x20required'),0x1;try{const _0xc490c3=_0x51e80a['reason'];_0x51e80a['verbose']&&(console[_0x1a24ee(0x174)](_0x1a24ee(0x19b)+_0x3bac23),_0xc490c3&&console[_0x1a24ee(0x174)]('Reason:\x20'+_0xc490c3));if(!_0x51e80a[_0x1a24ee(0x16f)]){const _0x3ed9bb=await confirm('Are\x20you\x20sure\x20you\x20want\x20to\x20kill\x20attempt\x20'+_0x3bac23+'?');if(!_0x3ed9bb)return console[_0x1a24ee(0x174)]('Cancelled'),0x0;}const _0x1f79c7=await withSpinner(_0x1a24ee(0x192),()=>_0x20b662[_0x1a24ee(0x166)]['kill'](_0x3bac23,_0xc490c3),{'verbose':_0x51e80a[_0x1a24ee(0x178)]}),_0x3d841b=_0x1f79c7[_0x1a24ee(0x14d)];return console[_0x1a24ee(0x174)]('✔\x20'+_0x3d841b),0x0;}catch(_0x3ca073){if(_0x3ca073 instanceof SDKError)return console[_0x1a24ee(0x174)](_0x1a24ee(0x196)+_0x3ca073[_0x1a24ee(0x153)]),_0x3ca073[_0x1a24ee(0x188)]&&console[_0x1a24ee(0x174)](_0x1a24ee(0x140)+_0x3ca073[_0x1a24ee(0x188)]),0x1;throw _0x3ca073;}}}export class WorkflowRetryCommand extends BaseCommand{[a33_0x1e907c(0x13d)]=a33_0x1e907c(0x152);['description']=a33_0x1e907c(0x16d);async[a33_0x1e907c(0x136)](_0x141e01){const _0x1f7c0f=a33_0x1e907c,{options:_0x2c13c1,args:_0x1a8ca4,tdx:_0x5659f9}=_0x141e01,_0x2bafd5=_0x1a8ca4[0x0];if(!_0x2bafd5)return console['error'](_0x1f7c0f(0x134)),console[_0x1f7c0f(0x174)](_0x1f7c0f(0x150)),0x1;let _0x23e0ef=![],_0x13ce2a=_0x2bafd5;if(_0x2bafd5['startsWith'](_0x1f7c0f(0x13e)))_0x23e0ef=!![],_0x13ce2a=_0x2bafd5[_0x1f7c0f(0x18d)](0x8);else{if(_0x2bafd5['startsWith'](_0x1f7c0f(0x179)))_0x23e0ef=![],_0x13ce2a=_0x2bafd5[_0x1f7c0f(0x18d)](0x8);else return console[_0x1f7c0f(0x174)](_0x1f7c0f(0x14c)),console[_0x1f7c0f(0x174)](_0x1f7c0f(0x150)),0x1;}try{const _0x5536bc=_0x2c13c1['fromTask'],_0x47d7f6=_0x2c13c1[_0x1f7c0f(0x13f)],_0x348ec4=_0x2c13c1[_0x1f7c0f(0x17b)],_0x2bd726=_0x2c13c1['force'];_0x2c13c1[_0x1f7c0f(0x178)]&&(console[_0x1f7c0f(0x174)](_0x1f7c0f(0x15f)+(_0x23e0ef?'session':_0x1f7c0f(0x162))+'\x20'+_0x13ce2a),_0x5536bc&&console[_0x1f7c0f(0x174)](_0x1f7c0f(0x18c)+_0x5536bc),_0x47d7f6&&console['error']('Resume\x20from:\x20'+_0x47d7f6),_0x348ec4&&console[_0x1f7c0f(0x174)](_0x1f7c0f(0x18f)+_0x348ec4),_0x2bd726&&console[_0x1f7c0f(0x174)](_0x1f7c0f(0x149)));let _0x5be48a;if(_0x348ec4)try{if(_0x348ec4['startsWith']('@')){const _0x3b6ad3=await import(_0x1f7c0f(0x17a)),_0x482283=_0x348ec4[_0x1f7c0f(0x18d)](0x1),_0x316139=await _0x3b6ad3[_0x1f7c0f(0x15e)](_0x482283,_0x1f7c0f(0x12a));_0x5be48a=JSON['parse'](_0x316139);}else _0x5be48a=JSON[_0x1f7c0f(0x127)](_0x348ec4);}catch{return console[_0x1f7c0f(0x174)](_0x1f7c0f(0x190)),0x1;}if(!_0x2c13c1[_0x1f7c0f(0x16f)]){const _0x399b20=await confirm('Are\x20you\x20sure\x20you\x20want\x20to\x20retry\x20'+(_0x23e0ef?'session':_0x1f7c0f(0x162))+'\x20'+_0x13ce2a+'?');if(!_0x399b20)return console[_0x1f7c0f(0x174)](_0x1f7c0f(0x187)),0x0;}let _0x54498f;_0x23e0ef?_0x54498f=await withSpinner(_0x1f7c0f(0x14b),()=>_0x5659f9['workflow']['retrySession'](_0x13ce2a,{'fromTask':_0x5536bc,'retryParams':_0x5be48a}),{'verbose':_0x2c13c1[_0x1f7c0f(0x178)]}):_0x54498f=await withSpinner(_0x1f7c0f(0x18e),()=>_0x5659f9[_0x1f7c0f(0x166)][_0x1f7c0f(0x123)](_0x13ce2a,{'resumeFrom':_0x47d7f6,'retryParams':_0x5be48a,'force':_0x2bd726}),{'verbose':_0x2c13c1[_0x1f7c0f(0x178)]});const _0x3ccc8b=_0x54498f[_0x1f7c0f(0x14d)];return console[_0x1f7c0f(0x174)](_0x1f7c0f(0x132)),console[_0x1f7c0f(0x174)](_0x1f7c0f(0x13b)+_0x3ccc8b[_0x1f7c0f(0x171)]),console[_0x1f7c0f(0x174)](_0x1f7c0f(0x168)+_0x3ccc8b[_0x1f7c0f(0x128)]),0x0;}catch(_0x521886){if(_0x521886 instanceof SDKError)return console['error'](_0x1f7c0f(0x196)+_0x521886[_0x1f7c0f(0x153)]),_0x521886[_0x1f7c0f(0x188)]&&console[_0x1f7c0f(0x174)](_0x1f7c0f(0x140)+_0x521886['cause']),0x1;throw _0x521886;}}}export class WorkflowDownloadCommand extends BaseCommand{[a33_0x1e907c(0x13d)]=a33_0x1e907c(0x145);[a33_0x1e907c(0x164)]='Download\x20workflow\x20project\x20from\x20Treasure\x20Data';async[a33_0x1e907c(0x136)](_0x63343a){const _0x1f177a=a33_0x1e907c,{options:_0x4440c5,args:_0x3cc95b,tdx:_0x798912}=_0x63343a,_0x52f963=_0x3cc95b[0x0],_0x314b93=_0x3cc95b[0x1]||'.';if(!_0x52f963)return console[_0x1f177a(0x174)]('Error:\x20Project\x20name\x20is\x20required'),console[_0x1f177a(0x174)](_0x1f177a(0x173)),0x1;const _0x476c1f=_0x4440c5[_0x1f177a(0x170)];_0x4440c5[_0x1f177a(0x178)]&&(console[_0x1f177a(0x174)](_0x1f177a(0x13c)+_0x52f963),console[_0x1f177a(0x174)](_0x1f177a(0x159)+_0x314b93),_0x476c1f&&console[_0x1f177a(0x174)](_0x1f177a(0x189)+_0x476c1f));const _0x38803d=await withSpinner('Downloading\x20project\x20'+_0x52f963+_0x1f177a(0x199),()=>_0x798912[_0x1f177a(0x166)][_0x1f177a(0x14f)](_0x52f963,_0x314b93,{'revision':_0x476c1f}),{'verbose':_0x4440c5['verbose']}),_0x4436af=_0x38803d['data'];return console[_0x1f177a(0x174)](_0x1f177a(0x125)+_0x4436af['projectName']),console[_0x1f177a(0x174)](_0x1f177a(0x135)+_0x4436af[_0x1f177a(0x170)]),console[_0x1f177a(0x174)](_0x1f177a(0x17f)+_0x4436af['filesExtracted']),console[_0x1f177a(0x174)](_0x1f177a(0x133)+_0x314b93+'/'+_0x4436af[_0x1f177a(0x16e)]),0x0;}}export class WorkflowPushCommand extends BaseCommand{[a33_0x1e907c(0x13d)]=a33_0x1e907c(0x12d);[a33_0x1e907c(0x164)]=a33_0x1e907c(0x14e);async[a33_0x1e907c(0x136)](_0x182176){const _0xcefb28=a33_0x1e907c,{options:_0x4e151e,args:_0x410b49,tdx:_0x518022}=_0x182176;let _0x38413d='.',_0x5c4cfd=_0x4e151e[_0xcefb28(0x13d)];if(_0x410b49[0x0]){const {promises:_0x1e8310}=await import('fs');try{const _0x4fe819=await _0x1e8310[_0xcefb28(0x163)](_0x410b49[0x0]);if(_0x4fe819[_0xcefb28(0x16c)]())_0x38413d=_0x410b49[0x0];else return console[_0xcefb28(0x174)](_0xcefb28(0x196)+_0x410b49[0x0]+'\x20is\x20not\x20a\x20directory'),0x1;}catch{_0x5c4cfd=_0x410b49[0x0],_0x38413d='.';}}const _0x250481=_0x4e151e['revision'],_0x5dceb0=_0x4e151e[_0xcefb28(0x160)];_0x4e151e[_0xcefb28(0x178)]&&(console[_0xcefb28(0x174)](_0xcefb28(0x18a)+_0x38413d),_0x5c4cfd&&console[_0xcefb28(0x174)]('Project\x20name:\x20'+_0x5c4cfd),_0x250481&&console[_0xcefb28(0x174)](_0xcefb28(0x189)+_0x250481),_0x5dceb0&&console[_0xcefb28(0x174)](_0xcefb28(0x180)));const _0x529060=await withSpinner(_0xcefb28(0x195),()=>_0x518022[_0xcefb28(0x166)][_0xcefb28(0x186)](_0x38413d,{'projectName':_0x5c4cfd,'revision':_0x250481,'skipValidation':_0x5dceb0}),{'verbose':_0x4e151e[_0xcefb28(0x178)]}),_0x3d19b5=_0x529060['data'];return console[_0xcefb28(0x174)](_0xcefb28(0x176)+_0x3d19b5[_0xcefb28(0x16e)]),console[_0xcefb28(0x174)](_0xcefb28(0x147)+_0x3d19b5[_0xcefb28(0x131)]),console['error'](_0xcefb28(0x135)+_0x3d19b5['revision']),0x0;}}export class WorkflowDeleteCommand extends BaseCommand{[a33_0x1e907c(0x13d)]='workflow:delete';['description']='Delete\x20workflow\x20project\x20from\x20Treasure\x20Data';async['execute'](_0x41b7d9){const _0x54d4c7=a33_0x1e907c,{options:_0x3551c0,args:_0x2e6c97,tdx:_0x2b28b7}=_0x41b7d9,_0x2c3e07=_0x2e6c97[0x0];if(!_0x2c3e07)return console[_0x54d4c7(0x174)]('Error:\x20Project\x20name\x20or\x20ID\x20is\x20required'),console[_0x54d4c7(0x174)](_0x54d4c7(0x142)),0x1;_0x3551c0[_0x54d4c7(0x178)]&&console[_0x54d4c7(0x174)](_0x54d4c7(0x13c)+_0x2c3e07);if(!_0x3551c0['yes']){const _0x237e5e=await confirm(_0x54d4c7(0x124)+_0x2c3e07+_0x54d4c7(0x138));if(!_0x237e5e)return console[_0x54d4c7(0x174)](_0x54d4c7(0x187)),0x0;}const _0x23118d=await withSpinner(_0x54d4c7(0x19c)+_0x2c3e07+'...',()=>_0x2b28b7['workflow']['delete'](_0x2c3e07),{'verbose':_0x3551c0['verbose']}),_0x28fbdb=_0x23118d[_0x54d4c7(0x14d)];return console[_0x54d4c7(0x174)](_0x54d4c7(0x172)+_0x28fbdb[_0x54d4c7(0x16e)]),console[_0x54d4c7(0x174)](_0x54d4c7(0x147)+_0x28fbdb[_0x54d4c7(0x131)]),0x0;}}
package/dist/core/auth.js CHANGED
@@ -1 +1 @@
1
- function a34_0x3fca(_0xed9cc0,_0x25c066){const _0x4f3f68=a34_0x4f3f();return a34_0x3fca=function(_0x3fcadf,_0x32b737){_0x3fcadf=_0x3fcadf-0x72;let _0x1c9073=_0x4f3f68[_0x3fcadf];return _0x1c9073;},a34_0x3fca(_0xed9cc0,_0x25c066);}(function(_0x4dc628,_0x354f60){const _0x5e4c66=a34_0x3fca,_0x243b49=_0x4dc628();while(!![]){try{const _0x3c4d25=parseInt(_0x5e4c66(0x84))/0x1*(-parseInt(_0x5e4c66(0x88))/0x2)+-parseInt(_0x5e4c66(0x80))/0x3+parseInt(_0x5e4c66(0x76))/0x4*(parseInt(_0x5e4c66(0x7d))/0x5)+parseInt(_0x5e4c66(0x74))/0x6+-parseInt(_0x5e4c66(0x82))/0x7+-parseInt(_0x5e4c66(0x7f))/0x8+parseInt(_0x5e4c66(0x86))/0x9;if(_0x3c4d25===_0x354f60)break;else _0x243b49['push'](_0x243b49['shift']());}catch(_0x5ed7cc){_0x243b49['push'](_0x243b49['shift']());}}}(a34_0x4f3f,0x4a0f6));import{platform}from'os';import{readFileSync}from'fs';import{fileURLToPath}from'url';function a34_0x4f3f(){const _0x318ca8=['1237236ebJiVk','version','12884kDSgNp','../../package.json','0.0.0','Authorization','length','entries','X-Trino-User','85EUGryx','url','1682488UEeDIs','405717GqNYWq','utf-8','2009427NYyaCq','parse','827jlFDsL','tdx','6767181qKEUzt',';\x20node/','186oLvXSM','tdx/','replace'];a34_0x4f3f=function(){return _0x318ca8;};return a34_0x4f3f();}import{dirname,join}from'path';import{getAPIKey}from'./config.js';export function getVersion(){const _0x373fed=a34_0x3fca;try{const _0xf6f14a=fileURLToPath(import.meta[_0x373fed(0x7e)]),_0x5c45d9=dirname(_0xf6f14a),_0x4df957=join(_0x5c45d9,_0x373fed(0x77)),_0x35d07=JSON[_0x373fed(0x83)](readFileSync(_0x4df957,_0x373fed(0x81)));return _0x35d07[_0x373fed(0x75)];}catch{return _0x373fed(0x78);}}export function getUserAgent(){const _0x342f8e=a34_0x3fca,_0x4b900c=getVersion(),_0x502c41=platform(),_0x222f88=process['version'][_0x342f8e(0x73)]('v','');return _0x342f8e(0x72)+_0x4b900c+'\x20('+_0x502c41+_0x342f8e(0x87)+_0x222f88+')';}export function getAuthHeaders(_0x76fdf5,_0x80b28f){const _0x363c3e=a34_0x3fca,_0x5349e3=getVersion(),_0x5d7c62={'User-Agent':getUserAgent(),'X-TD-Client':_0x363c3e(0x85),'X-TD-Client-Version':_0x5349e3};return _0x80b28f&&(_0x5d7c62[_0x363c3e(0x79)]='TD1\x20'+_0x80b28f),_0x5d7c62;}export function toHeaderRecord(_0x4672ec){const _0x371b08=a34_0x3fca,_0x3af670={};for(const [_0x2ec033,_0x41f31d]of Object[_0x371b08(0x7b)](_0x4672ec)){_0x41f31d!==undefined&&(_0x3af670[_0x2ec033]=_0x41f31d);}return _0x3af670;}export function getTrinoHeaders(_0x144f80,_0x2c9bb4){const _0x5ca159=a34_0x3fca,_0x48b867=getAuthHeaders(_0x144f80,_0x2c9bb4),_0x11a8c7=toHeaderRecord(_0x48b867);return delete _0x11a8c7[_0x5ca159(0x79)],_0x2c9bb4&&(_0x11a8c7[_0x5ca159(0x7c)]=_0x2c9bb4),_0x11a8c7;}export function hasAPIKey(_0x47027c){const _0x4936d0=a34_0x3fca,_0x315160=getAPIKey(_0x47027c);return _0x315160!==undefined&&_0x315160[_0x4936d0(0x7a)]>0x0;}
1
+ (function(_0x1d8bda,_0x597db6){const _0x578b8a=a34_0x2c8e,_0x3de154=_0x1d8bda();while(!![]){try{const _0x41e546=-parseInt(_0x578b8a(0x1c7))/0x1+-parseInt(_0x578b8a(0x1cb))/0x2+-parseInt(_0x578b8a(0x1c0))/0x3+-parseInt(_0x578b8a(0x1c1))/0x4+parseInt(_0x578b8a(0x1cc))/0x5+-parseInt(_0x578b8a(0x1c3))/0x6*(-parseInt(_0x578b8a(0x1c6))/0x7)+parseInt(_0x578b8a(0x1c8))/0x8;if(_0x41e546===_0x597db6)break;else _0x3de154['push'](_0x3de154['shift']());}catch(_0xc232c2){_0x3de154['push'](_0x3de154['shift']());}}}(a34_0xe69f,0x54bd8));function a34_0x2c8e(_0xeb3a5a,_0x438e6d){const _0xe69f77=a34_0xe69f();return a34_0x2c8e=function(_0x2c8e43,_0x3b6932){_0x2c8e43=_0x2c8e43-0x1be;let _0x5413f8=_0xe69f77[_0x2c8e43];return _0x5413f8;},a34_0x2c8e(_0xeb3a5a,_0x438e6d);}import{platform}from'os';import{readFileSync}from'fs';import{fileURLToPath}from'url';import{dirname,join}from'path';import{getAPIKey}from'./config.js';export function getVersion(){const _0x38d88d=a34_0x2c8e;try{const _0x26f920=fileURLToPath(import.meta[_0x38d88d(0x1d2)]),_0x1be8d9=dirname(_0x26f920),_0x41fd40=join(_0x1be8d9,'../../package.json'),_0x661221=JSON[_0x38d88d(0x1d0)](readFileSync(_0x41fd40,_0x38d88d(0x1c9)));return _0x661221[_0x38d88d(0x1bf)];}catch{return _0x38d88d(0x1d3);}}export function getUserAgent(){const _0x3eb2da=a34_0x2c8e,_0x45cf71=getVersion(),_0x53a620=platform(),_0x7cec9b=process['version'][_0x3eb2da(0x1cd)]('v','');return _0x3eb2da(0x1c2)+_0x45cf71+'\x20('+_0x53a620+_0x3eb2da(0x1d1)+_0x7cec9b+')';}export function getAuthHeaders(_0x4a1d39,_0x20f956){const _0x1bc65d=a34_0x2c8e,_0x15d5ce=getVersion(),_0x243e5b={'User-Agent':getUserAgent(),'X-TD-Client':_0x1bc65d(0x1be),'X-TD-Client-Version':_0x15d5ce};return _0x20f956&&(_0x243e5b[_0x1bc65d(0x1c4)]=_0x1bc65d(0x1ca)+_0x20f956),_0x243e5b;}export function toHeaderRecord(_0x322b5a){const _0xf448cf=a34_0x2c8e,_0x52c242={};for(const [_0x2681dd,_0x2ebfc2]of Object[_0xf448cf(0x1ce)](_0x322b5a)){_0x2ebfc2!==undefined&&(_0x52c242[_0x2681dd]=_0x2ebfc2);}return _0x52c242;}export function getTrinoHeaders(_0x365526,_0x2710db){const _0x3deec5=a34_0x2c8e,_0x33c381=getAuthHeaders(_0x365526,_0x2710db),_0x56dbf4=toHeaderRecord(_0x33c381);return delete _0x56dbf4[_0x3deec5(0x1c4)],_0x2710db&&(_0x56dbf4[_0x3deec5(0x1c5)]=_0x2710db),_0x56dbf4;}function a34_0xe69f(){const _0x25b02b=['version','1213017PrZYje','1028228ldPIZw','tdx/','6kHcYNK','Authorization','X-Trino-User','292313sntYJp','593452nhqPGe','12310952LtBsdW','utf-8','TD1\x20','1266766xQmkXu','3273495FSSHlo','replace','entries','length','parse',';\x20node/','url','0.0.0','tdx'];a34_0xe69f=function(){return _0x25b02b;};return a34_0xe69f();}export function hasAPIKey(_0x13c0c6){const _0x53dd65=a34_0x2c8e,_0x3bfceb=getAPIKey(_0x13c0c6);return _0x3bfceb!==undefined&&_0x3bfceb[_0x53dd65(0x1cf)]>0x0;}
@@ -1 +1 @@
1
- function a35_0x4bad(){const _0x582752=['includes','tdx','startsWith','.config','env:\x20','Warning:\x20Failed\x20to\x20load\x20','jp01','1382249qjIiuL','existsSync','us01','global:\x20','parse','join','1382360tAqeYf','env','Warning:\x20Failed\x20to\x20read\x20config\x20file\x20','trim','split','110cVXRYU','replace','endsWith','profiles','10aCTteV','ap02','TD_API_KEY_','stg-jp01','dev-eu01','.env.','apiKeys','dev-us01','Warning:\x20Failed\x20to\x20cache\x20LLM\x20project\x20name:','entries','readFileSync','\x20(TD_API_KEY)','ap03','TD_API_KEY','1757oQlmLY','1925028hlblTU','3549141eGeSEW','TDX_CONFIG_DIR','TDX_CACHE_DIR','utf-8','stg-us01','llm_default_project','Warning:\x20Unknown\x20site\x20\x27','2iPpdgg','.env','profile:\x20','warn','stg-ap03','map','\x27,\x20defaulting\x20to\x20us01','7242cucmmq','261588gUcjKx','.cache','22508yPCdTh'];a35_0x4bad=function(){return _0x582752;};return a35_0x4bad();}(function(_0xe71ebd,_0x51ae02){const _0x138504=a35_0x7b5d,_0x157195=_0xe71ebd();while(!![]){try{const _0x2147e6=-parseInt(_0x138504(0xc7))/0x1*(-parseInt(_0x138504(0xcf))/0x2)+parseInt(_0x138504(0xbf))/0x3+parseInt(_0x138504(0xd1))/0x4*(-parseInt(_0x138504(0xb0))/0x5)+-parseInt(_0x138504(0xce))/0x6*(-parseInt(_0x138504(0xbe))/0x7)+parseInt(_0x138504(0xa7))/0x8+parseInt(_0x138504(0xc0))/0x9+parseInt(_0x138504(0xac))/0xa*(-parseInt(_0x138504(0xa1))/0xb);if(_0x2147e6===_0x51ae02)break;else _0x157195['push'](_0x157195['shift']());}catch(_0x5c64b9){_0x157195['push'](_0x157195['shift']());}}}(a35_0x4bad,0x5cbd6));import{homedir}from'os';import{join}from'path';import{existsSync,readFileSync,writeFileSync,mkdirSync}from'fs';import*as a35_0x1077e1 from'node:fs';import*as a35_0x379d7d from'node:path';import{SITE_ALIASES}from'../types/index.js';import{validateSecureFilePermissions}from'../utils/file-permissions.js';export function getConfigDir(){const _0x2902c6=a35_0x7b5d;return process['env'][_0x2902c6(0xc1)]||join(homedir(),_0x2902c6(0xd5),'tdx');}export function getConfigFile(){return join(getConfigDir(),'.env');}export function getConfigFilePath(_0x32dad9){const _0x1dd439=a35_0x7b5d,_0x5e348f=getConfigDir();return _0x32dad9?a35_0x379d7d[_0x1dd439(0xa6)](_0x5e348f,_0x1dd439(0xb5)+_0x32dad9):getConfigFile();}export function getCacheDir(){const _0x4d02b7=a35_0x7b5d;return process['env'][_0x4d02b7(0xc2)]||join(homedir(),_0x4d02b7(0xd0),_0x4d02b7(0xd3));}export function getLLMProjectCacheFile(){const _0x3e22d6=a35_0x7b5d;return join(getCacheDir(),_0x3e22d6(0xc5));}export function readCachedLLMProject(){const _0x2350fe=a35_0x7b5d;try{const _0x2d84b1=getLLMProjectCacheFile();if(!existsSync(_0x2d84b1))return null;return readFileSync(_0x2d84b1,_0x2350fe(0xc3))[_0x2350fe(0xaa)]();}catch{return null;}}export function writeCachedLLMProject(_0x1170f8){const _0x1e0a2c=a35_0x7b5d;try{const _0x57c6c2=getCacheDir(),_0x1b0f10=getLLMProjectCacheFile();!existsSync(_0x57c6c2)&&mkdirSync(_0x57c6c2,{'recursive':!![]}),writeFileSync(_0x1b0f10,_0x1170f8,'utf-8');}catch(_0x144658){console['error'](_0x1e0a2c(0xb8),_0x144658);}}export function parseEnvFile(_0x2cdaf9){const _0x150636=a35_0x7b5d,_0x354541={};for(const _0x206021 of _0x2cdaf9[_0x150636(0xab)]('\x0a')){const _0x4f2c3c=_0x206021[_0x150636(0xaa)]();if(!_0x4f2c3c||_0x4f2c3c[_0x150636(0xd4)]('#'))continue;const _0x151583=_0x4f2c3c['match'](/^([^=]+)=(.*)$/);if(_0x151583){const _0x157542=_0x151583[0x1][_0x150636(0xaa)]();let _0x1ff820=_0x151583[0x2]['trim']();(_0x1ff820['startsWith']('\x22')&&_0x1ff820[_0x150636(0xae)]('\x22')||_0x1ff820['startsWith']('\x27')&&_0x1ff820[_0x150636(0xae)]('\x27'))&&(_0x1ff820=_0x1ff820['slice'](0x1,-0x1)),_0x354541[_0x157542]=_0x1ff820;}}return _0x354541;}export function readUserConfig(){const _0x17b469=a35_0x7b5d,_0x27a276=getConfigFile();if(!existsSync(_0x27a276))return{};try{const _0x5eab81=readFileSync(_0x27a276,_0x17b469(0xc3));return parseEnvFile(_0x5eab81);}catch(_0x40e26a){return console[_0x17b469(0xca)](_0x17b469(0xa9)+_0x27a276+':',_0x40e26a),{};}}export function resolveSite(_0x24333d){const _0x3284c0=a35_0x7b5d,_0x33a87f=['us01',_0x3284c0(0xa0),'eu01',_0x3284c0(0xb1),_0x3284c0(0xbc),'dev-us01',_0x3284c0(0xb4),_0x3284c0(0xc4),_0x3284c0(0xb3),_0x3284c0(0xcb)];if(_0x33a87f[_0x3284c0(0xd2)](_0x24333d))return _0x24333d;if(_0x24333d in SITE_ALIASES)return SITE_ALIASES[_0x24333d];return console[_0x3284c0(0xca)](_0x3284c0(0xc6)+_0x24333d+_0x3284c0(0xcd)),_0x3284c0(0xa3);}let cachedUserConfig=null;export function loadUserConfigOnce(){return cachedUserConfig===null&&(cachedUserConfig=readUserConfig()),cachedUserConfig;}export function clearConfigCache(){cachedUserConfig=null;}function a35_0x7b5d(_0x4602ed,_0x5def34){const _0x4bad7c=a35_0x4bad();return a35_0x7b5d=function(_0x7b5d81,_0x1402ff){_0x7b5d81=_0x7b5d81-0x9f;let _0x536116=_0x4bad7c[_0x7b5d81];return _0x536116;},a35_0x7b5d(_0x4602ed,_0x5def34);}export function getAPIKey(_0x172ea1,_0x3bc254){const _0x9ee007=a35_0x7b5d,_0x53fbe3=_0x172ea1['toUpperCase']()[_0x9ee007(0xad)](/-/g,'_'),_0x3d00f4='TD_API_KEY_'+_0x53fbe3;if(process[_0x9ee007(0xa8)][_0x3d00f4])return process[_0x9ee007(0xa8)][_0x3d00f4];if(process[_0x9ee007(0xa8)][_0x9ee007(0xbd)])return process[_0x9ee007(0xa8)][_0x9ee007(0xbd)];const _0x1eb192=_0x3bc254||getActiveProfileName();if(_0x1eb192){const _0x16e905=loadProfileEnv(_0x1eb192);if(_0x16e905){if(_0x16e905[_0x3d00f4])return _0x16e905[_0x3d00f4];if(_0x16e905[_0x9ee007(0xbd)])return _0x16e905[_0x9ee007(0xbd)];}}const _0x22da24=loadUserConfigOnce();if(_0x22da24[_0x3d00f4])return _0x22da24[_0x3d00f4];if(_0x22da24['TD_API_KEY'])return _0x22da24[_0x9ee007(0xbd)];return undefined;}export function getAPIKeySource(_0x143dc4,_0x566841){const _0x1e6060=a35_0x7b5d,_0x4f0f59=_0x1e6060(0xb2)+_0x143dc4['toUpperCase']()[_0x1e6060(0xad)](/-/g,'_');if(process[_0x1e6060(0xa8)][_0x4f0f59])return _0x1e6060(0xd6)+_0x4f0f59;if(process[_0x1e6060(0xa8)][_0x1e6060(0xbd)])return'env:\x20TD_API_KEY';const _0x232cce=_0x566841||getActiveProfileName();if(_0x232cce){const _0x46857e=loadProfileEnv(_0x232cce);if(_0x46857e){if(_0x46857e[_0x4f0f59])return'profile:\x20'+_0x232cce+'\x20('+_0x4f0f59+')';if(_0x46857e[_0x1e6060(0xbd)])return _0x1e6060(0xc9)+_0x232cce+_0x1e6060(0xbb);}}const _0x154aaa=loadUserConfigOnce(),_0x229eee=getConfigFile();if(_0x154aaa[_0x4f0f59])return'global:\x20'+_0x229eee+'\x20('+_0x4f0f59+')';if(_0x154aaa[_0x1e6060(0xbd)])return _0x1e6060(0xa4)+_0x229eee+_0x1e6060(0xbb);return null;}function loadProfileEnv(_0x563b3e){const _0x79348d=a35_0x7b5d,_0x3d5eb9=a35_0x379d7d[_0x79348d(0xa6)](getConfigDir(),_0x79348d(0xb5)+_0x563b3e);if(a35_0x1077e1['existsSync'](_0x3d5eb9)){validateSecureFilePermissions(_0x3d5eb9);try{const _0x529bf9=a35_0x1077e1[_0x79348d(0xba)](_0x3d5eb9,'utf-8');return parseEnvFile(_0x529bf9);}catch(_0x5784c9){console[_0x79348d(0xca)](_0x79348d(0x9f)+_0x3d5eb9+':\x20'+_0x5784c9);}}const _0x1b0ba0=a35_0x379d7d[_0x79348d(0xa6)](getConfigDir(),_0x79348d(0xaf),_0x563b3e,_0x79348d(0xc8));if(a35_0x1077e1[_0x79348d(0xa2)](_0x1b0ba0)){validateSecureFilePermissions(_0x1b0ba0);try{const _0x40650f=a35_0x1077e1['readFileSync'](_0x1b0ba0,_0x79348d(0xc3));return parseEnvFile(_0x40650f);}catch(_0x1cfccb){return console[_0x79348d(0xca)]('Warning:\x20Failed\x20to\x20load\x20'+_0x1b0ba0+':\x20'+_0x1cfccb),null;}}return null;}function getActiveProfileName(){const _0xac9831=a35_0x7b5d,_0x336b1a=a35_0x379d7d[_0xac9831(0xa6)](getConfigDir(),'tdx.json');if(!a35_0x1077e1[_0xac9831(0xa2)](_0x336b1a))return null;try{const _0x5e2359=a35_0x1077e1['readFileSync'](_0x336b1a,_0xac9831(0xc3)),_0x5b3e18=JSON[_0xac9831(0xa5)](_0x5e2359);return _0x5b3e18['profile']||null;}catch{return null;}}export function saveAPIKey(_0x4132f9,_0x947508,_0x4e9260){const _0x316e18=a35_0x7b5d,_0x4abb5e=getConfigDir(),_0x31699a=getConfigFilePath(_0x4e9260);!existsSync(_0x4abb5e)&&mkdirSync(_0x4abb5e,{'recursive':!![],'mode':0x1c0});let _0x1dbed6={};if(existsSync(_0x31699a))try{const _0x34d605=readFileSync(_0x31699a,'utf-8');_0x1dbed6=parseEnvFile(_0x34d605);}catch(_0x520d79){console[_0x316e18(0xca)]('Warning:\x20Failed\x20to\x20read\x20'+_0x31699a+':',_0x520d79);}const _0x2d9cff=_0x4132f9['toUpperCase']()[_0x316e18(0xad)](/-/g,'_');_0x1dbed6['TD_API_KEY_'+_0x2d9cff]=_0x947508;const _0xc61be=Object[_0x316e18(0xb9)](_0x1dbed6)[_0x316e18(0xcc)](([_0x127d6d,_0x887a8d])=>_0x127d6d+'='+_0x887a8d);writeFileSync(_0x31699a,_0xc61be[_0x316e18(0xa6)]('\x0a')+'\x0a',{'mode':0x180});}export function loadConfig(){const _0x3ca234=a35_0x7b5d,_0x224848={'apiKeys':{},'defaultSite':_0x3ca234(0xa3)},_0x480a7b=[_0x3ca234(0xa3),_0x3ca234(0xa0),'eu01',_0x3ca234(0xb1),'ap03',_0x3ca234(0xb7),_0x3ca234(0xb4),_0x3ca234(0xc4),'stg-jp01','stg-ap03'];for(const _0x289f4a of _0x480a7b){const _0x11b10f=getAPIKey(_0x289f4a);_0x11b10f&&(_0x224848[_0x3ca234(0xb6)][_0x289f4a]=_0x11b10f);}return _0x224848;}
1
+ (function(_0x4f6417,_0x21f7db){const _0x42d38e=a35_0x117e,_0x3dce95=_0x4f6417();while(!![]){try{const _0x19c1e7=parseInt(_0x42d38e(0xfb))/0x1*(parseInt(_0x42d38e(0xff))/0x2)+parseInt(_0x42d38e(0x111))/0x3+parseInt(_0x42d38e(0xec))/0x4+parseInt(_0x42d38e(0x11e))/0x5+-parseInt(_0x42d38e(0xf6))/0x6+-parseInt(_0x42d38e(0x11a))/0x7*(parseInt(_0x42d38e(0x120))/0x8)+-parseInt(_0x42d38e(0xfc))/0x9;if(_0x19c1e7===_0x21f7db)break;else _0x3dce95['push'](_0x3dce95['shift']());}catch(_0x3a57d5){_0x3dce95['push'](_0x3dce95['shift']());}}}(a35_0x3f5e,0xa72e0));import{homedir}from'os';import{join}from'path';import{existsSync,readFileSync,writeFileSync,mkdirSync}from'fs';import*as a35_0x22b1c0 from'node:fs';import*as a35_0x3f5166 from'node:path';function a35_0x117e(_0x2489dd,_0x55ff78){const _0x3f5eed=a35_0x3f5e();return a35_0x117e=function(_0x117e12,_0x580b8c){_0x117e12=_0x117e12-0xec;let _0x1245b6=_0x3f5eed[_0x117e12];return _0x1245b6;},a35_0x117e(_0x2489dd,_0x55ff78);}import{SITE_ALIASES}from'../types/index.js';import{validateSecureFilePermissions}from'../utils/file-permissions.js';export function getConfigDir(){const _0x5496c1=a35_0x117e;return process['env'][_0x5496c1(0xfa)]||join(homedir(),'.config','tdx');}export function getConfigFile(){const _0x490b3e=a35_0x117e;return join(getConfigDir(),_0x490b3e(0xf9));}export function getConfigFilePath(_0x32893d){const _0x31ba34=a35_0x117e,_0x4ad1a8=getConfigDir();return _0x32893d?a35_0x3f5166[_0x31ba34(0x116)](_0x4ad1a8,_0x31ba34(0xf0)+_0x32893d):getConfigFile();}export function getCacheDir(){const _0x12b369=a35_0x117e;return process[_0x12b369(0x122)][_0x12b369(0x10b)]||join(homedir(),_0x12b369(0x119),_0x12b369(0x104));}export function getLLMProjectCacheFile(){const _0x2cd50d=a35_0x117e;return join(getCacheDir(),_0x2cd50d(0xf7));}export function readCachedLLMProject(){const _0x439dc4=a35_0x117e;try{const _0x32ff3a=getLLMProjectCacheFile();if(!existsSync(_0x32ff3a))return null;return readFileSync(_0x32ff3a,_0x439dc4(0xee))['trim']();}catch{return null;}}export function writeCachedLLMProject(_0x172d52){const _0x20b9c2=a35_0x117e;try{const _0x5bbc7b=getCacheDir(),_0x2ab439=getLLMProjectCacheFile();!existsSync(_0x5bbc7b)&&mkdirSync(_0x5bbc7b,{'recursive':!![]}),writeFileSync(_0x2ab439,_0x172d52,'utf-8');}catch(_0x1f8992){console['error'](_0x20b9c2(0x113),_0x1f8992);}}function a35_0x3f5e(){const _0x2f9a3d=['4352155GrloWb','us01','376UrBXRH','trim','env','4976248KBZReD','global:\x20','utf-8','replace','.env.','toUpperCase','existsSync','eu01','env:\x20TD_API_KEY','readFileSync','4345998DPtVQP','llm_default_project','\x20(TD_API_KEY)','.env','TDX_CONFIG_DIR','32LRZoKA','11669985mmZGAS','includes','TD_API_KEY','44570uEcLeO','Warning:\x20Failed\x20to\x20load\x20','Warning:\x20Failed\x20to\x20read\x20','ap02','tdx.json','tdx','dev-eu01','profile:\x20','env:\x20','stg-ap03','apiKeys','warn','TDX_CACHE_DIR','\x27,\x20defaulting\x20to\x20us01','profile','slice','dev-us01','split','3214590fygMIA','stg-jp01','Warning:\x20Failed\x20to\x20cache\x20LLM\x20project\x20name:','endsWith','match','join','entries','ap03','.cache','177737zunjll','stg-us01','startsWith','TD_API_KEY_'];a35_0x3f5e=function(){return _0x2f9a3d;};return a35_0x3f5e();}export function parseEnvFile(_0x5e0786){const _0x1e681e=a35_0x117e,_0x55da11={};for(const _0x3d0c83 of _0x5e0786[_0x1e681e(0x110)]('\x0a')){const _0x4cec9e=_0x3d0c83[_0x1e681e(0x121)]();if(!_0x4cec9e||_0x4cec9e[_0x1e681e(0x11c)]('#'))continue;const _0x2d138b=_0x4cec9e[_0x1e681e(0x115)](/^([^=]+)=(.*)$/);if(_0x2d138b){const _0x38b337=_0x2d138b[0x1][_0x1e681e(0x121)]();let _0x5824f4=_0x2d138b[0x2][_0x1e681e(0x121)]();(_0x5824f4['startsWith']('\x22')&&_0x5824f4[_0x1e681e(0x114)]('\x22')||_0x5824f4[_0x1e681e(0x11c)]('\x27')&&_0x5824f4['endsWith']('\x27'))&&(_0x5824f4=_0x5824f4[_0x1e681e(0x10e)](0x1,-0x1)),_0x55da11[_0x38b337]=_0x5824f4;}}return _0x55da11;}export function readUserConfig(){const _0x51e276=a35_0x117e,_0x432e4d=getConfigFile();if(!existsSync(_0x432e4d))return{};try{const _0x43c2e0=readFileSync(_0x432e4d,_0x51e276(0xee));return parseEnvFile(_0x43c2e0);}catch(_0xcb78c0){return console[_0x51e276(0x10a)]('Warning:\x20Failed\x20to\x20read\x20config\x20file\x20'+_0x432e4d+':',_0xcb78c0),{};}}export function resolveSite(_0x1b722e){const _0xe35043=a35_0x117e,_0x508843=['us01','jp01',_0xe35043(0xf3),_0xe35043(0x102),_0xe35043(0x118),_0xe35043(0x10f),_0xe35043(0x105),_0xe35043(0x11b),_0xe35043(0x112),_0xe35043(0x108)];if(_0x508843[_0xe35043(0xfd)](_0x1b722e))return _0x1b722e;if(_0x1b722e in SITE_ALIASES)return SITE_ALIASES[_0x1b722e];return console['warn']('Warning:\x20Unknown\x20site\x20\x27'+_0x1b722e+_0xe35043(0x10c)),_0xe35043(0x11f);}let cachedUserConfig=null;export function loadUserConfigOnce(){return cachedUserConfig===null&&(cachedUserConfig=readUserConfig()),cachedUserConfig;}export function clearConfigCache(){cachedUserConfig=null;}export function getAPIKey(_0x23c9f9,_0x4eac90){const _0x557ae5=a35_0x117e,_0x18581c=_0x23c9f9['toUpperCase']()[_0x557ae5(0xef)](/-/g,'_'),_0xcba6=_0x557ae5(0x11d)+_0x18581c;if(process[_0x557ae5(0x122)][_0xcba6])return process['env'][_0xcba6];if(process[_0x557ae5(0x122)][_0x557ae5(0xfe)])return process[_0x557ae5(0x122)][_0x557ae5(0xfe)];const _0x3f9410=_0x4eac90||getActiveProfileName();if(_0x3f9410){const _0x1b6223=loadProfileEnv(_0x3f9410);if(_0x1b6223){if(_0x1b6223[_0xcba6])return _0x1b6223[_0xcba6];if(_0x1b6223['TD_API_KEY'])return _0x1b6223[_0x557ae5(0xfe)];}}const _0x5550e7=loadUserConfigOnce();if(_0x5550e7[_0xcba6])return _0x5550e7[_0xcba6];if(_0x5550e7[_0x557ae5(0xfe)])return _0x5550e7[_0x557ae5(0xfe)];return undefined;}export function getAPIKeySource(_0x330a8d,_0x26af8e){const _0x342c72=a35_0x117e,_0xdb6be7='TD_API_KEY_'+_0x330a8d['toUpperCase']()['replace'](/-/g,'_');if(process[_0x342c72(0x122)][_0xdb6be7])return _0x342c72(0x107)+_0xdb6be7;if(process['env'][_0x342c72(0xfe)])return _0x342c72(0xf4);const _0x377868=_0x26af8e||getActiveProfileName();if(_0x377868){const _0x4ce7fb=loadProfileEnv(_0x377868);if(_0x4ce7fb){if(_0x4ce7fb[_0xdb6be7])return _0x342c72(0x106)+_0x377868+'\x20('+_0xdb6be7+')';if(_0x4ce7fb[_0x342c72(0xfe)])return _0x342c72(0x106)+_0x377868+'\x20(TD_API_KEY)';}}const _0x532289=loadUserConfigOnce(),_0x3b3d20=getConfigFile();if(_0x532289[_0xdb6be7])return _0x342c72(0xed)+_0x3b3d20+'\x20('+_0xdb6be7+')';if(_0x532289[_0x342c72(0xfe)])return _0x342c72(0xed)+_0x3b3d20+_0x342c72(0xf8);return null;}function loadProfileEnv(_0x390626){const _0x36a8ff=a35_0x117e,_0x31a35c=a35_0x3f5166['join'](getConfigDir(),_0x36a8ff(0xf0)+_0x390626);if(a35_0x22b1c0[_0x36a8ff(0xf2)](_0x31a35c)){validateSecureFilePermissions(_0x31a35c);try{const _0x3645a5=a35_0x22b1c0[_0x36a8ff(0xf5)](_0x31a35c,'utf-8');return parseEnvFile(_0x3645a5);}catch(_0x348f80){console[_0x36a8ff(0x10a)](_0x36a8ff(0x100)+_0x31a35c+':\x20'+_0x348f80);}}const _0x3aa472=a35_0x3f5166[_0x36a8ff(0x116)](getConfigDir(),'profiles',_0x390626,_0x36a8ff(0xf9));if(a35_0x22b1c0[_0x36a8ff(0xf2)](_0x3aa472)){validateSecureFilePermissions(_0x3aa472);try{const _0x52d5e8=a35_0x22b1c0[_0x36a8ff(0xf5)](_0x3aa472,_0x36a8ff(0xee));return parseEnvFile(_0x52d5e8);}catch(_0x148ab1){return console['warn'](_0x36a8ff(0x100)+_0x3aa472+':\x20'+_0x148ab1),null;}}return null;}function getActiveProfileName(){const _0x5ebcaf=a35_0x117e,_0x2b950c=a35_0x3f5166['join'](getConfigDir(),_0x5ebcaf(0x103));if(!a35_0x22b1c0[_0x5ebcaf(0xf2)](_0x2b950c))return null;try{const _0x38e5f3=a35_0x22b1c0[_0x5ebcaf(0xf5)](_0x2b950c,'utf-8'),_0x12ea97=JSON['parse'](_0x38e5f3);return _0x12ea97[_0x5ebcaf(0x10d)]||null;}catch{return null;}}export function saveAPIKey(_0xb945de,_0x38e502,_0x3d6b3e){const _0x41017d=a35_0x117e,_0x174ca4=getConfigDir(),_0x345bfd=getConfigFilePath(_0x3d6b3e);!existsSync(_0x174ca4)&&mkdirSync(_0x174ca4,{'recursive':!![],'mode':0x1c0});let _0x11bb2c={};if(existsSync(_0x345bfd))try{const _0x2df37b=readFileSync(_0x345bfd,'utf-8');_0x11bb2c=parseEnvFile(_0x2df37b);}catch(_0x327882){console[_0x41017d(0x10a)](_0x41017d(0x101)+_0x345bfd+':',_0x327882);}const _0x408fc2=_0xb945de[_0x41017d(0xf1)]()[_0x41017d(0xef)](/-/g,'_');_0x11bb2c[_0x41017d(0x11d)+_0x408fc2]=_0x38e502;const _0x481ff2=Object[_0x41017d(0x117)](_0x11bb2c)['map'](([_0x3e4272,_0x1619de])=>_0x3e4272+'='+_0x1619de);writeFileSync(_0x345bfd,_0x481ff2[_0x41017d(0x116)]('\x0a')+'\x0a',{'mode':0x180});}export function loadConfig(){const _0x2eb7e8=a35_0x117e,_0x5891f6={'apiKeys':{},'defaultSite':_0x2eb7e8(0x11f)},_0x501504=[_0x2eb7e8(0x11f),'jp01','eu01',_0x2eb7e8(0x102),_0x2eb7e8(0x118),_0x2eb7e8(0x10f),_0x2eb7e8(0x105),_0x2eb7e8(0x11b),_0x2eb7e8(0x112),'stg-ap03'];for(const _0x10fdc9 of _0x501504){const _0xa4bf54=getAPIKey(_0x10fdc9);_0xa4bf54&&(_0x5891f6[_0x2eb7e8(0x109)][_0x10fdc9]=_0xa4bf54);}return _0x5891f6;}