@functionalcms/svelte-components 3.5.7 → 3.5.9

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,4 +1,3 @@
1
- import type { Token } from './types';
2
1
  export declare const createMachineTokenApprovedLocals: (scope?: string) => Promise<{
3
- token: Token;
2
+ token: any;
4
3
  }>;
@@ -1,16 +1,18 @@
1
1
  import { AUTH_KEYCLOAK_ID, AUTH_KEYCLOAK_SECRET, AUTH_KEYCLOAK_ISSUER } from '$env/static/private';
2
2
  export const createMachineTokenApprovedLocals = async (scope = '') => {
3
- const response = await fetch(`${AUTH_KEYCLOAK_ISSUER}/protocol/openid-connect/token`, {
3
+ const url = `${AUTH_KEYCLOAK_ISSUER}/protocol/openid-connect/token`;
4
+ const body = new URLSearchParams({
5
+ grant_type: "client_credentials",
6
+ client_id: AUTH_KEYCLOAK_ID,
7
+ client_secret: AUTH_KEYCLOAK_SECRET,
8
+ scope: `openid profile offline_access ${scope}`,
9
+ });
10
+ const response = await fetch(url, {
4
11
  method: "POST",
5
- body: new URLSearchParams({
6
- grant_type: "client_credentials",
7
- client_id: AUTH_KEYCLOAK_ID,
8
- client_secret: AUTH_KEYCLOAK_SECRET,
9
- scope,
10
- }),
12
+ body: body,
11
13
  headers: {
12
14
  "Content-Type": "application/x-www-form-urlencoded",
13
- Accept: "application/json"
15
+ Accept: "*/*"
14
16
  }
15
17
  });
16
18
  if (!response.ok) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@functionalcms/svelte-components",
3
- "version": "3.5.7",
3
+ "version": "3.5.9",
4
4
  "watch": {
5
5
  "build": {
6
6
  "patterns": [
@@ -48,7 +48,7 @@
48
48
  "@sveltejs/vite-plugin-svelte": "^4.0.0",
49
49
  "publint": "^0.2.12",
50
50
  "sass": "^1.69.7",
51
- "svelte": "^5.0.0",
51
+ "svelte": "5.17.2",
52
52
  "svelte-check": "^4.0.0",
53
53
  "tslib": "^2.6.2",
54
54
  "typescript": "^5.0.0",