cocoda-sdk 3.6.5 → 3.7.0
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 +0 -18
- package/dist/cocoda-sdk.js +13 -10
- package/dist/cocoda-sdk.js.LICENSES.txt +729 -5
- package/dist/cocoda-sdk.js.map +4 -4
- package/dist/esm/providers/base-provider.js +0 -15
- package/dist/esm/providers/mappings-api-provider.js +0 -2
- package/dist/esm/providers/occurrences-api-provider.js +0 -1
- package/package.json +4 -4
|
@@ -393,9 +393,6 @@ class BaseProvider {
|
|
|
393
393
|
concept._getAncestors = (config) => {
|
|
394
394
|
return this.getAncestors({ ...config, concept });
|
|
395
395
|
};
|
|
396
|
-
concept._getDetails = async (config) => {
|
|
397
|
-
return (await this.getConcepts({ ...config, concepts: [concept] }))[0];
|
|
398
|
-
};
|
|
399
396
|
for (let type of ["broader", "narrower", "ancestors"]) {
|
|
400
397
|
if (Array.isArray(concept[type]) && concept[type].length && !concept[type].includes(null)) {
|
|
401
398
|
concept[type] = this.adjustConcepts(concept[type]);
|
|
@@ -429,12 +426,6 @@ class BaseProvider {
|
|
|
429
426
|
scheme._getTop = (config) => {
|
|
430
427
|
return scheme._registry.getTop({ ...config, scheme });
|
|
431
428
|
};
|
|
432
|
-
scheme._getTypes = (config) => {
|
|
433
|
-
return scheme._registry.getTypes({ ...config, scheme });
|
|
434
|
-
};
|
|
435
|
-
scheme._suggest = ({ search, ...config }) => {
|
|
436
|
-
return scheme._registry.suggest({ ...config, search, scheme });
|
|
437
|
-
};
|
|
438
429
|
}
|
|
439
430
|
return scheme;
|
|
440
431
|
}
|
|
@@ -455,12 +446,6 @@ class BaseProvider {
|
|
|
455
446
|
}
|
|
456
447
|
}
|
|
457
448
|
mapping._registry = this;
|
|
458
|
-
if (!mapping.identifier) {
|
|
459
|
-
let identifier = jskos.addMappingIdentifiers(mapping)?.identifier;
|
|
460
|
-
if (identifier) {
|
|
461
|
-
mapping.identifier = identifier;
|
|
462
|
-
}
|
|
463
|
-
}
|
|
464
449
|
return mapping;
|
|
465
450
|
}
|
|
466
451
|
adjustMappings(mappings) {
|
|
@@ -174,7 +174,6 @@ class MappingsApiProvider extends BaseProvider {
|
|
|
174
174
|
throw new errors.InvalidOrMissingParameterError({ parameter: "mapping" });
|
|
175
175
|
}
|
|
176
176
|
mapping = jskos.minifyMapping(mapping);
|
|
177
|
-
mapping = jskos.addMappingIdentifiers(mapping);
|
|
178
177
|
return this.axios({
|
|
179
178
|
...config,
|
|
180
179
|
method: "post",
|
|
@@ -198,7 +197,6 @@ class MappingsApiProvider extends BaseProvider {
|
|
|
198
197
|
throw new errors.InvalidOrMissingParameterError({ parameter: "mapping" });
|
|
199
198
|
}
|
|
200
199
|
mapping = jskos.minifyMapping(mapping);
|
|
201
|
-
mapping = jskos.addMappingIdentifiers(mapping);
|
|
202
200
|
const uri = mapping.uri;
|
|
203
201
|
if (!uri || !uri.startsWith(this._api.mappings)) {
|
|
204
202
|
throw new errors.InvalidOrMissingParameterError({ parameter: "mapping", message: "URI doesn't seem to be part of this registry." });
|
|
@@ -89,7 +89,6 @@ class OccurrencesApiProvider extends BaseProvider {
|
|
|
89
89
|
}
|
|
90
90
|
mapping.type = [jskos.defaultMappingType.uri];
|
|
91
91
|
mapping._occurrence = occurrence;
|
|
92
|
-
mapping = jskos.addMappingIdentifiers(mapping);
|
|
93
92
|
mappings.push(mapping);
|
|
94
93
|
}
|
|
95
94
|
mappings._url = occurrences._url;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cocoda-sdk",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.7.0",
|
|
4
4
|
"description": "SDK for Cocoda",
|
|
5
5
|
"main": "dist/cjs/index.cjs",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
"homepage": "https://github.com/gbv/cocoda-sdk#readme",
|
|
53
53
|
"devDependencies": {
|
|
54
54
|
"axios-mock-adapter": "^2.1.0",
|
|
55
|
-
"c8": "^
|
|
55
|
+
"c8": "^11.0.0",
|
|
56
56
|
"clean-jsdoc-theme": "^4.3.0",
|
|
57
57
|
"esbuild": "~0.27.0",
|
|
58
58
|
"esbuild-plugin-ifdef": "^1.0.1",
|
|
@@ -68,10 +68,10 @@
|
|
|
68
68
|
"yesno": "^0.4.0"
|
|
69
69
|
},
|
|
70
70
|
"dependencies": {
|
|
71
|
-
"axios": "^1.
|
|
71
|
+
"axios": "^1.18.0",
|
|
72
72
|
"flexsearch": "~0.8.0",
|
|
73
73
|
"jskos-tools": "^1.0.43",
|
|
74
74
|
"localforage": "^1.10.0",
|
|
75
|
-
"uuid": "^
|
|
75
|
+
"uuid": "^14.0.0"
|
|
76
76
|
}
|
|
77
77
|
}
|