diff --git a/schema/firebase-config.json b/schema/firebase-config.json index 546d045af00..2e1bdc141e1 100644 --- a/schema/firebase-config.json +++ b/schema/firebase-config.json @@ -1194,6 +1194,9 @@ }, "type": "object" }, + "dataDir": { + "type": "string" + }, "database": { "additionalProperties": false, "properties": { diff --git a/src/command.ts b/src/command.ts index 325654c7953..627e04bf82d 100644 --- a/src/command.ts +++ b/src/command.ts @@ -100,6 +100,18 @@ export class Command { return this; } + /** + * Adds the --ephemeral flag to the command. + * @return The command, for chaining. + */ + withEphemeral(): Command { + this.option( + "--ephemeral", + "ignore emulators.dataDir and start with a clean state", + false, // Default value if the flag is not present + ); + return this; + } /** * Attaches a function to run before the command's action function. * @param fn the function to run. diff --git a/src/commands/emulators-exec.ts b/src/commands/emulators-exec.ts index dadd455bd3a..e11ca60930f 100644 --- a/src/commands/emulators-exec.ts +++ b/src/commands/emulators-exec.ts @@ -8,6 +8,7 @@ export const command = new Command("emulators:exec