Comparing version 1.0.2 to 1.0.3
#!/usr/bin/env node | ||
const _0x1fcb23=_0x2999;function _0x2999(r,e){const t=_0x2e6e();return(_0x2999=function(r,e){return r-=265,t[r]})(r,e)}!function(){for(var r=_0x2999,e=_0x2e6e();;)try{if(417934==-parseInt(r(286))*(-parseInt(r(269))/2)+-parseInt(r(276))/3+-parseInt(r(275))/4+-parseInt(r(267))/5+parseInt(r(282))/6+-parseInt(r(288))/7+parseInt(r(270))/8)break;e.push(e.shift())}catch(r){e.push(e.shift())}}();import _0x2976cd from"fs";import _0x5beaa1 from"path";import _0x4ad4d3 from"chalk";import _0x5eca8f from"./create.js";import{program}from"commander";const rootDir=process[_0x1fcb23(283)]();function _0x2e6e(){const r=["bold","2592968KbCusw","744726gHNoCr","resolve","quickly create a front-end project.","exit","create"," The Project Already Exists!\n","1375668NedbgN","cwd","name","accessSync","68944WRZVeV","-V, --version","3127551sLLQUW","action","qm-toolkit","2438405fcChgk","output the version number","12HZZWce","12847600bBheiR","constants","F_OK","red"];return(_0x2e6e=function(){return r})()}function isExisting(r){var e=_0x1fcb23;try{return _0x2976cd[e(285)](r,_0x2976cd[e(271)][e(272)]),!0}catch(r){return!1}}program.version("1.0.0",_0x1fcb23(287),_0x1fcb23(268))[_0x1fcb23(284)](_0x1fcb23(266)).option("-c, --create <projectName>",_0x1fcb23(278))[_0x1fcb23(265)](async function(r){var e=_0x1fcb23;e(280)in r&&(r=r[e(280)],isExisting(_0x5beaa1[e(277)](rootDir,r))&&(process.stdout.write(_0x4ad4d3[e(274)][e(273)](e(281))),process[e(279)](1)),_0x5eca8f(r))}),program.parse(process.argv); | ||
const _0x5bb676=_0x25c1;!function(){for(var r=_0x25c1,t=_0x1f6f();;)try{if(923064==+parseInt(r(439))+parseInt(r(424))/2*(parseInt(r(423))/3)+parseInt(r(442))/4*(parseInt(r(430))/5)+parseInt(r(444))/6+parseInt(r(429))/7*(parseInt(r(420))/8)+parseInt(r(431))/9+-parseInt(r(436))/10)break;t.push(t.shift())}catch(r){t.push(t.shift())}}();import _0x1bee07 from"fs";import _0x3d2e2f from"path";function _0x25c1(r,t){const e=_0x1f6f();return(_0x25c1=function(r,t){return r-=418,e[r]})(r,t)}import _0x4c9a03 from"chalk";import _0x52439f from"./create.js";function _0x1f6f(){const r=["write","5225298WCSqfo","argv","resolve","quickly create a front-end project.","72qNfyCO","red","action","2949IMWRga","2966kdgFOV","bold","F_OK","version","stdout","20363bKBvOa","18025rjprVq","12449484xUTAUC"," The Project Already Exists!\n","exit","output the version number","create","46068680lvrGuy","parse","name","1406068EsIegG","option","1.0.0","428OCCvhR"];return(_0x1f6f=function(){return r})()}import{program}from"commander";const rootDir=process.cwd();function isExisting(r){var t=_0x5bb676;try{return _0x1bee07.accessSync(r,_0x1bee07.constants[t(426)]),!0}catch(r){return!1}}program[_0x5bb676(427)](_0x5bb676(441),"-V, --version",_0x5bb676(434))[_0x5bb676(438)]("qm-toolkit")[_0x5bb676(440)]("-c, --create <projectName>",_0x5bb676(419))[_0x5bb676(422)](async function(r){var t=_0x5bb676;"create"in r&&(r=r[t(435)],isExisting(_0x3d2e2f[t(418)](rootDir,r))&&(process[t(428)][t(443)](_0x4c9a03[t(425)][t(421)](t(432))),process[t(433)](1)),_0x52439f(r))}),program[_0x5bb676(437)](process[_0x5bb676(445)]); |
#!/usr/bin/env node | ||
const _0x5c9d89=_0x2fcd;!function(){for(var e=_0x2fcd,r=_0x4fec();;)try{if(227618==+parseInt(e(184))*(-parseInt(e(149))/2)+parseInt(e(168))/3*(-parseInt(e(160))/4)+parseInt(e(146))/5+-parseInt(e(152))/6*(parseInt(e(167))/7)+-parseInt(e(185))/8*(parseInt(e(165))/9)+-parseInt(e(173))/10*(-parseInt(e(174))/11)+-parseInt(e(175))/12*(-parseInt(e(148))/13))break;r.push(r.shift())}catch(e){r.push(r.shift())}}();import _0xaf80ae from"path";function _0x2fcd(e,r){const t=_0x4fec();return(_0x2fcd=function(e,r){return e-=139,t[e]})(e,r)}import _0x5470d6 from"chalk";import _0x1103d7 from"crypto";import _0x5523c0 from"inquirer";import _0x15ecff from"prettier";import _0x14991b from"node:fs/promises";import{fileURLToPath}from"url";function _0x4fec(){const e=["parse","13956FXqijG","red","stringify",".prettierrc.cjs","confirm","ERR_OSSL_BAD_DECRYPT","master","../certificates/id_rsa","16rqxgGB","password","Please Input Project Version(format: xx.xx.xx): ","1.0.0","code","203517Gfgkse"," ","819nNVbXY","319548nJRDaW","toString","redux","privateDecrypt","version","645530yPAgBk","22CNIeJM","12xCUwSj","\n 密码输入错误!\n","resolve","stdout","stack","utf8","resolveConfig","execSync","./src","346029Llbank","152aiqunG","npx prettier -w ","passwd","input","url","../certificates/sign","Please Input The User Password: ","format","1414030uzqcKX","write","16764644gAidJf","2BzmKge","test"];return(_0x4fec=function(){return e})()}import _0x110de6 from"child_process";import _0x2b9c8b from"./downloadRepository.js";const __dirname=fileURLToPath(new URL("./",import.meta[_0x5c9d89(142)])),rootDir=process.cwd(),questions=[{name:_0x5c9d89(170),default:!0,type:_0x5c9d89(156),message:"Do You Want To Import Redux: "},{type:_0x5c9d89(141),name:_0x5c9d89(172),default:_0x5c9d89(163),message:_0x5c9d89(162),validate:function(e){return!!/^[1-9][0-9]*\.([1-9][0-9]*|0)\.([1-9][0-9]*|0)$/[_0x5c9d89(150)](e)||"Please Input The Version Number In The Format"}},{name:_0x5c9d89(140),type:_0x5c9d89(161),message:_0x5c9d89(144)}];export default async function create(e){var r=_0x5c9d89,t=_0xaf80ae.isAbsolute(e)?e:_0xaf80ae[r(177)](rootDir,e),{version:a,redux:s,passwd:n}=await _0x5523c0.prompt(questions);try{var i=await _0x14991b.readFile(_0xaf80ae[r(177)](__dirname,r(143))),o=await _0x14991b.readFile(_0xaf80ae[r(177)](__dirname,r(159)),r(180)),c=_0x1103d7[r(171)]({key:o,passphrase:n},i)[r(169)](),x=s?"with-redux":r(158),f=(await _0x2b9c8b(c,x,t),_0xaf80ae[r(177)](t,"package.json")),p=JSON[r(151)](await _0x14991b.readFile(f,"utf8")),_=_0xaf80ae[r(177)](t,r(155)),d=(p[r(172)]=a,p.name=e,await _0x15ecff[r(181)](_)),m=await _0x15ecff[r(145)](JSON[r(154)](p),{...d,filepath:f});await _0x14991b.writeFile(f,m),_0x110de6[r(182)](r(139)+_0xaf80ae[r(177)](t,r(183)))}catch(e){e?.[r(164)]===r(157)?process[r(178)][r(147)](_0x5470d6[r(153)](r(176))):(o="\n"+e[r(179)][r(169)]().replace(/^\b/gm,r(166))+"\n",process[r(178)][r(147)](_0x5470d6[r(153)](o)))}} | ||
const _0x572e7e=_0x31ec;!function(){for(var e=_0x31ec,r=_0x149f();;)try{if(148391==+parseInt(e(167))*(-parseInt(e(192))/2)+parseInt(e(170))/3*(-parseInt(e(168))/4)+parseInt(e(197))/5+-parseInt(e(187))/6+-parseInt(e(185))/7+-parseInt(e(188))/8+parseInt(e(190))/9)break;r.push(r.shift())}catch(e){r.push(r.shift())}}();import _0x3f186b from"path";import _0x51dc33 from"chalk";import _0x5c8e90 from"crypto";import _0x537f6f from"inquirer";import _0x2bf634 from"prettier";function _0x31ec(e,r){const t=_0x149f();return(_0x31ec=function(e,r){return e-=165,t[e]})(e,r)}import _0x4d48ca from"node:fs/promises";import{fileURLToPath}from"url";import _0x224b55 from"child_process";import _0x3e1e41 from"./downloadRepository.js";function _0x149f(){const e=["Please Input The User Password: "," ","privateDecrypt","1301RhRTmf","876940AtlHUz","parse","3vCMnmH","stringify","\n 密码输入错误!\n","stdout","toString","Do You Want To Import Redux: ","isAbsolute","master","code","test","redux","url","input","../certificates/id_rsa","resolveConfig","1928927OcLzgH","./src","490968DjDFos","1470520UoODlA","writeFile","9277425qrAJJd","resolve","254VYCAsZ","ERR_OSSL_BAD_DECRYPT","../certificates/sign","version","utf8","216160UpvuXv","package.json","write","stack","cwd","password","readFile","red","Please Input Project Version(format: xx.xx.xx): ","execSync"];return(_0x149f=function(){return e})()}const __dirname=fileURLToPath(new URL("./",import.meta[_0x572e7e(181)])),rootDir=process[_0x572e7e(201)](),questions=[{name:_0x572e7e(180),default:!0,type:"confirm",message:_0x572e7e(175)},{type:_0x572e7e(182),name:_0x572e7e(195),default:"1.0.0",message:_0x572e7e(205),validate:function(e){return!!/^[1-9][0-9]*\.([1-9][0-9]*|0)\.([1-9][0-9]*|0)$/[_0x572e7e(179)](e)||"Please Input The Version Number In The Format"}},{name:"passwd",type:_0x572e7e(202),message:_0x572e7e(207)}];export default async function create(e){var r=_0x572e7e,t=_0x3f186b[r(176)](e)?e:_0x3f186b.resolve(rootDir,e),{version:a,redux:s,passwd:o}=await _0x537f6f.prompt(questions);try{var i=await _0x4d48ca[r(203)](_0x3f186b[r(191)](__dirname,r(194))),n=await _0x4d48ca.readFile(_0x3f186b.resolve(__dirname,r(183)),r(196)),x=_0x5c8e90[r(166)]({key:n,passphrase:o},i)[r(174)](),_=s?"with-redux":r(177),c=(await _0x3e1e41(x,_,t),_0x3f186b[r(191)](t,r(198))),f=JSON[r(169)](await _0x4d48ca.readFile(c,"utf8")),p=_0x3f186b[r(191)](t,".prettierrc.cjs"),m=(f[r(195)]=a,f.name=e,await _0x2bf634[r(184)](p)),d=await _0x2bf634.format(JSON[r(171)](f),{...m,filepath:c});await _0x4d48ca[r(189)](c,d),_0x224b55[r(206)]("npx prettier -w "+_0x3f186b[r(191)](t,r(186)))}catch(e){e?.[r(178)]===r(193)?process[r(173)][r(199)](_0x51dc33.red(r(172))):(n="\n"+e[r(200)][r(174)]().replace(/^\b/gm,r(165))+"\n",process[r(173)][r(199)](_0x51dc33[r(204)](n)))}} |
#!/usr/bin/env node | ||
const _0x46edbb=_0x1192;function _0x3244(){const r=["36tXgafv","resolve","418736OpArfo",".zip -C ","2211940zwAHZa","catch","step","repeat","bold","gray","white","mkdir","curl ","isAbsolute","then","green","write","desc","asc","35gUCTvV","padEnd","floor","2449059Qwllgt","cwd","270092dUrdLM","2931590iZJyym","next","45EfQCfW","number","1509928hxuXik",".zip","stdout","./qm-frontend-frame","148197qxPmOE"];return(_0x3244=function(){return r})()}function _0x1192(r,t){const e=_0x3244();return(_0x1192=function(r,t){return r-=202,e[r]})(r,t)}!function(){for(var r=_0x1192,t=_0x3244();;)try{if(789479==-parseInt(r(217))+parseInt(r(226))/2+parseInt(r(210))/3+parseInt(r(212))/4*(parseInt(r(207))/5)+-parseInt(r(222))/6*(parseInt(r(221))/7)+-parseInt(r(224))/8*(parseInt(r(215))/9)+parseInt(r(213))/10)break;t.push(t.shift())}catch(r){t.push(t.shift())}}();import _0x3966d1 from"path";import _0x31078c from"chalk";import _0x40a119 from"node:fs/promises";import _0x278d86 from"child_process";const rootDir=process[_0x46edbb(211)]();async function download(r,t,e){var n=_0x46edbb,r=(_0x3966d1[n(235)](e)||(e=_0x3966d1.resolve(rootDir,e)),r+t+n(218));try{await _0x40a119[n(233)](e),_0x278d86.execSync(n(234)+r+" -o "+e+".zip -s"),_0x278d86.execSync("tar -xzf "+e+n(225)+e),await _0x40a119.cp(_0x3966d1[n(223)](e,"./qm-frontend-frame"),e,{force:!0,recursive:!0}),await _0x40a119.rm(_0x3966d1.resolve(e,n(220)),{recursive:!0,force:!0}),await _0x40a119.rm(e+n(218),{recursive:!0,force:!0})}catch(r){throw r}}export default async function(i,x,u){return new Promise(function(e,t){const r=_0x1192,n=taskIterator(0,100,1,printProgressBar);let o=null,a=!1,c=0;function s(r,t){var e=_0x1192;return{done:a,value:c}=n[e(214)](),a||c>=r?t?.():void(o=setTimeout(()=>s(r,t),50))}s(80),download(i,x,u)[r(202)](()=>{const t=r;o&&clearTimeout(o),n[t(228)](4),s(100,function(){var r=t;process.stdout[r(204)]("\n\n"),e(null)})})[r(227)](r=>{o&&clearTimeout(o),t(r)})})}function taskIterator(r,t,e=1,n){const o=_0x46edbb;let a=!1,c=r;const s=0<e?o(206):o(205);return{next:function(r){return typeof r===o(216)&&(c=r),c+=e,c=(r=o,(a=s===r(206)?c>=t:c<=t)?t:c),n&&n(c),{value:c,done:a}},step:function(r){e=r}}}function printProgressBar(r){var t=_0x46edbb,e="",e=_0x31078c[t(230)][t(203)](" download ");e=(e=(e=(e+=_0x31078c[t(231)]("["))+_0x31078c.bold[t(232)]("="[t(229)](Math[t(209)](r/5))[t(208)](20," ")))+_0x31078c[t(231)]("]")+" ")+_0x31078c[t(230)][t(203)](r+"%")+"\r",process[t(219)][t(204)](e)} | ||
const _0x187eed=_0x5b4e;!function(){for(var e=_0x5b4e,r=_0x2fb9();;)try{if(468059==-parseInt(e(379))*(parseInt(e(367))/2)+parseInt(e(377))/3*(-parseInt(e(369))/4)+parseInt(e(390))/5*(-parseInt(e(374))/6)+parseInt(e(392))/7+-parseInt(e(395))/8*(parseInt(e(378))/9)+-parseInt(e(372))/10+parseInt(e(393))/11)break;r.push(r.shift())}catch(e){r.push(r.shift())}}();import _0x3fbb70 from"path";import _0x10a731 from"chalk";function _0x5b4e(e,r){const t=_0x2fb9();return(_0x5b4e=function(e,r){return e-=366,t[e]})(e,r)}import _0x73fb9c from"node:fs/promises";import _0x5c76d2 from"child_process";const rootDir=process[_0x187eed(387)]();async function download(e,r,t){var n=_0x187eed,e=(_0x3fbb70[n(375)](t)||(t=_0x3fbb70[n(371)](rootDir,t)),e+r+n(398));try{await _0x73fb9c[n(373)](t),_0x5c76d2.execSync(n(381)+e+n(389)+t+n(384)),_0x5c76d2[n(394)](n(376)+t+".zip -C "+t),await _0x73fb9c.cp(_0x3fbb70[n(371)](t,n(396)),t,{force:!0,recursive:!0}),await _0x73fb9c.rm(_0x3fbb70[n(371)](t,n(396)),{recursive:!0,force:!0}),await _0x73fb9c.rm(t+n(398),{recursive:!0,force:!0})}catch(e){throw e}}export default async function(e,i,f){return new Promise(function(t,r){const n=taskIterator(0,100,1,printProgressBar);let o=null,c=!1,a=0;function s(e,r){var t=_0x5b4e;return{done:c,value:a}=n[t(399)](),c||a>=e?r?.():void(o=setTimeout(()=>s(e,r),50))}s(80),download(e,i,f).then(()=>{const r=_0x5b4e;o&&clearTimeout(o),n[r(382)](4),s(100,function(){var e=r;process[e(368)][e(386)]("\n\n"),t(null)})}).catch(e=>{o&&clearTimeout(o),r(e)})})}function _0x2fb9(){const e=[".zip -s","number","write","cwd"," download "," -o ","547945AzKlOr","green","477547EQAYhm","26094893uWZTus","execSync","1024vYklde","./qm-frontend-frame","white",".zip","next","gray","asc","1166ajpiwT","stdout","196gcnCLW","bold","resolve","4226490ONsuWK","mkdir","6cqQvrs","isAbsolute","tar -xzf ","19554FJnPtO","18999OZjuyD","1459FTvgut","desc","curl ","step","repeat"];return(_0x2fb9=function(){return e})()}function taskIterator(e,r,t=1,n){const o=_0x187eed;let c=!1,a=e;const s=0<t?o(366):o(380);return{next:function(e){return typeof e===o(385)&&(a=e),a+=t,a=(c="asc"===s?a>=r:a<=r)?r:a,n&&n(a),{value:a,done:c}},step:function(e){t=e}}}function printProgressBar(e){var r=_0x187eed,t="",t=_0x10a731.bold[r(391)](r(388));t=(t=(t=(t+=_0x10a731[r(400)]("["))+_0x10a731.bold[r(397)]("="[r(383)](Math.floor(e/5)).padEnd(20," ")))+_0x10a731[r(400)]("]")+" ")+_0x10a731[r(370)].green(e+"%")+"\r",process[r(368)][r(386)](t)} |
{ | ||
"name": "qm-toolkit", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"type": "module", | ||
@@ -24,2 +24,3 @@ "description": "an hui qian mo toolkit", | ||
"@types/node": "^20.12.2", | ||
"@types/inquirer": "^9.0.7", | ||
"cross-env": "^7.0.3", | ||
@@ -35,3 +36,2 @@ "gulp": "^5.0.0", | ||
"dependencies": { | ||
"@types/inquirer": "^9.0.7", | ||
"prettier": "^3.2.5", | ||
@@ -38,0 +38,0 @@ "chalk": "^5.3.0", |
4
9521
14
- Removed@types/inquirer@^9.0.7
- Removed@types/inquirer@9.0.7(transitive)
- Removed@types/node@22.9.0(transitive)
- Removed@types/through@0.0.33(transitive)
- Removedundici-types@6.19.8(transitive)