@firebase/firestore 3.4.14-canary.dac1e4ca0 → 3.4.14-canary.f35533594
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/firestore/src/api/database.d.ts +3 -32
- package/dist/firestore/src/core/database_info.d.ts +0 -4
- package/dist/firestore/src/lite-api/database.d.ts +8 -37
- package/dist/firestore/test/integration/util/firebase_export.d.ts +1 -2
- package/dist/firestore/test/integration/util/helpers.d.ts +0 -1
- package/dist/index.d.ts +2 -31
- package/dist/index.esm2017.js +66 -65
- package/dist/index.esm2017.js.map +1 -1
- package/dist/index.esm5.js +53 -50
- package/dist/index.esm5.js.map +1 -1
- package/dist/index.node.cjs.js +40 -40
- package/dist/index.node.cjs.js.map +1 -1
- package/dist/index.node.mjs +40 -40
- package/dist/index.node.mjs.map +1 -1
- package/dist/index.rn.js +66 -65
- package/dist/index.rn.js.map +1 -1
- package/dist/internal.d.ts +6 -38
- package/dist/lite/firestore/src/api/database.d.ts +3 -32
- package/dist/lite/firestore/src/core/database_info.d.ts +0 -4
- package/dist/lite/firestore/src/lite-api/database.d.ts +8 -37
- package/dist/lite/firestore/test/integration/util/firebase_export.d.ts +1 -2
- package/dist/lite/firestore/test/integration/util/helpers.d.ts +0 -1
- package/dist/lite/index.browser.esm2017.js +55 -52
- package/dist/lite/index.browser.esm2017.js.map +1 -1
- package/dist/lite/index.browser.esm5.js +27 -37
- package/dist/lite/index.browser.esm5.js.map +1 -1
- package/dist/lite/index.d.ts +5 -34
- package/dist/lite/index.node.cjs.js +33 -32
- package/dist/lite/index.node.cjs.js.map +1 -1
- package/dist/lite/index.node.mjs +33 -32
- package/dist/lite/index.node.mjs.map +1 -1
- package/dist/lite/index.rn.esm2017.js +55 -52
- package/dist/lite/index.rn.esm2017.js.map +1 -1
- package/dist/lite/internal.d.ts +8 -40
- package/dist/lite/packages/firestore/dist/lite/index.browser.esm2017.d.ts +43 -17
- package/dist/lite/packages/firestore/src/api/database.d.ts +3 -32
- package/dist/lite/packages/firestore/src/core/database_info.d.ts +0 -4
- package/dist/lite/packages/firestore/src/lite-api/database.d.ts +8 -37
- package/dist/lite/packages/firestore/test/integration/util/firebase_export.d.ts +1 -2
- package/dist/lite/packages/firestore/test/integration/util/helpers.d.ts +0 -1
- package/dist/lite/private.d.ts +8 -40
- package/dist/packages/firestore/dist/index.esm2017.d.ts +15 -20
- package/dist/packages/firestore/src/api/database.d.ts +3 -32
- package/dist/packages/firestore/src/core/database_info.d.ts +0 -4
- package/dist/packages/firestore/src/lite-api/database.d.ts +8 -37
- package/dist/packages/firestore/test/integration/util/firebase_export.d.ts +1 -2
- package/dist/packages/firestore/test/integration/util/helpers.d.ts +0 -1
- package/dist/private.d.ts +6 -38
- package/package.json +9 -9
- package/dist/firestore/test/integration/api/provider.test.d.ts +0 -17
- package/dist/lite/firestore/test/integration/api/provider.test.d.ts +0 -17
- package/dist/lite/packages/firestore/test/integration/api/provider.test.d.ts +0 -17
- package/dist/packages/firestore/test/integration/api/provider.test.d.ts +0 -17
|
@@ -50,7 +50,7 @@ export declare class Firestore extends LiteFirestore {
|
|
|
50
50
|
readonly _persistenceKey: string;
|
|
51
51
|
_firestoreClient: FirestoreClient | undefined;
|
|
52
52
|
/** @hideconstructor */
|
|
53
|
-
constructor(authCredentialsProvider: CredentialsProvider<User>, appCheckCredentialsProvider: CredentialsProvider<string
|
|
53
|
+
constructor(databaseIdOrApp: DatabaseId | FirebaseApp, authCredentialsProvider: CredentialsProvider<User>, appCheckCredentialsProvider: CredentialsProvider<string>);
|
|
54
54
|
_terminate(): Promise<void>;
|
|
55
55
|
}
|
|
56
56
|
/**
|
|
@@ -62,37 +62,9 @@ export declare class Firestore extends LiteFirestore {
|
|
|
62
62
|
* @param app - The {@link @firebase/app#FirebaseApp} with which the {@link Firestore} instance will
|
|
63
63
|
* be associated.
|
|
64
64
|
* @param settings - A settings object to configure the {@link Firestore} instance.
|
|
65
|
-
* @param databaseId - The name of database.
|
|
66
65
|
* @returns A newly initialized {@link Firestore} instance.
|
|
67
66
|
*/
|
|
68
|
-
export declare function initializeFirestore(app: FirebaseApp, settings: FirestoreSettings
|
|
69
|
-
/**
|
|
70
|
-
* Returns the existing default {@link Firestore} instance that is associated with the
|
|
71
|
-
* default {@link @firebase/app#FirebaseApp}. If no instance exists, initializes a new
|
|
72
|
-
* instance with default settings.
|
|
73
|
-
*
|
|
74
|
-
* @returns The {@link Firestore} instance of the provided app.
|
|
75
|
-
*/
|
|
76
|
-
export declare function getFirestore(): Firestore;
|
|
77
|
-
/**
|
|
78
|
-
* Returns the existing default {@link Firestore} instance that is associated with the
|
|
79
|
-
* provided {@link @firebase/app#FirebaseApp}. If no instance exists, initializes a new
|
|
80
|
-
* instance with default settings.
|
|
81
|
-
*
|
|
82
|
-
* @param app - The {@link @firebase/app#FirebaseApp} instance that the returned {@link Firestore}
|
|
83
|
-
* instance is associated with.
|
|
84
|
-
* @returns The {@link Firestore} instance of the provided app.
|
|
85
|
-
*/
|
|
86
|
-
export declare function getFirestore(app: FirebaseApp): Firestore;
|
|
87
|
-
/**
|
|
88
|
-
* Returns the existing {@link Firestore} instance that is associated with the
|
|
89
|
-
* default {@link @firebase/app#FirebaseApp}. If no instance exists, initializes a new
|
|
90
|
-
* instance with default settings.
|
|
91
|
-
*
|
|
92
|
-
* @param databaseId - The name of database.
|
|
93
|
-
* @returns The {@link Firestore} instance of the provided app.
|
|
94
|
-
*/
|
|
95
|
-
export declare function getFirestore(databaseId: string): Firestore;
|
|
67
|
+
export declare function initializeFirestore(app: FirebaseApp, settings: FirestoreSettings): Firestore;
|
|
96
68
|
/**
|
|
97
69
|
* Returns the existing {@link Firestore} instance that is associated with the
|
|
98
70
|
* provided {@link @firebase/app#FirebaseApp}. If no instance exists, initializes a new
|
|
@@ -100,10 +72,9 @@ export declare function getFirestore(databaseId: string): Firestore;
|
|
|
100
72
|
*
|
|
101
73
|
* @param app - The {@link @firebase/app#FirebaseApp} instance that the returned {@link Firestore}
|
|
102
74
|
* instance is associated with.
|
|
103
|
-
* @param databaseId - The name of database.
|
|
104
75
|
* @returns The {@link Firestore} instance of the provided app.
|
|
105
76
|
*/
|
|
106
|
-
export declare function getFirestore(app
|
|
77
|
+
export declare function getFirestore(app?: FirebaseApp): Firestore;
|
|
107
78
|
/**
|
|
108
79
|
* @internal
|
|
109
80
|
*/
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { FirebaseApp } from '@firebase/app';
|
|
2
1
|
/**
|
|
3
2
|
* @license
|
|
4
3
|
* Copyright 2017 Google LLC
|
|
@@ -43,8 +42,6 @@ export declare class DatabaseInfo {
|
|
|
43
42
|
*/
|
|
44
43
|
constructor(databaseId: DatabaseId, appId: string, persistenceKey: string, host: string, ssl: boolean, forceLongPolling: boolean, autoDetectLongPolling: boolean, useFetchStreams: boolean);
|
|
45
44
|
}
|
|
46
|
-
/** The default database name for a project. */
|
|
47
|
-
export declare const DEFAULT_DATABASE_NAME = "(default)";
|
|
48
45
|
/**
|
|
49
46
|
* Represents the database ID a Firestore client is associated with.
|
|
50
47
|
* @internal
|
|
@@ -57,4 +54,3 @@ export declare class DatabaseId {
|
|
|
57
54
|
get isDefaultDatabase(): boolean;
|
|
58
55
|
isEqual(other: {}): boolean;
|
|
59
56
|
}
|
|
60
|
-
export declare function databaseIdFromApp(app: FirebaseApp, database?: string): DatabaseId;
|
|
@@ -34,18 +34,18 @@ declare module '@firebase/component' {
|
|
|
34
34
|
export declare class Firestore implements FirestoreService {
|
|
35
35
|
_authCredentials: CredentialsProvider<User>;
|
|
36
36
|
_appCheckCredentials: CredentialsProvider<string>;
|
|
37
|
-
readonly _databaseId: DatabaseId;
|
|
38
|
-
readonly _app?: FirebaseApp | undefined;
|
|
39
37
|
/**
|
|
40
38
|
* Whether it's a Firestore or Firestore Lite instance.
|
|
41
39
|
*/
|
|
42
40
|
type: 'firestore-lite' | 'firestore';
|
|
41
|
+
readonly _databaseId: DatabaseId;
|
|
43
42
|
readonly _persistenceKey: string;
|
|
44
43
|
private _settings;
|
|
45
44
|
private _settingsFrozen;
|
|
46
45
|
private _terminateTask?;
|
|
46
|
+
_app?: FirebaseApp;
|
|
47
47
|
/** @hideconstructor */
|
|
48
|
-
constructor(_authCredentials: CredentialsProvider<User>, _appCheckCredentials: CredentialsProvider<string
|
|
48
|
+
constructor(databaseIdOrApp: DatabaseId | FirebaseApp, _authCredentials: CredentialsProvider<User>, _appCheckCredentials: CredentialsProvider<string>);
|
|
49
49
|
/**
|
|
50
50
|
* The {@link @firebase/app#FirebaseApp} associated with this `Firestore` service
|
|
51
51
|
* instance.
|
|
@@ -77,48 +77,19 @@ export declare class Firestore implements FirestoreService {
|
|
|
77
77
|
* @param app - The {@link @firebase/app#FirebaseApp} with which the `Firestore` instance will
|
|
78
78
|
* be associated.
|
|
79
79
|
* @param settings - A settings object to configure the `Firestore` instance.
|
|
80
|
-
* @param databaseId - The name of database.
|
|
81
80
|
* @returns A newly initialized `Firestore` instance.
|
|
82
81
|
*/
|
|
83
|
-
export declare function initializeFirestore(app: FirebaseApp, settings: FirestoreSettings
|
|
84
|
-
/**
|
|
85
|
-
* Returns the existing default {@link Firestore} instance that is associated with the
|
|
86
|
-
* default {@link @firebase/app#FirebaseApp}. If no instance exists, initializes a new
|
|
87
|
-
* instance with default settings.
|
|
88
|
-
*
|
|
89
|
-
* @returns The {@link Firestore} instance of the provided app.
|
|
90
|
-
*/
|
|
91
|
-
export declare function getFirestore(): Firestore;
|
|
92
|
-
/**
|
|
93
|
-
* Returns the existing default {@link Firestore} instance that is associated with the
|
|
94
|
-
* provided {@link @firebase/app#FirebaseApp}. If no instance exists, initializes a new
|
|
95
|
-
* instance with default settings.
|
|
96
|
-
*
|
|
97
|
-
* @param app - The {@link @firebase/app#FirebaseApp} instance that the returned {@link Firestore}
|
|
98
|
-
* instance is associated with.
|
|
99
|
-
* @returns The {@link Firestore} instance of the provided app.
|
|
100
|
-
*/
|
|
101
|
-
export declare function getFirestore(app: FirebaseApp): Firestore;
|
|
102
|
-
/**
|
|
103
|
-
* Returns the existing {@link Firestore} instance that is associated with the
|
|
104
|
-
* default {@link @firebase/app#FirebaseApp}. If no instance exists, initializes a new
|
|
105
|
-
* instance with default settings.
|
|
106
|
-
*
|
|
107
|
-
* @param databaseId - The name of database.
|
|
108
|
-
* @returns The {@link Firestore} instance of the provided app.
|
|
109
|
-
*/
|
|
110
|
-
export declare function getFirestore(databaseId: string): Firestore;
|
|
82
|
+
export declare function initializeFirestore(app: FirebaseApp, settings: FirestoreSettings): Firestore;
|
|
111
83
|
/**
|
|
112
|
-
* Returns the existing
|
|
84
|
+
* Returns the existing `Firestore` instance that is associated with the
|
|
113
85
|
* provided {@link @firebase/app#FirebaseApp}. If no instance exists, initializes a new
|
|
114
86
|
* instance with default settings.
|
|
115
87
|
*
|
|
116
|
-
* @param app - The {@link @firebase/app#FirebaseApp} instance that the returned
|
|
88
|
+
* @param app - The {@link @firebase/app#FirebaseApp} instance that the returned `Firestore`
|
|
117
89
|
* instance is associated with.
|
|
118
|
-
* @
|
|
119
|
-
* @returns The {@link Firestore} instance of the provided app.
|
|
90
|
+
* @returns The `Firestore` instance of the provided app.
|
|
120
91
|
*/
|
|
121
|
-
export declare function getFirestore(app
|
|
92
|
+
export declare function getFirestore(app?: FirebaseApp): Firestore;
|
|
122
93
|
export { EmulatorMockTokenOptions } from '@firebase/util';
|
|
123
94
|
/**
|
|
124
95
|
* Modify this instance to communicate with the Cloud Firestore emulator.
|
|
@@ -17,7 +17,6 @@
|
|
|
17
17
|
import { FirebaseApp } from '@firebase/app';
|
|
18
18
|
import { Firestore } from '../../../src';
|
|
19
19
|
import { PrivateSettings } from '../../../src/lite-api/settings';
|
|
20
|
-
export declare function
|
|
21
|
-
export declare function newTestFirestore(app: FirebaseApp, settings?: PrivateSettings, dbName?: string): Firestore;
|
|
20
|
+
export declare function newTestFirestore(projectId: string, nameOrApp?: string | FirebaseApp, settings?: PrivateSettings): Firestore;
|
|
22
21
|
export * from '../../../src';
|
|
23
22
|
export { PrivateSettings };
|
|
@@ -37,7 +37,6 @@ export declare function withTestDb(persistence: boolean, fn: (db: Firestore) =>
|
|
|
37
37
|
export declare function withAlternateTestDb(persistence: boolean, fn: (db: Firestore) => Promise<void>): Promise<void>;
|
|
38
38
|
export declare function withTestDbs(persistence: boolean, numDbs: number, fn: (db: Firestore[]) => Promise<void>): Promise<void>;
|
|
39
39
|
export declare function withTestDbsSettings(persistence: boolean, projectId: string, settings: PrivateSettings, numDbs: number, fn: (db: Firestore[]) => Promise<void>): Promise<void>;
|
|
40
|
-
export declare function withNamedTestDbsOrSkipUnlessUsingEmulator(persistence: boolean, dbNames: string[], fn: (db: Firestore[]) => Promise<void>): Promise<void>;
|
|
41
40
|
export declare function withTestDoc(persistence: boolean, fn: (doc: DocumentReference, db: Firestore) => Promise<void>): Promise<void>;
|
|
42
41
|
export declare function withTestDocAndSettings(persistence: boolean, settings: PrivateSettings, fn: (doc: DocumentReference) => Promise<void>): Promise<void>;
|
|
43
42
|
export declare function withTestDocAndInitialData(persistence: boolean, initialData: DocumentData | null, fn: (doc: DocumentReference, db: Firestore) => Promise<void>): Promise<void>;
|
package/dist/index.d.ts
CHANGED
|
@@ -899,33 +899,6 @@ export declare function getDocsFromCache<T>(query: Query<T>): Promise<QuerySnaps
|
|
|
899
899
|
* @returns A `Promise` that will be resolved with the results of the query.
|
|
900
900
|
*/
|
|
901
901
|
export declare function getDocsFromServer<T>(query: Query<T>): Promise<QuerySnapshot<T>>;
|
|
902
|
-
/**
|
|
903
|
-
* Returns the existing default {@link Firestore} instance that is associated with the
|
|
904
|
-
* default {@link @firebase/app#FirebaseApp}. If no instance exists, initializes a new
|
|
905
|
-
* instance with default settings.
|
|
906
|
-
*
|
|
907
|
-
* @returns The {@link Firestore} instance of the provided app.
|
|
908
|
-
*/
|
|
909
|
-
export declare function getFirestore(): Firestore;
|
|
910
|
-
/**
|
|
911
|
-
* Returns the existing default {@link Firestore} instance that is associated with the
|
|
912
|
-
* provided {@link @firebase/app#FirebaseApp}. If no instance exists, initializes a new
|
|
913
|
-
* instance with default settings.
|
|
914
|
-
*
|
|
915
|
-
* @param app - The {@link @firebase/app#FirebaseApp} instance that the returned {@link Firestore}
|
|
916
|
-
* instance is associated with.
|
|
917
|
-
* @returns The {@link Firestore} instance of the provided app.
|
|
918
|
-
*/
|
|
919
|
-
export declare function getFirestore(app: FirebaseApp): Firestore;
|
|
920
|
-
/**
|
|
921
|
-
* Returns the existing {@link Firestore} instance that is associated with the
|
|
922
|
-
* default {@link @firebase/app#FirebaseApp}. If no instance exists, initializes a new
|
|
923
|
-
* instance with default settings.
|
|
924
|
-
*
|
|
925
|
-
* @param databaseId - The name of database.
|
|
926
|
-
* @returns The {@link Firestore} instance of the provided app.
|
|
927
|
-
*/
|
|
928
|
-
export declare function getFirestore(databaseId: string): Firestore;
|
|
929
902
|
/**
|
|
930
903
|
* Returns the existing {@link Firestore} instance that is associated with the
|
|
931
904
|
* provided {@link @firebase/app#FirebaseApp}. If no instance exists, initializes a new
|
|
@@ -933,10 +906,9 @@ export declare function getFirestore(databaseId: string): Firestore;
|
|
|
933
906
|
*
|
|
934
907
|
* @param app - The {@link @firebase/app#FirebaseApp} instance that the returned {@link Firestore}
|
|
935
908
|
* instance is associated with.
|
|
936
|
-
* @param databaseId - The name of database.
|
|
937
909
|
* @returns The {@link Firestore} instance of the provided app.
|
|
938
910
|
*/
|
|
939
|
-
export declare function getFirestore(app
|
|
911
|
+
export declare function getFirestore(app?: FirebaseApp): Firestore;
|
|
940
912
|
/**
|
|
941
913
|
* Returns a special value that can be used with {@link @firebase/firestore/lite#(setDoc:1)} or {@link
|
|
942
914
|
* @firebase/firestore/lite#(updateDoc:1)} that tells the server to increment the field's current value by
|
|
@@ -966,10 +938,9 @@ export declare function increment(n: number): FieldValue;
|
|
|
966
938
|
* @param app - The {@link @firebase/app#FirebaseApp} with which the {@link Firestore} instance will
|
|
967
939
|
* be associated.
|
|
968
940
|
* @param settings - A settings object to configure the {@link Firestore} instance.
|
|
969
|
-
* @param databaseId - The name of database.
|
|
970
941
|
* @returns A newly initialized {@link Firestore} instance.
|
|
971
942
|
*/
|
|
972
|
-
export declare function initializeFirestore(app: FirebaseApp, settings: FirestoreSettings
|
|
943
|
+
export declare function initializeFirestore(app: FirebaseApp, settings: FirestoreSettings): Firestore;
|
|
973
944
|
/* Excluded from this release type: _isBase64Available */
|
|
974
945
|
/**
|
|
975
946
|
* Creates a {@link QueryConstraint} that only returns the first matching documents.
|
package/dist/index.esm2017.js
CHANGED
|
@@ -66,7 +66,7 @@ C.MOCK_USER = new C("mock-user");
|
|
|
66
66
|
* See the License for the specific language governing permissions and
|
|
67
67
|
* limitations under the License.
|
|
68
68
|
*/
|
|
69
|
-
let x = "9.9.3-canary.
|
|
69
|
+
let x = "9.9.3-canary.f35533594";
|
|
70
70
|
|
|
71
71
|
/**
|
|
72
72
|
* @license
|
|
@@ -2957,6 +2957,23 @@ class ue {
|
|
|
2957
2957
|
}
|
|
2958
2958
|
}
|
|
2959
2959
|
|
|
2960
|
+
/**
|
|
2961
|
+
* @license
|
|
2962
|
+
* Copyright 2017 Google LLC
|
|
2963
|
+
*
|
|
2964
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
2965
|
+
* you may not use this file except in compliance with the License.
|
|
2966
|
+
* You may obtain a copy of the License at
|
|
2967
|
+
*
|
|
2968
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
2969
|
+
*
|
|
2970
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
2971
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
2972
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
2973
|
+
* See the License for the specific language governing permissions and
|
|
2974
|
+
* limitations under the License.
|
|
2975
|
+
*/
|
|
2976
|
+
/** Sentinel value that sorts before any Mutation Batch ID. */
|
|
2960
2977
|
/**
|
|
2961
2978
|
* Returns whether a variable is either undefined or null.
|
|
2962
2979
|
*/
|
|
@@ -16522,14 +16539,30 @@ class Ra {
|
|
|
16522
16539
|
* Do not call this constructor directly. Instead, use {@link getFirestore}.
|
|
16523
16540
|
*/ class ba {
|
|
16524
16541
|
/** @hideconstructor */
|
|
16525
|
-
constructor(t, e, n
|
|
16526
|
-
this._authCredentials =
|
|
16527
|
-
this._app = s,
|
|
16542
|
+
constructor(t, e, n) {
|
|
16543
|
+
this._authCredentials = e, this._appCheckCredentials = n,
|
|
16528
16544
|
/**
|
|
16529
16545
|
* Whether it's a Firestore or Firestore Lite instance.
|
|
16530
16546
|
*/
|
|
16531
16547
|
this.type = "firestore-lite", this._persistenceKey = "(lite)", this._settings = new Ra({}),
|
|
16532
|
-
this._settingsFrozen = !1
|
|
16548
|
+
this._settingsFrozen = !1, t instanceof ue ? this._databaseId = t : (this._app = t,
|
|
16549
|
+
this._databaseId = function(t) {
|
|
16550
|
+
if (!Object.prototype.hasOwnProperty.apply(t.options, [ "projectId" ])) throw new Q(G.INVALID_ARGUMENT, '"projectId" not provided in firebase.initializeApp.');
|
|
16551
|
+
return new ue(t.options.projectId);
|
|
16552
|
+
}
|
|
16553
|
+
/**
|
|
16554
|
+
* Modify this instance to communicate with the Cloud Firestore emulator.
|
|
16555
|
+
*
|
|
16556
|
+
* Note: This must be called before this instance has been used to do any
|
|
16557
|
+
* operations.
|
|
16558
|
+
*
|
|
16559
|
+
* @param firestore - The `Firestore` instance to configure to connect to the
|
|
16560
|
+
* emulator.
|
|
16561
|
+
* @param host - the emulator host (ex: localhost).
|
|
16562
|
+
* @param port - the emulator port (ex: 9000).
|
|
16563
|
+
* @param options.mockUserToken - the mock auth token to use for unit testing
|
|
16564
|
+
* Security Rules.
|
|
16565
|
+
*/ (t));
|
|
16533
16566
|
}
|
|
16534
16567
|
/**
|
|
16535
16568
|
* The {@link @firebase/app#FirebaseApp} associated with this `Firestore` service
|
|
@@ -16595,19 +16628,7 @@ class Ra {
|
|
|
16595
16628
|
}
|
|
16596
16629
|
}
|
|
16597
16630
|
|
|
16598
|
-
|
|
16599
|
-
* Modify this instance to communicate with the Cloud Firestore emulator.
|
|
16600
|
-
*
|
|
16601
|
-
* Note: This must be called before this instance has been used to do any
|
|
16602
|
-
* operations.
|
|
16603
|
-
*
|
|
16604
|
-
* @param firestore - The `Firestore` instance to configure to connect to the
|
|
16605
|
-
* emulator.
|
|
16606
|
-
* @param host - the emulator host (ex: localhost).
|
|
16607
|
-
* @param port - the emulator port (ex: 9000).
|
|
16608
|
-
* @param options.mockUserToken - the mock auth token to use for unit testing
|
|
16609
|
-
* Security Rules.
|
|
16610
|
-
*/ function Pa(t, e, n, s = {}) {
|
|
16631
|
+
function Pa(t, e, n, s = {}) {
|
|
16611
16632
|
var i;
|
|
16612
16633
|
const r = (t = Ea(t, ba))._getSettings();
|
|
16613
16634
|
if ("firestore.googleapis.com" !== r.host && r.host !== e && $("Host has been set in both settings() and useEmulator(), emulator host will be used"),
|
|
@@ -17146,12 +17167,12 @@ class Fa {
|
|
|
17146
17167
|
*/
|
|
17147
17168
|
class Ba extends ba {
|
|
17148
17169
|
/** @hideconstructor */
|
|
17149
|
-
constructor(t, e, n
|
|
17150
|
-
super(t, e, n
|
|
17170
|
+
constructor(t, e, n) {
|
|
17171
|
+
super(t, e, n),
|
|
17151
17172
|
/**
|
|
17152
17173
|
* Whether it's a {@link Firestore} or Firestore Lite instance.
|
|
17153
17174
|
*/
|
|
17154
|
-
this.type = "firestore", this._queue = new Ma, this._persistenceKey =
|
|
17175
|
+
this.type = "firestore", this._queue = new Ma, this._persistenceKey = "name" in t ? t.name : "[DEFAULT]";
|
|
17155
17176
|
}
|
|
17156
17177
|
_terminate() {
|
|
17157
17178
|
return this._firestoreClient ||
|
|
@@ -17170,30 +17191,30 @@ class Ba extends ba {
|
|
|
17170
17191
|
* @param app - The {@link @firebase/app#FirebaseApp} with which the {@link Firestore} instance will
|
|
17171
17192
|
* be associated.
|
|
17172
17193
|
* @param settings - A settings object to configure the {@link Firestore} instance.
|
|
17173
|
-
* @param databaseId - The name of database.
|
|
17174
17194
|
* @returns A newly initialized {@link Firestore} instance.
|
|
17175
|
-
*/ function La(t, e
|
|
17176
|
-
|
|
17177
|
-
|
|
17178
|
-
|
|
17179
|
-
|
|
17180
|
-
identifier: n
|
|
17181
|
-
}), i = s.getOptions(n);
|
|
17182
|
-
if (deepEqual(i, e)) return t;
|
|
17195
|
+
*/ function La(t, e) {
|
|
17196
|
+
const n = _getProvider(t, "firestore");
|
|
17197
|
+
if (n.isInitialized()) {
|
|
17198
|
+
const t = n.getImmediate(), s = n.getOptions();
|
|
17199
|
+
if (deepEqual(s, e)) return t;
|
|
17183
17200
|
throw new Q(G.FAILED_PRECONDITION, "initializeFirestore() has already been called with different options. To avoid this error, call initializeFirestore() with the same options as when it was originally called, or call getFirestore() to return the already initialized instance.");
|
|
17184
17201
|
}
|
|
17185
17202
|
if (void 0 !== e.cacheSizeBytes && -1 !== e.cacheSizeBytes && e.cacheSizeBytes < 1048576) throw new Q(G.INVALID_ARGUMENT, "cacheSizeBytes must be at least 1048576");
|
|
17186
|
-
return
|
|
17187
|
-
options: e
|
|
17188
|
-
instanceIdentifier: n
|
|
17203
|
+
return n.initialize({
|
|
17204
|
+
options: e
|
|
17189
17205
|
});
|
|
17190
17206
|
}
|
|
17191
17207
|
|
|
17192
|
-
|
|
17193
|
-
|
|
17194
|
-
|
|
17195
|
-
|
|
17196
|
-
|
|
17208
|
+
/**
|
|
17209
|
+
* Returns the existing {@link Firestore} instance that is associated with the
|
|
17210
|
+
* provided {@link @firebase/app#FirebaseApp}. If no instance exists, initializes a new
|
|
17211
|
+
* instance with default settings.
|
|
17212
|
+
*
|
|
17213
|
+
* @param app - The {@link @firebase/app#FirebaseApp} instance that the returned {@link Firestore}
|
|
17214
|
+
* instance is associated with.
|
|
17215
|
+
* @returns The {@link Firestore} instance of the provided app.
|
|
17216
|
+
*/ function Ua(e = getApp()) {
|
|
17217
|
+
return _getProvider(e, "firestore").getImmediate();
|
|
17197
17218
|
}
|
|
17198
17219
|
|
|
17199
17220
|
/**
|
|
@@ -17442,7 +17463,7 @@ function Wa(t) {
|
|
|
17442
17463
|
* @returns A `Promise` that is resolved when the instance has been successfully
|
|
17443
17464
|
* terminated.
|
|
17444
17465
|
*/ function Ya(t) {
|
|
17445
|
-
return _removeServiceInstance(t.app, "firestore"
|
|
17466
|
+
return _removeServiceInstance(t.app, "firestore"), t._delete();
|
|
17446
17467
|
}
|
|
17447
17468
|
|
|
17448
17469
|
/**
|
|
@@ -19732,34 +19753,14 @@ function Fl(t, e) {
|
|
|
19732
19753
|
*/ !function(t, e = !0) {
|
|
19733
19754
|
!function(t) {
|
|
19734
19755
|
x = t;
|
|
19735
|
-
}(SDK_VERSION), _registerComponent(new Component("firestore", ((t, {
|
|
19736
|
-
const
|
|
19737
|
-
|
|
19738
|
-
return new ue(t.options.projectId, e);
|
|
19739
|
-
}
|
|
19740
|
-
/**
|
|
19741
|
-
* @license
|
|
19742
|
-
* Copyright 2017 Google LLC
|
|
19743
|
-
*
|
|
19744
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
19745
|
-
* you may not use this file except in compliance with the License.
|
|
19746
|
-
* You may obtain a copy of the License at
|
|
19747
|
-
*
|
|
19748
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
19749
|
-
*
|
|
19750
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
19751
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
19752
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
19753
|
-
* See the License for the specific language governing permissions and
|
|
19754
|
-
* limitations under the License.
|
|
19755
|
-
*/
|
|
19756
|
-
/** Sentinel value that sorts before any Mutation Batch ID. */ (i, n), i);
|
|
19757
|
-
return s = Object.assign({
|
|
19756
|
+
}(SDK_VERSION), _registerComponent(new Component("firestore", ((t, {options: n}) => {
|
|
19757
|
+
const s = t.getProvider("app").getImmediate(), i = new Ba(s, new J(t.getProvider("auth-internal")), new tt(t.getProvider("app-check-internal")));
|
|
19758
|
+
return n = Object.assign({
|
|
19758
19759
|
useFetchStreams: e
|
|
19759
|
-
},
|
|
19760
|
-
}), "PUBLIC")
|
|
19760
|
+
}, n), i._setSettings(n), i;
|
|
19761
|
+
}), "PUBLIC")), registerVersion(D, "3.4.14-canary.f35533594", t),
|
|
19761
19762
|
// BUILD_TARGET will be replaced by values like esm5, esm2017, cjs5, etc during the compilation
|
|
19762
|
-
registerVersion(D, "3.4.14-canary.
|
|
19763
|
+
registerVersion(D, "3.4.14-canary.f35533594", "esm2017");
|
|
19763
19764
|
}();
|
|
19764
19765
|
|
|
19765
19766
|
export { cl as AbstractUserDataWriter, sh as Bytes, $a as CACHE_SIZE_UNLIMITED, Sa as CollectionReference, va as DocumentReference, Oh as DocumentSnapshot, eh as FieldPath, ih as FieldValue, Ba as Firestore, Q as FirestoreError, rh as GeoPoint, Fa as LoadBundleTask, Va as Query, qh as QueryConstraint, Fh as QueryDocumentSnapshot, $h as QuerySnapshot, Mh as SnapshotMetadata, ut as Timestamp, Vl as Transaction, ll as WriteBatch, ue as _DatabaseId, dt as _DocumentKey, et as _EmptyAppCheckTokenProvider, z as _EmptyAuthCredentialsProvider, ft as _FieldPath, Ea as _cast, q as _debugAssert, Yt as _isBase64Available, $ as _logWarn, ya as _validateIsNotUsedTogether, Al as addDoc, Nl as arrayRemove, xl as arrayUnion, Wa as clearIndexedDbPersistence, Da as collection, Ca as collectionGroup, Pa as connectFirestoreEmulator, El as deleteDoc, Dl as deleteField, Ja as disableNetwork, xa as doc, nh as documentId, Ga as enableIndexedDbPersistence, Qa as enableMultiTabIndexedDbPersistence, Ha as enableNetwork, nl as endAt, el as endBefore, qa as ensureFirestoreConfigured, Pl as executeWrite, dl as getDoc, wl as getDocFromCache, ml as getDocFromServer, gl as getDocs, yl as getDocsFromCache, pl as getDocsFromServer, Ua as getFirestore, kl as increment, La as initializeFirestore, Hh as limit, Jh as limitToLast, Xa as loadBundle, Za as namedQuery, Rl as onSnapshot, bl as onSnapshotsInSync, Wh as orderBy, Kh as query, ka as queryEqual, Na as refEqual, Sl as runTransaction, Cl as serverTimestamp, Il as setDoc, Ol as setIndexConfiguration, M as setLogLevel, Lh as snapshotEqual, Zh as startAfter, Xh as startAt, Ya as terminate, Tl as updateDoc, za as waitForPendingWrites, Qh as where, Ml as writeBatch };
|