firebase-admin
Advanced tools
Comparing version 4.0.2 to 4.0.3
@@ -1,2 +0,2 @@ | ||
/*! firebase-admin v4.0.2 | ||
/*! firebase-admin v4.0.3 | ||
https://firebase.google.com/terms/ */ | ||
@@ -3,0 +3,0 @@ /// <reference types="chai" /> |
@@ -1,2 +0,2 @@ | ||
/*! firebase-admin v4.0.2 | ||
/*! firebase-admin v4.0.3 | ||
https://firebase.google.com/terms/ */ | ||
@@ -3,0 +3,0 @@ "use strict"; |
@@ -1,2 +0,2 @@ | ||
/*! firebase-admin v4.0.2 | ||
/*! firebase-admin v4.0.3 | ||
https://firebase.google.com/terms/ */ | ||
@@ -3,0 +3,0 @@ /// <reference types="chai" /> |
@@ -1,2 +0,2 @@ | ||
/*! firebase-admin v4.0.2 | ||
/*! firebase-admin v4.0.3 | ||
https://firebase.google.com/terms/ */ | ||
@@ -3,0 +3,0 @@ "use strict"; |
@@ -1,2 +0,2 @@ | ||
/*! firebase-admin v4.0.2 | ||
/*! firebase-admin v4.0.3 | ||
https://firebase.google.com/terms/ */ | ||
@@ -3,0 +3,0 @@ /// <reference types="chai" /> |
@@ -1,2 +0,2 @@ | ||
/*! firebase-admin v4.0.2 | ||
/*! firebase-admin v4.0.3 | ||
https://firebase.google.com/terms/ */ | ||
@@ -3,0 +3,0 @@ "use strict"; |
@@ -1,2 +0,2 @@ | ||
/*! firebase-admin v4.0.2 | ||
/*! firebase-admin v4.0.3 | ||
https://firebase.google.com/terms/ */ | ||
@@ -3,0 +3,0 @@ import { FirebaseServiceInterface } from '../firebase-service'; |
@@ -1,2 +0,2 @@ | ||
/*! firebase-admin v4.0.2 | ||
/*! firebase-admin v4.0.3 | ||
https://firebase.google.com/terms/ */ | ||
@@ -3,0 +3,0 @@ "use strict"; |
@@ -1,2 +0,2 @@ | ||
/*! firebase-admin v4.0.2 | ||
/*! firebase-admin v4.0.3 | ||
https://firebase.google.com/terms/ */ | ||
@@ -3,0 +3,0 @@ /// <reference types="chai" /> |
@@ -1,2 +0,2 @@ | ||
/*! firebase-admin v4.0.2 | ||
/*! firebase-admin v4.0.3 | ||
https://firebase.google.com/terms/ */ | ||
@@ -97,3 +97,3 @@ "use strict"; | ||
'service account used to authenticate this SDK.'; | ||
var verifyIdTokenDocsMessage = ' See https://firebase.google.com/docs/auth/server/verify-id-tokens ' + | ||
var verifyIdTokenDocsMessage = ' See https://firebase.google.com/docs/auth/admin/verify-id-tokens ' + | ||
'for details on how to retrieve an ID token.'; | ||
@@ -100,0 +100,0 @@ var errorMessage; |
@@ -1,2 +0,2 @@ | ||
/*! firebase-admin v4.0.2 | ||
/*! firebase-admin v4.0.3 | ||
https://firebase.google.com/terms/ */ | ||
@@ -3,0 +3,0 @@ /// <reference types="chai" /> |
@@ -1,2 +0,2 @@ | ||
/*! firebase-admin v4.0.2 | ||
/*! firebase-admin v4.0.3 | ||
https://firebase.google.com/terms/ */ | ||
@@ -3,0 +3,0 @@ "use strict"; |
@@ -1,2 +0,2 @@ | ||
/*! firebase-admin v4.0.2 | ||
/*! firebase-admin v4.0.3 | ||
https://firebase.google.com/terms/ */ | ||
@@ -3,0 +3,0 @@ import { FirebaseNamespace } from './firebase-namespace'; |
@@ -1,2 +0,2 @@ | ||
/*! firebase-admin v4.0.2 | ||
/*! firebase-admin v4.0.3 | ||
https://firebase.google.com/terms/ */ | ||
@@ -3,0 +3,0 @@ "use strict"; |
@@ -1,2 +0,2 @@ | ||
/*! firebase-admin v4.0.2 | ||
/*! firebase-admin v4.0.3 | ||
https://firebase.google.com/terms/ */ | ||
@@ -3,0 +3,0 @@ /// <reference types="chai" /> |
@@ -1,2 +0,2 @@ | ||
/*! firebase-admin v4.0.2 | ||
/*! firebase-admin v4.0.3 | ||
https://firebase.google.com/terms/ */ | ||
@@ -3,0 +3,0 @@ "use strict"; |
@@ -1,2 +0,2 @@ | ||
/*! firebase-admin v4.0.2 | ||
/*! firebase-admin v4.0.3 | ||
https://firebase.google.com/terms/ */ | ||
@@ -3,0 +3,0 @@ /// <reference types="chai" /> |
@@ -1,2 +0,2 @@ | ||
/*! firebase-admin v4.0.2 | ||
/*! firebase-admin v4.0.3 | ||
https://firebase.google.com/terms/ */ | ||
@@ -32,3 +32,14 @@ "use strict"; | ||
else if (appName in this.apps_) { | ||
throw new Error("Firebase app named \"" + appName + "\" already exists."); | ||
if (appName === DEFAULT_APP_NAME) { | ||
throw new Error('The default Firebase app already exists. This means you called initializeApp() ' + | ||
'more than once without providing an app name as the second argument. In most cases ' + | ||
'you only need to call initializeApp() once. But if you do want to initialize ' + | ||
'multiple apps, pass a second argument to initializeApp() to give each app a unique ' + | ||
'name.'); | ||
} | ||
else { | ||
throw new Error(("Firebase app named \"" + appName + "\" already exists. This means you called initializeApp() ") + | ||
'more than once with the same app name as the second argument. Make sure you provide a ' + | ||
'unique name every time you call initializeApp().'); | ||
} | ||
} | ||
@@ -53,3 +64,11 @@ var app = new firebase_app_1.FirebaseApp(options, appName, this); | ||
else if (!(appName in this.apps_)) { | ||
throw new Error("Firebase app named \"" + appName + "\" does not exist."); | ||
var errorMessage = void 0; | ||
if (appName === DEFAULT_APP_NAME) { | ||
errorMessage = 'The default Firebase app does not exist. '; | ||
} | ||
else { | ||
errorMessage = "Firebase app named \"" + appName + "\" does not exist. "; | ||
} | ||
errorMessage += 'Make sure you call initializeApp() before using any of the Firebase services.'; | ||
throw new Error(errorMessage); | ||
} | ||
@@ -174,3 +193,3 @@ return this.apps_[appName]; | ||
this.credential = firebaseCredential; | ||
this.SDK_VERSION = '4.0.2'; | ||
this.SDK_VERSION = '4.0.3'; | ||
/* tslint:disable */ | ||
@@ -177,0 +196,0 @@ // TODO(jwenger): Database is the only consumer of firebase.Promise. We should update it to use |
@@ -1,2 +0,2 @@ | ||
/*! firebase-admin v4.0.2 | ||
/*! firebase-admin v4.0.3 | ||
https://firebase.google.com/terms/ */ | ||
@@ -3,0 +3,0 @@ /// <reference types="chai" /> |
@@ -1,3 +0,3 @@ | ||
/*! firebase-admin v4.0.2 | ||
/*! firebase-admin v4.0.3 | ||
https://firebase.google.com/terms/ */ | ||
"use strict"; |
@@ -1,4 +0,4 @@ | ||
/*! firebase-admin v4.0.2 | ||
/*! firebase-admin v4.0.3 | ||
https://firebase.google.com/terms/ */ | ||
import * as firebase from './default-namespace'; | ||
export = firebase; |
@@ -1,2 +0,2 @@ | ||
/*! firebase-admin v4.0.2 | ||
/*! firebase-admin v4.0.3 | ||
https://firebase.google.com/terms/ */ | ||
@@ -3,0 +3,0 @@ "use strict"; |
@@ -1,2 +0,2 @@ | ||
/*! firebase-admin v4.0.2 | ||
/*! firebase-admin v4.0.3 | ||
https://firebase.google.com/terms/ */ | ||
@@ -3,0 +3,0 @@ /// <reference types="chai" /> |
@@ -1,2 +0,2 @@ | ||
/*! firebase-admin v4.0.2 | ||
/*! firebase-admin v4.0.3 | ||
https://firebase.google.com/terms/ */ | ||
@@ -3,0 +3,0 @@ "use strict"; |
@@ -1,2 +0,2 @@ | ||
/*! firebase-admin v4.0.2 | ||
/*! firebase-admin v4.0.3 | ||
https://firebase.google.com/terms/ */ | ||
@@ -3,0 +3,0 @@ /** |
@@ -1,2 +0,2 @@ | ||
/*! firebase-admin v4.0.2 | ||
/*! firebase-admin v4.0.3 | ||
https://firebase.google.com/terms/ */ | ||
@@ -3,0 +3,0 @@ "use strict"; |
@@ -1,2 +0,2 @@ | ||
/*! firebase-admin v4.0.2 | ||
/*! firebase-admin v4.0.3 | ||
https://firebase.google.com/terms/ */ | ||
@@ -3,0 +3,0 @@ /// <reference types="node" /> |
@@ -1,2 +0,2 @@ | ||
/*! firebase-admin v4.0.2 | ||
/*! firebase-admin v4.0.3 | ||
https://firebase.google.com/terms/ */ | ||
@@ -130,3 +130,3 @@ "use strict"; | ||
code: 'invalid-uid', | ||
message: 'The uid must be a non-empty string with at most 128 alphanumeric characters.', | ||
message: 'The uid must be a non-empty string with at most 128 characters.', | ||
}; | ||
@@ -133,0 +133,0 @@ AuthClientErrorCode.MISSING_UID = { |
@@ -1,11 +0,4 @@ | ||
/*! firebase-admin v4.0.2 | ||
/*! firebase-admin v4.0.3 | ||
https://firebase.google.com/terms/ */ | ||
/** | ||
* Validates that a string is alpha numeric. | ||
* | ||
* @param {any} alphanumeric The string to validate. | ||
* @return {boolean} Whether the string is alpha-numeric or not. | ||
*/ | ||
export declare function isAlphanumeric(alphanumeric: any): boolean; | ||
/** | ||
* Validates that a string is a valid Firebase Auth uid. | ||
@@ -12,0 +5,0 @@ * |
@@ -1,2 +0,2 @@ | ||
/*! firebase-admin v4.0.2 | ||
/*! firebase-admin v4.0.3 | ||
https://firebase.google.com/terms/ */ | ||
@@ -6,16 +6,2 @@ "use strict"; | ||
/** | ||
* Validates that a string is alpha numeric. | ||
* | ||
* @param {any} alphanumeric The string to validate. | ||
* @return {boolean} Whether the string is alpha-numeric or not. | ||
*/ | ||
function isAlphanumeric(alphanumeric) { | ||
if (typeof alphanumeric !== 'string') { | ||
return false; | ||
} | ||
var re = /^[a-zA-Z0-9]*$/; | ||
return re.test(alphanumeric); | ||
} | ||
exports.isAlphanumeric = isAlphanumeric; | ||
/** | ||
* Validates that a string is a valid Firebase Auth uid. | ||
@@ -27,4 +13,3 @@ * | ||
function isUid(uid) { | ||
// A uid should be an alphanumeric string with up to 128 characters. | ||
return isAlphanumeric(uid) && uid.length > 0 && uid.length <= 128; | ||
return typeof uid === 'string' && uid.length > 0 && uid.length <= 128; | ||
} | ||
@@ -31,0 +16,0 @@ exports.isUid = isUid; |
{ | ||
"name": "firebase-admin", | ||
"version": "4.0.2", | ||
"version": "4.0.3", | ||
"dependencies": { | ||
@@ -11,5 +11,5 @@ "@types/jsonwebtoken": { | ||
"@types/node": { | ||
"version": "6.0.46", | ||
"version": "6.0.49", | ||
"from": "@types/node@*", | ||
"resolved": "https://registry.npmjs.org/@types/node/-/node-6.0.46.tgz" | ||
"resolved": "https://registry.npmjs.org/@types/node/-/node-6.0.49.tgz" | ||
}, | ||
@@ -16,0 +16,0 @@ "base64-url": { |
{ | ||
"name": "firebase-admin", | ||
"version": "4.0.2", | ||
"version": "4.0.3", | ||
"description": "Firebase admin SDK for Node.js", | ||
@@ -5,0 +5,0 @@ "author": "Firebase (https://firebase.google.com/)", |
Sorry, the diff of this file is too big to display
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
265914
4064