Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: token utility export #12

Merged
merged 2 commits into from
Sep 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 16 additions & 6 deletions lib/main.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,9 @@ describe("index exports", () => {
});

it("should not export anything extra", () => {
const expectedExports = [
...Object.keys(types),
...Object.keys(utils),
...Object.keys(sessionManager),
];
const actualExports = Object.keys(index);

const actualExports = [
const expectedExports = [
// types
"IssuerRouteTypes",
"Scopes",
Expand All @@ -49,6 +45,20 @@ describe("index exports", () => {
"ChromeStore",
"storageSettings",
"ExpoSecureStore",

// token utils
"getActiveStorage",
"getClaim",
"getClaims",
"getCurrentOrganization",
"getDecodedToken",
"getFlag",
"getPermission",
"getPermissions",
"getRoles",
"getUserOrganizations",
"getUserProfile",
"setActiveStorage",
];

expect(actualExports.sort()).toEqual(expectedExports.sort());
Expand Down
1 change: 1 addition & 0 deletions lib/main.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
export * from "./types";
export * from "./utils";
export * from "./sessionManager";
export * from "./utils/token/index.ts";
1 change: 1 addition & 0 deletions lib/utils/token/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import { getPermission, PermissionAccess } from "./getPermission";
import { getPermissions, Permissions } from "./getPermissions";
import { getUserOrganizations } from "./getUserOrganistaions";
import { getRoles } from "./getRoles";

const storage = {
value: null as SessionManager | null,
};
Expand Down
Loading