@contentful/content-source-maps
Advanced tools
Comparing version 0.11.7 to 0.11.8
@@ -24,3 +24,3 @@ var W = { 0: 8203, 1: 8204, 2: 8205, 3: 8290, 4: 8291, 5: 8288, 6: 65279, 7: 8289, 8: 119155, 9: 119156, a: 119157, b: 119158, c: 119159, d: 119160, e: 119161, f: 119162 }, L = { 0: 8203, 1: 8204, 2: 8205, 3: 65279 }, j = new Array(4).fill(String.fromCodePoint(L[0])).join(""), V = "\0"; | ||
} | ||
var H = Object.fromEntries(Object.entries(L).map((t) => t.reverse())), k = Object.fromEntries(Object.entries(W).map((t) => t.reverse())), K = `${Object.values(W).map((t) => `\\u{${t.toString(16)}}`).join("")}`, O = new RegExp(`[${K}]{4,}`, "gu"); | ||
var H = Object.fromEntries(Object.entries(L).map((t) => t.reverse())), F = Object.fromEntries(Object.entries(W).map((t) => t.reverse())), K = `${Object.values(W).map((t) => `\\u{${t.toString(16)}}`).join("")}`, O = new RegExp(`[${K}]{4,}`, "gu"); | ||
function X(t) { | ||
@@ -51,3 +51,3 @@ let n = t.match(O); | ||
for (let i = t.length * 0.5; i--; ) { | ||
let u = `${k[t[i * 2].codePointAt(0)]}${k[t[i * 2 + 1].codePointAt(0)]}`; | ||
let u = `${F[t[i * 2].codePointAt(0)]}${F[t[i * 2 + 1].codePointAt(0)]}`; | ||
e.unshift(String.fromCharCode(parseInt(u, 16))); | ||
@@ -85,6 +85,6 @@ } | ||
} | ||
var x, F; | ||
var x, k; | ||
function ne() { | ||
if (F) return x; | ||
F = 1; | ||
if (k) return x; | ||
k = 1; | ||
var t = Object.prototype.hasOwnProperty, n = Object.prototype.toString; | ||
@@ -194,3 +194,3 @@ return x = function(e, r, s) { | ||
delete n[t]; | ||
const s = C(o, t); | ||
const s = b(o, t); | ||
for (const c of s) { | ||
@@ -202,3 +202,3 @@ n[c] = r; | ||
} else { | ||
const s = C(o, t); | ||
const s = b(o, t); | ||
for (const c of s) { | ||
@@ -209,9 +209,9 @@ const i = p.get(o, c), u = w(i, e); | ||
} | ||
}, C = (t, n = "") => { | ||
}, b = (t, n = "") => { | ||
const o = [], e = p.get(t, n); | ||
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}`)); | ||
e.content[r].nodeType === "text" ? o.push(`${n}/content/${r}/value`) : o.push(...b(t, `${n}/content/${r}`)); | ||
return o; | ||
}, b = ({ | ||
}, C = ({ | ||
entityId: t, | ||
@@ -309,3 +309,3 @@ entityType: n, | ||
if (R !== null) { | ||
const z = b({ | ||
const z = C({ | ||
entityId: E, | ||
@@ -331,6 +331,4 @@ entityType: M, | ||
const { contentSourceMaps: s } = t.sys; | ||
if (!s) { | ||
console.error("Content source maps data is missing"); | ||
if (!s) | ||
return; | ||
} | ||
const { mappings: c } = s; | ||
@@ -353,3 +351,3 @@ for (const i in c) { | ||
if (A) { | ||
const E = b({ | ||
const E = C({ | ||
entityId: m, | ||
@@ -369,3 +367,3 @@ entityType: v, | ||
Object.keys(h).forEach((S) => { | ||
const T = b({ | ||
const T = C({ | ||
entityId: m, | ||
@@ -402,3 +400,3 @@ entityType: v, | ||
if (!((r = s.sys) != null && r.contentSourceMapsLookup)) | ||
return console.error("Content source maps lookup data is missing"), s; | ||
return s; | ||
const { | ||
@@ -432,3 +430,3 @@ contentSourceMapsLookup: { fieldTypes: c, editorInterfaces: i } | ||
w as combine, | ||
b as createSourceMapMetadata, | ||
C as createSourceMapMetadata, | ||
ie as decode, | ||
@@ -435,0 +433,0 @@ ce as encode, |
{ | ||
"name": "@contentful/content-source-maps", | ||
"author": "Contentful GmbH", | ||
"version": "0.11.7", | ||
"version": "0.11.8", | ||
"description": "Base SDK for building Content Source Maps with Contentful", | ||
@@ -49,3 +49,3 @@ "license": "MIT", | ||
}, | ||
"gitHead": "4fc7a93deabec197570c952f8638afe4a0c19846" | ||
"gitHead": "6da738958e25a56d9f9ad7c8ae3a31970a4e26b9" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
109633
616