@singi-labs/sifa-sdk 0.19.50 → 0.19.52
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 +1 -1
- package/dist/index.js +1 -1
- package/dist/jsonld/index.cjs +28 -13
- package/dist/jsonld/index.cjs.map +1 -1
- package/dist/jsonld/works-graph.js +29 -14
- package/dist/jsonld/works-graph.js.map +1 -1
- package/dist/{network-map-B0bp4-ex.d.cts → network-map-C-p-k3gB.d.cts} +1 -0
- package/dist/{network-map-C-y5XxLI.d.ts → network-map-CnVlBE0G.d.ts} +1 -0
- package/dist/query/fetchers/index.cjs +2 -0
- package/dist/query/fetchers/index.cjs.map +1 -1
- package/dist/query/fetchers/index.d.cts +1 -1
- package/dist/query/fetchers/index.d.ts +1 -1
- package/dist/query/fetchers/rpg.js +2 -0
- package/dist/query/fetchers/rpg.js.map +1 -1
- package/dist/query/index.cjs +2 -0
- package/dist/query/index.cjs.map +1 -1
- package/dist/query/index.d.cts +2 -2
- package/dist/query/index.d.ts +2 -2
- package/dist/rpg/catalog.js +1 -1
- package/dist/rpg/catalog.js.map +1 -1
- package/dist/rpg/index.cjs +1 -1
- package/dist/rpg/index.cjs.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -7128,7 +7128,7 @@ function describeSifaRecord(collection, value) {
|
|
|
7128
7128
|
}
|
|
7129
7129
|
|
|
7130
7130
|
// src/index.ts
|
|
7131
|
-
var SIFA_SDK_VERSION = "0.19.
|
|
7131
|
+
var SIFA_SDK_VERSION = "0.19.52";
|
|
7132
7132
|
|
|
7133
7133
|
exports.ACTIVITY_TIERS = ACTIVITY_TIERS;
|
|
7134
7134
|
exports.ACTIVITY_VERBS = ACTIVITY_VERBS;
|
package/dist/index.js
CHANGED
|
@@ -347,7 +347,7 @@ import {
|
|
|
347
347
|
roadmapIssueUrl
|
|
348
348
|
} from "./roadmap/index.js";
|
|
349
349
|
import { SIFA_REPO_GROUPS, describeSifaRecord, repoGroupForCollection } from "./repo/index.js";
|
|
350
|
-
var SIFA_SDK_VERSION = "0.19.
|
|
350
|
+
var SIFA_SDK_VERSION = "0.19.52";
|
|
351
351
|
export {
|
|
352
352
|
ACTIVITY_TIERS,
|
|
353
353
|
ACTIVITY_VERBS,
|
package/dist/jsonld/index.cjs
CHANGED
|
@@ -966,21 +966,36 @@ function buildProfileWorksJsonLd(profile, author, options = {}) {
|
|
|
966
966
|
const { "@context": _context, ...rest } = node;
|
|
967
967
|
return rest;
|
|
968
968
|
};
|
|
969
|
-
const
|
|
969
|
+
const ownerUrl = profileUrl(normaliseBaseUrl(options.baseUrl), author.handle);
|
|
970
|
+
const refOwner = (nodes) => {
|
|
971
|
+
let seenOwner = false;
|
|
972
|
+
const out = [];
|
|
973
|
+
for (const node of nodes) {
|
|
974
|
+
const isOwner = typeof node === "object" && node !== null && node["@type"] === "Person" && node.url === ownerUrl;
|
|
975
|
+
if (isOwner) {
|
|
976
|
+
if (seenOwner) continue;
|
|
977
|
+
seenOwner = true;
|
|
978
|
+
out.push({ "@id": personId });
|
|
979
|
+
} else {
|
|
980
|
+
out.push(node);
|
|
981
|
+
}
|
|
982
|
+
}
|
|
983
|
+
return out;
|
|
984
|
+
};
|
|
970
985
|
const graph = [
|
|
971
|
-
...visible3(profile.publications).map((p) =>
|
|
972
|
-
|
|
973
|
-
author:
|
|
974
|
-
})
|
|
975
|
-
...visible3(profile.presentations).map((p) =>
|
|
976
|
-
|
|
977
|
-
author:
|
|
978
|
-
})
|
|
986
|
+
...visible3(profile.publications).map((p) => {
|
|
987
|
+
const node = strip(buildPublicationJsonLd(p, author, options));
|
|
988
|
+
return { ...node, author: refOwner(node.author) };
|
|
989
|
+
}),
|
|
990
|
+
...visible3(profile.presentations).map((p) => {
|
|
991
|
+
const node = strip(buildPresentationJsonLd(p, author, options));
|
|
992
|
+
return { ...node, author: refOwner([node.author]) };
|
|
993
|
+
}),
|
|
979
994
|
...visible3(profile.courses).map((c) => strip(buildCourseJsonLd(c, options))),
|
|
980
|
-
...visible3(profile.projects).map((p) =>
|
|
981
|
-
|
|
982
|
-
member:
|
|
983
|
-
})
|
|
995
|
+
...visible3(profile.projects).map((p) => {
|
|
996
|
+
const node = strip(buildProjectJsonLd(p, author, options));
|
|
997
|
+
return { ...node, member: refOwner(node.member) };
|
|
998
|
+
})
|
|
984
999
|
];
|
|
985
1000
|
if (graph.length === 0) return null;
|
|
986
1001
|
return { "@context": "https://schema.org", "@graph": graph };
|