Commit Graph

1573 Commits

Author SHA1 Message Date
Ritchie Martori 503eb948b7 Remove trailing whitespace from jsdoc 2015-07-08 16:53:51 -07:00
Rand McKinney ae7c12552a Update model.js
Updated JSdoc for remoteMethod
2015-07-07 11:01:50 -07:00
Ritchie Martori 860e2b0fe2 Downgrade version of loopback-testing 2015-06-26 11:34:28 -07:00
Miroslav Bajtoš 70ca7c51b4 Merge pull request #1323 from strongloop/feature/autoconfigure-auth-models
Auto-configure models required by `app.enableAuth`
2015-06-02 17:27:39 +02:00
Miroslav Bajtoš 3115e5055f Auto-configure models required by `app.enableAuth`
Modify `app.enableAuth` to automaticaly setup all required models
that are not attached to the app nor a datasource.

Users wishing to use this option must provide the name of the
data-source to use for these models.

Example usage:

    var app = loopback();
    app.dataSource('db', { connector: 'memory' });
    app.enableAuth({ dataSource: 'db' });

    app.use(loopback.rest());
    app.listen(3000);
2015-06-01 12:19:28 +02:00
Miroslav Bajtoš 0ccc1e2b73 Add loadBuiltinModels flag to loopback(options)
When creating an application with a local registry, the default
behaviour is to define only two core models Model & PersistedModel.

The new flag `loadBuiltinModels` modifies this behaviour and instructs
loopback to define all builtin models in the local registry too.
2015-06-01 12:19:28 +02:00
Raymond Feng 553a3b2083 Merge branch 'esco-master'
# Please enter a commit message to explain why this merge is necessary,
# especially if it merges an updated upstream into a topic branch.
#
# Lines starting with '#' will be ignored, and an empty message aborts
# the commit.
2015-05-29 16:47:08 -07:00
Raymond Feng 77bcc09107 Merge branch 'master' of https://github.com/esco/loopback into esco-master 2015-05-29 16:44:18 -07:00
Raymond Feng b283458a6f Merge branch 'mrfelton-polymorphic-scoped-inclue' 2015-05-28 16:15:43 -07:00
Raymond Feng b5f702afd3 Fix the test case 2015-05-28 16:15:02 -07:00
Raymond Feng b627220059 Merge branch 'polymorphic-scoped-inclue' of https://github.com/mrfelton/loopback into mrfelton-polymorphic-scoped-inclue 2015-05-22 09:20:20 -07:00
Tom Kirkpatrick d6c8d9725a Fix code standards issues 2015-05-14 22:09:51 +02:00
Raymond Feng fb50b880ec 2.18.0
* Make the test compatible with latest juggler (Raymond Feng)
2015-05-13 16:28:50 -07:00
Raymond Feng b3b6df3fd0 Merge pull request #1391 from strongloop/feature/connector-refactor
Make the test compatible with latest juggler
2015-05-13 16:27:38 -07:00
Raymond Feng 20c9695591 Make the test compatible with latest juggler 2015-05-13 12:52:31 -07:00
Tom Kirkpatrick 8fa736517a Add test case to highlight fatal error when trying to include a scoped relationship through a polymorphic relationship 2015-05-13 18:47:30 +02:00
Ritchie Martori 28a0537e81 2.17.3
* Use the new remoting.authorization hook for check access (Ritchie Martori)

 * Define remote methods via model settings/config (Miroslav Bajtoš)

 * Pass the full options object to the email send method in user verification process. (Alexandru Savin)

 * un-document _findLayerByHandler (Rand McKinney)

 * Gruntfile: disable debug & watch for CI builds (Miroslav Bajtoš)

 * Update devDependencies to the latest versions (Miroslav Bajtoš)

 * Remove trailing whitespace added by 242bcec (Miroslav Bajtoš)

 * Update model.js (Rand McKinney)
