+5
-1
@@ -91,3 +91,2 @@ #!/usr/bin/env node | ||
| .action(async (packages, options) => { | ||
| if (!checkNecFile('.crootrc.js')) { | ||
@@ -238,2 +237,7 @@ commandLoggerError('请先进入项目工程目录'); | ||
| // program.command('npm [packages...]').description('执行npm的方法') | ||
| // .action(async (packages, options) => { | ||
| // }); | ||
| // 性能监控 | ||
@@ -240,0 +244,0 @@ program.command('performance').description('性能检查'); |
@@ -252,2 +252,3 @@ const shelljs = require('shelljs'); | ||
| }; | ||
| // const memoryUsage = process.memoryUsage(); | ||
@@ -272,4 +273,5 @@ // 通过命令行执行命令 | ||
| // 清除终端 | ||
| hasClear && console.clear(); | ||
| // console.log('[log stdout]', handleOutput(`命令执行中, 日志信息: ${data.toString()}`)); | ||
| // hasClear && console.clear(); | ||
| console.log('[log stdout]', handleOutput(`命令执行中, 日志信息: ${data.toString()}`)); | ||
| // console.log(`Heap Used: ${memoryUsage.heapUsed / 1024 / 1024} MB`); | ||
| resolve( | ||
@@ -276,0 +278,0 @@ responseFormat({ |
+23
-13
@@ -13,15 +13,25 @@ const shelljs = require('shelljs'); | ||
| try { | ||
| const SYSTEMSTATUS = await isWin(); | ||
| if (!SYSTEMSTATUS) { | ||
| // await theNSpecifiedVersion(); | ||
| // await theNodeSpecifiedVersion(); | ||
| // await theNpmSpecifiedVersion(); | ||
| } | ||
| await thePnpmSpecifiedVersion(); | ||
| resolve( | ||
| responseFormat({ | ||
| code: 200, | ||
| success: true | ||
| }) | ||
| ); | ||
| checkVersion('pnpm', version).then(async resp => { | ||
| if (resp.code === 200) { | ||
| resolve({ | ||
| code: 200, | ||
| success: true | ||
| }) | ||
| } else { | ||
| const SYSTEMSTATUS = await isWin(); | ||
| if (!SYSTEMSTATUS) { | ||
| // await theNSpecifiedVersion(); | ||
| // await theNodeSpecifiedVersion(); | ||
| // await theNpmSpecifiedVersion(); | ||
| } | ||
| await thePnpmSpecifiedVersion(); | ||
| resolve( | ||
| responseFormat({ | ||
| code: 200, | ||
| success: true | ||
| }) | ||
| ); | ||
| } | ||
| }); | ||
| } catch (e) { | ||
@@ -28,0 +38,0 @@ mlog(e); |
+1
-1
| { | ||
| "name": "crootfast", | ||
| "version": "0.1.62", | ||
| "version": "0.1.63", | ||
| "description": "大前端工程化命令行脚手架", | ||
@@ -5,0 +5,0 @@ "main": "bin/index.js", |
| const { ModuleFederationPlugin } = require('webpack').container; | ||
| const { HotModuleReplacementPlugin } = require('webpack'); | ||
| // const ExternalTemplateRemotesPlugin = require("external-remotes-plugin"); | ||
@@ -40,2 +41,6 @@ | ||
| }); | ||
| webpackMicroConfig.base.plugins.push( | ||
| // 热加载 | ||
| new HotModuleReplacementPlugin() | ||
| ); | ||
| } | ||
@@ -49,2 +54,2 @@ } | ||
| module.exports = webpackMicroConfig; | ||
| module.exports = webpackMicroConfig; |
@@ -31,3 +31,3 @@ const { merge } = require("webpack-merge"); | ||
| // 开发中用到的"动态加载的模块import()"。 require.ensure是webpack v2中的api。 | ||
| chunkFilename: "js/[name].chunk.[contenthash:7].min.js" // [hash:9]/[chunkhash:9]/[contenthash:9] | ||
| chunkFilename: "js/[name].chunk.[contenthash:7].min.js" // [hash:9] [chunkhash:9] [contenthash:9] | ||
| }, | ||
@@ -34,0 +34,0 @@ // 可以设置模块如何被解析。 |
| "use strict"; | ||
| const fs = require("fs"); | ||
| // const fs = require("fs"); | ||
| // webpack | ||
@@ -4,0 +4,0 @@ const Webpack = require("webpack"); |
@@ -136,3 +136,3 @@ "use strict"; | ||
| }) | ||
| ], | ||
| ] | ||
| }; | ||
@@ -139,0 +139,0 @@ |
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
AI-detected potential code anomaly
Supply chain riskAI has identified unusual behaviors that may pose a security risk.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
138738
0.49%3281
0.55%39
-4.88%