
Research
/Security News
Mini Shai-Hulud Campaign Hits Red Hat Cloud Services npm Packages
A mini Shai-Hulud campaign compromised Red Hat Cloud Services npm packages to steal developer and CI/CD secrets during installation.
@sucoza/devtools-common
Advanced tools
Common types, utilities, and shared functionality for the TanStack DevTools ecosystem.
npm install @sucoza/devtools-common
# or
yarn add @sucoza/devtools-common
# or
pnpm add @sucoza/devtools-common
import type {
DevToolsEvent,
DevToolsState,
PluginConfig,
EventSubscription,
BaseDevToolsClient
} from '@sucoza/devtools-common';
// Use shared types in your plugin
interface MyPluginState extends DevToolsState {
customData: string[];
isActive: boolean;
}
import {
createEventId,
debounce,
throttle,
deepMerge,
isValidSelector
} from '@sucoza/devtools-common';
// Generate unique event IDs
const eventId = createEventId('my-plugin');
// Debounce expensive operations
const debouncedUpdate = debounce((data) => {
// Update logic
}, 300);
// Merge configuration objects
const config = deepMerge(defaultConfig, userConfig);
import { BaseDevToolsClient } from '@sucoza/devtools-common';
class MyDevToolsClient extends BaseDevToolsClient<MyPluginState> {
protected getInitialState(): MyPluginState {
return {
customData: [],
isActive: false,
// ... other state properties
};
}
protected startMonitoring(): void {
// Plugin-specific monitoring logic
}
protected stopMonitoring(): void {
// Cleanup logic
}
protected cleanup(): void {
// Final cleanup
}
}
import {
DEFAULT_DEBOUNCE_MS,
MAX_EVENT_HISTORY,
PLUGIN_NAMESPACES,
SEVERITY_LEVELS
} from '@sucoza/devtools-common';
// Use shared constants
const myConfig = {
debounceTime: DEFAULT_DEBOUNCE_MS,
maxHistory: MAX_EVENT_HISTORY,
namespace: PLUGIN_NAMESPACES.ACCESSIBILITY
};
Base interface for all DevTools events.
interface DevToolsEvent<T = any> {
id: string;
type: string;
timestamp: number;
source: string;
data: T;
metadata?: EventMetadata;
}
Base state interface for plugin state management.
interface DevToolsState {
isActive: boolean;
lastUpdate: number;
error?: string;
}
Configuration interface for DevTools plugins.
interface PluginConfig {
name: string;
version: string;
namespace: string;
enabled: boolean;
debug?: boolean;
}
Generates a unique event identifier with the specified namespace.
Creates a debounced version of the provided function.
Creates a throttled version of the provided function.
Deep merges two objects, with source properties overriding target.
Validates if a string is a valid CSS selector.
Formats an error object into a readable string.
Sanitizes event data by removing circular references and functions.
Abstract base class for DevTools event clients.
Methods:
subscribe(callback: EventCallback): UnsubscribeFunctionemit(type: string, data: any): voidgetSnapshot(): TupdateState(update: Partial<T>): voiddestroy(): voidAbstract Methods:
getInitialState(): TstartMonitoring(): voidstopMonitoring(): voidcleanup(): voidDefault debounce time in milliseconds (300ms).
Maximum number of events to keep in history (1000).
Predefined namespaces for different plugin types.
Standard severity levels for issues and events.
const SEVERITY_LEVELS = {
MINOR: 'minor',
MODERATE: 'moderate',
SERIOUS: 'serious',
CRITICAL: 'critical'
} as const;
This package is part of the @sucoza DevTools ecosystem. Contributions should maintain compatibility with all plugins.
git checkout -b feature/common-improvement)git commit -m 'Add utility function')git push origin feature/common-improvement)MIT © tyevco
Part of the @sucoza TanStack DevTools ecosystem.
FAQs
Common types and utilities for TanStack DevTools ecosystem
We found that @sucoza/devtools-common demonstrated a healthy version release cadence and project activity because the last version was released less than 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 mini Shai-Hulud campaign compromised Red Hat Cloud Services npm packages to steal developer and CI/CD secrets during installation.

Research
/Security News
The North Korean malware loader hides in a Packagist-listed package and its GitHub branch to fetch and execute remote code in a likely Contagious Interview-style lure.

Security News
The Rust project is moving toward formal rules on LLM use in contributions after months of internal debate over maintainer burden, code quality, and contributor experience.