@oauth2-cli/qui-cli 1.2.14 → 2.0.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 +11 -3
- package/dist/Client.d.ts +1 -1
- package/dist/Client.js +13 -8
- package/dist/OAuth2.d.ts +4 -4
- package/dist/OAuth2.js +4 -4
- package/dist/OAuth2Plugin.d.ts +4 -4
- package/dist/OAuth2Plugin.js +8 -8
- package/extendable/Client.d.ts +1 -1
- package/extendable/Client.js +13 -8
- package/extendable/OAuth2Plugin.d.ts +4 -4
- package/extendable/OAuth2Plugin.js +8 -8
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -2,14 +2,22 @@
|
|
|
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
|
-
## [
|
|
5
|
+
## [2.0.0](https://github.com/battis/oauth2-cli/compare/qui-cli-plugin/1.2.15...qui-cli-plugin/2.0.0) (2026-03-22)
|
|
6
6
|
|
|
7
|
-
## [1.2.13](https://github.com/battis/oauth2-cli/compare/qui-cli-plugin/1.2.12...qui-cli-plugin/1.2.13) (2026-03-10)
|
|
8
7
|
|
|
8
|
+
### ⚠ BREAKING CHANGES
|
|
9
|
+
|
|
10
|
+
* detect and automate traversing paginated collections
|
|
11
|
+
|
|
12
|
+
### Features
|
|
13
|
+
|
|
14
|
+
* detect and automate traversing paginated collections ([28d6c6a](https://github.com/battis/oauth2-cli/commit/28d6c6ad90deb01059804d11ee692ec413a03345))
|
|
15
|
+
|
|
16
|
+
## [1.2.13](https://github.com/battis/oauth2-cli/compare/qui-cli-plugin/1.2.12...qui-cli-plugin/1.2.13) (2026-03-10)
|
|
9
17
|
|
|
10
18
|
### Bug Fixes
|
|
11
19
|
|
|
12
|
-
|
|
20
|
+
- update dev vs peer dependencies ([f21dc01](https://github.com/battis/oauth2-cli/commit/f21dc0108fcc786fa6edd5015fa835da856a9af0))
|
|
13
21
|
|
|
14
22
|
## [1.2.12](https://github.com/battis/oauth2-cli/compare/qui-cli-plugin/1.2.11...qui-cli-plugin/1.2.12) (2026-03-08)
|
|
15
23
|
|
package/dist/Client.d.ts
CHANGED
|
@@ -16,5 +16,5 @@ export declare class Client<C extends OAuth2CLI.Credentials = OAuth2CLI.Credenti
|
|
|
16
16
|
getConfiguration(): Promise<OpenIDClient.Configuration>;
|
|
17
17
|
protected prepareRequest(config: OpenIDClient.Configuration, accessToken: string, url: URL, method: string, body?: OpenIDClient.FetchBody, headers?: Headers | undefined, options?: OpenIDClient.DPoPOptions | undefined): Promise<OAuth2CLI.PreparedRequest>;
|
|
18
18
|
protected prepareResponse(response: Response): Promise<Response>;
|
|
19
|
-
|
|
19
|
+
request<T extends JSONValue = JSONValue>(url: URL.ish, method?: string, body?: Body.ish, headers?: Headers.ish, dPoPOptions?: OpenIDClient.DPoPOptions): Promise<T | OAuth2CLI.PaginatedCollection<T>>;
|
|
20
20
|
}
|
package/dist/Client.js
CHANGED
|
@@ -39,13 +39,18 @@ export class Client extends OAuth2CLI.Client {
|
|
|
39
39
|
})}`);
|
|
40
40
|
return response;
|
|
41
41
|
}
|
|
42
|
-
async
|
|
43
|
-
const
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
42
|
+
async request(url, method = 'GET', body, headers = {}, dPoPOptions) {
|
|
43
|
+
const data = await super.request(url, method, body, headers, dPoPOptions);
|
|
44
|
+
if (data instanceof OAuth2CLI.PaginatedCollection) {
|
|
45
|
+
Log.debug(`First page of data from ${this.name}: ${Log.syntaxColor(data)}`);
|
|
46
|
+
}
|
|
47
|
+
else {
|
|
48
|
+
Log.debug(`JSON data from ${this.name}: ${typeof data === 'object' && data
|
|
49
|
+
? Log.syntaxColor(data)
|
|
50
|
+
: typeof data === 'string'
|
|
51
|
+
? Colors.quotedValue(`"${data}"`)
|
|
52
|
+
: Colors.value(data)}`);
|
|
53
|
+
}
|
|
54
|
+
return data;
|
|
50
55
|
}
|
|
51
56
|
}
|
package/dist/OAuth2.d.ts
CHANGED
|
@@ -27,22 +27,22 @@ export declare const client: () => import("./Client.js").Client<import("oauth2-c
|
|
|
27
27
|
*
|
|
28
28
|
* @see {@link OAuth2Plugin.request}
|
|
29
29
|
*/
|
|
30
|
-
export declare const
|
|
30
|
+
export declare const requestRaw: (url: import("requestish/dist/URL.js").ish, method?: string | undefined, body?: import("requestish/dist/Body.js").ish, headers?: import("requestish/dist/Headers.js").ish, dPoPOptions?: import("openid-client").DPoPOptions | undefined) => Promise<Response>;
|
|
31
31
|
/**
|
|
32
32
|
* Convenience method
|
|
33
33
|
*
|
|
34
34
|
* @see {@link OAuth2Plugin.requestJSON}
|
|
35
35
|
*/
|
|
36
|
-
export declare const
|
|
36
|
+
export declare const request: <T extends import("@battis/typescript-tricks").JSONValue>(url: import("requestish/dist/URL.js").ish, method?: string | undefined, body?: import("requestish/dist/Body.js").ish, headers?: import("requestish/dist/Headers.js").ish, dPoPOptions?: import("openid-client").DPoPOptions | undefined) => Promise<T | import("oauth2-cli").PaginatedCollection<T>>;
|
|
37
37
|
/**
|
|
38
38
|
* Convenience method
|
|
39
39
|
*
|
|
40
40
|
* @see {@link OAuth2Plugin.fetch}
|
|
41
41
|
*/
|
|
42
|
-
export declare const
|
|
42
|
+
export declare const fetchRaw: (input: import("requestish/dist/URL.js").ish, init?: RequestInit | undefined, dPoPOptions?: import("openid-client").DPoPOptions | undefined) => Promise<Response>;
|
|
43
43
|
/**
|
|
44
44
|
* Conveneince method
|
|
45
45
|
*
|
|
46
46
|
* @see {@link OAuth2Plugin.fetchJSON}
|
|
47
47
|
*/
|
|
48
|
-
export declare const
|
|
48
|
+
export declare const fetch: <T extends import("@battis/typescript-tricks").JSONValue>(input: import("requestish/dist/URL.js").ish, init?: RequestInit | undefined, dPoPOptions?: import("openid-client").DPoPOptions | undefined) => Promise<T | import("oauth2-cli").PaginatedCollection<T>>;
|
package/dist/OAuth2.js
CHANGED
|
@@ -33,23 +33,23 @@ export const client = () => plugin.client;
|
|
|
33
33
|
*
|
|
34
34
|
* @see {@link OAuth2Plugin.request}
|
|
35
35
|
*/
|
|
36
|
-
export const
|
|
36
|
+
export const requestRaw = plugin.requestRaw.bind(plugin);
|
|
37
37
|
/**
|
|
38
38
|
* Convenience method
|
|
39
39
|
*
|
|
40
40
|
* @see {@link OAuth2Plugin.requestJSON}
|
|
41
41
|
*/
|
|
42
|
-
export const
|
|
42
|
+
export const request = plugin.request.bind(plugin);
|
|
43
43
|
/**
|
|
44
44
|
* Convenience method
|
|
45
45
|
*
|
|
46
46
|
* @see {@link OAuth2Plugin.fetch}
|
|
47
47
|
*/
|
|
48
|
-
export const
|
|
48
|
+
export const fetchRaw = plugin.fetchRaw.bind(plugin);
|
|
49
49
|
/**
|
|
50
50
|
* Conveneince method
|
|
51
51
|
*
|
|
52
52
|
* @see {@link OAuth2Plugin.fetchJSON}
|
|
53
53
|
*/
|
|
54
|
-
export const
|
|
54
|
+
export const fetch = plugin.fetch.bind(plugin);
|
|
55
55
|
await register(plugin);
|
package/dist/OAuth2Plugin.d.ts
CHANGED
|
@@ -131,24 +131,24 @@ export declare class OAuth2Plugin<C extends OAuth2CLI.Credentials = OAuth2CLI.Cr
|
|
|
131
131
|
*
|
|
132
132
|
* @see {@link OAuth2CLI.Client.request}
|
|
133
133
|
*/
|
|
134
|
-
|
|
134
|
+
requestRaw(...args: Parameters<OAuth2CLI.Client<C>['requestRaw']>): Promise<Response>;
|
|
135
135
|
/**
|
|
136
136
|
* Convenience method
|
|
137
137
|
*
|
|
138
138
|
* @see {@link OAuth2CLI.Client.requestJSON}
|
|
139
139
|
*/
|
|
140
|
-
|
|
140
|
+
request<T extends JSONValue>(...args: Parameters<OAuth2CLI.Client<C>['request']>): Promise<T | OAuth2CLI.PaginatedCollection<T>>;
|
|
141
141
|
/**
|
|
142
142
|
* Convenience method
|
|
143
143
|
*
|
|
144
144
|
* @see {@link OAuth2CLI.Client.fetch}
|
|
145
145
|
*/
|
|
146
|
-
|
|
146
|
+
fetchRaw(...args: Parameters<OAuth2CLI.Client<C>['fetchRaw']>): Promise<Response>;
|
|
147
147
|
/**
|
|
148
148
|
* Convenience method
|
|
149
149
|
*
|
|
150
150
|
* @see {@link OAuth2CLI.Client.fetchJSON}
|
|
151
151
|
*/
|
|
152
|
-
|
|
152
|
+
fetch<T extends JSONValue>(...args: Parameters<OAuth2CLI.Client<C>['fetch']>): Promise<T | OAuth2CLI.PaginatedCollection<T>>;
|
|
153
153
|
}
|
|
154
154
|
export {};
|
package/dist/OAuth2Plugin.js
CHANGED
|
@@ -257,31 +257,31 @@ export class OAuth2Plugin {
|
|
|
257
257
|
*
|
|
258
258
|
* @see {@link OAuth2CLI.Client.request}
|
|
259
259
|
*/
|
|
260
|
-
|
|
261
|
-
return this.client.
|
|
260
|
+
requestRaw(...args) {
|
|
261
|
+
return this.client.requestRaw(...args);
|
|
262
262
|
}
|
|
263
263
|
/**
|
|
264
264
|
* Convenience method
|
|
265
265
|
*
|
|
266
266
|
* @see {@link OAuth2CLI.Client.requestJSON}
|
|
267
267
|
*/
|
|
268
|
-
|
|
269
|
-
return this.client.
|
|
268
|
+
request(...args) {
|
|
269
|
+
return this.client.request(...args);
|
|
270
270
|
}
|
|
271
271
|
/**
|
|
272
272
|
* Convenience method
|
|
273
273
|
*
|
|
274
274
|
* @see {@link OAuth2CLI.Client.fetch}
|
|
275
275
|
*/
|
|
276
|
-
|
|
277
|
-
return this.client.
|
|
276
|
+
fetchRaw(...args) {
|
|
277
|
+
return this.client.fetchRaw(...args);
|
|
278
278
|
}
|
|
279
279
|
/**
|
|
280
280
|
* Convenience method
|
|
281
281
|
*
|
|
282
282
|
* @see {@link OAuth2CLI.Client.fetchJSON}
|
|
283
283
|
*/
|
|
284
|
-
|
|
285
|
-
return this.client.
|
|
284
|
+
fetch(...args) {
|
|
285
|
+
return this.client.fetch(...args);
|
|
286
286
|
}
|
|
287
287
|
}
|
package/extendable/Client.d.ts
CHANGED
|
@@ -16,5 +16,5 @@ export declare class Client<C extends OAuth2CLI.Credentials = OAuth2CLI.Credenti
|
|
|
16
16
|
getConfiguration(): Promise<OpenIDClient.Configuration>;
|
|
17
17
|
protected prepareRequest(config: OpenIDClient.Configuration, accessToken: string, url: URL, method: string, body?: OpenIDClient.FetchBody, headers?: Headers | undefined, options?: OpenIDClient.DPoPOptions | undefined): Promise<OAuth2CLI.PreparedRequest>;
|
|
18
18
|
protected prepareResponse(response: Response): Promise<Response>;
|
|
19
|
-
|
|
19
|
+
request<T extends JSONValue = JSONValue>(url: URL.ish, method?: string, body?: Body.ish, headers?: Headers.ish, dPoPOptions?: OpenIDClient.DPoPOptions): Promise<T | OAuth2CLI.PaginatedCollection<T>>;
|
|
20
20
|
}
|
package/extendable/Client.js
CHANGED
|
@@ -39,13 +39,18 @@ export class Client extends OAuth2CLI.Client {
|
|
|
39
39
|
})}`);
|
|
40
40
|
return response;
|
|
41
41
|
}
|
|
42
|
-
async
|
|
43
|
-
const
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
42
|
+
async request(url, method = 'GET', body, headers = {}, dPoPOptions) {
|
|
43
|
+
const data = await super.request(url, method, body, headers, dPoPOptions);
|
|
44
|
+
if (data instanceof OAuth2CLI.PaginatedCollection) {
|
|
45
|
+
Log.debug(`First page of data from ${this.name}: ${Log.syntaxColor(data)}`);
|
|
46
|
+
}
|
|
47
|
+
else {
|
|
48
|
+
Log.debug(`JSON data from ${this.name}: ${typeof data === 'object' && data
|
|
49
|
+
? Log.syntaxColor(data)
|
|
50
|
+
: typeof data === 'string'
|
|
51
|
+
? Colors.quotedValue(`"${data}"`)
|
|
52
|
+
: Colors.value(data)}`);
|
|
53
|
+
}
|
|
54
|
+
return data;
|
|
50
55
|
}
|
|
51
56
|
}
|
|
@@ -131,24 +131,24 @@ export declare class OAuth2Plugin<C extends OAuth2CLI.Credentials = OAuth2CLI.Cr
|
|
|
131
131
|
*
|
|
132
132
|
* @see {@link OAuth2CLI.Client.request}
|
|
133
133
|
*/
|
|
134
|
-
|
|
134
|
+
requestRaw(...args: Parameters<OAuth2CLI.Client<C>['requestRaw']>): Promise<Response>;
|
|
135
135
|
/**
|
|
136
136
|
* Convenience method
|
|
137
137
|
*
|
|
138
138
|
* @see {@link OAuth2CLI.Client.requestJSON}
|
|
139
139
|
*/
|
|
140
|
-
|
|
140
|
+
request<T extends JSONValue>(...args: Parameters<OAuth2CLI.Client<C>['request']>): Promise<T | OAuth2CLI.PaginatedCollection<T>>;
|
|
141
141
|
/**
|
|
142
142
|
* Convenience method
|
|
143
143
|
*
|
|
144
144
|
* @see {@link OAuth2CLI.Client.fetch}
|
|
145
145
|
*/
|
|
146
|
-
|
|
146
|
+
fetchRaw(...args: Parameters<OAuth2CLI.Client<C>['fetchRaw']>): Promise<Response>;
|
|
147
147
|
/**
|
|
148
148
|
* Convenience method
|
|
149
149
|
*
|
|
150
150
|
* @see {@link OAuth2CLI.Client.fetchJSON}
|
|
151
151
|
*/
|
|
152
|
-
|
|
152
|
+
fetch<T extends JSONValue>(...args: Parameters<OAuth2CLI.Client<C>['fetch']>): Promise<T | OAuth2CLI.PaginatedCollection<T>>;
|
|
153
153
|
}
|
|
154
154
|
export {};
|
|
@@ -257,31 +257,31 @@ export class OAuth2Plugin {
|
|
|
257
257
|
*
|
|
258
258
|
* @see {@link OAuth2CLI.Client.request}
|
|
259
259
|
*/
|
|
260
|
-
|
|
261
|
-
return this.client.
|
|
260
|
+
requestRaw(...args) {
|
|
261
|
+
return this.client.requestRaw(...args);
|
|
262
262
|
}
|
|
263
263
|
/**
|
|
264
264
|
* Convenience method
|
|
265
265
|
*
|
|
266
266
|
* @see {@link OAuth2CLI.Client.requestJSON}
|
|
267
267
|
*/
|
|
268
|
-
|
|
269
|
-
return this.client.
|
|
268
|
+
request(...args) {
|
|
269
|
+
return this.client.request(...args);
|
|
270
270
|
}
|
|
271
271
|
/**
|
|
272
272
|
* Convenience method
|
|
273
273
|
*
|
|
274
274
|
* @see {@link OAuth2CLI.Client.fetch}
|
|
275
275
|
*/
|
|
276
|
-
|
|
277
|
-
return this.client.
|
|
276
|
+
fetchRaw(...args) {
|
|
277
|
+
return this.client.fetchRaw(...args);
|
|
278
278
|
}
|
|
279
279
|
/**
|
|
280
280
|
* Convenience method
|
|
281
281
|
*
|
|
282
282
|
* @see {@link OAuth2CLI.Client.fetchJSON}
|
|
283
283
|
*/
|
|
284
|
-
|
|
285
|
-
return this.client.
|
|
284
|
+
fetch(...args) {
|
|
285
|
+
return this.client.fetch(...args);
|
|
286
286
|
}
|
|
287
287
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oauth2-cli/qui-cli",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"description": "@qui-cli/plugin wrapper for oauth2-cli",
|
|
5
5
|
"homepage": "https://github.com/battis/oauth2-cli/tree/main/packages/qui-cli#readme",
|
|
6
6
|
"repository": {
|
|
@@ -18,8 +18,8 @@
|
|
|
18
18
|
"dependencies": {
|
|
19
19
|
"@battis/descriptive-types": "^0.2.6",
|
|
20
20
|
"@battis/typescript-tricks": "^0.8.1",
|
|
21
|
-
"
|
|
22
|
-
"
|
|
21
|
+
"requestish": "0.1.12",
|
|
22
|
+
"oauth2-cli": "2.0.0"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
25
|
"@tsconfig/node24": "^24.0.4",
|