@n-dream/builders-cli 0.2.1 → 0.2.3
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 +45 -0
- package/dist/builders-cli.cjs +1186 -346
- package/firebase-tools/package-lock.json +7429 -0
- package/firebase-tools/package.json +8 -0
- package/package.json +2 -1
package/README.md
CHANGED
|
@@ -41,4 +41,49 @@ direct. The connection to the local dev server never uses the proxy.
|
|
|
41
41
|
It connects again by itself when the connection breaks. It stops when the
|
|
42
42
|
token is not valid, or when a newer tunnel for the same work takes over.
|
|
43
43
|
|
|
44
|
+
## Dev server and test data (`--dev`)
|
|
45
|
+
|
|
46
|
+
With `--dev`, the command also runs the app's dev server
|
|
47
|
+
(`pnpm dev --port <port>`) in the current folder, and starts it again
|
|
48
|
+
when it stops. It also runs the Firebase emulators (Firestore and
|
|
49
|
+
Storage) for the app's test data:
|
|
50
|
+
|
|
51
|
+
- They need Java 21 or later. Without it, the command tells you what to
|
|
52
|
+
install, and the app shows the same message.
|
|
53
|
+
- The first start installs firebase-tools in `~/.builders/firebase-tools/`
|
|
54
|
+
and takes about 30 seconds. The package has a lock file for it: every
|
|
55
|
+
package has a fixed version and checksum, and no install script runs.
|
|
56
|
+
Later starts take about 15 seconds.
|
|
57
|
+
- The data is in `.builders-dev/emulators/` in the app folder. Git does
|
|
58
|
+
not see it. The command saves it every 30 seconds and when it stops,
|
|
59
|
+
and loads it at the next start. If the machine stops hard, the changes
|
|
60
|
+
of the last 30 seconds can be lost. If the emulators cannot load the
|
|
61
|
+
saved data (3 failed starts, a start without it works, and one more
|
|
62
|
+
start with it fails), they start empty, and the old data stays in
|
|
63
|
+
`.builders-dev/emulators/export-bad-<time>/`.
|
|
64
|
+
- The emulator files (about 180 MB) download once per machine, before
|
|
65
|
+
the first start.
|
|
66
|
+
- The dev server gets `FIRESTORE_EMULATOR_HOST`,
|
|
67
|
+
`FIREBASE_STORAGE_EMULATOR_HOST`, `STORAGE_EMULATOR_HOST`,
|
|
68
|
+
`GOOGLE_CLOUD_PROJECT` (`demo-builders`, no Google credentials needed)
|
|
69
|
+
and, with the storage add-on, `STORAGE_BUCKET`.
|
|
70
|
+
- Emulators that an earlier run left behind are stopped at the next
|
|
71
|
+
start, after their data is saved.
|
|
72
|
+
- When an emulator does not answer two checks in a row (30 seconds
|
|
73
|
+
apart), the command starts the emulators again.
|
|
74
|
+
|
|
75
|
+
## Keep the preview awake
|
|
76
|
+
|
|
77
|
+
```
|
|
78
|
+
npx -y @n-dream/builders-cli awake --token-file <file> [--again] [--idle-minutes 15] [--max-minutes 25]
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
A cloud session of a coding agent pauses after a few minutes without
|
|
82
|
+
activity, and the dev preview stops with it. The agent runs this command
|
|
83
|
+
in the background at the end of each answer (`open_app` gives it as
|
|
84
|
+
`keepAwake`). It waits until nobody used the preview or wrote for 15
|
|
85
|
+
minutes, and then ends with `idle`. After 25 minutes it ends with `in use`,
|
|
86
|
+
and the agent starts it again with `--again` (not a new message). Only one
|
|
87
|
+
runs per preview.
|
|
88
|
+
|
|
44
89
|
Node.js 20.18.1 or later. No runtime dependencies (all are bundled).
|