Skip to content

Commit 123fee3

Browse files
Merge main into release
2 parents 52e9e4e + beaa4df commit 123fee3

File tree

95 files changed

+5048
-222
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

95 files changed

+5048
-222
lines changed

.changeset/cold-chairs-fold.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
"firebase": minor
3+
"@firebase/app": patch
4+
"@firebase/data-connect": minor
5+
---
6+
7+
Included Data Connect product.

.changeset/sharp-dingos-admire.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@firebase/firestore": patch
3+
---
4+
5+
Re-enable useFetchStreams with the latest WebChannel implementation. This reduces the memory usage of WebChannel.

.changeset/small-geckos-mix.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@firebase/firestore': patch
3+
---
4+
5+
Refactor Firestore client instantiation. This prepares for future features that require client to restart.

.github/workflows/canary-deploy.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ jobs:
5252
NPM_TOKEN_AUTH_INTEROP_TYPES: ${{secrets.NPM_TOKEN_AUTH_INTEROP_TYPES}}
5353
NPM_TOKEN_AUTH_TYPES: ${{secrets.NPM_TOKEN_AUTH_TYPES}}
5454
NPM_TOKEN_COMPONENT: ${{secrets.NPM_TOKEN_COMPONENT}}
55+
NPM_TOKEN_DATA_CONNECT: ${{secrets.NPM_TOKEN_DATA_CONNECT}}
5556
NPM_TOKEN_DATABASE: ${{secrets.NPM_TOKEN_DATABASE}}
5657
NPM_TOKEN_DATABASE_TYPES: ${{secrets.NPM_TOKEN_DATABASE_TYPES}}
5758
NPM_TOKEN_FIRESTORE: ${{secrets.NPM_TOKEN_FIRESTORE}}

.github/workflows/prerelease-manual-deploy.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ jobs:
5555
NPM_TOKEN_AUTH_INTEROP_TYPES: ${{secrets.NPM_TOKEN_AUTH_INTEROP_TYPES}}
5656
NPM_TOKEN_AUTH_TYPES: ${{secrets.NPM_TOKEN_AUTH_TYPES}}
5757
NPM_TOKEN_COMPONENT: ${{secrets.NPM_TOKEN_COMPONENT}}
58+
NPM_TOKEN_DATA_CONNECT: ${{secrets.NPM_TOKEN_DATA_CONNECT}}
5859
NPM_TOKEN_DATABASE: ${{secrets.NPM_TOKEN_DATABASE}}
5960
NPM_TOKEN_DATABASE_TYPES: ${{secrets.NPM_TOKEN_DATABASE_TYPES}}
6061
NPM_TOKEN_FIRESTORE: ${{secrets.NPM_TOKEN_FIRESTORE}}

.github/workflows/release-prod.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ jobs:
6565
NPM_TOKEN_AUTH_INTEROP_TYPES: ${{secrets.NPM_TOKEN_AUTH_INTEROP_TYPES}}
6666
NPM_TOKEN_AUTH_TYPES: ${{secrets.NPM_TOKEN_AUTH_TYPES}}
6767
NPM_TOKEN_COMPONENT: ${{secrets.NPM_TOKEN_COMPONENT}}
68+
NPM_TOKEN_DATA_CONNECT: ${{secrets.NPM_TOKEN_DATA_CONNECT}}
6869
NPM_TOKEN_DATABASE: ${{secrets.NPM_TOKEN_DATABASE}}
6970
NPM_TOKEN_DATABASE_TYPES: ${{secrets.NPM_TOKEN_DATABASE_TYPES}}
7071
NPM_TOKEN_FIRESTORE: ${{secrets.NPM_TOKEN_FIRESTORE}}

.github/workflows/release-staging.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ jobs:
9191
NPM_TOKEN_AUTH_INTEROP_TYPES: ${{secrets.NPM_TOKEN_AUTH_INTEROP_TYPES}}
9292
NPM_TOKEN_AUTH_TYPES: ${{secrets.NPM_TOKEN_AUTH_TYPES}}
9393
NPM_TOKEN_COMPONENT: ${{secrets.NPM_TOKEN_COMPONENT}}
94+
NPM_TOKEN_DATA_CONNECT: ${{secrets.NPM_TOKEN_DATA_CONNECT}}
9495
NPM_TOKEN_DATABASE: ${{secrets.NPM_TOKEN_DATABASE}}
9596
NPM_TOKEN_DATABASE_TYPES: ${{secrets.NPM_TOKEN_DATABASE_TYPES}}
9697
NPM_TOKEN_FIRESTORE: ${{secrets.NPM_TOKEN_FIRESTORE}}

common/api-review/data-connect.api.md

