firebase-admin
Advanced tools
Comparing version 4.1.1 to 4.1.2
@@ -1,4 +0,5 @@ | ||
/*! firebase-admin v4.1.1 | ||
/*! firebase-admin v4.1.2 | ||
https://firebase.google.com/terms/ */ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var validator = require("../utils/validator"); | ||
@@ -18,3 +19,3 @@ var deep_copy_1 = require("../utils/deep-copy"); | ||
'Content-Type': 'application/json', | ||
'X-Client-Version': 'Node/Admin/4.1.1', | ||
'X-Client-Version': 'Node/Admin/4.1.2', | ||
}; | ||
@@ -182,2 +183,5 @@ /** Firebase Auth request timeout duration in milliseconds. */ | ||
FirebaseAuthRequestHandler.prototype.getAccountInfoByUid = function (uid) { | ||
if (!validator.isUid(uid)) { | ||
return Promise.reject(new error_2.FirebaseAuthError(error_2.AuthClientErrorCode.INVALID_UID)); | ||
} | ||
var request = { | ||
@@ -195,2 +199,5 @@ localId: [uid], | ||
FirebaseAuthRequestHandler.prototype.getAccountInfoByEmail = function (email) { | ||
if (!validator.isEmail(email)) { | ||
return Promise.reject(new error_2.FirebaseAuthError(error_2.AuthClientErrorCode.INVALID_EMAIL)); | ||
} | ||
var request = { | ||
@@ -208,2 +215,5 @@ email: [email], | ||
FirebaseAuthRequestHandler.prototype.deleteAccount = function (uid) { | ||
if (!validator.isUid(uid)) { | ||
return Promise.reject(new error_2.FirebaseAuthError(error_2.AuthClientErrorCode.INVALID_UID)); | ||
} | ||
var request = { | ||
@@ -223,2 +233,8 @@ localId: uid, | ||
FirebaseAuthRequestHandler.prototype.updateExistingAccount = function (uid, properties) { | ||
if (!validator.isUid(uid)) { | ||
return Promise.reject(new error_2.FirebaseAuthError(error_2.AuthClientErrorCode.INVALID_UID)); | ||
} | ||
else if (!validator.isNonNullObject(properties)) { | ||
return Promise.reject(new error_2.FirebaseAuthError(error_2.AuthClientErrorCode.INVALID_ARGUMENT, 'Properties argument must be a non-null object.')); | ||
} | ||
// Build the setAccountInfo request. | ||
@@ -273,2 +289,5 @@ var request = deep_copy_1.deepCopy(properties); | ||
FirebaseAuthRequestHandler.prototype.createNewAccount = function (properties) { | ||
if (!validator.isNonNullObject(properties)) { | ||
return Promise.reject(new error_2.FirebaseAuthError(error_2.AuthClientErrorCode.INVALID_ARGUMENT, 'Properties argument must be a non-null object.')); | ||
} | ||
// Build the signupNewUser request. | ||
@@ -275,0 +294,0 @@ var request = deep_copy_1.deepCopy(properties); |
@@ -1,4 +0,5 @@ | ||
/*! firebase-admin v4.1.1 | ||
/*! firebase-admin v4.1.2 | ||
https://firebase.google.com/terms/ */ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var user_record_1 = require("./user-record"); | ||
@@ -8,2 +9,3 @@ var token_generator_1 = require("./token-generator"); | ||
var error_1 = require("../utils/error"); | ||
var validator = require("../utils/validator"); | ||
/** | ||
@@ -48,4 +50,14 @@ * Internals of an Auth instance. | ||
if (serviceAccount) { | ||
// Cert credentials and Application Default Credentials created from a service account file | ||
// provide a certificate we can use to mint custom tokens and verify ID tokens. | ||
this.tokenGenerator_ = new token_generator_1.FirebaseTokenGenerator(serviceAccount); | ||
} | ||
else if (validator.isNonEmptyString(process.env.GCLOUD_PROJECT)) { | ||
// Google infrastructure like GAE, GCE, and GCF store the GCP / Firebase project ID in an | ||
// environment variable that we can use to get verifyIdToken() to work. createCustomToken() | ||
// still won't work since it requires a private key and client email which we do not have. | ||
this.tokenGenerator_ = new token_generator_1.FirebaseTokenGenerator({ | ||
projectId: process.env.GCLOUD_PROJECT, | ||
}); | ||
} | ||
// Initialize auth request handler with the app. | ||
@@ -77,3 +89,3 @@ this.authRequestHandler = new auth_api_request_1.FirebaseAuthRequestHandler(app); | ||
if (typeof this.tokenGenerator_ === 'undefined') { | ||
throw new error_1.FirebaseAuthError(error_1.AuthClientErrorCode.INVALID_CREDENTIAL, 'Must initialize app with a cert credential to call auth().createCustomToken()'); | ||
throw new error_1.FirebaseAuthError(error_1.AuthClientErrorCode.INVALID_CREDENTIAL, 'Must initialize app with a cert credential to call auth().createCustomToken().'); | ||
} | ||
@@ -92,3 +104,4 @@ return this.tokenGenerator_.createCustomToken(uid, developerClaims); | ||
if (typeof this.tokenGenerator_ === 'undefined') { | ||
throw new error_1.FirebaseAuthError(error_1.AuthClientErrorCode.INVALID_CREDENTIAL, 'Must initialize app with a cert credential to call auth().verifyIdToken()'); | ||
throw new error_1.FirebaseAuthError(error_1.AuthClientErrorCode.INVALID_CREDENTIAL, 'Must initialize app with a cert credential or set your Firebase project ID as the ' + | ||
'GCLOUD_PROJECT environment variable to call auth().verifyIdToken().'); | ||
} | ||
@@ -95,0 +108,0 @@ return this.tokenGenerator_.verifyIdToken(idToken); |
@@ -1,4 +0,5 @@ | ||
/*! firebase-admin v4.1.1 | ||
/*! firebase-admin v4.1.2 | ||
https://firebase.google.com/terms/ */ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var jwt = require("jsonwebtoken"); | ||
@@ -5,0 +6,0 @@ // Use untyped import syntax for Node built-ins |
@@ -1,4 +0,5 @@ | ||
/*! firebase-admin v4.1.1 | ||
/*! firebase-admin v4.1.2 | ||
https://firebase.google.com/terms/ */ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var auth_1 = require("./auth"); | ||
@@ -33,3 +34,2 @@ var firebase = require("../default-namespace"); | ||
} | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.default = default_1; |
@@ -1,4 +0,7 @@ | ||
/*! firebase-admin v4.1.1 | ||
/*! firebase-admin v4.1.2 | ||
https://firebase.google.com/terms/ */ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var error_1 = require("../utils/error"); | ||
var validator = require("../utils/validator"); | ||
var jwt = require("jsonwebtoken"); | ||
@@ -25,3 +28,3 @@ // Use untyped import syntax for Node built-ins | ||
if (!certificate) { | ||
throw new Error('Must provide a service account to use FirebaseTokenGenerator'); | ||
throw new error_1.FirebaseAuthError(error_1.AuthClientErrorCode.INVALID_CREDENTIAL, 'INTERNAL ASSERT: Must provide a certificate to use FirebaseTokenGenerator.'); | ||
} | ||
@@ -42,13 +45,22 @@ this.certificate_ = certificate; | ||
if (typeof uid !== 'string' || uid === '') { | ||
errorMessage = 'First argument to createCustomToken() must be a non-empty string uid'; | ||
errorMessage = 'First argument to createCustomToken() must be a non-empty string uid.'; | ||
} | ||
else if (uid.length > 128) { | ||
errorMessage = 'First argument to createCustomToken() must a uid with less than or equal to 128 characters'; | ||
errorMessage = 'First argument to createCustomToken() must a uid with less than or equal to 128 characters.'; | ||
} | ||
else if (!this.isDeveloperClaimsValid_(developerClaims)) { | ||
errorMessage = 'Second argument to createCustomToken() must be an object containing the developer claims'; | ||
errorMessage = 'Second argument to createCustomToken() must be an object containing the developer claims.'; | ||
} | ||
if (typeof errorMessage !== 'undefined') { | ||
throw new Error(errorMessage); | ||
throw new error_1.FirebaseAuthError(error_1.AuthClientErrorCode.INVALID_ARGUMENT, errorMessage); | ||
} | ||
if (!validator.isNonEmptyString(this.certificate_.privateKey)) { | ||
errorMessage = 'createCustomToken() requires a certificate with "private_key" set.'; | ||
} | ||
else if (!validator.isNonEmptyString(this.certificate_.clientEmail)) { | ||
errorMessage = 'createCustomToken() requires a certificate with "client_email" set.'; | ||
} | ||
if (typeof errorMessage !== 'undefined') { | ||
throw new error_1.FirebaseAuthError(error_1.AuthClientErrorCode.INVALID_CREDENTIAL, errorMessage); | ||
} | ||
var jwtPayload = {}; | ||
@@ -61,3 +73,3 @@ if (typeof developerClaims !== 'undefined') { | ||
if (BLACKLISTED_CLAIMS.indexOf(key) !== -1) { | ||
throw new Error("Developer claim \"" + key + "\" is reserved and cannot be specified"); | ||
throw new error_1.FirebaseAuthError(error_1.AuthClientErrorCode.INVALID_ARGUMENT, "Developer claim \"" + key + "\" is reserved and cannot be specified."); | ||
} | ||
@@ -88,6 +100,6 @@ claims[key] = developerClaims[key]; | ||
if (typeof idToken !== 'string') { | ||
throw new Error('First argument to verifyIdToken() must be a Firebase ID token string'); | ||
throw new error_1.FirebaseAuthError(error_1.AuthClientErrorCode.INVALID_ARGUMENT, 'First argument to verifyIdToken() must be a Firebase ID token string.'); | ||
} | ||
if (typeof this.certificate_.projectId !== 'string' || this.certificate_.projectId === '') { | ||
throw new Error('verifyIdToken() requires a service account with "project_id" set'); | ||
if (!validator.isNonEmptyString(this.certificate_.projectId)) { | ||
throw new error_1.FirebaseAuthError(error_1.AuthClientErrorCode.INVALID_CREDENTIAL, 'verifyIdToken() requires a certificate with "project_id" set.'); | ||
} | ||
@@ -94,0 +106,0 @@ var fullDecodedToken = jwt.decode(idToken, { |
@@ -1,4 +0,5 @@ | ||
/*! firebase-admin v4.1.1 | ||
/*! firebase-admin v4.1.2 | ||
https://firebase.google.com/terms/ */ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var error_1 = require("../utils/error"); | ||
@@ -19,2 +20,3 @@ /** | ||
catch (e) { | ||
// Do nothing. null will be returned. | ||
} | ||
@@ -21,0 +23,0 @@ return null; |
@@ -1,2 +0,2 @@ | ||
/*! firebase-admin v4.1.1 | ||
/*! firebase-admin v4.1.2 | ||
https://firebase.google.com/terms/ */ | ||
@@ -3,0 +3,0 @@ "use strict"; |
@@ -1,4 +0,5 @@ | ||
/*! firebase-admin v4.1.1 | ||
/*! firebase-admin v4.1.2 | ||
https://firebase.google.com/terms/ */ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var deep_copy_1 = require("./utils/deep-copy"); | ||
@@ -69,6 +70,8 @@ var credential_1 = require("./auth/credential"); | ||
if (error.message.indexOf('invalid_grant') !== -1) { | ||
errorMessage += ' The most likely cause of this error is using a certificate key file ' + | ||
'which has been revoked. Make sure the key ID for your key file is still present at ' + | ||
'https://console.firebase.google.com/iam-admin/serviceaccounts/project. If not, generate ' + | ||
'a new key file at https://console.firebase.google.com/project/_/settings/serviceaccounts/adminsdk.'; | ||
errorMessage += ' There are two likely causes: (1) your server time is not properly ' + | ||
'synced or (2) your certificate key file has been revoked. To solve (1), re-sync the ' + | ||
'time on your server. To solve (2), make sure the key ID for your key file is still ' + | ||
'present at https://console.firebase.google.com/iam-admin/serviceaccounts/project. If ' + | ||
'not, generate a new key file at ' + | ||
'https://console.firebase.google.com/project/_/settings/serviceaccounts/adminsdk.'; | ||
} | ||
@@ -165,8 +168,16 @@ throw new Error(errorMessage); | ||
// caches tokens, there is no real performance penalty for calling this here. | ||
this.INTERNAL.getToken() | ||
.catch(function (error) { | ||
/* tslint:disable:no-console */ | ||
console.error(error); | ||
/* tslint:enable:no-console */ | ||
}); | ||
// b/35366344: We only do this if the credential has a non-null certificate to ensure we do not | ||
// do this check for things like Application Default Credentials on Cloud Functions, which | ||
// often results in ECONNTIMEOUT errors. | ||
if (typeof this.options_.credential.getCertificate === 'function') { | ||
var certificate = this.options_.credential.getCertificate(); | ||
if (certificate) { | ||
this.INTERNAL.getToken() | ||
.catch(function (error) { | ||
/* tslint:disable:no-console */ | ||
console.error(error); | ||
/* tslint:enable:no-console */ | ||
}); | ||
} | ||
} | ||
} | ||
@@ -173,0 +184,0 @@ /** |
@@ -1,4 +0,5 @@ | ||
/*! firebase-admin v4.1.1 | ||
/*! firebase-admin v4.1.2 | ||
https://firebase.google.com/terms/ */ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var deep_copy_1 = require("./utils/deep-copy"); | ||
@@ -198,3 +199,3 @@ var firebase_app_1 = require("./firebase-app"); | ||
this.credential = firebaseCredential; | ||
this.SDK_VERSION = '4.1.1'; | ||
this.SDK_VERSION = '4.1.2'; | ||
/* tslint:disable */ | ||
@@ -201,0 +202,0 @@ // TODO(jwenger): Database is the only consumer of firebase.Promise. We should update it to use |
@@ -1,3 +0,4 @@ | ||
/*! firebase-admin v4.1.1 | ||
/*! firebase-admin v4.1.2 | ||
https://firebase.google.com/terms/ */ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); |
@@ -1,2 +0,2 @@ | ||
/*! firebase-admin v4.1.1 | ||
/*! firebase-admin v4.1.2 | ||
https://firebase.google.com/terms/ */ | ||
@@ -152,2 +152,3 @@ declare namespace admin { | ||
numChildren(): number; | ||
toJSON(): Object; | ||
val(): any; | ||
@@ -198,2 +199,3 @@ } | ||
startAt(value: number|string|boolean|null, key?: string): admin.database.Query; | ||
toJSON(): Object; | ||
toString(): string; | ||
@@ -200,0 +202,0 @@ } |
@@ -1,2 +0,2 @@ | ||
/*! firebase-admin v4.1.1 | ||
/*! firebase-admin v4.1.2 | ||
https://firebase.google.com/terms/ */ | ||
@@ -3,0 +3,0 @@ "use strict"; |
@@ -1,4 +0,5 @@ | ||
/*! firebase-admin v4.1.1 | ||
/*! firebase-admin v4.1.2 | ||
https://firebase.google.com/terms/ */ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var error_1 = require("../utils/error"); | ||
@@ -16,3 +17,3 @@ var api_request_1 = require("../utils/api-request"); | ||
'Content-Type': 'application/json', | ||
'Sdk-Version': 'Node/Admin/4.1.1', | ||
'Sdk-Version': 'Node/Admin/4.1.2', | ||
access_token_auth: 'true', | ||
@@ -19,0 +20,0 @@ }; |
@@ -1,4 +0,5 @@ | ||
/*! firebase-admin v4.1.1 | ||
/*! firebase-admin v4.1.2 | ||
https://firebase.google.com/terms/ */ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var deep_copy_1 = require("../utils/deep-copy"); | ||
@@ -59,2 +60,39 @@ var messaging_api_request_1 = require("./messaging-api-request"); | ||
/** | ||
* Maps a raw FCM server response to a MessagingDevicesResponse object. | ||
* | ||
* @param {Object} response The raw FCM server response to map. | ||
* | ||
* @return {MessagingDeviceGroupResponse} The mapped MessagingDevicesResponse object. | ||
*/ | ||
function mapRawResponseToDevicesResponse(response) { | ||
// Rename properties on the server response | ||
utils.renameProperties(response, MESSAGING_DEVICES_RESPONSE_KEYS_MAP); | ||
if ('results' in response) { | ||
response.results.forEach(function (messagingDeviceResult) { | ||
utils.renameProperties(messagingDeviceResult, MESSAGING_DEVICE_RESULT_KEYS_MAP); | ||
// Map the FCM server's error strings to actual error objects. | ||
if ('error' in messagingDeviceResult) { | ||
var newError = error_1.FirebaseMessagingError.fromServerError(messagingDeviceResult.error, /* message */ undefined, messagingDeviceResult.error); | ||
messagingDeviceResult.error = newError; | ||
} | ||
}); | ||
} | ||
return response; | ||
} | ||
/** | ||
* Maps a raw FCM server response to a MessagingDeviceGroupResponse object. | ||
* | ||
* @param {Object} response The raw FCM server response to map. | ||
* | ||
* @return {MessagingDeviceGroupResponse} The mapped MessagingDeviceGroupResponse object. | ||
*/ | ||
function mapRawResponseToDeviceGroupResponse(response) { | ||
// Rename properties on the server response | ||
utils.renameProperties(response, MESSAGING_DEVICE_GROUP_RESPONSE_KEYS_MAP); | ||
// Add the 'failedRegistrationTokens' property if it does not exist on the response, which | ||
// it won't when the 'failureCount' property has a value of 0) | ||
response.failedRegistrationTokens = response.failedRegistrationTokens || []; | ||
return response; | ||
} | ||
/** | ||
* Internals of a Messaging instance. | ||
@@ -114,4 +152,4 @@ */ | ||
* | ||
* @return {Promise<MessagingDevicesResponse>} A Promise fulfilled with the server's response | ||
* after the message has been sent. | ||
* @return {Promise<MessagingDevicesResponse|MessagingDeviceGroupResponse>} A Promise fulfilled | ||
* with the server's response after the message has been sent. | ||
*/ | ||
@@ -162,15 +200,13 @@ Messaging.prototype.sendToDevice = function (registrationTokenOrTokens, payload, options) { | ||
.then(function (response) { | ||
// Rename properties on the server response | ||
utils.renameProperties(response, MESSAGING_DEVICES_RESPONSE_KEYS_MAP); | ||
if ('results' in response) { | ||
response.results.forEach(function (messagingDeviceResult) { | ||
utils.renameProperties(messagingDeviceResult, MESSAGING_DEVICE_RESULT_KEYS_MAP); | ||
// Map the FCM server's error strings to actual error objects. | ||
if ('error' in messagingDeviceResult) { | ||
var newError = error_1.FirebaseMessagingError.fromServerError(messagingDeviceResult.error, /* message */ undefined, messagingDeviceResult.error); | ||
messagingDeviceResult.error = newError; | ||
} | ||
}); | ||
// The sendToDevice() and sendToDeviceGroup() methods both set the `to` query parameter in | ||
// the underlying FCM request. If the provided registration token argument is actually a | ||
// valid notification key, the response from the FCM server will be a device group response. | ||
// If that is the case, we map the response to a MessagingDeviceGroupResponse. | ||
// See b/35394951 for more context. | ||
if ('multicast_id' in response) { | ||
return mapRawResponseToDevicesResponse(response); | ||
} | ||
return response; | ||
else { | ||
return mapRawResponseToDeviceGroupResponse(response); | ||
} | ||
}); | ||
@@ -186,4 +222,4 @@ }; | ||
* | ||
* @return {Promise<MessagingDeviceGroupResponse>} A Promise fulfilled with the server's response | ||
* after the message has been sent. | ||
* @return {Promise<MessagingDeviceGroupResponse|MessagingDevicesResponse>} A Promise fulfilled | ||
* with the server's response after the message has been sent. | ||
*/ | ||
@@ -196,2 +232,11 @@ Messaging.prototype.sendToDeviceGroup = function (notificationKey, payload, options) { | ||
} | ||
else if (notificationKey.indexOf(':') !== -1) { | ||
// It is possible the developer provides a registration token instead of a notification key | ||
// to this method. We can detect some of those cases by checking to see if the string contains | ||
// a colon. Not all registration tokens will contain a colon (only newer ones will), but no | ||
// notification keys will contain a colon, so we can use it as a rough heuristic. | ||
// See b/35394951 for more context. | ||
return Promise.reject(new error_1.FirebaseMessagingError(error_1.MessagingClientErrorCode.INVALID_RECIPIENT, 'Notification key provided to sendToDeviceGroup() has the format of a registration token. ' + | ||
'You should use sendToDevice() instead.')); | ||
} | ||
// Validate the types of the payload and options arguments. Since these are common developer | ||
@@ -212,8 +257,19 @@ // errors, throw an error instead of returning a rejected promise. | ||
.then(function (response) { | ||
// Rename properties on the server response | ||
utils.renameProperties(response, MESSAGING_DEVICE_GROUP_RESPONSE_KEYS_MAP); | ||
// Add the 'failedRegistrationTokens' property if it does not exist on the response, which | ||
// it won't when the 'failureCount' property has a value of 0) | ||
response.failedRegistrationTokens = response.failedRegistrationTokens || []; | ||
return response; | ||
// The sendToDevice() and sendToDeviceGroup() methods both set the `to` query parameter in | ||
// the underlying FCM request. If the provided notification key argument has an invalid | ||
// format (that is, it is either a registration token or some random string), the response | ||
// from the FCM server will default to a devices response (which we detect by looking for | ||
// the `multicast_id` property). If that is the case, we either throw an error saying the | ||
// provided notification key is invalid (if the message failed to send) or map the response | ||
// to a MessagingDevicesResponse (if the message succeeded). | ||
// See b/35394951 for more context. | ||
if ('multicast_id' in response) { | ||
if (response.success === 0) { | ||
return Promise.reject(new error_1.FirebaseMessagingError(error_1.MessagingClientErrorCode.INVALID_RECIPIENT, 'Notification key provided to sendToDeviceGroup() is invalid.')); | ||
} | ||
else { | ||
return mapRawResponseToDevicesResponse(response); | ||
} | ||
} | ||
return mapRawResponseToDeviceGroupResponse(response); | ||
}); | ||
@@ -220,0 +276,0 @@ }; |
@@ -1,4 +0,5 @@ | ||
/*! firebase-admin v4.1.1 | ||
/*! firebase-admin v4.1.2 | ||
https://firebase.google.com/terms/ */ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var messaging_1 = require("./messaging"); | ||
@@ -29,3 +30,2 @@ var firebase = require("../default-namespace"); | ||
} | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.default = default_1; |
@@ -1,9 +0,15 @@ | ||
/*! firebase-admin v4.1.1 | ||
/*! firebase-admin v4.1.2 | ||
https://firebase.google.com/terms/ */ | ||
"use strict"; | ||
var __extends = (this && this.__extends) || function (d, b) { | ||
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; | ||
function __() { this.constructor = d; } | ||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); | ||
}; | ||
var __extends = (this && this.__extends) || (function () { | ||
var extendStatics = Object.setPrototypeOf || | ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || | ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; | ||
return function (d, b) { | ||
extendStatics(d, b); | ||
function __() { this.constructor = d; } | ||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); | ||
}; | ||
})(); | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var deep_copy_1 = require("./deep-copy"); | ||
@@ -10,0 +16,0 @@ var error_1 = require("./error"); |
@@ -1,4 +0,5 @@ | ||
/*! firebase-admin v4.1.1 | ||
/*! firebase-admin v4.1.2 | ||
https://firebase.google.com/terms/ */ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
/** | ||
@@ -5,0 +6,0 @@ * Returns a deep copy of an object or array. |
@@ -1,9 +0,15 @@ | ||
/*! firebase-admin v4.1.1 | ||
/*! firebase-admin v4.1.2 | ||
https://firebase.google.com/terms/ */ | ||
"use strict"; | ||
var __extends = (this && this.__extends) || function (d, b) { | ||
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; | ||
function __() { this.constructor = d; } | ||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); | ||
}; | ||
var __extends = (this && this.__extends) || (function () { | ||
var extendStatics = Object.setPrototypeOf || | ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || | ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; | ||
return function (d, b) { | ||
extendStatics(d, b); | ||
function __() { this.constructor = d; } | ||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); | ||
}; | ||
})(); | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var deep_copy_1 = require("../utils/deep-copy"); | ||
@@ -87,2 +93,3 @@ /** | ||
catch (e) { | ||
// Ignore JSON parsing error. | ||
} | ||
@@ -127,2 +134,3 @@ } | ||
catch (e) { | ||
// Ignore JSON parsing error. | ||
} | ||
@@ -129,0 +137,0 @@ } |
@@ -1,4 +0,5 @@ | ||
/*! firebase-admin v4.1.1 | ||
/*! firebase-admin v4.1.2 | ||
https://firebase.google.com/terms/ */ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
/** | ||
@@ -5,0 +6,0 @@ * Renames properties on an object given a mapping from old to new property names. |
@@ -1,4 +0,5 @@ | ||
/*! firebase-admin v4.1.1 | ||
/*! firebase-admin v4.1.2 | ||
https://firebase.google.com/terms/ */ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var url = require("url"); | ||
@@ -129,2 +130,3 @@ /** | ||
} | ||
// Allow any query string and hash as long as no invalid character is used. | ||
} | ||
@@ -131,0 +133,0 @@ catch (e) { |
{ | ||
"name": "firebase-admin", | ||
"version": "4.1.1", | ||
"version": "4.1.2", | ||
"dependencies": { | ||
@@ -5,0 +5,0 @@ "@types/jsonwebtoken": { |
{ | ||
"name": "firebase-admin", | ||
"version": "4.1.1", | ||
"version": "4.1.2", | ||
"description": "Firebase admin SDK for Node.js", | ||
@@ -41,3 +41,5 @@ "author": "Firebase (https://firebase.google.com/)", | ||
"chai-as-promised": "^6.0.0", | ||
"chalk": "^1.1.3", | ||
"del": "^2.2.1", | ||
"firebase": "^3.6.9", | ||
"firebase-token-generator": "^2.0.0", | ||
@@ -44,0 +46,0 @@ "gulp": "^3.9.1", |
@@ -51,2 +51,3 @@ # Firebase Admin Node.js SDK | ||
* [Authentication Guide](https://firebase.google.com/docs/auth/admin/) | ||
* [Cloud Messaging Guide](https://firebase.google.com/docs/cloud-messaging/admin/) | ||
* [API Reference](https://firebase.google.com/docs/reference/admin/node/) | ||
@@ -53,0 +54,0 @@ |
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
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
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
290509
4389
73
35
10