@shware/security 3.3.1 → 3.3.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/dist/auth/index.d.cts +2 -3
- package/dist/auth/index.d.cts.map +1 -1
- package/dist/auth/index.d.mts +2 -3
- package/dist/auth/index.d.mts.map +1 -1
- package/dist/auth/types.d.cts +4 -5
- package/dist/auth/types.d.cts.map +1 -1
- package/dist/auth/types.d.mts +4 -5
- package/dist/auth/types.d.mts.map +1 -1
- package/dist/core/index.d.cts +6 -7
- package/dist/core/index.d.cts.map +1 -1
- package/dist/core/index.d.mts +6 -7
- package/dist/core/index.d.mts.map +1 -1
- package/dist/email/schema.d.cts +2 -3
- package/dist/email/schema.d.cts.map +1 -1
- package/dist/email/schema.d.mts +2 -3
- package/dist/email/schema.d.mts.map +1 -1
- package/dist/oauth2/client.d.cts +3 -4
- package/dist/oauth2/client.d.cts.map +1 -1
- package/dist/oauth2/client.d.mts +3 -4
- package/dist/oauth2/client.d.mts.map +1 -1
- package/dist/oauth2/error.d.cts +3 -4
- package/dist/oauth2/error.d.cts.map +1 -1
- package/dist/oauth2/error.d.mts +3 -4
- package/dist/oauth2/error.d.mts.map +1 -1
- package/dist/oauth2/provider/apple-client-secret.d.cts +2 -3
- package/dist/oauth2/provider/apple-client-secret.d.cts.map +1 -1
- package/dist/oauth2/provider/apple-client-secret.d.mts +2 -3
- package/dist/oauth2/provider/apple-client-secret.d.mts.map +1 -1
- package/dist/oauth2/provider/apple.d.cts +6 -7
- package/dist/oauth2/provider/apple.d.cts.map +1 -1
- package/dist/oauth2/provider/apple.d.mts +6 -7
- package/dist/oauth2/provider/apple.d.mts.map +1 -1
- package/dist/oauth2/provider/common.d.cts +5 -6
- package/dist/oauth2/provider/common.d.cts.map +1 -1
- package/dist/oauth2/provider/common.d.mts +5 -6
- package/dist/oauth2/provider/common.d.mts.map +1 -1
- package/dist/oauth2/provider/facebook.d.cts +6 -7
- package/dist/oauth2/provider/facebook.d.cts.map +1 -1
- package/dist/oauth2/provider/facebook.d.mts +6 -7
- package/dist/oauth2/provider/facebook.d.mts.map +1 -1
- package/dist/oauth2/provider/github.d.cts +4 -5
- package/dist/oauth2/provider/github.d.cts.map +1 -1
- package/dist/oauth2/provider/github.d.mts +4 -5
- package/dist/oauth2/provider/github.d.mts.map +1 -1
- package/dist/oauth2/provider/google.d.cts +6 -7
- package/dist/oauth2/provider/google.d.cts.map +1 -1
- package/dist/oauth2/provider/google.d.mts +6 -7
- package/dist/oauth2/provider/google.d.mts.map +1 -1
- package/dist/oauth2/provider/wechat.d.cts +5 -6
- package/dist/oauth2/provider/wechat.d.cts.map +1 -1
- package/dist/oauth2/provider/wechat.d.mts +5 -6
- package/dist/oauth2/provider/wechat.d.mts.map +1 -1
- package/dist/oauth2/provider/x.d.cts +6 -7
- package/dist/oauth2/provider/x.d.cts.map +1 -1
- package/dist/oauth2/provider/x.d.mts +6 -7
- package/dist/oauth2/provider/x.d.mts.map +1 -1
- package/dist/oauth2/types.d.cts +17 -18
- package/dist/oauth2/types.d.cts.map +1 -1
- package/dist/oauth2/types.d.mts +17 -18
- package/dist/oauth2/types.d.mts.map +1 -1
- package/dist/session/common.d.cts +3 -4
- package/dist/session/common.d.cts.map +1 -1
- package/dist/session/common.d.mts +3 -4
- package/dist/session/common.d.mts.map +1 -1
- package/dist/session/db.d.cts +2 -3
- package/dist/session/db.d.cts.map +1 -1
- package/dist/session/db.d.mts +2 -3
- package/dist/session/db.d.mts.map +1 -1
- package/dist/session/map-session.d.cts +1 -2
- package/dist/session/map-session.d.cts.map +1 -1
- package/dist/session/map-session.d.mts +1 -2
- package/dist/session/map-session.d.mts.map +1 -1
- package/dist/session/redis.d.cts +2 -3
- package/dist/session/redis.d.cts.map +1 -1
- package/dist/session/redis.d.mts +2 -3
- package/dist/session/redis.d.mts.map +1 -1
- package/dist/session/types.d.cts +6 -7
- package/dist/session/types.d.cts.map +1 -1
- package/dist/session/types.d.mts +6 -7
- package/dist/session/types.d.mts.map +1 -1
- package/dist/utils/http.d.cts +6 -7
- package/dist/utils/http.d.cts.map +1 -1
- package/dist/utils/http.d.mts +6 -7
- package/dist/utils/http.d.mts.map +1 -1
- package/dist/utils/oauth2.d.cts +1 -2
- package/dist/utils/oauth2.d.cts.map +1 -1
- package/dist/utils/oauth2.d.mts +1 -2
- package/dist/utils/oauth2.d.mts.map +1 -1
- package/dist/utils/timing.d.cts +1 -2
- package/dist/utils/timing.d.cts.map +1 -1
- package/dist/utils/timing.d.mts +1 -2
- package/dist/utils/timing.d.mts.map +1 -1
- package/dist/utils/valid.d.cts +3 -4
- package/dist/utils/valid.d.cts.map +1 -1
- package/dist/utils/valid.d.mts +3 -4
- package/dist/utils/valid.d.mts.map +1 -1
- package/package.json +6 -6
package/dist/oauth2/types.d.mts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
//#region src/oauth2/types.d.ts
|
|
2
|
-
interface PkceParameters {
|
|
2
|
+
export interface PkceParameters {
|
|
3
3
|
code_verifier: string;
|
|
4
4
|
code_challenge: string;
|
|
5
5
|
code_challenge_method: 'S256' | 'plain';
|
|
6
6
|
}
|
|
7
|
-
interface OAuth2AuthorizationRequest {
|
|
7
|
+
export interface OAuth2AuthorizationRequest {
|
|
8
8
|
state: string;
|
|
9
9
|
registrationId: string;
|
|
10
10
|
authorizationRequestUri: string;
|
|
@@ -17,31 +17,31 @@ interface CreateAuthorizationUriParams {
|
|
|
17
17
|
scope: string[] | undefined;
|
|
18
18
|
pkce?: Omit<PkceParameters, 'code_verifier'>;
|
|
19
19
|
}
|
|
20
|
-
interface ExchangeCodeParams {
|
|
20
|
+
export interface ExchangeCodeParams {
|
|
21
21
|
code: string;
|
|
22
22
|
clientId: string;
|
|
23
23
|
clientSecret: string;
|
|
24
24
|
redirectUri: string;
|
|
25
25
|
pkce?: Omit<PkceParameters, 'code_challenge' | 'code_challenge_method'>;
|
|
26
26
|
}
|
|
27
|
-
interface RefreshTokenParams {
|
|
27
|
+
export interface RefreshTokenParams {
|
|
28
28
|
clientId: string;
|
|
29
29
|
clientSecret: string;
|
|
30
30
|
refreshToken: string;
|
|
31
31
|
}
|
|
32
|
-
interface RevokeTokenParams {
|
|
32
|
+
export interface RevokeTokenParams {
|
|
33
33
|
token: string;
|
|
34
34
|
clientId: string;
|
|
35
35
|
clientSecret: string;
|
|
36
36
|
}
|
|
37
|
-
interface LoginOAuth2NativeParams {
|
|
37
|
+
export interface LoginOAuth2NativeParams {
|
|
38
38
|
clientId: string;
|
|
39
39
|
clientSecret: string;
|
|
40
40
|
redirectUri: string;
|
|
41
41
|
pkce?: PkceParameters;
|
|
42
42
|
credentials: NativeCredential;
|
|
43
43
|
}
|
|
44
|
-
interface OAuth2Token {
|
|
44
|
+
export interface OAuth2Token {
|
|
45
45
|
/**
|
|
46
46
|
* REQUIRED.
|
|
47
47
|
* The access token issued by the authorization server.
|
|
@@ -75,10 +75,10 @@ interface OAuth2Token {
|
|
|
75
75
|
id_token?: string;
|
|
76
76
|
[key: string]: unknown;
|
|
77
77
|
}
|
|
78
|
-
interface OidcToken extends OAuth2Token {
|
|
78
|
+
export interface OidcToken extends OAuth2Token {
|
|
79
79
|
id_token: string;
|
|
80
80
|
}
|
|
81
|
-
type NativeCredential = {
|
|
81
|
+
export type NativeCredential = {
|
|
82
82
|
state?: string;
|
|
83
83
|
code?: string;
|
|
84
84
|
client_id?: string;
|
|
@@ -86,9 +86,9 @@ type NativeCredential = {
|
|
|
86
86
|
id_token?: string;
|
|
87
87
|
access_token?: string;
|
|
88
88
|
};
|
|
89
|
-
declare const OIDC_SCOPES: readonly ['openid', 'profile', 'email', 'phone', 'address', 'offline_access'];
|
|
90
|
-
type OidcScope = (typeof OIDC_SCOPES)[number];
|
|
91
|
-
interface StandardClaims {
|
|
89
|
+
export declare const OIDC_SCOPES: readonly ['openid', 'profile', 'email', 'phone', 'address', 'offline_access'];
|
|
90
|
+
export type OidcScope = (typeof OIDC_SCOPES)[number];
|
|
91
|
+
export interface StandardClaims {
|
|
92
92
|
sub: string;
|
|
93
93
|
name?: string;
|
|
94
94
|
given_name?: string;
|
|
@@ -117,11 +117,11 @@ interface StandardClaims {
|
|
|
117
117
|
};
|
|
118
118
|
updated_at?: number;
|
|
119
119
|
}
|
|
120
|
-
interface UserInfo<T = unknown> {
|
|
120
|
+
export interface UserInfo<T = unknown> {
|
|
121
121
|
claims: StandardClaims;
|
|
122
122
|
data: T;
|
|
123
123
|
}
|
|
124
|
-
interface Provider {
|
|
124
|
+
export interface Provider {
|
|
125
125
|
/** Authorization URI for the provider. */
|
|
126
126
|
authorizationUri: string;
|
|
127
127
|
/** Token URI for the provider. */
|
|
@@ -162,13 +162,13 @@ interface Provider {
|
|
|
162
162
|
userInfo: UserInfo;
|
|
163
163
|
}>;
|
|
164
164
|
}
|
|
165
|
-
interface OneTapProvider extends Provider {
|
|
165
|
+
export interface OneTapProvider extends Provider {
|
|
166
166
|
getTokenInfo: (id_token: string) => Promise<{
|
|
167
167
|
token: OAuth2Token;
|
|
168
168
|
userInfo: UserInfo;
|
|
169
169
|
}>;
|
|
170
170
|
}
|
|
171
|
-
interface Registration {
|
|
171
|
+
export interface Registration {
|
|
172
172
|
/**
|
|
173
173
|
* Reference to the OAuth 2.0 provider to use. May reference an element from the 'provider'
|
|
174
174
|
* property or used one of the commonly used providers (google, github, facebook, okta).
|
|
@@ -189,7 +189,7 @@ interface Registration {
|
|
|
189
189
|
/** Client name. May be left blank when using a pre-defined provider. */
|
|
190
190
|
clientName?: string;
|
|
191
191
|
}
|
|
192
|
-
interface OAuth2ClientConfig {
|
|
192
|
+
export interface OAuth2ClientConfig {
|
|
193
193
|
baseUri: string;
|
|
194
194
|
errorUri: string;
|
|
195
195
|
successUri: string;
|
|
@@ -203,5 +203,4 @@ interface OAuth2ClientConfig {
|
|
|
203
203
|
}>);
|
|
204
204
|
}
|
|
205
205
|
//#endregion
|
|
206
|
-
export { ExchangeCodeParams, LoginOAuth2NativeParams, NativeCredential, OAuth2AuthorizationRequest, OAuth2ClientConfig, OAuth2Token, OIDC_SCOPES, OidcScope, OidcToken, OneTapProvider, PkceParameters, Provider, RefreshTokenParams, Registration, RevokeTokenParams, StandardClaims, UserInfo };
|
|
207
206
|
//# sourceMappingURL=types.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.mts","names":[],"sources":["../../src/oauth2/types.ts"],"mappings":";
|
|
1
|
+
{"version":3,"file":"types.d.mts","names":[],"sources":["../../src/oauth2/types.ts"],"mappings":";iBACiB;EACf;EACA;EACA;;iBAGe;EACf;EACA;EACA;EACA,sBAAsB;;UAGd;EACR;EACA;EACA;EACA;EACA,OAAO,KAAK;;iBAGG;EACf;EACA;EACA;EACA;EACA,OAAO,KAAK;;iBAGG;EACf;EACA;EACA;;iBAGe;EACf;EACA;EACA;;iBAGe;EACf;EACA;EACA;EACA,OAAO;EACP,aAAa;;iBAIE;;;;;EAKf;;;;;EAMA;;;;;;;;EASA;;;;;;EAOA;;;;;;EAOA;EAEA;GAEC;;iBAGc,kBAAkB;EACjC;;YAGU;EACV;EACA;EACA;EACA;EACA;EACA;;qBAGW;YASD,oBAAoB;iBAGf;EACf;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;IACE;IACA;IACA;IACA;IACA;IACA;;EAEF;;iBAGe,SAAS;EACxB,QAAQ;EACR,MAAM;;iBAGS;;EAEf;;EAGA;;EAGA;;EAGA;;EAGA;;EAGA;;;;EAKA;;EAGA;;;;;EAMA;;EAGA;;EAGA,yBAAyB,QAAQ,iCAAiC;;EAGlE,4BAA4B,QAAQ,uBAAuB,QAAQ;;EAGnE,cAAc,OAAO,gBAAgB,QAAQ;;EAG7C,sBAAsB,QAAQ,uBAAuB,QAAQ;;EAG7D,eAAe,QAAQ,sBAAsB;EAE7C,qBACE,QAAQ,4BACL;IAAU,OAAO;IAAa,UAAU;;;iBAG9B,uBAAuB;EACtC,eAAe,qBAAqB;IAAU,OAAO;IAAa,UAAU;;;iBAG7D;;;;;EAKf;;EAGA;;EAGA;;EAGA;;EAGA;;EAYA;;EAGA;;EAGA;;iBAGe;EACf;EACA;EACA;EACA;KAAa,eAAe;;EAC5B;KACO,eAAe;aACX;KAAW,eAAe"}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { Session } from "./types.cjs";
|
|
2
2
|
//#region src/session/common.d.ts
|
|
3
|
-
declare const SPRING_SECURITY_CONTEXT = "SPRING_SECURITY_CONTEXT";
|
|
4
|
-
declare const PRINCIPAL_NAME_INDEX_NAME = "org.springframework.session.FindByIndexNameSessionRepository.PRINCIPAL_NAME_INDEX_NAME";
|
|
5
|
-
declare function resolveIndexesFor(session: Session): string | null;
|
|
3
|
+
export declare const SPRING_SECURITY_CONTEXT = "SPRING_SECURITY_CONTEXT";
|
|
4
|
+
export declare const PRINCIPAL_NAME_INDEX_NAME = "org.springframework.session.FindByIndexNameSessionRepository.PRINCIPAL_NAME_INDEX_NAME";
|
|
5
|
+
export declare function resolveIndexesFor(session: Session): string | null;
|
|
6
6
|
//#endregion
|
|
7
|
-
export { PRINCIPAL_NAME_INDEX_NAME, SPRING_SECURITY_CONTEXT, resolveIndexesFor };
|
|
8
7
|
//# sourceMappingURL=common.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"common.d.cts","names":[],"sources":["../../src/session/common.ts"],"mappings":";;
|
|
1
|
+
{"version":3,"file":"common.d.cts","names":[],"sources":["../../src/session/common.ts"],"mappings":";;qBAEa;qBACA;wBAEG,kBAAkB,SAAS"}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { Session } from "./types.mjs";
|
|
2
2
|
//#region src/session/common.d.ts
|
|
3
|
-
declare const SPRING_SECURITY_CONTEXT = "SPRING_SECURITY_CONTEXT";
|
|
4
|
-
declare const PRINCIPAL_NAME_INDEX_NAME = "org.springframework.session.FindByIndexNameSessionRepository.PRINCIPAL_NAME_INDEX_NAME";
|
|
5
|
-
declare function resolveIndexesFor(session: Session): string | null;
|
|
3
|
+
export declare const SPRING_SECURITY_CONTEXT = "SPRING_SECURITY_CONTEXT";
|
|
4
|
+
export declare const PRINCIPAL_NAME_INDEX_NAME = "org.springframework.session.FindByIndexNameSessionRepository.PRINCIPAL_NAME_INDEX_NAME";
|
|
5
|
+
export declare function resolveIndexesFor(session: Session): string | null;
|
|
6
6
|
//#endregion
|
|
7
|
-
export { PRINCIPAL_NAME_INDEX_NAME, SPRING_SECURITY_CONTEXT, resolveIndexesFor };
|
|
8
7
|
//# sourceMappingURL=common.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"common.d.mts","names":[],"sources":["../../src/session/common.ts"],"mappings":";;
|
|
1
|
+
{"version":3,"file":"common.d.mts","names":[],"sources":["../../src/session/common.ts"],"mappings":";;qBAEa;qBACA;wBAEG,kBAAkB,SAAS"}
|
package/dist/session/db.d.cts
CHANGED
|
@@ -16,14 +16,14 @@ declare class DBSession extends MapSession {
|
|
|
16
16
|
primaryId: string;
|
|
17
17
|
constructor(cached: MapSession, isNew: boolean);
|
|
18
18
|
}
|
|
19
|
-
interface DBAdapter {
|
|
19
|
+
export interface DBAdapter {
|
|
20
20
|
save(session: SessionEntity): Promise<void>;
|
|
21
21
|
deleteById(sessionId: string): Promise<void>;
|
|
22
22
|
findById(sessionId: string): Promise<SessionEntity | null>;
|
|
23
23
|
findByPrincipalName(principalName: string): Promise<SessionEntity[]>;
|
|
24
24
|
cleanupExpiredSessions(cleanupCount?: number): Promise<void>;
|
|
25
25
|
}
|
|
26
|
-
declare class DBIndexedSessionRepository implements SessionRepository<DBSession> {
|
|
26
|
+
export declare class DBIndexedSessionRepository implements SessionRepository<DBSession> {
|
|
27
27
|
private defaultMaxInactiveInterval;
|
|
28
28
|
private readonly db;
|
|
29
29
|
constructor(db: DBAdapter);
|
|
@@ -40,5 +40,4 @@ declare class DBIndexedSessionRepository implements SessionRepository<DBSession>
|
|
|
40
40
|
cleanupExpiredSessions(cleanupCount?: number): Promise<void>;
|
|
41
41
|
}
|
|
42
42
|
//#endregion
|
|
43
|
-
export { DBAdapter, DBIndexedSessionRepository };
|
|
44
43
|
//# sourceMappingURL=db.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"db.d.cts","names":[],"sources":["../../src/session/db.ts"],"mappings":";;;UAKU;EACR;EACA;EACA;EACA;EACA;EACA;EAEA,YAAY;EACZ;;cAGI,kBAAkB;EACf;EACA;EAEP,YAAY,QAAQ,YAAY;;
|
|
1
|
+
{"version":3,"file":"db.d.cts","names":[],"sources":["../../src/session/db.ts"],"mappings":";;;UAKU;EACR;EACA;EACA;EACA;EACA;EACA;EAEA,YAAY;EACZ;;cAGI,kBAAkB;EACf;EACA;EAEP,YAAY,QAAQ,YAAY;;iBAOjB;EACf,KAAK,SAAS,gBAAgB;EAC9B,WAAW,oBAAoB;EAC/B,SAAS,oBAAoB,QAAQ;EACrC,oBAAoB,wBAAwB,QAAQ;EACpD,uBAAuB,wBAAwB;;qBAGpC,sCAAsC,kBAAkB;UAC3D;mBACS;EAEjB,YAAY,IAAI;EAIhB,8BAA8B;UAItB;UAmBA;UAeM;EAOd,iBAAa;EAMP,KAAK,SAAS,YAAS;EAMvB,SAAS,oBAAoB,QAAQ;EAIrC,WAAW,oBAAiB;EAI5B,6BACJ,mBACA,qBACC,QAAQ,YAAY;EAkBjB,oBAAoB,wBAAwB,QAAQ,YAAY;EAIhE,uBAAuB,wBAAwB"}
|
package/dist/session/db.d.mts
CHANGED
|
@@ -16,14 +16,14 @@ declare class DBSession extends MapSession {
|
|
|
16
16
|
primaryId: string;
|
|
17
17
|
constructor(cached: MapSession, isNew: boolean);
|
|
18
18
|
}
|
|
19
|
-
interface DBAdapter {
|
|
19
|
+
export interface DBAdapter {
|
|
20
20
|
save(session: SessionEntity): Promise<void>;
|
|
21
21
|
deleteById(sessionId: string): Promise<void>;
|
|
22
22
|
findById(sessionId: string): Promise<SessionEntity | null>;
|
|
23
23
|
findByPrincipalName(principalName: string): Promise<SessionEntity[]>;
|
|
24
24
|
cleanupExpiredSessions(cleanupCount?: number): Promise<void>;
|
|
25
25
|
}
|
|
26
|
-
declare class DBIndexedSessionRepository implements SessionRepository<DBSession> {
|
|
26
|
+
export declare class DBIndexedSessionRepository implements SessionRepository<DBSession> {
|
|
27
27
|
private defaultMaxInactiveInterval;
|
|
28
28
|
private readonly db;
|
|
29
29
|
constructor(db: DBAdapter);
|
|
@@ -40,5 +40,4 @@ declare class DBIndexedSessionRepository implements SessionRepository<DBSession>
|
|
|
40
40
|
cleanupExpiredSessions(cleanupCount?: number): Promise<void>;
|
|
41
41
|
}
|
|
42
42
|
//#endregion
|
|
43
|
-
export { DBAdapter, DBIndexedSessionRepository };
|
|
44
43
|
//# sourceMappingURL=db.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"db.d.mts","names":[],"sources":["../../src/session/db.ts"],"mappings":";;;UAKU;EACR;EACA;EACA;EACA;EACA;EACA;EAEA,YAAY;EACZ;;cAGI,kBAAkB;EACf;EACA;EAEP,YAAY,QAAQ,YAAY;;
|
|
1
|
+
{"version":3,"file":"db.d.mts","names":[],"sources":["../../src/session/db.ts"],"mappings":";;;UAKU;EACR;EACA;EACA;EACA;EACA;EACA;EAEA,YAAY;EACZ;;cAGI,kBAAkB;EACf;EACA;EAEP,YAAY,QAAQ,YAAY;;iBAOjB;EACf,KAAK,SAAS,gBAAgB;EAC9B,WAAW,oBAAoB;EAC/B,SAAS,oBAAoB,QAAQ;EACrC,oBAAoB,wBAAwB,QAAQ;EACpD,uBAAuB,wBAAwB;;qBAGpC,sCAAsC,kBAAkB;UAC3D;mBACS;EAEjB,YAAY,IAAI;EAIhB,8BAA8B;UAItB;UAmBA;UAeM;EAOd,iBAAa;EAMP,KAAK,SAAS,YAAS;EAMvB,SAAS,oBAAoB,QAAQ;EAIrC,WAAW,oBAAiB;EAI5B,6BACJ,mBACA,qBACC,QAAQ,YAAY;EAkBjB,oBAAoB,wBAAwB,QAAQ,YAAY;EAIhE,uBAAuB,wBAAwB"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Session } from "./types.cjs";
|
|
2
2
|
//#region src/session/map-session.d.ts
|
|
3
|
-
declare class MapSession implements Session {
|
|
3
|
+
export declare class MapSession implements Session {
|
|
4
4
|
private id;
|
|
5
5
|
private readonly sessionAttrs;
|
|
6
6
|
private creationTime;
|
|
@@ -23,5 +23,4 @@ declare class MapSession implements Session {
|
|
|
23
23
|
isExpired(): boolean;
|
|
24
24
|
}
|
|
25
25
|
//#endregion
|
|
26
|
-
export { MapSession };
|
|
27
26
|
//# sourceMappingURL=map-session.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"map-session.d.cts","names":[],"sources":["../../src/session/map-session.ts"],"mappings":";;
|
|
1
|
+
{"version":3,"file":"map-session.d.cts","names":[],"sources":["../../src/session/map-session.ts"],"mappings":";;qBASa,sBAAsB;UACzB;mBACS;UACT;UACA;UACA;EAER,YAAY;EACZ,YAAY,SAAS;EAuBrB,gBAAgB;EAKhB;EAIA;EAMA,aAAa;EAIb;EAIA,aAAa,cAAc;EAQ3B,gBAAgB;EAIhB;EAIA;EAIA,oBAAoB;EAIpB;EAIA,uBAAuB;EAIvB"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Session } from "./types.mjs";
|
|
2
2
|
//#region src/session/map-session.d.ts
|
|
3
|
-
declare class MapSession implements Session {
|
|
3
|
+
export declare class MapSession implements Session {
|
|
4
4
|
private id;
|
|
5
5
|
private readonly sessionAttrs;
|
|
6
6
|
private creationTime;
|
|
@@ -23,5 +23,4 @@ declare class MapSession implements Session {
|
|
|
23
23
|
isExpired(): boolean;
|
|
24
24
|
}
|
|
25
25
|
//#endregion
|
|
26
|
-
export { MapSession };
|
|
27
26
|
//# sourceMappingURL=map-session.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"map-session.d.mts","names":[],"sources":["../../src/session/map-session.ts"],"mappings":";;
|
|
1
|
+
{"version":3,"file":"map-session.d.mts","names":[],"sources":["../../src/session/map-session.ts"],"mappings":";;qBASa,sBAAsB;UACzB;mBACS;UACT;UACA;UACA;EAER,YAAY;EACZ,YAAY,SAAS;EAuBrB,gBAAgB;EAKhB;EAIA;EAMA,aAAa;EAIb;EAIA,aAAa,cAAc;EAQ3B,gBAAgB;EAIhB;EAIA;EAIA,oBAAoB;EAIpB;EAIA,uBAAuB;EAIvB"}
|
package/dist/session/redis.d.cts
CHANGED
|
@@ -24,7 +24,7 @@ declare class RedisSession implements Session {
|
|
|
24
24
|
setAttribute(name: string, value: string): void;
|
|
25
25
|
removeAttribute(name: string): void;
|
|
26
26
|
}
|
|
27
|
-
declare class RedisIndexedSessionRepository implements SessionRepository<RedisSession> {
|
|
27
|
+
export declare class RedisIndexedSessionRepository implements SessionRepository<RedisSession> {
|
|
28
28
|
private readonly redis;
|
|
29
29
|
private readonly namespace;
|
|
30
30
|
private readonly expirationStore;
|
|
@@ -46,7 +46,7 @@ declare class RedisIndexedSessionRepository implements SessionRepository<RedisSe
|
|
|
46
46
|
findByPrincipalName(principalName: string): Promise<Map<string, RedisSession>>;
|
|
47
47
|
cleanupExpiredSessions(cleanupCount?: number): Promise<void>;
|
|
48
48
|
}
|
|
49
|
-
declare class RedisKVRepository implements KVRepository {
|
|
49
|
+
export declare class RedisKVRepository implements KVRepository {
|
|
50
50
|
private readonly redis;
|
|
51
51
|
constructor(redis: Redis);
|
|
52
52
|
setItem(key: string, value: string, expiresIn?: number): Promise<void>;
|
|
@@ -54,5 +54,4 @@ declare class RedisKVRepository implements KVRepository {
|
|
|
54
54
|
removeItem(key: string): Promise<void>;
|
|
55
55
|
}
|
|
56
56
|
//#endregion
|
|
57
|
-
export { RedisIndexedSessionRepository, RedisKVRepository };
|
|
58
57
|
//# sourceMappingURL=redis.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"redis.d.cts","names":[],"sources":["../../src/session/redis.ts"],"mappings":";;;;cAWM,wBAAwB;mBACX;EAEV;EACA,OAAK;EACL;EACA;EACA;EAEP,YAAY,QAAQ,YAAY;EAiBhC,sBAAsB;EAKtB,oBAAoB;EAKpB;EAIA;EAIA;EAIA;EAIA;EAIA,uBAAuB;EAKvB;EAIA,aAAa;EAIb;EAIA,aAAa,cAAc;EAK3B,gBAAgB;;
|
|
1
|
+
{"version":3,"file":"redis.d.cts","names":[],"sources":["../../src/session/redis.ts"],"mappings":";;;;cAWM,wBAAwB;mBACX;EAEV;EACA,OAAK;EACL;EACA;EACA;EAEP,YAAY,QAAQ,YAAY;EAiBhC,sBAAsB;EAKtB,oBAAoB;EAKpB;EAIA;EAIA;EAIA;EAIA;EAIA,uBAAuB;EAKvB;EAIA,aAAa;EAIb;EAIA,aAAa,cAAc;EAK3B,gBAAgB;;qBA6DL,yCAAyC,kBAAkB;mBACrD;mBACA;mBACA;UAET;EAER,YAAY,OAAO,OAAO,YAAW;EAMrC,8BAA8B;UAItB;UAIA;UAIA;UAIA;UAIM;UAyBA;UAgEA;EAuBd,iBAAa;EAMP,KAAK,SAAS,eAAY;EAK1B,SAAS,oBAAoB,QAAQ;EAIrC,WAAW,oBAAiB;EAkB5B,6BAA6B,mBAAmB,qBAAkB,QAAA,YAAA;EAoBlE,oBAAoB,wBAAqB,QAAA,YAAA;EAIzC,uBAAuB,wBAAqB;;qBAKvC,6BAA6B;mBACvB;EAEjB,YAAY,OAAO;EAIb,QAAQ,aAAa,eAAe,qBAAkB;EAQtD,QAAQ,cAAc;EAItB,WAAW,cAAW"}
|
package/dist/session/redis.d.mts
CHANGED
|
@@ -24,7 +24,7 @@ declare class RedisSession implements Session {
|
|
|
24
24
|
setAttribute(name: string, value: string): void;
|
|
25
25
|
removeAttribute(name: string): void;
|
|
26
26
|
}
|
|
27
|
-
declare class RedisIndexedSessionRepository implements SessionRepository<RedisSession> {
|
|
27
|
+
export declare class RedisIndexedSessionRepository implements SessionRepository<RedisSession> {
|
|
28
28
|
private readonly redis;
|
|
29
29
|
private readonly namespace;
|
|
30
30
|
private readonly expirationStore;
|
|
@@ -46,7 +46,7 @@ declare class RedisIndexedSessionRepository implements SessionRepository<RedisSe
|
|
|
46
46
|
findByPrincipalName(principalName: string): Promise<Map<string, RedisSession>>;
|
|
47
47
|
cleanupExpiredSessions(cleanupCount?: number): Promise<void>;
|
|
48
48
|
}
|
|
49
|
-
declare class RedisKVRepository implements KVRepository {
|
|
49
|
+
export declare class RedisKVRepository implements KVRepository {
|
|
50
50
|
private readonly redis;
|
|
51
51
|
constructor(redis: Redis);
|
|
52
52
|
setItem(key: string, value: string, expiresIn?: number): Promise<void>;
|
|
@@ -54,5 +54,4 @@ declare class RedisKVRepository implements KVRepository {
|
|
|
54
54
|
removeItem(key: string): Promise<void>;
|
|
55
55
|
}
|
|
56
56
|
//#endregion
|
|
57
|
-
export { RedisIndexedSessionRepository, RedisKVRepository };
|
|
58
57
|
//# sourceMappingURL=redis.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"redis.d.mts","names":[],"sources":["../../src/session/redis.ts"],"mappings":";;;;cAWM,wBAAwB;mBACX;EAEV;EACA,OAAK;EACL;EACA;EACA;EAEP,YAAY,QAAQ,YAAY;EAiBhC,sBAAsB;EAKtB,oBAAoB;EAKpB;EAIA;EAIA;EAIA;EAIA;EAIA,uBAAuB;EAKvB;EAIA,aAAa;EAIb;EAIA,aAAa,cAAc;EAK3B,gBAAgB;;
|
|
1
|
+
{"version":3,"file":"redis.d.mts","names":[],"sources":["../../src/session/redis.ts"],"mappings":";;;;cAWM,wBAAwB;mBACX;EAEV;EACA,OAAK;EACL;EACA;EACA;EAEP,YAAY,QAAQ,YAAY;EAiBhC,sBAAsB;EAKtB,oBAAoB;EAKpB;EAIA;EAIA;EAIA;EAIA;EAIA,uBAAuB;EAKvB;EAIA,aAAa;EAIb;EAIA,aAAa,cAAc;EAK3B,gBAAgB;;qBA6DL,yCAAyC,kBAAkB;mBACrD;mBACA;mBACA;UAET;EAER,YAAY,OAAO,OAAO,YAAW;EAMrC,8BAA8B;UAItB;UAIA;UAIA;UAIA;UAIM;UAyBA;UAgEA;EAuBd,iBAAa;EAMP,KAAK,SAAS,eAAY;EAK1B,SAAS,oBAAoB,QAAQ;EAIrC,WAAW,oBAAiB;EAkB5B,6BAA6B,mBAAmB,qBAAkB,QAAA,YAAA;EAoBlE,oBAAoB,wBAAqB,QAAA,YAAA;EAIzC,uBAAuB,wBAAqB;;qBAKvC,6BAA6B;mBACvB;EAEjB,YAAY,OAAO;EAIb,QAAQ,aAAa,eAAe,qBAAkB;EAQtD,QAAQ,cAAc;EAItB,WAAW,cAAW"}
|
package/dist/session/types.d.cts
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { Principal } from "../core/index.cjs";
|
|
2
2
|
//#region src/session/types.d.ts
|
|
3
|
-
interface Authentication extends Principal {
|
|
3
|
+
export interface Authentication extends Principal {
|
|
4
4
|
'@class': string;
|
|
5
5
|
principal?: Principal;
|
|
6
6
|
authorities?: string[];
|
|
7
7
|
credentials?: object;
|
|
8
8
|
details?: object;
|
|
9
9
|
}
|
|
10
|
-
interface SecurityContext {
|
|
10
|
+
export interface SecurityContext {
|
|
11
11
|
'@class': string;
|
|
12
12
|
authentication?: Authentication;
|
|
13
13
|
}
|
|
14
|
-
type Namespace = `${string}:session`;
|
|
15
|
-
interface Session {
|
|
14
|
+
export type Namespace = `${string}:session`;
|
|
15
|
+
export interface Session {
|
|
16
16
|
getId(): string;
|
|
17
17
|
changeSessionId(): string;
|
|
18
18
|
getAttribute(name: string): string | number | null;
|
|
@@ -26,7 +26,7 @@ interface Session {
|
|
|
26
26
|
setMaxInactiveInterval(interval: number): void;
|
|
27
27
|
isExpired(): boolean;
|
|
28
28
|
}
|
|
29
|
-
interface SessionRepository<S extends Session = Session> {
|
|
29
|
+
export interface SessionRepository<S extends Session = Session> {
|
|
30
30
|
createSession(): S;
|
|
31
31
|
save(session: S): Promise<void>;
|
|
32
32
|
findById(sessionId: string): Promise<S | null>;
|
|
@@ -35,11 +35,10 @@ interface SessionRepository<S extends Session = Session> {
|
|
|
35
35
|
findByPrincipalName(principalName: string): Promise<Map<string, S>>;
|
|
36
36
|
cleanupExpiredSessions(cleanupCount?: number): Promise<void>;
|
|
37
37
|
}
|
|
38
|
-
interface KVRepository {
|
|
38
|
+
export interface KVRepository {
|
|
39
39
|
setItem(key: string, value: string, expiresIn?: number): Promise<void>;
|
|
40
40
|
getItem(key: string): Promise<string | null>;
|
|
41
41
|
removeItem(key: string): Promise<void>;
|
|
42
42
|
}
|
|
43
43
|
//#endregion
|
|
44
|
-
export { Authentication, KVRepository, Namespace, SecurityContext, Session, SessionRepository };
|
|
45
44
|
//# sourceMappingURL=types.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.cts","names":[],"sources":["../../src/session/types.ts"],"mappings":";;
|
|
1
|
+
{"version":3,"file":"types.d.cts","names":[],"sources":["../../src/session/types.ts"],"mappings":";;iBAEiB,uBAAuB;EACtC;EACA,YAAY;EACZ;EACA;EACA;;iBAGe;EACf;EACA,iBAAiB;;YAGP;iBAGK;EACf;EACA;EAEA,aAAa;EACb;EACA,aAAa,cAAc;EAC3B,gBAAgB;EAEhB;EACA;EACA,oBAAoB;EAEpB;EACA,uBAAuB;EAEvB;;iBAGe,kBAAkB,UAAU,UAAU;EACrD,iBAAiB;EACjB,KAAK,SAAS,IAAI;EAClB,SAAS,oBAAoB,QAAQ;EACrC,WAAW,oBAAoB;EAG/B,6BAA6B,mBAAmB,qBAAqB,QAAQ,YAAY;EACzF,oBAAoB,wBAAwB,QAAQ,YAAY;EAGhE,uBAAuB,wBAAwB;;iBAGhC;EACf,QAAQ,aAAa,eAAe,qBAAqB;EACzD,QAAQ,cAAc;EACtB,WAAW,cAAc"}
|
package/dist/session/types.d.mts
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { Principal } from "../core/index.mjs";
|
|
2
2
|
//#region src/session/types.d.ts
|
|
3
|
-
interface Authentication extends Principal {
|
|
3
|
+
export interface Authentication extends Principal {
|
|
4
4
|
'@class': string;
|
|
5
5
|
principal?: Principal;
|
|
6
6
|
authorities?: string[];
|
|
7
7
|
credentials?: object;
|
|
8
8
|
details?: object;
|
|
9
9
|
}
|
|
10
|
-
interface SecurityContext {
|
|
10
|
+
export interface SecurityContext {
|
|
11
11
|
'@class': string;
|
|
12
12
|
authentication?: Authentication;
|
|
13
13
|
}
|
|
14
|
-
type Namespace = `${string}:session`;
|
|
15
|
-
interface Session {
|
|
14
|
+
export type Namespace = `${string}:session`;
|
|
15
|
+
export interface Session {
|
|
16
16
|
getId(): string;
|
|
17
17
|
changeSessionId(): string;
|
|
18
18
|
getAttribute(name: string): string | number | null;
|
|
@@ -26,7 +26,7 @@ interface Session {
|
|
|
26
26
|
setMaxInactiveInterval(interval: number): void;
|
|
27
27
|
isExpired(): boolean;
|
|
28
28
|
}
|
|
29
|
-
interface SessionRepository<S extends Session = Session> {
|
|
29
|
+
export interface SessionRepository<S extends Session = Session> {
|
|
30
30
|
createSession(): S;
|
|
31
31
|
save(session: S): Promise<void>;
|
|
32
32
|
findById(sessionId: string): Promise<S | null>;
|
|
@@ -35,11 +35,10 @@ interface SessionRepository<S extends Session = Session> {
|
|
|
35
35
|
findByPrincipalName(principalName: string): Promise<Map<string, S>>;
|
|
36
36
|
cleanupExpiredSessions(cleanupCount?: number): Promise<void>;
|
|
37
37
|
}
|
|
38
|
-
interface KVRepository {
|
|
38
|
+
export interface KVRepository {
|
|
39
39
|
setItem(key: string, value: string, expiresIn?: number): Promise<void>;
|
|
40
40
|
getItem(key: string): Promise<string | null>;
|
|
41
41
|
removeItem(key: string): Promise<void>;
|
|
42
42
|
}
|
|
43
43
|
//#endregion
|
|
44
|
-
export { Authentication, KVRepository, Namespace, SecurityContext, Session, SessionRepository };
|
|
45
44
|
//# sourceMappingURL=types.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.mts","names":[],"sources":["../../src/session/types.ts"],"mappings":";;
|
|
1
|
+
{"version":3,"file":"types.d.mts","names":[],"sources":["../../src/session/types.ts"],"mappings":";;iBAEiB,uBAAuB;EACtC;EACA,YAAY;EACZ;EACA;EACA;;iBAGe;EACf;EACA,iBAAiB;;YAGP;iBAGK;EACf;EACA;EAEA,aAAa;EACb;EACA,aAAa,cAAc;EAC3B,gBAAgB;EAEhB;EACA;EACA,oBAAoB;EAEpB;EACA,uBAAuB;EAEvB;;iBAGe,kBAAkB,UAAU,UAAU;EACrD,iBAAiB;EACjB,KAAK,SAAS,IAAI;EAClB,SAAS,oBAAoB,QAAQ;EACrC,WAAW,oBAAoB;EAG/B,6BAA6B,mBAAmB,qBAAqB,QAAQ,YAAY;EACzF,oBAAoB,wBAAwB,QAAQ,YAAY;EAGhE,uBAAuB,wBAAwB;;iBAGhC;EACf,QAAQ,aAAa,eAAe,qBAAqB;EACzD,QAAQ,cAAc;EACtB,WAAW,cAAc"}
|
package/dist/utils/http.d.cts
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import { SerializeOptions } from "cookie";
|
|
2
2
|
//#region src/utils/http.d.ts
|
|
3
|
-
type CookieOptions = Omit<SerializeOptions, 'encode'>;
|
|
4
|
-
declare function getCookie(request: Request, name: string): string | undefined;
|
|
5
|
-
declare function setCookie(response: Response, name: string, value: string, options?: SerializeOptions): void;
|
|
6
|
-
declare function deleteCookie(response: Response, name: string, options?: SerializeOptions): void;
|
|
3
|
+
export type CookieOptions = Omit<SerializeOptions, 'encode'>;
|
|
4
|
+
export declare function getCookie(request: Request, name: string): string | undefined;
|
|
5
|
+
export declare function setCookie(response: Response, name: string, value: string, options?: SerializeOptions): void;
|
|
6
|
+
export declare function deleteCookie(response: Response, name: string, options?: SerializeOptions): void;
|
|
7
7
|
type PathParam<T extends string> = T extends `${string}:${infer Param}/${infer Rest}` ? { [K in Param]: string; } & PathParam<Rest> : T extends `${string}:${infer Param}` ? { [K in Param]: string; } : {};
|
|
8
|
-
declare function param<P extends string>(request: Request, path: P): PathParam<P>;
|
|
9
|
-
declare function query(request: Request): {
|
|
8
|
+
export declare function param<P extends string>(request: Request, path: P): PathParam<P>;
|
|
9
|
+
export declare function query(request: Request): {
|
|
10
10
|
[k: string]: string;
|
|
11
11
|
};
|
|
12
12
|
//#endregion
|
|
13
|
-
export { CookieOptions, deleteCookie, getCookie, param, query, setCookie };
|
|
14
13
|
//# sourceMappingURL=http.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"http.d.cts","names":[],"sources":["../../src/utils/http.ts"],"mappings":";;
|
|
1
|
+
{"version":3,"file":"http.d.cts","names":[],"sources":["../../src/utils/http.ts"],"mappings":";;YAGY,gBAAgB,KAAK;wBAEjB,UAAU,SAAS,SAAS;wBAO5B,UACd,UAAU,UACV,cACA,eACA,UAAU;wBAKI,aAAa,UAAU,UAAU,cAAc,UAAU;KAOpE,UAAU,oBAAoB,6BAA6B,eAAe,YACxE,KAAK,oBAAmB,UAAU,QACrC,6BAA6B,aACxB,KAAK;wBAIE,MAAM,kBAAkB,SAAS,SAAS,MAAM,IAAI,UAAU;wBAQ9D,MAAM,SAAS"}
|
package/dist/utils/http.d.mts
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import { SerializeOptions } from "cookie";
|
|
2
2
|
//#region src/utils/http.d.ts
|
|
3
|
-
type CookieOptions = Omit<SerializeOptions, 'encode'>;
|
|
4
|
-
declare function getCookie(request: Request, name: string): string | undefined;
|
|
5
|
-
declare function setCookie(response: Response, name: string, value: string, options?: SerializeOptions): void;
|
|
6
|
-
declare function deleteCookie(response: Response, name: string, options?: SerializeOptions): void;
|
|
3
|
+
export type CookieOptions = Omit<SerializeOptions, 'encode'>;
|
|
4
|
+
export declare function getCookie(request: Request, name: string): string | undefined;
|
|
5
|
+
export declare function setCookie(response: Response, name: string, value: string, options?: SerializeOptions): void;
|
|
6
|
+
export declare function deleteCookie(response: Response, name: string, options?: SerializeOptions): void;
|
|
7
7
|
type PathParam<T extends string> = T extends `${string}:${infer Param}/${infer Rest}` ? { [K in Param]: string; } & PathParam<Rest> : T extends `${string}:${infer Param}` ? { [K in Param]: string; } : {};
|
|
8
|
-
declare function param<P extends string>(request: Request, path: P): PathParam<P>;
|
|
9
|
-
declare function query(request: Request): {
|
|
8
|
+
export declare function param<P extends string>(request: Request, path: P): PathParam<P>;
|
|
9
|
+
export declare function query(request: Request): {
|
|
10
10
|
[k: string]: string;
|
|
11
11
|
};
|
|
12
12
|
//#endregion
|
|
13
|
-
export { CookieOptions, deleteCookie, getCookie, param, query, setCookie };
|
|
14
13
|
//# sourceMappingURL=http.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"http.d.mts","names":[],"sources":["../../src/utils/http.ts"],"mappings":";;
|
|
1
|
+
{"version":3,"file":"http.d.mts","names":[],"sources":["../../src/utils/http.ts"],"mappings":";;YAGY,gBAAgB,KAAK;wBAEjB,UAAU,SAAS,SAAS;wBAO5B,UACd,UAAU,UACV,cACA,eACA,UAAU;wBAKI,aAAa,UAAU,UAAU,cAAc,UAAU;KAOpE,UAAU,oBAAoB,6BAA6B,eAAe,YACxE,KAAK,oBAAmB,UAAU,QACrC,6BAA6B,aACxB,KAAK;wBAIE,MAAM,kBAAkB,SAAS,SAAS,MAAM,IAAI,UAAU;wBAQ9D,MAAM,SAAS"}
|
package/dist/utils/oauth2.d.cts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"oauth2.d.cts","names":[],"sources":["../../src/utils/oauth2.ts"],"mappings":";
|
|
1
|
+
{"version":3,"file":"oauth2.d.cts","names":[],"sources":["../../src/utils/oauth2.ts"],"mappings":";wBAAgB"}
|
package/dist/utils/oauth2.d.mts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"oauth2.d.mts","names":[],"sources":["../../src/utils/oauth2.ts"],"mappings":";
|
|
1
|
+
{"version":3,"file":"oauth2.d.mts","names":[],"sources":["../../src/utils/oauth2.ts"],"mappings":";wBAAgB"}
|
package/dist/utils/timing.d.cts
CHANGED
|
@@ -3,7 +3,7 @@ interface Options {
|
|
|
3
3
|
enabled: boolean;
|
|
4
4
|
crossOrigin?: string;
|
|
5
5
|
}
|
|
6
|
-
declare function timing({ enabled, crossOrigin }: Options): {
|
|
6
|
+
export declare function timing({ enabled, crossOrigin }: Options): {
|
|
7
7
|
startTime: (name: Lowercase<string>, description?: string) => void;
|
|
8
8
|
endTime: (name: Lowercase<string>, precision?: number) => void;
|
|
9
9
|
mark: (name: Lowercase<string>, description?: string, precision?: number) => void;
|
|
@@ -11,5 +11,4 @@ declare function timing({ enabled, crossOrigin }: Options): {
|
|
|
11
11
|
setTiming: (response: Response) => void;
|
|
12
12
|
};
|
|
13
13
|
//#endregion
|
|
14
|
-
export { timing };
|
|
15
14
|
//# sourceMappingURL=timing.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"timing.d.cts","names":[],"sources":["../../src/utils/timing.ts"],"mappings":";UAKU;EACR;EACA;;
|
|
1
|
+
{"version":3,"file":"timing.d.cts","names":[],"sources":["../../src/utils/timing.ts"],"mappings":";UAKU;EACR;EACA;;wBAGc,SAAS,SAAS,eAAe;EAM7C,YAAS,MAAS,mBAAiB;EAGnC,UAAO,MAAS,mBAAiB;EAcjC,OAAI,MAAS,mBAAiB,sBAAsB;EAQpD,YAAS,MACD,mBAAiB,oCACW,sBACd;EActB,YAAS,UAAa"}
|
package/dist/utils/timing.d.mts
CHANGED
|
@@ -3,7 +3,7 @@ interface Options {
|
|
|
3
3
|
enabled: boolean;
|
|
4
4
|
crossOrigin?: string;
|
|
5
5
|
}
|
|
6
|
-
declare function timing({ enabled, crossOrigin }: Options): {
|
|
6
|
+
export declare function timing({ enabled, crossOrigin }: Options): {
|
|
7
7
|
startTime: (name: Lowercase<string>, description?: string) => void;
|
|
8
8
|
endTime: (name: Lowercase<string>, precision?: number) => void;
|
|
9
9
|
mark: (name: Lowercase<string>, description?: string, precision?: number) => void;
|
|
@@ -11,5 +11,4 @@ declare function timing({ enabled, crossOrigin }: Options): {
|
|
|
11
11
|
setTiming: (response: Response) => void;
|
|
12
12
|
};
|
|
13
13
|
//#endregion
|
|
14
|
-
export { timing };
|
|
15
14
|
//# sourceMappingURL=timing.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"timing.d.mts","names":[],"sources":["../../src/utils/timing.ts"],"mappings":";UAKU;EACR;EACA;;
|
|
1
|
+
{"version":3,"file":"timing.d.mts","names":[],"sources":["../../src/utils/timing.ts"],"mappings":";UAKU;EACR;EACA;;wBAGc,SAAS,SAAS,eAAe;EAM7C,YAAS,MAAS,mBAAiB;EAGnC,UAAO,MAAS,mBAAiB;EAcjC,OAAI,MAAS,mBAAiB,sBAAsB;EAQpD,YAAS,MACD,mBAAiB,oCACW,sBACd;EActB,YAAS,UAAa"}
|
package/dist/utils/valid.d.cts
CHANGED
|
@@ -9,7 +9,7 @@ type ErrorBody = {
|
|
|
9
9
|
details: unknown[];
|
|
10
10
|
};
|
|
11
11
|
};
|
|
12
|
-
declare function invalidArgument(reason: string): ErrorBody;
|
|
12
|
+
export declare function invalidArgument(reason: string): ErrorBody;
|
|
13
13
|
type Result<S extends ZodType | ZodMiniType> = {
|
|
14
14
|
error: null;
|
|
15
15
|
data: S extends ZodType ? output<S> : output$1<S>;
|
|
@@ -17,12 +17,11 @@ type Result<S extends ZodType | ZodMiniType> = {
|
|
|
17
17
|
error: ErrorBody;
|
|
18
18
|
data: null;
|
|
19
19
|
};
|
|
20
|
-
declare function valid<S extends ZodType | ZodMiniType>(schema: S, json: unknown): Result<S>;
|
|
21
|
-
declare function verifyTurnstileToken(secret: string, token: string): Promise<{
|
|
20
|
+
export declare function valid<S extends ZodType | ZodMiniType>(schema: S, json: unknown): Result<S>;
|
|
21
|
+
export declare function verifyTurnstileToken(secret: string, token: string): Promise<{
|
|
22
22
|
error: null;
|
|
23
23
|
} | {
|
|
24
24
|
error: ErrorBody;
|
|
25
25
|
}>;
|
|
26
26
|
//#endregion
|
|
27
|
-
export { invalidArgument, valid, verifyTurnstileToken };
|
|
28
27
|
//# sourceMappingURL=valid.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"valid.d.cts","names":[],"sources":["../../src/utils/valid.ts"],"mappings":";;;KAGK;EACH;IACE;IACA;IACA;IACA;;;
|
|
1
|
+
{"version":3,"file":"valid.d.cts","names":["outputMini"],"sources":["../../src/utils/valid.ts"],"mappings":";;;KAGK;EACH;IACE;IACA;IACA;IACA;;;wBAIY,gBAAgB,iBAAiB;KAW5C,OAAO,UAAU,UAAU;EAC1B;EAAa,MAAM,UAAU,UAAU,OAAO,KAAKA,SAAW;;EAC9D,OAAO;EAAW;;wBAER,MAAM,UAAU,UAAU,aAAa,QAAQ,GAAG,gBAAgB,OAAO;wBA4BnE,qBAAqB,gBAAgB,gBAAa;;;SAAlD"}
|
package/dist/utils/valid.d.mts
CHANGED
|
@@ -9,7 +9,7 @@ type ErrorBody = {
|
|
|
9
9
|
details: unknown[];
|
|
10
10
|
};
|
|
11
11
|
};
|
|
12
|
-
declare function invalidArgument(reason: string): ErrorBody;
|
|
12
|
+
export declare function invalidArgument(reason: string): ErrorBody;
|
|
13
13
|
type Result<S extends ZodType | ZodMiniType> = {
|
|
14
14
|
error: null;
|
|
15
15
|
data: S extends ZodType ? output$1<S> : output<S>;
|
|
@@ -17,12 +17,11 @@ type Result<S extends ZodType | ZodMiniType> = {
|
|
|
17
17
|
error: ErrorBody;
|
|
18
18
|
data: null;
|
|
19
19
|
};
|
|
20
|
-
declare function valid<S extends ZodType | ZodMiniType>(schema: S, json: unknown): Result<S>;
|
|
21
|
-
declare function verifyTurnstileToken(secret: string, token: string): Promise<{
|
|
20
|
+
export declare function valid<S extends ZodType | ZodMiniType>(schema: S, json: unknown): Result<S>;
|
|
21
|
+
export declare function verifyTurnstileToken(secret: string, token: string): Promise<{
|
|
22
22
|
error: null;
|
|
23
23
|
} | {
|
|
24
24
|
error: ErrorBody;
|
|
25
25
|
}>;
|
|
26
26
|
//#endregion
|
|
27
|
-
export { invalidArgument, valid, verifyTurnstileToken };
|
|
28
27
|
//# sourceMappingURL=valid.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"valid.d.mts","names":[],"sources":["../../src/utils/valid.ts"],"mappings":";;;KAGK;EACH;IACE;IACA;IACA;IACA;;;
|
|
1
|
+
{"version":3,"file":"valid.d.mts","names":["output","outputMini"],"sources":["../../src/utils/valid.ts"],"mappings":";;;KAGK;EACH;IACE;IACA;IACA;IACA;;;wBAIY,gBAAgB,iBAAiB;KAW5C,OAAO,UAAU,UAAU;EAC1B;EAAa,MAAM,UAAU,UAAUA,SAAO,KAAKC,OAAW;;EAC9D,OAAO;EAAW;;wBAER,MAAM,UAAU,UAAU,aAAa,QAAQ,GAAG,gBAAgB,OAAO;wBA4BnE,qBAAqB,gBAAgB,gBAAa;;;SAAlD"}
|