@firebase/firestore 1.14.0-canary.daf63c2c → 1.14.0
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/dist/index.esm2017.d.ts +2 -2
- package/dist/dist/index.memory.esm2017.d.ts +2 -2
- package/dist/index.cjs.js +872 -874
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +933 -935
- package/dist/index.esm.js.map +1 -1
- package/dist/index.esm2017.js +746 -780
- package/dist/index.esm2017.js.map +1 -1
- package/dist/index.memory.cjs.js +604 -651
- package/dist/index.memory.cjs.js.map +1 -1
- package/dist/index.memory.esm.js +882 -929
- package/dist/index.memory.esm.js.map +1 -1
- package/dist/index.memory.esm2017.js +387 -422
- package/dist/index.memory.esm2017.js.map +1 -1
- package/dist/index.memory.node.cjs.js +21 -81
- package/dist/index.memory.node.cjs.js.map +1 -1
- package/dist/index.memory.node.esm2017.js +19 -64
- package/dist/index.memory.node.esm2017.js.map +1 -1
- package/dist/index.node.cjs.js +110 -117
- package/dist/index.node.cjs.js.map +1 -1
- package/dist/index.node.esm2017.js +66 -96
- package/dist/index.node.esm2017.js.map +1 -1
- package/dist/lib/src/core/component_provider.d.ts +19 -35
- package/dist/lib/src/local/indexeddb_persistence.d.ts +2 -2
- package/dist/lib/src/local/memory_persistence.d.ts +0 -1
- package/dist/lib/src/local/persistence.d.ts +0 -2
- package/dist/src/core/component_provider.d.ts +19 -35
- package/dist/src/local/indexeddb_persistence.d.ts +2 -2
- package/dist/src/local/memory_persistence.d.ts +0 -1
- package/dist/src/local/persistence.d.ts +0 -2
- package/package.json +12 -12
|
@@ -26,16 +26,8 @@ import { Datastore } from '../remote/datastore';
|
|
|
26
26
|
import { User } from '../auth/user';
|
|
27
27
|
import { PersistenceSettings } from './firestore_client';
|
|
28
28
|
import { GarbageCollectionScheduler, Persistence } from '../local/persistence';
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
databaseInfo: DatabaseInfo;
|
|
32
|
-
platform: Platform;
|
|
33
|
-
datastore: Datastore;
|
|
34
|
-
clientId: ClientId;
|
|
35
|
-
initialUser: User;
|
|
36
|
-
maxConcurrentLimboResolutions: number;
|
|
37
|
-
persistenceSettings: PersistenceSettings;
|
|
38
|
-
}
|
|
29
|
+
import { IndexedDbPersistence } from '../local/indexeddb_persistence';
|
|
30
|
+
import { MemoryPersistence, MemoryReferenceDelegate } from '../local/memory_persistence';
|
|
39
31
|
/**
|
|
40
32
|
* Initializes and wires up all core components for Firestore. Implementations
|
|
41
33
|
* override `initialize()` to provide all components.
|
|
@@ -48,44 +40,36 @@ export interface ComponentProvider {
|
|
|
48
40
|
gcScheduler: GarbageCollectionScheduler | null;
|
|
49
41
|
remoteStore: RemoteStore;
|
|
50
42
|
eventManager: EventManager;
|
|
51
|
-
initialize(
|
|
43
|
+
initialize(asyncQueue: AsyncQueue, databaseInfo: DatabaseInfo, platform: Platform, datastore: Datastore, clientId: ClientId, initialUser: User, maxConcurrentLimboResolutions: number, persistenceSettings: PersistenceSettings): Promise<void>;
|
|
52
44
|
clearPersistence(databaseId: DatabaseInfo): Promise<void>;
|
|
53
45
|
}
|
|
54
46
|
/**
|
|
55
|
-
* Provides all components needed for Firestore with
|
|
56
|
-
* Uses EagerGC garbage collection.
|
|
47
|
+
* Provides all components needed for Firestore with IndexedDB persistence.
|
|
57
48
|
*/
|
|
58
|
-
export declare class
|
|
59
|
-
persistence:
|
|
49
|
+
export declare class IndexedDbComponentProvider implements ComponentProvider {
|
|
50
|
+
persistence: IndexedDbPersistence;
|
|
60
51
|
sharedClientState: SharedClientState;
|
|
61
52
|
localStore: LocalStore;
|
|
62
53
|
syncEngine: SyncEngine;
|
|
63
54
|
gcScheduler: GarbageCollectionScheduler | null;
|
|
64
55
|
remoteStore: RemoteStore;
|
|
65
56
|
eventManager: EventManager;
|
|
66
|
-
initialize(
|
|
67
|
-
createEventManager(cfg: ComponentConfiguration): EventManager;
|
|
68
|
-
createGarbageCollectionScheduler(cfg: ComponentConfiguration): GarbageCollectionScheduler | null;
|
|
69
|
-
createLocalStore(cfg: ComponentConfiguration): LocalStore;
|
|
70
|
-
createPersistence(cfg: ComponentConfiguration): Persistence;
|
|
71
|
-
createRemoteStore(cfg: ComponentConfiguration): RemoteStore;
|
|
72
|
-
createSharedClientState(cfg: ComponentConfiguration): SharedClientState;
|
|
73
|
-
createSyncEngine(cfg: ComponentConfiguration): SyncEngine;
|
|
57
|
+
initialize(asyncQueue: AsyncQueue, databaseInfo: DatabaseInfo, platform: Platform, datastore: Datastore, clientId: ClientId, initialUser: User, maxConcurrentLimboResolutions: number, persistenceSettings: PersistenceSettings): Promise<void>;
|
|
74
58
|
clearPersistence(databaseInfo: DatabaseInfo): Promise<void>;
|
|
75
59
|
}
|
|
76
60
|
/**
|
|
77
61
|
* Provides all components needed for Firestore with in-memory persistence.
|
|
78
|
-
* Uses LRU garbage collection.
|
|
79
|
-
*/
|
|
80
|
-
export declare class MemoryLruComponentProvider extends MemoryComponentProvider {
|
|
81
|
-
createPersistence(cfg: ComponentConfiguration): Persistence;
|
|
82
|
-
}
|
|
83
|
-
/**
|
|
84
|
-
* Provides all components needed for Firestore with IndexedDB persistence.
|
|
85
62
|
*/
|
|
86
|
-
export declare class
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
63
|
+
export declare class MemoryComponentProvider implements ComponentProvider {
|
|
64
|
+
readonly referenceDelegateFactory: (p: MemoryPersistence) => MemoryReferenceDelegate;
|
|
65
|
+
persistence: Persistence;
|
|
66
|
+
sharedClientState: SharedClientState;
|
|
67
|
+
localStore: LocalStore;
|
|
68
|
+
syncEngine: SyncEngine;
|
|
69
|
+
gcScheduler: GarbageCollectionScheduler | null;
|
|
70
|
+
remoteStore: RemoteStore;
|
|
71
|
+
eventManager: EventManager;
|
|
72
|
+
constructor(referenceDelegateFactory?: (p: MemoryPersistence) => MemoryReferenceDelegate);
|
|
73
|
+
initialize(asyncQueue: AsyncQueue, databaseInfo: DatabaseInfo, platform: Platform, datastore: Datastore, clientId: ClientId, initialUser: User, maxConcurrentLimboResolutions: number, persistenceSettings: PersistenceSettings): Promise<void>;
|
|
74
|
+
clearPersistence(): never;
|
|
91
75
|
}
|
|
@@ -105,7 +105,7 @@ export declare class IndexedDbPersistence implements Persistence {
|
|
|
105
105
|
queue: AsyncQueue;
|
|
106
106
|
serializer: JsonProtoSerializer;
|
|
107
107
|
sequenceNumberSyncer: SequenceNumberSyncer;
|
|
108
|
-
}): IndexedDbPersistence
|
|
108
|
+
}): Promise<IndexedDbPersistence>;
|
|
109
109
|
private readonly document;
|
|
110
110
|
private readonly window;
|
|
111
111
|
private simpleDb;
|
|
@@ -137,7 +137,7 @@ export declare class IndexedDbPersistence implements Persistence {
|
|
|
137
137
|
*
|
|
138
138
|
* @return {Promise<void>} Whether persistence was enabled.
|
|
139
139
|
*/
|
|
140
|
-
start
|
|
140
|
+
private start;
|
|
141
141
|
setPrimaryStateListener(primaryStateListener: PrimaryStateListener): Promise<void>;
|
|
142
142
|
setDatabaseDeletedListener(databaseDeletedListener: () => Promise<void>): void;
|
|
143
143
|
setNetworkEnabled(networkEnabled: boolean): void;
|
|
@@ -55,7 +55,6 @@ export declare class MemoryPersistence implements Persistence {
|
|
|
55
55
|
* checked or asserted on every access.
|
|
56
56
|
*/
|
|
57
57
|
constructor(clientId: ClientId, referenceDelegateFactory: (p: MemoryPersistence) => MemoryReferenceDelegate);
|
|
58
|
-
start(): Promise<void>;
|
|
59
58
|
shutdown(): Promise<void>;
|
|
60
59
|
get started(): boolean;
|
|
61
60
|
getActiveClients(): Promise<ClientId[]>;
|
|
@@ -26,16 +26,8 @@ import { Datastore } from '../remote/datastore';
|
|
|
26
26
|
import { User } from '../auth/user';
|
|
27
27
|
import { PersistenceSettings } from './firestore_client';
|
|
28
28
|
import { GarbageCollectionScheduler, Persistence } from '../local/persistence';
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
databaseInfo: DatabaseInfo;
|
|
32
|
-
platform: Platform;
|
|
33
|
-
datastore: Datastore;
|
|
34
|
-
clientId: ClientId;
|
|
35
|
-
initialUser: User;
|
|
36
|
-
maxConcurrentLimboResolutions: number;
|
|
37
|
-
persistenceSettings: PersistenceSettings;
|
|
38
|
-
}
|
|
29
|
+
import { IndexedDbPersistence } from '../local/indexeddb_persistence';
|
|
30
|
+
import { MemoryPersistence, MemoryReferenceDelegate } from '../local/memory_persistence';
|
|
39
31
|
/**
|
|
40
32
|
* Initializes and wires up all core components for Firestore. Implementations
|
|
41
33
|
* override `initialize()` to provide all components.
|
|
@@ -48,44 +40,36 @@ export interface ComponentProvider {
|
|
|
48
40
|
gcScheduler: GarbageCollectionScheduler | null;
|
|
49
41
|
remoteStore: RemoteStore;
|
|
50
42
|
eventManager: EventManager;
|
|
51
|
-
initialize(
|
|
43
|
+
initialize(asyncQueue: AsyncQueue, databaseInfo: DatabaseInfo, platform: Platform, datastore: Datastore, clientId: ClientId, initialUser: User, maxConcurrentLimboResolutions: number, persistenceSettings: PersistenceSettings): Promise<void>;
|
|
52
44
|
clearPersistence(databaseId: DatabaseInfo): Promise<void>;
|
|
53
45
|
}
|
|
54
46
|
/**
|
|
55
|
-
* Provides all components needed for Firestore with
|
|
56
|
-
* Uses EagerGC garbage collection.
|
|
47
|
+
* Provides all components needed for Firestore with IndexedDB persistence.
|
|
57
48
|
*/
|
|
58
|
-
export declare class
|
|
59
|
-
persistence:
|
|
49
|
+
export declare class IndexedDbComponentProvider implements ComponentProvider {
|
|
50
|
+
persistence: IndexedDbPersistence;
|
|
60
51
|
sharedClientState: SharedClientState;
|
|
61
52
|
localStore: LocalStore;
|
|
62
53
|
syncEngine: SyncEngine;
|
|
63
54
|
gcScheduler: GarbageCollectionScheduler | null;
|
|
64
55
|
remoteStore: RemoteStore;
|
|
65
56
|
eventManager: EventManager;
|
|
66
|
-
initialize(
|
|
67
|
-
createEventManager(cfg: ComponentConfiguration): EventManager;
|
|
68
|
-
createGarbageCollectionScheduler(cfg: ComponentConfiguration): GarbageCollectionScheduler | null;
|
|
69
|
-
createLocalStore(cfg: ComponentConfiguration): LocalStore;
|
|
70
|
-
createPersistence(cfg: ComponentConfiguration): Persistence;
|
|
71
|
-
createRemoteStore(cfg: ComponentConfiguration): RemoteStore;
|
|
72
|
-
createSharedClientState(cfg: ComponentConfiguration): SharedClientState;
|
|
73
|
-
createSyncEngine(cfg: ComponentConfiguration): SyncEngine;
|
|
57
|
+
initialize(asyncQueue: AsyncQueue, databaseInfo: DatabaseInfo, platform: Platform, datastore: Datastore, clientId: ClientId, initialUser: User, maxConcurrentLimboResolutions: number, persistenceSettings: PersistenceSettings): Promise<void>;
|
|
74
58
|
clearPersistence(databaseInfo: DatabaseInfo): Promise<void>;
|
|
75
59
|
}
|
|
76
60
|
/**
|
|
77
61
|
* Provides all components needed for Firestore with in-memory persistence.
|
|
78
|
-
* Uses LRU garbage collection.
|
|
79
|
-
*/
|
|
80
|
-
export declare class MemoryLruComponentProvider extends MemoryComponentProvider {
|
|
81
|
-
createPersistence(cfg: ComponentConfiguration): Persistence;
|
|
82
|
-
}
|
|
83
|
-
/**
|
|
84
|
-
* Provides all components needed for Firestore with IndexedDB persistence.
|
|
85
62
|
*/
|
|
86
|
-
export declare class
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
63
|
+
export declare class MemoryComponentProvider implements ComponentProvider {
|
|
64
|
+
readonly referenceDelegateFactory: (p: MemoryPersistence) => MemoryReferenceDelegate;
|
|
65
|
+
persistence: Persistence;
|
|
66
|
+
sharedClientState: SharedClientState;
|
|
67
|
+
localStore: LocalStore;
|
|
68
|
+
syncEngine: SyncEngine;
|
|
69
|
+
gcScheduler: GarbageCollectionScheduler | null;
|
|
70
|
+
remoteStore: RemoteStore;
|
|
71
|
+
eventManager: EventManager;
|
|
72
|
+
constructor(referenceDelegateFactory?: (p: MemoryPersistence) => MemoryReferenceDelegate);
|
|
73
|
+
initialize(asyncQueue: AsyncQueue, databaseInfo: DatabaseInfo, platform: Platform, datastore: Datastore, clientId: ClientId, initialUser: User, maxConcurrentLimboResolutions: number, persistenceSettings: PersistenceSettings): Promise<void>;
|
|
74
|
+
clearPersistence(): never;
|
|
91
75
|
}
|
|
@@ -105,7 +105,7 @@ export declare class IndexedDbPersistence implements Persistence {
|
|
|
105
105
|
queue: AsyncQueue;
|
|
106
106
|
serializer: JsonProtoSerializer;
|
|
107
107
|
sequenceNumberSyncer: SequenceNumberSyncer;
|
|
108
|
-
}): IndexedDbPersistence
|
|
108
|
+
}): Promise<IndexedDbPersistence>;
|
|
109
109
|
private readonly document;
|
|
110
110
|
private readonly window;
|
|
111
111
|
private simpleDb;
|
|
@@ -137,7 +137,7 @@ export declare class IndexedDbPersistence implements Persistence {
|
|
|
137
137
|
*
|
|
138
138
|
* @return {Promise<void>} Whether persistence was enabled.
|
|
139
139
|
*/
|
|
140
|
-
start
|
|
140
|
+
private start;
|
|
141
141
|
setPrimaryStateListener(primaryStateListener: PrimaryStateListener): Promise<void>;
|
|
142
142
|
setDatabaseDeletedListener(databaseDeletedListener: () => Promise<void>): void;
|
|
143
143
|
setNetworkEnabled(networkEnabled: boolean): void;
|
|
@@ -55,7 +55,6 @@ export declare class MemoryPersistence implements Persistence {
|
|
|
55
55
|
* checked or asserted on every access.
|
|
56
56
|
*/
|
|
57
57
|
constructor(clientId: ClientId, referenceDelegateFactory: (p: MemoryPersistence) => MemoryReferenceDelegate);
|
|
58
|
-
start(): Promise<void>;
|
|
59
58
|
shutdown(): Promise<void>;
|
|
60
59
|
get started(): boolean;
|
|
61
60
|
getActiveClients(): Promise<ClientId[]>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@firebase/firestore",
|
|
3
|
-
"version": "1.14.0
|
|
3
|
+
"version": "1.14.0",
|
|
4
4
|
"engines": {
|
|
5
5
|
"node": "^8.13.0 || >=10.10.0"
|
|
6
6
|
},
|
|
@@ -39,32 +39,32 @@
|
|
|
39
39
|
"memory/package.json"
|
|
40
40
|
],
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@firebase/component": "0.1.9
|
|
43
|
-
"@firebase/firestore-types": "1.10.1
|
|
44
|
-
"@firebase/logger": "0.2.1
|
|
45
|
-
"@firebase/util": "0.2.44
|
|
46
|
-
"@firebase/webchannel-wrapper": "0.2.38
|
|
47
|
-
"@grpc/grpc-js": "0.
|
|
42
|
+
"@firebase/component": "0.1.9",
|
|
43
|
+
"@firebase/firestore-types": "1.10.1",
|
|
44
|
+
"@firebase/logger": "0.2.1",
|
|
45
|
+
"@firebase/util": "0.2.44",
|
|
46
|
+
"@firebase/webchannel-wrapper": "0.2.38",
|
|
47
|
+
"@grpc/grpc-js": "0.7.5",
|
|
48
48
|
"@grpc/proto-loader": "^0.5.0",
|
|
49
49
|
"tslib": "1.11.1"
|
|
50
50
|
},
|
|
51
51
|
"peerDependencies": {
|
|
52
|
-
"@firebase/app": "0.
|
|
53
|
-
"@firebase/app-types": "0.
|
|
52
|
+
"@firebase/app": "0.x",
|
|
53
|
+
"@firebase/app-types": "0.x"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
56
|
"@types/json-stable-stringify": "1.0.32",
|
|
57
57
|
"json-stable-stringify": "1.0.1",
|
|
58
58
|
"protobufjs": "6.8.9",
|
|
59
|
-
"rollup": "2.6
|
|
59
|
+
"rollup": "2.0.6",
|
|
60
60
|
"rollup-plugin-copy-assets": "1.1.0",
|
|
61
61
|
"rollup-plugin-json": "4.0.0",
|
|
62
62
|
"rollup-plugin-node-resolve": "5.2.0",
|
|
63
63
|
"rollup-plugin-replace": "2.2.0",
|
|
64
64
|
"rollup-plugin-sourcemaps": "0.5.0",
|
|
65
65
|
"rollup-plugin-terser": "5.3.0",
|
|
66
|
-
"rollup-plugin-typescript2": "0.
|
|
67
|
-
"ts-node": "8.
|
|
66
|
+
"rollup-plugin-typescript2": "0.26.0",
|
|
67
|
+
"ts-node": "8.6.2",
|
|
68
68
|
"typescript": "3.8.3"
|
|
69
69
|
},
|
|
70
70
|
"repository": {
|