@lovrabet/cli 1.1.12 → 1.1.13

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 (54) 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-datasets.js +1 -1
  8. package/lib/api/format-dataset.js +1 -1
  9. package/lib/api/generate-api-file.js +1 -1
  10. package/lib/api/main.js +1 -1
  11. package/lib/api/pull-silent.js +1 -1
  12. package/lib/api/pull.js +1 -1
  13. package/lib/auth/auth-server-ui.js +1 -1
  14. package/lib/auth/auth-server.js +1 -1
  15. package/lib/auth/constant.js +1 -1
  16. package/lib/auth/get-cookie.js +1 -1
  17. package/lib/auth/is-session-valid.js +1 -1
  18. package/lib/auth/logout.js +1 -1
  19. package/lib/cli.js +1 -1
  20. package/lib/cmd/build-watch.js +1 -1
  21. package/lib/cmd/build.js +1 -1
  22. package/lib/cmd/logs.js +1 -1
  23. package/lib/cmd/preview.js +1 -1
  24. package/lib/cmd/start.js +1 -1
  25. package/lib/config/config-help.js +1 -1
  26. package/lib/config/main.js +1 -1
  27. package/lib/constant/domain.js +1 -1
  28. package/lib/constant/env.js +1 -1
  29. package/lib/create-app/enhanced-guided-create.js +1 -1
  30. package/lib/create-app/format-elapsed.js +1 -1
  31. package/lib/create-app/main.js +1 -1
  32. package/lib/create-app/task-finished.js +1 -1
  33. package/lib/create-app/task-loading.js +1 -1
  34. package/lib/create-app/task-running.js +1 -1
  35. package/lib/create-app/task-time.js +1 -1
  36. package/lib/create-app/use-copy-project-template.js +1 -1
  37. package/lib/create-app/use-format-code.js +1 -1
  38. package/lib/create-app/use-install-dependencies.js +1 -1
  39. package/lib/help.js +1 -1
  40. package/lib/init/main.js +1 -1
  41. package/lib/utils/config.js +1 -1
  42. package/lib/utils/copy-directory.js +1 -1
  43. package/lib/utils/http-client.js +1 -1
  44. package/lib/utils/logger.js +1 -1
  45. package/lib/utils/router-updater.js +1 -1
  46. package/lib/utils/template-replacer.js +1 -1
  47. package/package.json +1 -1
  48. package/templates/projects/sub-app-react-demo/package-lock.json +18 -11
  49. package/templates/projects/sub-app-react-demo/package.json +1 -1
  50. package/templates/projects/sub-app-react-demo/src/layouts/MainLayout.tsx +1 -10
  51. package/templates/projects/sub-app-react-demo/src/pages/sdk-demo/index.tsx +166 -2
  52. package/templates/projects/sub-app-react-demo/src/components/ApiUrlDisplay.tsx +0 -111
  53. package/templates/projects/sub-app-react-demo/src/pages/chart-fetch/index.tsx +0 -137
  54. package/templates/projects/sub-app-react-demo/src/pages/table-display.tsx +0 -130
