@lovrabet/cli 1.1.16 → 1.1.18

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 (55) hide show
  1. package/lib/add-page/input-page-router.js +1 -1
  2. package/lib/add-page/main.js +1 -1
  3. package/lib/add-page/select-page-template.js +1 -1
  4. package/lib/api/api-doc-ui.js +1 -1
  5. package/lib/api/api-doc.js +1 -1
  6. package/lib/api/api-pull-ui.js +1 -1
  7. package/lib/api/fetch-model-list.js +1 -0
  8. package/lib/api/generate-api-file.js +1 -1
  9. package/lib/api/main.js +1 -1
  10. package/lib/api/pull-silent.js +1 -1
  11. package/lib/app-menu/app-menu-sync-ui.js +1 -1
  12. package/lib/app-menu/create-menu.js +1 -1
  13. package/lib/app-menu/get-local-pages.js +1 -1
  14. package/lib/app-menu/get-online-menu-list.js +1 -1
  15. package/lib/app-menu/valid-url.js +1 -1
  16. package/lib/auth/auth-server-ui.js +1 -1
  17. package/lib/auth/auth-server.js +1 -1
  18. package/lib/auth/constant.js +1 -1
  19. package/lib/auth/get-cookie.js +1 -1
  20. package/lib/auth/is-session-valid.js +1 -1
  21. package/lib/auth/logout.js +1 -1
  22. package/lib/cli.js +1 -1
  23. package/lib/cmd/build-watch.js +1 -1
  24. package/lib/cmd/build.js +1 -1
  25. package/lib/cmd/logs.js +1 -1
  26. package/lib/cmd/preview.js +1 -1
  27. package/lib/cmd/start.js +1 -1
  28. package/lib/config/config-help.js +1 -1
  29. package/lib/config/main.js +1 -1
  30. package/lib/constant/domain.js +1 -1
  31. package/lib/constant/env.js +1 -1
  32. package/lib/create-app/enhanced-guided-create.js +1 -1
  33. package/lib/create-app/format-elapsed.js +1 -1
  34. package/lib/create-app/main.js +1 -1
  35. package/lib/create-app/task-finished.js +1 -1
  36. package/lib/create-app/task-loading.js +1 -1
  37. package/lib/create-app/task-running.js +1 -1
  38. package/lib/create-app/task-time.js +1 -1
  39. package/lib/create-app/use-copy-project-template.js +1 -1
  40. package/lib/create-app/use-format-code.js +1 -1
  41. package/lib/create-app/use-install-dependencies.js +1 -1
  42. package/lib/help.js +1 -1
  43. package/lib/init/main.js +1 -1
  44. package/lib/utils/config.js +1 -1
  45. package/lib/utils/copy-directory.js +1 -1
  46. package/lib/utils/http-client.js +1 -1
  47. package/lib/utils/logger.js +1 -1
  48. package/lib/utils/router-updater.js +1 -1
  49. package/lib/utils/sleep.js +1 -1
  50. package/lib/utils/template-replacer.js +1 -1
  51. package/package.json +1 -1
  52. package/lib/api/fetch-datasets.js +0 -1
  53. package/lib/api/format-dataset.js +0 -1
  54. package/lib/api/pull.js +0 -1
  55. package/lib/api/types.js +0 -1
