jjb-cmd 2.3.2 → 2.3.3
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/bin/command.js +6 -0
- package/package.json +7 -1
- package/src/auth.js +1 -1
- package/src/code-optimization.js +1 -0
- package/src/config.js +1 -1
- package/src/lib/code-optimization.js +1 -0
- package/src/publish.js +1 -1
- package/src/push.js +1 -1
- package/src/rm-rf.js +1 -1
- package/src/tools.js +1 -1
package/bin/command.js
CHANGED
@@ -20,6 +20,7 @@ commander.command('help').description('-- 帮助').action(() => {
|
|
20
20
|
console.log('使用:');
|
21
21
|
console.log('');
|
22
22
|
console.log('jjb-cmd help 帮助');
|
23
|
+
console.log('jjb-cmd opti 代码优化');
|
23
24
|
console.log('jjb-cmd v 查看版本');
|
24
25
|
console.log('jjb-cmd push <version> 发布云组件\n\targ1 <version> 发布版本,可设置为latest');
|
25
26
|
console.log('jjb-cmd auth <username> <password> 登录授权\n\targ1 <username> 用户名\n\targ2 <password> 密码');
|
@@ -39,6 +40,11 @@ commander.command('auth [args]').description('-- 授权').action(args => {
|
|
39
40
|
require('../src/auth.js')(process.argv.splice(3));
|
40
41
|
});
|
41
42
|
|
43
|
+
// 优化
|
44
|
+
commander.command('opti').description('-- 代码优化').action(args => {
|
45
|
+
require('../src/code-optimization')();
|
46
|
+
});
|
47
|
+
|
42
48
|
// 发包
|
43
49
|
commander.command('publish [args]').description('-- 发布包').action(args => {
|
44
50
|
require('../src/publish.js')(args);
|
package/package.json
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
"env": "prod",
|
5
5
|
"httpMethod": "http",
|
6
6
|
"pushMessage": "yes",
|
7
|
-
"version": "2.3.
|
7
|
+
"version": "2.3.3",
|
8
8
|
"description": "jjb-cmd命令行工具",
|
9
9
|
"main": "index.js",
|
10
10
|
"scripts": {
|
@@ -18,6 +18,12 @@
|
|
18
18
|
"license": "MIT",
|
19
19
|
"dependencies": {
|
20
20
|
"chalk": "2.4.0",
|
21
|
+
"prettier": "^3.3.3",
|
22
|
+
"@babel/traverse": "^7.25.9",
|
23
|
+
"@babel/generator": "^7.26.0",
|
24
|
+
"@babel/parser": "^7.26.1",
|
25
|
+
"@babel/preset-env": "^7.23.2",
|
26
|
+
"@babel/preset-typescript": "^7.23.2",
|
21
27
|
"@babel/core": "^7.19.3",
|
22
28
|
"@babel/preset-react": "^7.18.6",
|
23
29
|
"axios": "^1.1.3",
|
package/src/auth.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
const a0_0x49120d=a0_0x4369;(function(_0x437300,_0x206e69){const _0x15241e=a0_0x4369,_0x7b58a4=_0x437300();while(!![]){try{const _0x17dd32=-parseInt(_0x15241e(0xa1))/0x1+-parseInt(_0x15241e(0xa7))/0x2*(-parseInt(_0x15241e(0x95))/0x3)+parseInt(_0x15241e(0xae))/0x4*(parseInt(_0x15241e(0x93))/0x5)+-parseInt(_0x15241e(0xac))/0x6+-parseInt(_0x15241e(0x96))/0x7*(-parseInt(_0x15241e(0xa8))/0x8)+-parseInt(_0x15241e(0x9b))/0x9*(-parseInt(_0x15241e(0x98))/0xa)+-parseInt(_0x15241e(0xa5))/0xb;if(_0x17dd32===_0x206e69)break;else _0x7b58a4['push'](_0x7b58a4['shift']());}catch(_0x2ed0cd){_0x7b58a4['push'](_0x7b58a4['shift']());}}}(a0_0xe1de,0xaaab2));const axios=require(a0_0x49120d(0x94)),chalk=require(a0_0x49120d(0xb0)),fs=require('fs'),path=require('path'),{getApiHost}=require(a0_0x49120d(0x9f));function a0_0x4369(_0x55cfba,_0x2998ed){const _0xe1dea8=a0_0xe1de();return a0_0x4369=function(_0x4369af,_0x7f21c8){_0x4369af=_0x4369af-0x93;let _0x23bc44=_0xe1dea8[_0x4369af];return _0x23bc44;},a0_0x4369(_0x55cfba,_0x2998ed);}function a0_0xe1de(){const _0x8d65c1=['Auth:\x20授权登录!','Auth:\x20','join','2372381huWUMe','red','137842WqFVpl','2577624RrZxBs','exit','writeFileSync','../.auth','5232042aJmSzv','post','8AUOmDi','status','chalk','green','684350rteAzb','axios','51CquHgm','21IYFfNT','Auth:\x20登录成功,已缓存登录状态!','463170XSuWfG','Auth:\x20登录失败!','log','63THxIzn','data','catch','message','./config','unlinkSync','949489JrDlPB'];a0_0xe1de=function(){return _0x8d65c1;};return a0_0xe1de();}module['exports']=_0x3785b7=>{const _0x2db4da=a0_0x49120d;console[_0x2db4da(0x9a)](_0x2db4da(0xa2));const [_0xaedd96,_0x116aca]=_0x3785b7;axios[_0x2db4da(0xad)](getApiHost()+'/api/auth',{'username':_0xaedd96,'password':_0x116aca})['then'](_0x239979=>{const _0x45ab8b=_0x2db4da,_0x56447a=path[_0x45ab8b(0xa4)](__dirname,_0x45ab8b(0xab));_0x239979[_0x45ab8b(0x9c)][_0x45ab8b(0xaf)]?(console[_0x45ab8b(0x9a)](chalk[_0x45ab8b(0xb1)](_0x45ab8b(0x97))),fs[_0x45ab8b(0xaa)](_0x56447a,_0xaedd96+'/'+_0x116aca)):(console[_0x45ab8b(0x9a)](chalk[_0x45ab8b(0xa6)](_0x45ab8b(0xa3)+_0x239979[_0x45ab8b(0x9c)][_0x45ab8b(0x9e)])),fs['existsSync'](_0x56447a)&&fs[_0x45ab8b(0xa0)](_0x56447a),process['exit'](0x0));})[_0x2db4da(0x9d)](_0x263f32=>{const _0x350757=_0x2db4da;console[_0x350757(0x9a)](chalk[_0x350757(0xb1)](_0x350757(0x99)+_0x263f32[_0x350757(0x9e)])),process[_0x350757(0xa9)](0x0);});};
|
@@ -0,0 +1 @@
|
|
1
|
+
function a1_0x58f5(_0x5d543c,_0x4630e9){const _0x4f690e=a1_0x4f69();return a1_0x58f5=function(_0x58f5b3,_0x4155dc){_0x58f5b3=_0x58f5b3-0x66;let _0x2d0e6d=_0x4f690e[_0x58f5b3];return _0x2d0e6d;},a1_0x58f5(_0x5d543c,_0x4630e9);}function a1_0x4f69(){const _0x227250=['log','583116tzJvXf','stdout','question','39384TeaKic','1978781zbmDnx','readline','348771UnmUzc','取消优化。','优化完成。','1503iGQGgo','无效操作。','createInterface','exit','1549655dmXEKL','8zFehDP','1128024xFsHGE','6PMexxY','3CrHWCQ','451RGrUPs','11660UIuvxb','./lib/code-optimization','trim'];a1_0x4f69=function(){return _0x227250;};return a1_0x4f69();}const a1_0x222fa7=a1_0x58f5;(function(_0xc17de4,_0x398783){const _0x32820c=a1_0x58f5,_0x29b57b=_0xc17de4();while(!![]){try{const _0x42d1ca=-parseInt(_0x32820c(0x73))/0x1+parseInt(_0x32820c(0x6d))/0x2*(parseInt(_0x32820c(0x67))/0x3)+parseInt(_0x32820c(0x7c))/0x4+parseInt(_0x32820c(0x7a))/0x5*(parseInt(_0x32820c(0x66))/0x6)+parseInt(_0x32820c(0x71))/0x7*(-parseInt(_0x32820c(0x7b))/0x8)+parseInt(_0x32820c(0x76))/0x9*(-parseInt(_0x32820c(0x69))/0xa)+-parseInt(_0x32820c(0x68))/0xb*(-parseInt(_0x32820c(0x70))/0xc);if(_0x42d1ca===_0x398783)break;else _0x29b57b['push'](_0x29b57b['shift']());}catch(_0x5de57f){_0x29b57b['push'](_0x29b57b['shift']());}}}(a1_0x4f69,0x2ed89));const path=require('path'),readline=require(a1_0x222fa7(0x72)),{bootstrap}=require(a1_0x222fa7(0x6a)),io=readline[a1_0x222fa7(0x78)]({'input':process['stdin'],'output':process[a1_0x222fa7(0x6e)]});module['exports']=function(){const _0x5a9ee2=a1_0x222fa7,_0x4db2c0=path['resolve']('./');io[_0x5a9ee2(0x6f)]('是否确认优化代码?[y/n]:',function(_0x5b003e){const _0x277e3c=_0x5a9ee2;if(_0x5b003e[_0x277e3c(0x6b)]()==='y')bootstrap(_0x4db2c0,0x64,()=>{const _0xa47ee3=_0x277e3c;console[_0xa47ee3(0x6c)](_0xa47ee3(0x75)),process['exit'](0x0);});else _0x5b003e['trim']()==='n'?(console['log'](_0x277e3c(0x74)),process[_0x277e3c(0x79)](0x0)):(console[_0x277e3c(0x6c)](_0x277e3c(0x77)),process[_0x277e3c(0x79)](0x0));});};
|
package/src/config.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
const
|
1
|
+
const a2_0x1f05df=a2_0x56c8;function a2_0x56c8(_0x462af2,_0x2b7082){const _0x54baa0=a2_0x54ba();return a2_0x56c8=function(_0x56c886,_0xf18b54){_0x56c886=_0x56c886-0x149;let _0x1f7fb3=_0x54baa0[_0x56c886];return _0x1f7fb3;},a2_0x56c8(_0x462af2,_0x2b7082);}(function(_0x4de290,_0x39001a){const _0x6e2320=a2_0x56c8,_0x3b11bb=_0x4de290();while(!![]){try{const _0x4177bf=parseInt(_0x6e2320(0x15e))/0x1*(-parseInt(_0x6e2320(0x169))/0x2)+parseInt(_0x6e2320(0x168))/0x3+-parseInt(_0x6e2320(0x15a))/0x4*(-parseInt(_0x6e2320(0x149))/0x5)+parseInt(_0x6e2320(0x158))/0x6*(-parseInt(_0x6e2320(0x160))/0x7)+parseInt(_0x6e2320(0x165))/0x8*(-parseInt(_0x6e2320(0x15f))/0x9)+-parseInt(_0x6e2320(0x14c))/0xa+parseInt(_0x6e2320(0x14d))/0xb;if(_0x4177bf===_0x39001a)break;else _0x3b11bb['push'](_0x3b11bb['shift']());}catch(_0xe1cb6e){_0x3b11bb['push'](_0x3b11bb['shift']());}}}(a2_0x54ba,0x5b52b));function a2_0x54ba(){const _0x5bb179=['8XcfvRE','gPSit8aJsLVmNzuQ5Cy4','GIT_TEMP_DIR','26628PFgfKT','68GwvWXo','jjb-assembly-','FT3pKzxpRynFkmddJ9Bs','CLOUD_PROJECT','join','jjb-assembly-java','../package.json','getApiHost','709145Alidlu','http','tmpdir','1598860kbhGad','8928931pJJEBD','TEMPLATE_FOLDER','path','7V-YUxhmh51Mdhgx4rq4','parse','https://cdn.cqjjb.cn/jjb-cloud-config','prod','GIT_JAVA_ENV_JSON','http://192.168.1.242:10985','hLqARY89CN6fUD3yg4NL','snBxJ2i5kYarGGcsojhY','13236RvaPId','toString','12PLQBIo','test','API_HOST','GIT_TEMP_JAVA','3434zmpVFi','3432609lPSmfX','679wHJmRA','ywPtT3xCG6b_vAxp6sTj','API_HOST_TEST','GIT_HOST','e9njpBd1nS_LREN8GFpR'];a2_0x54ba=function(){return _0x5bb179;};return a2_0x54ba();}const os=require('os'),path=require(a2_0x1f05df(0x14f)),fs=require('fs'),API_HOST='http://120.26.210.58:8088',API_HOST_HTTPS='https://jcloud.cqjjb.cn',API_HOST_TEST='http://120.26.210.58:8089';exports['CONFIG_FILE_HOST']=a2_0x1f05df(0x152),exports[a2_0x1f05df(0x15c)]=API_HOST,exports[a2_0x1f05df(0x162)]=API_HOST_TEST,exports[a2_0x1f05df(0x163)]=a2_0x1f05df(0x155),exports[a2_0x1f05df(0x167)]=a2_0x1f05df(0x16a)+Date['now'](),exports[a2_0x1f05df(0x15d)]=a2_0x1f05df(0x16e),exports[a2_0x1f05df(0x154)]={'development':'dev','production':a2_0x1f05df(0x153),'test':'test'},exports[a2_0x1f05df(0x16c)]={'common':{'token':'G4HJRsHr9D7Ssmixegw2','projectId':0x117},'react-admin-component':{'token':a2_0x1f05df(0x16b),'projectId':0x154},'jjb-dva-runtime':{'token':a2_0x1f05df(0x156),'projectId':0x23b},'jjb-common-lib':{'token':a2_0x1f05df(0x164),'projectId':0x23c},'jjb-common-decorator':{'token':a2_0x1f05df(0x166),'projectId':0x23e},'vue-unisass-component':{'token':'d4wQ7dzEjYPsgVbKnYei','projectId':0x153},'react-component':{'token':a2_0x1f05df(0x157),'projectId':0x33f},'micro-app-ts':{'token':a2_0x1f05df(0x150),'projectId':0x33e},'micro-app':{'token':'FqNrmFAgrxasMrbbjvq9','projectId':0x33d},'lib':{'token':a2_0x1f05df(0x161),'projectId':0x33c}},exports[a2_0x1f05df(0x14e)]=os[a2_0x1f05df(0x14b)]()+'\x5c'+exports[a2_0x1f05df(0x167)],exports[a2_0x1f05df(0x170)]=()=>{const _0x3073d8=a2_0x1f05df,_0x1ab601=JSON[_0x3073d8(0x151)](fs['readFileSync'](path[_0x3073d8(0x16d)](__dirname,_0x3073d8(0x16f)))[_0x3073d8(0x159)]());return _0x1ab601['env']===_0x3073d8(0x15b)?API_HOST_TEST:_0x1ab601['httpMethod']===_0x3073d8(0x14a)?API_HOST:API_HOST_HTTPS;};
|
@@ -0,0 +1 @@
|
|
1
|
+
const a3_0x2d0681=a3_0x321f;function a3_0x321f(_0x3719f1,_0x1a6871){const _0x44c7a0=a3_0x44c7();return a3_0x321f=function(_0x321fc2,_0x211ae8){_0x321fc2=_0x321fc2-0x66;let _0x3862ec=_0x44c7a0[_0x321fc2];return _0x3862ec;},a3_0x321f(_0x3719f1,_0x1a6871);}(function(_0x3325b3,_0x5275a3){const _0x16bedc=a3_0x321f,_0x22af9d=_0x3325b3();while(!![]){try{const _0x2a36be=-parseInt(_0x16bedc(0xa0))/0x1+-parseInt(_0x16bedc(0x97))/0x2+-parseInt(_0x16bedc(0x7d))/0x3*(-parseInt(_0x16bedc(0x66))/0x4)+-parseInt(_0x16bedc(0x9b))/0x5+parseInt(_0x16bedc(0x71))/0x6*(parseInt(_0x16bedc(0x9f))/0x7)+-parseInt(_0x16bedc(0x6e))/0x8+parseInt(_0x16bedc(0x6d))/0x9;if(_0x2a36be===_0x5275a3)break;else _0x22af9d['push'](_0x22af9d['shift']());}catch(_0x1fda15){_0x22af9d['push'](_0x22af9d['shift']());}}}(a3_0x44c7,0xe8d02));function a3_0x44c7(){const _0x164310=['value','add','pathType','6536663oYxAQO','1385576VfGIcF','none','@babel/parser','specifiers','indexOf','filter','importType','default','jsx','代码优化完成!','2305672pTIpCt','type','node','tilda','文件不存在无法格式化!','JSXAttribute','.ejs','9405954JBEPtX','2422648oGxGHt','ImportDefaultSpecifier','relative','12wZpjGR','babel','../','node_modules','has','decorators','leadingComments','named','trim','some','join','writeFileSync','6KVVmZd','test','name','sideEffect','avoid','updateFileContent','startsWith','attributes','readFileSync','formation','strict','@babel/generator','readdirSync','isDirectory','ImportNamespaceSpecifier','sort','includes','from','optimization','code','module','.mjs','ImportSpecifier','defaultAndNamed','extname','length','2272670eUVRZq','findFilesWithExtensions','.js','log','1436080RfSvKa'];a3_0x44c7=function(){return _0x164310;};return a3_0x44c7();}const fs=require('node:fs'),path=require('node:path'),prettier=require('prettier'),parser=require(a3_0x2d0681(0xa2)),traverse=require('@babel/traverse')['default'],generate=require(a3_0x2d0681(0x88))[a3_0x2d0681(0xa7)];exports[a3_0x2d0681(0x8f)]=_0x1dadb7=>{const _0x3903ed=a3_0x2d0681,_0x46498a=parser['parse'](_0x1dadb7,{'sourceType':_0x3903ed(0x91),'plugins':[_0x3903ed(0xa8),_0x3903ed(0x76),'doExpressions'],'attachComment':!![]});function _0xc83fc0(_0x2291ac){const _0x18176f=_0x3903ed;if(_0x2291ac[_0x18176f(0x83)]('~'))return _0x18176f(0x69);if(_0x2291ac[_0x18176f(0x83)]('./')||_0x2291ac['startsWith'](_0x18176f(0x73)))return _0x18176f(0x70);if(_0x2291ac[_0x18176f(0x83)]('@'))return _0x18176f(0x74);return _0x18176f(0x74);}function _0x44a8c0(_0x44c4b8){const _0x1d4a94=_0x3903ed;if(_0x44c4b8[_0x1d4a94(0xa3)][_0x1d4a94(0x96)]===0x0)return _0x1d4a94(0x80);if(_0x44c4b8[_0x1d4a94(0xa3)][_0x1d4a94(0x7a)](_0x157a3e=>_0x157a3e[_0x1d4a94(0x67)]==='ImportDefaultSpecifier')&&_0x44c4b8[_0x1d4a94(0xa3)][_0x1d4a94(0x96)]===0x1)return _0x1d4a94(0xa7);if(_0x44c4b8[_0x1d4a94(0xa3)]['every'](_0x196cfb=>_0x196cfb[_0x1d4a94(0x67)]===_0x1d4a94(0x8b)))return'namespace';if(_0x44c4b8[_0x1d4a94(0xa3)][_0x1d4a94(0x7a)](_0x3ab08b=>_0x3ab08b[_0x1d4a94(0x67)]===_0x1d4a94(0x6f))&&_0x44c4b8['specifiers']['some'](_0x4e043f=>_0x4e043f[_0x1d4a94(0x67)]===_0x1d4a94(0x93)))return _0x1d4a94(0x94);return _0x1d4a94(0x78);}function _0x5cee46(_0x17ff39){const _0x488ec0=_0x3903ed;console[_0x488ec0(0x9a)](_0x17ff39['node']);const _0xb26818=_0x17ff39['node'][_0x488ec0(0x77)];return _0xb26818&&_0xb26818[_0x488ec0(0x96)]>0x0;}const _0x269224=[];traverse(_0x46498a,{'ImportDeclaration'(_0x2920b0){const _0x32ba83=_0x3903ed;_0x269224['push']({'node':_0x2920b0[_0x32ba83(0x68)],'importType':_0x44a8c0(_0x2920b0[_0x32ba83(0x68)]),'pathType':_0xc83fc0(_0x2920b0[_0x32ba83(0x68)]['source'][_0x32ba83(0x9c)])}),_0x2920b0['remove']();},'JSXOpeningElement'(_0x2bac65){const _0x403a94=_0x3903ed,_0xfd9829=_0x2bac65[_0x403a94(0x68)]['attributes'],_0x303da0=_0xfd9829[_0x403a94(0xa5)](_0x5d1bc8=>_0x5d1bc8[_0x403a94(0x67)]==='JSXSpreadAttribute'),_0x36f0b1=_0xfd9829[_0x403a94(0xa5)](_0x1feb57=>_0x1feb57[_0x403a94(0x67)]===_0x403a94(0x6b)&&_0x1feb57[_0x403a94(0x9c)]===null),_0x4782ba=_0xfd9829[_0x403a94(0xa5)](_0x1b229f=>{const _0x5464a6=_0x403a94;if(_0x1b229f[_0x5464a6(0x67)]===_0x5464a6(0x6b)){const _0x31a1f7=_0x1b229f[_0x5464a6(0x7f)][_0x5464a6(0x7f)];return _0x31a1f7[_0x5464a6(0x83)]('on')&&/[A-Z]/[_0x5464a6(0x7e)](_0x31a1f7[0x2]);}return![];}),_0x53b71a=_0xfd9829[_0x403a94(0xa5)](_0x4f4c32=>!_0x303da0['includes'](_0x4f4c32)&&!_0x36f0b1[_0x403a94(0x8d)](_0x4f4c32)&&!_0x4782ba[_0x403a94(0x8d)](_0x4f4c32)),_0x65247f=_0x36f0b1['sort']((_0x23dba5,_0x1049db)=>_0x23dba5[_0x403a94(0x7f)]['name']['length']-_0x1049db[_0x403a94(0x7f)][_0x403a94(0x7f)][_0x403a94(0x96)]),_0x910df4=_0x4782ba[_0x403a94(0x8c)]((_0x534966,_0x4b992d)=>_0x534966[_0x403a94(0x7f)][_0x403a94(0x7f)][_0x403a94(0x96)]-_0x4b992d[_0x403a94(0x7f)][_0x403a94(0x7f)][_0x403a94(0x96)]),_0x3018c5=_0x53b71a['sort']((_0x5cc5de,_0x1f23f8)=>_0x5cc5de[_0x403a94(0x7f)][_0x403a94(0x7f)]['length']-_0x1f23f8[_0x403a94(0x7f)][_0x403a94(0x7f)][_0x403a94(0x96)]);_0x2bac65[_0x403a94(0x68)][_0x403a94(0x84)]=[..._0x65247f,..._0x3018c5,..._0x910df4,..._0x303da0];}});const _0x7e2d=[_0x3903ed(0x74),'tilda',_0x3903ed(0x70)],_0x2876f3=[_0x3903ed(0xa7),_0x3903ed(0x80),'namespace',_0x3903ed(0x94),_0x3903ed(0x78)];_0x269224[_0x3903ed(0x8c)]((_0x20b917,_0x389af5)=>{const _0x5e0a5b=_0x3903ed,_0x35beab=_0x7e2d['indexOf'](_0x20b917[_0x5e0a5b(0x9e)])-_0x7e2d[_0x5e0a5b(0xa4)](_0x389af5[_0x5e0a5b(0x9e)]);if(_0x35beab!==0x0)return _0x35beab;const _0x236df2=_0x2876f3[_0x5e0a5b(0xa4)](_0x20b917[_0x5e0a5b(0xa6)])-_0x2876f3[_0x5e0a5b(0xa4)](_0x389af5[_0x5e0a5b(0xa6)]);if(_0x236df2!==0x0)return _0x236df2;const _0x5ea22c=_0x20b917[_0x5e0a5b(0x68)][_0x5e0a5b(0xa3)]['reduce']((_0x3fc0f2,_0x47fb03)=>_0x3fc0f2+generate(_0x47fb03)[_0x5e0a5b(0x90)][_0x5e0a5b(0x96)],0x0),_0x5e2139=_0x389af5[_0x5e0a5b(0x68)]['specifiers']['reduce']((_0x201ed0,_0x2b8b7d)=>_0x201ed0+generate(_0x2b8b7d)[_0x5e0a5b(0x90)][_0x5e0a5b(0x96)],0x0);return _0x5ea22c-_0x5e2139;});let _0x47ddff='',_0x3096bd='';const _0xf494a2=_0x269224['map']((_0x3279fb,_0x4f401)=>{const _0x17c127=_0x3903ed,_0x3ae948=generate(_0x3279fb[_0x17c127(0x68)],{'comments':![],'compact':![]})['code'];let _0x3240db='';return _0x4f401>0x0&&(_0x3279fb[_0x17c127(0xa6)]!==_0x47ddff||_0x3279fb['pathType']!==_0x3096bd)&&(_0x3240db='\x0a'),_0x47ddff=_0x3279fb[_0x17c127(0xa6)],_0x3096bd=_0x3279fb[_0x17c127(0x9e)],_0x3240db+_0x3ae948;})[_0x3903ed(0x7b)]('\x0a'),_0x367b99=generate(_0x46498a,{'comments':!![],'compact':![]})['code'],_0xc940dc=_0xf494a2+'\x0a\x0a'+_0x367b99[_0x3903ed(0x79)]();return _0xc940dc;},exports[a3_0x2d0681(0x98)]=_0x582856=>{const _0x25ec29=a3_0x2d0681,_0x19f3e8=new Set([_0x25ec29(0x99),'.jsx',_0x25ec29(0x92),_0x25ec29(0x6c)]),_0x23f9b8=new Set();function _0x3b5681(_0x579f7b){const _0x26cdd2=_0x25ec29,_0x15adab=fs[_0x26cdd2(0x89)](_0x579f7b);_0x15adab['forEach'](_0x1ecea5=>{const _0x347399=_0x26cdd2,_0x2609b4=path[_0x347399(0x7b)](_0x579f7b,_0x1ecea5),_0x4cb872=fs['statSync'](_0x2609b4);if(_0x4cb872[_0x347399(0x8a)]())_0x3b5681(_0x2609b4);else{if(_0x4cb872['isFile']()){const _0x142a6e=path[_0x347399(0x95)](_0x1ecea5);_0x19f3e8[_0x347399(0x75)](_0x142a6e)&&_0x23f9b8[_0x347399(0x9d)](_0x2609b4);}}});}return _0x3b5681(_0x582856),_0x23f9b8;},exports[a3_0x2d0681(0x86)]=(_0xda4e25,_0x38f815)=>{const _0xdfb11b=a3_0x2d0681;prettier['format'](_0xda4e25,{'semi':!![],'parser':_0xdfb11b(0x72),'useTabs':![],'tabWidth':0x2,'arrowParens':_0xdfb11b(0x81),'singleQuote':!![],'trailingComma':_0xdfb11b(0xa1),'bracketSpacing':!![],'jsxBracketSameLine':![],'experimentalTernaries':!![],'singleAttributePerLine':!![],'htmlWhitespaceSensitivity':_0xdfb11b(0x87)})['then'](_0x283f31=>_0x38f815(_0x283f31));},exports[a3_0x2d0681(0x82)]=(_0x5e68dc,_0x4f11de)=>{const _0x36fb2b=a3_0x2d0681;try{const _0x502aaf=fs[_0x36fb2b(0x85)](_0x5e68dc)['toString']();exports[_0x36fb2b(0x86)](exports[_0x36fb2b(0x8f)](_0x502aaf),_0x451579=>{const _0x19ef4c=_0x36fb2b;fs[_0x19ef4c(0x7c)](_0x5e68dc,_0x451579),console[_0x19ef4c(0x9a)](_0x19ef4c(0xa9),_0x5e68dc),_0x4f11de();});}catch(_0x5d52ce){console[_0x36fb2b(0x9a)](_0x36fb2b(0x6a),_0x5e68dc,_0x5d52ce);}},exports['bootstrap']=(_0x5e1db1,_0x144a0f,_0x39ec33)=>{const _0x3de85a=a3_0x2d0681;let _0x3ce29b=0x0;const _0x4badcc=Array[_0x3de85a(0x8e)](exports[_0x3de85a(0x98)](_0x5e1db1)),_0x2adced=setInterval(()=>{const _0x143295=_0x3de85a;if(_0x3ce29b<_0x4badcc[_0x143295(0x96)]){const _0x532a08=_0x4badcc[_0x3ce29b];exports[_0x143295(0x82)](_0x532a08,()=>_0x3ce29b++);}else clearInterval(_0x2adced),_0x39ec33();},_0x144a0f);};
|
package/src/publish.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
function
|
1
|
+
const a4_0x15fd1a=a4_0x56e6;function a4_0x363a(){const _0x37ba9c=['Error:\x20请在组件根目录为组件添加一个缩略图“thumbnail.png”文件!','./config','请输入此次组件发布的信息,按Enter确认:','yarn\x20build:production','420PyBCTd','status','npm\x20run\x20build:production','pushMessage','/api/file/publish','3434793MQgUwm','1544616BandYP','Auth:\x20正在获取授权!','Error:\x20授权失败!','15unJbFh','Error:\x20暴露的配置信息中缺少“info”!','Error:\x20请在组件根目录添加一个README.md说明文件!','then','Please\x20wait,\x20build\x20...,','stdout','Error:\x20授权失败,未知错误!','toString','catch','data','platform','log','length','4SWviBv','message','return\x20','Error:\x20请在组件入口文件中添加“window[props.componentKey]”以暴露组件的配置信息!','8601240zYHIaJ','red','split','../package.json','readFileSync','thumbnail.png','Auth:\x20授权成功!','join','component_config_content','94774asjZov','exit','Error:\x20组件发布失败!','resolve','post','match','indexOf','defaultSetting','existsSync','createInterface','/api/auth','Error:\x20组件发布失败!根目录缺少‘dist/index.js’文件!','green','blue','thumbnail_base64','3234329AktDJE','Sudo:\x20npm\x20build:production','execSync','stringify','from','../.auth','parse','/yarn.lock','index.js','README.md','23391ikZYaE','4016380hTecSB','base64','package_content','stdin','question'];a4_0x363a=function(){return _0x37ba9c;};return a4_0x363a();}function a4_0x56e6(_0x377e99,_0x1ca5b1){const _0x363ac4=a4_0x363a();return a4_0x56e6=function(_0x56e65c,_0xa6b0cd){_0x56e65c=_0x56e65c-0xab;let _0x53c26e=_0x363ac4[_0x56e65c];return _0x53c26e;},a4_0x56e6(_0x377e99,_0x1ca5b1);}(function(_0x37c1ac,_0xab60a5){const _0x1adf5a=a4_0x56e6,_0xea71c=_0x37c1ac();while(!![]){try{const _0xbb370f=parseInt(_0x1adf5a(0xaf))/0x1*(-parseInt(_0x1adf5a(0xbc))/0x2)+parseInt(_0x1adf5a(0xe4))/0x3+parseInt(_0x1adf5a(0xd6))/0x4+-parseInt(_0x1adf5a(0xe8))/0x5*(parseInt(_0x1adf5a(0xe5))/0x6)+parseInt(_0x1adf5a(0xcb))/0x7+-parseInt(_0x1adf5a(0xb3))/0x8+parseInt(_0x1adf5a(0xd5))/0x9*(parseInt(_0x1adf5a(0xdf))/0xa);if(_0xbb370f===_0xab60a5)break;else _0xea71c['push'](_0xea71c['shift']());}catch(_0x2c2e4e){_0xea71c['push'](_0xea71c['shift']());}}}(a4_0x363a,0xa6cd4));const path=require('path'),fs=require('fs'),os=require('os'),axios=require('axios'),chalk=require('chalk'),readline=require('readline'),io=readline[a4_0x15fd1a(0xc5)]({'input':process[a4_0x15fd1a(0xd9)],'output':process[a4_0x15fd1a(0xed)]}),child_process=require('child_process'),{getApiHost}=require(a4_0x15fd1a(0xdc)),submitFun=function(_0x4d07d9,_0x1e38e5){const _0x3acc3f=a4_0x15fd1a;_0x1e38e5[_0x3acc3f(0xb0)]=_0x4d07d9||'no\x20message',axios[_0x3acc3f(0xc0)](getApiHost()+_0x3acc3f(0xe3),_0x1e38e5)[_0x3acc3f(0xeb)](_0x41fc7b=>{const _0x514985=_0x3acc3f;console[_0x514985(0xad)](chalk['green'](_0x41fc7b[_0x514985(0xab)]['message'])),process[_0x514985(0xbd)](0x0);})[_0x3acc3f(0xf0)](_0x2c2e8d=>{const _0x3b8825=_0x3acc3f;console[_0x3b8825(0xad)](chalk[_0x3b8825(0xb4)](_0x3b8825(0xbe)+_0x2c2e8d[_0x3b8825(0xb0)])),process[_0x3b8825(0xbd)](0x0);});};module['exports']=_0x13f82a=>{const _0xbe016a=a4_0x15fd1a,_0x3927d4=path[_0xbe016a(0xba)](__dirname,_0xbe016a(0xd0));!fs[_0xbe016a(0xc4)](_0x3927d4)&&(console[_0xbe016a(0xad)](chalk[_0xbe016a(0xb4)]('Error:\x20请先登录!')),process[_0xbe016a(0xbd)](0x0));const [_0x3ffac3,_0x79c61d]=fs[_0xbe016a(0xb7)](_0x3927d4)[_0xbe016a(0xef)]()[_0xbe016a(0xb5)]('/');console[_0xbe016a(0xad)](_0xbe016a(0xe6)),axios[_0xbe016a(0xc0)](getApiHost()+_0xbe016a(0xc6),{'username':_0x3ffac3,'password':_0x79c61d})[_0xbe016a(0xeb)](_0x22305d=>{const _0xe94f7=_0xbe016a;if(_0x22305d['data'][_0xe94f7(0xe0)]){console['log'](chalk[_0xe94f7(0xc8)](_0xe94f7(0xb9)));const _0x1fec1f=path[_0xe94f7(0xbf)]('./');console['log'](_0xe94f7(0xec)+_0x1fec1f);fs[_0xe94f7(0xc4)](_0x1fec1f+_0xe94f7(0xd2))?(console[_0xe94f7(0xad)](chalk[_0xe94f7(0xc9)]('Sudo:\x20yarn\x20build:production'),_0x1fec1f),child_process['execSync'](_0xe94f7(0xde),{'cwd':_0x1fec1f})):(console['log'](chalk[_0xe94f7(0xc9)](_0xe94f7(0xcc)),_0x1fec1f),child_process[_0xe94f7(0xcd)](_0xe94f7(0xe1),{'cwd':_0x1fec1f}));const _0x5ef606=_0x1fec1f[_0xe94f7(0xc2)]('/')!==-0x1?'/':'\x5c',_0x5cead4=''+_0x1fec1f+_0x5ef606+_0xe94f7(0xd4),_0x335750=''+_0x1fec1f+_0x5ef606+'dist'+_0x5ef606+_0xe94f7(0xd3),_0x6aa440=''+_0x1fec1f+_0x5ef606+'package.json',_0x40a911=''+_0x1fec1f+_0x5ef606+_0xe94f7(0xb8),_0x5982ad=JSON[_0xe94f7(0xd1)](fs[_0xe94f7(0xb7)](path['join'](__dirname,_0xe94f7(0xb6)))[_0xe94f7(0xef)]()),{version:_0x165ea4}=_0x5982ad,_0x4f544d={'username':_0x3ffac3,'cmd_version':_0x165ea4,'hostname':os['hostname'](),'platform':os[_0xe94f7(0xac)]()};if(fs['existsSync'](_0x6aa440)){if(fs['existsSync'](_0x335750)){_0x4f544d['package_version']=_0x13f82a?_0x13f82a:0x0,_0x4f544d[_0xe94f7(0xd8)]=fs['readFileSync'](_0x335750)[_0xe94f7(0xef)](),_0x4f544d[_0xe94f7(0xbb)]={};const _0x5ac1d6=fs['readFileSync'](_0x335750)[_0xe94f7(0xef)](),_0x558b10=_0x5ac1d6[_0xe94f7(0xc1)](/(window\[).+?(\.componentKey|.+]={)/img);if(_0x558b10&&_0x558b10[_0xe94f7(0xae)]){const _0x404bd2=_0x5ac1d6['match'](/componentKey.+([{,]info:\s{0,}{)/img);if(_0x404bd2&&_0x404bd2[_0xe94f7(0xae)]){let _0x349412='{';const _0x5876b6=_0x5ac1d6[_0xe94f7(0xb5)](_0x404bd2[0x0])[0x1];for(let _0xf0a887=0x0;_0xf0a887<_0x5876b6['length'];_0xf0a887++){_0x349412+=_0x5876b6[_0xf0a887];if(_0x5876b6[_0xf0a887]==='}')try{const _0x4faebd=new Function('return\x20'+_0x349412)();_0x4f544d[_0xe94f7(0xbb)]={..._0x4faebd,'defaultSetting':{}};}catch(_0x1a7886){}}}else console[_0xe94f7(0xad)](chalk[_0xe94f7(0xb4)](_0xe94f7(0xe9))),process[_0xe94f7(0xbd)](0x0);const _0x2d713f=_0x5ac1d6[_0xe94f7(0xc1)](/componentKey.+([{,]settings:\s{0,}{)/img);if(_0x2d713f&&_0x2d713f[_0xe94f7(0xae)]){let _0x40060f='{';const _0xc72a10=_0x5ac1d6['split'](_0x2d713f[0x0])[0x1];for(let _0x21ca12=0x0;_0x21ca12<_0xc72a10[_0xe94f7(0xae)];_0x21ca12++){_0x40060f+=_0xc72a10[_0x21ca12];if(_0xc72a10[_0x21ca12]==='}')try{_0x4f544d['component_config_content'][_0xe94f7(0xc3)]=new Function(_0xe94f7(0xb1)+_0x40060f)();}catch(_0x4e1871){}}_0x4f544d[_0xe94f7(0xbb)]=JSON[_0xe94f7(0xce)](_0x4f544d[_0xe94f7(0xbb)]);}else console['log'](chalk[_0xe94f7(0xb4)]('Error:\x20暴露的配置信息中缺少“settings”!')),process[_0xe94f7(0xbd)](0x0);}else console['log'](chalk[_0xe94f7(0xb4)](_0xe94f7(0xb2))),process[_0xe94f7(0xbd)](0x0);fs[_0xe94f7(0xc4)](_0x5cead4)?_0x4f544d['readme_content']=fs[_0xe94f7(0xb7)](_0x5cead4)[_0xe94f7(0xef)]():(console[_0xe94f7(0xad)](chalk[_0xe94f7(0xb4)](_0xe94f7(0xea))),process[_0xe94f7(0xbd)](0x0));if(!fs[_0xe94f7(0xc4)](_0x40a911))console[_0xe94f7(0xad)](_0xe94f7(0xdb)),process[_0xe94f7(0xbd)](0x0);else{const _0x22c0f8=fs['readFileSync'](_0x40a911);_0x4f544d[_0xe94f7(0xca)]=Buffer[_0xe94f7(0xcf)](_0x22c0f8)[_0xe94f7(0xef)](_0xe94f7(0xd7));}_0x5982ad[_0xe94f7(0xe2)]==='no'?submitFun(null,_0x4f544d):io[_0xe94f7(0xda)](_0xe94f7(0xdd),function(_0x4a8925){submitFun(_0x4a8925,_0x4f544d);});}else console[_0xe94f7(0xad)](chalk[_0xe94f7(0xb4)](_0xe94f7(0xc7))),process[_0xe94f7(0xbd)](0x0);}else console[_0xe94f7(0xad)](chalk[_0xe94f7(0xb4)]('Error:\x20组件发布失败!根目录缺少‘package.json’文件!')),process[_0xe94f7(0xbd)](0x0);}else console[_0xe94f7(0xad)](chalk['red'](_0xe94f7(0xe7))),process['exit'](0x0);})[_0xbe016a(0xf0)](_0x506900=>{const _0x1ddd80=_0xbe016a;console['log'](chalk[_0x1ddd80(0xb4)](_0x1ddd80(0xee)),_0x506900[_0x1ddd80(0xb0)]),process[_0x1ddd80(0xbd)](0x0);});};
|
package/src/push.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
const
|
1
|
+
const a5_0x8e9873=a5_0x5d28;(function(_0x314b56,_0x59385b){const _0x1f2407=a5_0x5d28,_0x2aa508=_0x314b56();while(!![]){try{const _0x10646e=parseInt(_0x1f2407(0x131))/0x1+-parseInt(_0x1f2407(0x16a))/0x2+-parseInt(_0x1f2407(0x166))/0x3+parseInt(_0x1f2407(0x123))/0x4+-parseInt(_0x1f2407(0x122))/0x5*(parseInt(_0x1f2407(0x172))/0x6)+parseInt(_0x1f2407(0x14c))/0x7*(parseInt(_0x1f2407(0x168))/0x8)+-parseInt(_0x1f2407(0x144))/0x9*(parseInt(_0x1f2407(0x12a))/0xa);if(_0x10646e===_0x59385b)break;else _0x2aa508['push'](_0x2aa508['shift']());}catch(_0x159d32){_0x2aa508['push'](_0x2aa508['shift']());}}}(a5_0x4647,0x4fe94));function a5_0x5d28(_0x18cbb0,_0x3a1e51){const _0x4647a6=a5_0x4647();return a5_0x5d28=function(_0x5d2810,_0x4d3e57){_0x5d2810=_0x5d2810-0x11c;let _0x49d9b7=_0x4647a6[_0x5d2810];return _0x49d9b7;},a5_0x5d28(_0x18cbb0,_0x3a1e51);}const fs=require('fs'),os=require('os'),path=require(a5_0x8e9873(0x138)),child_process=require(a5_0x8e9873(0x120)),chalk=require(a5_0x8e9873(0x14f)),{CopyFolder,DeleteDirAllFile}=require(a5_0x8e9873(0x13e)),{GIT_TEMP_JAVA,getApiHost}=require(a5_0x8e9873(0x156)),axios=require('axios');function deleteFolderRecursive(_0x51d688){const _0x39610c=a5_0x8e9873;fs[_0x39610c(0x162)](_0x51d688)&&(fs['readdirSync'](_0x51d688)[_0x39610c(0x125)](_0x1524b8=>{const _0x3199ed=_0x39610c,_0x29d640=path[_0x3199ed(0x150)](_0x51d688,_0x1524b8);fs[_0x3199ed(0x16f)](_0x29d640)[_0x3199ed(0x11d)]()?deleteFolderRecursive(_0x29d640):fs[_0x3199ed(0x153)](_0x29d640);}),fs[_0x39610c(0x134)](_0x51d688));}module[a5_0x8e9873(0x141)]=arguments=>{const _0x57aa5d=a5_0x8e9873,_0x13d7fc=path['join'](__dirname,_0x57aa5d(0x14e));!fs[_0x57aa5d(0x162)](_0x13d7fc)&&(console['log'](chalk['red'](_0x57aa5d(0x143))),process['exit'](0x0));const _0x1b76a5=arguments[0x1],_0x236d56=arguments[0x2]||_0x57aa5d(0x147),_0x41de4c=arguments[0x3]?arguments[0x3][_0x57aa5d(0x12f)]('-'):[],_0x97c7fa=path[_0x57aa5d(0x15d)]('./'),_0x4bdb04=_0x97c7fa+_0x57aa5d(0x14a),_0x186576=_0x97c7fa+_0x57aa5d(0x145),_0x34b58b=os[_0x57aa5d(0x161)](),[_0x59adff,_0x59698f]=fs[_0x57aa5d(0x148)](_0x13d7fc)['toString']()[_0x57aa5d(0x12f)]('/');console['log'](_0x57aa5d(0x16c)),axios[_0x57aa5d(0x15a)](getApiHost()+_0x57aa5d(0x137),{'username':_0x59adff,'password':_0x59698f})[_0x57aa5d(0x13a)](_0x5c90dc=>{const _0x4c00b3=_0x57aa5d;if(_0x5c90dc['data'][_0x4c00b3(0x160)]){console[_0x4c00b3(0x146)](chalk[_0x4c00b3(0x140)](_0x4c00b3(0x13c)));if(!fs[_0x4c00b3(0x162)](_0x4bdb04))console[_0x4c00b3(0x146)](chalk[_0x4c00b3(0x16e)]('Error:\x20当前应用中不存在“jjb.config.json”文件!')),process[_0x4c00b3(0x164)](0x0);else{const _0x5db16c=require(_0x4bdb04);!_0x5db16c[_0x4c00b3(0x11f)]&&(console['log'](chalk[_0x4c00b3(0x16e)](_0x4c00b3(0x124))),process[_0x4c00b3(0x164)](0x0));!_0x5db16c[_0x4c00b3(0x151)]&&(console[_0x4c00b3(0x146)](chalk['red'](_0x4c00b3(0x132))),process[_0x4c00b3(0x164)](0x0));const _0x15521d=_0x34b58b+'/'+GIT_TEMP_JAVA;fs[_0x4c00b3(0x162)](_0x15521d)&&deleteFolderRecursive(_0x15521d);fs[_0x4c00b3(0x129)](_0x15521d);const _0x16e71b=_0x15521d+'/'+_0x5db16c[_0x4c00b3(0x151)];fs[_0x4c00b3(0x162)](_0x16e71b)?_0x41de4c[_0x4c00b3(0x152)](_0x4c00b3(0x15f))?DeleteDirAllFile(_0x16e71b,()=>{const _0x33f302=_0x4c00b3;console['log'](chalk['blue']('Sudo:\x20git\x20clone\x20'+_0x5db16c['javaGit']),_0x15521d),child_process[_0x33f302(0x165)](_0x33f302(0x127)+_0x5db16c['javaGit'],{'cwd':_0x15521d});}):(console[_0x4c00b3(0x146)](chalk[_0x4c00b3(0x14d)](_0x4c00b3(0x163)+_0x5db16c[_0x4c00b3(0x11f)]),_0x15521d),child_process[_0x4c00b3(0x165)]('git\x20clone\x20'+_0x5db16c[_0x4c00b3(0x11f)],{'cwd':_0x15521d})):(console['log'](chalk['blue'](_0x4c00b3(0x163)+_0x5db16c[_0x4c00b3(0x11f)]),_0x15521d),child_process[_0x4c00b3(0x165)](_0x4c00b3(0x127)+_0x5db16c[_0x4c00b3(0x11f)],{'cwd':_0x15521d})),_0xa5cf34(_0x15521d,_0x5db16c);}}else console[_0x4c00b3(0x146)](chalk[_0x4c00b3(0x16e)](_0x4c00b3(0x130))),process['exit'](0x0);})['catch'](_0x4546ee=>{const _0x2899c4=_0x57aa5d;console[_0x2899c4(0x146)](chalk[_0x2899c4(0x16e)](_0x2899c4(0x142)),_0x4546ee[_0x2899c4(0x11c)]),process[_0x2899c4(0x164)](0x0);});arguments[_0x57aa5d(0x15c)]<0x2&&(console[_0x57aa5d(0x146)](chalk[_0x57aa5d(0x16e)](_0x57aa5d(0x121))),process[_0x57aa5d(0x164)](0x0));function _0xa5cf34(_0x3ab61d,_0x28d82f){const _0x57e180=_0x57aa5d,_0x25b3a0=_0x28d82f[_0x57e180(0x12b)][_0x1b76a5],_0x41e87a=_0x3ab61d+'/'+_0x28d82f[_0x57e180(0x151)];!_0x25b3a0[_0x57e180(0x13b)]&&console[_0x57e180(0x146)](chalk[_0x57e180(0x12c)](_0x57e180(0x133)+_0x1b76a5+_0x57e180(0x158)));console[_0x57e180(0x146)](chalk['blue'](_0x57e180(0x167)),_0x41e87a),child_process[_0x57e180(0x165)]('git\x20pull',{'cwd':_0x41e87a});!fs['existsSync'](_0x97c7fa+'/node_modules')&&(console['log'](chalk[_0x57e180(0x12c)]('Warning:\x20当前应用未安装依赖!即将执行依赖安装命令,请稍等!')),console[_0x57e180(0x146)](chalk[_0x57e180(0x14d)](_0x57e180(0x139)),_0x97c7fa),child_process[_0x57e180(0x165)](_0x57e180(0x126),{'cwd':_0x97c7fa}),console[_0x57e180(0x146)](chalk[_0x57e180(0x140)](_0x57e180(0x171))));console[_0x57e180(0x146)](_0x57e180(0x154)+_0x1b76a5+_0x57e180(0x16b)),console[_0x57e180(0x146)](chalk['blue'](_0x57e180(0x169)+_0x1b76a5),_0x97c7fa),child_process[_0x57e180(0x165)](_0x57e180(0x15b)+_0x1b76a5,{'cwd':_0x97c7fa,'maxBuffer':0x3b9aca00}),console[_0x57e180(0x146)](chalk[_0x57e180(0x140)]('Log:\x20应用打包完成!'));if(fs[_0x57e180(0x162)](_0x186576)){const _0x54de6c=_0x28d82f['appIdentifier'],_0x3fa51c=fs[_0x57e180(0x148)](_0x186576+'/index.html');_0x41de4c['includes'](_0x57e180(0x135))?fs[_0x57e180(0x11e)](_0x186576+_0x57e180(0x155),_0x3fa51c,_0x57e180(0x13f)):fs[_0x57e180(0x11e)](_0x186576+'/'+_0x54de6c+_0x57e180(0x136),_0x3fa51c,_0x57e180(0x13f));const _0x16f633=_0x41e87a+_0x57e180(0x16d);!fs[_0x57e180(0x162)](_0x16f633)&&fs[_0x57e180(0x129)](_0x16f633);const _0x12ad3f=_0x25b3a0[_0x57e180(0x13b)]?_0x25b3a0['javaGitBranch']:_0x57e180(0x128);console[_0x57e180(0x146)](chalk[_0x57e180(0x14d)](_0x57e180(0x170)+_0x12ad3f),_0x41e87a),child_process[_0x57e180(0x165)]('git\x20checkout\x20'+_0x12ad3f,{'cwd':_0x41e87a});const _0x5441b2=_0x16f633+'/'+_0x28d82f[_0x57e180(0x159)];DeleteDirAllFile(_0x5441b2,()=>{const _0x53556e=_0x57e180;fs[_0x53556e(0x129)](_0x5441b2),fs['writeFileSync'](_0x5441b2+_0x53556e(0x136),_0x3fa51c,'utf-8'),CopyFolder(_0x186576+'\x5c'+_0x28d82f[_0x53556e(0x159)],_0x5441b2,()=>{setTimeout(()=>{const _0x403d32=a5_0x5d28;console['log'](chalk[_0x403d32(0x14d)]('Sudo:\x20git\x20pull'),_0x41e87a),child_process[_0x403d32(0x165)](_0x403d32(0x13d),{'cwd':_0x41e87a}),console['log'](chalk[_0x403d32(0x14d)]('Sudo:\x20git\x20add\x20.'),_0x41e87a),child_process[_0x403d32(0x165)](_0x403d32(0x12d),{'cwd':_0x41e87a});try{console['log'](chalk['blue'](_0x403d32(0x157)+_0x236d56+_0x403d32(0x12e)),_0x41e87a),child_process[_0x403d32(0x165)](_0x403d32(0x149)+_0x236d56+_0x403d32(0x12e),{'cwd':_0x41e87a});}catch(_0x2d3914){console[_0x403d32(0x146)](chalk[_0x403d32(0x16e)]('Error:\x20'+_0x2d3914[_0x403d32(0x11c)]));}console[_0x403d32(0x146)](chalk[_0x403d32(0x14d)](_0x403d32(0x15e)),_0x41e87a),child_process[_0x403d32(0x165)]('git\x20push',{'cwd':_0x41e87a});},0x3e8);});});}else console[_0x57e180(0x146)](chalk['red'](_0x57e180(0x14b))),process[_0x57e180(0x164)](0x0);}};function a5_0x4647(){const _0xac6b79=['36GHncGh','\x5cdist','log','\x22no\x20message\x22','readFileSync','git\x20commit\x20-m\x20','\x5cjjb.config.js','Error:\x20未知错误,未找到“dist”目录!','178339kxJgaE','blue','../.auth','chalk','join','javaGitName','includes','unlinkSync','Log:\x20即将进行应用打包\x20[Env#','/index.html','./config','Sudo:\x20git\x20commit\x20-m\x20',']\x20未配置“javaGitBranch”,将使用默认分支“master”!','appIdentifier','post','yarn\x20build:','length','resolve','Sudo:\x20git\x20push','force','status','tmpdir','existsSync','Sudo:\x20git\x20clone\x20','exit','execSync','666471YgZYGS','Sudo:\x20git\x20pull','40SNNUVq','Sudo:\x20yarn\x20build:','105698wFCTZS',']\x20请稍等!','Auth:\x20正在获取授权!','/start/src/main/resources/templates','red','lstatSync','Sudo:\x20git\x20checkout\x20','Log:\x20应用依赖安装完成!','570TQUAEK','message','isDirectory','writeFileSync','javaGit','child_process','Error:\x20命令参数传递错误!','170hGqvid','1710300sEGhkG','Error:\x20“jjb.config.json”中缺少“javaGit”字段!','forEach','yarn','git\x20clone\x20','master','mkdirSync','1078090uRsnmT','environment','yellow','git\x20add\x20.','\x20--no-verify','split','Error:\x20授权失败!','481828MlBlfa','Error:\x20“jjb.config.json”中缺少“javaGitName”字段!','Warning:\x20当前打包\x20[Env#','rmdirSync','index','.html','/api/auth','path','Sudo:\x20yarn','then','javaGitBranch','Auth:\x20授权成功!','git\x20pull','./tools','utf-8','green','exports','Error:\x20授权失败,未知错误!','Error:\x20请先登录!'];a5_0x4647=function(){return _0xac6b79;};return a5_0x4647();}
|
package/src/rm-rf.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
const
|
1
|
+
const a6_0x3f118c=a6_0x5d0b;(function(_0x39c53c,_0x10fae5){const _0x5530d4=a6_0x5d0b,_0x7d841f=_0x39c53c();while(!![]){try{const _0x432e31=-parseInt(_0x5530d4(0x132))/0x1*(-parseInt(_0x5530d4(0x136))/0x2)+-parseInt(_0x5530d4(0x12a))/0x3*(-parseInt(_0x5530d4(0x127))/0x4)+parseInt(_0x5530d4(0x12d))/0x5*(parseInt(_0x5530d4(0x138))/0x6)+parseInt(_0x5530d4(0x126))/0x7+-parseInt(_0x5530d4(0x129))/0x8+parseInt(_0x5530d4(0x137))/0x9*(-parseInt(_0x5530d4(0x134))/0xa)+-parseInt(_0x5530d4(0x13c))/0xb;if(_0x432e31===_0x10fae5)break;else _0x7d841f['push'](_0x7d841f['shift']());}catch(_0x4590ac){_0x7d841f['push'](_0x7d841f['shift']());}}}(a6_0x84b1,0xc6b2f));const fs=require('fs'),path=require(a6_0x3f118c(0x141)),readline=require(a6_0x3f118c(0x13f)),io=readline['createInterface']({'input':process['stdin'],'output':process['stdout']});module[a6_0x3f118c(0x131)]=function(){const _0x44b33d=a6_0x3f118c,_0x1d1d73=path[_0x44b33d(0x12b)]('./');io['question'](_0x44b33d(0x13a),function(_0x714a3b){const _0x5188f6=_0x44b33d;if(_0x714a3b[_0x5188f6(0x13d)]()==='y')console[_0x5188f6(0x12f)](_0x5188f6(0x142)),setTimeout(()=>{setTimeout(()=>{const _0x24d2fe=a6_0x5d0b;console[_0x24d2fe(0x139)](),exec(_0x1d1d73),setTimeout(()=>{const _0x5d6e8f=_0x24d2fe;console[_0x5d6e8f(0x12f)](_0x5d6e8f(0x143)),console[_0x5d6e8f(0x139)](),process[_0x5d6e8f(0x12e)](0x0);},0x1f4);},0x1f4);},0x1f4);else _0x714a3b[_0x5188f6(0x13d)]()==='n'?(console[_0x5188f6(0x12f)](_0x5188f6(0x135)),process[_0x5188f6(0x12e)](0x0)):(console[_0x5188f6(0x12f)](_0x5188f6(0x13e)),process[_0x5188f6(0x12e)](0x0));});};function a6_0x84b1(){const _0x3f78f2=['resolve','statSync','5fiozwh','exit','log','unlinkSync','exports','212936WjsADR','existsSync','20tUlxDj','取消删除。','2WvyFgG','3032982pzJqEO','37590txfqhe','clear','是否确认删除?删除后不可恢复![y/n]:','isDirectory','494483kzyuup','trim','无效操作。','readline','删除异常:','path','正在计算项目数,请稍等...','删除完成。','9912875kVEjOL','4arlqBo','rmdirSync','8672288vsqPKy','2944590OKtwHG'];a6_0x84b1=function(){return _0x3f78f2;};return a6_0x84b1();}function a6_0x5d0b(_0x573413,_0x43522c){const _0x84b1b6=a6_0x84b1();return a6_0x5d0b=function(_0x5d0b02,_0xdc50f){_0x5d0b02=_0x5d0b02-0x126;let _0x94bad9=_0x84b1b6[_0x5d0b02];return _0x94bad9;},a6_0x5d0b(_0x573413,_0x43522c);}function exec(_0xe2ec73){const _0x19414e=a6_0x3f118c;if(fs[_0x19414e(0x133)](_0xe2ec73)){const _0x39c64e=fs['readdirSync'](_0xe2ec73);for(let _0x4e1fba=0x0;_0x4e1fba<_0x39c64e['length'];_0x4e1fba++){const _0x50c0b7=_0x39c64e[_0x4e1fba],_0x2a8fec=_0xe2ec73+'/'+_0x50c0b7;try{fs[_0x19414e(0x12c)](_0x2a8fec)[_0x19414e(0x13b)]()?(exec(_0x2a8fec),fs[_0x19414e(0x128)](_0x2a8fec,{'recursive':!![]}),console['log']('删除文件夹:'+_0x2a8fec)):(fs[_0x19414e(0x130)](_0x2a8fec),console[_0x19414e(0x12f)]('删除文件:'+_0x2a8fec));}catch(_0x48d6d0){console['log'](_0x19414e(0x140)+_0x2a8fec);}}}}
|
package/src/tools.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
const a5_0x249f14=a5_0x4868;function a5_0x4868(_0x3e75f4,_0x29acbb){const _0x49a62c=a5_0x49a6();return a5_0x4868=function(_0x486855,_0xf3dd8f){_0x486855=_0x486855-0xb6;let _0x4e959e=_0x49a62c[_0x486855];return _0x4e959e;},a5_0x4868(_0x3e75f4,_0x29acbb);}(function(_0x181151,_0xa6f4f1){const _0x4a4ea8=a5_0x4868,_0x52fa83=_0x181151();while(!![]){try{const _0x1a732d=parseInt(_0x4a4ea8(0xc0))/0x1+parseInt(_0x4a4ea8(0xc1))/0x2*(parseInt(_0x4a4ea8(0xe9))/0x3)+parseInt(_0x4a4ea8(0xca))/0x4+-parseInt(_0x4a4ea8(0x100))/0x5*(parseInt(_0x4a4ea8(0xf3))/0x6)+parseInt(_0x4a4ea8(0xd6))/0x7+-parseInt(_0x4a4ea8(0xf0))/0x8+-parseInt(_0x4a4ea8(0xfd))/0x9*(parseInt(_0x4a4ea8(0xce))/0xa);if(_0x1a732d===_0xa6f4f1)break;else _0x52fa83['push'](_0x52fa83['shift']());}catch(_0x58ee5d){_0x52fa83['push'](_0x52fa83['shift']());}}}(a5_0x49a6,0xad520));const fs=require('fs'),os=require('os'),path=require(a5_0x249f14(0xbd)),{GIT_HOST,GIT_TEMP_DIR,CLOUD_PROJECT}=require(a5_0x249f14(0xf7));function a5_0x49a6(){const _0x524b95=['DeleteDirAllFile','jjb-common','688719KaWwBy','toString','stringify','read\x20error','exit','CreatePaths','readdirSync','1410352hbgAKo','join','createReadStream','186hNBwgG','\x5cpackage.json','unlinkSync','【Error】:[jjb.config.json.installResources]类型是一个Array<string>。','./config','length','f_update_project_package_json','【Error】:[jjb.config.json]文件配置无效,需要installResources属性。','push','jjb-dva-runtime','4905mNLHzc','existsSync','name','111835chkJoF','micro-spa','f_scan_jjb_config_json_rules','projectType','DeepScanner','f_file_copy','installTarget','replace','f_create_package_json','string','mkdir','\x5cjjb.config.json','CopyFile','path','writeFileSync','isDirectory','609197PgXchG','2TqKIJj','pipe','.zip','jjb-common-decorator','close','/repository/archive.zip?private_token=','src','【Error】:[jjb.config.json.installResources]无资源。','tmpdir','4886724chLlek','CopyFolder','_zip','mkdirSync','20380RGtoIL','spa','【Error】:[jjb.config.json]文件配置无效,需要projectType属性。','map','readFileSync','&ref=master','forEach','createWriteStream','4408950MdVibV','{\x22name\x22:\x22','rmdirSync','statSync','【Error】:[jjb.config.json.projectType]类型是一个string。','f_pull_git_repository','uniapp','filter','parse','\x22,\x22main\x22:\x20\x22index.js\x22}','【Error】:[jjb.config.json]文件解析失败,请确认是否配置正确。','log','includes','jjb-common-lib','f_resolve_install_resources','/api/v4/projects/','vue-unisass-component'];a5_0x49a6=function(){return _0x524b95;};return a5_0x49a6();}exports['f_rm_rf']=function(_0x569d84){const _0x16364e=a5_0x249f14;if(fs['existsSync'](_0x569d84)){const _0x491f14=fs['readdirSync'](_0x569d84);for(let _0x4584c7=0x0;_0x4584c7<_0x491f14[_0x16364e(0xf8)];_0x4584c7++){const _0x59ae24=_0x491f14[_0x4584c7],_0x3edc56=_0x569d84+'/'+_0x59ae24;fs[_0x16364e(0xd9)](_0x3edc56)['isDirectory']()?(exports['f_rm_rf'](_0x3edc56),fs['rmdirSync'](_0x3edc56)):fs[_0x16364e(0xf5)](_0x3edc56);}}},exports[a5_0x249f14(0xdb)]=function(_0x4688de=[]){return _0x4688de['map'](_0x5aaf15=>{const _0x1558c6=a5_0x4868,_0x5e77d7=CLOUD_PROJECT[_0x5aaf15[_0x1558c6(0xff)]]||undefined,_0x4bd478=os[_0x1558c6(0xc9)]();return{'path':_0x4bd478+'\x5c'+GIT_TEMP_DIR+'\x5c'+_0x5aaf15[_0x1558c6(0xff)]+_0x1558c6(0xc3),'compress':_0x4bd478+'\x5c'+GIT_TEMP_DIR+'\x5c'+_0x5aaf15[_0x1558c6(0xff)]+_0x1558c6(0xcc),'repository':GIT_HOST+_0x1558c6(0xe5)+_0x5e77d7['projectId']+_0x1558c6(0xc6)+_0x5e77d7['token']+_0x1558c6(0xd3)};});},exports['f_scan_jjb_config_json']=function(_0x2e7e38){const _0x437049=a5_0x249f14;return fs[_0x437049(0xfe)](_0x2e7e38+_0x437049(0xbb));},exports[a5_0x249f14(0x102)]=function(_0x1a4ad5){const _0x10b06d=a5_0x249f14;let _0x4ead87={};try{_0x4ead87=JSON['parse'](fs[_0x10b06d(0xd2)](_0x1a4ad5+_0x10b06d(0xbb))[_0x10b06d(0xea)]());}catch(_0x8c934e){console[_0x10b06d(0xe1)](_0x10b06d(0xe0)),process['exit'](0x0);}!(_0x10b06d(0x103)in _0x4ead87)&&(console[_0x10b06d(0xe1)](_0x10b06d(0xd0)),process[_0x10b06d(0xed)](0x0));!('installTarget'in _0x4ead87)&&(console['log']('【Error】:[jjb.config.json]文件配置无效,需要installTarget属性。'),process[_0x10b06d(0xed)](0x0));!('installResources'in _0x4ead87)&&(console[_0x10b06d(0xe1)](_0x10b06d(0xfa)),process[_0x10b06d(0xed)](0x0));typeof _0x4ead87[_0x10b06d(0x103)]!==_0x10b06d(0xb9)&&(console[_0x10b06d(0xe1)](_0x10b06d(0xda)),process[_0x10b06d(0xed)](0x0));!['multi',_0x10b06d(0xcf),_0x10b06d(0xdc),_0x10b06d(0x101)][_0x10b06d(0xe2)](_0x4ead87['projectType'])&&(console[_0x10b06d(0xe1)]('【Error】:[jjb.config.json.projectType]配置无效,有效值<multi\x20|\x20spa\x20|\x20micro-spa\x20|\x20uniapp>。'),process[_0x10b06d(0xed)](0x0));typeof _0x4ead87[_0x10b06d(0xb6)]!==_0x10b06d(0xb9)&&(console['log']('【Error】:[jjb.config.json.installTarget]类型是一个string。'),process['exit'](0x0));!['node_modules',_0x10b06d(0xc7)][_0x10b06d(0xe2)](_0x4ead87[_0x10b06d(0xb6)])&&(console[_0x10b06d(0xe1)]('【Error】:[jjb.config.json.node_modules]配置无效,有效值<node_modules\x20|\x20src>。'),process[_0x10b06d(0xed)](0x0));!Array['isArray'](_0x4ead87['installResources'])&&(console[_0x10b06d(0xe1)](_0x10b06d(0xf6)),process['exit'](0x0));_0x4ead87['installResources'][_0x10b06d(0xf8)]===0x0&&(console[_0x10b06d(0xe1)](_0x10b06d(0xc8)),process['exit'](0x0));const _0x336cbe=exports[_0x10b06d(0xe4)](_0x4ead87['installResources']);return _0x336cbe[_0x10b06d(0xd1)](_0x6c26bf=>_0x6c26bf[_0x10b06d(0xff)])[_0x10b06d(0xdd)](_0x549038=>![_0x10b06d(0xe8),_0x10b06d(0xfc),_0x10b06d(0xe3),_0x10b06d(0xc4),'react-admin-component',_0x10b06d(0xe6)][_0x10b06d(0xe2)](_0x549038))[_0x10b06d(0xf8)]!==0x0&&(console[_0x10b06d(0xe1)]('【Error】:[jjb.config.json.installResources]配置无效,有效值<common\x20|\x20react-admin-component\x20|\x20vue-unisass-component\x20|\x20jjb-common-decorator\x20|\x20jjb-dva-runtime\x20|\x20jjb-common-lib>。'),process[_0x10b06d(0xed)](0x0)),_0x4ead87['installResources']=_0x336cbe,_0x4ead87;},exports[a5_0x249f14(0xb8)]=function(_0x4fd9e8,_0x4fadcb,_0x2a02eb){const _0x1fdd5a=a5_0x249f14;fs[_0x1fdd5a(0xbe)](_0x4fd9e8+_0x1fdd5a(0xf4),_0x1fdd5a(0xd7)+_0x4fadcb+'\x22,\x22version\x22:\x22'+_0x2a02eb+_0x1fdd5a(0xdf));},exports['f_resolve_install_resources']=function(_0x502824=[]){const _0x149043=[];return Array['isArray'](_0x502824)&&_0x502824['forEach'](_0x31a9d6=>{if(Array['isArray'](_0x31a9d6)){const [_0x3092cf,_0x47d6a8=[]]=_0x31a9d6;_0x149043['push']({'name':_0x3092cf,'importList':_0x47d6a8});}else _0x149043['push']({'name':_0x31a9d6,'importList':[]});}),_0x149043;},exports[a5_0x249f14(0xf9)]=function(_0x239823,_0x3042de,_0x38fc8d){const _0x3353b2=a5_0x249f14,_0x26705a=JSON[_0x3353b2(0xde)](fs['readFileSync'](_0x239823)[_0x3353b2(0xea)]());_0x26705a['dependencies'][_0x3042de]=_0x38fc8d,fs[_0x3353b2(0xbe)](_0x239823,JSON[_0x3353b2(0xeb)](_0x26705a,null,0x2));},exports['f_file_copy']=function(_0x327e26,_0xcca48a){fs['readdirSync'](_0x327e26)['forEach'](_0x41021c=>{const _0x5720cc=a5_0x4868,_0x28ea6e=_0x327e26+'\x5c'+_0x41021c,_0x480731=_0xcca48a+'\x5c'+_0x41021c;fs[_0x5720cc(0xd9)](_0x28ea6e)['isDirectory']()?(fs[_0x5720cc(0xcd)](_0x480731),exports[_0x5720cc(0x105)](_0x28ea6e,_0x480731)):fs[_0x5720cc(0xbe)](_0x480731,fs[_0x5720cc(0xd2)](_0x28ea6e)[_0x5720cc(0xea)]());});},exports['f_content_replace']=function(_0x31c436=[],_0x3f5a84){_0x31c436['forEach'](_0x504791=>{const _0x197a26=a5_0x4868,_0x58bc5f=_0x3f5a84+_0x504791[_0x197a26(0xbd)];if(fs['existsSync'](_0x58bc5f)){let _0xd197f5=fs['readFileSync'](_0x58bc5f)['toString']();_0x504791['replace'][_0x197a26(0xd4)](_0x5e72f2=>{const _0x2193ac=_0x197a26;_0xd197f5=_0xd197f5[_0x2193ac(0xb7)](_0x5e72f2[0x0],_0x5e72f2[0x1]);}),fs['writeFileSync'](_0x58bc5f,_0xd197f5);}});},exports[a5_0x249f14(0xe7)]=(_0x158d00,_0x9a9485)=>{const _0x259879=a5_0x249f14;let _0x28a71e=[];const _0x850fb9=this;fs[_0x259879(0xfe)](_0x158d00)?(_0x28a71e=fs['readdirSync'](_0x158d00),_0x28a71e['forEach'](function(_0x44af70,_0x31e782){const _0x33d79f=_0x259879;let _0x1e2f94=_0x158d00+'/'+_0x44af70;fs['statSync'](_0x1e2f94)[_0x33d79f(0xbf)]()?_0x850fb9['DeleteDirAllFile'](_0x1e2f94):fs['unlinkSync'](_0x1e2f94);}),fs[_0x259879(0xd8)](_0x158d00),_0x9a9485&&_0x9a9485()):_0x9a9485&&_0x9a9485();},exports['CopyFolder']=(_0x4a5bbb,_0x502d34,_0x21b91d)=>{const _0x463b87=this;fs['readdir'](_0x4a5bbb,function(_0x33c1cd,_0x2a6de7){let _0x581b52=0x0;const _0x44c99e=function(){const _0x42f981=a5_0x4868;++_0x581b52===_0x2a6de7[_0x42f981(0xf8)]&&_0x21b91d&&_0x21b91d();};if(_0x33c1cd){_0x44c99e();return;}_0x2a6de7['forEach'](function(_0x3c8b53){const _0xb669f7=a5_0x4868,_0x2565cd=path[_0xb669f7(0xf1)](_0x4a5bbb,_0x3c8b53),_0x5609f9=path[_0xb669f7(0xf1)](_0x502d34,_0x3c8b53);fs['stat'](_0x2565cd,function(_0x247399,_0x3e38c4){const _0x5be313=_0xb669f7;_0x3e38c4[_0x5be313(0xbf)]()?fs[_0x5be313(0xba)](_0x5609f9,function(_0x5b9d05){const _0x3f6a87=_0x5be313;if(_0x5b9d05){console['log'](_0x5b9d05);return;}_0x463b87[_0x3f6a87(0xcb)](_0x2565cd,_0x5609f9,_0x44c99e);}):_0x463b87[_0x5be313(0xbc)](_0x2565cd,_0x5609f9,_0x44c99e);});}),_0x2a6de7['length']===0x0&&_0x21b91d&&_0x21b91d();});},exports[a5_0x249f14(0xbc)]=(_0x43b6e3,_0x2dedb1,_0x2ca771)=>{const _0x1a9fef=a5_0x249f14,_0x190cdb=fs[_0x1a9fef(0xf2)](_0x43b6e3);_0x190cdb['on']('error',function(_0x3d393d){const _0x2c1c7c=_0x1a9fef;_0x3d393d&&console['log'](_0x2c1c7c(0xec),_0x43b6e3),_0x2ca771&&_0x2ca771(_0x3d393d);});const _0x431c05=fs[_0x1a9fef(0xd5)](_0x2dedb1);_0x431c05['on']('error',function(_0x17b27e){const _0xa861d2=_0x1a9fef;_0x17b27e&&console[_0xa861d2(0xe1)]('write\x20error',_0x2dedb1),_0x2ca771&&_0x2ca771(_0x17b27e);}),_0x431c05['on'](_0x1a9fef(0xc5),function(_0xd6641){_0x2ca771&&_0x2ca771(_0xd6641);}),_0x190cdb[_0x1a9fef(0xc2)](_0x431c05);},exports[a5_0x249f14(0x104)]=(_0x107061,_0x2c13fe)=>{const _0x264a83=a5_0x249f14,_0x21b43d=this,_0x1d33ae=fs[_0x264a83(0xef)](_0x107061);_0x1d33ae[_0x264a83(0xd4)](_0x295527=>{const _0x43c067=_0x264a83,_0x281152=_0x107061+'/'+_0x295527,_0x11cf22=fs[_0x43c067(0xd9)](_0x281152);_0x11cf22[_0x43c067(0xbf)]()?_0x21b43d['DeepScanner'](_0x281152,_0x2c13fe):_0x2c13fe['push'](_0x281152);});},exports[a5_0x249f14(0xee)]=(_0x23bc88,_0x5080cf)=>{return new Promise(_0x4c0976=>{const _0x3b6ef9=a5_0x4868,_0x335a49=[];_0x5080cf[_0x3b6ef9(0xd4)]((_0x36d47c,_0x3571c1)=>{const _0x22901e=_0x3b6ef9,_0x215352=_0x23bc88+'/'+_0x335a49['join']('/')+'/'+_0x36d47c;try{const _0x300e26=fs[_0x22901e(0xd9)](_0x215352);_0x300e26[_0x22901e(0xbf)]()?_0x3571c1===_0x5080cf[_0x22901e(0xf8)]-0x1&&_0x4c0976():(fs[_0x22901e(0xcd)](_0x215352),_0x3571c1===_0x5080cf['length']-0x1&&_0x4c0976());}catch(_0x20a312){fs[_0x22901e(0xcd)](_0x215352),_0x3571c1===_0x5080cf[_0x22901e(0xf8)]-0x1&&_0x4c0976();}_0x335a49[_0x22901e(0xfb)](_0x36d47c);});});};
|
1
|
+
const a7_0x1962c5=a7_0x48a5;(function(_0xb2c15e,_0x22eee9){const _0x2c5bcf=a7_0x48a5,_0x3515ab=_0xb2c15e();while(!![]){try{const _0x4d8eda=parseInt(_0x2c5bcf(0x1d7))/0x1*(parseInt(_0x2c5bcf(0x1c9))/0x2)+-parseInt(_0x2c5bcf(0x1fe))/0x3+parseInt(_0x2c5bcf(0x1dc))/0x4+parseInt(_0x2c5bcf(0x1df))/0x5+-parseInt(_0x2c5bcf(0x1f9))/0x6*(parseInt(_0x2c5bcf(0x1da))/0x7)+-parseInt(_0x2c5bcf(0x1d0))/0x8+parseInt(_0x2c5bcf(0x1e4))/0x9;if(_0x4d8eda===_0x22eee9)break;else _0x3515ab['push'](_0x3515ab['shift']());}catch(_0x54de95){_0x3515ab['push'](_0x3515ab['shift']());}}}(a7_0x9f40,0x81541));function a7_0x48a5(_0x45c8c9,_0x3ad0ac){const _0x9f4078=a7_0x9f40();return a7_0x48a5=function(_0x48a5c4,_0x39455e){_0x48a5c4=_0x48a5c4-0x1ac;let _0x1bd3a5=_0x9f4078[_0x48a5c4];return _0x1bd3a5;},a7_0x48a5(_0x45c8c9,_0x3ad0ac);}const fs=require('fs'),os=require('os'),path=require(a7_0x1962c5(0x1be)),{GIT_HOST,GIT_TEMP_DIR,CLOUD_PROJECT}=require(a7_0x1962c5(0x1d8));function a7_0x9f40(){const _0x51cd40=['f_file_copy','DeleteDirAllFile','read\x20error','multi','replace','【Error】:[jjb.config.json.installTarget]类型是一个string。','node_modules','installResources','.zip','【Error】:[jjb.config.json]文件解析失败,请确认是否配置正确。','12hDoasd','writeFileSync','projectId','includes','stringify','809754YKWITn','DeepScanner','f_scan_jjb_config_json_rules','mkdirSync','src','spa','react-admin-component','parse','exit','f_rm_rf','readFileSync','string','f_pull_git_repository','push','error','isDirectory','readdir','f_update_project_package_json','&ref=master','filter','path','write\x20error','length','jjb-common-lib','projectType','forEach','CopyFile','join','createReadStream','log','mkdir','3134Duamlp','map','【Error】:[jjb.config.json]文件配置无效,需要installResources属性。','【Error】:[jjb.config.json.node_modules]配置无效,有效值<node_modules\x20|\x20src>。','CopyFolder','name','stat','6938952tAZrOE','f_scan_jjb_config_json','\x5cjjb.config.json','toString','/repository/archive.zip?private_token=','uniapp','readdirSync','588VOlTKp','./config','token','905674pLxRtd','f_content_replace','1432236sSnRHV','dependencies','【Error】:[jjb.config.json]文件配置无效,需要installTarget属性。','1147940uboSpV','existsSync','createWriteStream','【Error】:[jjb.config.json.projectType]配置无效,有效值<multi\x20|\x20spa\x20|\x20micro-spa\x20|\x20uniapp>。','micro-spa','3750633urGRYI','statSync','f_resolve_install_resources','{\x22name\x22:\x22','_zip','isArray','\x22,\x22version\x22:\x22','unlinkSync','installTarget','rmdirSync','【Error】:[jjb.config.json]文件配置无效,需要projectType属性。'];a7_0x9f40=function(){return _0x51cd40;};return a7_0x9f40();}exports[a7_0x1962c5(0x1b3)]=function(_0x57ab5b){const _0x34e904=a7_0x1962c5;if(fs[_0x34e904(0x1e0)](_0x57ab5b)){const _0x83ace6=fs[_0x34e904(0x1d6)](_0x57ab5b);for(let _0x4f484c=0x0;_0x4f484c<_0x83ace6[_0x34e904(0x1c0)];_0x4f484c++){const _0x2a1835=_0x83ace6[_0x4f484c],_0x56972a=_0x57ab5b+'/'+_0x2a1835;fs[_0x34e904(0x1e5)](_0x56972a)['isDirectory']()?(exports[_0x34e904(0x1b3)](_0x56972a),fs[_0x34e904(0x1ed)](_0x56972a)):fs[_0x34e904(0x1eb)](_0x56972a);}}},exports[a7_0x1962c5(0x1b6)]=function(_0x1379d4=[]){return _0x1379d4['map'](_0x3636cc=>{const _0x147593=a7_0x48a5,_0x179300=CLOUD_PROJECT[_0x3636cc[_0x147593(0x1ce)]]||undefined,_0x3ecadd=os['tmpdir']();return{'path':_0x3ecadd+'\x5c'+GIT_TEMP_DIR+'\x5c'+_0x3636cc['name']+_0x147593(0x1f7),'compress':_0x3ecadd+'\x5c'+GIT_TEMP_DIR+'\x5c'+_0x3636cc[_0x147593(0x1ce)]+_0x147593(0x1e8),'repository':GIT_HOST+'/api/v4/projects/'+_0x179300[_0x147593(0x1fb)]+_0x147593(0x1d4)+_0x179300[_0x147593(0x1d9)]+_0x147593(0x1bc)};});},exports[a7_0x1962c5(0x1d1)]=function(_0x398bd3){const _0x113f48=a7_0x1962c5;return fs[_0x113f48(0x1e0)](_0x398bd3+_0x113f48(0x1d2));},exports[a7_0x1962c5(0x1ac)]=function(_0x3edb37){const _0x208aae=a7_0x1962c5;let _0x34f921={};try{_0x34f921=JSON[_0x208aae(0x1b1)](fs[_0x208aae(0x1b4)](_0x3edb37+_0x208aae(0x1d2))[_0x208aae(0x1d3)]());}catch(_0x2ab83c){console[_0x208aae(0x1c7)](_0x208aae(0x1f8)),process[_0x208aae(0x1b2)](0x0);}!(_0x208aae(0x1c2)in _0x34f921)&&(console[_0x208aae(0x1c7)](_0x208aae(0x1ee)),process[_0x208aae(0x1b2)](0x0));!('installTarget'in _0x34f921)&&(console[_0x208aae(0x1c7)](_0x208aae(0x1de)),process[_0x208aae(0x1b2)](0x0));!(_0x208aae(0x1f6)in _0x34f921)&&(console['log'](_0x208aae(0x1cb)),process[_0x208aae(0x1b2)](0x0));typeof _0x34f921[_0x208aae(0x1c2)]!==_0x208aae(0x1b5)&&(console[_0x208aae(0x1c7)]('【Error】:[jjb.config.json.projectType]类型是一个string。'),process[_0x208aae(0x1b2)](0x0));![_0x208aae(0x1f2),_0x208aae(0x1af),_0x208aae(0x1d5),_0x208aae(0x1e3)][_0x208aae(0x1fc)](_0x34f921[_0x208aae(0x1c2)])&&(console['log'](_0x208aae(0x1e2)),process['exit'](0x0));typeof _0x34f921[_0x208aae(0x1ec)]!==_0x208aae(0x1b5)&&(console[_0x208aae(0x1c7)](_0x208aae(0x1f4)),process[_0x208aae(0x1b2)](0x0));![_0x208aae(0x1f5),_0x208aae(0x1ae)]['includes'](_0x34f921['installTarget'])&&(console[_0x208aae(0x1c7)](_0x208aae(0x1cc)),process[_0x208aae(0x1b2)](0x0));!Array[_0x208aae(0x1e9)](_0x34f921[_0x208aae(0x1f6)])&&(console[_0x208aae(0x1c7)]('【Error】:[jjb.config.json.installResources]类型是一个Array<string>。'),process['exit'](0x0));_0x34f921[_0x208aae(0x1f6)]['length']===0x0&&(console[_0x208aae(0x1c7)]('【Error】:[jjb.config.json.installResources]无资源。'),process[_0x208aae(0x1b2)](0x0));const _0x3ce64e=exports['f_resolve_install_resources'](_0x34f921[_0x208aae(0x1f6)]);return _0x3ce64e[_0x208aae(0x1ca)](_0x2e54cc=>_0x2e54cc['name'])[_0x208aae(0x1bd)](_0x5ae2e5=>!['jjb-common','jjb-dva-runtime',_0x208aae(0x1c1),'jjb-common-decorator',_0x208aae(0x1b0),'vue-unisass-component']['includes'](_0x5ae2e5))['length']!==0x0&&(console['log']('【Error】:[jjb.config.json.installResources]配置无效,有效值<common\x20|\x20react-admin-component\x20|\x20vue-unisass-component\x20|\x20jjb-common-decorator\x20|\x20jjb-dva-runtime\x20|\x20jjb-common-lib>。'),process[_0x208aae(0x1b2)](0x0)),_0x34f921['installResources']=_0x3ce64e,_0x34f921;},exports['f_create_package_json']=function(_0x58313c,_0x3d6ea2,_0xbd6397){const _0x2df57f=a7_0x1962c5;fs[_0x2df57f(0x1fa)](_0x58313c+'\x5cpackage.json',_0x2df57f(0x1e7)+_0x3d6ea2+_0x2df57f(0x1ea)+_0xbd6397+'\x22,\x22main\x22:\x20\x22index.js\x22}');},exports[a7_0x1962c5(0x1e6)]=function(_0x599956=[]){const _0x37a29f=a7_0x1962c5,_0x3b28cc=[];return Array[_0x37a29f(0x1e9)](_0x599956)&&_0x599956[_0x37a29f(0x1c3)](_0x3b2539=>{const _0x24aca1=_0x37a29f;if(Array['isArray'](_0x3b2539)){const [_0x37a10c,_0x533f0b=[]]=_0x3b2539;_0x3b28cc[_0x24aca1(0x1b7)]({'name':_0x37a10c,'importList':_0x533f0b});}else _0x3b28cc['push']({'name':_0x3b2539,'importList':[]});}),_0x3b28cc;},exports[a7_0x1962c5(0x1bb)]=function(_0xa2d526,_0xb0a24a,_0x378577){const _0x24539f=a7_0x1962c5,_0x3aca92=JSON[_0x24539f(0x1b1)](fs[_0x24539f(0x1b4)](_0xa2d526)[_0x24539f(0x1d3)]());_0x3aca92[_0x24539f(0x1dd)][_0xb0a24a]=_0x378577,fs[_0x24539f(0x1fa)](_0xa2d526,JSON[_0x24539f(0x1fd)](_0x3aca92,null,0x2));},exports[a7_0x1962c5(0x1ef)]=function(_0x53879b,_0x2c24a5){const _0x4a107a=a7_0x1962c5;fs[_0x4a107a(0x1d6)](_0x53879b)[_0x4a107a(0x1c3)](_0x55a4be=>{const _0x25f43e=_0x4a107a,_0x11d817=_0x53879b+'\x5c'+_0x55a4be,_0x38744c=_0x2c24a5+'\x5c'+_0x55a4be;fs[_0x25f43e(0x1e5)](_0x11d817)[_0x25f43e(0x1b9)]()?(fs[_0x25f43e(0x1ad)](_0x38744c),exports[_0x25f43e(0x1ef)](_0x11d817,_0x38744c)):fs['writeFileSync'](_0x38744c,fs[_0x25f43e(0x1b4)](_0x11d817)[_0x25f43e(0x1d3)]());});},exports[a7_0x1962c5(0x1db)]=function(_0x1e55db=[],_0x200975){const _0x4b1920=a7_0x1962c5;_0x1e55db[_0x4b1920(0x1c3)](_0x2d79bd=>{const _0x4942fc=_0x4b1920,_0x5a7a50=_0x200975+_0x2d79bd[_0x4942fc(0x1be)];if(fs[_0x4942fc(0x1e0)](_0x5a7a50)){let _0xb26c11=fs['readFileSync'](_0x5a7a50)[_0x4942fc(0x1d3)]();_0x2d79bd[_0x4942fc(0x1f3)][_0x4942fc(0x1c3)](_0x34ffb8=>{_0xb26c11=_0xb26c11['replace'](_0x34ffb8[0x0],_0x34ffb8[0x1]);}),fs[_0x4942fc(0x1fa)](_0x5a7a50,_0xb26c11);}});},exports['DeleteDirAllFile']=(_0x5d4e78,_0x451377)=>{const _0x367364=a7_0x1962c5;let _0x136262=[];const _0x23cd8a=this;fs['existsSync'](_0x5d4e78)?(_0x136262=fs[_0x367364(0x1d6)](_0x5d4e78),_0x136262[_0x367364(0x1c3)](function(_0x3577c6,_0x554dad){const _0x5b77c7=_0x367364;let _0x13c225=_0x5d4e78+'/'+_0x3577c6;fs[_0x5b77c7(0x1e5)](_0x13c225)[_0x5b77c7(0x1b9)]()?_0x23cd8a[_0x5b77c7(0x1f0)](_0x13c225):fs[_0x5b77c7(0x1eb)](_0x13c225);}),fs['rmdirSync'](_0x5d4e78),_0x451377&&_0x451377()):_0x451377&&_0x451377();},exports[a7_0x1962c5(0x1cd)]=(_0x4117ec,_0x156571,_0x5f1e26)=>{const _0x54a098=a7_0x1962c5,_0x463f2e=this;fs[_0x54a098(0x1ba)](_0x4117ec,function(_0x43d074,_0x44e530){const _0x5a1fee=_0x54a098;let _0x3a5fd8=0x0;const _0x1317ff=function(){++_0x3a5fd8===_0x44e530['length']&&_0x5f1e26&&_0x5f1e26();};if(_0x43d074){_0x1317ff();return;}_0x44e530[_0x5a1fee(0x1c3)](function(_0x8f035f){const _0x318d40=_0x5a1fee,_0x194853=path['join'](_0x4117ec,_0x8f035f),_0x4c49c1=path[_0x318d40(0x1c5)](_0x156571,_0x8f035f);fs[_0x318d40(0x1cf)](_0x194853,function(_0x3a7067,_0x14ee7e){const _0x4c708f=_0x318d40;_0x14ee7e[_0x4c708f(0x1b9)]()?fs[_0x4c708f(0x1c8)](_0x4c49c1,function(_0x19dfe2){const _0x312466=_0x4c708f;if(_0x19dfe2){console['log'](_0x19dfe2);return;}_0x463f2e[_0x312466(0x1cd)](_0x194853,_0x4c49c1,_0x1317ff);}):_0x463f2e[_0x4c708f(0x1c4)](_0x194853,_0x4c49c1,_0x1317ff);});}),_0x44e530['length']===0x0&&_0x5f1e26&&_0x5f1e26();});},exports['CopyFile']=(_0x1d6221,_0x4eff10,_0x5644d8)=>{const _0x4453d2=a7_0x1962c5,_0x42bd62=fs[_0x4453d2(0x1c6)](_0x1d6221);_0x42bd62['on'](_0x4453d2(0x1b8),function(_0x26fa4e){const _0x373524=_0x4453d2;_0x26fa4e&&console[_0x373524(0x1c7)](_0x373524(0x1f1),_0x1d6221),_0x5644d8&&_0x5644d8(_0x26fa4e);});const _0x100792=fs[_0x4453d2(0x1e1)](_0x4eff10);_0x100792['on'](_0x4453d2(0x1b8),function(_0x3c91cf){const _0x478aae=_0x4453d2;_0x3c91cf&&console[_0x478aae(0x1c7)](_0x478aae(0x1bf),_0x4eff10),_0x5644d8&&_0x5644d8(_0x3c91cf);}),_0x100792['on']('close',function(_0x231635){_0x5644d8&&_0x5644d8(_0x231635);}),_0x42bd62['pipe'](_0x100792);},exports[a7_0x1962c5(0x1ff)]=(_0x521fc4,_0x251647)=>{const _0x20f24a=a7_0x1962c5,_0x11e03c=this,_0x594980=fs[_0x20f24a(0x1d6)](_0x521fc4);_0x594980[_0x20f24a(0x1c3)](_0xaab80c=>{const _0x40194c=_0x20f24a,_0x2c0208=_0x521fc4+'/'+_0xaab80c,_0x429255=fs[_0x40194c(0x1e5)](_0x2c0208);_0x429255[_0x40194c(0x1b9)]()?_0x11e03c['DeepScanner'](_0x2c0208,_0x251647):_0x251647['push'](_0x2c0208);});},exports['CreatePaths']=(_0x596692,_0x2b8d34)=>{return new Promise(_0x2b030c=>{const _0x1bcc7c=[];_0x2b8d34['forEach']((_0x15e38c,_0x123ce3)=>{const _0x335b59=a7_0x48a5,_0x4cb1f9=_0x596692+'/'+_0x1bcc7c[_0x335b59(0x1c5)]('/')+'/'+_0x15e38c;try{const _0x1ba768=fs[_0x335b59(0x1e5)](_0x4cb1f9);_0x1ba768[_0x335b59(0x1b9)]()?_0x123ce3===_0x2b8d34[_0x335b59(0x1c0)]-0x1&&_0x2b030c():(fs['mkdirSync'](_0x4cb1f9),_0x123ce3===_0x2b8d34['length']-0x1&&_0x2b030c());}catch(_0x28e8f4){fs['mkdirSync'](_0x4cb1f9),_0x123ce3===_0x2b8d34[_0x335b59(0x1c0)]-0x1&&_0x2b030c();}_0x1bcc7c[_0x335b59(0x1b7)](_0x15e38c);});});};
|