@wps365-open/comate-cli 0.0.18 → 0.0.21

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.
@@ -1 +1 @@
1
- const a0_0x3b024e=a0_0x39ba;function a0_0x13f8(){const _0x2b47f2=['boolean','正在打开浏览器,请在浏览器中完成登录...','3225681kOYbEs','description','wps_sid','登录\x20WPS\x20账号','36JrYyUx','stopLoading','createLoading','6514520pbunll','20552360bhxhhO','log','load','flags','24KYLkav','parse','force','强制重新登录(即使当前已登录)','jsonEnabled','error','本地凭证已过期,重新登录...','16395jCndqe','登录成功,欢迎\x20','nickname','run','120446GZXiVg','10821504cmKIAV','28LBIkpb','当前已登录:\x20','message','464106kXOWgs'];a0_0x13f8=function(){return _0x2b47f2;};return a0_0x13f8();}(function(_0x1c2ba6,_0x2be18f){const _0x3d4b36=a0_0x39ba,_0x255cbe=_0x1c2ba6();while(!![]){try{const _0x2c2e34=parseInt(_0x3d4b36(0xa2))/0x1*(parseInt(_0x3d4b36(0xad))/0x2)+-parseInt(_0x3d4b36(0xa9))/0x3*(-parseInt(_0x3d4b36(0xb9))/0x4)+-parseInt(_0x3d4b36(0xbc))/0x5+-parseInt(_0x3d4b36(0xb2))/0x6*(-parseInt(_0x3d4b36(0xaf))/0x7)+-parseInt(_0x3d4b36(0xae))/0x8+-parseInt(_0x3d4b36(0xb5))/0x9+parseInt(_0x3d4b36(0x9e))/0xa;if(_0x2c2e34===_0x2be18f)break;else _0x255cbe['push'](_0x255cbe['shift']());}catch(_0x50ceb5){_0x255cbe['push'](_0x255cbe['shift']());}}}(a0_0x13f8,0xce578));import{Flags}from'@oclif/core';import a0_0x1386c2 from'../../lib/extends/command.js';import{configManager}from'../../lib/config/manager.js';function a0_0x39ba(_0x530cc7,_0x5d8e24){_0x530cc7=_0x530cc7-0x9e;const _0x13f840=a0_0x13f8();let _0x39bab7=_0x13f840[_0x530cc7];return _0x39bab7;}import{getCurrentUser}from'../../lib/service/auth.js';import{loginWithBrowser}from'../../lib/account/login-service.js';export default class AuthLogin extends a0_0x1386c2{static [a0_0x3b024e(0xb6)]=a0_0x3b024e(0xb8);static ['aliases']=['login'];static ['enableJsonFlag']=!![];static [a0_0x3b024e(0xa1)]={'force':Flags[a0_0x3b024e(0xb3)]({'char':'f','description':a0_0x3b024e(0xa5),'default':![]})};async[a0_0x3b024e(0xac)](){const _0x474955=a0_0x3b024e,{flags:_0x1983a3}=await this[_0x474955(0xa3)](AuthLogin);if(!_0x1983a3[_0x474955(0xa4)]){const _0x3142f2=configManager[_0x474955(0xa0)]();if(_0x3142f2[_0x474955(0xb7)])try{const _0x20b0c4=await getCurrentUser();return configManager['saveUserInfo'](_0x20b0c4),!this[_0x474955(0xa6)]()&&(this[_0x474955(0x9f)](_0x474955(0xb0)+_0x20b0c4[_0x474955(0xab)]),this[_0x474955(0x9f)]('如需切换账号,请使用\x20comate-cli\x20auth\x20login\x20-f')),{'nickname':_0x20b0c4[_0x474955(0xab)],'alreadyLoggedIn':!![]};}catch{!this[_0x474955(0xa6)]()&&this['log'](_0x474955(0xa8));}}!this[_0x474955(0xa6)]()&&await this[_0x474955(0xbb)](_0x474955(0xb4));try{const {nickname:_0x2ff4a0}=await loginWithBrowser();return this['stopLoading'](_0x474955(0xaa)+_0x2ff4a0),{'nickname':_0x2ff4a0,'alreadyLoggedIn':![]};}catch(_0x56d518){this[_0x474955(0xba)](),this[_0x474955(0xa7)](_0x56d518 instanceof Error?_0x56d518[_0x474955(0xb1)]:String(_0x56d518));}}}
1
+ const a0_0x51172a=a0_0x2594;function a0_0x22ce(){const _0x21dee6=['3247158qeScsH','56YvtVWm','正在打开浏览器,请在浏览器中完成登录...','error','登录\x20WPS\x20账号','enableJsonFlag','aliases','createLoading','216190zSpaZv','254808Usyjxa','jsonEnabled','description','强制重新登录(即使当前已登录)','当前已登录:\x20','login','force','576528DNjxAZ','run','flags','nickname','登录成功,欢迎\x20','本地凭证已过期,重新登录...','stopLoading','boolean','message','log','381189oaVrNe','2308284vcIRgk','80tSYCKG','load','wps_sid','saveUserInfo','34392969SDTSnw'];a0_0x22ce=function(){return _0x21dee6;};return a0_0x22ce();}(function(_0x238555,_0x12fe7a){const _0x5d888d=a0_0x2594,_0x5010ed=_0x238555();while(!![]){try{const _0x413a34=-parseInt(_0x5d888d(0x1cd))/0x1+-parseInt(_0x5d888d(0x1ce))/0x2+-parseInt(_0x5d888d(0x1d4))/0x3+parseInt(_0x5d888d(0x1cf))/0x4*(-parseInt(_0x5d888d(0x1bb))/0x5)+parseInt(_0x5d888d(0x1bc))/0x6*(parseInt(_0x5d888d(0x1d5))/0x7)+parseInt(_0x5d888d(0x1c3))/0x8+parseInt(_0x5d888d(0x1d3))/0x9;if(_0x413a34===_0x12fe7a)break;else _0x5010ed['push'](_0x5010ed['shift']());}catch(_0xb24111){_0x5010ed['push'](_0x5010ed['shift']());}}}(a0_0x22ce,0xb74b6));import{Flags}from'@oclif/core';import a0_0x16ae9c from'../../lib/extends/command.js';import{configManager}from'../../lib/config/manager.js';function a0_0x2594(_0x228420,_0x54d875){_0x228420=_0x228420-0x1b6;const _0x22ce95=a0_0x22ce();let _0x259495=_0x22ce95[_0x228420];return _0x259495;}import{getCurrentUser}from'../../lib/service/auth.js';import{loginWithBrowser}from'../../lib/account/login-service.js';export default class AuthLogin extends a0_0x16ae9c{static [a0_0x51172a(0x1be)]=a0_0x51172a(0x1b7);static [a0_0x51172a(0x1b9)]=[a0_0x51172a(0x1c1)];static [a0_0x51172a(0x1b8)]=!![];static [a0_0x51172a(0x1c5)]={'force':Flags[a0_0x51172a(0x1ca)]({'char':'f','description':a0_0x51172a(0x1bf),'default':![]})};async[a0_0x51172a(0x1c4)](){const _0x1cbe78=a0_0x51172a,{flags:_0x3a2467}=await this['parse'](AuthLogin);if(!_0x3a2467[_0x1cbe78(0x1c2)]){const _0x279b89=configManager[_0x1cbe78(0x1d0)]();if(_0x279b89[_0x1cbe78(0x1d1)])try{const _0x1ba82a=await getCurrentUser();return configManager[_0x1cbe78(0x1d2)](_0x1ba82a),!this[_0x1cbe78(0x1bd)]()&&(this['log'](_0x1cbe78(0x1c0)+_0x1ba82a[_0x1cbe78(0x1c6)]),this[_0x1cbe78(0x1cc)]('如需切换账号,请使用\x20npx\x20--yes\x20@wps365-open/comate-cli@latest\x20auth\x20login\x20-f')),{'nickname':_0x1ba82a[_0x1cbe78(0x1c6)],'alreadyLoggedIn':!![]};}catch{!this[_0x1cbe78(0x1bd)]()&&this['log'](_0x1cbe78(0x1c8));}}!this['jsonEnabled']()&&await this[_0x1cbe78(0x1ba)](_0x1cbe78(0x1d6));try{const {nickname:_0x4dca86}=await loginWithBrowser();return this[_0x1cbe78(0x1c9)](_0x1cbe78(0x1c7)+_0x4dca86),{'nickname':_0x4dca86,'alreadyLoggedIn':![]};}catch(_0x4c5384){this[_0x1cbe78(0x1c9)](),this[_0x1cbe78(0x1b6)](_0x4c5384 instanceof Error?_0x4c5384[_0x1cbe78(0x1cb)]:String(_0x4c5384));}}}
@@ -1 +1 @@
1
- const a1_0x21a694=a1_0x3b9f;(function(_0x4d33e5,_0x1f5926){const _0x12783f=a1_0x3b9f,_0x4ad666=_0x4d33e5();while(!![]){try{const _0x3f1a88=-parseInt(_0x12783f(0x160))/0x1+parseInt(_0x12783f(0x152))/0x2+parseInt(_0x12783f(0x157))/0x3*(-parseInt(_0x12783f(0x163))/0x4)+-parseInt(_0x12783f(0x165))/0x5+-parseInt(_0x12783f(0x161))/0x6*(parseInt(_0x12783f(0x164))/0x7)+parseInt(_0x12783f(0x167))/0x8*(parseInt(_0x12783f(0x15f))/0x9)+parseInt(_0x12783f(0x15e))/0xa;if(_0x3f1a88===_0x1f5926)break;else _0x4ad666['push'](_0x4ad666['shift']());}catch(_0x435371){_0x4ad666['push'](_0x4ad666['shift']());}}}(a1_0x309a,0x5016c));function a1_0x309a(){const _0x7a3f0a=['user_info','登出当前\x20WPS\x20账号','run','3vYwmSH','nickname','未知用户','wps_sid','已登出:\x20','log','jsonEnabled','8801170Clkwbu','3048426fFuqhz','38035IohrtL','11250lgwJMa','parse','1987896MnEHAC','2233cxViNS','1749085CymxND','description','8FYdiaz','1184328NJWOPg','load'];a1_0x309a=function(){return _0x7a3f0a;};return a1_0x309a();}function a1_0x3b9f(_0x4845b6,_0x554754){_0x4845b6=_0x4845b6-0x152;const _0x309a3b=a1_0x309a();let _0x3b9fd0=_0x309a3b[_0x4845b6];return _0x3b9fd0;}import a1_0x273f2d from'../../lib/extends/command.js';import{configManager}from'../../lib/config/manager.js';export default class AuthLogout extends a1_0x273f2d{static [a1_0x21a694(0x166)]=a1_0x21a694(0x155);static ['aliases']=['logout'];static ['enableJsonFlag']=!![];async[a1_0x21a694(0x156)](){const _0x454a73=a1_0x21a694;await this[_0x454a73(0x162)](AuthLogout);const _0x419a2d=configManager[_0x454a73(0x153)]();if(!_0x419a2d[_0x454a73(0x15a)])return!this[_0x454a73(0x15d)]()&&this[_0x454a73(0x15c)]('当前未登录'),{'loggedOut':![],'nickname':null};const _0x30f6cf=_0x419a2d[_0x454a73(0x154)]?.[_0x454a73(0x158)]??_0x454a73(0x159);return configManager['clear'](),!this['jsonEnabled']()&&this[_0x454a73(0x15c)](_0x454a73(0x15b)+_0x30f6cf),{'loggedOut':!![],'nickname':_0x30f6cf};}}
1
+ function a1_0x921c(_0x1b350e,_0x4c6575){_0x1b350e=_0x1b350e-0x198;const _0x493674=a1_0x4936();let _0x921c04=_0x493674[_0x1b350e];return _0x921c04;}const a1_0x5f4f16=a1_0x921c;(function(_0x1b65da,_0x641cb2){const _0x558e89=a1_0x921c,_0x66f00d=_0x1b65da();while(!![]){try{const _0x46978d=parseInt(_0x558e89(0x1a4))/0x1+parseInt(_0x558e89(0x19f))/0x2+parseInt(_0x558e89(0x19d))/0x3+parseInt(_0x558e89(0x1a2))/0x4+-parseInt(_0x558e89(0x19e))/0x5*(parseInt(_0x558e89(0x1a5))/0x6)+-parseInt(_0x558e89(0x1a6))/0x7+-parseInt(_0x558e89(0x1a8))/0x8;if(_0x46978d===_0x641cb2)break;else _0x66f00d['push'](_0x66f00d['shift']());}catch(_0x515e71){_0x66f00d['push'](_0x66f00d['shift']());}}}(a1_0x4936,0x1b82c));import a1_0x49b03a from'../../lib/extends/command.js';import{configManager}from'../../lib/config/manager.js';export default class AuthLogout extends a1_0x49b03a{static [a1_0x5f4f16(0x1a7)]=a1_0x5f4f16(0x1a1);static [a1_0x5f4f16(0x1a9)]=[a1_0x5f4f16(0x199)];static [a1_0x5f4f16(0x198)]=!![];async[a1_0x5f4f16(0x1a0)](){const _0x455c3e=a1_0x5f4f16;await this['parse'](AuthLogout);const _0x2bfd04=configManager['load']();if(!_0x2bfd04['wps_sid'])return!this[_0x455c3e(0x1a3)]()&&this['log']('当前未登录'),{'loggedOut':![],'nickname':null};const _0xb1652d=_0x2bfd04[_0x455c3e(0x19c)]?.['nickname']??_0x455c3e(0x19b);return configManager[_0x455c3e(0x19a)](),!this[_0x455c3e(0x1a3)]()&&this['log']('已登出:\x20'+_0xb1652d),{'loggedOut':!![],'nickname':_0xb1652d};}}function a1_0x4936(){const _0x12e0db=['run','登出当前\x20WPS\x20账号','447212kIYeBD','jsonEnabled','176255fvZrdt','42tTuIuO','805140fZWNJR','description','2194536ssldes','aliases','enableJsonFlag','logout','clear','未知用户','user_info','498702xJsjod','34135DiBDQH','191036DRUymJ'];a1_0x4936=function(){return _0x12e0db;};return a1_0x4936();}
@@ -1 +1 @@
1
- const a2_0x278f29=a2_0x5ec1;(function(_0x507b87,_0x22dae8){const _0xfd91f0=a2_0x5ec1,_0x50ed13=_0x507b87();while(!![]){try{const _0x9edc85=parseInt(_0xfd91f0(0x92))/0x1*(parseInt(_0xfd91f0(0x8e))/0x2)+parseInt(_0xfd91f0(0x90))/0x3+parseInt(_0xfd91f0(0x98))/0x4+-parseInt(_0xfd91f0(0x99))/0x5*(parseInt(_0xfd91f0(0x8b))/0x6)+-parseInt(_0xfd91f0(0x88))/0x7+-parseInt(_0xfd91f0(0x97))/0x8+parseInt(_0xfd91f0(0x87))/0x9;if(_0x9edc85===_0x22dae8)break;else _0x50ed13['push'](_0x50ed13['shift']());}catch(_0xc14728){_0x50ed13['push'](_0x50ed13['shift']());}}}(a2_0x55c0,0xe3781));import a2_0x137020 from'../../lib/extends/command.js';import{configManager}from'../../lib/config/manager.js';export default class AuthStatus extends a2_0x137020{static ['description']=a2_0x278f29(0x95);static ['aliases']=['whoami'];static [a2_0x278f29(0x9b)]=!![];async['run'](){const _0x570804=a2_0x278f29;await this[_0x570804(0x94)](AuthStatus),await this[_0x570804(0x9c)]();const _0x23714e=configManager[_0x570804(0x8c)](),_0x4576f9=_0x23714e[_0x570804(0x96)];return!_0x4576f9&&this[_0x570804(0x89)]('已登录,但无缓存的用户信息。请重新执行\x20comate-cli\x20auth\x20login。'),!this[_0x570804(0x8d)]()&&(this[_0x570804(0x8a)](_0x570804(0x9a)+_0x4576f9[_0x570804(0x91)]),this['log']('邮箱:\x20'+_0x4576f9['email']),this[_0x570804(0x8a)](_0x570804(0x8f)+_0x4576f9[_0x570804(0x93)])),_0x4576f9;}}function a2_0x5ec1(_0x3f0b48,_0x558469){_0x3f0b48=_0x3f0b48-0x87;const _0x55c08b=a2_0x55c0();let _0x5ec1a2=_0x55c08b[_0x3f0b48];return _0x5ec1a2;}function a2_0x55c0(){const _0x2ef47a=['13911160dvfUCx','6521988RGNGhX','2346370lPEpdY','用户:\x20','enableJsonFlag','requireAuth','11312406rwgeNc','7241647giKVMh','error','log','12jLaAiX','load','jsonEnabled','2cAzmdm','ID:\x20\x20\x20','5250924MqEpbh','nickname','5938shsQxD','user_id','parse','显示当前登录用户信息','user_info'];a2_0x55c0=function(){return _0x2ef47a;};return a2_0x55c0();}
1
+ function a2_0x5f38(_0x422725,_0x523aaf){_0x422725=_0x422725-0x172;const _0x318622=a2_0x3186();let _0x5f38d4=_0x318622[_0x422725];return _0x5f38d4;}const a2_0x1950b3=a2_0x5f38;(function(_0x54b74d,_0x39e6c){const _0x23e3f9=a2_0x5f38,_0x4cd022=_0x54b74d();while(!![]){try{const _0x5c3c3d=-parseInt(_0x23e3f9(0x17f))/0x1*(-parseInt(_0x23e3f9(0x18b))/0x2)+parseInt(_0x23e3f9(0x17d))/0x3*(parseInt(_0x23e3f9(0x178))/0x4)+-parseInt(_0x23e3f9(0x172))/0x5*(-parseInt(_0x23e3f9(0x182))/0x6)+-parseInt(_0x23e3f9(0x17b))/0x7*(-parseInt(_0x23e3f9(0x177))/0x8)+parseInt(_0x23e3f9(0x186))/0x9*(parseInt(_0x23e3f9(0x181))/0xa)+-parseInt(_0x23e3f9(0x185))/0xb+parseInt(_0x23e3f9(0x179))/0xc*(-parseInt(_0x23e3f9(0x173))/0xd);if(_0x5c3c3d===_0x39e6c)break;else _0x4cd022['push'](_0x4cd022['shift']());}catch(_0x33fdde){_0x4cd022['push'](_0x4cd022['shift']());}}}(a2_0x3186,0x9dedd));import a2_0x43634b from'../../lib/extends/command.js';import{configManager}from'../../lib/config/manager.js';function a2_0x3186(){const _0x2eb3a6=['enableJsonFlag','parse','whoami','description','50296qxRcpH','5AUmJZC','13BVlVFk','jsonEnabled','邮箱:\x20','显示当前登录用户信息','43312wRCaPD','156OUCzUt','24020184uJoToo','email','1351ZSMdsS','requireAuth','8613knSTmP','ID:\x20\x20\x20','46CSKsCz','error','520GCFjVL','1304934tqfvhY','nickname','log','4107235VshFsA','84942uByWtQ'];a2_0x3186=function(){return _0x2eb3a6;};return a2_0x3186();}export default class AuthStatus extends a2_0x43634b{static [a2_0x1950b3(0x18a)]=a2_0x1950b3(0x176);static ['aliases']=[a2_0x1950b3(0x189)];static [a2_0x1950b3(0x187)]=!![];async['run'](){const _0x5c78a5=a2_0x1950b3;await this[_0x5c78a5(0x188)](AuthStatus),await this[_0x5c78a5(0x17c)]();const _0x5de0a5=configManager['load'](),_0x231254=_0x5de0a5['user_info'];return!_0x231254&&this[_0x5c78a5(0x180)]('已登录,但无缓存的用户信息。请重新执行\x20npx\x20--yes\x20@wps365-open/comate-cli@latest\x20auth\x20login。'),!this[_0x5c78a5(0x174)]()&&(this[_0x5c78a5(0x184)]('用户:\x20'+_0x231254[_0x5c78a5(0x183)]),this['log'](_0x5c78a5(0x175)+_0x231254[_0x5c78a5(0x17a)]),this['log'](_0x5c78a5(0x17e)+_0x231254['user_id'])),_0x231254;}}
@@ -0,0 +1 @@
1
+ const a3_0x5e0c54=a3_0x53ee;function a3_0x54b7(){const _0x4a5b10=['writeConfigs','createLoading','<%=\x20config.bin\x20%>\x20code\x20config\x20--project-id\x20206\x20--json','description','stopLoading','flags','<%=\x20config.bin\x20%>\x20code\x20config\x20--project-id\x20206\x20--set\x20session_id=1388246512-b7aa-...\x20--set\x20task_type=local\x20--json','keys','log','4ZCEdcw','length','<%=\x20config.bin\x20%>\x20code\x20config\x20--project-id\x20206\x20--set\x20session_id=thread_xxx\x20--set\x20task_type=cloud\x20--json','requireAuth','\x20=\x20','run','3766WlkQSO','12739040eQdnFP','正在写入\x20','project-id','indexOf','1789911JFDjaA','examples','设置配置项(格式:\x20key=value,可多次使用)','1212ANwFBB','写入成功','12446888EYfixs','enableJsonFlag','readConfigs','slice','550956MdDnIw','16IiDcWR','读取成功','error','正在读取项目配置...','项目\x20ID(必填)','12155625ZpLUos','entries','set','failed','11NMHQSD','message','--set\x20格式错误:\x20\x22','60935WHmvRP'];a3_0x54b7=function(){return _0x4a5b10;};return a3_0x54b7();}(function(_0x427e37,_0x1e13e5){const _0x1c35a1=a3_0x53ee,_0x401ef9=_0x427e37();while(!![]){try{const _0x32f8b2=parseInt(_0x1c35a1(0x174))/0x1+parseInt(_0x1c35a1(0x160))/0x2*(parseInt(_0x1c35a1(0x16b))/0x3)+-parseInt(_0x1c35a1(0x175))/0x4*(-parseInt(_0x1c35a1(0x156))/0x5)+-parseInt(_0x1c35a1(0x16e))/0x6*(-parseInt(_0x1c35a1(0x166))/0x7)+parseInt(_0x1c35a1(0x170))/0x8+-parseInt(_0x1c35a1(0x17a))/0x9+-parseInt(_0x1c35a1(0x167))/0xa*(parseInt(_0x1c35a1(0x153))/0xb);if(_0x32f8b2===_0x1e13e5)break;else _0x401ef9['push'](_0x401ef9['shift']());}catch(_0x15c635){_0x401ef9['push'](_0x401ef9['shift']());}}}(a3_0x54b7,0xcb5da));import{Flags}from'@oclif/core';import a3_0x14a8ac from'../../lib/extends/command.js';function a3_0x53ee(_0x497e69,_0xeb06f8){_0x497e69=_0x497e69-0x150;const _0x54b71e=a3_0x54b7();let _0x53ee0f=_0x54b71e[_0x497e69];return _0x53ee0f;}import{getProjectConfigs,setProjectConfig}from'../../lib/service/manage.js';function parseSetFlag(_0x3a48c0){const _0x245a78=a3_0x53ee,_0x5ded8c=_0x3a48c0[_0x245a78(0x16a)]('=');if(_0x5ded8c<=0x0)throw new Error(_0x245a78(0x155)+_0x3a48c0+'\x22,应为\x20key=value');return{'key':_0x3a48c0[_0x245a78(0x173)](0x0,_0x5ded8c),'value':_0x3a48c0['slice'](_0x5ded8c+0x1)};}export default class CodeConfig extends a3_0x14a8ac{static [a3_0x5e0c54(0x15a)]='读写项目配置(session_id、task_type\x20等),用于追踪会话上下文';static [a3_0x5e0c54(0x171)]=!![];static [a3_0x5e0c54(0x16c)]=[a3_0x5e0c54(0x159),a3_0x5e0c54(0x162),a3_0x5e0c54(0x15d)];static [a3_0x5e0c54(0x15c)]={'project-id':Flags['integer']({'description':a3_0x5e0c54(0x179),'required':!![]}),'set':Flags['string']({'description':a3_0x5e0c54(0x16d),'multiple':!![]})};async[a3_0x5e0c54(0x165)](){const _0x42969d=a3_0x5e0c54;await this[_0x42969d(0x163)]();const {flags:_0x468ff1}=await this['parse'](CodeConfig),_0x38ff76=this['jsonEnabled'](),_0x32fcc4=_0x468ff1[_0x42969d(0x169)];try{if(_0x468ff1['set']&&_0x468ff1[_0x42969d(0x151)][_0x42969d(0x161)]>0x0)return await this[_0x42969d(0x157)](_0x32fcc4,_0x468ff1[_0x42969d(0x151)],_0x38ff76);return await this[_0x42969d(0x172)](_0x32fcc4,_0x38ff76);}catch(_0x4bb1bd){this[_0x42969d(0x15b)]();const _0x596e04=_0x4bb1bd instanceof Error?_0x4bb1bd[_0x42969d(0x154)]:String(_0x4bb1bd);if(_0x38ff76)return{'status':_0x42969d(0x152),'project_id':_0x32fcc4,'configs':{},'error':_0x596e04};this[_0x42969d(0x177)](_0x596e04);}}async[a3_0x5e0c54(0x172)](_0x55374f,_0x11747a){const _0x4572cd=a3_0x5e0c54;if(!_0x11747a)await this['createLoading'](_0x4572cd(0x178));const _0x163e0b=await getProjectConfigs(_0x55374f);if(!_0x11747a){this['stopLoading'](_0x4572cd(0x176));const _0x5dadb7=Object[_0x4572cd(0x15e)](_0x163e0b);if(_0x5dadb7['length']===0x0)this['log']('(无配置项)');else for(const [_0x4d51c7,_0x2cf48e]of Object[_0x4572cd(0x150)](_0x163e0b)){this[_0x4572cd(0x15f)]('\x20\x20'+_0x4d51c7+_0x4572cd(0x164)+_0x2cf48e);}}return{'status':'ok','project_id':_0x55374f,'configs':_0x163e0b};}async[a3_0x5e0c54(0x157)](_0x33aa1f,_0x51f2c9,_0xae8430){const _0x2780c8=a3_0x5e0c54,_0x3d5710=_0x51f2c9['map'](parseSetFlag);if(!_0xae8430)await this[_0x2780c8(0x158)](_0x2780c8(0x168)+_0x3d5710[_0x2780c8(0x161)]+'\x20项配置...');for(const {key:_0x111562,value:_0x369e32}of _0x3d5710){await setProjectConfig(_0x33aa1f,_0x111562,_0x369e32);}const _0x14e6bc=await getProjectConfigs(_0x33aa1f);if(!_0xae8430){this[_0x2780c8(0x15b)](_0x2780c8(0x16f));for(const {key:_0x54e839,value:_0x58e3df}of _0x3d5710){this[_0x2780c8(0x15f)]('\x20\x20'+_0x54e839+_0x2780c8(0x164)+_0x58e3df);}}return{'status':'ok','project_id':_0x33aa1f,'configs':_0x14e6bc};}}
@@ -1 +1 @@
1
- const a3_0xcab8ce=a3_0x3636;(function(_0xc3fb96,_0x3c0d30){const _0x10bbbb=a3_0x3636,_0x48fa2c=_0xc3fb96();while(!![]){try{const _0x2f8faf=parseInt(_0x10bbbb(0x83))/0x1+-parseInt(_0x10bbbb(0x9e))/0x2*(parseInt(_0x10bbbb(0x8c))/0x3)+parseInt(_0x10bbbb(0x9a))/0x4*(parseInt(_0x10bbbb(0xa1))/0x5)+-parseInt(_0x10bbbb(0x71))/0x6*(-parseInt(_0x10bbbb(0x74))/0x7)+-parseInt(_0x10bbbb(0x76))/0x8+parseInt(_0x10bbbb(0x81))/0x9+-parseInt(_0x10bbbb(0x7d))/0xa;if(_0x2f8faf===_0x3c0d30)break;else _0x48fa2c['push'](_0x48fa2c['shift']());}catch(_0x2d8177){_0x48fa2c['push'](_0x48fa2c['shift']());}}}(a3_0x233b,0x87e5e));import{Flags}from'@oclif/core';import a3_0x587bda from'../../lib/extends/command.js';function a3_0x3636(_0x2f085e,_0x4d1a61){_0x2f085e=_0x2f085e-0x70;const _0x233b79=a3_0x233b();let _0x363601=_0x233b79[_0x2f085e];return _0x363601;}import{createThread}from'../../lib/service/cloud-agent.js';import{getMyTeams,createTeam,createProject,listProjects,upsertProjectThread}from'../../lib/service/manage.js';function a3_0x233b(){const _0x2dba3c=['544701PrqdOj','正在创建云端会话...','toString','log','请选择团队:','string','app-buddy','length','error','57qpLUFN','list','teamId','项目就绪:\x20','project-id','会话已创建:\x20','resolveProject','agent-id','inquirer','复用已有项目\x20ID(跳过项目创建)','project_name','app-','jsonEnabled','parse','4021060BvSUnp','enableJsonFlag','创建云端\x20Agent\x20会话(自动关联\x20team\x20→\x20project\x20→\x20thread)','stopLoading','104866URNIup','存在\x20','project-','5FXsnrw','<%=\x20config.bin\x20%>\x20code\x20create\x20--project-id\x20206\x20--json','team_name','find','\x20个团队,请通过\x20--team-id\x20指定:\x20','map','thread_id','我的团队','\x20(id=','924mpIyjh','关联完成','now','24437gKcswu','project-name','3661920kTevao','join','description','run','examples','flags','integer','7649470ORUPSW','云端\x20Agent\x20ID','prompt','createLoading','6191748teClTb','slice'];a3_0x233b=function(){return _0x2dba3c;};return a3_0x233b();}export default class CodeCreate extends a3_0x587bda{static [a3_0xcab8ce(0x78)]=a3_0xcab8ce(0x9c);static [a3_0xcab8ce(0x9b)]=!![];static [a3_0xcab8ce(0x7a)]=['<%=\x20config.bin\x20%>\x20code\x20create\x20--project-name\x20my-app\x20--json',a3_0xcab8ce(0xa2),'<%=\x20config.bin\x20%>\x20code\x20create\x20--project-name\x20my-app\x20--team-id\x201\x20--json'];static [a3_0xcab8ce(0x7b)]={'project-name':Flags[a3_0xcab8ce(0x88)]({'description':'项目名称(新建或复用同名项目)'}),'project-id':Flags[a3_0xcab8ce(0x7c)]({'description':a3_0xcab8ce(0x95)}),'team-id':Flags['integer']({'description':'团队\x20ID(多团队时必填)'}),'agent-id':Flags[a3_0xcab8ce(0x88)]({'description':a3_0xcab8ce(0x7e),'default':a3_0xcab8ce(0x89)})};async[a3_0xcab8ce(0x79)](){const _0x216943=a3_0xcab8ce;await this['requireAuth']();const {flags:_0x54a2a9}=await this[_0x216943(0x99)](CodeCreate),_0x1908d0=this[_0x216943(0x98)]();if(!_0x1908d0)await this[_0x216943(0x80)]('正在初始化...');try{const {projectId:_0x542e8a,teamId:_0x522615,projectName:_0x4ace50}=await this[_0x216943(0x92)](_0x54a2a9,_0x1908d0);!_0x1908d0&&(this[_0x216943(0x9d)](_0x216943(0x8f)+_0x4ace50+_0x216943(0x70)+_0x542e8a+')'),await this[_0x216943(0x80)](_0x216943(0x84)));const _0x4c2782=await createThread(_0x54a2a9[_0x216943(0x93)]);return!_0x1908d0&&(this[_0x216943(0x9d)](_0x216943(0x91)+_0x4c2782[_0x216943(0xa7)]),await this[_0x216943(0x80)]('正在关联项目与会话...')),await upsertProjectThread(_0x542e8a,_0x4c2782[_0x216943(0xa7)]),this[_0x216943(0x9d)](_0x216943(0x72)),!_0x1908d0&&(this[_0x216943(0x86)]('项目:\x20'+_0x4ace50),this[_0x216943(0x86)]('Thread:\x20'+_0x4c2782[_0x216943(0xa7)])),{'thread_id':_0x4c2782[_0x216943(0xa7)],'project_id':_0x542e8a,'team_id':_0x522615,'project_name':_0x4ace50,'created_at':_0x4c2782['created_at']};}catch(_0x25ed18){this[_0x216943(0x9d)](),this[_0x216943(0x8b)](_0x25ed18 instanceof Error?_0x25ed18['message']:String(_0x25ed18));}}async['resolveProject'](_0x2730f2,_0x55116b){const _0x2965ba=a3_0xcab8ce;if(_0x2730f2['project-id'])return{'projectId':_0x2730f2[_0x2965ba(0x90)],'teamId':_0x2730f2['team-id']??0x0,'projectName':_0x2965ba(0xa0)+_0x2730f2[_0x2965ba(0x90)]};const _0x3510c6=await this['resolveTeamId'](_0x2730f2['team-id'],_0x55116b),_0xa40ce5=_0x2730f2[_0x2965ba(0x75)]??_0x2965ba(0x97)+Date[_0x2965ba(0x73)]()[_0x2965ba(0x85)](0x24)[_0x2965ba(0x82)](-0x6),_0x3b4b87=await listProjects(_0x3510c6),_0x255910=_0x3b4b87[_0x2965ba(0xa4)](_0x128a45=>_0x128a45[_0x2965ba(0x96)]===_0xa40ce5);if(_0x255910)return{'projectId':_0x255910['id'],'teamId':_0x3510c6,'projectName':_0xa40ce5};const _0x59ed86=await createProject({'teamId':_0x3510c6,'projectName':_0xa40ce5});return{'projectId':_0x59ed86['id'],'teamId':_0x3510c6,'projectName':_0xa40ce5};}async['resolveTeamId'](_0x201b42,_0x1ee5bf){const _0x5af448=a3_0xcab8ce;if(_0x201b42)return _0x201b42;const _0x632cca=await getMyTeams();if(_0x632cca['length']===0x0){const _0x16d1d5=await createTeam(_0x5af448(0xa8));return _0x16d1d5['id'];}if(_0x632cca[_0x5af448(0x8a)]===0x1)return _0x632cca[0x0]['id'];if(_0x1ee5bf)throw new Error(_0x5af448(0x9f)+_0x632cca[_0x5af448(0x8a)]+_0x5af448(0xa5)+_0x632cca[_0x5af448(0xa6)](_0x26759a=>_0x26759a[_0x5af448(0xa3)]+'('+_0x26759a['id']+')')[_0x5af448(0x77)](',\x20'));const {default:_0x42192c}=await import(_0x5af448(0x94)),{teamId:_0x42f0b9}=await _0x42192c[_0x5af448(0x7f)]([{'type':_0x5af448(0x8d),'name':_0x5af448(0x8e),'message':_0x5af448(0x87),'choices':_0x632cca['map'](_0xaf7be7=>({'name':_0xaf7be7[_0x5af448(0xa3)]+'\x20('+_0xaf7be7['id']+')','value':_0xaf7be7['id']}))}]);return _0x42f0b9;}}
1
+ const a4_0x4d0a4f=a4_0x4834;(function(_0x14211d,_0x1c93a1){const _0x6b4dc=a4_0x4834,_0x4b204e=_0x14211d();while(!![]){try{const _0x8195c1=parseInt(_0x6b4dc(0x105))/0x1+parseInt(_0x6b4dc(0x104))/0x2*(-parseInt(_0x6b4dc(0x12e))/0x3)+parseInt(_0x6b4dc(0x112))/0x4*(parseInt(_0x6b4dc(0x10e))/0x5)+-parseInt(_0x6b4dc(0x109))/0x6+parseInt(_0x6b4dc(0xfb))/0x7+-parseInt(_0x6b4dc(0x114))/0x8+parseInt(_0x6b4dc(0x121))/0x9;if(_0x8195c1===_0x1c93a1)break;else _0x4b204e['push'](_0x4b204e['shift']());}catch(_0x2fad40){_0x4b204e['push'](_0x4b204e['shift']());}}}(a4_0x2f9f,0x39b7a));import{Flags}from'@oclif/core';import a4_0x50c9f1 from'../../lib/extends/command.js';function a4_0x4834(_0xd4090,_0xbe8169){_0xd4090=_0xd4090-0xfa;const _0x2f9f11=a4_0x2f9f();let _0x4834c0=_0x2f9f11[_0xd4090];return _0x4834c0;}function a4_0x2f9f(){const _0x290ab7=['createLoading','团队\x20ID(多团队时必填)','error','string','project-name','项目名称(新建或复用同名项目)','created_at','join','thread_id','app-buddy','17298LGofHr','复用已有项目\x20ID(跳过项目创建)','正在创建云端会话...','toString','integer','log','enableJsonFlag','message','slice','请选择团队:','会话已创建:\x20','prompt','创建云端\x20Agent\x20会话(自动关联\x20team\x20→\x20project\x20→\x20thread)','6zyiLNs','stopLoading','run','description','resolveProject','resolveTeamId','list','team-id','2870798bCqsae','requireAuth','length','teamId','我的团队','inquirer','项目:\x20','team_name','now','83338gdJOno','161600sGjTqn','正在关联项目与会话...','云端\x20Agent\x20ID','map','1217484zQiTCu','关联完成','agent-id','Thread:\x20','\x20(id=','191180oiPmdH','flags','project-id','examples','32FYuYaH','项目就绪:\x20','2854896iJvajw','parse','正在初始化...'];a4_0x2f9f=function(){return _0x290ab7;};return a4_0x2f9f();}import{createThread}from'../../lib/service/cloud-agent.js';import{getMyTeams,createTeam,createProject,listProjects,upsertProjectThread}from'../../lib/service/manage.js';export default class CodeCreate extends a4_0x50c9f1{static [a4_0x4d0a4f(0x131)]=a4_0x4d0a4f(0x12d);static [a4_0x4d0a4f(0x127)]=!![];static [a4_0x4d0a4f(0x111)]=['<%=\x20config.bin\x20%>\x20code\x20create\x20--project-name\x20my-app\x20--json','<%=\x20config.bin\x20%>\x20code\x20create\x20--project-id\x20206\x20--json','<%=\x20config.bin\x20%>\x20code\x20create\x20--project-name\x20my-app\x20--team-id\x201\x20--json'];static [a4_0x4d0a4f(0x10f)]={'project-name':Flags[a4_0x4d0a4f(0x11a)]({'description':a4_0x4d0a4f(0x11c)}),'project-id':Flags[a4_0x4d0a4f(0x125)]({'description':a4_0x4d0a4f(0x122)}),'team-id':Flags[a4_0x4d0a4f(0x125)]({'description':a4_0x4d0a4f(0x118)}),'agent-id':Flags['string']({'description':a4_0x4d0a4f(0x107),'default':a4_0x4d0a4f(0x120)})};async[a4_0x4d0a4f(0x130)](){const _0x4ebfae=a4_0x4d0a4f;await this[_0x4ebfae(0xfc)]();const {flags:_0x35f3ba}=await this[_0x4ebfae(0x115)](CodeCreate),_0x15a03f=this['jsonEnabled']();if(!_0x15a03f)await this['createLoading'](_0x4ebfae(0x116));try{const {projectId:_0x23606d,teamId:_0x4cc108,projectName:_0x48c6ac}=await this[_0x4ebfae(0x132)](_0x35f3ba,_0x15a03f);!_0x15a03f&&(this[_0x4ebfae(0x12f)](_0x4ebfae(0x113)+_0x48c6ac+_0x4ebfae(0x10d)+_0x23606d+')'),await this[_0x4ebfae(0x117)](_0x4ebfae(0x123)));const _0x47c429=await createThread(_0x35f3ba[_0x4ebfae(0x10b)]);return!_0x15a03f&&(this[_0x4ebfae(0x12f)](_0x4ebfae(0x12b)+_0x47c429[_0x4ebfae(0x11f)]),await this[_0x4ebfae(0x117)](_0x4ebfae(0x106))),await upsertProjectThread(_0x23606d,_0x47c429['thread_id']),this[_0x4ebfae(0x12f)](_0x4ebfae(0x10a)),!_0x15a03f&&(this[_0x4ebfae(0x126)](_0x4ebfae(0x101)+_0x48c6ac),this[_0x4ebfae(0x126)](_0x4ebfae(0x10c)+_0x47c429[_0x4ebfae(0x11f)])),{'thread_id':_0x47c429[_0x4ebfae(0x11f)],'project_id':_0x23606d,'team_id':_0x4cc108,'project_name':_0x48c6ac,'created_at':_0x47c429[_0x4ebfae(0x11d)]};}catch(_0x494a7f){this[_0x4ebfae(0x12f)](),this[_0x4ebfae(0x119)](_0x494a7f instanceof Error?_0x494a7f[_0x4ebfae(0x128)]:String(_0x494a7f));}}async[a4_0x4d0a4f(0x132)](_0xae9c87,_0xf2e5a){const _0x60e8ad=a4_0x4d0a4f;if(_0xae9c87['project-id'])return{'projectId':_0xae9c87[_0x60e8ad(0x110)],'teamId':_0xae9c87[_0x60e8ad(0xfa)]??0x0,'projectName':'project-'+_0xae9c87['project-id']};const _0x5006d9=await this[_0x60e8ad(0x133)](_0xae9c87['team-id'],_0xf2e5a),_0x259ed4=_0xae9c87[_0x60e8ad(0x11b)]??'app-'+Date[_0x60e8ad(0x103)]()[_0x60e8ad(0x124)](0x24)[_0x60e8ad(0x129)](-0x6),_0x3deaf7=await listProjects(_0x5006d9),_0x125bf4=_0x3deaf7['find'](_0x1dc72e=>_0x1dc72e['project_name']===_0x259ed4);if(_0x125bf4)return{'projectId':_0x125bf4['id'],'teamId':_0x5006d9,'projectName':_0x259ed4};const _0x19eb53=await createProject({'teamId':_0x5006d9,'projectName':_0x259ed4});return{'projectId':_0x19eb53['id'],'teamId':_0x5006d9,'projectName':_0x259ed4};}async[a4_0x4d0a4f(0x133)](_0x4bbbd9,_0x4d59d4){const _0x3895b1=a4_0x4d0a4f;if(_0x4bbbd9)return _0x4bbbd9;const _0x1118d9=await getMyTeams();if(_0x1118d9[_0x3895b1(0xfd)]===0x0){const _0x16f8ba=await createTeam(_0x3895b1(0xff));return _0x16f8ba['id'];}if(_0x1118d9[_0x3895b1(0xfd)]===0x1)return _0x1118d9[0x0]['id'];if(_0x4d59d4)throw new Error('存在\x20'+_0x1118d9[_0x3895b1(0xfd)]+'\x20个团队,请通过\x20--team-id\x20指定:\x20'+_0x1118d9[_0x3895b1(0x108)](_0x1d0c1f=>_0x1d0c1f['team_name']+'('+_0x1d0c1f['id']+')')[_0x3895b1(0x11e)](',\x20'));const {default:_0x1ae144}=await import(_0x3895b1(0x100)),{teamId:_0x3b4420}=await _0x1ae144[_0x3895b1(0x12c)]([{'type':_0x3895b1(0x134),'name':_0x3895b1(0xfe),'message':_0x3895b1(0x12a),'choices':_0x1118d9[_0x3895b1(0x108)](_0x1de71f=>({'name':_0x1de71f[_0x3895b1(0x102)]+'\x20('+_0x1de71f['id']+')','value':_0x1de71f['id']}))}]);return _0x3b4420;}}
@@ -1 +1 @@
1
- const a4_0x3462db=a4_0x540a;function a4_0x540a(_0x1ded20,_0xb34927){_0x1ded20=_0x1ded20-0x17d;const _0x156fdf=a4_0x156f();let _0x540a8b=_0x156fdf[_0x1ded20];return _0x540a8b;}(function(_0x547061,_0x1e9840){const _0x29ff99=a4_0x540a,_0x23af04=_0x547061();while(!![]){try{const _0x5cd73d=-parseInt(_0x29ff99(0x195))/0x1+parseInt(_0x29ff99(0x1a1))/0x2+parseInt(_0x29ff99(0x1af))/0x3*(parseInt(_0x29ff99(0x19c))/0x4)+-parseInt(_0x29ff99(0x1a5))/0x5+parseInt(_0x29ff99(0x185))/0x6*(-parseInt(_0x29ff99(0x187))/0x7)+-parseInt(_0x29ff99(0x1aa))/0x8*(parseInt(_0x29ff99(0x1b8))/0x9)+parseInt(_0x29ff99(0x1ae))/0xa;if(_0x5cd73d===_0x1e9840)break;else _0x23af04['push'](_0x23af04['shift']());}catch(_0x6bcf){_0x23af04['push'](_0x23af04['shift']());}}}(a4_0x156f,0x1a806));import a4_0x51306c from'node:fs';import a4_0xca4cef from'node:path';import{Flags}from'@oclif/core';function a4_0x156f(){const _0x19ef69=['13638oyfOaj','项目就绪\x20(project=','392vzYyLv','short_url','我的团队','slice','map','<%=\x20config.bin\x20%>\x20code\x20deploy\x20--file\x20./index.html\x20--project-name\x20my-site\x20--json','createProjectIfNeeded','deployed','access_url','team_name','description','...','run','.env.local','196254HJUjgH','join','prompt','已有项目\x20ID(省略则自动创建)','.html','.DS_Store','\x20个团队,请通过\x20--team-id\x20指定:\x20','64vsdzsH','.git','**/*.map','comate.json','now','227620MkHHao','未知错误','部署成功!','flags','440005aVHser','file','thread_id',',\x20thread=','error','156744HyckCv','仅支持\x20HTML\x20文件\x20(.html\x20/\x20.htm)','正在上传文件到沙箱...','message','5226910muztei','7563nTyDby','<%=\x20config.bin\x20%>\x20code\x20deploy\x20--file\x20./page.html\x20--thread-id\x20thread_xxx\x20--project-id\x20206\x20--json','index.html','stopLoading','string','一键部署本地\x20HTML\x20文件到云端(上传\x20→\x20生成配置\x20→\x20发布)','本地\x20HTML\x20文件路径','inquirer','teamId','72ghSDvH','status','list','name','上传完成:\x20','项目名称(新建项目时使用)','resolveTeamId','版本已创建:\x20','project-name','app-buddy','deploy-','运行时地址:\x20','...)','thread-id','log','project-id','正在初始化项目...','jsonEnabled','发布超时时间(秒)','resolve','integer','部署失败','resolveSession','team-id','创建版本\x20','colorize','toString','toLowerCase','.htm','red','<%=\x20config.bin\x20%>\x20code\x20deploy\x20--file\x20./page.html\x20--json','spinner','团队\x20ID(多团队时必填)','stringify','node_modules','请选择团队:','已有会话\x20ID(省略则自动创建)','failed','createLoading','examples','deploy_error','length','正在发布...','enableJsonFlag','endsWith','readFileSync'];a4_0x156f=function(){return _0x19ef69;};return a4_0x156f();}import a4_0x5b364a 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_0x5b364a{static [a4_0x3462db(0x191)]=a4_0x3462db(0x1b4);static [a4_0x3462db(0x182)]=!![];static [a4_0x3462db(0x17e)]=[a4_0x3462db(0x1d6),a4_0x3462db(0x18c),a4_0x3462db(0x1b0)];static [a4_0x3462db(0x1a4)]={'file':Flags[a4_0x3462db(0x1b3)]({'char':'f','description':a4_0x3462db(0x1b5),'required':!![]}),'thread-id':Flags[a4_0x3462db(0x1b3)]({'description':a4_0x3462db(0x1dc)}),'project-id':Flags[a4_0x3462db(0x1cc)]({'description':a4_0x3462db(0x198)}),'project-name':Flags[a4_0x3462db(0x1b3)]({'description':a4_0x3462db(0x1bd)}),'team-id':Flags[a4_0x3462db(0x1cc)]({'description':a4_0x3462db(0x1d8)}),'timeout':Flags[a4_0x3462db(0x1cc)]({'description':a4_0x3462db(0x1ca),'default':0x258})};async[a4_0x3462db(0x193)](){const _0x437a67=a4_0x3462db;await this['requireAuth']();const {flags:_0x1457bf}=await this['parse'](CodeDeploy),_0x1d4703=this[_0x437a67(0x1c9)](),_0x485f02=a4_0xca4cef[_0x437a67(0x1cb)](_0x1457bf[_0x437a67(0x1a6)]);!a4_0x51306c['existsSync'](_0x485f02)&&this[_0x437a67(0x1a9)]('文件不存在:\x20'+_0x485f02);!_0x485f02[_0x437a67(0x1d3)]()[_0x437a67(0x183)](_0x437a67(0x199))&&!_0x485f02[_0x437a67(0x1d3)]()[_0x437a67(0x183)](_0x437a67(0x1d4))&&this[_0x437a67(0x1a9)](_0x437a67(0x1ab));try{const {threadId:_0x233dd1,projectId:_0xe2973c}=await this[_0x437a67(0x1ce)](_0x1457bf,_0x1d4703);if(!_0x1d4703)await this[_0x437a67(0x17d)](_0x437a67(0x1ac));const _0x10789e=a4_0x51306c[_0x437a67(0x184)](_0x485f02),_0xbf9aa9=new Date()['toISOString'](),_0x5300cb=JSON[_0x437a67(0x1d9)]({'publish':{'base':'.','include':[_0x437a67(0x1b1)],'exclude':[],'ignore':[_0x437a67(0x1da),_0x437a67(0x19d),'.env',_0x437a67(0x194),_0x437a67(0x19a),_0x437a67(0x19e)]},'project':{'id':_0xe2973c,'createdAt':_0xbf9aa9,'updatedAt':_0xbf9aa9}},null,0x4),_0x5b68c0=[{'name':_0x437a67(0x1b1),'content':_0x10789e},{'name':_0x437a67(0x19f),'content':_0x5300cb}];await uploadFiles(_0x233dd1,_0x5b68c0);const _0x1f060f=_0x5b68c0['map'](_0x1ab559=>_0x1ab559[_0x437a67(0x1bb)]);!_0x1d4703&&this['stopLoading'](_0x437a67(0x1bc)+_0x1f060f['join'](',\x20'));const _0x339985='v'+Date[_0x437a67(0x1a0)]()[_0x437a67(0x1d2)](0x24);if(!_0x1d4703)await this['createLoading'](_0x437a67(0x1d0)+_0x339985+_0x437a67(0x192));const _0x1dbee9=await createVersion(_0xe2973c,_0x339985);if(!_0x1d4703)this['stopLoading'](_0x437a67(0x1bf)+_0x1dbee9['id']);if(!_0x1d4703)await this[_0x437a67(0x17d)](_0x437a67(0x181));const _0x5216ec=_0x1d4703?undefined:_0x574a01=>{const _0x49c4c4=_0x437a67;this[_0x49c4c4(0x1d7)]&&(this[_0x49c4c4(0x1d7)]['text']='['+_0x574a01['step']+']\x20'+_0x574a01[_0x49c4c4(0x1ad)]);},_0x221534=await runFullPublish({'threadId':_0x233dd1,'projectId':_0xe2973c,'versionId':_0x1dbee9['id'],'skipBuild':!![]},_0x5216ec,_0x1457bf['timeout']*0x3e8);this[_0x437a67(0x1b2)]();if(_0x221534[_0x437a67(0x1b9)]===_0x437a67(0x18e))return!_0x1d4703&&(this[_0x437a67(0x1c6)](this[_0x437a67(0x1d1)](_0x437a67(0x1a3),'green')),this[_0x437a67(0x1c6)](_0x437a67(0x1c3)+_0x221534[_0x437a67(0x18f)])),{'status':_0x437a67(0x18e),'thread_id':_0x233dd1,'project_id':_0xe2973c,'version_id':_0x1dbee9['id'],'access_url':_0x221534[_0x437a67(0x18f)],'short_url':_0x221534[_0x437a67(0x188)],'uploaded_files':_0x1f060f};const _0x39fed8=_0x221534[_0x437a67(0x17f)]??_0x437a67(0x1a2);return!_0x1d4703&&(this[_0x437a67(0x1c6)](this[_0x437a67(0x1d1)](_0x437a67(0x1cd),_0x437a67(0x1d5))),this[_0x437a67(0x1c6)]('原因:\x20'+_0x39fed8)),{'status':'failed','thread_id':_0x233dd1,'project_id':_0xe2973c,'version_id':_0x1dbee9['id'],'error':_0x39fed8,'uploaded_files':_0x1f060f};}catch(_0x5a90ba){this['stopLoading']();const _0x3d2996=_0x5a90ba instanceof Error?_0x5a90ba[_0x437a67(0x1ad)]:String(_0x5a90ba);if(_0x1d4703)return{'status':_0x437a67(0x1dd),'thread_id':_0x1457bf[_0x437a67(0x1c5)]??'','project_id':_0x1457bf[_0x437a67(0x1c7)]??0x0,'version_id':0x0,'error':_0x3d2996};this['error'](_0x3d2996);}}async[a4_0x3462db(0x1ce)](_0x368ac7,_0x26425b){const _0x228076=a4_0x3462db;if(_0x368ac7['thread-id']&&_0x368ac7[_0x228076(0x1c7)])return{'threadId':_0x368ac7[_0x228076(0x1c5)],'projectId':_0x368ac7['project-id']};if(!_0x26425b)await this[_0x228076(0x17d)](_0x228076(0x1c8));const _0x50378b=_0x368ac7[_0x228076(0x1c7)]??await this[_0x228076(0x18d)](_0x368ac7,_0x26425b);let _0x16f071=_0x368ac7['thread-id'];if(!_0x16f071){const _0x5aed53=await createThread(_0x228076(0x1c1));_0x16f071=_0x5aed53[_0x228076(0x1a7)],await upsertProjectThread(_0x50378b,_0x16f071);}if(!_0x26425b)this[_0x228076(0x1b2)](_0x228076(0x186)+_0x50378b+_0x228076(0x1a8)+_0x16f071[_0x228076(0x18a)](0x0,0xc)+_0x228076(0x1c4));return{'threadId':_0x16f071,'projectId':_0x50378b};}async['createProjectIfNeeded'](_0x519c98,_0x29ffb7){const _0x3a38d3=a4_0x3462db,_0x27c7d0=await this[_0x3a38d3(0x1be)](_0x519c98[_0x3a38d3(0x1cf)],_0x29ffb7),_0x385029=_0x519c98[_0x3a38d3(0x1c0)]??_0x3a38d3(0x1c2)+Date[_0x3a38d3(0x1a0)]()['toString'](0x24)[_0x3a38d3(0x18a)](-0x6),_0x12fb2b=await listProjects(_0x27c7d0),_0x44f1b2=_0x12fb2b['find'](_0x1ff9bb=>_0x1ff9bb['project_name']===_0x385029);if(_0x44f1b2)return _0x44f1b2['id'];const _0x3534f9=await createProject({'teamId':_0x27c7d0,'projectName':_0x385029});return _0x3534f9['id'];}async['resolveTeamId'](_0x11a52d,_0x47455d){const _0x492ea8=a4_0x3462db;if(_0x11a52d)return _0x11a52d;const _0x1c648b=await getMyTeams();if(_0x1c648b['length']===0x0){const _0x3c8f54=await createTeam(_0x492ea8(0x189));return _0x3c8f54['id'];}if(_0x1c648b['length']===0x1)return _0x1c648b[0x0]['id'];if(_0x47455d)throw new Error('存在\x20'+_0x1c648b[_0x492ea8(0x180)]+_0x492ea8(0x19b)+_0x1c648b[_0x492ea8(0x18b)](_0x315eed=>_0x315eed[_0x492ea8(0x190)]+'('+_0x315eed['id']+')')[_0x492ea8(0x196)](',\x20'));const {default:_0x18b622}=await import(_0x492ea8(0x1b6)),{teamId:_0x18efa9}=await _0x18b622[_0x492ea8(0x197)]([{'type':_0x492ea8(0x1ba),'name':_0x492ea8(0x1b7),'message':_0x492ea8(0x1db),'choices':_0x1c648b[_0x492ea8(0x18b)](_0x59fea2=>({'name':_0x59fea2[_0x492ea8(0x190)]+'\x20('+_0x59fea2['id']+')','value':_0x59fea2['id']}))}]);return _0x18efa9;}}
1
+ function a5_0x4116(){const _0x202378=['project_name','**/*.map','prompt','name','thread_id','deploy-','上传完成:\x20','file','已有会话\x20ID(省略则自动创建)','existsSync','red','project-name','554055clrpBH','252nOxNkn','...)','...','未知错误','length','spinner','<%=\x20config.bin\x20%>\x20code\x20deploy\x20--file\x20./index.html\x20--project-name\x20my-site\x20--json','parse','原因:\x20','.html','error','short_url','stringify','项目就绪\x20(project=','396903sgAmjq','inquirer','本地\x20HTML\x20文件路径','正在初始化项目...','run','正在发布...','一键部署本地\x20HTML\x20文件到云端(上传\x20→\x20生成配置\x20→\x20发布)','timeout','colorize','部署失败','comate.json','integer','8baHjmL','createProjectIfNeeded','2070264XPpkUF','map','4050963CbHmyt','.git','仅支持\x20HTML\x20文件\x20(.html\x20/\x20.htm)','deployed','58807LRwqpv','green',',\x20thread=','部署成功!','文件不存在:\x20','step','deploy_error','app-buddy','failed','string','teamId','node_modules','resolveTeamId','发布超时时间(秒)','message','description','enableJsonFlag','76439rEXbXT','请选择团队:','我的团队','thread-id','team_name','.DS_Store','now','text','<%=\x20config.bin\x20%>\x20code\x20deploy\x20--file\x20./page.html\x20--json','团队\x20ID(多团队时必填)','stopLoading','resolveSession','.env','endsWith','.env.local','toString','list','join','createLoading','log','运行时地址:\x20','存在\x20','创建版本\x20','slice','4533720BIHJlD','index.html','team-id','已有项目\x20ID(省略则自动创建)','project-id'];a5_0x4116=function(){return _0x202378;};return a5_0x4116();}const a5_0x4c72e9=a5_0x2195;(function(_0x5c41eb,_0x4b94b2){const _0x29fcb3=a5_0x2195,_0x942382=_0x5c41eb();while(!![]){try{const _0x3760c9=parseInt(_0x29fcb3(0x1dc))/0x1+-parseInt(_0x29fcb3(0x1c3))/0x2*(-parseInt(_0x29fcb3(0x1b7))/0x3)+parseInt(_0x29fcb3(0x1c5))/0x4+-parseInt(_0x29fcb3(0x1a8))/0x5+parseInt(_0x29fcb3(0x1a9))/0x6*(parseInt(_0x29fcb3(0x1cb))/0x7)+-parseInt(_0x29fcb3(0x197))/0x8+-parseInt(_0x29fcb3(0x1c7))/0x9;if(_0x3760c9===_0x4b94b2)break;else _0x942382['push'](_0x942382['shift']());}catch(_0x6dc755){_0x942382['push'](_0x942382['shift']());}}}(a5_0x4116,0x55102));import a5_0x3deb24 from'node:fs';import a5_0x399d8b from'node:path';import{Flags}from'@oclif/core';function a5_0x2195(_0xc955b,_0x3b4555){_0xc955b=_0xc955b-0x18a;const _0x411610=a5_0x4116();let _0x2195aa=_0x411610[_0xc955b];return _0x2195aa;}import a5_0x1727b5 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 a5_0x1727b5{static [a5_0x4c72e9(0x1da)]=a5_0x4c72e9(0x1bd);static [a5_0x4c72e9(0x1db)]=!![];static ['examples']=[a5_0x4c72e9(0x1e4),a5_0x4c72e9(0x1af),'<%=\x20config.bin\x20%>\x20code\x20deploy\x20--file\x20./page.html\x20--thread-id\x20thread_xxx\x20--project-id\x20206\x20--json'];static ['flags']={'file':Flags[a5_0x4c72e9(0x1d4)]({'char':'f','description':a5_0x4c72e9(0x1b9),'required':!![]}),'thread-id':Flags['string']({'description':a5_0x4c72e9(0x1a4)}),'project-id':Flags[a5_0x4c72e9(0x1c2)]({'description':a5_0x4c72e9(0x19a)}),'project-name':Flags[a5_0x4c72e9(0x1d4)]({'description':'项目名称(新建项目时使用)'}),'team-id':Flags[a5_0x4c72e9(0x1c2)]({'description':a5_0x4c72e9(0x1e5)}),'timeout':Flags['integer']({'description':a5_0x4c72e9(0x1d8),'default':0x258})};async[a5_0x4c72e9(0x1bb)](){const _0x4c2815=a5_0x4c72e9;await this['requireAuth']();const {flags:_0x2dbbaf}=await this[_0x4c2815(0x1b0)](CodeDeploy),_0xac2c87=this['jsonEnabled'](),_0x363448=a5_0x399d8b['resolve'](_0x2dbbaf[_0x4c2815(0x1a3)]);!a5_0x3deb24[_0x4c2815(0x1a5)](_0x363448)&&this[_0x4c2815(0x1b3)](_0x4c2815(0x1cf)+_0x363448);!_0x363448['toLowerCase']()['endsWith'](_0x4c2815(0x1b2))&&!_0x363448['toLowerCase']()[_0x4c2815(0x18c)]('.htm')&&this[_0x4c2815(0x1b3)](_0x4c2815(0x1c9));try{const {threadId:_0xee1f7,projectId:_0x44fa34}=await this[_0x4c2815(0x18a)](_0x2dbbaf,_0xac2c87);if(!_0xac2c87)await this[_0x4c2815(0x191)]('正在上传文件到沙箱...');const _0x4063dd=a5_0x3deb24['readFileSync'](_0x363448),_0x316eaa=new Date()['toISOString'](),_0x5c4a2f=JSON[_0x4c2815(0x1b5)]({'publish':{'base':'.','include':[_0x4c2815(0x198)],'exclude':[],'ignore':[_0x4c2815(0x1d6),_0x4c2815(0x1c8),_0x4c2815(0x18b),_0x4c2815(0x18d),_0x4c2815(0x1e1),_0x4c2815(0x19d)]},'project':{'id':_0x44fa34,'createdAt':_0x316eaa,'updatedAt':_0x316eaa}},null,0x4),_0x4e3da7=[{'name':_0x4c2815(0x198),'content':_0x4063dd},{'name':_0x4c2815(0x1c1),'content':_0x5c4a2f}];await uploadFiles(_0xee1f7,_0x4e3da7);const _0x5ad3e8=_0x4e3da7[_0x4c2815(0x1c6)](_0x164b06=>_0x164b06[_0x4c2815(0x19f)]);!_0xac2c87&&this[_0x4c2815(0x1e6)](_0x4c2815(0x1a2)+_0x5ad3e8[_0x4c2815(0x190)](',\x20'));const _0x62e83e='v'+Date[_0x4c2815(0x1e2)]()[_0x4c2815(0x18e)](0x24);if(!_0xac2c87)await this[_0x4c2815(0x191)](_0x4c2815(0x195)+_0x62e83e+_0x4c2815(0x1ab));const _0x34a6e0=await createVersion(_0x44fa34,_0x62e83e);if(!_0xac2c87)this[_0x4c2815(0x1e6)]('版本已创建:\x20'+_0x34a6e0['id']);if(!_0xac2c87)await this[_0x4c2815(0x191)](_0x4c2815(0x1bc));const _0x40ad51=_0xac2c87?undefined:_0x2b4248=>{const _0x4de5d4=_0x4c2815;this['spinner']&&(this[_0x4de5d4(0x1ae)][_0x4de5d4(0x1e3)]='['+_0x2b4248[_0x4de5d4(0x1d0)]+']\x20'+_0x2b4248['message']);},_0x5ba667=await runFullPublish({'threadId':_0xee1f7,'projectId':_0x44fa34,'versionId':_0x34a6e0['id'],'skipBuild':!![]},_0x40ad51,_0x2dbbaf[_0x4c2815(0x1be)]*0x3e8);this['stopLoading']();if(_0x5ba667['status']==='deployed')return!_0xac2c87&&(this[_0x4c2815(0x192)](this[_0x4c2815(0x1bf)](_0x4c2815(0x1ce),_0x4c2815(0x1cc))),this[_0x4c2815(0x192)](_0x4c2815(0x193)+_0x5ba667['access_url'])),{'status':_0x4c2815(0x1ca),'thread_id':_0xee1f7,'project_id':_0x44fa34,'version_id':_0x34a6e0['id'],'access_url':_0x5ba667['access_url'],'short_url':_0x5ba667[_0x4c2815(0x1b4)],'uploaded_files':_0x5ad3e8};const _0x5d1feb=_0x5ba667[_0x4c2815(0x1d1)]??_0x4c2815(0x1ac);return!_0xac2c87&&(this[_0x4c2815(0x192)](this[_0x4c2815(0x1bf)](_0x4c2815(0x1c0),_0x4c2815(0x1a6))),this[_0x4c2815(0x192)](_0x4c2815(0x1b1)+_0x5d1feb)),{'status':_0x4c2815(0x1d3),'thread_id':_0xee1f7,'project_id':_0x44fa34,'version_id':_0x34a6e0['id'],'error':_0x5d1feb,'uploaded_files':_0x5ad3e8};}catch(_0x1d71ae){this['stopLoading']();const _0x4f4f96=_0x1d71ae instanceof Error?_0x1d71ae[_0x4c2815(0x1d9)]:String(_0x1d71ae);if(_0xac2c87)return{'status':'failed','thread_id':_0x2dbbaf[_0x4c2815(0x1df)]??'','project_id':_0x2dbbaf[_0x4c2815(0x19b)]??0x0,'version_id':0x0,'error':_0x4f4f96};this[_0x4c2815(0x1b3)](_0x4f4f96);}}async[a5_0x4c72e9(0x18a)](_0x4157cf,_0x544c7e){const _0xa4d054=a5_0x4c72e9;if(_0x4157cf[_0xa4d054(0x1df)]&&_0x4157cf[_0xa4d054(0x19b)])return{'threadId':_0x4157cf[_0xa4d054(0x1df)],'projectId':_0x4157cf[_0xa4d054(0x19b)]};if(!_0x544c7e)await this[_0xa4d054(0x191)](_0xa4d054(0x1ba));const _0x431a45=_0x4157cf[_0xa4d054(0x19b)]??await this[_0xa4d054(0x1c4)](_0x4157cf,_0x544c7e);let _0x3b2827=_0x4157cf[_0xa4d054(0x1df)];if(!_0x3b2827){const _0x5178e9=await createThread(_0xa4d054(0x1d2));_0x3b2827=_0x5178e9[_0xa4d054(0x1a0)],await upsertProjectThread(_0x431a45,_0x3b2827);}if(!_0x544c7e)this[_0xa4d054(0x1e6)](_0xa4d054(0x1b6)+_0x431a45+_0xa4d054(0x1cd)+_0x3b2827['slice'](0x0,0xc)+_0xa4d054(0x1aa));return{'threadId':_0x3b2827,'projectId':_0x431a45};}async[a5_0x4c72e9(0x1c4)](_0x5ea237,_0x323409){const _0xea5322=a5_0x4c72e9,_0x2e871a=await this[_0xea5322(0x1d7)](_0x5ea237[_0xea5322(0x199)],_0x323409),_0x5ca315=_0x5ea237[_0xea5322(0x1a7)]??_0xea5322(0x1a1)+Date[_0xea5322(0x1e2)]()[_0xea5322(0x18e)](0x24)[_0xea5322(0x196)](-0x6),_0x835255=await listProjects(_0x2e871a),_0x2567e8=_0x835255['find'](_0x1f3263=>_0x1f3263[_0xea5322(0x19c)]===_0x5ca315);if(_0x2567e8)return _0x2567e8['id'];const _0x125647=await createProject({'teamId':_0x2e871a,'projectName':_0x5ca315});return _0x125647['id'];}async['resolveTeamId'](_0xfcfab3,_0x522832){const _0x280ea4=a5_0x4c72e9;if(_0xfcfab3)return _0xfcfab3;const _0x5e936b=await getMyTeams();if(_0x5e936b[_0x280ea4(0x1ad)]===0x0){const _0x2ad786=await createTeam(_0x280ea4(0x1de));return _0x2ad786['id'];}if(_0x5e936b[_0x280ea4(0x1ad)]===0x1)return _0x5e936b[0x0]['id'];if(_0x522832)throw new Error(_0x280ea4(0x194)+_0x5e936b['length']+'\x20个团队,请通过\x20--team-id\x20指定:\x20'+_0x5e936b['map'](_0x153997=>_0x153997[_0x280ea4(0x1e0)]+'('+_0x153997['id']+')')[_0x280ea4(0x190)](',\x20'));const {default:_0x4d19ba}=await import(_0x280ea4(0x1b8)),{teamId:_0x3ce4e9}=await _0x4d19ba[_0x280ea4(0x19e)]([{'type':_0x280ea4(0x18f),'name':_0x280ea4(0x1d5),'message':_0x280ea4(0x1dd),'choices':_0x5e936b[_0x280ea4(0x1c6)](_0x317c88=>({'name':_0x317c88[_0x280ea4(0x1e0)]+'\x20('+_0x317c88['id']+')','value':_0x317c88['id']}))}]);return _0x3ce4e9;}}
@@ -0,0 +1 @@
1
+ function a6_0x3992(){const _0x1464a0=['win32','解压完成','companyId','1944400zDNwiN','resolve','84ekywoY','输出目录:\x20\x20\x20','shortSlug','应用短链\x20URL(与\x20--project-id\x20+\x20--version-id\x20二选一)','.zip','47862YIfNKg','get','version-id','match','版本\x20ID(与\x20--url\x20二选一,需配合\x20--project-id)','requireAuth','jsonEnabled','<%=\x20config.bin\x20%>\x20code\x20download\x20--url\x20https://o.wpsgo.com/app/41000207/rmFkBq1nbMEO/\x20--json','605tkBKtZ','请提供\x20--url,或同时提供\x20--project-id\x20和\x20--version-id','\x27\x20-DestinationPath\x20\x27','下载前端产物仅限项目\x20owner\x20和\x20admin。请确认当前账号是否为项目所有者或管理员。','222ZJMhvE','isFile','正在查询\x20','url','message','844844EDJieG',',版本\x20','45941QisyKk','join','platform','stream','output-dir','12849vyKEtJ','pipe','下载已部署应用的前端构建产物(通过短链或\x20project-id\x20+\x20version-id),解压到本地目录供编辑','stopLoading','403','112IpVOcR','enableJsonFlag','log','readdirSync','下载地址已获取','examples','includes','短链格式应为:\x20https://o.wpsgo.com/app/<company_id>/<short_slug>/','\x27\x20-Force\x22','parse','下载完成','project_id','228DMECVs','integer','\x22\x20-d\x20\x22','<%=\x20config.bin\x20%>\x20code\x20download\x20--url\x20https://o.wpsgo.com/app/41000207/rmFkBq1nbMEO/\x20--output-dir\x20./my-app\x20--json','111470CjOXhB','string','文件数量:\x20\x20\x20','...','download_url','解压目标目录(默认:\x20./<short_slug>\x20或\x20./download-<project_id>)','data','run','createLoading','mkdirSync','name','项目\x20ID(与\x20--url\x20二选一)','无法解析短链:\x20','failed','找到项目\x20','<%=\x20config.bin\x20%>\x20code\x20download\x20--project-id\x20477\x20--version-id\x20864\x20--json','project-id','description','flags'];a6_0x3992=function(){return _0x1464a0;};return a6_0x3992();}const a6_0x2649cb=a6_0x5f1c;(function(_0x1b2df6,_0x4bd280){const _0x2c3018=a6_0x5f1c,_0x18a8fd=_0x1b2df6();while(!![]){try{const _0x195a93=parseInt(_0x2c3018(0x174))/0x1*(parseInt(_0x2c3018(0x178))/0x2)+-parseInt(_0x2c3018(0x184))/0x3*(-parseInt(_0x2c3018(0x167))/0x4)+parseInt(_0x2c3018(0x14f))/0x5+parseInt(_0x2c3018(0x14b))/0x6*(-parseInt(_0x2c3018(0x17f))/0x7)+parseInt(_0x2c3018(0x189))/0x8*(-parseInt(_0x2c3018(0x16c))/0x9)+parseInt(_0x2c3018(0x165))/0xa+parseInt(_0x2c3018(0x17d))/0xb;if(_0x195a93===_0x4bd280)break;else _0x18a8fd['push'](_0x18a8fd['shift']());}catch(_0x583ba9){_0x18a8fd['push'](_0x18a8fd['shift']());}}}(a6_0x3992,0x1ef46));import a6_0x592a49 from'node:fs';import a6_0x52e3da from'node:path';import{execSync}from'node:child_process';import{pipeline}from'node:stream/promises';function a6_0x5f1c(_0x444a01,_0x5ae947){_0x444a01=_0x444a01-0x140;const _0x39926c=a6_0x3992();let _0x5f1cc5=_0x39926c[_0x444a01];return _0x5f1cc5;}import{Flags}from'@oclif/core';import a6_0x169a20 from'axios';import a6_0x5b0955 from'../../lib/extends/command.js';import{lookupDeployment,downloadFrontend}from'../../lib/service/manage.js';function parseShortUrl(_0x37d0f5){const _0x12c8b8=a6_0x5f1c,_0x54e266=_0x37d0f5[_0x12c8b8(0x16f)](/\/app\/([^/]+)\/([^/]+)/);if(!_0x54e266)throw new Error(_0x12c8b8(0x15b)+_0x37d0f5+'\x0a'+_0x12c8b8(0x146));return{'companyId':_0x54e266[0x1],'shortSlug':_0x54e266[0x2]};}async function downloadFile(_0x5a289c,_0x492472){const _0x2a8560=a6_0x5f1c,_0x4cca83=await a6_0x169a20[_0x2a8560(0x16d)](_0x5a289c,{'responseType':_0x2a8560(0x182),'timeout':0x1d4c0}),_0x2ace51=a6_0x592a49['createWriteStream'](_0x492472);await pipeline(_0x4cca83[_0x2a8560(0x155)],_0x2ace51);}function extractZip(_0x414f17,_0x15e969){const _0x50614c=a6_0x5f1c;a6_0x592a49[_0x50614c(0x158)](_0x15e969,{'recursive':!![]}),process[_0x50614c(0x181)]===_0x50614c(0x162)?execSync('powershell\x20-NoProfile\x20-Command\x20\x22Expand-Archive\x20-LiteralPath\x20\x27'+_0x414f17+_0x50614c(0x176)+_0x15e969+_0x50614c(0x147),{'stdio':_0x50614c(0x185)}):execSync('unzip\x20-o\x20\x22'+_0x414f17+_0x50614c(0x14d)+_0x15e969+'\x22',{'stdio':_0x50614c(0x185)});}function countFiles(_0x1abe52){const _0x5c5f21=a6_0x5f1c;let _0x554fd7=0x0;for(const _0x1404e6 of a6_0x592a49[_0x5c5f21(0x142)](_0x1abe52,{'withFileTypes':!![]})){if(_0x1404e6[_0x5c5f21(0x179)]())_0x554fd7++;else{if(_0x1404e6['isDirectory']())_0x554fd7+=countFiles(a6_0x52e3da[_0x5c5f21(0x180)](_0x1abe52,_0x1404e6[_0x5c5f21(0x159)]));}}return _0x554fd7;}export default class CodeDownload extends a6_0x5b0955{static [a6_0x2649cb(0x160)]=a6_0x2649cb(0x186);static [a6_0x2649cb(0x140)]=!![];static [a6_0x2649cb(0x144)]=[a6_0x2649cb(0x173),a6_0x2649cb(0x15e),a6_0x2649cb(0x14e)];static [a6_0x2649cb(0x161)]={'url':Flags[a6_0x2649cb(0x150)]({'description':a6_0x2649cb(0x16a)}),'project-id':Flags[a6_0x2649cb(0x14c)]({'description':a6_0x2649cb(0x15a)}),'version-id':Flags[a6_0x2649cb(0x14c)]({'description':a6_0x2649cb(0x170)}),'output-dir':Flags[a6_0x2649cb(0x150)]({'char':'o','description':a6_0x2649cb(0x154)})};async[a6_0x2649cb(0x156)](){const _0x429db3=a6_0x2649cb;await this[_0x429db3(0x171)]();const {flags:_0x15d6bc}=await this[_0x429db3(0x148)](CodeDownload),_0x497e44=this[_0x429db3(0x172)]();try{let _0x466501=_0x15d6bc['project-id'],_0x5adf0e=_0x15d6bc[_0x429db3(0x16e)],_0x4543e9;if(_0x15d6bc[_0x429db3(0x17b)]){const _0x526223=parseShortUrl(_0x15d6bc[_0x429db3(0x17b)]);_0x4543e9=_0x526223[_0x429db3(0x169)];if(!_0x497e44)await this[_0x429db3(0x157)](_0x429db3(0x17a)+_0x526223[_0x429db3(0x164)]+'/'+_0x526223[_0x429db3(0x169)]+_0x429db3(0x152));const _0x45d7fe=await lookupDeployment(_0x526223['companyId'],_0x526223[_0x429db3(0x169)]);_0x466501=_0x45d7fe[_0x429db3(0x14a)],_0x5adf0e=_0x45d7fe['version_id'];if(!_0x497e44)this[_0x429db3(0x187)](_0x429db3(0x15d)+_0x466501+_0x429db3(0x17e)+_0x5adf0e);}if(!_0x466501||!_0x5adf0e)throw new Error(_0x429db3(0x175));if(!_0x497e44)await this['createLoading']('正在获取下载地址...');const _0xdc00bc=await downloadFrontend(_0x466501,_0x5adf0e);if(!_0x497e44)this['stopLoading'](_0x429db3(0x143));const _0x2dc026=a6_0x52e3da[_0x429db3(0x166)](_0x15d6bc[_0x429db3(0x183)]??(_0x4543e9?'./'+_0x4543e9:'./download-'+_0x466501)),_0x31a560=_0x2dc026+_0x429db3(0x16b);if(!_0x497e44)await this['createLoading']('正在下载构建产物...');await downloadFile(_0xdc00bc[_0x429db3(0x153)],_0x31a560);if(!_0x497e44)this[_0x429db3(0x187)](_0x429db3(0x149));if(!_0x497e44)await this[_0x429db3(0x157)]('正在解压到\x20'+_0x2dc026+_0x429db3(0x152));extractZip(_0x31a560,_0x2dc026),a6_0x592a49['unlinkSync'](_0x31a560);const _0x183447=countFiles(_0x2dc026);return!_0x497e44&&(this[_0x429db3(0x187)](_0x429db3(0x163)),this[_0x429db3(0x141)](_0x429db3(0x168)+_0x2dc026),this[_0x429db3(0x141)](_0x429db3(0x151)+_0x183447)),{'status':'ok','project_id':_0x466501,'version_id':_0x5adf0e,'download_url':_0xdc00bc[_0x429db3(0x153)],'output_dir':_0x2dc026,'file_count':_0x183447};}catch(_0x492ee8){this[_0x429db3(0x187)]();const _0x3f1714=_0x492ee8 instanceof Error?_0x492ee8[_0x429db3(0x17c)]:String(_0x492ee8),_0x28e7c4=_0x3f1714[_0x429db3(0x145)](_0x429db3(0x188))||_0x3f1714['includes']('权限');if(_0x497e44)return{'status':_0x429db3(0x15c),'project_id':_0x15d6bc[_0x429db3(0x15f)]??0x0,'version_id':_0x15d6bc[_0x429db3(0x16e)]??0x0,'error':_0x3f1714,'hint':_0x28e7c4?_0x429db3(0x177):undefined};this['error'](_0x3f1714);}}}
@@ -0,0 +1 @@
1
+ const a7_0x15fdb7=a7_0x2eac;(function(_0x28d8c6,_0x3c8757){const _0x52f8ca=a7_0x2eac,_0x4a551f=_0x28d8c6();while(!![]){try{const _0x211396=parseInt(_0x52f8ca(0x1d8))/0x1*(-parseInt(_0x52f8ca(0x1b0))/0x2)+-parseInt(_0x52f8ca(0x1af))/0x3+parseInt(_0x52f8ca(0x1c8))/0x4*(-parseInt(_0x52f8ca(0x1cd))/0x5)+parseInt(_0x52f8ca(0x1d3))/0x6*(parseInt(_0x52f8ca(0x1c5))/0x7)+-parseInt(_0x52f8ca(0x1a3))/0x8+-parseInt(_0x52f8ca(0x1ab))/0x9*(-parseInt(_0x52f8ca(0x19e))/0xa)+parseInt(_0x52f8ca(0x1ae))/0xb;if(_0x211396===_0x3c8757)break;else _0x4a551f['push'](_0x4a551f['shift']());}catch(_0x578a5a){_0x4a551f['push'](_0x4a551f['shift']());}}}(a7_0xbac3,0x9642d));function a7_0x2eac(_0x75151,_0x1d2d7c){_0x75151=_0x75151-0x199;const _0xbac3ab=a7_0xbac3();let _0x2eac80=_0xbac3ab[_0x75151];return _0x2eac80;}import{Flags}from'@oclif/core';import a7_0x5d04c6 from'axios';import a7_0x562c58 from'../../lib/extends/command.js';const ALLOWED_HOST=a7_0x15fdb7(0x19f),ALLOWED_PATH_RE=/^\/app\/(\d+)\/([A-Za-z0-9_-]+)\/?$/;function validateAppUrl(_0x1ba0e9){const _0x24658e=a7_0x15fdb7;let _0x896451;try{_0x896451=new URL(_0x1ba0e9);}catch{throw new Error(_0x24658e(0x1ac)+_0x1ba0e9);}if(_0x896451[_0x24658e(0x1c0)]!==_0x24658e(0x1ad))throw new Error(_0x24658e(0x1ba)+_0x896451['protocol']+_0x24658e(0x1d5));if(_0x896451[_0x24658e(0x1e4)]!==ALLOWED_HOST)throw new Error(_0x24658e(0x1b5)+_0x896451['hostname']+_0x24658e(0x19a)+ALLOWED_HOST+_0x24658e(0x1d6));const _0x493ee5=_0x896451[_0x24658e(0x1db)][_0x24658e(0x1de)](ALLOWED_PATH_RE);if(!_0x493ee5)throw new Error(_0x24658e(0x1b8)+_0x896451['pathname']+'),仅允许\x20/app/<company_id>/<short_slug>/');return{'url':_0x24658e(0x1ce)+ALLOWED_HOST+_0x24658e(0x1bd)+_0x493ee5[0x1]+'/'+_0x493ee5[0x2]+'/','companyId':_0x493ee5[0x1],'shortSlug':_0x493ee5[0x2]};}function extractResources(_0x2d1c6a){const _0xf2207b=a7_0x15fdb7,_0x42120c=[],_0x521c69=[{'type':_0xf2207b(0x1b1),'re':/<script[^>]+src=["']([^"']+)["']/gi},{'type':_0xf2207b(0x1aa),'re':/<link[^>]+href=["']([^"']+)["'][^>]*rel=["']stylesheet["']/gi},{'type':_0xf2207b(0x1aa),'re':/<link[^>]*rel=["']stylesheet["'][^>]+href=["']([^"']+)["']/gi},{'type':_0xf2207b(0x1e5),'re':/<img[^>]+src=["']([^"']+)["']/gi},{'type':_0xf2207b(0x1c9),'re':/<link[^>]+href=["']([^"']+)["'][^>]*rel=["'](?:icon|shortcut icon)["']/gi},{'type':'favicon','re':/<link[^>]*rel=["'](?:icon|shortcut icon)["'][^>]+href=["']([^"']+)["']/gi},{'type':'preload','re':/<link[^>]+href=["']([^"']+)["'][^>]*rel=["']preload["']/gi},{'type':_0xf2207b(0x1dc),'re':/<link[^>]*rel=["']preload["'][^>]+href=["']([^"']+)["']/gi}];for(const {type:_0x106829,re:_0x280a1d}of _0x521c69){let _0x2c68af;while((_0x2c68af=_0x280a1d[_0xf2207b(0x1bc)](_0x2d1c6a))!==null){_0x42120c[_0xf2207b(0x1d4)]({'type':_0x106829,'url':_0x2c68af[0x1]});}}const _0x1a78c0=new Set();return _0x42120c[_0xf2207b(0x1bb)](_0x517e82=>{const _0x5973d9=_0xf2207b,_0x2b7aec=_0x517e82['type']+':'+_0x517e82[_0x5973d9(0x1c3)];if(_0x1a78c0[_0x5973d9(0x1a0)](_0x2b7aec))return![];return _0x1a78c0[_0x5973d9(0x1df)](_0x2b7aec),!![];});}export default class CodeFetchHtml extends a7_0x562c58{static [a7_0x15fdb7(0x199)]=a7_0x15fdb7(0x1a6);static [a7_0x15fdb7(0x1e8)]=!![];static ['examples']=[a7_0x15fdb7(0x1e3)];static [a7_0x15fdb7(0x1c7)]={'url':Flags[a7_0x15fdb7(0x1c1)]({'description':a7_0x15fdb7(0x1e9),'required':!![]})};async['run'](){const _0x4fe6d4=a7_0x15fdb7,{sid:_0x443b3b}=await this[_0x4fe6d4(0x1d2)](),{flags:_0x14d34f}=await this['parse'](CodeFetchHtml),_0x3f1047=this[_0x4fe6d4(0x1dd)]();try{const _0x582fac=validateAppUrl(_0x14d34f['url']);if(!_0x3f1047)await this[_0x4fe6d4(0x1b6)](_0x4fe6d4(0x1b4)+_0x582fac['companyId']+'/'+_0x582fac['shortSlug']+_0x4fe6d4(0x1e6));const _0x3c83db=await a7_0x5d04c6['get'](_0x582fac['url'],{'headers':{'Cookie':_0x4fe6d4(0x1b2)+_0x443b3b,'X-App-Source':'comate-cli','Accept':_0x4fe6d4(0x1a4)},'timeout':0x7530,'maxRedirects':0x5,'validateStatus':()=>!![],'responseType':_0x4fe6d4(0x1d0)});if(_0x3c83db['status']===0x191||_0x3c83db['status']===0x193){this[_0x4fe6d4(0x1a9)]();const _0x329c03={'status':_0x4fe6d4(0x1a7),'http_status':_0x3c83db[_0x4fe6d4(0x1cb)],'error':_0x4fe6d4(0x1ca)+_0x3c83db[_0x4fe6d4(0x1cb)]+_0x4fe6d4(0x1c2),'hint':_0x4fe6d4(0x1b3)};return!_0x3f1047&&(this['log'](this['colorize'](_0x329c03[_0x4fe6d4(0x1b9)],_0x4fe6d4(0x1c6))),this[_0x4fe6d4(0x1e0)](_0x4fe6d4(0x1be)+_0x329c03[_0x4fe6d4(0x1e7)])),_0x329c03;}if(_0x3c83db[_0x4fe6d4(0x1cb)]===0x194){this[_0x4fe6d4(0x1a9)]();const _0x46f98f={'status':_0x4fe6d4(0x1a2),'http_status':_0x3c83db['status'],'error':_0x4fe6d4(0x1cf)};if(!_0x3f1047)this[_0x4fe6d4(0x1e0)](this[_0x4fe6d4(0x19d)](_0x46f98f[_0x4fe6d4(0x1b9)],_0x4fe6d4(0x1e1)));return _0x46f98f;}if(_0x3c83db[_0x4fe6d4(0x1cb)]>=0x190){this['stopLoading']();const _0x508589=typeof _0x3c83db['data']===_0x4fe6d4(0x1c1)?_0x3c83db['data'][_0x4fe6d4(0x1a5)](0x0,0x1f4):'';return{'status':_0x4fe6d4(0x1b9),'http_status':_0x3c83db[_0x4fe6d4(0x1cb)],'error':_0x4fe6d4(0x1a1)+_0x3c83db[_0x4fe6d4(0x1cb)]+_0x4fe6d4(0x1d9)+_0x508589};}const _0x50b416=typeof _0x3c83db[_0x4fe6d4(0x19b)]===_0x4fe6d4(0x1c1)?_0x3c83db[_0x4fe6d4(0x19b)]:String(_0x3c83db['data']),_0x578e23=extractResources(_0x50b416),_0x56b4ed=Object['entries'](_0x578e23[_0x4fe6d4(0x1bf)]((_0x1b32f3,_0x2c603b)=>{const _0x22fc65=_0x4fe6d4;return _0x1b32f3[_0x2c603b[_0x22fc65(0x1cc)]]=(_0x1b32f3[_0x2c603b[_0x22fc65(0x1cc)]]||0x0)+0x1,_0x1b32f3;},{}))[_0x4fe6d4(0x1d1)](([_0x28e661,_0x1e45aa])=>_0x28e661+':\x20'+_0x1e45aa)[_0x4fe6d4(0x1da)](',\x20');if(!_0x3f1047){this['stopLoading']('获取成功'),this[_0x4fe6d4(0x1e0)]('URL:\x20\x20\x20\x20\x20\x20\x20\x20'+_0x582fac[_0x4fe6d4(0x1c3)]),this[_0x4fe6d4(0x1e0)](_0x4fe6d4(0x1d7)+_0x50b416[_0x4fe6d4(0x19c)]+_0x4fe6d4(0x1c4)),this[_0x4fe6d4(0x1e0)](_0x4fe6d4(0x1a8)+(_0x56b4ed||'无'));for(const _0x449b0c of _0x578e23){this[_0x4fe6d4(0x1e0)](_0x4fe6d4(0x1e2)+_0x449b0c[_0x4fe6d4(0x1cc)]+']\x20'+_0x449b0c[_0x4fe6d4(0x1c3)]);}}return{'status':'ok','http_status':_0x3c83db[_0x4fe6d4(0x1cb)],'url':_0x582fac[_0x4fe6d4(0x1c3)],'html':_0x50b416,'content_length':_0x50b416[_0x4fe6d4(0x19c)],'resources':_0x578e23,'resources_summary':_0x56b4ed};}catch(_0x5753bb){this[_0x4fe6d4(0x1a9)]();const _0x1fcc02=_0x5753bb instanceof Error?_0x5753bb['message']:String(_0x5753bb);if(_0x3f1047)return{'status':_0x4fe6d4(0x1b9),'error':_0x1fcc02,'hint':_0x4fe6d4(0x1b7)};this['error'](_0x1fcc02);}}}function a7_0xbac3(){const _0x2f9df0=['7200904vXlueM','text/html','slice','获取已部署应用的\x20HTML\x20页面内容,分析静态资源(仅允许\x20o.wpsgo.com\x20应用地址)','no_permission','静态资源:\x20\x20\x20','stopLoading','stylesheet','3789OzMBQZ','无效的\x20URL:\x20','https:','33459536PtfBoq','2980005NcUhLF','22yIosZF','script','wps_sid=','请让用户确认是否有权限访问该应用,或尝试重新执行\x20npx\x20--yes\x20@wps365-open/comate-cli@latest\x20auth\x20login\x20后重试。','正在获取\x20','域名不允许\x20(','createLoading','请检查网络连接或稍后重试。','路径不合法\x20(','error','协议不允许\x20(','filter','exec','/app/','提示:\x20','reduce','protocol','string',')。可能原因:1)\x20wps_sid\x20已过期,请重新登录;2)\x20当前账号无权访问此企业/应用。','url','\x20字符','100723hUYmMR','red','flags','4WgVPIR','favicon','无权限访问此应用\x20(HTTP\x20','status','type','4235370khvSyt','https://','应用不存在或已下架\x20(HTTP\x20404)。请确认\x20URL\x20是否正确。','text','map','requireAuth','402AItQDf','push','),仅允许\x20https',',避免\x20wps_sid\x20泄露','内容长度:\x20\x20\x20','97235WRCbPq','):\x20','join','pathname','preload','jsonEnabled','match','add','log','yellow','\x20\x20[','<%=\x20config.bin\x20%>\x20code\x20fetch-html\x20--url\x20https://o.wpsgo.com/app/41000207/6Ne2UkWT3ytn/\x20--json','hostname','image','\x20页面内容...','hint','enableJsonFlag','应用\x20URL(格式:\x20https://o.wpsgo.com/app/<company_id>/<short_slug>/)','description','),仅允许\x20','data','length','colorize','9970ssytFK','o.wpsgo.com','has','请求失败\x20(HTTP\x20','not_found'];a7_0xbac3=function(){return _0x2f9df0;};return a7_0xbac3();}
@@ -1 +1 @@
1
- const a5_0x34ad95=a5_0x3418;(function(_0x1ab1f4,_0x34a879){const _0x555d10=a5_0x3418,_0x493f63=_0x1ab1f4();while(!![]){try{const _0x3f70c4=-parseInt(_0x555d10(0xf7))/0x1*(-parseInt(_0x555d10(0xee))/0x2)+-parseInt(_0x555d10(0xe5))/0x3+-parseInt(_0x555d10(0xf6))/0x4+-parseInt(_0x555d10(0xe7))/0x5*(parseInt(_0x555d10(0xe9))/0x6)+-parseInt(_0x555d10(0xfe))/0x7+-parseInt(_0x555d10(0xef))/0x8*(parseInt(_0x555d10(0xfd))/0x9)+-parseInt(_0x555d10(0xdf))/0xa*(-parseInt(_0x555d10(0xfa))/0xb);if(_0x3f70c4===_0x34a879)break;else _0x493f63['push'](_0x493f63['shift']());}catch(_0x3aa811){_0x493f63['push'](_0x493f63['shift']());}}}(a5_0x2b64,0x5273a));import{Flags}from'@oclif/core';import a5_0x29d3c0 from'../../lib/extends/command.js';function a5_0x2b64(){const _0x4ee6bd=['<%=\x20config.bin\x20%>\x20code\x20files\x20--thread-id\x20thread_xxx\x20--json','error','path','keys','flags','string','message','20711590iuNsHx','获取完成','log','下载完成','download','run','1785519AdZEjQ','description','1451405hnHPXr','values','6xKjbzg','jsonEnabled','会话\x20ID','createLoading','examples','247598UCNwls','4071272niNxnG','<%=\x20config.bin\x20%>\x20code\x20files\x20--thread-id\x20thread_xxx\x20--download\x20src/App.tsx\x20--json','thread-id','\x20个文件:','stopLoading','content','listMode','1946316jFysIH','3Qzraoz','downloadMode','正在下载\x20','11zYtNcU','(暂无文件)','parse','9yZiLFj','1567244IsnlFm','\x20个文件...','\x20bytes)','requireAuth','length','正在获取文件列表...','enableJsonFlag'];a5_0x2b64=function(){return _0x4ee6bd;};return a5_0x2b64();}import{getThreadState,downloadFiles}from'../../lib/service/cloud-agent.js';function a5_0x3418(_0x5028c2,_0x19de69){_0x5028c2=_0x5028c2-0xd3;const _0x2b648c=a5_0x2b64();let _0x34189a=_0x2b648c[_0x5028c2];return _0x34189a;}export default class CodeFiles extends a5_0x29d3c0{static [a5_0x34ad95(0xe6)]='查看或下载云端\x20Agent\x20会话中的文件';static [a5_0x34ad95(0xd7)]=!![];static [a5_0x34ad95(0xed)]=[a5_0x34ad95(0xd8),a5_0x34ad95(0xf0)];static [a5_0x34ad95(0xdc)]={'thread-id':Flags['string']({'description':a5_0x34ad95(0xeb),'required':!![]}),'download':Flags[a5_0x34ad95(0xdd)]({'description':'要下载的文件路径(可指定多个)','multiple':!![]})};async[a5_0x34ad95(0xe4)](){const _0x585b5c=a5_0x34ad95;await this[_0x585b5c(0xd4)]();const {flags:_0x643bf}=await this[_0x585b5c(0xfc)](CodeFiles),_0x15c236=this[_0x585b5c(0xea)]();if(_0x643bf[_0x585b5c(0xe3)]&&_0x643bf['download']['length']>0x0)return this[_0x585b5c(0xf8)](_0x643bf[_0x585b5c(0xf1)],_0x643bf['download'],_0x15c236);return this['listMode'](_0x643bf[_0x585b5c(0xf1)],_0x15c236);}async[a5_0x34ad95(0xf5)](_0x2160a0,_0x1cf815){const _0x1975ab=a5_0x34ad95;!_0x1cf815&&await this[_0x1975ab(0xec)](_0x1975ab(0xd6));try{const _0x1d281c=await getThreadState(_0x2160a0),_0x30462a=_0x1d281c[_0x1975ab(0xe8)]?.['files']??{};this[_0x1975ab(0xf3)](_0x1975ab(0xe0));if(!_0x1cf815){const _0x1acbab=Object[_0x1975ab(0xdb)](_0x30462a);if(_0x1acbab['length']===0x0)this[_0x1975ab(0xe1)](_0x1975ab(0xfb));else{this['log']('共\x20'+_0x1acbab[_0x1975ab(0xd5)]+_0x1975ab(0xf2));for(const _0x131c35 of _0x1acbab){this['log']('\x20\x20'+_0x131c35);}}}return{'thread_id':_0x2160a0,'files':_0x30462a};}catch(_0xe50b1c){this[_0x1975ab(0xf3)](),this['error'](_0xe50b1c instanceof Error?_0xe50b1c[_0x1975ab(0xde)]:String(_0xe50b1c));}}async['downloadMode'](_0x54b912,_0x214e2a,_0x8d6753){const _0x1492be=a5_0x34ad95;!_0x8d6753&&await this[_0x1492be(0xec)](_0x1492be(0xf9)+_0x214e2a[_0x1492be(0xd5)]+_0x1492be(0xff));try{const _0x3d922a=await downloadFiles(_0x54b912,_0x214e2a);this['stopLoading'](_0x1492be(0xe2));if(!_0x8d6753)for(const _0x437dfd of _0x3d922a){_0x437dfd[_0x1492be(0xd9)]?this[_0x1492be(0xe1)]('❌\x20'+_0x437dfd[_0x1492be(0xda)]+':\x20'+_0x437dfd[_0x1492be(0xd9)]):this[_0x1492be(0xe1)]('✅\x20'+_0x437dfd['path']+'\x20('+(_0x437dfd[_0x1492be(0xf4)]?.[_0x1492be(0xd5)]??0x0)+_0x1492be(0xd3));}return{'thread_id':_0x54b912,'results':_0x3d922a};}catch(_0x5c95a9){this[_0x1492be(0xf3)](),this[_0x1492be(0xd9)](_0x5c95a9 instanceof Error?_0x5c95a9[_0x1492be(0xde)]:String(_0x5c95a9));}}}
1
+ const a8_0x13c582=a8_0x529f;function a8_0x12f3(){const _0x3308de=['error','download','获取完成','4715084meMYuY','<%=\x20config.bin\x20%>\x20code\x20files\x20--thread-id\x20thread_xxx\x20--json','42UxJOlu','7bbFsVX','log','string','1085816UptTAF','28676SxLwga','51qitjrL','length','description','\x20bytes)','stopLoading','values','正在获取文件列表...','createLoading','正在下载\x20','content','430572IYYPdf','jsonEnabled','message','<%=\x20config.bin\x20%>\x20code\x20files\x20--thread-id\x20thread_xxx\x20--download\x20src/App.tsx\x20--json','path','downloadMode','要下载的文件路径(可指定多个)','run','thread-id','files','\x20个文件...','40ytwvIw','查看或下载云端\x20Agent\x20会话中的文件','flags','listMode','122785FPWNeZ','526536qYrAgm','requireAuth','(暂无文件)','examples','97486yfIuEo','keys'];a8_0x12f3=function(){return _0x3308de;};return a8_0x12f3();}(function(_0x2e7b3b,_0x12f39f){const _0x4b0e98=a8_0x529f,_0x1582e9=_0x2e7b3b();while(!![]){try{const _0x16ffe9=-parseInt(_0x4b0e98(0x1eb))/0x1+parseInt(_0x4b0e98(0x202))/0x2+-parseInt(_0x4b0e98(0x1f8))/0x3*(-parseInt(_0x4b0e98(0x1f7))/0x4)+-parseInt(_0x4b0e98(0x1e6))/0x5*(parseInt(_0x4b0e98(0x1f2))/0x6)+-parseInt(_0x4b0e98(0x1f3))/0x7*(parseInt(_0x4b0e98(0x1f6))/0x8)+-parseInt(_0x4b0e98(0x1e7))/0x9*(parseInt(_0x4b0e98(0x1e2))/0xa)+parseInt(_0x4b0e98(0x1f0))/0xb;if(_0x16ffe9===_0x12f39f)break;else _0x1582e9['push'](_0x1582e9['shift']());}catch(_0x287b23){_0x1582e9['push'](_0x1582e9['shift']());}}}(a8_0x12f3,0x1eed3));import{Flags}from'@oclif/core';function a8_0x529f(_0x512fd5,_0x12f7ba){_0x512fd5=_0x512fd5-0x1d9;const _0x12f36b=a8_0x12f3();let _0x529fd9=_0x12f36b[_0x512fd5];return _0x529fd9;}import a8_0x223418 from'../../lib/extends/command.js';import{getThreadState,downloadFiles}from'../../lib/service/cloud-agent.js';export default class CodeFiles extends a8_0x223418{static [a8_0x13c582(0x1fa)]=a8_0x13c582(0x1e3);static ['enableJsonFlag']=!![];static [a8_0x13c582(0x1ea)]=[a8_0x13c582(0x1f1),a8_0x13c582(0x1da)];static [a8_0x13c582(0x1e4)]={'thread-id':Flags[a8_0x13c582(0x1f5)]({'description':'会话\x20ID','required':!![]}),'download':Flags['string']({'description':a8_0x13c582(0x1dd),'multiple':!![]})};async[a8_0x13c582(0x1de)](){const _0x255ed2=a8_0x13c582;await this[_0x255ed2(0x1e8)]();const {flags:_0x5eda1b}=await this['parse'](CodeFiles),_0x1d2e2c=this[_0x255ed2(0x203)]();if(_0x5eda1b[_0x255ed2(0x1ee)]&&_0x5eda1b[_0x255ed2(0x1ee)][_0x255ed2(0x1f9)]>0x0)return this[_0x255ed2(0x1dc)](_0x5eda1b[_0x255ed2(0x1df)],_0x5eda1b['download'],_0x1d2e2c);return this[_0x255ed2(0x1e5)](_0x5eda1b[_0x255ed2(0x1df)],_0x1d2e2c);}async[a8_0x13c582(0x1e5)](_0x9784d7,_0x8fa751){const _0x5e3b3b=a8_0x13c582;!_0x8fa751&&await this['createLoading'](_0x5e3b3b(0x1fe));try{const _0xc24a31=await getThreadState(_0x9784d7),_0x2cd215=_0xc24a31[_0x5e3b3b(0x1fd)]?.[_0x5e3b3b(0x1e0)]??{};this[_0x5e3b3b(0x1fc)](_0x5e3b3b(0x1ef));if(!_0x8fa751){const _0x3b338a=Object[_0x5e3b3b(0x1ec)](_0x2cd215);if(_0x3b338a[_0x5e3b3b(0x1f9)]===0x0)this[_0x5e3b3b(0x1f4)](_0x5e3b3b(0x1e9));else{this[_0x5e3b3b(0x1f4)]('共\x20'+_0x3b338a[_0x5e3b3b(0x1f9)]+'\x20个文件:');for(const _0x8cc91d of _0x3b338a){this[_0x5e3b3b(0x1f4)]('\x20\x20'+_0x8cc91d);}}}return{'thread_id':_0x9784d7,'files':_0x2cd215};}catch(_0x317a54){this[_0x5e3b3b(0x1fc)](),this[_0x5e3b3b(0x1ed)](_0x317a54 instanceof Error?_0x317a54[_0x5e3b3b(0x1d9)]:String(_0x317a54));}}async['downloadMode'](_0x4d95e3,_0x1a4340,_0x343d21){const _0x15d20e=a8_0x13c582;!_0x343d21&&await this[_0x15d20e(0x1ff)](_0x15d20e(0x200)+_0x1a4340[_0x15d20e(0x1f9)]+_0x15d20e(0x1e1));try{const _0x952999=await downloadFiles(_0x4d95e3,_0x1a4340);this[_0x15d20e(0x1fc)]('下载完成');if(!_0x343d21)for(const _0x43c0e9 of _0x952999){_0x43c0e9[_0x15d20e(0x1ed)]?this[_0x15d20e(0x1f4)]('❌\x20'+_0x43c0e9[_0x15d20e(0x1db)]+':\x20'+_0x43c0e9[_0x15d20e(0x1ed)]):this[_0x15d20e(0x1f4)]('✅\x20'+_0x43c0e9[_0x15d20e(0x1db)]+'\x20('+(_0x43c0e9[_0x15d20e(0x201)]?.[_0x15d20e(0x1f9)]??0x0)+_0x15d20e(0x1fb));}return{'thread_id':_0x4d95e3,'results':_0x952999};}catch(_0x5c1f55){this[_0x15d20e(0x1fc)](),this[_0x15d20e(0x1ed)](_0x5c1f55 instanceof Error?_0x5c1f55['message']:String(_0x5c1f55));}}}
@@ -1 +1 @@
1
- const a6_0x1f914f=a6_0x3469;(function(_0x5d590e,_0x2e1985){const _0x3d296c=a6_0x3469,_0x1d8e35=_0x5d590e();while(!![]){try{const _0xa8b73f=-parseInt(_0x3d296c(0x114))/0x1*(-parseInt(_0x3d296c(0x120))/0x2)+-parseInt(_0x3d296c(0x119))/0x3*(parseInt(_0x3d296c(0x117))/0x4)+-parseInt(_0x3d296c(0x110))/0x5*(-parseInt(_0x3d296c(0x107))/0x6)+parseInt(_0x3d296c(0x11b))/0x7*(-parseInt(_0x3d296c(0x113))/0x8)+-parseInt(_0x3d296c(0x12b))/0x9+-parseInt(_0x3d296c(0x10d))/0xa+parseInt(_0x3d296c(0x11e))/0xb;if(_0xa8b73f===_0x2e1985)break;else _0x1d8e35['push'](_0x1d8e35['shift']());}catch(_0x1d8e05){_0x1d8e35['push'](_0x1d8e35['shift']());}}}(a6_0x58c5,0xde81a));function a6_0x3469(_0x113562,_0x256737){_0x113562=_0x113562-0x104;const _0x58c534=a6_0x58c5();let _0x3469f3=_0x58c534[_0x113562];return _0x3469f3;}import{Flags}from'@oclif/core';import a6_0xa346b3 from'../../lib/extends/command.js';import{lookupDeployment,getProjectThread}from'../../lib/service/manage.js';function parseShortUrl(_0x740280){const _0x3ad282=a6_0x3469,_0x4e07cc=_0x740280[_0x3ad282(0x10f)](/\/app\/([^/]+)\/([^/]+)/);if(!_0x4e07cc)throw new Error(_0x3ad282(0x11f)+_0x740280+'\x0a'+'短链格式应为:\x20https://o.wpsgo.com/app/<company_id>/<short_slug>/');return{'companyId':_0x4e07cc[0x1],'shortSlug':_0x4e07cc[0x2]};}export default class CodeLookup extends a6_0xa346b3{static [a6_0x1f914f(0x108)]='通过短链反查项目信息(project_id、thread_id\x20等),用于重新部署';static [a6_0x1f914f(0x115)]=!![];static [a6_0x1f914f(0x109)]=['<%=\x20config.bin\x20%>\x20code\x20lookup\x20--url\x20https://o.wpsgo.com/app/41000207/6Ne2UkWT3ytn/\x20--json'];static [a6_0x1f914f(0x127)]={'url':Flags[a6_0x1f914f(0x112)]({'description':a6_0x1f914f(0x10b),'required':!![]})};async[a6_0x1f914f(0x125)](){const _0x3a814e=a6_0x1f914f;await this[_0x3a814e(0x122)]();const {flags:_0x47ba76}=await this[_0x3a814e(0x123)](CodeLookup),_0x21bc62=this['jsonEnabled'](),{companyId:_0x5eb725,shortSlug:_0x216e07}=parseShortUrl(_0x47ba76['url']);try{if(!_0x21bc62)await this[_0x3a814e(0x111)](_0x3a814e(0x124)+_0x5eb725+'/'+_0x216e07+_0x3a814e(0x10e));const _0x8b7583=await lookupDeployment(_0x5eb725,_0x216e07);let _0x14ace4=null;try{const _0x3e10e1=await getProjectThread(_0x8b7583['project_id']);_0x14ace4=_0x3e10e1['thread_id'];}catch{}return!_0x21bc62&&(this['stopLoading'](_0x3a814e(0x128)),this[_0x3a814e(0x11a)]('项目\x20ID:\x20\x20\x20\x20'+_0x8b7583[_0x3a814e(0x106)]),this[_0x3a814e(0x11a)](_0x3a814e(0x11c)+(_0x14ace4??'()')),this[_0x3a814e(0x11a)](_0x3a814e(0x104)+_0x8b7583['deployment_id']),this[_0x3a814e(0x11a)]('版本:\x20\x20\x20\x20\x20\x20\x20'+_0x8b7583[_0x3a814e(0x12a)]+'\x20('+_0x8b7583['version_id']+')'),this['log']('部署状态:\x20\x20\x20'+_0x8b7583[_0x3a814e(0x118)]),this['log'](_0x3a814e(0x116)+_0x8b7583[_0x3a814e(0x11d)]),this[_0x3a814e(0x11a)](_0x3a814e(0x126)+_0x8b7583['short_slug'])),{'project_id':_0x8b7583[_0x3a814e(0x106)],'thread_id':_0x14ace4,'deployment_id':_0x8b7583[_0x3a814e(0x121)],'version_id':_0x8b7583[_0x3a814e(0x10a)],'version_number':_0x8b7583['version_number'],'company_id':_0x8b7583[_0x3a814e(0x11d)],'short_slug':_0x8b7583[_0x3a814e(0x105)],'deploy_status':_0x8b7583[_0x3a814e(0x118)]};}catch(_0x10d839){this[_0x3a814e(0x10c)]();const _0x4e2e13=_0x10d839 instanceof Error?_0x10d839['message']:String(_0x10d839);if(_0x21bc62)return{'project_id':0x0,'thread_id':null,'deployment_id':'','version_id':0x0,'version_number':'','company_id':_0x5eb725,'short_slug':_0x216e07,'deploy_status':_0x3a814e(0x129),'error':_0x4e2e13};this[_0x3a814e(0x129)](_0x4e2e13);}}}function a6_0x58c5(){const _0x14c7e7=['stopLoading','943580hJmdZo','...','match','15SwsGqu','createLoading','string','8PjswFC','1ENtYXh','enableJsonFlag','企业\x20ID:\x20\x20\x20\x20','196oTkJjr','deploy_status','50859wXAeEA','log','4674628vXDtmm','会话\x20ID:\x20\x20\x20\x20','company_id','11543939WojzPd','无法解析短链:\x20','2989986EHuMxW','deployment_id','requireAuth','parse','正在查询\x20','run','短链标识:\x20\x20\x20','flags','查询成功','error','version_number','4696515NKBNJa','部署\x20ID:\x20\x20\x20\x20','short_slug','project_id','963276ZjIpla','description','examples','version_id','应用短链\x20URL'];a6_0x58c5=function(){return _0x14c7e7;};return a6_0x58c5();}
1
+ const a9_0x479569=a9_0x4efe;(function(_0x3e6acf,_0x6f2f55){const _0x5d21c0=a9_0x4efe,_0x1f81d7=_0x3e6acf();while(!![]){try{const _0x1fdde8=parseInt(_0x5d21c0(0x12f))/0x1*(-parseInt(_0x5d21c0(0x132))/0x2)+parseInt(_0x5d21c0(0x12e))/0x3+-parseInt(_0x5d21c0(0x147))/0x4*(-parseInt(_0x5d21c0(0x150))/0x5)+parseInt(_0x5d21c0(0x131))/0x6*(parseInt(_0x5d21c0(0x141))/0x7)+parseInt(_0x5d21c0(0x14d))/0x8+-parseInt(_0x5d21c0(0x133))/0x9*(-parseInt(_0x5d21c0(0x14f))/0xa)+parseInt(_0x5d21c0(0x13a))/0xb*(-parseInt(_0x5d21c0(0x142))/0xc);if(_0x1fdde8===_0x6f2f55)break;else _0x1f81d7['push'](_0x1f81d7['shift']());}catch(_0x3a5824){_0x1f81d7['push'](_0x1f81d7['shift']());}}}(a9_0x2884,0xcdaf9));import{Flags}from'@oclif/core';import a9_0x4c18dd from'../../lib/extends/command.js';function a9_0x4efe(_0x3a8bab,_0x4ccdf8){_0x3a8bab=_0x3a8bab-0x11c;const _0x288487=a9_0x2884();let _0x4efeeb=_0x288487[_0x3a8bab];return _0x4efeeb;}import{lookupDeployment,getProjectThread}from'../../lib/service/manage.js';function a9_0x2884(){const _0x4d084e=['match','log','29105637dmwalL','正在查询\x20','owner_id','project_id','部署状态:\x20\x20\x20','所有者\x20ID:\x20\x20','string','973861jGxuUw','12hTnJsf','无法解析短链:\x20','description','short_slug','parse','172236PgiwRx','部署\x20ID:\x20\x20\x20\x20','createLoading','会话\x20ID:\x20\x20\x20\x20','发布时间:\x20\x20\x20','message','5691896vEBqMH','可见性:\x20\x20\x20\x20\x20','828090dgoVPA','105xcqikA','短链标识:\x20\x20\x20','version_id','url','visibility','published_at','<%=\x20config.bin\x20%>\x20code\x20lookup\x20--url\x20https://o.wpsgo.com/app/41000207/6Ne2UkWT3ytn/\x20--json','flags','发布者\x20ID:\x20\x20','企业\x20ID:\x20\x20\x20\x20','run','短链格式应为:\x20https://o.wpsgo.com/app/<company_id>/<short_slug>/','error','company_id','toLocaleString','jsonEnabled','项目\x20ID:\x20\x20\x20\x20','publisher_id','(无)','deploy_status','stopLoading','examples','通过短链反查项目信息(project_id、thread_id\x20等),用于重新部署','requireAuth','3250707TGGPrz','1xhmydj','enableJsonFlag','54vQqdhr','3078926vURqSF','117tKiyCB','...','deployment_id','版本:\x20\x20\x20\x20\x20\x20\x20','查询成功'];a9_0x2884=function(){return _0x4d084e;};return a9_0x2884();}function parseShortUrl(_0x224ed7){const _0x2b6709=a9_0x4efe,_0x2454cf=_0x224ed7[_0x2b6709(0x138)](/\/app\/([^/]+)\/([^/]+)/);if(!_0x2454cf)throw new Error(_0x2b6709(0x143)+_0x224ed7+'\x0a'+_0x2b6709(0x121));return{'companyId':_0x2454cf[0x1],'shortSlug':_0x2454cf[0x2]};}export default class CodeLookup extends a9_0x4c18dd{static [a9_0x479569(0x144)]=a9_0x479569(0x12c);static [a9_0x479569(0x130)]=!![];static [a9_0x479569(0x12b)]=[a9_0x479569(0x11c)];static [a9_0x479569(0x11d)]={'url':Flags[a9_0x479569(0x140)]({'description':'应用短链\x20URL','required':!![]})};async[a9_0x479569(0x120)](){const _0x26b5ef=a9_0x479569;await this[_0x26b5ef(0x12d)]();const {flags:_0x176de8}=await this[_0x26b5ef(0x146)](CodeLookup),_0x385365=this[_0x26b5ef(0x125)](),{companyId:_0x533c92,shortSlug:_0x32a4d9}=parseShortUrl(_0x176de8[_0x26b5ef(0x153)]);try{if(!_0x385365)await this[_0x26b5ef(0x149)](_0x26b5ef(0x13b)+_0x533c92+'/'+_0x32a4d9+_0x26b5ef(0x134));const _0x593536=await lookupDeployment(_0x533c92,_0x32a4d9);let _0x27caad=null;try{const _0x350396=await getProjectThread(_0x593536[_0x26b5ef(0x13d)]);_0x27caad=_0x350396['thread_id'];}catch{}return!_0x385365&&(this[_0x26b5ef(0x12a)](_0x26b5ef(0x137)),this[_0x26b5ef(0x139)](_0x26b5ef(0x126)+_0x593536[_0x26b5ef(0x13d)]),this[_0x26b5ef(0x139)](_0x26b5ef(0x14a)+(_0x27caad??_0x26b5ef(0x128))),this['log'](_0x26b5ef(0x148)+_0x593536[_0x26b5ef(0x135)]),this[_0x26b5ef(0x139)](_0x26b5ef(0x136)+_0x593536['version_number']+'\x20('+_0x593536[_0x26b5ef(0x152)]+')'),this[_0x26b5ef(0x139)](_0x26b5ef(0x13e)+_0x593536['deploy_status']),this[_0x26b5ef(0x139)](_0x26b5ef(0x11f)+_0x593536[_0x26b5ef(0x123)]),this[_0x26b5ef(0x139)](_0x26b5ef(0x151)+_0x593536['short_slug']),this['log'](_0x26b5ef(0x13f)+_0x593536['owner_id']),this[_0x26b5ef(0x139)](_0x26b5ef(0x11e)+_0x593536[_0x26b5ef(0x127)]),this[_0x26b5ef(0x139)](_0x26b5ef(0x14e)+_0x593536['visibility']),this['log'](_0x26b5ef(0x14b)+new Date(_0x593536[_0x26b5ef(0x155)]*0x3e8)[_0x26b5ef(0x124)]())),{'project_id':_0x593536[_0x26b5ef(0x13d)],'thread_id':_0x27caad,'deployment_id':_0x593536[_0x26b5ef(0x135)],'version_id':_0x593536[_0x26b5ef(0x152)],'version_number':_0x593536['version_number'],'company_id':_0x593536[_0x26b5ef(0x123)],'short_slug':_0x593536[_0x26b5ef(0x145)],'owner_id':_0x593536[_0x26b5ef(0x13c)],'publisher_id':_0x593536['publisher_id'],'deploy_status':_0x593536[_0x26b5ef(0x129)],'visibility':_0x593536[_0x26b5ef(0x154)],'has_app_id':_0x593536['has_app_id'],'published_at':_0x593536[_0x26b5ef(0x155)]};}catch(_0x1838be){this[_0x26b5ef(0x12a)]();const _0x26a89e=_0x1838be instanceof Error?_0x1838be[_0x26b5ef(0x14c)]:String(_0x1838be);if(_0x385365)return{'project_id':0x0,'thread_id':null,'deployment_id':'','version_id':0x0,'version_number':'','company_id':_0x533c92,'short_slug':_0x32a4d9,'owner_id':'','publisher_id':'','deploy_status':_0x26b5ef(0x122),'visibility':'','has_app_id':![],'published_at':0x0,'error':_0x26a89e};this[_0x26b5ef(0x122)](_0x26a89e);}}}
@@ -1 +1 @@
1
- function a7_0x1ca6(){const _0x1471be=['short_url','deploy_error','云端\x20Agent\x20正在等待用户确认:','run','project-id','enableJsonFlag','跳过构建,直接发布','status','resolveVersion','自定义构建命令','build_logs','jsonEnabled','6475854pMWDLL','colorize','版本已创建:\x20','yellow','access_url','agent','skip-build','78uEFEWf','项目\x20ID','291AmPwxz','...','log','189496tVhrAm','超时时间(秒)','stopLoading','timeout','thread-id','green','spinner','发布失败','原因:\x20','boolean','running','创建版本\x20','error','createLoading','会话\x20ID','171765SGtTLS','1832100VSQfEk','45864ulecyG','requireAuth','1395522ZGKIWr','waiting','length','step','352962JLDDrN','red','版本号(默认自动生成)','。请先处理确认后再发布。','发布云端项目(构建\x20→\x20部署\x20→\x20返回运行时地址)','云端\x20Agent\x20仍在生成代码,请稍后再试。','description','build_result','agent_waiting','开始发布...','integer','518KafPHG','now','string','发布成功!','text','构建日志\x20(最近\x2020\x20条):','examples','interrupt','message','160TNIWfy','failed'];a7_0x1ca6=function(){return _0x1471be;};return a7_0x1ca6();}const a7_0x4376aa=a7_0x1c8c;function a7_0x1c8c(_0x4204fe,_0x2e8b13){_0x4204fe=_0x4204fe-0x98;const _0x1ca6f4=a7_0x1ca6();let _0x1c8c86=_0x1ca6f4[_0x4204fe];return _0x1c8c86;}(function(_0x4eb12e,_0x132d70){const _0x2c0127=a7_0x1c8c,_0x353534=_0x4eb12e();while(!![]){try{const _0x4d72b9=-parseInt(_0x2c0127(0xb3))/0x1+-parseInt(_0x2c0127(0xb0))/0x2+-parseInt(_0x2c0127(0x9d))/0x3*(-parseInt(_0x2c0127(0xb1))/0x4)+-parseInt(_0x2c0127(0xaf))/0x5*(-parseInt(_0x2c0127(0x9b))/0x6)+-parseInt(_0x2c0127(0xc2))/0x7*(-parseInt(_0x2c0127(0xa0))/0x8)+parseInt(_0x2c0127(0xb7))/0x9*(-parseInt(_0x2c0127(0xcb))/0xa)+parseInt(_0x2c0127(0xd9))/0xb;if(_0x4d72b9===_0x132d70)break;else _0x353534['push'](_0x353534['shift']());}catch(_0x364e88){_0x353534['push'](_0x353534['shift']());}}}(a7_0x1ca6,0xeab03));import{Flags}from'@oclif/core';import a7_0x2402ed 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_0x2402ed{static [a7_0x4376aa(0xbd)]=a7_0x4376aa(0xbb);static [a7_0x4376aa(0xd2)]=!![];static [a7_0x4376aa(0xc8)]=['<%=\x20config.bin\x20%>\x20code\x20publish\x20--project-id\x20206\x20--thread-id\x20thread_xxx\x20--json','<%=\x20config.bin\x20%>\x20code\x20publish\x20--project-id\x20206\x20--thread-id\x20thread_xxx\x20--version\x201.0.0'];static ['flags']={'project-id':Flags[a7_0x4376aa(0xc1)]({'description':a7_0x4376aa(0x9c),'required':!![]}),'thread-id':Flags[a7_0x4376aa(0xc4)]({'description':a7_0x4376aa(0xae),'required':!![]}),'version':Flags[a7_0x4376aa(0xc4)]({'description':a7_0x4376aa(0xb9)}),'build-command':Flags['string']({'description':a7_0x4376aa(0xd6)}),'skip-build':Flags[a7_0x4376aa(0xa9)]({'description':a7_0x4376aa(0xd3),'default':![]}),'timeout':Flags['integer']({'description':a7_0x4376aa(0xa1),'default':0x258})};async[a7_0x4376aa(0xd0)](){const _0x185ddc=a7_0x4376aa;await this[_0x185ddc(0xb2)]();const {flags:_0x17f949}=await this['parse'](CodePublish),_0x2cdd1e=this[_0x185ddc(0xd8)](),_0x4d5f56=_0x17f949[_0x185ddc(0xd1)],_0x4d324c=_0x17f949[_0x185ddc(0xa4)],_0x14a6ca=_0x17f949[_0x185ddc(0xa3)]*0x3e8;try{const _0x11bcfc=await getProjectContext(_0x4d324c,_0x4d5f56);if(_0x11bcfc[_0x185ddc(0xc9)][_0x185ddc(0xb4)]){const _0x3dd9e9=_0x11bcfc['interrupt'][_0x185ddc(0xbd)]??'',_0x404494=_0x185ddc(0xcf)+_0x3dd9e9+_0x185ddc(0xba);if(_0x2cdd1e)return{'status':_0x185ddc(0xcc),'project_id':_0x4d5f56,'version_id':0x0,'error':_0x404494,'reason':_0x185ddc(0xbf)};this[_0x185ddc(0xac)](_0x404494);}if(_0x11bcfc[_0x185ddc(0x99)][_0x185ddc(0xaa)]){const _0x1a2622=_0x185ddc(0xbc);if(_0x2cdd1e)return{'status':_0x185ddc(0xcc),'project_id':_0x4d5f56,'version_id':0x0,'error':_0x1a2622,'reason':'agent_running'};this['error'](_0x1a2622);}const _0x468fa1=await this[_0x185ddc(0xd5)](_0x4d5f56,_0x17f949['version'],_0x2cdd1e);!_0x2cdd1e&&await this['createLoading'](_0x185ddc(0xc0));const _0x425719=_0x2cdd1e?undefined:_0x553273=>{const _0x25ad9b=_0x185ddc;this[_0x25ad9b(0xa6)]&&(this['spinner'][_0x25ad9b(0xc6)]='['+_0x553273[_0x25ad9b(0xb6)]+']\x20'+_0x553273[_0x25ad9b(0xca)]);},_0x36707c=await runFullPublish({'threadId':_0x4d324c,'projectId':_0x4d5f56,'versionId':_0x468fa1,'buildCommand':_0x17f949['build-command'],'skipBuild':_0x17f949[_0x185ddc(0x9a)]},_0x425719,_0x14a6ca);this['stopLoading']();if(_0x36707c[_0x185ddc(0xd4)]==='deployed')return!_0x2cdd1e&&(this[_0x185ddc(0x9f)](this[_0x185ddc(0xda)](_0x185ddc(0xc5),_0x185ddc(0xa5))),this[_0x185ddc(0x9f)]('运行时地址:\x20'+_0x36707c['access_url'])),{'status':'deployed','project_id':_0x4d5f56,'version_id':_0x468fa1,'access_url':_0x36707c[_0x185ddc(0x98)],'short_url':_0x36707c[_0x185ddc(0xcd)]};const _0x53b2bd=_0x36707c[_0x185ddc(0xce)]??'未知错误';if(!_0x2cdd1e){this['log'](this['colorize'](_0x185ddc(0xa7),_0x185ddc(0xb8))),this['log'](_0x185ddc(0xa8)+_0x53b2bd);if(_0x36707c[_0x185ddc(0xd7)]?.[_0x185ddc(0xb5)]){this[_0x185ddc(0x9f)](this[_0x185ddc(0xda)](_0x185ddc(0xc7),_0x185ddc(0xdc)));for(const _0x34f34f of _0x36707c[_0x185ddc(0xd7)]['slice'](-0x14)){this[_0x185ddc(0x9f)]('\x20\x20'+_0x34f34f);}}}return{'status':'failed','project_id':_0x4d5f56,'version_id':_0x468fa1,'error':_0x53b2bd,'build_logs':_0x36707c[_0x185ddc(0xd7)]?.['slice'](-0x1e),'build_result':_0x36707c[_0x185ddc(0xbe)]};}catch(_0x121758){this['stopLoading']();const _0x5dc5a6=_0x121758 instanceof Error?_0x121758['message']:String(_0x121758);if(_0x2cdd1e)return{'status':'failed','project_id':_0x4d5f56,'version_id':0x0,'error':_0x5dc5a6};this[_0x185ddc(0xac)](_0x5dc5a6);}}async[a7_0x4376aa(0xd5)](_0x372f53,_0x3571eb,_0x5157be){const _0x3aec17=a7_0x4376aa,_0x3e2873=_0x3571eb??'v'+Date[_0x3aec17(0xc3)]()['toString'](0x24);!_0x5157be&&await this[_0x3aec17(0xad)](_0x3aec17(0xab)+_0x3e2873+_0x3aec17(0x9e));const _0x44ebc9=await createVersion(_0x372f53,_0x3e2873);return!_0x5157be&&this[_0x3aec17(0xa2)](_0x3aec17(0xdb)+_0x44ebc9['id']+'\x20('+_0x3e2873+')'),_0x44ebc9['id'];}}
1
+ const a10_0x51c54b=a10_0x2087;(function(_0x342e35,_0x51e3bf){const _0x32475b=a10_0x2087,_0x3b3e4f=_0x342e35();while(!![]){try{const _0x18e0e6=-parseInt(_0x32475b(0xf6))/0x1*(parseInt(_0x32475b(0xd4))/0x2)+-parseInt(_0x32475b(0xc5))/0x3*(-parseInt(_0x32475b(0xc7))/0x4)+parseInt(_0x32475b(0xf4))/0x5*(parseInt(_0x32475b(0xc4))/0x6)+parseInt(_0x32475b(0xe6))/0x7+parseInt(_0x32475b(0xc6))/0x8+parseInt(_0x32475b(0xf8))/0x9+-parseInt(_0x32475b(0xef))/0xa*(parseInt(_0x32475b(0xc1))/0xb);if(_0x18e0e6===_0x51e3bf)break;else _0x3b3e4f['push'](_0x3b3e4f['shift']());}catch(_0x519f23){_0x3b3e4f['push'](_0x3b3e4f['shift']());}}}(a10_0x1912,0xe67e3));function a10_0x2087(_0x1b79bf,_0x4dc942){_0x1b79bf=_0x1b79bf-0xbb;const _0x191266=a10_0x1912();let _0x208742=_0x191266[_0x1b79bf];return _0x208742;}import{Flags}from'@oclif/core';import a10_0x59c8f0 from'../../lib/extends/command.js';function a10_0x1912(){const _0x477f66=['278aEnOXT','agent','boolean','integer','超时时间(秒)','short_url','<%=\x20config.bin\x20%>\x20code\x20publish\x20--project-id\x20206\x20--thread-id\x20thread_xxx\x20--version\x201.0.0','stopLoading','创建版本\x20','requireAuth','build-command','。请先处理确认后再发布。','版本已创建:\x20','跳过构建,直接发布','log','version','版本号(默认自动生成)','step','10989482PRpzhe','access_url','error','build_result','examples','message','parse','description','flags','110530AxKJtK','createLoading','agent_waiting','failed','red','343510ViaBym','spinner','4596RYftMN','agent_running','16773912WaXOmJ','会话\x20ID','running','waiting','thread-id','构建日志\x20(最近\x2020\x20条):','status','build_logs','deployed','skip-build','发布失败','interrupt','toString','运行时地址:\x20','4653YgUtch','string','resolveVersion','66uwNqpt','217407QOgXLv','12493304KMqxYU','28zrTKJu','colorize','原因:\x20','slice','now','project-id','enableJsonFlag','length','...','<%=\x20config.bin\x20%>\x20code\x20publish\x20--project-id\x20206\x20--thread-id\x20thread_xxx\x20--json','deploy_error','run','云端\x20Agent\x20正在等待用户确认:'];a10_0x1912=function(){return _0x477f66;};return a10_0x1912();}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 a10_0x59c8f0{static [a10_0x51c54b(0xed)]='发布云端项目(构建\x20→\x20部署\x20→\x20返回运行时地址)';static [a10_0x51c54b(0xcd)]=!![];static [a10_0x51c54b(0xea)]=[a10_0x51c54b(0xd0),a10_0x51c54b(0xda)];static [a10_0x51c54b(0xee)]={'project-id':Flags['integer']({'description':'项目\x20ID','required':!![]}),'thread-id':Flags['string']({'description':a10_0x51c54b(0xf9),'required':!![]}),'version':Flags[a10_0x51c54b(0xc2)]({'description':a10_0x51c54b(0xe4)}),'build-command':Flags[a10_0x51c54b(0xc2)]({'description':'自定义构建命令'}),'skip-build':Flags[a10_0x51c54b(0xd6)]({'description':a10_0x51c54b(0xe1),'default':![]}),'timeout':Flags[a10_0x51c54b(0xd7)]({'description':a10_0x51c54b(0xd8),'default':0x258})};async[a10_0x51c54b(0xd2)](){const _0x49ee02=a10_0x51c54b;await this[_0x49ee02(0xdd)]();const {flags:_0x5106f3}=await this[_0x49ee02(0xec)](CodePublish),_0x40e58f=this['jsonEnabled'](),_0x555af5=_0x5106f3[_0x49ee02(0xcc)],_0x13a957=_0x5106f3[_0x49ee02(0xfc)],_0x2be1f7=_0x5106f3['timeout']*0x3e8;try{const _0x50c85d=await getProjectContext(_0x13a957,_0x555af5);if(_0x50c85d[_0x49ee02(0xbe)][_0x49ee02(0xfb)]){const _0x7ac78d=_0x50c85d[_0x49ee02(0xbe)]['description']??'',_0xe2d454=_0x49ee02(0xd3)+_0x7ac78d+_0x49ee02(0xdf);if(_0x40e58f)return{'status':_0x49ee02(0xf2),'project_id':_0x555af5,'version_id':0x0,'error':_0xe2d454,'reason':_0x49ee02(0xf1)};this[_0x49ee02(0xe8)](_0xe2d454);}if(_0x50c85d[_0x49ee02(0xd5)][_0x49ee02(0xfa)]){const _0x27bf12='云端\x20Agent\x20仍在生成代码,请稍后再试。';if(_0x40e58f)return{'status':_0x49ee02(0xf2),'project_id':_0x555af5,'version_id':0x0,'error':_0x27bf12,'reason':_0x49ee02(0xf7)};this[_0x49ee02(0xe8)](_0x27bf12);}const _0x5d6a23=await this[_0x49ee02(0xc3)](_0x555af5,_0x5106f3[_0x49ee02(0xe3)],_0x40e58f);!_0x40e58f&&await this[_0x49ee02(0xf0)]('开始发布...');const _0x9229f4=_0x40e58f?undefined:_0x2f25b7=>{const _0x325e02=_0x49ee02;this[_0x325e02(0xf5)]&&(this['spinner']['text']='['+_0x2f25b7[_0x325e02(0xe5)]+']\x20'+_0x2f25b7['message']);},_0x4e2dbf=await runFullPublish({'threadId':_0x13a957,'projectId':_0x555af5,'versionId':_0x5d6a23,'buildCommand':_0x5106f3[_0x49ee02(0xde)],'skipBuild':_0x5106f3[_0x49ee02(0xbc)]},_0x9229f4,_0x2be1f7);this[_0x49ee02(0xdb)]();if(_0x4e2dbf[_0x49ee02(0xfe)]===_0x49ee02(0xbb))return!_0x40e58f&&(this['log'](this[_0x49ee02(0xc8)]('发布成功!','green')),this[_0x49ee02(0xe2)](_0x49ee02(0xc0)+_0x4e2dbf[_0x49ee02(0xe7)])),{'status':_0x49ee02(0xbb),'project_id':_0x555af5,'version_id':_0x5d6a23,'access_url':_0x4e2dbf['access_url'],'short_url':_0x4e2dbf[_0x49ee02(0xd9)]};const _0x556b23=_0x4e2dbf[_0x49ee02(0xd1)]??'未知错误';if(!_0x40e58f){this[_0x49ee02(0xe2)](this['colorize'](_0x49ee02(0xbd),_0x49ee02(0xf3))),this['log'](_0x49ee02(0xc9)+_0x556b23);if(_0x4e2dbf[_0x49ee02(0xff)]?.[_0x49ee02(0xce)]){this['log'](this[_0x49ee02(0xc8)](_0x49ee02(0xfd),'yellow'));for(const _0xce17ab of _0x4e2dbf[_0x49ee02(0xff)][_0x49ee02(0xca)](-0x14)){this[_0x49ee02(0xe2)]('\x20\x20'+_0xce17ab);}}}return{'status':_0x49ee02(0xf2),'project_id':_0x555af5,'version_id':_0x5d6a23,'error':_0x556b23,'build_logs':_0x4e2dbf[_0x49ee02(0xff)]?.[_0x49ee02(0xca)](-0x1e),'build_result':_0x4e2dbf[_0x49ee02(0xe9)]};}catch(_0x5aa232){this['stopLoading']();const _0x404cac=_0x5aa232 instanceof Error?_0x5aa232[_0x49ee02(0xeb)]:String(_0x5aa232);if(_0x40e58f)return{'status':'failed','project_id':_0x555af5,'version_id':0x0,'error':_0x404cac};this['error'](_0x404cac);}}async['resolveVersion'](_0xa25e8a,_0x5a30ae,_0x9e584f){const _0x1ea035=a10_0x51c54b,_0x529c97=_0x5a30ae??'v'+Date[_0x1ea035(0xcb)]()[_0x1ea035(0xbf)](0x24);!_0x9e584f&&await this[_0x1ea035(0xf0)](_0x1ea035(0xdc)+_0x529c97+_0x1ea035(0xcf));const _0x4591a5=await createVersion(_0xa25e8a,_0x529c97);return!_0x9e584f&&this['stopLoading'](_0x1ea035(0xe0)+_0x4591a5['id']+'\x20('+_0x529c97+')'),_0x4591a5['id'];}}
@@ -1 +1 @@
1
- function a8_0x3831(_0x31268d,_0x1330c2){_0x31268d=_0x31268d-0xc2;const _0x520946=a8_0x5209();let _0x383191=_0x520946[_0x31268d];return _0x383191;}const a8_0xbc3a13=a8_0x3831;(function(_0x4a2710,_0x2e9d43){const _0x3cbd5b=a8_0x3831,_0x35648d=_0x4a2710();while(!![]){try{const _0x152919=-parseInt(_0x3cbd5b(0xe0))/0x1+parseInt(_0x3cbd5b(0xca))/0x2*(parseInt(_0x3cbd5b(0xe3))/0x3)+parseInt(_0x3cbd5b(0xdf))/0x4+parseInt(_0x3cbd5b(0xe7))/0x5*(-parseInt(_0x3cbd5b(0xe6))/0x6)+-parseInt(_0x3cbd5b(0xd6))/0x7+-parseInt(_0x3cbd5b(0xe2))/0x8+parseInt(_0x3cbd5b(0xc2))/0x9*(parseInt(_0x3cbd5b(0xc5))/0xa);if(_0x152919===_0x2e9d43)break;else _0x35648d['push'](_0x35648d['shift']());}catch(_0x2485e9){_0x35648d['push'](_0x35648d['shift']());}}}(a8_0x5209,0xb9321));import{Flags}from'@oclif/core';function a8_0x5209(){const _0x39e0df=['961828NYtvMt','1505963lvOpZb','failed','4560544yxTnDn','9WHWrVe','match','请提供\x20--project-id\x20或\x20--url\x20参数','846UZYNgA','7465XARKTs','examples','98793rycFwG','shortSlug','部署\x20ID:\x20','1730HLuELq','flags','url','下架成功','enableJsonFlag','895514WDndaL','状态:\x20\x20\x20\x20','string','requireAuth','正在下架项目\x20','下架已部署的应用(recall),使其不再可访问','stopLoading','项目\x20ID(与\x20--url\x20二选一)','createLoading','log','...','deployment_id','3063508sEauGl','run','integer','companyId','无法解析短链:\x20','正在查询\x20','description','应用短链\x20URL(与\x20--project-id\x20二选一)','project-id'];a8_0x5209=function(){return _0x39e0df;};return a8_0x5209();}import a8_0x600bd6 from'../../lib/extends/command.js';import{recallDeployment,lookupDeployment}from'../../lib/service/manage.js';function parseShortUrl(_0x352d05){const _0x2f22cd=a8_0x3831,_0x1c74dd=_0x352d05[_0x2f22cd(0xe4)](/\/app\/([^/]+)\/([^/]+)/);return _0x1c74dd?{'companyId':_0x1c74dd[0x1],'shortSlug':_0x1c74dd[0x2]}:null;}export default class CodeRecall extends a8_0x600bd6{static [a8_0xbc3a13(0xdc)]=a8_0xbc3a13(0xcf);static [a8_0xbc3a13(0xc9)]=!![];static [a8_0xbc3a13(0xe8)]=['<%=\x20config.bin\x20%>\x20code\x20recall\x20--project-id\x20206\x20--json','<%=\x20config.bin\x20%>\x20code\x20recall\x20--url\x20https://o.wpsgo.com/app/41000207/6Ne2UkWT3ytn/\x20--json'];static [a8_0xbc3a13(0xc6)]={'project-id':Flags[a8_0xbc3a13(0xd8)]({'description':a8_0xbc3a13(0xd1)}),'url':Flags[a8_0xbc3a13(0xcc)]({'description':a8_0xbc3a13(0xdd)})};async[a8_0xbc3a13(0xd7)](){const _0x2394cd=a8_0xbc3a13;await this[_0x2394cd(0xcd)]();const {flags:_0x2eb5f4}=await this['parse'](CodeRecall),_0x180701=this['jsonEnabled']();try{let _0xc8bdc3=_0x2eb5f4['project-id'];if(!_0xc8bdc3&&_0x2eb5f4[_0x2394cd(0xc7)]){const _0x593001=parseShortUrl(_0x2eb5f4['url']);if(!_0x593001)throw new Error(_0x2394cd(0xda)+_0x2eb5f4[_0x2394cd(0xc7)]+'\x0a格式应为:\x20https://o.wpsgo.com/app/<company_id>/<short_slug>/');if(!_0x180701)await this[_0x2394cd(0xd2)](_0x2394cd(0xdb)+_0x593001[_0x2394cd(0xd9)]+'/'+_0x593001[_0x2394cd(0xc3)]+'...');const _0x3a719f=await lookupDeployment(_0x593001[_0x2394cd(0xd9)],_0x593001[_0x2394cd(0xc3)]);_0xc8bdc3=_0x3a719f['project_id'];if(!_0x180701)this[_0x2394cd(0xd0)]('找到项目\x20'+_0xc8bdc3);}if(!_0xc8bdc3)throw new Error(_0x2394cd(0xe5));if(!_0x180701)await this['createLoading'](_0x2394cd(0xce)+_0xc8bdc3+_0x2394cd(0xd4));const _0x1f0a54=await recallDeployment(_0xc8bdc3);return!_0x180701&&(this[_0x2394cd(0xd0)](_0x2394cd(0xc8)),this['log'](_0x2394cd(0xc4)+_0x1f0a54[_0x2394cd(0xd5)]),this[_0x2394cd(0xd3)](_0x2394cd(0xcb)+_0x1f0a54['status'])),{'status':'recalled','project_id':_0xc8bdc3,'deployment_id':_0x1f0a54[_0x2394cd(0xd5)]};}catch(_0x41379f){this[_0x2394cd(0xd0)]();const _0x2dc89b=_0x41379f instanceof Error?_0x41379f['message']:String(_0x41379f);if(_0x180701)return{'status':_0x2394cd(0xe1),'project_id':_0x2eb5f4[_0x2394cd(0xde)]??0x0,'deployment_id':'','error':_0x2dc89b};this['error'](_0x2dc89b);}}}
1
+ function a11_0x4945(){const _0x9e3b99=['requireAuth','flags','5rnaUwu','下架成功','stopLoading','createLoading','9qHkYcj','应用短链\x20URL(与\x20--project-id\x20二选一)','无法解析短链:\x20','enableJsonFlag','部署\x20ID:\x20','3kRmblK','724384fmONlq','string','project_id','shortSlug','companyId','项目\x20ID(与\x20--url\x20二选一)','jsonEnabled','下架已部署的应用(recall),使其不再可访问','error','recalled','status','正在查询\x20','description','167764AtmZIs','状态:\x20\x20\x20\x20','...','log','996093WGAiXx','1443776xqeGlG','240428QDuRzp','435264pOLwyP','4761990lnFFWJ','正在下架项目\x20','deployment_id','project-id','message','url','run'];a11_0x4945=function(){return _0x9e3b99;};return a11_0x4945();}const a11_0x3c4015=a11_0x1334;(function(_0xf0c99,_0x50522c){const _0x1f5714=a11_0x1334,_0x5c4901=_0xf0c99();while(!![]){try{const _0x3b7c0c=-parseInt(_0x1f5714(0x111))/0x1+-parseInt(_0x1f5714(0x117))/0x2*(parseInt(_0x1f5714(0x103))/0x3)+-parseInt(_0x1f5714(0x104))/0x4*(-parseInt(_0x1f5714(0xfa))/0x5)+parseInt(_0x1f5714(0x118))/0x6+-parseInt(_0x1f5714(0x115))/0x7+-parseInt(_0x1f5714(0x116))/0x8+-parseInt(_0x1f5714(0xfe))/0x9*(-parseInt(_0x1f5714(0x119))/0xa);if(_0x3b7c0c===_0x50522c)break;else _0x5c4901['push'](_0x5c4901['shift']());}catch(_0x23e082){_0x5c4901['push'](_0x5c4901['shift']());}}}(a11_0x4945,0x1d132));import{Flags}from'@oclif/core';import a11_0x305f33 from'../../lib/extends/command.js';import{recallDeployment,lookupDeployment}from'../../lib/service/manage.js';function parseShortUrl(_0x598a76){const _0x400237=_0x598a76['match'](/\/app\/([^/]+)\/([^/]+)/);return _0x400237?{'companyId':_0x400237[0x1],'shortSlug':_0x400237[0x2]}:null;}function a11_0x1334(_0x48c07a,_0x34f13b){_0x48c07a=_0x48c07a-0xf4;const _0x4945e3=a11_0x4945();let _0x133410=_0x4945e3[_0x48c07a];return _0x133410;}export default class CodeRecall extends a11_0x305f33{static [a11_0x3c4015(0x110)]=a11_0x3c4015(0x10b);static [a11_0x3c4015(0x101)]=!![];static ['examples']=['<%=\x20config.bin\x20%>\x20code\x20recall\x20--project-id\x20206\x20--json','<%=\x20config.bin\x20%>\x20code\x20recall\x20--url\x20https://o.wpsgo.com/app/41000207/6Ne2UkWT3ytn/\x20--json'];static [a11_0x3c4015(0xf9)]={'project-id':Flags['integer']({'description':a11_0x3c4015(0x109)}),'url':Flags[a11_0x3c4015(0x105)]({'description':a11_0x3c4015(0xff)})};async[a11_0x3c4015(0xf7)](){const _0x2e47b1=a11_0x3c4015;await this[_0x2e47b1(0xf8)]();const {flags:_0x2cee14}=await this['parse'](CodeRecall),_0x1a81ba=this[_0x2e47b1(0x10a)]();try{let _0x1f7596=_0x2cee14['project-id'];if(!_0x1f7596&&_0x2cee14[_0x2e47b1(0xf6)]){const _0x4b0d5f=parseShortUrl(_0x2cee14[_0x2e47b1(0xf6)]);if(!_0x4b0d5f)throw new Error(_0x2e47b1(0x100)+_0x2cee14[_0x2e47b1(0xf6)]+'\x0a格式应为:\x20https://o.wpsgo.com/app/<company_id>/<short_slug>/');if(!_0x1a81ba)await this['createLoading'](_0x2e47b1(0x10f)+_0x4b0d5f[_0x2e47b1(0x108)]+'/'+_0x4b0d5f[_0x2e47b1(0x107)]+_0x2e47b1(0x113));const _0x18fbdb=await lookupDeployment(_0x4b0d5f['companyId'],_0x4b0d5f[_0x2e47b1(0x107)]);_0x1f7596=_0x18fbdb[_0x2e47b1(0x106)];if(!_0x1a81ba)this[_0x2e47b1(0xfc)]('找到项目\x20'+_0x1f7596);}if(!_0x1f7596)throw new Error('请提供\x20--project-id\x20或\x20--url\x20参数');if(!_0x1a81ba)await this[_0x2e47b1(0xfd)](_0x2e47b1(0x11a)+_0x1f7596+'...');const _0x4c7eee=await recallDeployment(_0x1f7596);return!_0x1a81ba&&(this[_0x2e47b1(0xfc)](_0x2e47b1(0xfb)),this['log'](_0x2e47b1(0x102)+_0x4c7eee[_0x2e47b1(0x11b)]),this[_0x2e47b1(0x114)](_0x2e47b1(0x112)+_0x4c7eee[_0x2e47b1(0x10e)])),{'status':_0x2e47b1(0x10d),'project_id':_0x1f7596,'deployment_id':_0x4c7eee[_0x2e47b1(0x11b)]};}catch(_0x2a1af2){this['stopLoading']();const _0xc11377=_0x2a1af2 instanceof Error?_0x2a1af2[_0x2e47b1(0xf5)]:String(_0x2a1af2);if(_0x1a81ba)return{'status':'failed','project_id':_0x2cee14[_0x2e47b1(0xf4)]??0x0,'deployment_id':'','error':_0xc11377};this[_0x2e47b1(0x10c)](_0xc11377);}}}
@@ -1 +1 @@
1
- const a9_0x379b75=a9_0x1a07;(function(_0x3dd9e1,_0x462a3d){const _0x1a3189=a9_0x1a07,_0x3a932f=_0x3dd9e1();while(!![]){try{const _0xe965d0=-parseInt(_0x1a3189(0x144))/0x1+parseInt(_0x1a3189(0x13d))/0x2*(parseInt(_0x1a3189(0x14c))/0x3)+-parseInt(_0x1a3189(0x14d))/0x4*(parseInt(_0x1a3189(0x147))/0x5)+parseInt(_0x1a3189(0x146))/0x6+-parseInt(_0x1a3189(0x132))/0x7*(-parseInt(_0x1a3189(0x13f))/0x8)+-parseInt(_0x1a3189(0x140))/0x9*(-parseInt(_0x1a3189(0x13a))/0xa)+parseInt(_0x1a3189(0x141))/0xb;if(_0xe965d0===_0x462a3d)break;else _0x3a932f['push'](_0x3a932f['shift']());}catch(_0x3d1e64){_0x3a932f['push'](_0x3a932f['shift']());}}}(a9_0x4a20,0x18c2a));function a9_0x1a07(_0x45a04f,_0x2edf07){_0x45a04f=_0x45a04f-0x132;const _0x4a203c=a9_0x4a20();let _0x1a07c0=_0x4a203c[_0x45a04f];return _0x1a07c0;}function a9_0x4a20(){const _0x568c32=['jsonEnabled','string','拒绝当前方案','云端\x20Agent\x20ID','恢复被中断的云端\x20Agent(HITL\x20确认/拒绝)','8890gkZggH','run','并恢复\x20Agent...','6794LKcwdj','Agent\x20已恢复\x20(','323808XOMRkE','1314EiqysC','271722yuMyJX','附加说明(拒绝时建议提供)','reject','120941SEDOjo','enableJsonFlag','157284sWsSNM','366365xMctBF','会话\x20ID','approve','<%=\x20config.bin\x20%>\x20code\x20resume\x20--thread-id\x20thread_xxx\x20--reject\x20--message\x20\x22换个方案\x22\x20--json','boolean','30PMRWgK','4mPjUJc','批准当前方案(默认)','flags','resumed','14kYGeYD','assistant-id','message'];a9_0x4a20=function(){return _0x568c32;};return a9_0x4a20();}import{Flags}from'@oclif/core';import a9_0x225064 from'../../lib/extends/command.js';import{resumeRun}from'../../lib/service/cloud-agent.js';export default class CodeResume extends a9_0x225064{static ['description']=a9_0x379b75(0x139);static [a9_0x379b75(0x145)]=!![];static ['examples']=['<%=\x20config.bin\x20%>\x20code\x20resume\x20--thread-id\x20thread_xxx\x20--approve\x20--json',a9_0x379b75(0x14a)];static [a9_0x379b75(0x14f)]={'thread-id':Flags[a9_0x379b75(0x136)]({'description':a9_0x379b75(0x148),'required':!![]}),'approve':Flags[a9_0x379b75(0x14b)]({'description':a9_0x379b75(0x14e),'exclusive':[a9_0x379b75(0x143)]}),'reject':Flags[a9_0x379b75(0x14b)]({'description':a9_0x379b75(0x137),'exclusive':[a9_0x379b75(0x149)]}),'message':Flags[a9_0x379b75(0x136)]({'description':a9_0x379b75(0x142)}),'assistant-id':Flags['string']({'description':a9_0x379b75(0x138),'default':'app-buddy'})};async[a9_0x379b75(0x13b)](){const _0x34269a=a9_0x379b75;await this['requireAuth']();const {flags:_0x3fde15}=await this['parse'](CodeResume),_0x4b2d8c=this[_0x34269a(0x135)](),_0x5cb7b=_0x3fde15['thread-id'],_0x332f8e=_0x3fde15['reject']===!![],_0x41d832=_0x332f8e?_0x34269a(0x143):_0x34269a(0x149),_0x496e6e={'type':_0x41d832};_0x3fde15[_0x34269a(0x134)]&&(_0x496e6e['message']=_0x3fde15['message']);const _0x80ec0f={'decisions':[_0x496e6e]};if(!_0x4b2d8c)this['log']('正在'+(_0x332f8e?'拒绝':'批准')+_0x34269a(0x13c));return await resumeRun({'threadId':_0x5cb7b,'resumeValue':_0x80ec0f,'assistantId':_0x3fde15[_0x34269a(0x133)]}),!_0x4b2d8c&&this['log'](_0x34269a(0x13e)+_0x41d832+'),云端正在继续处理'),{'status':_0x34269a(0x150),'thread_id':_0x5cb7b,'action':_0x41d832};}}
1
+ const a12_0x477d22=a12_0xc1f3;function a12_0xc1f3(_0x34e050,_0x3339be){_0x34e050=_0x34e050-0xc3;const _0x456d45=a12_0x456d();let _0xc1f363=_0x456d45[_0x34e050];return _0xc1f363;}function a12_0x456d(){const _0x13fa65=['2536948YqQCQn','parse','reject','flags','云端\x20Agent\x20ID','),云端正在继续处理','assistant-id','message','10JyrvoU','app-buddy','批准当前方案(默认)','2356705fcyjnm','log','会话\x20ID','run','683568wpMOAi','examples','description','并恢复\x20Agent...','Agent\x20已恢复\x20(','1289241ePlWwo','<%=\x20config.bin\x20%>\x20code\x20resume\x20--thread-id\x20thread_xxx\x20--reject\x20--message\x20\x22换个方案\x22\x20--json','jsonEnabled','附加说明(拒绝时建议提供)','boolean','拒绝当前方案','resumed','1139944udcWLY','string','thread-id','1kyoUPG','7tUyuBD','<%=\x20config.bin\x20%>\x20code\x20resume\x20--thread-id\x20thread_xxx\x20--approve\x20--json','approve','4132060PtwMvW','3298539visSgM'];a12_0x456d=function(){return _0x13fa65;};return a12_0x456d();}(function(_0x1c3c91,_0x15c907){const _0x319af0=a12_0xc1f3,_0x115018=_0x1c3c91();while(!![]){try{const _0xec2b71=parseInt(_0x319af0(0xdd))/0x1*(parseInt(_0x319af0(0xe3))/0x2)+parseInt(_0x319af0(0xe2))/0x3+-parseInt(_0x319af0(0xe1))/0x4+-parseInt(_0x319af0(0xca))/0x5+parseInt(_0x319af0(0xce))/0x6+-parseInt(_0x319af0(0xde))/0x7*(parseInt(_0x319af0(0xda))/0x8)+parseInt(_0x319af0(0xd3))/0x9*(parseInt(_0x319af0(0xc7))/0xa);if(_0xec2b71===_0x15c907)break;else _0x115018['push'](_0x115018['shift']());}catch(_0x40250e){_0x115018['push'](_0x115018['shift']());}}}(a12_0x456d,0xeed8b));import{Flags}from'@oclif/core';import a12_0x474572 from'../../lib/extends/command.js';import{resumeRun}from'../../lib/service/cloud-agent.js';export default class CodeResume extends a12_0x474572{static [a12_0x477d22(0xd0)]='恢复被中断的云端\x20Agent(HITL\x20确认/拒绝)';static ['enableJsonFlag']=!![];static [a12_0x477d22(0xcf)]=[a12_0x477d22(0xdf),a12_0x477d22(0xd4)];static [a12_0x477d22(0xe6)]={'thread-id':Flags[a12_0x477d22(0xdb)]({'description':a12_0x477d22(0xcc),'required':!![]}),'approve':Flags[a12_0x477d22(0xd7)]({'description':a12_0x477d22(0xc9),'exclusive':['reject']}),'reject':Flags[a12_0x477d22(0xd7)]({'description':a12_0x477d22(0xd8),'exclusive':[a12_0x477d22(0xe0)]}),'message':Flags[a12_0x477d22(0xdb)]({'description':a12_0x477d22(0xd6)}),'assistant-id':Flags['string']({'description':a12_0x477d22(0xc3),'default':a12_0x477d22(0xc8)})};async[a12_0x477d22(0xcd)](){const _0x226643=a12_0x477d22;await this['requireAuth']();const {flags:_0x529fac}=await this[_0x226643(0xe4)](CodeResume),_0x1b0df3=this[_0x226643(0xd5)](),_0x1185d6=_0x529fac[_0x226643(0xdc)],_0x2129b7=_0x529fac[_0x226643(0xe5)]===!![],_0x4dad8c=_0x2129b7?'reject':_0x226643(0xe0),_0x484a57={'type':_0x4dad8c};_0x529fac[_0x226643(0xc6)]&&(_0x484a57['message']=_0x529fac['message']);const _0x1289f8={'decisions':[_0x484a57]};if(!_0x1b0df3)this['log']('正在'+(_0x2129b7?'拒绝':'批准')+_0x226643(0xd1));return await resumeRun({'threadId':_0x1185d6,'resumeValue':_0x1289f8,'assistantId':_0x529fac[_0x226643(0xc5)]}),!_0x1b0df3&&this[_0x226643(0xcb)](_0x226643(0xd2)+_0x4dad8c+_0x226643(0xc4)),{'status':_0x226643(0xd9),'thread_id':_0x1185d6,'action':_0x4dad8c};}}
@@ -1 +1 @@
1
- const a10_0x3cf9ea=a10_0x9063;(function(_0x57f19e,_0x57a66c){const _0x53f80e=a10_0x9063,_0x6a29d=_0x57f19e();while(!![]){try{const _0x3c47b4=parseInt(_0x53f80e(0x75))/0x1*(-parseInt(_0x53f80e(0x79))/0x2)+parseInt(_0x53f80e(0x85))/0x3+-parseInt(_0x53f80e(0x6f))/0x4+-parseInt(_0x53f80e(0x73))/0x5+-parseInt(_0x53f80e(0x70))/0x6*(parseInt(_0x53f80e(0x6d))/0x7)+-parseInt(_0x53f80e(0x80))/0x8+parseInt(_0x53f80e(0x7b))/0x9*(parseInt(_0x53f80e(0x6a))/0xa);if(_0x3c47b4===_0x57a66c)break;else _0x6a29d['push'](_0x6a29d['shift']());}catch(_0x122aa3){_0x6a29d['push'](_0x6a29d['shift']());}}}(a10_0x5003,0x28eb6));import{Args,Flags}from'@oclif/core';import a10_0x5fa973 from'../../lib/extends/command.js';function a10_0x5003(){const _0x465b63=['parse','云端\x20Agent\x20ID','user','288172BJatop','app-buddy','270MxmXCY','requireAuth','enableJsonFlag','提交消息到云端\x20Agent...','run','1936632MxdhFS','string','发送给云端\x20Agent\x20的消息','assistant-id','向云端\x20Agent\x20发送消息(提交后立即返回)','608820iTYxbT','jsonEnabled','examples','项目\x20ID(从\x20code\x20create\x20获取,用于生成访问地址)','log','flags','322610NdQhoM','description','submitted','2723RPtVyy','integer','687560eMMxuN','2934pWtYdj','会话\x20ID(从\x20code\x20create\x20获取)','thread-id','1274440bnkUwS','message','1fqXQRK'];a10_0x5003=function(){return _0x465b63;};return a10_0x5003();}import{submitRun}from'../../lib/service/cloud-agent.js';function a10_0x9063(_0x33ff2d,_0x19e1be){_0x33ff2d=_0x33ff2d-0x67;const _0x5003e0=a10_0x5003();let _0x906352=_0x5003e0[_0x33ff2d];return _0x906352;}export default class CodeSend extends a10_0x5fa973{static [a10_0x3cf9ea(0x6b)]=a10_0x3cf9ea(0x84);static [a10_0x3cf9ea(0x7d)]=!![];static [a10_0x3cf9ea(0x87)]=['<%=\x20config.bin\x20%>\x20code\x20send\x20--thread-id\x20thread_xxx\x20--project-id\x20206\x20\x22做一个待办应用\x22\x20--json'];static ['args']={'message':Args[a10_0x3cf9ea(0x81)]({'description':a10_0x3cf9ea(0x82),'required':!![]})};static [a10_0x3cf9ea(0x69)]={'thread-id':Flags['string']({'description':a10_0x3cf9ea(0x71),'required':!![]}),'project-id':Flags[a10_0x3cf9ea(0x6e)]({'description':a10_0x3cf9ea(0x67)}),'assistant-id':Flags['string']({'description':a10_0x3cf9ea(0x77),'default':a10_0x3cf9ea(0x7a)})};async[a10_0x3cf9ea(0x7f)](){const _0x370d9a=a10_0x3cf9ea;await this[_0x370d9a(0x7c)]();const {args:_0x5eed69,flags:_0x16eafe}=await this[_0x370d9a(0x76)](CodeSend),_0x12e842=this[_0x370d9a(0x86)](),_0x47eb22=_0x16eafe[_0x370d9a(0x72)],_0x40268c=_0x16eafe['project-id'];if(!_0x12e842)this[_0x370d9a(0x68)](_0x370d9a(0x7e));return await submitRun({'threadId':_0x47eb22,'messages':[{'role':_0x370d9a(0x78),'content':_0x5eed69[_0x370d9a(0x74)]}],'assistantId':_0x16eafe[_0x370d9a(0x83)]}),!_0x12e842&&this['log']('消息已提交,云端\x20Agent\x20正在处理'),{'status':_0x370d9a(0x6c),'thread_id':_0x47eb22,'project_id':_0x40268c};}}
1
+ const a13_0x5708d2=a13_0x1b4a;function a13_0x1b4a(_0x383e1e,_0x1d4ab0){_0x383e1e=_0x383e1e-0x91;const _0x3e305e=a13_0x3e30();let _0x1b4a28=_0x3e305e[_0x383e1e];return _0x1b4a28;}function a13_0x3e30(){const _0x363f6d=['flags','922475cZdfnb','parse','发送给云端\x20Agent\x20的消息','会话\x20ID(从\x20code\x20create\x20获取)','云端\x20Agent\x20ID','thread-id','4432020DIYEmH','submitted','integer','8RhRYbx','user','694610aZPmRD','requireAuth','<%=\x20config.bin\x20%>\x20code\x20send\x20--thread-id\x20thread_xxx\x20--project-id\x20206\x20\x22做一个待办应用\x22\x20--json','4919238AvWmOA','string','24qUTqvD','699412AeWCDN','run','assistant-id','556178qczbBF','项目\x20ID(从\x20code\x20create\x20获取,用于生成访问地址)','project-id','9465709RVnvrg','1EkpmAx','description','12pJCjeK','6VRbcjG','args','log'];a13_0x3e30=function(){return _0x363f6d;};return a13_0x3e30();}(function(_0x4f289d,_0x2339b4){const _0x2bed90=a13_0x1b4a,_0x8d1301=_0x4f289d();while(!![]){try{const _0x5ed150=-parseInt(_0x2bed90(0x9c))/0x1*(parseInt(_0x2bed90(0x98))/0x2)+-parseInt(_0x2bed90(0x9f))/0x3*(parseInt(_0x2bed90(0x95))/0x4)+parseInt(_0x2bed90(0xa3))/0x5*(parseInt(_0x2bed90(0x9e))/0x6)+-parseInt(_0x2bed90(0xae))/0x7*(parseInt(_0x2bed90(0xac))/0x8)+-parseInt(_0x2bed90(0x92))/0x9+-parseInt(_0x2bed90(0xa9))/0xa+-parseInt(_0x2bed90(0x9b))/0xb*(-parseInt(_0x2bed90(0x94))/0xc);if(_0x5ed150===_0x2339b4)break;else _0x8d1301['push'](_0x8d1301['shift']());}catch(_0x4d8e7f){_0x8d1301['push'](_0x8d1301['shift']());}}}(a13_0x3e30,0x5b1e3));import{Args,Flags}from'@oclif/core';import a13_0x54c12e from'../../lib/extends/command.js';import{submitRun}from'../../lib/service/cloud-agent.js';export default class CodeSend extends a13_0x54c12e{static [a13_0x5708d2(0x9d)]='向云端\x20Agent\x20发送消息(提交后立即返回)';static ['enableJsonFlag']=!![];static ['examples']=[a13_0x5708d2(0x91)];static [a13_0x5708d2(0xa0)]={'message':Args[a13_0x5708d2(0x93)]({'description':a13_0x5708d2(0xa5),'required':!![]})};static [a13_0x5708d2(0xa2)]={'thread-id':Flags[a13_0x5708d2(0x93)]({'description':a13_0x5708d2(0xa6),'required':!![]}),'project-id':Flags[a13_0x5708d2(0xab)]({'description':a13_0x5708d2(0x99)}),'assistant-id':Flags[a13_0x5708d2(0x93)]({'description':a13_0x5708d2(0xa7),'default':'app-buddy'})};async[a13_0x5708d2(0x96)](){const _0x4bde09=a13_0x5708d2;await this[_0x4bde09(0xaf)]();const {args:_0x33602d,flags:_0x572ce0}=await this[_0x4bde09(0xa4)](CodeSend),_0x1f9ce3=this['jsonEnabled'](),_0x5ceefb=_0x572ce0[_0x4bde09(0xa8)],_0x18dbb4=_0x572ce0[_0x4bde09(0x9a)];if(!_0x1f9ce3)this[_0x4bde09(0xa1)]('提交消息到云端\x20Agent...');return await submitRun({'threadId':_0x5ceefb,'messages':[{'role':_0x4bde09(0xad),'content':_0x33602d['message']}],'assistantId':_0x572ce0[_0x4bde09(0x97)]}),!_0x1f9ce3&&this[_0x4bde09(0xa1)]('消息已提交,云端\x20Agent\x20正在处理'),{'status':_0x4bde09(0xaa),'thread_id':_0x5ceefb,'project_id':_0x18dbb4};}}
@@ -1 +1 @@
1
- const a11_0x26a741=a11_0x4e8d;(function(_0x4131cc,_0x2f41a1){const _0x187224=a11_0x4e8d,_0x1a616d=_0x4131cc();while(!![]){try{const _0xc1a608=parseInt(_0x187224(0x18f))/0x1+parseInt(_0x187224(0x19e))/0x2+parseInt(_0x187224(0x199))/0x3*(parseInt(_0x187224(0x18e))/0x4)+-parseInt(_0x187224(0x1b1))/0x5+parseInt(_0x187224(0x1a1))/0x6*(parseInt(_0x187224(0x17f))/0x7)+parseInt(_0x187224(0x17d))/0x8*(-parseInt(_0x187224(0x1a5))/0x9)+parseInt(_0x187224(0x191))/0xa;if(_0xc1a608===_0x2f41a1)break;else _0x1a616d['push'](_0x1a616d['shift']());}catch(_0x389175){_0x1a616d['push'](_0x1a616d['shift']());}}}(a11_0x2d66,0xd612e));import{Flags}from'@oclif/core';import a11_0x42582f from'../../lib/extends/command.js';function a11_0x2d66(){const _0x4b7928=['81SBHfeN','正在查询项目状态...','查询完成','thread-id','requireAuth','1167680MfQMrs','jsonEnabled','description','6WjaJku','run','log','yellow','359478ahHfLN','<%=\x20config.bin\x20%>\x20code\x20status\x20--thread-id\x20thread_xxx\x20--json','flags','Short\x20URL:\x20','message','\x20tasks','deploy','Thread:\x20\x20\x20\x20','未知原因','error','build','Runtime:\x20\x20\x20','7299940dODGsc','runtime','file_count','urls','access_url','336SjijBY','status','1945727uAqXbw','\x20→\x20','colorize','agent','parse','stopLoading','\x20files,\x20','project-id','会话\x20ID','short_url','integer','createLoading','messages_count','\x20—\x20','phase','211448LmlmED','1319356nIUEHj','printHuman','4059670zEkKav','waiting','enableJsonFlag','<%=\x20config.bin\x20%>\x20code\x20status\x20--thread-id\x20thread_xxx\x20--project-id\x20206\x20--json','thread_id','查看云端项目综合状态(Agent\x20/\x20构建\x20/\x20部署\x20/\x20HITL\x20中断)','⚠\x20WAITING:\x20Agent\x20等待确认\x20—\x20\x22','examples'];a11_0x2d66=function(){return _0x4b7928;};return a11_0x2d66();}function a11_0x4e8d(_0x291f21,_0x4994a7){_0x291f21=_0x291f21-0x17d;const _0x2d667f=a11_0x2d66();let _0x4e8d36=_0x2d667f[_0x291f21];return _0x4e8d36;}import{getProjectContext}from'../../lib/service/project-context.js';export default class CodeStatus extends a11_0x42582f{static [a11_0x26a741(0x1a0)]=a11_0x26a741(0x196);static [a11_0x26a741(0x193)]=!![];static [a11_0x26a741(0x198)]=[a11_0x26a741(0x1a6),a11_0x26a741(0x194)];static [a11_0x26a741(0x1a7)]={'thread-id':Flags['string']({'description':a11_0x26a741(0x187),'required':!![]}),'project-id':Flags[a11_0x26a741(0x189)]({'description':'项目\x20ID(可选,传入后返回版本和部署信息)'})};async[a11_0x26a741(0x1a2)](){const _0x2a8bb8=a11_0x26a741;await this[_0x2a8bb8(0x19d)]();const {flags:_0xa21ba1}=await this[_0x2a8bb8(0x183)](CodeStatus);!this[_0x2a8bb8(0x19f)]()&&await this[_0x2a8bb8(0x18a)](_0x2a8bb8(0x19a));try{const _0xd3648c=await getProjectContext(_0xa21ba1[_0x2a8bb8(0x19c)],_0xa21ba1[_0x2a8bb8(0x186)]);return this[_0x2a8bb8(0x184)](_0x2a8bb8(0x19b)),!this[_0x2a8bb8(0x19f)]()&&this[_0x2a8bb8(0x190)](_0xd3648c),_0xd3648c;}catch(_0x4992b4){this[_0x2a8bb8(0x184)](),this[_0x2a8bb8(0x1ae)](_0x4992b4 instanceof Error?_0x4992b4[_0x2a8bb8(0x1a9)]:String(_0x4992b4));}}[a11_0x26a741(0x190)](_0x3d1a6a){const _0x432a38=a11_0x26a741;this['log'](_0x432a38(0x1ac)+_0x3d1a6a[_0x432a38(0x195)]),this[_0x432a38(0x1a3)]('Agent:\x20\x20\x20\x20\x20'+_0x3d1a6a['agent'][_0x432a38(0x18b)]+'\x20messages,\x20'+_0x3d1a6a['agent'][_0x432a38(0x1b3)]+_0x432a38(0x185)+_0x3d1a6a[_0x432a38(0x182)]['tasks_count']+_0x432a38(0x1aa));if(_0x3d1a6a['interrupt'][_0x432a38(0x192)]){const _0x44bb1c=_0x3d1a6a['interrupt']['description']??_0x432a38(0x1ad);this['log'](this[_0x432a38(0x181)](_0x432a38(0x197)+_0x44bb1c+'\x22',_0x432a38(0x1a4)));}this[_0x432a38(0x1a3)]('Build:\x20\x20\x20\x20\x20'+_0x3d1a6a[_0x432a38(0x1af)][_0x432a38(0x18d)]+(_0x3d1a6a[_0x432a38(0x1af)][_0x432a38(0x1a9)]?_0x432a38(0x18c)+_0x3d1a6a[_0x432a38(0x1af)][_0x432a38(0x1a9)]:'')),this['log']('Deploy:\x20\x20\x20\x20'+_0x3d1a6a[_0x432a38(0x1ab)][_0x432a38(0x17e)]+(_0x3d1a6a[_0x432a38(0x1ab)][_0x432a38(0x1b5)]?_0x432a38(0x180)+_0x3d1a6a[_0x432a38(0x1ab)][_0x432a38(0x1b5)]:'')),_0x3d1a6a[_0x432a38(0x1b4)][_0x432a38(0x1b2)]&&this[_0x432a38(0x1a3)](_0x432a38(0x1b0)+_0x3d1a6a[_0x432a38(0x1b4)][_0x432a38(0x1b2)]),_0x3d1a6a[_0x432a38(0x1b4)][_0x432a38(0x188)]&&this['log'](_0x432a38(0x1a8)+_0x3d1a6a[_0x432a38(0x1b4)]['short_url']);}}
1
+ const a14_0x3bcac1=a14_0x2a77;(function(_0x462f44,_0x291371){const _0x232099=a14_0x2a77,_0x20b95a=_0x462f44();while(!![]){try{const _0x577fed=parseInt(_0x232099(0x145))/0x1*(parseInt(_0x232099(0x126))/0x2)+-parseInt(_0x232099(0x121))/0x3*(parseInt(_0x232099(0x139))/0x4)+parseInt(_0x232099(0x12f))/0x5+parseInt(_0x232099(0x14a))/0x6+-parseInt(_0x232099(0x120))/0x7+-parseInt(_0x232099(0x11e))/0x8+parseInt(_0x232099(0x143))/0x9*(parseInt(_0x232099(0x127))/0xa);if(_0x577fed===_0x291371)break;else _0x20b95a['push'](_0x20b95a['shift']());}catch(_0x42e02f){_0x20b95a['push'](_0x20b95a['shift']());}}}(a14_0x146d,0x2dd2c));import{Flags}from'@oclif/core';function a14_0x2a77(_0x56fecc,_0x4b2353){_0x56fecc=_0x56fecc-0x11b;const _0x146d52=a14_0x146d();let _0x2a776a=_0x146d52[_0x56fecc];return _0x2a776a;}import a14_0x18fbee from'../../lib/extends/command.js';function a14_0x146d(){const _0x3756d0=['stopLoading','\x20messages,\x20','Thread:\x20\x20\x20\x20','\x20tasks','waiting','Agent:\x20\x20\x20\x20\x20','1143760xMVnCx','deploy','1539125GAjChA','24CFTPvb','interrupt','项目\x20ID(可选,传入后返回版本和部署信息)','printHuman','\x20files,\x20','554ciSYtK','5286170BXzMPg','messages_count','yellow','Build:\x20\x20\x20\x20\x20','查询完成','正在查询项目状态...','enableJsonFlag','description','1704200wrIIiG','tasks_count','查看云端项目综合状态(Agent\x20/\x20构建\x20/\x20部署\x20/\x20HITL\x20中断)','会话\x20ID','requireAuth','log','build','agent','<%=\x20config.bin\x20%>\x20code\x20status\x20--thread-id\x20thread_xxx\x20--project-id\x20206\x20--json','short_url','181708krHyeN','integer','file_count','flags','examples','colorize','Short\x20URL:\x20','jsonEnabled','<%=\x20config.bin\x20%>\x20code\x20status\x20--thread-id\x20thread_xxx\x20--json','message','9PCoPNR','⚠\x20WAITING:\x20Agent\x20等待确认\x20—\x20\x22','39NxWTMu','run','thread-id','runtime','\x20—\x20','202158ezyPKh','urls'];a14_0x146d=function(){return _0x3756d0;};return a14_0x146d();}import{getProjectContext}from'../../lib/service/project-context.js';export default class CodeStatus extends a14_0x18fbee{static [a14_0x3bcac1(0x12e)]=a14_0x3bcac1(0x131);static [a14_0x3bcac1(0x12d)]=!![];static [a14_0x3bcac1(0x13d)]=[a14_0x3bcac1(0x141),a14_0x3bcac1(0x137)];static [a14_0x3bcac1(0x13c)]={'thread-id':Flags['string']({'description':a14_0x3bcac1(0x132),'required':!![]}),'project-id':Flags[a14_0x3bcac1(0x13a)]({'description':a14_0x3bcac1(0x123)})};async[a14_0x3bcac1(0x146)](){const _0x1f3036=a14_0x3bcac1;await this[_0x1f3036(0x133)]();const {flags:_0x48ae60}=await this['parse'](CodeStatus);!this['jsonEnabled']()&&await this['createLoading'](_0x1f3036(0x12c));try{const _0x174f1d=await getProjectContext(_0x48ae60[_0x1f3036(0x147)],_0x48ae60['project-id']);return this['stopLoading'](_0x1f3036(0x12b)),!this[_0x1f3036(0x140)]()&&this[_0x1f3036(0x124)](_0x174f1d),_0x174f1d;}catch(_0x311a88){this[_0x1f3036(0x14c)](),this['error'](_0x311a88 instanceof Error?_0x311a88[_0x1f3036(0x142)]:String(_0x311a88));}}[a14_0x3bcac1(0x124)](_0x590c29){const _0x489cca=a14_0x3bcac1;this[_0x489cca(0x134)](_0x489cca(0x14e)+_0x590c29['thread_id']),this[_0x489cca(0x134)](_0x489cca(0x11d)+_0x590c29[_0x489cca(0x136)][_0x489cca(0x128)]+_0x489cca(0x14d)+_0x590c29[_0x489cca(0x136)][_0x489cca(0x13b)]+_0x489cca(0x125)+_0x590c29[_0x489cca(0x136)][_0x489cca(0x130)]+_0x489cca(0x11b));if(_0x590c29[_0x489cca(0x122)][_0x489cca(0x11c)]){const _0x5693a9=_0x590c29[_0x489cca(0x122)][_0x489cca(0x12e)]??'未知原因';this[_0x489cca(0x134)](this[_0x489cca(0x13e)](_0x489cca(0x144)+_0x5693a9+'\x22',_0x489cca(0x129)));}this[_0x489cca(0x134)](_0x489cca(0x12a)+_0x590c29['build']['phase']+(_0x590c29[_0x489cca(0x135)][_0x489cca(0x142)]?_0x489cca(0x149)+_0x590c29['build'][_0x489cca(0x142)]:'')),this['log']('Deploy:\x20\x20\x20\x20'+_0x590c29['deploy']['status']+(_0x590c29[_0x489cca(0x11f)]['access_url']?'\x20→\x20'+_0x590c29[_0x489cca(0x11f)]['access_url']:'')),_0x590c29['urls'][_0x489cca(0x148)]&&this[_0x489cca(0x134)]('Runtime:\x20\x20\x20'+_0x590c29['urls'][_0x489cca(0x148)]),_0x590c29[_0x489cca(0x14b)][_0x489cca(0x138)]&&this[_0x489cca(0x134)](_0x489cca(0x13f)+_0x590c29['urls'][_0x489cca(0x138)]);}}