cocoda-sdk 3.4.2 → 3.4.4
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/cjs/index.cjs
CHANGED
|
@@ -651,14 +651,14 @@ var BaseProvider = class {
|
|
|
651
651
|
if (options.auth && this._auth.key != import_get.default(this._config, "auth.key")) {
|
|
652
652
|
return false;
|
|
653
653
|
}
|
|
654
|
-
const userUris = [user
|
|
654
|
+
const userUris = [user?.uri].concat(Object.values(user?.identities || {}).map((id) => id.uri)).filter(Boolean);
|
|
655
655
|
if (options.auth && options.identities) {
|
|
656
656
|
if (import_intersection.default(userUris, options.identities).length == 0) {
|
|
657
657
|
return false;
|
|
658
658
|
}
|
|
659
659
|
}
|
|
660
660
|
if (options.auth && options.identityProviders) {
|
|
661
|
-
const providers2 = Object.keys(user
|
|
661
|
+
const providers2 = Object.keys(user?.identities || {});
|
|
662
662
|
if (import_intersection.default(providers2, options.identityProviders).length == 0) {
|
|
663
663
|
return false;
|
|
664
664
|
}
|
|
@@ -3651,7 +3651,9 @@ function toJSKOS(data3) {
|
|
|
3651
3651
|
concept.broader = concept.broader.concat(data3[prop] || []);
|
|
3652
3652
|
});
|
|
3653
3653
|
concept.broader = concept.broader.map((broader) => ({ uri: broader.id }));
|
|
3654
|
-
|
|
3654
|
+
if (concept.uri) {
|
|
3655
|
+
concept.identifier = [concept.uri.replace("https://", "http://")];
|
|
3656
|
+
}
|
|
3655
3657
|
if (data3.sameAs && data3.sameAs.length) {
|
|
3656
3658
|
concept.mappings = data3.sameAs.map((target) => ({
|
|
3657
3659
|
from: { memberSet: [{ uri: concept.uri }] },
|