@bluestep-systems/b6p-cli 0.7.0 → 0.8.1
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 +92 -0
- package/README.md +39 -2
- package/dist/cli.js +250 -194
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,98 @@ All notable changes to `@bluestep-systems/b6p-cli` will be documented in this fi
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [0.8.1] — 2026-09-29
|
|
9
|
+
|
|
10
|
+
### Fixed
|
|
11
|
+
|
|
12
|
+
- **`b6p auth set` accepts a `b6pt_` platform access token again.** 0.8.0 refused any token starting
|
|
13
|
+
with `b6pt_` as a "gateway token", but that is the access token the CLI signs in with, so the
|
|
14
|
+
refusal blocked sign-in. The check is gone: `b6p auth set` and the first-use token question store
|
|
15
|
+
whatever token you enter, as in 0.7.0. (The 401 that led to the check came from an account that
|
|
16
|
+
had lost its access, not from the kind of token.)
|
|
17
|
+
|
|
18
|
+
## [0.8.0] — 2026-09-25
|
|
19
|
+
|
|
20
|
+
### Changed (breaking, user-visible)
|
|
21
|
+
|
|
22
|
+
- **`--yes` and an empty answer now decline overwrites and deletes.** Core 0.8.0 puts the safe
|
|
23
|
+
answer first in every prompt that overwrites or deletes something on the platform (`[Cancel] /
|
|
24
|
+
Overwrite all`, `[No] / Yes`), and `--yes` or pressing Enter takes that first answer. Before, `--yes`
|
|
25
|
+
overwrote files changed on the platform and deleted platform-only files without showing either
|
|
26
|
+
question. A script or agent that relies on `--yes` now gets exit `1` where it used to overwrite
|
|
27
|
+
(with the command that confirms the files), and keeps platform-only files where it used to delete
|
|
28
|
+
them (exit `0`). The old per-file answer `Overwrite` no longer matches the question, so it declines
|
|
29
|
+
too; the answer is now `Overwrite all`.
|
|
30
|
+
- **`--yes` now prints every question it answers**, with the options and the answer it took, on
|
|
31
|
+
stderr (also with `--json`). A destructive prompt says `--yes` never confirms an overwrite or a
|
|
32
|
+
delete.
|
|
33
|
+
|
|
34
|
+
### Added
|
|
35
|
+
|
|
36
|
+
- **`b6p push --overwrite <path>`** (repeatable) confirms overwriting that file on the platform up
|
|
37
|
+
front, so a push that `--yes` would stop can go through for exactly the files you checked. The
|
|
38
|
+
path is the one the overwrite question lists (e.g. `scripts/app.ts`).
|
|
39
|
+
- **A declined overwrite now says how to go on**: after core's message (which files, and why), the
|
|
40
|
+
CLI prints the command that repeats the push with one `--overwrite` per file. A push that kept
|
|
41
|
+
platform-only files prints the command that deletes them (without `--yes`, answering `Yes`). Both
|
|
42
|
+
are quoted for your shell: POSIX, or PowerShell on Windows outside Git Bash / MSYS.
|
|
43
|
+
- **`--json` for a declined overwrite.** The push used to print nothing on stdout; it now prints the
|
|
44
|
+
same object as any push, with `pushed: false` and the files in a new `declinedOverwrites` field
|
|
45
|
+
(`[]` on every other push), and exits `1`.
|
|
46
|
+
- **`b6p auth set` refuses a gateway token.** A value starting with `b6pt_` is the token for the
|
|
47
|
+
BlueStep AI tools, not the CLI; storing it made every later call fail with `HTTP Error: 401`. It is
|
|
48
|
+
now refused with a message saying so, and nothing is stored (exit `1`). The same check runs on the
|
|
49
|
+
token question any command asks on first use.
|
|
50
|
+
- **`b6p --help` and `b6p push --help`** say what `--yes` answers, the two questions a push can
|
|
51
|
+
ask, `--overwrite`, piping answers, the exit codes and the `--json` shape.
|
|
52
|
+
|
|
53
|
+
### Changed
|
|
54
|
+
|
|
55
|
+
- **One overwrite question per push, before anything is uploaded.** Core 0.8.0 lists every file
|
|
56
|
+
that would overwrite a platform change in a single `[Cancel] / Overwrite all` question, so a
|
|
57
|
+
declined or unanswered question can no longer leave a push half done. New files and files already
|
|
58
|
+
equal to the platform copy no longer ask.
|
|
59
|
+
- **Bundles `@bluestep-systems/b6p-core` 0.8.0.** A snapshot push now checks, before uploading
|
|
60
|
+
anything, that the compiled `scripts/app.js` exists and has code; checks every upload to
|
|
61
|
+
`snapshot/`; and reads each live copy back afterwards, sending it again once if it doesn't match.
|
|
62
|
+
A re-push also repairs a live copy left stale by an earlier failed push, even when nothing changed
|
|
63
|
+
locally.
|
|
64
|
+
|
|
65
|
+
### Fixed
|
|
66
|
+
|
|
67
|
+
- **`b6p push --snapshot` no longer exits `0` when the live version is broken.** It exits `1` when
|
|
68
|
+
nothing was uploaded (`pushed: false`, e.g. a blank or types-only `app.ts`) and when a live copy
|
|
69
|
+
is still missing, unreadable or different after the re-send (`liveVerified: false`, with the files
|
|
70
|
+
in `liveMismatches`). `--json` prints the new fields (`liveVerified`, `liveMismatches`,
|
|
71
|
+
`keptPlatformOnly`). A copy served without a content hash can't
|
|
72
|
+
be compared (`liveVerified: null`): that prints a warning on stderr and still exits `0`.
|
|
73
|
+
- **A refused upload prints its details once**, not a second time after `[ERROR] Failed to push …`.
|
|
74
|
+
- **Piped answers reach every prompt, not only the first.** When stdin delivers every line at once
|
|
75
|
+
(`printf 'Overwrite all\nYes\n' | b6p push …`, or `< answers.txt`), the second line used to arrive
|
|
76
|
+
while no prompt was waiting and was lost, so the second prompt failed with "No input available".
|
|
77
|
+
Each line now answers the next prompt. On a non-terminal stdin the answer is written after its
|
|
78
|
+
prompt, so the output shows what was answered (never for a token).
|
|
79
|
+
- **An answer that matches none of a prompt's options now says so** (`"Overwrite" is not one of the
|
|
80
|
+
answers (Cancel, Overwrite all), so none was chosen.`) instead of declining silently.
|
|
81
|
+
|
|
82
|
+
## [0.7.0] — 2026-08-24
|
|
83
|
+
|
|
84
|
+
Entry added on 2026-09-25: this release shipped without one.
|
|
85
|
+
|
|
86
|
+
### Changed
|
|
87
|
+
|
|
88
|
+
- **Bundles `@bluestep-systems/b6p-core` 0.7.0.** The type-check a snapshot push runs before
|
|
89
|
+
publishing now loads the component's declaration files, so platform globals (`B`, `console`,
|
|
90
|
+
`Bluestep`, `Record_*`, …) no longer come back as hundreds of false `Cannot find name`
|
|
91
|
+
diagnostics. What remains is real.
|
|
92
|
+
|
|
93
|
+
### Fixed
|
|
94
|
+
|
|
95
|
+
- **`b6p push --snapshot` exits `1` when the type-check reported diagnostics.** The platform runs
|
|
96
|
+
the emitted JavaScript without type-checking it, so this push is the only type gate; CI can now
|
|
97
|
+
catch a publish that went out un-type-checked. A plain push (no compile) and a clean snapshot
|
|
98
|
+
still exit `0`. Client-bundle diagnostics (e.g. a merge report's `static/`) stay advisory.
|
|
99
|
+
|
|
8
100
|
## [0.6.1] — 2026-08-21
|
|
9
101
|
|
|
10
102
|
### Changed
|
package/README.md
CHANGED
|
@@ -67,14 +67,51 @@ The npm install above is unchanged and remains the recommended path wherever Nod
|
|
|
67
67
|
| `b6p pull --file <path>` | Pull using metadata stored with a local file |
|
|
68
68
|
| `b6p push --file <path>` | Push local files to the platform |
|
|
69
69
|
| `b6p push --file <path> --snapshot --message "…"` | Push and record a versioned snapshot |
|
|
70
|
+
| `b6p push --file <path> --overwrite <file>` | Push, overwriting a file that changed on the platform |
|
|
70
71
|
| `b6p audit --file <path>` | Diff local vs. server |
|
|
71
72
|
| `b6p audit --file <path> --pull` | Audit and pull if differences found |
|
|
72
73
|
| `b6p deploy <config.json>` | Multi-target deploy from a config file |
|
|
73
74
|
| `b6p setup --file <path>` | Print the web-UI setup URL for a script |
|
|
74
75
|
| `b6p report` | Report cached state |
|
|
76
|
+
| `b6p auth set` | Store or replace your platform access token (`b6pt_…`) |
|
|
75
77
|
|
|
76
|
-
Most commands accept `--json` for machine-readable output and `--yes` to
|
|
77
|
-
|
|
78
|
+
Most commands accept `--json` for machine-readable output and `--yes` to answer every question with
|
|
79
|
+
its default (and print what it answered). Run `b6p <command> --help` for full options.
|
|
80
|
+
|
|
81
|
+
## Pushing
|
|
82
|
+
|
|
83
|
+
A push can ask two questions. Both default to the safe answer, which `--yes` and an empty answer
|
|
84
|
+
take, so `--yes` never overwrites or deletes anything on the platform:
|
|
85
|
+
|
|
86
|
+
1. **Before uploading anything**, when files would overwrite a platform version nobody here has seen
|
|
87
|
+
(it changed on the platform since your last push or pull, or this machine never synced it):
|
|
88
|
+
`[Cancel] / Overwrite all`. One question lists every such file; Cancel stops the push with nothing
|
|
89
|
+
uploaded (exit `1`). New files and files already equal to the platform copy never ask.
|
|
90
|
+
2. **After uploading**, when the platform has files your draft doesn't: `[No] / Yes` to delete them.
|
|
91
|
+
No keeps them (exit `0`).
|
|
92
|
+
|
|
93
|
+
When question 1 is declined, the CLI prints the command that confirms it. After checking the
|
|
94
|
+
platform versions (`b6p audit`), confirm specific files up front with `--overwrite`, once per file,
|
|
95
|
+
using the path the question listed:
|
|
96
|
+
|
|
97
|
+
```bash
|
|
98
|
+
b6p --yes push --file <path> --snapshot --overwrite scripts/app.ts --overwrite README.md
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
Question 2 has no flag: run without `--yes` and answer `Yes`. Answers can be piped, one line per
|
|
102
|
+
question, in order (`printf 'Overwrite all\nYes\n' | b6p push --file <path>`, or `< answers.txt`;
|
|
103
|
+
in PowerShell, `'Overwrite all', 'Yes' | b6p push --file <path>`). The commands the CLI prints are
|
|
104
|
+
written for your shell: POSIX, or PowerShell on Windows outside Git Bash.
|
|
105
|
+
|
|
106
|
+
**Exit codes:** `0` when the push went through (keeping platform-only files is still `0`); `1` when
|
|
107
|
+
nothing was uploaded, an overwrite was not confirmed, an upload was refused, or, on a snapshot, a
|
|
108
|
+
live copy is still wrong after one re-send, the history entry wasn't recorded, or type-check
|
|
109
|
+
diagnostics were reported.
|
|
110
|
+
|
|
111
|
+
**`--json`** prints one object on stdout: `pushed`, `historyRecorded`, `typeCheckDiagnostics`,
|
|
112
|
+
`liveVerified`, `liveMismatches`, `keptPlatformOnly`, `declinedOverwrites`. A declined overwrite
|
|
113
|
+
prints `pushed: false` with the files in `declinedOverwrites`. Questions, warnings and next steps
|
|
114
|
+
go to stderr.
|
|
78
115
|
|
|
79
116
|
## WebDAV URL format
|
|
80
117
|
|