Skip to content

Commit c081d6d

Browse files
committed
Merge branch 'master' into feature-branch/mcp/mobile-testing
2 parents 82e1724 + 9297d8e commit c081d6d

File tree

175 files changed

+10870
-728
lines changed

Some content is hidden

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

175 files changed

+10870
-728
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ src/test/emulators/extensions/firebase/storage-resize-images@0.1.18/functions/pa
33
src/test/emulators/extensions/firebase/storage-resize-images@0.1.18/functions/package-lock.json
44
scripts/functions-deploy-tests/**/package-lock.json
55
scripts/functions-discover-tests/**/**/package-lock.json
6+
scripts/agent-evals/output
67
.dataconnect
78
*-debug.log
89

firebase-vscode/.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,5 @@ resources/dist
66
.wdio-vscode-service
77
logs
88
!*.tgz
9-
prebuilt-extensions
9+
prebuilt-extensions
10+
data-connect-test-*/

firebase-vscode/CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
## NEXT
22

3+
## 1.10.0
4+
5+
- [Fixed] Populate correct default values of missing required variables.
6+
- [Added] Display the execution variables and auth params used.
7+
- [Added] Allow rerun any executions in the history.
8+
- Update internal `firebase-tools` dependency to 14.20.0
9+
310
## 1.9.0
411

512
- [Added] Refine / Generate Operation Code Lens.

firebase-vscode/common/messaging/protocol.ts

Lines changed: 20 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,21 @@ import { EmulatorsStatus, RunningEmulatorInfo } from "./types";
1111
import { ExecutionResult } from "graphql";
1212
import { SerializedError } from "../error";
1313

