@gen3/core 0.10.77 → 0.10.79
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/cjs/index.js +21 -18
- package/dist/cjs/index.js.map +1 -1
- package/dist/dts/features/gen3/gen3Api.d.ts.map +1 -1
- package/dist/dts/hooks.d.ts +25 -1
- package/dist/dts/hooks.d.ts.map +1 -1
- package/dist/dts/store.d.ts +114 -2
- package/dist/dts/store.d.ts.map +1 -1
- package/dist/esm/index.js +21 -19
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.ts +142 -7
- package/package.json +2 -2
package/dist/cjs/index.js
CHANGED
|
@@ -204,14 +204,13 @@ const selectHeadersWithCSRFToken = toolkit.createSelector([
|
|
|
204
204
|
prepareHeaders: (headers, { getState })=>{
|
|
205
205
|
const csrfToken = selectCSRFToken(getState());
|
|
206
206
|
headers.set('Content-Type', 'application/json');
|
|
207
|
-
let accessToken = undefined;
|
|
208
207
|
if (process.env.NODE_ENV === 'development') {
|
|
209
208
|
// NOTE: This cookie can only be accessed from the client side
|
|
210
209
|
// in development mode. Otherwise, the cookie is set as httpOnly
|
|
211
|
-
accessToken = cookiesNext.getCookie('credentials_token');
|
|
210
|
+
const accessToken = cookiesNext.getCookie('credentials_token');
|
|
211
|
+
if (accessToken) headers.set('Authorization', `Bearer ${accessToken}`);
|
|
212
212
|
}
|
|
213
213
|
if (csrfToken) headers.set('X-CSRF-Token', csrfToken);
|
|
214
|
-
if (accessToken) headers.set('Authorization', `Bearer ${accessToken}`);
|
|
215
214
|
return headers;
|
|
216
215
|
}
|
|
217
216
|
}),
|
|
@@ -2338,21 +2337,24 @@ const persistConfig = {
|
|
|
2338
2337
|
'activeWorkspace'
|
|
2339
2338
|
]
|
|
2340
2339
|
};
|
|
2341
|
-
const
|
|
2342
|
-
|
|
2343
|
-
|
|
2344
|
-
|
|
2345
|
-
|
|
2346
|
-
|
|
2347
|
-
|
|
2348
|
-
|
|
2349
|
-
|
|
2350
|
-
|
|
2351
|
-
|
|
2352
|
-
|
|
2353
|
-
|
|
2354
|
-
|
|
2355
|
-
}
|
|
2340
|
+
const persistedReducer = reduxPersist.persistReducer(persistConfig, rootReducer);
|
|
2341
|
+
const setupCoreStore = (preloadedState)=>toolkit.configureStore({
|
|
2342
|
+
reducer: persistedReducer,
|
|
2343
|
+
preloadedState,
|
|
2344
|
+
middleware: (getDefaultMiddleware)=>getDefaultMiddleware({
|
|
2345
|
+
serializableCheck: {
|
|
2346
|
+
ignoredActions: [
|
|
2347
|
+
reduxPersist.FLUSH,
|
|
2348
|
+
reduxPersist.REHYDRATE,
|
|
2349
|
+
reduxPersist.PAUSE,
|
|
2350
|
+
reduxPersist.PERSIST,
|
|
2351
|
+
reduxPersist.PURGE,
|
|
2352
|
+
reduxPersist.REGISTER
|
|
2353
|
+
]
|
|
2354
|
+
}
|
|
2355
|
+
}).concat(gen3ServicesReducerMiddleware, guppyAPISliceMiddleware, userAuthApiMiddleware)
|
|
2356
|
+
});
|
|
2357
|
+
const coreStore = setupCoreStore();
|
|
2356
2358
|
query.setupListeners(coreStore.dispatch);
|
|
2357
2359
|
|
|
2358
2360
|
const isNotDefined = (x)=>{
|
|
@@ -3417,6 +3419,7 @@ exports.setCohortIndexFilters = setCohortIndexFilters;
|
|
|
3417
3419
|
exports.setDRSHostnames = setDRSHostnames;
|
|
3418
3420
|
exports.setDataLibraryListSelection = setDataLibraryListSelection;
|
|
3419
3421
|
exports.setRequestedWorkspaceStatus = setRequestedWorkspaceStatus;
|
|
3422
|
+
exports.setupCoreStore = setupCoreStore;
|
|
3420
3423
|
exports.showModal = showModal;
|
|
3421
3424
|
exports.submissionApi = submissionApi;
|
|
3422
3425
|
exports.trimFirstFieldNameToTitle = trimFirstFieldNameToTitle;
|