Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
@chrisguest75/09_shell_mandlebrot
Advanced tools
Demonstrates how to package a typescript tool to npm to be run as npx
Demonstrates how to package a typescript tool to npm to be run as npx
npm install
# run once
npm run start
npm run start:dev
After writing some code you can publish it.
# make sure you update the package version in package.json before updating
npm version patch
# publish it
npm publish --access public
Run the published package
# run and print out palette
npx @chrisguest75/09_shell_mandlebrot
Create folder
mkdir xx_project_name
Setup typescript for a basic nodejs project
npm init --scope=@chrisguest75 -y
npm install typescript @types/node ts-node nodemon rimraf --save-dev
# get typescript version
./node_modules/typescript/bin/tsc --version
# create tsconfig.json
npx tsc --init --rootDir src --outDir build \
--esModuleInterop --resolveJsonModule --lib es6 \
--module commonjs --allowJs true --noImplicitAny true
Add a nodemonConfig to package.json
"nodemonConfig": {
"watch": ["src", "nodemon.json", "tsconfig.json", "package.json"],
"ext": "ts",
"ignore": [],
"exec": "ts-node ./src/index.ts"
}
#run
Copy the template ./src folder to the new project
```sh
cp ./src ../xx_project_name
Copy over the package.json scripts
"scripts": {
"build": "rimraf ./build && tsc",
"lint": "eslint . --ext .ts",
"start:dev": "nodemon",
"test": "echo \"Error: no test specified\" && exit 1"
},
#add the nodemon.json and run
npm run start:dev
https://itnext.io/step-by-step-building-and-publishing-an-npm-typescript-package-44fe7164964c
https://cameronnokes.com/blog/the-30-second-guide-to-publishing-a-typescript-package-to-npm/
zn+1 = zn2 + c
FAQs
Demonstrates how to package a typescript tool to npm to be run as npx
The npm package @chrisguest75/09_shell_mandlebrot receives a total of 3 weekly downloads. As such, @chrisguest75/09_shell_mandlebrot popularity was classified as not popular.
We found that @chrisguest75/09_shell_mandlebrot 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.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.