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.
@appworks/codemod
Advanced tools
AppWorks codemod scripts for rax, ice and react project.
$ npm i @appworks/codemod -g
$ appworks-codemod <transform> <path> [...options?]
transform
- name of transform, see available transforms below.path
- files or directory to transform.options?
- option for jscodeshift.Example:
$ appworks-codemod plugin-rax-component-to-component ./
You can retrieve the recommended codemod of the current project through the check
method.
Options:
Return:
Example:
import glob from "glob";
import { check } from "@appworks/codemod";
const dir = "/xxx/xx";
glob(
"**/*",
{ cwd: dir, ignore: ["**/node_modules/**"], nodir: true, realpath: true },
function (er, files) {
check(dir, files).then((results) => {
console.log(results);
});
}
);
You can use the run
method to execute specific codemod.
Options:
Return:
Example:
import glob from "glob";
import { check } from "@appworks/codemod";
const dir = "/xxx/xx";
glob(
"**/*",
{ cwd: dir, ignore: ["**/node_modules/**"], nodir: true, realpath: true },
function (er, files) {
run(dir, files, "plugin-rax-component-to-component").then((result) => {
console.log(result);
});
}
);
IResult:
interface IResult {
transform: string; // transform key, see `Included Transforms`
title: string; // transform description title
title_en: string;
message: string; // transform description message
message_en: string;
severity: 0 | 1 | 2; // 0: advice 1: warning 2: error
mode: "run" | "check"; // mode, see API
docs: string; // docs url
output: string; // jscodeshift CLI output
npm_deprecate?: string; // same as https://docs.npmjs.com/cli/v7/commands/npm-deprecate/
}
plugin-rax-component-to-component
Update plugin-rax-component
to plugin-component
. docs
lint-config-to-spec
Follow Alibaba FED lint rules, and use @iceworks/spec
best practices. docs
FAQs
AppWorks codemod scripts
We found that @appworks/codemod demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers 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.