Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

compound

Package Overview
Dependencies
Maintainers
1
Versions
84
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

compound - npm Package Compare versions

Comparing version 1.1.7-5 to 1.1.7-6

21

lib/i18n.js

@@ -7,5 +7,6 @@ var fs = require('fs'),

*/
module.exports = function i18n(compound) {
module.exports = function i18n(compound, root) {
var app = compound.app;
var dir = compound.root + '/config/locales';
root = root || compound.root;
var dir = root + '/config/locales';

@@ -174,5 +175,19 @@ if (!app) {

Object.keys(translations).forEach(function(namespace) {
compound.__localeData[localeName][namespace] = translations[namespace];
if ('object' === typeof compound.__localeData[localeName] && namespace in compound.__localeData[localeName]) {
merge(compound.__localeData[localeName][namespace], translations[namespace]);
} else {
compound.__localeData[localeName][namespace] = translations[namespace];
}
});
});
function merge(dest, data) {
for (var i in data) {
if (i in dest && typeof dest[i] === 'object') {
merge(dest[i], data[i]);
} else {
dest[i] = data[i];
}
}
}
}

2

lib/models.js

@@ -10,3 +10,3 @@ // Deps

*/
module.exports = function loadModels(compound) {
module.exports = function loadModels(compound, root) {
if (!compound.structure.models) {

@@ -13,0 +13,0 @@ return;

@@ -48,3 +48,3 @@ var Compound = require('../compound');

CompoundServer.prototype.init = function initCompoundServer() {
CompoundServer.prototype.init = function initCompoundServer(root) {
var compound = this, time;

@@ -54,3 +54,3 @@

compound.logger.init(compound);
Compound.prototype.init.call(compound);
Compound.prototype.init.call(compound, root);

@@ -57,0 +57,0 @@ if (compound.app) {

@@ -71,7 +71,6 @@ var fs = require('fs');

if (name in contents) {
if ('function' === typeof item) {
for (var i in item.prototype) {
contents[name].prototype[i] = item.prototype[i];
}
if (name in contents) {
if (key === 'controller') {
for (var i in item.prototype) {
contents[name].prototype[i] = item.prototype[i];
}

@@ -81,2 +80,5 @@ } else {

}
} else {
contents[name] = item;
}

@@ -83,0 +85,0 @@ if (ext === 'coffee' && !doRequire) {

{
"name": "compound",
"version": "1.1.7-5",
"version": "1.1.7-6",
"author": "Anatoliy Chakkaev",

@@ -41,3 +41,3 @@ "contributors": [

"railway-routes": ">= 0.0.6",
"kontroller": ">= 0.0.9",
"kontroller": ">= 0.0.9-0",
"inflection": "~1.2.5"

@@ -44,0 +44,0 @@ },

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc