@oauth2-cli/qui-cli 0.5.2 → 0.5.4
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/Module.d.ts +0 -1
- package/dist/Module.js +0 -1
- package/dist/OAuth2.d.ts +2 -1
- package/dist/OAuth2.js +3 -5
- package/package.json +2 -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.5.4](https://github.com/battis/oauth2-cli/compare/qui-cli-plugin/0.5.3...qui-cli-plugin/0.5.4) (2026-01-15)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* export EnvironmentStorage from class as well as module ([01cb4ea](https://github.com/battis/oauth2-cli/commit/01cb4eaf54beebd16870adbb1b2664b4e585b14f))
|
|
11
|
+
|
|
12
|
+
## [0.5.3](https://github.com/battis/oauth2-cli/compare/qui-cli-plugin/0.5.2...qui-cli-plugin/0.5.3) (2026-01-15)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### Bug Fixes
|
|
16
|
+
|
|
17
|
+
* instantiateClient() _returns_ the client ([a302fdb](https://github.com/battis/oauth2-cli/commit/a302fdba916f68756b24319d432cc6adce09a1ba))
|
|
18
|
+
|
|
5
19
|
## [0.5.2](https://github.com/battis/oauth2-cli/compare/qui-cli-plugin/0.5.1...qui-cli-plugin/0.5.2) (2026-01-15)
|
|
6
20
|
|
|
7
21
|
|
package/dist/Module.d.ts
CHANGED
package/dist/Module.js
CHANGED
package/dist/OAuth2.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ 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
|
export * from 'oauth2-cli';
|
|
6
|
+
export * from './EnvironmentStorage.js';
|
|
6
7
|
type ParamNames = 'clientId' | 'clientSecret' | 'redirectUri' | 'authorizationEndpoint' | 'tokenEndpoint' | 'tokenPath' | 'accessToken';
|
|
7
8
|
type EnvironmentVars = Record<ParamNames, string>;
|
|
8
9
|
type SupportUrls = Record<ParamNames, URLString>;
|
|
@@ -45,7 +46,7 @@ export declare class OAuth2Plugin {
|
|
|
45
46
|
configure(proposal?: ConfigurationProposal): void;
|
|
46
47
|
options(): Plugin.Options;
|
|
47
48
|
init({ values }: Plugin.ExpectedArguments<typeof this.options>): Promise<void>;
|
|
48
|
-
protected instantiateClient(...args: ConstructorParameters<typeof OAuth2CLI.Client>):
|
|
49
|
+
protected instantiateClient(...args: ConstructorParameters<typeof OAuth2CLI.Client>): OAuth2CLI.Client;
|
|
49
50
|
getClient(): OAuth2CLI.Client;
|
|
50
51
|
getToken(): Promise<OAuth2CLI.Token | undefined>;
|
|
51
52
|
request(...args: Parameters<OAuth2CLI.Client['request']>): Promise<Response>;
|
package/dist/OAuth2.js
CHANGED
|
@@ -6,6 +6,7 @@ import path from 'node:path';
|
|
|
6
6
|
import * as OAuth2CLI from 'oauth2-cli';
|
|
7
7
|
import { EnvironmentStorage } from './EnvironmentStorage.js';
|
|
8
8
|
export * from 'oauth2-cli';
|
|
9
|
+
export * from './EnvironmentStorage.js';
|
|
9
10
|
export class OAuth2Plugin {
|
|
10
11
|
name;
|
|
11
12
|
static names = [];
|
|
@@ -142,7 +143,7 @@ export class OAuth2Plugin {
|
|
|
142
143
|
this.configure(proposal);
|
|
143
144
|
}
|
|
144
145
|
instantiateClient(...args) {
|
|
145
|
-
|
|
146
|
+
return new OAuth2CLI.Client(...args);
|
|
146
147
|
}
|
|
147
148
|
getClient() {
|
|
148
149
|
if (!this.client) {
|
|
@@ -159,7 +160,7 @@ export class OAuth2Plugin {
|
|
|
159
160
|
if (!authorization_endpoint) {
|
|
160
161
|
throw new Error('OAuth 2.0 authorization endpoint not defined');
|
|
161
162
|
}
|
|
162
|
-
this.instantiateClient({
|
|
163
|
+
this.client = this.instantiateClient({
|
|
163
164
|
client_id,
|
|
164
165
|
client_secret,
|
|
165
166
|
redirect_uri,
|
|
@@ -169,9 +170,6 @@ export class OAuth2Plugin {
|
|
|
169
170
|
store
|
|
170
171
|
});
|
|
171
172
|
}
|
|
172
|
-
if (!this.client) {
|
|
173
|
-
throw new Error('Failed to instantiate oauth2-cli Client.');
|
|
174
|
-
}
|
|
175
173
|
return this.client;
|
|
176
174
|
}
|
|
177
175
|
getToken() {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oauth2-cli/qui-cli",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.4",
|
|
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": {
|
|
@@ -43,6 +43,6 @@
|
|
|
43
43
|
"build": "run-s build:*",
|
|
44
44
|
"build:clean": "run-s clean",
|
|
45
45
|
"build:compile": "tsc",
|
|
46
|
-
"
|
|
46
|
+
"version": "commit-and-tag-version"
|
|
47
47
|
}
|
|
48
48
|
}
|