* Fix the build failure (Raymond Feng)
* Fix the model-config/datasource merge (Raymond Feng)
* Resolved style issue (Dennis Ashby)
* Added code to allow model-config to respect model-config.local.js and model-config.env.js as do other config files. (Dennis Ashby)
* Add jsdoc for `options.mixinSources` (Miroslav Bajtoš)
* allow middleware to be optional (Hage Yaapa)
* Support iisnode using named pipes as PORT value (Jonathan Sheely)
* support 'mixinsources' option (Pradnya Baviskar)
* compiler: Simplify verifyModelDefinitions() (Miroslav Bajtoš)
* Fix coding style issues, add API docs (Miroslav Bajtoš)
* Extend options arg to support custom model definitions (Shlomi Assaf)
* add support for mixins - [mixinDirs]: List of directories to look for files containing model mixin definition. (Pradnya Baviskar)
* Upgrade lodash and drop underscore.string (Bryan Clark)
* add console.error message to a bad require in a boot script (Bryan Clark)
* Support per-application registry of models (Miroslav Bajtoš)
* Use filename as default value for Model name (Pradnya Baviskar)
* compiler: code cleanup (Miroslav Bajtoš)
* Improve the resolution of relative paths - resolve module relative path for component - prioritize coffeescript over json (Pradnya Baviskar)
* Resolve module paths as relative to appRootDir - for middleware (Pradnya Baviskar)
* Support for multiple apps in browserified bundle. (Krishna Raman)
* Resolve missing file extension for module relative paths (Pradnya Baviskar)
* Resolve module paths as relative to appRootDir (Pradnya Baviskar)
* Resolve relative paths in using appRootDir (Pradnya Baviskar)
* Add feature to disable component (Pradnya Baviskar)
* Fix test for different line endings on Windows (Pradnya Baviskar)
* Refactor unit test assertions to be more specific (Simon Ho)
* Add unit test to verify `app.booting flag status (Simon Ho)
Update to the latest version of "lodash" to use the string functions
included and drop the usage of "underscore.string".
Existing tests run checks for `flying-car` definitions to be named
`FlyingCar` so there doesn’t seem to be a need to add more checks.
`isFinite` changed from the older version of lodash to no longer coerce
strings into numbers, this commit adds a call of `parseInt` before
checking whether the value is a finite number.
`parseInt` on an undefined returns NaN which isFinite does not identify
as a number.
While changing this part, the code was reworked to use `Number.isFinite`
and thus the executor no longer depends on lodash. This should reduce
the size of the browser bundle.
Load models for any filetypes registered in require.extensions.
- Server side coffee-script requires a `require('coffee-script/register');`
- Client side coffee-script requires Coffeeify.
When executor passes the instruction to loopback methods,
loopback modifies the data. Since we are loading the data using
`require` such changes affects also code that calls
`require` for one of the instructions files.
This change adds a deep clone step to prevent this issue.
Hide `compile` and `execute` and provide a better API for browserified
applications:
- `boot.compileToBrowserify(options, bundler)` calls `compile` under
the hood and adds all instructions and scripts to the bundler.
- `bootBrowserApp(app)` is exported by loopback-boot when the module
is loaded in a browser, the function loads the instructions as
bundled by `compileToBrowserify`.
This new API hides all implementation details from the user and makes
it easy to add loopback-boot to any build script.
Sub-directories of `models/` and `boot/` that cannot be required
(they don't have an index.js file) are silently skipped now.
This enables developers to put test files into `models/test/`.
Modify loading of `appConfig` and `dataSourceConfig` to look for
the following files:
- app.json
- app.local.{js|json}
- app.{$env}.{js|json}
- datasources.json
- datasources.local.{js|json}
- datasources.{$env}.{js|json}
where $env is the value of `app.get('env')`, which usually defaults
to `process.env.NODE_ENV`.
The values in the additional files are applied to the config object,
overwritting any existing values. The new values must be value types
like String or Number; Object and Array are not supported.
Additional datasource config files cannot define new datasources,
only modify existing ones.
The commit includes refactoring of the config-loading code into
a standalone file.
Move `app.boot()` and its tests from loopback.
Fix jshint warnings.
Clean up unit tests - remove dependency on global variables created
by loopback's test/support.js