@oauth2-cli/qui-cli 0.6.0 → 0.6.2
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 +3 -2
- package/dist/OAuth2.d.ts +6 -0
- package/dist/OAuth2.js +6 -0
- package/dist/OAuth2Plugin.d.ts +1 -1
- package/dist/OAuth2Plugin.js +4 -3
- package/dist/index.d.ts +1 -6
- package/dist/index.js +3 -7
- package/package.json +3 -2
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.6.2](https://github.com/battis/oauth2-cli/compare/qui-cli-plugin/0.6.1...qui-cli-plugin/0.6.2) (2026-02-16)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* export ClientOptions for instantiateClient implementation ([23eefbf](https://github.com/battis/oauth2-cli/commit/23eefbfa7a29d59e66463922b731183804c7eb62))
|
|
11
|
+
|
|
12
|
+
## [0.6.1](https://github.com/battis/oauth2-cli/compare/qui-cli-plugin/0.6.0...qui-cli-plugin/0.6.1) (2026-02-16)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### Bug Fixes
|
|
16
|
+
|
|
17
|
+
* fix accidental regression and re-export unregistered components from OAuth2 ([b5b62bb](https://github.com/battis/oauth2-cli/commit/b5b62bb1735f0e899bf84c83b39e61499ee8da44))
|
|
18
|
+
|
|
5
19
|
## [0.6.0](https://github.com/battis/oauth2-cli/compare/qui-cli-plugin/0.5.11...qui-cli-plugin/0.6.0) (2026-02-15)
|
|
6
20
|
|
|
7
21
|
|
package/dist/Client.d.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import * as OAuth2CLI from 'oauth2-cli';
|
|
2
2
|
import type { Configuration, DPoPOptions, FetchBody, JsonValue } from 'openid-client';
|
|
3
|
+
import * as requestish from 'requestish';
|
|
3
4
|
export declare class Client extends OAuth2CLI.Client {
|
|
4
5
|
getConfiguration(): Promise<Configuration>;
|
|
5
6
|
authorize(): Promise<OAuth2CLI.Token.Response>;
|
|
6
7
|
protected refreshTokenGrant(token: OAuth2CLI.Token.Response): Promise<OAuth2CLI.Token.Response | undefined>;
|
|
7
|
-
request(url:
|
|
8
|
-
requestJSON<T extends JsonValue = JsonValue>(url:
|
|
8
|
+
request(url: requestish.URL.ish, method?: string, body?: FetchBody, headers?: requestish.Headers.ish, dPoPOptions?: DPoPOptions): Promise<Response>;
|
|
9
|
+
requestJSON<T extends JsonValue = JsonValue>(url: requestish.URL.ish, method?: string, body?: FetchBody, headers?: requestish.Headers.ish, dPoPOptions?: DPoPOptions): Promise<T>;
|
|
9
10
|
}
|
package/dist/OAuth2.d.ts
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { OAuth2Plugin } from './OAuth2Plugin.js';
|
|
2
|
+
export { ClientOptions, Credentials, Errors, WebServer } from 'oauth2-cli';
|
|
3
|
+
export * from './Client.js';
|
|
4
|
+
export * from './OAuth2Plugin.js';
|
|
5
|
+
export * as Token from './Token/index.js';
|
|
6
|
+
export declare const OAuth2: OAuth2Plugin<import("./Client.js").Client>;
|
package/dist/OAuth2.js
ADDED
package/dist/OAuth2Plugin.d.ts
CHANGED
|
@@ -43,7 +43,7 @@ export declare class OAuth2Plugin<C extends Client = Client> {
|
|
|
43
43
|
configure(proposal?: Configuration): void;
|
|
44
44
|
options(): Plugin.Options;
|
|
45
45
|
init({ values }: Plugin.ExpectedArguments<typeof this.options>): Promise<void>;
|
|
46
|
-
protected instantiateClient(
|
|
46
|
+
protected instantiateClient(options: OAuth2CLI.ClientOptions): C;
|
|
47
47
|
get client(): C;
|
|
48
48
|
request(...args: Parameters<OAuth2CLI.Client['request']>): Promise<Response>;
|
|
49
49
|
requestJSON<T extends JSONValue>(...args: Parameters<OAuth2CLI.Client['requestJSON']>): Promise<T>;
|
package/dist/OAuth2Plugin.js
CHANGED
|
@@ -3,6 +3,7 @@ import { Env } from '@qui-cli/env';
|
|
|
3
3
|
import { Log } from '@qui-cli/log';
|
|
4
4
|
import * as Plugin from '@qui-cli/plugin';
|
|
5
5
|
import * as OAuth2CLI from 'oauth2-cli';
|
|
6
|
+
import * as requestish from 'requestish';
|
|
6
7
|
export class OAuth2Plugin {
|
|
7
8
|
name;
|
|
8
9
|
static names = [];
|
|
@@ -67,7 +68,7 @@ export class OAuth2Plugin {
|
|
|
67
68
|
this.env = hydrate(proposal.env, this.env);
|
|
68
69
|
this.suppress = hydrate(proposal.suppress, this.suppress);
|
|
69
70
|
if (this.credentials?.redirect_uri) {
|
|
70
|
-
const url =
|
|
71
|
+
const url = requestish.URL.from(this.credentials.redirect_uri);
|
|
71
72
|
if (url.hostname !== 'localhost' &&
|
|
72
73
|
!/^\/https?\/localhost(:\d+)?\//.test(url.pathname)) {
|
|
73
74
|
Log.warning(`The ${Colors.optionArg(this.opt.redirect_uri)} value ${Colors.url(this.credentials.redirect_uri)} may not work: it ${Colors.keyword('must')} redirect to ${Colors.url('localhost')}`);
|
|
@@ -149,8 +150,8 @@ export class OAuth2Plugin {
|
|
|
149
150
|
}
|
|
150
151
|
this.configure({ credentials });
|
|
151
152
|
}
|
|
152
|
-
instantiateClient(
|
|
153
|
-
return new OAuth2CLI.Client(
|
|
153
|
+
instantiateClient(options) {
|
|
154
|
+
return new OAuth2CLI.Client(options);
|
|
154
155
|
}
|
|
155
156
|
get client() {
|
|
156
157
|
if (!this._client) {
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const OAuth2: OAuth2Plugin<import("./Client.js").Client>;
|
|
3
|
-
export { Credentials, Errors, WebServer } from 'oauth2-cli';
|
|
4
|
-
export * from './Client.js';
|
|
5
|
-
export * from './OAuth2Plugin.js';
|
|
6
|
-
export * as Token from './Token/index.js';
|
|
1
|
+
export * from './OAuth2.js';
|
package/dist/index.js
CHANGED
|
@@ -1,8 +1,4 @@
|
|
|
1
1
|
import { register } from '@qui-cli/plugin';
|
|
2
|
-
import {
|
|
3
|
-
export
|
|
4
|
-
|
|
5
|
-
export * from './Client.js';
|
|
6
|
-
export * from './OAuth2Plugin.js';
|
|
7
|
-
export * as Token from './Token/index.js';
|
|
8
|
-
await register(OAuth2);
|
|
2
|
+
import { OAuth2 as plugin } from './OAuth2.js';
|
|
3
|
+
export * from './OAuth2.js';
|
|
4
|
+
await register(plugin);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oauth2-cli/qui-cli",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.2",
|
|
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": {
|
|
@@ -17,7 +17,8 @@
|
|
|
17
17
|
"types": "./dist/index.d.ts",
|
|
18
18
|
"dependencies": {
|
|
19
19
|
"@qui-cli/colors": "^3.2.3",
|
|
20
|
-
"oauth2-cli": "0.6.0"
|
|
20
|
+
"oauth2-cli": "0.6.0",
|
|
21
|
+
"requestish": "0.1.0"
|
|
21
22
|
},
|
|
22
23
|
"devDependencies": {
|
|
23
24
|
"@battis/descriptive-types": "^0.2.6",
|