@wirecat/cli-core 0.475.0 → 0.476.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
@@ -7,6 +7,16 @@ shape of this file.
7
7
 
8
8
  ## Unreleased
9
9
 
10
+ ## 0.476.0 — 29.10.2026
11
+
12
+ ### Fixed
13
+
14
+ - **A sign-in that cannot be read says why under `--debug` and in the run record.** `credentialStorage` threw
15
+ `configuration_error` (`oauth.not-saved`, "could not reach the saved sign-in") and dropped the keyring's own error,
16
+ so a locked keyring, a missing Secret Service and an unreachable D-Bus looked the same. The keyring's message is now
17
+ the error's `cause`: `--debug` and `runs show` print it, the JSON answer still does not. A secret the keyring echoes
18
+ back on a failed write is masked first.
19
+
10
20
  ## 0.475.0 — 29.10.2026
11
21
 
12
22
  ### Fixed
@@ -136,9 +136,14 @@ export const zoomTokenCodec = {
136
136
  });
137
137
  },
138
138
  };
139
- const keyringFailure = () => new CliError("configuration_error", "could not reach the saved sign-in; use an available keyring or file storage", {
140
- reason: "oauth.not-saved",
141
- });
139
+ // The keyring's own words go to `--debug` and the run record as the cause, never into the answer; a store that
140
+ // echoes what it was handed loses the secret from them first.
141
+ const keyringFailure = (thrown, secret) => {
142
+ const failure = new CliError("configuration_error", "could not reach the saved sign-in; use an available keyring or file storage", { reason: "oauth.not-saved" });
143
+ const words = thrown instanceof Error ? thrown.message : String(thrown);
144
+ failure.cause = new Error(secret ? words.replaceAll(secret, "[secret]") : words);
145
+ return failure;
146
+ };
142
147
  export const credentialStorage = (options) => {
143
148
  if (!options.credentials.keyring)
144
149
  throw new CliError("configuration_error", "a sign-in store needs its keyring passed in, never a default");
@@ -149,16 +154,16 @@ export const credentialStorage = (options) => {
149
154
  try {
150
155
  return credentials.read(name)?.secret;
151
156
  }
152
- catch {
153
- throw keyringFailure();
157
+ catch (error) {
158
+ throw keyringFailure(error);
154
159
  }
155
160
  };
156
161
  const save = (value) => {
157
162
  try {
158
163
  credentials.write(account, value);
159
164
  }
160
- catch {
161
- throw keyringFailure();
165
+ catch (error) {
166
+ throw keyringFailure(error, value);
162
167
  }
163
168
  };
164
169
  const current = () => {
@@ -189,8 +194,8 @@ export const credentialStorage = (options) => {
189
194
  try {
190
195
  return credentials.remove(account);
191
196
  }
192
- catch {
193
- throw keyringFailure();
197
+ catch (error) {
198
+ throw keyringFailure(error);
194
199
  }
195
200
  },
196
201
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wirecat/cli-core",
3
- "version": "0.475.0",
3
+ "version": "0.476.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",