Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion public/conformance/auth.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion public/conformance/firestore-rules.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion public/conformance/firestore.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion public/conformance/functions.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion public/conformance/pubsub.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion public/conformance/storage.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion public/conformance/suite.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion public/conformance/tasks.json

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions src/content/docs/docs/contribute/build.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ project, and which tests a change must pass.
## What you need

- **Rust**, the toolchain `rust-toolchain.toml` names: the stable channel with
`clippy` and `rustfmt`. The workspace needs Rust 1.98 or later, and 0.2.3
was built with 1.98.0, the toolchain the release records.
`clippy` and `rustfmt`. The workspace needs Rust 1.98 or later, and 0.2.4
was built with 1.100.0, the toolchain the release records.
- **Node 24.20.0 and npm 12.0.2**, the versions `CONTRIBUTING.md` names and
the repository's checks pin: `console/` and `conformance/` declare
`engines.node` `>=24.20.0 <25` and `packageManager` `npm@12.0.2`.
Expand Down Expand Up @@ -86,7 +86,7 @@ what they lack.
To run a change in your own app through the npm launcher, build a local
candidate. It is a pair of private tarballs, the launcher and your machine's
engine, with a version of their own that names the commit, such as
`0.2.3-local.g1a2b3c4d5e6f`. Nothing is published.
`0.2.4-local.g1a2b3c4d5e6f`. Nothing is published.

1. Commit your change. The build refuses uncommitted tracked changes, so
every candidate names the exact source it came from.
Expand Down
21 changes: 11 additions & 10 deletions src/content/docs/docs/data/keep-data.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ npx firenook emulators:start --keep-data
The first start begins empty and says where the data goes:

```text
firenook 0.2.3
firenook 0.2.4
demo-shop · a fresh start
Node 24.20.0 · data in .firenook/state
```
Expand All @@ -34,7 +34,7 @@ Every later start picks the data up, says when it was saved, and counts what
it holds:

```text
firenook 0.2.3
firenook 0.2.4
demo-shop · picking up the data saved just now
Node 24.20.0 · data in .firenook/state

Expand All @@ -52,7 +52,7 @@ Each start gets a new, empty working directory,
`.firenook/runs/session-<id>/state`, and says so:

```text
firenook 0.2.3
firenook 0.2.4
demo-shop · a fresh start
Node 24.20.0 · data in .firenook/runs/session-VLd3PD, for this run
```
Expand Down Expand Up @@ -95,17 +95,18 @@ working store, not an export: copy it to another machine as an
The official emulator keeps no Pub/Sub or Cloud Tasks data either.

Because the receipt covers all three, `--keep-data` needs Firestore, Auth and
Storage running together. Starting with `--only` and without one of them
fails:
Storage running together. A start without one of them is refused before
the engine starts, and the refusal names what is missing and where to add
it, `--only` or `firebase.json`:

```text
suite failed: --resume-state requires the firestore, auth and storage services (the native state receipt covers all three)
Firenook: --keep-data keeps Firestore, Auth and Storage together (its saved data holds all three), and this start runs no Auth or Storage: add auth and storage to --only, or start without --keep-data
```

The start command `firenook init` writes uses `--keep-data`. If you set a
project up without Auth or Storage, remove `--keep-data` from its
`emulators` script, and keep data with an export instead
([export and snapshots](/docs/data/export)).
`--resume-state` is refused the same way. `firenook init` writes
`--keep-data` into the `emulators` script only for a project that runs all
three. A project without Auth or Storage gets a script without it; keep its
data with an export instead ([export and snapshots](/docs/data/export)).

## Keep data from a seed

Expand Down
2 changes: 1 addition & 1 deletion src/content/docs/docs/data/recovery.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ in the terminal, `existing data preserved` in the plain log.
| `it was imported from <folder>: pass --import <folder> to keep using it` | You started seeded data without its seed | Start with the same `--import` |
| `this data was started without a seed, so it cannot take the seed <folder>` | You gave `--import` to data kept without a seed | Start without `--import`, or import into a new `--state-dir` |
| `Existing nonempty state requires explicit --resume-state (or --keep-data)` | The `--state-dir` folder already holds data | Add `--resume-state`, or name an empty folder |
| `--resume-state requires the firestore, auth and storage services` | `--only` left out one of the three | Start all three ([keep data](/docs/data/keep-data#what-is-kept)) |
| `--keep-data keeps Firestore, Auth and Storage together` | `--only` or `firebase.json` leaves out one of the three | Add it where the message says, or start without the flag ([keep data](/docs/data/keep-data#what-is-kept)) |
| `suite state is locked` | Another Firenook uses the folder | Stop it, or use another `--state-dir` |
| `the import that made it did not finish` | The first start was stopped before its import ended | Import again into a new `--state-dir` |
| `it belongs to project <id>, not <id>` | The folder holds another project's data | Start with that project's id, or another `--state-dir` |
Expand Down
2 changes: 1 addition & 1 deletion src/content/docs/docs/data/seeds.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ npx firenook emulators:start --import ./data --keep-data
The first start imports it into `.firenook/state`:

```text
firenook 0.2.3
firenook 0.2.4
demo-shop · first start, importing the seed "data"
Node 24.20.0 · data in .firenook/state

