@functionalcms/svelte-components 5.2.3 → 5.2.4

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.
@@ -4,7 +4,7 @@ export { authenticationHandle } from './server-side/auth/authentication.js';
4
4
  export { machineAuthenticationProvider } from './server-side/auth/machineAuthenticationProvider.js';
5
5
  export { userAuthenticationProvider } from './server-side/auth/userAuthenticationProvider.js';
6
6
  export { hookSequence } from './server-side/functionalSequence.js';
7
- export { sessionHandler } from './server-side/handlers/sessionHandler.js';
7
+ export { sessionStorageHandler } from './server-side/handlers/sessionStorageHandler.js';
8
8
  export { getCommunicationService, getDataService, getTemplateService, getWebsiteService, getAuthService, getFileService, } from './server-side/getServices.js';
9
9
  export type { RedirectResponse } from './server-side/auth/RedirectResponse.js';
10
10
  export { isHuman } from './components/form/AntiBot.js';
@@ -4,7 +4,7 @@ export { authenticationHandle } from './server-side/auth/authentication.js';
4
4
  export { machineAuthenticationProvider } from './server-side/auth/machineAuthenticationProvider.js';
5
5
  export { userAuthenticationProvider } from './server-side/auth/userAuthenticationProvider.js';
6
6
  export { hookSequence } from './server-side/functionalSequence.js';
7
- export { sessionHandler } from './server-side/handlers/sessionHandler.js';
7
+ export { sessionStorageHandler } from './server-side/handlers/sessionStorageHandler.js';
8
8
  export { getCommunicationService, getDataService, getTemplateService, getWebsiteService, getAuthService, getFileService, } from './server-side/getServices.js';
9
9
  export { isHuman } from './components/form/AntiBot.js';
10
10
  export { paraglideHandler } from './server-side/handlers/paraglideHandler.js';
@@ -1,10 +1,10 @@
1
1
  import { sequence } from "@sveltejs/kit/hooks";
2
2
  import errorHandler from "./auth/errorHandle";
3
3
  import { paraglideHandler } from "./handlers/paraglideHandler";
4
- import sessionHandler from "./handlers/sessionHandler";
4
+ import sessionStorageHandler from "./handlers/sessionStorageHandler";
5
5
  import authorizationHandle from "./auth/authorizationHandle";
6
6
  import { userHandler } from "./handlers/userHandler";
7
7
  import { accessTokenHandler } from "./handlers/accessTokenHandler";
8
8
  export const hookSequence = (secret, paraglideMiddleware, getTextDirection, customHooks) => {
9
- return sequence(sessionHandler(secret, "session"), userHandler(secret), accessTokenHandler(secret), errorHandler, paraglideHandler(paraglideMiddleware, getTextDirection), authorizationHandle(), ...customHooks);
9
+ return sequence(sessionStorageHandler(secret, "session"), userHandler(secret), accessTokenHandler(secret), errorHandler, paraglideHandler(paraglideMiddleware, getTextDirection), authorizationHandle(), ...customHooks);
10
10
  };
@@ -0,0 +1,3 @@
1
+ import { type Handle } from '@sveltejs/kit';
2
+ export declare const sessionStorageHandler: (secret: string, contentName: string) => Handle;
3
+ export default sessionStorageHandler;
@@ -1,6 +1,6 @@
1
1
  import {} from '@sveltejs/kit';
2
2
  import { loadCookie, saveCookie } from '../cookies';
3
- export const sessionHandler = (secret, contentName) => {
3
+ export const sessionStorageHandler = (secret, contentName) => {
4
4
  return async ({ event, resolve }) => {
5
5
  const item = event?.locals?.[contentName];
6
6
  if (!item) {
@@ -15,4 +15,4 @@ export const sessionHandler = (secret, contentName) => {
15
15
  return result;
16
16
  };
17
17
  };
18
- export default sessionHandler;
18
+ export default sessionStorageHandler;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@functionalcms/svelte-components",
3
- "version": "5.2.3",
3
+ "version": "5.2.4",
4
4
  "license": "MIT",
5
5
  "watch": {
6
6
  "build": {
@@ -1,3 +0,0 @@
1
- import { type Handle } from '@sveltejs/kit';
2
- export declare const sessionHandler: (secret: string, contentName: string) => Handle;
3
- export default sessionHandler;