Skip to content

implement no-authorized-domains for channels:deploy #3741

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

Merged
merged 4 commits into from
Sep 8, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
- `ext:install` now supports `--force` and `--non-interactive` flags.
- Fixes a crash when customers deploy an empty Cloud Functions project (#3705)
- Fixes (and implements) `--no-authorized-domains`, skipping syncing with Firebase Auth, when deploying to a Firebase Hosting channel (#3740).
13 changes: 8 additions & 5 deletions src/commands/hosting-channel-deploy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,6 @@ export default new Command("hosting:channel:deploy [channelId]")
if (options.open) {
throw new FirebaseError("open is not yet implemented");
}
// TODO: implement --no-authorized-domains.
if (options["no-authorized-domains"]) {
throw new FirebaseError("no-authorized-domains is not yet implemented");
}

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

if (options.authorizedDomains) {
await syncAuthState(projectId, sites);
} else {
logger.debug(
`skipping syncAuthState since authorizedDomains is ${options.authorizedDomains}`
);
}

logger.info();
await syncAuthState(projectId, sites);
const deploys: { [key: string]: ChannelInfo } = {};
sites.forEach((d) => {
deploys[d.target || d.site] = d;
Expand Down