Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Data Connect Product #8480

Merged
merged 91 commits into from
Sep 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
91 commits
Select commit Hold shift + click to select a range
cc9e33b
Created data-connect package
maneesht Sep 29, 2023
2fbfba2
Added debug logs
maneesht May 8, 2024
144e9e4
Added licensing to logger file
maneesht May 8, 2024
8581bf0
Updated licensing years
maneesht May 8, 2024
b8e015c
Removed function from type
maneesht May 8, 2024
f2a1a4b
Added token to release files
maneesht May 8, 2024
4f89ef7
Made data-connect public
maneesht May 8, 2024
d8cc9ea
Merge remote-tracking branch 'public/master' into dataconnect
maneesht May 8, 2024
f2ddc3d
Pulled in publish file from vertexai branch
maneesht May 8, 2024
42eb5e5
Trigger release
maneesht May 8, 2024
323fdc1
Squashed commit of the following:
maneesht May 9, 2024
ed9123d
Removed emulator provider
maneesht May 9, 2024
81ee516
Fixed removal of database emulatortokenprovider
maneesht May 9, 2024
aa08c92
Addressed comments (#8244)
maneesht May 13, 2024
3bf4ab2
0.0.2 release
maneesht May 13, 2024
5c04c85
Merge remote-tracking branch 'origin/master' into dataconnect
maneesht May 13, 2024
877f8b7
Trigger 0.0.2 real release
maneesht May 13, 2024
0427a28
Updated comments
maneesht May 13, 2024
388b61c
Updated comments in api report
maneesht May 13, 2024
7347e23
Merge remote-tracking branch 'public/master' into dataconnect
maneesht May 30, 2024
01ca9df
Updated deps
maneesht May 31, 2024
ceed056
Began reporting client sdk information (#8271)
maneesht Jun 4, 2024
40bf140
Merge branch 'master' into dataconnect
maneesht Jul 3, 2024
842463d
Modified reporting name (#8283)
maneesht Jul 3, 2024
5eedc9a
Merge branch 'dataconnect' of github.com:Firebase/firebase-js-sdk int…
maneesht Jul 3, 2024
4254b10
Removed unnecessary rtdb changes (#8350)
maneesht Jul 3, 2024
3426039
Validated whether connector information is passed in correctly
maneesht Jul 12, 2024
35b425d
Merge remote-tracking branch 'public/master' into dataconnect
maneesht Jul 16, 2024
ebbb191
Updated package.json
maneesht Jul 16, 2024
c6d5f3a
Completed app check integration
maneesht Jul 17, 2024
7681448
Added missing files
maneesht Jul 17, 2024
45e969b
Updated formatting
maneesht Jul 17, 2024
7cc2b9c
Added ability to retry unauthorized requests (#8351)
maneesht Jul 19, 2024
92caa93
Fix linting for Data Connect (#8380)
maneesht Jul 19, 2024
608cebf
Better JSON messages (#8379)
maneesht Jul 24, 2024
ea5c6fa
Merge branch 'master' into dataconnect
maneesht Jul 30, 2024
c060e2e
Updated package.json
maneesht Jul 30, 2024
f48864c
Merge branch 'main' into dataconnect
maneesht Jul 30, 2024
6aae5f5
Moved validateArgs to core SDK (#8370)
maneesht Jul 30, 2024
e58bf6b
Add logging capability to track whether the user is using Core or Gen…
maneesht Jul 31, 2024
d986d4b
0.0.3 release
maneesht Jul 31, 2024
3d880c8
Merge branch 'main' into dataconnect
maneesht Aug 1, 2024
44c0f63
Merge branch 'mtewani/add-appcheck' into dataconnect
maneesht Aug 28, 2024
93e9d8b
Merge branch 'dataconnect' of github.com:Firebase/firebase-js-sdk int…
maneesht Sep 4, 2024
994892c
Fixed appcheck implementation
maneesht Sep 4, 2024
50ef920
Revert "Fixed appcheck implementation"
maneesht Sep 4, 2024
74ad85b
Fixed appcheck implementation
maneesht Sep 4, 2024
5290061
Merge branch 'dataconnect' of https://github.com/firebase/firebase-js…
maneesht Sep 4, 2024
8677c74
Merge remote-tracking branch 'origin/main' into dataconnect
maneesht Sep 4, 2024
dc15ecc
Updated formatting
maneesht Sep 4, 2024
0c46097
Updated yarn file
maneesht Sep 4, 2024
f45f6b2
Fixed tests
maneesht Sep 5, 2024
4d279f7
Added new docs
maneesht Sep 5, 2024
e5e3acd
Fix linter
maneesht Sep 5, 2024
0e8cdfb
Fixed linting
maneesht Sep 5, 2024
fb42200
Create cold-chairs-fold.md
maneesht Sep 5, 2024
6660f98
Addressed comments
maneesht Sep 5, 2024
97194ae
Update API reports
maneesht Sep 5, 2024
a65a247
Removed unnecessary exports
maneesht Sep 5, 2024
af35c2f
Merge branch 'dataconnect' of https://github.com/firebase/firebase-js…
maneesht Sep 5, 2024
1cc1f2a
Updated license years
maneesht Sep 5, 2024
f8b5857
removed internal
maneesht Sep 5, 2024
cedd651
Replaced minor with major
maneesht Sep 5, 2024
64eff34
Removed auth changes
maneesht Sep 5, 2024
629d70b
Removed repo-scripts changes
maneesht Sep 5, 2024
f1c1e64
Made emulator changes more scalable
maneesht Sep 6, 2024
9a5b1b9
Fixed formatting
maneesht Sep 6, 2024
6aabfc4
Removed fetch provider
maneesht Sep 6, 2024
310b235
Removed repo-scripts changes
maneesht Sep 6, 2024
8191859
Updated data connect product
maneesht Sep 6, 2024
86456bd
Update API reports
maneesht Sep 6, 2024
b482715
Trigger Build
maneesht Sep 6, 2024
f45096e
Merge branch 'dataconnect' of https://github.com/firebase/firebase-js…
maneesht Sep 6, 2024
a25716f
Fixed linting issues
maneesht Sep 6, 2024
a7b6922
Updated docsite
maneesht Sep 6, 2024
87d8a11
Replaced node-fetch with fetch
maneesht Sep 18, 2024
44fa9c6
Removed runtest
maneesht Sep 18, 2024
57ffcf6
Changed firebase to minor release
maneesht Sep 19, 2024
7273df7
Merge remote-tracking branch 'origin/main' into dataconnect
maneesht Sep 19, 2024
c23f54e
FDC: Implement GMPID (#8486)
maneesht Sep 19, 2024
ac13c80
Fixed component error
maneesht Sep 19, 2024
13abf2d
FDC: Upgrade to v1beta (#8485)
maneesht Sep 19, 2024
a96720a
Excluded data connect
maneesht Sep 19, 2024
54d8e54
Merge branch 'dataconnect' of https://github.com/firebase/firebase-js…
maneesht Sep 19, 2024
51d433c
Removed data connect reference docs
maneesht Sep 19, 2024
24c3c49
Changed data connect to minor
maneesht Sep 19, 2024
c7590a1
Fixed formatting
maneesht Sep 19, 2024
b4a27c8
Fixed tests
maneesht Sep 20, 2024
5ae1bcc
Addressed comments
maneesht Sep 23, 2024
f563ae8
Addressed comments
maneesht Sep 23, 2024
9809b39
Removed unnecessary files
maneesht Sep 23, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .changeset/cold-chairs-fold.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"firebase": minor
"@firebase/app": patch
"@firebase/data-connect": minor
---

Included Data Connect product.
1 change: 1 addition & 0 deletions .github/workflows/canary-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ jobs:
NPM_TOKEN_AUTH_INTEROP_TYPES: ${{secrets.NPM_TOKEN_AUTH_INTEROP_TYPES}}
NPM_TOKEN_AUTH_TYPES: ${{secrets.NPM_TOKEN_AUTH_TYPES}}
NPM_TOKEN_COMPONENT: ${{secrets.NPM_TOKEN_COMPONENT}}
NPM_TOKEN_DATA_CONNECT: ${{secrets.NPM_TOKEN_DATA_CONNECT}}
NPM_TOKEN_DATABASE: ${{secrets.NPM_TOKEN_DATABASE}}
NPM_TOKEN_DATABASE_TYPES: ${{secrets.NPM_TOKEN_DATABASE_TYPES}}
NPM_TOKEN_FIRESTORE: ${{secrets.NPM_TOKEN_FIRESTORE}}
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/prerelease-manual-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ jobs:
NPM_TOKEN_AUTH_INTEROP_TYPES: ${{secrets.NPM_TOKEN_AUTH_INTEROP_TYPES}}
NPM_TOKEN_AUTH_TYPES: ${{secrets.NPM_TOKEN_AUTH_TYPES}}
NPM_TOKEN_COMPONENT: ${{secrets.NPM_TOKEN_COMPONENT}}
NPM_TOKEN_DATA_CONNECT: ${{secrets.NPM_TOKEN_DATA_CONNECT}}
NPM_TOKEN_DATABASE: ${{secrets.NPM_TOKEN_DATABASE}}
NPM_TOKEN_DATABASE_TYPES: ${{secrets.NPM_TOKEN_DATABASE_TYPES}}
NPM_TOKEN_FIRESTORE: ${{secrets.NPM_TOKEN_FIRESTORE}}
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/release-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ jobs:
NPM_TOKEN_AUTH_INTEROP_TYPES: ${{secrets.NPM_TOKEN_AUTH_INTEROP_TYPES}}
NPM_TOKEN_AUTH_TYPES: ${{secrets.NPM_TOKEN_AUTH_TYPES}}
NPM_TOKEN_COMPONENT: ${{secrets.NPM_TOKEN_COMPONENT}}
NPM_TOKEN_DATA_CONNECT: ${{secrets.NPM_TOKEN_DATA_CONNECT}}
NPM_TOKEN_DATABASE: ${{secrets.NPM_TOKEN_DATABASE}}
NPM_TOKEN_DATABASE_TYPES: ${{secrets.NPM_TOKEN_DATABASE_TYPES}}
NPM_TOKEN_FIRESTORE: ${{secrets.NPM_TOKEN_FIRESTORE}}
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/release-staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ jobs:
NPM_TOKEN_AUTH_INTEROP_TYPES: ${{secrets.NPM_TOKEN_AUTH_INTEROP_TYPES}}
NPM_TOKEN_AUTH_TYPES: ${{secrets.NPM_TOKEN_AUTH_TYPES}}
NPM_TOKEN_COMPONENT: ${{secrets.NPM_TOKEN_COMPONENT}}
NPM_TOKEN_DATA_CONNECT: ${{secrets.NPM_TOKEN_DATA_CONNECT}}
NPM_TOKEN_DATABASE: ${{secrets.NPM_TOKEN_DATABASE}}
NPM_TOKEN_DATABASE_TYPES: ${{secrets.NPM_TOKEN_DATABASE_TYPES}}
NPM_TOKEN_FIRESTORE: ${{secrets.NPM_TOKEN_FIRESTORE}}
Expand Down
234 changes: 234 additions & 0 deletions common/api-review/data-connect.api.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,234 @@
## API Report File for "@firebase/data-connect"

> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).

```ts

import { AppCheckInternalComponentName } from '@firebase/app-check-interop-types';
import { FirebaseApp } from '@firebase/app';
import { FirebaseAuthInternalName } from '@firebase/auth-interop-types';
import { FirebaseError } from '@firebase/util';
import { LogLevelString } from '@firebase/logger';
import { Provider } from '@firebase/component';

// @public (undocumented)
export interface CancellableOperation<T> extends PromiseLike<{
data: T;
}> {
// (undocumented)
cancel: () => void;
}

// @public
export function connectDataConnectEmulator(dc: DataConnect, host: string, port?: number, sslEnabled?: boolean): void;

// @public
export interface ConnectorConfig {
// (undocumented)
connector: string;
// (undocumented)
location: string;
// (undocumented)
service: string;
}

// @public
export class DataConnect {
constructor(app: FirebaseApp, dataConnectOptions: DataConnectOptions, _authProvider: Provider<FirebaseAuthInternalName>, _appCheckProvider: Provider<AppCheckInternalComponentName>);
// (undocumented)
readonly app: FirebaseApp;
// (undocumented)
enableEmulator(transportOptions: TransportOptions): void;
// (undocumented)
getSettings(): ConnectorConfig;
// (undocumented)
isEmulator: boolean;
// (undocumented)
setInitialized(): void;
}

// @public
export interface DataConnectOptions extends ConnectorConfig {
// (undocumented)
projectId: string;
}

// @public (undocumented)
export interface DataConnectResult<Data, Variables> extends OpResult<Data> {
// (undocumented)
ref: OperationRef<Data, Variables>;
}

// @public
export interface DataConnectSubscription<Data, Variables> {
// (undocumented)
errCallback?: (e?: FirebaseError) => void;
// (undocumented)
unsubscribe: () => void;
// (undocumented)
userCallback: OnResultSubscription<Data, Variables>;
}

// @public (undocumented)
export type DataSource = typeof SOURCE_CACHE | typeof SOURCE_SERVER;

// @public
export function executeMutation<Data, Variables>(mutationRef: MutationRef<Data, Variables>): MutationPromise<Data, Variables>;

// @public
export function executeQuery<Data, Variables>(queryRef: QueryRef<Data, Variables>): QueryPromise<Data, Variables>;

// @public
export function getDataConnect(options: ConnectorConfig): DataConnect;

// @public
export function getDataConnect(app: FirebaseApp, options: ConnectorConfig): DataConnect;

// @public (undocumented)
export const MUTATION_STR = "mutation";

// @public
export interface MutationPromise<Data, Variables> extends PromiseLike<MutationResult<Data, Variables>> {
}

// @public (undocumented)
export interface MutationRef<Data, Variables> extends OperationRef<Data, Variables> {
// (undocumented)
refType: typeof MUTATION_STR;
}

// @public
export function mutationRef<Data>(dcInstance: DataConnect, mutationName: string): MutationRef<Data, undefined>;

// @public (undocumented)
export function mutationRef<Data, Variables>(dcInstance: DataConnect, mutationName: string, variables: Variables): MutationRef<Data, Variables>;

// @public
export interface MutationResult<Data, Variables> extends DataConnectResult<Data, Variables> {
// (undocumented)
ref: MutationRef<Data, Variables>;
}

// @public
export type OnCompleteSubscription = () => void;

// @public
export type OnErrorSubscription = (err?: FirebaseError) => void;

// @public
export type OnResultSubscription<Data, Variables> = (res: QueryResult<Data, Variables>) => void;

// @public (undocumented)
maneesht marked this conversation as resolved.
Show resolved Hide resolved
export interface OperationRef<_Data, Variables> {
// (undocumented)
dataConnect: DataConnect;
// (undocumented)
name: string;
// (undocumented)
refType: ReferenceType;
// (undocumented)
variables: Variables;
}

// @public (undocumented)
export interface OpResult<Data> {
// (undocumented)
data: Data;
// (undocumented)
fetchTime: string;
// (undocumented)
source: DataSource;
}

// @public (undocumented)
export const QUERY_STR = "query";

// @public
export interface QueryPromise<Data, Variables> extends PromiseLike<QueryResult<Data, Variables>> {
}

// @public
export interface QueryRef<Data, Variables> extends OperationRef<Data, Variables> {
// (undocumented)
refType: typeof QUERY_STR;
}

// @public
export function queryRef<Data>(dcInstance: DataConnect, queryName: string): QueryRef<Data, undefined>;

// @public
export function queryRef<Data, Variables>(dcInstance: DataConnect, queryName: string, variables: Variables): QueryRef<Data, Variables>;

// @public
export interface QueryResult<Data, Variables> extends DataConnectResult<Data, Variables> {
// (undocumented)
ref: QueryRef<Data, Variables>;
// (undocumented)
toJSON: () => SerializedRef<Data, Variables>;
}

// @public
export type QueryUnsubscribe = () => void;

// @public (undocumented)
export type ReferenceType = typeof QUERY_STR | typeof MUTATION_STR;

// @public
export interface RefInfo<Variables> {
// (undocumented)
connectorConfig: DataConnectOptions;
// (undocumented)
name: string;
// (undocumented)
variables: Variables;
}

// @public
export interface SerializedRef<Data, Variables> extends OpResult<Data> {
// (undocumented)
refInfo: RefInfo<Variables>;
}

// @public (undocumented)
export function setLogLevel(logLevel: LogLevelString): void;

// @public (undocumented)
export const SOURCE_CACHE = "CACHE";

// @public (undocumented)
export const SOURCE_SERVER = "SERVER";

// @public
export function subscribe<Data, Variables>(queryRefOrSerializedResult: QueryRef<Data, Variables> | SerializedRef<Data, Variables>, observer: SubscriptionOptions<Data, Variables>): QueryUnsubscribe;

// @public
export function subscribe<Data, Variables>(queryRefOrSerializedResult: QueryRef<Data, Variables> | SerializedRef<Data, Variables>, onNext: OnResultSubscription<Data, Variables>, onError?: OnErrorSubscription, onComplete?: OnCompleteSubscription): QueryUnsubscribe;

// @public
export interface SubscriptionOptions<Data, Variables> {
// (undocumented)
onComplete?: OnCompleteSubscription;
// (undocumented)
onErr?: OnErrorSubscription;
// (undocumented)
onNext?: OnResultSubscription<Data, Variables>;
}

// @public
export function terminate(dataConnect: DataConnect): Promise<void>;

// @public
export function toQueryRef<Data, Variables>(serializedRef: SerializedRef<Data, Variables>): QueryRef<Data, Variables>;

// @public
export interface TransportOptions {
// (undocumented)
host: string;
// (undocumented)
port?: number;
// (undocumented)
sslEnabled?: boolean;
}


```
1 change: 0 additions & 1 deletion common/api-review/firestore-lite.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -494,5 +494,4 @@ export class WriteBatch {
// @public
export function writeBatch(firestore: Firestore): WriteBatch;


```
2 changes: 2 additions & 0 deletions packages/app/src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import { name as appCheckName } from '../../../packages/app-check/package.json';
import { name as authName } from '../../../packages/auth/package.json';
import { name as authCompatName } from '../../../packages/auth-compat/package.json';
import { name as databaseName } from '../../../packages/database/package.json';
import { name as dataconnectName } from '../../../packages/data-connect/package.json';
import { name as databaseCompatName } from '../../../packages/database-compat/package.json';
import { name as functionsName } from '../../../packages/functions/package.json';
import { name as functionsCompatName } from '../../../packages/functions-compat/package.json';
Expand Down Expand Up @@ -59,6 +60,7 @@ export const PLATFORM_LOG_STRING = {
[authName]: 'fire-auth',
[authCompatName]: 'fire-auth-compat',
[databaseName]: 'fire-rtdb',
[dataconnectName]: 'fire-data-connect',
[databaseCompatName]: 'fire-rtdb-compat',
[functionsName]: 'fire-fn',
[functionsCompatName]: 'fire-fn-compat',
Expand Down
88 changes: 88 additions & 0 deletions packages/data-connect/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
/**
* @license
* Copyright 2024 Google LLC
*
* 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.
*/

module.exports = {
extends: '../../config/.eslintrc.js',
parserOptions: {
project: 'tsconfig.eslint.json',
// to make vscode-eslint work with monorepo
// https://github.com/typescript-eslint/typescript-eslint/issues/251#issuecomment-463943250
tsconfigRootDir: __dirname
},
plugins: ['import'],
ignorePatterns: ['compat/*'],
rules: {
'no-console': ['error', { allow: ['warn', 'error'] }],
'@typescript-eslint/no-unused-vars': [
'error',
{
varsIgnorePattern: '^_',
args: 'none'
}
],
'import/order': [
'error',
{
'groups': [
'builtin',
'external',
'internal',
'parent',
'sibling',
'index'
],
'newlines-between': 'always',
'alphabetize': { 'order': 'asc', 'caseInsensitive': true }
}
],
'no-restricted-globals': [
'error',
{
'name': 'window',
'message': 'Use `PlatformSupport.getPlatform().window` instead.'
},
{
'name': 'document',
'message': 'Use `PlatformSupport.getPlatform().document` instead.'
}
]
},
overrides: [
{
files: ['**/*.d.ts'],
rules: {
'camelcase': 'off',
'import/no-duplicates': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-unused-vars': 'off'
}
},
{
files: ['**/*.test.ts', '**/test/**/*.ts'],
rules: {
'@typescript-eslint/no-explicit-any': 'error'
}
},
{
files: ['scripts/*.ts'],
rules: {
'import/no-extraneous-dependencies': 'off',
'@typescript-eslint/no-require-imports': 'off'
}
}
]
};
3 changes: 3 additions & 0 deletions packages/data-connect/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
node_modules/
dist/
*.tgz
5 changes: 5 additions & 0 deletions packages/data-connect/.npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
node_modules/
rollup.config.mjs
package-lock.json
tsconfig.json
src/
Loading
Loading