
Research
/Security News
Critical Vulnerability in NestJS Devtools: Localhost RCE via Sandbox Escape
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
@redux-requests/promise
Advanced tools
Promise driver for Redux-Requests, Redux addon to simplify AJAX requests
Promise driver to Redux - addon to simplify handling of AJAX requests.
To install the package, just run:
npm install @redux-requests/promise
or you can just use CDN: `https://unpkg.com/@redux-requests/promise`.
## Usage
This driver is useful when you work directly with promises.
For instance, you could do something like that:
```js
import { createDriver } from '@redux-requests/promise';
handleRequests({
driver: createDriver({
AbortController: window.AbortController,
processResponse: response => ({ data: response }),
}),
});
const fetchPhoto = id => ({
type: FETCH_PHOTO,
request: {
promise: axios.get(`https://jsonplaceholder.typicode.com/photos/${id}`),
},
});
AbortController
is optional, by default it will use AbortController
if available,
with fallback to DummyAbortController
which does nothing. If your environment doesn't
support AbortController
, you could pass a polyfill.
If you don't, requests abort won't work.
processResponse
is also optional, the default is response => ({ data: response })
,
it is useful if your promises resolve to more things than data
, then you could for instance use
response => ({ data: response.data })
For usage, see redux-requests docs.
Also note, that for mutations you need to pass meta.asMutation: true
in your request actions,
so the core library could know whether a request is a query or a mutation.
MIT
FAQs
Promise driver for redux-requests, declarative AJAX requests and automatic network state management for single-page applications
The npm package @redux-requests/promise receives a total of 699 weekly downloads. As such, @redux-requests/promise popularity was classified as not popular.
We found that @redux-requests/promise 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
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
Product
Customize license detection with Socket’s new license overlays: gain control, reduce noise, and handle edge cases with precision.
Product
Socket now supports Rust and Cargo, offering package search for all users and experimental SBOM generation for enterprise projects.