Commit Graph

1758 Commits

Author SHA1 Message Date
Jason 6097fbc005 Fix JSCS unsupported rule error
Replace 'validateJSDoc' rule with 'jsDoc'. 'validateJSDoc' was
deprecated in v1.7.0.

In related news, JSCS was recently deprecated in favor of ESlint
so .jscrc can be removed once features have been rolled over.
2016-05-12 16:56:06 -07:00
Simon Ho 14aed2251c Merge pull request #2317 from strongloop/backport/change-all-hrefs-in-verification-email
Update user.js
2016-05-10 17:15:23 -07:00
juehou 8fef4845f8 Resolver support return promise 2016-05-10 18:00:42 -04:00
Rik 7868803711 Update user.js
allow to change all {href} instances in user.verify() mail into generated url instead of just one
2016-05-09 12:32:05 -07:00
Simon Ho 3f54b07ab8 Merge pull request #2309 from strongloop/backport/separate-error-and-done-logic
Backport separate error checking and done logic
2016-05-06 15:33:36 -07:00
Simon Ho 25ade96d27 Backport separate error checking and done logic 2016-05-06 14:07:38 -07:00
Simon Ho 9311e918cb Merge pull request #2296 from strongloop/backport/do-not-allow-duplicate-role-names
Backport/do not allow duplicate role names
2016-05-05 11:35:42 -07:00
Supasate Choochaisri e89fbd7ce8 Clean up by removing unnecessary comments
Signed-off-by: Supasate Choochaisri <supasate.c@gmail.com>
2016-05-05 10:51:40 -07:00
Supasate Choochaisri 4798b2f8c9 Add feature to not allow duplicate role name
- Also fix jshint error in backported test
2016-05-05 10:51:28 -07:00
Miroslav Bajtoš 692c67384a Merge pull request #2288 from strongloop/support-node-v6-in-2.x
Support node v6 in 2.x
2016-05-04 09:16:46 +02:00
Ryan Graham 4d6f2e7ab7
update/insert copyright notices 2016-05-03 17:10:46 -07:00
Ryan Graham 553889b378
relicense as MIT only 2016-05-03 17:09:47 -07:00
Miroslav Bajtoš e2b1f78f1e Upgrade phantomjs to 2.x 2016-05-03 19:00:01 +02:00
Miroslav Bajtoš da2fb0ae15 app: send port:0 instead of port:undefined
Node v6 no longer supports port:undefined, this commit is fixing
app.listen() to correctly send port:0 when no port is specified.
2016-05-03 19:00:01 +02:00
Miroslav Bajtoš bd7f2b6db1 travis: drop node@5, add node@6 2016-05-03 19:00:01 +02:00
Miroslav Bajtoš c2ad201bf6 Merge pull request #2282 from strongloop/feature/remove-auto-attach-2.x
Clean up unit-tests - use local registry [2.x]
2016-05-03 16:10:45 +02:00
Miroslav Bajtoš 6c59390754 Disable DEBUG output for eslint on Jenkins CI 2016-05-03 14:40:19 +02:00
Miroslav Bajtoš 53cd449c9c test/rest.middleware: use local registry
Rework tests in `test/rest.middleware.test.js` to not depend
on `app.autoAttach()` and global shared registry of Models. Instead,
each tests creates a fresh app instance with a new in-memory datasource
and a new set of Models.
2016-05-03 14:40:17 +02:00
Miroslav Bajtoš cae9786f0e Fix role.isOwner to support app-local registry 2016-05-03 14:39:29 +02:00
Miroslav Bajtoš 845c59eced test/user: use local registry
Rework User tests to not depend on `app.autoAttach()` and global shared
registry of Models. Instead, each tests creates a fresh app instance
with a new in-memory datasource and a new set of Models.
2016-05-03 14:39:06 +02:00
Miroslav Bajtoš 6d738690c8 2.28.0
* Add new feature to emit a `remoteMethodDisabled` event when disabling a remote method. (Supasate Choochaisri)
 * Fix typo in Model.nestRemoting (Tim Needham)
 * Allow built-in token middleware to run repeatedly (Benjamin Kröger)
 * Improve error message on connector init error (Miroslav Bajtoš)
 * application: correct spelling of "cannont" (Sam Roberts)
2016-05-02 13:00:09 +02:00
Simon Ho 091c71df23 Merge pull request #2271 from strongloop/backport-emit-disable-remote-method-event
BACKPORT Add new feature to emit a `remoteMethodDisabled` event when disabling
2016-04-29 19:48:57 -07:00
Supasate Choochaisri 2498c02f31 Add new feature to emit a `remoteMethodDisabled` event when disabling a remote method.
Signed-off-by: Supasate Choochaisri <supasate.c@gmail.com>
2016-04-29 16:29:50 -07:00
Tim Needham 1ea1cd612a Fix typo in Model.nestRemoting
Prevent apps from crashing when using `Model.nestRemoting` without
`{ hooks: false }` option.

Note that it is not possible to reproduce this bug using our current
Mocha test suite, because other tests modify the global state in such
way that the bug no longer occurs.

