jjb-cmd 2.2.12 → 2.2.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +2 -1
- package/src/new/cmd.auth/index.js +1 -1
- package/src/new/cmd.init/index.js +1 -1
- package/src/new/cmd.install/config.js +1 -1
- package/src/new/cmd.install/index.js +1 -1
- package/src/new/cmd.install/tools.js +1 -1
- package/src/new/cmd.install.app/index.js +1 -1
- package/src/new/cmd.jenkins/index.js +1 -1
- package/src/new/cmd.publish/index.js +1 -1
- package/src/new/cmd.push/index.js +1 -1
- package/src/new/cmd.push/java.js +1 -1
- package/src/new/cmd.push-set/index.js +1 -1
- package/src/new/cmd.refresh/index.js +1 -1
- package/src/new/cmd.reglist/index.js +1 -1
- package/src/new/cmd.rm-rf/index.js +1 -1
- package/src/new/cmd.version/index.js +1 -1
- package/src/old/cli.init.js +1 -1
- package/src/old/cli.install/config.js +1 -1
- package/src/old/cli.install/index.js +1 -1
- package/src/old/cli.install/tools.js +1 -1
- package/src/old/cli.merge.js +1 -1
- package/src/old/cli.pull.js +1 -1
- package/src/old/cli.pull2.js +1 -1
- package/src/old/cli.rm-rf.js +1 -1
- package/src/old/progress-bar.js +1 -1
- package/src/old/util.js +1 -1
- package/bin/command-old.js +0 -65
- package/bin/command.js +0 -185
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
const a13_0x16200a=a13_0xc451;(function(_0x4f0e60,_0x55c2a1){const _0x58d740=a13_0xc451,_0xb3b62e=_0x4f0e60();while(!![]){try{const _0x2d09e1=parseInt(_0x58d740(0x98))/0x1+-parseInt(_0x58d740(0x9a))/0x2*(parseInt(_0x58d740(0x86))/0x3)+parseInt(_0x58d740(0x9d))/0x4+-parseInt(_0x58d740(0x88))/0x5+-parseInt(_0x58d740(0x92))/0x6+parseInt(_0x58d740(0x90))/0x7+parseInt(_0x58d740(0x94))/0x8*(parseInt(_0x58d740(0x8b))/0x9);if(_0x2d09e1===_0x55c2a1)break;else _0xb3b62e['push'](_0xb3b62e['shift']());}catch(_0x4bfbb5){_0xb3b62e['push'](_0xb3b62e['shift']());}}}(a13_0x2278,0xc78ae));function a13_0x2278(){const _0x44cbf0=['5109228mwGbKy','6sibYzE','stdin','5836390SaHBpX','取消删除。','删除异常:','1098YYmWnD','unlinkSync','trim','readdirSync','删除文件:','2088373TYsvPn','isDirectory','9354438EQvDZt','是否确认删除?删除后不可恢复![y/n]:','87008xHDysz','rmdirSync','exit','删除文件夹:','1362601HLcFwr','正在计算项目数,请稍等...','721442OiSkHk','log','clear'];a13_0x2278=function(){return _0x44cbf0;};return a13_0x2278();}const fs=require('fs'),path=require('path'),readline=require('readline'),io=readline['createInterface']({'input':process[a13_0x16200a(0x87)],'output':process['stdout']});function a13_0xc451(_0x164c17,_0x594563){const _0x2278f2=a13_0x2278();return a13_0xc451=function(_0xc45163,_0x369c42){_0xc45163=_0xc45163-0x86;let _0x16c2f9=_0x2278f2[_0xc45163];return _0x16c2f9;},a13_0xc451(_0x164c17,_0x594563);}let f_total=0x0;module['exports']=function(){const _0x556963=a13_0x16200a,_0x7889d1=path['resolve']('./');io['question'](_0x556963(0x93),function(_0x50c0b4){const _0x22d792=_0x556963;if(_0x50c0b4[_0x22d792(0x8d)]()==='y')console[_0x22d792(0x9b)](_0x22d792(0x99)),setTimeout(()=>{setTimeout(()=>{const _0x351112=a13_0xc451;console[_0x351112(0x9c)](),exec(_0x7889d1),setTimeout(()=>{const _0x4e1639=_0x351112;console[_0x4e1639(0x9b)]('删除完成。'),console[_0x4e1639(0x9c)](),process['exit'](0x0);},0x1f4);},0x1f4);},0x1f4);else _0x50c0b4[_0x22d792(0x8d)]()==='n'?(console[_0x22d792(0x9b)](_0x22d792(0x89)),process[_0x22d792(0x96)](0x0)):(console[_0x22d792(0x9b)]('无效操作。'),process[_0x22d792(0x96)](0x0));});};function exec(_0x25f9ed){const _0x266ce1=a13_0x16200a;if(fs['existsSync'](_0x25f9ed)){const _0x11ba50=fs[_0x266ce1(0x8e)](_0x25f9ed);for(let _0x51236a=0x0;_0x51236a<_0x11ba50['length'];_0x51236a++){const _0x5050f9=_0x11ba50[_0x51236a],_0x9650b0=_0x25f9ed+'/'+_0x5050f9;try{fs['statSync'](_0x9650b0)[_0x266ce1(0x91)]()?(exec(_0x9650b0),fs[_0x266ce1(0x95)](_0x9650b0,{'recursive':!![]}),console[_0x266ce1(0x9b)](_0x266ce1(0x97)+_0x9650b0)):(fs[_0x266ce1(0x8c)](_0x9650b0),console[_0x266ce1(0x9b)](_0x266ce1(0x8f)+_0x9650b0));}catch(_0x537da5){console[_0x266ce1(0x9b)](_0x266ce1(0x8a)+_0x9650b0);}}}}
|
@@ -1 +1 @@
|
|
1
|
-
function
|
1
|
+
const a14_0x11dd7a=a14_0x22c4;function a14_0x4da7(){const _0x2d2c73=['then','4914990PwDQJo','6140130WKhwfE','1128CWzmeR','exit','4865WmAkAs','catch','50iJAAyQ','data','parse','5892iSejQw','../cmd.install/config','post','911880geEYMw','879NdMLCS','2427520eDlSGw','\x5cpackage.json','toString','/api/file/version','path','网络异常。','log','resolve','92088tNVBsA','查询失败!根目录缺少‘package.json’文件,无法完成查询。','message'];a14_0x4da7=function(){return _0x2d2c73;};return a14_0x4da7();}function a14_0x22c4(_0x3e052e,_0x5c90d8){const _0x4da798=a14_0x4da7();return a14_0x22c4=function(_0x22c4b0,_0x1dbc55){_0x22c4b0=_0x22c4b0-0x119;let _0x425d48=_0x4da798[_0x22c4b0];return _0x425d48;},a14_0x22c4(_0x3e052e,_0x5c90d8);}(function(_0x300581,_0x26d05a){const _0x27942e=a14_0x22c4,_0x5d9082=_0x300581();while(!![]){try{const _0x6db60=-parseInt(_0x27942e(0x128))/0x1*(parseInt(_0x27942e(0x11d))/0x2)+parseInt(_0x27942e(0x127))/0x3+-parseInt(_0x27942e(0x131))/0x4*(-parseInt(_0x27942e(0x121))/0x5)+parseInt(_0x27942e(0x124))/0x6*(parseInt(_0x27942e(0x11f))/0x7)+-parseInt(_0x27942e(0x129))/0x8+parseInt(_0x27942e(0x11b))/0x9+-parseInt(_0x27942e(0x11c))/0xa;if(_0x6db60===_0x26d05a)break;else _0x5d9082['push'](_0x5d9082['shift']());}catch(_0x44a034){_0x5d9082['push'](_0x5d9082['shift']());}}}(a14_0x4da7,0x55583));const path=require(a14_0x11dd7a(0x12d)),fs=require('fs'),axios=require('axios'),{getApiHost}=require(a14_0x11dd7a(0x125));module['exports']=()=>{const _0x3d054c=a14_0x11dd7a,_0x42a2e2=path[_0x3d054c(0x130)]('./'),_0x154598=_0x42a2e2+_0x3d054c(0x12a);if(fs['existsSync'](_0x154598)){const _0x209482=JSON[_0x3d054c(0x123)](fs['readFileSync'](_0x154598)[_0x3d054c(0x12b)]()),{name:_0x2e6810}=_0x209482;axios[_0x3d054c(0x126)](getApiHost()+_0x3d054c(0x12c),{'package_name':_0x2e6810})[_0x3d054c(0x11a)](_0x3e9979=>{const _0xfd917d=_0x3d054c;_0x3e9979[_0xfd917d(0x122)]['status']?console[_0xfd917d(0x12f)](_0x3e9979[_0xfd917d(0x122)][_0xfd917d(0x122)]):console[_0xfd917d(0x12f)](_0x3e9979[_0xfd917d(0x122)][_0xfd917d(0x119)]),process[_0xfd917d(0x11e)](0x0);})[_0x3d054c(0x120)](()=>{const _0x3402b7=_0x3d054c;console[_0x3402b7(0x12f)](_0x3402b7(0x12e)),process['exit'](0x0);});}else console[_0x3d054c(0x12f)](_0x3d054c(0x132)),process['exit'](0x0);};
|
package/src/old/cli.init.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
const
|
1
|
+
const a15_0x199a3d=a15_0xa87a;function a15_0x25e7(){const _0x1072e2=['path','exports','log','\x5ccli.init','exit','71185XTSvoJ','48wXLsnM','\x5cjjb.script','./cli.install/tools','101896XCnylg','269956mYuEGO','9mqBsKw','2370856kLLVKj','1177673ZKOxJs','\x5cwebstorm.config.js','readline','\x5cpackage.json','24IsyiJG','existsSync','7066LYnFaI','\x5cpublic','初始化失败,文件已存在!','1825400sDweCa'];a15_0x25e7=function(){return _0x1072e2;};return a15_0x25e7();}(function(_0x377fb9,_0x11c904){const _0xcd79b3=a15_0xa87a,_0x2f4b7e=_0x377fb9();while(!![]){try{const _0x53ea43=parseInt(_0xcd79b3(0x1d7))/0x1+parseInt(_0xcd79b3(0x1ca))/0x2*(-parseInt(_0xcd79b3(0x1c8))/0x3)+-parseInt(_0xcd79b3(0x1c1))/0x4+parseInt(_0xcd79b3(0x1d3))/0x5*(-parseInt(_0xcd79b3(0x1d4))/0x6)+parseInt(_0xcd79b3(0x1c4))/0x7+-parseInt(_0xcd79b3(0x1c3))/0x8*(-parseInt(_0xcd79b3(0x1c2))/0x9)+-parseInt(_0xcd79b3(0x1cd))/0xa;if(_0x53ea43===_0x11c904)break;else _0x2f4b7e['push'](_0x2f4b7e['shift']());}catch(_0x398cc3){_0x2f4b7e['push'](_0x2f4b7e['shift']());}}}(a15_0x25e7,0x2a8df));const path=require(a15_0x199a3d(0x1ce)),readline=require(a15_0x199a3d(0x1c6)),{f_file_copy}=require(a15_0x199a3d(0x1d6)),fs=require('fs');function a15_0xa87a(_0x4e9339,_0x3a92bd){const _0x25e782=a15_0x25e7();return a15_0xa87a=function(_0xa87afb,_0x4494c1){_0xa87afb=_0xa87afb-0x1c1;let _0x5d82cd=_0x25e782[_0xa87afb];return _0x5d82cd;},a15_0xa87a(_0x4e9339,_0x3a92bd);}module[a15_0x199a3d(0x1cf)]=()=>{const _0x14d299=a15_0x199a3d,_0x17032d=path['resolve']('./');!fs[_0x14d299(0x1c9)](_0x17032d+_0x14d299(0x1d5))&&!fs['existsSync'](_0x17032d+_0x14d299(0x1cb))&&!fs[_0x14d299(0x1c9)](_0x17032d+'\x5cjjb.config.json')&&!fs[_0x14d299(0x1c9)](_0x17032d+_0x14d299(0x1c7))&&!fs[_0x14d299(0x1c9)](_0x17032d+_0x14d299(0x1c5))?(f_file_copy(__dirname+_0x14d299(0x1d1),_0x17032d),console[_0x14d299(0x1d0)]('初始化完成!'),process[_0x14d299(0x1d2)](0x0)):(console[_0x14d299(0x1d0)](_0x14d299(0x1cc)),process[_0x14d299(0x1d2)](0x0));};
|
@@ -1 +1 @@
|
|
1
|
-
function
|
1
|
+
function a16_0x48eb(_0x510a2e,_0x91acc2){const _0x1b889c=a16_0x1b88();return a16_0x48eb=function(_0x48eba9,_0x344680){_0x48eba9=_0x48eba9-0x1c1;let _0x2af015=_0x1b889c[_0x48eba9];return _0x2af015;},a16_0x48eb(_0x510a2e,_0x91acc2);}const a16_0x4f44ee=a16_0x48eb;(function(_0x382cb8,_0x3a85d2){const _0x16dbc2=a16_0x48eb,_0xf27222=_0x382cb8();while(!![]){try{const _0x5f4c0d=-parseInt(_0x16dbc2(0x1ce))/0x1+parseInt(_0x16dbc2(0x1d5))/0x2*(-parseInt(_0x16dbc2(0x1f5))/0x3)+-parseInt(_0x16dbc2(0x1f7))/0x4*(-parseInt(_0x16dbc2(0x1de))/0x5)+parseInt(_0x16dbc2(0x1ca))/0x6+parseInt(_0x16dbc2(0x1e6))/0x7*(-parseInt(_0x16dbc2(0x1d1))/0x8)+parseInt(_0x16dbc2(0x1d3))/0x9+-parseInt(_0x16dbc2(0x1c4))/0xa;if(_0x5f4c0d===_0x3a85d2)break;else _0xf27222['push'](_0xf27222['shift']());}catch(_0x2ac6b3){_0xf27222['push'](_0xf27222['shift']());}}}(a16_0x1b88,0xc397b));const os=require('os');function a16_0x1b88(){const _0x2a9df2=['11760300uyfckH','const\x20relation\x20=\x20require(\x27~/enumerate/menu\x27).default;','CLOUD_PROJECT','COMPONENTS_CONTENT_REPLACE','\x5c..\x5ccli.dva.router.spa.txt','CLI_DVA_ROUTER_SPA','7812498NsfVhp','COMMON_CONTENT_NOR_REPLACE','tmpdir','return\x20process.env;','367162zDMEuH','jjbAssembly_','\x5cImageUploader\x5cindex.js','357464oBdbez','\x5cRouterContainer\x5ccomponents\x5cNavigationTab\x5cindex.js','10603872BgaHAZ','CLI_DVA_REGISTER_SPA','6BSVEiR','return\x20__planA();','common/crypto','gPSit8aJsLVmNzuQ5Cy4','COMMON_CONTENT_MICRO_REPLACE','http://192.168.1.242:10985','\x5c..\x5ccli.dva.register.saas.txt','components','\x5cRouterMenu\x5cindex.js','240hhybMp','jjb-common/crypto','G4HJRsHr9D7Ssmixegw2','jjb-common/color','COMMON_CONTENT_SPA_REPLACE','\x5cRouterContainer\x5cindex.js','\x5c..\x5ccli.dva.router.saas.txt','d4wQ7dzEjYPsgVbKnYei','7kUEAix','e9njpBd1nS_LREN8GFpR','\x5cdva\x5cautomatic\x5cregister.js','common/tools','\x5cEditor\x5cindex.js','return\x20process.env.app;','common/http','now','jjb-react-admin-component','\x5c..\x5ccli.dva.register.spa.txt','\x5cFileUploader\x5cindex.js','common/color','common/website','FT3pKzxpRynFkmddJ9Bs','\x5ctools\x5cindex.js','289077KRcHvS','\x5cdva\x5cautomatic\x5crouter.js','16484vhORdf','\x5cPageHeaderBar\x5cindex.js','jjb-common/tools','jjb-common/http','CLI_DVA_ROUTER_SAAS','hLqARY89CN6fUD3yg4NL'];a16_0x1b88=function(){return _0x2a9df2;};return a16_0x1b88();}exports['GIT_HOST']=a16_0x4f44ee(0x1da),exports['GIT_TEMP_DIR']=a16_0x4f44ee(0x1cf)+Date[a16_0x4f44ee(0x1ed)](),exports[a16_0x4f44ee(0x1c6)]={'common':{'token':a16_0x4f44ee(0x1e0),'projectId':0x117},'react-admin-component':{'token':a16_0x4f44ee(0x1f3),'projectId':0x154},'jjb-dva-runtime':{'token':a16_0x4f44ee(0x1c3),'projectId':0x23b},'jjb-common-lib':{'token':a16_0x4f44ee(0x1e7),'projectId':0x23c},'jjb-common-decorator':{'token':a16_0x4f44ee(0x1d8),'projectId':0x23e},'vue-unisass-component':{'token':a16_0x4f44ee(0x1e5),'projectId':0x153}},exports['TEMPLATE_FOLDER']=os[a16_0x4f44ee(0x1cc)]()+'\x5c'+exports['GIT_TEMP_DIR'],exports[a16_0x4f44ee(0x1c9)]=__dirname+a16_0x4f44ee(0x1c8),exports[a16_0x4f44ee(0x1c2)]=__dirname+a16_0x4f44ee(0x1e4),exports[a16_0x4f44ee(0x1d4)]=__dirname+a16_0x4f44ee(0x1ef),exports['CLI_DVA_REGISTER_SAAS']=__dirname+a16_0x4f44ee(0x1db),exports['CLI_DVA_ROUTER_PATH']=a16_0x4f44ee(0x1f6),exports['CLI_DVA_REGISTER_PATH']=a16_0x4f44ee(0x1e8),exports[a16_0x4f44ee(0x1cb)]=[{'path':a16_0x4f44ee(0x1f4),'replace':[[a16_0x4f44ee(0x1dc),a16_0x4f44ee(0x1ee)]]},{'path':'\x5cwebsite\x5cindex.js','replace':[[/const\srelation\s=\srequire\(`~\/application\/\${module.code}\/enumerate\/menu`\)\.default;/,a16_0x4f44ee(0x1c5)],['components',a16_0x4f44ee(0x1ee)]]}],exports[a16_0x4f44ee(0x1e2)]=[{'path':a16_0x4f44ee(0x1f4),'replace':[['return\x20__planA();',a16_0x4f44ee(0x1cd)]]}],exports[a16_0x4f44ee(0x1d9)]=[{'path':a16_0x4f44ee(0x1f4),'replace':[[a16_0x4f44ee(0x1d6),a16_0x4f44ee(0x1eb)]]}],exports[a16_0x4f44ee(0x1c7)]=[{'path':a16_0x4f44ee(0x1ea),'replace':[[a16_0x4f44ee(0x1ec),a16_0x4f44ee(0x1c1)],[a16_0x4f44ee(0x1d7),a16_0x4f44ee(0x1df)],[a16_0x4f44ee(0x1e9),a16_0x4f44ee(0x1f9)]]},{'path':'\x5cRejectText\x5cindex.js','replace':[[a16_0x4f44ee(0x1f1),'jjb-common/color']]},{'path':a16_0x4f44ee(0x1dd),'replace':[[a16_0x4f44ee(0x1e9),a16_0x4f44ee(0x1f9)]]},{'path':a16_0x4f44ee(0x1f0),'replace':[['common/http',a16_0x4f44ee(0x1c1)],[a16_0x4f44ee(0x1e9),a16_0x4f44ee(0x1f9)]]},{'path':'\x5cImageCropper\x5cindex.js','replace':[[a16_0x4f44ee(0x1ec),a16_0x4f44ee(0x1c1)],[a16_0x4f44ee(0x1e9),a16_0x4f44ee(0x1f9)]]},{'path':a16_0x4f44ee(0x1d0),'replace':[['common/http',a16_0x4f44ee(0x1c1)],['common/tools',a16_0x4f44ee(0x1f9)]]},{'path':a16_0x4f44ee(0x1f8),'replace':[[a16_0x4f44ee(0x1f1),a16_0x4f44ee(0x1e1)]]},{'path':a16_0x4f44ee(0x1e3),'replace':[[a16_0x4f44ee(0x1e9),a16_0x4f44ee(0x1f9)]]},{'path':a16_0x4f44ee(0x1d2),'replace':[[a16_0x4f44ee(0x1f2),'jjb-common/website'],[a16_0x4f44ee(0x1e9),'jjb-common/tools']]}];
|
@@ -1 +1 @@
|
|
1
|
-
const
|
1
|
+
const a17_0x554581=a17_0xf41d;function a17_0xf41d(_0x232993,_0x4e5586){const _0x4aa8a0=a17_0x4aa8();return a17_0xf41d=function(_0xf41dd8,_0x936b86){_0xf41dd8=_0xf41dd8-0x1c6;let _0x1e2784=_0x4aa8a0[_0xf41dd8];return _0x1e2784;},a17_0xf41d(_0x232993,_0x4e5586);}(function(_0x3e948f,_0x582e81){const _0x359a61=a17_0xf41d,_0x5aeaf6=_0x3e948f();while(!![]){try{const _0x144e90=-parseInt(_0x359a61(0x1e0))/0x1*(-parseInt(_0x359a61(0x1d9))/0x2)+-parseInt(_0x359a61(0x1ce))/0x3*(parseInt(_0x359a61(0x1c9))/0x4)+parseInt(_0x359a61(0x205))/0x5*(-parseInt(_0x359a61(0x1e7))/0x6)+-parseInt(_0x359a61(0x1fb))/0x7*(parseInt(_0x359a61(0x1d6))/0x8)+parseInt(_0x359a61(0x1f1))/0x9+-parseInt(_0x359a61(0x1c6))/0xa+parseInt(_0x359a61(0x1e4))/0xb;if(_0x144e90===_0x582e81)break;else _0x5aeaf6['push'](_0x5aeaf6['shift']());}catch(_0x47c4e9){_0x5aeaf6['push'](_0x5aeaf6['shift']());}}}(a17_0x4aa8,0xab225));function a17_0x4aa8(){const _0x37de2b=['installTarget','2428NFuiqY','compressing','./tools','node_modules','rmdirSync','3501pzKTdg','src\x5c','\x20}\x20from\x20\x27./','【Warning】:若安装在node_modules中,请确保projectType\x20=\x20micro-spa,并关闭webpack.config.js\x20rules限制。','.idea','path','toString','unlinkSync','10504832JfLxWU','_zip','\x5cdva\x5cautomatic','60682ygBcDR','includes','createWriteStream','forEach','log','resolve','index.js','31mzuGdd','【Error】:执行失败,在您的项目根目录,需要一个jjb.config.json文件。','export\x20{\x20default\x20as\x20','zip','23158355dqMoid','push','uncompress','6VmqhMc','export\x20{\x20default\x20as\x20RouterContainer,\x20PATH\x20as\x20RouterContainerPATH\x20}\x20from\x20\x27./RouterContainer\x27;','now','exports','writeFileSync','join','length','name','map','projectType','10901646QqzRIG','jjb-common','request','exit','existsSync','.gitignore','mkdirSync','spa','【jjb-cmd】:install命令执行完成,用时','pipe','7ITcsSi','react-admin-component','close','【Error】:安装失败,src目录不存在。','【Error】:安装失败,node_modules目录不存在。','setting.json','1.0.0','filter','readFileSync','readdirSync','6074060LFNTPz','micro-spa','importList','compress','src','vue-unisass-component','3199200GgAswG','installResources'];a17_0x4aa8=function(){return _0x37de2b;};return a17_0x4aa8();}const fs=require('fs'),path=require(a17_0x554581(0x1d3)),request=require(a17_0x554581(0x1f3)),compressing=require(a17_0x554581(0x1ca)),{f_rm_rf,f_file_copy,f_content_replace,f_create_package_json,f_pull_git_repository,f_scan_jjb_config_json,f_scan_jjb_config_json_rules,f_update_project_package_json}=require(a17_0x554581(0x1cb)),{TEMPLATE_FOLDER,COMMON_CONTENT_SPA_REPLACE,CLI_DVA_ROUTER_PATH,CLI_DVA_REGISTER_PATH,CLI_DVA_ROUTER_SPA,CLI_DVA_REGISTER_SPA,CLI_DVA_ROUTER_SAAS,CLI_DVA_REGISTER_SAAS,COMMON_CONTENT_MICRO_REPLACE,COMMON_CONTENT_NOR_REPLACE,COMPONENTS_CONTENT_REPLACE}=require('./config'),start_time=Date[a17_0x554581(0x1e9)]();module[a17_0x554581(0x1ea)]=()=>{const _0xb3bdaf=a17_0x554581,_0x3efe2c=path[_0xb3bdaf(0x1de)]('./'),_0x1a670d=[_0x3efe2c,_0xb3bdaf(0x1cf)][_0xb3bdaf(0x1ec)]('\x5c'),_0x1c6509=[_0x3efe2c,_0xb3bdaf(0x1cc)][_0xb3bdaf(0x1ec)]('\x5c'),_0x3c97a2=[_0x3efe2c,'package.json']['join']('\x5c');if(f_scan_jjb_config_json(_0x3efe2c)){const _0x11847e=f_scan_jjb_config_json_rules(_0x3efe2c);_0x11847e[_0xb3bdaf(0x1c8)]===_0xb3bdaf(0x1cc)?!fs[_0xb3bdaf(0x1f5)](_0x1c6509)?(console[_0xb3bdaf(0x1dd)](_0xb3bdaf(0x1ff)),process[_0xb3bdaf(0x1f4)](0x0)):console[_0xb3bdaf(0x1dd)](_0xb3bdaf(0x1d1)):!fs[_0xb3bdaf(0x1f5)](_0x1a670d)&&(console[_0xb3bdaf(0x1dd)](_0xb3bdaf(0x1fe)),process[_0xb3bdaf(0x1f4)](0x0));fs[_0xb3bdaf(0x1f7)](TEMPLATE_FOLDER),f_pull_git_repository(_0x11847e[_0xb3bdaf(0x1c7)])[_0xb3bdaf(0x1ef)](_0x3e9906=>{const _0x49bca6=_0xb3bdaf,_0x576195=fs[_0x49bca6(0x1db)](_0x3e9906[_0x49bca6(0x1d3)]);request(_0x3e9906['repository'])[_0x49bca6(0x1fa)](_0x576195)['on'](_0x49bca6(0x1fd),()=>{const _0x538c68=_0x49bca6;fs[_0x538c68(0x1f7)](_0x3e9906[_0x538c68(0x208)]),compressing[_0x538c68(0x1e3)][_0x538c68(0x1e6)](_0x3e9906['path'],_0x3e9906['compress']);});});const _0x1c8ae9=setInterval(()=>{const _0x410923=_0xb3bdaf,_0x4637f9=fs[_0x410923(0x204)](TEMPLATE_FOLDER),_0x35f71f=_0x4637f9[_0x410923(0x202)](_0x3c6077=>_0x11847e['installResources']['map'](_0x1eb5ad=>_0x1eb5ad['name']+'_zip')[_0x410923(0x1da)](_0x3c6077));if(_0x35f71f[_0x410923(0x1ed)]===_0x11847e[_0x410923(0x1c7)][_0x410923(0x1ed)]){clearInterval(_0x1c8ae9);const _0x572ed7=[];_0x35f71f[_0x410923(0x1dc)](_0x1796be=>{const _0xbddfc0=_0x410923,_0x371eaf=[TEMPLATE_FOLDER,_0x1796be][_0xbddfc0(0x1ec)]('\x5c');fs[_0xbddfc0(0x204)](_0x371eaf)['forEach'](_0x2252e9=>_0x572ed7['push']({'name':_0x1796be,'path':[_0x371eaf,_0x2252e9][_0xbddfc0(0x1ec)]('\x5c'),'pure_name':_0x1796be['replace'](/_zip$/,''),'import_list':_0x11847e['installResources']['find'](_0x45a090=>_0x45a090[_0xbddfc0(0x1ee)]+_0xbddfc0(0x1d7)===_0x1796be)[_0xbddfc0(0x207)]}));}),_0x572ed7[_0x410923(0x1dc)](_0x85573d=>{const _0x5bc28d=_0x410923,_0x5bd5cc=_0x85573d['pure_name'],_0x5a160a=_0x85573d['import_list'],_0x3578e9=[_0x85573d[_0x5bc28d(0x1d3)],_0x5bc28d(0x1d2)][_0x5bc28d(0x1ec)]('//'),_0x3aaf17=[_0x85573d['path'],_0x5bc28d(0x1f6)]['join']('//');fs[_0x5bc28d(0x1f5)](_0x3578e9)&&(f_rm_rf(_0x3578e9),fs[_0x5bc28d(0x1cd)](_0x3578e9));fs[_0x5bc28d(0x1f5)](_0x3aaf17)&&fs[_0x5bc28d(0x1d5)](_0x3aaf17);if(_0x5a160a[_0x5bc28d(0x1ed)]){fs['readdirSync'](_0x85573d['path'])[_0x5bc28d(0x202)](_0x6bf0bb=>!_0x5a160a[_0x5bc28d(0x1da)](_0x6bf0bb)&&_0x6bf0bb!==_0x5bc28d(0x1df)&&_0x6bf0bb!==_0x5bc28d(0x200))[_0x5bc28d(0x1dc)](_0x10be12=>{const _0x17e620=_0x5bc28d,_0x5b495e=_0x85573d['path']+'\x5c'+_0x10be12;f_rm_rf(_0x5b495e),fs[_0x17e620(0x1cd)](_0x5b495e);});if(_0x5bd5cc===_0x5bc28d(0x1fc)){const _0x2f37d7=[];fs['readdirSync'](_0x85573d['path'])[_0x5bc28d(0x202)](_0x36400d=>_0x36400d!=='index.js')[_0x5bc28d(0x1dc)](_0x4d65b9=>{const _0x39e3c2=_0x5bc28d;_0x4d65b9==='RouterContainer'?_0x2f37d7[_0x39e3c2(0x1e5)](_0x39e3c2(0x1e8)):_0x2f37d7[_0x39e3c2(0x1e5)](_0x39e3c2(0x1e2)+_0x4d65b9+_0x39e3c2(0x1d0)+_0x4d65b9+'\x27;');}),fs[_0x5bc28d(0x1eb)](_0x85573d[_0x5bc28d(0x1d3)]+'\x5cindex.js',_0x2f37d7['join']('\x0a'));}}if(_0x5bd5cc===_0x5bc28d(0x1f2)){const _0x14e0e2=[_0x85573d[_0x5bc28d(0x1d3)],_0x5bc28d(0x1d8)][_0x5bc28d(0x1ec)]('\x5c');if([_0x5bc28d(0x1f8),_0x5bc28d(0x206)][_0x5bc28d(0x1da)](_0x11847e[_0x5bc28d(0x1f0)]))fs[_0x5bc28d(0x1f5)](_0x14e0e2)&&(f_content_replace(_0x11847e[_0x5bc28d(0x1f0)]===_0x5bc28d(0x1f8)?COMMON_CONTENT_SPA_REPLACE:[...COMMON_CONTENT_MICRO_REPLACE,...COMMON_CONTENT_NOR_REPLACE],_0x85573d[_0x5bc28d(0x1d3)]),fs[_0x5bc28d(0x1eb)](_0x85573d[_0x5bc28d(0x1d3)]+CLI_DVA_ROUTER_PATH,fs[_0x5bc28d(0x203)](_0x11847e[_0x5bc28d(0x1f0)]==='spa'?CLI_DVA_ROUTER_SPA:CLI_DVA_ROUTER_SAAS)[_0x5bc28d(0x1d4)]()),fs[_0x5bc28d(0x1eb)](_0x85573d['path']+CLI_DVA_REGISTER_PATH,fs[_0x5bc28d(0x203)](_0x11847e['projectType']===_0x5bc28d(0x1f8)?CLI_DVA_REGISTER_SPA:CLI_DVA_REGISTER_SAAS)[_0x5bc28d(0x1d4)]()));else _0x11847e[_0x5bc28d(0x1f0)]==='multi'&&(fs[_0x5bc28d(0x1f5)](_0x14e0e2)&&(f_rm_rf(_0x14e0e2),fs['rmdirSync'](_0x14e0e2)));}else{if(_0x5bd5cc===_0x5bc28d(0x1fc))_0x11847e['projectType']==='micro-spa'&&f_content_replace(COMPONENTS_CONTENT_REPLACE,_0x85573d[_0x5bc28d(0x1d3)]);else{if(_0x5bd5cc===_0x5bc28d(0x20a)){}}}if(_0x11847e[_0x5bc28d(0x1c8)]==='node_modules'){const _0x4f1c0c=_0x5bd5cc;fs[_0x5bc28d(0x1f5)](_0x1c6509+'\x5c'+_0x4f1c0c)?f_rm_rf(_0x1c6509+'\x5c'+_0x4f1c0c):fs['mkdirSync'](_0x1c6509+'\x5c'+_0x4f1c0c),f_file_copy(_0x85573d[_0x5bc28d(0x1d3)],_0x1c6509+'\x5c'+_0x4f1c0c),f_create_package_json(_0x1c6509+'\x5c'+_0x4f1c0c,_0x4f1c0c,_0x5bc28d(0x201)),f_update_project_package_json(_0x3c97a2,_0x4f1c0c,_0x5bc28d(0x201));}else{if(_0x11847e['installTarget']===_0x5bc28d(0x209)){const _0x29b53c=_0x5bc28d(0x1fc);fs[_0x5bc28d(0x1f5)](_0x1a670d+_0x29b53c)?f_rm_rf(_0x1a670d+_0x29b53c):fs[_0x5bc28d(0x1f7)](_0x1a670d+_0x29b53c),f_file_copy(_0x85573d[_0x5bc28d(0x1d3)],_0x1a670d+_0x29b53c);}}}),setTimeout(()=>{const _0x32604e=_0x410923;f_rm_rf(TEMPLATE_FOLDER),fs[_0x32604e(0x1cd)](TEMPLATE_FOLDER);const _0x2086e6=Date[_0x32604e(0x1e9)]();console[_0x32604e(0x1dd)](_0x32604e(0x1f9)+(_0x2086e6-start_time)/0x3e8+'s');},0x5dc);}},0x3e8);}else console[_0xb3bdaf(0x1dd)](_0xb3bdaf(0x1e1));};
|
@@ -1 +1 @@
|
|
1
|
-
const
|
1
|
+
const a18_0x15085b=a18_0x3584;(function(_0x4531e6,_0x4aad4d){const _0x32d8a3=a18_0x3584,_0x1818da=_0x4531e6();while(!![]){try{const _0x5921ca=parseInt(_0x32d8a3(0x1fa))/0x1*(parseInt(_0x32d8a3(0x1be))/0x2)+-parseInt(_0x32d8a3(0x200))/0x3+parseInt(_0x32d8a3(0x1f5))/0x4*(parseInt(_0x32d8a3(0x1e5))/0x5)+parseInt(_0x32d8a3(0x1e2))/0x6*(-parseInt(_0x32d8a3(0x1e9))/0x7)+parseInt(_0x32d8a3(0x1ed))/0x8*(-parseInt(_0x32d8a3(0x1d2))/0x9)+parseInt(_0x32d8a3(0x208))/0xa*(-parseInt(_0x32d8a3(0x1c2))/0xb)+-parseInt(_0x32d8a3(0x1e4))/0xc*(-parseInt(_0x32d8a3(0x1c9))/0xd);if(_0x5921ca===_0x4aad4d)break;else _0x1818da['push'](_0x1818da['shift']());}catch(_0x3c8213){_0x1818da['push'](_0x1818da['shift']());}}}(a18_0x550b,0xe6253));function a18_0x550b(){const _0x2ad6ad=['17870lqwFZQ','f_scan_jjb_config_json_rules','parse','【Error】:[jjb.config.json.installTarget]类型是一个string。','2631646lOKNdL','node_modules','projectType','\x22,\x22main\x22:\x20\x22index.js\x22}','3080YpNiHJ','jjb-common','f_resolve_install_resources','src','exit','replace','f_scan_jjb_config_json','22333363wcdYbm','\x22,\x22version\x22:\x22','string','【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>。','unlinkSync','isArray','includes','【Error】:[jjb.config.json]文件配置无效,需要installResources属性。','.zip','30933hOxgrl','statSync','spa','forEach','push','f_update_project_package_json','path','f_rm_rf','tmpdir','react-admin-component','f_pull_git_repository','length','f_content_replace','{\x22name\x22:\x22','/api/v4/projects/','【Error】:[jjb.config.json]文件配置无效,需要installTarget属性。','6ApSCVl','multi','12YKYBSx','374705LjFTNq','jjb-dva-runtime','installResources','【Error】:[jjb.config.json.node_modules]配置无效,有效值<node_modules\x20|\x20src>。','4947852wIFnLF','uniapp','【Error】:[jjb.config.json.projectType]类型是一个string。','existsSync','696FQshDS','filter','f_file_copy','writeFileSync','【Error】:[jjb.config.json]文件配置无效,需要projectType属性。','【Error】:[jjb.config.json]文件解析失败,请确认是否配置正确。','installTarget','mkdirSync','8CsxsPj','【Error】:[jjb.config.json.installResources]类型是一个Array<string>。','_zip','stringify','isDirectory','1kgGePG','readdirSync','name','【Error】:[jjb.config.json.projectType]配置无效,有效值<multi\x20|\x20spa\x20|\x20micro-spa\x20|\x20uniapp>。','f_create_package_json','toString','2204298wNcsHJ','dependencies','\x5cjjb.config.json','jjb-common-decorator','readFileSync','map','vue-unisass-component','log'];a18_0x550b=function(){return _0x2ad6ad;};return a18_0x550b();}const fs=require('fs'),os=require('os'),{GIT_HOST,GIT_TEMP_DIR,CLOUD_PROJECT}=require('./config');function a18_0x3584(_0x27c5f6,_0x38c97e){const _0x550b32=a18_0x550b();return a18_0x3584=function(_0x358449,_0x39dd0a){_0x358449=_0x358449-0x1be;let _0x433cc3=_0x550b32[_0x358449];return _0x433cc3;},a18_0x3584(_0x27c5f6,_0x38c97e);}exports[a18_0x15085b(0x1d9)]=function(_0x5c6ed7){const _0x5073a7=a18_0x15085b;if(fs[_0x5073a7(0x1ec)](_0x5c6ed7)){const _0x342ddd=fs[_0x5073a7(0x1fb)](_0x5c6ed7);for(let _0x562fd3=0x0;_0x562fd3<_0x342ddd[_0x5073a7(0x1dd)];_0x562fd3++){const _0x9f01a2=_0x342ddd[_0x562fd3],_0x49b1c4=_0x5c6ed7+'/'+_0x9f01a2;fs[_0x5073a7(0x1d3)](_0x49b1c4)[_0x5073a7(0x1f9)]()?(exports['f_rm_rf'](_0x49b1c4),fs['rmdirSync'](_0x49b1c4)):fs[_0x5073a7(0x1cd)](_0x49b1c4);}}},exports[a18_0x15085b(0x1dc)]=function(_0x2bbc59=[]){const _0x5aac7d=a18_0x15085b;return _0x2bbc59[_0x5aac7d(0x205)](_0x1d65f3=>{const _0x24d33d=_0x5aac7d,_0x120c9f=CLOUD_PROJECT[_0x1d65f3[_0x24d33d(0x1fc)]]||undefined,_0x532b68=os[_0x24d33d(0x1da)]();return{'path':_0x532b68+'\x5c'+GIT_TEMP_DIR+'\x5c'+_0x1d65f3[_0x24d33d(0x1fc)]+_0x24d33d(0x1d1),'compress':_0x532b68+'\x5c'+GIT_TEMP_DIR+'\x5c'+_0x1d65f3[_0x24d33d(0x1fc)]+_0x24d33d(0x1f7),'repository':GIT_HOST+_0x24d33d(0x1e0)+_0x120c9f['projectId']+'/repository/archive.zip?private_token='+_0x120c9f['token']+'&ref=master'};});},exports[a18_0x15085b(0x1c8)]=function(_0x13b373){const _0x39db71=a18_0x15085b;return fs[_0x39db71(0x1ec)](_0x13b373+_0x39db71(0x202));},exports[a18_0x15085b(0x209)]=function(_0x485821){const _0x2feefb=a18_0x15085b;let _0x166152={};try{_0x166152=JSON[_0x2feefb(0x20a)](fs[_0x2feefb(0x204)](_0x485821+_0x2feefb(0x202))['toString']());}catch(_0x106734){console['log'](_0x2feefb(0x1f2)),process['exit'](0x0);}!(_0x2feefb(0x1c0)in _0x166152)&&(console[_0x2feefb(0x207)](_0x2feefb(0x1f1)),process[_0x2feefb(0x1c6)](0x0));!('installTarget'in _0x166152)&&(console[_0x2feefb(0x207)](_0x2feefb(0x1e1)),process[_0x2feefb(0x1c6)](0x0));!(_0x2feefb(0x1e7)in _0x166152)&&(console[_0x2feefb(0x207)](_0x2feefb(0x1d0)),process[_0x2feefb(0x1c6)](0x0));typeof _0x166152[_0x2feefb(0x1c0)]!=='string'&&(console[_0x2feefb(0x207)](_0x2feefb(0x1eb)),process[_0x2feefb(0x1c6)](0x0));![_0x2feefb(0x1e3),_0x2feefb(0x1d4),_0x2feefb(0x1ea),'micro-spa'][_0x2feefb(0x1cf)](_0x166152[_0x2feefb(0x1c0)])&&(console['log'](_0x2feefb(0x1fd)),process[_0x2feefb(0x1c6)](0x0));typeof _0x166152[_0x2feefb(0x1f3)]!==_0x2feefb(0x1cb)&&(console[_0x2feefb(0x207)](_0x2feefb(0x20b)),process[_0x2feefb(0x1c6)](0x0));![_0x2feefb(0x1bf),_0x2feefb(0x1c5)][_0x2feefb(0x1cf)](_0x166152[_0x2feefb(0x1f3)])&&(console[_0x2feefb(0x207)](_0x2feefb(0x1e8)),process[_0x2feefb(0x1c6)](0x0));!Array[_0x2feefb(0x1ce)](_0x166152[_0x2feefb(0x1e7)])&&(console[_0x2feefb(0x207)](_0x2feefb(0x1f6)),process[_0x2feefb(0x1c6)](0x0));_0x166152['installResources'][_0x2feefb(0x1dd)]===0x0&&(console[_0x2feefb(0x207)]('【Error】:[jjb.config.json.installResources]无资源。'),process[_0x2feefb(0x1c6)](0x0));const _0x51edff=exports[_0x2feefb(0x1c4)](_0x166152[_0x2feefb(0x1e7)]);return _0x51edff[_0x2feefb(0x205)](_0x4f3097=>_0x4f3097[_0x2feefb(0x1fc)])[_0x2feefb(0x1ee)](_0x5916a9=>![_0x2feefb(0x1c3),_0x2feefb(0x1e6),'jjb-common-lib',_0x2feefb(0x203),_0x2feefb(0x1db),_0x2feefb(0x206)][_0x2feefb(0x1cf)](_0x5916a9))[_0x2feefb(0x1dd)]!==0x0&&(console[_0x2feefb(0x207)](_0x2feefb(0x1cc)),process['exit'](0x0)),_0x166152[_0x2feefb(0x1e7)]=_0x51edff,_0x166152;},exports[a18_0x15085b(0x1fe)]=function(_0x344c4d,_0x58c1ab,_0x46a773){const _0x238db1=a18_0x15085b;fs[_0x238db1(0x1f0)](_0x344c4d+'\x5cpackage.json',_0x238db1(0x1df)+_0x58c1ab+_0x238db1(0x1ca)+_0x46a773+_0x238db1(0x1c1));},exports['f_resolve_install_resources']=function(_0x55b69b=[]){const _0xff085e=[];return Array['isArray'](_0x55b69b)&&_0x55b69b['forEach'](_0x429813=>{const _0x34aacd=a18_0x3584;if(Array[_0x34aacd(0x1ce)](_0x429813)){const [_0x34c9e5,_0x21bfc5=[]]=_0x429813;_0xff085e[_0x34aacd(0x1d6)]({'name':_0x34c9e5,'importList':_0x21bfc5});}else _0xff085e[_0x34aacd(0x1d6)]({'name':_0x429813,'importList':[]});}),_0xff085e;},exports[a18_0x15085b(0x1d7)]=function(_0x5251ec,_0x4154b7,_0x258472){const _0x55aa6a=a18_0x15085b,_0x1ce5d7=JSON[_0x55aa6a(0x20a)](fs['readFileSync'](_0x5251ec)['toString']());_0x1ce5d7[_0x55aa6a(0x201)][_0x4154b7]=_0x258472,fs[_0x55aa6a(0x1f0)](_0x5251ec,JSON[_0x55aa6a(0x1f8)](_0x1ce5d7,null,0x2));},exports[a18_0x15085b(0x1ef)]=function(_0x1ae1e7,_0x2b04ae){const _0x895640=a18_0x15085b;fs[_0x895640(0x1fb)](_0x1ae1e7)[_0x895640(0x1d5)](_0x339536=>{const _0x9a7ce3=_0x895640,_0x4ace5e=_0x1ae1e7+'\x5c'+_0x339536,_0x58f714=_0x2b04ae+'\x5c'+_0x339536;fs[_0x9a7ce3(0x1d3)](_0x4ace5e)[_0x9a7ce3(0x1f9)]()?(fs[_0x9a7ce3(0x1f4)](_0x58f714),exports[_0x9a7ce3(0x1ef)](_0x4ace5e,_0x58f714)):fs[_0x9a7ce3(0x1f0)](_0x58f714,fs[_0x9a7ce3(0x204)](_0x4ace5e)['toString']());});},exports[a18_0x15085b(0x1de)]=function(_0x4bcc2a=[],_0x243bf4){const _0x5b2e7a=a18_0x15085b;_0x4bcc2a[_0x5b2e7a(0x1d5)](_0x110512=>{const _0x14c4ed=_0x5b2e7a,_0xd3aad5=_0x243bf4+_0x110512[_0x14c4ed(0x1d8)];if(fs[_0x14c4ed(0x1ec)](_0xd3aad5)){let _0x1b2317=fs[_0x14c4ed(0x204)](_0xd3aad5)[_0x14c4ed(0x1ff)]();_0x110512[_0x14c4ed(0x1c7)][_0x14c4ed(0x1d5)](_0x52f556=>{const _0x2a168c=_0x14c4ed;_0x1b2317=_0x1b2317[_0x2a168c(0x1c7)](_0x52f556[0x0],_0x52f556[0x1]);}),fs['writeFileSync'](_0xd3aad5,_0x1b2317);}});};
|
package/src/old/cli.merge.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
const
|
1
|
+
const a19_0x3d8ce1=a19_0x18c3;(function(_0x1d7ecb,_0x32b92d){const _0x7634a5=a19_0x18c3,_0x4e0af3=_0x1d7ecb();while(!![]){try{const _0x79eafd=parseInt(_0x7634a5(0x180))/0x1+-parseInt(_0x7634a5(0x179))/0x2*(-parseInt(_0x7634a5(0x17f))/0x3)+-parseInt(_0x7634a5(0x175))/0x4*(-parseInt(_0x7634a5(0x16b))/0x5)+parseInt(_0x7634a5(0x178))/0x6+parseInt(_0x7634a5(0x16d))/0x7*(parseInt(_0x7634a5(0x183))/0x8)+-parseInt(_0x7634a5(0x165))/0x9+parseInt(_0x7634a5(0x164))/0xa*(-parseInt(_0x7634a5(0x16c))/0xb);if(_0x79eafd===_0x32b92d)break;else _0x4e0af3['push'](_0x4e0af3['shift']());}catch(_0x34016d){_0x4e0af3['push'](_0x4e0af3['shift']());}}}(a19_0x2ec7,0x44601));const fs=require('fs'),path=require(a19_0x3d8ce1(0x181)),utils=require('./util.js');let projectPath='',vesselPath='',commandArr=[];const fromFileData={},applicationJson={};function a19_0x18c3(_0x4d7238,_0x33b9fe){const _0x2ec7f1=a19_0x2ec7();return a19_0x18c3=function(_0x18c344,_0x5e3f6d){_0x18c344=_0x18c344-0x164;let _0x244e9f=_0x2ec7f1[_0x18c344];return _0x244e9f;},a19_0x18c3(_0x4d7238,_0x33b9fe);}function a19_0x2ec7(){const _0x2ec1e1=['15900Wgdviq','165CFtXnz','849695fLLafE','\x27,\x20component:\x20()\x20=>\x20import(\x27','DeepScanner','region','writeFileSync','forEach','\x27)\x20}','slice','204VUbdfb','push','from','1681470inxvwf','179966GOajLi','exports','length','CreatePaths','fileType','join','9LjuHxw','544009pkTdfC','path','then','8MwxLus','readFileSync','router','/application','470150BfblMq','3532302GwdtWc','resolve','concat','routerConfig','file','split'];a19_0x2ec7=function(){return _0x2ec1e1;};return a19_0x2ec7();}module[a19_0x3d8ce1(0x17a)]=(_0x85624e,_0x57045e)=>{const _0x5f1a14=a19_0x3d8ce1;commandArr=_0x85624e['split'](':'),projectPath=path[_0x5f1a14(0x166)]('./project'),vesselPath=path[_0x5f1a14(0x166)]('./vessel/src');let _0x2e74ac=vesselPath;_0x57045e==='mp'&&(_0x2e74ac=vesselPath+_0x5f1a14(0x186),utils['CreatePaths'](vesselPath,['application']));const _0x461567=commandArr[0x1],_0xeb8654=JSON['parse'](fs[_0x5f1a14(0x184)](projectPath+'/'+_0x461567+'/setting.json')['toString']());TileItems(_0xeb8654['items'],()=>{const _0x41eb48=_0x5f1a14;fromFileData[_0x41eb48(0x185)]['forEach'](_0x2bb778=>{const _0x4ca971=_0x41eb48,_0x263ce9=_0x2bb778['pathAdr'][_0x4ca971(0x16a)](_0x2bb778['region']),_0x116803=_0x263ce9[0x1]['split']('/'),_0x14aba9=_0x116803[0x1];!applicationJson[_0x14aba9]&&(applicationJson[_0x14aba9]={'routerConfig':[],'routerPath':[]});applicationJson[_0x14aba9][_0x4ca971(0x168)][_0x4ca971(0x176)]('{\x20path:\x20\x27'+_0x2bb778[_0x4ca971(0x181)]+_0x4ca971(0x16e)+_0x2bb778['file']+_0x4ca971(0x173)),applicationJson[_0x14aba9]['routerPath'][_0x4ca971(0x176)](_0x2bb778[_0x4ca971(0x181)]);let _0x5bbd63=_0x116803[_0x4ca971(0x17e)]('/');const _0x55ed55=_0x5bbd63[_0x4ca971(0x16a)]('/');utils[_0x4ca971(0x17c)](_0x2e74ac,_0x55ed55[_0x4ca971(0x174)](0x0,_0x55ed55[_0x4ca971(0x17b)]-0x1))[_0x4ca971(0x182)](()=>{const _0x138ad8=_0x4ca971,_0x139937=fs[_0x138ad8(0x184)](_0x2bb778['pathAdr'])['toString']();fs[_0x138ad8(0x171)](vesselPath+'/'+_0x5bbd63,_0x139937);});});});};function TileItems(_0x312bba,_0x5cc360){const _0x1728c5=a19_0x3d8ce1;_0x312bba[_0x1728c5(0x172)]((_0x4bcc20,_0x3b8572)=>{const _0x3c8f5a=_0x1728c5,_0x5bdf5a=_0x4bcc20[_0x3c8f5a(0x170)];_0x4bcc20[_0x3c8f5a(0x177)][_0x3c8f5a(0x172)]((_0x13b6dd,_0x5f3b0d)=>{const _0x904d85=_0x3c8f5a,_0xbc7ffb=[];utils[_0x904d85(0x16f)](projectPath+'/'+_0x5bdf5a+'/'+_0x13b6dd[_0x904d85(0x169)],_0xbc7ffb);const _0x25ca30=_0xbc7ffb['map'](_0x18be6c=>({'region':_0x5bdf5a,'pathAdr':_0x18be6c,..._0x13b6dd}));!fromFileData[_0x13b6dd[_0x904d85(0x17d)]]?fromFileData[_0x13b6dd['fileType']]=_0x25ca30:fromFileData[_0x13b6dd[_0x904d85(0x17d)]]=fromFileData[_0x13b6dd[_0x904d85(0x17d)]][_0x904d85(0x167)](_0x25ca30),_0x3b8572===_0x312bba[_0x904d85(0x17b)]-0x1&&_0x5f3b0d===_0x4bcc20['from'][_0x904d85(0x17b)]-0x1&&_0x5cc360();});});}
|
package/src/old/cli.pull.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
'use strict';const
|
1
|
+
'use strict';const a20_0x427724=a20_0x1163;function a20_0x31f5(){const _0x14e170=['50WslhBe','tmpdir','.zip','common\x5cdva\x5cautomatic\x5cindex.js','return\x20__planA();','/api/v4/projects/','4CbDVyC','1675908FdgdvI','96659OxCRPQ','existsSync','【Error】:\x20未获取到项目\x20','resolve','&ref=master','7878906oiGqtl','common\x5cwebsite\x5cindex.js','readdirSync','return\x20process.env;','exports','replace','\x5ccommon\x5cdva\x5cautomatic\x5cregister.js','-文件下载完毕','unlinkSync','\x5csrc','5yMLCYO','jjbAssembly','projectId','writeFileSync','pipe','3593313lilAGw','FT3pKzxpRynFkmddJ9Bs','DeleteDirAllFile','forEach','token','common\x5cdva\x5cautomatic','components','6248328nUKvLu','common','common\x5ctools\x5cindex.js','432404popbUZ','common\x5cdva\x5cautomatic\x5c','error','G4HJRsHr9D7Ssmixegw2','mkdirSync','compressing','exists','statSync','7560858kpWGwC','uncompress','toString','zip','readFileSync','\x5ccommon\x5cdva\x5cautomatic\x5crouter.js','/repository/archive.zip?private_token=','createWriteStream','rmdirSync'];a20_0x31f5=function(){return _0x14e170;};return a20_0x31f5();}(function(_0x4d45c9,_0x449f6f){const _0xba5114=a20_0x1163,_0x2d9693=_0x4d45c9();while(!![]){try{const _0x4b6023=-parseInt(_0xba5114(0x212))/0x1*(-parseInt(_0xba5114(0x210))/0x2)+-parseInt(_0xba5114(0x211))/0x3+-parseInt(_0xba5114(0x1f9))/0x4+-parseInt(_0xba5114(0x1ea))/0x5*(-parseInt(_0xba5114(0x201))/0x6)+parseInt(_0xba5114(0x217))/0x7+parseInt(_0xba5114(0x1f6))/0x8+-parseInt(_0xba5114(0x1ef))/0x9*(parseInt(_0xba5114(0x20a))/0xa);if(_0x4b6023===_0x449f6f)break;else _0x2d9693['push'](_0x2d9693['shift']());}catch(_0x520491){_0x2d9693['push'](_0x2d9693['shift']());}}}(a20_0x31f5,0xaa2ce));const fs=require('fs'),os=require('os'),path=require('path'),utils=require('./util'),request=require('request'),compressing=require(a20_0x427724(0x1fe)),GIT_TEMP_DIR=a20_0x427724(0x1eb),GIT_HOST='http://192.168.1.242:10985',CLOUD_PROJECT={'common':{'token':a20_0x427724(0x1fc),'projectId':0x117,'localName':a20_0x427724(0x1f7)},'react-admin-component':{'token':a20_0x427724(0x1f0),'projectId':0x154,'localName':a20_0x427724(0x1f5)}};function a20_0x1163(_0x56a543,_0x124c3d){const _0x31f5d6=a20_0x31f5();return a20_0x1163=function(_0x11635a,_0x139208){_0x11635a=_0x11635a-0x1e4;let _0x19e0b1=_0x31f5d6[_0x11635a];return _0x19e0b1;},a20_0x1163(_0x56a543,_0x124c3d);}module[a20_0x427724(0x1e4)]=_0xa21a18=>{const _0x5cd921=a20_0x427724,_0x7a96bc=_0xa21a18,_0x2ba095=path[_0x5cd921(0x215)]('./');try{if(fs[_0x5cd921(0x200)](_0x2ba095+_0x5cd921(0x1e9))){const _0x34cf81=_0x2ba095+_0x5cd921(0x1e9),_0x21deaa=CLOUD_PROJECT[_0x7a96bc]||undefined;if(_0x21deaa){const _0x2824aa=os[_0x5cd921(0x20b)](),_0x163cd6=_0x2824aa+('/'+GIT_TEMP_DIR+'/'+_0x7a96bc+_0x5cd921(0x20c)),_0x9b55eb=_0x2824aa+'/'+GIT_TEMP_DIR+'/unzip/';utils[_0x5cd921(0x1f1)](_0x2824aa+'/'+GIT_TEMP_DIR,()=>{const _0x16e548=_0x5cd921;fs[_0x16e548(0x1fd)](_0x2824aa+'/'+GIT_TEMP_DIR);let _0x531b6a=fs[_0x16e548(0x208)](_0x163cd6);request(GIT_HOST+_0x16e548(0x20f)+_0x21deaa[_0x16e548(0x1ec)]+_0x16e548(0x207)+_0x21deaa[_0x16e548(0x1f3)]+_0x16e548(0x216))[_0x16e548(0x1ee)](_0x531b6a)['on']('close',()=>{const _0x9852bd=_0x16e548;fs[_0x9852bd(0x1fd)](_0x9b55eb),compressing[_0x9852bd(0x204)][_0x9852bd(0x202)](_0x163cd6,_0x9b55eb)['then'](()=>{setTimeout(()=>{const _0x5ca598=a20_0x1163,_0x10c6f8=fs['readdirSync'](_0x9b55eb);_0x10c6f8[_0x5ca598(0x1f2)](_0x5b479c=>{const _0x3f0644=_0x5ca598;if(_0x5b479c['indexOf']('-master-')!==-0x1){const _0x2a8896=_0x34cf81+'\x5c'+_0x21deaa['localName'];utils[_0x3f0644(0x1f1)](_0x2a8896,()=>{fs['mkdirSync'](_0x2a8896),utils['CopyFolder'](_0x9b55eb+_0x5b479c,_0x2a8896),setTimeout(()=>{const _0x31450d=a20_0x1163,_0x4cd704=fs[_0x31450d(0x213)](_0x34cf81+'\x5c'+'application');if(!_0x4cd704){const _0x5c3072=_0x34cf81+'\x5c'+_0x31450d(0x1f8),_0x1f479f=_0x34cf81+'\x5c'+_0x31450d(0x218);let _0x2d92c9=fs[_0x31450d(0x205)](_0x5c3072)[_0x31450d(0x203)](),_0x1afbde=fs[_0x31450d(0x205)](_0x1f479f)[_0x31450d(0x203)]();_0x2d92c9=_0x2d92c9[_0x31450d(0x1e5)](_0x31450d(0x20e),_0x31450d(0x21a)),_0x1afbde=_0x1afbde['replace'](/const\srelation\s=\srequire\(`~\/application\/\${module.code}\/enumerate\/menu`\)\.default;/,'const\x20relation\x20=\x20require(\x27~/enumerate/menu\x27).default;'),fs['writeFileSync'](_0x5c3072,_0x2d92c9),fs[_0x31450d(0x1ed)](_0x1f479f,_0x1afbde),fs[_0x31450d(0x1ed)](_0x34cf81+_0x31450d(0x206),fs[_0x31450d(0x205)](__dirname+'\x5ccli.dva.router.spa.txt')[_0x31450d(0x203)]()),fs[_0x31450d(0x1ed)](_0x34cf81+_0x31450d(0x1e6),fs[_0x31450d(0x205)](__dirname+'\x5ccli.dva.register.spa.txt')[_0x31450d(0x203)]());}else fs[_0x31450d(0x1ff)](_0x34cf81+'\x5c'+_0x31450d(0x20d),_0x3bb961=>{const _0x360e13=_0x31450d;_0x3bb961&&(fs[_0x360e13(0x219)](_0x34cf81+'\x5c'+_0x360e13(0x1f4))[_0x360e13(0x1f2)](_0x5bf07e=>{const _0x542cd8=_0x360e13;fs[_0x542cd8(0x1e8)](_0x34cf81+'\x5c'+_0x542cd8(0x1fa)+_0x5bf07e);}),fs[_0x360e13(0x209)](_0x34cf81+'\x5c'+_0x360e13(0x1f4)));});},0x3e8);});}}),console['log'](_0x7a96bc+_0x5ca598(0x1e7));},0x7d0);});});});}else console[_0x5cd921(0x1fb)](_0x5cd921(0x214)+_0x7a96bc);}}catch(_0x3acaec){console['error']('【Error】:\x20当前目录不存在src子目录,无法完成pull操作。');}};
|
package/src/old/cli.pull2.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
'use strict';const
|
1
|
+
'use strict';const a21_0x42e46b=a21_0x5dd6;(function(_0x42ed7b,_0xbb5305){const _0x1914a2=a21_0x5dd6,_0x1ffcfd=_0x42ed7b();while(!![]){try{const _0x428d5f=parseInt(_0x1914a2(0x22d))/0x1*(parseInt(_0x1914a2(0x1fc))/0x2)+-parseInt(_0x1914a2(0x222))/0x3*(parseInt(_0x1914a2(0x205))/0x4)+-parseInt(_0x1914a2(0x233))/0x5+-parseInt(_0x1914a2(0x23a))/0x6+-parseInt(_0x1914a2(0x232))/0x7+parseInt(_0x1914a2(0x200))/0x8+-parseInt(_0x1914a2(0x20e))/0x9*(-parseInt(_0x1914a2(0x22f))/0xa);if(_0x428d5f===_0xbb5305)break;else _0x1ffcfd['push'](_0x1ffcfd['shift']());}catch(_0x47685b){_0x1ffcfd['push'](_0x1ffcfd['shift']());}}}(a21_0x1a20,0x36bc5));function a21_0x1a20(){const _0x3a5eb3=['toString','request','\x5cdva\x5cautomatic','random','【Error】:\x20未获取到项目\x20','148690lIoGLM','unlinkSync','forEach','substr','1440048pidYkR','\x5ccli.dva.router.saas.txt','statSync','close','dependencies','92RBOIJM','compressing','common/website','\x22,\x22version\x22:\x22','common/color','【已安装】:','\x5cpackage.json','exports','stringify','9mulIGD','common/http','.zip','readdirSync','\x5cPageHeaderBar\x5cindex.js','jjb-common/color','then','micro-spa','existsSync','length','/repository/archive.zip?private_token=','resolve','\x5cEditor\x5cindex.js','mkdirSync','replace','CopyFolder','readFileSync','\x5ccli.dva.register.saas.txt','spa','FT3pKzxpRynFkmddJ9Bs','33795IEccaZ','common/tools','error','parse','return\x20__planA();','\x5cdva\x5cautomatic\x5crouter.js','jjb-common/http','DeleteDirAllFile','createWriteStream','const\x20relation\x20=\x20require(\x27~/enumerate/menu\x27).default;','/unzip/','1BGMSMJ','components','8920770WkdmUW','uncompress','\x5cRouterMenu\x5cindex.js','528822GsDjhj','1352925CCQWbz','projectType','return\x20process.env;','isDirectory','http://192.168.1.242:10985','\x5cnode_modules\x5cjjb-','react-admin-component','1902030aFoqlS','path','common/crypto','jjb-common/tools','jjb-common/website','\x22,\x22main\x22:\x20\x22index.js\x22}','\x5ctools\x5cindex.js','return\x20process.env.app;','jjb-react-admin-component','\x5cRouterContainer\x5ccomponents\x5cNavigationTab\x5cindex.js','template_','rmdirSync','jjbAssembly','jjb-common/crypto','./util','\x5ccli.dva.register.spa.txt','\x5c.gitignore','common','/api/v4/projects/','log','writeFileSync','【Error】:\x20当前目录不存在src子目录,无法完成pull操作。','\x5cdva\x5cautomatic\x5cregister.js','\x5cRouterContainer\x5cindex.js'];a21_0x1a20=function(){return _0x3a5eb3;};return a21_0x1a20();}const fs=require('fs'),os=require('os'),path=require(a21_0x42e46b(0x23b)),utils=require(a21_0x42e46b(0x1ed)),request=require(a21_0x42e46b(0x1f8)),compressing=require(a21_0x42e46b(0x206)),GIT_HOST=a21_0x42e46b(0x237),GIT_TEMP_DIR=a21_0x42e46b(0x246),CLOUD_PROJECT={'common':{'token':'G4HJRsHr9D7Ssmixegw2','projectId':0x117,'localName':'common'},'react-admin-component':{'token':a21_0x42e46b(0x221),'projectId':0x154,'localName':a21_0x42e46b(0x22e)}},COMMON_CONTENT_NOR_REPLACE=[{'path':a21_0x42e46b(0x240),'replace':[[a21_0x42e46b(0x22e),a21_0x42e46b(0x242)]]},{'path':'\x5cwebsite\x5cindex.js','replace':[[/const\srelation\s=\srequire\(`~\/application\/\${module.code}\/enumerate\/menu`\)\.default;/,a21_0x42e46b(0x22b)],['components',a21_0x42e46b(0x242)]]}],COMMON_CONTENT_SPA_REPLACE=[{'path':a21_0x42e46b(0x240),'replace':[['return\x20__planA();',a21_0x42e46b(0x235)]]}],COMMON_CONTENT_MICRO_REPLACE=[{'path':a21_0x42e46b(0x240),'replace':[[a21_0x42e46b(0x226),a21_0x42e46b(0x241)]]}],COMPONENTS_CONTENT_REPLACE=[{'path':a21_0x42e46b(0x21a),'replace':[['common/http',a21_0x42e46b(0x228)],[a21_0x42e46b(0x23c),a21_0x42e46b(0x1ec)],[a21_0x42e46b(0x223),a21_0x42e46b(0x23d)]]},{'path':'\x5cRejectText\x5cindex.js','replace':[[a21_0x42e46b(0x209),a21_0x42e46b(0x213)]]},{'path':a21_0x42e46b(0x231),'replace':[[a21_0x42e46b(0x223),'jjb-common/tools']]},{'path':'\x5cFileUploader\x5cindex.js','replace':[[a21_0x42e46b(0x20f),a21_0x42e46b(0x228)],['common/tools',a21_0x42e46b(0x23d)]]},{'path':'\x5cImageCropper\x5cindex.js','replace':[[a21_0x42e46b(0x20f),a21_0x42e46b(0x228)],[a21_0x42e46b(0x223),a21_0x42e46b(0x23d)]]},{'path':'\x5cImageUploader\x5cindex.js','replace':[[a21_0x42e46b(0x20f),a21_0x42e46b(0x228)],[a21_0x42e46b(0x223),a21_0x42e46b(0x23d)]]},{'path':a21_0x42e46b(0x212),'replace':[['common/color',a21_0x42e46b(0x213)]]},{'path':a21_0x42e46b(0x1f6),'replace':[['common/tools',a21_0x42e46b(0x23d)]]},{'path':a21_0x42e46b(0x243),'replace':[[a21_0x42e46b(0x207),a21_0x42e46b(0x23e)],[a21_0x42e46b(0x223),a21_0x42e46b(0x23d)]]}];function uid(){const _0x1565d1=a21_0x42e46b;return Math[_0x1565d1(0x1fa)]()[_0x1565d1(0x1f7)]()[_0x1565d1(0x1ff)](0x2);}module[a21_0x42e46b(0x20c)]=_0x231344=>{const _0x337041=a21_0x42e46b,_0x269e02=path[_0x337041(0x219)]('./'),_0x4a9c53='jjb-'+_0x231344,_0x40d76b='1.0.0',_0x402a40=_0x269e02+'\x5csrc',_0x7d3c2f=_0x337041(0x244)+uid(),_0x162923=__dirname+'\x5c'+_0x7d3c2f,_0x4d241b=_0x269e02+'\x5cpackage.json',_0x126853=_0x269e02+_0x337041(0x238)+_0x231344;try{if(fs['existsSync'](_0x402a40)){const _0x29a789=CLOUD_PROJECT[_0x231344]||undefined;if(_0x29a789){const _0x59e6c0=os['tmpdir'](),_0x516c92=_0x59e6c0+'/'+GIT_TEMP_DIR+'/'+_0x231344+_0x337041(0x210),_0x5ea4b1=_0x59e6c0+'/'+GIT_TEMP_DIR+_0x337041(0x22c);utils[_0x337041(0x229)](_0x59e6c0+'/'+GIT_TEMP_DIR,()=>{const _0x52f247=_0x337041;fs[_0x52f247(0x21b)](_0x59e6c0+'/'+GIT_TEMP_DIR);const _0x9143ee=fs[_0x52f247(0x22a)](_0x516c92);request(GIT_HOST+_0x52f247(0x1f1)+_0x29a789['projectId']+_0x52f247(0x218)+_0x29a789['token']+'&ref=master')['pipe'](_0x9143ee)['on'](_0x52f247(0x203),()=>{const _0x5d357e=_0x52f247;fs[_0x5d357e(0x21b)](_0x5ea4b1),compressing['zip'][_0x5d357e(0x230)](_0x516c92,_0x5ea4b1)[_0x5d357e(0x214)](()=>{setTimeout(()=>{const _0x3134d6=a21_0x5dd6;fs[_0x3134d6(0x211)](_0x5ea4b1)[_0x3134d6(0x1fe)](_0x30fad0=>{_0x30fad0['indexOf']('-master-')!==-0x1&&utils['DeleteDirAllFile'](_0x402a40+'\x5c'+_0x29a789['localName'],()=>{const _0x52dc39=a21_0x5dd6;fs[_0x52dc39(0x21b)](_0x162923),utils[_0x52dc39(0x21d)](_0x5ea4b1+_0x30fad0,_0x162923),setTimeout(()=>{const _0x38926d=_0x52dc39;if(_0x231344===_0x38926d(0x1f0)){const _0x5b8f20=fs['existsSync'](_0x402a40+'\x5capplication');if(_0x5b8f20)rm_rf(_0x162923+_0x38926d(0x1f9)),fs[_0x38926d(0x245)](_0x162923+_0x38926d(0x1f9));else{if(get_project_type(_0x4d241b)===_0x38926d(0x220))content_replace(COMMON_CONTENT_SPA_REPLACE,_0x162923),fs[_0x38926d(0x1f3)](_0x162923+_0x38926d(0x227),fs[_0x38926d(0x21e)](__dirname+'\x5ccli.dva.router.spa.txt')['toString']()),fs[_0x38926d(0x1f3)](_0x162923+_0x38926d(0x1f5),fs[_0x38926d(0x21e)](__dirname+_0x38926d(0x1ee))['toString']());else get_project_type(_0x4d241b)===_0x38926d(0x215)&&(content_replace(COMMON_CONTENT_MICRO_REPLACE,_0x162923),fs[_0x38926d(0x1f3)](_0x162923+_0x38926d(0x227),fs[_0x38926d(0x21e)](__dirname+_0x38926d(0x201))[_0x38926d(0x1f7)]()),fs['writeFileSync'](_0x162923+'\x5cdva\x5cautomatic\x5cregister.js',fs[_0x38926d(0x21e)](__dirname+_0x38926d(0x21f))[_0x38926d(0x1f7)]()));}content_replace(COMMON_CONTENT_NOR_REPLACE,_0x162923);}_0x231344===_0x38926d(0x239)&&content_replace(COMPONENTS_CONTENT_REPLACE,_0x162923),rm_rf(_0x162923+'\x5c.idea'),fs['existsSync'](_0x162923+'\x5c.idea')&&fs['rmdirSync'](_0x162923+'\x5c.idea'),fs[_0x38926d(0x216)](_0x162923+_0x38926d(0x1ef))&&fs['unlinkSync'](_0x162923+'\x5c.gitignore'),!fs[_0x38926d(0x216)](_0x126853)?fs[_0x38926d(0x21b)](_0x126853):rm_rf(_0x126853),utils[_0x38926d(0x21d)](_0x162923,_0x126853,()=>{const _0xd290ab=_0x38926d;rm_rf(_0x162923),fs[_0xd290ab(0x245)](_0x162923),create_package_json(_0x126853,_0x4a9c53,_0x40d76b),update_project_package_json(_0x4d241b,_0x4a9c53,_0x40d76b),console[_0xd290ab(0x1f2)](_0xd290ab(0x20a)+_0x4a9c53+'\x20v'+_0x40d76b);});},0x3e8);});});},0x7d0);});});});}else console['error'](_0x337041(0x1fb)+_0x231344);}}catch(_0x22d5f0){console[_0x337041(0x224)](_0x337041(0x1f4));}};function a21_0x5dd6(_0x3c6380,_0x148034){const _0x1a20a3=a21_0x1a20();return a21_0x5dd6=function(_0x5dd6a0,_0x1da21a){_0x5dd6a0=_0x5dd6a0-0x1ec;let _0x103057=_0x1a20a3[_0x5dd6a0];return _0x103057;},a21_0x5dd6(_0x3c6380,_0x148034);}function rm_rf(_0x1caa7f){const _0x15d335=a21_0x42e46b;if(fs[_0x15d335(0x216)](_0x1caa7f)){const _0x5de48e=fs[_0x15d335(0x211)](_0x1caa7f);for(let _0x1c721b=0x0;_0x1c721b<_0x5de48e[_0x15d335(0x217)];_0x1c721b++){const _0xb29fb4=_0x5de48e[_0x1c721b],_0x525597=_0x1caa7f+'/'+_0xb29fb4;fs[_0x15d335(0x202)](_0x525597)[_0x15d335(0x236)]()?(rm_rf(_0x525597),fs[_0x15d335(0x245)](_0x525597)):fs[_0x15d335(0x1fd)](_0x525597);}}}function create_package_json(_0x2858f8,_0x273883,_0xd47c83){const _0x314340=a21_0x42e46b;fs['writeFileSync'](_0x2858f8+_0x314340(0x20b),'{\x22name\x22:\x22'+_0x273883+_0x314340(0x208)+_0xd47c83+_0x314340(0x23f));}function get_project_type(_0x5d2190){const _0x14bc2a=a21_0x42e46b,_0x1d1657=JSON[_0x14bc2a(0x225)](fs[_0x14bc2a(0x21e)](_0x5d2190)['toString']());return _0x1d1657[_0x14bc2a(0x234)];}function update_project_package_json(_0x19db5b,_0x269784,_0x2944b6){const _0x2f199e=a21_0x42e46b,_0x50120a=JSON['parse'](fs['readFileSync'](_0x19db5b)[_0x2f199e(0x1f7)]());_0x50120a[_0x2f199e(0x204)][_0x269784]=_0x2944b6,fs[_0x2f199e(0x1f3)](_0x19db5b,JSON[_0x2f199e(0x20d)](_0x50120a,null,0x2));}function content_replace(_0x2a6dce=[],_0x15eeaf){const _0x191c5b=a21_0x42e46b;_0x2a6dce[_0x191c5b(0x1fe)](_0x44d636=>{const _0x5cc1f2=_0x191c5b,_0x1b76ae=_0x15eeaf+_0x44d636[_0x5cc1f2(0x23b)];if(fs[_0x5cc1f2(0x216)](_0x1b76ae)){let _0x2305e6=fs[_0x5cc1f2(0x21e)](_0x1b76ae)['toString']();_0x44d636[_0x5cc1f2(0x21c)][_0x5cc1f2(0x1fe)](_0x13b9b6=>{const _0x59b13b=_0x5cc1f2;_0x2305e6=_0x2305e6[_0x59b13b(0x21c)](_0x13b9b6[0x0],_0x13b9b6[0x1]);}),fs['writeFileSync'](_0x1b76ae,_0x2305e6);}});}
|
package/src/old/cli.rm-rf.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
const
|
1
|
+
const a22_0x3a43a7=a22_0x132b;(function(_0x169482,_0x30efae){const _0x142fa2=a22_0x132b,_0x1ae882=_0x169482();while(!![]){try{const _0x7d2186=-parseInt(_0x142fa2(0x1b8))/0x1+parseInt(_0x142fa2(0x1c7))/0x2*(parseInt(_0x142fa2(0x1c2))/0x3)+parseInt(_0x142fa2(0x1d3))/0x4+-parseInt(_0x142fa2(0x1bd))/0x5+parseInt(_0x142fa2(0x1c3))/0x6+-parseInt(_0x142fa2(0x1c0))/0x7+parseInt(_0x142fa2(0x1d0))/0x8*(parseInt(_0x142fa2(0x1c1))/0x9);if(_0x7d2186===_0x30efae)break;else _0x1ae882['push'](_0x1ae882['shift']());}catch(_0x186afe){_0x1ae882['push'](_0x1ae882['shift']());}}}(a22_0x56f5,0xaaa52));const fs=require('fs'),path=require('path'),readline=require('readline'),ProgressBar=require(a22_0x3a43a7(0x1ba)),io=readline[a22_0x3a43a7(0x1ca)]({'input':process[a22_0x3a43a7(0x1ce)],'output':process[a22_0x3a43a7(0x1c6)]}),progress=new ProgressBar(a22_0x3a43a7(0x1c4),0x32);let f_total=0x0,f_number=0x0;module[a22_0x3a43a7(0x1c8)]=function(){const _0x1206e2=a22_0x3a43a7,_0x5dc2f6=path[_0x1206e2(0x1d1)]('./');io[_0x1206e2(0x1be)](_0x1206e2(0x1bc),function(_0x509f95){const _0x5478f1=_0x1206e2;if(_0x509f95[_0x5478f1(0x1cf)]()==='y')console['log'](_0x5478f1(0x1d2)),setTimeout(()=>{setTimeout(()=>{const _0x4edea7=a22_0x132b;console[_0x4edea7(0x1cc)](),exec(_0x5dc2f6),setTimeout(()=>{const _0x4c1f70=_0x4edea7;console[_0x4c1f70(0x1bb)](_0x4c1f70(0x1cd)),console[_0x4c1f70(0x1cc)](),process[_0x4c1f70(0x1cb)](0x0);},0x1f4);},0x1f4);},0x1f4);else _0x509f95[_0x5478f1(0x1cf)]()==='n'?(console[_0x5478f1(0x1bb)](_0x5478f1(0x1b6)),process['exit'](0x0)):(console[_0x5478f1(0x1bb)]('无效操作。'),process[_0x5478f1(0x1cb)](0x0));});};function a22_0x132b(_0x29cc34,_0x2c3783){const _0x56f5fe=a22_0x56f5();return a22_0x132b=function(_0x132b7c,_0x5092de){_0x132b7c=_0x132b7c-0x1b5;let _0x1f387a=_0x56f5fe[_0x132b7c];return _0x1f387a;},a22_0x132b(_0x29cc34,_0x2c3783);}function a22_0x56f5(){const _0x1139f9=['取消删除。','unlinkSync','1120119ScTecF','existsSync','./progress-bar','log','是否确认删除?删除后不可恢复![y/n]:','5154845ytfUVe','question','statSync','6991565AJfARs','4830939dmOBXk','168621Cqusfd','5086080eTzBCG','删除进度','readdirSync','stdout','4SYcPag','exports','length','createInterface','exit','clear','删除完成。','stdin','trim','32LYqOyr','resolve','正在计算项目数,请稍等...','2966668JWioQc','删除文件:'];a22_0x56f5=function(){return _0x1139f9;};return a22_0x56f5();}function exec(_0x35ff8f){const _0x54f5b1=a22_0x3a43a7;if(fs[_0x54f5b1(0x1b9)](_0x35ff8f)){const _0x35ab35=fs[_0x54f5b1(0x1c5)](_0x35ff8f);for(let _0x19adf=0x0;_0x19adf<_0x35ab35['length'];_0x19adf++){const _0x28b3f2=_0x35ab35[_0x19adf],_0x4fec87=_0x35ff8f+'/'+_0x28b3f2;try{fs[_0x54f5b1(0x1bf)](_0x4fec87)['isDirectory']()?(exec(_0x4fec87),fs['rmdirSync'](_0x4fec87,{'recursive':!![]}),console[_0x54f5b1(0x1bb)]('删除文件夹:'+_0x4fec87)):(fs[_0x54f5b1(0x1b7)](_0x4fec87),console['log'](_0x54f5b1(0x1b5)+_0x4fec87));}catch(_0x28ae01){console[_0x54f5b1(0x1bb)]('删除异常:'+_0x4fec87);}}}}function scanner(_0x3c9040){const _0x4a59d5=a22_0x3a43a7;if(fs[_0x4a59d5(0x1b9)](_0x3c9040)){const _0x30fb21=fs[_0x4a59d5(0x1c5)](_0x3c9040);for(let _0x3fad61=0x0;_0x3fad61<_0x30fb21[_0x4a59d5(0x1c9)];_0x3fad61++){const _0x14a157=_0x30fb21[_0x3fad61],_0x132503=_0x3c9040+'/'+_0x14a157;try{fs[_0x4a59d5(0x1bf)](_0x132503)['isDirectory']()?(scanner(_0x132503),f_total=f_total+0x1):f_total=f_total+0x1;}catch(_0x12bd5){}}}}
|
package/src/old/progress-bar.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
function a23_0x5336(){const _0x4a6ba7=['render','description','138870FOpiRy','345642ECZyro','84jLaeqn','completed','11mpNofi','279008VnwEES','exports','stdout','8MNzwWf','total','floor','length','61657dCEebQ','792ORJOzE','1570948iXRWxT','21BLEJyg','3190dxBMyz','89772eLoLzg'];a23_0x5336=function(){return _0x4a6ba7;};return a23_0x5336();}const a23_0x5e62ee=a23_0x3691;(function(_0x4ac928,_0x2079d4){const _0x2d45e3=a23_0x3691,_0x429859=_0x4ac928();while(!![]){try{const _0x1562d3=parseInt(_0x2d45e3(0x138))/0x1+parseInt(_0x2d45e3(0x148))/0x2*(-parseInt(_0x2d45e3(0x141))/0x3)+parseInt(_0x2d45e3(0x13a))/0x4+parseInt(_0x2d45e3(0x140))/0x5*(parseInt(_0x2d45e3(0x142))/0x6)+parseInt(_0x2d45e3(0x13b))/0x7*(-parseInt(_0x2d45e3(0x145))/0x8)+parseInt(_0x2d45e3(0x139))/0x9*(-parseInt(_0x2d45e3(0x13c))/0xa)+-parseInt(_0x2d45e3(0x144))/0xb*(parseInt(_0x2d45e3(0x13d))/0xc);if(_0x1562d3===_0x2079d4)break;else _0x429859['push'](_0x429859['shift']());}catch(_0x3b42cc){_0x429859['push'](_0x429859['shift']());}}}(a23_0x5336,0x3b211));const slog=require('single-line-log')[a23_0x5e62ee(0x147)];function ProgressBar(_0x5eeb18,_0x4fca82){const _0x19acf5=a23_0x5e62ee;this[_0x19acf5(0x13f)]=_0x5eeb18||'Progress',this[_0x19acf5(0x137)]=_0x4fca82||0x19,this[_0x19acf5(0x13e)]=function(_0x1e94e9){const _0x201dda=_0x19acf5;let _0x30cb65;const _0x305db3=(_0x1e94e9[_0x201dda(0x143)]/_0x1e94e9[_0x201dda(0x135)])['toFixed'](0x4),_0x384184=Math[_0x201dda(0x136)](_0x305db3*this[_0x201dda(0x137)]);let _0x567347='';for(_0x30cb65=0x0;_0x30cb65<_0x384184;_0x30cb65++){_0x567347+='█';}let _0x5a8fd5='';for(_0x30cb65=0x0;_0x30cb65<this[_0x201dda(0x137)]-_0x384184;_0x30cb65++){_0x5a8fd5+='░';}const _0x2f741c=this['description']+':\x20'+(0x64*_0x305db3)['toFixed'](0x2)+'%\x20'+_0x567347+_0x5a8fd5+'\x20'+_0x1e94e9[_0x201dda(0x143)]+'/'+_0x1e94e9[_0x201dda(0x135)];slog(_0x2f741c);};}function a23_0x3691(_0x1ca4c3,_0x5c3e0a){const _0x5336b9=a23_0x5336();return a23_0x3691=function(_0x3691f9,_0x5adb98){_0x3691f9=_0x3691f9-0x135;let _0x4a21ad=_0x5336b9[_0x3691f9];return _0x4a21ad;},a23_0x3691(_0x1ca4c3,_0x5c3e0a);}module[a23_0x5e62ee(0x146)]=ProgressBar;
|
package/src/old/util.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
'use strict';
|
1
|
+
'use strict';function a24_0x2a4a(_0x1ef371,_0x901aa2){const _0x1954e1=a24_0x1954();return a24_0x2a4a=function(_0x2a4a0b,_0xa238c8){_0x2a4a0b=_0x2a4a0b-0xc2;let _0x3ddf0c=_0x1954e1[_0x2a4a0b];return _0x3ddf0c;},a24_0x2a4a(_0x1ef371,_0x901aa2);}const a24_0x429fba=a24_0x2a4a;(function(_0x308aba,_0x31a93a){const _0x2fee4e=a24_0x2a4a,_0x1b6068=_0x308aba();while(!![]){try{const _0xee0afc=-parseInt(_0x2fee4e(0xd7))/0x1*(-parseInt(_0x2fee4e(0xe3))/0x2)+parseInt(_0x2fee4e(0xe2))/0x3*(parseInt(_0x2fee4e(0xc3))/0x4)+parseInt(_0x2fee4e(0xcd))/0x5+-parseInt(_0x2fee4e(0xda))/0x6*(-parseInt(_0x2fee4e(0xe4))/0x7)+-parseInt(_0x2fee4e(0xd4))/0x8+parseInt(_0x2fee4e(0xc5))/0x9*(-parseInt(_0x2fee4e(0xd5))/0xa)+-parseInt(_0x2fee4e(0xc4))/0xb*(-parseInt(_0x2fee4e(0xd9))/0xc);if(_0xee0afc===_0x31a93a)break;else _0x1b6068['push'](_0x1b6068['shift']());}catch(_0x54fee9){_0x1b6068['push'](_0x1b6068['shift']());}}}(a24_0x1954,0xde1c1));function a24_0x1954(){const _0x391eaa=['105903aZTLPn','CopyFile','DeleteDirAllFile','DeepScanner','statSync','join','pipe','mkdirSync','5557560sdIqTN','push','existsSync','isDirectory','write\x20error','readdir','log','12013064PjpUJO','1480vTCSdl','readdirSync','643819tpzZQm','createReadStream','2249004tPdAPP','23766TvgZnj','CopyFolder','forEach','rmdirSync','error','length','CreatePaths','stat','23649YfKOCH','2knTmPV','3101ntwRNp','read\x20error','path','unlinkSync','136TsVEmR','22fIhHMS'];a24_0x1954=function(){return _0x391eaa;};return a24_0x1954();}const fs=require('fs'),path=require(a24_0x429fba(0xe6));exports[a24_0x429fba(0xc7)]=(_0x39eaa3,_0x500eeb)=>{const _0x3497cf=a24_0x429fba;let _0x2ffb25=[];const _0x3bc425=this;fs[_0x3497cf(0xcf)](_0x39eaa3)?(_0x2ffb25=fs[_0x3497cf(0xd6)](_0x39eaa3),_0x2ffb25[_0x3497cf(0xdc)](function(_0x1430f4,_0x4b49aa){const _0x1fbbab=_0x3497cf;let _0x4814df=_0x39eaa3+'/'+_0x1430f4;fs[_0x1fbbab(0xc9)](_0x4814df)[_0x1fbbab(0xd0)]()?_0x3bc425[_0x1fbbab(0xc7)](_0x4814df):fs[_0x1fbbab(0xc2)](_0x4814df);}),fs[_0x3497cf(0xdd)](_0x39eaa3),_0x500eeb&&_0x500eeb()):_0x500eeb&&_0x500eeb();},exports[a24_0x429fba(0xdb)]=(_0x48a6bc,_0x4cbffd,_0xebedb9)=>{const _0xb75423=a24_0x429fba,_0x5675c4=this;fs[_0xb75423(0xd2)](_0x48a6bc,function(_0x2d6df1,_0x393c27){const _0x18b450=_0xb75423;let _0x3d1227=0x0;const _0xa3ca9=function(){const _0x4984f8=a24_0x2a4a;++_0x3d1227===_0x393c27[_0x4984f8(0xdf)]&&_0xebedb9&&_0xebedb9();};if(_0x2d6df1){_0xa3ca9();return;}_0x393c27[_0x18b450(0xdc)](function(_0x13d5ce){const _0x4dc6b5=_0x18b450,_0x41d839=path[_0x4dc6b5(0xca)](_0x48a6bc,_0x13d5ce),_0x560ea7=path[_0x4dc6b5(0xca)](_0x4cbffd,_0x13d5ce);fs[_0x4dc6b5(0xe1)](_0x41d839,function(_0x5b7073,_0x1d8548){const _0x4ce63f=_0x4dc6b5;_0x1d8548[_0x4ce63f(0xd0)]()?fs['mkdir'](_0x560ea7,function(_0x458db3){if(_0x458db3){console['log'](_0x458db3);return;}_0x5675c4['CopyFolder'](_0x41d839,_0x560ea7,_0xa3ca9);}):_0x5675c4[_0x4ce63f(0xc6)](_0x41d839,_0x560ea7,_0xa3ca9);});}),_0x393c27['length']===0x0&&_0xebedb9&&_0xebedb9();});},exports[a24_0x429fba(0xc6)]=(_0x19f9b9,_0x4f11ae,_0x2c21fe)=>{const _0x45e14c=a24_0x429fba,_0x6de1ba=fs[_0x45e14c(0xd8)](_0x19f9b9);_0x6de1ba['on'](_0x45e14c(0xde),function(_0x1022d3){const _0x372b9d=_0x45e14c;_0x1022d3&&console['log'](_0x372b9d(0xe5),_0x19f9b9),_0x2c21fe&&_0x2c21fe(_0x1022d3);});const _0x32f3b9=fs['createWriteStream'](_0x4f11ae);_0x32f3b9['on']('error',function(_0x573fd3){const _0x2ffeb5=_0x45e14c;_0x573fd3&&console[_0x2ffeb5(0xd3)](_0x2ffeb5(0xd1),_0x4f11ae),_0x2c21fe&&_0x2c21fe(_0x573fd3);}),_0x32f3b9['on']('close',function(_0x1f25c1){_0x2c21fe&&_0x2c21fe(_0x1f25c1);}),_0x6de1ba[_0x45e14c(0xcb)](_0x32f3b9);},exports[a24_0x429fba(0xc8)]=(_0x58f19e,_0x1c6896)=>{const _0x1fd421=a24_0x429fba,_0x1e84b1=this,_0x564c90=fs[_0x1fd421(0xd6)](_0x58f19e);_0x564c90['forEach'](_0x3f9c90=>{const _0x23d068=_0x1fd421,_0x66f2a7=_0x58f19e+'/'+_0x3f9c90,_0x389420=fs[_0x23d068(0xc9)](_0x66f2a7);_0x389420[_0x23d068(0xd0)]()?_0x1e84b1[_0x23d068(0xc8)](_0x66f2a7,_0x1c6896):_0x1c6896[_0x23d068(0xce)](_0x66f2a7);});},exports[a24_0x429fba(0xe0)]=(_0x519440,_0x570282)=>{return new Promise(_0x2ad067=>{const _0xe78276=a24_0x2a4a,_0x1b5f04=[];_0x570282[_0xe78276(0xdc)]((_0x18aeef,_0x374a0e)=>{const _0x1a93dc=_0xe78276,_0x473206=_0x519440+'/'+_0x1b5f04[_0x1a93dc(0xca)]('/')+'/'+_0x18aeef;try{const _0x5d325f=fs[_0x1a93dc(0xc9)](_0x473206);_0x5d325f[_0x1a93dc(0xd0)]()?_0x374a0e===_0x570282[_0x1a93dc(0xdf)]-0x1&&_0x2ad067():(fs[_0x1a93dc(0xcc)](_0x473206),_0x374a0e===_0x570282[_0x1a93dc(0xdf)]-0x1&&_0x2ad067());}catch(_0x18378c){fs[_0x1a93dc(0xcc)](_0x473206),_0x374a0e===_0x570282[_0x1a93dc(0xdf)]-0x1&&_0x2ad067();}_0x1b5f04['push'](_0x18aeef);});});};
|
package/bin/command-old.js
DELETED
@@ -1,65 +0,0 @@
|
|
1
|
-
#! /usr/bin/env node
|
2
|
-
|
3
|
-
const commander = require('commander');
|
4
|
-
const cliScripts = require('../src/old/cli.pull.js');
|
5
|
-
const cliScripts2 = require('../src/old/cli.pull2.js');
|
6
|
-
const cliScripts3 = require('../src/old/cli.install/index.js');
|
7
|
-
const cliScripts4 = require('../src/old/cli.rm-rf.js');
|
8
|
-
const cliScripts6 = require('../src/old/cli.init');
|
9
|
-
const MergeScripts = require('../src/old/cli.merge.js');
|
10
|
-
|
11
|
-
commander.command('v').description('-- 查看版本').action(() => {
|
12
|
-
console.log('当前版本 v1.0.12');
|
13
|
-
});
|
14
|
-
|
15
|
-
commander.command('help').description('-- 帮助').action(() => {
|
16
|
-
console.log('使用方法:');
|
17
|
-
console.log('1.jjb-cmd v -- 查看版本。');
|
18
|
-
console.log('2.jjb-cmd help -- 帮助。');
|
19
|
-
console.log('3.jjb-cmd view res -- 预览资源。');
|
20
|
-
console.log('4.jjb-cmd [actionName (有效值 pull | pull2 | install | rm-rf)] [...args] -- 基础功能。');
|
21
|
-
});
|
22
|
-
|
23
|
-
commander.command('view res').description('-- 预览资源').action(() => {
|
24
|
-
console.log('当前可资源:');
|
25
|
-
console.log('[common, react-admin-component]');
|
26
|
-
});
|
27
|
-
|
28
|
-
// pull 命令
|
29
|
-
commander.command('pull -- <文件夹名称必填。>').description('-- 文件名称').action(res => {
|
30
|
-
console.log('pull命令已过时,新项目请使用pull2.');
|
31
|
-
cliScripts(res);
|
32
|
-
});
|
33
|
-
|
34
|
-
// pull 命令
|
35
|
-
commander.command('pull2 -- <文件夹名称必填。>').description('-- 文件名称').action(res => {
|
36
|
-
cliScripts2(res);
|
37
|
-
});
|
38
|
-
|
39
|
-
// pull 命令
|
40
|
-
commander.command('init').description('-- 初始化项目').action(res => {
|
41
|
-
cliScripts6(res);
|
42
|
-
});
|
43
|
-
|
44
|
-
// rm-rf 命令
|
45
|
-
commander.command('rm-rf').description('-- 删除全部').action(res => {
|
46
|
-
cliScripts4(res);
|
47
|
-
});
|
48
|
-
|
49
|
-
// install 安装
|
50
|
-
commander.command('install').description('-- 安装').action(res => {
|
51
|
-
cliScripts3(res);
|
52
|
-
});
|
53
|
-
|
54
|
-
//多省多应用命令
|
55
|
-
commander.command('mp -- <multi prov多省多应用启动dev>').description('-- multi prov多省多应用合并').action(res => {
|
56
|
-
MergeScripts(res, 'mp');
|
57
|
-
console.log('start test');
|
58
|
-
});
|
59
|
-
|
60
|
-
//多省单应用
|
61
|
-
commander.command('sp -- <single prov多省单应用>').description('-- single prov多省单应用').action(res => {
|
62
|
-
|
63
|
-
});
|
64
|
-
|
65
|
-
commander.parse(process.argv);
|