Skip to content

Commit 618cfb4

Browse files
committed
Merge remote-tracking branch 'origin/master' into next
2 parents b21ff0b + 828e2d6 commit 618cfb4

32 files changed

+368
-139
lines changed

CHANGELOG.md

+9-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,9 @@
1-
- Fixed an issue where `--import` path was incorrectly resolved for the Data Connect emulator. (#8219)
1+
- Replaced `VSCODE_CWD` check to address issues running in VSCode environments. (#7471)
2+
- Added initial delay when loading python functions (#8239)
3+
- Enforced webframeworks enablement only on webframeworks sites (#8168)
4+
- Fixed issue where `apps:init` throws an error upon app creation.
5+
- Update Firebase Data Connect local toolkit to v1.8.3, which includes the following changes: (#8263)
6+
- Adds a `_metadata.distance` field to vector similarity search results
7+
- Fixes `auth` and `request.auth` when the request is unauthenticated
8+
- Fixes an issue with hanging commas in import statements in the generated Web SDK
9+
- Fixes an issue where the additional union type `{ __angular?: true }` breaks type inference in the generated Web SDK

firebase-vscode/CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
## NEXT
22

3+
## 0.13.1
4+
5+
- Updated internal `firebase-tools` dependency to 13.31.2
6+
37
## 0.13.0
48

59
- Updated internal `firebase-tools` dependency to 13.30.0

firebase-vscode/package-lock.json

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

firebase-vscode/package.json

+1-1
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.13.0",
7+
"version": "0.13.1",
88
"engines": {
99
"vscode": "^1.69.0"
1010
},

firebase-vscode/src/extension.ts

+2
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ import {
2525
import { env } from "./core/env";
2626

2727
import { suggestGraphqlSyntaxExtension } from "./data-connect/graphql-syntax-highlighter";
28+
import { setIsVSCodeExtension } from "../../src/vsCodeUtils";
2829

2930
// This method is called when your extension is activated
3031
export async function activate(context: vscode.ExtensionContext) {
@@ -93,6 +94,7 @@ async function checkCLIInstallation(): Promise<void> {
9394
const latestVersion = (await latestVersionRes.json())?.["dist-tags"]?.[
9495
"latest"
9596
];
97+
setIsVSCodeExtension(true);
9698
const env = { ...process.env, VSCODE_CWD: "" };
9799
const versionRes = spawnSync("firebase", ["--version"], {
98100
env,

npm-shrinkwrap.json

+10-58
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

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

src/commands/apphosting-backends-create.ts

+9-2
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,15 @@ import { doSetup } from "../apphosting/backend";
66
import { ensureApiEnabled } from "../gcp/apphosting";
77
import { APPHOSTING_TOS_ID } from "../gcp/firedata";
88
import { requireTosAcceptance } from "../requireTosAcceptance";
9+
import { logWarning } from "../utils";
910

1011
export const command = new Command("apphosting:backends:create")
1112
.description("create a Firebase App Hosting backend")
1213
.option(
1314
"-a, --app <webAppId>",
1415
"specify an existing Firebase web app's ID to associate your App Hosting backend with",
1516
)
16-
.option("-l, --location <location>", "specify the location of the backend", "")
17+
.option("-l, --location <location>", "specify the location of the backend")
1718
.option(
1819
"-s, --service-account <serviceAccount>",
1920
"specify the service account used to run the server",
@@ -23,9 +24,15 @@ export const command = new Command("apphosting:backends:create")
2324
.before(requireInteractive)
2425
.before(requireTosAcceptance(APPHOSTING_TOS_ID))
2526
.action(async (options: Options) => {
27+
if (options.location !== undefined) {
28+
logWarning(
29+
"--location is being removed in the next major release. " +
30+
"The CLI will prompt for a Primary Region where appropriate.",
31+
);
32+
}
2633
const projectId = needProjectId(options);
2734
const webAppId = options.app;
28-
const location = options.location;
35+
const location = options.location as string;
2936
const serviceAccount = options.serviceAccount;
3037

3138
await doSetup(

src/commands/apphosting-backends-delete.ts

+5-2
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,15 @@ import * as ora from "ora";
1515

1616
export const command = new Command("apphosting:backends:delete <backend>")
1717
.description("delete a Firebase App Hosting backend")
18-
.option("-l, --location <location>", "specify the location of the backend", "-")
18+
.option("-l, --location <location>", "specify the location of the backend")
1919
.withForce()
2020
.before(apphosting.ensureApiEnabled)
2121
.action(async (backendId: string, options: Options) => {
2222
const projectId = needProjectId(options);
23-
let location = options.location as string;
23+
if (options.location !== undefined) {
24+
utils.logWarning("--location is being removed in the next major release.");
25+
}
26+
let location = (options.location as string) ?? "-";
2427
let backend: apphosting.Backend;
2528
if (location === "-" || location === "") {
2629
backend = await getBackendForAmbiguousLocation(

src/commands/apphosting-backends-get.ts

+5-2
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,14 @@ import { printBackendsTable } from "./apphosting-backends-list";
88

99
export const command = new Command("apphosting:backends:get <backend>")
1010
.description("print info about a Firebase App Hosting backend")
11-
.option("-l, --location <location>", "backend location", "-")
11+
.option("-l, --location <location>", "backend location")
1212
.before(apphosting.ensureApiEnabled)
1313
.action(async (backend: string, options: Options) => {
1414
const projectId = needProjectId(options);
15-
const location = options.location as string;
15+
if (options.location !== undefined) {
16+
logWarning("--location is being removed in the next major release.");
17+
}
18+
const location = (options.location as string) ?? "-";
1619

1720
let backendsList: apphosting.Backend[] = [];
1821
try {

src/commands/apphosting-backends-list.ts

+6-2
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,20 @@ import { needProjectId } from "../projectUtils";
66
import { Options } from "../options";
77
import * as apphosting from "../gcp/apphosting";
88
import * as Table from "cli-table3";
9+
import { logWarning } from "../utils";
910

1011
const TABLE_HEAD = ["Backend", "Repository", "URL", "Primary Region", "Updated Date"];
1112

1213
export const command = new Command("apphosting:backends:list")
1314
.description("list Firebase App Hosting backends")
14-
.option("-l, --location <location>", "list backends in the specified location", "-")
15+
.option("-l, --location <location>", "list backends in the specified location")
1516
.before(apphosting.ensureApiEnabled)
1617
.action(async (options: Options) => {
18+
if (options.location !== undefined) {
19+
logWarning("--location is being removed in the next major release.");
20+
}
1721
const projectId = needProjectId(options);
18-
const location = options.location as string;
22+
const location = (options.location as string) ?? "-";
1923
let backendRes: apphosting.ListBackendsResponse;
2024
try {
2125
backendRes = await apphosting.listBackends(projectId, location);

src/commands/apphosting-builds-create.ts

+6-2
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,20 @@ import { logger } from "../logger";
33
import { Command } from "../command";
44
import { Options } from "../options";
55
import { needProjectId } from "../projectUtils";
6+
import { logWarning } from "../utils";
67

78
export const command = new Command("apphosting:builds:create <backendId>")
89
.description("create a build for an App Hosting backend")
9-
.option("-l, --location <location>", "specify the region of the backend", "us-central1")
10+
.option("-l, --location <location>", "specify the region of the backend")
1011
.option("-i, --id <buildId>", "id of the build (defaults to autogenerating a random id)", "")
1112
.option("-b, --branch <branch>", "repository branch to deploy (defaults to 'main')", "main")
1213
.before(apphosting.ensureApiEnabled)
1314
.action(async (backendId: string, options: Options) => {
1415
const projectId = needProjectId(options);
15-
const location = options.location as string;
16+
if (options.location !== undefined) {
17+
logWarning("--location is being removed in the next major release.");
18+
}
19+
const location = (options.location as string) ?? "us-central1";
1620
const buildId =
1721
(options.buildId as string) ||
1822
(await apphosting.getNextRolloutId(projectId, location, backendId));

src/commands/apphosting-builds-get.ts

+6-1
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,17 @@ import { logger } from "../logger";
33
import { Command } from "../command";
44
import { Options } from "../options";
55
import { needProjectId } from "../projectUtils";
6+
import { logWarning } from "../utils";
67

78
export const command = new Command("apphosting:builds:get <backendId> <buildId>")
89
.description("get a build for an App Hosting backend")
9-
.option("-l, --location <location>", "specify the region of the backend", "us-central1")
10+
.option("-l, --location <location>", "specify the region of the backend")
1011
.before(apphosting.ensureApiEnabled)
1112
.action(async (backendId: string, buildId: string, options: Options) => {
13+
if (options.location !== undefined) {
14+
logWarning("--location is being removed in the next major release.");
15+
}
16+
options.location = options.location ?? "us-central";
1217
const projectId = needProjectId(options);
1318
const location = options.location as string;
1419
const build = await apphosting.getBuild(projectId, location, backendId, buildId);

src/commands/apphosting-rollouts-create.ts

+6-2
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,11 @@ import { Options } from "../options";
44
import { needProjectId } from "../projectUtils";
55
import { FirebaseError } from "../error";
66
import { createRollout } from "../apphosting/rollout";
7+
import { logWarning } from "../utils";
78

89
export const command = new Command("apphosting:rollouts:create <backendId>")
910
.description("create a rollout using a build for an App Hosting backend")
10-
.option("-l, --location <location>", "specify the region of the backend", "-")
11+
.option("-l, --location <location>", "specify the region of the backend")
1112
.option(
1213
"-b, --git-branch <gitBranch>",
1314
"repository branch to deploy (mutually exclusive with -g)",
@@ -17,7 +18,10 @@ export const command = new Command("apphosting:rollouts:create <backendId>")
1718
.before(apphosting.ensureApiEnabled)
1819
.action(async (backendId: string, options: Options) => {
1920
const projectId = needProjectId(options);
20-
const location = options.location as string;
21+
if (options.location !== undefined) {
22+
logWarning("--location is being removed in the next major release.");
23+
}
24+
const location = (options.location as string) ?? "-";
2125

2226
const branch = options.gitBranch as string | undefined;
2327
const commit = options.gitCommit as string | undefined;

src/commands/apphosting-rollouts-list.ts

+5-2
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,21 @@ import { logger } from "../logger";
33
import { Command } from "../command";
44
import { Options } from "../options";
55
import { needProjectId } from "../projectUtils";
6+
import { logWarning } from "../utils";
67

78
export const command = new Command("apphosting:rollouts:list <backendId>")
89
.description("list rollouts of an App Hosting backend")
910
.option(
1011
"-l, --location <location>",
1112
"region of the rollouts (defaults to listing rollouts from all regions)",
12-
"-",
1313
)
1414
.before(apphosting.ensureApiEnabled)
1515
.action(async (backendId: string, options: Options) => {
16+
if (options.location !== undefined) {
17+
logWarning("--location is being removed in the next major release.");
18+
}
1619
const projectId = needProjectId(options);
17-
const location = options.location as string;
20+
const location = (options.location as string) ?? "-";
1821
const rollouts = await apphosting.listRollouts(projectId, location, backendId);
1922
if (rollouts.unreachable) {
2023
logger.error(

src/commands/apps-init.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ export const command = new Command("apps:init [platform] [appId]")
9292
} catch (e) {
9393
if ((e as Error).message.includes("associated with this Firebase project")) {
9494
const projectId = needProjectId(options);
95-
await sdkInit(platform, { ...options, project: projectId });
95+
await sdkInit(detectedPlatform, { ...options, project: projectId });
9696
} else {
9797
throw e;
9898
}

0 commit comments

Comments
 (0)