backend-assistant
Advanced tools
Comparing version 0.0.28 to 0.0.29
{ | ||
"name": "backend-assistant", | ||
"version": "0.0.28", | ||
"version": "0.0.29", | ||
"description": "Powerful assistive functions for Firebase backends", | ||
@@ -5,0 +5,0 @@ "main": "src/index.js", |
@@ -114,2 +114,3 @@ let _ = require('lodash'); | ||
for (var i = 0, l = args.length; i < l; i++) { | ||
let tempItem; | ||
// if it's an error, log in now and continue to next item | ||
@@ -120,5 +121,7 @@ if (args[i] instanceof Error) { | ||
} | ||
logs = logs.concat(typeof args[i] === 'object' | ||
? tryLogPrep(args[i], self.meta.environment) | ||
: args[i]); | ||
tempItem = typeof args[i] === 'object' | ||
? tryLogPrep(args[i], meta.environment) | ||
: args[i]; | ||
tempItem = typeof tempItem === 'string' && self.meta.environment !== 'development' ? tempItem.replace(/\r\n|\r|\n/, '') : tempItem; | ||
logs = logs.concat(tempItem); | ||
} | ||
@@ -253,5 +256,9 @@ | ||
return ( | ||
headers['cf-ipcountry'] || | ||
(headers['x-country-code'] || '').split(',')[0] || | ||
'' | ||
) | ||
).trim() | ||
// return ( | ||
// // headers['cf-ipcountry'] || | ||
// '' | ||
// ) | ||
} | ||
@@ -262,7 +269,15 @@ | ||
return ( | ||
headers['cf-connecting-ip'] || | ||
headers['x-appengine-user-ip'] || | ||
(headers['x-forwarded-for'] || '').split(',').pop() || | ||
(headers['fastly-client-ip'] || '').split(',')[0] || | ||
(headers['x-forwarded-for'] || '').split(',')[0] || | ||
(headers['x-appengine-user-ip'] || '').split(',')[0] || | ||
(headers['cf-connecting-ip'] || '').split(',')[0] || | ||
(headers['fastly-temp-xff'] || '').split(',')[0] || | ||
'127.0.0.1' | ||
) | ||
).trim() | ||
// return ( | ||
// headers['cf-connecting-ip'] || | ||
// headers['x-appengine-user-ip'] || | ||
// (headers['x-forwarded-for'] || '').split(',').pop() || | ||
// '127.0.0.1' | ||
// ) | ||
} | ||
@@ -269,0 +284,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
16180
306