@treasuredata/tdx 0.2.1 → 0.2.2

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 (87) 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.js +1 -1
  6. package/dist/client/rate-limiter.js +1 -1
  7. package/dist/client/td-client.js +1 -1
  8. package/dist/client/trino-client.js +1 -1
  9. package/dist/client/workflow-client.js +1 -1
  10. package/dist/commands/activations.js +1 -1
  11. package/dist/commands/api-command.js +1 -1
  12. package/dist/commands/chat-command.js +1 -1
  13. package/dist/commands/claude-command.js +1 -1
  14. package/dist/commands/command.js +1 -1
  15. package/dist/commands/context-command.js +1 -1
  16. package/dist/commands/databases.js +1 -1
  17. package/dist/commands/describe.js +1 -1
  18. package/dist/commands/job-command.js +1 -1
  19. package/dist/commands/llm-command.js +1 -1
  20. package/dist/commands/llm-proxy.js +1 -1
  21. package/dist/commands/parent-segment-command.js +1 -1
  22. package/dist/commands/profiles-command.js +1 -1
  23. package/dist/commands/query-command.js +1 -1
  24. package/dist/commands/segment-command.js +1 -1
  25. package/dist/commands/segment-create-command.js +1 -1
  26. package/dist/commands/segment-fields-command.js +1 -1
  27. package/dist/commands/segment-pwd-command.js +1 -1
  28. package/dist/commands/segment-update-command.js +1 -1
  29. package/dist/commands/segment-use-command.js +1 -1
  30. package/dist/commands/segments.js +1 -1
  31. package/dist/commands/show.js +1 -1
  32. package/dist/commands/tables.js +1 -1
  33. package/dist/commands/use-command.js +1 -1
  34. package/dist/commands/workflow-command.js +1 -1
  35. package/dist/core/auth.js +1 -1
  36. package/dist/core/config.js +1 -1
  37. package/dist/core/global-context.js +1 -1
  38. package/dist/core/profile.js +1 -1
  39. package/dist/core/project-config.js +1 -1
  40. package/dist/core/session.js +1 -1
  41. package/dist/index.js +1 -1
  42. package/dist/proxy/anthropic-adapter.d.ts +19 -3
  43. package/dist/proxy/anthropic-adapter.d.ts.map +1 -1
  44. package/dist/proxy/anthropic-adapter.js +1 -1
  45. package/dist/proxy/anthropic-adapter.js.map +1 -1
  46. package/dist/proxy/server.d.ts.map +1 -1
  47. package/dist/proxy/server.js +1 -1
  48. package/dist/proxy/server.js.map +1 -1
  49. package/dist/proxy/session-cache.js +1 -1
  50. package/dist/sdk/api.js +1 -1
  51. package/dist/sdk/database.js +1 -1
  52. package/dist/sdk/errors.js +1 -1
  53. package/dist/sdk/index.js +1 -1
  54. package/dist/sdk/job.js +1 -1
  55. package/dist/sdk/llm.js +1 -1
  56. package/dist/sdk/query.js +1 -1
  57. package/dist/sdk/segment.js +1 -1
  58. package/dist/sdk/table.js +1 -1
  59. package/dist/sdk/workflow.js +1 -1
  60. package/dist/types/endpoints.js +1 -1
  61. package/dist/types/index.js +1 -1
  62. package/dist/utils/agent-ref-parser.js +1 -1
  63. package/dist/utils/chat-cache.js +1 -1
  64. package/dist/utils/colors.js +1 -1
  65. package/dist/utils/command-output.js +1 -1
  66. package/dist/utils/constants.js +1 -1
  67. package/dist/utils/file-permissions.js +1 -1
  68. package/dist/utils/format-detector.js +1 -1
  69. package/dist/utils/formatters.js +1 -1
  70. package/dist/utils/json-loader.js +1 -1
  71. package/dist/utils/model-aliases.js +1 -1
  72. package/dist/utils/option-validation.js +1 -1
  73. package/dist/utils/port.js +1 -1
  74. package/dist/utils/process.js +1 -1
  75. package/dist/utils/prompt.js +1 -1
  76. package/dist/utils/segment-path-parser.js +1 -1
  77. package/dist/utils/segment-ref-parser.js +1 -1
  78. package/dist/utils/spinner.js +1 -1
  79. package/dist/utils/sql-parser.js +1 -1
  80. package/dist/utils/sse-parser.js +1 -1
  81. package/dist/utils/string-utils.js +1 -1
  82. package/dist/utils/table-ref-parser.js +1 -1
  83. package/dist/utils/tdx-logger.js +1 -1
  84. package/dist/utils/tree-formatter.js +1 -1
  85. package/dist/utils/version-check.js +1 -1
  86. package/dist/utils/workflow-utils.js +1 -1
  87. package/package.json +1 -1
