@builder.io/sdk-svelte 5.2.9 → 5.2.10

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 +1 @@
1
- export declare const SDK_VERSION = "5.2.9";
1
+ export declare const SDK_VERSION = "5.2.10";
@@ -1 +1 @@
1
- export const SDK_VERSION = "5.2.9";
1
+ export const SDK_VERSION = "5.2.10";
@@ -76,11 +76,18 @@ export const generateContentUrl = (options) => {
76
76
  }
77
77
  return url;
78
78
  };
79
+ const parseStudioUserAttribute = (value) => {
80
+ if (value === 'true')
81
+ return true;
82
+ if (value === 'false')
83
+ return false;
84
+ return value;
85
+ };
79
86
  const getUserAttributesFromQueryOptions = (queryOptions) => {
80
87
  const newUserAttributes = {};
81
88
  for (const key in queryOptions) {
82
89
  if (key.startsWith('userAttributes.')) {
83
- newUserAttributes[key] = queryOptions[key];
90
+ newUserAttributes[key] = parseStudioUserAttribute(queryOptions[key]);
84
91
  delete queryOptions[key];
85
92
  }
86
93
  }
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "5.2.9";
1
+ export declare const SDK_VERSION = "5.2.10";
@@ -1 +1 @@
1
- export const SDK_VERSION = "5.2.9";
1
+ export const SDK_VERSION = "5.2.10";
@@ -76,11 +76,18 @@ export const generateContentUrl = (options) => {
76
76
  }
77
77
  return url;
78
78
  };
79
+ const parseStudioUserAttribute = (value) => {
80
+ if (value === 'true')
81
+ return true;
82
+ if (value === 'false')
83
+ return false;
84
+ return value;
85
+ };
79
86
  const getUserAttributesFromQueryOptions = (queryOptions) => {
80
87
  const newUserAttributes = {};
81
88
  for (const key in queryOptions) {
82
89
  if (key.startsWith('userAttributes.')) {
83
- newUserAttributes[key] = queryOptions[key];
90
+ newUserAttributes[key] = parseStudioUserAttribute(queryOptions[key]);
84
91
  delete queryOptions[key];
85
92
  }
86
93
  }
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "5.2.9";
1
+ export declare const SDK_VERSION = "5.2.10";
@@ -1 +1 @@
1
- export const SDK_VERSION = "5.2.9";
1
+ export const SDK_VERSION = "5.2.10";
@@ -76,11 +76,18 @@ export const generateContentUrl = (options) => {
76
76
  }
77
77
  return url;
78
78
  };
79
+ const parseStudioUserAttribute = (value) => {
80
+ if (value === 'true')
81
+ return true;
82
+ if (value === 'false')
83
+ return false;
84
+ return value;
85
+ };
79
86
  const getUserAttributesFromQueryOptions = (queryOptions) => {
80
87
  const newUserAttributes = {};
81
88
  for (const key in queryOptions) {
82
89
  if (key.startsWith('userAttributes.')) {
83
- newUserAttributes[key] = queryOptions[key];
90
+ newUserAttributes[key] = parseStudioUserAttribute(queryOptions[key]);
84
91
  delete queryOptions[key];
85
92
  }
86
93
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@builder.io/sdk-svelte",
3
3
  "description": "Builder.io SDK for Svelte",
4
- "version": "5.2.9",
4
+ "version": "5.2.10",
5
5
  "type": "module",
6
6
  "files": [
7
7
  "lib",
@@ -1 +1 @@
1
- export const SDK_VERSION = "5.2.9"
1
+ export const SDK_VERSION = "5.2.10"
@@ -96,11 +96,16 @@ export const generateContentUrl = (options: GetContentOptions): URL => {
96
96
  }
97
97
  return url;
98
98
  };
99
+ const parseStudioUserAttribute = (value: unknown) => {
100
+ if (value === 'true') return true;
101
+ if (value === 'false') return false;
102
+ return value;
103
+ };
99
104
  const getUserAttributesFromQueryOptions = (queryOptions: any) => {
100
105
  const newUserAttributes: any = {};
101
106
  for (const key in queryOptions) {
102
107
  if (key.startsWith('userAttributes.')) {
103
- newUserAttributes[key] = queryOptions[key];
108
+ newUserAttributes[key] = parseStudioUserAttribute(queryOptions[key]);
104
109
  delete queryOptions[key];
105
110
  }
106
111
  }