Expand Down
25 changes: 16 additions & 9 deletions src/content/docs/docs/functions/debugging.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,10 @@ codebase points it out.

### If a save seems to change nothing

In 0.2.3, a save that stops a codebase loading, such as code that throws
while it loads or a param with no default and no value, is reported only on
the terminal screen. The plain output (`--plain`, pipes and CI) and the
`--debug` log print nothing about it, and the version loaded before keeps
answering, so a call still gets the old behaviour. The screen shows it:
A save that stops a codebase loading, such as code that throws while it
loads or a param with no default and no value, leaves the version loaded
before answering, so a call still gets the old behaviour. The terminal
screen says why:

```text
19:36:17 ✕ reload failed 117 ms default
Expand All @@ -60,10 +59,18 @@ answering, so a call still gets the old behaviour. The screen shows it:
│ still running the version loaded at 19:35:59 · open in console
```

When you run with `--plain`, open the codebase in the console's Functions
page after a save: it says the codebase failed to load, with the error, and
that the previous version is still serving. Calling the function you changed
shows the same thing.
The plain output (`--plain`, pipes and CI) and the `--debug` log print the
official line, as the first load does, with the error and its stack
(trimmed):

```text
firenook functions: Failed to load function definition from source: FirebaseError: Functions codebase could not be analyzed successfully. It may have a syntax or runtime error
Error: SHOP_REGION is not set
at Object.<anonymous> (~/demo-shop/functions/index.js:6:37)
```

The console's Functions page says the same: the codebase failed to load,
with the error, and the previous version is still serving.

## Reload by hand

Expand Down
14 changes: 7 additions & 7 deletions src/content/docs/docs/functions/scheduled.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -107,19 +107,19 @@ The console marks such a schedule **Not automatic**.
From the command line, while the emulators run:

```console
$ npx firenook functions:invoke nightlyReport --event-data '{}'
$ npx firenook functions:invoke nightlyReport
Firenook: schedule event pubsub for nightlyReport (us-central1, gcfv2) via trigger key us-central1-nightlyReport-0
200 OK http://127.0.0.1:5001/functions/projects/demo-shop/triggers/us-central1-nightlyReport-0
```

A schedule takes no data, so `--event-data '{}'` is enough. In 0.2.3 it is
also needed: without it, `functions:invoke` sends a plain HTTPS request,
which a scheduled function does not answer, and the command exits with 1:
A schedule takes no data, so `functions:invoke` sends a scheduled function
its schedule event without `--event-data`, as `--event-data '{}'` does. A
scheduled function answers no HTTPS request, so `--data` and `--method` are
refused with what to type instead, and the command exits with 1:

