@bluestep-systems/b6p-cli 0.3.1 → 0.6.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 +120 -0
- package/README.md +0 -1
- package/dist/cli.js +293 -175
- package/dist/lib/lib.esnext.float16.d.ts +0 -2
- package/package.json +8 -11
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,126 @@ 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.6.0] — 2026-08-21
|
|
9
|
+
|
|
10
|
+
### Changed (breaking, user-visible)
|
|
11
|
+
|
|
12
|
+
- **Authentication now uses an access token instead of a username and password.** This comes from
|
|
13
|
+
`b6p-core` 0.5.0 replacing basic auth with bearer auth, and **there is no migration path by
|
|
14
|
+
construction** — a token cannot be derived from a stored username and password. On first use
|
|
15
|
+
after upgrading you will be asked for an access token; run `b6p auth set` to store one up front.
|
|
16
|
+
`b6p auth clear` also purges the obsolete stored credentials.
|
|
17
|
+
|
|
18
|
+
### Fixed
|
|
19
|
+
|
|
20
|
+
- **A prompt that cannot be answered no longer exits `0` having done nothing.** `readline`'s
|
|
21
|
+
`question()` promise never settles once stdin has ended, so the event loop drained and the process
|
|
22
|
+
exited **successfully** from a command that did nothing. Combined with the auth change above, the
|
|
23
|
+
first non-interactive run after upgrading would have printed `Enter your access token:` and exited
|
|
24
|
+
`0` without pulling anything. `CliPrompt` now detects end-of-input and fails with an actionable
|
|
25
|
+
message (exit `1`), and remembers that stdin is spent so a later prompt reports the same thing
|
|
26
|
+
rather than readline's internal `readline was closed`. That second half is
|
|
27
|
+
[ClickUp 86bb8f6v0](https://app.clickup.com/t/86bb8f6v0): a push reaching a *second* "upstairs file
|
|
28
|
+
changed" prompt with one piped answer died on that internal error mid-push.
|
|
29
|
+
|
|
30
|
+
An answer that *is* available always wins: piped input ends in the same turn its bytes arrive, so
|
|
31
|
+
the end-of-input check is deferred one macrotask — `echo Sync | b6p ...` still works. Covered by
|
|
32
|
+
`test/CliPrompt.test.ts`, whose cases fail (hang, then time out) against the old implementation.
|
|
33
|
+
|
|
34
|
+
The rest come from bumping `@bluestep-systems/b6p-core` `^0.5.0` → `^0.6.0`, which carries two
|
|
35
|
+
fixes reported through the feedback pipeline plus a safety change. All three are core-side
|
|
36
|
+
behaviour changes; the CLI's role is to surface them.
|
|
37
|
+
|
|
38
|
+
- **`b6p pull` no longer overwrites a locally-edited file it has previously synced** (ClickUp
|
|
39
|
+
86bbdr4r0). A file whose content differs from both the platform copy and the last-synced hash is
|
|
40
|
+
kept, and every kept file is listed in one warning at the end of the pull. Downloads are also
|
|
41
|
+
atomic now, so an interrupted pull can no longer leave a truncated file behind — and the ETag
|
|
42
|
+
integrity check runs before the write rather than after it.
|
|
43
|
+
- **`b6p push --snapshot` no longer prints "Snapshot complete!" when the snapshot history was not
|
|
44
|
+
recorded** (ClickUp 86bbed9wu). The history mutation is retried when the platform rejects it with
|
|
45
|
+
the post-upload "version mismatch" (which is what made the *second* consecutive snapshot push to a
|
|
46
|
+
component lose its restore point); if it still fails, the push says so explicitly.
|
|
47
|
+
- **`b6p audit --pull` no longer authorizes overwrites non-interactively.** Its "Sync?" confirmation
|
|
48
|
+
now defaults to *Cancel*, so `--yes` declines rather than overwriting locally-edited files, and a
|
|
49
|
+
real confirmation only force-overwrites the files it actually listed. To take the platform copy
|
|
50
|
+
non-interactively, delete the file and pull.
|
|
51
|
+
|
|
52
|
+
### Added
|
|
53
|
+
|
|
54
|
+
- **`--json` output for `push` and `pull`,** and a non-zero exit code for a push that did not do what
|
|
55
|
+
was asked. `push` emits core's `PushResult` (`{ pushed, historyRecorded }`) and exits `1` when
|
|
56
|
+
`pushed` is false (bad `--root`, empty draft — previously a typo could mark a CI deploy green) or
|
|
57
|
+
when a snapshot shipped without its history entry. `pull` emits `PullResult`
|
|
58
|
+
(`{ keptLocalPaths }`), which is reporting only: keeping a locally-edited file is the guard working
|
|
59
|
+
as designed, so it stays exit `0` rather than failing every pull in a tree with local edits.
|
|
60
|
+
|
|
61
|
+
## [0.5.0] — 2026-08-12
|
|
62
|
+
|
|
63
|
+
### Changed
|
|
64
|
+
|
|
65
|
+
- **Breaking (internal API only — no user-visible CLI change).** Bumped `@bluestep-systems/b6p-core`
|
|
66
|
+
`^0.4.0` → `^0.5.0` and migrated to its reshaped surface. Every command, flag, argument, and output
|
|
67
|
+
format is unchanged; this release is a re-addressing of the same operations.
|
|
68
|
+
- Script-tree operations moved off `B6PCore` onto a `ScriptService` reached as `core.script`:
|
|
69
|
+
`push`, `pushCurrent`, `pull`, `pullCurrent`, `audit`, `auditPull`, `deploy`, `deriveWorkspacePath`
|
|
70
|
+
and `getSetupUrl` are now `core.script.*`. Signatures are byte-identical. Account-level operations
|
|
71
|
+
(`updateCredentials`, `report`, `setConfig`, `checkForUpdates`) stay on `core`.
|
|
72
|
+
- Core's provider interfaces dropped their Hungarian `I` prefix: `IFileSystem` → `FileSystem`,
|
|
73
|
+
`IPersistence` → `Persistence`, `IPrompt` → `Prompt`, `ILogger` → `Logger`, `IProgress` → `Progress`,
|
|
74
|
+
`ILockDiagnoser` → `LockDiagnoser`. The five providers in [src/providers/](src/providers/) and
|
|
75
|
+
`WindowsRestartManagerLockDiagnoser` were updated to match.
|
|
76
|
+
- Upgraded the type-checker to **TypeScript 7** (`^5.9.2` → `^7.0.2`), and set `types: ["node"]`
|
|
77
|
+
explicitly in `tsconfig.json` — TS 7 no longer pulls every `node_modules/@types` package into global
|
|
78
|
+
scope, so `process`, `__dirname` and the `node:` builtins must be requested by name.
|
|
79
|
+
- Bumped `prettier` → `^3.9.6` and `@types/node` → `^22.20.1`.
|
|
80
|
+
|
|
81
|
+
### Fixed
|
|
82
|
+
|
|
83
|
+
- `esbuild.js`'s `copy-ts-libs` plugin now resolves `typescript` **from b6p-core's directory** instead of
|
|
84
|
+
the repo root, so the `lib.*.d.ts` shipped to `dist/lib/` always match the compiler that reads them.
|
|
85
|
+
Core pins `typescript` at exactly `5.9.2` as a runtime dependency (its `ScriptTranspiler` compiles
|
|
86
|
+
snapshot pushes) and npm cannot dedupe that against this package's TS 7, so the bundled compiler and
|
|
87
|
+
the root `tsc` are deliberately different majors. Without this change the TypeScript 7 upgrade would
|
|
88
|
+
have broken the build outright: TS 7 ships **no** `lib.*.d.ts` files at all (the Go port embeds them),
|
|
89
|
+
so the old root-resolved lookup would have found zero libs and thrown `copy-ts-libs: no lib.*.d.ts
|
|
90
|
+
found`. `scripts/build-sea.mjs` reads `dist/lib/` and inherits the fix.
|
|
91
|
+
|
|
92
|
+
### Removed
|
|
93
|
+
|
|
94
|
+
- **ESLint and `typescript-eslint`**, along with `eslint.config.mjs`, the `npm run lint` script, and the
|
|
95
|
+
lint steps in [ci.yml](.github/workflows/ci.yml) / [publish.yml](.github/workflows/publish.yml).
|
|
96
|
+
`typescript-eslint` 8.67 (current stable) declares `typescript: ">=4.8.4 <6.1.0"`, so it cannot run
|
|
97
|
+
against TypeScript 7. `npm run check-types`, `npm run format-check` and `npm test` are now the static
|
|
98
|
+
gates. Note that the project's no-`any` rule is consequently no longer machine-enforced — see
|
|
99
|
+
[AGENTS.md](AGENTS.md). Linting should be restored when `typescript-eslint` supports TS 7.
|
|
100
|
+
|
|
101
|
+
## [0.4.0] — 2026-07-23
|
|
102
|
+
|
|
103
|
+
### Added
|
|
104
|
+
|
|
105
|
+
- Windows lock diagnostics on shared-state writes. When a write to `~/.b6p/state.json` or
|
|
106
|
+
`secrets.enc` fails a `rename` on Windows after core's bounded retries, the thrown error now names
|
|
107
|
+
the user-mode processes holding the file — e.g. `… — locked by Code.exe (1234), OneDrive.exe (5678)`
|
|
108
|
+
— so you can close the offending program and retry. Implemented by a new
|
|
109
|
+
`WindowsRestartManagerLockDiagnoser` (`src/lockDiagnoser/`) that queries the Windows Restart
|
|
110
|
+
Manager via a bundled PowerShell script and is injected into the core's `SharedFilePersistence`.
|
|
111
|
+
Best-effort and a no-op off Windows: it never throws and returns no holders when it can't determine
|
|
112
|
+
them. A kernel filesystem minifilter (real-time AV / ransomware protection such as Sophos
|
|
113
|
+
CryptoGuard) holds no user-mode handle, so it is invisible to this probe by design — in that case
|
|
114
|
+
the empty result degrades to core's minifilter hint rather than a process list.
|
|
115
|
+
|
|
116
|
+
### Changed
|
|
117
|
+
|
|
118
|
+
- Bumped `@bluestep-systems/b6p-core` `^0.3.1` → `^0.4.0`, which adds the injectable `ILockDiagnoser`
|
|
119
|
+
the diagnoser above plugs into, plus Windows `rename` lock-error retries and pull write coalescing
|
|
120
|
+
([core #8](https://github.com/Bluestep-Systems/b6p-core/issues/8)).
|
|
121
|
+
|
|
122
|
+
### Internal
|
|
123
|
+
|
|
124
|
+
- Added a unit-test setup: `npm test` bundles `test/**/*.test.ts` to `dist-test/` via `esbuild.test.js`
|
|
125
|
+
and runs them with `node --test` (runnable on the whole CI Node 18/20/22 matrix). CI now runs the
|
|
126
|
+
tests between compile and the smoke run.
|
|
127
|
+
|
|
8
128
|
## [0.3.1] — 2026-07-21
|
|
9
129
|
|
|
10
130
|
### Changed
|
package/README.md
CHANGED
|
@@ -90,7 +90,6 @@ metadata — pass `--file <path>` instead of re-typing the URL.
|
|
|
90
90
|
```bash
|
|
91
91
|
npm install
|
|
92
92
|
npm run check-types # tsc --noEmit
|
|
93
|
-
npm run lint # eslint
|
|
94
93
|
npm run compile # esbuild → dist/cli.js (self-contained bundle)
|
|
95
94
|
npm run watch # esbuild --watch
|
|
96
95
|
npm run format # prettier --write
|