fireemu 0.21.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.
Files changed (2) hide show
  1. package/README.md +15 -15
  2. package/package.json +6 -6
package/README.md CHANGED
@@ -16,7 +16,7 @@ Fireemu is being developed to close these gaps. For example, it provides:
16
16
 
17
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.
18
18
 
19
- See the [capability manifest](https://github.com/t-k/fireemu/blob/v0.21.0/crates/fireemu/src/capabilities.json) and [compatibility documentation](https://github.com/t-k/fireemu/blob/v0.21.0/docs/compatibility-contract.md) for supported features, known differences, and the status of compatibility verification.
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.
20
20
 
21
21
  ## Quick start
22
22
 
@@ -72,13 +72,13 @@ Fireemu supports Cloud Firestore, Firebase Authentication (Identity Platform), C
72
72
  | Cloud Pub/Sub | Schemas, BigQuery and Cloud Storage subscription delivery, and some APIs such as `UpdateTopic` are not supported. |
73
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. |
74
74
 
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.21.0/crates/fireemu/src/capabilities.json).
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).
76
76
 
77
77
  ```sh
78
78
  npx fireemu capabilities
79
79
  ```
80
80
 
81
- See the [Functions support inventory](https://github.com/t-k/fireemu/blob/v0.21.0/docs/functions-export-inventory.md) for support by trigger type.
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.
82
82
 
83
83
  ### Unsupported products
84
84
 
@@ -139,7 +139,7 @@ Use `--ui-port 0` to disable the UI. When automatic UI startup cannot bind the d
139
139
 
140
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.
141
141
 
142
- For clock-sensitive and parallel integration tests, [test clocks and independent worlds](https://github.com/t-k/fireemu/blob/v0.21.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.
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.
143
143
 
144
144
  ### Export data
145
145
 
@@ -272,7 +272,7 @@ JSON also works: existing `fireemu.json` files and `--config <path>.json` remain
272
272
  | Unsigned emulator custom tokens are accepted | `auth.allowUnsignedCustomTokens` | refused |
273
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 |
274
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 |
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.21.0/docs/eventarc-authentication.md)) | `eventarc.authentication` (`"permissive"`) | `"production"`: a missing, malformed or JWT-shaped bearer is refused with production's 401 |
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 |
276
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"`) |
277
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` |
278
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.` |
@@ -320,7 +320,7 @@ You can also name the configuration file with `--config`.
320
320
  npx fireemu up --config ./fireemu.toml
321
321
  ```
322
322
 
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.21.0/spec/config/fireemu.schema.json) for all available settings.
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.
324
324
 
325
325
  ### Firebase Authentication (Identity Platform) configuration
326
326
 
@@ -351,9 +351,9 @@ Unsigned custom tokens minted by the Firebase Admin SDK in emulator mode are acc
351
351
 
352
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.
353
353
 
354
- See the [configuration schema](https://github.com/t-k/fireemu/blob/v0.21.0/spec/config/fireemu.schema.json) for the format and accepted values of each setting.
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.
355
355
 
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.21.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.
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.
357
357
 
358
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.
359
359
 
@@ -442,7 +442,7 @@ adjacentIntervals = 1
442
442
 
443
443
  #### Enable multi-tenancy
444
444
 
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.21.0/docs/compatibility-contract.md) for the supported Admin API scope.
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.
446
446
 
447
447
  #### Start with tenants
448
448
 
@@ -493,7 +493,7 @@ A manual run (`POST /v1/sessions/{session}/functions/{name}:run`) enqueues one r
493
493
 
494
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.
495
495
 
496
- See the [configuration schema](https://github.com/t-k/fireemu/blob/v0.21.0/spec/config/fireemu.schema.json) for available settings and values.
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.
497
497
 
498
498
  ### Firestore history limits
499
499
 
@@ -569,7 +569,7 @@ Fireemu is compatible with the listed Local Emulator Suite products as shipped b
569
569
 
570
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.
571
571
 
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.21.0/spec/compatibility/contract.json) records scope and known differences. The [compatibility documentation](https://github.com/t-k/fireemu/blob/v0.21.0/docs/compatibility-contract.md) explains the verification process and how to interpret its records.
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.
573
573
 
574
574
  ### Network exposure of the Storage port
575
575
 
@@ -600,7 +600,7 @@ allowNonLoopbackHosts = true
600
600
 
601
601
  ### Changes between versions
602
602
 
603
- Configuration and behavior may change between releases. See the [CHANGELOG](https://github.com/t-k/fireemu/blob/v0.21.0/CHANGELOG.md) for release changes.
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.
604
604
 
605
605
  ## Performance
606
606
 
@@ -617,7 +617,7 @@ The following results come from one `standard` run at commit `f3b942c`. Ratios a
617
617
 
618
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]`.
619
619
 
620
- See [benchmark.yml](https://github.com/t-k/fireemu/blob/v0.21.0/.github/workflows/benchmark.yml) for the workflow and [`tools/bench/`](https://github.com/t-k/fireemu/tree/v0.21.0/tools/bench/) for the benchmark implementation.
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.
621
621
 
622
622
  ## Reporting issues and contributing
623
623
 
@@ -625,8 +625,8 @@ When reporting an issue, include the Fireemu and Firebase SDK versions, the prof
625
625
 
626
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.
627
627
 
628
- See the [development guide](https://github.com/t-k/fireemu/blob/v0.21.0/docs/development.md) for build and test instructions.
628
+ See the [development guide](https://github.com/t-k/fireemu/blob/v0.22.0/docs/development.md) for build and test instructions.
629
629
 
630
630
  ## License
631
631
 
632
- Fireemu is licensed under the [Apache License 2.0](https://github.com/t-k/fireemu/blob/v0.21.0/LICENSE). Third-party notices are listed in [THIRD_PARTY_LICENSES.txt](https://github.com/t-k/fireemu/blob/v0.21.0/THIRD_PARTY_LICENSES.txt).
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.21.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.21.0",
35
- "@fireemu/darwin-x64": "0.21.0",
36
- "@fireemu/linux-x64": "0.21.0",
37
- "@fireemu/linux-arm64": "0.21.0",
38
- "@fireemu/win32-x64": "0.21.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"