@treasuredata/tdx 0.2.2 → 0.2.4

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 (92) hide show
  1. package/dist/build-info.json +2 -2
  2. package/dist/cli.js +1 -1
  3. package/dist/client/cdp-client.js +1 -1
  4. package/dist/client/http-client.js +1 -1
  5. package/dist/client/llm-client.d.ts +1 -0
  6. package/dist/client/llm-client.d.ts.map +1 -1
  7. package/dist/client/llm-client.js +1 -1
  8. package/dist/client/llm-client.js.map +1 -1
  9. package/dist/client/rate-limiter.js +1 -1
  10. package/dist/client/td-client.js +1 -1
  11. package/dist/client/trino-client.js +1 -1
  12. package/dist/client/workflow-client.js +1 -1
  13. package/dist/commands/activations.js +1 -1
  14. package/dist/commands/api-command.js +1 -1
  15. package/dist/commands/chat-command.js +1 -1
  16. package/dist/commands/claude-command.js +1 -1
  17. package/dist/commands/command.js +1 -1
  18. package/dist/commands/context-command.js +1 -1
  19. package/dist/commands/databases.js +1 -1
  20. package/dist/commands/describe.js +1 -1
  21. package/dist/commands/job-command.js +1 -1
  22. package/dist/commands/llm-command.js +1 -1
  23. package/dist/commands/llm-proxy.js +1 -1
  24. package/dist/commands/parent-segment-command.js +1 -1
  25. package/dist/commands/profiles-command.js +1 -1
  26. package/dist/commands/query-command.js +1 -1
  27. package/dist/commands/segment-command.js +1 -1
  28. package/dist/commands/segment-create-command.js +1 -1
  29. package/dist/commands/segment-fields-command.js +1 -1
  30. package/dist/commands/segment-pwd-command.js +1 -1
  31. package/dist/commands/segment-update-command.js +1 -1
  32. package/dist/commands/segment-use-command.js +1 -1
  33. package/dist/commands/segments.js +1 -1
  34. package/dist/commands/show.js +1 -1
  35. package/dist/commands/tables.js +1 -1
  36. package/dist/commands/use-command.js +1 -1
  37. package/dist/commands/workflow-command.js +1 -1
  38. package/dist/core/auth.js +1 -1
  39. package/dist/core/config.js +1 -1
  40. package/dist/core/global-context.js +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.d.ts +9 -1
  46. package/dist/proxy/anthropic-adapter.d.ts.map +1 -1
  47. package/dist/proxy/anthropic-adapter.js +1 -1
  48. package/dist/proxy/anthropic-adapter.js.map +1 -1
  49. package/dist/proxy/server.d.ts.map +1 -1
  50. package/dist/proxy/server.js +1 -1
  51. package/dist/proxy/server.js.map +1 -1
  52. package/dist/proxy/session-cache.js +1 -1
  53. package/dist/sdk/api.js +1 -1
  54. package/dist/sdk/database.js +1 -1
  55. package/dist/sdk/errors.js +1 -1
  56. package/dist/sdk/index.js +1 -1
  57. package/dist/sdk/job.js +1 -1
  58. package/dist/sdk/llm.js +1 -1
  59. package/dist/sdk/query.js +1 -1
  60. package/dist/sdk/segment.js +1 -1
  61. package/dist/sdk/table.js +1 -1
  62. package/dist/sdk/workflow.js +1 -1
  63. package/dist/types/anthropic.d.ts +3 -2
  64. package/dist/types/anthropic.d.ts.map +1 -1
  65. package/dist/types/endpoints.js +1 -1
  66. package/dist/types/index.js +1 -1
  67. package/dist/utils/agent-ref-parser.js +1 -1
  68. package/dist/utils/chat-cache.js +1 -1
  69. package/dist/utils/colors.js +1 -1
  70. package/dist/utils/command-output.js +1 -1
  71. package/dist/utils/constants.js +1 -1
  72. package/dist/utils/file-permissions.js +1 -1
  73. package/dist/utils/format-detector.js +1 -1
  74. package/dist/utils/formatters.js +1 -1
  75. package/dist/utils/json-loader.js +1 -1
  76. package/dist/utils/model-aliases.js +1 -1
  77. package/dist/utils/option-validation.js +1 -1
  78. package/dist/utils/port.js +1 -1
  79. package/dist/utils/process.js +1 -1
  80. package/dist/utils/prompt.js +1 -1
  81. package/dist/utils/segment-path-parser.js +1 -1
  82. package/dist/utils/segment-ref-parser.js +1 -1
  83. package/dist/utils/spinner.js +1 -1
  84. package/dist/utils/sql-parser.js +1 -1
  85. package/dist/utils/sse-parser.js +1 -1
  86. package/dist/utils/string-utils.js +1 -1
  87. package/dist/utils/table-ref-parser.js +1 -1
  88. package/dist/utils/tdx-logger.js +1 -1
  89. package/dist/utils/tree-formatter.js +1 -1
  90. package/dist/utils/version-check.js +1 -1
  91. package/dist/utils/workflow-utils.js +1 -1
  92. package/package.json +1 -1