```console
$ npx firenook functions:invoke nightlyReport
404 Not Found http://127.0.0.1:5001/demo-shop/us-central1/nightlyReport
Function us-central1-nightlyReport does not exist, valid functions are: us-central1-helloWorld, us-central1-addMessage, us-central1-onOrderCreated-0, us-central1-onUpload-0, us-central1-nightlyReport-0, us-central1-sendReceipt, us-central1-onShipped-0-projects/demo-shop/locations/us-central1/channels/firebase
$ npx firenook functions:invoke nightlyReport --data '{"a":1}'
Firenook: nightlyReport is a scheduled function, which takes no --data: firenook functions:invoke nightlyReport sends its schedule event
```

In the [console](/docs/tools/console), open **Functions** and pick the
Expand Down
2 changes: 1 addition & 1 deletion src/content/docs/docs/get-started/ci.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ looks like this, trimmed:

```text
Firenook: running the script through the shell as the official CLI does; use -- for an argv command without shell interpretation
Firenook 0.2.3; engine 2294132253f03395b0d9bafe391d35075e928112; disk/WAL state <project>/.firenook/runs/session-Syhid2/state
Firenook 0.2.4; engine 4be26bedd0ce6124c3267d6936ec6d9b539a2bc9; disk/WAL state <project>/.firenook/runs/session-Syhid2/state
Services: firestore, auth, storage, functions, pubsub; Emulator UI on; host localhost
Demo project demo-shop: no cloud service is contacted, but user Functions can still reach external providers; this CLI is not a network sandbox.
Working data and launch receipt are preserved in <project>/.firenook/runs/session-Syhid2. No automatic deletion.
Expand Down
6 changes: 3 additions & 3 deletions src/content/docs/docs/get-started/docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ data you want to keep.

## Use the release image

`ghcr.io/firenook-dev/firenook:0.2.3` holds Node 24 and the `firenook` npm
`ghcr.io/firenook-dev/firenook:0.2.4` holds Node 24 and the `firenook` npm
package of that version, nothing else, for linux/amd64 and linux/arm64.
`latest` is the newest release. Mount the project, with its `firebase.json`,
rules and functions, at `/project`, publish the ports you use, and start the
Expand All @@ -21,7 +21,7 @@ emulators on every address in the container:
```sh
docker run --rm -v "$PWD:/project" \
-p 4000:4000 -p 8080:8080 -p 9099:9099 -p 9199:9199 \
ghcr.io/firenook-dev/firenook:0.2.3 \
ghcr.io/firenook-dev/firenook:0.2.4 \
emulators:start --project demo-shop --host 0.0.0.0
```

Expand All @@ -40,7 +40,7 @@ In Compose, or as a CI service container:
```yaml title="compose.yaml"
services:
firebase:
image: ghcr.io/firenook-dev/firenook:0.2.3
image: ghcr.io/firenook-dev/firenook:0.2.4
command: emulators:start --project demo-shop --host 0.0.0.0
volumes:
- ./:/project
Expand Down
8 changes: 4 additions & 4 deletions src/content/docs/docs/get-started/install.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ stops:

```console
$ npx firenook binary-path
Firenook: Missing @firenook/cli-darwin-arm64@0.2.3. Install with optional dependencies enabled. No postinstall script is needed.
Firenook: Missing @firenook/cli-darwin-arm64@0.2.4. Install with optional dependencies enabled. No postinstall script is needed.
```

:::note
Expand Down Expand Up @@ -150,7 +150,7 @@ published with, and prints where it is:

