Skip to content

Commit 37d0f18

Browse files
committed
Fixed formatting
1 parent 02c52c6 commit 37d0f18

File tree

4 files changed

+126
-19
lines changed

4 files changed

+126
-19
lines changed

packages/data-connect/example-integration/dataconnect-generated/js/default-connector/esm/index.esm.js

Lines changed: 31 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,27 @@
1-
import { queryRef, executeQuery, mutationRef, executeMutation, validateArgs } from 'firebase/data-connect';
1+
/**
2+
* @license
3+
* Copyright 2025 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+
import {
19+
queryRef,
20+
executeQuery,
21+
mutationRef,
22+
executeMutation,
23+
validateArgs
24+
} from 'firebase/data-connect';
225

326
export const connectorConfig = {
427
connector: 'default',
@@ -7,7 +30,12 @@ export const connectorConfig = {
730
};
831

932
export function createMovieRef(dcOrVars, vars) {
10-
const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true);
33+
const { dc: dcInstance, vars: inputVars } = validateArgs(
34+
connectorConfig,
35+
dcOrVars,
36+
vars,
37+
true
38+
);
1139
dcInstance._useGeneratedSdk();
1240
return mutationRef(dcInstance, 'CreateMovie', inputVars);
1341
}
@@ -17,12 +45,11 @@ export function createMovie(dcOrVars, vars) {
1745
}
1846

1947
export function listMoviesRef(dc) {
20-
const { dc: dcInstance} = validateArgs(connectorConfig, dc, undefined);
48+
const { dc: dcInstance } = validateArgs(connectorConfig, dc, undefined);
2149
dcInstance._useGeneratedSdk();
2250
return queryRef(dcInstance, 'ListMovies');
2351
}
2452

2553
export function listMovies(dc) {
2654
return executeQuery(listMoviesRef(dc));
2755
}
28-

packages/data-connect/example-integration/dataconnect-generated/js/default-connector/index.cjs.js

Lines changed: 33 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,27 @@
1-
const { queryRef, executeQuery, mutationRef, executeMutation, validateArgs } = require('firebase/data-connect');
1+
/**
2+
* @license
3+
* Copyright 2025 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+
const {
19+
queryRef,
20+
executeQuery,
21+
mutationRef,
22+
executeMutation,
23+
validateArgs
24+
} = require('firebase/data-connect');
225

326
const connectorConfig = {
427
connector: 'default',
@@ -8,20 +31,25 @@ const connectorConfig = {
831
exports.connectorConfig = connectorConfig;
932

1033
exports.createMovieRef = function createMovieRef(dcOrVars, vars) {
11-
const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true);
34+
const { dc: dcInstance, vars: inputVars } = validateArgs(
35+
connectorConfig,
36+
dcOrVars,
37+
vars,
38+
true
39+
);
1240
dcInstance._useGeneratedSdk();
1341
return mutationRef(dcInstance, 'CreateMovie', inputVars);
14-
}
42+
};
1543

1644
exports.createMovie = function createMovie(dcOrVars, vars) {
1745
return executeMutation(createMovieRef(dcOrVars, vars));
1846
};
1947

2048
exports.listMoviesRef = function listMoviesRef(dc) {
21-
const { dc: dcInstance} = validateArgs(connectorConfig, dc, undefined);
49+
const { dc: dcInstance } = validateArgs(connectorConfig, dc, undefined);
2250
dcInstance._useGeneratedSdk();
2351
return queryRef(dcInstance, 'ListMovies');
24-
}
52+
};
2553

2654
exports.listMovies = function listMovies(dc) {
2755
return executeQuery(listMoviesRef(dc));

packages/data-connect/example-integration/dataconnect-generated/js/default-connector/index.d.ts

Lines changed: 45 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,28 @@
1-
import { ConnectorConfig, DataConnect, QueryRef, QueryPromise, MutationRef, MutationPromise } from 'firebase/data-connect';
1+
/**
2+
* @license
3+
* Copyright 2025 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+
import {
19+
ConnectorConfig,
20+
DataConnect,
21+
QueryRef,
22+
QueryPromise,
23+
MutationRef,
24+
MutationPromise
25+
} from 'firebase/data-connect';
226

327
export const connectorConfig: ConnectorConfig;
428

@@ -7,7 +31,6 @@ export type UUIDString = string;
731
export type Int64String = string;
832
export type DateString = string;
933

10-
1134
export interface CreateMovieData {
1235
movie_insert: Movie_Key;
1336
}
@@ -33,18 +56,31 @@ export interface Movie_Key {
3356
}
3457

3558
/* Allow users to create refs without passing in DataConnect */
36-
export function createMovieRef(vars: CreateMovieVariables): MutationRef<CreateMovieData, CreateMovieVariables>;
59+
export function createMovieRef(
60+
vars: CreateMovieVariables
61+
): MutationRef<CreateMovieData, CreateMovieVariables>;
3762
/* Allow users to pass in custom DataConnect instances */
38-
export function createMovieRef(dc: DataConnect, vars: CreateMovieVariables): MutationRef<CreateMovieData, CreateMovieVariables>;
63+
export function createMovieRef(
64+
dc: DataConnect,
65+
vars: CreateMovieVariables
66+
): MutationRef<CreateMovieData, CreateMovieVariables>;
3967

40-
export function createMovie(vars: CreateMovieVariables): MutationPromise<CreateMovieData, CreateMovieVariables>;
41-
export function createMovie(dc: DataConnect, vars: CreateMovieVariables): MutationPromise<CreateMovieData, CreateMovieVariables>;
68+
export function createMovie(
69+
vars: CreateMovieVariables
70+
): MutationPromise<CreateMovieData, CreateMovieVariables>;
71+
export function createMovie(
72+
dc: DataConnect,
73+
vars: CreateMovieVariables
74+
): MutationPromise<CreateMovieData, CreateMovieVariables>;
4275

4376
/* Allow users to create refs without passing in DataConnect */
4477
export function listMoviesRef(): QueryRef<ListMoviesData, undefined>;
4578
/* Allow users to pass in custom DataConnect instances */
46-
export function listMoviesRef(dc: DataConnect): QueryRef<ListMoviesData, undefined>;
79+
export function listMoviesRef(
80+
dc: DataConnect
81+
): QueryRef<ListMoviesData, undefined>;
4782

4883
export function listMovies(): QueryPromise<ListMoviesData, undefined>;
49-
export function listMovies(dc: DataConnect): QueryPromise<ListMoviesData, undefined>;
50-
84+
export function listMovies(
85+
dc: DataConnect
86+
): QueryPromise<ListMoviesData, undefined>;

packages/data-connect/example-integration/test.ts

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,23 @@
1+
/**
2+
* @license
3+
* Copyright 2025 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+
118
import { listMovies } from './dataconnect-generated/js/default-connector';
219
import * as json from './firebase-js-config.json';
320
import { initializeApp } from 'firebase/app';
421

522
initializeApp(json);
623
listMovies();
7-

0 commit comments

Comments
 (0)