
Security News
/Research
Wallet-Draining npm Package Impersonates Nodemailer to Hijack Crypto Transactions
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
@ismarslomic/mermaid.cli
Advanced tools
Command-line interface for mermaid.
This CLI tool takes a mermaid definition file as input and generates svg/png/pdf file as output.
Some people are having issue installing this tool globally. Installing it locally is an alternative solution:
yarn add @ismarslomic/mermaid.cli
./node_modules/.bin/mmdc -h
Or use NPM:
npm install @ismarslomic/mermaid.cli
./node_modules/.bin/mmdc -h
❗️ We do NOT recommend installing it globally because both YARN and NPM could fail to install a command line tool globally properly due to weird permission issues.
yarn global add @ismarslomic/mermaid.cli
Or
npm install -g @ismarslomic/mermaid.cli
mmdc -i input.mmd -o output.svg
mmdc -i input.mmd -o output.png
mmdc -i input.mmd -o output.pdf
mmdc -i input.mmd -o output.svg -w 1024 -H 768
mmdc -i input.mmd -t forest
mmdc -i input.mmd -o output.png -b '#FFF000'
mmdc -i input.mmd -o output.png -b transparent
Please run the following command to see the latest options:
mmdc -h
The following is for your quick reference (may not be the latest version):
Usage: mmdc [options]
Options:
-V, --version output the version number
-t, --theme [theme] Theme of the chart, could be default, forest, dark or neutral. Optional. Default: default (default: default)
-w, --width [width] Width of the page. Optional. Default: 800 (default: 800)
-H, --height [height] Height of the page. Optional. Default: 600 (default: 600)
-i, --input <input> Input mermaid file. Required.
-o, --output [output] Output file. It should be either svg, png or pdf. Optional. Default: input + ".svg"
-b, --backgroundColor [backgroundColor] Background color. Example: transparent, red, '#F0F0F0'. Optional. Default: white
-c, --configFile [configFile] JSON configuration file for mermaid. Optional
-C, --cssFile [cssFile] CSS file for the page. Optional
-s, --scale [scale] Puppeteer scale factor, default 1. Optional
-p --puppeteerConfigFile [puppeteerConfigFile] JSON configuration file for puppeteer. Optional
-h, --help output usage information
node:8281) UnhandledPromiseRejectionWarning: Error: Failed to launch chrome!
[0416/092218.828861:ERROR:zygote_host_impl_linux.cc(88)] Running as root without --no-sandbox is not supported. See https://crbug.com/638180.
(node:8191) UnhandledPromiseRejectionWarning: Error: Failed to launch chrome!
[0416/091938.210735:FATAL:zygote_host_impl_linux.cc(124)] No usable sandbox! Update your kernel or see https://chromium.googlesource.com/chromium/src/+/master/docs/linux_suid_sandbox_development.md for more information on developing with the SUID sandbox. If you want to live dangerously and need an immediate workaround, you can try using --no-sandbox.
First and foremost, you should not run as root and you should upgrade your Linux kernel to latest version.
But if you don't want to follow the advice above and just want to disable sandbox, here you go:
Create a puppeteer-config.json
file:
{
"args": ["--no-sandbox"]
}
And when you invoke mmdc
:
mmdc -p puppeteer-config.json ...
yarn install
source copy_modules.sh
yarn run test
// Bump version number in package.json
git tag <major.minor.patch>
git push
git push --tags origin master:HEAD
npm publish --access public
FAQs
Command-line interface for mermaid
We found that @ismarslomic/mermaid.cli 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
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
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.