@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 a30_0x25904c=a30_0x1631;(function(_0x1bac71,_0x2db4bf){const _0x31259f=a30_0x1631,_0x51b015=_0x1bac71();while(!![]){try{const _0xd3414f=parseInt(_0x31259f(0x1de))/0x1+-parseInt(_0x31259f(0x1cd))/0x2+-parseInt(_0x31259f(0x1dd))/0x3*(-parseInt(_0x31259f(0x1c9))/0x4)+-parseInt(_0x31259f(0x1d2))/0x5*(-parseInt(_0x31259f(0x1d0))/0x6)+parseInt(_0x31259f(0x1ca))/0x7+-parseInt(_0x31259f(0x1c8))/0x8*(parseInt(_0x31259f(0x1e9))/0x9)+parseInt(_0x31259f(0x1e3))/0xa*(-parseInt(_0x31259f(0x1d3))/0xb);if(_0xd3414f===_0x2db4bf)break;else _0x51b015['push'](_0x51b015['shift']());}catch(_0x2352ab){_0x51b015['push'](_0x51b015['shift']());}}}(a30_0x1653,0x5157c));import{SimpleHttpClient}from'../http/client.js';import{APP_STUDIO_BASE}from'../config/constants.js';const manageClient=new SimpleHttpClient(APP_STUDIO_BASE),MANAGE_PREFIX=a30_0x25904c(0x1ce);export async function getMyTeams(){const _0x4f72fe=a30_0x25904c;manageClient[_0x4f72fe(0x1c7)]();const _0x2e3b7a=await manageClient[_0x4f72fe(0x1d1)](MANAGE_PREFIX+_0x4f72fe(0x1c4));if(Array[_0x4f72fe(0x1e8)](_0x2e3b7a['data']?.[_0x4f72fe(0x1e5)]))return _0x2e3b7a[_0x4f72fe(0x1d7)]['items'];const _0x424702=_0x2e3b7a;return _0x424702[_0x4f72fe(0x1e5)]??[];}export async function createTeam(_0x52de54){const _0x576b0d=a30_0x25904c;manageClient[_0x576b0d(0x1c7)]();const _0x1ba661=await manageClient[_0x576b0d(0x1cc)](MANAGE_PREFIX+_0x576b0d(0x1df),{'team_name':_0x52de54});return unwrap(_0x1ba661);}export async function upsertProjectThread(_0x2d1b5a,_0x3d8b35){const _0x5277b0=a30_0x25904c;manageClient[_0x5277b0(0x1c7)]();const _0x324959=await manageClient[_0x5277b0(0x1cc)](MANAGE_PREFIX+_0x5277b0(0x1d8)+_0x2d1b5a+_0x5277b0(0x1e2),{'thread_id':_0x3d8b35});return unwrap(_0x324959);}function a30_0x1653(){const _0x563426=['21znLers','537621RtqGGD','/teams','API\x20返回数据为空\x20(code:\x20','/versions','/thread','142420oItvpE','/publish','items','&page=1&page_size=100','\x20version','isArray','286137IHzxZh','config_key','/api/runtime/v1/deployments/','msg','projectName','/teams/my','/deployment/recall','/apps','initialize','144WOKdyd','236228vhouRv','2935457SyznDp','object','post','628032uhJDYv','/api/manage/v1','code','6PnkqfC','get','28805ndIgyw','121tNYcda','teamId','/scopes/update','/frontend/download','data','/projects/','/projects?team_id=','/deployments/','description',',\x20msg:\x20'];a30_0x1653=function(){return _0x563426;};return a30_0x1653();}export async function getProjectThread(_0x580ceb){const _0x15452c=a30_0x25904c;manageClient[_0x15452c(0x1c7)]();const _0x219943=await manageClient[_0x15452c(0x1d1)](MANAGE_PREFIX+'/projects/'+_0x580ceb+_0x15452c(0x1e2));return unwrap(_0x219943);}function unwrap(_0x113e9f){const _0x65e560=a30_0x25904c;if(_0x113e9f['data']!==undefined&&_0x113e9f[_0x65e560(0x1d7)]!==null)return _0x113e9f[_0x65e560(0x1d7)];if(typeof _0x113e9f===_0x65e560(0x1cb)&&!(_0x65e560(0x1cf)in _0x113e9f&&_0x65e560(0x1ec)in _0x113e9f))return _0x113e9f;throw new Error(_0x65e560(0x1e0)+_0x113e9f[_0x65e560(0x1cf)]+_0x65e560(0x1dc)+_0x113e9f[_0x65e560(0x1ec)]+')');}function unwrapList(_0x2cc42c){const _0x2f09ca=a30_0x25904c;return _0x2cc42c[_0x2f09ca(0x1d7)]?.[_0x2f09ca(0x1e5)]??[];}export async function createProject(_0x12d23c){const _0x5e95de=a30_0x25904c;manageClient[_0x5e95de(0x1c7)]();const _0x46146b=await manageClient[_0x5e95de(0x1cc)](MANAGE_PREFIX+'/projects',{'team_id':_0x12d23c[_0x5e95de(0x1d4)],'project_name':_0x12d23c[_0x5e95de(0x1ed)],'description':_0x12d23c[_0x5e95de(0x1db)]??''});return unwrap(_0x46146b);}export async function listProjects(_0x2225f2){const _0x4f227f=a30_0x25904c;manageClient[_0x4f227f(0x1c7)]();const _0x4fd33f=await manageClient[_0x4f227f(0x1d1)](MANAGE_PREFIX+_0x4f227f(0x1d9)+_0x2225f2+_0x4f227f(0x1e6));return unwrapList(_0x4fd33f);}export async function getProjectVersions(_0x40f56b){const _0x57ecc7=a30_0x25904c;manageClient[_0x57ecc7(0x1c7)]();const _0x1acaee=await manageClient[_0x57ecc7(0x1d1)](MANAGE_PREFIX+'/projects/'+_0x40f56b+_0x57ecc7(0x1e1));return unwrapList(_0x1acaee);}export async function createVersion(_0x1d5e48,_0x3634ef){const _0x386576=a30_0x25904c;manageClient['initialize']();const _0xa3a949=await manageClient[_0x386576(0x1cc)](MANAGE_PREFIX+_0x386576(0x1d8)+_0x1d5e48+_0x386576(0x1e1),{'version_number':_0x3634ef,'description':_0x3634ef+_0x386576(0x1e7)});return unwrap(_0xa3a949);}function a30_0x1631(_0x27491f,_0x2d49df){_0x27491f=_0x27491f-0x1c4;const _0x165386=a30_0x1653();let _0x163172=_0x165386[_0x27491f];return _0x163172;}export async function publishVersion(_0x3f75a0,_0x56ca7c){const _0x425592=a30_0x25904c;manageClient[_0x425592(0x1c7)]();const _0x4d2332=await manageClient[_0x425592(0x1cc)](MANAGE_PREFIX+_0x425592(0x1d8)+_0x3f75a0+'/versions/'+_0x56ca7c+_0x425592(0x1e4));return unwrap(_0x4d2332);}export async function getDeploymentStatus(_0x29effb){const _0x570247=a30_0x25904c;manageClient['initialize']();const _0x54e49c=await manageClient['get'](_0x570247(0x1eb)+_0x29effb);return unwrap(_0x54e49c);}export async function lookupDeployment(_0x33249f,_0x4d8bce){const _0x153614=a30_0x25904c;manageClient[_0x153614(0x1c7)]();const _0x4e365a=await manageClient[_0x153614(0x1d1)](MANAGE_PREFIX+_0x153614(0x1da)+_0x33249f+'/'+_0x4d8bce);return unwrap(_0x4e365a);}export async function recallDeployment(_0x2a8776){const _0x1ce17f=a30_0x25904c;manageClient[_0x1ce17f(0x1c7)]();const _0x2f5814=await manageClient[_0x1ce17f(0x1cc)](MANAGE_PREFIX+'/projects/'+_0x2a8776+_0x1ce17f(0x1c5));return unwrap(_0x2f5814);}export async function downloadFrontend(_0x4b4dd6,_0x2bb4c3){const _0x120483=a30_0x25904c;manageClient[_0x120483(0x1c7)]();const _0x3b99fa=await manageClient['get'](MANAGE_PREFIX+_0x120483(0x1d8)+_0x4b4dd6+'/versions/'+_0x2bb4c3+_0x120483(0x1d6));return unwrap(_0x3b99fa);}export async function getProjectConfigs(_0x538881){const _0x2fbcb8=a30_0x25904c;manageClient[_0x2fbcb8(0x1c7)]();const _0x1d210d=await manageClient[_0x2fbcb8(0x1d1)](MANAGE_PREFIX+_0x2fbcb8(0x1d8)+_0x538881+'/configs'),_0x1537ef=unwrap(_0x1d210d);if(Array['isArray'](_0x1537ef)){const _0x4a3d2d={};for(const _0x59f109 of _0x1537ef)_0x4a3d2d[_0x59f109[_0x2fbcb8(0x1ea)]]=_0x59f109['config_value'];return _0x4a3d2d;}return _0x1537ef;}export async function setProjectConfig(_0x280262,_0x4342c0,_0x108b01){const _0x234e4d=a30_0x25904c;manageClient[_0x234e4d(0x1c7)](),await manageClient[_0x234e4d(0x1cc)](MANAGE_PREFIX+_0x234e4d(0x1d8)+_0x280262+'/configs',{'config_key':_0x4342c0,'config_value':_0x108b01});}export async function bindAppToProject(_0x26a86c,_0xe2fef9,_0x321f32){const _0x5900a1=a30_0x25904c;manageClient['initialize']();const _0x407c8c=await manageClient[_0x5900a1(0x1cc)](MANAGE_PREFIX+_0x5900a1(0x1d8)+_0x26a86c+_0x5900a1(0x1c6),{'open_app_id':_0xe2fef9,'open_ssid':_0x321f32});return unwrap(_0x407c8c);}export async function updateProjectAppScopes(_0x5562bf,_0x435880,_0x303df6){const _0x6005ad=a30_0x25904c;manageClient['initialize']();const _0x5d5a1a=await manageClient[_0x6005ad(0x1cc)](MANAGE_PREFIX+_0x6005ad(0x1d8)+_0x5562bf+'/apps/'+_0x435880+_0x6005ad(0x1d5),{'scopes':_0x303df6});return unwrap(_0x5d5a1a);}
1
+ const a31_0x591648=a31_0x349f;function a31_0x349f(_0x2a04fc,_0x382253){_0x2a04fc=_0x2a04fc-0x131;const _0x1661b3=a31_0x1661();let _0x349ff9=_0x1661b3[_0x2a04fc];return _0x349ff9;}(function(_0x37b1f4,_0x5515ee){const _0x228e61=a31_0x349f,_0x3e619d=_0x37b1f4();while(!![]){try{const _0x4680e3=-parseInt(_0x228e61(0x14e))/0x1+parseInt(_0x228e61(0x149))/0x2*(-parseInt(_0x228e61(0x141))/0x3)+-parseInt(_0x228e61(0x159))/0x4*(parseInt(_0x228e61(0x144))/0x5)+parseInt(_0x228e61(0x14c))/0x6*(parseInt(_0x228e61(0x154))/0x7)+-parseInt(_0x228e61(0x147))/0x8*(-parseInt(_0x228e61(0x160))/0x9)+parseInt(_0x228e61(0x137))/0xa+-parseInt(_0x228e61(0x135))/0xb*(-parseInt(_0x228e61(0x15f))/0xc);if(_0x4680e3===_0x5515ee)break;else _0x3e619d['push'](_0x3e619d['shift']());}catch(_0x43247d){_0x3e619d['push'](_0x3e619d['shift']());}}}(a31_0x1661,0xa31b5));import{SimpleHttpClient}from'../http/client.js';import{APP_STUDIO_BASE}from'../config/constants.js';const manageClient=new SimpleHttpClient(APP_STUDIO_BASE),MANAGE_PREFIX=a31_0x591648(0x15c);export async function getMyTeams(){const _0x1944db=a31_0x591648;manageClient['initialize']();const _0x2f0b95=await manageClient[_0x1944db(0x148)](MANAGE_PREFIX+_0x1944db(0x14b));if(Array['isArray'](_0x2f0b95[_0x1944db(0x156)]?.[_0x1944db(0x134)]))return _0x2f0b95['data'][_0x1944db(0x134)];const _0x330f5c=_0x2f0b95;return _0x330f5c[_0x1944db(0x134)]??[];}function a31_0x1661(){const _0x24a63a=['2ChlWyC','/thread','/teams/my','1006728qfBVrm','/publish','971968jZXnuz','code','initialize','/scopes/update','isArray','/projects?team_id=','7EWnrJE','config_value','data','description','/deployment/recall','16UcDQkR','custom','/configs','/api/manage/v1','object','/teams','840wrmfFZ','9whsfIT','teamId','length','API\x20返回数据为空\x20(code:\x20','items','84634urUOfY','projectName','13085070YnTnAR','config_key','/projects/','/deployment/visibility','/deployments/','msg','/api/runtime/v1/deployments/','access_grants','&page=1&page_size=100','/frontend/download','1162641aKbcoA','/versions/','post','589255XdwlXm','/versions','\x20version','3873032ENPejI','get'];a31_0x1661=function(){return _0x24a63a;};return a31_0x1661();}export async function createTeam(_0x3559e8){const _0x25fe99=a31_0x591648;manageClient[_0x25fe99(0x150)]();const _0x3cdc9=await manageClient[_0x25fe99(0x143)](MANAGE_PREFIX+_0x25fe99(0x15e),{'team_name':_0x3559e8});return unwrap(_0x3cdc9);}export async function upsertProjectThread(_0x245b76,_0x15c741){const _0x205b47=a31_0x591648;manageClient[_0x205b47(0x150)]();const _0x1a0800=await manageClient[_0x205b47(0x143)](MANAGE_PREFIX+_0x205b47(0x139)+_0x245b76+_0x205b47(0x14a),{'thread_id':_0x15c741});return unwrap(_0x1a0800);}export async function getProjectThread(_0x194f97){const _0x3278f4=a31_0x591648;manageClient[_0x3278f4(0x150)]();const _0x416a1a=await manageClient[_0x3278f4(0x148)](MANAGE_PREFIX+_0x3278f4(0x139)+_0x194f97+_0x3278f4(0x14a));return unwrap(_0x416a1a);}function unwrap(_0x2ecc9b){const _0xf1cb4=a31_0x591648;if(_0x2ecc9b['data']!==undefined&&_0x2ecc9b[_0xf1cb4(0x156)]!==null)return _0x2ecc9b[_0xf1cb4(0x156)];if(typeof _0x2ecc9b===_0xf1cb4(0x15d)&&!(_0xf1cb4(0x14f)in _0x2ecc9b&&'msg'in _0x2ecc9b))return _0x2ecc9b;throw new Error(_0xf1cb4(0x133)+_0x2ecc9b[_0xf1cb4(0x14f)]+',\x20msg:\x20'+_0x2ecc9b[_0xf1cb4(0x13c)]+')');}function unwrapList(_0x14d245){const _0x4680e1=a31_0x591648;return _0x14d245[_0x4680e1(0x156)]?.['items']??[];}export async function createProject(_0xc234d4){const _0x2e0491=a31_0x591648;manageClient[_0x2e0491(0x150)]();const _0x56950e=await manageClient[_0x2e0491(0x143)](MANAGE_PREFIX+'/projects',{'team_id':_0xc234d4[_0x2e0491(0x131)],'project_name':_0xc234d4[_0x2e0491(0x136)],'description':_0xc234d4[_0x2e0491(0x157)]??''});return unwrap(_0x56950e);}export async function listProjects(_0x2f68e0){const _0x1f8495=a31_0x591648;manageClient[_0x1f8495(0x150)]();const _0x7772b6=await manageClient[_0x1f8495(0x148)](MANAGE_PREFIX+_0x1f8495(0x153)+_0x2f68e0+_0x1f8495(0x13f));return unwrapList(_0x7772b6);}export async function getProjectVersions(_0x4d1222){const _0xaefba2=a31_0x591648;manageClient[_0xaefba2(0x150)]();const _0x2ad9da=await manageClient[_0xaefba2(0x148)](MANAGE_PREFIX+_0xaefba2(0x139)+_0x4d1222+_0xaefba2(0x145));return unwrapList(_0x2ad9da);}export async function createVersion(_0x4db940,_0x3bf400){const _0x23493f=a31_0x591648;manageClient[_0x23493f(0x150)]();const _0x2bd1be=await manageClient[_0x23493f(0x143)](MANAGE_PREFIX+'/projects/'+_0x4db940+'/versions',{'version_number':_0x3bf400,'description':_0x3bf400+_0x23493f(0x146)});return unwrap(_0x2bd1be);}export async function publishVersion(_0x2c49a5,_0x286a76){const _0x10ded3=a31_0x591648;manageClient['initialize']();const _0x1dd2a5=await manageClient['post'](MANAGE_PREFIX+_0x10ded3(0x139)+_0x2c49a5+_0x10ded3(0x142)+_0x286a76+_0x10ded3(0x14d));return unwrap(_0x1dd2a5);}export async function getDeploymentStatus(_0x4ba7eb){const _0x427343=a31_0x591648;manageClient[_0x427343(0x150)]();const _0x1ecc24=await manageClient['get'](_0x427343(0x13d)+_0x4ba7eb);return unwrap(_0x1ecc24);}export async function lookupDeployment(_0xb16581,_0x452ca6){const _0x1d884c=a31_0x591648;manageClient[_0x1d884c(0x150)]();const _0x2931dd=await manageClient[_0x1d884c(0x148)](MANAGE_PREFIX+_0x1d884c(0x13b)+_0xb16581+'/'+_0x452ca6);return unwrap(_0x2931dd);}export async function recallDeployment(_0x4aced8){const _0x419adb=a31_0x591648;manageClient['initialize']();const _0x571f5b=await manageClient['post'](MANAGE_PREFIX+_0x419adb(0x139)+_0x4aced8+_0x419adb(0x158));return unwrap(_0x571f5b);}export async function downloadFrontend(_0x253848,_0x23d3c3){const _0x53dac6=a31_0x591648;manageClient['initialize']();const _0x37a30a=await manageClient[_0x53dac6(0x148)](MANAGE_PREFIX+_0x53dac6(0x139)+_0x253848+_0x53dac6(0x142)+_0x23d3c3+_0x53dac6(0x140));return unwrap(_0x37a30a);}export async function getProjectConfigs(_0x2b7239){const _0x2576ce=a31_0x591648;manageClient[_0x2576ce(0x150)]();const _0x1487ff=await manageClient[_0x2576ce(0x148)](MANAGE_PREFIX+_0x2576ce(0x139)+_0x2b7239+_0x2576ce(0x15b)),_0x120b0d=unwrap(_0x1487ff);if(Array[_0x2576ce(0x152)](_0x120b0d)){const _0x1a7026={};for(const _0x26e415 of _0x120b0d)_0x1a7026[_0x26e415[_0x2576ce(0x138)]]=_0x26e415[_0x2576ce(0x155)];return _0x1a7026;}return _0x120b0d;}export async function setProjectConfig(_0x94a0d5,_0xfa3dfb,_0x3be6d5){const _0x2bda85=a31_0x591648;manageClient[_0x2bda85(0x150)](),await manageClient[_0x2bda85(0x143)](MANAGE_PREFIX+_0x2bda85(0x139)+_0x94a0d5+'/configs',{'config_key':_0xfa3dfb,'config_value':_0x3be6d5});}export async function bindAppToProject(_0x593d8f,_0x14ae75,_0x3c08b8){const _0x820312=a31_0x591648;manageClient['initialize']();const _0x3bb05a=await manageClient[_0x820312(0x143)](MANAGE_PREFIX+_0x820312(0x139)+_0x593d8f+'/apps',{'open_app_id':_0x14ae75,'open_ssid':_0x3c08b8});return unwrap(_0x3bb05a);}export async function setDeploymentVisibility(_0x4eeee,_0x16af94,_0x53206a){const _0x43b69e=a31_0x591648;manageClient[_0x43b69e(0x150)]();const _0x5d9121={'visibility':_0x16af94};_0x16af94===_0x43b69e(0x15a)&&_0x53206a?.[_0x43b69e(0x132)]&&(_0x5d9121[_0x43b69e(0x13e)]=_0x53206a);const _0x1e330c=await manageClient[_0x43b69e(0x143)](MANAGE_PREFIX+'/projects/'+_0x4eeee+_0x43b69e(0x13a),_0x5d9121);return unwrap(_0x1e330c);}export async function getDeploymentVisibility(_0x161024){const _0x2e3cda=a31_0x591648;manageClient[_0x2e3cda(0x150)]();const _0x2a151c=await manageClient['get'](MANAGE_PREFIX+_0x2e3cda(0x139)+_0x161024+'/deployment/visibility');return unwrap(_0x2a151c);}export async function updateProjectAppScopes(_0x1e67d5,_0x1b2567,_0x3b90cc){const _0x5e021a=a31_0x591648;manageClient[_0x5e021a(0x150)]();const _0x12adc7=await manageClient[_0x5e021a(0x143)](MANAGE_PREFIX+'/projects/'+_0x1e67d5+'/apps/'+_0x1b2567+_0x5e021a(0x151),{'scopes':_0x3b90cc});return unwrap(_0x12adc7);}
@@ -1 +1 @@
1
- (function(_0x1ddc88,_0xfca07b){const _0x3b7f5c=a31_0x29a2,_0x176e40=_0x1ddc88();while(!![]){try{const _0x1fb701=parseInt(_0x3b7f5c(0x1bc))/0x1*(parseInt(_0x3b7f5c(0x1b7))/0x2)+parseInt(_0x3b7f5c(0x1d8))/0x3*(-parseInt(_0x3b7f5c(0x1b3))/0x4)+parseInt(_0x3b7f5c(0x1c2))/0x5*(parseInt(_0x3b7f5c(0x1ba))/0x6)+parseInt(_0x3b7f5c(0x1b5))/0x7+parseInt(_0x3b7f5c(0x1bf))/0x8*(parseInt(_0x3b7f5c(0x1b1))/0x9)+-parseInt(_0x3b7f5c(0x1c7))/0xa*(-parseInt(_0x3b7f5c(0x1b8))/0xb)+parseInt(_0x3b7f5c(0x1b2))/0xc*(-parseInt(_0x3b7f5c(0x1ce))/0xd);if(_0x1fb701===_0xfca07b)break;else _0x176e40['push'](_0x176e40['shift']());}catch(_0x3515cd){_0x176e40['push'](_0x176e40['shift']());}}}(a31_0x4069,0x37354));function a31_0x29a2(_0x2e3ff4,_0x36d8b7){_0x2e3ff4=_0x2e3ff4-0x1b0;const _0x406919=a31_0x4069();let _0x29a29c=_0x406919[_0x2e3ff4];return _0x29a29c;}import{getThreadState}from'./cloud-agent.js';import{getBuildStatus}from'./cloud-publish.js';import{getProjectVersions}from'./manage.js';function extractDescription(_0x2d67a3){const _0x452a2a=a31_0x29a2;if(typeof _0x2d67a3==='string')return _0x2d67a3;if(!_0x2d67a3||typeof _0x2d67a3!==_0x452a2a(0x1c9))return null;const _0x291388=_0x2d67a3;return _0x291388[_0x452a2a(0x1b9)]??_0x291388['message']??_0x291388[_0x452a2a(0x1b0)]??null;}function extractInterrupt(_0x277866){const _0x402477=a31_0x29a2;for(const _0x575bee of _0x277866){const _0x2797f2=_0x575bee,_0x252fd5=_0x2797f2[_0x402477(0x1bd)];if(_0x252fd5?.[_0x402477(0x1b6)]){const _0x12dc0f=_0x252fd5[0x0],_0x46fd41=_0x12dc0f[_0x402477(0x1cb)];return{'waiting':!![],'description':extractDescription(_0x46fd41),'value':_0x46fd41};}}return{'waiting':![]};}function settled(_0x4d1b3c){const _0x207ecf=a31_0x29a2;return _0x4d1b3c[_0x207ecf(0x1d4)]===_0x207ecf(0x1bb)?_0x4d1b3c['value']:null;}function buildAgentBlock(_0x34936e){const _0x25e865=a31_0x29a2;if(!_0x34936e)return{'messages_count':0x0,'file_count':0x0,'has_todos':![],'tasks_count':0x0};const _0x55dc65=_0x34936e[_0x25e865(0x1d3)]?.[_0x25e865(0x1d2)],_0xd871a9=_0x34936e['values']?.['files'],_0x1607e9=_0x34936e[_0x25e865(0x1d3)]?.[_0x25e865(0x1d6)];let _0x44e8f8=0x0;return _0xd871a9&&typeof _0xd871a9===_0x25e865(0x1c9)&&(_0x44e8f8=Object[_0x25e865(0x1be)](_0xd871a9)[_0x25e865(0x1b6)]),{'messages_count':Array[_0x25e865(0x1c6)](_0x55dc65)?_0x55dc65['length']:0x0,'file_count':_0x44e8f8,'has_todos':Array['isArray'](_0x1607e9)?_0x1607e9[_0x25e865(0x1b6)]>0x0:![],'tasks_count':Array[_0x25e865(0x1c6)](_0x34936e[_0x25e865(0x1ca)])?_0x34936e['tasks'][_0x25e865(0x1b6)]:0x0};}function buildBuildBlock(_0x164d4c){const _0x3683a9=a31_0x29a2;if(!_0x164d4c)return{'phase':_0x3683a9(0x1cd),'message':''};return{'phase':_0x164d4c['phase'],'message':_0x164d4c['message']};}function buildDeployBlock(_0x54cf87){const _0x5cfc1e=a31_0x29a2;if(!_0x54cf87)return{'status':'none','access_url':null,'short_url':null};const _0xe26999=_0x54cf87['result']?.[_0x5cfc1e(0x1d0)];if(!_0xe26999)return{'status':_0x5cfc1e(0x1cd),'access_url':null,'short_url':null};const _0x363763={'deployed':_0x5cfc1e(0x1c5),'deploying':_0x5cfc1e(0x1c0),'failed':_0x5cfc1e(0x1c8)};return{'status':_0x363763[_0xe26999[_0x5cfc1e(0x1c1)]??'']??_0x5cfc1e(0x1cd),'access_url':_0xe26999[_0x5cfc1e(0x1d7)]||null,'short_url':_0xe26999[_0x5cfc1e(0x1d1)]||null};}function buildProjectBlock(_0x1b8240,_0x669525){const _0x133d7b=a31_0x29a2;if(!_0x669525)return{'id':_0x1b8240,'name':null,'versions_count':0x0,'latest_version':null};const _0x4659ea=[..._0x669525][_0x133d7b(0x1c4)]((_0x39c669,_0xf0b75)=>_0xf0b75[_0x133d7b(0x1d5)]-_0x39c669[_0x133d7b(0x1d5)]);return{'id':_0x1b8240,'name':null,'versions_count':_0x669525['length'],'latest_version':_0x4659ea[0x0]?.[_0x133d7b(0x1c3)]??null};}export async function getProjectContext(_0x32a3ef,_0x1dfe4a){const _0x2d67f9=a31_0x29a2,[_0x390e48,_0x39b3e7,_0x289fdb]=await Promise[_0x2d67f9(0x1b4)]([getThreadState(_0x32a3ef),getBuildStatus(_0x32a3ef),_0x1dfe4a?getProjectVersions(_0x1dfe4a):Promise[_0x2d67f9(0x1cc)](null)]),_0x3c26f2=settled(_0x390e48),_0x3e3312=settled(_0x39b3e7),_0x24fb55=settled(_0x289fdb),_0x4c3d15=buildDeployBlock(_0x3e3312),_0x378f1a=buildAgentBlock(_0x3c26f2),_0x345588=_0x3c26f2?(_0x3c26f2[_0x2d67f9(0x1cf)]?.[_0x2d67f9(0x1b6)]??0x0)>0x0:![];return{'thread_id':_0x32a3ef,'agent':{..._0x378f1a,'running':_0x345588},'interrupt':extractInterrupt(_0x3c26f2?.['tasks']??[]),'build':buildBuildBlock(_0x3e3312),'deploy':_0x4c3d15,'project':_0x1dfe4a!=null?buildProjectBlock(_0x1dfe4a,_0x24fb55):null,'urls':{'runtime':_0x4c3d15[_0x2d67f9(0x1d1)]||_0x4c3d15['access_url'],'short_url':_0x4c3d15[_0x2d67f9(0x1d1)]}};}function a31_0x4069(){const _0x2ae7d5=['528143LkTEUR','length','820xYeNIK','1276lcchrQ','description','12cadFmG','fulfilled','360xlgwxA','interrupts','keys','8Roazxs','deploying','deploy_status','528240VVCjSg','version_number','sort','deployed','isArray','32380amnOnt','failed','object','tasks','value','resolve','none','3506165YvSWxN','next','publishResponse','short_url','messages','values','status','created_at','todos','access_url','9441JsyrYR','type','3075597zVYHCT','36TislPb','148gyAIZF','allSettled'];a31_0x4069=function(){return _0x2ae7d5;};return a31_0x4069();}
1
+ (function(_0x2360e6,_0x285018){const _0x3dece0=a32_0x46f6,_0x5d4d6b=_0x2360e6();while(!![]){try{const _0xae1cd=-parseInt(_0x3dece0(0xbf))/0x1+parseInt(_0x3dece0(0xd0))/0x2*(parseInt(_0x3dece0(0xc2))/0x3)+parseInt(_0x3dece0(0xcc))/0x4+-parseInt(_0x3dece0(0xc1))/0x5*(parseInt(_0x3dece0(0xca))/0x6)+-parseInt(_0x3dece0(0xd7))/0x7+parseInt(_0x3dece0(0xc3))/0x8+-parseInt(_0x3dece0(0xe0))/0x9*(parseInt(_0x3dece0(0xd4))/0xa);if(_0xae1cd===_0x285018)break;else _0x5d4d6b['push'](_0x5d4d6b['shift']());}catch(_0x1bba17){_0x5d4d6b['push'](_0x5d4d6b['shift']());}}}(a32_0x5929,0x73b28));import{getThreadState}from'./cloud-agent.js';import{getBuildStatus}from'./cloud-publish.js';import{getProjectVersions}from'./manage.js';function extractDescription(_0xbe2767){const _0x49bfcf=a32_0x46f6;if(typeof _0xbe2767==='string')return _0xbe2767;if(!_0xbe2767||typeof _0xbe2767!==_0x49bfcf(0xc9))return null;const _0x33695f=_0xbe2767;return _0x33695f[_0x49bfcf(0xc4)]??_0x33695f['message']??_0x33695f[_0x49bfcf(0xc8)]??null;}function extractInterrupt(_0x1e7e80){const _0x5da89e=a32_0x46f6;for(const _0x16cbb6 of _0x1e7e80){const _0x5c97de=_0x16cbb6,_0x83bc63=_0x5c97de[_0x5da89e(0xc6)];if(_0x83bc63?.[_0x5da89e(0xdf)]){const _0x524626=_0x83bc63[0x0],_0x96b972=_0x524626['value'];return{'waiting':!![],'description':extractDescription(_0x96b972),'value':_0x96b972};}}return{'waiting':![]};}function a32_0x46f6(_0x29bf72,_0x2b2cb3){_0x29bf72=_0x29bf72-0xbe;const _0x59291b=a32_0x5929();let _0x46f6f4=_0x59291b[_0x29bf72];return _0x46f6f4;}function settled(_0x37f2fe){const _0x504dc8=a32_0x46f6;return _0x37f2fe[_0x504dc8(0xd8)]==='fulfilled'?_0x37f2fe['value']:null;}function buildAgentBlock(_0x5f4225){const _0x304446=a32_0x46f6;if(!_0x5f4225)return{'messages_count':0x0,'file_count':0x0,'has_todos':![],'tasks_count':0x0};const _0x54a5da=_0x5f4225[_0x304446(0xdd)]?.[_0x304446(0xd3)],_0x4c1958=_0x5f4225['values']?.[_0x304446(0xd5)],_0x5ae931=_0x5f4225[_0x304446(0xdd)]?.[_0x304446(0xcf)];let _0x58deae=0x0;return _0x4c1958&&typeof _0x4c1958==='object'&&(_0x58deae=Object[_0x304446(0xbe)](_0x4c1958)[_0x304446(0xdf)]),{'messages_count':Array[_0x304446(0xc7)](_0x54a5da)?_0x54a5da[_0x304446(0xdf)]:0x0,'file_count':_0x58deae,'has_todos':Array[_0x304446(0xc7)](_0x5ae931)?_0x5ae931[_0x304446(0xdf)]>0x0:![],'tasks_count':Array['isArray'](_0x5f4225['tasks'])?_0x5f4225['tasks'][_0x304446(0xdf)]:0x0};}function buildBuildBlock(_0x209096){const _0x4790ac=a32_0x46f6;if(!_0x209096)return{'phase':_0x4790ac(0xe1),'message':''};return{'phase':_0x209096['phase'],'message':_0x209096['message']};}function buildDeployBlock(_0x2e7da2){const _0x265e38=a32_0x46f6;if(!_0x2e7da2)return{'status':'none','access_url':null,'short_url':null};const _0x349e54=_0x2e7da2[_0x265e38(0xcd)]?.[_0x265e38(0xde)];if(!_0x349e54)return{'status':_0x265e38(0xe1),'access_url':null,'short_url':null};const _0x2e304d={'deployed':_0x265e38(0xd9),'deploying':'deploying','failed':'failed'};return{'status':_0x2e304d[_0x349e54[_0x265e38(0xc5)]??'']??_0x265e38(0xe1),'access_url':_0x349e54[_0x265e38(0xdb)]||null,'short_url':_0x349e54['short_url']||null};}function a32_0x5929(){const _0x5c9a53=['1239972sQnDVX','7080528nWxGjT','description','deploy_status','interrupts','isArray','type','object','4198776zpXHhN','next','3589232bGuuKG','result','sort','todos','2yWpqvk','created_at','tasks','messages','22820jznHsQ','files','resolve','2771195YVPdNI','status','deployed','short_url','access_url','version_number','values','publishResponse','length','1719PEmDTO','none','keys','190259aPcnIk','allSettled','5HEWzqZ'];a32_0x5929=function(){return _0x5c9a53;};return a32_0x5929();}function buildProjectBlock(_0x407ff9,_0x286b6f){const _0x4148a7=a32_0x46f6;if(!_0x286b6f)return{'id':_0x407ff9,'name':null,'versions_count':0x0,'latest_version':null};const _0xe8b29a=[..._0x286b6f][_0x4148a7(0xce)]((_0x5a7142,_0x356394)=>_0x356394[_0x4148a7(0xd1)]-_0x5a7142[_0x4148a7(0xd1)]);return{'id':_0x407ff9,'name':null,'versions_count':_0x286b6f['length'],'latest_version':_0xe8b29a[0x0]?.[_0x4148a7(0xdc)]??null};}export async function getProjectContext(_0x949c95,_0x25c8b4){const _0x12d260=a32_0x46f6,[_0x1ff9f5,_0x199570,_0x219bd3]=await Promise[_0x12d260(0xc0)]([getThreadState(_0x949c95),getBuildStatus(_0x949c95),_0x25c8b4?getProjectVersions(_0x25c8b4):Promise[_0x12d260(0xd6)](null)]),_0x43b4c5=settled(_0x1ff9f5),_0x237b25=settled(_0x199570),_0x50da64=settled(_0x219bd3),_0x4744a0=buildDeployBlock(_0x237b25),_0x9b4f43=buildAgentBlock(_0x43b4c5),_0x409f98=_0x43b4c5?(_0x43b4c5[_0x12d260(0xcb)]?.[_0x12d260(0xdf)]??0x0)>0x0:![];return{'thread_id':_0x949c95,'agent':{..._0x9b4f43,'running':_0x409f98},'interrupt':extractInterrupt(_0x43b4c5?.[_0x12d260(0xd2)]??[]),'build':buildBuildBlock(_0x237b25),'deploy':_0x4744a0,'project':_0x25c8b4!=null?buildProjectBlock(_0x25c8b4,_0x50da64):null,'urls':{'runtime':_0x4744a0[_0x12d260(0xda)]||_0x4744a0[_0x12d260(0xdb)],'short_url':_0x4744a0[_0x12d260(0xda)]}};}
@@ -875,7 +875,76 @@
875
875
  "code",
