firebase
Advanced tools
Comparing version 3.6.1 to 3.6.2
@@ -1,3 +0,3 @@ | ||
/*! @license Firebase v3.6.1 | ||
Build: 3.6.1-rc.3 | ||
/*! @license Firebase v3.6.2 | ||
Build: 3.6.2-rc.2 | ||
Terms: https://firebase.google.com/terms/ */ | ||
@@ -4,0 +4,0 @@ declare namespace firebase { |
@@ -1,3 +0,3 @@ | ||
/*! @license Firebase v3.6.1 | ||
Build: 3.6.1-rc.3 | ||
/*! @license Firebase v3.6.2 | ||
Build: 3.6.2-rc.2 | ||
Terms: https://firebase.google.com/terms/ */ | ||
@@ -30,3 +30,3 @@ var firebase = null; (function() { var aa="function"==typeof Object.defineProperties?Object.defineProperty:function(a,b,c){if(c.get||c.set)throw new TypeError("ES3 does not support getters and setters.");a!=Array.prototype&&a!=Object.prototype&&(a[b]=c.value)},h="undefined"!=typeof window&&window===this?this:"undefined"!=typeof global&&null!=global?global:this,l=function(){l=function(){};h.Symbol||(h.Symbol=ba)},ca=0,ba=function(a){return"jscomp_symbol_"+(a||"")+ca++},n=function(){l();var a=h.Symbol.iterator;a||(a=h.Symbol.iterator= | ||
return void 0===b?"Application Error: ("+a+")":b};"undefined"!==typeof firebase&&(firebase=Ja()); })(); | ||
firebase.SDK_VERSION = "3.6.1"; | ||
firebase.SDK_VERSION = "3.6.2"; | ||
module.exports = firebase; |
/** | ||
* @fileoverview Firebase namespace and Firebase App API. | ||
* Version: 3.6.1 | ||
* Version: 3.6.2 | ||
* | ||
@@ -31,8 +31,17 @@ * Copyright 2016 Google Inc. All Rights Reserved. | ||
/** | ||
* Create (and intialize) a FirebaseApp. | ||
* Creates and initializes a Firebase {@link firebase.app.App app} instance. | ||
* | ||
* See | ||
* {@link | ||
* https://firebase.google.com/docs/web/setup#initialize_the_sdk | ||
* Initialize the SDK} and | ||
* {@link | ||
* https://firebase.google.com/docs/web/setup#initialize_multiple_apps | ||
* Initialize multiple apps} for detailed documentation. | ||
* | ||
* @example | ||
* // Initialize default app | ||
* // Retrieve your own options values by adding a web app on | ||
* // http://console.firebase.google.com | ||
* var options = { | ||
* // https://console.firebase.google.com | ||
* firebase.initializeApp({ | ||
* apiKey: "AIza....", // Auth / General Use | ||
@@ -43,33 +52,47 @@ * authDomain: "YOUR_APP.firebaseapp.com", // Auth with popup/redirect | ||
* messagingSenderId: "123456789" // Cloud Messaging | ||
* }; | ||
* // Initialize default application. | ||
* firebase.initializeApp(options); | ||
* }); | ||
* | ||
* @param {!Object} options Options to configure the services use in the App. | ||
* @param {string=} name The optional name of the app to initialize ('[DEFAULT]' | ||
* if none) | ||
* @return {!firebase.app.App} | ||
* @example | ||
* // Initialize another app | ||
* var otherApp = firebase.initializeApp({ | ||
* databaseURL: "https://<OTHER_DATABASE_NAME>.firebaseio.com", | ||
* storageBucket: "<OTHER_STORAGE_BUCKET>.appspot.com" | ||
* }, "otherApp"); | ||
* | ||
* @param {!Object} options Options to configure the app's services. | ||
* @param {string=} opt_name Optional name of the app to initialize. If no name | ||
* is provided, the default is `"[DEFAULT]"`. | ||
* | ||
* @return {!firebase.app.App} The initialized app. | ||
*/ | ||
firebase.initializeApp = function(options, name) {}; | ||
firebase.initializeApp = function(options, opt_name) {}; | ||
/** | ||
* Retrieve an instance of a FirebaseApp. | ||
* Retrieves a Firebase {@link firebase.app.App app} instance. | ||
* | ||
* With no arguments, this returns the default App. With a single | ||
* string argument, it returns the named App. | ||
* When called with no arguments, the default app is returned. When an app name | ||
* is provided, the app corresponding to that name is returned. | ||
* | ||
* This function throws an exception if the app you are trying to access | ||
* does not exist. | ||
* An exception is thrown if the app being retrieved has not yet been | ||
* initialized. | ||
* | ||
* Usage: firebase.app() | ||
* @example | ||
* // Return the default app | ||
* var app = firebase.app(); | ||
* | ||
* @example | ||
* // Return a named app | ||
* var otherApp = firebase.app("otherApp"); | ||
* | ||
* @namespace | ||
* @param {string} name The optional name of the app to return ('[DEFAULT]' if | ||
* none) | ||
* @return {!firebase.app.App} | ||
* @param {string=} opt_name Optional name of the app to return. If no name is | ||
* provided, the default is `"[DEFAULT]"`. | ||
* | ||
* @return {!firebase.app.App} The app corresponding to the provided app name. | ||
* If no app name is provided, the default app is returned. | ||
*/ | ||
firebase.app = function(name) {}; | ||
firebase.app = function(opt_name) {}; | ||
/** | ||
* A (read-only) array of all the initialized Apps. | ||
* A (read-only) array of all initialized apps. | ||
* @type {!Array<firebase.app.App>} | ||
@@ -80,3 +103,3 @@ */ | ||
/** | ||
* The current SDK version ('3.6.1'). | ||
* The current SDK version. | ||
* @type {string} | ||
@@ -90,4 +113,4 @@ */ | ||
* | ||
* DO NOT call this constuctor directly (use | ||
* <code>firebase.initializeApp()</code> to create an App). | ||
* Do not call this constructor directly. Instead, use | ||
* {@link firebase#.initializeApp `firebase.initializeApp()`} to create an app. | ||
* | ||
@@ -99,4 +122,16 @@ * @interface | ||
/** | ||
* The (read-only) name (identifier) for this App. '[DEFAULT]' is the name of | ||
* the default App. | ||
* The (read-only) name for this app. | ||
* | ||
* The default app's name is `"[DEFAULT]"`. | ||
* | ||
* @example | ||
* // The default app's name is "[DEFAULT]" | ||
* firebase.initializeApp(defaultAppConfig); | ||
* console.log(firebase.app().name); // "[DEFAULT]" | ||
* | ||
* @example | ||
* // A named app's name is what you provide to initializeApp() | ||
* var otherApp = firebase.initializeApp(otherAppConfig, "other"); | ||
* console.log(otherApp.name); // "other" | ||
* | ||
* @type {string} | ||
@@ -107,4 +142,11 @@ */ | ||
/** | ||
* The (read-only) configuration options (the original parameters given | ||
* in <code>firebase.initializeApp()</code>). | ||
* The (read-only) configuration options for this app. These are the original | ||
* parameters given in | ||
* {@link firebase#.initializeApp `firebase.initializeApp()`}. | ||
* | ||
* @example | ||
* var app = firebase.initializeApp(config); | ||
* console.log(app.options.credential === config.credential); // true | ||
* console.log(app.options.databaseURL === config.databaseURL); // true | ||
* | ||
* @type {!Object} | ||
@@ -115,6 +157,16 @@ */ | ||
/** | ||
* Make the given App unusable and free the resources of all associated | ||
* Renders this app unusable and frees the resources of all associated | ||
* services. | ||
* | ||
* @return {!firebase.Promise<void>} | ||
* @example | ||
* app.delete() | ||
* .then(function() { | ||
* console.log("App deleted successfully"); | ||
* }); | ||
* .catch(function(error) { | ||
* console.log("Error deleting app:", error); | ||
* }); | ||
* | ||
* @return {!firebase.Promise<void>} An empty promise fulfilled when the app has | ||
* been deleted. | ||
*/ | ||
@@ -262,4 +314,5 @@ firebase.app.App.prototype.delete = function() {}; | ||
* | ||
* This information can be useful to you and can be sent to Firebase support to | ||
* help explain the cause of an error. | ||
* This information can be useful to you and can be sent to | ||
* {@link https://firebase.google.com/support/ Firebase Support} to help | ||
* explain the cause of an error. | ||
* | ||
@@ -266,0 +319,0 @@ * @type {string} |
/** | ||
* @fileoverview Firebase Auth API. | ||
* Version: 3.6.1 | ||
* Version: 3.6.2 | ||
* | ||
@@ -23,14 +23,24 @@ * Copyright 2016 Google Inc. All Rights Reserved. | ||
/** | ||
* Gets the Auth object for the default App or a given App. | ||
* Gets the {@link firebase.auth.Auth `Auth`} service for the default app or a | ||
* given app. | ||
* | ||
* Usage: | ||
* `firebase.auth()` can be called with no arguments to access the default app's | ||
* {@link firebase.auth.Auth `Auth`} service or as `firebase.auth(app)` to | ||
* access the {@link firebase.auth.Auth `Auth`} service associated with a | ||
* specific app. | ||
* | ||
* firebase.auth() | ||
* firebase.auth(app) | ||
* @example | ||
* // Get the Auth service for the default app | ||
* var defaultAuth = firebase.auth(); | ||
* | ||
* @example | ||
* // Get the Auth service for a given app | ||
* var otherAuth = firebase.auth(otherApp); | ||
* | ||
* @namespace | ||
* @param {!firebase.app.App=} app | ||
* @param {!firebase.app.App=} opt_app | ||
* | ||
* @return {!firebase.auth.Auth} | ||
*/ | ||
firebase.auth = function(app) {}; | ||
firebase.auth = function(opt_app) {}; | ||
@@ -54,10 +64,10 @@ /** | ||
/** | ||
* Gets the Firebase Auth Service object for an App. | ||
* Gets the {@link firebase.auth.Auth `Auth`} service for the current app. | ||
* | ||
* Usage: | ||
* @example | ||
* var auth = app.auth(); | ||
* // The above is shorthand for: | ||
* // var auth = firebase.auth(app); | ||
* | ||
* app.auth() | ||
* | ||
* @return {!firebase.auth.Auth} | ||
@@ -67,3 +77,2 @@ */ | ||
/** | ||
@@ -486,6 +495,12 @@ * User profile information, visible only to the Firebase project's | ||
/** | ||
* The Firebase Auth service interface. | ||
* | ||
* Do not call this constructor directly. Instead, use | ||
* {@link firebase.auth `firebase.auth()`}. | ||
* | ||
* See | ||
* {@link https://firebase.google.com/docs/auth/ Firebase Authentication} | ||
* for a full guide on how to use the Firebase Auth service. | ||
* | ||
* @interface | ||
@@ -496,4 +511,8 @@ */ | ||
/** | ||
* The App associated with the Auth service instance. | ||
* The {@link firebase.app.App app} associated with the `Auth` service | ||
* instance. | ||
* | ||
* @example | ||
* var app = auth.app; | ||
* | ||
* @type {!firebase.app.App} | ||
@@ -500,0 +519,0 @@ */ |
/** | ||
* @fileoverview Firebase client Auth API. | ||
* Version: 3.6.1 | ||
* Version: 3.6.2 | ||
* | ||
@@ -5,0 +5,0 @@ * Copyright 2016 Google Inc. All Rights Reserved. |
/** | ||
* @fileoverview Firebase Database API. | ||
* Version: 3.6.1 | ||
* Version: 3.6.2 | ||
* | ||
@@ -23,22 +23,38 @@ * Copyright 2016 Google Inc. All Rights Reserved. | ||
/** | ||
* Access the Database service for the default App (or a given app). | ||
* Gets the {@link firebase.database.Database `Database`} service for the | ||
* default app or a given app. | ||
* | ||
* `firebase.database()` can be called as a function to access the default | ||
* {@link firebase.database.Database}, or as `firebase.database(app)` to access | ||
* the database associated with a specific {@link firebase.app.App}. | ||
* `firebase.database()` can be called with no arguments to access the default | ||
* app's {@link firebase.database.Database `Database`} service or as | ||
* `firebase.database(app)` to access the | ||
* {@link firebase.database.Database `Database`} service associated with a | ||
* specific app. | ||
* | ||
* `firebase.database` is also a namespace that can be used to access | ||
* global constants and methods associated with the database service. | ||
* `firebase.database` is also a namespace that can be used to access global | ||
* constants and methods associated with the `Database` service. | ||
* | ||
* @example | ||
* // Get the Database service for the default app | ||
* var defaultDatabase = firebase.database(); | ||
* | ||
* @example | ||
* // Get the Database service for a specific app | ||
* var otherDatabase = firebase.database(app); | ||
* | ||
* @namespace | ||
* @param {!firebase.app.App=} app | ||
* @return {!firebase.database.Database} | ||
* @param {!firebase.app.App=} opt_app Optional app whose Database service to | ||
* return. If not provided, the default Database service will be returned. | ||
* @return {!firebase.database.Database} The default Database service if no app | ||
* is provided or the Database service associated with the provided app. | ||
*/ | ||
firebase.database = function(app) {}; | ||
firebase.database = function(opt_app) {}; | ||
/** | ||
* Access the Database service from an App instance. | ||
* Gets the {@link firebase.database.Database `Database`} service for the | ||
* current app. | ||
* | ||
* @example | ||
* var database = app.database(); | ||
* // The above is shorthand for: | ||
* // var database = firebase.database(app); | ||
* | ||
@@ -49,7 +65,14 @@ * @return {!firebase.database.Database} | ||
/** | ||
* The Firebase Database service interface. | ||
* | ||
* Do not call this constructor directly - use firebase.database() instead. | ||
* Do not call this constructor directly. Instead, use | ||
* {@link firebase.database `firebase.database()`}. | ||
* | ||
* See | ||
* {@link | ||
* https://firebase.google.com/docs/database/web/start/ | ||
* Installation & Setup in JavaScript} | ||
* for a full guide on how to use the Firebase Database service. | ||
* | ||
* @interface | ||
@@ -60,12 +83,22 @@ */ | ||
/** | ||
* Log debugging information to the console. | ||
* Logs debugging information to the console. | ||
* | ||
* @example | ||
* // Enable logging | ||
* firebase.database.enableLogging(true); | ||
* | ||
* @param {(boolean|*)=} logger | ||
* @example | ||
* // Disable logging | ||
* firebase.database.enableLogging(false); | ||
* | ||
* @example | ||
* // Enable logging across page refreshes | ||
* firebase.database.enableLogging(true, true); | ||
* | ||
* @param {boolean=} enabled Enables logging if `true`; disables logging if | ||
* `false`. | ||
* @param {boolean=} persistent Remembers the logging state between page | ||
* refreshes if true. | ||
* refreshes if `true`. | ||
*/ | ||
firebase.database.enableLogging = function(logger, persistent) {}; | ||
firebase.database.enableLogging = function(enabled, persistent) {}; | ||
@@ -78,5 +111,6 @@ /** | ||
* @example | ||
* var sessionsRef = firebase.database().ref('sessions'); | ||
* var mySessionRef = sessionsRef.push(); | ||
* mySessionRef.update({ startedAt: firebase.database.ServerValue.TIMESTAMP }); | ||
* var sessionsRef = firebase.database().ref("sessions"); | ||
* sessionsRef.push({ | ||
* startedAt: firebase.database.ServerValue.TIMESTAMP | ||
* }); | ||
* | ||
@@ -90,4 +124,8 @@ * @const {{ | ||
/** | ||
* The App associated with the Database service instance. | ||
* The {@link firebase.app.App app} associated with the `Database` service | ||
* instance. | ||
* | ||
* @example | ||
* var app = database.app; | ||
* | ||
* @type {!firebase.app.App} | ||
@@ -98,6 +136,23 @@ */ | ||
/** | ||
* Returns a `Reference` to the root or the specified path. | ||
* Returns a `Reference` representing the location in the Database | ||
* corresponding to the provided path. If no path is provided, the `Reference` | ||
* will point to the root of the Database. | ||
* | ||
* @param {string=} path | ||
* @return {!firebase.database.Reference} Firebase reference. | ||
* @example | ||
* // Get a reference to the root of the Database | ||
* var rootRef = firebase.database.ref(); | ||
* | ||
* @example | ||
* // Get a reference to the /users/ada node | ||
* var adaRef = firebase.database.ref("users/ada"); | ||
* // The above is shorthand for the following operations: | ||
* //var rootRef = firebase.database.ref(); | ||
* //var adaRef = rootRef.child("users/ada"); | ||
* | ||
* @param {string=} path Optional path representing the location the returned | ||
* `Reference` will point. If not provided, the returned `Reference` will | ||
* point to the root of the Database. | ||
* @return {!firebase.database.Reference} If a path is provided, a `Reference` | ||
* pointing to the provided path. Otherwise, a `Reference` pointing to the | ||
* root of the Database. | ||
*/ | ||
@@ -107,7 +162,23 @@ firebase.database.Database.prototype.ref = function(path) {}; | ||
/** | ||
* Returns a reference to the root or the path specified in url. An exception is | ||
* thrown if the url is not in the same domain as the current database. | ||
* Returns a `Reference` representing the location in the Database | ||
* corresponding to the provided Firebase URL. | ||
* | ||
* @param {string} url | ||
* @return {!firebase.database.Reference} Firebase reference. | ||
* An exception is thrown if the URL is not a valid Firebase Database URL or it | ||
* has a different domain than the current `Database` instance. | ||
* | ||
* Note that all query parameters (`orderBy`, `limitToLast`, etc.) are ignored | ||
* and are not applied to the returned `Reference`. | ||
* | ||
* @example | ||
* // Get a reference to the root of the Database | ||
* var rootRef = firebase.database.ref("https://<DATABASE_NAME>.firebaseio.com"); | ||
* | ||
* @example | ||
* // Get a reference to the /users/ada node | ||
* var adaRef = firebase.database.ref("https://<DATABASE_NAME>.firebaseio.com/users/ada"); | ||
* | ||
* @param {string} url The Firebase URL at which the returned `Reference` will | ||
* point. | ||
* @return {!firebase.database.Reference} A `Reference` pointing to the provided | ||
* Firebase URL. | ||
*/ | ||
@@ -117,6 +188,6 @@ firebase.database.Database.prototype.refFromURL = function(url) {}; | ||
/** | ||
* Disconnect from the server (all database operations will be completed | ||
* Disconnects from the server (all Database operations will be completed | ||
* offline). | ||
* | ||
* The client automatically maintains a persistent connection to the database | ||
* The client automatically maintains a persistent connection to the Database | ||
* server, which will remain active indefinitely and reconnect when | ||
@@ -128,8 +199,8 @@ * disconnected. However, the `goOffline()` and `goOnline()` methods may be used | ||
* While offline, the client will no longer receive data updates from the | ||
* database. However, all database operations performed locally will continue to | ||
* Database. However, all Database operations performed locally will continue to | ||
* immediately fire events, allowing your application to continue behaving | ||
* normally. Additionally, each operation performed locally will automatically | ||
* be queued and retried upon reconnection to the database server. | ||
* be queued and retried upon reconnection to the Database server. | ||
* | ||
* To reconnect to the database and begin receiving remote events, see | ||
* To reconnect to the Database and begin receiving remote events, see | ||
* `goOnline()`. | ||
@@ -143,8 +214,9 @@ * | ||
/** | ||
* (Re)connect to the server and synchronize the offline database state | ||
* Reconnects to the server and synchronizes the offline Database state | ||
* with the server state. | ||
* | ||
* This method should be used after disabling the active connection with | ||
* `goOffline()`. Once reconnected, the client will transmit the proper data and | ||
* fire the appropriate events so that your client "catches up" automatically. | ||
* `goOffline()`. Once reconnected, the client will transmit the proper data | ||
* and fire the appropriate events so that your client "catches up" | ||
* automatically. | ||
* | ||
@@ -157,14 +229,14 @@ * @example | ||
/** | ||
* A Reference represents a specific location in your database and can be used | ||
* for reading or writing data to that database location. | ||
* A `Reference` represents a specific location in your Database and can be used | ||
* for reading or writing data to that Database location. | ||
* | ||
* You can reference the root, or child location in your database by calling | ||
* You can reference the root or child location in your Database by calling | ||
* `firebase.database().ref()` or `firebase.database().ref("child/path")`. | ||
* | ||
* Writing is done with the `set()` method and reading can be done with the | ||
* `on()` method. See: | ||
* `on()` method. See | ||
* {@link | ||
* https://firebase.google.com/docs/database/web/read-and-write | ||
* Read and Write Data on the Web} | ||
* | ||
* - {@link https://firebase.google.com/docs/database/web/save-data Save Data on the Web} | ||
* - {@link https://firebase.google.com/docs/database/web/retrieve-data Retrieve Data on the Web} | ||
* | ||
* @interface | ||
@@ -176,12 +248,18 @@ * @extends {firebase.database.Query} | ||
/** | ||
* The last part of the current path. | ||
* The last part of the `Reference`'s path. | ||
* | ||
* For example, "ada" is the key for | ||
* https://sample-app.firebaseio.com/users/ada. | ||
* For example, `"ada"` is the key for | ||
* `https://<DATABASE_NAME>.firebaseio.com/users/ada`. | ||
* | ||
* The key of the root Reference is `null`. | ||
* The key of a root `Reference` is `null`. | ||
* | ||
* @example | ||
* var adaRef = firebase.database().ref("users/ada"); | ||
* var key = adaRef.key; // key === "ada" | ||
* // The key of a root reference is null | ||
* var rootRef = firebase.database().ref(); | ||
* var key = rootRef.key; // key === null | ||
* | ||
* @example | ||
* // The key of any non-root reference is the last token in the path | ||
* var adaRef = firebase.database.ref("users/ada"); | ||
* var key = adaRef.key; // key === "ada" | ||
* key = adaRef.child("name/last").key; // key === "last" | ||
@@ -195,3 +273,3 @@ * | ||
/** | ||
* Gets a Reference for the location at the specified relative path. | ||
* Gets a `Reference` for the location at the specified relative path. | ||
* | ||
@@ -216,9 +294,17 @@ * The relative path can either be a simple child name (for example, "ada") or | ||
/** | ||
* The parent location of a Reference. | ||
* The parent location of a `Reference`. | ||
* | ||
* The parent of a root `Reference` is `null`. | ||
* | ||
* @example | ||
* var usersRef = firebase.database().ref('users'); | ||
* var path = usersRef.parent.toString(); | ||
* // path is now 'https://sample-app.firebaseio.com' | ||
* // The parent of a root reference is null | ||
* var rootRef = firebase.database().ref(); | ||
* parent = rootRef.parent; // parent === null | ||
* | ||
* @example | ||
* // The parent of any non-root reference is the parent location | ||
* var usersRef = firebase.database().ref("users"); | ||
* var adaRef = firebase.database().ref("users/ada"); | ||
* // usersRef and adaRef.parent represent the same location | ||
* | ||
* @type {?firebase.database.Reference} | ||
@@ -230,9 +316,14 @@ */ | ||
/** | ||
* The root location of a Reference. | ||
* The root `Reference` of the Database. | ||
* | ||
* @example | ||
* var adaRef = firebase.database().ref('samplechat/users/ada'); | ||
* var path = adaRef.root.toString(); | ||
* // path is now 'https://sample-app.firebaseio.com' | ||
* // The root of a root reference is itself | ||
* var rootRef = firebase.database().ref(); | ||
* // rootRef and rootRef.root represent the same location | ||
* | ||
* @example | ||
* // The root of any non-root reference is the root location | ||
* var adaRef = firebase.database.ref("users/ada"); | ||
* // rootRef and adaRef.root represent the same location | ||
* | ||
* @type {!firebase.database.Reference} | ||
@@ -244,24 +335,24 @@ */ | ||
/** | ||
* Write data to this database location. | ||
* Writes data to this Database location. | ||
* | ||
* This will overwrite any data at this location and all child locations. | ||
* | ||
* The effect of the write will be visible immediately and the corresponding | ||
* events ('value', 'child_added', etc.) will be triggered. Synchronization of | ||
* The effect of the write will be visible immediately, and the corresponding | ||
* events ("value", "child_added", etc.) will be triggered. Synchronization of | ||
* the data to the Firebase servers will also be started, and the returned | ||
* Promise will resolve when complete. If provided, the onComplete callback will | ||
* be called asynchronously after synchronization has finished. | ||
* Promise will resolve when complete. If provided, the `onComplete` callback | ||
* will be called asynchronously after synchronization has finished. | ||
* | ||
* Passing `null` for the new value is equivalent to calling remove(); all data at | ||
* this location or any child location will be deleted. | ||
* Passing `null` for the new value is equivalent to calling `remove()`; namely, | ||
* all data at this location and all child locations will be deleted. | ||
* | ||
* `set()` will remove any priority stored at this location, so if priority is | ||
* meant to be preserved, you should use `setWithPriority()` instead. | ||
* meant to be preserved, you need to use `setWithPriority()` instead. | ||
* | ||
* Note that modifying data with `set()` will cancel any pending transactions at | ||
* that location, so extreme care should be taken if mixing `set()` and | ||
* Note that modifying data with `set()` will cancel any pending transactions | ||
* at that location, so extreme care should be taken if mixing `set()` and | ||
* `transaction()` to modify the same data. | ||
* | ||
* A single `set()` will generate a single "value" event at the location where the | ||
* `set()` was performed. | ||
* A single `set()` will generate a single "value" event at the location where | ||
* the `set()` was performed. | ||
* | ||
@@ -272,4 +363,4 @@ * @example | ||
* adaNameRef.child('last').set('Lovelace'); | ||
* // We've written 'Ada' to the database location storing Ada's first name, | ||
* // and 'Lovelace' to the location storing her last name | ||
* // We've written 'Ada' to the Database location storing Ada's first name, | ||
* // and 'Lovelace' to the location storing her last name. | ||
* | ||
@@ -279,3 +370,3 @@ * @example | ||
* // Exact same effect as the previous example, except we've written | ||
* // ada's first and last name simultaneously. | ||
* // Ada's first and last name simultaneously. | ||
* | ||
@@ -297,3 +388,3 @@ * @example | ||
* complete. | ||
* @return {!firebase.Promise<void>} Resolves when write to server is complete. | ||
* @return {!Promise<void>} Resolves when write to server is complete. | ||
*/ | ||
@@ -304,7 +395,7 @@ firebase.database.Reference.prototype.set = function(value, onComplete) {}; | ||
/** | ||
* Writes multiple values to the database at once. | ||
* Writes multiple values to the Database at once. | ||
* | ||
* The `values` argument contains multiple property/value pairs that will be | ||
* written to the database together. Each child property can either be a simple | ||
* property (for example, "name"), or a relative path (for example, | ||
* The `values` argument contains multiple property-value pairs that will be | ||
* written to the Database together. Each child property can either be a simple | ||
* property (for example, "name") or a relative path (for example, | ||
* "name/first") from the current location to the data to update. | ||
@@ -316,14 +407,15 @@ * | ||
* | ||
* The effect of the write will be visible immediately and the corresponding | ||
* The effect of the write will be visible immediately, and the corresponding | ||
* events ('value', 'child_added', etc.) will be triggered. Synchronization of | ||
* the data to the Firebase servers will also be started, and the returned | ||
* Promise will resolve when complete. If provided, the onComplete callback will | ||
* be called asynchronously after synchronization has finished. | ||
* Promise will resolve when complete. If provided, the `onComplete` callback | ||
* will be called asynchronously after synchronization has finished. | ||
* | ||
* A single `update()` will generate a single "value" event at the location where | ||
* the `update()` was performed, regardless of how many children were modified. | ||
* A single `update()` will generate a single "value" event at the location | ||
* where the `update()` was performed, regardless of how many children were | ||
* modified. | ||
* | ||
* Note that modifying data with `update()` will cancel any pending transactions | ||
* at that location, so extreme care should be taken if mixing `update()` and | ||
* `transaction()` to modify the same data. | ||
* Note that modifying data with `update()` will cancel any pending | ||
* transactions at that location, so extreme care should be taken if mixing | ||
* `update()` and `transaction()` to modify the same data. | ||
* | ||
@@ -335,3 +427,3 @@ * Passing `null` to `update()` will remove the data at this location. | ||
* https://firebase.googleblog.com/2015/09/introducing-multi-location-updates-and_86.html | ||
* Introducing multi-location updates and more} | ||
* Introducing multi-location updates and more}. | ||
* | ||
@@ -347,13 +439,12 @@ * @example | ||
* complete. | ||
* @return {!firebase.Promise<void>} Resolves when update on server is complete. | ||
* @return {!Promise<void>} Resolves when update on server is complete. | ||
*/ | ||
firebase.database.Reference.prototype.update = | ||
function(values, onComplete) {}; | ||
firebase.database.Reference.prototype.update = function(values, onComplete) {}; | ||
/** | ||
* Writes data the database location. Like `set()` but also specifies the | ||
* Writes data the Database location. Like `set()` but also specifies the | ||
* priority for that data. | ||
* | ||
* Applications need not use priority, but can order collections by | ||
* Applications need not use priority but can order collections by | ||
* ordinary properties (see | ||
@@ -367,3 +458,3 @@ * {@link | ||
* @param {function(?Error)=} onComplete | ||
* @return {!firebase.Promise<void>} | ||
* @return {!Promise<void>} | ||
*/ | ||
@@ -375,3 +466,3 @@ firebase.database.Reference.prototype.setWithPriority = | ||
/** | ||
* Remove the data at this database location. | ||
* Removes the data at this Database location. | ||
* | ||
@@ -398,3 +489,3 @@ * Any data at child locations will also be deleted. | ||
* complete. | ||
* @return {!firebase.Promise<void>} Resolves when remove on server is complete. | ||
* @return {!Promise<void>} Resolves when remove on server is complete. | ||
*/ | ||
@@ -484,3 +575,3 @@ firebase.database.Reference.prototype.remove = function(onComplete) {}; | ||
* before events are raised. | ||
* @return {!firebase.Promise<{ | ||
* @return {!Promise<{ | ||
* committed: boolean, | ||
@@ -496,5 +587,5 @@ * snapshot: ?firebase.database.DataSnapshot | ||
/** | ||
* Sets a priority for the data at this database location. | ||
* Sets a priority for the data at this Database location. | ||
* | ||
* Applications need not use priority, but can order collections by | ||
* Applications need not use priority but can order collections by | ||
* ordinary properties (see | ||
@@ -507,3 +598,3 @@ * {@link | ||
* @param {function(?Error)} onComplete | ||
* @return {!firebase.Promise<void>} | ||
* @return {!Promise<void>} | ||
*/ | ||
@@ -523,3 +614,4 @@ firebase.database.Reference.prototype.setPriority = | ||
/** | ||
* Generates a new child location using a unique key and returns its reference. | ||
* Generates a new child location using a unique key and returns its | ||
* `Reference`. | ||
* | ||
@@ -530,3 +622,3 @@ * This is the most common pattern for adding data to a collection of items. | ||
* generated location. If you don't pass a value, nothing will be written to the | ||
* database and the child will remain empty (but you can use the reference | ||
* Database and the child will remain empty (but you can use the `Reference` | ||
* elsewhere). | ||
@@ -541,3 +633,3 @@ * | ||
* {@link | ||
* https://firebase.google.com/docs/database/web/save-data#append_to_a_list_of_data | ||
* https://firebase.google.com/docs/database/web/lists-of-data#append_to_a_list_of_data | ||
* Append to a list of data} | ||
@@ -564,5 +656,5 @@ * </br>See | ||
* complete. | ||
* @return {!firebase.database.ThenableReference} Combined Promise and | ||
* reference; resolves when write is complete, but can be used immediately as | ||
* the reference to the child location. | ||
* @return {!firebase.database.ThenableReference} Combined `Promise` and | ||
* `Reference`; resolves when write is complete, but can be used immediately | ||
* as the `Reference` to the child location. | ||
*/ | ||
@@ -574,4 +666,6 @@ firebase.database.Reference.prototype.push = function(value, onComplete) {}; | ||
* Returns an `OnDisconnect` object - see | ||
* {@link https://firebase.google.com/docs/database/web/offline-capabilities | ||
* Offline Capabilities} for information on how to use it. | ||
* {@link | ||
* https://firebase.google.com/docs/database/web/offline-capabilities | ||
* Enabling Offline Capabilities in JavaScript} for more information on how | ||
* to use it. | ||
* | ||
@@ -584,12 +678,12 @@ * @return {!firebase.database.OnDisconnect} | ||
/** | ||
* A `Query` sorts and filters the data at a database location so only a subset of | ||
* the child data is included. This can be used to order a collection of data by | ||
* some attribute (e.g. height of dinosaurs) as well as to restrict a large list | ||
* of items (e.g. chat messages) down to a number suitable for synchronizing to | ||
* the client. Queries are created by chaining together one or more of the | ||
* filter methods defined here. | ||
* A `Query` sorts and filters the data at a Database location so only a subset | ||
* of the child data is included. This can be used to order a collection of | ||
* data by some attribute (for example, height of dinosaurs) as well as to | ||
* restrict a large list of items (for example, chat messages) down to a number | ||
* suitable for synchronizing to the client. Queries are created by chaining | ||
* together one or more of the filter methods defined here. | ||
* | ||
* Just as with a `Reference`, you can receive data from a Query by using the | ||
* `on()` method. You will only receive events and `DataSnapshots` for the subset of | ||
* the data that matches your query. | ||
* Just as with a `Reference`, you can receive data from a `Query` by using the | ||
* `on()` method. You will only receive events and `DataSnapshot`s for the | ||
* subset of the data that matches your query. | ||
* | ||
@@ -607,3 +701,3 @@ * Read our documentation on | ||
/** | ||
* Returns a `Reference` to the Query's location. | ||
* Returns a `Reference` to the `Query`'s location. | ||
* | ||
@@ -624,5 +718,5 @@ * @type {!firebase.database.Reference} | ||
* Two `Query` objects are equivalent if they represent the same location, have | ||
* the same query parameters, and are from the same instance of `firebase.app.App`. | ||
* Equivalent queries share the same sort order, limits, and starting and | ||
* ending points. | ||
* the same query parameters, and are from the same instance of | ||
* `firebase.app.App`. Equivalent queries share the same sort order, limits, and | ||
* starting and ending points. | ||
* | ||
@@ -648,3 +742,4 @@ * @example | ||
* @param {firebase.database.Query} other The query to compare against. | ||
* @return {boolean} Whether or not the current and provided queries are equivalent. | ||
* @return {boolean} Whether or not the current and provided queries are | ||
* equivalent. | ||
*/ | ||
@@ -657,6 +752,7 @@ firebase.database.Query.prototype.isEqual = function(other) {}; | ||
* | ||
* This is the primary way to read data from a database. Your callback | ||
* This is the primary way to read data from a Database. Your callback | ||
* will be triggered for the initial data and again whenever the data changes. | ||
* Use `off( )` to stop receiving updates. See | ||
* {@link https://firebase.google.com/docs/database/web/retrieve-data Retrieve Data on the Web} | ||
* {@link https://firebase.google.com/docs/database/web/retrieve-data | ||
* Retrieve Data on the Web} | ||
* for more details. | ||
@@ -667,7 +763,7 @@ * | ||
* This event will trigger once with the initial data stored at this location, | ||
* and then trigger again each time the data changes. The `DataSnapshot` passed to | ||
* the callback will be for the location at which `on()` was called. It won't | ||
* trigger until the entire contents has been synchronized. If the location has | ||
* no data, it will be triggered with an empty `DataSnapshot` (`val()` will return | ||
* `null`). | ||
* and then trigger again each time the data changes. The `DataSnapshot` passed | ||
* to the callback will be for the location at which `on()` was called. It | ||
* won't trigger until the entire contents has been synchronized. If the | ||
* location has no data, it will be triggered with an empty `DataSnapshot` | ||
* (`val()` will return `null`). | ||
* | ||
@@ -678,6 +774,6 @@ * <h4>child_added event</h4> | ||
* and it will be triggered again every time a new child is added. The | ||
* `DataSnapshot` passed into the callback will reflect the data for the relevant | ||
* child. For ordering purposes, it is passed a second argument which is a | ||
* string containing the key of the previous sibling child by sort order (or | ||
* `null` if it is the first child). | ||
* `DataSnapshot` passed into the callback will reflect the data for the | ||
* relevant child. For ordering purposes, it is passed a second argument which | ||
* is a string containing the key of the previous sibling child by sort order | ||
* (or `null` if it is the first child). | ||
* | ||
@@ -687,4 +783,4 @@ * <h4>child_removed event</h4> | ||
* This event will be triggered once every time a child is removed. The | ||
* `DataSnapshot` passed into the callback will be the old data for the child that | ||
* was removed. A child will get removed when either: | ||
* `DataSnapshot` passed into the callback will be the old data for the child | ||
* that was removed. A child will get removed when either: | ||
* | ||
@@ -739,3 +835,3 @@ * - a client explicitly calls `remove()` on that child or one of its ancestors | ||
* | ||
* @param {!string} eventType One of the following strings: "value", | ||
* @param {string} eventType One of the following strings: "value", | ||
* "child_added", "child_changed", "child_removed", or "child_moved." | ||
@@ -753,8 +849,8 @@ * @param {!function(firebase.database.DataSnapshot, string=)} callback A | ||
* object indicating why the failure occurred. | ||
* @param {Object=} context If provided, this object will be used as this when | ||
* calling your callback(s). | ||
* @param {Object=} context If provided, this object will be used as `this` | ||
* when calling your callback(s). | ||
* @return {!function(firebase.database.DataSnapshot, string=)} The provided | ||
* callback function is returned unmodified. This is just for convenience if | ||
* you want to pass an inline function to `on()` but store the callback function | ||
* for later passing to `off()`. | ||
* you want to pass an inline function to `on()` but store the callback | ||
* function for later passing to `off()`. | ||
*/ | ||
@@ -768,12 +864,12 @@ firebase.database.Query.prototype.on = | ||
* | ||
* Detach a callback previously attached with `on()`. Note that if `on()` was called | ||
* multiple times with the same eventType and callback, the callback will be | ||
* called multiple times for each event, and `off()` must be called multiple times | ||
* to remove the callback. Calling `off()` on a parent listener will not | ||
* automatically remove listeners registered on child nodes, `off()` must also be | ||
* called on any child listeners to remove the callback. | ||
* Detach a callback previously attached with `on()`. Note that if `on()` was | ||
* called multiple times with the same eventType and callback, the callback | ||
* will be called multiple times for each event, and `off()` must be called | ||
* multiple times to remove the callback. Calling `off()` on a parent listener | ||
* will not automatically remove listeners registered on child nodes, `off()` | ||
* must also be called on any child listeners to remove the callback. | ||
* | ||
* If a callback is not specified, all callbacks for the specified eventType | ||
* will be removed. Similarly, if no eventType or callback is specified, all | ||
* callbacks for the reference will be removed. | ||
* callbacks for the `Reference` will be removed. | ||
* | ||
@@ -809,6 +905,7 @@ * @example | ||
/** | ||
* Listens for exactly one event of the specified event type, and then stops listening. | ||
* Listens for exactly one event of the specified event type, and then stops | ||
* listening. | ||
* | ||
* This is equivalent to calling `on()`, and then calling `off()` inside the | ||
* callback function. see `on()` for details on the event types. | ||
* callback function. See `on()` for details on the event types. | ||
* | ||
@@ -822,3 +919,3 @@ * @example | ||
* | ||
* @param {!string} eventType One of the following strings: "value", | ||
* @param {string} eventType One of the following strings: "value", | ||
* "child_added", "child_changed", "child_removed", or "child_moved." | ||
@@ -829,3 +926,3 @@ * @param {function(!firebase.database.DataSnapshot, string=)=} successCallback A | ||
* "child_changed", and "child_moved" will also be passed a string containing | ||
* the key of the previous child, by sort order (or `null` if it is the | ||
* the key of the previous child by sort order (or `null` if it is the | ||
* first child). | ||
@@ -836,25 +933,26 @@ * @param {(function(Error)|Object)=} failureCallbackOrContext An optional | ||
* why the failure occurred. | ||
* @param {Object=} context If provided, this object will be used as this when | ||
* calling your callback(s). | ||
* @return {!firebase.Promise<*>} | ||
* @param {Object=} context If provided, this object will be used as `this` | ||
* when calling your callback(s). | ||
* @return {!Promise<*>} | ||
*/ | ||
firebase.database.Query.prototype.once = function(eventType, successCallback, failureCallbackOrContext, context) {}; | ||
firebase.database.Query.prototype.once = | ||
function(eventType, successCallback, failureCallbackOrContext, context) {}; | ||
/** | ||
* Generates a new Query limited to the first specific number of children. | ||
* Generates a new `Query` limited to the first specific number of children. | ||
* | ||
* The `limitToFirst()` method is used to set a maximum number of children to be | ||
* synced for a given callback. If we set a limit of 100, we will initially only | ||
* receive up to 100 `child_added` events. If we have less than 100 messages | ||
* stored in our database, a `child_added` event will fire for each message. | ||
* receive up to 100 `child_added` events. If we have fewer than 100 messages | ||
* stored in our Database, a `child_added` event will fire for each message. | ||
* However, if we have over 100 messages, we will only receive a `child_added` | ||
* event for the first 100 ordered messages. As items change, we will receive | ||
* `child_removed` events for each item that drops out of the active list, so that | ||
* the total number stays at 100. | ||
* `child_removed` events for each item that drops out of the active list so | ||
* that the total number stays at 100. | ||
* | ||
* You can read more about `limitToFirst()` in | ||
* {@link | ||
* https://firebase.google.com/docs/database/web/lists-of-data#sorting_and_filtering_data | ||
* Sorting and filtering data}. | ||
* https://firebase.google.com/docs/database/web/lists-of-data#filtering_data | ||
* Filtering data}. | ||
* | ||
@@ -866,3 +964,3 @@ * @example | ||
* // This will be called exactly two times (unless there are less than two | ||
* // dinosaurs in the database. | ||
* // dinosaurs in the Database). | ||
* | ||
@@ -875,3 +973,3 @@ * // It will also get fired again if one of the first two dinosaurs is | ||
* | ||
* @param {!number} limit The maximum number of nodes to include in this query. | ||
* @param {number} limit The maximum number of nodes to include in this query. | ||
* @return {!firebase.database.Query} | ||
@@ -883,17 +981,18 @@ */ | ||
/** | ||
* Generates a new Query object limited to the last specific number of children. | ||
* Generates a new `Query` object limited to the last specific number of | ||
* children. | ||
* | ||
* The `limitToLast()` method is used to set a maximum number of children to be | ||
* synced for a given callback. If we set a limit of 100, we will initially only | ||
* receive up to 100 `child_added` events. If we have less than 100 messages | ||
* stored in our database, a `child_added` event will fire for each message. | ||
* receive up to 100 `child_added` events. If we have fewer than 100 messages | ||
* stored in our Database, a `child_added` event will fire for each message. | ||
* However, if we have over 100 messages, we will only receive a `child_added` | ||
* event for the last 100 ordered messages. As items change, we will receive | ||
* `child_removed` events for each item that drops out of the active list, so that | ||
* the total number stays at 100. | ||
* `child_removed` events for each item that drops out of the active list so | ||
* that the total number stays at 100. | ||
* | ||
* You can read more about `limitToLast()` in | ||
* {@link | ||
* https://firebase.google.com/docs/database/web/lists-of-data#sorting_and_filtering_data | ||
* Sorting and filtering data}. | ||
* https://firebase.google.com/docs/database/web/lists-of-data#filtering_data | ||
* Filtering data}. | ||
* | ||
@@ -904,9 +1003,9 @@ * @example | ||
* ref.orderByChild("weight").limitToLast(2).on("child_added", function(snapshot) { | ||
* // This callback will be triggered exactly two times, unless there are less | ||
* // than two dinosaurs stored in the database. It will also get fired for | ||
* // every new, heavier dinosaur that gets added to the data set. | ||
* // This callback will be triggered exactly two times, unless there are | ||
* // fewer than two dinosaurs stored in the Database. It will also get fired | ||
* // for every new, heavier dinosaur that gets added to the data set. | ||
* console.log(snapshot.key); | ||
* }); | ||
* | ||
* @param {!number} limit The maximum number of nodes to include in this query. | ||
* @param {number} limit The maximum number of nodes to include in this query. | ||
* @return {!firebase.database.Query} | ||
@@ -918,8 +1017,8 @@ */ | ||
/** | ||
* Generates a new Query object ordered by the specified child key. | ||
* Generates a new `Query` object ordered by the specified child key. | ||
* | ||
* Queries can only order by one key at a time. Calling `orderByChild()` multiple | ||
* times on the same query is an error. | ||
* Queries can only order by one key at a time. Calling `orderByChild()` | ||
* multiple times on the same query is an error. | ||
* | ||
* Firebase queries allow you to order your data by any child key, on the fly. | ||
* Firebase queries allow you to order your data by any child key on the fly. | ||
* However, if you know in advance what your indexes will be, you can define | ||
@@ -932,4 +1031,4 @@ * them via the .indexOn rule in your Security Rules for better performance. See | ||
* {@link | ||
* https://firebase.google.com/docs/database/web/lists-of-data#sorting_and_filtering_data | ||
* Sorting and filtering data}. | ||
* https://firebase.google.com/docs/database/web/lists-of-data#sort_data | ||
* Sort data}. | ||
* | ||
@@ -939,6 +1038,6 @@ * @example | ||
* ref.orderByChild("height").on("child_added", function(snapshot) { | ||
* console.log(snapshot.key + " was " + snapshot.val().height + " meters tall"); | ||
* console.log(snapshot.key + " was " + snapshot.val().height + " m tall"); | ||
* }); | ||
* | ||
* @param {!string} path | ||
* @param {string} path | ||
* @return {!firebase.database.Query} | ||
@@ -950,10 +1049,10 @@ */ | ||
/** | ||
* Generates a new Query object ordered by key. | ||
* Generates a new `Query` object ordered by key. | ||
* | ||
* Sorts the results of a query by their (ascending) key value. | ||
* Sorts the results of a query by their (ascending) key values. | ||
* | ||
* You can read more about `orderByKey()` in | ||
* {@link | ||
* https://firebase.google.com/docs/database/web/lists-of-data#sorting_and_filtering_data | ||
* Sorting and filtering data}. | ||
* https://firebase.google.com/docs/database/web/lists-of-data#sort_data | ||
* Sort data}. | ||
* | ||
@@ -972,9 +1071,9 @@ * @example | ||
/** | ||
* Generates a new `Query` object order by priority. | ||
* Generates a new `Query` object ordered by priority. | ||
* | ||
* Applications need not use priority, but can order collections by | ||
* Applications need not use priority but can order collections by | ||
* ordinary properties (see | ||
* {@link | ||
* https://firebase.google.com/docs/database/web/lists-of-data#sorting_and_filtering_data | ||
* Sorting and filtering data}). | ||
* https://firebase.google.com/docs/database/web/lists-of-data#sort_data | ||
* Sort data} for alternatives to priority. | ||
* | ||
@@ -987,11 +1086,11 @@ * @return {!firebase.database.Query} | ||
/** | ||
* Generates a new Query object ordered by child values. | ||
* Generates a new `Query` object ordered by value. | ||
* | ||
* If the children of a query are all scalar values (numbers or strings), you | ||
* can order the results by their (ascending) values. | ||
* If the children of a query are all scalar values (string, number, or | ||
* boolean), you can order the results by their (ascending) values. | ||
* | ||
* You can read more about `orderByValue()` in | ||
* {@link | ||
* https://firebase.google.com/docs/database/web/lists-of-data#sorting_and_filtering_data | ||
* Sorting and filtering data}. | ||
* https://firebase.google.com/docs/database/web/lists-of-data#sort_data | ||
* Sort data}. | ||
* | ||
@@ -1012,3 +1111,3 @@ * @example | ||
/** | ||
* Creates a Query with the specified starting point. | ||
* Creates a `Query` with the specified starting point. | ||
* | ||
@@ -1026,4 +1125,4 @@ * Using `startAt()`, `endAt()`, and `equalTo()` allows you to choose arbitrary | ||
* {@link | ||
* https://firebase.google.com/docs/database/web/lists-of-data#sorting_and_filtering_data | ||
* Sorting and filtering data}. | ||
* https://firebase.google.com/docs/database/web/lists-of-data#filtering_data | ||
* Filtering data}. | ||
* | ||
@@ -1038,5 +1137,5 @@ * @example | ||
* @param {number|string|boolean|null} value The value to start at. The argument | ||
* type depends on which `orderBy*()` function was used in this query. Specify a | ||
* value that matches the `orderBy*()` type. When used in combination with | ||
* `orderByKey()`, the value must be a string. | ||
* type depends on which `orderBy*()` function was used in this query. | ||
* Specify a value that matches the `orderBy*()` type. When used in | ||
* combination with `orderByKey()`, the value must be a string. | ||
* @param {string=} key The child key to start at. This argument is allowed if | ||
@@ -1050,3 +1149,3 @@ * ordering by child, value, or priority. | ||
/** | ||
* Creates a Query with the specified ending point. | ||
* Creates a `Query` with the specified ending point. | ||
* | ||
@@ -1064,4 +1163,4 @@ * Using `startAt()`, `endAt()`, and `equalTo()` allows you to choose arbitrary | ||
* {@link | ||
* https://firebase.google.com/docs/database/web/lists-of-data#sorting_and_filtering_data | ||
* Sorting and filtering data}. | ||
* https://firebase.google.com/docs/database/web/lists-of-data#filtering_data | ||
* Filtering data}. | ||
* | ||
@@ -1076,5 +1175,5 @@ * @example | ||
* @param {number|string|boolean|null} value The value to end at. The argument | ||
* type depends on which `orderBy*()` function was used in this query. Specify a | ||
* value that matches the `orderBy*()` type. When used in combination with | ||
* `orderByKey()`, the value must be a string. | ||
* type depends on which `orderBy*()` function was used in this query. | ||
* Specify a value that matches the `orderBy*()` type. When used in | ||
* combination with `orderByKey()`, the value must be a string. | ||
* @param {string=} key The child key to end at, among the children with the | ||
@@ -1089,3 +1188,3 @@ * previously specified priority. This argument is only allowed if ordering by | ||
/** | ||
* Creates a Query which includes children which match the specified value. | ||
* Creates a `Query` that includes children that match the specified value. | ||
* | ||
@@ -1102,4 +1201,4 @@ * Using `startAt()`, `endAt()`, and `equalTo()` allows us to choose arbitrary | ||
* {@link | ||
* https://firebase.google.com/docs/database/web/lists-of-data#sorting_and_filtering_data | ||
* Sorting and filtering data}. | ||
* https://firebase.google.com/docs/database/web/lists-of-data#filtering_data | ||
* Filtering data}. | ||
* | ||
@@ -1114,5 +1213,5 @@ * @example | ||
* @param {number|string|boolean|null} value The value to match for. The | ||
* argument type depends on which `orderBy*()` function was used in this query. | ||
* Specify a value that matches the `orderBy*()` type. When used in combination | ||
* with `orderByKey()`, the value must be a string. | ||
* argument type depends on which `orderBy*()` function was used in this | ||
* query. Specify a value that matches the `orderBy*()` type. When used in | ||
* combination with `orderByKey()`, the value must be a string. | ||
* @param {string=} key The child key to start at, among the children with the | ||
@@ -1127,15 +1226,15 @@ * previously specified priority. This argument is only allowed if ordering by | ||
/** | ||
* Get the absolute URL for this location. | ||
* Gets the absolute URL for this location. | ||
* | ||
* The `toString()` method returns a URL that is ready to be put into a browser, | ||
* curl command, or a `firebase.database().refFromURL()` call. Since all of those | ||
* expect the URL to be url-encoded, `toString()` returns an encoded URL. | ||
* curl command, or a `firebase.database().refFromURL()` call. Since all of | ||
* those expect the URL to be url-encoded, `toString()` returns an encoded URL. | ||
* | ||
* Append '.json' to the URL when typed into a browser to download JSON | ||
* formatted data. If the location is secured (not publicly readable) you will | ||
* get a permission-denied error. | ||
* Append '.json' to the returned URL when typed into a browser to download | ||
* JSON-formatted data. If the location is secured (that is, not publicly | ||
* readable), you will get a permission-denied error. | ||
* | ||
* @example | ||
* // Calling toString() on a root Firebase reference returns the URL where its | ||
* // data is stored within the database: | ||
* // data is stored within the Database: | ||
* var rootRef = firebase.database().ref(); | ||
@@ -1146,3 +1245,3 @@ * var rootUrl = rootRef.toString(); | ||
* // Calling toString() at a deeper Firebase reference returns the URL of that | ||
* // deep path within the database: | ||
* // deep path within the Database: | ||
* var adaRef = rootRef.child('users/ada'); | ||
@@ -1159,13 +1258,13 @@ * var adaURL = adaRef.toString(); | ||
/** | ||
* A `DataSnapshot` contains data from a database location. | ||
* A `DataSnapshot` contains data from a Database location. | ||
* | ||
* Any time you read data from the database, you receive the data as a | ||
* `DataSnapshot`. A `DataSnapshot` is passed to the event callbacks you attach with | ||
* `on()` or `once()`. You can extract the contents of the snapshot as a JavaScript | ||
* object by calling the `val()` method. Alternatively, you can traverse into the | ||
* snapshot by calling `child()` to return child snapshots (which you could then | ||
* call `val()` on). | ||
* Any time you read data from the Database, you receive the data as a | ||
* `DataSnapshot`. A `DataSnapshot` is passed to the event callbacks you attach | ||
* with `on()` or `once()`. You can extract the contents of the snapshot as a | ||
* JavaScript object by calling the `val()` method. Alternatively, you can | ||
* traverse into the snapshot by calling `child()` to return child snapshots | ||
* (which you could then call `val()` on). | ||
* | ||
* A `DataSnapshot` is an efficiently-generated, immutable copy of the data at a | ||
* database location. It cannot be modified and will never change (to modify | ||
* A `DataSnapshot` is an efficiently generated, immutable copy of the data at | ||
* a Database location. It cannot be modified and will never change (to modify | ||
* data, you always call the `set()` method on a `Reference` directly). | ||
@@ -1179,3 +1278,3 @@ * | ||
/** | ||
* Extract a JavaScript value from a `DataSnapshot`. | ||
* Extracts a JavaScript value from a `DataSnapshot`. | ||
* | ||
@@ -1187,3 +1286,3 @@ * Depending on the data in a `DataSnapshot`, the `val()` method may return a | ||
* @example | ||
* // Write and then read-back a string from the database. | ||
* // Write and then read back a string from the Database. | ||
* ref.set("hello") | ||
@@ -1198,3 +1297,3 @@ * .then(function() { | ||
* @example | ||
* // Write and then read-back a JavaScript Object from the database. | ||
* // Write and then read back a JavaScript object from the Database. | ||
* ref.set({ name: "Ada", age: 36 }) | ||
@@ -1212,3 +1311,3 @@ * .then(function() { | ||
* @return {*} The DataSnapshot's contents as a JavaScript value (Object, | ||
* Array, string, number, boolean, or null). | ||
* Array, string, number, boolean, or `null`). | ||
*/ | ||
@@ -1221,12 +1320,7 @@ firebase.database.DataSnapshot.prototype.val = function() {}; | ||
* | ||
* The `exportVal()` method is similar to `val()`, except priority information is | ||
* included (if available), making it suitable for backing up your data. | ||
* The `exportVal()` method is similar to `val()`, except priority information | ||
* is included (if available), making it suitable for backing up your data. | ||
* | ||
* Applications need not use priority, but can order collections by | ||
* ordinary properties (see | ||
* {@link | ||
* https://firebase.google.com/docs/database/web/lists-of-data#sorting_and_filtering_data | ||
* Sorting and filtering data}). | ||
* | ||
* @return {*} | ||
* @return {*} The DataSnapshot's contents as a JavaScript value (Object, | ||
* Array, string, number, boolean, or `null`). | ||
*/ | ||
@@ -1241,3 +1335,3 @@ firebase.database.DataSnapshot.prototype.exportVal = function() {}; | ||
* @example | ||
* // Assume we have the following data in our database: | ||
* // Assume we have the following data in the Database: | ||
* { | ||
@@ -1270,9 +1364,9 @@ * "name": { | ||
* another `DataSnapshot` for the location at the specified relative path. The | ||
* relative path can either be a simple child name (e.g. "ada") or a deeper, | ||
* slash-separated path (e.g. "ada/name/first"). If the child location has no | ||
* data, an empty `DataSnapshot` (that is, a `DataSnapshot` whose value is null) is | ||
* returned. | ||
* relative path can either be a simple child name (for example, "ada") or a | ||
* deeper, slash-separated path (for example, "ada/name/first"). If the child | ||
* location has no data, an empty `DataSnapshot` (that is, a `DataSnapshot` | ||
* whose value is `null`) is returned. | ||
* | ||
* @example | ||
* // Assume we have the following data in our database: | ||
* // Assume we have the following data in the Database: | ||
* { | ||
@@ -1289,3 +1383,3 @@ * "name": { | ||
* .then(function(snapshot) { | ||
* var name = snapshot.child("name").val(); // { first: "Ada", last: "Lovelace"} | ||
* var name = snapshot.child("name").val(); // {first:"Ada",last:"Lovelace"} | ||
* var firstName = snapshot.child("name/first").val(); // "Ada" | ||
@@ -1306,3 +1400,3 @@ * var lastName = snapshot.child("name").child("last").val(); // "Lovelace" | ||
* @example | ||
* // Assume we have the following data in the database | ||
* // Assume we have the following data in the Database: | ||
* { | ||
@@ -1324,3 +1418,4 @@ * "name": { | ||
* @param {string} path A relative path to the location of a potential child. | ||
* @return {boolean} true if data exists at the specified child path; else false. | ||
* @return {boolean} `true` if data exists at the specified child path; else | ||
* `false`. | ||
*/ | ||
@@ -1333,3 +1428,3 @@ firebase.database.DataSnapshot.prototype.hasChild = function(path) {}; | ||
* | ||
* Applications need not use priority, but can order collections by | ||
* Applications need not use priority but can order collections by | ||
* ordinary properties (see | ||
@@ -1348,10 +1443,10 @@ * {@link | ||
* | ||
* Because of the way JavaScript Objects work, the ordering of data in the | ||
* JavaScript Object returned by `val()` is not guaranteed to match the ordering | ||
* Because of the way JavaScript objects work, the ordering of data in the | ||
* JavaScript object returned by `val()` is not guaranteed to match the ordering | ||
* on the server nor the ordering of `child_added` events. That is where | ||
* `forEach()` comes in handy. It guarantees the children of a `DataSnapshot` | ||
* will be iterated in their query-order. | ||
* will be iterated in their query order. | ||
* | ||
* If no explicit `orderBy*()` method is used, results are returned | ||
* ordered by key (unless priorities are used, in which case results are | ||
* ordered by key (unless priorities are used, in which case, results are | ||
* returned by priority). | ||
@@ -1361,3 +1456,3 @@ * | ||
* | ||
* // Assume we have the following data in our database: | ||
* // Assume we have the following data in the Database: | ||
* { | ||
@@ -1376,4 +1471,5 @@ * "users": { | ||
* | ||
* // Loop through users in order with the forEach() method. The callback provided | ||
* // to will be called synchronously with a DataSnapshot for each child: | ||
* // Loop through users in order with the forEach() method. The callback | ||
* // provided to forEach() will be called synchronously with a DataSnapshot | ||
* // for each child: | ||
* var query = firebase.database().ref("users").orderByKey(); | ||
@@ -1392,4 +1488,4 @@ * query.once("value") | ||
* // You can cancel the enumeration at any point by having your callback | ||
* // function return true. For example, the following code sample will only fire | ||
* // the callback function one time. | ||
* // function return true. For example, the following code sample will only | ||
* // fire the callback function one time: | ||
* var query = firebase.database().ref("users").orderByKey(); | ||
@@ -1407,3 +1503,3 @@ * query.once("value") | ||
* @param {function(!firebase.database.DataSnapshot): boolean} action A function | ||
* which will be called for each child DataSnapshot. The callback can return | ||
* that will be called for each child DataSnapshot. The callback can return | ||
* true to cancel further enumeration. | ||
@@ -1417,11 +1513,13 @@ * @return {boolean} true if enumeration was canceled due to your callback | ||
/** | ||
* Returns true if the DataSnapshot child properties. | ||
* Returns whether or not the `DataSnapshot` has any non-`null` child | ||
* properties. | ||
* | ||
* You can use `hasChildren()` to determine if a `DataSnapshot` has any children. If | ||
* it does, you can enumerate them using `forEach()`. If it does not, then either | ||
* this snapshot contains a primitive value (which can be retrieved with `val()`) | ||
* or it is empty (in which case `val()` will return `null`). | ||
* You can use `hasChildren()` to determine if a `DataSnapshot` has any | ||
* children. If it does, you can enumerate them using `forEach()`. If it | ||
* doesn't, then either this snapshot contains a primitive value (which can be | ||
* retrieved with `val()`) or it is empty (in which case, `val()` will return | ||
* `null`). | ||
* | ||
* @example | ||
* // Assume we have the following data in the database | ||
* // Assume we have the following data in the Database: | ||
* { | ||
@@ -1450,9 +1548,9 @@ * "name": { | ||
* | ||
* The last token in a database location is considered its key. For example, | ||
* The last token in a Database location is considered its key. For example, | ||
* "ada" is the key for the /users/ada/ node. Accessing the key on any | ||
* `DataSnapshot` will return the key for the location that generated it. | ||
* However, accessing the key on the root URL of a database will return `null`. | ||
* However, accessing the key on the root URL of a Database will return `null`. | ||
* | ||
* @example | ||
* // Assume we have the following data in the database | ||
* // Assume we have the following data in the Database: | ||
* { | ||
@@ -1486,6 +1584,6 @@ * "name": { | ||
/** | ||
* Return the number of child properties of this `DataSnapshot`. | ||
* Returns the number of child properties of this `DataSnapshot`. | ||
* | ||
* @example | ||
* // Assume we have the following data in the database | ||
* // Assume we have the following data in the Database: | ||
* { | ||
@@ -1522,3 +1620,3 @@ * "name": { | ||
* The `onDisconnect` class allows you to write or clear data when your client | ||
* disconnects from the database server. These updates occur whether your | ||
* disconnects from the Database server. These updates occur whether your | ||
* client disconnects cleanly or not, so you can rely on them to clean up data | ||
@@ -1530,8 +1628,9 @@ * even if a connection is dropped or a client crashes. | ||
* when other clients disconnect. See | ||
* {@link https://firebase.google.com/docs/database/web/offline-capabilities | ||
* Offline Capabilities} for more information. | ||
* {@link | ||
* https://firebase.google.com/docs/database/web/offline-capabilities | ||
* Enabling Offline Capabilities in JavaScript} for more information. | ||
* | ||
* Note that these functions should be called before any data is written to | ||
* avoid problems if a connection is dropped before the requests can be | ||
* transferred to the database server. | ||
* To avoid problems when a connection is dropped before the requests can be | ||
* transferred to the Database server, these functions should be called before | ||
* any data is written. | ||
* | ||
@@ -1552,4 +1651,4 @@ * Note that `onDisconnect` operations are only triggered once. If you want an | ||
* If a write has been queued for this location via a `set()` or `update()` at a | ||
* parent location, the write at this location will be canceled though all other | ||
* siblings will still be written. | ||
* parent location, the write at this location will be canceled, though all | ||
* other siblings will still be written. | ||
* | ||
@@ -1559,4 +1658,3 @@ * @example | ||
* ref.onDisconnect().set(false); | ||
* ... | ||
* // nevermind | ||
* // ... sometime later | ||
* ref.onDisconnect().cancel(); | ||
@@ -1568,3 +1666,3 @@ * | ||
* indicating a failure. | ||
* @return {!firebase.Promise<void>} Resolves when synchronization to the server | ||
* @return {!Promise<void>} Resolves when synchronization to the server | ||
* is complete. | ||
@@ -1583,3 +1681,3 @@ */ | ||
* indicating a failure. | ||
* @return {!firebase.Promise<void>} Resolves when synchronization to the server | ||
* @return {!Promise<void>} Resolves when synchronization to the server | ||
* is complete. | ||
@@ -1594,12 +1692,9 @@ */ | ||
* | ||
* Ensure the data at this location is set to the specified value when the | ||
* client is disconnected (due to closing the browser, navigating to a new page, | ||
* or network issues). | ||
* `set()` is especially useful for implementing "presence" systems, where a | ||
* value should be changed or cleared when a user disconnects so that they | ||
* appear "offline" to other users. See | ||
* {@link | ||
* https://firebase.google.com/docs/database/web/offline-capabilities | ||
* Enabling Offline Capabilities in JavaScript} for more information. | ||
* | ||
* `set()` is especially useful for implementing "presence" systems, where a value | ||
* should be changed or cleared when a user disconnects so that he appears | ||
* "offline" to other users. See | ||
* {@link https://firebase.google.com/docs/database/web/offline-capabilities | ||
* Offline Capabilities} for more information. | ||
* | ||
* Note that `onDisconnect` operations are only triggered once. If you want an | ||
@@ -1615,11 +1710,10 @@ * operation to occur each time a disconnect occurs, you'll need to re-establish | ||
* disconnect (can be an object, array, string, number, boolean, or null). | ||
* @param {function(?Error)=} onComplete An optional callback function that will | ||
* be called when synchronization to the database server has completed. The | ||
* callback will be passed a single parameter: null for success, or an Error | ||
* object indicating a failure. | ||
* @return {!firebase.Promise<void>} Resolves when synchronization to the | ||
* database is complete. | ||
* @param {function(?Error)=} onComplete An optional callback function that | ||
* will be called when synchronization to the Database server has completed. | ||
* The callback will be passed a single parameter: null for success, or an | ||
* `Error` object indicating a failure. | ||
* @return {!Promise<void>} Resolves when synchronization to the | ||
* Database is complete. | ||
*/ | ||
firebase.database.OnDisconnect.prototype.set = | ||
function(value, onComplete) {}; | ||
firebase.database.OnDisconnect.prototype.set = function(value, onComplete) {}; | ||
@@ -1632,12 +1726,6 @@ | ||
* | ||
* Applications need not use priority, but can order collections by | ||
* ordinary properties (see | ||
* {@link | ||
* https://firebase.google.com/docs/database/web/lists-of-data#sorting_and_filtering_data | ||
* Sorting and filtering data}). | ||
* | ||
* @param {*} value | ||
* @param {number|string|null} priority | ||
* @param {function(?Error)=} onComplete | ||
* @return {!firebase.Promise<void>} | ||
* @return {!Promise<void>} | ||
*/ | ||
@@ -1649,9 +1737,9 @@ firebase.database.OnDisconnect.prototype.setWithPriority = | ||
/** | ||
* Writes multiple values this location when the client is disconnected (due to | ||
* closing the browser, navigating to a new page, or network issues). | ||
* Writes multiple values at this location when the client is disconnected (due | ||
* to closing the browser, navigating to a new page, or network issues). | ||
* | ||
* The `values` argument contains multiple property/value pairs that will be | ||
* written to the database together. Each child property can either be a simple | ||
* property (for example, "name"), or a relative path (for example, | ||
* "name/first") from the current location to the data to update. | ||
* The `values` argument contains multiple property-value pairs that will be | ||
* written to the Database together. Each child property can either be a simple | ||
* property (for example, "name") or a relative path (for example, "name/first") | ||
* from the current location to the data to update. | ||
* | ||
@@ -1681,6 +1769,6 @@ * As opposed to the `set()` method, `update()` can be use to selectively update | ||
* object indicating a failure. | ||
* @return {!firebase.Promise<void>} Resolves when synchronization to the | ||
* database is complete. | ||
* @return {!Promise<void>} Resolves when synchronization to the | ||
* Database is complete. | ||
*/ | ||
firebase.database.OnDisconnect.prototype.update = | ||
function(values, onComplete) {}; |
/** | ||
* @fileoverview Firebase Messaging API. | ||
* Version: 3.6.1 | ||
* Version: 3.6.2 | ||
* | ||
@@ -5,0 +5,0 @@ * Copyright 2016 Google Inc. All Rights Reserved. |
/** | ||
* @fileoverview Firebase server Auth API. | ||
* Version: 3.6.1 | ||
* Version: 3.6.2 | ||
* | ||
@@ -26,3 +26,10 @@ * Copyright 2016 Google Inc. All Rights Reserved. | ||
* | ||
* @deprecated Use the same method in the `firebase-admin` package. | ||
* @deprecated Use the | ||
* {@link | ||
* https://firebase.google.com/docs/reference/admin/node/admin.auth.Auth#createCustomToken | ||
* createCustomToken()} | ||
* method in the | ||
* {@link | ||
* https://firebase.google.com/docs/admin/setup | ||
* Firebase Admin Node.js SDK}. | ||
* | ||
@@ -42,3 +49,10 @@ * @param {string} uid The uid to use as the subject | ||
* | ||
* @deprecated Use the same method in the `firebase-admin` package. | ||
* @deprecated Use the | ||
* {@link | ||
* https://firebase.google.com/docs/reference/admin/node/admin.auth.Auth#verifyIdToken | ||
* verifyIdToken()} | ||
* method in the | ||
* {@link | ||
* https://firebase.google.com/docs/admin/setup | ||
* Firebase Admin Node.js SDK}. | ||
* | ||
@@ -45,0 +59,0 @@ * @param {string} idToken The ID token (JWT) to verify |
/** | ||
* @fileoverview Firebase Storage API. | ||
* Version: 3.6.1 | ||
* Version: 3.6.2 | ||
* | ||
@@ -23,16 +23,23 @@ * Copyright 2016 Google Inc. All Rights Reserved. | ||
/** | ||
* The namespace for all Firebase Storage functionality. | ||
* The returned service is initialized with a particular app which contains the | ||
* project's storage location, or uses the default app if none is provided. | ||
* Gets the {@link firebase.storage.Storage `Storage`} service for the default | ||
* app or a given app. | ||
* | ||
* Usage (either): | ||
* `firebase.storage()` can be called with no arguments to access the default | ||
* app's {@link firebase.storage.Storage `Storage`} service or as | ||
* `firebase.storage(app)` to access the | ||
* {@link firebase.storage.Storage `Storage`} service associated with a | ||
* specific app. | ||
* | ||
* ``` | ||
* firebase.storage() | ||
* firebase.storage(app) | ||
* ``` | ||
* @example | ||
* // Get the Storage service for the default app | ||
* var defaultStorage = firebase.storage(); | ||
* | ||
* @example | ||
* // Get the Storage service for a given app | ||
* var otherStorage = firebase.storage(otherApp); | ||
* | ||
* @namespace | ||
* @param {!firebase.app.App=} app The app to create a storage service for. | ||
* If not passed, uses the default app. | ||
* | ||
* @return {!firebase.storage.Storage} | ||
@@ -43,8 +50,10 @@ */ | ||
/** | ||
* Access the Storage service from an App instance. | ||
* Gets the {@link firebase.storage.Storage `Storage`} service for the current | ||
* app. | ||
* | ||
* Usage: | ||
* @example | ||
* var storage = app.storage(); | ||
* // The above is shorthand for: | ||
* // var storage = firebase.storage(app); | ||
* | ||
* app.storage() | ||
* | ||
* @return {!firebase.storage.Storage} | ||
@@ -55,4 +64,13 @@ */ | ||
/** | ||
* A service for uploading and downloading large objects to/from Google Cloud | ||
* Storage. | ||
* The Firebase Storage service interface. | ||
* | ||
* Do not call this constructor directly. Instead, use | ||
* {@link firebase.storage `firebase.storage()`}. | ||
* | ||
* See | ||
* {@link | ||
* https://firebase.google.com/docs/storage/web/start/ | ||
* Get Started on Web} | ||
* for a full guide on how to use the Firebase Storage service. | ||
* | ||
* @interface | ||
@@ -63,3 +81,8 @@ */ | ||
/** | ||
* The app associated with this service. | ||
* The {@link firebase.app.App app} associated with the `Storage` service | ||
* instance. | ||
* | ||
* @example | ||
* var app = storage.app; | ||
* | ||
* @type {!firebase.app.App} | ||
@@ -66,0 +89,0 @@ */ |
@@ -1,3 +0,3 @@ | ||
/*! @license Firebase v3.6.1 | ||
Build: 3.6.1-rc.3 | ||
/*! @license Firebase v3.6.2 | ||
Build: 3.6.2-rc.2 | ||
Terms: https://firebase.google.com/terms/ */ | ||
@@ -30,2 +30,2 @@ var firebase = null; (function() { var aa="function"==typeof Object.defineProperties?Object.defineProperty:function(a,b,c){if(c.get||c.set)throw new TypeError("ES3 does not support getters and setters.");a!=Array.prototype&&a!=Object.prototype&&(a[b]=c.value)},h="undefined"!=typeof window&&window===this?this:"undefined"!=typeof global&&null!=global?global:this,l=function(){l=function(){};h.Symbol||(h.Symbol=ba)},ca=0,ba=function(a){return"jscomp_symbol_"+(a||"")+ca++},n=function(){l();var a=h.Symbol.iterator;a||(a=h.Symbol.iterator= | ||
return void 0===b?"Application Error: ("+a+")":b};"undefined"!==typeof firebase&&(firebase=Ja()); })(); | ||
firebase.SDK_VERSION = "3.6.1"; | ||
firebase.SDK_VERSION = "3.6.2"; |
@@ -1,5 +0,5 @@ | ||
/*! @license Firebase v3.6.1 | ||
Build: 3.6.1-rc.3 | ||
/*! @license Firebase v3.6.2 | ||
Build: 3.6.2-rc.2 | ||
Terms: https://firebase.google.com/terms/ */ | ||
(function() {var e=function(a,b){function c(){}c.prototype=b.prototype;a.prototype=new c;for(var d in b)if(Object.defineProperties){var f=Object.getOwnPropertyDescriptor(b,d);f&&Object.defineProperty(a,d,f)}else a[d]=b[d]},g=this,h=function(a){var b=typeof a;if("object"==b)if(a){if(a instanceof Array)return"array";if(a instanceof Object)return b;var c=Object.prototype.toString.call(a);if("[object Window]"==c)return"object";if("[object Array]"==c||"number"==typeof a.length&&"undefined"!=typeof a.splice&&"undefined"!= | ||
(function(){var e=function(a,b){function c(){}c.prototype=b.prototype;a.prototype=new c;for(var d in b)if(Object.defineProperties){var f=Object.getOwnPropertyDescriptor(b,d);f&&Object.defineProperty(a,d,f)}else a[d]=b[d]},g=this,h=function(a){var b=typeof a;if("object"==b)if(a){if(a instanceof Array)return"array";if(a instanceof Object)return b;var c=Object.prototype.toString.call(a);if("[object Window]"==c)return"object";if("[object Array]"==c||"number"==typeof a.length&&"undefined"!=typeof a.splice&&"undefined"!= | ||
typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable("splice"))return"array";if("[object Function]"==c||"undefined"!=typeof a.call&&"undefined"!=typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable("call"))return"function"}else return"null";else if("function"==b&&"undefined"==typeof a.call)return"object";return b},k=function(a,b){function c(){}c.prototype=b.prototype;a.ga=b.prototype;a.prototype=new c;a.ca=function(a,c,p){for(var d=Array(arguments.length-2),f=2;f<arguments.length;f++)d[f-2]=arguments[f]; | ||
@@ -22,3 +22,3 @@ return b.prototype[c].apply(a,d)}};var l={c:"only-available-in-window",o:"only-available-in-sw",O:"should-be-overriden",g:"bad-sender-id",C:"incorrect-gcm-sender-id",M:"permission-default",L:"permission-blocked",U:"unsupported-browser",G:"notifications-blocked",w:"failed-serviceworker-registration",h:"sw-registration-expected",B:"get-subscription-failed",F:"invalid-saved-token",l:"sw-reg-redundant",P:"token-subscribe-failed",S:"token-subscribe-no-token",R:"token-subscribe-no-push-set",V:"use-sw-before-get-token",D:"invalid-delete-token", | ||
M.prototype.deleteToken=M.prototype.deleteToken;M.prototype.i=function(){throw this.a.create(l.O);};M.prototype.requestPermission=function(){throw this.a.create(l.c);};M.prototype.useServiceWorker=function(){throw this.a.create(l.c);};M.prototype.useServiceWorker=M.prototype.useServiceWorker;M.prototype.onMessage=function(){throw this.a.create(l.c);};M.prototype.onMessage=M.prototype.onMessage;M.prototype.onTokenRefresh=function(){throw this.a.create(l.c);};M.prototype.onTokenRefresh=M.prototype.onTokenRefresh; | ||
M.prototype.setBackgroundMessageHandler=function(){throw this.a.create(l.o);};M.prototype.setBackgroundMessageHandler=M.prototype.setBackgroundMessageHandler;M.prototype.delete=function(){H(this.f)};var N=self,S=function(a){var b=this;M.call(this,a);this.a=new firebase.INTERNAL.ErrorFactory("messaging","Messaging",q);N.addEventListener("push",function(a){return O(b,a)},!1);N.addEventListener("pushsubscriptionchange",function(a){return Q(b,a)},!1);N.addEventListener("notificationclick",function(a){return R(b,a)},!1);this.b=null};e(S,M); | ||
M.prototype.setBackgroundMessageHandler=function(){throw this.a.create(l.o);};M.prototype.setBackgroundMessageHandler=M.prototype.setBackgroundMessageHandler;M.prototype.delete=function(){H(this.f)};var N=self,S=function(a){M.call(this,a);var b=this;this.a=new firebase.INTERNAL.ErrorFactory("messaging","Messaging",q);N.addEventListener("push",function(a){return O(b,a)},!1);N.addEventListener("pushsubscriptionchange",function(a){return Q(b,a)},!1);N.addEventListener("notificationclick",function(a){return R(b,a)},!1);this.b=null};e(S,M); | ||
var O=function(a,b){var c;try{c=b.data.json()}catch(f){return}var d=T().then(function(b){if(b){if(c.notification||a.b)return U(a,c)}else{if((b=c)&&"object"===typeof b.notification){var d=Object.assign({},b.notification),f={};d.data=(f.FCM_MSG=b,f);b=d}else b=void 0;if(b)return N.registration.showNotification(b.title||"",b);if(a.b)return a.b(c)}});b.waitUntil(d)},Q=function(a,b){var c=a.getToken().then(function(b){if(!b)throw a.a.create(l.I);var c=a.f;return I(c,b).then(function(b){if(!b)throw a.a.create(l.F); | ||
@@ -28,3 +28,3 @@ return N.registration.pushManager.subscribe(r).then(function(a){return K(b.ea,a,b.da)}).catch(function(d){return c.deleteToken(b.fa).then(function(){throw a.a.create(l.T,{message:d});})})})});b.waitUntil(c)},R=function(a,b){if(b.notification&&b.notification.data&&b.notification.data.FCM_MSG){b.stopImmediatePropagation();b.notification.close();var c=b.notification.data.FCM_MSG,d=c.notification.click_action;if(d){var f=V(d).then(function(a){return a?a:N.clients.openWindow(d)}).then(function(b){if(b)return delete c.notification, | ||
var V=function(a){var b=(new URL(a)).href;return N.clients.matchAll({type:"window",includeUncontrolled:!0}).then(function(a){for(var c=null,f=0;f<a.length;f++)if((new URL(a[f].url)).href===b){c=a[f];break}if(c)return c.focus(),c})},W=function(a,b,c){return new Promise(function(d,f){if(!b)return f(a.a.create(l.K));b.postMessage(c);d()})},T=function(){return N.clients.matchAll({type:"window",includeUncontrolled:!0}).then(function(a){return a.some(function(a){return"visible"===a.visibilityState})})}, | ||
U=function(a,b){return N.clients.matchAll({type:"window",includeUncontrolled:!0}).then(function(c){var d=w(u.N,b);return Promise.all(c.map(function(b){return W(a,b,d)}))})};S.prototype.i=function(){return Promise.resolve(N.registration)};var Y=function(a){var b=this;M.call(this,a);this.Y=null;this.$=firebase.INTERNAL.createSubscribe(function(a){b.Y=a});this.ba=null;this.aa=firebase.INTERNAL.createSubscribe(function(a){b.ba=a});X(this)};e(Y,M); | ||
U=function(a,b){return N.clients.matchAll({type:"window",includeUncontrolled:!0}).then(function(c){var d=w(u.N,b);return Promise.all(c.map(function(b){return W(a,b,d)}))})};S.prototype.i=function(){return Promise.resolve(N.registration)};var Y=function(a){M.call(this,a);var b=this;this.Y=null;this.$=firebase.INTERNAL.createSubscribe(function(a){b.Y=a});this.ba=null;this.aa=firebase.INTERNAL.createSubscribe(function(a){b.ba=a});X(this)};e(Y,M); | ||
Y.prototype.getToken=function(){var a=this;return"serviceWorker"in navigator&&"PushManager"in window&&"Notification"in window&&ServiceWorkerRegistration.prototype.hasOwnProperty("showNotification")&&PushSubscription.prototype.hasOwnProperty("getKey")?aa(this).then(function(){return M.prototype.getToken.call(a)}):Promise.reject(this.a.create(l.U))};Y.prototype.getToken=Y.prototype.getToken; | ||
@@ -36,2 +36,2 @@ var aa=function(a){if(a.j)return a.j;var b=document.querySelector('link[rel="manifest"]');b?a.j=fetch(b.href).then(function(a){return a.json()}).catch(function(){return Promise.resolve()}).then(function(b){if(b&&b.gcm_sender_id&&"103953800507"!==b.gcm_sender_id)throw a.a.create(l.C);}):a.j=Promise.resolve();return a.j}; | ||
Y.prototype.i=function(){var a=this;if(this.b)return Z(this,this.b);this.b=null;return navigator.serviceWorker.register("/firebase-messaging-sw.js",{scope:"/firebase-cloud-messaging-push-scope"}).catch(function(b){throw a.a.create(l.w,{browserErrorMessage:b.message});}).then(function(b){return Z(a,b).then(function(){a.b=b;b.update();return b})})}; | ||
var X=function(a){"serviceWorker"in navigator&&navigator.serviceWorker.addEventListener("message",function(b){if(b.data&&b.data[t.m])switch(b=b.data,b[t.m]){case u.N:case u.H:a.Y.next(b[t.u])}},!1)};if(!(firebase&&firebase.INTERNAL&&firebase.INTERNAL.registerService))throw Error("Cannot install Firebase Messaging - be sure to load firebase-app.js first.");firebase.INTERNAL.registerService("messaging",function(a){return self&&"ServiceWorkerGlobalScope"in self?new S(a):new Y(a)},{Messaging:Y});})(); | ||
var X=function(a){"serviceWorker"in navigator&&navigator.serviceWorker.addEventListener("message",function(b){if(b.data&&b.data[t.m])switch(b=b.data,b[t.m]){case u.N:case u.H:a.Y.next(b[t.u])}},!1)};if(!(firebase&&firebase.INTERNAL&&firebase.INTERNAL.registerService))throw Error("Cannot install Firebase Messaging - be sure to load firebase-app.js first.");firebase.INTERNAL.registerService("messaging",function(a){return self&&"ServiceWorkerGlobalScope"in self?new S(a):new Y(a)},{Messaging:Y});}).call(this); |
@@ -23,3 +23,4 @@ /** | ||
require('./auth-node'); | ||
require('./server-auth-node'); | ||
require('./database-node'); | ||
module.exports = firebase; |
@@ -1,5 +0,5 @@ | ||
/*! @license Firebase v3.6.1 | ||
Build: 3.6.1-rc.3 | ||
/*! @license Firebase v3.6.2 | ||
Build: 3.6.2-rc.2 | ||
Terms: https://firebase.google.com/terms/ */ | ||
(function() {var k,l=this,n=function(a){return void 0!==a},aa=function(a){var b=typeof a;if("object"==b)if(a){if(a instanceof Array)return"array";if(a instanceof Object)return b;var c=Object.prototype.toString.call(a);if("[object Window]"==c)return"object";if("[object Array]"==c||"number"==typeof a.length&&"undefined"!=typeof a.splice&&"undefined"!=typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable("splice"))return"array";if("[object Function]"==c||"undefined"!=typeof a.call&&"undefined"!=typeof a.propertyIsEnumerable&& | ||
(function(){var k,l=this,n=function(a){return void 0!==a},aa=function(a){var b=typeof a;if("object"==b)if(a){if(a instanceof Array)return"array";if(a instanceof Object)return b;var c=Object.prototype.toString.call(a);if("[object Window]"==c)return"object";if("[object Array]"==c||"number"==typeof a.length&&"undefined"!=typeof a.splice&&"undefined"!=typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable("splice"))return"array";if("[object Function]"==c||"undefined"!=typeof a.call&&"undefined"!=typeof a.propertyIsEnumerable&& | ||
!a.propertyIsEnumerable("call"))return"function"}else return"null";else if("function"==b&&"undefined"==typeof a.call)return"object";return b},p=function(a){return"string"==typeof a},ba=function(a,b){function c(){}c.prototype=b.prototype;a.sa=b.prototype;a.prototype=new c;a.ra=function(a,c,f){for(var d=Array(arguments.length-2),e=2;e<arguments.length;e++)d[e-2]=arguments[e];return b.prototype[c].apply(a,d)}};var ca=function(a,b,c){function d(){z||(z=!0,b.apply(null,arguments))}function e(b){m=setTimeout(function(){m=null;a(f,2===C)},b)}function f(a,b){if(!z)if(a)d.apply(null,arguments);else if(2===C||B)d.apply(null,arguments);else{64>h&&(h*=2);var c;1===C?(C=2,c=0):c=1E3*(h+Math.random());e(c)}}function g(a){Na||(Na=!0,z||(null!==m?(a||(C=2),clearTimeout(m),e(0)):a||(C=1)))}var h=1,m=null,B=!1,C=0,z=!1,Na=!1;e(0);setTimeout(function(){B=!0;g(!0)},c);return g};var q="https://firebasestorage.googleapis.com";var r=function(a,b){this.code="storage/"+a;this.message="Firebase Storage: "+b;this.serverResponse=null;this.name="FirebaseError"};ba(r,Error); | ||
@@ -49,2 +49,2 @@ var da=function(){return new r("unknown","An unknown error occurred, please check the error payload for server response.")},ea=function(){return new r("canceled","User canceled the upload/download.")},fa=function(){return new r("cannot-slice-blob","Cannot slice blob for upload. Please retry the upload.")},ga=function(a,b,c){return new r("invalid-argument","Invalid argument in `"+b+"` at index "+a+": "+c)},ha=function(){return new r("app-deleted","The Firebase app was deleted.")},t=function(a,b){return new r("invalid-format", | ||
T.prototype.on=T.prototype.M;T.prototype.resume=T.prototype.O;T.prototype.pause=T.prototype.N;T.prototype.cancel=T.prototype.cancel;Z(T.prototype,"snapshot",T.prototype.w);Z(E.prototype,"bytesTransferred",E.prototype.V);Z(E.prototype,"totalBytes",E.prototype.qa);Z(E.prototype,"state",E.prototype.na);Z(E.prototype,"metadata",E.prototype.ia);Z(E.prototype,"downloadURL",E.prototype.W);Z(E.prototype,"task",E.prototype.pa);Z(E.prototype,"ref",E.prototype.la);ma.STATE_CHANGED="state_changed"; | ||
v.RUNNING="running";v.PAUSED="paused";v.SUCCESS="success";v.CANCELED="canceled";v.ERROR="error";A.RAW="raw";A.BASE64="base64";A.BASE64URL="base64url";A.DATA_URL="data_url";(function(){function a(a){return new Y(a)}var b={TaskState:v,TaskEvent:ma,StringFormat:A,Storage:Y,Reference:W};if("undefined"!==typeof firebase)firebase.INTERNAL.registerService("storage",a,b);else throw Error("Cannot install Firebase Storage - be sure to load firebase-app.js first.");})();})(); | ||
v.RUNNING="running";v.PAUSED="paused";v.SUCCESS="success";v.CANCELED="canceled";v.ERROR="error";A.RAW="raw";A.BASE64="base64";A.BASE64URL="base64url";A.DATA_URL="data_url";(function(){function a(a){return new Y(a)}var b={TaskState:v,TaskEvent:ma,StringFormat:A,Storage:Y,Reference:W};if("undefined"!==typeof firebase)firebase.INTERNAL.registerService("storage",a,b);else throw Error("Cannot install Firebase Storage - be sure to load firebase-app.js first.");})();}).call(this); |
@@ -1,3 +0,3 @@ | ||
/*! @license Firebase v3.6.1 | ||
Build: 3.6.1-rc.3 | ||
/*! @license Firebase v3.6.2 | ||
Build: 3.6.2-rc.2 | ||
Terms: https://firebase.google.com/terms/ */ | ||
@@ -4,0 +4,0 @@ declare namespace firebase { |
var firebase = require('./app'); | ||
/*! @license Firebase v3.6.1 | ||
Build: 3.6.1-rc.3 | ||
/*! @license Firebase v3.6.2 | ||
Build: 3.6.2-rc.2 | ||
Terms: https://firebase.google.com/terms/ */ | ||
(function() {var e=function(a,b){function c(){}c.prototype=b.prototype;a.prototype=new c;for(var d in b)if(Object.defineProperties){var f=Object.getOwnPropertyDescriptor(b,d);f&&Object.defineProperty(a,d,f)}else a[d]=b[d]},g=this,h=function(a){var b=typeof a;if("object"==b)if(a){if(a instanceof Array)return"array";if(a instanceof Object)return b;var c=Object.prototype.toString.call(a);if("[object Window]"==c)return"object";if("[object Array]"==c||"number"==typeof a.length&&"undefined"!=typeof a.splice&&"undefined"!= | ||
(function(){var e=function(a,b){function c(){}c.prototype=b.prototype;a.prototype=new c;for(var d in b)if(Object.defineProperties){var f=Object.getOwnPropertyDescriptor(b,d);f&&Object.defineProperty(a,d,f)}else a[d]=b[d]},g=this,h=function(a){var b=typeof a;if("object"==b)if(a){if(a instanceof Array)return"array";if(a instanceof Object)return b;var c=Object.prototype.toString.call(a);if("[object Window]"==c)return"object";if("[object Array]"==c||"number"==typeof a.length&&"undefined"!=typeof a.splice&&"undefined"!= | ||
typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable("splice"))return"array";if("[object Function]"==c||"undefined"!=typeof a.call&&"undefined"!=typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable("call"))return"function"}else return"null";else if("function"==b&&"undefined"==typeof a.call)return"object";return b},k=function(a,b){function c(){}c.prototype=b.prototype;a.ga=b.prototype;a.prototype=new c;a.ca=function(a,c,p){for(var d=Array(arguments.length-2),f=2;f<arguments.length;f++)d[f-2]=arguments[f]; | ||
@@ -23,3 +23,3 @@ return b.prototype[c].apply(a,d)}};var l={c:"only-available-in-window",o:"only-available-in-sw",O:"should-be-overriden",g:"bad-sender-id",C:"incorrect-gcm-sender-id",M:"permission-default",L:"permission-blocked",U:"unsupported-browser",G:"notifications-blocked",w:"failed-serviceworker-registration",h:"sw-registration-expected",B:"get-subscription-failed",F:"invalid-saved-token",l:"sw-reg-redundant",P:"token-subscribe-failed",S:"token-subscribe-no-token",R:"token-subscribe-no-push-set",V:"use-sw-before-get-token",D:"invalid-delete-token", | ||
M.prototype.deleteToken=M.prototype.deleteToken;M.prototype.i=function(){throw this.a.create(l.O);};M.prototype.requestPermission=function(){throw this.a.create(l.c);};M.prototype.useServiceWorker=function(){throw this.a.create(l.c);};M.prototype.useServiceWorker=M.prototype.useServiceWorker;M.prototype.onMessage=function(){throw this.a.create(l.c);};M.prototype.onMessage=M.prototype.onMessage;M.prototype.onTokenRefresh=function(){throw this.a.create(l.c);};M.prototype.onTokenRefresh=M.prototype.onTokenRefresh; | ||
M.prototype.setBackgroundMessageHandler=function(){throw this.a.create(l.o);};M.prototype.setBackgroundMessageHandler=M.prototype.setBackgroundMessageHandler;M.prototype.delete=function(){H(this.f)};var N=self,S=function(a){var b=this;M.call(this,a);this.a=new firebase.INTERNAL.ErrorFactory("messaging","Messaging",q);N.addEventListener("push",function(a){return O(b,a)},!1);N.addEventListener("pushsubscriptionchange",function(a){return Q(b,a)},!1);N.addEventListener("notificationclick",function(a){return R(b,a)},!1);this.b=null};e(S,M); | ||
M.prototype.setBackgroundMessageHandler=function(){throw this.a.create(l.o);};M.prototype.setBackgroundMessageHandler=M.prototype.setBackgroundMessageHandler;M.prototype.delete=function(){H(this.f)};var N=self,S=function(a){M.call(this,a);var b=this;this.a=new firebase.INTERNAL.ErrorFactory("messaging","Messaging",q);N.addEventListener("push",function(a){return O(b,a)},!1);N.addEventListener("pushsubscriptionchange",function(a){return Q(b,a)},!1);N.addEventListener("notificationclick",function(a){return R(b,a)},!1);this.b=null};e(S,M); | ||
var O=function(a,b){var c;try{c=b.data.json()}catch(f){return}var d=T().then(function(b){if(b){if(c.notification||a.b)return U(a,c)}else{if((b=c)&&"object"===typeof b.notification){var d=Object.assign({},b.notification),f={};d.data=(f.FCM_MSG=b,f);b=d}else b=void 0;if(b)return N.registration.showNotification(b.title||"",b);if(a.b)return a.b(c)}});b.waitUntil(d)},Q=function(a,b){var c=a.getToken().then(function(b){if(!b)throw a.a.create(l.I);var c=a.f;return I(c,b).then(function(b){if(!b)throw a.a.create(l.F); | ||
@@ -29,3 +29,3 @@ return N.registration.pushManager.subscribe(r).then(function(a){return K(b.ea,a,b.da)}).catch(function(d){return c.deleteToken(b.fa).then(function(){throw a.a.create(l.T,{message:d});})})})});b.waitUntil(c)},R=function(a,b){if(b.notification&&b.notification.data&&b.notification.data.FCM_MSG){b.stopImmediatePropagation();b.notification.close();var c=b.notification.data.FCM_MSG,d=c.notification.click_action;if(d){var f=V(d).then(function(a){return a?a:N.clients.openWindow(d)}).then(function(b){if(b)return delete c.notification, | ||
var V=function(a){var b=(new URL(a)).href;return N.clients.matchAll({type:"window",includeUncontrolled:!0}).then(function(a){for(var c=null,f=0;f<a.length;f++)if((new URL(a[f].url)).href===b){c=a[f];break}if(c)return c.focus(),c})},W=function(a,b,c){return new Promise(function(d,f){if(!b)return f(a.a.create(l.K));b.postMessage(c);d()})},T=function(){return N.clients.matchAll({type:"window",includeUncontrolled:!0}).then(function(a){return a.some(function(a){return"visible"===a.visibilityState})})}, | ||
U=function(a,b){return N.clients.matchAll({type:"window",includeUncontrolled:!0}).then(function(c){var d=w(u.N,b);return Promise.all(c.map(function(b){return W(a,b,d)}))})};S.prototype.i=function(){return Promise.resolve(N.registration)};var Y=function(a){var b=this;M.call(this,a);this.Y=null;this.$=firebase.INTERNAL.createSubscribe(function(a){b.Y=a});this.ba=null;this.aa=firebase.INTERNAL.createSubscribe(function(a){b.ba=a});X(this)};e(Y,M); | ||
U=function(a,b){return N.clients.matchAll({type:"window",includeUncontrolled:!0}).then(function(c){var d=w(u.N,b);return Promise.all(c.map(function(b){return W(a,b,d)}))})};S.prototype.i=function(){return Promise.resolve(N.registration)};var Y=function(a){M.call(this,a);var b=this;this.Y=null;this.$=firebase.INTERNAL.createSubscribe(function(a){b.Y=a});this.ba=null;this.aa=firebase.INTERNAL.createSubscribe(function(a){b.ba=a});X(this)};e(Y,M); | ||
Y.prototype.getToken=function(){var a=this;return"serviceWorker"in navigator&&"PushManager"in window&&"Notification"in window&&ServiceWorkerRegistration.prototype.hasOwnProperty("showNotification")&&PushSubscription.prototype.hasOwnProperty("getKey")?aa(this).then(function(){return M.prototype.getToken.call(a)}):Promise.reject(this.a.create(l.U))};Y.prototype.getToken=Y.prototype.getToken; | ||
@@ -37,3 +37,3 @@ var aa=function(a){if(a.j)return a.j;var b=document.querySelector('link[rel="manifest"]');b?a.j=fetch(b.href).then(function(a){return a.json()}).catch(function(){return Promise.resolve()}).then(function(b){if(b&&b.gcm_sender_id&&"103953800507"!==b.gcm_sender_id)throw a.a.create(l.C);}):a.j=Promise.resolve();return a.j}; | ||
Y.prototype.i=function(){var a=this;if(this.b)return Z(this,this.b);this.b=null;return navigator.serviceWorker.register("/firebase-messaging-sw.js",{scope:"/firebase-cloud-messaging-push-scope"}).catch(function(b){throw a.a.create(l.w,{browserErrorMessage:b.message});}).then(function(b){return Z(a,b).then(function(){a.b=b;b.update();return b})})}; | ||
var X=function(a){"serviceWorker"in navigator&&navigator.serviceWorker.addEventListener("message",function(b){if(b.data&&b.data[t.m])switch(b=b.data,b[t.m]){case u.N:case u.H:a.Y.next(b[t.u])}},!1)};if(!(firebase&&firebase.INTERNAL&&firebase.INTERNAL.registerService))throw Error("Cannot install Firebase Messaging - be sure to load firebase-app.js first.");firebase.INTERNAL.registerService("messaging",function(a){return self&&"ServiceWorkerGlobalScope"in self?new S(a):new Y(a)},{Messaging:Y});})(); | ||
var X=function(a){"serviceWorker"in navigator&&navigator.serviceWorker.addEventListener("message",function(b){if(b.data&&b.data[t.m])switch(b=b.data,b[t.m]){case u.N:case u.H:a.Y.next(b[t.u])}},!1)};if(!(firebase&&firebase.INTERNAL&&firebase.INTERNAL.registerService))throw Error("Cannot install Firebase Messaging - be sure to load firebase-app.js first.");firebase.INTERNAL.registerService("messaging",function(a){return self&&"ServiceWorkerGlobalScope"in self?new S(a):new Y(a)},{Messaging:Y});}).call(this); | ||
module.exports = firebase.messaging; |
{ | ||
"name": "firebase", | ||
"version": "3.6.1", | ||
"version": "3.6.2", | ||
"dependencies": { | ||
"base64-url": { | ||
"version": "1.3.3", | ||
"from": "base64-url@>=1.2.1 <2.0.0", | ||
"resolved": "https://registry.npmjs.org/base64-url/-/base64-url-1.3.3.tgz" | ||
}, | ||
"base64url": { | ||
"version": "2.0.0", | ||
"from": "base64url@>=2.0.0 <3.0.0", | ||
"resolved": "https://registry.npmjs.org/base64url/-/base64url-2.0.0.tgz" | ||
}, | ||
"buffer-equal-constant-time": { | ||
"version": "1.0.1", | ||
"from": "buffer-equal-constant-time@1.0.1", | ||
"resolved": "https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz" | ||
}, | ||
"dom-storage": { | ||
@@ -10,185 +25,82 @@ "version": "2.0.2", | ||
}, | ||
"ecdsa-sig-formatter": { | ||
"version": "1.0.7", | ||
"from": "ecdsa-sig-formatter@1.0.7", | ||
"resolved": "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.7.tgz" | ||
}, | ||
"faye-websocket": { | ||
"version": "0.9.3", | ||
"from": "https://registry.npmjs.org/faye-websocket/-/faye-websocket-0.9.3.tgz", | ||
"resolved": "https://registry.npmjs.org/faye-websocket/-/faye-websocket-0.9.3.tgz", | ||
"dependencies": { | ||
"websocket-driver": { | ||
"version": "0.6.4", | ||
"from": "https://registry.npmjs.org/websocket-driver/-/websocket-driver-0.6.4.tgz", | ||
"resolved": "https://registry.npmjs.org/websocket-driver/-/websocket-driver-0.6.4.tgz", | ||
"dependencies": { | ||
"websocket-extensions": { | ||
"version": "0.1.1", | ||
"from": "https://registry.npmjs.org/websocket-extensions/-/websocket-extensions-0.1.1.tgz", | ||
"resolved": "https://registry.npmjs.org/websocket-extensions/-/websocket-extensions-0.1.1.tgz" | ||
} | ||
} | ||
} | ||
} | ||
"from": "faye-websocket@0.9.3", | ||
"resolved": "https://registry.npmjs.org/faye-websocket/-/faye-websocket-0.9.3.tgz" | ||
}, | ||
"hoek": { | ||
"version": "2.16.3", | ||
"from": "hoek@>=2.0.0 <3.0.0", | ||
"resolved": "https://registry.npmjs.org/hoek/-/hoek-2.16.3.tgz" | ||
}, | ||
"isemail": { | ||
"version": "1.2.0", | ||
"from": "isemail@>=1.0.0 <2.0.0", | ||
"resolved": "https://registry.npmjs.org/isemail/-/isemail-1.2.0.tgz" | ||
}, | ||
"joi": { | ||
"version": "6.10.1", | ||
"from": "joi@>=6.10.1 <7.0.0", | ||
"resolved": "https://registry.npmjs.org/joi/-/joi-6.10.1.tgz" | ||
}, | ||
"jsonwebtoken": { | ||
"version": "5.7.0", | ||
"from": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-5.7.0.tgz", | ||
"resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-5.7.0.tgz", | ||
"dependencies": { | ||
"jws": { | ||
"version": "3.1.3", | ||
"from": "https://registry.npmjs.org/jws/-/jws-3.1.3.tgz", | ||
"resolved": "https://registry.npmjs.org/jws/-/jws-3.1.3.tgz", | ||
"dependencies": { | ||
"base64url": { | ||
"version": "1.0.6", | ||
"from": "https://registry.npmjs.org/base64url/-/base64url-1.0.6.tgz", | ||
"resolved": "https://registry.npmjs.org/base64url/-/base64url-1.0.6.tgz", | ||
"dependencies": { | ||
"concat-stream": { | ||
"version": "1.4.10", | ||
"from": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.4.10.tgz", | ||
"resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.4.10.tgz", | ||
"dependencies": { | ||
"inherits": { | ||
"version": "2.0.1", | ||
"from": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz", | ||
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz" | ||
}, | ||
"typedarray": { | ||
"version": "0.0.6", | ||
"from": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", | ||
"resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz" | ||
}, | ||
"readable-stream": { | ||
"version": "1.1.14", | ||
"from": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", | ||
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", | ||
"dependencies": { | ||
"core-util-is": { | ||
"version": "1.0.2", | ||
"from": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", | ||
"resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz" | ||
}, | ||
"isarray": { | ||
"version": "0.0.1", | ||
"from": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", | ||
"resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz" | ||
}, | ||
"string_decoder": { | ||
"version": "0.10.31", | ||
"from": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", | ||
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz" | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"meow": { | ||
"version": "2.0.0", | ||
"from": "https://registry.npmjs.org/meow/-/meow-2.0.0.tgz", | ||
"resolved": "https://registry.npmjs.org/meow/-/meow-2.0.0.tgz", | ||
"dependencies": { | ||
"camelcase-keys": { | ||
"version": "1.0.0", | ||
"from": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-1.0.0.tgz", | ||
"resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-1.0.0.tgz", | ||
"dependencies": { | ||
"camelcase": { | ||
"version": "1.2.1", | ||
"from": "https://registry.npmjs.org/camelcase/-/camelcase-1.2.1.tgz", | ||
"resolved": "https://registry.npmjs.org/camelcase/-/camelcase-1.2.1.tgz" | ||
}, | ||
"map-obj": { | ||
"version": "1.0.1", | ||
"from": "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz", | ||
"resolved": "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz" | ||
} | ||
} | ||
}, | ||
"indent-string": { | ||
"version": "1.2.2", | ||
"from": "https://registry.npmjs.org/indent-string/-/indent-string-1.2.2.tgz", | ||
"resolved": "https://registry.npmjs.org/indent-string/-/indent-string-1.2.2.tgz", | ||
"dependencies": { | ||
"get-stdin": { | ||
"version": "4.0.1", | ||
"from": "https://registry.npmjs.org/get-stdin/-/get-stdin-4.0.1.tgz", | ||
"resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-4.0.1.tgz" | ||
}, | ||
"repeating": { | ||
"version": "1.1.3", | ||
"from": "https://registry.npmjs.org/repeating/-/repeating-1.1.3.tgz", | ||
"resolved": "https://registry.npmjs.org/repeating/-/repeating-1.1.3.tgz", | ||
"dependencies": { | ||
"is-finite": { | ||
"version": "1.0.1", | ||
"from": "https://registry.npmjs.org/is-finite/-/is-finite-1.0.1.tgz", | ||
"resolved": "https://registry.npmjs.org/is-finite/-/is-finite-1.0.1.tgz", | ||
"dependencies": { | ||
"number-is-nan": { | ||
"version": "1.0.0", | ||
"from": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.0.tgz", | ||
"resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.0.tgz" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"minimist": { | ||
"version": "1.2.0", | ||
"from": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", | ||
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz" | ||
}, | ||
"object-assign": { | ||
"version": "1.0.0", | ||
"from": "https://registry.npmjs.org/object-assign/-/object-assign-1.0.0.tgz", | ||
"resolved": "https://registry.npmjs.org/object-assign/-/object-assign-1.0.0.tgz" | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"jwa": { | ||
"version": "1.1.3", | ||
"from": "https://registry.npmjs.org/jwa/-/jwa-1.1.3.tgz", | ||
"resolved": "https://registry.npmjs.org/jwa/-/jwa-1.1.3.tgz", | ||
"dependencies": { | ||
"buffer-equal-constant-time": { | ||
"version": "1.0.1", | ||
"from": "https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz", | ||
"resolved": "https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz" | ||
}, | ||
"ecdsa-sig-formatter": { | ||
"version": "1.0.5", | ||
"from": "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.5.tgz", | ||
"resolved": "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.5.tgz", | ||
"dependencies": { | ||
"base64-url": { | ||
"version": "1.2.2", | ||
"from": "https://registry.npmjs.org/base64-url/-/base64-url-1.2.2.tgz", | ||
"resolved": "https://registry.npmjs.org/base64-url/-/base64-url-1.2.2.tgz" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"ms": { | ||
"version": "0.7.1", | ||
"from": "https://registry.npmjs.org/ms/-/ms-0.7.1.tgz", | ||
"resolved": "https://registry.npmjs.org/ms/-/ms-0.7.1.tgz" | ||
}, | ||
"xtend": { | ||
"version": "4.0.1", | ||
"from": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz", | ||
"resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz" | ||
} | ||
} | ||
"version": "7.1.9", | ||
"from": "jsonwebtoken@7.1.9", | ||
"resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-7.1.9.tgz" | ||
}, | ||
"jwa": { | ||
"version": "1.1.4", | ||
"from": "jwa@>=1.1.4 <2.0.0", | ||
"resolved": "https://registry.npmjs.org/jwa/-/jwa-1.1.4.tgz" | ||
}, | ||
"jws": { | ||
"version": "3.1.4", | ||
"from": "jws@>=3.1.3 <4.0.0", | ||
"resolved": "https://registry.npmjs.org/jws/-/jws-3.1.4.tgz" | ||
}, | ||
"lodash.once": { | ||
"version": "4.1.1", | ||
"from": "lodash.once@>=4.0.0 <5.0.0", | ||
"resolved": "https://registry.npmjs.org/lodash.once/-/lodash.once-4.1.1.tgz" | ||
}, | ||
"moment": { | ||
"version": "2.16.0", | ||
"from": "moment@>=2.0.0 <3.0.0", | ||
"resolved": "https://registry.npmjs.org/moment/-/moment-2.16.0.tgz" | ||
}, | ||
"ms": { | ||
"version": "0.7.2", | ||
"from": "ms@>=0.7.1 <0.8.0", | ||
"resolved": "https://registry.npmjs.org/ms/-/ms-0.7.2.tgz" | ||
}, | ||
"rsvp": { | ||
"version": "3.2.1", | ||
"from": "https://registry.npmjs.org/rsvp/-/rsvp-3.2.1.tgz", | ||
"from": "rsvp@3.2.1", | ||
"resolved": "https://registry.npmjs.org/rsvp/-/rsvp-3.2.1.tgz" | ||
}, | ||
"safe-buffer": { | ||
"version": "5.0.1", | ||
"from": "safe-buffer@>=5.0.1 <6.0.0", | ||
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.0.1.tgz" | ||
}, | ||
"topo": { | ||
"version": "1.1.0", | ||
"from": "topo@>=1.0.0 <2.0.0", | ||
"resolved": "https://registry.npmjs.org/topo/-/topo-1.1.0.tgz" | ||
}, | ||
"websocket-driver": { | ||
"version": "0.6.5", | ||
"from": "websocket-driver@>=0.5.1", | ||
"resolved": "https://registry.npmjs.org/websocket-driver/-/websocket-driver-0.6.5.tgz" | ||
}, | ||
"websocket-extensions": { | ||
"version": "0.1.1", | ||
"from": "websocket-extensions@>=0.1.1", | ||
"resolved": "https://registry.npmjs.org/websocket-extensions/-/websocket-extensions-0.1.1.tgz" | ||
}, | ||
"xmlhttprequest": { | ||
@@ -198,4 +110,10 @@ "version": "1.8.0", | ||
"resolved": "https://registry.npmjs.org/xmlhttprequest/-/xmlhttprequest-1.8.0.tgz" | ||
}, | ||
"xtend": { | ||
"version": "4.0.1", | ||
"from": "xtend@>=4.0.1 <5.0.0", | ||
"resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz" | ||
} | ||
} | ||
} | ||
{ | ||
"name": "firebase", | ||
"version": "3.6.1", | ||
"version": "3.6.2", | ||
"description": "Firebase JavaScript library for web and Node.js", | ||
@@ -20,3 +20,3 @@ "author": "Firebase <firebase-support@google.com> (https://firebase.google.com/)", | ||
"faye-websocket": "0.9.3", | ||
"jsonwebtoken": "5.7.0", | ||
"jsonwebtoken": "7.1.9", | ||
"rsvp": "3.2.1", | ||
@@ -23,0 +23,0 @@ "dom-storage": "2.0.2", |
@@ -26,2 +26,9 @@ # Firebase - App success made simple | ||
This SDK is intended for end-user client access from environments such as the | ||
Web, mobile Web (e.g. React Native, Ionic), Node.js desktop (e.g. Electron), or | ||
IoT devices running Node.js. If you are instead interested in using a Node.js | ||
SDK which grants you admin access from a privileged environment (like a server), | ||
you should use the | ||
[Firebase Admin Node.js SDK](https://firebase.google.com/docs/admin/setup/). | ||
## Get the code (browser) | ||
@@ -34,3 +41,3 @@ | ||
``` | ||
<script src="https://www.gstatic.com/firebasejs/3.6.1/firebase.js"></script> | ||
<script src="https://www.gstatic.com/firebasejs/3.6.2/firebase.js"></script> | ||
@@ -94,7 +101,7 @@ <script> | ||
``` | ||
<script src="https://www.gstatic.com/firebasejs/3.6.1/firebase-app.js"></script> | ||
<script src="https://www.gstatic.com/firebasejs/3.6.1/firebase-auth.js"></script> | ||
<script src="https://www.gstatic.com/firebasejs/3.6.1/firebase-database.js"></script> | ||
<script src="https://www.gstatic.com/firebasejs/3.6.1/firebase-storage.js"></script> | ||
<script src="https://www.gstatic.com/firebasejs/3.6.1/firebase-messaging.js"></script> | ||
<script src="https://www.gstatic.com/firebasejs/3.6.2/firebase-app.js"></script> | ||
<script src="https://www.gstatic.com/firebasejs/3.6.2/firebase-auth.js"></script> | ||
<script src="https://www.gstatic.com/firebasejs/3.6.2/firebase-database.js"></script> | ||
<script src="https://www.gstatic.com/firebasejs/3.6.2/firebase-storage.js"></script> | ||
<script src="https://www.gstatic.com/firebasejs/3.6.2/firebase-messaging.js"></script> | ||
@@ -101,0 +108,0 @@ <script> |
var firebase = require('./app'); | ||
/*! @license Firebase v3.6.1 | ||
Build: 3.6.1-rc.3 | ||
/*! @license Firebase v3.6.2 | ||
Build: 3.6.2-rc.2 | ||
Terms: https://firebase.google.com/terms/ */ | ||
(function() {var k,l=this,n=function(a){return void 0!==a},aa=function(a){var b=typeof a;if("object"==b)if(a){if(a instanceof Array)return"array";if(a instanceof Object)return b;var c=Object.prototype.toString.call(a);if("[object Window]"==c)return"object";if("[object Array]"==c||"number"==typeof a.length&&"undefined"!=typeof a.splice&&"undefined"!=typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable("splice"))return"array";if("[object Function]"==c||"undefined"!=typeof a.call&&"undefined"!=typeof a.propertyIsEnumerable&& | ||
(function(){var k,l=this,n=function(a){return void 0!==a},aa=function(a){var b=typeof a;if("object"==b)if(a){if(a instanceof Array)return"array";if(a instanceof Object)return b;var c=Object.prototype.toString.call(a);if("[object Window]"==c)return"object";if("[object Array]"==c||"number"==typeof a.length&&"undefined"!=typeof a.splice&&"undefined"!=typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable("splice"))return"array";if("[object Function]"==c||"undefined"!=typeof a.call&&"undefined"!=typeof a.propertyIsEnumerable&& | ||
!a.propertyIsEnumerable("call"))return"function"}else return"null";else if("function"==b&&"undefined"==typeof a.call)return"object";return b},p=function(a){return"string"==typeof a},ba=function(a,b){function c(){}c.prototype=b.prototype;a.sa=b.prototype;a.prototype=new c;a.ra=function(a,c,f){for(var d=Array(arguments.length-2),e=2;e<arguments.length;e++)d[e-2]=arguments[e];return b.prototype[c].apply(a,d)}};var ca=function(a,b,c){function d(){z||(z=!0,b.apply(null,arguments))}function e(b){m=setTimeout(function(){m=null;a(f,2===C)},b)}function f(a,b){if(!z)if(a)d.apply(null,arguments);else if(2===C||B)d.apply(null,arguments);else{64>h&&(h*=2);var c;1===C?(C=2,c=0):c=1E3*(h+Math.random());e(c)}}function g(a){Na||(Na=!0,z||(null!==m?(a||(C=2),clearTimeout(m),e(0)):a||(C=1)))}var h=1,m=null,B=!1,C=0,z=!1,Na=!1;e(0);setTimeout(function(){B=!0;g(!0)},c);return g};var q="https://firebasestorage.googleapis.com";var r=function(a,b){this.code="storage/"+a;this.message="Firebase Storage: "+b;this.serverResponse=null;this.name="FirebaseError"};ba(r,Error); | ||
@@ -50,3 +50,3 @@ var da=function(){return new r("unknown","An unknown error occurred, please check the error payload for server response.")},ea=function(){return new r("canceled","User canceled the upload/download.")},fa=function(){return new r("cannot-slice-blob","Cannot slice blob for upload. Please retry the upload.")},ga=function(a,b,c){return new r("invalid-argument","Invalid argument in `"+b+"` at index "+a+": "+c)},ha=function(){return new r("app-deleted","The Firebase app was deleted.")},t=function(a,b){return new r("invalid-format", | ||
T.prototype.on=T.prototype.M;T.prototype.resume=T.prototype.O;T.prototype.pause=T.prototype.N;T.prototype.cancel=T.prototype.cancel;Z(T.prototype,"snapshot",T.prototype.w);Z(E.prototype,"bytesTransferred",E.prototype.V);Z(E.prototype,"totalBytes",E.prototype.qa);Z(E.prototype,"state",E.prototype.na);Z(E.prototype,"metadata",E.prototype.ia);Z(E.prototype,"downloadURL",E.prototype.W);Z(E.prototype,"task",E.prototype.pa);Z(E.prototype,"ref",E.prototype.la);ma.STATE_CHANGED="state_changed"; | ||
v.RUNNING="running";v.PAUSED="paused";v.SUCCESS="success";v.CANCELED="canceled";v.ERROR="error";A.RAW="raw";A.BASE64="base64";A.BASE64URL="base64url";A.DATA_URL="data_url";(function(){function a(a){return new Y(a)}var b={TaskState:v,TaskEvent:ma,StringFormat:A,Storage:Y,Reference:W};if("undefined"!==typeof firebase)firebase.INTERNAL.registerService("storage",a,b);else throw Error("Cannot install Firebase Storage - be sure to load firebase-app.js first.");})();})(); | ||
v.RUNNING="running";v.PAUSED="paused";v.SUCCESS="success";v.CANCELED="canceled";v.ERROR="error";A.RAW="raw";A.BASE64="base64";A.BASE64URL="base64url";A.DATA_URL="data_url";(function(){function a(a){return new Y(a)}var b={TaskState:v,TaskEvent:ma,StringFormat:A,Storage:Y,Reference:W};if("undefined"!==typeof firebase)firebase.INTERNAL.registerService("storage",a,b);else throw Error("Cannot install Firebase Storage - be sure to load firebase-app.js first.");})();}).call(this); | ||
module.exports = firebase.storage; |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
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
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
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
1322300
33
10426
187
7
+ Addedhoek@2.16.3(transitive)
+ Addedisemail@1.2.0(transitive)
+ Addedjoi@6.10.1(transitive)
+ Addedjsonwebtoken@7.1.9(transitive)
+ Addedlodash.once@4.1.1(transitive)
+ Addedmoment@2.30.1(transitive)
+ Addedtopo@1.1.0(transitive)
- Removedjsonwebtoken@5.7.0(transitive)
Updatedjsonwebtoken@7.1.9