oauth2-cli 1.0.2 → 1.0.3

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
@@ -2,6 +2,13 @@
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.0.3](https://github.com/battis/oauth2-cli/compare/oauth2-cli/1.0.2...oauth2-cli/1.0.3) (2026-03-04)
6
+
7
+
8
+ ### Bug Fixes
9
+
10
+ * allow requestish.Body.ish request bodies as intended ([f12a2ce](https://github.com/battis/oauth2-cli/commit/f12a2ceb1c517f6fd90b33c8c71da7f987af640d))
11
+
5
12
  ## [1.0.2](https://github.com/battis/oauth2-cli/compare/oauth2-cli/1.0.1...oauth2-cli/1.0.2) (2026-03-03)
6
13
 
7
14
 
package/README.md CHANGED
@@ -80,7 +80,7 @@ class Client {
80
80
  public async request(
81
81
  url: requestish.URL.ish,
82
82
  method = 'GET',
83
- body?: OpenIDClient.FetchBody,
83
+ body?: requestish.Body.ish,
84
84
  headers: requestish.Headers.ish = {},
85
85
  dPoPOptions?: OpenIDClient.DPoPOptions
86
86
  ) {
@@ -108,7 +108,7 @@ class Client {
108
108
  >(
109
109
  url: requestish.URL.ish,
110
110
  method = 'GET',
111
- body?: OpenIDClient.FetchBody,
111
+ body?: requestish.Body.ish,
112
112
  headers: requestish.Headers.ish = {},
113
113
  dPoPOptions?: OpenIDClient.DPoPOptions
114
114
  ) {
package/dist/Client.d.ts CHANGED
@@ -2,7 +2,7 @@ import { JSONValue } from '@battis/typescript-tricks';
2
2
  import { Request } from 'express';
3
3
  import { EventEmitter } from 'node:events';
4
4
  import * as OpenIDClient from 'openid-client';
5
- import { Headers, URL } from 'requestish';
5
+ import { Body, Headers, URL } from 'requestish';
6
6
  import { Credentials } from './Credentials.js';
7
7
  import { Injection } from './Injection.js';
8
8
  import * as Localhost from './Localhost/index.js';
@@ -117,14 +117,14 @@ export declare class Client<C extends Credentials = Credentials> extends EventEm
117
117
  * @param headers Optional
118
118
  * @param dPoPOptions Optional, see {@link OpenIDClient.DPoPOptions}
119
119
  */
120
- request(url: URL.ish, method?: string, body?: OpenIDClient.FetchBody, headers?: Headers.ish, dPoPOptions?: OpenIDClient.DPoPOptions): Promise<Response>;
120
+ request(url: URL.ish, method?: string, body?: Body.ish, headers?: Headers.ish, dPoPOptions?: OpenIDClient.DPoPOptions): Promise<Response>;
121
121
  /** Parse a fetch response as JSON, typing it as J */
122
122
  private toJSON;
123
123
  /**
124
124
  * Returns the result of {@link request} as a parsed JSON object, optionally
125
125
  * typed as `J`
126
126
  */
127
- requestJSON<J extends JSONValue = JSONValue>(url: URL.ish, method?: string, body?: OpenIDClient.FetchBody, headers?: Headers.ish, dPoPOptions?: OpenIDClient.DPoPOptions): Promise<J>;
127
+ requestJSON<J extends JSONValue = JSONValue>(url: URL.ish, method?: string, body?: Body.ish, headers?: Headers.ish, dPoPOptions?: OpenIDClient.DPoPOptions): Promise<J>;
128
128
  /**
129
129
  * Request a protected resource using the client's access token.
130
130
  *
package/dist/Client.js CHANGED
@@ -274,7 +274,7 @@ export class Client extends EventEmitter {
274
274
  });
275
275
  }
276
276
  }
277
- const request = async () => await OpenIDClient.fetchProtectedResource(await this.getConfiguration(), (await this.getToken()).access_token, URL.from(URLSearchParams.appendTo(url, this.inject?.search || {})), method, body, Headers.merge(this.inject?.headers, headers), dPoPOptions);
277
+ const request = async () => await OpenIDClient.fetchProtectedResource(await this.getConfiguration(), (await this.getToken()).access_token, URL.from(URLSearchParams.appendTo(url, this.inject?.search || {})), method, await Body.from(body), Headers.merge(this.inject?.headers, headers), dPoPOptions);
278
278
  try {
279
279
  return await request();
280
280
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oauth2-cli",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
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": {
@@ -23,8 +23,8 @@
23
23
  "open": "^11.0.0",
24
24
  "openid-client": "^6.8.2",
25
25
  "ora": "^9.3.0",
26
- "requestish": "0.1.3",
27
- "gcrtl": "0.1.7"
26
+ "gcrtl": "0.1.7",
27
+ "requestish": "0.1.3"
28
28
  },
29
29
  "devDependencies": {
30
30
  "@battis/descriptive-types": "^0.2.6",