[back-port of #2245]
2016-04-20 09:35:10 +02:00
Miroslav Bajtoš 4678cb4b7c Merge pull request #2204 from strongloop/backport/pr2108
Allow built-in token middleware to run repeatedly [back-port to 2.x]
2016-04-06 16:06:38 +02:00
Benjamin Kröger e4b275243f Allow built-in token middleware to run repeatedly
Add two new options:

  - When `enableDoublecheck` is true, the middleware will run
    even if a previous middleware has already set `req.accessToken`
    (possibly to `null` for anonymous requests)

  - When `overwriteExistingToken` is true (and `enableDoublecheck` too),
    the middleware will overwrite `req.accessToken` set by a previous
    middleware instances.
2016-04-06 15:47:32 +02:00
Miroslav Bajtoš 50e3578992 Improve error message on connector init error
[back-port of pull request #2105]
2016-03-02 13:19:20 +01:00
Sam Roberts a4c643e890 application: correct spelling of "cannont"
[back-port of pull request #2088]
2016-02-19 13:12:51 +01:00
Miroslav Bajtoš 97f376c239 2.27.0
* Remove sl-blip from dependency (Candy)
 * Fix race condition in replication tests (Miroslav Bajtoš)
 * test: remove errant console.log from test (Ryan Graham)
 * Promisify Model Change (Jue Hou)
 * Fix race condition in error handler test (Miroslav Bajtoš)
 * Travis: drop iojs, add v4.x and v5.x (Miroslav Bajtoš)
 * Correct JSDoc findOrCreate() callback in PersistedModel (Miroslav Bajtoš)
 * Hide verificationToken (Miroslav Bajtoš)
 * test: use ephemeral port for e2e server (Ryan Graham)
 * test: fail on error instead of crash (Ryan Graham)
 * ensure app is booted before integration tests (Ryan Graham)
 * Checkpoint speedup (Amir Jafarian)
 * Pull in API doc fix from PR into master #1910 (crandmck)
2016-02-19 10:29:24 +01:00
Candy 70aec01e84 Remove sl-blip from dependency 2016-02-18 18:02:00 +01:00
Miroslav Bajtoš e98ed99fe7 Fix race condition in replication tests 2016-02-05 12:39:20 +01:00
Ryan Graham a0806eab89 test: remove errant console.log from test
Using console.log like this can result in invalid xml when the xunit
reporter is used.

[Backport of pull request #2035]
2016-02-05 09:22:43 +01:00
Jue Hou 7a54da5870 Promisify Model Change
* Change.diff
* Change.findOrCreateChange
* Change.rectifyModelChanges
* Change.prototype.currentRevision
* Change.prototype.rectify
2016-02-04 16:01:45 -05:00
Miroslav Bajtoš 7d3d4f1cee Merge pull request #2034 from strongloop/fix/ci
Fix race condition in error handler test
2016-02-04 17:48:52 +01:00
Miroslav Bajtoš 76ec49c96b Fix race condition in error handler test 2016-02-04 16:59:28 +01:00
Miroslav Bajtoš d123e95014 Merge pull request #2033 from strongloop/fix/travis-platforms-2.x
Fix travis platforms [2.x]
2016-02-04 16:44:33 +01:00
Miroslav Bajtoš 4753373f4f Travis: drop iojs, add v4.x and v5.x 2016-02-04 16:28:01 +01:00
Miroslav Bajtoš 015e9cb80e Correct JSDoc findOrCreate() callback in PersistedModel
Update PersistedModel.findOrCreate() JSDoc to reflect the
callback accepts an additional created boolean parameter.

This is a back-port of pull request #1983 from noderat/patch-1
2016-02-04 16:27:08 +01:00
Miroslav Bajtoš a0a1083564 Hide verificationToken
We should never be showing this publically.

Adds unit test for hiding verification token.

This is a back-port of pull request #1851 from gausie/patch-4
2016-02-04 16:27:03 +01:00
Miroslav Bajtoš 870e1010a8 Merge pull request #2032 from strongloop/safer-tests-step1-2.x
Safer tests - step1 [back-port to 2.x]
2016-02-04 16:25:39 +01:00
Ryan Graham db0678baa6 test: use ephemeral port for e2e server 2016-02-04 16:12:27 +01:00
Ryan Graham aff49ff63f test: fail on error instead of crash
If the supertest request fails its basic assertions, there may not even
be a body to perform checks against, so bail early when possible.
2016-02-04 16:12:27 +01:00
Ryan Graham 17bd101691 ensure app is booted before integration tests 2016-02-04 16:12:27 +01:00
Amir Jafarian 8deec2e89a Checkpoint speedup 2016-01-19 10:28:53 -05:00
crandmck 5974c6afdf Pull in API doc fix from PR into master #1910 2016-01-08 17:10:44 -08:00
Miroslav Bajtoš 122c1186ba 2.26.2
* Fix bulkUpdate to not trigger rectifyAll (Amir Jafarian)
2015-12-22 10:57:56 +01:00
Miroslav Bajtoš 8aa5c70720 Merge pull request #1899 from strongloop/rectifyChange_Vs_rectifyAllChanges
Fix bulkUpdate to not trigger rectifyAll
2015-12-22 10:56:41 +01:00
Amir Jafarian 4aac2776a8 Fix bulkUpdate to not trigger rectifyAll
Fix `getIdFromWhereByModelId()` to correctly detect the situation
when "bulkUpdate" performs a write operation using a where filter
containing both id attribute but also all other model attributes.

This should significantly improve the performance of change replication,
because the cost of running rectifyAll is very high.
2015-12-22 10:44:28 +01:00
Miroslav Bajtoš 69940ad3b0 2.26.1
* PersistedModel: log rectify/rectifyAll triggers (Miroslav Bajtoš)
2015-12-17 15:52:08 +01:00
Miroslav Bajtoš b2c9c97c2c Merge pull request #1894 from strongloop/feature/improve-replication-debugging
PersistedModel: log rectify/rectifyAll triggers
2015-12-17 15:51:29 +01:00