package/lib/api/pull.js CHANGED
@@ -1 +1 @@
1
- (function(_0x458739,_0x152e87){const _0xc383f0=a11_0x5761,_0x22fb79=_0x458739();while(!![]){try{const _0x39cc44=-parseInt(_0xc383f0(0x187))/0x1+parseInt(_0xc383f0(0x1ac))/0x2+parseInt(_0xc383f0(0x199))/0x3+-parseInt(_0xc383f0(0x194))/0x4+-parseInt(_0xc383f0(0x19a))/0x5+-parseInt(_0xc383f0(0x197))/0x6*(-parseInt(_0xc383f0(0x1a4))/0x7)+-parseInt(_0xc383f0(0x1a3))/0x8*(-parseInt(_0xc383f0(0x1af))/0x9);if(_0x39cc44===_0x152e87)break;else _0x22fb79['push'](_0x22fb79['shift']());}catch(_0x390395){_0x22fb79['push'](_0x22fb79['shift']());}}}(a11_0x34c9,0xe7ff8));function a11_0x5761(_0x1e2ab7,_0x3380a3){const _0x34c946=a11_0x34c9();return a11_0x5761=function(_0x5761fa,_0x12fdf8){_0x5761fa=_0x5761fa-0x181;let _0x1ffead=_0x34c946[_0x5761fa];return _0x1ffead;},a11_0x5761(_0x1e2ab7,_0x3380a3);}function a11_0x34c9(){const _0x110b3b=['×\x20无法读取错误响应内容','1025572wNWINy','\x20\x20\x202.\x20配置默认值:\x20lovrabet\x20config\x20set\x20app\x20<app-code>','/smartapi/dataset/getList?appCode=','72jCiBTS','error','3321789wrXSjL','6730380RwWZTR',',且无法读取错误响应内容','data','status','!\x20请输入文件前缀\x20\x1b[90m[留空表示无前缀]\x1b[0m:\x20','stdin','\x1b[0m','×\x20未提供应用AppCode,且配置中也没有默认值','trim','8hgaxoD','411908ZOZwal','string','api','\x0a*\x20正在从服务器拉取\x20API\x20配置...\x20(环境:\x20','-client','env','log','*\x20使用指定的应用AppCode:\x20','754378pUKXot','success','-api','9195822FafiQr','*\x20开始生成\x20API\x20配置文件:','.ts\x20-\x20模型配置文件','json','×\x20提供的应用AppCode\x20\x22','app','question','\x20个数据集...','client','获取数据集失败,原因:登录鉴权失败,登录已过期,请使用\x20lovrabet\x20auth\x20重新登录后再尝试','\x22\x20无效','!\x20请使用以下方式之一:','659605gxaMWR','online','message','tableData','close','\x20\x20\x20•\x20','api-pull','.ts\x20-\x20客户端实例文件','text','exit','×\x20错误详情:','url'];a11_0x34c9=function(){return _0x110b3b;};return a11_0x34c9();}import{createInterface}from'node:readline/promises';import{readConfig}from'../utils/config.js';import{getCookie}from'../auth/get-cookie.js';import{getApiDomain}from'../constant/domain.js';import{initEnv}from'../constant/env.js';import{generateApiFile}from'./generate-api-file.js';import{logger}from'../utils/logger.js';export async function initApi(_0x1c5ef6,_0x520ec9){const _0x4e603b=a11_0x5761,_0x94db4d=readConfig(),_0x423e78=_0x1c5ef6||_0x94db4d?.[_0x4e603b(0x1b4)],_0x5b7ffd=typeof _0x94db4d[_0x4e603b(0x1a9)]===_0x4e603b(0x1a5)?_0x94db4d['env']:undefined,_0x5a7d04=_0x520ec9||_0x5b7ffd||_0x4e603b(0x188);initEnv(_0x5a7d04);(typeof _0x423e78!==_0x4e603b(0x1a5)||!_0x423e78)&&(_0x1c5ef6?console[_0x4e603b(0x198)](_0x4e603b(0x1b3)+_0x1c5ef6+_0x4e603b(0x185)):(console['error'](_0x4e603b(0x1a1)),console[_0x4e603b(0x1aa)](_0x4e603b(0x186)),console[_0x4e603b(0x1aa)]('\x20\x20\x201.\x20直接指定:\x20lovrabet\x20api\x20pull\x20<app-code>'),console['log'](_0x4e603b(0x195))),process[_0x4e603b(0x190)](0x1));_0x1c5ef6?console[_0x4e603b(0x1aa)](_0x4e603b(0x1ab)+_0x423e78):console[_0x4e603b(0x1aa)]('\x1b[90m*\x20使用配置的应用AppCode:\x20'+_0x423e78+_0x4e603b(0x1a0));const _0x9c6982=createInterface({'input':process[_0x4e603b(0x19f)],'output':process['stdout']});let _0x5ee41e;try{const _0x3c4c51=await _0x9c6982[_0x4e603b(0x181)](_0x4e603b(0x19e));_0x5ee41e=_0x3c4c51[_0x4e603b(0x1a2)]();if(_0x5ee41e){const _0x23fa36=/^[a-zA-Z][a-zA-Z0-9_-]*$/;!_0x23fa36['test'](_0x5ee41e)&&(console[_0x4e603b(0x198)]('×\x20文件前缀格式不正确。只能包含字母、数字、连字符和下划线,且必须以字母开头。'),process['exit'](0x1));}}finally{_0x9c6982[_0x4e603b(0x18b)]();}console['log'](_0x4e603b(0x1a7)+_0x5a7d04+')');const _0x2f5fcf=await fetch(getApiDomain()+_0x4e603b(0x196)+_0x423e78+'&pageSize=999&currentPage=1',{'headers':{'Cookie':getCookie()}});if(_0x2f5fcf['ok']){const _0x461612=await _0x2f5fcf[_0x4e603b(0x1b2)]();if(_0x461612[_0x4e603b(0x1ad)]){const _0x1a4ad6=_0x5ee41e?_0x5ee41e+_0x4e603b(0x1ae):_0x4e603b(0x1a6),_0x43dbf2=_0x5ee41e?_0x5ee41e+_0x4e603b(0x1a8):_0x4e603b(0x183);console[_0x4e603b(0x1aa)](_0x4e603b(0x1b0)),console[_0x4e603b(0x1aa)]('\x20\x20\x20•\x20'+_0x1a4ad6+_0x4e603b(0x1b1)),console['log'](_0x4e603b(0x18c)+_0x43dbf2+_0x4e603b(0x18e)),console[_0x4e603b(0x1aa)]('*\x20正在处理\x20'+_0x461612[_0x4e603b(0x19c)]['tableData']['length']+_0x4e603b(0x182));const _0x127238=!_0x1c5ef6;await generateApiFile(_0x461612[_0x4e603b(0x19c)][_0x4e603b(0x18a)],_0x5ee41e,_0x423e78,_0x127238,_0x5a7d04);}}else{if(_0x2f5fcf[_0x4e603b(0x19d)]===0x191){const _0x28ec92=_0x4e603b(0x184);console[_0x4e603b(0x198)]('×\x20'+_0x28ec92),logger[_0x4e603b(0x198)](_0x4e603b(0x18d),_0x28ec92,{'status':_0x2f5fcf[_0x4e603b(0x19d)],'appCode':_0x423e78,'url':_0x2f5fcf[_0x4e603b(0x192)]});}else{const _0x355b71='获取数据集失败,HTTP状态码:\x20'+_0x2f5fcf[_0x4e603b(0x19d)];console[_0x4e603b(0x198)]('×\x20'+_0x355b71);try{const _0x2c3fd5=await _0x2f5fcf[_0x4e603b(0x18f)]();_0x2c3fd5?(console[_0x4e603b(0x198)](_0x4e603b(0x191),_0x2c3fd5),logger[_0x4e603b(0x198)](_0x4e603b(0x18d),_0x355b71,{'status':_0x2f5fcf[_0x4e603b(0x19d)],'appCode':_0x423e78,'url':_0x2f5fcf['url'],'errorBody':_0x2c3fd5})):logger['error'](_0x4e603b(0x18d),_0x355b71,{'status':_0x2f5fcf[_0x4e603b(0x19d)],'appCode':_0x423e78,'url':_0x2f5fcf[_0x4e603b(0x192)]});}catch(_0x21e9c2){console[_0x4e603b(0x198)](_0x4e603b(0x193)),logger[_0x4e603b(0x198)]('api-pull',_0x355b71+_0x4e603b(0x19b),{'status':_0x2f5fcf[_0x4e603b(0x19d)],'appCode':_0x423e78,'url':_0x2f5fcf[_0x4e603b(0x192)],'readError':_0x21e9c2 instanceof Error?_0x21e9c2[_0x4e603b(0x189)]:String(_0x21e9c2)});}}process[_0x4e603b(0x190)](0x1);}}
1
+ (function(_0x382ab1,_0x36c0ed){const _0x291917=a11_0x275d,_0x2fc9f2=_0x382ab1();while(!![]){try{const _0x928c73=-parseInt(_0x291917(0x105))/0x1+parseInt(_0x291917(0x12d))/0x2*(-parseInt(_0x291917(0xfb))/0x3)+-parseInt(_0x291917(0x12a))/0x4*(parseInt(_0x291917(0x121))/0x5)+parseInt(_0x291917(0x12c))/0x6*(-parseInt(_0x291917(0x101))/0x7)+parseInt(_0x291917(0x123))/0x8*(-parseInt(_0x291917(0xf8))/0x9)+parseInt(_0x291917(0xf9))/0xa+-parseInt(_0x291917(0x128))/0xb*(-parseInt(_0x291917(0x124))/0xc);if(_0x928c73===_0x36c0ed)break;else _0x2fc9f2['push'](_0x2fc9f2['shift']());}catch(_0x4bb85c){_0x2fc9f2['push'](_0x2fc9f2['shift']());}}}(a11_0x1737,0x8081c));import{createInterface}from'node:readline/promises';function a11_0x275d(_0x4d305a,_0x1e8c70){const _0x1737e1=a11_0x1737();return a11_0x275d=function(_0x275d44,_0x1305e6){_0x275d44=_0x275d44-0xf4;let _0x24d717=_0x1737e1[_0x275d44];return _0x24d717;},a11_0x275d(_0x4d305a,_0x1e8c70);}import{readConfig}from'../utils/config.js';import{getCookie}from'../auth/get-cookie.js';import{getApiDomain}from'../constant/domain.js';function a11_0x1737(){const _0x24adab=['.ts\x20-\x20模型配置文件','exit',',且无法读取错误响应内容','text','\x20个数据集...','question','×\x20未提供应用AppCode,且配置中也没有默认值','status','api','!\x20请使用以下方式之一:','*\x20开始生成\x20API\x20配置文件:','success','获取数据集失败,原因:登录鉴权失败,登录已过期,请使用\x20lovrabet\x20auth\x20重新登录后再尝试','length','×\x20文件前缀格式不正确。只能包含字母、数字、连字符和下划线,且必须以字母开头。','*\x20正在处理\x20','\x20\x20\x202.\x20配置默认值:\x20lovrabet\x20config\x20set\x20app\x20<app-code>','data','.ts\x20-\x20客户端实例文件','&pageSize=999&currentPage=1','json','获取数据集失败,HTTP状态码:\x20','12010IEsKUy','message','1059808RNggdT','516pPeTna','app','stdout','online','846769fTTjNG','close','1240KtidXl','tableData','2386302NploUW','2DUIwxj','\x1b[0m','error','\x1b[90m*\x20使用配置的应用AppCode:\x20','api-pull','45NXrJqS','4038950aGhhQX','\x0a*\x20正在从服务器拉取\x20API\x20配置...\x20(环境:\x20','1577481LgnRPQ','*\x20使用指定的应用AppCode:\x20','\x20\x20\x201.\x20直接指定:\x20lovrabet\x20api\x20pull\x20<app-code>','client','test','log','14mPPyFO','url','-client','trim','459367xpxuRj','\x20\x20\x20•\x20','/smartapi/dataset/getList?appCode=','×\x20错误详情:','stdin','!\x20请输入文件前缀\x20\x1b[90m[留空表示无前缀]\x1b[0m:\x20'];a11_0x1737=function(){return _0x24adab;};return a11_0x1737();}import{initEnv}from'../constant/env.js';import{generateApiFile}from'./generate-api-file.js';import{logger}from'../utils/logger.js';export async function initApi(_0x4a05cf,_0x33f0fe){const _0x2c718c=a11_0x275d,_0x5be600=readConfig(),_0x1f3105=_0x4a05cf||_0x5be600?.[_0x2c718c(0x125)],_0x5bd309=typeof _0x5be600['env']==='string'?_0x5be600['env']:undefined,_0x4e0a83=_0x33f0fe||_0x5bd309||_0x2c718c(0x127);initEnv(_0x4e0a83);(typeof _0x1f3105!=='string'||!_0x1f3105)&&(_0x4a05cf?console[_0x2c718c(0xf5)]('×\x20提供的应用AppCode\x20\x22'+_0x4a05cf+'\x22\x20无效'):(console[_0x2c718c(0xf5)](_0x2c718c(0x111)),console[_0x2c718c(0x100)](_0x2c718c(0x114)),console[_0x2c718c(0x100)](_0x2c718c(0xfd)),console[_0x2c718c(0x100)](_0x2c718c(0x11b))),process[_0x2c718c(0x10c)](0x1));_0x4a05cf?console[_0x2c718c(0x100)](_0x2c718c(0xfc)+_0x1f3105):console[_0x2c718c(0x100)](_0x2c718c(0xf6)+_0x1f3105+_0x2c718c(0xf4));const _0x2d952c=createInterface({'input':process[_0x2c718c(0x109)],'output':process[_0x2c718c(0x126)]});let _0x47aed7;try{const _0x2eb2=await _0x2d952c[_0x2c718c(0x110)](_0x2c718c(0x10a));_0x47aed7=_0x2eb2[_0x2c718c(0x104)]();if(_0x47aed7){const _0x5c07f7=/^[a-zA-Z][a-zA-Z0-9_-]*$/;!_0x5c07f7[_0x2c718c(0xff)](_0x47aed7)&&(console[_0x2c718c(0xf5)](_0x2c718c(0x119)),process['exit'](0x1));}}finally{_0x2d952c[_0x2c718c(0x129)]();}console[_0x2c718c(0x100)](_0x2c718c(0xfa)+_0x4e0a83+')');const _0x25476b=await fetch(getApiDomain()+_0x2c718c(0x107)+_0x1f3105+_0x2c718c(0x11e),{'headers':{'Cookie':getCookie()}});if(_0x25476b['ok']){const _0x3b6455=await _0x25476b[_0x2c718c(0x11f)]();if(_0x3b6455[_0x2c718c(0x116)]){const _0x549f1a=_0x47aed7?_0x47aed7+'-api':_0x2c718c(0x113),_0x1acfaf=_0x47aed7?_0x47aed7+_0x2c718c(0x103):_0x2c718c(0xfe);console[_0x2c718c(0x100)](_0x2c718c(0x115)),console[_0x2c718c(0x100)](_0x2c718c(0x106)+_0x549f1a+_0x2c718c(0x10b)),console[_0x2c718c(0x100)]('\x20\x20\x20•\x20'+_0x1acfaf+_0x2c718c(0x11d)),console[_0x2c718c(0x100)](_0x2c718c(0x11a)+_0x3b6455[_0x2c718c(0x11c)][_0x2c718c(0x12b)][_0x2c718c(0x118)]+_0x2c718c(0x10f));const _0x3c5dea=!_0x4a05cf;await generateApiFile(_0x3b6455['data']['tableData'],_0x47aed7,_0x1f3105,_0x3c5dea,_0x4e0a83);}}else{if(_0x25476b['status']===0x191){const _0xeafdd8=_0x2c718c(0x117);console[_0x2c718c(0xf5)]('×\x20'+_0xeafdd8),logger[_0x2c718c(0xf5)]('api-pull',_0xeafdd8,{'status':_0x25476b['status'],'appCode':_0x1f3105,'url':_0x25476b[_0x2c718c(0x102)]});}else{const _0x57d11a=_0x2c718c(0x120)+_0x25476b[_0x2c718c(0x112)];console[_0x2c718c(0xf5)]('×\x20'+_0x57d11a);try{const _0x3d9650=await _0x25476b[_0x2c718c(0x10e)]();_0x3d9650?(console['error'](_0x2c718c(0x108),_0x3d9650),logger[_0x2c718c(0xf5)](_0x2c718c(0xf7),_0x57d11a,{'status':_0x25476b[_0x2c718c(0x112)],'appCode':_0x1f3105,'url':_0x25476b[_0x2c718c(0x102)],'errorBody':_0x3d9650})):logger[_0x2c718c(0xf5)](_0x2c718c(0xf7),_0x57d11a,{'status':_0x25476b['status'],'appCode':_0x1f3105,'url':_0x25476b['url']});}catch(_0x3396be){console[_0x2c718c(0xf5)]('×\x20无法读取错误响应内容'),logger['error'](_0x2c718c(0xf7),_0x57d11a+_0x2c718c(0x10d),{'status':_0x25476b['status'],'appCode':_0x1f3105,'url':_0x25476b[_0x2c718c(0x102)],'readError':_0x3396be instanceof Error?_0x3396be[_0x2c718c(0x122)]:String(_0x3396be)});}}process[_0x2c718c(0x10c)](0x1);}}
@@ -1 +1 @@
1
- function a13_0x5b39(){const _0x4cc670=['*\x20登录成功!','return','√\x20当前为有效会话,无需重新登录。','4mchYCA','1489470MzOWuQ','按\x20“q”\x20退出。','4476680gMVivp','56228fVXvhR','log','7rBXkbz','then','10988xzDPPv','请前往浏览器完成登录。','gray','91376UwkHIl','正在登录...\x20','145JCDdMg','341370qppvyq','1443978RwSdiv'];a13_0x5b39=function(){return _0x4cc670;};return a13_0x5b39();}(function(_0x33887a,_0x5dfb4f){const _0xe228c6=a13_0x42e6,_0x1725a1=_0x33887a();while(!![]){try{const _0x376cdd=-parseInt(_0xe228c6(0x185))/0x1*(parseInt(_0xe228c6(0x181))/0x2)+parseInt(_0xe228c6(0x17c))/0x3+-parseInt(_0xe228c6(0x189))/0x4*(-parseInt(_0xe228c6(0x18e))/0x5)+-parseInt(_0xe228c6(0x182))/0x6+-parseInt(_0xe228c6(0x187))/0x7*(-parseInt(_0xe228c6(0x18c))/0x8)+-parseInt(_0xe228c6(0x17d))/0x9+parseInt(_0xe228c6(0x184))/0xa;if(_0x376cdd===_0x5dfb4f)break;else _0x1725a1['push'](_0x1725a1['shift']());}catch(_0x39b4a6){_0x1725a1['push'](_0x1725a1['shift']());}}}(a13_0x5b39,0x20148));import{jsx as a13_0x263a44,jsxs as a13_0x165406}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';import a13_0x4035f7 from'ink-spinner';function a13_0x42e6(_0x2c5795,_0x16a867){const _0x5b3973=a13_0x5b39();return a13_0x42e6=function(_0x42e6a1,_0x513eab){_0x42e6a1=_0x42e6a1-0x17c;let _0x23e9c3=_0x5b3973[_0x42e6a1];return _0x23e9c3;},a13_0x42e6(_0x2c5795,_0x16a867);}export function AuthServer(){const _0xba946=a13_0x42e6,{exit:_0x5517de}=useApp(),[_0x10c6d8,_0xc9b490]=useState(![]),[_0x11c6c8,_0x166198]=useState(!![]),[_0x53d725,_0x48fd4c]=useState(![]),[_0x2c5408,_0x21d678]=useState(![]);useEffect(()=>{const _0x260fbf=a13_0x42e6;getIsSessionValid()[_0x260fbf(0x188)](_0xc9b490)['finally'](()=>_0x166198(![]));},[]),useEffect(()=>{const _0x3abd26=a13_0x42e6;!_0x11c6c8&&_0x10c6d8&&(console[_0x3abd26(0x186)](_0x3abd26(0x180)),_0x5517de());},[_0x11c6c8,_0x10c6d8,_0x5517de]),useEffect(()=>{const _0x289c74=a13_0x42e6;_0x2c5408&&(console['log'](_0x289c74(0x17e)),_0x5517de());},[_0x2c5408,_0x5517de]),useInput((_0x8229c,_0x156010)=>{const _0x2e12ff=a13_0x42e6;_0x156010[_0x2e12ff(0x17f)]&&(_0x48fd4c(!![]),authServer({'silent':!![]})[_0x2e12ff(0x188)](_0x409703=>{_0x21d678(_0x409703);})),_0x8229c==='q'&&_0x5517de();});if(_0x11c6c8)return null;if(_0x10c6d8||_0x2c5408)return null;return a13_0x263a44(Box,{'flexDirection':'column','marginTop':0x1,'marginBottom':0x1,'children':_0x53d725?a13_0x165406(Box,{'children':[a13_0x263a44(Box,{'width':'1'}),a13_0x165406(Text,{'color':'green','children':[a13_0x263a44(a13_0x4035f7,{'type':'dots'}),'\x20\x20']}),a13_0x263a44(Text,{'children':_0xba946(0x18d)}),a13_0x263a44(Text,{'color':_0xba946(0x18b),'children':_0xba946(0x18a)})]}):a13_0x165406(Box,{'children':[a13_0x263a44(Box,{'width':'1'}),a13_0x263a44(Text,{'children':'*\x20按回车开始登录。'}),a13_0x263a44(Text,{'color':_0xba946(0x18b),'children':_0xba946(0x183)})]})});}
1
+ (function(_0x59556f,_0x1c15fe){const _0x458b84=a13_0x17fd,_0x5738ed=_0x59556f();while(!![]){try{const _0x47b0b3=parseInt(_0x458b84(0x157))/0x1+parseInt(_0x458b84(0x146))/0x2+-parseInt(_0x458b84(0x14b))/0x3*(parseInt(_0x458b84(0x151))/0x4)+parseInt(_0x458b84(0x14f))/0x5*(parseInt(_0x458b84(0x153))/0x6)+parseInt(_0x458b84(0x14a))/0x7*(-parseInt(_0x458b84(0x14e))/0x8)+-parseInt(_0x458b84(0x147))/0x9+-parseInt(_0x458b84(0x155))/0xa*(-parseInt(_0x458b84(0x143))/0xb);if(_0x47b0b3===_0x1c15fe)break;else _0x5738ed['push'](_0x5738ed['shift']());}catch(_0x52a930){_0x5738ed['push'](_0x5738ed['shift']());}}}(a13_0x2355,0x87689));import{jsx as a13_0x5bfc0f,jsxs as a13_0x4a804e}from'react/jsx-runtime';import{Text,Box,useInput,useApp}from'ink';import{useEffect,useState}from'react';function a13_0x2355(){const _0x25e26e=['3845mvCZBL','dots','2073896uPXYLR','then','3318fRvRAr','正在登录...\x20','30RgRZSk','*\x20登录成功!','699800oKtCWx','1761001InPfNV','√\x20当前为有效会话,无需重新登录。','*\x20按回车开始登录。','950950qktjus','3904497cbjVyd','return','gray','1351ndRfzF','6uwLzsx','column','finally','2296JMYLWG'];a13_0x2355=function(){return _0x25e26e;};return a13_0x2355();}import{getIsSessionValid}from'./is-session-valid.js';import{authServer}from'./auth-server.js';function a13_0x17fd(_0x279177,_0xf68bc3){const _0x235500=a13_0x2355();return a13_0x17fd=function(_0x17fd98,_0x360989){_0x17fd98=_0x17fd98-0x143;let _0x544404=_0x235500[_0x17fd98];return _0x544404;},a13_0x17fd(_0x279177,_0xf68bc3);}import a13_0x39a402 from'ink-spinner';export function AuthServer(){const _0x5cd767=a13_0x17fd,{exit:_0x230c53}=useApp(),[_0x39a588,_0x5b166c]=useState(![]),[_0x3e8ff2,_0x3dc906]=useState(!![]),[_0x4e6aa0,_0x419108]=useState(![]),[_0x56f9f0,_0xe85307]=useState(![]);useEffect(()=>{const _0x4fa9bb=a13_0x17fd;getIsSessionValid()[_0x4fa9bb(0x152)](_0x5b166c)[_0x4fa9bb(0x14d)](()=>_0x3dc906(![]));},[]),useEffect(()=>{const _0x5dcb52=a13_0x17fd;!_0x3e8ff2&&_0x39a588&&(console['log'](_0x5dcb52(0x144)),_0x230c53());},[_0x3e8ff2,_0x39a588,_0x230c53]),useEffect(()=>{const _0x4df2fe=a13_0x17fd;_0x56f9f0&&(console['log'](_0x4df2fe(0x156)),_0x230c53());},[_0x56f9f0,_0x230c53]),useInput((_0x245e6a,_0x41074c)=>{const _0xab35ed=a13_0x17fd;_0x41074c[_0xab35ed(0x148)]&&(_0x419108(!![]),authServer({'silent':!![]})[_0xab35ed(0x152)](_0x42fa88=>{_0xe85307(_0x42fa88);})),_0x245e6a==='q'&&_0x230c53();});if(_0x3e8ff2)return null;if(_0x39a588||_0x56f9f0)return null;return a13_0x5bfc0f(Box,{'flexDirection':_0x5cd767(0x14c),'marginTop':0x1,'marginBottom':0x1,'children':_0x4e6aa0?a13_0x4a804e(Box,{'children':[a13_0x5bfc0f(Box,{'width':'1'}),a13_0x4a804e(Text,{'color':'green','children':[a13_0x5bfc0f(a13_0x39a402,{'type':_0x5cd767(0x150)}),'\x20\x20']}),a13_0x5bfc0f(Text,{'children':_0x5cd767(0x154)}),a13_0x5bfc0f(Text,{'color':_0x5cd767(0x149),'children':'请前往浏览器完成登录。'})]}):a13_0x4a804e(Box,{'children':[a13_0x5bfc0f(Box,{'width':'1'}),a13_0x5bfc0f(Text,{'children':_0x5cd767(0x145)}),a13_0x5bfc0f(Text,{'color':_0x5cd767(0x149),'children':'按\x20“q”\x20退出。'})]})});}
@@ -1 +1 @@
1
- const a14_0xe5f384=a14_0x45d6;(function(_0x218d6e,_0x5c48aa){const _0x4b9798=a14_0x45d6,_0x4d8f4e=_0x218d6e();while(!![]){try{const _0x3b5cd7=-parseInt(_0x4b9798(0x119))/0x1*(parseInt(_0x4b9798(0x113))/0x2)+-parseInt(_0x4b9798(0xfd))/0x3*(-parseInt(_0x4b9798(0x118))/0x4)+parseInt(_0x4b9798(0x107))/0x5+parseInt(_0x4b9798(0x110))/0x6*(-parseInt(_0x4b9798(0x103))/0x7)+parseInt(_0x4b9798(0xff))/0x8*(parseInt(_0x4b9798(0xfc))/0x9)+parseInt(_0x4b9798(0x11d))/0xa*(-parseInt(_0x4b9798(0x111))/0xb)+-parseInt(_0x4b9798(0x10a))/0xc;if(_0x3b5cd7===_0x5c48aa)break;else _0x4d8f4e['push'](_0x4d8f4e['shift']());}catch(_0xa1517d){_0x4d8f4e['push'](_0x4d8f4e['shift']());}}}(a14_0x370e,0xb05af));function a14_0x370e(){const _0x194894=['<!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>','headers','42cdkHch','6309094CZWqBI','https://dev.lovrabet.com:','2KjViBl','end','🔗\x20请手动复制登录地址到浏览器:','writeHead','🔐\x20正在启动登录服务...','2564uJVaDY','241388NUYMFl','text/html;\x20charset=utf-8','log','✅\x20浏览器已自动打开,请在浏览器中完成登录','20Rvramy','/sign-in?redirect=','main','createServer','then','🌐\x20正在尝试自动打开浏览器...','cookie','platform','18jMezdO','6351PsOxLQ','silent','4551056vbePMY','isAuth','json','start\x20\x22\x22\x20\x22','1167565IWxTCQ','win32','Auth\x20server\x20error:','darwin','4591820GuZdRr','error','⚠️\x20\x20无法自动打开浏览器','1616556QIWCxA','127.0.0.1','session','💡\x20如果浏览器没有自动打开,请手动复制上面的登录地址到浏览器中打开'];a14_0x370e=function(){return _0x194894;};return a14_0x370e();}import{writeFileSync}from'node:fs';import a14_0x34546f from'node:https';import{getUserDomain}from'../constant/domain.js';function a14_0x45d6(_0x4ffe18,_0x29daac){const _0x370e91=a14_0x370e();return a14_0x45d6=function(_0x45d68b,_0x4dc7f0){_0x45d68b=_0x45d68b-0xfc;let _0xc26b0f=_0x370e91[_0x45d68b];return _0xc26b0f;},a14_0x45d6(_0x4ffe18,_0x29daac);}import{exec}from'node:child_process';import{getIsSessionValid}from'./is-session-valid.js';import{cookieFile}from'./constant.js';export async function authServer(_0x2ff110){const _0x5e1d28=a14_0x45d6,_0x429f07=_0x2ff110?.[_0x5e1d28(0xfe)]||![];if(await getIsSessionValid())return!![];const _0x23c132=await(await fetch('https://g.yuntooai.com/cert/lovrabet-dev.json'))[_0x5e1d28(0x101)]();return new Promise(async(_0x5631e1,_0x3a2946)=>{const _0x11fe66=_0x5e1d28;let _0x340a0d=0x0;const _0x30e716=a14_0x34546f[_0x11fe66(0x120)](_0x23c132,async(_0x2e9dcd,_0x287ebb)=>{const _0x2dc7cb=_0x11fe66,_0x421c5e=getUserDomain(),_0x3169c0=_0x2e9dcd[_0x2dc7cb(0x10f)][_0x2dc7cb(0x123)]||'',_0x29efe7=await fetch(_0x421c5e+'/api/auth/get-session',{'headers':{'cookie':_0x3169c0}})[_0x2dc7cb(0x121)](_0x34e340=>_0x34e340['json']()),_0x4d66a6=_0x29efe7&&_0x29efe7[_0x2dc7cb(0x10c)]&&_0x29efe7['user'];if(_0x4d66a6){writeFileSync(cookieFile,_0x3169c0,'utf-8'),_0x5631e1(!![]);const _0x564f31=_0x2dc7cb(0x10e);_0x287ebb[_0x2dc7cb(0x116)](0xc8,{'Content-Type':_0x2dc7cb(0x11a)}),_0x287ebb[_0x2dc7cb(0x114)](_0x564f31),_0x30e716['close']();}else{const _0x6a5ee2=''+encodeURIComponent('https://dev.lovrabet.com:'+_0x340a0d);_0x287ebb[_0x2dc7cb(0x116)](0x12e,{'location':_0x421c5e+_0x2dc7cb(0x11e)+_0x6a5ee2}),_0x287ebb[_0x2dc7cb(0x114)]();return;}});_0x30e716['listen'](0x0,_0x11fe66(0x10b),()=>{const _0x30cc10=_0x11fe66,_0x160dbd=_0x30e716['address']();_0x340a0d=typeof _0x160dbd==='object'&&_0x160dbd?_0x160dbd['port']:Number(_0x160dbd);const _0x3f510d=_0x30cc10(0x112)+_0x340a0d;!_0x429f07&&(console[_0x30cc10(0x11b)](_0x30cc10(0x117)),console[_0x30cc10(0x11b)]('📍\x20登录地址:',_0x3f510d),console[_0x30cc10(0x11b)](_0x30cc10(0x122)),console['log'](''),console[_0x30cc10(0x11b)](_0x30cc10(0x10d)),console['log']('')),openInBrowser(_0x3f510d)[_0x30cc10(0x121)](_0x2668a3=>{const _0x1c8aaf=_0x30cc10;!_0x429f07&&(_0x2668a3?console[_0x1c8aaf(0x11b)](_0x1c8aaf(0x11c)):(console[_0x1c8aaf(0x11b)](_0x1c8aaf(0x109)),console['log']('🔗\x20请手动复制登录地址到浏览器:',_0x3f510d)),console[_0x1c8aaf(0x11b)](''));})['catch'](()=>{const _0x1927ee=_0x30cc10;!_0x429f07&&(console[_0x1927ee(0x11b)](_0x1927ee(0x109)),console[_0x1927ee(0x11b)](_0x1927ee(0x115),_0x3f510d),console[_0x1927ee(0x11b)](''));});}),_0x30e716['on'](_0x11fe66(0x108),_0x271f5e=>{const _0x38ae1d=_0x11fe66;!_0x429f07&&console[_0x38ae1d(0x108)](_0x38ae1d(0x105),_0x271f5e),_0x3a2946(_0x271f5e);});});}function openInBrowser(_0x5b3bb7){return new Promise(_0x47d940=>{const _0x4d2e93=a14_0x45d6,_0x38e58e=process[_0x4d2e93(0x124)];let _0x6fff38;if(_0x38e58e===_0x4d2e93(0x104))_0x6fff38=_0x4d2e93(0x102)+_0x5b3bb7+'\x22';else _0x38e58e===_0x4d2e93(0x106)?_0x6fff38='open\x20\x22'+_0x5b3bb7+'\x22':_0x6fff38='xdg-open\x20\x22'+_0x5b3bb7+'\x22';exec(_0x6fff38,_0x28f517=>{_0x28f517?_0x47d940(![]):_0x47d940(!![]);});});}if(import.meta[a14_0xe5f384(0x11f)]){const isAuth=await authServer();console['log'](a14_0xe5f384(0x100),isAuth);}
1
+ function a14_0xa75c(_0x283964,_0x460aa1){const _0x33dd97=a14_0x33dd();return a14_0xa75c=function(_0xa75c30,_0x3436b5){_0xa75c30=_0xa75c30-0x89;let _0x351f43=_0x33dd97[_0xa75c30];return _0x351f43;},a14_0xa75c(_0x283964,_0x460aa1);}const a14_0x8c97b0=a14_0xa75c;(function(_0x274a37,_0xab9d67){const _0x4b4d05=a14_0xa75c,_0x46d8dc=_0x274a37();while(!![]){try{const _0x4738fe=-parseInt(_0x4b4d05(0x8b))/0x1*(parseInt(_0x4b4d05(0xb6))/0x2)+-parseInt(_0x4b4d05(0xb5))/0x3*(-parseInt(_0x4b4d05(0x8a))/0x4)+-parseInt(_0x4b4d05(0x8e))/0x5+parseInt(_0x4b4d05(0x8d))/0x6*(-parseInt(_0x4b4d05(0xb4))/0x7)+-parseInt(_0x4b4d05(0xa3))/0x8*(parseInt(_0x4b4d05(0xae))/0x9)+parseInt(_0x4b4d05(0xa5))/0xa*(parseInt(_0x4b4d05(0xb1))/0xb)+parseInt(_0x4b4d05(0xac))/0xc;if(_0x4738fe===_0xab9d67)break;else _0x46d8dc['push'](_0x46d8dc['shift']());}catch(_0x2449e0){_0x46d8dc['push'](_0x46d8dc['shift']());}}}(a14_0x33dd,0x395c3));import{writeFileSync}from'node:fs';import a14_0x545e23 from'node:https';import{getUserDomain}from'../constant/domain.js';import{exec}from'node:child_process';import{getIsSessionValid}from'./is-session-valid.js';import{cookieFile}from'./constant.js';function a14_0x33dd(){const _0x3d3591=['184168UrNWfX','Auth\x20server\x20error:','10sCewOY','https://g.yuntooai.com/cert/lovrabet-dev.json','platform','start\x20\x22\x22\x20\x22','main','open\x20\x22','end','3801156KAXjvc','xdg-open\x20\x22','18DGtJCb','/sign-in?redirect=','then','2095643bzMorv','https://dev.lovrabet.com:','win32','2023QZtWTA','3dJsdrl','4NzdoPE','127.0.0.1','🔐\x20正在启动登录服务...','error','catch','1126088hZItAx','133388pUXHGe','headers','4176ewmHSj','199445ywcqFu','user','session','address','⚠️\x20\x20无法自动打开浏览器','✅\x20浏览器已自动打开,请在浏览器中完成登录','port','<!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>','utf-8','📍\x20登录地址:','darwin','close','💡\x20如果浏览器没有自动打开,请手动复制上面的登录地址到浏览器中打开','/api/auth/get-session','🌐\x20正在尝试自动打开浏览器...','json','silent','object','createServer','log','🔗\x20请手动复制登录地址到浏览器:'];a14_0x33dd=function(){return _0x3d3591;};return a14_0x33dd();}export async function authServer(_0x3ec108){const _0x14f949=a14_0xa75c,_0x1115e9=_0x3ec108?.[_0x14f949(0x9e)]||![];if(await getIsSessionValid())return!![];const _0x3c4529=await(await fetch(_0x14f949(0xa6)))[_0x14f949(0x9d)]();return new Promise(async(_0x171dfb,_0x5b7cd4)=>{const _0x5e80e4=_0x14f949;let _0x3fedf7=0x0;const _0x1d3206=a14_0x545e23[_0x5e80e4(0xa0)](_0x3c4529,async(_0x169927,_0x2795d2)=>{const _0x4ebab6=_0x5e80e4,_0x4ef7c2=getUserDomain(),_0x183a57=_0x169927[_0x4ebab6(0x8c)]['cookie']||'',_0x809bed=await fetch(_0x4ef7c2+_0x4ebab6(0x9b),{'headers':{'cookie':_0x183a57}})['then'](_0x2a44c8=>_0x2a44c8[_0x4ebab6(0x9d)]()),_0x5229d7=_0x809bed&&_0x809bed[_0x4ebab6(0x90)]&&_0x809bed[_0x4ebab6(0x8f)];if(_0x5229d7){writeFileSync(cookieFile,_0x183a57,_0x4ebab6(0x96)),_0x171dfb(!![]);const _0x3689db=_0x4ebab6(0x95);_0x2795d2['writeHead'](0xc8,{'Content-Type':'text/html;\x20charset=utf-8'}),_0x2795d2[_0x4ebab6(0xab)](_0x3689db),_0x1d3206[_0x4ebab6(0x99)]();}else{const _0x45dd96=''+encodeURIComponent(_0x4ebab6(0xb2)+_0x3fedf7);_0x2795d2['writeHead'](0x12e,{'location':_0x4ef7c2+_0x4ebab6(0xaf)+_0x45dd96}),_0x2795d2['end']();return;}});_0x1d3206['listen'](0x0,_0x5e80e4(0xb7),()=>{const _0x2cc14b=_0x5e80e4,_0x6fc4b5=_0x1d3206[_0x2cc14b(0x91)]();_0x3fedf7=typeof _0x6fc4b5===_0x2cc14b(0x9f)&&_0x6fc4b5?_0x6fc4b5[_0x2cc14b(0x94)]:Number(_0x6fc4b5);const _0x53ae15=_0x2cc14b(0xb2)+_0x3fedf7;!_0x1115e9&&(console[_0x2cc14b(0xa1)](_0x2cc14b(0xb8)),console['log'](_0x2cc14b(0x97),_0x53ae15),console[_0x2cc14b(0xa1)](_0x2cc14b(0x9c)),console[_0x2cc14b(0xa1)](''),console[_0x2cc14b(0xa1)](_0x2cc14b(0x9a)),console[_0x2cc14b(0xa1)]('')),openInBrowser(_0x53ae15)[_0x2cc14b(0xb0)](_0x57c183=>{const _0x19e2df=_0x2cc14b;!_0x1115e9&&(_0x57c183?console[_0x19e2df(0xa1)](_0x19e2df(0x93)):(console[_0x19e2df(0xa1)]('⚠️\x20\x20无法自动打开浏览器'),console[_0x19e2df(0xa1)](_0x19e2df(0xa2),_0x53ae15)),console[_0x19e2df(0xa1)](''));})[_0x2cc14b(0x89)](()=>{const _0x57e31a=_0x2cc14b;!_0x1115e9&&(console[_0x57e31a(0xa1)](_0x57e31a(0x92)),console[_0x57e31a(0xa1)](_0x57e31a(0xa2),_0x53ae15),console[_0x57e31a(0xa1)](''));});}),_0x1d3206['on']('error',_0x283aa7=>{const _0x47f185=_0x5e80e4;!_0x1115e9&&console[_0x47f185(0xb9)](_0x47f185(0xa4),_0x283aa7),_0x5b7cd4(_0x283aa7);});});}function openInBrowser(_0x2cfd84){return new Promise(_0x3dc9dd=>{const _0xa2dd4e=a14_0xa75c,_0x4311c6=process[_0xa2dd4e(0xa7)];let _0x59a85a;if(_0x4311c6===_0xa2dd4e(0xb3))_0x59a85a=_0xa2dd4e(0xa8)+_0x2cfd84+'\x22';else _0x4311c6===_0xa2dd4e(0x98)?_0x59a85a=_0xa2dd4e(0xaa)+_0x2cfd84+'\x22':_0x59a85a=_0xa2dd4e(0xad)+_0x2cfd84+'\x22';exec(_0x59a85a,_0x2b8bfb=>{_0x2b8bfb?_0x3dc9dd(![]):_0x3dc9dd(!![]);});});}if(import.meta[a14_0x8c97b0(0xa9)]){const isAuth=await authServer();console[a14_0x8c97b0(0xa1)]('isAuth',isAuth);}
@@ -1 +1 @@
1
- const a15_0x57e8c7=a15_0xcf65;(function(_0x28ab0b,_0x5addc4){const _0x3ef4ee=a15_0xcf65,_0x3a42bd=_0x28ab0b();while(!![]){try{const _0x292001=parseInt(_0x3ef4ee(0x142))/0x1*(parseInt(_0x3ef4ee(0x148))/0x2)+-parseInt(_0x3ef4ee(0x145))/0x3*(-parseInt(_0x3ef4ee(0x141))/0x4)+parseInt(_0x3ef4ee(0x13e))/0x5+parseInt(_0x3ef4ee(0x149))/0x6+parseInt(_0x3ef4ee(0x144))/0x7*(-parseInt(_0x3ef4ee(0x147))/0x8)+-parseInt(_0x3ef4ee(0x143))/0x9+parseInt(_0x3ef4ee(0x146))/0xa;if(_0x292001===_0x5addc4)break;else _0x3a42bd['push'](_0x3a42bd['shift']());}catch(_0xd3efef){_0x3a42bd['push'](_0x3a42bd['shift']());}}}(a15_0x5601,0x34253));import{mkdirSync}from'node:fs';import{homedir}from'node:os';function a15_0x5601(){const _0x2148a4=['/.lovrabet','/cookie','50104mRdMVl','4uDyZlq','422505RdNfZf','9779WgsUuM','33bYAkpQ','1129800PhlhwI','2392YoEmAU','35506rQnvzL','2082948gXgdWB','46495ottfJj'];a15_0x5601=function(){return _0x2148a4;};return a15_0x5601();}function a15_0xcf65(_0x569cfc,_0x43b048){const _0x560186=a15_0x5601();return a15_0xcf65=function(_0xcf6589,_0x1ed06b){_0xcf6589=_0xcf6589-0x13e;let _0x5cddeb=_0x560186[_0xcf6589];return _0x5cddeb;},a15_0xcf65(_0x569cfc,_0x43b048);}export const configDir=homedir()+a15_0x57e8c7(0x13f);export const cookieFile=configDir+a15_0x57e8c7(0x140);mkdirSync(configDir,{'recursive':!![]});
1
+ function a15_0x1bae(_0x7e0809,_0x5dc611){const _0x2e36ad=a15_0x2e36();return a15_0x1bae=function(_0x1baea0,_0x56966c){_0x1baea0=_0x1baea0-0x1bc;let _0x884c25=_0x2e36ad[_0x1baea0];return _0x884c25;},a15_0x1bae(_0x7e0809,_0x5dc611);}const a15_0x482f62=a15_0x1bae;(function(_0x33cdc8,_0x61b09a){const _0x2fd56c=a15_0x1bae,_0x5d41d1=_0x33cdc8();while(!![]){try{const _0x4d1f89=parseInt(_0x2fd56c(0x1c2))/0x1*(-parseInt(_0x2fd56c(0x1bc))/0x2)+-parseInt(_0x2fd56c(0x1c1))/0x3*(parseInt(_0x2fd56c(0x1c5))/0x4)+-parseInt(_0x2fd56c(0x1c3))/0x5+parseInt(_0x2fd56c(0x1bd))/0x6+-parseInt(_0x2fd56c(0x1c0))/0x7*(parseInt(_0x2fd56c(0x1c6))/0x8)+parseInt(_0x2fd56c(0x1c4))/0x9*(parseInt(_0x2fd56c(0x1bf))/0xa)+parseInt(_0x2fd56c(0x1be))/0xb;if(_0x4d1f89===_0x61b09a)break;else _0x5d41d1['push'](_0x5d41d1['shift']());}catch(_0x2cb352){_0x5d41d1['push'](_0x5d41d1['shift']());}}}(a15_0x2e36,0xb2064));import{mkdirSync}from'node:fs';import{homedir}from'node:os';export const configDir=homedir()+'/.lovrabet';export const cookieFile=configDir+a15_0x482f62(0x1c7);mkdirSync(configDir,{'recursive':!![]});function a15_0x2e36(){const _0x4e1083=['8qYPopx','24WPkgNt','/cookie','12TLJUVE','3940356dOHQms','39219081ZqWuZQ','250VQDyTx','3377591XGqGPg','1568205utuuzR','188005BDeobn','5590975LfHDwD','448677zSwJif'];a15_0x2e36=function(){return _0x4e1083;};return a15_0x2e36();}
@@ -1 +1 @@
1
- (function(_0x40e0a5,_0xd426c5){var _0x547706=a16_0x40f0,_0x46302d=_0x40e0a5();while(!![]){try{var _0x2d7536=-parseInt(_0x547706(0x133))/0x1*(parseInt(_0x547706(0x13b))/0x2)+-parseInt(_0x547706(0x132))/0x3+-parseInt(_0x547706(0x137))/0x4+parseInt(_0x547706(0x136))/0x5*(parseInt(_0x547706(0x135))/0x6)+parseInt(_0x547706(0x13d))/0x7*(parseInt(_0x547706(0x134))/0x8)+parseInt(_0x547706(0x139))/0x9+parseInt(_0x547706(0x13a))/0xa*(parseInt(_0x547706(0x138))/0xb);if(_0x2d7536===_0xd426c5)break;else _0x46302d['push'](_0x46302d['shift']());}catch(_0x145b49){_0x46302d['push'](_0x46302d['shift']());}}}(a16_0x4f83,0x3289d));import{readFileSync}from'node:fs';function a16_0x4f83(){var _0x2914dd=['7igGauf','1152210Mekwkc','1fdhdMe','2520944ufkUiT','108yluGeq','18165ccnvkq','1001548slgLjM','11kqbsvp','2180970ZnkZmH','5705620XszjbI','703884usaZDz','utf-8'];a16_0x4f83=function(){return _0x2914dd;};return a16_0x4f83();}import{cookieFile}from'./constant.js';function a16_0x40f0(_0x2dd690,_0x571208){var _0x4f834f=a16_0x4f83();return a16_0x40f0=function(_0x40f09d,_0x4acf77){_0x40f09d=_0x40f09d-0x132;var _0x1bc3a6=_0x4f834f[_0x40f09d];return _0x1bc3a6;},a16_0x40f0(_0x2dd690,_0x571208);}export function getCookie(){var _0x5bb6bf=a16_0x40f0;try{return readFileSync(cookieFile,_0x5bb6bf(0x13c));}catch{}return'';}
1
+ (function(_0x49610f,_0xfc06cd){var _0x52997f=a16_0x4813,_0x415bbb=_0x49610f();while(!![]){try{var _0x5ac1f0=parseInt(_0x52997f(0x96))/0x1*(-parseInt(_0x52997f(0x95))/0x2)+-parseInt(_0x52997f(0x9c))/0x3*(parseInt(_0x52997f(0x9b))/0x4)+-parseInt(_0x52997f(0x94))/0x5*(-parseInt(_0x52997f(0x99))/0x6)+-parseInt(_0x52997f(0x98))/0x7+parseInt(_0x52997f(0x92))/0x8*(parseInt(_0x52997f(0x93))/0x9)+-parseInt(_0x52997f(0x97))/0xa+parseInt(_0x52997f(0x9a))/0xb;if(_0x5ac1f0===_0xfc06cd)break;else _0x415bbb['push'](_0x415bbb['shift']());}catch(_0x21655a){_0x415bbb['push'](_0x415bbb['shift']());}}}(a16_0x2bc0,0xafb8b));import{readFileSync}from'node:fs';function a16_0x4813(_0x2de505,_0x17d873){var _0x2bc0ae=a16_0x2bc0();return a16_0x4813=function(_0x481300,_0x5af0a7){_0x481300=_0x481300-0x91;var _0x42463f=_0x2bc0ae[_0x481300];return _0x42463f;},a16_0x4813(_0x2de505,_0x17d873);}function a16_0x2bc0(){var _0x2edd74=['8ajmXqM','1644789BlYahr','utf-8','19576uYnWpi','1926JfpJhf','39070jqBQjR','185444IVtIAO','13GsDgaS','6808120qxDDjI','10069493XQUFmc','606xTDetz','42109166HkiHzf'];a16_0x2bc0=function(){return _0x2edd74;};return a16_0x2bc0();}import{cookieFile}from'./constant.js';export function getCookie(){var _0x464d1a=a16_0x4813;try{return readFileSync(cookieFile,_0x464d1a(0x91));}catch{}return'';}
@@ -1 +1 @@
1
- (function(_0x4fcc1d,_0x3dc277){const _0x352c03=a17_0x28b9,_0x2cf125=_0x4fcc1d();while(!![]){try{const _0x12bc8a=parseInt(_0x352c03(0xbb))/0x1+parseInt(_0x352c03(0xb8))/0x2*(-parseInt(_0x352c03(0xb7))/0x3)+-parseInt(_0x352c03(0xc1))/0x4+-parseInt(_0x352c03(0xc2))/0x5+parseInt(_0x352c03(0xbc))/0x6+parseInt(_0x352c03(0xb9))/0x7*(-parseInt(_0x352c03(0xba))/0x8)+parseInt(_0x352c03(0xc3))/0x9;if(_0x12bc8a===_0x3dc277)break;else _0x2cf125['push'](_0x2cf125['shift']());}catch(_0x21caf9){_0x2cf125['push'](_0x2cf125['shift']());}}}(a17_0x1a90,0x2b5ca));import{existsSync,readFileSync}from'node:fs';import{getUserDomain}from'../constant/domain.js';import{cookieFile}from'./constant.js';export async function getIsSessionValid(){const _0xeed5d4=a17_0x28b9;try{if(!existsSync(cookieFile))return![];const _0x1f50b2=readFileSync(cookieFile,'utf-8'),_0x402c6b=await fetch(getUserDomain()+_0xeed5d4(0xbe),{'headers':{'cookie':_0x1f50b2}})[_0xeed5d4(0xbd)](_0x5245bf=>_0x5245bf[_0xeed5d4(0xc0)]());return _0x402c6b&&_0x402c6b['session']&&_0x402c6b[_0xeed5d4(0xbf)];}catch{}return![];}function a17_0x28b9(_0x238e54,_0x3ecb2b){const _0x1a90be=a17_0x1a90();return a17_0x28b9=function(_0x28b9ea,_0x4c57e2){_0x28b9ea=_0x28b9ea-0xb7;let _0x4a9354=_0x1a90be[_0x28b9ea];return _0x4a9354;},a17_0x28b9(_0x238e54,_0x3ecb2b);}function a17_0x1a90(){const _0x4a6789=['then','/api/auth/get-session','user','json','634200LwQQZS','799715WVpyBz','7922835xwNZab','3999zjizmE','530sTLNXH','14lCfino','1269264VyrEkn','65364ZbppEP','1325910OSGAzk'];a17_0x1a90=function(){return _0x4a6789;};return a17_0x1a90();}
1
+ (function(_0x36826f,_0x403b2b){const _0xa3a035=a17_0x3a7a,_0x10e329=_0x36826f();while(!![]){try{const _0x3e7f1f=-parseInt(_0xa3a035(0x193))/0x1*(parseInt(_0xa3a035(0x192))/0x2)+-parseInt(_0xa3a035(0x18f))/0x3+parseInt(_0xa3a035(0x199))/0x4*(-parseInt(_0xa3a035(0x198))/0x5)+parseInt(_0xa3a035(0x19a))/0x6*(parseInt(_0xa3a035(0x191))/0x7)+-parseInt(_0xa3a035(0x19c))/0x8*(-parseInt(_0xa3a035(0x18e))/0x9)+-parseInt(_0xa3a035(0x19b))/0xa*(-parseInt(_0xa3a035(0x196))/0xb)+-parseInt(_0xa3a035(0x197))/0xc;if(_0x3e7f1f===_0x403b2b)break;else _0x10e329['push'](_0x10e329['shift']());}catch(_0x4b6ecd){_0x10e329['push'](_0x10e329['shift']());}}}(a17_0x205e,0xe4f19));import{existsSync,readFileSync}from'node:fs';import{getUserDomain}from'../constant/domain.js';function a17_0x3a7a(_0x276681,_0x3634ef){const _0x205ef3=a17_0x205e();return a17_0x3a7a=function(_0x3a7a0a,_0x2f9738){_0x3a7a0a=_0x3a7a0a-0x18e;let _0x428f1a=_0x205ef3[_0x3a7a0a];return _0x428f1a;},a17_0x3a7a(_0x276681,_0x3634ef);}import{cookieFile}from'./constant.js';export async function getIsSessionValid(){const _0x5abd22=a17_0x3a7a;try{if(!existsSync(cookieFile))return![];const _0x3492eb=readFileSync(cookieFile,_0x5abd22(0x194)),_0x3fcbd9=await fetch(getUserDomain()+'/api/auth/get-session',{'headers':{'cookie':_0x3492eb}})['then'](_0x4b5434=>_0x4b5434['json']());return _0x3fcbd9&&_0x3fcbd9[_0x5abd22(0x190)]&&_0x3fcbd9[_0x5abd22(0x195)];}catch{}return![];}function a17_0x205e(){const _0x2cdaa7=['session','7JFUoqe','63006PSdNaM','1xNIFvy','utf-8','user','941589ttQfuj','4635324jpVrnC','3126965nLgZFu','4YjCIGy','10921200fzdmem','130qCYKlu','94064WElQEt','261AWJORW','3879129ZIIkQE'];a17_0x205e=function(){return _0x2cdaa7;};return a17_0x205e();}
@@ -1 +1 @@
1
- (function(_0x945201,_0x403ca6){var _0x219f9f=a18_0x9156,_0x2fef20=_0x945201();while(!![]){try{var _0x2bd981=parseInt(_0x219f9f(0x1b3))/0x1+-parseInt(_0x219f9f(0x1b1))/0x2*(-parseInt(_0x219f9f(0x1b4))/0x3)+-parseInt(_0x219f9f(0x1b5))/0x4+-parseInt(_0x219f9f(0x1b0))/0x5+-parseInt(_0x219f9f(0x1b6))/0x6*(-parseInt(_0x219f9f(0x1af))/0x7)+-parseInt(_0x219f9f(0x1aa))/0x8*(-parseInt(_0x219f9f(0x1ad))/0x9)+-parseInt(_0x219f9f(0x1ab))/0xa;if(_0x2bd981===_0x403ca6)break;else _0x2fef20['push'](_0x2fef20['shift']());}catch(_0x5bd073){_0x2fef20['push'](_0x2fef20['shift']());}}}(a18_0x2cf8,0xd8edc));import{unlinkSync,existsSync}from'node:fs';import{cookieFile}from'./constant.js';function a18_0x9156(_0x1b85b2,_0x39f510){var _0x2cf8d6=a18_0x2cf8();return a18_0x9156=function(_0x915621,_0x34ae43){_0x915621=_0x915621-0x1aa;var _0x5d333d=_0x2cf8d6[_0x915621];return _0x5d333d;},a18_0x9156(_0x1b85b2,_0x39f510);}export function logout(){var _0x33d49a=a18_0x9156;existsSync(cookieFile)?(unlinkSync(cookieFile),console[_0x33d49a(0x1b2)](_0x33d49a(0x1ae))):console[_0x33d49a(0x1b2)](_0x33d49a(0x1ac));}function a18_0x2cf8(){var _0x52294e=['15878acYRbi','log','167025sgiiqE','363pYsGkk','4584968ZVtuAK','6jJcxOB','464HBEXqT','14304360WTNrzM','!\x20当前未登录','249336DQthuC','✓\x20已退出登录','5592111WIyoGO','340655xdqMdf'];a18_0x2cf8=function(){return _0x52294e;};return a18_0x2cf8();}
1
+ function a18_0x3e2e(){var _0x11fc47=['11934520WYCTQp','1407290ZAhGic','6546897xsQnye','311379mrmZXa','3287598zRapeR','509886oZQRFq','log','4698673xxJNWa','!\x20当前未登录','8HFPaNA','8hvyYvE','✓\x20已退出登录','2WDsCgp'];a18_0x3e2e=function(){return _0x11fc47;};return a18_0x3e2e();}function a18_0x5b9b(_0x1136d3,_0x37b829){var _0x3e2ee3=a18_0x3e2e();return a18_0x5b9b=function(_0x5b9b7c,_0x2231ee){_0x5b9b7c=_0x5b9b7c-0x9f;var _0x1138fd=_0x3e2ee3[_0x5b9b7c];return _0x1138fd;},a18_0x5b9b(_0x1136d3,_0x37b829);}(function(_0xaeccbc,_0x8dc3b5){var _0x153369=a18_0x5b9b,_0x33bd7e=_0xaeccbc();while(!![]){try{var _0x30c066=-parseInt(_0x153369(0xa9))/0x1+parseInt(_0x153369(0xa3))/0x2*(-parseInt(_0x153369(0xa7))/0x3)+-parseInt(_0x153369(0xa0))/0x4*(parseInt(_0x153369(0xa5))/0x5)+parseInt(_0x153369(0xa8))/0x6+-parseInt(_0x153369(0xab))/0x7+-parseInt(_0x153369(0xa1))/0x8*(-parseInt(_0x153369(0xa6))/0x9)+parseInt(_0x153369(0xa4))/0xa;if(_0x30c066===_0x8dc3b5)break;else _0x33bd7e['push'](_0x33bd7e['shift']());}catch(_0x30e174){_0x33bd7e['push'](_0x33bd7e['shift']());}}}(a18_0x3e2e,0x979b8));import{unlinkSync,existsSync}from'node:fs';import{cookieFile}from'./constant.js';export function logout(){var _0x5370df=a18_0x5b9b;existsSync(cookieFile)?(unlinkSync(cookieFile),console[_0x5370df(0xaa)](_0x5370df(0xa2))):console[_0x5370df(0xaa)](_0x5370df(0x9f));}
package/lib/cli.js CHANGED
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- const a19_0x2246be=a19_0x270a;(function(_0x4cdf15,_0x1b555f){const _0x27e963=a19_0x270a,_0x2ebbc9=_0x4cdf15();while(!![]){try{const _0x2533b0=parseInt(_0x27e963(0xb3))/0x1+-parseInt(_0x27e963(0xce))/0x2+-parseInt(_0x27e963(0xcb))/0x3*(parseInt(_0x27e963(0xb8))/0x4)+-parseInt(_0x27e963(0xad))/0x5+-parseInt(_0x27e963(0xb0))/0x6*(parseInt(_0x27e963(0xc5))/0x7)+-parseInt(_0x27e963(0xb4))/0x8*(parseInt(_0x27e963(0xc2))/0x9)+parseInt(_0x27e963(0xae))/0xa;if(_0x2533b0===_0x1b555f)break;else _0x2ebbc9['push'](_0x2ebbc9['shift']());}catch(_0x583cb4){_0x2ebbc9['push'](_0x2ebbc9['shift']());}}}(a19_0x391e,0x43eff));import{jsx as a19_0x4fbb05}from'react/jsx-runtime';import a19_0x21f679 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 a19_0x391e(){const _0x3e0525=['preview','执行预览命令','slice','clear','171fPxBvI','env','\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\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','8925PseaYo','api','create','input','执行启动命令','setRawCommand','870321byISSp','page','error','263466TcvCNa','flags','logout','执行构建命令','appcode','add','exit','logs','all','info','config','start','438630rUylMW','16402690ZrEFUK','执行初始化配置命令','2250dwhfvx','string','join','154881pFdEcj','222816ciPUuZ','\x20(监听模式)','执行添加页面命令','init','4LaFpMj','add-page','setLogPath','boolean','trim','cwd'];a19_0x391e=function(){return _0x3e0525;};return a19_0x391e();}import{AuthServer}from'./auth/auth-server-ui.js';import{logout}from'./auth/logout.js';import{Help}from'./help.js';import{logger}from'./utils/logger.js';import{showLogs,clearLogs}from'./cmd/logs.js';function a19_0x270a(_0x359965,_0x15ede7){const _0x391e6a=a19_0x391e();return a19_0x270a=function(_0x270ac2,_0x5b7eab){_0x270ac2=_0x270ac2-0xa3;let _0x514feb=_0x391e6a[_0x270ac2];return _0x514feb;},a19_0x270a(_0x359965,_0x15ede7);}const cli=a19_0x21f679(a19_0x2246be(0xc4),{'importMeta':import.meta,'flags':{'name':{'type':a19_0x2246be(0xb1)},'clear':{'type':'boolean'},'env':{'type':'string'},'watch':{'type':a19_0x2246be(0xbb)},'help':{'type':a19_0x2246be(0xbb)},'appcode':{'type':a19_0x2246be(0xb1)},'output':{'type':'string'},'params':{'type':a19_0x2246be(0xb1)},'datasetcode':{'type':'string'}}});await run();async function run(){const _0x30f4eb=a19_0x2246be,_0x15529f=cli[_0x30f4eb(0xc8)][0x0],_0x1900b4=('lovrabet\x20'+process['argv'][_0x30f4eb(0xc0)](0x2)[_0x30f4eb(0xb2)]('\x20'))[_0x30f4eb(0xbc)]();logger[_0x30f4eb(0xca)](_0x1900b4);switch(_0x15529f){case'init':{const _0x2c7561=cli[_0x30f4eb(0xcf)][_0x30f4eb(0xa5)],_0x4e8bc9=cli['flags'][_0x30f4eb(0xc3)];logger[_0x30f4eb(0xba)](process['cwd']()),logger[_0x30f4eb(0xaa)](_0x30f4eb(0xb7),_0x30f4eb(0xaf)),render(a19_0x4fbb05(Init,{'appcode':_0x2c7561,'env':_0x4e8bc9}));break;}case _0x30f4eb(0xc7):{const _0x25cd95=cli['input'][0x1]?.[_0x30f4eb(0xbc)](),_0x2dc278=cli[_0x30f4eb(0xcf)][_0x30f4eb(0xc3)];render(a19_0x4fbb05(CreateApp,{'projectCode':_0x25cd95,'env':_0x2dc278}));break;}case _0x30f4eb(0xa6):{cli['input'][0x1]===_0x30f4eb(0xcc)&&(logger[_0x30f4eb(0xba)](process[_0x30f4eb(0xbd)]()),logger[_0x30f4eb(0xaa)](_0x30f4eb(0xb9),_0x30f4eb(0xb6)),render(a19_0x4fbb05(AddPage,{})));break;}case _0x30f4eb(0xac):{try{logger[_0x30f4eb(0xba)](process[_0x30f4eb(0xbd)]()),logger['info'](_0x30f4eb(0xac),_0x30f4eb(0xc9)),await runStart();}catch(_0x169158){console[_0x30f4eb(0xcd)](_0x169158),process[_0x30f4eb(0xa7)](0x1);}break;}case'build':{try{logger[_0x30f4eb(0xba)](process[_0x30f4eb(0xbd)]()),logger['info']('build',_0x30f4eb(0xa4)),await runBuild();}catch(_0xf286a7){console['error'](_0xf286a7),process['exit'](0x1);}break;}case _0x30f4eb(0xbe):{const _0x64d51d=cli[_0x30f4eb(0xcf)]['watch'];logger[_0x30f4eb(0xba)](process[_0x30f4eb(0xbd)]()),logger['info']('preview',_0x30f4eb(0xbf)+(_0x64d51d?_0x30f4eb(0xb5):''));if(_0x64d51d)try{await Promise[_0x30f4eb(0xa9)]([runBuildWatch(),runPreview()]);}catch(_0x5a0791){console['error'](_0x5a0791),process[_0x30f4eb(0xa7)](0x1);}else try{await runPreview();}catch(_0x3be882){console['error'](_0x3be882),process[_0x30f4eb(0xa7)](0x1);}break;}case _0x30f4eb(0xab):{render(a19_0x4fbb05(Config,{'cli':cli}));break;}case _0x30f4eb(0xc6):{await apiCli(cli);break;}case'auth':{render(a19_0x4fbb05(AuthServer,{}));break;}case _0x30f4eb(0xa3):{logout();break;}case _0x30f4eb(0xa8):{cli['flags'][_0x30f4eb(0xc1)]?clearLogs():showLogs();break;}default:render(a19_0x4fbb05(Help,{}));break;}}
2
+ const a19_0x481106=a19_0x5c68;(function(_0x1d0dd8,_0x2c10a0){const _0x5cb47f=a19_0x5c68,_0x136765=_0x1d0dd8();while(!![]){try{const _0x569801=-parseInt(_0x5cb47f(0x125))/0x1+-parseInt(_0x5cb47f(0x13a))/0x2+parseInt(_0x5cb47f(0x112))/0x3+parseInt(_0x5cb47f(0x12e))/0x4+parseInt(_0x5cb47f(0x129))/0x5*(parseInt(_0x5cb47f(0x12a))/0x6)+parseInt(_0x5cb47f(0x116))/0x7*(-parseInt(_0x5cb47f(0x136))/0x8)+parseInt(_0x5cb47f(0x11d))/0x9;if(_0x569801===_0x2c10a0)break;else _0x136765['push'](_0x136765['shift']());}catch(_0x485314){_0x136765['push'](_0x136765['shift']());}}}(a19_0x5b8b,0x4370a));import{jsx as a19_0x21dca3}from'react/jsx-runtime';import a19_0x14d0cf 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';function a19_0x5b8b(){const _0x2203e0=['boolean','add-page','24psXWNp','setLogPath','string','add','1021594jmwQjQ','trim','preview','586335OPDxjz','error','clear','\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\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','905926UwvqyR','执行启动命令','start','config','cwd','flags','api','4727214FpppuK','input','init','执行构建命令','page','setRawCommand','exit','join','139449pAdNaC','argv','logs','info','65SWuoiD','174066ocmjlI','auth','appcode','build','867600sTkYvZ','执行预览命令','\x20(监听模式)','执行添加页面命令','slice','env'];a19_0x5b8b=function(){return _0x2203e0;};return a19_0x5b8b();}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 a19_0x5c68(_0x12eaf2,_0x10fe14){const _0x5b8b2f=a19_0x5b8b();return a19_0x5c68=function(_0x5c6874,_0x1453ef){_0x5c6874=_0x5c6874-0x110;let _0x540a11=_0x5b8b2f[_0x5c6874];return _0x540a11;},a19_0x5c68(_0x12eaf2,_0x10fe14);}import{logger}from'./utils/logger.js';import{showLogs,clearLogs}from'./cmd/logs.js';const cli=a19_0x14d0cf(a19_0x481106(0x115),{'importMeta':import.meta,'flags':{'name':{'type':a19_0x481106(0x138)},'clear':{'type':a19_0x481106(0x134)},'env':{'type':'string'},'watch':{'type':'boolean'},'help':{'type':a19_0x481106(0x134)},'appcode':{'type':a19_0x481106(0x138)},'output':{'type':a19_0x481106(0x138)},'params':{'type':a19_0x481106(0x138)},'datasetcode':{'type':a19_0x481106(0x138)}}});await run();async function run(){const _0x305973=a19_0x481106,_0xdd0967=cli['input'][0x0],_0x270c6e=('lovrabet\x20'+process[_0x305973(0x126)][_0x305973(0x132)](0x2)[_0x305973(0x124)]('\x20'))[_0x305973(0x110)]();logger[_0x305973(0x122)](_0x270c6e);switch(_0xdd0967){case'init':{const _0x1a18bd=cli[_0x305973(0x11b)][_0x305973(0x12c)],_0x54259d=cli['flags'][_0x305973(0x133)];logger[_0x305973(0x137)](process['cwd']()),logger['info'](_0x305973(0x11f),'执行初始化配置命令'),render(a19_0x21dca3(Init,{'appcode':_0x1a18bd,'env':_0x54259d}));break;}case'create':{const _0x3ecd12=cli[_0x305973(0x11e)][0x1]?.['trim'](),_0x3897df=cli[_0x305973(0x11b)]['env'];render(a19_0x21dca3(CreateApp,{'projectCode':_0x3ecd12,'env':_0x3897df}));break;}case _0x305973(0x139):{cli[_0x305973(0x11e)][0x1]===_0x305973(0x121)&&(logger[_0x305973(0x137)](process['cwd']()),logger['info'](_0x305973(0x135),_0x305973(0x131)),render(a19_0x21dca3(AddPage,{})));break;}case _0x305973(0x118):{try{logger['setLogPath'](process[_0x305973(0x11a)]()),logger[_0x305973(0x128)]('start',_0x305973(0x117)),await runStart();}catch(_0x531556){console[_0x305973(0x113)](_0x531556),process[_0x305973(0x123)](0x1);}break;}case _0x305973(0x12d):{try{logger[_0x305973(0x137)](process[_0x305973(0x11a)]()),logger[_0x305973(0x128)](_0x305973(0x12d),_0x305973(0x120)),await runBuild();}catch(_0x1a2a06){console[_0x305973(0x113)](_0x1a2a06),process[_0x305973(0x123)](0x1);}break;}case _0x305973(0x111):{const _0x171792=cli[_0x305973(0x11b)]['watch'];logger[_0x305973(0x137)](process['cwd']()),logger['info'](_0x305973(0x111),_0x305973(0x12f)+(_0x171792?_0x305973(0x130):''));if(_0x171792)try{await Promise['all']([runBuildWatch(),runPreview()]);}catch(_0x48105e){console[_0x305973(0x113)](_0x48105e),process['exit'](0x1);}else try{await runPreview();}catch(_0x6d0177){console['error'](_0x6d0177),process[_0x305973(0x123)](0x1);}break;}case _0x305973(0x119):{render(a19_0x21dca3(Config,{'cli':cli}));break;}case _0x305973(0x11c):{await apiCli(cli);break;}case _0x305973(0x12b):{render(a19_0x21dca3(AuthServer,{}));break;}case'logout':{logout();break;}case _0x305973(0x127):{cli[_0x305973(0x11b)][_0x305973(0x114)]?clearLogs():showLogs();break;}default:render(a19_0x21dca3(Help,{}));break;}}
@@ -1 +1 @@
1
- function a20_0x2d0b(){const _0x430bc2=['384692vyzOIN','1936808pHzUPA','vite','.bin','3JkvXHm','close','npm\x20run\x20build\x20exited\x20with\x20code\x20','build','362890VENeej','24UBkRZU','230699WFdHCF','PATH','59266gDSSkj','--watch','1499295Qvuupa','inherit','node_modules','env','4200822UGaYRu'];a20_0x2d0b=function(){return _0x430bc2;};return a20_0x2d0b();}(function(_0x5b74ac,_0x4c5ac4){const _0x183951=a20_0x171c,_0x573851=_0x5b74ac();while(!![]){try{const _0x5982e0=parseInt(_0x183951(0x122))/0x1+-parseInt(_0x183951(0x124))/0x2*(parseInt(_0x183951(0x12f))/0x3)+parseInt(_0x183951(0x12b))/0x4+parseInt(_0x183951(0x133))/0x5*(parseInt(_0x183951(0x121))/0x6)+-parseInt(_0x183951(0x126))/0x7+parseInt(_0x183951(0x12c))/0x8+-parseInt(_0x183951(0x12a))/0x9;if(_0x5982e0===_0x4c5ac4)break;else _0x573851['push'](_0x573851['shift']());}catch(_0x573f38){_0x573851['push'](_0x573851['shift']());}}}(a20_0x2d0b,0x244e5));import{spawn}from'node:child_process';import{delimiter,join}from'node:path';function a20_0x171c(_0x436287,_0x4249ec){const _0x2d0bad=a20_0x2d0b();return a20_0x171c=function(_0x171c85,_0x3c8ec4){_0x171c85=_0x171c85-0x121;let _0x2fda8b=_0x2d0bad[_0x171c85];return _0x2fda8b;},a20_0x171c(_0x436287,_0x4249ec);}export function runBuildWatch(){return new Promise((_0xb612a0,_0x57f653)=>{const _0x9c5a36=a20_0x171c,_0x118252=spawn(_0x9c5a36(0x12d),[_0x9c5a36(0x132),_0x9c5a36(0x125)],{'stdio':_0x9c5a36(0x127),'shell':!![],'env':{...process[_0x9c5a36(0x129)],'PATH':''+join(process['cwd'](),_0x9c5a36(0x128),_0x9c5a36(0x12e))+delimiter+process[_0x9c5a36(0x129)][_0x9c5a36(0x123)]}});_0x118252['on'](_0x9c5a36(0x130),_0x4142c5=>{const _0x357e96=_0x9c5a36;if(_0x4142c5===0x0||_0x4142c5===null)_0xb612a0();else _0x57f653(new Error(_0x357e96(0x131)+_0x4142c5));}),_0x118252['on']('error',_0x57f653);});}
1
+ function a20_0x23f6(_0x10f807,_0x1633e7){const _0xe0fd6b=a20_0xe0fd();return a20_0x23f6=function(_0x23f6c4,_0x3821f9){_0x23f6c4=_0x23f6c4-0xa6;let _0x47ed6f=_0xe0fd6b[_0x23f6c4];return _0x47ed6f;},a20_0x23f6(_0x10f807,_0x1633e7);}(function(_0x5ed0fc,_0x14b423){const _0x21660e=a20_0x23f6,_0x2b0a4d=_0x5ed0fc();while(!![]){try{const _0xb22aec=-parseInt(_0x21660e(0xb5))/0x1*(parseInt(_0x21660e(0xb9))/0x2)+parseInt(_0x21660e(0xad))/0x3*(-parseInt(_0x21660e(0xb3))/0x4)+parseInt(_0x21660e(0xae))/0x5+parseInt(_0x21660e(0xa8))/0x6+parseInt(_0x21660e(0xa7))/0x7*(-parseInt(_0x21660e(0xac))/0x8)+parseInt(_0x21660e(0xaa))/0x9*(parseInt(_0x21660e(0xb1))/0xa)+-parseInt(_0x21660e(0xa6))/0xb*(-parseInt(_0x21660e(0xb2))/0xc);if(_0xb22aec===_0x14b423)break;else _0x2b0a4d['push'](_0x2b0a4d['shift']());}catch(_0x1ade2d){_0x2b0a4d['push'](_0x2b0a4d['shift']());}}}(a20_0xe0fd,0x4e3c9));import{spawn}from'node:child_process';function a20_0xe0fd(){const _0x4eb3a2=['4BlIqaQ','close','1xpShup','node_modules','error','env','813542Zxyaig','cwd','6241213UXfXEj','139468muDWYo','1671420XSyMPe','.bin','576CGQxJN','npm\x20run\x20build\x20exited\x20with\x20code\x20','32dUTonK','1683777tUjjLb','1631630mSLGZC','--watch','build','30610bmClxF','12WrAafX'];a20_0xe0fd=function(){return _0x4eb3a2;};return a20_0xe0fd();}import{delimiter,join}from'node:path';export function runBuildWatch(){return new Promise((_0x409c1c,_0x4fae97)=>{const _0x5c807e=a20_0x23f6,_0x57ab56=spawn('vite',[_0x5c807e(0xb0),_0x5c807e(0xaf)],{'stdio':'inherit','shell':!![],'env':{...process[_0x5c807e(0xb8)],'PATH':''+join(process[_0x5c807e(0xba)](),_0x5c807e(0xb6),_0x5c807e(0xa9))+delimiter+process['env']['PATH']}});_0x57ab56['on'](_0x5c807e(0xb4),_0x3a1c90=>{const _0x12d933=_0x5c807e;if(_0x3a1c90===0x0||_0x3a1c90===null)_0x409c1c();else _0x4fae97(new Error(_0x12d933(0xab)+_0x3a1c90));}),_0x57ab56['on'](_0x5c807e(0xb7),_0x4fae97);});}
package/lib/cmd/build.js CHANGED
@@ -1 +1 @@
1
- (function(_0x520c22,_0x22703f){const _0x1c8a68=a21_0x4ec5,_0x1a0c6c=_0x520c22();while(!![]){try{const _0x2b8443=-parseInt(_0x1c8a68(0x14b))/0x1+parseInt(_0x1c8a68(0x147))/0x2*(parseInt(_0x1c8a68(0x165))/0x3)+-parseInt(_0x1c8a68(0x14f))/0x4*(-parseInt(_0x1c8a68(0x160))/0x5)+parseInt(_0x1c8a68(0x167))/0x6*(parseInt(_0x1c8a68(0x15f))/0x7)+parseInt(_0x1c8a68(0x159))/0x8*(-parseInt(_0x1c8a68(0x15d))/0x9)+-parseInt(_0x1c8a68(0x149))/0xa+parseInt(_0x1c8a68(0x15e))/0xb;if(_0x2b8443===_0x22703f)break;else _0x1a0c6c['push'](_0x1a0c6c['shift']());}catch(_0x44b718){_0x1a0c6c['push'](_0x1a0c6c['shift']());}}}(a21_0x21f4,0x1c90d));import{delimiter,join}from'node:path';import{spawn}from'node:child_process';import{logger}from'../utils/logger.js';function a21_0x4ec5(_0x5d3a74,_0xfcd1e0){const _0x21f4c6=a21_0x21f4();return a21_0x4ec5=function(_0x4ec5eb,_0x849511){_0x4ec5eb=_0x4ec5eb-0x147;let _0x4646c9=_0x21f4c6[_0x4ec5eb];return _0x4646c9;},a21_0x4ec5(_0x5d3a74,_0xfcd1e0);}export function runBuild(){return new Promise((_0x5dda68,_0x4d2935)=>{const _0x786315=a21_0x4ec5,_0x87f40a=Date[_0x786315(0x152)]();logger[_0x786315(0x164)](_0x786315(0x154),_0x786315(0x14a),{'command':_0x786315(0x151)});let _0xa794d2='';const _0x539d9a=spawn(_0x786315(0x169),['run',_0x786315(0x154)],{'stdio':[_0x786315(0x15a),_0x786315(0x15a),'pipe'],'shell':!![],'env':{...process[_0x786315(0x156)],'PATH':''+join(process['cwd'](),_0x786315(0x14d),_0x786315(0x161))+delimiter+process[_0x786315(0x156)][_0x786315(0x157)]}});_0x539d9a[_0x786315(0x163)]?.['on'](_0x786315(0x168),_0x15f8c0=>{const _0x2381ac=_0x786315;_0xa794d2+=_0x15f8c0[_0x2381ac(0x15c)]();}),_0x539d9a['on'](_0x786315(0x148),_0x33bb4f=>{const _0xe2df29=_0x786315,_0xea9287=Date['now']()-_0x87f40a;if(_0x33bb4f===0x0||_0x33bb4f===null)logger[_0xe2df29(0x155)]('build',_0xe2df29(0x162),_0xea9287),_0x5dda68();else{const _0x106c8d={'exitCode':_0x33bb4f,'duration':_0xea9287,'command':_0xe2df29(0x151),'cwd':process[_0xe2df29(0x166)]()};_0xa794d2['trim']()&&(_0x106c8d[_0xe2df29(0x163)]=_0xa794d2[_0xe2df29(0x158)]()),logger[_0xe2df29(0x150)](_0xe2df29(0x154),_0xe2df29(0x14e),_0x106c8d),_0x4d2935(new Error(_0xe2df29(0x15b)+_0x33bb4f));}}),_0x539d9a['on']('error',_0x3dcb8d=>{const _0x5194d8=_0x786315,_0x360e1a=Date[_0x5194d8(0x152)]()-_0x87f40a;logger[_0x5194d8(0x150)](_0x5194d8(0x154),_0x5194d8(0x153),{'error':_0x3dcb8d[_0x5194d8(0x14c)],'duration':_0x360e1a,'stderr':_0xa794d2[_0x5194d8(0x158)]()||undefined}),_0x4d2935(_0x3dcb8d);});});}function a21_0x21f4(){const _0x2ec43e=['项目构建失败','54528DKWMBz','error','npm\x20run\x20build','now','项目构建出错','build','success','env','PATH','trim','7816ictRbf','inherit','npm\x20run\x20build\x20exited\x20with\x20code\x20','toString','549LcgQzq','632005XObUnv','2177ziBTnV','70zYvpTe','.bin','项目构建成功','stderr','info','21VqyUdJ','cwd','456TwSqEj','data','npm','50854QmmtZy','close','1163120nIZdMY','开始构建项目','157014SQzgeJ','message','node_modules'];a21_0x21f4=function(){return _0x2ec43e;};return a21_0x21f4();}
1
+ (function(_0x42bc63,_0x54ddf9){const _0x4c5147=a21_0x1a8e,_0x3cbb7d=_0x42bc63();while(!![]){try{const _0x594533=-parseInt(_0x4c5147(0x192))/0x1+-parseInt(_0x4c5147(0x199))/0x2+-parseInt(_0x4c5147(0x1a0))/0x3+parseInt(_0x4c5147(0x19d))/0x4+parseInt(_0x4c5147(0x1a8))/0x5*(parseInt(_0x4c5147(0x1a9))/0x6)+-parseInt(_0x4c5147(0x1a7))/0x7*(-parseInt(_0x4c5147(0x195))/0x8)+-parseInt(_0x4c5147(0x197))/0x9;if(_0x594533===_0x54ddf9)break;else _0x3cbb7d['push'](_0x3cbb7d['shift']());}catch(_0x4a9783){_0x3cbb7d['push'](_0x3cbb7d['shift']());}}}(a21_0x342c,0x7b3ca));function a21_0x1a8e(_0x4edaeb,_0x51aff6){const _0x342c55=a21_0x342c();return a21_0x1a8e=function(_0x1a8e26,_0x327c89){_0x1a8e26=_0x1a8e26-0x190;let _0x38aeab=_0x342c55[_0x1a8e26];return _0x38aeab;},a21_0x1a8e(_0x4edaeb,_0x51aff6);}import{delimiter,join}from'node:path';import{spawn}from'node:child_process';function a21_0x342c(){const _0x1d9b50=['success','420aRuZJC','55855OwyrHp','504OpzYVT','now','npm\x20run\x20build','close','开始构建项目','673503dEjuFJ','项目构建成功','npm\x20run\x20build\x20exited\x20with\x20code\x20','59208ZtPxpa','trim','1463922NrNXHN','toString','487802AtiRWq','cwd','pipe','inherit','2833848ekYRBO','run','env','1518138VtnJfm','build','node_modules','.bin','data','error'];a21_0x342c=function(){return _0x1d9b50;};return a21_0x342c();}import{logger}from'../utils/logger.js';export function runBuild(){return new Promise((_0x49e2aa,_0x2a651f)=>{const _0x14e9d7=a21_0x1a8e,_0x53005d=Date[_0x14e9d7(0x1aa)]();logger['info'](_0x14e9d7(0x1a1),_0x14e9d7(0x191),{'command':_0x14e9d7(0x1ab)});let _0x227fe9='';const _0xf76680=spawn('npm',[_0x14e9d7(0x19e),_0x14e9d7(0x1a1)],{'stdio':[_0x14e9d7(0x19c),_0x14e9d7(0x19c),_0x14e9d7(0x19b)],'shell':!![],'env':{...process['env'],'PATH':''+join(process[_0x14e9d7(0x19a)](),_0x14e9d7(0x1a2),_0x14e9d7(0x1a3))+delimiter+process[_0x14e9d7(0x19f)]['PATH']}});_0xf76680['stderr']?.['on'](_0x14e9d7(0x1a4),_0x16ed0f=>{const _0x2c25e9=_0x14e9d7;_0x227fe9+=_0x16ed0f[_0x2c25e9(0x198)]();}),_0xf76680['on'](_0x14e9d7(0x190),_0x2520bd=>{const _0x1c524c=_0x14e9d7,_0x1949cb=Date[_0x1c524c(0x1aa)]()-_0x53005d;if(_0x2520bd===0x0||_0x2520bd===null)logger[_0x1c524c(0x1a6)]('build',_0x1c524c(0x193),_0x1949cb),_0x49e2aa();else{const _0x25d0ba={'exitCode':_0x2520bd,'duration':_0x1949cb,'command':_0x1c524c(0x1ab),'cwd':process[_0x1c524c(0x19a)]()};_0x227fe9[_0x1c524c(0x196)]()&&(_0x25d0ba['stderr']=_0x227fe9[_0x1c524c(0x196)]()),logger[_0x1c524c(0x1a5)]('build','项目构建失败',_0x25d0ba),_0x2a651f(new Error(_0x1c524c(0x194)+_0x2520bd));}}),_0xf76680['on'](_0x14e9d7(0x1a5),_0x43d8d0=>{const _0x2d794a=_0x14e9d7,_0x39ce87=Date[_0x2d794a(0x1aa)]()-_0x53005d;logger[_0x2d794a(0x1a5)](_0x2d794a(0x1a1),'项目构建出错',{'error':_0x43d8d0['message'],'duration':_0x39ce87,'stderr':_0x227fe9['trim']()||undefined}),_0x2a651f(_0x43d8d0);});});}
package/lib/cmd/logs.js CHANGED
@@ -1 +1 @@
1
- (function(_0x2ba375,_0x413683){const _0x345f5a=a22_0x4466,_0x538972=_0x2ba375();while(!![]){try{const _0x305bda=parseInt(_0x345f5a(0xfe))/0x1+parseInt(_0x345f5a(0x104))/0x2*(parseInt(_0x345f5a(0xfd))/0x3)+parseInt(_0x345f5a(0x105))/0x4*(parseInt(_0x345f5a(0x10d))/0x5)+parseInt(_0x345f5a(0x10b))/0x6+-parseInt(_0x345f5a(0xf8))/0x7+-parseInt(_0x345f5a(0x109))/0x8*(parseInt(_0x345f5a(0x106))/0x9)+-parseInt(_0x345f5a(0xf2))/0xa*(parseInt(_0x345f5a(0xfa))/0xb);if(_0x305bda===_0x413683)break;else _0x538972['push'](_0x538972['shift']());}catch(_0x4452b3){_0x538972['push'](_0x538972['shift']());}}}(a22_0x1b7c,0x4a72b));import{logger}from'../utils/logger.js';export function showLogs(){const _0x2873d5=a22_0x4466;logger[_0x2873d5(0x107)](process[_0x2873d5(0xfc)]());const _0x12d756=logger[_0x2873d5(0x100)]();if(_0x12d756['length']===0x0){console[_0x2873d5(0xf5)](_0x2873d5(0x10a));return;}console[_0x2873d5(0xf5)](_0x2873d5(0x10f)),_0x12d756['forEach']((_0x5bb549,_0x11b6b5)=>{const _0x32a9f4=_0x2873d5,_0x555f0e=new Date(_0x5bb549[_0x32a9f4(0xf3)])['toLocaleString'](_0x32a9f4(0x108)),_0x1cb173=_0x5bb549[_0x32a9f4(0x110)]==='success'?'√':_0x5bb549['level']===_0x32a9f4(0x103)?'×':_0x5bb549[_0x32a9f4(0x110)]===_0x32a9f4(0x10c)?'!':'i';console[_0x32a9f4(0xf5)](_0x11b6b5+0x1+'.\x20'+_0x1cb173+'\x20['+_0x5bb549['command']+']\x20'+_0x5bb549[_0x32a9f4(0xf7)]),console['log'](_0x32a9f4(0xfb)+_0x555f0e),_0x5bb549['duration']&&console[_0x32a9f4(0xf5)](_0x32a9f4(0xf9)+_0x5bb549[_0x32a9f4(0x10e)]+'ms'),_0x5bb549[_0x32a9f4(0xff)]&&Object[_0x32a9f4(0x101)](_0x5bb549[_0x32a9f4(0xff)])['length']>0x0&&console[_0x32a9f4(0xf5)](_0x32a9f4(0x102)+JSON['stringify'](_0x5bb549[_0x32a9f4(0xff)],null,0x2)),console['log']('');});}export function clearLogs(){const _0x390d2b=a22_0x4466;logger[_0x390d2b(0x107)](process[_0x390d2b(0xfc)]()),logger[_0x390d2b(0xf6)](),console[_0x390d2b(0xf5)](_0x390d2b(0xf4));}function a22_0x4466(_0x40740c,_0x1a285f){const _0x1b7c38=a22_0x1b7c();return a22_0x4466=function(_0x44666a,_0x19eeb6){_0x44666a=_0x44666a-0xf2;let _0xa23e9f=_0x1b7c38[_0x44666a];return _0xa23e9f;},a22_0x4466(_0x40740c,_0x1a285f);}function a22_0x1b7c(){const _0x39cadf=['warn','1668365SaxIdT','duration','*\x20Lovrabet\x20CLI\x20日志记录:\x0a','level','10RKyNTQ','timestamp','*\x20日志已清空','log','clearLogs','message','2823016nvEDXv','\x20\x20\x20耗时:\x20','7195837myqwFA','\x20\x20\x20时间:\x20','cwd','6ydWucE','567136GGDfWJ','details','readLogs','keys','\x20\x20\x20详情:\x20','error','449914ypUzOn','4xlhchB','873HtrMyK','setLogPath','zh-CN','1528pyTymA','*\x20暂无日志记录','181188wAEIGy'];a22_0x1b7c=function(){return _0x39cadf;};return a22_0x1b7c();}
1
+ (function(_0x116e2d,_0xd717b){const _0x2b3913=a22_0x2018,_0x10a31b=_0x116e2d();while(!![]){try{const _0x286a37=-parseInt(_0x2b3913(0x1c1))/0x1*(-parseInt(_0x2b3913(0x1c3))/0x2)+-parseInt(_0x2b3913(0x1bd))/0x3+parseInt(_0x2b3913(0x1bc))/0x4+parseInt(_0x2b3913(0x1ca))/0x5*(-parseInt(_0x2b3913(0x1b1))/0x6)+parseInt(_0x2b3913(0x1b5))/0x7+parseInt(_0x2b3913(0x1b9))/0x8*(parseInt(_0x2b3913(0x1b8))/0x9)+parseInt(_0x2b3913(0x1c4))/0xa;if(_0x286a37===_0xd717b)break;else _0x10a31b['push'](_0x10a31b['shift']());}catch(_0x3ddff5){_0x10a31b['push'](_0x10a31b['shift']());}}}(a22_0x2610,0x32d39));import{logger}from'../utils/logger.js';export function showLogs(){const _0x1da387=a22_0x2018;logger[_0x1da387(0x1b3)](process[_0x1da387(0x1c9)]());const _0x55f2ca=logger[_0x1da387(0x1af)]();if(_0x55f2ca[_0x1da387(0x1ac)]===0x0){console[_0x1da387(0x1ad)]('*\x20暂无日志记录');return;}console[_0x1da387(0x1ad)](_0x1da387(0x1c0)),_0x55f2ca[_0x1da387(0x1c8)]((_0x1366e0,_0x311122)=>{const _0x4c04d3=_0x1da387,_0x5f25ec=new Date(_0x1366e0[_0x4c04d3(0x1b6)])['toLocaleString'](_0x4c04d3(0x1b7)),_0x477058=_0x1366e0['level']===_0x4c04d3(0x1bb)?'√':_0x1366e0[_0x4c04d3(0x1be)]===_0x4c04d3(0x1c5)?'×':_0x1366e0['level']===_0x4c04d3(0x1c2)?'!':'i';console[_0x4c04d3(0x1ad)](_0x311122+0x1+'.\x20'+_0x477058+'\x20['+_0x1366e0[_0x4c04d3(0x1ab)]+']\x20'+_0x1366e0[_0x4c04d3(0x1ae)]),console['log'](_0x4c04d3(0x1ba)+_0x5f25ec),_0x1366e0[_0x4c04d3(0x1c6)]&&console[_0x4c04d3(0x1ad)](_0x4c04d3(0x1b0)+_0x1366e0[_0x4c04d3(0x1c6)]+'ms'),_0x1366e0['details']&&Object['keys'](_0x1366e0[_0x4c04d3(0x1bf)])[_0x4c04d3(0x1ac)]>0x0&&console[_0x4c04d3(0x1ad)]('\x20\x20\x20详情:\x20'+JSON[_0x4c04d3(0x1c7)](_0x1366e0[_0x4c04d3(0x1bf)],null,0x2)),console[_0x4c04d3(0x1ad)]('');});}function a22_0x2018(_0x50924a,_0x2da8e2){const _0x2610e6=a22_0x2610();return a22_0x2018=function(_0x2018d3,_0x190006){_0x2018d3=_0x2018d3-0x1ab;let _0x54070e=_0x2610e6[_0x2018d3];return _0x54070e;},a22_0x2018(_0x50924a,_0x2da8e2);}function a22_0x2610(){const _0x5a8fd7=['readLogs','\x20\x20\x20耗时:\x20','6sxuZtv','clearLogs','setLogPath','*\x20日志已清空','715302XKLyWq','timestamp','zh-CN','9docfyO','120584PMhHUP','\x20\x20\x20时间:\x20','success','307044dAgdmK','648930ugxpVa','level','details','*\x20Lovrabet\x20CLI\x20日志记录:\x0a','272DCVseR','warn','1418LDLGHR','3343830lRSYtP','error','duration','stringify','forEach','cwd','1483780jjnJxu','command','length','log','message'];a22_0x2610=function(){return _0x5a8fd7;};return a22_0x2610();}export function clearLogs(){const _0x36a75a=a22_0x2018;logger[_0x36a75a(0x1b3)](process[_0x36a75a(0x1c9)]()),logger[_0x36a75a(0x1b2)](),console[_0x36a75a(0x1ad)](_0x36a75a(0x1b4));}
@@ -1 +1 @@
1
- (function(_0x4bf5f2,_0x59a871){const _0x31d342=a23_0x46a1,_0x512fcb=_0x4bf5f2();while(!![]){try{const _0x4d4687=parseInt(_0x31d342(0x82))/0x1+parseInt(_0x31d342(0x91))/0x2+-parseInt(_0x31d342(0x8e))/0x3*(-parseInt(_0x31d342(0x89))/0x4)+-parseInt(_0x31d342(0x81))/0x5+-parseInt(_0x31d342(0x7d))/0x6+-parseInt(_0x31d342(0x8f))/0x7*(parseInt(_0x31d342(0x83))/0x8)+-parseInt(_0x31d342(0x96))/0x9*(-parseInt(_0x31d342(0x87))/0xa);if(_0x4d4687===_0x59a871)break;else _0x512fcb['push'](_0x512fcb['shift']());}catch(_0x347c45){_0x512fcb['push'](_0x512fcb['shift']());}}}(a23_0x2899,0x270ad));function a23_0x2899(){const _0x4fb390=['vite','441216vJsUEB','data','预览服务器启动出错','启动预览服务器','stderr','3951531VhzPQT','PATH','close','1332852IkjOIp','vite\x20preview\x20exited\x20with\x20code\x20','.bin','node_modules','1019760XnumGQ','65944DVzyLp','712wJBUgS','cwd','message','error','10WpSxjL','inherit','12phoPon','trim','preview','vite\x20preview','env','3156ApgOtr','11228sKYYUN'];a23_0x2899=function(){return _0x4fb390;};return a23_0x2899();}function a23_0x46a1(_0x37998e,_0x3b7962){const _0x28993f=a23_0x2899();return a23_0x46a1=function(_0x46a123,_0x4e33bf){_0x46a123=_0x46a123-0x7d;let _0x456540=_0x28993f[_0x46a123];return _0x456540;},a23_0x46a1(_0x37998e,_0x3b7962);}import{delimiter,join}from'node:path';import{spawn}from'node:child_process';import{logger}from'../utils/logger.js';export function runPreview(){return new Promise((_0x5b2dc0,_0x4f5d3b)=>{const _0x20cf83=a23_0x46a1,_0x5432ed=Date['now']();logger['info'](_0x20cf83(0x8b),_0x20cf83(0x94),{'command':'vite\x20preview'});let _0x32c35='';const _0x3ba8fb=spawn(_0x20cf83(0x90),['preview'],{'stdio':[_0x20cf83(0x88),_0x20cf83(0x88),'pipe'],'shell':!![],'env':{...process[_0x20cf83(0x8d)],'PATH':''+join(process['cwd'](),_0x20cf83(0x80),_0x20cf83(0x7f))+delimiter+process[_0x20cf83(0x8d)][_0x20cf83(0x97)]}});_0x3ba8fb[_0x20cf83(0x95)]?.['on'](_0x20cf83(0x92),_0x58d29e=>{_0x32c35+=_0x58d29e['toString']();}),_0x3ba8fb['on'](_0x20cf83(0x98),_0x85ffc9=>{const _0x21ac55=_0x20cf83,_0xb9a5ac=Date['now']()-_0x5432ed;if(_0x85ffc9===0x0||_0x85ffc9===null)logger['success'](_0x21ac55(0x8b),'预览服务器启动成功',_0xb9a5ac),_0x5b2dc0();else{const _0x4e5929={'exitCode':_0x85ffc9,'duration':_0xb9a5ac,'command':_0x21ac55(0x8c),'cwd':process[_0x21ac55(0x84)]()};_0x32c35[_0x21ac55(0x8a)]()&&(_0x4e5929['stderr']=_0x32c35[_0x21ac55(0x8a)]()),logger[_0x21ac55(0x86)]('preview','预览服务器启动失败',_0x4e5929),_0x4f5d3b(new Error(_0x21ac55(0x7e)+_0x85ffc9));}}),_0x3ba8fb['on'](_0x20cf83(0x86),_0x2bc1cd=>{const _0x126875=_0x20cf83,_0x26f11d=Date['now']()-_0x5432ed;logger[_0x126875(0x86)]('preview',_0x126875(0x93),{'error':_0x2bc1cd[_0x126875(0x85)],'duration':_0x26f11d,'stderr':_0x32c35[_0x126875(0x8a)]()||undefined}),_0x4f5d3b(_0x2bc1cd);});});}
1
+ function a23_0xc54d(){const _0x8b4e89=['.bin','preview','success','pipe','env','trim','vite\x20preview','vite\x20preview\x20exited\x20with\x20code\x20','error','4wzxKhV','预览服务器启动成功','stderr','6824265fSBIen','549534cfTmMa','PATH','cwd','message','3302055qmtlAj','1111817oUPqJP','7334832RNgbvP','info','now','预览服务器启动出错','30512AIXwnD','vite','node_modules','启动预览服务器','data','2385564oaIajE'];a23_0xc54d=function(){return _0x8b4e89;};return a23_0xc54d();}(function(_0x4ce61d,_0xac8b61){const _0x1df0a7=a23_0x72f0,_0x736058=_0x4ce61d();while(!![]){try{const _0x1064c3=-parseInt(_0x1df0a7(0xfd))/0x1+-parseInt(_0x1df0a7(0x107))/0x2+parseInt(_0x1df0a7(0x101))/0x3+parseInt(_0x1df0a7(0xf9))/0x4*(parseInt(_0x1df0a7(0xfc))/0x5)+-parseInt(_0x1df0a7(0x10c))/0x6+parseInt(_0x1df0a7(0x102))/0x7+-parseInt(_0x1df0a7(0x103))/0x8;if(_0x1064c3===_0xac8b61)break;else _0x736058['push'](_0x736058['shift']());}catch(_0x3d81e4){_0x736058['push'](_0x736058['shift']());}}}(a23_0xc54d,0xb5eab));import{delimiter,join}from'node:path';function a23_0x72f0(_0xba8f3e,_0x34281d){const _0xc54d0f=a23_0xc54d();return a23_0x72f0=function(_0x72f01c,_0x5d9e0c){_0x72f01c=_0x72f01c-0xf5;let _0x13cf00=_0xc54d0f[_0x72f01c];return _0x13cf00;},a23_0x72f0(_0xba8f3e,_0x34281d);}import{spawn}from'node:child_process';import{logger}from'../utils/logger.js';export function runPreview(){return new Promise((_0x171299,_0x3fc81e)=>{const _0x7c06c8=a23_0x72f0,_0x53ad9f=Date['now']();logger[_0x7c06c8(0x104)](_0x7c06c8(0x10e),_0x7c06c8(0x10a),{'command':_0x7c06c8(0xf6)});let _0x38502b='';const _0x34c580=spawn(_0x7c06c8(0x108),[_0x7c06c8(0x10e)],{'stdio':['inherit','inherit',_0x7c06c8(0x110)],'shell':!![],'env':{...process[_0x7c06c8(0x111)],'PATH':''+join(process['cwd'](),_0x7c06c8(0x109),_0x7c06c8(0x10d))+delimiter+process[_0x7c06c8(0x111)][_0x7c06c8(0xfe)]}});_0x34c580[_0x7c06c8(0xfb)]?.['on'](_0x7c06c8(0x10b),_0x55f76b=>{_0x38502b+=_0x55f76b['toString']();}),_0x34c580['on']('close',_0x12c9fe=>{const _0x53f5e7=_0x7c06c8,_0x2a3471=Date[_0x53f5e7(0x105)]()-_0x53ad9f;if(_0x12c9fe===0x0||_0x12c9fe===null)logger[_0x53f5e7(0x10f)]('preview',_0x53f5e7(0xfa),_0x2a3471),_0x171299();else{const _0x86fc1={'exitCode':_0x12c9fe,'duration':_0x2a3471,'command':'vite\x20preview','cwd':process[_0x53f5e7(0xff)]()};_0x38502b[_0x53f5e7(0xf5)]()&&(_0x86fc1['stderr']=_0x38502b['trim']()),logger['error'](_0x53f5e7(0x10e),'预览服务器启动失败',_0x86fc1),_0x3fc81e(new Error(_0x53f5e7(0xf7)+_0x12c9fe));}}),_0x34c580['on']('error',_0x3a3e6e=>{const _0x31c8db=_0x7c06c8,_0x995275=Date[_0x31c8db(0x105)]()-_0x53ad9f;logger[_0x31c8db(0xf8)](_0x31c8db(0x10e),_0x31c8db(0x106),{'error':_0x3a3e6e[_0x31c8db(0x100)],'duration':_0x995275,'stderr':_0x38502b[_0x31c8db(0xf5)]()||undefined}),_0x3fc81e(_0x3a3e6e);});});}
package/lib/cmd/start.js CHANGED
@@ -1 +1 @@
1
- (function(_0x2db344,_0x1d7d53){const _0x2292db=a24_0x9d64,_0x34cd31=_0x2db344();while(!![]){try{const _0x4c049b=parseInt(_0x2292db(0x1ba))/0x1+-parseInt(_0x2292db(0x1bc))/0x2+-parseInt(_0x2292db(0x1bb))/0x3+-parseInt(_0x2292db(0x1b8))/0x4+-parseInt(_0x2292db(0x1c5))/0x5*(parseInt(_0x2292db(0x1cc))/0x6)+-parseInt(_0x2292db(0x1b3))/0x7+parseInt(_0x2292db(0x1c8))/0x8*(parseInt(_0x2292db(0x1b9))/0x9);if(_0x4c049b===_0x1d7d53)break;else _0x34cd31['push'](_0x34cd31['shift']());}catch(_0x38dd1f){_0x34cd31['push'](_0x34cd31['shift']());}}}(a24_0x53e7,0xd7cc1));function a24_0x9d64(_0x5a6599,_0x2eb88c){const _0x53e7fe=a24_0x53e7();return a24_0x9d64=function(_0x9d64ab,_0xc7c5ac){_0x9d64ab=_0x9d64ab-0x1af;let _0x4aeb58=_0x53e7fe[_0x9d64ab];return _0x4aeb58;},a24_0x9d64(_0x5a6599,_0x2eb88c);}import{delimiter,join}from'node:path';import{spawn}from'node:child_process';function a24_0x53e7(){const _0x4db984=['7872802YOHIbN','success','pipe','inherit','now','1976888qvYzLh','6093VNlxxA','411581dgsbuX','1531605zVUVMO','3416052BZZMUL','开发服务器启动失败','info','data','node_modules','close','cwd','start','vite\x20exited\x20with\x20code\x20','25tcgMmc','env','message','52992hcnjgV','vite','.bin','stderr','209586EIFgmO','启动开发服务器','开发服务器启动成功','trim','error','write'];a24_0x53e7=function(){return _0x4db984;};return a24_0x53e7();}import{logger}from'../utils/logger.js';export function runStart(_0x52c12a){return new Promise((_0x2799f5,_0x4302dd)=>{const _0x28d471=a24_0x9d64,_0x252395=Date[_0x28d471(0x1b7)](),_0x43ff16=_0x52c12a||process[_0x28d471(0x1c2)]();logger[_0x28d471(0x1be)](_0x28d471(0x1c3),_0x28d471(0x1cd),{'command':_0x28d471(0x1c9),'cwd':_0x43ff16});let _0x27cedd='';const _0x31dffc=spawn(_0x28d471(0x1c9),{'stdio':[_0x28d471(0x1b6),'inherit',_0x28d471(0x1b5)],'shell':!![],'cwd':_0x43ff16,'env':{...process[_0x28d471(0x1c6)],'PATH':''+join(_0x43ff16,_0x28d471(0x1c0),_0x28d471(0x1ca))+delimiter+process[_0x28d471(0x1c6)]['PATH']}});_0x31dffc[_0x28d471(0x1cb)]?.['on'](_0x28d471(0x1bf),_0x57e867=>{const _0x2ab7cd=_0x28d471,_0x177ed5=_0x57e867['toString']();_0x27cedd+=_0x177ed5,process[_0x2ab7cd(0x1cb)][_0x2ab7cd(0x1b2)](_0x177ed5);}),_0x31dffc['on'](_0x28d471(0x1c1),_0x5643ac=>{const _0x34a13d=_0x28d471,_0x13fff6=Date[_0x34a13d(0x1b7)]()-_0x252395;if(_0x5643ac===0x0||_0x5643ac===null)logger[_0x34a13d(0x1b4)](_0x34a13d(0x1c3),_0x34a13d(0x1af),_0x13fff6),_0x2799f5();else{const _0xa7cd9={'exitCode':_0x5643ac,'duration':_0x13fff6,'command':_0x34a13d(0x1c9),'cwd':_0x43ff16};_0x27cedd[_0x34a13d(0x1b0)]()&&(_0xa7cd9[_0x34a13d(0x1cb)]=_0x27cedd[_0x34a13d(0x1b0)]()),logger['error'](_0x34a13d(0x1c3),_0x34a13d(0x1bd),_0xa7cd9),_0x4302dd(new Error(_0x34a13d(0x1c4)+_0x5643ac));}}),_0x31dffc['on'](_0x28d471(0x1b1),_0x337b94=>{const _0x2c53e3=_0x28d471,_0x4f18ef=Date[_0x2c53e3(0x1b7)]()-_0x252395,_0x636646={'error':_0x337b94[_0x2c53e3(0x1c7)],'duration':_0x4f18ef,'command':_0x2c53e3(0x1c9),'cwd':_0x43ff16};_0x27cedd[_0x2c53e3(0x1b0)]()&&(_0x636646[_0x2c53e3(0x1cb)]=_0x27cedd['trim']()),logger[_0x2c53e3(0x1b1)](_0x2c53e3(0x1c3),'开发服务器启动出错',_0x636646),_0x4302dd(_0x337b94);});});}
1
+ (function(_0x570556,_0x46ea0d){const _0x58ca8a=a24_0x4305,_0x3916ab=_0x570556();while(!![]){try{const _0x1515c4=parseInt(_0x58ca8a(0x130))/0x1*(-parseInt(_0x58ca8a(0x122))/0x2)+parseInt(_0x58ca8a(0x132))/0x3*(parseInt(_0x58ca8a(0x12d))/0x4)+parseInt(_0x58ca8a(0x127))/0x5+-parseInt(_0x58ca8a(0x12e))/0x6+parseInt(_0x58ca8a(0x126))/0x7+parseInt(_0x58ca8a(0x12b))/0x8+-parseInt(_0x58ca8a(0x12f))/0x9;if(_0x1515c4===_0x46ea0d)break;else _0x3916ab['push'](_0x3916ab['shift']());}catch(_0x945276){_0x3916ab['push'](_0x3916ab['shift']());}}}(a24_0x7fcf,0x3feb3));import{delimiter,join}from'node:path';function a24_0x7fcf(){const _0x115d74=['.bin','开发服务器启动失败','close','开发服务器启动出错','success','6IaYHcD','trim','write','start','2844597oPblpF','2152835gEwhKn','now','vite','PATH','424672TKZYQm','启动开发服务器','672BLvixB','738738nabRob','3193092ObFddh','86668tNKRPb','env','1959dmnyxH','info','error','stderr','inherit','message','vite\x20exited\x20with\x20code\x20'];a24_0x7fcf=function(){return _0x115d74;};return a24_0x7fcf();}import{spawn}from'node:child_process';function a24_0x4305(_0x24406a,_0x4f370a){const _0x7fcf28=a24_0x7fcf();return a24_0x4305=function(_0x4305c6,_0x44b1be){_0x4305c6=_0x4305c6-0x11b;let _0x57af6e=_0x7fcf28[_0x4305c6];return _0x57af6e;},a24_0x4305(_0x24406a,_0x4f370a);}import{logger}from'../utils/logger.js';export function runStart(_0x4eebbf){return new Promise((_0x3c447c,_0x4761cc)=>{const _0x10c647=a24_0x4305,_0x300bbb=Date[_0x10c647(0x128)](),_0x579aee=_0x4eebbf||process['cwd']();logger[_0x10c647(0x133)]('start',_0x10c647(0x12c),{'command':_0x10c647(0x129),'cwd':_0x579aee});let _0x5198a8='';const _0x1b587b=spawn(_0x10c647(0x129),{'stdio':[_0x10c647(0x136),_0x10c647(0x136),'pipe'],'shell':!![],'cwd':_0x579aee,'env':{...process[_0x10c647(0x131)],'PATH':''+join(_0x579aee,'node_modules',_0x10c647(0x11d))+delimiter+process['env'][_0x10c647(0x12a)]}});_0x1b587b[_0x10c647(0x135)]?.['on']('data',_0x1666b7=>{const _0x15a9dd=_0x10c647,_0x11db3e=_0x1666b7['toString']();_0x5198a8+=_0x11db3e,process[_0x15a9dd(0x135)][_0x15a9dd(0x124)](_0x11db3e);}),_0x1b587b['on'](_0x10c647(0x11f),_0x4031e7=>{const _0x58a96a=_0x10c647,_0x7f1f3a=Date[_0x58a96a(0x128)]()-_0x300bbb;if(_0x4031e7===0x0||_0x4031e7===null)logger[_0x58a96a(0x121)](_0x58a96a(0x125),'开发服务器启动成功',_0x7f1f3a),_0x3c447c();else{const _0x491b71={'exitCode':_0x4031e7,'duration':_0x7f1f3a,'command':_0x58a96a(0x129),'cwd':_0x579aee};_0x5198a8['trim']()&&(_0x491b71['stderr']=_0x5198a8[_0x58a96a(0x123)]()),logger['error']('start',_0x58a96a(0x11e),_0x491b71),_0x4761cc(new Error(_0x58a96a(0x11c)+_0x4031e7));}}),_0x1b587b['on'](_0x10c647(0x134),_0x33c983=>{const _0x161344=_0x10c647,_0x5d5836=Date[_0x161344(0x128)]()-_0x300bbb,_0x2afced={'error':_0x33c983[_0x161344(0x11b)],'duration':_0x5d5836,'command':_0x161344(0x129),'cwd':_0x579aee};_0x5198a8[_0x161344(0x123)]()&&(_0x2afced[_0x161344(0x135)]=_0x5198a8[_0x161344(0x123)]()),logger[_0x161344(0x134)]('start',_0x161344(0x120),_0x2afced),_0x4761cc(_0x33c983);});});}
@@ -1 +1 @@
1
- function a25_0x1b06(){const _0x4f3117=['10501940aaUsZC','lovrabet\x20config\x20set\x20<key>\x20<value>\x20\x20\x20','\x20\x20\x20\x20','command','lovrabet\x20config\x20list\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','793726WfYdoA','2912292RRinAD','458121OYqJNW','配置当前项目的\x20App\x20Code','293508KbiBYN','gray','245AdajdP','设置环境\x20(online/daily)','159498pfawSw','设置配置项','lovrabet\x20config\x20set\x20env\x20daily\x20\x20\x20\x20\x20\x20\x20','1659edxIUu','map','获取配置项','\x20*\x20配置示例:','lovrabet\x20config\x20set\x20app\x20app-xxxxx\x20\x20\x20','26984ZEMMEc','lovrabet\x20config\x20get\x20<key>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','description','1HoOWdZ'];a25_0x1b06=function(){return _0x4f3117;};return a25_0x1b06();}(function(_0x3aadb6,_0x17cb36){const _0x3e1491=a25_0x292f,_0x43c016=_0x3aadb6();while(!![]){try{const _0x5801c8=parseInt(_0x3e1491(0x166))/0x1*(-parseInt(_0x3e1491(0x16c))/0x2)+-parseInt(_0x3e1491(0x16e))/0x3+parseInt(_0x3e1491(0x16d))/0x4+-parseInt(_0x3e1491(0x159))/0x5*(parseInt(_0x3e1491(0x15b))/0x6)+-parseInt(_0x3e1491(0x15e))/0x7*(-parseInt(_0x3e1491(0x163))/0x8)+-parseInt(_0x3e1491(0x157))/0x9+parseInt(_0x3e1491(0x167))/0xa;if(_0x5801c8===_0x17cb36)break;else _0x43c016['push'](_0x43c016['shift']());}catch(_0x45ca0b){_0x43c016['push'](_0x43c016['shift']());}}}(a25_0x1b06,0xa92b7));function a25_0x292f(_0x56d7dc,_0x4b359a){const _0x1b06db=a25_0x1b06();return a25_0x292f=function(_0x292f65,_0x52f0da){_0x292f65=_0x292f65-0x157;let _0xed96af=_0x1b06db[_0x292f65];return _0xed96af;},a25_0x292f(_0x56d7dc,_0x4b359a);}import{jsxs as a25_0x152fe2,jsx as a25_0x16a2f5}from'react/jsx-runtime';import{Box,Text}from'ink';export function ConfigHelp(){const _0x67b53a=a25_0x292f,_0x96cfac=[{'command':_0x67b53a(0x168),'description':_0x67b53a(0x15c)},{'command':_0x67b53a(0x164),'description':_0x67b53a(0x160)},{'command':_0x67b53a(0x16b),'description':'列出所有配置项'}],_0x15364e=[{'command':_0x67b53a(0x162),'description':_0x67b53a(0x16f)},{'command':_0x67b53a(0x15d),'description':_0x67b53a(0x15a)}];return a25_0x152fe2(Box,{'flexDirection':'column','marginTop':0x1,'marginBottom':0x1,'children':[a25_0x16a2f5(Box,{'marginBottom':0x1,'children':a25_0x152fe2(Text,{'color':'gray','children':['\x20!','\x20\x20','无效的命令,可用命令如下:']})}),_0x96cfac[_0x67b53a(0x15f)](_0x3d41b7=>a25_0x152fe2(Box,{'children':[a25_0x152fe2(Text,{'children':[_0x67b53a(0x169),_0x3d41b7['command']]}),a25_0x16a2f5(Text,{'color':'gray','children':_0x3d41b7[_0x67b53a(0x165)]})]},_0x3d41b7[_0x67b53a(0x16a)])),a25_0x16a2f5(Box,{'marginTop':0x1,'marginBottom':0x1,'children':a25_0x16a2f5(Text,{'color':_0x67b53a(0x158),'children':_0x67b53a(0x161)})}),_0x15364e[_0x67b53a(0x15f)](_0x7b8b22=>a25_0x152fe2(Box,{'children':[a25_0x152fe2(Text,{'children':[_0x67b53a(0x169),_0x7b8b22[_0x67b53a(0x16a)]]}),a25_0x16a2f5(Text,{'color':_0x67b53a(0x158),'children':_0x7b8b22['description']})]},_0x7b8b22[_0x67b53a(0x16a)]))]});}
1
+ (function(_0x2a644f,_0x152a3b){const _0x5924f5=a25_0x3450,_0x541389=_0x2a644f();while(!![]){try{const _0x4d302a=-parseInt(_0x5924f5(0x1aa))/0x1+-parseInt(_0x5924f5(0x1ac))/0x2+parseInt(_0x5924f5(0x1ab))/0x3+-parseInt(_0x5924f5(0x1b0))/0x4+parseInt(_0x5924f5(0x19f))/0x5*(parseInt(_0x5924f5(0x19d))/0x6)+-parseInt(_0x5924f5(0x1ae))/0x7+parseInt(_0x5924f5(0x1af))/0x8*(parseInt(_0x5924f5(0x1a4))/0x9);if(_0x4d302a===_0x152a3b)break;else _0x541389['push'](_0x541389['shift']());}catch(_0x409a3d){_0x541389['push'](_0x541389['shift']());}}}(a25_0x448b,0x3f94c));function a25_0x3450(_0x2cc108,_0x3120aa){const _0x448b6b=a25_0x448b();return a25_0x3450=function(_0x3450e9,_0xe8f87b){_0x3450e9=_0x3450e9-0x19b;let _0x380ee8=_0x448b6b[_0x3450e9];return _0x380ee8;},a25_0x3450(_0x2cc108,_0x3120aa);}import{jsxs as a25_0x42d3b3,jsx as a25_0x315636}from'react/jsx-runtime';import{Box,Text}from'ink';function a25_0x448b(){const _0x59fc34=['219608TvFJOH','1739456WkEtHN','\x20\x20\x20\x20','无效的命令,可用命令如下:','498lhETAY','列出所有配置项','5645CTzKmW','command','设置环境\x20(online/daily)','lovrabet\x20config\x20set\x20<key>\x20<value>\x20\x20\x20','配置当前项目的\x20App\x20Code','369SCGxWA','description','lovrabet\x20config\x20get\x20<key>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','map','设置配置项','获取配置项','259905ATQDbW','678093AzzuMa','93664qxBsDH','gray','3102400iYOcrt'];a25_0x448b=function(){return _0x59fc34;};return a25_0x448b();}export function ConfigHelp(){const _0x2ff787=a25_0x3450,_0x335561=[{'command':_0x2ff787(0x1a2),'description':_0x2ff787(0x1a8)},{'command':_0x2ff787(0x1a6),'description':_0x2ff787(0x1a9)},{'command':'lovrabet\x20config\x20list\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','description':_0x2ff787(0x19e)}],_0x25b5a4=[{'command':'lovrabet\x20config\x20set\x20app\x20app-xxxxx\x20\x20\x20','description':_0x2ff787(0x1a3)},{'command':'lovrabet\x20config\x20set\x20env\x20daily\x20\x20\x20\x20\x20\x20\x20','description':_0x2ff787(0x1a1)}];return a25_0x42d3b3(Box,{'flexDirection':'column','marginTop':0x1,'marginBottom':0x1,'children':[a25_0x315636(Box,{'marginBottom':0x1,'children':a25_0x42d3b3(Text,{'color':'gray','children':['\x20!','\x20\x20',_0x2ff787(0x19c)]})}),_0x335561[_0x2ff787(0x1a7)](_0x59b5d8=>a25_0x42d3b3(Box,{'children':[a25_0x42d3b3(Text,{'children':[_0x2ff787(0x19b),_0x59b5d8[_0x2ff787(0x1a0)]]}),a25_0x315636(Text,{'color':'gray','children':_0x59b5d8['description']})]},_0x59b5d8[_0x2ff787(0x1a0)])),a25_0x315636(Box,{'marginTop':0x1,'marginBottom':0x1,'children':a25_0x315636(Text,{'color':_0x2ff787(0x1ad),'children':'\x20*\x20配置示例:'})}),_0x25b5a4[_0x2ff787(0x1a7)](_0x591e10=>a25_0x42d3b3(Box,{'children':[a25_0x42d3b3(Text,{'children':[_0x2ff787(0x19b),_0x591e10['command']]}),a25_0x315636(Text,{'color':_0x2ff787(0x1ad),'children':_0x591e10[_0x2ff787(0x1a5)]})]},_0x591e10['command']))]});}
@@ -1 +1 @@
1
- (function(_0x526042,_0x4ce1ba){const _0x542bd2=a26_0x4d06,_0x4dcbea=_0x526042();while(!![]){try{const _0x4e6f7c=-parseInt(_0x542bd2(0x15b))/0x1+parseInt(_0x542bd2(0x15a))/0x2*(parseInt(_0x542bd2(0x16b))/0x3)+-parseInt(_0x542bd2(0x150))/0x4*(-parseInt(_0x542bd2(0x157))/0x5)+parseInt(_0x542bd2(0x144))/0x6*(parseInt(_0x542bd2(0x16a))/0x7)+parseInt(_0x542bd2(0x153))/0x8*(parseInt(_0x542bd2(0x14e))/0x9)+-parseInt(_0x542bd2(0x162))/0xa*(-parseInt(_0x542bd2(0x163))/0xb)+parseInt(_0x542bd2(0x156))/0xc*(-parseInt(_0x542bd2(0x164))/0xd);if(_0x4e6f7c===_0x4ce1ba)break;else _0x4dcbea['push'](_0x4dcbea['shift']());}catch(_0x3ec0a3){_0x4dcbea['push'](_0x4dcbea['shift']());}}}(a26_0x3079,0x9e71b));import{jsx as a26_0x16db18,jsxs as a26_0x145ccc}from'react/jsx-runtime';import{existsSync,readFileSync,writeFileSync}from'node:fs';import a26_0x3cd8f7 from'node:fs';import a26_0x52933e from'node:path';import{ConfigHelp}from'./config-help.js';import{Box,Text}from'ink';function a26_0x4d06(_0xcdc8c8,_0x42ed6b){const _0x30796b=a26_0x3079();return a26_0x4d06=function(_0x4d06b9,_0x2579db){_0x4d06b9=_0x4d06b9-0x144;let _0x2d0b6f=_0x30796b[_0x4d06b9];return _0x2d0b6f;},a26_0x4d06(_0xcdc8c8,_0x42ed6b);}import{readConfig,isInProject,projectConfigPath,globalConfigPath}from'../utils/config.js';function a26_0x3079(){const _0x120e6a=['8088GuqyBH','5ZrBpTR','includes','unlinkSync','575976YZysVX','82689aYHejc','renameSync','set','配置值无效或过长','.tmp','appcode','dirname','610NcCXub','141999NASvIa','54613WjZhau','mkdirSync','help','env','app','list','110481rKXHuX','6hpWfdk','环境配置已设置为:\x20','input','utf8','未提供配置值','246WZkuNb','config','undefined','online','error','length','--help','保存配置失败:\x20','daily','message','135lCinvD','保存配置失败','4288268HfCzGM','red','log','256296bEvMhZ','环境配置值只能是\x20\x22online\x22\x20或\x20\x22daily\x22','get'];a26_0x3079=function(){return _0x120e6a;};return a26_0x3079();}import{logger}from'../utils/logger.js';export function Config(_0x203699){const _0x23f5b8=a26_0x4d06,{cli:_0x129d8c}=_0x203699,_0x59002d=_0x129d8c['input'][0x1],_0x5dd613=_0x129d8c[_0x23f5b8(0x16d)][0x2],_0x7bf189=['set','get'][_0x23f5b8(0x158)](_0x59002d||''),_0xf994d2=_0x129d8c[_0x23f5b8(0x16d)]['length']>=0x3;if(_0x5dd613===_0x23f5b8(0x14a)||_0x129d8c['flags'][_0x23f5b8(0x166)])return a26_0x16db18(ConfigHelp,{});const _0x1b8cd2=readConfig();if(_0x59002d===_0x23f5b8(0x15d)){if(_0x5dd613){const _0x3b1d0f=_0x129d8c[_0x23f5b8(0x16d)][0x3];if(typeof _0x3b1d0f!==_0x23f5b8(0x146)){if(_0x5dd613===_0x23f5b8(0x167)&&![_0x23f5b8(0x147),_0x23f5b8(0x14c)][_0x23f5b8(0x158)](_0x3b1d0f))return a26_0x16db18(Box,{'children':a26_0x16db18(Text,{'color':_0x23f5b8(0x151),'children':_0x23f5b8(0x154)})});const _0x232b86=isInProject(),_0x5a76b6=_0x232b86?projectConfigPath:globalConfigPath;let _0x3c076e={};try{if(existsSync(_0x5a76b6)){const _0xf36b1d=readFileSync(_0x5a76b6,{'encoding':_0x23f5b8(0x16e)});_0xf36b1d&&(_0x3c076e=JSON['parse'](_0xf36b1d));}}catch(_0x34ca60){}if(typeof _0x3b1d0f!=='string'||_0x3b1d0f[_0x23f5b8(0x149)]>0x1f4)return a26_0x16db18(Box,{'children':a26_0x16db18(Text,{'color':'red','children':_0x23f5b8(0x15e)})});let _0x4ffb14=_0x5dd613;_0x5dd613==='app'&&(_0x4ffb14=_0x23f5b8(0x160),delete _0x3c076e[_0x23f5b8(0x168)]);_0x5dd613===_0x23f5b8(0x160)&&delete _0x3c076e[_0x23f5b8(0x168)];_0x3c076e[_0x4ffb14]=_0x3b1d0f;try{const _0x25b0a4=a26_0x52933e[_0x23f5b8(0x161)](_0x5a76b6);!existsSync(_0x25b0a4)&&a26_0x3cd8f7[_0x23f5b8(0x165)](_0x25b0a4,{'recursive':!![]});const _0x363542=_0x5a76b6+_0x23f5b8(0x15f);writeFileSync(_0x363542,JSON['stringify'](_0x3c076e,null,0x2),{'encoding':_0x23f5b8(0x16e),'mode':0x180}),a26_0x3cd8f7[_0x23f5b8(0x15c)](_0x363542,_0x5a76b6);if(_0x5dd613===_0x23f5b8(0x167)){const _0x47efb7=_0x232b86?'项目':'全局';console[_0x23f5b8(0x152)]('✓\x20'+_0x47efb7+_0x23f5b8(0x16c)+_0x3b1d0f);}}catch(_0x298326){const _0x189824=_0x5a76b6+_0x23f5b8(0x15f);try{existsSync(_0x189824)&&a26_0x3cd8f7[_0x23f5b8(0x159)](_0x189824);}catch(_0x19df95){}return logger[_0x23f5b8(0x148)](_0x23f5b8(0x145),_0x23f5b8(0x14f),{'error':_0x298326 instanceof Error?_0x298326[_0x23f5b8(0x14d)]:String(_0x298326),'configKey':_0x5dd613,'configValue':_0x3b1d0f,'targetConfigPath':_0x5a76b6}),a26_0x16db18(Box,{'children':a26_0x145ccc(Text,{'color':_0x23f5b8(0x151),'children':[_0x23f5b8(0x14b),_0x298326 instanceof Error?_0x298326['message']:String(_0x298326)]})});}return null;}return a26_0x16db18(Box,{'children':a26_0x16db18(Text,{'color':_0x23f5b8(0x151),'children':_0x23f5b8(0x16f)})});}}if(_0x59002d===_0x23f5b8(0x155)){if(_0x5dd613){let _0x51f3c5=_0x5dd613;return _0x5dd613===_0x23f5b8(0x168)&&(_0x51f3c5=_0x23f5b8(0x160)),console['log'](_0x1b8cd2[_0x51f3c5]||_0x23f5b8(0x146)),null;}return null;}if(_0x59002d===_0x23f5b8(0x169))return console[_0x23f5b8(0x152)](JSON['stringify'](_0x1b8cd2,null,0x2)),null;if(!_0x7bf189||!_0xf994d2)return a26_0x16db18(ConfigHelp,{});return null;}
1
+ (function(_0x596260,_0x2c2c08){const _0x4d3906=a26_0x3e3e,_0x4ca2f5=_0x596260();while(!![]){try{const _0x1a82fb=parseInt(_0x4d3906(0x9c))/0x1+-parseInt(_0x4d3906(0xa3))/0x2*(parseInt(_0x4d3906(0x8c))/0x3)+parseInt(_0x4d3906(0xa6))/0x4+-parseInt(_0x4d3906(0x9b))/0x5+parseInt(_0x4d3906(0x8a))/0x6+parseInt(_0x4d3906(0xa0))/0x7+-parseInt(_0x4d3906(0xa2))/0x8*(parseInt(_0x4d3906(0x95))/0x9);if(_0x1a82fb===_0x2c2c08)break;else _0x4ca2f5['push'](_0x4ca2f5['shift']());}catch(_0x9954cf){_0x4ca2f5['push'](_0x4ca2f5['shift']());}}}(a26_0x1695,0xcb126));import{jsx as a26_0x1b5544,jsxs as a26_0x4e4279}from'react/jsx-runtime';import{existsSync,readFileSync,writeFileSync}from'node:fs';import a26_0x26076d from'node:fs';import a26_0x373a06 from'node:path';function a26_0x3e3e(_0x464aa0,_0x208b26){const _0x169581=a26_0x1695();return a26_0x3e3e=function(_0x3e3eb2,_0x5d06ad){_0x3e3eb2=_0x3e3eb2-0x81;let _0x4eb4e8=_0x169581[_0x3e3eb2];return _0x4eb4e8;},a26_0x3e3e(_0x464aa0,_0x208b26);}import{ConfigHelp}from'./config-help.js';import{Box,Text}from'ink';function a26_0x1695(){const _0x617ce5=['utf8','input','daily','9MObkDj','环境配置已设置为:\x20','flags','env','get','未提供配置值','2316465YQBcuU','1001045OxxEjO','unlinkSync','环境配置值只能是\x20\x22online\x22\x20或\x20\x22daily\x22','配置值无效或过长','741916ZIjOAl','renameSync','10339624ITDaTi','56qAKJaZ','appcode','list','5546212sIcjCD','message','undefined','includes','length','red','stringify','log','保存配置失败:\x20','.tmp','734844qJUxve','set','3057QHXTBe','保存配置失败','dirname','app','--help','mkdirSync'];a26_0x1695=function(){return _0x617ce5;};return a26_0x1695();}import{readConfig,isInProject,projectConfigPath,globalConfigPath}from'../utils/config.js';import{logger}from'../utils/logger.js';export function Config(_0xabe041){const _0x564421=a26_0x3e3e,{cli:_0x21e509}=_0xabe041,_0x52a1b2=_0x21e509[_0x564421(0x93)][0x1],_0xfc4b8b=_0x21e509['input'][0x2],_0x57fb36=[_0x564421(0x8b),_0x564421(0x99)]['includes'](_0x52a1b2||''),_0x1e1907=_0x21e509[_0x564421(0x93)][_0x564421(0x84)]>=0x3;if(_0xfc4b8b===_0x564421(0x90)||_0x21e509[_0x564421(0x97)]['help'])return a26_0x1b5544(ConfigHelp,{});const _0x338a3c=readConfig();if(_0x52a1b2===_0x564421(0x8b)){if(_0xfc4b8b){const _0x22d159=_0x21e509[_0x564421(0x93)][0x3];if(typeof _0x22d159!=='undefined'){if(_0xfc4b8b===_0x564421(0x98)&&!['online',_0x564421(0x94)][_0x564421(0x83)](_0x22d159))return a26_0x1b5544(Box,{'children':a26_0x1b5544(Text,{'color':_0x564421(0x85),'children':_0x564421(0x9e)})});const _0x293bcb=isInProject(),_0x4230dc=_0x293bcb?projectConfigPath:globalConfigPath;let _0x52f993={};try{if(existsSync(_0x4230dc)){const _0x1483e9=readFileSync(_0x4230dc,{'encoding':_0x564421(0x92)});_0x1483e9&&(_0x52f993=JSON['parse'](_0x1483e9));}}catch(_0x11a145){}if(typeof _0x22d159!=='string'||_0x22d159[_0x564421(0x84)]>0x1f4)return a26_0x1b5544(Box,{'children':a26_0x1b5544(Text,{'color':_0x564421(0x85),'children':_0x564421(0x9f)})});let _0x1668f5=_0xfc4b8b;_0xfc4b8b===_0x564421(0x8f)&&(_0x1668f5='appcode',delete _0x52f993[_0x564421(0x8f)]);_0xfc4b8b===_0x564421(0xa4)&&delete _0x52f993[_0x564421(0x8f)];_0x52f993[_0x1668f5]=_0x22d159;try{const _0x3b7c79=a26_0x373a06[_0x564421(0x8e)](_0x4230dc);!existsSync(_0x3b7c79)&&a26_0x26076d[_0x564421(0x91)](_0x3b7c79,{'recursive':!![]});const _0x3d25d0=_0x4230dc+_0x564421(0x89);writeFileSync(_0x3d25d0,JSON[_0x564421(0x86)](_0x52f993,null,0x2),{'encoding':_0x564421(0x92),'mode':0x180}),a26_0x26076d[_0x564421(0xa1)](_0x3d25d0,_0x4230dc);if(_0xfc4b8b===_0x564421(0x98)){const _0x484a1c=_0x293bcb?'项目':'全局';console[_0x564421(0x87)]('✓\x20'+_0x484a1c+_0x564421(0x96)+_0x22d159);}}catch(_0x18b867){const _0x1580a0=_0x4230dc+'.tmp';try{existsSync(_0x1580a0)&&a26_0x26076d[_0x564421(0x9d)](_0x1580a0);}catch(_0x3d350a){}return logger['error']('config',_0x564421(0x8d),{'error':_0x18b867 instanceof Error?_0x18b867['message']:String(_0x18b867),'configKey':_0xfc4b8b,'configValue':_0x22d159,'targetConfigPath':_0x4230dc}),a26_0x1b5544(Box,{'children':a26_0x4e4279(Text,{'color':_0x564421(0x85),'children':[_0x564421(0x88),_0x18b867 instanceof Error?_0x18b867[_0x564421(0x81)]:String(_0x18b867)]})});}return null;}return a26_0x1b5544(Box,{'children':a26_0x1b5544(Text,{'color':_0x564421(0x85),'children':_0x564421(0x9a)})});}}if(_0x52a1b2===_0x564421(0x99)){if(_0xfc4b8b){let _0x5c6cc0=_0xfc4b8b;return _0xfc4b8b===_0x564421(0x8f)&&(_0x5c6cc0=_0x564421(0xa4)),console['log'](_0x338a3c[_0x5c6cc0]||_0x564421(0x82)),null;}return null;}if(_0x52a1b2===_0x564421(0xa5))return console[_0x564421(0x87)](JSON[_0x564421(0x86)](_0x338a3c,null,0x2)),null;if(!_0x57fb36||!_0x1e1907)return a26_0x1b5544(ConfigHelp,{});return null;}
@@ -1 +1 @@
1
- const a27_0x2438c5=a27_0x43d0;(function(_0x4077ed,_0x1fb74a){const _0x41e590=a27_0x43d0,_0x1ada34=_0x4077ed();while(!![]){try{const _0x222a6d=-parseInt(_0x41e590(0x154))/0x1*(-parseInt(_0x41e590(0x152))/0x2)+parseInt(_0x41e590(0x14a))/0x3*(-parseInt(_0x41e590(0x147))/0x4)+-parseInt(_0x41e590(0x153))/0x5*(-parseInt(_0x41e590(0x151))/0x6)+parseInt(_0x41e590(0x149))/0x7+parseInt(_0x41e590(0x14d))/0x8+-parseInt(_0x41e590(0x14b))/0x9*(-parseInt(_0x41e590(0x14c))/0xa)+-parseInt(_0x41e590(0x14e))/0xb;if(_0x222a6d===_0x1fb74a)break;else _0x1ada34['push'](_0x1ada34['shift']());}catch(_0x25b105){_0x1ada34['push'](_0x1ada34['shift']());}}}(a27_0x2344,0x72047));import{getEnv}from'./env.js';export const getUserDomain=()=>getEnv()===a27_0x2438c5(0x14f)?a27_0x2438c5(0x150):'https://user-daily.lovrabet.com';function a27_0x2344(){const _0x1141fe=['https://user.lovrabet.com','1132494ReFSlA','536xLSeIK','10ZcNSPJ','2861dCunSA','20cIBMmU','https://daily-api.lovrabet.com','2472043dttjNu','48849LTzIHo','809001ZZJMZk','40xfCQmH','3622808sPQKvL','19375092YygXEj','online'];a27_0x2344=function(){return _0x1141fe;};return a27_0x2344();}function a27_0x43d0(_0x164895,_0x2b23b1){const _0x23447e=a27_0x2344();return a27_0x43d0=function(_0x43d09c,_0x387c89){_0x43d09c=_0x43d09c-0x147;let _0x1a5be6=_0x23447e[_0x43d09c];return _0x1a5be6;},a27_0x43d0(_0x164895,_0x2b23b1);}export const getApiDomain=()=>getEnv()===a27_0x2438c5(0x14f)?'https://api.lovrabet.com':a27_0x2438c5(0x148);
1
+ const a27_0x17953e=a27_0x41a4;function a27_0x41a4(_0x837fb8,_0x35b45a){const _0x4b1934=a27_0x4b19();return a27_0x41a4=function(_0x41a4ad,_0x8c8819){_0x41a4ad=_0x41a4ad-0xc7;let _0x4718dc=_0x4b1934[_0x41a4ad];return _0x4718dc;},a27_0x41a4(_0x837fb8,_0x35b45a);}function a27_0x4b19(){const _0x2dc59b=['190QTBKXF','4785655kCluLM','42342nkLjHx','https://api.lovrabet.com','58818XjfivE','215dqdNbw','3721770jvKHlR','4MbWuFh','https://user.lovrabet.com','2637291NAeRFQ','624019puqIbF','https://daily-api.lovrabet.com','3755232OnOtox','21eUPbQY','online'];a27_0x4b19=function(){return _0x2dc59b;};return a27_0x4b19();}(function(_0x2365a2,_0x129de8){const _0x5dc4fd=a27_0x41a4,_0x3f8ee5=_0x2365a2();while(!![]){try{const _0x128628=parseInt(_0x5dc4fd(0xce))/0x1*(parseInt(_0x5dc4fd(0xd4))/0x2)+-parseInt(_0x5dc4fd(0xca))/0x3*(parseInt(_0x5dc4fd(0xc8))/0x4)+parseInt(_0x5dc4fd(0xd5))/0x5*(parseInt(_0x5dc4fd(0xd2))/0x6)+-parseInt(_0x5dc4fd(0xd1))/0x7+parseInt(_0x5dc4fd(0xcd))/0x8+-parseInt(_0x5dc4fd(0xc7))/0x9+parseInt(_0x5dc4fd(0xd0))/0xa*(parseInt(_0x5dc4fd(0xcb))/0xb);if(_0x128628===_0x129de8)break;else _0x3f8ee5['push'](_0x3f8ee5['shift']());}catch(_0x1b3f1c){_0x3f8ee5['push'](_0x3f8ee5['shift']());}}}(a27_0x4b19,0x781e3));import{getEnv}from'./env.js';export const getUserDomain=()=>getEnv()===a27_0x17953e(0xcf)?a27_0x17953e(0xc9):'https://user-daily.lovrabet.com';export const getApiDomain=()=>getEnv()===a27_0x17953e(0xcf)?a27_0x17953e(0xd3):a27_0x17953e(0xcc);
@@ -1 +1 @@
1
- const a28_0x55e96e=a28_0x499b;function a28_0xdedf(){const _0x2e74c0=['325882xIzKCN','online','2eDDMKS','5DuPQtJ','204882qOHmPv','39ABQlRg','81367GZgRqU','1681356fIqEDb','84SiTgax','657GeLNll','2817924yndejk','180KtkbbZ','2665527TTEESK','90088qOjPkA','LOVRABET_ENV'];a28_0xdedf=function(){return _0x2e74c0;};return a28_0xdedf();}(function(_0x84b33a,_0x5c0a6c){const _0x4fd55e=a28_0x499b,_0x11ff2d=_0x84b33a();while(!![]){try{const _0x27f920=parseInt(_0x4fd55e(0xb1))/0x1*(-parseInt(_0x4fd55e(0xaf))/0x2)+-parseInt(_0x4fd55e(0xac))/0x3+-parseInt(_0x4fd55e(0xa7))/0x4*(-parseInt(_0x4fd55e(0xa3))/0x5)+-parseInt(_0x4fd55e(0xa4))/0x6*(parseInt(_0x4fd55e(0xa8))/0x7)+-parseInt(_0x4fd55e(0xad))/0x8*(-parseInt(_0x4fd55e(0xa9))/0x9)+parseInt(_0x4fd55e(0xab))/0xa*(parseInt(_0x4fd55e(0xa6))/0xb)+-parseInt(_0x4fd55e(0xaa))/0xc*(-parseInt(_0x4fd55e(0xa5))/0xd);if(_0x27f920===_0x5c0a6c)break;else _0x11ff2d['push'](_0x11ff2d['shift']());}catch(_0x5c907b){_0x11ff2d['push'](_0x11ff2d['shift']());}}}(a28_0xdedf,0x6f4b8));function a28_0x499b(_0x3389af,_0x4e5621){const _0xdedfa3=a28_0xdedf();return a28_0x499b=function(_0x499bf3,_0x1330ff){_0x499bf3=_0x499bf3-0xa3;let _0x3d4673=_0xdedfa3[_0x499bf3];return _0x3d4673;},a28_0x499b(_0x3389af,_0x4e5621);}let env=process['env'][a28_0x55e96e(0xae)]||a28_0x55e96e(0xb0);export function getEnv(){return env;}export function initEnv(_0x18f0af){env=_0x18f0af;}
1
+ const a28_0x5b7829=a28_0x15b2;function a28_0xb13e(){const _0x399041=['LOVRABET_ENV','6pQyXCT','env','27474110YqtoSW','2805432HcHJRg','4630mQHPpC','922301kzHrIb','5106PvshtT','3933ozbULF','online','371667kAdcDd','535196ufGGgR','3520dMGWrx'];a28_0xb13e=function(){return _0x399041;};return a28_0xb13e();}function a28_0x15b2(_0x1caff8,_0x3af2dd){const _0xb13e55=a28_0xb13e();return a28_0x15b2=function(_0x15b259,_0x22166b){_0x15b259=_0x15b259-0x1bc;let _0x589b6=_0xb13e55[_0x15b259];return _0x589b6;},a28_0x15b2(_0x1caff8,_0x3af2dd);}(function(_0x40cafc,_0x942ed0){const _0x3587be=a28_0x15b2,_0x1fb15f=_0x40cafc();while(!![]){try{const _0x55db43=-parseInt(_0x3587be(0x1c0))/0x1+parseInt(_0x3587be(0x1c8))/0x2*(parseInt(_0x3587be(0x1c4))/0x3)+-parseInt(_0x3587be(0x1c5))/0x4+parseInt(_0x3587be(0x1bf))/0x5*(-parseInt(_0x3587be(0x1c1))/0x6)+-parseInt(_0x3587be(0x1be))/0x7+parseInt(_0x3587be(0x1c6))/0x8*(-parseInt(_0x3587be(0x1c2))/0x9)+parseInt(_0x3587be(0x1bd))/0xa;if(_0x55db43===_0x942ed0)break;else _0x1fb15f['push'](_0x1fb15f['shift']());}catch(_0x21dc96){_0x1fb15f['push'](_0x1fb15f['shift']());}}}(a28_0xb13e,0xa67a8));let env=process[a28_0x5b7829(0x1bc)][a28_0x5b7829(0x1c7)]||a28_0x5b7829(0x1c3);export function getEnv(){return env;}export function initEnv(_0x3ab0e0){env=_0x3ab0e0;}
@@ -1 +1 @@
1
- (function(_0x741020,_0x36cbc2){const _0x9c9e1e=a29_0xfc05,_0x5505b2=_0x741020();while(!![]){try{const _0x2ba205=parseInt(_0x9c9e1e(0x1d2))/0x1+parseInt(_0x9c9e1e(0x200))/0x2*(parseInt(_0x9c9e1e(0x1e9))/0x3)+parseInt(_0x9c9e1e(0x1c0))/0x4+-parseInt(_0x9c9e1e(0x1d7))/0x5*(parseInt(_0x9c9e1e(0x1e0))/0x6)+-parseInt(_0x9c9e1e(0x1dd))/0x7*(-parseInt(_0x9c9e1e(0x201))/0x8)+parseInt(_0x9c9e1e(0x1df))/0x9+parseInt(_0x9c9e1e(0x1ee))/0xa*(-parseInt(_0x9c9e1e(0x1d8))/0xb);if(_0x2ba205===_0x36cbc2)break;else _0x5505b2['push'](_0x5505b2['shift']());}catch(_0xd54ea6){_0x5505b2['push'](_0x5505b2['shift']());}}}(a29_0x4489,0xb53e4));function a29_0xfc05(_0x40d36a,_0x5a6607){const _0x448997=a29_0x4489();return a29_0xfc05=function(_0xfc0542,_0x347000){_0xfc0542=_0xfc0542-0x1c0;let _0x2b7bf7=_0x448997[_0xfc0542];return _0x2b7bf7;},a29_0xfc05(_0x40d36a,_0x5a6607);}import{jsx as a29_0x142531,jsxs as a29_0x140f8c,Fragment as a29_0x31c769}from'react/jsx-runtime';import{useState}from'react';function a29_0x4489(){const _0x1f7070=['string','!\x20未检测到有效登录','yellow','my-app','leftArrow','*\x20项目名:\x20','3JPEcfZ','*\x20是否要自动拉取\x20API\x20配置?','api-pull','*\x20正在检查登录状态...','return','420OoaNfC','test','已登录','gray','\x20\x20推荐选择\x20Yes,可自动配置\x20API\x20接口','confirm-api-pull','map','creating','\x20←\x20','env','trim','login-prompt','登录失败','\x20\x20推荐选择\x20Yes,登录后可自动拉取并配置\x20API\x20接口','slice','*\x20正在登录,请前往浏览器完成登录...','项目名','*\x20创建新项目','2546956CdhAQr','6990904OwcryO','online','2333848FOJjvy','登录状态','应用AppCode长度不能超过\x20100\x20个字符','step','*\x20应用AppCode\x20','\x20检查中...','Yes','login-process','\x20登录中...','value','includes','应用AppCode不合法','red','green','login','跳过登录','column','应用AppCode只能包含字母、数字、连字符和下划线,且必须以字母或数字开头','858577ZtqawZ','\x20\x20使用\x20←→\x20选择,回车确认','length','[可选]:\x20','项目名不合法','1149345mWCGOC','638407ZkJktF','应用AppCode','app-code','绑定应用AppCode可自动配置\x20API,如:\x20app-c4c89304\x20(直接回车跳过)','backspace','7hyeuqj','cyan','4590198qplxIo','24Tanidq','project-name','login-check'];a29_0x4489=function(){return _0x1f7070;};return a29_0x4489();}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(_0xc364e1){const _0x123c06=a29_0xfc05,{onCreate:_0x3356ad,env:_0xbb5b88}=_0xc364e1,[_0x1c6a8b,_0x28b4cf]=useState(_0x123c06(0x1e1)),[_0x199b27,_0x109100]=useState(''),[_0x3ed761,_0x477281]=useState(''),[_0x519931,_0x324dfe]=useState(''),[_0x2acb4b,_0x112e2e]=useState(''),[_0x1c8bf1,_0x5383b7]=useState([]),[_0x5c81cf,_0x3044c0]=useState(null),[_0x5b307f,_0x20877f]=useState(![]),[_0x5109dc,_0x19f801]=useState(![]),[_0xe8779a,_0x3bc588]=useState(![]),[_0x13dd2b,_0x5ad408]=useState(0x0),[_0x139ecc,_0x1a1668]=useState(0x0),_0x5ab23f=_0x123c06(0x1e6),_0x58a8b6=readConfig(),_0x433da0=typeof _0x58a8b6[_0x123c06(0x1f7)]===_0x123c06(0x1e3)?_0x58a8b6[_0x123c06(0x1f7)]:undefined;function _0x328684(_0x3b8870){const _0x19659b=_0x123c06;if(_0x3b8870[_0x19659b(0x1d4)]>0x32)return{'valid':![],'message':'项目名长度不能超过\x2050\x20个字符'};const _0x45620d=/^[A-Za-z0-9][A-Za-z0-9_-]*$/;if(_0x3b8870?.[_0x19659b(0x1f8)]()&&!_0x45620d['test'](_0x3b8870))return{'valid':![],'message':'项目名只能以字母或数字开头,且只包含字母、数字、-\x20和\x20_'};return{'valid':!![]};}function _0x1afabb(_0x43517b){const _0x1e15ef=_0x123c06;if(!_0x43517b[_0x1e15ef(0x1f8)]())return{'valid':!![]};if(_0x43517b[_0x1e15ef(0x1d4)]>0x64)return{'valid':![],'message':_0x1e15ef(0x1c2)};const _0x3c60dd=/^[a-zA-Z0-9][a-zA-Z0-9_-]*$/;if(!_0x3c60dd[_0x1e15ef(0x1ef)](_0x43517b))return{'valid':![],'message':_0x1e15ef(0x1d1)};return{'valid':!![]};}async function _0x10e4ab(){_0x20877f(!![]);try{const _0x4509a5=await getIsSessionValid();return _0x3044c0(_0x4509a5),_0x4509a5;}catch(_0xaa8878){return _0x3044c0(![]),![];}finally{_0x20877f(![]);}}async function _0xb88254(){_0x19f801(!![]);try{const _0x12d6a5=await authServer({'silent':!![]});return _0x3044c0(_0x12d6a5),_0x12d6a5;}catch(_0x5077ed){return _0x3044c0(![]),![];}finally{_0x19f801(![]);}}return useInput(async(_0x2de25d,_0x4b8a86)=>{const _0x371ccf=_0x123c06;if(_0x4b8a86[_0x371ccf(0x1e7)]||_0x4b8a86['rightArrow']){if(_0x1c6a8b===_0x371ccf(0x1f3)){_0x5ad408(_0x58d5c4=>_0x58d5c4===0x0?0x1:0x0);return;}if(_0x1c6a8b===_0x371ccf(0x1f9)){_0x1a1668(_0x11e728=>_0x11e728===0x0?0x1:0x0);return;}}if(_0x4b8a86[_0x371ccf(0x1ed)]){if(_0x1c6a8b===_0x371ccf(0x1e1)){const _0x25740a=_0x519931['trim']()||_0x5ab23f;if(_0x2acb4b)return;_0x109100(_0x25740a),_0x5383b7([{'step':_0x371ccf(0x1e1),'label':_0x371ccf(0x1fe),'value':_0x25740a}]),_0x324dfe(''),_0x112e2e(''),_0x28b4cf(_0x371ccf(0x1da));return;}if(_0x1c6a8b===_0x371ccf(0x1da)){if(_0x2acb4b)return;const _0x1e928a=_0x519931[_0x371ccf(0x1f8)]();_0x477281(_0x1e928a),_0x5383b7(_0x1c85d4=>[..._0x1c85d4,{'step':_0x371ccf(0x1da),'label':_0x371ccf(0x1d9),'value':_0x1e928a||'未设置'}]),_0x324dfe(''),_0x112e2e('');if(_0x1e928a){_0x28b4cf(_0x371ccf(0x1e2));const _0x53992c=await _0x10e4ab();_0x53992c?_0x28b4cf(_0x371ccf(0x1f3)):_0x28b4cf('login-prompt');}else{const _0x3b9b49=_0xbb5b88||_0x433da0||_0x371ccf(0x202);_0x3356ad({'projectName':_0x199b27,'appCode':undefined,'pullApi':![],'env':_0x3b9b49}),_0x28b4cf('creating');}return;}if(_0x1c6a8b==='confirm-api-pull'){const _0x3ab594=_0x13dd2b===0x0;_0x3bc588(_0x3ab594),_0x5383b7(_0x248eac=>[..._0x248eac,{'step':_0x371ccf(0x1eb),'label':'拉取API配置','value':_0x3ab594?'是':'否'}]);const _0xba73af=_0xbb5b88||_0x433da0||_0x371ccf(0x202);_0x3356ad({'projectName':_0x199b27,'appCode':_0x3ed761,'pullApi':_0x3ab594,'env':_0xba73af}),_0x28b4cf(_0x371ccf(0x1f5));return;}if(_0x1c6a8b===_0x371ccf(0x1f9)){const _0x41aee9=_0x139ecc===0x0;if(_0x41aee9){_0x28b4cf(_0x371ccf(0x1c7));const _0x2a85f0=await _0xb88254();if(_0x2a85f0)_0x5383b7(_0x27dd23=>[..._0x27dd23,{'step':_0x371ccf(0x1ce),'label':_0x371ccf(0x1c1),'value':_0x371ccf(0x1f0)}]),_0x28b4cf('confirm-api-pull');else{_0x5383b7(_0xf0bc82=>[..._0xf0bc82,{'step':'login','label':_0x371ccf(0x1c1),'value':_0x371ccf(0x1fa)}]);const _0x22ba12=_0xbb5b88||_0x433da0||_0x371ccf(0x202);_0x3356ad({'projectName':_0x199b27,'appCode':_0x3ed761,'pullApi':![],'env':_0x22ba12}),_0x28b4cf(_0x371ccf(0x1f5));}}else{_0x5383b7(_0x8960e8=>[..._0x8960e8,{'step':_0x371ccf(0x1ce),'label':_0x371ccf(0x1c1),'value':_0x371ccf(0x1cf)}]);const _0x260f06=_0xbb5b88||_0x433da0||'online';_0x3356ad({'projectName':_0x199b27,'appCode':_0x3ed761,'pullApi':![],'env':_0x260f06}),_0x28b4cf('creating');}return;}}if(_0x4b8a86[_0x371ccf(0x1dc)]||_0x4b8a86['delete']){_0x324dfe(_0xd61179=>{const _0x21ff6f=_0x371ccf,_0x24295e=_0xd61179[_0x21ff6f(0x1fc)](0x0,-0x1);if(_0x1c6a8b==='project-name'){const {valid:_0x1c483e,message:_0x890690}=_0x328684(_0x24295e);_0x112e2e(_0x1c483e?'':_0x890690||_0x21ff6f(0x1d6));}else{if(_0x1c6a8b===_0x21ff6f(0x1da)){const {valid:_0x67eb12,message:_0x31322a}=_0x1afabb(_0x24295e);_0x112e2e(_0x67eb12?'':_0x31322a||_0x21ff6f(0x1cb));}}return _0x24295e;});return;}if([_0x371ccf(0x1f5),_0x371ccf(0x1e2),_0x371ccf(0x1c7)][_0x371ccf(0x1ca)](_0x1c6a8b))return;if(_0x1c6a8b===_0x371ccf(0x1f3)||_0x1c6a8b===_0x371ccf(0x1f9))return;_0x324dfe(_0x1d406a=>{const _0x9e68b2=_0x371ccf,_0x5d333b=_0x1d406a+_0x2de25d;if(_0x1c6a8b==='project-name'){const {valid:_0x522112,message:_0x5e8c39}=_0x328684(_0x5d333b);_0x112e2e(_0x522112?'':_0x5e8c39||'项目名不合法');}else{if(_0x1c6a8b===_0x9e68b2(0x1da)){const {valid:_0x98817f,message:_0x25e4f9}=_0x1afabb(_0x5d333b);_0x112e2e(_0x98817f?'':_0x25e4f9||'应用AppCode不合法');}}return _0x5d333b;});}),a29_0x140f8c(Box,{'flexDirection':_0x123c06(0x1d0),'marginTop':0x1,'children':[_0x1c8bf1[_0x123c06(0x1d4)]===0x0&&a29_0x142531(Box,{'children':a29_0x142531(Text,{'color':'cyan','children':_0x123c06(0x1ff)})}),_0x1c8bf1[_0x123c06(0x1f4)](_0x211a8e=>a29_0x140f8c(Box,{'children':[a29_0x140f8c(Text,{'color':'green','children':['√\x20',_0x211a8e['label'],':\x20']}),a29_0x142531(Text,{'color':_0x123c06(0x1de),'children':_0x211a8e[_0x123c06(0x1c9)]})]},_0x211a8e[_0x123c06(0x1c3)])),_0x1c6a8b===_0x123c06(0x1e1)&&a29_0x140f8c(a29_0x31c769,{'children':[a29_0x140f8c(Box,{'children':[a29_0x142531(Text,{'children':_0x123c06(0x1e8)}),_0x519931?a29_0x142531(Text,{'color':_0x123c06(0x1cd),'children':_0x519931}):a29_0x142531(Text,{'color':_0x123c06(0x1f1),'children':_0x5ab23f}),_0x2acb4b&&a29_0x140f8c(Text,{'color':_0x123c06(0x1cc),'children':[_0x123c06(0x1f6),_0x2acb4b]})]}),!_0x2acb4b&&!_0x519931&&a29_0x142531(Box,{'children':a29_0x142531(Text,{'color':'gray','children':'\x20直接回车确认,或输入自定义名称'})})]}),_0x1c6a8b==='app-code'&&a29_0x140f8c(a29_0x31c769,{'children':[a29_0x140f8c(Box,{'children':[a29_0x142531(Text,{'children':_0x123c06(0x1c4)}),a29_0x142531(Text,{'color':_0x123c06(0x1f1),'children':_0x123c06(0x1d5)}),a29_0x142531(Text,{'color':_0x123c06(0x1cd),'children':_0x519931}),_0x2acb4b&&a29_0x140f8c(Text,{'color':_0x123c06(0x1cc),'children':[_0x123c06(0x1f6),_0x2acb4b]})]}),!_0x2acb4b&&a29_0x142531(Box,{'children':a29_0x140f8c(Text,{'color':'gray','children':['\x20',_0x123c06(0x1db)]})})]}),_0x1c6a8b===_0x123c06(0x1e2)&&a29_0x140f8c(Box,{'children':[a29_0x142531(Text,{'children':_0x123c06(0x1ec)}),_0x5b307f&&a29_0x142531(Text,{'color':_0x123c06(0x1f1),'children':_0x123c06(0x1c5)})]}),_0x1c6a8b===_0x123c06(0x1f3)&&a29_0x140f8c(a29_0x31c769,{'children':[a29_0x142531(Box,{'children':a29_0x142531(Text,{'color':_0x123c06(0x1cd),'children':'√\x20检测到有效登录状态'})}),a29_0x142531(Box,{'marginTop':0x1,'children':a29_0x142531(Text,{'children':_0x123c06(0x1ea)})}),a29_0x140f8c(Box,{'marginLeft':0x2,'children':[a29_0x140f8c(Text,{'color':_0x13dd2b===0x0?_0x123c06(0x1cd):_0x123c06(0x1f1),'children':[_0x13dd2b===0x0?'▶\x20':'\x20\x20',_0x123c06(0x1c6)]}),a29_0x142531(Text,{'children':'\x20'}),a29_0x140f8c(Text,{'color':_0x13dd2b===0x1?_0x123c06(0x1cd):_0x123c06(0x1f1),'children':[_0x13dd2b===0x1?'▶\x20':'\x20\x20','No']})]}),a29_0x142531(Box,{'children':a29_0x142531(Text,{'color':'gray','children':'\x20\x20使用\x20←→\x20选择,回车确认'})}),a29_0x142531(Box,{'children':a29_0x142531(Text,{'color':'yellow','children':_0x123c06(0x1f2)})})]}),_0x1c6a8b===_0x123c06(0x1f9)&&a29_0x140f8c(a29_0x31c769,{'children':[a29_0x142531(Box,{'children':a29_0x142531(Text,{'color':_0x123c06(0x1e5),'children':_0x123c06(0x1e4)})}),a29_0x142531(Box,{'marginTop':0x1,'children':a29_0x142531(Text,{'children':'*\x20是否要先登录以便拉取\x20API\x20配置?'})}),a29_0x140f8c(Box,{'marginLeft':0x2,'children':[a29_0x140f8c(Text,{'color':_0x139ecc===0x0?'green':'gray','children':[_0x139ecc===0x0?'▶\x20':'\x20\x20',_0x123c06(0x1c6)]}),a29_0x142531(Text,{'children':'\x20'}),a29_0x140f8c(Text,{'color':_0x139ecc===0x1?_0x123c06(0x1cd):'gray','children':[_0x139ecc===0x1?'▶\x20':'\x20\x20','No']})]}),a29_0x142531(Box,{'children':a29_0x142531(Text,{'color':'gray','children':_0x123c06(0x1d3)})}),a29_0x142531(Box,{'children':a29_0x142531(Text,{'color':'yellow','children':_0x123c06(0x1fb)})})]}),_0x1c6a8b===_0x123c06(0x1c7)&&a29_0x140f8c(Box,{'children':[a29_0x142531(Text,{'children':_0x123c06(0x1fd)}),_0x5109dc&&a29_0x142531(Text,{'color':_0x123c06(0x1f1),'children':_0x123c06(0x1c8)})]})]});}
1
+ (function(_0x1c9fa3,_0x3121b4){const _0x43664a=a29_0x5a7a,_0x17173a=_0x1c9fa3();while(!![]){try{const _0x9c47b3=parseInt(_0x43664a(0x176))/0x1*(-parseInt(_0x43664a(0x16d))/0x2)+parseInt(_0x43664a(0x172))/0x3+parseInt(_0x43664a(0x151))/0x4+-parseInt(_0x43664a(0x15f))/0x5+parseInt(_0x43664a(0x157))/0x6*(parseInt(_0x43664a(0x16a))/0x7)+-parseInt(_0x43664a(0x158))/0x8*(-parseInt(_0x43664a(0x168))/0x9)+-parseInt(_0x43664a(0x140))/0xa;if(_0x9c47b3===_0x3121b4)break;else _0x17173a['push'](_0x17173a['shift']());}catch(_0x199e3a){_0x17173a['push'](_0x17173a['shift']());}}}(a29_0x5728,0x9abb8));import{jsx as a29_0x3cd3af,jsxs as a29_0x432fad,Fragment as a29_0xee5819}from'react/jsx-runtime';import{useState}from'react';import{Text,Box,useInput}from'ink';function a29_0x5728(){const _0x375b95=['login','\x20\x20使用\x20←→\x20选择,回车确认','*\x20是否要自动拉取\x20API\x20配置?','\x20\x20推荐选择\x20Yes,登录后可自动拉取并配置\x20API\x20接口','绑定应用AppCode可自动配置\x20API,如:\x20app-c4c89304\x20(直接回车跳过)','6GbmgSj','3832760tXsojd','rightArrow','\x20←\x20','leftArrow','login-process','env','*\x20应用AppCode\x20','4231710hHUzvL','green','backspace','includes','登录状态','length','登录失败','*\x20正在检查登录状态...','[可选]:\x20','9rjYmFV','项目名','4538793qjjgqx','app-code','yellow','3076IKhikJ','*\x20正在登录,请前往浏览器完成登录...','login-prompt','api-pull','*\x20是否要先登录以便拉取\x20API\x20配置?','1625376VXLjzE','return','label','项目名不合法','446zVlnKb','gray','online','trim','confirm-api-pull','\x20检查中...','\x20直接回车确认,或输入自定义名称','column','项目名长度不能超过\x2050\x20个字符','Yes','应用AppCode只能包含字母、数字、连字符和下划线,且必须以字母或数字开头','login-check','已登录','test','4998530XgFvbj','!\x20未检测到有效登录','slice','*\x20项目名:\x20','应用AppCode','map','project-name','value','应用AppCode不合法','*\x20创建新项目','creating','string','拉取API配置','未设置','cyan','√\x20检测到有效登录状态','my-app','3986564yruJDi'];a29_0x5728=function(){return _0x375b95;};return a29_0x5728();}import{getIsSessionValid}from'../auth/is-session-valid.js';import{authServer}from'../auth/auth-server.js';function a29_0x5a7a(_0x4a8c14,_0x473dbc){const _0x57281c=a29_0x5728();return a29_0x5a7a=function(_0x5a7a29,_0x26a44e){_0x5a7a29=_0x5a7a29-0x13b;let _0x3b625b=_0x57281c[_0x5a7a29];return _0x3b625b;},a29_0x5a7a(_0x4a8c14,_0x473dbc);}import{readConfig}from'../utils/config.js';export function EnhancedGuidedCreate(_0x5aad03){const _0x3178b7=a29_0x5a7a,{onCreate:_0x5516cc,env:_0x581836}=_0x5aad03,[_0x128845,_0x12dcbc]=useState(_0x3178b7(0x146)),[_0x4ffea3,_0x480177]=useState(''),[_0x1396fc,_0x25ced2]=useState(''),[_0x4b83a1,_0x1168a0]=useState(''),[_0x269f27,_0x10522e]=useState(''),[_0x4de89c,_0x1aad9e]=useState([]),[_0x1ec3d0,_0xf78dfd]=useState(null),[_0xde154e,_0x123989]=useState(![]),[_0x3fb1c3,_0x4312f8]=useState(![]),[_0x363750,_0x298045]=useState(![]),[_0x350b54,_0x296c75]=useState(0x0),[_0x2fe0a1,_0x4508b0]=useState(0x0),_0x155d5d=_0x3178b7(0x150),_0x3a1e8f=readConfig(),_0x172cb8=typeof _0x3a1e8f[_0x3178b7(0x15d)]===_0x3178b7(0x14b)?_0x3a1e8f[_0x3178b7(0x15d)]:undefined;function _0x34d0d1(_0xd70959){const _0x5272dd=_0x3178b7;if(_0xd70959[_0x5272dd(0x164)]>0x32)return{'valid':![],'message':_0x5272dd(0x17e)};const _0x60795=/^[A-Za-z0-9][A-Za-z0-9_-]*$/;if(_0xd70959?.[_0x5272dd(0x179)]()&&!_0x60795['test'](_0xd70959))return{'valid':![],'message':'项目名只能以字母或数字开头,且只包含字母、数字、-\x20和\x20_'};return{'valid':!![]};}function _0x1630c9(_0x511793){const _0x4f6a0d=_0x3178b7;if(!_0x511793[_0x4f6a0d(0x179)]())return{'valid':!![]};if(_0x511793[_0x4f6a0d(0x164)]>0x64)return{'valid':![],'message':'应用AppCode长度不能超过\x20100\x20个字符'};const _0x3611d3=/^[a-zA-Z0-9][a-zA-Z0-9_-]*$/;if(!_0x3611d3[_0x4f6a0d(0x13f)](_0x511793))return{'valid':![],'message':_0x4f6a0d(0x13c)};return{'valid':!![]};}async function _0x4e6816(){_0x123989(!![]);try{const _0x4243a4=await getIsSessionValid();return _0xf78dfd(_0x4243a4),_0x4243a4;}catch(_0x39c5b7){return _0xf78dfd(![]),![];}finally{_0x123989(![]);}}async function _0x42a974(){_0x4312f8(!![]);try{const _0x195666=await authServer({'silent':!![]});return _0xf78dfd(_0x195666),_0x195666;}catch(_0x252756){return _0xf78dfd(![]),![];}finally{_0x4312f8(![]);}}return useInput(async(_0x5d8495,_0x8f236f)=>{const _0x453c81=_0x3178b7;if(_0x8f236f[_0x453c81(0x15b)]||_0x8f236f[_0x453c81(0x159)]){if(_0x128845===_0x453c81(0x17a)){_0x296c75(_0x3000b2=>_0x3000b2===0x0?0x1:0x0);return;}if(_0x128845==='login-prompt'){_0x4508b0(_0x5eafba=>_0x5eafba===0x0?0x1:0x0);return;}}if(_0x8f236f[_0x453c81(0x173)]){if(_0x128845===_0x453c81(0x146)){const _0x34a8f9=_0x4b83a1['trim']()||_0x155d5d;if(_0x269f27)return;_0x480177(_0x34a8f9),_0x1aad9e([{'step':_0x453c81(0x146),'label':_0x453c81(0x169),'value':_0x34a8f9}]),_0x1168a0(''),_0x10522e(''),_0x12dcbc(_0x453c81(0x16b));return;}if(_0x128845===_0x453c81(0x16b)){if(_0x269f27)return;const _0x1db451=_0x4b83a1[_0x453c81(0x179)]();_0x25ced2(_0x1db451),_0x1aad9e(_0x24f34c=>[..._0x24f34c,{'step':_0x453c81(0x16b),'label':_0x453c81(0x144),'value':_0x1db451||_0x453c81(0x14d)}]),_0x1168a0(''),_0x10522e('');if(_0x1db451){_0x12dcbc(_0x453c81(0x13d));const _0x5bc648=await _0x4e6816();_0x5bc648?_0x12dcbc(_0x453c81(0x17a)):_0x12dcbc('login-prompt');}else{const _0x8656cb=_0x581836||_0x172cb8||_0x453c81(0x178);_0x5516cc({'projectName':_0x4ffea3,'appCode':undefined,'pullApi':![],'env':_0x8656cb}),_0x12dcbc(_0x453c81(0x14a));}return;}if(_0x128845===_0x453c81(0x17a)){const _0x1cb04a=_0x350b54===0x0;_0x298045(_0x1cb04a),_0x1aad9e(_0x30e3b4=>[..._0x30e3b4,{'step':_0x453c81(0x170),'label':_0x453c81(0x14c),'value':_0x1cb04a?'是':'否'}]);const _0x11ec1c=_0x581836||_0x172cb8||'online';_0x5516cc({'projectName':_0x4ffea3,'appCode':_0x1396fc,'pullApi':_0x1cb04a,'env':_0x11ec1c}),_0x12dcbc('creating');return;}if(_0x128845===_0x453c81(0x16f)){const _0x527935=_0x2fe0a1===0x0;if(_0x527935){_0x12dcbc(_0x453c81(0x15c));const _0x2785a6=await _0x42a974();if(_0x2785a6)_0x1aad9e(_0x45d97e=>[..._0x45d97e,{'step':_0x453c81(0x152),'label':_0x453c81(0x163),'value':_0x453c81(0x13e)}]),_0x12dcbc('confirm-api-pull');else{_0x1aad9e(_0x4f23f9=>[..._0x4f23f9,{'step':_0x453c81(0x152),'label':'登录状态','value':_0x453c81(0x165)}]);const _0x4237d5=_0x581836||_0x172cb8||_0x453c81(0x178);_0x5516cc({'projectName':_0x4ffea3,'appCode':_0x1396fc,'pullApi':![],'env':_0x4237d5}),_0x12dcbc(_0x453c81(0x14a));}}else{_0x1aad9e(_0x5ea420=>[..._0x5ea420,{'step':_0x453c81(0x152),'label':_0x453c81(0x163),'value':'跳过登录'}]);const _0x4c2a4a=_0x581836||_0x172cb8||_0x453c81(0x178);_0x5516cc({'projectName':_0x4ffea3,'appCode':_0x1396fc,'pullApi':![],'env':_0x4c2a4a}),_0x12dcbc(_0x453c81(0x14a));}return;}}if(_0x8f236f[_0x453c81(0x161)]||_0x8f236f['delete']){_0x1168a0(_0x38fd43=>{const _0x249e55=_0x453c81,_0x33ff9c=_0x38fd43[_0x249e55(0x142)](0x0,-0x1);if(_0x128845===_0x249e55(0x146)){const {valid:_0xcce1e4,message:_0x280321}=_0x34d0d1(_0x33ff9c);_0x10522e(_0xcce1e4?'':_0x280321||_0x249e55(0x175));}else{if(_0x128845===_0x249e55(0x16b)){const {valid:_0x4dcf81,message:_0x5e5af3}=_0x1630c9(_0x33ff9c);_0x10522e(_0x4dcf81?'':_0x5e5af3||_0x249e55(0x148));}}return _0x33ff9c;});return;}if([_0x453c81(0x14a),_0x453c81(0x13d),_0x453c81(0x15c)][_0x453c81(0x162)](_0x128845))return;if(_0x128845==='confirm-api-pull'||_0x128845===_0x453c81(0x16f))return;_0x1168a0(_0x15f267=>{const _0x3114a5=_0x453c81,_0x364255=_0x15f267+_0x5d8495;if(_0x128845===_0x3114a5(0x146)){const {valid:_0x276fa1,message:_0x7d09e7}=_0x34d0d1(_0x364255);_0x10522e(_0x276fa1?'':_0x7d09e7||_0x3114a5(0x175));}else{if(_0x128845===_0x3114a5(0x16b)){const {valid:_0x3116de,message:_0x35dc7f}=_0x1630c9(_0x364255);_0x10522e(_0x3116de?'':_0x35dc7f||_0x3114a5(0x148));}}return _0x364255;});}),a29_0x432fad(Box,{'flexDirection':_0x3178b7(0x17d),'marginTop':0x1,'children':[_0x4de89c['length']===0x0&&a29_0x3cd3af(Box,{'children':a29_0x3cd3af(Text,{'color':_0x3178b7(0x14e),'children':_0x3178b7(0x149)})}),_0x4de89c[_0x3178b7(0x145)](_0x30a8ef=>a29_0x432fad(Box,{'children':[a29_0x432fad(Text,{'color':'green','children':['√\x20',_0x30a8ef[_0x3178b7(0x174)],':\x20']}),a29_0x3cd3af(Text,{'color':_0x3178b7(0x14e),'children':_0x30a8ef[_0x3178b7(0x147)]})]},_0x30a8ef['step'])),_0x128845===_0x3178b7(0x146)&&a29_0x432fad(a29_0xee5819,{'children':[a29_0x432fad(Box,{'children':[a29_0x3cd3af(Text,{'children':_0x3178b7(0x143)}),_0x4b83a1?a29_0x3cd3af(Text,{'color':'green','children':_0x4b83a1}):a29_0x3cd3af(Text,{'color':_0x3178b7(0x177),'children':_0x155d5d}),_0x269f27&&a29_0x432fad(Text,{'color':'red','children':[_0x3178b7(0x15a),_0x269f27]})]}),!_0x269f27&&!_0x4b83a1&&a29_0x3cd3af(Box,{'children':a29_0x3cd3af(Text,{'color':_0x3178b7(0x177),'children':_0x3178b7(0x17c)})})]}),_0x128845===_0x3178b7(0x16b)&&a29_0x432fad(a29_0xee5819,{'children':[a29_0x432fad(Box,{'children':[a29_0x3cd3af(Text,{'children':_0x3178b7(0x15e)}),a29_0x3cd3af(Text,{'color':_0x3178b7(0x177),'children':_0x3178b7(0x167)}),a29_0x3cd3af(Text,{'color':_0x3178b7(0x160),'children':_0x4b83a1}),_0x269f27&&a29_0x432fad(Text,{'color':'red','children':['\x20←\x20',_0x269f27]})]}),!_0x269f27&&a29_0x3cd3af(Box,{'children':a29_0x432fad(Text,{'color':_0x3178b7(0x177),'children':['\x20',_0x3178b7(0x156)]})})]}),_0x128845===_0x3178b7(0x13d)&&a29_0x432fad(Box,{'children':[a29_0x3cd3af(Text,{'children':_0x3178b7(0x166)}),_0xde154e&&a29_0x3cd3af(Text,{'color':_0x3178b7(0x177),'children':_0x3178b7(0x17b)})]}),_0x128845===_0x3178b7(0x17a)&&a29_0x432fad(a29_0xee5819,{'children':[a29_0x3cd3af(Box,{'children':a29_0x3cd3af(Text,{'color':'green','children':_0x3178b7(0x14f)})}),a29_0x3cd3af(Box,{'marginTop':0x1,'children':a29_0x3cd3af(Text,{'children':_0x3178b7(0x154)})}),a29_0x432fad(Box,{'marginLeft':0x2,'children':[a29_0x432fad(Text,{'color':_0x350b54===0x0?_0x3178b7(0x160):_0x3178b7(0x177),'children':[_0x350b54===0x0?'▶\x20':'\x20\x20',_0x3178b7(0x13b)]}),a29_0x3cd3af(Text,{'children':'\x20'}),a29_0x432fad(Text,{'color':_0x350b54===0x1?_0x3178b7(0x160):_0x3178b7(0x177),'children':[_0x350b54===0x1?'▶\x20':'\x20\x20','No']})]}),a29_0x3cd3af(Box,{'children':a29_0x3cd3af(Text,{'color':_0x3178b7(0x177),'children':_0x3178b7(0x153)})}),a29_0x3cd3af(Box,{'children':a29_0x3cd3af(Text,{'color':_0x3178b7(0x16c),'children':'\x20\x20推荐选择\x20Yes,可自动配置\x20API\x20接口'})})]}),_0x128845===_0x3178b7(0x16f)&&a29_0x432fad(a29_0xee5819,{'children':[a29_0x3cd3af(Box,{'children':a29_0x3cd3af(Text,{'color':_0x3178b7(0x16c),'children':_0x3178b7(0x141)})}),a29_0x3cd3af(Box,{'marginTop':0x1,'children':a29_0x3cd3af(Text,{'children':_0x3178b7(0x171)})}),a29_0x432fad(Box,{'marginLeft':0x2,'children':[a29_0x432fad(Text,{'color':_0x2fe0a1===0x0?'green':_0x3178b7(0x177),'children':[_0x2fe0a1===0x0?'▶\x20':'\x20\x20',_0x3178b7(0x13b)]}),a29_0x3cd3af(Text,{'children':'\x20'}),a29_0x432fad(Text,{'color':_0x2fe0a1===0x1?_0x3178b7(0x160):'gray','children':[_0x2fe0a1===0x1?'▶\x20':'\x20\x20','No']})]}),a29_0x3cd3af(Box,{'children':a29_0x3cd3af(Text,{'color':'gray','children':'\x20\x20使用\x20←→\x20选择,回车确认'})}),a29_0x3cd3af(Box,{'children':a29_0x3cd3af(Text,{'color':_0x3178b7(0x16c),'children':_0x3178b7(0x155)})})]}),_0x128845===_0x3178b7(0x15c)&&a29_0x432fad(Box,{'children':[a29_0x3cd3af(Text,{'children':_0x3178b7(0x16e)}),_0x3fb1c3&&a29_0x3cd3af(Text,{'color':_0x3178b7(0x177),'children':'\x20登录中...'})]})]});}
@@ -1 +1 @@
1
- function a30_0x43c3(){const _0x125738=['2jXzKyV','32946ijUJBc','765030MKtwOv','189OTcdrC','14853gJAlVk','141167QoltSz','824475PXlerM','33649ELBNKx','1728GQFTYY','toFixed','10377AKxoVV','replace','92JHIycG','160tcBALp','now'];a30_0x43c3=function(){return _0x125738;};return a30_0x43c3();}function a30_0x4dba(_0x20546d,_0x21ccb2){const _0x43c365=a30_0x43c3();return a30_0x4dba=function(_0x4dba85,_0xe86f30){_0x4dba85=_0x4dba85-0x85;let _0x5125b9=_0x43c365[_0x4dba85];return _0x5125b9;},a30_0x4dba(_0x20546d,_0x21ccb2);}(function(_0x2ee71a,_0x312dc6){const _0x2f60fe=a30_0x4dba,_0x6e1c9d=_0x2ee71a();while(!![]){try{const _0x42b97a=-parseInt(_0x2f60fe(0x8c))/0x1*(parseInt(_0x2f60fe(0x87))/0x2)+parseInt(_0x2f60fe(0x8b))/0x3*(-parseInt(_0x2f60fe(0x93))/0x4)+parseInt(_0x2f60fe(0x8d))/0x5+-parseInt(_0x2f60fe(0x88))/0x6*(parseInt(_0x2f60fe(0x8a))/0x7)+-parseInt(_0x2f60fe(0x85))/0x8*(parseInt(_0x2f60fe(0x91))/0x9)+-parseInt(_0x2f60fe(0x89))/0xa+parseInt(_0x2f60fe(0x8e))/0xb*(parseInt(_0x2f60fe(0x8f))/0xc);if(_0x42b97a===_0x312dc6)break;else _0x6e1c9d['push'](_0x6e1c9d['shift']());}catch(_0x38c331){_0x6e1c9d['push'](_0x6e1c9d['shift']());}}}(a30_0x43c3,0x19083));export function formatElapsed(_0x4baead){const _0x39832f=a30_0x4dba,_0x3c6be8=Date[_0x39832f(0x86)]()-_0x4baead;if(_0x3c6be8<0x3e8)return _0x3c6be8+'ms';const _0x238149=(_0x3c6be8/0x3e8)[_0x39832f(0x90)](0x2),_0x37d1c4=_0x238149[_0x39832f(0x92)](/\.?0+$/u,'');return _0x37d1c4+'s';}
1
+ (function(_0xfda603,_0xd7ee6d){const _0x202b0a=a30_0x5056,_0x45018e=_0xfda603();while(!![]){try{const _0x20ef9d=parseInt(_0x202b0a(0x78))/0x1+parseInt(_0x202b0a(0x77))/0x2+parseInt(_0x202b0a(0x7c))/0x3+-parseInt(_0x202b0a(0x79))/0x4+parseInt(_0x202b0a(0x76))/0x5+parseInt(_0x202b0a(0x7a))/0x6+parseInt(_0x202b0a(0x7d))/0x7*(-parseInt(_0x202b0a(0x7e))/0x8);if(_0x20ef9d===_0xd7ee6d)break;else _0x45018e['push'](_0x45018e['shift']());}catch(_0x459d19){_0x45018e['push'](_0x45018e['shift']());}}}(a30_0x432c,0x765b1));export function formatElapsed(_0x5afdce){const _0x4960a2=a30_0x5056,_0x4fc008=Date[_0x4960a2(0x7b)]()-_0x5afdce;if(_0x4fc008<0x3e8)return _0x4fc008+'ms';const _0x2e932c=(_0x4fc008/0x3e8)['toFixed'](0x2),_0x3b34f8=_0x2e932c['replace'](/\.?0+$/u,'');return _0x3b34f8+'s';}function a30_0x5056(_0x1a2f66,_0x1f1769){const _0x432c6c=a30_0x432c();return a30_0x5056=function(_0x505645,_0x1942d0){_0x505645=_0x505645-0x76;let _0x5c6a64=_0x432c6c[_0x505645];return _0x5c6a64;},a30_0x5056(_0x1a2f66,_0x1f1769);}function a30_0x432c(){const _0x11fe88=['1236900sAxhZX','4187058LgIbgX','now','231138eBwLkQ','2219fIgUlf','13304opiHaZ','2388385FlYjKK','65296LSqSdF','35967EbMrCs'];a30_0x432c=function(){return _0x11fe88;};return a30_0x432c();}