@thebaycloud/cli 1.0.0 → 1.1.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 +75 -0
- package/LICENSE +34 -0
- package/README.md +30 -13
- package/index.js +612 -88
- package/lib/brand.js +4 -1
- package/lib/check.js +15 -2
- package/lib/confirm.js +1 -1
- package/lib/draft.js +1 -1
- package/lib/home.js +46 -0
- package/lib/resolver.js +3 -3
- package/lib/rows.js +61 -0
- package/lib/share-args.js +93 -0
- package/lib/who.js +4 -3
- package/package.json +10 -10
- package/vendor/README.md +1 -1
- package/vendor/detector.js +2 -2
- package/vendor/inputs.json +2 -1
- package/vendor/resolve.js +9 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,80 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.1.0
|
|
4
|
+
|
|
5
|
+
**Everything below `Unreleased` was already written and none of it was shipped.**
|
|
6
|
+
|
|
7
|
+
`1.0.0` sat in main looking released while npm held a tarball without
|
|
8
|
+
`bay share`, without `ship --name`, and without the thebay.cloud rename. The
|
|
9
|
+
publish workflow guards on the version field and a no-op publish reports success,
|
|
10
|
+
so every push since said "Publish CLI: success" and changed nothing anybody could
|
|
11
|
+
install. Its own comment records this happening twice before: "BOTH times the
|
|
12
|
+
version sat in main looking released."
|
|
13
|
+
|
|
14
|
+
Found from the outside, by a deploy report: `bay ship --name` was rejected as an
|
|
15
|
+
unknown flag and `bay share <app> public` printed help, both of which the manual
|
|
16
|
+
documents and the repository implements. Verified by pulling the published
|
|
17
|
+
tarball and diffing `SHIP_FLAGS`.
|
|
18
|
+
|
|
19
|
+
So this is a version bump and nothing else. What it releases:
|
|
20
|
+
|
|
21
|
+
- `bay share <app> public|private|shared`, and the whole access surface — add and
|
|
22
|
+
remove people, company rules, pending requests. Implemented, never published.
|
|
23
|
+
- `bay ship --name <name>`, so an app is not stuck with a generated slug.
|
|
24
|
+
- The rename: `bay` as the command, `thebay.cloud` as the domain, `~/.bay` with
|
|
25
|
+
`~/.supersonic` still honoured.
|
|
26
|
+
- `bay logs` as a filter rather than a line count — a level, `source=`, `status=`,
|
|
27
|
+
`path=`, or free text — and `--follow` as a real stream over server-sent events
|
|
28
|
+
instead of polling every 2.5 seconds against a set of every line it had seen.
|
|
29
|
+
|
|
30
|
+
## Unreleased
|
|
31
|
+
|
|
32
|
+
**The command is `bay`, and the package is `bay-cli`.**
|
|
33
|
+
|
|
34
|
+
The product is Bay and the domain is thebay.cloud, so the thing you type is
|
|
35
|
+
`bay ship`. Everything about the old name keeps working, and none of it is
|
|
36
|
+
deprecated: the package still installs a `supersonic` binary, `~/.supersonic`
|
|
37
|
+
is still read when it is the directory that exists, and `SUPERSONIC_TOKEN`,
|
|
38
|
+
`SUPERSONIC_URL` and `SUPERSONIC_WHO` are still honoured beside `BAY_TOKEN`,
|
|
39
|
+
`BAY_URL` and `BAY_WHO`. A rename that silently stops reading a token file
|
|
40
|
+
does not read as a rename — it reads as the platform signing you out — so the
|
|
41
|
+
migration is: use the new name if it is there, otherwise keep using theirs.
|
|
42
|
+
`lib/home.js` holds that rule and `test/home.test.js` pins it.
|
|
43
|
+
|
|
44
|
+
Not renamed, deliberately: `supersonic.json`, the `x-supersonic-*` headers,
|
|
45
|
+
`SUPERSONIC_RUN`, `SUPERSONIC_CODE_*`, and the encryption salt. Those are read
|
|
46
|
+
by the CONTROL PLANE rather than typed by a person, and moving them from this
|
|
47
|
+
side would break every ship against a server that has not moved with them.
|
|
48
|
+
|
|
49
|
+
**Everything the dashboard does, the CLI does.**
|
|
50
|
+
|
|
51
|
+
`bay share` (visibility, people, and `@company` rules), `bay domains` (attach a
|
|
52
|
+
domain you own and print the one DNS record to create), `bay db` (tables, rows,
|
|
53
|
+
one read-only SELECT), `bay git` (which branch, and whether a push ships),
|
|
54
|
+
`bay plan` (the plan and every limit left) and `bay tokens` (every CLI signed
|
|
55
|
+
in to the account, and revoking one). No new endpoints were needed: the control
|
|
56
|
+
plane resolves a Bearer token wherever it resolves a session cookie.
|
|
57
|
+
|
|
58
|
+
The DNS record comes from the server rather than being derived here. Apex versus
|
|
59
|
+
subdomain is a public-suffix question, and a second copy of that rule would agree
|
|
60
|
+
until the day the list grew — then tell somebody to create a CNAME their
|
|
61
|
+
registrar refuses.
|
|
62
|
+
|
|
63
|
+
**Fixed: `check` claimed every service started from a Dockerfile.**
|
|
64
|
+
|
|
65
|
+
It printed "start · the Dockerfile's own CMD" for every non-static service,
|
|
66
|
+
because it asked whether the lane was `container` — and after the buildpack
|
|
67
|
+
lane was removed, `container` means all of them. So a repository with no
|
|
68
|
+
Dockerfile, whose start command is stated in the config in plain text, had that
|
|
69
|
+
command hidden by the one command whose job is to say what will run. It reads
|
|
70
|
+
the author's Dockerfile now.
|
|
71
|
+
|
|
72
|
+
**Fixed: `open` and `status` knew exactly one domain.**
|
|
73
|
+
|
|
74
|
+
Both built `https://<app>.supersonic.cv` in the published package — a URL that
|
|
75
|
+
survives a rebrand, ignores every attached domain, and can only be corrected by
|
|
76
|
+
a release. They ask the API for the app's own address.
|
|
77
|
+
|
|
3
78
|
## 0.12.1
|
|
4
79
|
|
|
5
80
|
**A ship now says who is shipping.**
|
package/LICENSE
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Bay
|
|
4
|
+
|
|
5
|
+
This directory is a deliberate exception to the repository's licence. Everything
|
|
6
|
+
else in github.com/thebaycloud/bay is AGPL-3.0-only; `packages/cli` is MIT.
|
|
7
|
+
|
|
8
|
+
The reason is that this is client software. It is installed globally, run by
|
|
9
|
+
coding agents inside other people's projects, and a copyleft licence on it would
|
|
10
|
+
make "we used the Bay CLI" a licensing question for every project it touches.
|
|
11
|
+
The platform is the thing the AGPL is protecting; the CLI is the thing we want
|
|
12
|
+
in as many toolchains as possible. It stays in this repository — and not in one
|
|
13
|
+
of its own — because `scripts/bundle-detector.mjs` and
|
|
14
|
+
`scripts/bundle-resolver.mjs` compile the control plane's own stack detector and
|
|
15
|
+
resolver into it at publish time, so the CLI and the server cannot disagree
|
|
16
|
+
about what a project is.
|
|
17
|
+
|
|
18
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
19
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
20
|
+
in the Software without restriction, including without limitation the rights
|
|
21
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
22
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
23
|
+
furnished to do so, subject to the following conditions:
|
|
24
|
+
|
|
25
|
+
The above copyright notice and this permission notice shall be included in all
|
|
26
|
+
copies or substantial portions of the Software.
|
|
27
|
+
|
|
28
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
29
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
30
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
31
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
32
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
33
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
34
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,32 +1,42 @@
|
|
|
1
1
|
# @thebaycloud/cli
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Ship anything to [Bay](https://thebay.cloud) in one command.
|
|
4
4
|
|
|
5
5
|
```bash
|
|
6
6
|
npm install -g @thebaycloud/cli
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
+
The command is `bay`. It also installs as `supersonic`, which is the name it had
|
|
10
|
+
before and which every existing script, CI job and agent prompt still says — that
|
|
11
|
+
alias is permanent, not deprecated.
|
|
12
|
+
|
|
9
13
|
## Usage
|
|
10
14
|
|
|
11
15
|
```bash
|
|
12
|
-
bay init # write a DRAFT
|
|
16
|
+
bay init # write a DRAFT supersonic.json from this repo
|
|
13
17
|
bay check # what each phase would run, and what would fail
|
|
14
|
-
bay login # authenticate (defaults to app.
|
|
15
|
-
bay
|
|
16
|
-
bay
|
|
18
|
+
bay login # authenticate (defaults to app.supersonic.cv)
|
|
19
|
+
bay ship # ship this folder — a live URL now, the build behind it
|
|
20
|
+
bay ship --github # or ship from your git origin / any public repo
|
|
17
21
|
bay whoami
|
|
18
22
|
bay logout
|
|
19
23
|
```
|
|
20
24
|
|
|
21
|
-
`bay
|
|
25
|
+
`bay ship --wait` streams the live build — clone → detect stack → build → run — and
|
|
26
|
+
prints the live URL when the app is actually serving it. `bay deploy` is the same
|
|
27
|
+
command under its older name and always will be.
|
|
28
|
+
|
|
29
|
+
Everything the dashboard does, this does: `bay share` (who can open it),
|
|
30
|
+
`bay domains` (a domain you own, and the DNS record to create), `bay db`,
|
|
31
|
+
`bay git` (branch + ship-on-push), `bay plan`, `bay tokens`. Run `bay help --all`.
|
|
22
32
|
|
|
23
|
-
## Before you
|
|
33
|
+
## Before you ship
|
|
24
34
|
|
|
25
35
|
`init` and `check` are local. No cloud, no build, no model, about two seconds each,
|
|
26
|
-
and they are the loop an agent authoring a `
|
|
27
|
-
the same loop through a real
|
|
36
|
+
and they are the loop an agent authoring a `supersonic.json` should be in — because
|
|
37
|
+
the same loop through a real ship is eleven minutes long.
|
|
28
38
|
|
|
29
|
-
`bay init` reads the repository and writes a **draft** `
|
|
39
|
+
`bay init` reads the repository and writes a **draft** `supersonic.json`: the
|
|
30
40
|
monorepo split, the install command from the lockfile, the build command and output
|
|
31
41
|
directory, the start command bound to `$PORT`, the runtime version the manifests ask
|
|
32
42
|
for, and the framework. Then it prints what it could not determine — which service
|
|
@@ -47,7 +57,14 @@ after the runner had moved to 3.14.
|
|
|
47
57
|
|
|
48
58
|
## Options
|
|
49
59
|
|
|
50
|
-
- `bay login --url <control-plane>` — point at a different control-plane (defaults to `https://app.
|
|
51
|
-
- `bay login --
|
|
60
|
+
- `bay login --url <control-plane>` — point at a different control-plane (defaults to `https://app.supersonic.cv`; also settable via `BAY_URL`).
|
|
61
|
+
- `bay login --token <t>` — for CI and headless agents. `BAY_TOKEN` in the environment does the same and overrides anything saved.
|
|
62
|
+
|
|
63
|
+
Your session is stored in `~/.bay/config.json`. An existing `~/.supersonic/config.json`
|
|
64
|
+
is still read, so an upgrade does not sign anybody out — and `SUPERSONIC_URL` /
|
|
65
|
+
`SUPERSONIC_TOKEN` are still honoured alongside the `BAY_` names.
|
|
52
66
|
|
|
53
|
-
|
|
67
|
+
What is deliberately NOT renamed: the config file is still `supersonic.json`, and the
|
|
68
|
+
`x-supersonic-*` headers, `SUPERSONIC_RUN` and `SUPERSONIC_CODE_*` are still what they
|
|
69
|
+
were. Those are read by the control plane, not typed by a person; they change when the
|
|
70
|
+
server changes, not before.
|