@oauth2-cli/qui-cli 0.5.7 → 0.5.9
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 +14 -0
- package/dist/Client.d.ts +7 -0
- package/dist/Client.js +15 -0
- package/dist/Module.d.ts +1 -1
- package/dist/OAuth2.d.ts +4 -2
- package/dist/OAuth2.js +2 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,20 @@
|
|
|
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
|
+
## [0.5.9](https://github.com/battis/oauth2-cli/compare/qui-cli-plugin/0.5.8...qui-cli-plugin/0.5.9) (2026-01-17)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* debug request/response/JSON from Client rather than plugin ([2ed73e1](https://github.com/battis/oauth2-cli/commit/2ed73e18089ffed4fe75d717d523fc86e2ae7f91))
|
|
11
|
+
|
|
12
|
+
## [0.5.8](https://github.com/battis/oauth2-cli/compare/qui-cli-plugin/0.5.7...qui-cli-plugin/0.5.8) (2026-01-17)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### Features
|
|
16
|
+
|
|
17
|
+
* add debugging output for requests ([8066cab](https://github.com/battis/oauth2-cli/commit/8066cabf56521f43ff90af21edabd9c20997e4cb))
|
|
18
|
+
|
|
5
19
|
## [0.5.7](https://github.com/battis/oauth2-cli/compare/qui-cli-plugin/0.5.6...qui-cli-plugin/0.5.7) (2026-01-17)
|
|
6
20
|
|
|
7
21
|
|
package/dist/Client.d.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { JSONValue } from '@battis/typescript-tricks';
|
|
2
|
+
import * as OAuth2CLI from 'oauth2-cli';
|
|
3
|
+
import { DPoPOptions, FetchBody } from 'openid-client';
|
|
4
|
+
export declare class Client extends OAuth2CLI.Client {
|
|
5
|
+
request(url: URL | string, method?: string, body?: FetchBody, headers?: Headers, dPoPOptions?: DPoPOptions): Promise<Response>;
|
|
6
|
+
requestJSON<T extends JSONValue = JSONValue>(url: URL | string, method?: string, body?: FetchBody, headers?: Headers, dPoPOptions?: DPoPOptions): Promise<T>;
|
|
7
|
+
}
|
package/dist/Client.js
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Log } from '@qui-cli/log';
|
|
2
|
+
import * as OAuth2CLI from 'oauth2-cli';
|
|
3
|
+
export class Client extends OAuth2CLI.Client {
|
|
4
|
+
async request(url, method, body, headers, dPoPOptions) {
|
|
5
|
+
Log.debug({ request: { method, url, headers, body, dPoPOptions } });
|
|
6
|
+
const response = await super.request(url, method, body, headers, dPoPOptions);
|
|
7
|
+
Log.debug({ response });
|
|
8
|
+
return response;
|
|
9
|
+
}
|
|
10
|
+
async requestJSON(url, method, body, headers, dPoPOptions) {
|
|
11
|
+
const json = await super.requestJSON(url, method, body, headers, dPoPOptions);
|
|
12
|
+
Log.debug({ json });
|
|
13
|
+
return json;
|
|
14
|
+
}
|
|
15
|
+
}
|
package/dist/Module.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ export declare const configure: (proposal?: import("./OAuth2.js").ConfigurationP
|
|
|
4
4
|
export declare const options: () => import("@qui-cli/plugin").Options;
|
|
5
5
|
export declare const init: ({ values }: import("@qui-cli/plugin").ExpectedArguments<typeof this.options>) => Promise<void>;
|
|
6
6
|
export declare const getToken: () => Promise<import("oauth2-cli/dist/Token.js").Token | undefined>;
|
|
7
|
-
export declare const getClient: () => import("
|
|
7
|
+
export declare const getClient: () => import("./Client.js").Client;
|
|
8
8
|
export declare const request: (url: string | URL, method?: string | undefined, body?: import("openid-client").FetchBody, headers?: Headers | undefined, dPoPOptions?: import("openid-client").DPoPOptions | undefined) => Promise<Response>;
|
|
9
9
|
export declare const requestJSON: <T extends import("@battis/typescript-tricks").JSONValue>(url: string | URL, method?: string | undefined, body?: import("openid-client").FetchBody, headers?: Headers | undefined, dPoPOptions?: import("openid-client").DPoPOptions | undefined) => Promise<T>;
|
|
10
10
|
export declare const fetch: (endpoint: string | URL | Request, init?: RequestInit | undefined) => Promise<Response>;
|
package/dist/OAuth2.d.ts
CHANGED
|
@@ -2,7 +2,9 @@ import { PathString, URLString } from '@battis/descriptive-types';
|
|
|
2
2
|
import { JSONValue } from '@battis/typescript-tricks';
|
|
3
3
|
import * as Plugin from '@qui-cli/plugin';
|
|
4
4
|
import * as OAuth2CLI from 'oauth2-cli';
|
|
5
|
-
|
|
5
|
+
import { Client } from './Client.js';
|
|
6
|
+
export { Credentials, FileStorage, Token, TokenStorage } from 'oauth2-cli';
|
|
7
|
+
export * from './Client.js';
|
|
6
8
|
export * from './EnvironmentStorage.js';
|
|
7
9
|
type ParamNames = 'clientId' | 'clientSecret' | 'scope' | 'redirectUri' | 'authorizationEndpoint' | 'tokenEndpoint' | 'tokenPath' | 'accessToken';
|
|
8
10
|
type EnvironmentVars = Record<ParamNames, string>;
|
|
@@ -36,7 +38,7 @@ export type ConfigurationProposal = Partial<Omit<Configuration, 'opt' | 'env' |
|
|
|
36
38
|
env?: Partial<EnvironmentVars>;
|
|
37
39
|
man?: Partial<Usage>;
|
|
38
40
|
};
|
|
39
|
-
export declare class OAuth2Plugin<C extends
|
|
41
|
+
export declare class OAuth2Plugin<C extends Client = Client> {
|
|
40
42
|
readonly name: string;
|
|
41
43
|
[key: string]: unknown;
|
|
42
44
|
private static names;
|
package/dist/OAuth2.js
CHANGED
|
@@ -5,7 +5,8 @@ import { Root } from '@qui-cli/root';
|
|
|
5
5
|
import path from 'node:path';
|
|
6
6
|
import * as OAuth2CLI from 'oauth2-cli';
|
|
7
7
|
import { EnvironmentStorage } from './EnvironmentStorage.js';
|
|
8
|
-
export
|
|
8
|
+
export { FileStorage, Token } from 'oauth2-cli';
|
|
9
|
+
export * from './Client.js';
|
|
9
10
|
export * from './EnvironmentStorage.js';
|
|
10
11
|
export class OAuth2Plugin {
|
|
11
12
|
name;
|
package/package.json
CHANGED