2015-05-12 16:15:18 -07:00
Ritchie Martori 805e0e0c1c Merge pull request #1370 from strongloop/fix/check-access-ordering
Use the new remoting.authorization hook for check access
2015-05-12 16:06:47 -07:00
Ritchie Martori 9cde2a45be Use the new remoting.authorization hook for check access 2015-05-12 15:33:05 -07:00
Miroslav Bajtoš 019488fe83 Merge pull request #1366 from strongloop/feature/remote-methods-in-json
Define remote methods via model settings/config
2015-05-12 17:32:32 +02:00
Miroslav Bajtoš f93b69ed0a Define remote methods via model settings/config
Process `settings.methods` and `config.methods` as a key-value map
where the key is the method name and the value is an object describing
the method in the format expected by strong-remoting.

Example: a static method `Model.create`

    "methods": {
      "create": {
        "isStatic": true,
        "accepts": {
           "arg": "data", "type": "Car",
           "http": { "source": "body" }
        },
        "returns": { "arg": "data", "type": "Car", "root": true }
      }
    }

This patch is based on the code proposed by @mrfelton in #1163.
2015-05-07 07:42:08 +02:00
Ritchie Martori 694ab814f9 Merge pull request #1368 from alexandrusavin/master
Pass the full options object to the email send method in user verification process
2015-05-06 09:47:55 -07:00
Alexandru Savin f70c209526 Pass the full options object to the email send method in user verification process. 2015-05-06 15:52:07 +02:00
Rand McKinney ce26141d85 un-document _findLayerByHandler 2015-05-04 12:23:21 -07:00
Miroslav Bajtoš df04e9d17f Merge pull request #1357 from strongloop/fix-build-on-iojs
Fix CI builds on io.js
2015-05-04 18:55:52 +02:00
Miroslav Bajtoš 581df35d22 Gruntfile: disable debug & watch for CI builds
This fixes the following error on io.js:

Fatal error: Maximum call stack size exceeded
RangeError: Maximum call stack size exceeded
    at String.match (native)
    at Object.exports.fromSource (node_modules/karma-browserify/node_modules/convert-source-map/index.js:109:19)
    at updateSourceMap (node_modules/karma-browserify/lib/bro.js:326:23)
    at Browserify.<anonymous> (node_modules/karma-browserify/lib/bro.js:351:9)
    at Browserify.g (events.js:257:16)
    at emitTwo (events.js:92:20)
    at Browserify.emit (events.js:169:7)
    at node_modules/karma-browserify/lib/bro.js:263:11
    at node_modules/browserify/index.js:758:13
    at ConcatStream.<anonymous> (node_modules/browserify/node_modules/concat-stream/index.js:36:43)
2015-05-04 18:30:01 +02:00
Miroslav Bajtoš 3435fc959a Update devDependencies to the latest versions 2015-05-04 18:29:50 +02:00
Miroslav Bajtoš cad616ed22 Remove trailing whitespace added by 242bcec 2015-05-04 18:19:13 +02:00
Rand McKinney 242bcec539 Update model.js
Add `extend()` method to API docs.
2015-04-28 10:06:14 -07:00
Miroslav Bajtoš b9493cdb45 2.17.2
* Fix regression in Model.getApp() (Miroslav Bajtoš)
2015-04-28 18:08:55 +02:00
Miroslav Bajtoš ff5f507560 Merge pull request #1343 from strongloop/fix/app-getApp
Fix regression in Model.getApp()
2015-04-28 18:08:27 +02:00
Miroslav Bajtoš b6b76d538c Fix regression in Model.getApp()
This patch fixes the method Model.getApp() that started to report
the following error after b61fae5 was landed:

