
Security News
Socket Releases Free Certified Patches for Critical vm2 Sandbox Escape
A critical vm2 sandbox escape can allow untrusted JavaScript to break isolation and execute commands on the host Node.js process.
@diaspora/diaspora
Advanced tools
Multi-source ORM for NodeJS & the browser
for integration tests.
To install Diaspora, simply run one of the following commands:
# With NPM
npm install --save @diaspora/diaspora
# With Yarn
yarn add @diaspora/diaspora
Welcome on the GitHub repository of Diaspora. Please visit the manual website, where you can find guides, tutorials, or the API tocumentation
Important note: Diaspora is very young and under heavy development. You are totally free to use it or contribute, but be aware that some important features are incomplete or absent:
| Adapter | Description | Links | Maintainer | Platform | Other infos | |
|---|---|---|---|---|---|---|
| Node | Browser | |||||
|
In Memory | A simple adapter that stores its data directly in the memory | Built-in | ✓ | ✓ | [QL] v2 | |
|
WebApi | A customizable adapter that use HTTP APIs as data source. Convinient to query easily REST, SOAP or GraphQL apis. | ✓ | ✓ | |||
|
WebStorage | A simple adapter that stores its data in the browser's local or session storage. | ✗ | ✓ | |||
|
MongoDB |
| ✓ | ✗ | [QL] v2 | ||
|
Redis |
| ✓ | ✗ | [QL] v2 |
plugin-server: a package to easily create APIs for Diaspora models
Diaspora requires:
>= 6.4.0>= 12>= 18>= 49>=10>= 61>= 5More briefly, Diaspora runs on all browsers & JavaScript engines that supports Proxies.
Notable incompatible browsers are
Need help getting started? We have a page on how to get started in 5 minutes.
Here is a short API overview. For a detailed API documentation, check the Diaspora API Documentation
props]) => EntityCreate an entity, defining its properties with provided props. The returned
entity should be persisted later.
props]) => SetSee spawn.
props]) => Promise(Entity)Create an entity, defining its properties with provided props, and persist it
immediately.
props]) => Promise(Set)See insertMany.
query, [object options], [string source]) => Promise(Entity)Retrieve an entity matching query. If query isn't an object, it is
considered as an ID.
query, [object options], [string source]) => Promise(Set)See find
query, [object options], [string source]) => Promise(Entity)Delete an entity matching query. If query isn't an object, it is considered
as an ID. options can contain allowEmptyQuery.
query, [object options], [string source]) => Promise(Entity)See delete
query, object newAttrs, [object options], [string source]) => Promise(Entity)Update a single entity matching querywith attributes in newAttrs. If query
isn't an object, it is considered as an ID. options can contain
allowEmptyQuery.
query, object newAttrs, [object options], [string source]) => Promise(Set)See update
source]) => Promise(this)Delete this entity from the specified source. Source hash object is set to
undefined
source]) => Promise(this)Save current entity to the specified source.
source]) => Promise(this)Reload entity from specified source.
Manual change of properties
Unsure > Entity may change status to desync ?
P2P Adapter
Unsure > May be interesting... Check for possible problems about data modification, etc etc.
IndexedDB Adapter (browser)
Unsure > IndexedDB technology may be too immature. See MDN about IndexedDB. Note: Plan to show fallback implementations
If you are having issues, or you want to participate to the development and create new features, you may have to use the development or staging version of Diaspora. Here is how you can do that:
# Clone the repository & go into it
git clone https://github.com/diaspora-orm/diaspora.git && cd diaspora
# Go on the staging branch (you can also use directly the `develop` branch, but it may be less stable)
git checkout staging
# The following command installs dependencies & compiles the package
npm run build
# Finally, expose your local build so that it can be used in other projects.
# You may need to run it with `sudo`.
npm link
# Go to your project
cd ~/myproject
# Ensure deps are installed
npm install
# And link the local version
npm link @diaspora/diaspora
Note that you may need to re-run
npm link @diaspora/diasporaafter every install (npm install) in your project.
FAQs
Multi-Layer ORM for Javascript Client+Server
We found that @diaspora/diaspora 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
A critical vm2 sandbox escape can allow untrusted JavaScript to break isolation and execute commands on the host Node.js process.

Research
Five malicious NuGet packages impersonate Chinese .NET libraries to deploy a stealer targeting browser credentials, crypto wallets, SSH keys, and local files.

Security News
pnpm 11 turns on a 1-day Minimum Release Age and blocks exotic subdeps by default, adding safeguards against fast-moving supply chain attacks.