@firebase/firestore-compat 0.4.0-20230301000120 → 0.4.0-20250715195345
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/index.cjs.js +980 -972
- package/dist/index.cjs.js.map +1 -1
- package/dist/{index.esm2017.js → index.esm.js} +981 -973
- package/dist/index.esm.js.map +1 -0
- package/dist/index.node.cjs.js +980 -972
- package/dist/index.node.cjs.js.map +1 -1
- package/dist/index.rn.js +980 -972
- package/dist/index.rn.js.map +1 -1
- package/dist/node-esm/index.node.esm.js +980 -972
- package/dist/node-esm/index.node.esm.js.map +1 -1
- package/dist/node-esm/src/api/blob.d.ts +29 -29
- package/dist/node-esm/src/api/database.d.ts +228 -228
- package/dist/node-esm/src/api/field_path.d.ts +36 -36
- package/dist/node-esm/src/api/field_value.d.ts +29 -29
- package/dist/node-esm/src/api/geo_point.d.ts +17 -17
- package/dist/node-esm/src/api/observer.d.ts +29 -29
- package/dist/node-esm/src/api/timestamp.d.ts +17 -17
- package/dist/node-esm/src/config.d.ts +28 -28
- package/dist/node-esm/src/index.console.d.ts +48 -48
- package/dist/node-esm/src/index.d.ts +49 -49
- package/dist/node-esm/src/index.node.d.ts +22 -22
- package/dist/node-esm/src/index.rn.d.ts +22 -22
- package/dist/node-esm/src/register-module.d.ts +42 -42
- package/dist/node-esm/src/util/input_validation.d.ts +18 -18
- package/dist/node-esm/test/array_transforms.test.d.ts +17 -17
- package/dist/node-esm/test/batch_writes.test.d.ts +17 -17
- package/dist/node-esm/test/bootstrap.d.ts +17 -17
- package/dist/node-esm/test/bundle.test.d.ts +17 -17
- package/dist/node-esm/test/cursor.test.d.ts +17 -17
- package/dist/node-esm/test/database.test.d.ts +17 -17
- package/dist/node-esm/test/fields.test.d.ts +17 -17
- package/dist/node-esm/test/get_options.test.d.ts +17 -17
- package/dist/node-esm/test/numeric_transforms.test.d.ts +17 -17
- package/dist/node-esm/test/query.test.d.ts +17 -17
- package/dist/node-esm/test/server_timestamp.test.d.ts +17 -17
- package/dist/node-esm/test/smoke.test.d.ts +17 -17
- package/dist/node-esm/test/transactions.test.d.ts +17 -17
- package/dist/node-esm/test/type.test.d.ts +17 -17
- package/dist/node-esm/test/util/equality_matcher.d.ts +33 -33
- package/dist/node-esm/test/util/events_accumulator.d.ts +39 -39
- package/dist/node-esm/test/util/firebase_export.d.ts +29 -29
- package/dist/node-esm/test/util/helpers.d.ts +49 -49
- package/dist/node-esm/test/util/promise.d.ts +28 -28
- package/dist/node-esm/test/util/settings.d.ts +23 -23
- package/dist/node-esm/test/validation.test.d.ts +17 -17
- package/dist/src/api/blob.d.ts +29 -29
- package/dist/src/api/database.d.ts +228 -228
- package/dist/src/api/field_path.d.ts +36 -36
- package/dist/src/api/field_value.d.ts +29 -29
- package/dist/src/api/geo_point.d.ts +17 -17
- package/dist/src/api/observer.d.ts +29 -29
- package/dist/src/api/timestamp.d.ts +17 -17
- package/dist/src/config.d.ts +28 -28
- package/dist/src/index.console.d.ts +48 -48
- package/dist/src/index.d.ts +117 -85
- package/dist/src/index.node.d.ts +22 -22
- package/dist/src/index.rn.d.ts +22 -22
- package/dist/src/register-module.d.ts +42 -42
- package/dist/src/util/input_validation.d.ts +18 -18
- package/dist/test/array_transforms.test.d.ts +17 -17
- package/dist/test/batch_writes.test.d.ts +17 -17
- package/dist/test/bootstrap.d.ts +17 -17
- package/dist/test/bundle.test.d.ts +17 -17
- package/dist/test/cursor.test.d.ts +17 -17
- package/dist/test/database.test.d.ts +17 -17
- package/dist/test/fields.test.d.ts +17 -17
- package/dist/test/get_options.test.d.ts +17 -17
- package/dist/test/numeric_transforms.test.d.ts +17 -17
- package/dist/test/query.test.d.ts +17 -17
- package/dist/test/server_timestamp.test.d.ts +17 -17
- package/dist/test/smoke.test.d.ts +17 -17
- package/dist/test/transactions.test.d.ts +17 -17
- package/dist/test/type.test.d.ts +17 -17
- package/dist/test/util/equality_matcher.d.ts +33 -33
- package/dist/test/util/events_accumulator.d.ts +39 -39
- package/dist/test/util/firebase_export.d.ts +29 -29
- package/dist/test/util/helpers.d.ts +49 -49
- package/dist/test/util/promise.d.ts +28 -28
- package/dist/test/util/settings.d.ts +23 -23
- package/dist/test/validation.test.d.ts +17 -17
- package/package.json +25 -23
- package/CHANGELOG.md +0 -330
- package/dist/index.esm2017.js.map +0 -1
- package/dist/index.esm5.js +0 -1196
- package/dist/index.esm5.js.map +0 -1
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2022 Google LLC
|
|
4
|
-
*
|
|
5
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
-
* you may not use this file except in compliance with the License.
|
|
7
|
-
* You may obtain a copy of the License at
|
|
8
|
-
*
|
|
9
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
-
*
|
|
11
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
-
* See the License for the specific language governing permissions and
|
|
15
|
-
* limitations under the License.
|
|
16
|
-
*/
|
|
17
|
-
/**
|
|
18
|
-
* Duck-typed interface for objects that have an isEqual() method.
|
|
19
|
-
*
|
|
20
|
-
* Note: This is copied from src/util/misc.ts to avoid importing private types.
|
|
21
|
-
*/
|
|
22
|
-
export interface Equatable<T> {
|
|
23
|
-
isEqual(other: T): boolean;
|
|
24
|
-
}
|
|
25
|
-
/**
|
|
26
|
-
* Custom equals override for types that have a free-standing equals functions
|
|
27
|
-
* (such as `queryEquals()`).
|
|
28
|
-
*/
|
|
29
|
-
export interface CustomMatcher<T> {
|
|
30
|
-
equalsFn: (left: T, right: T) => boolean;
|
|
31
|
-
forType: Function;
|
|
32
|
-
}
|
|
33
|
-
export declare function addEqualityMatcher(...customMatchers: Array<CustomMatcher<any>>): void;
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2022 Google LLC
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
/**
|
|
18
|
+
* Duck-typed interface for objects that have an isEqual() method.
|
|
19
|
+
*
|
|
20
|
+
* Note: This is copied from src/util/misc.ts to avoid importing private types.
|
|
21
|
+
*/
|
|
22
|
+
export interface Equatable<T> {
|
|
23
|
+
isEqual(other: T): boolean;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Custom equals override for types that have a free-standing equals functions
|
|
27
|
+
* (such as `queryEquals()`).
|
|
28
|
+
*/
|
|
29
|
+
export interface CustomMatcher<T> {
|
|
30
|
+
equalsFn: (left: T, right: T) => boolean;
|
|
31
|
+
forType: Function;
|
|
32
|
+
}
|
|
33
|
+
export declare function addEqualityMatcher(...customMatchers: Array<CustomMatcher<any>>): void;
|
|
@@ -1,39 +1,39 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2022 Google LLC
|
|
4
|
-
*
|
|
5
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
-
* you may not use this file except in compliance with the License.
|
|
7
|
-
* You may obtain a copy of the License at
|
|
8
|
-
*
|
|
9
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
-
*
|
|
11
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
-
* See the License for the specific language governing permissions and
|
|
15
|
-
* limitations under the License.
|
|
16
|
-
*/
|
|
17
|
-
import * as firestore from '@firebase/firestore-types';
|
|
18
|
-
/**
|
|
19
|
-
* A helper object that can accumulate an arbitrary amount of events and resolve
|
|
20
|
-
* a promise when expected number has been emitted.
|
|
21
|
-
*/
|
|
22
|
-
export declare class EventsAccumulator<T extends firestore.DocumentSnapshot | firestore.QuerySnapshot> {
|
|
23
|
-
private events;
|
|
24
|
-
private waitingFor;
|
|
25
|
-
private deferred;
|
|
26
|
-
private rejectAdditionalEvents;
|
|
27
|
-
storeEvent: (evt: T) => void;
|
|
28
|
-
awaitEvents(length: number): Promise<T[]>;
|
|
29
|
-
awaitEvent(): Promise<T>;
|
|
30
|
-
/** Waits for a latency compensated local snapshot. */
|
|
31
|
-
awaitLocalEvent(): Promise<T>;
|
|
32
|
-
/** Waits for multiple latency compensated local snapshot. */
|
|
33
|
-
awaitLocalEvents(count: number): Promise<T[]>;
|
|
34
|
-
/** Waits for a snapshot that has no pending writes */
|
|
35
|
-
awaitRemoteEvent(): Promise<T>;
|
|
36
|
-
assertNoAdditionalEvents(): Promise<void>;
|
|
37
|
-
allowAdditionalEvents(): void;
|
|
38
|
-
private checkFulfilled;
|
|
39
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2022 Google LLC
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
import * as firestore from '@firebase/firestore-types';
|
|
18
|
+
/**
|
|
19
|
+
* A helper object that can accumulate an arbitrary amount of events and resolve
|
|
20
|
+
* a promise when expected number has been emitted.
|
|
21
|
+
*/
|
|
22
|
+
export declare class EventsAccumulator<T extends firestore.DocumentSnapshot | firestore.QuerySnapshot> {
|
|
23
|
+
private events;
|
|
24
|
+
private waitingFor;
|
|
25
|
+
private deferred;
|
|
26
|
+
private rejectAdditionalEvents;
|
|
27
|
+
storeEvent: (evt: T) => void;
|
|
28
|
+
awaitEvents(length: number): Promise<T[]>;
|
|
29
|
+
awaitEvent(): Promise<T>;
|
|
30
|
+
/** Waits for a latency compensated local snapshot. */
|
|
31
|
+
awaitLocalEvent(): Promise<T>;
|
|
32
|
+
/** Waits for multiple latency compensated local snapshot. */
|
|
33
|
+
awaitLocalEvents(count: number): Promise<T[]>;
|
|
34
|
+
/** Waits for a snapshot that has no pending writes */
|
|
35
|
+
awaitRemoteEvent(): Promise<T>;
|
|
36
|
+
assertNoAdditionalEvents(): Promise<void>;
|
|
37
|
+
allowAdditionalEvents(): void;
|
|
38
|
+
private checkFulfilled;
|
|
39
|
+
}
|
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2022 Google LLC
|
|
4
|
-
*
|
|
5
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
-
* you may not use this file except in compliance with the License.
|
|
7
|
-
* You may obtain a copy of the License at
|
|
8
|
-
*
|
|
9
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
-
*
|
|
11
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
-
* See the License for the specific language governing permissions and
|
|
15
|
-
* limitations under the License.
|
|
16
|
-
*/
|
|
17
|
-
import { FirebaseApp } from '@firebase/app-types';
|
|
18
|
-
import { GeoPoint, Timestamp } from '@firebase/firestore';
|
|
19
|
-
import * as firestore from '@firebase/firestore-types';
|
|
20
|
-
import { Blob } from '../../src/api/blob';
|
|
21
|
-
import { Firestore, DocumentReference, QueryDocumentSnapshot } from '../../src/api/database';
|
|
22
|
-
import { FieldPath } from '../../src/api/field_path';
|
|
23
|
-
import { FieldValue } from '../../src/api/field_value';
|
|
24
|
-
/**
|
|
25
|
-
* Creates a new test instance of Firestore using either firebase.firestore()
|
|
26
|
-
* or `initializeFirestore` from the modular API.
|
|
27
|
-
*/
|
|
28
|
-
export declare function newTestFirestore(projectId: string, nameOrApp?: string | FirebaseApp, settings?: firestore.Settings): firestore.FirebaseFirestore;
|
|
29
|
-
export { Firestore, FieldValue, FieldPath, Timestamp, Blob, GeoPoint, DocumentReference, QueryDocumentSnapshot };
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2022 Google LLC
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
import { FirebaseApp } from '@firebase/app-types';
|
|
18
|
+
import { GeoPoint, Timestamp } from '@firebase/firestore';
|
|
19
|
+
import * as firestore from '@firebase/firestore-types';
|
|
20
|
+
import { Blob } from '../../src/api/blob';
|
|
21
|
+
import { Firestore, DocumentReference, QueryDocumentSnapshot } from '../../src/api/database';
|
|
22
|
+
import { FieldPath } from '../../src/api/field_path';
|
|
23
|
+
import { FieldValue } from '../../src/api/field_value';
|
|
24
|
+
/**
|
|
25
|
+
* Creates a new test instance of Firestore using either firebase.firestore()
|
|
26
|
+
* or `initializeFirestore` from the modular API.
|
|
27
|
+
*/
|
|
28
|
+
export declare function newTestFirestore(projectId: string, nameOrApp?: string | FirebaseApp, settings?: firestore.Settings): firestore.FirebaseFirestore;
|
|
29
|
+
export { Firestore, FieldValue, FieldPath, Timestamp, Blob, GeoPoint, DocumentReference, QueryDocumentSnapshot };
|
|
@@ -1,49 +1,49 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2022 Google LLC
|
|
4
|
-
*
|
|
5
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
-
* you may not use this file except in compliance with the License.
|
|
7
|
-
* You may obtain a copy of the License at
|
|
8
|
-
*
|
|
9
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
-
*
|
|
11
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
-
* See the License for the specific language governing permissions and
|
|
15
|
-
* limitations under the License.
|
|
16
|
-
*/
|
|
17
|
-
import * as firestore from '@firebase/firestore-types';
|
|
18
|
-
export declare function isPersistenceAvailable(): boolean;
|
|
19
|
-
|
|
20
|
-
interface ApiDescribe {
|
|
21
|
-
(message: string, testSuite: (persistence: boolean) => void): void;
|
|
22
|
-
skip: ApiSuiteFunction;
|
|
23
|
-
only: ApiSuiteFunction;
|
|
24
|
-
}
|
|
25
|
-
export declare const apiDescribe: ApiDescribe;
|
|
26
|
-
/** Converts the documents in a QuerySnapshot to an array with the data of each document. */
|
|
27
|
-
export declare function toDataArray(docSet: firestore.QuerySnapshot): firestore.DocumentData[];
|
|
28
|
-
/** Converts the changes in a QuerySnapshot to an array with the data of each document. */
|
|
29
|
-
export declare function toChangesArray(docSet: firestore.QuerySnapshot, options?: firestore.SnapshotListenOptions): firestore.DocumentData[];
|
|
30
|
-
export declare function toDataMap(docSet: firestore.QuerySnapshot): {
|
|
31
|
-
[field: string]: firestore.DocumentData;
|
|
32
|
-
};
|
|
33
|
-
/** Converts a DocumentSet to an array with the id of each document */
|
|
34
|
-
export declare function toIds(docSet: firestore.QuerySnapshot): string[];
|
|
35
|
-
export declare function withTestDb(persistence: boolean, fn: (db: firestore.FirebaseFirestore) => Promise<void>): Promise<void>;
|
|
36
|
-
/** Runs provided fn with a db for an alternate project id. */
|
|
37
|
-
export declare function withAlternateTestDb(persistence: boolean, fn: (db: firestore.FirebaseFirestore) => Promise<void>): Promise<void>;
|
|
38
|
-
export declare function withTestDbs(persistence: boolean, numDbs: number, fn: (db: firestore.FirebaseFirestore[]) => Promise<void>): Promise<void>;
|
|
39
|
-
export declare function withTestDbsSettings(persistence: boolean, projectId: string, settings: firestore.Settings, numDbs: number, fn: (db: firestore.FirebaseFirestore[]) => Promise<void>): Promise<void>;
|
|
40
|
-
export declare function withTestDoc(persistence: boolean, fn: (doc: firestore.DocumentReference) => Promise<void>): Promise<void>;
|
|
41
|
-
export declare function withTestDocAndSettings(persistence: boolean, settings: firestore.Settings, fn: (doc: firestore.DocumentReference) => Promise<void>): Promise<void>;
|
|
42
|
-
export declare function withTestDocAndInitialData(persistence: boolean, initialData: firestore.DocumentData | null, fn: (doc: firestore.DocumentReference) => Promise<void>): Promise<void>;
|
|
43
|
-
export declare function withTestCollection(persistence: boolean, docs: {
|
|
44
|
-
[key: string]: firestore.DocumentData;
|
|
45
|
-
}, fn: (collection: firestore.CollectionReference) => Promise<void>): Promise<void>;
|
|
46
|
-
export declare function withTestCollectionSettings(persistence: boolean, settings: firestore.Settings, docs: {
|
|
47
|
-
[key: string]: firestore.DocumentData;
|
|
48
|
-
}, fn: (collection: firestore.CollectionReference) => Promise<void>): Promise<void>;
|
|
49
|
-
export {};
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2022 Google LLC
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
import * as firestore from '@firebase/firestore-types';
|
|
18
|
+
export declare function isPersistenceAvailable(): boolean;
|
|
19
|
+
type ApiSuiteFunction = (message: string, testSuite: (persistence: boolean) => void) => void;
|
|
20
|
+
interface ApiDescribe {
|
|
21
|
+
(message: string, testSuite: (persistence: boolean) => void): void;
|
|
22
|
+
skip: ApiSuiteFunction;
|
|
23
|
+
only: ApiSuiteFunction;
|
|
24
|
+
}
|
|
25
|
+
export declare const apiDescribe: ApiDescribe;
|
|
26
|
+
/** Converts the documents in a QuerySnapshot to an array with the data of each document. */
|
|
27
|
+
export declare function toDataArray(docSet: firestore.QuerySnapshot): firestore.DocumentData[];
|
|
28
|
+
/** Converts the changes in a QuerySnapshot to an array with the data of each document. */
|
|
29
|
+
export declare function toChangesArray(docSet: firestore.QuerySnapshot, options?: firestore.SnapshotListenOptions): firestore.DocumentData[];
|
|
30
|
+
export declare function toDataMap(docSet: firestore.QuerySnapshot): {
|
|
31
|
+
[field: string]: firestore.DocumentData;
|
|
32
|
+
};
|
|
33
|
+
/** Converts a DocumentSet to an array with the id of each document */
|
|
34
|
+
export declare function toIds(docSet: firestore.QuerySnapshot): string[];
|
|
35
|
+
export declare function withTestDb(persistence: boolean, fn: (db: firestore.FirebaseFirestore) => Promise<void>): Promise<void>;
|
|
36
|
+
/** Runs provided fn with a db for an alternate project id. */
|
|
37
|
+
export declare function withAlternateTestDb(persistence: boolean, fn: (db: firestore.FirebaseFirestore) => Promise<void>): Promise<void>;
|
|
38
|
+
export declare function withTestDbs(persistence: boolean, numDbs: number, fn: (db: firestore.FirebaseFirestore[]) => Promise<void>): Promise<void>;
|
|
39
|
+
export declare function withTestDbsSettings(persistence: boolean, projectId: string, settings: firestore.Settings, numDbs: number, fn: (db: firestore.FirebaseFirestore[]) => Promise<void>): Promise<void>;
|
|
40
|
+
export declare function withTestDoc(persistence: boolean, fn: (doc: firestore.DocumentReference) => Promise<void>): Promise<void>;
|
|
41
|
+
export declare function withTestDocAndSettings(persistence: boolean, settings: firestore.Settings, fn: (doc: firestore.DocumentReference) => Promise<void>): Promise<void>;
|
|
42
|
+
export declare function withTestDocAndInitialData(persistence: boolean, initialData: firestore.DocumentData | null, fn: (doc: firestore.DocumentReference) => Promise<void>): Promise<void>;
|
|
43
|
+
export declare function withTestCollection(persistence: boolean, docs: {
|
|
44
|
+
[key: string]: firestore.DocumentData;
|
|
45
|
+
}, fn: (collection: firestore.CollectionReference) => Promise<void>): Promise<void>;
|
|
46
|
+
export declare function withTestCollectionSettings(persistence: boolean, settings: firestore.Settings, docs: {
|
|
47
|
+
[key: string]: firestore.DocumentData;
|
|
48
|
+
}, fn: (collection: firestore.CollectionReference) => Promise<void>): Promise<void>;
|
|
49
|
+
export {};
|
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2022 Google LLC
|
|
4
|
-
*
|
|
5
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
-
* you may not use this file except in compliance with the License.
|
|
7
|
-
* You may obtain a copy of the License at
|
|
8
|
-
*
|
|
9
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
-
*
|
|
11
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
-
* See the License for the specific language governing permissions and
|
|
15
|
-
* limitations under the License.
|
|
16
|
-
*/
|
|
17
|
-
export interface Resolver<R> {
|
|
18
|
-
(value: R | Promise<R>): void;
|
|
19
|
-
}
|
|
20
|
-
export interface Rejecter {
|
|
21
|
-
(reason?: Error): void;
|
|
22
|
-
}
|
|
23
|
-
export declare class Deferred<R> {
|
|
24
|
-
promise: Promise<R>;
|
|
25
|
-
resolve: Resolver<R>;
|
|
26
|
-
reject: Rejecter;
|
|
27
|
-
constructor();
|
|
28
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2022 Google LLC
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
export interface Resolver<R> {
|
|
18
|
+
(value: R | Promise<R>): void;
|
|
19
|
+
}
|
|
20
|
+
export interface Rejecter {
|
|
21
|
+
(reason?: Error): void;
|
|
22
|
+
}
|
|
23
|
+
export declare class Deferred<R> {
|
|
24
|
+
promise: Promise<R>;
|
|
25
|
+
resolve: Resolver<R>;
|
|
26
|
+
reject: Rejecter;
|
|
27
|
+
constructor();
|
|
28
|
+
}
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2022 Google LLC
|
|
4
|
-
*
|
|
5
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
-
* you may not use this file except in compliance with the License.
|
|
7
|
-
* You may obtain a copy of the License at
|
|
8
|
-
*
|
|
9
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
-
*
|
|
11
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
-
* See the License for the specific language governing permissions and
|
|
15
|
-
* limitations under the License.
|
|
16
|
-
*/
|
|
17
|
-
export declare const USE_EMULATOR: boolean;
|
|
18
|
-
export declare const DEFAULT_SETTINGS: {
|
|
19
|
-
host: string;
|
|
20
|
-
ssl: boolean;
|
|
21
|
-
};
|
|
22
|
-
export declare const DEFAULT_PROJECT_ID: any;
|
|
23
|
-
export declare const ALT_PROJECT_ID = "test-db2";
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2022 Google LLC
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
export declare const USE_EMULATOR: boolean;
|
|
18
|
+
export declare const DEFAULT_SETTINGS: {
|
|
19
|
+
host: string;
|
|
20
|
+
ssl: boolean;
|
|
21
|
+
};
|
|
22
|
+
export declare const DEFAULT_PROJECT_ID: any;
|
|
23
|
+
export declare const ALT_PROJECT_ID = "test-db2";
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2022 Google LLC
|
|
4
|
-
*
|
|
5
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
-
* you may not use this file except in compliance with the License.
|
|
7
|
-
* You may obtain a copy of the License at
|
|
8
|
-
*
|
|
9
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
-
*
|
|
11
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
-
* See the License for the specific language governing permissions and
|
|
15
|
-
* limitations under the License.
|
|
16
|
-
*/
|
|
17
|
-
export {};
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2022 Google LLC
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@firebase/firestore-compat",
|
|
3
|
-
"version": "0.4.0-
|
|
3
|
+
"version": "0.4.0-20250715195345",
|
|
4
4
|
"description": "The Cloud Firestore component of the Firebase JS SDK.",
|
|
5
5
|
"author": "Firebase <firebase-support@google.com> (https://firebase.google.com/)",
|
|
6
6
|
"main": "dist/index.node.cjs.js",
|
|
7
7
|
"react-native": "dist/index.rn.js",
|
|
8
|
-
"browser": "dist/index.
|
|
9
|
-
"module": "dist/index.
|
|
10
|
-
"esm5": "dist/index.esm5.js",
|
|
8
|
+
"browser": "dist/index.esm.js",
|
|
9
|
+
"module": "dist/index.esm.js",
|
|
11
10
|
"exports": {
|
|
12
11
|
".": {
|
|
13
12
|
"types": "./dist/src/index.d.ts",
|
|
@@ -16,12 +15,11 @@
|
|
|
16
15
|
"require": "./dist/index.node.cjs.js"
|
|
17
16
|
},
|
|
18
17
|
"react-native": "./dist/index.rn.js",
|
|
19
|
-
"esm5": "./dist/index.esm5.js",
|
|
20
18
|
"browser": {
|
|
21
19
|
"require": "./dist/index.cjs.js",
|
|
22
|
-
"import": "./dist/index.
|
|
20
|
+
"import": "./dist/index.esm.js"
|
|
23
21
|
},
|
|
24
|
-
"default": "./dist/index.
|
|
22
|
+
"default": "./dist/index.esm.js"
|
|
25
23
|
},
|
|
26
24
|
"./package.json": "./package.json"
|
|
27
25
|
},
|
|
@@ -36,42 +34,46 @@
|
|
|
36
34
|
"build:console": "node tools/console.build.js",
|
|
37
35
|
"build:deps": "lerna run --scope @firebase/firestore-compat --include-dependencies build",
|
|
38
36
|
"build:release": "yarn build && yarn add-compat-overloads",
|
|
39
|
-
"test": "run-s lint test:all",
|
|
37
|
+
"test": "run-s --npm-path npm lint test:all",
|
|
40
38
|
"test:ci": "node ../../scripts/run_tests_in_ci.js -s test:all",
|
|
41
|
-
"test:all": "run-p test:browser test:node",
|
|
42
|
-
"test:browser": "karma start
|
|
39
|
+
"test:all": "run-p --npm-path npm test:browser test:node",
|
|
40
|
+
"test:browser": "karma start",
|
|
43
41
|
"test:node": "mocha --require babel-register.js --require src/index.node.ts --timeout 5000 'test/*.test.ts'",
|
|
42
|
+
"trusted-type-check": "tsec -p tsconfig.json --noEmit",
|
|
44
43
|
"add-compat-overloads": "ts-node-script ../../scripts/build/create-overloads.ts -i ../firestore/dist/index.d.ts -o dist/src/index.d.ts -a -r Firestore:types.FirebaseFirestore -r CollectionReference:types.CollectionReference -r DocumentReference:types.DocumentReference -r Query:types.Query -r FirebaseApp:FirebaseAppCompat --moduleToEnhance @firebase/firestore"
|
|
45
44
|
},
|
|
46
45
|
"peerDependencies": {
|
|
47
|
-
"@firebase/app-compat": "0.
|
|
46
|
+
"@firebase/app-compat": "0.5.0-20250715195345"
|
|
48
47
|
},
|
|
49
48
|
"dependencies": {
|
|
50
|
-
"@firebase/component": "0.
|
|
51
|
-
"@firebase/firestore": "
|
|
52
|
-
"@firebase/util": "1.
|
|
53
|
-
"@firebase/firestore-types": "
|
|
49
|
+
"@firebase/component": "0.7.0-20250715195345",
|
|
50
|
+
"@firebase/firestore": "4.9.0-20250715195345",
|
|
51
|
+
"@firebase/util": "1.13.0-20250715195345",
|
|
52
|
+
"@firebase/firestore-types": "3.0.3",
|
|
54
53
|
"tslib": "^2.1.0"
|
|
55
54
|
},
|
|
56
55
|
"devDependencies": {
|
|
57
|
-
"@firebase/app-compat": "0.
|
|
56
|
+
"@firebase/app-compat": "0.5.0-20250715195345",
|
|
58
57
|
"@types/eslint": "7.29.0",
|
|
59
|
-
"rollup": "2.79.
|
|
58
|
+
"rollup": "2.79.2",
|
|
60
59
|
"rollup-plugin-sourcemaps": "0.6.3",
|
|
61
|
-
"rollup
|
|
62
|
-
"rollup-plugin-typescript2": "0.
|
|
63
|
-
"@rollup/plugin-node-resolve": "
|
|
64
|
-
"ts-node": "10.9.
|
|
65
|
-
"typescript": "
|
|
60
|
+
"@rollup/plugin-terser": "0.4.4",
|
|
61
|
+
"rollup-plugin-typescript2": "0.36.0",
|
|
62
|
+
"@rollup/plugin-node-resolve": "16.0.0",
|
|
63
|
+
"ts-node": "10.9.2",
|
|
64
|
+
"typescript": "5.5.4"
|
|
66
65
|
},
|
|
67
66
|
"license": "Apache-2.0",
|
|
68
67
|
"typings": "dist/src/index.d.ts",
|
|
69
68
|
"repository": {
|
|
70
69
|
"directory": "packages/firestore-compat",
|
|
71
70
|
"type": "git",
|
|
72
|
-
"url": "https://github.com/firebase/firebase-js-sdk.git"
|
|
71
|
+
"url": "git+https://github.com/firebase/firebase-js-sdk.git"
|
|
73
72
|
},
|
|
74
73
|
"bugs": {
|
|
75
74
|
"url": "https://github.com/firebase/firebase-js-sdk/issues"
|
|
75
|
+
},
|
|
76
|
+
"engines": {
|
|
77
|
+
"node": ">=20.0.0"
|
|
76
78
|
}
|
|
77
79
|
}
|