@@ -1 +1 @@
1
- function a15_0x52ed(_0x10bbcc,_0x19245e){const _0x474257=a15_0x4742();return a15_0x52ed=function(_0x52ed0c,_0x42b296){_0x52ed0c=_0x52ed0c-0x19c;let _0x5c2ca0=_0x474257[_0x52ed0c];return _0x5c2ca0;},a15_0x52ed(_0x10bbcc,_0x19245e);}const a15_0x309c06=a15_0x52ed;(function(_0x196936,_0x39122b){const _0x1c8e7b=a15_0x52ed,_0x4d7868=_0x196936();while(!![]){try{const _0x45f7eb=-parseInt(_0x1c8e7b(0x19d))/0x1*(-parseInt(_0x1c8e7b(0x1a7))/0x2)+-parseInt(_0x1c8e7b(0x19c))/0x3+-parseInt(_0x1c8e7b(0x1ad))/0x4+parseInt(_0x1c8e7b(0x1a6))/0x5+parseInt(_0x1c8e7b(0x1b3))/0x6*(-parseInt(_0x1c8e7b(0x1a5))/0x7)+parseInt(_0x1c8e7b(0x1b1))/0x8*(parseInt(_0x1c8e7b(0x1a1))/0x9)+-parseInt(_0x1c8e7b(0x1ac))/0xa*(-parseInt(_0x1c8e7b(0x19f))/0xb);if(_0x45f7eb===_0x39122b)break;else _0x4d7868['push'](_0x4d7868['shift']());}catch(_0x32a8ff){_0x4d7868['push'](_0x4d7868['shift']());}}}(a15_0x4742,0x8d91d));import{readdirSync,statSync,readFileSync}from'fs';import{join,relative,resolve}from'path';const pagesDir=resolve(process[a15_0x309c06(0x1ab)](),a15_0x309c06(0x1b0));export function extractTitleFromComment(_0x427f80){const _0xfeef96=a15_0x309c06;try{const _0x74bea9=readFileSync(_0x427f80,'utf-8'),_0x19655f=_0x74bea9[_0xfeef96(0x1ae)](/^\s*\/\*\*?([\s\S]*?)\*\//);if(_0x19655f&&_0x19655f[0x1]){const _0x4e0f05=_0x19655f[0x1],_0x1d2629=_0x4e0f05[_0xfeef96(0x1ae)](/^\s*\*?\s*title\s*:\s*(.+)/im);if(_0x1d2629&&_0x1d2629[0x1])return _0x1d2629[0x1][_0xfeef96(0x1a0)]();}let _0x1906f6=null;const _0x4ee0cc=_0x74bea9['match'](/export\s+default\s+([A-Z][a-zA-Z0-9]*)/);_0x4ee0cc&&_0x4ee0cc[0x1]&&(_0x1906f6=_0x4ee0cc[0x1]);if(!_0x1906f6){const _0x4ca3ab=_0x74bea9[_0xfeef96(0x1ae)](/export\s+default\s+function\s+([A-Z][a-zA-Z0-9]*)/);_0x4ca3ab&&_0x4ca3ab[0x1]&&(_0x1906f6=_0x4ca3ab[0x1]);}if(_0x1906f6){const _0x4403ca=new RegExp('\x5cb'+_0x1906f6+_0xfeef96(0x1a3)),_0x10c2b6=_0x74bea9[_0xfeef96(0x1ae)](_0x4403ca);if(_0x10c2b6&&_0x10c2b6[0x1])return _0x10c2b6[0x1];return _0x1906f6;}return null;}catch(_0x54cb16){return null;}}export function getLocalPages(_0x7a083=pagesDir,_0x1c7803=pagesDir){const _0x52e899=a15_0x309c06;let _0x4ec2dc=[];const _0x202bae=readdirSync(_0x7a083);return _0x202bae[_0x52e899(0x1b2)](_0x41b6eb=>{const _0x1cd54c=_0x52e899,_0x550ec1=join(_0x7a083,_0x41b6eb),_0x461ae8=statSync(_0x550ec1);if(_0x461ae8&&_0x461ae8[_0x1cd54c(0x19e)]())_0x4ec2dc=_0x4ec2dc['concat'](getLocalPages(_0x550ec1,_0x1c7803));else{if(_0x41b6eb[_0x1cd54c(0x1a9)](_0x1cd54c(0x1aa))){let _0x3afad4=relative(_0x1c7803,_0x550ec1);_0x3afad4[_0x1cd54c(0x1a9)](_0x1cd54c(0x1b4))?_0x3afad4=_0x3afad4[_0x1cd54c(0x1a8)](/index\.tsx$/,''):_0x3afad4=_0x3afad4[_0x1cd54c(0x1a8)](/\.tsx$/,'');_0x3afad4['endsWith']('/')&&(_0x3afad4=_0x3afad4[_0x1cd54c(0x1a2)](0x0,-0x1));const _0x26ab1e=extractTitleFromComment(_0x550ec1),_0x5d7337=_0x26ab1e||_0x3afad4;_0x4ec2dc['push']({'path':_0x3afad4,'label':_0x5d7337});}}}),_0x4ec2dc[_0x52e899(0x1af)](_0x324093=>_0x324093[_0x52e899(0x1a4)]!=='');}function a15_0x4742(){const _0x273b85=['1071705rbKsDS','2eYTnyk','replace','endsWith','.tsx','cwd','10Yefeoe','4392696tfGyEK','match','filter','src/pages','328nVdATk','forEach','6iFqZHp','index.tsx','817251uMDrrv','528401OInriU','isDirectory','7689946CMdAsy','trim','170811mfghNi','slice','\x5c.displayName\x5cs*=\x5cs*[\x22\x27]([^\x22\x27]+)[\x22\x27]','path','1886549ninSUz'];a15_0x4742=function(){return _0x273b85;};return a15_0x4742();}
1
+ function a12_0x4072(_0x21204e,_0x4cc736){const _0x4d397c=a12_0x4d39();return a12_0x4072=function(_0x407241,_0x398cd2){_0x407241=_0x407241-0x19f;let _0x1aaa34=_0x4d397c[_0x407241];return _0x1aaa34;},a12_0x4072(_0x21204e,_0x4cc736);}const a12_0x401e7a=a12_0x4072;(function(_0x3f6e7a,_0x51a1c4){const _0x26e320=a12_0x4072,_0x13ebd5=_0x3f6e7a();while(!![]){try{const _0x2cece0=parseInt(_0x26e320(0x1a0))/0x1+parseInt(_0x26e320(0x1ab))/0x2*(-parseInt(_0x26e320(0x1b2))/0x3)+-parseInt(_0x26e320(0x1a9))/0x4*(parseInt(_0x26e320(0x1b4))/0x5)+parseInt(_0x26e320(0x1a5))/0x6+-parseInt(_0x26e320(0x1ac))/0x7*(parseInt(_0x26e320(0x1b1))/0x8)+-parseInt(_0x26e320(0x1b3))/0x9*(-parseInt(_0x26e320(0x1af))/0xa)+parseInt(_0x26e320(0x1a8))/0xb;if(_0x2cece0===_0x51a1c4)break;else _0x13ebd5['push'](_0x13ebd5['shift']());}catch(_0x4cc884){_0x13ebd5['push'](_0x13ebd5['shift']());}}}(a12_0x4d39,0x9517d));import{readdirSync,statSync,readFileSync}from'fs';import{join,relative,resolve}from'path';const pagesDir=resolve(process[a12_0x401e7a(0x19f)](),a12_0x401e7a(0x1b0));export function extractTitleFromComment(_0x2b1f00){const _0x436d9d=a12_0x401e7a;try{const _0x428180=readFileSync(_0x2b1f00,_0x436d9d(0x1a3)),_0x436bd8=_0x428180[_0x436d9d(0x1a1)](/^\s*\/\*\*?([\s\S]*?)\*\//);if(_0x436bd8&&_0x436bd8[0x1]){const _0xfb4be3=_0x436bd8[0x1],_0x3161a4=_0xfb4be3[_0x436d9d(0x1a1)](/^\s*\*?\s*title\s*:\s*(.+)/im);if(_0x3161a4&&_0x3161a4[0x1])return _0x3161a4[0x1]['trim']();}let _0x282824=null;const _0x3ad3a0=_0x428180['match'](/export\s+default\s+([A-Z][a-zA-Z0-9]*)/);_0x3ad3a0&&_0x3ad3a0[0x1]&&(_0x282824=_0x3ad3a0[0x1]);if(!_0x282824){const _0x584872=_0x428180['match'](/export\s+default\s+function\s+([A-Z][a-zA-Z0-9]*)/);_0x584872&&_0x584872[0x1]&&(_0x282824=_0x584872[0x1]);}if(_0x282824){const _0x2f626f=new RegExp('\x5cb'+_0x282824+_0x436d9d(0x1a4)),_0x49383a=_0x428180['match'](_0x2f626f);if(_0x49383a&&_0x49383a[0x1])return _0x49383a[0x1];return _0x282824;}return null;}catch(_0x353ecf){return null;}}function a12_0x4d39(){const _0x2f0483=['2552803tjUArS','1132yaPNdb','forEach','754612uivtfn','7vEfxcS','concat','endsWith','10gZewGf','src/pages','4259720YXkIoX','9NLdvlq','9550449tmNjNY','4240sCZbCl','cwd','904524hxezij','match','replace','utf-8','\x5c.displayName\x5cs*=\x5cs*[\x22\x27]([^\x22\x27]+)[\x22\x27]','1903764MIuaDW','push','filter'];a12_0x4d39=function(){return _0x2f0483;};return a12_0x4d39();}export function getLocalPages(_0x25b28c=pagesDir,_0x171cbf=pagesDir){const _0x4c4cb4=a12_0x401e7a;let _0x16b644=[];const _0x164725=readdirSync(_0x25b28c);return _0x164725[_0x4c4cb4(0x1aa)](_0x13c4a9=>{const _0x188b42=_0x4c4cb4,_0x3fd233=join(_0x25b28c,_0x13c4a9),_0x1128dd=statSync(_0x3fd233);if(_0x1128dd&&_0x1128dd['isDirectory']())_0x16b644=_0x16b644[_0x188b42(0x1ad)](getLocalPages(_0x3fd233,_0x171cbf));else{if(_0x13c4a9[_0x188b42(0x1ae)]('.tsx')){let _0x1f7f19=relative(_0x171cbf,_0x3fd233);_0x1f7f19[_0x188b42(0x1ae)]('index.tsx')?_0x1f7f19=_0x1f7f19[_0x188b42(0x1a2)](/index\.tsx$/,''):_0x1f7f19=_0x1f7f19[_0x188b42(0x1a2)](/\.tsx$/,'');_0x1f7f19[_0x188b42(0x1ae)]('/')&&(_0x1f7f19=_0x1f7f19['slice'](0x0,-0x1));const _0x10b1ae=extractTitleFromComment(_0x3fd233),_0x2699fa=_0x10b1ae||_0x1f7f19;_0x16b644[_0x188b42(0x1a6)]({'path':_0x1f7f19,'label':_0x2699fa});}}}),_0x16b644[_0x4c4cb4(0x1a7)](_0x27acb3=>_0x27acb3['path']!=='');}
@@ -1 +1 @@
1
- function a16_0x1ecd(){const _0x19fcff=['306dNKTgC','/smartapi/menu/find?appCode=','74901GhabGd','map','1752tSuczG','4ojSoVP','\x20\x20\x201.\x20直接指定:\x20lovrabet\x20api\x20pull\x20<app-code>','label','286257gBdTNT','appcode','log','error','76890bWpEyb','6ONUnvv','GET','888685pWcoti','93820gUAUJr','json','finally','×\x20未提供应用AppCode,且配置中也没有默认值','path','2946054HuVvDX','!\x20请使用以下方式之一:','2006835jDDYjL','48GLVYHe'];a16_0x1ecd=function(){return _0x19fcff;};return a16_0x1ecd();}(function(_0x36c034,_0x3ca834){const _0x3513f0=a16_0x3e86,_0x14ff1d=_0x36c034();while(!![]){try{const _0x34be9f=parseInt(_0x3513f0(0xa8))/0x1+parseInt(_0x3513f0(0xb3))/0x2*(-parseInt(_0x3513f0(0xae))/0x3)+parseInt(_0x3513f0(0xab))/0x4*(-parseInt(_0x3513f0(0xa4))/0x5)+parseInt(_0x3513f0(0xa2))/0x6+-parseInt(_0x3513f0(0xb5))/0x7*(parseInt(_0x3513f0(0xa5))/0x8)+-parseInt(_0x3513f0(0xa6))/0x9*(-parseInt(_0x3513f0(0xb6))/0xa)+parseInt(_0x3513f0(0xb2))/0xb*(parseInt(_0x3513f0(0xaa))/0xc);if(_0x34be9f===_0x3ca834)break;else _0x14ff1d['push'](_0x14ff1d['shift']());}catch(_0x37f24e){_0x14ff1d['push'](_0x14ff1d['shift']());}}}(a16_0x1ecd,0x6f594));import{useEffect,useState}from'react';import{getCookie}from'../auth/get-cookie.js';import{getApiDomain}from'../constant/domain.js';import{readConfig}from'../utils/config.js';const config=readConfig();function a16_0x3e86(_0x2daafb,_0x163711){const _0x1ecd53=a16_0x1ecd();return a16_0x3e86=function(_0x3e86bc,_0x52dfca){_0x3e86bc=_0x3e86bc-0x9e;let _0x4081cf=_0x1ecd53[_0x3e86bc];return _0x4081cf;},a16_0x3e86(_0x2daafb,_0x163711);}export async function getOnlineMenuList(){const _0x1a0b20=a16_0x3e86,_0x28a46e=config?.[_0x1a0b20(0xaf)];if(!_0x28a46e)return console[_0x1a0b20(0xb1)](_0x1a0b20(0xa0)),console[_0x1a0b20(0xb0)](_0x1a0b20(0xa3)),console[_0x1a0b20(0xb0)](_0x1a0b20(0xac)),console[_0x1a0b20(0xb0)]('\x20\x20\x202.\x20配置默认值:\x20lovrabet\x20config\x20set\x20app\x20<app-code>'),[];const _0x3a3720=await fetch(getApiDomain()+_0x1a0b20(0xa7)+_0x28a46e,{'method':_0x1a0b20(0xb4),'headers':{'Content-Type':'application/json','Cookie':getCookie()}});if(_0x3a3720['ok']){const {data:_0xcc6ee}=await _0x3a3720[_0x1a0b20(0x9e)]();return _0xcc6ee[_0x1a0b20(0xa9)](_0x15212d=>({'path':_0x15212d[_0x1a0b20(0xa1)],'label':_0x15212d[_0x1a0b20(0xad)]}));}return[];}export function useGetOnlineMenuList(){const [_0x3982ea,_0x281603]=useState([]),[_0x47c968,_0x5b0ad6]=useState(!![]);return useEffect(()=>{const _0x2c7a4c=a16_0x3e86;_0x5b0ad6(!![]),getOnlineMenuList()['then'](_0x281603)[_0x2c7a4c(0x9f)](()=>_0x5b0ad6(![]));},[]),{'menuList':_0x3982ea,'loading':_0x47c968};}
1
+ function a13_0x1071(){const _0x561156=['780352nVlgOL','3430074vMIBcY','then','!\x20请使用以下方式之一:','error','\x20\x20\x202.\x20配置默认值:\x20lovrabet\x20config\x20set\x20app\x20<app-code>','1448935ZKaIDa','path','map','json','567517hbStWo','672875wwDDvx','log','1766004iCLBoW','×\x20未提供应用AppCode,且配置中也没有默认值','GET','label','application/json','1545804yPgzfe','finally','\x20\x20\x201.\x20直接指定:\x20lovrabet\x20api\x20pull\x20<app-code>'];a13_0x1071=function(){return _0x561156;};return a13_0x1071();}(function(_0x12b5c6,_0x3b84cc){const _0x2e762c=a13_0x3b3f,_0x1e08a7=_0x12b5c6();while(!![]){try{const _0x4393ea=-parseInt(_0x2e762c(0xc4))/0x1+parseInt(_0x2e762c(0xba))/0x2+parseInt(_0x2e762c(0xb7))/0x3+parseInt(_0x2e762c(0xb2))/0x4+parseInt(_0x2e762c(0xc0))/0x5+-parseInt(_0x2e762c(0xbb))/0x6+-parseInt(_0x2e762c(0xc5))/0x7;if(_0x4393ea===_0x3b84cc)break;else _0x1e08a7['push'](_0x1e08a7['shift']());}catch(_0x257fe7){_0x1e08a7['push'](_0x1e08a7['shift']());}}}(a13_0x1071,0x62003));import{useEffect,useState}from'react';import{getCookie}from'../auth/get-cookie.js';import{getApiDomain}from'../constant/domain.js';import{readConfig}from'../utils/config.js';function a13_0x3b3f(_0x1f5334,_0x574a36){const _0x107151=a13_0x1071();return a13_0x3b3f=function(_0x3b3fbf,_0xad0c88){_0x3b3fbf=_0x3b3fbf-0xb2;let _0x553699=_0x107151[_0x3b3fbf];return _0x553699;},a13_0x3b3f(_0x1f5334,_0x574a36);}const config=readConfig();export async function getOnlineMenuList(){const _0xbae353=a13_0x3b3f,_0x35e60d=config?.['appcode'];if(!_0x35e60d)return console[_0xbae353(0xbe)](_0xbae353(0xb3)),console[_0xbae353(0xc6)](_0xbae353(0xbd)),console['log'](_0xbae353(0xb9)),console[_0xbae353(0xc6)](_0xbae353(0xbf)),[];const _0x2531c1=await fetch(getApiDomain()+'/smartapi/menu/find?appCode='+_0x35e60d,{'method':_0xbae353(0xb4),'headers':{'Content-Type':_0xbae353(0xb6),'Cookie':getCookie()}});if(_0x2531c1['ok']){const {data:_0x2c9d2b}=await _0x2531c1[_0xbae353(0xc3)]();return _0x2c9d2b[_0xbae353(0xc2)](_0x2d655b=>({'path':_0x2d655b[_0xbae353(0xc1)],'label':_0x2d655b[_0xbae353(0xb5)]}));}return[];}export function useGetOnlineMenuList(){const [_0xcafe5a,_0x78432d]=useState([]),[_0x33132e,_0x3af292]=useState(!![]);return useEffect(()=>{const _0x44465c=a13_0x3b3f;_0x3af292(!![]),getOnlineMenuList()[_0x44465c(0xbc)](_0x78432d)[_0x44465c(0xb8)](()=>_0x3af292(![]));},[]),{'menuList':_0xcafe5a,'loading':_0x33132e};}
@@ -1 +1 @@
1
- function a18_0x9022(_0x490d85,_0x51fee9){const _0x14439b=a18_0x1443();return a18_0x9022=function(_0x90228e,_0x3b3f09){_0x90228e=_0x90228e-0x13f;let _0x1d1d9f=_0x14439b[_0x90228e];return _0x1d1d9f;},a18_0x9022(_0x490d85,_0x51fee9);}function a18_0x1443(){const _0x5e7ddd=['932ggByuu','1129218JNNqGC','173803RoZpon','675760UESkku','78AqEASw','2563gQhKYt','trim','95742eadgjr','4879460qpSoBc','107088ArLwzn','4245TTCkZN','test','2NJrwux','54GDuAMd'];a18_0x1443=function(){return _0x5e7ddd;};return a18_0x1443();}(function(_0xb84e27,_0x2d8a14){const _0x30d351=a18_0x9022,_0x2878a8=_0xb84e27();while(!![]){try{const _0x370c2e=parseInt(_0x30d351(0x149))/0x1+-parseInt(_0x30d351(0x140))/0x2*(parseInt(_0x30d351(0x143))/0x3)+parseInt(_0x30d351(0x142))/0x4*(-parseInt(_0x30d351(0x14c))/0x5)+parseInt(_0x30d351(0x146))/0x6*(-parseInt(_0x30d351(0x144))/0x7)+parseInt(_0x30d351(0x145))/0x8*(-parseInt(_0x30d351(0x141))/0x9)+-parseInt(_0x30d351(0x14a))/0xa+parseInt(_0x30d351(0x147))/0xb*(parseInt(_0x30d351(0x14b))/0xc);if(_0x370c2e===_0x2d8a14)break;else _0x2878a8['push'](_0x2878a8['shift']());}catch(_0x1ce2a9){_0x2878a8['push'](_0x2878a8['shift']());}}}(a18_0x1443,0x45284));export function isValidJsHttpsUrl(_0x2d7717){const _0xa8deab=a18_0x9022;return/^https:\/\/.+\.js(\?.*)?$/[_0xa8deab(0x13f)](_0x2d7717[_0xa8deab(0x148)]());}export function isValidCssHttpsUrl(_0x23ceb7){const _0x246887=a18_0x9022;return/^https:\/\/.+\.css(\?.*)?$/[_0x246887(0x13f)](_0x23ceb7['trim']());}export async function isUrlReachable(_0x12553a){try{const _0x46829c=await fetch(_0x12553a,{'method':'HEAD'});return _0x46829c['ok'];}catch{return![];}}
1
+ (function(_0x5091a7,_0x41e17b){const _0x1d3cea=a15_0x29da,_0x4dab50=_0x5091a7();while(!![]){try{const _0x3b7334=-parseInt(_0x1d3cea(0xd7))/0x1*(parseInt(_0x1d3cea(0xdb))/0x2)+parseInt(_0x1d3cea(0xd8))/0x3*(-parseInt(_0x1d3cea(0xda))/0x4)+-parseInt(_0x1d3cea(0xd1))/0x5+-parseInt(_0x1d3cea(0xd3))/0x6+-parseInt(_0x1d3cea(0xd4))/0x7+parseInt(_0x1d3cea(0xd0))/0x8*(parseInt(_0x1d3cea(0xd2))/0x9)+parseInt(_0x1d3cea(0xdc))/0xa*(parseInt(_0x1d3cea(0xdd))/0xb);if(_0x3b7334===_0x41e17b)break;else _0x4dab50['push'](_0x4dab50['shift']());}catch(_0x5f082b){_0x4dab50['push'](_0x4dab50['shift']());}}}(a15_0x3bae,0xb82c0));export function isValidJsHttpsUrl(_0x12d041){const _0x580ca6=a15_0x29da;return/^https:\/\/.+\.js(\?.*)?$/[_0x580ca6(0xd6)](_0x12d041[_0x580ca6(0xd9)]());}function a15_0x29da(_0x37f4cc,_0x1089e8){const _0x3bae41=a15_0x3bae();return a15_0x29da=function(_0x29da8a,_0x25e2e6){_0x29da8a=_0x29da8a-0xd0;let _0x316646=_0x3bae41[_0x29da8a];return _0x316646;},a15_0x29da(_0x37f4cc,_0x1089e8);}export function isValidCssHttpsUrl(_0x290281){const _0x44c446=a15_0x29da;return/^https:\/\/.+\.css(\?.*)?$/[_0x44c446(0xd6)](_0x290281['trim']());}function a15_0x3bae(){const _0x66aef3=['trim','4689964wOeNDh','76078zblqKu','1450fQggpZ','329197pewFTK','12744BqGYnx','2574830jKqEFr','2043qUyrYj','5586648EVVkCS','3704918oMYjCz','HEAD','test','21YUfaAX','3NmWZtW'];a15_0x3bae=function(){return _0x66aef3;};return a15_0x3bae();}export async function isUrlReachable(_0x380ae4){const _0x36cbb9=a15_0x29da;try{const _0x4dd033=await fetch(_0x380ae4,{'method':_0x36cbb9(0xd5)});return _0x4dd033['ok'];}catch{return![];}}
@@ -1 +1 @@
1
- (function(_0x499505,_0x337717){const _0x4d322e=a19_0x160a,_0x11f81e=_0x499505();while(!![]){try{const _0x6f700=-parseInt(_0x4d322e(0x1c2))/0x1*(-parseInt(_0x4d322e(0x1ba))/0x2)+-parseInt(_0x4d322e(0x1ce))/0x3+-parseInt(_0x4d322e(0x1c6))/0x4+parseInt(_0x4d322e(0x1be))/0x5+-parseInt(_0x4d322e(0x1bf))/0x6*(-parseInt(_0x4d322e(0x1c9))/0x7)+parseInt(_0x4d322e(0x1c1))/0x8+-parseInt(_0x4d322e(0x1bd))/0x9;if(_0x6f700===_0x337717)break;else _0x11f81e['push'](_0x11f81e['shift']());}catch(_0x436571){_0x11f81e['push'](_0x11f81e['shift']());}}}(a19_0x25b2,0x2cd43));import{jsx as a19_0x229860,jsxs as a19_0xa2d689}from'react/jsx-runtime';import{Text,Box,useInput,useApp}from'ink';import{useEffect,useState}from'react';import{getIsSessionValid}from'./is-session-valid.js';import{authServer}from'./auth-server.js';function a19_0x160a(_0x5763b2,_0x4eab0d){const _0x25b275=a19_0x25b2();return a19_0x160a=function(_0x160a57,_0x3e3dc0){_0x160a57=_0x160a57-0x1ba;let _0x25962a=_0x25b275[_0x160a57];return _0x25962a;},a19_0x160a(_0x5763b2,_0x4eab0d);}import a19_0x2a5928 from'ink-spinner';function a19_0x25b2(){const _0x321dac=['*\x20按回车开始登录。','dots','请前往浏览器完成登录。','739772UtfXCs','log','gray','1253903iwZXwb','正在登录...\x20','按\x20“q”\x20退出。','column','then','549402KlfunL','9866tOZTrk','√\x20当前为有效会话,无需重新登录。','green','4100373JIIgpL','1775355CQxFXI','6mxuqCP','*\x20登录成功!','1929936WQqcxJ','47MWSwrA'];a19_0x25b2=function(){return _0x321dac;};return a19_0x25b2();}export function AuthServer(){const _0x6f5a8d=a19_0x160a,{exit:_0x5e7eef}=useApp(),[_0x70a41f,_0x11da32]=useState(![]),[_0x5a87ce,_0x2247b8]=useState(!![]),[_0x224143,_0x51fecb]=useState(![]),[_0x3a6cd1,_0x571c02]=useState(![]);useEffect(()=>{const _0x26814e=a19_0x160a;getIsSessionValid()[_0x26814e(0x1cd)](_0x11da32)['finally'](()=>_0x2247b8(![]));},[]),useEffect(()=>{const _0x446d59=a19_0x160a;!_0x5a87ce&&_0x70a41f&&(console['log'](_0x446d59(0x1bb)),_0x5e7eef());},[_0x5a87ce,_0x70a41f,_0x5e7eef]),useEffect(()=>{const _0x540c94=a19_0x160a;_0x3a6cd1&&(console[_0x540c94(0x1c7)](_0x540c94(0x1c0)),_0x5e7eef());},[_0x3a6cd1,_0x5e7eef]),useInput((_0x493cd3,_0x36cee7)=>{_0x36cee7['return']&&(_0x51fecb(!![]),authServer({'silent':!![]})['then'](_0x54de69=>{_0x571c02(_0x54de69);})),_0x493cd3==='q'&&_0x5e7eef();});if(_0x5a87ce)return null;if(_0x70a41f||_0x3a6cd1)return null;return a19_0x229860(Box,{'flexDirection':_0x6f5a8d(0x1cc),'marginTop':0x1,'marginBottom':0x1,'children':_0x224143?a19_0xa2d689(Box,{'children':[a19_0x229860(Box,{'width':'1'}),a19_0xa2d689(Text,{'color':_0x6f5a8d(0x1bc),'children':[a19_0x229860(a19_0x2a5928,{'type':_0x6f5a8d(0x1c4)}),'\x20\x20']}),a19_0x229860(Text,{'children':_0x6f5a8d(0x1ca)}),a19_0x229860(Text,{'color':_0x6f5a8d(0x1c8),'children':_0x6f5a8d(0x1c5)})]}):a19_0xa2d689(Box,{'children':[a19_0x229860(Box,{'width':'1'}),a19_0x229860(Text,{'children':_0x6f5a8d(0x1c3)}),a19_0x229860(Text,{'color':_0x6f5a8d(0x1c8),'children':_0x6f5a8d(0x1cb)})]})});}
1
+ (function(_0x2d4524,_0x283f90){const _0x3e786d=a16_0x5042,_0x45d61b=_0x2d4524();while(!![]){try{const _0x1ac4a5=-parseInt(_0x3e786d(0x155))/0x1+-parseInt(_0x3e786d(0x150))/0x2*(parseInt(_0x3e786d(0x15d))/0x3)+-parseInt(_0x3e786d(0x158))/0x4*(-parseInt(_0x3e786d(0x156))/0x5)+-parseInt(_0x3e786d(0x14e))/0x6+parseInt(_0x3e786d(0x15e))/0x7*(parseInt(_0x3e786d(0x154))/0x8)+-parseInt(_0x3e786d(0x15b))/0x9+parseInt(_0x3e786d(0x152))/0xa*(parseInt(_0x3e786d(0x153))/0xb);if(_0x1ac4a5===_0x283f90)break;else _0x45d61b['push'](_0x45d61b['shift']());}catch(_0x440c4a){_0x45d61b['push'](_0x45d61b['shift']());}}}(a16_0x20a2,0x74150));import{jsx as a16_0x4cdc62,jsxs as a16_0x3df568}from'react/jsx-runtime';import{Text,Box,useInput,useApp}from'ink';function a16_0x5042(_0x306665,_0x576266){const _0x20a21e=a16_0x20a2();return a16_0x5042=function(_0x50424b,_0x51b569){_0x50424b=_0x50424b-0x14c;let _0x1776b1=_0x20a21e[_0x50424b];return _0x1776b1;},a16_0x5042(_0x306665,_0x576266);}import{useEffect,useState}from'react';import{getIsSessionValid}from'./is-session-valid.js';import{authServer}from'./auth-server.js';import a16_0x3dec05 from'ink-spinner';export function AuthServer(){const _0x2f86ca=a16_0x5042,{exit:_0x318556}=useApp(),[_0x55c181,_0x42e6e4]=useState(![]),[_0x35b2f0,_0x5b3995]=useState(!![]),[_0x2cca3f,_0x271ede]=useState(![]),[_0x5573a0,_0x56bd9b]=useState(![]);useEffect(()=>{const _0x448c7a=a16_0x5042;getIsSessionValid()['then'](_0x42e6e4)[_0x448c7a(0x15f)](()=>_0x5b3995(![]));},[]),useEffect(()=>{!_0x35b2f0&&_0x55c181&&(console['log']('√\x20当前为有效会话,无需重新登录。'),_0x318556());},[_0x35b2f0,_0x55c181,_0x318556]),useEffect(()=>{const _0x4a4c16=a16_0x5042;_0x5573a0&&(console[_0x4a4c16(0x157)](_0x4a4c16(0x15a)),_0x318556());},[_0x5573a0,_0x318556]),useInput((_0x209dc0,_0x46e9bb)=>{const _0x390923=a16_0x5042;_0x46e9bb[_0x390923(0x159)]&&(_0x271ede(!![]),authServer({'silent':!![]})['then'](_0x50d303=>{_0x56bd9b(_0x50d303);})),_0x209dc0==='q'&&_0x318556();});if(_0x35b2f0)return null;if(_0x55c181||_0x5573a0)return null;return a16_0x4cdc62(Box,{'flexDirection':_0x2f86ca(0x14c),'marginTop':0x1,'marginBottom':0x1,'children':_0x2cca3f?a16_0x3df568(Box,{'children':[a16_0x4cdc62(Box,{'width':'1'}),a16_0x3df568(Text,{'color':'green','children':[a16_0x4cdc62(a16_0x3dec05,{'type':'dots'}),'\x20\x20']}),a16_0x4cdc62(Text,{'children':_0x2f86ca(0x14f)}),a16_0x4cdc62(Text,{'color':_0x2f86ca(0x15c),'children':'请前往浏览器完成登录。'})]}):a16_0x3df568(Box,{'children':[a16_0x4cdc62(Box,{'width':'1'}),a16_0x4cdc62(Text,{'children':_0x2f86ca(0x151)}),a16_0x4cdc62(Text,{'color':'gray','children':_0x2f86ca(0x14d)})]})});}function a16_0x20a2(){const _0x4a9245=['4313992OttceK','855127ZPMlFk','250vsRPhq','log','20444EtMdCz','return','*\x20登录成功!','6657804KKXdQb','gray','49782RFlXtv','7FRaQaq','finally','column','按\x20“q”\x20退出。','3494268RkEIJn','正在登录...\x20','110LCiYhQ','*\x20按回车开始登录。','27706040TcJQnw','11OXFxJZ'];a16_0x20a2=function(){return _0x4a9245;};return a16_0x20a2();}
@@ -1 +1 @@
1
- const a20_0x5dccdc=a20_0x34de;(function(_0x371f2d,_0x4a4295){const _0x4f2103=a20_0x34de,_0x2a6771=_0x371f2d();while(!![]){try{const _0x1f78d6=-parseInt(_0x4f2103(0xb9))/0x1+-parseInt(_0x4f2103(0xbf))/0x2*(-parseInt(_0x4f2103(0xb6))/0x3)+parseInt(_0x4f2103(0xa7))/0x4*(-parseInt(_0x4f2103(0xb4))/0x5)+parseInt(_0x4f2103(0xb5))/0x6+-parseInt(_0x4f2103(0x98))/0x7*(-parseInt(_0x4f2103(0x9b))/0x8)+-parseInt(_0x4f2103(0xab))/0x9*(parseInt(_0x4f2103(0xa6))/0xa)+parseInt(_0x4f2103(0x96))/0xb;if(_0x1f78d6===_0x4a4295)break;else _0x2a6771['push'](_0x2a6771['shift']());}catch(_0xf9bb13){_0x2a6771['push'](_0x2a6771['shift']());}}}(a20_0x230b,0x9a679));import{writeFileSync}from'node:fs';import a20_0x1fed73 from'node:https';function a20_0x230b(){const _0x5325fa=['📍\x20登录地址:','466059Cojyww','https://g.yuntooai.com/cert/lovrabet-dev.json','createServer','🔗\x20请手动复制登录地址到浏览器:','💡\x20如果浏览器没有自动打开,请手动复制上面的登录地址到浏览器中打开','listen','894hKXJTV','error','8711318niAOTO','https://dev.lovrabet.com:','194243qOoDFl','writeHead','🌐\x20正在尝试自动打开浏览器...','152SZbJUm','⚠️\x20\x20无法自动打开浏览器','silent','darwin','utf-8','log','user','win32','platform','Auth\x20server\x20error:','xdg-open\x20\x22','20nOEVQM','8rGHlxb','catch','text/html;\x20charset=utf-8','🔐\x20正在启动登录服务...','4356153fwOMjt','end','then','127.0.0.1','port','/api/auth/get-session','close','/sign-in?redirect=','start\x20\x22\x22\x20\x22','1441730JhTabJ','4567704fqccxg','3777eWwYHB','json'];a20_0x230b=function(){return _0x5325fa;};return a20_0x230b();}import{getUserDomain}from'../constant/domain.js';import{exec}from'node:child_process';import{getIsSessionValid}from'./is-session-valid.js';function a20_0x34de(_0x2dff85,_0x1b9f64){const _0x230b2e=a20_0x230b();return a20_0x34de=function(_0x34de02,_0xb4c05c){_0x34de02=_0x34de02-0x95;let _0x4b3d00=_0x230b2e[_0x34de02];return _0x4b3d00;},a20_0x34de(_0x2dff85,_0x1b9f64);}import{cookieFile}from'./constant.js';export async function authServer(_0x3c6d19){const _0x3c2247=a20_0x34de,_0x338633=_0x3c6d19?.[_0x3c2247(0x9d)]||![];if(await getIsSessionValid())return!![];const _0x5d784f=await(await fetch(_0x3c2247(0xba)))[_0x3c2247(0xb7)]();return new Promise(async(_0x49324e,_0x3a509d)=>{const _0xc3a3f2=_0x3c2247;let _0x5ad9b0=0x0;const _0x29662f=a20_0x1fed73[_0xc3a3f2(0xbb)](_0x5d784f,async(_0x5880d6,_0x554b0c)=>{const _0x50b5bc=_0xc3a3f2,_0x4d6fac=getUserDomain(),_0xf5cd63=_0x5880d6['headers']['cookie']||'',_0x5ab8b3=await fetch(_0x4d6fac+_0x50b5bc(0xb0),{'headers':{'cookie':_0xf5cd63}})[_0x50b5bc(0xad)](_0x11b524=>_0x11b524['json']()),_0x113861=_0x5ab8b3&&_0x5ab8b3['session']&&_0x5ab8b3[_0x50b5bc(0xa1)];if(_0x113861){writeFileSync(cookieFile,_0xf5cd63,_0x50b5bc(0x9f)),_0x49324e(!![]);const _0x32d827='<!doctype\x20html>\x0a<html>\x0a<head><meta\x20charset=\x22utf-8\x22><title>登录成功</title></head>\x0a<body>\x0a\x20\x20<div>登录成功,请返回命令行继续操作。当前窗口将在\x20<span\x20id=\x22t\x22>5</span>\x20秒内关闭。</div>\x0a\x20\x20<div\x20id=\x22manualMsg\x22\x20style=\x22display:none;margin-top:10px;color:#d00;\x22>无法自动关闭窗口,请手动关闭此标签页或窗口。</div>\x0a\x20\x20<script>\x0a\x20\x20(function(){\x0a\x20\x20\x20\x20var\x20t\x20=\x205;\x0a\x20\x20\x20\x20var\x20el\x20=\x20document.getElementById(\x27t\x27);\x0a\x20\x20\x20\x20var\x20manual\x20=\x20document.getElementById(\x27manualMsg\x27);\x0a\x20\x20\x20\x20var\x20id\x20=\x20setInterval(function(){\x0a\x20\x20\x20\x20\x20\x20t--;\x0a\x20\x20\x20\x20\x20\x20if\x20(t\x20<=\x200)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20clearInterval(id);\x0a\x20\x20\x20\x20\x20\x20\x20\x20el.textContent\x20=\x20\x270\x27;\x0a\x20\x20\x20\x20\x20\x20\x20\x20try\x20{\x20window.close();\x20}\x20catch(e)\x20{}\x0a\x20\x20\x20\x20\x20\x20\x20\x20//\x20如果自动关闭无效,显示文本提示让用户手动关闭\x0a\x20\x20\x20\x20\x20\x20\x20\x20setTimeout(function(){\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20if\x20(!window.closed)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20manual.style.display\x20=\x20\x27block\x27;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20},\x20300);\x0a\x20\x20\x20\x20\x20\x20}\x20else\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20el.textContent\x20=\x20String(t);\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20},\x201000);\x0a\x20\x20})();\x0a\x20\x20</script>\x0a</body>\x0a</html>';_0x554b0c[_0x50b5bc(0x99)](0xc8,{'Content-Type':_0x50b5bc(0xa9)}),_0x554b0c[_0x50b5bc(0xac)](_0x32d827),_0x29662f[_0x50b5bc(0xb1)]();}else{const _0x72b6df=''+encodeURIComponent(_0x50b5bc(0x97)+_0x5ad9b0);_0x554b0c[_0x50b5bc(0x99)](0x12e,{'location':_0x4d6fac+_0x50b5bc(0xb2)+_0x72b6df}),_0x554b0c['end']();return;}});_0x29662f[_0xc3a3f2(0xbe)](0x0,_0xc3a3f2(0xae),()=>{const _0x19ac3b=_0xc3a3f2,_0x2f4fc5=_0x29662f['address']();_0x5ad9b0=typeof _0x2f4fc5==='object'&&_0x2f4fc5?_0x2f4fc5[_0x19ac3b(0xaf)]:Number(_0x2f4fc5);const _0x4a810d=_0x19ac3b(0x97)+_0x5ad9b0;!_0x338633&&(console['log'](_0x19ac3b(0xaa)),console[_0x19ac3b(0xa0)](_0x19ac3b(0xb8),_0x4a810d),console['log'](_0x19ac3b(0x9a)),console[_0x19ac3b(0xa0)](''),console[_0x19ac3b(0xa0)](_0x19ac3b(0xbd)),console[_0x19ac3b(0xa0)]('')),openInBrowser(_0x4a810d)[_0x19ac3b(0xad)](_0x35a372=>{const _0x60036=_0x19ac3b;!_0x338633&&(_0x35a372?console[_0x60036(0xa0)]('✅\x20浏览器已自动打开,请在浏览器中完成登录'):(console['log']('⚠️\x20\x20无法自动打开浏览器'),console[_0x60036(0xa0)]('🔗\x20请手动复制登录地址到浏览器:',_0x4a810d)),console[_0x60036(0xa0)](''));})[_0x19ac3b(0xa8)](()=>{const _0xfee31c=_0x19ac3b;!_0x338633&&(console[_0xfee31c(0xa0)](_0xfee31c(0x9c)),console[_0xfee31c(0xa0)](_0xfee31c(0xbc),_0x4a810d),console['log'](''));});}),_0x29662f['on']('error',_0x1ce820=>{const _0xb3d851=_0xc3a3f2;!_0x338633&&console[_0xb3d851(0x95)](_0xb3d851(0xa4),_0x1ce820),_0x3a509d(_0x1ce820);});});}function openInBrowser(_0x4fa1b8){return new Promise(_0x2cdce6=>{const _0xc2a369=a20_0x34de,_0x48e2a1=process[_0xc2a369(0xa3)];let _0x3fca91;if(_0x48e2a1===_0xc2a369(0xa2))_0x3fca91=_0xc2a369(0xb3)+_0x4fa1b8+'\x22';else _0x48e2a1===_0xc2a369(0x9e)?_0x3fca91='open\x20\x22'+_0x4fa1b8+'\x22':_0x3fca91=_0xc2a369(0xa5)+_0x4fa1b8+'\x22';exec(_0x3fca91,_0x4223e4=>{_0x4223e4?_0x2cdce6(![]):_0x2cdce6(!![]);});});}if(import.meta['main']){const isAuth=await authServer();console[a20_0x5dccdc(0xa0)]('isAuth',isAuth);}
1
+ const a17_0x1f7cd7=a17_0x3f5f;(function(_0x23d47c,_0x4281e0){const _0x137e62=a17_0x3f5f,_0x255c5c=_0x23d47c();while(!![]){try{const _0x32df43=parseInt(_0x137e62(0x1b3))/0x1*(parseInt(_0x137e62(0x19b))/0x2)+parseInt(_0x137e62(0x1b2))/0x3*(parseInt(_0x137e62(0x1a4))/0x4)+-parseInt(_0x137e62(0x1af))/0x5+-parseInt(_0x137e62(0x1ae))/0x6*(-parseInt(_0x137e62(0x1ad))/0x7)+-parseInt(_0x137e62(0x1a3))/0x8+-parseInt(_0x137e62(0x1a0))/0x9+-parseInt(_0x137e62(0x1bf))/0xa;if(_0x32df43===_0x4281e0)break;else _0x255c5c['push'](_0x255c5c['shift']());}catch(_0x569c63){_0x255c5c['push'](_0x255c5c['shift']());}}}(a17_0x1752,0x4b844));import{writeFileSync}from'node:fs';import a17_0x20fd4b from'node:https';import{getUserDomain}from'../constant/domain.js';function a17_0x3f5f(_0x443fdd,_0x1393a7){const _0x1752ff=a17_0x1752();return a17_0x3f5f=function(_0x3f5f30,_0x50b244){_0x3f5f30=_0x3f5f30-0x196;let _0xddad9d=_0x1752ff[_0x3f5f30];return _0xddad9d;},a17_0x3f5f(_0x443fdd,_0x1393a7);}import{exec}from'node:child_process';function a17_0x1752(){const _0xa25d0d=['1609504EpZyyJ','567860DtJTMe','listen','https://dev.lovrabet.com:','address','💡\x20如果浏览器没有自动打开,请手动复制上面的登录地址到浏览器中打开','/api/auth/get-session','object','silent','✅\x20浏览器已自动打开,请在浏览器中完成登录','56kBVSYv','171366kYiHwY','1979345dWTUUz','session','text/html;\x20charset=utf-8','9rSEgGq','327hFUpeL','/sign-in?redirect=','utf-8','writeHead','127.0.0.1','error','cookie','🔗\x20请手动复制登录地址到浏览器:','<!doctype\x20html>\x0a<html>\x0a<head><meta\x20charset=\x22utf-8\x22><title>登录成功</title></head>\x0a<body>\x0a\x20\x20<div>登录成功,请返回命令行继续操作。当前窗口将在\x20<span\x20id=\x22t\x22>5</span>\x20秒内关闭。</div>\x0a\x20\x20<div\x20id=\x22manualMsg\x22\x20style=\x22display:none;margin-top:10px;color:#d00;\x22>无法自动关闭窗口,请手动关闭此标签页或窗口。</div>\x0a\x20\x20<script>\x0a\x20\x20(function(){\x0a\x20\x20\x20\x20var\x20t\x20=\x205;\x0a\x20\x20\x20\x20var\x20el\x20=\x20document.getElementById(\x27t\x27);\x0a\x20\x20\x20\x20var\x20manual\x20=\x20document.getElementById(\x27manualMsg\x27);\x0a\x20\x20\x20\x20var\x20id\x20=\x20setInterval(function(){\x0a\x20\x20\x20\x20\x20\x20t--;\x0a\x20\x20\x20\x20\x20\x20if\x20(t\x20<=\x200)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20clearInterval(id);\x0a\x20\x20\x20\x20\x20\x20\x20\x20el.textContent\x20=\x20\x270\x27;\x0a\x20\x20\x20\x20\x20\x20\x20\x20try\x20{\x20window.close();\x20}\x20catch(e)\x20{}\x0a\x20\x20\x20\x20\x20\x20\x20\x20//\x20如果自动关闭无效,显示文本提示让用户手动关闭\x0a\x20\x20\x20\x20\x20\x20\x20\x20setTimeout(function(){\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20if\x20(!window.closed)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20manual.style.display\x20=\x20\x27block\x27;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20},\x20300);\x0a\x20\x20\x20\x20\x20\x20}\x20else\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20el.textContent\x20=\x20String(t);\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20},\x201000);\x0a\x20\x20})();\x0a\x20\x20</script>\x0a</body>\x0a</html>','isAuth','port','end','295790SWAkFp','log','json','open\x20\x22','createServer','close','catch','Auth\x20server\x20error:','🌐\x20正在尝试自动打开浏览器...','headers','2160cMOkFR','then','darwin','user','🔐\x20正在启动登录服务...','644319IiIIpO','⚠️\x20\x20无法自动打开浏览器','https://g.yuntooai.com/cert/lovrabet-dev.json'];a17_0x1752=function(){return _0xa25d0d;};return a17_0x1752();}import{getIsSessionValid}from'./is-session-valid.js';import{cookieFile}from'./constant.js';export async function authServer(_0x23eece){const _0x17cbaf=a17_0x3f5f,_0x3d7337=_0x23eece?.[_0x17cbaf(0x1ab)]||![];if(await getIsSessionValid())return!![];const _0x2cae21=await(await fetch(_0x17cbaf(0x1a2)))[_0x17cbaf(0x1c1)]();return new Promise(async(_0x32a24f,_0x1caa66)=>{const _0x27a05a=_0x17cbaf;let _0x35ceba=0x0;const _0x4f6a19=a17_0x20fd4b[_0x27a05a(0x1c3)](_0x2cae21,async(_0x417418,_0x54cb94)=>{const _0xcd7c48=_0x27a05a,_0xaf5ab7=getUserDomain(),_0xe53922=_0x417418[_0xcd7c48(0x19a)][_0xcd7c48(0x1b9)]||'',_0x19e8e4=await fetch(_0xaf5ab7+_0xcd7c48(0x1a9),{'headers':{'cookie':_0xe53922}})[_0xcd7c48(0x19c)](_0x24308e=>_0x24308e[_0xcd7c48(0x1c1)]()),_0x52ae0e=_0x19e8e4&&_0x19e8e4[_0xcd7c48(0x1b0)]&&_0x19e8e4[_0xcd7c48(0x19e)];if(_0x52ae0e){writeFileSync(cookieFile,_0xe53922,_0xcd7c48(0x1b5)),_0x32a24f(!![]);const _0xc8fd4f=_0xcd7c48(0x1bb);_0x54cb94[_0xcd7c48(0x1b6)](0xc8,{'Content-Type':_0xcd7c48(0x1b1)}),_0x54cb94[_0xcd7c48(0x1be)](_0xc8fd4f),_0x4f6a19[_0xcd7c48(0x196)]();}else{const _0x145eb1=''+encodeURIComponent(_0xcd7c48(0x1a6)+_0x35ceba);_0x54cb94[_0xcd7c48(0x1b6)](0x12e,{'location':_0xaf5ab7+_0xcd7c48(0x1b4)+_0x145eb1}),_0x54cb94[_0xcd7c48(0x1be)]();return;}});_0x4f6a19[_0x27a05a(0x1a5)](0x0,_0x27a05a(0x1b7),()=>{const _0x59b0bf=_0x27a05a,_0x10ed8b=_0x4f6a19[_0x59b0bf(0x1a7)]();_0x35ceba=typeof _0x10ed8b===_0x59b0bf(0x1aa)&&_0x10ed8b?_0x10ed8b[_0x59b0bf(0x1bd)]:Number(_0x10ed8b);const _0x36b733=_0x59b0bf(0x1a6)+_0x35ceba;!_0x3d7337&&(console['log'](_0x59b0bf(0x19f)),console['log']('📍\x20登录地址:',_0x36b733),console[_0x59b0bf(0x1c0)](_0x59b0bf(0x199)),console[_0x59b0bf(0x1c0)](''),console[_0x59b0bf(0x1c0)](_0x59b0bf(0x1a8)),console[_0x59b0bf(0x1c0)]('')),openInBrowser(_0x36b733)[_0x59b0bf(0x19c)](_0x1675d3=>{const _0xc4d6b7=_0x59b0bf;!_0x3d7337&&(_0x1675d3?console['log'](_0xc4d6b7(0x1ac)):(console[_0xc4d6b7(0x1c0)]('⚠️\x20\x20无法自动打开浏览器'),console['log'](_0xc4d6b7(0x1ba),_0x36b733)),console[_0xc4d6b7(0x1c0)](''));})[_0x59b0bf(0x197)](()=>{const _0x5e24c0=_0x59b0bf;!_0x3d7337&&(console['log'](_0x5e24c0(0x1a1)),console[_0x5e24c0(0x1c0)]('🔗\x20请手动复制登录地址到浏览器:',_0x36b733),console['log'](''));});}),_0x4f6a19['on'](_0x27a05a(0x1b8),_0x93d1a2=>{const _0x388347=_0x27a05a;!_0x3d7337&&console[_0x388347(0x1b8)](_0x388347(0x198),_0x93d1a2),_0x1caa66(_0x93d1a2);});});}function openInBrowser(_0x57ba4e){return new Promise(_0x1faa70=>{const _0x31d559=a17_0x3f5f,_0x15a79a=process['platform'];let _0x4725c6;if(_0x15a79a==='win32')_0x4725c6='start\x20\x22\x22\x20\x22'+_0x57ba4e+'\x22';else _0x15a79a===_0x31d559(0x19d)?_0x4725c6=_0x31d559(0x1c2)+_0x57ba4e+'\x22':_0x4725c6='xdg-open\x20\x22'+_0x57ba4e+'\x22';exec(_0x4725c6,_0x186384=>{_0x186384?_0x1faa70(![]):_0x1faa70(!![]);});});}if(import.meta['main']){const isAuth=await authServer();console[a17_0x1f7cd7(0x1c0)](a17_0x1f7cd7(0x1bc),isAuth);}
@@ -1 +1 @@
1
- const a21_0x5818bd=a21_0xe109;(function(_0x49d6e8,_0x4a7132){const _0x39b2c8=a21_0xe109,_0x93e3b8=_0x49d6e8();while(!![]){try{const _0x1610ac=parseInt(_0x39b2c8(0x1c1))/0x1+parseInt(_0x39b2c8(0x1ba))/0x2+parseInt(_0x39b2c8(0x1bc))/0x3*(parseInt(_0x39b2c8(0x1bf))/0x4)+parseInt(_0x39b2c8(0x1bd))/0x5*(-parseInt(_0x39b2c8(0x1b8))/0x6)+parseInt(_0x39b2c8(0x1be))/0x7+parseInt(_0x39b2c8(0x1b9))/0x8+-parseInt(_0x39b2c8(0x1bb))/0x9;if(_0x1610ac===_0x4a7132)break;else _0x93e3b8['push'](_0x93e3b8['shift']());}catch(_0x4ac6f2){_0x93e3b8['push'](_0x93e3b8['shift']());}}}(a21_0x48d1,0x6e273));function a21_0xe109(_0xdcba6d,_0x328044){const _0x48d1d1=a21_0x48d1();return a21_0xe109=function(_0xe1090f,_0x518b15){_0xe1090f=_0xe1090f-0x1b8;let _0x34afe0=_0x48d1d1[_0xe1090f];return _0x34afe0;},a21_0xe109(_0xdcba6d,_0x328044);}import{mkdirSync}from'node:fs';import{homedir}from'node:os';export const configDir=homedir()+'/.lovrabet';function a21_0x48d1(){const _0x4d6693=['14100480uRErpe','3VTaheS','304125eZpmSM','4875318rxoAxk','2064904edxxTP','/cookie','648507ESewvt','66PpLoUU','5700448iSKIYN','226438qIvcqZ'];a21_0x48d1=function(){return _0x4d6693;};return a21_0x48d1();}export const cookieFile=configDir+a21_0x5818bd(0x1c0);mkdirSync(configDir,{'recursive':!![]});
1
+ (function(_0x444524,_0x54a92f){const _0x488e16=a18_0x5f5b,_0x18c8cf=_0x444524();while(!![]){try{const _0x59f954=-parseInt(_0x488e16(0xd3))/0x1*(-parseInt(_0x488e16(0xce))/0x2)+parseInt(_0x488e16(0xd4))/0x3*(-parseInt(_0x488e16(0xcf))/0x4)+-parseInt(_0x488e16(0xd1))/0x5*(-parseInt(_0x488e16(0xd6))/0x6)+parseInt(_0x488e16(0xd5))/0x7*(parseInt(_0x488e16(0xcd))/0x8)+-parseInt(_0x488e16(0xd2))/0x9*(parseInt(_0x488e16(0xd8))/0xa)+parseInt(_0x488e16(0xd0))/0xb+-parseInt(_0x488e16(0xd7))/0xc;if(_0x59f954===_0x54a92f)break;else _0x18c8cf['push'](_0x18c8cf['shift']());}catch(_0x83e9f2){_0x18c8cf['push'](_0x18c8cf['shift']());}}}(a18_0x445f,0xce586));import{mkdirSync}from'node:fs';import{homedir}from'node:os';function a18_0x5f5b(_0x218810,_0x8b7715){const _0x445fb2=a18_0x445f();return a18_0x5f5b=function(_0x5f5ba3,_0xac9088){_0x5f5ba3=_0x5f5ba3-0xcd;let _0x3eeb66=_0x445fb2[_0x5f5ba3];return _0x3eeb66;},a18_0x5f5b(_0x218810,_0x8b7715);}export const configDir=homedir()+'/.lovrabet';function a18_0x445f(){const _0xba24=['3918inRybm','1803264NHKkfK','46170zLVpJz','278736FMnaGL','1751242vvRQaM','1071108WVSCNQ','4757126QxeGgX','3230KZwFdZ','999ZWLbll','1vnYhdN','6OhYVNS','63gtSwLY'];a18_0x445f=function(){return _0xba24;};return a18_0x445f();}export const cookieFile=configDir+'/cookie';mkdirSync(configDir,{'recursive':!![]});
@@ -1 +1 @@
1
- (function(_0xc9b49c,_0x2a8ddf){var _0x3b02c5=a22_0x5b36,_0x37d7dd=_0xc9b49c();while(!![]){try{var _0x367894=parseInt(_0x3b02c5(0x14c))/0x1*(-parseInt(_0x3b02c5(0x151))/0x2)+-parseInt(_0x3b02c5(0x14d))/0x3*(parseInt(_0x3b02c5(0x155))/0x4)+-parseInt(_0x3b02c5(0x150))/0x5+-parseInt(_0x3b02c5(0x14f))/0x6+parseInt(_0x3b02c5(0x156))/0x7*(parseInt(_0x3b02c5(0x154))/0x8)+-parseInt(_0x3b02c5(0x14b))/0x9*(-parseInt(_0x3b02c5(0x153))/0xa)+parseInt(_0x3b02c5(0x14e))/0xb;if(_0x367894===_0x2a8ddf)break;else _0x37d7dd['push'](_0x37d7dd['shift']());}catch(_0xbeb82b){_0x37d7dd['push'](_0x37d7dd['shift']());}}}(a22_0x211e,0x588eb));import{readFileSync}from'node:fs';function a22_0x211e(){var _0x2a5e87=['5099ZSSiOR','3xbfiIr','7621625yKWOjT','3680190Initzs','42905fNQEbq','30KwvWYa','utf-8','1310tOCzZS','8dztYQn','931228DQtMdo','244384zEwxhn','38898XuiRsy'];a22_0x211e=function(){return _0x2a5e87;};return a22_0x211e();}function a22_0x5b36(_0x5d566f,_0x3e121b){var _0x211ee8=a22_0x211e();return a22_0x5b36=function(_0x5b363e,_0xb8ece6){_0x5b363e=_0x5b363e-0x14b;var _0x311b11=_0x211ee8[_0x5b363e];return _0x311b11;},a22_0x5b36(_0x5d566f,_0x3e121b);}import{cookieFile}from'./constant.js';export function getCookie(){var _0x2affaf=a22_0x5b36;try{return readFileSync(cookieFile,_0x2affaf(0x152));}catch{}return'';}
1
+ (function(_0x54592d,_0x208a8d){var _0x372c52=a19_0xc251,_0x152531=_0x54592d();while(!![]){try{var _0x59bcdd=-parseInt(_0x372c52(0x10f))/0x1*(parseInt(_0x372c52(0x110))/0x2)+-parseInt(_0x372c52(0x115))/0x3+parseInt(_0x372c52(0x114))/0x4+parseInt(_0x372c52(0x112))/0x5+parseInt(_0x372c52(0x113))/0x6+-parseInt(_0x372c52(0x111))/0x7+parseInt(_0x372c52(0x10e))/0x8;if(_0x59bcdd===_0x208a8d)break;else _0x152531['push'](_0x152531['shift']());}catch(_0x1f1483){_0x152531['push'](_0x152531['shift']());}}}(a19_0x4537,0x761df));function a19_0x4537(){var _0x408b23=['806058iyKWQj','2402276PVypdV','2354631nuocMt','utf-8','1868952YbUxyu','1CtezUY','311522oxvYgw','2200247MoNNcU','3851175DwdFqT'];a19_0x4537=function(){return _0x408b23;};return a19_0x4537();}import{readFileSync}from'node:fs';function a19_0xc251(_0x17a262,_0x2f523b){var _0x4537cc=a19_0x4537();return a19_0xc251=function(_0xc251eb,_0x48c28e){_0xc251eb=_0xc251eb-0x10e;var _0x50a1d6=_0x4537cc[_0xc251eb];return _0x50a1d6;},a19_0xc251(_0x17a262,_0x2f523b);}import{cookieFile}from'./constant.js';export function getCookie(){var _0x4848bf=a19_0xc251;try{return readFileSync(cookieFile,_0x4848bf(0x116));}catch{}return'';}
@@ -1 +1 @@
1
- function a23_0x5aac(_0x1050dc,_0x3dbccb){const _0x392c6f=a23_0x392c();return a23_0x5aac=function(_0x5aac01,_0x5f0d5d){_0x5aac01=_0x5aac01-0x1be;let _0x2a91c9=_0x392c6f[_0x5aac01];return _0x2a91c9;},a23_0x5aac(_0x1050dc,_0x3dbccb);}(function(_0x579120,_0x5d2b3d){const _0x12f915=a23_0x5aac,_0x346794=_0x579120();while(!![]){try{const _0x37ea38=parseInt(_0x12f915(0x1be))/0x1*(-parseInt(_0x12f915(0x1c3))/0x2)+-parseInt(_0x12f915(0x1c0))/0x3*(parseInt(_0x12f915(0x1c4))/0x4)+parseInt(_0x12f915(0x1c5))/0x5*(-parseInt(_0x12f915(0x1c7))/0x6)+parseInt(_0x12f915(0x1cb))/0x7+parseInt(_0x12f915(0x1c1))/0x8*(parseInt(_0x12f915(0x1ca))/0x9)+parseInt(_0x12f915(0x1c6))/0xa+-parseInt(_0x12f915(0x1bf))/0xb;if(_0x37ea38===_0x5d2b3d)break;else _0x346794['push'](_0x346794['shift']());}catch(_0x4b40c4){_0x346794['push'](_0x346794['shift']());}}}(a23_0x392c,0xc0a63));import{existsSync,readFileSync}from'node:fs';import{getUserDomain}from'../constant/domain.js';import{cookieFile}from'./constant.js';function a23_0x392c(){const _0x7e3b8c=['utf-8','/api/auth/get-session','13971492vVYJNk','7083517fbRAuw','user','393911MxSwVe','31361209rdkqOV','681gnRQZY','8okOAjm','session','2FKjKEn','92JcSJaV','330OljbkM','15502950kqKXrT','6852DBIGwc'];a23_0x392c=function(){return _0x7e3b8c;};return a23_0x392c();}export async function getIsSessionValid(){const _0x49f2b8=a23_0x5aac;try{if(!existsSync(cookieFile))return![];const _0x5f59fc=readFileSync(cookieFile,_0x49f2b8(0x1c8)),_0x3ee408=await fetch(getUserDomain()+_0x49f2b8(0x1c9),{'headers':{'cookie':_0x5f59fc}})['then'](_0x1c5058=>_0x1c5058['json']());return _0x3ee408&&_0x3ee408[_0x49f2b8(0x1c2)]&&_0x3ee408[_0x49f2b8(0x1cc)];}catch{}return![];}
1
+ (function(_0x4cc552,_0x56a4e2){const _0x33f7f8=a20_0x4205,_0x49d577=_0x4cc552();while(!![]){try{const _0x3246a2=parseInt(_0x33f7f8(0x138))/0x1*(parseInt(_0x33f7f8(0x144))/0x2)+parseInt(_0x33f7f8(0x139))/0x3*(-parseInt(_0x33f7f8(0x140))/0x4)+parseInt(_0x33f7f8(0x13d))/0x5*(-parseInt(_0x33f7f8(0x13c))/0x6)+parseInt(_0x33f7f8(0x143))/0x7+parseInt(_0x33f7f8(0x145))/0x8+-parseInt(_0x33f7f8(0x13e))/0x9*(parseInt(_0x33f7f8(0x13b))/0xa)+parseInt(_0x33f7f8(0x13a))/0xb;if(_0x3246a2===_0x56a4e2)break;else _0x49d577['push'](_0x49d577['shift']());}catch(_0x424fef){_0x49d577['push'](_0x49d577['shift']());}}}(a20_0x8c2a,0xd1bc3));import{existsSync,readFileSync}from'node:fs';import{getUserDomain}from'../constant/domain.js';import{cookieFile}from'./constant.js';function a20_0x8c2a(){const _0x2ba627=['36iEebui','session','96CDAtOS','json','utf-8','9649395ahveuS','550858nZMnrN','694760pddENn','user','/api/auth/get-session','1oeMrph','212508zkiFhn','34903506fAOVwv','3651580bslsiJ','6XSDOfk','4470170ChlzZm'];a20_0x8c2a=function(){return _0x2ba627;};return a20_0x8c2a();}function a20_0x4205(_0x373207,_0x4f4be7){const _0x8c2ade=a20_0x8c2a();return a20_0x4205=function(_0x42054b,_0x19c3e3){_0x42054b=_0x42054b-0x138;let _0x57312c=_0x8c2ade[_0x42054b];return _0x57312c;},a20_0x4205(_0x373207,_0x4f4be7);}export async function getIsSessionValid(){const _0x19c4be=a20_0x4205;try{if(!existsSync(cookieFile))return![];const _0x32aa7e=readFileSync(cookieFile,_0x19c4be(0x142)),_0x47457d=await fetch(getUserDomain()+_0x19c4be(0x147),{'headers':{'cookie':_0x32aa7e}})['then'](_0x47c53b=>_0x47c53b[_0x19c4be(0x141)]());return _0x47457d&&_0x47457d[_0x19c4be(0x13f)]&&_0x47457d[_0x19c4be(0x146)];}catch{}return![];}
@@ -1 +1 @@
1
- (function(_0x4ffa33,_0x4eb65e){var _0x5e6dff=a24_0x188e,_0x5d4354=_0x4ffa33();while(!![]){try{var _0x33c7ed=-parseInt(_0x5e6dff(0x1ec))/0x1+parseInt(_0x5e6dff(0x1ef))/0x2*(-parseInt(_0x5e6dff(0x1eb))/0x3)+parseInt(_0x5e6dff(0x1ee))/0x4+parseInt(_0x5e6dff(0x1f5))/0x5*(parseInt(_0x5e6dff(0x1f1))/0x6)+parseInt(_0x5e6dff(0x1f0))/0x7+parseInt(_0x5e6dff(0x1f2))/0x8*(parseInt(_0x5e6dff(0x1ea))/0x9)+-parseInt(_0x5e6dff(0x1ed))/0xa*(-parseInt(_0x5e6dff(0x1f3))/0xb);if(_0x33c7ed===_0x4eb65e)break;else _0x5d4354['push'](_0x5d4354['shift']());}catch(_0x2e2210){_0x5d4354['push'](_0x5d4354['shift']());}}}(a24_0xdb82,0x94db8));import{unlinkSync,existsSync}from'node:fs';function a24_0x188e(_0x46f6bf,_0x4b3344){var _0xdb8283=a24_0xdb82();return a24_0x188e=function(_0x188ece,_0x2a608d){_0x188ece=_0x188ece-0x1e9;var _0x3d6649=_0xdb8283[_0x188ece];return _0x3d6649;},a24_0x188e(_0x46f6bf,_0x4b3344);}import{cookieFile}from'./constant.js';export function logout(){var _0x15a4b7=a24_0x188e;existsSync(cookieFile)?(unlinkSync(cookieFile),console['log'](_0x15a4b7(0x1f6))):console[_0x15a4b7(0x1f4)](_0x15a4b7(0x1e9));}function a24_0xdb82(){var _0x17c96e=['2386NmYDoc','2886058bDERvs','60Rxiuny','5192wNyLla','54538hdugPZ','log','32510IFLepT','✓\x20已退出登录','!\x20当前未登录','4788xicqem','1476tUAWel','1176398UGunQw','1860xSsieE','2513216rLyclc'];a24_0xdb82=function(){return _0x17c96e;};return a24_0xdb82();}
1
+ function a21_0x41b0(_0x425404,_0x131305){var _0x4dfe15=a21_0x4dfe();return a21_0x41b0=function(_0x41b0e7,_0x571813){_0x41b0e7=_0x41b0e7-0x18e;var _0x3a8dae=_0x4dfe15[_0x41b0e7];return _0x3a8dae;},a21_0x41b0(_0x425404,_0x131305);}(function(_0xde63b1,_0x542399){var _0x9bc6ac=a21_0x41b0,_0x3cd178=_0xde63b1();while(!![]){try{var _0x3c25d0=parseInt(_0x9bc6ac(0x193))/0x1+-parseInt(_0x9bc6ac(0x19a))/0x2+parseInt(_0x9bc6ac(0x194))/0x3*(-parseInt(_0x9bc6ac(0x190))/0x4)+parseInt(_0x9bc6ac(0x195))/0x5*(parseInt(_0x9bc6ac(0x198))/0x6)+-parseInt(_0x9bc6ac(0x18e))/0x7*(-parseInt(_0x9bc6ac(0x18f))/0x8)+parseInt(_0x9bc6ac(0x191))/0x9+parseInt(_0x9bc6ac(0x199))/0xa*(parseInt(_0x9bc6ac(0x196))/0xb);if(_0x3c25d0===_0x542399)break;else _0x3cd178['push'](_0x3cd178['shift']());}catch(_0x1e05f1){_0x3cd178['push'](_0x3cd178['shift']());}}}(a21_0x4dfe,0x4401a));function a21_0x4dfe(){var _0x460ede=['!\x20当前未登录','158587fTBCne','9bWyHou','38640NuAjhg','140327JaIwRO','log','78VyQKqJ','70udIutV','1004046iZwvrG','14GQQnUa','1497160YaLols','482872iqSOqM','3780819IEgnrw'];a21_0x4dfe=function(){return _0x460ede;};return a21_0x4dfe();}import{unlinkSync,existsSync}from'node:fs';import{cookieFile}from'./constant.js';export function logout(){var _0x28c567=a21_0x41b0;existsSync(cookieFile)?(unlinkSync(cookieFile),console['log']('✓\x20已退出登录')):console[_0x28c567(0x197)](_0x28c567(0x192));}
package/lib/cli.js CHANGED
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- const a25_0x50e486=a25_0x27da;(function(_0x4a8b60,_0x1686b9){const _0x56b712=a25_0x27da,_0x4b8948=_0x4a8b60();while(!![]){try{const _0x26a41a=-parseInt(_0x56b712(0xf2))/0x1*(-parseInt(_0x56b712(0x117))/0x2)+parseInt(_0x56b712(0x11e))/0x3+parseInt(_0x56b712(0x112))/0x4*(parseInt(_0x56b712(0x10c))/0x5)+-parseInt(_0x56b712(0xf6))/0x6*(parseInt(_0x56b712(0x113))/0x7)+-parseInt(_0x56b712(0x102))/0x8+parseInt(_0x56b712(0xf3))/0x9+parseInt(_0x56b712(0xfb))/0xa;if(_0x26a41a===_0x1686b9)break;else _0x4b8948['push'](_0x4b8948['shift']());}catch(_0x3e1609){_0x4b8948['push'](_0x4b8948['shift']());}}}(a25_0x55b4,0x77d9d));import{jsx as a25_0x119d6e}from'react/jsx-runtime';import a25_0x23f849 from'meow';import{render}from'ink';import{CreateApp}from'./create-app/main.js';import{AddPage}from'./add-page/main.js';import{Init}from'./init/main.js';import{runStart}from'./cmd/start.js';import{runBuild}from'./cmd/build.js';import{runPreview}from'./cmd/preview.js';import{runBuildWatch}from'./cmd/build-watch.js';import{Config}from'./config/main.js';import{apiCli}from'./api/main.js';import{AuthServer}from'./auth/auth-server-ui.js';import{logout}from'./auth/logout.js';import{Help}from'./help.js';function a25_0x27da(_0x5005a0,_0x158f2b){const _0x55b45c=a25_0x55b4();return a25_0x27da=function(_0x27da10,_0x206d89){_0x27da10=_0x27da10-0xf0;let _0x11d632=_0x55b45c[_0x27da10];return _0x11d632;},a25_0x27da(_0x5005a0,_0x158f2b);}function a25_0x55b4(){const _0x1419ef=['build','执行构建命令','4069qfwbUg','597834vaCGEE','appcode','执行初始化配置命令','6Zmesjj','exit','api','clear','add','7195920tkcyGs','cwd','\x0a\x09Usage\x0a\x09\x20\x20$\x20lovrabet\x0a\x0a\x09Examples\x0a\x09\x20\x20$\x20lovrabet\x20auth\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20登录认证\x0a\x09\x20\x20$\x20lovrabet\x20logout\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20退出登录\x0a\x09\x20\x20$\x20lovrabet\x20init\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20在现有项目中初始化\x20.lovrabetrc\x20配置文件\x0a\x09\x20\x20$\x20lovrabet\x20init\x20--appcode\x20<code>\x20\x20\x20\x20\x20//\x20使用指定的\x20appcode\x20初始化配置文件\x0a\x09\x20\x20$\x20lovrabet\x20create\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20创建一个项目\x0a\x09\x20\x20$\x20lovrabet\x20create\x20--env\x20daily\x20\x20\x20\x20\x20\x20\x20\x20//\x20创建项目并指定环境\x0a\x09\x20\x20$\x20lovrabet\x20add\x20page\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20添加一个页面\x0a\x09\x20\x20$\x20lovrabet\x20start\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20启动项目\x0a\x09\x20\x20$\x20lovrabet\x20build\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20构建项目\x0a\x09\x20\x20$\x20lovrabet\x20menu\x20sync\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20同步菜单\x0a\x09\x20\x20$\x20lovrabet\x20preview\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20预览项目\x0a\x09\x20\x20$\x20lovrabet\x20preview\x20--watch\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20监听文件变化并自动构建预览\x0a\x09\x20\x20$\x20lovrabet\x20config\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20项目配置\x0a\x09\x20\x20$\x20lovrabet\x20api\x20pull\x20--[options]\x20\x20\x20\x20\x20\x20//\x20拉取并生成\x20API\x20配置文件(详见\x20lovrabet\x20api\x20--help)\x0a\x09\x20\x20$\x20lovrabet\x20api\x20doc\x20--[options]\x20\x20\x20\x20\x20\x20\x20//\x20生成\x20API\x20文档(详见\x20lovrabet\x20api\x20--help)\x0a\x09\x20\x20$\x20lovrabet\x20logs\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20查看日志\x0a\x09\x20\x20$\x20lovrabet\x20logs\x20--clear\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20清空日志\x0a','boolean','flags','string','\x20(监听模式)','3758520OSbMfc','setLogPath','error','start','init','info','执行添加页面命令','logout','auth','env','5570eBJGSJ','lovrabet\x20','argv','all','menu','trim','216bXylwM','3926741bGqGSO','create','page','input','246Ukijtu','slice','watch','setRawCommand','preview','sync','执行启动命令','525078qELLeJ','config'];a25_0x55b4=function(){return _0x1419ef;};return a25_0x55b4();}import{logger}from'./utils/logger.js';import{showLogs,clearLogs}from'./cmd/logs.js';import{AppMenuSyncUI}from'./app-menu/app-menu-sync-ui.js';const cli=a25_0x23f849(a25_0x50e486(0xfd),{'importMeta':import.meta,'flags':{'name':{'type':'string'},'clear':{'type':a25_0x50e486(0xfe)},'env':{'type':a25_0x50e486(0x100)},'watch':{'type':a25_0x50e486(0xfe)},'help':{'type':a25_0x50e486(0xfe)},'appcode':{'type':a25_0x50e486(0x100)},'output':{'type':a25_0x50e486(0x100)},'params':{'type':a25_0x50e486(0x100)},'datasetcode':{'type':a25_0x50e486(0x100)}}});await run();async function run(){const _0x31cf60=a25_0x50e486,_0x4e9370=cli[_0x31cf60(0x116)][0x0],_0x5b4636=(_0x31cf60(0x10d)+process[_0x31cf60(0x10e)][_0x31cf60(0x118)](0x2)['join']('\x20'))['trim']();logger[_0x31cf60(0x11a)](_0x5b4636);switch(_0x4e9370){case _0x31cf60(0x106):{const _0x399b1c=cli['flags'][_0x31cf60(0xf4)],_0x4853f2=cli['flags'][_0x31cf60(0x10b)];logger[_0x31cf60(0x103)](process[_0x31cf60(0xfc)]()),logger[_0x31cf60(0x107)](_0x31cf60(0x106),_0x31cf60(0xf5)),render(a25_0x119d6e(Init,{'appcode':_0x399b1c,'env':_0x4853f2}));break;}case _0x31cf60(0x114):{const _0x4bfbd4=cli['input'][0x1]?.[_0x31cf60(0x111)](),_0x5d0b54=cli[_0x31cf60(0xff)][_0x31cf60(0x10b)];render(a25_0x119d6e(CreateApp,{'projectCode':_0x4bfbd4,'env':_0x5d0b54}));break;}case _0x31cf60(0xfa):{cli['input'][0x1]===_0x31cf60(0x115)&&(logger[_0x31cf60(0x103)](process[_0x31cf60(0xfc)]()),logger['info']('add-page',_0x31cf60(0x108)),render(a25_0x119d6e(AddPage,{})));break;}case'start':{try{logger[_0x31cf60(0x103)](process[_0x31cf60(0xfc)]()),logger[_0x31cf60(0x107)](_0x31cf60(0x105),_0x31cf60(0x11d)),await runStart();}catch(_0xa56ceb){console[_0x31cf60(0x104)](_0xa56ceb),process['exit'](0x1);}break;}case _0x31cf60(0xf0):{try{logger[_0x31cf60(0x103)](process[_0x31cf60(0xfc)]()),logger[_0x31cf60(0x107)]('build',_0x31cf60(0xf1)),await runBuild();}catch(_0x3fe86f){console[_0x31cf60(0x104)](_0x3fe86f),process[_0x31cf60(0xf7)](0x1);}break;}case'preview':{const _0x749038=cli[_0x31cf60(0xff)][_0x31cf60(0x119)];logger['setLogPath'](process[_0x31cf60(0xfc)]()),logger[_0x31cf60(0x107)](_0x31cf60(0x11b),'执行预览命令'+(_0x749038?_0x31cf60(0x101):''));if(_0x749038)try{await Promise[_0x31cf60(0x10f)]([runBuildWatch(),runPreview()]);}catch(_0x4614da){console['error'](_0x4614da),process[_0x31cf60(0xf7)](0x1);}else try{await runPreview();}catch(_0x5814be){console[_0x31cf60(0x104)](_0x5814be),process[_0x31cf60(0xf7)](0x1);}break;}case _0x31cf60(0x11f):{render(a25_0x119d6e(Config,{'cli':cli}));break;}case _0x31cf60(0xf8):{await apiCli(cli);break;}case _0x31cf60(0x10a):{render(a25_0x119d6e(AuthServer,{}));break;}case _0x31cf60(0x110):{const _0x43dde7=cli[_0x31cf60(0x116)][0x1];_0x43dde7===_0x31cf60(0x11c)&&render(a25_0x119d6e(AppMenuSyncUI,{}));break;}case _0x31cf60(0x109):{logout();break;}case'logs':{cli[_0x31cf60(0xff)][_0x31cf60(0xf9)]?clearLogs():showLogs();break;}default:render(a25_0x119d6e(Help,{}));break;}}
2
+ const a22_0x553afe=a22_0x61ba;(function(_0x2b5f08,_0x4c2a29){const _0x2eb896=a22_0x61ba,_0x4427be=_0x2b5f08();while(!![]){try{const _0x2daece=parseInt(_0x2eb896(0x94))/0x1+-parseInt(_0x2eb896(0x8e))/0x2*(-parseInt(_0x2eb896(0x8a))/0x3)+parseInt(_0x2eb896(0x7e))/0x4+-parseInt(_0x2eb896(0x86))/0x5+parseInt(_0x2eb896(0x7b))/0x6*(-parseInt(_0x2eb896(0x81))/0x7)+-parseInt(_0x2eb896(0x79))/0x8*(-parseInt(_0x2eb896(0x87))/0x9)+-parseInt(_0x2eb896(0xa2))/0xa*(parseInt(_0x2eb896(0x85))/0xb);if(_0x2daece===_0x4c2a29)break;else _0x4427be['push'](_0x4427be['shift']());}catch(_0x5b01c5){_0x4427be['push'](_0x4427be['shift']());}}}(a22_0x3cc9,0x6f599));import{jsx as a22_0x520c57}from'react/jsx-runtime';import a22_0x291ca4 from'meow';import{render}from'ink';import{CreateApp}from'./create-app/main.js';import{AddPage}from'./add-page/main.js';import{Init}from'./init/main.js';import{runStart}from'./cmd/start.js';import{runBuild}from'./cmd/build.js';import{runPreview}from'./cmd/preview.js';import{runBuildWatch}from'./cmd/build-watch.js';import{Config}from'./config/main.js';import{apiCli}from'./api/main.js';function a22_0x3cc9(){const _0x51a12e=['page','string','input','exit','setRawCommand','add','argv','\x20(监听模式)','config','211530oUJUnd','trim','create','api','preview','info','lovrabet\x20','441448fdtMUE','setLogPath','6kKdGyw','cwd','init','1831952lqRCfd','build','执行预览命令','5510498jotQqq','error','add-page','\x0a\x09Usage\x0a\x09\x20\x20$\x20lovrabet\x0a\x0a\x09Examples\x0a\x09\x20\x20$\x20lovrabet\x20auth\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20登录认证\x0a\x09\x20\x20$\x20lovrabet\x20logout\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20退出登录\x0a\x09\x20\x20$\x20lovrabet\x20init\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20在现有项目中初始化\x20.lovrabetrc\x20配置文件\x0a\x09\x20\x20$\x20lovrabet\x20init\x20--appcode\x20<code>\x20\x20\x20\x20\x20//\x20使用指定的\x20appcode\x20初始化配置文件\x0a\x09\x20\x20$\x20lovrabet\x20create\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20创建一个项目\x0a\x09\x20\x20$\x20lovrabet\x20create\x20--env\x20daily\x20\x20\x20\x20\x20\x20\x20\x20//\x20创建项目并指定环境\x0a\x09\x20\x20$\x20lovrabet\x20add\x20page\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20添加一个页面\x0a\x09\x20\x20$\x20lovrabet\x20start\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20启动项目\x0a\x09\x20\x20$\x20lovrabet\x20build\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20构建项目\x0a\x09\x20\x20$\x20lovrabet\x20menu\x20sync\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20同步菜单\x0a\x09\x20\x20$\x20lovrabet\x20preview\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20预览项目\x0a\x09\x20\x20$\x20lovrabet\x20preview\x20--watch\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20监听文件变化并自动构建预览\x0a\x09\x20\x20$\x20lovrabet\x20config\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20项目配置\x0a\x09\x20\x20$\x20lovrabet\x20api\x20pull\x20--[options]\x20\x20\x20\x20\x20\x20//\x20拉取并生成\x20API\x20配置文件(详见\x20lovrabet\x20api\x20--help)\x0a\x09\x20\x20$\x20lovrabet\x20api\x20doc\x20--[options]\x20\x20\x20\x20\x20\x20\x20//\x20生成\x20API\x20文档(详见\x20lovrabet\x20api\x20--help)\x0a\x09\x20\x20$\x20lovrabet\x20logs\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20查看日志\x0a\x09\x20\x20$\x20lovrabet\x20logs\x20--clear\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20清空日志\x0a','396Bfioze','294590VkWMDm','27jRIauz','boolean','auth','7842vRJdim','clear','logs','sync','570LsYVnl','slice','all','flags','执行构建命令','执行启动命令','695208HAvBsT','执行添加页面命令','watch','start','env'];a22_0x3cc9=function(){return _0x51a12e;};return a22_0x3cc9();}import{AuthServer}from'./auth/auth-server-ui.js';import{logout}from'./auth/logout.js';function a22_0x61ba(_0x338a98,_0x15d0d0){const _0x3cc9cf=a22_0x3cc9();return a22_0x61ba=function(_0x61bae2,_0x19280f){_0x61bae2=_0x61bae2-0x76;let _0x236c40=_0x3cc9cf[_0x61bae2];return _0x236c40;},a22_0x61ba(_0x338a98,_0x15d0d0);}import{Help}from'./help.js';import{logger}from'./utils/logger.js';import{showLogs,clearLogs}from'./cmd/logs.js';import{AppMenuSyncUI}from'./app-menu/app-menu-sync-ui.js';const cli=a22_0x291ca4(a22_0x553afe(0x84),{'importMeta':import.meta,'flags':{'name':{'type':a22_0x553afe(0x9a)},'clear':{'type':a22_0x553afe(0x88)},'env':{'type':a22_0x553afe(0x9a)},'watch':{'type':'boolean'},'help':{'type':a22_0x553afe(0x88)},'appcode':{'type':a22_0x553afe(0x9a)},'output':{'type':a22_0x553afe(0x9a)},'params':{'type':a22_0x553afe(0x9a)},'datasetcode':{'type':a22_0x553afe(0x9a)}}});await run();async function run(){const _0x1293f6=a22_0x553afe,_0x279ff6=cli[_0x1293f6(0x9b)][0x0],_0x4d3fc5=(_0x1293f6(0x78)+process[_0x1293f6(0x9f)][_0x1293f6(0x8f)](0x2)['join']('\x20'))[_0x1293f6(0xa3)]();logger[_0x1293f6(0x9d)](_0x4d3fc5);switch(_0x279ff6){case _0x1293f6(0x7d):{const _0x198366=cli[_0x1293f6(0x91)]['appcode'],_0x4838f3=cli[_0x1293f6(0x91)]['env'];logger[_0x1293f6(0x7a)](process['cwd']()),logger['info']('init','执行初始化配置命令'),render(a22_0x520c57(Init,{'appcode':_0x198366,'env':_0x4838f3}));break;}case _0x1293f6(0xa4):{const _0x3fa58a=cli[_0x1293f6(0x9b)][0x1]?.[_0x1293f6(0xa3)](),_0x540413=cli['flags'][_0x1293f6(0x98)];render(a22_0x520c57(CreateApp,{'projectCode':_0x3fa58a,'env':_0x540413}));break;}case _0x1293f6(0x9e):{cli[_0x1293f6(0x9b)][0x1]===_0x1293f6(0x99)&&(logger[_0x1293f6(0x7a)](process[_0x1293f6(0x7c)]()),logger[_0x1293f6(0x77)](_0x1293f6(0x83),_0x1293f6(0x95)),render(a22_0x520c57(AddPage,{})));break;}case _0x1293f6(0x97):{try{logger[_0x1293f6(0x7a)](process[_0x1293f6(0x7c)]()),logger[_0x1293f6(0x77)](_0x1293f6(0x97),_0x1293f6(0x93)),await runStart();}catch(_0x544caf){console['error'](_0x544caf),process[_0x1293f6(0x9c)](0x1);}break;}case _0x1293f6(0x7f):{try{logger['setLogPath'](process[_0x1293f6(0x7c)]()),logger[_0x1293f6(0x77)](_0x1293f6(0x7f),_0x1293f6(0x92)),await runBuild();}catch(_0x1d7e07){console[_0x1293f6(0x82)](_0x1d7e07),process[_0x1293f6(0x9c)](0x1);}break;}case _0x1293f6(0x76):{const _0x1d47a0=cli[_0x1293f6(0x91)][_0x1293f6(0x96)];logger[_0x1293f6(0x7a)](process[_0x1293f6(0x7c)]()),logger[_0x1293f6(0x77)](_0x1293f6(0x76),_0x1293f6(0x80)+(_0x1d47a0?_0x1293f6(0xa0):''));if(_0x1d47a0)try{await Promise[_0x1293f6(0x90)]([runBuildWatch(),runPreview()]);}catch(_0x4517fa){console['error'](_0x4517fa),process[_0x1293f6(0x9c)](0x1);}else try{await runPreview();}catch(_0x127a1f){console['error'](_0x127a1f),process[_0x1293f6(0x9c)](0x1);}break;}case _0x1293f6(0xa1):{render(a22_0x520c57(Config,{'cli':cli}));break;}case _0x1293f6(0xa5):{await apiCli(cli);break;}case _0x1293f6(0x89):{render(a22_0x520c57(AuthServer,{}));break;}case'menu':{const _0x18eab9=cli['input'][0x1];_0x18eab9===_0x1293f6(0x8d)&&render(a22_0x520c57(AppMenuSyncUI,{}));break;}case'logout':{logout();break;}case _0x1293f6(0x8c):{cli[_0x1293f6(0x91)][_0x1293f6(0x8b)]?clearLogs():showLogs();break;}default:render(a22_0x520c57(Help,{}));break;}}
@@ -1 +1 @@
1
- (function(_0x1288ac,_0x2a1fba){const _0x384ff3=a26_0x4683,_0x554223=_0x1288ac();while(!![]){try{const _0x5a1c96=parseInt(_0x384ff3(0x1b0))/0x1*(-parseInt(_0x384ff3(0x1b7))/0x2)+parseInt(_0x384ff3(0x1bb))/0x3+parseInt(_0x384ff3(0x1b9))/0x4*(parseInt(_0x384ff3(0x1ae))/0x5)+parseInt(_0x384ff3(0x1b4))/0x6+parseInt(_0x384ff3(0x1b8))/0x7+parseInt(_0x384ff3(0x1b6))/0x8*(parseInt(_0x384ff3(0x1ad))/0x9)+parseInt(_0x384ff3(0x1be))/0xa*(-parseInt(_0x384ff3(0x1b1))/0xb);if(_0x5a1c96===_0x2a1fba)break;else _0x554223['push'](_0x554223['shift']());}catch(_0x1dd2e8){_0x554223['push'](_0x554223['shift']());}}}(a26_0x5f15,0xd8556));function a26_0x4683(_0x1b3a5c,_0x395aee){const _0x5f154b=a26_0x5f15();return a26_0x4683=function(_0x468385,_0xbd8777){_0x468385=_0x468385-0x1ad;let _0x5e279f=_0x5f154b[_0x468385];return _0x5e279f;},a26_0x4683(_0x1b3a5c,_0x395aee);}function a26_0x5f15(){const _0x1d06ce=['error','1413oqoUpn','336630rXbZPf','PATH','1bvJrFL','1375LBlcbR','--watch','build','8739156eTkurf','.bin','86856JVQLig','2119826RGsxTh','9071741VgEddK','64MQsQbM','env','2212158rJjQdg','cwd','vite','346050ZWQMXP'];a26_0x5f15=function(){return _0x1d06ce;};return a26_0x5f15();}import{spawn}from'node:child_process';import{delimiter,join}from'node:path';export function runBuildWatch(){return new Promise((_0x50ff6d,_0x17d02e)=>{const _0x2021dc=a26_0x4683,_0x24ea3d=spawn(_0x2021dc(0x1bd),[_0x2021dc(0x1b3),_0x2021dc(0x1b2)],{'stdio':'inherit','shell':!![],'env':{...process[_0x2021dc(0x1ba)],'PATH':''+join(process[_0x2021dc(0x1bc)](),'node_modules',_0x2021dc(0x1b5))+delimiter+process[_0x2021dc(0x1ba)][_0x2021dc(0x1af)]}});_0x24ea3d['on']('close',_0x13f4f4=>{if(_0x13f4f4===0x0||_0x13f4f4===null)_0x50ff6d();else _0x17d02e(new Error('npm\x20run\x20build\x20exited\x20with\x20code\x20'+_0x13f4f4));}),_0x24ea3d['on'](_0x2021dc(0x1bf),_0x17d02e);});}
1
+ (function(_0x5f075a,_0x20ca4b){const _0x513e6c=a23_0x2f8f,_0x205716=_0x5f075a();while(!![]){try{const _0x3a23ae=-parseInt(_0x513e6c(0x17a))/0x1+-parseInt(_0x513e6c(0x172))/0x2*(parseInt(_0x513e6c(0x17c))/0x3)+parseInt(_0x513e6c(0x175))/0x4+parseInt(_0x513e6c(0x177))/0x5+-parseInt(_0x513e6c(0x174))/0x6+-parseInt(_0x513e6c(0x176))/0x7+parseInt(_0x513e6c(0x173))/0x8;if(_0x3a23ae===_0x20ca4b)break;else _0x205716['push'](_0x205716['shift']());}catch(_0x4459ff){_0x205716['push'](_0x205716['shift']());}}}(a23_0x40d4,0xf0bdd));import{spawn}from'node:child_process';function a23_0x2f8f(_0x1c55d6,_0x7c9e87){const _0x40d4f0=a23_0x40d4();return a23_0x2f8f=function(_0x2f8f7a,_0x30bd90){_0x2f8f7a=_0x2f8f7a-0x170;let _0x29e5e4=_0x40d4f0[_0x2f8f7a];return _0x29e5e4;},a23_0x2f8f(_0x1c55d6,_0x7c9e87);}function a23_0x40d4(){const _0x503f7e=['7271655gboIwt','vite','PATH','414204QuTPXy','npm\x20run\x20build\x20exited\x20with\x20code\x20','89361JqmATy','node_modules','env','.bin','close','6pTQmtJ','4681648eNoKgq','2992026MhMFvL','3597560PqeeCC','6654298AnpIWj'];a23_0x40d4=function(){return _0x503f7e;};return a23_0x40d4();}import{delimiter,join}from'node:path';export function runBuildWatch(){return new Promise((_0x1564b3,_0x2de40b)=>{const _0x572baa=a23_0x2f8f,_0x3e52e2=spawn(_0x572baa(0x178),['build','--watch'],{'stdio':'inherit','shell':!![],'env':{...process[_0x572baa(0x17e)],'PATH':''+join(process['cwd'](),_0x572baa(0x17d),_0x572baa(0x170))+delimiter+process[_0x572baa(0x17e)][_0x572baa(0x179)]}});_0x3e52e2['on'](_0x572baa(0x171),_0x3d95a3=>{const _0x473f1a=_0x572baa;if(_0x3d95a3===0x0||_0x3d95a3===null)_0x1564b3();else _0x2de40b(new Error(_0x473f1a(0x17b)+_0x3d95a3));}),_0x3e52e2['on']('error',_0x2de40b);});}
package/lib/cmd/build.js CHANGED
@@ -1 +1 @@
1
- (function(_0x173bb5,_0x4b2905){const _0x2d229d=a27_0x4e1d,_0x34b225=_0x173bb5();while(!![]){try{const _0x1f0f91=-parseInt(_0x2d229d(0xc5))/0x1+-parseInt(_0x2d229d(0xd3))/0x2*(parseInt(_0x2d229d(0xdc))/0x3)+-parseInt(_0x2d229d(0xd7))/0x4*(-parseInt(_0x2d229d(0xd9))/0x5)+parseInt(_0x2d229d(0xcc))/0x6+parseInt(_0x2d229d(0xc7))/0x7+-parseInt(_0x2d229d(0xd1))/0x8*(-parseInt(_0x2d229d(0xdd))/0x9)+-parseInt(_0x2d229d(0xd6))/0xa;if(_0x1f0f91===_0x4b2905)break;else _0x34b225['push'](_0x34b225['shift']());}catch(_0x61cf97){_0x34b225['push'](_0x34b225['shift']());}}}(a27_0x4a3a,0x2d64e));function a27_0x4e1d(_0x415ec0,_0x360a0e){const _0x4a3a17=a27_0x4a3a();return a27_0x4e1d=function(_0x4e1d53,_0x42b673){_0x4e1d53=_0x4e1d53-0xc2;let _0x567744=_0x4a3a17[_0x4e1d53];return _0x567744;},a27_0x4e1d(_0x415ec0,_0x360a0e);}import{delimiter,join}from'node:path';import{spawn}from'node:child_process';import{logger}from'../utils/logger.js';export function runBuild(){return new Promise((_0x9e8c56,_0x42bd19)=>{const _0x5751bf=a27_0x4e1d,_0xcb1625=Date['now']();logger[_0x5751bf(0xda)](_0x5751bf(0xd8),'开始构建项目',{'command':_0x5751bf(0xc4)});let _0x4362be='';const _0x25aae5=spawn('npm',[_0x5751bf(0xc9),_0x5751bf(0xd8)],{'stdio':['inherit',_0x5751bf(0xd2),_0x5751bf(0xce)],'shell':!![],'env':{...process[_0x5751bf(0xc6)],'PATH':''+join(process[_0x5751bf(0xc2)](),_0x5751bf(0xc3),_0x5751bf(0xc8))+delimiter+process[_0x5751bf(0xc6)]['PATH']}});_0x25aae5[_0x5751bf(0xd0)]?.['on']('data',_0x2018df=>{const _0x1814ff=_0x5751bf;_0x4362be+=_0x2018df[_0x1814ff(0xcb)]();}),_0x25aae5['on']('close',_0x352862=>{const _0x28126f=_0x5751bf,_0x51aca9=Date[_0x28126f(0xd4)]()-_0xcb1625;if(_0x352862===0x0||_0x352862===null)logger[_0x28126f(0xd5)]('build',_0x28126f(0xde),_0x51aca9),_0x9e8c56();else{const _0x1ba5bc={'exitCode':_0x352862,'duration':_0x51aca9,'command':_0x28126f(0xc4),'cwd':process[_0x28126f(0xc2)]()};_0x4362be['trim']()&&(_0x1ba5bc[_0x28126f(0xd0)]=_0x4362be[_0x28126f(0xca)]()),logger['error'](_0x28126f(0xd8),_0x28126f(0xdf),_0x1ba5bc),_0x42bd19(new Error(_0x28126f(0xcd)+_0x352862));}}),_0x25aae5['on']('error',_0x4eb935=>{const _0x3ef6b8=_0x5751bf,_0x460e6a=Date[_0x3ef6b8(0xd4)]()-_0xcb1625;logger[_0x3ef6b8(0xdb)](_0x3ef6b8(0xd8),'项目构建出错',{'error':_0x4eb935[_0x3ef6b8(0xcf)],'duration':_0x460e6a,'stderr':_0x4362be[_0x3ef6b8(0xca)]()||undefined}),_0x42bd19(_0x4eb935);});});}function a27_0x4a3a(){const _0x17b68c=['32oaYaSX','build','208885ZOZBOg','info','error','9EIsvQZ','15804qNdTJB','项目构建成功','项目构建失败','cwd','node_modules','npm\x20run\x20build','151724ExpQmI','env','773787AUCTNK','.bin','run','trim','toString','1491114IGgQtp','npm\x20run\x20build\x20exited\x20with\x20code\x20','pipe','message','stderr','8oZCMkd','inherit','166502igjHBL','now','success','1076210XxWwhb'];a27_0x4a3a=function(){return _0x17b68c;};return a27_0x4a3a();}
1
+ (function(_0x8f9145,_0xf38006){const _0x5b24de=a24_0x3dd2,_0x39527b=_0x8f9145();while(!![]){try{const _0x2b20e5=-parseInt(_0x5b24de(0xf4))/0x1*(parseInt(_0x5b24de(0xf2))/0x2)+parseInt(_0x5b24de(0x10b))/0x3*(-parseInt(_0x5b24de(0xf3))/0x4)+-parseInt(_0x5b24de(0xf9))/0x5+-parseInt(_0x5b24de(0x10a))/0x6+parseInt(_0x5b24de(0xf1))/0x7*(-parseInt(_0x5b24de(0x101))/0x8)+-parseInt(_0x5b24de(0x105))/0x9*(parseInt(_0x5b24de(0x102))/0xa)+parseInt(_0x5b24de(0xf0))/0xb*(parseInt(_0x5b24de(0x100))/0xc);if(_0x2b20e5===_0xf38006)break;else _0x39527b['push'](_0x39527b['shift']());}catch(_0x5b869b){_0x39527b['push'](_0x39527b['shift']());}}}(a24_0x593c,0xc2fbb));import{delimiter,join}from'node:path';function a24_0x3dd2(_0x479c10,_0x5f2e78){const _0x593cce=a24_0x593c();return a24_0x3dd2=function(_0x3dd242,_0x4a2f47){_0x3dd242=_0x3dd242-0xee;let _0x516995=_0x593cce[_0x3dd242];return _0x516995;},a24_0x3dd2(_0x479c10,_0x5f2e78);}function a24_0x593c(){const _0x579bef=['npm\x20run\x20build\x20exited\x20with\x20code\x20','项目构建出错','now','45441udZvRT','13937YjAghB','150CPAYSN','4JptRtu','19350BcwIiG','data','run','npm','inherit','4454700dFWrVB','error','项目构建失败','项目构建成功','node_modules','PATH','stderr','14844xbWoxF','1448KAVVpc','40ZUgvlx','info','pipe','1446156tOeOyB','build','.bin','npm\x20run\x20build','cwd','5776656qjLnNe','9969WlTxSK'];a24_0x593c=function(){return _0x579bef;};return a24_0x593c();}import{spawn}from'node:child_process';import{logger}from'../utils/logger.js';export function runBuild(){return new Promise((_0x2ccc34,_0x382904)=>{const _0x5b9bbd=a24_0x3dd2,_0x273d92=Date[_0x5b9bbd(0xef)]();logger[_0x5b9bbd(0x103)]('build','开始构建项目',{'command':_0x5b9bbd(0x108)});let _0x4c10b6='';const _0x4906aa=spawn(_0x5b9bbd(0xf7),[_0x5b9bbd(0xf6),_0x5b9bbd(0x106)],{'stdio':['inherit',_0x5b9bbd(0xf8),_0x5b9bbd(0x104)],'shell':!![],'env':{...process['env'],'PATH':''+join(process[_0x5b9bbd(0x109)](),_0x5b9bbd(0xfd),_0x5b9bbd(0x107))+delimiter+process['env'][_0x5b9bbd(0xfe)]}});_0x4906aa[_0x5b9bbd(0xff)]?.['on'](_0x5b9bbd(0xf5),_0x1c754e=>{_0x4c10b6+=_0x1c754e['toString']();}),_0x4906aa['on']('close',_0x563f7b=>{const _0x388356=_0x5b9bbd,_0x52c2c0=Date['now']()-_0x273d92;if(_0x563f7b===0x0||_0x563f7b===null)logger['success'](_0x388356(0x106),_0x388356(0xfc),_0x52c2c0),_0x2ccc34();else{const _0x27879e={'exitCode':_0x563f7b,'duration':_0x52c2c0,'command':_0x388356(0x108),'cwd':process[_0x388356(0x109)]()};_0x4c10b6['trim']()&&(_0x27879e[_0x388356(0xff)]=_0x4c10b6['trim']()),logger[_0x388356(0xfa)](_0x388356(0x106),_0x388356(0xfb),_0x27879e),_0x382904(new Error(_0x388356(0x10c)+_0x563f7b));}}),_0x4906aa['on'](_0x5b9bbd(0xfa),_0xd2f252=>{const _0x726262=_0x5b9bbd,_0x5b0903=Date[_0x726262(0xef)]()-_0x273d92;logger[_0x726262(0xfa)](_0x726262(0x106),_0x726262(0xee),{'error':_0xd2f252['message'],'duration':_0x5b0903,'stderr':_0x4c10b6['trim']()||undefined}),_0x382904(_0xd2f252);});});}
package/lib/cmd/logs.js CHANGED
@@ -1 +1 @@
1
- function a28_0x402a(){const _0x126f31=['17236tMvVZw','log','cwd','duration','warn','419016EzeGis','11297GMKpdB','keys','setLogPath','stringify','level','1199532FnCdOG','742510xZMaCA','30PvtFhP','timestamp','2217292kwEzhs','\x20\x20\x20时间:\x20','clearLogs','410124JbFILN','54osKCxU','*\x20Lovrabet\x20CLI\x20日志记录:\x0a','success','details','\x20\x20\x20详情:\x20','*\x20暂无日志记录','toLocaleString','*\x20日志已清空','length','\x20\x20\x20耗时:\x20','readLogs'];a28_0x402a=function(){return _0x126f31;};return a28_0x402a();}function a28_0x2240(_0x2d977f,_0x8f55fa){const _0x402a5f=a28_0x402a();return a28_0x2240=function(_0x2240a2,_0x4523ee){_0x2240a2=_0x2240a2-0x1aa;let _0x5cf906=_0x402a5f[_0x2240a2];return _0x5cf906;},a28_0x2240(_0x2d977f,_0x8f55fa);}(function(_0x907dbf,_0x287b4a){const _0x38a2fd=a28_0x2240,_0x11256b=_0x907dbf();while(!![]){try{const _0x157951=-parseInt(_0x38a2fd(0x1ac))/0x1+parseInt(_0x38a2fd(0x1c4))/0x2*(parseInt(_0x38a2fd(0x1b3))/0x3)+-parseInt(_0x38a2fd(0x1b8))/0x4+parseInt(_0x38a2fd(0x1b2))/0x5+parseInt(_0x38a2fd(0x1b1))/0x6+parseInt(_0x38a2fd(0x1b5))/0x7+parseInt(_0x38a2fd(0x1ab))/0x8*(-parseInt(_0x38a2fd(0x1b9))/0x9);if(_0x157951===_0x287b4a)break;else _0x11256b['push'](_0x11256b['shift']());}catch(_0x17f796){_0x11256b['push'](_0x11256b['shift']());}}}(a28_0x402a,0x4eec6));import{logger}from'../utils/logger.js';export function showLogs(){const _0x1e6ad4=a28_0x2240;logger[_0x1e6ad4(0x1ae)](process[_0x1e6ad4(0x1c6)]());const _0x493e45=logger[_0x1e6ad4(0x1c3)]();if(_0x493e45['length']===0x0){console['log'](_0x1e6ad4(0x1be));return;}console['log'](_0x1e6ad4(0x1ba)),_0x493e45['forEach']((_0x3c81c7,_0x126e56)=>{const _0x12f8c7=_0x1e6ad4,_0x4635ef=new Date(_0x3c81c7[_0x12f8c7(0x1b4)])[_0x12f8c7(0x1bf)]('zh-CN'),_0x5b10ab=_0x3c81c7[_0x12f8c7(0x1b0)]===_0x12f8c7(0x1bb)?'√':_0x3c81c7[_0x12f8c7(0x1b0)]==='error'?'×':_0x3c81c7['level']===_0x12f8c7(0x1aa)?'!':'i';console[_0x12f8c7(0x1c5)](_0x126e56+0x1+'.\x20'+_0x5b10ab+'\x20['+_0x3c81c7['command']+']\x20'+_0x3c81c7['message']),console[_0x12f8c7(0x1c5)](_0x12f8c7(0x1b6)+_0x4635ef),_0x3c81c7['duration']&&console['log'](_0x12f8c7(0x1c2)+_0x3c81c7[_0x12f8c7(0x1c7)]+'ms'),_0x3c81c7[_0x12f8c7(0x1bc)]&&Object[_0x12f8c7(0x1ad)](_0x3c81c7[_0x12f8c7(0x1bc)])[_0x12f8c7(0x1c1)]>0x0&&console['log'](_0x12f8c7(0x1bd)+JSON[_0x12f8c7(0x1af)](_0x3c81c7[_0x12f8c7(0x1bc)],null,0x2)),console[_0x12f8c7(0x1c5)]('');});}export function clearLogs(){const _0x1e1a1d=a28_0x2240;logger['setLogPath'](process['cwd']()),logger[_0x1e1a1d(0x1b7)](),console[_0x1e1a1d(0x1c5)](_0x1e1a1d(0x1c0));}
1
+ function a25_0x41c2(){const _0x1701ea=['1141194KBCXSc','keys','486453KQculO','details','log','forEach','duration','7621496CElFTe','8wNKVuq','4054959vgCCqq','readLogs','warn','\x20\x20\x20耗时:\x20','cwd','*\x20日志已清空','7KKcwey','level','1054732PIXQEN','error','\x20\x20\x20时间:\x20','message','zh-CN','\x20\x20\x20详情:\x20','*\x20Lovrabet\x20CLI\x20日志记录:\x0a','stringify','1276132KyDuPM','20djQWcU','260xKAAYo','clearLogs','setLogPath','136174vvFuzi','timestamp','toLocaleString','*\x20暂无日志记录'];a25_0x41c2=function(){return _0x1701ea;};return a25_0x41c2();}function a25_0xbbec(_0x1dbd90,_0x907de5){const _0x41c245=a25_0x41c2();return a25_0xbbec=function(_0xbbecf3,_0xe29761){_0xbbecf3=_0xbbecf3-0x12b;let _0x493ecc=_0x41c245[_0xbbecf3];return _0x493ecc;},a25_0xbbec(_0x1dbd90,_0x907de5);}(function(_0x510a30,_0x536f8a){const _0x453da6=a25_0xbbec,_0x3bf80c=_0x510a30();while(!![]){try{const _0x5007cd=-parseInt(_0x453da6(0x135))/0x1*(parseInt(_0x453da6(0x141))/0x2)+-parseInt(_0x453da6(0x13b))/0x3+parseInt(_0x453da6(0x14a))/0x4*(-parseInt(_0x453da6(0x131))/0x5)+-parseInt(_0x453da6(0x139))/0x6+-parseInt(_0x453da6(0x148))/0x7*(parseInt(_0x453da6(0x140))/0x8)+parseInt(_0x453da6(0x142))/0x9+-parseInt(_0x453da6(0x132))/0xa*(-parseInt(_0x453da6(0x130))/0xb);if(_0x5007cd===_0x536f8a)break;else _0x3bf80c['push'](_0x3bf80c['shift']());}catch(_0x413e78){_0x3bf80c['push'](_0x3bf80c['shift']());}}}(a25_0x41c2,0x894de));import{logger}from'../utils/logger.js';export function showLogs(){const _0x1d599a=a25_0xbbec;logger['setLogPath'](process[_0x1d599a(0x146)]());const _0x1bfc73=logger[_0x1d599a(0x143)]();if(_0x1bfc73['length']===0x0){console[_0x1d599a(0x13d)](_0x1d599a(0x138));return;}console[_0x1d599a(0x13d)](_0x1d599a(0x12e)),_0x1bfc73[_0x1d599a(0x13e)]((_0x2240fd,_0x10acf4)=>{const _0x2e91a0=_0x1d599a,_0x4c852e=new Date(_0x2240fd[_0x2e91a0(0x136)])[_0x2e91a0(0x137)](_0x2e91a0(0x12c)),_0x565b6a=_0x2240fd[_0x2e91a0(0x149)]==='success'?'√':_0x2240fd[_0x2e91a0(0x149)]===_0x2e91a0(0x14b)?'×':_0x2240fd[_0x2e91a0(0x149)]===_0x2e91a0(0x144)?'!':'i';console[_0x2e91a0(0x13d)](_0x10acf4+0x1+'.\x20'+_0x565b6a+'\x20['+_0x2240fd['command']+']\x20'+_0x2240fd[_0x2e91a0(0x12b)]),console['log'](_0x2e91a0(0x14c)+_0x4c852e),_0x2240fd[_0x2e91a0(0x13f)]&&console['log'](_0x2e91a0(0x145)+_0x2240fd[_0x2e91a0(0x13f)]+'ms'),_0x2240fd['details']&&Object[_0x2e91a0(0x13a)](_0x2240fd[_0x2e91a0(0x13c)])['length']>0x0&&console[_0x2e91a0(0x13d)](_0x2e91a0(0x12d)+JSON[_0x2e91a0(0x12f)](_0x2240fd[_0x2e91a0(0x13c)],null,0x2)),console[_0x2e91a0(0x13d)]('');});}export function clearLogs(){const _0x1f491d=a25_0xbbec;logger[_0x1f491d(0x134)](process[_0x1f491d(0x146)]()),logger[_0x1f491d(0x133)](),console[_0x1f491d(0x13d)](_0x1f491d(0x147));}
@@ -1 +1 @@
1
- (function(_0x3a0f3a,_0x26365d){const _0x29c788=a29_0x2838,_0x1d0c55=_0x3a0f3a();while(!![]){try{const _0x3eab42=parseInt(_0x29c788(0x1ea))/0x1+parseInt(_0x29c788(0x1fc))/0x2+-parseInt(_0x29c788(0x205))/0x3*(-parseInt(_0x29c788(0x203))/0x4)+-parseInt(_0x29c788(0x1fd))/0x5*(parseInt(_0x29c788(0x1ec))/0x6)+parseInt(_0x29c788(0x1ee))/0x7*(-parseInt(_0x29c788(0x1f5))/0x8)+parseInt(_0x29c788(0x1f7))/0x9*(-parseInt(_0x29c788(0x206))/0xa)+-parseInt(_0x29c788(0x1ff))/0xb*(-parseInt(_0x29c788(0x1f3))/0xc);if(_0x3eab42===_0x26365d)break;else _0x1d0c55['push'](_0x1d0c55['shift']());}catch(_0x143496){_0x1d0c55['push'](_0x1d0c55['shift']());}}}(a29_0x3b40,0x257f8));function a29_0x3b40(){const _0x2a51a4=['48AWpRUO','data','24tCfXgX','inherit','9gOPHoR','env','info','pipe','PATH','419020qbLfiG','20oxKOeF','vite\x20preview','1204808SdtfmB','预览服务器启动成功','error','preview','1964FvrnAc','trim','87kTjRMv','2894330JyqycY','.bin','message','预览服务器启动出错','now','vite\x20preview\x20exited\x20with\x20code\x20','35235AYXRea','启动预览服务器','188052UrPROv','cwd','300307zGrNTd','stderr','node_modules','success','预览服务器启动失败'];a29_0x3b40=function(){return _0x2a51a4;};return a29_0x3b40();}import{delimiter,join}from'node:path';import{spawn}from'node:child_process';function a29_0x2838(_0x50602a,_0x1dc362){const _0x3b4000=a29_0x3b40();return a29_0x2838=function(_0x28384b,_0x1598af){_0x28384b=_0x28384b-0x1e8;let _0x5e618f=_0x3b4000[_0x28384b];return _0x5e618f;},a29_0x2838(_0x50602a,_0x1dc362);}import{logger}from'../utils/logger.js';export function runPreview(){return new Promise((_0x3c1697,_0x2c8be6)=>{const _0x164389=a29_0x2838,_0x3da33a=Date[_0x164389(0x1e8)]();logger[_0x164389(0x1f9)](_0x164389(0x202),_0x164389(0x1eb),{'command':_0x164389(0x1fe)});let _0x123e69='';const _0x1e2b26=spawn('vite',[_0x164389(0x202)],{'stdio':[_0x164389(0x1f6),_0x164389(0x1f6),_0x164389(0x1fa)],'shell':!![],'env':{...process[_0x164389(0x1f8)],'PATH':''+join(process[_0x164389(0x1ed)](),_0x164389(0x1f0),_0x164389(0x207))+delimiter+process[_0x164389(0x1f8)][_0x164389(0x1fb)]}});_0x1e2b26['stderr']?.['on'](_0x164389(0x1f4),_0x18071e=>{_0x123e69+=_0x18071e['toString']();}),_0x1e2b26['on']('close',_0x5ad5d9=>{const _0x1d3894=_0x164389,_0x2d426a=Date[_0x1d3894(0x1e8)]()-_0x3da33a;if(_0x5ad5d9===0x0||_0x5ad5d9===null)logger[_0x1d3894(0x1f1)]('preview',_0x1d3894(0x200),_0x2d426a),_0x3c1697();else{const _0xcf5e13={'exitCode':_0x5ad5d9,'duration':_0x2d426a,'command':'vite\x20preview','cwd':process[_0x1d3894(0x1ed)]()};_0x123e69[_0x1d3894(0x204)]()&&(_0xcf5e13[_0x1d3894(0x1ef)]=_0x123e69[_0x1d3894(0x204)]()),logger[_0x1d3894(0x201)](_0x1d3894(0x202),_0x1d3894(0x1f2),_0xcf5e13),_0x2c8be6(new Error(_0x1d3894(0x1e9)+_0x5ad5d9));}}),_0x1e2b26['on']('error',_0x344757=>{const _0x54ad23=_0x164389,_0x67d76=Date['now']()-_0x3da33a;logger[_0x54ad23(0x201)]('preview',_0x54ad23(0x209),{'error':_0x344757[_0x54ad23(0x208)],'duration':_0x67d76,'stderr':_0x123e69[_0x54ad23(0x204)]()||undefined}),_0x2c8be6(_0x344757);});});}
1
+ (function(_0x484434,_0x41aef3){const _0x43f3de=a26_0x1559,_0x5b79ae=_0x484434();while(!![]){try{const _0x2283ba=parseInt(_0x43f3de(0x129))/0x1+parseInt(_0x43f3de(0x135))/0x2+-parseInt(_0x43f3de(0x13f))/0x3*(parseInt(_0x43f3de(0x12f))/0x4)+-parseInt(_0x43f3de(0x12c))/0x5+-parseInt(_0x43f3de(0x13b))/0x6*(parseInt(_0x43f3de(0x12d))/0x7)+parseInt(_0x43f3de(0x126))/0x8+parseInt(_0x43f3de(0x133))/0x9;if(_0x2283ba===_0x41aef3)break;else _0x5b79ae['push'](_0x5b79ae['shift']());}catch(_0x3a5cbf){_0x5b79ae['push'](_0x5b79ae['shift']());}}}(a26_0x5b1a,0xf11a8));function a26_0x5b1a(){const _0x5bd35c=['cwd','preview','message','21688920uArkvW','inherit','1253488wFFPDw','stderr','vite','trim','启动预览服务器','error','6zkVbgD','env','预览服务器启动失败','vite\x20preview','147igSBjx','pipe','success','13640896Zxwunv','now','.bin','712745WLmFqQ','PATH','预览服务器启动成功','6712945sozBzc','12001528RoAqtx','info','115088lDJNcY'];a26_0x5b1a=function(){return _0x5bd35c;};return a26_0x5b1a();}import{delimiter,join}from'node:path';import{spawn}from'node:child_process';function a26_0x1559(_0x56dced,_0xcb1a0f){const _0x5b1a91=a26_0x5b1a();return a26_0x1559=function(_0x1559c3,_0x5688be){_0x1559c3=_0x1559c3-0x124;let _0x58aadb=_0x5b1a91[_0x1559c3];return _0x58aadb;},a26_0x1559(_0x56dced,_0xcb1a0f);}import{logger}from'../utils/logger.js';export function runPreview(){return new Promise((_0x19f1a1,_0x18d64f)=>{const _0x189725=a26_0x1559,_0x49fed7=Date[_0x189725(0x127)]();logger[_0x189725(0x12e)](_0x189725(0x131),_0x189725(0x139),{'command':_0x189725(0x13e)});let _0x3a23c3='';const _0x49a607=spawn(_0x189725(0x137),[_0x189725(0x131)],{'stdio':[_0x189725(0x134),_0x189725(0x134),_0x189725(0x124)],'shell':!![],'env':{...process[_0x189725(0x13c)],'PATH':''+join(process[_0x189725(0x130)](),'node_modules',_0x189725(0x128))+delimiter+process['env'][_0x189725(0x12a)]}});_0x49a607[_0x189725(0x136)]?.['on']('data',_0x2d2ef2=>{_0x3a23c3+=_0x2d2ef2['toString']();}),_0x49a607['on']('close',_0x118e28=>{const _0x143c02=_0x189725,_0x178057=Date[_0x143c02(0x127)]()-_0x49fed7;if(_0x118e28===0x0||_0x118e28===null)logger[_0x143c02(0x125)](_0x143c02(0x131),_0x143c02(0x12b),_0x178057),_0x19f1a1();else{const _0x1cf719={'exitCode':_0x118e28,'duration':_0x178057,'command':_0x143c02(0x13e),'cwd':process[_0x143c02(0x130)]()};_0x3a23c3[_0x143c02(0x138)]()&&(_0x1cf719['stderr']=_0x3a23c3[_0x143c02(0x138)]()),logger[_0x143c02(0x13a)](_0x143c02(0x131),_0x143c02(0x13d),_0x1cf719),_0x18d64f(new Error('vite\x20preview\x20exited\x20with\x20code\x20'+_0x118e28));}}),_0x49a607['on'](_0x189725(0x13a),_0x1f2e07=>{const _0x3bddbf=_0x189725,_0x3c1e30=Date[_0x3bddbf(0x127)]()-_0x49fed7;logger['error']('preview','预览服务器启动出错',{'error':_0x1f2e07[_0x3bddbf(0x132)],'duration':_0x3c1e30,'stderr':_0x3a23c3[_0x3bddbf(0x138)]()||undefined}),_0x18d64f(_0x1f2e07);});});}
package/lib/cmd/start.js CHANGED
@@ -1 +1 @@
1
- function a30_0x398b(_0x2f635c,_0x249522){const _0x34f192=a30_0x34f1();return a30_0x398b=function(_0x398b07,_0x2a7253){_0x398b07=_0x398b07-0x145;let _0x2f9c8e=_0x34f192[_0x398b07];return _0x2f9c8e;},a30_0x398b(_0x2f635c,_0x249522);}(function(_0x52f63e,_0x4ca7e9){const _0x1269fb=a30_0x398b,_0x876f96=_0x52f63e();while(!![]){try{const _0x373e6a=parseInt(_0x1269fb(0x158))/0x1*(-parseInt(_0x1269fb(0x15e))/0x2)+parseInt(_0x1269fb(0x154))/0x3+parseInt(_0x1269fb(0x150))/0x4*(parseInt(_0x1269fb(0x153))/0x5)+parseInt(_0x1269fb(0x14a))/0x6*(parseInt(_0x1269fb(0x145))/0x7)+-parseInt(_0x1269fb(0x159))/0x8+-parseInt(_0x1269fb(0x146))/0x9*(-parseInt(_0x1269fb(0x15f))/0xa)+-parseInt(_0x1269fb(0x147))/0xb*(-parseInt(_0x1269fb(0x160))/0xc);if(_0x373e6a===_0x4ca7e9)break;else _0x876f96['push'](_0x876f96['shift']());}catch(_0x262909){_0x876f96['push'](_0x876f96['shift']());}}}(a30_0x34f1,0x3c1c9));import{delimiter,join}from'node:path';import{spawn}from'node:child_process';import{logger}from'../utils/logger.js';function a30_0x34f1(){const _0x3edebc=['write','570136BtmteG','306QDOITh','22grKKYS','cwd','开发服务器启动出错','6RUewYl','inherit','close','toString','now','vite','1724sBlMKN','开发服务器启动成功','启动开发服务器','3595ccewSH','889617QeHXLQ','success','.bin','env','9634PpvjbP','1584872iaeERu','vite\x20exited\x20with\x20code\x20','start','stderr','error','86EJWbSx','42680TNbYDk','153600qcLuGj','trim'];a30_0x34f1=function(){return _0x3edebc;};return a30_0x34f1();}export function runStart(_0x27422d){return new Promise((_0x4a6f06,_0x28ffbe)=>{const _0x3e1d41=a30_0x398b,_0xa2c9bb=Date['now'](),_0x3912bd=_0x27422d||process[_0x3e1d41(0x148)]();logger['info'](_0x3e1d41(0x15b),_0x3e1d41(0x152),{'command':_0x3e1d41(0x14f),'cwd':_0x3912bd});let _0x40bbcb='';const _0xac69ef=spawn(_0x3e1d41(0x14f),{'stdio':['inherit',_0x3e1d41(0x14b),'pipe'],'shell':!![],'cwd':_0x3912bd,'env':{...process['env'],'PATH':''+join(_0x3912bd,'node_modules',_0x3e1d41(0x156))+delimiter+process[_0x3e1d41(0x157)]['PATH']}});_0xac69ef['stderr']?.['on']('data',_0x605e87=>{const _0x18ba37=_0x3e1d41,_0x45cd82=_0x605e87[_0x18ba37(0x14d)]();_0x40bbcb+=_0x45cd82,process[_0x18ba37(0x15c)][_0x18ba37(0x162)](_0x45cd82);}),_0xac69ef['on'](_0x3e1d41(0x14c),_0x408e86=>{const _0x4ac097=_0x3e1d41,_0xa9ee7c=Date[_0x4ac097(0x14e)]()-_0xa2c9bb;if(_0x408e86===0x0||_0x408e86===null)logger[_0x4ac097(0x155)](_0x4ac097(0x15b),_0x4ac097(0x151),_0xa9ee7c),_0x4a6f06();else{const _0xb91fd2={'exitCode':_0x408e86,'duration':_0xa9ee7c,'command':'vite','cwd':_0x3912bd};_0x40bbcb[_0x4ac097(0x161)]()&&(_0xb91fd2['stderr']=_0x40bbcb[_0x4ac097(0x161)]()),logger[_0x4ac097(0x15d)](_0x4ac097(0x15b),'开发服务器启动失败',_0xb91fd2),_0x28ffbe(new Error(_0x4ac097(0x15a)+_0x408e86));}}),_0xac69ef['on'](_0x3e1d41(0x15d),_0x410ba5=>{const _0xfdf227=_0x3e1d41,_0x32b04a=Date[_0xfdf227(0x14e)]()-_0xa2c9bb,_0x297c72={'error':_0x410ba5['message'],'duration':_0x32b04a,'command':_0xfdf227(0x14f),'cwd':_0x3912bd};_0x40bbcb['trim']()&&(_0x297c72[_0xfdf227(0x15c)]=_0x40bbcb[_0xfdf227(0x161)]()),logger[_0xfdf227(0x15d)]('start',_0xfdf227(0x149),_0x297c72),_0x28ffbe(_0x410ba5);});});}
1
+ (function(_0x31de68,_0x1c4c96){const _0x3bd57d=a27_0x212b,_0x45891f=_0x31de68();while(!![]){try{const _0x264abb=parseInt(_0x3bd57d(0x78))/0x1*(parseInt(_0x3bd57d(0x6f))/0x2)+-parseInt(_0x3bd57d(0x7e))/0x3*(parseInt(_0x3bd57d(0x7f))/0x4)+parseInt(_0x3bd57d(0x87))/0x5*(parseInt(_0x3bd57d(0x6e))/0x6)+-parseInt(_0x3bd57d(0x70))/0x7*(parseInt(_0x3bd57d(0x7c))/0x8)+parseInt(_0x3bd57d(0x6d))/0x9*(-parseInt(_0x3bd57d(0x7b))/0xa)+parseInt(_0x3bd57d(0x6c))/0xb+parseInt(_0x3bd57d(0x79))/0xc;if(_0x264abb===_0x1c4c96)break;else _0x45891f['push'](_0x45891f['shift']());}catch(_0xf62d2c){_0x45891f['push'](_0x45891f['shift']());}}}(a27_0x1cb4,0x54c53));import{delimiter,join}from'node:path';import{spawn}from'node:child_process';function a27_0x1cb4(){const _0x3af984=['7LyMREw','data','vite\x20exited\x20with\x20code\x20','trim','PATH','开发服务器启动出错','pipe','error','7ORNdXy','1422828MlqzXa','env','10XdtaTT','2402584dyBAEw','now','15fMQEjO','5644cxmbPp','.bin','inherit','start','info','vite','write','success','695tlYdsS','stderr','toString','2435642DyRYiC','2715885VZJDbP','7728PdcpgB','124954qrOmBc'];a27_0x1cb4=function(){return _0x3af984;};return a27_0x1cb4();}import{logger}from'../utils/logger.js';function a27_0x212b(_0x243c8a,_0x25f2cc){const _0x1cb4db=a27_0x1cb4();return a27_0x212b=function(_0x212b1f,_0x53d318){_0x212b1f=_0x212b1f-0x6b;let _0x18384e=_0x1cb4db[_0x212b1f];return _0x18384e;},a27_0x212b(_0x243c8a,_0x25f2cc);}export function runStart(_0x2f209e){return new Promise((_0x52afb9,_0x5411ac)=>{const _0x43c2c2=a27_0x212b,_0x43af27=Date[_0x43c2c2(0x7d)](),_0x4da444=_0x2f209e||process['cwd']();logger[_0x43c2c2(0x83)](_0x43c2c2(0x82),'启动开发服务器',{'command':_0x43c2c2(0x84),'cwd':_0x4da444});let _0xb708a0='';const _0x444126=spawn(_0x43c2c2(0x84),{'stdio':[_0x43c2c2(0x81),_0x43c2c2(0x81),_0x43c2c2(0x76)],'shell':!![],'cwd':_0x4da444,'env':{...process['env'],'PATH':''+join(_0x4da444,'node_modules',_0x43c2c2(0x80))+delimiter+process[_0x43c2c2(0x7a)][_0x43c2c2(0x74)]}});_0x444126[_0x43c2c2(0x88)]?.['on'](_0x43c2c2(0x71),_0x393282=>{const _0x4cbc85=_0x43c2c2,_0x683a73=_0x393282[_0x4cbc85(0x6b)]();_0xb708a0+=_0x683a73,process[_0x4cbc85(0x88)][_0x4cbc85(0x85)](_0x683a73);}),_0x444126['on']('close',_0x15d13f=>{const _0x24a725=_0x43c2c2,_0x739ac3=Date[_0x24a725(0x7d)]()-_0x43af27;if(_0x15d13f===0x0||_0x15d13f===null)logger[_0x24a725(0x86)]('start','开发服务器启动成功',_0x739ac3),_0x52afb9();else{const _0x4748b0={'exitCode':_0x15d13f,'duration':_0x739ac3,'command':'vite','cwd':_0x4da444};_0xb708a0['trim']()&&(_0x4748b0[_0x24a725(0x88)]=_0xb708a0[_0x24a725(0x73)]()),logger['error'](_0x24a725(0x82),'开发服务器启动失败',_0x4748b0),_0x5411ac(new Error(_0x24a725(0x72)+_0x15d13f));}}),_0x444126['on']('error',_0xb8048=>{const _0x42292e=_0x43c2c2,_0x312c0d=Date[_0x42292e(0x7d)]()-_0x43af27,_0x41092f={'error':_0xb8048['message'],'duration':_0x312c0d,'command':_0x42292e(0x84),'cwd':_0x4da444};_0xb708a0[_0x42292e(0x73)]()&&(_0x41092f[_0x42292e(0x88)]=_0xb708a0[_0x42292e(0x73)]()),logger[_0x42292e(0x77)](_0x42292e(0x82),_0x42292e(0x75),_0x41092f),_0x5411ac(_0xb8048);});});}
@@ -1 +1 @@
1
- function a31_0x5b17(_0x4cb629,_0x18815d){const _0x20ca79=a31_0x20ca();return a31_0x5b17=function(_0x5b170f,_0x160497){_0x5b170f=_0x5b170f-0x10f;let _0x422aa9=_0x20ca79[_0x5b170f];return _0x422aa9;},a31_0x5b17(_0x4cb629,_0x18815d);}(function(_0x48d3b2,_0x116356){const _0x25283f=a31_0x5b17,_0x526235=_0x48d3b2();while(!![]){try{const _0x2a98e0=parseInt(_0x25283f(0x113))/0x1*(-parseInt(_0x25283f(0x116))/0x2)+parseInt(_0x25283f(0x11a))/0x3+parseInt(_0x25283f(0x125))/0x4*(-parseInt(_0x25283f(0x114))/0x5)+parseInt(_0x25283f(0x110))/0x6+parseInt(_0x25283f(0x127))/0x7*(parseInt(_0x25283f(0x121))/0x8)+-parseInt(_0x25283f(0x11b))/0x9+-parseInt(_0x25283f(0x124))/0xa*(-parseInt(_0x25283f(0x115))/0xb);if(_0x2a98e0===_0x116356)break;else _0x526235['push'](_0x526235['shift']());}catch(_0x165827){_0x526235['push'](_0x526235['shift']());}}}(a31_0x20ca,0x48841));function a31_0x20ca(){const _0x3242a8=['3viNNTR','5OYCemy','77RPKzme','211246AnvuCz','lovrabet\x20config\x20set\x20app\x20app-xxxxx\x20\x20\x20','gray','\x20*\x20配置示例:','1694616WXoZpB','3834117EFhWzU','lovrabet\x20config\x20set\x20env\x20daily\x20\x20\x20\x20\x20\x20\x20','\x20\x20\x20\x20','lovrabet\x20config\x20get\x20<key>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','description','配置当前项目的\x20App\x20Code','104bsUokw','获取配置项','map','69500GRgncY','1124164amwQFp','列出所有配置项','143024syjNCO','设置环境\x20(online/daily)','2650860OpTAYA','command','lovrabet\x20config\x20list\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'];a31_0x20ca=function(){return _0x3242a8;};return a31_0x20ca();}import{jsxs as a31_0x3e792b,jsx as a31_0x1e5545}from'react/jsx-runtime';import{Box,Text}from'ink';export function ConfigHelp(){const _0x41d4f8=a31_0x5b17,_0x4d360d=[{'command':'lovrabet\x20config\x20set\x20<key>\x20<value>\x20\x20\x20','description':'设置配置项'},{'command':_0x41d4f8(0x11e),'description':_0x41d4f8(0x122)},{'command':_0x41d4f8(0x112),'description':_0x41d4f8(0x126)}],_0xf94fc7=[{'command':_0x41d4f8(0x117),'description':_0x41d4f8(0x120)},{'command':_0x41d4f8(0x11c),'description':_0x41d4f8(0x10f)}];return a31_0x3e792b(Box,{'flexDirection':'column','marginTop':0x1,'marginBottom':0x1,'children':[a31_0x1e5545(Box,{'marginBottom':0x1,'children':a31_0x3e792b(Text,{'color':_0x41d4f8(0x118),'children':['\x20!','\x20\x20','无效的命令,可用命令如下:']})}),_0x4d360d[_0x41d4f8(0x123)](_0x5e244c=>a31_0x3e792b(Box,{'children':[a31_0x3e792b(Text,{'children':['\x20\x20\x20\x20',_0x5e244c[_0x41d4f8(0x111)]]}),a31_0x1e5545(Text,{'color':_0x41d4f8(0x118),'children':_0x5e244c[_0x41d4f8(0x11f)]})]},_0x5e244c[_0x41d4f8(0x111)])),a31_0x1e5545(Box,{'marginTop':0x1,'marginBottom':0x1,'children':a31_0x1e5545(Text,{'color':_0x41d4f8(0x118),'children':_0x41d4f8(0x119)})}),_0xf94fc7[_0x41d4f8(0x123)](_0x3abf33=>a31_0x3e792b(Box,{'children':[a31_0x3e792b(Text,{'children':[_0x41d4f8(0x11d),_0x3abf33[_0x41d4f8(0x111)]]}),a31_0x1e5545(Text,{'color':_0x41d4f8(0x118),'children':_0x3abf33['description']})]},_0x3abf33['command']))]});}
1
+ function a28_0x4c01(_0x228ca1,_0x4544ee){const _0x249601=a28_0x2496();return a28_0x4c01=function(_0x4c019a,_0x3cb92a){_0x4c019a=_0x4c019a-0x173;let _0x40f2a9=_0x249601[_0x4c019a];return _0x40f2a9;},a28_0x4c01(_0x228ca1,_0x4544ee);}(function(_0x2ceda2,_0x457ae5){const _0x13460e=a28_0x4c01,_0x5372a8=_0x2ceda2();while(!![]){try{const _0x4ccf05=-parseInt(_0x13460e(0x17e))/0x1*(parseInt(_0x13460e(0x178))/0x2)+parseInt(_0x13460e(0x174))/0x3+-parseInt(_0x13460e(0x176))/0x4+parseInt(_0x13460e(0x17a))/0x5*(-parseInt(_0x13460e(0x180))/0x6)+-parseInt(_0x13460e(0x17f))/0x7*(parseInt(_0x13460e(0x17c))/0x8)+-parseInt(_0x13460e(0x177))/0x9*(-parseInt(_0x13460e(0x179))/0xa)+parseInt(_0x13460e(0x18b))/0xb;if(_0x4ccf05===_0x457ae5)break;else _0x5372a8['push'](_0x5372a8['shift']());}catch(_0x1a3960){_0x5372a8['push'](_0x5372a8['shift']());}}}(a28_0x2496,0x5ecfa));import{jsxs as a28_0x5ace24,jsx as a28_0x1f3757}from'react/jsx-runtime';import{Box,Text}from'ink';function a28_0x2496(){const _0x52539a=['gray','lovrabet\x20config\x20set\x20env\x20daily\x20\x20\x20\x20\x20\x20\x20','\x20*\x20配置示例:','command','description','配置当前项目的\x20App\x20Code','map','column','\x20\x20\x20\x20','获取配置项','13848945dqEPNu','lovrabet\x20config\x20set\x20app\x20app-xxxxx\x20\x20\x20','列出所有配置项','1850445IYXvju','lovrabet\x20config\x20get\x20<key>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','2243064INTPYl','2996262PeyIcb','1471532WECdor','20yckTJo','35AnAzrF','lovrabet\x20config\x20set\x20<key>\x20<value>\x20\x20\x20','2152ugDBbR','无效的命令,可用命令如下:','1HgSFJY','11375mreyIx','359694bfhYML'];a28_0x2496=function(){return _0x52539a;};return a28_0x2496();}export function ConfigHelp(){const _0x2f0c83=a28_0x4c01,_0x48d309=[{'command':_0x2f0c83(0x17b),'description':'设置配置项'},{'command':_0x2f0c83(0x175),'description':_0x2f0c83(0x18a)},{'command':'lovrabet\x20config\x20list\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','description':_0x2f0c83(0x173)}],_0x16c217=[{'command':_0x2f0c83(0x18c),'description':_0x2f0c83(0x186)},{'command':_0x2f0c83(0x182),'description':'设置环境\x20(online/daily)'}];return a28_0x5ace24(Box,{'flexDirection':_0x2f0c83(0x188),'marginTop':0x1,'marginBottom':0x1,'children':[a28_0x1f3757(Box,{'marginBottom':0x1,'children':a28_0x5ace24(Text,{'color':_0x2f0c83(0x181),'children':['\x20!','\x20\x20',_0x2f0c83(0x17d)]})}),_0x48d309[_0x2f0c83(0x187)](_0x391014=>a28_0x5ace24(Box,{'children':[a28_0x5ace24(Text,{'children':[_0x2f0c83(0x189),_0x391014[_0x2f0c83(0x184)]]}),a28_0x1f3757(Text,{'color':_0x2f0c83(0x181),'children':_0x391014[_0x2f0c83(0x185)]})]},_0x391014['command'])),a28_0x1f3757(Box,{'marginTop':0x1,'marginBottom':0x1,'children':a28_0x1f3757(Text,{'color':_0x2f0c83(0x181),'children':_0x2f0c83(0x183)})}),_0x16c217[_0x2f0c83(0x187)](_0xb5c352=>a28_0x5ace24(Box,{'children':[a28_0x5ace24(Text,{'children':['\x20\x20\x20\x20',_0xb5c352['command']]}),a28_0x1f3757(Text,{'color':_0x2f0c83(0x181),'children':_0xb5c352['description']})]},_0xb5c352[_0x2f0c83(0x184)]))]});}
@@ -1 +1 @@
1
- (function(_0x391d9a,_0x4cebdc){const _0x12eb34=a32_0x4d2f,_0x409077=_0x391d9a();while(!![]){try{const _0x3b4cba=-parseInt(_0x12eb34(0x18a))/0x1*(-parseInt(_0x12eb34(0x172))/0x2)+-parseInt(_0x12eb34(0x192))/0x3+parseInt(_0x12eb34(0x187))/0x4+-parseInt(_0x12eb34(0x174))/0x5*(parseInt(_0x12eb34(0x19b))/0x6)+parseInt(_0x12eb34(0x19a))/0x7*(parseInt(_0x12eb34(0x173))/0x8)+parseInt(_0x12eb34(0x196))/0x9*(-parseInt(_0x12eb34(0x183))/0xa)+parseInt(_0x12eb34(0x198))/0xb*(-parseInt(_0x12eb34(0x17d))/0xc);if(_0x3b4cba===_0x4cebdc)break;else _0x409077['push'](_0x409077['shift']());}catch(_0x2956af){_0x409077['push'](_0x409077['shift']());}}}(a32_0x2d05,0x322b9));function a32_0x4d2f(_0x26c77c,_0x3065e7){const _0x2d05e0=a32_0x2d05();return a32_0x4d2f=function(_0x4d2fd1,_0x581bc3){_0x4d2fd1=_0x4d2fd1-0x171;let _0x18e2aa=_0x2d05e0[_0x4d2fd1];return _0x18e2aa;},a32_0x4d2f(_0x26c77c,_0x3065e7);}function a32_0x2d05(){const _0x3a9abf=['online','red','mkdirSync','env','147957WginsF','undefined','配置值无效或过长','unlinkSync','984663IGSegP','list','46321BBqTiu','input','7dBbYwB','774QuIWFA','utf8','16UBhOOt','1868808Tlgnqz','5015vdbTRj','parse','环境配置值只能是\x20\x22online\x22\x20或\x20\x22daily\x22','renameSync','.tmp','dirname','string','includes','set','840kusQwS','config','length','daily','get','环境配置已设置为:\x20','30uainWf','未提供配置值','appcode','保存配置失败','1598820QONvTV','flags','--help','46736rZpVvO','log','stringify','app'];a32_0x2d05=function(){return _0x3a9abf;};return a32_0x2d05();}import{jsx as a32_0x3f6f95,jsxs as a32_0x3323af}from'react/jsx-runtime';import{existsSync,readFileSync,writeFileSync}from'node:fs';import a32_0x20a9d8 from'node:fs';import a32_0x5a0c71 from'node:path';import{ConfigHelp}from'./config-help.js';import{Box,Text}from'ink';import{readConfig,isInProject,projectConfigPath,globalConfigPath}from'../utils/config.js';import{logger}from'../utils/logger.js';export function Config(_0x196115){const _0x1e3a4a=a32_0x4d2f,{cli:_0x1536b7}=_0x196115,_0x13ddb4=_0x1536b7[_0x1e3a4a(0x199)][0x1],_0x105955=_0x1536b7['input'][0x2],_0x24edda=[_0x1e3a4a(0x17c),'get']['includes'](_0x13ddb4||''),_0xb17a99=_0x1536b7[_0x1e3a4a(0x199)][_0x1e3a4a(0x17f)]>=0x3;if(_0x105955===_0x1e3a4a(0x189)||_0x1536b7[_0x1e3a4a(0x188)]['help'])return a32_0x3f6f95(ConfigHelp,{});const _0x28e66a=readConfig();if(_0x13ddb4==='set'){if(_0x105955){const _0x248276=_0x1536b7[_0x1e3a4a(0x199)][0x3];if(typeof _0x248276!==_0x1e3a4a(0x193)){if(_0x105955==='env'&&![_0x1e3a4a(0x18e),_0x1e3a4a(0x180)][_0x1e3a4a(0x17b)](_0x248276))return a32_0x3f6f95(Box,{'children':a32_0x3f6f95(Text,{'color':_0x1e3a4a(0x18f),'children':_0x1e3a4a(0x176)})});const _0x5e8294=isInProject(),_0x32680e=_0x5e8294?projectConfigPath:globalConfigPath;let _0x283a09={};try{if(existsSync(_0x32680e)){const _0x57d640=readFileSync(_0x32680e,{'encoding':_0x1e3a4a(0x171)});_0x57d640&&(_0x283a09=JSON[_0x1e3a4a(0x175)](_0x57d640));}}catch(_0x193e2f){}if(typeof _0x248276!==_0x1e3a4a(0x17a)||_0x248276[_0x1e3a4a(0x17f)]>0x1f4)return a32_0x3f6f95(Box,{'children':a32_0x3f6f95(Text,{'color':'red','children':_0x1e3a4a(0x194)})});let _0xd91fc1=_0x105955;_0x105955===_0x1e3a4a(0x18d)&&(_0xd91fc1=_0x1e3a4a(0x185),delete _0x283a09[_0x1e3a4a(0x18d)]);_0x105955===_0x1e3a4a(0x185)&&delete _0x283a09[_0x1e3a4a(0x18d)];_0x283a09[_0xd91fc1]=_0x248276;try{const _0x3f6cc1=a32_0x5a0c71[_0x1e3a4a(0x179)](_0x32680e);!existsSync(_0x3f6cc1)&&a32_0x20a9d8[_0x1e3a4a(0x190)](_0x3f6cc1,{'recursive':!![]});const _0x37a386=_0x32680e+_0x1e3a4a(0x178);writeFileSync(_0x37a386,JSON[_0x1e3a4a(0x18c)](_0x283a09,null,0x2),{'encoding':_0x1e3a4a(0x171),'mode':0x180}),a32_0x20a9d8[_0x1e3a4a(0x177)](_0x37a386,_0x32680e);if(_0x105955===_0x1e3a4a(0x191)){const _0x2b3273=_0x5e8294?'项目':'全局';console[_0x1e3a4a(0x18b)]('✓\x20'+_0x2b3273+_0x1e3a4a(0x182)+_0x248276);}}catch(_0x3044b4){const _0x35f099=_0x32680e+_0x1e3a4a(0x178);try{existsSync(_0x35f099)&&a32_0x20a9d8[_0x1e3a4a(0x195)](_0x35f099);}catch(_0x57bf9c){}return logger['error'](_0x1e3a4a(0x17e),_0x1e3a4a(0x186),{'error':_0x3044b4 instanceof Error?_0x3044b4['message']:String(_0x3044b4),'configKey':_0x105955,'configValue':_0x248276,'targetConfigPath':_0x32680e}),a32_0x3f6f95(Box,{'children':a32_0x3323af(Text,{'color':_0x1e3a4a(0x18f),'children':['保存配置失败:\x20',_0x3044b4 instanceof Error?_0x3044b4['message']:String(_0x3044b4)]})});}return null;}return a32_0x3f6f95(Box,{'children':a32_0x3f6f95(Text,{'color':_0x1e3a4a(0x18f),'children':_0x1e3a4a(0x184)})});}}if(_0x13ddb4===_0x1e3a4a(0x181)){if(_0x105955){let _0x17e718=_0x105955;return _0x105955===_0x1e3a4a(0x18d)&&(_0x17e718=_0x1e3a4a(0x185)),console[_0x1e3a4a(0x18b)](_0x28e66a[_0x17e718]||_0x1e3a4a(0x193)),null;}return null;}if(_0x13ddb4===_0x1e3a4a(0x197))return console[_0x1e3a4a(0x18b)](JSON[_0x1e3a4a(0x18c)](_0x28e66a,null,0x2)),null;if(!_0x24edda||!_0xb17a99)return a32_0x3f6f95(ConfigHelp,{});return null;}
1
+ (function(_0x5bcfb9,_0x310225){const _0x217f80=a29_0x1b26,_0x4a7b7c=_0x5bcfb9();while(!![]){try{const _0x30afcb=-parseInt(_0x217f80(0x1e6))/0x1+parseInt(_0x217f80(0x1df))/0x2*(parseInt(_0x217f80(0x1e0))/0x3)+-parseInt(_0x217f80(0x1f2))/0x4+-parseInt(_0x217f80(0x1dd))/0x5+parseInt(_0x217f80(0x1e1))/0x6*(-parseInt(_0x217f80(0x1d9))/0x7)+parseInt(_0x217f80(0x1ef))/0x8*(parseInt(_0x217f80(0x1d5))/0x9)+-parseInt(_0x217f80(0x1da))/0xa*(-parseInt(_0x217f80(0x1d6))/0xb);if(_0x30afcb===_0x310225)break;else _0x4a7b7c['push'](_0x4a7b7c['shift']());}catch(_0x1baf48){_0x4a7b7c['push'](_0x4a7b7c['shift']());}}}(a29_0xeaeb,0x81daf));import{jsx as a29_0x2a4199,jsxs as a29_0x375ed4}from'react/jsx-runtime';import{existsSync,readFileSync,writeFileSync}from'node:fs';function a29_0x1b26(_0x511bb2,_0x407260){const _0xeaeb5a=a29_0xeaeb();return a29_0x1b26=function(_0x1b2690,_0x10a73b){_0x1b2690=_0x1b2690-0x1c8;let _0x161a59=_0xeaeb5a[_0x1b2690];return _0x161a59;},a29_0x1b26(_0x511bb2,_0x407260);}function a29_0xeaeb(){const _0x513311=['config','保存配置失败','stringify','message','undefined','list','81XXyMes','7042486atSxcE','includes','help','7gsDhgL','20GkgjyZ','set','parse','2993920AJbvjW','error','171486WFXpVd','6qThkvU','68412nWWKxC','mkdirSync','环境配置值只能是\x20\x22online\x22\x20或\x20\x22daily\x22','get','配置值无效或过长','195730zVpkRR','env','input','未提供配置值','online','log','.tmp','appcode','utf8','291752BNQcFm','环境配置已设置为:\x20','daily','1769424mavbXs','string','保存配置失败:\x20','--help','flags','length','app','renameSync','red'];a29_0xeaeb=function(){return _0x513311;};return a29_0xeaeb();}import a29_0x42f679 from'node:fs';import a29_0x16da99 from'node:path';import{ConfigHelp}from'./config-help.js';import{Box,Text}from'ink';import{readConfig,isInProject,projectConfigPath,globalConfigPath}from'../utils/config.js';import{logger}from'../utils/logger.js';export function Config(_0x1049ea){const _0x5613c5=a29_0x1b26,{cli:_0x5aacd5}=_0x1049ea,_0x2727ef=_0x5aacd5[_0x5613c5(0x1e8)][0x1],_0xc6b0e4=_0x5aacd5[_0x5613c5(0x1e8)][0x2],_0x4f016d=[_0x5613c5(0x1db),_0x5613c5(0x1e4)]['includes'](_0x2727ef||''),_0x45b1e6=_0x5aacd5[_0x5613c5(0x1e8)][_0x5613c5(0x1cb)]>=0x3;if(_0xc6b0e4===_0x5613c5(0x1c9)||_0x5aacd5[_0x5613c5(0x1ca)][_0x5613c5(0x1d8)])return a29_0x2a4199(ConfigHelp,{});const _0x37fd88=readConfig();if(_0x2727ef==='set'){if(_0xc6b0e4){const _0x30e83e=_0x5aacd5[_0x5613c5(0x1e8)][0x3];if(typeof _0x30e83e!==_0x5613c5(0x1d3)){if(_0xc6b0e4===_0x5613c5(0x1e7)&&![_0x5613c5(0x1ea),_0x5613c5(0x1f1)][_0x5613c5(0x1d7)](_0x30e83e))return a29_0x2a4199(Box,{'children':a29_0x2a4199(Text,{'color':_0x5613c5(0x1ce),'children':_0x5613c5(0x1e3)})});const _0x38093e=isInProject(),_0x3d0c48=_0x38093e?projectConfigPath:globalConfigPath;let _0x57c34b={};try{if(existsSync(_0x3d0c48)){const _0x1f8098=readFileSync(_0x3d0c48,{'encoding':_0x5613c5(0x1ee)});_0x1f8098&&(_0x57c34b=JSON[_0x5613c5(0x1dc)](_0x1f8098));}}catch(_0x5a83ef){}if(typeof _0x30e83e!==_0x5613c5(0x1f3)||_0x30e83e[_0x5613c5(0x1cb)]>0x1f4)return a29_0x2a4199(Box,{'children':a29_0x2a4199(Text,{'color':_0x5613c5(0x1ce),'children':_0x5613c5(0x1e5)})});let _0x58dc4c=_0xc6b0e4;_0xc6b0e4===_0x5613c5(0x1cc)&&(_0x58dc4c='appcode',delete _0x57c34b['app']);_0xc6b0e4===_0x5613c5(0x1ed)&&delete _0x57c34b['app'];_0x57c34b[_0x58dc4c]=_0x30e83e;try{const _0x1c43ed=a29_0x16da99['dirname'](_0x3d0c48);!existsSync(_0x1c43ed)&&a29_0x42f679[_0x5613c5(0x1e2)](_0x1c43ed,{'recursive':!![]});const _0x4d1b2e=_0x3d0c48+_0x5613c5(0x1ec);writeFileSync(_0x4d1b2e,JSON[_0x5613c5(0x1d1)](_0x57c34b,null,0x2),{'encoding':_0x5613c5(0x1ee),'mode':0x180}),a29_0x42f679[_0x5613c5(0x1cd)](_0x4d1b2e,_0x3d0c48);if(_0xc6b0e4===_0x5613c5(0x1e7)){const _0x32faf9=_0x38093e?'项目':'全局';console['log']('✓\x20'+_0x32faf9+_0x5613c5(0x1f0)+_0x30e83e);}}catch(_0x176395){const _0x416a6d=_0x3d0c48+_0x5613c5(0x1ec);try{existsSync(_0x416a6d)&&a29_0x42f679['unlinkSync'](_0x416a6d);}catch(_0x5201ae){}return logger[_0x5613c5(0x1de)](_0x5613c5(0x1cf),_0x5613c5(0x1d0),{'error':_0x176395 instanceof Error?_0x176395[_0x5613c5(0x1d2)]:String(_0x176395),'configKey':_0xc6b0e4,'configValue':_0x30e83e,'targetConfigPath':_0x3d0c48}),a29_0x2a4199(Box,{'children':a29_0x375ed4(Text,{'color':_0x5613c5(0x1ce),'children':[_0x5613c5(0x1c8),_0x176395 instanceof Error?_0x176395[_0x5613c5(0x1d2)]:String(_0x176395)]})});}return null;}return a29_0x2a4199(Box,{'children':a29_0x2a4199(Text,{'color':_0x5613c5(0x1ce),'children':_0x5613c5(0x1e9)})});}}if(_0x2727ef===_0x5613c5(0x1e4)){if(_0xc6b0e4){let _0x284a10=_0xc6b0e4;return _0xc6b0e4===_0x5613c5(0x1cc)&&(_0x284a10=_0x5613c5(0x1ed)),console[_0x5613c5(0x1eb)](_0x37fd88[_0x284a10]||_0x5613c5(0x1d3)),null;}return null;}if(_0x2727ef===_0x5613c5(0x1d4))return console['log'](JSON['stringify'](_0x37fd88,null,0x2)),null;if(!_0x4f016d||!_0x45b1e6)return a29_0x2a4199(ConfigHelp,{});return null;}
@@ -1 +1 @@
1
- const a33_0xb2ed1=a33_0x49c6;function a33_0x524f(){const _0x11ead9=['https://user.lovrabet.com','12208260aIOTdG','159339TUvfSW','https://user-daily.lovrabet.com','66355YzctAs','online','1575RpRmJB','7155841XlvLuC','1928TYMLPT','https://api.lovrabet.com','78DWwMbh','40LmTXIH','7QmqmeJ','https://daily-api.lovrabet.com','26990QHwMub','27811kmRpcR','39004GOOjco'];a33_0x524f=function(){return _0x11ead9;};return a33_0x524f();}function a33_0x49c6(_0x2c9b24,_0xb046b){const _0x524f91=a33_0x524f();return a33_0x49c6=function(_0x49c6f7,_0x3a64e4){_0x49c6f7=_0x49c6f7-0x105;let _0x1f6dd5=_0x524f91[_0x49c6f7];return _0x1f6dd5;},a33_0x49c6(_0x2c9b24,_0xb046b);}(function(_0x1df587,_0x154461){const _0x4a0ee0=a33_0x49c6,_0x47198e=_0x1df587();while(!![]){try{const _0x297328=parseInt(_0x4a0ee0(0x112))/0x1*(parseInt(_0x4a0ee0(0x105))/0x2)+parseInt(_0x4a0ee0(0x108))/0x3*(-parseInt(_0x4a0ee0(0x111))/0x4)+parseInt(_0x4a0ee0(0x10a))/0x5*(-parseInt(_0x4a0ee0(0x110))/0x6)+parseInt(_0x4a0ee0(0x115))/0x7*(parseInt(_0x4a0ee0(0x10e))/0x8)+-parseInt(_0x4a0ee0(0x10c))/0x9*(-parseInt(_0x4a0ee0(0x114))/0xa)+parseInt(_0x4a0ee0(0x10d))/0xb+-parseInt(_0x4a0ee0(0x107))/0xc;if(_0x297328===_0x154461)break;else _0x47198e['push'](_0x47198e['shift']());}catch(_0x4ea083){_0x47198e['push'](_0x47198e['shift']());}}}(a33_0x524f,0x790ef));import{getEnv}from'./env.js';export const getUserDomain=()=>getEnv()===a33_0xb2ed1(0x10b)?a33_0xb2ed1(0x106):a33_0xb2ed1(0x109);export const getApiDomain=()=>getEnv()===a33_0xb2ed1(0x10b)?a33_0xb2ed1(0x10f):a33_0xb2ed1(0x113);
1
+ const a30_0xd069e0=a30_0x4ba4;function a30_0x291f(){const _0x40321f=['1456364Rvtcwm','59829708sKjCBd','369HzKApU','47200KWNadm','11rZRJkb','4146pjsLlk','https://user-daily.lovrabet.com','44093CeNuBC','1498haCgIV','online','https://api.lovrabet.com','7745tNkuyX','368TUQqcH','3339312tvuwym','2985PfBsyg'];a30_0x291f=function(){return _0x40321f;};return a30_0x291f();}(function(_0x477ae5,_0x4815a0){const _0x4a6bf1=a30_0x4ba4,_0x544da1=_0x477ae5();while(!![]){try{const _0x502384=-parseInt(_0x4a6bf1(0xac))/0x1+parseInt(_0x4a6bf1(0xa5))/0x2*(-parseInt(_0x4a6bf1(0xab))/0x3)+-parseInt(_0x4a6bf1(0xaa))/0x4+parseInt(_0x4a6bf1(0xa8))/0x5*(-parseInt(_0x4a6bf1(0xa2))/0x6)+-parseInt(_0x4a6bf1(0xa4))/0x7*(-parseInt(_0x4a6bf1(0xa9))/0x8)+parseInt(_0x4a6bf1(0xae))/0x9*(-parseInt(_0x4a6bf1(0xaf))/0xa)+parseInt(_0x4a6bf1(0xa1))/0xb*(parseInt(_0x4a6bf1(0xad))/0xc);if(_0x502384===_0x4815a0)break;else _0x544da1['push'](_0x544da1['shift']());}catch(_0x30cbc5){_0x544da1['push'](_0x544da1['shift']());}}}(a30_0x291f,0xee185));import{getEnv}from'./env.js';function a30_0x4ba4(_0x20136e,_0x202c91){const _0x291f88=a30_0x291f();return a30_0x4ba4=function(_0x4ba4ec,_0x3f6c53){_0x4ba4ec=_0x4ba4ec-0xa1;let _0x1feed6=_0x291f88[_0x4ba4ec];return _0x1feed6;},a30_0x4ba4(_0x20136e,_0x202c91);}export const getUserDomain=()=>getEnv()===a30_0xd069e0(0xa6)?'https://user.lovrabet.com':a30_0xd069e0(0xa3);export const getApiDomain=()=>getEnv()===a30_0xd069e0(0xa6)?a30_0xd069e0(0xa7):'https://daily-api.lovrabet.com';
@@ -1 +1 @@
1
- function a34_0x5476(_0x2b9fa7,_0x36717b){const _0x2e164f=a34_0x2e16();return a34_0x5476=function(_0x547638,_0x361bf6){_0x547638=_0x547638-0x199;let _0xb4028b=_0x2e164f[_0x547638];return _0xb4028b;},a34_0x5476(_0x2b9fa7,_0x36717b);}const a34_0x370ece=a34_0x5476;(function(_0xb70fbd,_0x4a55b3){const _0x1e7aea=a34_0x5476,_0x24fa43=_0xb70fbd();while(!![]){try{const _0x181dd8=parseInt(_0x1e7aea(0x199))/0x1*(parseInt(_0x1e7aea(0x1a4))/0x2)+parseInt(_0x1e7aea(0x19e))/0x3*(parseInt(_0x1e7aea(0x19a))/0x4)+parseInt(_0x1e7aea(0x1a2))/0x5+parseInt(_0x1e7aea(0x1a7))/0x6*(parseInt(_0x1e7aea(0x19b))/0x7)+parseInt(_0x1e7aea(0x1a5))/0x8+parseInt(_0x1e7aea(0x1a3))/0x9*(-parseInt(_0x1e7aea(0x19c))/0xa)+parseInt(_0x1e7aea(0x19d))/0xb*(parseInt(_0x1e7aea(0x1a1))/0xc);if(_0x181dd8===_0x4a55b3)break;else _0x24fa43['push'](_0x24fa43['shift']());}catch(_0x4595d6){_0x24fa43['push'](_0x24fa43['shift']());}}}(a34_0x2e16,0x398fd));let env=process[a34_0x370ece(0x19f)][a34_0x370ece(0x1a0)]||a34_0x370ece(0x1a6);function a34_0x2e16(){const _0x1a4eb2=['377874txgVIM','env','LOVRABET_ENV','456fMGvJI','379830NALBOu','6687JxYiVl','618wEpxjD','1737976pQcuCt','online','303396VzJGas','15LUSdCN','4DwMWds','7dBgbWb','3310eVqsTc','2123ZuCodh'];a34_0x2e16=function(){return _0x1a4eb2;};return a34_0x2e16();}export function getEnv(){return env;}export function initEnv(_0x4d5c1b){env=_0x4d5c1b;}
1
+ const a31_0x334b3a=a31_0x5d9d;function a31_0x5d9d(_0x506ecb,_0x374d7d){const _0x266720=a31_0x2667();return a31_0x5d9d=function(_0x5d9d2e,_0x3e2a41){_0x5d9d2e=_0x5d9d2e-0x128;let _0x10407c=_0x266720[_0x5d9d2e];return _0x10407c;},a31_0x5d9d(_0x506ecb,_0x374d7d);}function a31_0x2667(){const _0x4c3d6c=['313122cuHRga','online','1786347rmrvrA','888BWYiGT','28114LaVNUh','LOVRABET_ENV','24FLeocR','11810aUuTUy','1012398jQoRku','425901eogdsl','1095716vOIrSK','env'];a31_0x2667=function(){return _0x4c3d6c;};return a31_0x2667();}(function(_0xd6fb21,_0x81710){const _0x26c870=a31_0x5d9d,_0x4096e6=_0xd6fb21();while(!![]){try{const _0x1e0631=parseInt(_0x26c870(0x133))/0x1+-parseInt(_0x26c870(0x12b))/0x2+parseInt(_0x26c870(0x12f))/0x3+-parseInt(_0x26c870(0x131))/0x4+-parseInt(_0x26c870(0x12e))/0x5*(-parseInt(_0x26c870(0x12a))/0x6)+parseInt(_0x26c870(0x130))/0x7+parseInt(_0x26c870(0x12d))/0x8*(-parseInt(_0x26c870(0x129))/0x9);if(_0x1e0631===_0x81710)break;else _0x4096e6['push'](_0x4096e6['shift']());}catch(_0x579e12){_0x4096e6['push'](_0x4096e6['shift']());}}}(a31_0x2667,0x2b5a4));let env=process[a31_0x334b3a(0x132)][a31_0x334b3a(0x12c)]||a31_0x334b3a(0x128);export function getEnv(){return env;}export function initEnv(_0x4e79ad){env=_0x4e79ad;}
@@ -1 +1 @@
1
- (function(_0x49bc02,_0xa0831a){const _0x5d798=a35_0x2b2a,_0x173300=_0x49bc02();while(!![]){try{const _0x3f1bfd=-parseInt(_0x5d798(0xb9))/0x1+-parseInt(_0x5d798(0xd7))/0x2+parseInt(_0x5d798(0xac))/0x3*(parseInt(_0x5d798(0xa9))/0x4)+-parseInt(_0x5d798(0xc1))/0x5*(parseInt(_0x5d798(0xb3))/0x6)+-parseInt(_0x5d798(0xbb))/0x7*(-parseInt(_0x5d798(0xe0))/0x8)+parseInt(_0x5d798(0xca))/0x9+-parseInt(_0x5d798(0xc2))/0xa*(-parseInt(_0x5d798(0xc0))/0xb);if(_0x3f1bfd===_0xa0831a)break;else _0x173300['push'](_0x173300['shift']());}catch(_0x2a9778){_0x173300['push'](_0x173300['shift']());}}}(a35_0x396d,0x2d1b5));function a35_0x396d(){const _0x10c3d2=['project-name','trim','319hInTJz','135INPYtE','7930VfByTR','\x20\x20推荐选择\x20Yes,可自动配置\x20API\x20接口','step','Yes','length','\x20\x20使用\x20←→\x20选择,回车确认','creating','\x20\x20推荐选择\x20Yes,登录后可自动拉取并配置\x20API\x20接口','1439082hkbvRy','应用AppCode只能包含字母、数字、连字符和下划线,且必须以字母或数字开头','*\x20是否要自动拉取\x20API\x20配置?','api-pull','应用AppCode不合法','登录失败','red','rightArrow','应用AppCode','项目名','app-code','test','green','401202sLMSjC','column','项目名不合法','includes','backspace','未设置','login-prompt','*\x20创建新项目','*\x20应用AppCode\x20','8WQrjKE','应用AppCode长度不能超过\x20100\x20个字符','online','slice','return','my-app','login-process','已登录','gray','8jACiMo','*\x20项目名:\x20','login-check','258057TxQEJv','string','绑定应用AppCode可自动配置\x20API,如:\x20app-c4c89304\x20(直接回车跳过)','\x20检查中...','登录状态','delete','login','14214iGqNNn','\x20←\x20','confirm-api-pull','env','\x20登录中...','*\x20是否要先登录以便拉取\x20API\x20配置?','98729jsWMZH','项目名只能以字母或数字开头,且只包含字母、数字、-\x20和\x20_','1351819bQlfIT','map','yellow'];a35_0x396d=function(){return _0x10c3d2;};return a35_0x396d();}import{jsx as a35_0x53e220,jsxs as a35_0x5a6a36,Fragment as a35_0x5c2884}from'react/jsx-runtime';function a35_0x2b2a(_0x2608ab,_0x4cf500){const _0x396d92=a35_0x396d();return a35_0x2b2a=function(_0x2b2a14,_0xfccf86){_0x2b2a14=_0x2b2a14-0xa9;let _0x3d548a=_0x396d92[_0x2b2a14];return _0x3d548a;},a35_0x2b2a(_0x2608ab,_0x4cf500);}import{useState}from'react';import{Text,Box,useInput}from'ink';import{getIsSessionValid}from'../auth/is-session-valid.js';import{authServer}from'../auth/auth-server.js';import{readConfig}from'../utils/config.js';export function EnhancedGuidedCreate(_0x21dcdc){const _0x428abc=a35_0x2b2a,{onCreate:_0x271600,env:_0x117b18}=_0x21dcdc,[_0x12b1f2,_0x50c9dc]=useState(_0x428abc(0xbe)),[_0x51cc5a,_0x1c0c5f]=useState(''),[_0x1b60b9,_0x4c8007]=useState(''),[_0x4da4e6,_0x20f44b]=useState(''),[_0x270453,_0x5a2e3a]=useState(''),[_0x1e1969,_0x27bbc4]=useState([]),[_0x2d2d50,_0x456632]=useState(null),[_0x3d86ac,_0x53b792]=useState(![]),[_0x90440d,_0x5ecedc]=useState(![]),[_0x2c8170,_0x49d151]=useState(![]),[_0x4fae4c,_0x11591a]=useState(0x0),[_0x52707e,_0x20a0ba]=useState(0x0),_0x3b9bbb=_0x428abc(0xe5),_0x1a2a3d=readConfig(),_0x3e02b5=typeof _0x1a2a3d[_0x428abc(0xb6)]===_0x428abc(0xad)?_0x1a2a3d['env']:undefined;function _0x11b3fc(_0x48e0b2){const _0x23938c=_0x428abc;if(_0x48e0b2['length']>0x32)return{'valid':![],'message':'项目名长度不能超过\x2050\x20个字符'};const _0x2e0788=/^[A-Za-z0-9][A-Za-z0-9_-]*$/;if(_0x48e0b2?.[_0x23938c(0xbf)]()&&!_0x2e0788['test'](_0x48e0b2))return{'valid':![],'message':_0x23938c(0xba)};return{'valid':!![]};}function _0x3463be(_0x6d6a19){const _0x3ea775=_0x428abc;if(!_0x6d6a19[_0x3ea775(0xbf)]())return{'valid':!![]};if(_0x6d6a19['length']>0x64)return{'valid':![],'message':_0x3ea775(0xe1)};const _0x55db93=/^[a-zA-Z0-9][a-zA-Z0-9_-]*$/;if(!_0x55db93[_0x3ea775(0xd5)](_0x6d6a19))return{'valid':![],'message':_0x3ea775(0xcb)};return{'valid':!![]};}async function _0x4ddfb4(){_0x53b792(!![]);try{const _0x7cde55=await getIsSessionValid();return _0x456632(_0x7cde55),_0x7cde55;}catch(_0x51dfe0){return _0x456632(![]),![];}finally{_0x53b792(![]);}}async function _0x4a7497(){_0x5ecedc(!![]);try{const _0x58bb57=await authServer({'silent':!![]});return _0x456632(_0x58bb57),_0x58bb57;}catch(_0x3eecf8){return _0x456632(![]),![];}finally{_0x5ecedc(![]);}}return useInput(async(_0x303ebe,_0x181bd0)=>{const _0x3d708f=_0x428abc;if(_0x181bd0['leftArrow']||_0x181bd0[_0x3d708f(0xd1)]){if(_0x12b1f2===_0x3d708f(0xb5)){_0x11591a(_0x483491=>_0x483491===0x0?0x1:0x0);return;}if(_0x12b1f2==='login-prompt'){_0x20a0ba(_0x215173=>_0x215173===0x0?0x1:0x0);return;}}if(_0x181bd0[_0x3d708f(0xe4)]){if(_0x12b1f2===_0x3d708f(0xbe)){const _0x30d9de=_0x4da4e6[_0x3d708f(0xbf)]()||_0x3b9bbb;if(_0x270453)return;_0x1c0c5f(_0x30d9de),_0x27bbc4([{'step':_0x3d708f(0xbe),'label':_0x3d708f(0xd3),'value':_0x30d9de}]),_0x20f44b(''),_0x5a2e3a(''),_0x50c9dc(_0x3d708f(0xd4));return;}if(_0x12b1f2==='app-code'){if(_0x270453)return;const _0x3a0283=_0x4da4e6[_0x3d708f(0xbf)]();_0x4c8007(_0x3a0283),_0x27bbc4(_0x12934e=>[..._0x12934e,{'step':_0x3d708f(0xd4),'label':_0x3d708f(0xd2),'value':_0x3a0283||_0x3d708f(0xdc)}]),_0x20f44b(''),_0x5a2e3a('');if(_0x3a0283){_0x50c9dc(_0x3d708f(0xab));const _0x382bba=await _0x4ddfb4();_0x382bba?_0x50c9dc(_0x3d708f(0xb5)):_0x50c9dc(_0x3d708f(0xdd));}else{const _0x3ac2a3=_0x117b18||_0x3e02b5||_0x3d708f(0xe2);_0x271600({'projectName':_0x51cc5a,'appCode':undefined,'pullApi':![],'env':_0x3ac2a3}),_0x50c9dc('creating');}return;}if(_0x12b1f2===_0x3d708f(0xb5)){const _0x45fbca=_0x4fae4c===0x0;_0x49d151(_0x45fbca),_0x27bbc4(_0x52410d=>[..._0x52410d,{'step':_0x3d708f(0xcd),'label':'拉取API配置','value':_0x45fbca?'是':'否'}]);const _0x31e462=_0x117b18||_0x3e02b5||_0x3d708f(0xe2);_0x271600({'projectName':_0x51cc5a,'appCode':_0x1b60b9,'pullApi':_0x45fbca,'env':_0x31e462}),_0x50c9dc(_0x3d708f(0xc8));return;}if(_0x12b1f2==='login-prompt'){const _0x9210e4=_0x52707e===0x0;if(_0x9210e4){_0x50c9dc(_0x3d708f(0xe6));const _0x22ff84=await _0x4a7497();if(_0x22ff84)_0x27bbc4(_0x21136c=>[..._0x21136c,{'step':_0x3d708f(0xb2),'label':_0x3d708f(0xb0),'value':_0x3d708f(0xe7)}]),_0x50c9dc(_0x3d708f(0xb5));else{_0x27bbc4(_0x2fe452=>[..._0x2fe452,{'step':_0x3d708f(0xb2),'label':_0x3d708f(0xb0),'value':_0x3d708f(0xcf)}]);const _0x4d4102=_0x117b18||_0x3e02b5||'online';_0x271600({'projectName':_0x51cc5a,'appCode':_0x1b60b9,'pullApi':![],'env':_0x4d4102}),_0x50c9dc(_0x3d708f(0xc8));}}else{_0x27bbc4(_0x3320b5=>[..._0x3320b5,{'step':_0x3d708f(0xb2),'label':_0x3d708f(0xb0),'value':'跳过登录'}]);const _0x1a19e5=_0x117b18||_0x3e02b5||_0x3d708f(0xe2);_0x271600({'projectName':_0x51cc5a,'appCode':_0x1b60b9,'pullApi':![],'env':_0x1a19e5}),_0x50c9dc(_0x3d708f(0xc8));}return;}}if(_0x181bd0[_0x3d708f(0xdb)]||_0x181bd0[_0x3d708f(0xb1)]){_0x20f44b(_0x3da15e=>{const _0x3c5be9=_0x3d708f,_0xe274f5=_0x3da15e[_0x3c5be9(0xe3)](0x0,-0x1);if(_0x12b1f2==='project-name'){const {valid:_0x34c4be,message:_0x4f0563}=_0x11b3fc(_0xe274f5);_0x5a2e3a(_0x34c4be?'':_0x4f0563||_0x3c5be9(0xd9));}else{if(_0x12b1f2===_0x3c5be9(0xd4)){const {valid:_0x1795e7,message:_0x163f20}=_0x3463be(_0xe274f5);_0x5a2e3a(_0x1795e7?'':_0x163f20||_0x3c5be9(0xce));}}return _0xe274f5;});return;}if([_0x3d708f(0xc8),_0x3d708f(0xab),_0x3d708f(0xe6)][_0x3d708f(0xda)](_0x12b1f2))return;if(_0x12b1f2===_0x3d708f(0xb5)||_0x12b1f2===_0x3d708f(0xdd))return;_0x20f44b(_0xf7581b=>{const _0xfdc7c7=_0xf7581b+_0x303ebe;if(_0x12b1f2==='project-name'){const {valid:_0x3da374,message:_0x4d74e2}=_0x11b3fc(_0xfdc7c7);_0x5a2e3a(_0x3da374?'':_0x4d74e2||'项目名不合法');}else{if(_0x12b1f2==='app-code'){const {valid:_0x708d44,message:_0x15749c}=_0x3463be(_0xfdc7c7);_0x5a2e3a(_0x708d44?'':_0x15749c||'应用AppCode不合法');}}return _0xfdc7c7;});}),a35_0x5a6a36(Box,{'flexDirection':_0x428abc(0xd8),'marginTop':0x1,'children':[_0x1e1969[_0x428abc(0xc6)]===0x0&&a35_0x53e220(Box,{'children':a35_0x53e220(Text,{'color':'cyan','children':_0x428abc(0xde)})}),_0x1e1969[_0x428abc(0xbc)](_0x4b17a1=>a35_0x5a6a36(Box,{'children':[a35_0x5a6a36(Text,{'color':_0x428abc(0xd6),'children':['√\x20',_0x4b17a1['label'],':\x20']}),a35_0x53e220(Text,{'color':'cyan','children':_0x4b17a1['value']})]},_0x4b17a1[_0x428abc(0xc4)])),_0x12b1f2==='project-name'&&a35_0x5a6a36(a35_0x5c2884,{'children':[a35_0x5a6a36(Box,{'children':[a35_0x53e220(Text,{'children':_0x428abc(0xaa)}),_0x4da4e6?a35_0x53e220(Text,{'color':_0x428abc(0xd6),'children':_0x4da4e6}):a35_0x53e220(Text,{'color':'gray','children':_0x3b9bbb}),_0x270453&&a35_0x5a6a36(Text,{'color':'red','children':[_0x428abc(0xb4),_0x270453]})]}),!_0x270453&&!_0x4da4e6&&a35_0x53e220(Box,{'children':a35_0x53e220(Text,{'color':'gray','children':'\x20直接回车确认,或输入自定义名称'})})]}),_0x12b1f2===_0x428abc(0xd4)&&a35_0x5a6a36(a35_0x5c2884,{'children':[a35_0x5a6a36(Box,{'children':[a35_0x53e220(Text,{'children':_0x428abc(0xdf)}),a35_0x53e220(Text,{'color':_0x428abc(0xe8),'children':'[可选]:\x20'}),a35_0x53e220(Text,{'color':_0x428abc(0xd6),'children':_0x4da4e6}),_0x270453&&a35_0x5a6a36(Text,{'color':_0x428abc(0xd0),'children':[_0x428abc(0xb4),_0x270453]})]}),!_0x270453&&a35_0x53e220(Box,{'children':a35_0x5a6a36(Text,{'color':'gray','children':['\x20',_0x428abc(0xae)]})})]}),_0x12b1f2===_0x428abc(0xab)&&a35_0x5a6a36(Box,{'children':[a35_0x53e220(Text,{'children':'*\x20正在检查登录状态...'}),_0x3d86ac&&a35_0x53e220(Text,{'color':'gray','children':_0x428abc(0xaf)})]}),_0x12b1f2===_0x428abc(0xb5)&&a35_0x5a6a36(a35_0x5c2884,{'children':[a35_0x53e220(Box,{'children':a35_0x53e220(Text,{'color':_0x428abc(0xd6),'children':'√\x20检测到有效登录状态'})}),a35_0x53e220(Box,{'marginTop':0x1,'children':a35_0x53e220(Text,{'children':_0x428abc(0xcc)})}),a35_0x5a6a36(Box,{'marginLeft':0x2,'children':[a35_0x5a6a36(Text,{'color':_0x4fae4c===0x0?_0x428abc(0xd6):_0x428abc(0xe8),'children':[_0x4fae4c===0x0?'▶\x20':'\x20\x20',_0x428abc(0xc5)]}),a35_0x53e220(Text,{'children':'\x20'}),a35_0x5a6a36(Text,{'color':_0x4fae4c===0x1?_0x428abc(0xd6):'gray','children':[_0x4fae4c===0x1?'▶\x20':'\x20\x20','No']})]}),a35_0x53e220(Box,{'children':a35_0x53e220(Text,{'color':'gray','children':_0x428abc(0xc7)})}),a35_0x53e220(Box,{'children':a35_0x53e220(Text,{'color':'yellow','children':_0x428abc(0xc3)})})]}),_0x12b1f2===_0x428abc(0xdd)&&a35_0x5a6a36(a35_0x5c2884,{'children':[a35_0x53e220(Box,{'children':a35_0x53e220(Text,{'color':_0x428abc(0xbd),'children':'!\x20未检测到有效登录'})}),a35_0x53e220(Box,{'marginTop':0x1,'children':a35_0x53e220(Text,{'children':_0x428abc(0xb8)})}),a35_0x5a6a36(Box,{'marginLeft':0x2,'children':[a35_0x5a6a36(Text,{'color':_0x52707e===0x0?_0x428abc(0xd6):_0x428abc(0xe8),'children':[_0x52707e===0x0?'▶\x20':'\x20\x20',_0x428abc(0xc5)]}),a35_0x53e220(Text,{'children':'\x20'}),a35_0x5a6a36(Text,{'color':_0x52707e===0x1?_0x428abc(0xd6):_0x428abc(0xe8),'children':[_0x52707e===0x1?'▶\x20':'\x20\x20','No']})]}),a35_0x53e220(Box,{'children':a35_0x53e220(Text,{'color':_0x428abc(0xe8),'children':_0x428abc(0xc7)})}),a35_0x53e220(Box,{'children':a35_0x53e220(Text,{'color':_0x428abc(0xbd),'children':_0x428abc(0xc9)})})]}),_0x12b1f2===_0x428abc(0xe6)&&a35_0x5a6a36(Box,{'children':[a35_0x53e220(Text,{'children':'*\x20正在登录,请前往浏览器完成登录...'}),_0x90440d&&a35_0x53e220(Text,{'color':'gray','children':_0x428abc(0xb7)})]})]});}
1
+ (function(_0x2abeef,_0x5d2d41){const _0x37df63=a32_0x2b57,_0x291179=_0x2abeef();while(!![]){try{const _0x5c6a7e=parseInt(_0x37df63(0x1b8))/0x1*(-parseInt(_0x37df63(0x1c4))/0x2)+-parseInt(_0x37df63(0x1d2))/0x3+-parseInt(_0x37df63(0x1b1))/0x4*(-parseInt(_0x37df63(0x19a))/0x5)+parseInt(_0x37df63(0x1bb))/0x6*(-parseInt(_0x37df63(0x1ab))/0x7)+-parseInt(_0x37df63(0x199))/0x8+-parseInt(_0x37df63(0x198))/0x9+parseInt(_0x37df63(0x1b2))/0xa*(parseInt(_0x37df63(0x1a4))/0xb);if(_0x5c6a7e===_0x5d2d41)break;else _0x291179['push'](_0x291179['shift']());}catch(_0x21349b){_0x291179['push'](_0x291179['shift']());}}}(a32_0x5835,0xed5e9));import{jsx as a32_0x69b5cc,jsxs as a32_0x42aea9,Fragment as a32_0x5a05c4}from'react/jsx-runtime';function a32_0x2b57(_0x2f7183,_0x46acb3){const _0x583518=a32_0x5835();return a32_0x2b57=function(_0x2b5709,_0x55c77d){_0x2b5709=_0x2b5709-0x195;let _0x316a93=_0x583518[_0x2b5709];return _0x316a93;},a32_0x2b57(_0x2f7183,_0x46acb3);}import{useState}from'react';import{Text,Box,useInput}from'ink';import{getIsSessionValid}from'../auth/is-session-valid.js';function a32_0x5835(){const _0xe930c=['login-process','green','confirm-api-pull','绑定应用AppCode可自动配置\x20API,如:\x20app-c4c89304\x20(直接回车跳过)','\x20\x20使用\x20←→\x20选择,回车确认','includes','return','√\x20检测到有效登录状态','432447LyGAmI','应用AppCode','label','cyan','leftArrow','应用AppCode长度不能超过\x20100\x20个字符','7634610PsASTv','7576624ikftfO','7650EeOvWs','项目名','login','yellow','\x20\x20推荐选择\x20Yes,登录后可自动拉取并配置\x20API\x20接口','gray','column','登录失败','project-name','app-code','3059419yMYHlS','trim','跳过登录','\x20检查中...','creating','*\x20是否要先登录以便拉取\x20API\x20配置?','env','1876hTOhmt','api-pull','\x20直接回车确认,或输入自定义名称','login-check','slice','!\x20未检测到有效登录','208mgfNOF','160rYNWDR','[可选]:\x20','应用AppCode不合法','登录状态','\x20登录中...','backspace','821614xOzHdQ','rightArrow','\x20←\x20','17826rtUDNr','*\x20创建新项目','项目名只能以字母或数字开头,且只包含字母、数字、-\x20和\x20_','项目名不合法','my-app','*\x20正在登录,请前往浏览器完成登录...','online','login-prompt','length','2DVVvrf','red','应用AppCode只能包含字母、数字、连字符和下划线,且必须以字母或数字开头','delete','*\x20应用AppCode\x20','已登录'];a32_0x5835=function(){return _0xe930c;};return a32_0x5835();}import{authServer}from'../auth/auth-server.js';import{readConfig}from'../utils/config.js';export function EnhancedGuidedCreate(_0x524ad1){const _0x29e139=a32_0x2b57,{onCreate:_0x10cb49,env:_0xb43e40}=_0x524ad1,[_0x3944cd,_0x41aaee]=useState('project-name'),[_0x35aaa5,_0x218c14]=useState(''),[_0x2340e4,_0x3f6c44]=useState(''),[_0x4cd4db,_0x411143]=useState(''),[_0xb58d6d,_0x8c6a3b]=useState(''),[_0x5c5284,_0x4c6bd3]=useState([]),[_0x488509,_0x513797]=useState(null),[_0x1ca217,_0x1af4c1]=useState(![]),[_0x1c5c98,_0x4fb16e]=useState(![]),[_0x6791ba,_0x5bee78]=useState(![]),[_0x2b84c8,_0x5f195d]=useState(0x0),[_0x31ace5,_0x354492]=useState(0x0),_0xabf112=_0x29e139(0x1bf),_0x4c4e65=readConfig(),_0x29d2db=typeof _0x4c4e65[_0x29e139(0x1aa)]==='string'?_0x4c4e65[_0x29e139(0x1aa)]:undefined;function _0x1ac175(_0x30da97){const _0x183f0c=_0x29e139;if(_0x30da97[_0x183f0c(0x1c3)]>0x32)return{'valid':![],'message':'项目名长度不能超过\x2050\x20个字符'};const _0x4c848d=/^[A-Za-z0-9][A-Za-z0-9_-]*$/;if(_0x30da97?.[_0x183f0c(0x1a5)]()&&!_0x4c848d['test'](_0x30da97))return{'valid':![],'message':_0x183f0c(0x1bd)};return{'valid':!![]};}function _0x20f717(_0x1482d5){const _0x527e32=_0x29e139;if(!_0x1482d5[_0x527e32(0x1a5)]())return{'valid':!![]};if(_0x1482d5[_0x527e32(0x1c3)]>0x64)return{'valid':![],'message':_0x527e32(0x197)};const _0x58763a=/^[a-zA-Z0-9][a-zA-Z0-9_-]*$/;if(!_0x58763a['test'](_0x1482d5))return{'valid':![],'message':_0x527e32(0x1c6)};return{'valid':!![]};}async function _0x553971(){_0x1af4c1(!![]);try{const _0x3e2200=await getIsSessionValid();return _0x513797(_0x3e2200),_0x3e2200;}catch(_0x1f1943){return _0x513797(![]),![];}finally{_0x1af4c1(![]);}}async function _0x3ed879(){_0x4fb16e(!![]);try{const _0x4130e7=await authServer({'silent':!![]});return _0x513797(_0x4130e7),_0x4130e7;}catch(_0x1fc481){return _0x513797(![]),![];}finally{_0x4fb16e(![]);}}return useInput(async(_0x55d695,_0x45a39d)=>{const _0x155fd6=_0x29e139;if(_0x45a39d[_0x155fd6(0x196)]||_0x45a39d[_0x155fd6(0x1b9)]){if(_0x3944cd===_0x155fd6(0x1cc)){_0x5f195d(_0x4728f1=>_0x4728f1===0x0?0x1:0x0);return;}if(_0x3944cd===_0x155fd6(0x1c2)){_0x354492(_0x3cd78e=>_0x3cd78e===0x0?0x1:0x0);return;}}if(_0x45a39d[_0x155fd6(0x1d0)]){if(_0x3944cd===_0x155fd6(0x1a2)){const _0x356582=_0x4cd4db['trim']()||_0xabf112;if(_0xb58d6d)return;_0x218c14(_0x356582),_0x4c6bd3([{'step':_0x155fd6(0x1a2),'label':_0x155fd6(0x19b),'value':_0x356582}]),_0x411143(''),_0x8c6a3b(''),_0x41aaee(_0x155fd6(0x1a3));return;}if(_0x3944cd===_0x155fd6(0x1a3)){if(_0xb58d6d)return;const _0x4fc8e1=_0x4cd4db[_0x155fd6(0x1a5)]();_0x3f6c44(_0x4fc8e1),_0x4c6bd3(_0x50d1d5=>[..._0x50d1d5,{'step':'app-code','label':_0x155fd6(0x1d3),'value':_0x4fc8e1||'未设置'}]),_0x411143(''),_0x8c6a3b('');if(_0x4fc8e1){_0x41aaee(_0x155fd6(0x1ae));const _0x5e7636=await _0x553971();_0x5e7636?_0x41aaee(_0x155fd6(0x1cc)):_0x41aaee(_0x155fd6(0x1c2));}else{const _0x131b0c=_0xb43e40||_0x29d2db||_0x155fd6(0x1c1);_0x10cb49({'projectName':_0x35aaa5,'appCode':undefined,'pullApi':![],'env':_0x131b0c}),_0x41aaee(_0x155fd6(0x1a8));}return;}if(_0x3944cd==='confirm-api-pull'){const _0x20b11a=_0x2b84c8===0x0;_0x5bee78(_0x20b11a),_0x4c6bd3(_0x593cfd=>[..._0x593cfd,{'step':_0x155fd6(0x1ac),'label':'拉取API配置','value':_0x20b11a?'是':'否'}]);const _0xf58b34=_0xb43e40||_0x29d2db||_0x155fd6(0x1c1);_0x10cb49({'projectName':_0x35aaa5,'appCode':_0x2340e4,'pullApi':_0x20b11a,'env':_0xf58b34}),_0x41aaee(_0x155fd6(0x1a8));return;}if(_0x3944cd===_0x155fd6(0x1c2)){const _0x549076=_0x31ace5===0x0;if(_0x549076){_0x41aaee('login-process');const _0x1d844b=await _0x3ed879();if(_0x1d844b)_0x4c6bd3(_0x277713=>[..._0x277713,{'step':'login','label':_0x155fd6(0x1b5),'value':_0x155fd6(0x1c9)}]),_0x41aaee(_0x155fd6(0x1cc));else{_0x4c6bd3(_0x56979b=>[..._0x56979b,{'step':'login','label':_0x155fd6(0x1b5),'value':_0x155fd6(0x1a1)}]);const _0x5278ab=_0xb43e40||_0x29d2db||'online';_0x10cb49({'projectName':_0x35aaa5,'appCode':_0x2340e4,'pullApi':![],'env':_0x5278ab}),_0x41aaee(_0x155fd6(0x1a8));}}else{_0x4c6bd3(_0x1af85e=>[..._0x1af85e,{'step':_0x155fd6(0x19c),'label':_0x155fd6(0x1b5),'value':_0x155fd6(0x1a6)}]);const _0x4acd98=_0xb43e40||_0x29d2db||'online';_0x10cb49({'projectName':_0x35aaa5,'appCode':_0x2340e4,'pullApi':![],'env':_0x4acd98}),_0x41aaee(_0x155fd6(0x1a8));}return;}}if(_0x45a39d[_0x155fd6(0x1b7)]||_0x45a39d[_0x155fd6(0x1c7)]){_0x411143(_0x4de2fd=>{const _0x494f08=_0x155fd6,_0x351f0a=_0x4de2fd[_0x494f08(0x1af)](0x0,-0x1);if(_0x3944cd===_0x494f08(0x1a2)){const {valid:_0x1fd128,message:_0x36be5c}=_0x1ac175(_0x351f0a);_0x8c6a3b(_0x1fd128?'':_0x36be5c||_0x494f08(0x1be));}else{if(_0x3944cd===_0x494f08(0x1a3)){const {valid:_0x4063ee,message:_0x4f3f1c}=_0x20f717(_0x351f0a);_0x8c6a3b(_0x4063ee?'':_0x4f3f1c||_0x494f08(0x1b4));}}return _0x351f0a;});return;}if([_0x155fd6(0x1a8),_0x155fd6(0x1ae),_0x155fd6(0x1ca)][_0x155fd6(0x1cf)](_0x3944cd))return;if(_0x3944cd===_0x155fd6(0x1cc)||_0x3944cd===_0x155fd6(0x1c2))return;_0x411143(_0x183a5e=>{const _0x57758e=_0x155fd6,_0x162394=_0x183a5e+_0x55d695;if(_0x3944cd==='project-name'){const {valid:_0x3cac75,message:_0x3345bd}=_0x1ac175(_0x162394);_0x8c6a3b(_0x3cac75?'':_0x3345bd||_0x57758e(0x1be));}else{if(_0x3944cd===_0x57758e(0x1a3)){const {valid:_0xb21f5c,message:_0x5e23ec}=_0x20f717(_0x162394);_0x8c6a3b(_0xb21f5c?'':_0x5e23ec||_0x57758e(0x1b4));}}return _0x162394;});}),a32_0x42aea9(Box,{'flexDirection':_0x29e139(0x1a0),'marginTop':0x1,'children':[_0x5c5284['length']===0x0&&a32_0x69b5cc(Box,{'children':a32_0x69b5cc(Text,{'color':_0x29e139(0x195),'children':_0x29e139(0x1bc)})}),_0x5c5284['map'](_0x342f62=>a32_0x42aea9(Box,{'children':[a32_0x42aea9(Text,{'color':'green','children':['√\x20',_0x342f62[_0x29e139(0x1d4)],':\x20']}),a32_0x69b5cc(Text,{'color':_0x29e139(0x195),'children':_0x342f62['value']})]},_0x342f62['step'])),_0x3944cd===_0x29e139(0x1a2)&&a32_0x42aea9(a32_0x5a05c4,{'children':[a32_0x42aea9(Box,{'children':[a32_0x69b5cc(Text,{'children':'*\x20项目名:\x20'}),_0x4cd4db?a32_0x69b5cc(Text,{'color':'green','children':_0x4cd4db}):a32_0x69b5cc(Text,{'color':'gray','children':_0xabf112}),_0xb58d6d&&a32_0x42aea9(Text,{'color':_0x29e139(0x1c5),'children':[_0x29e139(0x1ba),_0xb58d6d]})]}),!_0xb58d6d&&!_0x4cd4db&&a32_0x69b5cc(Box,{'children':a32_0x69b5cc(Text,{'color':_0x29e139(0x19f),'children':_0x29e139(0x1ad)})})]}),_0x3944cd===_0x29e139(0x1a3)&&a32_0x42aea9(a32_0x5a05c4,{'children':[a32_0x42aea9(Box,{'children':[a32_0x69b5cc(Text,{'children':_0x29e139(0x1c8)}),a32_0x69b5cc(Text,{'color':_0x29e139(0x19f),'children':_0x29e139(0x1b3)}),a32_0x69b5cc(Text,{'color':'green','children':_0x4cd4db}),_0xb58d6d&&a32_0x42aea9(Text,{'color':_0x29e139(0x1c5),'children':['\x20←\x20',_0xb58d6d]})]}),!_0xb58d6d&&a32_0x69b5cc(Box,{'children':a32_0x42aea9(Text,{'color':_0x29e139(0x19f),'children':['\x20',_0x29e139(0x1cd)]})})]}),_0x3944cd==='login-check'&&a32_0x42aea9(Box,{'children':[a32_0x69b5cc(Text,{'children':'*\x20正在检查登录状态...'}),_0x1ca217&&a32_0x69b5cc(Text,{'color':'gray','children':_0x29e139(0x1a7)})]}),_0x3944cd==='confirm-api-pull'&&a32_0x42aea9(a32_0x5a05c4,{'children':[a32_0x69b5cc(Box,{'children':a32_0x69b5cc(Text,{'color':_0x29e139(0x1cb),'children':_0x29e139(0x1d1)})}),a32_0x69b5cc(Box,{'marginTop':0x1,'children':a32_0x69b5cc(Text,{'children':'*\x20是否要自动拉取\x20API\x20配置?'})}),a32_0x42aea9(Box,{'marginLeft':0x2,'children':[a32_0x42aea9(Text,{'color':_0x2b84c8===0x0?_0x29e139(0x1cb):_0x29e139(0x19f),'children':[_0x2b84c8===0x0?'▶\x20':'\x20\x20','Yes']}),a32_0x69b5cc(Text,{'children':'\x20'}),a32_0x42aea9(Text,{'color':_0x2b84c8===0x1?'green':_0x29e139(0x19f),'children':[_0x2b84c8===0x1?'▶\x20':'\x20\x20','No']})]}),a32_0x69b5cc(Box,{'children':a32_0x69b5cc(Text,{'color':_0x29e139(0x19f),'children':_0x29e139(0x1ce)})}),a32_0x69b5cc(Box,{'children':a32_0x69b5cc(Text,{'color':_0x29e139(0x19d),'children':'\x20\x20推荐选择\x20Yes,可自动配置\x20API\x20接口'})})]}),_0x3944cd===_0x29e139(0x1c2)&&a32_0x42aea9(a32_0x5a05c4,{'children':[a32_0x69b5cc(Box,{'children':a32_0x69b5cc(Text,{'color':'yellow','children':_0x29e139(0x1b0)})}),a32_0x69b5cc(Box,{'marginTop':0x1,'children':a32_0x69b5cc(Text,{'children':_0x29e139(0x1a9)})}),a32_0x42aea9(Box,{'marginLeft':0x2,'children':[a32_0x42aea9(Text,{'color':_0x31ace5===0x0?_0x29e139(0x1cb):_0x29e139(0x19f),'children':[_0x31ace5===0x0?'▶\x20':'\x20\x20','Yes']}),a32_0x69b5cc(Text,{'children':'\x20'}),a32_0x42aea9(Text,{'color':_0x31ace5===0x1?'green':_0x29e139(0x19f),'children':[_0x31ace5===0x1?'▶\x20':'\x20\x20','No']})]}),a32_0x69b5cc(Box,{'children':a32_0x69b5cc(Text,{'color':_0x29e139(0x19f),'children':_0x29e139(0x1ce)})}),a32_0x69b5cc(Box,{'children':a32_0x69b5cc(Text,{'color':_0x29e139(0x19d),'children':_0x29e139(0x19e)})})]}),_0x3944cd==='login-process'&&a32_0x42aea9(Box,{'children':[a32_0x69b5cc(Text,{'children':_0x29e139(0x1c0)}),_0x1c5c98&&a32_0x69b5cc(Text,{'color':_0x29e139(0x19f),'children':_0x29e139(0x1b6)})]})]});}