Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

domain-container

greduan10ISC3.0.0

Tool to contain various domains (process domains), tied to the Krypton ORM

knex, neon, neonode, krypton, orm

readme

NPM

DomainContainer

DomainContainer is a tool to help you isolate your different Krypton ORM environments and anything that the Krypton models may need, also can be used for storing anything in general.

You just need some reliable way of identifying the different DomainContainer instances, for example a sub-domain in the URL or something like this.

Check the SPEC.md file for detailed use-cases and the reasoning behind this module.

Usage

It's all explained in the SPEC.md file, check it out.

Installation

$ npm i -SE domain-container

Tests

$ npm i
$ npm run test:once

You may need to configure Knex under test/create-table.js and test/domain-container.js. You need Postgres installed.

Changelog

Check the CHANGELOG.md file for the changelog.

License

Check the LICENSE file for licensing details.

changelog

Change Log

All notable changes to this project will be documented in this file. This project adheres to Semantic Versioning.

2.6.0 - 2016-05-18

Fixed

  • Made krypton-orm a peer dependecy to avoid over-writing Krypton functionality.

2.5.0 - 2016-05-12

It's all in the SPEC.md file.

Added

  • #get
    • Returned Class now has as static properties:
      • _container
      • _modelExtras
    • Returned Class now has in prototype, in addition to the previously available ones, the following:
      • _knex

2.4.0 - 2016-05-09

It's all in the SPEC.md file.

Added

  • Added #cleanup method, which just destroys the Knex version.

2.3.0 - 2016-05-03

It's all in the SPEC.md file.

Changed

  • Method #update now takes the second parameter (body) as optional, so you can use #update just to save the model to DB.

2.2.0 - 2016-04-29

It's all in the SPEC.md file.

Fixed

  • Method #get wasn't returning a working model, now it is according to spec.

2.1.0 - 2016-04-29

It's all in the SPEC.md file.

Added

  • #create, #update and #destroy methods add _container to models now.

2.0.0 - 2016-04-29

It's all in the SPEC.md file.

Added

  • .props property to DomainContainer.
  • #get method.

Changed

  • customProps has been renamed to modelExtras.
  • ._modelExtras now added as a property to model instances, instead of extending model with contents of ._modelExtras.

1.0.0 - 2016-04-26

Added

Initial release. It's all in the SPEC.md file.