@authara/react 0.0.1-trusted.3 → 0.1.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/README.md +331 -77
- package/dist/AppleButton.d.ts +24 -5
- package/dist/AppleButton.js +125 -7
- package/dist/GoogleButton.d.ts +17 -3
- package/dist/GoogleButton.js +162 -28
- package/dist/actions.d.ts +17 -0
- package/dist/actions.js +88 -0
- package/dist/color-mode.d.ts +3 -0
- package/dist/color-mode.js +20 -0
- package/dist/context.d.ts +1 -0
- package/dist/context.js +1 -0
- package/dist/contract.d.ts +99 -0
- package/dist/errors.d.ts +33 -0
- package/dist/errors.js +96 -0
- package/dist/generated-error-codes.d.ts +8 -0
- package/dist/generated-error-codes.js +42 -0
- package/dist/index.d.ts +6 -4
- package/dist/index.js +4 -3
- package/dist/provider-sdks.d.ts +20 -15
- package/dist/provider-sdks.js +6 -3
- package/dist/services.d.ts +3 -7
- package/dist/services.js +25 -41
- package/package.json +14 -7
package/dist/errors.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { autharaActionErrorCodes, } from "./generated-error-codes.js";
|
|
1
2
|
export function isProviderUnavailable(error) {
|
|
2
3
|
return (typeof error === "object" &&
|
|
3
4
|
error !== null &&
|
|
@@ -16,6 +17,101 @@ export function toError(error, fallback) {
|
|
|
16
17
|
}
|
|
17
18
|
return new Error(fallback);
|
|
18
19
|
}
|
|
20
|
+
const knownAutharaErrorCodes = new Set([
|
|
21
|
+
...autharaActionErrorCodes.login,
|
|
22
|
+
...autharaActionErrorCodes.link,
|
|
23
|
+
...autharaActionErrorCodes.reauthenticate,
|
|
24
|
+
...autharaActionErrorCodes.recover,
|
|
25
|
+
"csrf_token_missing",
|
|
26
|
+
]);
|
|
27
|
+
export class AutharaButtonError extends Error {
|
|
28
|
+
constructor(message, source, originalError, metadata = {}) {
|
|
29
|
+
super(message);
|
|
30
|
+
this.name = "AutharaButtonError";
|
|
31
|
+
this.source = source;
|
|
32
|
+
this.originalError = originalError;
|
|
33
|
+
this.code = metadata.code;
|
|
34
|
+
this.serverCode = metadata.serverCode;
|
|
35
|
+
this.status = metadata.status;
|
|
36
|
+
this.authenticationChallenge = metadata.authenticationChallenge;
|
|
37
|
+
this.reauthenticateUrl = metadata.reauthenticateUrl;
|
|
38
|
+
this.recovery = metadata.recovery;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
function record(value) {
|
|
42
|
+
return typeof value === "object" && value !== null
|
|
43
|
+
? value
|
|
44
|
+
: undefined;
|
|
45
|
+
}
|
|
46
|
+
function challengeFrom(error) {
|
|
47
|
+
const details = record(error?.details);
|
|
48
|
+
const candidate = record(error?.authenticationChallenge) ??
|
|
49
|
+
record(details?.authentication_challenge);
|
|
50
|
+
if (typeof candidate?.id !== "string" ||
|
|
51
|
+
typeof candidate.expires_at !== "string") {
|
|
52
|
+
return undefined;
|
|
53
|
+
}
|
|
54
|
+
return { id: candidate.id, expires_at: candidate.expires_at };
|
|
55
|
+
}
|
|
56
|
+
function recoveryFrom(error) {
|
|
57
|
+
const details = record(error?.details);
|
|
58
|
+
const candidate = record(error?.recovery) ?? record(details?.recovery);
|
|
59
|
+
if (typeof candidate?.link_id !== "string" ||
|
|
60
|
+
!candidate.link_id ||
|
|
61
|
+
typeof candidate.provider !== "string" ||
|
|
62
|
+
!candidate.provider ||
|
|
63
|
+
!Array.isArray(candidate.proof_methods) ||
|
|
64
|
+
!candidate.proof_methods.every((method) => typeof method === "string")) {
|
|
65
|
+
return undefined;
|
|
66
|
+
}
|
|
67
|
+
return {
|
|
68
|
+
link_id: candidate.link_id,
|
|
69
|
+
provider: candidate.provider,
|
|
70
|
+
proof_methods: candidate.proof_methods,
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
export function toAutharaButtonError(error, fallback, defaultSource) {
|
|
74
|
+
if (error instanceof AutharaButtonError)
|
|
75
|
+
return error;
|
|
76
|
+
const value = record(error);
|
|
77
|
+
const details = record(value?.details);
|
|
78
|
+
const nestedError = record(details?.error);
|
|
79
|
+
const status = typeof value?.status === "number" ? value.status : undefined;
|
|
80
|
+
const rawCode = typeof value?.code === "string"
|
|
81
|
+
? value.code
|
|
82
|
+
: typeof nestedError?.code === "string"
|
|
83
|
+
? nestedError.code
|
|
84
|
+
: value?.name === "AutharaCSRFError"
|
|
85
|
+
? "csrf_token_missing"
|
|
86
|
+
: undefined;
|
|
87
|
+
const autharaFailure = status !== undefined ||
|
|
88
|
+
details !== undefined ||
|
|
89
|
+
value?.name === "AutharaApiError" ||
|
|
90
|
+
value?.name === "AutharaCSRFError";
|
|
91
|
+
const source = autharaFailure ? "authara" : defaultSource;
|
|
92
|
+
const normalized = toError(error, fallback);
|
|
93
|
+
const reauthenticateUrl = typeof value?.reauthenticateUrl === "string"
|
|
94
|
+
? value.reauthenticateUrl
|
|
95
|
+
: typeof details?.reauthenticate_url === "string"
|
|
96
|
+
? details.reauthenticate_url
|
|
97
|
+
: undefined;
|
|
98
|
+
const knownCode = rawCode !== undefined && knownAutharaErrorCodes.has(rawCode);
|
|
99
|
+
return new AutharaButtonError(normalized.message, source, error, {
|
|
100
|
+
code: source === "authara"
|
|
101
|
+
? (knownCode
|
|
102
|
+
? rawCode
|
|
103
|
+
: "unknown_authara_error")
|
|
104
|
+
: undefined,
|
|
105
|
+
serverCode: source === "authara" && !knownCode ? rawCode : undefined,
|
|
106
|
+
status,
|
|
107
|
+
authenticationChallenge: challengeFrom(value),
|
|
108
|
+
reauthenticateUrl,
|
|
109
|
+
recovery: recoveryFrom(value),
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
export function isAutharaButtonError(error) {
|
|
113
|
+
return error instanceof AutharaButtonError;
|
|
114
|
+
}
|
|
19
115
|
export function isAppleCancellation(error) {
|
|
20
116
|
if (typeof error !== "object" || error === null || !("error" in error)) {
|
|
21
117
|
return false;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare const autharaActionErrorCodes: {
|
|
2
|
+
readonly login: readonly ["account_link_required", "forbidden", "internal_error", "invalid_request", "not_found", "unauthorized"];
|
|
3
|
+
readonly link: readonly ["auth_method_already_linked", "forbidden", "internal_error", "invalid_request", "not_found", "recent_authentication_required", "unauthorized"];
|
|
4
|
+
readonly reauthenticate: readonly ["internal_error", "invalid_authentication_challenge", "invalid_request", "not_found", "unauthorized"];
|
|
5
|
+
readonly recover: readonly ["auth_method_already_linked", "forbidden", "internal_error", "invalid_request", "invitation_already_accepted", "invitation_email_mismatch", "invitation_expired", "invitation_not_found", "invitation_revoked", "not_found", "organization_membership_conflict", "provider_link_expired", "unauthorized"];
|
|
6
|
+
};
|
|
7
|
+
export type AutharaContractAction = keyof typeof autharaActionErrorCodes;
|
|
8
|
+
export type AutharaContractErrorCode<Action extends AutharaContractAction> = (typeof autharaActionErrorCodes)[Action][number];
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
// Code generated from authara-core/contract/openapi.yaml; DO NOT EDIT.
|
|
2
|
+
export const autharaActionErrorCodes = {
|
|
3
|
+
login: [
|
|
4
|
+
"account_link_required",
|
|
5
|
+
"forbidden",
|
|
6
|
+
"internal_error",
|
|
7
|
+
"invalid_request",
|
|
8
|
+
"not_found",
|
|
9
|
+
"unauthorized",
|
|
10
|
+
],
|
|
11
|
+
link: [
|
|
12
|
+
"auth_method_already_linked",
|
|
13
|
+
"forbidden",
|
|
14
|
+
"internal_error",
|
|
15
|
+
"invalid_request",
|
|
16
|
+
"not_found",
|
|
17
|
+
"recent_authentication_required",
|
|
18
|
+
"unauthorized",
|
|
19
|
+
],
|
|
20
|
+
reauthenticate: [
|
|
21
|
+
"internal_error",
|
|
22
|
+
"invalid_authentication_challenge",
|
|
23
|
+
"invalid_request",
|
|
24
|
+
"not_found",
|
|
25
|
+
"unauthorized",
|
|
26
|
+
],
|
|
27
|
+
recover: [
|
|
28
|
+
"auth_method_already_linked",
|
|
29
|
+
"forbidden",
|
|
30
|
+
"internal_error",
|
|
31
|
+
"invalid_request",
|
|
32
|
+
"invitation_already_accepted",
|
|
33
|
+
"invitation_email_mismatch",
|
|
34
|
+
"invitation_expired",
|
|
35
|
+
"invitation_not_found",
|
|
36
|
+
"invitation_revoked",
|
|
37
|
+
"not_found",
|
|
38
|
+
"organization_membership_conflict",
|
|
39
|
+
"provider_link_expired",
|
|
40
|
+
"unauthorized",
|
|
41
|
+
],
|
|
42
|
+
};
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
export { AppleButton, type AppleButtonProps } from "./AppleButton.js";
|
|
2
|
-
export { GoogleButton, type GoogleButtonProps } from "./GoogleButton.js";
|
|
1
|
+
export { AppleButton, AppleCredentialButton, type AppleButtonLabel, type AppleButtonProps, type AppleButtonVariant, type AppleCredentialButtonProps, } from "./AppleButton.js";
|
|
2
|
+
export { GoogleButton, GoogleCredentialButton, type GoogleButtonLabel, type GoogleButtonProps, type GoogleButtonVariant, type GoogleCredentialButtonProps, } from "./GoogleButton.js";
|
|
3
3
|
export { AutharaProvider, type AutharaProviderProps } from "./context.js";
|
|
4
|
-
export type {
|
|
5
|
-
export {
|
|
4
|
+
export type { AutharaColorMode, ResolvedAutharaColorMode, } from "./color-mode.js";
|
|
5
|
+
export { autharaActionErrorCodes, type AutharaContractAction, type AutharaContractErrorCode, } from "./generated-error-codes.js";
|
|
6
|
+
export type { AppleLoginOptions, AppleProof, AutharaAction, AutharaAccountRecoveryLink, AutharaActionProps, AutharaActionSuccess, AutharaAudience, AutharaLinkSuccess, AutharaLoginSuccess, AutharaProviderName, AutharaRecoverySuccess, AutharaReauthenticationSuccess, AutharaReactClient, GoogleProof, GoogleLoginOptions, MaybePromise, } from "./contract.js";
|
|
7
|
+
export { AutharaButtonError, isAppleCancellation, isAutharaButtonError, isProviderUnavailable, type AutharaAuthenticationChallenge, type AutharaButtonErrorCode, type AutharaButtonErrorSource, type AutharaLocalErrorCode, type AutharaLinkErrorCode, type AutharaLoginErrorCode, type AutharaRecoveryErrorCode, type AutharaReauthenticationErrorCode, } from "./errors.js";
|
|
6
8
|
export type { AppleAuthorization, GoogleCredential } from "./services.js";
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
export { AppleButton } from "./AppleButton.js";
|
|
2
|
-
export { GoogleButton } from "./GoogleButton.js";
|
|
1
|
+
export { AppleButton, AppleCredentialButton, } from "./AppleButton.js";
|
|
2
|
+
export { GoogleButton, GoogleCredentialButton, } from "./GoogleButton.js";
|
|
3
3
|
export { AutharaProvider } from "./context.js";
|
|
4
|
-
export {
|
|
4
|
+
export { autharaActionErrorCodes, } from "./generated-error-codes.js";
|
|
5
|
+
export { AutharaButtonError, isAppleCancellation, isAutharaButtonError, isProviderUnavailable, } from "./errors.js";
|
package/dist/provider-sdks.d.ts
CHANGED
|
@@ -1,29 +1,34 @@
|
|
|
1
|
-
export type
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
export type GoogleCodeResponse = {
|
|
2
|
+
code?: string;
|
|
3
|
+
error?: string;
|
|
4
|
+
error_description?: string;
|
|
5
|
+
};
|
|
6
|
+
export type GoogleCodeClient = {
|
|
7
|
+
requestCode(): void;
|
|
8
|
+
};
|
|
9
|
+
export type GoogleCodeClientConfiguration = {
|
|
10
|
+
client_id: string;
|
|
11
|
+
scope: string;
|
|
12
|
+
ux_mode: "popup";
|
|
13
|
+
select_account: boolean;
|
|
14
|
+
callback: (response: GoogleCodeResponse) => void;
|
|
15
|
+
error_callback: (error: {
|
|
16
|
+
type?: string;
|
|
17
|
+
}) => void;
|
|
5
18
|
};
|
|
6
19
|
export type GoogleButtonConfiguration = {
|
|
7
20
|
type?: "standard" | "icon";
|
|
8
|
-
theme?: "
|
|
21
|
+
theme?: "light" | "dark" | "neutral";
|
|
9
22
|
size?: "large" | "medium" | "small";
|
|
10
23
|
text?: "signin_with" | "signup_with" | "continue_with" | "signin";
|
|
11
24
|
shape?: "rectangular" | "pill" | "circle" | "square";
|
|
12
25
|
logo_alignment?: "left" | "center";
|
|
13
26
|
width?: number;
|
|
14
|
-
locale?: string;
|
|
15
|
-
state?: string;
|
|
16
|
-
click_listener?: () => void;
|
|
17
27
|
};
|
|
18
28
|
export type GoogleIdentity = {
|
|
19
29
|
accounts: {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
client_id: string;
|
|
23
|
-
nonce: string;
|
|
24
|
-
callback: (response: GoogleCredentialResponse) => void;
|
|
25
|
-
}): void;
|
|
26
|
-
renderButton(parent: HTMLElement, options: GoogleButtonConfiguration): void;
|
|
30
|
+
oauth2: {
|
|
31
|
+
initCodeClient(options: GoogleCodeClientConfiguration): GoogleCodeClient;
|
|
27
32
|
};
|
|
28
33
|
};
|
|
29
34
|
};
|
package/dist/provider-sdks.js
CHANGED
|
@@ -8,14 +8,17 @@ function appendScript(url, resolveGlobal, failureMessage) {
|
|
|
8
8
|
return new Promise((resolve, reject) => {
|
|
9
9
|
const existing = document.querySelector(`script[src="${url}"]`);
|
|
10
10
|
const script = existing ?? document.createElement("script");
|
|
11
|
+
const failed = () => {
|
|
12
|
+
script.remove();
|
|
13
|
+
reject(new Error(failureMessage));
|
|
14
|
+
};
|
|
11
15
|
const loaded = () => {
|
|
12
16
|
const value = resolveGlobal();
|
|
13
17
|
if (value)
|
|
14
18
|
resolve(value);
|
|
15
19
|
else
|
|
16
|
-
|
|
20
|
+
failed();
|
|
17
21
|
};
|
|
18
|
-
const failed = () => reject(new Error(failureMessage));
|
|
19
22
|
script.addEventListener("load", loaded, { once: true });
|
|
20
23
|
script.addEventListener("error", failed, { once: true });
|
|
21
24
|
if (!existing) {
|
|
@@ -26,7 +29,7 @@ function appendScript(url, resolveGlobal, failureMessage) {
|
|
|
26
29
|
});
|
|
27
30
|
}
|
|
28
31
|
export function loadGoogleIdentity(locale) {
|
|
29
|
-
if (window.google?.accounts?.
|
|
32
|
+
if (window.google?.accounts?.oauth2)
|
|
30
33
|
return Promise.resolve(window.google);
|
|
31
34
|
if (googlePromise) {
|
|
32
35
|
if (locale !== googleLocale) {
|
package/dist/services.d.ts
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import type { AutharaReactClient } from "./contract.js";
|
|
2
|
-
import { type GoogleButtonConfiguration } from "./provider-sdks.js";
|
|
3
2
|
export type GoogleCredential = {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
selectBy?: string;
|
|
3
|
+
code: string;
|
|
4
|
+
redirect_uri: string;
|
|
7
5
|
};
|
|
8
6
|
export type AppleAuthorization = {
|
|
9
7
|
code: string;
|
|
@@ -14,10 +12,8 @@ export declare class GoogleService {
|
|
|
14
12
|
private readonly client;
|
|
15
13
|
private optionsPromise?;
|
|
16
14
|
private sdkPromise?;
|
|
17
|
-
private handlers;
|
|
18
|
-
private activeState?;
|
|
19
15
|
constructor(client: AutharaReactClient);
|
|
20
|
-
|
|
16
|
+
prepare(locale: string | undefined, handler: GoogleHandler, errorHandler: (error: Error) => void): Promise<() => void>;
|
|
21
17
|
private options;
|
|
22
18
|
private sdk;
|
|
23
19
|
}
|
package/dist/services.js
CHANGED
|
@@ -1,32 +1,34 @@
|
|
|
1
1
|
import { loadAppleIdentity, loadGoogleIdentity, } from "./provider-sdks.js";
|
|
2
|
-
let stateSequence = 0;
|
|
3
|
-
function nextState() {
|
|
4
|
-
stateSequence += 1;
|
|
5
|
-
return `authara-google-${stateSequence}`;
|
|
6
|
-
}
|
|
7
2
|
export class GoogleService {
|
|
8
3
|
constructor(client) {
|
|
9
4
|
this.client = client;
|
|
10
|
-
this.handlers = new Map();
|
|
11
5
|
}
|
|
12
|
-
async
|
|
6
|
+
async prepare(locale, handler, errorHandler) {
|
|
13
7
|
const options = await this.options();
|
|
14
|
-
const google = await this.sdk(locale
|
|
15
|
-
const
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
8
|
+
const google = await this.sdk(locale);
|
|
9
|
+
const client = google.accounts.oauth2.initCodeClient({
|
|
10
|
+
client_id: options.client_id,
|
|
11
|
+
scope: "openid email profile",
|
|
12
|
+
ux_mode: "popup",
|
|
13
|
+
select_account: true,
|
|
14
|
+
callback: (response) => {
|
|
15
|
+
if (response.error) {
|
|
16
|
+
errorHandler(new Error(response.error_description || response.error));
|
|
17
|
+
return;
|
|
18
|
+
}
|
|
19
|
+
if (!response.code) {
|
|
20
|
+
errorHandler(new Error("Google did not return an authorization code."));
|
|
21
|
+
return;
|
|
22
|
+
}
|
|
23
|
+
handler({ code: response.code, redirect_uri: window.location.origin });
|
|
24
|
+
},
|
|
25
|
+
error_callback: (error) => {
|
|
26
|
+
errorHandler(new Error(error.type === "popup_closed"
|
|
27
|
+
? "Google sign-in was cancelled."
|
|
28
|
+
: "Google sign-in could not be opened."));
|
|
23
29
|
},
|
|
24
30
|
});
|
|
25
|
-
return () =>
|
|
26
|
-
this.handlers.delete(state);
|
|
27
|
-
if (this.activeState === state)
|
|
28
|
-
this.activeState = undefined;
|
|
29
|
-
};
|
|
31
|
+
return () => client.requestCode();
|
|
30
32
|
}
|
|
31
33
|
options() {
|
|
32
34
|
this.optionsPromise ?? (this.optionsPromise = this.client
|
|
@@ -37,26 +39,8 @@ export class GoogleService {
|
|
|
37
39
|
}));
|
|
38
40
|
return this.optionsPromise;
|
|
39
41
|
}
|
|
40
|
-
sdk(locale
|
|
41
|
-
this.sdkPromise ?? (this.sdkPromise = loadGoogleIdentity(locale)
|
|
42
|
-
google.accounts.id.initialize({
|
|
43
|
-
client_id: options.client_id,
|
|
44
|
-
nonce: options.nonce,
|
|
45
|
-
callback: (response) => {
|
|
46
|
-
if (!response.credential)
|
|
47
|
-
return;
|
|
48
|
-
const state = response.state ?? this.activeState;
|
|
49
|
-
if (!state)
|
|
50
|
-
return;
|
|
51
|
-
this.handlers.get(state)?.({
|
|
52
|
-
credential: response.credential,
|
|
53
|
-
nonce: options.nonce,
|
|
54
|
-
selectBy: response.select_by,
|
|
55
|
-
});
|
|
56
|
-
},
|
|
57
|
-
});
|
|
58
|
-
return google;
|
|
59
|
-
}));
|
|
42
|
+
sdk(locale) {
|
|
43
|
+
this.sdkPromise ?? (this.sdkPromise = loadGoogleIdentity(locale));
|
|
60
44
|
return this.sdkPromise;
|
|
61
45
|
}
|
|
62
46
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@authara/react",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.1.0",
|
|
4
4
|
"description": "Official React components for Authara browser authentication",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -22,19 +22,24 @@
|
|
|
22
22
|
],
|
|
23
23
|
"scripts": {
|
|
24
24
|
"build": "tsc -p tsconfig.json",
|
|
25
|
+
"build:playground": "tsc -p tsconfig.playground.json --noEmit && vite build --config vite.config.ts",
|
|
26
|
+
"build:playground:package": "npm run build && tsc -p tsconfig.playground.package.json --noEmit && vite build --config vite.config.ts --mode package",
|
|
25
27
|
"check:contract": "node scripts/check-contract.mjs",
|
|
26
|
-
"check:
|
|
27
|
-
"format": "prettier --
|
|
28
|
-
"
|
|
28
|
+
"check:error-contract": "node scripts/sync-error-contract.mjs --check",
|
|
29
|
+
"check:format": "prettier --check \"src/**/*.{ts,tsx}\" \"playground/**/*.{ts,tsx,css,html}\" \"contract/**/*.ts\" \"scripts/**/*.mjs\" \"vite.config.ts\" \"docker-compose.playground*.yaml\"",
|
|
30
|
+
"dev": "vite --config vite.config.ts",
|
|
31
|
+
"format": "prettier --write \"src/**/*.{ts,tsx}\" \"playground/**/*.{ts,tsx,css,html}\" \"contract/**/*.ts\" \"scripts/**/*.mjs\" \"vite.config.ts\" \"docker-compose.playground*.yaml\"",
|
|
32
|
+
"lint": "eslint \"src/**/*.{ts,tsx}\" \"playground/**/*.{ts,tsx}\" \"contract/**/*.ts\" \"vite.config.ts\"",
|
|
33
|
+
"sync:error-contract": "node scripts/sync-error-contract.mjs",
|
|
29
34
|
"test": "vitest run",
|
|
30
35
|
"prepublishOnly": "npm run check:contract && npm run build"
|
|
31
36
|
},
|
|
32
37
|
"peerDependencies": {
|
|
33
|
-
"@authara/browser": ">=0.
|
|
38
|
+
"@authara/browser": ">=0.10.0 <0.11.0",
|
|
34
39
|
"react": "^18.0.0 || ^19.0.0"
|
|
35
40
|
},
|
|
36
41
|
"devDependencies": {
|
|
37
|
-
"@authara/browser": "0.
|
|
42
|
+
"@authara/browser": "0.10.0",
|
|
38
43
|
"@eslint/js": "^9.39.2",
|
|
39
44
|
"@testing-library/react": "^16.3.2",
|
|
40
45
|
"@types/react": "^19.2.14",
|
|
@@ -48,6 +53,8 @@
|
|
|
48
53
|
"react-dom": "^19.1.1",
|
|
49
54
|
"typescript": "^5.9.3",
|
|
50
55
|
"typescript-eslint": "^8.54.0",
|
|
51
|
-
"
|
|
56
|
+
"vite": "^8.3.4",
|
|
57
|
+
"vitest": "^4.0.18",
|
|
58
|
+
"yaml": "2.9.0"
|
|
52
59
|
}
|
|
53
60
|
}
|