
Research
/Security News
jscrambler npm Package Compromised in Supply Chain Attack
A compromised jscrambler npm release added a malicious preinstall hook that runs hidden native binaries on Linux, macOS, and Windows.
@jcoreio/clarity-plugin-api
Advanced tools
@jcoreio/clarity-plugin-apiThis package provides a mock environment for developing plugins for Clarity.
useTagState(tag: string)import { useTagState } from '@jcoreio/clarity-plugin-api/client'
React hook that subscribes to the realtime value, metadata, and alarm state of a tag.
import * as React from 'react'
import {
useTagState,
DashboardWidgetProps,
} from '@jcoreio/clarity-plugin-api/client'
export function MyWidget({
config,
}: DashboardWidgetProps<{ tag: string } | undefined>) {
const { loading, error, data } = useTagState(config?.tag)
if (loading) return <div>Loading...</div>
if (error) return <div>Error: {error.message}</div>
const t = data?.t
const v = data?.v
const metadata = data?.metadata
const notification = data?.notification
const name = metadata?.fullName?.join('/') || tag
return <div>
Most recent data for {name}:
<p>Time: {t != null ? new Date(t).toLocaleString()}</p>
<p>Value: {v}</p>
<p>Notification: {notification?.severity}</p>
</div>
}
useDrop(spec)import { useDrop } from '@jcoreio/clarity-plugin-api/client'
React hook for connecting a drop target to Clarity
import * as React from 'react'
import {
useTagState,
DashboardWidgetProps,
} from '@jcoreio/clarity-plugin-api/client'
export function MyWidget({
config,
setConfig,
}: DashboardWidgetProps<{ tag?: string } | undefined>) {
const [{ isOver, canDrop, tag, MetadataItem }, connectDropTarget] = useDrop(
{
canDrop: ({ tag, MetadataItem }) => tag != null,
drop: ({ tag, MetadataItem }): undefined => {
if (tag != null) setConfig({ tag })
},
},
[setConfig]
)
return (
<div ref={connectDropTarget}>
{tag != null ?
<p>Drop to set tag to {tag}</p>
: <p>Tag: {config?.tag}</p>}
</div>
)
}
FAQs
Clarity Plugin API mocks for developing plugins
The npm package @jcoreio/clarity-plugin-api receives a total of 219 weekly downloads. As such, @jcoreio/clarity-plugin-api popularity was classified as not popular.
We found that @jcoreio/clarity-plugin-api demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 4 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
A compromised jscrambler npm release added a malicious preinstall hook that runs hidden native binaries on Linux, macOS, and Windows.

Research
/Security News
A malicious .NET package is typosquatting the Braintree SDK to steal live payment card data, merchant API keys, and host secrets from production apps.

Security News
/Research
Compromised Injective SDK npm version 1.20.21 exfiltrates wallet private keys and mnemonics through fake telemetry functionality.