
Research
Malicious NuGet Packages Typosquat Nethereum to Exfiltrate Wallet Keys
The Socket Threat Research Team uncovered malicious NuGet packages typosquatting the popular Nethereum project to steal wallet keys.
stencil-wormhole
Advanced tools
This is a super simple and lightweight library, that helps pass props down Stencil
component trees easily. It's similar to React.Context
and stencil-state-tunnel
.
Why not just use stencil-state-tunnel
? Simply because it's not instance scoped at this time
(issue #8). In addition, this library
prefers injecting props instead of consuming them in JSX because:
There's only two concepts to learn for this library:
Context.Provider
in react
and Tunnel.Provider
in stencil-state-tunnel
.
It holds the current state of the sub-tree, and it's responsible for updating all of its children when
the state changes.Context.Consumer
in react
and Tunnel.injectProps
in stencil-state-tunnel
. It simply opens a connection to its closest ancestor universe and requests
props to be injected.This is a simple diagram on what this library achieves:
This is a simple diagram on how a multiverse works, in which a universe's nested inside another one:
Important to note, you can only nest universes if they live inside separate components.
# npm
$: npm install stencil-wormhole
# yarn
$: yarn add stencil-wormhole
# pnpm
$: pnpm install stencil-wormhole
import { h, State, Component } from '@stencil/core'
import { Universe } from 'stencil-wormhole'
@Component({
tag: 'my-parent'
})
export class MyParent {
// 1. Setup your state.
@State() state: Record<string, any> = {
message: 'apples',
data: { content: 1 },
// ...
};
componentWillLoad() {
// 2. Create the universe (it has to be called in this lifecycle method).
Universe.create(this, this.state);
}
// 3. Update your state as usual.
render() {
return (
// 4. Create the universe provider.
<Universe.Provider state={this.state}>
<my-child />
</Universe.Provider>
);
}
}
import { h, Prop, Component } from '@stencil/core'
import { openWormhole } from 'stencil-wormhole'
@Component({
tag: 'my-child'
})
export class MyChild {
// 1. Setup all props that are being injected.
@Prop() message!: string;
@Prop() data!: object;
render() {
return (
<div>{this.message}</div>
);
}
}
// 2. Open the wormhole and pass in the props to be injected.
openWormhole(MyChild, ['message', 'data']);
If you want stricter typing on the openWormhole
function then simply create a higher-order function.
import { openWormhole, WormholeConsumerConstructor } from 'stencil-wormhole'
interface SpecialProps {
apples: string
}
export const openSpecialWormhole = (
Component: WormholeConsumerConstructor,
props: (keyof SpecialProps)[]
) => openWormhole(Component, props);
FAQs
Pass props down component trees easily via wormholes.
The npm package stencil-wormhole receives a total of 3,981 weekly downloads. As such, stencil-wormhole popularity was classified as popular.
We found that stencil-wormhole 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
The Socket Threat Research Team uncovered malicious NuGet packages typosquatting the popular Nethereum project to steal wallet keys.
Product
A single platform for static analysis, secrets detection, container scanning, and CVE checks—built on trusted open source tools, ready to run out of the box.
Product
Socket is launching experimental protection for the Hugging Face ecosystem, scanning for malware and malicious payload injections inside model files to prevent silent AI supply chain attacks.