@frontegg/redux-store 7.0.0-alpha.4 → 7.0.0-alpha.5
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/index.js +1 -1
- package/node/index.js +1 -1
- package/node/toolkit/store.js +9 -4
- package/package.json +1 -1
- package/toolkit/store.js +9 -4
package/index.js
CHANGED
package/node/index.js
CHANGED
package/node/toolkit/store.js
CHANGED
|
@@ -129,10 +129,12 @@ const createStore = options => {
|
|
|
129
129
|
auditLogs: auditsState,
|
|
130
130
|
audits: oldAuditsState
|
|
131
131
|
});
|
|
132
|
-
(
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
132
|
+
if (typeof window !== 'undefined' && (localStorage['DEBUG_FRONTEGG_STORE'] === 'true' || process.env.NODE_ENV === 'development')) {
|
|
133
|
+
(0, _utils.devtools)(store, {
|
|
134
|
+
name: `${appName} Store`,
|
|
135
|
+
enabled: true
|
|
136
|
+
});
|
|
137
|
+
}
|
|
136
138
|
const stateActions = {};
|
|
137
139
|
const actions = {};
|
|
138
140
|
_restApi.ContextHolder.setContext(options.context);
|
|
@@ -185,6 +187,9 @@ const createStore = options => {
|
|
|
185
187
|
payload: true
|
|
186
188
|
});
|
|
187
189
|
}
|
|
190
|
+
if (holder) {
|
|
191
|
+
holder.store = fronteggStore;
|
|
192
|
+
}
|
|
188
193
|
return fronteggStore;
|
|
189
194
|
} else {
|
|
190
195
|
const [authActions, authStateActions] = (0, _auth.buildAuthActions)(store, api, actions, snapshotAuthState);
|
package/package.json
CHANGED
package/toolkit/store.js
CHANGED
|
@@ -95,10 +95,12 @@ export const createStore = options => {
|
|
|
95
95
|
auditLogs: auditsState,
|
|
96
96
|
audits: oldAuditsState
|
|
97
97
|
});
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
98
|
+
if (typeof window !== 'undefined' && (localStorage['DEBUG_FRONTEGG_STORE'] === 'true' || process.env.NODE_ENV === 'development')) {
|
|
99
|
+
devtools(store, {
|
|
100
|
+
name: `${appName} Store`,
|
|
101
|
+
enabled: true
|
|
102
|
+
});
|
|
103
|
+
}
|
|
102
104
|
const stateActions = {};
|
|
103
105
|
const actions = {};
|
|
104
106
|
ContextHolder.setContext(options.context);
|
|
@@ -151,6 +153,9 @@ export const createStore = options => {
|
|
|
151
153
|
payload: true
|
|
152
154
|
});
|
|
153
155
|
}
|
|
156
|
+
if (holder) {
|
|
157
|
+
holder.store = fronteggStore;
|
|
158
|
+
}
|
|
154
159
|
return fronteggStore;
|
|
155
160
|
} else {
|
|
156
161
|
const [authActions, authStateActions] = buildAuthActions(store, api, actions, snapshotAuthState);
|