Lines changed: 234 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,234 @@
1+
## API Report File for "@firebase/data-connect"
2+
3+
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
4+
5+
```ts
6+
7+
import { AppCheckInternalComponentName } from '@firebase/app-check-interop-types';
8+
import { FirebaseApp } from '@firebase/app';
9+
import { FirebaseAuthInternalName } from '@firebase/auth-interop-types';
10+
import { FirebaseError } from '@firebase/util';
11+
import { LogLevelString } from '@firebase/logger';
12+
import { Provider } from '@firebase/component';
13+
14+
// @public (undocumented)
15+
export interface CancellableOperation<T> extends PromiseLike<{
16+
data: T;
17+
}> {
18+
// (undocumented)
19+
cancel: () => void;
20+
}
21+
22+
// @public
23+
export function connectDataConnectEmulator(dc: DataConnect, host: string, port?: number, sslEnabled?: boolean): void;
24+
25+
// @public
26+
export interface ConnectorConfig {
27+
// (undocumented)
28+
connector: string;
29+
// (undocumented)
30+
location: string;
31+
// (undocumented)
32+
service: string;
33+
}
34+
35+
// @public
36+
export class DataConnect {
37+
constructor(app: FirebaseApp, dataConnectOptions: DataConnectOptions, _authProvider: Provider<FirebaseAuthInternalName>, _appCheckProvider: Provider<AppCheckInternalComponentName>);
38+
// (undocumented)
39+
readonly app: FirebaseApp;
40+
// (undocumented)
41+
enableEmulator(transportOptions: TransportOptions): void;
42+
// (undocumented)
43+
getSettings(): ConnectorConfig;
44+
// (undocumented)
45+
isEmulator: boolean;
46+
// (undocumented)
47+
setInitialized(): void;
48+
}
49+
50+
// @public
51+
export interface DataConnectOptions extends ConnectorConfig {
52+
// (undocumented)
53+
projectId: string;
54+
}
55+
56+
// @public (undocumented)
57+
export interface DataConnectResult<Data, Variables> extends OpResult<Data> {
58+
// (undocumented)
59+
ref: OperationRef<Data, Variables>;
60+
}
61+
62+
// @public
63+
export interface DataConnectSubscription<Data, Variables> {
64+
// (undocumented)
65+
errCallback?: (e?: FirebaseError) => void;
66+
// (undocumented)
67+
unsubscribe: () => void;
68+
// (undocumented)
69+
userCallback: OnResultSubscription<Data, Variables>;
70+
}
71+
72+
// @public (undocumented)
73+
export type DataSource = typeof SOURCE_CACHE | typeof SOURCE_SERVER;
74+
75+
// @public
76+
export function executeMutation<Data, Variables>(mutationRef: MutationRef<Data, Variables>): MutationPromise<Data, Variables>;
77+
78+
// @public
79+
export function executeQuery<Data, Variables>(queryRef: QueryRef<Data, Variables>): QueryPromise<Data, Variables>;
80+
81+
// @public
82+
export function getDataConnect(options: ConnectorConfig): DataConnect;
83+
84+
// @public
85+
export function getDataConnect(app: FirebaseApp, options: ConnectorConfig): DataConnect;
86+
87+
// @public (undocumented)
88+
export const MUTATION_STR = "mutation";
89+
90+
// @public
91+
export interface MutationPromise<Data, Variables> extends PromiseLike<MutationResult<Data, Variables>> {
92+
}
93+
94+
// @public (undocumented)
95+
export interface MutationRef<Data, Variables> extends OperationRef<Data, Variables> {
96+
// (undocumented)
97+
refType: typeof MUTATION_STR;
98+
}
99+
100+
// @public
101+
export function mutationRef<Data>(dcInstance: DataConnect, mutationName: string): MutationRef<Data, undefined>;
102+
103+
// @public (undocumented)
104+
export function mutationRef<Data, Variables>(dcInstance: DataConnect, mutationName: string, variables: Variables): MutationRef<Data, Variables>;
105+
106+
// @public
107+
export interface MutationResult<Data, Variables> extends DataConnectResult<Data, Variables> {
108+
// (undocumented)
109+
ref: MutationRef<Data, Variables>;
110+
}
111+
112+
// @public
113+
export type OnCompleteSubscription = () => void;
114+
115+
// @public
116+
export type OnErrorSubscription = (err?: FirebaseError) => void;
117+
118+
// @public
119+
export type OnResultSubscription<Data, Variables> = (res: QueryResult<Data, Variables>) => void;
120+
121+
// @public (undocumented)
122+
export interface OperationRef<_Data, Variables> {
123+
// (undocumented)
124+
dataConnect: DataConnect;
125+
// (undocumented)
126+
name: string;
127+
// (undocumented)
128+
refType: ReferenceType;
129+
// (undocumented)
130+
variables: Variables;
131+
}
132+
133+
// @public (undocumented)
134+
export interface OpResult<Data> {
135+
// (undocumented)
136+
data: Data;
137+
// (undocumented)
138+
fetchTime: string;
139+
// (undocumented)
140+
source: DataSource;
141+
}
142+
143+
// @public (undocumented)
144+
export const QUERY_STR = "query";
145+
146+
// @public
147+
export interface QueryPromise<Data, Variables> extends PromiseLike<QueryResult<Data, Variables>> {
148+
}
149+
150+
// @public
151+
export interface QueryRef<Data, Variables> extends OperationRef<Data, Variables> {
152+
// (undocumented)
153+
refType: typeof QUERY_STR;
154+
}
155+
156+
// @public
157+
export function queryRef<Data>(dcInstance: DataConnect, queryName: string): QueryRef<Data, undefined>;
158+
159+
// @public
160+
export function queryRef<Data, Variables>(dcInstance: DataConnect, queryName: string, variables: Variables): QueryRef<Data, Variables>;
161+
162+
// @public
163+
export interface QueryResult<Data, Variables> extends DataConnectResult<Data, Variables> {
164+
// (undocumented)
165+
ref: QueryRef<Data, Variables>;
166+
// (undocumented)
167+
toJSON: () => SerializedRef<Data, Variables>;
168+
}
169+
170+
// @public
171+
export type QueryUnsubscribe = () => void;
172+
173+
// @public (undocumented)
174+
export type ReferenceType = typeof QUERY_STR | typeof MUTATION_STR;
175+
176+
// @public
177+
export interface RefInfo<Variables> {
178+
// (undocumented)
179+
connectorConfig: DataConnectOptions;
180+
// (undocumented)
181+
name: string;
182+
// (undocumented)
183+
variables: Variables;
184+
}
185+
186+
// @public
187+
export interface SerializedRef<Data, Variables> extends OpResult<Data> {
188+
// (undocumented)
189+
refInfo: RefInfo<Variables>;
190+
}
191+
192+
// @public (undocumented)
193+
export function setLogLevel(logLevel: LogLevelString): void;
194+
195+
// @public (undocumented)
196+
export const SOURCE_CACHE = "CACHE";
197+
198+
// @public (undocumented)
199+
export const SOURCE_SERVER = "SERVER";
200+
201+
// @public
202+
export function subscribe<Data, Variables>(queryRefOrSerializedResult: QueryRef<Data, Variables> | SerializedRef<Data, Variables>, observer: SubscriptionOptions<Data, Variables>): QueryUnsubscribe;
203+
204+
// @public
205+
export function subscribe<Data, Variables>(queryRefOrSerializedResult: QueryRef<Data, Variables> | SerializedRef<Data, Variables>, onNext: OnResultSubscription<Data, Variables>, onError?: OnErrorSubscription, onComplete?: OnCompleteSubscription): QueryUnsubscribe;
206+
207+
// @public
208+
export interface SubscriptionOptions<Data, Variables> {
209+
// (undocumented)
210+
onComplete?: OnCompleteSubscription;
211+
// (undocumented)
212+
onErr?: OnErrorSubscription;
213+
// (undocumented)
214+
onNext?: OnResultSubscription<Data, Variables>;
215+
}
216+
217+
// @public
218+
export function terminate(dataConnect: DataConnect): Promise<void>;
219+
220+
// @public
221+
export function toQueryRef<Data, Variables>(serializedRef: SerializedRef<Data, Variables>): QueryRef<Data, Variables>;
222+
223+
// @public
224+
export interface TransportOptions {
225+
// (undocumented)
226+
host: string;
227+
// (undocumented)
228+
port?: number;
229+
// (undocumented)
230+
sslEnabled?: boolean;
231+
}
232+
233+
234+
```

