Modify the files to export a model factory function accepting
a `registry` argument. This is a preparation step for per-application
models - see #1212.
* Improve error handling in replication (Miroslav Bajtoš)
* Add `loopback.runInContext` (Miroslav Bajtoš)
* Fix style issues (Raymond Feng)
* Document the new third callback arg of replicate() (Miroslav Bajtoš)
* Fix API doc for updateAll/deleteAll (Miroslav Bajtoš)
* Import subset of underscore.string scripts only (Miroslav Bajtoš)
* Use `ctx.instance` provided by "after delete" hook (Miroslav Bajtoš)
* Add conflict resolution API (Miroslav Bajtoš)
* Detect 3rd-party changes made during replication (Miroslav Bajtoš)
* Ability to pass in custom verification token generator This commit adds the ability for the developer to use a custom token generator function for the user.verify(...) method. By default, the system will still use the crypto.randomBytes() method if no option is provided. (jakerella)
* Remove unnecessary delay in tests. (Miroslav Bajtoš)
* Update README.md (Simon Ho)
* Remove duplicate cb func from getRoles and other doc cleanup (crandmck)
* Enhance the token middleware to support current user literal (Raymond Feng)
* Handling owner being a relation/function (Benjamin Boudreau)
* Run replication tests in the browser too (Miroslav Bajtoš)
* Add replication tests for conflict resolution (Miroslav Bajtoš)
* Fix an assertion broke by recent chai upgrade. (Miroslav Bajtoš)
* Static ACL support array of properties now (ulion)
* Add more integration tests for replication (Miroslav Bajtoš)
* Prevent more kinds of false replication conflicts (Miroslav Bajtoš)
* Upgrade deps (Raymond Feng)
* Fix "Issues" link in readme (Simon Ho)
* Add more debug logs to replication (Miroslav Bajtoš)
* Fixes#1158. (Jason Sturges)
* Checkpoint: start with seq=1 instead of seq=0 (Miroslav Bajtoš)
* Return new checkpoints in callback of replicate() (Miroslav Bajtoš)
* Create a remote checkpoint during replication too (Miroslav Bajtoš)
* Replication: fix checkpoint-related race condition (Miroslav Bajtoš)
* Support different "since" for source and target (Miroslav Bajtoš)
Deprecate `Change.handleError`, it was used inconsistenly for a subset
of possible errors only. Rework all `Change` methods to always report
all errors to the caller via the callback.
Rework `PersistedModel` to report change-tracking errors via the
existing method `PersistedModel.handleChangeError`. This method
can be customized on a per-model basis to provide different error
handling.
The default implementation emits `error` event on the model class,
users can attach an event listener that can provide a custom error
handler.
NOTE: Unhandled `error` events crash the application by default.
Refactor the core implementation of current context from
server/middleware/context.js into server/current-context.js.
Expose new public API:
- loopback.runInContext
- loopback.createContext
Use the recently added context property `ctx.instance` to improve
the accuracy of the algorithm detecting whether a single or
multiple models were deleted.
Modify `Change.diff()` to include current data revision in each
delta reported back. The current data revision is stored in
`delta.prev`.
Modify `PersistedModel.bulkUpdate()` to check that the current data
revision matches `delta.prev` and report a conflict if a third party
has modified the database under our hands.
Fix `Change` implementation and tests so that they are no longer
attempting to create instances with duplicate ids.
(This used to work because the memory connector was silently
converting such requests to updateOrCreate/findOrCreate.)
This commit adds the ability for the developer to use a custom token generator function for the user.verify(...) method. By default, the system will still use the crypto.randomBytes() method if no option is provided.