Commit Graph

315 Commits

Author SHA1 Message Date
Miroslav Bajtoš 548dba0c37 v2.6.3 2015-01-13 13:35:32 +01:00
Miroslav Bajtoš a935669d9c Merge tag 'v2.6.2'
2.6.2

 * Don't swallow error when a sub-dependency doesn't resolve. (Samuel Reed)
2015-01-13 10:34:46 +01:00
Miroslav Bajtoš bb98472965 Merge branch 'release/2.6.2' into production 2015-01-13 10:34:44 +01:00
Miroslav Bajtoš d2c70bad3c v2.6.2 2015-01-13 10:34:42 +01:00
Miroslav Bajtoš 2a1f07aad9 Merge pull request #88 from STRML/master
Don't swallow error when a sub-dependency doesn't resolve.
2015-01-13 10:34:29 +01:00
Samuel Reed 30a7b6d9b8 Don't swallow error when a sub-dependency doesn't resolve.
This prevents an occurence where an error is completely swallowed if a script
required by loopback-boot has a bad require() call. The script is never ran
but execution continues.
2015-01-13 10:23:54 +01:00
Miroslav Bajtoš fbf1e95e29 Merge tag 'v2.6.1'
2.6.1

 * Fix "incompatible loopback version" check & msg (Miroslav Bajtoš)
2015-01-12 18:01:01 +01:00
Miroslav Bajtoš ab33132ef7 Merge branch 'release/2.6.1' into production 2015-01-12 18:00:59 +01:00
Miroslav Bajtoš 8bc526377f v2.6.1 2015-01-12 18:00:57 +01:00
Miroslav Bajtoš 146a3183eb Merge pull request #89 from strongloop/fix/version-error-message
Fix "incompatible loopback version" check & msg
2015-01-12 17:55:11 +01:00
Miroslav Bajtoš 4f8514a454 Fix "incompatible loopback version" check & msg
Use `util.format` to build the error message, `Error` constructors
does not support placeholders like `%s`.

Detect pre-release versions and handle them in the same way as regular
releases.
2015-01-12 16:00:06 +01:00
Miroslav Bajtoš 30ff50c581 Merge tag 'v2.6.0'
2.6.0

 * Add "booting" flag and emit "booted" event (Simon Ho)

 * Configure components via `component-config.json` (Miroslav Bajtoš)

 * Fix bad CLA URL in CONTRIBUTING.md (Ryan Graham)
2015-01-08 08:31:30 +01:00
Miroslav Bajtoš 33b3729b62 Merge branch 'release/2.6.0' into production 2015-01-08 08:31:28 +01:00
Miroslav Bajtoš 5fd79f0339 v2.6.0 2015-01-08 08:31:26 +01:00
Miroslav Bajtoš c47bde9281 Merge pull request #77 from strongloop/feature/add-boot-completion-check
Add "booting" flag and emit "booted" event
2015-01-07 16:41:29 +01:00
Miroslav Bajtoš 8aa7156d3b Merge pull request #86 from strongloop/feature/load-component
Configure components via `component-config.json`
2015-01-07 08:28:29 +01:00
Simon Ho 1f7d8e56e8 Add "booting" flag and emit "booted" event 2015-01-06 21:27:32 -08:00
Miroslav Bajtoš f8247be23c Configure components via `component-config.json`
Load configuration of components from `component-config`
and configure all components as specified.

Sample JSON:

    {
      "loopback-component-foobar": {
        "option1": "value1",
        "option2": "value2"
      }
    }

The component is expected to export the following function:

    module.exports = function(app, options) { /* ... */ };
2015-01-06 14:00:26 +01:00
Ryan Graham 1ef2616979 Fix bad CLA URL in CONTRIBUTING.md 2014-12-29 08:27:45 -08:00
Miroslav Bajtoš c4473951a0 Merge tag 'v2.5.2'
2.5.2

 * Dedupe boot scripts (Eric Satterwhite)
2014-12-19 15:21:44 +01:00
Miroslav Bajtoš 6a442f8307 Merge branch 'release/2.5.2' into production 2014-12-19 15:21:42 +01:00
Miroslav Bajtoš 4031f6b985 v2.5.2 2014-12-19 15:21:40 +01:00
Miroslav Bajtoš 8a3e529ea3 Merge pull request #72 from esatterwhite/lb-64-multiple-invocation-same-boot-script
Ensure to dedupe boot scripts array before running.

Closes #72
Fixes #64
2014-12-19 15:18:58 +01:00
Eric Satterwhite 301031b78f Dedupe boot scripts
Remove duplicated entries in the array of boot scripts to run.
Because the bootDirs defaults to process.cwd(), if the user manually
includes scripts in the same directory, without specifying a bootDir,
those scripts will be included multiple times.
2014-12-19 15:18:37 +01:00
Miroslav Bajtoš beb4f8c34c Merge tag 'v2.5.1'
2.5.1

 * Replace underscore with lodash (Ryan Graham)
2014-12-08 08:09:36 +01:00
Miroslav Bajtoš 4f65067348 Merge branch 'release/2.5.1' into production 2014-12-08 08:09:35 +01:00
Miroslav Bajtoš a90964ab30 v2.5.1 2014-12-08 08:09:33 +01:00
Miroslav Bajtoš 4b9e13bfc6 Merge pull request #76 from strongloop/feature/remove-underscore
Replace underscore with lodash
2014-12-03 19:15:00 +01:00
Ryan Graham e1f7c592a1 Replace underscore with lodash
Replace 2 uses of underscore and 1 use of a lodash submodule with full
lodash module.
2014-12-02 22:10:52 -08:00
Miroslav Bajtoš 8da44e69dd Merge tag 'v2.5.0'
2.5.0

 * compiler: resolve paths in middleware params (Miroslav Bajtoš)
