@dereekb/dbx-cli 13.22.0 → 13.24.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/eslint/index.cjs.js +2 -0
- package/eslint/index.esm.js +2 -0
- package/eslint/package.json +5 -4
- package/firebase-api-manifest/package.json +3 -3
- package/generate-firestore-indexes/main.js +2 -2
- package/generate-firestore-indexes/package.json +2 -2
- package/generate-mcp-manifest/package.json +3 -3
- package/generate-route-manifest/package.json +2 -2
- package/index.cjs.js +435 -991
- package/index.esm.js +433 -987
- package/lint-cache/package.json +2 -2
- package/manifest-extract/package.json +2 -2
- package/package.json +6 -6
- package/route/package.json +7 -7
- package/src/lib/auth/oidc.client.d.ts +7 -130
- package/src/lib/auth/oidc.flow.d.ts +9 -83
- package/src/lib/mcp-scan/manifest/css-utilities-schema.d.ts +2 -2
- package/src/lib/mcp-scan/manifest/pipes-schema.d.ts +2 -2
- package/test/package.json +9 -9
package/lint-cache/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dereekb/dbx-cli-lint-cache",
|
|
3
|
-
"version": "13.
|
|
3
|
+
"version": "13.24.0",
|
|
4
4
|
"private": true,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"devDependencies": {
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"eslint": "10.4.0"
|
|
9
9
|
},
|
|
10
10
|
"peerDependencies": {
|
|
11
|
-
"@dereekb/util": "13.
|
|
11
|
+
"@dereekb/util": "13.24.0",
|
|
12
12
|
"yargs": "^18.0.0"
|
|
13
13
|
}
|
|
14
14
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dereekb/dbx-cli/manifest-extract",
|
|
3
|
-
"version": "13.
|
|
3
|
+
"version": "13.24.0",
|
|
4
4
|
"sideEffects": false,
|
|
5
5
|
"peerDependencies": {
|
|
6
6
|
"@dereekb/date": "13.15.0",
|
|
7
|
-
"@dereekb/dbx-cli": "13.
|
|
7
|
+
"@dereekb/dbx-cli": "13.24.0",
|
|
8
8
|
"@dereekb/firebase": "13.15.0",
|
|
9
9
|
"@dereekb/model": "13.15.0",
|
|
10
10
|
"@dereekb/nestjs": "13.15.0",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dereekb/dbx-cli",
|
|
3
|
-
"version": "13.
|
|
3
|
+
"version": "13.24.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"bin": {
|
|
@@ -66,11 +66,11 @@
|
|
|
66
66
|
}
|
|
67
67
|
},
|
|
68
68
|
"peerDependencies": {
|
|
69
|
-
"@dereekb/date": "13.
|
|
70
|
-
"@dereekb/firebase": "13.
|
|
71
|
-
"@dereekb/model": "13.
|
|
72
|
-
"@dereekb/nestjs": "13.
|
|
73
|
-
"@dereekb/util": "13.
|
|
69
|
+
"@dereekb/date": "13.24.0",
|
|
70
|
+
"@dereekb/firebase": "13.24.0",
|
|
71
|
+
"@dereekb/model": "13.24.0",
|
|
72
|
+
"@dereekb/nestjs": "13.24.0",
|
|
73
|
+
"@dereekb/util": "13.24.0",
|
|
74
74
|
"@nestjs/common": "^11.1.19",
|
|
75
75
|
"arktype": "^2.2.0",
|
|
76
76
|
"jiti": "2.6.1",
|
package/route/package.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dereekb/dbx-cli/route",
|
|
3
|
-
"version": "13.
|
|
3
|
+
"version": "13.24.0",
|
|
4
4
|
"sideEffects": false,
|
|
5
5
|
"peerDependencies": {
|
|
6
|
-
"@dereekb/date": "13.
|
|
7
|
-
"@dereekb/dbx-cli": "13.
|
|
8
|
-
"@dereekb/firebase": "13.
|
|
9
|
-
"@dereekb/model": "13.
|
|
10
|
-
"@dereekb/nestjs": "13.
|
|
11
|
-
"@dereekb/util": "13.
|
|
6
|
+
"@dereekb/date": "13.24.0",
|
|
7
|
+
"@dereekb/dbx-cli": "13.24.0",
|
|
8
|
+
"@dereekb/firebase": "13.24.0",
|
|
9
|
+
"@dereekb/model": "13.24.0",
|
|
10
|
+
"@dereekb/nestjs": "13.24.0",
|
|
11
|
+
"@dereekb/util": "13.24.0"
|
|
12
12
|
},
|
|
13
13
|
"exports": {
|
|
14
14
|
"./package.json": "./package.json",
|
|
@@ -1,174 +1,51 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type DiscoverOidcMetadataInput, type ExchangeAuthorizationCodeInput, type FetchSessionInfoInput, type FetchUserInfoInput, type OidcDiscoveryMetadata, type OidcSessionInfo, type OidcTokenResponse, type RefreshAccessTokenInput, type RevokeTokenInput } from '@dereekb/util';
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
3
|
+
* Converts an {@link OidcRelyingPartyError} thrown by the shared core into the CLI's {@link CliError}
|
|
4
|
+
* (preserving message + mapped code + suggestion). Any other value is returned unchanged.
|
|
4
5
|
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
6
|
+
* @param error - The thrown value.
|
|
7
|
+
* @returns A {@link CliError} for relying-party errors, otherwise the original value.
|
|
7
8
|
*/
|
|
8
|
-
export
|
|
9
|
-
readonly issuer: string;
|
|
10
|
-
readonly authorization_endpoint: string;
|
|
11
|
-
readonly token_endpoint: string;
|
|
12
|
-
readonly userinfo_endpoint?: string;
|
|
13
|
-
readonly revocation_endpoint?: string;
|
|
14
|
-
readonly end_session_endpoint?: string;
|
|
15
|
-
readonly jwks_uri?: string;
|
|
16
|
-
readonly scopes_supported?: string[];
|
|
17
|
-
}
|
|
9
|
+
export declare function oidcRelyingPartyErrorToCliError(error: unknown): unknown;
|
|
18
10
|
/**
|
|
19
|
-
*
|
|
20
|
-
*/
|
|
21
|
-
export interface OidcTokenResponse {
|
|
22
|
-
readonly access_token: string;
|
|
23
|
-
readonly token_type?: string;
|
|
24
|
-
readonly expires_in?: number;
|
|
25
|
-
readonly refresh_token?: string;
|
|
26
|
-
readonly id_token?: string;
|
|
27
|
-
readonly scope?: string;
|
|
28
|
-
}
|
|
29
|
-
export interface DiscoverOidcMetadataInput {
|
|
30
|
-
readonly issuer: string;
|
|
31
|
-
/**
|
|
32
|
-
* Optional sibling base URL to try after the issuer-prefixed and origin-rooted paths.
|
|
33
|
-
*
|
|
34
|
-
* Useful when the discovery doc is served at `<api-base-url>/.well-known/openid-configuration`
|
|
35
|
-
* — e.g. when the issuer is reached via a different host than the API and the origin-rooted
|
|
36
|
-
* candidate would target the wrong host.
|
|
37
|
-
*/
|
|
38
|
-
readonly fallbackBaseUrl?: string;
|
|
39
|
-
}
|
|
40
|
-
/**
|
|
41
|
-
* Builds the ordered list of `.well-known/openid-configuration` URLs the CLI probes when
|
|
42
|
-
* discovering OIDC metadata.
|
|
43
|
-
*
|
|
44
|
-
* 1. `<issuer>/.well-known/openid-configuration` (OpenID Connect Discovery 1.0).
|
|
45
|
-
* 2. `<issuer-origin>/.well-known/openid-configuration` (host-rooted; matches projects that
|
|
46
|
-
* mount the discovery controller at the API/dev-server root rather than under the issuer
|
|
47
|
-
* sub-path — e.g. demo's `OidcWellKnownController`).
|
|
48
|
-
* 3. `<fallbackBaseUrl>/.well-known/openid-configuration` when supplied and not already covered.
|
|
49
|
-
*
|
|
50
|
-
* Exported so diagnostic surfaces (e.g. `doctor`) can show the exact URLs the discovery step
|
|
51
|
-
* tried — without re-implementing the candidate ordering.
|
|
52
|
-
*
|
|
53
|
-
* @param input - The discovery request.
|
|
54
|
-
* @param input.issuer - The OIDC issuer URL whose `.well-known/openid-configuration` is fetched first.
|
|
55
|
-
* @param input.fallbackBaseUrl - Optional sibling base URL appended after the issuer-prefixed and origin-rooted candidates.
|
|
56
|
-
* @returns The candidate URL list in probe order, de-duplicated.
|
|
57
|
-
*/
|
|
58
|
-
export declare function buildOidcDiscoveryCandidates(input: DiscoverOidcMetadataInput): string[];
|
|
59
|
-
/**
|
|
60
|
-
* Fetches the OIDC discovery document for the given issuer, trying the candidates returned by
|
|
61
|
-
* {@link buildOidcDiscoveryCandidates} in order.
|
|
11
|
+
* Fetches the OIDC discovery document for the given issuer.
|
|
62
12
|
*
|
|
63
13
|
* @param input - The discovery request.
|
|
64
|
-
* @param input.issuer - The OIDC issuer URL whose `.well-known/openid-configuration` is fetched first.
|
|
65
|
-
* @param input.fallbackBaseUrl - Optional sibling base URL tried after the issuer-prefixed and origin-rooted candidates.
|
|
66
14
|
* @returns The parsed {@link OidcDiscoveryMetadata}. Throws a {@link CliError} (`OIDC_DISCOVERY_FAILED`) when every candidate fails.
|
|
67
15
|
*/
|
|
68
16
|
export declare function discoverOidcMetadata(input: DiscoverOidcMetadataInput): Promise<OidcDiscoveryMetadata>;
|
|
69
|
-
export interface ExchangeAuthorizationCodeInput {
|
|
70
|
-
readonly tokenEndpoint: string;
|
|
71
|
-
readonly clientId: string;
|
|
72
|
-
readonly clientSecret: string;
|
|
73
|
-
readonly redirectUri: string;
|
|
74
|
-
readonly code: string;
|
|
75
|
-
readonly codeVerifier: string;
|
|
76
|
-
}
|
|
77
17
|
/**
|
|
78
18
|
* Exchanges an authorization code (from the redirect) for an access token + refresh token.
|
|
79
19
|
*
|
|
80
|
-
* Uses `client_secret_post` auth — the demo's oidc-provider config registers clients with that method.
|
|
81
|
-
*
|
|
82
20
|
* @param input - The token exchange parameters.
|
|
83
|
-
* @param input.tokenEndpoint - The OIDC token endpoint URL discovered from the issuer.
|
|
84
|
-
* @param input.clientId - The OAuth client ID.
|
|
85
|
-
* @param input.clientSecret - The OAuth client secret used for `client_secret_post` auth.
|
|
86
|
-
* @param input.redirectUri - The redirect URI registered with the OAuth client (must match the value used when requesting the code).
|
|
87
|
-
* @param input.code - The authorization code returned to the redirect URI.
|
|
88
|
-
* @param input.codeVerifier - The PKCE code verifier originally paired with the code challenge in the authorization request.
|
|
89
21
|
* @returns The parsed {@link OidcTokenResponse} with access/refresh tokens.
|
|
90
22
|
*/
|
|
91
23
|
export declare function exchangeAuthorizationCode(input: ExchangeAuthorizationCodeInput): Promise<OidcTokenResponse>;
|
|
92
|
-
export interface RefreshAccessTokenInput {
|
|
93
|
-
readonly tokenEndpoint: string;
|
|
94
|
-
readonly clientId: string;
|
|
95
|
-
readonly clientSecret: string;
|
|
96
|
-
readonly refreshToken: string;
|
|
97
|
-
}
|
|
98
24
|
/**
|
|
99
25
|
* Exchanges a refresh token for a new access token (and possibly a rotated refresh token).
|
|
100
26
|
*
|
|
101
27
|
* @param input - The refresh request.
|
|
102
|
-
* @param input.tokenEndpoint - The OIDC token endpoint URL discovered from the issuer.
|
|
103
|
-
* @param input.clientId - The OAuth client ID.
|
|
104
|
-
* @param input.clientSecret - The OAuth client secret used for `client_secret_post` auth.
|
|
105
|
-
* @param input.refreshToken - The cached refresh token to redeem.
|
|
106
28
|
* @returns The parsed {@link OidcTokenResponse} with the refreshed access token.
|
|
107
29
|
*/
|
|
108
30
|
export declare function refreshAccessToken(input: RefreshAccessTokenInput): Promise<OidcTokenResponse>;
|
|
109
|
-
export interface RevokeTokenInput {
|
|
110
|
-
readonly revocationEndpoint: string;
|
|
111
|
-
readonly clientId: string;
|
|
112
|
-
readonly clientSecret: string;
|
|
113
|
-
readonly token: string;
|
|
114
|
-
readonly tokenTypeHint?: 'access_token' | 'refresh_token';
|
|
115
|
-
}
|
|
116
31
|
/**
|
|
117
32
|
* Revokes an access or refresh token at the OIDC revocation endpoint.
|
|
118
33
|
*
|
|
119
34
|
* @param input - The revocation request.
|
|
120
|
-
* @param input.revocationEndpoint - The OIDC revocation endpoint URL.
|
|
121
|
-
* @param input.clientId - The OAuth client ID used for `client_secret_post` auth.
|
|
122
|
-
* @param input.clientSecret - The OAuth client secret used for `client_secret_post` auth.
|
|
123
|
-
* @param input.token - The access or refresh token to revoke.
|
|
124
|
-
* @param input.tokenTypeHint - Optional hint passed as `token_type_hint` (`access_token` or `refresh_token`).
|
|
125
35
|
* @returns Resolves when the server returns a non-error status. Throws a {@link CliError} (`TOKEN_REVOCATION_FAILED`) on error.
|
|
126
36
|
*/
|
|
127
37
|
export declare function revokeToken(input: RevokeTokenInput): Promise<void>;
|
|
128
|
-
export interface FetchUserInfoInput {
|
|
129
|
-
readonly userinfoEndpoint: string;
|
|
130
|
-
readonly accessToken: string;
|
|
131
|
-
}
|
|
132
38
|
/**
|
|
133
39
|
* Fetches the OIDC `userinfo` endpoint and returns the parsed claims object.
|
|
134
40
|
*
|
|
135
41
|
* @param input - The userinfo request.
|
|
136
|
-
* @param input.userinfoEndpoint - The OIDC userinfo endpoint URL discovered from the issuer.
|
|
137
|
-
* @param input.accessToken - The Bearer access token sent in the `Authorization` header.
|
|
138
42
|
* @returns The parsed userinfo claims. Throws a {@link CliError} (`USERINFO_FAILED`) on a non-OK response.
|
|
139
43
|
*/
|
|
140
44
|
export declare function fetchUserInfo(input: FetchUserInfoInput): Promise<Record<string, unknown>>;
|
|
141
|
-
/**
|
|
142
|
-
* Session lifetime metadata returned by the `GET /oidc/session` route.
|
|
143
|
-
*/
|
|
144
|
-
export interface OidcSessionInfo {
|
|
145
|
-
readonly sub?: string;
|
|
146
|
-
readonly scope?: Maybe<string>;
|
|
147
|
-
/**
|
|
148
|
-
* Grant (session) expiry as unix epoch SECONDS, or `null` when the provider could not resolve it.
|
|
149
|
-
*/
|
|
150
|
-
readonly expiresAt?: Maybe<number>;
|
|
151
|
-
/**
|
|
152
|
-
* Whether refresh-token rotation is disabled for this grant (a long-lived service token).
|
|
153
|
-
*/
|
|
154
|
-
readonly rotationDisabled?: boolean;
|
|
155
|
-
}
|
|
156
|
-
export interface FetchSessionInfoInput {
|
|
157
|
-
/**
|
|
158
|
-
* The `GET /oidc/session` endpoint URL (typically `<oidcIssuer>/session`).
|
|
159
|
-
*/
|
|
160
|
-
readonly sessionEndpoint: string;
|
|
161
|
-
readonly accessToken: string;
|
|
162
|
-
}
|
|
163
45
|
/**
|
|
164
46
|
* Fetches the dbx-components `GET /oidc/session` route and returns the parsed session lifetime metadata.
|
|
165
47
|
*
|
|
166
|
-
* Mirrors {@link fetchUserInfo}, but reads the access token's baked-in session-lifetime claims
|
|
167
|
-
* (`dbx_session_expires_at` / `dbx_rotation_disabled`) which userinfo does not echo.
|
|
168
|
-
*
|
|
169
48
|
* @param input - The session request.
|
|
170
|
-
* @param input.sessionEndpoint - The `GET /oidc/session` endpoint URL.
|
|
171
|
-
* @param input.accessToken - The Bearer access token sent in the `Authorization` header.
|
|
172
49
|
* @returns The parsed {@link OidcSessionInfo}. Throws a {@link CliError} (`SESSION_INFO_FAILED`) on a non-OK response.
|
|
173
50
|
*/
|
|
174
51
|
export declare function fetchSessionInfo(input: FetchSessionInfoInput): Promise<OidcSessionInfo>;
|
|
@@ -1,94 +1,18 @@
|
|
|
1
|
-
import { type
|
|
2
|
-
export interface BuildAuthorizationUrlInput {
|
|
3
|
-
readonly authorizationEndpoint: string;
|
|
4
|
-
/**
|
|
5
|
-
* Optional OIDC issuer URL (e.g. `https://api.example.com/oidc`). Used as a fallback rebase
|
|
6
|
-
* origin when `appClientUrl` is not provided — the origin of `oidcIssuer` is applied to the
|
|
7
|
-
* discovered `authorizationEndpoint`. In typical OIDC deployments the issuer and authorization
|
|
8
|
-
* endpoint share an origin, so this fallback is a no-op rebase that ends up at the discovered
|
|
9
|
-
* `/oidc/auth` URL. Use `appClientUrl` to send the user to a different origin (e.g. a frontend
|
|
10
|
-
* dev server that proxies `/oidc/**` back to the API).
|
|
11
|
-
*/
|
|
12
|
-
readonly oidcIssuer?: Maybe<string>;
|
|
13
|
-
/**
|
|
14
|
-
* Optional API base URL. Used as a fallback rebase origin when neither `appClientUrl` nor
|
|
15
|
-
* `oidcIssuer` is provided — only the origin is read, so prefix paths like `/api` are ignored.
|
|
16
|
-
* Prefer `oidcIssuer` for new deployments; `apiBaseUrl` is kept for backwards compatibility
|
|
17
|
-
* with envs that only declare an API base URL.
|
|
18
|
-
*/
|
|
19
|
-
readonly apiBaseUrl?: Maybe<string>;
|
|
20
|
-
/**
|
|
21
|
-
* Optional client origin to rebase the authorization endpoint onto.
|
|
22
|
-
*
|
|
23
|
-
* When set, the path + search of `authorizationEndpoint` are kept and the origin is replaced
|
|
24
|
-
* with this URL. Takes precedence over both `oidcIssuer` and `apiBaseUrl`. Recommended for any
|
|
25
|
-
* env where the user-facing URL should differ from the discovered authorization endpoint —
|
|
26
|
-
* e.g. a frontend dev server that proxies `/oidc/**` to the API on another port. When omitted,
|
|
27
|
-
* the URL is derived from `oidcIssuer`/`apiBaseUrl` origin (or used verbatim if neither is set),
|
|
28
|
-
* so the CLI always opens the actual authorization endpoint (typically `/oidc/auth`).
|
|
29
|
-
*/
|
|
30
|
-
readonly appClientUrl?: Maybe<string>;
|
|
31
|
-
readonly clientId: string;
|
|
32
|
-
readonly redirectUri: string;
|
|
33
|
-
readonly scopes?: string;
|
|
34
|
-
readonly state: string;
|
|
35
|
-
readonly codeChallenge: string;
|
|
36
|
-
/**
|
|
37
|
-
* Optional requested login duration in seconds. When set, the URL includes the
|
|
38
|
-
* `dbx_session_ttl=<seconds>` query param so the OIDC server applies the requested
|
|
39
|
-
* lifetime to the issued Session, Grant, and RefreshToken (subject to per-client and
|
|
40
|
-
* server caps).
|
|
41
|
-
*/
|
|
42
|
-
readonly requestedSessionTtlSeconds?: Maybe<number>;
|
|
43
|
-
}
|
|
1
|
+
import { type BuildAuthorizationUrlInput } from '@dereekb/util';
|
|
44
2
|
/**
|
|
45
3
|
* Builds the authorization URL the user opens in a browser to start the PKCE flow.
|
|
46
4
|
*
|
|
47
|
-
*
|
|
48
|
-
*
|
|
49
|
-
*
|
|
50
|
-
* deployment all three resolve to the same origin and the rebase is a no-op; in a split-host
|
|
51
|
-
* setup (frontend dev server proxying `/oidc/**` to the API) `appClientUrl` redirects the user
|
|
52
|
-
* through the frontend. When none of the three is provided, the discovered endpoint is used
|
|
53
|
-
* unchanged.
|
|
54
|
-
*
|
|
55
|
-
* Always lands at the actual authorization endpoint so oidc-provider can create an interaction
|
|
56
|
-
* and redirect to the app login page with a `uid`. (Earlier versions targeted a convenience
|
|
57
|
-
* `/oidc/login/client` redirect that forwarded query params to the app without creating an
|
|
58
|
-
* interaction — that branch is gone.)
|
|
5
|
+
* Thin CLI wrapper over the shared {@link buildAuthorizationUrlHelper}: defaults the scope to
|
|
6
|
+
* {@link DEFAULT_CLI_OIDC_SCOPES} when none is supplied, and re-wraps the shared
|
|
7
|
+
* {@link OidcRelyingPartyError} into the CLI's {@link CliError} (`AUTH_LOGIN_FOR_INVALID`).
|
|
59
8
|
*
|
|
60
|
-
* @param input - The authorization URL inputs.
|
|
61
|
-
* @param input.authorizationEndpoint - The authorization endpoint discovered from OIDC metadata.
|
|
62
|
-
* @param input.appClientUrl - Optional client origin to rebase the authorization endpoint onto. Takes precedence over `oidcIssuer` and `apiBaseUrl`.
|
|
63
|
-
* @param input.oidcIssuer - Optional OIDC issuer URL; falls back to its origin as the rebase target when `appClientUrl` is missing.
|
|
64
|
-
* @param input.apiBaseUrl - Optional API base URL; falls back to its origin as the rebase target when neither `appClientUrl` nor `oidcIssuer` is set.
|
|
65
|
-
* @param input.clientId - The OAuth client ID.
|
|
66
|
-
* @param input.redirectUri - The redirect URI registered with the OAuth client.
|
|
67
|
-
* @param input.scopes - Space-separated scope list. Defaults to {@link DEFAULT_CLI_OIDC_SCOPES}.
|
|
68
|
-
* @param input.state - The opaque OAuth state token used for CSRF protection.
|
|
69
|
-
* @param input.codeChallenge - The PKCE code challenge derived from the verifier.
|
|
9
|
+
* @param input - The authorization URL inputs. When `scopes` is omitted, the CLI default is used.
|
|
70
10
|
* @returns The full authorization URL with all OAuth params merged in.
|
|
71
11
|
* @throws {CliError} When `requestedSessionTtlSeconds` is provided but is not a positive integer.
|
|
72
12
|
*
|
|
73
13
|
* @__NO_SIDE_EFFECTS__
|
|
74
14
|
*/
|
|
75
15
|
export declare function buildAuthorizationUrl(input: BuildAuthorizationUrlInput): string;
|
|
76
|
-
export interface PkceMaterial {
|
|
77
|
-
readonly codeVerifier: string;
|
|
78
|
-
readonly codeChallenge: string;
|
|
79
|
-
}
|
|
80
|
-
/**
|
|
81
|
-
* Generates a fresh PKCE code verifier and the matching SHA-256 code challenge.
|
|
82
|
-
*
|
|
83
|
-
* @returns A {@link PkceMaterial} pair consisting of the random `codeVerifier` and its derived `codeChallenge`.
|
|
84
|
-
*/
|
|
85
|
-
export declare function generatePkceMaterial(): Promise<PkceMaterial>;
|
|
86
|
-
/**
|
|
87
|
-
* Generates a random URL-safe state value for the OAuth state parameter.
|
|
88
|
-
*
|
|
89
|
-
* @returns A 32-character hex string derived from 16 random bytes.
|
|
90
|
-
*/
|
|
91
|
-
export declare function generateOAuthState(): string;
|
|
92
16
|
export interface ParsePastedRedirectInput {
|
|
93
17
|
readonly pasted: string;
|
|
94
18
|
readonly expectedState?: string;
|
|
@@ -100,12 +24,14 @@ export interface ParsedRedirect {
|
|
|
100
24
|
/**
|
|
101
25
|
* Parses an authorization code out of a pasted redirect URL or a bare code string.
|
|
102
26
|
*
|
|
103
|
-
*
|
|
27
|
+
* Thin CLI wrapper over the shared {@link parseAuthorizationRedirect}: keeps the CLI's pasted-string
|
|
28
|
+
* input shape and re-wraps the shared {@link OidcRelyingPartyError} into the CLI's {@link CliError}
|
|
29
|
+
* (`AUTH_NO_CODE` / `AUTH_PROVIDER_ERROR` / `AUTH_REDIRECT_PARSE_FAILED` / `AUTH_STATE_MISMATCH`).
|
|
104
30
|
*
|
|
105
31
|
* @param input - The parse inputs.
|
|
106
32
|
* @param input.pasted - The redirect URL or bare authorization code pasted by the user.
|
|
107
33
|
* @param input.expectedState - Optional state value to assert against `state` when present in the URL.
|
|
108
34
|
* @returns The {@link ParsedRedirect} containing `code` and (when present) `state`.
|
|
109
|
-
* @throws {CliError} When `pasted` is empty,
|
|
35
|
+
* @throws {CliError} When `pasted` is empty, contains no `code`, or the `state` does not match.
|
|
110
36
|
*/
|
|
111
37
|
export declare function parsePastedRedirect(input: ParsePastedRedirectInput): ParsedRedirect;
|
|
@@ -106,7 +106,7 @@ export declare const CssUtilityEntry: import("arktype/internal/variants/object.t
|
|
|
106
106
|
property: string;
|
|
107
107
|
value: string;
|
|
108
108
|
}[];
|
|
109
|
-
role?: "
|
|
109
|
+
role?: "text" | "state" | "size" | "layout" | "misc" | "flex" | "spacing" | "interaction" | "color" | "text-color" | "surface" | "radius" | undefined;
|
|
110
110
|
intent?: string | undefined;
|
|
111
111
|
seeAlso?: string[] | undefined;
|
|
112
112
|
antiUse?: string | undefined;
|
|
@@ -149,7 +149,7 @@ export declare const CssUtilityManifest: import("arktype/internal/variants/objec
|
|
|
149
149
|
property: string;
|
|
150
150
|
value: string;
|
|
151
151
|
}[];
|
|
152
|
-
role?: "
|
|
152
|
+
role?: "text" | "state" | "size" | "layout" | "misc" | "flex" | "spacing" | "interaction" | "color" | "text-color" | "surface" | "radius" | undefined;
|
|
153
153
|
intent?: string | undefined;
|
|
154
154
|
seeAlso?: string[] | undefined;
|
|
155
155
|
antiUse?: string | undefined;
|
|
@@ -57,7 +57,7 @@ export type PipeArgEntry = typeof PipeArgEntry.infer;
|
|
|
57
57
|
*/
|
|
58
58
|
export declare const PipeEntry: import("arktype/internal/variants/object.ts").ObjectType<{
|
|
59
59
|
slug: string;
|
|
60
|
-
category: "
|
|
60
|
+
category: "date" | "value" | "misc" | "async";
|
|
61
61
|
pipeName: string;
|
|
62
62
|
className: string;
|
|
63
63
|
module: string;
|
|
@@ -98,7 +98,7 @@ export declare const PipeManifest: import("arktype/internal/variants/object.ts")
|
|
|
98
98
|
generator: string;
|
|
99
99
|
entries: {
|
|
100
100
|
slug: string;
|
|
101
|
-
category: "
|
|
101
|
+
category: "date" | "value" | "misc" | "async";
|
|
102
102
|
pipeName: string;
|
|
103
103
|
className: string;
|
|
104
104
|
module: string;
|
package/test/package.json
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dereekb/dbx-cli/test",
|
|
3
|
-
"version": "13.
|
|
3
|
+
"version": "13.24.0",
|
|
4
4
|
"peerDependencies": {
|
|
5
|
-
"@dereekb/date": "13.
|
|
6
|
-
"@dereekb/dbx-cli": "13.
|
|
7
|
-
"@dereekb/firebase": "13.
|
|
8
|
-
"@dereekb/firebase-server/test": "13.
|
|
9
|
-
"@dereekb/model": "13.
|
|
10
|
-
"@dereekb/nestjs": "13.
|
|
11
|
-
"@dereekb/rxjs": "13.
|
|
12
|
-
"@dereekb/util": "13.
|
|
5
|
+
"@dereekb/date": "13.24.0",
|
|
6
|
+
"@dereekb/dbx-cli": "13.24.0",
|
|
7
|
+
"@dereekb/firebase": "13.24.0",
|
|
8
|
+
"@dereekb/firebase-server/test": "13.24.0",
|
|
9
|
+
"@dereekb/model": "13.24.0",
|
|
10
|
+
"@dereekb/nestjs": "13.24.0",
|
|
11
|
+
"@dereekb/rxjs": "13.24.0",
|
|
12
|
+
"@dereekb/util": "13.24.0",
|
|
13
13
|
"@nestjs/common": "^11.1.19",
|
|
14
14
|
"arktype": "^2.2.0",
|
|
15
15
|
"vitest": "4.1.5",
|