Skip to content

Commit 3ee4b53

Browse files
committed
fix: token utility export
1 parent 1f4f108 commit 3ee4b53

File tree

3 files changed

+18
-6
lines changed

3 files changed

+18
-6
lines changed

lib/main.test.ts

+16-6
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,9 @@ describe("index exports", () => {
2424
});
2525

2626
it("should not export anything extra", () => {
27-
const expectedExports = [
28-
...Object.keys(types),
29-
...Object.keys(utils),
30-
...Object.keys(sessionManager),
31-
];
27+
const actualExports = Object.keys(index);
3228

33-
const actualExports = [
29+
const expectedExports = [
3430
// types
3531
"IssuerRouteTypes",
3632
"Scopes",
@@ -49,6 +45,20 @@ describe("index exports", () => {
4945
"ChromeStore",
5046
"storageSettings",
5147
"ExpoSecureStore",
48+
49+
// token utils
50+
"getActiveStorage",
51+
"getClaim",
52+
"getClaims",
53+
"getCurrentOrganization",
54+
"getDecodedToken",
55+
"getFlag",
56+
"getPermission",
57+
"getPermissions",
58+
"getRoles",
59+
"getUserOrganizations",
60+
"getUserProfile",
61+
"setActiveStorage",
5262
];
5363

5464
expect(actualExports.sort()).toEqual(expectedExports.sort());

lib/main.ts

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
export * from "./types";
22
export * from "./utils";
33
export * from "./sessionManager";
4+
export * from "./utils/token";

lib/utils/token/index.ts

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import { getPermission, PermissionAccess } from "./getPermission";
1010
import { getPermissions, Permissions } from "./getPermissions";
1111
import { getUserOrganizations } from "./getUserOrganistaions";
1212
import { getRoles } from "./getRoles";
13+
1314
const storage = {
1415
value: null as SessionManager | null,
1516
};

0 commit comments

Comments
 (0)