2014-12-02 18:14:04 +01:00
Miroslav Bajtoš 77ded6edfe Merge branch 'release/2.5.0' into production 2014-12-02 18:14:00 +01:00
Miroslav Bajtoš e81ff119a3 v2.5.0 2014-12-02 18:13:58 +01:00
Miroslav Bajtoš 3dfa3bcb13 Merge pull request #74 from strongloop/feature/relative-paths-in-middleware-params
compiler: resolve paths in middleware params
2014-12-01 20:18:21 +01:00
Miroslav Bajtoš 8cc2518cb0 compiler: resolve paths in middleware params
Introduce a convention for specifying relative paths in middleware
params: values prefixed with `$!` and starting with `./` or `../`
are resolved relatively to `middleware.json`.

Example:

    {
      "files": {
        "loopback#static": {
          "params": "$!../client"
        },
        "loopback#static": {
          "params": "$!./public"
        }
      }
    }
2014-11-28 12:17:27 +01:00
Miroslav Bajtoš 81303b3093 Merge tag 'v2.4.0'
2.4.0

 * Implement shorthand notation for middleware paths (Raymond Feng)

 * Load middleware and phases from `middleware.json` (Miroslav Bajtoš)

 * Add jscs style check, fix violations found (Miroslav Bajtoš)

 * Clean up .jshintrc (Miroslav Bajtoš)

 * Use `chai` instead of `must` (Miroslav Bajtoš)
2014-11-27 19:23:49 +01:00
Miroslav Bajtoš d3145f5745 Merge branch 'release/2.4.0' into production 2014-11-27 19:23:47 +01:00
Miroslav Bajtoš 097fced310 v2.4.0 2014-11-27 19:23:45 +01:00
Miroslav Bajtoš 6de571f442 Merge pull request #70 from strongloop/feature/short-middleware-paths
#68 - Implement shorthand notation for middleware paths
2014-11-25 11:51:00 +01:00
Raymond Feng 2f72006c88 Implement shorthand notation for middleware paths
When the middleware name (path) is in the format {module}#{filename},
loopback-boot resolves the path by trying multiple locations and
using the first one that exists:

 - {module} and check the {filename} property of the exports
     -> e.g. loopback.rest
- {module}/server/middleware/{filename}
    -> e.g. loopback/server/middleware/rest
 - {module}/middleware/{filename}
    -> e.g. loopback/middleware/rest

Values in any other format will bypass this resolution algorithm and
they will be used in the original form:

 - a full path in a module: loopback/server/middleware/rest
 - a relative path: ./middleware/custom, ./custom, ../logger
 - an absolute path: /usr/local/lib/node_modules/compression
2014-11-25 11:43:00 +01:00
Miroslav Bajtoš d25c64523d Merge pull request #66 from strongloop/feature/middleware-mounting
Load middleware and phases from `middleware.json`
2014-11-19 09:58:38 +01:00
Miroslav Bajtoš 1114bc9227 Load middleware and phases from `middleware.json`
Sample JSON:

        {
          "routes:before": {
            "morgan": {
              "params": ["dev"]
            }
          },
          "routes": {
            "loopback/server/middleware/rest": {
            }
          },
          "subapps": {
            "./adminer": {
            },
          }
        }

The JSON file can be customized using the usual conventions:
  - middleware.local.{js|json}
  - middleware.{env}.{js|json}

It is also possible to mount the same middleware in the same phase
multiple times with different configuration.

Example config:

    {
      "auth": {
        "oauth2": [
          {
            "params": "first"
          },
          {
            "params": "second"
          }
        ]
      },
    });
2014-11-19 09:45:04 +01:00
Miroslav Bajtoš 08fcc5faa7 Merge pull request #67 from strongloop/feature/infrastructure-cleanup
Infrastructure cleanup
2014-11-13 16:09:10 +01:00
Miroslav Bajtoš 5b5071864b Add jscs style check, fix violations found 2014-11-13 15:54:59 +01:00
Miroslav Bajtoš 83723379a2 Clean up .jshintrc
jshint does not support `trailing` as of v1.5.0.

Remove `maxlen` too, jscs provides better implementation.

Fix definition of global mocha variables - mark them as immutable.
2014-11-13 15:33:23 +01:00
Miroslav Bajtoš e2aff71bf9 Use `chai` instead of `must`
As of 1.10, chai supports nonary assertions, there are no more reasons
for using a different variant.
2014-11-13 15:31:35 +01:00
Raymond Feng 6040f66adc Merge tag 'v2.3.1'
2.3.1
2014-11-10 08:58:42 -08:00
Raymond Feng 9cd5d3d125 Merge branch 'release/2.3.1' into production 2014-11-10 08:58:32 -08:00
Raymond Feng f4c7b1ba38 Bump version 2014-11-10 08:57:46 -08:00
Raymond Feng 27bd48e0f6 Merge pull request #63 from strongloop/feature/fix-lb-issue-756
Fix the test for built-in models on Windows
2014-11-10 08:56:21 -08:00
Raymond Feng db917bf03b Fix the test for built-in models on Windows
See https://github.com/strongloop/loopback/issues/756
2014-11-10 08:22:57 -08:00