From 514bba3ad0fe95cfe3c0ee4f8617597fad08d6a8 Mon Sep 17 00:00:00 2001 From: James Daniels Date: Wed, 11 May 2022 12:12:07 -0400 Subject: [PATCH] Bump firebase-frameworks (#4539) * Bump frameworks * schema * Adding source to array props of schema * Changelog and bump * Bump shrinkwrap * Fixing hosting schema * Revert for feedback * Formatting * Schema * Formatting * Bump to 0.4.2 which fixes a build issue for custom / express.js apps * Update CHANGELOG.md Co-authored-by: Bryan Kendall --- CHANGELOG.md | 2 ++ npm-shrinkwrap.json | 14 +++++++------- package.json | 2 +- schema/firebase-config.json | 9 +++++++++ src/firebaseConfig.ts | 1 + src/frameworks/index.ts | 11 ++++++++++- 6 files changed, 30 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e69de29bb2d..c9fe90ececf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -0,0 +1,2 @@ +- Updates [firebase-frameworks](https://github.com/FirebaseExtended/firebase-framework-tools) to 0.4.2 addressing several issues with the web frameworks integration. +- Adds `hosting.source` to configuration schema as an allowed property. diff --git a/npm-shrinkwrap.json b/npm-shrinkwrap.json index 2bed7140385..7491584381e 100644 --- a/npm-shrinkwrap.json +++ b/npm-shrinkwrap.json @@ -30,7 +30,7 @@ "exit-code": "^1.0.2", "express": "^4.16.4", "filesize": "^6.1.0", - "firebase-frameworks": "^0.4.0", + "firebase-frameworks": "^0.4.2", "fs-extra": "^5.0.0", "glob": "^7.1.2", "google-auth-library": "^7.11.0", @@ -6059,9 +6059,9 @@ } }, "node_modules/firebase-frameworks": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/firebase-frameworks/-/firebase-frameworks-0.4.0.tgz", - "integrity": "sha512-Seu+1dKNo3AacMrOHb1V0F41DfCKiM6gW4Go/34z78WtuBkzKNSUOUI+w8XCH7A96QGZRbNbGwt33BiSXEb2xQ==", + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/firebase-frameworks/-/firebase-frameworks-0.4.2.tgz", + "integrity": "sha512-a3xNE3wPh8JWq2WOgWlSypVS9O/y/3/3Im9EV7bNBF44wFV2oOAyFdVgDk6it81+lBRv7ci8PttgQZohtsFeVA==", "dependencies": { "fs-extra": "^10.1.0", "jsonc-parser": "^3.0.0", @@ -18454,9 +18454,9 @@ } }, "firebase-frameworks": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/firebase-frameworks/-/firebase-frameworks-0.4.0.tgz", - "integrity": "sha512-Seu+1dKNo3AacMrOHb1V0F41DfCKiM6gW4Go/34z78WtuBkzKNSUOUI+w8XCH7A96QGZRbNbGwt33BiSXEb2xQ==", + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/firebase-frameworks/-/firebase-frameworks-0.4.2.tgz", + "integrity": "sha512-a3xNE3wPh8JWq2WOgWlSypVS9O/y/3/3Im9EV7bNBF44wFV2oOAyFdVgDk6it81+lBRv7ci8PttgQZohtsFeVA==", "requires": { "fs-extra": "^10.1.0", "jsonc-parser": "^3.0.0", diff --git a/package.json b/package.json index 6eaf84ee1c7..612e37b50e9 100644 --- a/package.json +++ b/package.json @@ -107,7 +107,7 @@ "exit-code": "^1.0.2", "express": "^4.16.4", "filesize": "^6.1.0", - "firebase-frameworks": "^0.4.0", + "firebase-frameworks": "^0.4.2", "fs-extra": "^5.0.0", "glob": "^7.1.2", "google-auth-library": "^7.11.0", diff --git a/schema/firebase-config.json b/schema/firebase-config.json index 9c82b456a94..69b213df88a 100644 --- a/schema/firebase-config.json +++ b/schema/firebase-config.json @@ -910,6 +910,9 @@ "site": { "type": "string" }, + "source": { + "type": "string" + }, "target": { "type": "string" }, @@ -1392,6 +1395,9 @@ "site": { "type": "string" }, + "source": { + "type": "string" + }, "target": { "type": "string" }, @@ -1874,6 +1880,9 @@ "site": { "type": "string" }, + "source": { + "type": "string" + }, "target": { "type": "string" }, diff --git a/src/firebaseConfig.ts b/src/firebaseConfig.ts index c6b5631fb47..48c725e2c1c 100644 --- a/src/firebaseConfig.ts +++ b/src/firebaseConfig.ts @@ -59,6 +59,7 @@ export type HostingHeaders = HostingSource & { type HostingBase = { public?: string; + source?: string; ignore?: string[]; appAssociation?: string; cleanUrls?: boolean; diff --git a/src/frameworks/index.ts b/src/frameworks/index.ts index 814e06708c1..1b97bd437af 100644 --- a/src/frameworks/index.ts +++ b/src/frameworks/index.ts @@ -95,8 +95,17 @@ export const prepareFrameworks = async (targetNames: string[], context: any, opt firebaseProjectConfig = await getAppConfig(appId, AppPlatform.WEB); } else { console.warn( - `No Firebase app associated with site ${site}, unable to provide authenticated server context` + `No Firebase app associated with site ${site}, unable to provide authenticated server context. +You can link a Web app to a Hosting site here https://console.firebase.google.com/project/_/settings/general/web` ); + if (!options.nonInteractive) { + const continueDeploy = await promptOnce({ + type: "confirm", + default: true, + message: "Would you like to continue with the deploy?", + }); + if (!continueDeploy) exit(1); + } } } }