
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
@wrserver/data
Advanced tools
@wrserver data module, holding a new concept of Model as a Table, to interface json file as a db-like model.
Install this library is easy by cloning the repo. You can install trhought npm too:
Local installation
npm install @wrserver/data
Global installation
npm install -g @wrserver/data
We recomend to use the entire base package (core, crypt, data, auth, mail)
This module add the DataModel to the WRServer Set of elements. The DataModel is usefull to manage files throught the DataService that allow to load/save json (encrypted or not) files.
import { Model, Column, Connection } from '@wrserver/core';
import { DataService, DataModel } from '@wrserver/data';
@Model
export class MyModel extends DataModel {
//Use @Column.<TYPE>(defaultValue) for define a Db Column
//Care that the defaultValue is evaluated once.
//If it is an object reference every model will inherith the same reference.
@Column.ID()
public id: number;
@Column.String()
public stringType: string;
@Column.Number(1)
public numberType: number;
@Column.Boolean(true)
public booleanType: boolean;
@Column.Array(()=>[0,1,2])
public arrayType: number[];
@Column.Date(()=>new Date())
public dateType: Date;
@Column.Model(MyModel2, () => new MyModel2(... params ...))
public modelType: MyModel2;
//NOT MAPPED PARAMETERS
public otherParam1: boolean;
public otherParam2: Date;
public sendable(): any{ return { id: this.id, name: this.name, email: this.email, role: this.role }; }
}
At Module defition
import { DataService, DataModule } from '@wrserver/data';
export class MyModule extends Module {
//... controller, models, etc. ...
public services: ServiceType[] = [ DataService, ... Other Services ... ];
public dependencies: ModuleType[] = [ DataModule, ... Other Modules ... ];
//... rest of code ...
}
At Server definition (settings)
import { WRServer }from '@wrserver/core';
import { DataModule } from '@wrserver/data';
//REMEMBER: don't use this static methods inside module definitions
DataModule.withDir(<directory>).withEncrypt(true|false)
.withAlgorithm(<algorithm>).withCadence(<seconds autosave>)
//Server definition
let server: WRServer = new WRServer(...)
If you like the project feel free to contact me on my .
Something gone wrong? Feel free to rise an issue!
Did you like this project and it was usefull? Help me improve my work:
FAQs
wrserver - data management module
We found that @wrserver/data 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.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.