@digitalculture/ochre-sdk 0.5.1 → 0.5.2

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/index.cjs CHANGED
@@ -1176,7 +1176,7 @@ function parseResource(resource, isNested = false) {
1176
1176
  Array.isArray(resource.notes.note) ? resource.notes.note : [resource.notes.note]
1177
1177
  ) : []
1178
1178
  ),
1179
- description: resource.description ? parseStringContent(resource.description) : "",
1179
+ description: resource.description ? ["string", "number", "boolean"].includes(typeof resource.description) ? parseFakeString(resource.description) : parseStringContent(resource.description) : "",
1180
1180
  document: resource.document ? parseDocument(resource.document.content) : null,
1181
1181
  href: resource.href ?? null,
1182
1182
  imageMap: resource.imagemap ? parseImageMap(resource.imagemap) : null,
package/dist/index.d.cts CHANGED
@@ -893,7 +893,7 @@ type OchreResource = {
893
893
  copyright?: FakeString;
894
894
  identification: OchreIdentification;
895
895
  href?: string;
896
- description?: OchreStringContent;
896
+ description?: OchreStringContent | FakeString;
897
897
  date?: string; // YYYY-MM-DD
898
898
  image?: OchreImage;
899
899
  creators?: { creator: OchrePerson | Array<OchrePerson> };
package/dist/index.d.ts CHANGED
@@ -893,7 +893,7 @@ type OchreResource = {
893
893
  copyright?: FakeString;
894
894
  identification: OchreIdentification;
895
895
  href?: string;
896
- description?: OchreStringContent;
896
+ description?: OchreStringContent | FakeString;
897
897
  date?: string; // YYYY-MM-DD
898
898
  image?: OchreImage;
899
899
  creators?: { creator: OchrePerson | Array<OchrePerson> };
package/dist/index.js CHANGED
@@ -1099,7 +1099,7 @@ function parseResource(resource, isNested = false) {
1099
1099
  Array.isArray(resource.notes.note) ? resource.notes.note : [resource.notes.note]
1100
1100
  ) : []
1101
1101
  ),
1102
- description: resource.description ? parseStringContent(resource.description) : "",
1102
+ description: resource.description ? ["string", "number", "boolean"].includes(typeof resource.description) ? parseFakeString(resource.description) : parseStringContent(resource.description) : "",
1103
1103
  document: resource.document ? parseDocument(resource.document.content) : null,
1104
1104
  href: resource.href ?? null,
1105
1105
  imageMap: resource.imagemap ? parseImageMap(resource.imagemap) : null,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@digitalculture/ochre-sdk",
3
- "version": "0.5.1",
3
+ "version": "0.5.2",
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",