
Research
Malicious Go “crypto” Module Steals Passwords and Deploys Rekoobe Backdoor
An impersonated golang.org/x/crypto clone exfiltrates passwords, executes a remote shell stager, and delivers a Rekoobe backdoor on Linux.
@blac/core
Advanced tools
> ⚠️ **Warning:** This project is currently under active development. The API may change in future releases. Use with caution in production environments.
⚠️ Warning: This project is currently under active development. The API may change in future releases. Use with caution in production environments.
Core state management library implementing the BloC pattern for TypeScript applications.
npm install @blac/core
# or
pnpm add @blac/core
# or
yarn add @blac/core
Simple state container with direct state emission. Use when you need straightforward state updates.
import { Cubit } from '@blac/core';
class CounterCubit extends Cubit<{ count: number }> {
constructor() {
super({ count: 0 });
}
increment() {
this.emit({ count: this.state.count + 1 });
}
decrement() {
this.update((state) => ({ count: state.count - 1 }));
}
reset() {
this.patch({ count: 0 });
}
}
Manage state container instances with the registry functions:
import { acquire, release, borrow, hasInstance, clear } from '@blac/core';
// Acquire an instance (creates if needed, increments ref count)
const counter = acquire(CounterCubit);
// Release when done (decrements ref count, disposes when 0)
release(CounterCubit);
// Borrow without affecting ref count
const instance = borrow(CounterCubit);
// Check if instance exists
if (hasInstance(CounterCubit)) {
// ...
}
// Clear a specific class
clear(CounterCubit);
// Clear all instances
clearAll();
Use the @blac decorator to configure container behavior:
import { Cubit, blac } from '@blac/core';
@blac({ isolated: true }) // Each consumer gets its own instance
class FormCubit extends Cubit<FormState> {}
@blac({ keepAlive: true }) // Never auto-dispose
class AuthCubit extends Cubit<AuthState> {}
@blac({ excludeFromDevTools: true }) // Hide from DevTools
class InternalCubit extends Cubit<State> {}
Wait for a specific state condition:
import { waitUntil } from '@blac/core';
const counter = acquire(CounterCubit);
// Wait until count reaches 10
await waitUntil(counter, (state) => state.count >= 10);
// With timeout
await waitUntil(counter, (state) => state.count >= 10, {
timeout: 5000,
});
Create computed values that react to state changes:
import { watch, instance } from '@blac/core';
class DashboardCubit extends Cubit<DashboardState> {
constructor() {
super({ items: [] });
// Watch another bloc's state
watch(
instance(UserCubit),
(userState) => userState.preferences,
(preferences) => this.onPreferencesChanged(preferences),
);
}
}
Extend functionality with plugins:
import { getPluginManager, type BlacPlugin } from '@blac/core';
const loggingPlugin: BlacPlugin = {
name: 'logging',
onStateChange: (container, prevState, newState) => {
console.log(`[${container.constructor.name}]`, prevState, '->', newState);
},
};
getPluginManager().register(loggingPlugin);
Configure global behavior:
import { configureBlac } from '@blac/core';
configureBlac({
devMode: import.meta.env.DEV,
});
| Class | Description |
|---|---|
Cubit<S, P> | Simple state container with emit(), update(), patch() |
| Function | Description |
|---|---|
acquire(Class, key?, options?) | Get or create instance, increment ref count |
release(Class, key?) | Decrement ref count, dispose when 0 |
borrow(Class, key?) | Get instance without affecting ref count |
borrowSafe(Class, key?) | Borrow or return undefined |
ensure(Class, key?, options?) | Acquire without incrementing ref count |
hasInstance(Class, key?) | Check if instance exists |
getRefCount(Class, key?) | Get current reference count |
clear(Class) | Remove all instances of a class |
clearAll() | Remove all instances |
// Core classes
export { Cubit } from '@blac/core';
// Registry
export {
acquire,
release,
borrow,
ensure,
hasInstance,
clear,
clearAll,
} from '@blac/core';
// Utilities
export { waitUntil, watch, instance } from '@blac/core';
// Decorators
export { blac } from '@blac/core';
// Plugin system
export { getPluginManager, type BlacPlugin } from '@blac/core';
// Configuration
export { configureBlac, getBlacConfig, isDevMode } from '@blac/core';
MIT
FAQs
> ⚠️ **Warning:** This project is currently under active development. The API may change in future releases. Use with caution in production environments.
We found that @blac/core 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
An impersonated golang.org/x/crypto clone exfiltrates passwords, executes a remote shell stager, and delivers a Rekoobe backdoor on Linux.

Security News
npm rolls out a package release cooldown and scalable trusted publishing updates as ecosystem adoption of install safeguards grows.

Security News
AI agents are writing more code than ever, and that's creating new supply chain risks. Feross joins the Risky Business Podcast to break down what that means for open source security.