naro-cli 0.15.0 → 0.17.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 +70 -7
- package/dist/{chunk-6WJ3QQ5Y.js → chunk-PYRN5XR6.js} +288 -53
- package/dist/deploy.d.ts +4 -1
- package/dist/deploy.js +1 -1
- package/dist/index.js +592 -97
- package/dist/output.d.ts +5 -0
- package/dist/upload.d.ts +2 -0
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -88,7 +88,8 @@ naro env remove DATABASE_URL
|
|
|
88
88
|
naro env pull [.env.local]
|
|
89
89
|
|
|
90
90
|
naro domains list
|
|
91
|
-
naro domains add www.example.com Prints the
|
|
91
|
+
naro domains add www.example.com Prints the CNAME to create; naro connects
|
|
92
|
+
it within ~5 minutes of the record appearing
|
|
92
93
|
naro domains add example.com Apex: also connects www.example.com and
|
|
93
94
|
redirects the apex to it (--no-www to skip)
|
|
94
95
|
naro domains verify [host] Re-check DNS now and print what is missing
|
|
@@ -180,7 +181,7 @@ naro storage bucket update avatars --private | --file-size-limit none | --allowe
|
|
|
180
181
|
naro storage bucket update docs --public (asks first: anyone with an object's URL can download it)
|
|
181
182
|
naro storage bucket list | empty <name> | remove <name> [--empty] (empty and remove ask first)
|
|
182
183
|
naro storage ls naro://avatars/u1 [--recursive]
|
|
183
|
-
naro storage cp ./me.png naro://avatars/u1/me.png [--upsert] Up to 50 MiB, with the service key
|
|
184
|
+
naro storage cp ./me.png naro://avatars/u1/me.png [--upsert] Up to the object limit, under 4 GiB (over 50 MiB in parts), with the service key
|
|
184
185
|
naro storage cp naro://docs/team-1/plan.pdf ./ Replaces a local file of the same name
|
|
185
186
|
naro storage rm naro://avatars/u1/old.png [--recursive] (asks first)
|
|
186
187
|
naro storage rm naro://avatars/u1/ --recursive Everything under u1/; written u1, an object u1 too
|
|
@@ -190,8 +191,9 @@ naro rollback [deployment-id] Back to the previous production build
|
|
|
190
191
|
```
|
|
191
192
|
|
|
192
193
|
`naro domains list` reads the stored status; `naro domains verify` is the one
|
|
193
|
-
that asks
|
|
194
|
-
|
|
194
|
+
that asks the DNS and Cloudflare again — and registers the domain on the spot
|
|
195
|
+
once its CNAME points at naro — so it is what turns a stuck "pending" into the
|
|
196
|
+
reason it is stuck. It exits non-zero while a domain is not live —
|
|
195
197
|
with or without `--wait` — so CI can gate on it:
|
|
196
198
|
|
|
197
199
|
```bash
|
|
@@ -203,6 +205,15 @@ An apex (`example.com`) is added as a pair by default because most registrars
|
|
|
203
205
|
goes on `www.example.com` and the apex answers with a 308 redirect to it.
|
|
204
206
|
`--no-www` registers the apex alone.
|
|
205
207
|
|
|
208
|
+
A domain another naro project already has is not refused. `naro domains add`
|
|
209
|
+
fails with `DOMAIN_VERIFICATION_REQUIRED`, and the message names a TXT record:
|
|
210
|
+
`_naro-verify.<host>` with the value `naro-verify=<token>`. Create it, then run
|
|
211
|
+
`naro domains verify <host>`. Once the record is visible, the domain moves to
|
|
212
|
+
this project. After that, the CNAME is added as usual. Add the TXT record
|
|
213
|
+
before the CNAME: until the move, the other project still serves the domain.
|
|
214
|
+
The check lasts 7 days. `naro domains list` shows open checks with their
|
|
215
|
+
expiry, and adding the domain again prints the same token.
|
|
216
|
+
|
|
206
217
|
`naro db dump` asks Cloudflare for the dump and streams it straight from
|
|
207
218
|
Cloudflare's storage to the file — the bytes never pass through naro. While the
|
|
208
219
|
export runs, Cloudflare holds every other query to the database, so dump a busy
|
|
@@ -793,13 +804,64 @@ An `--update-check` you give replaces the default: without
|
|
|
793
804
|
|
|
794
805
|
## Release notes
|
|
795
806
|
|
|
807
|
+
### 0.17.0
|
|
808
|
+
|
|
809
|
+
- `naro domains add` prints one CNAME record and no TXT records. naro
|
|
810
|
+
registers the domain once the CNAME points at it, usually within about five
|
|
811
|
+
minutes. The status line reads `Waiting for DNS — add the CNAME above; naro
|
|
812
|
+
connects it within about five minutes.` `naro domains verify` registers it at
|
|
813
|
+
once.
|
|
814
|
+
- A domain another project holds now gets an ownership check instead of
|
|
815
|
+
`DOMAIN_EXISTS` (see the `naro domains` notes under Commands). `naro domains verify <host>`
|
|
816
|
+
reads the TXT record and moves the domain here. `naro domains list` shows
|
|
817
|
+
open checks under `Ownership checks (n):`. Against a control plane that
|
|
818
|
+
predates ownership checks, list shows none.
|
|
819
|
+
- A control plane without custom domains set up answers domain changes with
|
|
820
|
+
`503 DOMAINS_NOT_CONFIGURED` (`Custom domains are not configured on this
|
|
821
|
+
server.`), and the CLI prints that message. Before, the CLI got a 500.
|
|
822
|
+
- `naro deploy` builds Next.js apps that use npm faster:
|
|
823
|
+
- A second build candidate copies the installed packages instead of
|
|
824
|
+
installing them again.
|
|
825
|
+
- npm's audit and funding notices are off during the build. A project
|
|
826
|
+
`.npmrc` that turns audit on still wins.
|
|
827
|
+
|
|
828
|
+
### 0.16.0
|
|
829
|
+
|
|
830
|
+
- `naro storage cp` uploads a file up to the object limit, under 4 GiB. Over
|
|
831
|
+
50 MiB it goes in parts, four at a time, and a part that fails is sent again
|
|
832
|
+
(up to three more times) before the upload stops. The 50 MiB refusal before
|
|
833
|
+
any request is gone: the worker judges the size when the upload starts, and a
|
|
834
|
+
file over the bucket's or the plan's limit answers `413 OBJECT_TOO_LARGE`
|
|
835
|
+
before a byte is sent. An upload in parts must finish within 24 hours of its
|
|
836
|
+
start (R2 ends unfinished multipart uploads after a day). A big upload prints its progress on stderr: one line
|
|
837
|
+
rewritten in place at a terminal, a line every 10% otherwise
|
|
838
|
+
(`↑ 312 MiB / 1.2 GiB (26%)`), and nothing with `--json`.
|
|
839
|
+
- Ctrl-C during an upload (or a TERM, or the terminal closing) stops it:
|
|
840
|
+
`Stopping the upload…` on stderr, the upload is called off — one in parts on
|
|
841
|
+
the backend too, so its name and the space it reserved are free at once
|
|
842
|
+
rather than locked for about an hour — and the run ends with the signal. A
|
|
843
|
+
second Ctrl-C ends it at once, without waiting for the call-off. A process
|
|
844
|
+
killed outright, or a network lost, still leaves the name locked until the
|
|
845
|
+
lock runs out.
|
|
846
|
+
- A file of 4 GiB or more is refused before any request
|
|
847
|
+
(`VALIDATION_FAILED`): Node reads its size modulo 4 GiB (4 GiB + 1 KiB reads
|
|
848
|
+
as 1 KiB), and the upload would send only that much and report success.
|
|
849
|
+
Uploading one needs a change in naro-js that is not there yet.
|
|
850
|
+
- A download is written to disk as it arrives, to a hidden `.naro-partial`
|
|
851
|
+
file that replaces the destination once it is whole, instead of being held in
|
|
852
|
+
memory first.
|
|
853
|
+
- `naro storage` says `50 MiB per request (larger files go in parts)`, and
|
|
854
|
+
that uploads stopped over the storage limit reopen usually within an hour and
|
|
855
|
+
a half: R2 reports the bucket's size 30 minutes to about an hour and a half
|
|
856
|
+
late.
|
|
857
|
+
|
|
796
858
|
### 0.15.0
|
|
797
859
|
|
|
798
860
|
- `naro storage` shows the Storage meter's day between `Used:` and `Buckets:`:
|
|
799
861
|
`Today (UTC):` has the write operations (R2 Class A) against the daily limit
|
|
800
862
|
and the reads, `Measured:` the bucket size R2 reported and when R2 measured
|
|
801
|
-
it (R2 reports the size 30
|
|
802
|
-
minutes). A `✗` line
|
|
863
|
+
it (R2 reports the size 30 minutes to about an hour and a half late, and the
|
|
864
|
+
meter reads it every 15 minutes). A `✗` line
|
|
803
865
|
says uploads are stopped, over the storage limit until objects are deleted
|
|
804
866
|
or over the day's write operations until 00:00 UTC (downloads still work);
|
|
805
867
|
a `⚠` line warns from 80% of the storage limit or of the day's write
|
|
@@ -872,7 +934,8 @@ An `--update-check` you give replaces the default: without
|
|
|
872
934
|
(public or private, the largest file, the types taken), and `ls`, `cp`
|
|
873
935
|
and `rm` work on `naro://<bucket>/<path>` with the project's service key
|
|
874
936
|
(`NARO_SERVICE_KEY`, or fetched with a warning) — the bytes go to the
|
|
875
|
-
project's backend, not through naro. One
|
|
937
|
+
project's backend, not through naro. One request carries 50 MiB at most; a
|
|
938
|
+
larger file goes in parts since 0.16.0 (under 4 GiB).
|
|
876
939
|
`bucket update --public`, `empty`, `remove` and `rm` ask first; without a
|
|
877
940
|
terminal they need `--yes` (`CONFIRMATION_REQUIRED` otherwise, nothing
|
|
878
941
|
sent).
|