diff --git a/CHANGELOG.md b/CHANGELOG.md index fbe8ff2758f..3db292b23b5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,8 @@ - BREAKING(general)! Removed support for node 18. - BREAKING(apphosting)! `init emulators` App Hosting flow now creates `apphosting.emulator.yaml` with references to live secrets rather than `apphosting.local.yaml` with saved plaintext. `apphosting:config:export` command has been removed (#8361) - BREAKING(apphosting)! Removed `--location` flag from `apphosting` commands. Instead, commands now prompt for primary region as needed. -- BREAKING(dataconnect)! `deploy dataconnect` will now warn about unsafe connector changes and insecure operations. -- BREAKING(cloud functions)! `deploy functions` no longer aggressively tries to clean up functions artifacts. Instead, it sets up an Artifact Registry Cleanup Policy to clean these up automatically. +- BREAKING(dataconnect)! `deploy dataconnect` now warns about unsafe connector changes and insecure operations. +- BREAKING(cloud functions)! Removed the `experimental:functions:shell` command. Use `functions:shell` instead. - Updated the Firebase Data Connect local toolkit to v2.0.0, which contains the following changes: (#8370) - Added support for aggregate functions in queries. - BREAKING: New types for Generated React SDKs. @@ -11,7 +11,7 @@ - `apphosting:secrets:grantAccess` can now grant access to emails and can grant multiple secrets at once (#8357) - `apphosting:secrets:set` now has flows to help with test secrets (#8359) - Updated `init dataconnect` templates to `v1`. -- Fix bug in Auth emulator where accounts:lookup is case-sensitive for emails (#8344) -- Fix bug where function deploys didn't support shorthand notation and parameterized service account (#8366) +- Fixed a bug in Auth emulator where accounts:lookup is case-sensitive for emails (#8344) +- Fixed a bug where function deploys didn't support shorthand notation and parameterized service account (#8366) - Fixed an issue where `sql:setup` would incorrectly remove the `cloudsqlsuperuser` role from `firebasesuperuser` (#8363) - Fixed a bug where `appdistribution:testers:list` would error out if there were no testers. diff --git a/src/commands/appdistribution-groups-create.ts b/src/commands/appdistribution-groups-create.ts index a12c809dd3c..4a5efb0d0f8 100644 --- a/src/commands/appdistribution-groups-create.ts +++ b/src/commands/appdistribution-groups-create.ts @@ -5,7 +5,7 @@ import { AppDistributionClient } from "../appdistribution/client"; import { getProjectName } from "../appdistribution/options-parser-util"; export const command = new Command("appdistribution:groups:create [alias]") - .description("create group in project") + .description("create an App Distribution group") .alias("appdistribution:group:create") .before(requireAuth) .action(async (displayName: string, alias?: string, options?: any) => { diff --git a/src/commands/appdistribution-groups-delete.ts b/src/commands/appdistribution-groups-delete.ts index 62319e5c830..9ee71bad793 100644 --- a/src/commands/appdistribution-groups-delete.ts +++ b/src/commands/appdistribution-groups-delete.ts @@ -6,7 +6,7 @@ import { AppDistributionClient } from "../appdistribution/client"; import { getProjectName } from "../appdistribution/options-parser-util"; export const command = new Command("appdistribution:groups:delete ") - .description("delete group from a project") + .description("delete an App Distribution group") .alias("appdistribution:group:delete") .before(requireAuth) .action(async (alias: string, options: any) => { diff --git a/src/commands/appdistribution-groups-list.ts b/src/commands/appdistribution-groups-list.ts index 68014e3860c..5b7fa7ae6b2 100644 --- a/src/commands/appdistribution-groups-list.ts +++ b/src/commands/appdistribution-groups-list.ts @@ -11,7 +11,7 @@ import * as utils from "../utils"; import * as Table from "cli-table3"; export const command = new Command("appdistribution:groups:list") - .description("list groups in project") + .description("list App Distribution groups") .alias("appdistribution:group:list") .before(requireAuth) .action(async (options?: Options): Promise => { diff --git a/src/commands/appdistribution-testers-add.ts b/src/commands/appdistribution-testers-add.ts index 81c63381606..27d85a68a64 100644 --- a/src/commands/appdistribution-testers-add.ts +++ b/src/commands/appdistribution-testers-add.ts @@ -5,7 +5,7 @@ import { AppDistributionClient } from "../appdistribution/client"; import { getEmails, getProjectName } from "../appdistribution/options-parser-util"; export const command = new Command("appdistribution:testers:add [emails...]") - .description("add testers to project (and possibly group)") + .description("add testers to project (and App Distribution group, if specified via flag)") .option("--file ", "a path to a file containing a list of tester emails to be added") .option( "--group-alias ", diff --git a/src/commands/appdistribution-testers-remove.ts b/src/commands/appdistribution-testers-remove.ts index fbe6bbc8cf8..2070454df02 100644 --- a/src/commands/appdistribution-testers-remove.ts +++ b/src/commands/appdistribution-testers-remove.ts @@ -7,7 +7,7 @@ import { getEmails, getProjectName } from "../appdistribution/options-parser-uti import { logger } from "../logger"; export const command = new Command("appdistribution:testers:remove [emails...]") - .description("remove testers from a project (or group)") + .description("remove testers from a project (or App Distribution group, if specified via flag)") .option("--file ", "a path to a file containing a list of tester emails to be removed") .option( "--group-alias ", diff --git a/src/commands/apphosting-secrets-access.ts b/src/commands/apphosting-secrets-access.ts index ecd5d539e7e..ffbc4024234 100644 --- a/src/commands/apphosting-secrets-access.ts +++ b/src/commands/apphosting-secrets-access.ts @@ -9,7 +9,7 @@ import { requirePermissions } from "../requirePermissions"; export const command = new Command("apphosting:secrets:access ") .description( - "Access secret value given secret and its version. Defaults to accessing the latest version.", + "access secret value given secret and its version. Defaults to accessing the latest version", ) .before(requireAuth) .before(secretManager.ensureApi) diff --git a/src/commands/apphosting-secrets-describe.ts b/src/commands/apphosting-secrets-describe.ts index 6de8aef6311..5f6b6076359 100644 --- a/src/commands/apphosting-secrets-describe.ts +++ b/src/commands/apphosting-secrets-describe.ts @@ -9,7 +9,7 @@ import { requirePermissions } from "../requirePermissions"; import * as Table from "cli-table3"; export const command = new Command("apphosting:secrets:describe ") - .description("Get metadata for secret and its versions.") + .description("get metadata for secret and its versions") .before(requireAuth) .before(secretManager.ensureApi) .before(requirePermissions, ["secretmanager.secrets.get"]) diff --git a/src/commands/apps-android-sha-create.ts b/src/commands/apps-android-sha-create.ts index 5103374f4f3..7a7609ea9ee 100644 --- a/src/commands/apps-android-sha-create.ts +++ b/src/commands/apps-android-sha-create.ts @@ -15,7 +15,7 @@ function getCertHashType(shaHash: string): string { } export const command = new Command("apps:android:sha:create ") - .description("add a SHA certificate hash for a given app id.") + .description("add a SHA certificate hash for a given app id") .before(requireAuth) .action( async (appId: string = "", shaHash: string = "", options: any): Promise => { diff --git a/src/commands/apps-android-sha-delete.ts b/src/commands/apps-android-sha-delete.ts index 209d0376651..02cac18d3b1 100644 --- a/src/commands/apps-android-sha-delete.ts +++ b/src/commands/apps-android-sha-delete.ts @@ -7,7 +7,7 @@ import { requireAuth } from "../requireAuth"; import { promiseWithSpinner } from "../utils"; export const command = new Command("apps:android:sha:delete ") - .description("delete a SHA certificate hash for a given app id.") + .description("delete a SHA certificate hash for a given app id") .before(requireAuth) .action(async (appId: string = "", shaId: string = "", options: any): Promise => { const projectId = needProjectId(options); diff --git a/src/commands/apps-android-sha-list.ts b/src/commands/apps-android-sha-list.ts index 3ed01047d7e..65e0f260f1c 100644 --- a/src/commands/apps-android-sha-list.ts +++ b/src/commands/apps-android-sha-list.ts @@ -36,7 +36,7 @@ function logCertificatesCount(count: number = 0): void { } export const command = new Command("apps:android:sha:list ") - .description("list the SHA certificate hashes for a given app id. ") + .description("list the SHA certificate hashes for a given app id") .before(requireAuth) .action(async (appId: string = "", options: any): Promise => { const projectId = needProjectId(options); diff --git a/src/commands/apps-create.ts b/src/commands/apps-create.ts index aa8e0601d02..a95c075909c 100644 --- a/src/commands/apps-create.ts +++ b/src/commands/apps-create.ts @@ -53,7 +53,7 @@ interface AppsCreateOptions extends Options { export const command = new Command("apps:create [platform] [displayName]") .description( - "create a new Firebase app. [platform] can be IOS, ANDROID or WEB (case insensitive).", + "create a new Firebase app. [platform] can be IOS, ANDROID or WEB (case insensitive)", ) .option("-a, --package-name ", "required package name for the Android app") .option("-b, --bundle-id ", "required bundle id for the iOS app") diff --git a/src/commands/apps-init.ts b/src/commands/apps-init.ts index 3527126a1eb..053b74c7d0f 100644 --- a/src/commands/apps-init.ts +++ b/src/commands/apps-init.ts @@ -72,7 +72,7 @@ function toAppPlatform(str: string) { } export const command = new Command("apps:init [platform] [appId]") - .description("Automatically download and create config of a Firebase app. ") + .description("automatically download and create config of a Firebase app") .before(requireAuth) .option("-o, --out [file]", "(optional) write config output to a file") .action(async (platform = "", appId = "", options: AppsInitOptions): Promise => { diff --git a/src/commands/auth-export.ts b/src/commands/auth-export.ts index 1de847d6b05..bb45e32fc64 100644 --- a/src/commands/auth-export.ts +++ b/src/commands/auth-export.ts @@ -17,7 +17,7 @@ interface exportOptions { } export const command = new Command("auth:export [dataFile]") - .description("Export accounts from your Firebase project into a data file") + .description("export accounts from your Firebase project into a data file") .option( "--format ", "Format of exported data (csv, json). Ignored if has format extension.", diff --git a/src/commands/auth-import.ts b/src/commands/auth-import.ts index 99011af78be..cbefe8191e2 100644 --- a/src/commands/auth-import.ts +++ b/src/commands/auth-import.ts @@ -21,7 +21,7 @@ import { const MAX_BATCH_SIZE = 1000; export const command = new Command("auth:import [dataFile]") - .description("import users into your Firebase project from a data file(.csv or .json)") + .description("import users into your Firebase project from a data file (.csv or .json)") .option( "--hash-algo ", "specify the hash algorithm used in password for these accounts", diff --git a/src/commands/database-instances-create.ts b/src/commands/database-instances-create.ts index f860a232d0b..1cfcb2f8136 100644 --- a/src/commands/database-instances-create.ts +++ b/src/commands/database-instances-create.ts @@ -15,7 +15,7 @@ import { FirebaseError } from "../error"; import { MISSING_DEFAULT_INSTANCE_ERROR_MESSAGE } from "../requireDatabaseInstance"; export const command = new Command("database:instances:create ") - .description("create a realtime database instance") + .description("create a Realtime Database instance") .option( "-l, --location ", "(optional) location for the database instance, defaults to us-central1", diff --git a/src/commands/database-profile.ts b/src/commands/database-profile.ts index 68fa9fb662f..f6be4bd209e 100644 --- a/src/commands/database-profile.ts +++ b/src/commands/database-profile.ts @@ -7,10 +7,8 @@ import { profiler } from "../profiler"; import { Emulators } from "../emulator/types"; import { warnEmulatorNotSupported } from "../emulator/commandUtils"; -const description = "profile the Realtime Database and generate a usage report"; - export const command = new Command("database:profile") - .description(description) + .description("profile the Realtime Database and generate a usage report") .option("-o, --output ", "save the output to the specified file") .option( "-d, --duration ", diff --git a/src/commands/database-settings-set.ts b/src/commands/database-settings-set.ts index 2b3ac73b956..1c7092a8947 100644 --- a/src/commands/database-settings-set.ts +++ b/src/commands/database-settings-set.ts @@ -13,7 +13,7 @@ import { requireDatabaseInstance } from "../requireDatabaseInstance"; import * as utils from "../utils"; export const command = new Command("database:settings:set ") - .description("set the realtime database setting at path.") + .description("set the Realtime Database setting at path") .option( "--instance ", "use the database .firebaseio.com (if omitted, use default database instance)", diff --git a/src/commands/database-update.ts b/src/commands/database-update.ts index 37e32039f8b..97889baa530 100644 --- a/src/commands/database-update.ts +++ b/src/commands/database-update.ts @@ -16,7 +16,7 @@ import { requireDatabaseInstance } from "../requireDatabaseInstance"; import * as utils from "../utils"; export const command = new Command("database:update [infile]") - .description("update some of the keys for the defined path in your Firebase") + .description("update some of the keys for the defined path in your Realtime Database") .option("-d, --data ", "specify escaped JSON directly") .option("-f, --force", "pass this option to bypass confirmation prompt") .option( diff --git a/src/commands/dataconnect-sdk-generate.ts b/src/commands/dataconnect-sdk-generate.ts index d522af7d4fa..967c2cfd6f8 100644 --- a/src/commands/dataconnect-sdk-generate.ts +++ b/src/commands/dataconnect-sdk-generate.ts @@ -12,7 +12,7 @@ import { getProjectDefaultAccount } from "../auth"; type GenerateOptions = Options & { watch?: boolean }; export const command = new Command("dataconnect:sdk:generate") - .description("generates typed SDKs for your Data Connect connectors") + .description("generate typed SDKs for your Data Connect connectors") .option( "--watch", "watch for changes to your connector GQL files and regenerate your SDKs when updates occur", diff --git a/src/commands/dataconnect-services-list.ts b/src/commands/dataconnect-services-list.ts index ecada7c5d04..1bf17378d82 100644 --- a/src/commands/dataconnect-services-list.ts +++ b/src/commands/dataconnect-services-list.ts @@ -9,7 +9,7 @@ import { ensureApis } from "../dataconnect/ensureApis"; import * as Table from "cli-table3"; export const command = new Command("dataconnect:services:list") - .description("list all deployed services in your Firebase project") + .description("list all deployed Data Connect services") .before(requirePermissions, [ "dataconnect.services.list", "dataconnect.schemas.list", diff --git a/src/commands/dataconnect-sql-diff.ts b/src/commands/dataconnect-sql-diff.ts index 1ea50b92416..9b51d82d2d4 100644 --- a/src/commands/dataconnect-sql-diff.ts +++ b/src/commands/dataconnect-sql-diff.ts @@ -9,7 +9,7 @@ import { requireAuth } from "../requireAuth"; export const command = new Command("dataconnect:sql:diff [serviceId]") .description( - "displays the differences between a local DataConnect schema and your CloudSQL database's current schema", + "display the differences between a local Data Connect schema and your CloudSQL database's current schema", ) .before(requirePermissions, [ "firebasedataconnect.services.list", diff --git a/src/commands/dataconnect-sql-grant.ts b/src/commands/dataconnect-sql-grant.ts index 4fb77014086..ff491a39525 100644 --- a/src/commands/dataconnect-sql-grant.ts +++ b/src/commands/dataconnect-sql-grant.ts @@ -12,7 +12,7 @@ import { fdcSqlRoleMap } from "../gcp/cloudsql/permissions_setup"; const allowedRoles = Object.keys(fdcSqlRoleMap); export const command = new Command("dataconnect:sql:grant [serviceId]") - .description("Grants the SQL role to the provided user or service account .") + .description("grants the SQL role to the provided user or service account ") .option("-R, --role ", "The SQL role to grant. One of: owner, writer, or reader.") .option( "-E, --email ", diff --git a/src/commands/dataconnect-sql-migrate.ts b/src/commands/dataconnect-sql-migrate.ts index 5aa1f23558c..f75fe5ea98e 100644 --- a/src/commands/dataconnect-sql-migrate.ts +++ b/src/commands/dataconnect-sql-migrate.ts @@ -10,7 +10,7 @@ import { ensureApis } from "../dataconnect/ensureApis"; import { logLabeledSuccess } from "../utils"; export const command = new Command("dataconnect:sql:migrate [serviceId]") - .description("migrates your CloudSQL database's schema to match your local DataConnect schema") + .description("migrate your CloudSQL database's schema to match your local Data Connect schema") .before(requirePermissions, [ "firebasedataconnect.services.list", "firebasedataconnect.schemas.list", @@ -18,7 +18,7 @@ export const command = new Command("dataconnect:sql:migrate [serviceId]") "cloudsql.instances.connect", ]) .before(requireAuth) - .withForce("Execute any required database changes without prompting") + .withForce("execute any required database changes without prompting") .action(async (serviceId: string, options: Options) => { const projectId = needProjectId(options); await ensureApis(projectId); diff --git a/src/commands/dataconnect-sql-setup.ts b/src/commands/dataconnect-sql-setup.ts index 8fa1a2dc0ea..5986ec33806 100644 --- a/src/commands/dataconnect-sql-setup.ts +++ b/src/commands/dataconnect-sql-setup.ts @@ -13,7 +13,7 @@ import { getIAMUser } from "../gcp/cloudsql/connect"; import * as cloudSqlAdminClient from "../gcp/cloudsql/cloudsqladmin"; export const command = new Command("dataconnect:sql:setup [serviceId]") - .description("Setup your CloudSQL database") + .description("set up your CloudSQL database") .before(requirePermissions, [ "firebasedataconnect.services.list", "firebasedataconnect.schemas.list", diff --git a/src/commands/dataconnect-sql-shell.ts b/src/commands/dataconnect-sql-shell.ts index 9055267d6a5..dac772f9317 100644 --- a/src/commands/dataconnect-sql-shell.ts +++ b/src/commands/dataconnect-sql-shell.ts @@ -85,7 +85,9 @@ async function mainShellLoop(conn: pg.PoolClient) { } export const command = new Command("dataconnect:sql:shell [serviceId]") - .description("Starts a shell connected directly to your dataconnect cloudsql instance.") + .description( + "start a shell connected directly to your Data Connect service's linked CloudSQL instance", + ) .before(requirePermissions, ["firebasedataconnect.services.list", "cloudsql.instances.connect"]) .before(requireAuth) .action(async (serviceId: string, options: Options) => { diff --git a/src/commands/deploy.ts b/src/commands/deploy.ts index 2d750c9a470..322d18cadd8 100644 --- a/src/commands/deploy.ts +++ b/src/commands/deploy.ts @@ -88,13 +88,13 @@ export const command = new Command("deploy") "When filtering based on codebases, use colons to specify codebase names " + '(e.g. "--only functions:codebase1:func1,functions:codebase2:group1.subgroup1"). ' + "For data connect, can specify filters with colons to deploy only a service, connector, or schema" + - '(e.g. "--only dataconnect:serviceId,dataconnect:serviceId:connectorId,dataconnect:serviceId:schema"). ', + '(e.g. "--only dataconnect:serviceId,dataconnect:serviceId:connectorId,dataconnect:serviceId:schema")', ) .option("--except ", 'deploy to all targets except specified (e.g. "database")') .option( "--dry-run", - "Perform a dry run of your deployment. Validates your changes and builds your code without deploying any changes to your project. " + - "In order to provide better validation, this may still enable APIs on the target project.", + "perform a dry run of your deployment. Validates your changes and builds your code without deploying any changes to your project. " + + "In order to provide better validation, this may still enable APIs on the target project", ) .before(requireConfig) .before((options) => { diff --git a/src/commands/emulators-exec.ts b/src/commands/emulators-exec.ts index 6c023cbe098..dadd455bd3a 100644 --- a/src/commands/emulators-exec.ts +++ b/src/commands/emulators-exec.ts @@ -6,7 +6,7 @@ export const command = new Command("emulators:exec