@jbrowse/plugin-rdf 2.6.2 → 2.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.
|
@@ -50,7 +50,7 @@ class SPARQLAdapter extends BaseAdapter_1.BaseFeatureDataAdapter {
|
|
|
50
50
|
if (this.additionalQueryParams.length) {
|
|
51
51
|
additionalQueryParams = `&${this.additionalQueryParams.join('&')}`;
|
|
52
52
|
}
|
|
53
|
-
const signal = opts
|
|
53
|
+
const signal = opts === null || opts === void 0 ? void 0 : opts.signal;
|
|
54
54
|
const response = await fetch(`${this.endpoint}?query=${query}${additionalQueryParams}`, {
|
|
55
55
|
headers: { accept: 'application/json,application/sparql-results+json' },
|
|
56
56
|
signal,
|
|
@@ -58,7 +58,8 @@ class SPARQLAdapter extends BaseAdapter_1.BaseFeatureDataAdapter {
|
|
|
58
58
|
return response.json();
|
|
59
59
|
}
|
|
60
60
|
resultsToRefNames(response) {
|
|
61
|
-
|
|
61
|
+
var _a;
|
|
62
|
+
const rows = ((_a = response === null || response === void 0 ? void 0 : response.results) === null || _a === void 0 ? void 0 : _a.bindings) || [];
|
|
62
63
|
if (!rows.length) {
|
|
63
64
|
return [];
|
|
64
65
|
}
|
|
@@ -69,7 +70,8 @@ class SPARQLAdapter extends BaseAdapter_1.BaseFeatureDataAdapter {
|
|
|
69
70
|
return rows.map(row => row.refName.value);
|
|
70
71
|
}
|
|
71
72
|
resultsToFeatures(results, refName) {
|
|
72
|
-
|
|
73
|
+
var _a;
|
|
74
|
+
const rows = ((_a = results === null || results === void 0 ? void 0 : results.results) === null || _a === void 0 ? void 0 : _a.bindings) || [];
|
|
73
75
|
if (!rows.length) {
|
|
74
76
|
return [];
|
|
75
77
|
}
|
|
@@ -149,7 +151,7 @@ class SPARQLAdapter extends BaseAdapter_1.BaseFeatureDataAdapter {
|
|
|
149
151
|
found = true;
|
|
150
152
|
break;
|
|
151
153
|
}
|
|
152
|
-
else if (subfeature
|
|
154
|
+
else if (subfeature === null || subfeature === void 0 ? void 0 : subfeature.subfeatures) {
|
|
153
155
|
subfeatures.push(...subfeature.subfeatures);
|
|
154
156
|
}
|
|
155
157
|
}
|
|
@@ -45,7 +45,7 @@ export default class SPARQLAdapter extends BaseFeatureDataAdapter {
|
|
|
45
45
|
if (this.additionalQueryParams.length) {
|
|
46
46
|
additionalQueryParams = `&${this.additionalQueryParams.join('&')}`;
|
|
47
47
|
}
|
|
48
|
-
const signal = opts
|
|
48
|
+
const signal = opts === null || opts === void 0 ? void 0 : opts.signal;
|
|
49
49
|
const response = await fetch(`${this.endpoint}?query=${query}${additionalQueryParams}`, {
|
|
50
50
|
headers: { accept: 'application/json,application/sparql-results+json' },
|
|
51
51
|
signal,
|
|
@@ -53,7 +53,8 @@ export default class SPARQLAdapter extends BaseFeatureDataAdapter {
|
|
|
53
53
|
return response.json();
|
|
54
54
|
}
|
|
55
55
|
resultsToRefNames(response) {
|
|
56
|
-
|
|
56
|
+
var _a;
|
|
57
|
+
const rows = ((_a = response === null || response === void 0 ? void 0 : response.results) === null || _a === void 0 ? void 0 : _a.bindings) || [];
|
|
57
58
|
if (!rows.length) {
|
|
58
59
|
return [];
|
|
59
60
|
}
|
|
@@ -64,7 +65,8 @@ export default class SPARQLAdapter extends BaseFeatureDataAdapter {
|
|
|
64
65
|
return rows.map(row => row.refName.value);
|
|
65
66
|
}
|
|
66
67
|
resultsToFeatures(results, refName) {
|
|
67
|
-
|
|
68
|
+
var _a;
|
|
69
|
+
const rows = ((_a = results === null || results === void 0 ? void 0 : results.results) === null || _a === void 0 ? void 0 : _a.bindings) || [];
|
|
68
70
|
if (!rows.length) {
|
|
69
71
|
return [];
|
|
70
72
|
}
|
|
@@ -144,7 +146,7 @@ export default class SPARQLAdapter extends BaseFeatureDataAdapter {
|
|
|
144
146
|
found = true;
|
|
145
147
|
break;
|
|
146
148
|
}
|
|
147
|
-
else if (subfeature
|
|
149
|
+
else if (subfeature === null || subfeature === void 0 ? void 0 : subfeature.subfeatures) {
|
|
148
150
|
subfeatures.push(...subfeature.subfeatures);
|
|
149
151
|
}
|
|
150
152
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jbrowse/plugin-rdf",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.7.0",
|
|
4
4
|
"description": "JBrowse 2 RDF resources",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"jbrowse",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"peerDependencies": {
|
|
42
42
|
"@jbrowse/core": "^2.0.0",
|
|
43
43
|
"mobx": "^6.0.0",
|
|
44
|
-
"mobx-react": "^
|
|
44
|
+
"mobx-react": "^9.0.0",
|
|
45
45
|
"mobx-state-tree": "^5.0.0",
|
|
46
46
|
"rxjs": "^7.0.0"
|
|
47
47
|
},
|
|
@@ -51,5 +51,5 @@
|
|
|
51
51
|
"publishConfig": {
|
|
52
52
|
"access": "public"
|
|
53
53
|
},
|
|
54
|
-
"gitHead": "
|
|
54
|
+
"gitHead": "dbe7fb1af01fc89f833d2744635eb44a17365b41"
|
|
55
55
|
}
|