@wps365-open/comate-cli 0.0.20 → 0.0.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- const 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 a30_0x1efb84=a30_0x30f6;function a30_0x3194(){const _0x57f102=['/deployment/recall','8657844AeVDsR','7358008XUzWcr','/api/runtime/v1/deployments/','/scopes/update','data','17597025UaGHHp','/deployments/','/versions/','36476Tuychc','3gCzbic','/versions','2997994eZUfFz','initialize','msg','/teams/my','/api/manage/v1','/projects?team_id=','8UQhpjZ','description','items','/teams','/thread','/configs','post','projectName','1071323tcRHOI','code','&page=1&page_size=100','isArray','config_value','5791885eriwDW','/apps/',',\x20msg:\x20','/projects','get','/apps','/projects/'];a30_0x3194=function(){return _0x57f102;};return a30_0x3194();}(function(_0x2b7e2e,_0x4854a6){const _0xfd270c=a30_0x30f6,_0xb36fba=_0x2b7e2e();while(!![]){try{const _0x5eff71=-parseInt(_0xfd270c(0x1aa))/0x1+parseInt(_0xfd270c(0x19c))/0x2*(-parseInt(_0xfd270c(0x19a))/0x3)+-parseInt(_0xfd270c(0x199))/0x4+parseInt(_0xfd270c(0x189))/0x5+parseInt(_0xfd270c(0x191))/0x6+-parseInt(_0xfd270c(0x192))/0x7+-parseInt(_0xfd270c(0x1a2))/0x8*(-parseInt(_0xfd270c(0x196))/0x9);if(_0x5eff71===_0x4854a6)break;else _0xb36fba['push'](_0xb36fba['shift']());}catch(_0x12dce4){_0xb36fba['push'](_0xb36fba['shift']());}}}(a30_0x3194,0xe2129));import{SimpleHttpClient}from'../http/client.js';import{APP_STUDIO_BASE}from'../config/constants.js';const manageClient=new SimpleHttpClient(APP_STUDIO_BASE),MANAGE_PREFIX=a30_0x1efb84(0x1a0);export async function getMyTeams(){const _0x13e2bb=a30_0x1efb84;manageClient[_0x13e2bb(0x19d)]();const _0x75dfd4=await manageClient['get'](MANAGE_PREFIX+_0x13e2bb(0x19f));if(Array[_0x13e2bb(0x1ad)](_0x75dfd4[_0x13e2bb(0x195)]?.[_0x13e2bb(0x1a4)]))return _0x75dfd4[_0x13e2bb(0x195)][_0x13e2bb(0x1a4)];const _0x1098f4=_0x75dfd4;return _0x1098f4[_0x13e2bb(0x1a4)]??[];}export async function createTeam(_0x1fa88f){const _0x447bc0=a30_0x1efb84;manageClient[_0x447bc0(0x19d)]();const _0x2225a1=await manageClient[_0x447bc0(0x1a8)](MANAGE_PREFIX+_0x447bc0(0x1a5),{'team_name':_0x1fa88f});return unwrap(_0x2225a1);}export async function upsertProjectThread(_0x91d88c,_0xa02460){const _0x5370b7=a30_0x1efb84;manageClient[_0x5370b7(0x19d)]();const _0x524ea3=await manageClient['post'](MANAGE_PREFIX+_0x5370b7(0x18f)+_0x91d88c+_0x5370b7(0x1a6),{'thread_id':_0xa02460});return unwrap(_0x524ea3);}export async function getProjectThread(_0x1f1c72){const _0x27c730=a30_0x1efb84;manageClient[_0x27c730(0x19d)]();const _0x536e9d=await manageClient[_0x27c730(0x18d)](MANAGE_PREFIX+_0x27c730(0x18f)+_0x1f1c72+'/thread');return unwrap(_0x536e9d);}function unwrap(_0x355c0c){const _0x328a42=a30_0x1efb84;if(_0x355c0c[_0x328a42(0x195)]!==undefined&&_0x355c0c[_0x328a42(0x195)]!==null)return _0x355c0c['data'];if(typeof _0x355c0c==='object'&&!(_0x328a42(0x1ab)in _0x355c0c&&_0x328a42(0x19e)in _0x355c0c))return _0x355c0c;throw new Error('API\x20返回数据为空\x20(code:\x20'+_0x355c0c[_0x328a42(0x1ab)]+_0x328a42(0x18b)+_0x355c0c[_0x328a42(0x19e)]+')');}function unwrapList(_0x557658){const _0x41e49c=a30_0x1efb84;return _0x557658['data']?.[_0x41e49c(0x1a4)]??[];}export async function createProject(_0x597287){const _0x377caf=a30_0x1efb84;manageClient['initialize']();const _0x5e3615=await manageClient[_0x377caf(0x1a8)](MANAGE_PREFIX+_0x377caf(0x18c),{'team_id':_0x597287['teamId'],'project_name':_0x597287[_0x377caf(0x1a9)],'description':_0x597287[_0x377caf(0x1a3)]??''});return unwrap(_0x5e3615);}export async function listProjects(_0x70b63b){const _0x1f1ae0=a30_0x1efb84;manageClient['initialize']();const _0x152893=await manageClient[_0x1f1ae0(0x18d)](MANAGE_PREFIX+_0x1f1ae0(0x1a1)+_0x70b63b+_0x1f1ae0(0x1ac));return unwrapList(_0x152893);}export async function getProjectVersions(_0x452dda){const _0xa38d44=a30_0x1efb84;manageClient['initialize']();const _0x53765f=await manageClient[_0xa38d44(0x18d)](MANAGE_PREFIX+_0xa38d44(0x18f)+_0x452dda+_0xa38d44(0x19b));return unwrapList(_0x53765f);}export async function createVersion(_0xdd5ebd,_0x14429b){const _0x3250a9=a30_0x1efb84;manageClient[_0x3250a9(0x19d)]();const _0x5dc325=await manageClient[_0x3250a9(0x1a8)](MANAGE_PREFIX+_0x3250a9(0x18f)+_0xdd5ebd+_0x3250a9(0x19b),{'version_number':_0x14429b,'description':_0x14429b+'\x20version'});return unwrap(_0x5dc325);}export async function publishVersion(_0x402b96,_0x15683a){const _0x546c23=a30_0x1efb84;manageClient[_0x546c23(0x19d)]();const _0xee7bb3=await manageClient[_0x546c23(0x1a8)](MANAGE_PREFIX+_0x546c23(0x18f)+_0x402b96+_0x546c23(0x198)+_0x15683a+'/publish');return unwrap(_0xee7bb3);}export async function getDeploymentStatus(_0x4e127d){const _0x26b69e=a30_0x1efb84;manageClient[_0x26b69e(0x19d)]();const _0x2451e1=await manageClient[_0x26b69e(0x18d)](_0x26b69e(0x193)+_0x4e127d);return unwrap(_0x2451e1);}export async function lookupDeployment(_0x2e6cf7,_0x12c79d){const _0x20ae64=a30_0x1efb84;manageClient[_0x20ae64(0x19d)]();const _0x71d685=await manageClient[_0x20ae64(0x18d)](MANAGE_PREFIX+_0x20ae64(0x197)+_0x2e6cf7+'/'+_0x12c79d);return unwrap(_0x71d685);}export async function recallDeployment(_0x965abd){const _0x291887=a30_0x1efb84;manageClient['initialize']();const _0x450bdd=await manageClient[_0x291887(0x1a8)](MANAGE_PREFIX+_0x291887(0x18f)+_0x965abd+_0x291887(0x190));return unwrap(_0x450bdd);}export async function downloadFrontend(_0x5b905a,_0x5e0e0d){const _0x54b099=a30_0x1efb84;manageClient[_0x54b099(0x19d)]();const _0xc19b1b=await manageClient[_0x54b099(0x18d)](MANAGE_PREFIX+'/projects/'+_0x5b905a+_0x54b099(0x198)+_0x5e0e0d+'/frontend/download');return unwrap(_0xc19b1b);}export async function getProjectConfigs(_0x2d1c87){const _0x158dc1=a30_0x1efb84;manageClient['initialize']();const _0x436462=await manageClient['get'](MANAGE_PREFIX+_0x158dc1(0x18f)+_0x2d1c87+_0x158dc1(0x1a7)),_0x3d67d6=unwrap(_0x436462);if(Array['isArray'](_0x3d67d6)){const _0x328646={};for(const _0x553c7d of _0x3d67d6)_0x328646[_0x553c7d['config_key']]=_0x553c7d[_0x158dc1(0x188)];return _0x328646;}return _0x3d67d6;}export async function setProjectConfig(_0x5e1154,_0xf75480,_0x331a3c){const _0x4e4c8f=a30_0x1efb84;manageClient['initialize'](),await manageClient['post'](MANAGE_PREFIX+_0x4e4c8f(0x18f)+_0x5e1154+_0x4e4c8f(0x1a7),{'config_key':_0xf75480,'config_value':_0x331a3c});}function a30_0x30f6(_0x1c7dcd,_0x2392f6){_0x1c7dcd=_0x1c7dcd-0x188;const _0x31949d=a30_0x3194();let _0x30f648=_0x31949d[_0x1c7dcd];return _0x30f648;}export async function bindAppToProject(_0x3b933c,_0xc2296d,_0x402dce){const _0x1ca4a3=a30_0x1efb84;manageClient[_0x1ca4a3(0x19d)]();const _0x568877=await manageClient[_0x1ca4a3(0x1a8)](MANAGE_PREFIX+_0x1ca4a3(0x18f)+_0x3b933c+_0x1ca4a3(0x18e),{'open_app_id':_0xc2296d,'open_ssid':_0x402dce});return unwrap(_0x568877);}export async function updateProjectAppScopes(_0x3ad5d8,_0x5da010,_0x487bcc){const _0x452eae=a30_0x1efb84;manageClient[_0x452eae(0x19d)]();const _0x28e6e7=await manageClient[_0x452eae(0x1a8)](MANAGE_PREFIX+_0x452eae(0x18f)+_0x3ad5d8+_0x452eae(0x18a)+_0x5da010+_0x452eae(0x194),{'scopes':_0x487bcc});return unwrap(_0x28e6e7);}
@@ -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(_0x10fe0a,_0x3ff871){const _0x3c34d3=a31_0xc183,_0x17d839=_0x10fe0a();while(!![]){try{const _0x433d68=-parseInt(_0x3c34d3(0xa6))/0x1*(parseInt(_0x3c34d3(0x89))/0x2)+-parseInt(_0x3c34d3(0xa2))/0x3*(parseInt(_0x3c34d3(0x97))/0x4)+-parseInt(_0x3c34d3(0x8f))/0x5*(parseInt(_0x3c34d3(0xa3))/0x6)+-parseInt(_0x3c34d3(0x8a))/0x7+-parseInt(_0x3c34d3(0x9d))/0x8*(-parseInt(_0x3c34d3(0x87))/0x9)+-parseInt(_0x3c34d3(0x91))/0xa+-parseInt(_0x3c34d3(0xa5))/0xb*(-parseInt(_0x3c34d3(0x8b))/0xc);if(_0x433d68===_0x3ff871)break;else _0x17d839['push'](_0x17d839['shift']());}catch(_0xeae1a2){_0x17d839['push'](_0x17d839['shift']());}}}(a31_0xaabf,0x5dd16));import{getThreadState}from'./cloud-agent.js';import{getBuildStatus}from'./cloud-publish.js';function a31_0xc183(_0x479a2b,_0x535f38){_0x479a2b=_0x479a2b-0x82;const _0xaabfee=a31_0xaabf();let _0xc18394=_0xaabfee[_0x479a2b];return _0xc18394;}import{getProjectVersions}from'./manage.js';function a31_0xaabf(){const _0x5ca1a9=['version_number','result','16DvjEgV','none','string','phase','message','description','8uEbluX','fulfilled','type','object','deploy_status','55362dCpCkL','192462kgLSOP','deployed','6595534EXKLju','1nLeJEY','next','created_at','tasks','length','value','values','isArray','6419403zHHNnl','short_url','33778vdnUHO','1733144yejTQW','12rHDrzW','sort','files','access_url','60aAXsbW','failed','2053620nRLxsI','status','todos','resolve'];a31_0xaabf=function(){return _0x5ca1a9;};return a31_0xaabf();}function extractDescription(_0x174e74){const _0x589f9e=a31_0xc183;if(typeof _0x174e74===_0x589f9e(0x99))return _0x174e74;if(!_0x174e74||typeof _0x174e74!==_0x589f9e(0xa0))return null;const _0x238328=_0x174e74;return _0x238328[_0x589f9e(0x9c)]??_0x238328[_0x589f9e(0x9b)]??_0x238328[_0x589f9e(0x9f)]??null;}function extractInterrupt(_0x2af48){for(const _0x2c15c5 of _0x2af48){const _0x537772=_0x2c15c5,_0x3ff790=_0x537772['interrupts'];if(_0x3ff790?.['length']){const _0x36b56c=_0x3ff790[0x0],_0x58db9d=_0x36b56c['value'];return{'waiting':!![],'description':extractDescription(_0x58db9d),'value':_0x58db9d};}}return{'waiting':![]};}function settled(_0x2c6730){const _0x2524ef=a31_0xc183;return _0x2c6730[_0x2524ef(0x92)]===_0x2524ef(0x9e)?_0x2c6730[_0x2524ef(0x84)]:null;}function buildAgentBlock(_0x1443c1){const _0x309ba6=a31_0xc183;if(!_0x1443c1)return{'messages_count':0x0,'file_count':0x0,'has_todos':![],'tasks_count':0x0};const _0x46d06b=_0x1443c1[_0x309ba6(0x85)]?.['messages'],_0x3fb698=_0x1443c1[_0x309ba6(0x85)]?.[_0x309ba6(0x8d)],_0x53f8d3=_0x1443c1[_0x309ba6(0x85)]?.[_0x309ba6(0x93)];let _0x573154=0x0;return _0x3fb698&&typeof _0x3fb698==='object'&&(_0x573154=Object['keys'](_0x3fb698)['length']),{'messages_count':Array[_0x309ba6(0x86)](_0x46d06b)?_0x46d06b[_0x309ba6(0x83)]:0x0,'file_count':_0x573154,'has_todos':Array[_0x309ba6(0x86)](_0x53f8d3)?_0x53f8d3[_0x309ba6(0x83)]>0x0:![],'tasks_count':Array['isArray'](_0x1443c1[_0x309ba6(0x82)])?_0x1443c1[_0x309ba6(0x82)][_0x309ba6(0x83)]:0x0};}function buildBuildBlock(_0x52256a){const _0x15884a=a31_0xc183;if(!_0x52256a)return{'phase':_0x15884a(0x98),'message':''};return{'phase':_0x52256a[_0x15884a(0x9a)],'message':_0x52256a['message']};}function buildDeployBlock(_0x1873be){const _0x344747=a31_0xc183;if(!_0x1873be)return{'status':_0x344747(0x98),'access_url':null,'short_url':null};const _0x3e8fc3=_0x1873be[_0x344747(0x96)]?.['publishResponse'];if(!_0x3e8fc3)return{'status':'none','access_url':null,'short_url':null};const _0x3353a3={'deployed':_0x344747(0xa4),'deploying':'deploying','failed':_0x344747(0x90)};return{'status':_0x3353a3[_0x3e8fc3[_0x344747(0xa1)]??'']??_0x344747(0x98),'access_url':_0x3e8fc3[_0x344747(0x8e)]||null,'short_url':_0x3e8fc3[_0x344747(0x88)]||null};}function buildProjectBlock(_0x26892f,_0x3d2009){const _0x3bcc35=a31_0xc183;if(!_0x3d2009)return{'id':_0x26892f,'name':null,'versions_count':0x0,'latest_version':null};const _0x58fa7b=[..._0x3d2009][_0x3bcc35(0x8c)]((_0x470083,_0x261e7e)=>_0x261e7e['created_at']-_0x470083[_0x3bcc35(0xa8)]);return{'id':_0x26892f,'name':null,'versions_count':_0x3d2009['length'],'latest_version':_0x58fa7b[0x0]?.[_0x3bcc35(0x95)]??null};}export async function getProjectContext(_0x2f5be7,_0x358628){const _0x2420dc=a31_0xc183,[_0x1cf768,_0x14ef97,_0x289f91]=await Promise['allSettled']([getThreadState(_0x2f5be7),getBuildStatus(_0x2f5be7),_0x358628?getProjectVersions(_0x358628):Promise[_0x2420dc(0x94)](null)]),_0x4c434f=settled(_0x1cf768),_0x410435=settled(_0x14ef97),_0x41a618=settled(_0x289f91),_0x17e0af=buildDeployBlock(_0x410435),_0x4341ad=buildAgentBlock(_0x4c434f),_0x29fa50=_0x4c434f?(_0x4c434f[_0x2420dc(0xa7)]?.[_0x2420dc(0x83)]??0x0)>0x0:![];return{'thread_id':_0x2f5be7,'agent':{..._0x4341ad,'running':_0x29fa50},'interrupt':extractInterrupt(_0x4c434f?.[_0x2420dc(0x82)]??[]),'build':buildBuildBlock(_0x410435),'deploy':_0x17e0af,'project':_0x358628!=null?buildProjectBlock(_0x358628,_0x41a618):null,'urls':{'runtime':_0x17e0af[_0x2420dc(0x88)]||_0x17e0af[_0x2420dc(0x8e)],'short_url':_0x17e0af[_0x2420dc(0x88)]}};}
@@ -877,5 +877,5 @@
877
877
  ]
878
878
  }
879
879
  },
880
- "version": "0.0.20"
880
+ "version": "0.0.21"
881
881
  }
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.21",
5
5
  "author": "xiaoyefang",
6
6
  "bin": {
7
7
  "comate-cli": "./bin/run.js"