@wirecat/cli-core 0.689.0 → 0.690.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
|
@@ -5,6 +5,15 @@ Notable changes to `@wirecat/cli-core` (`@wirecat/cli-messaging` up to 0.261.0,
|
|
|
5
5
|
minor version may break callers, and says how under "Changed — may break callers". `pnpm docs:check` checks the
|
|
6
6
|
shape of this file.
|
|
7
7
|
|
|
8
|
+
## 0.690.0 — 17.11.2026
|
|
9
|
+
|
|
10
|
+
### Fixed
|
|
11
|
+
|
|
12
|
+
- **A chosen folder moved on a path-addressed provider comes back once it is added again under its new path.**
|
|
13
|
+
`documentLibraryCommands` read the folder's old path from the last sync before the one `folders add` had just read,
|
|
14
|
+
so the folder stayed unavailable for good. `folders add` now keeps a chosen folder's new metadata (without changing
|
|
15
|
+
its date), and that copy wins.
|
|
16
|
+
|
|
8
17
|
## 0.689.0 — 17.11.2026
|
|
9
18
|
|
|
10
19
|
### Added
|
|
@@ -82,6 +82,8 @@ export declare const documentProfile: <M extends SourceFile>(app: AppIdentity, e
|
|
|
82
82
|
dir: string;
|
|
83
83
|
folders: () => Folders<M>;
|
|
84
84
|
saveFolders: (roots: string[], files: Record<string, M>) => void;
|
|
85
|
+
/** Keeps a chosen folder's newer metadata (a new path) without changing the choice or its date. */
|
|
86
|
+
saveFolderFile: (file: M) => void;
|
|
85
87
|
state: (principal: string) => SourceStatePort<M>;
|
|
86
88
|
synced: () => boolean;
|
|
87
89
|
walkUnderWay: () => boolean;
|
|
@@ -77,6 +77,11 @@ export const documentProfile = (app, env, profile) => {
|
|
|
77
77
|
files: Object.fromEntries(roots.flatMap((id) => (files[id] ? [[id, files[id]]] : []))),
|
|
78
78
|
changed_at: new Date().toISOString(),
|
|
79
79
|
}),
|
|
80
|
+
/** Keeps a chosen folder's newer metadata (a new path) without changing the choice or its date. */
|
|
81
|
+
saveFolderFile: (file) => {
|
|
82
|
+
const chosen = folders();
|
|
83
|
+
writeJson(join(dir, "folders.json"), { ...chosen, files: { ...chosen.files, [file.id]: file } });
|
|
84
|
+
},
|
|
80
85
|
state,
|
|
81
86
|
synced: () => existsSync(join(sync, "state.json")),
|
|
82
87
|
walkUnderWay: () => existsSync(join(sync, "walk.json")),
|
|
@@ -200,7 +205,9 @@ export const documentLibraryCommands = (options) => {
|
|
|
200
205
|
// The folder as `folders add` read it stands in for the one the last pass held, before the first sync.
|
|
201
206
|
const known = (source) => {
|
|
202
207
|
const chosen = files().folders().files ?? {};
|
|
203
|
-
|
|
208
|
+
// The folder as `folders add` last read it wins over the walk's copy: adding a moved folder again under its new
|
|
209
|
+
// path is how a path-addressed source finds it.
|
|
210
|
+
const metadata = (id, held) => source.metadata(id, chosen[id] ?? held);
|
|
204
211
|
// A proxy, not a spread: a source written as a class keeps its methods and private fields.
|
|
205
212
|
return new Proxy(source, {
|
|
206
213
|
get: (target, name) => {
|
|
@@ -284,6 +291,8 @@ export const documentLibraryCommands = (options) => {
|
|
|
284
291
|
// A folder already chosen keeps its date, so status does not report a new plan for it.
|
|
285
292
|
if (!chosen.roots.includes(file.id))
|
|
286
293
|
files().saveFolders([...chosen.roots, file.id], { ...chosen.files, [file.id]: file });
|
|
294
|
+
else
|
|
295
|
+
files().saveFolderFile(file);
|
|
287
296
|
return { id: file.id, name: file.name };
|
|
288
297
|
},
|
|
289
298
|
list: (filter) => roots()
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wirecat/cli-core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.690.0",
|
|
4
4
|
"description": "The messenger-neutral half of a messaging CLI: domain model, message locators, rendering, name resolution, the SQLite seam, the command skeleton and shared read commands, the send guard, run records and the message store",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "Viacheslav Ptsarev",
|