Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@pentops/j5-react-realm-auth

Package Overview
Dependencies
Maintainers
0
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@pentops/j5-react-realm-auth - npm Package Compare versions

Comparing version 0.0.2 to 0.0.3

6

dist/index.js

@@ -140,4 +140,4 @@ import React from 'react';

};
function createRealmAuthStore(initialState, realmAccessIdGetter = (defaultRealmAccessIdGetter)) {
return create((set, get) => (Object.assign(Object.assign(Object.assign({}, defaultInitialState), { setContext: (cb, contextChangeActiveAccessSelector = (defaultContextChangeActiveAccessSelector), isAuthenticating = false) => {
function createRealmAuthStore(initialState, realmAccessIdGetter = (defaultRealmAccessIdGetter), contextChangeActiveAccessSelector = (defaultContextChangeActiveAccessSelector)) {
return create((set, get) => (Object.assign(Object.assign(Object.assign({}, defaultInitialState), { setContext: (cb, isAuthenticating = false) => {
const { context: prevContext, activeAccess } = get();

@@ -157,3 +157,3 @@ const result = cb(prevContext);

if (prevAccess && realmAccessId === realmAccessIdGetter(prevAccess)) {
return;
return prevAccess;
}

@@ -160,0 +160,0 @@ const access = (_a = context === null || context === void 0 ? void 0 : context.accesses) === null || _a === void 0 ? void 0 : _a.find((ctxAccess) => realmAccessId === realmAccessIdGetter(ctxAccess));

@@ -9,3 +9,3 @@ import type { RealmAuthStore } from './store';

export declare function selectSetActiveAccess<TRealmAccess extends RealmAccess = RealmAccess, TContext extends WhoAmIContext<TRealmAccess> = WhoAmIContext<TRealmAccess>>(state: RealmAuthStore<TRealmAccess, TContext>): (realmAccessId: string) => TRealmAccess | undefined;
export declare function selectSetContext<TRealmAccess extends RealmAccess = RealmAccess, TContext extends WhoAmIContext<TRealmAccess> = WhoAmIContext<TRealmAccess>>(state: RealmAuthStore<TRealmAccess, TContext>): (cb: (context: TContext | undefined) => TContext | undefined, defaultActiveAccessSelector?: import("./store").ContextChangeActiveAccessSelector<TRealmAccess, TContext> | undefined, isAuthenticating?: boolean) => TContext | undefined;
export declare function selectSetContext<TRealmAccess extends RealmAccess = RealmAccess, TContext extends WhoAmIContext<TRealmAccess> = WhoAmIContext<TRealmAccess>>(state: RealmAuthStore<TRealmAccess, TContext>): (cb: (context: TContext | undefined) => TContext | undefined, isAuthenticating?: boolean) => TContext | undefined;
//# sourceMappingURL=selectors.d.ts.map

@@ -11,3 +11,3 @@ import { type RealmAccess, type WhoAmIContext } from './types';

isAuthenticated: boolean;
setContext: (cb: (context: TContext | undefined) => TContext | undefined, defaultActiveAccessSelector?: ContextChangeActiveAccessSelector<TRealmAccess, TContext>, isAuthenticating?: boolean) => TContext | undefined;
setContext: (cb: (context: TContext | undefined) => TContext | undefined, isAuthenticating?: boolean) => TContext | undefined;
setActiveAccess: (realmAccessId: string) => TRealmAccess | undefined;

@@ -22,3 +22,3 @@ reset(): void;

};
export declare function createRealmAuthStore<TRealmAccess extends RealmAccess = RealmAccess, TContext extends WhoAmIContext<TRealmAccess> = WhoAmIContext<TRealmAccess>>(initialState?: Partial<RealmAuthStore<TRealmAccess, TContext>>, realmAccessIdGetter?: RealmAccessIdGetter<TRealmAccess>): import("zustand").UseBoundStore<import("zustand").StoreApi<RealmAuthStore<TRealmAccess, TContext>>>;
export declare function createRealmAuthStore<TRealmAccess extends RealmAccess = RealmAccess, TContext extends WhoAmIContext<TRealmAccess> = WhoAmIContext<TRealmAccess>>(initialState?: Partial<RealmAuthStore<TRealmAccess, TContext>>, realmAccessIdGetter?: RealmAccessIdGetter<TRealmAccess>, contextChangeActiveAccessSelector?: (context: WhoAmIContext<TRealmAccess> | undefined, activeAccess: TRealmAccess | undefined, realmAccessIdGetter?: RealmAccessIdGetter<TRealmAccess>) => TRealmAccess | undefined): import("zustand").UseBoundStore<import("zustand").StoreApi<RealmAuthStore<TRealmAccess, TContext>>>;
export declare function createRealmAuthStoreHooks<TRealmAccess extends RealmAccess = RealmAccess, TContext extends WhoAmIContext<TRealmAccess> = WhoAmIContext<TRealmAccess>>(initialState?: Partial<RealmAuthStore<TRealmAccess, TContext>>, realmAccessIdGetter?: RealmAccessIdGetter<TRealmAccess>): {

@@ -32,4 +32,4 @@ readonly useRealmAuthStore: import("zustand").UseBoundStore<import("zustand").StoreApi<RealmAuthStore<TRealmAccess, TContext>>>;

readonly useRealmAuthSetActiveAccess: () => (realmAccessId: string) => TRealmAccess | undefined;
readonly useRealmAuthSetContext: () => (cb: (context: TContext | undefined) => TContext | undefined, defaultActiveAccessSelector?: ContextChangeActiveAccessSelector<TRealmAccess, TContext> | undefined, isAuthenticating?: boolean) => TContext | undefined;
readonly useRealmAuthSetContext: () => (cb: (context: TContext | undefined) => TContext | undefined, isAuthenticating?: boolean) => TContext | undefined;
};
//# sourceMappingURL=store.d.ts.map
{
"name": "@pentops/j5-react-realm-auth",
"version": "0.0.2",
"version": "0.0.3",
"description": "",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc