naro-cli 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 +114 -2
- package/dist/{chunk-SAA66XLD.js → chunk-MBSO3K6L.js} +1603 -564
- package/dist/deploy.js +1 -1
- package/dist/index.js +3062 -228
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -100,14 +100,16 @@ naro env import .env.qa qa Upload every variable in a dotenv file to one
|
|
|
100
100
|
stops it before any request, and so does a key a storage binding already uses
|
|
101
101
|
when there are over 100 variables; an empty value is uploaded and shown (empty))
|
|
102
102
|
|
|
103
|
-
naro environments List the project's environments: address, branch, protection, and how many the plan allows
|
|
103
|
+
naro environments List the project's environments: address, branch, protection, data, and how many the plan allows
|
|
104
104
|
naro environments create qa --branch qa
|
|
105
105
|
A QA or staging surface served at <subdomain>--qa; --copy-env preview|production|none
|
|
106
106
|
picks where its variables start, --database schema|empty how its database does
|
|
107
107
|
naro environments set qa --no-branch --protection off
|
|
108
108
|
Change the branch whose pushes deploy here (--branch <b>, or --no-branch for none)
|
|
109
109
|
and who can open it (--protection on|off; off asks first, --yes in CI)
|
|
110
|
-
naro environments delete qa Delete it with its worker
|
|
110
|
+
naro environments delete qa Delete it with its worker, protection key and data (asks first; --yes in CI)
|
|
111
|
+
naro environments provision qa Make its data (database, backend, Storage), or go on after a stop
|
|
112
|
+
naro db query "select 1" --env qa Any data command on an environment's data: db, migration, gen, backend, policy, storage, realtime
|
|
111
113
|
|
|
112
114
|
naro domains list
|
|
113
115
|
naro domains add www.example.com Prints the CNAME to create; naro connects
|
|
@@ -211,6 +213,13 @@ naro storage mv naro://docs/a.pdf naro://docs/old/a.pdf Inside one bucke
|
|
|
211
213
|
naro storage rm naro://avatars/u1/old.png [--recursive] (asks first)
|
|
212
214
|
naro storage rm naro://avatars/u1/ --recursive Everything under u1/; written u1, an object u1 too
|
|
213
215
|
|
|
216
|
+
naro realtime [status] Naro Realtime: on or not, published tables, connections now
|
|
217
|
+
naro realtime enable Turn Realtime on: the project's hub, bound to its backend
|
|
218
|
+
naro realtime tables [list] The tables whose Data API writes reach subscribers
|
|
219
|
+
naro realtime tables add <table>… Publish tables' changes (within about 10 seconds)
|
|
220
|
+
naro realtime tables remove <table>… [--yes]
|
|
221
|
+
Stop publishing tables' changes (asks first)
|
|
222
|
+
|
|
214
223
|
naro promote <deployment-id> [--to <environment>] Publish a build to production, or to an environment (0.20.0); says rebuild or reupload first, then asks
|
|
215
224
|
naro rollback [deployment-id] Back to the previous production build
|
|
216
225
|
```
|
|
@@ -846,6 +855,109 @@ An `--update-check` you give replaces the default: without
|
|
|
846
855
|
|
|
847
856
|
## Release notes
|
|
848
857
|
|
|
858
|
+
### 0.22.0
|
|
859
|
+
|
|
860
|
+
0.21.0 went out without this.
|
|
861
|
+
|
|
862
|
+
- `naro deploy --env <name>` builds with the values the control plane
|
|
863
|
+
chose for the environment, over the ones it sent (named environments 3d).
|
|
864
|
+
The control plane saves what the deploy sends for that environment first,
|
|
865
|
+
so the two differ only where naro sets a name itself: for a project with a
|
|
866
|
+
Naro backend, an environment's build gets `NARO_URL`,
|
|
867
|
+
`NEXT_PUBLIC_NARO_URL`, `VITE_NARO_URL`, `PUBLIC_NARO_URL` and the four
|
|
868
|
+
`…_NARO_ANON_KEY` names set to that environment's own address and anon key.
|
|
869
|
+
0.21.0 and earlier let a value the deploy sent — typed at the prompt for a
|
|
870
|
+
missing key, or read from `.env.local` after you agreed — win in the local
|
|
871
|
+
build, so an environment's app could be built to call the production
|
|
872
|
+
backend while its worker was given the environment's. `naro deploy --prod`
|
|
873
|
+
and preview deploys still build with a value sent over the stored one.
|
|
874
|
+
- naro-mcp 0.21.0 goes out with it, with no change of its own: its `deploy` tool sends no env, so the new order does not change what it builds.
|
|
875
|
+
- `--env <name>` on the data commands — `naro db`, `naro migration`,
|
|
876
|
+
`naro gen types`, `naro backend` (status, keys, auth, users), `naro policy`,
|
|
877
|
+
`naro storage` and `naro realtime` — acts on that named environment's own
|
|
878
|
+
database and backend instead of production's (named environments 3e). No
|
|
879
|
+
`--env`, or `--env production`, is production, which preview shares; this
|
|
880
|
+
default is not `naro deploy`'s and `naro env pull`'s, which is preview.
|
|
881
|
+
`--env preview` fails before anything is sent:
|
|
882
|
+
`--env preview has no data of its own: preview deployments use production's. Drop --env, or name an environment.`,
|
|
883
|
+
and a value that is no environment's name with
|
|
884
|
+
`--env must be production or an environment name.` `naro backend enable`
|
|
885
|
+
and `disable` refuse `--env` (`--env is not an option of naro backend enable: turning the backend on or off applies to every environment.`):
|
|
886
|
+
every environment's backend follows production's switch. Prompts and result
|
|
887
|
+
lines name the environment's database (`Reset the qa environment's database?`),
|
|
888
|
+
and the way back they print carries the `--env` (`naro db restore --bookmark <b> --env qa`).
|
|
889
|
+
`naro backend --env qa` shows the environment's address and anon key — what a
|
|
890
|
+
local `.env.local` needs to call that environment's backend.
|
|
891
|
+
**0.21.0 and earlier ignore `--env` on these commands and act on production**:
|
|
892
|
+
the control plane cannot tell which CLI sent a request. Update before you
|
|
893
|
+
use an environment's data.
|
|
894
|
+
- `naro environments` has a `data` column — `provisioning`, `ready`, `error`,
|
|
895
|
+
or `—` for a project with no Naro database or backend — and prints a stopped
|
|
896
|
+
run's sentence under the table. `naro environments provision <slug>` makes the
|
|
897
|
+
environment's data or goes on from where it stopped (`POST …/environments/{id}/provision`).
|
|
898
|
+
`naro environments delete` now says it removes the environment's data too.
|
|
899
|
+
- `naro deploy --env <name>` no longer asks for `NARO_URL`,
|
|
900
|
+
`NEXT_PUBLIC_NARO_URL`, `VITE_NARO_URL`, `PUBLIC_NARO_URL` or the four
|
|
901
|
+
`…_NARO_ANON_KEY` names when the project has a Naro backend: naro sets them
|
|
902
|
+
for the environment over any value, so a typed one only lost. It reads the
|
|
903
|
+
project's backend once, and only when one of those names is missing
|
|
904
|
+
(`▸ naro sets … for qa to its own backend's: not asked for`); a role that
|
|
905
|
+
cannot read the backend is asked as before.
|
|
906
|
+
|
|
907
|
+
### 0.21.0
|
|
908
|
+
|
|
909
|
+
0.20.0 went out on 2026-10-26 without these.
|
|
910
|
+
|
|
911
|
+
- `naro realtime` turns on Naro Realtime for the project and chooses the
|
|
912
|
+
tables whose changes reach subscribers (Realtime 3-2d). Five commands:
|
|
913
|
+
`naro realtime [status]`, `naro realtime enable`,
|
|
914
|
+
`naro realtime tables [list]`, `naro realtime tables add <table>…` and
|
|
915
|
+
`naro realtime tables remove <table>… [--yes]`.
|
|
916
|
+
- `naro realtime` prints `Realtime: on (public channels: off)`, the
|
|
917
|
+
published tables (`Published tables: messages, gone (dropped)`, or
|
|
918
|
+
`Published tables: none — naro realtime tables add <table>`) and
|
|
919
|
+
`Connections now: 12 · channels 30 · presences 8`. When the hub does not
|
|
920
|
+
answer it says
|
|
921
|
+
`Connections now: not known — the backend is off or not ready, or the hub did not answer`.
|
|
922
|
+
Before Realtime is on it prints `Realtime: not enabled` and
|
|
923
|
+
``Run `naro realtime enable` to turn it on (the project's backend must be on first).``
|
|
924
|
+
- `naro realtime enable` needs the backend on, and is safe to run again: it
|
|
925
|
+
picks up an upload that stopped. It prints
|
|
926
|
+
`✅ Realtime is on. Publish a table with naro realtime tables add <table>.`
|
|
927
|
+
and the state. An upload that does not answer within 2 minutes stops
|
|
928
|
+
with `TIMEOUT`
|
|
929
|
+
``Turning Realtime on did not answer within 2 minutes. `naro realtime` shows where it got to, and `naro realtime enable` again picks up where it stopped.``
|
|
930
|
+
- `naro realtime tables add messages rooms` sends one request a table, in
|
|
931
|
+
order, and stops at the first refusal (`404 TABLE_NOT_FOUND`
|
|
932
|
+
`Table nope was not found.`): the tables before it stay published. Each
|
|
933
|
+
prints `✅ messages now publishes its changes (within about 10 seconds).`
|
|
934
|
+
and the control plane's warnings as `⚠ <warning>` — for a table with no
|
|
935
|
+
select policy,
|
|
936
|
+
`⚠ messages has no select policy: only service-key connections receive its changes.`
|
|
937
|
+
The command ends with
|
|
938
|
+
`⚠ Changes made through the Data API are published; writes your app makes with env.DB are not.`
|
|
939
|
+
once.
|
|
940
|
+
- `naro realtime tables remove` asks once for all the tables —
|
|
941
|
+
`Stop publishing messages, rooms? Subscribers stop receiving their changes within about 10 seconds.`
|
|
942
|
+
— and with `--json` or without a terminal only `--yes` answers it
|
|
943
|
+
(`CONFIRMATION_REQUIRED`). A table that is not published stops it with
|
|
944
|
+
`404 TABLE_NOT_PUBLISHED` `Table nope does not publish its changes.`
|
|
945
|
+
- A table name no URL can carry fails before its request with
|
|
946
|
+
`INVALID_PATH` `The table name is not valid.`, and a command with no
|
|
947
|
+
table with `VALIDATION_FAILED` and its usage line.
|
|
948
|
+
- Until Naro Realtime is switched on for the control plane, `naro realtime enable`,
|
|
949
|
+
`tables add` and `tables remove` answer `503 REALTIME_DISABLED`
|
|
950
|
+
`Naro Realtime is not enabled on this control plane yet.` (`naro realtime`
|
|
951
|
+
still prints `Realtime: not enabled`). The tables commands on a project
|
|
952
|
+
whose Realtime is not on answer `409 REALTIME_NOT_ENABLED`
|
|
953
|
+
``Realtime is not enabled for this project. Run `naro realtime enable` first.``
|
|
954
|
+
- There is no command that turns Realtime alone off yet:
|
|
955
|
+
`naro backend disable` stops it with the rest of the backend.
|
|
956
|
+
- It goes out with naro-js 0.6.0, whose `naro.channel()` is the client side
|
|
957
|
+
of Realtime (row changes, broadcast and presence, as supabase-js's
|
|
958
|
+
`channel()`). naro-js 0.6.0 is also the first published version with
|
|
959
|
+
Storage's `move()` and `copy()` (3-1i).
|
|
960
|
+
|
|
849
961
|
### 0.20.0
|
|
850
962
|
|
|
851
963
|
0.19.1 went out on 2026-10-24 without these.
|