orbitpush 0.1.1 → 0.3.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/CHANGELOG.md CHANGED
@@ -4,6 +4,26 @@ User-visible changes to orbitpush: commands, flags, exit codes, terminal output,
4
4
 
5
5
  ## Unreleased
6
6
 
7
+ ## 0.3.0 - 2026-11-19
8
+
9
+ ### Removed
10
+
11
+ - **Breaking:** `init` no longer takes `--domain` and `--alias`. Add domains after `init` with `orbitpush domains add <host>`, or list them in `orbitpush.json` before `deploy`.
12
+
13
+ ### Changed
14
+
15
+ - `domains add` looks up the DNS record itself and prints the expected record next to the current one, whether or not they match. A CNAME that leads to another bunny.net pull zone no longer counts as done: `domains add` waits for it to change, and without a terminal it exits `1`, even for a domain that is already connected.
16
+ - `deploy` prints no DNS records. A domain that bunny.net refuses a certificate for gets one warning after the deploy, pointing to `orbitpush domains add <host>`.
17
+ - `init` and the first `deploy` check that the project name is free on bunny.net before creating anything. A taken name asks again at the prompt and stops with `The name "<name>" is already taken on bunny.net. Choose another with --name.` without one, instead of creating a storage zone and deleting it again.
18
+ - A failed bunny.net request reads `Could not <action>: bunny.net says "<message>"` instead of the request's method, path and HTTP status. Set `ORBITPUSH_DEBUG=1` to print those too.
19
+ - When a domain is already on another pull zone, `domains add` and `deploy` name that pull zone and link its hostnames in the dashboard, or say that another bunny.net account uses the domain.
20
+
21
+ ## 0.2.0 - 2026-11-18
22
+
23
+ ### Changed
24
+
25
+ - `deploy` deletes stale HTML pages, PDFs, images and other files on the deploy that drops them, so a removed page stops being served right away. Only stale `.js`, `.mjs`, `.css`, `.wasm`, `.json`, font and source map files, which open pages of the previous build can still request, stay for 7 days. Without an `index.html` in the output, deploy deletes stale files only after 7 days.
26
+
7
27
  ## 0.1.1 - 2026-11-10
8
28
 
9
29
  ### Changed
package/README.md CHANGED
@@ -16,18 +16,17 @@ npx orbitpush domains add www.example.com # optional: your own domain
16
16
  Sets up a site without deploying it. In a terminal you rarely need it: the first `deploy` asks the same questions. It asks for the project name, build output directory, the main storage region, replication regions and CDN delivery regions. Then it creates:
17
17
 
18
18
  1. a storage zone (name = project name),
19
- 2. a pull zone with the storage zone as its origin (available at `https://<name>.b-cdn.net`),
20
- 3. with `--domain` and `--alias`, those hostnames on the pull zone, and prints the DNS record for each.
19
+ 2. a pull zone with the storage zone as its origin (available at `https://<name>.b-cdn.net`).
21
20
 
