
Security News
Risky Biz Podcast: Making Reachability Analysis Work in Real-World Codebases
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
mirai-core-js
Advanced tools
mirai-core-js 是一个简单的 mirai Javascript 启动器。他并没有为你提供任何的 mirai额外 的功能,而是提供了一个简单的启动器,你可以基于它方便的来在你的 Node.js 程序中控制 mirai 的命令行版本。
npm install mirai-core-js
或者使用yarn
yarn add mirai-core-js
mirai-core-js 接管了 mirai 的命令行版本的输入输出,以方便你在 Node.js 中控制 mirai的启动、停止、重启、执行控制台命令等操作。
const Mirai = require('mirai-core-js')
const mirai = new Mirai({
javaPath: path.resolve('./mcl_core/java/bin/java'), // java的路径
mclPath: path.resolve('./mcl_core'), // mirai 的根目录
onStatusChange: (status) => {
console.log(status);
},
onOutput: (data: string) => {
if (!data) return;
},
});
默认情况下,会自动启动mirai进程, 你可以通过设置配置autoStart: false
然后 通过 mirai.start()
来手动启动mirai进程。
启动mirai进程
停止mirai进程
重启mirai进程
执行控制台命令, 例如 mirai.exec('/help')
参数 | 类型 | 默认值 | 描述 |
---|---|---|---|
javaPath | string | java可执行文件的路径 | |
mclPath | string | mirai的根目录 | |
autoStart | boolean | true | 是否自动启动mirai进程 |
onStatusChange | function | mirai进程状态改变时的回调函数 | |
onOutput | function | mirai进程输出时的回调函数 |
MIT
FAQs
mirai-core wrapper for JavaScript
The npm package mirai-core-js receives a total of 2 weekly downloads. As such, mirai-core-js popularity was classified as not popular.
We found that mirai-core-js demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
Security News
/Research
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.
Security News
CISA’s 2025 draft SBOM guidance adds new fields like hashes, licenses, and tool metadata to make software inventories more actionable.