Scan your whole stack
From OX Research Newsroom
Are you using @itrocks/store?
Find out what’s in your code.
Scan your apps free in minutes (opens in a new tab)Latest version: v0.2.0
@itrocks/store was last scanned on 29 Nov 2026 at version 0.2.0. Risk score 0 of 100. No malicious behavior was detected.
| Version | Published | Status |
|---|---|---|
| 0.2.0 LATEST | 29 Nov 2026 | No rules fired |
| 0.1.1 | 14 Aug 2026 | Not shown |
Findings for v0.2.0. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.
The score describes 0.2.0; other versions have their own rules, not their own score.
The publisher’s own README, as collected from the registry.
Marks domain classes for named storage, associates transformers to properties of these class types.
This documentation was written by an artificial intelligence and may contain errors or approximations. It has not yet been fully reviewed by a human. If anything seems unclear or incomplete, please feel free to contact the author of this package.
npm i @itrocks/store
@itrocks/store is usually installed together with the it.rocks
framework and other infrastructure packs, but it can also be used on its
own in any TypeScript/Node.js project.
@itrocks/store provides a class decorator, a helper, and a small
configuration hook:
Store() marks a class as storable and computes its store name.storeOf() returns the store name associated with a class or
instance.storeDependsOn() lets you plug infrastructure concerns
(transformers, naming strategy) without creating a hard dependency on
a specific storage technology.import { Store, storeOf } from '@itrocks/store'
@Store()
class User
{
login!: string
}
// Later, anywhere in your code
const storeName = storeOf(User) // typically "user" or a derived name
You can now use storeName to read/write User instances through your
own persistence mechanism (SQL, NoSQL, in‑memory, …).
Apply @SkipWrite() to a stored scalar field maintained separately from ordinary MySQL inserts and updates.
The field remains part of the schema and can be read, sorted and used in search criteria.
Storage adapters can check this metadata with skipWriteOf(object, property).
In a real application you rarely use @itrocks/store alone. Instead,
you configure it once at startup and then declare your entities.
import { type Type } from '@itrocks/class-type'
import { Store, storeDependsOn } from '@itrocks/store'
// Application bootstrap (only once)
function initStoreLayer()
{
storeDependsOn({
// Called for each @Store() class when it is first seen
setTransformers: function (target: Type)
{
// Register field transformers, validators, etc. for this entity
// in your storage / ORM layer.
},
// Global naming strategy for store names
toStoreName: function (className: string): string
{
// Example: convert PascalCase class name to snake_case table name
return className
.replace(/([a-z0-9])([A-Z])/g, '$1_$2')
.toLowerCase()
}
})
}
// Domain entity
@Store() // uses the default naming strategy above
class Customer
{
id!: number
name!: string
email!: string
}
From now on, Customer is registered as a storable entity and your
storage layer can query storeOf(Customer) whenever it needs the
corresponding store/table/collection name.
storeDependsOn(dependencies)Configures how @itrocks/store integrates with your storage and
transformation layer.
type Dependencies = {
setTransformers?: (target: Type) => void
toStoreName: (className: string) => string
}
function storeDependsOn(dependencies: Partial<Dependencies>): void
dependencies.setTransformers? – optional callback invoked when a
decorated class is first processed by Store().target – the entity Type being marked as storable. Use this to
register per‑class transformers, validators, or metadata in your
persistence layer.dependencies.toStoreName – function that converts a class name
(e.g. "CustomerOrder") into a store name (e.g.
"customer_order" or "customerOrders").You typically call storeDependsOn() once during application
initialisation.
If you omit some fields, the existing behaviour is kept for those
fields (for instance the default toStoreName simply returns the class
name unchanged).
Store(name?)Class decorator that marks a domain class as storable and associates it with a store name.
function Store(name?: string | false): DecorateCaller<object>
name (optional):undefined or empty string (default) – let @itrocks/store compute
the store name from the base class name using toStoreName.string – force a specific store name (for example to
match an existing table or collection name).false – disable automatic transformer registration (if any) for
this class while still allowing a store name to be retrieved.Store():setTransformers(target) if you configured it via
storeDependsOn() and name !== false;name
you provided or the result of toStoreName(baseType(target).name).You normally use it as a decorator:
@Store('app_users')
class User
{
// ...
}
storeOf(target)Returns the store name associated with a class or instance that has
been decorated with @Store().
function storeOf(target: ObjectOrType): string | false
target – either the class constructor (User) or an instance
(new User).string if the class/instance is decorated
with @Store();false if the target is not associated with any store.This is usually called by infrastructure code (ORM, DAOs, query builders) rather than by domain classes themselves.
@Store() and let your storage layer call storeOf() to resolve
the underlying table/collection name.toStoreName once via
storeDependsOn().setTransformers.Find threats in your stack.
OX Radar can check high-priority threats, like critical package CVEs, against your context.
Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.
The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).
The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.