ochre-sdk 1.0.64 → 1.0.65
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.
|
@@ -28,10 +28,13 @@ function parseWebsiteMetadata(data, options) {
|
|
|
28
28
|
identification,
|
|
29
29
|
description: websiteName === "" ? metadataDescription : metadataDescription !== "" && metadataDescription !== websiteName ? `${websiteName} - ${metadataDescription}` : websiteName,
|
|
30
30
|
webpageTitle,
|
|
31
|
-
properties: {
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
31
|
+
properties: {
|
|
32
|
+
privacy: reader.valueOr("privacy", "public"),
|
|
33
|
+
icon: {
|
|
34
|
+
faviconUuid: reader.uuid("favicon-ico"),
|
|
35
|
+
appleTouchIconUuid: reader.uuid("favicon-img")
|
|
36
|
+
}
|
|
37
|
+
}
|
|
35
38
|
};
|
|
36
39
|
}
|
|
37
40
|
function buildXQuery(parameters) {
|
|
@@ -102,12 +105,12 @@ declare function local:matching-pages($resources, $target-slug, $slug-prefix) {
|
|
|
102
105
|
|
|
103
106
|
declare function local:metadata-tree($tree, $target-slug, $slug-prefix) {
|
|
104
107
|
let $resources := local:resource-items($tree/items/resource)
|
|
105
|
-
let $
|
|
108
|
+
let $presentation-properties := $tree/properties/property[label/string() = "presentation"][value/string() = "website"]/property[label/string() = ("favicon-ico", "favicon-img", "privacy")]
|
|
106
109
|
return
|
|
107
110
|
element tree {
|
|
108
111
|
attribute uuid { string($tree/@uuid) },
|
|
109
112
|
$tree/identification,
|
|
110
|
-
if (empty($
|
|
113
|
+
if (empty($presentation-properties)) then () else element properties { $presentation-properties },
|
|
111
114
|
element items {
|
|
112
115
|
local:matching-pages(
|
|
113
116
|
$resources[local:presentation(.) = "page"],
|
package/dist/types/website.d.mts
CHANGED
|
@@ -526,6 +526,7 @@ type WebsiteMetadata<T extends LanguageCodes = LanguageCodes> = {
|
|
|
526
526
|
description: string;
|
|
527
527
|
webpageTitle: MultilingualString<T> | null;
|
|
528
528
|
properties: {
|
|
529
|
+
privacy: "public" | "password" | "credentials-ochre";
|
|
529
530
|
icon: {
|
|
530
531
|
faviconUuid: string | null;
|
|
531
532
|
appleTouchIconUuid: string | null;
|