@treasuredata/tdx 0.2.6 → 0.2.8
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.
- package/dist/build-info.json +2 -2
- package/dist/cli.js +1 -1
- package/dist/client/cdp-client.js +1 -1
- package/dist/client/http-client.d.ts.map +1 -1
- package/dist/client/http-client.js +1 -1
- package/dist/client/http-client.js.map +1 -1
- package/dist/client/llm-client.d.ts +2 -0
- package/dist/client/llm-client.d.ts.map +1 -1
- package/dist/client/llm-client.js +1 -1
- package/dist/client/llm-client.js.map +1 -1
- package/dist/client/rate-limiter.js +1 -1
- package/dist/client/td-client.js +1 -1
- package/dist/client/trino-client.js +1 -1
- package/dist/client/workflow-client.js +1 -1
- package/dist/commands/activations.js +1 -1
- package/dist/commands/api-command.js +1 -1
- package/dist/commands/chat-command.js +1 -1
- package/dist/commands/chat-command.js.map +1 -1
- package/dist/commands/claude-command.d.ts.map +1 -1
- package/dist/commands/claude-command.js +1 -1
- package/dist/commands/claude-command.js.map +1 -1
- package/dist/commands/command.js +1 -1
- package/dist/commands/context-command.js +1 -1
- package/dist/commands/databases.js +1 -1
- package/dist/commands/describe.js +1 -1
- package/dist/commands/job-command.js +1 -1
- package/dist/commands/llm-command.js +1 -1
- package/dist/commands/llm-proxy.d.ts.map +1 -1
- package/dist/commands/llm-proxy.js +1 -1
- package/dist/commands/llm-proxy.js.map +1 -1
- package/dist/commands/parent-segment-command.js +1 -1
- package/dist/commands/profiles-command.js +1 -1
- package/dist/commands/query-command.js +1 -1
- package/dist/commands/segment-command.js +1 -1
- package/dist/commands/segment-create-command.js +1 -1
- package/dist/commands/segment-fields-command.js +1 -1
- package/dist/commands/segment-pwd-command.js +1 -1
- package/dist/commands/segment-update-command.js +1 -1
- package/dist/commands/segment-use-command.js +1 -1
- package/dist/commands/segments.js +1 -1
- package/dist/commands/show.js +1 -1
- package/dist/commands/tables.js +1 -1
- package/dist/commands/use-command.js +1 -1
- package/dist/commands/workflow-command.js +1 -1
- package/dist/core/auth.js +1 -1
- package/dist/core/config.js +1 -1
- package/dist/core/global-context.js +1 -1
- package/dist/core/profile.js +1 -1
- package/dist/core/project-config.js +1 -1
- package/dist/core/session.js +1 -1
- package/dist/index.js +1 -1
- package/dist/proxy/anthropic-adapter.d.ts +1 -14
- package/dist/proxy/anthropic-adapter.d.ts.map +1 -1
- package/dist/proxy/anthropic-adapter.js +1 -1
- package/dist/proxy/anthropic-adapter.js.map +1 -1
- package/dist/proxy/server.d.ts +3 -1
- package/dist/proxy/server.d.ts.map +1 -1
- package/dist/proxy/server.js +1 -1
- package/dist/proxy/server.js.map +1 -1
- package/dist/proxy/session-cache.d.ts +3 -1
- package/dist/proxy/session-cache.d.ts.map +1 -1
- package/dist/proxy/session-cache.js +1 -1
- package/dist/proxy/session-cache.js.map +1 -1
- package/dist/sdk/api.js +1 -1
- package/dist/sdk/database.js +1 -1
- package/dist/sdk/errors.d.ts +2 -0
- package/dist/sdk/errors.d.ts.map +1 -1
- package/dist/sdk/errors.js +1 -1
- package/dist/sdk/errors.js.map +1 -1
- package/dist/sdk/index.js +1 -1
- package/dist/sdk/job.js +1 -1
- package/dist/sdk/llm.d.ts +5 -3
- package/dist/sdk/llm.d.ts.map +1 -1
- package/dist/sdk/llm.js +1 -1
- package/dist/sdk/llm.js.map +1 -1
- package/dist/sdk/query.js +1 -1
- package/dist/sdk/segment.js +1 -1
- package/dist/sdk/table.js +1 -1
- package/dist/sdk/workflow.js +1 -1
- package/dist/types/anthropic.d.ts +10 -3
- package/dist/types/anthropic.d.ts.map +1 -1
- package/dist/types/endpoints.js +1 -1
- package/dist/types/index.d.ts +5 -1
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +1 -1
- package/dist/utils/agent-ref-parser.js +1 -1
- package/dist/utils/chat-cache.js +1 -1
- package/dist/utils/colors.js +1 -1
- package/dist/utils/command-output.js +1 -1
- package/dist/utils/constants.js +1 -1
- package/dist/utils/file-permissions.js +1 -1
- package/dist/utils/format-detector.js +1 -1
- package/dist/utils/formatters.js +1 -1
- package/dist/utils/json-loader.js +1 -1
- package/dist/utils/model-aliases.js +1 -1
- package/dist/utils/option-validation.js +1 -1
- package/dist/utils/port.js +1 -1
- package/dist/utils/process.js +1 -1
- package/dist/utils/prompt.js +1 -1
- package/dist/utils/segment-path-parser.js +1 -1
- package/dist/utils/segment-ref-parser.js +1 -1
- package/dist/utils/spinner.js +1 -1
- package/dist/utils/sql-parser.js +1 -1
- package/dist/utils/sse-parser.d.ts +3 -1
- package/dist/utils/sse-parser.d.ts.map +1 -1
- package/dist/utils/sse-parser.js +1 -1
- package/dist/utils/sse-parser.js.map +1 -1
- package/dist/utils/string-utils.js +1 -1
- package/dist/utils/table-ref-parser.js +1 -1
- package/dist/utils/tdx-logger.js +1 -1
- package/dist/utils/tree-formatter.js +1 -1
- package/dist/utils/version-check.js +1 -1
- package/dist/utils/workflow-utils.js +1 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a31_0x1bc122=a31_0x288a;(function(_0x5c0ddf,_0x546156){const _0x4e251a=a31_0x288a,_0x50c174=_0x5c0ddf();while(!![]){try{const _0xebcfb3=-parseInt(_0x4e251a(0x131))/0x1*(-parseInt(_0x4e251a(0x129))/0x2)+parseInt(_0x4e251a(0x12a))/0x3+parseInt(_0x4e251a(0x11f))/0x4+parseInt(_0x4e251a(0x11e))/0x5+parseInt(_0x4e251a(0x116))/0x6+-parseInt(_0x4e251a(0x13a))/0x7*(-parseInt(_0x4e251a(0x127))/0x8)+-parseInt(_0x4e251a(0x12b))/0x9;if(_0xebcfb3===_0x546156)break;else _0x50c174['push'](_0x50c174['shift']());}catch(_0x53ba59){_0x50c174['push'](_0x50c174['shift']());}}}(a31_0x51fe,0xcca89));import{BaseCommand}from'./command.js';function a31_0x51fe(){const _0x3d52e4=['5820894zjqdID','message','profile','Or\x20use:\x20tdx\x20context\x20--clear\x20to\x20clear\x20session\x20context\x0a','toString','Session\x20llm_project\x20set\x20to:\x20','\x20(session:\x20','execute','863325FBygWp','604400gUzTjb','llm_project','use','\x0aRun\x20\x27tdx\x20use\x20--help\x27\x20for\x20more\x20options','log','session','Error:\x20Profile\x20\x27','Usage:\x20tdx\x20use\x20<resource>\x20<value>\x0a','93992mwjFwd','error','1052gEGBOe','2118156cWFVMe','30579426CmSOiZ','Invalid\x20resource:\x20','database','join','parent_segment','description','1861soRGaa','.\x20Must\x20be\x20one\x20of:\x20','name','length','\x0aTip:\x20Use\x20\x27tdx\x20context\x20--clear\x27\x20to\x20clear\x20session\x20overrides','Session\x20parent_segment\x20set\x20to:\x20','Resources:\x20database,\x20parent_segment,\x20llm_project,\x20profile\x0a','Error:\x20','Set\x20session-level\x20context','749wQFPOh','\x0aUse\x20\x27tdx\x20profiles\x27\x20to\x20see\x20available\x20profiles','includes'];a31_0x51fe=function(){return _0x3d52e4;};return a31_0x51fe();}function a31_0x288a(_0x47d48f,_0x44a6a6){const _0x51fe84=a31_0x51fe();return a31_0x288a=function(_0x288abb,_0x22bada){_0x288abb=_0x288abb-0x115;let _0x406081=_0x51fe84[_0x288abb];return _0x406081;},a31_0x288a(_0x47d48f,_0x44a6a6);}import{saveSessionContext,getCurrentSessionPID}from'../core/session.js';import{profileExists}from'../core/profile.js';export class UseCommand extends BaseCommand{[a31_0x1bc122(0x133)]=a31_0x1bc122(0x121);[a31_0x1bc122(0x130)]=a31_0x1bc122(0x139);['validate'](_0x337fb3){const _0x14ebc1=a31_0x1bc122,{args:_0x526afa}=_0x337fb3;if(_0x526afa[_0x14ebc1(0x134)]<0x2)return _0x14ebc1(0x126)+_0x14ebc1(0x137)+_0x14ebc1(0x119)+_0x14ebc1(0x122);const _0x43bb4c=_0x526afa[0x0],_0x36d552=['database','parent_segment',_0x14ebc1(0x120),_0x14ebc1(0x118)];if(!_0x36d552[_0x14ebc1(0x115)](_0x43bb4c))return _0x14ebc1(0x12c)+_0x43bb4c+_0x14ebc1(0x132)+_0x36d552[_0x14ebc1(0x12e)](',\x20');return undefined;}async[a31_0x1bc122(0x11d)](_0x3ab215){const _0x308d6f=a31_0x1bc122,{args:_0x10f813,options:_0x5973ac}=_0x3ab215;try{const _0x25f208=_0x10f813[0x0],_0x54e1e9=_0x10f813[0x1];if(_0x25f208===_0x308d6f(0x118)){if(!profileExists(_0x54e1e9))return console[_0x308d6f(0x128)](_0x308d6f(0x125)+_0x54e1e9+'\x27\x20does\x20not\x20exist'),console['error'](_0x308d6f(0x13b)),0x1;const _0xd60633=_0x5973ac[_0x308d6f(0x124)]||getCurrentSessionPID()['toString']();return saveSessionContext({'profile':_0x54e1e9},_0x5973ac['session']),console[_0x308d6f(0x123)]('Session\x20profile\x20set\x20to:\x20'+_0x54e1e9+_0x308d6f(0x11c)+_0xd60633+')'),console[_0x308d6f(0x123)](_0x308d6f(0x135)),0x0;}const _0x3908e3={},_0x532364=_0x5973ac[_0x308d6f(0x124)]||getCurrentSessionPID()[_0x308d6f(0x11a)]();switch(_0x25f208){case _0x308d6f(0x12d):_0x3908e3['database']=_0x54e1e9,console[_0x308d6f(0x123)]('Session\x20database\x20set\x20to:\x20'+_0x54e1e9+_0x308d6f(0x11c)+_0x532364+')');break;case _0x308d6f(0x12f):_0x3908e3['parent_segment']=_0x54e1e9,console['log'](_0x308d6f(0x136)+_0x54e1e9+_0x308d6f(0x11c)+_0x532364+')');break;case'llm_project':_0x3908e3['llm_project']=_0x54e1e9,console[_0x308d6f(0x123)](_0x308d6f(0x11b)+_0x54e1e9+_0x308d6f(0x11c)+_0x532364+')');break;}return saveSessionContext(_0x3908e3,_0x5973ac[_0x308d6f(0x124)]),console[_0x308d6f(0x123)](_0x308d6f(0x135)),0x0;}catch(_0x2814bd){return _0x2814bd instanceof Error&&console['error'](_0x308d6f(0x138)+_0x2814bd[_0x308d6f(0x117)]),0x1;}}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a32_0x1bcf71=a32_0x7a82;(function(_0x441218,_0xc891f4){const _0x27d462=a32_0x7a82,_0x3e01e2=_0x441218();while(!![]){try{const _0x13e70e=-parseInt(_0x27d462(0xa1))/0x1*(parseInt(_0x27d462(0xab))/0x2)+-parseInt(_0x27d462(0x91))/0x3+parseInt(_0x27d462(0xcc))/0x4*(-parseInt(_0x27d462(0x93))/0x5)+parseInt(_0x27d462(0xcb))/0x6+-parseInt(_0x27d462(0xef))/0x7*(-parseInt(_0x27d462(0xfe))/0x8)+parseInt(_0x27d462(0xa4))/0x9+parseInt(_0x27d462(0x9c))/0xa*(parseInt(_0x27d462(0x87))/0xb);if(_0x13e70e===_0xc891f4)break;else _0x3e01e2['push'](_0x3e01e2['shift']());}catch(_0x20f3a9){_0x3e01e2['push'](_0x3e01e2['shift']());}}}(a32_0x294f,0xf3464));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleSDKOutput}from'../utils/command-output.js';import{withSpinner}from'../utils/spinner.js';function a32_0x7a82(_0x4f989c,_0x3d9074){const _0x294f53=a32_0x294f();return a32_0x7a82=function(_0x7a8206,_0x18dbbb){_0x7a8206=_0x7a8206-0x87;let _0x422fb8=_0x294f53[_0x7a8206];return _0x422fb8;},a32_0x7a82(_0x4f989c,_0x3d9074);}import{confirm}from'../utils/prompt.js';export class WorkflowProjectsCommand extends BaseCommand{[a32_0x1bcf71(0xb1)]='workflow:projects';[a32_0x1bcf71(0x100)]='List\x20all\x20workflow\x20projects';async[a32_0x1bcf71(0xc0)](_0xf369e5){const _0x5ae726=a32_0x1bcf71,{options:_0x19d3d7,args:_0x3488db,tdx:_0x4d2c50}=_0xf369e5,_0x20cef1=_0x3488db[0x0];try{_0x19d3d7['verbose']&&_0x20cef1&&console[_0x5ae726(0xe4)](_0x5ae726(0x8e)+_0x20cef1);const _0x1d8bc3=await withSpinner('Listing\x20workflow\x20projects...',()=>_0x4d2c50[_0x5ae726(0x9a)][_0x5ae726(0xed)](_0x20cef1,{'limit':_0x19d3d7[_0x5ae726(0xd8)]}),{'verbose':_0x19d3d7['verbose']}),_0x4c4888=_0x1d8bc3[_0x5ae726(0x99)];return console[_0x5ae726(0xe4)]('✔\x20Found\x20'+_0x4c4888[_0x5ae726(0xc6)]+_0x5ae726(0xb6)+(_0x4c4888['length']!==0x1?'s':'')),await handleSDKOutput(_0x4c4888,_0x19d3d7),0x0;}catch(_0x1ddcf7){if(_0x1ddcf7 instanceof SDKError)return console['error'](_0x5ae726(0xd9)+_0x1ddcf7[_0x5ae726(0xf8)]),_0x1ddcf7[_0x5ae726(0xa5)]&&console[_0x5ae726(0xe4)]('\x20\x20Cause:\x20'+_0x1ddcf7[_0x5ae726(0xa5)]),0x1;throw _0x1ddcf7;}}}export class WorkflowWorkflowsCommand extends BaseCommand{[a32_0x1bcf71(0xb1)]='workflow:workflows';[a32_0x1bcf71(0x100)]='List\x20workflows';async[a32_0x1bcf71(0xc0)](_0x16f90b){const _0x4e2075=a32_0x1bcf71,{options:_0x5df9b9,args:_0x52929e,tdx:_0x373c23}=_0x16f90b,_0x4568b1=_0x52929e[0x0];try{_0x5df9b9[_0x4e2075(0xec)]&&_0x4568b1&&console['error'](_0x4e2075(0xe9)+_0x4568b1);const _0x4c07c2=await withSpinner(_0x4e2075(0xd1),()=>_0x373c23['workflow']['workflows'](_0x4568b1,{'limit':_0x5df9b9[_0x4e2075(0xd8)]}),{'verbose':_0x5df9b9[_0x4e2075(0xec)]}),_0x1bbca7=_0x4c07c2[_0x4e2075(0x99)];return console['error'](_0x4e2075(0xda)+_0x1bbca7['length']+_0x4e2075(0xff)+(_0x1bbca7[_0x4e2075(0xc6)]!==0x1?'s':'')),await handleSDKOutput(_0x1bbca7,_0x5df9b9),0x0;}catch(_0x172856){if(_0x172856 instanceof SDKError)return console[_0x4e2075(0xe4)](_0x4e2075(0xd9)+_0x172856[_0x4e2075(0xf8)]),_0x172856[_0x4e2075(0xa5)]&&console[_0x4e2075(0xe4)](_0x4e2075(0xfd)+_0x172856[_0x4e2075(0xa5)]),0x1;throw _0x172856;}}}function a32_0x294f(){const _0x4d5d8b=['retryAttempt','Project\x20filter:\x20','sessionId','parse','verbose','projects','Download\x20workflow\x20project\x20from\x20Treasure\x20Data','97741CigkpT','from','download','\x20is\x20not\x20a\x20directory','session','ies','revision','Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20project\x20\x22','split','message','Retrying\x20session...','Error:\x20Project\x20name\x20or\x20ID\x20is\x20required','Filter:\x20project=','\x20task','\x20\x20Cause:\x20','200HTnjXB','\x20workflow','description','Usage:\x20workflow\x20retry\x20session:<id>\x20or\x20workflow\x20retry\x20attempt:<id>','attempt:','List\x20workflow\x20attempts','Error:\x20Attempt\x20ID\x20is\x20required','Params:\x20','stat','11OJSXyN','workflow:attempt','Show\x20logs\x20for\x20a\x20specific\x20task','workflow:attempts','Push\x20workflow\x20project\x20to\x20Treasure\x20Data','push','workflow:download','Pattern:\x20','kill','Error:\x20Target\x20must\x20be\x20prefixed\x20with\x20\x22session:\x22\x20or\x20\x22attempt:\x22','2696997dEUozE','Killing\x20attempt...','440LAqanU','Error:\x20Session\x20ID\x20or\x20attempt\x20ID\x20is\x20required','Attempt\x20ID:\x20','Filter:\x20','Output\x20directory:\x20','workflow:sessions','data','workflow','Task\x20name:\x20','6992350ocQtMF','attempts','Getting\x20attempt\x20details...','\x20attempt','\x20\x20New\x20attempt\x20ID:\x20','25gkFnBC','projectId','Downloading\x20project\x20','8269101rwSSvq','cause','\x20\x20Session\x20ID:\x20','session:','Error:\x20Attempt\x20ID\x20and\x20task\x20name\x20are\x20required','Delete\x20workflow\x20project\x20from\x20Treasure\x20Data','Listing\x20workflow\x20sessions...','23838nOamey','logs','✔\x20Retry\x20started','Revision:\x20','workflow:delete','Project\x20directory:\x20','name','\x22?\x20This\x20cannot\x20be\x20undone.','Project:\x20','...','utf-8','\x20project','Are\x20you\x20sure\x20you\x20want\x20to\x20kill\x20attempt\x20','Usage:\x20workflow:delete\x20<project-name-or-id>','Getting\x20attempt\x20tasks...','startsWith','✔\x20Deleted\x20project\x20','\x20\x20Location:\x20','includeRetried','delete','Include\x20retried:\x20yes','execute','Error:\x20Project\x20name\x20is\x20required','Pushing\x20workflow\x20project...','\x20\x20Files\x20extracted:\x20','Retrying\x20attempt...','projectName','length','Listing\x20workflow\x20attempts...','From\x20task:\x20','readFile','Retry\x20a\x20session\x20or\x20attempt','5274138ppxohe','29668bISGOR','\x20\x20Revision:\x20','workflow:push','includeSubtasks','force','Listing\x20workflows...','Cancelled','sessions','Usage:\x20workflow:download\x20<project-name>\x20[output-dir]','status','skipValidation','Validation:\x20skipped','limit','Error:\x20','✔\x20Found\x20','Reason:\x20','Status:\x20','yes','fs/promises','retrySession','substring','filesExtracted','Target:\x20','attempt','error','Force:\x20yes','\x20\x20Project\x20ID:\x20','Show\x20specific\x20attempt\x20details'];a32_0x294f=function(){return _0x4d5d8b;};return a32_0x294f();}export class WorkflowSessionsCommand extends BaseCommand{[a32_0x1bcf71(0xb1)]=a32_0x1bcf71(0x98);['description']='List\x20workflow\x20execution\x20sessions';async['execute'](_0x3bb8f5){const _0x391f10=a32_0x1bcf71,{options:_0x306084,args:_0x3d8596,tdx:_0x3c36e4}=_0x3bb8f5;let _0x18116e,_0x46a0a3;if(_0x3d8596[0x0]){const _0x291765=_0x3d8596[0x0][_0x391f10(0xf7)]('.');if(_0x291765[_0x391f10(0xc6)]===0x1)_0x18116e=_0x291765[0x0];else{if(_0x291765[_0x391f10(0xc6)]===0x2)[_0x18116e,_0x46a0a3]=_0x291765;else return console['error']('Error:\x20Invalid\x20pattern.\x20Use\x20format:\x20project\x20or\x20project.workflow'),0x1;}}try{if(_0x306084['verbose']){if(_0x18116e&&_0x46a0a3)console[_0x391f10(0xe4)](_0x391f10(0x96)+_0x18116e+'.'+_0x46a0a3);else _0x18116e&&console[_0x391f10(0xe4)]('Filter:\x20project='+_0x18116e);const _0x2e15bd=_0x306084[_0x391f10(0xd5)];_0x2e15bd&&console['error'](_0x391f10(0xdc)+_0x2e15bd);}const _0x35c43e=await withSpinner(_0x391f10(0xaa),()=>_0x3c36e4[_0x391f10(0x9a)][_0x391f10(0xd3)]({'projectName':_0x18116e,'workflowName':_0x46a0a3,'status':_0x306084[_0x391f10(0xd5)],'fromTime':_0x306084[_0x391f10(0xf0)],'toTime':_0x306084['to'],'limit':_0x306084[_0x391f10(0xd8)]}),{'verbose':_0x306084[_0x391f10(0xec)]}),_0x1bf97f=_0x35c43e[_0x391f10(0x99)];return console[_0x391f10(0xe4)]('✔\x20Found\x20'+_0x1bf97f[_0x391f10(0xc6)]+'\x20session'+(_0x1bf97f[_0x391f10(0xc6)]!==0x1?'s':'')),await handleSDKOutput(_0x1bf97f,_0x306084),0x0;}catch(_0x452c97){if(_0x452c97 instanceof SDKError)return console[_0x391f10(0xe4)](_0x391f10(0xd9)+_0x452c97['message']),_0x452c97[_0x391f10(0xa5)]&&console[_0x391f10(0xe4)](_0x391f10(0xfd)+_0x452c97[_0x391f10(0xa5)]),0x1;throw _0x452c97;}}}export class WorkflowAttemptsCommand extends BaseCommand{[a32_0x1bcf71(0xb1)]=a32_0x1bcf71(0x8a);[a32_0x1bcf71(0x100)]=a32_0x1bcf71(0x103);async[a32_0x1bcf71(0xc0)](_0x3ff956){const _0x42c8cb=a32_0x1bcf71,{options:_0x1c4ade,args:_0x30870d,tdx:_0x785e51}=_0x3ff956;let _0x3a3cbd,_0x503d84;if(_0x30870d[0x0]){const _0x12ddc8=_0x30870d[0x0]['split']('.');if(_0x12ddc8['length']===0x1)_0x3a3cbd=_0x12ddc8[0x0];else{if(_0x12ddc8[_0x42c8cb(0xc6)]===0x2)[_0x3a3cbd,_0x503d84]=_0x12ddc8;else return console[_0x42c8cb(0xe4)]('Error:\x20Invalid\x20pattern.\x20Use\x20format:\x20project\x20or\x20project.workflow'),0x1;}}try{const _0x2cc3fa=_0x1c4ade[_0x42c8cb(0xbd)];if(_0x1c4ade[_0x42c8cb(0xec)]){if(_0x3a3cbd&&_0x503d84)console[_0x42c8cb(0xe4)](_0x42c8cb(0x96)+_0x3a3cbd+'.'+_0x503d84);else _0x3a3cbd&&console[_0x42c8cb(0xe4)](_0x42c8cb(0xfb)+_0x3a3cbd);_0x2cc3fa&&console[_0x42c8cb(0xe4)](_0x42c8cb(0xbf));}const _0x214087=await withSpinner(_0x42c8cb(0xc7),()=>_0x785e51[_0x42c8cb(0x9a)][_0x42c8cb(0x9d)]({'projectName':_0x3a3cbd,'workflowName':_0x503d84,'includeRetried':_0x2cc3fa,'limit':_0x1c4ade['limit']}),{'verbose':_0x1c4ade[_0x42c8cb(0xec)]}),_0xf8df3f=_0x214087[_0x42c8cb(0x99)];return console['error'](_0x42c8cb(0xda)+_0xf8df3f[_0x42c8cb(0xc6)]+_0x42c8cb(0x9f)+(_0xf8df3f['length']!==0x1?'s':'')),await handleSDKOutput(_0xf8df3f,_0x1c4ade),0x0;}catch(_0x3085f1){if(_0x3085f1 instanceof SDKError)return console[_0x42c8cb(0xe4)]('Error:\x20'+_0x3085f1[_0x42c8cb(0xf8)]),_0x3085f1[_0x42c8cb(0xa5)]&&console[_0x42c8cb(0xe4)](_0x42c8cb(0xfd)+_0x3085f1[_0x42c8cb(0xa5)]),0x1;throw _0x3085f1;}}}export class WorkflowAttemptCommand extends BaseCommand{[a32_0x1bcf71(0xb1)]=a32_0x1bcf71(0x88);[a32_0x1bcf71(0x100)]=a32_0x1bcf71(0xe7);async[a32_0x1bcf71(0xc0)](_0x526eec){const _0x2eac7e=a32_0x1bcf71,{options:_0x930b17,args:_0x35feb9,tdx:_0x5e5a09}=_0x526eec,_0x27f24c=_0x35feb9[0x0];if(!_0x27f24c)return console[_0x2eac7e(0xe4)]('Error:\x20Attempt\x20ID\x20is\x20required'),0x1;try{_0x930b17[_0x2eac7e(0xec)]&&console[_0x2eac7e(0xe4)](_0x2eac7e(0x95)+_0x27f24c);const _0x157d90=await withSpinner(_0x2eac7e(0x9e),()=>_0x5e5a09[_0x2eac7e(0x9a)][_0x2eac7e(0xe3)](_0x27f24c),{'verbose':_0x930b17[_0x2eac7e(0xec)]}),_0x2589d1=_0x157d90['data'];return await handleSDKOutput([_0x2589d1],_0x930b17),0x0;}catch(_0x166bd2){if(_0x166bd2 instanceof SDKError)return console[_0x2eac7e(0xe4)]('Error:\x20'+_0x166bd2[_0x2eac7e(0xf8)]),_0x166bd2[_0x2eac7e(0xa5)]&&console['error']('\x20\x20Cause:\x20'+_0x166bd2[_0x2eac7e(0xa5)]),0x1;throw _0x166bd2;}}}export class WorkflowTasksCommand extends BaseCommand{['name']='workflow:tasks';[a32_0x1bcf71(0x100)]='Show\x20tasks\x20for\x20an\x20attempt';async[a32_0x1bcf71(0xc0)](_0x4644e7){const _0x47009b=a32_0x1bcf71,{options:_0x2ab3bb,args:_0x581dce,tdx:_0x376f22}=_0x4644e7,_0x47e0aa=_0x581dce[0x0];if(!_0x47e0aa)return console[_0x47009b(0xe4)]('Error:\x20Attempt\x20ID\x20is\x20required'),0x1;try{const _0x33692d=_0x2ab3bb[_0x47009b(0xcf)];_0x2ab3bb['verbose']&&(console[_0x47009b(0xe4)](_0x47009b(0x95)+_0x47e0aa),_0x33692d&&console[_0x47009b(0xe4)]('Including\x20subtasks:\x20yes'));const _0x411699=await withSpinner(_0x47009b(0xb9),()=>_0x376f22[_0x47009b(0x9a)]['tasks'](_0x47e0aa,_0x33692d||![]),{'verbose':_0x2ab3bb['verbose']}),_0x2b2c90=_0x411699['data'];return console['error']('✔\x20Found\x20'+_0x2b2c90[_0x47009b(0xc6)]+_0x47009b(0xfc)+(_0x2b2c90['length']!==0x1?'s':'')),await handleSDKOutput(_0x2b2c90,_0x2ab3bb),0x0;}catch(_0x293e23){if(_0x293e23 instanceof SDKError)return console[_0x47009b(0xe4)](_0x47009b(0xd9)+_0x293e23[_0x47009b(0xf8)]),_0x293e23[_0x47009b(0xa5)]&&console[_0x47009b(0xe4)]('\x20\x20Cause:\x20'+_0x293e23[_0x47009b(0xa5)]),0x1;throw _0x293e23;}}}export class WorkflowLogsCommand extends BaseCommand{['name']='workflow:logs';[a32_0x1bcf71(0x100)]=a32_0x1bcf71(0x89);async[a32_0x1bcf71(0xc0)](_0x19c826){const _0x394714=a32_0x1bcf71,{options:_0x95bac7,args:_0x3ca96c,tdx:_0x24242b}=_0x19c826,_0x1dfcd5=_0x3ca96c[0x0],_0x52f570=_0x3ca96c[0x1];if(!_0x1dfcd5||!_0x52f570)return console[_0x394714(0xe4)](_0x394714(0xa8)),0x1;try{_0x95bac7[_0x394714(0xec)]&&(console[_0x394714(0xe4)]('Attempt\x20ID:\x20'+_0x1dfcd5),console['error'](_0x394714(0x9b)+_0x52f570));const _0x2aa3b9=_0x95bac7['offset'],_0x4e0ae9=await withSpinner('Getting\x20task\x20logs...',()=>_0x24242b[_0x394714(0x9a)][_0x394714(0xac)](_0x1dfcd5,_0x52f570,{'offset':_0x2aa3b9,'limit':_0x95bac7[_0x394714(0xd8)]}),{'verbose':_0x95bac7[_0x394714(0xec)]}),_0x26f6be=_0x4e0ae9[_0x394714(0x99)];return console[_0x394714(0xe4)](_0x394714(0xda)+_0x26f6be['length']+'\x20log\x20entr'+(_0x26f6be[_0x394714(0xc6)]!==0x1?_0x394714(0xf4):'y')),await handleSDKOutput(_0x26f6be,_0x95bac7),0x0;}catch(_0x41c539){if(_0x41c539 instanceof SDKError)return console[_0x394714(0xe4)](_0x394714(0xd9)+_0x41c539[_0x394714(0xf8)]),_0x41c539[_0x394714(0xa5)]&&console[_0x394714(0xe4)](_0x394714(0xfd)+_0x41c539[_0x394714(0xa5)]),0x1;throw _0x41c539;}}}export class WorkflowKillCommand extends BaseCommand{[a32_0x1bcf71(0xb1)]='workflow:kill';[a32_0x1bcf71(0x100)]='Kill\x20a\x20running\x20attempt';async[a32_0x1bcf71(0xc0)](_0x38941d){const _0xfc6c53=a32_0x1bcf71,{options:_0x38eefc,args:_0x2ac009,tdx:_0x526e5b}=_0x38941d,_0x2042b8=_0x2ac009[0x0];if(!_0x2042b8)return console[_0xfc6c53(0xe4)](_0xfc6c53(0x104)),0x1;try{const _0x23148c=_0x38eefc['reason'];_0x38eefc[_0xfc6c53(0xec)]&&(console[_0xfc6c53(0xe4)]('Attempt\x20ID:\x20'+_0x2042b8),_0x23148c&&console[_0xfc6c53(0xe4)](_0xfc6c53(0xdb)+_0x23148c));if(!_0x38eefc[_0xfc6c53(0xdd)]){const _0x5612f1=await confirm(_0xfc6c53(0xb7)+_0x2042b8+'?');if(!_0x5612f1)return console['error'](_0xfc6c53(0xd2)),0x0;}const _0x4b7684=await withSpinner(_0xfc6c53(0x92),()=>_0x526e5b[_0xfc6c53(0x9a)][_0xfc6c53(0x8f)](_0x2042b8,_0x23148c),{'verbose':_0x38eefc[_0xfc6c53(0xec)]}),_0x5ab130=_0x4b7684[_0xfc6c53(0x99)];return console[_0xfc6c53(0xe4)]('✔\x20'+_0x5ab130),0x0;}catch(_0xfdca3e){if(_0xfdca3e instanceof SDKError)return console[_0xfc6c53(0xe4)](_0xfc6c53(0xd9)+_0xfdca3e[_0xfc6c53(0xf8)]),_0xfdca3e['cause']&&console[_0xfc6c53(0xe4)](_0xfc6c53(0xfd)+_0xfdca3e[_0xfc6c53(0xa5)]),0x1;throw _0xfdca3e;}}}export class WorkflowRetryCommand extends BaseCommand{['name']='workflow:retry';[a32_0x1bcf71(0x100)]=a32_0x1bcf71(0xca);async[a32_0x1bcf71(0xc0)](_0x2b11f6){const _0x16d1eb=a32_0x1bcf71,{options:_0x31a8b2,args:_0x1ae16f,tdx:_0xe2eee}=_0x2b11f6,_0x2386e8=_0x1ae16f[0x0];if(!_0x2386e8)return console[_0x16d1eb(0xe4)](_0x16d1eb(0x94)),console[_0x16d1eb(0xe4)]('Usage:\x20workflow\x20retry\x20session:<id>\x20or\x20workflow\x20retry\x20attempt:<id>'),0x1;let _0xbd9099=![],_0x27d3b9=_0x2386e8;if(_0x2386e8[_0x16d1eb(0xba)](_0x16d1eb(0xa7)))_0xbd9099=!![],_0x27d3b9=_0x2386e8[_0x16d1eb(0xe0)](0x8);else{if(_0x2386e8[_0x16d1eb(0xba)](_0x16d1eb(0x102)))_0xbd9099=![],_0x27d3b9=_0x2386e8[_0x16d1eb(0xe0)](0x8);else return console['error'](_0x16d1eb(0x90)),console['error'](_0x16d1eb(0x101)),0x1;}try{const _0x2fbb33=_0x31a8b2['fromTask'],_0x32bb28=_0x31a8b2['resumeFrom'],_0x29363d=_0x31a8b2['params'],_0x384bc5=_0x31a8b2[_0x16d1eb(0xd0)];_0x31a8b2[_0x16d1eb(0xec)]&&(console[_0x16d1eb(0xe4)](_0x16d1eb(0xe2)+(_0xbd9099?'session':_0x16d1eb(0xe3))+'\x20'+_0x27d3b9),_0x2fbb33&&console[_0x16d1eb(0xe4)](_0x16d1eb(0xc8)+_0x2fbb33),_0x32bb28&&console[_0x16d1eb(0xe4)]('Resume\x20from:\x20'+_0x32bb28),_0x29363d&&console[_0x16d1eb(0xe4)](_0x16d1eb(0x105)+_0x29363d),_0x384bc5&&console[_0x16d1eb(0xe4)](_0x16d1eb(0xe5)));let _0x5a5554;if(_0x29363d)try{if(_0x29363d[_0x16d1eb(0xba)]('@')){const _0x4978f4=await import(_0x16d1eb(0xde)),_0x53db62=_0x29363d[_0x16d1eb(0xe0)](0x1),_0x14c99c=await _0x4978f4[_0x16d1eb(0xc9)](_0x53db62,_0x16d1eb(0xb5));_0x5a5554=JSON[_0x16d1eb(0xeb)](_0x14c99c);}else _0x5a5554=JSON['parse'](_0x29363d);}catch{return console['error']('Error:\x20Invalid\x20JSON\x20in\x20--params'),0x1;}if(!_0x31a8b2[_0x16d1eb(0xdd)]){const _0xd44161=await confirm('Are\x20you\x20sure\x20you\x20want\x20to\x20retry\x20'+(_0xbd9099?_0x16d1eb(0xf3):_0x16d1eb(0xe3))+'\x20'+_0x27d3b9+'?');if(!_0xd44161)return console['error'](_0x16d1eb(0xd2)),0x0;}let _0x6b2c12;_0xbd9099?_0x6b2c12=await withSpinner(_0x16d1eb(0xf9),()=>_0xe2eee['workflow'][_0x16d1eb(0xdf)](_0x27d3b9,{'fromTask':_0x2fbb33,'retryParams':_0x5a5554}),{'verbose':_0x31a8b2[_0x16d1eb(0xec)]}):_0x6b2c12=await withSpinner(_0x16d1eb(0xc4),()=>_0xe2eee[_0x16d1eb(0x9a)][_0x16d1eb(0xe8)](_0x27d3b9,{'resumeFrom':_0x32bb28,'retryParams':_0x5a5554,'force':_0x384bc5}),{'verbose':_0x31a8b2[_0x16d1eb(0xec)]});const _0x1f05dd=_0x6b2c12[_0x16d1eb(0x99)];return console[_0x16d1eb(0xe4)](_0x16d1eb(0xad)),console[_0x16d1eb(0xe4)](_0x16d1eb(0xa0)+_0x1f05dd['attemptId']),console[_0x16d1eb(0xe4)](_0x16d1eb(0xa6)+_0x1f05dd[_0x16d1eb(0xea)]),0x0;}catch(_0x568fd6){if(_0x568fd6 instanceof SDKError)return console[_0x16d1eb(0xe4)]('Error:\x20'+_0x568fd6[_0x16d1eb(0xf8)]),_0x568fd6['cause']&&console[_0x16d1eb(0xe4)](_0x16d1eb(0xfd)+_0x568fd6[_0x16d1eb(0xa5)]),0x1;throw _0x568fd6;}}}export class WorkflowDownloadCommand extends BaseCommand{['name']=a32_0x1bcf71(0x8d);[a32_0x1bcf71(0x100)]=a32_0x1bcf71(0xee);async[a32_0x1bcf71(0xc0)](_0x169e5a){const _0x4e81c7=a32_0x1bcf71,{options:_0x244a61,args:_0x412639,tdx:_0x40531a}=_0x169e5a,_0x56111f=_0x412639[0x0],_0x5ab98b=_0x412639[0x1]||'.';if(!_0x56111f)return console[_0x4e81c7(0xe4)](_0x4e81c7(0xc1)),console[_0x4e81c7(0xe4)](_0x4e81c7(0xd4)),0x1;const _0x831e3e=_0x244a61[_0x4e81c7(0xf5)];_0x244a61[_0x4e81c7(0xec)]&&(console[_0x4e81c7(0xe4)](_0x4e81c7(0xb3)+_0x56111f),console[_0x4e81c7(0xe4)](_0x4e81c7(0x97)+_0x5ab98b),_0x831e3e&&console[_0x4e81c7(0xe4)](_0x4e81c7(0xae)+_0x831e3e));const _0x5e51de=await withSpinner(_0x4e81c7(0xa3)+_0x56111f+'...',()=>_0x40531a[_0x4e81c7(0x9a)][_0x4e81c7(0xf1)](_0x56111f,_0x5ab98b,{'revision':_0x831e3e}),{'verbose':_0x244a61[_0x4e81c7(0xec)]}),_0x244225=_0x5e51de[_0x4e81c7(0x99)];return console[_0x4e81c7(0xe4)]('✔\x20Downloaded\x20'+_0x244225['projectName']),console[_0x4e81c7(0xe4)](_0x4e81c7(0xcd)+_0x244225[_0x4e81c7(0xf5)]),console[_0x4e81c7(0xe4)](_0x4e81c7(0xc3)+_0x244225[_0x4e81c7(0xe1)]),console['error'](_0x4e81c7(0xbc)+_0x5ab98b+'/'+_0x244225[_0x4e81c7(0xc5)]),0x0;}}export class WorkflowPushCommand extends BaseCommand{[a32_0x1bcf71(0xb1)]=a32_0x1bcf71(0xce);[a32_0x1bcf71(0x100)]=a32_0x1bcf71(0x8b);async[a32_0x1bcf71(0xc0)](_0x55a50a){const _0x5841c6=a32_0x1bcf71,{options:_0x5aa6aa,args:_0x23a1b5,tdx:_0x41b0cd}=_0x55a50a;let _0x4813d2='.',_0x214839=_0x5aa6aa[_0x5841c6(0xb1)];if(_0x23a1b5[0x0]){const {promises:_0x1865a3}=await import('fs');try{const _0x46c0d4=await _0x1865a3[_0x5841c6(0x106)](_0x23a1b5[0x0]);if(_0x46c0d4['isDirectory']())_0x4813d2=_0x23a1b5[0x0];else return console[_0x5841c6(0xe4)](_0x5841c6(0xd9)+_0x23a1b5[0x0]+_0x5841c6(0xf2)),0x1;}catch{_0x214839=_0x23a1b5[0x0],_0x4813d2='.';}}const _0x5df0ca=_0x5aa6aa['revision'],_0xabebe8=_0x5aa6aa[_0x5841c6(0xd6)];_0x5aa6aa['verbose']&&(console[_0x5841c6(0xe4)](_0x5841c6(0xb0)+_0x4813d2),_0x214839&&console[_0x5841c6(0xe4)]('Project\x20name:\x20'+_0x214839),_0x5df0ca&&console[_0x5841c6(0xe4)](_0x5841c6(0xae)+_0x5df0ca),_0xabebe8&&console[_0x5841c6(0xe4)](_0x5841c6(0xd7)));const _0x2af68e=await withSpinner(_0x5841c6(0xc2),()=>_0x41b0cd[_0x5841c6(0x9a)][_0x5841c6(0x8c)](_0x4813d2,{'projectName':_0x214839,'revision':_0x5df0ca,'skipValidation':_0xabebe8}),{'verbose':_0x5aa6aa['verbose']}),_0x3c22f9=_0x2af68e[_0x5841c6(0x99)];return console['error']('✔\x20Pushed\x20'+_0x3c22f9[_0x5841c6(0xc5)]),console[_0x5841c6(0xe4)](_0x5841c6(0xe6)+_0x3c22f9[_0x5841c6(0xa2)]),console[_0x5841c6(0xe4)]('\x20\x20Revision:\x20'+_0x3c22f9[_0x5841c6(0xf5)]),0x0;}}export class WorkflowDeleteCommand extends BaseCommand{['name']=a32_0x1bcf71(0xaf);['description']=a32_0x1bcf71(0xa9);async['execute'](_0x1fe3c6){const _0x555f48=a32_0x1bcf71,{options:_0x4044e5,args:_0x375f89,tdx:_0x39820c}=_0x1fe3c6,_0x3b9f2a=_0x375f89[0x0];if(!_0x3b9f2a)return console[_0x555f48(0xe4)](_0x555f48(0xfa)),console[_0x555f48(0xe4)](_0x555f48(0xb8)),0x1;_0x4044e5[_0x555f48(0xec)]&&console[_0x555f48(0xe4)](_0x555f48(0xb3)+_0x3b9f2a);if(!_0x4044e5['yes']){const _0x2b0e60=await confirm(_0x555f48(0xf6)+_0x3b9f2a+_0x555f48(0xb2));if(!_0x2b0e60)return console['error'](_0x555f48(0xd2)),0x0;}const _0x2017e3=await withSpinner('Deleting\x20project\x20'+_0x3b9f2a+_0x555f48(0xb4),()=>_0x39820c[_0x555f48(0x9a)][_0x555f48(0xbe)](_0x3b9f2a),{'verbose':_0x4044e5[_0x555f48(0xec)]}),_0x480afc=_0x2017e3[_0x555f48(0x99)];return console[_0x555f48(0xe4)](_0x555f48(0xbb)+_0x480afc[_0x555f48(0xc5)]),console[_0x555f48(0xe4)](_0x555f48(0xe6)+_0x480afc['projectId']),0x0;}}
|
|
1
|
+
const a32_0x4a5ed8=a32_0x5070;(function(_0x201172,_0x2fbe85){const _0x21dd55=a32_0x5070,_0x17f803=_0x201172();while(!![]){try{const _0x11647d=parseInt(_0x21dd55(0x244))/0x1*(parseInt(_0x21dd55(0x22f))/0x2)+parseInt(_0x21dd55(0x22b))/0x3*(-parseInt(_0x21dd55(0x23c))/0x4)+parseInt(_0x21dd55(0x211))/0x5*(parseInt(_0x21dd55(0x229))/0x6)+parseInt(_0x21dd55(0x25c))/0x7*(-parseInt(_0x21dd55(0x1f0))/0x8)+parseInt(_0x21dd55(0x1f4))/0x9+parseInt(_0x21dd55(0x24a))/0xa*(parseInt(_0x21dd55(0x259))/0xb)+-parseInt(_0x21dd55(0x1f5))/0xc*(parseInt(_0x21dd55(0x222))/0xd);if(_0x11647d===_0x2fbe85)break;else _0x17f803['push'](_0x17f803['shift']());}catch(_0x23622c){_0x17f803['push'](_0x17f803['shift']());}}}(a32_0x2800,0x32233));import{BaseCommand}from'./command.js';function a32_0x2800(){const _0xcbef82=['limit','workflow:sessions','4CrrgFm','\x20\x20Session\x20ID:\x20','workflow:attempts','execute','workflow:push','length','Error:\x20Target\x20must\x20be\x20prefixed\x20with\x20\x22session:\x22\x20or\x20\x22attempt:\x22','Project\x20filter:\x20','1RjphmT','tasks','✔\x20Downloaded\x20','Output\x20directory:\x20','\x20\x20Files\x20extracted:\x20','\x20is\x20not\x20a\x20directory','10mGdnaT','Pattern:\x20','workflow:delete','\x20\x20Location:\x20','status','description','workflow','Status:\x20','List\x20workflow\x20attempts','sessions','retryAttempt','logs','workflow:workflows','\x20project','Pushing\x20workflow\x20project...','3894979pGJhEl','projectId','revision','62482FkGXsN','Including\x20subtasks:\x20yes','workflow:projects','Usage:\x20workflow\x20retry\x20session:<id>\x20or\x20workflow\x20retry\x20attempt:<id>','Error:\x20Attempt\x20ID\x20is\x20required','Task\x20name:\x20','Validation:\x20skipped','\x22?\x20This\x20cannot\x20be\x20undone.','\x20\x20Cause:\x20','Error:\x20Project\x20name\x20or\x20ID\x20is\x20required','Target:\x20','Listing\x20workflows...','✔\x20Deleted\x20project\x20','From\x20task:\x20','skipValidation','Filter:\x20project=','fromTask','Reason:\x20','message','Listing\x20workflow\x20sessions...','Push\x20workflow\x20project\x20to\x20Treasure\x20Data','Filter:\x20','parse','params','32imIdvI','workflow:download','delete','Download\x20workflow\x20project\x20from\x20Treasure\x20Data','2657799khMhxJ','84CQeABV','Attempt\x20ID:\x20','resumeFrom','Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20project\x20\x22','Error:\x20','Error:\x20Session\x20ID\x20or\x20attempt\x20ID\x20is\x20required','Getting\x20task\x20logs...','Are\x20you\x20sure\x20you\x20want\x20to\x20kill\x20attempt\x20','✔\x20Retry\x20started','List\x20all\x20workflow\x20projects','fs/promises','attemptId','cause','Listing\x20workflow\x20attempts...','Project\x20directory:\x20','Project:\x20','yes','data','filesExtracted','session','...','isDirectory','offset','Kill\x20a\x20running\x20attempt','ies','Usage:\x20workflow:delete\x20<project-name-or-id>','attempt:','Cancelled','110CczUPS','verbose','Usage:\x20workflow:download\x20<project-name>\x20[output-dir]','error','Retrying\x20session...','Revision:\x20','Error:\x20Invalid\x20pattern.\x20Use\x20format:\x20project\x20or\x20project.workflow','reason','startsWith','Show\x20specific\x20attempt\x20details','Downloading\x20project\x20','name','Project\x20name:\x20','substring','readFile','\x20task','workflows','1067729oCZmVQ','includeSubtasks','Force:\x20yes','attempt','split','Delete\x20workflow\x20project\x20from\x20Treasure\x20Data','session:','41382wkcwEd','\x20\x20New\x20attempt\x20ID:\x20','780981krkWnZ','✔\x20Found\x20','includeRetried','Retry\x20a\x20session\x20or\x20attempt','550382BRpwdm','projectName','List\x20workflows','Params:\x20','utf-8','Include\x20retried:\x20yes','Show\x20tasks\x20for\x20an\x20attempt','\x20log\x20entr','projects','\x20\x20Revision:\x20','Error:\x20Invalid\x20JSON\x20in\x20--params'];a32_0x2800=function(){return _0xcbef82;};return a32_0x2800();}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_0x4a5ed8(0x21c)]=a32_0x4a5ed8(0x25e);[a32_0x4a5ed8(0x24f)]=a32_0x4a5ed8(0x1fe);async[a32_0x4a5ed8(0x23f)](_0x2e9adf){const _0x12d641=a32_0x4a5ed8,{options:_0xe94634,args:_0x3dc587,tdx:_0x10bd99}=_0x2e9adf,_0x5db7d8=_0x3dc587[0x0];try{_0xe94634[_0x12d641(0x212)]&&_0x5db7d8&&console['error'](_0x12d641(0x24b)+_0x5db7d8);const _0x30910e=await withSpinner('Listing\x20workflow\x20projects...',()=>_0x10bd99[_0x12d641(0x250)][_0x12d641(0x237)](_0x5db7d8,{'limit':_0xe94634[_0x12d641(0x23a)]}),{'verbose':_0xe94634[_0x12d641(0x212)]}),_0xdf0d18=_0x30910e['data'];return console[_0x12d641(0x214)](_0x12d641(0x22c)+_0xdf0d18[_0x12d641(0x241)]+_0x12d641(0x257)+(_0xdf0d18['length']!==0x1?'s':'')),await handleSDKOutput(_0xdf0d18,_0xe94634),0x0;}catch(_0x4c75a5){if(_0x4c75a5 instanceof SDKError)return console[_0x12d641(0x214)]('Error:\x20'+_0x4c75a5['message']),_0x4c75a5[_0x12d641(0x201)]&&console[_0x12d641(0x214)](_0x12d641(0x264)+_0x4c75a5[_0x12d641(0x201)]),0x1;throw _0x4c75a5;}}}export class WorkflowWorkflowsCommand extends BaseCommand{[a32_0x4a5ed8(0x21c)]=a32_0x4a5ed8(0x256);[a32_0x4a5ed8(0x24f)]=a32_0x4a5ed8(0x231);async[a32_0x4a5ed8(0x23f)](_0x5235ac){const _0x325686=a32_0x4a5ed8,{options:_0x8167ca,args:_0x47afc8,tdx:_0x2c565e}=_0x5235ac,_0x522e10=_0x47afc8[0x0];try{_0x8167ca[_0x325686(0x212)]&&_0x522e10&&console[_0x325686(0x214)](_0x325686(0x243)+_0x522e10);const _0x71b940=await withSpinner(_0x325686(0x267),()=>_0x2c565e[_0x325686(0x250)][_0x325686(0x221)](_0x522e10,{'limit':_0x8167ca['limit']}),{'verbose':_0x8167ca[_0x325686(0x212)]}),_0x854b56=_0x71b940[_0x325686(0x206)];return console[_0x325686(0x214)](_0x325686(0x22c)+_0x854b56[_0x325686(0x241)]+'\x20workflow'+(_0x854b56[_0x325686(0x241)]!==0x1?'s':'')),await handleSDKOutput(_0x854b56,_0x8167ca),0x0;}catch(_0x339f79){if(_0x339f79 instanceof SDKError)return console[_0x325686(0x214)](_0x325686(0x1f9)+_0x339f79['message']),_0x339f79[_0x325686(0x201)]&&console[_0x325686(0x214)](_0x325686(0x264)+_0x339f79['cause']),0x1;throw _0x339f79;}}}export class WorkflowSessionsCommand extends BaseCommand{['name']=a32_0x4a5ed8(0x23b);[a32_0x4a5ed8(0x24f)]='List\x20workflow\x20execution\x20sessions';async[a32_0x4a5ed8(0x23f)](_0x2010b1){const _0x17687f=a32_0x4a5ed8,{options:_0x475963,args:_0x422d6b,tdx:_0x2615a1}=_0x2010b1;let _0x5e5676,_0x192157;if(_0x422d6b[0x0]){const _0x5b3bfc=_0x422d6b[0x0][_0x17687f(0x226)]('.');if(_0x5b3bfc[_0x17687f(0x241)]===0x1)_0x5e5676=_0x5b3bfc[0x0];else{if(_0x5b3bfc[_0x17687f(0x241)]===0x2)[_0x5e5676,_0x192157]=_0x5b3bfc;else return console[_0x17687f(0x214)](_0x17687f(0x217)),0x1;}}try{if(_0x475963['verbose']){if(_0x5e5676&&_0x192157)console[_0x17687f(0x214)](_0x17687f(0x1ed)+_0x5e5676+'.'+_0x192157);else _0x5e5676&&console[_0x17687f(0x214)](_0x17687f(0x1e7)+_0x5e5676);const _0x56419a=_0x475963[_0x17687f(0x24e)];_0x56419a&&console[_0x17687f(0x214)](_0x17687f(0x251)+_0x56419a);}const _0x184196=await withSpinner(_0x17687f(0x1eb),()=>_0x2615a1[_0x17687f(0x250)][_0x17687f(0x253)]({'projectName':_0x5e5676,'workflowName':_0x192157,'status':_0x475963[_0x17687f(0x24e)],'fromTime':_0x475963['from'],'toTime':_0x475963['to'],'limit':_0x475963[_0x17687f(0x23a)]}),{'verbose':_0x475963[_0x17687f(0x212)]}),_0x39e3a4=_0x184196[_0x17687f(0x206)];return console[_0x17687f(0x214)](_0x17687f(0x22c)+_0x39e3a4[_0x17687f(0x241)]+'\x20session'+(_0x39e3a4[_0x17687f(0x241)]!==0x1?'s':'')),await handleSDKOutput(_0x39e3a4,_0x475963),0x0;}catch(_0x3b792b){if(_0x3b792b instanceof SDKError)return console[_0x17687f(0x214)](_0x17687f(0x1f9)+_0x3b792b[_0x17687f(0x1ea)]),_0x3b792b[_0x17687f(0x201)]&&console[_0x17687f(0x214)](_0x17687f(0x264)+_0x3b792b[_0x17687f(0x201)]),0x1;throw _0x3b792b;}}}export class WorkflowAttemptsCommand extends BaseCommand{[a32_0x4a5ed8(0x21c)]=a32_0x4a5ed8(0x23e);['description']=a32_0x4a5ed8(0x252);async[a32_0x4a5ed8(0x23f)](_0x4e02f3){const _0x13357=a32_0x4a5ed8,{options:_0x341343,args:_0x36e3b3,tdx:_0x2e37a7}=_0x4e02f3;let _0x1e474b,_0x183996;if(_0x36e3b3[0x0]){const _0x2ca5e1=_0x36e3b3[0x0][_0x13357(0x226)]('.');if(_0x2ca5e1[_0x13357(0x241)]===0x1)_0x1e474b=_0x2ca5e1[0x0];else{if(_0x2ca5e1[_0x13357(0x241)]===0x2)[_0x1e474b,_0x183996]=_0x2ca5e1;else return console['error'](_0x13357(0x217)),0x1;}}try{const _0x248961=_0x341343[_0x13357(0x22d)];if(_0x341343['verbose']){if(_0x1e474b&&_0x183996)console[_0x13357(0x214)]('Filter:\x20'+_0x1e474b+'.'+_0x183996);else _0x1e474b&&console[_0x13357(0x214)](_0x13357(0x1e7)+_0x1e474b);_0x248961&&console[_0x13357(0x214)](_0x13357(0x234));}const _0x124e92=await withSpinner(_0x13357(0x202),()=>_0x2e37a7[_0x13357(0x250)]['attempts']({'projectName':_0x1e474b,'workflowName':_0x183996,'includeRetried':_0x248961,'limit':_0x341343[_0x13357(0x23a)]}),{'verbose':_0x341343[_0x13357(0x212)]}),_0x20d604=_0x124e92[_0x13357(0x206)];return console[_0x13357(0x214)](_0x13357(0x22c)+_0x20d604[_0x13357(0x241)]+'\x20attempt'+(_0x20d604[_0x13357(0x241)]!==0x1?'s':'')),await handleSDKOutput(_0x20d604,_0x341343),0x0;}catch(_0x31406c){if(_0x31406c instanceof SDKError)return console[_0x13357(0x214)](_0x13357(0x1f9)+_0x31406c['message']),_0x31406c['cause']&&console[_0x13357(0x214)](_0x13357(0x264)+_0x31406c['cause']),0x1;throw _0x31406c;}}}export class WorkflowAttemptCommand extends BaseCommand{[a32_0x4a5ed8(0x21c)]='workflow:attempt';[a32_0x4a5ed8(0x24f)]=a32_0x4a5ed8(0x21a);async[a32_0x4a5ed8(0x23f)](_0x208896){const _0xd8e8fc=a32_0x4a5ed8,{options:_0x45426b,args:_0x49ed19,tdx:_0x340684}=_0x208896,_0x401a03=_0x49ed19[0x0];if(!_0x401a03)return console[_0xd8e8fc(0x214)](_0xd8e8fc(0x260)),0x1;try{_0x45426b[_0xd8e8fc(0x212)]&&console['error']('Attempt\x20ID:\x20'+_0x401a03);const _0x1b26e8=await withSpinner('Getting\x20attempt\x20details...',()=>_0x340684['workflow'][_0xd8e8fc(0x225)](_0x401a03),{'verbose':_0x45426b['verbose']}),_0xf2e7f2=_0x1b26e8[_0xd8e8fc(0x206)];return await handleSDKOutput([_0xf2e7f2],_0x45426b),0x0;}catch(_0x1eed6a){if(_0x1eed6a instanceof SDKError)return console[_0xd8e8fc(0x214)](_0xd8e8fc(0x1f9)+_0x1eed6a[_0xd8e8fc(0x1ea)]),_0x1eed6a[_0xd8e8fc(0x201)]&&console[_0xd8e8fc(0x214)]('\x20\x20Cause:\x20'+_0x1eed6a[_0xd8e8fc(0x201)]),0x1;throw _0x1eed6a;}}}export class WorkflowTasksCommand extends BaseCommand{[a32_0x4a5ed8(0x21c)]='workflow:tasks';[a32_0x4a5ed8(0x24f)]=a32_0x4a5ed8(0x235);async[a32_0x4a5ed8(0x23f)](_0x1523b1){const _0x264bbe=a32_0x4a5ed8,{options:_0x1defba,args:_0x188c6e,tdx:_0x50e6e4}=_0x1523b1,_0x2b24b2=_0x188c6e[0x0];if(!_0x2b24b2)return console[_0x264bbe(0x214)]('Error:\x20Attempt\x20ID\x20is\x20required'),0x1;try{const _0x4e69ba=_0x1defba[_0x264bbe(0x223)];_0x1defba['verbose']&&(console[_0x264bbe(0x214)]('Attempt\x20ID:\x20'+_0x2b24b2),_0x4e69ba&&console[_0x264bbe(0x214)](_0x264bbe(0x25d)));const _0x1794e5=await withSpinner('Getting\x20attempt\x20tasks...',()=>_0x50e6e4['workflow'][_0x264bbe(0x245)](_0x2b24b2,_0x4e69ba||![]),{'verbose':_0x1defba[_0x264bbe(0x212)]}),_0x5800d4=_0x1794e5[_0x264bbe(0x206)];return console['error'](_0x264bbe(0x22c)+_0x5800d4[_0x264bbe(0x241)]+_0x264bbe(0x220)+(_0x5800d4['length']!==0x1?'s':'')),await handleSDKOutput(_0x5800d4,_0x1defba),0x0;}catch(_0x3f1e06){if(_0x3f1e06 instanceof SDKError)return console['error'](_0x264bbe(0x1f9)+_0x3f1e06[_0x264bbe(0x1ea)]),_0x3f1e06[_0x264bbe(0x201)]&&console[_0x264bbe(0x214)](_0x264bbe(0x264)+_0x3f1e06[_0x264bbe(0x201)]),0x1;throw _0x3f1e06;}}}export class WorkflowLogsCommand extends BaseCommand{[a32_0x4a5ed8(0x21c)]='workflow:logs';[a32_0x4a5ed8(0x24f)]='Show\x20logs\x20for\x20a\x20specific\x20task';async['execute'](_0x316244){const _0x17edb9=a32_0x4a5ed8,{options:_0x4ca067,args:_0x3774a6,tdx:_0x481596}=_0x316244,_0x12eee7=_0x3774a6[0x0],_0x1c0e2c=_0x3774a6[0x1];if(!_0x12eee7||!_0x1c0e2c)return console[_0x17edb9(0x214)]('Error:\x20Attempt\x20ID\x20and\x20task\x20name\x20are\x20required'),0x1;try{_0x4ca067[_0x17edb9(0x212)]&&(console['error'](_0x17edb9(0x1f6)+_0x12eee7),console[_0x17edb9(0x214)](_0x17edb9(0x261)+_0x1c0e2c));const _0x31cde2=_0x4ca067[_0x17edb9(0x20b)],_0x320fa1=await withSpinner(_0x17edb9(0x1fb),()=>_0x481596[_0x17edb9(0x250)][_0x17edb9(0x255)](_0x12eee7,_0x1c0e2c,{'offset':_0x31cde2,'limit':_0x4ca067[_0x17edb9(0x23a)]}),{'verbose':_0x4ca067[_0x17edb9(0x212)]}),_0x170057=_0x320fa1[_0x17edb9(0x206)];return console[_0x17edb9(0x214)](_0x17edb9(0x22c)+_0x170057[_0x17edb9(0x241)]+_0x17edb9(0x236)+(_0x170057['length']!==0x1?_0x17edb9(0x20d):'y')),await handleSDKOutput(_0x170057,_0x4ca067),0x0;}catch(_0x43df55){if(_0x43df55 instanceof SDKError)return console[_0x17edb9(0x214)]('Error:\x20'+_0x43df55[_0x17edb9(0x1ea)]),_0x43df55['cause']&&console['error']('\x20\x20Cause:\x20'+_0x43df55[_0x17edb9(0x201)]),0x1;throw _0x43df55;}}}export class WorkflowKillCommand extends BaseCommand{[a32_0x4a5ed8(0x21c)]='workflow:kill';[a32_0x4a5ed8(0x24f)]=a32_0x4a5ed8(0x20c);async[a32_0x4a5ed8(0x23f)](_0x2e397f){const _0x313a2b=a32_0x4a5ed8,{options:_0x2b7ff4,args:_0x54d234,tdx:_0x32b791}=_0x2e397f,_0xc61e60=_0x54d234[0x0];if(!_0xc61e60)return console[_0x313a2b(0x214)](_0x313a2b(0x260)),0x1;try{const _0x1914ff=_0x2b7ff4[_0x313a2b(0x218)];_0x2b7ff4[_0x313a2b(0x212)]&&(console[_0x313a2b(0x214)](_0x313a2b(0x1f6)+_0xc61e60),_0x1914ff&&console[_0x313a2b(0x214)](_0x313a2b(0x1e9)+_0x1914ff));if(!_0x2b7ff4[_0x313a2b(0x205)]){const _0x561898=await confirm(_0x313a2b(0x1fc)+_0xc61e60+'?');if(!_0x561898)return console['error']('Cancelled'),0x0;}const _0x5d1116=await withSpinner('Killing\x20attempt...',()=>_0x32b791['workflow']['kill'](_0xc61e60,_0x1914ff),{'verbose':_0x2b7ff4['verbose']}),_0x2737c0=_0x5d1116[_0x313a2b(0x206)];return console[_0x313a2b(0x214)]('✔\x20'+_0x2737c0),0x0;}catch(_0x5bb760){if(_0x5bb760 instanceof SDKError)return console['error'](_0x313a2b(0x1f9)+_0x5bb760[_0x313a2b(0x1ea)]),_0x5bb760[_0x313a2b(0x201)]&&console[_0x313a2b(0x214)](_0x313a2b(0x264)+_0x5bb760[_0x313a2b(0x201)]),0x1;throw _0x5bb760;}}}export class WorkflowRetryCommand extends BaseCommand{[a32_0x4a5ed8(0x21c)]='workflow:retry';[a32_0x4a5ed8(0x24f)]=a32_0x4a5ed8(0x22e);async['execute'](_0x1a664c){const _0x55fc6b=a32_0x4a5ed8,{options:_0x428ff2,args:_0x3ac545,tdx:_0x5f1f97}=_0x1a664c,_0xad05c2=_0x3ac545[0x0];if(!_0xad05c2)return console[_0x55fc6b(0x214)](_0x55fc6b(0x1fa)),console[_0x55fc6b(0x214)](_0x55fc6b(0x25f)),0x1;let _0x16f80d=![],_0x38f629=_0xad05c2;if(_0xad05c2['startsWith'](_0x55fc6b(0x228)))_0x16f80d=!![],_0x38f629=_0xad05c2[_0x55fc6b(0x21e)](0x8);else{if(_0xad05c2[_0x55fc6b(0x219)](_0x55fc6b(0x20f)))_0x16f80d=![],_0x38f629=_0xad05c2[_0x55fc6b(0x21e)](0x8);else return console[_0x55fc6b(0x214)](_0x55fc6b(0x242)),console[_0x55fc6b(0x214)](_0x55fc6b(0x25f)),0x1;}try{const _0xe8a66c=_0x428ff2[_0x55fc6b(0x1e8)],_0x35f9b2=_0x428ff2[_0x55fc6b(0x1f7)],_0x527a9a=_0x428ff2[_0x55fc6b(0x1ef)],_0x55962e=_0x428ff2['force'];_0x428ff2[_0x55fc6b(0x212)]&&(console[_0x55fc6b(0x214)](_0x55fc6b(0x266)+(_0x16f80d?_0x55fc6b(0x208):'attempt')+'\x20'+_0x38f629),_0xe8a66c&&console[_0x55fc6b(0x214)](_0x55fc6b(0x1e5)+_0xe8a66c),_0x35f9b2&&console[_0x55fc6b(0x214)]('Resume\x20from:\x20'+_0x35f9b2),_0x527a9a&&console[_0x55fc6b(0x214)](_0x55fc6b(0x232)+_0x527a9a),_0x55962e&&console[_0x55fc6b(0x214)](_0x55fc6b(0x224)));let _0xc58c46;if(_0x527a9a)try{if(_0x527a9a[_0x55fc6b(0x219)]('@')){const _0x28c6bd=await import(_0x55fc6b(0x1ff)),_0x3c4cad=_0x527a9a[_0x55fc6b(0x21e)](0x1),_0x4855cb=await _0x28c6bd[_0x55fc6b(0x21f)](_0x3c4cad,_0x55fc6b(0x233));_0xc58c46=JSON[_0x55fc6b(0x1ee)](_0x4855cb);}else _0xc58c46=JSON[_0x55fc6b(0x1ee)](_0x527a9a);}catch{return console[_0x55fc6b(0x214)](_0x55fc6b(0x239)),0x1;}if(!_0x428ff2['yes']){const _0x413526=await confirm('Are\x20you\x20sure\x20you\x20want\x20to\x20retry\x20'+(_0x16f80d?_0x55fc6b(0x208):_0x55fc6b(0x225))+'\x20'+_0x38f629+'?');if(!_0x413526)return console[_0x55fc6b(0x214)](_0x55fc6b(0x210)),0x0;}let _0x3e54c7;_0x16f80d?_0x3e54c7=await withSpinner(_0x55fc6b(0x215),()=>_0x5f1f97['workflow']['retrySession'](_0x38f629,{'fromTask':_0xe8a66c,'retryParams':_0xc58c46}),{'verbose':_0x428ff2[_0x55fc6b(0x212)]}):_0x3e54c7=await withSpinner('Retrying\x20attempt...',()=>_0x5f1f97[_0x55fc6b(0x250)][_0x55fc6b(0x254)](_0x38f629,{'resumeFrom':_0x35f9b2,'retryParams':_0xc58c46,'force':_0x55962e}),{'verbose':_0x428ff2[_0x55fc6b(0x212)]});const _0x41f340=_0x3e54c7[_0x55fc6b(0x206)];return console['error'](_0x55fc6b(0x1fd)),console['error'](_0x55fc6b(0x22a)+_0x41f340[_0x55fc6b(0x200)]),console[_0x55fc6b(0x214)](_0x55fc6b(0x23d)+_0x41f340['sessionId']),0x0;}catch(_0x426597){if(_0x426597 instanceof SDKError)return console[_0x55fc6b(0x214)](_0x55fc6b(0x1f9)+_0x426597[_0x55fc6b(0x1ea)]),_0x426597[_0x55fc6b(0x201)]&&console[_0x55fc6b(0x214)](_0x55fc6b(0x264)+_0x426597['cause']),0x1;throw _0x426597;}}}function a32_0x5070(_0x169a12,_0x5a5ccf){const _0x280030=a32_0x2800();return a32_0x5070=function(_0x507066,_0x18102c){_0x507066=_0x507066-0x1e5;let _0x48ba5d=_0x280030[_0x507066];return _0x48ba5d;},a32_0x5070(_0x169a12,_0x5a5ccf);}export class WorkflowDownloadCommand extends BaseCommand{[a32_0x4a5ed8(0x21c)]=a32_0x4a5ed8(0x1f1);[a32_0x4a5ed8(0x24f)]=a32_0x4a5ed8(0x1f3);async[a32_0x4a5ed8(0x23f)](_0x4731f8){const _0x103ab5=a32_0x4a5ed8,{options:_0x4aa4c7,args:_0xd12c20,tdx:_0x5e93d6}=_0x4731f8,_0x5d47bc=_0xd12c20[0x0],_0x167298=_0xd12c20[0x1]||'.';if(!_0x5d47bc)return console[_0x103ab5(0x214)]('Error:\x20Project\x20name\x20is\x20required'),console[_0x103ab5(0x214)](_0x103ab5(0x213)),0x1;const _0x4fef02=_0x4aa4c7['revision'];_0x4aa4c7[_0x103ab5(0x212)]&&(console[_0x103ab5(0x214)](_0x103ab5(0x204)+_0x5d47bc),console[_0x103ab5(0x214)](_0x103ab5(0x247)+_0x167298),_0x4fef02&&console[_0x103ab5(0x214)](_0x103ab5(0x216)+_0x4fef02));const _0x3d98d6=await withSpinner(_0x103ab5(0x21b)+_0x5d47bc+_0x103ab5(0x209),()=>_0x5e93d6[_0x103ab5(0x250)]['download'](_0x5d47bc,_0x167298,{'revision':_0x4fef02}),{'verbose':_0x4aa4c7[_0x103ab5(0x212)]}),_0x1f11e8=_0x3d98d6[_0x103ab5(0x206)];return console[_0x103ab5(0x214)](_0x103ab5(0x246)+_0x1f11e8[_0x103ab5(0x230)]),console[_0x103ab5(0x214)](_0x103ab5(0x238)+_0x1f11e8[_0x103ab5(0x25b)]),console['error'](_0x103ab5(0x248)+_0x1f11e8[_0x103ab5(0x207)]),console[_0x103ab5(0x214)](_0x103ab5(0x24d)+_0x167298+'/'+_0x1f11e8[_0x103ab5(0x230)]),0x0;}}export class WorkflowPushCommand extends BaseCommand{['name']=a32_0x4a5ed8(0x240);[a32_0x4a5ed8(0x24f)]=a32_0x4a5ed8(0x1ec);async[a32_0x4a5ed8(0x23f)](_0x25ed3b){const _0x19f2f6=a32_0x4a5ed8,{options:_0x4ae6b0,args:_0x254b70,tdx:_0x6c618c}=_0x25ed3b;let _0x111b24='.',_0x19c13d=_0x4ae6b0['name'];if(_0x254b70[0x0]){const {promises:_0x282609}=await import('fs');try{const _0xca3a55=await _0x282609['stat'](_0x254b70[0x0]);if(_0xca3a55[_0x19f2f6(0x20a)]())_0x111b24=_0x254b70[0x0];else return console[_0x19f2f6(0x214)](_0x19f2f6(0x1f9)+_0x254b70[0x0]+_0x19f2f6(0x249)),0x1;}catch{_0x19c13d=_0x254b70[0x0],_0x111b24='.';}}const _0x859e44=_0x4ae6b0[_0x19f2f6(0x25b)],_0x7593a=_0x4ae6b0[_0x19f2f6(0x1e6)];_0x4ae6b0['verbose']&&(console[_0x19f2f6(0x214)](_0x19f2f6(0x203)+_0x111b24),_0x19c13d&&console['error'](_0x19f2f6(0x21d)+_0x19c13d),_0x859e44&&console['error']('Revision:\x20'+_0x859e44),_0x7593a&&console[_0x19f2f6(0x214)](_0x19f2f6(0x262)));const _0x5d1945=await withSpinner(_0x19f2f6(0x258),()=>_0x6c618c[_0x19f2f6(0x250)]['push'](_0x111b24,{'projectName':_0x19c13d,'revision':_0x859e44,'skipValidation':_0x7593a}),{'verbose':_0x4ae6b0['verbose']}),_0x5d12f8=_0x5d1945['data'];return console[_0x19f2f6(0x214)]('✔\x20Pushed\x20'+_0x5d12f8[_0x19f2f6(0x230)]),console[_0x19f2f6(0x214)]('\x20\x20Project\x20ID:\x20'+_0x5d12f8[_0x19f2f6(0x25a)]),console[_0x19f2f6(0x214)](_0x19f2f6(0x238)+_0x5d12f8[_0x19f2f6(0x25b)]),0x0;}}export class WorkflowDeleteCommand extends BaseCommand{[a32_0x4a5ed8(0x21c)]=a32_0x4a5ed8(0x24c);['description']=a32_0x4a5ed8(0x227);async['execute'](_0x241416){const _0x55f739=a32_0x4a5ed8,{options:_0xf11230,args:_0x1a1e6f,tdx:_0x433d38}=_0x241416,_0x186720=_0x1a1e6f[0x0];if(!_0x186720)return console['error'](_0x55f739(0x265)),console[_0x55f739(0x214)](_0x55f739(0x20e)),0x1;_0xf11230[_0x55f739(0x212)]&&console['error'](_0x55f739(0x204)+_0x186720);if(!_0xf11230[_0x55f739(0x205)]){const _0x1a0d17=await confirm(_0x55f739(0x1f8)+_0x186720+_0x55f739(0x263));if(!_0x1a0d17)return console[_0x55f739(0x214)](_0x55f739(0x210)),0x0;}const _0x2d345d=await withSpinner('Deleting\x20project\x20'+_0x186720+_0x55f739(0x209),()=>_0x433d38['workflow'][_0x55f739(0x1f2)](_0x186720),{'verbose':_0xf11230['verbose']}),_0x5768de=_0x2d345d[_0x55f739(0x206)];return console['error'](_0x55f739(0x268)+_0x5768de[_0x55f739(0x230)]),console['error']('\x20\x20Project\x20ID:\x20'+_0x5768de[_0x55f739(0x25a)]),0x0;}}
|
package/dist/core/auth.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x6fcd62,_0x38abb1){const _0x485dc3=a33_0x5400,_0x341361=_0x6fcd62();while(!![]){try{const _0x5e433a=-parseInt(_0x485dc3(0x1d8))/0x1*(parseInt(_0x485dc3(0x1df))/0x2)+parseInt(_0x485dc3(0x1dd))/0x3*(parseInt(_0x485dc3(0x1e2))/0x4)+parseInt(_0x485dc3(0x1d5))/0x5*(-parseInt(_0x485dc3(0x1d0))/0x6)+-parseInt(_0x485dc3(0x1d4))/0x7*(-parseInt(_0x485dc3(0x1cf))/0x8)+-parseInt(_0x485dc3(0x1d7))/0x9*(parseInt(_0x485dc3(0x1e0))/0xa)+parseInt(_0x485dc3(0x1e3))/0xb+parseInt(_0x485dc3(0x1e1))/0xc*(parseInt(_0x485dc3(0x1d9))/0xd);if(_0x5e433a===_0x38abb1)break;else _0x341361['push'](_0x341361['shift']());}catch(_0x31a54b){_0x341361['push'](_0x341361['shift']());}}}(a33_0x3b4b,0xc9e0c));import{platform}from'os';import{readFileSync}from'fs';import{fileURLToPath}from'url';function a33_0x5400(_0x1e1be3,_0x404471){const _0x3b4b6c=a33_0x3b4b();return a33_0x5400=function(_0x540084,_0x29b2a0){_0x540084=_0x540084-0x1ce;let _0x16420b=_0x3b4b6c[_0x540084];return _0x16420b;},a33_0x5400(_0x1e1be3,_0x404471);}import{dirname,join}from'path';import{getAPIKey}from'./config.js';export function getVersion(){const _0x28cb7b=a33_0x5400;try{const _0xb58a8c=fileURLToPath(import.meta[_0x28cb7b(0x1e5)]),_0x3b9e02=dirname(_0xb58a8c),_0xaec145=join(_0x3b9e02,'../../package.json'),_0x124c23=JSON[_0x28cb7b(0x1d3)](readFileSync(_0xaec145,_0x28cb7b(0x1d1)));return _0x124c23[_0x28cb7b(0x1db)];}catch{return _0x28cb7b(0x1d2);}}export function getUserAgent(){const _0x14594e=a33_0x5400,_0x4c55aa=getVersion(),_0x363aaa=platform(),_0x565bb9=process[_0x14594e(0x1db)][_0x14594e(0x1d6)]('v','');return _0x14594e(0x1dc)+_0x4c55aa+'\x20('+_0x363aaa+_0x14594e(0x1ce)+_0x565bb9+')';}function a33_0x3b4b(){const _0x28cc21=['Authorization','version','tdx/','3kTecir','X-Trino-User','457594gjRKOA','10eXajcE','1055244zdrbXH','6519360BiDFBS','17915524GfSZER','entries','url','length',';\x20node/','42784CnuCtS','18FwLhvA','utf-8','0.0.0','parse','140yJVhNw','2206595nEpocL','replace','5545629qnXWXo','3gffXBY','13szQHNP'];a33_0x3b4b=function(){return _0x28cc21;};return a33_0x3b4b();}export function getAuthHeaders(_0x399312,_0x2a7d06){const _0x7998b3=a33_0x5400,_0x3ec3cd=getVersion(),_0xe1dff3={'User-Agent':getUserAgent(),'X-TD-Client':'tdx','X-TD-Client-Version':_0x3ec3cd};return _0x2a7d06&&(_0xe1dff3[_0x7998b3(0x1da)]='TD1\x20'+_0x2a7d06),_0xe1dff3;}export function toHeaderRecord(_0x355ad2){const _0x74ea81=a33_0x5400,_0x147903={};for(const [_0x941ea0,_0x436751]of Object[_0x74ea81(0x1e4)](_0x355ad2)){_0x436751!==undefined&&(_0x147903[_0x941ea0]=_0x436751);}return _0x147903;}export function getTrinoHeaders(_0x1a617e,_0x16c8ab){const _0x1d4588=a33_0x5400,_0x33900d=getAuthHeaders(_0x1a617e,_0x16c8ab),_0x121d20=toHeaderRecord(_0x33900d);return delete _0x121d20['Authorization'],_0x16c8ab&&(_0x121d20[_0x1d4588(0x1de)]=_0x16c8ab),_0x121d20;}export function hasAPIKey(_0x5d663e){const _0x89b3ff=a33_0x5400,_0x21338e=getAPIKey(_0x5d663e);return _0x21338e!==undefined&&_0x21338e[_0x89b3ff(0x1e6)]>0x0;}
|
package/dist/core/config.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3ab449,_0x1f04d8){const _0x4f1fb8=a34_0x12c4,_0x445549=_0x3ab449();while(!![]){try{const _0x767684=parseInt(_0x4f1fb8(0x1a4))/0x1*(parseInt(_0x4f1fb8(0x1d6))/0x2)+-parseInt(_0x4f1fb8(0x1b3))/0x3*(-parseInt(_0x4f1fb8(0x1c1))/0x4)+-parseInt(_0x4f1fb8(0x1d5))/0x5*(-parseInt(_0x4f1fb8(0x1b0))/0x6)+-parseInt(_0x4f1fb8(0x1b2))/0x7*(-parseInt(_0x4f1fb8(0x1b6))/0x8)+-parseInt(_0x4f1fb8(0x1b4))/0x9+-parseInt(_0x4f1fb8(0x1ad))/0xa*(parseInt(_0x4f1fb8(0x1c0))/0xb)+parseInt(_0x4f1fb8(0x1db))/0xc*(-parseInt(_0x4f1fb8(0x1de))/0xd);if(_0x767684===_0x1f04d8)break;else _0x445549['push'](_0x445549['shift']());}catch(_0x3871e3){_0x445549['push'](_0x445549['shift']());}}}(a34_0x5cc2,0x1cd88));import{homedir}from'os';import{join}from'path';import{existsSync,readFileSync,writeFileSync,mkdirSync}from'fs';import*as a34_0x5287da from'node:fs';import*as a34_0x1fccf1 from'node:path';import{SITE_ALIASES}from'../types/index.js';import{validateSecureFilePermissions}from'../utils/file-permissions.js';export function getConfigDir(){const _0x3db5c7=a34_0x12c4;return process['env'][_0x3db5c7(0x1d0)]||join(homedir(),_0x3db5c7(0x1c2),_0x3db5c7(0x1cb));}export function getConfigFile(){return join(getConfigDir(),'.env');}export function getCacheDir(){const _0x1c0f8c=a34_0x12c4;return process['env'][_0x1c0f8c(0x1cf)]||join(homedir(),_0x1c0f8c(0x1cc),'tdx');}function a34_0x12c4(_0x270169,_0x1f9ca3){const _0x5cc276=a34_0x5cc2();return a34_0x12c4=function(_0x12c4ac,_0x21bf41){_0x12c4ac=_0x12c4ac-0x1a0;let _0x2a8d65=_0x5cc276[_0x12c4ac];return _0x2a8d65;},a34_0x12c4(_0x270169,_0x1f9ca3);}export function getLLMProjectCacheFile(){const _0x3590d0=a34_0x12c4;return join(getCacheDir(),_0x3590d0(0x1c6));}export function readCachedLLMProject(){try{const _0x4117f8=getLLMProjectCacheFile();if(!existsSync(_0x4117f8))return null;return readFileSync(_0x4117f8,'utf-8')['trim']();}catch{return null;}}export function writeCachedLLMProject(_0x22ece7){const _0x5ee81d=a34_0x12c4;try{const _0x5be99d=getCacheDir(),_0x299570=getLLMProjectCacheFile();!existsSync(_0x5be99d)&&mkdirSync(_0x5be99d,{'recursive':!![]}),writeFileSync(_0x299570,_0x22ece7,_0x5ee81d(0x1b7));}catch(_0x4123c2){console[_0x5ee81d(0x1ae)](_0x5ee81d(0x1bc),_0x4123c2);}}export function parseEnvFile(_0x4f214e){const _0x3c5f2a=a34_0x12c4,_0x499b34={};for(const _0x1ca49b of _0x4f214e[_0x3c5f2a(0x1b9)]('\x0a')){const _0x387498=_0x1ca49b[_0x3c5f2a(0x1dc)]();if(!_0x387498||_0x387498['startsWith']('#'))continue;const _0x15e9b9=_0x387498['match'](/^([^=]+)=(.*)$/);if(_0x15e9b9){const _0x3c50d5=_0x15e9b9[0x1][_0x3c5f2a(0x1dc)]();let _0x390d54=_0x15e9b9[0x2]['trim']();(_0x390d54[_0x3c5f2a(0x1af)]('\x22')&&_0x390d54[_0x3c5f2a(0x1a6)]('\x22')||_0x390d54[_0x3c5f2a(0x1af)]('\x27')&&_0x390d54[_0x3c5f2a(0x1a6)]('\x27'))&&(_0x390d54=_0x390d54[_0x3c5f2a(0x1bf)](0x1,-0x1)),_0x499b34[_0x3c50d5]=_0x390d54;}}return _0x499b34;}export function readUserConfig(){const _0x1106e5=a34_0x12c4,_0x3b4b9b=getConfigFile();if(!existsSync(_0x3b4b9b))return{};try{const _0x30d496=readFileSync(_0x3b4b9b,_0x1106e5(0x1b7));return parseEnvFile(_0x30d496);}catch(_0x502349){return console[_0x1106e5(0x1ca)](_0x1106e5(0x1c3)+_0x3b4b9b+':',_0x502349),{};}}export function resolveSite(_0x15598c){const _0x2049cd=a34_0x12c4,_0x176761=[_0x2049cd(0x1c4),_0x2049cd(0x1a5),_0x2049cd(0x1c9),_0x2049cd(0x1d8),_0x2049cd(0x1bd),_0x2049cd(0x1b1),_0x2049cd(0x1a7),_0x2049cd(0x1cd),_0x2049cd(0x1dd),_0x2049cd(0x1b5)];if(_0x176761['includes'](_0x15598c))return _0x15598c;if(_0x15598c in SITE_ALIASES)return SITE_ALIASES[_0x15598c];return console[_0x2049cd(0x1ca)](_0x2049cd(0x1ce)+_0x15598c+_0x2049cd(0x1a9)),_0x2049cd(0x1c4);}let cachedUserConfig=null;export function loadUserConfigOnce(){return cachedUserConfig===null&&(cachedUserConfig=readUserConfig()),cachedUserConfig;}function a34_0x5cc2(){const _0x2a411c=['global:\x20','ap02','map','apiKeys','120mRipjg','trim','stg-jp01','571337EziVZx','existsSync','replace','env','TD_API_KEY','13uSoUpN','jp01','endsWith','dev-eu01','env:\x20','\x27,\x20defaulting\x20to\x20us01','tdx.json','toUpperCase','join','20CrlFyr','error','startsWith','12NMIvtp','dev-us01','300965jHOWdi','9apTBBF','166779OOzeas','stg-ap03','40qXcpaD','utf-8','profile','split','Warning:\x20Failed\x20to\x20load\x20','.env','Warning:\x20Failed\x20to\x20cache\x20LLM\x20project\x20name:','ap03','TD_API_KEY_','slice','152537bbXCMZ','127188YRPFCO','.config','Warning:\x20Failed\x20to\x20read\x20config\x20file\x20','us01','profiles','llm_default_project','entries','\x20(TD_API_KEY)','eu01','warn','tdx','.cache','stg-us01','Warning:\x20Unknown\x20site\x20\x27','TDX_CACHE_DIR','TDX_CONFIG_DIR','readFileSync','.env.','profile:\x20','parse','353765JJRnKm','23390tVgrpD'];a34_0x5cc2=function(){return _0x2a411c;};return a34_0x5cc2();}export function clearConfigCache(){cachedUserConfig=null;}export function getAPIKey(_0x514dda,_0x26c668){const _0x1ec296=a34_0x12c4,_0x2ad4bd=_0x514dda[_0x1ec296(0x1ab)]()[_0x1ec296(0x1a1)](/-/g,'_'),_0x10c913=_0x1ec296(0x1be)+_0x2ad4bd;if(process[_0x1ec296(0x1a2)][_0x10c913])return process[_0x1ec296(0x1a2)][_0x10c913];if(process['env'][_0x1ec296(0x1a3)])return process[_0x1ec296(0x1a2)][_0x1ec296(0x1a3)];const _0x217f67=_0x26c668||getActiveProfileName();if(_0x217f67){const _0x237b87=loadProfileEnv(_0x217f67);if(_0x237b87){if(_0x237b87[_0x10c913])return _0x237b87[_0x10c913];if(_0x237b87['TD_API_KEY'])return _0x237b87[_0x1ec296(0x1a3)];}}const _0x1fe546=loadUserConfigOnce();if(_0x1fe546[_0x10c913])return _0x1fe546[_0x10c913];if(_0x1fe546[_0x1ec296(0x1a3)])return _0x1fe546[_0x1ec296(0x1a3)];return undefined;}export function getAPIKeySource(_0x3c1955,_0x482b65){const _0x19fac0=a34_0x12c4,_0x247d57='TD_API_KEY_'+_0x3c1955['toUpperCase']()[_0x19fac0(0x1a1)](/-/g,'_');if(process[_0x19fac0(0x1a2)][_0x247d57])return _0x19fac0(0x1a8)+_0x247d57;if(process[_0x19fac0(0x1a2)][_0x19fac0(0x1a3)])return'env:\x20TD_API_KEY';const _0x4f2af6=_0x482b65||getActiveProfileName();if(_0x4f2af6){const _0x597b58=loadProfileEnv(_0x4f2af6);if(_0x597b58){if(_0x597b58[_0x247d57])return _0x19fac0(0x1d3)+_0x4f2af6+'\x20('+_0x247d57+')';if(_0x597b58['TD_API_KEY'])return _0x19fac0(0x1d3)+_0x4f2af6+_0x19fac0(0x1c8);}}const _0x8da716=loadUserConfigOnce(),_0x658ee6=getConfigFile();if(_0x8da716[_0x247d57])return _0x19fac0(0x1d7)+_0x658ee6+'\x20('+_0x247d57+')';if(_0x8da716[_0x19fac0(0x1a3)])return _0x19fac0(0x1d7)+_0x658ee6+_0x19fac0(0x1c8);return null;}function loadProfileEnv(_0x2898b6){const _0x3a6ca0=a34_0x12c4,_0x296722=a34_0x1fccf1['join'](getConfigDir(),_0x3a6ca0(0x1d2)+_0x2898b6);if(a34_0x5287da[_0x3a6ca0(0x1a0)](_0x296722)){validateSecureFilePermissions(_0x296722);try{const _0x2cfdbb=a34_0x5287da[_0x3a6ca0(0x1d1)](_0x296722,'utf-8');return parseEnvFile(_0x2cfdbb);}catch(_0x2864df){console[_0x3a6ca0(0x1ca)](_0x3a6ca0(0x1ba)+_0x296722+':\x20'+_0x2864df);}}const _0x44c4de=a34_0x1fccf1[_0x3a6ca0(0x1ac)](getConfigDir(),_0x3a6ca0(0x1c5),_0x2898b6,_0x3a6ca0(0x1bb));if(a34_0x5287da[_0x3a6ca0(0x1a0)](_0x44c4de)){validateSecureFilePermissions(_0x44c4de);try{const _0x2493d3=a34_0x5287da['readFileSync'](_0x44c4de,_0x3a6ca0(0x1b7));return parseEnvFile(_0x2493d3);}catch(_0x2a25bb){return console[_0x3a6ca0(0x1ca)]('Warning:\x20Failed\x20to\x20load\x20'+_0x44c4de+':\x20'+_0x2a25bb),null;}}return null;}function getActiveProfileName(){const _0x1c3936=a34_0x12c4,_0x6335e5=a34_0x1fccf1[_0x1c3936(0x1ac)](getConfigDir(),_0x1c3936(0x1aa));if(!a34_0x5287da[_0x1c3936(0x1a0)](_0x6335e5))return null;try{const _0x4abc05=a34_0x5287da[_0x1c3936(0x1d1)](_0x6335e5,_0x1c3936(0x1b7)),_0x3fe3fb=JSON[_0x1c3936(0x1d4)](_0x4abc05);return _0x3fe3fb[_0x1c3936(0x1b8)]||null;}catch{return null;}}export function saveAPIKey(_0x1b7ab2,_0x49e86e){const _0x50dde9=a34_0x12c4,_0x179b15=getConfigDir(),_0x231619=getConfigFile();!existsSync(_0x179b15)&&mkdirSync(_0x179b15,{'recursive':!![],'mode':0x1c0});const _0x79ae50=readUserConfig(),_0x3cdd26=_0x1b7ab2[_0x50dde9(0x1ab)]()[_0x50dde9(0x1a1)](/-/g,'_');_0x79ae50[_0x50dde9(0x1be)+_0x3cdd26]=_0x49e86e;const _0xb1f805=Object[_0x50dde9(0x1c7)](_0x79ae50)[_0x50dde9(0x1d9)](([_0x5213af,_0x3e8967])=>_0x5213af+'='+_0x3e8967);writeFileSync(_0x231619,_0xb1f805['join']('\x0a')+'\x0a',{'mode':0x180});}export function loadConfig(){const _0x32071c=a34_0x12c4,_0x404d71={'apiKeys':{},'defaultSite':_0x32071c(0x1c4)},_0x3a21df=[_0x32071c(0x1c4),_0x32071c(0x1a5),_0x32071c(0x1c9),_0x32071c(0x1d8),_0x32071c(0x1bd),_0x32071c(0x1b1),_0x32071c(0x1a7),'stg-us01',_0x32071c(0x1dd),_0x32071c(0x1b5)];for(const _0x5393b0 of _0x3a21df){const _0x1ea4b0=getAPIKey(_0x5393b0);_0x1ea4b0&&(_0x404d71[_0x32071c(0x1da)][_0x5393b0]=_0x1ea4b0);}return _0x404d71;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a35_0x377ad6=a35_0x20ae;function a35_0x20ae(_0x38c621,_0x46a66d){const _0x162bec=a35_0x162b();return a35_0x20ae=function(_0x20ae29,_0x8d8865){_0x20ae29=_0x20ae29-0x115;let _0x3835bc=_0x162bec[_0x20ae29];return _0x3835bc;},a35_0x20ae(_0x38c621,_0x46a66d);}(function(_0x1becc7,_0x3731c7){const _0x181093=a35_0x20ae,_0x24f236=_0x1becc7();while(!![]){try{const _0x339e69=parseInt(_0x181093(0x144))/0x1+parseInt(_0x181093(0x118))/0x2*(parseInt(_0x181093(0x145))/0x3)+-parseInt(_0x181093(0x13b))/0x4+-parseInt(_0x181093(0x146))/0x5*(parseInt(_0x181093(0x11c))/0x6)+-parseInt(_0x181093(0x13f))/0x7+parseInt(_0x181093(0x12d))/0x8+parseInt(_0x181093(0x151))/0x9;if(_0x339e69===_0x3731c7)break;else _0x24f236['push'](_0x24f236['shift']());}catch(_0x27030){_0x24f236['push'](_0x24f236['shift']());}}}(a35_0x162b,0x9b997));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';function a35_0x162b(){const _0x239d88=['database','join','3680676tidKqa','global','Session','Profile','8508591zWRgja','loadGlobalConfig','log','displayWithSources','Global','57818qphZmu','1687431tqCpYf','1560365lhDmJl','cliFlags','apiKey','configFiles','parent_segment','llmProject','parentSegment','segmentPath','(active)','display','replace','18220869KmXVpO','Profile\x20Credentials','\x0a[configuration\x20files]','config','[context]','utf-8','profile','4mWBHlU','llm_project','getParameters','layers','18jnWTSh','Project','INFO','project',':\x20none','CLI\x20flag:\x20--','ppid','globalCredentials','sessionId','(session:\x20','verbose','profile:\x20','site','logLevel','session','us01','entries','4015384KOSjNl','activeProfile','segment_path','default','existsSync','readFileSync','injectIntoOptions','sessions','getSource','profiles','tdx.json','string'];a35_0x162b=function(){return _0x239d88;};return a35_0x162b();}import*as a35_0x346fff from'node:fs';import*as a35_0x1b7621 from'node:path';export class GlobalContext{[a35_0x377ad6(0x128)];[a35_0x377ad6(0x139)];['parent_segment'];[a35_0x377ad6(0x12f)];[a35_0x377ad6(0x119)];[a35_0x377ad6(0x148)];[a35_0x377ad6(0x126)];[a35_0x377ad6(0x129)];[a35_0x377ad6(0x11b)];[a35_0x377ad6(0x12e)];[a35_0x377ad6(0x124)];['configFiles'];constructor(_0x59bc04){const _0x43e92d=a35_0x377ad6;this[_0x43e92d(0x124)]=_0x59bc04[_0x43e92d(0x12a)]||process[_0x43e92d(0x122)]['toString']();const _0x4597d9=loadSessionContext(_0x59bc04[_0x43e92d(0x12a)]),_0xc7285=loadProjectConfig(),_0x5c6f4c=this['loadGlobalConfig']();this[_0x43e92d(0x12e)]=_0x59bc04['profile']||_0x4597d9?.['profile']||_0x5c6f4c['profile']||getActiveProfile();const _0x5b3d02=this[_0x43e92d(0x12e)]?loadProfile(this[_0x43e92d(0x12e)]):null,_0x2b4908=_0x4082a0=>{const _0x48266a=_0x43e92d;if(!_0x4082a0)return{};const _0x5a427c=_0x4082a0,_0x532f6e={};for(const [_0x3884bb,_0x49993e]of Object[_0x48266a(0x12c)](_0x5a427c)){typeof _0x49993e===_0x48266a(0x138)&&(_0x532f6e[_0x3884bb]=_0x49993e);}return _0x532f6e;},_0x33b919={};if(_0x59bc04[_0x43e92d(0x128)]&&_0x59bc04[_0x43e92d(0x128)]!==_0x43e92d(0x12b))_0x33b919[_0x43e92d(0x128)]=_0x59bc04[_0x43e92d(0x128)];const _0x17b56e=_0x4597d9?.['database'],_0x4ee4e5=_0xc7285?.[_0x43e92d(0x139)],_0x4577b0=_0x5b3d02?.[_0x43e92d(0x154)]?.[_0x43e92d(0x139)],_0x56a381=_0x5c6f4c[_0x43e92d(0x139)];_0x59bc04['database']&&(_0x59bc04[_0x43e92d(0x139)]!==_0x17b56e&&_0x59bc04[_0x43e92d(0x139)]!==_0x4ee4e5&&_0x59bc04['database']!==_0x4577b0&&_0x59bc04['database']!==_0x56a381)&&(_0x33b919[_0x43e92d(0x139)]=_0x59bc04[_0x43e92d(0x139)]);if(_0x59bc04[_0x43e92d(0x14c)])_0x33b919[_0x43e92d(0x14a)]=_0x59bc04['parentSegment'];if(_0x59bc04['llmProject'])_0x33b919[_0x43e92d(0x119)]=_0x59bc04[_0x43e92d(0x14b)];if(_0x59bc04['profile'])_0x33b919[_0x43e92d(0x117)]=_0x59bc04[_0x43e92d(0x117)];this[_0x43e92d(0x11b)]={'cliFlags':_0x33b919,'session':_0x2b4908(_0x4597d9),'project':_0x2b4908(_0xc7285),'profile':_0x2b4908(_0x5b3d02?.['config']),'global':_0x2b4908(_0x5c6f4c)};const _0x4f44bd={...this[_0x43e92d(0x11b)]['global'],...this['layers'][_0x43e92d(0x117)],...this[_0x43e92d(0x11b)][_0x43e92d(0x11f)],...this[_0x43e92d(0x11b)][_0x43e92d(0x12a)],...this[_0x43e92d(0x11b)][_0x43e92d(0x147)]},_0x1a31a6=_0x4f44bd[_0x43e92d(0x128)]||'us01';this[_0x43e92d(0x128)]=resolveSite(_0x1a31a6),this[_0x43e92d(0x139)]=_0x4f44bd[_0x43e92d(0x139)],this[_0x43e92d(0x14a)]=_0x4f44bd[_0x43e92d(0x14a)],this[_0x43e92d(0x12f)]=_0x4f44bd[_0x43e92d(0x12f)],this[_0x43e92d(0x119)]=_0x4f44bd['llm_project'],this[_0x43e92d(0x126)]=_0x59bc04[_0x43e92d(0x126)]||![],this[_0x43e92d(0x129)]=_0x59bc04[_0x43e92d(0x129)]??LogLevel[_0x43e92d(0x11e)],this[_0x43e92d(0x148)]=getAPIKey(this[_0x43e92d(0x128)],this[_0x43e92d(0x12e)]||undefined);const _0x43f3cf=getConfigDir(),_0x364d23=a35_0x1b7621[_0x43e92d(0x13a)](_0x43f3cf,_0x43e92d(0x134),this['sessionId']+'.json'),_0x1ac9ba=findProjectConfigPath(),_0x2b05bd=a35_0x1b7621[_0x43e92d(0x13a)](_0x43f3cf,'tdx.json'),_0x57fa06=a35_0x1b7621[_0x43e92d(0x13a)](_0x43f3cf,'.env');let _0x269d16=null,_0x1d5ff7=null;this[_0x43e92d(0x12e)]&&(_0x269d16=a35_0x1b7621[_0x43e92d(0x13a)](_0x43f3cf,_0x43e92d(0x136),this[_0x43e92d(0x12e)],'tdx.json'),_0x1d5ff7=a35_0x1b7621['join'](_0x43f3cf,_0x43e92d(0x136),this[_0x43e92d(0x12e)],'.env')),this[_0x43e92d(0x149)]={'session':a35_0x346fff[_0x43e92d(0x131)](_0x364d23)?_0x364d23:null,'project':_0x1ac9ba,'profile':_0x269d16&&a35_0x346fff[_0x43e92d(0x131)](_0x269d16)?_0x269d16:null,'profileCredentials':_0x1d5ff7&&a35_0x346fff['existsSync'](_0x1d5ff7)?_0x1d5ff7:null,'global':a35_0x346fff[_0x43e92d(0x131)](_0x2b05bd)?_0x2b05bd:null,'globalCredentials':a35_0x346fff['existsSync'](_0x57fa06)?_0x57fa06:null};}[a35_0x377ad6(0x135)](_0x9d316c,_0x1e60cc){const _0x4c3bf0=a35_0x377ad6;if(!_0x1e60cc)return'not\x20set';const _0x13650c=_0x1e60cc;if(this[_0x4c3bf0(0x11b)]['cliFlags'][_0x9d316c]===_0x13650c){if(_0x9d316c===_0x4c3bf0(0x128)&&_0x13650c===_0x4c3bf0(0x12b)&&!this[_0x4c3bf0(0x11b)]['session'][_0x4c3bf0(0x128)]&&!this[_0x4c3bf0(0x11b)][_0x4c3bf0(0x11f)]['site']&&!this[_0x4c3bf0(0x11b)][_0x4c3bf0(0x117)][_0x4c3bf0(0x128)]&&!this['layers'][_0x4c3bf0(0x13c)][_0x4c3bf0(0x128)])return _0x4c3bf0(0x130);return _0x4c3bf0(0x121)+_0x9d316c[_0x4c3bf0(0x150)](/_/g,'-');}if(this[_0x4c3bf0(0x11b)][_0x4c3bf0(0x12a)][_0x9d316c]===_0x13650c)return'session';if(this[_0x4c3bf0(0x11b)][_0x4c3bf0(0x11f)][_0x9d316c]===_0x13650c)return _0x4c3bf0(0x11f);if(this[_0x4c3bf0(0x11b)][_0x4c3bf0(0x117)][_0x9d316c]===_0x13650c)return _0x4c3bf0(0x127)+this[_0x4c3bf0(0x12e)];if(this[_0x4c3bf0(0x11b)][_0x4c3bf0(0x13c)][_0x9d316c]===_0x13650c)return'global';return _0x4c3bf0(0x130);}[a35_0x377ad6(0x140)](){const _0x35f292=a35_0x377ad6,_0x2a7c7f=a35_0x1b7621[_0x35f292(0x13a)](getConfigDir(),_0x35f292(0x137));if(!a35_0x346fff[_0x35f292(0x131)](_0x2a7c7f))return{};try{const _0x3bdf25=a35_0x346fff[_0x35f292(0x132)](_0x2a7c7f,_0x35f292(0x116));return JSON['parse'](_0x3bdf25);}catch{return{};}}[a35_0x377ad6(0x133)](_0x4dc782){const _0x148e42=a35_0x377ad6;_0x4dc782[_0x148e42(0x128)]=this['site'],!_0x4dc782[_0x148e42(0x139)]&&this[_0x148e42(0x139)]&&(_0x4dc782[_0x148e42(0x139)]=this[_0x148e42(0x139)]),!_0x4dc782[_0x148e42(0x14c)]&&this['parent_segment']&&(_0x4dc782[_0x148e42(0x14c)]=this[_0x148e42(0x14a)]),!_0x4dc782['segmentPath']&&this['segment_path']&&(_0x4dc782[_0x148e42(0x14d)]=this[_0x148e42(0x12f)]),!_0x4dc782[_0x148e42(0x14b)]&&this['llm_project']&&(_0x4dc782['llmProject']=this[_0x148e42(0x119)]);}[a35_0x377ad6(0x11a)](){const _0x47ff8a=a35_0x377ad6;return[{'key':_0x47ff8a(0x128),'value':this[_0x47ff8a(0x128)]},{'key':'database','value':this[_0x47ff8a(0x139)]},{'key':_0x47ff8a(0x14a),'value':this['parent_segment']},{'key':_0x47ff8a(0x12f),'value':this[_0x47ff8a(0x12f)]},{'key':'llm_project','value':this[_0x47ff8a(0x119)]},{'key':_0x47ff8a(0x117),'value':this[_0x47ff8a(0x12e)]||undefined}];}[a35_0x377ad6(0x14f)](){const _0x3a9455=a35_0x377ad6;console[_0x3a9455(0x141)](_0x3a9455(0x115));for(const {key:_0x14e6de,value:_0xe159f1}of this[_0x3a9455(0x11a)]()){_0xe159f1&&console[_0x3a9455(0x141)](_0x14e6de+':\x20'+_0xe159f1);}}[a35_0x377ad6(0x142)](){const _0x3333f5=a35_0x377ad6;console[_0x3333f5(0x141)](_0x3333f5(0x115));for(const {key:_0x59444f,value:_0x4d1830}of this['getParameters']()){if(_0x4d1830){const _0x3a87f7=_0x59444f===_0x3333f5(0x117)?_0x3333f5(0x14e):'('+this[_0x3333f5(0x135)](_0x59444f,_0x4d1830)+')';console['log'](_0x59444f+':\x20'+_0x4d1830+'\x20'+_0x3a87f7);}}console[_0x3333f5(0x141)](_0x3333f5(0x153));const _0x33e5c7=[{'label':_0x3333f5(0x13d),'path':this[_0x3333f5(0x149)][_0x3333f5(0x12a)],'extra':_0x3333f5(0x125)+this[_0x3333f5(0x124)]+')'},{'label':_0x3333f5(0x11d),'path':this[_0x3333f5(0x149)][_0x3333f5(0x11f)]},{'label':_0x3333f5(0x13e),'path':this[_0x3333f5(0x149)][_0x3333f5(0x117)]},{'label':_0x3333f5(0x152),'path':this[_0x3333f5(0x149)]['profileCredentials']},{'label':_0x3333f5(0x143),'path':this[_0x3333f5(0x149)][_0x3333f5(0x13c)]},{'label':'Global\x20Credentials','path':this[_0x3333f5(0x149)][_0x3333f5(0x123)]}];for(const {label:_0x3c0b9a,path:_0x22b945,extra:_0x55230d}of _0x33e5c7){if(_0x22b945)console[_0x3333f5(0x141)](_0x3c0b9a+':\x20'+_0x22b945+'\x20✓'+(_0x55230d?'\x20'+_0x55230d:''));else{if(_0x3c0b9a===_0x3333f5(0x13d))console[_0x3333f5(0x141)](_0x3c0b9a+':\x20none\x20(using\x20session:\x20'+this['sessionId']+')');else(_0x3c0b9a==='Project'||_0x3c0b9a==='Global')&&console[_0x3333f5(0x141)](_0x3c0b9a+_0x3333f5(0x120));}}}}
|
package/dist/core/profile.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x1fd10e,_0x7be02c){const _0x370b6a=a36_0x2b18,_0x233303=_0x1fd10e();while(!![]){try{const _0x5eff9c=parseInt(_0x370b6a(0x98))/0x1*(parseInt(_0x370b6a(0x8b))/0x2)+parseInt(_0x370b6a(0xcf))/0x3+-parseInt(_0x370b6a(0xb2))/0x4+parseInt(_0x370b6a(0xc7))/0x5*(-parseInt(_0x370b6a(0xa6))/0x6)+parseInt(_0x370b6a(0xcc))/0x7+-parseInt(_0x370b6a(0x93))/0x8*(-parseInt(_0x370b6a(0xc4))/0x9)+parseInt(_0x370b6a(0xa1))/0xa;if(_0x5eff9c===_0x7be02c)break;else _0x233303['push'](_0x233303['shift']());}catch(_0x4f4016){_0x233303['push'](_0x233303['shift']());}}}(a36_0x2197,0x73ea1));import*as a36_0x4f8319 from'node:fs';import*as a36_0x13522c from'node:path';import{getConfigDir}from'./config.js';import{createSecureDirectory,writeSecureFile}from'../utils/file-permissions.js';import{findProjectConfigPath}from'./project-config.js';export function getProfileParams(_0x16fe8e){const _0x17b0f8=a36_0x2b18,_0x2d57df={};if(!_0x16fe8e)return _0x2d57df;for(const [_0xf7e4ff,_0x5c0a71]of Object[_0x17b0f8(0xa4)](_0x16fe8e)){_0xf7e4ff!==_0x17b0f8(0xad)&&_0x5c0a71!==undefined&&(_0x2d57df[_0xf7e4ff]=_0x5c0a71);}return _0x2d57df;}export function getProfilesDir(){const _0x217168=a36_0x2b18;return a36_0x13522c['join'](getConfigDir(),_0x217168(0xb4));}function getProfileDir(_0x3e370c){const _0x38bd0c=a36_0x2b18;return a36_0x13522c[_0x38bd0c(0xbd)](getProfilesDir(),_0x3e370c);}function getProfileConfigPath(_0x1355f4){const _0x5a581c=a36_0x2b18;return a36_0x13522c[_0x5a581c(0xbd)](getProfileDir(_0x1355f4),_0x5a581c(0x8c));}function getProfileEnvPath(_0x4dcf9f){const _0xe7989c=a36_0x2b18;return a36_0x13522c[_0xe7989c(0xbd)](getProfileDir(_0x4dcf9f),_0xe7989c(0xa3));}function getGlobalConfigPath(){const _0x22ccb1=a36_0x2b18;return a36_0x13522c[_0x22ccb1(0xbd)](getConfigDir(),_0x22ccb1(0x8c));}function validateProfileName(_0x5a9cdd){const _0x1b1ce2=a36_0x2b18;if(!/^[a-zA-Z0-9_-]+$/[_0x1b1ce2(0xa5)](_0x5a9cdd))throw new Error(_0x1b1ce2(0xd2)+_0x5a9cdd+_0x1b1ce2(0x9c));}function validateProfileConfig(_0x36f996,_0x41c7d2){const _0x242735=a36_0x2b18;if(typeof _0x36f996!==_0x242735(0x88)||_0x36f996===null)throw new Error(_0x242735(0xd0)+_0x41c7d2+_0x242735(0x97));const _0x17f27b=[_0x242735(0xad),'site','database','parent_segment',_0x242735(0x9e),'llm_agent'],_0x240b5e=_0x36f996;for(const _0xca30d6 of Object['keys'](_0x240b5e)){!_0x17f27b[_0x242735(0xa0)](_0xca30d6)&&console[_0x242735(0xbe)]('Warning:\x20Profile\x20\x27'+_0x41c7d2+_0x242735(0xa2)+_0xca30d6+_0x242735(0xc1));}if(_0x240b5e['description']!==undefined&&typeof _0x240b5e[_0x242735(0xad)]!==_0x242735(0xa9))throw new Error(_0x242735(0xd0)+_0x41c7d2+_0x242735(0x91));if(_0x240b5e[_0x242735(0xbb)]!==undefined&&typeof _0x240b5e[_0x242735(0xbb)]!==_0x242735(0xa9))throw new Error(_0x242735(0xd0)+_0x41c7d2+_0x242735(0x99));if(_0x240b5e[_0x242735(0xa7)]!==undefined&&typeof _0x240b5e['database']!==_0x242735(0xa9))throw new Error(_0x242735(0xd0)+_0x41c7d2+_0x242735(0x92));if(_0x240b5e[_0x242735(0x87)]!==undefined&&typeof _0x240b5e['parent_segment']!==_0x242735(0xa9))throw new Error(_0x242735(0xd0)+_0x41c7d2+_0x242735(0xb1));if(_0x240b5e[_0x242735(0x9e)]!==undefined&&typeof _0x240b5e[_0x242735(0x9e)]!=='string')throw new Error('Profile\x20\x27'+_0x41c7d2+'\x27:\x20\x27llm_project\x27\x20must\x20be\x20a\x20string');if(_0x240b5e['llm_agent']!==undefined&&typeof _0x240b5e['llm_agent']!==_0x242735(0xa9))throw new Error(_0x242735(0xd0)+_0x41c7d2+_0x242735(0x90));return!![];}function loadProfilesFromTdxJson(_0x57ad3c,_0x3ada0b){const _0x5d4143=a36_0x2b18;if(!a36_0x4f8319['existsSync'](_0x57ad3c))return[];try{const _0x1147b5=a36_0x4f8319[_0x5d4143(0x96)](_0x57ad3c,'utf-8'),_0x2b2b4f=JSON['parse'](_0x1147b5);if(!_0x2b2b4f['profiles']||typeof _0x2b2b4f['profiles']!=='object')return[];const _0x1591fa=[];for(const [_0xf48e5,_0x55c7d0]of Object['entries'](_0x2b2b4f[_0x5d4143(0xb4)])){try{validateProfileConfig(_0x55c7d0,_0xf48e5);const _0x122896=getNewCredentialPath(_0xf48e5),_0x327c33=getOldCredentialPath(_0xf48e5),_0xe26a6d=a36_0x4f8319[_0x5d4143(0xc2)](_0x122896)||a36_0x4f8319[_0x5d4143(0xc2)](_0x327c33);_0x1591fa[_0x5d4143(0xc0)]({'name':_0xf48e5,'config':_0x55c7d0,'metadata':{'name':_0xf48e5,'createdAt':new Date()[_0x5d4143(0xaf)]()},'hasCredentials':_0xe26a6d,'scope':_0x3ada0b});}catch(_0x2e8892){_0x2e8892 instanceof Error&&(console[_0x5d4143(0xbe)](_0x5d4143(0x8d)+_0x57ad3c+':'),console[_0x5d4143(0xbe)]('\x20\x20'+_0x2e8892['message']+'\x0a'));}}return _0x1591fa;}catch(_0x28e1b8){return _0x28e1b8 instanceof SyntaxError?(console[_0x5d4143(0xbe)](_0x5d4143(0xcd)+_0x57ad3c+_0x5d4143(0xce)),console[_0x5d4143(0xbe)](_0x5d4143(0x9f)+_0x28e1b8[_0x5d4143(0x9a)]+'\x0a')):console[_0x5d4143(0xbe)](_0x5d4143(0xc8)+_0x57ad3c+':\x20'+_0x28e1b8+'\x0a'),[];}}function a36_0x2b18(_0x26211f,_0x1afdb4){const _0x2197b4=a36_0x2197();return a36_0x2b18=function(_0x2b186f,_0x1d55a8){_0x2b186f=_0x2b186f-0x83;let _0x4b4626=_0x2197b4[_0x2b186f];return _0x4b4626;},a36_0x2b18(_0x26211f,_0x1afdb4);}export function getNewCredentialPath(_0x50022d){const _0x5e2703=a36_0x2b18;return a36_0x13522c['join'](getConfigDir(),_0x5e2703(0xb7)+_0x50022d);}function getOldCredentialPath(_0x5a8518){const _0x28e5ca=a36_0x2b18;return a36_0x13522c['join'](getProfilesDir(),_0x5a8518,_0x28e5ca(0xa3));}function loadProfilesFromTdxJsonFiles(){const _0x473a53=a36_0x2b18,_0x2db69e=[],_0x51e406=findProjectConfigPath();_0x51e406&&_0x2db69e[_0x473a53(0xc0)](...loadProfilesFromTdxJson(_0x51e406,'local'));const _0x2a3c4e=a36_0x13522c[_0x473a53(0xbd)](getConfigDir(),_0x473a53(0x8c));return _0x2db69e[_0x473a53(0xc0)](...loadProfilesFromTdxJson(_0x2a3c4e,_0x473a53(0xc9))),_0x2db69e;}function loadProfilesFromDirectories(){const _0xd9e3d2=a36_0x2b18,_0x2d189a=getProfilesDir();if(!a36_0x4f8319[_0xd9e3d2(0xc2)](_0x2d189a))return[];try{return a36_0x4f8319[_0xd9e3d2(0xae)](_0x2d189a,{'withFileTypes':!![]})[_0xd9e3d2(0xa8)](_0x18d2ce=>_0x18d2ce[_0xd9e3d2(0xb5)]())[_0xd9e3d2(0x84)](_0x4e0880=>_0x4e0880[_0xd9e3d2(0x89)])[_0xd9e3d2(0xa8)](_0x4a6bb0=>{const _0x3bbcbf=_0xd9e3d2,_0x5b79cd=getProfileConfigPath(_0x4a6bb0),_0x2e6eb6=getProfileEnvPath(_0x4a6bb0);return a36_0x4f8319[_0x3bbcbf(0xc2)](_0x5b79cd)||a36_0x4f8319['existsSync'](_0x2e6eb6);})[_0xd9e3d2(0x84)](_0x32c8dd=>{const _0x14633f=_0xd9e3d2,_0x18c11b=loadProfileFromDirectory(_0x32c8dd);if(_0x18c11b)return{..._0x18c11b,'scope':_0x14633f(0xb9)};return null;})[_0xd9e3d2(0xa8)](_0x451023=>_0x451023!==null);}catch{return[];}}function loadProfileFromDirectory(_0x14ccc3){const _0x49ea2a=a36_0x2b18,_0x75528b=getProfileConfigPath(_0x14ccc3),_0x35370c=getOldCredentialPath(_0x14ccc3);if(!a36_0x4f8319[_0x49ea2a(0xc2)](_0x75528b)&&!a36_0x4f8319[_0x49ea2a(0xc2)](_0x35370c))return null;let _0x481bc7={},_0x3505ae={'name':_0x14ccc3,'createdAt':new Date()['toISOString']()};if(a36_0x4f8319[_0x49ea2a(0xc2)](_0x75528b))try{const _0xc1ae75=a36_0x4f8319[_0x49ea2a(0x96)](_0x75528b,'utf-8'),_0x12285d=JSON['parse'](_0xc1ae75),{metadata:_0x1bf315,..._0x465773}=_0x12285d;_0x481bc7=_0x465773,_0x1bf315&&(_0x3505ae=_0x1bf315);}catch{}return{'name':_0x14ccc3,'config':_0x481bc7,'metadata':_0x3505ae,'hasCredentials':a36_0x4f8319[_0x49ea2a(0xc2)](_0x35370c),'scope':_0x49ea2a(0xb9)};}export function listProfiles(){const _0x382bec=a36_0x2b18,_0x3e893a=loadProfilesFromTdxJsonFiles(),_0x10b4e2=loadProfilesFromDirectories();if(_0x10b4e2[_0x382bec(0xcb)]>0x0){const _0x5380e5=_0x10b4e2['map'](_0x4251f1=>_0x4251f1[_0x382bec(0x89)])[_0x382bec(0xbd)](',\x20'),_0x377000=getConfigDir();console['warn'](_0x382bec(0xb3)+_0x5380e5),console[_0x382bec(0xbe)]('Please\x20migrate\x20to\x20~/.config/tdx/tdx.json:'),console['warn'](_0x382bec(0x86)+a36_0x13522c[_0x382bec(0xbd)](_0x377000,_0x382bec(0x8c))),console['warn'](_0x382bec(0xd1)),console[_0x382bec(0xbe)](_0x382bec(0xc5));}const _0x1f2171=[..._0x3e893a,..._0x10b4e2],_0x17649b=new Map();for(const _0x17a8f2 of _0x1f2171){!_0x17649b[_0x382bec(0x95)](_0x17a8f2[_0x382bec(0x89)])&&_0x17649b['set'](_0x17a8f2[_0x382bec(0x89)],_0x17a8f2);}return Array['from'](_0x17649b[_0x382bec(0x9d)]())[_0x382bec(0xbf)]((_0x5f57e1,_0x2f307a)=>_0x5f57e1[_0x382bec(0x89)][_0x382bec(0xbc)](_0x2f307a[_0x382bec(0x89)]));}function a36_0x2197(){const _0x460301=['131MGjTsz','\x27:\x20\x27site\x27\x20must\x20be\x20a\x20string','message','Then\x20define\x20profiles\x20in\x20~/.config/tdx/tdx.json\x0a','.\x20Must\x20contain\x20only\x20alphanumeric\x20characters,\x20dash,\x20and\x20underscore.','values','llm_project','Error:\x20','includes','3677090wkzYii','\x27:\x20unknown\x20config\x20key\x20\x27','.env','entries','test','131610UdhRhb','database','filter','string','\x22\x20\x22','stringify','TD_API_KEY','description','readdirSync','toISOString','utf-8','\x27:\x20\x27parent_segment\x27\x20must\x20be\x20a\x20string','411024HMGqMF','\x0aWarning:\x20Profiles\x20in\x20directories\x20are\x20deprecated:\x20','profiles','isDirectory','rmSync','.env.','writeFileSync','directory','\x20does\x20not\x20exist','site','localeCompare','join','warn','sort','push','\x27\x20will\x20be\x20ignored','existsSync','\x20\x20mv\x20\x22','567NUdSZl','\x20\x203.\x20Move\x20credentials:\x20mv\x20~/.config/tdx/profiles/<name>/.env\x20~/.config/tdx/.env.<name>\x0a','apiKey','205fzPlag','\x0aWarning:\x20Failed\x20to\x20load\x20profiles\x20from\x20','user','api_key','length','1738688cgYpsb','\x0aWarning:\x20Failed\x20to\x20parse\x20',':\x20Invalid\x20JSON\x20syntax','38106nsVxnH','Profile\x20\x27','\x20\x202.\x20Add\x20profiles\x20under\x20a\x20\x22profiles\x22\x20key\x20(see\x20\x27tdx\x20profiles\x27\x20for\x20current\x20config)','Invalid\x20profile\x20name:\x20','find','map','Profile\x20','\x20\x201.\x20Edit:\x20','parent_segment','object','name','metadata','6290JyDeNl','tdx.json','\x0aWarning:\x20Skipping\x20invalid\x20profile\x20in\x20','To\x20migrate:','profile','\x27:\x20\x27llm_agent\x27\x20must\x20be\x20a\x20string','\x27:\x20\x27description\x27\x20must\x20be\x20a\x20string','\x27:\x20\x27database\x27\x20must\x20be\x20a\x20string','55376sgPakU','API\x20keys\x20must\x20not\x20be\x20stored\x20in\x20profile\x20configuration.\x20Use\x20.env\x20file\x20instead.','has','readFileSync','\x27:\x20config\x20must\x20be\x20an\x20object'];a36_0x2197=function(){return _0x460301;};return a36_0x2197();}export function profileExists(_0xcca252){const _0x538c12=listProfiles();return _0x538c12['some'](_0x2b96cd=>_0x2b96cd['name']===_0xcca252);}export function loadProfile(_0xcc1c82){const _0x4f0bc5=a36_0x2b18;validateProfileName(_0xcc1c82);const _0x441a2b=listProfiles(),_0x11f3a4=_0x441a2b[_0x4f0bc5(0x83)](_0xc19b73=>_0xc19b73[_0x4f0bc5(0x89)]===_0xcc1c82);return _0x11f3a4||null;}export function saveProfile(_0x5740dc,_0x1a488f,_0x2618f2=![]){const _0xdc5656=a36_0x2b18;validateProfileName(_0x5740dc);const _0x2e063d=getProfileDir(_0x5740dc),_0x5e3a5e=getProfileConfigPath(_0x5740dc);createSecureDirectory(_0x2e063d);let _0x547312;const _0x2ebcf2=loadProfile(_0x5740dc);_0x2ebcf2?(_0x547312=_0x2ebcf2[_0xdc5656(0x8a)],_0x2618f2&&(_0x547312['lastUsed']=new Date()[_0xdc5656(0xaf)]())):_0x547312={'name':_0x5740dc,'createdAt':new Date()[_0xdc5656(0xaf)]()};const _0x3305a7=JSON['stringify'](_0x1a488f);if(_0x3305a7[_0xdc5656(0xa0)](_0xdc5656(0xac))||_0x3305a7[_0xdc5656(0xa0)](_0xdc5656(0xc6))||_0x3305a7['includes'](_0xdc5656(0xca)))throw new Error(_0xdc5656(0x94));const _0x403347={..._0x1a488f,'metadata':_0x547312};a36_0x4f8319[_0xdc5656(0xb8)](_0x5e3a5e,JSON[_0xdc5656(0xab)](_0x403347,null,0x2));}export function deleteProfile(_0x498d0f){const _0x13a3e3=a36_0x2b18;validateProfileName(_0x498d0f);const _0x34ec53=getProfileDir(_0x498d0f);if(!a36_0x4f8319['existsSync'](_0x34ec53))throw new Error(_0x13a3e3(0x85)+_0x498d0f+_0x13a3e3(0xba));a36_0x4f8319[_0x13a3e3(0xb6)](_0x34ec53,{'recursive':!![],'force':!![]});}export function getActiveProfile(){const _0x394668=a36_0x2b18,_0x271891=getGlobalConfigPath();if(!a36_0x4f8319[_0x394668(0xc2)](_0x271891))return null;try{const _0x4f4829=a36_0x4f8319[_0x394668(0x96)](_0x271891,'utf-8'),_0x4e2626=JSON['parse'](_0x4f4829);return _0x4e2626[_0x394668(0x8f)]||null;}catch{return null;}}export function createProfile(_0x28ae8b,_0x475218){const _0x510450=a36_0x2b18;validateProfileName(_0x28ae8b);if(profileExists(_0x28ae8b))throw new Error(_0x510450(0x85)+_0x28ae8b+'\x20already\x20exists');saveProfile(_0x28ae8b,_0x475218);}export function saveProfileCredentials(_0x340279,_0x8df804){const _0x156ea2=a36_0x2b18;validateProfileName(_0x340279);if(!profileExists(_0x340279))throw new Error(_0x156ea2(0x85)+_0x340279+'\x20does\x20not\x20exist');const _0x1422c3=getNewCredentialPath(_0x340279);writeSecureFile(_0x1422c3,_0x8df804);}export function loadProfileCredentials(_0x35e511){const _0xc6273d=a36_0x2b18;validateProfileName(_0x35e511);const _0x30f2c8=getNewCredentialPath(_0x35e511);if(a36_0x4f8319[_0xc6273d(0xc2)](_0x30f2c8))try{return a36_0x4f8319['readFileSync'](_0x30f2c8,_0xc6273d(0xb0));}catch{}const _0x2f1f94=getOldCredentialPath(_0x35e511);if(a36_0x4f8319['existsSync'](_0x2f1f94)){console[_0xc6273d(0xbe)]('\x0aWarning:\x20Using\x20deprecated\x20credential\x20location\x20for\x20profile\x20\x27'+_0x35e511+'\x27'),console[_0xc6273d(0xbe)](_0xc6273d(0x8e)),console[_0xc6273d(0xbe)](_0xc6273d(0xc3)+_0x2f1f94+_0xc6273d(0xaa)+_0x30f2c8+'\x22'),console['warn'](_0xc6273d(0x9b));try{return a36_0x4f8319[_0xc6273d(0x96)](_0x2f1f94,_0xc6273d(0xb0));}catch{return null;}}return null;}
|
|
1
|
+
(function(_0x42da6f,_0x51c596){const _0x5240eb=a36_0x2e78,_0x44b791=_0x42da6f();while(!![]){try{const _0x515774=parseInt(_0x5240eb(0xa6))/0x1*(-parseInt(_0x5240eb(0x8e))/0x2)+-parseInt(_0x5240eb(0x93))/0x3+-parseInt(_0x5240eb(0xb5))/0x4+parseInt(_0x5240eb(0x85))/0x5*(-parseInt(_0x5240eb(0x9d))/0x6)+-parseInt(_0x5240eb(0xad))/0x7*(parseInt(_0x5240eb(0x8f))/0x8)+parseInt(_0x5240eb(0x84))/0x9*(-parseInt(_0x5240eb(0xac))/0xa)+parseInt(_0x5240eb(0x7c))/0xb;if(_0x515774===_0x51c596)break;else _0x44b791['push'](_0x44b791['shift']());}catch(_0x31088d){_0x44b791['push'](_0x44b791['shift']());}}}(a36_0x421a,0x86ffa));import*as a36_0x4c68fa from'node:fs';import*as a36_0x1ebd63 from'node:path';import{getConfigDir}from'./config.js';import{createSecureDirectory,writeSecureFile}from'../utils/file-permissions.js';import{findProjectConfigPath}from'./project-config.js';export function getProfileParams(_0x31ba8f){const _0xfadeeb=a36_0x2e78,_0x4e38c2={};if(!_0x31ba8f)return _0x4e38c2;for(const [_0x45c148,_0x3760ec]of Object['entries'](_0x31ba8f)){_0x45c148!==_0xfadeeb(0xb9)&&_0x3760ec!==undefined&&(_0x4e38c2[_0x45c148]=_0x3760ec);}return _0x4e38c2;}export function getProfilesDir(){const _0x58176d=a36_0x2e78;return a36_0x1ebd63['join'](getConfigDir(),_0x58176d(0x8a));}function a36_0x2e78(_0x49a08f,_0x2a964b){const _0x421a14=a36_0x421a();return a36_0x2e78=function(_0x2e78b0,_0x1fa8ed){_0x2e78b0=_0x2e78b0-0x78;let _0x32a87e=_0x421a14[_0x2e78b0];return _0x32a87e;},a36_0x2e78(_0x49a08f,_0x2a964b);}function getProfileDir(_0x2a316f){return a36_0x1ebd63['join'](getProfilesDir(),_0x2a316f);}function getProfileConfigPath(_0x3f03db){const _0x39bcb7=a36_0x2e78;return a36_0x1ebd63[_0x39bcb7(0x78)](getProfileDir(_0x3f03db),_0x39bcb7(0xba));}function getProfileEnvPath(_0x367711){const _0x55d9e6=a36_0x2e78;return a36_0x1ebd63['join'](getProfileDir(_0x367711),_0x55d9e6(0x8b));}function getGlobalConfigPath(){return a36_0x1ebd63['join'](getConfigDir(),'tdx.json');}function validateProfileName(_0x2f5bde){const _0x5543f0=a36_0x2e78;if(!/^[a-zA-Z0-9_-]+$/[_0x5543f0(0xb7)](_0x2f5bde))throw new Error(_0x5543f0(0x91)+_0x2f5bde+_0x5543f0(0xb8));}function validateProfileConfig(_0x48e851,_0x29e176){const _0xd07c20=a36_0x2e78;if(typeof _0x48e851!==_0xd07c20(0x95)||_0x48e851===null)throw new Error(_0xd07c20(0xc2)+_0x29e176+_0xd07c20(0x86));const _0x24ba08=[_0xd07c20(0xb9),'site',_0xd07c20(0xb0),_0xd07c20(0x90),_0xd07c20(0xa9),_0xd07c20(0x9c)],_0x19737b=_0x48e851;for(const _0x372fe2 of Object[_0xd07c20(0xbd)](_0x19737b)){!_0x24ba08[_0xd07c20(0xa8)](_0x372fe2)&&console[_0xd07c20(0xc1)](_0xd07c20(0xaa)+_0x29e176+_0xd07c20(0xb6)+_0x372fe2+_0xd07c20(0x80));}if(_0x19737b[_0xd07c20(0xb9)]!==undefined&&typeof _0x19737b[_0xd07c20(0xb9)]!==_0xd07c20(0xbc))throw new Error(_0xd07c20(0xc2)+_0x29e176+'\x27:\x20\x27description\x27\x20must\x20be\x20a\x20string');if(_0x19737b['site']!==undefined&&typeof _0x19737b[_0xd07c20(0xb4)]!=='string')throw new Error(_0xd07c20(0xc2)+_0x29e176+_0xd07c20(0x81));if(_0x19737b['database']!==undefined&&typeof _0x19737b[_0xd07c20(0xb0)]!==_0xd07c20(0xbc))throw new Error(_0xd07c20(0xc2)+_0x29e176+'\x27:\x20\x27database\x27\x20must\x20be\x20a\x20string');if(_0x19737b[_0xd07c20(0x90)]!==undefined&&typeof _0x19737b['parent_segment']!==_0xd07c20(0xbc))throw new Error(_0xd07c20(0xc2)+_0x29e176+'\x27:\x20\x27parent_segment\x27\x20must\x20be\x20a\x20string');if(_0x19737b[_0xd07c20(0xa9)]!==undefined&&typeof _0x19737b[_0xd07c20(0xa9)]!=='string')throw new Error(_0xd07c20(0xc2)+_0x29e176+'\x27:\x20\x27llm_project\x27\x20must\x20be\x20a\x20string');if(_0x19737b['llm_agent']!==undefined&&typeof _0x19737b[_0xd07c20(0x9c)]!==_0xd07c20(0xbc))throw new Error(_0xd07c20(0xc2)+_0x29e176+_0xd07c20(0x88));return!![];}function loadProfilesFromTdxJson(_0x5e62d4,_0x1b66d5){const _0x5c8459=a36_0x2e78;if(!a36_0x4c68fa[_0x5c8459(0x7e)](_0x5e62d4))return[];try{const _0x1277b8=a36_0x4c68fa['readFileSync'](_0x5e62d4,_0x5c8459(0x9e)),_0x203a77=JSON['parse'](_0x1277b8);if(!_0x203a77[_0x5c8459(0x8a)]||typeof _0x203a77['profiles']!=='object')return[];const _0xa16f47=[];for(const [_0x767e81,_0x4d2174]of Object[_0x5c8459(0x9a)](_0x203a77[_0x5c8459(0x8a)])){try{validateProfileConfig(_0x4d2174,_0x767e81);const _0x42c16f=getNewCredentialPath(_0x767e81),_0x22e1b2=getOldCredentialPath(_0x767e81),_0x51654d=a36_0x4c68fa['existsSync'](_0x42c16f)||a36_0x4c68fa['existsSync'](_0x22e1b2);_0xa16f47[_0x5c8459(0xaf)]({'name':_0x767e81,'config':_0x4d2174,'metadata':{'name':_0x767e81,'createdAt':new Date()[_0x5c8459(0x9f)]()},'hasCredentials':_0x51654d,'scope':_0x1b66d5});}catch(_0x525da6){_0x525da6 instanceof Error&&(console[_0x5c8459(0xc1)](_0x5c8459(0xa2)+_0x5e62d4+':'),console[_0x5c8459(0xc1)]('\x20\x20'+_0x525da6[_0x5c8459(0x7b)]+'\x0a'));}}return _0xa16f47;}catch(_0x4fa570){return _0x4fa570 instanceof SyntaxError?(console[_0x5c8459(0xc1)]('\x0aWarning:\x20Failed\x20to\x20parse\x20'+_0x5e62d4+_0x5c8459(0xc0)),console['warn']('Error:\x20'+_0x4fa570['message']+'\x0a')):console[_0x5c8459(0xc1)]('\x0aWarning:\x20Failed\x20to\x20load\x20profiles\x20from\x20'+_0x5e62d4+':\x20'+_0x4fa570+'\x0a'),[];}}export function getNewCredentialPath(_0x2d606c){const _0x256044=a36_0x2e78;return a36_0x1ebd63[_0x256044(0x78)](getConfigDir(),'.env.'+_0x2d606c);}function getOldCredentialPath(_0x3ff0cd){const _0xba8a09=a36_0x2e78;return a36_0x1ebd63['join'](getProfilesDir(),_0x3ff0cd,_0xba8a09(0x8b));}function loadProfilesFromTdxJsonFiles(){const _0x384b45=a36_0x2e78,_0x45e335=[],_0x35109b=findProjectConfigPath();_0x35109b&&_0x45e335[_0x384b45(0xaf)](...loadProfilesFromTdxJson(_0x35109b,_0x384b45(0x79)));const _0x3e39ae=a36_0x1ebd63[_0x384b45(0x78)](getConfigDir(),_0x384b45(0xba));return _0x45e335[_0x384b45(0xaf)](...loadProfilesFromTdxJson(_0x3e39ae,'user')),_0x45e335;}function loadProfilesFromDirectories(){const _0x1efbc5=a36_0x2e78,_0xf05bbf=getProfilesDir();if(!a36_0x4c68fa[_0x1efbc5(0x7e)](_0xf05bbf))return[];try{return a36_0x4c68fa['readdirSync'](_0xf05bbf,{'withFileTypes':!![]})['filter'](_0x3bb9bc=>_0x3bb9bc[_0x1efbc5(0x82)]())[_0x1efbc5(0xa5)](_0x41b714=>_0x41b714[_0x1efbc5(0xa0)])[_0x1efbc5(0xb3)](_0x15fd4d=>{const _0x17d127=_0x1efbc5,_0x3dc4ee=getProfileConfigPath(_0x15fd4d),_0x525b34=getProfileEnvPath(_0x15fd4d);return a36_0x4c68fa[_0x17d127(0x7e)](_0x3dc4ee)||a36_0x4c68fa[_0x17d127(0x7e)](_0x525b34);})[_0x1efbc5(0xa5)](_0x24e485=>{const _0x2e8acd=_0x1efbc5,_0x368edd=loadProfileFromDirectory(_0x24e485);if(_0x368edd)return{..._0x368edd,'scope':_0x2e8acd(0x7f)};return null;})[_0x1efbc5(0xb3)](_0x443503=>_0x443503!==null);}catch{return[];}}function loadProfileFromDirectory(_0x50814e){const _0x174fd2=a36_0x2e78,_0x1df763=getProfileConfigPath(_0x50814e),_0x3dfcb5=getOldCredentialPath(_0x50814e);if(!a36_0x4c68fa[_0x174fd2(0x7e)](_0x1df763)&&!a36_0x4c68fa['existsSync'](_0x3dfcb5))return null;let _0x436b61={},_0xe98faa={'name':_0x50814e,'createdAt':new Date()['toISOString']()};if(a36_0x4c68fa[_0x174fd2(0x7e)](_0x1df763))try{const _0x8affad=a36_0x4c68fa[_0x174fd2(0x87)](_0x1df763,_0x174fd2(0x9e)),_0x469d18=JSON['parse'](_0x8affad),{metadata:_0x2b7b3e,..._0x1447b0}=_0x469d18;_0x436b61=_0x1447b0,_0x2b7b3e&&(_0xe98faa=_0x2b7b3e);}catch{}return{'name':_0x50814e,'config':_0x436b61,'metadata':_0xe98faa,'hasCredentials':a36_0x4c68fa[_0x174fd2(0x7e)](_0x3dfcb5),'scope':_0x174fd2(0x7f)};}export function listProfiles(){const _0x472801=a36_0x2e78,_0x52d681=loadProfilesFromTdxJsonFiles(),_0x5953c2=loadProfilesFromDirectories();if(_0x5953c2[_0x472801(0x98)]>0x0){const _0x4e1735=_0x5953c2[_0x472801(0xa5)](_0x10e16d=>_0x10e16d['name'])[_0x472801(0x78)](',\x20'),_0x1d92ff=getConfigDir();console[_0x472801(0xc1)]('\x0aWarning:\x20Profiles\x20in\x20directories\x20are\x20deprecated:\x20'+_0x4e1735),console['warn']('Please\x20migrate\x20to\x20~/.config/tdx/tdx.json:'),console[_0x472801(0xc1)](_0x472801(0x9b)+a36_0x1ebd63[_0x472801(0x78)](_0x1d92ff,_0x472801(0xba))),console['warn'](_0x472801(0x7a)),console[_0x472801(0xc1)](_0x472801(0xbb));}const _0x2aaf03=[..._0x52d681,..._0x5953c2],_0x3e6bd5=new Map();for(const _0x287652 of _0x2aaf03){!_0x3e6bd5['has'](_0x287652[_0x472801(0xa0)])&&_0x3e6bd5[_0x472801(0xa4)](_0x287652[_0x472801(0xa0)],_0x287652);}return Array['from'](_0x3e6bd5['values']())[_0x472801(0xbe)]((_0x1b4f8f,_0x57c421)=>_0x1b4f8f['name'][_0x472801(0xb2)](_0x57c421[_0x472801(0xa0)]));}export function profileExists(_0x14ff79){const _0x1a5ea4=a36_0x2e78,_0x30c864=listProfiles();return _0x30c864['some'](_0x1b6cb8=>_0x1b6cb8[_0x1a5ea4(0xa0)]===_0x14ff79);}export function loadProfile(_0x596b9a){const _0x3083f8=a36_0x2e78;validateProfileName(_0x596b9a);const _0x3d2940=listProfiles(),_0xa7b590=_0x3d2940[_0x3083f8(0x83)](_0x560919=>_0x560919['name']===_0x596b9a);return _0xa7b590||null;}function a36_0x421a(){const _0x41a011=['\x20\x20mv\x20\x22','profiles','.env','metadata','\x20already\x20exists','32ZJsQfu','8yMZaAX','parent_segment','Invalid\x20profile\x20name:\x20','TD_API_KEY','1133628acjtjn','Profile\x20','object','\x20does\x20not\x20exist','rmSync','length','parse','entries','\x20\x201.\x20Edit:\x20','llm_agent','48IOKYsm','utf-8','toISOString','name','Then\x20define\x20profiles\x20in\x20~/.config/tdx/tdx.json\x0a','\x0aWarning:\x20Skipping\x20invalid\x20profile\x20in\x20','profile','set','map','3024Thucnm','\x22\x20\x22','includes','llm_project','Warning:\x20Profile\x20\x27','api_key','41740MafXGz','796719pSbItu','lastUsed','push','database','stringify','localeCompare','filter','site','835752ZsWTdP','\x27:\x20unknown\x20config\x20key\x20\x27','test','.\x20Must\x20contain\x20only\x20alphanumeric\x20characters,\x20dash,\x20and\x20underscore.','description','tdx.json','\x20\x203.\x20Move\x20credentials:\x20mv\x20~/.config/tdx/profiles/<name>/.env\x20~/.config/tdx/.env.<name>\x0a','string','keys','sort','\x0aWarning:\x20Using\x20deprecated\x20credential\x20location\x20for\x20profile\x20\x27',':\x20Invalid\x20JSON\x20syntax','warn','Profile\x20\x27','join','local','\x20\x202.\x20Add\x20profiles\x20under\x20a\x20\x22profiles\x22\x20key\x20(see\x20\x27tdx\x20profiles\x27\x20for\x20current\x20config)','message','24744379oQJSNi','apiKey','existsSync','directory','\x27\x20will\x20be\x20ignored','\x27:\x20\x27site\x27\x20must\x20be\x20a\x20string','isDirectory','find','1548yYVAEp','143495opJQRr','\x27:\x20config\x20must\x20be\x20an\x20object','readFileSync','\x27:\x20\x27llm_agent\x27\x20must\x20be\x20a\x20string'];a36_0x421a=function(){return _0x41a011;};return a36_0x421a();}export function saveProfile(_0x353700,_0x5329da,_0xbd0431=![]){const _0x1db342=a36_0x2e78;validateProfileName(_0x353700);const _0x4c7074=getProfileDir(_0x353700),_0x20d83a=getProfileConfigPath(_0x353700);createSecureDirectory(_0x4c7074);let _0x7eb811;const _0xde51d3=loadProfile(_0x353700);_0xde51d3?(_0x7eb811=_0xde51d3[_0x1db342(0x8c)],_0xbd0431&&(_0x7eb811[_0x1db342(0xae)]=new Date()[_0x1db342(0x9f)]())):_0x7eb811={'name':_0x353700,'createdAt':new Date()[_0x1db342(0x9f)]()};const _0x2447c6=JSON[_0x1db342(0xb1)](_0x5329da);if(_0x2447c6['includes'](_0x1db342(0x92))||_0x2447c6[_0x1db342(0xa8)](_0x1db342(0x7d))||_0x2447c6['includes'](_0x1db342(0xab)))throw new Error('API\x20keys\x20must\x20not\x20be\x20stored\x20in\x20profile\x20configuration.\x20Use\x20.env\x20file\x20instead.');const _0x369c23={..._0x5329da,'metadata':_0x7eb811};a36_0x4c68fa['writeFileSync'](_0x20d83a,JSON['stringify'](_0x369c23,null,0x2));}export function deleteProfile(_0x3f8910){const _0x241f29=a36_0x2e78;validateProfileName(_0x3f8910);const _0x162f41=getProfileDir(_0x3f8910);if(!a36_0x4c68fa[_0x241f29(0x7e)](_0x162f41))throw new Error('Profile\x20'+_0x3f8910+_0x241f29(0x96));a36_0x4c68fa[_0x241f29(0x97)](_0x162f41,{'recursive':!![],'force':!![]});}export function getActiveProfile(){const _0x431728=a36_0x2e78,_0x325555=getGlobalConfigPath();if(!a36_0x4c68fa[_0x431728(0x7e)](_0x325555))return null;try{const _0x3d2d32=a36_0x4c68fa[_0x431728(0x87)](_0x325555,_0x431728(0x9e)),_0x6e3ef9=JSON[_0x431728(0x99)](_0x3d2d32);return _0x6e3ef9[_0x431728(0xa3)]||null;}catch{return null;}}export function createProfile(_0x4699c9,_0x5a8094){const _0x5e003e=a36_0x2e78;validateProfileName(_0x4699c9);if(profileExists(_0x4699c9))throw new Error(_0x5e003e(0x94)+_0x4699c9+_0x5e003e(0x8d));saveProfile(_0x4699c9,_0x5a8094);}export function saveProfileCredentials(_0x4b26e9,_0x1623d3){const _0x548373=a36_0x2e78;validateProfileName(_0x4b26e9);if(!profileExists(_0x4b26e9))throw new Error(_0x548373(0x94)+_0x4b26e9+_0x548373(0x96));const _0x5c4d60=getNewCredentialPath(_0x4b26e9);writeSecureFile(_0x5c4d60,_0x1623d3);}export function loadProfileCredentials(_0x5b2709){const _0xf3e52e=a36_0x2e78;validateProfileName(_0x5b2709);const _0xfbfd8c=getNewCredentialPath(_0x5b2709);if(a36_0x4c68fa[_0xf3e52e(0x7e)](_0xfbfd8c))try{return a36_0x4c68fa[_0xf3e52e(0x87)](_0xfbfd8c,_0xf3e52e(0x9e));}catch{}const _0x15b2b4=getOldCredentialPath(_0x5b2709);if(a36_0x4c68fa[_0xf3e52e(0x7e)](_0x15b2b4)){console['warn'](_0xf3e52e(0xbf)+_0x5b2709+'\x27'),console[_0xf3e52e(0xc1)]('To\x20migrate:'),console[_0xf3e52e(0xc1)](_0xf3e52e(0x89)+_0x15b2b4+_0xf3e52e(0xa7)+_0xfbfd8c+'\x22'),console[_0xf3e52e(0xc1)](_0xf3e52e(0xa1));try{return a36_0x4c68fa[_0xf3e52e(0x87)](_0x15b2b4,'utf-8');}catch{return null;}}return null;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a37_0x5c2b4c=a37_0x2543;(function(_0x1051b9,_0x260749){const _0x4920d9=a37_0x2543,_0x1320cc=_0x1051b9();while(!![]){try{const _0x2cea54=parseInt(_0x4920d9(0x13e))/0x1+parseInt(_0x4920d9(0x13c))/0x2+-parseInt(_0x4920d9(0x14b))/0x3+parseInt(_0x4920d9(0x154))/0x4+parseInt(_0x4920d9(0x145))/0x5*(-parseInt(_0x4920d9(0x155))/0x6)+-parseInt(_0x4920d9(0x151))/0x7*(-parseInt(_0x4920d9(0x146))/0x8)+parseInt(_0x4920d9(0x153))/0x9*(-parseInt(_0x4920d9(0x13f))/0xa);if(_0x2cea54===_0x260749)break;else _0x1320cc['push'](_0x1320cc['shift']());}catch(_0x2ef812){_0x1320cc['push'](_0x1320cc['shift']());}}}(a37_0x545e,0x366f1));import*as a37_0x53d58e from'node:fs';import*as a37_0x2c442b from'node:path';const PROJECT_CONFIG_FILENAME=a37_0x5c2b4c(0x13a);function a37_0x2543(_0x496fae,_0x43d100){const _0x545e32=a37_0x545e();return a37_0x2543=function(_0x25437c,_0x378e47){_0x25437c=_0x25437c-0x137;let _0x31548b=_0x545e32[_0x25437c];return _0x31548b;},a37_0x2543(_0x496fae,_0x43d100);}export function findProjectConfigPath(_0x4fa4e2){const _0x20243b=a37_0x5c2b4c;let _0x3070a9=_0x4fa4e2||process[_0x20243b(0x137)]();while(!![]){const _0x46d936=a37_0x2c442b[_0x20243b(0x138)](_0x3070a9,PROJECT_CONFIG_FILENAME);if(a37_0x53d58e[_0x20243b(0x148)](_0x46d936))return _0x46d936;const _0x4bc859=a37_0x2c442b[_0x20243b(0x141)](_0x3070a9);if(_0x4bc859===_0x3070a9)return null;_0x3070a9=_0x4bc859;}}export function loadProjectConfig(_0x403770){const _0x176ecb=a37_0x5c2b4c,_0x291b95=findProjectConfigPath(_0x403770);if(!_0x291b95)return null;try{const _0x3f7330=a37_0x53d58e[_0x176ecb(0x157)](_0x291b95,_0x176ecb(0x14d)),_0x52eeee=JSON[_0x176ecb(0x14a)](_0x3f7330),_0x26566b=JSON[_0x176ecb(0x139)](_0x52eeee);if(_0x26566b[_0x176ecb(0x144)](_0x176ecb(0x156))||_0x26566b['includes']('apiKey')||_0x26566b[_0x176ecb(0x144)](_0x176ecb(0x149)))throw new Error(_0x176ecb(0x14c)+_0x291b95+_0x176ecb(0x13d)+_0x176ecb(0x147));const {metadata:_0x1d88be,profile:_0x291b2f,..._0x35123b}=_0x52eeee;return _0x291b2f&&console[_0x176ecb(0x142)]('Warning:\x20\x27profile\x27\x20field\x20in\x20'+_0x291b95+_0x176ecb(0x140)+_0x176ecb(0x14e)),_0x35123b;}catch(_0x3539a6){if(_0x3539a6 instanceof Error&&_0x176ecb(0x14f)in _0x3539a6&&_0x3539a6[_0x176ecb(0x14f)]===_0x176ecb(0x159))return null;throw new Error('Failed\x20to\x20load\x20project\x20config\x20from\x20'+_0x291b95+':\x20'+_0x3539a6);}}export function saveProjectConfig(_0x2fd349,_0x5b3f6c){const _0x556dfe=a37_0x5c2b4c,_0x2d94ce=_0x5b3f6c||process[_0x556dfe(0x137)](),_0x39c571=a37_0x2c442b[_0x556dfe(0x138)](_0x2d94ce,PROJECT_CONFIG_FILENAME),_0xfcb519=JSON[_0x556dfe(0x139)](_0x2fd349);if(_0xfcb519[_0x556dfe(0x144)]('TD_API_KEY')||_0xfcb519[_0x556dfe(0x144)](_0x556dfe(0x143))||_0xfcb519['includes'](_0x556dfe(0x149)))throw new Error(_0x556dfe(0x152));if(_0x556dfe(0x158)in _0x2fd349)throw new Error(_0x556dfe(0x13b));a37_0x53d58e[_0x556dfe(0x150)](_0x39c571,JSON[_0x556dfe(0x139)](_0x2fd349,null,0x2));}export function hasProjectConfig(_0x58c4e9){return findProjectConfigPath(_0x58c4e9)!==null;}function a37_0x545e(){const _0x4d2ddc=['API\x20keys\x20must\x20not\x20be\x20stored\x20in\x20project\x20configuration.\x20Use\x20.env\x20files\x20instead.','63bLttNP','312364iZlrAZ','112602jljSBT','TD_API_KEY','readFileSync','profile','ENOENT','cwd','join','stringify','tdx.json','\x27profile\x27\x20should\x20not\x20be\x20set\x20in\x20project\x20config.\x20Use\x20\x27tdx\x20profile\x20use\x27\x20instead.','468232deTlGi',').\x20','52583bgThFZ','93300xdppUb','\x20is\x20ignored.\x20','dirname','warn','apiKey','includes','15eWhFPW','8XyRaDM','Use\x20~/.config/tdx/.env\x20or\x20profile\x20.env\x20files\x20instead.','existsSync','api_key','parse','1112226LslDpK','Security\x20error:\x20API\x20keys\x20must\x20not\x20be\x20stored\x20in\x20project\x20config\x20(','utf-8','Active\x20profile\x20is\x20set\x20in\x20~/.config/tdx/tdx.json','code','writeFileSync','2453668zgQxTe'];a37_0x545e=function(){return _0x4d2ddc;};return a37_0x545e();}export function getProjectRoot(_0x335646){const _0x4521c1=findProjectConfigPath(_0x335646);return _0x4521c1?a37_0x2c442b['dirname'](_0x4521c1):null;}
|
package/dist/core/session.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4c2bb6,_0x2bca88){const _0x38a76c=a38_0x4619,_0x5d0bb5=_0x4c2bb6();while(!![]){try{const _0x95f7bf=parseInt(_0x38a76c(0xf8))/0x1*(parseInt(_0x38a76c(0xed))/0x2)+parseInt(_0x38a76c(0x101))/0x3+parseInt(_0x38a76c(0xe6))/0x4*(parseInt(_0x38a76c(0xe3))/0x5)+parseInt(_0x38a76c(0xeb))/0x6+-parseInt(_0x38a76c(0xf7))/0x7+parseInt(_0x38a76c(0xec))/0x8*(-parseInt(_0x38a76c(0xfb))/0x9)+parseInt(_0x38a76c(0xfe))/0xa*(-parseInt(_0x38a76c(0xde))/0xb);if(_0x95f7bf===_0x2bca88)break;else _0x5d0bb5['push'](_0x5d0bb5['shift']());}catch(_0x157547){_0x5d0bb5['push'](_0x5d0bb5['shift']());}}}(a38_0x364a,0x9d9a3));import*as a38_0x5dd954 from'node:fs';import*as a38_0x4585de from'node:path';import*as a38_0x10f57d from'node:os';import{getPPID,isProcessRunning}from'../utils/process.js';import{createSecureDirectory}from'../utils/file-permissions.js';const SESSION_EXPIRATION_MS=0x18*0x3c*0x3c*0x3e8;function getSessionsDir(){const _0x1852b5=a38_0x4619,_0x26d3da=process['env'][_0x1852b5(0xe8)]||a38_0x4585de['join'](a38_0x10f57d[_0x1852b5(0xfc)](),_0x1852b5(0x100),_0x1852b5(0xe9));return a38_0x4585de['join'](_0x26d3da,'sessions');}function getSessionPath(_0xfda70){const _0xa5e643=a38_0x4619;return a38_0x4585de[_0xa5e643(0xfa)](getSessionsDir(),_0xfda70+_0xa5e643(0xdc));}export function getCurrentSessionPID(){return getPPID();}export function getSessionID(_0x5ed734){const _0x51aaf5=a38_0x4619;if(_0x5ed734)return _0x5ed734;return getCurrentSessionPID()[_0x51aaf5(0xe7)]();}export function loadSessionContext(_0x376095){const _0x2e8d0c=a38_0x4619,_0x9129f4=_0x376095||getCurrentSessionPID()[_0x2e8d0c(0xe7)](),_0x542f52=/^\d+$/[_0x2e8d0c(0xe2)](_0x9129f4)?parseInt(_0x9129f4,0xa):null;return _0x542f52!==null?loadSessionContextByPID(_0x542f52):loadSessionContextByString(_0x9129f4);}export function loadSessionContextByPID(_0x22690e){const _0x29ec16=a38_0x4619,_0x235b82=getSessionPath(_0x22690e);if(!a38_0x5dd954[_0x29ec16(0xf9)](_0x235b82))return null;try{const _0x5c7bfb=a38_0x5dd954[_0x29ec16(0x102)](_0x235b82,_0x29ec16(0xee)),_0x487bb8=JSON[_0x29ec16(0xf3)](_0x5c7bfb),_0x119ab6=new Date(_0x487bb8[_0x29ec16(0xe0)])['getTime'](),_0x20e4e8=Date[_0x29ec16(0xf4)]();if(_0x20e4e8-_0x119ab6>SESSION_EXPIRATION_MS)return a38_0x5dd954['unlinkSync'](_0x235b82),null;const _0x5a7cfe=JSON[_0x29ec16(0x104)](_0x487bb8);if(_0x5a7cfe[_0x29ec16(0xff)]('TD_API_KEY')||_0x5a7cfe[_0x29ec16(0xff)](_0x29ec16(0xe1))||_0x5a7cfe[_0x29ec16(0xff)](_0x29ec16(0xf1)))return console['warn'](_0x29ec16(0x103)+_0x235b82+_0x29ec16(0xea)),a38_0x5dd954[_0x29ec16(0xef)](_0x235b82),null;return _0x487bb8;}catch{try{a38_0x5dd954['unlinkSync'](_0x235b82);}catch{}return null;}}function loadSessionContextByString(_0x19452e){const _0x5a8a73=a38_0x4619,_0x565cfa=a38_0x4585de[_0x5a8a73(0xfa)](getSessionsDir(),_0x19452e+_0x5a8a73(0xdc));if(!a38_0x5dd954[_0x5a8a73(0xf9)](_0x565cfa))return null;try{const _0x5c7446=a38_0x5dd954[_0x5a8a73(0x102)](_0x565cfa,'utf-8'),_0x422269=JSON[_0x5a8a73(0xf3)](_0x5c7446),_0x185745=new Date(_0x422269[_0x5a8a73(0xe0)])[_0x5a8a73(0xf5)](),_0x5c117d=Date[_0x5a8a73(0xf4)]();if(_0x5c117d-_0x185745>SESSION_EXPIRATION_MS)return a38_0x5dd954[_0x5a8a73(0xef)](_0x565cfa),null;const _0x53c297=JSON[_0x5a8a73(0x104)](_0x422269);if(_0x53c297[_0x5a8a73(0xff)](_0x5a8a73(0xdd))||_0x53c297[_0x5a8a73(0xff)]('apiKey')||_0x53c297[_0x5a8a73(0xff)](_0x5a8a73(0xf1)))return console[_0x5a8a73(0xf2)](_0x5a8a73(0x103)+_0x565cfa+_0x5a8a73(0xea)),a38_0x5dd954['unlinkSync'](_0x565cfa),null;return _0x422269;}catch{try{a38_0x5dd954[_0x5a8a73(0xef)](_0x565cfa);}catch{}return null;}}export function saveSessionContext(_0x187ff0,_0x38af74){const _0x4c510e=a38_0x4619,_0x538187=_0x38af74||getCurrentSessionPID()[_0x4c510e(0xe7)](),_0x45ef2f=/^\d+$/[_0x4c510e(0xe2)](_0x538187)?parseInt(_0x538187,0xa):getCurrentSessionPID(),_0x35a4a7=a38_0x4585de[_0x4c510e(0xfa)](getSessionsDir(),_0x538187+_0x4c510e(0xdc)),_0x1e3d9a=getSessionsDir();createSecureDirectory(_0x1e3d9a);const _0x283fc5=JSON[_0x4c510e(0x104)](_0x187ff0);if(_0x283fc5[_0x4c510e(0xff)](_0x4c510e(0xdd))||_0x283fc5[_0x4c510e(0xff)](_0x4c510e(0xe1))||_0x283fc5[_0x4c510e(0xff)](_0x4c510e(0xf1)))throw new Error('API\x20keys\x20must\x20not\x20be\x20stored\x20in\x20session\x20context.\x20Use\x20.env\x20files\x20instead.');let _0x48f20e;const _0x360485=/^\d+$/['test'](_0x538187)?loadSessionContextByPID(parseInt(_0x538187,0xa)):loadSessionContextByString(_0x538187);_0x360485?_0x48f20e={..._0x360485,..._0x187ff0,'pid':_0x45ef2f,'sessionId':_0x538187!==_0x45ef2f[_0x4c510e(0xe7)]()?_0x538187:undefined,'updatedAt':new Date()[_0x4c510e(0xfd)]()}:_0x48f20e={'pid':_0x45ef2f,'sessionId':_0x538187!==_0x45ef2f[_0x4c510e(0xe7)]()?_0x538187:undefined,..._0x187ff0,'createdAt':new Date()[_0x4c510e(0xfd)](),'updatedAt':new Date()[_0x4c510e(0xfd)]()},a38_0x5dd954[_0x4c510e(0xe4)](_0x35a4a7,JSON[_0x4c510e(0x104)](_0x48f20e,null,0x2));}function a38_0x364a(){const _0x565279=['20FzSzmx','includes','.config','1841505SfUeDs','readFileSync','Warning:\x20API\x20keys\x20found\x20in\x20session\x20file\x20','stringify','.json','TD_API_KEY','264869cuJMuA','readdirSync','createdAt','apiKey','test','638710IbIPGD','writeFileSync','endsWith','4efENtG','toString','TDX_CONFIG_DIR','tdx','.\x20This\x20is\x20insecure.\x20Removing\x20session.','4456584PakhHy','5800YmVqeN','4oxgFtI','utf-8','unlinkSync','sort','api_key','warn','parse','now','getTime','push','6901559BlgfGY','456159PzAaIQ','existsSync','join','8901eAiiBg','homedir','toISOString'];a38_0x364a=function(){return _0x565279;};return a38_0x364a();}export function clearSessionContext(_0x1634ce){const _0x2a399f=a38_0x4619,_0x35ce58=_0x1634ce||getCurrentSessionPID()[_0x2a399f(0xe7)](),_0x9dec3f=a38_0x4585de['join'](getSessionsDir(),_0x35ce58+_0x2a399f(0xdc));a38_0x5dd954[_0x2a399f(0xf9)](_0x9dec3f)&&a38_0x5dd954[_0x2a399f(0xef)](_0x9dec3f);}function a38_0x4619(_0xa57368,_0x50c293){const _0x364a0c=a38_0x364a();return a38_0x4619=function(_0x4619f0,_0x28a701){_0x4619f0=_0x4619f0-0xdc;let _0x3570f9=_0x364a0c[_0x4619f0];return _0x3570f9;},a38_0x4619(_0xa57368,_0x50c293);}export function cleanExpiredSessions(){const _0x1cec3b=a38_0x4619,_0x3eaf22=getSessionsDir();if(!a38_0x5dd954['existsSync'](_0x3eaf22))return 0x0;let _0x3fb504=0x0;const _0x43e16c=Date['now']();try{const _0x2818cf=a38_0x5dd954[_0x1cec3b(0xdf)](_0x3eaf22);for(const _0x6c8463 of _0x2818cf){if(!_0x6c8463[_0x1cec3b(0xe5)](_0x1cec3b(0xdc)))continue;const _0x1592e0=a38_0x4585de['join'](_0x3eaf22,_0x6c8463),_0x1bfe4c=_0x6c8463['replace'](_0x1cec3b(0xdc),''),_0x195394=parseInt(_0x1bfe4c,0xa),_0x1bf689=!isNaN(_0x195394);if(_0x1bf689){if(!isProcessRunning(_0x195394)){a38_0x5dd954[_0x1cec3b(0xef)](_0x1592e0),_0x3fb504++;continue;}}try{const _0x3e9b75=a38_0x5dd954[_0x1cec3b(0x102)](_0x1592e0,_0x1cec3b(0xee)),_0xb66e60=JSON[_0x1cec3b(0xf3)](_0x3e9b75),_0x5f5539=new Date(_0xb66e60[_0x1cec3b(0xe0)])['getTime']();_0x43e16c-_0x5f5539>SESSION_EXPIRATION_MS&&(a38_0x5dd954[_0x1cec3b(0xef)](_0x1592e0),_0x3fb504++);}catch{a38_0x5dd954[_0x1cec3b(0xef)](_0x1592e0),_0x3fb504++;}}}catch{}return _0x3fb504;}export function listActiveSessions(){const _0x517322=a38_0x4619,_0x2bbfc8=getSessionsDir();if(!a38_0x5dd954[_0x517322(0xf9)](_0x2bbfc8))return[];try{const _0x28be13=a38_0x5dd954['readdirSync'](_0x2bbfc8),_0x45a34b=[];for(const _0x43f443 of _0x28be13){if(!_0x43f443[_0x517322(0xe5)](_0x517322(0xdc)))continue;const _0x170db2=_0x43f443['replace'](_0x517322(0xdc),''),_0x330047=parseInt(_0x170db2,0xa);!isNaN(_0x330047)&&isProcessRunning(_0x330047)&&_0x45a34b[_0x517322(0xf6)](_0x330047);}return _0x45a34b[_0x517322(0xf0)]((_0x5d7d22,_0x13b312)=>_0x5d7d22-_0x13b312);}catch{return[];}}
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a39_0x41af(){var _0x16fe59=['8ViSmHm','2588285XWTmDM','11070950FlKXvn','1465922LlPgBe','392538zsqmxj','150366ZVWcnP','3375264POvkZF','1SDoSHP','3493773mlcNoU','49LhRkxV'];a39_0x41af=function(){return _0x16fe59;};return a39_0x41af();}(function(_0x58067e,_0x1f0b1e){var _0x281e7b=a39_0x5cf9,_0x473765=_0x58067e();while(!![]){try{var _0x4d1300=parseInt(_0x281e7b(0x98))/0x1*(-parseInt(_0x281e7b(0x94))/0x2)+parseInt(_0x281e7b(0x95))/0x3*(-parseInt(_0x281e7b(0x9b))/0x4)+parseInt(_0x281e7b(0x9c))/0x5+-parseInt(_0x281e7b(0x96))/0x6*(parseInt(_0x281e7b(0x9a))/0x7)+parseInt(_0x281e7b(0x97))/0x8+-parseInt(_0x281e7b(0x99))/0x9+parseInt(_0x281e7b(0x93))/0xa;if(_0x4d1300===_0x1f0b1e)break;else _0x473765['push'](_0x473765['shift']());}catch(_0x1d5fda){_0x473765['push'](_0x473765['shift']());}}}(a39_0x41af,0x773bf));export*from'./types/index.js';export*from'./core/config.js';export*from'./core/auth.js';export*from'./client/http-client.js';export*from'./client/td-client.js';export{TrinoClient}from'./client/trino-client.js';function a39_0x5cf9(_0x3b7321,_0x27bedd){var _0x41afda=a39_0x41af();return a39_0x5cf9=function(_0x5cf901,_0x1f3fb7){_0x5cf901=_0x5cf901-0x93;var _0x24a58f=_0x41afda[_0x5cf901];return _0x24a58f;},a39_0x5cf9(_0x3b7321,_0x27bedd);}export*from'./client/rate-limiter.js';export*from'./types/trino.js';export*from'./commands/command.js';export*from'./commands/query-command.js';export*from'./commands/databases.js';export*from'./commands/tables.js';export*from'./commands/segments.js';export*from'./commands/activations.js';export*from'./commands/show.js';export*from'./commands/describe.js';export*from'./sdk/index.js';
|
|
@@ -65,19 +65,6 @@ export declare function transformAnthropicRequestToTD(request: AnthropicMessages
|
|
|
65
65
|
userMessage: string;
|
|
66
66
|
deltaMessages: AnthropicMessage[];
|
|
67
67
|
};
|
|
68
|
-
/**
|
|
69
|
-
* Transform TD SSE events to Anthropic SSE format
|
|
70
|
-
* Creates an async generator that converts TD events to Anthropic streaming format
|
|
71
|
-
*
|
|
72
|
-
* Note: Token counts are ESTIMATES based on character length, as the TD LLM API
|
|
73
|
-
* does not provide actual token usage information.
|
|
74
|
-
*
|
|
75
|
-
* @param tdStream - Stream of TD chat events
|
|
76
|
-
* @param messageId - Unique message ID
|
|
77
|
-
* @param model - Model name
|
|
78
|
-
* @param userMessage - The user's input message (used to estimate input tokens)
|
|
79
|
-
*/
|
|
80
|
-
export declare function transformTDStreamToAnthropic(tdStream: AsyncGenerator<ChatEvent, void, unknown>, messageId: string, model: string, userMessage?: string, inputTokens?: number): AsyncGenerator<AnthropicStreamEvent, void, unknown>;
|
|
81
68
|
/**
|
|
82
69
|
* Format Anthropic SSE event for transmission
|
|
83
70
|
* Follows Server-Sent Events format: https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events
|
|
@@ -136,6 +123,6 @@ export declare function generateToolCallEvents(toolCall: {
|
|
|
136
123
|
* @param logger - Optional logger for diagnostics
|
|
137
124
|
* @param userMessage - The user's input message (used to estimate input tokens)
|
|
138
125
|
*/
|
|
139
|
-
export declare function
|
|
126
|
+
export declare function transformTDStreamToAnthropic(tdStream: AsyncGenerator<ChatEvent, void, unknown>, messageId: string, model: string, logger?: TDXLogger, userMessage?: string, inputTokens?: number): AsyncGenerator<AnthropicStreamEvent, void, unknown>;
|
|
140
127
|
export { generateMessageId };
|
|
141
128
|
//# sourceMappingURL=anthropic-adapter.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"anthropic-adapter.d.ts","sourceRoot":"","sources":["../../src/proxy/anthropic-adapter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,KAAK,EACV,gBAAgB,EAChB,wBAAwB,EACxB,oBAAoB,EAOpB,aAAa,EACb,qBAAqB,EACtB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,KAAK,EAAE,SAAS,
|
|
1
|
+
{"version":3,"file":"anthropic-adapter.d.ts","sourceRoot":"","sources":["../../src/proxy/anthropic-adapter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,KAAK,EACV,gBAAgB,EAChB,wBAAwB,EACxB,oBAAoB,EAOpB,aAAa,EACb,qBAAqB,EACtB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,KAAK,EAAE,SAAS,EAAwD,MAAM,mBAAmB,CAAC;AAEzG,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AA2BxD;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAChC,YAAY,EAAE,MAAM,EACpB,MAAM,CAAC,EAAE,SAAS,GACjB,mBAAmB,GAAG,uBAAuB,GAAG,WAAW,CAc7D;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,8BAA8B,CAAC,OAAO,EAAE;IACtD,QAAQ,EAAE,gBAAgB,EAAE,CAAC;IAC7B,MAAM,CAAC,EAAE,MAAM,GAAG,qBAAqB,EAAE,CAAC;IAC1C,KAAK,CAAC,EAAE,aAAa,EAAE,CAAC;CACzB,GAAG,MAAM,CA4DT;AAED;;GAEG;AACH,iBAAS,iBAAiB,IAAI,MAAM,CAEnC;AAED;;;GAGG;AACH,wBAAgB,+BAA+B,CAAC,OAAO,EAAE,gBAAgB,GAAG,MAAM,CAqBjF;AAED;;;GAGG;AACH,wBAAgB,0BAA0B,CACxC,eAAe,EAAE,gBAAgB,EAAE,EACnC,gBAAgB,EAAE,gBAAgB,EAAE,GACnC,gBAAgB,EAAE,CAYpB;AAED;;;GAGG;AACH,wBAAgB,6BAA6B,CAC3C,OAAO,EAAE,wBAAwB,EACjC,gBAAgB,EAAE,gBAAgB,EAAE,GACnC;IAAE,WAAW,EAAE,MAAM,CAAC;IAAC,aAAa,EAAE,gBAAgB,EAAE,CAAA;CAAE,CAgB5D;AAGD;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,oBAAoB,GAAG,MAAM,CAEtE;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,CAAC,cAAc,EAAE,MAAM,GAAG,MAAM,CAiBpE;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,aAAa,EAAE,GAAG,MAAM,CAwEjE;AAWD;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,gBAAgB,EAAE,GAAG,MAAM,CA6DvE;AA8HD;;;;;;;GAOG;AACH,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,SAAS,GAAG;IACvE,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC/B,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;CAClB,GAAG,IAAI,CAmIP;AAED;;;GAGG;AACH,wBAAiB,sBAAsB,CACrC,QAAQ,EAAE;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CAAE,EACtE,YAAY,EAAE,MAAM,EACpB,WAAW,EAAE,MAAM,GAClB,SAAS,CAAC,oBAAoB,EAAE,IAAI,EAAE,OAAO,CAAC,CAqDhD;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAuB,4BAA4B,CACjD,QAAQ,EAAE,cAAc,CAAC,SAAS,EAAE,IAAI,EAAE,OAAO,CAAC,EAClD,SAAS,EAAE,MAAM,EACjB,KAAK,EAAE,MAAM,EACb,MAAM,CAAC,EAAE,SAAS,EAClB,WAAW,SAAK,EAChB,WAAW,SAAI,GACd,cAAc,CAAC,oBAAoB,EAAE,IAAI,EAAE,OAAO,CAAC,CA2frD;AAED,OAAO,EAAE,iBAAiB,EAAE,CAAC"}
|