chore: upgrade dependencies to remove npm audit warnings
This commit is contained in:
parent
9b1d4885ab
commit
7a422c6ada
|
@ -15,10 +15,12 @@ var assert = require('assert');
|
||||||
var fs = require('fs');
|
var fs = require('fs');
|
||||||
var extend = require('util')._extend;
|
var extend = require('util')._extend;
|
||||||
var RemoteObjects = require('strong-remoting');
|
var RemoteObjects = require('strong-remoting');
|
||||||
var classify = require('underscore.string/classify');
|
var _ = require('lodash');
|
||||||
var camelize = require('underscore.string/camelize');
|
|
||||||
var path = require('path');
|
var path = require('path');
|
||||||
var util = require('util');
|
|
||||||
|
function classify(name) {
|
||||||
|
return _.upperFirst(_.camelCase(name));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The `App` object represents a Loopback application.
|
* The `App` object represents a Loopback application.
|
||||||
|
@ -133,7 +135,7 @@ app.model = function(Model, config) {
|
||||||
var modelName = Model.modelName;
|
var modelName = Model.modelName;
|
||||||
this.models[modelName] =
|
this.models[modelName] =
|
||||||
this.models[classify(modelName)] =
|
this.models[classify(modelName)] =
|
||||||
this.models[camelize(modelName)] = Model;
|
this.models[_.camelCase(modelName)] = Model;
|
||||||
|
|
||||||
this.models().push(Model);
|
this.models().push(Model);
|
||||||
|
|
||||||
|
@ -177,7 +179,7 @@ app.deleteModelByName = function(modelName) {
|
||||||
const ModelCtor = this.models[modelName];
|
const ModelCtor = this.models[modelName];
|
||||||
delete this.models[modelName];
|
delete this.models[modelName];
|
||||||
delete this.models[classify(modelName)];
|
delete this.models[classify(modelName)];
|
||||||
delete this.models[camelize(modelName)];
|
delete this.models[_.camelCase(modelName)];
|
||||||
|
|
||||||
if (ModelCtor) {
|
if (ModelCtor) {
|
||||||
ModelCtor.removeAllListeners();
|
ModelCtor.removeAllListeners();
|
||||||
|
@ -269,7 +271,7 @@ app.dataSource = function(name, config) {
|
||||||
var ds = dataSourcesFromConfig(name, config, this.connectors, this.registry);
|
var ds = dataSourcesFromConfig(name, config, this.connectors, this.registry);
|
||||||
this.dataSources[name] =
|
this.dataSources[name] =
|
||||||
this.dataSources[classify(name)] =
|
this.dataSources[classify(name)] =
|
||||||
this.dataSources[camelize(name)] = ds;
|
this.dataSources[_.camelCase(name)] = ds;
|
||||||
ds.app = this;
|
ds.app = this;
|
||||||
return ds;
|
return ds;
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
|
@ -298,7 +300,7 @@ app.dataSource = function(name, config) {
|
||||||
app.connector = function(name, connector) {
|
app.connector = function(name, connector) {
|
||||||
this.connectors[name] =
|
this.connectors[name] =
|
||||||
this.connectors[classify(name)] =
|
this.connectors[classify(name)] =
|
||||||
this.connectors[camelize(name)] = connector;
|
this.connectors[_.camelCase(name)] = connector;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -48,6 +48,7 @@
|
||||||
"express": "^4.14.0",
|
"express": "^4.14.0",
|
||||||
"inflection": "^1.6.0",
|
"inflection": "^1.6.0",
|
||||||
"isemail": "^2.2.1",
|
"isemail": "^2.2.1",
|
||||||
|
"lodash": "^4.17.11",
|
||||||
"loopback-connector-remote": "^3.0.0",
|
"loopback-connector-remote": "^3.0.0",
|
||||||
"loopback-datasource-juggler": "^3.28.0",
|
"loopback-datasource-juggler": "^3.28.0",
|
||||||
"loopback-filters": "^1.0.0",
|
"loopback-filters": "^1.0.0",
|
||||||
|
@ -59,8 +60,7 @@
|
||||||
"stable": "^0.1.5",
|
"stable": "^0.1.5",
|
||||||
"strong-globalize": "^4.1.1",
|
"strong-globalize": "^4.1.1",
|
||||||
"strong-remoting": "^3.11.0",
|
"strong-remoting": "^3.11.0",
|
||||||
"uid2": "0.0.3",
|
"uid2": "0.0.3"
|
||||||
"underscore.string": "^3.3.5"
|
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"babel-preset-es2015": "^6.22.0",
|
"babel-preset-es2015": "^6.22.0",
|
||||||
|
@ -74,7 +74,7 @@
|
||||||
"eslint-config-loopback": "^12.0.0",
|
"eslint-config-loopback": "^12.0.0",
|
||||||
"eslint-plugin-mocha": "^5.1.0",
|
"eslint-plugin-mocha": "^5.1.0",
|
||||||
"express-session": "^1.14.0",
|
"express-session": "^1.14.0",
|
||||||
"grunt": "^1.0.1",
|
"grunt": "^1.0.4",
|
||||||
"grunt-browserify": "^5.0.0",
|
"grunt-browserify": "^5.0.0",
|
||||||
"grunt-cli": "^1.2.0",
|
"grunt-cli": "^1.2.0",
|
||||||
"grunt-contrib-uglify": "^3.4.0",
|
"grunt-contrib-uglify": "^3.4.0",
|
||||||
|
@ -89,7 +89,7 @@
|
||||||
"karma-es6-shim": "^1.0.0",
|
"karma-es6-shim": "^1.0.0",
|
||||||
"karma-firefox-launcher": "^1.0.0",
|
"karma-firefox-launcher": "^1.0.0",
|
||||||
"karma-html2js-preprocessor": "^1.0.0",
|
"karma-html2js-preprocessor": "^1.0.0",
|
||||||
"karma-junit-reporter": "^1.2.0",
|
"karma-junit-reporter": "^2.0.0",
|
||||||
"karma-mocha": "^1.1.1",
|
"karma-mocha": "^1.1.1",
|
||||||
"karma-script-launcher": "^1.0.0",
|
"karma-script-launcher": "^1.0.0",
|
||||||
"loopback-boot": "^2.7.0",
|
"loopback-boot": "^2.7.0",
|
||||||
|
|
|
@ -1053,7 +1053,7 @@ describe('app', function() {
|
||||||
|
|
||||||
it('adds a camelized alias', function() {
|
it('adds a camelized alias', function() {
|
||||||
app.connector('FOO-BAR', loopback.Memory);
|
app.connector('FOO-BAR', loopback.Memory);
|
||||||
expect(app.connectors.FOOBAR).to.equal(loopback.Memory);
|
expect(app.connectors.FooBar).to.equal(loopback.Memory);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue