Conversation
joehan
approved these changes
Sep 18, 2024
Member
joehan
left a comment
There was a problem hiding this comment.
Some style nits, but LGTM overall!
| - Improved handling of Spark projects in `firebase init dataconnect`. (#7666) | ||
| - Updated Firebase Data Connect local toolkit version to v1.3.7, which adds support for `v1beta` gRPC APIs and the `OrderDirection` enum in Swift, and makes transactional queries and mutations opt-in with the `@transaction` directive. (#7679) | ||
| - Add dataconnect SQL grant command `firebase dataconnect:sql:grant -R <role> -E email`. (#7656) | ||
| - Added new command ext:sdk:install to allow you to configure extensions in a functions codebase. (#7581) |
Member
There was a problem hiding this comment.
Suggested change
| - Added new command ext:sdk:install to allow you to configure extensions in a functions codebase. (#7581) | |
| - Added new command `firebase ext:sdk:install` to allow you to configure extensions in a functions codebase. (#7581) |
Nit: If there are docs, it would be good to link them here too.
| @@ -121,5 +122,10 @@ export const command = new Command("ext:info <extensionName>") | |||
| `to install this extension, type ` + | |||
Member
There was a problem hiding this comment.
Suggested change
| `to install this extension, type ` + | |
| `to install this extension, run ` + |
| ); | ||
| utils.logLabeledBullet( | ||
| logPrefix, | ||
| `to install an autogenerated SDK for this extension into your functions codebase, type ` + |
Member
There was a problem hiding this comment.
Suggested change
| `to install an autogenerated SDK for this extension into your functions codebase, type ` + | |
| `to install an autogenerated SDK for this extension into your functions codebase, run ` + |
| @@ -0,0 +1,111 @@ | |||
| import * as clc from "colorette"; | |||
| import { checkMinRequiredVersion } from "../checkMinRequiredVersion"; | |||
Member
There was a problem hiding this comment.
Suggested change
| import { checkMinRequiredVersion } from "../checkMinRequiredVersion"; | |
| import { checkMinRequiredVersion } from "../checkMinRequiredVersion"; |
Nit: We usually put a newline between external and internal imports
| export async function haveDynamic(projectId: string): Promise<DeploymentInstanceSpec[]> { | ||
| let instances = await extensionsApi.listInstances(projectId); | ||
| // Only include instances created by SDK | ||
| instances = instances.filter((i) => i.labels?.createdBy === "SDK"); |
Member
There was a problem hiding this comment.
Optonal style nit: I like chaining these without setting to a variable - ie:
return (await extensionsApi.listInstances(projectId)).filter(...).map(...);
| // Make sure the directories exist | ||
| await fs.promises | ||
| .mkdir(path.dirname(filePath), { recursive: true }) | ||
| .then(async () => { |
Member
There was a problem hiding this comment.
This .then() should be unnecessary. Pretty sure this code works identically if you just delete it and replace the .catch with a standard try/catch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add firebase ext:sdk:install command