jjb-cmd 2.3.0 → 2.3.2

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 CHANGED
@@ -1,10 +1,10 @@
1
1
  #! /usr/bin/env node
2
2
 
3
3
  const commander = require('commander');
4
- const readline = require('readline');
4
+ // const readline = require('readline');
5
5
  const path = require('path');
6
6
  const fs = require('fs');
7
- const child_process = require('child_process');
7
+ // const child_process = require('child_process');
8
8
 
9
9
  commander.command('v').description('-- 查看版本').action(() => {
10
10
  const package_json_file = JSON.parse(fs.readFileSync(path.join(__dirname, '../package.json')).toString());
@@ -14,6 +14,18 @@ commander.command('v').description('-- 查看版本').action(() => {
14
14
  console.log(`当前版本 v${version}`);
15
15
  });
16
16
 
17
+ commander.command('help').description('-- 帮助').action(() => {
18
+ console.log('jjb-cmd <command>');
19
+ console.log('');
20
+ console.log('使用:');
21
+ console.log('');
22
+ console.log('jjb-cmd help 帮助');
23
+ console.log('jjb-cmd v 查看版本');
24
+ console.log('jjb-cmd push <version> 发布云组件\n\targ1 <version> 发布版本,可设置为latest');
25
+ console.log('jjb-cmd auth <username> <password> 登录授权\n\targ1 <username> 用户名\n\targ2 <password> 密码');
26
+ console.log('jjb-cmd push java <env> 推送微应用到服务器\n\targ1 <env> 推送环境');
27
+ });
28
+
17
29
  commander.command('pushMessage [args]').description('-- 设置publish提交时是否需要提交信息').action(args => {
18
30
  const package_json_file = JSON.parse(fs.readFileSync(path.join(__dirname, '../package.json')).toString());
19
31
  if ([ 'yes', 'no' ].includes(args)) {
@@ -22,49 +34,6 @@ commander.command('pushMessage [args]').description('-- 设置publish提交时
22
34
  }
23
35
  });
24
36
 
25
- commander.command('link').option('-A').description('-- 创建符号链接').action(args => {
26
- let dirList = [];
27
- const hasFlag = args.A;
28
- const root_path = path.resolve('./');
29
- let r1 = readline.createInterface({
30
- input: process.stdin,
31
- output: process.stdout
32
- });
33
- r1.question('Target Path:', function (answer) {
34
- const arr = answer.split('\\');
35
- const name = arr.length
36
- ? arr[ arr.length - 1 ]
37
- : '';
38
- if (hasFlag) {
39
- dirList = dirList.concat(fs.readdirSync(root_path).map(dir => {
40
- return `${root_path}\\${dir}`;
41
- }).filter(dir => fs.statSync(dir).isDirectory()).map(dir => {
42
- return {
43
- dir: dir + '\\' + name,
44
- link: answer
45
- };
46
- }));
47
- } else {
48
- dirList = dirList.concat(root_path).map(dir => {
49
- return {
50
- dir: dir + '\\' + name,
51
- link: answer
52
- };
53
- });
54
- }
55
- dirList.forEach(item => {
56
- child_process.execSync(`mklink /D ${item.dir} ${item.link}`, (error, stdout) => {
57
- if (!error) {
58
- console.log(stdout);
59
- }
60
- });
61
- });
62
- console.log('执行完成。');
63
- process.exit(0);
64
- });
65
- r1.on('close', () => process.exit(0));
66
- });
67
-
68
37
  // 命令
69
38
  commander.command('auth [args]').description('-- 授权').action(args => {
70
39
  require('../src/auth.js')(process.argv.splice(3));
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "env": "prod",
5
5
  "httpMethod": "http",
6
6
  "pushMessage": "yes",
7
- "version": "2.3.0",
7
+ "version": "2.3.2",
8
8
  "description": "jjb-cmd命令行工具",
9
9
  "main": "index.js",
10
10
  "scripts": {
package/src/auth.js CHANGED
@@ -1 +1 @@
1
- function a0_0x2374(_0x3cb867,_0x222789){const _0x28271b=a0_0x2827();return a0_0x2374=function(_0x237499,_0x1068c8){_0x237499=_0x237499-0x187;let _0x20cadc=_0x28271b[_0x237499];return _0x20cadc;},a0_0x2374(_0x3cb867,_0x222789);}const a0_0x5129fb=a0_0x2374;(function(_0x285ab0,_0x3c8573){const _0x2fe416=a0_0x2374,_0x4c0c36=_0x285ab0();while(!![]){try{const _0x4f6809=-parseInt(_0x2fe416(0x18a))/0x1+-parseInt(_0x2fe416(0x192))/0x2+parseInt(_0x2fe416(0x18c))/0x3*(-parseInt(_0x2fe416(0x19c))/0x4)+-parseInt(_0x2fe416(0x19b))/0x5*(-parseInt(_0x2fe416(0x196))/0x6)+parseInt(_0x2fe416(0x1a1))/0x7+parseInt(_0x2fe416(0x19a))/0x8+parseInt(_0x2fe416(0x197))/0x9*(parseInt(_0x2fe416(0x191))/0xa);if(_0x4f6809===_0x3c8573)break;else _0x4c0c36['push'](_0x4c0c36['shift']());}catch(_0x3f3e26){_0x4c0c36['push'](_0x4c0c36['shift']());}}}(a0_0x2827,0x4a23c));const axios=require(a0_0x5129fb(0x19e)),chalk=require(a0_0x5129fb(0x199)),fs=require('fs'),path=require(a0_0x5129fb(0x18f)),{getApiHost}=require(a0_0x5129fb(0x19f));function a0_0x2827(){const _0x3a3666=['message','path','then','10faliXJ','981162BmjkvG','Auth:\x20登录成功,已缓存登录状态!','log','data','258cdRoyC','4119561MzopmX','existsSync','chalk','1186808hHVWGx','67345UlHoHF','1116EJTVMh','Auth:\x20','axios','./config','../.auth','1663277NAKPnu','Auth:\x20授权登录!','writeFileSync','green','join','catch','/api/auth','exit','post','342068BtBXwH','unlinkSync','3081GhzfMi','Auth:\x20登录失败!'];a0_0x2827=function(){return _0x3a3666;};return a0_0x2827();}module['exports']=_0x2ca767=>{const _0x5b1057=a0_0x5129fb;console['log'](_0x5b1057(0x1a2));const [_0x5e7ad1,_0x329f0f]=_0x2ca767;axios[_0x5b1057(0x189)](getApiHost()+_0x5b1057(0x187),{'username':_0x5e7ad1,'password':_0x329f0f})[_0x5b1057(0x190)](_0x1f2ef8=>{const _0x296189=_0x5b1057,_0x2824d1=path[_0x296189(0x1a5)](__dirname,_0x296189(0x1a0));_0x1f2ef8[_0x296189(0x195)]['status']?(console[_0x296189(0x194)](chalk['green'](_0x296189(0x193))),fs[_0x296189(0x1a3)](_0x2824d1,_0x5e7ad1+'/'+_0x329f0f)):(console[_0x296189(0x194)](chalk['red'](_0x296189(0x19d)+_0x1f2ef8[_0x296189(0x195)][_0x296189(0x18e)])),fs[_0x296189(0x198)](_0x2824d1)&&fs[_0x296189(0x18b)](_0x2824d1),process[_0x296189(0x188)](0x0));})[_0x5b1057(0x1a6)](_0x565459=>{const _0x1bcf63=_0x5b1057;console[_0x1bcf63(0x194)](chalk[_0x1bcf63(0x1a4)](_0x1bcf63(0x18d)+_0x565459['message'])),process[_0x1bcf63(0x188)](0x0);});};
1
+ function a0_0x4ee3(_0x55846d,_0x278546){const _0x293f6a=a0_0x293f();return a0_0x4ee3=function(_0x4ee337,_0x2eac0c){_0x4ee337=_0x4ee337-0xa3;let _0x117eb9=_0x293f6a[_0x4ee337];return _0x117eb9;},a0_0x4ee3(_0x55846d,_0x278546);}function a0_0x293f(){const _0x32d25a=['green','log','unlinkSync','existsSync','419664AvvVCW','Auth:\x20登录失败!','Auth:\x20','post','6134271GBocEW','1382Ffdphs','64225tUDKQp','608piBwSQ','exit','780lbDNAF','72RZYLcc','./config','message','12483065XRujwD','join','status','catch','writeFileSync','../.auth','then','/api/auth','38058cIRHSM','chalk','axios','data','16853610qjrYKs','path','exports','306gwxizv'];a0_0x293f=function(){return _0x32d25a;};return a0_0x293f();}const a0_0xbd304d=a0_0x4ee3;(function(_0xa90a58,_0x12f5aa){const _0x1abf8d=a0_0x4ee3,_0x37f1b0=_0xa90a58();while(!![]){try{const _0x463080=parseInt(_0x1abf8d(0xaa))/0x1*(parseInt(_0x1abf8d(0xa8))/0x2)+parseInt(_0x1abf8d(0xb8))/0x3*(-parseInt(_0x1abf8d(0xad))/0x4)+-parseInt(_0x1abf8d(0xa9))/0x5*(parseInt(_0x1abf8d(0xac))/0x6)+parseInt(_0x1abf8d(0xb0))/0x7+-parseInt(_0x1abf8d(0xa3))/0x8*(-parseInt(_0x1abf8d(0xbf))/0x9)+-parseInt(_0x1abf8d(0xbc))/0xa+parseInt(_0x1abf8d(0xa7))/0xb;if(_0x463080===_0x12f5aa)break;else _0x37f1b0['push'](_0x37f1b0['shift']());}catch(_0x5e0469){_0x37f1b0['push'](_0x37f1b0['shift']());}}}(a0_0x293f,0xeaa49));const axios=require(a0_0xbd304d(0xba)),chalk=require(a0_0xbd304d(0xb9)),fs=require('fs'),path=require(a0_0xbd304d(0xbd)),{getApiHost}=require(a0_0xbd304d(0xae));module[a0_0xbd304d(0xbe)]=_0x18bc7e=>{const _0x366bdc=a0_0xbd304d;console[_0x366bdc(0xc1)]('Auth:\x20授权登录!');const [_0x44bee5,_0x26d93b]=_0x18bc7e;axios[_0x366bdc(0xa6)](getApiHost()+_0x366bdc(0xb7),{'username':_0x44bee5,'password':_0x26d93b})[_0x366bdc(0xb6)](_0x6e0c48=>{const _0xf49f1d=_0x366bdc,_0x558415=path[_0xf49f1d(0xb1)](__dirname,_0xf49f1d(0xb5));_0x6e0c48[_0xf49f1d(0xbb)][_0xf49f1d(0xb2)]?(console[_0xf49f1d(0xc1)](chalk[_0xf49f1d(0xc0)]('Auth:\x20登录成功,已缓存登录状态!')),fs[_0xf49f1d(0xb4)](_0x558415,_0x44bee5+'/'+_0x26d93b)):(console['log'](chalk['red'](_0xf49f1d(0xa5)+_0x6e0c48[_0xf49f1d(0xbb)][_0xf49f1d(0xaf)])),fs[_0xf49f1d(0xc3)](_0x558415)&&fs[_0xf49f1d(0xc2)](_0x558415),process[_0xf49f1d(0xab)](0x0));})[_0x366bdc(0xb3)](_0x3066aa=>{const _0x18bafa=_0x366bdc;console[_0x18bafa(0xc1)](chalk['green'](_0x18bafa(0xa4)+_0x3066aa[_0x18bafa(0xaf)])),process[_0x18bafa(0xab)](0x0);});};
package/src/config.js CHANGED
@@ -1 +1 @@
1
- const a1_0x4148ed=a1_0x5781;(function(_0x5e7c21,_0x2f88f8){const _0x3f7eec=a1_0x5781,_0x441b7a=_0x5e7c21();while(!![]){try{const _0x5766ab=parseInt(_0x3f7eec(0x16c))/0x1*(-parseInt(_0x3f7eec(0x15f))/0x2)+parseInt(_0x3f7eec(0x147))/0x3*(-parseInt(_0x3f7eec(0x162))/0x4)+parseInt(_0x3f7eec(0x165))/0x5*(-parseInt(_0x3f7eec(0x14a))/0x6)+parseInt(_0x3f7eec(0x160))/0x7*(-parseInt(_0x3f7eec(0x167))/0x8)+parseInt(_0x3f7eec(0x163))/0x9+-parseInt(_0x3f7eec(0x14f))/0xa+-parseInt(_0x3f7eec(0x145))/0xb*(-parseInt(_0x3f7eec(0x157))/0xc);if(_0x5766ab===_0x2f88f8)break;else _0x441b7a['push'](_0x441b7a['shift']());}catch(_0x14087e){_0x441b7a['push'](_0x441b7a['shift']());}}}(a1_0xdeb7,0x613ba));function a1_0x5781(_0x3c7cb8,_0x56eacc){const _0xdeb767=a1_0xdeb7();return a1_0x5781=function(_0x5781cb,_0x48de13){_0x5781cb=_0x5781cb-0x140;let _0x7ac263=_0xdeb767[_0x5781cb];return _0x7ac263;},a1_0x5781(_0x3c7cb8,_0x56eacc);}const os=require('os'),path=require(a1_0x4148ed(0x14d)),fs=require('fs'),API_HOST='http://120.26.210.58:8088',API_HOST_HTTPS='https://jcloud.cqjjb.cn',API_HOST_TEST=a1_0x4148ed(0x153);function a1_0xdeb7(){const _0x39a746=['GIT_HOST','getApiHost','ywPtT3xCG6b_vAxp6sTj','9286jDLOiT','join','CONFIG_FILE_HOST','TEMPLATE_FOLDER','jjb-assembly-','http','CLOUD_PROJECT','../../../package.json','77aiRBrL','GIT_JAVA_ENV_JSON','3ArNVyK','readFileSync','toString','588360FovSmp','GIT_TEMP_DIR','FT3pKzxpRynFkmddJ9Bs','path','d4wQ7dzEjYPsgVbKnYei','3111900jTMKwz','FqNrmFAgrxasMrbbjvq9','API_HOST','hLqARY89CN6fUD3yg4NL','http://120.26.210.58:8089','dev','jjb-assembly-java','G4HJRsHr9D7Ssmixegw2','3776184LstwAK','prod','parse','snBxJ2i5kYarGGcsojhY','httpMethod','tmpdir','gPSit8aJsLVmNzuQ5Cy4','https://cdn.cqjjb.cn/jjb-cloud-config','56jxwkBG','7sypsXT','env','544372pBpkdv','3477438ysgWaM','test','40cBaUPU','7V-YUxhmh51Mdhgx4rq4','5592952rQuPPX','API_HOST_TEST'];a1_0xdeb7=function(){return _0x39a746;};return a1_0xdeb7();}exports[a1_0x4148ed(0x16e)]=a1_0x4148ed(0x15e),exports[a1_0x4148ed(0x151)]=API_HOST,exports[a1_0x4148ed(0x168)]=API_HOST_TEST,exports[a1_0x4148ed(0x169)]='http://192.168.1.242:10985',exports['GIT_TEMP_DIR']=a1_0x4148ed(0x141)+Date['now'](),exports['GIT_TEMP_JAVA']=a1_0x4148ed(0x155),exports[a1_0x4148ed(0x146)]={'development':a1_0x4148ed(0x154),'production':a1_0x4148ed(0x158),'test':a1_0x4148ed(0x164)},exports[a1_0x4148ed(0x143)]={'common':{'token':a1_0x4148ed(0x156),'projectId':0x117},'react-admin-component':{'token':a1_0x4148ed(0x14c),'projectId':0x154},'jjb-dva-runtime':{'token':a1_0x4148ed(0x152),'projectId':0x23b},'jjb-common-lib':{'token':'e9njpBd1nS_LREN8GFpR','projectId':0x23c},'jjb-common-decorator':{'token':a1_0x4148ed(0x15d),'projectId':0x23e},'vue-unisass-component':{'token':a1_0x4148ed(0x14e),'projectId':0x153},'react-component':{'token':a1_0x4148ed(0x15a),'projectId':0x33f},'micro-app-ts':{'token':a1_0x4148ed(0x166),'projectId':0x33e},'micro-app':{'token':a1_0x4148ed(0x150),'projectId':0x33d},'lib':{'token':a1_0x4148ed(0x16b),'projectId':0x33c}},exports[a1_0x4148ed(0x140)]=os[a1_0x4148ed(0x15c)]()+'\x5c'+exports[a1_0x4148ed(0x14b)],exports[a1_0x4148ed(0x16a)]=()=>{const _0x1f3d4b=a1_0x4148ed,_0x560ffe=JSON[_0x1f3d4b(0x159)](fs[_0x1f3d4b(0x148)](path[_0x1f3d4b(0x16d)](__dirname,_0x1f3d4b(0x144)))[_0x1f3d4b(0x149)]());return _0x560ffe[_0x1f3d4b(0x161)]==='test'?API_HOST_TEST:_0x560ffe[_0x1f3d4b(0x15b)]===_0x1f3d4b(0x142)?API_HOST:API_HOST_HTTPS;};
1
+ const a1_0x2459d5=a1_0x7ef8;function a1_0x7ef8(_0x322ede,_0x41feaf){const _0x40f166=a1_0x40f1();return a1_0x7ef8=function(_0x7ef8c7,_0x6bb9b8){_0x7ef8c7=_0x7ef8c7-0x12b;let _0x496b9c=_0x40f166[_0x7ef8c7];return _0x496b9c;},a1_0x7ef8(_0x322ede,_0x41feaf);}function a1_0x40f1(){const _0x2119c0=['99390TULkaj','GIT_JAVA_ENV_JSON','snBxJ2i5kYarGGcsojhY','ywPtT3xCG6b_vAxp6sTj','http://120.26.210.58:8089','d4wQ7dzEjYPsgVbKnYei','jjb-assembly-java','path','9GeuEQd','3588912uNcILx','3AhzOiV','GIT_HOST','GIT_TEMP_DIR','../package.json','httpMethod','10FFYTzr','https://cdn.cqjjb.cn/jjb-cloud-config','test','tmpdir','API_HOST','http','17202515NNNlKj','2174404IlkOBm','8NauNNA','toString','jjb-assembly-','7V-YUxhmh51Mdhgx4rq4','86205vQMFxf','1448015SXKabF','https://jcloud.cqjjb.cn','gPSit8aJsLVmNzuQ5Cy4','now','http://192.168.1.242:10985','FT3pKzxpRynFkmddJ9Bs','getApiHost','e9njpBd1nS_LREN8GFpR','readFileSync','316866AJQyvX','env','join','hLqARY89CN6fUD3yg4NL','CONFIG_FILE_HOST','dev','G4HJRsHr9D7Ssmixegw2','TEMPLATE_FOLDER','parse','GIT_TEMP_JAVA','http://120.26.210.58:8088'];a1_0x40f1=function(){return _0x2119c0;};return a1_0x40f1();}(function(_0x41bcef,_0x1618b1){const _0x5dfcac=a1_0x7ef8,_0x35dc36=_0x41bcef();while(!![]){try{const _0x130dbb=-parseInt(_0x5dfcac(0x157))/0x1*(parseInt(_0x5dfcac(0x14f))/0x2)+parseInt(_0x5dfcac(0x159))/0x3*(-parseInt(_0x5dfcac(0x135))/0x4)+parseInt(_0x5dfcac(0x13b))/0x5+parseInt(_0x5dfcac(0x144))/0x6+-parseInt(_0x5dfcac(0x13a))/0x7*(-parseInt(_0x5dfcac(0x136))/0x8)+parseInt(_0x5dfcac(0x158))/0x9*(-parseInt(_0x5dfcac(0x12e))/0xa)+parseInt(_0x5dfcac(0x134))/0xb;if(_0x130dbb===_0x1618b1)break;else _0x35dc36['push'](_0x35dc36['shift']());}catch(_0x55cc24){_0x35dc36['push'](_0x35dc36['shift']());}}}(a1_0x40f1,0x8124a));const os=require('os'),path=require(a1_0x2459d5(0x156)),fs=require('fs'),API_HOST=a1_0x2459d5(0x14e),API_HOST_HTTPS=a1_0x2459d5(0x13c),API_HOST_TEST=a1_0x2459d5(0x153);exports[a1_0x2459d5(0x148)]=a1_0x2459d5(0x12f),exports[a1_0x2459d5(0x132)]=API_HOST,exports['API_HOST_TEST']=API_HOST_TEST,exports[a1_0x2459d5(0x15a)]=a1_0x2459d5(0x13f),exports[a1_0x2459d5(0x12b)]=a1_0x2459d5(0x138)+Date[a1_0x2459d5(0x13e)](),exports[a1_0x2459d5(0x14d)]=a1_0x2459d5(0x155),exports[a1_0x2459d5(0x150)]={'development':a1_0x2459d5(0x149),'production':'prod','test':'test'},exports['CLOUD_PROJECT']={'common':{'token':a1_0x2459d5(0x14a),'projectId':0x117},'react-admin-component':{'token':a1_0x2459d5(0x140),'projectId':0x154},'jjb-dva-runtime':{'token':a1_0x2459d5(0x147),'projectId':0x23b},'jjb-common-lib':{'token':a1_0x2459d5(0x142),'projectId':0x23c},'jjb-common-decorator':{'token':a1_0x2459d5(0x13d),'projectId':0x23e},'vue-unisass-component':{'token':a1_0x2459d5(0x154),'projectId':0x153},'react-component':{'token':a1_0x2459d5(0x151),'projectId':0x33f},'micro-app-ts':{'token':a1_0x2459d5(0x139),'projectId':0x33e},'micro-app':{'token':'FqNrmFAgrxasMrbbjvq9','projectId':0x33d},'lib':{'token':a1_0x2459d5(0x152),'projectId':0x33c}},exports[a1_0x2459d5(0x14b)]=os[a1_0x2459d5(0x131)]()+'\x5c'+exports[a1_0x2459d5(0x12b)],exports[a1_0x2459d5(0x141)]=()=>{const _0x2f1cb6=a1_0x2459d5,_0x51b01f=JSON[_0x2f1cb6(0x14c)](fs[_0x2f1cb6(0x143)](path[_0x2f1cb6(0x146)](__dirname,_0x2f1cb6(0x12c)))[_0x2f1cb6(0x137)]());return _0x51b01f[_0x2f1cb6(0x145)]===_0x2f1cb6(0x130)?API_HOST_TEST:_0x51b01f[_0x2f1cb6(0x12d)]===_0x2f1cb6(0x133)?API_HOST:API_HOST_HTTPS;};
package/src/publish.js CHANGED
@@ -1 +1 @@
1
- function a2_0x196c(_0xdc426c,_0x547a33){const _0x38d23f=a2_0x38d2();return a2_0x196c=function(_0x196cf2,_0x14bac8){_0x196cf2=_0x196cf2-0x127;let _0x2b194c=_0x38d23f[_0x196cf2];return _0x2b194c;},a2_0x196c(_0xdc426c,_0x547a33);}const a2_0x164b91=a2_0x196c;(function(_0x259ca8,_0x4c2dbc){const _0x219240=a2_0x196c,_0x22ffea=_0x259ca8();while(!![]){try{const _0x3671f8=-parseInt(_0x219240(0x169))/0x1+parseInt(_0x219240(0x12d))/0x2*(parseInt(_0x219240(0x15e))/0x3)+parseInt(_0x219240(0x12a))/0x4+-parseInt(_0x219240(0x164))/0x5+parseInt(_0x219240(0x143))/0x6*(-parseInt(_0x219240(0x14e))/0x7)+parseInt(_0x219240(0x134))/0x8*(-parseInt(_0x219240(0x13f))/0x9)+parseInt(_0x219240(0x14d))/0xa;if(_0x3671f8===_0x4c2dbc)break;else _0x22ffea['push'](_0x22ffea['shift']());}catch(_0x385aa0){_0x22ffea['push'](_0x22ffea['shift']());}}}(a2_0x38d2,0xe4469));function a2_0x38d2(){const _0x5d4439=['6543908ZNcMlW','length','stdout','19718RWEbYp','readme_content','createInterface','./config','npm\x20run\x20build:production','hostname','child_process','312bUQRhw','package.json','Auth:\x20授权成功!','Error:\x20暴露的配置信息中缺少“settings”!','Error:\x20授权失败!','split','then','Error:\x20请在组件根目录添加一个README.md说明文件!','Error:\x20授权失败,未知错误!','log','Error:\x20暴露的配置信息中缺少“info”!','284895pKxJSq','Error:\x20请在组件根目录为组件添加一个缩略图“thumbnail.png”文件!','join','pushMessage','1065174TkLbdI','/api/auth','stdin','question','/api/file/publish','exit','axios','package_version','Error:\x20请先登录!','data','42891980fxUIgD','70oSETrs','status','red','readline','dist','defaultSetting','catch','readFileSync','component_config_content','Error:\x20请在组件入口文件中添加“window[props.componentKey]”以暴露组件的配置信息!','Sudo:\x20yarn\x20build:production','Auth:\x20正在获取授权!','message','from','post','existsSync','75iMsbZw','blue','indexOf','match','Please\x20wait,\x20build\x20...,','base64','8300580oRWeBB','green','resolve','platform','../.auth','566682MoRNQW','chalk','yarn\x20build:production','execSync','请输入此次组件发布的信息,按Enter确认:','no\x20message','exports','README.md','package_content','toString'];a2_0x38d2=function(){return _0x5d4439;};return a2_0x38d2();}const path=require('path'),fs=require('fs'),os=require('os'),axios=require(a2_0x164b91(0x149)),chalk=require(a2_0x164b91(0x16a)),readline=require(a2_0x164b91(0x151)),io=readline[a2_0x164b91(0x12f)]({'input':process[a2_0x164b91(0x145)],'output':process[a2_0x164b91(0x12c)]}),child_process=require(a2_0x164b91(0x133)),{getApiHost}=require(a2_0x164b91(0x130)),submitFun=function(_0x5acad8,_0x3cafe4){const _0x3c83c2=a2_0x164b91;_0x3cafe4['message']=_0x5acad8||_0x3c83c2(0x16e),axios[_0x3c83c2(0x15c)](getApiHost()+_0x3c83c2(0x147),_0x3cafe4)[_0x3c83c2(0x13a)](_0x71cbba=>{const _0x256c71=_0x3c83c2;console['log'](chalk[_0x256c71(0x165)](_0x71cbba[_0x256c71(0x14c)][_0x256c71(0x15a)])),process[_0x256c71(0x148)](0x0);})['catch'](_0x22ba61=>{const _0x178bbb=_0x3c83c2;console[_0x178bbb(0x13d)](chalk[_0x178bbb(0x150)]('Error:\x20组件发布失败!'+_0x22ba61[_0x178bbb(0x15a)])),process['exit'](0x0);});};module[a2_0x164b91(0x16f)]=_0x3f6c29=>{const _0x35e4d0=a2_0x164b91,_0x1582c9=path[_0x35e4d0(0x141)](__dirname,_0x35e4d0(0x168));!fs[_0x35e4d0(0x15d)](_0x1582c9)&&(console[_0x35e4d0(0x13d)](chalk['red'](_0x35e4d0(0x14b))),process[_0x35e4d0(0x148)](0x0));const [_0x42a06c,_0x6887d7]=fs[_0x35e4d0(0x155)](_0x1582c9)[_0x35e4d0(0x129)]()[_0x35e4d0(0x139)]('/');console[_0x35e4d0(0x13d)](_0x35e4d0(0x159)),axios[_0x35e4d0(0x15c)](getApiHost()+_0x35e4d0(0x144),{'username':_0x42a06c,'password':_0x6887d7})['then'](_0x2bc992=>{const _0x1f25f5=_0x35e4d0;if(_0x2bc992[_0x1f25f5(0x14c)][_0x1f25f5(0x14f)]){console[_0x1f25f5(0x13d)](chalk['green'](_0x1f25f5(0x136)));const _0x360aa2=path[_0x1f25f5(0x166)]('./');console[_0x1f25f5(0x13d)](_0x1f25f5(0x162)+_0x360aa2);fs[_0x1f25f5(0x15d)](_0x360aa2+'/yarn.lock')?(console[_0x1f25f5(0x13d)](chalk['blue'](_0x1f25f5(0x158)),_0x360aa2),child_process[_0x1f25f5(0x16c)](_0x1f25f5(0x16b),{'cwd':_0x360aa2})):(console[_0x1f25f5(0x13d)](chalk[_0x1f25f5(0x15f)]('Sudo:\x20npm\x20build:production'),_0x360aa2),child_process['execSync'](_0x1f25f5(0x131),{'cwd':_0x360aa2}));const _0x3b0ed2=_0x360aa2[_0x1f25f5(0x160)]('/')!==-0x1?'/':'\x5c',_0x38dce1=''+_0x360aa2+_0x3b0ed2+_0x1f25f5(0x127),_0x3737f5=''+_0x360aa2+_0x3b0ed2+_0x1f25f5(0x152)+_0x3b0ed2+'index.js',_0x1f1b94=''+_0x360aa2+_0x3b0ed2+_0x1f25f5(0x135),_0x3bc8c7=''+_0x360aa2+_0x3b0ed2+'thumbnail.png',_0x28dc1a=JSON['parse'](fs[_0x1f25f5(0x155)](path[_0x1f25f5(0x141)](__dirname,'../../../package.json'))[_0x1f25f5(0x129)]()),{version:_0x4ae025}=_0x28dc1a,_0x490094={'username':_0x42a06c,'cmd_version':_0x4ae025,'hostname':os[_0x1f25f5(0x132)](),'platform':os[_0x1f25f5(0x167)]()};if(fs[_0x1f25f5(0x15d)](_0x1f1b94)){if(fs[_0x1f25f5(0x15d)](_0x3737f5)){_0x490094[_0x1f25f5(0x14a)]=_0x3f6c29?_0x3f6c29:0x0,_0x490094[_0x1f25f5(0x128)]=fs['readFileSync'](_0x3737f5)['toString'](),_0x490094[_0x1f25f5(0x156)]={};const _0x3c1bae=fs[_0x1f25f5(0x155)](_0x3737f5)[_0x1f25f5(0x129)](),_0xe9eaf5=_0x3c1bae[_0x1f25f5(0x161)](/(window\[).+?(\.componentKey|.+]={)/img);if(_0xe9eaf5&&_0xe9eaf5[_0x1f25f5(0x12b)]){const _0x256fdc=_0x3c1bae[_0x1f25f5(0x161)](/componentKey.+([{,]info:\s{0,}{)/img);if(_0x256fdc&&_0x256fdc['length']){let _0x329af8='{';const _0x143a5f=_0x3c1bae[_0x1f25f5(0x139)](_0x256fdc[0x0])[0x1];for(let _0x39c6a7=0x0;_0x39c6a7<_0x143a5f[_0x1f25f5(0x12b)];_0x39c6a7++){_0x329af8+=_0x143a5f[_0x39c6a7];if(_0x143a5f[_0x39c6a7]==='}')try{const _0x36b365=new Function('return\x20'+_0x329af8)();_0x490094[_0x1f25f5(0x156)]={..._0x36b365,'defaultSetting':{}};}catch(_0x5decbf){}}}else console[_0x1f25f5(0x13d)](chalk[_0x1f25f5(0x150)](_0x1f25f5(0x13e))),process[_0x1f25f5(0x148)](0x0);const _0x7a07e3=_0x3c1bae[_0x1f25f5(0x161)](/componentKey.+([{,]settings:\s{0,}{)/img);if(_0x7a07e3&&_0x7a07e3[_0x1f25f5(0x12b)]){let _0x338d80='{';const _0x423e0f=_0x3c1bae[_0x1f25f5(0x139)](_0x7a07e3[0x0])[0x1];for(let _0x1f228e=0x0;_0x1f228e<_0x423e0f[_0x1f25f5(0x12b)];_0x1f228e++){_0x338d80+=_0x423e0f[_0x1f228e];if(_0x423e0f[_0x1f228e]==='}')try{_0x490094['component_config_content'][_0x1f25f5(0x153)]=new Function('return\x20'+_0x338d80)();}catch(_0x8f89d){}}_0x490094[_0x1f25f5(0x156)]=JSON['stringify'](_0x490094[_0x1f25f5(0x156)]);}else console[_0x1f25f5(0x13d)](chalk[_0x1f25f5(0x150)](_0x1f25f5(0x137))),process['exit'](0x0);}else console[_0x1f25f5(0x13d)](chalk[_0x1f25f5(0x150)](_0x1f25f5(0x157))),process['exit'](0x0);fs['existsSync'](_0x38dce1)?_0x490094[_0x1f25f5(0x12e)]=fs['readFileSync'](_0x38dce1)[_0x1f25f5(0x129)]():(console[_0x1f25f5(0x13d)](chalk['red'](_0x1f25f5(0x13b))),process[_0x1f25f5(0x148)](0x0));if(!fs['existsSync'](_0x3bc8c7))console['log'](_0x1f25f5(0x140)),process[_0x1f25f5(0x148)](0x0);else{const _0x14da4b=fs['readFileSync'](_0x3bc8c7);_0x490094['thumbnail_base64']=Buffer[_0x1f25f5(0x15b)](_0x14da4b)['toString'](_0x1f25f5(0x163));}_0x28dc1a[_0x1f25f5(0x142)]==='no'?submitFun(null,_0x490094):io[_0x1f25f5(0x146)](_0x1f25f5(0x16d),function(_0x561e2a){submitFun(_0x561e2a,_0x490094);});}else console['log'](chalk['red']('Error:\x20组件发布失败!根目录缺少‘dist/index.js’文件!')),process[_0x1f25f5(0x148)](0x0);}else console[_0x1f25f5(0x13d)](chalk[_0x1f25f5(0x150)]('Error:\x20组件发布失败!根目录缺少‘package.json’文件!')),process[_0x1f25f5(0x148)](0x0);}else console['log'](chalk['red'](_0x1f25f5(0x138))),process[_0x1f25f5(0x148)](0x0);})[_0x35e4d0(0x154)](_0x1610b0=>{const _0x5bc9bb=_0x35e4d0;console['log'](chalk[_0x5bc9bb(0x150)](_0x5bc9bb(0x13c)),_0x1610b0[_0x5bc9bb(0x15a)]),process[_0x5bc9bb(0x148)](0x0);});};
1
+ function a2_0x3d5f(){const _0x73ff72=['42061Tgiorb','Please\x20wait,\x20build\x20...,','Error:\x20请在组件入口文件中添加“window[props.componentKey]”以暴露组件的配置信息!','3RakVHV','stringify','Error:\x20暴露的配置信息中缺少“info”!','child_process','readme_content','Auth:\x20正在获取授权!','data','Auth:\x20授权成功!','2471FDCTAt','message','index.js','331566OCRnxn','base64','component_config_content','package_version','platform','existsSync','red','704384qVOhBK','9945970rHlwZF','post','/yarn.lock','Error:\x20组件发布失败!根目录缺少‘dist/index.js’文件!','/api/file/publish','Sudo:\x20npm\x20build:production','Sudo:\x20yarn\x20build:production','package_content','36gbGuOV','pushMessage','yarn\x20build:production','log','Error:\x20请在组件根目录为组件添加一个缩略图“thumbnail.png”文件!','exit','Error:\x20请在组件根目录添加一个README.md说明文件!','parse','then','split','Error:\x20暴露的配置信息中缺少“settings”!','stdout','thumbnail_base64','16248uZTNLS','chalk','../package.json','axios','5540250astebp','indexOf','Error:\x20授权失败!','match','execSync','./config','defaultSetting','length','return\x20','from','请输入此次组件发布的信息,按Enter确认:','no\x20message','readFileSync','toString','blue','resolve','exports','3282476FprrTA','green','Error:\x20请先登录!','catch'];a2_0x3d5f=function(){return _0x73ff72;};return a2_0x3d5f();}const a2_0x3a75dc=a2_0x17f3;(function(_0x2e5f00,_0x563f07){const _0x241e60=a2_0x17f3,_0x3ccd11=_0x2e5f00();while(!![]){try{const _0x35a75b=parseInt(_0x241e60(0x1e0))/0x1+parseInt(_0x241e60(0x1ee))/0x2+parseInt(_0x241e60(0x1e3))/0x3*(-parseInt(_0x241e60(0x1dc))/0x4)+-parseInt(_0x241e60(0x20f))/0x5+-parseInt(_0x241e60(0x20b))/0x6*(-parseInt(_0x241e60(0x1eb))/0x7)+-parseInt(_0x241e60(0x1f5))/0x8*(-parseInt(_0x241e60(0x1fe))/0x9)+parseInt(_0x241e60(0x1f6))/0xa;if(_0x35a75b===_0x563f07)break;else _0x3ccd11['push'](_0x3ccd11['shift']());}catch(_0x337c85){_0x3ccd11['push'](_0x3ccd11['shift']());}}}(a2_0x3d5f,0x8e100));function a2_0x17f3(_0x2e780f,_0xd0c4d){const _0x3d5fa9=a2_0x3d5f();return a2_0x17f3=function(_0x17f3af,_0x4daef4){_0x17f3af=_0x17f3af-0x1da;let _0x3fd3b7=_0x3d5fa9[_0x17f3af];return _0x3fd3b7;},a2_0x17f3(_0x2e780f,_0xd0c4d);}const path=require('path'),fs=require('fs'),os=require('os'),axios=require(a2_0x3a75dc(0x20e)),chalk=require(a2_0x3a75dc(0x20c)),readline=require('readline'),io=readline['createInterface']({'input':process['stdin'],'output':process[a2_0x3a75dc(0x209)]}),child_process=require(a2_0x3a75dc(0x1e6)),{getApiHost}=require(a2_0x3a75dc(0x214)),submitFun=function(_0x4d90b0,_0x27bb0f){const _0x104d94=a2_0x3a75dc;_0x27bb0f['message']=_0x4d90b0||_0x104d94(0x21a),axios['post'](getApiHost()+_0x104d94(0x1fa),_0x27bb0f)['then'](_0x1a0342=>{const _0x3fa2a8=_0x104d94;console['log'](chalk[_0x3fa2a8(0x1dd)](_0x1a0342['data'][_0x3fa2a8(0x1ec)])),process[_0x3fa2a8(0x203)](0x0);})[_0x104d94(0x1df)](_0xd53101=>{const _0x12fab3=_0x104d94;console['log'](chalk[_0x12fab3(0x1f4)]('Error:\x20组件发布失败!'+_0xd53101['message'])),process[_0x12fab3(0x203)](0x0);});};module[a2_0x3a75dc(0x1db)]=_0x176a16=>{const _0x3efce8=a2_0x3a75dc,_0x458a66=path['join'](__dirname,'../.auth');!fs[_0x3efce8(0x1f3)](_0x458a66)&&(console[_0x3efce8(0x201)](chalk[_0x3efce8(0x1f4)](_0x3efce8(0x1de))),process[_0x3efce8(0x203)](0x0));const [_0x147dc0,_0x14521d]=fs[_0x3efce8(0x21b)](_0x458a66)['toString']()[_0x3efce8(0x207)]('/');console[_0x3efce8(0x201)](_0x3efce8(0x1e8)),axios[_0x3efce8(0x1f7)](getApiHost()+'/api/auth',{'username':_0x147dc0,'password':_0x14521d})[_0x3efce8(0x206)](_0x175673=>{const _0x13d6dd=_0x3efce8;if(_0x175673[_0x13d6dd(0x1e9)]['status']){console[_0x13d6dd(0x201)](chalk[_0x13d6dd(0x1dd)](_0x13d6dd(0x1ea)));const _0x242bd4=path[_0x13d6dd(0x1da)]('./');console['log'](_0x13d6dd(0x1e1)+_0x242bd4);fs[_0x13d6dd(0x1f3)](_0x242bd4+_0x13d6dd(0x1f8))?(console['log'](chalk[_0x13d6dd(0x21d)](_0x13d6dd(0x1fc)),_0x242bd4),child_process[_0x13d6dd(0x213)](_0x13d6dd(0x200),{'cwd':_0x242bd4})):(console[_0x13d6dd(0x201)](chalk[_0x13d6dd(0x21d)](_0x13d6dd(0x1fb)),_0x242bd4),child_process['execSync']('npm\x20run\x20build:production',{'cwd':_0x242bd4}));const _0x2b7bdf=_0x242bd4[_0x13d6dd(0x210)]('/')!==-0x1?'/':'\x5c',_0x16fc50=''+_0x242bd4+_0x2b7bdf+'README.md',_0x1f37bb=''+_0x242bd4+_0x2b7bdf+'dist'+_0x2b7bdf+_0x13d6dd(0x1ed),_0x526547=''+_0x242bd4+_0x2b7bdf+'package.json',_0x3ae970=''+_0x242bd4+_0x2b7bdf+'thumbnail.png',_0x511bfd=JSON[_0x13d6dd(0x205)](fs[_0x13d6dd(0x21b)](path['join'](__dirname,_0x13d6dd(0x20d)))['toString']()),{version:_0x2aa4ff}=_0x511bfd,_0x9ffc06={'username':_0x147dc0,'cmd_version':_0x2aa4ff,'hostname':os['hostname'](),'platform':os[_0x13d6dd(0x1f2)]()};if(fs[_0x13d6dd(0x1f3)](_0x526547)){if(fs[_0x13d6dd(0x1f3)](_0x1f37bb)){_0x9ffc06[_0x13d6dd(0x1f1)]=_0x176a16?_0x176a16:0x0,_0x9ffc06[_0x13d6dd(0x1fd)]=fs[_0x13d6dd(0x21b)](_0x1f37bb)[_0x13d6dd(0x21c)](),_0x9ffc06[_0x13d6dd(0x1f0)]={};const _0x4cd88f=fs[_0x13d6dd(0x21b)](_0x1f37bb)[_0x13d6dd(0x21c)](),_0x574ff2=_0x4cd88f[_0x13d6dd(0x212)](/(window\[).+?(\.componentKey|.+]={)/img);if(_0x574ff2&&_0x574ff2[_0x13d6dd(0x216)]){const _0x31cee4=_0x4cd88f['match'](/componentKey.+([{,]info:\s{0,}{)/img);if(_0x31cee4&&_0x31cee4[_0x13d6dd(0x216)]){let _0x23e087='{';const _0x34975d=_0x4cd88f[_0x13d6dd(0x207)](_0x31cee4[0x0])[0x1];for(let _0x1e834e=0x0;_0x1e834e<_0x34975d['length'];_0x1e834e++){_0x23e087+=_0x34975d[_0x1e834e];if(_0x34975d[_0x1e834e]==='}')try{const _0x5e40ef=new Function(_0x13d6dd(0x217)+_0x23e087)();_0x9ffc06[_0x13d6dd(0x1f0)]={..._0x5e40ef,'defaultSetting':{}};}catch(_0x509450){}}}else console[_0x13d6dd(0x201)](chalk[_0x13d6dd(0x1f4)](_0x13d6dd(0x1e5))),process[_0x13d6dd(0x203)](0x0);const _0x1e36a0=_0x4cd88f[_0x13d6dd(0x212)](/componentKey.+([{,]settings:\s{0,}{)/img);if(_0x1e36a0&&_0x1e36a0['length']){let _0x1c8888='{';const _0x28fc93=_0x4cd88f[_0x13d6dd(0x207)](_0x1e36a0[0x0])[0x1];for(let _0x2a2d1d=0x0;_0x2a2d1d<_0x28fc93[_0x13d6dd(0x216)];_0x2a2d1d++){_0x1c8888+=_0x28fc93[_0x2a2d1d];if(_0x28fc93[_0x2a2d1d]==='}')try{_0x9ffc06[_0x13d6dd(0x1f0)][_0x13d6dd(0x215)]=new Function(_0x13d6dd(0x217)+_0x1c8888)();}catch(_0x222369){}}_0x9ffc06['component_config_content']=JSON[_0x13d6dd(0x1e4)](_0x9ffc06['component_config_content']);}else console['log'](chalk['red'](_0x13d6dd(0x208))),process['exit'](0x0);}else console[_0x13d6dd(0x201)](chalk[_0x13d6dd(0x1f4)](_0x13d6dd(0x1e2))),process[_0x13d6dd(0x203)](0x0);fs['existsSync'](_0x16fc50)?_0x9ffc06[_0x13d6dd(0x1e7)]=fs['readFileSync'](_0x16fc50)[_0x13d6dd(0x21c)]():(console[_0x13d6dd(0x201)](chalk[_0x13d6dd(0x1f4)](_0x13d6dd(0x204))),process['exit'](0x0));if(!fs[_0x13d6dd(0x1f3)](_0x3ae970))console['log'](_0x13d6dd(0x202)),process['exit'](0x0);else{const _0x21f4cd=fs['readFileSync'](_0x3ae970);_0x9ffc06[_0x13d6dd(0x20a)]=Buffer[_0x13d6dd(0x218)](_0x21f4cd)[_0x13d6dd(0x21c)](_0x13d6dd(0x1ef));}_0x511bfd[_0x13d6dd(0x1ff)]==='no'?submitFun(null,_0x9ffc06):io['question'](_0x13d6dd(0x219),function(_0x3c045a){submitFun(_0x3c045a,_0x9ffc06);});}else console[_0x13d6dd(0x201)](chalk[_0x13d6dd(0x1f4)](_0x13d6dd(0x1f9))),process[_0x13d6dd(0x203)](0x0);}else console[_0x13d6dd(0x201)](chalk[_0x13d6dd(0x1f4)]('Error:\x20组件发布失败!根目录缺少‘package.json’文件!')),process[_0x13d6dd(0x203)](0x0);}else console[_0x13d6dd(0x201)](chalk[_0x13d6dd(0x1f4)](_0x13d6dd(0x211))),process['exit'](0x0);})[_0x3efce8(0x1df)](_0x44ee81=>{const _0xd3664d=_0x3efce8;console[_0xd3664d(0x201)](chalk[_0xd3664d(0x1f4)]('Error:\x20授权失败,未知错误!'),_0x44ee81[_0xd3664d(0x1ec)]),process[_0xd3664d(0x203)](0x0);});};
package/src/push.js CHANGED
@@ -1 +1 @@
1
- const a3_0x1f3cce=a3_0x1224;function a3_0x1d7b(){const _0x5958f7=['yarn\x20build:','data',']\x20请稍等!','/index.html','6AvWcPj','git\x20checkout\x20','/node_modules','writeFileSync','message','red','status','6263224NZsVZk','rmdirSync','Sudo:\x20git\x20pull','exit','40UErplO','child_process','forEach','join','master','git\x20commit\x20-m\x20','2DeFQix','lstatSync','yarn','git\x20add\x20.','isDirectory','javaGitName','Error:\x20授权失败!','Warning:\x20当前打包\x20[Env#','Sudo:\x20yarn\x20build:','post','log','/start/src/main/resources/templates','readFileSync','../.auth','yellow','Log:\x20应用打包完成!','/api/auth','index','length','.html','902267ibNMfZ','4899275RuftTO','Error:\x20jjb.config.json”中缺少“javaGit”字段!','javaGitBranch','javaGit','appIdentifier','4881636kQmizt','force','\x20--no-verify','git\x20clone\x20','execSync',']\x20未配置“javaGitBranch”,将使用默认分支“master”!','mkdirSync','Sudo:\x20yarn','Sudo:\x20git\x20commit\x20-m\x20','environment','resolve','Log:\x20即将进行应用打包\x20[Env#','existsSync','exports','5551455ChVZAr','axios','Error:\x20命令参数传递错误!','green','Sudo:\x20git\x20checkout\x20','Sudo:\x20git\x20clone\x20','6988848klRESC','\x5cdist','\x22no\x20message\x22','utf-8','7594706zwZdye','split','Auth:\x20正在获取授权!','git\x20pull','Error:\x20当前应用中不存在“jjb.config.json”文件!','path','readdirSync','Auth:\x20授权成功!','Sudo:\x20git\x20push','chalk','Error:\x20“jjb.config.json”中缺少“javaGitName”字段!','Log:\x20应用依赖安装完成!','Error:\x20','blue'];a3_0x1d7b=function(){return _0x5958f7;};return a3_0x1d7b();}(function(_0x4f5f1d,_0xdb95aa){const _0x2b0c45=a3_0x1224,_0x599001=_0x4f5f1d();while(!![]){try{const _0x1d9fa3=parseInt(_0x2b0c45(0x19d))/0x1*(parseInt(_0x2b0c45(0x189))/0x2)+parseInt(_0x2b0c45(0x1b1))/0x3+parseInt(_0x2b0c45(0x1d4))/0x4+-parseInt(_0x2b0c45(0x19e))/0x5*(parseInt(_0x2b0c45(0x1cd))/0x6)+-parseInt(_0x2b0c45(0x1bb))/0x7+parseInt(_0x2b0c45(0x1b7))/0x8+parseInt(_0x2b0c45(0x1a3))/0x9*(-parseInt(_0x2b0c45(0x1d8))/0xa);if(_0x1d9fa3===_0xdb95aa)break;else _0x599001['push'](_0x599001['shift']());}catch(_0x54460){_0x599001['push'](_0x599001['shift']());}}}(a3_0x1d7b,0xe9d27));const fs=require('fs'),os=require('os'),path=require(a3_0x1f3cce(0x1c0)),child_process=require(a3_0x1f3cce(0x1d9)),chalk=require(a3_0x1f3cce(0x1c4)),{CopyFolder,DeleteDirAllFile}=require('./tools'),{GIT_TEMP_JAVA,getApiHost}=require('./config'),axios=require(a3_0x1f3cce(0x1b2));function deleteFolderRecursive(_0x58ead8){const _0x25bfcf=a3_0x1f3cce;fs[_0x25bfcf(0x1af)](_0x58ead8)&&(fs[_0x25bfcf(0x1c1)](_0x58ead8)[_0x25bfcf(0x185)](_0x4e1fef=>{const _0x5183c1=_0x25bfcf,_0x2db06b=path['join'](_0x58ead8,_0x4e1fef);fs[_0x5183c1(0x18a)](_0x2db06b)[_0x5183c1(0x18d)]()?deleteFolderRecursive(_0x2db06b):fs['unlinkSync'](_0x2db06b);}),fs[_0x25bfcf(0x1d5)](_0x58ead8));}function a3_0x1224(_0x24b43a,_0x4c9cb4){const _0x1d7b57=a3_0x1d7b();return a3_0x1224=function(_0x122453,_0x5d1df6){_0x122453=_0x122453-0x185;let _0x4d443a=_0x1d7b57[_0x122453];return _0x4d443a;},a3_0x1224(_0x24b43a,_0x4c9cb4);}module[a3_0x1f3cce(0x1b0)]=arguments=>{const _0x2b7900=a3_0x1f3cce,_0xca7f1a=path[_0x2b7900(0x186)](__dirname,_0x2b7900(0x196));!fs[_0x2b7900(0x1af)](_0xca7f1a)&&(console[_0x2b7900(0x193)](chalk['red']('Error:\x20请先登录!')),process['exit'](0x0));const _0x1c7421=arguments[0x1],_0x457bd3=arguments[0x2]||_0x2b7900(0x1b9),_0x5cf0a7=arguments[0x3]?arguments[0x3]['split']('-'):[],_0x19ecb3=path[_0x2b7900(0x1ad)]('./'),_0x4830f0=_0x19ecb3+'\x5cjjb.config.js',_0x3a5b5b=_0x19ecb3+_0x2b7900(0x1b8),_0x2b9f57=os['tmpdir'](),[_0x1b9a79,_0x37ca88]=fs[_0x2b7900(0x195)](_0xca7f1a)['toString']()[_0x2b7900(0x1bc)]('/');console['log'](_0x2b7900(0x1bd)),axios[_0x2b7900(0x192)](getApiHost()+_0x2b7900(0x199),{'username':_0x1b9a79,'password':_0x37ca88})['then'](_0x504e84=>{const _0x57fb8a=_0x2b7900;if(_0x504e84[_0x57fb8a(0x1ca)][_0x57fb8a(0x1d3)]){console['log'](chalk[_0x57fb8a(0x1b4)](_0x57fb8a(0x1c2)));if(!fs[_0x57fb8a(0x1af)](_0x4830f0))console['log'](chalk[_0x57fb8a(0x1d2)](_0x57fb8a(0x1bf))),process['exit'](0x0);else{const _0x369b86=require(_0x4830f0);!_0x369b86['javaGit']&&(console[_0x57fb8a(0x193)](chalk[_0x57fb8a(0x1d2)](_0x57fb8a(0x19f))),process['exit'](0x0));!_0x369b86['javaGitName']&&(console['log'](chalk[_0x57fb8a(0x1d2)](_0x57fb8a(0x1c5))),process[_0x57fb8a(0x1d7)](0x0));const _0x545ff4=_0x2b9f57+'/'+GIT_TEMP_JAVA;fs[_0x57fb8a(0x1af)](_0x545ff4)&&deleteFolderRecursive(_0x545ff4);fs[_0x57fb8a(0x1a9)](_0x545ff4);const _0x377054=_0x545ff4+'/'+_0x369b86[_0x57fb8a(0x18e)];fs['existsSync'](_0x377054)?_0x5cf0a7['includes'](_0x57fb8a(0x1a4))?DeleteDirAllFile(_0x377054,()=>{const _0x5296e0=_0x57fb8a;console[_0x5296e0(0x193)](chalk['blue']('Sudo:\x20git\x20clone\x20'+_0x369b86[_0x5296e0(0x1a1)]),_0x545ff4),child_process['execSync'](_0x5296e0(0x1a6)+_0x369b86[_0x5296e0(0x1a1)],{'cwd':_0x545ff4});}):(console[_0x57fb8a(0x193)](chalk[_0x57fb8a(0x1c8)]('Sudo:\x20git\x20clone\x20'+_0x369b86['javaGit']),_0x545ff4),child_process[_0x57fb8a(0x1a7)]('git\x20clone\x20'+_0x369b86['javaGit'],{'cwd':_0x545ff4})):(console[_0x57fb8a(0x193)](chalk[_0x57fb8a(0x1c8)](_0x57fb8a(0x1b6)+_0x369b86[_0x57fb8a(0x1a1)]),_0x545ff4),child_process[_0x57fb8a(0x1a7)](_0x57fb8a(0x1a6)+_0x369b86[_0x57fb8a(0x1a1)],{'cwd':_0x545ff4})),_0x365e34(_0x545ff4,_0x369b86);}}else console[_0x57fb8a(0x193)](chalk[_0x57fb8a(0x1d2)](_0x57fb8a(0x18f))),process['exit'](0x0);})['catch'](_0x5c135e=>{const _0x5ae8bb=_0x2b7900;console[_0x5ae8bb(0x193)](chalk[_0x5ae8bb(0x1d2)]('Error:\x20授权失败,未知错误!'),_0x5c135e[_0x5ae8bb(0x1d1)]),process[_0x5ae8bb(0x1d7)](0x0);});arguments[_0x2b7900(0x19b)]<0x2&&(console['log'](chalk[_0x2b7900(0x1d2)](_0x2b7900(0x1b3))),process['exit'](0x0));function _0x365e34(_0xd5f019,_0x2153ca){const _0x350658=_0x2b7900,_0x55ee79=_0x2153ca[_0x350658(0x1ac)][_0x1c7421],_0x3d068b=_0xd5f019+'/'+_0x2153ca[_0x350658(0x18e)];!_0x55ee79['javaGitBranch']&&console[_0x350658(0x193)](chalk['yellow'](_0x350658(0x190)+_0x1c7421+_0x350658(0x1a8)));console[_0x350658(0x193)](chalk['blue'](_0x350658(0x1d6)),_0x3d068b),child_process[_0x350658(0x1a7)](_0x350658(0x1be),{'cwd':_0x3d068b});!fs['existsSync'](_0x19ecb3+_0x350658(0x1cf))&&(console[_0x350658(0x193)](chalk[_0x350658(0x197)]('Warning:\x20当前应用未安装依赖!即将执行依赖安装命令,请稍等!')),console[_0x350658(0x193)](chalk[_0x350658(0x1c8)](_0x350658(0x1aa)),_0x19ecb3),child_process[_0x350658(0x1a7)](_0x350658(0x18b),{'cwd':_0x19ecb3}),console[_0x350658(0x193)](chalk[_0x350658(0x1b4)](_0x350658(0x1c6))));console['log'](_0x350658(0x1ae)+_0x1c7421+_0x350658(0x1cb)),console[_0x350658(0x193)](chalk['blue'](_0x350658(0x191)+_0x1c7421),_0x19ecb3),child_process[_0x350658(0x1a7)](_0x350658(0x1c9)+_0x1c7421,{'cwd':_0x19ecb3,'maxBuffer':0x3b9aca00}),console[_0x350658(0x193)](chalk['green'](_0x350658(0x198)));if(fs[_0x350658(0x1af)](_0x3a5b5b)){const _0x473900=_0x2153ca[_0x350658(0x1a2)],_0x293e6b=fs[_0x350658(0x195)](_0x3a5b5b+_0x350658(0x1cc));_0x5cf0a7['includes'](_0x350658(0x19a))?fs[_0x350658(0x1d0)](_0x3a5b5b+_0x350658(0x1cc),_0x293e6b,_0x350658(0x1ba)):fs[_0x350658(0x1d0)](_0x3a5b5b+'/'+_0x473900+_0x350658(0x19c),_0x293e6b,_0x350658(0x1ba));const _0x33df1d=_0x3d068b+_0x350658(0x194);!fs['existsSync'](_0x33df1d)&&fs['mkdirSync'](_0x33df1d);const _0x27221e=_0x55ee79[_0x350658(0x1a0)]?_0x55ee79[_0x350658(0x1a0)]:_0x350658(0x187);console['log'](chalk[_0x350658(0x1c8)](_0x350658(0x1b5)+_0x27221e),_0x3d068b),child_process[_0x350658(0x1a7)](_0x350658(0x1ce)+_0x27221e,{'cwd':_0x3d068b});const _0x19fa32=_0x33df1d+'/'+_0x2153ca[_0x350658(0x1a2)];DeleteDirAllFile(_0x19fa32,()=>{const _0x10078b=_0x350658;fs[_0x10078b(0x1a9)](_0x19fa32),fs[_0x10078b(0x1d0)](_0x19fa32+_0x10078b(0x19c),_0x293e6b,'utf-8'),CopyFolder(_0x3a5b5b+'\x5c'+_0x2153ca[_0x10078b(0x1a2)],_0x19fa32,()=>{setTimeout(()=>{const _0x169f8e=a3_0x1224;console[_0x169f8e(0x193)](chalk[_0x169f8e(0x1c8)]('Sudo:\x20git\x20pull'),_0x3d068b),child_process['execSync'](_0x169f8e(0x1be),{'cwd':_0x3d068b}),console[_0x169f8e(0x193)](chalk[_0x169f8e(0x1c8)]('Sudo:\x20git\x20add\x20.'),_0x3d068b),child_process['execSync'](_0x169f8e(0x18c),{'cwd':_0x3d068b});try{console[_0x169f8e(0x193)](chalk[_0x169f8e(0x1c8)](_0x169f8e(0x1ab)+_0x457bd3+_0x169f8e(0x1a5)),_0x3d068b),child_process['execSync'](_0x169f8e(0x188)+_0x457bd3+_0x169f8e(0x1a5),{'cwd':_0x3d068b});}catch(_0x221ec0){console['log'](chalk[_0x169f8e(0x1d2)](_0x169f8e(0x1c7)+_0x221ec0[_0x169f8e(0x1d1)]));}console[_0x169f8e(0x193)](chalk['blue'](_0x169f8e(0x1c3)),_0x3d068b),child_process[_0x169f8e(0x1a7)]('git\x20push',{'cwd':_0x3d068b});},0x3e8);});});}else console['log'](chalk[_0x350658(0x1d2)]('Error:\x20未知错误,未找到“dist”目录!')),process[_0x350658(0x1d7)](0x0);}};
1
+ const a3_0x16dbf0=a3_0x4d70;function a3_0x55dd(){const _0x14b9d3=['utf-8','force','Error:\x20“jjb.config.json”中缺少“javaGitName”字段!','/index.html','\x22no\x20message\x22','/api/auth','Error:\x20命令参数传递错误!','Error:\x20“jjb.config.json”中缺少“javaGit”字段!','9528996JjJSsg','1wwpgOO','readFileSync','chalk',']\x20请稍等!','../.auth','Sudo:\x20yarn\x20build:','261246femyXC','path','git\x20add\x20.','12550LJGVdx','git\x20clone\x20','data','Sudo:\x20git\x20add\x20.','yarn\x20build:','Log:\x20应用打包完成!','post','log','join',']\x20未配置“javaGitBranch”,将使用默认分支“master”!','appIdentifier','forEach','git\x20pull','363208TldNtd','javaGit','git\x20checkout\x20','red','tmpdir','catch','execSync','environment','exports','unlinkSync','includes','Auth:\x20授权成功!','/node_modules','Error:\x20当前应用中不存在“jjb.config.json”文件!','Log:\x20即将进行应用打包\x20[Env#','javaGitBranch','index','existsSync','rmdirSync','exit','Error:\x20授权失败!','./config','679356OWhhvK','message','yarn','26295022XLJhAU','\x5cdist','Sudo:\x20git\x20clone\x20','blue','axios','10jeiPZh','11PZBZoU','Error:\x20未知错误,未找到“dist”目录!','mkdirSync','\x20--no-verify','Error:\x20','Log:\x20应用依赖安装完成!','2493pcIaLi','javaGitName','\x5cjjb.config.js','/start/src/main/resources/templates','child_process','327400AqmjEI','./tools','then','Sudo:\x20git\x20push','Sudo:\x20yarn','length','Sudo:\x20git\x20pull','Error:\x20请先登录!','yellow','6QbFkob','Auth:\x20正在获取授权!','split','git\x20push','green','writeFileSync','master','21pAHuJy','.html'];a3_0x55dd=function(){return _0x14b9d3;};return a3_0x55dd();}(function(_0x1ea635,_0x5718ed){const _0x46a690=a3_0x4d70,_0x4cf773=_0x1ea635();while(!![]){try{const _0x115839=-parseInt(_0x46a690(0x140))/0x1*(-parseInt(_0x46a690(0xfb))/0x2)+-parseInt(_0x46a690(0x12e))/0x3*(parseInt(_0x46a690(0x111))/0x4)+parseInt(_0x46a690(0x119))/0x5*(-parseInt(_0x46a690(0x146))/0x6)+parseInt(_0x46a690(0x135))/0x7*(-parseInt(_0x46a690(0x125))/0x8)+-parseInt(_0x46a690(0x120))/0x9*(parseInt(_0x46a690(0x149))/0xa)+parseInt(_0x46a690(0x11a))/0xb*(-parseInt(_0x46a690(0x13f))/0xc)+parseInt(_0x46a690(0x114))/0xd;if(_0x115839===_0x5718ed)break;else _0x4cf773['push'](_0x4cf773['shift']());}catch(_0x1e27e2){_0x4cf773['push'](_0x4cf773['shift']());}}}(a3_0x55dd,0x7d415));function a3_0x4d70(_0x4277a8,_0xe2ebd9){const _0x55dd68=a3_0x55dd();return a3_0x4d70=function(_0x4d7008,_0x5146ba){_0x4d7008=_0x4d7008-0xf9;let _0x36d2ed=_0x55dd68[_0x4d7008];return _0x36d2ed;},a3_0x4d70(_0x4277a8,_0xe2ebd9);}const fs=require('fs'),os=require('os'),path=require(a3_0x16dbf0(0x147)),child_process=require(a3_0x16dbf0(0x124)),chalk=require(a3_0x16dbf0(0x142)),{CopyFolder,DeleteDirAllFile}=require(a3_0x16dbf0(0x126)),{GIT_TEMP_JAVA,getApiHost}=require(a3_0x16dbf0(0x110)),axios=require(a3_0x16dbf0(0x118));function deleteFolderRecursive(_0x43d328){const _0x3cb26d=a3_0x16dbf0;fs[_0x3cb26d(0x10c)](_0x43d328)&&(fs['readdirSync'](_0x43d328)[_0x3cb26d(0xf9)](_0x16192f=>{const _0x13ca55=_0x3cb26d,_0x1fa335=path[_0x13ca55(0x151)](_0x43d328,_0x16192f);fs['lstatSync'](_0x1fa335)['isDirectory']()?deleteFolderRecursive(_0x1fa335):fs[_0x13ca55(0x104)](_0x1fa335);}),fs[_0x3cb26d(0x10d)](_0x43d328));}module[a3_0x16dbf0(0x103)]=arguments=>{const _0x2f8e76=a3_0x16dbf0,_0x56019f=path['join'](__dirname,_0x2f8e76(0x144));!fs['existsSync'](_0x56019f)&&(console[_0x2f8e76(0x150)](chalk[_0x2f8e76(0xfe)](_0x2f8e76(0x12c))),process[_0x2f8e76(0x10e)](0x0));const _0x30ef15=arguments[0x1],_0xd1851f=arguments[0x2]||_0x2f8e76(0x13b),_0x1e99f2=arguments[0x3]?arguments[0x3][_0x2f8e76(0x130)]('-'):[],_0x3f86d0=path['resolve']('./'),_0x25e28d=_0x3f86d0+_0x2f8e76(0x122),_0x361c9d=_0x3f86d0+_0x2f8e76(0x115),_0x18c8ad=os[_0x2f8e76(0xff)](),[_0x6b489a,_0x2f6af1]=fs[_0x2f8e76(0x141)](_0x56019f)['toString']()[_0x2f8e76(0x130)]('/');console[_0x2f8e76(0x150)](_0x2f8e76(0x12f)),axios[_0x2f8e76(0x14f)](getApiHost()+_0x2f8e76(0x13c),{'username':_0x6b489a,'password':_0x2f6af1})[_0x2f8e76(0x127)](_0x1219f8=>{const _0x447014=_0x2f8e76;if(_0x1219f8[_0x447014(0x14b)]['status']){console[_0x447014(0x150)](chalk[_0x447014(0x132)](_0x447014(0x106)));if(!fs[_0x447014(0x10c)](_0x25e28d))console[_0x447014(0x150)](chalk[_0x447014(0xfe)](_0x447014(0x108))),process[_0x447014(0x10e)](0x0);else{const _0x2874b0=require(_0x25e28d);!_0x2874b0[_0x447014(0xfc)]&&(console['log'](chalk[_0x447014(0xfe)](_0x447014(0x13e))),process[_0x447014(0x10e)](0x0));!_0x2874b0['javaGitName']&&(console[_0x447014(0x150)](chalk[_0x447014(0xfe)](_0x447014(0x139))),process[_0x447014(0x10e)](0x0));const _0x570b3c=_0x18c8ad+'/'+GIT_TEMP_JAVA;fs[_0x447014(0x10c)](_0x570b3c)&&deleteFolderRecursive(_0x570b3c);fs[_0x447014(0x11c)](_0x570b3c);const _0x57b5e2=_0x570b3c+'/'+_0x2874b0['javaGitName'];fs[_0x447014(0x10c)](_0x57b5e2)?_0x1e99f2[_0x447014(0x105)](_0x447014(0x138))?DeleteDirAllFile(_0x57b5e2,()=>{const _0x115418=_0x447014;console[_0x115418(0x150)](chalk[_0x115418(0x117)]('Sudo:\x20git\x20clone\x20'+_0x2874b0[_0x115418(0xfc)]),_0x570b3c),child_process[_0x115418(0x101)](_0x115418(0x14a)+_0x2874b0['javaGit'],{'cwd':_0x570b3c});}):(console['log'](chalk[_0x447014(0x117)]('Sudo:\x20git\x20clone\x20'+_0x2874b0[_0x447014(0xfc)]),_0x570b3c),child_process[_0x447014(0x101)]('git\x20clone\x20'+_0x2874b0[_0x447014(0xfc)],{'cwd':_0x570b3c})):(console['log'](chalk[_0x447014(0x117)](_0x447014(0x116)+_0x2874b0[_0x447014(0xfc)]),_0x570b3c),child_process[_0x447014(0x101)](_0x447014(0x14a)+_0x2874b0['javaGit'],{'cwd':_0x570b3c})),_0xe400ca(_0x570b3c,_0x2874b0);}}else console[_0x447014(0x150)](chalk[_0x447014(0xfe)](_0x447014(0x10f))),process[_0x447014(0x10e)](0x0);})[_0x2f8e76(0x100)](_0xae9900=>{const _0x3193af=_0x2f8e76;console[_0x3193af(0x150)](chalk[_0x3193af(0xfe)]('Error:\x20授权失败,未知错误!'),_0xae9900[_0x3193af(0x112)]),process[_0x3193af(0x10e)](0x0);});arguments[_0x2f8e76(0x12a)]<0x2&&(console['log'](chalk[_0x2f8e76(0xfe)](_0x2f8e76(0x13d))),process['exit'](0x0));function _0xe400ca(_0x188cdd,_0xc2f5fe){const _0xd3e3c5=_0x2f8e76,_0x443566=_0xc2f5fe[_0xd3e3c5(0x102)][_0x30ef15],_0x18b019=_0x188cdd+'/'+_0xc2f5fe[_0xd3e3c5(0x121)];!_0x443566[_0xd3e3c5(0x10a)]&&console[_0xd3e3c5(0x150)](chalk[_0xd3e3c5(0x12d)]('Warning:\x20当前打包\x20[Env#'+_0x30ef15+_0xd3e3c5(0x152)));console[_0xd3e3c5(0x150)](chalk[_0xd3e3c5(0x117)](_0xd3e3c5(0x12b)),_0x18b019),child_process[_0xd3e3c5(0x101)]('git\x20pull',{'cwd':_0x18b019});!fs[_0xd3e3c5(0x10c)](_0x3f86d0+_0xd3e3c5(0x107))&&(console[_0xd3e3c5(0x150)](chalk[_0xd3e3c5(0x12d)]('Warning:\x20当前应用未安装依赖!即将执行依赖安装命令,请稍等!')),console[_0xd3e3c5(0x150)](chalk[_0xd3e3c5(0x117)](_0xd3e3c5(0x129)),_0x3f86d0),child_process['execSync'](_0xd3e3c5(0x113),{'cwd':_0x3f86d0}),console[_0xd3e3c5(0x150)](chalk[_0xd3e3c5(0x132)](_0xd3e3c5(0x11f))));console['log'](_0xd3e3c5(0x109)+_0x30ef15+_0xd3e3c5(0x143)),console[_0xd3e3c5(0x150)](chalk[_0xd3e3c5(0x117)](_0xd3e3c5(0x145)+_0x30ef15),_0x3f86d0),child_process[_0xd3e3c5(0x101)](_0xd3e3c5(0x14d)+_0x30ef15,{'cwd':_0x3f86d0,'maxBuffer':0x3b9aca00}),console['log'](chalk[_0xd3e3c5(0x132)](_0xd3e3c5(0x14e)));if(fs[_0xd3e3c5(0x10c)](_0x361c9d)){const _0x1a9699=_0xc2f5fe[_0xd3e3c5(0x153)],_0x114374=fs[_0xd3e3c5(0x141)](_0x361c9d+_0xd3e3c5(0x13a));_0x1e99f2['includes'](_0xd3e3c5(0x10b))?fs[_0xd3e3c5(0x133)](_0x361c9d+'/index.html',_0x114374,_0xd3e3c5(0x137)):fs['writeFileSync'](_0x361c9d+'/'+_0x1a9699+_0xd3e3c5(0x136),_0x114374,'utf-8');const _0x2d92f7=_0x18b019+_0xd3e3c5(0x123);!fs[_0xd3e3c5(0x10c)](_0x2d92f7)&&fs['mkdirSync'](_0x2d92f7);const _0x99507d=_0x443566['javaGitBranch']?_0x443566[_0xd3e3c5(0x10a)]:_0xd3e3c5(0x134);console[_0xd3e3c5(0x150)](chalk['blue']('Sudo:\x20git\x20checkout\x20'+_0x99507d),_0x18b019),child_process[_0xd3e3c5(0x101)](_0xd3e3c5(0xfd)+_0x99507d,{'cwd':_0x18b019});const _0x3107ea=_0x2d92f7+'/'+_0xc2f5fe[_0xd3e3c5(0x153)];DeleteDirAllFile(_0x3107ea,()=>{const _0x3748d2=_0xd3e3c5;fs[_0x3748d2(0x11c)](_0x3107ea),fs[_0x3748d2(0x133)](_0x3107ea+'.html',_0x114374,_0x3748d2(0x137)),CopyFolder(_0x361c9d+'\x5c'+_0xc2f5fe['appIdentifier'],_0x3107ea,()=>{setTimeout(()=>{const _0x24dd29=a3_0x4d70;console[_0x24dd29(0x150)](chalk[_0x24dd29(0x117)]('Sudo:\x20git\x20pull'),_0x18b019),child_process[_0x24dd29(0x101)](_0x24dd29(0xfa),{'cwd':_0x18b019}),console[_0x24dd29(0x150)](chalk[_0x24dd29(0x117)](_0x24dd29(0x14c)),_0x18b019),child_process[_0x24dd29(0x101)](_0x24dd29(0x148),{'cwd':_0x18b019});try{console[_0x24dd29(0x150)](chalk['blue']('Sudo:\x20git\x20commit\x20-m\x20'+_0xd1851f+_0x24dd29(0x11d)),_0x18b019),child_process[_0x24dd29(0x101)]('git\x20commit\x20-m\x20'+_0xd1851f+'\x20--no-verify',{'cwd':_0x18b019});}catch(_0x24891e){console[_0x24dd29(0x150)](chalk['red'](_0x24dd29(0x11e)+_0x24891e[_0x24dd29(0x112)]));}console[_0x24dd29(0x150)](chalk[_0x24dd29(0x117)](_0x24dd29(0x128)),_0x18b019),child_process[_0x24dd29(0x101)](_0x24dd29(0x131),{'cwd':_0x18b019});},0x3e8);});});}else console['log'](chalk['red'](_0xd3e3c5(0x11b))),process[_0xd3e3c5(0x10e)](0x0);}};
package/src/rm-rf.js CHANGED
@@ -1 +1 @@
1
- const a4_0x520f46=a4_0x3723;function a4_0x3d6b(){const _0x54a572=['statSync','7IRJLDZ','161289RQUHDZ','existsSync','正在计算项目数,请稍等...','length','44szxqIr','exit','clear','删除完成。','7568104enEYNx','trim','36225xkOoay','210MNGhWT','102qSBIGz','readdirSync','删除文件夹:','取消删除。','498349AcbSCZ','无效操作。','unlinkSync','question','resolve','stdin','log','删除异常:','readline','1431498NtgDJW','是否确认删除?删除后不可恢复![y/n]:','删除文件:','7716696JSkSTD','5mRUYmA','1858872KmroHb','path','exports'];a4_0x3d6b=function(){return _0x54a572;};return a4_0x3d6b();}function a4_0x3723(_0x1ed478,_0xd3739c){const _0x3d6b76=a4_0x3d6b();return a4_0x3723=function(_0x372355,_0xb8733){_0x372355=_0x372355-0x1b6;let _0x5a4219=_0x3d6b76[_0x372355];return _0x5a4219;},a4_0x3723(_0x1ed478,_0xd3739c);}(function(_0x53148e,_0x18860e){const _0xdbe28d=a4_0x3723,_0x57e269=_0x53148e();while(!![]){try{const _0x3a690a=-parseInt(_0xdbe28d(0x1c0))/0x1+-parseInt(_0xdbe28d(0x1bc))/0x2*(parseInt(_0xdbe28d(0x1ba))/0x3)+-parseInt(_0xdbe28d(0x1ce))/0x4+parseInt(_0xdbe28d(0x1cd))/0x5*(parseInt(_0xdbe28d(0x1c9))/0x6)+parseInt(_0xdbe28d(0x1d2))/0x7*(-parseInt(_0xdbe28d(0x1b8))/0x8)+parseInt(_0xdbe28d(0x1d3))/0x9*(parseInt(_0xdbe28d(0x1bb))/0xa)+parseInt(_0xdbe28d(0x1d7))/0xb*(parseInt(_0xdbe28d(0x1cc))/0xc);if(_0x3a690a===_0x18860e)break;else _0x57e269['push'](_0x57e269['shift']());}catch(_0x148097){_0x57e269['push'](_0x57e269['shift']());}}}(a4_0x3d6b,0xa1aeb));const fs=require('fs'),path=require(a4_0x520f46(0x1cf)),readline=require(a4_0x520f46(0x1c8)),io=readline['createInterface']({'input':process[a4_0x520f46(0x1c5)],'output':process['stdout']});module[a4_0x520f46(0x1d0)]=function(){const _0x496441=a4_0x520f46,_0x38d9e4=path[_0x496441(0x1c4)]('./');io[_0x496441(0x1c3)](_0x496441(0x1ca),function(_0x1f37f2){const _0x39a191=_0x496441;if(_0x1f37f2[_0x39a191(0x1b9)]()==='y')console[_0x39a191(0x1c6)](_0x39a191(0x1d5)),setTimeout(()=>{setTimeout(()=>{const _0x347437=a4_0x3723;console[_0x347437(0x1b6)](),exec(_0x38d9e4),setTimeout(()=>{const _0x21382a=_0x347437;console[_0x21382a(0x1c6)](_0x21382a(0x1b7)),console[_0x21382a(0x1b6)](),process[_0x21382a(0x1d8)](0x0);},0x1f4);},0x1f4);},0x1f4);else _0x1f37f2[_0x39a191(0x1b9)]()==='n'?(console['log'](_0x39a191(0x1bf)),process['exit'](0x0)):(console[_0x39a191(0x1c6)](_0x39a191(0x1c1)),process['exit'](0x0));});};function exec(_0xfc4ec7){const _0x11e6e3=a4_0x520f46;if(fs[_0x11e6e3(0x1d4)](_0xfc4ec7)){const _0x3acd94=fs[_0x11e6e3(0x1bd)](_0xfc4ec7);for(let _0x1d65cb=0x0;_0x1d65cb<_0x3acd94[_0x11e6e3(0x1d6)];_0x1d65cb++){const _0x3c9a55=_0x3acd94[_0x1d65cb],_0x14a3e5=_0xfc4ec7+'/'+_0x3c9a55;try{fs[_0x11e6e3(0x1d1)](_0x14a3e5)['isDirectory']()?(exec(_0x14a3e5),fs['rmdirSync'](_0x14a3e5,{'recursive':!![]}),console[_0x11e6e3(0x1c6)](_0x11e6e3(0x1be)+_0x14a3e5)):(fs[_0x11e6e3(0x1c2)](_0x14a3e5),console[_0x11e6e3(0x1c6)](_0x11e6e3(0x1cb)+_0x14a3e5));}catch(_0x217670){console['log'](_0x11e6e3(0x1c7)+_0x14a3e5);}}}}
1
+ const a4_0x28d55c=a4_0x5851;function a4_0x5851(_0x38d6f5,_0xcc569){const _0x3cf07f=a4_0x3cf0();return a4_0x5851=function(_0x5851bd,_0x37744c){_0x5851bd=_0x5851bd-0x136;let _0x369328=_0x3cf07f[_0x5851bd];return _0x369328;},a4_0x5851(_0x38d6f5,_0xcc569);}function a4_0x3cf0(){const _0x5ee67b=['statSync','readdirSync','正在计算项目数,请稍等...','path','question','4014agLEcO','trim','unlinkSync','336VvZuRy','480700YjBWtK','10jekYOa','existsSync','1853736uVaEEH','删除完成。','log','9wLwjoE','134678taEkYY','stdin','删除文件:','createInterface','exit','删除文件夹:','5824510WArnot','无效操作。','exports','11YjhsWV','resolve','6312624XmxWMh','25912zfFEnl','5579hiWjXM','clear','length'];a4_0x3cf0=function(){return _0x5ee67b;};return a4_0x3cf0();}(function(_0x9f1b8b,_0x350108){const _0xf1f879=a4_0x5851,_0x5b52e3=_0x9f1b8b();while(!![]){try{const _0x2b889f=-parseInt(_0xf1f879(0x13c))/0x1*(parseInt(_0xf1f879(0x142))/0x2)+parseInt(_0xf1f879(0x13a))/0x3*(-parseInt(_0xf1f879(0x14e))/0x4)+-parseInt(_0xf1f879(0x13b))/0x5+parseInt(_0xf1f879(0x137))/0x6*(parseInt(_0xf1f879(0x14f))/0x7)+-parseInt(_0xf1f879(0x13e))/0x8*(-parseInt(_0xf1f879(0x141))/0x9)+-parseInt(_0xf1f879(0x148))/0xa*(-parseInt(_0xf1f879(0x14b))/0xb)+parseInt(_0xf1f879(0x14d))/0xc;if(_0x2b889f===_0x350108)break;else _0x5b52e3['push'](_0x5b52e3['shift']());}catch(_0xeb6a79){_0x5b52e3['push'](_0x5b52e3['shift']());}}}(a4_0x3cf0,0x5c5eb));const fs=require('fs'),path=require(a4_0x28d55c(0x155)),readline=require('readline'),io=readline[a4_0x28d55c(0x145)]({'input':process[a4_0x28d55c(0x143)],'output':process['stdout']});module[a4_0x28d55c(0x14a)]=function(){const _0x231f8c=a4_0x28d55c,_0x2d12d0=path[_0x231f8c(0x14c)]('./');io[_0x231f8c(0x136)]('是否确认删除?删除后不可恢复![y/n]:',function(_0x4c22e4){const _0x5ad31f=_0x231f8c;if(_0x4c22e4[_0x5ad31f(0x138)]()==='y')console[_0x5ad31f(0x140)](_0x5ad31f(0x154)),setTimeout(()=>{setTimeout(()=>{const _0x415487=a4_0x5851;console[_0x415487(0x150)](),exec(_0x2d12d0),setTimeout(()=>{const _0x146ab1=_0x415487;console[_0x146ab1(0x140)](_0x146ab1(0x13f)),console[_0x146ab1(0x150)](),process['exit'](0x0);},0x1f4);},0x1f4);},0x1f4);else _0x4c22e4['trim']()==='n'?(console[_0x5ad31f(0x140)]('取消删除。'),process[_0x5ad31f(0x146)](0x0)):(console[_0x5ad31f(0x140)](_0x5ad31f(0x149)),process[_0x5ad31f(0x146)](0x0));});};function exec(_0x342654){const _0x2bf997=a4_0x28d55c;if(fs[_0x2bf997(0x13d)](_0x342654)){const _0x4c2ccf=fs[_0x2bf997(0x153)](_0x342654);for(let _0x15a71c=0x0;_0x15a71c<_0x4c2ccf[_0x2bf997(0x151)];_0x15a71c++){const _0x147b17=_0x4c2ccf[_0x15a71c],_0x5807bd=_0x342654+'/'+_0x147b17;try{fs[_0x2bf997(0x152)](_0x5807bd)['isDirectory']()?(exec(_0x5807bd),fs['rmdirSync'](_0x5807bd,{'recursive':!![]}),console[_0x2bf997(0x140)](_0x2bf997(0x147)+_0x5807bd)):(fs[_0x2bf997(0x139)](_0x5807bd),console[_0x2bf997(0x140)](_0x2bf997(0x144)+_0x5807bd));}catch(_0x412bba){console['log']('删除异常:'+_0x5807bd);}}}}
package/src/tools.js CHANGED
@@ -1 +1 @@
1
- const a5_0x306398=a5_0x13cc;function a5_0x13cc(_0x59af6c,_0x1b33c8){const _0x4ba473=a5_0x4ba4();return a5_0x13cc=function(_0x13cc40,_0x4ce212){_0x13cc40=_0x13cc40-0x109;let _0x5e7883=_0x4ba473[_0x13cc40];return _0x5e7883;},a5_0x13cc(_0x59af6c,_0x1b33c8);}function a5_0x4ba4(){const _0x4ceebf=['DeepScanner','stat','uniapp','writeFileSync','statSync','jjb-common','/api/v4/projects/','write\x20error','&ref=master','\x22,\x22main\x22:\x20\x22index.js\x22}','map','jjb-common-lib','installTarget','dependencies','【Error】:[jjb.config.json]文件配置无效,需要installTarget属性。','existsSync','name','react-admin-component','67291qoGzdh','6218575hYWcHG','.zip','【Error】:[jjb.config.json.installResources]类型是一个Array<string>。','rmdirSync','265361XGACHz','/repository/archive.zip?private_token=','【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>。','node_modules','log','read\x20error','2940696AkPITt','multi','【Error】:[jjb.config.json.installTarget]类型是一个string。','readFileSync','path','4iPDPsM','【Error】:[jjb.config.json]文件配置无效,需要projectType属性。','f_update_project_package_json','error','18117084IyfDwP','2SQVLNQ','11WifbPk','token','【Error】:[jjb.config.json.projectType]配置无效,有效值<multi\x20|\x20spa\x20|\x20micro-spa\x20|\x20uniapp>。','isArray','DeleteDirAllFile','\x5cpackage.json','isDirectory','{\x22name\x22:\x22','mkdirSync','string','projectType','1798206jbuQEH','pipe','tmpdir','2005191iqfweX','CopyFolder','CopyFile','push','spa','length','【Error】:[jjb.config.json]文件配置无效,需要installResources属性。','【Error】:[jjb.config.json.node_modules]配置无效,有效值<node_modules\x20|\x20src>。','unlinkSync','readdirSync','_zip','parse','exit','20Cteaef','join','createWriteStream','\x5cjjb.config.json','\x22,\x22version\x22:\x22','f_pull_git_repository','584rIsPAK','vue-unisass-component','includes','f_rm_rf','【Error】:[jjb.config.json.installResources]无资源。','f_file_copy','forEach','jjb-common-decorator','createReadStream','f_resolve_install_resources','filter','installResources','toString','f_content_replace','CreatePaths','readdir'];a5_0x4ba4=function(){return _0x4ceebf;};return a5_0x4ba4();}(function(_0xd2395f,_0x3f670a){const _0xf02d05=a5_0x13cc,_0x300a72=_0xd2395f();while(!![]){try{const _0x4fc942=-parseInt(_0xf02d05(0x115))/0x1*(parseInt(_0xf02d05(0x125))/0x2)+-parseInt(_0xf02d05(0x11b))/0x3+parseInt(_0xf02d05(0x120))/0x4*(parseInt(_0xf02d05(0x111))/0x5)+parseInt(_0xf02d05(0x131))/0x6+-parseInt(_0xf02d05(0x110))/0x7*(parseInt(_0xf02d05(0x147))/0x8)+-parseInt(_0xf02d05(0x134))/0x9*(parseInt(_0xf02d05(0x141))/0xa)+-parseInt(_0xf02d05(0x126))/0xb*(-parseInt(_0xf02d05(0x124))/0xc);if(_0x4fc942===_0x3f670a)break;else _0x300a72['push'](_0x300a72['shift']());}catch(_0xef660){_0x300a72['push'](_0x300a72['shift']());}}}(a5_0x4ba4,0xa1309));const fs=require('fs'),os=require('os'),path=require(a5_0x306398(0x11f)),{GIT_HOST,GIT_TEMP_DIR,CLOUD_PROJECT}=require('./config');exports[a5_0x306398(0x14a)]=function(_0x4a26ee){const _0x47bc0b=a5_0x306398;if(fs[_0x47bc0b(0x10d)](_0x4a26ee)){const _0x36dd9d=fs[_0x47bc0b(0x13d)](_0x4a26ee);for(let _0x9279b4=0x0;_0x9279b4<_0x36dd9d['length'];_0x9279b4++){const _0x480e4e=_0x36dd9d[_0x9279b4],_0x3511c5=_0x4a26ee+'/'+_0x480e4e;fs[_0x47bc0b(0x15b)](_0x3511c5)[_0x47bc0b(0x12c)]()?(exports['f_rm_rf'](_0x3511c5),fs[_0x47bc0b(0x114)](_0x3511c5)):fs[_0x47bc0b(0x13c)](_0x3511c5);}}},exports[a5_0x306398(0x146)]=function(_0x1095eb=[]){return _0x1095eb['map'](_0x4a5111=>{const _0x30647d=a5_0x13cc,_0x4ede9d=CLOUD_PROJECT[_0x4a5111[_0x30647d(0x10e)]]||undefined,_0x110454=os[_0x30647d(0x133)]();return{'path':_0x110454+'\x5c'+GIT_TEMP_DIR+'\x5c'+_0x4a5111[_0x30647d(0x10e)]+_0x30647d(0x112),'compress':_0x110454+'\x5c'+GIT_TEMP_DIR+'\x5c'+_0x4a5111[_0x30647d(0x10e)]+_0x30647d(0x13e),'repository':GIT_HOST+_0x30647d(0x15d)+_0x4ede9d['projectId']+_0x30647d(0x116)+_0x4ede9d[_0x30647d(0x127)]+_0x30647d(0x15f)};});},exports['f_scan_jjb_config_json']=function(_0x35ea72){const _0x5b0118=a5_0x306398;return fs[_0x5b0118(0x10d)](_0x35ea72+_0x5b0118(0x144));},exports['f_scan_jjb_config_json_rules']=function(_0x304d4c){const _0x4d20cf=a5_0x306398;let _0x4d836d={};try{_0x4d836d=JSON['parse'](fs[_0x4d20cf(0x11e)](_0x304d4c+'\x5cjjb.config.json')[_0x4d20cf(0x153)]());}catch(_0x583fff){console[_0x4d20cf(0x119)]('【Error】:[jjb.config.json]文件解析失败,请确认是否配置正确。'),process['exit'](0x0);}!(_0x4d20cf(0x130)in _0x4d836d)&&(console[_0x4d20cf(0x119)](_0x4d20cf(0x121)),process[_0x4d20cf(0x140)](0x0));!('installTarget'in _0x4d836d)&&(console[_0x4d20cf(0x119)](_0x4d20cf(0x10c)),process['exit'](0x0));!(_0x4d20cf(0x152)in _0x4d836d)&&(console[_0x4d20cf(0x119)](_0x4d20cf(0x13a)),process[_0x4d20cf(0x140)](0x0));typeof _0x4d836d['projectType']!==_0x4d20cf(0x12f)&&(console['log']('【Error】:[jjb.config.json.projectType]类型是一个string。'),process[_0x4d20cf(0x140)](0x0));![_0x4d20cf(0x11c),_0x4d20cf(0x138),_0x4d20cf(0x159),'micro-spa'][_0x4d20cf(0x149)](_0x4d836d[_0x4d20cf(0x130)])&&(console[_0x4d20cf(0x119)](_0x4d20cf(0x128)),process['exit'](0x0));typeof _0x4d836d[_0x4d20cf(0x10a)]!=='string'&&(console['log'](_0x4d20cf(0x11d)),process[_0x4d20cf(0x140)](0x0));![_0x4d20cf(0x118),'src'][_0x4d20cf(0x149)](_0x4d836d[_0x4d20cf(0x10a)])&&(console['log'](_0x4d20cf(0x13b)),process[_0x4d20cf(0x140)](0x0));!Array[_0x4d20cf(0x129)](_0x4d836d[_0x4d20cf(0x152)])&&(console[_0x4d20cf(0x119)](_0x4d20cf(0x113)),process['exit'](0x0));_0x4d836d[_0x4d20cf(0x152)][_0x4d20cf(0x139)]===0x0&&(console[_0x4d20cf(0x119)](_0x4d20cf(0x14b)),process[_0x4d20cf(0x140)](0x0));const _0xec56fb=exports[_0x4d20cf(0x150)](_0x4d836d[_0x4d20cf(0x152)]);return _0xec56fb[_0x4d20cf(0x161)](_0x4fe76b=>_0x4fe76b[_0x4d20cf(0x10e)])[_0x4d20cf(0x151)](_0x2134d5=>![_0x4d20cf(0x15c),'jjb-dva-runtime',_0x4d20cf(0x109),_0x4d20cf(0x14e),_0x4d20cf(0x10f),_0x4d20cf(0x148)][_0x4d20cf(0x149)](_0x2134d5))[_0x4d20cf(0x139)]!==0x0&&(console['log'](_0x4d20cf(0x117)),process[_0x4d20cf(0x140)](0x0)),_0x4d836d['installResources']=_0xec56fb,_0x4d836d;},exports['f_create_package_json']=function(_0x31faa4,_0x5a930f,_0x2607fa){const _0x332e32=a5_0x306398;fs[_0x332e32(0x15a)](_0x31faa4+_0x332e32(0x12b),_0x332e32(0x12d)+_0x5a930f+_0x332e32(0x145)+_0x2607fa+_0x332e32(0x160));},exports[a5_0x306398(0x150)]=function(_0xb5120c=[]){const _0x123fba=[];return Array['isArray'](_0xb5120c)&&_0xb5120c['forEach'](_0x20b84c=>{const _0x5104d7=a5_0x13cc;if(Array[_0x5104d7(0x129)](_0x20b84c)){const [_0x487a5a,_0x36c0dd=[]]=_0x20b84c;_0x123fba[_0x5104d7(0x137)]({'name':_0x487a5a,'importList':_0x36c0dd});}else _0x123fba[_0x5104d7(0x137)]({'name':_0x20b84c,'importList':[]});}),_0x123fba;},exports[a5_0x306398(0x122)]=function(_0x5abad2,_0x23bd1a,_0x2551d6){const _0x76e96f=a5_0x306398,_0x5f84ce=JSON[_0x76e96f(0x13f)](fs[_0x76e96f(0x11e)](_0x5abad2)['toString']());_0x5f84ce[_0x76e96f(0x10b)][_0x23bd1a]=_0x2551d6,fs[_0x76e96f(0x15a)](_0x5abad2,JSON['stringify'](_0x5f84ce,null,0x2));},exports[a5_0x306398(0x14c)]=function(_0xc73a21,_0x3ab418){const _0x45df9a=a5_0x306398;fs['readdirSync'](_0xc73a21)[_0x45df9a(0x14d)](_0x361a12=>{const _0x3b4b1f=_0x45df9a,_0x5bf129=_0xc73a21+'\x5c'+_0x361a12,_0x27e106=_0x3ab418+'\x5c'+_0x361a12;fs[_0x3b4b1f(0x15b)](_0x5bf129)['isDirectory']()?(fs[_0x3b4b1f(0x12e)](_0x27e106),exports[_0x3b4b1f(0x14c)](_0x5bf129,_0x27e106)):fs[_0x3b4b1f(0x15a)](_0x27e106,fs[_0x3b4b1f(0x11e)](_0x5bf129)[_0x3b4b1f(0x153)]());});},exports[a5_0x306398(0x154)]=function(_0x5bb0e7=[],_0x6fe45){_0x5bb0e7['forEach'](_0x315692=>{const _0x2505ea=a5_0x13cc,_0x123d4f=_0x6fe45+_0x315692[_0x2505ea(0x11f)];if(fs[_0x2505ea(0x10d)](_0x123d4f)){let _0x56fc9c=fs[_0x2505ea(0x11e)](_0x123d4f)[_0x2505ea(0x153)]();_0x315692['replace'][_0x2505ea(0x14d)](_0x5c9f2b=>{_0x56fc9c=_0x56fc9c['replace'](_0x5c9f2b[0x0],_0x5c9f2b[0x1]);}),fs[_0x2505ea(0x15a)](_0x123d4f,_0x56fc9c);}});},exports[a5_0x306398(0x12a)]=(_0x40c583,_0x4c7ce9)=>{const _0x48e584=a5_0x306398;let _0x2bca9c=[];const _0x4b3357=this;fs[_0x48e584(0x10d)](_0x40c583)?(_0x2bca9c=fs[_0x48e584(0x13d)](_0x40c583),_0x2bca9c['forEach'](function(_0xac6e9b,_0x2c5168){const _0x467bdc=_0x48e584;let _0x56ced4=_0x40c583+'/'+_0xac6e9b;fs['statSync'](_0x56ced4)[_0x467bdc(0x12c)]()?_0x4b3357['DeleteDirAllFile'](_0x56ced4):fs[_0x467bdc(0x13c)](_0x56ced4);}),fs[_0x48e584(0x114)](_0x40c583),_0x4c7ce9&&_0x4c7ce9()):_0x4c7ce9&&_0x4c7ce9();},exports[a5_0x306398(0x135)]=(_0x47bd94,_0x545e02,_0x49647c)=>{const _0x1d01f6=a5_0x306398,_0x707d16=this;fs[_0x1d01f6(0x156)](_0x47bd94,function(_0x21ef4d,_0x20185f){let _0x1721e8=0x0;const _0x2d8b18=function(){const _0x5ad382=a5_0x13cc;++_0x1721e8===_0x20185f[_0x5ad382(0x139)]&&_0x49647c&&_0x49647c();};if(_0x21ef4d){_0x2d8b18();return;}_0x20185f['forEach'](function(_0x3ff2b7){const _0x506539=a5_0x13cc,_0x31c50c=path[_0x506539(0x142)](_0x47bd94,_0x3ff2b7),_0x42b3c9=path['join'](_0x545e02,_0x3ff2b7);fs[_0x506539(0x158)](_0x31c50c,function(_0x76609a,_0x44c28a){const _0x4fb974=_0x506539;_0x44c28a[_0x4fb974(0x12c)]()?fs['mkdir'](_0x42b3c9,function(_0x180ecd){const _0xb8a7d0=_0x4fb974;if(_0x180ecd){console[_0xb8a7d0(0x119)](_0x180ecd);return;}_0x707d16[_0xb8a7d0(0x135)](_0x31c50c,_0x42b3c9,_0x2d8b18);}):_0x707d16[_0x4fb974(0x136)](_0x31c50c,_0x42b3c9,_0x2d8b18);});}),_0x20185f['length']===0x0&&_0x49647c&&_0x49647c();});},exports[a5_0x306398(0x136)]=(_0x240104,_0x44d49c,_0x598f4f)=>{const _0x3779a7=a5_0x306398,_0x210536=fs[_0x3779a7(0x14f)](_0x240104);_0x210536['on']('error',function(_0x4052d6){const _0x27d59f=_0x3779a7;_0x4052d6&&console[_0x27d59f(0x119)](_0x27d59f(0x11a),_0x240104),_0x598f4f&&_0x598f4f(_0x4052d6);});const _0x281382=fs[_0x3779a7(0x143)](_0x44d49c);_0x281382['on'](_0x3779a7(0x123),function(_0x2aa92a){const _0x251115=_0x3779a7;_0x2aa92a&&console['log'](_0x251115(0x15e),_0x44d49c),_0x598f4f&&_0x598f4f(_0x2aa92a);}),_0x281382['on']('close',function(_0x46f16d){_0x598f4f&&_0x598f4f(_0x46f16d);}),_0x210536[_0x3779a7(0x132)](_0x281382);},exports['DeepScanner']=(_0x58388c,_0x210477)=>{const _0xc9ed58=a5_0x306398,_0x23ec74=this,_0x5b4f17=fs[_0xc9ed58(0x13d)](_0x58388c);_0x5b4f17[_0xc9ed58(0x14d)](_0x5f4e14=>{const _0x49f85f=_0xc9ed58,_0x25a47d=_0x58388c+'/'+_0x5f4e14,_0xd74242=fs[_0x49f85f(0x15b)](_0x25a47d);_0xd74242[_0x49f85f(0x12c)]()?_0x23ec74[_0x49f85f(0x157)](_0x25a47d,_0x210477):_0x210477[_0x49f85f(0x137)](_0x25a47d);});},exports[a5_0x306398(0x155)]=(_0x4c3868,_0x2f4d9c)=>{return new Promise(_0x361f45=>{const _0x4ca9db=a5_0x13cc,_0x38d816=[];_0x2f4d9c[_0x4ca9db(0x14d)]((_0x55bd85,_0x364669)=>{const _0x281a46=_0x4ca9db,_0x400de3=_0x4c3868+'/'+_0x38d816[_0x281a46(0x142)]('/')+'/'+_0x55bd85;try{const _0x2b4620=fs['statSync'](_0x400de3);_0x2b4620[_0x281a46(0x12c)]()?_0x364669===_0x2f4d9c[_0x281a46(0x139)]-0x1&&_0x361f45():(fs[_0x281a46(0x12e)](_0x400de3),_0x364669===_0x2f4d9c['length']-0x1&&_0x361f45());}catch(_0x14703d){fs[_0x281a46(0x12e)](_0x400de3),_0x364669===_0x2f4d9c[_0x281a46(0x139)]-0x1&&_0x361f45();}_0x38d816[_0x281a46(0x137)](_0x55bd85);});});};
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);});});};