@wps365-open/comate-cli 0.0.16 → 0.0.17
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/commands/auth/login.js +1 -1
- package/dist/commands/auth/logout.js +1 -1
- package/dist/commands/auth/status.js +1 -1
- package/dist/commands/code/create.js +1 -1
- package/dist/commands/code/deploy.js +1 -1
- package/dist/commands/code/files.js +1 -1
- package/dist/commands/code/lookup.js +1 -0
- package/dist/commands/code/publish.js +1 -1
- package/dist/commands/code/recall.js +1 -0
- package/dist/commands/code/resume.js +1 -1
- package/dist/commands/code/send.js +1 -1
- package/dist/commands/code/status.js +1 -1
- package/dist/commands/code/upload.js +1 -1
- package/dist/commands/update.js +1 -1
- package/dist/hooks/init/logger.js +1 -1
- package/dist/hooks/prerun/update-checker.js +1 -1
- package/dist/index.js +1 -1
- package/dist/lib/account/login-service.js +1 -1
- package/dist/lib/config/constants.js +1 -1
- package/dist/lib/config/manager.js +1 -1
- package/dist/lib/extends/command.js +1 -1
- package/dist/lib/http/auth-headers.js +1 -1
- package/dist/lib/http/client.js +1 -1
- package/dist/lib/log/logger.js +1 -1
- package/dist/lib/service/auth.js +1 -1
- package/dist/lib/service/cloud-agent.js +1 -1
- package/dist/lib/service/cloud-publish.js +1 -1
- package/dist/lib/service/manage.js +1 -1
- package/dist/lib/service/project-context.js +1 -1
- package/oclif.manifest.json +88 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a0_0x2eab91=a0_0x289d;(function(_0x270311,_0x42c981){const _0x13993f=a0_0x289d,_0x10b147=_0x270311();while(!![]){try{const _0x149c74=parseInt(_0x13993f(0x152))/0x1+parseInt(_0x13993f(0x145))/0x2+parseInt(_0x13993f(0x13f))/0x3*(-parseInt(_0x13993f(0x13e))/0x4)+-parseInt(_0x13993f(0x149))/0x5+-parseInt(_0x13993f(0x142))/0x6+-parseInt(_0x13993f(0x140))/0x7+parseInt(_0x13993f(0x14c))/0x8*(parseInt(_0x13993f(0x14f))/0x9);if(_0x149c74===_0x42c981)break;else _0x10b147['push'](_0x10b147['shift']());}catch(_0x15d362){_0x10b147['push'](_0x10b147['shift']());}}}(a0_0x5388,0x89ca9));import{Flags}from'@oclif/core';import a0_0x311407 from'../../lib/extends/command.js';import{configManager}from'../../lib/config/manager.js';function a0_0x289d(_0x5229f5,_0x4514c2){_0x5229f5=_0x5229f5-0x136;const _0x5388b2=a0_0x5388();let _0x289d11=_0x5388b2[_0x5229f5];return _0x289d11;}import{getCurrentUser}from'../../lib/service/auth.js';function a0_0x5388(){const _0x5beeb1=['wps_sid','3448626TSeXss','message','nickname','1864048ipaANc','boolean','jsonEnabled','aliases','4074865Dfgckp','强制重新登录(即使当前已登录)','description','8jjwqYu','正在打开浏览器,请在浏览器中完成登录...','log','19648593nVSuOS','当前已登录:\x20','如需切换账号,请使用\x20comate-cli\x20auth\x20login\x20-f','783858eGaARH','error','登录\x20WPS\x20账号','createLoading','本地凭证已过期,重新登录...','flags','saveUserInfo','login','stopLoading','parse','登录成功,欢迎\x20','8960OOGUbz','1425jWsbpt','6166454bEyANU'];a0_0x5388=function(){return _0x5beeb1;};return a0_0x5388();}import{loginWithBrowser}from'../../lib/account/login-service.js';export default class AuthLogin extends a0_0x311407{static [a0_0x2eab91(0x14b)]=a0_0x2eab91(0x154);static [a0_0x2eab91(0x148)]=[a0_0x2eab91(0x13a)];static ['enableJsonFlag']=!![];static [a0_0x2eab91(0x138)]={'force':Flags[a0_0x2eab91(0x146)]({'char':'f','description':a0_0x2eab91(0x14a),'default':![]})};async['run'](){const _0x4f2288=a0_0x2eab91,{flags:_0x4f1d32}=await this[_0x4f2288(0x13c)](AuthLogin);if(!_0x4f1d32['force']){const _0x12d968=configManager['load']();if(_0x12d968[_0x4f2288(0x141)])try{const _0x13de32=await getCurrentUser();return configManager[_0x4f2288(0x139)](_0x13de32),!this['jsonEnabled']()&&(this[_0x4f2288(0x14e)](_0x4f2288(0x150)+_0x13de32[_0x4f2288(0x144)]),this[_0x4f2288(0x14e)](_0x4f2288(0x151))),{'nickname':_0x13de32[_0x4f2288(0x144)],'alreadyLoggedIn':!![]};}catch{!this[_0x4f2288(0x147)]()&&this['log'](_0x4f2288(0x137));}}!this[_0x4f2288(0x147)]()&&await this[_0x4f2288(0x136)](_0x4f2288(0x14d));try{const {nickname:_0x14aa10}=await loginWithBrowser();return this[_0x4f2288(0x13b)](_0x4f2288(0x13d)+_0x14aa10),{'nickname':_0x14aa10,'alreadyLoggedIn':![]};}catch(_0x124d49){this['stopLoading'](),this[_0x4f2288(0x153)](_0x124d49 instanceof Error?_0x124d49[_0x4f2288(0x143)]:String(_0x124d49));}}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a1_0x1ad947=a1_0x2569;(function(_0x3c7e70,_0x3c77bb){const _0x4470ba=a1_0x2569,_0x573537=_0x3c7e70();while(!![]){try{const _0x1498c1=parseInt(_0x4470ba(0x1b7))/0x1*(parseInt(_0x4470ba(0x1b4))/0x2)+parseInt(_0x4470ba(0x1a8))/0x3*(-parseInt(_0x4470ba(0x1b3))/0x4)+parseInt(_0x4470ba(0x1a6))/0x5+parseInt(_0x4470ba(0x1ad))/0x6+parseInt(_0x4470ba(0x1b6))/0x7*(parseInt(_0x4470ba(0x1b1))/0x8)+parseInt(_0x4470ba(0x1af))/0x9+-parseInt(_0x4470ba(0x1aa))/0xa*(parseInt(_0x4470ba(0x1b9))/0xb);if(_0x1498c1===_0x3c77bb)break;else _0x573537['push'](_0x573537['shift']());}catch(_0x32cc65){_0x573537['push'](_0x573537['shift']());}}}(a1_0x5890,0x2aeb7));import a1_0x1fefdb from'../../lib/extends/command.js';import{configManager}from'../../lib/config/manager.js';function a1_0x2569(_0x471ad4,_0x2524fd){_0x471ad4=_0x471ad4-0x1a4;const _0x589044=a1_0x5890();let _0x256948=_0x589044[_0x471ad4];return _0x256948;}function a1_0x5890(){const _0x4d7013=['446916HddWSC','load','867820fFZyYP','jsonEnabled','log','1118856SbTRGm','logout','2367261ZtDcmM','parse','928GLReFU','已登出:\x20','4Lclskq','788iZTTcr','nickname','11676dvpQHn','31uZKpon','description','66XzEsOE','enableJsonFlag','wps_sid','951280DMWwZS','aliases'];a1_0x5890=function(){return _0x4d7013;};return a1_0x5890();}export default class AuthLogout extends a1_0x1fefdb{static [a1_0x1ad947(0x1b8)]='登出当前\x20WPS\x20账号';static [a1_0x1ad947(0x1a7)]=[a1_0x1ad947(0x1ae)];static [a1_0x1ad947(0x1a4)]=!![];async['run'](){const _0x348b66=a1_0x1ad947;await this[_0x348b66(0x1b0)](AuthLogout);const _0x19879d=configManager[_0x348b66(0x1a9)]();if(!_0x19879d[_0x348b66(0x1a5)])return!this['jsonEnabled']()&&this[_0x348b66(0x1ac)]('当前未登录'),{'loggedOut':![],'nickname':null};const _0x38e86c=_0x19879d['user_info']?.[_0x348b66(0x1b5)]??'未知用户';return configManager['clear'](),!this[_0x348b66(0x1ab)]()&&this['log'](_0x348b66(0x1b2)+_0x38e86c),{'loggedOut':!![],'nickname':_0x38e86c};}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a2_0x4a238b=a2_0x344b;(function(_0x4e76df,_0x993c5b){const _0xa0f828=a2_0x344b,_0x44bb5a=_0x4e76df();while(!![]){try{const _0x215b56=-parseInt(_0xa0f828(0x121))/0x1*(-parseInt(_0xa0f828(0x10d))/0x2)+-parseInt(_0xa0f828(0x11e))/0x3*(parseInt(_0xa0f828(0x119))/0x4)+-parseInt(_0xa0f828(0x112))/0x5+-parseInt(_0xa0f828(0x125))/0x6+-parseInt(_0xa0f828(0x111))/0x7+-parseInt(_0xa0f828(0x11d))/0x8*(-parseInt(_0xa0f828(0x113))/0x9)+parseInt(_0xa0f828(0x124))/0xa*(parseInt(_0xa0f828(0x123))/0xb);if(_0x215b56===_0x993c5b)break;else _0x44bb5a['push'](_0x44bb5a['shift']());}catch(_0xec70a8){_0x44bb5a['push'](_0x44bb5a['shift']());}}}(a2_0x21e8,0xc1f4b));import a2_0x23b848 from'../../lib/extends/command.js';function a2_0x344b(_0x4b70c8,_0x1a38ca){_0x4b70c8=_0x4b70c8-0x10d;const _0x21e8f6=a2_0x21e8();let _0x344bbe=_0x21e8f6[_0x4b70c8];return _0x344bbe;}import{configManager}from'../../lib/config/manager.js';export default class AuthStatus extends a2_0x23b848{static ['description']='显示当前登录用户信息';static [a2_0x4a238b(0x115)]=['whoami'];static [a2_0x4a238b(0x11b)]=!![];async[a2_0x4a238b(0x10e)](){const _0x158c4b=a2_0x4a238b;await this[_0x158c4b(0x116)](AuthStatus),await this['requireAuth']();const _0x3f6788=configManager[_0x158c4b(0x126)](),_0x3dfab6=_0x3f6788[_0x158c4b(0x110)];return!_0x3dfab6&&this['error'](_0x158c4b(0x11c)),!this[_0x158c4b(0x122)]()&&(this[_0x158c4b(0x120)](_0x158c4b(0x114)+_0x3dfab6[_0x158c4b(0x117)]),this[_0x158c4b(0x120)](_0x158c4b(0x118)+_0x3dfab6[_0x158c4b(0x11a)]),this[_0x158c4b(0x120)](_0x158c4b(0x11f)+_0x3dfab6[_0x158c4b(0x10f)])),_0x3dfab6;}}function a2_0x21e8(){const _0x3d3d82=['292014NKxZFx','用户:\x20','aliases','parse','nickname','邮箱:\x20','38876KmGvli','email','enableJsonFlag','已登录,但无缓存的用户信息。请重新执行\x20comate-cli\x20auth\x20login。','24sXScIN','39Iaxgkq','ID:\x20\x20\x20','log','181183jbEzol','jsonEnabled','11FdMOsw','18552620gVKmbk','6916926UHEzEw','load','6nHOOAx','run','user_id','user_info','552937pLUlFu','1717735xPkuHq'];a2_0x21e8=function(){return _0x3d3d82;};return a2_0x21e8();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a3_0x5308(){const _0x9c2813=['2934988WzxEow','创建云端\x20Agent\x20会话(自动关联\x20team\x20→\x20project\x20→\x20thread)','length','enableJsonFlag','70281sOrjVM','4AKVIRl','项目就绪:\x20','list','17427806tyunHt','string','3657824xBpQWB','正在创建云端会话...','thread_id','<%=\x20config.bin\x20%>\x20code\x20create\x20--project-id\x20206\x20--json','请选择团队:','description','find','map','jsonEnabled','55835aHeDOJ','examples','关联完成','app-buddy','project-name','created_at','156ymKPsP','project-id','190OryRwD','project-','我的团队','flags','团队\x20ID(多团队时必填)','云端\x20Agent\x20ID','存在\x20','createLoading','parse','431669TzyrPI','team-id','log','2LUSmTv','stopLoading','235161EvLFaj','会话已创建:\x20','message','prompt','requireAuth','slice','resolveTeamId','正在初始化...','inquirer','<%=\x20config.bin\x20%>\x20code\x20create\x20--project-name\x20my-app\x20--json','integer'];a3_0x5308=function(){return _0x9c2813;};return a3_0x5308();}const a3_0x5821a8=a3_0x402e;(function(_0x169ea4,_0x2a1cb5){const _0x158628=a3_0x402e,_0x146d2d=_0x169ea4();while(!![]){try{const _0x197f69=parseInt(_0x158628(0x11d))/0x1*(parseInt(_0x158628(0x120))/0x2)+-parseInt(_0x158628(0x122))/0x3*(-parseInt(_0x158628(0x132))/0x4)+-parseInt(_0x158628(0x10c))/0x5*(-parseInt(_0x158628(0x112))/0x6)+parseInt(_0x158628(0x12d))/0x7+parseInt(_0x158628(0x103))/0x8+-parseInt(_0x158628(0x131))/0x9*(-parseInt(_0x158628(0x114))/0xa)+-parseInt(_0x158628(0x135))/0xb;if(_0x197f69===_0x2a1cb5)break;else _0x146d2d['push'](_0x146d2d['shift']());}catch(_0x43b020){_0x146d2d['push'](_0x146d2d['shift']());}}}(a3_0x5308,0x3ad27));import{Flags}from'@oclif/core';import a3_0x409664 from'../../lib/extends/command.js';import{createThread}from'../../lib/service/cloud-agent.js';import{getMyTeams,createTeam,createProject,listProjects,upsertProjectThread}from'../../lib/service/manage.js';function a3_0x402e(_0x592c9b,_0x4bb052){_0x592c9b=_0x592c9b-0x102;const _0x530874=a3_0x5308();let _0x402e5a=_0x530874[_0x592c9b];return _0x402e5a;}export default class CodeCreate extends a3_0x409664{static [a3_0x5821a8(0x108)]=a3_0x5821a8(0x12e);static [a3_0x5821a8(0x130)]=!![];static [a3_0x5821a8(0x10d)]=[a3_0x5821a8(0x12b),a3_0x5821a8(0x106),'<%=\x20config.bin\x20%>\x20code\x20create\x20--project-name\x20my-app\x20--team-id\x201\x20--json'];static [a3_0x5821a8(0x117)]={'project-name':Flags[a3_0x5821a8(0x102)]({'description':'项目名称(新建或复用同名项目)'}),'project-id':Flags[a3_0x5821a8(0x12c)]({'description':'复用已有项目\x20ID(跳过项目创建)'}),'team-id':Flags['integer']({'description':a3_0x5821a8(0x118)}),'agent-id':Flags['string']({'description':a3_0x5821a8(0x119),'default':a3_0x5821a8(0x10f)})};async['run'](){const _0x168a41=a3_0x5821a8;await this[_0x168a41(0x126)]();const {flags:_0xae0d71}=await this[_0x168a41(0x11c)](CodeCreate),_0x13bc18=this[_0x168a41(0x10b)]();if(!_0x13bc18)await this[_0x168a41(0x11b)](_0x168a41(0x129));try{const {projectId:_0x3fb2be,teamId:_0x22051c,projectName:_0x231ddf}=await this['resolveProject'](_0xae0d71,_0x13bc18);!_0x13bc18&&(this[_0x168a41(0x121)](_0x168a41(0x133)+_0x231ddf+'\x20(id='+_0x3fb2be+')'),await this[_0x168a41(0x11b)](_0x168a41(0x104)));const _0x16e080=await createThread(_0xae0d71['agent-id']);return!_0x13bc18&&(this[_0x168a41(0x121)](_0x168a41(0x123)+_0x16e080[_0x168a41(0x105)]),await this[_0x168a41(0x11b)]('正在关联项目与会话...')),await upsertProjectThread(_0x3fb2be,_0x16e080['thread_id']),this['stopLoading'](_0x168a41(0x10e)),!_0x13bc18&&(this[_0x168a41(0x11f)]('项目:\x20'+_0x231ddf),this['log']('Thread:\x20'+_0x16e080[_0x168a41(0x105)])),{'thread_id':_0x16e080[_0x168a41(0x105)],'project_id':_0x3fb2be,'team_id':_0x22051c,'project_name':_0x231ddf,'created_at':_0x16e080[_0x168a41(0x111)]};}catch(_0x309456){this[_0x168a41(0x121)](),this['error'](_0x309456 instanceof Error?_0x309456[_0x168a41(0x124)]:String(_0x309456));}}async['resolveProject'](_0x5919eb,_0x18df4f){const _0x49b8e0=a3_0x5821a8;if(_0x5919eb[_0x49b8e0(0x113)])return{'projectId':_0x5919eb['project-id'],'teamId':_0x5919eb[_0x49b8e0(0x11e)]??0x0,'projectName':_0x49b8e0(0x115)+_0x5919eb['project-id']};const _0xc9f41c=await this[_0x49b8e0(0x128)](_0x5919eb['team-id'],_0x18df4f),_0x42b967=_0x5919eb[_0x49b8e0(0x110)]??'app-'+Date['now']()['toString'](0x24)[_0x49b8e0(0x127)](-0x6),_0x501877=await listProjects(_0xc9f41c),_0x4ecec2=_0x501877[_0x49b8e0(0x109)](_0x596b78=>_0x596b78['project_name']===_0x42b967);if(_0x4ecec2)return{'projectId':_0x4ecec2['id'],'teamId':_0xc9f41c,'projectName':_0x42b967};const _0x3b03ea=await createProject({'teamId':_0xc9f41c,'projectName':_0x42b967});return{'projectId':_0x3b03ea['id'],'teamId':_0xc9f41c,'projectName':_0x42b967};}async['resolveTeamId'](_0x1520e3,_0xf94463){const _0x349ba4=a3_0x5821a8;if(_0x1520e3)return _0x1520e3;const _0x4c7294=await getMyTeams();if(_0x4c7294[_0x349ba4(0x12f)]===0x0){const _0x10143f=await createTeam(_0x349ba4(0x116));return _0x10143f['id'];}if(_0x4c7294[_0x349ba4(0x12f)]===0x1)return _0x4c7294[0x0]['id'];if(_0xf94463)throw new Error(_0x349ba4(0x11a)+_0x4c7294[_0x349ba4(0x12f)]+'\x20个团队,请通过\x20--team-id\x20指定:\x20'+_0x4c7294[_0x349ba4(0x10a)](_0x1b5cc5=>_0x1b5cc5['team_name']+'('+_0x1b5cc5['id']+')')['join'](',\x20'));const {default:_0x23ec6e}=await import(_0x349ba4(0x12a)),{teamId:_0x120e66}=await _0x23ec6e[_0x349ba4(0x125)]([{'type':_0x349ba4(0x134),'name':'teamId','message':_0x349ba4(0x107),'choices':_0x4c7294[_0x349ba4(0x10a)](_0x39edde=>({'name':_0x39edde['team_name']+'\x20('+_0x39edde['id']+')','value':_0x39edde['id']}))}]);return _0x120e66;}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a4_0x7d6a25=a4_0x4283;(function(_0xd5960e,_0x46902d){const _0x544d63=a4_0x4283,_0xa2e781=_0xd5960e();while(!![]){try{const _0x13cc78=parseInt(_0x544d63(0x100))/0x1*(parseInt(_0x544d63(0x137))/0x2)+-parseInt(_0x544d63(0x116))/0x3+parseInt(_0x544d63(0x119))/0x4+parseInt(_0x544d63(0x108))/0x5+parseInt(_0x544d63(0x144))/0x6+-parseInt(_0x544d63(0xfb))/0x7+-parseInt(_0x544d63(0x105))/0x8;if(_0x13cc78===_0x46902d)break;else _0xa2e781['push'](_0xa2e781['shift']());}catch(_0x4b265c){_0xa2e781['push'](_0xa2e781['shift']());}}}(a4_0x168c,0x7cf21));import a4_0x161f21 from'node:fs';import a4_0x5ad2e8 from'node:path';function a4_0x4283(_0x4d10a9,_0x2c555d){_0x4d10a9=_0x4d10a9-0xe9;const _0x168c10=a4_0x168c();let _0x4283da=_0x168c10[_0x4d10a9];return _0x4283da;}import{Flags}from'@oclif/core';import a4_0x388761 from'../../lib/extends/command.js';import{uploadFiles,createThread}from'../../lib/service/cloud-agent.js';import{createVersion,getMyTeams,createTeam,createProject,listProjects,upsertProjectThread}from'../../lib/service/manage.js';import{runFullPublish}from'../../lib/service/cloud-publish.js';export default class CodeDeploy extends a4_0x388761{static ['description']=a4_0x7d6a25(0x138);static [a4_0x7d6a25(0x101)]=!![];static [a4_0x7d6a25(0xf4)]=[a4_0x7d6a25(0x145),a4_0x7d6a25(0x11f),a4_0x7d6a25(0x118)];static [a4_0x7d6a25(0xfe)]={'file':Flags[a4_0x7d6a25(0xf5)]({'char':'f','description':a4_0x7d6a25(0x133),'required':!![]}),'thread-id':Flags[a4_0x7d6a25(0xf5)]({'description':a4_0x7d6a25(0x110)}),'project-id':Flags['integer']({'description':a4_0x7d6a25(0x139)}),'project-name':Flags[a4_0x7d6a25(0xf5)]({'description':a4_0x7d6a25(0x103)}),'team-id':Flags[a4_0x7d6a25(0x131)]({'description':a4_0x7d6a25(0x13d)}),'timeout':Flags['integer']({'description':'发布超时时间(秒)','default':0x258})};async[a4_0x7d6a25(0xff)](){const _0x38a28b=a4_0x7d6a25;await this[_0x38a28b(0x10b)]();const {flags:_0x55c724}=await this[_0x38a28b(0xf8)](CodeDeploy),_0x4cce63=this['jsonEnabled'](),_0x81355d=a4_0x5ad2e8[_0x38a28b(0x142)](_0x55c724[_0x38a28b(0x109)]);!a4_0x161f21[_0x38a28b(0xf9)](_0x81355d)&&this[_0x38a28b(0x102)](_0x38a28b(0x106)+_0x81355d);!_0x81355d[_0x38a28b(0x112)]()[_0x38a28b(0xea)](_0x38a28b(0x12f))&&!_0x81355d[_0x38a28b(0x112)]()[_0x38a28b(0xea)](_0x38a28b(0x140))&&this[_0x38a28b(0x102)](_0x38a28b(0x124));try{const {threadId:_0x24db7e,projectId:_0x4a92bb}=await this[_0x38a28b(0x10f)](_0x55c724,_0x4cce63);if(!_0x4cce63)await this[_0x38a28b(0x11a)](_0x38a28b(0x13e));const _0x3735da=a4_0x161f21[_0x38a28b(0x111)](_0x81355d),_0x15b670=new Date()[_0x38a28b(0x129)](),_0x23e878=JSON[_0x38a28b(0x11c)]({'publish':{'base':'.','include':[_0x38a28b(0xfc)],'exclude':[],'ignore':[_0x38a28b(0xf6),_0x38a28b(0x10e),_0x38a28b(0xee),_0x38a28b(0x121),_0x38a28b(0xed),_0x38a28b(0x128)]},'project':{'id':_0x4a92bb,'createdAt':_0x15b670,'updatedAt':_0x15b670}},null,0x4),_0x514cac=[{'name':_0x38a28b(0xfc),'content':_0x3735da},{'name':'comate.json','content':_0x23e878}];await uploadFiles(_0x24db7e,_0x514cac);const _0x1caf2c=_0x514cac['map'](_0x10d7f7=>_0x10d7f7['name']);!_0x4cce63&&this[_0x38a28b(0x130)](_0x38a28b(0xf2)+_0x1caf2c[_0x38a28b(0x134)](',\x20'));const _0x296dfd='v'+Date[_0x38a28b(0x126)]()[_0x38a28b(0x13b)](0x24);if(!_0x4cce63)await this[_0x38a28b(0x11a)](_0x38a28b(0x104)+_0x296dfd+_0x38a28b(0xeb));const _0xaffdea=await createVersion(_0x4a92bb,_0x296dfd);if(!_0x4cce63)this[_0x38a28b(0x130)](_0x38a28b(0xfd)+_0xaffdea['id']);if(!_0x4cce63)await this[_0x38a28b(0x11a)](_0x38a28b(0xf1));const _0x4a353e=_0x4cce63?undefined:_0x2e799e=>{const _0xb5dd56=_0x38a28b;this[_0xb5dd56(0x115)]&&(this[_0xb5dd56(0x115)][_0xb5dd56(0xef)]='['+_0x2e799e[_0xb5dd56(0x132)]+']\x20'+_0x2e799e[_0xb5dd56(0x113)]);},_0x6011ab=await runFullPublish({'threadId':_0x24db7e,'projectId':_0x4a92bb,'versionId':_0xaffdea['id'],'skipBuild':!![]},_0x4a353e,_0x55c724[_0x38a28b(0x127)]*0x3e8);this[_0x38a28b(0x130)]();if(_0x6011ab[_0x38a28b(0xe9)]===_0x38a28b(0x12c))return!_0x4cce63&&(this[_0x38a28b(0xf3)](this[_0x38a28b(0x12d)](_0x38a28b(0x11b),_0x38a28b(0x114))),this[_0x38a28b(0xf3)](_0x38a28b(0xf7)+_0x6011ab[_0x38a28b(0x11d)])),{'status':_0x38a28b(0x12c),'thread_id':_0x24db7e,'project_id':_0x4a92bb,'version_id':_0xaffdea['id'],'access_url':_0x6011ab[_0x38a28b(0x11d)],'short_url':_0x6011ab[_0x38a28b(0x13c)],'uploaded_files':_0x1caf2c};const _0x593226=_0x6011ab['deploy_error']??_0x38a28b(0x141);return!_0x4cce63&&(this['log'](this[_0x38a28b(0x12d)]('部署失败',_0x38a28b(0x10a))),this[_0x38a28b(0xf3)](_0x38a28b(0x11e)+_0x593226)),{'status':'failed','thread_id':_0x24db7e,'project_id':_0x4a92bb,'version_id':_0xaffdea['id'],'error':_0x593226,'uploaded_files':_0x1caf2c};}catch(_0x56dda9){this[_0x38a28b(0x130)]();const _0x23eaf0=_0x56dda9 instanceof Error?_0x56dda9[_0x38a28b(0x113)]:String(_0x56dda9);if(_0x4cce63)return{'status':_0x38a28b(0xec),'thread_id':_0x55c724[_0x38a28b(0x10c)]??'','project_id':_0x55c724[_0x38a28b(0xfa)]??0x0,'version_id':0x0,'error':_0x23eaf0};this[_0x38a28b(0x102)](_0x23eaf0);}}async['resolveSession'](_0x10b695,_0x3bdf9b){const _0x252aa9=a4_0x7d6a25;if(_0x10b695[_0x252aa9(0x10c)]&&_0x10b695[_0x252aa9(0xfa)])return{'threadId':_0x10b695[_0x252aa9(0x10c)],'projectId':_0x10b695[_0x252aa9(0xfa)]};if(!_0x3bdf9b)await this['createLoading'](_0x252aa9(0x12a));const _0x45c8a1=_0x10b695[_0x252aa9(0xfa)]??await this[_0x252aa9(0x10d)](_0x10b695,_0x3bdf9b);let _0x14b0a5=_0x10b695[_0x252aa9(0x10c)];if(!_0x14b0a5){const _0x4c03db=await createThread('app-buddy');_0x14b0a5=_0x4c03db[_0x252aa9(0x123)],await upsertProjectThread(_0x45c8a1,_0x14b0a5);}if(!_0x3bdf9b)this[_0x252aa9(0x130)](_0x252aa9(0x136)+_0x45c8a1+',\x20thread='+_0x14b0a5[_0x252aa9(0xf0)](0x0,0xc)+'...)');return{'threadId':_0x14b0a5,'projectId':_0x45c8a1};}async[a4_0x7d6a25(0x10d)](_0x6bf085,_0x56b4e2){const _0xe8e3ef=a4_0x7d6a25,_0x28219f=await this[_0xe8e3ef(0x107)](_0x6bf085[_0xe8e3ef(0x135)],_0x56b4e2),_0x1ec497=_0x6bf085['project-name']??_0xe8e3ef(0x122)+Date[_0xe8e3ef(0x126)]()[_0xe8e3ef(0x13b)](0x24)[_0xe8e3ef(0xf0)](-0x6),_0x38ddae=await listProjects(_0x28219f),_0x4dcde2=_0x38ddae[_0xe8e3ef(0x12b)](_0x2a5637=>_0x2a5637['project_name']===_0x1ec497);if(_0x4dcde2)return _0x4dcde2['id'];const _0x159c64=await createProject({'teamId':_0x28219f,'projectName':_0x1ec497});return _0x159c64['id'];}async[a4_0x7d6a25(0x107)](_0x496669,_0xecad1){const _0x45b961=a4_0x7d6a25;if(_0x496669)return _0x496669;const _0x4e72a4=await getMyTeams();if(_0x4e72a4[_0x45b961(0x12e)]===0x0){const _0x58bbf5=await createTeam(_0x45b961(0x13f));return _0x58bbf5['id'];}if(_0x4e72a4[_0x45b961(0x12e)]===0x1)return _0x4e72a4[0x0]['id'];if(_0xecad1)throw new Error('存在\x20'+_0x4e72a4[_0x45b961(0x12e)]+'\x20个团队,请通过\x20--team-id\x20指定:\x20'+_0x4e72a4['map'](_0xe0cc2f=>_0xe0cc2f[_0x45b961(0x125)]+'('+_0xe0cc2f['id']+')')[_0x45b961(0x134)](',\x20'));const {default:_0x5382fa}=await import(_0x45b961(0x117)),{teamId:_0x1a1ede}=await _0x5382fa['prompt']([{'type':_0x45b961(0x13a),'name':_0x45b961(0x143),'message':'请选择团队:','choices':_0x4e72a4[_0x45b961(0x120)](_0x43b259=>({'name':_0x43b259['team_name']+'\x20('+_0x43b259['id']+')','value':_0x43b259['id']}))}]);return _0x1a1ede;}}function a4_0x168c(){const _0x58986a=['message','green','spinner','2526747oHfLfX','inquirer','<%=\x20config.bin\x20%>\x20code\x20deploy\x20--file\x20./page.html\x20--thread-id\x20thread_xxx\x20--project-id\x20206\x20--json','2109076CeFmeM','createLoading','部署成功!','stringify','access_url','原因:\x20','<%=\x20config.bin\x20%>\x20code\x20deploy\x20--file\x20./index.html\x20--project-name\x20my-site\x20--json','map','.env.local','deploy-','thread_id','仅支持\x20HTML\x20文件\x20(.html\x20/\x20.htm)','team_name','now','timeout','**/*.map','toISOString','正在初始化项目...','find','deployed','colorize','length','.html','stopLoading','integer','step','本地\x20HTML\x20文件路径','join','team-id','项目就绪\x20(project=','52XBjPzZ','一键部署本地\x20HTML\x20文件到云端(上传\x20→\x20生成配置\x20→\x20发布)','已有项目\x20ID(省略则自动创建)','list','toString','short_url','团队\x20ID(多团队时必填)','正在上传文件到沙箱...','我的团队','.htm','未知错误','resolve','teamId','2913390sGkDXg','<%=\x20config.bin\x20%>\x20code\x20deploy\x20--file\x20./page.html\x20--json','status','endsWith','...','failed','.DS_Store','.env','text','slice','正在发布...','上传完成:\x20','log','examples','string','node_modules','运行时地址:\x20','parse','existsSync','project-id','845908TblYNN','index.html','版本已创建:\x20','flags','run','12775lXonkT','enableJsonFlag','error','项目名称(新建项目时使用)','创建版本\x20','1285088IjIwiu','文件不存在:\x20','resolveTeamId','1452610dtUPKM','file','red','requireAuth','thread-id','createProjectIfNeeded','.git','resolveSession','已有会话\x20ID(省略则自动创建)','readFileSync','toLowerCase'];a4_0x168c=function(){return _0x58986a;};return a4_0x168c();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a5_0x18484c=a5_0x1d65;(function(_0x1922d0,_0x458da1){const _0x2e6b7e=a5_0x1d65,_0x2453b3=_0x1922d0();while(!![]){try{const _0xb5662f=-parseInt(_0x2e6b7e(0x122))/0x1*(parseInt(_0x2e6b7e(0x119))/0x2)+-parseInt(_0x2e6b7e(0x133))/0x3*(parseInt(_0x2e6b7e(0x11a))/0x4)+-parseInt(_0x2e6b7e(0x10e))/0x5*(-parseInt(_0x2e6b7e(0x11f))/0x6)+parseInt(_0x2e6b7e(0x110))/0x7+-parseInt(_0x2e6b7e(0x12a))/0x8*(parseInt(_0x2e6b7e(0x134))/0x9)+-parseInt(_0x2e6b7e(0x12d))/0xa+-parseInt(_0x2e6b7e(0x125))/0xb*(-parseInt(_0x2e6b7e(0x11b))/0xc);if(_0xb5662f===_0x458da1)break;else _0x2453b3['push'](_0x2453b3['shift']());}catch(_0x21b513){_0x2453b3['push'](_0x2453b3['shift']());}}}(a5_0x4df3,0x8d1ed));function a5_0x1d65(_0x54cfe2,_0x2f9e1d){_0x54cfe2=_0x54cfe2-0x10e;const _0x4df31c=a5_0x4df3();let _0x1d6556=_0x4df31c[_0x54cfe2];return _0x1d6556;}import{Flags}from'@oclif/core';function a5_0x4df3(){const _0x39c922=['description','正在下载\x20','listMode','<%=\x20config.bin\x20%>\x20code\x20files\x20--thread-id\x20thread_xxx\x20--json','218kSHfAN','1000xBIQsZ','909564SHOJOc','stopLoading','requireAuth','keys','6HrKdKz','查看或下载云端\x20Agent\x20会话中的文件','examples','5503HpPHnQ','thread-id','log','341tYIWXo','获取完成','createLoading','error','length','56vUGFpD','string','downloadMode','9929870voazYK','parse','message','jsonEnabled','download','files','10239OcTfWr','680715ulzjsF','要下载的文件路径(可指定多个)','1258340IuPBaG','\x20个文件...','6665141nTCRTe','flags','会话\x20ID','\x20个文件:','<%=\x20config.bin\x20%>\x20code\x20files\x20--thread-id\x20thread_xxx\x20--download\x20src/App.tsx\x20--json'];a5_0x4df3=function(){return _0x39c922;};return a5_0x4df3();}import a5_0x188159 from'../../lib/extends/command.js';import{getThreadState,downloadFiles}from'../../lib/service/cloud-agent.js';export default class CodeFiles extends a5_0x188159{static [a5_0x18484c(0x115)]=a5_0x18484c(0x120);static ['enableJsonFlag']=!![];static [a5_0x18484c(0x121)]=[a5_0x18484c(0x118),a5_0x18484c(0x114)];static [a5_0x18484c(0x111)]={'thread-id':Flags[a5_0x18484c(0x12b)]({'description':a5_0x18484c(0x112),'required':!![]}),'download':Flags[a5_0x18484c(0x12b)]({'description':a5_0x18484c(0x135),'multiple':!![]})};async['run'](){const _0x4b571c=a5_0x18484c;await this[_0x4b571c(0x11d)]();const {flags:_0x110e2d}=await this[_0x4b571c(0x12e)](CodeFiles),_0x4e4c53=this[_0x4b571c(0x130)]();if(_0x110e2d[_0x4b571c(0x131)]&&_0x110e2d[_0x4b571c(0x131)][_0x4b571c(0x129)]>0x0)return this[_0x4b571c(0x12c)](_0x110e2d[_0x4b571c(0x123)],_0x110e2d[_0x4b571c(0x131)],_0x4e4c53);return this[_0x4b571c(0x117)](_0x110e2d['thread-id'],_0x4e4c53);}async[a5_0x18484c(0x117)](_0x434886,_0x2127b5){const _0xe210d2=a5_0x18484c;!_0x2127b5&&await this['createLoading']('正在获取文件列表...');try{const _0x4614ed=await getThreadState(_0x434886),_0x158706=_0x4614ed['values']?.[_0xe210d2(0x132)]??{};this[_0xe210d2(0x11c)](_0xe210d2(0x126));if(!_0x2127b5){const _0x1bf344=Object[_0xe210d2(0x11e)](_0x158706);if(_0x1bf344[_0xe210d2(0x129)]===0x0)this[_0xe210d2(0x124)]('(暂无文件)');else{this['log']('共\x20'+_0x1bf344[_0xe210d2(0x129)]+_0xe210d2(0x113));for(const _0x1aa6c2 of _0x1bf344){this[_0xe210d2(0x124)]('\x20\x20'+_0x1aa6c2);}}}return{'thread_id':_0x434886,'files':_0x158706};}catch(_0x582e8d){this[_0xe210d2(0x11c)](),this[_0xe210d2(0x128)](_0x582e8d instanceof Error?_0x582e8d[_0xe210d2(0x12f)]:String(_0x582e8d));}}async['downloadMode'](_0x85ad18,_0x97dafd,_0x93b452){const _0x1b89b7=a5_0x18484c;!_0x93b452&&await this[_0x1b89b7(0x127)](_0x1b89b7(0x116)+_0x97dafd[_0x1b89b7(0x129)]+_0x1b89b7(0x10f));try{const _0x4556d3=await downloadFiles(_0x85ad18,_0x97dafd);this['stopLoading']('下载完成');if(!_0x93b452)for(const _0x522ff2 of _0x4556d3){_0x522ff2[_0x1b89b7(0x128)]?this[_0x1b89b7(0x124)]('❌\x20'+_0x522ff2['path']+':\x20'+_0x522ff2['error']):this[_0x1b89b7(0x124)]('✅\x20'+_0x522ff2['path']+'\x20('+(_0x522ff2['content']?.['length']??0x0)+'\x20bytes)');}return{'thread_id':_0x85ad18,'results':_0x4556d3};}catch(_0x24c082){this[_0x1b89b7(0x11c)](),this['error'](_0x24c082 instanceof Error?_0x24c082['message']:String(_0x24c082));}}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const a6_0x29bbe7=a6_0x952d;(function(_0x2c31c1,_0x59614d){const _0x33855b=a6_0x952d,_0x3771ec=_0x2c31c1();while(!![]){try{const _0x4331dd=parseInt(_0x33855b(0x1d5))/0x1+parseInt(_0x33855b(0x1cc))/0x2+-parseInt(_0x33855b(0x1db))/0x3+parseInt(_0x33855b(0x1d2))/0x4*(-parseInt(_0x33855b(0x1c9))/0x5)+-parseInt(_0x33855b(0x1d9))/0x6+-parseInt(_0x33855b(0x1c5))/0x7*(parseInt(_0x33855b(0x1e3))/0x8)+-parseInt(_0x33855b(0x1d7))/0x9*(-parseInt(_0x33855b(0x1c3))/0xa);if(_0x4331dd===_0x59614d)break;else _0x3771ec['push'](_0x3771ec['shift']());}catch(_0x5a39cf){_0x3771ec['push'](_0x3771ec['shift']());}}}(a6_0x1e09,0xacad0));function a6_0x952d(_0x4fdc0c,_0x558ebf){_0x4fdc0c=_0x4fdc0c-0x1c0;const _0x1e09a5=a6_0x1e09();let _0x952d96=_0x1e09a5[_0x4fdc0c];return _0x952d96;}import{Flags}from'@oclif/core';import a6_0x6ec9fb from'../../lib/extends/command.js';import{lookupDeployment,getProjectThread}from'../../lib/service/manage.js';function a6_0x1e09(){const _0x3fe95b=['deploy_status','3420630UNSogG','应用短链\x20URL','711579lbuZEt','...','project_id','会话\x20ID:\x20\x20\x20\x20','match','版本:\x20\x20\x20\x20\x20\x20\x20','企业\x20ID:\x20\x20\x20\x20','项目\x20ID:\x20\x20\x20\x20','5416iEDkev','version_number','log','error','部署状态:\x20\x20\x20','examples','10BZJuhV','<%=\x20config.bin\x20%>\x20code\x20lookup\x20--url\x20https://o.wpsgo.com/app/41000207/6Ne2UkWT3ytn/\x20--json','10990jTBLgP','enableJsonFlag','company_id','short_slug','180WifTeB','version_id','run','1736946GWondr','(无)','通过短链反查项目信息(project_id、thread_id\x20等),用于重新部署','deployment_id','url','createLoading','5928GPZZlR','短链标识:\x20\x20\x20','正在查询\x20','216058ovupON','stopLoading','13916601iGJcZZ'];a6_0x1e09=function(){return _0x3fe95b;};return a6_0x1e09();}function parseShortUrl(_0x15ff52){const _0x16c880=a6_0x952d,_0x3fef5f=_0x15ff52[_0x16c880(0x1df)](/\/app\/([^/]+)\/([^/]+)/);if(!_0x3fef5f)throw new Error('无法解析短链:\x20'+_0x15ff52+'\x0a'+'短链格式应为:\x20https://o.wpsgo.com/app/<company_id>/<short_slug>/');return{'companyId':_0x3fef5f[0x1],'shortSlug':_0x3fef5f[0x2]};}export default class CodeLookup extends a6_0x6ec9fb{static ['description']=a6_0x29bbe7(0x1ce);static [a6_0x29bbe7(0x1c6)]=!![];static [a6_0x29bbe7(0x1c2)]=[a6_0x29bbe7(0x1c4)];static ['flags']={'url':Flags['string']({'description':a6_0x29bbe7(0x1da),'required':!![]})};async[a6_0x29bbe7(0x1cb)](){const _0x4ce1fe=a6_0x29bbe7;await this['requireAuth']();const {flags:_0x4ba3a8}=await this['parse'](CodeLookup),_0xa48b9b=this['jsonEnabled'](),{companyId:_0x4bc17b,shortSlug:_0x429c80}=parseShortUrl(_0x4ba3a8[_0x4ce1fe(0x1d0)]);try{if(!_0xa48b9b)await this[_0x4ce1fe(0x1d1)](_0x4ce1fe(0x1d4)+_0x4bc17b+'/'+_0x429c80+_0x4ce1fe(0x1dc));const _0x310a8b=await lookupDeployment(_0x4bc17b,_0x429c80);let _0x24f854=null;try{const _0x944e3c=await getProjectThread(_0x310a8b[_0x4ce1fe(0x1dd)]);_0x24f854=_0x944e3c['thread_id'];}catch{}return!_0xa48b9b&&(this[_0x4ce1fe(0x1d6)]('查询成功'),this[_0x4ce1fe(0x1e5)](_0x4ce1fe(0x1e2)+_0x310a8b['project_id']),this['log'](_0x4ce1fe(0x1de)+(_0x24f854??_0x4ce1fe(0x1cd))),this['log']('部署\x20ID:\x20\x20\x20\x20'+_0x310a8b[_0x4ce1fe(0x1cf)]),this[_0x4ce1fe(0x1e5)](_0x4ce1fe(0x1e0)+_0x310a8b[_0x4ce1fe(0x1e4)]+'\x20('+_0x310a8b[_0x4ce1fe(0x1ca)]+')'),this[_0x4ce1fe(0x1e5)](_0x4ce1fe(0x1c1)+_0x310a8b[_0x4ce1fe(0x1d8)]),this[_0x4ce1fe(0x1e5)](_0x4ce1fe(0x1e1)+_0x310a8b[_0x4ce1fe(0x1c7)]),this[_0x4ce1fe(0x1e5)](_0x4ce1fe(0x1d3)+_0x310a8b[_0x4ce1fe(0x1c8)])),{'project_id':_0x310a8b['project_id'],'thread_id':_0x24f854,'deployment_id':_0x310a8b[_0x4ce1fe(0x1cf)],'version_id':_0x310a8b[_0x4ce1fe(0x1ca)],'version_number':_0x310a8b['version_number'],'company_id':_0x310a8b[_0x4ce1fe(0x1c7)],'short_slug':_0x310a8b[_0x4ce1fe(0x1c8)],'deploy_status':_0x310a8b['deploy_status']};}catch(_0x69c141){this[_0x4ce1fe(0x1d6)]();const _0x3d760f=_0x69c141 instanceof Error?_0x69c141['message']:String(_0x69c141);if(_0xa48b9b)return{'project_id':0x0,'thread_id':null,'deployment_id':'','version_id':0x0,'version_number':'','company_id':_0x4bc17b,'short_slug':_0x429c80,'deploy_status':_0x4ce1fe(0x1c0),'error':_0x3d760f};this['error'](_0x3d760f);}}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a7_0x4a4621=a7_0x2c37;function a7_0x2683(){const _0x4486ee=['版本号(默认自动生成)','message','waiting','build-command','timeout','运行时地址:\x20','now','306aaSHQi','colorize','createLoading','spinner','build_result','云端\x20Agent\x20正在等待用户确认:','error','545752uLnaXw','running','toString','stopLoading','33ufJepl','agent_waiting','359538cslcdB','。请先处理确认后再发布。','10jehbCX','failed','版本已创建:\x20','green','deployed','status','integer','会话\x20ID','jsonEnabled','...','构建日志\x20(最近\x2020\x20条):','log','run','云端\x20Agent\x20仍在生成代码,请稍后再试。','2786970mCgHbC','230IuccVS','build_logs','flags','requireAuth','项目\x20ID','resolveVersion','198451vVriDD','超时时间(秒)','short_url','未知错误','6376vWWieO','自定义构建命令','examples','<%=\x20config.bin\x20%>\x20code\x20publish\x20--project-id\x20206\x20--thread-id\x20thread_xxx\x20--version\x201.0.0','interrupt','slice','step','enableJsonFlag','发布失败','access_url','45JbiUPL','description','length','agent_running','deploy_error','创建版本\x20','text','thread-id','string','792645fCHzqc'];a7_0x2683=function(){return _0x4486ee;};return a7_0x2683();}(function(_0x3f67b7,_0x19a957){const _0x59eb77=a7_0x2c37,_0x3e73da=_0x3f67b7();while(!![]){try{const _0x171525=parseInt(_0x59eb77(0xda))/0x1*(parseInt(_0x59eb77(0xcf))/0x2)+-parseInt(_0x59eb77(0xdc))/0x3+parseInt(_0x59eb77(0xd6))/0x4*(parseInt(_0x59eb77(0xde))/0x5)+parseInt(_0x59eb77(0xec))/0x6+parseInt(_0x59eb77(0xc7))/0x7+-parseInt(_0x59eb77(0xf7))/0x8*(parseInt(_0x59eb77(0x101))/0x9)+-parseInt(_0x59eb77(0xed))/0xa*(parseInt(_0x59eb77(0xf3))/0xb);if(_0x171525===_0x19a957)break;else _0x3e73da['push'](_0x3e73da['shift']());}catch(_0x132418){_0x3e73da['push'](_0x3e73da['shift']());}}}(a7_0x2683,0x4d5d1));function a7_0x2c37(_0x5623b7,_0x1cd104){_0x5623b7=_0x5623b7-0xc5;const _0x268302=a7_0x2683();let _0x2c3714=_0x268302[_0x5623b7];return _0x2c3714;}import{Flags}from'@oclif/core';import a7_0xfb0e43 from'../../lib/extends/command.js';import{createVersion}from'../../lib/service/manage.js';import{runFullPublish}from'../../lib/service/cloud-publish.js';import{getProjectContext}from'../../lib/service/project-context.js';export default class CodePublish extends a7_0xfb0e43{static ['description']='发布云端项目(构建\x20→\x20部署\x20→\x20返回运行时地址)';static [a7_0x4a4621(0xfe)]=!![];static [a7_0x4a4621(0xf9)]=['<%=\x20config.bin\x20%>\x20code\x20publish\x20--project-id\x20206\x20--thread-id\x20thread_xxx\x20--json',a7_0x4a4621(0xfa)];static [a7_0x4a4621(0xef)]={'project-id':Flags[a7_0x4a4621(0xe4)]({'description':a7_0x4a4621(0xf1),'required':!![]}),'thread-id':Flags[a7_0x4a4621(0xc6)]({'description':a7_0x4a4621(0xe5),'required':!![]}),'version':Flags[a7_0x4a4621(0xc6)]({'description':a7_0x4a4621(0xc8)}),'build-command':Flags[a7_0x4a4621(0xc6)]({'description':a7_0x4a4621(0xf8)}),'skip-build':Flags['boolean']({'description':'跳过构建,直接发布','default':![]}),'timeout':Flags[a7_0x4a4621(0xe4)]({'description':a7_0x4a4621(0xf4),'default':0x258})};async[a7_0x4a4621(0xea)](){const _0x3c507e=a7_0x4a4621;await this[_0x3c507e(0xf0)]();const {flags:_0x185d45}=await this['parse'](CodePublish),_0x34116d=this[_0x3c507e(0xe6)](),_0x35b6d1=_0x185d45['project-id'],_0x214e0b=_0x185d45[_0x3c507e(0xc5)],_0x99ee1c=_0x185d45[_0x3c507e(0xcc)]*0x3e8;try{const _0x421c78=await getProjectContext(_0x214e0b,_0x35b6d1);if(_0x421c78['interrupt'][_0x3c507e(0xca)]){const _0x177c42=_0x421c78[_0x3c507e(0xfb)][_0x3c507e(0x102)]??'',_0x1f2249=_0x3c507e(0xd4)+_0x177c42+_0x3c507e(0xdd);if(_0x34116d)return{'status':_0x3c507e(0xdf),'project_id':_0x35b6d1,'version_id':0x0,'error':_0x1f2249,'reason':_0x3c507e(0xdb)};this[_0x3c507e(0xd5)](_0x1f2249);}if(_0x421c78['agent'][_0x3c507e(0xd7)]){const _0x5f4392=_0x3c507e(0xeb);if(_0x34116d)return{'status':_0x3c507e(0xdf),'project_id':_0x35b6d1,'version_id':0x0,'error':_0x5f4392,'reason':_0x3c507e(0x104)};this['error'](_0x5f4392);}const _0x4d02ca=await this['resolveVersion'](_0x35b6d1,_0x185d45['version'],_0x34116d);!_0x34116d&&await this[_0x3c507e(0xd1)]('开始发布...');const _0x5adece=_0x34116d?undefined:_0x16886c=>{const _0x5627fd=_0x3c507e;this['spinner']&&(this[_0x5627fd(0xd2)][_0x5627fd(0x107)]='['+_0x16886c[_0x5627fd(0xfd)]+']\x20'+_0x16886c['message']);},_0x1c7f85=await runFullPublish({'threadId':_0x214e0b,'projectId':_0x35b6d1,'versionId':_0x4d02ca,'buildCommand':_0x185d45[_0x3c507e(0xcb)],'skipBuild':_0x185d45['skip-build']},_0x5adece,_0x99ee1c);this[_0x3c507e(0xd9)]();if(_0x1c7f85[_0x3c507e(0xe3)]===_0x3c507e(0xe2))return!_0x34116d&&(this[_0x3c507e(0xe9)](this[_0x3c507e(0xd0)]('发布成功!',_0x3c507e(0xe1))),this['log'](_0x3c507e(0xcd)+_0x1c7f85[_0x3c507e(0x100)])),{'status':_0x3c507e(0xe2),'project_id':_0x35b6d1,'version_id':_0x4d02ca,'access_url':_0x1c7f85[_0x3c507e(0x100)],'short_url':_0x1c7f85[_0x3c507e(0xf5)]};const _0xb4ca30=_0x1c7f85[_0x3c507e(0x105)]??_0x3c507e(0xf6);if(!_0x34116d){this['log'](this[_0x3c507e(0xd0)](_0x3c507e(0xff),'red')),this[_0x3c507e(0xe9)]('原因:\x20'+_0xb4ca30);if(_0x1c7f85[_0x3c507e(0xee)]?.[_0x3c507e(0x103)]){this[_0x3c507e(0xe9)](this[_0x3c507e(0xd0)](_0x3c507e(0xe8),'yellow'));for(const _0x531dbf of _0x1c7f85[_0x3c507e(0xee)]['slice'](-0x14)){this['log']('\x20\x20'+_0x531dbf);}}}return{'status':_0x3c507e(0xdf),'project_id':_0x35b6d1,'version_id':_0x4d02ca,'error':_0xb4ca30,'build_logs':_0x1c7f85['build_logs']?.[_0x3c507e(0xfc)](-0x1e),'build_result':_0x1c7f85[_0x3c507e(0xd3)]};}catch(_0x3e4231){this[_0x3c507e(0xd9)]();const _0x26693f=_0x3e4231 instanceof Error?_0x3e4231[_0x3c507e(0xc9)]:String(_0x3e4231);if(_0x34116d)return{'status':'failed','project_id':_0x35b6d1,'version_id':0x0,'error':_0x26693f};this[_0x3c507e(0xd5)](_0x26693f);}}async[a7_0x4a4621(0xf2)](_0x4af711,_0x5c1ac4,_0x53e857){const _0x57e71c=a7_0x4a4621,_0x34a6f9=_0x5c1ac4??'v'+Date[_0x57e71c(0xce)]()[_0x57e71c(0xd8)](0x24);!_0x53e857&&await this[_0x57e71c(0xd1)](_0x57e71c(0x106)+_0x34a6f9+_0x57e71c(0xe7));const _0x59af21=await createVersion(_0x4af711,_0x34a6f9);return!_0x53e857&&this[_0x57e71c(0xd9)](_0x57e71c(0xe0)+_0x59af21['id']+'\x20('+_0x34a6f9+')'),_0x59af21['id'];}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const a8_0x200bbe=a8_0x40c1;(function(_0x3c221b,_0x356207){const _0x2206c1=a8_0x40c1,_0x13f9fd=_0x3c221b();while(!![]){try{const _0x448725=-parseInt(_0x2206c1(0x1b6))/0x1*(-parseInt(_0x2206c1(0x1bc))/0x2)+-parseInt(_0x2206c1(0x1d0))/0x3*(parseInt(_0x2206c1(0x1be))/0x4)+-parseInt(_0x2206c1(0x1d1))/0x5+-parseInt(_0x2206c1(0x1b4))/0x6*(parseInt(_0x2206c1(0x1bd))/0x7)+-parseInt(_0x2206c1(0x1c1))/0x8+parseInt(_0x2206c1(0x1b2))/0x9+parseInt(_0x2206c1(0x1d5))/0xa;if(_0x448725===_0x356207)break;else _0x13f9fd['push'](_0x13f9fd['shift']());}catch(_0x211bb6){_0x13f9fd['push'](_0x13f9fd['shift']());}}}(a8_0xe89d,0x4660c));import{Flags}from'@oclif/core';import a8_0x324f58 from'../../lib/extends/command.js';import{recallDeployment,lookupDeployment}from'../../lib/service/manage.js';function a8_0x40c1(_0x3e28b8,_0x13b192){_0x3e28b8=_0x3e28b8-0x1ac;const _0xe89d97=a8_0xe89d();let _0x40c153=_0xe89d97[_0x3e28b8];return _0x40c153;}function a8_0xe89d(){const _0x3f0b54=['部署\x20ID:\x20','10772020eUgnkU','\x0a格式应为:\x20https://o.wpsgo.com/app/<company_id>/<short_slug>/','项目\x20ID(与\x20--url\x20二选一)','error','正在查询\x20','enableJsonFlag','下架成功','...','无法解析短链:\x20','正在下架项目\x20','3905478paFfQt','string','120NWnhdd','stopLoading','14621JtBity','project_id','run','parse','找到项目\x20','url','2IrJNIp','59668qMDJUt','141820iuVVAz','project-id','deployment_id','552568dQUJkS','recalled','requireAuth','status','companyId','状态:\x20\x20\x20\x20','应用短链\x20URL(与\x20--project-id\x20二选一)','shortSlug','log','createLoading','下架已部署的应用(recall),使其不再可访问','integer','description','flags','<%=\x20config.bin\x20%>\x20code\x20recall\x20--url\x20https://o.wpsgo.com/app/41000207/6Ne2UkWT3ytn/\x20--json','39PrngrD','2685155CSLzMq','match','message'];a8_0xe89d=function(){return _0x3f0b54;};return a8_0xe89d();}function parseShortUrl(_0x1dace0){const _0x247db4=a8_0x40c1,_0x26c0b0=_0x1dace0[_0x247db4(0x1d2)](/\/app\/([^/]+)\/([^/]+)/);return _0x26c0b0?{'companyId':_0x26c0b0[0x1],'shortSlug':_0x26c0b0[0x2]}:null;}export default class CodeRecall extends a8_0x324f58{static [a8_0x200bbe(0x1cd)]=a8_0x200bbe(0x1cb);static [a8_0x200bbe(0x1ad)]=!![];static ['examples']=['<%=\x20config.bin\x20%>\x20code\x20recall\x20--project-id\x20206\x20--json',a8_0x200bbe(0x1cf)];static [a8_0x200bbe(0x1ce)]={'project-id':Flags[a8_0x200bbe(0x1cc)]({'description':a8_0x200bbe(0x1d7)}),'url':Flags[a8_0x200bbe(0x1b3)]({'description':a8_0x200bbe(0x1c7)})};async[a8_0x200bbe(0x1b8)](){const _0x3b0681=a8_0x200bbe;await this[_0x3b0681(0x1c3)]();const {flags:_0x194cdd}=await this[_0x3b0681(0x1b9)](CodeRecall),_0x298b5a=this['jsonEnabled']();try{let _0x1c8506=_0x194cdd[_0x3b0681(0x1bf)];if(!_0x1c8506&&_0x194cdd[_0x3b0681(0x1bb)]){const _0xa8075e=parseShortUrl(_0x194cdd['url']);if(!_0xa8075e)throw new Error(_0x3b0681(0x1b0)+_0x194cdd[_0x3b0681(0x1bb)]+_0x3b0681(0x1d6));if(!_0x298b5a)await this[_0x3b0681(0x1ca)](_0x3b0681(0x1ac)+_0xa8075e[_0x3b0681(0x1c5)]+'/'+_0xa8075e[_0x3b0681(0x1c8)]+_0x3b0681(0x1af));const _0x4513ea=await lookupDeployment(_0xa8075e[_0x3b0681(0x1c5)],_0xa8075e[_0x3b0681(0x1c8)]);_0x1c8506=_0x4513ea[_0x3b0681(0x1b7)];if(!_0x298b5a)this[_0x3b0681(0x1b5)](_0x3b0681(0x1ba)+_0x1c8506);}if(!_0x1c8506)throw new Error('请提供\x20--project-id\x20或\x20--url\x20参数');if(!_0x298b5a)await this['createLoading'](_0x3b0681(0x1b1)+_0x1c8506+_0x3b0681(0x1af));const _0x667091=await recallDeployment(_0x1c8506);return!_0x298b5a&&(this[_0x3b0681(0x1b5)](_0x3b0681(0x1ae)),this[_0x3b0681(0x1c9)](_0x3b0681(0x1d4)+_0x667091['deployment_id']),this[_0x3b0681(0x1c9)](_0x3b0681(0x1c6)+_0x667091[_0x3b0681(0x1c4)])),{'status':_0x3b0681(0x1c2),'project_id':_0x1c8506,'deployment_id':_0x667091[_0x3b0681(0x1c0)]};}catch(_0x25733f){this[_0x3b0681(0x1b5)]();const _0x55f39a=_0x25733f instanceof Error?_0x25733f[_0x3b0681(0x1d3)]:String(_0x25733f);if(_0x298b5a)return{'status':'failed','project_id':_0x194cdd[_0x3b0681(0x1bf)]??0x0,'deployment_id':'','error':_0x55f39a};this[_0x3b0681(0x1d8)](_0x55f39a);}}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a9_0x2326(){const _0x57c793=['会话\x20ID','并恢复\x20Agent...','恢复被中断的云端\x20Agent(HITL\x20确认/拒绝)','<%=\x20config.bin\x20%>\x20code\x20resume\x20--thread-id\x20thread_xxx\x20--approve\x20--json','run','examples','1727001ajzFzP','1787114VOksLo','thread-id','assistant-id','拒绝当前方案','20539288EusZXC','resumed','756ZGnKiF','2109416fjQYjI','boolean','),云端正在继续处理','附加说明(拒绝时建议提供)','enableJsonFlag','reject','app-buddy','message','17410txwGns','<%=\x20config.bin\x20%>\x20code\x20resume\x20--thread-id\x20thread_xxx\x20--reject\x20--message\x20\x22换个方案\x22\x20--json','808IMssJx','18ycJSfG','Agent\x20已恢复\x20(','parse','approve','1316530FUVtyu','12okWfbk','2078nddGNi','description','批准当前方案(默认)'];a9_0x2326=function(){return _0x57c793;};return a9_0x2326();}const a9_0x4c783f=a9_0x1b06;(function(_0x385153,_0x423433){const _0x30453f=a9_0x1b06,_0x11368a=_0x385153();while(!![]){try{const _0x39c59d=-parseInt(_0x30453f(0x1d4))/0x1*(parseInt(_0x30453f(0x1e4))/0x2)+parseInt(_0x30453f(0x1dd))/0x3+-parseInt(_0x30453f(0x1cd))/0x4*(parseInt(_0x30453f(0x1cb))/0x5)+-parseInt(_0x30453f(0x1d3))/0x6*(parseInt(_0x30453f(0x1de))/0x7)+-parseInt(_0x30453f(0x1e5))/0x8+parseInt(_0x30453f(0x1ce))/0x9*(parseInt(_0x30453f(0x1d2))/0xa)+parseInt(_0x30453f(0x1e2))/0xb;if(_0x39c59d===_0x423433)break;else _0x11368a['push'](_0x11368a['shift']());}catch(_0x443350){_0x11368a['push'](_0x11368a['shift']());}}}(a9_0x2326,0x6c2ac));import{Flags}from'@oclif/core';import a9_0x41a61a from'../../lib/extends/command.js';import{resumeRun}from'../../lib/service/cloud-agent.js';function a9_0x1b06(_0x5d9536,_0x1bb0dd){_0x5d9536=_0x5d9536-0x1c7;const _0x232634=a9_0x2326();let _0x1b06b8=_0x232634[_0x5d9536];return _0x1b06b8;}export default class CodeResume extends a9_0x41a61a{static [a9_0x4c783f(0x1d5)]=a9_0x4c783f(0x1d9);static [a9_0x4c783f(0x1c7)]=!![];static [a9_0x4c783f(0x1dc)]=[a9_0x4c783f(0x1da),a9_0x4c783f(0x1cc)];static ['flags']={'thread-id':Flags['string']({'description':a9_0x4c783f(0x1d7),'required':!![]}),'approve':Flags[a9_0x4c783f(0x1e6)]({'description':a9_0x4c783f(0x1d6),'exclusive':[a9_0x4c783f(0x1c8)]}),'reject':Flags['boolean']({'description':a9_0x4c783f(0x1e1),'exclusive':[a9_0x4c783f(0x1d1)]}),'message':Flags['string']({'description':a9_0x4c783f(0x1e8)}),'assistant-id':Flags['string']({'description':'云端\x20Agent\x20ID','default':a9_0x4c783f(0x1c9)})};async[a9_0x4c783f(0x1db)](){const _0x41bc0a=a9_0x4c783f;await this['requireAuth']();const {flags:_0x2e012e}=await this[_0x41bc0a(0x1d0)](CodeResume),_0xdd957b=this['jsonEnabled'](),_0x2c4b77=_0x2e012e[_0x41bc0a(0x1df)],_0x14f526=_0x2e012e[_0x41bc0a(0x1c8)]===!![],_0x1538bc=_0x14f526?'reject':_0x41bc0a(0x1d1),_0x13dbb6={'type':_0x1538bc};_0x2e012e[_0x41bc0a(0x1ca)]&&(_0x13dbb6[_0x41bc0a(0x1ca)]=_0x2e012e[_0x41bc0a(0x1ca)]);const _0x43499e={'decisions':[_0x13dbb6]};if(!_0xdd957b)this['log']('正在'+(_0x14f526?'拒绝':'批准')+_0x41bc0a(0x1d8));return await resumeRun({'threadId':_0x2c4b77,'resumeValue':_0x43499e,'assistantId':_0x2e012e[_0x41bc0a(0x1e0)]}),!_0xdd957b&&this['log'](_0x41bc0a(0x1cf)+_0x1538bc+_0x41bc0a(0x1e7)),{'status':_0x41bc0a(0x1e3),'thread_id':_0x2c4b77,'action':_0x1538bc};}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a10_0x372e32=a10_0x55eb;function a10_0x5ca3(){const _0x47e4e4=['项目\x20ID(从\x20code\x20create\x20获取,用于生成访问地址)','6866648oVzVit','parse','jsonEnabled','app-buddy','32148522fUlDPW','log','submitted','消息已提交,云端\x20Agent\x20正在处理','云端\x20Agent\x20ID','requireAuth','project-id','会话\x20ID(从\x20code\x20create\x20获取)','84CIyixK','424815pxXNmJ','发送给云端\x20Agent\x20的消息','run','329785WBrsOL','3840612kzwwjE','向云端\x20Agent\x20发送消息(提交后立即返回)','696499eMbZia','thread-id','4697210SYwiud','提交消息到云端\x20Agent...','description','args','2ZYwIdD','string','integer','message','enableJsonFlag','flags'];a10_0x5ca3=function(){return _0x47e4e4;};return a10_0x5ca3();}function a10_0x55eb(_0x5b991c,_0x4e5c2f){_0x5b991c=_0x5b991c-0xf1;const _0x5ca3f3=a10_0x5ca3();let _0x55eba9=_0x5ca3f3[_0x5b991c];return _0x55eba9;}(function(_0x4e1cdf,_0x2da2f5){const _0x2b46da=a10_0x55eb,_0x3db9b1=_0x4e1cdf();while(!![]){try{const _0xa9835b=-parseInt(_0x2b46da(0x108))/0x1*(parseInt(_0x2b46da(0x10e))/0x2)+parseInt(_0x2b46da(0x102))/0x3+parseInt(_0x2b46da(0x101))/0x4*(-parseInt(_0x2b46da(0x105))/0x5)+parseInt(_0x2b46da(0x106))/0x6+-parseInt(_0x2b46da(0x10a))/0x7+-parseInt(_0x2b46da(0xf5))/0x8+parseInt(_0x2b46da(0xf9))/0x9;if(_0xa9835b===_0x2da2f5)break;else _0x3db9b1['push'](_0x3db9b1['shift']());}catch(_0x4a49aa){_0x3db9b1['push'](_0x3db9b1['shift']());}}}(a10_0x5ca3,0xb5598));import{Args,Flags}from'@oclif/core';import a10_0x260093 from'../../lib/extends/command.js';import{submitRun}from'../../lib/service/cloud-agent.js';export default class CodeSend extends a10_0x260093{static [a10_0x372e32(0x10c)]=a10_0x372e32(0x107);static [a10_0x372e32(0xf2)]=!![];static ['examples']=['<%=\x20config.bin\x20%>\x20code\x20send\x20--thread-id\x20thread_xxx\x20--project-id\x20206\x20\x22做一个待办应用\x22\x20--json'];static [a10_0x372e32(0x10d)]={'message':Args[a10_0x372e32(0x10f)]({'description':a10_0x372e32(0x103),'required':!![]})};static [a10_0x372e32(0xf3)]={'thread-id':Flags[a10_0x372e32(0x10f)]({'description':a10_0x372e32(0x100),'required':!![]}),'project-id':Flags[a10_0x372e32(0x110)]({'description':a10_0x372e32(0xf4)}),'assistant-id':Flags[a10_0x372e32(0x10f)]({'description':a10_0x372e32(0xfd),'default':a10_0x372e32(0xf8)})};async[a10_0x372e32(0x104)](){const _0x55fdb6=a10_0x372e32;await this[_0x55fdb6(0xfe)]();const {args:_0x1ba461,flags:_0x446867}=await this[_0x55fdb6(0xf6)](CodeSend),_0x4f78a4=this[_0x55fdb6(0xf7)](),_0x8195e2=_0x446867[_0x55fdb6(0x109)],_0x227008=_0x446867[_0x55fdb6(0xff)];if(!_0x4f78a4)this[_0x55fdb6(0xfa)](_0x55fdb6(0x10b));return await submitRun({'threadId':_0x8195e2,'messages':[{'role':'user','content':_0x1ba461[_0x55fdb6(0xf1)]}],'assistantId':_0x446867['assistant-id']}),!_0x4f78a4&&this['log'](_0x55fdb6(0xfc)),{'status':_0x55fdb6(0xfb),'thread_id':_0x8195e2,'project_id':_0x227008};}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a11_0x424246=a11_0x5e81;(function(_0x1c5838,_0xc895b5){const _0x39bb64=a11_0x5e81,_0x3ec812=_0x1c5838();while(!![]){try{const _0x2a741d=parseInt(_0x39bb64(0xca))/0x1*(parseInt(_0x39bb64(0xf0))/0x2)+-parseInt(_0x39bb64(0xdf))/0x3+-parseInt(_0x39bb64(0xe8))/0x4*(-parseInt(_0x39bb64(0xd8))/0x5)+-parseInt(_0x39bb64(0xe3))/0x6*(parseInt(_0x39bb64(0xe7))/0x7)+parseInt(_0x39bb64(0xc4))/0x8+-parseInt(_0x39bb64(0xde))/0x9*(parseInt(_0x39bb64(0xe5))/0xa)+parseInt(_0x39bb64(0xcc))/0xb;if(_0x2a741d===_0xc895b5)break;else _0x3ec812['push'](_0x3ec812['shift']());}catch(_0x16661d){_0x3ec812['push'](_0x3ec812['shift']());}}}(a11_0x352d,0xa3153));import{Flags}from'@oclif/core';function a11_0x5e81(_0xc8a42e,_0x42a29d){_0xc8a42e=_0xc8a42e-0xc0;const _0x352d1f=a11_0x352d();let _0x5e81f7=_0x352d1f[_0xc8a42e];return _0x5e81f7;}import a11_0x35b580 from'../../lib/extends/command.js';import{getProjectContext}from'../../lib/service/project-context.js';export default class CodeStatus extends a11_0x35b580{static [a11_0x424246(0xee)]=a11_0x424246(0xc1);static [a11_0x424246(0xce)]=!![];static ['examples']=['<%=\x20config.bin\x20%>\x20code\x20status\x20--thread-id\x20thread_xxx\x20--json','<%=\x20config.bin\x20%>\x20code\x20status\x20--thread-id\x20thread_xxx\x20--project-id\x20206\x20--json'];static [a11_0x424246(0xd2)]={'thread-id':Flags[a11_0x424246(0xef)]({'description':a11_0x424246(0xc0),'required':!![]}),'project-id':Flags[a11_0x424246(0xed)]({'description':a11_0x424246(0xea)})};async[a11_0x424246(0xdc)](){const _0x3372d2=a11_0x424246;await this[_0x3372d2(0xc2)]();const {flags:_0x5889bf}=await this['parse'](CodeStatus);!this['jsonEnabled']()&&await this[_0x3372d2(0xd9)]('正在查询项目状态...');try{const _0x8a0e9a=await getProjectContext(_0x5889bf[_0x3372d2(0xcb)],_0x5889bf[_0x3372d2(0xd6)]);return this[_0x3372d2(0xcd)](_0x3372d2(0xc7)),!this[_0x3372d2(0xd7)]()&&this[_0x3372d2(0xc9)](_0x8a0e9a),_0x8a0e9a;}catch(_0x292498){this['stopLoading'](),this['error'](_0x292498 instanceof Error?_0x292498[_0x3372d2(0xd0)]:String(_0x292498));}}[a11_0x424246(0xc9)](_0x230722){const _0x4e7544=a11_0x424246;this[_0x4e7544(0xdd)](_0x4e7544(0xda)+_0x230722[_0x4e7544(0xd4)]),this[_0x4e7544(0xdd)](_0x4e7544(0xf4)+_0x230722['agent'][_0x4e7544(0xd1)]+'\x20messages,\x20'+_0x230722['agent']['file_count']+_0x4e7544(0xf7)+_0x230722[_0x4e7544(0xc8)][_0x4e7544(0xf5)]+_0x4e7544(0xf6));if(_0x230722[_0x4e7544(0xf1)][_0x4e7544(0xe4)]){const _0x3eb4ff=_0x230722[_0x4e7544(0xf1)][_0x4e7544(0xee)]??_0x4e7544(0xe6);this['log'](this[_0x4e7544(0xe9)](_0x4e7544(0xd5)+_0x3eb4ff+'\x22',_0x4e7544(0xcf)));}this[_0x4e7544(0xdd)](_0x4e7544(0xe1)+_0x230722['build'][_0x4e7544(0xdb)]+(_0x230722[_0x4e7544(0xec)][_0x4e7544(0xd0)]?_0x4e7544(0xc3)+_0x230722[_0x4e7544(0xec)][_0x4e7544(0xd0)]:'')),this[_0x4e7544(0xdd)]('Deploy:\x20\x20\x20\x20'+_0x230722[_0x4e7544(0xe2)]['status']+(_0x230722[_0x4e7544(0xe2)][_0x4e7544(0xf3)]?_0x4e7544(0xf2)+_0x230722[_0x4e7544(0xe2)][_0x4e7544(0xf3)]:'')),_0x230722['urls']['runtime']&&this[_0x4e7544(0xdd)](_0x4e7544(0xc5)+_0x230722[_0x4e7544(0xe0)][_0x4e7544(0xc6)]),_0x230722[_0x4e7544(0xe0)][_0x4e7544(0xd3)]&&this[_0x4e7544(0xdd)](_0x4e7544(0xeb)+_0x230722[_0x4e7544(0xe0)]['short_url']);}}function a11_0x352d(){const _0x16d021=['会话\x20ID','查看云端项目综合状态(Agent\x20/\x20构建\x20/\x20部署\x20/\x20HITL\x20中断)','requireAuth','\x20—\x20','4440696liaXak','Runtime:\x20\x20\x20','runtime','查询完成','agent','printHuman','23aProwd','thread-id','34217513aLpoTV','stopLoading','enableJsonFlag','yellow','message','messages_count','flags','short_url','thread_id','⚠\x20WAITING:\x20Agent\x20等待确认\x20—\x20\x22','project-id','jsonEnabled','1427035DDEqHq','createLoading','Thread:\x20\x20\x20\x20','phase','run','log','2709CqJaUs','2912853xIeRCv','urls','Build:\x20\x20\x20\x20\x20','deploy','6AqYJNy','waiting','37490CWtshu','未知原因','8574559kxgidf','4kzLbPb','colorize','项目\x20ID(可选,传入后返回版本和部署信息)','Short\x20URL:\x20','build','integer','description','string','3578QlALRk','interrupt','\x20→\x20','access_url','Agent:\x20\x20\x20\x20\x20','tasks_count','\x20tasks','\x20files,\x20'];a11_0x352d=function(){return _0x16d021;};return a11_0x352d();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a12_0x48bc20=a12_0x1a74;(function(_0x1b431b,_0x535096){const _0x2dfeec=a12_0x1a74,_0x11a798=_0x1b431b();while(!![]){try{const _0x2d0b32=parseInt(_0x2dfeec(0x1dd))/0x1+-parseInt(_0x2dfeec(0x1f2))/0x2*(parseInt(_0x2dfeec(0x1fa))/0x3)+-parseInt(_0x2dfeec(0x1e6))/0x4+-parseInt(_0x2dfeec(0x1db))/0x5+parseInt(_0x2dfeec(0x1e3))/0x6+-parseInt(_0x2dfeec(0x1f3))/0x7+parseInt(_0x2dfeec(0x203))/0x8;if(_0x2d0b32===_0x535096)break;else _0x11a798['push'](_0x11a798['shift']());}catch(_0x3402fe){_0x11a798['push'](_0x11a798['shift']());}}}(a12_0x24b6,0x5d592));function a12_0x24b6(){const _0x4d71c4=['\x20MB','startsWith','name','2720450njqSfv','会话\x20ID','51246dWJjkI','不支持的文件类型:\x20','\x20个文件','没有可上传的文件','sandbox\x20中的目标目录前缀','string','4222236GigOFE','collectLocalFiles','jsonEnabled','2252816NDZIiE','.git','message','reduce','statSync','node_modules','toFixed','上传完成:\x20','error','.svn','thread-id','isBuffer','2VHtJcc','294826CJZGEK','replace','resolve','readdirSync','prefix','stopLoading','createLoading','928101gzNiOV','collectSingleFile','collectDirectory','description','正在上传...','.cache','push','isFile','<%=\x20config.bin\x20%>\x20code\x20upload\x20--thread-id\x20thread_xxx\x20-d\x20./my-site\x20--json','8689448eHhHqh','content','examples','dir','split','/index.html','isDirectory','coverage','\x20KB','log','readFileSync','relative','本地文件或目录路径','length','join','has','index.html','\x20个文件\x20(','endsWith','requireAuth'];a12_0x24b6=function(){return _0x4d71c4;};return a12_0x24b6();}import a12_0x366d35 from'node:fs';import a12_0x222f7e from'node:path';function a12_0x1a74(_0x536260,_0x44668a){_0x536260=_0x536260-0x1cd;const _0x24b6f7=a12_0x24b6();let _0x1a74a8=_0x24b6f7[_0x536260];return _0x1a74a8;}import{Flags}from'@oclif/core';import a12_0x4e1faa from'../../lib/extends/command.js';import{uploadFiles}from'../../lib/service/cloud-agent.js';const EXCLUDE_DIRS=new Set([a12_0x48bc20(0x1e7),a12_0x48bc20(0x1ef),'.hg',a12_0x48bc20(0x1eb),a12_0x48bc20(0x1ff),a12_0x48bc20(0x20a),'skills']);export default class CodeUpload extends a12_0x4e1faa{static [a12_0x48bc20(0x1fd)]='上传本地文件或目录到云端\x20Agent\x20会话的\x20sandbox';static ['enableJsonFlag']=!![];static [a12_0x48bc20(0x205)]=[a12_0x48bc20(0x202),'<%=\x20config.bin\x20%>\x20code\x20upload\x20--thread-id\x20thread_xxx\x20-d\x20./index.html\x20--json','<%=\x20config.bin\x20%>\x20code\x20upload\x20--thread-id\x20thread_xxx\x20-d\x20./dist\x20--prefix\x20code\x20--json'];static ['flags']={'thread-id':Flags[a12_0x48bc20(0x1e2)]({'description':a12_0x48bc20(0x1dc),'required':!![]}),'dir':Flags[a12_0x48bc20(0x1e2)]({'char':'d','description':a12_0x48bc20(0x1d0),'required':!![]}),'prefix':Flags['string']({'description':a12_0x48bc20(0x1e1),'default':'code'})};async['run'](){const _0x4f372e=a12_0x48bc20;await this[_0x4f372e(0x1d7)]();const {flags:_0x469da0}=await this['parse'](CodeUpload),_0x1aaf33=this[_0x4f372e(0x1e5)](),_0x3fb2db=a12_0x222f7e[_0x4f372e(0x1f5)](_0x469da0[_0x4f372e(0x206)]);!a12_0x366d35['existsSync'](_0x3fb2db)&&this['error']('路径不存在:\x20'+_0x3fb2db);const _0x31c7dc=_0x469da0[_0x4f372e(0x1f7)][_0x4f372e(0x1f4)](/\/+$/,'');!_0x1aaf33&&await this[_0x4f372e(0x1f9)]('正在收集文件...');const _0x2c7889=this[_0x4f372e(0x1e4)](_0x3fb2db,_0x31c7dc);_0x2c7889[_0x4f372e(0x1d1)]===0x0&&(this[_0x4f372e(0x1f8)](),this[_0x4f372e(0x1ee)](_0x4f372e(0x1e0)));const _0x244eee=_0x2c7889[_0x4f372e(0x1e9)]((_0x752970,_0x5a5072)=>{const _0x1cf050=_0x4f372e,_0x324cee=_0x5a5072[_0x1cf050(0x204)];return _0x752970+(Buffer[_0x1cf050(0x1f1)](_0x324cee)?_0x324cee[_0x1cf050(0x1d1)]:Buffer['byteLength'](_0x324cee));},0x0);!_0x1aaf33&&(this[_0x4f372e(0x1f8)]('收集到\x20'+_0x2c7889['length']+_0x4f372e(0x1d5)+formatBytes(_0x244eee)+')'),await this[_0x4f372e(0x1f9)](_0x4f372e(0x1fe)));try{await uploadFiles(_0x469da0[_0x4f372e(0x1f0)],_0x2c7889);const _0x597fc6=_0x2c7889['map'](_0xd399f0=>_0xd399f0['name']);this[_0x4f372e(0x1f8)](_0x4f372e(0x1ed)+_0x2c7889[_0x4f372e(0x1d1)]+_0x4f372e(0x1df));if(!_0x1aaf33)for(const _0x38334a of _0x597fc6){this[_0x4f372e(0x1cd)]('\x20\x20'+_0x38334a);}return{'thread_id':_0x469da0['thread-id'],'uploaded':_0x2c7889['length'],'total_bytes':_0x244eee,'files':_0x597fc6,'prefix':_0x31c7dc};}catch(_0x5f2a12){this[_0x4f372e(0x1f8)](),this[_0x4f372e(0x1ee)](_0x5f2a12 instanceof Error?_0x5f2a12[_0x4f372e(0x1e8)]:String(_0x5f2a12));}}['collectLocalFiles'](_0x1bd30e,_0x506fcb){const _0x20e2fa=a12_0x48bc20,_0x2c39a1=a12_0x366d35[_0x20e2fa(0x1ea)](_0x1bd30e);if(_0x2c39a1[_0x20e2fa(0x201)]())return this['collectSingleFile'](_0x1bd30e,_0x506fcb);if(_0x2c39a1[_0x20e2fa(0x209)]())return this[_0x20e2fa(0x1fc)](_0x1bd30e,_0x506fcb);throw new Error(_0x20e2fa(0x1de)+_0x1bd30e);}[a12_0x48bc20(0x1fb)](_0x3648d5,_0xa6b682){const _0x113b8e=a12_0x48bc20,_0x41f4f4=a12_0x222f7e['basename'](_0x3648d5),_0x555c0c=a12_0x366d35[_0x113b8e(0x1ce)](_0x3648d5),_0x2f95db=[{'name':_0xa6b682+'/'+_0x41f4f4,'content':_0x555c0c}];return _0x41f4f4!==_0x113b8e(0x1d4)&&_0x41f4f4[_0x113b8e(0x1d6)]('.html')&&_0x2f95db['push']({'name':_0xa6b682+_0x113b8e(0x208),'content':_0x555c0c}),_0x2f95db;}[a12_0x48bc20(0x1fc)](_0x7f8d7e,_0x1f76ee){const _0x274d63=[],_0x299c91=_0x478150=>{const _0x274d5c=a12_0x1a74;for(const _0x5a296f of a12_0x366d35[_0x274d5c(0x1f6)](_0x478150,{'withFileTypes':!![]})){if(_0x5a296f[_0x274d5c(0x1da)][_0x274d5c(0x1d9)]('.')&&EXCLUDE_DIRS['has'](_0x5a296f[_0x274d5c(0x1da)]))continue;const _0x134036=a12_0x222f7e[_0x274d5c(0x1d2)](_0x478150,_0x5a296f[_0x274d5c(0x1da)]);if(_0x5a296f[_0x274d5c(0x209)]()){if(EXCLUDE_DIRS[_0x274d5c(0x1d3)](_0x5a296f[_0x274d5c(0x1da)]))continue;_0x299c91(_0x134036);}else{if(_0x5a296f['isFile']()){const _0x13cc60=a12_0x222f7e[_0x274d5c(0x1cf)](_0x7f8d7e,_0x134036)[_0x274d5c(0x207)](a12_0x222f7e['sep'])[_0x274d5c(0x1d2)]('/');_0x274d63[_0x274d5c(0x200)]({'name':_0x1f76ee+'/'+_0x13cc60,'content':a12_0x366d35['readFileSync'](_0x134036)});}}}};return _0x299c91(_0x7f8d7e),_0x274d63;}}function formatBytes(_0x5f3b47){const _0xc955eb=a12_0x48bc20;if(_0x5f3b47<0x400)return _0x5f3b47+'\x20B';if(_0x5f3b47<0x400*0x400)return(_0x5f3b47/0x400)['toFixed'](0x1)+_0xc955eb(0x20b);return(_0x5f3b47/(0x400*0x400))[_0xc955eb(0x1ec)](0x1)+_0xc955eb(0x1d8);}
|
package/dist/commands/update.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a13_0x1ceff4=a13_0x58ad;function a13_0x3d8c(){const _0x1a6868=['20KyYdgD','pipe','cyan','version','当前版本:\x20','trim','482920YHcymu','\x20...','jsonEnabled','发现新版本:\x20v','4XVqIjE','704226xLciKI','5395194PiYjkS','parse','createLoading','description','无法获取最新版本信息,请检查网络连接','正在更新\x20v','1749036etZEJA','node:module','90NpkkMT','utf-8','171KBbthj','stopLoading','正在检查最新版本...','log','error','../../package.json','6YsXmOB','1073171vZRhyd','npm\x20view\x20@wps365-open/comate-cli\x20version\x20--registry=https://registry.npmjs.org/','colorize','98311EtufCk','更新\x20comate-cli\x20到最新版本','enableJsonFlag','\x20→\x20v','33243480aGqBRM'];a13_0x3d8c=function(){return _0x1a6868;};return a13_0x3d8c();}(function(_0x23535f,_0x1c3e39){const _0x5169bd=a13_0x58ad,_0x59d264=_0x23535f();while(!![]){try{const _0x416f33=-parseInt(_0x5169bd(0x10e))/0x1*(parseInt(_0x5169bd(0x10a))/0x2)+-parseInt(_0x5169bd(0x125))/0x3*(-parseInt(_0x5169bd(0x11d))/0x4)+parseInt(_0x5169bd(0x113))/0x5*(parseInt(_0x5169bd(0x11e))/0x6)+parseInt(_0x5169bd(0x11f))/0x7+parseInt(_0x5169bd(0x119))/0x8*(parseInt(_0x5169bd(0x104))/0x9)+parseInt(_0x5169bd(0x127))/0xa*(parseInt(_0x5169bd(0x10b))/0xb)+-parseInt(_0x5169bd(0x112))/0xc;if(_0x416f33===_0x1c3e39)break;else _0x59d264['push'](_0x59d264['shift']());}catch(_0x395c34){_0x59d264['push'](_0x59d264['shift']());}}}(a13_0x3d8c,0xbf297));import{execSync}from'node:child_process';import a13_0x423927 from'../lib/extends/command.js';function a13_0x58ad(_0x31c816,_0x473c3d){_0x31c816=_0x31c816-0x103;const _0x3d8cc2=a13_0x3d8c();let _0x58ad1e=_0x3d8cc2[_0x31c816];return _0x58ad1e;}export default class Update extends a13_0x423927{static [a13_0x1ceff4(0x122)]=a13_0x1ceff4(0x10f);static [a13_0x1ceff4(0x110)]=!![];async['run'](){const _0x4a5d20=a13_0x1ceff4;await this[_0x4a5d20(0x120)](Update);const {createRequire:_0x3b06bc}=await import(_0x4a5d20(0x126)),_0x117b15=_0x3b06bc(import.meta.url),_0x440666=_0x117b15(_0x4a5d20(0x109)),_0x5e7469=_0x440666[_0x4a5d20(0x116)];!this['jsonEnabled']()&&(this[_0x4a5d20(0x107)](_0x4a5d20(0x117)+this[_0x4a5d20(0x10d)]('v'+_0x5e7469,_0x4a5d20(0x115))),await this[_0x4a5d20(0x121)](_0x4a5d20(0x106)));let _0x57d8e3;try{_0x57d8e3=execSync(_0x4a5d20(0x10c),{'encoding':_0x4a5d20(0x103),'timeout':0x3a98})[_0x4a5d20(0x118)]();}catch{this['stopLoading'](),this[_0x4a5d20(0x108)](_0x4a5d20(0x123));}if(_0x57d8e3===_0x5e7469)return this['stopLoading']('已是最新版本\x20v'+_0x5e7469),{'previousVersion':_0x5e7469,'currentVersion':_0x5e7469,'updated':![]};!this[_0x4a5d20(0x11b)]()&&(this['stopLoading'](_0x4a5d20(0x11c)+_0x57d8e3),await this['createLoading'](_0x4a5d20(0x124)+_0x5e7469+'\x20→\x20v'+_0x57d8e3+_0x4a5d20(0x11a)));try{return execSync('npm\x20install\x20-g\x20@wps365-open/comate-cli@latest\x20--registry=https://registry.npmjs.org/',{'encoding':_0x4a5d20(0x103),'timeout':0xea60,'stdio':_0x4a5d20(0x114)}),this[_0x4a5d20(0x105)]('更新成功:\x20v'+_0x5e7469+_0x4a5d20(0x111)+_0x57d8e3),{'previousVersion':_0x5e7469,'currentVersion':_0x57d8e3,'updated':!![]};}catch(_0x3fce4b){this[_0x4a5d20(0x105)](),this['error']('更新失败:\x20'+(_0x3fce4b instanceof Error?_0x3fce4b['message']:String(_0x3fce4b))+'\x0a手动更新:\x20npm\x20install\x20-g\x20@wps365-open/comate-cli@latest');}}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a14_0x2cb474=a14_0xa797;function a14_0xa797(_0x448f40,_0x1b4a2b){_0x448f40=_0x448f40-0xc5;const _0x192703=a14_0x1927();let _0xa7970c=_0x192703[_0x448f40];return _0xa7970c;}(function(_0x1614a9,_0x184627){const _0x2db301=a14_0xa797,_0x50f596=_0x1614a9();while(!![]){try{const _0x28821a=-parseInt(_0x2db301(0xd1))/0x1*(-parseInt(_0x2db301(0xce))/0x2)+-parseInt(_0x2db301(0xc8))/0x3+parseInt(_0x2db301(0xd2))/0x4*(parseInt(_0x2db301(0xc5))/0x5)+parseInt(_0x2db301(0xcf))/0x6+parseInt(_0x2db301(0xd3))/0x7+parseInt(_0x2db301(0xca))/0x8+-parseInt(_0x2db301(0xc6))/0x9;if(_0x28821a===_0x184627)break;else _0x50f596['push'](_0x50f596['shift']());}catch(_0x18192a){_0x50f596['push'](_0x50f596['shift']());}}}(a14_0x1927,0x437a6));import{randomUUID}from'node:crypto';import{join}from'node:path';import{homedir}from'node:os';import{NewLoggerWithLevel,CleanLogFile}from'../../lib/log/logger.js';import{COMATE_DIR_NAME,ENV_VERBOSE}from'../../lib/config/constants.js';const LOG_SUFFIX=a14_0x2cb474(0xc9),hook=async function(){const _0x36e6bd=a14_0x2cb474,_0x390e68=0x3,_0x5785b6=process['env'][ENV_VERBOSE],_0x1d6b7f=_0x5785b6?Math['min'](0x5,Math[_0x36e6bd(0xd0)](0x1,Number[_0x36e6bd(0xcb)](_0x5785b6,0xa)||_0x390e68)):_0x390e68,_0x79922=randomUUID(),_0x31ad92=join(homedir(),COMATE_DIR_NAME,_0x36e6bd(0xcc),''+_0x79922+LOG_SUFFIX);NewLoggerWithLevel(_0x1d6b7f,_0x31ad92);const _0x19006d=()=>{CleanLogFile();};process['on'](_0x36e6bd(0xc7),_0x19006d),process['on']('SIGINT',()=>{_0x19006d(),process['exit'](0x82);}),process['on'](_0x36e6bd(0xcd),()=>{const _0x2f983f=_0x36e6bd;_0x19006d(),process[_0x2f983f(0xc7)](0x8f);});};export default hook;function a14_0x1927(){const _0x1de6c2=['3059264QaEirH','parseInt','log','SIGTERM','2ouaxGf','2992788PYRHJB','max','352453ArXFJr','1597352fWbpWB','2437701aloHSb','5OrCfdM','10755792ktGQlv','exit','1529286LIJxET','.log'];a14_0x1927=function(){return _0x1de6c2;};return a14_0x1927();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x1a9f52,_0x4e914f){const _0x3f48f9=a15_0x8c85,_0x47d11d=_0x1a9f52();while(!![]){try{const _0xbc72a3=-parseInt(_0x3f48f9(0xc3))/0x1+parseInt(_0x3f48f9(0xc1))/0x2*(-parseInt(_0x3f48f9(0xbb))/0x3)+parseInt(_0x3f48f9(0xc8))/0x4+-parseInt(_0x3f48f9(0xca))/0x5+-parseInt(_0x3f48f9(0xbe))/0x6+-parseInt(_0x3f48f9(0xbf))/0x7*(-parseInt(_0x3f48f9(0xc2))/0x8)+parseInt(_0x3f48f9(0xc9))/0x9;if(_0xbc72a3===_0x4e914f)break;else _0x47d11d['push'](_0x47d11d['shift']());}catch(_0x1179eb){_0x47d11d['push'](_0x47d11d['shift']());}}}(a15_0x3116,0x83ca2));async function checkForUpdates(_0x11d74f){const _0x15b8bd=a15_0x8c85;try{const _0x41564d=await fetch(_0x15b8bd(0xcb),{'signal':AbortSignal['timeout'](0x7d0)});if(!_0x41564d['ok'])return{'hasUpdate':![],'currentVersion':_0x11d74f,'latestVersion':_0x11d74f};const _0x465052=await _0x41564d[_0x15b8bd(0xc5)](),_0x23b203=_0x465052['version'];return{'hasUpdate':_0x23b203!==_0x11d74f,'currentVersion':_0x11d74f,'latestVersion':_0x23b203};}catch{return{'hasUpdate':![],'currentVersion':_0x11d74f,'latestVersion':_0x11d74f};}}function a15_0x8c85(_0x4f4d89,_0x1193f4){_0x4f4d89=_0x4f4d89-0xba;const _0x3116d3=a15_0x3116();let _0x8c8555=_0x3116d3[_0x4f4d89];return _0x8c8555;}const hook=async function(_0x1ce19a){const _0x5bcfbb=a15_0x8c85,_0x413a46=_0x1ce19a['config'][_0x5bcfbb(0xba)],_0x55506e={'hasUpdate':![],'currentVersion':_0x413a46,'latestVersion':_0x413a46},_0x384be4=await Promise[_0x5bcfbb(0xc0)]([checkForUpdates(_0x413a46),new Promise(_0x1d7f2b=>setTimeout(()=>_0x1d7f2b(_0x55506e),0x7d0))]);_0x384be4[_0x5bcfbb(0xc6)]&&(this['log'](_0x5bcfbb(0xbc)+_0x384be4['currentVersion']+'\x20→\x20'+_0x384be4[_0x5bcfbb(0xc4)]),this[_0x5bcfbb(0xbd)](_0x5bcfbb(0xc7)));};function a15_0x3116(){const _0x43b990=['20511297kujMLy','5164465SvEITO','https://registry.npmjs.org/@wps365-open/comate-cli/latest','version','80910IMTHMx','\x0a\x20\x20更新可用:\x20','log','5938854cQINdg','116221vVMUzM','race','18iaLBew','472GdnYNS','749451fUwMtN','latestVersion','json','hasUpdate','\x20\x20请运行\x20comate-cli\x20update\x20进行更新\x0a','1184332RCHNvf'];a15_0x3116=function(){return _0x43b990;};return a15_0x3116();}export default hook;
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x5e8f79,_0x40837a){var _0x36ed00=a16_0x2cda,_0xa1b34c=_0x5e8f79();while(!![]){try{var _0x36ef25=-parseInt(_0x36ed00(0x1c7))/0x1+-parseInt(_0x36ed00(0x1ca))/0x2+-parseInt(_0x36ed00(0x1c8))/0x3+-parseInt(_0x36ed00(0x1ce))/0x4+-parseInt(_0x36ed00(0x1cc))/0x5*(-parseInt(_0x36ed00(0x1cb))/0x6)+parseInt(_0x36ed00(0x1c9))/0x7*(-parseInt(_0x36ed00(0x1c5))/0x8)+parseInt(_0x36ed00(0x1cd))/0x9*(parseInt(_0x36ed00(0x1c6))/0xa);if(_0x36ef25===_0x40837a)break;else _0xa1b34c['push'](_0xa1b34c['shift']());}catch(_0x38ffe7){_0xa1b34c['push'](_0xa1b34c['shift']());}}}(a16_0x5362,0x22f2b));function a16_0x2cda(_0x154d58,_0x1d173b){_0x154d58=_0x154d58-0x1c5;var _0x536240=a16_0x5362();var _0x2cda02=_0x536240[_0x154d58];return _0x2cda02;}function a16_0x5362(){var _0x3c83f1=['120eIkYCs','22375nQlokW','9PwAuJs','1062560ZcjLpF','8LCXxAJ','9284630JJpfbU','24715KBkmRG','730449hVAnAw','1933358VLIdGm','129568wZJjSS'];a16_0x5362=function(){return _0x3c83f1;};return a16_0x5362();}export{run}from'@oclif/core';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1bedfb,_0x344869){const _0x17ab45=a17_0x52e9,_0x5246b8=_0x1bedfb();while(!![]){try{const _0x4f1f3c=parseInt(_0x17ab45(0xeb))/0x1+-parseInt(_0x17ab45(0xee))/0x2*(-parseInt(_0x17ab45(0xf1))/0x3)+parseInt(_0x17ab45(0xe5))/0x4+-parseInt(_0x17ab45(0xf5))/0x5+-parseInt(_0x17ab45(0xfb))/0x6*(-parseInt(_0x17ab45(0xe8))/0x7)+-parseInt(_0x17ab45(0xfe))/0x8+-parseInt(_0x17ab45(0xe7))/0x9*(parseInt(_0x17ab45(0xe2))/0xa);if(_0x4f1f3c===_0x344869)break;else _0x5246b8['push'](_0x5246b8['shift']());}catch(_0x356e59){_0x5246b8['push'](_0x5246b8['shift']());}}}(a17_0x2a3e,0xe6ab9));import a17_0x32a713 from'node:http';function a17_0x52e9(_0x452e8b,_0x47066e){_0x452e8b=_0x452e8b-0xdb;const _0x2a3e49=a17_0x2a3e();let _0x52e906=_0x2a3e49[_0x452e8b];return _0x52e906;}import{randomUUID}from'node:crypto';import a17_0xf055d5 from'open';import{configManager}from'../config/manager.js';import{getUserToken,getCurrentUser}from'../service/auth.js';function a17_0x2a3e(){const _0x35cc8a=['listen','启动本地服务器失败:\x20','createServer','登录状态校验失败,请重试','url','6157500oZVMTJ','/oauth-callback','无法打开浏览器:\x20','4870788ADrQqT','close','45gkpBFN','2859451BSTzAt','/v7/devhub/users/login_callback','127.0.0.1','1223243lIoOGX','EADDRINUSE','floor','2903626MJekwQ','http://localhost:','code','3zrbTJg','saveUserInfo','message','\x20被占用,请重试','1981090mQDTjw','pathname','&state=','saveSid','end','writeHead','12ovJlqc','登录超时(60\x20秒),请重试','text/html;\x20charset=utf-8','2319568IptHFl','nickname','random','state','searchParams','error','get'];a17_0x2a3e=function(){return _0x35cc8a;};return a17_0x2a3e();}import{AGENTSPACE_BASE,WPS_ACCOUNT_BASE,OAUTH_PORT_MIN,OAUTH_PORT_MAX,OAUTH_TIMEOUT_MS}from'../config/constants.js';function pickPort(){const _0xa8c8f5=a17_0x52e9;return OAUTH_PORT_MIN+Math[_0xa8c8f5(0xed)](Math[_0xa8c8f5(0x100)]()*(OAUTH_PORT_MAX-OAUTH_PORT_MIN+0x1));}function buildLoginUrl(_0x16559a,_0x294b54){const _0x15c3a1=a17_0x52e9,_0x2a53cd=AGENTSPACE_BASE+_0x15c3a1(0xe9)+('?cb='+encodeURIComponent(_0x294b54)+_0x15c3a1(0xf7)+_0x16559a);return WPS_ACCOUNT_BASE+'/?cb='+encodeURIComponent(_0x2a53cd);}export async function loginWithBrowser(){const _0x2841e2=a17_0x52e9,_0x332cdf=pickPort(),_0x2b76ff=randomUUID(),_0x14e105='http://localhost:'+_0x332cdf+_0x2841e2(0xe3),_0x42f279=await new Promise((_0x3237d6,_0x99ac45)=>{const _0x35579c=_0x2841e2,_0x111154=setTimeout(()=>{const _0x400d64=a17_0x52e9;_0x5c1a47['close'](),_0x99ac45(new Error(_0x400d64(0xfc)));},OAUTH_TIMEOUT_MS),_0x5c1a47=a17_0x32a713[_0x35579c(0xdf)]((_0x33c296,_0x3e53d2)=>{const _0x55cbcc=_0x35579c,_0x17bf9e=new URL(_0x33c296[_0x55cbcc(0xe1)],_0x55cbcc(0xef)+_0x332cdf);if(_0x17bf9e[_0x55cbcc(0xf6)]!=='/oauth-callback'){_0x3e53d2[_0x55cbcc(0xfa)](0x194),_0x3e53d2[_0x55cbcc(0xf9)]();return;}const _0x285e1c=_0x17bf9e[_0x55cbcc(0x102)][_0x55cbcc(0xdc)](_0x55cbcc(0xf0)),_0x464971=_0x17bf9e[_0x55cbcc(0x102)][_0x55cbcc(0xdc)](_0x55cbcc(0x101)),_0xc7f887=_0x17bf9e[_0x55cbcc(0x102)][_0x55cbcc(0xdc)]('app_id');_0x3e53d2['writeHead'](0xc8,{'Content-Type':_0x55cbcc(0xfd)}),_0x3e53d2[_0x55cbcc(0xf9)]('<html><body><h2>登录成功,请返回终端继续操作</h2><script>setTimeout(()=>window.close(),1000)</script></body></html>'),clearTimeout(_0x111154),_0x5c1a47['close'](),!_0x285e1c||!_0x464971||!_0xc7f887?_0x99ac45(new Error('回调参数不完整,请重试')):_0x3237d6({'code':_0x285e1c,'state':_0x464971,'app_id':_0xc7f887});});_0x5c1a47[_0x35579c(0xdd)](_0x332cdf,_0x35579c(0xea),async()=>{const _0x303411=_0x35579c;try{const _0x38d044=buildLoginUrl(_0x2b76ff,_0x14e105);await a17_0xf055d5(_0x38d044);}catch(_0x3b7588){clearTimeout(_0x111154),_0x5c1a47[_0x303411(0xe6)](),_0x99ac45(new Error(_0x303411(0xe4)+(_0x3b7588 instanceof Error?_0x3b7588['message']:String(_0x3b7588))));}}),_0x5c1a47['on'](_0x35579c(0xdb),_0x10b926=>{const _0x336829=_0x35579c;clearTimeout(_0x111154),_0x10b926[_0x336829(0xf0)]===_0x336829(0xec)?_0x99ac45(new Error('端口\x20'+_0x332cdf+_0x336829(0xf4))):_0x99ac45(new Error(_0x336829(0xde)+_0x10b926[_0x336829(0xf3)]));});});if(_0x42f279[_0x2841e2(0x101)]!==_0x2b76ff)throw new Error(_0x2841e2(0xe0));const _0x34355c=await getUserToken(_0x42f279['app_id'],_0x42f279[_0x2841e2(0xf0)],_0x42f279[_0x2841e2(0x101)]);configManager[_0x2841e2(0xf8)](_0x34355c);const _0x3f1cc3=await getCurrentUser();return configManager[_0x2841e2(0xf2)](_0x3f1cc3),{'sid':_0x34355c,'nickname':_0x3f1cc3[_0x2841e2(0xff)]};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a18_0x5ae6b1=a18_0xf741;(function(_0x2deade,_0xf3d072){const _0x2ef4b6=a18_0xf741,_0x28d290=_0x2deade();while(!![]){try{const _0x11ff10=parseInt(_0x2ef4b6(0xaa))/0x1*(-parseInt(_0x2ef4b6(0xb1))/0x2)+parseInt(_0x2ef4b6(0xa5))/0x3+parseInt(_0x2ef4b6(0xa3))/0x4+-parseInt(_0x2ef4b6(0xb0))/0x5+parseInt(_0x2ef4b6(0xae))/0x6*(-parseInt(_0x2ef4b6(0xa9))/0x7)+parseInt(_0x2ef4b6(0x9f))/0x8+parseInt(_0x2ef4b6(0xa2))/0x9*(-parseInt(_0x2ef4b6(0xa8))/0xa);if(_0x11ff10===_0xf3d072)break;else _0x28d290['push'](_0x28d290['shift']());}catch(_0x3a9469){_0x28d290['push'](_0x28d290['shift']());}}}(a18_0x2976,0x2009f));import a18_0x42fcb5 from'node:path';import{homedir}from'node:os';export const COMATE_DIR_NAME=a18_0x5ae6b1(0xaf);export const COMATE_HOME=a18_0x42fcb5[a18_0x5ae6b1(0xa0)](homedir(),COMATE_DIR_NAME);export const CONFIG_FILE=a18_0x42fcb5[a18_0x5ae6b1(0xa0)](COMATE_HOME,a18_0x5ae6b1(0xac));export const LOG_DIR=a18_0x42fcb5['join'](COMATE_HOME,a18_0x5ae6b1(0xa1));function a18_0xf741(_0x172898,_0x5051c9){_0x172898=_0x172898-0x9f;const _0x29769f=a18_0x2976();let _0xf74102=_0x29769f[_0x172898];return _0xf74102;}export const ENV_VERBOSE='COMATE_VERBOSE';export const AGENTSPACE_BASE=a18_0x5ae6b1(0xa6);export const APP_STUDIO_BASE=a18_0x5ae6b1(0xa4);export const WPS_ACCOUNT_BASE=a18_0x5ae6b1(0xab);export const OPEN_PLATFORM_BASE=a18_0x5ae6b1(0xa7);export const RUNTIME_BASE=a18_0x5ae6b1(0xad);export const OAUTH_PORT_MIN=0x2e0f;export const OAUTH_PORT_MAX=0x2e22;function a18_0x2976(){const _0x4607b3=['join','log','342sjARyY','466796jbNiCh','https://open.wps.cn/app-studio','599505RXTbge','https://agentspace.wps.cn','https://365.kdocs.cn/3rd/open','14430MNirOh','14sjHnyT','1319MkVshe','https://account.wps.cn','config.json','https://o.wpsgo.com/app-studio/runtime','386748RQFmbr','.comate-cli','648945ylVBXK','2bSoovP','1036440WpDEAL'];a18_0x2976=function(){return _0x4607b3;};return a18_0x2976();}export const OAUTH_TIMEOUT_MS=0xea60;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a19_0x32ac58=a19_0xc70d;(function(_0x22dd4e,_0x2a52e0){const _0x538a79=a19_0xc70d,_0x4cc659=_0x22dd4e();while(!![]){try{const _0x20c8f6=parseInt(_0x538a79(0x1b8))/0x1*(-parseInt(_0x538a79(0x1a4))/0x2)+-parseInt(_0x538a79(0x1b0))/0x3+parseInt(_0x538a79(0x1b7))/0x4*(parseInt(_0x538a79(0x1ad))/0x5)+parseInt(_0x538a79(0x19b))/0x6*(parseInt(_0x538a79(0x1bb))/0x7)+-parseInt(_0x538a79(0x1a9))/0x8+parseInt(_0x538a79(0x19e))/0x9+-parseInt(_0x538a79(0x1be))/0xa;if(_0x20c8f6===_0x2a52e0)break;else _0x4cc659['push'](_0x4cc659['shift']());}catch(_0x342d58){_0x4cc659['push'](_0x4cc659['shift']());}}}(a19_0x4e20,0xd7b67));import a19_0x13891f from'node:crypto';import a19_0x212e05 from'node:fs';import{homedir}from'node:os';import a19_0x4e7eaf from'node:path';import{CONFIG_FILE}from'./constants.js';const PI_CLIENT_AUTH_PATH=a19_0x4e7eaf[a19_0x32ac58(0x1b1)](homedir(),'.wpscomate',a19_0x32ac58(0x1a5),a19_0x32ac58(0x1af),a19_0x32ac58(0x196)),PI_CLIENT_KEY=Buffer['from'](a19_0x32ac58(0x1bd),a19_0x32ac58(0x1ac)),GCM_NONCE_LEN=0xc,GCM_TAG_LEN=0x10;function decryptPiClientToken(_0x2efa49){const _0x16c11c=a19_0x32ac58,_0x524236=Buffer[_0x16c11c(0x1bf)](_0x2efa49['trim'](),_0x16c11c(0x1b4));if(_0x524236['length']<=GCM_NONCE_LEN+GCM_TAG_LEN)throw new Error(_0x16c11c(0x1a8));const _0x3af87b=_0x524236[_0x16c11c(0x1bc)](0x0,GCM_NONCE_LEN),_0x3deef8=_0x524236[_0x16c11c(0x1bc)](GCM_NONCE_LEN,_0x524236['length']-GCM_TAG_LEN),_0x51257f=_0x524236[_0x16c11c(0x1bc)](_0x524236['length']-GCM_TAG_LEN),_0x41ea9c=a19_0x13891f['createDecipheriv'](_0x16c11c(0x197),PI_CLIENT_KEY,_0x3af87b);return _0x41ea9c[_0x16c11c(0x1ae)](_0x51257f),Buffer[_0x16c11c(0x199)]([_0x41ea9c[_0x16c11c(0x1a7)](_0x3deef8),_0x41ea9c['final']()])[_0x16c11c(0x1b5)](_0x16c11c(0x1ac));}function loadPiClientSid(){const _0x3bbc0b=a19_0x32ac58;try{const _0x471e00=a19_0x212e05[_0x3bbc0b(0x1b3)](PI_CLIENT_AUTH_PATH,_0x3bbc0b(0x1ac)),_0x2f6f22=JSON[_0x3bbc0b(0x1a1)](_0x471e00[_0x3bbc0b(0x19c)]());if(typeof _0x2f6f22['token']===_0x3bbc0b(0x1a3)&&_0x2f6f22['token'])return decryptPiClientToken(_0x2f6f22['token']);if(typeof _0x2f6f22[_0x3bbc0b(0x1b2)]===_0x3bbc0b(0x1a3)&&_0x2f6f22['wps_sid'])return _0x2f6f22[_0x3bbc0b(0x1b2)];}catch{}return null;}function a19_0xc70d(_0x33f4e1,_0x4e611d){_0x33f4e1=_0x33f4e1-0x196;const _0x4e2033=a19_0x4e20();let _0xc70dcb=_0x4e2033[_0x33f4e1];return _0xc70dcb;}export class ConfigManager{[a19_0x32ac58(0x19f)];constructor(_0x31d488){this['configPath']=_0x31d488??CONFIG_FILE;}[a19_0x32ac58(0x1a6)](){const _0x2cd398=a19_0x32ac58;let _0x5d923f=null,_0x14c718=null;try{const _0x4ef16f=a19_0x212e05['readFileSync'](this[_0x2cd398(0x19f)],_0x2cd398(0x1ac)),_0x5759d5=JSON[_0x2cd398(0x1a1)](_0x4ef16f);_0x14c718=_0x5759d5[_0x2cd398(0x1b2)]??null,_0x5d923f=_0x5759d5[_0x2cd398(0x1b9)]??null;}catch{}const _0x364ab1=loadPiClientSid()??process[_0x2cd398(0x198)]['WPS_SID']?.[_0x2cd398(0x19c)]()??_0x14c718;return{'wps_sid':_0x364ab1||null,'user_info':_0x5d923f};}[a19_0x32ac58(0x19a)](_0x595409){const _0x4fe5d7=a19_0x32ac58,_0x10bd31=a19_0x4e7eaf[_0x4fe5d7(0x1ba)](this[_0x4fe5d7(0x19f)]);a19_0x212e05[_0x4fe5d7(0x19d)](_0x10bd31,{'recursive':!![]}),a19_0x212e05[_0x4fe5d7(0x1aa)](this['configPath'],JSON[_0x4fe5d7(0x1b6)](_0x595409,null,0x2),'utf-8');}[a19_0x32ac58(0x1a2)](_0x237822){const _0x240287=a19_0x32ac58,_0x1b7a51=this[_0x240287(0x1a6)]();_0x1b7a51['wps_sid']=_0x237822,this[_0x240287(0x19a)](_0x1b7a51);}[a19_0x32ac58(0x1a0)](_0x37808c){const _0x364c00=a19_0x32ac58,_0x12bbae=this[_0x364c00(0x1a6)]();_0x12bbae['user_info']=_0x37808c,this[_0x364c00(0x19a)](_0x12bbae);}[a19_0x32ac58(0x1ab)](){const _0xf91d29=a19_0x32ac58;this[_0xf91d29(0x19a)]({'wps_sid':null,'user_info':null});}}export const configManager=new ConfigManager();function a19_0x4e20(){const _0x3ea4be=['utf-8','15ShGSWd','setAuthTag','auth','3823659YHrhUQ','join','wps_sid','readFileSync','base64','toString','stringify','2177368kmsdSD','2bpnjcS','user_info','dirname','569527VlCXtN','subarray','WpsCom@te#2024!Secur3K3y_Agent!!','11718490NnzytH','from','user_auth.json','aes-256-gcm','env','concat','save','114xTscpd','trim','mkdirSync','10004868KrVHjS','configPath','saveUserInfo','parse','saveSid','string','25658OkJXMP','agent','load','update','invalid\x20ciphertext','7479344GSpezg','writeFileSync','clear'];a19_0x4e20=function(){return _0x3ea4be;};return a19_0x4e20();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a20_0x202c(_0x58d14d,_0x463df3){_0x58d14d=_0x58d14d-0x7e;const _0x2ac4be=a20_0x2ac4();let _0x202cc1=_0x2ac4be[_0x58d14d];return _0x202cc1;}const a20_0x124f8e=a20_0x202c;(function(_0x117cee,_0x3c9aff){const _0x58db7c=a20_0x202c,_0x14f50d=_0x117cee();while(!![]){try{const _0x113a53=parseInt(_0x58db7c(0x9b))/0x1+-parseInt(_0x58db7c(0x96))/0x2+-parseInt(_0x58db7c(0x93))/0x3*(parseInt(_0x58db7c(0x8c))/0x4)+parseInt(_0x58db7c(0x97))/0x5+-parseInt(_0x58db7c(0x8a))/0x6*(-parseInt(_0x58db7c(0x8f))/0x7)+parseInt(_0x58db7c(0x95))/0x8+-parseInt(_0x58db7c(0x9d))/0x9*(parseInt(_0x58db7c(0x8d))/0xa);if(_0x113a53===_0x3c9aff)break;else _0x14f50d['push'](_0x14f50d['shift']());}catch(_0x246843){_0x14f50d['push'](_0x14f50d['shift']());}}}(a20_0x2ac4,0x52fa7));import{Command}from'@oclif/core';import a20_0x574e07 from'chalk';import{configManager}from'../config/manager.js';function a20_0x2ac4(){const _0x4e1b39=['4jzYSdv','9680KYKaST','ora','2541suhTgA','wps_sid','spinner','default','396003Dseglg','join','1870808XQiDcx','628054LZKAdx','3072575lymJBp','stop','finally','_actionActive','273316CGNQlV','logJson','5454cmQPPm','AUTH_REQUIRED','load','log','jsonEnabled','exit','未登录,请先执行\x20comate-cli\x20login','succeed','requireAuth','createLoading','error','string','stopLoading','4146lfWOSB','map'];a20_0x2ac4=function(){return _0x4e1b39;};return a20_0x2ac4();}import{FileOnly}from'../log/logger.js';export default class BaseCommand extends Command{[a20_0x124f8e(0x91)];[a20_0x124f8e(0x9a)]=![];['colorize'](_0x17696d,_0x1ddaa9){return a20_0x574e07[_0x1ddaa9](_0x17696d);}async[a20_0x124f8e(0x86)](_0x53a5de){const _0xeeeabf=a20_0x124f8e,_0x2ece7b=await import(_0xeeeabf(0x8e));this[_0xeeeabf(0x91)]=_0x2ece7b[_0xeeeabf(0x92)]({'text':_0x53a5de})['start'](),this[_0xeeeabf(0x9a)]=!![];}[a20_0x124f8e(0x89)](_0x570488){const _0x516d18=a20_0x124f8e;if(!this['spinner'])return;if(_0x570488)this['spinner'][_0x516d18(0x84)](_0x570488);else this[_0x516d18(0x91)][_0x516d18(0x98)]();this['spinner']=undefined,this['_actionActive']=![];}async[a20_0x124f8e(0x85)](){const _0x4fec59=a20_0x124f8e,_0x51bdca=configManager[_0x4fec59(0x7f)]();return!_0x51bdca[_0x4fec59(0x90)]&&(this[_0x4fec59(0x81)]()&&(this[_0x4fec59(0x9c)]({'status':_0x4fec59(0x87),'message':_0x4fec59(0x83),'code':_0x4fec59(0x7e)}),this[_0x4fec59(0x82)](0x2)),this[_0x4fec59(0x87)](_0x4fec59(0x83))),{'sid':_0x51bdca[_0x4fec59(0x90)]};}[a20_0x124f8e(0x80)](_0x293f14,..._0x5763f3){const _0x55687e=a20_0x124f8e,_0xcf79d5=[_0x293f14,..._0x5763f3][_0x55687e(0x8b)](_0xdcf73c=>typeof _0xdcf73c===_0x55687e(0x88)?_0xdcf73c:JSON['stringify'](_0xdcf73c))[_0x55687e(0x94)]('\x20');FileOnly(_0xcf79d5);if(this[_0x55687e(0x9a)])this[_0x55687e(0x89)]();super[_0x55687e(0x80)](_0x293f14,..._0x5763f3);}async[a20_0x124f8e(0x99)](_0x4a0ab7){const _0xf4a722=a20_0x124f8e;return this[_0xf4a722(0x89)](),super[_0xf4a722(0x99)](_0x4a0ab7);}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3499f8,_0xf1c278){const _0x47e0b4=a21_0x2dd1,_0x219329=_0x3499f8();while(!![]){try{const _0x189dd0=-parseInt(_0x47e0b4(0x1bb))/0x1+-parseInt(_0x47e0b4(0x1b0))/0x2*(-parseInt(_0x47e0b4(0x1b3))/0x3)+-parseInt(_0x47e0b4(0x1ab))/0x4*(parseInt(_0x47e0b4(0x1af))/0x5)+parseInt(_0x47e0b4(0x1b7))/0x6*(parseInt(_0x47e0b4(0x1ae))/0x7)+-parseInt(_0x47e0b4(0x1b8))/0x8+-parseInt(_0x47e0b4(0x1ba))/0x9*(-parseInt(_0x47e0b4(0x1a8))/0xa)+-parseInt(_0x47e0b4(0x1b2))/0xb*(-parseInt(_0x47e0b4(0x1b4))/0xc);if(_0x189dd0===_0xf1c278)break;else _0x219329['push'](_0x219329['shift']());}catch(_0x2ca03d){_0x219329['push'](_0x219329['shift']());}}}(a21_0x149c,0x92327));import a21_0x5a4199 from'node:crypto';import{configManager}from'../config/manager.js';function a21_0x2dd1(_0x5afc9b,_0x21d6be){_0x5afc9b=_0x5afc9b-0x1a8;const _0x149c35=a21_0x149c();let _0x2dd18e=_0x149c35[_0x5afc9b];return _0x2dd18e;}function generateCsrf(){const _0x867405=a21_0x2dd1;return a21_0x5a4199[_0x867405(0x1a9)](0x10)[_0x867405(0x1b5)](_0x867405(0x1ad));}function a21_0x149c(){const _0x48cae1=['load','hex','434TEDZlV','1948710cKdESp','7722YTGEuT','Cookie','11YEeKaE','171qCHKRq','15570228AKTvYp','toString','wps_sid','7338RLfEDh','2430288mpETqR',';csrf=','2589057FGtRWW','672279mLfbyN','40RxrGNF','randomBytes','application/json','12bqWYgt'];a21_0x149c=function(){return _0x48cae1;};return a21_0x149c();}export function buildAuthHeaders(){const _0x561bf0=a21_0x2dd1,_0x2142b8=configManager[_0x561bf0(0x1ac)](),_0x1dd462=generateCsrf(),_0x70dbbe={'Content-Type':_0x561bf0(0x1aa),'X-CSRFToken':_0x1dd462};return _0x2142b8[_0x561bf0(0x1b6)]&&(_0x70dbbe[_0x561bf0(0x1b1)]='wps_sid='+_0x2142b8[_0x561bf0(0x1b6)]+_0x561bf0(0x1b9)+_0x1dd462),_0x70dbbe;}
|
package/dist/lib/http/client.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a22_0x5160b6=a22_0x351b;(function(_0x138a54,_0x5389b3){const _0x56c8eb=a22_0x351b,_0x399cb5=_0x138a54();while(!![]){try{const _0x4f204b=-parseInt(_0x56c8eb(0x154))/0x1*(parseInt(_0x56c8eb(0x153))/0x2)+parseInt(_0x56c8eb(0x15b))/0x3+-parseInt(_0x56c8eb(0x141))/0x4+-parseInt(_0x56c8eb(0x146))/0x5*(-parseInt(_0x56c8eb(0x159))/0x6)+-parseInt(_0x56c8eb(0x14a))/0x7*(-parseInt(_0x56c8eb(0x155))/0x8)+parseInt(_0x56c8eb(0x14b))/0x9+-parseInt(_0x56c8eb(0x143))/0xa;if(_0x4f204b===_0x5389b3)break;else _0x399cb5['push'](_0x399cb5['shift']());}catch(_0xcc1ce7){_0x399cb5['push'](_0x399cb5['shift']());}}}(a22_0x86d5,0xaeeb7));import a22_0x19514f from'axios';import{configManager}from'../config/manager.js';import{AGENTSPACE_BASE}from'../config/constants.js';import{buildAuthHeaders}from'./auth-headers.js';export class SimpleHttpClient{[a22_0x5160b6(0x156)]=null;[a22_0x5160b6(0x145)];constructor(_0x3cb1a4){const _0x1ee8bb=a22_0x5160b6;this[_0x1ee8bb(0x145)]=_0x3cb1a4??AGENTSPACE_BASE;}['initialize'](){const _0x1f13c5=a22_0x5160b6;this['axiosInstance']=a22_0x19514f[_0x1f13c5(0x13f)]({'baseURL':this[_0x1f13c5(0x145)],'headers':buildAuthHeaders(),'timeout':0x7530});}['getClient'](){const _0x44c13d=a22_0x5160b6;if(!this[_0x44c13d(0x156)])this[_0x44c13d(0x157)]();return this['axiosInstance'];}async[a22_0x5160b6(0x147)](_0x14458b){const _0xc06af7=a22_0x5160b6;try{const _0x59f2ab=await this[_0xc06af7(0x15c)]()[_0xc06af7(0x147)](_0x14458b);return _0x59f2ab['data'];}catch(_0x4a90fb){throw this[_0xc06af7(0x13d)](_0x4a90fb);}}async[a22_0x5160b6(0x14e)](_0x2dd95b,_0x550536){const _0x552d20=a22_0x5160b6;try{const _0x400e33=await this[_0x552d20(0x15c)]()[_0x552d20(0x14e)](_0x2dd95b,_0x550536);return _0x400e33[_0x552d20(0x151)];}catch(_0x149d86){throw this[_0x552d20(0x13d)](_0x149d86);}}[a22_0x5160b6(0x13d)](_0x3522aa){const _0x137ad7=a22_0x5160b6;if(_0x3522aa['response']){const _0x3831ea=_0x3522aa[_0x137ad7(0x144)][_0x137ad7(0x14c)],_0x397c85=_0x3522aa[_0x137ad7(0x152)]?.['url']??_0x3522aa['config']?.[_0x137ad7(0x148)]??'';if(_0x3831ea===0x191)return configManager[_0x137ad7(0x150)](),new Error('登录已过期,请重新执行\x20comate-cli\x20login');const _0x57c59a=_0x3522aa['response'][_0x137ad7(0x151)],_0x3feb92=_0x57c59a?.['msg']??_0x57c59a?.['message']??'';return new Error(_0x137ad7(0x149)+_0x3831ea+'):\x20'+(_0x3feb92||_0x3522aa[_0x137ad7(0x140)])+'\x20['+_0x397c85+']');}if(_0x3522aa[_0x137ad7(0x13c)]===_0x137ad7(0x14d))return new Error(_0x137ad7(0x15a));if(_0x3522aa[_0x137ad7(0x13c)]===_0x137ad7(0x14f))return new Error(_0x137ad7(0x13e));if(_0x3522aa[_0x137ad7(0x13c)]==='ECONNABORTED')return new Error(_0x137ad7(0x142));return new Error(_0x137ad7(0x158)+_0x3522aa[_0x137ad7(0x140)]);}}function a22_0x351b(_0x2482e8,_0x3820b9){_0x2482e8=_0x2482e8-0x13c;const _0x86d5dc=a22_0x86d5();let _0x351bc0=_0x86d5dc[_0x2482e8];return _0x351bc0;}function a22_0x86d5(){const _0x50b56e=['898204EFnHES','请求超时,请稍后重试','4025640dYXBXq','response','baseUrl','3538060CcKFxq','get','baseURL','请求失败\x20(','511qzhyjX','6497982PrcFpz','status','ECONNREFUSED','post','ENOTFOUND','clear','data','config','1466wQpvjA','1219JABHSs','31272PvOtiX','axiosInstance','initialize','网络错误:\x20','6dajBFt','无法连接到服务器,请检查网络','1566438BfNVjM','getClient','code','wrapError','DNS\x20解析失败,请检查网络连接','create','message'];a22_0x86d5=function(){return _0x50b56e;};return a22_0x86d5();}export const httpClient=new SimpleHttpClient();
|
package/dist/lib/log/logger.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a23_0x51bbce=a23_0x5737;(function(_0x2010ce,_0x5bdcdd){const _0x2619fa=a23_0x5737,_0xb9b6e=_0x2010ce();while(!![]){try{const _0x102543=-parseInt(_0x2619fa(0xc8))/0x1+-parseInt(_0x2619fa(0xc4))/0x2+parseInt(_0x2619fa(0xbd))/0x3+parseInt(_0x2619fa(0xce))/0x4*(-parseInt(_0x2619fa(0xbb))/0x5)+-parseInt(_0x2619fa(0xd0))/0x6+-parseInt(_0x2619fa(0xc3))/0x7+-parseInt(_0x2619fa(0xcd))/0x8*(-parseInt(_0x2619fa(0xcc))/0x9);if(_0x102543===_0x5bdcdd)break;else _0xb9b6e['push'](_0xb9b6e['shift']());}catch(_0x843c5){_0xb9b6e['push'](_0xb9b6e['shift']());}}}(a23_0x2bf0,0xa03f6));import a23_0x1715cb from'node:fs';import a23_0x504bfd from'node:path';import{LOG_DIR,ENV_VERBOSE}from'../config/constants.js';import{randomUUID}from'node:crypto';let logFilePath=null,logLevel=0x3;const LOG_SUFFIX=a23_0x51bbce(0xbe);function a23_0x5737(_0x5bb7de,_0x5bcfe3){_0x5bb7de=_0x5bb7de-0xbb;const _0x2bf06e=a23_0x2bf0();let _0x57373e=_0x2bf06e[_0x5bb7de];return _0x57373e;}export function NewLoggerWithLevel(_0x39fcd6,_0x579944){const _0x2537e5=a23_0x51bbce;logLevel=_0x39fcd6,logFilePath=_0x579944;const _0x39f5c6=a23_0x504bfd[_0x2537e5(0xc1)](_0x579944);a23_0x1715cb[_0x2537e5(0xc9)](_0x39f5c6,{'recursive':!![]}),a23_0x1715cb['writeFileSync'](_0x579944,_0x2537e5(0xbc)+new Date()[_0x2537e5(0xd1)]()+'\x0a',_0x2537e5(0xd2));}function a23_0x2bf0(){const _0x1e8a7c=['dirname','join','3296013EkIUwT','906062vTwUZu','env','[comate-cli]\x20log\x20write\x20failed:\x20','message','1186822WtLObj','mkdirSync','stderr','appendFileSync','306rFgmpo','686408qVywyy','1692XuFtKG','parseInt','1994574ncpCFB','toISOString','utf-8','1930pIzVRf','[comate-cli]\x20Log\x20started\x20at\x20','1036677tcYxnk','.log','max','write'];a23_0x2bf0=function(){return _0x1e8a7c;};return a23_0x2bf0();}let hasLogWriteFailed=![];export function FileOnly(_0x133d34){const _0x247ee0=a23_0x51bbce;if(!logFilePath)return;try{a23_0x1715cb[_0x247ee0(0xcb)](logFilePath,new Date()['toISOString']()+'\x20'+_0x133d34+'\x0a','utf-8');}catch(_0x1c38bc){!hasLogWriteFailed&&(hasLogWriteFailed=!![],process[_0x247ee0(0xca)][_0x247ee0(0xc0)](_0x247ee0(0xc6)+(_0x1c38bc instanceof Error?_0x1c38bc[_0x247ee0(0xc7)]:String(_0x1c38bc))+'\x0a'));}}export function CleanLogFile(){logFilePath=null;}export function initLogger(){const _0x1a7c80=a23_0x51bbce,_0x25c9ab=0x3,_0x2c6011=process[_0x1a7c80(0xc5)][ENV_VERBOSE],_0x2ccedf=_0x2c6011?Math['min'](0x5,Math[_0x1a7c80(0xbf)](0x1,Number[_0x1a7c80(0xcf)](_0x2c6011,0xa)||_0x25c9ab)):_0x25c9ab,_0x1dc604=randomUUID(),_0x54ca74=a23_0x504bfd[_0x1a7c80(0xc2)](LOG_DIR,''+_0x1dc604+LOG_SUFFIX);return NewLoggerWithLevel(_0x2ccedf,_0x54ca74),_0x54ca74;}export function getLogLevel(){return logLevel;}
|
package/dist/lib/service/auth.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a24_0x1295(_0x38ce36,_0x560ff8){_0x38ce36=_0x38ce36-0xdc;const _0x56b886=a24_0x56b8();let _0x1295e1=_0x56b886[_0x38ce36];return _0x1295e1;}(function(_0x2eeba6,_0x59695b){const _0x225e1f=a24_0x1295,_0x3fb679=_0x2eeba6();while(!![]){try{const _0x38e973=-parseInt(_0x225e1f(0xe7))/0x1*(-parseInt(_0x225e1f(0xea))/0x2)+-parseInt(_0x225e1f(0xf2))/0x3*(-parseInt(_0x225e1f(0xdc))/0x4)+parseInt(_0x225e1f(0xe5))/0x5+parseInt(_0x225e1f(0xe0))/0x6*(parseInt(_0x225e1f(0xf1))/0x7)+-parseInt(_0x225e1f(0xec))/0x8*(parseInt(_0x225e1f(0xe4))/0x9)+-parseInt(_0x225e1f(0xdf))/0xa*(-parseInt(_0x225e1f(0xed))/0xb)+parseInt(_0x225e1f(0xe3))/0xc*(-parseInt(_0x225e1f(0xde))/0xd);if(_0x38e973===_0x59695b)break;else _0x3fb679['push'](_0x3fb679['shift']());}catch(_0x379102){_0x3fb679['push'](_0x3fb679['shift']());}}}(a24_0x56b8,0x4d347));import{httpClient}from'../http/client.js';import{AGENTSPACE_BASE}from'../config/constants.js';import a24_0x16a4ac from'axios';export async function getUserToken(_0x100707,_0x210d11,_0x279067){const _0x31a27f=a24_0x1295,_0x272e27=await a24_0x16a4ac[_0x31a27f(0xee)](AGENTSPACE_BASE+_0x31a27f(0xeb),{'app_id':_0x100707,'code':_0x210d11,'state':_0x279067});if(_0x272e27[_0x31a27f(0xef)][_0x31a27f(0xe8)]!==0x0||!_0x272e27['data']['data']?.[_0x31a27f(0xe6)])throw new Error(_0x272e27[_0x31a27f(0xef)]['msg']||'获取登录凭证失败');return _0x272e27[_0x31a27f(0xef)]['data'][_0x31a27f(0xe6)];}export async function getCurrentUser(){const _0x1f3561=a24_0x1295;httpClient[_0x1f3561(0xe2)]();const _0x1b246b=await httpClient[_0x1f3561(0xe9)](_0x1f3561(0xdd));if(_0x1b246b[_0x1f3561(0xe8)]!==0x0)throw new Error(_0x1b246b[_0x1f3561(0xe1)]||_0x1f3561(0xf0));return _0x1b246b[_0x1f3561(0xef)];}function a24_0x56b8(){const _0x320632=['195273qwGXsR','731640vIUWnW','token','143571JPNMff','code','get','4vyzpsB','/v7/devhub/users/user_token','112bXmVNb','44WCBXAO','post','data','获取用户信息失败','3046911FQHiUp','21093YbbhKa','20HZgsOW','/v7/devhub/users/current','22399CkapSM','268030CzTeTi','6NhlkJY','msg','initialize','2724KdKgeD'];a24_0x56b8=function(){return _0x320632;};return a24_0x56b8();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a25_0x4c69bd=a25_0x5621;(function(_0x3b4175,_0xf7e9f7){const _0x2d3d11=a25_0x5621,_0x507160=_0x3b4175();while(!![]){try{const _0x5ee704=-parseInt(_0x2d3d11(0x1a3))/0x1+parseInt(_0x2d3d11(0x1b5))/0x2+-parseInt(_0x2d3d11(0x1a9))/0x3*(parseInt(_0x2d3d11(0x1b6))/0x4)+parseInt(_0x2d3d11(0x1be))/0x5*(parseInt(_0x2d3d11(0x1b9))/0x6)+parseInt(_0x2d3d11(0x1a6))/0x7+parseInt(_0x2d3d11(0x1bc))/0x8+-parseInt(_0x2d3d11(0x19d))/0x9;if(_0x5ee704===_0xf7e9f7)break;else _0x507160['push'](_0x507160['shift']());}catch(_0x4cb45f){_0x507160['push'](_0x507160['shift']());}}}(a25_0x57c1,0x88c17));import{configManager}from'../config/manager.js';import{APP_STUDIO_BASE}from'../config/constants.js';import{buildAuthHeaders}from'../http/auth-headers.js';const CLOUD_API_BASE=process[a25_0x4c69bd(0x1b7)]['COMATE_CLOUD_API_BASE']??APP_STUDIO_BASE;function getHeaders(){return buildAuthHeaders();}async function assertOk(_0x29c7,_0x5a8f89){const _0x293ebf=a25_0x4c69bd;if(!_0x29c7['ok']){const _0x3ec74c=await _0x29c7[_0x293ebf(0x1bf)]()[_0x293ebf(0x1b3)](()=>'');if(_0x29c7[_0x293ebf(0x1a5)]===0x191){configManager['clear']();throw new Error('登录已过期,请重新执行\x20comate-cli\x20auth\x20login');}if(_0x29c7['status']===0x193){let _0x59095d=_0x3ec74c;try{_0x59095d=JSON[_0x293ebf(0x1ad)](_0x3ec74c)[_0x293ebf(0x1a4)]??_0x3ec74c;}catch{}throw new Error('权限不足\x20(403):\x20'+_0x59095d);}throw new Error(_0x5a8f89+_0x293ebf(0x1cc)+_0x29c7[_0x293ebf(0x1a5)]+_0x293ebf(0x1af)+_0x3ec74c);}}export async function createThread(_0x276253='app-builder'){const _0x196302=a25_0x4c69bd,_0x829054=await fetch(CLOUD_API_BASE+_0x196302(0x1c3),{'method':_0x196302(0x1bd),'headers':getHeaders(),'body':JSON[_0x196302(0x1ae)]({'agent_id':_0x276253})});return await assertOk(_0x829054,'创建会话'),_0x829054[_0x196302(0x1a8)]();}export async function submitRun(_0x2bdb19){const _0x27b3ff=a25_0x4c69bd,{threadId:_0x339b08,messages:_0x330311,assistantId:_0x3f9240}=_0x2bdb19,_0x468bc2={'input':{'messages':_0x330311},'stream_mode':[_0x27b3ff(0x1c8)]};if(_0x3f9240)_0x468bc2[_0x27b3ff(0x1a2)]=_0x3f9240;const _0x1ecd24=await fetch(CLOUD_API_BASE+_0x27b3ff(0x1b2)+_0x339b08+_0x27b3ff(0x1a7),{'method':_0x27b3ff(0x1bd),'headers':{...getHeaders(),'Accept':_0x27b3ff(0x1c1)},'body':JSON[_0x27b3ff(0x1ae)](_0x468bc2)});await assertOk(_0x1ecd24,_0x27b3ff(0x1a0));if(_0x1ecd24[_0x27b3ff(0x1cb)]){const _0x5c45c1=_0x1ecd24[_0x27b3ff(0x1cb)]['getReader']();_0x5c45c1[_0x27b3ff(0x1c2)]()['catch'](()=>{});}return{'thread_id':_0x339b08};}export async function resumeRun(_0x3481b2){const _0x17fec8=a25_0x4c69bd,{threadId:_0x52d20b,resumeValue:_0x48597f,assistantId:_0x25b8fd}=_0x3481b2,_0x39dfec={'command':{'resume':_0x48597f},'stream_mode':[_0x17fec8(0x1c8)]};if(_0x25b8fd)_0x39dfec[_0x17fec8(0x1a2)]=_0x25b8fd;const _0x44b337=await fetch(CLOUD_API_BASE+_0x17fec8(0x1b2)+_0x52d20b+_0x17fec8(0x1a7),{'method':_0x17fec8(0x1bd),'headers':{...getHeaders(),'Accept':_0x17fec8(0x1c1)},'body':JSON[_0x17fec8(0x1ae)](_0x39dfec)});await assertOk(_0x44b337,'恢复中断');if(_0x44b337['body']){const _0x2265cc=_0x44b337[_0x17fec8(0x1cb)][_0x17fec8(0x1c4)]();_0x2265cc[_0x17fec8(0x1c2)]()[_0x17fec8(0x1b3)](()=>{});}return{'thread_id':_0x52d20b};}export async function isThreadRunning(_0x4afe77){const _0x2c2041=a25_0x4c69bd;try{const _0x28f339=await fetch(CLOUD_API_BASE+_0x2c2041(0x1c9),{'method':'GET','headers':getHeaders(),'signal':AbortSignal['timeout'](0x1388)});if(!_0x28f339['ok'])return![];const _0x26d18e=await _0x28f339[_0x2c2041(0x1a8)]();return _0x26d18e[_0x2c2041(0x1c5)]?.[_0x2c2041(0x1a1)](_0x50d547=>_0x50d547[_0x2c2041(0x1b0)]===_0x4afe77)??![];}catch{return![];}}export async function getThreadState(_0x514f48){const _0x355e34=a25_0x4c69bd,_0x3a453a=await fetch(CLOUD_API_BASE+_0x355e34(0x1b2)+_0x514f48+_0x355e34(0x1c0),{'method':'GET','headers':getHeaders(),'signal':AbortSignal['timeout'](0x3a98)});return await assertOk(_0x3a453a,_0x355e34(0x1b8)),_0x3a453a[_0x355e34(0x1a8)]();}function a25_0x5621(_0xb0442d,_0x1f36b2){_0xb0442d=_0xb0442d-0x19d;const _0x57c1c7=a25_0x57c1();let _0x5621d5=_0x57c1c7[_0xb0442d];return _0x5621d5;}export async function downloadFiles(_0x4f34df,_0x3858ab){const _0x16d9fb=a25_0x4c69bd,_0x52bd7a=await fetch(CLOUD_API_BASE+_0x16d9fb(0x1b2)+_0x4f34df+'/files/download',{'method':_0x16d9fb(0x1bd),'headers':getHeaders(),'body':JSON[_0x16d9fb(0x1ae)]({'paths':_0x3858ab})});await assertOk(_0x52bd7a,_0x16d9fb(0x1c6));if(_0x3858ab['length']===0x1){const _0x104b32=_0x52bd7a[_0x16d9fb(0x1c7)][_0x16d9fb(0x1ba)]('content-type')??'';if(_0x104b32[_0x16d9fb(0x19e)]('octet-stream')){const _0x4d3b50=await _0x52bd7a[_0x16d9fb(0x1bf)]();return[{'path':_0x3858ab[0x0],'content':_0x4d3b50,'error':null}];}}const _0x35a17b=await _0x52bd7a['json']();return _0x35a17b[_0x16d9fb(0x1b1)]??[];}export async function uploadFiles(_0x453b75,_0x177cb){const _0x317af0=a25_0x4c69bd,_0x2b2840=new FormData();for(const _0x13e5f4 of _0x177cb){const _0x3f2dad=Buffer[_0x317af0(0x1ca)](_0x13e5f4[_0x317af0(0x1ab)])?new Uint8Array(_0x13e5f4[_0x317af0(0x1ab)]):_0x13e5f4[_0x317af0(0x1ab)],_0x2dab1d=new Blob([_0x3f2dad],{'type':_0x317af0(0x1bb)});_0x2b2840[_0x317af0(0x1aa)](_0x13e5f4[_0x317af0(0x1b4)],_0x2dab1d,_0x13e5f4[_0x317af0(0x1b4)]);}const _0x5a728b=getHeaders();delete _0x5a728b[_0x317af0(0x1ac)];const _0x13bc13=await fetch(CLOUD_API_BASE+'/api/v3/threads/'+_0x453b75+_0x317af0(0x19f),{'method':_0x317af0(0x1bd),'headers':_0x5a728b,'body':_0x2b2840});return await assertOk(_0x13bc13,'上传文件'),_0x13bc13[_0x317af0(0x1a8)]();}function a25_0x57c1(){const _0x9723dc=['stringify','):\x20','threadId','results','/api/v3/threads/','catch','name','2143840iRhJqh','142240ZIIqUM','env','获取会话状态','564804FvTzdl','get','application/octet-stream','6380232JQjYXS','POST','15heKCqf','text','/state','text/event-stream','cancel','/api/v3/threads','getReader','activeRuns','下载文件','headers','updates','/api/v3/runs/active','isBuffer','body','\x20失败\x20(','10888596QJBGdX','includes','/files/upload','提交消息','some','assistant_id','723129SiVpeJ','error','status','2637831KGkTJS','/runs/stream','json','3CldPpQ','append','content','Content-Type','parse'];a25_0x57c1=function(){return _0x9723dc;};return a25_0x57c1();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a24_0x5ea474=a24_0x4e89;(function(_0x46e0d8,_0x379ad6){const _0x244e55=a24_0x4e89,_0x3523a3=_0x46e0d8();while(!![]){try{const _0x8adb41=-parseInt(_0x244e55(0xda))/0x1*(parseInt(_0x244e55(0xd5))/0x2)+-parseInt(_0x244e55(0xe5))/0x3+parseInt(_0x244e55(0x119))/0x4*(parseInt(_0x244e55(0xf3))/0x5)+-parseInt(_0x244e55(0xee))/0x6*(-parseInt(_0x244e55(0xe4))/0x7)+parseInt(_0x244e55(0xf5))/0x8+-parseInt(_0x244e55(0x115))/0x9*(-parseInt(_0x244e55(0xd2))/0xa)+parseInt(_0x244e55(0x10b))/0xb;if(_0x8adb41===_0x379ad6)break;else _0x3523a3['push'](_0x3523a3['shift']());}catch(_0x4248f3){_0x3523a3['push'](_0x3523a3['shift']());}}}(a24_0x1166,0x58f85));import{configManager}from'../config/manager.js';import{APP_STUDIO_BASE,RUNTIME_BASE}from'../config/constants.js';import{buildAuthHeaders}from'../http/auth-headers.js';function a24_0x1166(){const _0x179a18=['deploying','deployment\x20ID\x20extracted:\x20','error','未知错误','build\x20phase\x20changed:\x20','slice','986491pfPaHd','构建任务已提交','runFullPublish\x20start:\x20threadId=','data','build_installing','\x20logs=','\x20timeout=','):\x20','short_url','deploy\x20poll\x20#','1152126qnyhby','logs','status','构建失败:\x20','64zwzuar','projectId','pending','publishing','build_done','has','build_publishing','/publish','threadId','build\x20TIMEOUT\x20after\x20',',\x20starting\x20runtime\x20poll...','FAILED:\x20no\x20deployment\x20ID\x20extracted','match','deploy\x20SUCCESS:\x20','GET','access_url','clear','submitBuild\x20response:\x20phase=','/api/v2/threads/','none','\x20hasResult=',':\x20status=','\x20→\x20','\x20polls,\x20last\x20phase:\x20','json','部署中\x20(','deployed','部署成功:\x20','totalZipSize','\x20失败\x20(','skipBuild','20rVFfCw','env','failed','1173752HgIvxB','\x20(poll\x20#','\x20error:\x20','\x20projectId=','buildCommand','1RKSVkg','\x20after\x20','登录已过期,请重新执行\x20comate-cli\x20auth\x20login','构建超时','build_building','POST','build_pending','\x20message=','/publish/status','build\x20FAILED:\x20','1496593XJrRGd','2059968QCiKGF','now','length','versionId','message','部署超时','\x20error=','N/A','部署失败:\x20','18zLrIpE','\x20skipBuild=','publishVersion\x20FAILED:\x20','COMATE_CLOUD_API_BASE','\x20\x20result:\x20files=','141065AoUVWO','parse','1595512yebNcl','\x20zip=','deploy\x20TIMEOUT\x20after\x20','\x20polls','未获取到\x20deployment\x20ID','[publish]\x20','提交构建','installing','部署失败','catch','text','phase','\x20versionId=','stringify','result','published'];a24_0x1166=function(){return _0x179a18;};return a24_0x1166();}import{publishVersion,getDeploymentStatus}from'./manage.js';import{FileOnly}from'../log/logger.js';const CLOUD_API_BASE=process[a24_0x5ea474(0xd3)][a24_0x5ea474(0xf1)]??APP_STUDIO_BASE;function log(_0x3331dc){const _0x5cee2c=a24_0x5ea474;FileOnly(_0x5cee2c(0xfa)+_0x3331dc);}function getHeaders(){return buildAuthHeaders();}async function assertOk(_0x546053,_0x17adfb){const _0x2b4f2b=a24_0x5ea474;if(!_0x546053['ok']){const _0x279bfe=await _0x546053[_0x2b4f2b(0xff)]()[_0x2b4f2b(0xfe)](()=>'');log(_0x17adfb+'\x20HTTP\x20'+_0x546053[_0x2b4f2b(0x117)]+':\x20'+_0x279bfe['slice'](0x0,0x1f4));if(_0x546053['status']===0x191){configManager[_0x2b4f2b(0x129)]();throw new Error(_0x2b4f2b(0xdc));}throw new Error(_0x17adfb+_0x2b4f2b(0x136)+_0x546053[_0x2b4f2b(0x117)]+_0x2b4f2b(0x112)+_0x279bfe);}}export async function submitBuild(_0x33d596){const _0x1dd947=a24_0x5ea474,{threadId:_0x6cc6e2,projectId:_0x1a99f4,versionId:_0x63db07,buildCommand:_0x312cb1,skipBuild:_0xc27831}=_0x33d596,_0x21d2fc={'projectId':_0x1a99f4,'versionId':_0x63db07};if(_0x312cb1)_0x21d2fc[_0x1dd947(0xd9)]=_0x312cb1;if(_0xc27831)_0x21d2fc[_0x1dd947(0xd1)]=!![];const _0x283381=CLOUD_API_BASE+_0x1dd947(0x12b)+_0x6cc6e2+_0x1dd947(0x120);log('submitBuild\x20POST\x20'+_0x283381+'\x20body='+JSON['stringify'](_0x21d2fc));const _0x5ce7ca=await fetch(_0x283381,{'method':_0x1dd947(0xdf),'headers':getHeaders(),'body':JSON[_0x1dd947(0x102)](_0x21d2fc)});await assertOk(_0x5ce7ca,_0x1dd947(0xfb));const _0x5978fd=await _0x5ce7ca[_0x1dd947(0x131)](),_0x4575c0=_0x5978fd[_0x1dd947(0x10e)]??_0x5978fd;return log(_0x1dd947(0x12a)+_0x4575c0[_0x1dd947(0x100)]+'\x20message='+_0x4575c0['message']),_0x4575c0;}export async function getBuildStatus(_0x5e52ea){const _0x2bb605=a24_0x5ea474,_0x350dfe=CLOUD_API_BASE+_0x2bb605(0x12b)+_0x5e52ea+_0x2bb605(0xe2),_0x24cd0f=await fetch(_0x350dfe,{'method':_0x2bb605(0x127),'headers':getHeaders()});await assertOk(_0x24cd0f,'查询构建状态');const _0x38800e=await _0x24cd0f[_0x2bb605(0xff)]();let _0x4673db;try{_0x4673db=JSON[_0x2bb605(0xf4)](_0x38800e);}catch{log('getBuildStatus\x20parse\x20error,\x20raw='+_0x38800e[_0x2bb605(0x10a)](0x0,0x1f4));throw new Error('构建状态解析失败:\x20'+_0x38800e['slice'](0x0,0xc8));}const _0x517e07=_0x4673db['data']??_0x4673db;return log('getBuildStatus:\x20phase='+_0x517e07[_0x2bb605(0x100)]+_0x2bb605(0xe1)+_0x517e07[_0x2bb605(0xe9)]+_0x2bb605(0x110)+(_0x517e07[_0x2bb605(0x116)]?.['length']??0x0)+_0x2bb605(0x12d)+!!_0x517e07[_0x2bb605(0x103)]),_0x517e07['result']&&log(_0x2bb605(0xf2)+_0x517e07[_0x2bb605(0x103)]['totalFileCount']+_0x2bb605(0xf6)+_0x517e07[_0x2bb605(0x103)][_0x2bb605(0x135)]),_0x517e07;}const BUILD_TERMINAL=new Set(['published',a24_0x5ea474(0x107)]),POLL_INTERVAL=0xbb8;export async function runFullPublish(_0x380b61,_0x2d67c0,_0x2fb9ea=0x927c0){const _0x38ba11=a24_0x5ea474,_0xceadf8=Date[_0x38ba11(0xe6)]()+_0x2fb9ea;log(_0x38ba11(0x10d)+_0x380b61[_0x38ba11(0x121)]+_0x38ba11(0xd8)+_0x380b61[_0x38ba11(0x11a)]+_0x38ba11(0x101)+_0x380b61[_0x38ba11(0xe8)]+_0x38ba11(0xef)+_0x380b61[_0x38ba11(0xd1)]+_0x38ba11(0x111)+_0x2fb9ea+'ms'),await submitBuild(_0x380b61),_0x2d67c0?.({'step':'build_pending','message':_0x38ba11(0x10c)});let _0x524efa,_0x5edb59=null,_0x57d79d=0x0;while(Date[_0x38ba11(0xe6)]()<_0xceadf8){const _0x15eed0=await getBuildStatus(_0x380b61[_0x38ba11(0x121)]);_0x524efa=_0x15eed0,_0x57d79d++;if(_0x15eed0[_0x38ba11(0x100)]!==_0x5edb59){log(_0x38ba11(0x109)+_0x5edb59+_0x38ba11(0x12f)+_0x15eed0[_0x38ba11(0x100)]+_0x38ba11(0xd6)+_0x57d79d+')'),_0x5edb59=_0x15eed0[_0x38ba11(0x100)];const _0x2deb79=mapBuildPhase(_0x15eed0[_0x38ba11(0x100)]);_0x2d67c0?.({'step':_0x2deb79,'message':_0x15eed0['message']});}if(_0x15eed0[_0x38ba11(0x100)]==='error')return log(_0x38ba11(0xe3)+_0x15eed0['message']),_0x15eed0[_0x38ba11(0x116)]?.[_0x38ba11(0xe7)]&&log('build\x20logs\x20(last\x2010):\x0a'+_0x15eed0[_0x38ba11(0x116)][_0x38ba11(0x10a)](-0xa)['join']('\x0a')),{'status':_0x38ba11(0xd4),'deploy_error':_0x38ba11(0x118)+_0x15eed0[_0x38ba11(0xe9)],'build_result':_0x15eed0['result'],'build_logs':_0x15eed0[_0x38ba11(0x116)]};if(BUILD_TERMINAL[_0x38ba11(0x11e)](_0x15eed0[_0x38ba11(0x100)])){log('build\x20reached\x20terminal\x20phase:\x20'+_0x15eed0[_0x38ba11(0x100)]+_0x38ba11(0xdb)+_0x57d79d+_0x38ba11(0xf8));break;}await sleep(POLL_INTERVAL);}if(!_0x524efa||!BUILD_TERMINAL[_0x38ba11(0x11e)](_0x524efa[_0x38ba11(0x100)]))return log(_0x38ba11(0x122)+_0x57d79d+_0x38ba11(0x130)+_0x524efa?.[_0x38ba11(0x100)]),{'status':'failed','deploy_error':_0x38ba11(0xdd),'build_logs':_0x524efa?.['logs']};_0x2d67c0?.({'step':_0x38ba11(0x105),'message':'触发部署...'});let _0x184d2f,_0x11296e;try{const _0x2bf770=await publishVersion(_0x380b61['projectId'],_0x380b61[_0x38ba11(0xe8)]);log('publishVersion:\x20deploy_status='+_0x2bf770['deploy_status']+'\x20access_url='+_0x2bf770[_0x38ba11(0x128)]+'\x20short_url='+(_0x2bf770['short_url']??_0x38ba11(0xec))),_0x184d2f=extractDeploymentId(_0x2bf770['access_url']),_0x11296e=_0x2bf770[_0x38ba11(0x113)];}catch(_0xa55dec){const _0x1ad53a=_0xa55dec instanceof Error?_0xa55dec[_0x38ba11(0xe9)]:String(_0xa55dec);return log(_0x38ba11(0xf0)+_0x1ad53a),{'status':_0x38ba11(0xd4),'deploy_error':'触发部署失败:\x20'+_0x1ad53a,'build_result':_0x524efa?.[_0x38ba11(0x103)],'build_logs':_0x524efa?.['logs']};}if(!_0x184d2f)return log(_0x38ba11(0x124)),{'status':_0x38ba11(0xd4),'deploy_error':_0x38ba11(0xf9),'build_result':_0x524efa?.[_0x38ba11(0x103)],'build_logs':_0x524efa?.[_0x38ba11(0x116)]};log(_0x38ba11(0x106)+_0x184d2f+_0x38ba11(0x123)),_0x2d67c0?.({'step':_0x38ba11(0x105),'message':_0x38ba11(0x132)+_0x184d2f[_0x38ba11(0x10a)](0x0,0x8)+'...)'});let _0x210e98=0x0;while(Date['now']()<_0xceadf8){await sleep(POLL_INTERVAL),_0x210e98++;let _0xc19f9d;try{_0xc19f9d=await getDeploymentStatus(_0x184d2f),log(_0x38ba11(0x114)+_0x210e98+_0x38ba11(0x12e)+_0xc19f9d[_0x38ba11(0x117)]+_0x38ba11(0xeb)+(_0xc19f9d[_0x38ba11(0x107)]??_0x38ba11(0x12c)));}catch(_0x5c77ce){log(_0x38ba11(0x114)+_0x210e98+_0x38ba11(0xd7)+(_0x5c77ce instanceof Error?_0x5c77ce[_0x38ba11(0xe9)]:String(_0x5c77ce)));continue;}if(_0xc19f9d['status']==='active'){const _0x5a6130=RUNTIME_BASE+'/'+_0x184d2f+'/',_0x12eb7d=_0x11296e||_0xc19f9d[_0x38ba11(0x113)],_0x427815=_0x12eb7d||_0x5a6130;return log(_0x38ba11(0x126)+_0x427815),_0x2d67c0?.({'step':_0x38ba11(0x133),'message':_0x38ba11(0x134)+_0x427815}),{'status':_0x38ba11(0x133),'access_url':_0x427815,'short_url':_0x12eb7d,'build_result':_0x524efa?.['result']};}if(_0xc19f9d[_0x38ba11(0x117)]===_0x38ba11(0xd4))return log('deploy\x20FAILED:\x20'+(_0xc19f9d[_0x38ba11(0x107)]??_0x38ba11(0x108))),_0x2d67c0?.({'step':'failed','message':_0x38ba11(0xed)+(_0xc19f9d['error']??_0x38ba11(0x108))}),{'status':_0x38ba11(0xd4),'deploy_error':_0xc19f9d[_0x38ba11(0x107)]??_0x38ba11(0xfd),'build_result':_0x524efa?.[_0x38ba11(0x103)],'build_logs':_0x524efa?.['logs']};}return log(_0x38ba11(0xf7)+_0x210e98+_0x38ba11(0xf8)),{'status':_0x38ba11(0xd4),'deploy_error':_0x38ba11(0xea),'build_result':_0x524efa?.['result'],'build_logs':_0x524efa?.['logs']};}function a24_0x4e89(_0x196eb6,_0x56698b){_0x196eb6=_0x196eb6-0xd1;const _0x1166f3=a24_0x1166();let _0x4e8955=_0x1166f3[_0x196eb6];return _0x4e8955;}function mapBuildPhase(_0x2d8081){const _0x1b6da3=a24_0x5ea474;switch(_0x2d8081){case _0x1b6da3(0x11b):return _0x1b6da3(0xe0);case _0x1b6da3(0xfc):return _0x1b6da3(0x10f);case'building':return _0x1b6da3(0xde);case _0x1b6da3(0x11c):return _0x1b6da3(0x11f);case _0x1b6da3(0x104):return _0x1b6da3(0x11d);case _0x1b6da3(0x107):return _0x1b6da3(0xd4);}}function extractDeploymentId(_0x37c591){const _0x429163=a24_0x5ea474,_0x3963c6=_0x37c591[_0x429163(0x125)](/\/([0-9a-f-]{36})\/?/);return _0x3963c6?.[0x1];}function sleep(_0x4960a8){return new Promise(_0x344dc0=>setTimeout(_0x344dc0,_0x4960a8));}
|
|
1
|
+
const a26_0xb6210d=a26_0x3ba5;(function(_0x1413f3,_0x473e09){const _0x323257=a26_0x3ba5,_0x226028=_0x1413f3();while(!![]){try{const _0x579585=parseInt(_0x323257(0x210))/0x1*(-parseInt(_0x323257(0x1ee))/0x2)+-parseInt(_0x323257(0x1c8))/0x3*(parseInt(_0x323257(0x1cb))/0x4)+parseInt(_0x323257(0x1c5))/0x5*(-parseInt(_0x323257(0x1fb))/0x6)+parseInt(_0x323257(0x219))/0x7*(parseInt(_0x323257(0x216))/0x8)+parseInt(_0x323257(0x1eb))/0x9+-parseInt(_0x323257(0x1ba))/0xa+parseInt(_0x323257(0x1ea))/0xb;if(_0x579585===_0x473e09)break;else _0x226028['push'](_0x226028['shift']());}catch(_0x343827){_0x226028['push'](_0x226028['shift']());}}}(a26_0x4d79,0xf3caa));import{configManager}from'../config/manager.js';import{APP_STUDIO_BASE,RUNTIME_BASE}from'../config/constants.js';import{buildAuthHeaders}from'../http/auth-headers.js';import{publishVersion,getDeploymentStatus}from'./manage.js';import{FileOnly}from'../log/logger.js';const CLOUD_API_BASE=process[a26_0xb6210d(0x21e)][a26_0xb6210d(0x20a)]??APP_STUDIO_BASE;function log(_0x183958){FileOnly('[publish]\x20'+_0x183958);}function a26_0x3ba5(_0x1341f2,_0xed0b5d){_0x1341f2=_0x1341f2-0x1ba;const _0x4d7928=a26_0x4d79();let _0x3ba541=_0x4d7928[_0x1341f2];return _0x3ba541;}function getHeaders(){return buildAuthHeaders();}async function assertOk(_0x389517,_0x407d37){const _0x3fd16a=a26_0xb6210d;if(!_0x389517['ok']){const _0x42ed7c=await _0x389517['text']()[_0x3fd16a(0x211)](()=>'');log(_0x407d37+_0x3fd16a(0x1f1)+_0x389517['status']+':\x20'+_0x42ed7c[_0x3fd16a(0x1c7)](0x0,0x1f4));if(_0x389517[_0x3fd16a(0x203)]===0x191){configManager[_0x3fd16a(0x209)]();throw new Error(_0x3fd16a(0x1da));}throw new Error(_0x407d37+_0x3fd16a(0x1c6)+_0x389517['status']+_0x3fd16a(0x1e1)+_0x42ed7c);}}export async function submitBuild(_0x5c7c73){const _0xeec2b2=a26_0xb6210d,{threadId:_0x188b30,projectId:_0xdcb631,versionId:_0x183f6c,buildCommand:_0x48128f,skipBuild:_0x29cf2a}=_0x5c7c73,_0x33285c={'projectId':_0xdcb631,'versionId':_0x183f6c};if(_0x48128f)_0x33285c['buildCommand']=_0x48128f;if(_0x29cf2a)_0x33285c['skipBuild']=!![];const _0x17122b=CLOUD_API_BASE+_0xeec2b2(0x201)+_0x188b30+_0xeec2b2(0x1e9);log('submitBuild\x20POST\x20'+_0x17122b+_0xeec2b2(0x21b)+JSON[_0xeec2b2(0x205)](_0x33285c));const _0x464b32=await fetch(_0x17122b,{'method':_0xeec2b2(0x1e6),'headers':getHeaders(),'body':JSON[_0xeec2b2(0x205)](_0x33285c)});await assertOk(_0x464b32,_0xeec2b2(0x1e0));const _0x18faea=await _0x464b32['json'](),_0x3cb5bb=_0x18faea[_0xeec2b2(0x218)]??_0x18faea;return log(_0xeec2b2(0x1ce)+_0x3cb5bb[_0xeec2b2(0x215)]+'\x20message='+_0x3cb5bb[_0xeec2b2(0x1f2)]),_0x3cb5bb;}export async function getBuildStatus(_0x11f588){const _0x2a0916=a26_0xb6210d,_0x34feb7=CLOUD_API_BASE+_0x2a0916(0x201)+_0x11f588+'/publish/status',_0x1bc05c=await fetch(_0x34feb7,{'method':_0x2a0916(0x1d8),'headers':getHeaders()});await assertOk(_0x1bc05c,'查询构建状态');const _0x2f6d6f=await _0x1bc05c[_0x2a0916(0x1fd)]();let _0x2ea2dd;try{_0x2ea2dd=JSON[_0x2a0916(0x1e7)](_0x2f6d6f);}catch{log(_0x2a0916(0x1f4)+_0x2f6d6f[_0x2a0916(0x1c7)](0x0,0x1f4));throw new Error(_0x2a0916(0x1cc)+_0x2f6d6f['slice'](0x0,0xc8));}const _0x18cd58=_0x2ea2dd[_0x2a0916(0x218)]??_0x2ea2dd;return log(_0x2a0916(0x1d7)+_0x18cd58[_0x2a0916(0x215)]+_0x2a0916(0x1bf)+_0x18cd58[_0x2a0916(0x1f2)]+_0x2a0916(0x1c0)+(_0x18cd58[_0x2a0916(0x1c9)]?.[_0x2a0916(0x1bc)]??0x0)+'\x20hasResult='+!!_0x18cd58[_0x2a0916(0x1bb)]),_0x18cd58[_0x2a0916(0x1bb)]&&log(_0x2a0916(0x213)+_0x18cd58[_0x2a0916(0x1bb)][_0x2a0916(0x207)]+'\x20zip='+_0x18cd58[_0x2a0916(0x1bb)][_0x2a0916(0x200)]),_0x18cd58;}const BUILD_TERMINAL=new Set(['published',a26_0xb6210d(0x20c)]),POLL_INTERVAL=0xbb8;export async function runFullPublish(_0x259d24,_0x483393,_0x692523=0x927c0){const _0xcdc6f2=a26_0xb6210d,_0x4088bf=Date[_0xcdc6f2(0x21a)]()+_0x692523;log(_0xcdc6f2(0x1f0)+_0x259d24[_0xcdc6f2(0x1ef)]+_0xcdc6f2(0x1d9)+_0x259d24[_0xcdc6f2(0x217)]+_0xcdc6f2(0x1d6)+_0x259d24[_0xcdc6f2(0x21c)]+_0xcdc6f2(0x1ec)+_0x259d24[_0xcdc6f2(0x1c1)]+_0xcdc6f2(0x1e8)+_0x692523+'ms'),await submitBuild(_0x259d24),_0x483393?.({'step':_0xcdc6f2(0x1ed),'message':_0xcdc6f2(0x1d4)});let _0x21f695,_0x1d8d74=null,_0x39f63c=0x0;while(Date[_0xcdc6f2(0x21a)]()<_0x4088bf){const _0x2f604a=await getBuildStatus(_0x259d24[_0xcdc6f2(0x1ef)]);_0x21f695=_0x2f604a,_0x39f63c++;if(_0x2f604a[_0xcdc6f2(0x215)]!==_0x1d8d74){log(_0xcdc6f2(0x1d5)+_0x1d8d74+_0xcdc6f2(0x1bd)+_0x2f604a['phase']+'\x20(poll\x20#'+_0x39f63c+')'),_0x1d8d74=_0x2f604a[_0xcdc6f2(0x215)];const _0x53558a=mapBuildPhase(_0x2f604a[_0xcdc6f2(0x215)]);_0x483393?.({'step':_0x53558a,'message':_0x2f604a['message']});}if(_0x2f604a[_0xcdc6f2(0x215)]===_0xcdc6f2(0x20c))return log(_0xcdc6f2(0x208)+_0x2f604a[_0xcdc6f2(0x1f2)]),_0x2f604a[_0xcdc6f2(0x1c9)]?.[_0xcdc6f2(0x1bc)]&&log('build\x20logs\x20(last\x2010):\x0a'+_0x2f604a[_0xcdc6f2(0x1c9)][_0xcdc6f2(0x1c7)](-0xa)['join']('\x0a')),{'status':_0xcdc6f2(0x20e),'deploy_error':_0xcdc6f2(0x1c2)+_0x2f604a[_0xcdc6f2(0x1f2)],'build_result':_0x2f604a[_0xcdc6f2(0x1bb)],'build_logs':_0x2f604a['logs']};if(BUILD_TERMINAL[_0xcdc6f2(0x1fa)](_0x2f604a[_0xcdc6f2(0x215)])){log('build\x20reached\x20terminal\x20phase:\x20'+_0x2f604a[_0xcdc6f2(0x215)]+'\x20after\x20'+_0x39f63c+_0xcdc6f2(0x1d0));break;}await sleep(POLL_INTERVAL);}if(!_0x21f695||!BUILD_TERMINAL[_0xcdc6f2(0x1fa)](_0x21f695['phase']))return log('build\x20TIMEOUT\x20after\x20'+_0x39f63c+_0xcdc6f2(0x1e4)+_0x21f695?.['phase']),{'status':'failed','deploy_error':_0xcdc6f2(0x1db),'build_logs':_0x21f695?.['logs']};_0x483393?.({'step':'deploying','message':_0xcdc6f2(0x1dd)});let _0x19b795,_0x3479df;try{const _0x173e1b=await publishVersion(_0x259d24[_0xcdc6f2(0x217)],_0x259d24[_0xcdc6f2(0x21c)]);log(_0xcdc6f2(0x20f)+_0x173e1b[_0xcdc6f2(0x1fe)]+_0xcdc6f2(0x1e2)+_0x173e1b[_0xcdc6f2(0x1de)]+_0xcdc6f2(0x1d2)+(_0x173e1b[_0xcdc6f2(0x1f7)]??'N/A')),_0x19b795=extractDeploymentId(_0x173e1b[_0xcdc6f2(0x1de)]),_0x3479df=_0x173e1b[_0xcdc6f2(0x1f7)];}catch(_0x50eba8){const _0x340650=_0x50eba8 instanceof Error?_0x50eba8[_0xcdc6f2(0x1f2)]:String(_0x50eba8);return log('publishVersion\x20FAILED:\x20'+_0x340650),{'status':_0xcdc6f2(0x20e),'deploy_error':_0xcdc6f2(0x1f6)+_0x340650,'build_result':_0x21f695?.[_0xcdc6f2(0x1bb)],'build_logs':_0x21f695?.[_0xcdc6f2(0x1c9)]};}if(!_0x19b795)return log(_0xcdc6f2(0x20d)),{'status':_0xcdc6f2(0x20e),'deploy_error':_0xcdc6f2(0x202),'build_result':_0x21f695?.[_0xcdc6f2(0x1bb)],'build_logs':_0x21f695?.[_0xcdc6f2(0x1c9)]};log(_0xcdc6f2(0x212)+_0x19b795+_0xcdc6f2(0x214)),_0x483393?.({'step':_0xcdc6f2(0x1e3),'message':_0xcdc6f2(0x1fc)+_0x19b795[_0xcdc6f2(0x1c7)](0x0,0x8)+'...)'});let _0x59f912=0x0;while(Date[_0xcdc6f2(0x21a)]()<_0x4088bf){await sleep(POLL_INTERVAL),_0x59f912++;let _0x340832;try{_0x340832=await getDeploymentStatus(_0x19b795),log(_0xcdc6f2(0x1be)+_0x59f912+_0xcdc6f2(0x1df)+_0x340832[_0xcdc6f2(0x203)]+_0xcdc6f2(0x1c3)+(_0x340832['error']??_0xcdc6f2(0x1d1)));}catch(_0x38942f){log(_0xcdc6f2(0x1be)+_0x59f912+_0xcdc6f2(0x1dc)+(_0x38942f instanceof Error?_0x38942f['message']:String(_0x38942f)));continue;}if(_0x340832[_0xcdc6f2(0x203)]==='active'){const _0x478a6c=RUNTIME_BASE+'/'+_0x19b795+'/',_0x48ba16=_0x3479df||_0x340832[_0xcdc6f2(0x1f7)],_0xf58262=_0x48ba16||_0x478a6c;return log(_0xcdc6f2(0x1ff)+_0xf58262),_0x483393?.({'step':_0xcdc6f2(0x21d),'message':'部署成功:\x20'+_0xf58262}),{'status':'deployed','access_url':_0xf58262,'short_url':_0x48ba16,'build_result':_0x21f695?.[_0xcdc6f2(0x1bb)]};}if(_0x340832[_0xcdc6f2(0x203)]===_0xcdc6f2(0x20e))return log(_0xcdc6f2(0x1d3)+(_0x340832[_0xcdc6f2(0x20c)]??_0xcdc6f2(0x1c4))),_0x483393?.({'step':_0xcdc6f2(0x20e),'message':_0xcdc6f2(0x204)+(_0x340832[_0xcdc6f2(0x20c)]??_0xcdc6f2(0x1c4))}),{'status':'failed','deploy_error':_0x340832['error']??'部署失败','build_result':_0x21f695?.[_0xcdc6f2(0x1bb)],'build_logs':_0x21f695?.[_0xcdc6f2(0x1c9)]};}return log(_0xcdc6f2(0x1e5)+_0x59f912+'\x20polls'),{'status':_0xcdc6f2(0x20e),'deploy_error':_0xcdc6f2(0x206),'build_result':_0x21f695?.[_0xcdc6f2(0x1bb)],'build_logs':_0x21f695?.[_0xcdc6f2(0x1c9)]};}function mapBuildPhase(_0x32dc8c){const _0x184faa=a26_0xb6210d;switch(_0x32dc8c){case _0x184faa(0x1f3):return'build_pending';case'installing':return _0x184faa(0x20b);case _0x184faa(0x1f5):return _0x184faa(0x1ca);case _0x184faa(0x1cf):return _0x184faa(0x1cd);case _0x184faa(0x1f9):return _0x184faa(0x1f8);case _0x184faa(0x20c):return _0x184faa(0x20e);}}function extractDeploymentId(_0x975bf4){const _0x9b9679=_0x975bf4['match'](/\/([0-9a-f-]{36})\/?/);return _0x9b9679?.[0x1];}function a26_0x4d79(){const _0x2eeaf0=['\x20body=','versionId','deployed','env','10523980gfiYFa','result','length','\x20→\x20','deploy\x20poll\x20#','\x20message=','\x20logs=','skipBuild','构建失败:\x20','\x20error=','未知错误','121405hnsmOw','\x20失败\x20(','slice','24483Txzrsl','logs','build_building','472lxOmJa','构建状态解析失败:\x20','build_publishing','submitBuild\x20response:\x20phase=','publishing','\x20polls','none','\x20short_url=','deploy\x20FAILED:\x20','构建任务已提交','build\x20phase\x20changed:\x20','\x20versionId=','getBuildStatus:\x20phase=','GET','\x20projectId=','登录已过期,请重新执行\x20comate-cli\x20auth\x20login','构建超时','\x20error:\x20','触发部署...','access_url',':\x20status=','提交构建','):\x20','\x20access_url=','deploying','\x20polls,\x20last\x20phase:\x20','deploy\x20TIMEOUT\x20after\x20','POST','parse','\x20timeout=','/publish','47438732CFxEHn','6247872rBodsS','\x20skipBuild=','build_pending','222908LjFbLl','threadId','runFullPublish\x20start:\x20threadId=','\x20HTTP\x20','message','pending','getBuildStatus\x20parse\x20error,\x20raw=','building','触发部署失败:\x20','short_url','build_done','published','has','366nrPWZK','部署中\x20(','text','deploy_status','deploy\x20SUCCESS:\x20','totalZipSize','/api/v2/threads/','未获取到\x20deployment\x20ID','status','部署失败:\x20','stringify','部署超时','totalFileCount','build\x20FAILED:\x20','clear','COMATE_CLOUD_API_BASE','build_installing','error','FAILED:\x20no\x20deployment\x20ID\x20extracted','failed','publishVersion:\x20deploy_status=','9RcfXpU','catch','deployment\x20ID\x20extracted:\x20','\x20\x20result:\x20files=',',\x20starting\x20runtime\x20poll...','phase','8QNjqME','projectId','data','3439611hazjDl','now'];a26_0x4d79=function(){return _0x2eeaf0;};return a26_0x4d79();}function sleep(_0x9aa194){return new Promise(_0x36b365=>setTimeout(_0x36b365,_0x9aa194));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a27_0x2ecb(_0x592baf,_0x154c86){_0x592baf=_0x592baf-0xf4;const _0x2de08d=a27_0x2de0();let _0x2ecb28=_0x2de08d[_0x592baf];return _0x2ecb28;}const a27_0x54f6c9=a27_0x2ecb;(function(_0x127bbe,_0x3fde95){const _0x50a74b=a27_0x2ecb,_0x4e5177=_0x127bbe();while(!![]){try{const _0x51193d=-parseInt(_0x50a74b(0x10f))/0x1+parseInt(_0x50a74b(0xf9))/0x2*(-parseInt(_0x50a74b(0xf4))/0x3)+-parseInt(_0x50a74b(0x109))/0x4+-parseInt(_0x50a74b(0x11a))/0x5*(-parseInt(_0x50a74b(0x119))/0x6)+parseInt(_0x50a74b(0x104))/0x7+parseInt(_0x50a74b(0x114))/0x8*(-parseInt(_0x50a74b(0xfa))/0x9)+parseInt(_0x50a74b(0x106))/0xa;if(_0x51193d===_0x3fde95)break;else _0x4e5177['push'](_0x4e5177['shift']());}catch(_0x820e02){_0x4e5177['push'](_0x4e5177['shift']());}}}(a27_0x2de0,0x638d1));import{SimpleHttpClient}from'../http/client.js';import{APP_STUDIO_BASE}from'../config/constants.js';function a27_0x2de0(){const _0x2feeb3=['/api/manage/v1','projectName','API\x20返回数据为空\x20(code:\x20','/deployments/','/versions/','785204TEeCPj','/scopes/update','10990160XwgfHE','/apps/','description','418012XHYfvF',',\x20msg:\x20','post','code','items','/teams','510679GzoaVj','/projects/','initialize','/versions','get','160MoKFJH','data','/deployment/recall','/publish','/apps','3302022ZSvkNG','5swqtYG','/projects?team_id=','3qqYIcJ','teamId','&page=1&page_size=100','/teams/my','/api/runtime/v1/deployments/','914084DWuivj','126693Jrasuo','isArray','object','\x20version','/projects'];a27_0x2de0=function(){return _0x2feeb3;};return a27_0x2de0();}const manageClient=new SimpleHttpClient(APP_STUDIO_BASE),MANAGE_PREFIX=a27_0x54f6c9(0xff);export async function getMyTeams(){const _0x5f1a33=a27_0x54f6c9;manageClient[_0x5f1a33(0x111)]();const _0xe9e54=await manageClient['get'](MANAGE_PREFIX+_0x5f1a33(0xf7));if(Array[_0x5f1a33(0xfb)](_0xe9e54['data']?.[_0x5f1a33(0x10d)]))return _0xe9e54[_0x5f1a33(0x115)][_0x5f1a33(0x10d)];const _0x1c8567=_0xe9e54;return _0x1c8567[_0x5f1a33(0x10d)]??[];}export async function createTeam(_0x147700){const _0x125bc4=a27_0x54f6c9;manageClient['initialize']();const _0x2f6ed3=await manageClient[_0x125bc4(0x10b)](MANAGE_PREFIX+_0x125bc4(0x10e),{'team_name':_0x147700});return unwrap(_0x2f6ed3);}export async function upsertProjectThread(_0x4e7cdc,_0x991027){const _0x511e4c=a27_0x54f6c9;manageClient['initialize']();const _0x2f3214=await manageClient['post'](MANAGE_PREFIX+_0x511e4c(0x110)+_0x4e7cdc+'/thread',{'thread_id':_0x991027});return unwrap(_0x2f3214);}export async function getProjectThread(_0x5acc29){const _0x312307=a27_0x54f6c9;manageClient[_0x312307(0x111)]();const _0xa63655=await manageClient[_0x312307(0x113)](MANAGE_PREFIX+_0x312307(0x110)+_0x5acc29+'/thread');return unwrap(_0xa63655);}function unwrap(_0xda3375){const _0x5e68eb=a27_0x54f6c9;if(_0xda3375[_0x5e68eb(0x115)]!==undefined&&_0xda3375[_0x5e68eb(0x115)]!==null)return _0xda3375['data'];if(typeof _0xda3375===_0x5e68eb(0xfc)&&!(_0x5e68eb(0x10c)in _0xda3375&&'msg'in _0xda3375))return _0xda3375;throw new Error(_0x5e68eb(0x101)+_0xda3375[_0x5e68eb(0x10c)]+_0x5e68eb(0x10a)+_0xda3375['msg']+')');}function unwrapList(_0x136fb4){const _0x56e03c=a27_0x54f6c9;return _0x136fb4[_0x56e03c(0x115)]?.[_0x56e03c(0x10d)]??[];}export async function createProject(_0x2426f2){const _0x35a8d4=a27_0x54f6c9;manageClient[_0x35a8d4(0x111)]();const _0x112882=await manageClient[_0x35a8d4(0x10b)](MANAGE_PREFIX+_0x35a8d4(0xfe),{'team_id':_0x2426f2[_0x35a8d4(0xf5)],'project_name':_0x2426f2[_0x35a8d4(0x100)],'description':_0x2426f2[_0x35a8d4(0x108)]??''});return unwrap(_0x112882);}export async function listProjects(_0x422051){const _0x168cb9=a27_0x54f6c9;manageClient[_0x168cb9(0x111)]();const _0x44bfaf=await manageClient['get'](MANAGE_PREFIX+_0x168cb9(0x11b)+_0x422051+_0x168cb9(0xf6));return unwrapList(_0x44bfaf);}export async function getProjectVersions(_0x38615f){const _0xfae891=a27_0x54f6c9;manageClient[_0xfae891(0x111)]();const _0xa9292f=await manageClient[_0xfae891(0x113)](MANAGE_PREFIX+_0xfae891(0x110)+_0x38615f+_0xfae891(0x112));return unwrapList(_0xa9292f);}export async function createVersion(_0x47e063,_0x56d934){const _0x1f317a=a27_0x54f6c9;manageClient[_0x1f317a(0x111)]();const _0x470b45=await manageClient[_0x1f317a(0x10b)](MANAGE_PREFIX+'/projects/'+_0x47e063+'/versions',{'version_number':_0x56d934,'description':_0x56d934+_0x1f317a(0xfd)});return unwrap(_0x470b45);}export async function publishVersion(_0x4b8303,_0x28595f){const _0x5d897c=a27_0x54f6c9;manageClient['initialize']();const _0xf078ef=await manageClient[_0x5d897c(0x10b)](MANAGE_PREFIX+_0x5d897c(0x110)+_0x4b8303+_0x5d897c(0x103)+_0x28595f+_0x5d897c(0x117));return unwrap(_0xf078ef);}export async function getDeploymentStatus(_0xcb16d8){const _0x2839d9=a27_0x54f6c9;manageClient[_0x2839d9(0x111)]();const _0x3d63ba=await manageClient[_0x2839d9(0x113)](_0x2839d9(0xf8)+_0xcb16d8);return unwrap(_0x3d63ba);}export async function lookupDeployment(_0x38d241,_0x17abd4){const _0x59a09f=a27_0x54f6c9;manageClient[_0x59a09f(0x111)]();const _0x5f349a=await manageClient[_0x59a09f(0x113)](MANAGE_PREFIX+_0x59a09f(0x102)+_0x38d241+'/'+_0x17abd4);return unwrap(_0x5f349a);}export async function recallDeployment(_0x547677){const _0x384faf=a27_0x54f6c9;manageClient['initialize']();const _0x5c83fd=await manageClient[_0x384faf(0x10b)](MANAGE_PREFIX+_0x384faf(0x110)+_0x547677+_0x384faf(0x116));return unwrap(_0x5c83fd);}export async function bindAppToProject(_0x5eae3f,_0x19ac82,_0xa10096){const _0x25ab21=a27_0x54f6c9;manageClient[_0x25ab21(0x111)]();const _0x581051=await manageClient[_0x25ab21(0x10b)](MANAGE_PREFIX+'/projects/'+_0x5eae3f+_0x25ab21(0x118),{'open_app_id':_0x19ac82,'open_ssid':_0xa10096});return unwrap(_0x581051);}export async function updateProjectAppScopes(_0x318331,_0x167b3a,_0x4ae5c2){const _0x139b81=a27_0x54f6c9;manageClient[_0x139b81(0x111)]();const _0x3c745c=await manageClient[_0x139b81(0x10b)](MANAGE_PREFIX+_0x139b81(0x110)+_0x318331+_0x139b81(0x107)+_0x167b3a+_0x139b81(0x105),{'scopes':_0x4ae5c2});return unwrap(_0x3c745c);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1d2ddd,_0x5a1176){const _0x39d558=a28_0x42f2,_0x1b33a8=_0x1d2ddd();while(!![]){try{const _0x273e75=parseInt(_0x39d558(0xca))/0x1*(-parseInt(_0x39d558(0xd6))/0x2)+-parseInt(_0x39d558(0xd4))/0x3*(parseInt(_0x39d558(0xc1))/0x4)+-parseInt(_0x39d558(0xdd))/0x5*(parseInt(_0x39d558(0xdf))/0x6)+parseInt(_0x39d558(0xcd))/0x7*(parseInt(_0x39d558(0xe1))/0x8)+-parseInt(_0x39d558(0xe5))/0x9*(parseInt(_0x39d558(0xd3))/0xa)+-parseInt(_0x39d558(0xc7))/0xb*(-parseInt(_0x39d558(0xc2))/0xc)+parseInt(_0x39d558(0xe6))/0xd*(parseInt(_0x39d558(0xda))/0xe);if(_0x273e75===_0x5a1176)break;else _0x1b33a8['push'](_0x1b33a8['shift']());}catch(_0x1555f1){_0x1b33a8['push'](_0x1b33a8['shift']());}}}(a28_0x5901,0x9fd52));import{getThreadState}from'./cloud-agent.js';import{getBuildStatus}from'./cloud-publish.js';import{getProjectVersions}from'./manage.js';function extractDescription(_0x56d62e){const _0x189d58=a28_0x42f2;if(typeof _0x56d62e===_0x189d58(0xc8))return _0x56d62e;if(!_0x56d62e||typeof _0x56d62e!==_0x189d58(0xd8))return null;const _0xbfd30e=_0x56d62e;return _0xbfd30e[_0x189d58(0xd2)]??_0xbfd30e[_0x189d58(0xe4)]??_0xbfd30e[_0x189d58(0xdc)]??null;}function extractInterrupt(_0x321e9f){const _0x36deb3=a28_0x42f2;for(const _0x50fca0 of _0x321e9f){const _0x150994=_0x50fca0,_0x412eb0=_0x150994['interrupts'];if(_0x412eb0?.['length']){const _0x1845c6=_0x412eb0[0x0],_0xd0ab18=_0x1845c6[_0x36deb3(0xde)];return{'waiting':!![],'description':extractDescription(_0xd0ab18),'value':_0xd0ab18};}}return{'waiting':![]};}function a28_0x5901(){const _0x43d73b=['isArray','version_number','description','260Eumkjk','948iDinfc','status','26ntnhsF','access_url','object','failed','2255358IJPDxE','result','type','1185fSUryk','value','7878WLMdYM','created_at','7101688qEHotg','keys','todos','message','252000zJiPMW','91YWbPpN','messages','publishResponse','4756ETAzeO','555864VvuJia','tasks','fulfilled','sort','short_url','209kpIrWZ','string','resolve','63533QYZBXP','values','deployed','7wGcDvI','length','none'];a28_0x5901=function(){return _0x43d73b;};return a28_0x5901();}function settled(_0x4a561e){const _0x5b7c5f=a28_0x42f2;return _0x4a561e[_0x5b7c5f(0xd5)]===_0x5b7c5f(0xc4)?_0x4a561e['value']:null;}function buildAgentBlock(_0x185446){const _0x17ce64=a28_0x42f2;if(!_0x185446)return{'messages_count':0x0,'file_count':0x0,'has_todos':![],'tasks_count':0x0};const _0x200ff5=_0x185446[_0x17ce64(0xcb)]?.[_0x17ce64(0xbf)],_0x2341f3=_0x185446[_0x17ce64(0xcb)]?.['files'],_0x1558ef=_0x185446[_0x17ce64(0xcb)]?.[_0x17ce64(0xe3)];let _0x37e014=0x0;return _0x2341f3&&typeof _0x2341f3==='object'&&(_0x37e014=Object[_0x17ce64(0xe2)](_0x2341f3)[_0x17ce64(0xce)]),{'messages_count':Array['isArray'](_0x200ff5)?_0x200ff5['length']:0x0,'file_count':_0x37e014,'has_todos':Array[_0x17ce64(0xd0)](_0x1558ef)?_0x1558ef['length']>0x0:![],'tasks_count':Array[_0x17ce64(0xd0)](_0x185446[_0x17ce64(0xc3)])?_0x185446['tasks'][_0x17ce64(0xce)]:0x0};}function buildBuildBlock(_0x2558d3){const _0x3c9cf5=a28_0x42f2;if(!_0x2558d3)return{'phase':'none','message':''};return{'phase':_0x2558d3['phase'],'message':_0x2558d3[_0x3c9cf5(0xe4)]};}function a28_0x42f2(_0x22579c,_0x3c6843){_0x22579c=_0x22579c-0xbf;const _0x59012d=a28_0x5901();let _0x42f294=_0x59012d[_0x22579c];return _0x42f294;}function buildDeployBlock(_0xf79f3d){const _0x1696d4=a28_0x42f2;if(!_0xf79f3d)return{'status':_0x1696d4(0xcf),'access_url':null,'short_url':null};const _0x32ac00=_0xf79f3d[_0x1696d4(0xdb)]?.[_0x1696d4(0xc0)];if(!_0x32ac00)return{'status':_0x1696d4(0xcf),'access_url':null,'short_url':null};const _0x5345be={'deployed':_0x1696d4(0xcc),'deploying':'deploying','failed':_0x1696d4(0xd9)};return{'status':_0x5345be[_0x32ac00['deploy_status']??'']??_0x1696d4(0xcf),'access_url':_0x32ac00[_0x1696d4(0xd7)]||null,'short_url':_0x32ac00[_0x1696d4(0xc6)]||null};}function buildProjectBlock(_0xca327f,_0x1c7010){const _0x42b81f=a28_0x42f2;if(!_0x1c7010)return{'id':_0xca327f,'name':null,'versions_count':0x0,'latest_version':null};const _0x3349eb=[..._0x1c7010][_0x42b81f(0xc5)]((_0x3b7034,_0x41c6fd)=>_0x41c6fd['created_at']-_0x3b7034[_0x42b81f(0xe0)]);return{'id':_0xca327f,'name':null,'versions_count':_0x1c7010[_0x42b81f(0xce)],'latest_version':_0x3349eb[0x0]?.[_0x42b81f(0xd1)]??null};}export async function getProjectContext(_0x14f43d,_0x467d25){const _0x584c99=a28_0x42f2,[_0x447b10,_0x86bdc9,_0x4ba5b8]=await Promise['allSettled']([getThreadState(_0x14f43d),getBuildStatus(_0x14f43d),_0x467d25?getProjectVersions(_0x467d25):Promise[_0x584c99(0xc9)](null)]),_0x2b8613=settled(_0x447b10),_0x46ed1b=settled(_0x86bdc9),_0x3b22f3=settled(_0x4ba5b8),_0x297774=buildDeployBlock(_0x46ed1b),_0x19d732=buildAgentBlock(_0x2b8613),_0x43668b=_0x2b8613?(_0x2b8613['next']?.[_0x584c99(0xce)]??0x0)>0x0:![];return{'thread_id':_0x14f43d,'agent':{..._0x19d732,'running':_0x43668b},'interrupt':extractInterrupt(_0x2b8613?.[_0x584c99(0xc3)]??[]),'build':buildBuildBlock(_0x46ed1b),'deploy':_0x297774,'project':_0x467d25!=null?buildProjectBlock(_0x467d25,_0x3b22f3):null,'urls':{'runtime':_0x297774['short_url']||_0x297774[_0x584c99(0xd7)],'short_url':_0x297774[_0x584c99(0xc6)]}};}
|
package/oclif.manifest.json
CHANGED
|
@@ -318,6 +318,46 @@
|
|
|
318
318
|
"files.js"
|
|
319
319
|
]
|
|
320
320
|
},
|
|
321
|
+
"code:lookup": {
|
|
322
|
+
"aliases": [],
|
|
323
|
+
"args": {},
|
|
324
|
+
"description": "通过短链反查项目信息(project_id、thread_id 等),用于重新部署",
|
|
325
|
+
"examples": [
|
|
326
|
+
"<%= config.bin %> code lookup --url https://o.wpsgo.com/app/41000207/6Ne2UkWT3ytn/ --json"
|
|
327
|
+
],
|
|
328
|
+
"flags": {
|
|
329
|
+
"json": {
|
|
330
|
+
"description": "Format output as json.",
|
|
331
|
+
"helpGroup": "GLOBAL",
|
|
332
|
+
"name": "json",
|
|
333
|
+
"allowNo": false,
|
|
334
|
+
"type": "boolean"
|
|
335
|
+
},
|
|
336
|
+
"url": {
|
|
337
|
+
"description": "应用短链 URL",
|
|
338
|
+
"name": "url",
|
|
339
|
+
"required": true,
|
|
340
|
+
"hasDynamicHelp": false,
|
|
341
|
+
"multiple": false,
|
|
342
|
+
"type": "option"
|
|
343
|
+
}
|
|
344
|
+
},
|
|
345
|
+
"hasDynamicHelp": false,
|
|
346
|
+
"hiddenAliases": [],
|
|
347
|
+
"id": "code:lookup",
|
|
348
|
+
"pluginAlias": "@wps365-open/comate-cli",
|
|
349
|
+
"pluginName": "@wps365-open/comate-cli",
|
|
350
|
+
"pluginType": "core",
|
|
351
|
+
"strict": true,
|
|
352
|
+
"enableJsonFlag": true,
|
|
353
|
+
"isESM": true,
|
|
354
|
+
"relativePath": [
|
|
355
|
+
"dist",
|
|
356
|
+
"commands",
|
|
357
|
+
"code",
|
|
358
|
+
"lookup.js"
|
|
359
|
+
]
|
|
360
|
+
},
|
|
321
361
|
"code:publish": {
|
|
322
362
|
"aliases": [],
|
|
323
363
|
"args": {},
|
|
@@ -395,6 +435,53 @@
|
|
|
395
435
|
"publish.js"
|
|
396
436
|
]
|
|
397
437
|
},
|
|
438
|
+
"code:recall": {
|
|
439
|
+
"aliases": [],
|
|
440
|
+
"args": {},
|
|
441
|
+
"description": "下架已部署的应用(recall),使其不再可访问",
|
|
442
|
+
"examples": [
|
|
443
|
+
"<%= config.bin %> code recall --project-id 206 --json",
|
|
444
|
+
"<%= config.bin %> code recall --url https://o.wpsgo.com/app/41000207/6Ne2UkWT3ytn/ --json"
|
|
445
|
+
],
|
|
446
|
+
"flags": {
|
|
447
|
+
"json": {
|
|
448
|
+
"description": "Format output as json.",
|
|
449
|
+
"helpGroup": "GLOBAL",
|
|
450
|
+
"name": "json",
|
|
451
|
+
"allowNo": false,
|
|
452
|
+
"type": "boolean"
|
|
453
|
+
},
|
|
454
|
+
"project-id": {
|
|
455
|
+
"description": "项目 ID(与 --url 二选一)",
|
|
456
|
+
"name": "project-id",
|
|
457
|
+
"hasDynamicHelp": false,
|
|
458
|
+
"multiple": false,
|
|
459
|
+
"type": "option"
|
|
460
|
+
},
|
|
461
|
+
"url": {
|
|
462
|
+
"description": "应用短链 URL(与 --project-id 二选一)",
|
|
463
|
+
"name": "url",
|
|
464
|
+
"hasDynamicHelp": false,
|
|
465
|
+
"multiple": false,
|
|
466
|
+
"type": "option"
|
|
467
|
+
}
|
|
468
|
+
},
|
|
469
|
+
"hasDynamicHelp": false,
|
|
470
|
+
"hiddenAliases": [],
|
|
471
|
+
"id": "code:recall",
|
|
472
|
+
"pluginAlias": "@wps365-open/comate-cli",
|
|
473
|
+
"pluginName": "@wps365-open/comate-cli",
|
|
474
|
+
"pluginType": "core",
|
|
475
|
+
"strict": true,
|
|
476
|
+
"enableJsonFlag": true,
|
|
477
|
+
"isESM": true,
|
|
478
|
+
"relativePath": [
|
|
479
|
+
"dist",
|
|
480
|
+
"commands",
|
|
481
|
+
"code",
|
|
482
|
+
"recall.js"
|
|
483
|
+
]
|
|
484
|
+
},
|
|
398
485
|
"code:resume": {
|
|
399
486
|
"aliases": [],
|
|
400
487
|
"args": {},
|
|
@@ -638,5 +725,5 @@
|
|
|
638
725
|
]
|
|
639
726
|
}
|
|
640
727
|
},
|
|
641
|
-
"version": "0.0.
|
|
728
|
+
"version": "0.0.17"
|
|
642
729
|
}
|