Skip to content

Commit 4a25474

Browse files
authored
Merge branch 'master' into feat/auto-init-inject-emulator-envs
2 parents 4181276 + 4e7b492 commit 4a25474

File tree

11 files changed

+24
-24
lines changed

11 files changed

+24
-24
lines changed

CHANGELOG.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +0,0 @@
1-
- Fixed an issue where `clearData` with no tables would cause the Data Connect emulator to crash.
2-
- Fixed an issue where the Data Connect emulator would crash with `Error: Unreachable`.

firebase-vscode/CHANGELOG.md

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

3+
## 0.12.0
4+
5+
- Updated internal firebase-tools dependency to 13.29.1
6+
- [Fixed] Fixed firebase binary detection for analytics
7+
38
## 0.11.1
49

510
- [Fixed] Fixed IDX analytics issue

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: 1 addition & 1 deletion
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": "0.11.1",
7+
"version": "0.12.0",
88
"engines": {
99
"vscode": "^1.69.0"
1010
},

firebase-vscode/src/analytics.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import vscode, { env, TelemetryLogger, TelemetrySender } from "vscode";
22
import { pluginLogger } from "./logger-wrapper";
33
import { AnalyticsParams, trackVSCode } from "../../src/track";
44
import { env as monospaceEnv } from "../src/core/env";
5+
import { getSettings } from "./utils/settings";
56

67
export const IDX_METRIC_NOTICE = `
78
When you use the Firebase Data Connect Extension, Google collects telemetry data such as usage statistics, error metrics, and crash reports. Telemetry helps us better understand how the Firebase Extension is performing, where improvements need to be made, and how features are being used. Firebase uses this data, consistent with our [Google Privacy Policy](https://policies.google.com/privacy?hl=en-US), to provide, improve, and develop Firebase products and services.
@@ -183,6 +184,7 @@ class GA4TelemetrySender implements TelemetrySender {
183184
}
184185
}
185186
data = { ...data };
187+
data = addFirebaseBinaryMetadata(data);
186188
if (!this.hasSentData) {
187189
trackVSCode(
188190
DATA_CONNECT_EVENT_NAME.EXTENSION_USED,
@@ -198,3 +200,8 @@ class GA4TelemetrySender implements TelemetrySender {
198200
// TODO: Sanatize error messages for user data
199201
}
200202
}
203+
204+
function addFirebaseBinaryMetadata(data?: Record<string, any> | undefined) {
205+
const settings = getSettings();
206+
return { ...data, binary_kind: settings.firebaseBinaryKind };
207+
}

firebase-vscode/src/data-connect/deploy.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,16 +42,12 @@ export function registerFdcDeploy(
4242
);
4343

4444
const deployAllCmd = vscode.commands.registerCommand("fdc.deploy-all", () => {
45-
analyticsLogger.logger.logUsage(DATA_CONNECT_EVENT_NAME.DEPLOY_ALL, {
46-
firebase_binary_kind: settings.firebaseBinaryKind,
47-
});
45+
analyticsLogger.logger.logUsage(DATA_CONNECT_EVENT_NAME.DEPLOY_ALL);
4846
deploySpy.call(`${settings.firebasePath} deploy --only dataconnect`);
4947
});
5048

5149
const deployCmd = vscode.commands.registerCommand("fdc.deploy", async () => {
52-
analyticsLogger.logger.logUsage(DATA_CONNECT_EVENT_NAME.DEPLOY_INDIVIDUAL, {
53-
firebase_binary_kind: settings.firebaseBinaryKind,
54-
});
50+
analyticsLogger.logger.logUsage(DATA_CONNECT_EVENT_NAME.DEPLOY_INDIVIDUAL);
5551
const configs = await firstWhereDefined(dataConnectConfigs).then(
5652
(c) => c.requireValue,
5753
);

firebase-vscode/src/data-connect/sdk-generation.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,7 @@ export function registerFdcSdkGeneration(
3838
const initSdkCmd = vscode.commands.registerCommand(
3939
"fdc.init-sdk",
4040
(args: { appFolder: string }) => {
41-
analyticsLogger.logger.logUsage(DATA_CONNECT_EVENT_NAME.INIT_SDK_CLI, {
42-
firebase_binary_kind: settings.firebaseBinaryKind,
43-
});
41+
analyticsLogger.logger.logUsage(DATA_CONNECT_EVENT_NAME.INIT_SDK_CLI);
4442
// Lets do it from the right directory
4543
setTerminalEnvVars(FDC_APP_FOLDER, args.appFolder);
4644
runCommand(`${settings.firebasePath} init dataconnect:sdk`);

firebase-vscode/src/data-connect/terminal.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,7 @@ export function registerTerminalTasks(
7474
const settings = getSettings();
7575

7676
const loginTaskBroker = broker.on("executeLogin", () => {
77-
analyticsLogger.logger.logUsage(DATA_CONNECT_EVENT_NAME.IDX_LOGIN, {
78-
firebase_binary_kind: settings.firebaseBinaryKind,
79-
});
77+
analyticsLogger.logger.logUsage(DATA_CONNECT_EVENT_NAME.IDX_LOGIN);
8078
runTerminalTask(
8179
"firebase login",
8280
`${settings.firebasePath} login --no-localhost`,
@@ -86,9 +84,7 @@ export function registerTerminalTasks(
8684
});
8785

8886
const startEmulatorsTaskBroker = broker.on("runStartEmulators", () => {
89-
analyticsLogger.logger.logUsage(DATA_CONNECT_EVENT_NAME.START_EMULATORS, {
90-
firebase_binary_kind: settings.firebaseBinaryKind,
91-
});
87+
analyticsLogger.logger.logUsage(DATA_CONNECT_EVENT_NAME.START_EMULATORS);
9288
// TODO: optional debug mode
9389
runTerminalTask(
9490
"firebase emulators",

npm-shrinkwrap.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.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "firebase-tools",
3-
"version": "13.29.0",
3+
"version": "13.29.1",
44
"description": "Command-Line Interface for Firebase",
55
"main": "./lib/index.js",
66
"bin": {

0 commit comments

Comments
 (0)