common/api-review/firestore-lite.api.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -494,5 +494,4 @@ export class WriteBatch {
494494
// @public
495495
export function writeBatch(firestore: Firestore): WriteBatch;
496496

497-
498497
```

packages/app/src/constants.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ import { name as appCheckName } from '../../../packages/app-check/package.json';
2424
import { name as authName } from '../../../packages/auth/package.json';
2525
import { name as authCompatName } from '../../../packages/auth-compat/package.json';
2626
import { name as databaseName } from '../../../packages/database/package.json';
27+
import { name as dataconnectName } from '../../../packages/data-connect/package.json';
2728
import { name as databaseCompatName } from '../../../packages/database-compat/package.json';
2829
import { name as functionsName } from '../../../packages/functions/package.json';
2930
import { name as functionsCompatName } from '../../../packages/functions-compat/package.json';
@@ -59,6 +60,7 @@ export const PLATFORM_LOG_STRING = {
5960
[authName]: 'fire-auth',
6061
[authCompatName]: 'fire-auth-compat',
6162
[databaseName]: 'fire-rtdb',
63+
[dataconnectName]: 'fire-data-connect',
6264
[databaseCompatName]: 'fire-rtdb-compat',
6365
[functionsName]: 'fire-fn',
6466
[functionsCompatName]: 'fire-fn-compat',

0 commit comments

Comments
 (0)