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.
|
@@ -311,14 +311,14 @@ class BaseProvider {
|
|
|
311
311
|
if (options.auth && this._auth.key != _.get(this._config, "auth.key")) {
|
|
312
312
|
return false;
|
|
313
313
|
}
|
|
314
|
-
const userUris = [user
|
|
314
|
+
const userUris = [user?.uri].concat(Object.values(user?.identities || {}).map((id) => id.uri)).filter(Boolean);
|
|
315
315
|
if (options.auth && options.identities) {
|
|
316
316
|
if (_.intersection(userUris, options.identities).length == 0) {
|
|
317
317
|
return false;
|
|
318
318
|
}
|
|
319
319
|
}
|
|
320
320
|
if (options.auth && options.identityProviders) {
|
|
321
|
-
const providers = Object.keys(user
|
|
321
|
+
const providers = Object.keys(user?.identities || {});
|
|
322
322
|
if (_.intersection(providers, options.identityProviders).length == 0) {
|
|
323
323
|
return false;
|
|
324
324
|
}
|
|
@@ -109,7 +109,9 @@ function toJSKOS(data) {
|
|
|
109
109
|
concept.broader = concept.broader.concat(data[prop] || []);
|
|
110
110
|
});
|
|
111
111
|
concept.broader = concept.broader.map((broader) => ({ uri: broader.id }));
|
|
112
|
-
|
|
112
|
+
if (concept.uri) {
|
|
113
|
+
concept.identifier = [concept.uri.replace("https://", "http://")];
|
|
114
|
+
}
|
|
113
115
|
if (data.sameAs && data.sameAs.length) {
|
|
114
116
|
concept.mappings = data.sameAs.map((target) => ({
|
|
115
117
|
from: { memberSet: [{ uri: concept.uri }] },
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cocoda-sdk",
|
|
3
|
-
"version": "3.4.
|
|
3
|
+
"version": "3.4.4",
|
|
4
4
|
"description": "SDK for Cocoda",
|
|
5
5
|
"main": "dist/cjs/index.cjs",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -52,24 +52,24 @@
|
|
|
52
52
|
},
|
|
53
53
|
"homepage": "https://github.com/gbv/cocoda-sdk#readme",
|
|
54
54
|
"devDependencies": {
|
|
55
|
-
"axios-mock-adapter": "^1.21.
|
|
56
|
-
"clean-jsdoc-theme": "^4.2.
|
|
57
|
-
"esbuild": "~0.17.
|
|
55
|
+
"axios-mock-adapter": "^1.21.4",
|
|
56
|
+
"clean-jsdoc-theme": "^4.2.7",
|
|
57
|
+
"esbuild": "~0.17.18",
|
|
58
58
|
"esbuild-plugin-ifdef": "^1.0.1",
|
|
59
|
-
"eslint": "^8.
|
|
60
|
-
"eslint-config-gbv": "^1.0.
|
|
59
|
+
"eslint": "^8.40.0",
|
|
60
|
+
"eslint-config-gbv": "^1.0.5",
|
|
61
61
|
"glob": "^8.1.0",
|
|
62
|
-
"jsdoc": "^4.0.
|
|
62
|
+
"jsdoc": "^4.0.2",
|
|
63
63
|
"license-checker": "^25.0.1",
|
|
64
|
-
"lint-staged": "^13.
|
|
64
|
+
"lint-staged": "^13.2.2",
|
|
65
65
|
"mocha": "^10.2.0",
|
|
66
66
|
"mocha-eslint": "^7.0.0",
|
|
67
67
|
"pre-commit": "^1.2.2"
|
|
68
68
|
},
|
|
69
69
|
"dependencies": {
|
|
70
|
-
"axios": "^1.3
|
|
70
|
+
"axios": "^1.3",
|
|
71
71
|
"flexsearch": "~0.6.32",
|
|
72
|
-
"jskos-tools": "^1.0.
|
|
72
|
+
"jskos-tools": "^1.0.31",
|
|
73
73
|
"localforage": "^1.10.0",
|
|
74
74
|
"lodash": "^4.17.21",
|
|
75
75
|
"uuid": "^9.0.0"
|