@wps365-open/comate-cli 0.0.20 → 0.0.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. package/dist/commands/auth/login.js +1 -1
  2. package/dist/commands/auth/logout.js +1 -1
  3. package/dist/commands/auth/status.js +1 -1
  4. package/dist/commands/code/config.js +1 -1
  5. package/dist/commands/code/create.js +1 -1
  6. package/dist/commands/code/deploy.js +1 -1
  7. package/dist/commands/code/download.js +1 -1
  8. package/dist/commands/code/fetch-html.js +1 -1
  9. package/dist/commands/code/files.js +1 -1
  10. package/dist/commands/code/lookup.js +1 -1
  11. package/dist/commands/code/publish.js +1 -1
  12. package/dist/commands/code/recall.js +1 -1
  13. package/dist/commands/code/resume.js +1 -1
  14. package/dist/commands/code/send.js +1 -1
  15. package/dist/commands/code/status.js +1 -1
  16. package/dist/commands/code/upload.js +1 -1
  17. package/dist/commands/code/visibility.js +1 -0
  18. package/dist/commands/update.js +1 -1
  19. package/dist/hooks/init/logger.js +1 -1
  20. package/dist/hooks/prerun/update-checker.js +1 -1
  21. package/dist/index.js +1 -1
  22. package/dist/lib/account/login-service.js +1 -1
  23. package/dist/lib/config/constants.js +1 -1
  24. package/dist/lib/config/manager.js +1 -1
  25. package/dist/lib/extends/command.js +1 -1
  26. package/dist/lib/http/auth-headers.js +1 -1
  27. package/dist/lib/http/client.js +1 -1
  28. package/dist/lib/log/logger.js +1 -1
  29. package/dist/lib/service/auth.js +1 -1
  30. package/dist/lib/service/cloud-agent.js +1 -1
  31. package/dist/lib/service/cloud-publish.js +1 -1
  32. package/dist/lib/service/manage.js +1 -1
  33. package/dist/lib/service/project-context.js +1 -1
  34. package/oclif.manifest.json +70 -1
  35. package/package.json +1 -1
