@functionalcms/svelte-components 2.25.0 → 2.26.0

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.
@@ -1,5 +1,4 @@
1
1
  import { AUTH_KEYCLOAK_ID, AUTH_KEYCLOAK_SECRET, AUTH_KEYCLOAK_ISSUER } from '$env/static/private';
2
- import * as o from "oauth4webapi";
3
2
  const authStateCookieName = 'auth_state';
4
3
  const stateIdGenerator = () => crypto.randomUUID();
5
4
  const getKeycloakIdentity = async (issuer, client_id, scope, redirectUrl) => {
@@ -5,5 +5,6 @@ export { inMemorySessionProvider } from './auth/inMemorySessionProvider.js';
5
5
  export { redisSessionProvider } from './auth/redisSessionProvider.js';
6
6
  export { machineAuthenticationProvider } from './auth/machineAuthenticationProvider.js';
7
7
  export { userAuthenticationProvider } from './auth/userAuthenticationProvider.js';
8
- export { getBlobService, getCommunicationService, getDataService, getTemplateService, getWebsiteService } from './server-side/getServices.js';
8
+ export { getBlobService, getCommunicationService, getDataService, getTemplateService, getWebsiteService, getAIService } from './server-side/getServices.js';
9
+ export { AiMessage } from '@functionalcms/services';
9
10
  export type { RedirectResponse } from './auth/RedirectResponse.js';
@@ -5,19 +5,5 @@ export { inMemorySessionProvider } from './auth/inMemorySessionProvider.js';
5
5
  export { redisSessionProvider } from './auth/redisSessionProvider.js';
6
6
  export { machineAuthenticationProvider } from './auth/machineAuthenticationProvider.js';
7
7
  export { userAuthenticationProvider } from './auth/userAuthenticationProvider.js';
8
- export { getBlobService, getCommunicationService, getDataService, getTemplateService, getWebsiteService } from './server-side/getServices.js';
9
- // export {
10
- // authenticationHandle,
11
- // authorizationHandle,
12
- // errorHandler,
13
- // machineAuthenticationProvider,
14
- // userAuthenticationProvider,
15
- // inMemorySessionProvider,
16
- // redisSessionProvider,
17
- // getDataService,
18
- // getCommunicationService,
19
- // getWebsiteService,
20
- // getTemplateService,
21
- // getBlobService,
22
- // RedirectResponse
23
- // }
8
+ export { getBlobService, getCommunicationService, getDataService, getTemplateService, getWebsiteService, getAIService } from './server-side/getServices.js';
9
+ export { AiMessage } from '@functionalcms/services';
@@ -1,6 +1,7 @@
1
- import { CommunicationService, DataService, TemplateService, WebsitesService, BlobService } from "@functionalcms/services";
1
+ import { CommunicationService, DataService, TemplateService, WebsitesService, BlobService, AiService } from "@functionalcms/services";
2
2
  export declare const getDataService: (locals: any) => DataService;
3
3
  export declare const getCommunicationService: (locals: any) => CommunicationService;
4
4
  export declare const getWebsiteService: (locals: any) => WebsitesService;
5
5
  export declare const getTemplateService: (locals: any) => TemplateService;
6
6
  export declare const getBlobService: (locals: any) => BlobService;
7
+ export declare const getAIService: (locals: any) => AiService;
@@ -1,5 +1,5 @@
1
1
  import { DOMAIN, ENDPOINT } from "$env/static/private";
2
- import { CommunicationService, DataService, TemplateService, WebsitesService, BlobService } from "@functionalcms/services";
2
+ import { CommunicationService, DataService, TemplateService, WebsitesService, BlobService, AiService } from "@functionalcms/services";
3
3
  const getAccessToken = (locals) => {
4
4
  return locals.token.access_token;
5
5
  };
@@ -28,3 +28,8 @@ export const getBlobService = (locals) => {
28
28
  const service = new BlobService(accessToken, DOMAIN, ENDPOINT);
29
29
  return service;
30
30
  };
31
+ export const getAIService = (locals) => {
32
+ const accessToken = getAccessToken(locals);
33
+ const service = new AiService(accessToken, DOMAIN, ENDPOINT);
34
+ return service;
35
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@functionalcms/svelte-components",
3
- "version": "2.25.0",
3
+ "version": "2.26.0",
4
4
  "watch": {
5
5
  "build": {
6
6
  "patterns": [
@@ -52,7 +52,6 @@
52
52
  "@sveltejs/vite-plugin-svelte": "^3.0.1",
53
53
  "agnostic-css": "^1.0.34",
54
54
  "agnostic-svelte": "^1.1.27",
55
- "date-picker-svelte": "^2.14.1",
56
55
  "npm-watch": "^0.11.0",
57
56
  "publint": "^0.2.7",
58
57
  "sass": "^1.69.7",
@@ -63,9 +62,9 @@
63
62
  "vite": "^5.0.10"
64
63
  },
65
64
  "dependencies": {
66
- "@auth/sveltekit": "latest",
67
65
  "@splidejs/svelte-splide": "^0.2.9",
68
66
  "agnostic-svelte": "^1.1.27",
67
+ "date-picker-svelte": "^2.14.1",
69
68
  "mdsvex": "^0.11.2",
70
69
  "node-html-parser": "^6.1.12",
71
70
  "oauth4webapi": "^2.17.0",