Skip to content

Commit 17f8fe9

Browse files
authored
implement no-authorized-domains for channels:deploy (#3741)
* implement no-authorized-domains for channels:deploy * changelog * spacing is important * FORMATTING IS HARD
1 parent f49e765 commit 17f8fe9

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
- `ext:install` now supports `--force` and `--non-interactive` flags.
22
- Fixes a crash when customers deploy an empty Cloud Functions project (#3705)
3+
- Fixes (and implements) `--no-authorized-domains`, skipping syncing with Firebase Auth, when deploying to a Firebase Hosting channel (#3740).

src/commands/hosting-channel-deploy.ts

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,6 @@ export default new Command("hosting:channel:deploy [channelId]")
5555
if (options.open) {
5656
throw new FirebaseError("open is not yet implemented");
5757
}
58-
// TODO: implement --no-authorized-domains.
59-
if (options["no-authorized-domains"]) {
60-
throw new FirebaseError("no-authorized-domains is not yet implemented");
61-
}
6258

6359
let expireTTL = DEFAULT_DURATION;
6460
if (options.expires) {
@@ -151,8 +147,15 @@ export default new Command("hosting:channel:deploy [channelId]")
151147
});
152148
}
153149

150+
if (options.authorizedDomains) {
151+
await syncAuthState(projectId, sites);
152+
} else {
153+
logger.debug(
154+
`skipping syncAuthState since authorizedDomains is ${options.authorizedDomains}`
155+
);
156+
}
157+
154158
logger.info();
155-
await syncAuthState(projectId, sites);
156159
const deploys: { [key: string]: ChannelInfo } = {};
157160
sites.forEach((d) => {
158161
deploys[d.target || d.site] = d;

0 commit comments

Comments
 (0)