14-
export enum UserMockKind {
14+
export enum AuthParamsKind {
1515
ADMIN = "admin",
1616
UNAUTHENTICATED = "unauthenticated",
1717
AUTHENTICATED = "authenticated",
1818
}
19-
export type UserMock =
20-
| { kind: UserMockKind.ADMIN | UserMockKind.UNAUTHENTICATED }
19+
20+
export const EXAMPLE_CLAIMS = `{
21+
"email_verified": true,
22+
"sub": "exampleUserId"
23+
}`;
24+
25+
export type AuthParams =
26+
| { kind: AuthParamsKind.ADMIN | AuthParamsKind.UNAUTHENTICATED }
2127
| {
22-
kind: UserMockKind.AUTHENTICATED;
28+
kind: AuthParamsKind.AUTHENTICATED;
2329
claims: string;
2430
};
2531

@@ -84,13 +90,13 @@ export interface WebviewToExtensionParamsMap {
8490

8591
selectEmulatorImportFolder: {};
8692

87-
definedDataConnectArgs: string;
93+
/** Execution parameters */
94+
defineVariables: string;
95+
defineAuthParams: AuthParams;
8896

8997
/** Prompts the user to select a directory in which to place the quickstart */
9098
chooseQuickstartDir: {};
9199

92-
notifyAuthUserMockChange: UserMock;
93-
94100
/** Deploy connectors/services to production */
95101
"fdc.deploy": void;
96102

@@ -130,10 +136,11 @@ export interface WebviewToExtensionParamsMap {
130136
}
131137

132138
export interface DataConnectResults {
133-
query: string;
134139
displayName: string;
135-
results?: ExecutionResult | SerializedError;
136-
args?: string;
140+
query: string;
141+
results: ExecutionResult | SerializedError;
142+
variables: string;
143+
auth: AuthParams;
137144
}
138145

139146
export type ValueOrError<T> =
@@ -185,13 +192,11 @@ export interface ExtensionToWebviewParamsMap {
185192
*/
186193
notifyPreviewChannelResponse: { id: string };
187194

188-
// data connect specific
189-
notifyDataConnectArgs: string;
190-
195+
/** Update execution parameters and results panels */
196+
notifyVariables: { variables: string, fixes: string[] };
197+
notifyAuthParams: AuthParams;
191198
notifyDataConnectResults: DataConnectResults;
192199

193-
notifyLastOperation: string;
194-
195200
notifyIsLoadingUser: boolean;
196201

197202
notifyDocksLink: string;

firebase-vscode/package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

firebase-vscode/package.json

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"publisher": "GoogleCloudTools",
55
"icon": "./resources/firebase_dataconnect_logo.png",
66
"description": "Firebase Data Connect for VSCode",
7-
"version": "1.9.0",
7+
"version": "1.10.0",
88
"engines": {
99
"vscode": "^1.69.0"
1010
},
@@ -158,20 +158,21 @@
158158
"firebase-data-connect-execution-view": [
159159
{
160160
"type": "webview",
161-
"id": "data-connect-execution-configuration",
162-
"name": "Configuration",
163-
"when": "firebase-vscode.fdc.enabled"
164-
},
165-
{
166-
"id": "data-connect-execution-history",
167-
"name": "History",
161+
"id": "data-connect-execution-parameters",
162+
"name": "Parameters",
168163
"when": "firebase-vscode.fdc.enabled"
169164
},
170165
{
171166
"type": "webview",
172167
"id": "data-connect-execution-results",
173168
"name": "Results",
174169
"when": "firebase-vscode.fdc.enabled"
170+
},
171+
{
172+
"id": "data-connect-execution-history",
173+
"name": "History",
174+
"when": "firebase-vscode.fdc.enabled",
175+
"visibility": "collapsed"
175176
}
176177
]
177178
},

firebase-vscode/src/analytics.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,11 @@ export enum DATA_CONNECT_EVENT_NAME {
2525
RUN_PROD_MUTATION_WARNING_REJECTED = "run_prod_mutation_warning_rejected",
2626
RUN_PROD_MUTATION_WARNING_ACKED = "run_prod_mutation_warning_acked",
2727
RUN_PROD_MUTATION_WARNING_ACKED_ALWAYS = "run_prod_mutation_warning_acked_always",
28-
MISSING_VARIABLES = "missing_variables",
28+
RUN_AUTH_ADMIN = "run_auth_admin",
29+
RUN_AUTH_UNAUTHENTICATED = "run_auth_unauthenticated",
30+
RUN_AUTH_AUTHENTICATED = "run_auth_authenticated",
31+
RUN_UNDEFINED_VARIABLES = "run_undefined_variables",
32+
RUN_MISSING_VARIABLES = "run_missing_variables",
2933
GENERATE_OPERATION = "generate_operation",
3034
GIF_TOS_MODAL = "gif_tos_modal",
3135
GIF_TOS_MODAL_ACKED = "gif_tos_modal_acked",

firebase-vscode/src/auth/service.ts

Lines changed: 0 additions & 23 deletions
This file was deleted.

firebase-vscode/src/core/config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ export async function updateFirebaseRCProject(values: {
6868
};
6969
}) {
7070
let didChange = false;
71-
const newRCPath = path.join(currentOptions.value.cwd, ".firebaserc");
71+
const newRCPath = path.join(currentOptions.value.cwd!, ".firebaserc");
7272
const isNewRC = !firebaseRC.value?.tryReadValue;
7373

7474
const rc = firebaseRC.value?.tryReadValue ?? new RC(newRCPath, {});

firebase-vscode/src/data-connect/ad-hoc-mutations.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -284,16 +284,16 @@ function getDefaultScalarValueNode(type: string): ValueNode | undefined {
284284
}
285285
}
286286

287-
export function getDefaultScalarValue(type: string): string {
287+
export function getDefaultScalarValue(type: string): any {
288288
switch (type) {
289289
case "Boolean":
290-
return "false";
290+
return false;
291291
case "Date":
292292
return new Date().toISOString().substring(0, 10);
293293
case "Float":
294-
return "0";
294+
return 0.0;
295295
case "Int":
296-
return "0";
296+
return 0;
297297
case "Int64":
298298
return "0";
299299
case "String":
@@ -303,8 +303,8 @@ export function getDefaultScalarValue(type: string): string {
303303
case "UUID":
304304
return "11111111222233334444555555555555";
305305
case "Vector":
306-
return "[]";
306+
return [1.1, 2.2, 3.3];
307307
default:
308-
return "";
308+
return undefined;
309309
}
310310
}

0 commit comments

Comments
 (0)