firebase-tools
firebase-tools copied to clipboard
feat: Implement --ephemeral flag to prevent emulator data export
The --ephemeral flag for the emulators:start command ensures that no data is exported when the emulators stop, even if --export-on-exit is specified or if the emulators:export command is used during the session.
Import functionality remains unaffected when using --ephemeral with --import.
Changes include:
- Modified
controller.tsto check foroptions.ephemeralinexportOnExitandexportEmulatorDatafunctions, preventing export and logging a message. - Added integration tests in
scripts/emulator-import-export-tests/tests.tsto verify:- No export occurs with
--export-on-exitin ephemeral mode. - Data import works, but subsequent export is prevented in ephemeral mode.
- The
emulators:exportcommand does not export data if emulators were started with--ephemeral.
- No export occurs with