@oauth2-cli/qui-cli 0.7.0 → 0.7.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 CHANGED
@@ -2,6 +2,30 @@
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.7.2](https://github.com/battis/oauth2-cli/compare/qui-cli-plugin/0.7.1...qui-cli-plugin/0.7.2) (2026-02-18)
6
+
7
+
8
+ ### Features
9
+
10
+ * `Unregistered` namespace for convenient extension ([0889d98](https://github.com/battis/oauth2-cli/commit/0889d98c26fd50cb8bf6485db2df39ebd1fb2b39))
11
+
12
+
13
+ ### Bug Fixes
14
+
15
+ * injected usage documentation follows generated usage documentation ([b8b0640](https://github.com/battis/oauth2-cli/commit/b8b064028502e058f9a2b890bd408f8458a2db8e))
16
+
17
+ ## [0.7.1](https://github.com/battis/oauth2-cli/compare/qui-cli-plugin/0.7.0...qui-cli-plugin/0.7.1) (2026-02-18)
18
+
19
+
20
+ ### Features
21
+
22
+ * provide parameterized credentials with simplified typing ([5a92c67](https://github.com/battis/oauth2-cli/commit/5a92c67dbd4ab52fa4f0b02a910e788f5ae67adb))
23
+
24
+
25
+ ### Bug Fixes
26
+
27
+ * simplify dependency hierarchy ([0a72c5d](https://github.com/battis/oauth2-cli/commit/0a72c5df3c814e63ad001a2a15fa0bf7ab72b195))
28
+
5
29
  ## [0.7.0](https://github.com/battis/oauth2-cli/compare/qui-cli-plugin/0.6.6...qui-cli-plugin/0.7.0) (2026-02-17)
6
30
 
7
31
  ### ⚠ BREAKING CHANGES
package/dist/Client.d.ts CHANGED
@@ -1,10 +1,11 @@
1
+ import { JSONValue } from '@battis/typescript-tricks';
1
2
  import * as OAuth2CLI from 'oauth2-cli';
2
- import type { Configuration, DPoPOptions, FetchBody, JsonValue } from 'openid-client';
3
+ import type * as OpenIDClient from 'openid-client';
3
4
  import * as requestish from 'requestish';
4
- export declare class Client extends OAuth2CLI.Client {
5
- getConfiguration(): Promise<Configuration>;
5
+ export declare class Client<C extends OAuth2CLI.Credentials = OAuth2CLI.Credentials> extends OAuth2CLI.Client<C> {
6
+ getConfiguration(): Promise<OpenIDClient.Configuration>;
6
7
  authorize(): Promise<OAuth2CLI.Token.Response>;
7
8
  protected refreshTokenGrant(token: OAuth2CLI.Token.Response): Promise<OAuth2CLI.Token.Response | undefined>;
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
+ request(url: requestish.URL.ish, method?: string, body?: OpenIDClient.FetchBody, headers?: requestish.Headers.ish, dPoPOptions?: OpenIDClient.DPoPOptions): Promise<Response>;
10
+ requestJSON<J extends JSONValue = JSONValue>(url: requestish.URL.ish, method?: string, body?: OpenIDClient.FetchBody, headers?: requestish.Headers.ish, dPoPOptions?: OpenIDClient.DPoPOptions): Promise<J>;
10
11
  }
package/dist/OAuth2.d.ts CHANGED
@@ -1,7 +1,7 @@
1
- export declare const configure: (proposal?: import("./OAuth2Plugin.js").Configuration) => void;
1
+ export declare const configure: (proposal?: import("./OAuth2Plugin.js").Configuration<import("oauth2-cli").Credentials>) => void;
2
2
  export declare const options: () => import("@qui-cli/plugin").Options;
3
3
  export declare const init: () => import("@qui-cli/plugin").Options;
4
- export declare const client: () => import("./Client.js").Client;
4
+ export declare const client: () => import("./Client.js").Client<import("oauth2-cli").Credentials>;
5
5
  export declare const request: (url: import("requestish/dist/URL.js").ish, method?: string | undefined, body?: import("openid-client").FetchBody, headers?: import("requestish/dist/Headers.js").ish | undefined, dPoPOptions?: import("openid-client").DPoPOptions | undefined) => Promise<Response>;
6
6
  export declare const requestJSON: <T extends import("@battis/typescript-tricks").JSONValue>(url: import("requestish/dist/URL.js").ish, method?: string | undefined, body?: import("openid-client").FetchBody, headers?: import("requestish/dist/Headers.js").ish | undefined, dPoPOptions?: import("openid-client").DPoPOptions | undefined) => Promise<T>;
7
7
  export declare const fetch: (input: import("requestish/dist/URL.js").ish, init?: RequestInit | undefined, dPoPOptions?: import("openid-client").DPoPOptions | undefined) => Promise<Response>;
@@ -13,9 +13,9 @@ type Usage = {
13
13
  heading: string;
14
14
  text?: string[];
15
15
  };
16
- export type Configuration = Plugin.Configuration & {
16
+ export type Configuration<C extends OAuth2CLI.Credentials = OAuth2CLI.Credentials> = Plugin.Configuration & {
17
17
  /** OAuth 2.0/OpenID Connect credential set */
18
- credentials?: Partial<OAuth2CLI.Credentials>;
18
+ credentials?: Partial<C>;
19
19
  /** Base URL for all non-absolute requests */
20
20
  base_url?: requestish.URL.ish;
21
21
  /** Request components to inject into server requests */
@@ -35,7 +35,7 @@ export type Configuration = Plugin.Configuration & {
35
35
  /** Optional absolute path to EJS view templates directory */
36
36
  views?: PathString;
37
37
  };
38
- export declare class OAuth2Plugin<C extends Client = Client> {
38
+ export declare class OAuth2Plugin<C extends OAuth2CLI.Credentials = OAuth2CLI.Credentials, L extends Client<C> = Client<C>> {
39
39
  readonly name: string;
40
40
  [key: string]: unknown;
41
41
  private static names;
@@ -52,14 +52,14 @@ export declare class OAuth2Plugin<C extends Client = Client> {
52
52
  private views?;
53
53
  private storage?;
54
54
  private _client?;
55
- configure(proposal?: Configuration): void;
55
+ configure(proposal?: Configuration<C>): void;
56
56
  options(): Plugin.Options;
57
57
  init(_: Plugin.ExpectedArguments<typeof this.options>): Promise<void>;
58
- protected instantiateClient(options: OAuth2CLI.ClientOptions): C;
59
- get client(): C;
60
- request(...args: Parameters<OAuth2CLI.Client['request']>): Promise<Response>;
61
- requestJSON<T extends JSONValue>(...args: Parameters<OAuth2CLI.Client['requestJSON']>): Promise<T>;
62
- fetch(...args: Parameters<OAuth2CLI.Client['fetch']>): Promise<Response>;
63
- fetchJSON<T extends JSONValue>(...args: Parameters<OAuth2CLI.Client['fetchJSON']>): Promise<T>;
58
+ protected instantiateClient(options: OAuth2CLI.ClientOptions<C>): L;
59
+ get client(): L;
60
+ request(...args: Parameters<OAuth2CLI.Client<C>['request']>): Promise<Response>;
61
+ requestJSON<T extends JSONValue>(...args: Parameters<OAuth2CLI.Client<C>['requestJSON']>): Promise<T>;
62
+ fetch(...args: Parameters<OAuth2CLI.Client<C>['fetch']>): Promise<Response>;
63
+ fetchJSON<T extends JSONValue>(...args: Parameters<OAuth2CLI.Client<C>['fetchJSON']>): Promise<T>;
64
64
  }
65
65
  export {};
@@ -118,7 +118,6 @@ export class OAuth2Plugin {
118
118
  return {
119
119
  man: [
120
120
  { level: 1, text: this.man.heading },
121
- ...(this.man.text || []).map((t) => ({ text: t })),
122
121
  ...Object.keys(descriptions)
123
122
  .filter((key) => !this.suppress || !this.suppress[key])
124
123
  .map((key) => ({
@@ -127,7 +126,8 @@ export class OAuth2Plugin {
127
126
  (this.url && this.url[key]
128
127
  ? ` See ${Colors.url(this.url[key])} for more information.`
129
128
  : '')
130
- }))
129
+ })),
130
+ ...(this.man.text || []).map((t) => ({ text: t }))
131
131
  ]
132
132
  };
133
133
  }
@@ -1,3 +1,4 @@
1
+ export { ClientOptions, Credentials, Injection, Scope, WebServer } from 'oauth2-cli';
1
2
  export * from './Client.js';
2
3
  export * from './OAuth2Plugin.js';
3
4
  export * as Token from './Token/index.js';
@@ -1,3 +1,4 @@
1
+ export { Scope, WebServer } from 'oauth2-cli';
1
2
  export * from './Client.js';
2
3
  export * from './OAuth2Plugin.js';
3
4
  export * as Token from './Token/index.js';
package/dist/index.d.ts CHANGED
@@ -1,3 +1,2 @@
1
1
  export * as OAuth2 from './OAuth2.js';
2
- export * from './Export.js';
3
- export * from './Extend.js';
2
+ export * from './Unregistered.js';
package/dist/index.js CHANGED
@@ -1,3 +1,2 @@
1
1
  export * as OAuth2 from './OAuth2.js';
2
- export * from './Export.js';
3
- export * from './Extend.js';
2
+ export * from './Unregistered.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oauth2-cli/qui-cli",
3
- "version": "0.7.0",
3
+ "version": "0.7.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,6 +17,7 @@
17
17
  "types": "./dist/index.d.ts",
18
18
  "dependencies": {
19
19
  "@qui-cli/colors": "^3.2.3",
20
+ "oauth2-cli": "0.8.1",
20
21
  "requestish": "0.1.1"
21
22
  },
22
23
  "devDependencies": {
@@ -30,14 +31,12 @@
30
31
  "del-cli": "^7.0.0",
31
32
  "npm-run-all": "^4.1.5",
32
33
  "openid-client": "^6.8.2",
33
- "typescript": "^5.9.3",
34
- "oauth2-cli": "0.8.0"
34
+ "typescript": "^5.9.3"
35
35
  },
36
36
  "peerDependencies": {
37
- "@qui-cli/env-1password": ">=1",
37
+ "@qui-cli/env": ">=5",
38
38
  "@qui-cli/log": ">=3",
39
- "@qui-cli/plugin": ">=3",
40
- "oauth2-cli": "0.8.x"
39
+ "@qui-cli/plugin": ">=3"
41
40
  },
42
41
  "scripts": {
43
42
  "clean": "del ./dist",
package/dist/Export.d.ts DELETED
@@ -1 +0,0 @@
1
- export { ClientOptions, Credentials, Injection, Scope, WebServer } from 'oauth2-cli';
package/dist/Export.js DELETED
@@ -1 +0,0 @@
1
- export { Scope, WebServer } from 'oauth2-cli';