@@ -1 +1 @@
1
- const a26_0x584790=a26_0x4a97;function a26_0x4a97(_0x5729fe,_0x416516){const _0x1ee9d2=a26_0x1ee9();return a26_0x4a97=function(_0x4a970c,_0xd33946){_0x4a970c=_0x4a970c-0xfb;let _0x54d0de=_0x1ee9d2[_0x4a970c];return _0x54d0de;},a26_0x4a97(_0x5729fe,_0x416516);}(function(_0x5022e7,_0x40350e){const _0x5413f4=a26_0x4a97,_0x521184=_0x5022e7();while(!![]){try{const _0x3c99d3=parseInt(_0x5413f4(0x115))/0x1*(-parseInt(_0x5413f4(0x10a))/0x2)+parseInt(_0x5413f4(0xff))/0x3+parseInt(_0x5413f4(0x110))/0x4*(-parseInt(_0x5413f4(0x120))/0x5)+-parseInt(_0x5413f4(0xfb))/0x6*(parseInt(_0x5413f4(0x117))/0x7)+parseInt(_0x5413f4(0x108))/0x8+-parseInt(_0x5413f4(0x10c))/0x9*(parseInt(_0x5413f4(0x101))/0xa)+parseInt(_0x5413f4(0x119))/0xb;if(_0x3c99d3===_0x40350e)break;else _0x521184['push'](_0x521184['shift']());}catch(_0x3fdf9e){_0x521184['push'](_0x521184['shift']());}}}(a26_0x1ee9,0x8e8ea));import{BaseCommand}from'./command.js';function a26_0x1ee9(){const _0x91a09=['\x20\x20tdx\x20segment\x20update\x20\x22High\x20Value\x22\x20--rule\x20\x27...\x27\x20\x20#\x20Relative\x20to\x20context','segmentName','rule','Segment\x20ID:\x20','10knnNTY','verbose','length','Error:\x20Cannot\x20update\x20','data','segment:update','92838bUpbIC','folder','segment','Resolved\x20folder\x20ID:\x20','2720847umlNno','Updating\x20segment\x20\x27','5070740uvwmtP','parentId','\x27...','Use:\x20tdx\x20segment\x20update\x20<path_to_segment>\x20[options]','Examples:','segmentId','resolveFolderId','2341688rCSAHo','kind','34mjQPLS','includes','9mILIvu','segmentPath','error','type','2109568pWWQne','Resolving\x20path\x20\x27','Segment\x20ID\x20missing\x20from\x20resolved\x20path','execute','INTERNAL','59485QRXXct','Parent\x20ID:\x20','49KdnxYM','\x20\x20\x20Path:\x20','22722348YuhfrY','name','Resolved\x20type:\x20'];a26_0x1ee9=function(){return _0x91a09;};return a26_0x1ee9();}import{handleSDKOutput}from'../utils/command-output.js';import{withSpinner}from'../utils/spinner.js';import{loadJSONFromOptions}from'../utils/json-loader.js';import{SDKError,ErrorCode}from'../sdk/index.js';export class SegmentUpdateCommand extends BaseCommand{[a26_0x584790(0x11a)]=a26_0x584790(0x125);['description']='Update\x20existing\x20child\x20segment';async[a26_0x584790(0x113)](_0x22cc03){const _0x54f84e=a26_0x584790,{options:_0x3c399e,args:_0x2a2c19,tdx:_0x370b73}=_0x22cc03,_0x3fc86c=_0x3c399e;if(_0x2a2c19[_0x54f84e(0x122)]===0x0)return console['error']('Error:\x20Segment\x20path\x20or\x20name\x20is\x20required'),console[_0x54f84e(0x10e)]('Usage:\x20tdx\x20segment\x20update\x20<path>\x20[options]'),console[_0x54f84e(0x10e)](_0x54f84e(0x105)),console[_0x54f84e(0x10e)]('\x20\x20tdx\x20segment\x20update\x20\x22My\x20Audience/High\x20Value\x22\x20--description\x20\x22...\x22'),console[_0x54f84e(0x10e)](_0x54f84e(0x11c)),0x1;const _0x3ab14f=_0x2a2c19[0x0],_0x8284ab=_0x3c399e[_0x54f84e(0x10d)];let _0x6fa076=_0x3ab14f;_0x8284ab&&!_0x3ab14f[_0x54f84e(0x10b)]('/')&&(_0x6fa076=_0x8284ab+'/'+_0x3ab14f,_0x3fc86c[_0x54f84e(0x121)]&&console[_0x54f84e(0x10e)]('Resolved\x20relative\x20path\x20to:\x20'+_0x6fa076));const _0x1d8c85=await withSpinner(_0x54f84e(0x111)+_0x6fa076+_0x54f84e(0x103),()=>_0x370b73[_0x54f84e(0xfd)]['resolvePathToResource'](_0x6fa076),{'verbose':_0x3fc86c[_0x54f84e(0x121)]}),_0x3e1a91=_0x1d8c85[_0x54f84e(0x124)];_0x3fc86c[_0x54f84e(0x121)]&&console[_0x54f84e(0x10e)](_0x54f84e(0x11b)+_0x3e1a91[_0x54f84e(0x10f)]);if(_0x3e1a91[_0x54f84e(0x10f)]!==_0x54f84e(0xfd))return console['error'](_0x54f84e(0x123)+_0x3e1a91[_0x54f84e(0x10f)]+'.\x20Only\x20child\x20segments\x20can\x20be\x20updated.'),console[_0x54f84e(0x10e)](_0x54f84e(0x104)),0x1;if(!_0x3e1a91[_0x54f84e(0x106)])throw new SDKError(ErrorCode[_0x54f84e(0x114)],_0x54f84e(0x112));const _0x474b30=_0x3e1a91[_0x54f84e(0x102)],_0x14acf4=_0x3e1a91[_0x54f84e(0x106)];_0x3fc86c['verbose']&&(console['error'](_0x54f84e(0x116)+_0x474b30),console[_0x54f84e(0x10e)](_0x54f84e(0x11f)+_0x14acf4));let _0x313b4e;if(_0x3fc86c[_0x54f84e(0xfc)]){const _0x3159eb=_0x3fc86c[_0x54f84e(0xfc)],_0x4c3842=await withSpinner('Resolving\x20folder\x20\x27'+_0x3159eb+_0x54f84e(0x103),()=>_0x370b73[_0x54f84e(0xfd)][_0x54f84e(0x107)](_0x474b30,_0x3159eb),{'verbose':_0x3fc86c['verbose']});_0x313b4e=parseInt(_0x4c3842[_0x54f84e(0x124)],0xa),_0x3fc86c['verbose']&&console[_0x54f84e(0x10e)](_0x54f84e(0xfe)+_0x313b4e);}const _0x1cd2ab=await loadJSONFromOptions(_0x3fc86c[_0x54f84e(0x11e)],_0x3fc86c['ruleFile']),_0x43cb4e={'name':_0x3fc86c[_0x54f84e(0x11a)],'description':_0x3fc86c['description'],'rule':_0x1cd2ab,'kind':_0x3fc86c[_0x54f84e(0x109)]!==undefined?parseInt(_0x3fc86c[_0x54f84e(0x109)],0xa):undefined,'segmentFolderId':_0x313b4e},_0x470246=await withSpinner(_0x54f84e(0x100)+_0x3e1a91[_0x54f84e(0x11d)]+_0x54f84e(0x103),()=>_0x370b73[_0x54f84e(0xfd)]['updateSegmentById'](_0x474b30,_0x14acf4,_0x43cb4e),{'verbose':_0x3fc86c[_0x54f84e(0x121)]}),_0x424bac=_0x470246['data'];return console[_0x54f84e(0x10e)]('✔\x20Updated\x20segment\x20\x27'+_0x424bac[_0x54f84e(0x11a)]+'\x27'),_0x6fa076!==_0x3ab14f&&console[_0x54f84e(0x10e)](_0x54f84e(0x118)+_0x6fa076),await handleSDKOutput([_0x424bac],_0x3fc86c),0x0;}}
1
+ const a26_0x55f205=a26_0x1996;function a26_0x1996(_0x2624e9,_0x1edc71){const _0x2fce98=a26_0x2fce();return a26_0x1996=function(_0x1996f6,_0x70fbd7){_0x1996f6=_0x1996f6-0x1dd;let _0x27970b=_0x2fce98[_0x1996f6];return _0x27970b;},a26_0x1996(_0x2624e9,_0x1edc71);}(function(_0x5d3726,_0x1dad24){const _0x5b54ca=a26_0x1996,_0x4f3326=_0x5d3726();while(!![]){try{const _0x3411d4=parseInt(_0x5b54ca(0x1e9))/0x1+-parseInt(_0x5b54ca(0x1e4))/0x2*(-parseInt(_0x5b54ca(0x1f7))/0x3)+parseInt(_0x5b54ca(0x1e7))/0x4*(-parseInt(_0x5b54ca(0x1fd))/0x5)+parseInt(_0x5b54ca(0x1ee))/0x6*(parseInt(_0x5b54ca(0x1eb))/0x7)+parseInt(_0x5b54ca(0x1f2))/0x8+-parseInt(_0x5b54ca(0x1f0))/0x9*(parseInt(_0x5b54ca(0x1ea))/0xa)+-parseInt(_0x5b54ca(0x206))/0xb;if(_0x3411d4===_0x1dad24)break;else _0x4f3326['push'](_0x4f3326['shift']());}catch(_0x213626){_0x4f3326['push'](_0x4f3326['shift']());}}}(a26_0x2fce,0xd3f55));import{BaseCommand}from'./command.js';function a26_0x2fce(){const _0x272da0=['Resolving\x20folder\x20\x27','✔\x20Updated\x20segment\x20\x27','.\x20Only\x20child\x20segments\x20can\x20be\x20updated.','33754gMvEHx','\x20\x20tdx\x20segment\x20update\x20\x22My\x20Audience/High\x20Value\x22\x20--description\x20\x22...\x22','resolveFolderId','20RlEwYo','Examples:','680406KQmSzk','100gffLSD','28154VidOKT','\x27...','type','2364bzywRi','Updating\x20segment\x20\x27','850113yCkKfo','Use:\x20tdx\x20segment\x20update\x20<path_to_segment>\x20[options]','207384pcRCBT','parentId','includes','segment','length','234mmaBtJ','data','segmentId','resolvePathToResource','Segment\x20ID\x20missing\x20from\x20resolved\x20path','Resolved\x20folder\x20ID:\x20','615590uhkSSV','\x20\x20\x20Path:\x20','Usage:\x20tdx\x20segment\x20update\x20<path>\x20[options]','Segment\x20ID:\x20','segmentName','Resolved\x20relative\x20path\x20to:\x20','Resolving\x20path\x20\x27','Parent\x20ID:\x20','description','12969682EybtJy','folder','error','rule','updateSegmentById','kind','name','verbose','Error:\x20Segment\x20path\x20or\x20name\x20is\x20required','segmentPath','Error:\x20Cannot\x20update\x20'];a26_0x2fce=function(){return _0x272da0;};return a26_0x2fce();}import{handleSDKOutput}from'../utils/command-output.js';import{withSpinner}from'../utils/spinner.js';import{loadJSONFromOptions}from'../utils/json-loader.js';import{SDKError,ErrorCode}from'../sdk/index.js';export class SegmentUpdateCommand extends BaseCommand{[a26_0x55f205(0x20c)]='segment:update';[a26_0x55f205(0x205)]='Update\x20existing\x20child\x20segment';async['execute'](_0x48ee69){const _0x3a9e4d=a26_0x55f205,{options:_0x571189,args:_0x3fd406,tdx:_0x227346}=_0x48ee69,_0x4542d5=_0x571189;if(_0x3fd406[_0x3a9e4d(0x1f6)]===0x0)return console[_0x3a9e4d(0x208)](_0x3a9e4d(0x1de)),console[_0x3a9e4d(0x208)](_0x3a9e4d(0x1ff)),console[_0x3a9e4d(0x208)](_0x3a9e4d(0x1e8)),console[_0x3a9e4d(0x208)](_0x3a9e4d(0x1e5)),console['error']('\x20\x20tdx\x20segment\x20update\x20\x22High\x20Value\x22\x20--rule\x20\x27...\x27\x20\x20#\x20Relative\x20to\x20context'),0x1;const _0x38e43b=_0x3fd406[0x0],_0x1a7b21=_0x571189[_0x3a9e4d(0x1df)];let _0x150f66=_0x38e43b;_0x1a7b21&&!_0x38e43b[_0x3a9e4d(0x1f4)]('/')&&(_0x150f66=_0x1a7b21+'/'+_0x38e43b,_0x4542d5[_0x3a9e4d(0x1dd)]&&console[_0x3a9e4d(0x208)](_0x3a9e4d(0x202)+_0x150f66));const _0x2fe654=await withSpinner(_0x3a9e4d(0x203)+_0x150f66+_0x3a9e4d(0x1ec),()=>_0x227346[_0x3a9e4d(0x1f5)][_0x3a9e4d(0x1fa)](_0x150f66),{'verbose':_0x4542d5[_0x3a9e4d(0x1dd)]}),_0x514610=_0x2fe654['data'];_0x4542d5['verbose']&&console[_0x3a9e4d(0x208)]('Resolved\x20type:\x20'+_0x514610['type']);if(_0x514610[_0x3a9e4d(0x1ed)]!==_0x3a9e4d(0x1f5))return console[_0x3a9e4d(0x208)](_0x3a9e4d(0x1e0)+_0x514610['type']+_0x3a9e4d(0x1e3)),console['error'](_0x3a9e4d(0x1f1)),0x1;if(!_0x514610[_0x3a9e4d(0x1f9)])throw new SDKError(ErrorCode['INTERNAL'],_0x3a9e4d(0x1fb));const _0x51b228=_0x514610[_0x3a9e4d(0x1f3)],_0x253314=_0x514610['segmentId'];_0x4542d5['verbose']&&(console[_0x3a9e4d(0x208)](_0x3a9e4d(0x204)+_0x51b228),console[_0x3a9e4d(0x208)](_0x3a9e4d(0x200)+_0x253314));let _0x3e9402;if(_0x4542d5['folder']){const _0x4c5070=_0x4542d5[_0x3a9e4d(0x207)],_0x42d3fb=await withSpinner(_0x3a9e4d(0x1e1)+_0x4c5070+_0x3a9e4d(0x1ec),()=>_0x227346['segment'][_0x3a9e4d(0x1e6)](_0x51b228,_0x4c5070),{'verbose':_0x4542d5['verbose']});_0x3e9402=parseInt(_0x42d3fb[_0x3a9e4d(0x1f8)],0xa),_0x4542d5[_0x3a9e4d(0x1dd)]&&console['error'](_0x3a9e4d(0x1fc)+_0x3e9402);}const _0x25b9eb=await loadJSONFromOptions(_0x4542d5[_0x3a9e4d(0x209)],_0x4542d5['ruleFile']),_0x35017b={'name':_0x4542d5[_0x3a9e4d(0x20c)],'description':_0x4542d5['description'],'rule':_0x25b9eb,'kind':_0x4542d5[_0x3a9e4d(0x20b)]!==undefined?parseInt(_0x4542d5[_0x3a9e4d(0x20b)],0xa):undefined,'segmentFolderId':_0x3e9402},_0x58b587=await withSpinner(_0x3a9e4d(0x1ef)+_0x514610[_0x3a9e4d(0x201)]+_0x3a9e4d(0x1ec),()=>_0x227346[_0x3a9e4d(0x1f5)][_0x3a9e4d(0x20a)](_0x51b228,_0x253314,_0x35017b),{'verbose':_0x4542d5[_0x3a9e4d(0x1dd)]}),_0x1fa0b3=_0x58b587[_0x3a9e4d(0x1f8)];return console['error'](_0x3a9e4d(0x1e2)+_0x1fa0b3[_0x3a9e4d(0x20c)]+'\x27'),_0x150f66!==_0x38e43b&&console[_0x3a9e4d(0x208)](_0x3a9e4d(0x1fe)+_0x150f66),await handleSDKOutput([_0x1fa0b3],_0x4542d5),0x0;}}
@@ -1 +1 @@
1
- const a27_0x1fb82e=a27_0x24b1;function a27_0x24b1(_0x30a1ec,_0x3aca92){const _0x3b7a01=a27_0x3b7a();return a27_0x24b1=function(_0x24b1f1,_0x5f3a1f){_0x24b1f1=_0x24b1f1-0xc7;let _0x3fe254=_0x3b7a01[_0x24b1f1];return _0x3fe254;},a27_0x24b1(_0x30a1ec,_0x3aca92);}(function(_0x3dd1e0,_0x546d79){const _0x16ed1d=a27_0x24b1,_0x37007c=_0x3dd1e0();while(!![]){try{const _0x247dd6=parseInt(_0x16ed1d(0xe5))/0x1*(parseInt(_0x16ed1d(0xe1))/0x2)+parseInt(_0x16ed1d(0xd6))/0x3+-parseInt(_0x16ed1d(0xdd))/0x4+parseInt(_0x16ed1d(0xf5))/0x5+-parseInt(_0x16ed1d(0xf0))/0x6+parseInt(_0x16ed1d(0xf2))/0x7+parseInt(_0x16ed1d(0xcb))/0x8;if(_0x247dd6===_0x546d79)break;else _0x37007c['push'](_0x37007c['shift']());}catch(_0x5cadaf){_0x37007c['push'](_0x37007c['shift']());}}}(a27_0x3b7a,0x65138));function a27_0x3b7a(){const _0x11f106=['Use\x20\x22tdx\x20context\x22\x20to\x20see\x20all\x20context\x20parameters','segmentPath','Parent\x20ID:\x20','Folder\x20ID:\x20','Set\x20current\x20segment/folder\x20context\x20for\x20navigation','execute','length','data','3501534ciXjJp','Error:\x20Path\x20is\x20required','291284oXqFKa','fullPath','split','213765ihmWnx','parentId','Error:\x20No\x20context\x20set.\x20Cannot\x20use\x20relative\x20path.','segment','folderPath','Site:\x20','Target\x20path:\x20','4048144JFSeoI','\x20\x20tdx\x20segment\x20use\x20/\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Clear\x20context','verbose','Use:\x20tdx\x20segment\x20use\x20','log','Use\x20an\x20absolute\x20path\x20or\x20set\x20context\x20with:\x20tdx\x20segment\x20use\x20<parent_name>','folderId','name','type','slice','resolvePathToResource','1536306MDPOao','error','description','\x27...','isAbsolute','Resolved\x20path\x20type:\x20','segment:use','1696756MKtzGQ','Usage:\x20tdx\x20segment\x20use\x20<path>','parentName','Use\x20\x22tdx\x20segments\x22\x20to\x20list\x20contents\x20in\x20this\x20context','2VTPfmG','Use\x20\x22tdx\x20segment\x20pwd\x22\x20to\x20show\x20current\x20context','\x20\x20tdx\x20segment\x20use\x20\x22My\x20Audience\x22','join','319301eZlwot','Examples:','Context\x20cleared.\x20Back\x20to\x20root.'];a27_0x3b7a=function(){return _0x11f106;};return a27_0x3b7a();}import{BaseCommand}from'./command.js';import{saveSessionContext}from'../core/session.js';import{withSpinner}from'../utils/spinner.js';import{parsePath,normalizePath}from'../utils/segment-path-parser.js';export class SegmentUseCommand extends BaseCommand{[a27_0x1fb82e(0xd2)]=a27_0x1fb82e(0xdc);[a27_0x1fb82e(0xd8)]=a27_0x1fb82e(0xec);async[a27_0x1fb82e(0xed)](_0x48487c){const _0x233239=a27_0x1fb82e,{options:_0x3c73dd,args:_0x1b3479,tdx:_0x86a8ce}=_0x48487c;if(_0x1b3479[_0x233239(0xee)]===0x0)return console[_0x233239(0xd7)](_0x233239(0xf1)),console[_0x233239(0xd7)](_0x233239(0xde)),console['error'](_0x233239(0xe6)),console['error'](_0x233239(0xe3)),console[_0x233239(0xd7)]('\x20\x20tdx\x20segment\x20use\x20\x22My\x20Audience/Marketing\x22'),console[_0x233239(0xd7)](_0x233239(0xcc)),console['error']('\x20\x20tdx\x20segment\x20use\x20..\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Go\x20to\x20parent'),0x1;const _0x2141fe=_0x1b3479[0x0],_0x118348=_0x3c73dd['session'];try{if(_0x2141fe==='/')return saveSessionContext({'segment_path':undefined},_0x118348),console['log'](_0x233239(0xe7)),0x0;const _0x2c309a=_0x3c73dd[_0x233239(0xe9)];let _0x37d245=_0x2141fe;const _0x19abce=parsePath(_0x2141fe);if(!_0x19abce[_0x233239(0xda)]){if(!_0x2c309a)return console['error'](_0x233239(0xf7)),console[_0x233239(0xd7)](_0x233239(0xd0)),0x1;if(_0x2141fe==='..'){const _0x123099=_0x2c309a[_0x233239(0xf4)]('/')[_0x233239(0xd4)](0x0,-0x1)[_0x233239(0xe4)]('/');_0x37d245=_0x123099||'/';}else _0x2141fe==='.'?_0x37d245=_0x2c309a:_0x37d245=_0x2c309a+'/'+_0x2141fe;_0x3c73dd[_0x233239(0xcd)]&&console['error']('Resolved\x20relative\x20path\x20to:\x20'+_0x37d245);}if(_0x37d245==='/'||_0x37d245==='')return saveSessionContext({'segment_path':undefined},_0x118348),console['log']('Context\x20cleared.\x20Back\x20to\x20root.'),0x0;_0x37d245=normalizePath(_0x37d245);const _0x3665b0=parsePath(_0x37d245)['segments'];if(_0x3665b0[_0x233239(0xee)]===0x0)return saveSessionContext({'segment_path':undefined},_0x118348),console[_0x233239(0xcf)](_0x233239(0xe7)),0x0;_0x3c73dd[_0x233239(0xcd)]&&(console[_0x233239(0xd7)](_0x233239(0xc9)+_0x3c73dd['site']),console[_0x233239(0xd7)](_0x233239(0xca)+_0x37d245));const _0x42ac06=await withSpinner('Resolving\x20path\x20\x27'+_0x37d245+_0x233239(0xd9),()=>_0x86a8ce[_0x233239(0xc7)][_0x233239(0xd5)](_0x37d245),{'verbose':_0x3c73dd['verbose']}),_0x2d5f3d=_0x42ac06[_0x233239(0xef)];_0x3c73dd[_0x233239(0xcd)]&&(console['error'](_0x233239(0xdb)+_0x2d5f3d[_0x233239(0xd3)]),console[_0x233239(0xd7)](_0x233239(0xea)+_0x2d5f3d[_0x233239(0xf6)]),_0x2d5f3d[_0x233239(0xd1)]&&console[_0x233239(0xd7)](_0x233239(0xeb)+_0x2d5f3d[_0x233239(0xd1)]));if(_0x2d5f3d[_0x233239(0xd3)]===_0x233239(0xc7))return console[_0x233239(0xd7)]('Error:\x20Cannot\x20set\x20context\x20to\x20a\x20segment.'),console[_0x233239(0xd7)]('Context\x20can\x20only\x20be\x20set\x20to\x20a\x20parent\x20segment\x20or\x20folder.'),console[_0x233239(0xd7)](_0x233239(0xce)+_0x2d5f3d[_0x233239(0xdf)]+(_0x2d5f3d[_0x233239(0xc8)]?'/'+_0x2d5f3d[_0x233239(0xc8)][_0x233239(0xe4)]('/'):'')),0x1;return saveSessionContext({'segment_path':_0x2d5f3d[_0x233239(0xf3)],'parent_segment':_0x2d5f3d[_0x233239(0xdf)]},_0x118348),console[_0x233239(0xcf)]('Context\x20set\x20to:\x20'+_0x2d5f3d[_0x233239(0xf3)]),_0x3c73dd[_0x233239(0xcd)]&&(console[_0x233239(0xd7)](_0x233239(0xe0)),console[_0x233239(0xd7)](_0x233239(0xe2)),console[_0x233239(0xd7)](_0x233239(0xe8))),0x0;}catch(_0x2286e9){throw _0x2286e9;}}}
1
+ const a27_0x5ce02a=a27_0x8414;(function(_0x35537a,_0x4d0985){const _0x229bec=a27_0x8414,_0x161ad0=_0x35537a();while(!![]){try{const _0x49de56=parseInt(_0x229bec(0x21b))/0x1*(parseInt(_0x229bec(0x203))/0x2)+parseInt(_0x229bec(0x1fb))/0x3*(-parseInt(_0x229bec(0x209))/0x4)+parseInt(_0x229bec(0x1ef))/0x5*(parseInt(_0x229bec(0x219))/0x6)+parseInt(_0x229bec(0x1e8))/0x7+parseInt(_0x229bec(0x1f3))/0x8*(parseInt(_0x229bec(0x1ea))/0x9)+parseInt(_0x229bec(0x20d))/0xa+parseInt(_0x229bec(0x1e7))/0xb*(-parseInt(_0x229bec(0x1f0))/0xc);if(_0x49de56===_0x4d0985)break;else _0x161ad0['push'](_0x161ad0['shift']());}catch(_0x4f1008){_0x161ad0['push'](_0x161ad0['shift']());}}}(a27_0x23ff,0x221ca));import{BaseCommand}from'./command.js';function a27_0x23ff(){const _0x566547=['168uBqUBk','Error:\x20Path\x20is\x20required','site','8lleuJZ','Target\x20path:\x20','data','verbose','session','Folder\x20ID:\x20','error','\x20\x20tdx\x20segment\x20use\x20\x22My\x20Audience\x22','631767rZwNsH','Parent\x20ID:\x20','Resolved\x20path\x20type:\x20','parentId','folderPath','Usage:\x20tdx\x20segment\x20use\x20<path>','fullPath','\x20\x20tdx\x20segment\x20use\x20\x22My\x20Audience/Marketing\x22','30ImHPIh','execute','segmentPath','resolvePathToResource','segment:use','Error:\x20Cannot\x20set\x20context\x20to\x20a\x20segment.','4laMsix','Context\x20cleared.\x20Back\x20to\x20root.','split','name','2730940XnEbse','Set\x20current\x20segment/folder\x20context\x20for\x20navigation','Context\x20can\x20only\x20be\x20set\x20to\x20a\x20parent\x20segment\x20or\x20folder.','join','Use\x20an\x20absolute\x20path\x20or\x20set\x20context\x20with:\x20tdx\x20segment\x20use\x20<parent_name>','Site:\x20','Use\x20\x22tdx\x20segments\x22\x20to\x20list\x20contents\x20in\x20this\x20context','folderId','type','isAbsolute','\x20\x20tdx\x20segment\x20use\x20/\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Clear\x20context','segments','660swGNmc','log','16805gdQyhP','536261BEOswM','1027943mvZLMy','Resolved\x20relative\x20path\x20to:\x20','1031643WtQjXJ','Use:\x20tdx\x20segment\x20use\x20','length','segment','Use\x20\x22tdx\x20segment\x20pwd\x22\x20to\x20show\x20current\x20context','11190nFYSBu'];a27_0x23ff=function(){return _0x566547;};return a27_0x23ff();}import{saveSessionContext}from'../core/session.js';import{withSpinner}from'../utils/spinner.js';import{parsePath,normalizePath}from'../utils/segment-path-parser.js';function a27_0x8414(_0x36c6a2,_0x3d27df){const _0x23ff57=a27_0x23ff();return a27_0x8414=function(_0x84146d,_0x272181){_0x84146d=_0x84146d-0x1e7;let _0x43c7a7=_0x23ff57[_0x84146d];return _0x43c7a7;},a27_0x8414(_0x36c6a2,_0x3d27df);}export class SegmentUseCommand extends BaseCommand{[a27_0x5ce02a(0x20c)]=a27_0x5ce02a(0x207);['description']=a27_0x5ce02a(0x20e);async[a27_0x5ce02a(0x204)](_0x198194){const _0x54b45c=a27_0x5ce02a,{options:_0xf90383,args:_0x30a933,tdx:_0x1f2460}=_0x198194;if(_0x30a933[_0x54b45c(0x1ec)]===0x0)return console[_0x54b45c(0x1f9)](_0x54b45c(0x1f1)),console[_0x54b45c(0x1f9)](_0x54b45c(0x200)),console[_0x54b45c(0x1f9)]('Examples:'),console[_0x54b45c(0x1f9)](_0x54b45c(0x1fa)),console[_0x54b45c(0x1f9)](_0x54b45c(0x202)),console['error'](_0x54b45c(0x217)),console[_0x54b45c(0x1f9)]('\x20\x20tdx\x20segment\x20use\x20..\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Go\x20to\x20parent'),0x1;const _0x4bbf0f=_0x30a933[0x0],_0x283b3b=_0xf90383[_0x54b45c(0x1f7)];try{if(_0x4bbf0f==='/')return saveSessionContext({'segment_path':undefined},_0x283b3b),console[_0x54b45c(0x21a)](_0x54b45c(0x20a)),0x0;const _0x1d1d15=_0xf90383[_0x54b45c(0x205)];let _0x587260=_0x4bbf0f;const _0x53a276=parsePath(_0x4bbf0f);if(!_0x53a276[_0x54b45c(0x216)]){if(!_0x1d1d15)return console[_0x54b45c(0x1f9)]('Error:\x20No\x20context\x20set.\x20Cannot\x20use\x20relative\x20path.'),console[_0x54b45c(0x1f9)](_0x54b45c(0x211)),0x1;if(_0x4bbf0f==='..'){const _0x63dfab=_0x1d1d15[_0x54b45c(0x20b)]('/')['slice'](0x0,-0x1)[_0x54b45c(0x210)]('/');_0x587260=_0x63dfab||'/';}else _0x4bbf0f==='.'?_0x587260=_0x1d1d15:_0x587260=_0x1d1d15+'/'+_0x4bbf0f;_0xf90383[_0x54b45c(0x1f6)]&&console[_0x54b45c(0x1f9)](_0x54b45c(0x1e9)+_0x587260);}if(_0x587260==='/'||_0x587260==='')return saveSessionContext({'segment_path':undefined},_0x283b3b),console[_0x54b45c(0x21a)](_0x54b45c(0x20a)),0x0;_0x587260=normalizePath(_0x587260);const _0x566370=parsePath(_0x587260)[_0x54b45c(0x218)];if(_0x566370[_0x54b45c(0x1ec)]===0x0)return saveSessionContext({'segment_path':undefined},_0x283b3b),console[_0x54b45c(0x21a)]('Context\x20cleared.\x20Back\x20to\x20root.'),0x0;_0xf90383[_0x54b45c(0x1f6)]&&(console[_0x54b45c(0x1f9)](_0x54b45c(0x212)+_0xf90383[_0x54b45c(0x1f2)]),console[_0x54b45c(0x1f9)](_0x54b45c(0x1f4)+_0x587260));const _0x49cb0e=await withSpinner('Resolving\x20path\x20\x27'+_0x587260+'\x27...',()=>_0x1f2460[_0x54b45c(0x1ed)][_0x54b45c(0x206)](_0x587260),{'verbose':_0xf90383[_0x54b45c(0x1f6)]}),_0x54242e=_0x49cb0e[_0x54b45c(0x1f5)];_0xf90383['verbose']&&(console[_0x54b45c(0x1f9)](_0x54b45c(0x1fd)+_0x54242e[_0x54b45c(0x215)]),console[_0x54b45c(0x1f9)](_0x54b45c(0x1fc)+_0x54242e[_0x54b45c(0x1fe)]),_0x54242e[_0x54b45c(0x214)]&&console[_0x54b45c(0x1f9)](_0x54b45c(0x1f8)+_0x54242e[_0x54b45c(0x214)]));if(_0x54242e[_0x54b45c(0x215)]===_0x54b45c(0x1ed))return console[_0x54b45c(0x1f9)](_0x54b45c(0x208)),console[_0x54b45c(0x1f9)](_0x54b45c(0x20f)),console[_0x54b45c(0x1f9)](_0x54b45c(0x1eb)+_0x54242e['parentName']+(_0x54242e[_0x54b45c(0x1ff)]?'/'+_0x54242e[_0x54b45c(0x1ff)][_0x54b45c(0x210)]('/'):'')),0x1;return saveSessionContext({'segment_path':_0x54242e[_0x54b45c(0x201)],'parent_segment':_0x54242e['parentName']},_0x283b3b),console[_0x54b45c(0x21a)]('Context\x20set\x20to:\x20'+_0x54242e[_0x54b45c(0x201)]),_0xf90383[_0x54b45c(0x1f6)]&&(console[_0x54b45c(0x1f9)](_0x54b45c(0x213)),console[_0x54b45c(0x1f9)](_0x54b45c(0x1ee)),console[_0x54b45c(0x1f9)]('Use\x20\x22tdx\x20context\x22\x20to\x20see\x20all\x20context\x20parameters')),0x0;}catch(_0x3392b5){throw _0x3392b5;}}}
@@ -1 +1 @@
1
- const a28_0x51ee0f=a28_0x57cc;(function(_0x40bdb7,_0x4636b7){const _0x257f5d=a28_0x57cc,_0x3d386c=_0x40bdb7();while(!![]){try{const _0x35a835=parseInt(_0x257f5d(0xb3))/0x1+parseInt(_0x257f5d(0xb1))/0x2*(parseInt(_0x257f5d(0x8f))/0x3)+-parseInt(_0x257f5d(0xb8))/0x4+parseInt(_0x257f5d(0xab))/0x5+-parseInt(_0x257f5d(0x90))/0x6*(-parseInt(_0x257f5d(0xba))/0x7)+-parseInt(_0x257f5d(0xc0))/0x8*(-parseInt(_0x257f5d(0x9c))/0x9)+-parseInt(_0x257f5d(0xbb))/0xa;if(_0x35a835===_0x4636b7)break;else _0x3d386c['push'](_0x3d386c['shift']());}catch(_0x1beed2){_0x3d386c['push'](_0x3d386c['shift']());}}}(a28_0x55f0,0xee2dc));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleSDKOutput}from'../utils/command-output.js';function a28_0x57cc(_0x20d694,_0x7df9f2){const _0x55f0d5=a28_0x55f0();return a28_0x57cc=function(_0x57ccef,_0x17289e){_0x57ccef=_0x57ccef-0x8c;let _0x27cc62=_0x55f0d5[_0x57ccef];return _0x27cc62;},a28_0x57cc(_0x20d694,_0x7df9f2);}import{withSpinner}from'../utils/spinner.js';import{formatFlatList,formatTree}from'../utils/tree-formatter.js';import{formatRows}from'../utils/formatters.js';function a28_0x55f0(){const _0x44c11d=['Listing\x20folders\x20and\x20segments...','8XBVBnm','includes','listParents','\x20and\x20','\x5c$&','map','No\x20parent\x20segments\x20match\x20pattern:\x20','List\x20parent\x20segments,\x20folders,\x20and\x20child\x20segments','👥\x20','folderId','population','log','jsonl','replace','maxDepth','Clear\x20context\x20with:\x20tdx\x20segment\x20use\x20/','sort','parentId','1512apdCSa','107952DWOzEt','Current\x20context:\x20','\x20parent\x20segment','length','\x20segment','\x27...','message','listParentsWithPattern','Folder\x20ID:\x20','segment','recursive','segments','6476310ywBGQT','Listing\x20parent\x20segments\x20matching\x20\x27','Error:\x20Pattern\x20matching\x20is\x20only\x20supported\x20at\x20root\x20level\x20(no\x20context\x20set).','✔\x20Found\x20','[parent\x20segments]','Path/pattern\x20arg:\x20','description','filter','resolvePathToResource','Parent\x20ID:\x20','\x20\x20Cause:\x20','dim','data','✔\x20Built\x20tree\x20with\x20','Site:\x20','2308705GaQKFH','name','cause','folder','json','error','3922yEFBca','Recursive\x20mode:\x20enabled','1464638gqaLph','format','Building\x20hierarchy\x20tree...','Error:\x20','attributes','4195072fceWzn','\x20folder','259UKypDB','22756690EJsSEZ','listRecursive','verbose','listUnified'];a28_0x55f0=function(){return _0x44c11d;};return a28_0x55f0();}import a28_0x24060f from'chalk';export class SegmentsCommand extends BaseCommand{['name']=a28_0x51ee0f(0x9b);[a28_0x51ee0f(0xa2)]=a28_0x51ee0f(0xc7);async['execute'](_0x24c515){const _0x588bb3=a28_0x51ee0f,{options:_0x4f19e4,args:_0x46f79b}=_0x24c515,_0x803369=_0x4f19e4[_0x588bb3(0x9a)],_0x107e11=_0x46f79b[0x0];try{const _0x50e02e=_0x4f19e4['segmentPath'];_0x4f19e4['verbose']&&(console[_0x588bb3(0xb0)](_0x588bb3(0xaa)+_0x4f19e4['site']),console['error'](_0x588bb3(0x91)+(_0x50e02e||'/')),_0x107e11&&console[_0x588bb3(0xb0)](_0x588bb3(0xa1)+_0x107e11),_0x803369&&console[_0x588bb3(0xb0)](_0x588bb3(0xb2)));if(_0x107e11){const _0x5c9401=_0x107e11[_0x588bb3(0xc1)]('*')||_0x107e11[_0x588bb3(0xc1)]('?');if(_0x5c9401&&!_0x50e02e)return await this[_0x588bb3(0x97)](_0x24c515,_0x107e11);else return _0x5c9401?(console[_0x588bb3(0xb0)](_0x588bb3(0x9e)),console[_0x588bb3(0xb0)](_0x588bb3(0x8c)),0x1):_0x803369?await this['listRecursive'](_0x24c515,_0x107e11):await this[_0x588bb3(0xbe)](_0x24c515,_0x107e11);}if(!_0x50e02e)return await this[_0x588bb3(0xc2)](_0x24c515);return _0x803369?await this[_0x588bb3(0xbc)](_0x24c515,_0x50e02e):await this['listUnified'](_0x24c515,_0x50e02e);}catch(_0x457310){if(_0x457310 instanceof SDKError)return console[_0x588bb3(0xb0)](_0x588bb3(0xb6)+_0x457310[_0x588bb3(0x96)]),_0x457310[_0x588bb3(0xad)]&&console[_0x588bb3(0xb0)](_0x588bb3(0xa6)+_0x457310[_0x588bb3(0xad)]),0x1;throw _0x457310;}}async['listParentsWithPattern'](_0x15ec5a,_0x129c92){const _0x4fa210=a28_0x51ee0f,{options:_0x34c929,tdx:_0x5c7cba}=_0x15ec5a,_0x285f1e=await withSpinner(_0x4fa210(0x9d)+_0x129c92+_0x4fa210(0x95),()=>_0x5c7cba[_0x4fa210(0x99)]['listParents'](),{'verbose':_0x34c929[_0x4fa210(0xbd)]}),_0x45b015=_0x285f1e[_0x4fa210(0xa8)],_0x374c4b=_0x129c92[_0x4fa210(0xcd)](/[.+^${}()|[\]\\]/g,_0x4fa210(0xc4))[_0x4fa210(0xcd)](/\*/g,'.*')[_0x4fa210(0xcd)](/\?/g,'.'),_0x564c5b=new RegExp('^'+_0x374c4b+'$','i'),_0x20d9f8=_0x45b015[_0x4fa210(0xa3)](_0x4c3032=>_0x564c5b['test'](_0x4c3032[_0x4fa210(0xb7)][_0x4fa210(0xac)]));console[_0x4fa210(0xb0)](_0x4fa210(0x9f)+_0x20d9f8['length']+_0x4fa210(0x92)+(_0x20d9f8[_0x4fa210(0x93)]!==0x1?'s':'')+'\x20matching\x20\x27'+_0x129c92+'\x27');if(_0x34c929['format']===_0x4fa210(0xaf)||_0x34c929['format']==='jsonl')await handleSDKOutput(_0x20d9f8,_0x34c929);else{if(_0x20d9f8['length']===0x0)console['log'](_0x4fa210(0xc6)+_0x129c92);else{console[_0x4fa210(0xcb)]('[parent\x20segments]');for(const _0x54054c of _0x20d9f8){const _0x4295ba=_0x54054c['attributes'][_0x4fa210(0xca)]?a28_0x24060f[_0x4fa210(0xa7)]('\x20('+formatRows(_0x54054c[_0x4fa210(0xb7)][_0x4fa210(0xca)])+')'):'';console[_0x4fa210(0xcb)](_0x4fa210(0xc8)+_0x54054c[_0x4fa210(0xb7)][_0x4fa210(0xac)]+_0x4295ba);}}}return 0x0;}async[a28_0x51ee0f(0xc2)](_0x29b1ab){const _0x44905e=a28_0x51ee0f,{options:_0x186740,tdx:_0x518b80}=_0x29b1ab,_0x63a46e=await withSpinner('Listing\x20parent\x20segments...',()=>_0x518b80['segment']['listParents'](),{'verbose':_0x186740[_0x44905e(0xbd)]}),_0x54f616=_0x63a46e[_0x44905e(0xa8)];console['error']('✔\x20Found\x20'+_0x54f616['length']+_0x44905e(0x92)+(_0x54f616[_0x44905e(0x93)]!==0x1?'s':''));if(_0x186740[_0x44905e(0xb4)]==='json'||_0x186740['format']===_0x44905e(0xcc))await handleSDKOutput(_0x54f616,_0x186740);else{console[_0x44905e(0xcb)](_0x44905e(0xa0));for(const _0x143a77 of _0x54f616){const _0x44a7f1=_0x143a77[_0x44905e(0xb7)]['population']?a28_0x24060f['dim']('\x20('+formatRows(_0x143a77[_0x44905e(0xb7)][_0x44905e(0xca)])+')'):'';console['log'](_0x44905e(0xc8)+_0x143a77['attributes']['name']+_0x44a7f1);}}return 0x0;}async[a28_0x51ee0f(0xbe)](_0x3bde32,_0x55f15d){const _0x6bcc06=a28_0x51ee0f,{options:_0x1130de,tdx:_0xb21767}=_0x3bde32,_0x512edf=await withSpinner('Resolving\x20context\x20path\x20\x27'+_0x55f15d+'\x27...',()=>_0xb21767[_0x6bcc06(0x99)][_0x6bcc06(0xa4)](_0x55f15d),{'verbose':_0x1130de['verbose']}),_0x45e086=_0x512edf[_0x6bcc06(0xa8)];_0x1130de['verbose']&&(console[_0x6bcc06(0xb0)]('Parent\x20ID:\x20'+_0x45e086[_0x6bcc06(0x8e)]),_0x45e086[_0x6bcc06(0xc9)]&&console[_0x6bcc06(0xb0)](_0x6bcc06(0x98)+_0x45e086[_0x6bcc06(0xc9)]));const _0xfd50f5=await withSpinner(_0x6bcc06(0xbf),()=>_0xb21767['segment'][_0x6bcc06(0xbe)](_0x45e086[_0x6bcc06(0x8e)],_0x45e086[_0x6bcc06(0xc9)]),{'verbose':_0x1130de[_0x6bcc06(0xbd)]}),{folders:_0x5660c7,segments:_0x5a768a}=_0xfd50f5[_0x6bcc06(0xa8)],_0x453c97=_0x5660c7['length']+_0x5a768a[_0x6bcc06(0x93)];console[_0x6bcc06(0xb0)]('✔\x20Found\x20'+_0x5660c7[_0x6bcc06(0x93)]+_0x6bcc06(0xb9)+(_0x5660c7[_0x6bcc06(0x93)]!==0x1?'s':'')+_0x6bcc06(0xc3)+_0x5a768a[_0x6bcc06(0x93)]+_0x6bcc06(0x94)+(_0x5a768a[_0x6bcc06(0x93)]!==0x1?'s':''));if(_0x1130de['format']===_0x6bcc06(0xaf)||_0x1130de[_0x6bcc06(0xb4)]===_0x6bcc06(0xcc)){const _0x403570=[..._0x5660c7['map'](_0x1d9970=>({..._0x1d9970,'type':_0x6bcc06(0xae)})),..._0x5a768a[_0x6bcc06(0xc5)](_0x138fb6=>({..._0x138fb6,'type':_0x6bcc06(0x99)}))][_0x6bcc06(0x8d)]((_0x1b8d39,_0x47ba9d)=>_0x1b8d39['name']['localeCompare'](_0x47ba9d[_0x6bcc06(0xac)]));await handleSDKOutput(_0x403570,_0x1130de);}else{if(_0x453c97===0x0)console[_0x6bcc06(0xcb)](a28_0x24060f[_0x6bcc06(0xa7)]('[/'+_0x55f15d+']')),console[_0x6bcc06(0xcb)]('(empty)');else{console['log'](a28_0x24060f[_0x6bcc06(0xa7)]('[/'+_0x55f15d+']'));const _0x38d2f9=formatFlatList(_0x5660c7,_0x5a768a,{'showMetadata':!![]});console[_0x6bcc06(0xcb)](_0x38d2f9);}}return 0x0;}async['listRecursive'](_0x3ecf54,_0x4bc633){const _0x5c815e=a28_0x51ee0f,{options:_0x2de1ef,tdx:_0x48244a}=_0x3ecf54,_0x4164c7=await withSpinner('Resolving\x20context\x20path\x20\x27'+_0x4bc633+_0x5c815e(0x95),()=>_0x48244a['segment'][_0x5c815e(0xa4)](_0x4bc633),{'verbose':_0x2de1ef[_0x5c815e(0xbd)]}),_0x4bf115=_0x4164c7[_0x5c815e(0xa8)];_0x2de1ef[_0x5c815e(0xbd)]&&(console['error'](_0x5c815e(0xa5)+_0x4bf115['parentId']),_0x4bf115[_0x5c815e(0xc9)]&&console[_0x5c815e(0xb0)]('Folder\x20ID:\x20'+_0x4bf115[_0x5c815e(0xc9)]));const _0x32a38d=_0x2de1ef[_0x5c815e(0xce)]||0xa,_0x4d81ee=await withSpinner(_0x5c815e(0xb5),()=>_0x48244a[_0x5c815e(0x99)][_0x5c815e(0xbc)](_0x4bf115[_0x5c815e(0x8e)],_0x4bf115[_0x5c815e(0xc9)],0x0,_0x32a38d),{'verbose':_0x2de1ef[_0x5c815e(0xbd)]}),_0x333013=_0x4d81ee[_0x5c815e(0xa8)];console[_0x5c815e(0xb0)](_0x5c815e(0xa9)+_0x333013[_0x5c815e(0x93)]+'\x20top-level\x20items');if(_0x2de1ef[_0x5c815e(0xb4)]===_0x5c815e(0xaf)||_0x2de1ef['format']===_0x5c815e(0xcc))await handleSDKOutput(_0x333013,_0x2de1ef);else{console[_0x5c815e(0xcb)](a28_0x24060f[_0x5c815e(0xa7)]('[/'+_0x4bc633+']'));const _0x164a55=formatTree(_0x333013,{'showMetadata':!![]});console['log'](_0x164a55);}return 0x0;}}
1
+ const a28_0x4fdebb=a28_0x2dd9;(function(_0x3d4ce0,_0x26e73d){const _0x5884a1=a28_0x2dd9,_0x3a33c2=_0x3d4ce0();while(!![]){try{const _0x2399b9=parseInt(_0x5884a1(0x10d))/0x1*(-parseInt(_0x5884a1(0x118))/0x2)+parseInt(_0x5884a1(0xf4))/0x3*(parseInt(_0x5884a1(0x125))/0x4)+-parseInt(_0x5884a1(0x103))/0x5*(parseInt(_0x5884a1(0xec))/0x6)+parseInt(_0x5884a1(0xf0))/0x7*(-parseInt(_0x5884a1(0xeb))/0x8)+-parseInt(_0x5884a1(0x11e))/0x9+-parseInt(_0x5884a1(0x122))/0xa+parseInt(_0x5884a1(0x108))/0xb;if(_0x2399b9===_0x26e73d)break;else _0x3a33c2['push'](_0x3a33c2['shift']());}catch(_0x1dc0b6){_0x3a33c2['push'](_0x3a33c2['shift']());}}}(a28_0x223a,0x60128));function a28_0x223a(){const _0xf8a763=['\x20top-level\x20items','log','List\x20parent\x20segments,\x20folders,\x20and\x20child\x20segments','Folder\x20ID:\x20','Site:\x20','dim','listUnified','recursive','✔\x20Found\x20','attributes','replace','\x20folder','Parent\x20ID:\x20','180055YLXuWm','maxDepth','site','description','format','24619045DIRmUv','cause','error','parentId','Listing\x20folders\x20and\x20segments...','3olRUFk','data','Clear\x20context\x20with:\x20tdx\x20segment\x20use\x20/','\x27...','localeCompare','\x20parent\x20segment','folder','jsonl','verbose','execute','population','329286FqYgxa','sort','Building\x20hierarchy\x20tree...','name','length','[parent\x20segments]','7004268AsEaQd','\x20segment','✔\x20Built\x20tree\x20with\x20','Listing\x20parent\x20segments\x20matching\x20\x27','3254110AZutwJ','includes','👥\x20','22252xZXKMu','listParents','Current\x20context:\x20','message','Listing\x20parent\x20segments...','Resolving\x20context\x20path\x20\x27','test','No\x20parent\x20segments\x20match\x20pattern:\x20','folderId','json','5302168NaAtFJ','54lCLios','filter','segmentPath','segment','7CtACUF','listRecursive','(empty)','segments','399MRIXnp','\x20and\x20'];a28_0x223a=function(){return _0xf8a763;};return a28_0x223a();}import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';function a28_0x2dd9(_0x59f7d9,_0x351b1f){const _0x223a95=a28_0x223a();return a28_0x2dd9=function(_0x2dd9f2,_0x56c58c){_0x2dd9f2=_0x2dd9f2-0xe5;let _0x26c514=_0x223a95[_0x2dd9f2];return _0x26c514;},a28_0x2dd9(_0x59f7d9,_0x351b1f);}import{handleSDKOutput}from'../utils/command-output.js';import{withSpinner}from'../utils/spinner.js';import{formatFlatList,formatTree}from'../utils/tree-formatter.js';import{formatRows}from'../utils/formatters.js';import a28_0x14ffdc from'chalk';export class SegmentsCommand extends BaseCommand{[a28_0x4fdebb(0x11b)]=a28_0x4fdebb(0xf3);[a28_0x4fdebb(0x106)]=a28_0x4fdebb(0xf8);async[a28_0x4fdebb(0x116)](_0x55a6bc){const _0xa4fa24=a28_0x4fdebb,{options:_0x1463b4,args:_0x45c78d}=_0x55a6bc,_0x2b503d=_0x1463b4[_0xa4fa24(0xfd)],_0x5810e7=_0x45c78d[0x0];try{const _0x4dcbac=_0x1463b4[_0xa4fa24(0xee)];_0x1463b4[_0xa4fa24(0x115)]&&(console[_0xa4fa24(0x10a)](_0xa4fa24(0xfa)+_0x1463b4[_0xa4fa24(0x105)]),console[_0xa4fa24(0x10a)](_0xa4fa24(0x127)+(_0x4dcbac||'/')),_0x5810e7&&console[_0xa4fa24(0x10a)]('Path/pattern\x20arg:\x20'+_0x5810e7),_0x2b503d&&console[_0xa4fa24(0x10a)]('Recursive\x20mode:\x20enabled'));if(_0x5810e7){const _0xc92cc1=_0x5810e7[_0xa4fa24(0x123)]('*')||_0x5810e7[_0xa4fa24(0x123)]('?');if(_0xc92cc1&&!_0x4dcbac)return await this['listParentsWithPattern'](_0x55a6bc,_0x5810e7);else return _0xc92cc1?(console['error']('Error:\x20Pattern\x20matching\x20is\x20only\x20supported\x20at\x20root\x20level\x20(no\x20context\x20set).'),console[_0xa4fa24(0x10a)](_0xa4fa24(0x10f)),0x1):_0x2b503d?await this['listRecursive'](_0x55a6bc,_0x5810e7):await this[_0xa4fa24(0xfc)](_0x55a6bc,_0x5810e7);}if(!_0x4dcbac)return await this['listParents'](_0x55a6bc);return _0x2b503d?await this[_0xa4fa24(0xf1)](_0x55a6bc,_0x4dcbac):await this[_0xa4fa24(0xfc)](_0x55a6bc,_0x4dcbac);}catch(_0x25d5ab){if(_0x25d5ab instanceof SDKError)return console['error']('Error:\x20'+_0x25d5ab[_0xa4fa24(0x128)]),_0x25d5ab[_0xa4fa24(0x109)]&&console[_0xa4fa24(0x10a)]('\x20\x20Cause:\x20'+_0x25d5ab['cause']),0x1;throw _0x25d5ab;}}async['listParentsWithPattern'](_0x498e8a,_0x2f11da){const _0x1b46c2=a28_0x4fdebb,{options:_0x208287,tdx:_0x28381a}=_0x498e8a,_0x7511b4=await withSpinner(_0x1b46c2(0x121)+_0x2f11da+_0x1b46c2(0x110),()=>_0x28381a['segment'][_0x1b46c2(0x126)](),{'verbose':_0x208287[_0x1b46c2(0x115)]}),_0x41bc4d=_0x7511b4['data'],_0x85b752=_0x2f11da[_0x1b46c2(0x100)](/[.+^${}()|[\]\\]/g,'\x5c$&')[_0x1b46c2(0x100)](/\*/g,'.*')[_0x1b46c2(0x100)](/\?/g,'.'),_0x24ac52=new RegExp('^'+_0x85b752+'$','i'),_0x593d43=_0x41bc4d[_0x1b46c2(0xed)](_0x5a1cae=>_0x24ac52[_0x1b46c2(0xe7)](_0x5a1cae['attributes'][_0x1b46c2(0x11b)]));console[_0x1b46c2(0x10a)](_0x1b46c2(0xfe)+_0x593d43[_0x1b46c2(0x11c)]+_0x1b46c2(0x112)+(_0x593d43[_0x1b46c2(0x11c)]!==0x1?'s':'')+'\x20matching\x20\x27'+_0x2f11da+'\x27');if(_0x208287[_0x1b46c2(0x107)]===_0x1b46c2(0xea)||_0x208287[_0x1b46c2(0x107)]==='jsonl')await handleSDKOutput(_0x593d43,_0x208287);else{if(_0x593d43['length']===0x0)console[_0x1b46c2(0xf7)](_0x1b46c2(0xe8)+_0x2f11da);else{console[_0x1b46c2(0xf7)](_0x1b46c2(0x11d));for(const _0x5a04b7 of _0x593d43){const _0x2f64db=_0x5a04b7['attributes'][_0x1b46c2(0x117)]?a28_0x14ffdc['dim']('\x20('+formatRows(_0x5a04b7[_0x1b46c2(0xff)][_0x1b46c2(0x117)])+')'):'';console[_0x1b46c2(0xf7)](_0x1b46c2(0x124)+_0x5a04b7[_0x1b46c2(0xff)]['name']+_0x2f64db);}}}return 0x0;}async[a28_0x4fdebb(0x126)](_0x31e79b){const _0x575fa4=a28_0x4fdebb,{options:_0x397578,tdx:_0x193415}=_0x31e79b,_0x54ffe2=await withSpinner(_0x575fa4(0xe5),()=>_0x193415[_0x575fa4(0xef)][_0x575fa4(0x126)](),{'verbose':_0x397578[_0x575fa4(0x115)]}),_0x34304e=_0x54ffe2[_0x575fa4(0x10e)];console[_0x575fa4(0x10a)](_0x575fa4(0xfe)+_0x34304e[_0x575fa4(0x11c)]+'\x20parent\x20segment'+(_0x34304e['length']!==0x1?'s':''));if(_0x397578[_0x575fa4(0x107)]===_0x575fa4(0xea)||_0x397578[_0x575fa4(0x107)]===_0x575fa4(0x114))await handleSDKOutput(_0x34304e,_0x397578);else{console['log']('[parent\x20segments]');for(const _0x5410d5 of _0x34304e){const _0x1fec74=_0x5410d5['attributes']['population']?a28_0x14ffdc[_0x575fa4(0xfb)]('\x20('+formatRows(_0x5410d5[_0x575fa4(0xff)]['population'])+')'):'';console[_0x575fa4(0xf7)](_0x575fa4(0x124)+_0x5410d5['attributes'][_0x575fa4(0x11b)]+_0x1fec74);}}return 0x0;}async[a28_0x4fdebb(0xfc)](_0x157309,_0x258a8c){const _0xd423b2=a28_0x4fdebb,{options:_0x1dc658,tdx:_0x4c6ef2}=_0x157309,_0x3275b2=await withSpinner(_0xd423b2(0xe6)+_0x258a8c+_0xd423b2(0x110),()=>_0x4c6ef2[_0xd423b2(0xef)]['resolvePathToResource'](_0x258a8c),{'verbose':_0x1dc658[_0xd423b2(0x115)]}),_0x18cd68=_0x3275b2[_0xd423b2(0x10e)];_0x1dc658[_0xd423b2(0x115)]&&(console['error'](_0xd423b2(0x102)+_0x18cd68[_0xd423b2(0x10b)]),_0x18cd68['folderId']&&console['error'](_0xd423b2(0xf9)+_0x18cd68[_0xd423b2(0xe9)]));const _0x577ff0=await withSpinner(_0xd423b2(0x10c),()=>_0x4c6ef2[_0xd423b2(0xef)][_0xd423b2(0xfc)](_0x18cd68[_0xd423b2(0x10b)],_0x18cd68['folderId']),{'verbose':_0x1dc658[_0xd423b2(0x115)]}),{folders:_0x26b674,segments:_0x45b005}=_0x577ff0[_0xd423b2(0x10e)],_0x105b72=_0x26b674[_0xd423b2(0x11c)]+_0x45b005[_0xd423b2(0x11c)];console[_0xd423b2(0x10a)](_0xd423b2(0xfe)+_0x26b674[_0xd423b2(0x11c)]+_0xd423b2(0x101)+(_0x26b674[_0xd423b2(0x11c)]!==0x1?'s':'')+_0xd423b2(0xf5)+_0x45b005[_0xd423b2(0x11c)]+_0xd423b2(0x11f)+(_0x45b005['length']!==0x1?'s':''));if(_0x1dc658['format']===_0xd423b2(0xea)||_0x1dc658['format']===_0xd423b2(0x114)){const _0x3e8658=[..._0x26b674['map'](_0x106e37=>({..._0x106e37,'type':_0xd423b2(0x113)})),..._0x45b005['map'](_0x2f5252=>({..._0x2f5252,'type':'segment'}))][_0xd423b2(0x119)]((_0x578221,_0x589fe5)=>_0x578221[_0xd423b2(0x11b)][_0xd423b2(0x111)](_0x589fe5[_0xd423b2(0x11b)]));await handleSDKOutput(_0x3e8658,_0x1dc658);}else{if(_0x105b72===0x0)console[_0xd423b2(0xf7)](a28_0x14ffdc['dim']('[/'+_0x258a8c+']')),console[_0xd423b2(0xf7)](_0xd423b2(0xf2));else{console[_0xd423b2(0xf7)](a28_0x14ffdc['dim']('[/'+_0x258a8c+']'));const _0x12d6dc=formatFlatList(_0x26b674,_0x45b005,{'showMetadata':!![]});console[_0xd423b2(0xf7)](_0x12d6dc);}}return 0x0;}async[a28_0x4fdebb(0xf1)](_0x5a5747,_0x166985){const _0x2eaeb4=a28_0x4fdebb,{options:_0x12b834,tdx:_0x2ba282}=_0x5a5747,_0x559278=await withSpinner(_0x2eaeb4(0xe6)+_0x166985+'\x27...',()=>_0x2ba282[_0x2eaeb4(0xef)]['resolvePathToResource'](_0x166985),{'verbose':_0x12b834[_0x2eaeb4(0x115)]}),_0x40f20f=_0x559278[_0x2eaeb4(0x10e)];_0x12b834[_0x2eaeb4(0x115)]&&(console[_0x2eaeb4(0x10a)]('Parent\x20ID:\x20'+_0x40f20f['parentId']),_0x40f20f[_0x2eaeb4(0xe9)]&&console[_0x2eaeb4(0x10a)](_0x2eaeb4(0xf9)+_0x40f20f[_0x2eaeb4(0xe9)]));const _0xf2bc5a=_0x12b834[_0x2eaeb4(0x104)]||0xa,_0x3045ea=await withSpinner(_0x2eaeb4(0x11a),()=>_0x2ba282[_0x2eaeb4(0xef)]['listRecursive'](_0x40f20f[_0x2eaeb4(0x10b)],_0x40f20f[_0x2eaeb4(0xe9)],0x0,_0xf2bc5a),{'verbose':_0x12b834[_0x2eaeb4(0x115)]}),_0x4a66e0=_0x3045ea[_0x2eaeb4(0x10e)];console['error'](_0x2eaeb4(0x120)+_0x4a66e0[_0x2eaeb4(0x11c)]+_0x2eaeb4(0xf6));if(_0x12b834[_0x2eaeb4(0x107)]===_0x2eaeb4(0xea)||_0x12b834[_0x2eaeb4(0x107)]===_0x2eaeb4(0x114))await handleSDKOutput(_0x4a66e0,_0x12b834);else{console[_0x2eaeb4(0xf7)](a28_0x14ffdc['dim']('[/'+_0x166985+']'));const _0x5bd5cf=formatTree(_0x4a66e0,{'showMetadata':!![]});console[_0x2eaeb4(0xf7)](_0x5bd5cf);}return 0x0;}}
@@ -1 +1 @@
1
- const a29_0x5949a7=a29_0x4ac7;(function(_0x5d762e,_0x48c6f8){const _0x2c95fb=a29_0x4ac7,_0x2a67f7=_0x5d762e();while(!![]){try{const _0x4389a5=parseInt(_0x2c95fb(0xba))/0x1+parseInt(_0x2c95fb(0xb2))/0x2*(-parseInt(_0x2c95fb(0xa3))/0x3)+parseInt(_0x2c95fb(0xb8))/0x4*(-parseInt(_0x2c95fb(0xc2))/0x5)+-parseInt(_0x2c95fb(0xaa))/0x6*(parseInt(_0x2c95fb(0xa7))/0x7)+-parseInt(_0x2c95fb(0xbf))/0x8*(parseInt(_0x2c95fb(0xa4))/0x9)+-parseInt(_0x2c95fb(0xa9))/0xa*(parseInt(_0x2c95fb(0xb7))/0xb)+parseInt(_0x2c95fb(0xaf))/0xc;if(_0x4389a5===_0x48c6f8)break;else _0x2a67f7['push'](_0x2a67f7['shift']());}catch(_0x1d35ea){_0x2a67f7['push'](_0x2a67f7['shift']());}}}(a29_0x2dc8,0x3a3b1));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleSDKOutput}from'../utils/command-output.js';function a29_0x2dc8(){const _0x43938a=['Error:\x20','13236444XUFgwL','\x20\x20\x20or:\x20tdx\x20show\x20<catalog.database.table>','data','18386AwdMhD','description','validate','database','Querying\x20','850641YHDhzP','20NrJRHo','catalog','37205dArtYx','\x20from\x20','...','showTable','table','5048kQsYAs','message','cause','37940EOGIvf','length','\x20row','Table:\x20','Database:\x20','Catalog:\x20','Usage:\x20tdx\x20show\x20<database.table>','\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--database\x20<database>','show','Site:\x20','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','args','111FyaqHo','2079jDhEiE','error','\x20\x20Cause:\x20','1562575vODYOP','✔\x20Query\x20successful\x20-\x200\x20rows\x20returned','20YmgwJL','6BLvxvq','Limit:\x20','name','verbose'];a29_0x2dc8=function(){return _0x43938a;};return a29_0x2dc8();}import{parseTableReference,validateTableDescribeReference}from'../utils/table-ref-parser.js';import{withSpinner}from'../utils/spinner.js';import{DEFAULT_DISPLAY_LIMIT,resolveLimit}from'../utils/constants.js';function a29_0x4ac7(_0x5759bd,_0x478580){const _0x2dc837=a29_0x2dc8();return a29_0x4ac7=function(_0x4ac795,_0x156300){_0x4ac795=_0x4ac795-0xa1;let _0x3e3776=_0x2dc837[_0x4ac795];return _0x3e3776;},a29_0x4ac7(_0x5759bd,_0x478580);}export class ShowCommand extends BaseCommand{[a29_0x5949a7(0xac)]=a29_0x5949a7(0xca);[a29_0x5949a7(0xb3)]='Show\x20table\x20contents';async['execute'](_0x45b1dd){const _0x386647=a29_0x5949a7;return this[_0x386647(0xbd)](_0x45b1dd);}async[a29_0x5949a7(0xbd)](_0x332088){const _0x4481e9=a29_0x5949a7,{options:_0x324d4d,args:_0x55170e,tdx:_0x503379}=_0x332088;let _0x49b9c0;try{_0x49b9c0=parseTableReference(_0x55170e[0x0]);const _0x462df8=_0x324d4d[_0x4481e9(0xb5)];!_0x49b9c0[_0x4481e9(0xb5)]&&_0x462df8&&(_0x49b9c0[_0x4481e9(0xb5)]=_0x462df8);const _0x4d61da=validateTableDescribeReference(_0x49b9c0);if(_0x4d61da)return console[_0x4481e9(0xa5)](_0x4481e9(0xae)+_0x4d61da),console[_0x4481e9(0xa5)](_0x4481e9(0xc8)),console[_0x4481e9(0xa5)]('\x20\x20\x20or:\x20tdx\x20show\x20<catalog.database.table>'),console[_0x4481e9(0xa5)](_0x4481e9(0xc9)),0x1;}catch(_0x452d70){return console['error'](_0x4481e9(0xae)+_0x452d70[_0x4481e9(0xc0)]),console[_0x4481e9(0xa5)](_0x4481e9(0xc8)),console[_0x4481e9(0xa5)](_0x4481e9(0xb0)),console[_0x4481e9(0xa5)](_0x4481e9(0xc9)),0x1;}const _0x2c8264=_0x49b9c0[_0x4481e9(0xb9)],_0x40cbd5=_0x49b9c0[_0x4481e9(0xb5)],_0x46d7f1=_0x49b9c0[_0x4481e9(0xbe)],_0x13a8fc=resolveLimit(_0x324d4d['limit'],DEFAULT_DISPLAY_LIMIT);try{_0x324d4d[_0x4481e9(0xad)]&&(console[_0x4481e9(0xa5)](_0x4481e9(0xcb)+_0x324d4d['site']),_0x2c8264&&console[_0x4481e9(0xa5)](_0x4481e9(0xc7)+_0x2c8264),console['error'](_0x4481e9(0xc6)+_0x40cbd5),console[_0x4481e9(0xa5)](_0x4481e9(0xc5)+_0x46d7f1),console[_0x4481e9(0xa5)](_0x4481e9(0xab)+_0x13a8fc));const _0x1a09ce=_0x2c8264?_0x2c8264+'.'+_0x40cbd5+'.'+_0x46d7f1:_0x40cbd5+'.'+_0x46d7f1,_0x9d6749=await withSpinner(_0x4481e9(0xb6)+_0x1a09ce+_0x4481e9(0xbc),()=>_0x503379[_0x4481e9(0xbe)][_0x4481e9(0xca)](_0x40cbd5,_0x46d7f1,_0x13a8fc,_0x2c8264),{'verbose':_0x324d4d['verbose']}),_0x367fd7=_0x9d6749[_0x4481e9(0xb1)],_0x15e782=_0x367fd7['data'];return _0x15e782[_0x4481e9(0xc3)]===0x0?console[_0x4481e9(0xa5)](_0x4481e9(0xa8)):console[_0x4481e9(0xa5)]('✔\x20Retrieved\x20'+_0x15e782[_0x4481e9(0xc3)]+_0x4481e9(0xc4)+(_0x15e782[_0x4481e9(0xc3)]!==0x1?'s':'')+_0x4481e9(0xbb)+_0x1a09ce),await handleSDKOutput(_0x15e782,_0x324d4d),0x0;}catch(_0x30185f){if(_0x30185f instanceof SDKError)return console[_0x4481e9(0xa5)]('Error:\x20'+_0x30185f['message']),_0x30185f['cause']&&console[_0x4481e9(0xa5)](_0x4481e9(0xa6)+_0x30185f[_0x4481e9(0xc1)]),0x1;throw _0x30185f;}}[a29_0x5949a7(0xb4)](_0x164ccd){const _0x37a422=a29_0x5949a7;if(_0x164ccd['args'][_0x37a422(0xc3)]===0x0)return _0x37a422(0xa1);if(_0x164ccd[_0x37a422(0xa2)][_0x37a422(0xc3)]>0x1)return'Too\x20many\x20arguments\x0aUsage:\x20tdx\x20show\x20<database.table>\x0a\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--database\x20<database>\x0a\x0aRun\x20\x27tdx\x20show\x20--help\x27\x20for\x20more\x20options';return undefined;}}
1
+ const a29_0x666960=a29_0x4a3a;(function(_0x267c21,_0x30f311){const _0x5efe48=a29_0x4a3a,_0x16194c=_0x267c21();while(!![]){try{const _0x3b5bef=-parseInt(_0x5efe48(0x172))/0x1+-parseInt(_0x5efe48(0x179))/0x2+parseInt(_0x5efe48(0x176))/0x3*(parseInt(_0x5efe48(0x166))/0x4)+-parseInt(_0x5efe48(0x167))/0x5*(-parseInt(_0x5efe48(0x17b))/0x6)+-parseInt(_0x5efe48(0x178))/0x7+parseInt(_0x5efe48(0x165))/0x8+parseInt(_0x5efe48(0x162))/0x9;if(_0x3b5bef===_0x30f311)break;else _0x16194c['push'](_0x16194c['shift']());}catch(_0x1e50c0){_0x16194c['push'](_0x16194c['shift']());}}}(a29_0x535d,0xa4cef));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleSDKOutput}from'../utils/command-output.js';function a29_0x535d(){const _0x1c1bcb=['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','6787263iKpSGk','364966KzSXMw','message','6XczEDg','Table:\x20','\x20row','limit','✔\x20Query\x20successful\x20-\x200\x20rows\x20returned','catalog','\x20\x20\x20or:\x20tdx\x20show\x20<catalog.database.table>','✔\x20Retrieved\x20','Querying\x20','args','cause','name','\x20from\x20','database','2894157lBCAKI','...','show','3272216ZhncDY','121288ravBAz','2902255wxHzer','verbose','\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--database\x20<database>','Usage:\x20tdx\x20show\x20<database.table>','Error:\x20','length','Limit:\x20','showTable','Catalog:\x20','error','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','363242ZFXQUi','description','site','data','87WXbTls'];a29_0x535d=function(){return _0x1c1bcb;};return a29_0x535d();}function a29_0x4a3a(_0x3f793a,_0x3aa35e){const _0x535d3e=a29_0x535d();return a29_0x4a3a=function(_0x4a3aa6,_0x2ef5e0){_0x4a3aa6=_0x4a3aa6-0x155;let _0x1cd545=_0x535d3e[_0x4a3aa6];return _0x1cd545;},a29_0x4a3a(_0x3f793a,_0x3aa35e);}import{parseTableReference,validateTableDescribeReference}from'../utils/table-ref-parser.js';import{withSpinner}from'../utils/spinner.js';import{DEFAULT_DISPLAY_LIMIT,resolveLimit}from'../utils/constants.js';export class ShowCommand extends BaseCommand{[a29_0x666960(0x15f)]=a29_0x666960(0x164);[a29_0x666960(0x173)]='Show\x20table\x20contents';async['execute'](_0x226017){const _0x5a12d7=a29_0x666960;return this[_0x5a12d7(0x16e)](_0x226017);}async['showTable'](_0x3510a6){const _0xaf099a=a29_0x666960,{options:_0x597ab4,args:_0x25ad6d,tdx:_0x2d83e9}=_0x3510a6;let _0x3bfb15;try{_0x3bfb15=parseTableReference(_0x25ad6d[0x0]);const _0x3f494a=_0x597ab4[_0xaf099a(0x161)];!_0x3bfb15[_0xaf099a(0x161)]&&_0x3f494a&&(_0x3bfb15[_0xaf099a(0x161)]=_0x3f494a);const _0x5ce309=validateTableDescribeReference(_0x3bfb15);if(_0x5ce309)return console[_0xaf099a(0x170)]('Error:\x20'+_0x5ce309),console[_0xaf099a(0x170)](_0xaf099a(0x16a)),console[_0xaf099a(0x170)]('\x20\x20\x20or:\x20tdx\x20show\x20<catalog.database.table>'),console[_0xaf099a(0x170)]('\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--database\x20<database>'),0x1;}catch(_0x57351a){return console[_0xaf099a(0x170)]('Error:\x20'+_0x57351a['message']),console['error']('Usage:\x20tdx\x20show\x20<database.table>'),console['error'](_0xaf099a(0x15a)),console[_0xaf099a(0x170)](_0xaf099a(0x169)),0x1;}const _0x4eae84=_0x3bfb15[_0xaf099a(0x159)],_0x43a981=_0x3bfb15[_0xaf099a(0x161)],_0x367bf4=_0x3bfb15['table'],_0x5e6514=resolveLimit(_0x597ab4[_0xaf099a(0x157)],DEFAULT_DISPLAY_LIMIT);try{_0x597ab4[_0xaf099a(0x168)]&&(console[_0xaf099a(0x170)]('Site:\x20'+_0x597ab4[_0xaf099a(0x174)]),_0x4eae84&&console[_0xaf099a(0x170)](_0xaf099a(0x16f)+_0x4eae84),console[_0xaf099a(0x170)]('Database:\x20'+_0x43a981),console[_0xaf099a(0x170)](_0xaf099a(0x155)+_0x367bf4),console[_0xaf099a(0x170)](_0xaf099a(0x16d)+_0x5e6514));const _0x50ebff=_0x4eae84?_0x4eae84+'.'+_0x43a981+'.'+_0x367bf4:_0x43a981+'.'+_0x367bf4,_0x50219d=await withSpinner(_0xaf099a(0x15c)+_0x50ebff+_0xaf099a(0x163),()=>_0x2d83e9['table'][_0xaf099a(0x164)](_0x43a981,_0x367bf4,_0x5e6514,_0x4eae84),{'verbose':_0x597ab4[_0xaf099a(0x168)]}),_0x3e7c59=_0x50219d['data'],_0x3bd603=_0x3e7c59[_0xaf099a(0x175)];return _0x3bd603[_0xaf099a(0x16c)]===0x0?console['error'](_0xaf099a(0x158)):console[_0xaf099a(0x170)](_0xaf099a(0x15b)+_0x3bd603[_0xaf099a(0x16c)]+_0xaf099a(0x156)+(_0x3bd603[_0xaf099a(0x16c)]!==0x1?'s':'')+_0xaf099a(0x160)+_0x50ebff),await handleSDKOutput(_0x3bd603,_0x597ab4),0x0;}catch(_0x422dbe){if(_0x422dbe instanceof SDKError)return console['error'](_0xaf099a(0x16b)+_0x422dbe[_0xaf099a(0x17a)]),_0x422dbe[_0xaf099a(0x15e)]&&console[_0xaf099a(0x170)]('\x20\x20Cause:\x20'+_0x422dbe['cause']),0x1;throw _0x422dbe;}}['validate'](_0x50bda6){const _0x3b1745=a29_0x666960;if(_0x50bda6[_0x3b1745(0x15d)]['length']===0x0)return _0x3b1745(0x177);if(_0x50bda6[_0x3b1745(0x15d)][_0x3b1745(0x16c)]>0x1)return _0x3b1745(0x171);return undefined;}}
@@ -1 +1 @@
1
- const a30_0x313b42=a30_0x2d1b;function a30_0x2d1b(_0x5647da,_0x37a624){const _0x590f64=a30_0x590f();return a30_0x2d1b=function(_0x2d1bb7,_0x5cda82){_0x2d1bb7=_0x2d1bb7-0x1b6;let _0x3d8ab9=_0x590f64[_0x2d1bb7];return _0x3d8ab9;},a30_0x2d1b(_0x5647da,_0x37a624);}(function(_0x1754c1,_0x35743f){const _0x32fe49=a30_0x2d1b,_0x2958d1=_0x1754c1();while(!![]){try{const _0x44527f=-parseInt(_0x32fe49(0x1bd))/0x1*(parseInt(_0x32fe49(0x1be))/0x2)+parseInt(_0x32fe49(0x1cd))/0x3*(parseInt(_0x32fe49(0x1c6))/0x4)+-parseInt(_0x32fe49(0x1cb))/0x5*(parseInt(_0x32fe49(0x1d3))/0x6)+parseInt(_0x32fe49(0x1d0))/0x7+-parseInt(_0x32fe49(0x1cc))/0x8+-parseInt(_0x32fe49(0x1d1))/0x9+-parseInt(_0x32fe49(0x1d4))/0xa*(-parseInt(_0x32fe49(0x1ca))/0xb);if(_0x44527f===_0x35743f)break;else _0x2958d1['push'](_0x2958d1['shift']());}catch(_0x37e355){_0x2958d1['push'](_0x2958d1['shift']());}}}(a30_0x590f,0xb3486));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleSDKOutput}from'../utils/command-output.js';import{parseTableReference}from'../utils/table-ref-parser.js';import{DEFAULT_LISTING_LIMIT,resolveLimit}from'../utils/constants.js';import{withSpinner}from'../utils/spinner.js';export class TablesCommand extends BaseCommand{[a30_0x313b42(0x1de)]=a30_0x313b42(0x1b6);['description']=a30_0x313b42(0x1d7);async[a30_0x313b42(0x1c9)](_0x1646fd){const _0x283472=a30_0x313b42,{options:_0x41eeec,args:_0x4da144,tdx:_0x144f85}=_0x1646fd;let _0x15beb6;if(_0x4da144[_0x283472(0x1c2)]===0x0)_0x15beb6={'database':undefined,'table':undefined,'original':''};else{if(_0x4da144[_0x283472(0x1c2)]===0x1)try{_0x15beb6=parseTableReference(_0x4da144[0x0]);if(_0x15beb6[_0x283472(0x1c3)]&&!_0x15beb6[_0x283472(0x1d8)]&&!_0x15beb6[_0x283472(0x1c3)]['includes']('*')&&!_0x15beb6[_0x283472(0x1c3)]['includes']('?'))return console[_0x283472(0x1db)](_0x283472(0x1c5)+_0x4da144[0x0]+_0x283472(0x1cf)),console[_0x283472(0x1db)]('Did\x20you\x20mean\x20to\x20list\x20all\x20tables\x20from\x20database\x20\x27'+_0x15beb6['table']+'\x27?'),console['error']('\x20\x20Use:\x20tdx\x20tables\x20\x22'+_0x15beb6[_0x283472(0x1c3)]+_0x283472(0x1d9)),console[_0x283472(0x1db)]('\x20\x20Or:\x20\x20tdx\x20tables\x20--in\x20'+_0x15beb6[_0x283472(0x1c3)]),console['error'](_0x283472(0x1bb)+_0x15beb6[_0x283472(0x1c3)]),console[_0x283472(0x1db)](''),console[_0x283472(0x1db)](_0x283472(0x1bc)+_0x4da144[0x0]+_0x283472(0x1bf)+_0x15beb6[_0x283472(0x1c3)]+_0x283472(0x1c7)),0x1;}catch(_0x2fff28){return console[_0x283472(0x1db)](_0x283472(0x1e0)+_0x2fff28['message']),0x1;}else return console[_0x283472(0x1db)]('Error:\x20Too\x20many\x20arguments.\x20Use\x20single\x20argument:'),console[_0x283472(0x1db)]('\x20\x20tdx\x20tables\x20users\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20->\x20table\x20\x22users\x22\x20across\x20all\x20databases'),console['error'](_0x283472(0x1df)),console['error'](_0x283472(0x1c1)),console['error'](_0x283472(0x1c0)),console[_0x283472(0x1db)]('Or\x20use\x20--in\x20flag:'),console[_0x283472(0x1db)]('\x20\x20tdx\x20tables\x20--in\x20mydb\x20\x20\x20\x20\x20\x20\x20->\x20all\x20tables\x20from\x20mydb'),0x1;}const _0x32ccee=_0x41eeec[_0x283472(0x1d8)];!_0x15beb6[_0x283472(0x1d8)]&&_0x32ccee&&(_0x15beb6[_0x283472(0x1d8)]=_0x32ccee);try{const _0x2776dd=_0x13a5e2=>_0x13a5e2&&(_0x13a5e2[_0x283472(0x1ce)]('*')||_0x13a5e2['includes']('?')),_0x4468fd=_0x2776dd(_0x15beb6[_0x283472(0x1d8)]);_0x41eeec[_0x283472(0x1ba)]&&(console[_0x283472(0x1db)]('Site:\x20'+_0x41eeec[_0x283472(0x1da)]),_0x15beb6[_0x283472(0x1d8)]?_0x4468fd?console[_0x283472(0x1db)](_0x283472(0x1b7)+_0x15beb6[_0x283472(0x1d8)]):console['error'](_0x283472(0x1dd)+_0x15beb6[_0x283472(0x1d8)]):console[_0x283472(0x1db)]('Database:\x20all'),_0x15beb6[_0x283472(0x1c3)]&&console[_0x283472(0x1db)]('Table\x20pattern:\x20'+_0x15beb6['table']));const _0x5bed0c=_0x15beb6['database']&&!_0x4468fd?_0x15beb6[_0x283472(0x1d8)]:undefined,_0xa4c0b6=_0x4468fd?_0x15beb6[_0x283472(0x1d8)]:undefined,_0x345254=_0x15beb6['table'],_0x22fade=resolveLimit(_0x41eeec[_0x283472(0x1c4)],DEFAULT_LISTING_LIMIT),_0x52059e=await withSpinner(_0x283472(0x1d6),()=>_0x144f85[_0x283472(0x1c3)][_0x283472(0x1c8)](_0x5bed0c,_0x345254,_0xa4c0b6,_0x22fade),{'verbose':_0x41eeec[_0x283472(0x1ba)]}),_0x4cc518=_0x52059e[_0x283472(0x1b8)];if(_0x4cc518[_0x283472(0x1c2)]===0x0&&_0x15beb6[_0x283472(0x1d8)]&&!_0x4468fd)return console[_0x283472(0x1db)](_0x283472(0x1dc)),console[_0x283472(0x1db)](_0x283472(0x1d5)+_0x15beb6[_0x283472(0x1d8)]+'\x27\x20may\x20not\x20exist\x20or\x20contains\x20no\x20tables'),0x1;return console[_0x283472(0x1db)]('✔\x20Found\x20'+_0x4cc518[_0x283472(0x1c2)]+_0x283472(0x1d2)+(_0x4cc518['length']!==0x1?'s':'')),await handleSDKOutput(_0x4cc518,{..._0x41eeec,'limit':_0x22fade}),0x0;}catch(_0x1c417d){if(_0x1c417d instanceof SDKError)return console['error']('Error:\x20'+_0x1c417d['message']),_0x1c417d[_0x283472(0x1b9)]&&console[_0x283472(0x1db)]('\x20\x20Cause:\x20'+_0x1c417d[_0x283472(0x1b9)]),0x1;throw _0x1c417d;}}['validate'](_0x54a4fc){return undefined;}}function a30_0x590f(){const _0x46be64=['limit','Error:\x20Pattern\x20\x27','36JlFAkf','\x27\x20across\x20all\x20databases.','list','execute','11qeHaDi','1094055WddyWg','3044712dgQNNA','118578hZRCtI','includes','\x27\x20is\x20ambiguous.','7380800BZACFy','4798728nrwyqW','\x20table','30iGTmPv','23136130eSKwlY','Database\x20\x27','Listing\x20tables...','List\x20tables\x20in\x20a\x20database','database','.*\x22','site','error','✖\x20No\x20tables\x20found','Database:\x20','name','\x20\x20tdx\x20tables\x20\x22mydb.*\x22\x20\x20\x20\x20\x20\x20\x20\x20->\x20all\x20tables\x20from\x20mydb','Error:\x20','tables','Database\x20pattern:\x20','data','cause','verbose','\x20\x20Or:\x20\x20tdx\x20tables\x20--database\x20','Note:\x20\x27','981569KdrgiS','2VjFaum','\x27\x20without\x20wildcards\x20would\x20search\x20for\x20tables\x20named\x20\x27','\x20\x20tdx\x20tables\x20\x22*.user*\x22\x20\x20\x20\x20\x20\x20\x20->\x20tables\x20matching\x20user*\x20across\x20databases','\x20\x20tdx\x20tables\x20\x22mydb.users\x22\x20\x20\x20\x20->\x20table\x20\x22users\x22\x20in\x20database\x20mydb','length','table'];a30_0x590f=function(){return _0x46be64;};return a30_0x590f();}
1
+ function a30_0x1923(_0x34ab91,_0x1cfcc8){const _0x682db3=a30_0x682d();return a30_0x1923=function(_0x192388,_0x10db3f){_0x192388=_0x192388-0x109;let _0x4bfca6=_0x682db3[_0x192388];return _0x4bfca6;},a30_0x1923(_0x34ab91,_0x1cfcc8);}const a30_0x46dad6=a30_0x1923;(function(_0x42062f,_0x747677){const _0x1546d6=a30_0x1923,_0x1f7c4b=_0x42062f();while(!![]){try{const _0x424519=parseInt(_0x1546d6(0x12b))/0x1*(parseInt(_0x1546d6(0x127))/0x2)+-parseInt(_0x1546d6(0x12d))/0x3+-parseInt(_0x1546d6(0x11b))/0x4*(parseInt(_0x1546d6(0x10b))/0x5)+parseInt(_0x1546d6(0x122))/0x6+-parseInt(_0x1546d6(0x131))/0x7+-parseInt(_0x1546d6(0x109))/0x8*(-parseInt(_0x1546d6(0x117))/0x9)+-parseInt(_0x1546d6(0x10e))/0xa*(-parseInt(_0x1546d6(0x134))/0xb);if(_0x424519===_0x747677)break;else _0x1f7c4b['push'](_0x1f7c4b['shift']());}catch(_0x41da6e){_0x1f7c4b['push'](_0x1f7c4b['shift']());}}}(a30_0x682d,0x4716a));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleSDKOutput}from'../utils/command-output.js';import{parseTableReference}from'../utils/table-ref-parser.js';import{DEFAULT_LISTING_LIMIT,resolveLimit}from'../utils/constants.js';import{withSpinner}from'../utils/spinner.js';export class TablesCommand extends BaseCommand{['name']='tables';[a30_0x46dad6(0x10f)]=a30_0x46dad6(0x12e);async[a30_0x46dad6(0x113)](_0x4c71e0){const _0x1a0a5b=a30_0x46dad6,{options:_0xcd875c,args:_0x17e4dc,tdx:_0x571941}=_0x4c71e0;let _0x56c7fe;if(_0x17e4dc[_0x1a0a5b(0x120)]===0x0)_0x56c7fe={'database':undefined,'table':undefined,'original':''};else{if(_0x17e4dc[_0x1a0a5b(0x120)]===0x1)try{_0x56c7fe=parseTableReference(_0x17e4dc[0x0]);if(_0x56c7fe[_0x1a0a5b(0x13a)]&&!_0x56c7fe['database']&&!_0x56c7fe['table'][_0x1a0a5b(0x123)]('*')&&!_0x56c7fe[_0x1a0a5b(0x13a)]['includes']('?'))return console[_0x1a0a5b(0x124)](_0x1a0a5b(0x112)+_0x17e4dc[0x0]+'\x27\x20is\x20ambiguous.'),console[_0x1a0a5b(0x124)](_0x1a0a5b(0x130)+_0x56c7fe['table']+'\x27?'),console[_0x1a0a5b(0x124)]('\x20\x20Use:\x20tdx\x20tables\x20\x22'+_0x56c7fe['table']+_0x1a0a5b(0x133)),console[_0x1a0a5b(0x124)](_0x1a0a5b(0x136)+_0x56c7fe[_0x1a0a5b(0x13a)]),console['error'](_0x1a0a5b(0x10a)+_0x56c7fe[_0x1a0a5b(0x13a)]),console[_0x1a0a5b(0x124)](''),console[_0x1a0a5b(0x124)](_0x1a0a5b(0x10c)+_0x17e4dc[0x0]+_0x1a0a5b(0x121)+_0x56c7fe[_0x1a0a5b(0x13a)]+_0x1a0a5b(0x129)),0x1;}catch(_0x378e03){return console['error'](_0x1a0a5b(0x12c)+_0x378e03[_0x1a0a5b(0x111)]),0x1;}else return console['error'](_0x1a0a5b(0x125)),console[_0x1a0a5b(0x124)](_0x1a0a5b(0x10d)),console[_0x1a0a5b(0x124)](_0x1a0a5b(0x11e)),console[_0x1a0a5b(0x124)](_0x1a0a5b(0x11d)),console[_0x1a0a5b(0x124)]('\x20\x20tdx\x20tables\x20\x22*.user*\x22\x20\x20\x20\x20\x20\x20\x20->\x20tables\x20matching\x20user*\x20across\x20databases'),console['error'](_0x1a0a5b(0x11f)),console['error'](_0x1a0a5b(0x137)),0x1;}const _0x1b2f5b=_0xcd875c['database'];!_0x56c7fe[_0x1a0a5b(0x126)]&&_0x1b2f5b&&(_0x56c7fe['database']=_0x1b2f5b);try{const _0x21d133=_0x12b14c=>_0x12b14c&&(_0x12b14c['includes']('*')||_0x12b14c[_0x1a0a5b(0x123)]('?')),_0x3a0bdf=_0x21d133(_0x56c7fe[_0x1a0a5b(0x126)]);_0xcd875c[_0x1a0a5b(0x12a)]&&(console[_0x1a0a5b(0x124)]('Site:\x20'+_0xcd875c[_0x1a0a5b(0x11a)]),_0x56c7fe[_0x1a0a5b(0x126)]?_0x3a0bdf?console['error'](_0x1a0a5b(0x132)+_0x56c7fe[_0x1a0a5b(0x126)]):console[_0x1a0a5b(0x124)](_0x1a0a5b(0x128)+_0x56c7fe['database']):console[_0x1a0a5b(0x124)]('Database:\x20all'),_0x56c7fe[_0x1a0a5b(0x13a)]&&console[_0x1a0a5b(0x124)](_0x1a0a5b(0x12f)+_0x56c7fe[_0x1a0a5b(0x13a)]));const _0x2ca4e1=_0x56c7fe[_0x1a0a5b(0x126)]&&!_0x3a0bdf?_0x56c7fe['database']:undefined,_0x234b4b=_0x3a0bdf?_0x56c7fe[_0x1a0a5b(0x126)]:undefined,_0x144480=_0x56c7fe[_0x1a0a5b(0x13a)],_0x27c27=resolveLimit(_0xcd875c[_0x1a0a5b(0x118)],DEFAULT_LISTING_LIMIT),_0x2481c7=await withSpinner(_0x1a0a5b(0x119),()=>_0x571941[_0x1a0a5b(0x13a)][_0x1a0a5b(0x114)](_0x2ca4e1,_0x144480,_0x234b4b,_0x27c27),{'verbose':_0xcd875c[_0x1a0a5b(0x12a)]}),_0x489688=_0x2481c7[_0x1a0a5b(0x116)];if(_0x489688[_0x1a0a5b(0x120)]===0x0&&_0x56c7fe[_0x1a0a5b(0x126)]&&!_0x3a0bdf)return console[_0x1a0a5b(0x124)](_0x1a0a5b(0x11c)),console[_0x1a0a5b(0x124)](_0x1a0a5b(0x110)+_0x56c7fe[_0x1a0a5b(0x126)]+'\x27\x20may\x20not\x20exist\x20or\x20contains\x20no\x20tables'),0x1;return console[_0x1a0a5b(0x124)](_0x1a0a5b(0x139)+_0x489688['length']+_0x1a0a5b(0x115)+(_0x489688['length']!==0x1?'s':'')),await handleSDKOutput(_0x489688,{..._0xcd875c,'limit':_0x27c27}),0x0;}catch(_0x1afbd7){if(_0x1afbd7 instanceof SDKError)return console['error'](_0x1a0a5b(0x12c)+_0x1afbd7[_0x1a0a5b(0x111)]),_0x1afbd7[_0x1a0a5b(0x138)]&&console[_0x1a0a5b(0x124)]('\x20\x20Cause:\x20'+_0x1afbd7['cause']),0x1;throw _0x1afbd7;}}[a30_0x46dad6(0x135)](_0x234c2f){return undefined;}}function a30_0x682d(){const _0x4d90c7=['\x20\x20Or:\x20\x20tdx\x20tables\x20--in\x20','\x20\x20tdx\x20tables\x20--in\x20mydb\x20\x20\x20\x20\x20\x20\x20->\x20all\x20tables\x20from\x20mydb','cause','✔\x20Found\x20','table','4528lKMXjo','\x20\x20Or:\x20\x20tdx\x20tables\x20--database\x20','15FSFvAp','Note:\x20\x27','\x20\x20tdx\x20tables\x20users\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20->\x20table\x20\x22users\x22\x20across\x20all\x20databases','189320ScyQFd','description','Database\x20\x27','message','Error:\x20Pattern\x20\x27','execute','list','\x20table','data','2628rkPxHC','limit','Listing\x20tables...','site','441152vxmBiJ','✖\x20No\x20tables\x20found','\x20\x20tdx\x20tables\x20\x22mydb.users\x22\x20\x20\x20\x20->\x20table\x20\x22users\x22\x20in\x20database\x20mydb','\x20\x20tdx\x20tables\x20\x22mydb.*\x22\x20\x20\x20\x20\x20\x20\x20\x20->\x20all\x20tables\x20from\x20mydb','Or\x20use\x20--in\x20flag:','length','\x27\x20without\x20wildcards\x20would\x20search\x20for\x20tables\x20named\x20\x27','555648mOuPGA','includes','error','Error:\x20Too\x20many\x20arguments.\x20Use\x20single\x20argument:','database','18nXJyxr','Database:\x20','\x27\x20across\x20all\x20databases.','verbose','26987qvEULV','Error:\x20','1055232KvfqBT','List\x20tables\x20in\x20a\x20database','Table\x20pattern:\x20','Did\x20you\x20mean\x20to\x20list\x20all\x20tables\x20from\x20database\x20\x27','3315039hDkVWu','Database\x20pattern:\x20','.*\x22','550ABxDWg','validate'];a30_0x682d=function(){return _0x4d90c7;};return a30_0x682d();}
@@ -1 +1 @@
1
- const a31_0x6676f5=a31_0x7f47;(function(_0x4e84f5,_0x519489){const _0x440e85=a31_0x7f47,_0x5e69b9=_0x4e84f5();while(!![]){try{const _0x5fe268=-parseInt(_0x440e85(0x124))/0x1+parseInt(_0x440e85(0x127))/0x2*(parseInt(_0x440e85(0x120))/0x3)+-parseInt(_0x440e85(0x134))/0x4*(-parseInt(_0x440e85(0x121))/0x5)+-parseInt(_0x440e85(0x126))/0x6+-parseInt(_0x440e85(0x11b))/0x7*(parseInt(_0x440e85(0x12a))/0x8)+parseInt(_0x440e85(0x131))/0x9+-parseInt(_0x440e85(0x12b))/0xa*(-parseInt(_0x440e85(0x11a))/0xb);if(_0x5fe268===_0x519489)break;else _0x5e69b9['push'](_0x5e69b9['shift']());}catch(_0x4844b2){_0x5e69b9['push'](_0x5e69b9['shift']());}}}(a31_0x3729,0xe2d2a));import{BaseCommand}from'./command.js';import{saveSessionContext,getCurrentSessionPID}from'../core/session.js';function a31_0x3729(){const _0xf2d562=['Error:\x20','message','252456dLsnaE','parent_segment','10755240mteYBt','547710UzkiQE','Set\x20session-level\x20context','\x20(session:\x20','24ChePtz','40cFKixe','Usage:\x20tdx\x20use\x20<resource>\x20<value>\x0a','execute','profile','toString','Error:\x20Profile\x20\x27','9079686oJqaax','Invalid\x20resource:\x20','\x27\x20does\x20not\x20exist','5596824owvhZN','\x0aTip:\x20Use\x20\x27tdx\x20context\x20--clear\x27\x20to\x20clear\x20session\x20overrides','database','length','use','error','\x0aUse\x20\x27tdx\x20profiles\x27\x20to\x20see\x20available\x20profiles','Or\x20use:\x20tdx\x20context\x20--clear\x20to\x20clear\x20session\x20context\x0a','session','1874411civZey','908733VGYGOo','Session\x20database\x20set\x20to:\x20','.\x20Must\x20be\x20one\x20of:\x20','log','join','3AfNUuu','5zAJuxG'];a31_0x3729=function(){return _0xf2d562;};return a31_0x3729();}function a31_0x7f47(_0x548bf9,_0x550134){const _0x37299b=a31_0x3729();return a31_0x7f47=function(_0x7f474d,_0x14c79a){_0x7f474d=_0x7f474d-0x113;let _0x128869=_0x37299b[_0x7f474d];return _0x128869;},a31_0x7f47(_0x548bf9,_0x550134);}import{profileExists}from'../core/profile.js';export class UseCommand extends BaseCommand{['name']=a31_0x6676f5(0x115);['description']=a31_0x6676f5(0x128);['validate'](_0xb2815){const _0x2e6ed8=a31_0x6676f5,{args:_0x54d0b6}=_0xb2815;if(_0x54d0b6[_0x2e6ed8(0x114)]<0x2)return _0x2e6ed8(0x12c)+'Resources:\x20database,\x20parent_segment,\x20llm_project,\x20profile\x0a'+_0x2e6ed8(0x118)+'\x0aRun\x20\x27tdx\x20use\x20--help\x27\x20for\x20more\x20options';const _0x509cf2=_0x54d0b6[0x0],_0x35802d=[_0x2e6ed8(0x113),'parent_segment','llm_project',_0x2e6ed8(0x12e)];if(!_0x35802d['includes'](_0x509cf2))return _0x2e6ed8(0x132)+_0x509cf2+_0x2e6ed8(0x11d)+_0x35802d[_0x2e6ed8(0x11f)](',\x20');return undefined;}async[a31_0x6676f5(0x12d)](_0x128a9a){const _0x4437e5=a31_0x6676f5,{args:_0x243882,options:_0x4b607c}=_0x128a9a;try{const _0x32fb7a=_0x243882[0x0],_0x3b7517=_0x243882[0x1];if(_0x32fb7a==='profile'){if(!profileExists(_0x3b7517))return console[_0x4437e5(0x116)](_0x4437e5(0x130)+_0x3b7517+_0x4437e5(0x133)),console[_0x4437e5(0x116)](_0x4437e5(0x117)),0x1;const _0x4210c6=_0x4b607c[_0x4437e5(0x119)]||getCurrentSessionPID()[_0x4437e5(0x12f)]();return saveSessionContext({'profile':_0x3b7517},_0x4b607c['session']),console['log']('Session\x20profile\x20set\x20to:\x20'+_0x3b7517+'\x20(session:\x20'+_0x4210c6+')'),console[_0x4437e5(0x11e)](_0x4437e5(0x135)),0x0;}const _0x55e89f={},_0xd71ff0=_0x4b607c['session']||getCurrentSessionPID()[_0x4437e5(0x12f)]();switch(_0x32fb7a){case'database':_0x55e89f[_0x4437e5(0x113)]=_0x3b7517,console[_0x4437e5(0x11e)](_0x4437e5(0x11c)+_0x3b7517+_0x4437e5(0x129)+_0xd71ff0+')');break;case _0x4437e5(0x125):_0x55e89f['parent_segment']=_0x3b7517,console[_0x4437e5(0x11e)]('Session\x20parent_segment\x20set\x20to:\x20'+_0x3b7517+_0x4437e5(0x129)+_0xd71ff0+')');break;case'llm_project':_0x55e89f['llm_project']=_0x3b7517,console[_0x4437e5(0x11e)]('Session\x20llm_project\x20set\x20to:\x20'+_0x3b7517+_0x4437e5(0x129)+_0xd71ff0+')');break;}return saveSessionContext(_0x55e89f,_0x4b607c[_0x4437e5(0x119)]),console['log'](_0x4437e5(0x135)),0x0;}catch(_0x4803b1){return _0x4803b1 instanceof Error&&console[_0x4437e5(0x116)](_0x4437e5(0x122)+_0x4803b1[_0x4437e5(0x123)]),0x1;}}}
1
+ function a31_0x3fbc(){const _0x29c543=['2654690zZzeMB','validate','7nZdnds','log','database','Session\x20llm_project\x20set\x20to:\x20','Set\x20session-level\x20context','toString','8PLVOur','589569JlfAkE','Resources:\x20database,\x20parent_segment,\x20llm_project,\x20profile\x0a','\x27\x20does\x20not\x20exist','Invalid\x20resource:\x20','description','message','llm_project','Session\x20database\x20set\x20to:\x20','length','session','\x0aTip:\x20Use\x20\x27tdx\x20context\x20--clear\x27\x20to\x20clear\x20session\x20overrides','profile','26693073QbTciZ','execute','1881154ITTyLG','Session\x20parent_segment\x20set\x20to:\x20','\x0aRun\x20\x27tdx\x20use\x20--help\x27\x20for\x20more\x20options','use','Error:\x20Profile\x20\x27','parent_segment','8837670Kqurkg','name','\x20(session:\x20','6886328mMultg','Error:\x20','error','119391dJlWAq','join'];a31_0x3fbc=function(){return _0x29c543;};return a31_0x3fbc();}const a31_0x1bf565=a31_0x1543;function a31_0x1543(_0x4a6cfe,_0x506442){const _0x3fbc02=a31_0x3fbc();return a31_0x1543=function(_0x15433a,_0x40e436){_0x15433a=_0x15433a-0xd3;let _0x23bc89=_0x3fbc02[_0x15433a];return _0x23bc89;},a31_0x1543(_0x4a6cfe,_0x506442);}(function(_0xe437d2,_0x4e2f51){const _0x441bd4=a31_0x1543,_0x384510=_0xe437d2();while(!![]){try{const _0x2983ed=parseInt(_0x441bd4(0xd4))/0x1+parseInt(_0x441bd4(0xed))/0x2+parseInt(_0x441bd4(0xdf))/0x3*(-parseInt(_0x441bd4(0xde))/0x4)+-parseInt(_0x441bd4(0xd6))/0x5+-parseInt(_0x441bd4(0xf3))/0x6+parseInt(_0x441bd4(0xd8))/0x7*(-parseInt(_0x441bd4(0xf6))/0x8)+parseInt(_0x441bd4(0xeb))/0x9;if(_0x2983ed===_0x4e2f51)break;else _0x384510['push'](_0x384510['shift']());}catch(_0x27f54d){_0x384510['push'](_0x384510['shift']());}}}(a31_0x3fbc,0xbb891));import{BaseCommand}from'./command.js';import{saveSessionContext,getCurrentSessionPID}from'../core/session.js';import{profileExists}from'../core/profile.js';export class UseCommand extends BaseCommand{[a31_0x1bf565(0xf4)]=a31_0x1bf565(0xf0);[a31_0x1bf565(0xe3)]=a31_0x1bf565(0xdc);[a31_0x1bf565(0xd7)](_0x357fe5){const _0x2995a4=a31_0x1bf565,{args:_0x451086}=_0x357fe5;if(_0x451086[_0x2995a4(0xe7)]<0x2)return'Usage:\x20tdx\x20use\x20<resource>\x20<value>\x0a'+_0x2995a4(0xe0)+'Or\x20use:\x20tdx\x20context\x20--clear\x20to\x20clear\x20session\x20context\x0a'+_0x2995a4(0xef);const _0x685e72=_0x451086[0x0],_0x290334=[_0x2995a4(0xda),'parent_segment',_0x2995a4(0xe5),_0x2995a4(0xea)];if(!_0x290334['includes'](_0x685e72))return _0x2995a4(0xe2)+_0x685e72+'.\x20Must\x20be\x20one\x20of:\x20'+_0x290334[_0x2995a4(0xd5)](',\x20');return undefined;}async[a31_0x1bf565(0xec)](_0x357c2e){const _0x5e7fc8=a31_0x1bf565,{args:_0x53da0d,options:_0x40761d}=_0x357c2e;try{const _0x974aa1=_0x53da0d[0x0],_0x63e147=_0x53da0d[0x1];if(_0x974aa1===_0x5e7fc8(0xea)){if(!profileExists(_0x63e147))return console[_0x5e7fc8(0xd3)](_0x5e7fc8(0xf1)+_0x63e147+_0x5e7fc8(0xe1)),console[_0x5e7fc8(0xd3)]('\x0aUse\x20\x27tdx\x20profiles\x27\x20to\x20see\x20available\x20profiles'),0x1;const _0x4b7e3c=_0x40761d[_0x5e7fc8(0xe8)]||getCurrentSessionPID()[_0x5e7fc8(0xdd)]();return saveSessionContext({'profile':_0x63e147},_0x40761d['session']),console[_0x5e7fc8(0xd9)]('Session\x20profile\x20set\x20to:\x20'+_0x63e147+'\x20(session:\x20'+_0x4b7e3c+')'),console['log']('\x0aTip:\x20Use\x20\x27tdx\x20context\x20--clear\x27\x20to\x20clear\x20session\x20overrides'),0x0;}const _0x1f777f={},_0x3cec34=_0x40761d[_0x5e7fc8(0xe8)]||getCurrentSessionPID()[_0x5e7fc8(0xdd)]();switch(_0x974aa1){case _0x5e7fc8(0xda):_0x1f777f[_0x5e7fc8(0xda)]=_0x63e147,console[_0x5e7fc8(0xd9)](_0x5e7fc8(0xe6)+_0x63e147+_0x5e7fc8(0xf5)+_0x3cec34+')');break;case _0x5e7fc8(0xf2):_0x1f777f[_0x5e7fc8(0xf2)]=_0x63e147,console[_0x5e7fc8(0xd9)](_0x5e7fc8(0xee)+_0x63e147+_0x5e7fc8(0xf5)+_0x3cec34+')');break;case'llm_project':_0x1f777f[_0x5e7fc8(0xe5)]=_0x63e147,console['log'](_0x5e7fc8(0xdb)+_0x63e147+'\x20(session:\x20'+_0x3cec34+')');break;}return saveSessionContext(_0x1f777f,_0x40761d[_0x5e7fc8(0xe8)]),console[_0x5e7fc8(0xd9)](_0x5e7fc8(0xe9)),0x0;}catch(_0x88eacd){return _0x88eacd instanceof Error&&console[_0x5e7fc8(0xd3)](_0x5e7fc8(0xf7)+_0x88eacd[_0x5e7fc8(0xe4)]),0x1;}}}
@@ -1 +1 @@
1
- const a32_0x37d6e6=a32_0x5690;(function(_0x43e783,_0x2785bf){const _0x554787=a32_0x5690,_0x43f0b6=_0x43e783();while(!![]){try{const _0x3428bf=-parseInt(_0x554787(0xb4))/0x1+parseInt(_0x554787(0xf6))/0x2*(parseInt(_0x554787(0xc1))/0x3)+parseInt(_0x554787(0x10a))/0x4*(parseInt(_0x554787(0xde))/0x5)+parseInt(_0x554787(0xef))/0x6*(-parseInt(_0x554787(0x11e))/0x7)+parseInt(_0x554787(0xeb))/0x8*(parseInt(_0x554787(0xf7))/0x9)+parseInt(_0x554787(0x11b))/0xa+-parseInt(_0x554787(0x106))/0xb*(parseInt(_0x554787(0xf0))/0xc);if(_0x3428bf===_0x2785bf)break;else _0x43f0b6['push'](_0x43f0b6['shift']());}catch(_0x27f61a){_0x43f0b6['push'](_0x43f0b6['shift']());}}}(a32_0x56f4,0xb9a91));import{BaseCommand}from'./command.js';function a32_0x5690(_0x1f6871,_0x7390f8){const _0x56f469=a32_0x56f4();return a32_0x5690=function(_0x56908b,_0x5d5908){_0x56908b=_0x56908b-0xb4;let _0x7197a0=_0x56f469[_0x56908b];return _0x7197a0;},a32_0x5690(_0x1f6871,_0x7390f8);}import{SDKError}from'../sdk/index.js';import{handleSDKOutput}from'../utils/command-output.js';function a32_0x56f4(){const _0xc7b6c1=['Usage:\x20workflow:delete\x20<project-name-or-id>','Pushing\x20workflow\x20project...','Error:\x20','1942885GhFRuC','\x20\x20New\x20attempt\x20ID:\x20','tasks','Retrying\x20attempt...','List\x20workflows','Killing\x20attempt...','Show\x20specific\x20attempt\x20details','error','workflow:attempts','Getting\x20task\x20logs...','parse','params','projectName','8CjbzaR','Usage:\x20workflow\x20retry\x20session:<id>\x20or\x20workflow\x20retry\x20attempt:<id>','session:','includeSubtasks','40386qGpXzZ','6204MDvJgA','Listing\x20workflow\x20projects...','Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20project\x20\x22','yes','Push\x20workflow\x20project\x20to\x20Treasure\x20Data','workflow:retry','264772ghiStM','12160089LMTgjg','workflows','offset','stat','Attempt\x20ID:\x20','\x20task','Task\x20name:\x20','filesExtracted','workflow:logs','\x20\x20Revision:\x20','Retrying\x20session...','push','retrySession','retryAttempt','Error:\x20Target\x20must\x20be\x20prefixed\x20with\x20\x22session:\x22\x20or\x20\x22attempt:\x22','37939lLvYMz','Error:\x20Project\x20name\x20is\x20required','from','data','4aaYlcx','resumeFrom','skipValidation','execute','Pattern:\x20','Cancelled','Resume\x20from:\x20','isDirectory','Error:\x20Invalid\x20JSON\x20in\x20--params','workflow:delete','\x22?\x20This\x20cannot\x20be\x20undone.','name','Are\x20you\x20sure\x20you\x20want\x20to\x20retry\x20','\x20session','attempts','force','message','13341850bEJKkm','Project\x20directory:\x20','Revision:\x20','273KQieqS','workflow:attempt','List\x20all\x20workflow\x20projects','logs','verbose','Delete\x20workflow\x20project\x20from\x20Treasure\x20Data','substring','Getting\x20attempt\x20tasks...','workflow','Status:\x20','fs/promises','split','revision','status','Listing\x20workflows...','✔\x20Downloaded\x20','✔\x20Retry\x20started','workflow:download','Filter:\x20','\x20project','Project:\x20','Error:\x20Project\x20name\x20or\x20ID\x20is\x20required','delete','Project\x20name:\x20','List\x20workflow\x20attempts','✔\x20Found\x20','Project\x20filter:\x20','sessionId','Error:\x20Attempt\x20ID\x20and\x20task\x20name\x20are\x20required','929706coiECq','Filter:\x20project=','Retry\x20a\x20session\x20or\x20attempt','cause','Reason:\x20','\x20attempt','\x20\x20Location:\x20','projectId','\x20workflow','Show\x20logs\x20for\x20a\x20specific\x20task','description','...','attempt','15hquALz','reason','workflow:kill','Target:\x20','Download\x20workflow\x20project\x20from\x20Treasure\x20Data','✔\x20Pushed\x20','startsWith','download','Error:\x20Invalid\x20pattern.\x20Use\x20format:\x20project\x20or\x20project.workflow','✔\x20Deleted\x20project\x20','Listing\x20workflow\x20sessions...','limit','From\x20task:\x20','session','Error:\x20Attempt\x20ID\x20is\x20required','\x20\x20Cause:\x20','List\x20workflow\x20execution\x20sessions','Downloading\x20project\x20','kill','workflow:push','length','\x20\x20Files\x20extracted:\x20','Including\x20subtasks:\x20yes','\x20is\x20not\x20a\x20directory','workflow:tasks','\x20\x20Project\x20ID:\x20'];a32_0x56f4=function(){return _0xc7b6c1;};return a32_0x56f4();}import{withSpinner}from'../utils/spinner.js';import{confirm}from'../utils/prompt.js';export class WorkflowProjectsCommand extends BaseCommand{[a32_0x37d6e6(0x115)]='workflow:projects';[a32_0x37d6e6(0xbe)]=a32_0x37d6e6(0x120);async['execute'](_0x2037f2){const _0x472a36=a32_0x37d6e6,{options:_0x468862,args:_0x34b0d4,tdx:_0x34c89a}=_0x2037f2,_0x2f3b73=_0x34b0d4[0x0];try{_0x468862[_0x472a36(0x122)]&&_0x2f3b73&&console['error'](_0x472a36(0x10e)+_0x2f3b73);const _0x3351d4=await withSpinner(_0x472a36(0xf1),()=>_0x34c89a['workflow']['projects'](_0x2f3b73,{'limit':_0x468862[_0x472a36(0xcc)]}),{'verbose':_0x468862['verbose']}),_0x1ff9db=_0x3351d4[_0x472a36(0x109)];return console[_0x472a36(0xe5)](_0x472a36(0x137)+_0x1ff9db[_0x472a36(0xd5)]+_0x472a36(0x131)+(_0x1ff9db['length']!==0x1?'s':'')),await handleSDKOutput(_0x1ff9db,_0x468862),0x0;}catch(_0x3caac7){if(_0x3caac7 instanceof SDKError)return console[_0x472a36(0xe5)]('Error:\x20'+_0x3caac7[_0x472a36(0x11a)]),_0x3caac7[_0x472a36(0xb7)]&&console[_0x472a36(0xe5)](_0x472a36(0xd0)+_0x3caac7['cause']),0x1;throw _0x3caac7;}}}export class WorkflowWorkflowsCommand extends BaseCommand{[a32_0x37d6e6(0x115)]='workflow:workflows';[a32_0x37d6e6(0xbe)]=a32_0x37d6e6(0xe2);async[a32_0x37d6e6(0x10d)](_0x4ae1f3){const _0x4b92e6=a32_0x37d6e6,{options:_0x243716,args:_0x302f56,tdx:_0x4d1ab9}=_0x4ae1f3,_0xb8daa2=_0x302f56[0x0];try{_0x243716[_0x4b92e6(0x122)]&&_0xb8daa2&&console[_0x4b92e6(0xe5)](_0x4b92e6(0x138)+_0xb8daa2);const _0x34127e=await withSpinner(_0x4b92e6(0x12c),()=>_0x4d1ab9['workflow'][_0x4b92e6(0xf8)](_0xb8daa2,{'limit':_0x243716[_0x4b92e6(0xcc)]}),{'verbose':_0x243716[_0x4b92e6(0x122)]}),_0x3cb24f=_0x34127e[_0x4b92e6(0x109)];return console[_0x4b92e6(0xe5)](_0x4b92e6(0x137)+_0x3cb24f[_0x4b92e6(0xd5)]+_0x4b92e6(0xbc)+(_0x3cb24f[_0x4b92e6(0xd5)]!==0x1?'s':'')),await handleSDKOutput(_0x3cb24f,_0x243716),0x0;}catch(_0x274f85){if(_0x274f85 instanceof SDKError)return console[_0x4b92e6(0xe5)](_0x4b92e6(0xdd)+_0x274f85[_0x4b92e6(0x11a)]),_0x274f85['cause']&&console[_0x4b92e6(0xe5)]('\x20\x20Cause:\x20'+_0x274f85[_0x4b92e6(0xb7)]),0x1;throw _0x274f85;}}}export class WorkflowSessionsCommand extends BaseCommand{[a32_0x37d6e6(0x115)]='workflow:sessions';['description']=a32_0x37d6e6(0xd1);async[a32_0x37d6e6(0x10d)](_0x259777){const _0x51755a=a32_0x37d6e6,{options:_0x5babe4,args:_0x1f4de0,tdx:_0x5af3e3}=_0x259777;let _0x56434d,_0x498299;if(_0x1f4de0[0x0]){const _0x3c16d3=_0x1f4de0[0x0][_0x51755a(0x129)]('.');if(_0x3c16d3[_0x51755a(0xd5)]===0x1)_0x56434d=_0x3c16d3[0x0];else{if(_0x3c16d3['length']===0x2)[_0x56434d,_0x498299]=_0x3c16d3;else return console[_0x51755a(0xe5)](_0x51755a(0xc9)),0x1;}}try{if(_0x5babe4[_0x51755a(0x122)]){if(_0x56434d&&_0x498299)console[_0x51755a(0xe5)](_0x51755a(0x130)+_0x56434d+'.'+_0x498299);else _0x56434d&&console[_0x51755a(0xe5)](_0x51755a(0xb5)+_0x56434d);const _0x242e2a=_0x5babe4[_0x51755a(0x12b)];_0x242e2a&&console[_0x51755a(0xe5)](_0x51755a(0x127)+_0x242e2a);}const _0x5d2376=await withSpinner(_0x51755a(0xcb),()=>_0x5af3e3[_0x51755a(0x126)]['sessions']({'projectName':_0x56434d,'workflowName':_0x498299,'status':_0x5babe4[_0x51755a(0x12b)],'fromTime':_0x5babe4[_0x51755a(0x108)],'toTime':_0x5babe4['to'],'limit':_0x5babe4[_0x51755a(0xcc)]}),{'verbose':_0x5babe4[_0x51755a(0x122)]}),_0x5e79eb=_0x5d2376['data'];return console[_0x51755a(0xe5)](_0x51755a(0x137)+_0x5e79eb[_0x51755a(0xd5)]+_0x51755a(0x117)+(_0x5e79eb[_0x51755a(0xd5)]!==0x1?'s':'')),await handleSDKOutput(_0x5e79eb,_0x5babe4),0x0;}catch(_0x30afcf){if(_0x30afcf instanceof SDKError)return console['error'](_0x51755a(0xdd)+_0x30afcf[_0x51755a(0x11a)]),_0x30afcf[_0x51755a(0xb7)]&&console[_0x51755a(0xe5)](_0x51755a(0xd0)+_0x30afcf[_0x51755a(0xb7)]),0x1;throw _0x30afcf;}}}export class WorkflowAttemptsCommand extends BaseCommand{[a32_0x37d6e6(0x115)]=a32_0x37d6e6(0xe6);[a32_0x37d6e6(0xbe)]=a32_0x37d6e6(0x136);async['execute'](_0x336ddb){const _0x261d03=a32_0x37d6e6,{options:_0x5a7578,args:_0xecf4a8,tdx:_0x13c60c}=_0x336ddb;let _0x56c46d,_0x4f579f;if(_0xecf4a8[0x0]){const _0x670fd3=_0xecf4a8[0x0][_0x261d03(0x129)]('.');if(_0x670fd3[_0x261d03(0xd5)]===0x1)_0x56c46d=_0x670fd3[0x0];else{if(_0x670fd3['length']===0x2)[_0x56c46d,_0x4f579f]=_0x670fd3;else return console[_0x261d03(0xe5)](_0x261d03(0xc9)),0x1;}}try{const _0x31d355=_0x5a7578['includeRetried'];if(_0x5a7578['verbose']){if(_0x56c46d&&_0x4f579f)console[_0x261d03(0xe5)]('Filter:\x20'+_0x56c46d+'.'+_0x4f579f);else _0x56c46d&&console[_0x261d03(0xe5)](_0x261d03(0xb5)+_0x56c46d);_0x31d355&&console[_0x261d03(0xe5)]('Include\x20retried:\x20yes');}const _0xb6dd91=await withSpinner('Listing\x20workflow\x20attempts...',()=>_0x13c60c['workflow'][_0x261d03(0x118)]({'projectName':_0x56c46d,'workflowName':_0x4f579f,'includeRetried':_0x31d355,'limit':_0x5a7578[_0x261d03(0xcc)]}),{'verbose':_0x5a7578[_0x261d03(0x122)]}),_0x30aace=_0xb6dd91[_0x261d03(0x109)];return console[_0x261d03(0xe5)](_0x261d03(0x137)+_0x30aace['length']+_0x261d03(0xb9)+(_0x30aace['length']!==0x1?'s':'')),await handleSDKOutput(_0x30aace,_0x5a7578),0x0;}catch(_0x1e3b6d){if(_0x1e3b6d instanceof SDKError)return console['error']('Error:\x20'+_0x1e3b6d[_0x261d03(0x11a)]),_0x1e3b6d[_0x261d03(0xb7)]&&console[_0x261d03(0xe5)](_0x261d03(0xd0)+_0x1e3b6d[_0x261d03(0xb7)]),0x1;throw _0x1e3b6d;}}}export class WorkflowAttemptCommand extends BaseCommand{['name']=a32_0x37d6e6(0x11f);[a32_0x37d6e6(0xbe)]=a32_0x37d6e6(0xe4);async[a32_0x37d6e6(0x10d)](_0x3ee8f){const _0x36d6cf=a32_0x37d6e6,{options:_0x4e3d4c,args:_0x66316,tdx:_0x2dd007}=_0x3ee8f,_0x3004f3=_0x66316[0x0];if(!_0x3004f3)return console[_0x36d6cf(0xe5)]('Error:\x20Attempt\x20ID\x20is\x20required'),0x1;try{_0x4e3d4c[_0x36d6cf(0x122)]&&console[_0x36d6cf(0xe5)](_0x36d6cf(0xfb)+_0x3004f3);const _0x58e313=await withSpinner('Getting\x20attempt\x20details...',()=>_0x2dd007[_0x36d6cf(0x126)]['attempt'](_0x3004f3),{'verbose':_0x4e3d4c[_0x36d6cf(0x122)]}),_0x45354b=_0x58e313[_0x36d6cf(0x109)];return await handleSDKOutput([_0x45354b],_0x4e3d4c),0x0;}catch(_0x434984){if(_0x434984 instanceof SDKError)return console[_0x36d6cf(0xe5)](_0x36d6cf(0xdd)+_0x434984[_0x36d6cf(0x11a)]),_0x434984[_0x36d6cf(0xb7)]&&console['error'](_0x36d6cf(0xd0)+_0x434984[_0x36d6cf(0xb7)]),0x1;throw _0x434984;}}}export class WorkflowTasksCommand extends BaseCommand{[a32_0x37d6e6(0x115)]=a32_0x37d6e6(0xd9);[a32_0x37d6e6(0xbe)]='Show\x20tasks\x20for\x20an\x20attempt';async[a32_0x37d6e6(0x10d)](_0x34ce57){const _0x4b00c9=a32_0x37d6e6,{options:_0x309d49,args:_0x596195,tdx:_0x315644}=_0x34ce57,_0x18245a=_0x596195[0x0];if(!_0x18245a)return console[_0x4b00c9(0xe5)](_0x4b00c9(0xcf)),0x1;try{const _0x28257f=_0x309d49[_0x4b00c9(0xee)];_0x309d49[_0x4b00c9(0x122)]&&(console[_0x4b00c9(0xe5)](_0x4b00c9(0xfb)+_0x18245a),_0x28257f&&console[_0x4b00c9(0xe5)](_0x4b00c9(0xd7)));const _0x26ca2e=await withSpinner(_0x4b00c9(0x125),()=>_0x315644[_0x4b00c9(0x126)][_0x4b00c9(0xe0)](_0x18245a,_0x28257f||![]),{'verbose':_0x309d49['verbose']}),_0x1585f8=_0x26ca2e[_0x4b00c9(0x109)];return console[_0x4b00c9(0xe5)]('✔\x20Found\x20'+_0x1585f8[_0x4b00c9(0xd5)]+_0x4b00c9(0xfc)+(_0x1585f8['length']!==0x1?'s':'')),await handleSDKOutput(_0x1585f8,_0x309d49),0x0;}catch(_0x59ff93){if(_0x59ff93 instanceof SDKError)return console[_0x4b00c9(0xe5)](_0x4b00c9(0xdd)+_0x59ff93[_0x4b00c9(0x11a)]),_0x59ff93[_0x4b00c9(0xb7)]&&console[_0x4b00c9(0xe5)](_0x4b00c9(0xd0)+_0x59ff93['cause']),0x1;throw _0x59ff93;}}}export class WorkflowLogsCommand extends BaseCommand{[a32_0x37d6e6(0x115)]=a32_0x37d6e6(0xff);['description']=a32_0x37d6e6(0xbd);async['execute'](_0x1d4647){const _0x245cae=a32_0x37d6e6,{options:_0x2234d1,args:_0x3f92a6,tdx:_0xaceb77}=_0x1d4647,_0x2fb608=_0x3f92a6[0x0],_0x32ae89=_0x3f92a6[0x1];if(!_0x2fb608||!_0x32ae89)return console[_0x245cae(0xe5)](_0x245cae(0x13a)),0x1;try{_0x2234d1[_0x245cae(0x122)]&&(console[_0x245cae(0xe5)](_0x245cae(0xfb)+_0x2fb608),console['error'](_0x245cae(0xfd)+_0x32ae89));const _0x46d9ac=_0x2234d1[_0x245cae(0xf9)],_0x193bd2=await withSpinner(_0x245cae(0xe7),()=>_0xaceb77[_0x245cae(0x126)][_0x245cae(0x121)](_0x2fb608,_0x32ae89,{'offset':_0x46d9ac,'limit':_0x2234d1[_0x245cae(0xcc)]}),{'verbose':_0x2234d1[_0x245cae(0x122)]}),_0x45a099=_0x193bd2['data'];return console[_0x245cae(0xe5)](_0x245cae(0x137)+_0x45a099[_0x245cae(0xd5)]+'\x20log\x20entr'+(_0x45a099[_0x245cae(0xd5)]!==0x1?'ies':'y')),await handleSDKOutput(_0x45a099,_0x2234d1),0x0;}catch(_0x570c0f){if(_0x570c0f instanceof SDKError)return console['error'](_0x245cae(0xdd)+_0x570c0f[_0x245cae(0x11a)]),_0x570c0f['cause']&&console[_0x245cae(0xe5)](_0x245cae(0xd0)+_0x570c0f['cause']),0x1;throw _0x570c0f;}}}export class WorkflowKillCommand extends BaseCommand{[a32_0x37d6e6(0x115)]=a32_0x37d6e6(0xc3);[a32_0x37d6e6(0xbe)]='Kill\x20a\x20running\x20attempt';async['execute'](_0x12246c){const _0x28720f=a32_0x37d6e6,{options:_0x597032,args:_0x4aaf5d,tdx:_0x2b6ee8}=_0x12246c,_0x4e323f=_0x4aaf5d[0x0];if(!_0x4e323f)return console['error'](_0x28720f(0xcf)),0x1;try{const _0x29df3e=_0x597032[_0x28720f(0xc2)];_0x597032['verbose']&&(console['error'](_0x28720f(0xfb)+_0x4e323f),_0x29df3e&&console[_0x28720f(0xe5)](_0x28720f(0xb8)+_0x29df3e));if(!_0x597032[_0x28720f(0xf3)]){const _0x26318f=await confirm('Are\x20you\x20sure\x20you\x20want\x20to\x20kill\x20attempt\x20'+_0x4e323f+'?');if(!_0x26318f)return console[_0x28720f(0xe5)]('Cancelled'),0x0;}const _0x54366d=await withSpinner(_0x28720f(0xe3),()=>_0x2b6ee8[_0x28720f(0x126)][_0x28720f(0xd3)](_0x4e323f,_0x29df3e),{'verbose':_0x597032[_0x28720f(0x122)]}),_0x309228=_0x54366d[_0x28720f(0x109)];return console[_0x28720f(0xe5)]('✔\x20'+_0x309228),0x0;}catch(_0x5b67c6){if(_0x5b67c6 instanceof SDKError)return console['error'](_0x28720f(0xdd)+_0x5b67c6[_0x28720f(0x11a)]),_0x5b67c6[_0x28720f(0xb7)]&&console[_0x28720f(0xe5)](_0x28720f(0xd0)+_0x5b67c6['cause']),0x1;throw _0x5b67c6;}}}export class WorkflowRetryCommand extends BaseCommand{['name']=a32_0x37d6e6(0xf5);[a32_0x37d6e6(0xbe)]=a32_0x37d6e6(0xb6);async[a32_0x37d6e6(0x10d)](_0x3fe1c2){const _0x2b6658=a32_0x37d6e6,{options:_0x458c7a,args:_0x3710b2,tdx:_0x2540f1}=_0x3fe1c2,_0x5055c0=_0x3710b2[0x0];if(!_0x5055c0)return console['error']('Error:\x20Session\x20ID\x20or\x20attempt\x20ID\x20is\x20required'),console['error'](_0x2b6658(0xec)),0x1;let _0x137311=![],_0x4713e3=_0x5055c0;if(_0x5055c0[_0x2b6658(0xc7)](_0x2b6658(0xed)))_0x137311=!![],_0x4713e3=_0x5055c0['substring'](0x8);else{if(_0x5055c0['startsWith']('attempt:'))_0x137311=![],_0x4713e3=_0x5055c0[_0x2b6658(0x124)](0x8);else return console[_0x2b6658(0xe5)](_0x2b6658(0x105)),console[_0x2b6658(0xe5)]('Usage:\x20workflow\x20retry\x20session:<id>\x20or\x20workflow\x20retry\x20attempt:<id>'),0x1;}try{const _0x225d34=_0x458c7a['fromTask'],_0x2ee29e=_0x458c7a[_0x2b6658(0x10b)],_0xe27b1f=_0x458c7a[_0x2b6658(0xe9)],_0x2fb03f=_0x458c7a[_0x2b6658(0x119)];_0x458c7a['verbose']&&(console[_0x2b6658(0xe5)](_0x2b6658(0xc4)+(_0x137311?_0x2b6658(0xce):_0x2b6658(0xc0))+'\x20'+_0x4713e3),_0x225d34&&console[_0x2b6658(0xe5)](_0x2b6658(0xcd)+_0x225d34),_0x2ee29e&&console[_0x2b6658(0xe5)](_0x2b6658(0x110)+_0x2ee29e),_0xe27b1f&&console['error']('Params:\x20'+_0xe27b1f),_0x2fb03f&&console['error']('Force:\x20yes'));let _0x58d547;if(_0xe27b1f)try{if(_0xe27b1f[_0x2b6658(0xc7)]('@')){const _0x1893ed=await import(_0x2b6658(0x128)),_0x15d8cd=_0xe27b1f[_0x2b6658(0x124)](0x1),_0x16ffa3=await _0x1893ed['readFile'](_0x15d8cd,'utf-8');_0x58d547=JSON[_0x2b6658(0xe8)](_0x16ffa3);}else _0x58d547=JSON[_0x2b6658(0xe8)](_0xe27b1f);}catch{return console[_0x2b6658(0xe5)](_0x2b6658(0x112)),0x1;}if(!_0x458c7a[_0x2b6658(0xf3)]){const _0x4939cb=await confirm(_0x2b6658(0x116)+(_0x137311?'session':_0x2b6658(0xc0))+'\x20'+_0x4713e3+'?');if(!_0x4939cb)return console['error'](_0x2b6658(0x10f)),0x0;}let _0x56667f;_0x137311?_0x56667f=await withSpinner(_0x2b6658(0x101),()=>_0x2540f1[_0x2b6658(0x126)][_0x2b6658(0x103)](_0x4713e3,{'fromTask':_0x225d34,'retryParams':_0x58d547}),{'verbose':_0x458c7a[_0x2b6658(0x122)]}):_0x56667f=await withSpinner(_0x2b6658(0xe1),()=>_0x2540f1[_0x2b6658(0x126)][_0x2b6658(0x104)](_0x4713e3,{'resumeFrom':_0x2ee29e,'retryParams':_0x58d547,'force':_0x2fb03f}),{'verbose':_0x458c7a['verbose']});const _0x17b66b=_0x56667f[_0x2b6658(0x109)];return console[_0x2b6658(0xe5)](_0x2b6658(0x12e)),console[_0x2b6658(0xe5)](_0x2b6658(0xdf)+_0x17b66b['attemptId']),console['error']('\x20\x20Session\x20ID:\x20'+_0x17b66b[_0x2b6658(0x139)]),0x0;}catch(_0x10e009){if(_0x10e009 instanceof SDKError)return console[_0x2b6658(0xe5)](_0x2b6658(0xdd)+_0x10e009['message']),_0x10e009[_0x2b6658(0xb7)]&&console[_0x2b6658(0xe5)](_0x2b6658(0xd0)+_0x10e009[_0x2b6658(0xb7)]),0x1;throw _0x10e009;}}}export class WorkflowDownloadCommand extends BaseCommand{[a32_0x37d6e6(0x115)]=a32_0x37d6e6(0x12f);['description']=a32_0x37d6e6(0xc5);async[a32_0x37d6e6(0x10d)](_0x207bc4){const _0x208d25=a32_0x37d6e6,{options:_0x3665b5,args:_0x4769f5,tdx:_0x1195ec}=_0x207bc4,_0x12f044=_0x4769f5[0x0],_0x5d26b2=_0x4769f5[0x1]||'.';if(!_0x12f044)return console['error'](_0x208d25(0x107)),console[_0x208d25(0xe5)]('Usage:\x20workflow:download\x20<project-name>\x20[output-dir]'),0x1;const _0x318a98=_0x3665b5[_0x208d25(0x12a)];_0x3665b5[_0x208d25(0x122)]&&(console[_0x208d25(0xe5)](_0x208d25(0x132)+_0x12f044),console[_0x208d25(0xe5)]('Output\x20directory:\x20'+_0x5d26b2),_0x318a98&&console[_0x208d25(0xe5)](_0x208d25(0x11d)+_0x318a98));const _0x4a2e4c=await withSpinner(_0x208d25(0xd2)+_0x12f044+_0x208d25(0xbf),()=>_0x1195ec[_0x208d25(0x126)][_0x208d25(0xc8)](_0x12f044,_0x5d26b2,{'revision':_0x318a98}),{'verbose':_0x3665b5[_0x208d25(0x122)]}),_0x340c80=_0x4a2e4c[_0x208d25(0x109)];return console[_0x208d25(0xe5)](_0x208d25(0x12d)+_0x340c80[_0x208d25(0xea)]),console[_0x208d25(0xe5)](_0x208d25(0x100)+_0x340c80[_0x208d25(0x12a)]),console['error'](_0x208d25(0xd6)+_0x340c80[_0x208d25(0xfe)]),console[_0x208d25(0xe5)](_0x208d25(0xba)+_0x5d26b2+'/'+_0x340c80['projectName']),0x0;}}export class WorkflowPushCommand extends BaseCommand{[a32_0x37d6e6(0x115)]=a32_0x37d6e6(0xd4);[a32_0x37d6e6(0xbe)]=a32_0x37d6e6(0xf4);async[a32_0x37d6e6(0x10d)](_0xd3ffce){const _0x38fe26=a32_0x37d6e6,{options:_0x45a3c7,args:_0x19ef21,tdx:_0x3836e8}=_0xd3ffce;let _0x5ee29d='.',_0x261c13=_0x45a3c7['name'];if(_0x19ef21[0x0]){const {promises:_0x3427eb}=await import('fs');try{const _0x730476=await _0x3427eb[_0x38fe26(0xfa)](_0x19ef21[0x0]);if(_0x730476[_0x38fe26(0x111)]())_0x5ee29d=_0x19ef21[0x0];else return console[_0x38fe26(0xe5)]('Error:\x20'+_0x19ef21[0x0]+_0x38fe26(0xd8)),0x1;}catch{_0x261c13=_0x19ef21[0x0],_0x5ee29d='.';}}const _0x485f31=_0x45a3c7[_0x38fe26(0x12a)],_0x289bf8=_0x45a3c7[_0x38fe26(0x10c)];_0x45a3c7[_0x38fe26(0x122)]&&(console[_0x38fe26(0xe5)](_0x38fe26(0x11c)+_0x5ee29d),_0x261c13&&console[_0x38fe26(0xe5)](_0x38fe26(0x135)+_0x261c13),_0x485f31&&console['error'](_0x38fe26(0x11d)+_0x485f31),_0x289bf8&&console[_0x38fe26(0xe5)]('Validation:\x20skipped'));const _0x5b8c2a=await withSpinner(_0x38fe26(0xdc),()=>_0x3836e8[_0x38fe26(0x126)][_0x38fe26(0x102)](_0x5ee29d,{'projectName':_0x261c13,'revision':_0x485f31,'skipValidation':_0x289bf8}),{'verbose':_0x45a3c7[_0x38fe26(0x122)]}),_0x33f54b=_0x5b8c2a['data'];return console['error'](_0x38fe26(0xc6)+_0x33f54b[_0x38fe26(0xea)]),console['error'](_0x38fe26(0xda)+_0x33f54b[_0x38fe26(0xbb)]),console[_0x38fe26(0xe5)](_0x38fe26(0x100)+_0x33f54b[_0x38fe26(0x12a)]),0x0;}}export class WorkflowDeleteCommand extends BaseCommand{[a32_0x37d6e6(0x115)]=a32_0x37d6e6(0x113);[a32_0x37d6e6(0xbe)]=a32_0x37d6e6(0x123);async[a32_0x37d6e6(0x10d)](_0x4e3b7b){const _0x2e70ac=a32_0x37d6e6,{options:_0x284431,args:_0x4a7e2c,tdx:_0x2757b2}=_0x4e3b7b,_0x36ce51=_0x4a7e2c[0x0];if(!_0x36ce51)return console[_0x2e70ac(0xe5)](_0x2e70ac(0x133)),console[_0x2e70ac(0xe5)](_0x2e70ac(0xdb)),0x1;_0x284431[_0x2e70ac(0x122)]&&console[_0x2e70ac(0xe5)](_0x2e70ac(0x132)+_0x36ce51);if(!_0x284431[_0x2e70ac(0xf3)]){const _0x229be6=await confirm(_0x2e70ac(0xf2)+_0x36ce51+_0x2e70ac(0x114));if(!_0x229be6)return console[_0x2e70ac(0xe5)](_0x2e70ac(0x10f)),0x0;}const _0x133c94=await withSpinner('Deleting\x20project\x20'+_0x36ce51+_0x2e70ac(0xbf),()=>_0x2757b2[_0x2e70ac(0x126)][_0x2e70ac(0x134)](_0x36ce51),{'verbose':_0x284431['verbose']}),_0x2465d9=_0x133c94[_0x2e70ac(0x109)];return console[_0x2e70ac(0xe5)](_0x2e70ac(0xca)+_0x2465d9[_0x2e70ac(0xea)]),console[_0x2e70ac(0xe5)]('\x20\x20Project\x20ID:\x20'+_0x2465d9[_0x2e70ac(0xbb)]),0x0;}}
1
+ const a32_0xed93ff=a32_0x3aec;(function(_0x26c76e,_0x3a69a7){const _0x64d9c5=a32_0x3aec,_0x2cd232=_0x26c76e();while(!![]){try{const _0x57c39f=-parseInt(_0x64d9c5(0x15a))/0x1+parseInt(_0x64d9c5(0x132))/0x2+parseInt(_0x64d9c5(0x170))/0x3+parseInt(_0x64d9c5(0x119))/0x4+parseInt(_0x64d9c5(0x121))/0x5*(parseInt(_0x64d9c5(0x13f))/0x6)+parseInt(_0x64d9c5(0x17d))/0x7+-parseInt(_0x64d9c5(0x12a))/0x8;if(_0x57c39f===_0x3a69a7)break;else _0x2cd232['push'](_0x2cd232['shift']());}catch(_0x1fc4b9){_0x2cd232['push'](_0x2cd232['shift']());}}}(a32_0x460f,0xe9844));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{confirm}from'../utils/prompt.js';export class WorkflowProjectsCommand extends BaseCommand{[a32_0xed93ff(0x169)]=a32_0xed93ff(0x11b);['description']=a32_0xed93ff(0x11e);async[a32_0xed93ff(0x157)](_0x18df28){const _0x2b7c1e=a32_0xed93ff,{options:_0x290b53,args:_0x4b886d,tdx:_0x46af77}=_0x18df28,_0xb3ad9c=_0x4b886d[0x0];try{_0x290b53[_0x2b7c1e(0x17e)]&&_0xb3ad9c&&console['error'](_0x2b7c1e(0x161)+_0xb3ad9c);const _0x170e40=await withSpinner('Listing\x20workflow\x20projects...',()=>_0x46af77[_0x2b7c1e(0x16a)][_0x2b7c1e(0x166)](_0xb3ad9c,{'limit':_0x290b53[_0x2b7c1e(0x105)]}),{'verbose':_0x290b53[_0x2b7c1e(0x17e)]}),_0x40fd6a=_0x170e40['data'];return console[_0x2b7c1e(0x17c)]('✔\x20Found\x20'+_0x40fd6a[_0x2b7c1e(0x13c)]+_0x2b7c1e(0x15c)+(_0x40fd6a['length']!==0x1?'s':'')),await handleSDKOutput(_0x40fd6a,_0x290b53),0x0;}catch(_0xf6eb0b){if(_0xf6eb0b instanceof SDKError)return console[_0x2b7c1e(0x17c)]('Error:\x20'+_0xf6eb0b['message']),_0xf6eb0b[_0x2b7c1e(0x11a)]&&console[_0x2b7c1e(0x17c)]('\x20\x20Cause:\x20'+_0xf6eb0b[_0x2b7c1e(0x11a)]),0x1;throw _0xf6eb0b;}}}export class WorkflowWorkflowsCommand extends BaseCommand{[a32_0xed93ff(0x169)]='workflow:workflows';['description']=a32_0xed93ff(0x12d);async[a32_0xed93ff(0x157)](_0x1c5eb4){const _0x14c58b=a32_0xed93ff,{options:_0x133ba1,args:_0x453c80,tdx:_0x4f160c}=_0x1c5eb4,_0x1cc68b=_0x453c80[0x0];try{_0x133ba1['verbose']&&_0x1cc68b&&console[_0x14c58b(0x17c)](_0x14c58b(0x142)+_0x1cc68b);const _0x15397f=await withSpinner(_0x14c58b(0x164),()=>_0x4f160c[_0x14c58b(0x16a)][_0x14c58b(0x114)](_0x1cc68b,{'limit':_0x133ba1[_0x14c58b(0x105)]}),{'verbose':_0x133ba1[_0x14c58b(0x17e)]}),_0x27fdb3=_0x15397f[_0x14c58b(0x10f)];return console[_0x14c58b(0x17c)](_0x14c58b(0x109)+_0x27fdb3[_0x14c58b(0x13c)]+'\x20workflow'+(_0x27fdb3[_0x14c58b(0x13c)]!==0x1?'s':'')),await handleSDKOutput(_0x27fdb3,_0x133ba1),0x0;}catch(_0x4e147d){if(_0x4e147d instanceof SDKError)return console[_0x14c58b(0x17c)]('Error:\x20'+_0x4e147d[_0x14c58b(0x174)]),_0x4e147d[_0x14c58b(0x11a)]&&console[_0x14c58b(0x17c)](_0x14c58b(0x178)+_0x4e147d[_0x14c58b(0x11a)]),0x1;throw _0x4e147d;}}}export class WorkflowSessionsCommand extends BaseCommand{['name']=a32_0xed93ff(0x156);[a32_0xed93ff(0x122)]=a32_0xed93ff(0x162);async['execute'](_0x275d22){const _0x91dd79=a32_0xed93ff,{options:_0x21b8c7,args:_0xfbd038,tdx:_0x26cb1b}=_0x275d22;let _0x44ee4c,_0x53d238;if(_0xfbd038[0x0]){const _0x4a29b9=_0xfbd038[0x0][_0x91dd79(0x13e)]('.');if(_0x4a29b9[_0x91dd79(0x13c)]===0x1)_0x44ee4c=_0x4a29b9[0x0];else{if(_0x4a29b9[_0x91dd79(0x13c)]===0x2)[_0x44ee4c,_0x53d238]=_0x4a29b9;else return console[_0x91dd79(0x17c)](_0x91dd79(0x180)),0x1;}}try{if(_0x21b8c7[_0x91dd79(0x17e)]){if(_0x44ee4c&&_0x53d238)console[_0x91dd79(0x17c)](_0x91dd79(0x11f)+_0x44ee4c+'.'+_0x53d238);else _0x44ee4c&&console[_0x91dd79(0x17c)]('Filter:\x20project='+_0x44ee4c);const _0x2b6c7=_0x21b8c7[_0x91dd79(0x148)];_0x2b6c7&&console['error']('Status:\x20'+_0x2b6c7);}const _0x55c85c=await withSpinner('Listing\x20workflow\x20sessions...',()=>_0x26cb1b[_0x91dd79(0x16a)][_0x91dd79(0x179)]({'projectName':_0x44ee4c,'workflowName':_0x53d238,'status':_0x21b8c7[_0x91dd79(0x148)],'fromTime':_0x21b8c7[_0x91dd79(0x146)],'toTime':_0x21b8c7['to'],'limit':_0x21b8c7[_0x91dd79(0x105)]}),{'verbose':_0x21b8c7[_0x91dd79(0x17e)]}),_0x2a8fd7=_0x55c85c[_0x91dd79(0x10f)];return console[_0x91dd79(0x17c)](_0x91dd79(0x109)+_0x2a8fd7[_0x91dd79(0x13c)]+_0x91dd79(0x112)+(_0x2a8fd7[_0x91dd79(0x13c)]!==0x1?'s':'')),await handleSDKOutput(_0x2a8fd7,_0x21b8c7),0x0;}catch(_0xbb4d18){if(_0xbb4d18 instanceof SDKError)return console[_0x91dd79(0x17c)](_0x91dd79(0x153)+_0xbb4d18[_0x91dd79(0x174)]),_0xbb4d18[_0x91dd79(0x11a)]&&console[_0x91dd79(0x17c)]('\x20\x20Cause:\x20'+_0xbb4d18[_0x91dd79(0x11a)]),0x1;throw _0xbb4d18;}}}export class WorkflowAttemptsCommand extends BaseCommand{[a32_0xed93ff(0x169)]='workflow:attempts';['description']=a32_0xed93ff(0x145);async[a32_0xed93ff(0x157)](_0x278a09){const _0x15f43b=a32_0xed93ff,{options:_0x2d3551,args:_0x67c04a,tdx:_0x587d46}=_0x278a09;let _0x5e1e30,_0x286495;if(_0x67c04a[0x0]){const _0x254a75=_0x67c04a[0x0]['split']('.');if(_0x254a75['length']===0x1)_0x5e1e30=_0x254a75[0x0];else{if(_0x254a75['length']===0x2)[_0x5e1e30,_0x286495]=_0x254a75;else return console[_0x15f43b(0x17c)](_0x15f43b(0x180)),0x1;}}try{const _0xf9bc2b=_0x2d3551[_0x15f43b(0x138)];if(_0x2d3551[_0x15f43b(0x17e)]){if(_0x5e1e30&&_0x286495)console['error'](_0x15f43b(0x11f)+_0x5e1e30+'.'+_0x286495);else _0x5e1e30&&console[_0x15f43b(0x17c)](_0x15f43b(0x10b)+_0x5e1e30);_0xf9bc2b&&console[_0x15f43b(0x17c)]('Include\x20retried:\x20yes');}const _0x29e75a=await withSpinner(_0x15f43b(0x17a),()=>_0x587d46['workflow'][_0x15f43b(0x168)]({'projectName':_0x5e1e30,'workflowName':_0x286495,'includeRetried':_0xf9bc2b,'limit':_0x2d3551[_0x15f43b(0x105)]}),{'verbose':_0x2d3551[_0x15f43b(0x17e)]}),_0x28b0e6=_0x29e75a[_0x15f43b(0x10f)];return console[_0x15f43b(0x17c)](_0x15f43b(0x109)+_0x28b0e6['length']+_0x15f43b(0x10c)+(_0x28b0e6[_0x15f43b(0x13c)]!==0x1?'s':'')),await handleSDKOutput(_0x28b0e6,_0x2d3551),0x0;}catch(_0x288992){if(_0x288992 instanceof SDKError)return console[_0x15f43b(0x17c)](_0x15f43b(0x153)+_0x288992[_0x15f43b(0x174)]),_0x288992[_0x15f43b(0x11a)]&&console[_0x15f43b(0x17c)](_0x15f43b(0x178)+_0x288992[_0x15f43b(0x11a)]),0x1;throw _0x288992;}}}function a32_0x460f(){const _0x256a28=['\x20\x20New\x20attempt\x20ID:\x20','split','54wZYfXN','✔\x20Pushed\x20','Downloading\x20project\x20','Project\x20filter:\x20','ies','offset','List\x20workflow\x20attempts','from','parse','status','Are\x20you\x20sure\x20you\x20want\x20to\x20retry\x20','force','\x20\x20Session\x20ID:\x20','Output\x20directory:\x20','revision','fromTask','fs/promises','Killing\x20attempt...','Revision:\x20','Error:\x20Session\x20ID\x20or\x20attempt\x20ID\x20is\x20required','Error:\x20','Retry\x20a\x20session\x20or\x20attempt','Resume\x20from:\x20','workflow:sessions','execute','Show\x20logs\x20for\x20a\x20specific\x20task','yes','439168WNQcCA','isDirectory','\x20project','workflow:kill','attemptId','Deleting\x20project\x20','\x20log\x20entr','Pattern:\x20','List\x20workflow\x20execution\x20sessions','\x20task','Listing\x20workflows...','Cancelled','projects','Including\x20subtasks:\x20yes','attempts','name','workflow','\x20\x20Location:\x20','Getting\x20task\x20logs...','Project:\x20','✔\x20Deleted\x20project\x20','substring','357444ApYgkP','Error:\x20Attempt\x20ID\x20is\x20required','Error:\x20Target\x20must\x20be\x20prefixed\x20with\x20\x22session:\x22\x20or\x20\x22attempt:\x22','readFile','message','session:','workflow:attempt','Retrying\x20session...','\x20\x20Cause:\x20','sessions','Listing\x20workflow\x20attempts...','params','error','10202185txMHnb','verbose','Target:\x20','Error:\x20Invalid\x20pattern.\x20Use\x20format:\x20project\x20or\x20project.workflow','utf-8','retryAttempt','Getting\x20attempt\x20details...','limit','\x20\x20Revision:\x20','Error:\x20Invalid\x20JSON\x20in\x20--params','startsWith','✔\x20Found\x20','Are\x20you\x20sure\x20you\x20want\x20to\x20kill\x20attempt\x20','Filter:\x20project=','\x20attempt','\x22?\x20This\x20cannot\x20be\x20undone.','workflow:download','data','Reason:\x20','session','\x20session','Validation:\x20skipped','workflows','Error:\x20Attempt\x20ID\x20and\x20task\x20name\x20are\x20required','resumeFrom','Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20project\x20\x22','Usage:\x20workflow\x20retry\x20session:<id>\x20or\x20workflow\x20retry\x20attempt:<id>','4008216tEgUzL','cause','workflow:projects','workflow:push','Attempt\x20ID:\x20','List\x20all\x20workflow\x20projects','Filter:\x20','skipValidation','184165MDoOCc','description','Usage:\x20workflow:download\x20<project-name>\x20[output-dir]','Force:\x20yes','attempt','filesExtracted','retrySession','Download\x20workflow\x20project\x20from\x20Treasure\x20Data','Pushing\x20workflow\x20project...','27329184icvXgo','download','projectName','List\x20workflows','sessionId','\x20is\x20not\x20a\x20directory','kill','workflow:retry','3803292OxYEkh','...','Show\x20tasks\x20for\x20an\x20attempt','tasks','Project\x20name:\x20','attempt:','includeRetried','Usage:\x20workflow:delete\x20<project-name-or-id>','workflow:delete','delete','length'];a32_0x460f=function(){return _0x256a28;};return a32_0x460f();}function a32_0x3aec(_0x42b701,_0xdc8e4a){const _0x460f76=a32_0x460f();return a32_0x3aec=function(_0x3aec72,_0x423777){_0x3aec72=_0x3aec72-0x102;let _0x3b2ac7=_0x460f76[_0x3aec72];return _0x3b2ac7;},a32_0x3aec(_0x42b701,_0xdc8e4a);}export class WorkflowAttemptCommand extends BaseCommand{['name']=a32_0xed93ff(0x176);['description']='Show\x20specific\x20attempt\x20details';async[a32_0xed93ff(0x157)](_0x3ec677){const _0x1804c5=a32_0xed93ff,{options:_0x9d9668,args:_0x300d3c,tdx:_0x333aab}=_0x3ec677,_0x1c5ee5=_0x300d3c[0x0];if(!_0x1c5ee5)return console[_0x1804c5(0x17c)](_0x1804c5(0x171)),0x1;try{_0x9d9668[_0x1804c5(0x17e)]&&console[_0x1804c5(0x17c)]('Attempt\x20ID:\x20'+_0x1c5ee5);const _0x31cdf2=await withSpinner(_0x1804c5(0x104),()=>_0x333aab[_0x1804c5(0x16a)][_0x1804c5(0x125)](_0x1c5ee5),{'verbose':_0x9d9668[_0x1804c5(0x17e)]}),_0x18957e=_0x31cdf2[_0x1804c5(0x10f)];return await handleSDKOutput([_0x18957e],_0x9d9668),0x0;}catch(_0x1f56c3){if(_0x1f56c3 instanceof SDKError)return console[_0x1804c5(0x17c)]('Error:\x20'+_0x1f56c3[_0x1804c5(0x174)]),_0x1f56c3[_0x1804c5(0x11a)]&&console['error'](_0x1804c5(0x178)+_0x1f56c3['cause']),0x1;throw _0x1f56c3;}}}export class WorkflowTasksCommand extends BaseCommand{[a32_0xed93ff(0x169)]='workflow:tasks';[a32_0xed93ff(0x122)]=a32_0xed93ff(0x134);async[a32_0xed93ff(0x157)](_0x3d1a57){const _0x4ec2ce=a32_0xed93ff,{options:_0x1e9c2b,args:_0x2468bb,tdx:_0x1231b3}=_0x3d1a57,_0x49d0a6=_0x2468bb[0x0];if(!_0x49d0a6)return console[_0x4ec2ce(0x17c)](_0x4ec2ce(0x171)),0x1;try{const _0x477205=_0x1e9c2b['includeSubtasks'];_0x1e9c2b[_0x4ec2ce(0x17e)]&&(console[_0x4ec2ce(0x17c)](_0x4ec2ce(0x11d)+_0x49d0a6),_0x477205&&console[_0x4ec2ce(0x17c)](_0x4ec2ce(0x167)));const _0x31db85=await withSpinner('Getting\x20attempt\x20tasks...',()=>_0x1231b3[_0x4ec2ce(0x16a)][_0x4ec2ce(0x135)](_0x49d0a6,_0x477205||![]),{'verbose':_0x1e9c2b[_0x4ec2ce(0x17e)]}),_0x3b5123=_0x31db85[_0x4ec2ce(0x10f)];return console[_0x4ec2ce(0x17c)](_0x4ec2ce(0x109)+_0x3b5123[_0x4ec2ce(0x13c)]+_0x4ec2ce(0x163)+(_0x3b5123['length']!==0x1?'s':'')),await handleSDKOutput(_0x3b5123,_0x1e9c2b),0x0;}catch(_0x47c62a){if(_0x47c62a instanceof SDKError)return console[_0x4ec2ce(0x17c)]('Error:\x20'+_0x47c62a['message']),_0x47c62a[_0x4ec2ce(0x11a)]&&console['error'](_0x4ec2ce(0x178)+_0x47c62a[_0x4ec2ce(0x11a)]),0x1;throw _0x47c62a;}}}export class WorkflowLogsCommand extends BaseCommand{[a32_0xed93ff(0x169)]='workflow:logs';[a32_0xed93ff(0x122)]=a32_0xed93ff(0x158);async[a32_0xed93ff(0x157)](_0x156650){const _0x55b7ad=a32_0xed93ff,{options:_0x353948,args:_0x62700f,tdx:_0x3777d9}=_0x156650,_0x1479c8=_0x62700f[0x0],_0x763387=_0x62700f[0x1];if(!_0x1479c8||!_0x763387)return console['error'](_0x55b7ad(0x115)),0x1;try{_0x353948[_0x55b7ad(0x17e)]&&(console[_0x55b7ad(0x17c)](_0x55b7ad(0x11d)+_0x1479c8),console[_0x55b7ad(0x17c)]('Task\x20name:\x20'+_0x763387));const _0x5090f7=_0x353948[_0x55b7ad(0x144)],_0xea840d=await withSpinner(_0x55b7ad(0x16c),()=>_0x3777d9[_0x55b7ad(0x16a)]['logs'](_0x1479c8,_0x763387,{'offset':_0x5090f7,'limit':_0x353948[_0x55b7ad(0x105)]}),{'verbose':_0x353948[_0x55b7ad(0x17e)]}),_0x195502=_0xea840d[_0x55b7ad(0x10f)];return console[_0x55b7ad(0x17c)]('✔\x20Found\x20'+_0x195502['length']+_0x55b7ad(0x160)+(_0x195502[_0x55b7ad(0x13c)]!==0x1?_0x55b7ad(0x143):'y')),await handleSDKOutput(_0x195502,_0x353948),0x0;}catch(_0xe00e42){if(_0xe00e42 instanceof SDKError)return console[_0x55b7ad(0x17c)](_0x55b7ad(0x153)+_0xe00e42[_0x55b7ad(0x174)]),_0xe00e42[_0x55b7ad(0x11a)]&&console[_0x55b7ad(0x17c)]('\x20\x20Cause:\x20'+_0xe00e42[_0x55b7ad(0x11a)]),0x1;throw _0xe00e42;}}}export class WorkflowKillCommand extends BaseCommand{[a32_0xed93ff(0x169)]=a32_0xed93ff(0x15d);[a32_0xed93ff(0x122)]='Kill\x20a\x20running\x20attempt';async['execute'](_0x6fe15c){const _0x52de48=a32_0xed93ff,{options:_0x520cc4,args:_0x12ae5f,tdx:_0x3694a8}=_0x6fe15c,_0xc7cf6c=_0x12ae5f[0x0];if(!_0xc7cf6c)return console[_0x52de48(0x17c)](_0x52de48(0x171)),0x1;try{const _0x363ead=_0x520cc4['reason'];_0x520cc4['verbose']&&(console[_0x52de48(0x17c)](_0x52de48(0x11d)+_0xc7cf6c),_0x363ead&&console[_0x52de48(0x17c)](_0x52de48(0x110)+_0x363ead));if(!_0x520cc4['yes']){const _0x199da4=await confirm(_0x52de48(0x10a)+_0xc7cf6c+'?');if(!_0x199da4)return console['error'](_0x52de48(0x165)),0x0;}const _0x59622e=await withSpinner(_0x52de48(0x150),()=>_0x3694a8['workflow'][_0x52de48(0x130)](_0xc7cf6c,_0x363ead),{'verbose':_0x520cc4[_0x52de48(0x17e)]}),_0x415310=_0x59622e[_0x52de48(0x10f)];return console['error']('✔\x20'+_0x415310),0x0;}catch(_0x156e2a){if(_0x156e2a instanceof SDKError)return console[_0x52de48(0x17c)](_0x52de48(0x153)+_0x156e2a[_0x52de48(0x174)]),_0x156e2a[_0x52de48(0x11a)]&&console[_0x52de48(0x17c)](_0x52de48(0x178)+_0x156e2a['cause']),0x1;throw _0x156e2a;}}}export class WorkflowRetryCommand extends BaseCommand{['name']=a32_0xed93ff(0x131);[a32_0xed93ff(0x122)]=a32_0xed93ff(0x154);async[a32_0xed93ff(0x157)](_0x2aa4b7){const _0x1530a5=a32_0xed93ff,{options:_0x1c3f80,args:_0x4e8ac5,tdx:_0x37cdd3}=_0x2aa4b7,_0x397aad=_0x4e8ac5[0x0];if(!_0x397aad)return console[_0x1530a5(0x17c)](_0x1530a5(0x152)),console['error'](_0x1530a5(0x118)),0x1;let _0x144dec=![],_0x3da2e7=_0x397aad;if(_0x397aad[_0x1530a5(0x108)](_0x1530a5(0x175)))_0x144dec=!![],_0x3da2e7=_0x397aad['substring'](0x8);else{if(_0x397aad['startsWith'](_0x1530a5(0x137)))_0x144dec=![],_0x3da2e7=_0x397aad[_0x1530a5(0x16f)](0x8);else return console['error'](_0x1530a5(0x172)),console[_0x1530a5(0x17c)](_0x1530a5(0x118)),0x1;}try{const _0x157a2b=_0x1c3f80[_0x1530a5(0x14e)],_0x2c5819=_0x1c3f80[_0x1530a5(0x116)],_0x39d2f5=_0x1c3f80[_0x1530a5(0x17b)],_0x11d270=_0x1c3f80[_0x1530a5(0x14a)];_0x1c3f80[_0x1530a5(0x17e)]&&(console['error'](_0x1530a5(0x17f)+(_0x144dec?'session':'attempt')+'\x20'+_0x3da2e7),_0x157a2b&&console[_0x1530a5(0x17c)]('From\x20task:\x20'+_0x157a2b),_0x2c5819&&console[_0x1530a5(0x17c)](_0x1530a5(0x155)+_0x2c5819),_0x39d2f5&&console[_0x1530a5(0x17c)]('Params:\x20'+_0x39d2f5),_0x11d270&&console[_0x1530a5(0x17c)](_0x1530a5(0x124)));let _0xd341bd;if(_0x39d2f5)try{if(_0x39d2f5[_0x1530a5(0x108)]('@')){const _0x119bcc=await import(_0x1530a5(0x14f)),_0x231343=_0x39d2f5[_0x1530a5(0x16f)](0x1),_0x18ea50=await _0x119bcc[_0x1530a5(0x173)](_0x231343,_0x1530a5(0x102));_0xd341bd=JSON[_0x1530a5(0x147)](_0x18ea50);}else _0xd341bd=JSON[_0x1530a5(0x147)](_0x39d2f5);}catch{return console[_0x1530a5(0x17c)](_0x1530a5(0x107)),0x1;}if(!_0x1c3f80[_0x1530a5(0x159)]){const _0x3ef6a4=await confirm(_0x1530a5(0x149)+(_0x144dec?_0x1530a5(0x111):_0x1530a5(0x125))+'\x20'+_0x3da2e7+'?');if(!_0x3ef6a4)return console['error'](_0x1530a5(0x165)),0x0;}let _0x8f7c97;_0x144dec?_0x8f7c97=await withSpinner(_0x1530a5(0x177),()=>_0x37cdd3[_0x1530a5(0x16a)][_0x1530a5(0x127)](_0x3da2e7,{'fromTask':_0x157a2b,'retryParams':_0xd341bd}),{'verbose':_0x1c3f80[_0x1530a5(0x17e)]}):_0x8f7c97=await withSpinner('Retrying\x20attempt...',()=>_0x37cdd3[_0x1530a5(0x16a)][_0x1530a5(0x103)](_0x3da2e7,{'resumeFrom':_0x2c5819,'retryParams':_0xd341bd,'force':_0x11d270}),{'verbose':_0x1c3f80[_0x1530a5(0x17e)]});const _0x10dc47=_0x8f7c97[_0x1530a5(0x10f)];return console[_0x1530a5(0x17c)]('✔\x20Retry\x20started'),console[_0x1530a5(0x17c)](_0x1530a5(0x13d)+_0x10dc47[_0x1530a5(0x15e)]),console[_0x1530a5(0x17c)](_0x1530a5(0x14b)+_0x10dc47[_0x1530a5(0x12e)]),0x0;}catch(_0x3dbbc7){if(_0x3dbbc7 instanceof SDKError)return console[_0x1530a5(0x17c)](_0x1530a5(0x153)+_0x3dbbc7[_0x1530a5(0x174)]),_0x3dbbc7[_0x1530a5(0x11a)]&&console['error']('\x20\x20Cause:\x20'+_0x3dbbc7[_0x1530a5(0x11a)]),0x1;throw _0x3dbbc7;}}}export class WorkflowDownloadCommand extends BaseCommand{['name']=a32_0xed93ff(0x10e);[a32_0xed93ff(0x122)]=a32_0xed93ff(0x128);async[a32_0xed93ff(0x157)](_0x438285){const _0x2a1f05=a32_0xed93ff,{options:_0x4ce3cc,args:_0x3535f9,tdx:_0x367beb}=_0x438285,_0x74abf8=_0x3535f9[0x0],_0x45f040=_0x3535f9[0x1]||'.';if(!_0x74abf8)return console['error']('Error:\x20Project\x20name\x20is\x20required'),console[_0x2a1f05(0x17c)](_0x2a1f05(0x123)),0x1;const _0x46e640=_0x4ce3cc[_0x2a1f05(0x14d)];_0x4ce3cc[_0x2a1f05(0x17e)]&&(console[_0x2a1f05(0x17c)](_0x2a1f05(0x16d)+_0x74abf8),console[_0x2a1f05(0x17c)](_0x2a1f05(0x14c)+_0x45f040),_0x46e640&&console['error'](_0x2a1f05(0x151)+_0x46e640));const _0x4872b2=await withSpinner(_0x2a1f05(0x141)+_0x74abf8+'...',()=>_0x367beb[_0x2a1f05(0x16a)][_0x2a1f05(0x12b)](_0x74abf8,_0x45f040,{'revision':_0x46e640}),{'verbose':_0x4ce3cc[_0x2a1f05(0x17e)]}),_0x49d64f=_0x4872b2[_0x2a1f05(0x10f)];return console[_0x2a1f05(0x17c)]('✔\x20Downloaded\x20'+_0x49d64f[_0x2a1f05(0x12c)]),console['error'](_0x2a1f05(0x106)+_0x49d64f[_0x2a1f05(0x14d)]),console[_0x2a1f05(0x17c)]('\x20\x20Files\x20extracted:\x20'+_0x49d64f[_0x2a1f05(0x126)]),console[_0x2a1f05(0x17c)](_0x2a1f05(0x16b)+_0x45f040+'/'+_0x49d64f[_0x2a1f05(0x12c)]),0x0;}}export class WorkflowPushCommand extends BaseCommand{['name']=a32_0xed93ff(0x11c);[a32_0xed93ff(0x122)]='Push\x20workflow\x20project\x20to\x20Treasure\x20Data';async['execute'](_0x513f77){const _0x1dadd9=a32_0xed93ff,{options:_0x25f63f,args:_0xf14789,tdx:_0x2f6a71}=_0x513f77;let _0x412ed8='.',_0x44981b=_0x25f63f[_0x1dadd9(0x169)];if(_0xf14789[0x0]){const {promises:_0x5befae}=await import('fs');try{const _0x44d738=await _0x5befae['stat'](_0xf14789[0x0]);if(_0x44d738[_0x1dadd9(0x15b)]())_0x412ed8=_0xf14789[0x0];else return console[_0x1dadd9(0x17c)]('Error:\x20'+_0xf14789[0x0]+_0x1dadd9(0x12f)),0x1;}catch{_0x44981b=_0xf14789[0x0],_0x412ed8='.';}}const _0x20b321=_0x25f63f['revision'],_0x29384=_0x25f63f[_0x1dadd9(0x120)];_0x25f63f[_0x1dadd9(0x17e)]&&(console[_0x1dadd9(0x17c)]('Project\x20directory:\x20'+_0x412ed8),_0x44981b&&console[_0x1dadd9(0x17c)](_0x1dadd9(0x136)+_0x44981b),_0x20b321&&console[_0x1dadd9(0x17c)](_0x1dadd9(0x151)+_0x20b321),_0x29384&&console[_0x1dadd9(0x17c)](_0x1dadd9(0x113)));const _0x5f589a=await withSpinner(_0x1dadd9(0x129),()=>_0x2f6a71[_0x1dadd9(0x16a)]['push'](_0x412ed8,{'projectName':_0x44981b,'revision':_0x20b321,'skipValidation':_0x29384}),{'verbose':_0x25f63f[_0x1dadd9(0x17e)]}),_0x3a9ab6=_0x5f589a[_0x1dadd9(0x10f)];return console['error'](_0x1dadd9(0x140)+_0x3a9ab6[_0x1dadd9(0x12c)]),console[_0x1dadd9(0x17c)]('\x20\x20Project\x20ID:\x20'+_0x3a9ab6['projectId']),console[_0x1dadd9(0x17c)](_0x1dadd9(0x106)+_0x3a9ab6[_0x1dadd9(0x14d)]),0x0;}}export class WorkflowDeleteCommand extends BaseCommand{['name']=a32_0xed93ff(0x13a);['description']='Delete\x20workflow\x20project\x20from\x20Treasure\x20Data';async[a32_0xed93ff(0x157)](_0x5415c8){const _0x53839b=a32_0xed93ff,{options:_0x54a32b,args:_0x1c65b2,tdx:_0x27176b}=_0x5415c8,_0x49c3a9=_0x1c65b2[0x0];if(!_0x49c3a9)return console[_0x53839b(0x17c)]('Error:\x20Project\x20name\x20or\x20ID\x20is\x20required'),console[_0x53839b(0x17c)](_0x53839b(0x139)),0x1;_0x54a32b[_0x53839b(0x17e)]&&console[_0x53839b(0x17c)]('Project:\x20'+_0x49c3a9);if(!_0x54a32b['yes']){const _0x491dd6=await confirm(_0x53839b(0x117)+_0x49c3a9+_0x53839b(0x10d));if(!_0x491dd6)return console['error'](_0x53839b(0x165)),0x0;}const _0x3bac28=await withSpinner(_0x53839b(0x15f)+_0x49c3a9+_0x53839b(0x133),()=>_0x27176b[_0x53839b(0x16a)][_0x53839b(0x13b)](_0x49c3a9),{'verbose':_0x54a32b[_0x53839b(0x17e)]}),_0x3e84af=_0x3bac28['data'];return console[_0x53839b(0x17c)](_0x53839b(0x16e)+_0x3e84af['projectName']),console[_0x53839b(0x17c)]('\x20\x20Project\x20ID:\x20'+_0x3e84af['projectId']),0x0;}}
package/dist/core/auth.js CHANGED
@@ -1 +1 @@
1
- (function(_0x3271d5,_0x2715ea){const _0x33be5f=a33_0x99e7,_0x524e80=_0x3271d5();while(!![]){try{const _0x520362=parseInt(_0x33be5f(0xea))/0x1*(parseInt(_0x33be5f(0xd7))/0x2)+-parseInt(_0x33be5f(0xe8))/0x3+parseInt(_0x33be5f(0xeb))/0x4*(parseInt(_0x33be5f(0xdb))/0x5)+parseInt(_0x33be5f(0xe5))/0x6+parseInt(_0x33be5f(0xec))/0x7+parseInt(_0x33be5f(0xe1))/0x8+parseInt(_0x33be5f(0xde))/0x9*(-parseInt(_0x33be5f(0xe6))/0xa);if(_0x520362===_0x2715ea)break;else _0x524e80['push'](_0x524e80['shift']());}catch(_0x34e4a4){_0x524e80['push'](_0x524e80['shift']());}}}(a33_0x40e9,0x998e0));import{platform}from'os';import{readFileSync}from'fs';import{fileURLToPath}from'url';import{dirname,join}from'path';function a33_0x40e9(){const _0xc0f77d=['2710NboPgs','parse','299310nOKMfe','entries','1PckKKB','4xaRLtr','3685416mGgImA','Authorization','1371180GNSHlL','tdx/','../../package.json',';\x20node/','4777545LlMgWg','X-Trino-User','tdx','84897xXLyCm','url','replace','4648152zLHJBI','length','utf-8','0.0.0','3218802AWkWOO'];a33_0x40e9=function(){return _0xc0f77d;};return a33_0x40e9();}import{getAPIKey}from'./config.js';export function getVersion(){const _0x4da2de=a33_0x99e7;try{const _0x48db58=fileURLToPath(import.meta[_0x4da2de(0xdf)]),_0x1085ee=dirname(_0x48db58),_0x3d8012=join(_0x1085ee,_0x4da2de(0xd9)),_0x39e2e8=JSON[_0x4da2de(0xe7)](readFileSync(_0x3d8012,_0x4da2de(0xe3)));return _0x39e2e8['version'];}catch{return _0x4da2de(0xe4);}}export function getUserAgent(){const _0x4abe3d=a33_0x99e7,_0x21d5ac=getVersion(),_0x2c300f=platform(),_0x8ba9cb=process['version'][_0x4abe3d(0xe0)]('v','');return _0x4abe3d(0xd8)+_0x21d5ac+'\x20('+_0x2c300f+_0x4abe3d(0xda)+_0x8ba9cb+')';}function a33_0x99e7(_0x18907b,_0xd95aa){const _0x40e908=a33_0x40e9();return a33_0x99e7=function(_0x99e794,_0x333d1e){_0x99e794=_0x99e794-0xd6;let _0x4d50c2=_0x40e908[_0x99e794];return _0x4d50c2;},a33_0x99e7(_0x18907b,_0xd95aa);}export function getAuthHeaders(_0x15c92d,_0x3e6830){const _0x1519e5=a33_0x99e7,_0x3cc383=getVersion(),_0x2dbc11={'User-Agent':getUserAgent(),'X-TD-Client':_0x1519e5(0xdd),'X-TD-Client-Version':_0x3cc383};return _0x3e6830&&(_0x2dbc11[_0x1519e5(0xd6)]='TD1\x20'+_0x3e6830),_0x2dbc11;}export function toHeaderRecord(_0x23c830){const _0x47ca47=a33_0x99e7,_0x453622={};for(const [_0x216813,_0x507acf]of Object[_0x47ca47(0xe9)](_0x23c830)){_0x507acf!==undefined&&(_0x453622[_0x216813]=_0x507acf);}return _0x453622;}export function getTrinoHeaders(_0x5962a6,_0x131b9a){const _0x1976c5=a33_0x99e7,_0x4151bc=getAuthHeaders(_0x5962a6,_0x131b9a),_0x1505fb=toHeaderRecord(_0x4151bc);return delete _0x1505fb[_0x1976c5(0xd6)],_0x131b9a&&(_0x1505fb[_0x1976c5(0xdc)]=_0x131b9a),_0x1505fb;}export function hasAPIKey(_0x69e3ad){const _0x295d79=a33_0x99e7,_0x148a2c=getAPIKey(_0x69e3ad);return _0x148a2c!==undefined&&_0x148a2c[_0x295d79(0xe2)]>0x0;}
1
+ (function(_0xf5d1b1,_0x44d0b2){const _0x4e9691=a33_0x3e62,_0x169397=_0xf5d1b1();while(!![]){try{const _0x2223ad=-parseInt(_0x4e9691(0xf2))/0x1+parseInt(_0x4e9691(0xe7))/0x2*(parseInt(_0x4e9691(0xea))/0x3)+parseInt(_0x4e9691(0xef))/0x4+parseInt(_0x4e9691(0xde))/0x5*(-parseInt(_0x4e9691(0xeb))/0x6)+-parseInt(_0x4e9691(0xee))/0x7+-parseInt(_0x4e9691(0xe0))/0x8+parseInt(_0x4e9691(0xe6))/0x9;if(_0x2223ad===_0x44d0b2)break;else _0x169397['push'](_0x169397['shift']());}catch(_0x155f3e){_0x169397['push'](_0x169397['shift']());}}}(a33_0x4982,0xbade9));import{platform}from'os';import{readFileSync}from'fs';import{fileURLToPath}from'url';function a33_0x3e62(_0x577e40,_0x550699){const _0x4982e5=a33_0x4982();return a33_0x3e62=function(_0x3e629f,_0xe25467){_0x3e629f=_0x3e629f-0xde;let _0x346e7e=_0x4982e5[_0x3e629f];return _0x346e7e;},a33_0x3e62(_0x577e40,_0x550699);}function a33_0x4982(){const _0x519c03=[';\x20node/','TD1\x20','parse','7431120hlUBnx','6xjalCp','Authorization','utf-8','1129803iBmZFa','192lQgzSV','tdx/','replace','5328491ocvVcV','5591520aPitmQ','X-Trino-User','length','248296xBmQkd','33755LjGdfJ','entries','10899240WLFlvF','../../package.json','version'];a33_0x4982=function(){return _0x519c03;};return a33_0x4982();}import{dirname,join}from'path';import{getAPIKey}from'./config.js';export function getVersion(){const _0x10dd83=a33_0x3e62;try{const _0x515a8d=fileURLToPath(import.meta['url']),_0x2a8607=dirname(_0x515a8d),_0x1c6c12=join(_0x2a8607,_0x10dd83(0xe1)),_0x2c9032=JSON[_0x10dd83(0xe5)](readFileSync(_0x1c6c12,_0x10dd83(0xe9)));return _0x2c9032['version'];}catch{return'0.0.0';}}export function getUserAgent(){const _0x171cba=a33_0x3e62,_0x44906b=getVersion(),_0x28ca92=platform(),_0x1a33de=process[_0x171cba(0xe2)][_0x171cba(0xed)]('v','');return _0x171cba(0xec)+_0x44906b+'\x20('+_0x28ca92+_0x171cba(0xe3)+_0x1a33de+')';}export function getAuthHeaders(_0x4b6cde,_0x380b81){const _0x2b2e6f=a33_0x3e62,_0x2c1a6e=getVersion(),_0x19ac0f={'User-Agent':getUserAgent(),'X-TD-Client':'tdx','X-TD-Client-Version':_0x2c1a6e};return _0x380b81&&(_0x19ac0f[_0x2b2e6f(0xe8)]=_0x2b2e6f(0xe4)+_0x380b81),_0x19ac0f;}export function toHeaderRecord(_0x3c5e19){const _0x20760f=a33_0x3e62,_0x2e103e={};for(const [_0x372d6b,_0x2c5077]of Object[_0x20760f(0xdf)](_0x3c5e19)){_0x2c5077!==undefined&&(_0x2e103e[_0x372d6b]=_0x2c5077);}return _0x2e103e;}export function getTrinoHeaders(_0x370801,_0x22c7f3){const _0x591cfd=a33_0x3e62,_0x586519=getAuthHeaders(_0x370801,_0x22c7f3),_0x2c0019=toHeaderRecord(_0x586519);return delete _0x2c0019[_0x591cfd(0xe8)],_0x22c7f3&&(_0x2c0019[_0x591cfd(0xf0)]=_0x22c7f3),_0x2c0019;}export function hasAPIKey(_0x581857){const _0x5e0c6e=a33_0x3e62,_0x5c2301=getAPIKey(_0x581857);return _0x5c2301!==undefined&&_0x5c2301[_0x5e0c6e(0xf1)]>0x0;}
@@ -1 +1 @@
1
- (function(_0x21c124,_0x1fdc5a){const _0x1cb297=a34_0x282f,_0x1af50e=_0x21c124();while(!![]){try{const _0x5706dc=-parseInt(_0x1cb297(0x200))/0x1+parseInt(_0x1cb297(0x1fb))/0x2+parseInt(_0x1cb297(0x229))/0x3*(-parseInt(_0x1cb297(0x203))/0x4)+-parseInt(_0x1cb297(0x1f7))/0x5*(-parseInt(_0x1cb297(0x222))/0x6)+parseInt(_0x1cb297(0x20d))/0x7*(-parseInt(_0x1cb297(0x22a))/0x8)+-parseInt(_0x1cb297(0x202))/0x9+-parseInt(_0x1cb297(0x227))/0xa*(-parseInt(_0x1cb297(0x208))/0xb);if(_0x5706dc===_0x1fdc5a)break;else _0x1af50e['push'](_0x1af50e['shift']());}catch(_0x76dd9f){_0x1af50e['push'](_0x1af50e['shift']());}}}(a34_0x4094,0x335b9));import{homedir}from'os';import{join}from'path';import{existsSync,readFileSync,writeFileSync,mkdirSync}from'fs';import*as a34_0x1327c2 from'node:fs';import*as a34_0x3ef088 from'node:path';import{SITE_ALIASES}from'../types/index.js';import{validateSecureFilePermissions}from'../utils/file-permissions.js';export function getConfigDir(){const _0x33369d=a34_0x282f;return process[_0x33369d(0x213)]['TDX_CONFIG_DIR']||join(homedir(),_0x33369d(0x1fa),_0x33369d(0x215));}function a34_0x4094(){const _0x562315=['profiles','jp01','215661wrrocA','profile:\x20','3287502FyZTVe','4mksOCL','trim','llm_default_project','Warning:\x20Unknown\x20site\x20\x27','\x27,\x20defaulting\x20to\x20us01','7447418NMCvar','replace','parse','eu01','entries','42lHESGK','dev-eu01','utf-8','endsWith','.env','split','env','stg-us01','tdx','slice','includes','\x20(TD_API_KEY)','env:\x20TD_API_KEY','stg-ap03','Warning:\x20Failed\x20to\x20load\x20','map','global:\x20','TDX_CACHE_DIR','stg-jp01','TD_API_KEY','ap02','1382118gotwVp','env:\x20','match','warn','startsWith','10auBkYH','us01','580119HDwGci','12424LGfqZM','.cache','dev-us01','profile','join','Warning:\x20Failed\x20to\x20cache\x20LLM\x20project\x20name:','5gKKwJZ','readFileSync','existsSync','.config','173200ixOWcc','toUpperCase','TD_API_KEY_'];a34_0x4094=function(){return _0x562315;};return a34_0x4094();}export function getConfigFile(){const _0x1cee95=a34_0x282f;return join(getConfigDir(),_0x1cee95(0x211));}export function getCacheDir(){const _0x332e92=a34_0x282f;return process[_0x332e92(0x213)][_0x332e92(0x21e)]||join(homedir(),_0x332e92(0x22b),_0x332e92(0x215));}export function getLLMProjectCacheFile(){const _0x5699a2=a34_0x282f;return join(getCacheDir(),_0x5699a2(0x205));}export function readCachedLLMProject(){const _0x206e4f=a34_0x282f;try{const _0x4266b9=getLLMProjectCacheFile();if(!existsSync(_0x4266b9))return null;return readFileSync(_0x4266b9,_0x206e4f(0x20f))[_0x206e4f(0x204)]();}catch{return null;}}export function writeCachedLLMProject(_0x369216){const _0x1447f2=a34_0x282f;try{const _0x1e2f46=getCacheDir(),_0x1d4cb7=getLLMProjectCacheFile();!existsSync(_0x1e2f46)&&mkdirSync(_0x1e2f46,{'recursive':!![]}),writeFileSync(_0x1d4cb7,_0x369216,_0x1447f2(0x20f));}catch(_0x2c3686){console['error'](_0x1447f2(0x1f6),_0x2c3686);}}export function parseEnvFile(_0x25c6ce){const _0x1436a2=a34_0x282f,_0xde0928={};for(const _0x5d554a of _0x25c6ce[_0x1436a2(0x212)]('\x0a')){const _0x5e0f85=_0x5d554a[_0x1436a2(0x204)]();if(!_0x5e0f85||_0x5e0f85[_0x1436a2(0x226)]('#'))continue;const _0x74d526=_0x5e0f85[_0x1436a2(0x224)](/^([^=]+)=(.*)$/);if(_0x74d526){const _0x3899c3=_0x74d526[0x1][_0x1436a2(0x204)]();let _0x58f4b3=_0x74d526[0x2][_0x1436a2(0x204)]();(_0x58f4b3[_0x1436a2(0x226)]('\x22')&&_0x58f4b3[_0x1436a2(0x210)]('\x22')||_0x58f4b3[_0x1436a2(0x226)]('\x27')&&_0x58f4b3['endsWith']('\x27'))&&(_0x58f4b3=_0x58f4b3[_0x1436a2(0x216)](0x1,-0x1)),_0xde0928[_0x3899c3]=_0x58f4b3;}}return _0xde0928;}export function readUserConfig(){const _0x14c6c1=a34_0x282f,_0xb3643f=getConfigFile();if(!existsSync(_0xb3643f))return{};try{const _0x1c33b9=readFileSync(_0xb3643f,_0x14c6c1(0x20f));return parseEnvFile(_0x1c33b9);}catch(_0x4764bb){return console['warn']('Warning:\x20Failed\x20to\x20read\x20config\x20file\x20'+_0xb3643f+':',_0x4764bb),{};}}export function resolveSite(_0xd914a8){const _0x4ab043=a34_0x282f,_0x4b54c6=[_0x4ab043(0x228),_0x4ab043(0x1ff),_0x4ab043(0x20b),_0x4ab043(0x221),'ap03',_0x4ab043(0x1f3),'dev-eu01',_0x4ab043(0x214),_0x4ab043(0x21f),_0x4ab043(0x21a)];if(_0x4b54c6[_0x4ab043(0x217)](_0xd914a8))return _0xd914a8;if(_0xd914a8 in SITE_ALIASES)return SITE_ALIASES[_0xd914a8];return console[_0x4ab043(0x225)](_0x4ab043(0x206)+_0xd914a8+_0x4ab043(0x207)),_0x4ab043(0x228);}let cachedUserConfig=null;function a34_0x282f(_0x16e77e,_0xf78892){const _0x409481=a34_0x4094();return a34_0x282f=function(_0x282f11,_0x3590e8){_0x282f11=_0x282f11-0x1f3;let _0x45d5a8=_0x409481[_0x282f11];return _0x45d5a8;},a34_0x282f(_0x16e77e,_0xf78892);}export function loadUserConfigOnce(){return cachedUserConfig===null&&(cachedUserConfig=readUserConfig()),cachedUserConfig;}export function clearConfigCache(){cachedUserConfig=null;}export function getAPIKey(_0xf221e7,_0x15b792){const _0x3ee831=a34_0x282f,_0xab0305=_0xf221e7[_0x3ee831(0x1fc)]()[_0x3ee831(0x209)](/-/g,'_'),_0x715f2f=_0x3ee831(0x1fd)+_0xab0305;if(process['env'][_0x715f2f])return process['env'][_0x715f2f];if(process[_0x3ee831(0x213)][_0x3ee831(0x220)])return process[_0x3ee831(0x213)]['TD_API_KEY'];const _0x194624=_0x15b792||getActiveProfileName();if(_0x194624){const _0x5a1e7a=loadProfileEnv(_0x194624);if(_0x5a1e7a){if(_0x5a1e7a[_0x715f2f])return _0x5a1e7a[_0x715f2f];if(_0x5a1e7a['TD_API_KEY'])return _0x5a1e7a[_0x3ee831(0x220)];}}const _0x3cced2=loadUserConfigOnce();if(_0x3cced2[_0x715f2f])return _0x3cced2[_0x715f2f];if(_0x3cced2[_0x3ee831(0x220)])return _0x3cced2['TD_API_KEY'];return undefined;}export function getAPIKeySource(_0x27835d,_0xc6f0f5){const _0x8c58b=a34_0x282f,_0x1b5d87='TD_API_KEY_'+_0x27835d[_0x8c58b(0x1fc)]()[_0x8c58b(0x209)](/-/g,'_');if(process[_0x8c58b(0x213)][_0x1b5d87])return _0x8c58b(0x223)+_0x1b5d87;if(process['env']['TD_API_KEY'])return _0x8c58b(0x219);const _0x17117a=_0xc6f0f5||getActiveProfileName();if(_0x17117a){const _0x101a1c=loadProfileEnv(_0x17117a);if(_0x101a1c){if(_0x101a1c[_0x1b5d87])return _0x8c58b(0x201)+_0x17117a+'\x20('+_0x1b5d87+')';if(_0x101a1c[_0x8c58b(0x220)])return _0x8c58b(0x201)+_0x17117a+'\x20(TD_API_KEY)';}}const _0x799193=loadUserConfigOnce(),_0x5e5555=getConfigFile();if(_0x799193[_0x1b5d87])return _0x8c58b(0x21d)+_0x5e5555+'\x20('+_0x1b5d87+')';if(_0x799193[_0x8c58b(0x220)])return'global:\x20'+_0x5e5555+_0x8c58b(0x218);return null;}function loadProfileEnv(_0x48ca00){const _0x2ef127=a34_0x282f,_0x34de4c=a34_0x3ef088[_0x2ef127(0x1f5)](getConfigDir(),'.env.'+_0x48ca00);if(a34_0x1327c2[_0x2ef127(0x1f9)](_0x34de4c)){validateSecureFilePermissions(_0x34de4c);try{const _0x53e243=a34_0x1327c2[_0x2ef127(0x1f8)](_0x34de4c,'utf-8');return parseEnvFile(_0x53e243);}catch(_0x5b15af){console[_0x2ef127(0x225)](_0x2ef127(0x21b)+_0x34de4c+':\x20'+_0x5b15af);}}const _0x44f888=a34_0x3ef088[_0x2ef127(0x1f5)](getConfigDir(),_0x2ef127(0x1fe),_0x48ca00,_0x2ef127(0x211));if(a34_0x1327c2[_0x2ef127(0x1f9)](_0x44f888)){validateSecureFilePermissions(_0x44f888);try{const _0xa6aabb=a34_0x1327c2[_0x2ef127(0x1f8)](_0x44f888,_0x2ef127(0x20f));return parseEnvFile(_0xa6aabb);}catch(_0x3ad6ec){return console[_0x2ef127(0x225)](_0x2ef127(0x21b)+_0x44f888+':\x20'+_0x3ad6ec),null;}}return null;}function getActiveProfileName(){const _0xd422b0=a34_0x282f,_0x8b0d83=a34_0x3ef088[_0xd422b0(0x1f5)](getConfigDir(),'tdx.json');if(!a34_0x1327c2[_0xd422b0(0x1f9)](_0x8b0d83))return null;try{const _0x3ba725=a34_0x1327c2[_0xd422b0(0x1f8)](_0x8b0d83,_0xd422b0(0x20f)),_0x55382d=JSON[_0xd422b0(0x20a)](_0x3ba725);return _0x55382d[_0xd422b0(0x1f4)]||null;}catch{return null;}}export function saveAPIKey(_0x2c6a8d,_0x33f73a){const _0x184f0c=a34_0x282f,_0x1c0834=getConfigDir(),_0x1d1504=getConfigFile();!existsSync(_0x1c0834)&&mkdirSync(_0x1c0834,{'recursive':!![],'mode':0x1c0});const _0x46024c=readUserConfig(),_0x39cda0=_0x2c6a8d['toUpperCase']()[_0x184f0c(0x209)](/-/g,'_');_0x46024c[_0x184f0c(0x1fd)+_0x39cda0]=_0x33f73a;const _0x42fabb=Object[_0x184f0c(0x20c)](_0x46024c)[_0x184f0c(0x21c)](([_0x3a2804,_0x8d2b39])=>_0x3a2804+'='+_0x8d2b39);writeFileSync(_0x1d1504,_0x42fabb[_0x184f0c(0x1f5)]('\x0a')+'\x0a',{'mode':0x180});}export function loadConfig(){const _0x2df468=a34_0x282f,_0x5167ed={'apiKeys':{},'defaultSite':_0x2df468(0x228)},_0x34d50d=[_0x2df468(0x228),_0x2df468(0x1ff),_0x2df468(0x20b),_0x2df468(0x221),'ap03',_0x2df468(0x1f3),_0x2df468(0x20e),_0x2df468(0x214),_0x2df468(0x21f),'stg-ap03'];for(const _0x45f0e5 of _0x34d50d){const _0xd8edbf=getAPIKey(_0x45f0e5);_0xd8edbf&&(_0x5167ed['apiKeys'][_0x45f0e5]=_0xd8edbf);}return _0x5167ed;}
1
+ (function(_0x500d85,_0x5e2f18){const _0x5793c5=a34_0xea98,_0x38b9c9=_0x500d85();while(!![]){try{const _0x54f099=-parseInt(_0x5793c5(0x128))/0x1+-parseInt(_0x5793c5(0x10c))/0x2+-parseInt(_0x5793c5(0x10e))/0x3+-parseInt(_0x5793c5(0xfe))/0x4*(-parseInt(_0x5793c5(0x121))/0x5)+parseInt(_0x5793c5(0xff))/0x6+parseInt(_0x5793c5(0x125))/0x7*(-parseInt(_0x5793c5(0x100))/0x8)+parseInt(_0x5793c5(0x118))/0x9;if(_0x54f099===_0x5e2f18)break;else _0x38b9c9['push'](_0x38b9c9['shift']());}catch(_0x4e18e2){_0x38b9c9['push'](_0x38b9c9['shift']());}}}(a34_0x4411,0xc5a4f));import{homedir}from'os';import{join}from'path';import{existsSync,readFileSync,writeFileSync,mkdirSync}from'fs';import*as a34_0x2b1691 from'node:fs';import*as a34_0x31ee58 from'node:path';function a34_0x4411(){const _0x10a4d3=['6701484GKKYyh','56bHnVsa','Warning:\x20Unknown\x20site\x20\x27','existsSync','parse','TDX_CONFIG_DIR','tdx.json','replace','warn','env:\x20','profile','Warning:\x20Failed\x20to\x20cache\x20LLM\x20project\x20name:','global:\x20','682346RwqkVT','dev-eu01','4191522UepbTz','\x20(TD_API_KEY)','TD_API_KEY_','.cache','endsWith','.env.','slice','dev-us01','TD_API_KEY','Warning:\x20Failed\x20to\x20load\x20','13821831CrWQzk','entries','eu01','\x27,\x20defaulting\x20to\x20us01','env','jp01','stg-us01','TDX_CACHE_DIR','join','574695lvYMVm','trim','tdx','profiles','1429799fxkwmR','ap03','error','54244fpqWXk','includes','utf-8','profile:\x20','startsWith','toUpperCase','readFileSync','split','us01','.env','apiKeys','stg-ap03','stg-jp01','ap02','48TgSYOb'];a34_0x4411=function(){return _0x10a4d3;};return a34_0x4411();}import{SITE_ALIASES}from'../types/index.js';import{validateSecureFilePermissions}from'../utils/file-permissions.js';export function getConfigDir(){const _0x426728=a34_0xea98;return process['env'][_0x426728(0x104)]||join(homedir(),'.config','tdx');}export function getConfigFile(){const _0x5dc0e3=a34_0xea98;return join(getConfigDir(),_0x5dc0e3(0xf9));}export function getCacheDir(){const _0x1d21c9=a34_0xea98;return process[_0x1d21c9(0x11c)][_0x1d21c9(0x11f)]||join(homedir(),_0x1d21c9(0x111),_0x1d21c9(0x123));}export function getLLMProjectCacheFile(){return join(getCacheDir(),'llm_default_project');}export function readCachedLLMProject(){const _0x1117cb=a34_0xea98;try{const _0x6e654b=getLLMProjectCacheFile();if(!existsSync(_0x6e654b))return null;return readFileSync(_0x6e654b,'utf-8')[_0x1117cb(0x122)]();}catch{return null;}}export function writeCachedLLMProject(_0x4716b5){const _0x65e766=a34_0xea98;try{const _0x3ead8a=getCacheDir(),_0x2e2758=getLLMProjectCacheFile();!existsSync(_0x3ead8a)&&mkdirSync(_0x3ead8a,{'recursive':!![]}),writeFileSync(_0x2e2758,_0x4716b5,'utf-8');}catch(_0x538ceb){console[_0x65e766(0x127)](_0x65e766(0x10a),_0x538ceb);}}function a34_0xea98(_0x1973bb,_0x51eaff){const _0x441115=a34_0x4411();return a34_0xea98=function(_0xea984e,_0x21ae1f){_0xea984e=_0xea984e-0xf4;let _0x400ac5=_0x441115[_0xea984e];return _0x400ac5;},a34_0xea98(_0x1973bb,_0x51eaff);}export function parseEnvFile(_0xb05a01){const _0x371741=a34_0xea98,_0x27a3ef={};for(const _0x42c350 of _0xb05a01[_0x371741(0xf7)]('\x0a')){const _0x38cdb8=_0x42c350[_0x371741(0x122)]();if(!_0x38cdb8||_0x38cdb8['startsWith']('#'))continue;const _0x359cd0=_0x38cdb8['match'](/^([^=]+)=(.*)$/);if(_0x359cd0){const _0xbd9364=_0x359cd0[0x1][_0x371741(0x122)]();let _0x178433=_0x359cd0[0x2][_0x371741(0x122)]();(_0x178433[_0x371741(0xf4)]('\x22')&&_0x178433['endsWith']('\x22')||_0x178433[_0x371741(0xf4)]('\x27')&&_0x178433[_0x371741(0x112)]('\x27'))&&(_0x178433=_0x178433[_0x371741(0x114)](0x1,-0x1)),_0x27a3ef[_0xbd9364]=_0x178433;}}return _0x27a3ef;}export function readUserConfig(){const _0x3358bc=a34_0xea98,_0x46c18a=getConfigFile();if(!existsSync(_0x46c18a))return{};try{const _0x2529b9=readFileSync(_0x46c18a,'utf-8');return parseEnvFile(_0x2529b9);}catch(_0x3ea005){return console[_0x3358bc(0x107)]('Warning:\x20Failed\x20to\x20read\x20config\x20file\x20'+_0x46c18a+':',_0x3ea005),{};}}export function resolveSite(_0xc041){const _0x2d1172=a34_0xea98,_0x3d04c4=[_0x2d1172(0xf8),_0x2d1172(0x11d),_0x2d1172(0x11a),'ap02','ap03',_0x2d1172(0x115),_0x2d1172(0x10d),_0x2d1172(0x11e),'stg-jp01',_0x2d1172(0xfb)];if(_0x3d04c4[_0x2d1172(0x129)](_0xc041))return _0xc041;if(_0xc041 in SITE_ALIASES)return SITE_ALIASES[_0xc041];return console['warn'](_0x2d1172(0x101)+_0xc041+_0x2d1172(0x11b)),_0x2d1172(0xf8);}let cachedUserConfig=null;export function loadUserConfigOnce(){return cachedUserConfig===null&&(cachedUserConfig=readUserConfig()),cachedUserConfig;}export function clearConfigCache(){cachedUserConfig=null;}export function getAPIKey(_0x43bccd,_0x575f30){const _0x3d1372=a34_0xea98,_0x2e04d9=_0x43bccd[_0x3d1372(0xf5)]()[_0x3d1372(0x106)](/-/g,'_'),_0x435eb1='TD_API_KEY_'+_0x2e04d9;if(process[_0x3d1372(0x11c)][_0x435eb1])return process['env'][_0x435eb1];if(process[_0x3d1372(0x11c)][_0x3d1372(0x116)])return process[_0x3d1372(0x11c)][_0x3d1372(0x116)];const _0x5d11dd=_0x575f30||getActiveProfileName();if(_0x5d11dd){const _0x118375=loadProfileEnv(_0x5d11dd);if(_0x118375){if(_0x118375[_0x435eb1])return _0x118375[_0x435eb1];if(_0x118375[_0x3d1372(0x116)])return _0x118375[_0x3d1372(0x116)];}}const _0x281bfa=loadUserConfigOnce();if(_0x281bfa[_0x435eb1])return _0x281bfa[_0x435eb1];if(_0x281bfa[_0x3d1372(0x116)])return _0x281bfa['TD_API_KEY'];return undefined;}export function getAPIKeySource(_0x6a7fe5,_0x23419d){const _0x48336f=a34_0xea98,_0x5cfa9c=_0x48336f(0x110)+_0x6a7fe5['toUpperCase']()['replace'](/-/g,'_');if(process[_0x48336f(0x11c)][_0x5cfa9c])return _0x48336f(0x108)+_0x5cfa9c;if(process['env']['TD_API_KEY'])return'env:\x20TD_API_KEY';const _0x2fa0a9=_0x23419d||getActiveProfileName();if(_0x2fa0a9){const _0x3c0447=loadProfileEnv(_0x2fa0a9);if(_0x3c0447){if(_0x3c0447[_0x5cfa9c])return'profile:\x20'+_0x2fa0a9+'\x20('+_0x5cfa9c+')';if(_0x3c0447[_0x48336f(0x116)])return _0x48336f(0x12b)+_0x2fa0a9+_0x48336f(0x10f);}}const _0x27ba0a=loadUserConfigOnce(),_0x50ecc2=getConfigFile();if(_0x27ba0a[_0x5cfa9c])return _0x48336f(0x10b)+_0x50ecc2+'\x20('+_0x5cfa9c+')';if(_0x27ba0a[_0x48336f(0x116)])return'global:\x20'+_0x50ecc2+'\x20(TD_API_KEY)';return null;}function loadProfileEnv(_0x5d4efe){const _0x5beea9=a34_0xea98,_0x234529=a34_0x31ee58['join'](getConfigDir(),_0x5beea9(0x113)+_0x5d4efe);if(a34_0x2b1691[_0x5beea9(0x102)](_0x234529)){validateSecureFilePermissions(_0x234529);try{const _0x4edf24=a34_0x2b1691['readFileSync'](_0x234529,_0x5beea9(0x12a));return parseEnvFile(_0x4edf24);}catch(_0x1bf9c4){console[_0x5beea9(0x107)](_0x5beea9(0x117)+_0x234529+':\x20'+_0x1bf9c4);}}const _0x1dc80c=a34_0x31ee58[_0x5beea9(0x120)](getConfigDir(),_0x5beea9(0x124),_0x5d4efe,_0x5beea9(0xf9));if(a34_0x2b1691[_0x5beea9(0x102)](_0x1dc80c)){validateSecureFilePermissions(_0x1dc80c);try{const _0x33c8d1=a34_0x2b1691[_0x5beea9(0xf6)](_0x1dc80c,'utf-8');return parseEnvFile(_0x33c8d1);}catch(_0x2e5fc9){return console[_0x5beea9(0x107)](_0x5beea9(0x117)+_0x1dc80c+':\x20'+_0x2e5fc9),null;}}return null;}function getActiveProfileName(){const _0x1365c4=a34_0xea98,_0x3dd00c=a34_0x31ee58[_0x1365c4(0x120)](getConfigDir(),_0x1365c4(0x105));if(!a34_0x2b1691['existsSync'](_0x3dd00c))return null;try{const _0x56a37b=a34_0x2b1691[_0x1365c4(0xf6)](_0x3dd00c,_0x1365c4(0x12a)),_0x1c7153=JSON[_0x1365c4(0x103)](_0x56a37b);return _0x1c7153[_0x1365c4(0x109)]||null;}catch{return null;}}export function saveAPIKey(_0x315c0a,_0x41e236){const _0x2e4804=a34_0xea98,_0x5f3ef9=getConfigDir(),_0x3a0604=getConfigFile();!existsSync(_0x5f3ef9)&&mkdirSync(_0x5f3ef9,{'recursive':!![],'mode':0x1c0});const _0x5e15a0=readUserConfig(),_0x1ab415=_0x315c0a[_0x2e4804(0xf5)]()[_0x2e4804(0x106)](/-/g,'_');_0x5e15a0[_0x2e4804(0x110)+_0x1ab415]=_0x41e236;const _0x92e596=Object[_0x2e4804(0x119)](_0x5e15a0)['map'](([_0x3d7e32,_0x4d905a])=>_0x3d7e32+'='+_0x4d905a);writeFileSync(_0x3a0604,_0x92e596[_0x2e4804(0x120)]('\x0a')+'\x0a',{'mode':0x180});}export function loadConfig(){const _0x2c736c=a34_0xea98,_0x380fce={'apiKeys':{},'defaultSite':_0x2c736c(0xf8)},_0x3f7c77=[_0x2c736c(0xf8),_0x2c736c(0x11d),_0x2c736c(0x11a),_0x2c736c(0xfd),_0x2c736c(0x126),_0x2c736c(0x115),'dev-eu01','stg-us01',_0x2c736c(0xfc),_0x2c736c(0xfb)];for(const _0x50b410 of _0x3f7c77){const _0x4f839e=getAPIKey(_0x50b410);_0x4f839e&&(_0x380fce[_0x2c736c(0xfa)][_0x50b410]=_0x4f839e);}return _0x380fce;}