contentful 11.3.1 → 11.3.3
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/dist/contentful.cjs
CHANGED
|
@@ -21294,7 +21294,7 @@ function createGlobalOptions(globalSettings) {
|
|
|
21294
21294
|
};
|
|
21295
21295
|
}
|
|
21296
21296
|
|
|
21297
|
-
var
|
|
21297
|
+
var W = {
|
|
21298
21298
|
0: 8203,
|
|
21299
21299
|
1: 8204,
|
|
21300
21300
|
2: 8205,
|
|
@@ -21312,301 +21312,312 @@ var R = {
|
|
|
21312
21312
|
e: 119161,
|
|
21313
21313
|
f: 119162
|
|
21314
21314
|
},
|
|
21315
|
-
|
|
21315
|
+
L = {
|
|
21316
21316
|
0: 8203,
|
|
21317
21317
|
1: 8204,
|
|
21318
21318
|
2: 8205,
|
|
21319
21319
|
3: 65279
|
|
21320
21320
|
},
|
|
21321
|
-
|
|
21322
|
-
function
|
|
21323
|
-
let
|
|
21324
|
-
return `${
|
|
21325
|
-
let
|
|
21326
|
-
if (
|
|
21327
|
-
return Array.from(
|
|
21321
|
+
j = new Array(4).fill(String.fromCodePoint(L[0])).join("");
|
|
21322
|
+
function U(t) {
|
|
21323
|
+
let n = JSON.stringify(t);
|
|
21324
|
+
return `${j}${Array.from(n).map(o => {
|
|
21325
|
+
let e = o.charCodeAt(0);
|
|
21326
|
+
if (e > 255) throw new Error(`Only ASCII edit info can be encoded. Error attempting to encode ${n} on character ${o} (${e})`);
|
|
21327
|
+
return Array.from(e.toString(4).padStart(4, "0")).map(r => String.fromCodePoint(L[r])).join("");
|
|
21328
21328
|
}).join("")}`;
|
|
21329
21329
|
}
|
|
21330
|
-
function
|
|
21331
|
-
return !Number.isNaN(Number(
|
|
21330
|
+
function Z(t) {
|
|
21331
|
+
return !Number.isNaN(Number(t)) || /[a-z]/i.test(t) && !/\d+(?:[-:\/]\d+){2}(?:T\d+(?:[-:\/]\d+){1,2}(\.\d+)?Z?)?/.test(t) ? !1 : !!Date.parse(t);
|
|
21332
21332
|
}
|
|
21333
|
-
function
|
|
21333
|
+
function q(t) {
|
|
21334
21334
|
try {
|
|
21335
|
-
new URL(
|
|
21336
|
-
} catch (
|
|
21335
|
+
new URL(t, t.startsWith("/") ? "https://acme.com" : void 0);
|
|
21336
|
+
} catch (n) {
|
|
21337
21337
|
return !1;
|
|
21338
21338
|
}
|
|
21339
21339
|
return !0;
|
|
21340
21340
|
}
|
|
21341
|
-
function
|
|
21342
|
-
return o === !0 || o === "auto" && (
|
|
21341
|
+
function G(t, n, o = "auto") {
|
|
21342
|
+
return o === !0 || o === "auto" && (Z(t) || q(t)) ? t : `${t}${U(n)}`;
|
|
21343
21343
|
}
|
|
21344
|
-
Object.fromEntries(Object.entries(
|
|
21345
|
-
Object.fromEntries(Object.entries(
|
|
21346
|
-
`${Object.values(
|
|
21347
|
-
function
|
|
21348
|
-
return
|
|
21344
|
+
Object.fromEntries(Object.entries(L).map(t => t.reverse()));
|
|
21345
|
+
Object.fromEntries(Object.entries(W).map(t => t.reverse()));
|
|
21346
|
+
`${Object.values(W).map(t => `\\u{${t.toString(16)}}`).join("")}`;
|
|
21347
|
+
function w(t, n) {
|
|
21348
|
+
return G(t, n);
|
|
21349
21349
|
}
|
|
21350
|
-
var
|
|
21351
|
-
|
|
21352
|
-
|
|
21353
|
-
|
|
21354
|
-
|
|
21355
|
-
|
|
21356
|
-
|
|
21357
|
-
|
|
21358
|
-
|
|
21359
|
-
|
|
21360
|
-
|
|
21361
|
-
if (arguments.length === 2) return a.get(e, t);
|
|
21362
|
-
var n = a.bind(a, e);
|
|
21363
|
-
for (var r in a) a.hasOwnProperty(r) && (n[r] = a[r].bind(n, e));
|
|
21364
|
-
return n;
|
|
21350
|
+
var x, F;
|
|
21351
|
+
function ne() {
|
|
21352
|
+
if (F) return x;
|
|
21353
|
+
F = 1;
|
|
21354
|
+
var t = Object.prototype.hasOwnProperty,
|
|
21355
|
+
n = Object.prototype.toString;
|
|
21356
|
+
return x = function (e, r, s) {
|
|
21357
|
+
if (n.call(r) !== "[object Function]") throw new TypeError("iterator must be a function");
|
|
21358
|
+
var c = e.length;
|
|
21359
|
+
if (c === +c) for (var i = 0; i < c; i++) r.call(s, e[i], i, e);else for (var u in e) t.call(e, u) && r.call(s, e[u], u, e);
|
|
21360
|
+
}, x;
|
|
21365
21361
|
}
|
|
21366
|
-
|
|
21367
|
-
|
|
21368
|
-
|
|
21369
|
-
|
|
21370
|
-
|
|
21371
|
-
|
|
21372
|
-
|
|
21373
|
-
|
|
21374
|
-
|
|
21375
|
-
|
|
21376
|
-
s =
|
|
21377
|
-
|
|
21378
|
-
for (var i = 0; i < r.length - 1; ++i) {
|
|
21379
|
-
var c = r[i];
|
|
21380
|
-
typeof c != "string" && typeof c != "number" && (c = String(c)), !(c === "__proto__" || c === "constructor" || c === "prototype") && (c === "-" && Array.isArray(t) && (c = t.length), s = r[i + 1], c in t || (s.match(/^(\d+|-)$/) ? t[c] = [] : t[c] = {}), t = t[c]);
|
|
21381
|
-
}
|
|
21382
|
-
return s === "-" && Array.isArray(t) && (s = t.length), t[s] = n, this;
|
|
21383
|
-
};
|
|
21384
|
-
a.remove = function (e, t) {
|
|
21385
|
-
var o = Array.isArray(t) ? t : a.parse(t),
|
|
21386
|
-
n = o[o.length - 1];
|
|
21387
|
-
if (n === void 0) throw new Error('Invalid JSON pointer for remove: "' + t + '"');
|
|
21388
|
-
var r = a.get(e, o.slice(0, -1));
|
|
21389
|
-
if (Array.isArray(r)) {
|
|
21390
|
-
var s = +n;
|
|
21391
|
-
if (n === "" && isNaN(s)) throw new Error('Invalid array index: "' + n + '"');
|
|
21392
|
-
Array.prototype.splice.call(r, s, 1);
|
|
21393
|
-
} else delete r[n];
|
|
21394
|
-
};
|
|
21395
|
-
a.dict = function (t, o) {
|
|
21396
|
-
var n = {};
|
|
21397
|
-
return a.walk(t, function (r, s) {
|
|
21398
|
-
n[s] = r;
|
|
21399
|
-
}, o), n;
|
|
21400
|
-
};
|
|
21401
|
-
a.walk = function (t, o, n) {
|
|
21402
|
-
var r = [];
|
|
21403
|
-
n = n || function (s) {
|
|
21404
|
-
var i = Object.prototype.toString.call(s);
|
|
21405
|
-
return i === "[object Object]" || i === "[object Array]";
|
|
21406
|
-
}, function s(i) {
|
|
21407
|
-
ne(i, function (c, u) {
|
|
21408
|
-
r.push(String(u)), n(c) ? s(c) : o(c, a.compile(r)), r.pop();
|
|
21409
|
-
});
|
|
21410
|
-
}(t);
|
|
21411
|
-
};
|
|
21412
|
-
a.has = function (t, o) {
|
|
21413
|
-
try {
|
|
21414
|
-
a.get(t, o);
|
|
21415
|
-
} catch (n) {
|
|
21416
|
-
return !1;
|
|
21362
|
+
var I, _;
|
|
21363
|
+
function re() {
|
|
21364
|
+
if (_) return I;
|
|
21365
|
+
_ = 1;
|
|
21366
|
+
var t = ne();
|
|
21367
|
+
I = n;
|
|
21368
|
+
function n(o, e, r) {
|
|
21369
|
+
if (arguments.length === 3) return n.set(o, e, r);
|
|
21370
|
+
if (arguments.length === 2) return n.get(o, e);
|
|
21371
|
+
var s = n.bind(n, o);
|
|
21372
|
+
for (var c in n) n.hasOwnProperty(c) && (s[c] = n[c].bind(s, o));
|
|
21373
|
+
return s;
|
|
21417
21374
|
}
|
|
21418
|
-
return
|
|
21419
|
-
|
|
21420
|
-
|
|
21421
|
-
|
|
21422
|
-
|
|
21423
|
-
|
|
21424
|
-
|
|
21425
|
-
}
|
|
21426
|
-
|
|
21427
|
-
|
|
21428
|
-
|
|
21429
|
-
|
|
21430
|
-
|
|
21431
|
-
a.
|
|
21432
|
-
|
|
21433
|
-
|
|
21434
|
-
|
|
21435
|
-
|
|
21436
|
-
|
|
21375
|
+
return n.get = function (e, r) {
|
|
21376
|
+
for (var s = Array.isArray(r) ? r : n.parse(r), c = 0; c < s.length; ++c) {
|
|
21377
|
+
var i = s[c];
|
|
21378
|
+
if (!(typeof e == "object" && i in e)) throw new Error("Invalid reference token: " + i);
|
|
21379
|
+
e = e[i];
|
|
21380
|
+
}
|
|
21381
|
+
return e;
|
|
21382
|
+
}, n.set = function (e, r, s) {
|
|
21383
|
+
var c = Array.isArray(r) ? r : n.parse(r),
|
|
21384
|
+
i = c[0];
|
|
21385
|
+
if (c.length === 0) throw Error("Can not set the root object");
|
|
21386
|
+
for (var u = 0; u < c.length - 1; ++u) {
|
|
21387
|
+
var a = c[u];
|
|
21388
|
+
typeof a != "string" && typeof a != "number" && (a = String(a)), !(a === "__proto__" || a === "constructor" || a === "prototype") && (a === "-" && Array.isArray(e) && (a = e.length), i = c[u + 1], a in e || (i.match(/^(\d+|-)$/) ? e[a] = [] : e[a] = {}), e = e[a]);
|
|
21389
|
+
}
|
|
21390
|
+
return i === "-" && Array.isArray(e) && (i = e.length), e[i] = s, this;
|
|
21391
|
+
}, n.remove = function (o, e) {
|
|
21392
|
+
var r = Array.isArray(e) ? e : n.parse(e),
|
|
21393
|
+
s = r[r.length - 1];
|
|
21394
|
+
if (s === void 0) throw new Error('Invalid JSON pointer for remove: "' + e + '"');
|
|
21395
|
+
var c = n.get(o, r.slice(0, -1));
|
|
21396
|
+
if (Array.isArray(c)) {
|
|
21397
|
+
var i = +s;
|
|
21398
|
+
if (s === "" && isNaN(i)) throw new Error('Invalid array index: "' + s + '"');
|
|
21399
|
+
Array.prototype.splice.call(c, i, 1);
|
|
21400
|
+
} else delete c[s];
|
|
21401
|
+
}, n.dict = function (e, r) {
|
|
21402
|
+
var s = {};
|
|
21403
|
+
return n.walk(e, function (c, i) {
|
|
21404
|
+
s[i] = c;
|
|
21405
|
+
}, r), s;
|
|
21406
|
+
}, n.walk = function (e, r, s) {
|
|
21407
|
+
var c = [];
|
|
21408
|
+
s = s || function (i) {
|
|
21409
|
+
var u = Object.prototype.toString.call(i);
|
|
21410
|
+
return u === "[object Object]" || u === "[object Array]";
|
|
21411
|
+
}, function i(u) {
|
|
21412
|
+
t(u, function (a, l) {
|
|
21413
|
+
c.push(String(l)), s(a) ? i(a) : r(a, n.compile(c)), c.pop();
|
|
21414
|
+
});
|
|
21415
|
+
}(e);
|
|
21416
|
+
}, n.has = function (e, r) {
|
|
21417
|
+
try {
|
|
21418
|
+
n.get(e, r);
|
|
21419
|
+
} catch (s) {
|
|
21420
|
+
return !1;
|
|
21421
|
+
}
|
|
21422
|
+
return !0;
|
|
21423
|
+
}, n.escape = function (e) {
|
|
21424
|
+
return e.toString().replace(/~/g, "~0").replace(/\//g, "~1");
|
|
21425
|
+
}, n.unescape = function (e) {
|
|
21426
|
+
return e.replace(/~1/g, "/").replace(/~0/g, "~");
|
|
21427
|
+
}, n.parse = function (e) {
|
|
21428
|
+
if (e === "") return [];
|
|
21429
|
+
if (e.charAt(0) !== "/") throw new Error("Invalid JSON pointer: " + e);
|
|
21430
|
+
return e.substring(1).split(/\//).map(n.unescape);
|
|
21431
|
+
}, n.compile = function (e) {
|
|
21432
|
+
return e.length === 0 ? "" : "/" + e.map(n.escape).join("/");
|
|
21433
|
+
}, I;
|
|
21434
|
+
}
|
|
21435
|
+
var p = re();
|
|
21436
|
+
const oe = ({
|
|
21437
|
+
pointer: t,
|
|
21438
|
+
mappings: n,
|
|
21437
21439
|
data: o,
|
|
21438
|
-
hiddenStrings:
|
|
21440
|
+
hiddenStrings: e
|
|
21439
21441
|
}) => {
|
|
21440
|
-
const r = t
|
|
21441
|
-
|
|
21442
|
-
|
|
21443
|
-
|
|
21444
|
-
|
|
21445
|
-
|
|
21446
|
-
|
|
21447
|
-
|
|
21442
|
+
const r = n[t];
|
|
21443
|
+
if (r) {
|
|
21444
|
+
delete n[t];
|
|
21445
|
+
const s = C(o, t);
|
|
21446
|
+
for (const c of s) {
|
|
21447
|
+
n[c] = r;
|
|
21448
|
+
const i = p.get(o, c),
|
|
21449
|
+
u = w(i, e);
|
|
21450
|
+
p.set(o, c, u);
|
|
21451
|
+
}
|
|
21452
|
+
} else {
|
|
21453
|
+
const s = C(o, t);
|
|
21454
|
+
for (const c of s) {
|
|
21455
|
+
const i = p.get(o, c),
|
|
21456
|
+
u = w(i, e);
|
|
21457
|
+
p.set(o, c, u);
|
|
21458
|
+
}
|
|
21448
21459
|
}
|
|
21449
21460
|
},
|
|
21450
|
-
|
|
21461
|
+
C = (t, n = "") => {
|
|
21451
21462
|
const o = [],
|
|
21452
|
-
|
|
21453
|
-
if (
|
|
21463
|
+
e = p.get(t, n);
|
|
21464
|
+
if (e.content) for (let r = 0; r < e.content.length; r++) e.content[r].nodeType === "text" ? o.push(`${n}/content/${r}/value`) : o.push(...C(t, `${n}/content/${r}`));
|
|
21454
21465
|
return o;
|
|
21455
21466
|
},
|
|
21456
|
-
|
|
21457
|
-
entityId:
|
|
21458
|
-
entityType:
|
|
21467
|
+
b = ({
|
|
21468
|
+
entityId: t,
|
|
21469
|
+
entityType: n,
|
|
21459
21470
|
space: o,
|
|
21460
|
-
environment:
|
|
21471
|
+
environment: e,
|
|
21461
21472
|
field: r,
|
|
21462
21473
|
locale: s,
|
|
21463
|
-
editorInterface:
|
|
21464
|
-
fieldType:
|
|
21474
|
+
editorInterface: c,
|
|
21475
|
+
fieldType: i,
|
|
21465
21476
|
targetOrigin: u,
|
|
21466
|
-
platform:
|
|
21477
|
+
platform: a
|
|
21467
21478
|
}) => {
|
|
21468
21479
|
const d = {
|
|
21469
21480
|
origin: "contentful.com",
|
|
21470
|
-
href: `${`${u || "https://app.contentful.com"}/spaces/${o}/environments/${
|
|
21481
|
+
href: `${`${u || "https://app.contentful.com"}/spaces/${o}/environments/${e}`}/${n === "Entry" ? "entries" : "assets"}/${t}/?focusedField=${r}&focusedLocale=${s}&source=vercel-content-link`,
|
|
21471
21482
|
contentful: {
|
|
21472
|
-
editorInterface:
|
|
21473
|
-
fieldType:
|
|
21483
|
+
editorInterface: c,
|
|
21484
|
+
fieldType: i
|
|
21474
21485
|
}
|
|
21475
21486
|
};
|
|
21476
|
-
return
|
|
21487
|
+
return a === "vercel" && delete d.contentful, d;
|
|
21477
21488
|
},
|
|
21478
|
-
|
|
21479
|
-
|
|
21480
|
-
function
|
|
21481
|
-
if (typeof structuredClone == "function") return structuredClone(
|
|
21489
|
+
B = t => ["builtin", "sidebar-builtin", "editor-builtin"].includes(t),
|
|
21490
|
+
D = t => se.includes(t);
|
|
21491
|
+
function Q(t) {
|
|
21492
|
+
if (typeof structuredClone == "function") return structuredClone(t);
|
|
21482
21493
|
try {
|
|
21483
|
-
return JSON.parse(JSON.stringify(
|
|
21484
|
-
} catch (
|
|
21485
|
-
return console.warn("Failed to clone data:",
|
|
21494
|
+
return JSON.parse(JSON.stringify(t));
|
|
21495
|
+
} catch (n) {
|
|
21496
|
+
return console.warn("Failed to clone data:", t, n), t;
|
|
21486
21497
|
}
|
|
21487
21498
|
}
|
|
21488
|
-
const
|
|
21489
|
-
function
|
|
21490
|
-
const
|
|
21491
|
-
switch (
|
|
21499
|
+
const se = ["singleLine", "tagEditor", "listInput", "checkbox", "richTextEditor", "multipleLine"];
|
|
21500
|
+
function P(t, n, o, e, r, s, c) {
|
|
21501
|
+
const i = c ? n[c] : n;
|
|
21502
|
+
switch (t) {
|
|
21492
21503
|
case "Symbol":
|
|
21493
21504
|
{
|
|
21494
|
-
const u =
|
|
21495
|
-
|
|
21505
|
+
const u = w(i, o);
|
|
21506
|
+
p.set(e, r, u);
|
|
21496
21507
|
break;
|
|
21497
21508
|
}
|
|
21498
21509
|
case "Text":
|
|
21499
21510
|
{
|
|
21500
|
-
const u =
|
|
21501
|
-
|
|
21511
|
+
const u = w(i, o);
|
|
21512
|
+
p.set(e, r, u);
|
|
21502
21513
|
break;
|
|
21503
21514
|
}
|
|
21504
21515
|
case "RichText":
|
|
21505
21516
|
{
|
|
21506
|
-
|
|
21517
|
+
oe({
|
|
21507
21518
|
pointer: "",
|
|
21508
21519
|
mappings: s,
|
|
21509
|
-
data:
|
|
21520
|
+
data: i,
|
|
21510
21521
|
hiddenStrings: o
|
|
21511
21522
|
});
|
|
21512
21523
|
break;
|
|
21513
21524
|
}
|
|
21514
21525
|
case "Array":
|
|
21515
21526
|
{
|
|
21516
|
-
const u =
|
|
21517
|
-
|
|
21527
|
+
const u = i.map(a => typeof a == "string" ? w(a, o) : a);
|
|
21528
|
+
p.set(e, r, u);
|
|
21518
21529
|
break;
|
|
21519
21530
|
}
|
|
21520
21531
|
}
|
|
21521
21532
|
}
|
|
21522
|
-
const $ = (
|
|
21523
|
-
if (!
|
|
21533
|
+
const $ = (t, n, o, e, r) => {
|
|
21534
|
+
if (!t.fields) return;
|
|
21524
21535
|
const {
|
|
21525
21536
|
contentSourceMaps: s
|
|
21526
|
-
} =
|
|
21537
|
+
} = t.sys;
|
|
21527
21538
|
if (!s) {
|
|
21528
21539
|
console.error("Content source maps data is missing");
|
|
21529
21540
|
return;
|
|
21530
21541
|
}
|
|
21531
21542
|
const {
|
|
21532
|
-
mappings:
|
|
21543
|
+
mappings: c
|
|
21533
21544
|
} = s;
|
|
21534
|
-
for (const
|
|
21545
|
+
for (const i in c) {
|
|
21535
21546
|
const {
|
|
21536
21547
|
source: u
|
|
21537
|
-
} = i
|
|
21538
|
-
|
|
21539
|
-
|
|
21540
|
-
|
|
21541
|
-
v =
|
|
21542
|
-
|
|
21548
|
+
} = c[i],
|
|
21549
|
+
a = t.sys.space.sys.id,
|
|
21550
|
+
l = t.sys.environment.sys.id,
|
|
21551
|
+
m = t.sys.id,
|
|
21552
|
+
v = t.sys.type,
|
|
21553
|
+
y = n[u.fieldType],
|
|
21543
21554
|
d = o[u.editorInterface];
|
|
21544
|
-
if (
|
|
21545
|
-
const
|
|
21546
|
-
if (
|
|
21547
|
-
const
|
|
21548
|
-
if (
|
|
21549
|
-
const
|
|
21550
|
-
if (!
|
|
21551
|
-
console.error("Field name could not be extracted from the pointer",
|
|
21555
|
+
if (B(d.widgetNamespace) && !D(d.widgetId)) continue;
|
|
21556
|
+
const f = i.startsWith("/") ? i : `/${i}`;
|
|
21557
|
+
if (p.has(t, f)) {
|
|
21558
|
+
const h = p.get(t, f);
|
|
21559
|
+
if (h === null) return;
|
|
21560
|
+
const g = f.split("/").pop();
|
|
21561
|
+
if (!g) {
|
|
21562
|
+
console.error("Field name could not be extracted from the pointer", f);
|
|
21552
21563
|
return;
|
|
21553
21564
|
}
|
|
21554
|
-
const A =
|
|
21565
|
+
const A = t.sys.locale;
|
|
21555
21566
|
if (A) {
|
|
21556
|
-
const E =
|
|
21557
|
-
entityId:
|
|
21567
|
+
const E = b({
|
|
21568
|
+
entityId: m,
|
|
21558
21569
|
entityType: v,
|
|
21559
|
-
space:
|
|
21560
|
-
environment:
|
|
21561
|
-
field:
|
|
21570
|
+
space: a,
|
|
21571
|
+
environment: l,
|
|
21572
|
+
field: g,
|
|
21562
21573
|
locale: A,
|
|
21563
21574
|
editorInterface: d,
|
|
21564
|
-
fieldType:
|
|
21565
|
-
targetOrigin:
|
|
21575
|
+
fieldType: y,
|
|
21576
|
+
targetOrigin: e,
|
|
21566
21577
|
platform: r
|
|
21567
21578
|
});
|
|
21568
|
-
|
|
21569
|
-
} else Object.keys(
|
|
21570
|
-
const
|
|
21571
|
-
entityId:
|
|
21579
|
+
P(y, h, E, t, f, c);
|
|
21580
|
+
} else Object.keys(h).forEach(S => {
|
|
21581
|
+
const T = b({
|
|
21582
|
+
entityId: m,
|
|
21572
21583
|
entityType: v,
|
|
21573
|
-
space:
|
|
21574
|
-
environment:
|
|
21575
|
-
field:
|
|
21576
|
-
locale:
|
|
21584
|
+
space: a,
|
|
21585
|
+
environment: l,
|
|
21586
|
+
field: g,
|
|
21587
|
+
locale: S,
|
|
21577
21588
|
editorInterface: d,
|
|
21578
|
-
fieldType:
|
|
21579
|
-
targetOrigin:
|
|
21589
|
+
fieldType: y,
|
|
21590
|
+
targetOrigin: e,
|
|
21580
21591
|
platform: r
|
|
21581
21592
|
});
|
|
21582
|
-
|
|
21593
|
+
P(y, h, T, t, `${f}/${S}`, c, S);
|
|
21583
21594
|
});
|
|
21584
21595
|
}
|
|
21585
21596
|
}
|
|
21586
21597
|
},
|
|
21587
|
-
|
|
21598
|
+
fe = (t, n, o) => {
|
|
21588
21599
|
var r;
|
|
21589
|
-
const
|
|
21590
|
-
if (
|
|
21591
|
-
const s =
|
|
21600
|
+
const e = Q(t);
|
|
21601
|
+
if (e.sys && "items" in e) {
|
|
21602
|
+
const s = e;
|
|
21592
21603
|
if (!((r = s.sys) != null && r.contentSourceMapsLookup)) return console.error("Content source maps lookup data is missing"), s;
|
|
21593
21604
|
const {
|
|
21594
21605
|
contentSourceMapsLookup: {
|
|
21595
|
-
fieldTypes:
|
|
21596
|
-
editorInterfaces:
|
|
21606
|
+
fieldTypes: c,
|
|
21607
|
+
editorInterfaces: i
|
|
21597
21608
|
}
|
|
21598
21609
|
} = s.sys,
|
|
21599
21610
|
{
|
|
21600
21611
|
items: u,
|
|
21601
|
-
includes:
|
|
21612
|
+
includes: a
|
|
21602
21613
|
} = s;
|
|
21603
|
-
u.forEach(
|
|
21614
|
+
u.forEach(l => $(l, c, i, n, o)), a && a.Entry && a.Entry.forEach(l => $(l, c, i, n, o)), a && a.Asset && a.Asset.forEach(l => $(l, c, i, n, o));
|
|
21604
21615
|
} else {
|
|
21605
|
-
const s =
|
|
21616
|
+
const s = e;
|
|
21606
21617
|
if (!s.sys.contentSourceMapsLookup) return console.error("Content source maps lookup data is missing"), s;
|
|
21607
|
-
$(s, s.sys.contentSourceMapsLookup.fieldTypes, s.sys.contentSourceMapsLookup.editorInterfaces,
|
|
21618
|
+
$(s, s.sys.contentSourceMapsLookup.fieldTypes, s.sys.contentSourceMapsLookup.editorInterfaces, n, o);
|
|
21608
21619
|
}
|
|
21609
|
-
return
|
|
21620
|
+
return e;
|
|
21610
21621
|
};
|
|
21611
21622
|
|
|
21612
21623
|
var toStringFunction = Function.prototype.toString;
|
|
@@ -22607,7 +22618,7 @@ function createContentfulApi({
|
|
|
22607
22618
|
var _a;
|
|
22608
22619
|
const includeContentSourceMaps = (_a = config === null || config === void 0 ? void 0 : config.params) === null || _a === void 0 ? void 0 : _a.includeContentSourceMaps;
|
|
22609
22620
|
if (includeContentSourceMaps) {
|
|
22610
|
-
return
|
|
22621
|
+
return fe(data);
|
|
22611
22622
|
}
|
|
22612
22623
|
return data;
|
|
22613
22624
|
}
|
|
@@ -22949,7 +22960,7 @@ function createContentfulApi({
|
|
|
22949
22960
|
http.defaults.baseURL = getGlobalOptions().environmentBaseUrl;
|
|
22950
22961
|
}
|
|
22951
22962
|
return {
|
|
22952
|
-
version: "11.3.
|
|
22963
|
+
version: "11.3.3",
|
|
22953
22964
|
getSpace,
|
|
22954
22965
|
getContentType,
|
|
22955
22966
|
getContentTypes,
|
|
@@ -23072,7 +23083,7 @@ function createClient(params) {
|
|
|
23072
23083
|
environment: 'master'
|
|
23073
23084
|
};
|
|
23074
23085
|
const config = Object.assign(Object.assign({}, defaultConfig), params);
|
|
23075
|
-
const userAgentHeader = getUserAgentHeader(`contentful.js/${"11.3.
|
|
23086
|
+
const userAgentHeader = getUserAgentHeader(`contentful.js/${"11.3.3"}`, config.application, config.integration);
|
|
23076
23087
|
config.headers = Object.assign(Object.assign({}, config.headers), {
|
|
23077
23088
|
'Content-Type': 'application/vnd.contentful.delivery.v1+json',
|
|
23078
23089
|
'X-Contentful-User-Agent': userAgentHeader
|
package/dist/esm/contentful.js
CHANGED
|
@@ -37,7 +37,7 @@ function createClient(params) {
|
|
|
37
37
|
environment: 'master',
|
|
38
38
|
};
|
|
39
39
|
const config = Object.assign(Object.assign({}, defaultConfig), params);
|
|
40
|
-
const userAgentHeader = getUserAgentHeader(`contentful.js/${"11.3.
|
|
40
|
+
const userAgentHeader = getUserAgentHeader(`contentful.js/${"11.3.3"}`, config.application, config.integration);
|
|
41
41
|
config.headers = Object.assign(Object.assign({}, config.headers), { 'Content-Type': 'application/vnd.contentful.delivery.v1+json', 'X-Contentful-User-Agent': userAgentHeader });
|
|
42
42
|
const http = createHttpClient(axios, config);
|
|
43
43
|
if (!http.defaults.baseURL) {
|
|
@@ -368,7 +368,7 @@ function createContentfulApi({ http, getGlobalOptions }, options) {
|
|
|
368
368
|
http.defaults.baseURL = getGlobalOptions().environmentBaseUrl;
|
|
369
369
|
}
|
|
370
370
|
return {
|
|
371
|
-
version: "11.3.
|
|
371
|
+
version: "11.3.3",
|
|
372
372
|
getSpace,
|
|
373
373
|
getContentType,
|
|
374
374
|
getContentTypes,
|