@builder.io/sdk-qwik 0.16.23 → 0.17.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.
- package/lib/browser/constants/sdk-version.qwik.cjs +1 -1
- package/lib/browser/constants/sdk-version.qwik.mjs +1 -1
- package/lib/browser/functions/get-content/generate-content-url.qwik.cjs +11 -4
- package/lib/browser/functions/get-content/generate-content-url.qwik.mjs +11 -4
- package/lib/browser/functions/get-content/index.qwik.cjs +10 -15
- package/lib/browser/functions/get-content/index.qwik.mjs +10 -15
- package/lib/browser/functions/register-component.qwik.cjs +2 -1
- package/lib/browser/functions/register-component.qwik.mjs +2 -1
- package/lib/edge/constants/sdk-version.qwik.cjs +1 -1
- package/lib/edge/constants/sdk-version.qwik.mjs +1 -1
- package/lib/edge/functions/get-content/generate-content-url.qwik.cjs +11 -4
- package/lib/edge/functions/get-content/generate-content-url.qwik.mjs +11 -4
- package/lib/edge/functions/get-content/index.qwik.cjs +10 -15
- package/lib/edge/functions/get-content/index.qwik.mjs +10 -15
- package/lib/edge/functions/register-component.qwik.cjs +2 -1
- package/lib/edge/functions/register-component.qwik.mjs +2 -1
- package/lib/node/constants/sdk-version.qwik.cjs +1 -1
- package/lib/node/constants/sdk-version.qwik.mjs +1 -1
- package/lib/node/functions/get-content/generate-content-url.qwik.cjs +11 -4
- package/lib/node/functions/get-content/generate-content-url.qwik.mjs +11 -4
- package/lib/node/functions/get-content/index.qwik.cjs +10 -15
- package/lib/node/functions/get-content/index.qwik.mjs +10 -15
- package/lib/node/functions/register-component.qwik.cjs +2 -1
- package/lib/node/functions/register-component.qwik.mjs +2 -1
- package/package.json +1 -1
- package/types/src/constants/sdk-version.d.ts +1 -1
- package/types/src/functions/get-content/index.d.ts +1 -1
|
@@ -20,8 +20,15 @@ const generateContentUrl = (options) => {
|
|
|
20
20
|
url.searchParams.set("limit", String(limit));
|
|
21
21
|
url.searchParams.set("noTraverse", String(noTraverse));
|
|
22
22
|
url.searchParams.set("includeRefs", String(true));
|
|
23
|
-
|
|
24
|
-
|
|
23
|
+
const finalLocale = locale || (userAttributes == null ? void 0 : userAttributes.locale);
|
|
24
|
+
let finalUserAttributes = userAttributes;
|
|
25
|
+
if (finalLocale) {
|
|
26
|
+
url.searchParams.set("locale", finalLocale);
|
|
27
|
+
finalUserAttributes = {
|
|
28
|
+
locale: finalLocale,
|
|
29
|
+
...finalUserAttributes
|
|
30
|
+
};
|
|
31
|
+
}
|
|
25
32
|
if (enrich)
|
|
26
33
|
url.searchParams.set("enrich", String(enrich));
|
|
27
34
|
url.searchParams.set("omit", omit || "meta.componentsUsed");
|
|
@@ -49,8 +56,8 @@ const generateContentUrl = (options) => {
|
|
|
49
56
|
const flattened = flatten.flatten(queryOptions);
|
|
50
57
|
for (const key in flattened)
|
|
51
58
|
url.searchParams.set(key, String(flattened[key]));
|
|
52
|
-
if (
|
|
53
|
-
url.searchParams.set("userAttributes", JSON.stringify(
|
|
59
|
+
if (finalUserAttributes)
|
|
60
|
+
url.searchParams.set("userAttributes", JSON.stringify(finalUserAttributes));
|
|
54
61
|
if (query) {
|
|
55
62
|
const flattened2 = flatten.flattenMongoQuery({
|
|
56
63
|
query
|
|
@@ -18,8 +18,15 @@ const generateContentUrl = (options) => {
|
|
|
18
18
|
url.searchParams.set("limit", String(limit));
|
|
19
19
|
url.searchParams.set("noTraverse", String(noTraverse));
|
|
20
20
|
url.searchParams.set("includeRefs", String(true));
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
const finalLocale = locale || (userAttributes == null ? void 0 : userAttributes.locale);
|
|
22
|
+
let finalUserAttributes = userAttributes;
|
|
23
|
+
if (finalLocale) {
|
|
24
|
+
url.searchParams.set("locale", finalLocale);
|
|
25
|
+
finalUserAttributes = {
|
|
26
|
+
locale: finalLocale,
|
|
27
|
+
...finalUserAttributes
|
|
28
|
+
};
|
|
29
|
+
}
|
|
23
30
|
if (enrich)
|
|
24
31
|
url.searchParams.set("enrich", String(enrich));
|
|
25
32
|
url.searchParams.set("omit", omit || "meta.componentsUsed");
|
|
@@ -47,8 +54,8 @@ const generateContentUrl = (options) => {
|
|
|
47
54
|
const flattened = flatten(queryOptions);
|
|
48
55
|
for (const key in flattened)
|
|
49
56
|
url.searchParams.set(key, String(flattened[key]));
|
|
50
|
-
if (
|
|
51
|
-
url.searchParams.set("userAttributes", JSON.stringify(
|
|
57
|
+
if (finalUserAttributes)
|
|
58
|
+
url.searchParams.set("userAttributes", JSON.stringify(finalUserAttributes));
|
|
52
59
|
if (query) {
|
|
53
60
|
const flattened2 = flattenMongoQuery({
|
|
54
61
|
query
|
|
@@ -54,22 +54,17 @@ const _processContentResult = async (options, content, url = generateContentUrl.
|
|
|
54
54
|
return content.results;
|
|
55
55
|
};
|
|
56
56
|
async function fetchEntries(options) {
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
return null;
|
|
67
|
-
}
|
|
68
|
-
return _processContentResult(options, content);
|
|
69
|
-
} catch (error) {
|
|
70
|
-
logger.logger.error("Error fetching data. ", error);
|
|
71
|
-
return null;
|
|
57
|
+
const url = generateContentUrl.generateContentUrl(options);
|
|
58
|
+
const content = await _fetchContent(options);
|
|
59
|
+
if (!checkContentHasResults(content)) {
|
|
60
|
+
logger.logger.error("Error fetching data. ", {
|
|
61
|
+
url,
|
|
62
|
+
content,
|
|
63
|
+
options
|
|
64
|
+
});
|
|
65
|
+
throw content;
|
|
72
66
|
}
|
|
67
|
+
return _processContentResult(options, content);
|
|
73
68
|
}
|
|
74
69
|
exports._processContentResult = _processContentResult;
|
|
75
70
|
exports.fetchEntries = fetchEntries;
|
|
@@ -52,22 +52,17 @@ const _processContentResult = async (options, content, url = generateContentUrl(
|
|
|
52
52
|
return content.results;
|
|
53
53
|
};
|
|
54
54
|
async function fetchEntries(options) {
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
return null;
|
|
65
|
-
}
|
|
66
|
-
return _processContentResult(options, content);
|
|
67
|
-
} catch (error) {
|
|
68
|
-
logger.error("Error fetching data. ", error);
|
|
69
|
-
return null;
|
|
55
|
+
const url = generateContentUrl(options);
|
|
56
|
+
const content = await _fetchContent(options);
|
|
57
|
+
if (!checkContentHasResults(content)) {
|
|
58
|
+
logger.error("Error fetching data. ", {
|
|
59
|
+
url,
|
|
60
|
+
content,
|
|
61
|
+
options
|
|
62
|
+
});
|
|
63
|
+
throw content;
|
|
70
64
|
}
|
|
65
|
+
return _processContentResult(options, content);
|
|
71
66
|
}
|
|
72
67
|
export {
|
|
73
68
|
_processContentResult,
|
|
@@ -6,7 +6,8 @@ const createRegisterComponentMessage = (info) => ({
|
|
|
6
6
|
});
|
|
7
7
|
const serializeFn = (fnValue) => {
|
|
8
8
|
const fnStr = fnValue.toString().trim();
|
|
9
|
-
const
|
|
9
|
+
const isArrowWithoutParens = /^[a-zA-Z0-9_]+\s*=>/i.test(fnStr);
|
|
10
|
+
const appendFunction = !fnStr.startsWith("function") && !fnStr.startsWith("(") && !isArrowWithoutParens;
|
|
10
11
|
return `return (${appendFunction ? "function " : ""}${fnStr}).apply(this, arguments)`;
|
|
11
12
|
};
|
|
12
13
|
function serializeIncludingFunctions(info) {
|
|
@@ -4,7 +4,8 @@ const createRegisterComponentMessage = (info) => ({
|
|
|
4
4
|
});
|
|
5
5
|
const serializeFn = (fnValue) => {
|
|
6
6
|
const fnStr = fnValue.toString().trim();
|
|
7
|
-
const
|
|
7
|
+
const isArrowWithoutParens = /^[a-zA-Z0-9_]+\s*=>/i.test(fnStr);
|
|
8
|
+
const appendFunction = !fnStr.startsWith("function") && !fnStr.startsWith("(") && !isArrowWithoutParens;
|
|
8
9
|
return `return (${appendFunction ? "function " : ""}${fnStr}).apply(this, arguments)`;
|
|
9
10
|
};
|
|
10
11
|
function serializeIncludingFunctions(info) {
|
|
@@ -20,8 +20,15 @@ const generateContentUrl = (options) => {
|
|
|
20
20
|
url.searchParams.set("limit", String(limit));
|
|
21
21
|
url.searchParams.set("noTraverse", String(noTraverse));
|
|
22
22
|
url.searchParams.set("includeRefs", String(true));
|
|
23
|
-
|
|
24
|
-
|
|
23
|
+
const finalLocale = locale || (userAttributes == null ? void 0 : userAttributes.locale);
|
|
24
|
+
let finalUserAttributes = userAttributes;
|
|
25
|
+
if (finalLocale) {
|
|
26
|
+
url.searchParams.set("locale", finalLocale);
|
|
27
|
+
finalUserAttributes = {
|
|
28
|
+
locale: finalLocale,
|
|
29
|
+
...finalUserAttributes
|
|
30
|
+
};
|
|
31
|
+
}
|
|
25
32
|
if (enrich)
|
|
26
33
|
url.searchParams.set("enrich", String(enrich));
|
|
27
34
|
url.searchParams.set("omit", omit || "meta.componentsUsed");
|
|
@@ -49,8 +56,8 @@ const generateContentUrl = (options) => {
|
|
|
49
56
|
const flattened = flatten.flatten(queryOptions);
|
|
50
57
|
for (const key in flattened)
|
|
51
58
|
url.searchParams.set(key, String(flattened[key]));
|
|
52
|
-
if (
|
|
53
|
-
url.searchParams.set("userAttributes", JSON.stringify(
|
|
59
|
+
if (finalUserAttributes)
|
|
60
|
+
url.searchParams.set("userAttributes", JSON.stringify(finalUserAttributes));
|
|
54
61
|
if (query) {
|
|
55
62
|
const flattened2 = flatten.flattenMongoQuery({
|
|
56
63
|
query
|
|
@@ -18,8 +18,15 @@ const generateContentUrl = (options) => {
|
|
|
18
18
|
url.searchParams.set("limit", String(limit));
|
|
19
19
|
url.searchParams.set("noTraverse", String(noTraverse));
|
|
20
20
|
url.searchParams.set("includeRefs", String(true));
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
const finalLocale = locale || (userAttributes == null ? void 0 : userAttributes.locale);
|
|
22
|
+
let finalUserAttributes = userAttributes;
|
|
23
|
+
if (finalLocale) {
|
|
24
|
+
url.searchParams.set("locale", finalLocale);
|
|
25
|
+
finalUserAttributes = {
|
|
26
|
+
locale: finalLocale,
|
|
27
|
+
...finalUserAttributes
|
|
28
|
+
};
|
|
29
|
+
}
|
|
23
30
|
if (enrich)
|
|
24
31
|
url.searchParams.set("enrich", String(enrich));
|
|
25
32
|
url.searchParams.set("omit", omit || "meta.componentsUsed");
|
|
@@ -47,8 +54,8 @@ const generateContentUrl = (options) => {
|
|
|
47
54
|
const flattened = flatten(queryOptions);
|
|
48
55
|
for (const key in flattened)
|
|
49
56
|
url.searchParams.set(key, String(flattened[key]));
|
|
50
|
-
if (
|
|
51
|
-
url.searchParams.set("userAttributes", JSON.stringify(
|
|
57
|
+
if (finalUserAttributes)
|
|
58
|
+
url.searchParams.set("userAttributes", JSON.stringify(finalUserAttributes));
|
|
52
59
|
if (query) {
|
|
53
60
|
const flattened2 = flattenMongoQuery({
|
|
54
61
|
query
|
|
@@ -54,22 +54,17 @@ const _processContentResult = async (options, content, url = generateContentUrl.
|
|
|
54
54
|
return content.results;
|
|
55
55
|
};
|
|
56
56
|
async function fetchEntries(options) {
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
return null;
|
|
67
|
-
}
|
|
68
|
-
return _processContentResult(options, content);
|
|
69
|
-
} catch (error) {
|
|
70
|
-
logger.logger.error("Error fetching data. ", error);
|
|
71
|
-
return null;
|
|
57
|
+
const url = generateContentUrl.generateContentUrl(options);
|
|
58
|
+
const content = await _fetchContent(options);
|
|
59
|
+
if (!checkContentHasResults(content)) {
|
|
60
|
+
logger.logger.error("Error fetching data. ", {
|
|
61
|
+
url,
|
|
62
|
+
content,
|
|
63
|
+
options
|
|
64
|
+
});
|
|
65
|
+
throw content;
|
|
72
66
|
}
|
|
67
|
+
return _processContentResult(options, content);
|
|
73
68
|
}
|
|
74
69
|
exports._processContentResult = _processContentResult;
|
|
75
70
|
exports.fetchEntries = fetchEntries;
|
|
@@ -52,22 +52,17 @@ const _processContentResult = async (options, content, url = generateContentUrl(
|
|
|
52
52
|
return content.results;
|
|
53
53
|
};
|
|
54
54
|
async function fetchEntries(options) {
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
return null;
|
|
65
|
-
}
|
|
66
|
-
return _processContentResult(options, content);
|
|
67
|
-
} catch (error) {
|
|
68
|
-
logger.error("Error fetching data. ", error);
|
|
69
|
-
return null;
|
|
55
|
+
const url = generateContentUrl(options);
|
|
56
|
+
const content = await _fetchContent(options);
|
|
57
|
+
if (!checkContentHasResults(content)) {
|
|
58
|
+
logger.error("Error fetching data. ", {
|
|
59
|
+
url,
|
|
60
|
+
content,
|
|
61
|
+
options
|
|
62
|
+
});
|
|
63
|
+
throw content;
|
|
70
64
|
}
|
|
65
|
+
return _processContentResult(options, content);
|
|
71
66
|
}
|
|
72
67
|
export {
|
|
73
68
|
_processContentResult,
|
|
@@ -6,7 +6,8 @@ const createRegisterComponentMessage = (info) => ({
|
|
|
6
6
|
});
|
|
7
7
|
const serializeFn = (fnValue) => {
|
|
8
8
|
const fnStr = fnValue.toString().trim();
|
|
9
|
-
const
|
|
9
|
+
const isArrowWithoutParens = /^[a-zA-Z0-9_]+\s*=>/i.test(fnStr);
|
|
10
|
+
const appendFunction = !fnStr.startsWith("function") && !fnStr.startsWith("(") && !isArrowWithoutParens;
|
|
10
11
|
return `return (${appendFunction ? "function " : ""}${fnStr}).apply(this, arguments)`;
|
|
11
12
|
};
|
|
12
13
|
function serializeIncludingFunctions(info) {
|
|
@@ -4,7 +4,8 @@ const createRegisterComponentMessage = (info) => ({
|
|
|
4
4
|
});
|
|
5
5
|
const serializeFn = (fnValue) => {
|
|
6
6
|
const fnStr = fnValue.toString().trim();
|
|
7
|
-
const
|
|
7
|
+
const isArrowWithoutParens = /^[a-zA-Z0-9_]+\s*=>/i.test(fnStr);
|
|
8
|
+
const appendFunction = !fnStr.startsWith("function") && !fnStr.startsWith("(") && !isArrowWithoutParens;
|
|
8
9
|
return `return (${appendFunction ? "function " : ""}${fnStr}).apply(this, arguments)`;
|
|
9
10
|
};
|
|
10
11
|
function serializeIncludingFunctions(info) {
|
|
@@ -20,8 +20,15 @@ const generateContentUrl = (options) => {
|
|
|
20
20
|
url.searchParams.set("limit", String(limit));
|
|
21
21
|
url.searchParams.set("noTraverse", String(noTraverse));
|
|
22
22
|
url.searchParams.set("includeRefs", String(true));
|
|
23
|
-
|
|
24
|
-
|
|
23
|
+
const finalLocale = locale || (userAttributes == null ? void 0 : userAttributes.locale);
|
|
24
|
+
let finalUserAttributes = userAttributes;
|
|
25
|
+
if (finalLocale) {
|
|
26
|
+
url.searchParams.set("locale", finalLocale);
|
|
27
|
+
finalUserAttributes = {
|
|
28
|
+
locale: finalLocale,
|
|
29
|
+
...finalUserAttributes
|
|
30
|
+
};
|
|
31
|
+
}
|
|
25
32
|
if (enrich)
|
|
26
33
|
url.searchParams.set("enrich", String(enrich));
|
|
27
34
|
url.searchParams.set("omit", omit || "meta.componentsUsed");
|
|
@@ -49,8 +56,8 @@ const generateContentUrl = (options) => {
|
|
|
49
56
|
const flattened = flatten.flatten(queryOptions);
|
|
50
57
|
for (const key in flattened)
|
|
51
58
|
url.searchParams.set(key, String(flattened[key]));
|
|
52
|
-
if (
|
|
53
|
-
url.searchParams.set("userAttributes", JSON.stringify(
|
|
59
|
+
if (finalUserAttributes)
|
|
60
|
+
url.searchParams.set("userAttributes", JSON.stringify(finalUserAttributes));
|
|
54
61
|
if (query) {
|
|
55
62
|
const flattened2 = flatten.flattenMongoQuery({
|
|
56
63
|
query
|
|
@@ -18,8 +18,15 @@ const generateContentUrl = (options) => {
|
|
|
18
18
|
url.searchParams.set("limit", String(limit));
|
|
19
19
|
url.searchParams.set("noTraverse", String(noTraverse));
|
|
20
20
|
url.searchParams.set("includeRefs", String(true));
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
const finalLocale = locale || (userAttributes == null ? void 0 : userAttributes.locale);
|
|
22
|
+
let finalUserAttributes = userAttributes;
|
|
23
|
+
if (finalLocale) {
|
|
24
|
+
url.searchParams.set("locale", finalLocale);
|
|
25
|
+
finalUserAttributes = {
|
|
26
|
+
locale: finalLocale,
|
|
27
|
+
...finalUserAttributes
|
|
28
|
+
};
|
|
29
|
+
}
|
|
23
30
|
if (enrich)
|
|
24
31
|
url.searchParams.set("enrich", String(enrich));
|
|
25
32
|
url.searchParams.set("omit", omit || "meta.componentsUsed");
|
|
@@ -47,8 +54,8 @@ const generateContentUrl = (options) => {
|
|
|
47
54
|
const flattened = flatten(queryOptions);
|
|
48
55
|
for (const key in flattened)
|
|
49
56
|
url.searchParams.set(key, String(flattened[key]));
|
|
50
|
-
if (
|
|
51
|
-
url.searchParams.set("userAttributes", JSON.stringify(
|
|
57
|
+
if (finalUserAttributes)
|
|
58
|
+
url.searchParams.set("userAttributes", JSON.stringify(finalUserAttributes));
|
|
52
59
|
if (query) {
|
|
53
60
|
const flattened2 = flattenMongoQuery({
|
|
54
61
|
query
|
|
@@ -54,22 +54,17 @@ const _processContentResult = async (options, content, url = generateContentUrl.
|
|
|
54
54
|
return content.results;
|
|
55
55
|
};
|
|
56
56
|
async function fetchEntries(options) {
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
return null;
|
|
67
|
-
}
|
|
68
|
-
return _processContentResult(options, content);
|
|
69
|
-
} catch (error) {
|
|
70
|
-
logger.logger.error("Error fetching data. ", error);
|
|
71
|
-
return null;
|
|
57
|
+
const url = generateContentUrl.generateContentUrl(options);
|
|
58
|
+
const content = await _fetchContent(options);
|
|
59
|
+
if (!checkContentHasResults(content)) {
|
|
60
|
+
logger.logger.error("Error fetching data. ", {
|
|
61
|
+
url,
|
|
62
|
+
content,
|
|
63
|
+
options
|
|
64
|
+
});
|
|
65
|
+
throw content;
|
|
72
66
|
}
|
|
67
|
+
return _processContentResult(options, content);
|
|
73
68
|
}
|
|
74
69
|
exports._processContentResult = _processContentResult;
|
|
75
70
|
exports.fetchEntries = fetchEntries;
|
|
@@ -52,22 +52,17 @@ const _processContentResult = async (options, content, url = generateContentUrl(
|
|
|
52
52
|
return content.results;
|
|
53
53
|
};
|
|
54
54
|
async function fetchEntries(options) {
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
return null;
|
|
65
|
-
}
|
|
66
|
-
return _processContentResult(options, content);
|
|
67
|
-
} catch (error) {
|
|
68
|
-
logger.error("Error fetching data. ", error);
|
|
69
|
-
return null;
|
|
55
|
+
const url = generateContentUrl(options);
|
|
56
|
+
const content = await _fetchContent(options);
|
|
57
|
+
if (!checkContentHasResults(content)) {
|
|
58
|
+
logger.error("Error fetching data. ", {
|
|
59
|
+
url,
|
|
60
|
+
content,
|
|
61
|
+
options
|
|
62
|
+
});
|
|
63
|
+
throw content;
|
|
70
64
|
}
|
|
65
|
+
return _processContentResult(options, content);
|
|
71
66
|
}
|
|
72
67
|
export {
|
|
73
68
|
_processContentResult,
|
|
@@ -6,7 +6,8 @@ const createRegisterComponentMessage = (info) => ({
|
|
|
6
6
|
});
|
|
7
7
|
const serializeFn = (fnValue) => {
|
|
8
8
|
const fnStr = fnValue.toString().trim();
|
|
9
|
-
const
|
|
9
|
+
const isArrowWithoutParens = /^[a-zA-Z0-9_]+\s*=>/i.test(fnStr);
|
|
10
|
+
const appendFunction = !fnStr.startsWith("function") && !fnStr.startsWith("(") && !isArrowWithoutParens;
|
|
10
11
|
return `return (${appendFunction ? "function " : ""}${fnStr}).apply(this, arguments)`;
|
|
11
12
|
};
|
|
12
13
|
function serializeIncludingFunctions(info) {
|
|
@@ -4,7 +4,8 @@ const createRegisterComponentMessage = (info) => ({
|
|
|
4
4
|
});
|
|
5
5
|
const serializeFn = (fnValue) => {
|
|
6
6
|
const fnStr = fnValue.toString().trim();
|
|
7
|
-
const
|
|
7
|
+
const isArrowWithoutParens = /^[a-zA-Z0-9_]+\s*=>/i.test(fnStr);
|
|
8
|
+
const appendFunction = !fnStr.startsWith("function") && !fnStr.startsWith("(") && !isArrowWithoutParens;
|
|
8
9
|
return `return (${appendFunction ? "function " : ""}${fnStr}).apply(this, arguments)`;
|
|
9
10
|
};
|
|
10
11
|
function serializeIncludingFunctions(info) {
|
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "0.
|
|
1
|
+
export declare const SDK_VERSION = "0.17.0";
|
|
@@ -14,5 +14,5 @@ export declare const _processContentResult: (options: GetContentOptions, content
|
|
|
14
14
|
/**
|
|
15
15
|
* Returns a paginated array of entries that match the given options.
|
|
16
16
|
*/
|
|
17
|
-
export declare function fetchEntries(options: GetContentOptions): Promise<BuilderContent[]
|
|
17
|
+
export declare function fetchEntries(options: GetContentOptions): Promise<BuilderContent[]>;
|
|
18
18
|
export {};
|