22
- Domains are not asked for: add them with [`orbitpush domains add`](#orbitpush-domains), which waits for DNS and turns on HTTPS. For a domain given to `init`, run `domains add` for it once its DNS record is set.
21
+ `init` sets up no domains: add them afterwards with [`orbitpush domains add`](#orbitpush-domains), which checks the DNS record and turns on HTTPS.
23
22
 
24
23
  Each prompt can be skipped with a flag; an option no command knows stops with an error. Without a terminal, `init` needs `--name` and `--dir`, or `--yes` to take the defaults:
25
24
 
26
25
  ```bash
27
- npx orbitpush init --name my-site --dir dist --domain www.example.com --alias example.com --region DE --delivery-region EU --delivery-region US --yes
26
+ npx orbitpush init --name my-site --dir dist --region DE --delivery-region EU --delivery-region US --yes
28
27
  ```
29
28
 
30
- The pull zone and storage zone names are global across bunny.net. If the name is taken, choose another one.
29
+ The pull zone and storage zone names are global across bunny.net. `init` checks that the name is free before it creates anything. At the prompt it asks again for a taken name; with `--name` or `--yes` it stops with exit code `1` and asks you to choose another with `--name`.
31
30
 
32
31
  If `init` fails before `orbitpush.json` is written, it deletes the zones it just created, so you can run it again with the same name. If that cleanup fails too, `init` names the zone to delete in the dashboard. Failures after that point, such as a missing SSL certificate, are fixed by the next deploy.
33
32
 
@@ -37,9 +36,9 @@ In a terminal, `deploy` without an `orbitpush.json` asks whether to set up a new
37
36
 
38
37
  1. Reads `orbitpush.json` and `BUNNY_API_KEY`.
39
38
  2. Compares the output directory with the storage zone using SHA256 checksums and uploads only changed files, HTML files last. A symlinked file is uploaded with the content it points to; a symlinked directory or a broken symlink is skipped with a warning.
40
- 3. Applies the settings: [SPA mode](#spa-mode) or the [404 page](#404-page) from the output directory, and replication regions, delivery regions and domains from `orbitpush.json`.
39
+ 3. Applies the settings: [SPA mode](#spa-mode) or the [404 page](#404-page) from the output directory, and replication regions, delivery regions and domains from `orbitpush.json`. A domain gets its hostname on the pull zone and an SSL certificate once bunny.net issues one. `deploy` looks up no DNS: when bunny.net refuses a certificate, a warning after the deploy names the domain and says to run `orbitpush domains add <host>`, which shows the record it needs.
41
40
  4. Turns `redirects` and `headers` into edge rules (see below).
42
- 5. Deletes files from the storage zone that have not been in the build for 7 days, so an installed PWA or an open page still running the previous version can load its old assets. The date each file left the build is kept in `/.orbitpush/stale.json` in the storage zone, which the pull zone serves publicly like every other file there. It lists only paths the site served before. If you delete it, the next deploy treats every stale file as stale since then. `.orbitpush/` in the storage zone belongs to orbitpush, so `deploy` skips files under `.orbitpush/` in the output directory with a warning.
41
+ 5. Deletes files from the storage zone that are no longer in the build. HTML pages, PDFs, images and every other file go on the deploy that drops them. Scripts, styles, data, fonts and source maps (`.js`, `.mjs`, `.css`, `.wasm`, `.json`, `.woff2`, `.woff`, `.ttf`, `.otf`, `.map`) stay for 7 days, so an installed PWA or an open page still running the previous version can load its lazy chunks. Without an `index.html` in the output, which usually means the wrong directory, `deploy` warns and deletes stale files only after 7 days. The date each file left the build is kept in `/.orbitpush/stale.json` in the storage zone, which the pull zone serves publicly like every other file there. It lists only paths the site served before. If you delete it, the next deploy treats every stale file as stale since then. `.orbitpush/` in the storage zone belongs to orbitpush, so `deploy` skips files under `.orbitpush/` in the output directory with a warning.
43
42
  6. Purges the pull zone cache.
44
43
 
45
44
  bunny.net applies edge rule changes one by one, a few seconds after `deploy` finishes (2–6 s in our tests).
@@ -66,13 +65,27 @@ npx orbitpush domains remove example.com
66
65
  npx orbitpush domains list
67
66
  ```
68
67
 
69
- `domains add` adds the hostname to the pull zone, prints the DNS record to create, and waits until the record points to bunny.net: it checks again 10 seconds after each check, for up to 15 minutes. Then it gets a free SSL certificate, turns on HTTPS and writes the alias redirects. If DNS takes longer, or you stop it with Ctrl+C, run the same command again later: it continues where it stopped. Without a terminal it checks once and exits with status `1` while the domain is not connected.
68
+ `domains add` adds the hostname to the pull zone and looks up its DNS record itself, through the public resolvers `1.1.1.1` and `8.8.8.8`. It prints the record the hostname needs next to the one it has:
69
+
70
+ ```
71
+ ✔ The DNS record of www.example.com points to my-site.b-cdn.net
72
+ expected CNAME my-site.b-cdn.net
73
+ current CNAME my-site.b-cdn.net ✔
74
+ ```
75
+
76
+ The record matches when its CNAME, or any CNAME it leads to, is `<name>.b-cdn.net`. A CNAME that leads to another pull zone (another `*.b-cdn.net` name) blocks `domains add`, even though bunny.net would serve the site through it today. After you change such a record, the public resolvers can keep showing the old one until its TTL runs out; run `domains add` again then. In every other case bunny.net's certificate check decides:
77
+
78
+ - A root domain with ALIAS, ANAME or CNAME flattening, or a CNAME to such a domain, has no CNAME to `<name>.b-cdn.net` to read. Its addresses are compared with those of `<name>.b-cdn.net`, but bunny.net answers with different addresses in different places, so a difference is shown without blocking.
79
+ - A record the public resolvers do not show yet, for example because they still remember that it was missing, does not block when bunny.net already sees it.
80
+ - If the lookup itself fails, `domains add` says so.
81
+
82
+ Until the hostname connects, `domains add` waits: it checks again 10 seconds after each check, for up to 15 minutes, and prints the current record each time it changes. Then it gets a free SSL certificate, turns on HTTPS and writes the alias redirects. If DNS takes longer, or you stop it with Ctrl+C, run the same command again later: it continues where it stopped. Without a terminal it checks once and exits with status `1` while the domain is not connected or its CNAME leads to another pull zone. That includes a domain that is connected but whose CNAME leads to another pull zone.
70
83
 
71
84
  With `--primary`, the domain becomes the primary domain only once it is connected, and the former primary domain becomes an alias that redirects to it. Until then it stays an alias, so visitors are never sent to a domain without HTTPS.
72
85
 
73
86
  `domains remove` removes the hostname from `orbitpush.json` and the pull zone. A primary domain that still has aliases cannot be removed: remove the aliases first, or make another domain primary with `orbitpush domains add <host> --primary`.
74
87
 
75
- `domains list` changes nothing. It shows each domain, whether it is connected, and the DNS record it still needs.
88
+ `domains list` changes nothing and looks up no DNS. It shows each domain as bunny.net sees it: whether it is connected, and the DNS record a domain without a certificate still needs. To check the record of a domain, run `domains add` for it again.
76
89
 
77
90
  ## Without a terminal (CI, scripts, agents)
78
91
 
@@ -89,8 +102,9 @@ npx orbitpush domains add www.example.com # prints the DNS record, exits 1 unt
89
102
  - Commit `orbitpush.json` after `init`. Without a terminal, `deploy` never creates a site; it stops when the file is missing.
90
103
  - `init` stops unless it gets `--name` and `--dir`, or `--yes`, so a guessed name never creates zones.
91
104
  - `deploy`, `disable` and `enable` take no input. `destroy` needs `--yes`.
92
- - `domains add` checks DNS once instead of waiting and exits `1` while the domain is not connected; run it again a few minutes later. `domains list` exits `1` while any domain is not connected, so a script can poll it.
105
+ - `domains add` checks DNS once instead of waiting and exits `1` while the domain is not connected or its CNAME leads to another pull zone; run it again a few minutes later. `domains list` exits `1` while any domain is not connected, so a script can poll it.
93
106
  - Errors go to stderr with exit code `1`, an unknown command exits with `2`, and an unknown option stops with `1`, so a typo never falls back to a default.
107
+ - A failed bunny.net request reads `Could not <action>: bunny.net says "<message>"`. Set `ORBITPUSH_DEBUG=1` to also print the request's method, path and HTTP status.
94
108
  - Some coding agents run commands in a pseudo-terminal, where orbitpush would ask its questions and wait. Set `CI=1` for them: then nothing asks, and `domains add` checks once instead of waiting up to 15 minutes.
95
109
 
96
110
  ## `orbitpush.json`