@mereb/web-runtime 0.0.3 → 0.0.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/dist/providers/auth.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ export type AuthProfile = {
|
|
|
9
9
|
roles: string[];
|
|
10
10
|
adminAccess: AdminAccessLevel;
|
|
11
11
|
};
|
|
12
|
-
type AuthContextValue = {
|
|
12
|
+
export type AuthContextValue = {
|
|
13
13
|
isReady: boolean;
|
|
14
14
|
isAuthConfigured: boolean;
|
|
15
15
|
isAuthenticated: boolean;
|
|
@@ -22,6 +22,7 @@ type AuthContextValue = {
|
|
|
22
22
|
hasAnyRole: (roles: string[]) => boolean;
|
|
23
23
|
missingConfigKeys: readonly string[];
|
|
24
24
|
};
|
|
25
|
+
export declare const AuthCtx: import("react").Context<AuthContextValue>;
|
|
25
26
|
export declare function AuthProvider({ children }: Readonly<{
|
|
26
27
|
children: ReactNode;
|
|
27
28
|
}>): import("react/jsx-runtime").JSX.Element;
|
package/dist/providers/auth.js
CHANGED
|
@@ -2,7 +2,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { createContext, useCallback, useContext, useEffect, useMemo, useState } from 'react';
|
|
3
3
|
import Keycloak from 'keycloak-js';
|
|
4
4
|
import { appConfig, resolveKeycloakMissingKeys } from '../config.js';
|
|
5
|
-
const AuthCtx = createContext({
|
|
5
|
+
export const AuthCtx = createContext({
|
|
6
6
|
isReady: false,
|
|
7
7
|
isAuthConfigured: false,
|
|
8
8
|
isAuthenticated: false,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mereb/web-runtime",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.4",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -58,9 +58,9 @@
|
|
|
58
58
|
"scripts": {
|
|
59
59
|
"clean": "node -e \"const fs=require('node:fs'); fs.rmSync('dist',{recursive:true,force:true}); fs.rmSync('tsconfig.tsbuildinfo',{force:true});\"",
|
|
60
60
|
"typecheck": "tsc --noEmit --project tsconfig.json",
|
|
61
|
-
"test": "
|
|
62
|
-
"test:watch": "
|
|
63
|
-
"build": "
|
|
61
|
+
"test": "vitest run --config vitest.config.ts",
|
|
62
|
+
"test:watch": "vitest --config vitest.config.ts",
|
|
63
|
+
"build": "node -e \"const fs=require('node:fs'); fs.rmSync('dist',{recursive:true,force:true}); fs.rmSync('tsconfig.tsbuildinfo',{force:true});\" && tsc --project tsconfig.json",
|
|
64
64
|
"version:bump": "node ./scripts/bump-version.mjs"
|
|
65
65
|
}
|
|
66
66
|
}
|