@@ -1 +1 @@
1
- const a27_0x199f86=a27_0x49f3;(function(_0x16ee52,_0x3395c9){const _0x40f2c0=a27_0x49f3,_0x3e25ba=_0x16ee52();while(!![]){try{const _0x37b2a9=parseInt(_0x40f2c0(0xb2))/0x1+-parseInt(_0x40f2c0(0x9c))/0x2*(-parseInt(_0x40f2c0(0xc8))/0x3)+parseInt(_0x40f2c0(0xa4))/0x4+parseInt(_0x40f2c0(0xc7))/0x5*(-parseInt(_0x40f2c0(0xcb))/0x6)+parseInt(_0x40f2c0(0xb5))/0x7+-parseInt(_0x40f2c0(0xa8))/0x8*(-parseInt(_0x40f2c0(0xb7))/0x9)+parseInt(_0x40f2c0(0xb9))/0xa*(-parseInt(_0x40f2c0(0xb8))/0xb);if(_0x37b2a9===_0x3395c9)break;else _0x3e25ba['push'](_0x3e25ba['shift']());}catch(_0x3f737e){_0x3e25ba['push'](_0x3e25ba['shift']());}}}(a27_0x6cf8,0x9faaa));function a27_0x6cf8(){const _0x22a036=['Resolved\x20path\x20type:\x20','Parent\x20ID:\x20','Context\x20can\x20only\x20be\x20set\x20to\x20a\x20parent\x20segment\x20or\x20folder.','resolvePathToResource','Use\x20an\x20absolute\x20path\x20or\x20set\x20context\x20with:\x20tdx\x20segment\x20use\x20<parent_name>','456755wNZidd','3lCxspZ','Error:\x20No\x20context\x20set.\x20Cannot\x20use\x20relative\x20path.','segment','30prGlTH','session','name','split','Folder\x20ID:\x20','754346wuMTTw','length','\x20\x20tdx\x20segment\x20use\x20\x22My\x20Audience\x22','Resolved\x20relative\x20path\x20to:\x20','Use:\x20tdx\x20segment\x20use\x20','description','Error:\x20Path\x20is\x20required','type','3590956hkdokh','Site:\x20','isAbsolute','\x20\x20tdx\x20segment\x20use\x20/\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Clear\x20context','8HTAqre','join','log','data','segmentPath','error','Usage:\x20tdx\x20segment\x20use\x20<path>','Use\x20\x22tdx\x20segment\x20pwd\x22\x20to\x20show\x20current\x20context','execute','\x20\x20tdx\x20segment\x20use\x20\x22My\x20Audience/Marketing\x22','709364LYVxnK','Set\x20current\x20segment/folder\x20context\x20for\x20navigation','segments','3085012JwjOzf','Context\x20cleared.\x20Back\x20to\x20root.','7914591popLnt','446853BPcUTW','540QdtCZi','segment:use','fullPath','parentId','Error:\x20Cannot\x20set\x20context\x20to\x20a\x20segment.','folderPath','Use\x20\x22tdx\x20segments\x22\x20to\x20list\x20contents\x20in\x20this\x20context','verbose','folderId'];a27_0x6cf8=function(){return _0x22a036;};return a27_0x6cf8();}import{BaseCommand}from'./command.js';import{saveSessionContext}from'../core/session.js';import{withSpinner}from'../utils/spinner.js';import{parsePath,normalizePath}from'../utils/segment-path-parser.js';function a27_0x49f3(_0x49d9cb,_0x3a84b6){const _0x6cf8fa=a27_0x6cf8();return a27_0x49f3=function(_0x49f359,_0x5d9924){_0x49f359=_0x49f359-0x99;let _0x128c5f=_0x6cf8fa[_0x49f359];return _0x128c5f;},a27_0x49f3(_0x49d9cb,_0x3a84b6);}export class SegmentUseCommand extends BaseCommand{[a27_0x199f86(0x99)]=a27_0x199f86(0xba);[a27_0x199f86(0xa1)]=a27_0x199f86(0xb3);async[a27_0x199f86(0xb0)](_0x47d91a){const _0x1160b7=a27_0x199f86,{options:_0x1195d1,args:_0x39b62d,tdx:_0x4e8ef3}=_0x47d91a;if(_0x39b62d[_0x1160b7(0x9d)]===0x0)return console['error'](_0x1160b7(0xa2)),console[_0x1160b7(0xad)](_0x1160b7(0xae)),console[_0x1160b7(0xad)]('Examples:'),console[_0x1160b7(0xad)](_0x1160b7(0x9e)),console[_0x1160b7(0xad)](_0x1160b7(0xb1)),console['error'](_0x1160b7(0xa7)),console[_0x1160b7(0xad)]('\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 _0xd8e5c=_0x39b62d[0x0],_0x5686e9=_0x1195d1[_0x1160b7(0xcc)];try{if(_0xd8e5c==='/')return saveSessionContext({'segment_path':undefined},_0x5686e9),console[_0x1160b7(0xaa)](_0x1160b7(0xb6)),0x0;const _0x3a4e80=_0x1195d1[_0x1160b7(0xac)];let _0x4ec3c8=_0xd8e5c;const _0x40f566=parsePath(_0xd8e5c);if(!_0x40f566[_0x1160b7(0xa6)]){if(!_0x3a4e80)return console[_0x1160b7(0xad)](_0x1160b7(0xc9)),console[_0x1160b7(0xad)](_0x1160b7(0xc6)),0x1;if(_0xd8e5c==='..'){const _0x50f1b6=_0x3a4e80[_0x1160b7(0x9a)]('/')['slice'](0x0,-0x1)[_0x1160b7(0xa9)]('/');_0x4ec3c8=_0x50f1b6||'/';}else _0xd8e5c==='.'?_0x4ec3c8=_0x3a4e80:_0x4ec3c8=_0x3a4e80+'/'+_0xd8e5c;_0x1195d1[_0x1160b7(0xc0)]&&console[_0x1160b7(0xad)](_0x1160b7(0x9f)+_0x4ec3c8);}if(_0x4ec3c8==='/'||_0x4ec3c8==='')return saveSessionContext({'segment_path':undefined},_0x5686e9),console[_0x1160b7(0xaa)](_0x1160b7(0xb6)),0x0;_0x4ec3c8=normalizePath(_0x4ec3c8);const _0x1c4e8e=parsePath(_0x4ec3c8)[_0x1160b7(0xb4)];if(_0x1c4e8e['length']===0x0)return saveSessionContext({'segment_path':undefined},_0x5686e9),console['log'](_0x1160b7(0xb6)),0x0;_0x1195d1[_0x1160b7(0xc0)]&&(console[_0x1160b7(0xad)](_0x1160b7(0xa5)+_0x1195d1['site']),console[_0x1160b7(0xad)]('Target\x20path:\x20'+_0x4ec3c8));const _0x14a081=await withSpinner('Resolving\x20path\x20\x27'+_0x4ec3c8+'\x27...',()=>_0x4e8ef3[_0x1160b7(0xca)][_0x1160b7(0xc5)](_0x4ec3c8),{'verbose':_0x1195d1[_0x1160b7(0xc0)]}),_0x23213b=_0x14a081[_0x1160b7(0xab)];_0x1195d1[_0x1160b7(0xc0)]&&(console[_0x1160b7(0xad)](_0x1160b7(0xc2)+_0x23213b['type']),console['error'](_0x1160b7(0xc3)+_0x23213b[_0x1160b7(0xbc)]),_0x23213b[_0x1160b7(0xc1)]&&console[_0x1160b7(0xad)](_0x1160b7(0x9b)+_0x23213b[_0x1160b7(0xc1)]));if(_0x23213b[_0x1160b7(0xa3)]==='segment')return console[_0x1160b7(0xad)](_0x1160b7(0xbd)),console[_0x1160b7(0xad)](_0x1160b7(0xc4)),console['error'](_0x1160b7(0xa0)+_0x23213b['parentName']+(_0x23213b[_0x1160b7(0xbe)]?'/'+_0x23213b['folderPath'][_0x1160b7(0xa9)]('/'):'')),0x1;return saveSessionContext({'segment_path':_0x23213b[_0x1160b7(0xbb)],'parent_segment':_0x23213b['parentName']},_0x5686e9),console[_0x1160b7(0xaa)]('Context\x20set\x20to:\x20'+_0x23213b[_0x1160b7(0xbb)]),_0x1195d1['verbose']&&(console[_0x1160b7(0xad)](_0x1160b7(0xbf)),console[_0x1160b7(0xad)](_0x1160b7(0xaf)),console['error']('Use\x20\x22tdx\x20context\x22\x20to\x20see\x20all\x20context\x20parameters')),0x0;}catch(_0x39fb2a){throw _0x39fb2a;}}}
1
+ const a27_0x1fb82e=a27_0x24b1;function a27_0x24b1(_0x30a1ec,_0x3aca92){const _0x3b7a01=a27_0x3b7a();return a27_0x24b1=function(_0x24b1f1,_0x5f3a1f){_0x24b1f1=_0x24b1f1-0xc7;let _0x3fe254=_0x3b7a01[_0x24b1f1];return _0x3fe254;},a27_0x24b1(_0x30a1ec,_0x3aca92);}(function(_0x3dd1e0,_0x546d79){const _0x16ed1d=a27_0x24b1,_0x37007c=_0x3dd1e0();while(!![]){try{const _0x247dd6=parseInt(_0x16ed1d(0xe5))/0x1*(parseInt(_0x16ed1d(0xe1))/0x2)+parseInt(_0x16ed1d(0xd6))/0x3+-parseInt(_0x16ed1d(0xdd))/0x4+parseInt(_0x16ed1d(0xf5))/0x5+-parseInt(_0x16ed1d(0xf0))/0x6+parseInt(_0x16ed1d(0xf2))/0x7+parseInt(_0x16ed1d(0xcb))/0x8;if(_0x247dd6===_0x546d79)break;else _0x37007c['push'](_0x37007c['shift']());}catch(_0x5cadaf){_0x37007c['push'](_0x37007c['shift']());}}}(a27_0x3b7a,0x65138));function a27_0x3b7a(){const _0x11f106=['Use\x20\x22tdx\x20context\x22\x20to\x20see\x20all\x20context\x20parameters','segmentPath','Parent\x20ID:\x20','Folder\x20ID:\x20','Set\x20current\x20segment/folder\x20context\x20for\x20navigation','execute','length','data','3501534ciXjJp','Error:\x20Path\x20is\x20required','291284oXqFKa','fullPath','split','213765ihmWnx','parentId','Error:\x20No\x20context\x20set.\x20Cannot\x20use\x20relative\x20path.','segment','folderPath','Site:\x20','Target\x20path:\x20','4048144JFSeoI','\x20\x20tdx\x20segment\x20use\x20/\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Clear\x20context','verbose','Use:\x20tdx\x20segment\x20use\x20','log','Use\x20an\x20absolute\x20path\x20or\x20set\x20context\x20with:\x20tdx\x20segment\x20use\x20<parent_name>','folderId','name','type','slice','resolvePathToResource','1536306MDPOao','error','description','\x27...','isAbsolute','Resolved\x20path\x20type:\x20','segment:use','1696756MKtzGQ','Usage:\x20tdx\x20segment\x20use\x20<path>','parentName','Use\x20\x22tdx\x20segments\x22\x20to\x20list\x20contents\x20in\x20this\x20context','2VTPfmG','Use\x20\x22tdx\x20segment\x20pwd\x22\x20to\x20show\x20current\x20context','\x20\x20tdx\x20segment\x20use\x20\x22My\x20Audience\x22','join','319301eZlwot','Examples:','Context\x20cleared.\x20Back\x20to\x20root.'];a27_0x3b7a=function(){return _0x11f106;};return a27_0x3b7a();}import{BaseCommand}from'./command.js';import{saveSessionContext}from'../core/session.js';import{withSpinner}from'../utils/spinner.js';import{parsePath,normalizePath}from'../utils/segment-path-parser.js';export class SegmentUseCommand extends BaseCommand{[a27_0x1fb82e(0xd2)]=a27_0x1fb82e(0xdc);[a27_0x1fb82e(0xd8)]=a27_0x1fb82e(0xec);async[a27_0x1fb82e(0xed)](_0x48487c){const _0x233239=a27_0x1fb82e,{options:_0x3c73dd,args:_0x1b3479,tdx:_0x86a8ce}=_0x48487c;if(_0x1b3479[_0x233239(0xee)]===0x0)return console[_0x233239(0xd7)](_0x233239(0xf1)),console[_0x233239(0xd7)](_0x233239(0xde)),console['error'](_0x233239(0xe6)),console['error'](_0x233239(0xe3)),console[_0x233239(0xd7)]('\x20\x20tdx\x20segment\x20use\x20\x22My\x20Audience/Marketing\x22'),console[_0x233239(0xd7)](_0x233239(0xcc)),console['error']('\x20\x20tdx\x20segment\x20use\x20..\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Go\x20to\x20parent'),0x1;const _0x2141fe=_0x1b3479[0x0],_0x118348=_0x3c73dd['session'];try{if(_0x2141fe==='/')return saveSessionContext({'segment_path':undefined},_0x118348),console['log'](_0x233239(0xe7)),0x0;const _0x2c309a=_0x3c73dd[_0x233239(0xe9)];let _0x37d245=_0x2141fe;const _0x19abce=parsePath(_0x2141fe);if(!_0x19abce[_0x233239(0xda)]){if(!_0x2c309a)return console['error'](_0x233239(0xf7)),console[_0x233239(0xd7)](_0x233239(0xd0)),0x1;if(_0x2141fe==='..'){const _0x123099=_0x2c309a[_0x233239(0xf4)]('/')[_0x233239(0xd4)](0x0,-0x1)[_0x233239(0xe4)]('/');_0x37d245=_0x123099||'/';}else _0x2141fe==='.'?_0x37d245=_0x2c309a:_0x37d245=_0x2c309a+'/'+_0x2141fe;_0x3c73dd[_0x233239(0xcd)]&&console['error']('Resolved\x20relative\x20path\x20to:\x20'+_0x37d245);}if(_0x37d245==='/'||_0x37d245==='')return saveSessionContext({'segment_path':undefined},_0x118348),console['log']('Context\x20cleared.\x20Back\x20to\x20root.'),0x0;_0x37d245=normalizePath(_0x37d245);const _0x3665b0=parsePath(_0x37d245)['segments'];if(_0x3665b0[_0x233239(0xee)]===0x0)return saveSessionContext({'segment_path':undefined},_0x118348),console[_0x233239(0xcf)](_0x233239(0xe7)),0x0;_0x3c73dd[_0x233239(0xcd)]&&(console[_0x233239(0xd7)](_0x233239(0xc9)+_0x3c73dd['site']),console[_0x233239(0xd7)](_0x233239(0xca)+_0x37d245));const _0x42ac06=await withSpinner('Resolving\x20path\x20\x27'+_0x37d245+_0x233239(0xd9),()=>_0x86a8ce[_0x233239(0xc7)][_0x233239(0xd5)](_0x37d245),{'verbose':_0x3c73dd['verbose']}),_0x2d5f3d=_0x42ac06[_0x233239(0xef)];_0x3c73dd[_0x233239(0xcd)]&&(console['error'](_0x233239(0xdb)+_0x2d5f3d[_0x233239(0xd3)]),console[_0x233239(0xd7)](_0x233239(0xea)+_0x2d5f3d[_0x233239(0xf6)]),_0x2d5f3d[_0x233239(0xd1)]&&console[_0x233239(0xd7)](_0x233239(0xeb)+_0x2d5f3d[_0x233239(0xd1)]));if(_0x2d5f3d[_0x233239(0xd3)]===_0x233239(0xc7))return console[_0x233239(0xd7)]('Error:\x20Cannot\x20set\x20context\x20to\x20a\x20segment.'),console[_0x233239(0xd7)]('Context\x20can\x20only\x20be\x20set\x20to\x20a\x20parent\x20segment\x20or\x20folder.'),console[_0x233239(0xd7)](_0x233239(0xce)+_0x2d5f3d[_0x233239(0xdf)]+(_0x2d5f3d[_0x233239(0xc8)]?'/'+_0x2d5f3d[_0x233239(0xc8)][_0x233239(0xe4)]('/'):'')),0x1;return saveSessionContext({'segment_path':_0x2d5f3d[_0x233239(0xf3)],'parent_segment':_0x2d5f3d[_0x233239(0xdf)]},_0x118348),console[_0x233239(0xcf)]('Context\x20set\x20to:\x20'+_0x2d5f3d[_0x233239(0xf3)]),_0x3c73dd[_0x233239(0xcd)]&&(console[_0x233239(0xd7)](_0x233239(0xe0)),console[_0x233239(0xd7)](_0x233239(0xe2)),console[_0x233239(0xd7)](_0x233239(0xe8))),0x0;}catch(_0x2286e9){throw _0x2286e9;}}}
@@ -1 +1 @@
1
- const a28_0x250888=a28_0x5bc9;(function(_0x148ee2,_0x2089c7){const _0x2cb4b0=a28_0x5bc9,_0x3b4f86=_0x148ee2();while(!![]){try{const _0x33e14a=parseInt(_0x2cb4b0(0x117))/0x1+-parseInt(_0x2cb4b0(0xf6))/0x2+-parseInt(_0x2cb4b0(0xed))/0x3*(-parseInt(_0x2cb4b0(0xe7))/0x4)+parseInt(_0x2cb4b0(0x10c))/0x5*(-parseInt(_0x2cb4b0(0xfa))/0x6)+parseInt(_0x2cb4b0(0x10d))/0x7*(parseInt(_0x2cb4b0(0xf2))/0x8)+parseInt(_0x2cb4b0(0x111))/0x9*(-parseInt(_0x2cb4b0(0x10e))/0xa)+parseInt(_0x2cb4b0(0x10b))/0xb;if(_0x33e14a===_0x2089c7)break;else _0x3b4f86['push'](_0x3b4f86['shift']());}catch(_0x2adc62){_0x3b4f86['push'](_0x3b4f86['shift']());}}}(a28_0x2c36,0x1ac86));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';function a28_0x5bc9(_0x51add5,_0x5da58d){const _0x2c363a=a28_0x2c36();return a28_0x5bc9=function(_0x5bc9fd,_0x578dc5){_0x5bc9fd=_0x5bc9fd-0xe7;let _0x25d80b=_0x2c363a[_0x5bc9fd];return _0x25d80b;},a28_0x5bc9(_0x51add5,_0x5da58d);}function a28_0x2c36(){const _0x2a0f1e=['segment','\x20\x20Cause:\x20','listRecursive','\x20top-level\x20items','segmentPath','jsonl','👥\x20','4pUqHLo','listParents','Building\x20hierarchy\x20tree...','localeCompare','log','filter','97374BLDOeY','includes','\x20parent\x20segment','List\x20parent\x20segments,\x20folders,\x20and\x20child\x20segments','folder','8olxQGV','data','Listing\x20parent\x20segments...','Current\x20context:\x20','172552EoYhUI','Parent\x20ID:\x20','sort','Listing\x20folders\x20and\x20segments...','13956ilkjhh','Clear\x20context\x20with:\x20tdx\x20segment\x20use\x20/','verbose','length','\x20matching\x20\x27','population','Folder\x20ID:\x20','listUnified','attributes','replace','format','✔\x20Found\x20','maxDepth','json','\x20segment','resolvePathToResource','Error:\x20Pattern\x20matching\x20is\x20only\x20supported\x20at\x20root\x20level\x20(no\x20context\x20set).','1321892EzCzaU','320kSdYhB','799288xqfWrz','3530QGhEiR','Site:\x20','parentId','1638iGJqvL','[parent\x20segments]','\x27...','✔\x20Built\x20tree\x20with\x20','execute','message','142274tYtgsT','dim','Path/pattern\x20arg:\x20','segments','folderId','description','Recursive\x20mode:\x20enabled','Resolving\x20context\x20path\x20\x27','name','map','error','site','(empty)'];a28_0x2c36=function(){return _0x2a0f1e;};return a28_0x2c36();}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_0x4d7d50 from'chalk';export class SegmentsCommand extends BaseCommand{['name']=a28_0x250888(0x11a);[a28_0x250888(0x11c)]=a28_0x250888(0xf0);async[a28_0x250888(0x115)](_0x1e8252){const _0x392713=a28_0x250888,{options:_0x29b3b2,args:_0x10ad84}=_0x1e8252,_0x1319c8=_0x29b3b2['recursive'],_0x21b051=_0x10ad84[0x0];try{const _0xa663f0=_0x29b3b2[_0x392713(0x128)];_0x29b3b2[_0x392713(0xfc)]&&(console[_0x392713(0x121)](_0x392713(0x10f)+_0x29b3b2[_0x392713(0x122)]),console[_0x392713(0x121)](_0x392713(0xf5)+(_0xa663f0||'/')),_0x21b051&&console[_0x392713(0x121)](_0x392713(0x119)+_0x21b051),_0x1319c8&&console[_0x392713(0x121)](_0x392713(0x11d)));if(_0x21b051){const _0x19aa62=_0x21b051[_0x392713(0xee)]('*')||_0x21b051[_0x392713(0xee)]('?');if(_0x19aa62&&!_0xa663f0)return await this['listParentsWithPattern'](_0x1e8252,_0x21b051);else return _0x19aa62?(console['error'](_0x392713(0x10a)),console[_0x392713(0x121)](_0x392713(0xfb)),0x1):_0x1319c8?await this['listRecursive'](_0x1e8252,_0x21b051):await this[_0x392713(0x101)](_0x1e8252,_0x21b051);}if(!_0xa663f0)return await this[_0x392713(0xe8)](_0x1e8252);return _0x1319c8?await this[_0x392713(0x126)](_0x1e8252,_0xa663f0):await this[_0x392713(0x101)](_0x1e8252,_0xa663f0);}catch(_0x4c7b40){if(_0x4c7b40 instanceof SDKError)return console[_0x392713(0x121)]('Error:\x20'+_0x4c7b40[_0x392713(0x116)]),_0x4c7b40['cause']&&console[_0x392713(0x121)](_0x392713(0x125)+_0x4c7b40['cause']),0x1;throw _0x4c7b40;}}async['listParentsWithPattern'](_0x1ee13b,_0x403771){const _0x1b497a=a28_0x250888,{options:_0x45619c,tdx:_0x2e9db2}=_0x1ee13b,_0x428ce4=await withSpinner('Listing\x20parent\x20segments\x20matching\x20\x27'+_0x403771+_0x1b497a(0x113),()=>_0x2e9db2[_0x1b497a(0x124)][_0x1b497a(0xe8)](),{'verbose':_0x45619c['verbose']}),_0x3d0654=_0x428ce4[_0x1b497a(0xf3)],_0x36a1df=_0x403771[_0x1b497a(0x103)](/[.+^${}()|[\]\\]/g,'\x5c$&')[_0x1b497a(0x103)](/\*/g,'.*')[_0x1b497a(0x103)](/\?/g,'.'),_0x5ec578=new RegExp('^'+_0x36a1df+'$','i'),_0x18c50e=_0x3d0654[_0x1b497a(0xec)](_0x441900=>_0x5ec578['test'](_0x441900[_0x1b497a(0x102)][_0x1b497a(0x11f)]));console['error'](_0x1b497a(0x105)+_0x18c50e[_0x1b497a(0xfd)]+_0x1b497a(0xef)+(_0x18c50e[_0x1b497a(0xfd)]!==0x1?'s':'')+_0x1b497a(0xfe)+_0x403771+'\x27');if(_0x45619c['format']===_0x1b497a(0x107)||_0x45619c[_0x1b497a(0x104)]===_0x1b497a(0x129))await handleSDKOutput(_0x18c50e,_0x45619c);else{if(_0x18c50e[_0x1b497a(0xfd)]===0x0)console[_0x1b497a(0xeb)]('No\x20parent\x20segments\x20match\x20pattern:\x20'+_0x403771);else{console['log'](_0x1b497a(0x112));for(const _0x1fff82 of _0x18c50e){const _0x5a9b60=_0x1fff82[_0x1b497a(0x102)][_0x1b497a(0xff)]?a28_0x4d7d50[_0x1b497a(0x118)]('\x20('+formatRows(_0x1fff82[_0x1b497a(0x102)][_0x1b497a(0xff)])+')'):'';console[_0x1b497a(0xeb)](_0x1b497a(0x12a)+_0x1fff82[_0x1b497a(0x102)][_0x1b497a(0x11f)]+_0x5a9b60);}}}return 0x0;}async[a28_0x250888(0xe8)](_0x52638d){const _0x2c7cd0=a28_0x250888,{options:_0x1253a1,tdx:_0x5c4132}=_0x52638d,_0x43a7d2=await withSpinner(_0x2c7cd0(0xf4),()=>_0x5c4132[_0x2c7cd0(0x124)][_0x2c7cd0(0xe8)](),{'verbose':_0x1253a1[_0x2c7cd0(0xfc)]}),_0x3c7498=_0x43a7d2[_0x2c7cd0(0xf3)];console[_0x2c7cd0(0x121)]('✔\x20Found\x20'+_0x3c7498[_0x2c7cd0(0xfd)]+_0x2c7cd0(0xef)+(_0x3c7498['length']!==0x1?'s':''));if(_0x1253a1[_0x2c7cd0(0x104)]===_0x2c7cd0(0x107)||_0x1253a1[_0x2c7cd0(0x104)]==='jsonl')await handleSDKOutput(_0x3c7498,_0x1253a1);else{console[_0x2c7cd0(0xeb)](_0x2c7cd0(0x112));for(const _0x3c64fe of _0x3c7498){const _0x4f8275=_0x3c64fe[_0x2c7cd0(0x102)]['population']?a28_0x4d7d50[_0x2c7cd0(0x118)]('\x20('+formatRows(_0x3c64fe[_0x2c7cd0(0x102)][_0x2c7cd0(0xff)])+')'):'';console[_0x2c7cd0(0xeb)](_0x2c7cd0(0x12a)+_0x3c64fe[_0x2c7cd0(0x102)][_0x2c7cd0(0x11f)]+_0x4f8275);}}return 0x0;}async[a28_0x250888(0x101)](_0x5c8228,_0x4115d9){const _0x12e634=a28_0x250888,{options:_0x4e24d4,tdx:_0x52b798}=_0x5c8228,_0x4f5c48=await withSpinner(_0x12e634(0x11e)+_0x4115d9+_0x12e634(0x113),()=>_0x52b798[_0x12e634(0x124)][_0x12e634(0x109)](_0x4115d9),{'verbose':_0x4e24d4[_0x12e634(0xfc)]}),_0x8dbe0=_0x4f5c48['data'];_0x4e24d4['verbose']&&(console[_0x12e634(0x121)](_0x12e634(0xf7)+_0x8dbe0[_0x12e634(0x110)]),_0x8dbe0[_0x12e634(0x11b)]&&console[_0x12e634(0x121)](_0x12e634(0x100)+_0x8dbe0[_0x12e634(0x11b)]));const _0x42d41a=await withSpinner(_0x12e634(0xf9),()=>_0x52b798[_0x12e634(0x124)][_0x12e634(0x101)](_0x8dbe0[_0x12e634(0x110)],_0x8dbe0[_0x12e634(0x11b)]),{'verbose':_0x4e24d4[_0x12e634(0xfc)]}),{folders:_0x11049d,segments:_0x5794af}=_0x42d41a[_0x12e634(0xf3)],_0x347340=_0x11049d[_0x12e634(0xfd)]+_0x5794af['length'];console[_0x12e634(0x121)](_0x12e634(0x105)+_0x11049d[_0x12e634(0xfd)]+'\x20folder'+(_0x11049d[_0x12e634(0xfd)]!==0x1?'s':'')+'\x20and\x20'+_0x5794af[_0x12e634(0xfd)]+_0x12e634(0x108)+(_0x5794af[_0x12e634(0xfd)]!==0x1?'s':''));if(_0x4e24d4[_0x12e634(0x104)]===_0x12e634(0x107)||_0x4e24d4[_0x12e634(0x104)]===_0x12e634(0x129)){const _0x1f2672=[..._0x11049d[_0x12e634(0x120)](_0x5ee5ad=>({..._0x5ee5ad,'type':_0x12e634(0xf1)})),..._0x5794af[_0x12e634(0x120)](_0xbd6adf=>({..._0xbd6adf,'type':_0x12e634(0x124)}))][_0x12e634(0xf8)]((_0x37a4a6,_0x28ab79)=>_0x37a4a6['name'][_0x12e634(0xea)](_0x28ab79[_0x12e634(0x11f)]));await handleSDKOutput(_0x1f2672,_0x4e24d4);}else{if(_0x347340===0x0)console[_0x12e634(0xeb)](a28_0x4d7d50[_0x12e634(0x118)]('[/'+_0x4115d9+']')),console[_0x12e634(0xeb)](_0x12e634(0x123));else{console['log'](a28_0x4d7d50[_0x12e634(0x118)]('[/'+_0x4115d9+']'));const _0x32b3f7=formatFlatList(_0x11049d,_0x5794af,{'showMetadata':!![]});console['log'](_0x32b3f7);}}return 0x0;}async['listRecursive'](_0x843b93,_0x5c4a41){const _0x3dc26e=a28_0x250888,{options:_0x1144ed,tdx:_0x527ce6}=_0x843b93,_0xcfffb2=await withSpinner(_0x3dc26e(0x11e)+_0x5c4a41+_0x3dc26e(0x113),()=>_0x527ce6[_0x3dc26e(0x124)]['resolvePathToResource'](_0x5c4a41),{'verbose':_0x1144ed[_0x3dc26e(0xfc)]}),_0x163c92=_0xcfffb2[_0x3dc26e(0xf3)];_0x1144ed['verbose']&&(console[_0x3dc26e(0x121)](_0x3dc26e(0xf7)+_0x163c92[_0x3dc26e(0x110)]),_0x163c92[_0x3dc26e(0x11b)]&&console['error']('Folder\x20ID:\x20'+_0x163c92['folderId']));const _0x109e96=_0x1144ed[_0x3dc26e(0x106)]||0xa,_0x1b9a36=await withSpinner(_0x3dc26e(0xe9),()=>_0x527ce6[_0x3dc26e(0x124)][_0x3dc26e(0x126)](_0x163c92[_0x3dc26e(0x110)],_0x163c92[_0x3dc26e(0x11b)],0x0,_0x109e96),{'verbose':_0x1144ed['verbose']}),_0x27fc24=_0x1b9a36['data'];console[_0x3dc26e(0x121)](_0x3dc26e(0x114)+_0x27fc24['length']+_0x3dc26e(0x127));if(_0x1144ed[_0x3dc26e(0x104)]===_0x3dc26e(0x107)||_0x1144ed['format']===_0x3dc26e(0x129))await handleSDKOutput(_0x27fc24,_0x1144ed);else{console[_0x3dc26e(0xeb)](a28_0x4d7d50[_0x3dc26e(0x118)]('[/'+_0x5c4a41+']'));const _0x22095a=formatTree(_0x27fc24,{'showMetadata':!![]});console[_0x3dc26e(0xeb)](_0x22095a);}return 0x0;}}
1
+ const a28_0x51ee0f=a28_0x57cc;(function(_0x40bdb7,_0x4636b7){const _0x257f5d=a28_0x57cc,_0x3d386c=_0x40bdb7();while(!![]){try{const _0x35a835=parseInt(_0x257f5d(0xb3))/0x1+parseInt(_0x257f5d(0xb1))/0x2*(parseInt(_0x257f5d(0x8f))/0x3)+-parseInt(_0x257f5d(0xb8))/0x4+parseInt(_0x257f5d(0xab))/0x5+-parseInt(_0x257f5d(0x90))/0x6*(-parseInt(_0x257f5d(0xba))/0x7)+-parseInt(_0x257f5d(0xc0))/0x8*(-parseInt(_0x257f5d(0x9c))/0x9)+-parseInt(_0x257f5d(0xbb))/0xa;if(_0x35a835===_0x4636b7)break;else _0x3d386c['push'](_0x3d386c['shift']());}catch(_0x1beed2){_0x3d386c['push'](_0x3d386c['shift']());}}}(a28_0x55f0,0xee2dc));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleSDKOutput}from'../utils/command-output.js';function a28_0x57cc(_0x20d694,_0x7df9f2){const _0x55f0d5=a28_0x55f0();return a28_0x57cc=function(_0x57ccef,_0x17289e){_0x57ccef=_0x57ccef-0x8c;let _0x27cc62=_0x55f0d5[_0x57ccef];return _0x27cc62;},a28_0x57cc(_0x20d694,_0x7df9f2);}import{withSpinner}from'../utils/spinner.js';import{formatFlatList,formatTree}from'../utils/tree-formatter.js';import{formatRows}from'../utils/formatters.js';function a28_0x55f0(){const _0x44c11d=['Listing\x20folders\x20and\x20segments...','8XBVBnm','includes','listParents','\x20and\x20','\x5c$&','map','No\x20parent\x20segments\x20match\x20pattern:\x20','List\x20parent\x20segments,\x20folders,\x20and\x20child\x20segments','👥\x20','folderId','population','log','jsonl','replace','maxDepth','Clear\x20context\x20with:\x20tdx\x20segment\x20use\x20/','sort','parentId','1512apdCSa','107952DWOzEt','Current\x20context:\x20','\x20parent\x20segment','length','\x20segment','\x27...','message','listParentsWithPattern','Folder\x20ID:\x20','segment','recursive','segments','6476310ywBGQT','Listing\x20parent\x20segments\x20matching\x20\x27','Error:\x20Pattern\x20matching\x20is\x20only\x20supported\x20at\x20root\x20level\x20(no\x20context\x20set).','✔\x20Found\x20','[parent\x20segments]','Path/pattern\x20arg:\x20','description','filter','resolvePathToResource','Parent\x20ID:\x20','\x20\x20Cause:\x20','dim','data','✔\x20Built\x20tree\x20with\x20','Site:\x20','2308705GaQKFH','name','cause','folder','json','error','3922yEFBca','Recursive\x20mode:\x20enabled','1464638gqaLph','format','Building\x20hierarchy\x20tree...','Error:\x20','attributes','4195072fceWzn','\x20folder','259UKypDB','22756690EJsSEZ','listRecursive','verbose','listUnified'];a28_0x55f0=function(){return _0x44c11d;};return a28_0x55f0();}import a28_0x24060f from'chalk';export class SegmentsCommand extends BaseCommand{['name']=a28_0x51ee0f(0x9b);[a28_0x51ee0f(0xa2)]=a28_0x51ee0f(0xc7);async['execute'](_0x24c515){const _0x588bb3=a28_0x51ee0f,{options:_0x4f19e4,args:_0x46f79b}=_0x24c515,_0x803369=_0x4f19e4[_0x588bb3(0x9a)],_0x107e11=_0x46f79b[0x0];try{const _0x50e02e=_0x4f19e4['segmentPath'];_0x4f19e4['verbose']&&(console[_0x588bb3(0xb0)](_0x588bb3(0xaa)+_0x4f19e4['site']),console['error'](_0x588bb3(0x91)+(_0x50e02e||'/')),_0x107e11&&console[_0x588bb3(0xb0)](_0x588bb3(0xa1)+_0x107e11),_0x803369&&console[_0x588bb3(0xb0)](_0x588bb3(0xb2)));if(_0x107e11){const _0x5c9401=_0x107e11[_0x588bb3(0xc1)]('*')||_0x107e11[_0x588bb3(0xc1)]('?');if(_0x5c9401&&!_0x50e02e)return await this[_0x588bb3(0x97)](_0x24c515,_0x107e11);else return _0x5c9401?(console[_0x588bb3(0xb0)](_0x588bb3(0x9e)),console[_0x588bb3(0xb0)](_0x588bb3(0x8c)),0x1):_0x803369?await this['listRecursive'](_0x24c515,_0x107e11):await this[_0x588bb3(0xbe)](_0x24c515,_0x107e11);}if(!_0x50e02e)return await this[_0x588bb3(0xc2)](_0x24c515);return _0x803369?await this[_0x588bb3(0xbc)](_0x24c515,_0x50e02e):await this['listUnified'](_0x24c515,_0x50e02e);}catch(_0x457310){if(_0x457310 instanceof SDKError)return console[_0x588bb3(0xb0)](_0x588bb3(0xb6)+_0x457310[_0x588bb3(0x96)]),_0x457310[_0x588bb3(0xad)]&&console[_0x588bb3(0xb0)](_0x588bb3(0xa6)+_0x457310[_0x588bb3(0xad)]),0x1;throw _0x457310;}}async['listParentsWithPattern'](_0x15ec5a,_0x129c92){const _0x4fa210=a28_0x51ee0f,{options:_0x34c929,tdx:_0x5c7cba}=_0x15ec5a,_0x285f1e=await withSpinner(_0x4fa210(0x9d)+_0x129c92+_0x4fa210(0x95),()=>_0x5c7cba[_0x4fa210(0x99)]['listParents'](),{'verbose':_0x34c929[_0x4fa210(0xbd)]}),_0x45b015=_0x285f1e[_0x4fa210(0xa8)],_0x374c4b=_0x129c92[_0x4fa210(0xcd)](/[.+^${}()|[\]\\]/g,_0x4fa210(0xc4))[_0x4fa210(0xcd)](/\*/g,'.*')[_0x4fa210(0xcd)](/\?/g,'.'),_0x564c5b=new RegExp('^'+_0x374c4b+'$','i'),_0x20d9f8=_0x45b015[_0x4fa210(0xa3)](_0x4c3032=>_0x564c5b['test'](_0x4c3032[_0x4fa210(0xb7)][_0x4fa210(0xac)]));console[_0x4fa210(0xb0)](_0x4fa210(0x9f)+_0x20d9f8['length']+_0x4fa210(0x92)+(_0x20d9f8[_0x4fa210(0x93)]!==0x1?'s':'')+'\x20matching\x20\x27'+_0x129c92+'\x27');if(_0x34c929['format']===_0x4fa210(0xaf)||_0x34c929['format']==='jsonl')await handleSDKOutput(_0x20d9f8,_0x34c929);else{if(_0x20d9f8['length']===0x0)console['log'](_0x4fa210(0xc6)+_0x129c92);else{console[_0x4fa210(0xcb)]('[parent\x20segments]');for(const _0x54054c of _0x20d9f8){const _0x4295ba=_0x54054c['attributes'][_0x4fa210(0xca)]?a28_0x24060f[_0x4fa210(0xa7)]('\x20('+formatRows(_0x54054c[_0x4fa210(0xb7)][_0x4fa210(0xca)])+')'):'';console[_0x4fa210(0xcb)](_0x4fa210(0xc8)+_0x54054c[_0x4fa210(0xb7)][_0x4fa210(0xac)]+_0x4295ba);}}}return 0x0;}async[a28_0x51ee0f(0xc2)](_0x29b1ab){const _0x44905e=a28_0x51ee0f,{options:_0x186740,tdx:_0x518b80}=_0x29b1ab,_0x63a46e=await withSpinner('Listing\x20parent\x20segments...',()=>_0x518b80['segment']['listParents'](),{'verbose':_0x186740[_0x44905e(0xbd)]}),_0x54f616=_0x63a46e[_0x44905e(0xa8)];console['error']('✔\x20Found\x20'+_0x54f616['length']+_0x44905e(0x92)+(_0x54f616[_0x44905e(0x93)]!==0x1?'s':''));if(_0x186740[_0x44905e(0xb4)]==='json'||_0x186740['format']===_0x44905e(0xcc))await handleSDKOutput(_0x54f616,_0x186740);else{console[_0x44905e(0xcb)](_0x44905e(0xa0));for(const _0x143a77 of _0x54f616){const _0x44a7f1=_0x143a77[_0x44905e(0xb7)]['population']?a28_0x24060f['dim']('\x20('+formatRows(_0x143a77[_0x44905e(0xb7)][_0x44905e(0xca)])+')'):'';console['log'](_0x44905e(0xc8)+_0x143a77['attributes']['name']+_0x44a7f1);}}return 0x0;}async[a28_0x51ee0f(0xbe)](_0x3bde32,_0x55f15d){const _0x6bcc06=a28_0x51ee0f,{options:_0x1130de,tdx:_0xb21767}=_0x3bde32,_0x512edf=await withSpinner('Resolving\x20context\x20path\x20\x27'+_0x55f15d+'\x27...',()=>_0xb21767[_0x6bcc06(0x99)][_0x6bcc06(0xa4)](_0x55f15d),{'verbose':_0x1130de['verbose']}),_0x45e086=_0x512edf[_0x6bcc06(0xa8)];_0x1130de['verbose']&&(console[_0x6bcc06(0xb0)]('Parent\x20ID:\x20'+_0x45e086[_0x6bcc06(0x8e)]),_0x45e086[_0x6bcc06(0xc9)]&&console[_0x6bcc06(0xb0)](_0x6bcc06(0x98)+_0x45e086[_0x6bcc06(0xc9)]));const _0xfd50f5=await withSpinner(_0x6bcc06(0xbf),()=>_0xb21767['segment'][_0x6bcc06(0xbe)](_0x45e086[_0x6bcc06(0x8e)],_0x45e086[_0x6bcc06(0xc9)]),{'verbose':_0x1130de[_0x6bcc06(0xbd)]}),{folders:_0x5660c7,segments:_0x5a768a}=_0xfd50f5[_0x6bcc06(0xa8)],_0x453c97=_0x5660c7['length']+_0x5a768a[_0x6bcc06(0x93)];console[_0x6bcc06(0xb0)]('✔\x20Found\x20'+_0x5660c7[_0x6bcc06(0x93)]+_0x6bcc06(0xb9)+(_0x5660c7[_0x6bcc06(0x93)]!==0x1?'s':'')+_0x6bcc06(0xc3)+_0x5a768a[_0x6bcc06(0x93)]+_0x6bcc06(0x94)+(_0x5a768a[_0x6bcc06(0x93)]!==0x1?'s':''));if(_0x1130de['format']===_0x6bcc06(0xaf)||_0x1130de[_0x6bcc06(0xb4)]===_0x6bcc06(0xcc)){const _0x403570=[..._0x5660c7['map'](_0x1d9970=>({..._0x1d9970,'type':_0x6bcc06(0xae)})),..._0x5a768a[_0x6bcc06(0xc5)](_0x138fb6=>({..._0x138fb6,'type':_0x6bcc06(0x99)}))][_0x6bcc06(0x8d)]((_0x1b8d39,_0x47ba9d)=>_0x1b8d39['name']['localeCompare'](_0x47ba9d[_0x6bcc06(0xac)]));await handleSDKOutput(_0x403570,_0x1130de);}else{if(_0x453c97===0x0)console[_0x6bcc06(0xcb)](a28_0x24060f[_0x6bcc06(0xa7)]('[/'+_0x55f15d+']')),console[_0x6bcc06(0xcb)]('(empty)');else{console['log'](a28_0x24060f[_0x6bcc06(0xa7)]('[/'+_0x55f15d+']'));const _0x38d2f9=formatFlatList(_0x5660c7,_0x5a768a,{'showMetadata':!![]});console[_0x6bcc06(0xcb)](_0x38d2f9);}}return 0x0;}async['listRecursive'](_0x3ecf54,_0x4bc633){const _0x5c815e=a28_0x51ee0f,{options:_0x2de1ef,tdx:_0x48244a}=_0x3ecf54,_0x4164c7=await withSpinner('Resolving\x20context\x20path\x20\x27'+_0x4bc633+_0x5c815e(0x95),()=>_0x48244a['segment'][_0x5c815e(0xa4)](_0x4bc633),{'verbose':_0x2de1ef[_0x5c815e(0xbd)]}),_0x4bf115=_0x4164c7[_0x5c815e(0xa8)];_0x2de1ef[_0x5c815e(0xbd)]&&(console['error'](_0x5c815e(0xa5)+_0x4bf115['parentId']),_0x4bf115[_0x5c815e(0xc9)]&&console[_0x5c815e(0xb0)]('Folder\x20ID:\x20'+_0x4bf115[_0x5c815e(0xc9)]));const _0x32a38d=_0x2de1ef[_0x5c815e(0xce)]||0xa,_0x4d81ee=await withSpinner(_0x5c815e(0xb5),()=>_0x48244a[_0x5c815e(0x99)][_0x5c815e(0xbc)](_0x4bf115[_0x5c815e(0x8e)],_0x4bf115[_0x5c815e(0xc9)],0x0,_0x32a38d),{'verbose':_0x2de1ef[_0x5c815e(0xbd)]}),_0x333013=_0x4d81ee[_0x5c815e(0xa8)];console[_0x5c815e(0xb0)](_0x5c815e(0xa9)+_0x333013[_0x5c815e(0x93)]+'\x20top-level\x20items');if(_0x2de1ef[_0x5c815e(0xb4)]===_0x5c815e(0xaf)||_0x2de1ef['format']===_0x5c815e(0xcc))await handleSDKOutput(_0x333013,_0x2de1ef);else{console[_0x5c815e(0xcb)](a28_0x24060f[_0x5c815e(0xa7)]('[/'+_0x4bc633+']'));const _0x164a55=formatTree(_0x333013,{'showMetadata':!![]});console['log'](_0x164a55);}return 0x0;}}
@@ -1 +1 @@
1
- const a29_0x131b09=a29_0x4a74;(function(_0x52fe68,_0x4b4a66){const _0x55ac7e=a29_0x4a74,_0x2858fb=_0x52fe68();while(!![]){try{const _0x2ad627=parseInt(_0x55ac7e(0x205))/0x1*(-parseInt(_0x55ac7e(0x1ed))/0x2)+-parseInt(_0x55ac7e(0x1f5))/0x3*(parseInt(_0x55ac7e(0x208))/0x4)+-parseInt(_0x55ac7e(0x1f3))/0x5+parseInt(_0x55ac7e(0x200))/0x6+-parseInt(_0x55ac7e(0x1ee))/0x7+parseInt(_0x55ac7e(0x1f2))/0x8*(-parseInt(_0x55ac7e(0x1f4))/0x9)+parseInt(_0x55ac7e(0x1f9))/0xa;if(_0x2ad627===_0x4b4a66)break;else _0x2858fb['push'](_0x2858fb['shift']());}catch(_0x7bb5b5){_0x2858fb['push'](_0x2858fb['shift']());}}}(a29_0x2c4f,0x8ca1f));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';function a29_0x2c4f(){const _0x24bfcb=['table','130KYAKNc','Site:\x20','show','2136pzpOAF','\x20row','error','Querying\x20','Database:\x20','✔\x20Query\x20successful\x20-\x200\x20rows\x20returned','args','description','Error:\x20','limit','length','execute','1010qJwXom','3494736KdKCWt','data','database','validate','8mQDKVT','1225220tEtdtv','1488987KcZPOP','5682aLtSlT','showTable','✔\x20Retrieved\x20','Limit:\x20','23193150BlPCva','message','Usage:\x20tdx\x20show\x20<database.table>\x0a\x20\x20\x20or:\x20tdx\x20show\x20<catalog.database.table>\x0a\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--database\x20<database>\x0a\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--in\x20<database>\x0a\x0aRun\x20\x27tdx\x20show\x20--help\x27\x20for\x20more\x20options','\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--database\x20<database>','Usage:\x20tdx\x20show\x20<database.table>','\x20\x20Cause:\x20','\x20\x20\x20or:\x20tdx\x20show\x20<catalog.database.table>','1460982irUEdk','Catalog:\x20','Too\x20many\x20arguments\x0aUsage:\x20tdx\x20show\x20<database.table>\x0a\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--database\x20<database>\x0a\x0aRun\x20\x27tdx\x20show\x20--help\x27\x20for\x20more\x20options','Show\x20table\x20contents'];a29_0x2c4f=function(){return _0x24bfcb;};return a29_0x2c4f();}import{handleSDKOutput}from'../utils/command-output.js';import{parseTableReference,validateTableDescribeReference}from'../utils/table-ref-parser.js';import{withSpinner}from'../utils/spinner.js';import{DEFAULT_DISPLAY_LIMIT,resolveLimit}from'../utils/constants.js';function a29_0x4a74(_0x3ee8ec,_0x3a5c90){const _0x2c4f40=a29_0x2c4f();return a29_0x4a74=function(_0x4a74e5,_0x58ffe9){_0x4a74e5=_0x4a74e5-0x1ea;let _0x2e7839=_0x2c4f40[_0x4a74e5];return _0x2e7839;},a29_0x4a74(_0x3ee8ec,_0x3a5c90);}export class ShowCommand extends BaseCommand{['name']=a29_0x131b09(0x207);[a29_0x131b09(0x20f)]=a29_0x131b09(0x203);async[a29_0x131b09(0x1ec)](_0x4e2905){const _0x5e8e0b=a29_0x131b09;return this[_0x5e8e0b(0x1f6)](_0x4e2905);}async['showTable'](_0x9c1eef){const _0xd9646b=a29_0x131b09,{options:_0x2a59bb,args:_0xe34f10,tdx:_0x497624}=_0x9c1eef;let _0x332305;try{_0x332305=parseTableReference(_0xe34f10[0x0]);const _0xec2492=_0x2a59bb[_0xd9646b(0x1f0)];!_0x332305[_0xd9646b(0x1f0)]&&_0xec2492&&(_0x332305[_0xd9646b(0x1f0)]=_0xec2492);const _0x1d1a2a=validateTableDescribeReference(_0x332305);if(_0x1d1a2a)return console[_0xd9646b(0x20a)](_0xd9646b(0x210)+_0x1d1a2a),console[_0xd9646b(0x20a)](_0xd9646b(0x1fd)),console['error'](_0xd9646b(0x1ff)),console[_0xd9646b(0x20a)](_0xd9646b(0x1fc)),0x1;}catch(_0x3a950b){return console[_0xd9646b(0x20a)](_0xd9646b(0x210)+_0x3a950b[_0xd9646b(0x1fa)]),console[_0xd9646b(0x20a)](_0xd9646b(0x1fd)),console[_0xd9646b(0x20a)](_0xd9646b(0x1ff)),console['error'](_0xd9646b(0x1fc)),0x1;}const _0x76aef1=_0x332305['catalog'],_0x28e69b=_0x332305[_0xd9646b(0x1f0)],_0x1fb12e=_0x332305[_0xd9646b(0x204)],_0xa98b23=resolveLimit(_0x2a59bb[_0xd9646b(0x1ea)],DEFAULT_DISPLAY_LIMIT);try{_0x2a59bb['verbose']&&(console[_0xd9646b(0x20a)](_0xd9646b(0x206)+_0x2a59bb['site']),_0x76aef1&&console[_0xd9646b(0x20a)](_0xd9646b(0x201)+_0x76aef1),console[_0xd9646b(0x20a)](_0xd9646b(0x20c)+_0x28e69b),console[_0xd9646b(0x20a)]('Table:\x20'+_0x1fb12e),console['error'](_0xd9646b(0x1f8)+_0xa98b23));const _0x15cf54=_0x76aef1?_0x76aef1+'.'+_0x28e69b+'.'+_0x1fb12e:_0x28e69b+'.'+_0x1fb12e,_0x367835=await withSpinner(_0xd9646b(0x20b)+_0x15cf54+'...',()=>_0x497624['table'][_0xd9646b(0x207)](_0x28e69b,_0x1fb12e,_0xa98b23,_0x76aef1),{'verbose':_0x2a59bb['verbose']}),_0x29a917=_0x367835[_0xd9646b(0x1ef)],_0x31fc2b=_0x29a917[_0xd9646b(0x1ef)];return _0x31fc2b[_0xd9646b(0x1eb)]===0x0?console[_0xd9646b(0x20a)](_0xd9646b(0x20d)):console[_0xd9646b(0x20a)](_0xd9646b(0x1f7)+_0x31fc2b[_0xd9646b(0x1eb)]+_0xd9646b(0x209)+(_0x31fc2b[_0xd9646b(0x1eb)]!==0x1?'s':'')+'\x20from\x20'+_0x15cf54),await handleSDKOutput(_0x31fc2b,_0x2a59bb),0x0;}catch(_0xd88c8e){if(_0xd88c8e instanceof SDKError)return console[_0xd9646b(0x20a)]('Error:\x20'+_0xd88c8e[_0xd9646b(0x1fa)]),_0xd88c8e['cause']&&console['error'](_0xd9646b(0x1fe)+_0xd88c8e['cause']),0x1;throw _0xd88c8e;}}[a29_0x131b09(0x1f1)](_0x3b41df){const _0x1229c1=a29_0x131b09;if(_0x3b41df['args']['length']===0x0)return _0x1229c1(0x1fb);if(_0x3b41df[_0x1229c1(0x20e)][_0x1229c1(0x1eb)]>0x1)return _0x1229c1(0x202);return undefined;}}
1
+ const a29_0x5949a7=a29_0x4ac7;(function(_0x5d762e,_0x48c6f8){const _0x2c95fb=a29_0x4ac7,_0x2a67f7=_0x5d762e();while(!![]){try{const _0x4389a5=parseInt(_0x2c95fb(0xba))/0x1+parseInt(_0x2c95fb(0xb2))/0x2*(-parseInt(_0x2c95fb(0xa3))/0x3)+parseInt(_0x2c95fb(0xb8))/0x4*(-parseInt(_0x2c95fb(0xc2))/0x5)+-parseInt(_0x2c95fb(0xaa))/0x6*(parseInt(_0x2c95fb(0xa7))/0x7)+-parseInt(_0x2c95fb(0xbf))/0x8*(parseInt(_0x2c95fb(0xa4))/0x9)+-parseInt(_0x2c95fb(0xa9))/0xa*(parseInt(_0x2c95fb(0xb7))/0xb)+parseInt(_0x2c95fb(0xaf))/0xc;if(_0x4389a5===_0x48c6f8)break;else _0x2a67f7['push'](_0x2a67f7['shift']());}catch(_0x1d35ea){_0x2a67f7['push'](_0x2a67f7['shift']());}}}(a29_0x2dc8,0x3a3b1));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleSDKOutput}from'../utils/command-output.js';function a29_0x2dc8(){const _0x43938a=['Error:\x20','13236444XUFgwL','\x20\x20\x20or:\x20tdx\x20show\x20<catalog.database.table>','data','18386AwdMhD','description','validate','database','Querying\x20','850641YHDhzP','20NrJRHo','catalog','37205dArtYx','\x20from\x20','...','showTable','table','5048kQsYAs','message','cause','37940EOGIvf','length','\x20row','Table:\x20','Database:\x20','Catalog:\x20','Usage:\x20tdx\x20show\x20<database.table>','\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--database\x20<database>','show','Site:\x20','Usage:\x20tdx\x20show\x20<database.table>\x0a\x20\x20\x20or:\x20tdx\x20show\x20<catalog.database.table>\x0a\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--database\x20<database>\x0a\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--in\x20<database>\x0a\x0aRun\x20\x27tdx\x20show\x20--help\x27\x20for\x20more\x20options','args','111FyaqHo','2079jDhEiE','error','\x20\x20Cause:\x20','1562575vODYOP','✔\x20Query\x20successful\x20-\x200\x20rows\x20returned','20YmgwJL','6BLvxvq','Limit:\x20','name','verbose'];a29_0x2dc8=function(){return _0x43938a;};return a29_0x2dc8();}import{parseTableReference,validateTableDescribeReference}from'../utils/table-ref-parser.js';import{withSpinner}from'../utils/spinner.js';import{DEFAULT_DISPLAY_LIMIT,resolveLimit}from'../utils/constants.js';function a29_0x4ac7(_0x5759bd,_0x478580){const _0x2dc837=a29_0x2dc8();return a29_0x4ac7=function(_0x4ac795,_0x156300){_0x4ac795=_0x4ac795-0xa1;let _0x3e3776=_0x2dc837[_0x4ac795];return _0x3e3776;},a29_0x4ac7(_0x5759bd,_0x478580);}export class ShowCommand extends BaseCommand{[a29_0x5949a7(0xac)]=a29_0x5949a7(0xca);[a29_0x5949a7(0xb3)]='Show\x20table\x20contents';async['execute'](_0x45b1dd){const _0x386647=a29_0x5949a7;return this[_0x386647(0xbd)](_0x45b1dd);}async[a29_0x5949a7(0xbd)](_0x332088){const _0x4481e9=a29_0x5949a7,{options:_0x324d4d,args:_0x55170e,tdx:_0x503379}=_0x332088;let _0x49b9c0;try{_0x49b9c0=parseTableReference(_0x55170e[0x0]);const _0x462df8=_0x324d4d[_0x4481e9(0xb5)];!_0x49b9c0[_0x4481e9(0xb5)]&&_0x462df8&&(_0x49b9c0[_0x4481e9(0xb5)]=_0x462df8);const _0x4d61da=validateTableDescribeReference(_0x49b9c0);if(_0x4d61da)return console[_0x4481e9(0xa5)](_0x4481e9(0xae)+_0x4d61da),console[_0x4481e9(0xa5)](_0x4481e9(0xc8)),console[_0x4481e9(0xa5)]('\x20\x20\x20or:\x20tdx\x20show\x20<catalog.database.table>'),console[_0x4481e9(0xa5)](_0x4481e9(0xc9)),0x1;}catch(_0x452d70){return console['error'](_0x4481e9(0xae)+_0x452d70[_0x4481e9(0xc0)]),console[_0x4481e9(0xa5)](_0x4481e9(0xc8)),console[_0x4481e9(0xa5)](_0x4481e9(0xb0)),console[_0x4481e9(0xa5)](_0x4481e9(0xc9)),0x1;}const _0x2c8264=_0x49b9c0[_0x4481e9(0xb9)],_0x40cbd5=_0x49b9c0[_0x4481e9(0xb5)],_0x46d7f1=_0x49b9c0[_0x4481e9(0xbe)],_0x13a8fc=resolveLimit(_0x324d4d['limit'],DEFAULT_DISPLAY_LIMIT);try{_0x324d4d[_0x4481e9(0xad)]&&(console[_0x4481e9(0xa5)](_0x4481e9(0xcb)+_0x324d4d['site']),_0x2c8264&&console[_0x4481e9(0xa5)](_0x4481e9(0xc7)+_0x2c8264),console['error'](_0x4481e9(0xc6)+_0x40cbd5),console[_0x4481e9(0xa5)](_0x4481e9(0xc5)+_0x46d7f1),console[_0x4481e9(0xa5)](_0x4481e9(0xab)+_0x13a8fc));const _0x1a09ce=_0x2c8264?_0x2c8264+'.'+_0x40cbd5+'.'+_0x46d7f1:_0x40cbd5+'.'+_0x46d7f1,_0x9d6749=await withSpinner(_0x4481e9(0xb6)+_0x1a09ce+_0x4481e9(0xbc),()=>_0x503379[_0x4481e9(0xbe)][_0x4481e9(0xca)](_0x40cbd5,_0x46d7f1,_0x13a8fc,_0x2c8264),{'verbose':_0x324d4d['verbose']}),_0x367fd7=_0x9d6749[_0x4481e9(0xb1)],_0x15e782=_0x367fd7['data'];return _0x15e782[_0x4481e9(0xc3)]===0x0?console[_0x4481e9(0xa5)](_0x4481e9(0xa8)):console[_0x4481e9(0xa5)]('✔\x20Retrieved\x20'+_0x15e782[_0x4481e9(0xc3)]+_0x4481e9(0xc4)+(_0x15e782[_0x4481e9(0xc3)]!==0x1?'s':'')+_0x4481e9(0xbb)+_0x1a09ce),await handleSDKOutput(_0x15e782,_0x324d4d),0x0;}catch(_0x30185f){if(_0x30185f instanceof SDKError)return console[_0x4481e9(0xa5)]('Error:\x20'+_0x30185f['message']),_0x30185f['cause']&&console[_0x4481e9(0xa5)](_0x4481e9(0xa6)+_0x30185f[_0x4481e9(0xc1)]),0x1;throw _0x30185f;}}[a29_0x5949a7(0xb4)](_0x164ccd){const _0x37a422=a29_0x5949a7;if(_0x164ccd['args'][_0x37a422(0xc3)]===0x0)return _0x37a422(0xa1);if(_0x164ccd[_0x37a422(0xa2)][_0x37a422(0xc3)]>0x1)return'Too\x20many\x20arguments\x0aUsage:\x20tdx\x20show\x20<database.table>\x0a\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--database\x20<database>\x0a\x0aRun\x20\x27tdx\x20show\x20--help\x27\x20for\x20more\x20options';return undefined;}}
@@ -1 +1 @@
1
- function a30_0x3b29(_0x267f01,_0x3637b8){const _0x7d7b0d=a30_0x7d7b();return a30_0x3b29=function(_0x3b295c,_0x449969){_0x3b295c=_0x3b295c-0xd7;let _0x56995d=_0x7d7b0d[_0x3b295c];return _0x56995d;},a30_0x3b29(_0x267f01,_0x3637b8);}const a30_0x538211=a30_0x3b29;(function(_0x1dde5f,_0x34780a){const _0x201d05=a30_0x3b29,_0x2f9647=_0x1dde5f();while(!![]){try{const _0x117afa=parseInt(_0x201d05(0xed))/0x1*(parseInt(_0x201d05(0xf0))/0x2)+-parseInt(_0x201d05(0xe4))/0x3*(-parseInt(_0x201d05(0xe7))/0x4)+parseInt(_0x201d05(0x101))/0x5*(parseInt(_0x201d05(0xeb))/0x6)+-parseInt(_0x201d05(0xdd))/0x7+-parseInt(_0x201d05(0x104))/0x8+parseInt(_0x201d05(0xf3))/0x9+parseInt(_0x201d05(0x10b))/0xa*(-parseInt(_0x201d05(0xe0))/0xb);if(_0x117afa===_0x34780a)break;else _0x2f9647['push'](_0x2f9647['shift']());}catch(_0xbcf167){_0x2f9647['push'](_0x2f9647['shift']());}}}(a30_0x7d7b,0xa7940));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';function a30_0x7d7b(){const _0x22156d=['Error:\x20','cause','table','limit','5928530ncWYjh','\x20\x20tdx\x20tables\x20\x22mydb.users\x22\x20\x20\x20\x20->\x20table\x20\x22users\x22\x20in\x20database\x20mydb','tables','Error:\x20Pattern\x20\x27','\x20\x20tdx\x20tables\x20users\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20->\x20table\x20\x22users\x22\x20across\x20all\x20databases','name','verbose','2044546XgHRkZ','.*\x22','data','33rLXYxm','description','\x20\x20Use:\x20tdx\x20tables\x20\x22','\x20\x20tdx\x20tables\x20--in\x20mydb\x20\x20\x20\x20\x20\x20\x20->\x20all\x20tables\x20from\x20mydb','9NCIogC','\x20\x20tdx\x20tables\x20\x22mydb.*\x22\x20\x20\x20\x20\x20\x20\x20\x20->\x20all\x20tables\x20from\x20mydb','site','1312232ACxJNk','\x27\x20across\x20all\x20databases.','database','\x20\x20tdx\x20tables\x20\x22*.user*\x22\x20\x20\x20\x20\x20\x20\x20->\x20tables\x20matching\x20user*\x20across\x20databases','419082ldZwAS','list','526423ftpqof','Database:\x20all','\x20\x20Or:\x20\x20tdx\x20tables\x20--in\x20','2uYAnZC','message','Site:\x20','3441942NVBbKb','\x27\x20may\x20not\x20exist\x20or\x20contains\x20no\x20tables','error','Table\x20pattern:\x20','Did\x20you\x20mean\x20to\x20list\x20all\x20tables\x20from\x20database\x20\x27','\x20\x20Or:\x20\x20tdx\x20tables\x20--database\x20','\x27\x20is\x20ambiguous.','execute','includes','Error:\x20Too\x20many\x20arguments.\x20Use\x20single\x20argument:','Database\x20pattern:\x20','validate','✔\x20Found\x20','Note:\x20\x27','80GYToaY','\x20\x20Cause:\x20','\x27\x20without\x20wildcards\x20would\x20search\x20for\x20tables\x20named\x20\x27','2028400kaiaOA','length','\x20table'];a30_0x7d7b=function(){return _0x22156d;};return a30_0x7d7b();}import{DEFAULT_LISTING_LIMIT,resolveLimit}from'../utils/constants.js';import{withSpinner}from'../utils/spinner.js';export class TablesCommand extends BaseCommand{[a30_0x538211(0xdb)]=a30_0x538211(0xd8);[a30_0x538211(0xe1)]='List\x20tables\x20in\x20a\x20database';async[a30_0x538211(0xfa)](_0x2cc64f){const _0x5527aa=a30_0x538211,{options:_0x21f8e3,args:_0x218ea2,tdx:_0x569f01}=_0x2cc64f;let _0x3d1f61;if(_0x218ea2['length']===0x0)_0x3d1f61={'database':undefined,'table':undefined,'original':''};else{if(_0x218ea2[_0x5527aa(0x105)]===0x1)try{_0x3d1f61=parseTableReference(_0x218ea2[0x0]);if(_0x3d1f61[_0x5527aa(0x109)]&&!_0x3d1f61['database']&&!_0x3d1f61[_0x5527aa(0x109)][_0x5527aa(0xfb)]('*')&&!_0x3d1f61[_0x5527aa(0x109)][_0x5527aa(0xfb)]('?'))return console[_0x5527aa(0xf5)](_0x5527aa(0xd9)+_0x218ea2[0x0]+_0x5527aa(0xf9)),console[_0x5527aa(0xf5)](_0x5527aa(0xf7)+_0x3d1f61[_0x5527aa(0x109)]+'\x27?'),console[_0x5527aa(0xf5)](_0x5527aa(0xe2)+_0x3d1f61['table']+_0x5527aa(0xde)),console[_0x5527aa(0xf5)](_0x5527aa(0xef)+_0x3d1f61[_0x5527aa(0x109)]),console[_0x5527aa(0xf5)](_0x5527aa(0xf8)+_0x3d1f61[_0x5527aa(0x109)]),console[_0x5527aa(0xf5)](''),console['error'](_0x5527aa(0x100)+_0x218ea2[0x0]+_0x5527aa(0x103)+_0x3d1f61['table']+_0x5527aa(0xe8)),0x1;}catch(_0x3700bb){return console[_0x5527aa(0xf5)](_0x5527aa(0x107)+_0x3700bb[_0x5527aa(0xf1)]),0x1;}else return console['error'](_0x5527aa(0xfc)),console['error'](_0x5527aa(0xda)),console[_0x5527aa(0xf5)](_0x5527aa(0xe5)),console[_0x5527aa(0xf5)](_0x5527aa(0xd7)),console[_0x5527aa(0xf5)](_0x5527aa(0xea)),console['error']('Or\x20use\x20--in\x20flag:'),console['error'](_0x5527aa(0xe3)),0x1;}const _0x44c3e7=_0x21f8e3[_0x5527aa(0xe9)];!_0x3d1f61[_0x5527aa(0xe9)]&&_0x44c3e7&&(_0x3d1f61[_0x5527aa(0xe9)]=_0x44c3e7);try{const _0x40aa6c=_0x1a4ccb=>_0x1a4ccb&&(_0x1a4ccb[_0x5527aa(0xfb)]('*')||_0x1a4ccb[_0x5527aa(0xfb)]('?')),_0x12a9ef=_0x40aa6c(_0x3d1f61[_0x5527aa(0xe9)]);_0x21f8e3[_0x5527aa(0xdc)]&&(console['error'](_0x5527aa(0xf2)+_0x21f8e3[_0x5527aa(0xe6)]),_0x3d1f61['database']?_0x12a9ef?console['error'](_0x5527aa(0xfd)+_0x3d1f61[_0x5527aa(0xe9)]):console[_0x5527aa(0xf5)]('Database:\x20'+_0x3d1f61['database']):console[_0x5527aa(0xf5)](_0x5527aa(0xee)),_0x3d1f61['table']&&console[_0x5527aa(0xf5)](_0x5527aa(0xf6)+_0x3d1f61['table']));const _0x58e18b=_0x3d1f61[_0x5527aa(0xe9)]&&!_0x12a9ef?_0x3d1f61['database']:undefined,_0x5e81f6=_0x12a9ef?_0x3d1f61['database']:undefined,_0x23015b=_0x3d1f61[_0x5527aa(0x109)],_0x3f3f3d=resolveLimit(_0x21f8e3[_0x5527aa(0x10a)],DEFAULT_LISTING_LIMIT),_0x39f441=await withSpinner('Listing\x20tables...',()=>_0x569f01['table'][_0x5527aa(0xec)](_0x58e18b,_0x23015b,_0x5e81f6,_0x3f3f3d),{'verbose':_0x21f8e3['verbose']}),_0x3b5550=_0x39f441[_0x5527aa(0xdf)];if(_0x3b5550['length']===0x0&&_0x3d1f61[_0x5527aa(0xe9)]&&!_0x12a9ef)return console[_0x5527aa(0xf5)]('✖\x20No\x20tables\x20found'),console['error']('Database\x20\x27'+_0x3d1f61['database']+_0x5527aa(0xf4)),0x1;return console[_0x5527aa(0xf5)](_0x5527aa(0xff)+_0x3b5550[_0x5527aa(0x105)]+_0x5527aa(0x106)+(_0x3b5550[_0x5527aa(0x105)]!==0x1?'s':'')),await handleSDKOutput(_0x3b5550,{..._0x21f8e3,'limit':_0x3f3f3d}),0x0;}catch(_0x9333dd){if(_0x9333dd instanceof SDKError)return console[_0x5527aa(0xf5)](_0x5527aa(0x107)+_0x9333dd[_0x5527aa(0xf1)]),_0x9333dd[_0x5527aa(0x108)]&&console[_0x5527aa(0xf5)](_0x5527aa(0x102)+_0x9333dd[_0x5527aa(0x108)]),0x1;throw _0x9333dd;}}[a30_0x538211(0xfe)](_0x1c7d16){return undefined;}}
1
+ const a30_0x313b42=a30_0x2d1b;function a30_0x2d1b(_0x5647da,_0x37a624){const _0x590f64=a30_0x590f();return a30_0x2d1b=function(_0x2d1bb7,_0x5cda82){_0x2d1bb7=_0x2d1bb7-0x1b6;let _0x3d8ab9=_0x590f64[_0x2d1bb7];return _0x3d8ab9;},a30_0x2d1b(_0x5647da,_0x37a624);}(function(_0x1754c1,_0x35743f){const _0x32fe49=a30_0x2d1b,_0x2958d1=_0x1754c1();while(!![]){try{const _0x44527f=-parseInt(_0x32fe49(0x1bd))/0x1*(parseInt(_0x32fe49(0x1be))/0x2)+parseInt(_0x32fe49(0x1cd))/0x3*(parseInt(_0x32fe49(0x1c6))/0x4)+-parseInt(_0x32fe49(0x1cb))/0x5*(parseInt(_0x32fe49(0x1d3))/0x6)+parseInt(_0x32fe49(0x1d0))/0x7+-parseInt(_0x32fe49(0x1cc))/0x8+-parseInt(_0x32fe49(0x1d1))/0x9+-parseInt(_0x32fe49(0x1d4))/0xa*(-parseInt(_0x32fe49(0x1ca))/0xb);if(_0x44527f===_0x35743f)break;else _0x2958d1['push'](_0x2958d1['shift']());}catch(_0x37e355){_0x2958d1['push'](_0x2958d1['shift']());}}}(a30_0x590f,0xb3486));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleSDKOutput}from'../utils/command-output.js';import{parseTableReference}from'../utils/table-ref-parser.js';import{DEFAULT_LISTING_LIMIT,resolveLimit}from'../utils/constants.js';import{withSpinner}from'../utils/spinner.js';export class TablesCommand extends BaseCommand{[a30_0x313b42(0x1de)]=a30_0x313b42(0x1b6);['description']=a30_0x313b42(0x1d7);async[a30_0x313b42(0x1c9)](_0x1646fd){const _0x283472=a30_0x313b42,{options:_0x41eeec,args:_0x4da144,tdx:_0x144f85}=_0x1646fd;let _0x15beb6;if(_0x4da144[_0x283472(0x1c2)]===0x0)_0x15beb6={'database':undefined,'table':undefined,'original':''};else{if(_0x4da144[_0x283472(0x1c2)]===0x1)try{_0x15beb6=parseTableReference(_0x4da144[0x0]);if(_0x15beb6[_0x283472(0x1c3)]&&!_0x15beb6[_0x283472(0x1d8)]&&!_0x15beb6[_0x283472(0x1c3)]['includes']('*')&&!_0x15beb6[_0x283472(0x1c3)]['includes']('?'))return console[_0x283472(0x1db)](_0x283472(0x1c5)+_0x4da144[0x0]+_0x283472(0x1cf)),console[_0x283472(0x1db)]('Did\x20you\x20mean\x20to\x20list\x20all\x20tables\x20from\x20database\x20\x27'+_0x15beb6['table']+'\x27?'),console['error']('\x20\x20Use:\x20tdx\x20tables\x20\x22'+_0x15beb6[_0x283472(0x1c3)]+_0x283472(0x1d9)),console[_0x283472(0x1db)]('\x20\x20Or:\x20\x20tdx\x20tables\x20--in\x20'+_0x15beb6[_0x283472(0x1c3)]),console['error'](_0x283472(0x1bb)+_0x15beb6[_0x283472(0x1c3)]),console[_0x283472(0x1db)](''),console[_0x283472(0x1db)](_0x283472(0x1bc)+_0x4da144[0x0]+_0x283472(0x1bf)+_0x15beb6[_0x283472(0x1c3)]+_0x283472(0x1c7)),0x1;}catch(_0x2fff28){return console[_0x283472(0x1db)](_0x283472(0x1e0)+_0x2fff28['message']),0x1;}else return console[_0x283472(0x1db)]('Error:\x20Too\x20many\x20arguments.\x20Use\x20single\x20argument:'),console[_0x283472(0x1db)]('\x20\x20tdx\x20tables\x20users\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20->\x20table\x20\x22users\x22\x20across\x20all\x20databases'),console['error'](_0x283472(0x1df)),console['error'](_0x283472(0x1c1)),console['error'](_0x283472(0x1c0)),console[_0x283472(0x1db)]('Or\x20use\x20--in\x20flag:'),console[_0x283472(0x1db)]('\x20\x20tdx\x20tables\x20--in\x20mydb\x20\x20\x20\x20\x20\x20\x20->\x20all\x20tables\x20from\x20mydb'),0x1;}const _0x32ccee=_0x41eeec[_0x283472(0x1d8)];!_0x15beb6[_0x283472(0x1d8)]&&_0x32ccee&&(_0x15beb6[_0x283472(0x1d8)]=_0x32ccee);try{const _0x2776dd=_0x13a5e2=>_0x13a5e2&&(_0x13a5e2[_0x283472(0x1ce)]('*')||_0x13a5e2['includes']('?')),_0x4468fd=_0x2776dd(_0x15beb6[_0x283472(0x1d8)]);_0x41eeec[_0x283472(0x1ba)]&&(console[_0x283472(0x1db)]('Site:\x20'+_0x41eeec[_0x283472(0x1da)]),_0x15beb6[_0x283472(0x1d8)]?_0x4468fd?console[_0x283472(0x1db)](_0x283472(0x1b7)+_0x15beb6[_0x283472(0x1d8)]):console['error'](_0x283472(0x1dd)+_0x15beb6[_0x283472(0x1d8)]):console[_0x283472(0x1db)]('Database:\x20all'),_0x15beb6[_0x283472(0x1c3)]&&console[_0x283472(0x1db)]('Table\x20pattern:\x20'+_0x15beb6['table']));const _0x5bed0c=_0x15beb6['database']&&!_0x4468fd?_0x15beb6[_0x283472(0x1d8)]:undefined,_0xa4c0b6=_0x4468fd?_0x15beb6[_0x283472(0x1d8)]:undefined,_0x345254=_0x15beb6['table'],_0x22fade=resolveLimit(_0x41eeec[_0x283472(0x1c4)],DEFAULT_LISTING_LIMIT),_0x52059e=await withSpinner(_0x283472(0x1d6),()=>_0x144f85[_0x283472(0x1c3)][_0x283472(0x1c8)](_0x5bed0c,_0x345254,_0xa4c0b6,_0x22fade),{'verbose':_0x41eeec[_0x283472(0x1ba)]}),_0x4cc518=_0x52059e[_0x283472(0x1b8)];if(_0x4cc518[_0x283472(0x1c2)]===0x0&&_0x15beb6[_0x283472(0x1d8)]&&!_0x4468fd)return console[_0x283472(0x1db)](_0x283472(0x1dc)),console[_0x283472(0x1db)](_0x283472(0x1d5)+_0x15beb6[_0x283472(0x1d8)]+'\x27\x20may\x20not\x20exist\x20or\x20contains\x20no\x20tables'),0x1;return console[_0x283472(0x1db)]('✔\x20Found\x20'+_0x4cc518[_0x283472(0x1c2)]+_0x283472(0x1d2)+(_0x4cc518['length']!==0x1?'s':'')),await handleSDKOutput(_0x4cc518,{..._0x41eeec,'limit':_0x22fade}),0x0;}catch(_0x1c417d){if(_0x1c417d instanceof SDKError)return console['error']('Error:\x20'+_0x1c417d['message']),_0x1c417d[_0x283472(0x1b9)]&&console[_0x283472(0x1db)]('\x20\x20Cause:\x20'+_0x1c417d[_0x283472(0x1b9)]),0x1;throw _0x1c417d;}}['validate'](_0x54a4fc){return undefined;}}function a30_0x590f(){const _0x46be64=['limit','Error:\x20Pattern\x20\x27','36JlFAkf','\x27\x20across\x20all\x20databases.','list','execute','11qeHaDi','1094055WddyWg','3044712dgQNNA','118578hZRCtI','includes','\x27\x20is\x20ambiguous.','7380800BZACFy','4798728nrwyqW','\x20table','30iGTmPv','23136130eSKwlY','Database\x20\x27','Listing\x20tables...','List\x20tables\x20in\x20a\x20database','database','.*\x22','site','error','✖\x20No\x20tables\x20found','Database:\x20','name','\x20\x20tdx\x20tables\x20\x22mydb.*\x22\x20\x20\x20\x20\x20\x20\x20\x20->\x20all\x20tables\x20from\x20mydb','Error:\x20','tables','Database\x20pattern:\x20','data','cause','verbose','\x20\x20Or:\x20\x20tdx\x20tables\x20--database\x20','Note:\x20\x27','981569KdrgiS','2VjFaum','\x27\x20without\x20wildcards\x20would\x20search\x20for\x20tables\x20named\x20\x27','\x20\x20tdx\x20tables\x20\x22*.user*\x22\x20\x20\x20\x20\x20\x20\x20->\x20tables\x20matching\x20user*\x20across\x20databases','\x20\x20tdx\x20tables\x20\x22mydb.users\x22\x20\x20\x20\x20->\x20table\x20\x22users\x22\x20in\x20database\x20mydb','length','table'];a30_0x590f=function(){return _0x46be64;};return a30_0x590f();}
@@ -1 +1 @@
1
- const a31_0x540c43=a31_0x3326;function a31_0xf792(){const _0x6fcf1d=['\x0aRun\x20\x27tdx\x20use\x20--help\x27\x20for\x20more\x20options','error','Session\x20profile\x20set\x20to:\x20','\x20(session:\x20','Invalid\x20resource:\x20','includes','776531tcDxpz','1447023XktCEw','Usage:\x20tdx\x20use\x20<resource>\x20<value>\x0a','Session\x20llm_project\x20set\x20to:\x20','profile','Or\x20use:\x20tdx\x20context\x20--clear\x20to\x20clear\x20session\x20context\x0a','115ZDOIgm','.\x20Must\x20be\x20one\x20of:\x20','4983424VZoPeN','18rkXNyG','56982CmZgYY','session','llm_project','2477488HnQLwt','\x0aUse\x20\x27tdx\x20profiles\x27\x20to\x20see\x20available\x20profiles','1675830JGsRGV','Session\x20parent_segment\x20set\x20to:\x20','Error:\x20Profile\x20\x27','184XsZSKo','\x0aTip:\x20Use\x20\x27tdx\x20context\x20--clear\x27\x20to\x20clear\x20session\x20overrides','parent_segment','log','Session\x20database\x20set\x20to:\x20','2764JxuuPa','database','toString','name'];a31_0xf792=function(){return _0x6fcf1d;};return a31_0xf792();}(function(_0x5935b4,_0x2e334f){const _0x1538ff=a31_0x3326,_0x5c4f0e=_0x5935b4();while(!![]){try{const _0x3e3f14=parseInt(_0x1538ff(0x195))/0x1*(parseInt(_0x1538ff(0x19a))/0x2)+-parseInt(_0x1538ff(0x1a5))/0x3+parseInt(_0x1538ff(0x190))/0x4+parseInt(_0x1538ff(0x189))/0x5*(parseInt(_0x1538ff(0x18d))/0x6)+parseInt(_0x1538ff(0x1a4))/0x7+-parseInt(_0x1538ff(0x18b))/0x8+parseInt(_0x1538ff(0x18c))/0x9*(parseInt(_0x1538ff(0x192))/0xa);if(_0x3e3f14===_0x2e334f)break;else _0x5c4f0e['push'](_0x5c4f0e['shift']());}catch(_0x1af49d){_0x5c4f0e['push'](_0x5c4f0e['shift']());}}}(a31_0xf792,0x69b19));import{BaseCommand}from'./command.js';import{saveSessionContext,getCurrentSessionPID}from'../core/session.js';import{profileExists}from'../core/profile.js';function a31_0x3326(_0x2da475,_0x2d4c15){const _0xf7928b=a31_0xf792();return a31_0x3326=function(_0x332698,_0x73832){_0x332698=_0x332698-0x188;let _0x419d92=_0xf7928b[_0x332698];return _0x419d92;},a31_0x3326(_0x2da475,_0x2d4c15);}export class UseCommand extends BaseCommand{[a31_0x540c43(0x19d)]='use';['description']='Set\x20session-level\x20context';['validate'](_0x2309db){const _0x540898=a31_0x540c43,{args:_0x34cde9}=_0x2309db;if(_0x34cde9['length']<0x2)return _0x540898(0x1a6)+'Resources:\x20database,\x20parent_segment,\x20llm_project,\x20profile\x0a'+_0x540898(0x188)+_0x540898(0x19e);const _0x358178=_0x34cde9[0x0],_0x5e040e=[_0x540898(0x19b),'parent_segment',_0x540898(0x18f),_0x540898(0x1a8)];if(!_0x5e040e[_0x540898(0x1a3)](_0x358178))return _0x540898(0x1a2)+_0x358178+_0x540898(0x18a)+_0x5e040e['join'](',\x20');return undefined;}async['execute'](_0x241145){const _0x2a822c=a31_0x540c43,{args:_0x3e948c,options:_0x143391}=_0x241145;try{const _0x5d6186=_0x3e948c[0x0],_0x21e311=_0x3e948c[0x1];if(_0x5d6186===_0x2a822c(0x1a8)){if(!profileExists(_0x21e311))return console['error'](_0x2a822c(0x194)+_0x21e311+'\x27\x20does\x20not\x20exist'),console[_0x2a822c(0x19f)](_0x2a822c(0x191)),0x1;const _0x35d20f=_0x143391[_0x2a822c(0x18e)]||getCurrentSessionPID()[_0x2a822c(0x19c)]();return saveSessionContext({'profile':_0x21e311},_0x143391[_0x2a822c(0x18e)]),console[_0x2a822c(0x198)](_0x2a822c(0x1a0)+_0x21e311+_0x2a822c(0x1a1)+_0x35d20f+')'),console[_0x2a822c(0x198)](_0x2a822c(0x196)),0x0;}const _0x1deb37={},_0x2a3471=_0x143391[_0x2a822c(0x18e)]||getCurrentSessionPID()[_0x2a822c(0x19c)]();switch(_0x5d6186){case _0x2a822c(0x19b):_0x1deb37[_0x2a822c(0x19b)]=_0x21e311,console[_0x2a822c(0x198)](_0x2a822c(0x199)+_0x21e311+_0x2a822c(0x1a1)+_0x2a3471+')');break;case'parent_segment':_0x1deb37[_0x2a822c(0x197)]=_0x21e311,console[_0x2a822c(0x198)](_0x2a822c(0x193)+_0x21e311+_0x2a822c(0x1a1)+_0x2a3471+')');break;case _0x2a822c(0x18f):_0x1deb37[_0x2a822c(0x18f)]=_0x21e311,console[_0x2a822c(0x198)](_0x2a822c(0x1a7)+_0x21e311+'\x20(session:\x20'+_0x2a3471+')');break;}return saveSessionContext(_0x1deb37,_0x143391[_0x2a822c(0x18e)]),console[_0x2a822c(0x198)](_0x2a822c(0x196)),0x0;}catch(_0x2d7225){return _0x2d7225 instanceof Error&&console[_0x2a822c(0x19f)]('Error:\x20'+_0x2d7225['message']),0x1;}}}
1
+ const a31_0x6676f5=a31_0x7f47;(function(_0x4e84f5,_0x519489){const _0x440e85=a31_0x7f47,_0x5e69b9=_0x4e84f5();while(!![]){try{const _0x5fe268=-parseInt(_0x440e85(0x124))/0x1+parseInt(_0x440e85(0x127))/0x2*(parseInt(_0x440e85(0x120))/0x3)+-parseInt(_0x440e85(0x134))/0x4*(-parseInt(_0x440e85(0x121))/0x5)+-parseInt(_0x440e85(0x126))/0x6+-parseInt(_0x440e85(0x11b))/0x7*(parseInt(_0x440e85(0x12a))/0x8)+parseInt(_0x440e85(0x131))/0x9+-parseInt(_0x440e85(0x12b))/0xa*(-parseInt(_0x440e85(0x11a))/0xb);if(_0x5fe268===_0x519489)break;else _0x5e69b9['push'](_0x5e69b9['shift']());}catch(_0x4844b2){_0x5e69b9['push'](_0x5e69b9['shift']());}}}(a31_0x3729,0xe2d2a));import{BaseCommand}from'./command.js';import{saveSessionContext,getCurrentSessionPID}from'../core/session.js';function a31_0x3729(){const _0xf2d562=['Error:\x20','message','252456dLsnaE','parent_segment','10755240mteYBt','547710UzkiQE','Set\x20session-level\x20context','\x20(session:\x20','24ChePtz','40cFKixe','Usage:\x20tdx\x20use\x20<resource>\x20<value>\x0a','execute','profile','toString','Error:\x20Profile\x20\x27','9079686oJqaax','Invalid\x20resource:\x20','\x27\x20does\x20not\x20exist','5596824owvhZN','\x0aTip:\x20Use\x20\x27tdx\x20context\x20--clear\x27\x20to\x20clear\x20session\x20overrides','database','length','use','error','\x0aUse\x20\x27tdx\x20profiles\x27\x20to\x20see\x20available\x20profiles','Or\x20use:\x20tdx\x20context\x20--clear\x20to\x20clear\x20session\x20context\x0a','session','1874411civZey','908733VGYGOo','Session\x20database\x20set\x20to:\x20','.\x20Must\x20be\x20one\x20of:\x20','log','join','3AfNUuu','5zAJuxG'];a31_0x3729=function(){return _0xf2d562;};return a31_0x3729();}function a31_0x7f47(_0x548bf9,_0x550134){const _0x37299b=a31_0x3729();return a31_0x7f47=function(_0x7f474d,_0x14c79a){_0x7f474d=_0x7f474d-0x113;let _0x128869=_0x37299b[_0x7f474d];return _0x128869;},a31_0x7f47(_0x548bf9,_0x550134);}import{profileExists}from'../core/profile.js';export class UseCommand extends BaseCommand{['name']=a31_0x6676f5(0x115);['description']=a31_0x6676f5(0x128);['validate'](_0xb2815){const _0x2e6ed8=a31_0x6676f5,{args:_0x54d0b6}=_0xb2815;if(_0x54d0b6[_0x2e6ed8(0x114)]<0x2)return _0x2e6ed8(0x12c)+'Resources:\x20database,\x20parent_segment,\x20llm_project,\x20profile\x0a'+_0x2e6ed8(0x118)+'\x0aRun\x20\x27tdx\x20use\x20--help\x27\x20for\x20more\x20options';const _0x509cf2=_0x54d0b6[0x0],_0x35802d=[_0x2e6ed8(0x113),'parent_segment','llm_project',_0x2e6ed8(0x12e)];if(!_0x35802d['includes'](_0x509cf2))return _0x2e6ed8(0x132)+_0x509cf2+_0x2e6ed8(0x11d)+_0x35802d[_0x2e6ed8(0x11f)](',\x20');return undefined;}async[a31_0x6676f5(0x12d)](_0x128a9a){const _0x4437e5=a31_0x6676f5,{args:_0x243882,options:_0x4b607c}=_0x128a9a;try{const _0x32fb7a=_0x243882[0x0],_0x3b7517=_0x243882[0x1];if(_0x32fb7a==='profile'){if(!profileExists(_0x3b7517))return console[_0x4437e5(0x116)](_0x4437e5(0x130)+_0x3b7517+_0x4437e5(0x133)),console[_0x4437e5(0x116)](_0x4437e5(0x117)),0x1;const _0x4210c6=_0x4b607c[_0x4437e5(0x119)]||getCurrentSessionPID()[_0x4437e5(0x12f)]();return saveSessionContext({'profile':_0x3b7517},_0x4b607c['session']),console['log']('Session\x20profile\x20set\x20to:\x20'+_0x3b7517+'\x20(session:\x20'+_0x4210c6+')'),console[_0x4437e5(0x11e)](_0x4437e5(0x135)),0x0;}const _0x55e89f={},_0xd71ff0=_0x4b607c['session']||getCurrentSessionPID()[_0x4437e5(0x12f)]();switch(_0x32fb7a){case'database':_0x55e89f[_0x4437e5(0x113)]=_0x3b7517,console[_0x4437e5(0x11e)](_0x4437e5(0x11c)+_0x3b7517+_0x4437e5(0x129)+_0xd71ff0+')');break;case _0x4437e5(0x125):_0x55e89f['parent_segment']=_0x3b7517,console[_0x4437e5(0x11e)]('Session\x20parent_segment\x20set\x20to:\x20'+_0x3b7517+_0x4437e5(0x129)+_0xd71ff0+')');break;case'llm_project':_0x55e89f['llm_project']=_0x3b7517,console[_0x4437e5(0x11e)]('Session\x20llm_project\x20set\x20to:\x20'+_0x3b7517+_0x4437e5(0x129)+_0xd71ff0+')');break;}return saveSessionContext(_0x55e89f,_0x4b607c[_0x4437e5(0x119)]),console['log'](_0x4437e5(0x135)),0x0;}catch(_0x4803b1){return _0x4803b1 instanceof Error&&console[_0x4437e5(0x116)](_0x4437e5(0x122)+_0x4803b1[_0x4437e5(0x123)]),0x1;}}}
@@ -1 +1 @@
1
- const a32_0x48b085=a32_0x4638;(function(_0x4abf6e,_0x1d2eab){const _0x13967a=a32_0x4638,_0x28a626=_0x4abf6e();while(!![]){try{const _0x14865f=parseInt(_0x13967a(0x159))/0x1*(-parseInt(_0x13967a(0x157))/0x2)+parseInt(_0x13967a(0x183))/0x3*(parseInt(_0x13967a(0x164))/0x4)+parseInt(_0x13967a(0x185))/0x5*(-parseInt(_0x13967a(0x19f))/0x6)+parseInt(_0x13967a(0x198))/0x7+parseInt(_0x13967a(0x178))/0x8*(parseInt(_0x13967a(0x16c))/0x9)+-parseInt(_0x13967a(0x16e))/0xa*(-parseInt(_0x13967a(0x1c1))/0xb)+-parseInt(_0x13967a(0x1b3))/0xc;if(_0x14865f===_0x1d2eab)break;else _0x28a626['push'](_0x28a626['shift']());}catch(_0xc6e640){_0x28a626['push'](_0x28a626['shift']());}}}(a32_0x198f,0x24854));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_0x48b085(0x1b9)]=a32_0x48b085(0x1c4);[a32_0x48b085(0x15f)]=a32_0x48b085(0x16d);async[a32_0x48b085(0x1b6)](_0x5441f8){const _0x314165=a32_0x48b085,{options:_0x5acca1,args:_0x27d783,tdx:_0x1c5677}=_0x5441f8,_0x4a6ab7=_0x27d783[0x0];try{_0x5acca1['verbose']&&_0x4a6ab7&&console[_0x314165(0x18f)](_0x314165(0x14c)+_0x4a6ab7);const _0x4c8b9c=await withSpinner(_0x314165(0x1a4),()=>_0x1c5677[_0x314165(0x147)][_0x314165(0x18b)](_0x4a6ab7,{'limit':_0x5acca1[_0x314165(0x19d)]}),{'verbose':_0x5acca1[_0x314165(0x146)]}),_0x283c71=_0x4c8b9c[_0x314165(0x162)];return console['error']('✔\x20Found\x20'+_0x283c71['length']+'\x20project'+(_0x283c71[_0x314165(0x187)]!==0x1?'s':'')),await handleSDKOutput(_0x283c71,_0x5acca1),0x0;}catch(_0x2bcfae){if(_0x2bcfae instanceof SDKError)return console[_0x314165(0x18f)](_0x314165(0x18e)+_0x2bcfae[_0x314165(0x165)]),_0x2bcfae[_0x314165(0x170)]&&console[_0x314165(0x18f)](_0x314165(0x1be)+_0x2bcfae[_0x314165(0x170)]),0x1;throw _0x2bcfae;}}}export class WorkflowWorkflowsCommand extends BaseCommand{['name']=a32_0x48b085(0x17a);[a32_0x48b085(0x15f)]=a32_0x48b085(0x1a0);async['execute'](_0x37f15e){const _0x2b6081=a32_0x48b085,{options:_0x13107a,args:_0x5438e9,tdx:_0x34526a}=_0x37f15e,_0x3f9c84=_0x5438e9[0x0];try{_0x13107a[_0x2b6081(0x146)]&&_0x3f9c84&&console['error'](_0x2b6081(0x1a9)+_0x3f9c84);const _0x3a1a6a=await withSpinner(_0x2b6081(0x1b4),()=>_0x34526a[_0x2b6081(0x147)][_0x2b6081(0x171)](_0x3f9c84,{'limit':_0x13107a['limit']}),{'verbose':_0x13107a[_0x2b6081(0x146)]}),_0x2d4ed2=_0x3a1a6a[_0x2b6081(0x162)];return console[_0x2b6081(0x18f)](_0x2b6081(0x197)+_0x2d4ed2[_0x2b6081(0x187)]+_0x2b6081(0x17b)+(_0x2d4ed2['length']!==0x1?'s':'')),await handleSDKOutput(_0x2d4ed2,_0x13107a),0x0;}catch(_0x2fa1d7){if(_0x2fa1d7 instanceof SDKError)return console['error'](_0x2b6081(0x18e)+_0x2fa1d7[_0x2b6081(0x165)]),_0x2fa1d7['cause']&&console[_0x2b6081(0x18f)](_0x2b6081(0x1be)+_0x2fa1d7['cause']),0x1;throw _0x2fa1d7;}}}export class WorkflowSessionsCommand extends BaseCommand{['name']=a32_0x48b085(0x17f);['description']=a32_0x48b085(0x179);async[a32_0x48b085(0x1b6)](_0x47a1d0){const _0x3332ec=a32_0x48b085,{options:_0x3c2228,args:_0x35164c,tdx:_0xd6e181}=_0x47a1d0;let _0x29c14a,_0x2fc659;if(_0x35164c[0x0]){const _0x48a907=_0x35164c[0x0][_0x3332ec(0x14a)]('.');if(_0x48a907[_0x3332ec(0x187)]===0x1)_0x29c14a=_0x48a907[0x0];else{if(_0x48a907['length']===0x2)[_0x29c14a,_0x2fc659]=_0x48a907;else return console[_0x3332ec(0x18f)](_0x3332ec(0x1c2)),0x1;}}try{if(_0x3c2228[_0x3332ec(0x146)]){if(_0x29c14a&&_0x2fc659)console[_0x3332ec(0x18f)](_0x3332ec(0x163)+_0x29c14a+'.'+_0x2fc659);else _0x29c14a&&console['error']('Filter:\x20project='+_0x29c14a);const _0xa1d4a8=_0x3c2228[_0x3332ec(0x1ba)];_0xa1d4a8&&console['error'](_0x3332ec(0x1b7)+_0xa1d4a8);}const _0x289175=await withSpinner('Listing\x20workflow\x20sessions...',()=>_0xd6e181['workflow'][_0x3332ec(0x143)]({'projectName':_0x29c14a,'workflowName':_0x2fc659,'status':_0x3c2228[_0x3332ec(0x1ba)],'fromTime':_0x3c2228[_0x3332ec(0x188)],'toTime':_0x3c2228['to'],'limit':_0x3c2228[_0x3332ec(0x19d)]}),{'verbose':_0x3c2228['verbose']}),_0x37dc06=_0x289175[_0x3332ec(0x162)];return console[_0x3332ec(0x18f)](_0x3332ec(0x197)+_0x37dc06[_0x3332ec(0x187)]+_0x3332ec(0x1ab)+(_0x37dc06[_0x3332ec(0x187)]!==0x1?'s':'')),await handleSDKOutput(_0x37dc06,_0x3c2228),0x0;}catch(_0x33d41f){if(_0x33d41f instanceof SDKError)return console[_0x3332ec(0x18f)]('Error:\x20'+_0x33d41f[_0x3332ec(0x165)]),_0x33d41f[_0x3332ec(0x170)]&&console[_0x3332ec(0x18f)](_0x3332ec(0x1be)+_0x33d41f[_0x3332ec(0x170)]),0x1;throw _0x33d41f;}}}export class WorkflowAttemptsCommand extends BaseCommand{[a32_0x48b085(0x1b9)]='workflow:attempts';[a32_0x48b085(0x15f)]=a32_0x48b085(0x1a8);async[a32_0x48b085(0x1b6)](_0x4bef0d){const _0x26805c=a32_0x48b085,{options:_0x1a6c44,args:_0x37a093,tdx:_0x3bf59a}=_0x4bef0d;let _0x4bc598,_0x59445b;if(_0x37a093[0x0]){const _0x178740=_0x37a093[0x0][_0x26805c(0x14a)]('.');if(_0x178740[_0x26805c(0x187)]===0x1)_0x4bc598=_0x178740[0x0];else{if(_0x178740[_0x26805c(0x187)]===0x2)[_0x4bc598,_0x59445b]=_0x178740;else return console[_0x26805c(0x18f)](_0x26805c(0x1c2)),0x1;}}try{const _0x4e0ec3=_0x1a6c44[_0x26805c(0x16b)];if(_0x1a6c44[_0x26805c(0x146)]){if(_0x4bc598&&_0x59445b)console[_0x26805c(0x18f)]('Filter:\x20'+_0x4bc598+'.'+_0x59445b);else _0x4bc598&&console[_0x26805c(0x18f)](_0x26805c(0x1af)+_0x4bc598);_0x4e0ec3&&console[_0x26805c(0x18f)]('Include\x20retried:\x20yes');}const _0x2be702=await withSpinner(_0x26805c(0x172),()=>_0x3bf59a[_0x26805c(0x147)]['attempts']({'projectName':_0x4bc598,'workflowName':_0x59445b,'includeRetried':_0x4e0ec3,'limit':_0x1a6c44[_0x26805c(0x19d)]}),{'verbose':_0x1a6c44[_0x26805c(0x146)]}),_0x37f78d=_0x2be702[_0x26805c(0x162)];return console[_0x26805c(0x18f)]('✔\x20Found\x20'+_0x37f78d['length']+_0x26805c(0x181)+(_0x37f78d[_0x26805c(0x187)]!==0x1?'s':'')),await handleSDKOutput(_0x37f78d,_0x1a6c44),0x0;}catch(_0x9c793c){if(_0x9c793c instanceof SDKError)return console[_0x26805c(0x18f)]('Error:\x20'+_0x9c793c['message']),_0x9c793c[_0x26805c(0x170)]&&console[_0x26805c(0x18f)](_0x26805c(0x1be)+_0x9c793c[_0x26805c(0x170)]),0x1;throw _0x9c793c;}}}export class WorkflowAttemptCommand extends BaseCommand{[a32_0x48b085(0x1b9)]=a32_0x48b085(0x15e);['description']=a32_0x48b085(0x1b8);async['execute'](_0x3034fa){const _0x5023c3=a32_0x48b085,{options:_0x497124,args:_0x1cd100,tdx:_0x213b14}=_0x3034fa,_0x7a6042=_0x1cd100[0x0];if(!_0x7a6042)return console[_0x5023c3(0x18f)](_0x5023c3(0x199)),0x1;try{_0x497124[_0x5023c3(0x146)]&&console[_0x5023c3(0x18f)]('Attempt\x20ID:\x20'+_0x7a6042);const _0x2e440f=await withSpinner(_0x5023c3(0x1c0),()=>_0x213b14['workflow'][_0x5023c3(0x175)](_0x7a6042),{'verbose':_0x497124[_0x5023c3(0x146)]}),_0x553359=_0x2e440f[_0x5023c3(0x162)];return await handleSDKOutput([_0x553359],_0x497124),0x0;}catch(_0x272712){if(_0x272712 instanceof SDKError)return console[_0x5023c3(0x18f)](_0x5023c3(0x18e)+_0x272712[_0x5023c3(0x165)]),_0x272712[_0x5023c3(0x170)]&&console[_0x5023c3(0x18f)](_0x5023c3(0x1be)+_0x272712[_0x5023c3(0x170)]),0x1;throw _0x272712;}}}export class WorkflowTasksCommand extends BaseCommand{[a32_0x48b085(0x1b9)]='workflow:tasks';['description']=a32_0x48b085(0x169);async[a32_0x48b085(0x1b6)](_0x303da){const _0x37cd72=a32_0x48b085,{options:_0x1810fe,args:_0x1c234d,tdx:_0x563b67}=_0x303da,_0x1910ea=_0x1c234d[0x0];if(!_0x1910ea)return console[_0x37cd72(0x18f)](_0x37cd72(0x199)),0x1;try{const _0x2dc2ed=_0x1810fe[_0x37cd72(0x19e)];_0x1810fe['verbose']&&(console[_0x37cd72(0x18f)](_0x37cd72(0x180)+_0x1910ea),_0x2dc2ed&&console[_0x37cd72(0x18f)](_0x37cd72(0x16f)));const _0x28a849=await withSpinner(_0x37cd72(0x156),()=>_0x563b67['workflow'][_0x37cd72(0x193)](_0x1910ea,_0x2dc2ed||![]),{'verbose':_0x1810fe[_0x37cd72(0x146)]}),_0x7ae422=_0x28a849[_0x37cd72(0x162)];return console[_0x37cd72(0x18f)](_0x37cd72(0x197)+_0x7ae422['length']+_0x37cd72(0x18c)+(_0x7ae422[_0x37cd72(0x187)]!==0x1?'s':'')),await handleSDKOutput(_0x7ae422,_0x1810fe),0x0;}catch(_0x230ae1){if(_0x230ae1 instanceof SDKError)return console['error'](_0x37cd72(0x18e)+_0x230ae1[_0x37cd72(0x165)]),_0x230ae1['cause']&&console[_0x37cd72(0x18f)](_0x37cd72(0x1be)+_0x230ae1[_0x37cd72(0x170)]),0x1;throw _0x230ae1;}}}export class WorkflowLogsCommand extends BaseCommand{[a32_0x48b085(0x1b9)]=a32_0x48b085(0x1bf);[a32_0x48b085(0x15f)]=a32_0x48b085(0x1ac);async['execute'](_0x42be70){const _0x48ca37=a32_0x48b085,{options:_0xa8499d,args:_0x5e422d,tdx:_0x3cf004}=_0x42be70,_0x536981=_0x5e422d[0x0],_0x1b5e64=_0x5e422d[0x1];if(!_0x536981||!_0x1b5e64)return console['error'](_0x48ca37(0x1a7)),0x1;try{_0xa8499d[_0x48ca37(0x146)]&&(console[_0x48ca37(0x18f)](_0x48ca37(0x180)+_0x536981),console[_0x48ca37(0x18f)]('Task\x20name:\x20'+_0x1b5e64));const _0x5ee59b=_0xa8499d[_0x48ca37(0x152)],_0x2b7395=await withSpinner(_0x48ca37(0x1b5),()=>_0x3cf004[_0x48ca37(0x147)]['logs'](_0x536981,_0x1b5e64,{'offset':_0x5ee59b,'limit':_0xa8499d[_0x48ca37(0x19d)]}),{'verbose':_0xa8499d[_0x48ca37(0x146)]}),_0x15f458=_0x2b7395['data'];return console[_0x48ca37(0x18f)](_0x48ca37(0x197)+_0x15f458[_0x48ca37(0x187)]+_0x48ca37(0x1a2)+(_0x15f458[_0x48ca37(0x187)]!==0x1?'ies':'y')),await handleSDKOutput(_0x15f458,_0xa8499d),0x0;}catch(_0x3bfe31){if(_0x3bfe31 instanceof SDKError)return console[_0x48ca37(0x18f)](_0x48ca37(0x18e)+_0x3bfe31[_0x48ca37(0x165)]),_0x3bfe31[_0x48ca37(0x170)]&&console[_0x48ca37(0x18f)](_0x48ca37(0x1be)+_0x3bfe31[_0x48ca37(0x170)]),0x1;throw _0x3bfe31;}}}export class WorkflowKillCommand extends BaseCommand{[a32_0x48b085(0x1b9)]=a32_0x48b085(0x1b2);[a32_0x48b085(0x15f)]=a32_0x48b085(0x173);async[a32_0x48b085(0x1b6)](_0x1bdf07){const _0x5a9412=a32_0x48b085,{options:_0x481118,args:_0xe80fc6,tdx:_0x2ef98e}=_0x1bdf07,_0x449b17=_0xe80fc6[0x0];if(!_0x449b17)return console[_0x5a9412(0x18f)](_0x5a9412(0x199)),0x1;try{const _0x108e2f=_0x481118[_0x5a9412(0x168)];_0x481118['verbose']&&(console['error'](_0x5a9412(0x180)+_0x449b17),_0x108e2f&&console[_0x5a9412(0x18f)]('Reason:\x20'+_0x108e2f));if(!_0x481118['yes']){const _0x5080b5=await confirm(_0x5a9412(0x145)+_0x449b17+'?');if(!_0x5080b5)return console[_0x5a9412(0x18f)](_0x5a9412(0x1b1)),0x0;}const _0x30e8d8=await withSpinner(_0x5a9412(0x15c),()=>_0x2ef98e[_0x5a9412(0x147)][_0x5a9412(0x1bc)](_0x449b17,_0x108e2f),{'verbose':_0x481118[_0x5a9412(0x146)]}),_0x48832e=_0x30e8d8[_0x5a9412(0x162)];return console['error']('✔\x20'+_0x48832e),0x0;}catch(_0x3032a7){if(_0x3032a7 instanceof SDKError)return console['error'](_0x5a9412(0x18e)+_0x3032a7[_0x5a9412(0x165)]),_0x3032a7[_0x5a9412(0x170)]&&console[_0x5a9412(0x18f)](_0x5a9412(0x1be)+_0x3032a7[_0x5a9412(0x170)]),0x1;throw _0x3032a7;}}}export class WorkflowRetryCommand extends BaseCommand{[a32_0x48b085(0x1b9)]=a32_0x48b085(0x158);['description']=a32_0x48b085(0x144);async[a32_0x48b085(0x1b6)](_0x49fca8){const _0x5a5591=a32_0x48b085,{options:_0x3eb537,args:_0x156669,tdx:_0xd35479}=_0x49fca8,_0xce899=_0x156669[0x0];if(!_0xce899)return console[_0x5a5591(0x18f)](_0x5a5591(0x167)),console['error'](_0x5a5591(0x1aa)),0x1;let _0x194962=![],_0x580c55=_0xce899;if(_0xce899[_0x5a5591(0x150)](_0x5a5591(0x186)))_0x194962=!![],_0x580c55=_0xce899[_0x5a5591(0x195)](0x8);else{if(_0xce899['startsWith']('attempt:'))_0x194962=![],_0x580c55=_0xce899[_0x5a5591(0x195)](0x8);else return console[_0x5a5591(0x18f)]('Error:\x20Target\x20must\x20be\x20prefixed\x20with\x20\x22session:\x22\x20or\x20\x22attempt:\x22'),console['error'](_0x5a5591(0x1aa)),0x1;}try{const _0x42ac1a=_0x3eb537['fromTask'],_0x2b4da9=_0x3eb537['resumeFrom'],_0x1cef0b=_0x3eb537[_0x5a5591(0x177)],_0x32bef1=_0x3eb537['force'];_0x3eb537[_0x5a5591(0x146)]&&(console[_0x5a5591(0x18f)]('Target:\x20'+(_0x194962?'session':_0x5a5591(0x175))+'\x20'+_0x580c55),_0x42ac1a&&console['error']('From\x20task:\x20'+_0x42ac1a),_0x2b4da9&&console[_0x5a5591(0x18f)]('Resume\x20from:\x20'+_0x2b4da9),_0x1cef0b&&console[_0x5a5591(0x18f)](_0x5a5591(0x18a)+_0x1cef0b),_0x32bef1&&console[_0x5a5591(0x18f)](_0x5a5591(0x15d)));let _0x5bbd22;if(_0x1cef0b)try{if(_0x1cef0b['startsWith']('@')){const _0x5dbaf4=await import(_0x5a5591(0x149)),_0x546fbb=_0x1cef0b[_0x5a5591(0x195)](0x1),_0x55594b=await _0x5dbaf4[_0x5a5591(0x18d)](_0x546fbb,'utf-8');_0x5bbd22=JSON[_0x5a5591(0x191)](_0x55594b);}else _0x5bbd22=JSON['parse'](_0x1cef0b);}catch{return console[_0x5a5591(0x18f)](_0x5a5591(0x184)),0x1;}if(!_0x3eb537[_0x5a5591(0x1a6)]){const _0x345549=await confirm(_0x5a5591(0x17d)+(_0x194962?_0x5a5591(0x14d):_0x5a5591(0x175))+'\x20'+_0x580c55+'?');if(!_0x345549)return console[_0x5a5591(0x18f)](_0x5a5591(0x1b1)),0x0;}let _0x442daa;_0x194962?_0x442daa=await withSpinner(_0x5a5591(0x1c3),()=>_0xd35479['workflow']['retrySession'](_0x580c55,{'fromTask':_0x42ac1a,'retryParams':_0x5bbd22}),{'verbose':_0x3eb537['verbose']}):_0x442daa=await withSpinner(_0x5a5591(0x166),()=>_0xd35479['workflow'][_0x5a5591(0x17e)](_0x580c55,{'resumeFrom':_0x2b4da9,'retryParams':_0x5bbd22,'force':_0x32bef1}),{'verbose':_0x3eb537['verbose']});const _0x55f2a1=_0x442daa[_0x5a5591(0x162)];return console[_0x5a5591(0x18f)](_0x5a5591(0x161)),console[_0x5a5591(0x18f)](_0x5a5591(0x19b)+_0x55f2a1[_0x5a5591(0x19c)]),console['error'](_0x5a5591(0x15a)+_0x55f2a1[_0x5a5591(0x190)]),0x0;}catch(_0x3f5c13){if(_0x3f5c13 instanceof SDKError)return console[_0x5a5591(0x18f)](_0x5a5591(0x18e)+_0x3f5c13[_0x5a5591(0x165)]),_0x3f5c13[_0x5a5591(0x170)]&&console['error'](_0x5a5591(0x1be)+_0x3f5c13['cause']),0x1;throw _0x3f5c13;}}}export class WorkflowDownloadCommand extends BaseCommand{[a32_0x48b085(0x1b9)]=a32_0x48b085(0x196);[a32_0x48b085(0x15f)]=a32_0x48b085(0x14e);async['execute'](_0x4bc222){const _0x11efc1=a32_0x48b085,{options:_0x3d1b21,args:_0x48403b,tdx:_0x2b3db7}=_0x4bc222,_0x419a96=_0x48403b[0x0],_0x2dece9=_0x48403b[0x1]||'.';if(!_0x419a96)return console[_0x11efc1(0x18f)](_0x11efc1(0x151)),console[_0x11efc1(0x18f)](_0x11efc1(0x1a5)),0x1;const _0x46b602=_0x3d1b21[_0x11efc1(0x1ad)];_0x3d1b21[_0x11efc1(0x146)]&&(console[_0x11efc1(0x18f)](_0x11efc1(0x160)+_0x419a96),console[_0x11efc1(0x18f)]('Output\x20directory:\x20'+_0x2dece9),_0x46b602&&console[_0x11efc1(0x18f)](_0x11efc1(0x148)+_0x46b602));const _0x4a3832=await withSpinner(_0x11efc1(0x192)+_0x419a96+_0x11efc1(0x1bb),()=>_0x2b3db7['workflow']['download'](_0x419a96,_0x2dece9,{'revision':_0x46b602}),{'verbose':_0x3d1b21[_0x11efc1(0x146)]}),_0x519941=_0x4a3832[_0x11efc1(0x162)];return console[_0x11efc1(0x18f)](_0x11efc1(0x176)+_0x519941[_0x11efc1(0x14b)]),console['error']('\x20\x20Revision:\x20'+_0x519941[_0x11efc1(0x1ad)]),console[_0x11efc1(0x18f)](_0x11efc1(0x1bd)+_0x519941['filesExtracted']),console[_0x11efc1(0x18f)](_0x11efc1(0x1b0)+_0x2dece9+'/'+_0x519941[_0x11efc1(0x14b)]),0x0;}}export class WorkflowPushCommand extends BaseCommand{['name']='workflow:push';[a32_0x48b085(0x15f)]='Push\x20workflow\x20project\x20to\x20Treasure\x20Data';async[a32_0x48b085(0x1b6)](_0x239edc){const _0xb0d47b=a32_0x48b085,{options:_0x3d574e,args:_0x1eddf2,tdx:_0x2b33f7}=_0x239edc;let _0x6705c0='.',_0x5eb999=_0x3d574e[_0xb0d47b(0x1b9)];if(_0x1eddf2[0x0]){const {promises:_0xc4700}=await import('fs');try{const _0x3dac8c=await _0xc4700[_0xb0d47b(0x194)](_0x1eddf2[0x0]);if(_0x3dac8c['isDirectory']())_0x6705c0=_0x1eddf2[0x0];else return console[_0xb0d47b(0x18f)]('Error:\x20'+_0x1eddf2[0x0]+_0xb0d47b(0x15b)),0x1;}catch{_0x5eb999=_0x1eddf2[0x0],_0x6705c0='.';}}const _0x454a79=_0x3d574e[_0xb0d47b(0x1ad)],_0x7ba08b=_0x3d574e['skipValidation'];_0x3d574e[_0xb0d47b(0x146)]&&(console['error'](_0xb0d47b(0x17c)+_0x6705c0),_0x5eb999&&console[_0xb0d47b(0x18f)](_0xb0d47b(0x19a)+_0x5eb999),_0x454a79&&console[_0xb0d47b(0x18f)]('Revision:\x20'+_0x454a79),_0x7ba08b&&console[_0xb0d47b(0x18f)](_0xb0d47b(0x1a3)));const _0x577f17=await withSpinner('Pushing\x20workflow\x20project...',()=>_0x2b33f7[_0xb0d47b(0x147)][_0xb0d47b(0x182)](_0x6705c0,{'projectName':_0x5eb999,'revision':_0x454a79,'skipValidation':_0x7ba08b}),{'verbose':_0x3d574e['verbose']}),_0x50612d=_0x577f17['data'];return console['error'](_0xb0d47b(0x14f)+_0x50612d[_0xb0d47b(0x14b)]),console[_0xb0d47b(0x18f)]('\x20\x20Project\x20ID:\x20'+_0x50612d[_0xb0d47b(0x189)]),console['error'](_0xb0d47b(0x154)+_0x50612d[_0xb0d47b(0x1ad)]),0x0;}}function a32_0x4638(_0x12f92c,_0x3e9b67){const _0x198fb4=a32_0x198f();return a32_0x4638=function(_0x46386d,_0x55cbf2){_0x46386d=_0x46386d-0x143;let _0xe3a579=_0x198fb4[_0x46386d];return _0xe3a579;},a32_0x4638(_0x12f92c,_0x3e9b67);}function a32_0x198f(){const _0x163e20=['List\x20workflows','delete','\x20log\x20entr','Validation:\x20skipped','Listing\x20workflow\x20projects...','Usage:\x20workflow:download\x20<project-name>\x20[output-dir]','yes','Error:\x20Attempt\x20ID\x20and\x20task\x20name\x20are\x20required','List\x20workflow\x20attempts','Project\x20filter:\x20','Usage:\x20workflow\x20retry\x20session:<id>\x20or\x20workflow\x20retry\x20attempt:<id>','\x20session','Show\x20logs\x20for\x20a\x20specific\x20task','revision','Usage:\x20workflow:delete\x20<project-name-or-id>','Filter:\x20project=','\x20\x20Location:\x20','Cancelled','workflow:kill','300528CgrAhK','Listing\x20workflows...','Getting\x20task\x20logs...','execute','Status:\x20','Show\x20specific\x20attempt\x20details','name','status','...','kill','\x20\x20Files\x20extracted:\x20','\x20\x20Cause:\x20','workflow:logs','Getting\x20attempt\x20details...','110FoJOlN','Error:\x20Invalid\x20pattern.\x20Use\x20format:\x20project\x20or\x20project.workflow','Retrying\x20session...','workflow:projects','sessions','Retry\x20a\x20session\x20or\x20attempt','Are\x20you\x20sure\x20you\x20want\x20to\x20kill\x20attempt\x20','verbose','workflow','Revision:\x20','fs/promises','split','projectName','Pattern:\x20','session','Download\x20workflow\x20project\x20from\x20Treasure\x20Data','✔\x20Pushed\x20','startsWith','Error:\x20Project\x20name\x20is\x20required','offset','\x22?\x20This\x20cannot\x20be\x20undone.','\x20\x20Revision:\x20','Deleting\x20project\x20','Getting\x20attempt\x20tasks...','10IdHCyU','workflow:retry','31011ihFyEr','\x20\x20Session\x20ID:\x20','\x20is\x20not\x20a\x20directory','Killing\x20attempt...','Force:\x20yes','workflow:attempt','description','Project:\x20','✔\x20Retry\x20started','data','Filter:\x20','44700WMUbsl','message','Retrying\x20attempt...','Error:\x20Session\x20ID\x20or\x20attempt\x20ID\x20is\x20required','reason','Show\x20tasks\x20for\x20an\x20attempt','Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20project\x20\x22','includeRetried','18558pQkslr','List\x20all\x20workflow\x20projects','103160VRJXAv','Including\x20subtasks:\x20yes','cause','workflows','Listing\x20workflow\x20attempts...','Kill\x20a\x20running\x20attempt','workflow:delete','attempt','✔\x20Downloaded\x20','params','128xCoSMl','List\x20workflow\x20execution\x20sessions','workflow:workflows','\x20workflow','Project\x20directory:\x20','Are\x20you\x20sure\x20you\x20want\x20to\x20retry\x20','retryAttempt','workflow:sessions','Attempt\x20ID:\x20','\x20attempt','push','57jmmlkh','Error:\x20Invalid\x20JSON\x20in\x20--params','4255AuqmIw','session:','length','from','projectId','Params:\x20','projects','\x20task','readFile','Error:\x20','error','sessionId','parse','Downloading\x20project\x20','tasks','stat','substring','workflow:download','✔\x20Found\x20','219933MBBdUj','Error:\x20Attempt\x20ID\x20is\x20required','Project\x20name:\x20','\x20\x20New\x20attempt\x20ID:\x20','attemptId','limit','includeSubtasks','354jEoRrL'];a32_0x198f=function(){return _0x163e20;};return a32_0x198f();}export class WorkflowDeleteCommand extends BaseCommand{[a32_0x48b085(0x1b9)]=a32_0x48b085(0x174);[a32_0x48b085(0x15f)]='Delete\x20workflow\x20project\x20from\x20Treasure\x20Data';async['execute'](_0x47a198){const _0x1dec1d=a32_0x48b085,{options:_0x3dd8cc,args:_0x58f67e,tdx:_0x3be1b3}=_0x47a198,_0x55cc99=_0x58f67e[0x0];if(!_0x55cc99)return console[_0x1dec1d(0x18f)]('Error:\x20Project\x20name\x20or\x20ID\x20is\x20required'),console[_0x1dec1d(0x18f)](_0x1dec1d(0x1ae)),0x1;_0x3dd8cc[_0x1dec1d(0x146)]&&console[_0x1dec1d(0x18f)](_0x1dec1d(0x160)+_0x55cc99);if(!_0x3dd8cc[_0x1dec1d(0x1a6)]){const _0x1aa1e7=await confirm(_0x1dec1d(0x16a)+_0x55cc99+_0x1dec1d(0x153));if(!_0x1aa1e7)return console[_0x1dec1d(0x18f)](_0x1dec1d(0x1b1)),0x0;}const _0x4145b0=await withSpinner(_0x1dec1d(0x155)+_0x55cc99+_0x1dec1d(0x1bb),()=>_0x3be1b3[_0x1dec1d(0x147)][_0x1dec1d(0x1a1)](_0x55cc99),{'verbose':_0x3dd8cc[_0x1dec1d(0x146)]}),_0x2508db=_0x4145b0[_0x1dec1d(0x162)];return console[_0x1dec1d(0x18f)]('✔\x20Deleted\x20project\x20'+_0x2508db[_0x1dec1d(0x14b)]),console[_0x1dec1d(0x18f)]('\x20\x20Project\x20ID:\x20'+_0x2508db[_0x1dec1d(0x189)]),0x0;}}
1
+ const a32_0x37d6e6=a32_0x5690;(function(_0x43e783,_0x2785bf){const _0x554787=a32_0x5690,_0x43f0b6=_0x43e783();while(!![]){try{const _0x3428bf=-parseInt(_0x554787(0xb4))/0x1+parseInt(_0x554787(0xf6))/0x2*(parseInt(_0x554787(0xc1))/0x3)+parseInt(_0x554787(0x10a))/0x4*(parseInt(_0x554787(0xde))/0x5)+parseInt(_0x554787(0xef))/0x6*(-parseInt(_0x554787(0x11e))/0x7)+parseInt(_0x554787(0xeb))/0x8*(parseInt(_0x554787(0xf7))/0x9)+parseInt(_0x554787(0x11b))/0xa+-parseInt(_0x554787(0x106))/0xb*(parseInt(_0x554787(0xf0))/0xc);if(_0x3428bf===_0x2785bf)break;else _0x43f0b6['push'](_0x43f0b6['shift']());}catch(_0x27f61a){_0x43f0b6['push'](_0x43f0b6['shift']());}}}(a32_0x56f4,0xb9a91));import{BaseCommand}from'./command.js';function a32_0x5690(_0x1f6871,_0x7390f8){const _0x56f469=a32_0x56f4();return a32_0x5690=function(_0x56908b,_0x5d5908){_0x56908b=_0x56908b-0xb4;let _0x7197a0=_0x56f469[_0x56908b];return _0x7197a0;},a32_0x5690(_0x1f6871,_0x7390f8);}import{SDKError}from'../sdk/index.js';import{handleSDKOutput}from'../utils/command-output.js';function a32_0x56f4(){const _0xc7b6c1=['Usage:\x20workflow:delete\x20<project-name-or-id>','Pushing\x20workflow\x20project...','Error:\x20','1942885GhFRuC','\x20\x20New\x20attempt\x20ID:\x20','tasks','Retrying\x20attempt...','List\x20workflows','Killing\x20attempt...','Show\x20specific\x20attempt\x20details','error','workflow:attempts','Getting\x20task\x20logs...','parse','params','projectName','8CjbzaR','Usage:\x20workflow\x20retry\x20session:<id>\x20or\x20workflow\x20retry\x20attempt:<id>','session:','includeSubtasks','40386qGpXzZ','6204MDvJgA','Listing\x20workflow\x20projects...','Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20project\x20\x22','yes','Push\x20workflow\x20project\x20to\x20Treasure\x20Data','workflow:retry','264772ghiStM','12160089LMTgjg','workflows','offset','stat','Attempt\x20ID:\x20','\x20task','Task\x20name:\x20','filesExtracted','workflow:logs','\x20\x20Revision:\x20','Retrying\x20session...','push','retrySession','retryAttempt','Error:\x20Target\x20must\x20be\x20prefixed\x20with\x20\x22session:\x22\x20or\x20\x22attempt:\x22','37939lLvYMz','Error:\x20Project\x20name\x20is\x20required','from','data','4aaYlcx','resumeFrom','skipValidation','execute','Pattern:\x20','Cancelled','Resume\x20from:\x20','isDirectory','Error:\x20Invalid\x20JSON\x20in\x20--params','workflow:delete','\x22?\x20This\x20cannot\x20be\x20undone.','name','Are\x20you\x20sure\x20you\x20want\x20to\x20retry\x20','\x20session','attempts','force','message','13341850bEJKkm','Project\x20directory:\x20','Revision:\x20','273KQieqS','workflow:attempt','List\x20all\x20workflow\x20projects','logs','verbose','Delete\x20workflow\x20project\x20from\x20Treasure\x20Data','substring','Getting\x20attempt\x20tasks...','workflow','Status:\x20','fs/promises','split','revision','status','Listing\x20workflows...','✔\x20Downloaded\x20','✔\x20Retry\x20started','workflow:download','Filter:\x20','\x20project','Project:\x20','Error:\x20Project\x20name\x20or\x20ID\x20is\x20required','delete','Project\x20name:\x20','List\x20workflow\x20attempts','✔\x20Found\x20','Project\x20filter:\x20','sessionId','Error:\x20Attempt\x20ID\x20and\x20task\x20name\x20are\x20required','929706coiECq','Filter:\x20project=','Retry\x20a\x20session\x20or\x20attempt','cause','Reason:\x20','\x20attempt','\x20\x20Location:\x20','projectId','\x20workflow','Show\x20logs\x20for\x20a\x20specific\x20task','description','...','attempt','15hquALz','reason','workflow:kill','Target:\x20','Download\x20workflow\x20project\x20from\x20Treasure\x20Data','✔\x20Pushed\x20','startsWith','download','Error:\x20Invalid\x20pattern.\x20Use\x20format:\x20project\x20or\x20project.workflow','✔\x20Deleted\x20project\x20','Listing\x20workflow\x20sessions...','limit','From\x20task:\x20','session','Error:\x20Attempt\x20ID\x20is\x20required','\x20\x20Cause:\x20','List\x20workflow\x20execution\x20sessions','Downloading\x20project\x20','kill','workflow:push','length','\x20\x20Files\x20extracted:\x20','Including\x20subtasks:\x20yes','\x20is\x20not\x20a\x20directory','workflow:tasks','\x20\x20Project\x20ID:\x20'];a32_0x56f4=function(){return _0xc7b6c1;};return a32_0x56f4();}import{withSpinner}from'../utils/spinner.js';import{confirm}from'../utils/prompt.js';export class WorkflowProjectsCommand extends BaseCommand{[a32_0x37d6e6(0x115)]='workflow:projects';[a32_0x37d6e6(0xbe)]=a32_0x37d6e6(0x120);async['execute'](_0x2037f2){const _0x472a36=a32_0x37d6e6,{options:_0x468862,args:_0x34b0d4,tdx:_0x34c89a}=_0x2037f2,_0x2f3b73=_0x34b0d4[0x0];try{_0x468862[_0x472a36(0x122)]&&_0x2f3b73&&console['error'](_0x472a36(0x10e)+_0x2f3b73);const _0x3351d4=await withSpinner(_0x472a36(0xf1),()=>_0x34c89a['workflow']['projects'](_0x2f3b73,{'limit':_0x468862[_0x472a36(0xcc)]}),{'verbose':_0x468862['verbose']}),_0x1ff9db=_0x3351d4[_0x472a36(0x109)];return console[_0x472a36(0xe5)](_0x472a36(0x137)+_0x1ff9db[_0x472a36(0xd5)]+_0x472a36(0x131)+(_0x1ff9db['length']!==0x1?'s':'')),await handleSDKOutput(_0x1ff9db,_0x468862),0x0;}catch(_0x3caac7){if(_0x3caac7 instanceof SDKError)return console[_0x472a36(0xe5)]('Error:\x20'+_0x3caac7[_0x472a36(0x11a)]),_0x3caac7[_0x472a36(0xb7)]&&console[_0x472a36(0xe5)](_0x472a36(0xd0)+_0x3caac7['cause']),0x1;throw _0x3caac7;}}}export class WorkflowWorkflowsCommand extends BaseCommand{[a32_0x37d6e6(0x115)]='workflow:workflows';[a32_0x37d6e6(0xbe)]=a32_0x37d6e6(0xe2);async[a32_0x37d6e6(0x10d)](_0x4ae1f3){const _0x4b92e6=a32_0x37d6e6,{options:_0x243716,args:_0x302f56,tdx:_0x4d1ab9}=_0x4ae1f3,_0xb8daa2=_0x302f56[0x0];try{_0x243716[_0x4b92e6(0x122)]&&_0xb8daa2&&console[_0x4b92e6(0xe5)](_0x4b92e6(0x138)+_0xb8daa2);const _0x34127e=await withSpinner(_0x4b92e6(0x12c),()=>_0x4d1ab9['workflow'][_0x4b92e6(0xf8)](_0xb8daa2,{'limit':_0x243716[_0x4b92e6(0xcc)]}),{'verbose':_0x243716[_0x4b92e6(0x122)]}),_0x3cb24f=_0x34127e[_0x4b92e6(0x109)];return console[_0x4b92e6(0xe5)](_0x4b92e6(0x137)+_0x3cb24f[_0x4b92e6(0xd5)]+_0x4b92e6(0xbc)+(_0x3cb24f[_0x4b92e6(0xd5)]!==0x1?'s':'')),await handleSDKOutput(_0x3cb24f,_0x243716),0x0;}catch(_0x274f85){if(_0x274f85 instanceof SDKError)return console[_0x4b92e6(0xe5)](_0x4b92e6(0xdd)+_0x274f85[_0x4b92e6(0x11a)]),_0x274f85['cause']&&console[_0x4b92e6(0xe5)]('\x20\x20Cause:\x20'+_0x274f85[_0x4b92e6(0xb7)]),0x1;throw _0x274f85;}}}export class WorkflowSessionsCommand extends BaseCommand{[a32_0x37d6e6(0x115)]='workflow:sessions';['description']=a32_0x37d6e6(0xd1);async[a32_0x37d6e6(0x10d)](_0x259777){const _0x51755a=a32_0x37d6e6,{options:_0x5babe4,args:_0x1f4de0,tdx:_0x5af3e3}=_0x259777;let _0x56434d,_0x498299;if(_0x1f4de0[0x0]){const _0x3c16d3=_0x1f4de0[0x0][_0x51755a(0x129)]('.');if(_0x3c16d3[_0x51755a(0xd5)]===0x1)_0x56434d=_0x3c16d3[0x0];else{if(_0x3c16d3['length']===0x2)[_0x56434d,_0x498299]=_0x3c16d3;else return console[_0x51755a(0xe5)](_0x51755a(0xc9)),0x1;}}try{if(_0x5babe4[_0x51755a(0x122)]){if(_0x56434d&&_0x498299)console[_0x51755a(0xe5)](_0x51755a(0x130)+_0x56434d+'.'+_0x498299);else _0x56434d&&console[_0x51755a(0xe5)](_0x51755a(0xb5)+_0x56434d);const _0x242e2a=_0x5babe4[_0x51755a(0x12b)];_0x242e2a&&console[_0x51755a(0xe5)](_0x51755a(0x127)+_0x242e2a);}const _0x5d2376=await withSpinner(_0x51755a(0xcb),()=>_0x5af3e3[_0x51755a(0x126)]['sessions']({'projectName':_0x56434d,'workflowName':_0x498299,'status':_0x5babe4[_0x51755a(0x12b)],'fromTime':_0x5babe4[_0x51755a(0x108)],'toTime':_0x5babe4['to'],'limit':_0x5babe4[_0x51755a(0xcc)]}),{'verbose':_0x5babe4[_0x51755a(0x122)]}),_0x5e79eb=_0x5d2376['data'];return console[_0x51755a(0xe5)](_0x51755a(0x137)+_0x5e79eb[_0x51755a(0xd5)]+_0x51755a(0x117)+(_0x5e79eb[_0x51755a(0xd5)]!==0x1?'s':'')),await handleSDKOutput(_0x5e79eb,_0x5babe4),0x0;}catch(_0x30afcf){if(_0x30afcf instanceof SDKError)return console['error'](_0x51755a(0xdd)+_0x30afcf[_0x51755a(0x11a)]),_0x30afcf[_0x51755a(0xb7)]&&console[_0x51755a(0xe5)](_0x51755a(0xd0)+_0x30afcf[_0x51755a(0xb7)]),0x1;throw _0x30afcf;}}}export class WorkflowAttemptsCommand extends BaseCommand{[a32_0x37d6e6(0x115)]=a32_0x37d6e6(0xe6);[a32_0x37d6e6(0xbe)]=a32_0x37d6e6(0x136);async['execute'](_0x336ddb){const _0x261d03=a32_0x37d6e6,{options:_0x5a7578,args:_0xecf4a8,tdx:_0x13c60c}=_0x336ddb;let _0x56c46d,_0x4f579f;if(_0xecf4a8[0x0]){const _0x670fd3=_0xecf4a8[0x0][_0x261d03(0x129)]('.');if(_0x670fd3[_0x261d03(0xd5)]===0x1)_0x56c46d=_0x670fd3[0x0];else{if(_0x670fd3['length']===0x2)[_0x56c46d,_0x4f579f]=_0x670fd3;else return console[_0x261d03(0xe5)](_0x261d03(0xc9)),0x1;}}try{const _0x31d355=_0x5a7578['includeRetried'];if(_0x5a7578['verbose']){if(_0x56c46d&&_0x4f579f)console[_0x261d03(0xe5)]('Filter:\x20'+_0x56c46d+'.'+_0x4f579f);else _0x56c46d&&console[_0x261d03(0xe5)](_0x261d03(0xb5)+_0x56c46d);_0x31d355&&console[_0x261d03(0xe5)]('Include\x20retried:\x20yes');}const _0xb6dd91=await withSpinner('Listing\x20workflow\x20attempts...',()=>_0x13c60c['workflow'][_0x261d03(0x118)]({'projectName':_0x56c46d,'workflowName':_0x4f579f,'includeRetried':_0x31d355,'limit':_0x5a7578[_0x261d03(0xcc)]}),{'verbose':_0x5a7578[_0x261d03(0x122)]}),_0x30aace=_0xb6dd91[_0x261d03(0x109)];return console[_0x261d03(0xe5)](_0x261d03(0x137)+_0x30aace['length']+_0x261d03(0xb9)+(_0x30aace['length']!==0x1?'s':'')),await handleSDKOutput(_0x30aace,_0x5a7578),0x0;}catch(_0x1e3b6d){if(_0x1e3b6d instanceof SDKError)return console['error']('Error:\x20'+_0x1e3b6d[_0x261d03(0x11a)]),_0x1e3b6d[_0x261d03(0xb7)]&&console[_0x261d03(0xe5)](_0x261d03(0xd0)+_0x1e3b6d[_0x261d03(0xb7)]),0x1;throw _0x1e3b6d;}}}export class WorkflowAttemptCommand extends BaseCommand{['name']=a32_0x37d6e6(0x11f);[a32_0x37d6e6(0xbe)]=a32_0x37d6e6(0xe4);async[a32_0x37d6e6(0x10d)](_0x3ee8f){const _0x36d6cf=a32_0x37d6e6,{options:_0x4e3d4c,args:_0x66316,tdx:_0x2dd007}=_0x3ee8f,_0x3004f3=_0x66316[0x0];if(!_0x3004f3)return console[_0x36d6cf(0xe5)]('Error:\x20Attempt\x20ID\x20is\x20required'),0x1;try{_0x4e3d4c[_0x36d6cf(0x122)]&&console[_0x36d6cf(0xe5)](_0x36d6cf(0xfb)+_0x3004f3);const _0x58e313=await withSpinner('Getting\x20attempt\x20details...',()=>_0x2dd007[_0x36d6cf(0x126)]['attempt'](_0x3004f3),{'verbose':_0x4e3d4c[_0x36d6cf(0x122)]}),_0x45354b=_0x58e313[_0x36d6cf(0x109)];return await handleSDKOutput([_0x45354b],_0x4e3d4c),0x0;}catch(_0x434984){if(_0x434984 instanceof SDKError)return console[_0x36d6cf(0xe5)](_0x36d6cf(0xdd)+_0x434984[_0x36d6cf(0x11a)]),_0x434984[_0x36d6cf(0xb7)]&&console['error'](_0x36d6cf(0xd0)+_0x434984[_0x36d6cf(0xb7)]),0x1;throw _0x434984;}}}export class WorkflowTasksCommand extends BaseCommand{[a32_0x37d6e6(0x115)]=a32_0x37d6e6(0xd9);[a32_0x37d6e6(0xbe)]='Show\x20tasks\x20for\x20an\x20attempt';async[a32_0x37d6e6(0x10d)](_0x34ce57){const _0x4b00c9=a32_0x37d6e6,{options:_0x309d49,args:_0x596195,tdx:_0x315644}=_0x34ce57,_0x18245a=_0x596195[0x0];if(!_0x18245a)return console[_0x4b00c9(0xe5)](_0x4b00c9(0xcf)),0x1;try{const _0x28257f=_0x309d49[_0x4b00c9(0xee)];_0x309d49[_0x4b00c9(0x122)]&&(console[_0x4b00c9(0xe5)](_0x4b00c9(0xfb)+_0x18245a),_0x28257f&&console[_0x4b00c9(0xe5)](_0x4b00c9(0xd7)));const _0x26ca2e=await withSpinner(_0x4b00c9(0x125),()=>_0x315644[_0x4b00c9(0x126)][_0x4b00c9(0xe0)](_0x18245a,_0x28257f||![]),{'verbose':_0x309d49['verbose']}),_0x1585f8=_0x26ca2e[_0x4b00c9(0x109)];return console[_0x4b00c9(0xe5)]('✔\x20Found\x20'+_0x1585f8[_0x4b00c9(0xd5)]+_0x4b00c9(0xfc)+(_0x1585f8['length']!==0x1?'s':'')),await handleSDKOutput(_0x1585f8,_0x309d49),0x0;}catch(_0x59ff93){if(_0x59ff93 instanceof SDKError)return console[_0x4b00c9(0xe5)](_0x4b00c9(0xdd)+_0x59ff93[_0x4b00c9(0x11a)]),_0x59ff93[_0x4b00c9(0xb7)]&&console[_0x4b00c9(0xe5)](_0x4b00c9(0xd0)+_0x59ff93['cause']),0x1;throw _0x59ff93;}}}export class WorkflowLogsCommand extends BaseCommand{[a32_0x37d6e6(0x115)]=a32_0x37d6e6(0xff);['description']=a32_0x37d6e6(0xbd);async['execute'](_0x1d4647){const _0x245cae=a32_0x37d6e6,{options:_0x2234d1,args:_0x3f92a6,tdx:_0xaceb77}=_0x1d4647,_0x2fb608=_0x3f92a6[0x0],_0x32ae89=_0x3f92a6[0x1];if(!_0x2fb608||!_0x32ae89)return console[_0x245cae(0xe5)](_0x245cae(0x13a)),0x1;try{_0x2234d1[_0x245cae(0x122)]&&(console[_0x245cae(0xe5)](_0x245cae(0xfb)+_0x2fb608),console['error'](_0x245cae(0xfd)+_0x32ae89));const _0x46d9ac=_0x2234d1[_0x245cae(0xf9)],_0x193bd2=await withSpinner(_0x245cae(0xe7),()=>_0xaceb77[_0x245cae(0x126)][_0x245cae(0x121)](_0x2fb608,_0x32ae89,{'offset':_0x46d9ac,'limit':_0x2234d1[_0x245cae(0xcc)]}),{'verbose':_0x2234d1[_0x245cae(0x122)]}),_0x45a099=_0x193bd2['data'];return console[_0x245cae(0xe5)](_0x245cae(0x137)+_0x45a099[_0x245cae(0xd5)]+'\x20log\x20entr'+(_0x45a099[_0x245cae(0xd5)]!==0x1?'ies':'y')),await handleSDKOutput(_0x45a099,_0x2234d1),0x0;}catch(_0x570c0f){if(_0x570c0f instanceof SDKError)return console['error'](_0x245cae(0xdd)+_0x570c0f[_0x245cae(0x11a)]),_0x570c0f['cause']&&console[_0x245cae(0xe5)](_0x245cae(0xd0)+_0x570c0f['cause']),0x1;throw _0x570c0f;}}}export class WorkflowKillCommand extends BaseCommand{[a32_0x37d6e6(0x115)]=a32_0x37d6e6(0xc3);[a32_0x37d6e6(0xbe)]='Kill\x20a\x20running\x20attempt';async['execute'](_0x12246c){const _0x28720f=a32_0x37d6e6,{options:_0x597032,args:_0x4aaf5d,tdx:_0x2b6ee8}=_0x12246c,_0x4e323f=_0x4aaf5d[0x0];if(!_0x4e323f)return console['error'](_0x28720f(0xcf)),0x1;try{const _0x29df3e=_0x597032[_0x28720f(0xc2)];_0x597032['verbose']&&(console['error'](_0x28720f(0xfb)+_0x4e323f),_0x29df3e&&console[_0x28720f(0xe5)](_0x28720f(0xb8)+_0x29df3e));if(!_0x597032[_0x28720f(0xf3)]){const _0x26318f=await confirm('Are\x20you\x20sure\x20you\x20want\x20to\x20kill\x20attempt\x20'+_0x4e323f+'?');if(!_0x26318f)return console[_0x28720f(0xe5)]('Cancelled'),0x0;}const _0x54366d=await withSpinner(_0x28720f(0xe3),()=>_0x2b6ee8[_0x28720f(0x126)][_0x28720f(0xd3)](_0x4e323f,_0x29df3e),{'verbose':_0x597032[_0x28720f(0x122)]}),_0x309228=_0x54366d[_0x28720f(0x109)];return console[_0x28720f(0xe5)]('✔\x20'+_0x309228),0x0;}catch(_0x5b67c6){if(_0x5b67c6 instanceof SDKError)return console['error'](_0x28720f(0xdd)+_0x5b67c6[_0x28720f(0x11a)]),_0x5b67c6[_0x28720f(0xb7)]&&console[_0x28720f(0xe5)](_0x28720f(0xd0)+_0x5b67c6['cause']),0x1;throw _0x5b67c6;}}}export class WorkflowRetryCommand extends BaseCommand{['name']=a32_0x37d6e6(0xf5);[a32_0x37d6e6(0xbe)]=a32_0x37d6e6(0xb6);async[a32_0x37d6e6(0x10d)](_0x3fe1c2){const _0x2b6658=a32_0x37d6e6,{options:_0x458c7a,args:_0x3710b2,tdx:_0x2540f1}=_0x3fe1c2,_0x5055c0=_0x3710b2[0x0];if(!_0x5055c0)return console['error']('Error:\x20Session\x20ID\x20or\x20attempt\x20ID\x20is\x20required'),console['error'](_0x2b6658(0xec)),0x1;let _0x137311=![],_0x4713e3=_0x5055c0;if(_0x5055c0[_0x2b6658(0xc7)](_0x2b6658(0xed)))_0x137311=!![],_0x4713e3=_0x5055c0['substring'](0x8);else{if(_0x5055c0['startsWith']('attempt:'))_0x137311=![],_0x4713e3=_0x5055c0[_0x2b6658(0x124)](0x8);else return console[_0x2b6658(0xe5)](_0x2b6658(0x105)),console[_0x2b6658(0xe5)]('Usage:\x20workflow\x20retry\x20session:<id>\x20or\x20workflow\x20retry\x20attempt:<id>'),0x1;}try{const _0x225d34=_0x458c7a['fromTask'],_0x2ee29e=_0x458c7a[_0x2b6658(0x10b)],_0xe27b1f=_0x458c7a[_0x2b6658(0xe9)],_0x2fb03f=_0x458c7a[_0x2b6658(0x119)];_0x458c7a['verbose']&&(console[_0x2b6658(0xe5)](_0x2b6658(0xc4)+(_0x137311?_0x2b6658(0xce):_0x2b6658(0xc0))+'\x20'+_0x4713e3),_0x225d34&&console[_0x2b6658(0xe5)](_0x2b6658(0xcd)+_0x225d34),_0x2ee29e&&console[_0x2b6658(0xe5)](_0x2b6658(0x110)+_0x2ee29e),_0xe27b1f&&console['error']('Params:\x20'+_0xe27b1f),_0x2fb03f&&console['error']('Force:\x20yes'));let _0x58d547;if(_0xe27b1f)try{if(_0xe27b1f[_0x2b6658(0xc7)]('@')){const _0x1893ed=await import(_0x2b6658(0x128)),_0x15d8cd=_0xe27b1f[_0x2b6658(0x124)](0x1),_0x16ffa3=await _0x1893ed['readFile'](_0x15d8cd,'utf-8');_0x58d547=JSON[_0x2b6658(0xe8)](_0x16ffa3);}else _0x58d547=JSON[_0x2b6658(0xe8)](_0xe27b1f);}catch{return console[_0x2b6658(0xe5)](_0x2b6658(0x112)),0x1;}if(!_0x458c7a[_0x2b6658(0xf3)]){const _0x4939cb=await confirm(_0x2b6658(0x116)+(_0x137311?'session':_0x2b6658(0xc0))+'\x20'+_0x4713e3+'?');if(!_0x4939cb)return console['error'](_0x2b6658(0x10f)),0x0;}let _0x56667f;_0x137311?_0x56667f=await withSpinner(_0x2b6658(0x101),()=>_0x2540f1[_0x2b6658(0x126)][_0x2b6658(0x103)](_0x4713e3,{'fromTask':_0x225d34,'retryParams':_0x58d547}),{'verbose':_0x458c7a[_0x2b6658(0x122)]}):_0x56667f=await withSpinner(_0x2b6658(0xe1),()=>_0x2540f1[_0x2b6658(0x126)][_0x2b6658(0x104)](_0x4713e3,{'resumeFrom':_0x2ee29e,'retryParams':_0x58d547,'force':_0x2fb03f}),{'verbose':_0x458c7a['verbose']});const _0x17b66b=_0x56667f[_0x2b6658(0x109)];return console[_0x2b6658(0xe5)](_0x2b6658(0x12e)),console[_0x2b6658(0xe5)](_0x2b6658(0xdf)+_0x17b66b['attemptId']),console['error']('\x20\x20Session\x20ID:\x20'+_0x17b66b[_0x2b6658(0x139)]),0x0;}catch(_0x10e009){if(_0x10e009 instanceof SDKError)return console[_0x2b6658(0xe5)](_0x2b6658(0xdd)+_0x10e009['message']),_0x10e009[_0x2b6658(0xb7)]&&console[_0x2b6658(0xe5)](_0x2b6658(0xd0)+_0x10e009[_0x2b6658(0xb7)]),0x1;throw _0x10e009;}}}export class WorkflowDownloadCommand extends BaseCommand{[a32_0x37d6e6(0x115)]=a32_0x37d6e6(0x12f);['description']=a32_0x37d6e6(0xc5);async[a32_0x37d6e6(0x10d)](_0x207bc4){const _0x208d25=a32_0x37d6e6,{options:_0x3665b5,args:_0x4769f5,tdx:_0x1195ec}=_0x207bc4,_0x12f044=_0x4769f5[0x0],_0x5d26b2=_0x4769f5[0x1]||'.';if(!_0x12f044)return console['error'](_0x208d25(0x107)),console[_0x208d25(0xe5)]('Usage:\x20workflow:download\x20<project-name>\x20[output-dir]'),0x1;const _0x318a98=_0x3665b5[_0x208d25(0x12a)];_0x3665b5[_0x208d25(0x122)]&&(console[_0x208d25(0xe5)](_0x208d25(0x132)+_0x12f044),console[_0x208d25(0xe5)]('Output\x20directory:\x20'+_0x5d26b2),_0x318a98&&console[_0x208d25(0xe5)](_0x208d25(0x11d)+_0x318a98));const _0x4a2e4c=await withSpinner(_0x208d25(0xd2)+_0x12f044+_0x208d25(0xbf),()=>_0x1195ec[_0x208d25(0x126)][_0x208d25(0xc8)](_0x12f044,_0x5d26b2,{'revision':_0x318a98}),{'verbose':_0x3665b5[_0x208d25(0x122)]}),_0x340c80=_0x4a2e4c[_0x208d25(0x109)];return console[_0x208d25(0xe5)](_0x208d25(0x12d)+_0x340c80[_0x208d25(0xea)]),console[_0x208d25(0xe5)](_0x208d25(0x100)+_0x340c80[_0x208d25(0x12a)]),console['error'](_0x208d25(0xd6)+_0x340c80[_0x208d25(0xfe)]),console[_0x208d25(0xe5)](_0x208d25(0xba)+_0x5d26b2+'/'+_0x340c80['projectName']),0x0;}}export class WorkflowPushCommand extends BaseCommand{[a32_0x37d6e6(0x115)]=a32_0x37d6e6(0xd4);[a32_0x37d6e6(0xbe)]=a32_0x37d6e6(0xf4);async[a32_0x37d6e6(0x10d)](_0xd3ffce){const _0x38fe26=a32_0x37d6e6,{options:_0x45a3c7,args:_0x19ef21,tdx:_0x3836e8}=_0xd3ffce;let _0x5ee29d='.',_0x261c13=_0x45a3c7['name'];if(_0x19ef21[0x0]){const {promises:_0x3427eb}=await import('fs');try{const _0x730476=await _0x3427eb[_0x38fe26(0xfa)](_0x19ef21[0x0]);if(_0x730476[_0x38fe26(0x111)]())_0x5ee29d=_0x19ef21[0x0];else return console[_0x38fe26(0xe5)]('Error:\x20'+_0x19ef21[0x0]+_0x38fe26(0xd8)),0x1;}catch{_0x261c13=_0x19ef21[0x0],_0x5ee29d='.';}}const _0x485f31=_0x45a3c7[_0x38fe26(0x12a)],_0x289bf8=_0x45a3c7[_0x38fe26(0x10c)];_0x45a3c7[_0x38fe26(0x122)]&&(console[_0x38fe26(0xe5)](_0x38fe26(0x11c)+_0x5ee29d),_0x261c13&&console[_0x38fe26(0xe5)](_0x38fe26(0x135)+_0x261c13),_0x485f31&&console['error'](_0x38fe26(0x11d)+_0x485f31),_0x289bf8&&console[_0x38fe26(0xe5)]('Validation:\x20skipped'));const _0x5b8c2a=await withSpinner(_0x38fe26(0xdc),()=>_0x3836e8[_0x38fe26(0x126)][_0x38fe26(0x102)](_0x5ee29d,{'projectName':_0x261c13,'revision':_0x485f31,'skipValidation':_0x289bf8}),{'verbose':_0x45a3c7[_0x38fe26(0x122)]}),_0x33f54b=_0x5b8c2a['data'];return console['error'](_0x38fe26(0xc6)+_0x33f54b[_0x38fe26(0xea)]),console['error'](_0x38fe26(0xda)+_0x33f54b[_0x38fe26(0xbb)]),console[_0x38fe26(0xe5)](_0x38fe26(0x100)+_0x33f54b[_0x38fe26(0x12a)]),0x0;}}export class WorkflowDeleteCommand extends BaseCommand{[a32_0x37d6e6(0x115)]=a32_0x37d6e6(0x113);[a32_0x37d6e6(0xbe)]=a32_0x37d6e6(0x123);async[a32_0x37d6e6(0x10d)](_0x4e3b7b){const _0x2e70ac=a32_0x37d6e6,{options:_0x284431,args:_0x4a7e2c,tdx:_0x2757b2}=_0x4e3b7b,_0x36ce51=_0x4a7e2c[0x0];if(!_0x36ce51)return console[_0x2e70ac(0xe5)](_0x2e70ac(0x133)),console[_0x2e70ac(0xe5)](_0x2e70ac(0xdb)),0x1;_0x284431[_0x2e70ac(0x122)]&&console[_0x2e70ac(0xe5)](_0x2e70ac(0x132)+_0x36ce51);if(!_0x284431[_0x2e70ac(0xf3)]){const _0x229be6=await confirm(_0x2e70ac(0xf2)+_0x36ce51+_0x2e70ac(0x114));if(!_0x229be6)return console[_0x2e70ac(0xe5)](_0x2e70ac(0x10f)),0x0;}const _0x133c94=await withSpinner('Deleting\x20project\x20'+_0x36ce51+_0x2e70ac(0xbf),()=>_0x2757b2[_0x2e70ac(0x126)][_0x2e70ac(0x134)](_0x36ce51),{'verbose':_0x284431['verbose']}),_0x2465d9=_0x133c94[_0x2e70ac(0x109)];return console[_0x2e70ac(0xe5)](_0x2e70ac(0xca)+_0x2465d9[_0x2e70ac(0xea)]),console[_0x2e70ac(0xe5)]('\x20\x20Project\x20ID:\x20'+_0x2465d9[_0x2e70ac(0xbb)]),0x0;}}
package/dist/core/auth.js CHANGED
@@ -1 +1 @@
1
- (function(_0x247d77,_0x2d3616){const _0x13ec35=a33_0x145a,_0x3bbf41=_0x247d77();while(!![]){try{const _0x362b04=-parseInt(_0x13ec35(0x190))/0x1+parseInt(_0x13ec35(0x186))/0x2+parseInt(_0x13ec35(0x185))/0x3+-parseInt(_0x13ec35(0x196))/0x4+parseInt(_0x13ec35(0x18a))/0x5*(-parseInt(_0x13ec35(0x18e))/0x6)+parseInt(_0x13ec35(0x18d))/0x7+parseInt(_0x13ec35(0x184))/0x8;if(_0x362b04===_0x2d3616)break;else _0x3bbf41['push'](_0x3bbf41['shift']());}catch(_0x82a4e8){_0x3bbf41['push'](_0x3bbf41['shift']());}}}(a33_0x42e8,0x3a57b));import{platform}from'os';import{readFileSync}from'fs';import{fileURLToPath}from'url';function a33_0x145a(_0x5d973b,_0x2fddfc){const _0x42e88a=a33_0x42e8();return a33_0x145a=function(_0x145a61,_0x362d36){_0x145a61=_0x145a61-0x184;let _0x32ad0b=_0x42e88a[_0x145a61];return _0x32ad0b;},a33_0x145a(_0x5d973b,_0x2fddfc);}import{dirname,join}from'path';import{getAPIKey}from'./config.js';export function getVersion(){const _0x4a2531=a33_0x145a;try{const _0x199bd6=fileURLToPath(import.meta[_0x4a2531(0x194)]),_0x40e747=dirname(_0x199bd6),_0x58c62a=join(_0x40e747,'../../package.json'),_0x3025fc=JSON[_0x4a2531(0x193)](readFileSync(_0x58c62a,_0x4a2531(0x18f)));return _0x3025fc[_0x4a2531(0x192)];}catch{return _0x4a2531(0x18b);}}export function getUserAgent(){const _0xca94c5=a33_0x145a,_0x1308c8=getVersion(),_0x519d8f=platform(),_0x156d70=process['version'][_0xca94c5(0x191)]('v','');return _0xca94c5(0x197)+_0x1308c8+'\x20('+_0x519d8f+';\x20node/'+_0x156d70+')';}export function getAuthHeaders(_0x27fc72,_0x3917f7){const _0x3a65fd=a33_0x145a,_0x3b27ad=getVersion(),_0x5cfe9c={'User-Agent':getUserAgent(),'X-TD-Client':_0x3a65fd(0x187),'X-TD-Client-Version':_0x3b27ad};return _0x3917f7&&(_0x5cfe9c['Authorization']='TD1\x20'+_0x3917f7),_0x5cfe9c;}function a33_0x42e8(){const _0x487fe4=['305879zyTftQ','replace','version','parse','url','Authorization','146116cOJJxO','tdx/','230088duopgE','1270524QHvupE','351986VtuFqQ','tdx','length','entries','1356865DiCRub','0.0.0','X-Trino-User','1571430XHOwnt','6GlpKXh','utf-8'];a33_0x42e8=function(){return _0x487fe4;};return a33_0x42e8();}export function toHeaderRecord(_0x14eb27){const _0x3fe27e=a33_0x145a,_0x59965d={};for(const [_0x56d123,_0x295149]of Object[_0x3fe27e(0x189)](_0x14eb27)){_0x295149!==undefined&&(_0x59965d[_0x56d123]=_0x295149);}return _0x59965d;}export function getTrinoHeaders(_0x33b1da,_0x1e5db4){const _0x4ba20a=a33_0x145a,_0x5d6345=getAuthHeaders(_0x33b1da,_0x1e5db4),_0x4ee5ea=toHeaderRecord(_0x5d6345);return delete _0x4ee5ea[_0x4ba20a(0x195)],_0x1e5db4&&(_0x4ee5ea[_0x4ba20a(0x18c)]=_0x1e5db4),_0x4ee5ea;}export function hasAPIKey(_0x1f369f){const _0x447d0c=a33_0x145a,_0x37ae49=getAPIKey(_0x1f369f);return _0x37ae49!==undefined&&_0x37ae49[_0x447d0c(0x188)]>0x0;}
1
+ (function(_0x3271d5,_0x2715ea){const _0x33be5f=a33_0x99e7,_0x524e80=_0x3271d5();while(!![]){try{const _0x520362=parseInt(_0x33be5f(0xea))/0x1*(parseInt(_0x33be5f(0xd7))/0x2)+-parseInt(_0x33be5f(0xe8))/0x3+parseInt(_0x33be5f(0xeb))/0x4*(parseInt(_0x33be5f(0xdb))/0x5)+parseInt(_0x33be5f(0xe5))/0x6+parseInt(_0x33be5f(0xec))/0x7+parseInt(_0x33be5f(0xe1))/0x8+parseInt(_0x33be5f(0xde))/0x9*(-parseInt(_0x33be5f(0xe6))/0xa);if(_0x520362===_0x2715ea)break;else _0x524e80['push'](_0x524e80['shift']());}catch(_0x34e4a4){_0x524e80['push'](_0x524e80['shift']());}}}(a33_0x40e9,0x998e0));import{platform}from'os';import{readFileSync}from'fs';import{fileURLToPath}from'url';import{dirname,join}from'path';function a33_0x40e9(){const _0xc0f77d=['2710NboPgs','parse','299310nOKMfe','entries','1PckKKB','4xaRLtr','3685416mGgImA','Authorization','1371180GNSHlL','tdx/','../../package.json',';\x20node/','4777545LlMgWg','X-Trino-User','tdx','84897xXLyCm','url','replace','4648152zLHJBI','length','utf-8','0.0.0','3218802AWkWOO'];a33_0x40e9=function(){return _0xc0f77d;};return a33_0x40e9();}import{getAPIKey}from'./config.js';export function getVersion(){const _0x4da2de=a33_0x99e7;try{const _0x48db58=fileURLToPath(import.meta[_0x4da2de(0xdf)]),_0x1085ee=dirname(_0x48db58),_0x3d8012=join(_0x1085ee,_0x4da2de(0xd9)),_0x39e2e8=JSON[_0x4da2de(0xe7)](readFileSync(_0x3d8012,_0x4da2de(0xe3)));return _0x39e2e8['version'];}catch{return _0x4da2de(0xe4);}}export function getUserAgent(){const _0x4abe3d=a33_0x99e7,_0x21d5ac=getVersion(),_0x2c300f=platform(),_0x8ba9cb=process['version'][_0x4abe3d(0xe0)]('v','');return _0x4abe3d(0xd8)+_0x21d5ac+'\x20('+_0x2c300f+_0x4abe3d(0xda)+_0x8ba9cb+')';}function a33_0x99e7(_0x18907b,_0xd95aa){const _0x40e908=a33_0x40e9();return a33_0x99e7=function(_0x99e794,_0x333d1e){_0x99e794=_0x99e794-0xd6;let _0x4d50c2=_0x40e908[_0x99e794];return _0x4d50c2;},a33_0x99e7(_0x18907b,_0xd95aa);}export function getAuthHeaders(_0x15c92d,_0x3e6830){const _0x1519e5=a33_0x99e7,_0x3cc383=getVersion(),_0x2dbc11={'User-Agent':getUserAgent(),'X-TD-Client':_0x1519e5(0xdd),'X-TD-Client-Version':_0x3cc383};return _0x3e6830&&(_0x2dbc11[_0x1519e5(0xd6)]='TD1\x20'+_0x3e6830),_0x2dbc11;}export function toHeaderRecord(_0x23c830){const _0x47ca47=a33_0x99e7,_0x453622={};for(const [_0x216813,_0x507acf]of Object[_0x47ca47(0xe9)](_0x23c830)){_0x507acf!==undefined&&(_0x453622[_0x216813]=_0x507acf);}return _0x453622;}export function getTrinoHeaders(_0x5962a6,_0x131b9a){const _0x1976c5=a33_0x99e7,_0x4151bc=getAuthHeaders(_0x5962a6,_0x131b9a),_0x1505fb=toHeaderRecord(_0x4151bc);return delete _0x1505fb[_0x1976c5(0xd6)],_0x131b9a&&(_0x1505fb[_0x1976c5(0xdc)]=_0x131b9a),_0x1505fb;}export function hasAPIKey(_0x69e3ad){const _0x295d79=a33_0x99e7,_0x148a2c=getAPIKey(_0x69e3ad);return _0x148a2c!==undefined&&_0x148a2c[_0x295d79(0xe2)]>0x0;}
@@ -1 +1 @@
1
- (function(_0xed599a,_0x434454){const _0x14dbae=a34_0x31d9,_0x5b1f30=_0xed599a();while(!![]){try{const _0x58c720=-parseInt(_0x14dbae(0x177))/0x1*(parseInt(_0x14dbae(0x168))/0x2)+-parseInt(_0x14dbae(0x16f))/0x3*(-parseInt(_0x14dbae(0x184))/0x4)+parseInt(_0x14dbae(0x188))/0x5*(-parseInt(_0x14dbae(0x174))/0x6)+-parseInt(_0x14dbae(0x172))/0x7*(parseInt(_0x14dbae(0x189))/0x8)+parseInt(_0x14dbae(0x16a))/0x9*(-parseInt(_0x14dbae(0x17a))/0xa)+parseInt(_0x14dbae(0x18b))/0xb*(-parseInt(_0x14dbae(0x187))/0xc)+parseInt(_0x14dbae(0x166))/0xd;if(_0x58c720===_0x434454)break;else _0x5b1f30['push'](_0x5b1f30['shift']());}catch(_0x5ba649){_0x5b1f30['push'](_0x5b1f30['shift']());}}}(a34_0x17f1,0xa7e29));import{homedir}from'os';import{join}from'path';import{existsSync,readFileSync,writeFileSync,mkdirSync}from'fs';import*as a34_0x98a404 from'node:fs';import*as a34_0x4a675b from'node:path';import{SITE_ALIASES}from'../types/index.js';import{validateSecureFilePermissions}from'../utils/file-permissions.js';function a34_0x31d9(_0x36a280,_0x294e53){const _0x17f1af=a34_0x17f1();return a34_0x31d9=function(_0x31d965,_0x44be5d){_0x31d965=_0x31d965-0x158;let _0x150ea4=_0x17f1af[_0x31d965];return _0x150ea4;},a34_0x31d9(_0x36a280,_0x294e53);}export function getConfigDir(){const _0x2e6afc=a34_0x31d9;return process[_0x2e6afc(0x15b)][_0x2e6afc(0x175)]||join(homedir(),_0x2e6afc(0x17f),'tdx');}function a34_0x17f1(){const _0x2c35fc=['ap02','.env.','warn','\x27,\x20defaulting\x20to\x20us01','860wByjJZ','env:\x20TD_API_KEY','existsSync','12LSVtlY','131060igUUbh','8JFVUFi','Warning:\x20Unknown\x20site\x20\x27','12951037ikRrid','stg-us01','tdx','llm_default_project','toUpperCase','.env','jp01','readFileSync','tdx.json','Warning:\x20Failed\x20to\x20load\x20','env','parse','\x20(TD_API_KEY)','TDX_CACHE_DIR','eu01','error','global:\x20','startsWith','profile','profiles','slice','49765781twSRzS','join','23570NfxqKw','utf-8','5363397WHtSit','profile:\x20','TD_API_KEY','replace','TD_API_KEY_','11973DVzMWT','us01','dev-us01','982345cWCpXI','stg-ap03','36fMQBcO','TDX_CONFIG_DIR','stg-jp01','113gCuoKT','endsWith','entries','20NISygi','trim','includes','map','ap03','.config'];a34_0x17f1=function(){return _0x2c35fc;};return a34_0x17f1();}export function getConfigFile(){const _0x199642=a34_0x31d9;return join(getConfigDir(),_0x199642(0x190));}export function getCacheDir(){const _0x5d5a42=a34_0x31d9;return process[_0x5d5a42(0x15b)][_0x5d5a42(0x15e)]||join(homedir(),'.cache',_0x5d5a42(0x18d));}export function getLLMProjectCacheFile(){const _0xcbe431=a34_0x31d9;return join(getCacheDir(),_0xcbe431(0x18e));}export function readCachedLLMProject(){const _0x1052b0=a34_0x31d9;try{const _0x2b0d04=getLLMProjectCacheFile();if(!existsSync(_0x2b0d04))return null;return readFileSync(_0x2b0d04,_0x1052b0(0x169))['trim']();}catch{return null;}}export function writeCachedLLMProject(_0x8d777e){const _0x43ba5e=a34_0x31d9;try{const _0x554701=getCacheDir(),_0x387aaf=getLLMProjectCacheFile();!existsSync(_0x554701)&&mkdirSync(_0x554701,{'recursive':!![]}),writeFileSync(_0x387aaf,_0x8d777e,'utf-8');}catch(_0x5bffc5){console[_0x43ba5e(0x160)]('Warning:\x20Failed\x20to\x20cache\x20LLM\x20project\x20name:',_0x5bffc5);}}export function parseEnvFile(_0x80f934){const _0x5c783f=a34_0x31d9,_0xaa6310={};for(const _0x38b430 of _0x80f934['split']('\x0a')){const _0x31fff7=_0x38b430[_0x5c783f(0x17b)]();if(!_0x31fff7||_0x31fff7[_0x5c783f(0x162)]('#'))continue;const _0x5cfca4=_0x31fff7['match'](/^([^=]+)=(.*)$/);if(_0x5cfca4){const _0xe1be6c=_0x5cfca4[0x1][_0x5c783f(0x17b)]();let _0x18ad1f=_0x5cfca4[0x2][_0x5c783f(0x17b)]();(_0x18ad1f[_0x5c783f(0x162)]('\x22')&&_0x18ad1f[_0x5c783f(0x178)]('\x22')||_0x18ad1f[_0x5c783f(0x162)]('\x27')&&_0x18ad1f[_0x5c783f(0x178)]('\x27'))&&(_0x18ad1f=_0x18ad1f[_0x5c783f(0x165)](0x1,-0x1)),_0xaa6310[_0xe1be6c]=_0x18ad1f;}}return _0xaa6310;}export function readUserConfig(){const _0x274c8c=a34_0x31d9,_0xbe92cd=getConfigFile();if(!existsSync(_0xbe92cd))return{};try{const _0x2ceedb=readFileSync(_0xbe92cd,_0x274c8c(0x169));return parseEnvFile(_0x2ceedb);}catch(_0x18b65d){return console['warn']('Warning:\x20Failed\x20to\x20read\x20config\x20file\x20'+_0xbe92cd+':',_0x18b65d),{};}}export function resolveSite(_0x3d0a6b){const _0x28c8f1=a34_0x31d9,_0x2d6864=[_0x28c8f1(0x170),_0x28c8f1(0x191),_0x28c8f1(0x15f),_0x28c8f1(0x180),_0x28c8f1(0x17e),'dev-us01','dev-eu01',_0x28c8f1(0x18c),_0x28c8f1(0x176),_0x28c8f1(0x173)];if(_0x2d6864[_0x28c8f1(0x17c)](_0x3d0a6b))return _0x3d0a6b;if(_0x3d0a6b in SITE_ALIASES)return SITE_ALIASES[_0x3d0a6b];return console['warn'](_0x28c8f1(0x18a)+_0x3d0a6b+_0x28c8f1(0x183)),_0x28c8f1(0x170);}let cachedUserConfig=null;export function loadUserConfigOnce(){return cachedUserConfig===null&&(cachedUserConfig=readUserConfig()),cachedUserConfig;}export function clearConfigCache(){cachedUserConfig=null;}export function getAPIKey(_0x40d678,_0x589191){const _0x1cede2=a34_0x31d9,_0x496a33=_0x40d678['toUpperCase']()['replace'](/-/g,'_'),_0x43d4b3=_0x1cede2(0x16e)+_0x496a33;if(process[_0x1cede2(0x15b)][_0x43d4b3])return process[_0x1cede2(0x15b)][_0x43d4b3];if(process[_0x1cede2(0x15b)]['TD_API_KEY'])return process['env'][_0x1cede2(0x16c)];const _0x3af230=_0x589191||getActiveProfileName();if(_0x3af230){const _0x594e94=loadProfileEnv(_0x3af230);if(_0x594e94){if(_0x594e94[_0x43d4b3])return _0x594e94[_0x43d4b3];if(_0x594e94[_0x1cede2(0x16c)])return _0x594e94[_0x1cede2(0x16c)];}}const _0x167a14=loadUserConfigOnce();if(_0x167a14[_0x43d4b3])return _0x167a14[_0x43d4b3];if(_0x167a14['TD_API_KEY'])return _0x167a14['TD_API_KEY'];return undefined;}export function getAPIKeySource(_0x1f95c,_0x2dde7a){const _0x29657f=a34_0x31d9,_0x381ac8='TD_API_KEY_'+_0x1f95c[_0x29657f(0x18f)]()[_0x29657f(0x16d)](/-/g,'_');if(process[_0x29657f(0x15b)][_0x381ac8])return'env:\x20'+_0x381ac8;if(process[_0x29657f(0x15b)][_0x29657f(0x16c)])return _0x29657f(0x185);const _0xa0ab2b=_0x2dde7a||getActiveProfileName();if(_0xa0ab2b){const _0x458c7f=loadProfileEnv(_0xa0ab2b);if(_0x458c7f){if(_0x458c7f[_0x381ac8])return'profile:\x20'+_0xa0ab2b+'\x20('+_0x381ac8+')';if(_0x458c7f[_0x29657f(0x16c)])return _0x29657f(0x16b)+_0xa0ab2b+_0x29657f(0x15d);}}const _0x35b247=loadUserConfigOnce(),_0x317565=getConfigFile();if(_0x35b247[_0x381ac8])return _0x29657f(0x161)+_0x317565+'\x20('+_0x381ac8+')';if(_0x35b247[_0x29657f(0x16c)])return _0x29657f(0x161)+_0x317565+_0x29657f(0x15d);return null;}function loadProfileEnv(_0x2b52d3){const _0x2259d0=a34_0x31d9,_0x15cd59=a34_0x4a675b[_0x2259d0(0x167)](getConfigDir(),_0x2259d0(0x181)+_0x2b52d3);if(a34_0x98a404[_0x2259d0(0x186)](_0x15cd59)){validateSecureFilePermissions(_0x15cd59);try{const _0x118ed8=a34_0x98a404[_0x2259d0(0x158)](_0x15cd59,_0x2259d0(0x169));return parseEnvFile(_0x118ed8);}catch(_0x1bf096){console['warn'](_0x2259d0(0x15a)+_0x15cd59+':\x20'+_0x1bf096);}}const _0x2aa105=a34_0x4a675b[_0x2259d0(0x167)](getConfigDir(),_0x2259d0(0x164),_0x2b52d3,'.env');if(a34_0x98a404[_0x2259d0(0x186)](_0x2aa105)){validateSecureFilePermissions(_0x2aa105);try{const _0x3df7ae=a34_0x98a404['readFileSync'](_0x2aa105,_0x2259d0(0x169));return parseEnvFile(_0x3df7ae);}catch(_0x314384){return console[_0x2259d0(0x182)](_0x2259d0(0x15a)+_0x2aa105+':\x20'+_0x314384),null;}}return null;}function getActiveProfileName(){const _0x522e1f=a34_0x31d9,_0x3d5cf1=a34_0x4a675b[_0x522e1f(0x167)](getConfigDir(),_0x522e1f(0x159));if(!a34_0x98a404['existsSync'](_0x3d5cf1))return null;try{const _0x434b50=a34_0x98a404['readFileSync'](_0x3d5cf1,_0x522e1f(0x169)),_0x3a90ed=JSON[_0x522e1f(0x15c)](_0x434b50);return _0x3a90ed[_0x522e1f(0x163)]||null;}catch{return null;}}export function saveAPIKey(_0x1bd9f8,_0x1c8711){const _0x20f618=a34_0x31d9,_0x3feb5f=getConfigDir(),_0x4a3ed5=getConfigFile();!existsSync(_0x3feb5f)&&mkdirSync(_0x3feb5f,{'recursive':!![],'mode':0x1c0});const _0x5db2ca=readUserConfig(),_0x109d95=_0x1bd9f8[_0x20f618(0x18f)]()['replace'](/-/g,'_');_0x5db2ca[_0x20f618(0x16e)+_0x109d95]=_0x1c8711;const _0x379ccb=Object[_0x20f618(0x179)](_0x5db2ca)[_0x20f618(0x17d)](([_0x1ceadd,_0x2160f0])=>_0x1ceadd+'='+_0x2160f0);writeFileSync(_0x4a3ed5,_0x379ccb['join']('\x0a')+'\x0a',{'mode':0x180});}export function loadConfig(){const _0x5cdcbc=a34_0x31d9,_0x2b233d={'apiKeys':{},'defaultSite':_0x5cdcbc(0x170)},_0x49b03d=['us01','jp01',_0x5cdcbc(0x15f),_0x5cdcbc(0x180),_0x5cdcbc(0x17e),_0x5cdcbc(0x171),'dev-eu01',_0x5cdcbc(0x18c),'stg-jp01',_0x5cdcbc(0x173)];for(const _0x5a513f of _0x49b03d){const _0x53b3b1=getAPIKey(_0x5a513f);_0x53b3b1&&(_0x2b233d['apiKeys'][_0x5a513f]=_0x53b3b1);}return _0x2b233d;}
1
+ (function(_0x21c124,_0x1fdc5a){const _0x1cb297=a34_0x282f,_0x1af50e=_0x21c124();while(!![]){try{const _0x5706dc=-parseInt(_0x1cb297(0x200))/0x1+parseInt(_0x1cb297(0x1fb))/0x2+parseInt(_0x1cb297(0x229))/0x3*(-parseInt(_0x1cb297(0x203))/0x4)+-parseInt(_0x1cb297(0x1f7))/0x5*(-parseInt(_0x1cb297(0x222))/0x6)+parseInt(_0x1cb297(0x20d))/0x7*(-parseInt(_0x1cb297(0x22a))/0x8)+-parseInt(_0x1cb297(0x202))/0x9+-parseInt(_0x1cb297(0x227))/0xa*(-parseInt(_0x1cb297(0x208))/0xb);if(_0x5706dc===_0x1fdc5a)break;else _0x1af50e['push'](_0x1af50e['shift']());}catch(_0x76dd9f){_0x1af50e['push'](_0x1af50e['shift']());}}}(a34_0x4094,0x335b9));import{homedir}from'os';import{join}from'path';import{existsSync,readFileSync,writeFileSync,mkdirSync}from'fs';import*as a34_0x1327c2 from'node:fs';import*as a34_0x3ef088 from'node:path';import{SITE_ALIASES}from'../types/index.js';import{validateSecureFilePermissions}from'../utils/file-permissions.js';export function getConfigDir(){const _0x33369d=a34_0x282f;return process[_0x33369d(0x213)]['TDX_CONFIG_DIR']||join(homedir(),_0x33369d(0x1fa),_0x33369d(0x215));}function a34_0x4094(){const _0x562315=['profiles','jp01','215661wrrocA','profile:\x20','3287502FyZTVe','4mksOCL','trim','llm_default_project','Warning:\x20Unknown\x20site\x20\x27','\x27,\x20defaulting\x20to\x20us01','7447418NMCvar','replace','parse','eu01','entries','42lHESGK','dev-eu01','utf-8','endsWith','.env','split','env','stg-us01','tdx','slice','includes','\x20(TD_API_KEY)','env:\x20TD_API_KEY','stg-ap03','Warning:\x20Failed\x20to\x20load\x20','map','global:\x20','TDX_CACHE_DIR','stg-jp01','TD_API_KEY','ap02','1382118gotwVp','env:\x20','match','warn','startsWith','10auBkYH','us01','580119HDwGci','12424LGfqZM','.cache','dev-us01','profile','join','Warning:\x20Failed\x20to\x20cache\x20LLM\x20project\x20name:','5gKKwJZ','readFileSync','existsSync','.config','173200ixOWcc','toUpperCase','TD_API_KEY_'];a34_0x4094=function(){return _0x562315;};return a34_0x4094();}export function getConfigFile(){const _0x1cee95=a34_0x282f;return join(getConfigDir(),_0x1cee95(0x211));}export function getCacheDir(){const _0x332e92=a34_0x282f;return process[_0x332e92(0x213)][_0x332e92(0x21e)]||join(homedir(),_0x332e92(0x22b),_0x332e92(0x215));}export function getLLMProjectCacheFile(){const _0x5699a2=a34_0x282f;return join(getCacheDir(),_0x5699a2(0x205));}export function readCachedLLMProject(){const _0x206e4f=a34_0x282f;try{const _0x4266b9=getLLMProjectCacheFile();if(!existsSync(_0x4266b9))return null;return readFileSync(_0x4266b9,_0x206e4f(0x20f))[_0x206e4f(0x204)]();}catch{return null;}}export function writeCachedLLMProject(_0x369216){const _0x1447f2=a34_0x282f;try{const _0x1e2f46=getCacheDir(),_0x1d4cb7=getLLMProjectCacheFile();!existsSync(_0x1e2f46)&&mkdirSync(_0x1e2f46,{'recursive':!![]}),writeFileSync(_0x1d4cb7,_0x369216,_0x1447f2(0x20f));}catch(_0x2c3686){console['error'](_0x1447f2(0x1f6),_0x2c3686);}}export function parseEnvFile(_0x25c6ce){const _0x1436a2=a34_0x282f,_0xde0928={};for(const _0x5d554a of _0x25c6ce[_0x1436a2(0x212)]('\x0a')){const _0x5e0f85=_0x5d554a[_0x1436a2(0x204)]();if(!_0x5e0f85||_0x5e0f85[_0x1436a2(0x226)]('#'))continue;const _0x74d526=_0x5e0f85[_0x1436a2(0x224)](/^([^=]+)=(.*)$/);if(_0x74d526){const _0x3899c3=_0x74d526[0x1][_0x1436a2(0x204)]();let _0x58f4b3=_0x74d526[0x2][_0x1436a2(0x204)]();(_0x58f4b3[_0x1436a2(0x226)]('\x22')&&_0x58f4b3[_0x1436a2(0x210)]('\x22')||_0x58f4b3[_0x1436a2(0x226)]('\x27')&&_0x58f4b3['endsWith']('\x27'))&&(_0x58f4b3=_0x58f4b3[_0x1436a2(0x216)](0x1,-0x1)),_0xde0928[_0x3899c3]=_0x58f4b3;}}return _0xde0928;}export function readUserConfig(){const _0x14c6c1=a34_0x282f,_0xb3643f=getConfigFile();if(!existsSync(_0xb3643f))return{};try{const _0x1c33b9=readFileSync(_0xb3643f,_0x14c6c1(0x20f));return parseEnvFile(_0x1c33b9);}catch(_0x4764bb){return console['warn']('Warning:\x20Failed\x20to\x20read\x20config\x20file\x20'+_0xb3643f+':',_0x4764bb),{};}}export function resolveSite(_0xd914a8){const _0x4ab043=a34_0x282f,_0x4b54c6=[_0x4ab043(0x228),_0x4ab043(0x1ff),_0x4ab043(0x20b),_0x4ab043(0x221),'ap03',_0x4ab043(0x1f3),'dev-eu01',_0x4ab043(0x214),_0x4ab043(0x21f),_0x4ab043(0x21a)];if(_0x4b54c6[_0x4ab043(0x217)](_0xd914a8))return _0xd914a8;if(_0xd914a8 in SITE_ALIASES)return SITE_ALIASES[_0xd914a8];return console[_0x4ab043(0x225)](_0x4ab043(0x206)+_0xd914a8+_0x4ab043(0x207)),_0x4ab043(0x228);}let cachedUserConfig=null;function a34_0x282f(_0x16e77e,_0xf78892){const _0x409481=a34_0x4094();return a34_0x282f=function(_0x282f11,_0x3590e8){_0x282f11=_0x282f11-0x1f3;let _0x45d5a8=_0x409481[_0x282f11];return _0x45d5a8;},a34_0x282f(_0x16e77e,_0xf78892);}export function loadUserConfigOnce(){return cachedUserConfig===null&&(cachedUserConfig=readUserConfig()),cachedUserConfig;}export function clearConfigCache(){cachedUserConfig=null;}export function getAPIKey(_0xf221e7,_0x15b792){const _0x3ee831=a34_0x282f,_0xab0305=_0xf221e7[_0x3ee831(0x1fc)]()[_0x3ee831(0x209)](/-/g,'_'),_0x715f2f=_0x3ee831(0x1fd)+_0xab0305;if(process['env'][_0x715f2f])return process['env'][_0x715f2f];if(process[_0x3ee831(0x213)][_0x3ee831(0x220)])return process[_0x3ee831(0x213)]['TD_API_KEY'];const _0x194624=_0x15b792||getActiveProfileName();if(_0x194624){const _0x5a1e7a=loadProfileEnv(_0x194624);if(_0x5a1e7a){if(_0x5a1e7a[_0x715f2f])return _0x5a1e7a[_0x715f2f];if(_0x5a1e7a['TD_API_KEY'])return _0x5a1e7a[_0x3ee831(0x220)];}}const _0x3cced2=loadUserConfigOnce();if(_0x3cced2[_0x715f2f])return _0x3cced2[_0x715f2f];if(_0x3cced2[_0x3ee831(0x220)])return _0x3cced2['TD_API_KEY'];return undefined;}export function getAPIKeySource(_0x27835d,_0xc6f0f5){const _0x8c58b=a34_0x282f,_0x1b5d87='TD_API_KEY_'+_0x27835d[_0x8c58b(0x1fc)]()[_0x8c58b(0x209)](/-/g,'_');if(process[_0x8c58b(0x213)][_0x1b5d87])return _0x8c58b(0x223)+_0x1b5d87;if(process['env']['TD_API_KEY'])return _0x8c58b(0x219);const _0x17117a=_0xc6f0f5||getActiveProfileName();if(_0x17117a){const _0x101a1c=loadProfileEnv(_0x17117a);if(_0x101a1c){if(_0x101a1c[_0x1b5d87])return _0x8c58b(0x201)+_0x17117a+'\x20('+_0x1b5d87+')';if(_0x101a1c[_0x8c58b(0x220)])return _0x8c58b(0x201)+_0x17117a+'\x20(TD_API_KEY)';}}const _0x799193=loadUserConfigOnce(),_0x5e5555=getConfigFile();if(_0x799193[_0x1b5d87])return _0x8c58b(0x21d)+_0x5e5555+'\x20('+_0x1b5d87+')';if(_0x799193[_0x8c58b(0x220)])return'global:\x20'+_0x5e5555+_0x8c58b(0x218);return null;}function loadProfileEnv(_0x48ca00){const _0x2ef127=a34_0x282f,_0x34de4c=a34_0x3ef088[_0x2ef127(0x1f5)](getConfigDir(),'.env.'+_0x48ca00);if(a34_0x1327c2[_0x2ef127(0x1f9)](_0x34de4c)){validateSecureFilePermissions(_0x34de4c);try{const _0x53e243=a34_0x1327c2[_0x2ef127(0x1f8)](_0x34de4c,'utf-8');return parseEnvFile(_0x53e243);}catch(_0x5b15af){console[_0x2ef127(0x225)](_0x2ef127(0x21b)+_0x34de4c+':\x20'+_0x5b15af);}}const _0x44f888=a34_0x3ef088[_0x2ef127(0x1f5)](getConfigDir(),_0x2ef127(0x1fe),_0x48ca00,_0x2ef127(0x211));if(a34_0x1327c2[_0x2ef127(0x1f9)](_0x44f888)){validateSecureFilePermissions(_0x44f888);try{const _0xa6aabb=a34_0x1327c2[_0x2ef127(0x1f8)](_0x44f888,_0x2ef127(0x20f));return parseEnvFile(_0xa6aabb);}catch(_0x3ad6ec){return console[_0x2ef127(0x225)](_0x2ef127(0x21b)+_0x44f888+':\x20'+_0x3ad6ec),null;}}return null;}function getActiveProfileName(){const _0xd422b0=a34_0x282f,_0x8b0d83=a34_0x3ef088[_0xd422b0(0x1f5)](getConfigDir(),'tdx.json');if(!a34_0x1327c2[_0xd422b0(0x1f9)](_0x8b0d83))return null;try{const _0x3ba725=a34_0x1327c2[_0xd422b0(0x1f8)](_0x8b0d83,_0xd422b0(0x20f)),_0x55382d=JSON[_0xd422b0(0x20a)](_0x3ba725);return _0x55382d[_0xd422b0(0x1f4)]||null;}catch{return null;}}export function saveAPIKey(_0x2c6a8d,_0x33f73a){const _0x184f0c=a34_0x282f,_0x1c0834=getConfigDir(),_0x1d1504=getConfigFile();!existsSync(_0x1c0834)&&mkdirSync(_0x1c0834,{'recursive':!![],'mode':0x1c0});const _0x46024c=readUserConfig(),_0x39cda0=_0x2c6a8d['toUpperCase']()[_0x184f0c(0x209)](/-/g,'_');_0x46024c[_0x184f0c(0x1fd)+_0x39cda0]=_0x33f73a;const _0x42fabb=Object[_0x184f0c(0x20c)](_0x46024c)[_0x184f0c(0x21c)](([_0x3a2804,_0x8d2b39])=>_0x3a2804+'='+_0x8d2b39);writeFileSync(_0x1d1504,_0x42fabb[_0x184f0c(0x1f5)]('\x0a')+'\x0a',{'mode':0x180});}export function loadConfig(){const _0x2df468=a34_0x282f,_0x5167ed={'apiKeys':{},'defaultSite':_0x2df468(0x228)},_0x34d50d=[_0x2df468(0x228),_0x2df468(0x1ff),_0x2df468(0x20b),_0x2df468(0x221),'ap03',_0x2df468(0x1f3),_0x2df468(0x20e),_0x2df468(0x214),_0x2df468(0x21f),'stg-ap03'];for(const _0x45f0e5 of _0x34d50d){const _0xd8edbf=getAPIKey(_0x45f0e5);_0xd8edbf&&(_0x5167ed['apiKeys'][_0x45f0e5]=_0xd8edbf);}return _0x5167ed;}
@@ -1 +1 @@
1
- const a35_0x4d679b=a35_0x1ec1;(function(_0x315572,_0xae8491){const _0x3f194b=a35_0x1ec1,_0x56bcbf=_0x315572();while(!![]){try{const _0x7ed201=parseInt(_0x3f194b(0x190))/0x1+parseInt(_0x3f194b(0x16c))/0x2+parseInt(_0x3f194b(0x162))/0x3*(parseInt(_0x3f194b(0x19c))/0x4)+-parseInt(_0x3f194b(0x17b))/0x5+parseInt(_0x3f194b(0x187))/0x6*(-parseInt(_0x3f194b(0x15a))/0x7)+-parseInt(_0x3f194b(0x169))/0x8+parseInt(_0x3f194b(0x18e))/0x9;if(_0x7ed201===_0xae8491)break;else _0x56bcbf['push'](_0x56bcbf['shift']());}catch(_0x42dc9d){_0x56bcbf['push'](_0x56bcbf['shift']());}}}(a35_0x449c,0xe74d9));import{resolveSite,getAPIKey,getConfigDir}from'./config.js';import{loadSessionContext}from'./session.js';import{loadProjectConfig,findProjectConfigPath}from'./project-config.js';import{getActiveProfile,loadProfile}from'./profile.js';import{LogLevel}from'../utils/tdx-logger.js';import*as a35_0x17afa9 from'node:fs';import*as a35_0x183dc8 from'node:path';function a35_0x1ec1(_0x269bf8,_0x2fc80c){const _0x449c8f=a35_0x449c();return a35_0x1ec1=function(_0x1ec176,_0xa9968b){_0x1ec176=_0x1ec176-0x157;let _0xa3a448=_0x449c8f[_0x1ec176];return _0xa3a448;},a35_0x1ec1(_0x269bf8,_0x2fc80c);}export class GlobalContext{[a35_0x4d679b(0x168)];[a35_0x4d679b(0x19b)];[a35_0x4d679b(0x17c)];[a35_0x4d679b(0x18d)];[a35_0x4d679b(0x193)];['apiKey'];[a35_0x4d679b(0x198)];[a35_0x4d679b(0x16e)];[a35_0x4d679b(0x182)];[a35_0x4d679b(0x17e)];[a35_0x4d679b(0x15d)];['configFiles'];constructor(_0x16aa52){const _0xc87b23=a35_0x4d679b;this[_0xc87b23(0x15d)]=_0x16aa52[_0xc87b23(0x196)]||process[_0xc87b23(0x160)][_0xc87b23(0x194)]();const _0x54549f=loadSessionContext(_0x16aa52['session']),_0x732631=loadProjectConfig(),_0x2f8f40=this[_0xc87b23(0x172)]();this[_0xc87b23(0x17e)]=_0x16aa52[_0xc87b23(0x178)]||_0x54549f?.[_0xc87b23(0x178)]||_0x2f8f40[_0xc87b23(0x178)]||getActiveProfile();const _0x335893=this['activeProfile']?loadProfile(this[_0xc87b23(0x17e)]):null,_0x3bdff2=_0x4b053d=>{const _0x310972=_0xc87b23;if(!_0x4b053d)return{};const _0x278625=_0x4b053d,_0x325db0={};for(const [_0x2a9c8a,_0x41e192]of Object[_0x310972(0x18c)](_0x278625)){typeof _0x41e192===_0x310972(0x195)&&(_0x325db0[_0x2a9c8a]=_0x41e192);}return _0x325db0;},_0x35b788={};if(_0x16aa52[_0xc87b23(0x168)]&&_0x16aa52[_0xc87b23(0x168)]!==_0xc87b23(0x166))_0x35b788[_0xc87b23(0x168)]=_0x16aa52[_0xc87b23(0x168)];const _0x303b73=_0x54549f?.[_0xc87b23(0x19b)],_0x1ca878=_0x732631?.[_0xc87b23(0x19b)],_0xf6090=_0x335893?.[_0xc87b23(0x174)]?.['database'],_0x48904a=_0x2f8f40[_0xc87b23(0x19b)];_0x16aa52[_0xc87b23(0x19b)]&&(_0x16aa52[_0xc87b23(0x19b)]!==_0x303b73&&_0x16aa52[_0xc87b23(0x19b)]!==_0x1ca878&&_0x16aa52['database']!==_0xf6090&&_0x16aa52[_0xc87b23(0x19b)]!==_0x48904a)&&(_0x35b788[_0xc87b23(0x19b)]=_0x16aa52[_0xc87b23(0x19b)]);if(_0x16aa52[_0xc87b23(0x17a)])_0x35b788[_0xc87b23(0x17c)]=_0x16aa52[_0xc87b23(0x17a)];if(_0x16aa52[_0xc87b23(0x16a)])_0x35b788[_0xc87b23(0x193)]=_0x16aa52[_0xc87b23(0x16a)];if(_0x16aa52[_0xc87b23(0x178)])_0x35b788['profile']=_0x16aa52[_0xc87b23(0x178)];this[_0xc87b23(0x182)]={'cliFlags':_0x35b788,'session':_0x3bdff2(_0x54549f),'project':_0x3bdff2(_0x732631),'profile':_0x3bdff2(_0x335893?.[_0xc87b23(0x174)]),'global':_0x3bdff2(_0x2f8f40)};const _0x40ec12={...this[_0xc87b23(0x182)][_0xc87b23(0x15e)],...this['layers'][_0xc87b23(0x178)],...this[_0xc87b23(0x182)]['project'],...this['layers'][_0xc87b23(0x196)],...this[_0xc87b23(0x182)][_0xc87b23(0x167)]},_0x4b8388=_0x40ec12[_0xc87b23(0x168)]||_0xc87b23(0x166);this[_0xc87b23(0x168)]=resolveSite(_0x4b8388),this[_0xc87b23(0x19b)]=_0x40ec12[_0xc87b23(0x19b)],this['parent_segment']=_0x40ec12[_0xc87b23(0x17c)],this['segment_path']=_0x40ec12['segment_path'],this[_0xc87b23(0x193)]=_0x40ec12['llm_project'],this[_0xc87b23(0x198)]=_0x16aa52[_0xc87b23(0x198)]||![],this[_0xc87b23(0x16e)]=_0x16aa52[_0xc87b23(0x16e)]??LogLevel[_0xc87b23(0x177)],this[_0xc87b23(0x16b)]=getAPIKey(this['site'],this[_0xc87b23(0x17e)]||undefined);const _0x1d4cad=getConfigDir(),_0x30afbc=a35_0x183dc8[_0xc87b23(0x197)](_0x1d4cad,_0xc87b23(0x173),this[_0xc87b23(0x15d)]+_0xc87b23(0x180)),_0x3ef95d=findProjectConfigPath(),_0x18cedc=a35_0x183dc8[_0xc87b23(0x197)](_0x1d4cad,_0xc87b23(0x189)),_0x5befd8=a35_0x183dc8[_0xc87b23(0x197)](_0x1d4cad,_0xc87b23(0x15f));let _0xe9ebef=null,_0x128fda=null;this[_0xc87b23(0x17e)]&&(_0xe9ebef=a35_0x183dc8[_0xc87b23(0x197)](_0x1d4cad,_0xc87b23(0x171),this[_0xc87b23(0x17e)],_0xc87b23(0x189)),_0x128fda=a35_0x183dc8[_0xc87b23(0x197)](_0x1d4cad,'profiles',this[_0xc87b23(0x17e)],'.env')),this[_0xc87b23(0x18b)]={'session':a35_0x17afa9[_0xc87b23(0x176)](_0x30afbc)?_0x30afbc:null,'project':_0x3ef95d,'profile':_0xe9ebef&&a35_0x17afa9['existsSync'](_0xe9ebef)?_0xe9ebef:null,'profileCredentials':_0x128fda&&a35_0x17afa9[_0xc87b23(0x176)](_0x128fda)?_0x128fda:null,'global':a35_0x17afa9[_0xc87b23(0x176)](_0x18cedc)?_0x18cedc:null,'globalCredentials':a35_0x17afa9[_0xc87b23(0x176)](_0x5befd8)?_0x5befd8:null};}[a35_0x4d679b(0x185)](_0x5b49a5,_0x14d741){const _0x5d058f=a35_0x4d679b;if(!_0x14d741)return _0x5d058f(0x186);const _0x5503bd=_0x14d741;if(this[_0x5d058f(0x182)]['cliFlags'][_0x5b49a5]===_0x5503bd){if(_0x5b49a5===_0x5d058f(0x168)&&_0x5503bd===_0x5d058f(0x166)&&!this[_0x5d058f(0x182)][_0x5d058f(0x196)][_0x5d058f(0x168)]&&!this[_0x5d058f(0x182)][_0x5d058f(0x199)][_0x5d058f(0x168)]&&!this[_0x5d058f(0x182)]['profile'][_0x5d058f(0x168)]&&!this[_0x5d058f(0x182)]['global'][_0x5d058f(0x168)])return'default';return _0x5d058f(0x170)+_0x5b49a5[_0x5d058f(0x158)](/_/g,'-');}if(this[_0x5d058f(0x182)][_0x5d058f(0x196)][_0x5b49a5]===_0x5503bd)return _0x5d058f(0x196);if(this[_0x5d058f(0x182)][_0x5d058f(0x199)][_0x5b49a5]===_0x5503bd)return'project';if(this[_0x5d058f(0x182)][_0x5d058f(0x178)][_0x5b49a5]===_0x5503bd)return _0x5d058f(0x183)+this[_0x5d058f(0x17e)];if(this[_0x5d058f(0x182)][_0x5d058f(0x15e)][_0x5b49a5]===_0x5503bd)return _0x5d058f(0x15e);return _0x5d058f(0x159);}[a35_0x4d679b(0x172)](){const _0x217715=a35_0x4d679b,_0x16e682=a35_0x183dc8['join'](getConfigDir(),_0x217715(0x189));if(!a35_0x17afa9[_0x217715(0x176)](_0x16e682))return{};try{const _0xcfe82c=a35_0x17afa9[_0x217715(0x16f)](_0x16e682,_0x217715(0x188));return JSON[_0x217715(0x18f)](_0xcfe82c);}catch{return{};}}[a35_0x4d679b(0x165)](_0x1d5c14){const _0x5ce5cd=a35_0x4d679b;_0x1d5c14['site']=this[_0x5ce5cd(0x168)],!_0x1d5c14['database']&&this['database']&&(_0x1d5c14[_0x5ce5cd(0x19b)]=this['database']),!_0x1d5c14[_0x5ce5cd(0x17a)]&&this[_0x5ce5cd(0x17c)]&&(_0x1d5c14[_0x5ce5cd(0x17a)]=this['parent_segment']),!_0x1d5c14[_0x5ce5cd(0x19a)]&&this[_0x5ce5cd(0x18d)]&&(_0x1d5c14[_0x5ce5cd(0x19a)]=this[_0x5ce5cd(0x18d)]),!_0x1d5c14[_0x5ce5cd(0x16a)]&&this['llm_project']&&(_0x1d5c14[_0x5ce5cd(0x16a)]=this[_0x5ce5cd(0x193)]);}[a35_0x4d679b(0x175)](){const _0x1deab8=a35_0x4d679b;return[{'key':'site','value':this[_0x1deab8(0x168)]},{'key':_0x1deab8(0x19b),'value':this[_0x1deab8(0x19b)]},{'key':'parent_segment','value':this[_0x1deab8(0x17c)]},{'key':_0x1deab8(0x18d),'value':this['segment_path']},{'key':'llm_project','value':this[_0x1deab8(0x193)]},{'key':_0x1deab8(0x178),'value':this[_0x1deab8(0x17e)]||undefined}];}[a35_0x4d679b(0x163)](){const _0x2c3767=a35_0x4d679b;console[_0x2c3767(0x15b)](_0x2c3767(0x15c));for(const {key:_0x33c99d,value:_0x3916e1}of this[_0x2c3767(0x175)]()){_0x3916e1&&console['log'](_0x33c99d+':\x20'+_0x3916e1);}}['displayWithSources'](){const _0x23094e=a35_0x4d679b;console[_0x23094e(0x15b)](_0x23094e(0x15c));for(const {key:_0x3a6627,value:_0x13e3b3}of this[_0x23094e(0x175)]()){if(_0x13e3b3){const _0x57e0d2=_0x3a6627===_0x23094e(0x178)?_0x23094e(0x179):'('+this[_0x23094e(0x185)](_0x3a6627,_0x13e3b3)+')';console[_0x23094e(0x15b)](_0x3a6627+':\x20'+_0x13e3b3+'\x20'+_0x57e0d2);}}console[_0x23094e(0x15b)](_0x23094e(0x192));const _0x5010a5=[{'label':_0x23094e(0x161),'path':this[_0x23094e(0x18b)][_0x23094e(0x196)],'extra':_0x23094e(0x16d)+this['sessionId']+')'},{'label':_0x23094e(0x18a),'path':this[_0x23094e(0x18b)][_0x23094e(0x199)]},{'label':_0x23094e(0x191),'path':this[_0x23094e(0x18b)][_0x23094e(0x178)]},{'label':_0x23094e(0x17d),'path':this[_0x23094e(0x18b)][_0x23094e(0x181)]},{'label':_0x23094e(0x157),'path':this[_0x23094e(0x18b)][_0x23094e(0x15e)]},{'label':_0x23094e(0x184),'path':this[_0x23094e(0x18b)][_0x23094e(0x17f)]}];for(const {label:_0x1f0da8,path:_0x131856,extra:_0x597a2a}of _0x5010a5){if(_0x131856)console[_0x23094e(0x15b)](_0x1f0da8+':\x20'+_0x131856+'\x20✓'+(_0x597a2a?'\x20'+_0x597a2a:''));else{if(_0x1f0da8===_0x23094e(0x161))console[_0x23094e(0x15b)](_0x1f0da8+_0x23094e(0x164)+this['sessionId']+')');else(_0x1f0da8===_0x23094e(0x18a)||_0x1f0da8===_0x23094e(0x157))&&console[_0x23094e(0x15b)](_0x1f0da8+':\x20none');}}}}function a35_0x449c(){const _0x16134c=['globalCredentials','.json','profileCredentials','layers','profile:\x20','Global\x20Credentials','getSource','not\x20set','12mlzMJr','utf-8','tdx.json','Project','configFiles','entries','segment_path','14700627UJEDko','parse','573099okhTAo','Profile','\x0a[configuration\x20files]','llm_project','toString','string','session','join','verbose','project','segmentPath','database','5041372YJNgaX','Global','replace','default','3520405ZsyQjT','log','[context]','sessionId','global','.env','ppid','Session','3jStpTy','display',':\x20none\x20(using\x20session:\x20','injectIntoOptions','us01','cliFlags','site','8087080NANHSL','llmProject','apiKey','2369584AxhvgA','(session:\x20','logLevel','readFileSync','CLI\x20flag:\x20--','profiles','loadGlobalConfig','sessions','config','getParameters','existsSync','INFO','profile','(active)','parentSegment','8437525wVdwCv','parent_segment','Profile\x20Credentials','activeProfile'];a35_0x449c=function(){return _0x16134c;};return a35_0x449c();}
1
+ const a35_0x594a02=a35_0x59e0;(function(_0xfcbe27,_0xd0abd1){const _0x44b038=a35_0x59e0,_0x237369=_0xfcbe27();while(!![]){try{const _0x3b929a=parseInt(_0x44b038(0x1ae))/0x1+parseInt(_0x44b038(0x1ce))/0x2+-parseInt(_0x44b038(0x1c3))/0x3+parseInt(_0x44b038(0x19c))/0x4*(-parseInt(_0x44b038(0x1cf))/0x5)+-parseInt(_0x44b038(0x1cc))/0x6+parseInt(_0x44b038(0x1c1))/0x7+-parseInt(_0x44b038(0x1c6))/0x8*(parseInt(_0x44b038(0x1c2))/0x9);if(_0x3b929a===_0xd0abd1)break;else _0x237369['push'](_0x237369['shift']());}catch(_0x4911b3){_0x237369['push'](_0x237369['shift']());}}}(a35_0x3d53,0xe13ca));function a35_0x3d53(){const _0x5eaef0=['Profile\x20Credentials','[context]','sessions','loadGlobalConfig','1806145dVEFIL','configFiles','global','(session:\x20',':\x20none\x20(using\x20session:\x20','cliFlags','profiles','site','display','log','default','segment_path','llm_project','parse','.env','utf-8','llmProject','displayWithSources','ppid','6743688rCxRpg','113769NTfKNg','1950399mVLKaL','getParameters','profile:\x20','40betHyG','apiKey','CLI\x20flag:\x20--','readFileSync','parent_segment','session','707832nTlwwU','verbose','700610yChMhp','70410fBZsjS','sessionId','Project','activeProfile',':\x20none','database','\x0a[configuration\x20files]','us01','(active)','getSource','not\x20set','injectIntoOptions','388OcWjZY','project','join','parentSegment','existsSync','Global','profileCredentials','segmentPath','layers','profile','logLevel','globalCredentials','entries','tdx.json'];a35_0x3d53=function(){return _0x5eaef0;};return a35_0x3d53();}import{resolveSite,getAPIKey,getConfigDir}from'./config.js';import{loadSessionContext}from'./session.js';import{loadProjectConfig,findProjectConfigPath}from'./project-config.js';import{getActiveProfile,loadProfile}from'./profile.js';import{LogLevel}from'../utils/tdx-logger.js';import*as a35_0x5a45f9 from'node:fs';import*as a35_0x4433e6 from'node:path';function a35_0x59e0(_0x5e1a91,_0x5709eb){const _0x3d5323=a35_0x3d53();return a35_0x59e0=function(_0x59e02f,_0x236c3b){_0x59e02f=_0x59e02f-0x194;let _0x4d655d=_0x3d5323[_0x59e02f];return _0x4d655d;},a35_0x59e0(_0x5e1a91,_0x5709eb);}export class GlobalContext{['site'];[a35_0x594a02(0x195)];[a35_0x594a02(0x1ca)];[a35_0x594a02(0x1b9)];[a35_0x594a02(0x1ba)];[a35_0x594a02(0x1c7)];['verbose'];[a35_0x594a02(0x1a6)];[a35_0x594a02(0x1a4)];[a35_0x594a02(0x1d2)];[a35_0x594a02(0x1d0)];['configFiles'];constructor(_0x30a76c){const _0x1f6326=a35_0x594a02;this[_0x1f6326(0x1d0)]=_0x30a76c[_0x1f6326(0x1cb)]||process[_0x1f6326(0x1c0)]['toString']();const _0x1d0362=loadSessionContext(_0x30a76c[_0x1f6326(0x1cb)]),_0x206944=loadProjectConfig(),_0x4940d4=this[_0x1f6326(0x1ad)]();this[_0x1f6326(0x1d2)]=_0x30a76c[_0x1f6326(0x1a5)]||_0x1d0362?.[_0x1f6326(0x1a5)]||_0x4940d4[_0x1f6326(0x1a5)]||getActiveProfile();const _0x2b08e8=this['activeProfile']?loadProfile(this[_0x1f6326(0x1d2)]):null,_0x4c413a=_0x98a052=>{const _0x42523f=_0x1f6326;if(!_0x98a052)return{};const _0x9136f6=_0x98a052,_0x5c7a45={};for(const [_0x1a98b9,_0x50514a]of Object[_0x42523f(0x1a8)](_0x9136f6)){typeof _0x50514a==='string'&&(_0x5c7a45[_0x1a98b9]=_0x50514a);}return _0x5c7a45;},_0x22807d={};if(_0x30a76c[_0x1f6326(0x1b5)]&&_0x30a76c[_0x1f6326(0x1b5)]!==_0x1f6326(0x197))_0x22807d['site']=_0x30a76c['site'];const _0x25f4fb=_0x1d0362?.[_0x1f6326(0x195)],_0x4ad23f=_0x206944?.['database'],_0x192003=_0x2b08e8?.['config']?.[_0x1f6326(0x195)],_0x36e9d0=_0x4940d4[_0x1f6326(0x195)];_0x30a76c['database']&&(_0x30a76c[_0x1f6326(0x195)]!==_0x25f4fb&&_0x30a76c[_0x1f6326(0x195)]!==_0x4ad23f&&_0x30a76c[_0x1f6326(0x195)]!==_0x192003&&_0x30a76c[_0x1f6326(0x195)]!==_0x36e9d0)&&(_0x22807d[_0x1f6326(0x195)]=_0x30a76c[_0x1f6326(0x195)]);if(_0x30a76c[_0x1f6326(0x19f)])_0x22807d['parent_segment']=_0x30a76c[_0x1f6326(0x19f)];if(_0x30a76c[_0x1f6326(0x1be)])_0x22807d['llm_project']=_0x30a76c[_0x1f6326(0x1be)];if(_0x30a76c[_0x1f6326(0x1a5)])_0x22807d[_0x1f6326(0x1a5)]=_0x30a76c['profile'];this[_0x1f6326(0x1a4)]={'cliFlags':_0x22807d,'session':_0x4c413a(_0x1d0362),'project':_0x4c413a(_0x206944),'profile':_0x4c413a(_0x2b08e8?.['config']),'global':_0x4c413a(_0x4940d4)};const _0x5939ef={...this['layers'][_0x1f6326(0x1b0)],...this['layers'][_0x1f6326(0x1a5)],...this['layers'][_0x1f6326(0x19d)],...this[_0x1f6326(0x1a4)][_0x1f6326(0x1cb)],...this[_0x1f6326(0x1a4)]['cliFlags']},_0x2081c8=_0x5939ef[_0x1f6326(0x1b5)]||'us01';this[_0x1f6326(0x1b5)]=resolveSite(_0x2081c8),this[_0x1f6326(0x195)]=_0x5939ef['database'],this[_0x1f6326(0x1ca)]=_0x5939ef['parent_segment'],this['segment_path']=_0x5939ef[_0x1f6326(0x1b9)],this['llm_project']=_0x5939ef[_0x1f6326(0x1ba)],this[_0x1f6326(0x1cd)]=_0x30a76c[_0x1f6326(0x1cd)]||![],this[_0x1f6326(0x1a6)]=_0x30a76c[_0x1f6326(0x1a6)]??LogLevel['INFO'],this[_0x1f6326(0x1c7)]=getAPIKey(this[_0x1f6326(0x1b5)],this[_0x1f6326(0x1d2)]||undefined);const _0x40c3db=getConfigDir(),_0x1f9e67=a35_0x4433e6[_0x1f6326(0x19e)](_0x40c3db,_0x1f6326(0x1ac),this[_0x1f6326(0x1d0)]+'.json'),_0xd36e6=findProjectConfigPath(),_0xe6ca0a=a35_0x4433e6[_0x1f6326(0x19e)](_0x40c3db,_0x1f6326(0x1a9)),_0x36f942=a35_0x4433e6[_0x1f6326(0x19e)](_0x40c3db,_0x1f6326(0x1bc));let _0x1e3df1=null,_0x247390=null;this[_0x1f6326(0x1d2)]&&(_0x1e3df1=a35_0x4433e6[_0x1f6326(0x19e)](_0x40c3db,_0x1f6326(0x1b4),this[_0x1f6326(0x1d2)],_0x1f6326(0x1a9)),_0x247390=a35_0x4433e6[_0x1f6326(0x19e)](_0x40c3db,_0x1f6326(0x1b4),this[_0x1f6326(0x1d2)],'.env')),this[_0x1f6326(0x1af)]={'session':a35_0x5a45f9[_0x1f6326(0x1a0)](_0x1f9e67)?_0x1f9e67:null,'project':_0xd36e6,'profile':_0x1e3df1&&a35_0x5a45f9[_0x1f6326(0x1a0)](_0x1e3df1)?_0x1e3df1:null,'profileCredentials':_0x247390&&a35_0x5a45f9['existsSync'](_0x247390)?_0x247390:null,'global':a35_0x5a45f9[_0x1f6326(0x1a0)](_0xe6ca0a)?_0xe6ca0a:null,'globalCredentials':a35_0x5a45f9[_0x1f6326(0x1a0)](_0x36f942)?_0x36f942:null};}[a35_0x594a02(0x199)](_0x241282,_0x4c6933){const _0x150354=a35_0x594a02;if(!_0x4c6933)return _0x150354(0x19a);const _0x1c5069=_0x4c6933;if(this['layers'][_0x150354(0x1b3)][_0x241282]===_0x1c5069){if(_0x241282===_0x150354(0x1b5)&&_0x1c5069===_0x150354(0x197)&&!this['layers'][_0x150354(0x1cb)][_0x150354(0x1b5)]&&!this['layers']['project']['site']&&!this['layers'][_0x150354(0x1a5)][_0x150354(0x1b5)]&&!this[_0x150354(0x1a4)][_0x150354(0x1b0)][_0x150354(0x1b5)])return _0x150354(0x1b8);return _0x150354(0x1c8)+_0x241282['replace'](/_/g,'-');}if(this['layers'][_0x150354(0x1cb)][_0x241282]===_0x1c5069)return _0x150354(0x1cb);if(this[_0x150354(0x1a4)][_0x150354(0x19d)][_0x241282]===_0x1c5069)return _0x150354(0x19d);if(this[_0x150354(0x1a4)][_0x150354(0x1a5)][_0x241282]===_0x1c5069)return _0x150354(0x1c5)+this[_0x150354(0x1d2)];if(this[_0x150354(0x1a4)][_0x150354(0x1b0)][_0x241282]===_0x1c5069)return _0x150354(0x1b0);return _0x150354(0x1b8);}[a35_0x594a02(0x1ad)](){const _0x454e0c=a35_0x594a02,_0x1c4723=a35_0x4433e6[_0x454e0c(0x19e)](getConfigDir(),_0x454e0c(0x1a9));if(!a35_0x5a45f9[_0x454e0c(0x1a0)](_0x1c4723))return{};try{const _0x1bd870=a35_0x5a45f9[_0x454e0c(0x1c9)](_0x1c4723,_0x454e0c(0x1bd));return JSON[_0x454e0c(0x1bb)](_0x1bd870);}catch{return{};}}[a35_0x594a02(0x19b)](_0x1962c5){const _0x27e57a=a35_0x594a02;_0x1962c5[_0x27e57a(0x1b5)]=this[_0x27e57a(0x1b5)],!_0x1962c5[_0x27e57a(0x195)]&&this[_0x27e57a(0x195)]&&(_0x1962c5['database']=this['database']),!_0x1962c5[_0x27e57a(0x19f)]&&this[_0x27e57a(0x1ca)]&&(_0x1962c5[_0x27e57a(0x19f)]=this[_0x27e57a(0x1ca)]),!_0x1962c5['segmentPath']&&this[_0x27e57a(0x1b9)]&&(_0x1962c5[_0x27e57a(0x1a3)]=this[_0x27e57a(0x1b9)]),!_0x1962c5[_0x27e57a(0x1be)]&&this[_0x27e57a(0x1ba)]&&(_0x1962c5['llmProject']=this['llm_project']);}[a35_0x594a02(0x1c4)](){const _0x55d34b=a35_0x594a02;return[{'key':_0x55d34b(0x1b5),'value':this[_0x55d34b(0x1b5)]},{'key':'database','value':this['database']},{'key':_0x55d34b(0x1ca),'value':this['parent_segment']},{'key':_0x55d34b(0x1b9),'value':this[_0x55d34b(0x1b9)]},{'key':_0x55d34b(0x1ba),'value':this[_0x55d34b(0x1ba)]},{'key':_0x55d34b(0x1a5),'value':this[_0x55d34b(0x1d2)]||undefined}];}[a35_0x594a02(0x1b6)](){const _0xa921b4=a35_0x594a02;console['log'](_0xa921b4(0x1ab));for(const {key:_0x21c66b,value:_0xc38ace}of this[_0xa921b4(0x1c4)]()){_0xc38ace&&console[_0xa921b4(0x1b7)](_0x21c66b+':\x20'+_0xc38ace);}}[a35_0x594a02(0x1bf)](){const _0x19e270=a35_0x594a02;console[_0x19e270(0x1b7)]('[context]');for(const {key:_0xc2e207,value:_0x4b62f2}of this[_0x19e270(0x1c4)]()){if(_0x4b62f2){const _0x4e2d23=_0xc2e207===_0x19e270(0x1a5)?_0x19e270(0x198):'('+this[_0x19e270(0x199)](_0xc2e207,_0x4b62f2)+')';console['log'](_0xc2e207+':\x20'+_0x4b62f2+'\x20'+_0x4e2d23);}}console[_0x19e270(0x1b7)](_0x19e270(0x196));const _0x3658b5=[{'label':'Session','path':this[_0x19e270(0x1af)][_0x19e270(0x1cb)],'extra':_0x19e270(0x1b1)+this[_0x19e270(0x1d0)]+')'},{'label':_0x19e270(0x1d1),'path':this[_0x19e270(0x1af)]['project']},{'label':'Profile','path':this[_0x19e270(0x1af)][_0x19e270(0x1a5)]},{'label':_0x19e270(0x1aa),'path':this['configFiles'][_0x19e270(0x1a2)]},{'label':_0x19e270(0x1a1),'path':this['configFiles'][_0x19e270(0x1b0)]},{'label':'Global\x20Credentials','path':this['configFiles'][_0x19e270(0x1a7)]}];for(const {label:_0x32b05b,path:_0xf6a4e4,extra:_0xb1a6c1}of _0x3658b5){if(_0xf6a4e4)console['log'](_0x32b05b+':\x20'+_0xf6a4e4+'\x20✓'+(_0xb1a6c1?'\x20'+_0xb1a6c1:''));else{if(_0x32b05b==='Session')console['log'](_0x32b05b+_0x19e270(0x1b2)+this[_0x19e270(0x1d0)]+')');else(_0x32b05b==='Project'||_0x32b05b===_0x19e270(0x1a1))&&console[_0x19e270(0x1b7)](_0x32b05b+_0x19e270(0x194));}}}}