@prismicio/api-renderer
Advanced tools
Comparing version 3.2.4-alpha.4 to 3.2.4-alpha.5
@@ -8,3 +8,3 @@ import type { ApiDocument } from "./ApiDocument"; | ||
DocEncoder: { | ||
encodeDocId(documentId: string, additionalData?: (string | undefined)[]): string; | ||
encodeDocId(documentId: string, fetchUuidOrRelationName: string | undefined, additionalData: (string | undefined)[]): string; | ||
}; | ||
@@ -11,0 +11,0 @@ encoders: { |
@@ -23,3 +23,3 @@ "use strict"; | ||
try { | ||
const id = ctx.Extension.DocEncoder.encodeDocId(link.id, [fetch === null || fetch === void 0 ? void 0 : fetch.uuid, link.text]); | ||
const id = ctx.Extension.DocEncoder.encodeDocId(link.id, fetch === null || fetch === void 0 ? void 0 : fetch.uuid, [link.text]); | ||
return { | ||
@@ -38,3 +38,3 @@ type: "Link.document", | ||
const linkText = def.text && link.text; | ||
const id = ctx.Extension.DocEncoder.encodeDocId(link.id, [fetch === null || fetch === void 0 ? void 0 : fetch.uuid, linkText]); | ||
const id = ctx.Extension.DocEncoder.encodeDocId(link.id, fetch === null || fetch === void 0 ? void 0 : fetch.uuid, [linkText]); | ||
return ctx.Extension.encoders.documentLinks.encode(id); | ||
@@ -41,0 +41,0 @@ } |
{ | ||
"name": "@prismicio/api-renderer", | ||
"version": "3.2.4-alpha.4", | ||
"version": "3.2.4-alpha.5", | ||
"description": "Prismic renderers for the content API", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -9,3 +9,3 @@ import type { ApiDocument } from "./ApiDocument" | ||
DocEncoder: { | ||
encodeDocId(documentId: string, additionalData?: (string | undefined)[]): string | ||
encodeDocId(documentId: string, fetchUuidOrRelationName: string | undefined, additionalData: (string | undefined)[]): string | ||
} | ||
@@ -12,0 +12,0 @@ encoders: { |
@@ -31,3 +31,3 @@ import type { DocumentLinkContent } from "@prismicio/types-internal/lib/content" | ||
try { | ||
const id = ctx.Extension.DocEncoder.encodeDocId(link.id, [fetch?.uuid, link.text]) | ||
const id = ctx.Extension.DocEncoder.encodeDocId(link.id, fetch?.uuid, [link.text]) | ||
return { | ||
@@ -46,3 +46,3 @@ type: "Link.document", | ||
const linkText = def.text && link.text | ||
const id = ctx.Extension.DocEncoder.encodeDocId(link.id, [fetch?.uuid, linkText]) | ||
const id = ctx.Extension.DocEncoder.encodeDocId(link.id, fetch?.uuid, [linkText]) | ||
return ctx.Extension.encoders.documentLinks.encode(id) | ||
@@ -49,0 +49,0 @@ } catch (e) { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1089190