@farthershore/cli 0.37.0 → 0.38.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 +39 -0
- package/README.md +52 -21
- package/dist/index.js +192 -142
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,45 @@ breaking changes. Releases before 0.35.0 are recorded only in the git history.
|
|
|
6
6
|
|
|
7
7
|
## [Unreleased]
|
|
8
8
|
|
|
9
|
+
## [0.38.0] - 2026-10-14
|
|
10
|
+
|
|
11
|
+
### Changed
|
|
12
|
+
|
|
13
|
+
- **Breaking:** `validate` runs the server check by default; `--business` is
|
|
14
|
+
no longer required. It finds the business from `--business`, then
|
|
15
|
+
`FARTHERSHORE_BUSINESS` or the directory link (`farthershore link`, with its
|
|
16
|
+
environment), then the repository's `origin` remote matched against each
|
|
17
|
+
business's connected repository. When the server check can't run
|
|
18
|
+
(`--local-only`, not logged in, an expired login, or no business found) the
|
|
19
|
+
local build and determinism check still run and the output says the server
|
|
20
|
+
check was skipped, why, and how to turn it on
|
|
21
|
+
(`data.serverCheck.checked: "skipped"`). Only the compiled business
|
|
22
|
+
definition and `docs/` files are sent; `business/` source never leaves the
|
|
23
|
+
machine, and `--local-only` sends nothing. A one-line notice is printed the
|
|
24
|
+
first time a server check runs.
|
|
25
|
+
- **Breaking:** `validate` reports a **Business SDK** section and a **Docs**
|
|
26
|
+
section, laid out like the pull request comments, with one issue shape
|
|
27
|
+
(`{ code, message, file?, line?, column?, path? }`). JSON output carries
|
|
28
|
+
`businessSdk` and `docs`, each with `issues`, `checked` (`local`, `server`
|
|
29
|
+
or `skipped`) and a `reason` when skipped: in `data` on success, in
|
|
30
|
+
`error.details` on failure. Any problem in either section exits 2,
|
|
31
|
+
non-determinism included; a build that cannot run at all still exits 1.
|
|
32
|
+
- The "Not authenticated" error carries the code `AUTH_REQUIRED`.
|
|
33
|
+
- `promo-code update` sends only the flags you pass; omitted terms (cap,
|
|
34
|
+
expiry, plans, discount) are kept. It no longer requires the full spec
|
|
35
|
+
(`--kind`, `--duration-months`) for a partial edit.
|
|
36
|
+
|
|
37
|
+
### Added
|
|
38
|
+
|
|
39
|
+
- `validate` checks `docs/` on the server: it sends `docs/_index.yaml` and
|
|
40
|
+
every `docs/**/*.mdx` (the same set the pull request check reads) and lists
|
|
41
|
+
the result under **Docs**. A broken `business/` program doesn't stop the
|
|
42
|
+
docs check. Docs-only problems exit 2 with `DOCS_VALIDATION_FAILED`; no
|
|
43
|
+
`docs/` folder reports Docs as skipped. Requests over 500 files, 1 MB per
|
|
44
|
+
file or 10 MB in total are reported locally (`DOCS_TOO_MANY_FILES`,
|
|
45
|
+
`DOCS_FILE_TOO_LARGE`, `DOCS_TOO_LARGE`) and not sent. A busy check is
|
|
46
|
+
retried after `Retry-After`, then reported as `DOCS_CHECK_BUSY` (exit 5).
|
|
47
|
+
|
|
9
48
|
## [0.37.0] - 2026-10-14
|
|
10
49
|
|
|
11
50
|
### Changed
|
package/README.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Create and operate [FartherShore](https://farthershore.com) software businesses
|
|
4
4
|
from the terminal.
|
|
5
5
|
|
|
6
|
-
**Status: `0.
|
|
6
|
+
**Status: `0.38.0`.** Pre-1.0 — the command surface is stable but may still
|
|
7
7
|
change between minor versions. Pin an exact version in CI.
|
|
8
8
|
|
|
9
9
|
FartherShore lets you define a software business as code, then sells, meters,
|
|
@@ -20,13 +20,13 @@ takes `--format json` for non-interactive scripting.
|
|
|
20
20
|
## Install
|
|
21
21
|
|
|
22
22
|
```bash
|
|
23
|
-
npm install -g @farthershore/cli@0.
|
|
23
|
+
npm install -g @farthershore/cli@0.38.0
|
|
24
24
|
```
|
|
25
25
|
|
|
26
26
|
Or run it directly with npx:
|
|
27
27
|
|
|
28
28
|
```bash
|
|
29
|
-
npx -p @farthershore/cli@0.
|
|
29
|
+
npx -p @farthershore/cli@0.38.0 farthershore --help
|
|
30
30
|
```
|
|
31
31
|
|
|
32
32
|
## Authentication
|
|
@@ -89,7 +89,7 @@ cd weather-api
|
|
|
89
89
|
# ...author business/ with @farthershore/business...
|
|
90
90
|
|
|
91
91
|
# 3. Validate the same way the PR check will, before pushing
|
|
92
|
-
farthershore validate
|
|
92
|
+
farthershore validate
|
|
93
93
|
|
|
94
94
|
# 4. Push — the GitHub bot validates and records apply state
|
|
95
95
|
git push --set-upstream origin feature/pricing
|
|
@@ -168,14 +168,14 @@ anchors. Paths come from the published docs index, not your working directory.
|
|
|
168
168
|
|
|
169
169
|
```bash
|
|
170
170
|
farthershore docs ls --format json
|
|
171
|
-
farthershore docs ls
|
|
172
|
-
farthershore docs tree
|
|
173
|
-
farthershore docs ls
|
|
174
|
-
farthershore docs read
|
|
175
|
-
farthershore docs ls
|
|
171
|
+
farthershore docs ls sdks --format json
|
|
172
|
+
farthershore docs tree sdks --format json
|
|
173
|
+
farthershore docs ls sdks/connect-your-application --format json
|
|
174
|
+
farthershore docs read sdks/connect-your-application/metering --format json
|
|
175
|
+
farthershore docs ls sdks/connect-your-application/metering --format json
|
|
176
176
|
farthershore docs read backend/metering --section "choose-the-correct-metering-channel" --format json
|
|
177
|
-
farthershore docs search "runtime token" --collection
|
|
178
|
-
farthershore docs collection
|
|
177
|
+
farthershore docs search "runtime token" --collection sdks --limit 10 --format json
|
|
178
|
+
farthershore docs collection sdks --format json
|
|
179
179
|
```
|
|
180
180
|
|
|
181
181
|
Use an anchor returned by `docs ls <page>` for `--section`. `read` also accepts the canonical slug or an
|
|
@@ -235,15 +235,46 @@ farthershore build --format json
|
|
|
235
235
|
### `farthershore validate`
|
|
236
236
|
|
|
237
237
|
Run the same verdict the GitHub `farthershore/validate` PR check produces, before
|
|
238
|
-
you push. It builds
|
|
239
|
-
check the
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
238
|
+
you push. It builds `business/` on your machine twice and checks that both
|
|
239
|
+
builds match (the determinism check the PR check enforces). It then sends the
|
|
240
|
+
compiled business definition and your docs to the server, which checks them
|
|
241
|
+
with the newest checks and returns the PR check's verdict: problems, the change
|
|
242
|
+
summary, and whether the change is economic. Validation never accepts or
|
|
243
|
+
publishes anything, so it is safe to repeat.
|
|
244
|
+
|
|
245
|
+
What leaves your machine: only the compiled business definition (the output
|
|
246
|
+
of the local build) and your docs files (`docs/_index.yaml` and the `.mdx`
|
|
247
|
+
pages under `docs/`). Your `business/` source code never leaves it.
|
|
248
|
+
`--local-only` sends nothing. Without a `docs/` folder, nothing is sent for
|
|
249
|
+
docs. Docs over the size the check accepts (500 files, 1,000,000 bytes per file,
|
|
250
|
+
10,000,000 bytes in all) are reported as a Docs problem without being sent.
|
|
251
|
+
|
|
252
|
+
The server check runs by default against this repo's business: `--business`,
|
|
253
|
+
else `FARTHERSHORE_BUSINESS`, else the directory link (`farthershore link`),
|
|
254
|
+
else the business connected to the repo's GitHub `origin` remote. When none of
|
|
255
|
+
those resolves, or you are not logged in, the local checks still run and the
|
|
256
|
+
output says the server check was skipped and how to turn it on.
|
|
257
|
+
|
|
258
|
+
The output has the PR check's two sections, **Business SDK** and **Docs**,
|
|
259
|
+
each listing problems the way its PR comment does. Every problem has the same
|
|
260
|
+
fields as the comment's JSON: `code`, `message`, and where known `file`,
|
|
261
|
+
`line`, `column` and `path` (the location in the business definition). With
|
|
262
|
+
`--format json` they are in `data.businessSdk` / `data.docs` (or
|
|
263
|
+
`error.details.businessSdk` / `error.details.docs` when there are problems),
|
|
264
|
+
each `{ issues, checked }`, where `checked` is `local`, `server` or `skipped`.
|
|
265
|
+
Any problem in either section exits 2, whether the local build or the server
|
|
266
|
+
found it.
|
|
267
|
+
|
|
268
|
+
The docs check can also return warnings and info notes. They never fail
|
|
269
|
+
`farthershore validate`: the Docs section lists them after the problems,
|
|
270
|
+
labelled `Warning:` or `Info:`, and a run with only notes exits 0. In JSON they
|
|
271
|
+
are in the same `issues` list, after the problems, each with a `severity` of
|
|
272
|
+
`warning` or `info`; an issue without a `severity` is a problem. A build that could not run at all (for example, `business/`
|
|
273
|
+
dependencies not installed) exits 1.
|
|
243
274
|
|
|
244
275
|
```bash
|
|
245
|
-
farthershore validate
|
|
246
|
-
farthershore validate --business weather-api
|
|
276
|
+
farthershore validate # local build + server check
|
|
277
|
+
farthershore validate --business weather-api # check against a named business
|
|
247
278
|
farthershore validate --local-only --format json
|
|
248
279
|
```
|
|
249
280
|
|
|
@@ -772,18 +803,18 @@ Use `--all-plans` to clear plan scoping.
|
|
|
772
803
|
Install or refresh the platform-verified skills bundle together. The platform
|
|
773
804
|
pins this immutable release, and CI plus a daily repository check compare it to
|
|
774
805
|
GitHub's latest stable release so the guidance cannot silently drift.
|
|
775
|
-
This command requires `@farthershore/cli` 0.
|
|
806
|
+
This command requires `@farthershore/cli` 0.38.0 or newer.
|
|
776
807
|
|
|
777
808
|
```bash
|
|
778
809
|
set -euo pipefail
|
|
779
810
|
CLI_VERSION=$(farthershore --version)
|
|
780
|
-
printf '%s' "$CLI_VERSION" | node -e 'let v=""; process.stdin.on("data", c => v += c).on("end", () => { const m = /^(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)(?:\+[0-9A-Za-z.-]+)?$/.exec(v.trim()); if (!m || !(+m[1] > 0 || +m[2] >
|
|
811
|
+
printf '%s' "$CLI_VERSION" | node -e 'let v=""; process.stdin.on("data", c => v += c).on("end", () => { const m = /^(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)(?:\+[0-9A-Za-z.-]+)?$/.exec(v.trim()); if (!m || !(+m[1] > 0 || +m[2] > 38 || (+m[2] === 38 && +m[3] >= 0))) { console.error("Stop: CLI 0.38.0 or newer is required; ask the human to upgrade."); process.exitCode = 1; } })'
|
|
781
812
|
farthershore skills install --help
|
|
782
813
|
farthershore skills install
|
|
783
814
|
```
|
|
784
815
|
|
|
785
816
|
If either prerequisite fails, stop and ask the human to run
|
|
786
|
-
`npm install -g @farthershore/cli@0.
|
|
817
|
+
`npm install -g @farthershore/cli@0.38.0`, then repeat the checks.
|
|
787
818
|
Do not install or upgrade global tooling autonomously.
|
|
788
819
|
|
|
789
820
|
The Farther Shore CLI downloads the exact installer archive and verifies this
|