cocoda-sdk 3.0.2 → 3.0.3
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
|
@@ -610,7 +610,7 @@ var BaseProvider = class {
|
|
|
610
610
|
}
|
|
611
611
|
const previousRegistry = scheme._registry;
|
|
612
612
|
scheme._registry = this.cdk && this.cdk.registryForScheme(scheme);
|
|
613
|
-
if (!scheme._registry || previousRegistry === scheme._registry) {
|
|
613
|
+
if (!scheme._registry || previousRegistry === scheme._registry || scheme._registry._api.api === this._api.api) {
|
|
614
614
|
scheme._registry = previousRegistry || this;
|
|
615
615
|
} else {
|
|
616
616
|
["concepts", "topConcepts"].forEach((key) => {
|
|
@@ -2692,7 +2692,7 @@ var CocodaSDK = class {
|
|
|
2692
2692
|
if (registry.has.schemes !== false) {
|
|
2693
2693
|
let promise = registry.getSchemes(config).then((results) => {
|
|
2694
2694
|
for (let scheme of results) {
|
|
2695
|
-
|
|
2695
|
+
scheme._registry = registry;
|
|
2696
2696
|
scheme.__DETAILSLOADED__ = 1;
|
|
2697
2697
|
scheme.type = scheme.type || ["http://www.w3.org/2004/02/skos/core#ConceptScheme"];
|
|
2698
2698
|
let otherScheme = schemes.find((s) => import_jskos_tools10.default.compare(s, scheme)), prio, otherPrio, override = false;
|
|
@@ -2723,7 +2723,7 @@ var CocodaSDK = class {
|
|
|
2723
2723
|
}
|
|
2724
2724
|
scheme = import_jskos_tools10.default.merge(scheme, import_omit.default(otherScheme, ["concepts", "topConcepts"]), { mergeUris: true, skipPaths: ["_registry"] });
|
|
2725
2725
|
}
|
|
2726
|
-
scheme._registry =
|
|
2726
|
+
scheme._registry = registry;
|
|
2727
2727
|
schemes.push(scheme);
|
|
2728
2728
|
} else {
|
|
2729
2729
|
const index = schemes.findIndex((s) => import_jskos_tools10.default.compare(s, scheme));
|
|
@@ -2741,6 +2741,16 @@ var CocodaSDK = class {
|
|
|
2741
2741
|
}
|
|
2742
2742
|
}
|
|
2743
2743
|
await Promise.all(promises);
|
|
2744
|
+
schemes.forEach((scheme) => {
|
|
2745
|
+
const previousRegistry = scheme._registry;
|
|
2746
|
+
delete scheme._registry;
|
|
2747
|
+
const newRegistry = this.registryForScheme(scheme);
|
|
2748
|
+
if (!newRegistry || newRegistry._api.api === previousRegistry._api.api) {
|
|
2749
|
+
scheme._registry = previousRegistry;
|
|
2750
|
+
} else {
|
|
2751
|
+
scheme._registry = newRegistry;
|
|
2752
|
+
}
|
|
2753
|
+
});
|
|
2744
2754
|
return import_jskos_tools10.default.sortSchemes(schemes.filter(Boolean));
|
|
2745
2755
|
}
|
|
2746
2756
|
registryForScheme(scheme) {
|