-
Notifications
You must be signed in to change notification settings - Fork 1k
[Refactor] Extract a shared init Feature interface for all product #8535
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
src/init/features/hosting/github.ts
Outdated
@@ -132,7 +132,7 @@ export async function initGitHub(setup: Setup): Promise<void> { | |||
|
|||
// If the developer is using predeploy scripts in firebase.json, | |||
// remind them before they set up a script in their workflow file. | |||
if (setup.config.hosting.predeploy) { | |||
if ((setup.config.hosting as any).predeploy) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does the type system let us switch this to something like:
if (!Array.isArray(setup.config.hosting) && setup.config.hosting.predeploy) {
}
I think the existing code here is a bit broken and will never trigger if you have a HostingMulitple in your config. If you're feeling inspired, we could fix that, but since its just an informational mssage I'm ok leaving it as is
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just tested, it does accept that.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #8535 +/- ##
==========================================
- Coverage 51.04% 51.01% -0.03%
==========================================
Files 426 426
Lines 30562 30598 +36
Branches 6271 6276 +5
==========================================
+ Hits 15599 15609 +10
- Misses 13574 13601 +27
+ Partials 1389 1388 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Previous:
(setup: any, config: any, options?: any) => Promise<unknown>
Now:
(setup: Setup, config: Config, options?: any) => Promise<unknown>
Mostly refactor to make TS compiler happy:
database
: rewrite to useSetup
type.genkit
: seems to be doing something bad or wrong with theSetup
argument. Duct-tap it in the caller site for now.Hoping to incrementally make it easier to define a shared
askQuestion
, thenactuate
split for products. ThedoSetup
func can remain as the old way during the migration.