```console
$ npx firenook --version
0.2.3 (engine source 2294132253f03395b0d9bafe391d35075e928112)
0.2.4 (engine source 4be26bedd0ce6124c3267d6936ec6d9b539a2bc9)
$ npx firenook binary-path
~/demo-shop/node_modules/@firenook/cli-darwin-arm64/bin/firenook
```
Expand Down Expand Up @@ -186,8 +186,8 @@ $ npx firenook doctor
},
"warnings": [],
"problems": [],
"version": "0.2.3",
"engineRevision": "2294132253f03395b0d9bafe391d35075e928112"
"version": "0.2.4",
"engineRevision": "4be26bedd0ce6124c3267d6936ec6d9b539a2bc9"
}
```

Expand Down
19 changes: 8 additions & 11 deletions src/content/docs/docs/get-started/new-project.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ Enter takes them all:
╭──────────────────────────────────────────────────────────────────────────╮
│ │
│ ▄█ │
│ ▄███▀ ▄ firenook 0.2.3 │
│ ▄███▀ ▄ firenook 0.2.4 │
│ ▄███▀ ███▄ a new project in ~/my-app │
│ ▀██▀ ███▀ Node 24.20.0 · Claude Code found │
│ █▀▀ │
Expand Down Expand Up @@ -113,7 +113,7 @@ once. Each step gets a line with its time:
│ │
│ Files ✓ 4 ms firebase.json, .firebaserc, rules, functions/, … │
│ Agents ✓ 0 ms .mcp.json for Claude Code │
│ Firenook ✓ 517 ms 0.2.3 in package.json │
│ Firenook ✓ 517 ms 0.2.4 in package.json │
│ Packages ✓ 14.1 s npm install in functions/, 241 packages │
│ Build ✓ 1.1 s tsc, into functions/lib │
│ │
Expand Down Expand Up @@ -169,15 +169,12 @@ The codebase has a `serve` script of its own, as the official template does.
From `functions/`, `npm run serve` starts only the Functions emulator, with
`--build` for TypeScript; Firenook finds `firebase.json` in the folder above.

:::caution
:::note
`--keep-data` keeps Firestore, Auth and Storage together, so it needs all
three. If you turn Auth or Storage off, on the screen or with `--only`,
remove `--keep-data` from the `emulators` script and from the start command
`init` prints. Otherwise the start is refused:

```text
suite failed: --resume-state requires the firestore, auth and storage services (the native state receipt covers all three)
```
`init` leaves `--keep-data` out of the `emulators` script and of the start
command it prints and runs. For TypeScript, the script is then
`firenook emulators:start --build`.
:::

## What init writes
Expand Down Expand Up @@ -211,7 +208,7 @@ The scripts, as `init` writes them for TypeScript:
"emulators": "firenook emulators:start --keep-data --build"
},
"devDependencies": {
"firenook": "0.2.3"
"firenook": "0.2.4"
}
}
```
Expand Down Expand Up @@ -292,7 +289,7 @@ Firenook init: project demo-my-app in ~/my-app
wrote ~/my-app/functions/.gitignore
wrote ~/my-app/.gitignore
done Agents: .mcp.json for Claude Code (0.0 s)
done Firenook: 0.2.3 in package.json (0.4 s)
done Firenook: 0.2.4 in package.json (0.4 s)
done Packages: npm install in functions/, 241 packages (2.3 s)
done Build: tsc, into functions/lib (0.8 s)
Next steps:
Expand Down
2 changes: 1 addition & 1 deletion src/content/docs/docs/get-started/one-service.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ three in the list:

```console
$ npx firenook emulators:start --only firestore --keep-data
suite failed: --resume-state requires the firestore, auth and storage services (the native state receipt covers all three)
Firenook: --keep-data keeps Firestore, Auth and Storage together (its saved data holds all three), and this start runs no Auth or Storage: add auth and storage to --only, or start without --keep-data
```

