@lovrabet/cli 1.1.0 → 1.1.1
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.
- package/lib/add-page/input-page-router.js +1 -1
- package/lib/add-page/main.js +1 -1
- package/lib/add-page/select-page-template.js +1 -1
- package/lib/api/api-pull-ui.js +1 -1
- package/lib/api/format-dataset.js +1 -1
- package/lib/api/generate-api-file.js +1 -1
- package/lib/api/main.js +1 -1
- package/lib/api/pull-silent.js +1 -1
- package/lib/api/pull.js +1 -1
- package/lib/auth/auth-server-ui.js +1 -1
- package/lib/auth/auth-server.js +1 -1
- package/lib/auth/constant.js +1 -1
- package/lib/auth/get-cookie.js +1 -1
- package/lib/auth/is-session-valid.js +1 -1
- package/lib/auth/logout.js +1 -1
- package/lib/cli.js +1 -1
- package/lib/cmd/build-watch.js +1 -1
- package/lib/cmd/build.js +1 -1
- package/lib/cmd/logs.js +1 -1
- package/lib/cmd/preview.js +1 -1
- package/lib/cmd/start.js +1 -1
- package/lib/config/config-help.js +1 -1
- package/lib/config/main.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/create-app/enhanced-guided-create.js +1 -1
- package/lib/create-app/format-elapsed.js +1 -1
- package/lib/create-app/main.js +1 -1
- package/lib/create-app/task-finished.js +1 -1
- package/lib/create-app/task-loading.js +1 -1
- package/lib/create-app/task-running.js +1 -1
- package/lib/create-app/task-time.js +1 -1
- package/lib/create-app/use-copy-project-template.js +1 -1
- package/lib/create-app/use-format-code.js +1 -1
- package/lib/create-app/use-install-dependencies.js +1 -1
- package/lib/help.js +1 -1
- package/lib/utils/config.js +1 -1
- package/lib/utils/copy-directory.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/router-updater.js +1 -1
- package/lib/utils/template-replacer.js +1 -1
- package/package.json +1 -1
package/lib/cmd/build.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x304e52,_0x1dd9e6){const _0x4db069=a18_0x3990,_0x1dc441=_0x304e52();while(!![]){try{const _0x193eff=parseInt(_0x4db069(0xfb))/0x1*(-parseInt(_0x4db069(0x100))/0x2)+-parseInt(_0x4db069(0xe7))/0x3*(-parseInt(_0x4db069(0x101))/0x4)+-parseInt(_0x4db069(0xef))/0x5*(-parseInt(_0x4db069(0xf3))/0x6)+parseInt(_0x4db069(0xfd))/0x7+parseInt(_0x4db069(0xed))/0x8+parseInt(_0x4db069(0xf4))/0x9+-parseInt(_0x4db069(0xf0))/0xa;if(_0x193eff===_0x1dd9e6)break;else _0x1dc441['push'](_0x1dc441['shift']());}catch(_0x34b10a){_0x1dc441['push'](_0x1dc441['shift']());}}}(a18_0x433f,0xb37b4));function a18_0x433f(){const _0x53c487=['cwd','584918hGuMGS','build','6562185JEzopa','npm\x20run\x20build\x20exited\x20with\x20code\x20','stderr','4ehzHqM','124XBywDR','data','toString','1194wDsGDD','message','项目构建失败','trim','项目构建出错','error','11729384UXMjJJ','now','5ofZssJ','26509690KmtTNh','pipe','PATH','6922794RLXweb','8875764JfLinu','node_modules','开始构建项目','.bin','run','env'];a18_0x433f=function(){return _0x53c487;};return a18_0x433f();}import{delimiter,join}from'node:path';import{spawn}from'node:child_process';function a18_0x3990(_0x799808,_0x5c9830){const _0x433fdc=a18_0x433f();return a18_0x3990=function(_0x399077,_0x1224b5){_0x399077=_0x399077-0xe6;let _0x2c356c=_0x433fdc[_0x399077];return _0x2c356c;},a18_0x3990(_0x799808,_0x5c9830);}import{logger}from'../utils/logger.js';export function runBuild(){return new Promise((_0x92940f,_0x2b55dc)=>{const _0x27564b=a18_0x3990,_0x19ae77=Date[_0x27564b(0xee)]();logger['info'](_0x27564b(0xfc),_0x27564b(0xf6),{'command':'npm\x20run\x20build'});let _0x5f5197='';const _0x5dd925=spawn('npm',[_0x27564b(0xf8),_0x27564b(0xfc)],{'stdio':['inherit','inherit',_0x27564b(0xf1)],'shell':!![],'env':{...process[_0x27564b(0xf9)],'PATH':''+join(process[_0x27564b(0xfa)](),_0x27564b(0xf5),_0x27564b(0xf7))+delimiter+process[_0x27564b(0xf9)][_0x27564b(0xf2)]}});_0x5dd925[_0x27564b(0xff)]?.['on'](_0x27564b(0x102),_0x1b725a=>{const _0x40342f=_0x27564b;_0x5f5197+=_0x1b725a[_0x40342f(0xe6)]();}),_0x5dd925['on']('close',_0x15acf0=>{const _0x5479b9=_0x27564b,_0x2d4e23=Date[_0x5479b9(0xee)]()-_0x19ae77;if(_0x15acf0===0x0||_0x15acf0===null)logger['success'](_0x5479b9(0xfc),'项目构建成功',_0x2d4e23),_0x92940f();else{const _0x4ab458={'exitCode':_0x15acf0,'duration':_0x2d4e23,'command':'npm\x20run\x20build','cwd':process[_0x5479b9(0xfa)]()};_0x5f5197[_0x5479b9(0xea)]()&&(_0x4ab458[_0x5479b9(0xff)]=_0x5f5197[_0x5479b9(0xea)]()),logger[_0x5479b9(0xec)]('build',_0x5479b9(0xe9),_0x4ab458),_0x2b55dc(new Error(_0x5479b9(0xfe)+_0x15acf0));}}),_0x5dd925['on'](_0x27564b(0xec),_0x4361dd=>{const _0x1a8f3d=_0x27564b,_0x56b1b2=Date[_0x1a8f3d(0xee)]()-_0x19ae77;logger[_0x1a8f3d(0xec)]('build',_0x1a8f3d(0xeb),{'error':_0x4361dd[_0x1a8f3d(0xe8)],'duration':_0x56b1b2,'stderr':_0x5f5197[_0x1a8f3d(0xea)]()||undefined}),_0x2b55dc(_0x4361dd);});});}
|
package/lib/cmd/logs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x2ba8f6,_0x345949){const _0x337d1c=a19_0x4b50,_0x45c721=_0x2ba8f6();while(!![]){try{const _0x1d80ca=parseInt(_0x337d1c(0xc3))/0x1*(-parseInt(_0x337d1c(0xc9))/0x2)+-parseInt(_0x337d1c(0xc5))/0x3+parseInt(_0x337d1c(0xc4))/0x4*(parseInt(_0x337d1c(0xbe))/0x5)+-parseInt(_0x337d1c(0xc2))/0x6*(parseInt(_0x337d1c(0xc7))/0x7)+parseInt(_0x337d1c(0xb8))/0x8+-parseInt(_0x337d1c(0xbb))/0x9+parseInt(_0x337d1c(0xb2))/0xa;if(_0x1d80ca===_0x345949)break;else _0x45c721['push'](_0x45c721['shift']());}catch(_0x1f9c08){_0x45c721['push'](_0x45c721['shift']());}}}(a19_0x540e,0x62705));function a19_0x4b50(_0x424be4,_0x4ab041){const _0x540e5c=a19_0x540e();return a19_0x4b50=function(_0x4b5023,_0x17bc4c){_0x4b5023=_0x4b5023-0xab;let _0x5aaaa2=_0x540e5c[_0x4b5023];return _0x5aaaa2;},a19_0x4b50(_0x424be4,_0x4ab041);}import{logger}from'../utils/logger.js';export function showLogs(){const _0x357dc2=a19_0x4b50;logger['setLogPath'](process['cwd']());const _0x5301c5=logger[_0x357dc2(0xb5)]();if(_0x5301c5[_0x357dc2(0xb7)]===0x0){console[_0x357dc2(0xc1)](_0x357dc2(0xad));return;}console[_0x357dc2(0xc1)](_0x357dc2(0xc6)),_0x5301c5['forEach']((_0x4c4b9a,_0x134a54)=>{const _0x5af7bb=_0x357dc2,_0x51fb71=new Date(_0x4c4b9a[_0x5af7bb(0xbc)])[_0x5af7bb(0xb1)]('zh-CN'),_0x1b0c7a=_0x4c4b9a['level']===_0x5af7bb(0xbf)?'√':_0x4c4b9a['level']===_0x5af7bb(0xb0)?'×':_0x4c4b9a[_0x5af7bb(0xae)]===_0x5af7bb(0xb9)?'!':'i';console[_0x5af7bb(0xc1)](_0x134a54+0x1+'.\x20'+_0x1b0c7a+'\x20['+_0x4c4b9a['command']+']\x20'+_0x4c4b9a[_0x5af7bb(0xba)]),console[_0x5af7bb(0xc1)]('\x20\x20\x20时间:\x20'+_0x51fb71),_0x4c4b9a[_0x5af7bb(0xb4)]&&console['log']('\x20\x20\x20耗时:\x20'+_0x4c4b9a['duration']+'ms'),_0x4c4b9a['details']&&Object[_0x5af7bb(0xaf)](_0x4c4b9a[_0x5af7bb(0xbd)])[_0x5af7bb(0xb7)]>0x0&&console[_0x5af7bb(0xc1)](_0x5af7bb(0xb3)+JSON[_0x5af7bb(0xc8)](_0x4c4b9a[_0x5af7bb(0xbd)],null,0x2)),console[_0x5af7bb(0xc1)]('');});}function a19_0x540e(){const _0x42c15e=['5700060AFJSEH','timestamp','details','5LnltMM','success','cwd','log','2562HpVJmz','47IRSqqq','2076956FSsopZ','1503996AZozxZ','*\x20Lovrabet\x20CLI\x20日志记录:\x0a','6139wYVgeS','stringify','30698YLWTap','*\x20日志已清空','clearLogs','*\x20暂无日志记录','level','keys','error','toLocaleString','17587450bKBDkm','\x20\x20\x20详情:\x20','duration','readLogs','setLogPath','length','2846200xoDxXw','warn','message'];a19_0x540e=function(){return _0x42c15e;};return a19_0x540e();}export function clearLogs(){const _0x31a8aa=a19_0x4b50;logger[_0x31a8aa(0xb6)](process[_0x31a8aa(0xc0)]()),logger[_0x31a8aa(0xac)](),console[_0x31a8aa(0xc1)](_0x31a8aa(0xab));}
|
package/lib/cmd/preview.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x2b8f7e,_0x1e045a){const _0xfb5ff=a20_0x5647,_0x8f1189=_0x2b8f7e();while(!![]){try{const _0x5eec48=parseInt(_0xfb5ff(0xcd))/0x1+-parseInt(_0xfb5ff(0xc7))/0x2+-parseInt(_0xfb5ff(0xdf))/0x3+parseInt(_0xfb5ff(0xe1))/0x4*(parseInt(_0xfb5ff(0xd6))/0x5)+parseInt(_0xfb5ff(0xd2))/0x6+-parseInt(_0xfb5ff(0xca))/0x7*(parseInt(_0xfb5ff(0xda))/0x8)+-parseInt(_0xfb5ff(0xc6))/0x9;if(_0x5eec48===_0x1e045a)break;else _0x8f1189['push'](_0x8f1189['shift']());}catch(_0x490e5d){_0x8f1189['push'](_0x8f1189['shift']());}}}(a20_0x18e0,0xce6c6));import{delimiter,join}from'node:path';function a20_0x5647(_0x28857b,_0x4ae1a3){const _0x18e007=a20_0x18e0();return a20_0x5647=function(_0x5647ef,_0x343fdf){_0x5647ef=_0x5647ef-0xc5;let _0x3f9fea=_0x18e007[_0x5647ef];return _0x3f9fea;},a20_0x5647(_0x28857b,_0x4ae1a3);}import{spawn}from'node:child_process';import{logger}from'../utils/logger.js';export function runPreview(){return new Promise((_0x21b4db,_0xae8612)=>{const _0x1a3acc=a20_0x5647,_0x42cb92=Date[_0x1a3acc(0xd7)]();logger[_0x1a3acc(0xc9)](_0x1a3acc(0xd3),'启动预览服务器',{'command':_0x1a3acc(0xd5)});let _0x2079ca='';const _0x5311a0=spawn(_0x1a3acc(0xcb),[_0x1a3acc(0xd3)],{'stdio':['inherit',_0x1a3acc(0xc5),_0x1a3acc(0xcf)],'shell':!![],'env':{...process[_0x1a3acc(0xd1)],'PATH':''+join(process[_0x1a3acc(0xde)](),_0x1a3acc(0xdd),_0x1a3acc(0xd4))+delimiter+process[_0x1a3acc(0xd1)][_0x1a3acc(0xce)]}});_0x5311a0[_0x1a3acc(0xcc)]?.['on'](_0x1a3acc(0xdc),_0x43aaa8=>{_0x2079ca+=_0x43aaa8['toString']();}),_0x5311a0['on'](_0x1a3acc(0xc8),_0x13a56e=>{const _0x2ee09d=_0x1a3acc,_0x2f985a=Date['now']()-_0x42cb92;if(_0x13a56e===0x0||_0x13a56e===null)logger['success'](_0x2ee09d(0xd3),_0x2ee09d(0xd0),_0x2f985a),_0x21b4db();else{const _0x29e252={'exitCode':_0x13a56e,'duration':_0x2f985a,'command':_0x2ee09d(0xd5),'cwd':process['cwd']()};_0x2079ca['trim']()&&(_0x29e252[_0x2ee09d(0xcc)]=_0x2079ca['trim']()),logger[_0x2ee09d(0xdb)](_0x2ee09d(0xd3),'预览服务器启动失败',_0x29e252),_0xae8612(new Error(_0x2ee09d(0xd8)+_0x13a56e));}}),_0x5311a0['on'](_0x1a3acc(0xdb),_0x51c6c7=>{const _0x3bd9fd=_0x1a3acc,_0x5b9f14=Date[_0x3bd9fd(0xd7)]()-_0x42cb92;logger['error']('preview',_0x3bd9fd(0xe2),{'error':_0x51c6c7[_0x3bd9fd(0xd9)],'duration':_0x5b9f14,'stderr':_0x2079ca[_0x3bd9fd(0xe0)]()||undefined}),_0xae8612(_0x51c6c7);});});}function a20_0x18e0(){const _0x535ffc=['env','9273672VpBixH','preview','.bin','vite\x20preview','33975xUqVVz','now','vite\x20preview\x20exited\x20with\x20code\x20','message','16BFxtFU','error','data','node_modules','cwd','160173lHOlcq','trim','764THtIfW','预览服务器启动出错','inherit','15736419whxReK','2013886NsmWaf','close','info','383992GWqBoL','vite','stderr','920590IjUCQz','PATH','pipe','预览服务器启动成功'];a20_0x18e0=function(){return _0x535ffc;};return a20_0x18e0();}
|
package/lib/cmd/start.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x30f3c3,_0x39933b){const _0x5ecf55=a21_0x3801,_0x3905fd=_0x30f3c3();while(!![]){try{const _0x5c4bc2=-parseInt(_0x5ecf55(0xaf))/0x1+-parseInt(_0x5ecf55(0xc4))/0x2+parseInt(_0x5ecf55(0xc3))/0x3+-parseInt(_0x5ecf55(0xbd))/0x4*(parseInt(_0x5ecf55(0xc5))/0x5)+-parseInt(_0x5ecf55(0xc8))/0x6+parseInt(_0x5ecf55(0xb9))/0x7+parseInt(_0x5ecf55(0xb5))/0x8;if(_0x5c4bc2===_0x39933b)break;else _0x3905fd['push'](_0x3905fd['shift']());}catch(_0x21b59e){_0x3905fd['push'](_0x3905fd['shift']());}}}(a21_0x1467,0x25aff));function a21_0x3801(_0x3bc4e1,_0x291908){const _0x146798=a21_0x1467();return a21_0x3801=function(_0x380165,_0xe7f535){_0x380165=_0x380165-0xaf;let _0x4e9309=_0x146798[_0x380165];return _0x4e9309;},a21_0x3801(_0x3bc4e1,_0x291908);}import{delimiter,join}from'node:path';import{spawn}from'node:child_process';import{logger}from'../utils/logger.js';function a21_0x1467(){const _0x5c565e=['close','start','开发服务器启动成功','vite\x20exited\x20with\x20code\x20','585852nElmIl','278996pyHrkb','5fhEKwa','inherit','stderr','897816TVlaCt','246622KLHFAs','error','message','开发服务器启动出错','trim','vite','3028536DUwxyX','cwd','now','success','1164842PkBFKV','开发服务器启动失败','toString','pipe','200536xXQkDP','.bin'];a21_0x1467=function(){return _0x5c565e;};return a21_0x1467();}export function runStart(_0xeb7c43){return new Promise((_0x5c3906,_0x28d4fe)=>{const _0x3a40aa=a21_0x3801,_0x8c06b4=Date['now'](),_0x465e5e=_0xeb7c43||process[_0x3a40aa(0xb6)]();logger['info']('start','启动开发服务器',{'command':'vite','cwd':_0x465e5e});let _0x41b767='';const _0x291da1=spawn('vite',{'stdio':['inherit',_0x3a40aa(0xc6),_0x3a40aa(0xbc)],'shell':!![],'cwd':_0x465e5e,'env':{...process['env'],'PATH':''+join(_0x465e5e,'node_modules',_0x3a40aa(0xbe))+delimiter+process['env']['PATH']}});_0x291da1[_0x3a40aa(0xc7)]?.['on']('data',_0x275548=>{const _0x482ace=_0x3a40aa,_0x5604e0=_0x275548[_0x482ace(0xbb)]();_0x41b767+=_0x5604e0,process[_0x482ace(0xc7)]['write'](_0x5604e0);}),_0x291da1['on'](_0x3a40aa(0xbf),_0x1243ed=>{const _0x299179=_0x3a40aa,_0x36d196=Date[_0x299179(0xb7)]()-_0x8c06b4;if(_0x1243ed===0x0||_0x1243ed===null)logger[_0x299179(0xb8)](_0x299179(0xc0),_0x299179(0xc1),_0x36d196),_0x5c3906();else{const _0x1ca256={'exitCode':_0x1243ed,'duration':_0x36d196,'command':_0x299179(0xb4),'cwd':_0x465e5e};_0x41b767['trim']()&&(_0x1ca256[_0x299179(0xc7)]=_0x41b767[_0x299179(0xb3)]()),logger[_0x299179(0xb0)](_0x299179(0xc0),_0x299179(0xba),_0x1ca256),_0x28d4fe(new Error(_0x299179(0xc2)+_0x1243ed));}}),_0x291da1['on'](_0x3a40aa(0xb0),_0x5b9aca=>{const _0x5b621a=_0x3a40aa,_0xf32242=Date[_0x5b621a(0xb7)]()-_0x8c06b4,_0x1f7ef6={'error':_0x5b9aca[_0x5b621a(0xb1)],'duration':_0xf32242,'command':_0x5b621a(0xb4),'cwd':_0x465e5e};_0x41b767['trim']()&&(_0x1f7ef6[_0x5b621a(0xc7)]=_0x41b767[_0x5b621a(0xb3)]()),logger['error'](_0x5b621a(0xc0),_0x5b621a(0xb2),_0x1f7ef6),_0x28d4fe(_0x5b9aca);});});}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x42d775,_0x2d807d){const _0x6ea40b=a22_0x14fc,_0x4d61de=_0x42d775();while(!![]){try{const _0x451db1=-parseInt(_0x6ea40b(0x15d))/0x1*(-parseInt(_0x6ea40b(0x157))/0x2)+-parseInt(_0x6ea40b(0x15f))/0x3*(-parseInt(_0x6ea40b(0x150))/0x4)+parseInt(_0x6ea40b(0x156))/0x5*(parseInt(_0x6ea40b(0x15a))/0x6)+-parseInt(_0x6ea40b(0x158))/0x7+parseInt(_0x6ea40b(0x164))/0x8+parseInt(_0x6ea40b(0x155))/0x9*(-parseInt(_0x6ea40b(0x161))/0xa)+-parseInt(_0x6ea40b(0x154))/0xb*(parseInt(_0x6ea40b(0x151))/0xc);if(_0x451db1===_0x2d807d)break;else _0x4d61de['push'](_0x4d61de['shift']());}catch(_0x511fd7){_0x4d61de['push'](_0x4d61de['shift']());}}}(a22_0x2e4c,0x60229));function a22_0x14fc(_0x3c2a58,_0x3b83f9){const _0x2e4c59=a22_0x2e4c();return a22_0x14fc=function(_0x14fc0a,_0x65a90){_0x14fc0a=_0x14fc0a-0x14e;let _0x5e92c9=_0x2e4c59[_0x14fc0a];return _0x5e92c9;},a22_0x14fc(_0x3c2a58,_0x3b83f9);}import{jsxs as a22_0x565c8f,jsx as a22_0x596b5a}from'react/jsx-runtime';import{Box,Text}from'ink';function a22_0x2e4c(){const _0x2d668a=['column','lovrabet\x20config\x20get\x20<key>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','8088BLqjwN','description','3dUDJfa','map','6338910oPxiiR','\x20*\x20配置示例:','gray','5005904DtBXXt','配置当前项目的\x20App\x20Code','lovrabet\x20config\x20list\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','command','获取配置项','lovrabet\x20config\x20set\x20<key>\x20<value>\x20\x20\x20','965176vOSDOY','156fBTSkb','\x20\x20\x20\x20','无效的命令,可用命令如下:','394801XnEWkT','9oIUsoq','478415aVLsnR','188NgZhPA','2270989rCVyUi','设置配置项','12hKplzO'];a22_0x2e4c=function(){return _0x2d668a;};return a22_0x2e4c();}export function ConfigHelp(){const _0x2e5be9=a22_0x14fc,_0x47857c=[{'command':_0x2e5be9(0x14f),'description':_0x2e5be9(0x159)},{'command':_0x2e5be9(0x15c),'description':_0x2e5be9(0x14e)},{'command':_0x2e5be9(0x166),'description':'列出所有配置项'}],_0x1b24c2=[{'command':'lovrabet\x20config\x20set\x20app\x20app-xxxxx\x20\x20\x20','description':_0x2e5be9(0x165)}];return a22_0x565c8f(Box,{'flexDirection':_0x2e5be9(0x15b),'marginTop':0x1,'marginBottom':0x1,'children':[a22_0x596b5a(Box,{'marginBottom':0x1,'children':a22_0x565c8f(Text,{'color':_0x2e5be9(0x163),'children':['\x20!','\x20\x20',_0x2e5be9(0x153)]})}),_0x47857c['map'](_0x5c6363=>a22_0x565c8f(Box,{'children':[a22_0x565c8f(Text,{'children':[_0x2e5be9(0x152),_0x5c6363[_0x2e5be9(0x167)]]}),a22_0x596b5a(Text,{'color':'gray','children':_0x5c6363[_0x2e5be9(0x15e)]})]},_0x5c6363['command'])),a22_0x596b5a(Box,{'marginTop':0x1,'marginBottom':0x1,'children':a22_0x596b5a(Text,{'color':_0x2e5be9(0x163),'children':_0x2e5be9(0x162)})}),_0x1b24c2[_0x2e5be9(0x160)](_0x37c05f=>a22_0x565c8f(Box,{'children':[a22_0x565c8f(Text,{'children':[_0x2e5be9(0x152),_0x37c05f[_0x2e5be9(0x167)]]}),a22_0x596b5a(Text,{'color':_0x2e5be9(0x163),'children':_0x37c05f[_0x2e5be9(0x15e)]})]},_0x37c05f['command']))]});}
|
package/lib/config/main.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a23_0x851d1=a23_0x371e;(function(_0x431e70,_0x46e625){const _0x578ff4=a23_0x371e,_0x5eb502=_0x431e70();while(!![]){try{const _0x339092=-parseInt(_0x578ff4(0x150))/0x1*(parseInt(_0x578ff4(0x144))/0x2)+parseInt(_0x578ff4(0x14b))/0x3*(-parseInt(_0x578ff4(0x152))/0x4)+-parseInt(_0x578ff4(0x154))/0x5+parseInt(_0x578ff4(0x14a))/0x6+parseInt(_0x578ff4(0x146))/0x7*(-parseInt(_0x578ff4(0x151))/0x8)+-parseInt(_0x578ff4(0x148))/0x9*(parseInt(_0x578ff4(0x14d))/0xa)+parseInt(_0x578ff4(0x142))/0xb;if(_0x339092===_0x46e625)break;else _0x5eb502['push'](_0x5eb502['shift']());}catch(_0x410a7a){_0x5eb502['push'](_0x5eb502['shift']());}}}(a23_0x439c,0xb4d1b));function a23_0x371e(_0x2dd21e,_0x231d34){const _0x439cea=a23_0x439c();return a23_0x371e=function(_0x371ee7,_0x376f48){_0x371ee7=_0x371ee7-0x141;let _0x2dcfcb=_0x439cea[_0x371ee7];return _0x2dcfcb;},a23_0x371e(_0x2dd21e,_0x231d34);}import{jsx as a23_0x2da50f}from'react/jsx-runtime';function a23_0x439c(){const _0x6b4fd0=['54222091pSASaL','input','58aJGOlp','get','280vepjxb','includes','1785015jWiauR','log','6142992rQDGCK','21CrCNWw','red','50qKLyPj','stringify','保存配置失败','40841rKjTLS','242984CoXZtU','406180HsFWHs','cwd','5553395HDfgaK','set','list','undefined'];a23_0x439c=function(){return _0x6b4fd0;};return a23_0x439c();}import{resolve}from'node:path';import{writeFileSync}from'node:fs';import{ConfigHelp}from'./config-help.js';import{Box,Text}from'ink';import{readConfig}from'../utils/config.js';const configPath=resolve(process[a23_0x851d1(0x153)](),'.lovrabetrc');export function Config(_0x45c368){const _0x23223b=a23_0x851d1,{cli:_0x25da37}=_0x45c368,_0x109db3=_0x25da37[_0x23223b(0x143)][0x1],_0x166531=_0x25da37[_0x23223b(0x143)][0x2],_0x1a439f=[_0x23223b(0x155),_0x23223b(0x145)][_0x23223b(0x147)](_0x109db3||''),_0x3ead99=_0x25da37['input']['length']>=0x3,_0x487046=readConfig();if(_0x109db3===_0x23223b(0x155)){if(_0x166531){const _0x4ee5ba=_0x25da37[_0x23223b(0x143)][0x3];if(typeof _0x4ee5ba!==_0x23223b(0x141)){_0x487046[_0x166531]=_0x4ee5ba;try{writeFileSync(configPath,JSON['stringify'](_0x487046,null,0x2),{'encoding':'utf8'});}catch(_0x1eceb2){return a23_0x2da50f(Box,{'children':a23_0x2da50f(Text,{'color':_0x23223b(0x14c),'children':_0x23223b(0x14f)})});}return null;}return a23_0x2da50f(Box,{'children':a23_0x2da50f(Text,{'color':_0x23223b(0x14c),'children':'未提供配置值'})});}}if(_0x109db3==='get'){if(_0x166531)return console['log'](_0x487046[_0x166531]||_0x23223b(0x141)),null;return null;}if(_0x109db3===_0x23223b(0x156))return console[_0x23223b(0x149)](JSON[_0x23223b(0x14e)](_0x487046,null,0x2)),null;if(!_0x1a439f||!_0x3ead99)return a23_0x2da50f(ConfigHelp,{});return null;}
|
package/lib/constant/domain.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a24_0x3c29b4=a24_0x2b26;(function(_0x207bcb,_0x551440){const _0x400640=a24_0x2b26,_0x295e81=_0x207bcb();while(!![]){try{const _0x23da26=parseInt(_0x400640(0x180))/0x1*(parseInt(_0x400640(0x183))/0x2)+-parseInt(_0x400640(0x189))/0x3*(parseInt(_0x400640(0x186))/0x4)+-parseInt(_0x400640(0x187))/0x5+-parseInt(_0x400640(0x18e))/0x6+-parseInt(_0x400640(0x181))/0x7*(-parseInt(_0x400640(0x18f))/0x8)+-parseInt(_0x400640(0x18b))/0x9*(-parseInt(_0x400640(0x18c))/0xa)+parseInt(_0x400640(0x18a))/0xb*(parseInt(_0x400640(0x184))/0xc);if(_0x23da26===_0x551440)break;else _0x295e81['push'](_0x295e81['shift']());}catch(_0x176d21){_0x295e81['push'](_0x295e81['shift']());}}}(a24_0x39b4,0xa7807));function a24_0x2b26(_0x37876f,_0x387ba3){const _0x39b42c=a24_0x39b4();return a24_0x2b26=function(_0x2b26ad,_0x99b203){_0x2b26ad=_0x2b26ad-0x180;let _0x111b29=_0x39b42c[_0x2b26ad];return _0x111b29;},a24_0x2b26(_0x37876f,_0x387ba3);}import{getEnv}from'./env.js';export const getUserDomain=()=>getEnv()===a24_0x3c29b4(0x188)?a24_0x3c29b4(0x185):a24_0x3c29b4(0x18d);function a24_0x39b4(){const _0x22f276=['313340oQRRSj','4837790pxKEeC','online','33HXZRvW','12903935vbmpCw','153243LCMvaU','130hUsRHw','https://user-daily.lovrabet.com','5027142YBXdAC','8HHmWgT','59adygFr','3921589EouzyJ','https://daily-api.lovrabet.com','7642FVAWob','24bLQmjE','https://user.lovrabet.com'];a24_0x39b4=function(){return _0x22f276;};return a24_0x39b4();}export const getApiDomain=()=>getEnv()===a24_0x3c29b4(0x188)?'https://api.lovrabet.com':a24_0x3c29b4(0x182);
|
package/lib/constant/env.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a25_0x2acc(_0x1585ed,_0x32a72a){const _0x171735=a25_0x1717();return a25_0x2acc=function(_0x2accb4,_0x594843){_0x2accb4=_0x2accb4-0xbe;let _0x1ba8de=_0x171735[_0x2accb4];return _0x1ba8de;},a25_0x2acc(_0x1585ed,_0x32a72a);}const a25_0x4fde1b=a25_0x2acc;(function(_0x15e9e7,_0x176380){const _0x313758=a25_0x2acc,_0xc57e6c=_0x15e9e7();while(!![]){try{const _0x47f32c=parseInt(_0x313758(0xbe))/0x1*(-parseInt(_0x313758(0xc5))/0x2)+parseInt(_0x313758(0xc1))/0x3+parseInt(_0x313758(0xc9))/0x4*(parseInt(_0x313758(0xcc))/0x5)+parseInt(_0x313758(0xc0))/0x6*(-parseInt(_0x313758(0xc6))/0x7)+-parseInt(_0x313758(0xca))/0x8*(parseInt(_0x313758(0xc8))/0x9)+-parseInt(_0x313758(0xc2))/0xa*(-parseInt(_0x313758(0xbf))/0xb)+-parseInt(_0x313758(0xc3))/0xc*(-parseInt(_0x313758(0xc4))/0xd);if(_0x47f32c===_0x176380)break;else _0xc57e6c['push'](_0xc57e6c['shift']());}catch(_0x2da504){_0xc57e6c['push'](_0xc57e6c['shift']());}}}(a25_0x1717,0xe1117));let env=process['env'][a25_0x4fde1b(0xc7)]||a25_0x4fde1b(0xcb);function a25_0x1717(){const _0x23c5a9=['683170yjiHCT','1PZzqkb','278894yaobwo','8154VWBlAy','3213966QHSybZ','110zHLjsy','12Kfmzlt','30123899UHVebh','1186118YFNuRy','7588zSNpxW','LOVRABET_ENV','1413LNllhn','28JVpPpG','83352LWvlWB','online'];a25_0x1717=function(){return _0x23c5a9;};return a25_0x1717();}export function getEnv(){return env;}export function initEnv(_0x26ac36){env=_0x26ac36;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x1805a3,_0x296e1b){const _0x4ada04=a26_0x4026,_0x239e19=_0x1805a3();while(!![]){try{const _0x15befa=parseInt(_0x4ada04(0xf4))/0x1+parseInt(_0x4ada04(0x103))/0x2+-parseInt(_0x4ada04(0xeb))/0x3+parseInt(_0x4ada04(0xf9))/0x4*(-parseInt(_0x4ada04(0xd1))/0x5)+parseInt(_0x4ada04(0xdc))/0x6+-parseInt(_0x4ada04(0xfa))/0x7*(parseInt(_0x4ada04(0xd9))/0x8)+-parseInt(_0x4ada04(0xca))/0x9*(-parseInt(_0x4ada04(0xdd))/0xa);if(_0x15befa===_0x296e1b)break;else _0x239e19['push'](_0x239e19['shift']());}catch(_0xd36227){_0x239e19['push'](_0x239e19['shift']());}}}(a26_0x5a1f,0x66b0e));import{jsx as a26_0x56ee04,jsxs as a26_0xec85bf,Fragment as a26_0x4ec71e}from'react/jsx-runtime';import{useState}from'react';import{Text,Box,useInput}from'ink';function a26_0x5a1f(){const _0xea5e13=['项目名不合法','8UIabgJ','√\x20检测到有效登录状态','[可选]:\x20','3935712ioHCQr','184010NwxXGv','login-prompt','Yes','gray','登录状态','creating','length','\x20\x20推荐选择\x20Yes,可自动配置\x20API\x20接口','\x20直接回车确认,或输入自定义名称','test','step','*\x20正在登录,请前往浏览器完成登录...','\x20←\x20','login-process','2493114DhMlvm','trim','项目名','project-name','*\x20创建新项目','未设置','*\x20项目名:\x20','map','label','361671cvfOYf','应用AppCode长度不能超过\x20100\x20个字符','column','login-check','*\x20应用AppCode\x20','708fkyEhM','3767393FEmJZb','delete','*\x20正在检查登录状态...','\x20\x20使用\x20←→\x20选择,回车确认','leftArrow','red','\x20\x20推荐选择\x20Yes,登录后可自动拉取并配置\x20API\x20接口','跳过登录','app-code','947392TpeFKn','已登录','rightArrow','登录失败','\x20检查中...','green','531aWxrKV','*\x20是否要自动拉取\x20API\x20配置?','应用AppCode','slice','!\x20未检测到有效登录','cyan','confirm-api-pull','22235lEAJTu','login','includes','项目名长度不能超过\x2050\x20个字符','yellow','绑定应用AppCode可自动配置\x20API,如:\x20app-c4c89304\x20(直接回车跳过)','api-pull'];a26_0x5a1f=function(){return _0xea5e13;};return a26_0x5a1f();}function a26_0x4026(_0x1876f6,_0x546dd3){const _0x5a1fd5=a26_0x5a1f();return a26_0x4026=function(_0x40260c,_0x156567){_0x40260c=_0x40260c-0xc7;let _0x2d1a90=_0x5a1fd5[_0x40260c];return _0x2d1a90;},a26_0x4026(_0x1876f6,_0x546dd3);}import{getIsSessionValid}from'../auth/is-session-valid.js';import{authServer}from'../auth/auth-server.js';export function EnhancedGuidedCreate(_0x2283c1){const _0x14bb6d=a26_0x4026,{onCreate:_0x563a9d}=_0x2283c1,[_0x4a7e0e,_0x152116]=useState('project-name'),[_0x577ea6,_0x463ff8]=useState(''),[_0x3c4e96,_0x4e74a4]=useState(''),[_0x53236d,_0x26e2c9]=useState(''),[_0x4d0d99,_0x1bbe71]=useState(''),[_0x4444f3,_0x36665a]=useState([]),[_0x364a5b,_0x670d82]=useState(null),[_0x2a8b83,_0x3293ce]=useState(![]),[_0x246225,_0x46f4d2]=useState(![]),[_0x518bc9,_0x5973c8]=useState(![]),[_0x5991ef,_0x1dc219]=useState(0x0),[_0x5075a6,_0x3bfb74]=useState(0x0),_0x4e7e7e='my-app';function _0x49b888(_0x1c2611){const _0x3b628f=a26_0x4026;if(_0x1c2611[_0x3b628f(0xe3)]>0x32)return{'valid':![],'message':_0x3b628f(0xd4)};const _0x518298=/^[A-Za-z0-9][A-Za-z0-9_-]*$/;if(_0x1c2611?.[_0x3b628f(0xec)]()&&!_0x518298[_0x3b628f(0xe6)](_0x1c2611))return{'valid':![],'message':'项目名只能以字母或数字开头,且只包含字母、数字、-\x20和\x20_'};return{'valid':!![]};}function _0x5c5507(_0x314145){const _0x5a258a=a26_0x4026;if(!_0x314145[_0x5a258a(0xec)]())return{'valid':!![]};if(_0x314145[_0x5a258a(0xe3)]>0x64)return{'valid':![],'message':_0x5a258a(0xf5)};const _0x47dc1d=/^[a-zA-Z0-9][a-zA-Z0-9_-]*$/;if(!_0x47dc1d[_0x5a258a(0xe6)](_0x314145))return{'valid':![],'message':'应用AppCode只能包含字母、数字、连字符和下划线,且必须以字母或数字开头'};return{'valid':!![]};}async function _0x59f50c(){_0x3293ce(!![]);try{const _0x440a20=await getIsSessionValid();return _0x670d82(_0x440a20),_0x440a20;}catch(_0x3fdc1d){return _0x670d82(![]),![];}finally{_0x3293ce(![]);}}async function _0x3ad262(){_0x46f4d2(!![]);try{const _0x3b5ea7=await authServer({'silent':!![]});return _0x670d82(_0x3b5ea7),_0x3b5ea7;}catch(_0x13d9a8){return _0x670d82(![]),![];}finally{_0x46f4d2(![]);}}return useInput(async(_0xf805df,_0x43927f)=>{const _0x34bb58=a26_0x4026;if(_0x43927f[_0x34bb58(0xfe)]||_0x43927f[_0x34bb58(0x105)]){if(_0x4a7e0e===_0x34bb58(0xd0)){_0x1dc219(_0x8370d3=>_0x8370d3===0x0?0x1:0x0);return;}if(_0x4a7e0e===_0x34bb58(0xde)){_0x3bfb74(_0x303983=>_0x303983===0x0?0x1:0x0);return;}}if(_0x43927f['return']){if(_0x4a7e0e==='project-name'){const _0x66b0ad=_0x53236d[_0x34bb58(0xec)]()||_0x4e7e7e;if(_0x4d0d99)return;_0x463ff8(_0x66b0ad),_0x36665a([{'step':_0x34bb58(0xee),'label':_0x34bb58(0xed),'value':_0x66b0ad}]),_0x26e2c9(''),_0x1bbe71(''),_0x152116(_0x34bb58(0x102));return;}if(_0x4a7e0e===_0x34bb58(0x102)){if(_0x4d0d99)return;const _0x4872f0=_0x53236d['trim']();_0x4e74a4(_0x4872f0),_0x36665a(_0x5243f2=>[..._0x5243f2,{'step':'app-code','label':_0x34bb58(0xcc),'value':_0x4872f0||_0x34bb58(0xf0)}]),_0x26e2c9(''),_0x1bbe71('');if(_0x4872f0){_0x152116(_0x34bb58(0xf7));const _0x4c3f99=await _0x59f50c();_0x4c3f99?_0x152116(_0x34bb58(0xd0)):_0x152116(_0x34bb58(0xde));}else _0x563a9d({'projectName':_0x577ea6,'appCode':undefined,'pullApi':![]}),_0x152116(_0x34bb58(0xe2));return;}if(_0x4a7e0e===_0x34bb58(0xd0)){const _0x39f149=_0x5991ef===0x0;_0x5973c8(_0x39f149),_0x36665a(_0x3df7c0=>[..._0x3df7c0,{'step':_0x34bb58(0xd7),'label':'拉取API配置','value':_0x39f149?'是':'否'}]),_0x563a9d({'projectName':_0x577ea6,'appCode':_0x3c4e96,'pullApi':_0x39f149}),_0x152116(_0x34bb58(0xe2));return;}if(_0x4a7e0e===_0x34bb58(0xde)){const _0x5dd85b=_0x5075a6===0x0;if(_0x5dd85b){_0x152116(_0x34bb58(0xea));const _0x428ed4=await _0x3ad262();_0x428ed4?(_0x36665a(_0x8f8777=>[..._0x8f8777,{'step':_0x34bb58(0xd2),'label':'登录状态','value':_0x34bb58(0x104)}]),_0x152116('confirm-api-pull')):(_0x36665a(_0x322882=>[..._0x322882,{'step':_0x34bb58(0xd2),'label':_0x34bb58(0xe1),'value':_0x34bb58(0xc7)}]),_0x563a9d({'projectName':_0x577ea6,'appCode':_0x3c4e96,'pullApi':![]}),_0x152116(_0x34bb58(0xe2)));}else _0x36665a(_0x395027=>[..._0x395027,{'step':'login','label':_0x34bb58(0xe1),'value':_0x34bb58(0x101)}]),_0x563a9d({'projectName':_0x577ea6,'appCode':_0x3c4e96,'pullApi':![]}),_0x152116('creating');return;}}if(_0x43927f['backspace']||_0x43927f[_0x34bb58(0xfb)]){_0x26e2c9(_0x5d991f=>{const _0x2a257d=_0x34bb58,_0x4cd2f1=_0x5d991f[_0x2a257d(0xcd)](0x0,-0x1);if(_0x4a7e0e===_0x2a257d(0xee)){const {valid:_0x3b07b0,message:_0x3e5c40}=_0x49b888(_0x4cd2f1);_0x1bbe71(_0x3b07b0?'':_0x3e5c40||_0x2a257d(0xd8));}else{if(_0x4a7e0e===_0x2a257d(0x102)){const {valid:_0x17c922,message:_0x2ece25}=_0x5c5507(_0x4cd2f1);_0x1bbe71(_0x17c922?'':_0x2ece25||'应用AppCode不合法');}}return _0x4cd2f1;});return;}if([_0x34bb58(0xe2),_0x34bb58(0xf7),'login-process'][_0x34bb58(0xd3)](_0x4a7e0e))return;if(_0x4a7e0e===_0x34bb58(0xd0)||_0x4a7e0e==='login-prompt')return;_0x26e2c9(_0x59117d=>{const _0x34e7dd=_0x34bb58,_0x5cb57a=_0x59117d+_0xf805df;if(_0x4a7e0e===_0x34e7dd(0xee)){const {valid:_0x4fb5e0,message:_0x1f290f}=_0x49b888(_0x5cb57a);_0x1bbe71(_0x4fb5e0?'':_0x1f290f||_0x34e7dd(0xd8));}else{if(_0x4a7e0e==='app-code'){const {valid:_0x3b9afc,message:_0x394b8c}=_0x5c5507(_0x5cb57a);_0x1bbe71(_0x3b9afc?'':_0x394b8c||'应用AppCode不合法');}}return _0x5cb57a;});}),a26_0xec85bf(Box,{'flexDirection':_0x14bb6d(0xf6),'marginTop':0x1,'children':[_0x4444f3[_0x14bb6d(0xe3)]===0x0&&a26_0x56ee04(Box,{'children':a26_0x56ee04(Text,{'color':_0x14bb6d(0xcf),'children':_0x14bb6d(0xef)})}),_0x4444f3[_0x14bb6d(0xf2)](_0x35c23a=>a26_0xec85bf(Box,{'children':[a26_0xec85bf(Text,{'color':_0x14bb6d(0xc9),'children':['√\x20',_0x35c23a[_0x14bb6d(0xf3)],':\x20']}),a26_0x56ee04(Text,{'color':'cyan','children':_0x35c23a['value']})]},_0x35c23a[_0x14bb6d(0xe7)])),_0x4a7e0e===_0x14bb6d(0xee)&&a26_0xec85bf(a26_0x4ec71e,{'children':[a26_0xec85bf(Box,{'children':[a26_0x56ee04(Text,{'children':_0x14bb6d(0xf1)}),_0x53236d?a26_0x56ee04(Text,{'color':_0x14bb6d(0xc9),'children':_0x53236d}):a26_0x56ee04(Text,{'color':_0x14bb6d(0xe0),'children':_0x4e7e7e}),_0x4d0d99&&a26_0xec85bf(Text,{'color':_0x14bb6d(0xff),'children':['\x20←\x20',_0x4d0d99]})]}),!_0x4d0d99&&!_0x53236d&&a26_0x56ee04(Box,{'children':a26_0x56ee04(Text,{'color':_0x14bb6d(0xe0),'children':_0x14bb6d(0xe5)})})]}),_0x4a7e0e===_0x14bb6d(0x102)&&a26_0xec85bf(a26_0x4ec71e,{'children':[a26_0xec85bf(Box,{'children':[a26_0x56ee04(Text,{'children':_0x14bb6d(0xf8)}),a26_0x56ee04(Text,{'color':_0x14bb6d(0xe0),'children':_0x14bb6d(0xdb)}),a26_0x56ee04(Text,{'color':_0x14bb6d(0xc9),'children':_0x53236d}),_0x4d0d99&&a26_0xec85bf(Text,{'color':_0x14bb6d(0xff),'children':[_0x14bb6d(0xe9),_0x4d0d99]})]}),!_0x4d0d99&&a26_0x56ee04(Box,{'children':a26_0xec85bf(Text,{'color':_0x14bb6d(0xe0),'children':['\x20',_0x14bb6d(0xd6)]})})]}),_0x4a7e0e==='login-check'&&a26_0xec85bf(Box,{'children':[a26_0x56ee04(Text,{'children':_0x14bb6d(0xfc)}),_0x2a8b83&&a26_0x56ee04(Text,{'color':_0x14bb6d(0xe0),'children':_0x14bb6d(0xc8)})]}),_0x4a7e0e==='confirm-api-pull'&&a26_0xec85bf(a26_0x4ec71e,{'children':[a26_0x56ee04(Box,{'children':a26_0x56ee04(Text,{'color':'green','children':_0x14bb6d(0xda)})}),a26_0x56ee04(Box,{'marginTop':0x1,'children':a26_0x56ee04(Text,{'children':_0x14bb6d(0xcb)})}),a26_0xec85bf(Box,{'marginLeft':0x2,'children':[a26_0xec85bf(Text,{'color':_0x5991ef===0x0?_0x14bb6d(0xc9):'gray','children':[_0x5991ef===0x0?'▶\x20':'\x20\x20',_0x14bb6d(0xdf)]}),a26_0x56ee04(Text,{'children':'\x20'}),a26_0xec85bf(Text,{'color':_0x5991ef===0x1?_0x14bb6d(0xc9):'gray','children':[_0x5991ef===0x1?'▶\x20':'\x20\x20','No']})]}),a26_0x56ee04(Box,{'children':a26_0x56ee04(Text,{'color':_0x14bb6d(0xe0),'children':_0x14bb6d(0xfd)})}),a26_0x56ee04(Box,{'children':a26_0x56ee04(Text,{'color':'yellow','children':_0x14bb6d(0xe4)})})]}),_0x4a7e0e===_0x14bb6d(0xde)&&a26_0xec85bf(a26_0x4ec71e,{'children':[a26_0x56ee04(Box,{'children':a26_0x56ee04(Text,{'color':_0x14bb6d(0xd5),'children':_0x14bb6d(0xce)})}),a26_0x56ee04(Box,{'marginTop':0x1,'children':a26_0x56ee04(Text,{'children':'*\x20是否要先登录以便拉取\x20API\x20配置?'})}),a26_0xec85bf(Box,{'marginLeft':0x2,'children':[a26_0xec85bf(Text,{'color':_0x5075a6===0x0?_0x14bb6d(0xc9):'gray','children':[_0x5075a6===0x0?'▶\x20':'\x20\x20',_0x14bb6d(0xdf)]}),a26_0x56ee04(Text,{'children':'\x20'}),a26_0xec85bf(Text,{'color':_0x5075a6===0x1?_0x14bb6d(0xc9):'gray','children':[_0x5075a6===0x1?'▶\x20':'\x20\x20','No']})]}),a26_0x56ee04(Box,{'children':a26_0x56ee04(Text,{'color':'gray','children':_0x14bb6d(0xfd)})}),a26_0x56ee04(Box,{'children':a26_0x56ee04(Text,{'color':_0x14bb6d(0xd5),'children':_0x14bb6d(0x100)})})]}),_0x4a7e0e==='login-process'&&a26_0xec85bf(Box,{'children':[a26_0x56ee04(Text,{'children':_0x14bb6d(0xe8)}),_0x246225&&a26_0x56ee04(Text,{'color':_0x14bb6d(0xe0),'children':'\x20登录中...'})]})]});}
|
|
1
|
+
(function(_0x1ee688,_0x28c4c7){const _0x354b66=a26_0x4856,_0x3a21f8=_0x1ee688();while(!![]){try{const _0x5c2e3a=parseInt(_0x354b66(0xfa))/0x1+parseInt(_0x354b66(0xe5))/0x2+-parseInt(_0x354b66(0x10d))/0x3*(-parseInt(_0x354b66(0xeb))/0x4)+-parseInt(_0x354b66(0xf8))/0x5*(-parseInt(_0x354b66(0x10c))/0x6)+parseInt(_0x354b66(0x116))/0x7*(-parseInt(_0x354b66(0xf7))/0x8)+parseInt(_0x354b66(0xec))/0x9*(-parseInt(_0x354b66(0xe0))/0xa)+parseInt(_0x354b66(0xfc))/0xb*(-parseInt(_0x354b66(0xfe))/0xc);if(_0x5c2e3a===_0x28c4c7)break;else _0x3a21f8['push'](_0x3a21f8['shift']());}catch(_0x27316e){_0x3a21f8['push'](_0x3a21f8['shift']());}}}(a26_0x112d,0xad167));function a26_0x112d(){const _0x42c932=['2810024WuVwkk','6699345mLEyaz','my-app','912209DqdqDu','\x20←\x20','132AJNjWG','length','1122780gcUSwn','yellow','项目名长度不能超过\x2050\x20个字符','\x20检查中...','*\x20应用AppCode\x20','应用AppCode只能包含字母、数字、连字符和下划线,且必须以字母或数字开头','*\x20是否要先登录以便拉取\x20API\x20配置?','login','confirm-api-pull','未设置','*\x20正在登录,请前往浏览器完成登录...','Yes','项目名不合法','login-process','6mpHKzz','2200449IXVUMw','[可选]:\x20','已登录','api-pull','拉取API配置','gray','login-check','red','\x20直接回车确认,或输入自定义名称','14vblleo','\x20\x20使用\x20←→\x20选择,回车确认','应用AppCode长度不能超过\x20100\x20个字符','creating','rightArrow','login-prompt','*\x20创建新项目','*\x20项目名:\x20','!\x20未检测到有效登录','10uGFSKP','跳过登录','绑定应用AppCode可自动配置\x20API,如:\x20app-c4c89304\x20(直接回车跳过)','column','green','1815346RAXQgv','test','leftArrow','登录状态','app-code','项目名只能以字母或数字开头,且只包含字母、数字、-\x20和\x20_','4mQnfvY','12230829JxtopS','backspace','*\x20正在检查登录状态...','应用AppCode','project-name','cyan','return','slice','√\x20检测到有效登录状态','trim','登录失败'];a26_0x112d=function(){return _0x42c932;};return a26_0x112d();}import{jsx as a26_0x50378d,jsxs as a26_0x4ea38b,Fragment as a26_0xc98a7c}from'react/jsx-runtime';function a26_0x4856(_0x31e452,_0x42097c){const _0x112d53=a26_0x112d();return a26_0x4856=function(_0x4856d5,_0x53dbf0){_0x4856d5=_0x4856d5-0xdd;let _0x3bf5b6=_0x112d53[_0x4856d5];return _0x3bf5b6;},a26_0x4856(_0x31e452,_0x42097c);}import{useState}from'react';import{Text,Box,useInput}from'ink';import{getIsSessionValid}from'../auth/is-session-valid.js';import{authServer}from'../auth/auth-server.js';export function EnhancedGuidedCreate(_0x213fff){const _0x176c9f=a26_0x4856,{onCreate:_0x549e99}=_0x213fff,[_0x5aae43,_0x239372]=useState('project-name'),[_0x2dbabb,_0x4f2896]=useState(''),[_0x4dadb5,_0x37af26]=useState(''),[_0x1fc084,_0x3f026c]=useState(''),[_0x47c6ff,_0x16741b]=useState(''),[_0x2e623c,_0x3f1d9e]=useState([]),[_0x59e959,_0x534855]=useState(null),[_0x1513d8,_0x59405b]=useState(![]),[_0x4f83dc,_0x59f64f]=useState(![]),[_0x54d697,_0x581a1b]=useState(![]),[_0x7d7f1,_0x34b6dd]=useState(0x0),[_0x50d0f0,_0x4dbe61]=useState(0x0),_0x256f8b=_0x176c9f(0xf9);function _0x346ca4(_0xb5fed6){const _0x38dd87=_0x176c9f;if(_0xb5fed6[_0x38dd87(0xfd)]>0x32)return{'valid':![],'message':_0x38dd87(0x100)};const _0x155c17=/^[A-Za-z0-9][A-Za-z0-9_-]*$/;if(_0xb5fed6?.[_0x38dd87(0xf5)]()&&!_0x155c17[_0x38dd87(0xe6)](_0xb5fed6))return{'valid':![],'message':_0x38dd87(0xea)};return{'valid':!![]};}function _0x3561ea(_0x12fe84){const _0x4a9efc=_0x176c9f;if(!_0x12fe84[_0x4a9efc(0xf5)]())return{'valid':!![]};if(_0x12fe84[_0x4a9efc(0xfd)]>0x64)return{'valid':![],'message':_0x4a9efc(0x118)};const _0x1357cd=/^[a-zA-Z0-9][a-zA-Z0-9_-]*$/;if(!_0x1357cd[_0x4a9efc(0xe6)](_0x12fe84))return{'valid':![],'message':_0x4a9efc(0x103)};return{'valid':!![]};}async function _0x1e875a(){_0x59405b(!![]);try{const _0x20863d=await getIsSessionValid();return _0x534855(_0x20863d),_0x20863d;}catch(_0x300a57){return _0x534855(![]),![];}finally{_0x59405b(![]);}}async function _0x434e97(){_0x59f64f(!![]);try{const _0x19a2c7=await authServer({'silent':!![]});return _0x534855(_0x19a2c7),_0x19a2c7;}catch(_0x11a1db){return _0x534855(![]),![];}finally{_0x59f64f(![]);}}return useInput(async(_0x1de13a,_0x98a91e)=>{const _0x7faf2=_0x176c9f;if(_0x98a91e[_0x7faf2(0xe7)]||_0x98a91e[_0x7faf2(0x11a)]){if(_0x5aae43==='confirm-api-pull'){_0x34b6dd(_0x1d2837=>_0x1d2837===0x0?0x1:0x0);return;}if(_0x5aae43===_0x7faf2(0x11b)){_0x4dbe61(_0x5dd1a3=>_0x5dd1a3===0x0?0x1:0x0);return;}}if(_0x98a91e[_0x7faf2(0xf2)]){if(_0x5aae43===_0x7faf2(0xf0)){const _0x5f22ee=_0x1fc084['trim']()||_0x256f8b;if(_0x47c6ff)return;_0x4f2896(_0x5f22ee),_0x3f1d9e([{'step':_0x7faf2(0xf0),'label':'项目名','value':_0x5f22ee}]),_0x3f026c(''),_0x16741b(''),_0x239372(_0x7faf2(0xe9));return;}if(_0x5aae43==='app-code'){if(_0x47c6ff)return;const _0x403a74=_0x1fc084['trim']();_0x37af26(_0x403a74),_0x3f1d9e(_0x2dc010=>[..._0x2dc010,{'step':_0x7faf2(0xe9),'label':_0x7faf2(0xef),'value':_0x403a74||_0x7faf2(0x107)}]),_0x3f026c(''),_0x16741b('');if(_0x403a74){_0x239372(_0x7faf2(0x113));const _0x46434d=await _0x1e875a();_0x46434d?_0x239372(_0x7faf2(0x106)):_0x239372(_0x7faf2(0x11b));}else _0x549e99({'projectName':_0x2dbabb,'appCode':undefined,'pullApi':![]}),_0x239372(_0x7faf2(0x119));return;}if(_0x5aae43===_0x7faf2(0x106)){const _0x3d2772=_0x7d7f1===0x0;_0x581a1b(_0x3d2772),_0x3f1d9e(_0x52157f=>[..._0x52157f,{'step':_0x7faf2(0x110),'label':_0x7faf2(0x111),'value':_0x3d2772?'是':'否'}]),_0x549e99({'projectName':_0x2dbabb,'appCode':_0x4dadb5,'pullApi':_0x3d2772}),_0x239372(_0x7faf2(0x119));return;}if(_0x5aae43===_0x7faf2(0x11b)){const _0x57d85b=_0x50d0f0===0x0;if(_0x57d85b){_0x239372(_0x7faf2(0x10b));const _0x2c764d=await _0x434e97();_0x2c764d?(_0x3f1d9e(_0x16c221=>[..._0x16c221,{'step':'login','label':'登录状态','value':_0x7faf2(0x10f)}]),_0x239372(_0x7faf2(0x106))):(_0x3f1d9e(_0x39863f=>[..._0x39863f,{'step':_0x7faf2(0x105),'label':_0x7faf2(0xe8),'value':_0x7faf2(0xf6)}]),_0x549e99({'projectName':_0x2dbabb,'appCode':_0x4dadb5,'pullApi':![]}),_0x239372(_0x7faf2(0x119)));}else _0x3f1d9e(_0x6c6264=>[..._0x6c6264,{'step':_0x7faf2(0x105),'label':'登录状态','value':_0x7faf2(0xe1)}]),_0x549e99({'projectName':_0x2dbabb,'appCode':_0x4dadb5,'pullApi':![]}),_0x239372(_0x7faf2(0x119));return;}}if(_0x98a91e[_0x7faf2(0xed)]||_0x98a91e['delete']){_0x3f026c(_0x54e749=>{const _0x5d43f7=_0x7faf2,_0x4c3506=_0x54e749[_0x5d43f7(0xf3)](0x0,-0x1);if(_0x5aae43===_0x5d43f7(0xf0)){const {valid:_0x34d403,message:_0x71cdbb}=_0x346ca4(_0x4c3506);_0x16741b(_0x34d403?'':_0x71cdbb||_0x5d43f7(0x10a));}else{if(_0x5aae43===_0x5d43f7(0xe9)){const {valid:_0x4e27d1,message:_0x3dffcf}=_0x3561ea(_0x4c3506);_0x16741b(_0x4e27d1?'':_0x3dffcf||'应用AppCode不合法');}}return _0x4c3506;});return;}if(['creating','login-check',_0x7faf2(0x10b)]['includes'](_0x5aae43))return;if(_0x5aae43===_0x7faf2(0x106)||_0x5aae43===_0x7faf2(0x11b))return;_0x3f026c(_0x2c0630=>{const _0x30a894=_0x7faf2,_0x5c1b4a=_0x2c0630+_0x1de13a;if(_0x5aae43==='project-name'){const {valid:_0x5e9b13,message:_0x3978bb}=_0x346ca4(_0x5c1b4a);_0x16741b(_0x5e9b13?'':_0x3978bb||_0x30a894(0x10a));}else{if(_0x5aae43===_0x30a894(0xe9)){const {valid:_0x5e34db,message:_0x2322f2}=_0x3561ea(_0x5c1b4a);_0x16741b(_0x5e34db?'':_0x2322f2||'应用AppCode不合法');}}return _0x5c1b4a;});}),a26_0x4ea38b(Box,{'flexDirection':_0x176c9f(0xe3),'marginTop':0x1,'children':[_0x2e623c[_0x176c9f(0xfd)]===0x0&&a26_0x50378d(Box,{'children':a26_0x50378d(Text,{'color':_0x176c9f(0xf1),'children':_0x176c9f(0xdd)})}),_0x2e623c['map'](_0x478940=>a26_0x4ea38b(Box,{'children':[a26_0x4ea38b(Text,{'color':_0x176c9f(0xe4),'children':['√\x20',_0x478940['label'],':\x20']}),a26_0x50378d(Text,{'color':_0x176c9f(0xf1),'children':_0x478940['value']})]},_0x478940['step'])),_0x5aae43==='project-name'&&a26_0x4ea38b(a26_0xc98a7c,{'children':[a26_0x4ea38b(Box,{'children':[a26_0x50378d(Text,{'children':_0x176c9f(0xde)}),_0x1fc084?a26_0x50378d(Text,{'color':_0x176c9f(0xe4),'children':_0x1fc084}):a26_0x50378d(Text,{'color':_0x176c9f(0x112),'children':_0x256f8b}),_0x47c6ff&&a26_0x4ea38b(Text,{'color':_0x176c9f(0x114),'children':[_0x176c9f(0xfb),_0x47c6ff]})]}),!_0x47c6ff&&!_0x1fc084&&a26_0x50378d(Box,{'children':a26_0x50378d(Text,{'color':_0x176c9f(0x112),'children':_0x176c9f(0x115)})})]}),_0x5aae43==='app-code'&&a26_0x4ea38b(a26_0xc98a7c,{'children':[a26_0x4ea38b(Box,{'children':[a26_0x50378d(Text,{'children':_0x176c9f(0x102)}),a26_0x50378d(Text,{'color':_0x176c9f(0x112),'children':_0x176c9f(0x10e)}),a26_0x50378d(Text,{'color':_0x176c9f(0xe4),'children':_0x1fc084}),_0x47c6ff&&a26_0x4ea38b(Text,{'color':_0x176c9f(0x114),'children':[_0x176c9f(0xfb),_0x47c6ff]})]}),!_0x47c6ff&&a26_0x50378d(Box,{'children':a26_0x4ea38b(Text,{'color':_0x176c9f(0x112),'children':['\x20',_0x176c9f(0xe2)]})})]}),_0x5aae43===_0x176c9f(0x113)&&a26_0x4ea38b(Box,{'children':[a26_0x50378d(Text,{'children':_0x176c9f(0xee)}),_0x1513d8&&a26_0x50378d(Text,{'color':'gray','children':_0x176c9f(0x101)})]}),_0x5aae43==='confirm-api-pull'&&a26_0x4ea38b(a26_0xc98a7c,{'children':[a26_0x50378d(Box,{'children':a26_0x50378d(Text,{'color':_0x176c9f(0xe4),'children':_0x176c9f(0xf4)})}),a26_0x50378d(Box,{'marginTop':0x1,'children':a26_0x50378d(Text,{'children':'*\x20是否要自动拉取\x20API\x20配置?'})}),a26_0x4ea38b(Box,{'marginLeft':0x2,'children':[a26_0x4ea38b(Text,{'color':_0x7d7f1===0x0?_0x176c9f(0xe4):'gray','children':[_0x7d7f1===0x0?'▶\x20':'\x20\x20',_0x176c9f(0x109)]}),a26_0x50378d(Text,{'children':'\x20'}),a26_0x4ea38b(Text,{'color':_0x7d7f1===0x1?_0x176c9f(0xe4):_0x176c9f(0x112),'children':[_0x7d7f1===0x1?'▶\x20':'\x20\x20','No']})]}),a26_0x50378d(Box,{'children':a26_0x50378d(Text,{'color':_0x176c9f(0x112),'children':_0x176c9f(0x117)})}),a26_0x50378d(Box,{'children':a26_0x50378d(Text,{'color':_0x176c9f(0xff),'children':'\x20\x20推荐选择\x20Yes,可自动配置\x20API\x20接口'})})]}),_0x5aae43===_0x176c9f(0x11b)&&a26_0x4ea38b(a26_0xc98a7c,{'children':[a26_0x50378d(Box,{'children':a26_0x50378d(Text,{'color':'yellow','children':_0x176c9f(0xdf)})}),a26_0x50378d(Box,{'marginTop':0x1,'children':a26_0x50378d(Text,{'children':_0x176c9f(0x104)})}),a26_0x4ea38b(Box,{'marginLeft':0x2,'children':[a26_0x4ea38b(Text,{'color':_0x50d0f0===0x0?_0x176c9f(0xe4):_0x176c9f(0x112),'children':[_0x50d0f0===0x0?'▶\x20':'\x20\x20',_0x176c9f(0x109)]}),a26_0x50378d(Text,{'children':'\x20'}),a26_0x4ea38b(Text,{'color':_0x50d0f0===0x1?'green':_0x176c9f(0x112),'children':[_0x50d0f0===0x1?'▶\x20':'\x20\x20','No']})]}),a26_0x50378d(Box,{'children':a26_0x50378d(Text,{'color':_0x176c9f(0x112),'children':_0x176c9f(0x117)})}),a26_0x50378d(Box,{'children':a26_0x50378d(Text,{'color':_0x176c9f(0xff),'children':'\x20\x20推荐选择\x20Yes,登录后可自动拉取并配置\x20API\x20接口'})})]}),_0x5aae43===_0x176c9f(0x10b)&&a26_0x4ea38b(Box,{'children':[a26_0x50378d(Text,{'children':_0x176c9f(0x108)}),_0x4f83dc&&a26_0x50378d(Text,{'color':'gray','children':'\x20登录中...'})]})]});}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x300adf,_0x52c82d){const _0x5e1849=a27_0xcaf3,_0x4e2cd6=_0x300adf();while(!![]){try{const _0x44bf51=parseInt(_0x5e1849(0xe1))/0x1+parseInt(_0x5e1849(0xde))/0x2*(-parseInt(_0x5e1849(0xdf))/0x3)+-parseInt(_0x5e1849(0xe3))/0x4*(-parseInt(_0x5e1849(0xdc))/0x5)+-parseInt(_0x5e1849(0xdd))/0x6*(-parseInt(_0x5e1849(0xda))/0x7)+-parseInt(_0x5e1849(0xdb))/0x8*(parseInt(_0x5e1849(0xe6))/0x9)+parseInt(_0x5e1849(0xe5))/0xa*(-parseInt(_0x5e1849(0xe2))/0xb)+-parseInt(_0x5e1849(0xd8))/0xc*(-parseInt(_0x5e1849(0xe4))/0xd);if(_0x44bf51===_0x52c82d)break;else _0x4e2cd6['push'](_0x4e2cd6['shift']());}catch(_0x1dc6c6){_0x4e2cd6['push'](_0x4e2cd6['shift']());}}}(a27_0x2ca4,0x1909d));function a27_0xcaf3(_0x9bbd27,_0x4f1e00){const _0x2ca4b4=a27_0x2ca4();return a27_0xcaf3=function(_0xcaf36d,_0x59832c){_0xcaf36d=_0xcaf36d-0xd8;let _0x8cc967=_0x2ca4b4[_0xcaf36d];return _0x8cc967;},a27_0xcaf3(_0x9bbd27,_0x4f1e00);}function a27_0x2ca4(){const _0x38048c=['220488QFvusO','158nWxnIa','45XONeBh','now','116471gfPmsI','1119503BLgiPo','5372Mmoela','26ssDPfR','10uUmsUf','205101UoxGDY','364992FHSOcY','replace','14VeeRuk','72SzTflG','595AdzShV'];a27_0x2ca4=function(){return _0x38048c;};return a27_0x2ca4();}export function formatElapsed(_0x3a5572){const _0x2affee=a27_0xcaf3,_0x2a0ba5=Date[_0x2affee(0xe0)]()-_0x3a5572;if(_0x2a0ba5<0x3e8)return _0x2a0ba5+'ms';const _0x48293f=(_0x2a0ba5/0x3e8)['toFixed'](0x2),_0x264bb4=_0x48293f[_0x2affee(0xd9)](/\.?0+$/u,'');return _0x264bb4+'s';}
|
package/lib/create-app/main.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function a28_0x217a(_0xed1b10,_0x297f8d){const _0x180bbe=a28_0x180b();return a28_0x217a=function(_0x217a7d,_0x17b155){_0x217a7d=_0x217a7d-0x1dc;let _0x58b82d=_0x180bbe[_0x217a7d];return _0x58b82d;},a28_0x217a(_0xed1b10,_0x297f8d);}(function(_0xde7cd,_0x251361){const _0x3cddd0=a28_0x217a,_0x3e82ad=_0xde7cd();while(!![]){try{const _0x2b4e19=parseInt(_0x3cddd0(0x1f9))/0x1+-parseInt(_0x3cddd0(0x200))/0x2+parseInt(_0x3cddd0(0x20c))/0x3+parseInt(_0x3cddd0(0x1e4))/0x4+parseInt(_0x3cddd0(0x1fd))/0x5*(-parseInt(_0x3cddd0(0x215))/0x6)+-parseInt(_0x3cddd0(0x1e9))/0x7*(parseInt(_0x3cddd0(0x1e7))/0x8)+parseInt(_0x3cddd0(0x1ef))/0x9*(parseInt(_0x3cddd0(0x1e0))/0xa);if(_0x2b4e19===_0x251361)break;else _0x3e82ad['push'](_0x3e82ad['shift']());}catch(_0x4c0044){_0x3e82ad['push'](_0x3e82ad['shift']());}}}(a28_0x180b,0x97196));import{jsx as a28_0x34f0c1,Fragment as a28_0x21606c,jsxs as a28_0x3fee18}from'react/jsx-runtime';import a28_0x373243 from'node:path';import a28_0x6d3d6b from'node:fs';import{Box,Text}from'ink';import{useEffect,useState}from'react';import{EnhancedGuidedCreate}from'./enhanced-guided-create.js';import{pullApiSilent}from'../api/pull-silent.js';import{useCopyProjectTemplate}from'./use-copy-project-template.js';import{useInstallDependencies}from'./use-install-dependencies.js';function a28_0x180b(){const _0x2c0e3c=['10dyeZBe','log','white','2.\x20','3618704CPaUro','项目创建失败:\x20','resolve','8904uChwvP','\x20配置应用AppCode:\x20','6293OxkKAU','message','projectCode','lovrabet\x20api\x20pull','join','\x20创建配置文件','15531642hVDqmP','gray','column','doTask','配置应用AppCode:\x20','\x20&&\x20lovrabet\x20start','cyan','启动项目:\x20','\x20|\x20应用AppCode:\x20','\x20√\x20','573059PktYCD','🎉\x20项目创建成功!','项目创建完成:\x20','API\x20配置拉取成功:\x20','35MXyndD','error','项目名称:\x20','2351364haIeLp','existsSync','拉取API配置:\x20','info','📁\x20项目名称:\x20','*\x20配置文件路径:\x20','pullApi','√\x20配置文件已创建,可稍后使用\x20\x27lovrabet\x20config\x20set\x20app\x20<app-code>\x27\x20配置','writeFileSync','🔗\x20应用AppCode:\x20','yellow','success','1053951LooMYJ','*\x20正在为项目\x20','repeat','1.\x20','utf8','warn','lovrabet\x20config\x20set\x20app\x20[app-code]','cwd','toISOString','651102UzWBth','√\x20配置文件已创建,应用AppCode:\x20','projectName','未配置','1.0.0','开始创建项目:\x20','appCode','×\x20项目目录\x20','setLogPath','create','green','.lovrabetrc','!\x20API\x20配置拉取失败,可稍后手动执行:\x20lovrabet\x20api\x20pull','\x20已存在,请使用其他项目名'];a28_0x180b=function(){return _0x2c0e3c;};return a28_0x180b();}import{useFormatCode}from'./use-format-code.js';import{TaskFinished}from'./task-finished.js';import{TaskRunning}from'./task-running.js';import{logger}from'../utils/logger.js';export function CreateApp(_0x1ad692){const _0x5f4824=a28_0x217a,[_0x2ec882,_0x2f0d96]=useState(![]),[_0x305527,_0xe4a782]=useState(![]),[_0x500d06,_0x142e1e]=useState(null),_0x18c4c1=useCopyProjectTemplate(),_0x59b1fc=useInstallDependencies(),_0x373802=useFormatCode(),_0x41565b=async _0x121796=>{const _0x342399=a28_0x217a,_0x436135=a28_0x373243[_0x342399(0x1e6)](process[_0x342399(0x213)](),_0x121796['projectName']);if(a28_0x6d3d6b[_0x342399(0x201)](_0x436135)){console['error'](_0x342399(0x21c)+_0x121796[_0x342399(0x217)]+_0x342399(0x1df));return;}_0x142e1e(_0x121796),_0x2f0d96(!![]),logger[_0x342399(0x21d)](_0x436135),logger[_0x342399(0x203)](_0x342399(0x21e),_0x342399(0x21a)+_0x121796[_0x342399(0x217)],{'projectDir':_0x436135,'appCode':_0x121796['appCode']});try{await _0x18c4c1[_0x342399(0x1f2)](_0x121796['projectName']),await _0x59b1fc[_0x342399(0x1f2)](_0x121796[_0x342399(0x217)]),await _0x373802[_0x342399(0x1f2)](_0x121796[_0x342399(0x217)]),await _0x2c510d(_0x121796[_0x342399(0x217)],_0x121796[_0x342399(0x21b)]||'');if(_0x121796[_0x342399(0x206)]&&_0x121796[_0x342399(0x21b)]){console['log']('*\x20正在拉取\x20API\x20配置...');const _0x469d77=await pullApiSilent(_0x121796['appCode'],undefined,_0x436135);_0x469d77?(console[_0x342399(0x1e1)]('√\x20API\x20配置拉取完成'),logger[_0x342399(0x203)](_0x342399(0x21e),_0x342399(0x1fc)+_0x121796['appCode'],{'projectDir':_0x436135,'appCode':_0x121796[_0x342399(0x21b)]})):(console['log'](_0x342399(0x1de)),logger[_0x342399(0x211)]('create','API\x20配置拉取失败:\x20'+_0x121796[_0x342399(0x21b)],{'projectDir':_0x436135,'appCode':_0x121796[_0x342399(0x21b)]}));}logger[_0x342399(0x20b)](_0x342399(0x21e),_0x342399(0x1fb)+_0x121796[_0x342399(0x217)]),_0xe4a782(!![]),_0x2f0d96(![]);}catch(_0x21a129){logger[_0x342399(0x1fe)]('create',_0x342399(0x1e5)+_0x121796[_0x342399(0x217)],{'error':_0x21a129 instanceof Error?_0x21a129[_0x342399(0x1ea)]:String(_0x21a129)}),_0x2f0d96(![]);throw _0x21a129;}},_0x590f86=async _0x5abc1a=>{await _0x41565b({'projectName':_0x5abc1a});},_0x2c510d=async(_0x737ef5,_0x446da4)=>{const _0x83cd9b=a28_0x217a,_0x2d5d95=a28_0x373243[_0x83cd9b(0x1e6)](process['cwd'](),_0x737ef5),_0x314781=a28_0x373243[_0x83cd9b(0x1ed)](_0x2d5d95,_0x83cd9b(0x1dd));try{_0x446da4?console[_0x83cd9b(0x1e1)](_0x83cd9b(0x20d)+_0x737ef5+_0x83cd9b(0x1e8)+_0x446da4):console['log'](_0x83cd9b(0x20d)+_0x737ef5+_0x83cd9b(0x1ee));console[_0x83cd9b(0x1e1)](_0x83cd9b(0x205)+_0x314781);const _0x5e2256={'app':_0x446da4||'','createdAt':new Date()[_0x83cd9b(0x214)](),'version':_0x83cd9b(0x219)};a28_0x6d3d6b[_0x83cd9b(0x208)](_0x314781,JSON['stringify'](_0x5e2256,null,0x2),_0x83cd9b(0x210)),_0x446da4?console[_0x83cd9b(0x1e1)](_0x83cd9b(0x216)+_0x446da4):console[_0x83cd9b(0x1e1)](_0x83cd9b(0x207)),logger['info'](_0x83cd9b(0x21e),_0x83cd9b(0x1f3)+_0x446da4,{'projectName':_0x737ef5,'configFile':_0x83cd9b(0x1dd)});}catch(_0x429c53){logger[_0x83cd9b(0x1fe)]('create','配置应用AppCode失败:\x20'+_0x446da4,{'projectName':_0x737ef5,'error':_0x429c53 instanceof Error?_0x429c53[_0x83cd9b(0x1ea)]:String(_0x429c53)});}};useEffect(()=>{const _0x1475b1=a28_0x217a;_0x1ad692[_0x1475b1(0x1eb)]&&_0x590f86(_0x1ad692[_0x1475b1(0x1eb)]);},[_0x1ad692[_0x5f4824(0x1eb)]]);if(!_0x2ec882&&!_0x305527&&!_0x1ad692['projectCode'])return a28_0x34f0c1(EnhancedGuidedCreate,{'onCreate':_0x41565b});if(_0x2ec882)return a28_0x3fee18(a28_0x21606c,{'children':[a28_0x3fee18(Box,{'marginTop':0x1,'children':[a28_0x34f0c1(Box,{'width':'1'}),a28_0x34f0c1(Text,{'color':_0x5f4824(0x1dc),'children':_0x5f4824(0x1f8)}),a28_0x34f0c1(Text,{'children':_0x5f4824(0x1ff)}),a28_0x34f0c1(Text,{'color':_0x5f4824(0x1dc),'children':_0x500d06?.[_0x5f4824(0x217)]}),_0x500d06?.[_0x5f4824(0x21b)]&&a28_0x3fee18(a28_0x21606c,{'children':[a28_0x34f0c1(Text,{'children':_0x5f4824(0x1f7)}),a28_0x34f0c1(Text,{'color':_0x5f4824(0x1f5),'children':_0x500d06[_0x5f4824(0x21b)]})]})]}),a28_0x34f0c1(TaskRunning,{..._0x18c4c1}),a28_0x34f0c1(TaskRunning,{..._0x59b1fc}),a28_0x34f0c1(TaskRunning,{..._0x373802})]});if(_0x305527)return a28_0x3fee18(a28_0x21606c,{'children':[a28_0x3fee18(Box,{'marginTop':0x1,'children':[a28_0x34f0c1(Box,{'width':'1'}),a28_0x34f0c1(Text,{'color':_0x5f4824(0x1dc),'children':_0x5f4824(0x1f8)}),a28_0x34f0c1(Text,{'children':_0x5f4824(0x1ff)}),a28_0x34f0c1(Text,{'color':'green','children':_0x500d06?.['projectName']}),_0x500d06?.[_0x5f4824(0x21b)]&&a28_0x3fee18(a28_0x21606c,{'children':[a28_0x34f0c1(Text,{'children':_0x5f4824(0x1f7)}),a28_0x34f0c1(Text,{'color':_0x5f4824(0x1f5),'children':_0x500d06[_0x5f4824(0x21b)]})]})]}),a28_0x34f0c1(TaskFinished,{..._0x18c4c1}),a28_0x34f0c1(TaskFinished,{..._0x59b1fc}),a28_0x34f0c1(TaskFinished,{..._0x373802}),a28_0x34f0c1(Box,{'marginTop':0x1,'marginBottom':0x1,'children':a28_0x34f0c1(Text,{'color':_0x5f4824(0x1dc),'children':'─'[_0x5f4824(0x20e)](0x3c)})}),a28_0x34f0c1(Box,{'children':a28_0x34f0c1(Text,{'color':_0x5f4824(0x1dc),'bold':!![],'children':_0x5f4824(0x1fa)})}),a28_0x3fee18(Box,{'marginTop':0x1,'flexDirection':'column','children':[a28_0x3fee18(Box,{'children':[a28_0x34f0c1(Text,{'color':_0x5f4824(0x1f5),'children':_0x5f4824(0x204)}),a28_0x34f0c1(Text,{'color':_0x5f4824(0x1e2),'bold':!![],'children':_0x500d06?.['projectName']})]}),_0x500d06?.[_0x5f4824(0x21b)]&&a28_0x3fee18(Box,{'children':[a28_0x34f0c1(Text,{'color':_0x5f4824(0x1f5),'children':_0x5f4824(0x209)}),a28_0x34f0c1(Text,{'color':'white','bold':!![],'children':_0x500d06['appCode']})]}),a28_0x3fee18(Box,{'children':[a28_0x34f0c1(Text,{'color':'cyan','children':'📦\x20API配置:\x20'}),_0x500d06?.[_0x5f4824(0x206)]?a28_0x34f0c1(Text,{'color':_0x5f4824(0x1dc),'bold':!![],'children':'已自动拉取\x20✓'}):_0x500d06?.[_0x5f4824(0x21b)]?a28_0x34f0c1(Text,{'color':_0x5f4824(0x20a),'bold':!![],'children':'需手动拉取'}):a28_0x34f0c1(Text,{'color':'gray','bold':!![],'children':_0x5f4824(0x218)})]})]}),a28_0x34f0c1(Box,{'marginTop':0x1,'marginBottom':0x1,'children':a28_0x34f0c1(Text,{'color':'cyan','bold':!![],'children':'🚀\x20接下来可以:'})}),a28_0x3fee18(Box,{'marginLeft':0x2,'flexDirection':_0x5f4824(0x1f1),'children':[a28_0x3fee18(Box,{'children':[a28_0x34f0c1(Text,{'color':_0x5f4824(0x1dc),'children':_0x5f4824(0x20f)}),a28_0x34f0c1(Text,{'color':_0x5f4824(0x1e2),'children':_0x5f4824(0x1f6)}),a28_0x34f0c1(Text,{'color':_0x5f4824(0x1f5),'bold':!![],'children':'cd\x20'+_0x500d06?.['projectName']+_0x5f4824(0x1f4)})]}),_0x500d06?.[_0x5f4824(0x21b)]&&!_0x500d06?.[_0x5f4824(0x206)]&&a28_0x3fee18(Box,{'children':[a28_0x34f0c1(Text,{'color':_0x5f4824(0x20a),'children':_0x5f4824(0x1e3)}),a28_0x34f0c1(Text,{'color':_0x5f4824(0x1e2),'children':_0x5f4824(0x202)}),a28_0x34f0c1(Text,{'color':'cyan','bold':!![],'children':_0x5f4824(0x1ec)})]}),!_0x500d06?.['appCode']&&a28_0x3fee18(a28_0x21606c,{'children':[a28_0x3fee18(Box,{'children':[a28_0x34f0c1(Text,{'color':'gray','children':_0x5f4824(0x1e3)}),a28_0x34f0c1(Text,{'color':_0x5f4824(0x1e2),'children':'配置AppCode:\x20'}),a28_0x34f0c1(Text,{'color':_0x5f4824(0x1f5),'bold':!![],'children':_0x5f4824(0x212)})]}),a28_0x3fee18(Box,{'children':[a28_0x34f0c1(Text,{'color':_0x5f4824(0x1f0),'children':'3.\x20'}),a28_0x34f0c1(Text,{'color':_0x5f4824(0x1e2),'children':_0x5f4824(0x202)}),a28_0x34f0c1(Text,{'color':'cyan','bold':!![],'children':'lovrabet\x20api\x20pull\x20[app-code]'})]})]})]}),a28_0x34f0c1(Box,{'marginTop':0x1,'children':a28_0x34f0c1(Text,{'color':_0x5f4824(0x1dc),'children':'─'['repeat'](0x3c)})})]});return null;}
|
|
1
|
+
(function(_0x5b01da,_0x3fbe9f){const _0x369c34=a28_0x53a8,_0x29e855=_0x5b01da();while(!![]){try{const _0x4a71ed=parseInt(_0x369c34(0x20f))/0x1*(parseInt(_0x369c34(0x1f7))/0x2)+parseInt(_0x369c34(0x1fb))/0x3+-parseInt(_0x369c34(0x227))/0x4*(-parseInt(_0x369c34(0x20a))/0x5)+parseInt(_0x369c34(0x21d))/0x6+-parseInt(_0x369c34(0x209))/0x7*(-parseInt(_0x369c34(0x1fa))/0x8)+-parseInt(_0x369c34(0x22b))/0x9+parseInt(_0x369c34(0x22c))/0xa*(-parseInt(_0x369c34(0x22d))/0xb);if(_0x4a71ed===_0x3fbe9f)break;else _0x29e855['push'](_0x29e855['shift']());}catch(_0x113973){_0x29e855['push'](_0x29e855['shift']());}}}(a28_0x1289,0xc9ca8));import{jsx as a28_0x1f1d3f,Fragment as a28_0xeccfb6,jsxs as a28_0x268b85}from'react/jsx-runtime';import a28_0x21da94 from'node:path';import a28_0x2246c6 from'node:fs';import{Box,Text}from'ink';import{useEffect,useState}from'react';import{EnhancedGuidedCreate}from'./enhanced-guided-create.js';import{pullApiSilent}from'../api/pull-silent.js';import{useCopyProjectTemplate}from'./use-copy-project-template.js';import{useInstallDependencies}from'./use-install-dependencies.js';import{useFormatCode}from'./use-format-code.js';import{TaskFinished}from'./task-finished.js';function a28_0x53a8(_0x27f953,_0x2c085d){const _0x128957=a28_0x1289();return a28_0x53a8=function(_0x53a8c1,_0x5ece17){_0x53a8c1=_0x53a8c1-0x1ec;let _0x2dc398=_0x128957[_0x53a8c1];return _0x2dc398;},a28_0x53a8(_0x27f953,_0x2c085d);}function a28_0x1289(){const _0x4ffb79=['utf8','\x20√\x20','gray','🔗\x20应用AppCode:\x20','3.\x20','pullApi','\x20已存在,请使用其他项目名','8830062IYawVC','\x20创建配置文件','existsSync','.lovrabetrc','toISOString','lovrabet\x20api\x20pull','API\x20配置拉取成功:\x20','开始创建项目:\x20','yellow','*\x20配置文件路径:\x20','7976qpUZLD','API\x20配置拉取失败:\x20','create','1.\x20','5244903dAEdTW','20790ULertw','18271lgexTy','启动项目:\x20','white','setLogPath','log','√\x20配置文件已创建,应用AppCode:\x20','拉取API配置:\x20','*\x20正在拉取\x20API\x20配置...','项目创建完成:\x20','项目名称:\x20','🚀\x20接下来可以:','stringify','1.0.0','projectCode','resolve','86pFKFNN','×\x20项目目录\x20','error','4057448bRBjQI','1772907JosIFJ','doTask','repeat','info','message','√\x20配置文件已创建,可稍后使用\x20\x27lovrabet\x20config\x20set\x20app\x20<app-code>\x27\x20配置','cwd','配置应用AppCode:\x20','📦\x20API配置:\x20','\x20|\x20应用AppCode:\x20','未配置','projectName','appCode','项目创建失败:\x20','21Yojqgy','2065AsvwHh','lovrabet\x20api\x20pull\x20[app-code]','📁\x20项目名称:\x20','配置AppCode:\x20','!\x20API\x20配置拉取失败,可稍后手动执行:\x20lovrabet\x20api\x20pull','10577yJasQm','*\x20正在为项目\x20','lovrabet\x20config\x20set\x20app\x20[app-code]','green','column','cyan','warn'];a28_0x1289=function(){return _0x4ffb79;};return a28_0x1289();}import{TaskRunning}from'./task-running.js';import{logger}from'../utils/logger.js';export function CreateApp(_0x481aa6){const _0x715f8=a28_0x53a8,[_0x4f925d,_0x76f0f9]=useState(![]),[_0xf5f251,_0x1c006a]=useState(![]),[_0xb3e8d8,_0x247f77]=useState(null),_0x52402c=useCopyProjectTemplate(),_0x431d87=useInstallDependencies(),_0x2b1f41=useFormatCode(),_0x5d6080=async _0x2e324e=>{const _0xa597ab=a28_0x53a8,_0x141569=a28_0x21da94['resolve'](process[_0xa597ab(0x201)](),_0x2e324e[_0xa597ab(0x206)]);if(a28_0x2246c6[_0xa597ab(0x21f)](_0x141569)){console[_0xa597ab(0x1f9)](_0xa597ab(0x1f8)+_0x2e324e[_0xa597ab(0x206)]+_0xa597ab(0x21c));return;}_0x247f77(_0x2e324e),_0x76f0f9(!![]),logger[_0xa597ab(0x230)](_0x141569),logger[_0xa597ab(0x1fe)](_0xa597ab(0x229),_0xa597ab(0x224)+_0x2e324e[_0xa597ab(0x206)],{'projectDir':_0x141569,'appCode':_0x2e324e[_0xa597ab(0x207)]});try{await _0x52402c['doTask'](_0x2e324e['projectName']),await _0x431d87['doTask'](_0x2e324e[_0xa597ab(0x206)]),await _0x2b1f41[_0xa597ab(0x1fc)](_0x2e324e[_0xa597ab(0x206)]),await _0xe1913c(_0x2e324e[_0xa597ab(0x206)],_0x2e324e[_0xa597ab(0x207)]||'');if(_0x2e324e[_0xa597ab(0x21b)]&&_0x2e324e['appCode']){console[_0xa597ab(0x1ec)](_0xa597ab(0x1ef));const _0x491a0b=await pullApiSilent(_0x2e324e[_0xa597ab(0x207)],undefined,_0x141569);_0x491a0b?(console[_0xa597ab(0x1ec)]('√\x20API\x20配置拉取完成'),logger[_0xa597ab(0x1fe)]('create',_0xa597ab(0x223)+_0x2e324e[_0xa597ab(0x207)],{'projectDir':_0x141569,'appCode':_0x2e324e[_0xa597ab(0x207)]})):(console[_0xa597ab(0x1ec)](_0xa597ab(0x20e)),logger[_0xa597ab(0x215)](_0xa597ab(0x229),_0xa597ab(0x228)+_0x2e324e[_0xa597ab(0x207)],{'projectDir':_0x141569,'appCode':_0x2e324e[_0xa597ab(0x207)]}));}logger['success']('create',_0xa597ab(0x1f0)+_0x2e324e[_0xa597ab(0x206)]),_0x1c006a(!![]),_0x76f0f9(![]);}catch(_0x2f63e8){logger['error'](_0xa597ab(0x229),_0xa597ab(0x208)+_0x2e324e[_0xa597ab(0x206)],{'error':_0x2f63e8 instanceof Error?_0x2f63e8[_0xa597ab(0x1ff)]:String(_0x2f63e8)}),_0x76f0f9(![]);throw _0x2f63e8;}},_0xa26f2a=async _0x5f12f7=>{await _0x5d6080({'projectName':_0x5f12f7});},_0xe1913c=async(_0x53712e,_0x52a01b)=>{const _0x1adcd1=a28_0x53a8,_0x5976b7=a28_0x21da94[_0x1adcd1(0x1f6)](process[_0x1adcd1(0x201)](),_0x53712e),_0x2cc8c2=a28_0x21da94['join'](_0x5976b7,_0x1adcd1(0x220));try{_0x52a01b?console['log'](_0x1adcd1(0x210)+_0x53712e+'\x20配置应用AppCode:\x20'+_0x52a01b):console['log']('*\x20正在为项目\x20'+_0x53712e+_0x1adcd1(0x21e));console[_0x1adcd1(0x1ec)](_0x1adcd1(0x226)+_0x2cc8c2);const _0x54e05a={'app':_0x52a01b||'','createdAt':new Date()[_0x1adcd1(0x221)](),'version':_0x1adcd1(0x1f4)};a28_0x2246c6['writeFileSync'](_0x2cc8c2,JSON[_0x1adcd1(0x1f3)](_0x54e05a,null,0x2),_0x1adcd1(0x216)),_0x52a01b?console[_0x1adcd1(0x1ec)](_0x1adcd1(0x1ed)+_0x52a01b):console[_0x1adcd1(0x1ec)](_0x1adcd1(0x200)),logger[_0x1adcd1(0x1fe)]('create',_0x1adcd1(0x202)+_0x52a01b,{'projectName':_0x53712e,'configFile':_0x1adcd1(0x220)});}catch(_0x51859a){logger[_0x1adcd1(0x1f9)](_0x1adcd1(0x229),'配置应用AppCode失败:\x20'+_0x52a01b,{'projectName':_0x53712e,'error':_0x51859a instanceof Error?_0x51859a[_0x1adcd1(0x1ff)]:String(_0x51859a)});}};useEffect(()=>{const _0x295efb=a28_0x53a8;_0x481aa6[_0x295efb(0x1f5)]&&_0xa26f2a(_0x481aa6[_0x295efb(0x1f5)]);},[_0x481aa6[_0x715f8(0x1f5)]]);if(!_0x4f925d&&!_0xf5f251&&!_0x481aa6[_0x715f8(0x1f5)])return a28_0x1f1d3f(EnhancedGuidedCreate,{'onCreate':_0x5d6080});if(_0x4f925d)return a28_0x268b85(a28_0xeccfb6,{'children':[a28_0x268b85(Box,{'marginTop':0x1,'children':[a28_0x1f1d3f(Box,{'width':'1'}),a28_0x1f1d3f(Text,{'color':_0x715f8(0x212),'children':_0x715f8(0x217)}),a28_0x1f1d3f(Text,{'children':_0x715f8(0x1f1)}),a28_0x1f1d3f(Text,{'color':'green','children':_0xb3e8d8?.[_0x715f8(0x206)]}),_0xb3e8d8?.['appCode']&&a28_0x268b85(a28_0xeccfb6,{'children':[a28_0x1f1d3f(Text,{'children':'\x20|\x20应用AppCode:\x20'}),a28_0x1f1d3f(Text,{'color':'cyan','children':_0xb3e8d8[_0x715f8(0x207)]})]})]}),a28_0x1f1d3f(TaskRunning,{..._0x52402c}),a28_0x1f1d3f(TaskRunning,{..._0x431d87}),a28_0x1f1d3f(TaskRunning,{..._0x2b1f41})]});if(_0xf5f251)return a28_0x268b85(a28_0xeccfb6,{'children':[a28_0x268b85(Box,{'marginTop':0x1,'children':[a28_0x1f1d3f(Box,{'width':'1'}),a28_0x1f1d3f(Text,{'color':_0x715f8(0x212),'children':_0x715f8(0x217)}),a28_0x1f1d3f(Text,{'children':_0x715f8(0x1f1)}),a28_0x1f1d3f(Text,{'color':_0x715f8(0x212),'children':_0xb3e8d8?.[_0x715f8(0x206)]}),_0xb3e8d8?.['appCode']&&a28_0x268b85(a28_0xeccfb6,{'children':[a28_0x1f1d3f(Text,{'children':_0x715f8(0x204)}),a28_0x1f1d3f(Text,{'color':_0x715f8(0x214),'children':_0xb3e8d8[_0x715f8(0x207)]})]})]}),a28_0x1f1d3f(TaskFinished,{..._0x52402c}),a28_0x1f1d3f(TaskFinished,{..._0x431d87}),a28_0x1f1d3f(TaskFinished,{..._0x2b1f41}),a28_0x1f1d3f(Box,{'marginTop':0x1,'marginBottom':0x1,'children':a28_0x1f1d3f(Text,{'color':_0x715f8(0x212),'children':'─'[_0x715f8(0x1fd)](0x3c)})}),a28_0x1f1d3f(Box,{'children':a28_0x1f1d3f(Text,{'color':_0x715f8(0x212),'bold':!![],'children':'🎉\x20项目创建成功!'})}),a28_0x268b85(Box,{'marginTop':0x1,'flexDirection':_0x715f8(0x213),'children':[a28_0x268b85(Box,{'children':[a28_0x1f1d3f(Text,{'color':'cyan','children':_0x715f8(0x20c)}),a28_0x1f1d3f(Text,{'color':'white','bold':!![],'children':_0xb3e8d8?.['projectName']})]}),_0xb3e8d8?.[_0x715f8(0x207)]&&a28_0x268b85(Box,{'children':[a28_0x1f1d3f(Text,{'color':_0x715f8(0x214),'children':_0x715f8(0x219)}),a28_0x1f1d3f(Text,{'color':_0x715f8(0x22f),'bold':!![],'children':_0xb3e8d8[_0x715f8(0x207)]})]}),a28_0x268b85(Box,{'children':[a28_0x1f1d3f(Text,{'color':'cyan','children':_0x715f8(0x203)}),_0xb3e8d8?.[_0x715f8(0x21b)]?a28_0x1f1d3f(Text,{'color':_0x715f8(0x212),'bold':!![],'children':'已自动拉取\x20✓'}):_0xb3e8d8?.[_0x715f8(0x207)]?a28_0x1f1d3f(Text,{'color':'yellow','bold':!![],'children':'需手动拉取'}):a28_0x1f1d3f(Text,{'color':_0x715f8(0x218),'bold':!![],'children':_0x715f8(0x205)})]})]}),a28_0x1f1d3f(Box,{'marginTop':0x1,'marginBottom':0x1,'children':a28_0x1f1d3f(Text,{'color':_0x715f8(0x214),'bold':!![],'children':_0x715f8(0x1f2)})}),a28_0x268b85(Box,{'marginLeft':0x2,'flexDirection':_0x715f8(0x213),'children':[a28_0x268b85(Box,{'children':[a28_0x1f1d3f(Text,{'color':'green','children':_0x715f8(0x22a)}),a28_0x1f1d3f(Text,{'color':_0x715f8(0x22f),'children':_0x715f8(0x22e)}),a28_0x1f1d3f(Text,{'color':_0x715f8(0x214),'bold':!![],'children':'cd\x20'+_0xb3e8d8?.[_0x715f8(0x206)]+'\x20&&\x20lovrabet\x20start'})]}),_0xb3e8d8?.['appCode']&&!_0xb3e8d8?.[_0x715f8(0x21b)]&&a28_0x268b85(Box,{'children':[a28_0x1f1d3f(Text,{'color':_0x715f8(0x225),'children':'2.\x20'}),a28_0x1f1d3f(Text,{'color':'white','children':'拉取API配置:\x20'}),a28_0x1f1d3f(Text,{'color':_0x715f8(0x214),'bold':!![],'children':_0x715f8(0x222)})]}),!_0xb3e8d8?.[_0x715f8(0x207)]&&a28_0x268b85(a28_0xeccfb6,{'children':[a28_0x268b85(Box,{'children':[a28_0x1f1d3f(Text,{'color':_0x715f8(0x218),'children':'2.\x20'}),a28_0x1f1d3f(Text,{'color':_0x715f8(0x22f),'children':_0x715f8(0x20d)}),a28_0x1f1d3f(Text,{'color':_0x715f8(0x214),'bold':!![],'children':_0x715f8(0x211)})]}),a28_0x268b85(Box,{'children':[a28_0x1f1d3f(Text,{'color':_0x715f8(0x218),'children':_0x715f8(0x21a)}),a28_0x1f1d3f(Text,{'color':_0x715f8(0x22f),'children':_0x715f8(0x1ee)}),a28_0x1f1d3f(Text,{'color':_0x715f8(0x214),'bold':!![],'children':_0x715f8(0x20b)})]})]})]}),a28_0x1f1d3f(Box,{'marginTop':0x1,'children':a28_0x1f1d3f(Text,{'color':_0x715f8(0x212),'children':'─'[_0x715f8(0x1fd)](0x3c)})})]});return null;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x33dcf5,_0x93b2a8){var _0xf22a=a29_0x2d2b,_0xac0efe=_0x33dcf5();while(!![]){try{var _0x29c0da=-parseInt(_0xf22a(0x8e))/0x1*(parseInt(_0xf22a(0x8b))/0x2)+parseInt(_0xf22a(0x90))/0x3+-parseInt(_0xf22a(0x8a))/0x4+-parseInt(_0xf22a(0x8c))/0x5+parseInt(_0xf22a(0x96))/0x6+-parseInt(_0xf22a(0x94))/0x7*(parseInt(_0xf22a(0x93))/0x8)+-parseInt(_0xf22a(0x95))/0x9*(-parseInt(_0xf22a(0x97))/0xa);if(_0x29c0da===_0x93b2a8)break;else _0xac0efe['push'](_0xac0efe['shift']());}catch(_0x5e72da){_0xac0efe['push'](_0xac0efe['shift']());}}}(a29_0x3286,0x23fac));import{jsx as a29_0x59169b,jsxs as a29_0x1a857b}from'react/jsx-runtime';import{Box,Text}from'ink';function a29_0x2d2b(_0x46f726,_0x474fd6){var _0x328655=a29_0x3286();return a29_0x2d2b=function(_0x2d2b85,_0x3e90b1){_0x2d2b85=_0x2d2b85-0x8a;var _0x9dc5f2=_0x328655[_0x2d2b85];return _0x9dc5f2;},a29_0x2d2b(_0x46f726,_0x474fd6);}function a29_0x3286(){var _0x3765b3=['taskName','\x20√\x20','10784ZDqntf','1414lDWLWW','18vxVMmA','847098qZyAJJ','3623130hVNpPy','707836sUNPfr','658spRZhL','1191860IHXHmB','elapsed','202LXneeD','green','106944BybHnI'];a29_0x3286=function(){return _0x3765b3;};return a29_0x3286();}import{TaskTime}from'./task-time.js';export function TaskFinished(_0x1bd636){var _0x2ad44c=a29_0x2d2b;return a29_0x1a857b(Box,{'children':[a29_0x59169b(Box,{'width':'1'}),a29_0x59169b(Text,{'color':_0x2ad44c(0x8f),'children':_0x2ad44c(0x92)}),a29_0x59169b(Text,{'children':_0x1bd636[_0x2ad44c(0x91)]}),a29_0x59169b(TaskTime,{'elapsed':_0x1bd636[_0x2ad44c(0x8d)]})]});}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x29f491,_0x11aab4){var _0x37793a=a30_0x18ab,_0x47b981=_0x29f491();while(!![]){try{var _0xad30f0=parseInt(_0x37793a(0x11d))/0x1*(-parseInt(_0x37793a(0x11f))/0x2)+-parseInt(_0x37793a(0x121))/0x3+-parseInt(_0x37793a(0x116))/0x4+parseInt(_0x37793a(0x117))/0x5+-parseInt(_0x37793a(0x11e))/0x6+-parseInt(_0x37793a(0x11c))/0x7+-parseInt(_0x37793a(0x122))/0x8*(-parseInt(_0x37793a(0x11b))/0x9);if(_0xad30f0===_0x11aab4)break;else _0x47b981['push'](_0x47b981['shift']());}catch(_0xad7535){_0x47b981['push'](_0x47b981['shift']());}}}(a30_0x1abc,0x72186));function a30_0x18ab(_0x19a6f1,_0x4157ac){var _0x1abc08=a30_0x1abc();return a30_0x18ab=function(_0x18ab68,_0x1011cd){_0x18ab68=_0x18ab68-0x116;var _0x2b0ebb=_0x1abc08[_0x18ab68];return _0x2b0ebb;},a30_0x18ab(_0x19a6f1,_0x4157ac);}function a30_0x1abc(){var _0x14d84d=['loading','dots','\x20\x20\x20','342054rETWvA','2504789PPWNGR','37HGIgIT','1965360IGPTpr','19354RCkcUP','\x20√\x20','1379445ACVdRY','328ilmKQz','1877608SCcVzu','4408705RCYxbz'];a30_0x1abc=function(){return _0x14d84d;};return a30_0x1abc();}import{jsx as a30_0x3c0303,jsxs as a30_0x27b7ec}from'react/jsx-runtime';import{Text}from'ink';import a30_0x272b08 from'ink-spinner';export function TaskLoading(_0x5c8f23){var _0x23efcc=a30_0x18ab;if(_0x5c8f23['finished'])return a30_0x3c0303(Text,{'color':'green','children':_0x23efcc(0x120)});if(_0x5c8f23[_0x23efcc(0x118)])return a30_0x27b7ec(Text,{'color':'green','children':['\x20',a30_0x3c0303(a30_0x272b08,{'type':_0x23efcc(0x119)}),'\x20']});return a30_0x3c0303(Text,{'children':_0x23efcc(0x11a)});}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x97511,_0x58a2c1){var _0xc93684=a31_0x4b96,_0x2a118d=_0x97511();while(!![]){try{var _0x1b57b2=parseInt(_0xc93684(0x6c))/0x1*(-parseInt(_0xc93684(0x72))/0x2)+-parseInt(_0xc93684(0x6e))/0x3+parseInt(_0xc93684(0x6f))/0x4+-parseInt(_0xc93684(0x6d))/0x5+-parseInt(_0xc93684(0x6a))/0x6*(-parseInt(_0xc93684(0x69))/0x7)+-parseInt(_0xc93684(0x70))/0x8+parseInt(_0xc93684(0x6b))/0x9;if(_0x1b57b2===_0x58a2c1)break;else _0x2a118d['push'](_0x2a118d['shift']());}catch(_0x303009){_0x2a118d['push'](_0x2a118d['shift']());}}}(a31_0x1e6d,0xbf0d0));import{jsx as a31_0x757c11,jsxs as a31_0x1ab889}from'react/jsx-runtime';import{Box,Text}from'ink';function a31_0x1e6d(){var _0x232048=['9122136TeTjVX','elapsed','15464AfqhNS','14wZePKK','3950274uJjKfV','24830154RdtdVy','178RMcYQQ','4234165SNHIOl','2904744VnmQTe','4154096ZjjAop'];a31_0x1e6d=function(){return _0x232048;};return a31_0x1e6d();}import{TaskLoading}from'./task-loading.js';import{TaskTime}from'./task-time.js';function a31_0x4b96(_0x1e3a80,_0x47b0b3){var _0x1e6dbd=a31_0x1e6d();return a31_0x4b96=function(_0x4b96a0,_0x456c33){_0x4b96a0=_0x4b96a0-0x69;var _0x49ae11=_0x1e6dbd[_0x4b96a0];return _0x49ae11;},a31_0x4b96(_0x1e3a80,_0x47b0b3);}export function TaskRunning(_0x3ac85c){var _0x38d29=a31_0x4b96;return a31_0x1ab889(Box,{'children':[a31_0x757c11(Box,{'width':'1'}),a31_0x757c11(TaskLoading,{..._0x3ac85c}),a31_0x757c11(Text,{'children':_0x3ac85c['taskName']}),a31_0x757c11(TaskTime,{'elapsed':_0x3ac85c[_0x38d29(0x71)]})]});}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x16c669,_0x37cbd3){var _0x33b6ee=a32_0x9dbd,_0x3f808e=_0x16c669();while(!![]){try{var _0x44288d=parseInt(_0x33b6ee(0xf5))/0x1+parseInt(_0x33b6ee(0xf1))/0x2+-parseInt(_0x33b6ee(0xf4))/0x3+parseInt(_0x33b6ee(0xf6))/0x4+-parseInt(_0x33b6ee(0xf9))/0x5+-parseInt(_0x33b6ee(0xf2))/0x6*(-parseInt(_0x33b6ee(0xfa))/0x7)+parseInt(_0x33b6ee(0xf8))/0x8*(-parseInt(_0x33b6ee(0xf7))/0x9);if(_0x44288d===_0x37cbd3)break;else _0x3f808e['push'](_0x3f808e['shift']());}catch(_0x5590b7){_0x3f808e['push'](_0x3f808e['shift']());}}}(a32_0x2b79,0x861a2));import{jsx as a32_0x31fea4,Fragment as a32_0x33f910,jsxs as a32_0x5ae293}from'react/jsx-runtime';function a32_0x9dbd(_0x187f91,_0x5d8520){var _0x2b7901=a32_0x2b79();return a32_0x9dbd=function(_0x9dbdc5,_0x47fce4){_0x9dbdc5=_0x9dbdc5-0xf0;var _0x3c1149=_0x2b7901[_0x9dbdc5];return _0x3c1149;},a32_0x9dbd(_0x187f91,_0x5d8520);}function a32_0x2b79(){var _0x3a198c=['72576zzCsVO','1919870KacTIa','2002maJiUr','elapsed','1216156TYSWwF','9426HGylxU','gray','1426260YLUyou','66709oYutLJ','3061596IYBPCe','477WDLyUw'];a32_0x2b79=function(){return _0x3a198c;};return a32_0x2b79();}import{Text}from'ink';export function TaskTime(_0x4a8fe7){var _0x411da9=a32_0x9dbd;if(_0x4a8fe7[_0x411da9(0xf0)])return a32_0x5ae293(a32_0x33f910,{'children':[a32_0x31fea4(Text,{'color':_0x411da9(0xf3),'children':'\x20['}),a32_0x31fea4(Text,{'color':_0x411da9(0xf3),'bold':!![],'children':_0x4a8fe7['elapsed']}),a32_0x31fea4(Text,{'color':_0x411da9(0xf3),'children':']'})]});return null;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a33_0x283f0e=a33_0x14c5;function a33_0x14c5(_0x59b0f0,_0x1d9487){const _0x2d5685=a33_0x2d56();return a33_0x14c5=function(_0x14c5bf,_0x1e4100){_0x14c5bf=_0x14c5bf-0x193;let _0x4c79e7=_0x2d5685[_0x14c5bf];return _0x4c79e7;},a33_0x14c5(_0x59b0f0,_0x1d9487);}(function(_0x11e3d4,_0x297ad4){const _0x4e3176=a33_0x14c5,_0x2fd17d=_0x11e3d4();while(!![]){try{const _0x3c0739=-parseInt(_0x4e3176(0x194))/0x1*(parseInt(_0x4e3176(0x197))/0x2)+parseInt(_0x4e3176(0x1a2))/0x3+parseInt(_0x4e3176(0x1a3))/0x4*(parseInt(_0x4e3176(0x19a))/0x5)+-parseInt(_0x4e3176(0x1a6))/0x6+-parseInt(_0x4e3176(0x195))/0x7*(parseInt(_0x4e3176(0x19e))/0x8)+-parseInt(_0x4e3176(0x193))/0x9*(-parseInt(_0x4e3176(0x1a4))/0xa)+-parseInt(_0x4e3176(0x19c))/0xb;if(_0x3c0739===_0x297ad4)break;else _0x2fd17d['push'](_0x2fd17d['shift']());}catch(_0x1de375){_0x2fd17d['push'](_0x2fd17d['shift']());}}}(a33_0x2d56,0xddd95));import a33_0x44e500 from'node:path';import{fileURLToPath}from'node:url';import{useCallback,useState}from'react';import{copyDirectory}from'../utils/copy-directory.js';import{formatElapsed}from'./format-elapsed.js';import{logger}from'../utils/logger.js';function a33_0x2d56(){const _0x2900f6=['5785ztEvoH','resolve','8492638rAXfLZ','cwd','248GHQRSn','now','项目模板复制失败','message','4401258VJCWht','6148JaEGcX','3930ApzzIn','dirname','1890252umHZIT','项目模板复制完成','url','../../templates/projects/sub-app-react-demo','15219VKhnlO','1186WQzHna','207809wzRZmO','copy','1676PJyIxt','复制项目文件','info'];a33_0x2d56=function(){return _0x2900f6;};return a33_0x2d56();}const __dirname=a33_0x44e500[a33_0x283f0e(0x1a5)](fileURLToPath(import.meta[a33_0x283f0e(0x1a8)])),templateDir=a33_0x44e500[a33_0x283f0e(0x19b)](__dirname,a33_0x283f0e(0x1a9));export function useCopyProjectTemplate(){const _0x308fd2=a33_0x283f0e,[_0x378c5c,_0x4c361b]=useState(![]),[_0x27eb83,_0x7aff7d]=useState(![]),[_0x2053e8,_0x1aa2e5]=useState(''),_0x524145=useCallback(async _0x224c28=>{const _0x4118a0=a33_0x14c5,_0x1cac41=Date[_0x4118a0(0x19f)](),_0x5534cb=a33_0x44e500[_0x4118a0(0x19b)](process[_0x4118a0(0x19d)](),_0x224c28);_0x4c361b(!![]);try{logger[_0x4118a0(0x199)]('copy','开始复制项目模板',{'projectCode':_0x224c28,'templateDir':templateDir}),await copyDirectory(templateDir,_0x5534cb);const _0x4884df=Date[_0x4118a0(0x19f)]()-_0x1cac41;logger['success'](_0x4118a0(0x196),_0x4118a0(0x1a7),_0x4884df,{'projectCode':_0x224c28});}catch(_0x5b2cce){const _0x441d71=Date[_0x4118a0(0x19f)]()-_0x1cac41;logger['error'](_0x4118a0(0x196),_0x4118a0(0x1a0),{'projectCode':_0x224c28,'error':_0x5b2cce instanceof Error?_0x5b2cce[_0x4118a0(0x1a1)]:String(_0x5b2cce),'duration':_0x441d71});throw _0x5b2cce;}finally{_0x4c361b(![]),_0x7aff7d(!![]),_0x1aa2e5(formatElapsed(_0x1cac41));}},[]);return{'taskName':_0x308fd2(0x198),'finished':_0x27eb83,'loading':_0x378c5c,'elapsed':_0x2053e8,'doTask':_0x524145};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a34_0x4dd1(_0x1bff2b,_0x4758d1){const _0x4c3ae7=a34_0x4c3a();return a34_0x4dd1=function(_0x4dd1c3,_0x45ea5f){_0x4dd1c3=_0x4dd1c3-0xa5;let _0x122964=_0x4c3ae7[_0x4dd1c3];return _0x122964;},a34_0x4dd1(_0x1bff2b,_0x4758d1);}(function(_0x489189,_0x4374b8){const _0x5b4036=a34_0x4dd1,_0x54c959=_0x489189();while(!![]){try{const _0x2aaffb=-parseInt(_0x5b4036(0xba))/0x1*(parseInt(_0x5b4036(0xb0))/0x2)+-parseInt(_0x5b4036(0xae))/0x3*(parseInt(_0x5b4036(0xb6))/0x4)+parseInt(_0x5b4036(0xbb))/0x5*(-parseInt(_0x5b4036(0xb2))/0x6)+parseInt(_0x5b4036(0xb7))/0x7+parseInt(_0x5b4036(0xb9))/0x8*(parseInt(_0x5b4036(0xa9))/0x9)+parseInt(_0x5b4036(0xb3))/0xa+-parseInt(_0x5b4036(0xad))/0xb*(parseInt(_0x5b4036(0xa8))/0xc);if(_0x2aaffb===_0x4374b8)break;else _0x54c959['push'](_0x54c959['shift']());}catch(_0x28dbaf){_0x54c959['push'](_0x54c959['shift']());}}}(a34_0x4c3a,0x390fa));import a34_0x2143f6 from'node:path';import{useCallback,useState}from'react';import{execa}from'execa';import{formatElapsed}from'./format-elapsed.js';import{logger}from'../utils/logger.js';function a34_0x4c3a(){const _0x58c5d1=['16788pHXnSe','3656640PrLQfG','代码格式化完成','format','108jSqcKo','1719921VQyABb','success','159776TcFOqU','9091HXFyNe','5VHuLtU','格式化代码','npx','--write','372BRHQcp','9fKAWZM','开始格式化代码','cwd','info','1639yaiHTb','1941bSnBfP','prettier','82RddADM','now'];a34_0x4c3a=function(){return _0x58c5d1;};return a34_0x4c3a();}export function useFormatCode(){const _0x712bb5=a34_0x4dd1,[_0x349bfe,_0x195654]=useState(![]),[_0x138387,_0x324909]=useState(![]),[_0x2e38e6,_0xeaec84]=useState(''),_0x400d62=useCallback(async _0x144bcf=>{const _0x216af0=a34_0x4dd1,_0x13646c=Date[_0x216af0(0xb1)](),_0x22266f=a34_0x2143f6['resolve'](process[_0x216af0(0xab)](),_0x144bcf);_0x195654(!![]);try{logger[_0x216af0(0xac)](_0x216af0(0xb5),_0x216af0(0xaa),{'projectCode':_0x144bcf}),await execa(_0x216af0(0xa6),[_0x216af0(0xaf),_0x216af0(0xa7),'.'],{'cwd':_0x22266f});const _0x2df0f1=Date[_0x216af0(0xb1)]()-_0x13646c;logger[_0x216af0(0xb8)]('format',_0x216af0(0xb4),_0x2df0f1,{'projectCode':_0x144bcf});}catch(_0x4adf04){const _0x40b4fe=Date['now']()-_0x13646c;logger['error'](_0x216af0(0xb5),'代码格式化失败',{'projectCode':_0x144bcf,'error':_0x4adf04 instanceof Error?_0x4adf04['message']:String(_0x4adf04),'duration':_0x40b4fe});throw _0x4adf04;}finally{_0x195654(![]),_0x324909(!![]),_0xeaec84(formatElapsed(_0x13646c));}},[]);return{'taskName':_0x712bb5(0xa5),'finished':_0x138387,'loading':_0x349bfe,'elapsed':_0x2e38e6,'doTask':_0x400d62};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1743fb,_0x5c554a){const _0x6e6437=a35_0x3dd2,_0x266d6e=_0x1743fb();while(!![]){try{const _0x18ea69=-parseInt(_0x6e6437(0xda))/0x1+-parseInt(_0x6e6437(0xd5))/0x2*(parseInt(_0x6e6437(0xc9))/0x3)+-parseInt(_0x6e6437(0xd9))/0x4*(-parseInt(_0x6e6437(0xcd))/0x5)+parseInt(_0x6e6437(0xcf))/0x6+parseInt(_0x6e6437(0xd2))/0x7*(parseInt(_0x6e6437(0xc6))/0x8)+-parseInt(_0x6e6437(0xce))/0x9+parseInt(_0x6e6437(0xd6))/0xa*(-parseInt(_0x6e6437(0xd8))/0xb);if(_0x18ea69===_0x5c554a)break;else _0x266d6e['push'](_0x266d6e['shift']());}catch(_0x47a760){_0x266d6e['push'](_0x266d6e['shift']());}}}(a35_0x3088,0x6ff86));function a35_0x3dd2(_0x4ec85a,_0x3fc110){const _0x308888=a35_0x3088();return a35_0x3dd2=function(_0x3dd25c,_0x5a321a){_0x3dd25c=_0x3dd25c-0xc5;let _0x3c48e9=_0x308888[_0x3dd25c];return _0x3c48e9;},a35_0x3dd2(_0x4ec85a,_0x3fc110);}import a35_0x5916b7 from'node:path';import{useCallback,useState}from'react';import{execa}from'execa';import{formatElapsed}from'./format-elapsed.js';import{logger}from'../utils/logger.js';function a35_0x3088(){const _0x3c1523=['开始安装依赖','171259kExATr','3090244XlaDiD','16375ruhjkh','success','24gkohrP','install','--registry','3MLwVKb','info','resolve','npm','5VwlaBE','895122tPECgQ','3104358ajNmvv','依赖安装失败','message','496167pIzxyA','https://registry.npmmirror.com','now','1140094QnTXSp','230GPNAzK'];a35_0x3088=function(){return _0x3c1523;};return a35_0x3088();}export function useInstallDependencies(){const [_0x1c0304,_0x57d68e]=useState(![]),[_0x527c91,_0x140e7e]=useState(![]),[_0x47267b,_0x55e4ce]=useState(''),_0xe7da17=useCallback(async _0x4ce8d9=>{const _0x406b86=a35_0x3dd2,_0x1fbb3c=Date[_0x406b86(0xd4)](),_0x7d1f=a35_0x5916b7[_0x406b86(0xcb)](process['cwd'](),_0x4ce8d9);_0x57d68e(!![]),_0x140e7e(![]);const _0x4e5483=async(_0x1c4aa3,_0x33bb9a)=>{await execa(_0x1c4aa3,_0x33bb9a,{'cwd':_0x7d1f});};try{logger[_0x406b86(0xca)](_0x406b86(0xc7),_0x406b86(0xd7),{'projectCode':_0x4ce8d9,'registry':_0x406b86(0xd3)}),await _0x4e5483(_0x406b86(0xcc),[_0x406b86(0xc7),_0x406b86(0xc8),_0x406b86(0xd3)]);const _0x341ed6=Date[_0x406b86(0xd4)]()-_0x1fbb3c;logger[_0x406b86(0xc5)](_0x406b86(0xc7),'依赖安装完成',_0x341ed6,{'projectCode':_0x4ce8d9});}catch(_0x138de9){const _0x25e25e=Date[_0x406b86(0xd4)]()-_0x1fbb3c;logger['error']('install',_0x406b86(0xd0),{'projectCode':_0x4ce8d9,'error':_0x138de9 instanceof Error?_0x138de9[_0x406b86(0xd1)]:String(_0x138de9),'duration':_0x25e25e});throw _0x138de9;}finally{_0x57d68e(![]),_0x140e7e(!![]),_0x55e4ce(formatElapsed(_0x1fbb3c));}},[]);return{'taskName':'安装依赖','finished':_0x527c91,'loading':_0x1c0304,'elapsed':_0x47267b,'doTask':_0xe7da17};}
|
package/lib/help.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a36_0x2c50(_0x36caa3,_0x1914a1){var _0x154b2b=a36_0x154b();return a36_0x2c50=function(_0x2c5056,_0x40ffdb){_0x2c5056=_0x2c5056-0x124;var _0x1d300d=_0x154b2b[_0x2c5056];return _0x1d300d;},a36_0x2c50(_0x36caa3,_0x1914a1);}(function(_0xc9a43f,_0x5cac5f){var _0x29c877=a36_0x2c50,_0x49c47a=_0xc9a43f();while(!![]){try{var _0xa3a475=parseInt(_0x29c877(0x124))/0x1+-parseInt(_0x29c877(0x129))/0x2+-parseInt(_0x29c877(0x125))/0x3*(-parseInt(_0x29c877(0x128))/0x4)+-parseInt(_0x29c877(0x12b))/0x5+parseInt(_0x29c877(0x127))/0x6+-parseInt(_0x29c877(0x126))/0x7+-parseInt(_0x29c877(0x12a))/0x8*(-parseInt(_0x29c877(0x12e))/0x9);if(_0xa3a475===_0x5cac5f)break;else _0x49c47a['push'](_0x49c47a['shift']());}catch(_0x38cdfb){_0x49c47a['push'](_0x49c47a['shift']());}}}(a36_0x154b,0x98d24));import{jsx as a36_0xe7d1ce,jsxs as a36_0x198e07}from'react/jsx-runtime';function a36_0x154b(){var _0x257333=['8671082wyBOvB','5229684RfWWBH','184136OAqaRh','1955980xWGqdD','780696YUrXta','1712405iBRoOR','lovrabet\x20--help','查看可用命令。','162xNDqpU','column','372837KtPAQi','12tZMEpb'];a36_0x154b=function(){return _0x257333;};return a36_0x154b();}import{Box,Text}from'ink';export function Help(){var _0x4499fd=a36_0x2c50;return a36_0x198e07(Box,{'flexDirection':_0x4499fd(0x12f),'marginTop':0x1,'marginBottom':0x1,'children':[a36_0x198e07(Box,{'children':[a36_0xe7d1ce(Box,{'width':'1'}),a36_0xe7d1ce(Text,{'children':'!\x20请指定一个有效的命令。'})]}),a36_0x198e07(Box,{'marginTop':0x1,'children':[a36_0xe7d1ce(Box,{'width':'1'}),a36_0x198e07(Text,{'children':['\x20\x20','使用']}),a36_0x198e07(Text,{'bold':!![],'color':'green','children':['\x20',_0x4499fd(0x12c),'\x20']}),a36_0xe7d1ce(Text,{'children':_0x4499fd(0x12d)})]})]});}
|
package/lib/utils/config.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x54e7af,_0x106ead){const _0x3c6db9=a37_0x8635,_0x5f06f8=_0x54e7af();while(!![]){try{const _0x4960a2=-parseInt(_0x3c6db9(0x191))/0x1*(-parseInt(_0x3c6db9(0x18a))/0x2)+parseInt(_0x3c6db9(0x188))/0x3*(-parseInt(_0x3c6db9(0x18c))/0x4)+parseInt(_0x3c6db9(0x18d))/0x5+-parseInt(_0x3c6db9(0x18f))/0x6+-parseInt(_0x3c6db9(0x18e))/0x7+parseInt(_0x3c6db9(0x187))/0x8*(parseInt(_0x3c6db9(0x189))/0x9)+parseInt(_0x3c6db9(0x190))/0xa;if(_0x4960a2===_0x106ead)break;else _0x5f06f8['push'](_0x5f06f8['shift']());}catch(_0x17f91a){_0x5f06f8['push'](_0x5f06f8['shift']());}}}(a37_0x293f,0xeda33));function a37_0x8635(_0x2b034d,_0x26c0bc){const _0x293f45=a37_0x293f();return a37_0x8635=function(_0x863540,_0x5d178){_0x863540=_0x863540-0x186;let _0x3cc649=_0x293f45[_0x863540];return _0x3cc649;},a37_0x8635(_0x2b034d,_0x26c0bc);}import{existsSync,readFileSync}from'node:fs';function a37_0x293f(){const _0x49062c=['66645BLXSyC','10622535sJaHSe','6288894FoVrYN','38904670vGJBBc','2510mRoMas','parse','172656FoIUQJ','3oQOCQP','81iuJclj','706DQJaZP','utf8','5780188oSlLQX'];a37_0x293f=function(){return _0x49062c;};return a37_0x293f();}import{resolve}from'node:path';export const configPath=resolve(process['cwd'](),'.lovrabetrc');export function readConfig(){const _0x10fa29=a37_0x8635;try{if(existsSync(configPath)){const _0x2c740a=readFileSync(configPath,{'encoding':_0x10fa29(0x18b)});return _0x2c740a?JSON[_0x10fa29(0x186)](_0x2c740a):{};}}catch(_0x19b04a){}return{};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x54cd09,_0x545a0a){const _0x35aec2=a38_0x5b0e,_0x23def0=_0x54cd09();while(!![]){try{const _0x35cf41=parseInt(_0x35aec2(0xa8))/0x1+parseInt(_0x35aec2(0xa5))/0x2+-parseInt(_0x35aec2(0xab))/0x3*(-parseInt(_0x35aec2(0x9e))/0x4)+parseInt(_0x35aec2(0xa2))/0x5*(-parseInt(_0x35aec2(0xa0))/0x6)+-parseInt(_0x35aec2(0x9f))/0x7*(-parseInt(_0x35aec2(0xa9))/0x8)+-parseInt(_0x35aec2(0x9d))/0x9*(parseInt(_0x35aec2(0xaa))/0xa)+parseInt(_0x35aec2(0xa1))/0xb*(-parseInt(_0x35aec2(0xac))/0xc);if(_0x35cf41===_0x545a0a)break;else _0x23def0['push'](_0x23def0['shift']());}catch(_0x2ef68b){_0x23def0['push'](_0x23def0['shift']());}}}(a38_0x5c26,0x27269));function a38_0x5b0e(_0x402f35,_0x25844e){const _0x5c267a=a38_0x5c26();return a38_0x5b0e=function(_0x5b0e2e,_0x2f852a){_0x5b0e2e=_0x5b0e2e-0x9d;let _0x204c63=_0x5c267a[_0x5b0e2e];return _0x204c63;},a38_0x5b0e(_0x402f35,_0x25844e);}import a38_0x79bb48 from'node:path';import a38_0x1a6600 from'node:fs';function a38_0x5c26(){const _0xda5c0a=['949739RhNwQs','336TxHnuh','78397fEJWqb','13535eaTzbL','join','isDirectory','16646QEBZMN','name','mkdirSync','288948UCiFij','8PfyZRh','10HXtQLp','3cqGJnh','564PncuYV','copyFileSync','48123mGhykm','877284OJasqW'];a38_0x5c26=function(){return _0xda5c0a;};return a38_0x5c26();}export async function copyDirectory(_0x2c1281,_0x513ddc){const _0x246eee=a38_0x5b0e;try{const _0x177bb9=a38_0x1a6600['readdirSync'](_0x2c1281,{'withFileTypes':!![]});a38_0x1a6600[_0x246eee(0xa7)](_0x513ddc,{'recursive':!![]});for(const _0x551baf of _0x177bb9){const _0x20ae80=a38_0x79bb48[_0x246eee(0xa3)](_0x2c1281,_0x551baf['name']),_0x574d43=a38_0x79bb48[_0x246eee(0xa3)](_0x513ddc,_0x551baf[_0x246eee(0xa6)]);_0x551baf[_0x246eee(0xa4)]()?await copyDirectory(_0x20ae80,_0x574d43):a38_0x1a6600[_0x246eee(0xad)](_0x20ae80,_0x574d43);}}catch(_0x50d5b9){console['error']('复制目录时出错:',_0x50d5b9);}}
|