Skip to content
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

Switching a few more places to getters #6914

Merged
merged 2 commits into from
Mar 26, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Next Next commit
Switching a few more places to getters
  • Loading branch information
joehan committed Mar 26, 2024
commit 141635764ba98d231348608bffa7c580ec0c6acb
5 changes: 0 additions & 5 deletions src/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,41 +5,36 @@

let commandScopes = new Set<string>();

export const authProxyOrigin = () =>

Check warning on line 8 in src/api.ts

View workflow job for this annotation

GitHub Actions / lint (20)

Missing return type on function
utils.envOverride("FIREBASE_AUTHPROXY_URL", "https://auth.firebase.tools");
// "In this context, the client secret is obviously not treated as a secret"
// https://developers.google.com/identity/protocols/OAuth2InstalledApp
export const clientId = () =>

Check warning on line 12 in src/api.ts

View workflow job for this annotation

GitHub Actions / lint (20)

Missing return type on function
utils.envOverride(
"FIREBASE_CLIENT_ID",
"563584335869-fgrhgmd47bqnekij5i8b5pr03ho849e6.apps.googleusercontent.com",
);
export const clientSecret = () =>

Check warning on line 17 in src/api.ts

View workflow job for this annotation

GitHub Actions / lint (20)

Missing return type on function
utils.envOverride("FIREBASE_CLIENT_SECRET", "j9iVZfS8kkCEFUPaAeJV0sAi");
export const cloudbillingOrigin = () =>

Check warning on line 19 in src/api.ts

View workflow job for this annotation

GitHub Actions / lint (20)

Missing return type on function
utils.envOverride("FIREBASE_CLOUDBILLING_URL", "https://cloudbilling.googleapis.com");
export const cloudloggingOrigin = () =>

Check warning on line 21 in src/api.ts

View workflow job for this annotation

GitHub Actions / lint (20)

Missing return type on function
utils.envOverride("FIREBASE_CLOUDLOGGING_URL", "https://logging.googleapis.com");
export const cloudMonitoringOrigin = () =>

Check warning on line 23 in src/api.ts

View workflow job for this annotation

GitHub Actions / lint (20)

Missing return type on function
utils.envOverride("CLOUD_MONITORING_URL", "https://monitoring.googleapis.com");
export const containerRegistryDomain = () =>

Check warning on line 25 in src/api.ts

View workflow job for this annotation

GitHub Actions / lint (20)

Missing return type on function
utils.envOverride("CONTAINER_REGISTRY_DOMAIN", "gcr.io");
export const artifactRegistryDomain = () =>

Check warning on line 27 in src/api.ts

View workflow job for this annotation

GitHub Actions / lint (20)

Missing return type on function
utils.envOverride("ARTIFACT_REGISTRY_DOMAIN", "https://artifactregistry.googleapis.com");
export const appDistributionOrigin = () =>

Check warning on line 29 in src/api.ts

View workflow job for this annotation

GitHub Actions / lint (20)

Missing return type on function
utils.envOverride(
"FIREBASE_APP_DISTRIBUTION_URL",
"https://firebaseappdistribution.googleapis.com",
);
export const authOrigin = () =>

Check warning on line 34 in src/api.ts

View workflow job for this annotation

GitHub Actions / lint (20)

Missing return type on function
utils.envOverride("FIREBASE_AUTH_URL", "https://accounts.google.com");
export const consoleOrigin = () =>
utils.envOverride("FIREBASE_CONSOLE_URL", "https://console.firebase.google.com");
export const deployOrigin = () =>
utils.envOverride(
"FIREBASE_DEPLOY_URL",
utils.envOverride("FIREBASE_UPLOAD_URL", "https://deploy.firebase.com"),
);
export const dynamicLinksOrigin = () =>
utils.envOverride("FIREBASE_DYNAMIC_LINKS_URL", "https://firebasedynamiclinks.googleapis.com");
export const dynamicLinksKey = () =>
Expand Down
2 changes: 1 addition & 1 deletion src/gcp/devConnect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -254,5 +254,5 @@ export async function getGitRepositoryLink(
* Returns email associated with the Developer Connect Service Agent
*/
export function serviceAgentEmail(projectNumber: string): string {
return `service-${projectNumber}@${developerConnectP4SAOrigin}`;
return `service-${projectNumber}@${developerConnectP4SAOrigin()}`;
}
2 changes: 1 addition & 1 deletion src/gcp/identityPlatform.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { Client } from "../apiv2";
const API_VERSION = "v2";

const adminApiClient = new Client({
urlPrefix: identityOrigin + "/admin",
urlPrefix: identityOrigin() + "/admin",
apiVersion: API_VERSION,
});

Expand Down
6 changes: 4 additions & 2 deletions src/init/features/hosting/github.ts
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ export async function initGitHub(setup: Setup): Promise<void> {
`Visit this URL to revoke authorization for the Firebase CLI GitHub OAuth App:`,
);
logger.info(
bold(underline(`https://github.com/settings/connections/applications/${githubClientId}`)),
bold(underline(`https://github.com/settings/connections/applications/${githubClientId()}`)),
);
logLabeledBullet("Action required", `Push any new workflow file(s) to your repo`);
}
Expand Down Expand Up @@ -442,7 +442,9 @@ async function promptForRepo(
);
logger.info(
bold(
underline(`https://github.com/settings/connections/applications/${githubClientId}`),
underline(
`https://github.com/settings/connections/applications/${githubClientId()}`,
),
),
);
logger.info();
Expand Down
Loading