@jam-comments/server-utilities 5.12.0 → 5.12.2
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.
|
@@ -5,9 +5,19 @@ const injectSchema_1 = require("./injectSchema");
|
|
|
5
5
|
const markupFetcher_1 = require("./markupFetcher");
|
|
6
6
|
const utils_1 = require("./utils");
|
|
7
7
|
function simpleMarkupFetcher(platform, fetchImplementation = fetch) {
|
|
8
|
-
return async ({ tz = undefined, path, domain, apiKey, schema, dateFormat, baseUrl = markupFetcher_1.BASE_URL, environment = (0, utils_1.getEnvironment)(), copy = {}, }) => {
|
|
8
|
+
return async ({ tz = undefined, path, cache, domain, apiKey, schema, dateFormat, baseUrl = markupFetcher_1.BASE_URL, environment = (0, utils_1.getEnvironment)(), copy = {}, }) => {
|
|
9
9
|
path = path || "/";
|
|
10
|
-
const markup = await (0, markupFetcher_1.fetchFreshMarkup)({
|
|
10
|
+
const markup = await (0, markupFetcher_1.fetchFreshMarkup)({
|
|
11
|
+
tz,
|
|
12
|
+
path,
|
|
13
|
+
copy,
|
|
14
|
+
cache,
|
|
15
|
+
domain,
|
|
16
|
+
apiKey,
|
|
17
|
+
baseUrl,
|
|
18
|
+
environment,
|
|
19
|
+
dateFormat,
|
|
20
|
+
}, fetchImplementation, platform);
|
|
11
21
|
if (schema) {
|
|
12
22
|
const preparedSchema = typeof schema !== "string" ? JSON.stringify(schema) : schema;
|
|
13
23
|
const parsedSchema = (0, utils_1.parseJson)(preparedSchema);
|
|
@@ -2,9 +2,19 @@ import { injectSchema } from "./injectSchema";
|
|
|
2
2
|
import { BASE_URL, fetchFreshMarkup } from "./markupFetcher";
|
|
3
3
|
import { getEnvironment, parseJson } from "./utils";
|
|
4
4
|
export function simpleMarkupFetcher(platform, fetchImplementation = fetch) {
|
|
5
|
-
return async ({ tz = undefined, path, domain, apiKey, schema, dateFormat, baseUrl = BASE_URL, environment = getEnvironment(), copy = {}, }) => {
|
|
5
|
+
return async ({ tz = undefined, path, cache, domain, apiKey, schema, dateFormat, baseUrl = BASE_URL, environment = getEnvironment(), copy = {}, }) => {
|
|
6
6
|
path = path || "/";
|
|
7
|
-
const markup = await fetchFreshMarkup({
|
|
7
|
+
const markup = await fetchFreshMarkup({
|
|
8
|
+
tz,
|
|
9
|
+
path,
|
|
10
|
+
copy,
|
|
11
|
+
cache,
|
|
12
|
+
domain,
|
|
13
|
+
apiKey,
|
|
14
|
+
baseUrl,
|
|
15
|
+
environment,
|
|
16
|
+
dateFormat,
|
|
17
|
+
}, fetchImplementation, platform);
|
|
8
18
|
if (schema) {
|
|
9
19
|
const preparedSchema = typeof schema !== "string" ? JSON.stringify(schema) : schema;
|
|
10
20
|
const parsedSchema = parseJson(preparedSchema);
|