Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: firebase/firebase-js-sdk
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: main
Choose a base ref
...
head repository: GitLiveApp/firebase-js-sdk
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Can’t automatically merge. Don’t worry, you can still create the pull request.
  • 5 commits
  • 18 files changed
  • 1 contributor

Commits on Jun 14, 2019

  1. Verified

    This commit was signed with the committer’s verified signature.
    headius Charles Oliver Nutter
    Copy the full SHA
    5cc7363 View commit details
  2. update firestore version

    nbransby committed Jun 14, 2019
    Copy the full SHA
    dd4733b View commit details

Commits on Jul 15, 2019

  1. Copy the full SHA
    86f0ce2 View commit details
  2. merge

    nbransby committed Jul 15, 2019
    Copy the full SHA
    b086b2e View commit details

Commits on Aug 2, 2019

  1. yarn.lock

    nbransby committed Aug 2, 2019
    Copy the full SHA
    774807e View commit details
4 changes: 2 additions & 2 deletions packages/firestore/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@firebase/firestore",
"version": "1.4.4",
"version": "1.4.4-grpc-js",
"description": "",
"author": "Firebase <firebase-support@google.com> (https://firebase.google.com/)",
"scripts": {
@@ -33,7 +33,7 @@
"@firebase/webchannel-wrapper": "0.2.21",
"@grpc/proto-loader": "^0.5.0",
"@firebase/util": "0.2.21",
"grpc": "1.22.2",
"@grpc/grpc-js": "0.5.2",
"tslib": "1.10.0"
},
"peerDependencies": {
4 changes: 2 additions & 2 deletions packages/firestore/src/platform_node/grpc_connection.ts
Original file line number Diff line number Diff line change
@@ -15,13 +15,13 @@
* limitations under the License.
*/

import * as grpc from 'grpc';
import * as grpc from '@grpc/grpc-js';

import firebase from '@firebase/app';
const SDK_VERSION = firebase.SDK_VERSION;

// eslint-disable-next-line @typescript-eslint/no-require-imports
const grpcVersion = require('grpc/package.json').version;
const grpcVersion = require('@grpc/grpc-js/package.json').version;

import { Token } from '../api/credentials';
import { DatabaseInfo } from '../core/database_info';
2 changes: 1 addition & 1 deletion packages/firestore/src/platform_node/load_protos.ts
Original file line number Diff line number Diff line change
@@ -15,8 +15,8 @@
* limitations under the License.
*/

import * as grpc from '@grpc/grpc-js';
import * as protoLoader from '@grpc/proto-loader';
import * as grpc from 'grpc';
import * as path from 'path';
// eslint-disable-next-line import/no-extraneous-dependencies, only used in tests
import * as ProtobufJS from 'protobufjs';
36 changes: 36 additions & 0 deletions packages/rxfire/auth/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
/**
* @license
* Copyright 2018 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { auth, User } from 'firebase';
import { Observable } from 'rxjs';
/**
* Create an observable of authentication state. The observer is only
* triggered on sign-in or sign-out.
* @param auth firebase.auth.Auth
*/
export declare function authState(auth: auth.Auth): Observable<User>;
/**
* Create an observable of user state. The observer is triggered for sign-in,
* sign-out, and token refresh events
* @param auth firebase.auth.Auth
*/
export declare function user(auth: auth.Auth): Observable<User>;
/**
* Create an observable of idToken state. The observer is triggered for sign-in,
* sign-out, and token refresh events
* @param auth firebase.auth.Auth
*/
export declare function idToken(auth: auth.Auth): Observable<string | null>;
25 changes: 25 additions & 0 deletions packages/rxfire/database/fromRef.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/**
* @license
* Copyright 2018 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { database } from 'firebase';
import { Observable } from 'rxjs';
import { ListenEvent, QueryChange } from './interfaces';
/**
* Create an observable from a Database Reference or Database Query.
* @param ref Database Reference
* @param event Listen event type ('value', 'added', 'changed', 'removed', 'moved')
*/
export declare function fromRef(ref: database.Query, event: ListenEvent): Observable<QueryChange>;
20 changes: 20 additions & 0 deletions packages/rxfire/database/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/**
* @license
* Copyright 2018 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export * from './fromRef';
export * from './interfaces';
export * from './list';
export * from './object';
29 changes: 29 additions & 0 deletions packages/rxfire/database/interfaces.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
/**
* @license
* Copyright 2018 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { database } from 'firebase';
export declare enum ListenEvent {
added = "child_added",
removed = "child_removed",
changed = "child_changed",
moved = "child_moved",
value = "value"
}
export interface QueryChange {
snapshot: database.DataSnapshot;
prevKey: string | null | undefined;
event: ListenEvent;
}
20 changes: 20 additions & 0 deletions packages/rxfire/database/list/audit-trail.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/**
* @license
* Copyright 2018 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { database } from 'firebase';
import { Observable } from 'rxjs';
import { QueryChange, ListenEvent } from '../interfaces';
export declare function auditTrail(query: database.Query, events?: ListenEvent[]): Observable<QueryChange[]>;
27 changes: 27 additions & 0 deletions packages/rxfire/database/list/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
/**
* @license
* Copyright 2018 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { database } from 'firebase';
import { QueryChange, ListenEvent } from '../interfaces';
import { Observable } from 'rxjs';
export declare function stateChanges(query: database.Query, events?: ListenEvent[]): Observable<QueryChange>;
export declare function list(query: database.Query, events?: ListenEvent[]): Observable<QueryChange[]>;
/**
* Get an object mapped to its value, and optionally its key
* @param query object ref or query
* @param keyField map the object key to a specific field
*/
export declare function listVal<T>(query: database.Query, keyField?: string): Observable<T[]>;
31 changes: 31 additions & 0 deletions packages/rxfire/database/object/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
/**
* @license
* Copyright 2018 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { database } from 'firebase';
import { QueryChange } from '../interfaces';
import { Observable } from 'rxjs';
/**
* Get the snapshot changes of an object
* @param query
*/
export declare function object(query: database.Query): Observable<QueryChange>;
/**
* Get an array of object values, optionally with a mapped key
* @param query object ref or query
* @param keyField map the object key to a specific field
*/
export declare function objectVal<T>(query: database.Query, keyField?: string): Observable<T>;
export declare function changeToData(change: QueryChange, keyField?: string): any;
23 changes: 23 additions & 0 deletions packages/rxfire/database/utils.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
/**
* @license
* Copyright 2018 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { ListenEvent } from './interfaces';
/**
* Check the length of the provided array. If it is empty return an array
* that is populated with all the Realtime Database child events.
* @param events
*/
export declare function validateEventsArray(events?: ListenEvent[]): ListenEvent[];
44 changes: 44 additions & 0 deletions packages/rxfire/firestore/collection/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
/**
* @license
* Copyright 2018 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { firestore } from 'firebase/app';
import { Observable } from 'rxjs';
/**
* Return a stream of document changes on a query. These results are not in sort order but in
* order of occurence.
* @param query
*/
export declare function collectionChanges(query: firestore.Query, events?: firestore.DocumentChangeType[]): Observable<firestore.DocumentChange[]>;
/**
* Return a stream of document snapshots on a query. These results are in sort order.
* @param query
*/
export declare function collection(query: firestore.Query): Observable<firestore.QueryDocumentSnapshot[]>;
/**
* Return a stream of document changes on a query. These results are in sort order.
* @param query
*/
export declare function sortedChanges(query: firestore.Query, events?: firestore.DocumentChangeType[]): Observable<firestore.DocumentChange[]>;
/**
* Create a stream of changes as they occur it time. This method is similar
* to docChanges() but it collects each event in an array over time.
*/
export declare function auditTrail(query: firestore.Query, events?: firestore.DocumentChangeType[]): Observable<firestore.DocumentChange[]>;
/**
* Returns a stream of documents mapped to their data payload, and optionally the document ID
* @param query
*/
export declare function collectionData<T>(query: firestore.Query, idField?: string): Observable<T[]>;
25 changes: 25 additions & 0 deletions packages/rxfire/firestore/document/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/**
* @license
* Copyright 2018 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { firestore } from 'firebase/app';
import { Observable } from 'rxjs';
export declare function doc(ref: firestore.DocumentReference): Observable<firestore.DocumentSnapshot>;
/**
* Returns a stream of a document, mapped to its data payload and optionally the document ID
* @param query
*/
export declare function docData<T>(ref: firestore.DocumentReference, idField?: string): Observable<T>;
export declare function snapToData(snapshot: firestore.DocumentSnapshot, idField?: string): {};
21 changes: 21 additions & 0 deletions packages/rxfire/firestore/fromRef.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/**
* @license
* Copyright 2018 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { firestore } from 'firebase/app';
import { Observable } from 'rxjs';
export declare function fromRef(ref: firestore.DocumentReference | firestore.Query): Observable<any>;
export declare function fromDocRef(ref: firestore.DocumentReference): Observable<firestore.DocumentSnapshot>;
export declare function fromCollectionRef(ref: firestore.Query): Observable<firestore.QuerySnapshot>;
19 changes: 19 additions & 0 deletions packages/rxfire/firestore/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/**
* @license
* Copyright 2018 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export * from './collection';
export * from './document';
export * from './fromRef';
19 changes: 19 additions & 0 deletions packages/rxfire/functions/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/**
* @license
* Copyright 2018 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { functions } from 'firebase/app';
import { Observable } from 'rxjs';
export declare function httpsCallable<T = any, R = any>(functions: functions.Functions, name: string): (data: T) => Observable<R>;
27 changes: 27 additions & 0 deletions packages/rxfire/storage/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
/**
* @license
* Copyright 2018 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { storage } from 'firebase/app';
import { Observable } from 'rxjs';
export declare function fromTask(task: storage.UploadTask): Observable<storage.UploadTaskSnapshot>;
export declare function getDownloadURL(ref: storage.Reference): Observable<any>;
export declare function getMetadata(ref: storage.Reference): Observable<any>;
export declare function put(ref: storage.Reference, data: any, metadata?: storage.UploadMetadata): Observable<storage.UploadTaskSnapshot>;
export declare function putString(ref: storage.Reference, data: string, format?: storage.StringFormat, metadata?: storage.UploadMetadata): Observable<storage.UploadTaskSnapshot>;
export declare function percentage(task: storage.UploadTask): Observable<{
progress: number;
snapshot: storage.UploadTaskSnapshot;
}>;
33 changes: 32 additions & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
@@ -948,6 +948,26 @@
unique-filename "^1.1.1"
which "^1.3.1"

"@firebase/firestore@1.4.4":
version "1.4.4"
resolved "http://localhost:4873/@firebase%2ffirestore/-/firestore-1.4.4.tgz#8a56b35eff14a514bd13af8131577c4ee473d90a"
integrity sha512-WFuKYOsOlYowyHjazUkzVhmPTuqDXbGv1AAgncPVfuioEoAGCK2KY4OGQkmyAfbg6juYU3nUNcmcY3yQSHfy+w==
dependencies:
"@firebase/firestore-types" "1.4.2"
"@firebase/logger" "0.1.18"
"@firebase/util" "0.2.21"
"@firebase/webchannel-wrapper" "0.2.21"
"@grpc/proto-loader" "^0.5.0"
grpc "1.20.3"
tslib "1.9.3"

"@grpc/grpc-js@0.5.2":
version "0.5.2"
resolved "http://localhost:4873/@grpc%2fgrpc-js/-/grpc-js-0.5.2.tgz#8e39876033749e1611fe9fa181d9535077805abe"
integrity sha512-NE1tP/1AF6BqhLdILElnF7aOBfoky+4ZOdZU/0NmKo2d+9F9QD8zGoElpBk/5BfyQZ3u1Zs+wFbDOFpVUzDx1w==
dependencies:
semver "^6.0.0"

"@grpc/proto-loader@^0.5.0":
version "0.5.0"
resolved "https://registry.npmjs.org/@grpc/proto-loader/-/proto-loader-0.5.0.tgz#6d21930530db6089ed68a90f10a22b76fdc3387d"
@@ -7310,6 +7330,17 @@ growl@1.10.5, "growl@~> 1.10.0":
resolved "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz#f2735dc2283674fa67478b10181059355c369e5e"
integrity sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==

grpc@1.20.3:
version "1.20.3"
resolved "http://localhost:4873/grpc/-/grpc-1.20.3.tgz#a74d36718f1e89c4a64f2fb9441199c3c8f78978"
integrity sha512-GsEsi0NVj6usS/xor8pF/xDbDiwZQR59aZl5NUZ59Sy2bdPQFZ3UePr5wevZjHboirRCIQCKRI1cCgvSWUe2ag==
dependencies:
lodash.camelcase "^4.3.0"
lodash.clone "^4.5.0"
nan "^2.13.2"
node-pre-gyp "^0.13.0"
protobufjs "^5.0.3"

grpc@1.22.2:
version "1.22.2"
resolved "https://registry.npmjs.org/grpc/-/grpc-1.22.2.tgz#1a60c728c692a93a85e855e35c2e0216654f0198"
@@ -14081,7 +14112,7 @@ tslib@1.10.0:
resolved "https://registry.npmjs.org/tslib/-/tslib-1.10.0.tgz#c3c19f95973fb0a62973fb09d90d961ee43e5c8a"
integrity sha512-qOebF53frne81cf0S9B41ByenJ3/IuH8yJKngAX35CmiZySA0khhkovshKK+jGCaMnVomla7gVlIcc3EvKPbTQ==

tslib@^1.8.0, tslib@^1.8.1, tslib@^1.9.0:
tslib@1.9.3, tslib@^1.8.0, tslib@^1.8.1, tslib@^1.9.0:
version "1.9.3"
resolved "https://registry.npmjs.org/tslib/-/tslib-1.9.3.tgz#d7e4dd79245d85428c4d7e4822a79917954ca286"
integrity sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ==