@treasuredata/tdx 0.2.3 → 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 +1 -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_0x4180ee=a26_0x5777;(function(_0x25c2a1,_0x2a14c6){const _0x15ca45=a26_0x5777,_0x40c2d1=_0x25c2a1();while(!![]){try{const _0x137b42=-parseInt(_0x15ca45(0x9d))/0x1*(parseInt(_0x15ca45(0x75))/0x2)+-parseInt(_0x15ca45(0xa0))/0x3*(-parseInt(_0x15ca45(0x99))/0x4)+-parseInt(_0x15ca45(0x76))/0x5+-parseInt(_0x15ca45(0x83))/0x6*(-parseInt(_0x15ca45(0x97))/0x7)+parseInt(_0x15ca45(0x88))/0x8+parseInt(_0x15ca45(0x9a))/0x9*(parseInt(_0x15ca45(0x8b))/0xa)+-parseInt(_0x15ca45(0x7d))/0xb;if(_0x137b42===_0x2a14c6)break;else _0x40c2d1['push'](_0x40c2d1['shift']());}catch(_0xf3552d){_0x40c2d1['push'](_0x40c2d1['shift']());}}}(a26_0x2ee2,0x89389));function a26_0x5777(_0x159049,_0x5c7dc9){const _0x2ee24f=a26_0x2ee2();return a26_0x5777=function(_0x5777eb,_0x3fced5){_0x5777eb=_0x5777eb-0x71;let _0x3f152b=_0x2ee24f[_0x5777eb];return _0x3f152b;},a26_0x5777(_0x159049,_0x5c7dc9);}import{BaseCommand}from'./command.js';import{handleSDKOutput}from'../utils/command-output.js';import{withSpinner}from'../utils/spinner.js';import{loadJSONFromOptions}from'../utils/json-loader.js';function a26_0x2ee2(){const _0xc57eaf=['Examples:','rule','3227qEPFok','Error:\x20Cannot\x20update\x20','17624PfJsNF','171ziJgGK','Updating\x20segment\x20\x27','Use:\x20tdx\x20segment\x20update\x20<path_to_segment>\x20[options]','199DwUhgA','type','segmentName','561sVKBni','Update\x20existing\x20child\x20segment','ruleFile','Segment\x20ID:\x20','INTERNAL','2954nOiGBN','2321485PuRWbs','\x20\x20\x20Path:\x20','Resolving\x20folder\x20\x27','data','segment','includes','resolvePathToResource','13583977HHDFDC','Resolved\x20folder\x20ID:\x20','name','segmentId','Error:\x20Segment\x20path\x20or\x20name\x20is\x20required','verbose','9558RlhlAG','length','resolveFolderId','error','execute','283000Qzxwwm','segmentPath','\x27...','506060LvtfJJ','Resolving\x20path\x20\x27','description','✔\x20Updated\x20segment\x20\x27','kind','folder','Resolved\x20type:\x20','Usage:\x20tdx\x20segment\x20update\x20<path>\x20[options]','segment:update','Segment\x20ID\x20missing\x20from\x20resolved\x20path'];a26_0x2ee2=function(){return _0xc57eaf;};return a26_0x2ee2();}import{SDKError,ErrorCode}from'../sdk/index.js';export class SegmentUpdateCommand extends BaseCommand{[a26_0x4180ee(0x7f)]=a26_0x4180ee(0x93);['description']=a26_0x4180ee(0x71);async[a26_0x4180ee(0x87)](_0x2c1baa){const _0x5160ff=a26_0x4180ee,{options:_0x2c9631,args:_0x382798,tdx:_0x28fbbc}=_0x2c1baa,_0xfae721=_0x2c9631;if(_0x382798[_0x5160ff(0x84)]===0x0)return console[_0x5160ff(0x86)](_0x5160ff(0x81)),console[_0x5160ff(0x86)](_0x5160ff(0x92)),console[_0x5160ff(0x86)](_0x5160ff(0x95)),console[_0x5160ff(0x86)]('\x20\x20tdx\x20segment\x20update\x20\x22My\x20Audience/High\x20Value\x22\x20--description\x20\x22...\x22'),console['error']('\x20\x20tdx\x20segment\x20update\x20\x22High\x20Value\x22\x20--rule\x20\x27...\x27\x20\x20#\x20Relative\x20to\x20context'),0x1;const _0xc32dc1=_0x382798[0x0],_0x1808d8=_0x2c9631[_0x5160ff(0x89)];let _0x55dcea=_0xc32dc1;_0x1808d8&&!_0xc32dc1[_0x5160ff(0x7b)]('/')&&(_0x55dcea=_0x1808d8+'/'+_0xc32dc1,_0xfae721[_0x5160ff(0x82)]&&console[_0x5160ff(0x86)]('Resolved\x20relative\x20path\x20to:\x20'+_0x55dcea));const _0x58f3b0=await withSpinner(_0x5160ff(0x8c)+_0x55dcea+_0x5160ff(0x8a),()=>_0x28fbbc[_0x5160ff(0x7a)][_0x5160ff(0x7c)](_0x55dcea),{'verbose':_0xfae721[_0x5160ff(0x82)]}),_0x4a28d3=_0x58f3b0[_0x5160ff(0x79)];_0xfae721[_0x5160ff(0x82)]&&console[_0x5160ff(0x86)](_0x5160ff(0x91)+_0x4a28d3[_0x5160ff(0x9e)]);if(_0x4a28d3[_0x5160ff(0x9e)]!==_0x5160ff(0x7a))return console['error'](_0x5160ff(0x98)+_0x4a28d3[_0x5160ff(0x9e)]+'.\x20Only\x20child\x20segments\x20can\x20be\x20updated.'),console[_0x5160ff(0x86)](_0x5160ff(0x9c)),0x1;if(!_0x4a28d3[_0x5160ff(0x80)])throw new SDKError(ErrorCode[_0x5160ff(0x74)],_0x5160ff(0x94));const _0x10e03a=_0x4a28d3['parentId'],_0x98699=_0x4a28d3[_0x5160ff(0x80)];_0xfae721[_0x5160ff(0x82)]&&(console[_0x5160ff(0x86)]('Parent\x20ID:\x20'+_0x10e03a),console['error'](_0x5160ff(0x73)+_0x98699));let _0x49c3a6;if(_0xfae721['folder']){const _0x545ae4=_0xfae721[_0x5160ff(0x90)],_0x4a2f0e=await withSpinner(_0x5160ff(0x78)+_0x545ae4+_0x5160ff(0x8a),()=>_0x28fbbc[_0x5160ff(0x7a)][_0x5160ff(0x85)](_0x10e03a,_0x545ae4),{'verbose':_0xfae721[_0x5160ff(0x82)]});_0x49c3a6=parseInt(_0x4a2f0e[_0x5160ff(0x79)],0xa),_0xfae721[_0x5160ff(0x82)]&&console[_0x5160ff(0x86)](_0x5160ff(0x7e)+_0x49c3a6);}const _0x6681e6=await loadJSONFromOptions(_0xfae721[_0x5160ff(0x96)],_0xfae721[_0x5160ff(0x72)]),_0x4b935c={'name':_0xfae721[_0x5160ff(0x7f)],'description':_0xfae721[_0x5160ff(0x8d)],'rule':_0x6681e6,'kind':_0xfae721[_0x5160ff(0x8f)]!==undefined?parseInt(_0xfae721[_0x5160ff(0x8f)],0xa):undefined,'segmentFolderId':_0x49c3a6},_0x2294af=await withSpinner(_0x5160ff(0x9b)+_0x4a28d3[_0x5160ff(0x9f)]+_0x5160ff(0x8a),()=>_0x28fbbc[_0x5160ff(0x7a)]['updateSegmentById'](_0x10e03a,_0x98699,_0x4b935c),{'verbose':_0xfae721['verbose']}),_0x15b514=_0x2294af[_0x5160ff(0x79)];return console[_0x5160ff(0x86)](_0x5160ff(0x8e)+_0x15b514[_0x5160ff(0x7f)]+'\x27'),_0x55dcea!==_0xc32dc1&&console['error'](_0x5160ff(0x77)+_0x55dcea),await handleSDKOutput([_0x15b514],_0xfae721),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_0x6d23f8=a27_0x1fa3;function a27_0x1fa3(_0x295950,_0x4f830b){const _0x1ce81a=a27_0x1ce8();return a27_0x1fa3=function(_0x1fa37e,_0x1d270b){_0x1fa37e=_0x1fa37e-0x1a7;let _0x34f342=_0x1ce81a[_0x1fa37e];return _0x34f342;},a27_0x1fa3(_0x295950,_0x4f830b);}(function(_0x2ebfdb,_0x28d094){const _0x2a6789=a27_0x1fa3,_0x59daae=_0x2ebfdb();while(!![]){try{const _0x23f501=parseInt(_0x2a6789(0x1ba))/0x1+-parseInt(_0x2a6789(0x1af))/0x2*(-parseInt(_0x2a6789(0x1da))/0x3)+-parseInt(_0x2a6789(0x1c0))/0x4+-parseInt(_0x2a6789(0x1d5))/0x5+parseInt(_0x2a6789(0x1cc))/0x6*(parseInt(_0x2a6789(0x1ac))/0x7)+parseInt(_0x2a6789(0x1c5))/0x8*(parseInt(_0x2a6789(0x1bf))/0x9)+-parseInt(_0x2a6789(0x1dc))/0xa*(parseInt(_0x2a6789(0x1c4))/0xb);if(_0x23f501===_0x28d094)break;else _0x59daae['push'](_0x59daae['shift']());}catch(_0x4b76bd){_0x59daae['push'](_0x59daae['shift']());}}}(a27_0x1ce8,0x966f7));import{BaseCommand}from'./command.js';function a27_0x1ce8(){const _0x24aba6=['\x27...','Error:\x20Cannot\x20set\x20context\x20to\x20a\x20segment.','slice','\x20\x20tdx\x20segment\x20use\x20..\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Go\x20to\x20parent','site','Use:\x20tdx\x20segment\x20use\x20','593490dgyIRa','Context\x20set\x20to:\x20','Error:\x20Path\x20is\x20required','Site:\x20','segmentPath','segment:use','log','Set\x20current\x20segment/folder\x20context\x20for\x20navigation','data','394595McVTSm','Context\x20can\x20only\x20be\x20set\x20to\x20a\x20parent\x20segment\x20or\x20folder.','session','Target\x20path:\x20','folderId','45LttNEJ','length','750XpWCTg','fullPath','Usage:\x20tdx\x20segment\x20use\x20<path>','Resolving\x20path\x20\x27','folderPath','resolvePathToResource','21cGqQOV','join','isAbsolute','142804XHXeGe','Folder\x20ID:\x20','segments','segment','Error:\x20No\x20context\x20set.\x20Cannot\x20use\x20relative\x20path.','verbose','\x20\x20tdx\x20segment\x20use\x20\x22My\x20Audience\x22','Use\x20\x22tdx\x20segment\x20pwd\x22\x20to\x20show\x20current\x20context','Examples:','Use\x20an\x20absolute\x20path\x20or\x20set\x20context\x20with:\x20tdx\x20segment\x20use\x20<parent_name>','error','767500gXaJgU','parentName','\x20\x20tdx\x20segment\x20use\x20/\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Clear\x20context','type','Parent\x20ID:\x20','2120193NQkyym','3126732hLHNpH','Use\x20\x22tdx\x20context\x22\x20to\x20see\x20all\x20context\x20parameters','Context\x20cleared.\x20Back\x20to\x20root.','\x20\x20tdx\x20segment\x20use\x20\x22My\x20Audience/Marketing\x22','269335wMmgcE','40xiRAcW'];a27_0x1ce8=function(){return _0x24aba6;};return a27_0x1ce8();}import{saveSessionContext}from'../core/session.js';import{withSpinner}from'../utils/spinner.js';import{parsePath,normalizePath}from'../utils/segment-path-parser.js';export class SegmentUseCommand extends BaseCommand{['name']=a27_0x6d23f8(0x1d1);['description']=a27_0x6d23f8(0x1d3);async['execute'](_0x38f5d7){const _0x18e4f5=a27_0x6d23f8,{options:_0x50c536,args:_0x2258b4,tdx:_0x540630}=_0x38f5d7;if(_0x2258b4[_0x18e4f5(0x1db)]===0x0)return console[_0x18e4f5(0x1b9)](_0x18e4f5(0x1ce)),console[_0x18e4f5(0x1b9)](_0x18e4f5(0x1a8)),console[_0x18e4f5(0x1b9)](_0x18e4f5(0x1b7)),console['error'](_0x18e4f5(0x1b5)),console[_0x18e4f5(0x1b9)](_0x18e4f5(0x1c3)),console[_0x18e4f5(0x1b9)](_0x18e4f5(0x1bc)),console[_0x18e4f5(0x1b9)](_0x18e4f5(0x1c9)),0x1;const _0x3d84ed=_0x2258b4[0x0],_0x137b95=_0x50c536[_0x18e4f5(0x1d7)];try{if(_0x3d84ed==='/')return saveSessionContext({'segment_path':undefined},_0x137b95),console[_0x18e4f5(0x1d2)](_0x18e4f5(0x1c2)),0x0;const _0x9864ad=_0x50c536[_0x18e4f5(0x1d0)];let _0x423fca=_0x3d84ed;const _0x132942=parsePath(_0x3d84ed);if(!_0x132942[_0x18e4f5(0x1ae)]){if(!_0x9864ad)return console[_0x18e4f5(0x1b9)](_0x18e4f5(0x1b3)),console[_0x18e4f5(0x1b9)](_0x18e4f5(0x1b8)),0x1;if(_0x3d84ed==='..'){const _0x123bd1=_0x9864ad['split']('/')[_0x18e4f5(0x1c8)](0x0,-0x1)[_0x18e4f5(0x1ad)]('/');_0x423fca=_0x123bd1||'/';}else _0x3d84ed==='.'?_0x423fca=_0x9864ad:_0x423fca=_0x9864ad+'/'+_0x3d84ed;_0x50c536[_0x18e4f5(0x1b4)]&&console[_0x18e4f5(0x1b9)]('Resolved\x20relative\x20path\x20to:\x20'+_0x423fca);}if(_0x423fca==='/'||_0x423fca==='')return saveSessionContext({'segment_path':undefined},_0x137b95),console[_0x18e4f5(0x1d2)](_0x18e4f5(0x1c2)),0x0;_0x423fca=normalizePath(_0x423fca);const _0x4a8457=parsePath(_0x423fca)[_0x18e4f5(0x1b1)];if(_0x4a8457[_0x18e4f5(0x1db)]===0x0)return saveSessionContext({'segment_path':undefined},_0x137b95),console[_0x18e4f5(0x1d2)]('Context\x20cleared.\x20Back\x20to\x20root.'),0x0;_0x50c536['verbose']&&(console[_0x18e4f5(0x1b9)](_0x18e4f5(0x1cf)+_0x50c536[_0x18e4f5(0x1ca)]),console['error'](_0x18e4f5(0x1d8)+_0x423fca));const _0x591eb5=await withSpinner(_0x18e4f5(0x1a9)+_0x423fca+_0x18e4f5(0x1c6),()=>_0x540630[_0x18e4f5(0x1b2)][_0x18e4f5(0x1ab)](_0x423fca),{'verbose':_0x50c536[_0x18e4f5(0x1b4)]}),_0x72c0a6=_0x591eb5[_0x18e4f5(0x1d4)];_0x50c536[_0x18e4f5(0x1b4)]&&(console['error']('Resolved\x20path\x20type:\x20'+_0x72c0a6[_0x18e4f5(0x1bd)]),console['error'](_0x18e4f5(0x1be)+_0x72c0a6['parentId']),_0x72c0a6[_0x18e4f5(0x1d9)]&&console[_0x18e4f5(0x1b9)](_0x18e4f5(0x1b0)+_0x72c0a6['folderId']));if(_0x72c0a6[_0x18e4f5(0x1bd)]===_0x18e4f5(0x1b2))return console['error'](_0x18e4f5(0x1c7)),console[_0x18e4f5(0x1b9)](_0x18e4f5(0x1d6)),console[_0x18e4f5(0x1b9)](_0x18e4f5(0x1cb)+_0x72c0a6[_0x18e4f5(0x1bb)]+(_0x72c0a6['folderPath']?'/'+_0x72c0a6[_0x18e4f5(0x1aa)][_0x18e4f5(0x1ad)]('/'):'')),0x1;return saveSessionContext({'segment_path':_0x72c0a6[_0x18e4f5(0x1a7)],'parent_segment':_0x72c0a6['parentName']},_0x137b95),console['log'](_0x18e4f5(0x1cd)+_0x72c0a6[_0x18e4f5(0x1a7)]),_0x50c536[_0x18e4f5(0x1b4)]&&(console[_0x18e4f5(0x1b9)]('Use\x20\x22tdx\x20segments\x22\x20to\x20list\x20contents\x20in\x20this\x20context'),console[_0x18e4f5(0x1b9)](_0x18e4f5(0x1b6)),console[_0x18e4f5(0x1b9)](_0x18e4f5(0x1c1))),0x0;}catch(_0x26195b){throw _0x26195b;}}}
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_0x5435d2=a28_0x5299;(function(_0x5503ed,_0x489d17){const _0x5d84ed=a28_0x5299,_0x1632b1=_0x5503ed();while(!![]){try{const _0x366fff=-parseInt(_0x5d84ed(0xf7))/0x1+parseInt(_0x5d84ed(0xdc))/0x2+-parseInt(_0x5d84ed(0xf4))/0x3+parseInt(_0x5d84ed(0xe0))/0x4*(parseInt(_0x5d84ed(0xfc))/0x5)+-parseInt(_0x5d84ed(0xfb))/0x6+parseInt(_0x5d84ed(0xe9))/0x7*(-parseInt(_0x5d84ed(0xf8))/0x8)+parseInt(_0x5d84ed(0x111))/0x9;if(_0x366fff===_0x489d17)break;else _0x1632b1['push'](_0x1632b1['shift']());}catch(_0x4219d8){_0x1632b1['push'](_0x1632b1['shift']());}}}(a28_0x2d49,0x26873));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';function a28_0x5299(_0x4a8091,_0x1a44c3){const _0x2d49de=a28_0x2d49();return a28_0x5299=function(_0x52996e,_0x48f0d9){_0x52996e=_0x52996e-0xd0;let _0x47f4c3=_0x2d49de[_0x52996e];return _0x47f4c3;},a28_0x5299(_0x4a8091,_0x1a44c3);}import{handleSDKOutput}from'../utils/command-output.js';import{withSpinner}from'../utils/spinner.js';import{formatFlatList,formatTree}from'../utils/tree-formatter.js';function a28_0x2d49(){const _0x2d547b=['365052HVCVWE','listParentsWithPattern','Clear\x20context\x20with:\x20tdx\x20segment\x20use\x20/','listRecursive','12MWvYxv','listParents','folder','\x20and\x20','folderId','\x20matching\x20\x27','listUnified','\x27...','segment','14bwIdiI','name','description','Recursive\x20mode:\x20enabled','attributes','✔\x20Built\x20tree\x20with\x20','error','replace','filter','Listing\x20parent\x20segments\x20matching\x20\x27','[parent\x20segments]','724476hxaUuZ','Listing\x20folders\x20and\x20segments...','jsonl','123833MfiTGe','952888faFrJx','verbose','(empty)','953298mMWmQZ','384365XLavrf','Site:\x20','site','data','population','\x20top-level\x20items','format','Error:\x20','sort','No\x20parent\x20segments\x20match\x20pattern:\x20','Resolving\x20context\x20path\x20\x27','\x20segment','Folder\x20ID:\x20','dim','map','cause','json','parentId','execute','log','length','4563864ocojeH','segmentPath','Building\x20hierarchy\x20tree...','✔\x20Found\x20','resolvePathToResource','👥\x20','test','includes','message','segments','Parent\x20ID:\x20','\x20parent\x20segment','List\x20parent\x20segments,\x20folders,\x20and\x20child\x20segments','Error:\x20Pattern\x20matching\x20is\x20only\x20supported\x20at\x20root\x20level\x20(no\x20context\x20set).'];a28_0x2d49=function(){return _0x2d547b;};return a28_0x2d49();}import{formatRows}from'../utils/formatters.js';import a28_0x19b78f from'chalk';export class SegmentsCommand extends BaseCommand{[a28_0x5435d2(0xea)]=a28_0x5435d2(0xd7);[a28_0x5435d2(0xeb)]=a28_0x5435d2(0xda);async[a28_0x5435d2(0x10e)](_0x4c6037){const _0x1382af=a28_0x5435d2,{options:_0x25067b,args:_0x247b56}=_0x4c6037,_0x4eb086=_0x25067b['recursive'],_0x4bfb1f=_0x247b56[0x0];try{const _0x2fb325=_0x25067b[_0x1382af(0x112)];_0x25067b['verbose']&&(console[_0x1382af(0xef)](_0x1382af(0xfd)+_0x25067b[_0x1382af(0xfe)]),console['error']('Current\x20context:\x20'+(_0x2fb325||'/')),_0x4bfb1f&&console[_0x1382af(0xef)]('Path/pattern\x20arg:\x20'+_0x4bfb1f),_0x4eb086&&console[_0x1382af(0xef)](_0x1382af(0xec)));if(_0x4bfb1f){const _0x1e7bcb=_0x4bfb1f[_0x1382af(0xd5)]('*')||_0x4bfb1f['includes']('?');if(_0x1e7bcb&&!_0x2fb325)return await this[_0x1382af(0xdd)](_0x4c6037,_0x4bfb1f);else return _0x1e7bcb?(console['error'](_0x1382af(0xdb)),console[_0x1382af(0xef)](_0x1382af(0xde)),0x1):_0x4eb086?await this[_0x1382af(0xdf)](_0x4c6037,_0x4bfb1f):await this[_0x1382af(0xe6)](_0x4c6037,_0x4bfb1f);}if(!_0x2fb325)return await this[_0x1382af(0xe1)](_0x4c6037);return _0x4eb086?await this[_0x1382af(0xdf)](_0x4c6037,_0x2fb325):await this[_0x1382af(0xe6)](_0x4c6037,_0x2fb325);}catch(_0x3b99f9){if(_0x3b99f9 instanceof SDKError)return console['error'](_0x1382af(0x103)+_0x3b99f9[_0x1382af(0xd6)]),_0x3b99f9[_0x1382af(0x10b)]&&console[_0x1382af(0xef)]('\x20\x20Cause:\x20'+_0x3b99f9['cause']),0x1;throw _0x3b99f9;}}async[a28_0x5435d2(0xdd)](_0x54219e,_0x59ed00){const _0x9d47df=a28_0x5435d2,{options:_0xfce9f2,tdx:_0x7ad57e}=_0x54219e,_0x5a6872=await withSpinner(_0x9d47df(0xf2)+_0x59ed00+_0x9d47df(0xe7),()=>_0x7ad57e[_0x9d47df(0xe8)][_0x9d47df(0xe1)](),{'verbose':_0xfce9f2['verbose']}),_0x327e34=_0x5a6872['data'],_0x30abb8=_0x59ed00[_0x9d47df(0xf0)](/[.+^${}()|[\]\\]/g,'\x5c$&')[_0x9d47df(0xf0)](/\*/g,'.*')['replace'](/\?/g,'.'),_0x4ab7d9=new RegExp('^'+_0x30abb8+'$','i'),_0xc9fa55=_0x327e34[_0x9d47df(0xf1)](_0x1d72cd=>_0x4ab7d9[_0x9d47df(0xd4)](_0x1d72cd['attributes'][_0x9d47df(0xea)]));console[_0x9d47df(0xef)](_0x9d47df(0xd1)+_0xc9fa55['length']+_0x9d47df(0xd9)+(_0xc9fa55['length']!==0x1?'s':'')+_0x9d47df(0xe5)+_0x59ed00+'\x27');if(_0xfce9f2[_0x9d47df(0x102)]==='json'||_0xfce9f2[_0x9d47df(0x102)]===_0x9d47df(0xf6))await handleSDKOutput(_0xc9fa55,_0xfce9f2);else{if(_0xc9fa55[_0x9d47df(0x110)]===0x0)console['log'](_0x9d47df(0x105)+_0x59ed00);else{console[_0x9d47df(0x10f)](_0x9d47df(0xf3));for(const _0x105057 of _0xc9fa55){const _0x582bf1=_0x105057['attributes'][_0x9d47df(0x100)]?a28_0x19b78f[_0x9d47df(0x109)]('\x20('+formatRows(_0x105057[_0x9d47df(0xed)][_0x9d47df(0x100)])+')'):'';console['log']('👥\x20'+_0x105057[_0x9d47df(0xed)][_0x9d47df(0xea)]+_0x582bf1);}}}return 0x0;}async[a28_0x5435d2(0xe1)](_0x42958d){const _0x4eed8e=a28_0x5435d2,{options:_0xb30d1c,tdx:_0x52bb64}=_0x42958d,_0x3e8221=await withSpinner('Listing\x20parent\x20segments...',()=>_0x52bb64['segment'][_0x4eed8e(0xe1)](),{'verbose':_0xb30d1c[_0x4eed8e(0xf9)]}),_0x19485d=_0x3e8221['data'];console[_0x4eed8e(0xef)](_0x4eed8e(0xd1)+_0x19485d[_0x4eed8e(0x110)]+_0x4eed8e(0xd9)+(_0x19485d[_0x4eed8e(0x110)]!==0x1?'s':''));if(_0xb30d1c[_0x4eed8e(0x102)]===_0x4eed8e(0x10c)||_0xb30d1c['format']===_0x4eed8e(0xf6))await handleSDKOutput(_0x19485d,_0xb30d1c);else{console['log'](_0x4eed8e(0xf3));for(const _0x4f13b7 of _0x19485d){const _0x56cbfa=_0x4f13b7[_0x4eed8e(0xed)][_0x4eed8e(0x100)]?a28_0x19b78f[_0x4eed8e(0x109)]('\x20('+formatRows(_0x4f13b7['attributes'][_0x4eed8e(0x100)])+')'):'';console[_0x4eed8e(0x10f)](_0x4eed8e(0xd3)+_0x4f13b7[_0x4eed8e(0xed)][_0x4eed8e(0xea)]+_0x56cbfa);}}return 0x0;}async[a28_0x5435d2(0xe6)](_0x3a6fa5,_0x130a0e){const _0x1991bc=a28_0x5435d2,{options:_0x5e5bf1,tdx:_0x4a6ee8}=_0x3a6fa5,_0x7d24fb=await withSpinner(_0x1991bc(0x106)+_0x130a0e+_0x1991bc(0xe7),()=>_0x4a6ee8[_0x1991bc(0xe8)]['resolvePathToResource'](_0x130a0e),{'verbose':_0x5e5bf1[_0x1991bc(0xf9)]}),_0x210d13=_0x7d24fb[_0x1991bc(0xff)];_0x5e5bf1[_0x1991bc(0xf9)]&&(console[_0x1991bc(0xef)](_0x1991bc(0xd8)+_0x210d13[_0x1991bc(0x10d)]),_0x210d13[_0x1991bc(0xe4)]&&console[_0x1991bc(0xef)]('Folder\x20ID:\x20'+_0x210d13['folderId']));const _0x581d5d=await withSpinner(_0x1991bc(0xf5),()=>_0x4a6ee8['segment'][_0x1991bc(0xe6)](_0x210d13[_0x1991bc(0x10d)],_0x210d13[_0x1991bc(0xe4)]),{'verbose':_0x5e5bf1[_0x1991bc(0xf9)]}),{folders:_0xa15293,segments:_0x25f0ba}=_0x581d5d['data'],_0x1577a1=_0xa15293['length']+_0x25f0ba['length'];console[_0x1991bc(0xef)](_0x1991bc(0xd1)+_0xa15293[_0x1991bc(0x110)]+'\x20folder'+(_0xa15293['length']!==0x1?'s':'')+_0x1991bc(0xe3)+_0x25f0ba['length']+_0x1991bc(0x107)+(_0x25f0ba['length']!==0x1?'s':''));if(_0x5e5bf1[_0x1991bc(0x102)]===_0x1991bc(0x10c)||_0x5e5bf1[_0x1991bc(0x102)]===_0x1991bc(0xf6)){const _0x516aea=[..._0xa15293[_0x1991bc(0x10a)](_0x517829=>({..._0x517829,'type':_0x1991bc(0xe2)})),..._0x25f0ba[_0x1991bc(0x10a)](_0x12e054=>({..._0x12e054,'type':_0x1991bc(0xe8)}))][_0x1991bc(0x104)]((_0x5ad9d8,_0x137dd1)=>_0x5ad9d8[_0x1991bc(0xea)]['localeCompare'](_0x137dd1[_0x1991bc(0xea)]));await handleSDKOutput(_0x516aea,_0x5e5bf1);}else{if(_0x1577a1===0x0)console['log'](a28_0x19b78f[_0x1991bc(0x109)]('[/'+_0x130a0e+']')),console['log'](_0x1991bc(0xfa));else{console[_0x1991bc(0x10f)](a28_0x19b78f[_0x1991bc(0x109)]('[/'+_0x130a0e+']'));const _0x1b1151=formatFlatList(_0xa15293,_0x25f0ba,{'showMetadata':!![]});console[_0x1991bc(0x10f)](_0x1b1151);}}return 0x0;}async[a28_0x5435d2(0xdf)](_0x18aba1,_0x38f07e){const _0x25a1ce=a28_0x5435d2,{options:_0x283477,tdx:_0x2cb090}=_0x18aba1,_0x34d8a8=await withSpinner(_0x25a1ce(0x106)+_0x38f07e+_0x25a1ce(0xe7),()=>_0x2cb090[_0x25a1ce(0xe8)][_0x25a1ce(0xd2)](_0x38f07e),{'verbose':_0x283477[_0x25a1ce(0xf9)]}),_0x4cd066=_0x34d8a8[_0x25a1ce(0xff)];_0x283477['verbose']&&(console[_0x25a1ce(0xef)](_0x25a1ce(0xd8)+_0x4cd066['parentId']),_0x4cd066[_0x25a1ce(0xe4)]&&console[_0x25a1ce(0xef)](_0x25a1ce(0x108)+_0x4cd066[_0x25a1ce(0xe4)]));const _0x234617=_0x283477['maxDepth']||0xa,_0xdb9817=await withSpinner(_0x25a1ce(0xd0),()=>_0x2cb090['segment'][_0x25a1ce(0xdf)](_0x4cd066[_0x25a1ce(0x10d)],_0x4cd066[_0x25a1ce(0xe4)],0x0,_0x234617),{'verbose':_0x283477[_0x25a1ce(0xf9)]}),_0x5a1006=_0xdb9817[_0x25a1ce(0xff)];console[_0x25a1ce(0xef)](_0x25a1ce(0xee)+_0x5a1006[_0x25a1ce(0x110)]+_0x25a1ce(0x101));if(_0x283477[_0x25a1ce(0x102)]===_0x25a1ce(0x10c)||_0x283477[_0x25a1ce(0x102)]===_0x25a1ce(0xf6))await handleSDKOutput(_0x5a1006,_0x283477);else{console[_0x25a1ce(0x10f)](a28_0x19b78f[_0x25a1ce(0x109)]('[/'+_0x38f07e+']'));const _0x1c6c58=formatTree(_0x5a1006,{'showMetadata':!![]});console['log'](_0x1c6c58);}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_0x47d4f4=a29_0x477e;(function(_0x362304,_0x212fa8){const _0x2ebb27=a29_0x477e,_0x42c2f4=_0x362304();while(!![]){try{const _0x1365fd=-parseInt(_0x2ebb27(0x204))/0x1*(parseInt(_0x2ebb27(0x1f5))/0x2)+parseInt(_0x2ebb27(0x20b))/0x3+parseInt(_0x2ebb27(0x208))/0x4*(-parseInt(_0x2ebb27(0x210))/0x5)+-parseInt(_0x2ebb27(0x1ef))/0x6*(-parseInt(_0x2ebb27(0x20c))/0x7)+parseInt(_0x2ebb27(0x1f4))/0x8*(-parseInt(_0x2ebb27(0x212))/0x9)+parseInt(_0x2ebb27(0x20e))/0xa+parseInt(_0x2ebb27(0x1ff))/0xb*(parseInt(_0x2ebb27(0x20a))/0xc);if(_0x1365fd===_0x212fa8)break;else _0x42c2f4['push'](_0x42c2f4['shift']());}catch(_0x129dbf){_0x42c2f4['push'](_0x42c2f4['shift']());}}}(a29_0x4333,0x75523));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';function a29_0x477e(_0xffb2d2,_0x59935d){const _0x4333e4=a29_0x4333();return a29_0x477e=function(_0x477e6a,_0x3ee307){_0x477e6a=_0x477e6a-0x1ee;let _0x44e1d7=_0x4333e4[_0x477e6a];return _0x44e1d7;},a29_0x477e(_0xffb2d2,_0x59935d);}import{handleSDKOutput}from'../utils/command-output.js';function a29_0x4333(){const _0x3b4959=['2376066vQWrcx','120463SjcXZb','Error:\x20','4028170YkItFw','message','655lUKVnc','\x20\x20\x20or:\x20tdx\x20show\x20<catalog.database.table>','247806wDGLbN','✔\x20Query\x20successful\x20-\x200\x20rows\x20returned','args','error','Catalog:\x20','Show\x20table\x20contents','length','276MnTxWs','site','database','validate','data','120cURcvV','850946WWuXQr','catalog','description','name','Usage:\x20tdx\x20show\x20<database.table>','limit','✔\x20Retrieved\x20','execute','Limit:\x20','show','11qztNCF','table','\x20from\x20','Querying\x20','\x20row','2dpKiRy','Site:\x20','showTable','\x20\x20Cause:\x20','10928INokJJ','verbose','1391304fMYBpt'];a29_0x4333=function(){return _0x3b4959;};return a29_0x4333();}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_0x47d4f4(0x1f8)]=a29_0x47d4f4(0x1fe);[a29_0x47d4f4(0x1f7)]=a29_0x47d4f4(0x217);async[a29_0x47d4f4(0x1fc)](_0x420dd3){const _0x42e5ba=a29_0x47d4f4;return this[_0x42e5ba(0x206)](_0x420dd3);}async[a29_0x47d4f4(0x206)](_0xdc96aa){const _0x41c3ae=a29_0x47d4f4,{options:_0x4cdae1,args:_0x593d45,tdx:_0x5c436e}=_0xdc96aa;let _0x4bdf30;try{_0x4bdf30=parseTableReference(_0x593d45[0x0]);const _0x525117=_0x4cdae1[_0x41c3ae(0x1f1)];!_0x4bdf30[_0x41c3ae(0x1f1)]&&_0x525117&&(_0x4bdf30[_0x41c3ae(0x1f1)]=_0x525117);const _0x2e7253=validateTableDescribeReference(_0x4bdf30);if(_0x2e7253)return console['error'](_0x41c3ae(0x20d)+_0x2e7253),console['error'](_0x41c3ae(0x1f9)),console[_0x41c3ae(0x215)]('\x20\x20\x20or:\x20tdx\x20show\x20<catalog.database.table>'),console[_0x41c3ae(0x215)]('\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--database\x20<database>'),0x1;}catch(_0x29d54c){return console[_0x41c3ae(0x215)]('Error:\x20'+_0x29d54c[_0x41c3ae(0x20f)]),console['error'](_0x41c3ae(0x1f9)),console[_0x41c3ae(0x215)](_0x41c3ae(0x211)),console[_0x41c3ae(0x215)]('\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--database\x20<database>'),0x1;}const _0x5121a2=_0x4bdf30[_0x41c3ae(0x1f6)],_0x13ae55=_0x4bdf30[_0x41c3ae(0x1f1)],_0x1aace7=_0x4bdf30[_0x41c3ae(0x200)],_0x2ec17e=resolveLimit(_0x4cdae1[_0x41c3ae(0x1fa)],DEFAULT_DISPLAY_LIMIT);try{_0x4cdae1[_0x41c3ae(0x209)]&&(console[_0x41c3ae(0x215)](_0x41c3ae(0x205)+_0x4cdae1[_0x41c3ae(0x1f0)]),_0x5121a2&&console[_0x41c3ae(0x215)](_0x41c3ae(0x216)+_0x5121a2),console['error']('Database:\x20'+_0x13ae55),console[_0x41c3ae(0x215)]('Table:\x20'+_0x1aace7),console[_0x41c3ae(0x215)](_0x41c3ae(0x1fd)+_0x2ec17e));const _0x5b5a84=_0x5121a2?_0x5121a2+'.'+_0x13ae55+'.'+_0x1aace7:_0x13ae55+'.'+_0x1aace7,_0x1afe8a=await withSpinner(_0x41c3ae(0x202)+_0x5b5a84+'...',()=>_0x5c436e[_0x41c3ae(0x200)]['show'](_0x13ae55,_0x1aace7,_0x2ec17e,_0x5121a2),{'verbose':_0x4cdae1[_0x41c3ae(0x209)]}),_0x247717=_0x1afe8a['data'],_0x47647d=_0x247717[_0x41c3ae(0x1f3)];return _0x47647d[_0x41c3ae(0x1ee)]===0x0?console[_0x41c3ae(0x215)](_0x41c3ae(0x213)):console['error'](_0x41c3ae(0x1fb)+_0x47647d[_0x41c3ae(0x1ee)]+_0x41c3ae(0x203)+(_0x47647d[_0x41c3ae(0x1ee)]!==0x1?'s':'')+_0x41c3ae(0x201)+_0x5b5a84),await handleSDKOutput(_0x47647d,_0x4cdae1),0x0;}catch(_0x5e5040){if(_0x5e5040 instanceof SDKError)return console[_0x41c3ae(0x215)](_0x41c3ae(0x20d)+_0x5e5040[_0x41c3ae(0x20f)]),_0x5e5040['cause']&&console[_0x41c3ae(0x215)](_0x41c3ae(0x207)+_0x5e5040['cause']),0x1;throw _0x5e5040;}}[a29_0x47d4f4(0x1f2)](_0x3a6396){const _0x4ed8ed=a29_0x47d4f4;if(_0x3a6396[_0x4ed8ed(0x214)][_0x4ed8ed(0x1ee)]===0x0)return'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';if(_0x3a6396[_0x4ed8ed(0x214)][_0x4ed8ed(0x1ee)]>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_0x368777=a30_0x46d9;(function(_0x22acbd,_0x5651fc){const _0x5270a9=a30_0x46d9,_0x2e62e2=_0x22acbd();while(!![]){try{const _0x3c2ac9=-parseInt(_0x5270a9(0x1b1))/0x1+-parseInt(_0x5270a9(0x1aa))/0x2*(parseInt(_0x5270a9(0x1a8))/0x3)+-parseInt(_0x5270a9(0x195))/0x4*(-parseInt(_0x5270a9(0x186))/0x5)+-parseInt(_0x5270a9(0x189))/0x6+parseInt(_0x5270a9(0x1b0))/0x7*(-parseInt(_0x5270a9(0x194))/0x8)+parseInt(_0x5270a9(0x1b3))/0x9*(-parseInt(_0x5270a9(0x19e))/0xa)+parseInt(_0x5270a9(0x19a))/0xb;if(_0x3c2ac9===_0x5651fc)break;else _0x2e62e2['push'](_0x2e62e2['shift']());}catch(_0x30173c){_0x2e62e2['push'](_0x2e62e2['shift']());}}}(a30_0x375a,0x96997));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleSDKOutput}from'../utils/command-output.js';function a30_0x46d9(_0x4ac03f,_0x3f0588){const _0x375ab6=a30_0x375a();return a30_0x46d9=function(_0x46d95e,_0x592bdf){_0x46d95e=_0x46d95e-0x185;let _0x49cb8b=_0x375ab6[_0x46d95e];return _0x49cb8b;},a30_0x46d9(_0x4ac03f,_0x3f0588);}import{parseTableReference}from'../utils/table-ref-parser.js';import{DEFAULT_LISTING_LIMIT,resolveLimit}from'../utils/constants.js';function a30_0x375a(){const _0x2aaa18=['site','includes','length','\x20\x20Cause:\x20','Or\x20use\x20--in\x20flag:','Note:\x20\x27','description','database','message','6wjOqlv','\x20\x20tdx\x20tables\x20\x22mydb.users\x22\x20\x20\x20\x20->\x20table\x20\x22users\x22\x20in\x20database\x20mydb','957464bHheYu','✔\x20Found\x20','Table\x20pattern:\x20','\x20\x20Use:\x20tdx\x20tables\x20\x22','limit','\x20table','8687hcFUda','45063uwfckc','.*\x22','18tszipv','\x27\x20without\x20wildcards\x20would\x20search\x20for\x20tables\x20named\x20\x27','\x20\x20tdx\x20tables\x20\x22mydb.*\x22\x20\x20\x20\x20\x20\x20\x20\x20->\x20all\x20tables\x20from\x20mydb','List\x20tables\x20in\x20a\x20database','528365alQtZM','\x20\x20Or:\x20\x20tdx\x20tables\x20--database\x20','\x20\x20Or:\x20\x20tdx\x20tables\x20--in\x20','5766006rWEXga','Error:\x20Pattern\x20\x27','Database\x20pattern:\x20','Database:\x20all','Listing\x20tables...','Site:\x20','\x27\x20across\x20all\x20databases.','\x20\x20tdx\x20tables\x20\x22*.user*\x22\x20\x20\x20\x20\x20\x20\x20->\x20tables\x20matching\x20user*\x20across\x20databases','tables','\x27\x20may\x20not\x20exist\x20or\x20contains\x20no\x20tables','error','2456NILXKT','8zFlHnu','validate','Did\x20you\x20mean\x20to\x20list\x20all\x20tables\x20from\x20database\x20\x27','name','list','41112632llwTTG','table','cause','Error:\x20','4937440tmPdNy'];a30_0x375a=function(){return _0x2aaa18;};return a30_0x375a();}import{withSpinner}from'../utils/spinner.js';export class TablesCommand extends BaseCommand{[a30_0x368777(0x198)]=a30_0x368777(0x191);[a30_0x368777(0x1a5)]=a30_0x368777(0x185);async['execute'](_0x35b0b5){const _0x20af31=a30_0x368777,{options:_0x2139d4,args:_0x3b2d62,tdx:_0x5204cc}=_0x35b0b5;let _0x51516d;if(_0x3b2d62['length']===0x0)_0x51516d={'database':undefined,'table':undefined,'original':''};else{if(_0x3b2d62[_0x20af31(0x1a1)]===0x1)try{_0x51516d=parseTableReference(_0x3b2d62[0x0]);if(_0x51516d[_0x20af31(0x19b)]&&!_0x51516d['database']&&!_0x51516d[_0x20af31(0x19b)][_0x20af31(0x1a0)]('*')&&!_0x51516d[_0x20af31(0x19b)][_0x20af31(0x1a0)]('?'))return console[_0x20af31(0x193)](_0x20af31(0x18a)+_0x3b2d62[0x0]+'\x27\x20is\x20ambiguous.'),console[_0x20af31(0x193)](_0x20af31(0x197)+_0x51516d[_0x20af31(0x19b)]+'\x27?'),console[_0x20af31(0x193)](_0x20af31(0x1ad)+_0x51516d[_0x20af31(0x19b)]+_0x20af31(0x1b2)),console[_0x20af31(0x193)](_0x20af31(0x188)+_0x51516d[_0x20af31(0x19b)]),console[_0x20af31(0x193)](_0x20af31(0x187)+_0x51516d[_0x20af31(0x19b)]),console[_0x20af31(0x193)](''),console[_0x20af31(0x193)](_0x20af31(0x1a4)+_0x3b2d62[0x0]+_0x20af31(0x1b4)+_0x51516d[_0x20af31(0x19b)]+_0x20af31(0x18f)),0x1;}catch(_0x32effd){return console['error'](_0x20af31(0x19d)+_0x32effd[_0x20af31(0x1a7)]),0x1;}else return console['error']('Error:\x20Too\x20many\x20arguments.\x20Use\x20single\x20argument:'),console[_0x20af31(0x193)]('\x20\x20tdx\x20tables\x20users\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20->\x20table\x20\x22users\x22\x20across\x20all\x20databases'),console[_0x20af31(0x193)](_0x20af31(0x1b5)),console[_0x20af31(0x193)](_0x20af31(0x1a9)),console[_0x20af31(0x193)](_0x20af31(0x190)),console[_0x20af31(0x193)](_0x20af31(0x1a3)),console[_0x20af31(0x193)]('\x20\x20tdx\x20tables\x20--in\x20mydb\x20\x20\x20\x20\x20\x20\x20->\x20all\x20tables\x20from\x20mydb'),0x1;}const _0x4740de=_0x2139d4[_0x20af31(0x1a6)];!_0x51516d[_0x20af31(0x1a6)]&&_0x4740de&&(_0x51516d[_0x20af31(0x1a6)]=_0x4740de);try{const _0xa27f05=_0x1fe7f4=>_0x1fe7f4&&(_0x1fe7f4[_0x20af31(0x1a0)]('*')||_0x1fe7f4[_0x20af31(0x1a0)]('?')),_0x38807b=_0xa27f05(_0x51516d['database']);_0x2139d4['verbose']&&(console[_0x20af31(0x193)](_0x20af31(0x18e)+_0x2139d4[_0x20af31(0x19f)]),_0x51516d[_0x20af31(0x1a6)]?_0x38807b?console[_0x20af31(0x193)](_0x20af31(0x18b)+_0x51516d['database']):console['error']('Database:\x20'+_0x51516d[_0x20af31(0x1a6)]):console[_0x20af31(0x193)](_0x20af31(0x18c)),_0x51516d[_0x20af31(0x19b)]&&console['error'](_0x20af31(0x1ac)+_0x51516d[_0x20af31(0x19b)]));const _0x50a933=_0x51516d[_0x20af31(0x1a6)]&&!_0x38807b?_0x51516d[_0x20af31(0x1a6)]:undefined,_0x42d27e=_0x38807b?_0x51516d[_0x20af31(0x1a6)]:undefined,_0xe1588f=_0x51516d[_0x20af31(0x19b)],_0x5dc15e=resolveLimit(_0x2139d4[_0x20af31(0x1ae)],DEFAULT_LISTING_LIMIT),_0x4380af=await withSpinner(_0x20af31(0x18d),()=>_0x5204cc['table'][_0x20af31(0x199)](_0x50a933,_0xe1588f,_0x42d27e,_0x5dc15e),{'verbose':_0x2139d4['verbose']}),_0x15645f=_0x4380af['data'];if(_0x15645f[_0x20af31(0x1a1)]===0x0&&_0x51516d[_0x20af31(0x1a6)]&&!_0x38807b)return console[_0x20af31(0x193)]('✖\x20No\x20tables\x20found'),console[_0x20af31(0x193)]('Database\x20\x27'+_0x51516d[_0x20af31(0x1a6)]+_0x20af31(0x192)),0x1;return console[_0x20af31(0x193)](_0x20af31(0x1ab)+_0x15645f['length']+_0x20af31(0x1af)+(_0x15645f[_0x20af31(0x1a1)]!==0x1?'s':'')),await handleSDKOutput(_0x15645f,{..._0x2139d4,'limit':_0x5dc15e}),0x0;}catch(_0x72382a){if(_0x72382a instanceof SDKError)return console[_0x20af31(0x193)](_0x20af31(0x19d)+_0x72382a[_0x20af31(0x1a7)]),_0x72382a[_0x20af31(0x19c)]&&console[_0x20af31(0x193)](_0x20af31(0x1a2)+_0x72382a[_0x20af31(0x19c)]),0x1;throw _0x72382a;}}[a30_0x368777(0x196)](_0x2e4a55){return undefined;}}
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_0x430654=a31_0x4137;(function(_0x201fee,_0x29d743){const _0x2e0cc5=a31_0x4137,_0x35ab4c=_0x201fee();while(!![]){try{const _0x4eaf1b=-parseInt(_0x2e0cc5(0x118))/0x1*(parseInt(_0x2e0cc5(0xf4))/0x2)+parseInt(_0x2e0cc5(0x10a))/0x3*(-parseInt(_0x2e0cc5(0x101))/0x4)+-parseInt(_0x2e0cc5(0x10b))/0x5+parseInt(_0x2e0cc5(0x100))/0x6*(parseInt(_0x2e0cc5(0xfc))/0x7)+parseInt(_0x2e0cc5(0xff))/0x8+-parseInt(_0x2e0cc5(0xf2))/0x9*(-parseInt(_0x2e0cc5(0x104))/0xa)+parseInt(_0x2e0cc5(0xf6))/0xb*(-parseInt(_0x2e0cc5(0xf7))/0xc);if(_0x4eaf1b===_0x29d743)break;else _0x35ab4c['push'](_0x35ab4c['shift']());}catch(_0x4b609e){_0x35ab4c['push'](_0x35ab4c['shift']());}}}(a31_0x27e5,0x88d4c));function a31_0x27e5(){const _0x2c59d4=['220MsEOfc','135408sMKbAy','includes','session','\x27\x20does\x20not\x20exist','llm_project','3871lcpFcT','validate','message','1066000fdgDMg','2076csAcGK','53752ZeeCxP','\x0aRun\x20\x27tdx\x20use\x20--help\x27\x20for\x20more\x20options','Invalid\x20resource:\x20','2843380ZREPJj','\x20(session:\x20','length','Or\x20use:\x20tdx\x20context\x20--clear\x20to\x20clear\x20session\x20context\x0a','Set\x20session-level\x20context','database','57KTtVpN','70245CRQpXM','\x0aTip:\x20Use\x20\x27tdx\x20context\x20--clear\x27\x20to\x20clear\x20session\x20overrides','Session\x20database\x20set\x20to:\x20','Session\x20parent_segment\x20set\x20to:\x20','use','execute','error','name','toString','profile','join','parent_segment','.\x20Must\x20be\x20one\x20of:\x20','122091cmfdnm','Error:\x20Profile\x20\x27','log','27jFhgwc','Resources:\x20database,\x20parent_segment,\x20llm_project,\x20profile\x0a','2wjFYIf','description'];a31_0x27e5=function(){return _0x2c59d4;};return a31_0x27e5();}import{BaseCommand}from'./command.js';function a31_0x4137(_0x3cfc90,_0x2a81f7){const _0x27e50c=a31_0x27e5();return a31_0x4137=function(_0x413723,_0x1ddcd3){_0x413723=_0x413723-0xf2;let _0x1af99c=_0x27e50c[_0x413723];return _0x1af99c;},a31_0x4137(_0x3cfc90,_0x2a81f7);}import{saveSessionContext,getCurrentSessionPID}from'../core/session.js';import{profileExists}from'../core/profile.js';export class UseCommand extends BaseCommand{[a31_0x430654(0x112)]=a31_0x430654(0x10f);[a31_0x430654(0xf5)]=a31_0x430654(0x108);[a31_0x430654(0xfd)](_0x2fed6b){const _0x2d6f5d=a31_0x430654,{args:_0xc2bd12}=_0x2fed6b;if(_0xc2bd12[_0x2d6f5d(0x106)]<0x2)return'Usage:\x20tdx\x20use\x20<resource>\x20<value>\x0a'+_0x2d6f5d(0xf3)+_0x2d6f5d(0x107)+_0x2d6f5d(0x102);const _0x7ba71d=_0xc2bd12[0x0],_0x2eec27=['database',_0x2d6f5d(0x116),_0x2d6f5d(0xfb),_0x2d6f5d(0x114)];if(!_0x2eec27[_0x2d6f5d(0xf8)](_0x7ba71d))return _0x2d6f5d(0x103)+_0x7ba71d+_0x2d6f5d(0x117)+_0x2eec27[_0x2d6f5d(0x115)](',\x20');return undefined;}async[a31_0x430654(0x110)](_0x1f4dad){const _0x5e2da1=a31_0x430654,{args:_0x38bbcb,options:_0x2293a5}=_0x1f4dad;try{const _0x2ae545=_0x38bbcb[0x0],_0x27d9ff=_0x38bbcb[0x1];if(_0x2ae545===_0x5e2da1(0x114)){if(!profileExists(_0x27d9ff))return console[_0x5e2da1(0x111)](_0x5e2da1(0x119)+_0x27d9ff+_0x5e2da1(0xfa)),console[_0x5e2da1(0x111)]('\x0aUse\x20\x27tdx\x20profiles\x27\x20to\x20see\x20available\x20profiles'),0x1;const _0x3a432e=_0x2293a5[_0x5e2da1(0xf9)]||getCurrentSessionPID()['toString']();return saveSessionContext({'profile':_0x27d9ff},_0x2293a5['session']),console[_0x5e2da1(0x11a)]('Session\x20profile\x20set\x20to:\x20'+_0x27d9ff+_0x5e2da1(0x105)+_0x3a432e+')'),console[_0x5e2da1(0x11a)](_0x5e2da1(0x10c)),0x0;}const _0x23ffe1={},_0x126c4f=_0x2293a5[_0x5e2da1(0xf9)]||getCurrentSessionPID()[_0x5e2da1(0x113)]();switch(_0x2ae545){case _0x5e2da1(0x109):_0x23ffe1[_0x5e2da1(0x109)]=_0x27d9ff,console[_0x5e2da1(0x11a)](_0x5e2da1(0x10d)+_0x27d9ff+_0x5e2da1(0x105)+_0x126c4f+')');break;case'parent_segment':_0x23ffe1[_0x5e2da1(0x116)]=_0x27d9ff,console[_0x5e2da1(0x11a)](_0x5e2da1(0x10e)+_0x27d9ff+_0x5e2da1(0x105)+_0x126c4f+')');break;case _0x5e2da1(0xfb):_0x23ffe1['llm_project']=_0x27d9ff,console[_0x5e2da1(0x11a)]('Session\x20llm_project\x20set\x20to:\x20'+_0x27d9ff+_0x5e2da1(0x105)+_0x126c4f+')');break;}return saveSessionContext(_0x23ffe1,_0x2293a5[_0x5e2da1(0xf9)]),console[_0x5e2da1(0x11a)]('\x0aTip:\x20Use\x20\x27tdx\x20context\x20--clear\x27\x20to\x20clear\x20session\x20overrides'),0x0;}catch(_0x7c0d16){return _0x7c0d16 instanceof Error&&console['error']('Error:\x20'+_0x7c0d16[_0x5e2da1(0xfe)]),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_0x14d260=a32_0x32ca;(function(_0x35ec07,_0x4d78f3){const _0x37bd01=a32_0x32ca,_0x34d2f7=_0x35ec07();while(!![]){try{const _0xeb9b37=-parseInt(_0x37bd01(0x14b))/0x1+parseInt(_0x37bd01(0x16c))/0x2*(parseInt(_0x37bd01(0x13e))/0x3)+-parseInt(_0x37bd01(0x15c))/0x4*(-parseInt(_0x37bd01(0x19a))/0x5)+-parseInt(_0x37bd01(0x142))/0x6*(parseInt(_0x37bd01(0x16f))/0x7)+-parseInt(_0x37bd01(0x137))/0x8*(-parseInt(_0x37bd01(0x175))/0x9)+parseInt(_0x37bd01(0x19f))/0xa+-parseInt(_0x37bd01(0x13a))/0xb;if(_0xeb9b37===_0x4d78f3)break;else _0x34d2f7['push'](_0x34d2f7['shift']());}catch(_0x455f42){_0x34d2f7['push'](_0x34d2f7['shift']());}}}(a32_0x6a51,0x6a478));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_0x14d260(0x16d)]=a32_0x14d260(0x169);['description']=a32_0x14d260(0x12f);async['execute'](_0x22ce32){const _0x1b266b=a32_0x14d260,{options:_0xce4c2d,args:_0x2db416,tdx:_0x22db2d}=_0x22ce32,_0x49f073=_0x2db416[0x0];try{_0xce4c2d[_0x1b266b(0x1a0)]&&_0x49f073&&console['error'](_0x1b266b(0x157)+_0x49f073);const _0x46e4d0=await withSpinner(_0x1b266b(0x13c),()=>_0x22db2d[_0x1b266b(0x159)][_0x1b266b(0x14c)](_0x49f073,{'limit':_0xce4c2d[_0x1b266b(0x16b)]}),{'verbose':_0xce4c2d['verbose']}),_0x12d801=_0x46e4d0['data'];return console['error'](_0x1b266b(0x16a)+_0x12d801[_0x1b266b(0x15a)]+_0x1b266b(0x132)+(_0x12d801[_0x1b266b(0x15a)]!==0x1?'s':'')),await handleSDKOutput(_0x12d801,_0xce4c2d),0x0;}catch(_0x2ee2ff){if(_0x2ee2ff instanceof SDKError)return console[_0x1b266b(0x14d)]('Error:\x20'+_0x2ee2ff[_0x1b266b(0x15f)]),_0x2ee2ff[_0x1b266b(0x17d)]&&console['error']('\x20\x20Cause:\x20'+_0x2ee2ff[_0x1b266b(0x17d)]),0x1;throw _0x2ee2ff;}}}export class WorkflowWorkflowsCommand extends BaseCommand{[a32_0x14d260(0x16d)]=a32_0x14d260(0x165);[a32_0x14d260(0x181)]='List\x20workflows';async[a32_0x14d260(0x12a)](_0x34d7dd){const _0x1a8121=a32_0x14d260,{options:_0x492870,args:_0x176897,tdx:_0x2e2220}=_0x34d7dd,_0x5ebdd1=_0x176897[0x0];try{_0x492870['verbose']&&_0x5ebdd1&&console[_0x1a8121(0x14d)](_0x1a8121(0x122)+_0x5ebdd1);const _0x569a10=await withSpinner('Listing\x20workflows...',()=>_0x2e2220[_0x1a8121(0x159)][_0x1a8121(0x172)](_0x5ebdd1,{'limit':_0x492870[_0x1a8121(0x16b)]}),{'verbose':_0x492870[_0x1a8121(0x1a0)]}),_0x515736=_0x569a10['data'];return console[_0x1a8121(0x14d)](_0x1a8121(0x16a)+_0x515736[_0x1a8121(0x15a)]+'\x20workflow'+(_0x515736[_0x1a8121(0x15a)]!==0x1?'s':'')),await handleSDKOutput(_0x515736,_0x492870),0x0;}catch(_0x5dd5eb){if(_0x5dd5eb instanceof SDKError)return console[_0x1a8121(0x14d)](_0x1a8121(0x156)+_0x5dd5eb['message']),_0x5dd5eb[_0x1a8121(0x17d)]&&console['error'](_0x1a8121(0x151)+_0x5dd5eb[_0x1a8121(0x17d)]),0x1;throw _0x5dd5eb;}}}export class WorkflowSessionsCommand extends BaseCommand{['name']=a32_0x14d260(0x124);[a32_0x14d260(0x181)]=a32_0x14d260(0x191);async[a32_0x14d260(0x12a)](_0x19b622){const _0x1bf468=a32_0x14d260,{options:_0x4f0522,args:_0x354e17,tdx:_0x11cdb4}=_0x19b622;let _0x10efbf,_0x387a1a;if(_0x354e17[0x0]){const _0x59da9d=_0x354e17[0x0][_0x1bf468(0x160)]('.');if(_0x59da9d['length']===0x1)_0x10efbf=_0x59da9d[0x0];else{if(_0x59da9d['length']===0x2)[_0x10efbf,_0x387a1a]=_0x59da9d;else return console[_0x1bf468(0x14d)](_0x1bf468(0x188)),0x1;}}try{if(_0x4f0522[_0x1bf468(0x1a0)]){if(_0x10efbf&&_0x387a1a)console[_0x1bf468(0x14d)]('Filter:\x20'+_0x10efbf+'.'+_0x387a1a);else _0x10efbf&&console[_0x1bf468(0x14d)]('Filter:\x20project='+_0x10efbf);const _0x142efd=_0x4f0522[_0x1bf468(0x182)];_0x142efd&&console[_0x1bf468(0x14d)]('Status:\x20'+_0x142efd);}const _0x481574=await withSpinner('Listing\x20workflow\x20sessions...',()=>_0x11cdb4[_0x1bf468(0x159)][_0x1bf468(0x141)]({'projectName':_0x10efbf,'workflowName':_0x387a1a,'status':_0x4f0522['status'],'fromTime':_0x4f0522[_0x1bf468(0x12b)],'toTime':_0x4f0522['to'],'limit':_0x4f0522['limit']}),{'verbose':_0x4f0522[_0x1bf468(0x1a0)]}),_0x5f4356=_0x481574[_0x1bf468(0x17e)];return console[_0x1bf468(0x14d)]('✔\x20Found\x20'+_0x5f4356['length']+_0x1bf468(0x121)+(_0x5f4356[_0x1bf468(0x15a)]!==0x1?'s':'')),await handleSDKOutput(_0x5f4356,_0x4f0522),0x0;}catch(_0x46bd83){if(_0x46bd83 instanceof SDKError)return console[_0x1bf468(0x14d)](_0x1bf468(0x156)+_0x46bd83['message']),_0x46bd83[_0x1bf468(0x17d)]&&console[_0x1bf468(0x14d)](_0x1bf468(0x151)+_0x46bd83[_0x1bf468(0x17d)]),0x1;throw _0x46bd83;}}}export class WorkflowAttemptsCommand extends BaseCommand{[a32_0x14d260(0x16d)]=a32_0x14d260(0x127);['description']=a32_0x14d260(0x152);async[a32_0x14d260(0x12a)](_0x288c6d){const _0x35ce4f=a32_0x14d260,{options:_0x2c999f,args:_0x51433e,tdx:_0x4ea555}=_0x288c6d;let _0x4862f4,_0x2c7093;if(_0x51433e[0x0]){const _0x2f4e61=_0x51433e[0x0][_0x35ce4f(0x160)]('.');if(_0x2f4e61['length']===0x1)_0x4862f4=_0x2f4e61[0x0];else{if(_0x2f4e61[_0x35ce4f(0x15a)]===0x2)[_0x4862f4,_0x2c7093]=_0x2f4e61;else return console[_0x35ce4f(0x14d)](_0x35ce4f(0x188)),0x1;}}try{const _0x23ca76=_0x2c999f['includeRetried'];if(_0x2c999f[_0x35ce4f(0x1a0)]){if(_0x4862f4&&_0x2c7093)console[_0x35ce4f(0x14d)](_0x35ce4f(0x199)+_0x4862f4+'.'+_0x2c7093);else _0x4862f4&&console[_0x35ce4f(0x14d)](_0x35ce4f(0x177)+_0x4862f4);_0x23ca76&&console['error'](_0x35ce4f(0x11f));}const _0x50420c=await withSpinner(_0x35ce4f(0x13d),()=>_0x4ea555[_0x35ce4f(0x159)]['attempts']({'projectName':_0x4862f4,'workflowName':_0x2c7093,'includeRetried':_0x23ca76,'limit':_0x2c999f[_0x35ce4f(0x16b)]}),{'verbose':_0x2c999f[_0x35ce4f(0x1a0)]}),_0x330a7b=_0x50420c[_0x35ce4f(0x17e)];return console[_0x35ce4f(0x14d)](_0x35ce4f(0x16a)+_0x330a7b[_0x35ce4f(0x15a)]+_0x35ce4f(0x144)+(_0x330a7b[_0x35ce4f(0x15a)]!==0x1?'s':'')),await handleSDKOutput(_0x330a7b,_0x2c999f),0x0;}catch(_0x1668f2){if(_0x1668f2 instanceof SDKError)return console[_0x35ce4f(0x14d)](_0x35ce4f(0x156)+_0x1668f2[_0x35ce4f(0x15f)]),_0x1668f2[_0x35ce4f(0x17d)]&&console[_0x35ce4f(0x14d)](_0x35ce4f(0x151)+_0x1668f2[_0x35ce4f(0x17d)]),0x1;throw _0x1668f2;}}}export class WorkflowAttemptCommand extends BaseCommand{['name']='workflow:attempt';[a32_0x14d260(0x181)]=a32_0x14d260(0x1a5);async['execute'](_0x2d29eb){const _0x8e834b=a32_0x14d260,{options:_0x2ae73c,args:_0x32ecee,tdx:_0x30b04d}=_0x2d29eb,_0x12b0d1=_0x32ecee[0x0];if(!_0x12b0d1)return console['error'](_0x8e834b(0x179)),0x1;try{_0x2ae73c[_0x8e834b(0x1a0)]&&console['error'](_0x8e834b(0x174)+_0x12b0d1);const _0x2a0fb0=await withSpinner(_0x8e834b(0x161),()=>_0x30b04d[_0x8e834b(0x159)][_0x8e834b(0x129)](_0x12b0d1),{'verbose':_0x2ae73c[_0x8e834b(0x1a0)]}),_0xca79e8=_0x2a0fb0[_0x8e834b(0x17e)];return await handleSDKOutput([_0xca79e8],_0x2ae73c),0x0;}catch(_0x1d12b1){if(_0x1d12b1 instanceof SDKError)return console['error'](_0x8e834b(0x156)+_0x1d12b1[_0x8e834b(0x15f)]),_0x1d12b1[_0x8e834b(0x17d)]&&console[_0x8e834b(0x14d)](_0x8e834b(0x151)+_0x1d12b1['cause']),0x1;throw _0x1d12b1;}}}function a32_0x32ca(_0x2b498f,_0x4d0ceb){const _0x6a51b=a32_0x6a51();return a32_0x32ca=function(_0x32cab1,_0x514cd7){_0x32cab1=_0x32cab1-0x11d;let _0x4b469b=_0x6a51b[_0x32cab1];return _0x4b469b;},a32_0x32ca(_0x2b498f,_0x4d0ceb);}export class WorkflowTasksCommand extends BaseCommand{['name']=a32_0x14d260(0x153);[a32_0x14d260(0x181)]=a32_0x14d260(0x15d);async[a32_0x14d260(0x12a)](_0x519810){const _0x31d28a=a32_0x14d260,{options:_0x1bf5c0,args:_0x39edfe,tdx:_0x442e56}=_0x519810,_0x2163c4=_0x39edfe[0x0];if(!_0x2163c4)return console[_0x31d28a(0x14d)](_0x31d28a(0x179)),0x1;try{const _0x28865a=_0x1bf5c0['includeSubtasks'];_0x1bf5c0[_0x31d28a(0x1a0)]&&(console[_0x31d28a(0x14d)](_0x31d28a(0x174)+_0x2163c4),_0x28865a&&console['error']('Including\x20subtasks:\x20yes'));const _0x26ed70=await withSpinner(_0x31d28a(0x14e),()=>_0x442e56['workflow']['tasks'](_0x2163c4,_0x28865a||![]),{'verbose':_0x1bf5c0[_0x31d28a(0x1a0)]}),_0x454583=_0x26ed70[_0x31d28a(0x17e)];return console['error'](_0x31d28a(0x16a)+_0x454583['length']+_0x31d28a(0x1a6)+(_0x454583['length']!==0x1?'s':'')),await handleSDKOutput(_0x454583,_0x1bf5c0),0x0;}catch(_0x461377){if(_0x461377 instanceof SDKError)return console['error'](_0x31d28a(0x156)+_0x461377[_0x31d28a(0x15f)]),_0x461377[_0x31d28a(0x17d)]&&console['error'](_0x31d28a(0x151)+_0x461377[_0x31d28a(0x17d)]),0x1;throw _0x461377;}}}export class WorkflowLogsCommand extends BaseCommand{['name']=a32_0x14d260(0x135);['description']=a32_0x14d260(0x171);async['execute'](_0x190865){const _0x2ccacd=a32_0x14d260,{options:_0x200c1f,args:_0x1e31e5,tdx:_0x438c91}=_0x190865,_0x36e806=_0x1e31e5[0x0],_0x5ce958=_0x1e31e5[0x1];if(!_0x36e806||!_0x5ce958)return console[_0x2ccacd(0x14d)](_0x2ccacd(0x18b)),0x1;try{_0x200c1f[_0x2ccacd(0x1a0)]&&(console[_0x2ccacd(0x14d)]('Attempt\x20ID:\x20'+_0x36e806),console[_0x2ccacd(0x14d)](_0x2ccacd(0x187)+_0x5ce958));const _0x1acfcd=_0x200c1f[_0x2ccacd(0x148)],_0x55d894=await withSpinner(_0x2ccacd(0x180),()=>_0x438c91['workflow'][_0x2ccacd(0x178)](_0x36e806,_0x5ce958,{'offset':_0x1acfcd,'limit':_0x200c1f[_0x2ccacd(0x16b)]}),{'verbose':_0x200c1f['verbose']}),_0x100278=_0x55d894[_0x2ccacd(0x17e)];return console[_0x2ccacd(0x14d)](_0x2ccacd(0x16a)+_0x100278[_0x2ccacd(0x15a)]+_0x2ccacd(0x18d)+(_0x100278['length']!==0x1?_0x2ccacd(0x173):'y')),await handleSDKOutput(_0x100278,_0x200c1f),0x0;}catch(_0x48a79d){if(_0x48a79d instanceof SDKError)return console[_0x2ccacd(0x14d)]('Error:\x20'+_0x48a79d[_0x2ccacd(0x15f)]),_0x48a79d[_0x2ccacd(0x17d)]&&console[_0x2ccacd(0x14d)](_0x2ccacd(0x151)+_0x48a79d['cause']),0x1;throw _0x48a79d;}}}export class WorkflowKillCommand extends BaseCommand{[a32_0x14d260(0x16d)]='workflow:kill';['description']=a32_0x14d260(0x1a2);async[a32_0x14d260(0x12a)](_0x4f674c){const _0x550f67=a32_0x14d260,{options:_0x549541,args:_0x5c770e,tdx:_0x164ddd}=_0x4f674c,_0x18a002=_0x5c770e[0x0];if(!_0x18a002)return console[_0x550f67(0x14d)](_0x550f67(0x179)),0x1;try{const _0x3f7c9c=_0x549541[_0x550f67(0x192)];_0x549541['verbose']&&(console[_0x550f67(0x14d)](_0x550f67(0x174)+_0x18a002),_0x3f7c9c&&console[_0x550f67(0x14d)](_0x550f67(0x18a)+_0x3f7c9c));if(!_0x549541[_0x550f67(0x168)]){const _0x2781e1=await confirm(_0x550f67(0x11e)+_0x18a002+'?');if(!_0x2781e1)return console[_0x550f67(0x14d)]('Cancelled'),0x0;}const _0x490266=await withSpinner('Killing\x20attempt...',()=>_0x164ddd[_0x550f67(0x159)][_0x550f67(0x194)](_0x18a002,_0x3f7c9c),{'verbose':_0x549541[_0x550f67(0x1a0)]}),_0x4d774c=_0x490266[_0x550f67(0x17e)];return console['error']('✔\x20'+_0x4d774c),0x0;}catch(_0x303001){if(_0x303001 instanceof SDKError)return console['error'](_0x550f67(0x156)+_0x303001[_0x550f67(0x15f)]),_0x303001[_0x550f67(0x17d)]&&console[_0x550f67(0x14d)](_0x550f67(0x151)+_0x303001[_0x550f67(0x17d)]),0x1;throw _0x303001;}}}export class WorkflowRetryCommand extends BaseCommand{[a32_0x14d260(0x16d)]=a32_0x14d260(0x133);[a32_0x14d260(0x181)]=a32_0x14d260(0x15e);async[a32_0x14d260(0x12a)](_0x2afbd1){const _0x4d60dc=a32_0x14d260,{options:_0x18a230,args:_0x4a97e1,tdx:_0x5e015f}=_0x2afbd1,_0x92ae5a=_0x4a97e1[0x0];if(!_0x92ae5a)return console[_0x4d60dc(0x14d)](_0x4d60dc(0x1a4)),console['error'](_0x4d60dc(0x16e)),0x1;let _0x2baa83=![],_0x212bf=_0x92ae5a;if(_0x92ae5a[_0x4d60dc(0x19d)](_0x4d60dc(0x130)))_0x2baa83=!![],_0x212bf=_0x92ae5a['substring'](0x8);else{if(_0x92ae5a[_0x4d60dc(0x19d)](_0x4d60dc(0x158)))_0x2baa83=![],_0x212bf=_0x92ae5a[_0x4d60dc(0x136)](0x8);else return console[_0x4d60dc(0x14d)](_0x4d60dc(0x164)),console[_0x4d60dc(0x14d)](_0x4d60dc(0x16e)),0x1;}try{const _0x5e500d=_0x18a230[_0x4d60dc(0x147)],_0x2885ab=_0x18a230[_0x4d60dc(0x18e)],_0x16207b=_0x18a230[_0x4d60dc(0x17b)],_0x168ab1=_0x18a230[_0x4d60dc(0x131)];_0x18a230[_0x4d60dc(0x1a0)]&&(console[_0x4d60dc(0x14d)]('Target:\x20'+(_0x2baa83?_0x4d60dc(0x128):_0x4d60dc(0x129))+'\x20'+_0x212bf),_0x5e500d&&console[_0x4d60dc(0x14d)](_0x4d60dc(0x140)+_0x5e500d),_0x2885ab&&console[_0x4d60dc(0x14d)]('Resume\x20from:\x20'+_0x2885ab),_0x16207b&&console[_0x4d60dc(0x14d)](_0x4d60dc(0x184)+_0x16207b),_0x168ab1&&console[_0x4d60dc(0x14d)](_0x4d60dc(0x120)));let _0x45cfc2;if(_0x16207b)try{if(_0x16207b[_0x4d60dc(0x19d)]('@')){const _0x56e137=await import(_0x4d60dc(0x14a)),_0x413637=_0x16207b['substring'](0x1),_0x1aca7b=await _0x56e137[_0x4d60dc(0x12d)](_0x413637,_0x4d60dc(0x167));_0x45cfc2=JSON['parse'](_0x1aca7b);}else _0x45cfc2=JSON[_0x4d60dc(0x155)](_0x16207b);}catch{return console[_0x4d60dc(0x14d)](_0x4d60dc(0x138)),0x1;}if(!_0x18a230[_0x4d60dc(0x168)]){const _0x34aca4=await confirm('Are\x20you\x20sure\x20you\x20want\x20to\x20retry\x20'+(_0x2baa83?_0x4d60dc(0x128):_0x4d60dc(0x129))+'\x20'+_0x212bf+'?');if(!_0x34aca4)return console[_0x4d60dc(0x14d)](_0x4d60dc(0x17f)),0x0;}let _0x13de8b;_0x2baa83?_0x13de8b=await withSpinner(_0x4d60dc(0x13f),()=>_0x5e015f[_0x4d60dc(0x159)][_0x4d60dc(0x170)](_0x212bf,{'fromTask':_0x5e500d,'retryParams':_0x45cfc2}),{'verbose':_0x18a230[_0x4d60dc(0x1a0)]}):_0x13de8b=await withSpinner(_0x4d60dc(0x12e),()=>_0x5e015f[_0x4d60dc(0x159)][_0x4d60dc(0x196)](_0x212bf,{'resumeFrom':_0x2885ab,'retryParams':_0x45cfc2,'force':_0x168ab1}),{'verbose':_0x18a230['verbose']});const _0x334b16=_0x13de8b['data'];return console['error']('✔\x20Retry\x20started'),console[_0x4d60dc(0x14d)](_0x4d60dc(0x195)+_0x334b16[_0x4d60dc(0x186)]),console[_0x4d60dc(0x14d)](_0x4d60dc(0x176)+_0x334b16[_0x4d60dc(0x163)]),0x0;}catch(_0x549935){if(_0x549935 instanceof SDKError)return console[_0x4d60dc(0x14d)](_0x4d60dc(0x156)+_0x549935['message']),_0x549935[_0x4d60dc(0x17d)]&&console[_0x4d60dc(0x14d)](_0x4d60dc(0x151)+_0x549935[_0x4d60dc(0x17d)]),0x1;throw _0x549935;}}}export class WorkflowDownloadCommand extends BaseCommand{[a32_0x14d260(0x16d)]=a32_0x14d260(0x145);[a32_0x14d260(0x181)]=a32_0x14d260(0x150);async[a32_0x14d260(0x12a)](_0x2b75a9){const _0x16b1ae=a32_0x14d260,{options:_0x13ab24,args:_0x481705,tdx:_0x4a0767}=_0x2b75a9,_0x476b85=_0x481705[0x0],_0x52d2a1=_0x481705[0x1]||'.';if(!_0x476b85)return console[_0x16b1ae(0x14d)](_0x16b1ae(0x190)),console[_0x16b1ae(0x14d)](_0x16b1ae(0x18f)),0x1;const _0x3982c6=_0x13ab24[_0x16b1ae(0x185)];_0x13ab24[_0x16b1ae(0x1a0)]&&(console[_0x16b1ae(0x14d)]('Project:\x20'+_0x476b85),console['error'](_0x16b1ae(0x19b)+_0x52d2a1),_0x3982c6&&console['error'](_0x16b1ae(0x183)+_0x3982c6));const _0x2b0ad9=await withSpinner(_0x16b1ae(0x143)+_0x476b85+_0x16b1ae(0x154),()=>_0x4a0767[_0x16b1ae(0x159)][_0x16b1ae(0x146)](_0x476b85,_0x52d2a1,{'revision':_0x3982c6}),{'verbose':_0x13ab24[_0x16b1ae(0x1a0)]}),_0x207f9=_0x2b0ad9['data'];return console[_0x16b1ae(0x14d)](_0x16b1ae(0x1a3)+_0x207f9[_0x16b1ae(0x198)]),console[_0x16b1ae(0x14d)](_0x16b1ae(0x123)+_0x207f9[_0x16b1ae(0x185)]),console['error'](_0x16b1ae(0x162)+_0x207f9[_0x16b1ae(0x13b)]),console['error'](_0x16b1ae(0x189)+_0x52d2a1+'/'+_0x207f9[_0x16b1ae(0x198)]),0x0;}}function a32_0x6a51(){const _0x9babf0=['attempt:','workflow','length','Project\x20name:\x20','3381836hivtLD','Show\x20tasks\x20for\x20an\x20attempt','Retry\x20a\x20session\x20or\x20attempt','message','split','Getting\x20attempt\x20details...','\x20\x20Files\x20extracted:\x20','sessionId','Error:\x20Target\x20must\x20be\x20prefixed\x20with\x20\x22session:\x22\x20or\x20\x22attempt:\x22','workflow:workflows','workflow:delete','utf-8','yes','workflow:projects','✔\x20Found\x20','limit','3614VIZfPv','name','Usage:\x20workflow\x20retry\x20session:<id>\x20or\x20workflow\x20retry\x20attempt:<id>','7VVWvYH','retrySession','Show\x20logs\x20for\x20a\x20specific\x20task','workflows','ies','Attempt\x20ID:\x20','414GjNBoF','\x20\x20Session\x20ID:\x20','Filter:\x20project=','logs','Error:\x20Attempt\x20ID\x20is\x20required','✔\x20Pushed\x20','params','skipValidation','cause','data','Cancelled','Getting\x20task\x20logs...','description','status','Revision:\x20','Params:\x20','revision','attemptId','Task\x20name:\x20','Error:\x20Invalid\x20pattern.\x20Use\x20format:\x20project\x20or\x20project.workflow','\x20\x20Location:\x20','Reason:\x20','Error:\x20Attempt\x20ID\x20and\x20task\x20name\x20are\x20required','Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20project\x20\x22','\x20log\x20entr','resumeFrom','Usage:\x20workflow:download\x20<project-name>\x20[output-dir]','Error:\x20Project\x20name\x20is\x20required','List\x20workflow\x20execution\x20sessions','reason','isDirectory','kill','\x20\x20New\x20attempt\x20ID:\x20','retryAttempt','Project\x20directory:\x20','projectName','Filter:\x20','5MwTKrs','Output\x20directory:\x20','Project:\x20','startsWith','Push\x20workflow\x20project\x20to\x20Treasure\x20Data','6816820OStRLv','verbose','projectId','Kill\x20a\x20running\x20attempt','✔\x20Downloaded\x20','Error:\x20Session\x20ID\x20or\x20attempt\x20ID\x20is\x20required','Show\x20specific\x20attempt\x20details','\x20task','\x22?\x20This\x20cannot\x20be\x20undone.','Are\x20you\x20sure\x20you\x20want\x20to\x20kill\x20attempt\x20','Include\x20retried:\x20yes','Force:\x20yes','\x20session','Project\x20filter:\x20','\x20\x20Revision:\x20','workflow:sessions','push','Pushing\x20workflow\x20project...','workflow:attempts','session','attempt','execute','from','\x20is\x20not\x20a\x20directory','readFile','Retrying\x20attempt...','List\x20all\x20workflow\x20projects','session:','force','\x20project','workflow:retry','\x20\x20Project\x20ID:\x20','workflow:logs','substring','27616OyDNFH','Error:\x20Invalid\x20JSON\x20in\x20--params','delete','2694846onEIcq','filesExtracted','Listing\x20workflow\x20projects...','Listing\x20workflow\x20attempts...','33clwqhm','Retrying\x20session...','From\x20task:\x20','sessions','4244442LsKpuh','Downloading\x20project\x20','\x20attempt','workflow:download','download','fromTask','offset','Delete\x20workflow\x20project\x20from\x20Treasure\x20Data','fs/promises','318097aWEGoP','projects','error','Getting\x20attempt\x20tasks...','Deleting\x20project\x20','Download\x20workflow\x20project\x20from\x20Treasure\x20Data','\x20\x20Cause:\x20','List\x20workflow\x20attempts','workflow:tasks','...','parse','Error:\x20','Pattern:\x20'];a32_0x6a51=function(){return _0x9babf0;};return a32_0x6a51();}export class WorkflowPushCommand extends BaseCommand{[a32_0x14d260(0x16d)]='workflow:push';[a32_0x14d260(0x181)]=a32_0x14d260(0x19e);async[a32_0x14d260(0x12a)](_0x381b4d){const _0xdf95a4=a32_0x14d260,{options:_0x269cc1,args:_0xefcf54,tdx:_0x4da58a}=_0x381b4d;let _0x1dbc8e='.',_0x3d5229=_0x269cc1[_0xdf95a4(0x16d)];if(_0xefcf54[0x0]){const {promises:_0x544860}=await import('fs');try{const _0x54f271=await _0x544860['stat'](_0xefcf54[0x0]);if(_0x54f271[_0xdf95a4(0x193)]())_0x1dbc8e=_0xefcf54[0x0];else return console[_0xdf95a4(0x14d)](_0xdf95a4(0x156)+_0xefcf54[0x0]+_0xdf95a4(0x12c)),0x1;}catch{_0x3d5229=_0xefcf54[0x0],_0x1dbc8e='.';}}const _0x54b423=_0x269cc1[_0xdf95a4(0x185)],_0x35e4cf=_0x269cc1[_0xdf95a4(0x17c)];_0x269cc1[_0xdf95a4(0x1a0)]&&(console['error'](_0xdf95a4(0x197)+_0x1dbc8e),_0x3d5229&&console[_0xdf95a4(0x14d)](_0xdf95a4(0x15b)+_0x3d5229),_0x54b423&&console[_0xdf95a4(0x14d)](_0xdf95a4(0x183)+_0x54b423),_0x35e4cf&&console[_0xdf95a4(0x14d)]('Validation:\x20skipped'));const _0x17fa43=await withSpinner(_0xdf95a4(0x126),()=>_0x4da58a[_0xdf95a4(0x159)][_0xdf95a4(0x125)](_0x1dbc8e,{'projectName':_0x3d5229,'revision':_0x54b423,'skipValidation':_0x35e4cf}),{'verbose':_0x269cc1[_0xdf95a4(0x1a0)]}),_0x357ef9=_0x17fa43[_0xdf95a4(0x17e)];return console[_0xdf95a4(0x14d)](_0xdf95a4(0x17a)+_0x357ef9['projectName']),console['error'](_0xdf95a4(0x134)+_0x357ef9['projectId']),console[_0xdf95a4(0x14d)](_0xdf95a4(0x123)+_0x357ef9[_0xdf95a4(0x185)]),0x0;}}export class WorkflowDeleteCommand extends BaseCommand{[a32_0x14d260(0x16d)]=a32_0x14d260(0x166);[a32_0x14d260(0x181)]=a32_0x14d260(0x149);async[a32_0x14d260(0x12a)](_0x3264d2){const _0x46b1b1=a32_0x14d260,{options:_0xdb9d76,args:_0x323c73,tdx:_0x4d8320}=_0x3264d2,_0x1ea421=_0x323c73[0x0];if(!_0x1ea421)return console[_0x46b1b1(0x14d)]('Error:\x20Project\x20name\x20or\x20ID\x20is\x20required'),console['error']('Usage:\x20workflow:delete\x20<project-name-or-id>'),0x1;_0xdb9d76[_0x46b1b1(0x1a0)]&&console['error'](_0x46b1b1(0x19c)+_0x1ea421);if(!_0xdb9d76[_0x46b1b1(0x168)]){const _0x30244d=await confirm(_0x46b1b1(0x18c)+_0x1ea421+_0x46b1b1(0x11d));if(!_0x30244d)return console[_0x46b1b1(0x14d)](_0x46b1b1(0x17f)),0x0;}const _0x2a0664=await withSpinner(_0x46b1b1(0x14f)+_0x1ea421+'...',()=>_0x4d8320['workflow'][_0x46b1b1(0x139)](_0x1ea421),{'verbose':_0xdb9d76['verbose']}),_0x548481=_0x2a0664[_0x46b1b1(0x17e)];return console[_0x46b1b1(0x14d)]('✔\x20Deleted\x20project\x20'+_0x548481[_0x46b1b1(0x198)]),console[_0x46b1b1(0x14d)]('\x20\x20Project\x20ID:\x20'+_0x548481[_0x46b1b1(0x1a1)]),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(_0x4b96e4,_0x325107){const _0x176a19=a33_0x3e46,_0x8239fa=_0x4b96e4();while(!![]){try{const _0x75ff14=-parseInt(_0x176a19(0x8d))/0x1*(-parseInt(_0x176a19(0x9a))/0x2)+parseInt(_0x176a19(0x99))/0x3+parseInt(_0x176a19(0x91))/0x4+parseInt(_0x176a19(0x8e))/0x5*(parseInt(_0x176a19(0x97))/0x6)+parseInt(_0x176a19(0x8c))/0x7+parseInt(_0x176a19(0x93))/0x8*(-parseInt(_0x176a19(0x9d))/0x9)+-parseInt(_0x176a19(0x8f))/0xa*(parseInt(_0x176a19(0xa0))/0xb);if(_0x75ff14===_0x325107)break;else _0x8239fa['push'](_0x8239fa['shift']());}catch(_0x33d57b){_0x8239fa['push'](_0x8239fa['shift']());}}}(a33_0x2638,0x585a2));import{platform}from'os';import{readFileSync}from'fs';import{fileURLToPath}from'url';import{dirname,join}from'path';function a33_0x3e46(_0xc55067,_0x22f569){const _0x26385e=a33_0x2638();return a33_0x3e46=function(_0x3e462c,_0x513fc5){_0x3e462c=_0x3e462c-0x8c;let _0x2857ce=_0x26385e[_0x3e462c];return _0x2857ce;},a33_0x3e46(_0xc55067,_0x22f569);}import{getAPIKey}from'./config.js';export function getVersion(){const _0x4c14ff=a33_0x3e46;try{const _0x2a849f=fileURLToPath(import.meta[_0x4c14ff(0x98)]),_0x662b57=dirname(_0x2a849f),_0xce3d34=join(_0x662b57,'../../package.json'),_0xf95661=JSON['parse'](readFileSync(_0xce3d34,_0x4c14ff(0x95)));return _0xf95661[_0x4c14ff(0x9e)];}catch{return'0.0.0';}}export function getUserAgent(){const _0x371cbe=a33_0x3e46,_0x34e020=getVersion(),_0x590e2c=platform(),_0xddb1ad=process['version'][_0x371cbe(0x9f)]('v','');return _0x371cbe(0x96)+_0x34e020+'\x20('+_0x590e2c+';\x20node/'+_0xddb1ad+')';}function a33_0x2638(){const _0x207be7=['519545IYVqeV','10JiSFef','X-Trino-User','1739524PrWEUU','tdx','8RfuBIk','length','utf-8','tdx/','6CAXURW','url','996786UHoRIB','994NfXOHl','TD1\x20','entries','6345225bXeGNq','version','replace','5190944hOrvyi','Authorization','1414546HzGfem','937yscVMb'];a33_0x2638=function(){return _0x207be7;};return a33_0x2638();}export function getAuthHeaders(_0x209569,_0x811d65){const _0x4a3713=a33_0x3e46,_0x35b411=getVersion(),_0x24ed82={'User-Agent':getUserAgent(),'X-TD-Client':_0x4a3713(0x92),'X-TD-Client-Version':_0x35b411};return _0x811d65&&(_0x24ed82[_0x4a3713(0xa1)]=_0x4a3713(0x9b)+_0x811d65),_0x24ed82;}export function toHeaderRecord(_0x176e69){const _0x56519e=a33_0x3e46,_0x427058={};for(const [_0x19ce89,_0x5ec4ad]of Object[_0x56519e(0x9c)](_0x176e69)){_0x5ec4ad!==undefined&&(_0x427058[_0x19ce89]=_0x5ec4ad);}return _0x427058;}export function getTrinoHeaders(_0x207587,_0x4fa5ef){const _0x308e3a=a33_0x3e46,_0x1eeca7=getAuthHeaders(_0x207587,_0x4fa5ef),_0x26117f=toHeaderRecord(_0x1eeca7);return delete _0x26117f[_0x308e3a(0xa1)],_0x4fa5ef&&(_0x26117f[_0x308e3a(0x90)]=_0x4fa5ef),_0x26117f;}export function hasAPIKey(_0x1952bd){const _0x1f5624=a33_0x3e46,_0x5d4dd2=getAPIKey(_0x1952bd);return _0x5d4dd2!==undefined&&_0x5d4dd2[_0x1f5624(0x94)]>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(_0x26d1ed,_0x3939fa){const _0x1604a9=a34_0x4b54,_0x13a941=_0x26d1ed();while(!![]){try{const _0x17e8db=parseInt(_0x1604a9(0x8e))/0x1*(-parseInt(_0x1604a9(0xb0))/0x2)+-parseInt(_0x1604a9(0xb8))/0x3*(parseInt(_0x1604a9(0xb9))/0x4)+parseInt(_0x1604a9(0xb6))/0x5+parseInt(_0x1604a9(0x8c))/0x6+parseInt(_0x1604a9(0x99))/0x7+-parseInt(_0x1604a9(0xab))/0x8*(parseInt(_0x1604a9(0xaf))/0x9)+-parseInt(_0x1604a9(0x9b))/0xa*(-parseInt(_0x1604a9(0xaa))/0xb);if(_0x17e8db===_0x3939fa)break;else _0x13a941['push'](_0x13a941['shift']());}catch(_0x48b9be){_0x13a941['push'](_0x13a941['shift']());}}}(a34_0x4f37,0xb735c));import{homedir}from'os';function a34_0x4b54(_0x43ae68,_0x1d0fc7){const _0x4f372a=a34_0x4f37();return a34_0x4b54=function(_0x4b5439,_0x18252){_0x4b5439=_0x4b5439-0x85;let _0x1a6990=_0x4f372a[_0x4b5439];return _0x1a6990;},a34_0x4b54(_0x43ae68,_0x1d0fc7);}import{join}from'path';function a34_0x4f37(){const _0x4e4a90=['TD_API_KEY','Warning:\x20Failed\x20to\x20read\x20config\x20file\x20','split','.config','parse','10383779IgVAAJ','entries','41730DhSxct','Warning:\x20Unknown\x20site\x20\x27','tdx','ap02','env:\x20','endsWith','env:\x20TD_API_KEY','toUpperCase','Warning:\x20Failed\x20to\x20load\x20','warn','map','us01','env','slice','profile:\x20','3729tuOtgs','9723272OAcrOk','stg-us01','trim','TD_API_KEY_','9NFFEhJ','882298YOedIK','eu01','error','readFileSync','existsSync','jp01','2292040RURcTn','apiKeys','92985oIdGRT','96GNvtIz','Warning:\x20Failed\x20to\x20cache\x20LLM\x20project\x20name:','\x20(TD_API_KEY)','.cache','global:\x20','join','profile','startsWith','profiles','tdx.json','utf-8','llm_default_project','includes','\x27,\x20defaulting\x20to\x20us01','stg-jp01','4060272TPvuyo','replace','3mMETLv','TDX_CONFIG_DIR','dev-eu01','match','dev-us01','ap03'];a34_0x4f37=function(){return _0x4e4a90;};return a34_0x4f37();}import{existsSync,readFileSync,writeFileSync,mkdirSync}from'fs';import*as a34_0xcbe5ac from'node:fs';import*as a34_0xe58083 from'node:path';import{SITE_ALIASES}from'../types/index.js';import{validateSecureFilePermissions}from'../utils/file-permissions.js';export function getConfigDir(){const _0x2feb8a=a34_0x4b54;return process['env'][_0x2feb8a(0x8f)]||join(homedir(),_0x2feb8a(0x97),_0x2feb8a(0x9d));}export function getConfigFile(){return join(getConfigDir(),'.env');}export function getCacheDir(){const _0x4953a4=a34_0x4b54;return process[_0x4953a4(0xa7)]['TDX_CACHE_DIR']||join(homedir(),_0x4953a4(0xbc),_0x4953a4(0x9d));}export function getLLMProjectCacheFile(){const _0x36fa5c=a34_0x4b54;return join(getCacheDir(),_0x36fa5c(0x88));}export function readCachedLLMProject(){const _0xed4522=a34_0x4b54;try{const _0x29d4aa=getLLMProjectCacheFile();if(!existsSync(_0x29d4aa))return null;return readFileSync(_0x29d4aa,_0xed4522(0x87))[_0xed4522(0xad)]();}catch{return null;}}export function writeCachedLLMProject(_0x5aad16){const _0x384102=a34_0x4b54;try{const _0x5ba385=getCacheDir(),_0x290fe0=getLLMProjectCacheFile();!existsSync(_0x5ba385)&&mkdirSync(_0x5ba385,{'recursive':!![]}),writeFileSync(_0x290fe0,_0x5aad16,_0x384102(0x87));}catch(_0x3d2dcf){console[_0x384102(0xb2)](_0x384102(0xba),_0x3d2dcf);}}export function parseEnvFile(_0x3464fc){const _0x3f31d7=a34_0x4b54,_0x19a1a0={};for(const _0x4525df of _0x3464fc[_0x3f31d7(0x96)]('\x0a')){const _0x32cf24=_0x4525df[_0x3f31d7(0xad)]();if(!_0x32cf24||_0x32cf24['startsWith']('#'))continue;const _0x13b3e4=_0x32cf24[_0x3f31d7(0x91)](/^([^=]+)=(.*)$/);if(_0x13b3e4){const _0x533ef5=_0x13b3e4[0x1][_0x3f31d7(0xad)]();let _0x180b74=_0x13b3e4[0x2][_0x3f31d7(0xad)]();(_0x180b74[_0x3f31d7(0xc0)]('\x22')&&_0x180b74[_0x3f31d7(0xa0)]('\x22')||_0x180b74[_0x3f31d7(0xc0)]('\x27')&&_0x180b74['endsWith']('\x27'))&&(_0x180b74=_0x180b74[_0x3f31d7(0xa8)](0x1,-0x1)),_0x19a1a0[_0x533ef5]=_0x180b74;}}return _0x19a1a0;}export function readUserConfig(){const _0x3c115a=a34_0x4b54,_0x552406=getConfigFile();if(!existsSync(_0x552406))return{};try{const _0x5aab57=readFileSync(_0x552406,'utf-8');return parseEnvFile(_0x5aab57);}catch(_0x49d29a){return console['warn'](_0x3c115a(0x95)+_0x552406+':',_0x49d29a),{};}}export function resolveSite(_0x5650b4){const _0x435b7c=a34_0x4b54,_0xb3ce36=[_0x435b7c(0xa6),_0x435b7c(0xb5),_0x435b7c(0xb1),'ap02','ap03','dev-us01',_0x435b7c(0x90),_0x435b7c(0xac),_0x435b7c(0x8b),'stg-ap03'];if(_0xb3ce36[_0x435b7c(0x89)](_0x5650b4))return _0x5650b4;if(_0x5650b4 in SITE_ALIASES)return SITE_ALIASES[_0x5650b4];return console[_0x435b7c(0xa4)](_0x435b7c(0x9c)+_0x5650b4+_0x435b7c(0x8a)),'us01';}let cachedUserConfig=null;export function loadUserConfigOnce(){return cachedUserConfig===null&&(cachedUserConfig=readUserConfig()),cachedUserConfig;}export function clearConfigCache(){cachedUserConfig=null;}export function getAPIKey(_0x320067,_0x3e1e06){const _0x226d71=a34_0x4b54,_0xcfe5e1=_0x320067[_0x226d71(0xa2)]()[_0x226d71(0x8d)](/-/g,'_'),_0x30ced7='TD_API_KEY_'+_0xcfe5e1;if(process[_0x226d71(0xa7)][_0x30ced7])return process[_0x226d71(0xa7)][_0x30ced7];if(process[_0x226d71(0xa7)][_0x226d71(0x94)])return process[_0x226d71(0xa7)][_0x226d71(0x94)];const _0x2fc6c2=_0x3e1e06||getActiveProfileName();if(_0x2fc6c2){const _0x13fee3=loadProfileEnv(_0x2fc6c2);if(_0x13fee3){if(_0x13fee3[_0x30ced7])return _0x13fee3[_0x30ced7];if(_0x13fee3['TD_API_KEY'])return _0x13fee3[_0x226d71(0x94)];}}const _0x503dea=loadUserConfigOnce();if(_0x503dea[_0x30ced7])return _0x503dea[_0x30ced7];if(_0x503dea['TD_API_KEY'])return _0x503dea['TD_API_KEY'];return undefined;}export function getAPIKeySource(_0x535ccb,_0x2a0b69){const _0x123d1b=a34_0x4b54,_0x34f997=_0x123d1b(0xae)+_0x535ccb[_0x123d1b(0xa2)]()[_0x123d1b(0x8d)](/-/g,'_');if(process[_0x123d1b(0xa7)][_0x34f997])return _0x123d1b(0x9f)+_0x34f997;if(process[_0x123d1b(0xa7)][_0x123d1b(0x94)])return _0x123d1b(0xa1);const _0x467c3f=_0x2a0b69||getActiveProfileName();if(_0x467c3f){const _0x2a585a=loadProfileEnv(_0x467c3f);if(_0x2a585a){if(_0x2a585a[_0x34f997])return _0x123d1b(0xa9)+_0x467c3f+'\x20('+_0x34f997+')';if(_0x2a585a[_0x123d1b(0x94)])return _0x123d1b(0xa9)+_0x467c3f+_0x123d1b(0xbb);}}const _0xbe4ced=loadUserConfigOnce(),_0x4e73fc=getConfigFile();if(_0xbe4ced[_0x34f997])return'global:\x20'+_0x4e73fc+'\x20('+_0x34f997+')';if(_0xbe4ced[_0x123d1b(0x94)])return _0x123d1b(0xbd)+_0x4e73fc+_0x123d1b(0xbb);return null;}function loadProfileEnv(_0x56da9e){const _0x427278=a34_0x4b54,_0x27695a=a34_0xe58083[_0x427278(0xbe)](getConfigDir(),'.env.'+_0x56da9e);if(a34_0xcbe5ac[_0x427278(0xb4)](_0x27695a)){validateSecureFilePermissions(_0x27695a);try{const _0x807231=a34_0xcbe5ac['readFileSync'](_0x27695a,'utf-8');return parseEnvFile(_0x807231);}catch(_0x3a2d72){console['warn'](_0x427278(0xa3)+_0x27695a+':\x20'+_0x3a2d72);}}const _0x52345d=a34_0xe58083[_0x427278(0xbe)](getConfigDir(),_0x427278(0x85),_0x56da9e,'.env');if(a34_0xcbe5ac[_0x427278(0xb4)](_0x52345d)){validateSecureFilePermissions(_0x52345d);try{const _0x4010ea=a34_0xcbe5ac[_0x427278(0xb3)](_0x52345d,_0x427278(0x87));return parseEnvFile(_0x4010ea);}catch(_0x361df2){return console[_0x427278(0xa4)]('Warning:\x20Failed\x20to\x20load\x20'+_0x52345d+':\x20'+_0x361df2),null;}}return null;}function getActiveProfileName(){const _0x1d4fae=a34_0x4b54,_0x55e0ad=a34_0xe58083['join'](getConfigDir(),_0x1d4fae(0x86));if(!a34_0xcbe5ac[_0x1d4fae(0xb4)](_0x55e0ad))return null;try{const _0x538044=a34_0xcbe5ac[_0x1d4fae(0xb3)](_0x55e0ad,_0x1d4fae(0x87)),_0x201868=JSON[_0x1d4fae(0x98)](_0x538044);return _0x201868[_0x1d4fae(0xbf)]||null;}catch{return null;}}export function saveAPIKey(_0x46dbea,_0x3415b6){const _0x4823db=a34_0x4b54,_0x45ea67=getConfigDir(),_0x288858=getConfigFile();!existsSync(_0x45ea67)&&mkdirSync(_0x45ea67,{'recursive':!![],'mode':0x1c0});const _0x155f0e=readUserConfig(),_0xf15097=_0x46dbea[_0x4823db(0xa2)]()['replace'](/-/g,'_');_0x155f0e[_0x4823db(0xae)+_0xf15097]=_0x3415b6;const _0x28ede2=Object[_0x4823db(0x9a)](_0x155f0e)[_0x4823db(0xa5)](([_0x564446,_0x9718ff])=>_0x564446+'='+_0x9718ff);writeFileSync(_0x288858,_0x28ede2['join']('\x0a')+'\x0a',{'mode':0x180});}export function loadConfig(){const _0x484fa4=a34_0x4b54,_0x8ae208={'apiKeys':{},'defaultSite':'us01'},_0x1ac706=[_0x484fa4(0xa6),_0x484fa4(0xb5),'eu01',_0x484fa4(0x9e),_0x484fa4(0x93),_0x484fa4(0x92),_0x484fa4(0x90),_0x484fa4(0xac),_0x484fa4(0x8b),'stg-ap03'];for(const _0x4b96ae of _0x1ac706){const _0x1ff93d=getAPIKey(_0x4b96ae);_0x1ff93d&&(_0x8ae208[_0x484fa4(0xb7)][_0x4b96ae]=_0x1ff93d);}return _0x8ae208;}
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;}