naro-cli 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.
- package/README.md +53 -2
- package/dist/{chunk-FFPOVA7I.js → chunk-MBSO3K6L.js} +566 -40
- package/dist/deploy.js +1 -1
- package/dist/index.js +603 -175
- package/package.json +4 -4
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
|
|
@@ -853,6 +855,55 @@ An `--update-check` you give replaces the default: without
|
|
|
853
855
|
|
|
854
856
|
## Release notes
|
|
855
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
|
+
|
|
856
907
|
### 0.21.0
|
|
857
908
|
|
|
858
909
|
0.20.0 went out on 2026-10-26 without these.
|