@@ -1 +1 @@
1
- const a0_0x2ce637=a0_0x2f38;(function(_0x2925be,_0x3f9dc4){const _0x17b206=a0_0x2f38,_0x42cdd6=_0x2925be();while(!![]){try{const _0x2f2b06=-parseInt(_0x17b206(0xca))/0x1*(-parseInt(_0x17b206(0xd7))/0x2)+-parseInt(_0x17b206(0xc7))/0x3*(-parseInt(_0x17b206(0xb9))/0x4)+parseInt(_0x17b206(0xd0))/0x5*(-parseInt(_0x17b206(0xbf))/0x6)+parseInt(_0x17b206(0xc0))/0x7+-parseInt(_0x17b206(0xbd))/0x8+parseInt(_0x17b206(0xc5))/0x9+-parseInt(_0x17b206(0xbc))/0xa;if(_0x2f2b06===_0x3f9dc4)break;else _0x42cdd6['push'](_0x42cdd6['shift']());}catch(_0x10d0a8){_0x42cdd6['push'](_0x42cdd6['shift']());}}}(a0_0xc93d,0x3f1bb));function a0_0x2f38(_0x10ae14,_0x227b0e){_0x10ae14=_0x10ae14-0xb9;const _0xc93dd9=a0_0xc93d();let _0x2f384f=_0xc93dd9[_0x10ae14];return _0x2f384f;}import{Flags}from'@oclif/core';import a0_0x234ea4 from'../../lib/extends/command.js';function a0_0xc93d(){const _0xd5de62=['登录成功,欢迎\x20','stopLoading','本地凭证已过期,重新登录...','boolean','login','run','6NMczha','20cZEcsn','log','如需切换账号,请使用\x20comate-cli\x20auth\x20login\x20-f','2681610iWBlEO','2302048xJNCUo','enableJsonFlag','44640GXBvCg','1553923hiPHiE','createLoading','force','登录\x20WPS\x20账号','强制重新登录(即使当前已登录)','2649978XKBFUF','nickname','54192XomJvk','wps_sid','flags','81619kICFZf','description','正在打开浏览器,请在浏览器中完成登录...','parse','jsonEnabled','当前已登录:\x20','25eqoncZ'];a0_0xc93d=function(){return _0xd5de62;};return a0_0xc93d();}import{configManager}from'../../lib/config/manager.js';import{getCurrentUser}from'../../lib/service/auth.js';import{loginWithBrowser}from'../../lib/account/login-service.js';export default class AuthLogin extends a0_0x234ea4{static [a0_0x2ce637(0xcb)]=a0_0x2ce637(0xc3);static ['aliases']=[a0_0x2ce637(0xd5)];static [a0_0x2ce637(0xbe)]=!![];static [a0_0x2ce637(0xc9)]={'force':Flags[a0_0x2ce637(0xd4)]({'char':'f','description':a0_0x2ce637(0xc4),'default':![]})};async[a0_0x2ce637(0xd6)](){const _0x434c20=a0_0x2ce637,{flags:_0x25e589}=await this[_0x434c20(0xcd)](AuthLogin);if(!_0x25e589[_0x434c20(0xc2)]){const _0x495a1c=configManager['load']();if(_0x495a1c[_0x434c20(0xc8)])try{const _0x14cf69=await getCurrentUser();return configManager['saveUserInfo'](_0x14cf69),!this[_0x434c20(0xce)]()&&(this[_0x434c20(0xba)](_0x434c20(0xcf)+_0x14cf69[_0x434c20(0xc6)]),this[_0x434c20(0xba)](_0x434c20(0xbb))),{'nickname':_0x14cf69[_0x434c20(0xc6)],'alreadyLoggedIn':!![]};}catch{!this[_0x434c20(0xce)]()&&this['log'](_0x434c20(0xd3));}}!this['jsonEnabled']()&&await this[_0x434c20(0xc1)](_0x434c20(0xcc));try{const {nickname:_0x481d16}=await loginWithBrowser();return this[_0x434c20(0xd2)](_0x434c20(0xd1)+_0x481d16),{'nickname':_0x481d16,'alreadyLoggedIn':![]};}catch(_0x325754){this[_0x434c20(0xd2)](),this['error'](_0x325754 instanceof Error?_0x325754['message']:String(_0x325754));}}}
1
+ const a0_0xaa95bf=a0_0x16a1;(function(_0x24a66a,_0x23ce4e){const _0x963005=a0_0x16a1,_0x314c25=_0x24a66a();while(!![]){try{const _0x1ae9b1=parseInt(_0x963005(0x86))/0x1+parseInt(_0x963005(0x7a))/0x2*(-parseInt(_0x963005(0x6e))/0x3)+-parseInt(_0x963005(0x8a))/0x4*(parseInt(_0x963005(0x79))/0x5)+parseInt(_0x963005(0x83))/0x6+-parseInt(_0x963005(0x80))/0x7+-parseInt(_0x963005(0x6d))/0x8+parseInt(_0x963005(0x8b))/0x9*(parseInt(_0x963005(0x7e))/0xa);if(_0x1ae9b1===_0x23ce4e)break;else _0x314c25['push'](_0x314c25['shift']());}catch(_0x28fdea){_0x314c25['push'](_0x314c25['shift']());}}}(a0_0x4b43,0x55336));import{Flags}from'@oclif/core';import a0_0x5849b5 from'../../lib/extends/command.js';import{configManager}from'../../lib/config/manager.js';import{getCurrentUser}from'../../lib/service/auth.js';function a0_0x4b43(){const _0x3b37f0=['登录\x20WPS\x20账号','正在打开浏览器,请在浏览器中完成登录...','315705slhNwz','当前已登录:\x20','enableJsonFlag','boolean','356mbxSnU','11545038NCeTvf','message','5072688fjUiBL','3EmpFqX','flags','jsonEnabled','aliases','wps_sid','error','log','stopLoading','本地凭证已过期,重新登录...','登录成功,欢迎\x20','如需切换账号,请使用\x20npx\x20--yes\x20@wps365-open/comate-cli@latest\x20auth\x20login\x20-f','34555Ygztfh','1064214vCtaRQ','login','load','强制重新登录(即使当前已登录)','10RNeAyo','createLoading','170478RIblAf','parse','run','3336726UfcRMp'];a0_0x4b43=function(){return _0x3b37f0;};return a0_0x4b43();}function a0_0x16a1(_0x2871fd,_0x4fea33){_0x2871fd=_0x2871fd-0x6c;const _0x4b4389=a0_0x4b43();let _0x16a1e7=_0x4b4389[_0x2871fd];return _0x16a1e7;}import{loginWithBrowser}from'../../lib/account/login-service.js';export default class AuthLogin extends a0_0x5849b5{static ['description']=a0_0xaa95bf(0x84);static [a0_0xaa95bf(0x71)]=[a0_0xaa95bf(0x7b)];static [a0_0xaa95bf(0x88)]=!![];static [a0_0xaa95bf(0x6f)]={'force':Flags[a0_0xaa95bf(0x89)]({'char':'f','description':a0_0xaa95bf(0x7d),'default':![]})};async[a0_0xaa95bf(0x82)](){const _0x18e549=a0_0xaa95bf,{flags:_0x1c23e6}=await this[_0x18e549(0x81)](AuthLogin);if(!_0x1c23e6['force']){const _0x1ee436=configManager[_0x18e549(0x7c)]();if(_0x1ee436[_0x18e549(0x72)])try{const _0xe29991=await getCurrentUser();return configManager['saveUserInfo'](_0xe29991),!this['jsonEnabled']()&&(this[_0x18e549(0x74)](_0x18e549(0x87)+_0xe29991['nickname']),this[_0x18e549(0x74)](_0x18e549(0x78))),{'nickname':_0xe29991['nickname'],'alreadyLoggedIn':!![]};}catch{!this['jsonEnabled']()&&this['log'](_0x18e549(0x76));}}!this[_0x18e549(0x70)]()&&await this[_0x18e549(0x7f)](_0x18e549(0x85));try{const {nickname:_0x2ff6b6}=await loginWithBrowser();return this[_0x18e549(0x75)](_0x18e549(0x77)+_0x2ff6b6),{'nickname':_0x2ff6b6,'alreadyLoggedIn':![]};}catch(_0x337823){this['stopLoading'](),this[_0x18e549(0x73)](_0x337823 instanceof Error?_0x337823[_0x18e549(0x6c)]:String(_0x337823));}}}
@@ -1 +1 @@
1
- const a1_0x5bfa8a=a1_0x2fb5;function a1_0x3e4a(){const _0x56c51c=['126asVRhe','log','2988573QLhByY','clear','16ismilZ','1237404VLQgTp','parse','enableJsonFlag','4928724vnwTwX','未知用户','jsonEnabled','当前未登录','description','logout','wps_sid','9270513AKMXVz','登出当前\x20WPS\x20账号','8vPqReq','17862BrkKDa','nickname','23840NrgOmq','13083330TeUfAF'];a1_0x3e4a=function(){return _0x56c51c;};return a1_0x3e4a();}(function(_0x1cc420,_0x45335d){const _0x15e492=a1_0x2fb5,_0x27bb75=_0x1cc420();while(!![]){try{const _0x46274b=parseInt(_0x15e492(0x105))/0x1+-parseInt(_0x15e492(0xfc))/0x2*(-parseInt(_0x15e492(0x100))/0x3)+parseInt(_0x15e492(0x104))/0x4*(parseInt(_0x15e492(0xfe))/0x5)+-parseInt(_0x15e492(0x108))/0x6+parseInt(_0x15e492(0x102))/0x7+-parseInt(_0x15e492(0xfb))/0x8*(-parseInt(_0x15e492(0x10f))/0x9)+-parseInt(_0x15e492(0xff))/0xa;if(_0x46274b===_0x45335d)break;else _0x27bb75['push'](_0x27bb75['shift']());}catch(_0x5e47a7){_0x27bb75['push'](_0x27bb75['shift']());}}}(a1_0x3e4a,0xea143));import a1_0x4ed6f0 from'../../lib/extends/command.js';function a1_0x2fb5(_0xbda05b,_0xa59209){_0xbda05b=_0xbda05b-0xfa;const _0x3e4a0b=a1_0x3e4a();let _0x2fb55c=_0x3e4a0b[_0xbda05b];return _0x2fb55c;}import{configManager}from'../../lib/config/manager.js';export default class AuthLogout extends a1_0x4ed6f0{static [a1_0x5bfa8a(0x10c)]=a1_0x5bfa8a(0xfa);static ['aliases']=[a1_0x5bfa8a(0x10d)];static [a1_0x5bfa8a(0x107)]=!![];async['run'](){const _0x5bfc65=a1_0x5bfa8a;await this[_0x5bfc65(0x106)](AuthLogout);const _0xa5a431=configManager['load']();if(!_0xa5a431[_0x5bfc65(0x10e)])return!this[_0x5bfc65(0x10a)]()&&this[_0x5bfc65(0x101)](_0x5bfc65(0x10b)),{'loggedOut':![],'nickname':null};const _0x1770c3=_0xa5a431['user_info']?.[_0x5bfc65(0xfd)]??_0x5bfc65(0x109);return configManager[_0x5bfc65(0x103)](),!this['jsonEnabled']()&&this['log']('已登出:\x20'+_0x1770c3),{'loggedOut':!![],'nickname':_0x1770c3};}}
1
+ const a1_0x1a0005=a1_0x35a3;function a1_0x35a3(_0x2fe856,_0xbadc46){_0x2fe856=_0x2fe856-0xa0;const _0x323177=a1_0x3231();let _0x35a307=_0x323177[_0x2fe856];return _0x35a307;}(function(_0xa373fd,_0x1a3f25){const _0x3348ff=a1_0x35a3,_0x405038=_0xa373fd();while(!![]){try{const _0x38f07e=parseInt(_0x3348ff(0xae))/0x1+-parseInt(_0x3348ff(0xad))/0x2*(-parseInt(_0x3348ff(0xaf))/0x3)+-parseInt(_0x3348ff(0xb8))/0x4*(parseInt(_0x3348ff(0xac))/0x5)+parseInt(_0x3348ff(0xb4))/0x6*(parseInt(_0x3348ff(0xab))/0x7)+-parseInt(_0x3348ff(0xa5))/0x8*(-parseInt(_0x3348ff(0xb5))/0x9)+parseInt(_0x3348ff(0xa3))/0xa+-parseInt(_0x3348ff(0xa7))/0xb;if(_0x38f07e===_0x1a3f25)break;else _0x405038['push'](_0x405038['shift']());}catch(_0x3d043b){_0x405038['push'](_0x405038['shift']());}}}(a1_0x3231,0x3b5a6));import a1_0x3eb094 from'../../lib/extends/command.js';import{configManager}from'../../lib/config/manager.js';function a1_0x3231(){const _0x8ed32=['301944wbGXba','load','13478619xCxDsH','nickname','log','未知用户','63469hHshiS','116335pEJooO','950seElDE','458446LQsGnf','2661jTUyfp','parse','enableJsonFlag','aliases','logout','66paVZDE','36KTTybX','description','run','20oPCobQ','clear','当前未登录','jsonEnabled','4542940tRENKZ','user_info'];a1_0x3231=function(){return _0x8ed32;};return a1_0x3231();}export default class AuthLogout extends a1_0x3eb094{static [a1_0x1a0005(0xb6)]='登出当前\x20WPS\x20账号';static [a1_0x1a0005(0xb2)]=[a1_0x1a0005(0xb3)];static [a1_0x1a0005(0xb1)]=!![];async[a1_0x1a0005(0xb7)](){const _0xc78087=a1_0x1a0005;await this[_0xc78087(0xb0)](AuthLogout);const _0x438d93=configManager[_0xc78087(0xa6)]();if(!_0x438d93['wps_sid'])return!this[_0xc78087(0xa2)]()&&this[_0xc78087(0xa9)](_0xc78087(0xa1)),{'loggedOut':![],'nickname':null};const _0x3e85f7=_0x438d93[_0xc78087(0xa4)]?.[_0xc78087(0xa8)]??_0xc78087(0xaa);return configManager[_0xc78087(0xa0)](),!this[_0xc78087(0xa2)]()&&this['log']('已登出:\x20'+_0x3e85f7),{'loggedOut':!![],'nickname':_0x3e85f7};}}
@@ -1 +1 @@
1
- function a2_0xdaf4(){const _0x152fb8=['2769402FVAXYa','5lDswYk','jsonEnabled','requireAuth','7ApldCZ','load','user_id','email','邮箱:\x20','1594480KFpEsL','run','log','已登录,但无缓存的用户信息。请重新执行\x20comate-cli\x20auth\x20login。','905191bTvftq','10009936fYrwtQ','error','nickname','description','195070qqMpXM','547908LZQrQX','aliases','603RYguhv','显示当前登录用户信息','用户:\x20','3486252dhBaSl','enableJsonFlag','whoami'];a2_0xdaf4=function(){return _0x152fb8;};return a2_0xdaf4();}const a2_0xc8e67b=a2_0x481a;(function(_0x1625e,_0x407dd1){const _0x1fd03a=a2_0x481a,_0x1611b5=_0x1625e();while(!![]){try{const _0x4927f3=-parseInt(_0x1fd03a(0x12a))/0x1+-parseInt(_0x1fd03a(0x126))/0x2+-parseInt(_0x1fd03a(0x11d))/0x3+parseInt(_0x1fd03a(0x115))/0x4*(parseInt(_0x1fd03a(0x11e))/0x5)+parseInt(_0x1fd03a(0x11a))/0x6+-parseInt(_0x1fd03a(0x121))/0x7*(-parseInt(_0x1fd03a(0x12b))/0x8)+parseInt(_0x1fd03a(0x117))/0x9*(parseInt(_0x1fd03a(0x114))/0xa);if(_0x4927f3===_0x407dd1)break;else _0x1611b5['push'](_0x1611b5['shift']());}catch(_0x35a520){_0x1611b5['push'](_0x1611b5['shift']());}}}(a2_0xdaf4,0x9eda9));import a2_0x4d7c21 from'../../lib/extends/command.js';function a2_0x481a(_0xcd41cc,_0x6ebff7){_0xcd41cc=_0xcd41cc-0x112;const _0xdaf4be=a2_0xdaf4();let _0x481a2e=_0xdaf4be[_0xcd41cc];return _0x481a2e;}import{configManager}from'../../lib/config/manager.js';export default class AuthStatus extends a2_0x4d7c21{static [a2_0xc8e67b(0x113)]=a2_0xc8e67b(0x118);static [a2_0xc8e67b(0x116)]=[a2_0xc8e67b(0x11c)];static [a2_0xc8e67b(0x11b)]=!![];async[a2_0xc8e67b(0x127)](){const _0x195ad5=a2_0xc8e67b;await this['parse'](AuthStatus),await this[_0x195ad5(0x120)]();const _0x547aeb=configManager[_0x195ad5(0x122)](),_0x3c9069=_0x547aeb['user_info'];return!_0x3c9069&&this[_0x195ad5(0x12c)](_0x195ad5(0x129)),!this[_0x195ad5(0x11f)]()&&(this[_0x195ad5(0x128)](_0x195ad5(0x119)+_0x3c9069[_0x195ad5(0x112)]),this[_0x195ad5(0x128)](_0x195ad5(0x125)+_0x3c9069[_0x195ad5(0x124)]),this[_0x195ad5(0x128)]('ID:\x20\x20\x20'+_0x3c9069[_0x195ad5(0x123)])),_0x3c9069;}}
1
+ const a2_0x258487=a2_0xf0a8;function a2_0xf0a8(_0x271bde,_0x50010e){_0x271bde=_0x271bde-0x1d0;const _0x284c47=a2_0x284c();let _0xf0a84c=_0x284c47[_0x271bde];return _0xf0a84c;}(function(_0x8d23ae,_0x29e33c){const _0x3214a1=a2_0xf0a8,_0x58055b=_0x8d23ae();while(!![]){try{const _0x208af8=-parseInt(_0x3214a1(0x1e2))/0x1*(parseInt(_0x3214a1(0x1dd))/0x2)+parseInt(_0x3214a1(0x1e5))/0x3*(-parseInt(_0x3214a1(0x1e8))/0x4)+parseInt(_0x3214a1(0x1e4))/0x5*(parseInt(_0x3214a1(0x1e1))/0x6)+-parseInt(_0x3214a1(0x1d3))/0x7+-parseInt(_0x3214a1(0x1db))/0x8+parseInt(_0x3214a1(0x1d9))/0x9*(-parseInt(_0x3214a1(0x1d2))/0xa)+parseInt(_0x3214a1(0x1d1))/0xb;if(_0x208af8===_0x29e33c)break;else _0x58055b['push'](_0x58055b['shift']());}catch(_0x1c5b2d){_0x58055b['push'](_0x58055b['shift']());}}}(a2_0x284c,0xb0564));function a2_0x284c(){const _0x132742=['9djADbl','显示当前登录用户信息','9129320iFRvNV','user_info','1066262HnnClT','parse','log','load','48NrJbYg','2CUCnrP','nickname','355970uQuWdF','2259288akrxAV','aliases','description','4eIzInM','用户:\x20','57455816drsIDy','7515280TxAquP','9509367rxnxlQ','email','已登录,但无缓存的用户信息。请重新执行\x20npx\x20--yes\x20@wps365-open/comate-cli@latest\x20auth\x20login。','邮箱:\x20','whoami','user_id'];a2_0x284c=function(){return _0x132742;};return a2_0x284c();}import a2_0x323d1d from'../../lib/extends/command.js';import{configManager}from'../../lib/config/manager.js';export default class AuthStatus extends a2_0x323d1d{static [a2_0x258487(0x1e7)]=a2_0x258487(0x1da);static [a2_0x258487(0x1e6)]=[a2_0x258487(0x1d7)];static ['enableJsonFlag']=!![];async['run'](){const _0x82cb19=a2_0x258487;await this[_0x82cb19(0x1de)](AuthStatus),await this['requireAuth']();const _0x53457f=configManager[_0x82cb19(0x1e0)](),_0x59851e=_0x53457f[_0x82cb19(0x1dc)];return!_0x59851e&&this['error'](_0x82cb19(0x1d5)),!this['jsonEnabled']()&&(this[_0x82cb19(0x1df)](_0x82cb19(0x1d0)+_0x59851e[_0x82cb19(0x1e3)]),this['log'](_0x82cb19(0x1d6)+_0x59851e[_0x82cb19(0x1d4)]),this[_0x82cb19(0x1df)]('ID:\x20\x20\x20'+_0x59851e[_0x82cb19(0x1d8)])),_0x59851e;}}
@@ -1 +1 @@
1
- const a3_0x419113=a3_0x159c;function a3_0x50d7(){const _0x331184=['415330AhUKoa','flags','enableJsonFlag','length','createLoading','项目\x20ID(必填)','log','631863nAeQcN','<%=\x20config.bin\x20%>\x20code\x20config\x20--project-id\x20206\x20--set\x20session_id=1388246512-b7aa-...\x20--set\x20task_type=local\x20--json','\x20=\x20','读写项目配置(session_id、task_type\x20等),用于追踪会话上下文','parse','172611OVjEmJ','jsonEnabled','读取成功','\x22,应为\x20key=value','70wyoEsS','integer','1373460XyldgR','4hlYlZz','4IEQmYv','设置配置项(格式:\x20key=value,可多次使用)','正在读取项目配置...','stopLoading','error','899295sJmmkE','--set\x20格式错误:\x20\x22','map','run','readConfigs','233646YqQStv','写入成功','\x20项配置...','set','slice','3555900JogUCd','8WwdljB','requireAuth','writeConfigs','keys','examples','entries','failed'];a3_0x50d7=function(){return _0x331184;};return a3_0x50d7();}(function(_0x3f4b55,_0x33abe7){const _0x57d7c0=a3_0x159c,_0x10d064=_0x3f4b55();while(!![]){try{const _0x35a79d=-parseInt(_0x57d7c0(0x14b))/0x1*(parseInt(_0x57d7c0(0x153))/0x2)+-parseInt(_0x57d7c0(0x158))/0x3*(-parseInt(_0x57d7c0(0x152))/0x4)+parseInt(_0x57d7c0(0x16a))/0x5+-parseInt(_0x57d7c0(0x15d))/0x6*(parseInt(_0x57d7c0(0x14f))/0x7)+parseInt(_0x57d7c0(0x163))/0x8*(parseInt(_0x57d7c0(0x171))/0x9)+parseInt(_0x57d7c0(0x162))/0xa+parseInt(_0x57d7c0(0x151))/0xb;if(_0x35a79d===_0x33abe7)break;else _0x10d064['push'](_0x10d064['shift']());}catch(_0x1199ea){_0x10d064['push'](_0x10d064['shift']());}}}(a3_0x50d7,0x308c8));function a3_0x159c(_0x52fe,_0x96d0d8){_0x52fe=_0x52fe-0x147;const _0x50d79e=a3_0x50d7();let _0x159cfb=_0x50d79e[_0x52fe];return _0x159cfb;}import{Flags}from'@oclif/core';import a3_0x1f7267 from'../../lib/extends/command.js';import{getProjectConfigs,setProjectConfig}from'../../lib/service/manage.js';function parseSetFlag(_0x3431ee){const _0x53af96=a3_0x159c,_0x4beb9c=_0x3431ee['indexOf']('=');if(_0x4beb9c<=0x0)throw new Error(_0x53af96(0x159)+_0x3431ee+_0x53af96(0x14e));return{'key':_0x3431ee[_0x53af96(0x161)](0x0,_0x4beb9c),'value':_0x3431ee[_0x53af96(0x161)](_0x4beb9c+0x1)};}export default class CodeConfig extends a3_0x1f7267{static ['description']=a3_0x419113(0x149);static [a3_0x419113(0x16c)]=!![];static [a3_0x419113(0x167)]=['<%=\x20config.bin\x20%>\x20code\x20config\x20--project-id\x20206\x20--json','<%=\x20config.bin\x20%>\x20code\x20config\x20--project-id\x20206\x20--set\x20session_id=thread_xxx\x20--set\x20task_type=cloud\x20--json',a3_0x419113(0x147)];static [a3_0x419113(0x16b)]={'project-id':Flags[a3_0x419113(0x150)]({'description':a3_0x419113(0x16f),'required':!![]}),'set':Flags['string']({'description':a3_0x419113(0x154),'multiple':!![]})};async[a3_0x419113(0x15b)](){const _0x17c17a=a3_0x419113;await this[_0x17c17a(0x164)]();const {flags:_0x40b454}=await this[_0x17c17a(0x14a)](CodeConfig),_0x3b0c22=this[_0x17c17a(0x14c)](),_0x8bdbdf=_0x40b454['project-id'];try{if(_0x40b454[_0x17c17a(0x160)]&&_0x40b454['set'][_0x17c17a(0x16d)]>0x0)return await this[_0x17c17a(0x165)](_0x8bdbdf,_0x40b454[_0x17c17a(0x160)],_0x3b0c22);return await this[_0x17c17a(0x15c)](_0x8bdbdf,_0x3b0c22);}catch(_0x1a4a5f){this['stopLoading']();const _0x4237ee=_0x1a4a5f instanceof Error?_0x1a4a5f['message']:String(_0x1a4a5f);if(_0x3b0c22)return{'status':_0x17c17a(0x169),'project_id':_0x8bdbdf,'configs':{},'error':_0x4237ee};this[_0x17c17a(0x157)](_0x4237ee);}}async[a3_0x419113(0x15c)](_0x20504e,_0x1be26a){const _0x26094a=a3_0x419113;if(!_0x1be26a)await this['createLoading'](_0x26094a(0x155));const _0x37e3b9=await getProjectConfigs(_0x20504e);if(!_0x1be26a){this[_0x26094a(0x156)](_0x26094a(0x14d));const _0xd7dcc7=Object[_0x26094a(0x166)](_0x37e3b9);if(_0xd7dcc7[_0x26094a(0x16d)]===0x0)this[_0x26094a(0x170)]('(无配置项)');else for(const [_0x345bc7,_0x543be0]of Object[_0x26094a(0x168)](_0x37e3b9)){this[_0x26094a(0x170)]('\x20\x20'+_0x345bc7+_0x26094a(0x148)+_0x543be0);}}return{'status':'ok','project_id':_0x20504e,'configs':_0x37e3b9};}async[a3_0x419113(0x165)](_0x45c520,_0x151b78,_0x21f6d0){const _0x57649c=a3_0x419113,_0x59a60e=_0x151b78[_0x57649c(0x15a)](parseSetFlag);if(!_0x21f6d0)await this[_0x57649c(0x16e)]('正在写入\x20'+_0x59a60e[_0x57649c(0x16d)]+_0x57649c(0x15f));for(const {key:_0x5c647b,value:_0x2dc693}of _0x59a60e){await setProjectConfig(_0x45c520,_0x5c647b,_0x2dc693);}const _0x141293=await getProjectConfigs(_0x45c520);if(!_0x21f6d0){this[_0x57649c(0x156)](_0x57649c(0x15e));for(const {key:_0x36b7db,value:_0x1c4886}of _0x59a60e){this['log']('\x20\x20'+_0x36b7db+_0x57649c(0x148)+_0x1c4886);}}return{'status':'ok','project_id':_0x45c520,'configs':_0x141293};}}
1
+ function a3_0x169c(_0x4a994b,_0xe6fc1d){_0x4a994b=_0x4a994b-0xb4;const _0x15464d=a3_0x1546();let _0x169c31=_0x15464d[_0x4a994b];return _0x169c31;}const a3_0x721c11=a3_0x169c;function a3_0x1546(){const _0x61cbde=['map','set','keys','1174194HeVfzP','entries','message','failed','项目\x20ID(必填)','(无配置项)','\x20项配置...','读写项目配置(session_id、task_type\x20等),用于追踪会话上下文','16934RdkcUj','enableJsonFlag','636447ThzvrY','requireAuth','233380mBrJVI','slice','error','run','设置配置项(格式:\x20key=value,可多次使用)','正在读取项目配置...','examples','jsonEnabled','--set\x20格式错误:\x20\x22','<%=\x20config.bin\x20%>\x20code\x20config\x20--project-id\x20206\x20--set\x20session_id=1388246512-b7aa-...\x20--set\x20task_type=local\x20--json','writeConfigs','integer','3163363VKsJYb','19tBBBJS','178760jLBwNv','写入成功','3746799XSjKyi','读取成功','88ymKXQH','length','stopLoading','createLoading','8sBaOGN','description','<%=\x20config.bin\x20%>\x20code\x20config\x20--project-id\x20206\x20--json','8DjYCLT','parse','string','log'];a3_0x1546=function(){return _0x61cbde;};return a3_0x1546();}(function(_0x249847,_0x57da7b){const _0x2c10be=a3_0x169c,_0x32e952=_0x249847();while(!![]){try{const _0x37a5d1=-parseInt(_0x2c10be(0xc2))/0x1*(parseInt(_0x2c10be(0xdd))/0x2)+parseInt(_0x2c10be(0xdf))/0x3+parseInt(_0x2c10be(0xce))/0x4*(parseInt(_0x2c10be(0xb5))/0x5)+parseInt(_0x2c10be(0xd5))/0x6+-parseInt(_0x2c10be(0xc1))/0x7*(-parseInt(_0x2c10be(0xcb))/0x8)+-parseInt(_0x2c10be(0xc5))/0x9+parseInt(_0x2c10be(0xc3))/0xa*(-parseInt(_0x2c10be(0xc7))/0xb);if(_0x37a5d1===_0x57da7b)break;else _0x32e952['push'](_0x32e952['shift']());}catch(_0x4a70bb){_0x32e952['push'](_0x32e952['shift']());}}}(a3_0x1546,0x38dd5));import{Flags}from'@oclif/core';import a3_0x408880 from'../../lib/extends/command.js';import{getProjectConfigs,setProjectConfig}from'../../lib/service/manage.js';function parseSetFlag(_0x248ec2){const _0x4fcbbf=a3_0x169c,_0x2028de=_0x248ec2['indexOf']('=');if(_0x2028de<=0x0)throw new Error(_0x4fcbbf(0xbd)+_0x248ec2+'\x22,应为\x20key=value');return{'key':_0x248ec2[_0x4fcbbf(0xb6)](0x0,_0x2028de),'value':_0x248ec2[_0x4fcbbf(0xb6)](_0x2028de+0x1)};}export default class CodeConfig extends a3_0x408880{static [a3_0x721c11(0xcc)]=a3_0x721c11(0xdc);static [a3_0x721c11(0xde)]=!![];static [a3_0x721c11(0xbb)]=[a3_0x721c11(0xcd),'<%=\x20config.bin\x20%>\x20code\x20config\x20--project-id\x20206\x20--set\x20session_id=thread_xxx\x20--set\x20task_type=cloud\x20--json',a3_0x721c11(0xbe)];static ['flags']={'project-id':Flags[a3_0x721c11(0xc0)]({'description':a3_0x721c11(0xd9),'required':!![]}),'set':Flags[a3_0x721c11(0xd0)]({'description':a3_0x721c11(0xb9),'multiple':!![]})};async[a3_0x721c11(0xb8)](){const _0x29e048=a3_0x721c11;await this[_0x29e048(0xb4)]();const {flags:_0x36c189}=await this[_0x29e048(0xcf)](CodeConfig),_0x2023c7=this[_0x29e048(0xbc)](),_0x32a457=_0x36c189['project-id'];try{if(_0x36c189[_0x29e048(0xd3)]&&_0x36c189['set'][_0x29e048(0xc8)]>0x0)return await this[_0x29e048(0xbf)](_0x32a457,_0x36c189['set'],_0x2023c7);return await this['readConfigs'](_0x32a457,_0x2023c7);}catch(_0x58f048){this[_0x29e048(0xc9)]();const _0x501ac6=_0x58f048 instanceof Error?_0x58f048[_0x29e048(0xd7)]:String(_0x58f048);if(_0x2023c7)return{'status':_0x29e048(0xd8),'project_id':_0x32a457,'configs':{},'error':_0x501ac6};this[_0x29e048(0xb7)](_0x501ac6);}}async['readConfigs'](_0x21baf1,_0x1f9ea1){const _0x28d56b=a3_0x721c11;if(!_0x1f9ea1)await this[_0x28d56b(0xca)](_0x28d56b(0xba));const _0x5ae277=await getProjectConfigs(_0x21baf1);if(!_0x1f9ea1){this[_0x28d56b(0xc9)](_0x28d56b(0xc6));const _0x5f48ed=Object[_0x28d56b(0xd4)](_0x5ae277);if(_0x5f48ed[_0x28d56b(0xc8)]===0x0)this['log'](_0x28d56b(0xda));else for(const [_0x2e2b47,_0x3fc47e]of Object[_0x28d56b(0xd6)](_0x5ae277)){this[_0x28d56b(0xd1)]('\x20\x20'+_0x2e2b47+'\x20=\x20'+_0x3fc47e);}}return{'status':'ok','project_id':_0x21baf1,'configs':_0x5ae277};}async['writeConfigs'](_0x197046,_0x3a2689,_0x36e4c9){const _0x243f8f=a3_0x721c11,_0x227ab3=_0x3a2689[_0x243f8f(0xd2)](parseSetFlag);if(!_0x36e4c9)await this[_0x243f8f(0xca)]('正在写入\x20'+_0x227ab3[_0x243f8f(0xc8)]+_0x243f8f(0xdb));for(const {key:_0x5eba80,value:_0x31d9a9}of _0x227ab3){await setProjectConfig(_0x197046,_0x5eba80,_0x31d9a9);}const _0x2a1f86=await getProjectConfigs(_0x197046);if(!_0x36e4c9){this['stopLoading'](_0x243f8f(0xc4));for(const {key:_0x29f427,value:_0x23ef44}of _0x227ab3){this[_0x243f8f(0xd1)]('\x20\x20'+_0x29f427+'\x20=\x20'+_0x23ef44);}}return{'status':'ok','project_id':_0x197046,'configs':_0x2a1f86};}}
@@ -1 +1 @@
1
- const a4_0x271acc=a4_0xf4c6;(function(_0x128bcd,_0x33c653){const _0x3b56b5=a4_0xf4c6,_0x447830=_0x128bcd();while(!![]){try{const _0xb679b=-parseInt(_0x3b56b5(0xf5))/0x1*(parseInt(_0x3b56b5(0xc2))/0x2)+-parseInt(_0x3b56b5(0xe0))/0x3*(-parseInt(_0x3b56b5(0xea))/0x4)+-parseInt(_0x3b56b5(0xe4))/0x5*(-parseInt(_0x3b56b5(0xf4))/0x6)+parseInt(_0x3b56b5(0xec))/0x7*(parseInt(_0x3b56b5(0xe3))/0x8)+parseInt(_0x3b56b5(0xc4))/0x9*(parseInt(_0x3b56b5(0xd2))/0xa)+parseInt(_0x3b56b5(0xe7))/0xb*(-parseInt(_0x3b56b5(0xeb))/0xc)+-parseInt(_0x3b56b5(0xcf))/0xd;if(_0xb679b===_0x33c653)break;else _0x447830['push'](_0x447830['shift']());}catch(_0x7f6d60){_0x447830['push'](_0x447830['shift']());}}}(a4_0x1814,0x4ece3));function a4_0xf4c6(_0x40ae4c,_0x57bb2f){_0x40ae4c=_0x40ae4c-0xbb;const _0x1814fe=a4_0x1814();let _0xf4c607=_0x1814fe[_0x40ae4c];return _0xf4c607;}import{Flags}from'@oclif/core';import a4_0x539997 from'../../lib/extends/command.js';import{createThread}from'../../lib/service/cloud-agent.js';function a4_0x1814(){const _0x39dee6=['now','flags','stopLoading','project-name','length','join','createLoading','42546UpUtev','93673zAuqkY','团队\x20ID(多团队时必填)','inquirer','find','slice','parse','复用已有项目\x20ID(跳过项目创建)','list','description','6ruPxWU','enableJsonFlag','9DcxJcv','项目名称(新建或复用同名项目)','app-buddy','正在关联项目与会话...','requireAuth','jsonEnabled','team-id','项目:\x20','string','project-id','Thread:\x20','9928373kCMwHU','我的团队','正在创建云端会话...','5354780srBWgv','project-','<%=\x20config.bin\x20%>\x20code\x20create\x20--project-name\x20my-app\x20--json','project_name','toString','team_name','<%=\x20config.bin\x20%>\x20code\x20create\x20--project-id\x20206\x20--json','log','resolveTeamId','prompt','\x20(id=','thread_id','message','存在\x20','15621tKmJYo','map','项目就绪:\x20','132656RwJMCz','310tUigcj','agent-id','创建云端\x20Agent\x20会话(自动关联\x20team\x20→\x20project\x20→\x20thread)','524073mEsztQ','resolveProject','关联完成','260AvJMzD','24MKtCqZ','63qnaHEJ'];a4_0x1814=function(){return _0x39dee6;};return a4_0x1814();}import{getMyTeams,createTeam,createProject,listProjects,upsertProjectThread}from'../../lib/service/manage.js';export default class CodeCreate extends a4_0x539997{static [a4_0x271acc(0xc1)]=a4_0x271acc(0xe6);static [a4_0x271acc(0xc3)]=!![];static ['examples']=[a4_0x271acc(0xd4),a4_0x271acc(0xd8),'<%=\x20config.bin\x20%>\x20code\x20create\x20--project-name\x20my-app\x20--team-id\x201\x20--json'];static [a4_0x271acc(0xee)]={'project-name':Flags[a4_0x271acc(0xcc)]({'description':a4_0x271acc(0xc5)}),'project-id':Flags['integer']({'description':a4_0x271acc(0xbf)}),'team-id':Flags['integer']({'description':a4_0x271acc(0xf6)}),'agent-id':Flags[a4_0x271acc(0xcc)]({'description':'云端\x20Agent\x20ID','default':a4_0x271acc(0xc6)})};async['run'](){const _0xc65818=a4_0x271acc;await this[_0xc65818(0xc8)]();const {flags:_0x20bb92}=await this[_0xc65818(0xbe)](CodeCreate),_0x3f0165=this[_0xc65818(0xc9)]();if(!_0x3f0165)await this[_0xc65818(0xf3)]('正在初始化...');try{const {projectId:_0x2bd795,teamId:_0x325a28,projectName:_0x523e22}=await this[_0xc65818(0xe8)](_0x20bb92,_0x3f0165);!_0x3f0165&&(this[_0xc65818(0xef)](_0xc65818(0xe2)+_0x523e22+_0xc65818(0xdc)+_0x2bd795+')'),await this['createLoading'](_0xc65818(0xd1)));const _0x2f498f=await createThread(_0x20bb92[_0xc65818(0xe5)]);return!_0x3f0165&&(this[_0xc65818(0xef)]('会话已创建:\x20'+_0x2f498f[_0xc65818(0xdd)]),await this[_0xc65818(0xf3)](_0xc65818(0xc7))),await upsertProjectThread(_0x2bd795,_0x2f498f[_0xc65818(0xdd)]),this[_0xc65818(0xef)](_0xc65818(0xe9)),!_0x3f0165&&(this[_0xc65818(0xd9)](_0xc65818(0xcb)+_0x523e22),this[_0xc65818(0xd9)](_0xc65818(0xce)+_0x2f498f[_0xc65818(0xdd)])),{'thread_id':_0x2f498f[_0xc65818(0xdd)],'project_id':_0x2bd795,'team_id':_0x325a28,'project_name':_0x523e22,'created_at':_0x2f498f['created_at']};}catch(_0x5ca6d1){this[_0xc65818(0xef)](),this['error'](_0x5ca6d1 instanceof Error?_0x5ca6d1[_0xc65818(0xde)]:String(_0x5ca6d1));}}async['resolveProject'](_0x181fa5,_0x4f23c1){const _0x3dbbf7=a4_0x271acc;if(_0x181fa5[_0x3dbbf7(0xcd)])return{'projectId':_0x181fa5[_0x3dbbf7(0xcd)],'teamId':_0x181fa5[_0x3dbbf7(0xca)]??0x0,'projectName':_0x3dbbf7(0xd3)+_0x181fa5[_0x3dbbf7(0xcd)]};const _0x110f13=await this[_0x3dbbf7(0xda)](_0x181fa5[_0x3dbbf7(0xca)],_0x4f23c1),_0x854d63=_0x181fa5[_0x3dbbf7(0xf0)]??'app-'+Date[_0x3dbbf7(0xed)]()[_0x3dbbf7(0xd6)](0x24)[_0x3dbbf7(0xbd)](-0x6),_0x56d2d9=await listProjects(_0x110f13),_0x5627d5=_0x56d2d9[_0x3dbbf7(0xbc)](_0x39cdc9=>_0x39cdc9[_0x3dbbf7(0xd5)]===_0x854d63);if(_0x5627d5)return{'projectId':_0x5627d5['id'],'teamId':_0x110f13,'projectName':_0x854d63};const _0x44661e=await createProject({'teamId':_0x110f13,'projectName':_0x854d63});return{'projectId':_0x44661e['id'],'teamId':_0x110f13,'projectName':_0x854d63};}async[a4_0x271acc(0xda)](_0x58e3ed,_0xbc1a47){const _0x450e1a=a4_0x271acc;if(_0x58e3ed)return _0x58e3ed;const _0x32fb39=await getMyTeams();if(_0x32fb39['length']===0x0){const _0x30d515=await createTeam(_0x450e1a(0xd0));return _0x30d515['id'];}if(_0x32fb39['length']===0x1)return _0x32fb39[0x0]['id'];if(_0xbc1a47)throw new Error(_0x450e1a(0xdf)+_0x32fb39[_0x450e1a(0xf1)]+'\x20个团队,请通过\x20--team-id\x20指定:\x20'+_0x32fb39[_0x450e1a(0xe1)](_0x412c3c=>_0x412c3c[_0x450e1a(0xd7)]+'('+_0x412c3c['id']+')')[_0x450e1a(0xf2)](',\x20'));const {default:_0x27ecd9}=await import(_0x450e1a(0xbb)),{teamId:_0x3e06e4}=await _0x27ecd9[_0x450e1a(0xdb)]([{'type':_0x450e1a(0xc0),'name':'teamId','message':'请选择团队:','choices':_0x32fb39[_0x450e1a(0xe1)](_0x17658c=>({'name':_0x17658c[_0x450e1a(0xd7)]+'\x20('+_0x17658c['id']+')','value':_0x17658c['id']}))}]);return _0x3e06e4;}}
1
+ const a4_0x8dd97e=a4_0x28f8;function a4_0x28f8(_0x26911d,_0x444b07){_0x26911d=_0x26911d-0x115;const _0xd86390=a4_0xd863();let _0x28f897=_0xd86390[_0x26911d];return _0x28f897;}(function(_0x2f6bd8,_0x5bc708){const _0x54a682=a4_0x28f8,_0x202df6=_0x2f6bd8();while(!![]){try{const _0x40263c=-parseInt(_0x54a682(0x13a))/0x1*(parseInt(_0x54a682(0x129))/0x2)+parseInt(_0x54a682(0x149))/0x3+-parseInt(_0x54a682(0x14c))/0x4*(parseInt(_0x54a682(0x142))/0x5)+parseInt(_0x54a682(0x13b))/0x6+-parseInt(_0x54a682(0x14a))/0x7*(-parseInt(_0x54a682(0x12d))/0x8)+parseInt(_0x54a682(0x137))/0x9*(parseInt(_0x54a682(0x128))/0xa)+parseInt(_0x54a682(0x118))/0xb*(-parseInt(_0x54a682(0x146))/0xc);if(_0x40263c===_0x5bc708)break;else _0x202df6['push'](_0x202df6['shift']());}catch(_0xaa0818){_0x202df6['push'](_0x202df6['shift']());}}}(a4_0xd863,0x43aaf));import{Flags}from'@oclif/core';import a4_0x5cbc03 from'../../lib/extends/command.js';function a4_0xd863(){const _0xbb2a80=['创建云端\x20Agent\x20会话(自动关联\x20team\x20→\x20project\x20→\x20thread)','复用已有项目\x20ID(跳过项目创建)','636VwqEXT','<%=\x20config.bin\x20%>\x20code\x20create\x20--project-name\x20my-app\x20--json','team-id','1554417rUWsrl','2816191FKroDi','thread_id','516jCTKgu','项目:\x20','error','会话已创建:\x20','map','正在初始化...','创建新项目时\x20--project-name\x20为必填项,请提供一个有意义的项目名称','project-','129382sotraV','createLoading','parse','jsonEnabled','integer','log','项目名称(新建或复用同名项目)','length','存在\x20','project-id','requireAuth','正在关联项目与会话...','list','resolveProject','stopLoading','team_name','230agNLjJ','2PqKUhC','find','enableJsonFlag','message','8oYlTbv','团队\x20ID(多团队时必填)','project-name','\x20(id=','\x20个团队,请通过\x20--team-id\x20指定:\x20','examples','description','关联完成','flags','我的团队','173862WDIrch','join','project_name','306679nauUyH','47838IaxJOl','created_at','<%=\x20config.bin\x20%>\x20code\x20create\x20--project-id\x20206\x20--json','teamId','inquirer','项目就绪:\x20','string','6415VamKRP','<%=\x20config.bin\x20%>\x20code\x20create\x20--project-name\x20my-app\x20--team-id\x201\x20--json'];a4_0xd863=function(){return _0xbb2a80;};return a4_0xd863();}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_0x5cbc03{static [a4_0x8dd97e(0x133)]=a4_0x8dd97e(0x144);static [a4_0x8dd97e(0x12b)]=!![];static [a4_0x8dd97e(0x132)]=[a4_0x8dd97e(0x147),a4_0x8dd97e(0x13d),a4_0x8dd97e(0x143)];static [a4_0x8dd97e(0x135)]={'project-name':Flags[a4_0x8dd97e(0x141)]({'description':a4_0x8dd97e(0x11e)}),'project-id':Flags[a4_0x8dd97e(0x11c)]({'description':a4_0x8dd97e(0x145)}),'team-id':Flags[a4_0x8dd97e(0x11c)]({'description':a4_0x8dd97e(0x12e)}),'agent-id':Flags['string']({'description':'云端\x20Agent\x20ID','default':'app-buddy'})};async['run'](){const _0x44b5e1=a4_0x8dd97e;await this[_0x44b5e1(0x122)]();const {flags:_0x228938}=await this[_0x44b5e1(0x11a)](CodeCreate),_0x49c94b=this[_0x44b5e1(0x11b)]();if(!_0x49c94b)await this[_0x44b5e1(0x119)](_0x44b5e1(0x115));try{const {projectId:_0x3a5cbc,teamId:_0x2358dc,projectName:_0x52f19a}=await this[_0x44b5e1(0x125)](_0x228938,_0x49c94b);!_0x49c94b&&(this[_0x44b5e1(0x126)](_0x44b5e1(0x140)+_0x52f19a+_0x44b5e1(0x130)+_0x3a5cbc+')'),await this['createLoading']('正在创建云端会话...'));const _0x5437d6=await createThread(_0x228938['agent-id']);return!_0x49c94b&&(this[_0x44b5e1(0x126)](_0x44b5e1(0x14f)+_0x5437d6[_0x44b5e1(0x14b)]),await this[_0x44b5e1(0x119)](_0x44b5e1(0x123))),await upsertProjectThread(_0x3a5cbc,_0x5437d6[_0x44b5e1(0x14b)]),this['stopLoading'](_0x44b5e1(0x134)),!_0x49c94b&&(this[_0x44b5e1(0x11d)](_0x44b5e1(0x14d)+_0x52f19a),this[_0x44b5e1(0x11d)]('Thread:\x20'+_0x5437d6['thread_id'])),{'thread_id':_0x5437d6['thread_id'],'project_id':_0x3a5cbc,'team_id':_0x2358dc,'project_name':_0x52f19a,'created_at':_0x5437d6[_0x44b5e1(0x13c)]};}catch(_0x1dbf0e){this['stopLoading'](),this[_0x44b5e1(0x14e)](_0x1dbf0e instanceof Error?_0x1dbf0e[_0x44b5e1(0x12c)]:String(_0x1dbf0e));}}async[a4_0x8dd97e(0x125)](_0x107b88,_0x2c74cc){const _0x2928b9=a4_0x8dd97e;if(_0x107b88[_0x2928b9(0x121)])return{'projectId':_0x107b88[_0x2928b9(0x121)],'teamId':_0x107b88[_0x2928b9(0x148)]??0x0,'projectName':_0x2928b9(0x117)+_0x107b88['project-id']};const _0x1fa4ef=await this['resolveTeamId'](_0x107b88[_0x2928b9(0x148)],_0x2c74cc);if(!_0x107b88[_0x2928b9(0x12f)])throw new Error(_0x2928b9(0x116));const _0x459ae4=_0x107b88['project-name'],_0x37289=await listProjects(_0x1fa4ef),_0x43f909=_0x37289[_0x2928b9(0x12a)](_0x4dee21=>_0x4dee21[_0x2928b9(0x139)]===_0x459ae4);if(_0x43f909)return{'projectId':_0x43f909['id'],'teamId':_0x1fa4ef,'projectName':_0x459ae4};const _0x1f5b8d=await createProject({'teamId':_0x1fa4ef,'projectName':_0x459ae4});return{'projectId':_0x1f5b8d['id'],'teamId':_0x1fa4ef,'projectName':_0x459ae4};}async['resolveTeamId'](_0x3ac5ab,_0x418126){const _0x5b8bb6=a4_0x8dd97e;if(_0x3ac5ab)return _0x3ac5ab;const _0x56df46=await getMyTeams();if(_0x56df46['length']===0x0){const _0x35ba1a=await createTeam(_0x5b8bb6(0x136));return _0x35ba1a['id'];}if(_0x56df46[_0x5b8bb6(0x11f)]===0x1)return _0x56df46[0x0]['id'];if(_0x418126)throw new Error(_0x5b8bb6(0x120)+_0x56df46[_0x5b8bb6(0x11f)]+_0x5b8bb6(0x131)+_0x56df46[_0x5b8bb6(0x150)](_0x1259e6=>_0x1259e6[_0x5b8bb6(0x127)]+'('+_0x1259e6['id']+')')[_0x5b8bb6(0x138)](',\x20'));const {default:_0x2315ab}=await import(_0x5b8bb6(0x13f)),{teamId:_0x1a72c4}=await _0x2315ab['prompt']([{'type':_0x5b8bb6(0x124),'name':_0x5b8bb6(0x13e),'message':'请选择团队:','choices':_0x56df46['map'](_0x27570a=>({'name':_0x27570a[_0x5b8bb6(0x127)]+'\x20('+_0x27570a['id']+')','value':_0x27570a['id']}))}]);return _0x1a72c4;}}
@@ -1 +1 @@
1
- const a5_0x22a506=a5_0x3582;(function(_0x1ef6e2,_0x36547b){const _0x42336a=a5_0x3582,_0x2db6bd=_0x1ef6e2();while(!![]){try{const _0x2c150a=parseInt(_0x42336a(0x121))/0x1+parseInt(_0x42336a(0x12e))/0x2+parseInt(_0x42336a(0xf4))/0x3*(parseInt(_0x42336a(0x125))/0x4)+-parseInt(_0x42336a(0xe4))/0x5*(parseInt(_0x42336a(0x134))/0x6)+-parseInt(_0x42336a(0x124))/0x7*(-parseInt(_0x42336a(0x11f))/0x8)+parseInt(_0x42336a(0x133))/0x9*(parseInt(_0x42336a(0xe5))/0xa)+-parseInt(_0x42336a(0xe1))/0xb;if(_0x2c150a===_0x36547b)break;else _0x2db6bd['push'](_0x2db6bd['shift']());}catch(_0x1b78ee){_0x2db6bd['push'](_0x2db6bd['shift']());}}}(a5_0x2d14,0xc6fe4));function a5_0x3582(_0x25611b,_0x36a38f){_0x25611b=_0x25611b-0xe1;const _0x2d1475=a5_0x2d14();let _0x35829f=_0x2d1475[_0x25611b];return _0x35829f;}function a5_0x2d14(){const _0x4062b7=['flags','text','message','spinner','node_modules','team-id','仅支持\x20HTML\x20文件\x20(.html\x20/\x20.htm)','file','<%=\x20config.bin\x20%>\x20code\x20deploy\x20--file\x20./page.html\x20--thread-id\x20thread_xxx\x20--project-id\x20206\x20--json','项目名称(新建项目时使用)','.DS_Store','length','inquirer','parse','colorize','toISOString','now','...)','...','toString','log','slice','<%=\x20config.bin\x20%>\x20code\x20deploy\x20--file\x20./index.html\x20--project-name\x20my-site\x20--json','请选择团队:',',\x20thread=','prompt','endsWith','一键部署本地\x20HTML\x20文件到云端(上传\x20→\x20生成配置\x20→\x20发布)','comate.json','.htm','index.html','正在初始化项目...','description','创建版本\x20','resolveSession','16PLNcPh','项目就绪\x20(project=','1215222Fgnuxn','已有项目\x20ID(省略则自动创建)','map','1688029KZORGq','4gFXZRL','thread-id','本地\x20HTML\x20文件路径','integer','readFileSync','createProjectIfNeeded','enableJsonFlag','resolveTeamId','resolve','300228RorpQe','short_url','.env','\x20个团队,请通过\x20--team-id\x20指定:\x20','正在发布...','9dqjIvn','186hrNxCg','failed','26877884GfeJOB','thread_id','我的团队','13240AQCnLN','12942770yBNbvA','app-buddy','上传完成:\x20','stopLoading','未知错误','<%=\x20config.bin\x20%>\x20code\x20deploy\x20--file\x20./page.html\x20--json','error','部署成功!','project-name','red','team_name','access_url','status','jsonEnabled','step','596103VvHfor','project-id','string','**/*.map','deployed','green','存在\x20','createLoading'];a5_0x2d14=function(){return _0x4062b7;};return a5_0x2d14();}import a5_0x131126 from'node:fs';import a5_0x554a38 from'node:path';import{Flags}from'@oclif/core';import a5_0x698ef2 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_0x698ef2{static [a5_0x22a506(0x11c)]=a5_0x22a506(0x117);static [a5_0x22a506(0x12b)]=!![];static ['examples']=[a5_0x22a506(0xea),a5_0x22a506(0x112),a5_0x22a506(0x104)];static [a5_0x22a506(0xfc)]={'file':Flags[a5_0x22a506(0xf6)]({'char':'f','description':a5_0x22a506(0x127),'required':!![]}),'thread-id':Flags['string']({'description':'已有会话\x20ID(省略则自动创建)'}),'project-id':Flags[a5_0x22a506(0x128)]({'description':a5_0x22a506(0x122)}),'project-name':Flags[a5_0x22a506(0xf6)]({'description':a5_0x22a506(0x105)}),'team-id':Flags['integer']({'description':'团队\x20ID(多团队时必填)'}),'timeout':Flags[a5_0x22a506(0x128)]({'description':'发布超时时间(秒)','default':0x258})};async['run'](){const _0x1aa4b4=a5_0x22a506;await this['requireAuth']();const {flags:_0x1ca5a2}=await this[_0x1aa4b4(0x109)](CodeDeploy),_0x676203=this[_0x1aa4b4(0xf2)](),_0x4cbe97=a5_0x554a38[_0x1aa4b4(0x12d)](_0x1ca5a2[_0x1aa4b4(0x103)]);!a5_0x131126['existsSync'](_0x4cbe97)&&this[_0x1aa4b4(0xeb)]('文件不存在:\x20'+_0x4cbe97);!_0x4cbe97['toLowerCase']()['endsWith']('.html')&&!_0x4cbe97['toLowerCase']()[_0x1aa4b4(0x116)](_0x1aa4b4(0x119))&&this['error'](_0x1aa4b4(0x102));try{const {threadId:_0x322c66,projectId:_0x26bd42}=await this[_0x1aa4b4(0x11e)](_0x1ca5a2,_0x676203);if(!_0x676203)await this[_0x1aa4b4(0xfb)]('正在上传文件到沙箱...');const _0x151b59=a5_0x131126[_0x1aa4b4(0x129)](_0x4cbe97),_0x5bffdb=new Date()[_0x1aa4b4(0x10b)](),_0x1bb62b=JSON['stringify']({'publish':{'base':'.','include':[_0x1aa4b4(0x11a)],'exclude':[],'ignore':[_0x1aa4b4(0x100),'.git',_0x1aa4b4(0x130),'.env.local',_0x1aa4b4(0x106),_0x1aa4b4(0xf7)]},'project':{'id':_0x26bd42,'createdAt':_0x5bffdb,'updatedAt':_0x5bffdb}},null,0x4),_0x56dfaf=[{'name':_0x1aa4b4(0x11a),'content':_0x151b59},{'name':_0x1aa4b4(0x118),'content':_0x1bb62b}];await uploadFiles(_0x322c66,_0x56dfaf);const _0x3257cd=_0x56dfaf['map'](_0x2dcf6e=>_0x2dcf6e['name']);!_0x676203&&this[_0x1aa4b4(0xe8)](_0x1aa4b4(0xe7)+_0x3257cd['join'](',\x20'));const _0x3c9d30='v'+Date[_0x1aa4b4(0x10c)]()[_0x1aa4b4(0x10f)](0x24);if(!_0x676203)await this[_0x1aa4b4(0xfb)](_0x1aa4b4(0x11d)+_0x3c9d30+_0x1aa4b4(0x10e));const _0x383fb5=await createVersion(_0x26bd42,_0x3c9d30);if(!_0x676203)this[_0x1aa4b4(0xe8)]('版本已创建:\x20'+_0x383fb5['id']);if(!_0x676203)await this[_0x1aa4b4(0xfb)](_0x1aa4b4(0x132));const _0x6ec0d1=_0x676203?undefined:_0x3c3634=>{const _0xde93ee=_0x1aa4b4;this[_0xde93ee(0xff)]&&(this[_0xde93ee(0xff)][_0xde93ee(0xfd)]='['+_0x3c3634[_0xde93ee(0xf3)]+']\x20'+_0x3c3634['message']);},_0x37a0c6=await runFullPublish({'threadId':_0x322c66,'projectId':_0x26bd42,'versionId':_0x383fb5['id'],'skipBuild':!![]},_0x6ec0d1,_0x1ca5a2['timeout']*0x3e8);this[_0x1aa4b4(0xe8)]();if(_0x37a0c6[_0x1aa4b4(0xf1)]===_0x1aa4b4(0xf8))return!_0x676203&&(this[_0x1aa4b4(0x110)](this[_0x1aa4b4(0x10a)](_0x1aa4b4(0xec),_0x1aa4b4(0xf9))),this[_0x1aa4b4(0x110)]('运行时地址:\x20'+_0x37a0c6[_0x1aa4b4(0xf0)])),{'status':_0x1aa4b4(0xf8),'thread_id':_0x322c66,'project_id':_0x26bd42,'version_id':_0x383fb5['id'],'access_url':_0x37a0c6[_0x1aa4b4(0xf0)],'short_url':_0x37a0c6[_0x1aa4b4(0x12f)],'uploaded_files':_0x3257cd};const _0xfe69b0=_0x37a0c6['deploy_error']??_0x1aa4b4(0xe9);return!_0x676203&&(this[_0x1aa4b4(0x110)](this['colorize']('部署失败',_0x1aa4b4(0xee))),this['log']('原因:\x20'+_0xfe69b0)),{'status':_0x1aa4b4(0x135),'thread_id':_0x322c66,'project_id':_0x26bd42,'version_id':_0x383fb5['id'],'error':_0xfe69b0,'uploaded_files':_0x3257cd};}catch(_0x4cae58){this[_0x1aa4b4(0xe8)]();const _0x277e2d=_0x4cae58 instanceof Error?_0x4cae58[_0x1aa4b4(0xfe)]:String(_0x4cae58);if(_0x676203)return{'status':_0x1aa4b4(0x135),'thread_id':_0x1ca5a2[_0x1aa4b4(0x126)]??'','project_id':_0x1ca5a2['project-id']??0x0,'version_id':0x0,'error':_0x277e2d};this[_0x1aa4b4(0xeb)](_0x277e2d);}}async[a5_0x22a506(0x11e)](_0x3fb324,_0x2f7eb2){const _0x5ab00a=a5_0x22a506;if(_0x3fb324[_0x5ab00a(0x126)]&&_0x3fb324[_0x5ab00a(0xf5)])return{'threadId':_0x3fb324[_0x5ab00a(0x126)],'projectId':_0x3fb324['project-id']};if(!_0x2f7eb2)await this[_0x5ab00a(0xfb)](_0x5ab00a(0x11b));const _0x24d08b=_0x3fb324[_0x5ab00a(0xf5)]??await this[_0x5ab00a(0x12a)](_0x3fb324,_0x2f7eb2);let _0x1e1334=_0x3fb324[_0x5ab00a(0x126)];if(!_0x1e1334){const _0x58ad51=await createThread(_0x5ab00a(0xe6));_0x1e1334=_0x58ad51[_0x5ab00a(0xe2)],await upsertProjectThread(_0x24d08b,_0x1e1334);}if(!_0x2f7eb2)this[_0x5ab00a(0xe8)](_0x5ab00a(0x120)+_0x24d08b+_0x5ab00a(0x114)+_0x1e1334['slice'](0x0,0xc)+_0x5ab00a(0x10d));return{'threadId':_0x1e1334,'projectId':_0x24d08b};}async['createProjectIfNeeded'](_0x3b5cf3,_0x4e6690){const _0x1d766b=a5_0x22a506,_0x1d165c=await this['resolveTeamId'](_0x3b5cf3[_0x1d766b(0x101)],_0x4e6690),_0xb9681f=_0x3b5cf3[_0x1d766b(0xed)]??'deploy-'+Date[_0x1d766b(0x10c)]()[_0x1d766b(0x10f)](0x24)[_0x1d766b(0x111)](-0x6),_0x40081a=await listProjects(_0x1d165c),_0x2f1653=_0x40081a['find'](_0x562da6=>_0x562da6['project_name']===_0xb9681f);if(_0x2f1653)return _0x2f1653['id'];const _0x2664fb=await createProject({'teamId':_0x1d165c,'projectName':_0xb9681f});return _0x2664fb['id'];}async[a5_0x22a506(0x12c)](_0x2a2eae,_0x4619b6){const _0x6fe14=a5_0x22a506;if(_0x2a2eae)return _0x2a2eae;const _0x43e1b2=await getMyTeams();if(_0x43e1b2[_0x6fe14(0x107)]===0x0){const _0x30c8cc=await createTeam(_0x6fe14(0xe3));return _0x30c8cc['id'];}if(_0x43e1b2[_0x6fe14(0x107)]===0x1)return _0x43e1b2[0x0]['id'];if(_0x4619b6)throw new Error(_0x6fe14(0xfa)+_0x43e1b2[_0x6fe14(0x107)]+_0x6fe14(0x131)+_0x43e1b2[_0x6fe14(0x123)](_0x10ace4=>_0x10ace4[_0x6fe14(0xef)]+'('+_0x10ace4['id']+')')['join'](',\x20'));const {default:_0xee1ac3}=await import(_0x6fe14(0x108)),{teamId:_0x466b7f}=await _0xee1ac3[_0x6fe14(0x115)]([{'type':'list','name':'teamId','message':_0x6fe14(0x113),'choices':_0x43e1b2[_0x6fe14(0x123)](_0x329b30=>({'name':_0x329b30[_0x6fe14(0xef)]+'\x20('+_0x329b30['id']+')','value':_0x329b30['id']}))}]);return _0x466b7f;}}
1
+ const a5_0x481424=a5_0x576d;(function(_0x425be7,_0x578ac0){const _0x54eb28=a5_0x576d,_0x48e1b7=_0x425be7();while(!![]){try{const _0x49467a=-parseInt(_0x54eb28(0x18b))/0x1+-parseInt(_0x54eb28(0x1d5))/0x2+-parseInt(_0x54eb28(0x18e))/0x3+parseInt(_0x54eb28(0x1b6))/0x4+-parseInt(_0x54eb28(0x1b9))/0x5+-parseInt(_0x54eb28(0x1bf))/0x6*(parseInt(_0x54eb28(0x1a1))/0x7)+parseInt(_0x54eb28(0x19d))/0x8*(parseInt(_0x54eb28(0x1c8))/0x9);if(_0x49467a===_0x578ac0)break;else _0x48e1b7['push'](_0x48e1b7['shift']());}catch(_0x5050df){_0x48e1b7['push'](_0x48e1b7['shift']());}}}(a5_0x5890,0x1b3d3));import a5_0x69bbf3 from'node:fs';import a5_0xc936e2 from'node:path';function a5_0x5890(){const _0x910a61=['integer','stopLoading','resolve','log','请选择团队:','运行时地址:\x20','project-name','存在\x20','colorize','.DS_Store','list','35568ixfjgw','deployed','node_modules','423975UmbMYd','正在上传文件到沙箱...','string','red','已有会话\x20ID(省略则自动创建)','text','resolveTeamId','name','.htm','本地\x20HTML\x20文件路径','正在发布...','failed','message','app-buddy','join','8Wzgbul','...','stringify','team_name','2590dzSKwB','deploy_error','inquirer','createProjectIfNeeded','.git','spinner','<%=\x20config.bin\x20%>\x20code\x20deploy\x20--file\x20./page.html\x20--thread-id\x20thread_xxx\x20--project-id\x20206\x20--json','项目就绪\x20(project=','未知错误','length','.html','map','jsonEnabled',',\x20thread=','创建新项目时\x20--project-name\x20为必填项,请提供一个有意义的项目名称','thread-id','slice','flags','enableJsonFlag','file','requireAuth','693368vgdHCy','teamId','...)','373160UBtXOp','toString','**/*.map','project-id','.env.local','team-id','102qpmlMU','toISOString','createLoading','endsWith','toLowerCase','timeout','正在初始化项目...','access_url','<%=\x20config.bin\x20%>\x20code\x20deploy\x20--file\x20./index.html\x20--project-name\x20my-site\x20--json','2088594YWoaWt','原因:\x20','部署失败','版本已创建:\x20','step','status','short_url','仅支持\x20HTML\x20文件\x20(.html\x20/\x20.htm)','上传完成:\x20','文件不存在:\x20','resolveSession','index.html','发布超时时间(秒)','72044sWjTKa','prompt','parse','\x20个团队,请通过\x20--team-id\x20指定:\x20','comate.json','.env','now','error'];a5_0x5890=function(){return _0x910a61;};return a5_0x5890();}import{Flags}from'@oclif/core';import a5_0x25f042 from'../../lib/extends/command.js';function a5_0x576d(_0x440247,_0x31533c){_0x440247=_0x440247-0x181;const _0x5890a0=a5_0x5890();let _0x576d9f=_0x5890a0[_0x440247];return _0x576d9f;}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_0x25f042{static ['description']='一键部署本地\x20HTML\x20文件到云端(上传\x20→\x20生成配置\x20→\x20发布)';static [a5_0x481424(0x1b3)]=!![];static ['examples']=['<%=\x20config.bin\x20%>\x20code\x20deploy\x20--file\x20./page.html\x20--json',a5_0x481424(0x1c7),a5_0x481424(0x1a7)];static [a5_0x481424(0x1b2)]={'file':Flags[a5_0x481424(0x190)]({'char':'f','description':a5_0x481424(0x197),'required':!![]}),'thread-id':Flags[a5_0x481424(0x190)]({'description':a5_0x481424(0x192)}),'project-id':Flags[a5_0x481424(0x1dd)]({'description':'已有项目\x20ID(省略则自动创建)'}),'project-name':Flags[a5_0x481424(0x190)]({'description':'项目名称(新建项目时使用)'}),'team-id':Flags[a5_0x481424(0x1dd)]({'description':'团队\x20ID(多团队时必填)'}),'timeout':Flags[a5_0x481424(0x1dd)]({'description':a5_0x481424(0x1d4),'default':0x258})};async['run'](){const _0x594df9=a5_0x481424;await this[_0x594df9(0x1b5)]();const {flags:_0x245c39}=await this[_0x594df9(0x1d7)](CodeDeploy),_0x4ce9a4=this[_0x594df9(0x1ad)](),_0x451048=a5_0xc936e2[_0x594df9(0x182)](_0x245c39[_0x594df9(0x1b4)]);!a5_0x69bbf3['existsSync'](_0x451048)&&this[_0x594df9(0x1dc)](_0x594df9(0x1d1)+_0x451048);!_0x451048['toLowerCase']()['endsWith'](_0x594df9(0x1ab))&&!_0x451048[_0x594df9(0x1c3)]()[_0x594df9(0x1c2)](_0x594df9(0x196))&&this[_0x594df9(0x1dc)](_0x594df9(0x1cf));try{const {threadId:_0xf34afc,projectId:_0x2604ec}=await this[_0x594df9(0x1d2)](_0x245c39,_0x4ce9a4);if(!_0x4ce9a4)await this[_0x594df9(0x1c1)](_0x594df9(0x18f));const _0x3e1ad4=a5_0x69bbf3['readFileSync'](_0x451048),_0x41aa89=new Date()[_0x594df9(0x1c0)](),_0x4af1ce=JSON[_0x594df9(0x19f)]({'publish':{'base':'.','include':['index.html'],'exclude':[],'ignore':[_0x594df9(0x18d),_0x594df9(0x1a5),_0x594df9(0x1da),_0x594df9(0x1bd),_0x594df9(0x189),_0x594df9(0x1bb)]},'project':{'id':_0x2604ec,'createdAt':_0x41aa89,'updatedAt':_0x41aa89}},null,0x4),_0x195401=[{'name':_0x594df9(0x1d3),'content':_0x3e1ad4},{'name':_0x594df9(0x1d9),'content':_0x4af1ce}];await uploadFiles(_0xf34afc,_0x195401);const _0x190173=_0x195401['map'](_0x303d24=>_0x303d24[_0x594df9(0x195)]);!_0x4ce9a4&&this[_0x594df9(0x181)](_0x594df9(0x1d0)+_0x190173['join'](',\x20'));const _0x2390a3='v'+Date[_0x594df9(0x1db)]()[_0x594df9(0x1ba)](0x24);if(!_0x4ce9a4)await this['createLoading']('创建版本\x20'+_0x2390a3+_0x594df9(0x19e));const _0x2c72c6=await createVersion(_0x2604ec,_0x2390a3);if(!_0x4ce9a4)this['stopLoading'](_0x594df9(0x1cb)+_0x2c72c6['id']);if(!_0x4ce9a4)await this['createLoading'](_0x594df9(0x198));const _0x503ea5=_0x4ce9a4?undefined:_0x348c02=>{const _0x48c792=_0x594df9;this[_0x48c792(0x1a6)]&&(this[_0x48c792(0x1a6)][_0x48c792(0x193)]='['+_0x348c02[_0x48c792(0x1cc)]+']\x20'+_0x348c02['message']);},_0x2e14d4=await runFullPublish({'threadId':_0xf34afc,'projectId':_0x2604ec,'versionId':_0x2c72c6['id'],'skipBuild':!![]},_0x503ea5,_0x245c39[_0x594df9(0x1c4)]*0x3e8);this['stopLoading']();if(_0x2e14d4[_0x594df9(0x1cd)]==='deployed')return!_0x4ce9a4&&(this[_0x594df9(0x183)](this[_0x594df9(0x188)]('部署成功!','green')),this[_0x594df9(0x183)](_0x594df9(0x185)+_0x2e14d4[_0x594df9(0x1c6)])),{'status':_0x594df9(0x18c),'thread_id':_0xf34afc,'project_id':_0x2604ec,'version_id':_0x2c72c6['id'],'access_url':_0x2e14d4[_0x594df9(0x1c6)],'short_url':_0x2e14d4[_0x594df9(0x1ce)],'uploaded_files':_0x190173};const _0x43d502=_0x2e14d4[_0x594df9(0x1a2)]??_0x594df9(0x1a9);return!_0x4ce9a4&&(this[_0x594df9(0x183)](this['colorize'](_0x594df9(0x1ca),_0x594df9(0x191))),this[_0x594df9(0x183)](_0x594df9(0x1c9)+_0x43d502)),{'status':_0x594df9(0x199),'thread_id':_0xf34afc,'project_id':_0x2604ec,'version_id':_0x2c72c6['id'],'error':_0x43d502,'uploaded_files':_0x190173};}catch(_0x513dd2){this[_0x594df9(0x181)]();const _0x541550=_0x513dd2 instanceof Error?_0x513dd2[_0x594df9(0x19a)]:String(_0x513dd2);if(_0x4ce9a4)return{'status':_0x594df9(0x199),'thread_id':_0x245c39['thread-id']??'','project_id':_0x245c39[_0x594df9(0x1bc)]??0x0,'version_id':0x0,'error':_0x541550};this[_0x594df9(0x1dc)](_0x541550);}}async[a5_0x481424(0x1d2)](_0x3d4854,_0x6e4626){const _0x1acba1=a5_0x481424;if(_0x3d4854['thread-id']&&_0x3d4854[_0x1acba1(0x1bc)])return{'threadId':_0x3d4854['thread-id'],'projectId':_0x3d4854[_0x1acba1(0x1bc)]};if(!_0x6e4626)await this[_0x1acba1(0x1c1)](_0x1acba1(0x1c5));const _0x212b2d=_0x3d4854[_0x1acba1(0x1bc)]??await this[_0x1acba1(0x1a4)](_0x3d4854,_0x6e4626);let _0x31f69a=_0x3d4854[_0x1acba1(0x1b0)];if(!_0x31f69a){const _0x525cc3=await createThread(_0x1acba1(0x19b));_0x31f69a=_0x525cc3['thread_id'],await upsertProjectThread(_0x212b2d,_0x31f69a);}if(!_0x6e4626)this[_0x1acba1(0x181)](_0x1acba1(0x1a8)+_0x212b2d+_0x1acba1(0x1ae)+_0x31f69a[_0x1acba1(0x1b1)](0x0,0xc)+_0x1acba1(0x1b8));return{'threadId':_0x31f69a,'projectId':_0x212b2d};}async['createProjectIfNeeded'](_0x13c957,_0x278070){const _0x4a373a=a5_0x481424,_0x57b533=await this[_0x4a373a(0x194)](_0x13c957[_0x4a373a(0x1be)],_0x278070);if(!_0x13c957[_0x4a373a(0x186)])throw new Error(_0x4a373a(0x1af));const _0x5509e2=_0x13c957[_0x4a373a(0x186)],_0x294837=await listProjects(_0x57b533),_0x164d2d=_0x294837['find'](_0x50d245=>_0x50d245['project_name']===_0x5509e2);if(_0x164d2d)return _0x164d2d['id'];const _0x16b55a=await createProject({'teamId':_0x57b533,'projectName':_0x5509e2});return _0x16b55a['id'];}async[a5_0x481424(0x194)](_0x419cdc,_0x1e5dcf){const _0x326db5=a5_0x481424;if(_0x419cdc)return _0x419cdc;const _0x1551e6=await getMyTeams();if(_0x1551e6[_0x326db5(0x1aa)]===0x0){const _0x4c48e9=await createTeam('我的团队');return _0x4c48e9['id'];}if(_0x1551e6[_0x326db5(0x1aa)]===0x1)return _0x1551e6[0x0]['id'];if(_0x1e5dcf)throw new Error(_0x326db5(0x187)+_0x1551e6[_0x326db5(0x1aa)]+_0x326db5(0x1d8)+_0x1551e6[_0x326db5(0x1ac)](_0x2d7013=>_0x2d7013[_0x326db5(0x1a0)]+'('+_0x2d7013['id']+')')[_0x326db5(0x19c)](',\x20'));const {default:_0x10fc2f}=await import(_0x326db5(0x1a3)),{teamId:_0x1676f2}=await _0x10fc2f[_0x326db5(0x1d6)]([{'type':_0x326db5(0x18a),'name':_0x326db5(0x1b7),'message':_0x326db5(0x184),'choices':_0x1551e6['map'](_0x1c5567=>({'name':_0x1c5567[_0x326db5(0x1a0)]+'\x20('+_0x1c5567['id']+')','value':_0x1c5567['id']}))}]);return _0x1676f2;}}
@@ -1 +1 @@
1
- const a6_0x397a00=a6_0x1c17;(function(_0x124906,_0x57bc06){const _0xc93ca8=a6_0x1c17,_0x2d9381=_0x124906();while(!![]){try{const _0x10ee60=-parseInt(_0xc93ca8(0xe6))/0x1+parseInt(_0xc93ca8(0xd2))/0x2*(parseInt(_0xc93ca8(0xdd))/0x3)+-parseInt(_0xc93ca8(0xfb))/0x4*(parseInt(_0xc93ca8(0x103))/0x5)+parseInt(_0xc93ca8(0xcf))/0x6*(-parseInt(_0xc93ca8(0xd0))/0x7)+-parseInt(_0xc93ca8(0xe4))/0x8+parseInt(_0xc93ca8(0xec))/0x9+parseInt(_0xc93ca8(0x106))/0xa*(parseInt(_0xc93ca8(0x10b))/0xb);if(_0x10ee60===_0x57bc06)break;else _0x2d9381['push'](_0x2d9381['shift']());}catch(_0x190ddf){_0x2d9381['push'](_0x2d9381['shift']());}}}(a6_0x328b,0xb137e));import a6_0x464509 from'node:fs';import a6_0x34e9a3 from'node:path';import{execSync}from'node:child_process';function a6_0x328b(){const _0x1d2088=['解压目标目录(默认:\x20./<short_slug>\x20或\x20./download-<project_id>)','version-id','mkdirSync','输出目录:\x20\x20\x20','8535384IWwfCF','<%=\x20config.bin\x20%>\x20code\x20download\x20--project-id\x20477\x20--version-id\x20864\x20--json','447738XJqoAE','shortSlug','isFile','error','resolve','正在解压到\x20','6773130pyivSq','description','isDirectory','正在获取下载地址...','flags','log','应用短链\x20URL(与\x20--project-id\x20+\x20--version-id\x20二选一)','enableJsonFlag','403','pipe','project_id','requireAuth','./download-','createWriteStream','version_id','506896GbsDjC','download_url','parse','项目\x20ID(与\x20--url\x20二选一)','stream','下载地址已获取','companyId','正在查询\x20','30lhkSnZ','examples','下载前端产物仅限项目\x20owner\x20和\x20admin。请确认当前账号是否为项目所有者或管理员。','6040LPKnWx','下载已部署应用的前端构建产物(通过短链或\x20project-id\x20+\x20version-id),解压到本地目录供编辑','.zip','readdirSync','project-id','46266dUbMnV','integer','版本\x20ID(与\x20--url\x20二选一,需配合\x20--project-id)',',版本\x20','win32','unlinkSync','100020sLPyiQ','574XLjvok','请提供\x20--url,或同时提供\x20--project-id\x20和\x20--version-id','2149674vyXeaD','stopLoading','unzip\x20-o\x20\x22','data','下载完成','get','failed','解压完成','jsonEnabled','includes','createLoading','3VauPvJ','...','powershell\x20-NoProfile\x20-Command\x20\x22Expand-Archive\x20-LiteralPath\x20\x27'];a6_0x328b=function(){return _0x1d2088;};return a6_0x328b();}import{pipeline}from'node:stream/promises';import{Flags}from'@oclif/core';import a6_0x3afd17 from'axios';import a6_0x34c38d from'../../lib/extends/command.js';import{lookupDeployment,downloadFrontend}from'../../lib/service/manage.js';function parseShortUrl(_0x5b39fc){const _0x352e47=_0x5b39fc['match'](/\/app\/([^/]+)\/([^/]+)/);if(!_0x352e47)throw new Error('无法解析短链:\x20'+_0x5b39fc+'\x0a'+'短链格式应为:\x20https://o.wpsgo.com/app/<company_id>/<short_slug>/');return{'companyId':_0x352e47[0x1],'shortSlug':_0x352e47[0x2]};}async function downloadFile(_0x257064,_0x269a3d){const _0x51193b=a6_0x1c17,_0x5b2428=await a6_0x3afd17[_0x51193b(0xd7)](_0x257064,{'responseType':_0x51193b(0xff),'timeout':0x1d4c0}),_0x12a7db=a6_0x464509[_0x51193b(0xf9)](_0x269a3d);await pipeline(_0x5b2428[_0x51193b(0xd5)],_0x12a7db);}function extractZip(_0x552a8b,_0x309846){const _0x7d0275=a6_0x1c17;a6_0x464509[_0x7d0275(0xe2)](_0x309846,{'recursive':!![]}),process['platform']===_0x7d0275(0xcd)?execSync(_0x7d0275(0xdf)+_0x552a8b+'\x27\x20-DestinationPath\x20\x27'+_0x309846+'\x27\x20-Force\x22',{'stdio':_0x7d0275(0xf5)}):execSync(_0x7d0275(0xd4)+_0x552a8b+'\x22\x20-d\x20\x22'+_0x309846+'\x22',{'stdio':'pipe'});}function a6_0x1c17(_0x4d4e9c,_0x1f25d9){_0x4d4e9c=_0x4d4e9c-0xcb;const _0x328b31=a6_0x328b();let _0x1c17fc=_0x328b31[_0x4d4e9c];return _0x1c17fc;}function countFiles(_0x4fbfc5){const _0x2682ef=a6_0x1c17;let _0x3bbf7d=0x0;for(const _0x475724 of a6_0x464509[_0x2682ef(0x109)](_0x4fbfc5,{'withFileTypes':!![]})){if(_0x475724[_0x2682ef(0xe8)]())_0x3bbf7d++;else{if(_0x475724[_0x2682ef(0xee)]())_0x3bbf7d+=countFiles(a6_0x34e9a3['join'](_0x4fbfc5,_0x475724['name']));}}return _0x3bbf7d;}export default class CodeDownload extends a6_0x34c38d{static [a6_0x397a00(0xed)]=a6_0x397a00(0x107);static [a6_0x397a00(0xf3)]=!![];static [a6_0x397a00(0x104)]=['<%=\x20config.bin\x20%>\x20code\x20download\x20--url\x20https://o.wpsgo.com/app/41000207/rmFkBq1nbMEO/\x20--json',a6_0x397a00(0xe5),'<%=\x20config.bin\x20%>\x20code\x20download\x20--url\x20https://o.wpsgo.com/app/41000207/rmFkBq1nbMEO/\x20--output-dir\x20./my-app\x20--json'];static [a6_0x397a00(0xf0)]={'url':Flags['string']({'description':a6_0x397a00(0xf2)}),'project-id':Flags[a6_0x397a00(0x10c)]({'description':a6_0x397a00(0xfe)}),'version-id':Flags['integer']({'description':a6_0x397a00(0xcb)}),'output-dir':Flags['string']({'char':'o','description':a6_0x397a00(0xe0)})};async['run'](){const _0x3ad1bd=a6_0x397a00;await this[_0x3ad1bd(0xf7)]();const {flags:_0x2dc663}=await this[_0x3ad1bd(0xfd)](CodeDownload),_0x1985bb=this[_0x3ad1bd(0xda)]();try{let _0x40bf35=_0x2dc663['project-id'],_0x28e278=_0x2dc663[_0x3ad1bd(0xe1)],_0x2fe44b;if(_0x2dc663['url']){const _0x1a2656=parseShortUrl(_0x2dc663['url']);_0x2fe44b=_0x1a2656[_0x3ad1bd(0xe7)];if(!_0x1985bb)await this[_0x3ad1bd(0xdc)](_0x3ad1bd(0x102)+_0x1a2656['companyId']+'/'+_0x1a2656[_0x3ad1bd(0xe7)]+_0x3ad1bd(0xde));const _0x2c8b2b=await lookupDeployment(_0x1a2656[_0x3ad1bd(0x101)],_0x1a2656[_0x3ad1bd(0xe7)]);_0x40bf35=_0x2c8b2b[_0x3ad1bd(0xf6)],_0x28e278=_0x2c8b2b[_0x3ad1bd(0xfa)];if(!_0x1985bb)this[_0x3ad1bd(0xd3)]('找到项目\x20'+_0x40bf35+_0x3ad1bd(0xcc)+_0x28e278);}if(!_0x40bf35||!_0x28e278)throw new Error(_0x3ad1bd(0xd1));if(!_0x1985bb)await this[_0x3ad1bd(0xdc)](_0x3ad1bd(0xef));const _0x2aa9a4=await downloadFrontend(_0x40bf35,_0x28e278);if(!_0x1985bb)this[_0x3ad1bd(0xd3)](_0x3ad1bd(0x100));const _0x291ee0=a6_0x34e9a3[_0x3ad1bd(0xea)](_0x2dc663['output-dir']??(_0x2fe44b?'./'+_0x2fe44b:_0x3ad1bd(0xf8)+_0x40bf35)),_0xd3110e=_0x291ee0+_0x3ad1bd(0x108);if(!_0x1985bb)await this[_0x3ad1bd(0xdc)]('正在下载构建产物...');await downloadFile(_0x2aa9a4[_0x3ad1bd(0xfc)],_0xd3110e);if(!_0x1985bb)this['stopLoading'](_0x3ad1bd(0xd6));if(!_0x1985bb)await this[_0x3ad1bd(0xdc)](_0x3ad1bd(0xeb)+_0x291ee0+_0x3ad1bd(0xde));extractZip(_0xd3110e,_0x291ee0),a6_0x464509[_0x3ad1bd(0xce)](_0xd3110e);const _0x21b0df=countFiles(_0x291ee0);return!_0x1985bb&&(this[_0x3ad1bd(0xd3)](_0x3ad1bd(0xd9)),this[_0x3ad1bd(0xf1)](_0x3ad1bd(0xe3)+_0x291ee0),this[_0x3ad1bd(0xf1)]('文件数量:\x20\x20\x20'+_0x21b0df)),{'status':'ok','project_id':_0x40bf35,'version_id':_0x28e278,'download_url':_0x2aa9a4[_0x3ad1bd(0xfc)],'output_dir':_0x291ee0,'file_count':_0x21b0df};}catch(_0x48745c){this[_0x3ad1bd(0xd3)]();const _0x3921ec=_0x48745c instanceof Error?_0x48745c['message']:String(_0x48745c),_0x3d3009=_0x3921ec['includes'](_0x3ad1bd(0xf4))||_0x3921ec[_0x3ad1bd(0xdb)]('权限');if(_0x1985bb)return{'status':_0x3ad1bd(0xd8),'project_id':_0x2dc663[_0x3ad1bd(0x10a)]??0x0,'version_id':_0x2dc663['version-id']??0x0,'error':_0x3921ec,'hint':_0x3d3009?_0x3ad1bd(0x105):undefined};this[_0x3ad1bd(0xe9)](_0x3921ec);}}}
1
+ const a6_0x56a2e2=a6_0x3c14;(function(_0x4bc0fd,_0x1640be){const _0x321efa=a6_0x3c14,_0x415d5e=_0x4bc0fd();while(!![]){try{const _0x5a2cb6=-parseInt(_0x321efa(0x16d))/0x1*(parseInt(_0x321efa(0x14a))/0x2)+-parseInt(_0x321efa(0x157))/0x3+-parseInt(_0x321efa(0x130))/0x4*(-parseInt(_0x321efa(0x147))/0x5)+-parseInt(_0x321efa(0x142))/0x6*(-parseInt(_0x321efa(0x150))/0x7)+-parseInt(_0x321efa(0x16a))/0x8+-parseInt(_0x321efa(0x14f))/0x9*(-parseInt(_0x321efa(0x145))/0xa)+parseInt(_0x321efa(0x149))/0xb;if(_0x5a2cb6===_0x1640be)break;else _0x415d5e['push'](_0x415d5e['shift']());}catch(_0x1798b1){_0x415d5e['push'](_0x415d5e['shift']());}}}(a6_0x4394,0x399c6));import a6_0x1e3e62 from'node:fs';import a6_0x488f92 from'node:path';import{execSync}from'node:child_process';import{pipeline}from'node:stream/promises';import{Flags}from'@oclif/core';function a6_0x3c14(_0x5d86fc,_0x19cd78){_0x5d86fc=_0x5d86fc-0x127;const _0x439423=a6_0x4394();let _0x3c14e1=_0x439423[_0x5d86fc];return _0x3c14e1;}import a6_0x1f8be7 from'axios';import a6_0x3c4329 from'../../lib/extends/command.js';import{lookupDeployment,downloadFrontend}from'../../lib/service/manage.js';function parseShortUrl(_0x35f9f9){const _0x545f63=a6_0x3c14,_0x3fd282=_0x35f9f9[_0x545f63(0x165)](/\/app\/([^/]+)\/([^/]+)/);if(!_0x3fd282)throw new Error(_0x545f63(0x13a)+_0x35f9f9+'\x0a'+_0x545f63(0x168));return{'companyId':_0x3fd282[0x1],'shortSlug':_0x3fd282[0x2]};}async function downloadFile(_0x4bf78a,_0x5c74d2){const _0x220faf=a6_0x3c14,_0x1c6eea=await a6_0x1f8be7[_0x220faf(0x151)](_0x4bf78a,{'responseType':'stream','timeout':0x1d4c0}),_0x46cbe3=a6_0x1e3e62[_0x220faf(0x15b)](_0x5c74d2);await pipeline(_0x1c6eea[_0x220faf(0x167)],_0x46cbe3);}function extractZip(_0x564907,_0x13a8bc){const _0x55824e=a6_0x3c14;a6_0x1e3e62[_0x55824e(0x129)](_0x13a8bc,{'recursive':!![]}),process[_0x55824e(0x153)]===_0x55824e(0x132)?execSync(_0x55824e(0x141)+_0x564907+_0x55824e(0x154)+_0x13a8bc+_0x55824e(0x13c),{'stdio':_0x55824e(0x15d)}):execSync(_0x55824e(0x169)+_0x564907+'\x22\x20-d\x20\x22'+_0x13a8bc+'\x22',{'stdio':_0x55824e(0x15d)});}function countFiles(_0x2e6675){const _0x34a69b=a6_0x3c14;let _0x1beea7=0x0;for(const _0x1129e2 of a6_0x1e3e62[_0x34a69b(0x152)](_0x2e6675,{'withFileTypes':!![]})){if(_0x1129e2[_0x34a69b(0x14c)]())_0x1beea7++;else{if(_0x1129e2[_0x34a69b(0x12b)]())_0x1beea7+=countFiles(a6_0x488f92[_0x34a69b(0x163)](_0x2e6675,_0x1129e2[_0x34a69b(0x131)]));}}return _0x1beea7;}export default class CodeDownload extends a6_0x3c4329{static ['description']=a6_0x56a2e2(0x148);static [a6_0x56a2e2(0x13b)]=!![];static [a6_0x56a2e2(0x12f)]=[a6_0x56a2e2(0x166),'<%=\x20config.bin\x20%>\x20code\x20download\x20--project-id\x20477\x20--version-id\x20864\x20--json',a6_0x56a2e2(0x13f)];static [a6_0x56a2e2(0x146)]={'url':Flags[a6_0x56a2e2(0x135)]({'description':a6_0x56a2e2(0x12d)}),'project-id':Flags['integer']({'description':'项目\x20ID(与\x20--url\x20二选一)'}),'version-id':Flags[a6_0x56a2e2(0x127)]({'description':a6_0x56a2e2(0x12e)}),'output-dir':Flags['string']({'char':'o','description':a6_0x56a2e2(0x15e)})};async['run'](){const _0x19f1fe=a6_0x56a2e2;await this[_0x19f1fe(0x143)]();const {flags:_0xa4a4c4}=await this['parse'](CodeDownload),_0x2b5aac=this[_0x19f1fe(0x137)]();try{let _0x3f395b=_0xa4a4c4[_0x19f1fe(0x16b)],_0x205a48=_0xa4a4c4[_0x19f1fe(0x12c)],_0x5980ae;if(_0xa4a4c4[_0x19f1fe(0x136)]){const _0x515801=parseShortUrl(_0xa4a4c4['url']);_0x5980ae=_0x515801['shortSlug'];if(!_0x2b5aac)await this[_0x19f1fe(0x128)](_0x19f1fe(0x161)+_0x515801[_0x19f1fe(0x15f)]+'/'+_0x515801[_0x19f1fe(0x144)]+'...');const _0x1218f7=await lookupDeployment(_0x515801[_0x19f1fe(0x15f)],_0x515801[_0x19f1fe(0x144)]);_0x3f395b=_0x1218f7[_0x19f1fe(0x12a)],_0x205a48=_0x1218f7['version_id'];if(!_0x2b5aac)this[_0x19f1fe(0x164)](_0x19f1fe(0x159)+_0x3f395b+_0x19f1fe(0x14d)+_0x205a48);}if(!_0x3f395b||!_0x205a48)throw new Error(_0x19f1fe(0x15c));if(!_0x2b5aac)await this[_0x19f1fe(0x128)]('正在获取下载地址...');const _0x4f7d8a=await downloadFrontend(_0x3f395b,_0x205a48);if(!_0x2b5aac)this[_0x19f1fe(0x164)](_0x19f1fe(0x138));const _0x5dfd55=a6_0x488f92[_0x19f1fe(0x133)](_0xa4a4c4[_0x19f1fe(0x13d)]??(_0x5980ae?'./'+_0x5980ae:_0x19f1fe(0x16c)+_0x3f395b)),_0x157f07=_0x5dfd55+_0x19f1fe(0x162);if(!_0x2b5aac)await this[_0x19f1fe(0x128)]('正在下载构建产物...');await downloadFile(_0x4f7d8a['download_url'],_0x157f07);if(!_0x2b5aac)this['stopLoading']('下载完成');if(!_0x2b5aac)await this[_0x19f1fe(0x128)](_0x19f1fe(0x134)+_0x5dfd55+_0x19f1fe(0x155));extractZip(_0x157f07,_0x5dfd55),a6_0x1e3e62['unlinkSync'](_0x157f07);const _0x3c4042=countFiles(_0x5dfd55);return!_0x2b5aac&&(this[_0x19f1fe(0x164)](_0x19f1fe(0x13e)),this[_0x19f1fe(0x139)](_0x19f1fe(0x16e)+_0x5dfd55),this['log'](_0x19f1fe(0x15a)+_0x3c4042)),{'status':'ok','project_id':_0x3f395b,'version_id':_0x205a48,'download_url':_0x4f7d8a[_0x19f1fe(0x14b)],'output_dir':_0x5dfd55,'file_count':_0x3c4042};}catch(_0x13ced0){this[_0x19f1fe(0x164)]();const _0x39ca40=_0x13ced0 instanceof Error?_0x13ced0[_0x19f1fe(0x156)]:String(_0x13ced0),_0x17b2c3=_0x39ca40[_0x19f1fe(0x158)](_0x19f1fe(0x14e))||_0x39ca40['includes']('权限');if(_0x2b5aac)return{'status':_0x19f1fe(0x160),'project_id':_0xa4a4c4[_0x19f1fe(0x16b)]??0x0,'version_id':_0xa4a4c4[_0x19f1fe(0x12c)]??0x0,'error':_0x39ca40,'hint':_0x17b2c3?_0x19f1fe(0x140):undefined};this['error'](_0x39ca40);}}}function a6_0x4394(){const _0x218aa7=['isDirectory','version-id','应用短链\x20URL(与\x20--project-id\x20+\x20--version-id\x20二选一)','版本\x20ID(与\x20--url\x20二选一,需配合\x20--project-id)','examples','480rzDedi','name','win32','resolve','正在解压到\x20','string','url','jsonEnabled','下载地址已获取','log','无法解析短链:\x20','enableJsonFlag','\x27\x20-Force\x22','output-dir','解压完成','<%=\x20config.bin\x20%>\x20code\x20download\x20--url\x20https://o.wpsgo.com/app/41000207/rmFkBq1nbMEO/\x20--output-dir\x20./my-app\x20--json','下载前端产物仅限项目\x20owner\x20和\x20admin。请确认当前账号是否为项目所有者或管理员。','powershell\x20-NoProfile\x20-Command\x20\x22Expand-Archive\x20-LiteralPath\x20\x27','12ttPaVz','requireAuth','shortSlug','320LDoUDw','flags','14795xUmoLb','下载已部署应用的前端构建产物(通过短链或\x20project-id\x20+\x20version-id),解压到本地目录供编辑','2313432IKYhbY','37654ViuUbd','download_url','isFile',',版本\x20','403','103572xQXEiL','50757IZLlqu','get','readdirSync','platform','\x27\x20-DestinationPath\x20\x27','...','message','805737hXtboe','includes','找到项目\x20','文件数量:\x20\x20\x20','createWriteStream','请提供\x20--url,或同时提供\x20--project-id\x20和\x20--version-id','pipe','解压目标目录(默认:\x20./<short_slug>\x20或\x20./download-<project_id>)','companyId','failed','正在查询\x20','.zip','join','stopLoading','match','<%=\x20config.bin\x20%>\x20code\x20download\x20--url\x20https://o.wpsgo.com/app/41000207/rmFkBq1nbMEO/\x20--json','data','短链格式应为:\x20https://o.wpsgo.com/app/<company_id>/<short_slug>/','unzip\x20-o\x20\x22','235224awzYYj','project-id','./download-','22EuzACK','输出目录:\x20\x20\x20','integer','createLoading','mkdirSync','project_id'];a6_0x4394=function(){return _0x218aa7;};return a6_0x4394();}
@@ -1 +1 @@
1
- const a7_0x2bbd90=a7_0x5b60;(function(_0x4ef95e,_0x2fcbbc){const _0x324196=a7_0x5b60,_0x4f4856=_0x4ef95e();while(!![]){try{const _0x5e4ed7=-parseInt(_0x324196(0x1c4))/0x1+-parseInt(_0x324196(0x1c1))/0x2*(parseInt(_0x324196(0x1cd))/0x3)+-parseInt(_0x324196(0x1af))/0x4*(-parseInt(_0x324196(0x1b1))/0x5)+parseInt(_0x324196(0x1aa))/0x6+parseInt(_0x324196(0x19b))/0x7+parseInt(_0x324196(0x1d8))/0x8*(-parseInt(_0x324196(0x1e0))/0x9)+-parseInt(_0x324196(0x1b5))/0xa*(parseInt(_0x324196(0x1bf))/0xb);if(_0x5e4ed7===_0x2fcbbc)break;else _0x4f4856['push'](_0x4f4856['shift']());}catch(_0x14342c){_0x4f4856['push'](_0x4f4856['shift']());}}}(a7_0x2333,0x1d903));import{Flags}from'@oclif/core';import a7_0x32555f from'axios';import a7_0x52bf3c from'../../lib/extends/command.js';const ALLOWED_HOST=a7_0x2bbd90(0x1b0),ALLOWED_PATH_RE=/^\/app\/(\d+)\/([A-Za-z0-9_-]+)\/?$/;function a7_0x2333(){const _0x29f1cb=[')。可能原因:1)\x20wps_sid\x20已过期,请重新登录;2)\x20当前账号无权访问此企业/应用。','1694847ZxbEzX','协议不允许\x20(','\x20页面内容...','script','提示:\x20','text/html','jsonEnabled','url','colorize','comate-cli','has','请检查网络连接或稍后重试。','description','/app/','pathname','1219926AefHOH','add','stylesheet','slice','filter','246256ckHGhv','o.wpsgo.com','10cjhMHQ','\x20字符','string','内容长度:\x20\x20\x20','378530YkrFaO','https:','),仅允许\x20https','yellow','parse','examples','log','status','静态资源:\x20\x20\x20','message','44YVOJEk','match','1318JoHUdz','应用\x20URL(格式:\x20https://o.wpsgo.com/app/<company_id>/<short_slug>/)','域名不允许\x20(','48751NdzCBq','red','hint','data','entries','https://','get','favicon','exec','942SEHMdX','无效的\x20URL:\x20','hostname','join','应用不存在或已下架\x20(HTTP\x20404)。请确认\x20URL\x20是否正确。','preload','<%=\x20config.bin\x20%>\x20code\x20fetch-html\x20--url\x20https://o.wpsgo.com/app/41000207/6Ne2UkWT3ytn/\x20--json','获取已部署应用的\x20HTML\x20页面内容,分析静态资源(仅允许\x20o.wpsgo.com\x20应用地址)','not_found','),仅允许\x20/app/<company_id>/<short_slug>/','stopLoading','8qwsfoA','请让用户确认是否有权限访问该应用,或尝试重新执行\x20comate-cli\x20auth\x20login\x20后重试。','无权限访问此应用\x20(HTTP\x20','run','获取成功','companyId','reduce','URL:\x20\x20\x20\x20\x20\x20\x20\x20','363510bOEVSN',',避免\x20wps_sid\x20泄露','),仅允许\x20','map','type','no_permission','error','flags','wps_sid=','正在获取\x20'];a7_0x2333=function(){return _0x29f1cb;};return a7_0x2333();}function a7_0x5b60(_0x1e6f64,_0x12b782){_0x1e6f64=_0x1e6f64-0x194;const _0x23338f=a7_0x2333();let _0x5b60d0=_0x23338f[_0x1e6f64];return _0x5b60d0;}function validateAppUrl(_0x26c74e){const _0x5957e6=a7_0x2bbd90;let _0x63687;try{_0x63687=new URL(_0x26c74e);}catch{throw new Error(_0x5957e6(0x1ce)+_0x26c74e);}if(_0x63687['protocol']!==_0x5957e6(0x1b6))throw new Error(_0x5957e6(0x19c)+_0x63687['protocol']+_0x5957e6(0x1b7));if(_0x63687[_0x5957e6(0x1cf)]!==ALLOWED_HOST)throw new Error(_0x5957e6(0x1c3)+_0x63687[_0x5957e6(0x1cf)]+_0x5957e6(0x1e2)+ALLOWED_HOST+_0x5957e6(0x1e1));const _0x173c2d=_0x63687[_0x5957e6(0x1a9)][_0x5957e6(0x1c0)](ALLOWED_PATH_RE);if(!_0x173c2d)throw new Error('路径不合法\x20('+_0x63687[_0x5957e6(0x1a9)]+_0x5957e6(0x1d6));return{'url':_0x5957e6(0x1c9)+ALLOWED_HOST+_0x5957e6(0x1a8)+_0x173c2d[0x1]+'/'+_0x173c2d[0x2]+'/','companyId':_0x173c2d[0x1],'shortSlug':_0x173c2d[0x2]};}function extractResources(_0x280f7e){const _0x10d89f=a7_0x2bbd90,_0x5bfd8e=[],_0x7c6f6e=[{'type':_0x10d89f(0x19e),'re':/<script[^>]+src=["']([^"']+)["']/gi},{'type':_0x10d89f(0x1ac),'re':/<link[^>]+href=["']([^"']+)["'][^>]*rel=["']stylesheet["']/gi},{'type':'stylesheet','re':/<link[^>]*rel=["']stylesheet["'][^>]+href=["']([^"']+)["']/gi},{'type':'image','re':/<img[^>]+src=["']([^"']+)["']/gi},{'type':'favicon','re':/<link[^>]+href=["']([^"']+)["'][^>]*rel=["'](?:icon|shortcut icon)["']/gi},{'type':_0x10d89f(0x1cb),'re':/<link[^>]*rel=["'](?:icon|shortcut icon)["'][^>]+href=["']([^"']+)["']/gi},{'type':_0x10d89f(0x1d2),'re':/<link[^>]+href=["']([^"']+)["'][^>]*rel=["']preload["']/gi},{'type':_0x10d89f(0x1d2),'re':/<link[^>]*rel=["']preload["'][^>]+href=["']([^"']+)["']/gi}];for(const {type:_0x1a5c0e,re:_0x288163}of _0x7c6f6e){let _0x3a3b5a;while((_0x3a3b5a=_0x288163[_0x10d89f(0x1cc)](_0x280f7e))!==null){_0x5bfd8e['push']({'type':_0x1a5c0e,'url':_0x3a3b5a[0x1]});}}const _0x5b83c9=new Set();return _0x5bfd8e[_0x10d89f(0x1ae)](_0x3ed9e1=>{const _0x42a5d4=_0x10d89f,_0x1584e9=_0x3ed9e1['type']+':'+_0x3ed9e1[_0x42a5d4(0x1a2)];if(_0x5b83c9[_0x42a5d4(0x1a5)](_0x1584e9))return![];return _0x5b83c9[_0x42a5d4(0x1ab)](_0x1584e9),!![];});}export default class CodeFetchHtml extends a7_0x52bf3c{static [a7_0x2bbd90(0x1a7)]=a7_0x2bbd90(0x1d4);static ['enableJsonFlag']=!![];static [a7_0x2bbd90(0x1ba)]=[a7_0x2bbd90(0x1d3)];static [a7_0x2bbd90(0x197)]={'url':Flags[a7_0x2bbd90(0x1b3)]({'description':a7_0x2bbd90(0x1c2),'required':!![]})};async[a7_0x2bbd90(0x1db)](){const _0x3986ef=a7_0x2bbd90,{sid:_0x2c70c9}=await this['requireAuth'](),{flags:_0x49fabd}=await this[_0x3986ef(0x1b9)](CodeFetchHtml),_0x3dfa0f=this[_0x3986ef(0x1a1)]();try{const _0xce946e=validateAppUrl(_0x49fabd[_0x3986ef(0x1a2)]);if(!_0x3dfa0f)await this['createLoading'](_0x3986ef(0x199)+_0xce946e[_0x3986ef(0x1dd)]+'/'+_0xce946e['shortSlug']+_0x3986ef(0x19d));const _0x5bc63d=await a7_0x32555f[_0x3986ef(0x1ca)](_0xce946e[_0x3986ef(0x1a2)],{'headers':{'Cookie':_0x3986ef(0x198)+_0x2c70c9,'X-App-Source':_0x3986ef(0x1a4),'Accept':_0x3986ef(0x1a0)},'timeout':0x7530,'maxRedirects':0x5,'validateStatus':()=>!![],'responseType':'text'});if(_0x5bc63d['status']===0x191||_0x5bc63d[_0x3986ef(0x1bc)]===0x193){this[_0x3986ef(0x1d7)]();const _0x57bdf6={'status':_0x3986ef(0x195),'http_status':_0x5bc63d[_0x3986ef(0x1bc)],'error':_0x3986ef(0x1da)+_0x5bc63d[_0x3986ef(0x1bc)]+_0x3986ef(0x19a),'hint':_0x3986ef(0x1d9)};return!_0x3dfa0f&&(this[_0x3986ef(0x1bb)](this[_0x3986ef(0x1a3)](_0x57bdf6['error'],_0x3986ef(0x1c5))),this[_0x3986ef(0x1bb)](_0x3986ef(0x19f)+_0x57bdf6[_0x3986ef(0x1c6)])),_0x57bdf6;}if(_0x5bc63d[_0x3986ef(0x1bc)]===0x194){this[_0x3986ef(0x1d7)]();const _0x4c05c3={'status':_0x3986ef(0x1d5),'http_status':_0x5bc63d[_0x3986ef(0x1bc)],'error':_0x3986ef(0x1d1)};if(!_0x3dfa0f)this[_0x3986ef(0x1bb)](this[_0x3986ef(0x1a3)](_0x4c05c3[_0x3986ef(0x196)],_0x3986ef(0x1b8)));return _0x4c05c3;}if(_0x5bc63d[_0x3986ef(0x1bc)]>=0x190){this['stopLoading']();const _0x57cc60=typeof _0x5bc63d[_0x3986ef(0x1c7)]==='string'?_0x5bc63d[_0x3986ef(0x1c7)][_0x3986ef(0x1ad)](0x0,0x1f4):'';return{'status':_0x3986ef(0x196),'http_status':_0x5bc63d[_0x3986ef(0x1bc)],'error':'请求失败\x20(HTTP\x20'+_0x5bc63d[_0x3986ef(0x1bc)]+'):\x20'+_0x57cc60};}const _0x59701e=typeof _0x5bc63d[_0x3986ef(0x1c7)]===_0x3986ef(0x1b3)?_0x5bc63d['data']:String(_0x5bc63d['data']),_0x299f8c=extractResources(_0x59701e),_0x1df540=Object[_0x3986ef(0x1c8)](_0x299f8c[_0x3986ef(0x1de)]((_0x4584e1,_0x3d9992)=>{const _0x14986a=_0x3986ef;return _0x4584e1[_0x3d9992[_0x14986a(0x194)]]=(_0x4584e1[_0x3d9992['type']]||0x0)+0x1,_0x4584e1;},{}))[_0x3986ef(0x1e3)](([_0x13ae9a,_0x33b7ff])=>_0x13ae9a+':\x20'+_0x33b7ff)[_0x3986ef(0x1d0)](',\x20');if(!_0x3dfa0f){this[_0x3986ef(0x1d7)](_0x3986ef(0x1dc)),this[_0x3986ef(0x1bb)](_0x3986ef(0x1df)+_0xce946e[_0x3986ef(0x1a2)]),this[_0x3986ef(0x1bb)](_0x3986ef(0x1b4)+_0x59701e['length']+_0x3986ef(0x1b2)),this[_0x3986ef(0x1bb)](_0x3986ef(0x1bd)+(_0x1df540||'无'));for(const _0xc73dc9 of _0x299f8c){this[_0x3986ef(0x1bb)]('\x20\x20['+_0xc73dc9[_0x3986ef(0x194)]+']\x20'+_0xc73dc9[_0x3986ef(0x1a2)]);}}return{'status':'ok','http_status':_0x5bc63d[_0x3986ef(0x1bc)],'url':_0xce946e[_0x3986ef(0x1a2)],'html':_0x59701e,'content_length':_0x59701e['length'],'resources':_0x299f8c,'resources_summary':_0x1df540};}catch(_0x9da676){this[_0x3986ef(0x1d7)]();const _0xb4e947=_0x9da676 instanceof Error?_0x9da676[_0x3986ef(0x1be)]:String(_0x9da676);if(_0x3dfa0f)return{'status':_0x3986ef(0x196),'error':_0xb4e947,'hint':_0x3986ef(0x1a6)};this[_0x3986ef(0x196)](_0xb4e947);}}}
1
+ const a7_0x37262a=a7_0x5da1;(function(_0xbd168e,_0x32ce2d){const _0x50e64a=a7_0x5da1,_0x46587a=_0xbd168e();while(!![]){try{const _0x29a63b=-parseInt(_0x50e64a(0x211))/0x1+-parseInt(_0x50e64a(0x225))/0x2+-parseInt(_0x50e64a(0x206))/0x3*(-parseInt(_0x50e64a(0x224))/0x4)+parseInt(_0x50e64a(0x213))/0x5+-parseInt(_0x50e64a(0x218))/0x6*(-parseInt(_0x50e64a(0x221))/0x7)+parseInt(_0x50e64a(0x1f7))/0x8+-parseInt(_0x50e64a(0x219))/0x9;if(_0x29a63b===_0x32ce2d)break;else _0x46587a['push'](_0x46587a['shift']());}catch(_0x52c165){_0x46587a['push'](_0x46587a['shift']());}}}(a7_0x42fb,0x7fddd));function a7_0x42fb(){const _0x55ba26=['entries','error','wps_sid=','data','获取已部署应用的\x20HTML\x20页面内容,分析静态资源(仅允许\x20o.wpsgo.com\x20应用地址)','stylesheet','status','/app/','),仅允许\x20https','favicon','请求失败\x20(HTTP\x20','script','jsonEnabled','5839120xtuOhT','parse','协议不允许\x20(','请让用户确认是否有权限访问该应用,或尝试重新执行\x20npx\x20--yes\x20@wps365-open/comate-cli@latest\x20auth\x20login\x20后重试。','url','companyId','text/html','get','preload','路径不合法\x20(','add','length',')。可能原因:1)\x20wps_sid\x20已过期,请重新登录;2)\x20当前账号无权访问此企业/应用。','enableJsonFlag','exec','3ztvkyq','o.wpsgo.com','请检查网络连接或稍后重试。','无效的\x20URL:\x20','stopLoading','match','):\x20','text','获取成功','image','log','118923SQYEbY','reduce','3549940ihYBgt','yellow','提示:\x20','no_permission','域名不允许\x20(','6PajYsm','11490471qcKiYW','\x20字符','flags','\x20\x20[','message','hostname','),仅允许\x20','<%=\x20config.bin\x20%>\x20code\x20fetch-html\x20--url\x20https://o.wpsgo.com/app/41000207/6Ne2UkWT3ytn/\x20--json','4150783kYbiSr','type','comate-cli','1417988gqbdVi','935922XCnaUD','slice','colorize','pathname','protocol','string','description','red'];a7_0x42fb=function(){return _0x55ba26;};return a7_0x42fb();}function a7_0x5da1(_0x25a983,_0x21b53b){_0x25a983=_0x25a983-0x1e6;const _0x42fbef=a7_0x42fb();let _0x5da157=_0x42fbef[_0x25a983];return _0x5da157;}import{Flags}from'@oclif/core';import a7_0x361f8e from'axios';import a7_0x51fdea from'../../lib/extends/command.js';const ALLOWED_HOST=a7_0x37262a(0x207),ALLOWED_PATH_RE=/^\/app\/(\d+)\/([A-Za-z0-9_-]+)\/?$/;function validateAppUrl(_0x9628cf){const _0x213350=a7_0x37262a;let _0x235f7d;try{_0x235f7d=new URL(_0x9628cf);}catch{throw new Error(_0x213350(0x209)+_0x9628cf);}if(_0x235f7d[_0x213350(0x1e6)]!=='https:')throw new Error(_0x213350(0x1f9)+_0x235f7d['protocol']+_0x213350(0x1f2));if(_0x235f7d['hostname']!==ALLOWED_HOST)throw new Error(_0x213350(0x217)+_0x235f7d[_0x213350(0x21e)]+_0x213350(0x21f)+ALLOWED_HOST+',避免\x20wps_sid\x20泄露');const _0x47ab08=_0x235f7d['pathname'][_0x213350(0x20b)](ALLOWED_PATH_RE);if(!_0x47ab08)throw new Error(_0x213350(0x200)+_0x235f7d[_0x213350(0x228)]+'),仅允许\x20/app/<company_id>/<short_slug>/');return{'url':'https://'+ALLOWED_HOST+_0x213350(0x1f1)+_0x47ab08[0x1]+'/'+_0x47ab08[0x2]+'/','companyId':_0x47ab08[0x1],'shortSlug':_0x47ab08[0x2]};}function extractResources(_0x16a249){const _0x4b590f=a7_0x37262a,_0x4706ef=[],_0x409234=[{'type':_0x4b590f(0x1f5),'re':/<script[^>]+src=["']([^"']+)["']/gi},{'type':_0x4b590f(0x1ef),'re':/<link[^>]+href=["']([^"']+)["'][^>]*rel=["']stylesheet["']/gi},{'type':_0x4b590f(0x1ef),'re':/<link[^>]*rel=["']stylesheet["'][^>]+href=["']([^"']+)["']/gi},{'type':_0x4b590f(0x20f),'re':/<img[^>]+src=["']([^"']+)["']/gi},{'type':'favicon','re':/<link[^>]+href=["']([^"']+)["'][^>]*rel=["'](?:icon|shortcut icon)["']/gi},{'type':_0x4b590f(0x1f3),'re':/<link[^>]*rel=["'](?:icon|shortcut icon)["'][^>]+href=["']([^"']+)["']/gi},{'type':_0x4b590f(0x1ff),'re':/<link[^>]+href=["']([^"']+)["'][^>]*rel=["']preload["']/gi},{'type':_0x4b590f(0x1ff),'re':/<link[^>]*rel=["']preload["'][^>]+href=["']([^"']+)["']/gi}];for(const {type:_0x1deb62,re:_0x2b37e7}of _0x409234){let _0x300684;while((_0x300684=_0x2b37e7[_0x4b590f(0x205)](_0x16a249))!==null){_0x4706ef['push']({'type':_0x1deb62,'url':_0x300684[0x1]});}}const _0x2b8aae=new Set();return _0x4706ef['filter'](_0x2a659c=>{const _0xe12a30=_0x4b590f,_0x4ec6b2=_0x2a659c[_0xe12a30(0x222)]+':'+_0x2a659c[_0xe12a30(0x1fb)];if(_0x2b8aae['has'](_0x4ec6b2))return![];return _0x2b8aae[_0xe12a30(0x201)](_0x4ec6b2),!![];});}export default class CodeFetchHtml extends a7_0x51fdea{static [a7_0x37262a(0x1e8)]=a7_0x37262a(0x1ee);static [a7_0x37262a(0x204)]=!![];static ['examples']=[a7_0x37262a(0x220)];static [a7_0x37262a(0x21b)]={'url':Flags[a7_0x37262a(0x1e7)]({'description':'应用\x20URL(格式:\x20https://o.wpsgo.com/app/<company_id>/<short_slug>/)','required':!![]})};async['run'](){const _0x23c6c5=a7_0x37262a,{sid:_0x145132}=await this['requireAuth'](),{flags:_0x11e1ec}=await this[_0x23c6c5(0x1f8)](CodeFetchHtml),_0x36bbe0=this[_0x23c6c5(0x1f6)]();try{const _0x20c9fe=validateAppUrl(_0x11e1ec[_0x23c6c5(0x1fb)]);if(!_0x36bbe0)await this['createLoading']('正在获取\x20'+_0x20c9fe[_0x23c6c5(0x1fc)]+'/'+_0x20c9fe['shortSlug']+'\x20页面内容...');const _0x5be9e9=await a7_0x361f8e[_0x23c6c5(0x1fe)](_0x20c9fe[_0x23c6c5(0x1fb)],{'headers':{'Cookie':_0x23c6c5(0x1ec)+_0x145132,'X-App-Source':_0x23c6c5(0x223),'Accept':_0x23c6c5(0x1fd)},'timeout':0x7530,'maxRedirects':0x5,'validateStatus':()=>!![],'responseType':_0x23c6c5(0x20d)});if(_0x5be9e9[_0x23c6c5(0x1f0)]===0x191||_0x5be9e9[_0x23c6c5(0x1f0)]===0x193){this[_0x23c6c5(0x20a)]();const _0x390734={'status':_0x23c6c5(0x216),'http_status':_0x5be9e9[_0x23c6c5(0x1f0)],'error':'无权限访问此应用\x20(HTTP\x20'+_0x5be9e9[_0x23c6c5(0x1f0)]+_0x23c6c5(0x203),'hint':_0x23c6c5(0x1fa)};return!_0x36bbe0&&(this['log'](this['colorize'](_0x390734[_0x23c6c5(0x1eb)],_0x23c6c5(0x1e9))),this[_0x23c6c5(0x210)](_0x23c6c5(0x215)+_0x390734['hint'])),_0x390734;}if(_0x5be9e9[_0x23c6c5(0x1f0)]===0x194){this[_0x23c6c5(0x20a)]();const _0x2efaf5={'status':'not_found','http_status':_0x5be9e9[_0x23c6c5(0x1f0)],'error':'应用不存在或已下架\x20(HTTP\x20404)。请确认\x20URL\x20是否正确。'};if(!_0x36bbe0)this[_0x23c6c5(0x210)](this[_0x23c6c5(0x227)](_0x2efaf5[_0x23c6c5(0x1eb)],_0x23c6c5(0x214)));return _0x2efaf5;}if(_0x5be9e9['status']>=0x190){this['stopLoading']();const _0x60b714=typeof _0x5be9e9['data']===_0x23c6c5(0x1e7)?_0x5be9e9[_0x23c6c5(0x1ed)][_0x23c6c5(0x226)](0x0,0x1f4):'';return{'status':_0x23c6c5(0x1eb),'http_status':_0x5be9e9[_0x23c6c5(0x1f0)],'error':_0x23c6c5(0x1f4)+_0x5be9e9[_0x23c6c5(0x1f0)]+_0x23c6c5(0x20c)+_0x60b714};}const _0x3dc2c1=typeof _0x5be9e9[_0x23c6c5(0x1ed)]===_0x23c6c5(0x1e7)?_0x5be9e9[_0x23c6c5(0x1ed)]:String(_0x5be9e9[_0x23c6c5(0x1ed)]),_0x43e34b=extractResources(_0x3dc2c1),_0x15a563=Object[_0x23c6c5(0x1ea)](_0x43e34b[_0x23c6c5(0x212)]((_0x2ba1b9,_0xbdbd8f)=>{const _0x5d7f64=_0x23c6c5;return _0x2ba1b9[_0xbdbd8f['type']]=(_0x2ba1b9[_0xbdbd8f[_0x5d7f64(0x222)]]||0x0)+0x1,_0x2ba1b9;},{}))['map'](([_0x53cd73,_0x249094])=>_0x53cd73+':\x20'+_0x249094)['join'](',\x20');if(!_0x36bbe0){this['stopLoading'](_0x23c6c5(0x20e)),this[_0x23c6c5(0x210)]('URL:\x20\x20\x20\x20\x20\x20\x20\x20'+_0x20c9fe[_0x23c6c5(0x1fb)]),this[_0x23c6c5(0x210)]('内容长度:\x20\x20\x20'+_0x3dc2c1['length']+_0x23c6c5(0x21a)),this[_0x23c6c5(0x210)]('静态资源:\x20\x20\x20'+(_0x15a563||'无'));for(const _0xaa93eb of _0x43e34b){this['log'](_0x23c6c5(0x21c)+_0xaa93eb[_0x23c6c5(0x222)]+']\x20'+_0xaa93eb[_0x23c6c5(0x1fb)]);}}return{'status':'ok','http_status':_0x5be9e9[_0x23c6c5(0x1f0)],'url':_0x20c9fe[_0x23c6c5(0x1fb)],'html':_0x3dc2c1,'content_length':_0x3dc2c1[_0x23c6c5(0x202)],'resources':_0x43e34b,'resources_summary':_0x15a563};}catch(_0x13360f){this[_0x23c6c5(0x20a)]();const _0x169448=_0x13360f instanceof Error?_0x13360f[_0x23c6c5(0x21d)]:String(_0x13360f);if(_0x36bbe0)return{'status':_0x23c6c5(0x1eb),'error':_0x169448,'hint':_0x23c6c5(0x208)};this[_0x23c6c5(0x1eb)](_0x169448);}}}
@@ -1 +1 @@
1
- const a8_0x37d6f3=a8_0x2ec9;function a8_0x2ec9(_0x299b02,_0x2837d8){_0x299b02=_0x299b02-0xc1;const _0x1f9844=a8_0x1f98();let _0x2ec99d=_0x1f9844[_0x299b02];return _0x2ec99d;}(function(_0x59833,_0x40a1f9){const _0x279d51=a8_0x2ec9,_0x46a9da=_0x59833();while(!![]){try{const _0x54b7bc=parseInt(_0x279d51(0xc7))/0x1*(parseInt(_0x279d51(0xda))/0x2)+-parseInt(_0x279d51(0xd7))/0x3*(parseInt(_0x279d51(0xc1))/0x4)+-parseInt(_0x279d51(0xcf))/0x5+parseInt(_0x279d51(0xe6))/0x6+-parseInt(_0x279d51(0xce))/0x7+-parseInt(_0x279d51(0xc9))/0x8*(parseInt(_0x279d51(0xdc))/0x9)+parseInt(_0x279d51(0xe1))/0xa;if(_0x54b7bc===_0x40a1f9)break;else _0x46a9da['push'](_0x46a9da['shift']());}catch(_0x375735){_0x46a9da['push'](_0x46a9da['shift']());}}}(a8_0x1f98,0x9704c));import{Flags}from'@oclif/core';import a8_0x3f5ba1 from'../../lib/extends/command.js';import{getThreadState,downloadFiles}from'../../lib/service/cloud-agent.js';export default class CodeFiles extends a8_0x3f5ba1{static [a8_0x37d6f3(0xc4)]='查看或下载云端\x20Agent\x20会话中的文件';static [a8_0x37d6f3(0xc8)]=!![];static ['examples']=[a8_0x37d6f3(0xd4),a8_0x37d6f3(0xd6)];static ['flags']={'thread-id':Flags[a8_0x37d6f3(0xd1)]({'description':a8_0x37d6f3(0xc6),'required':!![]}),'download':Flags[a8_0x37d6f3(0xd1)]({'description':a8_0x37d6f3(0xca),'multiple':!![]})};async['run'](){const _0x212a18=a8_0x37d6f3;await this[_0x212a18(0xd8)]();const {flags:_0x47f1ee}=await this[_0x212a18(0xe4)](CodeFiles),_0x4007af=this[_0x212a18(0xe0)]();if(_0x47f1ee[_0x212a18(0xdd)]&&_0x47f1ee[_0x212a18(0xdd)][_0x212a18(0xd0)]>0x0)return this['downloadMode'](_0x47f1ee['thread-id'],_0x47f1ee[_0x212a18(0xdd)],_0x4007af);return this[_0x212a18(0xcc)](_0x47f1ee[_0x212a18(0xd2)],_0x4007af);}async['listMode'](_0x3baa20,_0x3cbb9d){const _0x5f39cb=a8_0x37d6f3;!_0x3cbb9d&&await this[_0x5f39cb(0xde)](_0x5f39cb(0xdf));try{const _0x184874=await getThreadState(_0x3baa20),_0x5984f7=_0x184874[_0x5f39cb(0xc5)]?.['files']??{};this['stopLoading'](_0x5f39cb(0xe2));if(!_0x3cbb9d){const _0x41a3a7=Object[_0x5f39cb(0xe5)](_0x5984f7);if(_0x41a3a7[_0x5f39cb(0xd0)]===0x0)this[_0x5f39cb(0xd9)]('(暂无文件)');else{this[_0x5f39cb(0xd9)]('共\x20'+_0x41a3a7[_0x5f39cb(0xd0)]+'\x20个文件:');for(const _0x3ce606 of _0x41a3a7){this['log']('\x20\x20'+_0x3ce606);}}}return{'thread_id':_0x3baa20,'files':_0x5984f7};}catch(_0x38905b){this[_0x5f39cb(0xdb)](),this[_0x5f39cb(0xd3)](_0x38905b instanceof Error?_0x38905b[_0x5f39cb(0xcd)]:String(_0x38905b));}}async[a8_0x37d6f3(0xc3)](_0x5555a2,_0x5ccb3d,_0x37ad9f){const _0x64555e=a8_0x37d6f3;!_0x37ad9f&&await this[_0x64555e(0xde)]('正在下载\x20'+_0x5ccb3d['length']+_0x64555e(0xc2));try{const _0x463e56=await downloadFiles(_0x5555a2,_0x5ccb3d);this[_0x64555e(0xdb)](_0x64555e(0xd5));if(!_0x37ad9f)for(const _0x3eafba of _0x463e56){_0x3eafba[_0x64555e(0xd3)]?this['log']('❌\x20'+_0x3eafba['path']+':\x20'+_0x3eafba[_0x64555e(0xd3)]):this[_0x64555e(0xd9)]('✅\x20'+_0x3eafba[_0x64555e(0xcb)]+'\x20('+(_0x3eafba[_0x64555e(0xe3)]?.[_0x64555e(0xd0)]??0x0)+'\x20bytes)');}return{'thread_id':_0x5555a2,'results':_0x463e56};}catch(_0x539bee){this[_0x64555e(0xdb)](),this['error'](_0x539bee instanceof Error?_0x539bee[_0x64555e(0xcd)]:String(_0x539bee));}}}function a8_0x1f98(){const _0x233dcd=['string','thread-id','error','<%=\x20config.bin\x20%>\x20code\x20files\x20--thread-id\x20thread_xxx\x20--json','下载完成','<%=\x20config.bin\x20%>\x20code\x20files\x20--thread-id\x20thread_xxx\x20--download\x20src/App.tsx\x20--json','240558kjQZES','requireAuth','log','22SmleQg','stopLoading','9NqPDiC','download','createLoading','正在获取文件列表...','jsonEnabled','10544360DeosbH','获取完成','content','parse','keys','3069252DzuKBW','24gfSSkr','\x20个文件...','downloadMode','description','values','会话\x20ID','85754sLonvH','enableJsonFlag','1684472PDMuAA','要下载的文件路径(可指定多个)','path','listMode','message','5632949xVbabY','1971590sJTHVj','length'];a8_0x1f98=function(){return _0x233dcd;};return a8_0x1f98();}
1
+ const a8_0x371e5e=a8_0x3e99;function a8_0x2da1(){const _0xd021aa=['downloadMode','run','keys','download','\x20bytes)','log','(暂无文件)','259mcVfBv','listMode','150456MXzBIE','description','10SpeLGu','\x20个文件:','正在下载\x20','parse','error','thread-id','1948RFkHeJ','会话\x20ID','7530DyYEyS','\x20个文件...','enableJsonFlag','查看或下载云端\x20Agent\x20会话中的文件','要下载的文件路径(可指定多个)','stopLoading','path','values','正在获取文件列表...','748325GjtgjP','761046nwwklX','2350183bTIYFZ','获取完成','length','357381NDRCsx','下载完成','48YPfEMm','jsonEnabled','createLoading','flags','2147758dHwakd'];a8_0x2da1=function(){return _0xd021aa;};return a8_0x2da1();}(function(_0x248fa5,_0x533287){const _0x590626=a8_0x3e99,_0x10cd40=_0x248fa5();while(!![]){try{const _0x148ae3=parseInt(_0x590626(0x184))/0x1+parseInt(_0x590626(0x18e))/0x2+-parseInt(_0x590626(0x1a2))/0x3*(parseInt(_0x590626(0x1a0))/0x4)+-parseInt(_0x590626(0x1ab))/0x5*(-parseInt(_0x590626(0x18a))/0x6)+parseInt(_0x590626(0x196))/0x7*(-parseInt(_0x590626(0x198))/0x8)+-parseInt(_0x590626(0x188))/0x9*(parseInt(_0x590626(0x19a))/0xa)+-parseInt(_0x590626(0x185))/0xb;if(_0x148ae3===_0x533287)break;else _0x10cd40['push'](_0x10cd40['shift']());}catch(_0x440f41){_0x10cd40['push'](_0x10cd40['shift']());}}}(a8_0x2da1,0xd21ee));import{Flags}from'@oclif/core';function a8_0x3e99(_0x13a268,_0x257bf8){_0x13a268=_0x13a268-0x184;const _0x2da16d=a8_0x2da1();let _0x3e996f=_0x2da16d[_0x13a268];return _0x3e996f;}import a8_0x549343 from'../../lib/extends/command.js';import{getThreadState,downloadFiles}from'../../lib/service/cloud-agent.js';export default class CodeFiles extends a8_0x549343{static [a8_0x371e5e(0x199)]=a8_0x371e5e(0x1a5);static [a8_0x371e5e(0x1a4)]=!![];static ['examples']=['<%=\x20config.bin\x20%>\x20code\x20files\x20--thread-id\x20thread_xxx\x20--json','<%=\x20config.bin\x20%>\x20code\x20files\x20--thread-id\x20thread_xxx\x20--download\x20src/App.tsx\x20--json'];static [a8_0x371e5e(0x18d)]={'thread-id':Flags['string']({'description':a8_0x371e5e(0x1a1),'required':!![]}),'download':Flags['string']({'description':a8_0x371e5e(0x1a6),'multiple':!![]})};async[a8_0x371e5e(0x190)](){const _0x2ea70e=a8_0x371e5e;await this['requireAuth']();const {flags:_0x1489a0}=await this[_0x2ea70e(0x19d)](CodeFiles),_0x23b994=this[_0x2ea70e(0x18b)]();if(_0x1489a0[_0x2ea70e(0x192)]&&_0x1489a0[_0x2ea70e(0x192)][_0x2ea70e(0x187)]>0x0)return this[_0x2ea70e(0x18f)](_0x1489a0[_0x2ea70e(0x19f)],_0x1489a0[_0x2ea70e(0x192)],_0x23b994);return this[_0x2ea70e(0x197)](_0x1489a0[_0x2ea70e(0x19f)],_0x23b994);}async['listMode'](_0x290792,_0x105d81){const _0x44ccf6=a8_0x371e5e;!_0x105d81&&await this[_0x44ccf6(0x18c)](_0x44ccf6(0x1aa));try{const _0x1df82d=await getThreadState(_0x290792),_0x3b0223=_0x1df82d[_0x44ccf6(0x1a9)]?.['files']??{};this[_0x44ccf6(0x1a7)](_0x44ccf6(0x186));if(!_0x105d81){const _0x5656ca=Object[_0x44ccf6(0x191)](_0x3b0223);if(_0x5656ca['length']===0x0)this['log'](_0x44ccf6(0x195));else{this[_0x44ccf6(0x194)]('共\x20'+_0x5656ca[_0x44ccf6(0x187)]+_0x44ccf6(0x19b));for(const _0x384250 of _0x5656ca){this[_0x44ccf6(0x194)]('\x20\x20'+_0x384250);}}}return{'thread_id':_0x290792,'files':_0x3b0223};}catch(_0x1cf856){this[_0x44ccf6(0x1a7)](),this[_0x44ccf6(0x19e)](_0x1cf856 instanceof Error?_0x1cf856['message']:String(_0x1cf856));}}async[a8_0x371e5e(0x18f)](_0x33c0db,_0x1ee96b,_0x47b289){const _0x4d5ace=a8_0x371e5e;!_0x47b289&&await this[_0x4d5ace(0x18c)](_0x4d5ace(0x19c)+_0x1ee96b[_0x4d5ace(0x187)]+_0x4d5ace(0x1a3));try{const _0xbbde73=await downloadFiles(_0x33c0db,_0x1ee96b);this[_0x4d5ace(0x1a7)](_0x4d5ace(0x189));if(!_0x47b289)for(const _0x3438e5 of _0xbbde73){_0x3438e5[_0x4d5ace(0x19e)]?this[_0x4d5ace(0x194)]('❌\x20'+_0x3438e5[_0x4d5ace(0x1a8)]+':\x20'+_0x3438e5['error']):this['log']('✅\x20'+_0x3438e5[_0x4d5ace(0x1a8)]+'\x20('+(_0x3438e5['content']?.[_0x4d5ace(0x187)]??0x0)+_0x4d5ace(0x193));}return{'thread_id':_0x33c0db,'results':_0xbbde73};}catch(_0x423456){this['stopLoading'](),this[_0x4d5ace(0x19e)](_0x423456 instanceof Error?_0x423456['message']:String(_0x423456));}}}
@@ -1 +1 @@
1
- function a9_0xe6d5(){const _0x483be5=['238620iFMFWS','(无)','短链标识:\x20\x20\x20','owner_id','版本:\x20\x20\x20\x20\x20\x20\x20','has_app_id','1069390JcQdcZ','error','407477nMfdhE','project_id','publisher_id','...','deployment_id','string','run','enableJsonFlag','发布时间:\x20\x20\x20','企业\x20ID:\x20\x20\x20\x20','所有者\x20ID:\x20\x20','deploy_status','6oNyJON','message','url','published_at','应用短链\x20URL','93954xxoDyW','部署\x20ID:\x20\x20\x20\x20','1835dniIdY','flags','visibility','681703ureTlY','会话\x20ID:\x20\x20\x20\x20','2813992aSsulp','1892mqpPXZ','log','查询成功','version_number','thread_id','company_id','可见性:\x20\x20\x20\x20\x20','jsonEnabled','short_slug','15bhTxXK','examples','18icWtpd','发布者\x20ID:\x20\x20','96NrJCTE','无法解析短链:\x20','短链格式应为:\x20https://o.wpsgo.com/app/<company_id>/<short_slug>/','正在查询\x20','stopLoading'];a9_0xe6d5=function(){return _0x483be5;};return a9_0xe6d5();}const a9_0x5a3657=a9_0x2d4f;(function(_0x2d24e7,_0x402c97){const _0x55e6a9=a9_0x2d4f,_0x4eb404=_0x2d24e7();while(!![]){try{const _0x51f95d=parseInt(_0x55e6a9(0xbc))/0x1+-parseInt(_0x55e6a9(0xa2))/0x2*(parseInt(_0x55e6a9(0xb3))/0x3)+parseInt(_0x55e6a9(0xaa))/0x4*(parseInt(_0x55e6a9(0xa4))/0x5)+parseInt(_0x55e6a9(0x9d))/0x6*(-parseInt(_0x55e6a9(0xc4))/0x7)+parseInt(_0x55e6a9(0xa9))/0x8+parseInt(_0x55e6a9(0xb5))/0x9*(parseInt(_0x55e6a9(0xc2))/0xa)+parseInt(_0x55e6a9(0xa7))/0xb*(-parseInt(_0x55e6a9(0xb7))/0xc);if(_0x51f95d===_0x402c97)break;else _0x4eb404['push'](_0x4eb404['shift']());}catch(_0x1bcf54){_0x4eb404['push'](_0x4eb404['shift']());}}}(a9_0xe6d5,0x2e21e));import{Flags}from'@oclif/core';import a9_0x414955 from'../../lib/extends/command.js';function a9_0x2d4f(_0x32e9c6,_0x2cdf4b){_0x32e9c6=_0x32e9c6-0x99;const _0xe6d5e4=a9_0xe6d5();let _0x2d4f24=_0xe6d5e4[_0x32e9c6];return _0x2d4f24;}import{lookupDeployment,getProjectThread}from'../../lib/service/manage.js';function parseShortUrl(_0x2224ee){const _0x3b7428=a9_0x2d4f,_0x39143a=_0x2224ee['match'](/\/app\/([^/]+)\/([^/]+)/);if(!_0x39143a)throw new Error(_0x3b7428(0xb8)+_0x2224ee+'\x0a'+_0x3b7428(0xb9));return{'companyId':_0x39143a[0x1],'shortSlug':_0x39143a[0x2]};}export default class CodeLookup extends a9_0x414955{static ['description']='通过短链反查项目信息(project_id、thread_id\x20等),用于重新部署';static [a9_0x5a3657(0xcb)]=!![];static [a9_0x5a3657(0xb4)]=['<%=\x20config.bin\x20%>\x20code\x20lookup\x20--url\x20https://o.wpsgo.com/app/41000207/6Ne2UkWT3ytn/\x20--json'];static [a9_0x5a3657(0xa5)]={'url':Flags[a9_0x5a3657(0xc9)]({'description':a9_0x5a3657(0xa1),'required':!![]})};async[a9_0x5a3657(0xca)](){const _0x47ae0c=a9_0x5a3657;await this['requireAuth']();const {flags:_0x267807}=await this['parse'](CodeLookup),_0x109d7d=this[_0x47ae0c(0xb1)](),{companyId:_0x59a0ed,shortSlug:_0x2afd78}=parseShortUrl(_0x267807[_0x47ae0c(0x9f)]);try{if(!_0x109d7d)await this['createLoading'](_0x47ae0c(0xba)+_0x59a0ed+'/'+_0x2afd78+_0x47ae0c(0xc7));const _0x260dee=await lookupDeployment(_0x59a0ed,_0x2afd78);let _0x4428d3=null;try{const _0x10b39d=await getProjectThread(_0x260dee[_0x47ae0c(0xc5)]);_0x4428d3=_0x10b39d[_0x47ae0c(0xae)];}catch{}return!_0x109d7d&&(this['stopLoading'](_0x47ae0c(0xac)),this['log']('项目\x20ID:\x20\x20\x20\x20'+_0x260dee['project_id']),this[_0x47ae0c(0xab)](_0x47ae0c(0xa8)+(_0x4428d3??_0x47ae0c(0xbd))),this[_0x47ae0c(0xab)](_0x47ae0c(0xa3)+_0x260dee['deployment_id']),this[_0x47ae0c(0xab)](_0x47ae0c(0xc0)+_0x260dee[_0x47ae0c(0xad)]+'\x20('+_0x260dee['version_id']+')'),this[_0x47ae0c(0xab)]('部署状态:\x20\x20\x20'+_0x260dee[_0x47ae0c(0x9c)]),this[_0x47ae0c(0xab)](_0x47ae0c(0x9a)+_0x260dee[_0x47ae0c(0xaf)]),this[_0x47ae0c(0xab)](_0x47ae0c(0xbe)+_0x260dee[_0x47ae0c(0xb2)]),this[_0x47ae0c(0xab)](_0x47ae0c(0x9b)+_0x260dee[_0x47ae0c(0xbf)]),this['log'](_0x47ae0c(0xb6)+_0x260dee[_0x47ae0c(0xc6)]),this['log'](_0x47ae0c(0xb0)+_0x260dee[_0x47ae0c(0xa6)]),this[_0x47ae0c(0xab)](_0x47ae0c(0x99)+new Date(_0x260dee[_0x47ae0c(0xa0)]*0x3e8)['toLocaleString']())),{'project_id':_0x260dee[_0x47ae0c(0xc5)],'thread_id':_0x4428d3,'deployment_id':_0x260dee[_0x47ae0c(0xc8)],'version_id':_0x260dee['version_id'],'version_number':_0x260dee[_0x47ae0c(0xad)],'company_id':_0x260dee[_0x47ae0c(0xaf)],'short_slug':_0x260dee[_0x47ae0c(0xb2)],'owner_id':_0x260dee['owner_id'],'publisher_id':_0x260dee['publisher_id'],'deploy_status':_0x260dee['deploy_status'],'visibility':_0x260dee[_0x47ae0c(0xa6)],'has_app_id':_0x260dee[_0x47ae0c(0xc1)],'published_at':_0x260dee[_0x47ae0c(0xa0)]};}catch(_0x5eb521){this[_0x47ae0c(0xbb)]();const _0xfef66f=_0x5eb521 instanceof Error?_0x5eb521[_0x47ae0c(0x9e)]:String(_0x5eb521);if(_0x109d7d)return{'project_id':0x0,'thread_id':null,'deployment_id':'','version_id':0x0,'version_number':'','company_id':_0x59a0ed,'short_slug':_0x2afd78,'owner_id':'','publisher_id':'','deploy_status':_0x47ae0c(0xc3),'visibility':'','has_app_id':![],'published_at':0x0,'error':_0xfef66f};this['error'](_0xfef66f);}}}
1
+ const a9_0x3f047b=a9_0x205d;(function(_0x53544e,_0xe29125){const _0x3d8bcb=a9_0x205d,_0xf4cfc=_0x53544e();while(!![]){try{const _0x46f960=-parseInt(_0x3d8bcb(0x10c))/0x1+parseInt(_0x3d8bcb(0x112))/0x2*(-parseInt(_0x3d8bcb(0xf5))/0x3)+parseInt(_0x3d8bcb(0xfb))/0x4+parseInt(_0x3d8bcb(0x10d))/0x5*(-parseInt(_0x3d8bcb(0x11c))/0x6)+parseInt(_0x3d8bcb(0x116))/0x7*(-parseInt(_0x3d8bcb(0x10b))/0x8)+-parseInt(_0x3d8bcb(0xef))/0x9+-parseInt(_0x3d8bcb(0x10f))/0xa*(-parseInt(_0x3d8bcb(0x11f))/0xb);if(_0x46f960===_0xe29125)break;else _0xf4cfc['push'](_0xf4cfc['shift']());}catch(_0x369998){_0xf4cfc['push'](_0xf4cfc['shift']());}}}(a9_0x4e64,0xc6814));import{Flags}from'@oclif/core';import a9_0x3275ce from'../../lib/extends/command.js';import{lookupDeployment,getProjectThread}from'../../lib/service/manage.js';function parseShortUrl(_0x5139f0){const _0x330c9b=a9_0x205d,_0x4a840d=_0x5139f0['match'](/\/app\/([^/]+)\/([^/]+)/);if(!_0x4a840d)throw new Error(_0x330c9b(0x10a)+_0x5139f0+'\x0a'+_0x330c9b(0x107));return{'companyId':_0x4a840d[0x1],'shortSlug':_0x4a840d[0x2]};}function a9_0x205d(_0x5ab0f6,_0x2af5c1){_0x5ab0f6=_0x5ab0f6-0xeb;const _0x4e6471=a9_0x4e64();let _0x205d37=_0x4e6471[_0x5ab0f6];return _0x205d37;}function a9_0x4e64(){const _0x49fb3b=['147JVvaPh','项目\x20ID:\x20\x20\x20\x20','examples','应用短链\x20URL','thread_id','发布时间:\x20\x20\x20','2429634HiHGjq','enableJsonFlag','正在查询\x20','2790436dgmFHy','publisher_id','deploy_status','所有者\x20ID:\x20\x20','jsonEnabled','768069FMitaR','部署状态:\x20\x20\x20','发布者\x20ID:\x20\x20','通过短链反查项目信息(project_id、thread_id\x20等),用于重新部署','短链标识:\x20\x20\x20','visibility','6SmMxaX','deployment_id','parse','company_id','toLocaleString','部署\x20ID:\x20\x20\x20\x20','1649728NxkMOg','published_at','stopLoading','log','()','error','版本:\x20\x20\x20\x20\x20\x20\x20','flags','short_slug','...','project_id','version_number','短链格式应为:\x20https://o.wpsgo.com/app/<company_id>/<short_slug>/','会话\x20ID:\x20\x20\x20\x20','message','无法解析短链:\x20','505336zNYHUi','939297lWbCpH','5HcbSuA','url','130xgMMGf','version_id','<%=\x20config.bin\x20%>\x20code\x20lookup\x20--url\x20https://o.wpsgo.com/app/41000207/6Ne2UkWT3ytn/\x20--json','141060FPhPIs','createLoading','owner_id','has_app_id'];a9_0x4e64=function(){return _0x49fb3b;};return a9_0x4e64();}export default class CodeLookup extends a9_0x3275ce{static ['description']=a9_0x3f047b(0xf2);static [a9_0x3f047b(0x11d)]=!![];static [a9_0x3f047b(0x118)]=[a9_0x3f047b(0x111)];static [a9_0x3f047b(0x102)]={'url':Flags['string']({'description':a9_0x3f047b(0x119),'required':!![]})};async['run'](){const _0x4f9347=a9_0x3f047b;await this['requireAuth']();const {flags:_0x4016e9}=await this[_0x4f9347(0xf7)](CodeLookup),_0x120cfa=this[_0x4f9347(0xee)](),{companyId:_0x3b252d,shortSlug:_0x5f0588}=parseShortUrl(_0x4016e9[_0x4f9347(0x10e)]);try{if(!_0x120cfa)await this[_0x4f9347(0x113)](_0x4f9347(0x11e)+_0x3b252d+'/'+_0x5f0588+_0x4f9347(0x104));const _0x2cefe7=await lookupDeployment(_0x3b252d,_0x5f0588);let _0x4e1adf=null;try{const _0x5110aa=await getProjectThread(_0x2cefe7[_0x4f9347(0x105)]);_0x4e1adf=_0x5110aa[_0x4f9347(0x11a)];}catch{}return!_0x120cfa&&(this[_0x4f9347(0xfd)]('查询成功'),this['log'](_0x4f9347(0x117)+_0x2cefe7[_0x4f9347(0x105)]),this[_0x4f9347(0xfe)](_0x4f9347(0x108)+(_0x4e1adf??_0x4f9347(0xff))),this[_0x4f9347(0xfe)](_0x4f9347(0xfa)+_0x2cefe7['deployment_id']),this[_0x4f9347(0xfe)](_0x4f9347(0x101)+_0x2cefe7[_0x4f9347(0x106)]+'\x20('+_0x2cefe7[_0x4f9347(0x110)]+')'),this[_0x4f9347(0xfe)](_0x4f9347(0xf0)+_0x2cefe7[_0x4f9347(0xec)]),this['log']('企业\x20ID:\x20\x20\x20\x20'+_0x2cefe7[_0x4f9347(0xf8)]),this[_0x4f9347(0xfe)](_0x4f9347(0xf3)+_0x2cefe7[_0x4f9347(0x103)]),this[_0x4f9347(0xfe)](_0x4f9347(0xed)+_0x2cefe7[_0x4f9347(0x114)]),this['log'](_0x4f9347(0xf1)+_0x2cefe7[_0x4f9347(0xeb)]),this[_0x4f9347(0xfe)]('可见性:\x20\x20\x20\x20\x20'+_0x2cefe7[_0x4f9347(0xf4)]),this[_0x4f9347(0xfe)](_0x4f9347(0x11b)+new Date(_0x2cefe7['published_at']*0x3e8)[_0x4f9347(0xf9)]())),{'project_id':_0x2cefe7[_0x4f9347(0x105)],'thread_id':_0x4e1adf,'deployment_id':_0x2cefe7[_0x4f9347(0xf6)],'version_id':_0x2cefe7[_0x4f9347(0x110)],'version_number':_0x2cefe7[_0x4f9347(0x106)],'company_id':_0x2cefe7[_0x4f9347(0xf8)],'short_slug':_0x2cefe7[_0x4f9347(0x103)],'owner_id':_0x2cefe7[_0x4f9347(0x114)],'publisher_id':_0x2cefe7[_0x4f9347(0xeb)],'deploy_status':_0x2cefe7[_0x4f9347(0xec)],'visibility':_0x2cefe7[_0x4f9347(0xf4)],'has_app_id':_0x2cefe7[_0x4f9347(0x115)],'published_at':_0x2cefe7[_0x4f9347(0xfc)]};}catch(_0x30e1f4){this[_0x4f9347(0xfd)]();const _0x3fcfc2=_0x30e1f4 instanceof Error?_0x30e1f4[_0x4f9347(0x109)]:String(_0x30e1f4);if(_0x120cfa)return{'project_id':0x0,'thread_id':null,'deployment_id':'','version_id':0x0,'version_number':'','company_id':_0x3b252d,'short_slug':_0x5f0588,'owner_id':'','publisher_id':'','deploy_status':_0x4f9347(0x100),'visibility':'','has_app_id':![],'published_at':0x0,'error':_0x3fcfc2};this['error'](_0x3fcfc2);}}}
@@ -1 +1 @@
1
- function a10_0x4e1d(){const _0x263f8c=['build_result','构建日志\x20(最近\x2020\x20条):','resolveVersion','running','error','发布云端项目(构建\x20→\x20部署\x20→\x20返回运行时地址)','自定义构建命令','createLoading','跳过构建,直接发布','252apzHAw','thread-id','...','stopLoading','deployed','now','3876138cvKRRO','372822ABhJcK','发布失败','red','log','step','。请先处理确认后再发布。','deploy_error','spinner','<%=\x20config.bin\x20%>\x20code\x20publish\x20--project-id\x20206\x20--thread-id\x20thread_xxx\x20--json','slice','string','examples','build-command','status','超时时间(秒)','waiting','运行时地址:\x20','description','原因:\x20','<%=\x20config.bin\x20%>\x20code\x20publish\x20--project-id\x20206\x20--thread-id\x20thread_xxx\x20--version\x201.0.0','202807rUvSzM','timeout','project-id','yellow','interrupt','failed','1209440kSeAIC','requireAuth','access_url','创建版本\x20','云端\x20Agent\x20仍在生成代码,请稍后再试。','开始发布...','发布成功!','integer','toString','parse','version','版本已创建:\x20','length','1836873yKZeGp','jsonEnabled','agent_waiting','1527736BCvtXn','boolean','short_url','324785lGEFpb','105zCjefL','会话\x20ID','build_logs','版本号(默认自动生成)'];a10_0x4e1d=function(){return _0x263f8c;};return a10_0x4e1d();}const a10_0x12d4a2=a10_0x25f1;(function(_0x2eba43,_0x4c36b0){const _0x1b288c=a10_0x25f1,_0x37a3b8=_0x2eba43();while(!![]){try{const _0x2cb45f=-parseInt(_0x1b288c(0xa5))/0x1+-parseInt(_0x1b288c(0x90))/0x2+-parseInt(_0x1b288c(0x76))/0x3+parseInt(_0x1b288c(0x79))/0x4+parseInt(_0x1b288c(0x7c))/0x5+-parseInt(_0x1b288c(0x91))/0x6*(parseInt(_0x1b288c(0x7d))/0x7)+-parseInt(_0x1b288c(0x69))/0x8*(-parseInt(_0x1b288c(0x8a))/0x9);if(_0x2cb45f===_0x4c36b0)break;else _0x37a3b8['push'](_0x37a3b8['shift']());}catch(_0xdf8022){_0x37a3b8['push'](_0x37a3b8['shift']());}}}(a10_0x4e1d,0xf2d95));import{Flags}from'@oclif/core';import a10_0x12563e from'../../lib/extends/command.js';import{createVersion}from'../../lib/service/manage.js';function a10_0x25f1(_0x446cef,_0x36d2ba){_0x446cef=_0x446cef-0x65;const _0x4e1d62=a10_0x4e1d();let _0x25f17d=_0x4e1d62[_0x446cef];return _0x25f17d;}import{runFullPublish}from'../../lib/service/cloud-publish.js';import{getProjectContext}from'../../lib/service/project-context.js';export default class CodePublish extends a10_0x12563e{static [a10_0x12d4a2(0xa2)]=a10_0x12d4a2(0x86);static ['enableJsonFlag']=!![];static [a10_0x12d4a2(0x9c)]=[a10_0x12d4a2(0x99),a10_0x12d4a2(0xa4)];static ['flags']={'project-id':Flags['integer']({'description':'项目\x20ID','required':!![]}),'thread-id':Flags[a10_0x12d4a2(0x9b)]({'description':a10_0x12d4a2(0x7e),'required':!![]}),'version':Flags[a10_0x12d4a2(0x9b)]({'description':a10_0x12d4a2(0x80)}),'build-command':Flags[a10_0x12d4a2(0x9b)]({'description':a10_0x12d4a2(0x87)}),'skip-build':Flags[a10_0x12d4a2(0x7a)]({'description':a10_0x12d4a2(0x89),'default':![]}),'timeout':Flags[a10_0x12d4a2(0x70)]({'description':a10_0x12d4a2(0x9f),'default':0x258})};async['run'](){const _0x1db805=a10_0x12d4a2;await this[_0x1db805(0x6a)]();const {flags:_0xf0fd2f}=await this[_0x1db805(0x72)](CodePublish),_0x578265=this[_0x1db805(0x77)](),_0x3ca235=_0xf0fd2f[_0x1db805(0x65)],_0xc79f8=_0xf0fd2f[_0x1db805(0x8b)],_0x47e2e8=_0xf0fd2f[_0x1db805(0xa6)]*0x3e8;try{const _0xeb70b5=await getProjectContext(_0xc79f8,_0x3ca235);if(_0xeb70b5[_0x1db805(0x67)][_0x1db805(0xa0)]){const _0x121a7f=_0xeb70b5[_0x1db805(0x67)][_0x1db805(0xa2)]??'',_0x1d52c5='云端\x20Agent\x20正在等待用户确认:'+_0x121a7f+_0x1db805(0x96);if(_0x578265)return{'status':_0x1db805(0x68),'project_id':_0x3ca235,'version_id':0x0,'error':_0x1d52c5,'reason':_0x1db805(0x78)};this[_0x1db805(0x85)](_0x1d52c5);}if(_0xeb70b5['agent'][_0x1db805(0x84)]){const _0x163042=_0x1db805(0x6d);if(_0x578265)return{'status':_0x1db805(0x68),'project_id':_0x3ca235,'version_id':0x0,'error':_0x163042,'reason':'agent_running'};this[_0x1db805(0x85)](_0x163042);}const _0xadfb51=await this[_0x1db805(0x83)](_0x3ca235,_0xf0fd2f[_0x1db805(0x73)],_0x578265);!_0x578265&&await this[_0x1db805(0x88)](_0x1db805(0x6e));const _0x2b1103=_0x578265?undefined:_0x56cb6f=>{const _0x5db92f=_0x1db805;this[_0x5db92f(0x98)]&&(this[_0x5db92f(0x98)]['text']='['+_0x56cb6f[_0x5db92f(0x95)]+']\x20'+_0x56cb6f['message']);},_0x34e968=await runFullPublish({'threadId':_0xc79f8,'projectId':_0x3ca235,'versionId':_0xadfb51,'buildCommand':_0xf0fd2f[_0x1db805(0x9d)],'skipBuild':_0xf0fd2f['skip-build']},_0x2b1103,_0x47e2e8);this[_0x1db805(0x8d)]();if(_0x34e968[_0x1db805(0x9e)]===_0x1db805(0x8e))return!_0x578265&&(this['log'](this['colorize'](_0x1db805(0x6f),'green')),this[_0x1db805(0x94)](_0x1db805(0xa1)+_0x34e968[_0x1db805(0x6b)])),{'status':_0x1db805(0x8e),'project_id':_0x3ca235,'version_id':_0xadfb51,'access_url':_0x34e968[_0x1db805(0x6b)],'short_url':_0x34e968[_0x1db805(0x7b)]};const _0x60b4c=_0x34e968[_0x1db805(0x97)]??'未知错误';if(!_0x578265){this[_0x1db805(0x94)](this['colorize'](_0x1db805(0x92),_0x1db805(0x93))),this['log'](_0x1db805(0xa3)+_0x60b4c);if(_0x34e968[_0x1db805(0x7f)]?.[_0x1db805(0x75)]){this[_0x1db805(0x94)](this['colorize'](_0x1db805(0x82),_0x1db805(0x66)));for(const _0x2f8edc of _0x34e968['build_logs'][_0x1db805(0x9a)](-0x14)){this[_0x1db805(0x94)]('\x20\x20'+_0x2f8edc);}}}return{'status':_0x1db805(0x68),'project_id':_0x3ca235,'version_id':_0xadfb51,'error':_0x60b4c,'build_logs':_0x34e968[_0x1db805(0x7f)]?.['slice'](-0x1e),'build_result':_0x34e968[_0x1db805(0x81)]};}catch(_0xb4a6a3){this[_0x1db805(0x8d)]();const _0x17840e=_0xb4a6a3 instanceof Error?_0xb4a6a3['message']:String(_0xb4a6a3);if(_0x578265)return{'status':_0x1db805(0x68),'project_id':_0x3ca235,'version_id':0x0,'error':_0x17840e};this[_0x1db805(0x85)](_0x17840e);}}async[a10_0x12d4a2(0x83)](_0x20cb67,_0x53777f,_0x50f7bb){const _0x155be8=a10_0x12d4a2,_0x51b629=_0x53777f??'v'+Date[_0x155be8(0x8f)]()[_0x155be8(0x71)](0x24);!_0x50f7bb&&await this[_0x155be8(0x88)](_0x155be8(0x6c)+_0x51b629+_0x155be8(0x8c));const _0x4bc5f=await createVersion(_0x20cb67,_0x51b629);return!_0x50f7bb&&this[_0x155be8(0x8d)](_0x155be8(0x74)+_0x4bc5f['id']+'\x20('+_0x51b629+')'),_0x4bc5f['id'];}}
1
+ function a10_0x378e(){const _0x49a581=['24rluZDr','examples','13oDkhes','log','会话\x20ID','deploy_error','spinner','20lMLBMa','slice','stopLoading','5DfosJu','agent','<%=\x20config.bin\x20%>\x20code\x20publish\x20--project-id\x20206\x20--thread-id\x20thread_xxx\x20--version\x201.0.0','resolveVersion','status','red','运行时地址:\x20','7MVpJLY','834691TdVuvX','...','string','开始发布...','agent_waiting','flags','timeout','interrupt','error','createLoading','跳过构建,直接发布','3894188yGigBV','<%=\x20config.bin\x20%>\x20code\x20publish\x20--project-id\x20206\x20--thread-id\x20thread_xxx\x20--json','发布成功!','boolean','now','发布失败','short_url','parse','9747708VnJcko','build_logs','jsonEnabled','未知错误','text','access_url','toString','超时时间(秒)','原因:\x20','创建版本\x20','waiting','359019eiXMGB','colorize','message','green','2347167gzQqfZ','发布云端项目(构建\x20→\x20部署\x20→\x20返回运行时地址)','5FJaBQh','deployed','requireAuth','running','description','version','yellow','352276xDgxcr','integer','726906bAzNPM','failed','自定义构建命令'];a10_0x378e=function(){return _0x49a581;};return a10_0x378e();}function a10_0x463d(_0x278123,_0x2d0500){_0x278123=_0x278123-0x92;const _0x378e87=a10_0x378e();let _0x463d9a=_0x378e87[_0x278123];return _0x463d9a;}const a10_0x2bcd0=a10_0x463d;(function(_0x482bbb,_0x104b79){const _0xab355f=a10_0x463d,_0xd12533=_0x482bbb();while(!![]){try{const _0x3db356=parseInt(_0xab355f(0xac))/0x1*(-parseInt(_0xab355f(0xb3))/0x2)+-parseInt(_0xab355f(0xaa))/0x3+parseInt(_0xab355f(0x93))/0x4*(parseInt(_0xab355f(0xc2))/0x5)+parseInt(_0xab355f(0xb5))/0x6*(parseInt(_0xab355f(0xc9))/0x7)+parseInt(_0xab355f(0xb8))/0x8*(parseInt(_0xab355f(0xa6))/0x9)+parseInt(_0xab355f(0xbf))/0xa*(parseInt(_0xab355f(0xca))/0xb)+parseInt(_0xab355f(0x9b))/0xc*(parseInt(_0xab355f(0xba))/0xd);if(_0x3db356===_0x104b79)break;else _0xd12533['push'](_0xd12533['shift']());}catch(_0x461d0c){_0xd12533['push'](_0xd12533['shift']());}}}(a10_0x378e,0x7dd23));import{Flags}from'@oclif/core';import a10_0x156c30 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 a10_0x156c30{static [a10_0x2bcd0(0xb0)]=a10_0x2bcd0(0xab);static ['enableJsonFlag']=!![];static [a10_0x2bcd0(0xb9)]=[a10_0x2bcd0(0x94),a10_0x2bcd0(0xc4)];static [a10_0x2bcd0(0xcf)]={'project-id':Flags[a10_0x2bcd0(0xb4)]({'description':'项目\x20ID','required':!![]}),'thread-id':Flags[a10_0x2bcd0(0xcc)]({'description':a10_0x2bcd0(0xbc),'required':!![]}),'version':Flags[a10_0x2bcd0(0xcc)]({'description':'版本号(默认自动生成)'}),'build-command':Flags[a10_0x2bcd0(0xcc)]({'description':a10_0x2bcd0(0xb7)}),'skip-build':Flags[a10_0x2bcd0(0x96)]({'description':a10_0x2bcd0(0x92),'default':![]}),'timeout':Flags['integer']({'description':a10_0x2bcd0(0xa2),'default':0x258})};async['run'](){const _0x911041=a10_0x2bcd0;await this[_0x911041(0xae)]();const {flags:_0x1d9ec2}=await this[_0x911041(0x9a)](CodePublish),_0x158db9=this[_0x911041(0x9d)](),_0x1afe8c=_0x1d9ec2['project-id'],_0x42b121=_0x1d9ec2['thread-id'],_0x59a1a6=_0x1d9ec2[_0x911041(0xd0)]*0x3e8;try{const _0x1b3715=await getProjectContext(_0x42b121,_0x1afe8c);if(_0x1b3715['interrupt'][_0x911041(0xa5)]){const _0x205ec5=_0x1b3715[_0x911041(0xd1)][_0x911041(0xb0)]??'',_0x1b678f='云端\x20Agent\x20正在等待用户确认:'+_0x205ec5+'。请先处理确认后再发布。';if(_0x158db9)return{'status':_0x911041(0xb6),'project_id':_0x1afe8c,'version_id':0x0,'error':_0x1b678f,'reason':_0x911041(0xce)};this[_0x911041(0xd2)](_0x1b678f);}if(_0x1b3715[_0x911041(0xc3)][_0x911041(0xaf)]){const _0x194861='云端\x20Agent\x20仍在生成代码,请稍后再试。';if(_0x158db9)return{'status':_0x911041(0xb6),'project_id':_0x1afe8c,'version_id':0x0,'error':_0x194861,'reason':'agent_running'};this['error'](_0x194861);}const _0xaca93c=await this[_0x911041(0xc5)](_0x1afe8c,_0x1d9ec2[_0x911041(0xb1)],_0x158db9);!_0x158db9&&await this[_0x911041(0xd3)](_0x911041(0xcd));const _0x2b82bc=_0x158db9?undefined:_0x144a3a=>{const _0x57d0f6=_0x911041;this[_0x57d0f6(0xbe)]&&(this[_0x57d0f6(0xbe)][_0x57d0f6(0x9f)]='['+_0x144a3a['step']+']\x20'+_0x144a3a[_0x57d0f6(0xa8)]);},_0x147ff1=await runFullPublish({'threadId':_0x42b121,'projectId':_0x1afe8c,'versionId':_0xaca93c,'buildCommand':_0x1d9ec2['build-command'],'skipBuild':_0x1d9ec2['skip-build']},_0x2b82bc,_0x59a1a6);this[_0x911041(0xc1)]();if(_0x147ff1[_0x911041(0xc6)]==='deployed')return!_0x158db9&&(this['log'](this[_0x911041(0xa7)](_0x911041(0x95),_0x911041(0xa9))),this['log'](_0x911041(0xc8)+_0x147ff1[_0x911041(0xa0)])),{'status':_0x911041(0xad),'project_id':_0x1afe8c,'version_id':_0xaca93c,'access_url':_0x147ff1[_0x911041(0xa0)],'short_url':_0x147ff1[_0x911041(0x99)]};const _0xb85e3c=_0x147ff1[_0x911041(0xbd)]??_0x911041(0x9e);if(!_0x158db9){this[_0x911041(0xbb)](this['colorize'](_0x911041(0x98),_0x911041(0xc7))),this[_0x911041(0xbb)](_0x911041(0xa3)+_0xb85e3c);if(_0x147ff1['build_logs']?.['length']){this[_0x911041(0xbb)](this[_0x911041(0xa7)]('构建日志\x20(最近\x2020\x20条):',_0x911041(0xb2)));for(const _0x30225e of _0x147ff1[_0x911041(0x9c)]['slice'](-0x14)){this[_0x911041(0xbb)]('\x20\x20'+_0x30225e);}}}return{'status':_0x911041(0xb6),'project_id':_0x1afe8c,'version_id':_0xaca93c,'error':_0xb85e3c,'build_logs':_0x147ff1['build_logs']?.[_0x911041(0xc0)](-0x1e),'build_result':_0x147ff1['build_result']};}catch(_0x1c7147){this[_0x911041(0xc1)]();const _0x2ce6ae=_0x1c7147 instanceof Error?_0x1c7147[_0x911041(0xa8)]:String(_0x1c7147);if(_0x158db9)return{'status':_0x911041(0xb6),'project_id':_0x1afe8c,'version_id':0x0,'error':_0x2ce6ae};this[_0x911041(0xd2)](_0x2ce6ae);}}async[a10_0x2bcd0(0xc5)](_0x57d93d,_0x3b28ad,_0x417f10){const _0x53526d=a10_0x2bcd0,_0x4bc3e3=_0x3b28ad??'v'+Date[_0x53526d(0x97)]()[_0x53526d(0xa1)](0x24);!_0x417f10&&await this[_0x53526d(0xd3)](_0x53526d(0xa4)+_0x4bc3e3+_0x53526d(0xcb));const _0x291a59=await createVersion(_0x57d93d,_0x4bc3e3);return!_0x417f10&&this[_0x53526d(0xc1)]('版本已创建:\x20'+_0x291a59['id']+'\x20('+_0x4bc3e3+')'),_0x291a59['id'];}}
@@ -1 +1 @@
1
- const a11_0x562398=a11_0x11e2;(function(_0x4e5deb,_0x1d156c){const _0x8c005a=a11_0x11e2,_0x203a85=_0x4e5deb();while(!![]){try{const _0x51e133=-parseInt(_0x8c005a(0xfe))/0x1*(-parseInt(_0x8c005a(0x110))/0x2)+parseInt(_0x8c005a(0x100))/0x3*(parseInt(_0x8c005a(0xfc))/0x4)+parseInt(_0x8c005a(0x10f))/0x5+parseInt(_0x8c005a(0xf0))/0x6+parseInt(_0x8c005a(0xf9))/0x7*(-parseInt(_0x8c005a(0x105))/0x8)+parseInt(_0x8c005a(0xf8))/0x9+parseInt(_0x8c005a(0x10c))/0xa*(-parseInt(_0x8c005a(0xee))/0xb);if(_0x51e133===_0x1d156c)break;else _0x203a85['push'](_0x203a85['shift']());}catch(_0x588f25){_0x203a85['push'](_0x203a85['shift']());}}}(a11_0x444a,0x785aa));function a11_0x444a(){const _0x3618ee=['11dQnaGm','status','4818360KfOgUI','<%=\x20config.bin\x20%>\x20code\x20recall\x20--url\x20https://o.wpsgo.com/app/41000207/6Ne2UkWT3ytn/\x20--json','string','shortSlug','下架已部署的应用(recall),使其不再可访问','examples','stopLoading','flags','5968800IuUfgY','14VRuPCG','部署\x20ID:\x20','log','218920JbCFOp','companyId','5GLtZeU','failed','27OGyKlW','<%=\x20config.bin\x20%>\x20code\x20recall\x20--project-id\x20206\x20--json','requireAuth','project-id','状态:\x20\x20\x20\x20','3019672WCOkoh','project_id','match','项目\x20ID(与\x20--url\x20二选一)','description','正在查询\x20','run','12136450feyxwm','recalled','createLoading','216140OnJSJP','183790CJpRxr','找到项目\x20','enableJsonFlag','url','error','deployment_id','正在下架项目\x20'];a11_0x444a=function(){return _0x3618ee;};return a11_0x444a();}import{Flags}from'@oclif/core';function a11_0x11e2(_0x312711,_0x47b536){_0x312711=_0x312711-0xe8;const _0x444ad4=a11_0x444a();let _0x11e2c0=_0x444ad4[_0x312711];return _0x11e2c0;}import a11_0x14698e from'../../lib/extends/command.js';import{recallDeployment,lookupDeployment}from'../../lib/service/manage.js';function parseShortUrl(_0x3d2c6c){const _0x3826fe=a11_0x11e2,_0x5cc57c=_0x3d2c6c[_0x3826fe(0x107)](/\/app\/([^/]+)\/([^/]+)/);return _0x5cc57c?{'companyId':_0x5cc57c[0x1],'shortSlug':_0x5cc57c[0x2]}:null;}export default class CodeRecall extends a11_0x14698e{static [a11_0x562398(0x109)]=a11_0x562398(0xf4);static [a11_0x562398(0xe9)]=!![];static [a11_0x562398(0xf5)]=[a11_0x562398(0x101),a11_0x562398(0xf1)];static [a11_0x562398(0xf7)]={'project-id':Flags['integer']({'description':a11_0x562398(0x108)}),'url':Flags[a11_0x562398(0xf2)]({'description':'应用短链\x20URL(与\x20--project-id\x20二选一)'})};async[a11_0x562398(0x10b)](){const _0x24a3d8=a11_0x562398;await this[_0x24a3d8(0x102)]();const {flags:_0x421fc2}=await this['parse'](CodeRecall),_0x23683c=this['jsonEnabled']();try{let _0x4f5b24=_0x421fc2[_0x24a3d8(0x103)];if(!_0x4f5b24&&_0x421fc2['url']){const _0x208df1=parseShortUrl(_0x421fc2['url']);if(!_0x208df1)throw new Error('无法解析短链:\x20'+_0x421fc2[_0x24a3d8(0xea)]+'\x0a格式应为:\x20https://o.wpsgo.com/app/<company_id>/<short_slug>/');if(!_0x23683c)await this[_0x24a3d8(0x10e)](_0x24a3d8(0x10a)+_0x208df1[_0x24a3d8(0xfd)]+'/'+_0x208df1[_0x24a3d8(0xf3)]+'...');const _0x385f43=await lookupDeployment(_0x208df1['companyId'],_0x208df1['shortSlug']);_0x4f5b24=_0x385f43[_0x24a3d8(0x106)];if(!_0x23683c)this[_0x24a3d8(0xf6)](_0x24a3d8(0xe8)+_0x4f5b24);}if(!_0x4f5b24)throw new Error('请提供\x20--project-id\x20或\x20--url\x20参数');if(!_0x23683c)await this[_0x24a3d8(0x10e)](_0x24a3d8(0xed)+_0x4f5b24+'...');const _0xea366a=await recallDeployment(_0x4f5b24);return!_0x23683c&&(this['stopLoading']('下架成功'),this[_0x24a3d8(0xfb)](_0x24a3d8(0xfa)+_0xea366a[_0x24a3d8(0xec)]),this[_0x24a3d8(0xfb)](_0x24a3d8(0x104)+_0xea366a[_0x24a3d8(0xef)])),{'status':_0x24a3d8(0x10d),'project_id':_0x4f5b24,'deployment_id':_0xea366a[_0x24a3d8(0xec)]};}catch(_0x519650){this[_0x24a3d8(0xf6)]();const _0x29b9da=_0x519650 instanceof Error?_0x519650['message']:String(_0x519650);if(_0x23683c)return{'status':_0x24a3d8(0xff),'project_id':_0x421fc2[_0x24a3d8(0x103)]??0x0,'deployment_id':'','error':_0x29b9da};this[_0x24a3d8(0xeb)](_0x29b9da);}}}
1
+ const a11_0x33b960=a11_0x4911;(function(_0x35060a,_0x4739b7){const _0x2c705d=a11_0x4911,_0x415483=_0x35060a();while(!![]){try{const _0x35b688=parseInt(_0x2c705d(0x1fa))/0x1*(-parseInt(_0x2c705d(0x1e9))/0x2)+-parseInt(_0x2c705d(0x201))/0x3*(-parseInt(_0x2c705d(0x205))/0x4)+parseInt(_0x2c705d(0x1fd))/0x5*(parseInt(_0x2c705d(0x1e7))/0x6)+-parseInt(_0x2c705d(0x20b))/0x7+parseInt(_0x2c705d(0x1ea))/0x8+parseInt(_0x2c705d(0x207))/0x9*(parseInt(_0x2c705d(0x20f))/0xa)+-parseInt(_0x2c705d(0x1f8))/0xb;if(_0x35b688===_0x4739b7)break;else _0x415483['push'](_0x415483['shift']());}catch(_0x4e7776){_0x415483['push'](_0x415483['shift']());}}}(a11_0x1a8b,0xe924e));import{Flags}from'@oclif/core';import a11_0x93e373 from'../../lib/extends/command.js';import{recallDeployment,lookupDeployment}from'../../lib/service/manage.js';function parseShortUrl(_0x592129){const _0x176378=a11_0x4911,_0x41279b=_0x592129[_0x176378(0x1f2)](/\/app\/([^/]+)\/([^/]+)/);return _0x41279b?{'companyId':_0x41279b[0x1],'shortSlug':_0x41279b[0x2]}:null;}function a11_0x1a8b(){const _0x13eaf0=['12332PJNKVD','<%=\x20config.bin\x20%>\x20code\x20recall\x20--project-id\x20206\x20--json','1521AhYjbT','project_id','无法解析短链:\x20','下架成功','728476cLyGqM','flags','\x0a格式应为:\x20https://o.wpsgo.com/app/<company_id>/<short_slug>/','下架已部署的应用(recall),使其不再可访问','60410RPoErv','createLoading','enableJsonFlag','9735900sfQTab','run','1433902LJZsmD','11696568KKcalW','<%=\x20config.bin\x20%>\x20code\x20recall\x20--url\x20https://o.wpsgo.com/app/41000207/6Ne2UkWT3ytn/\x20--json','deployment_id','stopLoading','description','integer','项目\x20ID(与\x20--url\x20二选一)','examples','match','shortSlug','url','parse','...','failed','33799436wqozHe','jsonEnabled','1UdLASD','requireAuth','error','5BtjFfU','部署\x20ID:\x20','recalled','请提供\x20--project-id\x20或\x20--url\x20参数','723mdiMcA','log','companyId','project-id'];a11_0x1a8b=function(){return _0x13eaf0;};return a11_0x1a8b();}function a11_0x4911(_0x4546c8,_0x384454){_0x4546c8=_0x4546c8-0x1e5;const _0x1a8b53=a11_0x1a8b();let _0x491134=_0x1a8b53[_0x4546c8];return _0x491134;}export default class CodeRecall extends a11_0x93e373{static [a11_0x33b960(0x1ee)]=a11_0x33b960(0x20e);static [a11_0x33b960(0x1e6)]=!![];static [a11_0x33b960(0x1f1)]=[a11_0x33b960(0x206),a11_0x33b960(0x1eb)];static [a11_0x33b960(0x20c)]={'project-id':Flags[a11_0x33b960(0x1ef)]({'description':a11_0x33b960(0x1f0)}),'url':Flags['string']({'description':'应用短链\x20URL(与\x20--project-id\x20二选一)'})};async[a11_0x33b960(0x1e8)](){const _0x30472f=a11_0x33b960;await this[_0x30472f(0x1fb)]();const {flags:_0x22a021}=await this[_0x30472f(0x1f5)](CodeRecall),_0x55f8ad=this[_0x30472f(0x1f9)]();try{let _0x458963=_0x22a021[_0x30472f(0x204)];if(!_0x458963&&_0x22a021['url']){const _0x66bb36=parseShortUrl(_0x22a021[_0x30472f(0x1f4)]);if(!_0x66bb36)throw new Error(_0x30472f(0x209)+_0x22a021[_0x30472f(0x1f4)]+_0x30472f(0x20d));if(!_0x55f8ad)await this[_0x30472f(0x1e5)]('正在查询\x20'+_0x66bb36[_0x30472f(0x203)]+'/'+_0x66bb36[_0x30472f(0x1f3)]+'...');const _0x2f7007=await lookupDeployment(_0x66bb36[_0x30472f(0x203)],_0x66bb36[_0x30472f(0x1f3)]);_0x458963=_0x2f7007[_0x30472f(0x208)];if(!_0x55f8ad)this['stopLoading']('找到项目\x20'+_0x458963);}if(!_0x458963)throw new Error(_0x30472f(0x200));if(!_0x55f8ad)await this[_0x30472f(0x1e5)]('正在下架项目\x20'+_0x458963+_0x30472f(0x1f6));const _0xad70e4=await recallDeployment(_0x458963);return!_0x55f8ad&&(this[_0x30472f(0x1ed)](_0x30472f(0x20a)),this[_0x30472f(0x202)](_0x30472f(0x1fe)+_0xad70e4['deployment_id']),this[_0x30472f(0x202)]('状态:\x20\x20\x20\x20'+_0xad70e4['status'])),{'status':_0x30472f(0x1ff),'project_id':_0x458963,'deployment_id':_0xad70e4[_0x30472f(0x1ec)]};}catch(_0xf385f8){this[_0x30472f(0x1ed)]();const _0x5d7dc4=_0xf385f8 instanceof Error?_0xf385f8['message']:String(_0xf385f8);if(_0x55f8ad)return{'status':_0x30472f(0x1f7),'project_id':_0x22a021[_0x30472f(0x204)]??0x0,'deployment_id':'','error':_0x5d7dc4};this[_0x30472f(0x1fc)](_0x5d7dc4);}}}
@@ -1 +1 @@
1
- const a12_0x3b3e8b=a12_0x38e9;function a12_0x17b6(){const _0x50e598=['671429Nhgguk','4387140OTOKPG','并恢复\x20Agent...','<%=\x20config.bin\x20%>\x20code\x20resume\x20--thread-id\x20thread_xxx\x20--reject\x20--message\x20\x22换个方案\x22\x20--json','118865Wumllb','451234yUCpCw','8roxDIr','reject','assistant-id','2asPQhc','thread-id','1307786vJCSAA','云端\x20Agent\x20ID','1033485EdnOiA','恢复被中断的云端\x20Agent(HITL\x20确认/拒绝)','approve','186McfQUq','flags','jsonEnabled','Agent\x20已恢复\x20(','message','requireAuth','enableJsonFlag','string','9XxEgVx','4179230yzWYLa','log','description','批准当前方案(默认)','app-buddy','),云端正在继续处理','boolean'];a12_0x17b6=function(){return _0x50e598;};return a12_0x17b6();}(function(_0x4dec22,_0x3cbaaa){const _0x36c413=a12_0x38e9,_0x566008=_0x4dec22();while(!![]){try{const _0x149c20=parseInt(_0x36c413(0x14f))/0x1*(parseInt(_0x36c413(0x151))/0x2)+parseInt(_0x36c413(0x133))/0x3+-parseInt(_0x36c413(0x147))/0x4+-parseInt(_0x36c413(0x14a))/0x5*(-parseInt(_0x36c413(0x136))/0x6)+parseInt(_0x36c413(0x14b))/0x7*(-parseInt(_0x36c413(0x14c))/0x8)+-parseInt(_0x36c413(0x13e))/0x9*(parseInt(_0x36c413(0x13f))/0xa)+-parseInt(_0x36c413(0x146))/0xb;if(_0x149c20===_0x3cbaaa)break;else _0x566008['push'](_0x566008['shift']());}catch(_0xb4f2f4){_0x566008['push'](_0x566008['shift']());}}}(a12_0x17b6,0xb6deb));import{Flags}from'@oclif/core';import a12_0x59a3ae from'../../lib/extends/command.js';import{resumeRun}from'../../lib/service/cloud-agent.js';function a12_0x38e9(_0x3a232d,_0x5ea771){_0x3a232d=_0x3a232d-0x133;const _0x17b641=a12_0x17b6();let _0x38e962=_0x17b641[_0x3a232d];return _0x38e962;}export default class CodeResume extends a12_0x59a3ae{static [a12_0x3b3e8b(0x141)]=a12_0x3b3e8b(0x134);static [a12_0x3b3e8b(0x13c)]=!![];static ['examples']=['<%=\x20config.bin\x20%>\x20code\x20resume\x20--thread-id\x20thread_xxx\x20--approve\x20--json',a12_0x3b3e8b(0x149)];static [a12_0x3b3e8b(0x137)]={'thread-id':Flags[a12_0x3b3e8b(0x13d)]({'description':'会话\x20ID','required':!![]}),'approve':Flags['boolean']({'description':a12_0x3b3e8b(0x142),'exclusive':[a12_0x3b3e8b(0x14d)]}),'reject':Flags[a12_0x3b3e8b(0x145)]({'description':'拒绝当前方案','exclusive':[a12_0x3b3e8b(0x135)]}),'message':Flags[a12_0x3b3e8b(0x13d)]({'description':'附加说明(拒绝时建议提供)'}),'assistant-id':Flags[a12_0x3b3e8b(0x13d)]({'description':a12_0x3b3e8b(0x152),'default':a12_0x3b3e8b(0x143)})};async['run'](){const _0x589ca6=a12_0x3b3e8b;await this[_0x589ca6(0x13b)]();const {flags:_0x1bda86}=await this['parse'](CodeResume),_0xe98329=this[_0x589ca6(0x138)](),_0x368191=_0x1bda86[_0x589ca6(0x150)],_0x208a5e=_0x1bda86[_0x589ca6(0x14d)]===!![],_0x34767e=_0x208a5e?_0x589ca6(0x14d):'approve',_0x150db7={'type':_0x34767e};_0x1bda86[_0x589ca6(0x13a)]&&(_0x150db7[_0x589ca6(0x13a)]=_0x1bda86[_0x589ca6(0x13a)]);const _0x357825={'decisions':[_0x150db7]};if(!_0xe98329)this[_0x589ca6(0x140)]('正在'+(_0x208a5e?'拒绝':'批准')+_0x589ca6(0x148));return await resumeRun({'threadId':_0x368191,'resumeValue':_0x357825,'assistantId':_0x1bda86[_0x589ca6(0x14e)]}),!_0xe98329&&this['log'](_0x589ca6(0x139)+_0x34767e+_0x589ca6(0x144)),{'status':'resumed','thread_id':_0x368191,'action':_0x34767e};}}
1
+ const a12_0x4c4977=a12_0x31a9;(function(_0x2ec507,_0xf31f86){const _0x1c3927=a12_0x31a9,_0x31f26e=_0x2ec507();while(!![]){try{const _0x186358=parseInt(_0x1c3927(0xb8))/0x1*(-parseInt(_0x1c3927(0xb6))/0x2)+parseInt(_0x1c3927(0xca))/0x3+-parseInt(_0x1c3927(0xad))/0x4*(-parseInt(_0x1c3927(0xb4))/0x5)+parseInt(_0x1c3927(0xb0))/0x6+parseInt(_0x1c3927(0xb5))/0x7*(parseInt(_0x1c3927(0xaf))/0x8)+-parseInt(_0x1c3927(0xb1))/0x9*(parseInt(_0x1c3927(0xb9))/0xa)+-parseInt(_0x1c3927(0xb3))/0xb;if(_0x186358===_0xf31f86)break;else _0x31f26e['push'](_0x31f26e['shift']());}catch(_0x3fd9ca){_0x31f26e['push'](_0x31f26e['shift']());}}}(a12_0x3cd1,0x8245a));function a12_0x31a9(_0x2bcd52,_0x14e249){_0x2bcd52=_0x2bcd52-0xad;const _0x3cd13c=a12_0x3cd1();let _0x31a9f5=_0x3cd13c[_0x2bcd52];return _0x31a9f5;}import{Flags}from'@oclif/core';import a12_0x4f24fe from'../../lib/extends/command.js';import{resumeRun}from'../../lib/service/cloud-agent.js';export default class CodeResume extends a12_0x4f24fe{static [a12_0x4c4977(0xb7)]=a12_0x4c4977(0xbb);static [a12_0x4c4977(0xae)]=!![];static ['examples']=['<%=\x20config.bin\x20%>\x20code\x20resume\x20--thread-id\x20thread_xxx\x20--approve\x20--json','<%=\x20config.bin\x20%>\x20code\x20resume\x20--thread-id\x20thread_xxx\x20--reject\x20--message\x20\x22换个方案\x22\x20--json'];static ['flags']={'thread-id':Flags[a12_0x4c4977(0xc6)]({'description':'会话\x20ID','required':!![]}),'approve':Flags['boolean']({'description':'批准当前方案(默认)','exclusive':[a12_0x4c4977(0xc1)]}),'reject':Flags[a12_0x4c4977(0xc9)]({'description':a12_0x4c4977(0xbc),'exclusive':[a12_0x4c4977(0xbf)]}),'message':Flags[a12_0x4c4977(0xc6)]({'description':'附加说明(拒绝时建议提供)'}),'assistant-id':Flags[a12_0x4c4977(0xc6)]({'description':'云端\x20Agent\x20ID','default':a12_0x4c4977(0xc3)})};async[a12_0x4c4977(0xbd)](){const _0x58be45=a12_0x4c4977;await this[_0x58be45(0xb2)]();const {flags:_0x3c43c5}=await this[_0x58be45(0xc4)](CodeResume),_0xe04036=this[_0x58be45(0xc0)](),_0x5e79f7=_0x3c43c5[_0x58be45(0xc5)],_0x322999=_0x3c43c5[_0x58be45(0xc1)]===!![],_0x206c91=_0x322999?'reject':'approve',_0x38a007={'type':_0x206c91};_0x3c43c5[_0x58be45(0xc8)]&&(_0x38a007['message']=_0x3c43c5[_0x58be45(0xc8)]);const _0x3fbc17={'decisions':[_0x38a007]};if(!_0xe04036)this[_0x58be45(0xc7)]('正在'+(_0x322999?'拒绝':'批准')+_0x58be45(0xc2));return await resumeRun({'threadId':_0x5e79f7,'resumeValue':_0x3fbc17,'assistantId':_0x3c43c5[_0x58be45(0xbe)]}),!_0xe04036&&this[_0x58be45(0xc7)](_0x58be45(0xba)+_0x206c91+'),云端正在继续处理'),{'status':'resumed','thread_id':_0x5e79f7,'action':_0x206c91};}}function a12_0x3cd1(){const _0x3ee589=['assistant-id','approve','jsonEnabled','reject','并恢复\x20Agent...','app-buddy','parse','thread-id','string','log','message','boolean','2135358NdkVzB','2539912ESDBrx','enableJsonFlag','103640QBNhhM','2366028mxOuss','9YqzXKF','requireAuth','10450220YzboeE','5hzIcqZ','301IICObN','336786mtYpfV','description','2zpVkzC','4777670NKeXuR','Agent\x20已恢复\x20(','恢复被中断的云端\x20Agent(HITL\x20确认/拒绝)','拒绝当前方案','run'];a12_0x3cd1=function(){return _0x3ee589;};return a12_0x3cd1();}