
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.
@zaferatli/ra
Advanced tools
We use this creator for add new request to action, reducer and saga files automatically.
npm i @zaferatli/ra
npx @zaferatli/ra --actionName='GET_USERS' --dataStatus='true' --requestType='get' --createExample
After install Redux creator, you need add
Reducer.js
1)//end
string on reducer end of the initialState array. Example Image
2)default:
string on reducer end of the reducer part. Example Image
Saga.js
1)function* handler() {
string on saga function. Example Image
2)export {handler};
string on saga end function. Example Image
After these steps you can create request strings.
Get request for slider and response return data
npx @zaferatli/ra --actionName='GET_SLIDER' --dataStatus='true' --requestType='get' ---clearAllState
Post request for edit user and response not return data
npx @zaferatli/ra --actionName='UPDATE_USER_PROFILE' --dataStatus='false' --requestType='post' --clearAllState
First time of use cli tools ask from you define path of Action, Reducer and Saga files location.
Example Folder Structure:
->my-awesome-project
->__tests__
->.bundle
->android
->app
->redux
->action.js
->reducer.js
->sagas.js
->store.js
->ios
->node_modules
etc...
you need to defined like
./app/redux/action.js
./app/redux/reducer.js
./app/redux/sagas.js
as Image
This creator logic:
Create template string for Action, Reducer and Saga
Find locator string
Action
Reducer
//end
so creator find //end string and change with template string + '//end' string.
default:
string, we find that string and we change template string + 'default:' string
Saga
function* handler() {
string, we find that string and change 'unction* handler() {' + sagaHeader template string
export {handler};
string, we find that string and change sagaDetail template + 'export {handler};' string
You can change this locator with parameters.
Rewrite file.
Parametre | Tip | Açıklama |
---|---|---|
--actionName= | string | Action name of request, we use this keyword in action, reducer and saga |
--dataStatus== | string | If you get any data from request, you can set with 'true', default is 'false'. Reducer and saga will be changed |
--requestType== | string | Request type, 'get', 'post', 'put' etc. this will be add axios request type |
--createTemplateLocal | string | When you add this parameter, template files will be create in root dir as ra-template, you can edit templates. After you call this parameter again, files will be overwritted. |
--resetPath | string | RA cli need to define action, reducer and saga files locations. First of time use cli prompt ask to you define this folders. When you need to change that locations add this parameters and cli ask you again. |
--clearAllState | string | This parameter is clear all local config, createTemplateLocal, Files paths etc. everything will be reset |
--reducerStateLocator= | string | Reducer state part locator, default is '//end' string. |
--reducerLocator= | string | Reducer part locator, default is 'default:' string. |
--sagaHeaderLocator= | string | Saga header locator, default is 'function* handler() {' string. |
--sagaLocator= | string | Saga function locator, default is 'export {handler};' string. |
If you want to change Action, Reducer, Saga string template you can use
npx @zaferatli/ra --actionName='UPDATE_USER_PROFILE' --dataStatus='false' --requestType='post' --createTemplateLocal
After this command, cli tool will be create ra-template folder on root directory. And you change change templates as you wish.
--createTemplateLocal
Parameter overwrite ra-template folder. When you change ra-template/templates you shouldn't use this parameter again.
This tools works with string replace logic. We give some flag locations, cli create template strings and replace flag locations strings. Because of that, you may need to change locators. You can change like that.
Cli tool add bottom of action.js file. So we don't use any locator on actions.
### Reducer
Default is
//end
if you wish to change
npx @zaferatli/ra --actionName='UPDATE_USER_PROFILE' --dataStatus='false' --requestType='post' --reducerStateLocator='//notToEndOfState'
Default is
default:
if you wish to change
npx @zaferatli/ra --actionName='UPDATE_USER_PROFILE' --dataStatus='false' --requestType='post' --reducerLocator=' default : '
Default is
function* handler() {
if you wish to change
npx @zaferatli/ra --actionName='UPDATE_USER_PROFILE' --dataStatus='false' --requestType='post' --sagaHeaderLocator='function* notHandler(){'
Default is
export {handler};
if you wish to change
npx @zaferatli/ra --actionName='UPDATE_USER_PROFILE' --dataStatus='false' --requestType='post' --sagaLocator='export {handler};'
FAQs
React Native Redux Auto Creator CLI Kit
The npm package @zaferatli/ra receives a total of 1 weekly downloads. As such, @zaferatli/ra popularity was classified as not popular.
We found that @zaferatli/ra 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.