fireemu 0.20.0 → 0.22.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +150 -153
- package/package.json +6 -6
package/README.md
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
# Fireemu
|
|
4
4
|
|
|
5
|
+
[](https://www.npmjs.com/package/fireemu)
|
|
6
|
+
|
|
5
7
|
Fireemu is a local emulator for testing applications built with Firebase. It aims to match production Firebase behavior as closely as possible, so you can test locally and in CI without using a real Firebase project.
|
|
6
8
|
|
|
7
9
|
Passing tests against the official emulator does not always mean your application will behave the same way in production. Some features are not supported by the official emulator, and some execution conditions are difficult to reproduce locally. These gaps can leave you relying on a real Firebase project for part of your testing.
|
|
@@ -14,7 +16,7 @@ Fireemu is being developed to close these gaps. For example, it provides:
|
|
|
14
16
|
|
|
15
17
|
Fireemu is still in development and does not yet reproduce every feature and behavior of production Firebase. Before relying on Fireemu’s test results in CI or other automated workflows, we recommend differential testing against production Firebase services for the features and critical workflows your application uses. Run the same tests against Fireemu and a dedicated Firebase test project, and check for differences in results and behavior that could affect your application. Use a dedicated test project, not your live production project.
|
|
16
18
|
|
|
17
|
-
See the [capability manifest](https://github.com/t-k/fireemu/blob/v0.
|
|
19
|
+
See the [capability manifest](https://github.com/t-k/fireemu/blob/v0.22.0/crates/fireemu/src/capabilities.json) and [compatibility documentation](https://github.com/t-k/fireemu/blob/v0.22.0/docs/compatibility-contract.md) for supported features, known differences, and the status of compatibility verification.
|
|
18
20
|
|
|
19
21
|
## Quick start
|
|
20
22
|
|
|
@@ -41,7 +43,7 @@ npx fireemu exec -- <command>
|
|
|
41
43
|
npx fireemu exec -- npm test
|
|
42
44
|
```
|
|
43
45
|
|
|
44
|
-
`up` and `exec` read `fireemu.json` from the current directory, or, when there is none, the nearest `firebase.json` (see [Which configuration files are loaded](#which-configuration-files-are-loaded)). The first lines of the startup output name the files that were loaded and say, for Firestore and Storage, whether Security Rules are loaded.
|
|
46
|
+
`up` and `exec` read `fireemu.toml` (or an existing `fireemu.json`) from the current directory, or, when there is none, the nearest `firebase.json` (see [Which configuration files are loaded](#which-configuration-files-are-loaded)). The first lines of the startup output name the files that were loaded and say, for Firestore and Storage, whether Security Rules are loaded.
|
|
45
47
|
|
|
46
48
|
Every command documents its options: run `npx fireemu --help` for the commands and `npx fireemu <command> --help` (or `npx fireemu help <command>`) for the options of one, for example `npx fireemu exec --help`. After `--`, `exec` passes `--help` to your command.
|
|
47
49
|
|
|
@@ -70,13 +72,13 @@ Fireemu supports Cloud Firestore, Firebase Authentication (Identity Platform), C
|
|
|
70
72
|
| Cloud Pub/Sub | Schemas, BigQuery and Cloud Storage subscription delivery, and some APIs such as `UpdateTopic` are not supported. |
|
|
71
73
|
| Firebase App Check | Local testing with debug tokens is supported. Real attestation through Play Integrity, App Attest, DeviceCheck, or reCAPTCHA, and replay protection using limited-use tokens, are not supported. |
|
|
72
74
|
|
|
73
|
-
This table highlights key limitations; it is not exhaustive. Check individual API support and conditions with the following command or the [capability manifest](https://github.com/t-k/fireemu/blob/v0.
|
|
75
|
+
This table highlights key limitations; it is not exhaustive. Check individual API support and conditions with the following command or the [capability manifest](https://github.com/t-k/fireemu/blob/v0.22.0/crates/fireemu/src/capabilities.json).
|
|
74
76
|
|
|
75
77
|
```sh
|
|
76
78
|
npx fireemu capabilities
|
|
77
79
|
```
|
|
78
80
|
|
|
79
|
-
See the [Functions support inventory](https://github.com/t-k/fireemu/blob/v0.
|
|
81
|
+
See the [Functions support inventory](https://github.com/t-k/fireemu/blob/v0.22.0/docs/functions-export-inventory.md) for support by trigger type.
|
|
80
82
|
|
|
81
83
|
### Unsupported products
|
|
82
84
|
|
|
@@ -137,7 +139,7 @@ Use `--ui-port 0` to disable the UI. When automatic UI startup cannot bind the d
|
|
|
137
139
|
|
|
138
140
|
When a Functions codebase is loaded, the Functions page shows registered functions, triggers, invocation results, and logs. You can run scheduled functions immediately or advance the virtual clock to their next scheduled execution.
|
|
139
141
|
|
|
140
|
-
For clock-sensitive and parallel integration tests, [test clocks and independent worlds](https://github.com/t-k/fireemu/blob/v0.
|
|
142
|
+
For clock-sensitive and parallel integration tests, [test clocks and independent worlds](https://github.com/t-k/fireemu/blob/v0.22.0/docs/test-worlds.md) describes explicit Node Date/timer/Cloud Tasks policies and the `fireemu/testing` helper. Separate worlds isolate their clocks, Rules, Functions and service state, including when they use the same project ID.
|
|
141
143
|
|
|
142
144
|
### Export data
|
|
143
145
|
|
|
@@ -179,9 +181,9 @@ The command reports information about the Fireemu binary, UI, Functions runner,
|
|
|
179
181
|
|
|
180
182
|
### Initial setup and reusing `firebase.json`
|
|
181
183
|
|
|
182
|
-
`fireemu init --reference` also writes `fireemu.reference.
|
|
184
|
+
`fireemu init --reference` also writes `fireemu.reference.toml`, a commented reference generated from the schema. With an existing `fireemu.json`, it writes `fireemu.reference.jsonc` instead, so reference keys match the configuration format. Fireemu never loads this file. The normal `fireemu.toml` stays minimal: copying a reference key into it makes that key explicit, which stops `productionExact` from switching it. Keys without defaults, keys whose presence selects behavior, keys governed by `productionExact`, and keys accepted for forward compatibility that currently have no effect (marked as such in their comment) stay commented out. Combine `--reference` with `--profile` or `--firebase-json` when initializing; with an existing `fireemu.toml` or `fireemu.json` and neither of those options, only the reference is written. Existing output files require `--force` to replace.
|
|
183
185
|
|
|
184
|
-
`fireemu init` creates `fireemu.
|
|
186
|
+
`fireemu init` creates `fireemu.toml` in the current directory. The interactive setup lets you choose a compatibility profile and whether to reuse an existing `firebase.json`.
|
|
185
187
|
|
|
186
188
|
When reusing `firebase.json`, Fireemu references the file rather than copying its settings. Rules, indexes, Functions codebases, and emulator ports are read from it each time Fireemu starts.
|
|
187
189
|
|
|
@@ -191,14 +193,14 @@ Use the non-interactive form for CI or scripted setup.
|
|
|
191
193
|
npx fireemu init --yes
|
|
192
194
|
```
|
|
193
195
|
|
|
194
|
-
An existing `fireemu.
|
|
196
|
+
An existing `fireemu.toml` is not overwritten unless `--force` is supplied. An existing `fireemu.json` is preserved, including with `--force`; remove it before creating `fireemu.toml`.
|
|
195
197
|
|
|
196
198
|
### Which configuration files are loaded
|
|
197
199
|
|
|
198
200
|
`up`, `exec`, `emulators:start` and `emulators:exec` choose their configuration files as follows.
|
|
199
201
|
|
|
200
|
-
1. `--config <file>` and `--firebase-json <file>` load exactly the files they name, and nothing is searched for.
|
|
201
|
-
2. Otherwise, `fireemu.json` in the current directory is loaded as if it were passed with `--config`. Its `firebaseJson` entry, resolved relative to
|
|
202
|
+
1. `--config <file>` and `--firebase-json <file>` load exactly the files they name, and nothing is searched for. `--config` parses a `.toml` path as TOML (case-insensitive, including `.TOML`) and every other extension as JSON. A TOML configuration must set `schemaVersion = 1`; it is never read as a `firebase.json`, which is JSON only. `--firebase-json` always reads JSON.
|
|
203
|
+
2. Otherwise, the single `fireemu.toml` or `fireemu.json` in the current directory is loaded as if it were passed with `--config`. If both files exist, startup is refused: remove one or select a file with `--config`. Its `firebaseJson` entry, resolved relative to the loaded file, names the `firebase.json` to load. A `firebase.json` beside a `fireemu.toml` without a `firebaseJson` entry is not loaded, and the startup output says so. Neither `fireemu.toml` nor `fireemu.json` in a parent directory is used, because the paths it contains are relative to the current directory.
|
|
202
204
|
3. Otherwise, the nearest `firebase.json` is loaded as if it were passed with `--firebase-json`: the one in the current directory, else the first one found in a parent directory, as the Firebase CLI finds it. Its paths and the `.firebaserc` beside it are read from its directory.
|
|
203
205
|
4. Otherwise, the built-in defaults apply, and no Security Rules are loaded.
|
|
204
206
|
|
|
@@ -206,7 +208,7 @@ An existing `fireemu.json` is not overwritten unless `--force` is supplied.
|
|
|
206
208
|
|
|
207
209
|
A discovered file can name Functions code to run and the rules to enforce, so on Unix the search checks who owns what it finds, as git checks repository ownership. The Firebase CLI does not check this. The trusted owners are you (the effective user), root, and, when you run as root through `sudo`, the user in `SUDO_UID`.
|
|
208
210
|
|
|
209
|
-
- A `fireemu.json` or `firebase.json` whose owner is not trusted, or that any user can write, is skipped. Group write is allowed, so files created under a user-private-group umask (002, the Debian and Ubuntu default) are loaded.
|
|
211
|
+
- A `fireemu.toml`, `fireemu.json` or `firebase.json` whose owner is not trusted, or that any user can write, is skipped. Group write is allowed, so files created under a user-private-group umask (002, the Debian and Ubuntu default) are loaded.
|
|
210
212
|
- A `.firebaserc` names only project and target aliases, never code or rules, so its owner is not checked. It is skipped only when it, or its directory, can be written by any user.
|
|
211
213
|
- The search stops before a parent directory whose owner is not trusted or that any user can write, such as `/tmp`. It also stops, without a warning, at a parent it cannot inspect, such as one you may not enter.
|
|
212
214
|
- The owner of the current directory is not checked, because you chose to run there. A current directory that any user can write is not searched at all.
|
|
@@ -217,18 +219,18 @@ A skipped file or directory is named in a warning, and the run continues as if n
|
|
|
217
219
|
|
|
218
220
|
Two common setups run into this rule:
|
|
219
221
|
|
|
220
|
-
- A root container with a bind-mounted checkout. Examples are GitHub Actions `container:` jobs and `docker run -v "$PWD":/app` as root. The `fireemu.
|
|
222
|
+
- A root container with a bind-mounted checkout. Examples are GitHub Actions `container:` jobs and `docker run -v "$PWD":/app` as root. The `fireemu.toml` and `firebase.json` there are owned by a host user that the container's root does not trust, so they are skipped. Use the explicit flags, or `chown` the checkout. The `.firebaserc` still names the project. Rootless Podman maps your user to the container's root, so it is not affected.
|
|
221
223
|
- `sudo`. Files owned by the user that `sudo` names in `SUDO_UID` are trusted.
|
|
222
224
|
|
|
223
225
|
On Windows, ownership is not checked.
|
|
224
226
|
|
|
225
|
-
If you relied on the old behavior, where a `firebase.json` next to your tests was ignored, pass `--no-config-discovery`. Discovery means that the project ID comes from the `.firebaserc` beside the discovered `firebase.json`, that its emulator ports, Hub, UI and single-project settings apply, and that a `functions` entry starts the Functions runtime. `fireemu capabilities` also reports the profile of a discovered `fireemu.
|
|
227
|
+
If you relied on the old behavior, where a `firebase.json` next to your tests was ignored, pass `--no-config-discovery`. Discovery means that the project ID comes from the `.firebaserc` beside the discovered `firebase.json`, that its emulator ports, Hub, UI and single-project settings apply, and that a `functions` entry starts the Functions runtime. `fireemu capabilities` also reports the profile of a discovered `fireemu.toml`.
|
|
226
228
|
|
|
227
229
|
### Security Rules that are not loaded
|
|
228
230
|
|
|
229
231
|
Under the `strict` profile, a project without Security Rules behaves as a production project without a rules release: every client request to Firestore is refused with `PERMISSION_DENIED`, and every end-user request to Storage is refused with production's 400 "bucket has not been set up" answer. The Admin SDK and other owner credentials are not affected. The `emulator` profile allows every Firestore request, and every Storage request for a `demo-*` project, as the official emulator does.
|
|
230
232
|
|
|
231
|
-
The answers keep production's wording, which does not mention Fireemu. The startup output therefore has a `firestore rules:` and a `storage rules:` line that say when no rules are loaded and how to load them, and the first refused request for each database and bucket (up to 32 of each) prints a warning to standard error. Name the rules files in `firebase.json` (`firestore.rules`, `storage.rules`) or in `fireemu.
|
|
233
|
+
The answers keep production's wording, which does not mention Fireemu. The startup output therefore has a `firestore rules:` and a `storage rules:` line that say when no rules are loaded and how to load them, and the first refused request for each database and bucket (up to 32 of each) prints a warning to standard error. Name the rules files in `firebase.json` (`firestore.rules`, `storage.rules`) or in `fireemu.toml` (`rules.source`, `storage.rules`).
|
|
232
234
|
|
|
233
235
|
### Why a request was denied
|
|
234
236
|
|
|
@@ -238,7 +240,7 @@ A Security Rules denial is answered with production's wording (Firestore's `PERM
|
|
|
238
240
|
note: firestore: Security Rules denied get on "notes/n1" in "database (default)" (request.auth.uid "bob"): no allow statement evaluated to true; line 5:22 `request.auth.uid == resource.data.owner` was false
|
|
239
241
|
```
|
|
240
242
|
|
|
241
|
-
- Set `rules.denialLog` to `"off"` in `fireemu.
|
|
243
|
+
- Set `rules.denialLog` to `"off"` in `fireemu.toml` to silence these lines (for example in a suite that asserts many denials). The answer to the client is the same either way.
|
|
242
244
|
- When the UI is running, its Rules page lists the decided requests from the start of the run, with what every expression evaluated to. The same trace is served by `GET /v1/sessions/default/rules/requests` on the control API.
|
|
243
245
|
|
|
244
246
|
### Compatibility profiles
|
|
@@ -254,21 +256,23 @@ Use `strict` for your tests, also when you are moving a project over from the Fi
|
|
|
254
256
|
|
|
255
257
|
Fireemu is mostly run by tests, in CI and on a developer's machine. Where production needs setup that a test should not have to do (signed tokens, signing keys, enabling a feature through an Admin API call), the default in both profiles is the development behavior, and each such behavior has its own configuration key. To get production's behavior for all of them at once, set `productionExact` to `true` (strict profile only); an explicit key still decides over it:
|
|
256
258
|
|
|
257
|
-
```
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
259
|
+
```toml
|
|
260
|
+
schemaVersion = 1
|
|
261
|
+
profile = "strict"
|
|
262
|
+
productionExact = true
|
|
263
|
+
|
|
264
|
+
[auth]
|
|
265
|
+
allowUnsignedCustomTokens = true
|
|
264
266
|
```
|
|
265
267
|
|
|
268
|
+
JSON also works: existing `fireemu.json` files and `--config <path>.json` remain supported.
|
|
269
|
+
|
|
266
270
|
| Development default | Key | With `productionExact` |
|
|
267
271
|
|---|---|---|
|
|
268
272
|
| Unsigned emulator custom tokens are accepted | `auth.allowUnsignedCustomTokens` | refused |
|
|
269
273
|
| Firestore and Storage Security Rules accept `@firebase/rules-unit-testing`'s unsigned mock ID token (`authenticatedContext()`, the client SDK's `mockUserToken`) | `auth.allowUnsignedIdTokens` | mock-token fallback disabled; normally verified fireemu-issued tokens still accepted |
|
|
270
274
|
| Identity-provider sign-in accepts the fixture assertions and the sign-in widget (`/emulator/auth/handler`), for built-in, `oidc.*` and `saml.*` providers; under `strict` an `oidc.*` or `saml.*` provider must still be configured and enabled (`auth.providers` or the Admin API), as production requires | `auth.idpAssertions` (`"fixture"`) | `"signed"`: OIDC ID tokens must verify with an `auth.idpSigners` key, SAML responses with the provider's certificates, and the fixture and built-in providers are refused |
|
|
271
|
-
| The strict Eventarc listener admits any credential or none, so the Admin SDK publishes with a fake credential (see [Eventarc authentication](https://github.com/t-k/fireemu/blob/v0.
|
|
275
|
+
| The strict Eventarc listener admits any credential or none, so the Admin SDK publishes with a fake credential (see [Eventarc authentication](https://github.com/t-k/fireemu/blob/v0.22.0/docs/eventarc-authentication.md)) | `eventarc.authentication` (`"permissive"`) | `"production"`: a missing, malformed or JWT-shaped bearer is refused with production's 401 |
|
|
272
276
|
| A tenant of `auth.tenants` can have any readable id, such as `tenant-a` | `auth.tenantIdFormat` (`"readable"`) | the id must have production's generated form, the display name, a hyphen and five characters of `a-z0-9` (`"generated"`) |
|
|
273
277
|
| Multi-tenancy is on: the Admin API creates tenants and `auth.tenants` loads without an `updateConfig` call | `auth.multiTenant.allowTenants` (`true`) | unset until it is enabled, as in a new production project: tenant routes are refused and `auth.tenants` needs `allowTenants: true` |
|
|
274
278
|
| Multi-factor authentication is on, SMS and TOTP, without a console toggle, an `updateConfig` call or an `auth.mfa` block | `auth.mfa` (`state: "ENABLED"`, `PHONE_SMS` and TOTP) | off until enabled, as in a new production project: enrollment is refused with `OPERATION_NOT_ALLOWED : SMS based MFA not enabled.` or `TOTP based MFA not enabled.` |
|
|
@@ -282,47 +286,45 @@ Under the `emulator` profile, a request that names a tenant the project does not
|
|
|
282
286
|
|
|
283
287
|
### Migrating from the Firebase Local Emulator Suite
|
|
284
288
|
|
|
285
|
-
Keep `
|
|
289
|
+
Keep `profile = "strict"` (the default of `fireemu init`), and point fireemu at your existing `firebase.json` with `npx fireemu init --firebase-json firebase.json` or `--firebase-json` on the command line. Replace `firebase emulators:exec` with `fireemu exec` and `firebase emulators:start` with `fireemu up`; the official command names `emulators:exec` and `emulators:start` also work.
|
|
286
290
|
|
|
287
291
|
When a test fails under `strict` but passed on the official emulator, it is usually behavior the application would also meet in production. Fix the test or the application, or relax only the specific setting below instead of switching the whole profile.
|
|
288
292
|
|
|
289
|
-
- **Unsigned emulator ID tokens** (`@firebase/rules-unit-testing` `authenticatedContext()`, the client SDK's `mockUserToken`) work under `strict` by default. Set `auth.allowUnsignedIdTokens` to `false` to disable their fallback on the Security Rules surfaces. For a refusal test, use the SDK helper's default `iat: 0` / `exp: 3600` with a clock after expiry; fireemu-issued tokens that pass normal verification are still accepted. Use `auth.idTokenSigning
|
|
293
|
+
- **Unsigned emulator ID tokens** (`@firebase/rules-unit-testing` `authenticatedContext()`, the client SDK's `mockUserToken`) work under `strict` by default. Set `auth.allowUnsignedIdTokens` to `false` to disable their fallback on the Security Rules surfaces. For a refusal test, use the SDK helper's default `iat: 0` / `exp: 3600` with a clock after expiry; fireemu-issued tokens that pass normal verification are still accepted. Use `auth.idTokenSigning = "session-rsa"` to refuse all unsigned ID tokens.
|
|
290
294
|
- **Composite indexes** are validated as production does: a query whose index is not defined (or is still building, or was deleted) is refused with `FAILED_PRECONDITION` and the console link to the index. Declare the index a query needs in `firestore.indexes.json`, referenced from `firebase.json`. To run such a query anyway and have each missing index reported once per database on stderr (with production's refusal text and the `firestore.indexes.json` entry), set `firestore.missingIndexes` to `"report"`; `productionExact` does not change this key.
|
|
291
295
|
- **Settings that mirror your production project.** Set them to match it instead of switching the profile:
|
|
292
296
|
|
|
293
297
|
| Setting | What it does under `strict` |
|
|
294
298
|
|---|---|
|
|
295
299
|
| `auth.improvedEmailPrivacy` | Email enumeration protection, on for a new production project. Set `false` only if your production project turned it off; sign-ins then answer `EMAIL_NOT_FOUND` and `INVALID_PASSWORD` as the official Auth emulator does |
|
|
296
|
-
| `auth.mfa` | Your project's multi-factor configuration (an object, see [Enable multi-factor authentication at start](#enable-multi-factor-authentication-at-start)). `strict` starts with SMS and TOTP enabled as a development default, `productionExact` starts with multi-factor off as a new production project does, and the official emulator has no TOTP at all. A declared block always decides, so `
|
|
300
|
+
| `auth.mfa` | Your project's multi-factor configuration (an object, see [Enable multi-factor authentication at start](#enable-multi-factor-authentication-at-start)). `strict` starts with SMS and TOTP enabled as a development default, `productionExact` starts with multi-factor off as a new production project does, and the official emulator has no TOTP at all. A declared block always decides, so `auth.mfa.state = "DISABLED"` makes enrollment fail as it does in a project that never enabled it |
|
|
297
301
|
| `firestore.enforceLimits` | Production always enforces the Standard edition query limits. `false` lets queries pass that production refuses, so leave it on unless you have a specific reason. Under `strict` it switches only the query limits |
|
|
298
302
|
|
|
299
303
|
### Basic configuration
|
|
300
304
|
|
|
301
305
|
The initial configuration selects Standard edition Firestore with the Native API.
|
|
302
306
|
|
|
303
|
-
```
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
}
|
|
312
|
-
}
|
|
307
|
+
```toml
|
|
308
|
+
#:schema https://fireemu.dev/spec/config/fireemu.schema.json
|
|
309
|
+
schemaVersion = 1
|
|
310
|
+
profile = "strict"
|
|
311
|
+
|
|
312
|
+
[firestore]
|
|
313
|
+
edition = "standard"
|
|
314
|
+
apiMode = "native"
|
|
313
315
|
```
|
|
314
316
|
|
|
315
317
|
You can also name the configuration file with `--config`.
|
|
316
318
|
|
|
317
319
|
```sh
|
|
318
|
-
npx fireemu up --config ./fireemu.
|
|
320
|
+
npx fireemu up --config ./fireemu.toml
|
|
319
321
|
```
|
|
320
322
|
|
|
321
|
-
Keep Fireemu-specific settings in a Fireemu configuration file containing `
|
|
323
|
+
Keep Fireemu-specific settings in a Fireemu configuration file containing `schemaVersion = 1`, rather than in `firebase.json`. See the [configuration schema](https://github.com/t-k/fireemu/blob/v0.22.0/spec/config/fireemu.schema.json) for all available settings.
|
|
322
324
|
|
|
323
325
|
### Firebase Authentication (Identity Platform) configuration
|
|
324
326
|
|
|
325
|
-
The `auth` section of `fireemu.
|
|
327
|
+
The `auth` section of `fireemu.toml` lets you configure sign-in methods, password policies, account permissions, and other authentication settings. Match your application’s configuration to test registration, sign-in, and account management behavior.
|
|
326
328
|
|
|
327
329
|
| What you can configure | Main settings |
|
|
328
330
|
|---|---|
|
|
@@ -347,70 +349,66 @@ The `auth` section of `fireemu.json` lets you configure sign-in methods, passwor
|
|
|
347
349
|
|
|
348
350
|
Unsigned custom tokens minted by the Firebase Admin SDK in emulator mode are accepted by default, including with the recommended `strict` profile and with `auth.customTokenSigners` configured. To require signed custom tokens, set `auth.allowUnsignedCustomTokens` to `false` and configure `auth.customTokenSigners` with the service accounts' public JWK sets. The setting applies only to custom-token sign-in; strict claim checks and signed-token verification still apply. In the `emulator` profile, setting it to `false` also disables JSON fake custom tokens.
|
|
349
351
|
|
|
350
|
-
The unsigned mock ID token of `@firebase/rules-unit-testing` is accepted by default when Firestore and Storage Security Rules are evaluated, including with the `strict` profile. This is the token `authenticatedContext()` and the client SDKs' `mockUserToken` option send (`createMockUserToken` in `@firebase/util`). Normal verification runs first. Only after it fails can the mock-token fallback accept a token. Under `strict` that fallback accepts only the exact SDK shape: a JWT whose header is exactly `{"alg":"none","type":"JWT"}` and whose signature is empty. `request.auth` is built from the token's claims, as the official emulator builds it, when the token names a subject (`sub`) and its audience (`aud`) is the project the request goes to. Its `exp` is not checked, because the SDK sets `iat: 0` and `exp: 3600` by default. Every other token is verified as before, expiry included. That covers the unsigned ID tokens fireemu itself issues (their header carries `typ`, not `type`), and a token that claims a signature that does not verify is still refused. The `emulator` profile accepts any unsigned token, as the official emulator does, and its Storage also accepts another project's token. Set `auth.allowUnsignedIdTokens` to `false` (in either profile) or set `productionExact` to disable this fallback. Neither setting refuses fireemu-issued unsigned ID tokens that pass normal verification. Changing only an issued token's header to the SDK shape can still pass normal verification of its payload; it is not a refusal test. For a refusal test, use `createMockUserToken` with its default `iat: 0` / `exp: 3600`, or construct that exact header and empty signature with those times, a subject and the routed project as audience, and run with a clock after expiry (including Firestore's 30-second allowance). A session with `auth.idTokenSigning
|
|
352
|
+
The unsigned mock ID token of `@firebase/rules-unit-testing` is accepted by default when Firestore and Storage Security Rules are evaluated, including with the `strict` profile. This is the token `authenticatedContext()` and the client SDKs' `mockUserToken` option send (`createMockUserToken` in `@firebase/util`). Normal verification runs first. Only after it fails can the mock-token fallback accept a token. Under `strict` that fallback accepts only the exact SDK shape: a JWT whose header is exactly `{"alg":"none","type":"JWT"}` and whose signature is empty. `request.auth` is built from the token's claims, as the official emulator builds it, when the token names a subject (`sub`) and its audience (`aud`) is the project the request goes to. Its `exp` is not checked, because the SDK sets `iat: 0` and `exp: 3600` by default. Every other token is verified as before, expiry included. That covers the unsigned ID tokens fireemu itself issues (their header carries `typ`, not `type`), and a token that claims a signature that does not verify is still refused. The `emulator` profile accepts any unsigned token, as the official emulator does, and its Storage also accepts another project's token. Set `auth.allowUnsignedIdTokens` to `false` (in either profile) or set `productionExact` to disable this fallback. Neither setting refuses fireemu-issued unsigned ID tokens that pass normal verification. Changing only an issued token's header to the SDK shape can still pass normal verification of its payload; it is not a refusal test. For a refusal test, use `createMockUserToken` with its default `iat: 0` / `exp: 3600`, or construct that exact header and empty signature with those times, a subject and the routed project as audience, and run with a clock after expiry (including Firestore's 30-second allowance). A session with `auth.idTokenSigning = "session-rsa"` accepts no unsigned token. The setting does not affect callable Functions, Identity Toolkit or App Check.
|
|
351
353
|
|
|
352
|
-
See the [configuration schema](https://github.com/t-k/fireemu/blob/v0.
|
|
354
|
+
See the [configuration schema](https://github.com/t-k/fireemu/blob/v0.22.0/spec/config/fireemu.schema.json) for the format and accepted values of each setting.
|
|
353
355
|
|
|
354
|
-
Declare `auth.authorizedDomains`, for example `["localhost", "app.test"]`, to set the initial project-wide list in either profile. The list replaces the defaults, so include `localhost` if your tests use it. An empty list authorizes no host under `strict`; an absent or `null` setting keeps the existing defaults (`localhost` and the project's `firebaseapp.com` and `web.app` domains). Validation uses the Admin API's rules for the selected profile, including its conversion of numeric and boolean entries to strings and omission of `null` entries; use strings when writing the list. Fireemu intentionally keeps `localhost` in its defaults for development. The [recorded production sandbox baseline](https://github.com/t-k/fireemu/blob/v0.
|
|
356
|
+
Declare `auth.authorizedDomains`, for example `["localhost", "app.test"]`, to set the initial project-wide list in either profile. The list replaces the defaults, so include `localhost` if your tests use it. An empty list authorizes no host under `strict`; an absent or `null` setting keeps the existing defaults (`localhost` and the project's `firebaseapp.com` and `web.app` domains). Validation uses the Admin API's rules for the selected profile, including its conversion of numeric and boolean entries to strings and omission of `null` entries; use strings when writing the list. Fireemu intentionally keeps `localhost` in its defaults for development. The [recorded production sandbox baseline](https://github.com/t-k/fireemu/blob/v0.22.0/conformance/auth-action-production.json) does not include it; new production projects may also omit it. This default is a Fireemu-only convenience, and declaring the list replaces it. Tenant-scoped strict action links currently check the tenant's default domains rather than this project declaration; support for the parent project's live list is pending.
|
|
355
357
|
|
|
356
358
|
An Admin update changes the live list. A session reset restores the declared list, when present, and preserves an Admin-written list when no initial list was declared. Projects created later receive the declaration word for word, independently of the default project's live list; listing a particular project's `firebaseapp.com` or `web.app` domain therefore gives later projects that same domain. Clearing accounts leaves the live list alone. Auth export/import carries accounts without the domain list or its declaration. The `emulator` profile accepts the setting and exposes the list, while continuing to allow action-link continue URLs outside it.
|
|
357
359
|
|
|
358
|
-
Declare project OIDC and SAML resources with `auth.providers.oidc` and `auth.providers.saml`, using the Admin v2 resource fields and an ID-only `name` such as `oidc.fixture` or `saml.fixture`. Full resource names are refused. For example, `
|
|
360
|
+
Declare project OIDC and SAML resources with `auth.providers.oidc` and `auth.providers.saml`, using the Admin v2 resource fields and an ID-only `name` such as `oidc.fixture` or `saml.fixture`. Full resource names are refused. For example, `auth.providers.oidc = [{ name = "oidc.fixture", enabled = true, clientId = "local-client", issuer = "https://issuer.test", responseType = { idToken = true } }]` initializes that provider in both profiles. By default both profiles accept the fixture assertions the official emulator accepts (a JSON or unsigned ID token, a JSON SAML response, the sign-in widget); the emulator profile accepts them whether or not the provider is declared, and the strict profile refuses an `oidc.*` or `saml.*` provider that is not declared (or is disabled), as production does. With `auth.idpAssertions` set to `"signed"` (or `productionExact`, or `auth.idpSigners` present), strict OIDC sign-in needs matching public issuer keys in `auth.idpSigners`; no key is fetched. Strict SAML then uses the declared provider certificates and retains its existing assertion checks.
|
|
359
361
|
|
|
360
|
-
Each declared array replaces that provider kind; `[]` explicitly starts it empty, while an absent or `null` kind declares no initial resources. Admin operations change live resources until a session reset restores the declared kinds. Later session and routed projects inherit the declaration independently of the default project's live changes. Tenant resources and built-in providers remain separate. Clearing accounts preserves live resources; snapshots and Auth export/import transfer no provider resources or declarations. The emulator profile continues to accept its unsigned fixture credentials without requiring configured or enabled provider resources. These declarations require a canonical document with `
|
|
362
|
+
Each declared array replaces that provider kind; `[]` explicitly starts it empty, while an absent or `null` kind declares no initial resources. Admin operations change live resources until a session reset restores the declared kinds. Later session and routed projects inherit the declaration independently of the default project's live changes. Tenant resources and built-in providers remain separate. Clearing accounts preserves live resources; snapshots and Auth export/import transfer no provider resources or declarations. The emulator profile continues to accept its unsigned fixture credentials without requiring configured or enabled provider resources. These declarations require a canonical document with `schemaVersion = 1`; a Firebase deployment `auth.providers` section without that version remains deployment data and installs no provider seeds.
|
|
361
363
|
|
|
362
364
|
#### Example configuration
|
|
363
365
|
|
|
364
366
|
This example enables email/password and phone sign-in while disabling anonymous sign-in. It requires passwords of at least 12 characters containing uppercase letters, lowercase letters, and numbers, and prevents users from deleting their own accounts. Phone sign-in uses a configured test phone number and verification code.
|
|
365
367
|
|
|
366
|
-
```
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
},
|
|
408
|
-
"improvedEmailPrivacy": true
|
|
409
|
-
}
|
|
410
|
-
}
|
|
368
|
+
```toml
|
|
369
|
+
#:schema https://fireemu.dev/spec/config/fireemu.schema.json
|
|
370
|
+
schemaVersion = 1
|
|
371
|
+
profile = "strict"
|
|
372
|
+
|
|
373
|
+
[firestore]
|
|
374
|
+
edition = "standard"
|
|
375
|
+
apiMode = "native"
|
|
376
|
+
|
|
377
|
+
[auth]
|
|
378
|
+
improvedEmailPrivacy = true
|
|
379
|
+
|
|
380
|
+
[auth.signIn]
|
|
381
|
+
allowDuplicateEmails = false
|
|
382
|
+
|
|
383
|
+
[auth.signIn.email]
|
|
384
|
+
enabled = true
|
|
385
|
+
passwordRequired = true
|
|
386
|
+
|
|
387
|
+
[auth.signIn.anonymous]
|
|
388
|
+
enabled = false
|
|
389
|
+
|
|
390
|
+
[auth.signIn.phoneNumber]
|
|
391
|
+
enabled = true
|
|
392
|
+
|
|
393
|
+
[auth.signIn.phoneNumber.testPhoneNumbers]
|
|
394
|
+
"+16505550101" = "123456"
|
|
395
|
+
|
|
396
|
+
[auth.passwordPolicy]
|
|
397
|
+
enforcementState = "ENFORCE"
|
|
398
|
+
forceUpgradeOnSignin = true
|
|
399
|
+
|
|
400
|
+
[auth.passwordPolicy.constraints]
|
|
401
|
+
minLength = 12
|
|
402
|
+
requireUppercase = true
|
|
403
|
+
requireLowercase = true
|
|
404
|
+
requireNumeric = true
|
|
405
|
+
|
|
406
|
+
[auth.client.permissions]
|
|
407
|
+
disabledUserSignup = false
|
|
408
|
+
disabledUserDeletion = true
|
|
411
409
|
```
|
|
412
410
|
|
|
413
|
-
For an existing `fireemu.
|
|
411
|
+
For an existing `fireemu.toml`, add the settings you need to its `auth` section. Adjust the values to match your application’s requirements.
|
|
414
412
|
|
|
415
413
|
#### Project- and tenant-specific settings
|
|
416
414
|
|
|
@@ -420,21 +418,20 @@ These settings are separate from creating the project or tenant. Naming a tenant
|
|
|
420
418
|
|
|
421
419
|
#### Enable multi-factor authentication at start
|
|
422
420
|
|
|
423
|
-
Under the `strict` profile, TOTP is enabled only through the project's MFA configuration, as in production, so `auth.totp` alone enables nothing there. By default that configuration is on (SMS and TOTP enabled), so a test needs nothing to enrol a second factor; `productionExact` starts a project with multi-factor off, as production does until it is enabled. Use `auth.mfa` to declare the configuration in the file instead of calling the Admin API in every session, to turn multi-factor off (`
|
|
421
|
+
Under the `strict` profile, TOTP is enabled only through the project's MFA configuration, as in production, so `auth.totp` alone enables nothing there. By default that configuration is on (SMS and TOTP enabled), so a test needs nothing to enrol a second factor; `productionExact` starts a project with multi-factor off, as production does until it is enabled. Use `auth.mfa` to declare the configuration in the file instead of calling the Admin API in every session, to turn multi-factor off (`auth.mfa.state = "DISABLED"`), or to enable only what your production project does. It has the shape Identity Platform uses (`state`, `enabledProviders`, and `providerConfigs` with `totpProviderConfig.adjacentIntervals`):
|
|
424
422
|
|
|
425
|
-
```
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
}
|
|
423
|
+
```toml
|
|
424
|
+
schemaVersion = 1
|
|
425
|
+
profile = "strict"
|
|
426
|
+
|
|
427
|
+
[auth.mfa]
|
|
428
|
+
state = "ENABLED"
|
|
429
|
+
|
|
430
|
+
[[auth.mfa.providerConfigs]]
|
|
431
|
+
state = "ENABLED"
|
|
432
|
+
|
|
433
|
+
[auth.mfa.providerConfigs.totpProviderConfig]
|
|
434
|
+
adjacentIntervals = 1
|
|
438
435
|
```
|
|
439
436
|
|
|
440
437
|
- The configuration applies when the daemon starts, in both profiles, and to every project created afterward (not the default project's current value). It is validated as the Admin API validates an update of `mfa`, and a value production would refuse stops the daemon at startup.
|
|
@@ -445,28 +442,27 @@ Under the `strict` profile, TOTP is enabled only through the project's MFA confi
|
|
|
445
442
|
|
|
446
443
|
#### Enable multi-tenancy
|
|
447
444
|
|
|
448
|
-
Multi-tenancy works by default under both profiles: a new project allows tenants, so the Admin API creates them and `auth.tenants` loads without `multiTenant.allowTenants`. `productionExact` (`strict` only) starts a project as production does, with the switch unset until it is enabled through the Admin API, or with `auth.multiTenant` in the file (see "Start with tenants" below). A declared `allowTenants: false` always turns it off. See the [compatibility documentation](https://github.com/t-k/fireemu/blob/v0.
|
|
445
|
+
Multi-tenancy works by default under both profiles: a new project allows tenants, so the Admin API creates them and `auth.tenants` loads without `multiTenant.allowTenants`. `productionExact` (`strict` only) starts a project as production does, with the switch unset until it is enabled through the Admin API, or with `auth.multiTenant` in the file (see "Start with tenants" below). A declared `allowTenants: false` always turns it off. See the [compatibility documentation](https://github.com/t-k/fireemu/blob/v0.22.0/docs/compatibility-contract.md) for the supported Admin API scope.
|
|
449
446
|
|
|
450
447
|
#### Start with tenants
|
|
451
448
|
|
|
452
449
|
Instead of creating tenants through the Admin API in every session, declare the default project's tenants and the multi-tenancy switch in the file. Each entry of `auth.tenants` is an Admin v2 `Tenant` document plus its `tenantId`. By default the id can be any readable name that starts with a letter and holds letters, digits and hyphens (up to 63 characters), such as `tenant-a`. With `productionExact` or `auth.tenantIdFormat: "generated"` it must have the form production generates, the display name, a hyphen, and five characters of `a-z0-9`, such as `acme-x7k2q`:
|
|
453
450
|
|
|
454
|
-
```
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
}
|
|
451
|
+
```toml
|
|
452
|
+
schemaVersion = 1
|
|
453
|
+
profile = "strict"
|
|
454
|
+
|
|
455
|
+
[auth.multiTenant]
|
|
456
|
+
allowTenants = true
|
|
457
|
+
|
|
458
|
+
[[auth.tenants]]
|
|
459
|
+
tenantId = "tenant-a"
|
|
460
|
+
displayName = "acme"
|
|
461
|
+
allowPasswordSignup = true
|
|
462
|
+
|
|
463
|
+
[auth.tenants.mfaConfig]
|
|
464
|
+
state = "ENABLED"
|
|
465
|
+
enabledProviders = ["PHONE_SMS"]
|
|
470
466
|
```
|
|
471
467
|
|
|
472
468
|
- A document is read by the code the Admin tenant create route reads one with, so a value production refuses stops the daemon at startup. The tenants are created empty, in file order, and settings such as `mfaConfig` and `passwordPolicyConfig` come from the document. The file is stricter than the route in the `emulator` profile: it also refuses an unknown member and a missing or invalid `displayName`, as production does.
|
|
@@ -477,13 +473,12 @@ Instead of creating tenants through the Admin API in every session, declare the
|
|
|
477
473
|
|
|
478
474
|
#### Test quota-exceeded behavior
|
|
479
475
|
|
|
480
|
-
Use `auth.quotaSimulation` to test sign-up quota-exceeded behavior locally. For example,
|
|
476
|
+
Use `auth.quotaSimulation` to test sign-up quota-exceeded behavior locally. For example, add these settings to `fireemu.toml`:
|
|
481
477
|
|
|
482
|
-
```
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
}
|
|
478
|
+
```toml
|
|
479
|
+
[auth.quotaSimulation]
|
|
480
|
+
mode = "enforce"
|
|
481
|
+
defaultQuotaPerHour = 5
|
|
487
482
|
```
|
|
488
483
|
|
|
489
484
|
This is a local fixed-window simulation. It does not reproduce Firebase’s full quota accounting or abuse-prevention systems.
|
|
@@ -498,7 +493,7 @@ A manual run (`POST /v1/sessions/{session}/functions/{name}:run`) enqueues one r
|
|
|
498
493
|
|
|
499
494
|
On a task-queue function (`onTaskDispatched`), the same `POST /v1/sessions/{session}/functions/{name}:run` releases the Cloud Tasks that wait for their `scheduleTime`: all of them, or the one named by a `{"task": "<task id>"}` body (404 when no waiting task has that id). Under the strict profile a task enqueued with a `scheduleTime` waits for it, so this is how a test runs a task due in an hour without moving the clock; a released task still obeys the queue's rate and concurrency limits. The Functions page of the Emulator UI lists the waiting tasks with their due time and a **Run now** button.
|
|
500
495
|
|
|
501
|
-
See the [configuration schema](https://github.com/t-k/fireemu/blob/v0.
|
|
496
|
+
See the [configuration schema](https://github.com/t-k/fireemu/blob/v0.22.0/spec/config/fireemu.schema.json) for available settings and values.
|
|
502
497
|
|
|
503
498
|
### Firestore history limits
|
|
504
499
|
|
|
@@ -510,18 +505,16 @@ Like production, Fireemu keeps every version of a document written in the last h
|
|
|
510
505
|
|
|
511
506
|
Versions older than an hour are released by the next commit after the clock passes them. To use less memory, lower the limits in the `firestore.history` section:
|
|
512
507
|
|
|
513
|
-
```
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
}
|
|
524
|
-
}
|
|
508
|
+
```toml
|
|
509
|
+
schemaVersion = 1
|
|
510
|
+
|
|
511
|
+
[firestore]
|
|
512
|
+
edition = "standard"
|
|
513
|
+
apiMode = "native"
|
|
514
|
+
|
|
515
|
+
[firestore.history]
|
|
516
|
+
maxVersionsPerPath = 16
|
|
517
|
+
maxBytes = 268435456
|
|
525
518
|
```
|
|
526
519
|
|
|
527
520
|
- `maxVersionsPerPath` (1 to 1,000,000) sets the most versions of one document a database keeps, on either clock, in place of the defaults above.
|
|
@@ -543,11 +536,11 @@ To see how much history a running daemon holds, run `fireemu doctor --connect <c
|
|
|
543
536
|
|
|
544
537
|
The Storage emulator keeps every object in memory, and by default nothing bounds how much. To cap it, set `storage.maxStoredBytes` (bytes, at least 1). Production has no such limit; it is local to Fireemu:
|
|
545
538
|
|
|
546
|
-
```
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
539
|
+
```toml
|
|
540
|
+
schemaVersion = 1
|
|
541
|
+
|
|
542
|
+
[storage]
|
|
543
|
+
maxStoredBytes = 1073741824
|
|
551
544
|
```
|
|
552
545
|
|
|
553
546
|
- Each object counts its bytes once, and a copy counts again. Replacing an object counts only the difference in size.
|
|
@@ -576,7 +569,7 @@ Fireemu is compatible with the listed Local Emulator Suite products as shipped b
|
|
|
576
569
|
|
|
577
570
|
The `strict` and `emulator` profiles differ in some behaviors to serve their respective purposes. Where the official emulator and production Firebase disagree, Fireemu also adopts production behavior in some cases and records the difference.
|
|
578
571
|
|
|
579
|
-
Check support for the specific APIs and conditions your application uses, rather than relying on product names alone. The [compatibility contract](https://github.com/t-k/fireemu/blob/v0.
|
|
572
|
+
Check support for the specific APIs and conditions your application uses, rather than relying on product names alone. The [compatibility contract](https://github.com/t-k/fireemu/blob/v0.22.0/spec/compatibility/contract.json) records scope and known differences. The [compatibility documentation](https://github.com/t-k/fireemu/blob/v0.22.0/docs/compatibility-contract.md) explains the verification process and how to interpret its records.
|
|
580
573
|
|
|
581
574
|
### Network exposure of the Storage port
|
|
582
575
|
|
|
@@ -584,10 +577,14 @@ Like the official emulator, the Storage port reflects the requested object name
|
|
|
584
577
|
|
|
585
578
|
### Run in a container
|
|
586
579
|
|
|
587
|
-
By default every listener is on loopback, which a published container port cannot reach. To serve the emulators to the host or to other containers, opt in with `network.allowNonLoopbackHosts` in `fireemu.
|
|
580
|
+
By default every listener is on loopback, which a published container port cannot reach. To serve the emulators to the host or to other containers, opt in with `network.allowNonLoopbackHosts` in `fireemu.toml` and give the product emulators a host in `firebase.json`:
|
|
588
581
|
|
|
589
|
-
```
|
|
590
|
-
|
|
582
|
+
```toml
|
|
583
|
+
schemaVersion = 1
|
|
584
|
+
firebaseJson = "firebase.json"
|
|
585
|
+
|
|
586
|
+
[network]
|
|
587
|
+
allowNonLoopbackHosts = true
|
|
591
588
|
```
|
|
592
589
|
|
|
593
590
|
```json
|
|
@@ -603,7 +600,7 @@ By default every listener is on loopback, which a published container port canno
|
|
|
603
600
|
|
|
604
601
|
### Changes between versions
|
|
605
602
|
|
|
606
|
-
Configuration and behavior may change between releases. See the [CHANGELOG](https://github.com/t-k/fireemu/blob/v0.
|
|
603
|
+
Configuration and behavior may change between releases. See the [CHANGELOG](https://github.com/t-k/fireemu/blob/v0.22.0/CHANGELOG.md) for release changes.
|
|
607
604
|
|
|
608
605
|
## Performance
|
|
609
606
|
|
|
@@ -620,7 +617,7 @@ The following results come from one `standard` run at commit `f3b942c`. Ratios a
|
|
|
620
617
|
|
|
621
618
|
The 95% confidence interval for the startup-time ratio is `[21.4, 21.8]`. For the peak-memory ratio, calculated as official emulator divided by Fireemu, it is `[10.2, 11.1]`.
|
|
622
619
|
|
|
623
|
-
See [benchmark.yml](https://github.com/t-k/fireemu/blob/v0.
|
|
620
|
+
See [benchmark.yml](https://github.com/t-k/fireemu/blob/v0.22.0/.github/workflows/benchmark.yml) for the workflow and [`tools/bench/`](https://github.com/t-k/fireemu/tree/v0.22.0/tools/bench/) for the benchmark implementation.
|
|
624
621
|
|
|
625
622
|
## Reporting issues and contributing
|
|
626
623
|
|
|
@@ -628,8 +625,8 @@ When reporting an issue, include the Fireemu and Firebase SDK versions, the prof
|
|
|
628
625
|
|
|
629
626
|
For compatibility issues, also state whether you are comparing against the actual Firebase service or the official emulator, along with the expected and actual results. Remove credentials and personal information before sharing configuration files or logs.
|
|
630
627
|
|
|
631
|
-
See the [development guide](https://github.com/t-k/fireemu/blob/v0.
|
|
628
|
+
See the [development guide](https://github.com/t-k/fireemu/blob/v0.22.0/docs/development.md) for build and test instructions.
|
|
632
629
|
|
|
633
630
|
## License
|
|
634
631
|
|
|
635
|
-
Fireemu is licensed under the [Apache License 2.0](https://github.com/t-k/fireemu/blob/v0.
|
|
632
|
+
Fireemu is licensed under the [Apache License 2.0](https://github.com/t-k/fireemu/blob/v0.22.0/LICENSE). Third-party notices are listed in [THIRD_PARTY_LICENSES.txt](https://github.com/t-k/fireemu/blob/v0.22.0/THIRD_PARTY_LICENSES.txt).
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fireemu",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.22.0",
|
|
4
4
|
"description": "A local runtime for testing Firebase SDK and Functions code, checked against production Firebase behavior",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"emulator",
|
|
@@ -31,11 +31,11 @@
|
|
|
31
31
|
],
|
|
32
32
|
"type": "module",
|
|
33
33
|
"optionalDependencies": {
|
|
34
|
-
"@fireemu/darwin-arm64": "0.
|
|
35
|
-
"@fireemu/darwin-x64": "0.
|
|
36
|
-
"@fireemu/linux-x64": "0.
|
|
37
|
-
"@fireemu/linux-arm64": "0.
|
|
38
|
-
"@fireemu/win32-x64": "0.
|
|
34
|
+
"@fireemu/darwin-arm64": "0.22.0",
|
|
35
|
+
"@fireemu/darwin-x64": "0.22.0",
|
|
36
|
+
"@fireemu/linux-x64": "0.22.0",
|
|
37
|
+
"@fireemu/linux-arm64": "0.22.0",
|
|
38
|
+
"@fireemu/win32-x64": "0.22.0"
|
|
39
39
|
},
|
|
40
40
|
"engines": {
|
|
41
41
|
"node": ">=20"
|