Start `--only firestore,auth,storage --keep-data` and add the others you need.
Expand Down
2 changes: 1 addition & 1 deletion src/content/docs/docs/get-started/tests.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ builds the functions and starts the emulators around it. Trimmed:
```console
$ npm run test:integration
Firenook: running the script through the shell as the official CLI does; use -- for an argv command without shell interpretation
Firenook 0.2.3; engine 2294132253f03395b0d9bafe391d35075e928112; disk/WAL state ~/demo-shop/.firenook/runs/session-Syhid2/state
Firenook 0.2.4; engine 4be26bedd0ce6124c3267d6936ec6d9b539a2bc9; disk/WAL state ~/demo-shop/.firenook/runs/session-Syhid2/state
Services: firestore, auth, storage, functions, pubsub; Emulator UI on; host localhost
Build: functions runs its build script before the emulators start
firenook functions: Loaded functions definitions from source: helloWorld, orderTotal.
Expand Down
2 changes: 1 addition & 1 deletion src/content/docs/docs/help/former-name.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ where Fireside left it. Start with the same `--state-dir`, and the same

```console
$ npx firenook emulators:start --keep-data --state-dir ./local-state --import ./seed
Firenook 0.2.3; engine 2294132253f03395b0d9bafe391d35075e928112; disk/WAL state ~/demo-shop/local-state
Firenook 0.2.4; engine 4be26bedd0ce6124c3267d6936ec6d9b539a2bc9; disk/WAL state ~/demo-shop/local-state
firenook resuming validated native state (seed import skipped)
firenook: indexed the top-level fields of 5 Firestore documents in 0.0 s
All emulators ready
Expand Down
4 changes: 2 additions & 2 deletions src/content/docs/docs/help/report.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Search the open and closed issues first: someone may have reported it, and

```console
$ npx firenook --version
0.2.3 (engine source 2294132253f03395b0d9bafe391d35075e928112)
0.2.4 (engine source 4be26bedd0ce6124c3267d6936ec6d9b539a2bc9)
```

Include the whole line: the engine revision says exactly which engine you
Expand Down Expand Up @@ -51,7 +51,7 @@ log to the run's folder and prints where:

```console
$ npx firenook emulators:start --plain --debug --only firestore
Firenook 0.2.3; engine 2294132253f03395b0d9bafe391d35075e928112; disk/WAL state ~/demo-shop/.firenook/runs/session-12IyTo/state
Firenook 0.2.4; engine 4be26bedd0ce6124c3267d6936ec6d9b539a2bc9; disk/WAL state ~/demo-shop/.firenook/runs/session-12IyTo/state
Services: firestore; Emulator UI on; host localhost
Demo project demo-shop: no cloud service is contacted, but user Functions can still reach external providers; this CLI is not a network sandbox.
Debug log: ~/demo-shop/.firenook/runs/session-12IyTo/firenook-debug.log
Expand Down
8 changes: 4 additions & 4 deletions src/content/docs/docs/help/troubleshooting.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ it where your app connects too. Every emulator needs its own port; see

```console
$ npx firenook emulators:start
Firenook: Missing @firenook/cli-darwin-arm64@0.2.3. Install with optional dependencies enabled. No postinstall script is needed.
Firenook: Missing @firenook/cli-darwin-arm64@0.2.4. Install with optional dependencies enabled. No postinstall script is needed.
```

The native engine for your machine comes in an optional dependency, one
Expand Down Expand Up @@ -338,16 +338,16 @@ At start, rules that do not compile stop the start, with the file, line and
column:

```text
suite failed: invalid Firestore rules for database "(default)" in ~/demo-shop/firestore.rules: 15:26: expected "if"
suite failed: invalid Firestore rules for database "(default)" in ~/demo-shop/firestore.rules: 5:19: Missing 'if' before conditional expression.
```

While the emulators run, Firenook loads rules again when you save the file. A
save that does not compile is reported and the rules already loaded stay in
force:

```text
firenook firestore: database "(default)" rules in ~/demo-shop/firestore.rules did not compile; the rules in force are unchanged: 15:26: expected "if"
firenook storage: rules for every bucket in ~/demo-shop/storage.rules did not compile; the rules in force are unchanged: 13:1: expected end of rules source
firenook firestore: database "(default)" rules in ~/demo-shop/firestore.rules did not compile; the rules in force are unchanged: 5:19: Missing 'if' before conditional expression.
firenook storage: rules for every bucket in ~/demo-shop/storage.rules did not compile; the rules in force are unchanged: 9:1: Unexpected '}'.
```

Fix the line named and save again.
Expand Down
Loading
Loading