876
876
  "upload.js"
877
877
  ]
878
+ },
879
+ "code:visibility": {
880
+ "aliases": [],
881
+ "args": {},
882
+ "description": "查看或设置项目的发布可见范围(仅自己 / 企业内 / 指定成员或团队)",
883
+ "examples": [
884
+ "<%= config.bin %> code visibility --project-id 477 --json",
885
+ "<%= config.bin %> code visibility --project-id 477 --set private",
886
+ "<%= config.bin %> code visibility --project-id 477 --set company --json",
887
+ "<%= config.bin %> code visibility --project-id 477 --set custom --grant user:100002 --grant team:100003",
888
+ "<%= config.bin %> code visibility --url https://o.wpsgo.com/app/41000207/6Ne2UkWT3ytn/ --set private"
889
+ ],
890
+ "flags": {
891
+ "json": {
892
+ "description": "Format output as json.",
893
+ "helpGroup": "GLOBAL",
894
+ "name": "json",
895
+ "allowNo": false,
896
+ "type": "boolean"
897
+ },
898
+ "project-id": {
899
+ "description": "项目 ID(与 --url 二选一)",
900
+ "name": "project-id",
901
+ "hasDynamicHelp": false,
902
+ "multiple": false,
903
+ "type": "option"
904
+ },
905
+ "url": {
906
+ "description": "应用短链 URL(与 --project-id 二选一)",
907
+ "name": "url",
908
+ "hasDynamicHelp": false,
909
+ "multiple": false,
910
+ "type": "option"
911
+ },
912
+ "set": {
913
+ "description": "设置可见范围: private | company | custom",
914
+ "name": "set",
915
+ "hasDynamicHelp": false,
916
+ "multiple": false,
917
+ "options": [
918
+ "private",
919
+ "company",
920
+ "custom"
921
+ ],
922
+ "type": "option"
923
+ },
924
+ "grant": {
925
+ "description": "授权对象,格式为 <type>:<id>(如 user:100002 或 team:100003),可多次指定;仅 --set custom 时有效",
926
+ "name": "grant",
927
+ "hasDynamicHelp": false,
928
+ "multiple": true,
929
+ "type": "option"
930
+ }
931
+ },
932
+ "hasDynamicHelp": false,
933
+ "hiddenAliases": [],
934
+ "id": "code:visibility",
935
+ "pluginAlias": "@wps365-open/comate-cli",
936
+ "pluginName": "@wps365-open/comate-cli",
937
+ "pluginType": "core",
938
+ "strict": true,
939
+ "enableJsonFlag": true,
940
+ "isESM": true,
941
+ "relativePath": [
942
+ "dist",
943
+ "commands",
944
+ "code",
945
+ "visibility.js"
946
+ ]
878
947
  }
879
948
  },
880
- "version": "0.0.20"
949
+ "version": "0.0.22"
881
950
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@wps365-open/comate-cli",
3
3
  "description": "comate-cli: A CLI for WpsCode application development",
4
- "version": "0.0.20",
4
+ "version": "0.0.22",
5
5
  "author": "xiaoyefang",
6
6
  "bin": {
7
7
  "comate-cli": "./bin/run.js"