
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).
connect-state-playground
Advanced tools
Helper function for angular to allow creation of reactive components
Automatically bind all asynchronous observables into a simple synchronous sink. Extra features including loading indicators and simple API to reload your observables.
NOTE: Ivy required
npm install ng-connect-state @ngneat/until-destroy
# Or if you use yarn
yarn add ng-connect-state @ngneat/until-destroy
@ngneat/until-destroy
is a peer dependency.
import { ConnectState, connectState } from 'ng-connect-state';
import { interval } from 'rxjs';
@ConnectState()
@Component({ template: `
{{ state.timer }}
<button (click)="state.reload()"</button>
Loading: {{ state.loading.timer }}
`
})
export class InboxComponent {
ngOnDestroy() { }
/**
this exposes state.timer as a synchronous value!
**/
state = connectState(this, {
timer: interval(1000),
})
}
You can bind multiple observables and reload them individually as well:
@ConnectState()
@Component({})
export class HomeComponent {
ngOnDestroy() { }
constructor(private httpClient: HttpClient) {}
// We'll dispose it on destroy
state = connectState(this, {
users: httpClient.get('/users'),
projects: httpClient.get('/projects'),
})
reloadUsers() {
this.state.reload('users');
}
reloadProjects() {
this.state.reload('projects');
}
}
@ConnectState()
before the @Component()
decorator.overrideComponent
in unit tests remember that it overrides metadata and component definition. Invoke ConnectState()(YourComponent);
to reapply the decorator.This project's structuce is based on the amazing @ngneat/until-destroy repository! Many thanks.
MIT
FAQs
Helper function for angular to allow creation of reactive components
We found that connect-state-playground 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.