ochre-sdk 1.0.63 → 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: { icon: {
32
- faviconUuid: reader.uuid("favicon-ico"),
33
- appleTouchIconUuid: reader.uuid("favicon-img")
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 $icon-properties := $tree/properties/property[label/string() = "presentation"][value/string() = "website"]/property[label/string() = ("favicon-ico", "favicon-img")]
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($icon-properties)) then () else element properties { $icon-properties },
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"],
@@ -125,7 +125,7 @@ type Website<T extends LanguageCodes = LanguageCodes> = {
125
125
  type: WebsiteType;
126
126
  status: "development" | "preview" | "production";
127
127
  versionLabel: "experimental" | "alpha" | "beta" | "test" | "staging" | "pre-release" | "release";
128
- privacy: "public" | "password" | "password-ochre";
128
+ privacy: "public" | "password" | "credentials-ochre";
129
129
  contact: {
130
130
  name: string;
131
131
  email: string | null;
@@ -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;
@@ -536,7 +537,7 @@ type ProtectedWebsite<T extends LanguageCodes = LanguageCodes> = {
536
537
  uuid: string;
537
538
  identification: Identification<T>;
538
539
  properties: {
539
- privacy: "password" | "password-ochre";
540
+ privacy: "password" | "credentials-ochre";
540
541
  };
541
542
  };
542
543
  //#endregion
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ochre-sdk",
3
- "version": "1.0.63",
3
+ "version": "1.0.65",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "description": "Node.js library for working with OCHRE (Online Cultural and Historical Research Environment) data",
@@ -47,17 +47,17 @@
47
47
  "dependencies": {
48
48
  "date-fns": "^4.4.0",
49
49
  "fast-equals": "^6.0.2",
50
- "fast-xml-parser": "^5.10.0",
50
+ "fast-xml-parser": "^5.10.1",
51
51
  "valibot": "^1.4.2"
52
52
  },
53
53
  "devDependencies": {
54
54
  "@antfu/eslint-config": "^9.1.0",
55
55
  "@types/node": "^24.13.3",
56
- "bumpp": "^11.1.0",
56
+ "bumpp": "^12.0.0",
57
57
  "eslint": "^10.7.0",
58
- "knip": "^6.26.0",
58
+ "knip": "^6.27.0",
59
59
  "oxfmt": "^0.59.0",
60
- "tsdown": "^0.22.7",
60
+ "tsdown": "^0.22.12",
61
61
  "typescript": "^6.0.3",
62
62
  "vitest": "^4.1.10"
63
63
  },