oauth2-cli 1.2.7 → 1.2.8
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 +12 -15
- package/dist/Client.js +4 -3
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,56 +2,53 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [commit-and-tag-version](https://github.com/absolute-version/commit-and-tag-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
-
## [1.2.
|
|
5
|
+
## [1.2.8](https://github.com/battis/oauth2-cli/compare/oauth2-cli/1.2.7...oauth2-cli/1.2.8) (2026-03-17)
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
### Bug Fixes
|
|
8
8
|
|
|
9
|
+
- log unparseable body if unparseable as JSON ([183bcc7](https://github.com/battis/oauth2-cli/commit/183bcc750f4f2dded5bc5f4d9fbc01fb6624e651))
|
|
10
|
+
|
|
11
|
+
## [1.2.6](https://github.com/battis/oauth2-cli/compare/oauth2-cli/1.2.5...oauth2-cli/1.2.6) (2026-03-10)
|
|
9
12
|
|
|
10
13
|
### Bug Fixes
|
|
11
14
|
|
|
12
|
-
|
|
15
|
+
- update dev vs peer dependencies ([f21dc01](https://github.com/battis/oauth2-cli/commit/f21dc0108fcc786fa6edd5015fa835da856a9af0))
|
|
13
16
|
|
|
14
17
|
## [1.2.5](https://github.com/battis/oauth2-cli/compare/oauth2-cli/1.2.4...oauth2-cli/1.2.5) (2026-03-08)
|
|
15
18
|
|
|
16
|
-
|
|
17
19
|
### Bug Fixes
|
|
18
20
|
|
|
19
|
-
|
|
21
|
+
- use the full power of requestish to build request URL ([ff4da89](https://github.com/battis/oauth2-cli/commit/ff4da8900e83df0d4dbd941058084523ad7ce3a6))
|
|
20
22
|
|
|
21
23
|
## [1.2.4](https://github.com/battis/oauth2-cli/compare/oauth2-cli/1.2.3...oauth2-cli/1.2.4) (2026-03-08)
|
|
22
24
|
|
|
23
|
-
|
|
24
25
|
### Bug Fixes
|
|
25
26
|
|
|
26
|
-
|
|
27
|
+
- actually fix base_url completion removing search params ([2575df7](https://github.com/battis/oauth2-cli/commit/2575df7250ec1c5c0ba76ab5f7babc40b2e5a07d))
|
|
27
28
|
|
|
28
29
|
## [1.2.3](https://github.com/battis/oauth2-cli/compare/oauth2-cli/1.2.2...oauth2-cli/1.2.3) (2026-03-08)
|
|
29
30
|
|
|
30
31
|
## [1.2.2](https://github.com/battis/oauth2-cli/compare/oauth2-cli/1.2.1...oauth2-cli/1.2.2) (2026-03-08)
|
|
31
32
|
|
|
32
|
-
|
|
33
33
|
### Bug Fixes
|
|
34
34
|
|
|
35
|
-
|
|
35
|
+
- don't lose search params when building url from base or credentials.issuer ([a328c96](https://github.com/battis/oauth2-cli/commit/a328c9693d0a39cccc7d6f38bd24065b6f633c1b))
|
|
36
36
|
|
|
37
37
|
## [1.2.1](https://github.com/battis/oauth2-cli/compare/oauth2-cli/1.2.0...oauth2-cli/1.2.1) (2026-03-08)
|
|
38
38
|
|
|
39
|
-
|
|
40
39
|
### Bug Fixes
|
|
41
40
|
|
|
42
|
-
|
|
41
|
+
- still more detail on JSON error ([d9d28ce](https://github.com/battis/oauth2-cli/commit/d9d28ce8145a5c29288f28317041e8545b232a1e))
|
|
43
42
|
|
|
44
43
|
## [1.2.0](https://github.com/battis/oauth2-cli/compare/oauth2-cli/1.1.5...oauth2-cli/1.2.0) (2026-03-08)
|
|
45
44
|
|
|
46
|
-
|
|
47
45
|
### Features
|
|
48
46
|
|
|
49
|
-
|
|
50
|
-
|
|
47
|
+
- add prepareResponse hook ([c1ada04](https://github.com/battis/oauth2-cli/commit/c1ada04c20f08a5dac11414b44ea188f4aafe76d))
|
|
51
48
|
|
|
52
49
|
### Bug Fixes
|
|
53
50
|
|
|
54
|
-
|
|
51
|
+
- more detailed error response on JSON parse fail ([b8c414d](https://github.com/battis/oauth2-cli/commit/b8c414d650a7acfce8d2d297639fbecddd5f2382))
|
|
55
52
|
|
|
56
53
|
## [1.1.5](https://github.com/battis/oauth2-cli/compare/oauth2-cli/1.1.4...oauth2-cli/1.1.5) (2026-03-07)
|
|
57
54
|
|
package/dist/Client.js
CHANGED
|
@@ -287,12 +287,13 @@ export class Client extends EventEmitter {
|
|
|
287
287
|
/** Parse a fetch response as JSON, typing it as J */
|
|
288
288
|
async toJSON(response) {
|
|
289
289
|
if (response.ok) {
|
|
290
|
+
const body = await response.text();
|
|
290
291
|
try {
|
|
291
|
-
return
|
|
292
|
+
return JSON.parse(body);
|
|
292
293
|
}
|
|
293
|
-
catch (
|
|
294
|
+
catch (error) {
|
|
294
295
|
throw new Error(`${this.name} response could not be parsed as JSON`, {
|
|
295
|
-
cause
|
|
296
|
+
cause: { error, body }
|
|
296
297
|
});
|
|
297
298
|
}
|
|
298
299
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "oauth2-cli",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.8",
|
|
4
4
|
"description": "Acquire API access tokens via OAuth 2.0 / OpenID Connect within CLI tools",
|
|
5
5
|
"homepage": "https://github.com/battis/oauth2-cli/tree/main/packages/oauth2-cli#readme",
|
|
6
6
|
"repository": {
|