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

firebase-functions

Package Overview
Dependencies
Maintainers
1
Versions
115
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

firebase-functions - npm Package Compare versions

Comparing version 0.5.6 to 0.5.7

5

changelog.txt

@@ -1,4 +0,1 @@

important - Update firebase-admin peer dependency to v4.2.1. Developer needs to run “npm install --save firebase-admin” inside the functions directory.
fixed - event.data.val() no longer returns array of nulls when the database node has a “length” key.
fixed - Fixed bug where event.data.forEach(snapshot => {}) caused snapshot.key to be a concatenation of the parent and child keys.
fixed - Fixed bug where nested storage objects had literal slashes in mediaLink property, instead of URL-escaped slashes.
feature - Add support for locally emulating functions.config().firebase via Firebase CLI.

27

lib/config.js

@@ -37,20 +37,21 @@ "use strict";

function init(credential) {
var loaded;
var loadedFromFile = {};
var firebaseEnv = {};
if (process.env.FIREBASE_PROJECT) {
firebaseEnv = { firebase: JSON.parse(process.env.FIREBASE_PROJECT) };
}
try {
loaded = require('../../../.runtimeconfig.json');
var path = process.env.CLOUD_RUNTIME_CONFIG || '../../../.runtimeconfig.json';
loadedFromFile = require(path);
}
catch (e) {
try {
loaded = require('../../../config.json');
}
catch (e) {
throw new Error('functions.config() is not available. ' +
'Please use the latest version of the Firebase CLI to deploy this function.');
}
// Do nothing
}
if (!_.has(loaded, 'firebase')) {
throw new Error('Firebase config variables are missing.');
var merged = _.merge({}, loadedFromFile, firebaseEnv);
if (!_.has(merged, 'firebase')) {
throw new Error('Firebase config variables are not available. ' +
'Please use the latest version of the Firebase CLI to deploy this function.');
}
_.set(loaded, 'firebase.credential', credential);
config.singleton = loaded;
_.set(merged, 'firebase.credential', credential);
config.singleton = merged;
}

@@ -60,3 +60,4 @@ "use strict";

if (!databaseURL) {
throw new Error('Missing expected config value firebase.databaseURL');
throw new Error('Missing expected config value firebase.databaseURL, ' +
'config is actually' + JSON.stringify(index_1.config()));
}

@@ -63,0 +64,0 @@ var match = databaseURL.match(databaseURLRegex);

{
"name": "firebase-functions",
"version": "0.5.6",
"version": "0.5.7",
"description": "Firebase SDK for Cloud Functions",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

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