assert.js:88
  throw new assert.AssertionError({
        ^
AssertionError: undefined == true
    at loopback/loopback/lib/model.js:392:7
    at EventEmitter.<anonymous> (loopback/loopback/lib/model.js:222:9)
    at EventEmitter.g (events.js:257:16)
    at emitOne (events.js:77:13)
    at EventEmitter.emit (events.js:166:7)
    at EventEmitter.app.model (loopback/loopback/lib/application.js:157:9)
2015-04-28 12:49:57 +02:00
Miroslav Bajtoš f93590de1b 2.17.1
* Allow dataSource === false (Raymond Feng)

 * Fix remoting metadata for User.login#include (Miroslav Bajtoš)
2015-04-28 08:09:44 +02:00
Miroslav Bajtoš da50d6ffb0 Merge pull request #1332 from strongloop/fix/user-login-include
Fix remoting metadata for User.login#include
2015-04-28 08:08:25 +02:00
Raymond Feng 99d23bb7c4 Merge pull request #1329 from strongloop/feature/allow-datasource-false
Allow dataSource === false
2015-04-24 08:46:31 -07:00
Raymond Feng f798882e9a Allow dataSource === false 2015-04-24 08:32:17 -07:00
Miroslav Bajtoš 03d9f64c82 Fix remoting metadata for User.login#include
Change the type of the "include" argument to "string array".

The type used to be "string" before and thus requests sending multiple
include items were technically incorrect.
2015-04-24 08:58:30 +02:00
Raymond Feng 42318f428c 2.17.0
* Disable inclusion of User.accessTokens (Raymond Feng)

 * Upgrade test fixtures to use LB 2.x layout (Raymond Feng)
2015-04-21 10:46:42 -07:00
Raymond Feng a4121ee3d6 Merge pull request #1318 from strongloop/feature/disable-include-access-tokens
Disable inclusion of User.accessTokens
2015-04-21 10:43:41 -07:00
Raymond Feng bdc741520e Disable inclusion of User.accessTokens 2015-04-20 11:44:07 -07:00
Raymond Feng ca004adfc6 Merge pull request #1301 from strongloop/feature/disable-include-access-tokens
Upgrade test fixtures to 2.x project layouts
2015-04-20 11:43:19 -07:00
Raymond Feng 12e19e36ea Upgrade test fixtures to use LB 2.x layout 2015-04-20 09:23:44 -07:00
Miroslav Bajtoš 69b4972590 2.16.3
* Rework global registry to be per-module-instance (Miroslav Bajtoš)
2015-04-17 19:36:53 +02:00
Miroslav Bajtoš d84a6466ad Merge pull request #1311 from strongloop/fix/global-registry
Rework global registry to be per-module-instance
2015-04-17 19:33:10 +02:00
Miroslav Bajtoš f130b7aa01 Rework global registry to be per-module-instance
Fix a regression introduced by b917075 where two loopback projects,
each one using a different instance of loopback module, were
sharing the global registry and thus not working correctly.

The issue was discovered by unit-tests in loopback-workspace.
2015-04-17 19:26:05 +02:00
Miroslav Bajtoš 73ee01f27c 2.16.1
* Add back loopback properties like modelBuilder (Miroslav Bajtoš)
2015-04-17 18:35:30 +02:00
Miroslav Bajtoš 7e99912669 Merge pull request #1310 from strongloop/fix/regression-in-loopback-props
Add back loopback properties like modelBuilder
2015-04-17 18:34:55 +02:00
Miroslav Bajtoš 4d0a824757 Add back loopback properties like modelBuilder
The commit b917075 accidentally removed a couple of properties,
this commit is bringing them back:

 - loopback.modelRegistry
 - loopback.defaultDataSources

A unit-test was added to prevent this kind of regressions in the future.
2015-04-17 18:05:25 +02:00
Raymond Feng 5158df8790 2.16.0
* Expose the `filter` argument for findById (Raymond Feng)

 * fixed the missing '.' in various description fields. (Edmond Lau)

 * Conflict resolution and Access control (Miroslav Bajtoš)

 * Fix the typo (Raymond Feng)

 * Fix PersistedModel._defineChangeModel (Miroslav Bajtoš)

 * AccessControl for change replication (Miroslav Bajtoš)

 * test: remove global autoAttach (Miroslav Bajtoš)

 * Add support for app level Model isolation (Ritchie Martori)

 * Implement ModelCtor.afterRemoteError (Miroslav Bajtoš)

 * Code cleanup, add Model._runWhenAttachedToApp (Miroslav Bajtoš)

 * Refactor Model and PersistedModel registration (Miroslav Bajtoš)

 * Fix the style issue (Raymond Feng)

 * Add missing error handlers to checkpoints() (Miroslav Bajtoš)

 * Fix where param format (Rand McKinney)

 * Test embedsOne CRUD methods (Fabien Franzen)
2015-04-16 15:13:49 -07:00
Raymond Feng 3dcde7994b Merge pull request #1306 from strongloop/feature/allow-filter-on-findById
Expose the `filter` argument for findById
2015-04-16 15:12:50 -07:00