Commit Graph

661 Commits

Author SHA1 Message Date
Samuel Reed 22345cfcda Support 'alias' in mail transport config.
Useful if you need to set up multiple transports of the same type.

[forward-port of #2489]
2016-08-16 16:24:56 +02:00
Miroslav Bajtoš da0a543983 Merge pull request #2622 from strongloop/fix/unglobalize-swagger
Revert globalization of Swagger descriptions
2016-08-16 13:59:26 +02:00
Miroslav Bajtoš eec326dc80 Revert globalization of Swagger descriptions 2016-08-15 11:06:05 +02:00
Miroslav Bajtoš 80a0b7d7ad Revert globalization of assert() messages 2016-08-15 08:53:25 +02:00
Miroslav Bajtoš a259e59afc common: add KeyValueModel 2016-08-10 14:15:22 +02:00
Miroslav Bajtoš 59a82a9d5e Globalize current-context error messages 2016-08-10 13:43:40 +02:00
Miroslav Bajtoš b087c930ed Remove current-context API
Change all current-context APIs to throw a helpful error.
2016-08-10 13:43:40 +02:00
Candy 3239942ff1 Update globalization 2016-08-04 17:35:21 -04:00
Candy b52a7217a9 Add globalization 2016-08-04 15:08:16 -04:00
Rand McKinney 1b55d35542 Update loopback.js
Fix doc comment per #2534
2016-07-26 15:52:40 -07:00
Candy 3bf9065203 Remove `rectifyAllChanges` and `rectifyChange` 2016-06-20 10:46:16 -04:00
Amir Jafarian 6502309e34 Expose `Replace*` methods
*Re-mapping `updateAttributes` endpoint to use
`PATCH` and `PUT`(configurable) verb
*Exposing `replaceById` and `replaceOrCreate` via
`POST` and `PUT`(configurable) verb
2016-06-10 14:56:44 -04:00
Miroslav Bajtoš 8d295b70f6 Remove legacy express 3.x middleware getters
Remove middleware-getter properties that were simlifying upgrade from
LoopBack 1.x/Express 3.x applications:

  - loopback.compress
  - loopback.timeout
  - loopback.cookieParser
  - loopback.cookieSession
  - loopback.csrf
  - loopback.errorHandler
  - loopback.session
  - loopback.methodOverride
  - loopback.logger
  - loopback.responseTime
  - loopback.favicon
  - loopback.directory
  - loopback.vhost

Also remove `loopback.mime`, which was set to `undefined` anyways.
2016-05-31 18:59:21 +02:00
Amir Jafarian eb8f398c6a Docuemtation for `replace*` methods 2016-05-20 16:29:25 -04:00
Amir Jafarian 5c3d021fe7 Make the doc clear for `findORCreate` cb 2016-05-17 17:50:13 -04:00
David Cheung e723d8b641 Throw error upon extending unknown model
Create Model now uses findModel to retrieve base instead of getModel
and throws error upon base model not found
2016-05-10 18:00:56 -04:00
Ryan Graham 6964914bab
update copyright statements 2016-05-03 15:50:21 -07:00
Miroslav Bajtoš 4d7154a31a 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 16:20:07 +02:00
Miroslav Bajtoš 87bbf4502a Remove "loopback.autoAttach()"
The method was deprecated since LoopBack 2.0, there is no need to keep
it around in 3.0.
2016-05-03 14:01:39 +02:00
Simon Ho d16c789638 Fixes for emit `remoteMethodDisabled` PR
See https://github.com/strongloop/loopback/pull/2266#issuecomment-215689358
2016-04-29 16:42:13 -07:00
Supasate Choochaisri 0ca24389b2 Add new feature to emit a `remoteMethodDisabled` event when disabling a remote method.
Signed-off-by: Supasate Choochaisri <supasate.c@gmail.com>
2016-04-28 09:03:54 +07:00
Tim Needham 159aaf5afa 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.
2016-04-19 16:51:52 +02:00
Rand McKinney 58f32dd70e Update loopback.js
Update comment line that was creating invalid info in API docs.
2016-04-18 09:42:56 -07:00
Rand McKinney 88d41f84fd Merge pull request #2155 from sghung/master
Fix inconsistencies in JSDoc
2016-04-06 16:01:31 -07:00
Miroslav Bajtoš f9702b0ace Use eslint with loopback config
Drop jshint and jscs in favour of eslint.

Fix style violations.

While we are at this, reduce the max line length from 150 to 100.
2016-04-06 10:45:30 +02:00
Jue Hou eb09681f21 promise docs
Add promise jsdoc in loopback
2016-04-04 12:35:35 -04:00
sghung@ca.ibm.com d69ab1e411 Update JSDoc 2016-04-01 14:00:01 -04:00
Candy b5b900e0ff Remove constraint making isStatic required 2016-03-30 11:16:32 -04:00
Simon Ho b4e230389d Merge pull request #1780 from linguofeng/patch-1
Update persisted-model.js
2016-03-22 16:10:22 -07:00
sghung@ca.ibm.com 3302391ac7 Fix inconsistencies in JSDoc 2016-03-17 23:55:12 -04:00
Miroslav Bajtoš 93d487ffc0 Improve error message on connector init error 2016-02-26 14:46:26 +01:00
Sam Roberts b9acace932 application: correct spelling of "cannont" 2016-02-18 20:36:07 -08:00
Miroslav Bajtoš 804c71d7c6 Remove "loopback.DataModel"
The model was just a temporary alias to simplify migration of code
based on <=2.0.0-beta3
2016-01-25 10:17:45 +01:00
Chris Coggburn 7252c7686c Correct JSDoc findOrCreate() callback in PersistedModel
Update PersistedModel.findOrCreate() JSDoc to reflect the callback accepts an additional created boolean parameter.
2016-01-21 20:40:19 -07:00
Amir Jafarian 08a2786b04 Checkpoint speedup 2016-01-09 01:56:13 -05:00
Jue Hou 889c561ed3 Always use bluebird as promise library
Replace `global.Promise` with `bluebird`
2016-01-08 13:58:12 -05:00
Simon Ho e8179e119d Fix failing tests
JSCS is detecting improper whitespaces lib/persisted-model.js.
2015-12-31 14:04:09 -08:00
Rand McKinney 1af03613cc Update persisted-model.js
- Correct doc for findOrCreate.
- Fix indentation
- Remove quotes in example `where`
- Fix typo
- Fix spacing in notional where clause
2015-12-22 17:08:19 -08: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š 5e4bf1dd25 PersistedModel: log rectify/rectifyAll triggers
Add debug logging to identify what operations trigger rectify and
rectifyAll calls.
2015-12-17 14:13:47 +01:00
Rand McKinney 17abd8ac76 Update model.js
*Add doc comments for nestRemoting
*change cb to filterCallback in nestRemoting
2015-12-04 19:24:03 -05:00
Richard Pringle 03c8d044ad Fix typo in description of persistedModel.updateAttributes() 2015-11-11 16:54:21 -05:00
Miroslav Bajtoš 36cd5a7a78 lib/registry: fix findModel for model ctor
Fix `registry.findModel(arg)` to support the case when `arg` is already
a model constructor.
2015-11-09 16:01:43 +01:00
linguofeng 4717fb3dbd Update persisted-model.js
`find` to `findById`
2015-10-28 12:48:36 +08:00
Rand McKinney 32085475ed Fix typo in doc comment 2015-10-21 13:47:36 -07:00
Simon Ho 26af1472e7 Check configs for shared method settings 2015-09-28 16:27:48 -07:00
Miroslav Bajtoš c87bf9a1da Merge pull request #1681 from strongloop/fix/replication-perf-on-save
Fix perf of rectification after updateAttributes
2015-09-18 17:05:14 +02:00
Miroslav Bajtoš 89326c7630 Fix perf of rectification after updateAttributes
Improve the id-detection algorithm in the "after save" hook
to correctly handle "updateAttributes" as a single-model change
and DO NOT trigger full "rectify all" scan.
2015-09-17 19:23:00 +02:00
Rand McKinney 8d02e42cf3 Update persisted-model.js
Remove trailing whitespace.
2015-09-09 16:08:20 -07:00
Rand McKinney 3821824c97 Update persisted-model.js
Fix links in API docs to docs for where filter
2015-09-09 15:46:53 -07:00