@jbrowse/plugin-legacy-jbrowse 1.4.1 → 1.5.2
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/JBrowse1Connection/jb1ToJb2.d.ts +1 -0
- package/dist/JBrowse1Connection/types.d.ts +2 -0
- package/dist/JBrowse1TextSeachAdapter/HttpMap.d.ts +1 -15
- package/dist/JBrowse1TextSeachAdapter/JBrowse1TextSearchAdapter.d.ts +12 -8
- package/dist/NCListAdapter/NCListAdapter.d.ts +3 -1
- package/dist/plugin-legacy-jbrowse.cjs.development.js +334 -398
- package/dist/plugin-legacy-jbrowse.cjs.development.js.map +1 -1
- package/dist/plugin-legacy-jbrowse.cjs.production.min.js +1 -1
- package/dist/plugin-legacy-jbrowse.cjs.production.min.js.map +1 -1
- package/dist/plugin-legacy-jbrowse.esm.js +336 -399
- package/dist/plugin-legacy-jbrowse.esm.js.map +1 -1
- package/package.json +5 -3
- package/src/JBrowse1Connection/configSchema.ts +4 -1
- package/src/JBrowse1Connection/jb1ConfigLoad.ts +24 -27
- package/src/JBrowse1Connection/jb1ConfigParse.ts +10 -12
- package/src/JBrowse1Connection/jb1ToJb2.ts +93 -43
- package/src/JBrowse1Connection/types.ts +2 -0
- package/src/JBrowse1TextSeachAdapter/HttpMap.test.ts +8 -20
- package/src/JBrowse1TextSeachAdapter/HttpMap.ts +17 -75
- package/src/JBrowse1TextSeachAdapter/JBrowse1TextSearchAdapter.test.ts +2 -4
- package/src/JBrowse1TextSeachAdapter/JBrowse1TextSearchAdapter.ts +42 -58
- package/src/JBrowse1TextSeachAdapter/configSchema.ts +2 -2
- package/src/NCListAdapter/NCListAdapter.test.ts +4 -1
- package/src/NCListAdapter/NCListAdapter.ts +15 -8
- package/src/NCListAdapter/configSchema.ts +4 -1
- package/src/__snapshots__/index.test.js.snap +3 -0
- package/src/index.test.js +1 -0
- package/src/index.ts +23 -0
- package/dist/JBrowse1TextSeachAdapter/Crc32.d.ts +0 -19
- package/src/JBrowse1TextSeachAdapter/Crc32.test.ts +0 -21
- package/src/JBrowse1TextSeachAdapter/Crc32.ts +0 -77
|
@@ -4,16 +4,93 @@ import ConnectionType from '@jbrowse/core/pluggableElementTypes/ConnectionType';
|
|
|
4
4
|
import Plugin from '@jbrowse/core/Plugin';
|
|
5
5
|
import { ConfigurationSchema, readConfObject, ConfigurationReference } from '@jbrowse/core/configuration';
|
|
6
6
|
import { BaseAdapter, BaseFeatureDataAdapter } from '@jbrowse/core/data_adapters/BaseAdapter';
|
|
7
|
-
import BaseResult
|
|
8
|
-
import
|
|
7
|
+
import BaseResult from '@jbrowse/core/TextSearch/BaseResults';
|
|
8
|
+
import crc32 from 'buffer-crc32';
|
|
9
|
+
import { generateUnsupportedTrackConf, guessAdapter, UNSUPPORTED, UNKNOWN, generateUnknownTrackConf, guessTrackType, getFileName } from '@jbrowse/core/util/tracks';
|
|
10
|
+
import { objectHash, getSession, checkAbortSignal } from '@jbrowse/core/util';
|
|
9
11
|
import { baseConnectionConfig, BaseConnectionModelFactory } from '@jbrowse/core/pluggableElementTypes/models';
|
|
10
12
|
import { types } from 'mobx-state-tree';
|
|
11
|
-
import { openLocation
|
|
13
|
+
import { openLocation } from '@jbrowse/core/util/io';
|
|
12
14
|
import getValue from 'get-value';
|
|
13
15
|
import setValue from 'set-value';
|
|
14
|
-
import { generateUnsupportedTrackConf, guessAdapter, UNSUPPORTED, UNKNOWN, generateUnknownTrackConf, guessTrackType } from '@jbrowse/core/util/tracks';
|
|
15
16
|
import NCListStore from '@gmod/nclist';
|
|
16
17
|
import { ObservableCreate } from '@jbrowse/core/util/rxjs';
|
|
18
|
+
import { RemoteFile } from 'generic-filehandle';
|
|
19
|
+
|
|
20
|
+
function _asyncIterator(iterable) {
|
|
21
|
+
var method,
|
|
22
|
+
async,
|
|
23
|
+
sync,
|
|
24
|
+
retry = 2;
|
|
25
|
+
|
|
26
|
+
if (typeof Symbol !== "undefined") {
|
|
27
|
+
async = Symbol.asyncIterator;
|
|
28
|
+
sync = Symbol.iterator;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
while (retry--) {
|
|
32
|
+
if (async && (method = iterable[async]) != null) {
|
|
33
|
+
return method.call(iterable);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
if (sync && (method = iterable[sync]) != null) {
|
|
37
|
+
return new AsyncFromSyncIterator(method.call(iterable));
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
async = "@@asyncIterator";
|
|
41
|
+
sync = "@@iterator";
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
throw new TypeError("Object is not async iterable");
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
function AsyncFromSyncIterator(s) {
|
|
48
|
+
AsyncFromSyncIterator = function (s) {
|
|
49
|
+
this.s = s;
|
|
50
|
+
this.n = s.next;
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
AsyncFromSyncIterator.prototype = {
|
|
54
|
+
s: null,
|
|
55
|
+
n: null,
|
|
56
|
+
next: function () {
|
|
57
|
+
return AsyncFromSyncIteratorContinuation(this.n.apply(this.s, arguments));
|
|
58
|
+
},
|
|
59
|
+
return: function (value) {
|
|
60
|
+
var ret = this.s.return;
|
|
61
|
+
|
|
62
|
+
if (ret === undefined) {
|
|
63
|
+
return Promise.resolve({
|
|
64
|
+
value: value,
|
|
65
|
+
done: true
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
return AsyncFromSyncIteratorContinuation(ret.apply(this.s, arguments));
|
|
70
|
+
},
|
|
71
|
+
throw: function (value) {
|
|
72
|
+
var thr = this.s.return;
|
|
73
|
+
if (thr === undefined) return Promise.reject(value);
|
|
74
|
+
return AsyncFromSyncIteratorContinuation(thr.apply(this.s, arguments));
|
|
75
|
+
}
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
function AsyncFromSyncIteratorContinuation(r) {
|
|
79
|
+
if (Object(r) !== r) {
|
|
80
|
+
return Promise.reject(new TypeError(r + " is not an object."));
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
var done = r.done;
|
|
84
|
+
return Promise.resolve(r.value).then(function (value) {
|
|
85
|
+
return {
|
|
86
|
+
value: value,
|
|
87
|
+
done: done
|
|
88
|
+
};
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
return new AsyncFromSyncIterator(s);
|
|
93
|
+
}
|
|
17
94
|
|
|
18
95
|
function ownKeys(object, enumerableOnly) {
|
|
19
96
|
var keys = Object.keys(object);
|
|
@@ -69,20 +146,6 @@ function _typeof(obj) {
|
|
|
69
146
|
return _typeof(obj);
|
|
70
147
|
}
|
|
71
148
|
|
|
72
|
-
function _asyncIterator(iterable) {
|
|
73
|
-
var method;
|
|
74
|
-
|
|
75
|
-
if (typeof Symbol !== "undefined") {
|
|
76
|
-
if (Symbol.asyncIterator) method = iterable[Symbol.asyncIterator];
|
|
77
|
-
if (method == null && Symbol.iterator) method = iterable[Symbol.iterator];
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
if (method == null) method = iterable["@@asyncIterator"];
|
|
81
|
-
if (method == null) method = iterable["@@iterator"];
|
|
82
|
-
if (method == null) throw new TypeError("Object is not async iterable");
|
|
83
|
-
return method.call(iterable);
|
|
84
|
-
}
|
|
85
|
-
|
|
86
149
|
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
|
|
87
150
|
try {
|
|
88
151
|
var info = gen[key](arg);
|
|
@@ -211,6 +274,8 @@ function _assertThisInitialized(self) {
|
|
|
211
274
|
function _possibleConstructorReturn(self, call) {
|
|
212
275
|
if (call && (typeof call === "object" || typeof call === "function")) {
|
|
213
276
|
return call;
|
|
277
|
+
} else if (call !== void 0) {
|
|
278
|
+
throw new TypeError("Derived constructors may only return object or undefined");
|
|
214
279
|
}
|
|
215
280
|
|
|
216
281
|
return _assertThisInitialized(self);
|
|
@@ -314,7 +379,8 @@ var ncListAdapterConfigSchema = /*#__PURE__*/ConfigurationSchema('NCListAdapter'
|
|
|
314
379
|
rootUrlTemplate: {
|
|
315
380
|
type: 'fileLocation',
|
|
316
381
|
defaultValue: {
|
|
317
|
-
uri: '/path/to/my/{refseq}/trackData.json'
|
|
382
|
+
uri: '/path/to/my/{refseq}/trackData.json',
|
|
383
|
+
locationType: 'UriLocation'
|
|
318
384
|
}
|
|
319
385
|
},
|
|
320
386
|
refNames: {
|
|
@@ -423,11 +489,9 @@ var runtime_1 = /*#__PURE__*/createCommonjsModule(function (module) {
|
|
|
423
489
|
|
|
424
490
|
|
|
425
491
|
var IteratorPrototype = {};
|
|
426
|
-
|
|
427
|
-
IteratorPrototype[iteratorSymbol] = function () {
|
|
492
|
+
define(IteratorPrototype, iteratorSymbol, function () {
|
|
428
493
|
return this;
|
|
429
|
-
};
|
|
430
|
-
|
|
494
|
+
});
|
|
431
495
|
var getProto = Object.getPrototypeOf;
|
|
432
496
|
var NativeIteratorPrototype = getProto && getProto(getProto(values([])));
|
|
433
497
|
|
|
@@ -438,8 +502,9 @@ var runtime_1 = /*#__PURE__*/createCommonjsModule(function (module) {
|
|
|
438
502
|
}
|
|
439
503
|
|
|
440
504
|
var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype);
|
|
441
|
-
GeneratorFunction.prototype =
|
|
442
|
-
|
|
505
|
+
GeneratorFunction.prototype = GeneratorFunctionPrototype;
|
|
506
|
+
define(Gp, "constructor", GeneratorFunctionPrototype);
|
|
507
|
+
define(GeneratorFunctionPrototype, "constructor", GeneratorFunction);
|
|
443
508
|
GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"); // Helper for defining the .next, .throw, and .return methods of the
|
|
444
509
|
// Iterator interface in terms of a single ._invoke method.
|
|
445
510
|
|
|
@@ -544,11 +609,9 @@ var runtime_1 = /*#__PURE__*/createCommonjsModule(function (module) {
|
|
|
544
609
|
}
|
|
545
610
|
|
|
546
611
|
defineIteratorMethods(AsyncIterator.prototype);
|
|
547
|
-
|
|
548
|
-
AsyncIterator.prototype[asyncIteratorSymbol] = function () {
|
|
612
|
+
define(AsyncIterator.prototype, asyncIteratorSymbol, function () {
|
|
549
613
|
return this;
|
|
550
|
-
};
|
|
551
|
-
|
|
614
|
+
});
|
|
552
615
|
exports.AsyncIterator = AsyncIterator; // Note that simple async functions are implemented on top of
|
|
553
616
|
// AsyncIterator objects; they just return a Promise for the value of
|
|
554
617
|
// the final result produced by the iterator.
|
|
@@ -725,13 +788,12 @@ var runtime_1 = /*#__PURE__*/createCommonjsModule(function (module) {
|
|
|
725
788
|
// object to not be returned from this call. This ensures that doesn't happen.
|
|
726
789
|
// See https://github.com/facebook/regenerator/issues/274 for more details.
|
|
727
790
|
|
|
728
|
-
Gp
|
|
791
|
+
define(Gp, iteratorSymbol, function () {
|
|
729
792
|
return this;
|
|
730
|
-
};
|
|
731
|
-
|
|
732
|
-
Gp.toString = function () {
|
|
793
|
+
});
|
|
794
|
+
define(Gp, "toString", function () {
|
|
733
795
|
return "[object Generator]";
|
|
734
|
-
};
|
|
796
|
+
});
|
|
735
797
|
|
|
736
798
|
function pushTryEntry(locs) {
|
|
737
799
|
var entry = {
|
|
@@ -1043,86 +1105,28 @@ var runtime_1 = /*#__PURE__*/createCommonjsModule(function (module) {
|
|
|
1043
1105
|
} catch (accidentalStrictMode) {
|
|
1044
1106
|
// This module should not be running in strict mode, so the above
|
|
1045
1107
|
// assignment should always work unless something is misconfigured. Just
|
|
1046
|
-
// in case runtime.js accidentally runs in strict mode,
|
|
1108
|
+
// in case runtime.js accidentally runs in strict mode, in modern engines
|
|
1109
|
+
// we can explicitly access globalThis. In older engines we can escape
|
|
1047
1110
|
// strict mode using a global Function call. This could conceivably fail
|
|
1048
1111
|
// if a Content Security Policy forbids using Function, but in that case
|
|
1049
1112
|
// the proper solution is to fix the accidental strict mode problem. If
|
|
1050
1113
|
// you've misconfigured your bundler to force strict mode and applied a
|
|
1051
1114
|
// CSP to forbid Function, and you're not willing to fix either of those
|
|
1052
1115
|
// problems, please detail your unique predicament in a GitHub issue.
|
|
1053
|
-
|
|
1116
|
+
if (typeof globalThis === "object") {
|
|
1117
|
+
globalThis.regeneratorRuntime = runtime;
|
|
1118
|
+
} else {
|
|
1119
|
+
Function("r", "regeneratorRuntime = r")(runtime);
|
|
1120
|
+
}
|
|
1054
1121
|
}
|
|
1055
1122
|
});
|
|
1056
1123
|
|
|
1057
|
-
var crc32Table = '00000000 77073096 EE0E612C 990951BA 076DC419 706AF48F E963A535 9E6495A3 0EDB8832 79DCB8A4 E0D5E91E 97D2D988 09B64C2B 7EB17CBD E7B82D07 90BF1D91 1DB71064 6AB020F2 F3B97148 84BE41DE 1ADAD47D 6DDDE4EB F4D4B551 83D385C7 136C9856 646BA8C0 FD62F97A 8A65C9EC 14015C4F 63066CD9 FA0F3D63 8D080DF5 3B6E20C8 4C69105E D56041E4 A2677172 3C03E4D1 4B04D447 D20D85FD A50AB56B 35B5A8FA 42B2986C DBBBC9D6 ACBCF940 32D86CE3 45DF5C75 DCD60DCF ABD13D59 26D930AC 51DE003A C8D75180 BFD06116 21B4F4B5 56B3C423 CFBA9599 B8BDA50F 2802B89E 5F058808 C60CD9B2 B10BE924 2F6F7C87 58684C11 C1611DAB B6662D3D 76DC4190 01DB7106 98D220BC EFD5102A 71B18589 06B6B51F 9FBFE4A5 E8B8D433 7807C9A2 0F00F934 9609A88E E10E9818 7F6A0DBB 086D3D2D 91646C97 E6635C01 6B6B51F4 1C6C6162 856530D8 F262004E 6C0695ED 1B01A57B 8208F4C1 F50FC457 65B0D9C6 12B7E950 8BBEB8EA FCB9887C 62DD1DDF 15DA2D49 8CD37CF3 FBD44C65 4DB26158 3AB551CE A3BC0074 D4BB30E2 4ADFA541 3DD895D7 A4D1C46D D3D6F4FB 4369E96A 346ED9FC AD678846 DA60B8D0 44042D73 33031DE5 AA0A4C5F DD0D7CC9 5005713C 270241AA BE0B1010 C90C2086 5768B525 206F85B3 B966D409 CE61E49F 5EDEF90E 29D9C998 B0D09822 C7D7A8B4 59B33D17 2EB40D81 B7BD5C3B C0BA6CAD EDB88320 9ABFB3B6 03B6E20C 74B1D29A EAD54739 9DD277AF 04DB2615 73DC1683 E3630B12 94643B84 0D6D6A3E 7A6A5AA8 E40ECF0B 9309FF9D 0A00AE27 7D079EB1 F00F9344 8708A3D2 1E01F268 6906C2FE F762575D 806567CB 196C3671 6E6B06E7 FED41B76 89D32BE0 10DA7A5A 67DD4ACC F9B9DF6F 8EBEEFF9 17B7BE43 60B08ED5 D6D6A3E8 A1D1937E 38D8C2C4 4FDFF252 D1BB67F1 A6BC5767 3FB506DD 48B2364B D80D2BDA AF0A1B4C 36034AF6 41047A60 DF60EFC3 A867DF55 316E8EEF 4669BE79 CB61B38C BC66831A 256FD2A0 5268E236 CC0C7795 BB0B4703 220216B9 5505262F C5BA3BBE B2BD0B28 2BB45A92 5CB36A04 C2D7FFA7 B5D0CF31 2CD99E8B 5BDEAE1D 9B64C2B0 EC63F226 756AA39C 026D930A 9C0906A9 EB0E363F 72076785 05005713 95BF4A82 E2B87A14 7BB12BAE 0CB61B38 92D28E9B E5D5BE0D 7CDCEFB7 0BDBDF21 86D3D2D4 F1D4E242 68DDB3F8 1FDA836E 81BE16CD F6B9265B 6FB077E1 18B74777 88085AE6 FF0F6A70 66063BCA 11010B5C 8F659EFF F862AE69 616BFFD3 166CCF45 A00AE278 D70DD2EE 4E048354 3903B3C2 A7672661 D06016F7 4969474D 3E6E77DB AED16A4A D9D65ADC 40DF0B66 37D83BF0 A9BCAE53 DEBB9EC5 47B2CF7F 30B5FFE9 BDBDF21C CABAC28A 53B39330 24B4A3A6 BAD03605 CDD70693 54DE5729 23D967BF B3667A2E C4614AB8 5D681B02 2A6F2B94 B40BBE37 C30C8EA1 5A05DF1B 2D02EF8D'; // Adapted from JBrowse1 crc32 implementation.
|
|
1058
|
-
// https://github.com/GMOD/jbrowse/blob/b8324df0033796b6d502696dc65c9ff888aae2f3/src/JBrowse/Digest/Crc32.js
|
|
1059
|
-
|
|
1060
|
-
/**
|
|
1061
|
-
* Returns an array of bytes given a string
|
|
1062
|
-
* @param str - string
|
|
1063
|
-
*/
|
|
1064
|
-
|
|
1065
|
-
function stringToBytes(str) {
|
|
1066
|
-
var ch;
|
|
1067
|
-
var st;
|
|
1068
|
-
var re = [];
|
|
1069
|
-
|
|
1070
|
-
for (var i = 0; i < str.length; i++) {
|
|
1071
|
-
ch = str.charCodeAt(i); // get char
|
|
1072
|
-
|
|
1073
|
-
st = []; // set up "stack"
|
|
1074
|
-
|
|
1075
|
-
do {
|
|
1076
|
-
st.push(ch & 0xff); // push byte to stack
|
|
1077
|
-
|
|
1078
|
-
ch >>= 8; // shift value down by 1 byte
|
|
1079
|
-
} while (ch); // add stack contents to result
|
|
1080
|
-
// done because chars have "wrong" endianness
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
re = re.concat(st.reverse());
|
|
1084
|
-
}
|
|
1085
|
-
|
|
1086
|
-
return re;
|
|
1087
|
-
}
|
|
1088
|
-
/**
|
|
1089
|
-
* crc32 given a string
|
|
1090
|
-
* @param str - string
|
|
1091
|
-
* @param crc - number
|
|
1092
|
-
*/
|
|
1093
|
-
|
|
1094
|
-
function crc32(str) {
|
|
1095
|
-
var crc = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
|
|
1096
|
-
var bytes = stringToBytes(str);
|
|
1097
|
-
var n = 0; // a number between 0 and 255
|
|
1098
|
-
|
|
1099
|
-
var x; // a hex number
|
|
1100
|
-
|
|
1101
|
-
var table = crc32Table;
|
|
1102
|
-
crc ^= -1;
|
|
1103
|
-
|
|
1104
|
-
for (var i = 0, iTop = bytes.length; i < iTop; i++) {
|
|
1105
|
-
n = (crc ^ bytes[i]) & 0xff;
|
|
1106
|
-
x = "0x".concat(table.substr(n * 9, 8));
|
|
1107
|
-
crc = crc >>> 8 ^ parseInt(x, 16);
|
|
1108
|
-
}
|
|
1109
|
-
|
|
1110
|
-
crc ^= -1; // convert to unsigned 32-bit int if needed
|
|
1111
|
-
|
|
1112
|
-
if (crc < 0) {
|
|
1113
|
-
crc += 4294967296;
|
|
1114
|
-
}
|
|
1115
|
-
|
|
1116
|
-
return crc;
|
|
1117
|
-
}
|
|
1118
|
-
|
|
1119
1124
|
var HttpMap = /*#__PURE__*/function () {
|
|
1120
1125
|
function HttpMap(args) {
|
|
1121
1126
|
_classCallCheck(this, HttpMap);
|
|
1122
1127
|
|
|
1123
1128
|
// make sure url has a trailing slash
|
|
1124
1129
|
this.url = /\/$/.test(args.url) ? args.url : "".concat(args.url, "/");
|
|
1125
|
-
this.isElectron = args.isElectron;
|
|
1126
1130
|
}
|
|
1127
1131
|
/**
|
|
1128
1132
|
* loads meta.json file from names directory and reads number of hash_bits used
|
|
@@ -1138,47 +1142,25 @@ var HttpMap = /*#__PURE__*/function () {
|
|
|
1138
1142
|
while (1) {
|
|
1139
1143
|
switch (_context.prev = _context.next) {
|
|
1140
1144
|
case 0:
|
|
1141
|
-
_context.
|
|
1142
|
-
_context.next = 3;
|
|
1145
|
+
_context.next = 2;
|
|
1143
1146
|
return this.loadFile('meta.json');
|
|
1144
1147
|
|
|
1145
|
-
case
|
|
1148
|
+
case 2:
|
|
1146
1149
|
meta = _context.sent;
|
|
1147
|
-
|
|
1148
|
-
if (!(meta !== {})) {
|
|
1149
|
-
_context.next = 11;
|
|
1150
|
-
break;
|
|
1151
|
-
}
|
|
1152
|
-
|
|
1153
1150
|
compress = meta.compress, tracks = meta.track_names;
|
|
1154
|
-
this.compress = compress;
|
|
1155
1151
|
hashHexCharacters = Math.ceil(meta.hash_bits / 4);
|
|
1156
|
-
this.hash_hex_characters = hashHexCharacters;
|
|
1157
|
-
this.tracks = tracks;
|
|
1158
1152
|
return _context.abrupt("return", {
|
|
1159
1153
|
hashHexCharacters: hashHexCharacters,
|
|
1160
1154
|
compress: compress,
|
|
1161
1155
|
tracks: tracks
|
|
1162
1156
|
});
|
|
1163
1157
|
|
|
1164
|
-
case
|
|
1165
|
-
throw new Error('Error parsing meta.json');
|
|
1166
|
-
|
|
1167
|
-
case 14:
|
|
1168
|
-
_context.prev = 14;
|
|
1169
|
-
_context.t0 = _context["catch"](0);
|
|
1170
|
-
// throw Error(err)
|
|
1171
|
-
console.warn("Error: ".concat(_context.t0));
|
|
1172
|
-
|
|
1173
|
-
case 17:
|
|
1174
|
-
return _context.abrupt("return", {});
|
|
1175
|
-
|
|
1176
|
-
case 18:
|
|
1158
|
+
case 6:
|
|
1177
1159
|
case "end":
|
|
1178
1160
|
return _context.stop();
|
|
1179
1161
|
}
|
|
1180
1162
|
}
|
|
1181
|
-
}, _callee, this
|
|
1163
|
+
}, _callee, this);
|
|
1182
1164
|
}));
|
|
1183
1165
|
|
|
1184
1166
|
function readMeta() {
|
|
@@ -1196,22 +1178,14 @@ var HttpMap = /*#__PURE__*/function () {
|
|
|
1196
1178
|
while (1) {
|
|
1197
1179
|
switch (_context2.prev = _context2.next) {
|
|
1198
1180
|
case 0:
|
|
1199
|
-
|
|
1200
|
-
_context2.next = 2;
|
|
1201
|
-
break;
|
|
1202
|
-
}
|
|
1203
|
-
|
|
1204
|
-
return _context2.abrupt("return", this.hash_hex_characters);
|
|
1205
|
-
|
|
1206
|
-
case 2:
|
|
1207
|
-
_context2.next = 4;
|
|
1181
|
+
_context2.next = 2;
|
|
1208
1182
|
return this.readMeta();
|
|
1209
1183
|
|
|
1210
|
-
case
|
|
1184
|
+
case 2:
|
|
1211
1185
|
meta = _context2.sent;
|
|
1212
1186
|
return _context2.abrupt("return", meta.hashHexCharacters);
|
|
1213
1187
|
|
|
1214
|
-
case
|
|
1188
|
+
case 4:
|
|
1215
1189
|
case "end":
|
|
1216
1190
|
return _context2.stop();
|
|
1217
1191
|
}
|
|
@@ -1234,22 +1208,14 @@ var HttpMap = /*#__PURE__*/function () {
|
|
|
1234
1208
|
while (1) {
|
|
1235
1209
|
switch (_context3.prev = _context3.next) {
|
|
1236
1210
|
case 0:
|
|
1237
|
-
|
|
1238
|
-
_context3.next = 2;
|
|
1239
|
-
break;
|
|
1240
|
-
}
|
|
1241
|
-
|
|
1242
|
-
return _context3.abrupt("return", this.compress);
|
|
1243
|
-
|
|
1244
|
-
case 2:
|
|
1245
|
-
_context3.next = 4;
|
|
1211
|
+
_context3.next = 2;
|
|
1246
1212
|
return this.readMeta();
|
|
1247
1213
|
|
|
1248
|
-
case
|
|
1214
|
+
case 2:
|
|
1249
1215
|
meta = _context3.sent;
|
|
1250
1216
|
return _context3.abrupt("return", meta.compress);
|
|
1251
1217
|
|
|
1252
|
-
case
|
|
1218
|
+
case 4:
|
|
1253
1219
|
case "end":
|
|
1254
1220
|
return _context3.stop();
|
|
1255
1221
|
}
|
|
@@ -1272,22 +1238,14 @@ var HttpMap = /*#__PURE__*/function () {
|
|
|
1272
1238
|
while (1) {
|
|
1273
1239
|
switch (_context4.prev = _context4.next) {
|
|
1274
1240
|
case 0:
|
|
1275
|
-
|
|
1276
|
-
_context4.next = 2;
|
|
1277
|
-
break;
|
|
1278
|
-
}
|
|
1279
|
-
|
|
1280
|
-
return _context4.abrupt("return", this.tracks);
|
|
1281
|
-
|
|
1282
|
-
case 2:
|
|
1283
|
-
_context4.next = 4;
|
|
1241
|
+
_context4.next = 2;
|
|
1284
1242
|
return this.readMeta();
|
|
1285
1243
|
|
|
1286
|
-
case
|
|
1244
|
+
case 2:
|
|
1287
1245
|
meta = _context4.sent;
|
|
1288
1246
|
return _context4.abrupt("return", meta.tracks);
|
|
1289
1247
|
|
|
1290
|
-
case
|
|
1248
|
+
case 4:
|
|
1291
1249
|
case "end":
|
|
1292
1250
|
return _context4.stop();
|
|
1293
1251
|
}
|
|
@@ -1345,45 +1303,25 @@ var HttpMap = /*#__PURE__*/function () {
|
|
|
1345
1303
|
key: "getBucket",
|
|
1346
1304
|
value: function () {
|
|
1347
1305
|
var _getBucket = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee6(key) {
|
|
1348
|
-
var bucketIdent, hexToDirPath
|
|
1306
|
+
var bucketIdent, hexToDirPath;
|
|
1349
1307
|
return runtime_1.wrap(function _callee6$(_context6) {
|
|
1350
1308
|
while (1) {
|
|
1351
1309
|
switch (_context6.prev = _context6.next) {
|
|
1352
1310
|
case 0:
|
|
1353
1311
|
bucketIdent = this.hash(key);
|
|
1354
|
-
_context6.
|
|
1355
|
-
_context6.next = 4;
|
|
1312
|
+
_context6.next = 3;
|
|
1356
1313
|
return this.hexToDirPath(bucketIdent);
|
|
1357
1314
|
|
|
1358
|
-
case
|
|
1315
|
+
case 3:
|
|
1359
1316
|
hexToDirPath = _context6.sent;
|
|
1360
|
-
_context6.
|
|
1361
|
-
return this.loadFile(hexToDirPath);
|
|
1362
|
-
|
|
1363
|
-
case 7:
|
|
1364
|
-
value = _context6.sent;
|
|
1365
|
-
return _context6.abrupt("return", value);
|
|
1317
|
+
return _context6.abrupt("return", this.loadFile(hexToDirPath));
|
|
1366
1318
|
|
|
1367
|
-
case
|
|
1368
|
-
_context6.prev = 11;
|
|
1369
|
-
_context6.t0 = _context6["catch"](1);
|
|
1370
|
-
|
|
1371
|
-
if (!(this.isElectron || _context6.t0.status === 404)) {
|
|
1372
|
-
_context6.next = 15;
|
|
1373
|
-
break;
|
|
1374
|
-
}
|
|
1375
|
-
|
|
1376
|
-
return _context6.abrupt("return", {});
|
|
1377
|
-
|
|
1378
|
-
case 15:
|
|
1379
|
-
return _context6.abrupt("return", {});
|
|
1380
|
-
|
|
1381
|
-
case 16:
|
|
1319
|
+
case 5:
|
|
1382
1320
|
case "end":
|
|
1383
1321
|
return _context6.stop();
|
|
1384
1322
|
}
|
|
1385
1323
|
}
|
|
1386
|
-
}, _callee6, this
|
|
1324
|
+
}, _callee6, this);
|
|
1387
1325
|
}));
|
|
1388
1326
|
|
|
1389
1327
|
function getBucket(_x2) {
|
|
@@ -1402,45 +1340,33 @@ var HttpMap = /*#__PURE__*/function () {
|
|
|
1402
1340
|
key: "loadFile",
|
|
1403
1341
|
value: function () {
|
|
1404
1342
|
var _loadFile = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee7(id) {
|
|
1405
|
-
var response
|
|
1343
|
+
var response;
|
|
1406
1344
|
return runtime_1.wrap(function _callee7$(_context7) {
|
|
1407
1345
|
while (1) {
|
|
1408
1346
|
switch (_context7.prev = _context7.next) {
|
|
1409
1347
|
case 0:
|
|
1410
1348
|
_context7.next = 2;
|
|
1411
|
-
return fetch("".concat(this.url).concat(id)
|
|
1412
|
-
headers: {
|
|
1413
|
-
'Content-Type': 'application/json',
|
|
1414
|
-
'Access-Control-Allow-Origin': '*'
|
|
1415
|
-
}
|
|
1416
|
-
});
|
|
1349
|
+
return fetch("".concat(this.url).concat(id));
|
|
1417
1350
|
|
|
1418
1351
|
case 2:
|
|
1419
1352
|
response = _context7.sent;
|
|
1420
|
-
_context7.prev = 3;
|
|
1421
|
-
_context7.next = 6;
|
|
1422
|
-
return response.json();
|
|
1423
1353
|
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1354
|
+
if (response.ok) {
|
|
1355
|
+
_context7.next = 5;
|
|
1356
|
+
break;
|
|
1357
|
+
}
|
|
1427
1358
|
|
|
1428
|
-
|
|
1429
|
-
_context7.prev = 10;
|
|
1430
|
-
_context7.t0 = _context7["catch"](3);
|
|
1431
|
-
// handle error
|
|
1432
|
-
// throw Error(err)
|
|
1433
|
-
console.warn("Error: ".concat(_context7.t0));
|
|
1359
|
+
throw new Error("HTTP ".concat(response.status, " ").concat(response.statusText));
|
|
1434
1360
|
|
|
1435
|
-
case
|
|
1436
|
-
return _context7.abrupt("return",
|
|
1361
|
+
case 5:
|
|
1362
|
+
return _context7.abrupt("return", response.json());
|
|
1437
1363
|
|
|
1438
|
-
case
|
|
1364
|
+
case 6:
|
|
1439
1365
|
case "end":
|
|
1440
1366
|
return _context7.stop();
|
|
1441
1367
|
}
|
|
1442
1368
|
}
|
|
1443
|
-
}, _callee7, this
|
|
1369
|
+
}, _callee7, this);
|
|
1444
1370
|
}));
|
|
1445
1371
|
|
|
1446
1372
|
function loadFile(_x3) {
|
|
@@ -1510,33 +1436,29 @@ var HttpMap = /*#__PURE__*/function () {
|
|
|
1510
1436
|
|
|
1511
1437
|
return hexToDirPath;
|
|
1512
1438
|
}()
|
|
1513
|
-
/**
|
|
1514
|
-
* Returns crc32 hash given a string.
|
|
1515
|
-
* (Note: this is using JBrowse1 implementation of crc32.)
|
|
1516
|
-
* @param data - string
|
|
1517
|
-
*/
|
|
1518
|
-
|
|
1519
1439
|
}, {
|
|
1520
1440
|
key: "hash",
|
|
1521
1441
|
value: function hash(data) {
|
|
1522
|
-
return crc32(data).toString(
|
|
1442
|
+
return crc32(Buffer.from(data)).toString('hex').toLowerCase().replace('-', 'n');
|
|
1523
1443
|
}
|
|
1524
1444
|
}]);
|
|
1525
1445
|
|
|
1526
1446
|
return HttpMap;
|
|
1527
1447
|
}();
|
|
1528
1448
|
|
|
1449
|
+
// Uses index built by generate-names.pl
|
|
1450
|
+
|
|
1529
1451
|
var JBrowse1TextSearchAdapter = /*#__PURE__*/function (_BaseAdapter) {
|
|
1530
1452
|
_inherits(JBrowse1TextSearchAdapter, _BaseAdapter);
|
|
1531
1453
|
|
|
1532
1454
|
var _super = /*#__PURE__*/_createSuper(JBrowse1TextSearchAdapter);
|
|
1533
1455
|
|
|
1534
|
-
function JBrowse1TextSearchAdapter(config) {
|
|
1456
|
+
function JBrowse1TextSearchAdapter(config, getSubAdapter, pluginManager) {
|
|
1535
1457
|
var _this;
|
|
1536
1458
|
|
|
1537
1459
|
_classCallCheck(this, JBrowse1TextSearchAdapter);
|
|
1538
1460
|
|
|
1539
|
-
_this = _super.call(this, config);
|
|
1461
|
+
_this = _super.call(this, config, getSubAdapter, pluginManager);
|
|
1540
1462
|
var namesIndexLocation = readConfObject(config, 'namesIndexLocation');
|
|
1541
1463
|
|
|
1542
1464
|
if (!namesIndexLocation) {
|
|
@@ -1544,8 +1466,7 @@ var JBrowse1TextSearchAdapter = /*#__PURE__*/function (_BaseAdapter) {
|
|
|
1544
1466
|
}
|
|
1545
1467
|
|
|
1546
1468
|
_this.httpMap = new HttpMap({
|
|
1547
|
-
url: namesIndexLocation.baseUri ? new URL(namesIndexLocation.uri, namesIndexLocation.baseUri).href : namesIndexLocation.uri
|
|
1548
|
-
isElectron: isElectron
|
|
1469
|
+
url: namesIndexLocation.baseUri ? new URL(namesIndexLocation.uri, namesIndexLocation.baseUri).href : namesIndexLocation.uri
|
|
1549
1470
|
});
|
|
1550
1471
|
return _this;
|
|
1551
1472
|
}
|
|
@@ -1560,19 +1481,13 @@ var JBrowse1TextSearchAdapter = /*#__PURE__*/function (_BaseAdapter) {
|
|
|
1560
1481
|
key: "loadIndexFile",
|
|
1561
1482
|
value: function () {
|
|
1562
1483
|
var _loadIndexFile = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee(query) {
|
|
1563
|
-
var bucketContents;
|
|
1564
1484
|
return runtime_1.wrap(function _callee$(_context) {
|
|
1565
1485
|
while (1) {
|
|
1566
1486
|
switch (_context.prev = _context.next) {
|
|
1567
1487
|
case 0:
|
|
1568
|
-
_context.
|
|
1569
|
-
return this.httpMap.getBucket(query);
|
|
1488
|
+
return _context.abrupt("return", this.httpMap.getBucket(query));
|
|
1570
1489
|
|
|
1571
|
-
case
|
|
1572
|
-
bucketContents = _context.sent;
|
|
1573
|
-
return _context.abrupt("return", bucketContents);
|
|
1574
|
-
|
|
1575
|
-
case 4:
|
|
1490
|
+
case 1:
|
|
1576
1491
|
case "end":
|
|
1577
1492
|
return _context.stop();
|
|
1578
1493
|
}
|
|
@@ -1586,12 +1501,6 @@ var JBrowse1TextSearchAdapter = /*#__PURE__*/function (_BaseAdapter) {
|
|
|
1586
1501
|
|
|
1587
1502
|
return loadIndexFile;
|
|
1588
1503
|
}()
|
|
1589
|
-
/**
|
|
1590
|
-
* Returns list of results
|
|
1591
|
-
* @param args - search options/arguments include: search query
|
|
1592
|
-
* limit of results to return, SearchType...prefix | full | exact", etc.
|
|
1593
|
-
*/
|
|
1594
|
-
|
|
1595
1504
|
}, {
|
|
1596
1505
|
key: "searchIndex",
|
|
1597
1506
|
value: function () {
|
|
@@ -1602,42 +1511,38 @@ var JBrowse1TextSearchAdapter = /*#__PURE__*/function (_BaseAdapter) {
|
|
|
1602
1511
|
switch (_context2.prev = _context2.next) {
|
|
1603
1512
|
case 0:
|
|
1604
1513
|
searchType = args.searchType, queryString = args.queryString;
|
|
1514
|
+
_context2.t0 = this.tracksNames;
|
|
1605
1515
|
|
|
1606
|
-
if (
|
|
1607
|
-
_context2.next =
|
|
1516
|
+
if (_context2.t0) {
|
|
1517
|
+
_context2.next = 6;
|
|
1608
1518
|
break;
|
|
1609
1519
|
}
|
|
1610
1520
|
|
|
1611
|
-
_context2.
|
|
1612
|
-
_context2.next = 8;
|
|
1613
|
-
break;
|
|
1614
|
-
|
|
1615
|
-
case 5:
|
|
1616
|
-
_context2.next = 7;
|
|
1521
|
+
_context2.next = 5;
|
|
1617
1522
|
return this.httpMap.getTrackNames();
|
|
1618
1523
|
|
|
1619
|
-
case
|
|
1524
|
+
case 5:
|
|
1620
1525
|
_context2.t0 = _context2.sent;
|
|
1621
1526
|
|
|
1622
|
-
case
|
|
1527
|
+
case 6:
|
|
1623
1528
|
tracks = _context2.t0;
|
|
1624
|
-
_context2.next =
|
|
1625
|
-
return this.loadIndexFile(queryString);
|
|
1529
|
+
_context2.next = 9;
|
|
1530
|
+
return this.loadIndexFile(queryString.toLowerCase());
|
|
1626
1531
|
|
|
1627
|
-
case
|
|
1532
|
+
case 9:
|
|
1628
1533
|
entries = _context2.sent;
|
|
1629
1534
|
|
|
1630
|
-
if (!
|
|
1631
|
-
_context2.next =
|
|
1535
|
+
if (!entries[queryString]) {
|
|
1536
|
+
_context2.next = 12;
|
|
1632
1537
|
break;
|
|
1633
1538
|
}
|
|
1634
1539
|
|
|
1635
|
-
return _context2.abrupt("return", this.formatResults(entries[queryString]
|
|
1540
|
+
return _context2.abrupt("return", this.formatResults(entries[queryString], tracks, searchType));
|
|
1636
1541
|
|
|
1637
|
-
case
|
|
1542
|
+
case 12:
|
|
1638
1543
|
return _context2.abrupt("return", []);
|
|
1639
1544
|
|
|
1640
|
-
case
|
|
1545
|
+
case 13:
|
|
1641
1546
|
case "end":
|
|
1642
1547
|
return _context2.stop();
|
|
1643
1548
|
}
|
|
@@ -1653,41 +1558,30 @@ var JBrowse1TextSearchAdapter = /*#__PURE__*/function (_BaseAdapter) {
|
|
|
1653
1558
|
}()
|
|
1654
1559
|
}, {
|
|
1655
1560
|
key: "formatResults",
|
|
1656
|
-
value: function formatResults(results,
|
|
1657
|
-
|
|
1658
|
-
return
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
var formattedResults = results.map(function (result) {
|
|
1662
|
-
if (result && Array.isArray(result)) {
|
|
1663
|
-
var name = result[0];
|
|
1664
|
-
var trackIndex = result[1];
|
|
1665
|
-
var refName = result[3];
|
|
1666
|
-
var start = result[4];
|
|
1667
|
-
var end = result[5];
|
|
1668
|
-
var locstring = "".concat(refName || name, ":").concat(start, "-").concat(end);
|
|
1669
|
-
var formattedResult = new LocStringResult({
|
|
1670
|
-
locString: locstring,
|
|
1671
|
-
label: name,
|
|
1672
|
-
matchedAttribute: 'name',
|
|
1673
|
-
matchedObject: result,
|
|
1674
|
-
trackId: tracksNames[trackIndex]
|
|
1675
|
-
});
|
|
1676
|
-
return formattedResult;
|
|
1677
|
-
} // {"name":"too many matches","hitLimit":1}
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
var defaultLabel = _typeof(result) === 'object' ? result.name : result;
|
|
1681
|
-
var defaultResult = new BaseResult({
|
|
1682
|
-
label: defaultLabel,
|
|
1561
|
+
value: function formatResults(results, tracks, searchType) {
|
|
1562
|
+
return [].concat(_toConsumableArray(searchType === 'exact' ? [] : results.prefix.map(function (result) {
|
|
1563
|
+
return new BaseResult({
|
|
1564
|
+
label: _typeof(result) === 'object' ? result.name : result,
|
|
1683
1565
|
matchedAttribute: 'name',
|
|
1684
1566
|
matchedObject: {
|
|
1685
1567
|
result: result
|
|
1686
1568
|
}
|
|
1687
1569
|
});
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
|
|
1570
|
+
})), _toConsumableArray(results.exact.map(function (result) {
|
|
1571
|
+
var name = result[0];
|
|
1572
|
+
var trackIndex = result[1];
|
|
1573
|
+
var refName = result[3];
|
|
1574
|
+
var start = result[4];
|
|
1575
|
+
var end = result[5];
|
|
1576
|
+
var locstring = "".concat(refName || name, ":").concat(start, "-").concat(end);
|
|
1577
|
+
return new BaseResult({
|
|
1578
|
+
locString: locstring,
|
|
1579
|
+
label: name,
|
|
1580
|
+
matchedAttribute: 'name',
|
|
1581
|
+
matchedObject: result,
|
|
1582
|
+
trackId: tracks[trackIndex]
|
|
1583
|
+
});
|
|
1584
|
+
}))).filter(function (result) {
|
|
1691
1585
|
return result.getLabel() !== 'too many matches';
|
|
1692
1586
|
});
|
|
1693
1587
|
}
|
|
@@ -1704,7 +1598,8 @@ var jbrowse1AdapterConfigSchema = /*#__PURE__*/ConfigurationSchema('JBrowse1Text
|
|
|
1704
1598
|
namesIndexLocation: {
|
|
1705
1599
|
type: 'fileLocation',
|
|
1706
1600
|
defaultValue: {
|
|
1707
|
-
uri: '/volvox/names'
|
|
1601
|
+
uri: '/volvox/names',
|
|
1602
|
+
locationType: 'UriLocation'
|
|
1708
1603
|
},
|
|
1709
1604
|
description: 'the location of the JBrowse1 names index data directory'
|
|
1710
1605
|
},
|
|
@@ -1713,7 +1608,7 @@ var jbrowse1AdapterConfigSchema = /*#__PURE__*/ConfigurationSchema('JBrowse1Text
|
|
|
1713
1608
|
defaultValue: [],
|
|
1714
1609
|
description: 'List of tracks covered by text search adapter'
|
|
1715
1610
|
},
|
|
1716
|
-
|
|
1611
|
+
assemblyNames: {
|
|
1717
1612
|
type: 'stringArray',
|
|
1718
1613
|
defaultValue: [],
|
|
1719
1614
|
description: 'List of assemblies covered by text search adapter'
|
|
@@ -1727,7 +1622,8 @@ var jbrowse1ConfigSchema = /*#__PURE__*/ConfigurationSchema('JBrowse1Connection'
|
|
|
1727
1622
|
dataDirLocation: {
|
|
1728
1623
|
type: 'fileLocation',
|
|
1729
1624
|
defaultValue: {
|
|
1730
|
-
uri: 'http://mysite.com/jbrowse/data/'
|
|
1625
|
+
uri: 'http://mysite.com/jbrowse/data/',
|
|
1626
|
+
locationType: 'UriLocation'
|
|
1731
1627
|
},
|
|
1732
1628
|
description: 'the location of the JBrowse 1 data directory, often something like http://mysite.com/jbrowse/data/'
|
|
1733
1629
|
},
|
|
@@ -1947,10 +1843,10 @@ function parse(text, url) {
|
|
|
1947
1843
|
parsedValue = JSON.parse(match[1]);
|
|
1948
1844
|
} // parse numbers if it looks numeric
|
|
1949
1845
|
else if (/^[+-]?[\d.,]+([eE][-+]?\d+)?$/.test(value)) {
|
|
1950
|
-
|
|
1951
|
-
|
|
1952
|
-
|
|
1953
|
-
|
|
1846
|
+
parsedValue = parseFloat(value.replace(/,/g, ''));
|
|
1847
|
+
} else {
|
|
1848
|
+
parsedValue = value;
|
|
1849
|
+
}
|
|
1954
1850
|
|
|
1955
1851
|
if (!keyPath) {
|
|
1956
1852
|
throw new Error("Error parsing in section ".concat(section.join(' - ')));
|
|
@@ -2006,33 +1902,33 @@ function parse(text, url) {
|
|
|
2006
1902
|
}
|
|
2007
1903
|
} // new value
|
|
2008
1904
|
else if (match = line.match(value === undefined ? /^([^+=]+)(\+?=)(.*)/ : /^(\S[^+=]+)(\+?=)(.*)/)) {
|
|
2009
|
-
|
|
2010
|
-
|
|
2011
|
-
|
|
1905
|
+
recordVal();
|
|
1906
|
+
keyPath = match[1].trim().split(/\s*\.\s*/);
|
|
1907
|
+
var _match = match;
|
|
2012
1908
|
|
|
2013
|
-
|
|
1909
|
+
var _match2 = _slicedToArray(_match, 3);
|
|
2014
1910
|
|
|
2015
|
-
|
|
1911
|
+
operation = _match2[2];
|
|
2016
1912
|
|
|
2017
|
-
|
|
2018
|
-
|
|
2019
|
-
|
|
1913
|
+
if (isAlwaysArray(section.concat(keyPath).join('.'))) {
|
|
1914
|
+
operation = '+=';
|
|
1915
|
+
}
|
|
2020
1916
|
|
|
2021
|
-
|
|
2022
|
-
|
|
2023
|
-
|
|
2024
|
-
|
|
2025
|
-
|
|
2026
|
-
|
|
2027
|
-
|
|
2028
|
-
|
|
2029
|
-
|
|
2030
|
-
|
|
2031
|
-
|
|
2032
|
-
|
|
2033
|
-
|
|
2034
|
-
|
|
2035
|
-
|
|
1917
|
+
value = match[3].trim();
|
|
1918
|
+
} // add to existing array value
|
|
1919
|
+
else if (keyPath !== undefined && (match = line.match(/^\s{0,4}\+\s*(.+)/))) {
|
|
1920
|
+
recordVal();
|
|
1921
|
+
operation = '+=';
|
|
1922
|
+
value = match[1].trim();
|
|
1923
|
+
} // add to existing value
|
|
1924
|
+
else if (value !== undefined && (match = line.match(/^\s+(\S.*)/))) {
|
|
1925
|
+
value += value.length ? " ".concat(match[1].trim()) : match[1].trim();
|
|
1926
|
+
} // done with last value
|
|
1927
|
+
else {
|
|
1928
|
+
recordVal();
|
|
1929
|
+
keyPath = undefined;
|
|
1930
|
+
value = undefined;
|
|
1931
|
+
}
|
|
2036
1932
|
});
|
|
2037
1933
|
recordVal();
|
|
2038
1934
|
return data;
|
|
@@ -2054,23 +1950,23 @@ function regularizeConf(conf, url) {
|
|
|
2054
1950
|
conf.tracks = [conf.tracks];
|
|
2055
1951
|
} // otherwise, coerce it to an array
|
|
2056
1952
|
else {
|
|
2057
|
-
|
|
1953
|
+
var tracks = [];
|
|
2058
1954
|
|
|
2059
|
-
|
|
2060
|
-
|
|
2061
|
-
|
|
1955
|
+
for (var _i = 0, _Object$keys = Object.keys(conf.tracks); _i < _Object$keys.length; _i++) {
|
|
1956
|
+
var label = _Object$keys[_i];
|
|
1957
|
+
var track = conf.tracks[label];
|
|
2062
1958
|
|
|
2063
|
-
|
|
2064
|
-
|
|
2065
|
-
|
|
2066
|
-
|
|
2067
|
-
|
|
2068
|
-
|
|
2069
|
-
}
|
|
1959
|
+
if (isTrack(track)) {
|
|
1960
|
+
tracks.push(track);
|
|
1961
|
+
} else {
|
|
1962
|
+
tracks.push(_objectSpread2({
|
|
1963
|
+
label: label
|
|
1964
|
+
}, track));
|
|
2070
1965
|
}
|
|
2071
|
-
|
|
2072
|
-
conf.tracks = tracks;
|
|
2073
1966
|
}
|
|
1967
|
+
|
|
1968
|
+
conf.tracks = tracks;
|
|
1969
|
+
}
|
|
2074
1970
|
} // regularize trackMetadata.sources
|
|
2075
1971
|
|
|
2076
1972
|
|
|
@@ -2371,13 +2267,15 @@ function _fetchJb() {
|
|
|
2371
2267
|
switch (_context.prev = _context.next) {
|
|
2372
2268
|
case 0:
|
|
2373
2269
|
dataRoot = _args.length > 0 && _args[0] !== undefined ? _args[0] : {
|
|
2374
|
-
uri: ''
|
|
2270
|
+
uri: '',
|
|
2271
|
+
locationType: 'UriLocation'
|
|
2375
2272
|
};
|
|
2376
2273
|
baseConfig = _args.length > 1 && _args[1] !== undefined ? _args[1] : {
|
|
2377
2274
|
include: ['{dataRoot}/trackList.json', '{dataRoot}/tracks.conf']
|
|
2378
2275
|
};
|
|
2379
2276
|
baseConfigRoot = _args.length > 2 && _args[2] !== undefined ? _args[2] : {
|
|
2380
|
-
uri: ''
|
|
2277
|
+
uri: '',
|
|
2278
|
+
locationType: 'UriLocation'
|
|
2381
2279
|
};
|
|
2382
2280
|
protocol = 'uri' in dataRoot ? 'uri' : 'localPath';
|
|
2383
2281
|
dataRootReg = JSON.parse(JSON.stringify(dataRoot));
|
|
@@ -2700,7 +2598,8 @@ function _loadIncludes() {
|
|
|
2700
2598
|
include.cacheBuster = inputConfig.cacheBuster;
|
|
2701
2599
|
_context4.next = 3;
|
|
2702
2600
|
return fetchConfigFile({
|
|
2703
|
-
uri: new URL(include.url, sourceUrl).href
|
|
2601
|
+
uri: new URL(include.url, sourceUrl).href,
|
|
2602
|
+
locationType: 'UriLocation'
|
|
2704
2603
|
});
|
|
2705
2604
|
|
|
2706
2605
|
case 3:
|
|
@@ -2906,27 +2805,31 @@ function convertTrackConfig(jb1TrackConfig, dataRoot, sequenceAdapter) {
|
|
|
2906
2805
|
var adapter = {
|
|
2907
2806
|
type: 'BamAdapter',
|
|
2908
2807
|
bamLocation: {
|
|
2909
|
-
uri: urlTemplate
|
|
2808
|
+
uri: urlTemplate,
|
|
2809
|
+
locationType: 'UriLocation'
|
|
2910
2810
|
}
|
|
2911
2811
|
};
|
|
2912
2812
|
|
|
2913
2813
|
if (jb1TrackConfig.baiUrlTemplate) {
|
|
2914
2814
|
adapter.index = {
|
|
2915
2815
|
location: {
|
|
2916
|
-
uri: resolveUrlTemplate(jb1TrackConfig.baiUrlTemplate)
|
|
2816
|
+
uri: resolveUrlTemplate(jb1TrackConfig.baiUrlTemplate),
|
|
2817
|
+
locationType: 'UriLocation'
|
|
2917
2818
|
}
|
|
2918
2819
|
};
|
|
2919
2820
|
} else if (jb1TrackConfig.csiUrlTemplate) {
|
|
2920
2821
|
adapter.index = {
|
|
2921
2822
|
location: {
|
|
2922
|
-
uri: resolveUrlTemplate(jb1TrackConfig.csiUrlTemplate)
|
|
2823
|
+
uri: resolveUrlTemplate(jb1TrackConfig.csiUrlTemplate),
|
|
2824
|
+
locationType: 'UriLocation'
|
|
2923
2825
|
},
|
|
2924
2826
|
indexType: 'CSI'
|
|
2925
2827
|
};
|
|
2926
2828
|
} else {
|
|
2927
2829
|
adapter.index = {
|
|
2928
2830
|
location: {
|
|
2929
|
-
uri: "".concat(urlTemplate, ".bai")
|
|
2831
|
+
uri: "".concat(urlTemplate, ".bai"),
|
|
2832
|
+
locationType: 'UriLocation'
|
|
2930
2833
|
}
|
|
2931
2834
|
};
|
|
2932
2835
|
}
|
|
@@ -2941,18 +2844,21 @@ function convertTrackConfig(jb1TrackConfig, dataRoot, sequenceAdapter) {
|
|
|
2941
2844
|
var _adapter = {
|
|
2942
2845
|
type: 'CramAdapter',
|
|
2943
2846
|
cramLocation: {
|
|
2944
|
-
uri: urlTemplate
|
|
2847
|
+
uri: urlTemplate,
|
|
2848
|
+
locationType: 'UriLocation'
|
|
2945
2849
|
},
|
|
2946
2850
|
sequenceAdapter: sequenceAdapter
|
|
2947
2851
|
};
|
|
2948
2852
|
|
|
2949
2853
|
if (jb1TrackConfig.craiUrlTemplate) {
|
|
2950
2854
|
_adapter.craiLocation = {
|
|
2951
|
-
uri: resolveUrlTemplate(jb1TrackConfig.craiUrlTemplate)
|
|
2855
|
+
uri: resolveUrlTemplate(jb1TrackConfig.craiUrlTemplate),
|
|
2856
|
+
locationType: 'UriLocation'
|
|
2952
2857
|
};
|
|
2953
2858
|
} else {
|
|
2954
2859
|
_adapter.craiLocation = {
|
|
2955
|
-
uri: "".concat(urlTemplate, ".crai")
|
|
2860
|
+
uri: "".concat(urlTemplate, ".crai"),
|
|
2861
|
+
locationType: 'UriLocation'
|
|
2956
2862
|
};
|
|
2957
2863
|
}
|
|
2958
2864
|
|
|
@@ -2968,7 +2874,8 @@ function convertTrackConfig(jb1TrackConfig, dataRoot, sequenceAdapter) {
|
|
|
2968
2874
|
adapter: {
|
|
2969
2875
|
type: 'NCListAdapter',
|
|
2970
2876
|
rootUrlTemplate: {
|
|
2971
|
-
uri: urlTemplate
|
|
2877
|
+
uri: urlTemplate,
|
|
2878
|
+
locationType: 'UriLocation'
|
|
2972
2879
|
}
|
|
2973
2880
|
}
|
|
2974
2881
|
});
|
|
@@ -2986,7 +2893,8 @@ function convertTrackConfig(jb1TrackConfig, dataRoot, sequenceAdapter) {
|
|
|
2986
2893
|
adapter: {
|
|
2987
2894
|
type: 'BigWigAdapter',
|
|
2988
2895
|
bigWigLocation: {
|
|
2989
|
-
uri: urlTemplate
|
|
2896
|
+
uri: urlTemplate,
|
|
2897
|
+
locationType: 'UriLocation'
|
|
2990
2898
|
}
|
|
2991
2899
|
}
|
|
2992
2900
|
});
|
|
@@ -2996,27 +2904,31 @@ function convertTrackConfig(jb1TrackConfig, dataRoot, sequenceAdapter) {
|
|
|
2996
2904
|
var _adapter2 = {
|
|
2997
2905
|
type: 'VcfTabixAdapter',
|
|
2998
2906
|
vcfGzLocation: {
|
|
2999
|
-
uri: urlTemplate
|
|
2907
|
+
uri: urlTemplate,
|
|
2908
|
+
locationType: 'UriLocation'
|
|
3000
2909
|
}
|
|
3001
2910
|
};
|
|
3002
2911
|
|
|
3003
2912
|
if (jb1TrackConfig.tbiUrlTemplate) {
|
|
3004
2913
|
_adapter2.index = {
|
|
3005
2914
|
location: {
|
|
3006
|
-
uri: resolveUrlTemplate(jb1TrackConfig.tbiUrlTemplate)
|
|
2915
|
+
uri: resolveUrlTemplate(jb1TrackConfig.tbiUrlTemplate),
|
|
2916
|
+
locationType: 'UriLocation'
|
|
3007
2917
|
}
|
|
3008
2918
|
};
|
|
3009
2919
|
} else if (jb1TrackConfig.csiUrlTemplate) {
|
|
3010
2920
|
_adapter2.index = {
|
|
3011
2921
|
location: {
|
|
3012
|
-
uri: resolveUrlTemplate(jb1TrackConfig.csiUrlTemplate)
|
|
2922
|
+
uri: resolveUrlTemplate(jb1TrackConfig.csiUrlTemplate),
|
|
2923
|
+
locationType: 'UriLocation'
|
|
3013
2924
|
},
|
|
3014
2925
|
indexType: 'CSI'
|
|
3015
2926
|
};
|
|
3016
2927
|
} else {
|
|
3017
2928
|
_adapter2.index = {
|
|
3018
2929
|
location: {
|
|
3019
|
-
uri: "".concat(urlTemplate, ".tbi")
|
|
2930
|
+
uri: "".concat(urlTemplate, ".tbi"),
|
|
2931
|
+
locationType: 'UriLocation'
|
|
3020
2932
|
}
|
|
3021
2933
|
};
|
|
3022
2934
|
}
|
|
@@ -3041,7 +2953,8 @@ function convertTrackConfig(jb1TrackConfig, dataRoot, sequenceAdapter) {
|
|
|
3041
2953
|
adapter: {
|
|
3042
2954
|
type: 'BigBedAdapter',
|
|
3043
2955
|
bigBedLocation: {
|
|
3044
|
-
uri: urlTemplate
|
|
2956
|
+
uri: urlTemplate,
|
|
2957
|
+
locationType: 'UriLocation'
|
|
3045
2958
|
}
|
|
3046
2959
|
}
|
|
3047
2960
|
});
|
|
@@ -3051,27 +2964,31 @@ function convertTrackConfig(jb1TrackConfig, dataRoot, sequenceAdapter) {
|
|
|
3051
2964
|
var _adapter3 = {
|
|
3052
2965
|
type: 'Gff3TabixAdapter',
|
|
3053
2966
|
gffGzLocation: {
|
|
3054
|
-
uri: urlTemplate
|
|
2967
|
+
uri: urlTemplate,
|
|
2968
|
+
locationType: 'UriLocation'
|
|
3055
2969
|
}
|
|
3056
2970
|
};
|
|
3057
2971
|
|
|
3058
2972
|
if (jb1TrackConfig.tbiUrlTemplate) {
|
|
3059
2973
|
_adapter3.index = {
|
|
3060
2974
|
location: {
|
|
3061
|
-
uri: resolveUrlTemplate(jb1TrackConfig.tbiUrlTemplate)
|
|
2975
|
+
uri: resolveUrlTemplate(jb1TrackConfig.tbiUrlTemplate),
|
|
2976
|
+
locationType: 'UriLocation'
|
|
3062
2977
|
}
|
|
3063
2978
|
};
|
|
3064
2979
|
} else if (jb1TrackConfig.csiUrlTemplate) {
|
|
3065
2980
|
_adapter3.index = {
|
|
3066
2981
|
location: {
|
|
3067
|
-
uri: resolveUrlTemplate(jb1TrackConfig.csiUrlTemplate)
|
|
2982
|
+
uri: resolveUrlTemplate(jb1TrackConfig.csiUrlTemplate),
|
|
2983
|
+
locationType: 'UriLocation'
|
|
3068
2984
|
},
|
|
3069
2985
|
indexType: 'CSI'
|
|
3070
2986
|
};
|
|
3071
2987
|
} else {
|
|
3072
2988
|
_adapter3.index = {
|
|
3073
2989
|
location: {
|
|
3074
|
-
uri: "".concat(urlTemplate, ".tbi")
|
|
2990
|
+
uri: "".concat(urlTemplate, ".tbi"),
|
|
2991
|
+
locationType: 'UriLocation'
|
|
3075
2992
|
}
|
|
3076
2993
|
};
|
|
3077
2994
|
}
|
|
@@ -3090,27 +3007,31 @@ function convertTrackConfig(jb1TrackConfig, dataRoot, sequenceAdapter) {
|
|
|
3090
3007
|
var _adapter4 = {
|
|
3091
3008
|
type: 'BedTabixAdapter',
|
|
3092
3009
|
bedGzLocation: {
|
|
3093
|
-
uri: urlTemplate
|
|
3010
|
+
uri: urlTemplate,
|
|
3011
|
+
locationType: 'UriLocation'
|
|
3094
3012
|
}
|
|
3095
3013
|
};
|
|
3096
3014
|
|
|
3097
3015
|
if (jb1TrackConfig.tbiUrlTemplate) {
|
|
3098
3016
|
_adapter4.index = {
|
|
3099
3017
|
location: {
|
|
3100
|
-
uri: resolveUrlTemplate(jb1TrackConfig.tbiUrlTemplate)
|
|
3018
|
+
uri: resolveUrlTemplate(jb1TrackConfig.tbiUrlTemplate),
|
|
3019
|
+
locationType: 'UriLocation'
|
|
3101
3020
|
}
|
|
3102
3021
|
};
|
|
3103
3022
|
} else if (jb1TrackConfig.csiUrlTemplate) {
|
|
3104
3023
|
_adapter4.index = {
|
|
3105
3024
|
location: {
|
|
3106
|
-
uri: resolveUrlTemplate(jb1TrackConfig.csiUrlTemplate)
|
|
3025
|
+
uri: resolveUrlTemplate(jb1TrackConfig.csiUrlTemplate),
|
|
3026
|
+
locationType: 'UriLocation'
|
|
3107
3027
|
},
|
|
3108
3028
|
indexType: 'CSI'
|
|
3109
3029
|
};
|
|
3110
3030
|
} else {
|
|
3111
3031
|
_adapter4.index = {
|
|
3112
3032
|
location: {
|
|
3113
|
-
uri: "".concat(urlTemplate, ".tbi")
|
|
3033
|
+
uri: "".concat(urlTemplate, ".tbi"),
|
|
3034
|
+
locationType: 'UriLocation'
|
|
3114
3035
|
}
|
|
3115
3036
|
};
|
|
3116
3037
|
}
|
|
@@ -3137,17 +3058,20 @@ function convertTrackConfig(jb1TrackConfig, dataRoot, sequenceAdapter) {
|
|
|
3137
3058
|
var _adapter5 = {
|
|
3138
3059
|
type: 'IndexedFastaAdapter',
|
|
3139
3060
|
fastaLocation: {
|
|
3140
|
-
uri: urlTemplate
|
|
3061
|
+
uri: urlTemplate,
|
|
3062
|
+
locationType: 'UriLocation'
|
|
3141
3063
|
}
|
|
3142
3064
|
};
|
|
3143
3065
|
|
|
3144
3066
|
if (jb1TrackConfig.faiUrlTemplate) {
|
|
3145
3067
|
_adapter5.faiLocation = {
|
|
3146
|
-
uri: resolveUrlTemplate(jb1TrackConfig.faiUrlTemplate)
|
|
3068
|
+
uri: resolveUrlTemplate(jb1TrackConfig.faiUrlTemplate),
|
|
3069
|
+
locationType: 'UriLocation'
|
|
3147
3070
|
};
|
|
3148
3071
|
} else {
|
|
3149
3072
|
_adapter5.faiLocation = {
|
|
3150
|
-
uri: "".concat(urlTemplate, ".fai")
|
|
3073
|
+
uri: "".concat(urlTemplate, ".fai"),
|
|
3074
|
+
locationType: 'UriLocation'
|
|
3151
3075
|
};
|
|
3152
3076
|
}
|
|
3153
3077
|
|
|
@@ -3161,27 +3085,32 @@ function convertTrackConfig(jb1TrackConfig, dataRoot, sequenceAdapter) {
|
|
|
3161
3085
|
var _adapter6 = {
|
|
3162
3086
|
type: 'BgzipFastaAdapter',
|
|
3163
3087
|
fastaLocation: {
|
|
3164
|
-
uri: urlTemplate
|
|
3088
|
+
uri: urlTemplate,
|
|
3089
|
+
locationType: 'UriLocation'
|
|
3165
3090
|
}
|
|
3166
3091
|
};
|
|
3167
3092
|
|
|
3168
3093
|
if (jb1TrackConfig.faiUrlTemplate) {
|
|
3169
3094
|
_adapter6.faiLocation = {
|
|
3170
|
-
uri: resolveUrlTemplate(jb1TrackConfig.faiUrlTemplate)
|
|
3095
|
+
uri: resolveUrlTemplate(jb1TrackConfig.faiUrlTemplate),
|
|
3096
|
+
locationType: 'UriLocation'
|
|
3171
3097
|
};
|
|
3172
3098
|
} else {
|
|
3173
3099
|
_adapter6.faiLocation = {
|
|
3174
|
-
uri: "".concat(urlTemplate, ".fai")
|
|
3100
|
+
uri: "".concat(urlTemplate, ".fai"),
|
|
3101
|
+
locationType: 'UriLocation'
|
|
3175
3102
|
};
|
|
3176
3103
|
}
|
|
3177
3104
|
|
|
3178
3105
|
if (jb1TrackConfig.gziUrlTemplate) {
|
|
3179
3106
|
_adapter6.gziLocation = {
|
|
3180
|
-
uri: resolveUrlTemplate(jb1TrackConfig.gziUrlTemplate)
|
|
3107
|
+
uri: resolveUrlTemplate(jb1TrackConfig.gziUrlTemplate),
|
|
3108
|
+
locationType: 'UriLocation'
|
|
3181
3109
|
};
|
|
3182
3110
|
} else {
|
|
3183
3111
|
_adapter6.gziLocation = {
|
|
3184
|
-
uri: "".concat(urlTemplate, ".gzi")
|
|
3112
|
+
uri: "".concat(urlTemplate, ".gzi"),
|
|
3113
|
+
locationType: 'UriLocation'
|
|
3185
3114
|
};
|
|
3186
3115
|
}
|
|
3187
3116
|
|
|
@@ -3197,7 +3126,8 @@ function convertTrackConfig(jb1TrackConfig, dataRoot, sequenceAdapter) {
|
|
|
3197
3126
|
adapter: {
|
|
3198
3127
|
type: 'TwoBitAdapter',
|
|
3199
3128
|
twoBitLocation: {
|
|
3200
|
-
uri: urlTemplate
|
|
3129
|
+
uri: urlTemplate,
|
|
3130
|
+
locationType: 'UriLocation'
|
|
3201
3131
|
}
|
|
3202
3132
|
}
|
|
3203
3133
|
});
|
|
@@ -3206,10 +3136,9 @@ function convertTrackConfig(jb1TrackConfig, dataRoot, sequenceAdapter) {
|
|
|
3206
3136
|
|
|
3207
3137
|
|
|
3208
3138
|
jb2TrackConfig.adapter = guessAdapter({
|
|
3209
|
-
uri: urlTemplate
|
|
3210
|
-
|
|
3211
|
-
|
|
3212
|
-
});
|
|
3139
|
+
uri: urlTemplate,
|
|
3140
|
+
locationType: 'UriLocation'
|
|
3141
|
+
}, undefined, urlTemplate);
|
|
3213
3142
|
|
|
3214
3143
|
if (!jb2TrackConfig.adapter) {
|
|
3215
3144
|
throw new Error('Could not determine adapter');
|
|
@@ -3317,6 +3246,22 @@ var LegacyJBrowsePlugin = /*#__PURE__*/function (_Plugin) {
|
|
|
3317
3246
|
}
|
|
3318
3247
|
});
|
|
3319
3248
|
});
|
|
3249
|
+
pluginManager.addToExtensionPoint('Core-guessAdapterForLocation', function (adapterGuesser) {
|
|
3250
|
+
return function (file, index, adapterHint) {
|
|
3251
|
+
var regexGuess = /trackData.jsonz?$/i;
|
|
3252
|
+
var adapterName = 'NCListAdapter';
|
|
3253
|
+
var fileName = getFileName(file);
|
|
3254
|
+
|
|
3255
|
+
if (regexGuess.test(fileName) || adapterHint === adapterName) {
|
|
3256
|
+
return {
|
|
3257
|
+
type: adapterName,
|
|
3258
|
+
rootUrlTemplate: file
|
|
3259
|
+
};
|
|
3260
|
+
}
|
|
3261
|
+
|
|
3262
|
+
return adapterGuesser(file, index, adapterHint);
|
|
3263
|
+
};
|
|
3264
|
+
});
|
|
3320
3265
|
pluginManager.addTextSearchAdapterType(function () {
|
|
3321
3266
|
return new TextSearchAdapterType({
|
|
3322
3267
|
name: 'JBrowse1TextSearchAdapter',
|
|
@@ -3472,12 +3417,12 @@ var NCListAdapter = /*#__PURE__*/function (_BaseFeatureDataAdapt) {
|
|
|
3472
3417
|
|
|
3473
3418
|
var _super = /*#__PURE__*/_createSuper(NCListAdapter);
|
|
3474
3419
|
|
|
3475
|
-
function NCListAdapter(config) {
|
|
3420
|
+
function NCListAdapter(config, getSubAdapter, pluginManager) {
|
|
3476
3421
|
var _this;
|
|
3477
3422
|
|
|
3478
3423
|
_classCallCheck(this, NCListAdapter);
|
|
3479
3424
|
|
|
3480
|
-
_this = _super.call(this, config);
|
|
3425
|
+
_this = _super.call(this, config, getSubAdapter, pluginManager);
|
|
3481
3426
|
var refNames = readConfObject(config, 'refNames');
|
|
3482
3427
|
var rootUrlTemplate = readConfObject(config, 'rootUrlTemplate');
|
|
3483
3428
|
_this.configRefNames = refNames;
|
|
@@ -3485,7 +3430,7 @@ var NCListAdapter = /*#__PURE__*/function (_BaseFeatureDataAdapt) {
|
|
|
3485
3430
|
baseUrl: '',
|
|
3486
3431
|
urlTemplate: rootUrlTemplate.uri,
|
|
3487
3432
|
readFile: function readFile(url) {
|
|
3488
|
-
return
|
|
3433
|
+
return new RemoteFile(String(rootUrlTemplate.baseUri ? new URL(url, rootUrlTemplate.baseUri).toString() : url)).readFile();
|
|
3489
3434
|
}
|
|
3490
3435
|
});
|
|
3491
3436
|
return _this;
|
|
@@ -3508,14 +3453,14 @@ var NCListAdapter = /*#__PURE__*/function (_BaseFeatureDataAdapt) {
|
|
|
3508
3453
|
var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
3509
3454
|
return ObservableCreate( /*#__PURE__*/function () {
|
|
3510
3455
|
var _ref = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee(observer) {
|
|
3511
|
-
var signal,
|
|
3456
|
+
var signal, _iteratorAbruptCompletion, _didIteratorError, _iteratorError, _iterator, _step, feature;
|
|
3512
3457
|
|
|
3513
3458
|
return runtime_1.wrap(function _callee$(_context) {
|
|
3514
3459
|
while (1) {
|
|
3515
3460
|
switch (_context.prev = _context.next) {
|
|
3516
3461
|
case 0:
|
|
3517
3462
|
signal = opts.signal;
|
|
3518
|
-
|
|
3463
|
+
_iteratorAbruptCompletion = false;
|
|
3519
3464
|
_didIteratorError = false;
|
|
3520
3465
|
_context.prev = 3;
|
|
3521
3466
|
_iterator = _asyncIterator(_this2.nclist.getFeatures(region, opts));
|
|
@@ -3525,75 +3470,67 @@ var NCListAdapter = /*#__PURE__*/function (_BaseFeatureDataAdapt) {
|
|
|
3525
3470
|
return _iterator.next();
|
|
3526
3471
|
|
|
3527
3472
|
case 7:
|
|
3528
|
-
_step = _context.sent
|
|
3529
|
-
|
|
3530
|
-
_context.next = 11;
|
|
3531
|
-
return _step.value;
|
|
3532
|
-
|
|
3533
|
-
case 11:
|
|
3534
|
-
_value = _context.sent;
|
|
3535
|
-
|
|
3536
|
-
if (_iteratorNormalCompletion) {
|
|
3537
|
-
_context.next = 19;
|
|
3473
|
+
if (!(_iteratorAbruptCompletion = !(_step = _context.sent).done)) {
|
|
3474
|
+
_context.next = 14;
|
|
3538
3475
|
break;
|
|
3539
3476
|
}
|
|
3540
3477
|
|
|
3541
|
-
feature =
|
|
3478
|
+
feature = _step.value;
|
|
3542
3479
|
checkAbortSignal(signal);
|
|
3543
3480
|
observer.next(_this2.wrapFeature(feature));
|
|
3544
3481
|
|
|
3545
|
-
case
|
|
3546
|
-
|
|
3482
|
+
case 11:
|
|
3483
|
+
_iteratorAbruptCompletion = false;
|
|
3547
3484
|
_context.next = 5;
|
|
3548
3485
|
break;
|
|
3549
3486
|
|
|
3550
|
-
case
|
|
3551
|
-
_context.next =
|
|
3487
|
+
case 14:
|
|
3488
|
+
_context.next = 20;
|
|
3552
3489
|
break;
|
|
3553
3490
|
|
|
3554
|
-
case
|
|
3555
|
-
_context.prev =
|
|
3491
|
+
case 16:
|
|
3492
|
+
_context.prev = 16;
|
|
3556
3493
|
_context.t0 = _context["catch"](3);
|
|
3557
3494
|
_didIteratorError = true;
|
|
3558
3495
|
_iteratorError = _context.t0;
|
|
3559
3496
|
|
|
3560
|
-
case
|
|
3561
|
-
_context.prev =
|
|
3562
|
-
_context.prev =
|
|
3497
|
+
case 20:
|
|
3498
|
+
_context.prev = 20;
|
|
3499
|
+
_context.prev = 21;
|
|
3563
3500
|
|
|
3564
|
-
if (!(
|
|
3565
|
-
_context.next =
|
|
3501
|
+
if (!(_iteratorAbruptCompletion && _iterator["return"] != null)) {
|
|
3502
|
+
_context.next = 25;
|
|
3566
3503
|
break;
|
|
3567
3504
|
}
|
|
3568
3505
|
|
|
3569
|
-
_context.next =
|
|
3506
|
+
_context.next = 25;
|
|
3570
3507
|
return _iterator["return"]();
|
|
3571
3508
|
|
|
3572
|
-
case
|
|
3573
|
-
_context.prev =
|
|
3509
|
+
case 25:
|
|
3510
|
+
_context.prev = 25;
|
|
3574
3511
|
|
|
3575
3512
|
if (!_didIteratorError) {
|
|
3576
|
-
_context.next =
|
|
3513
|
+
_context.next = 28;
|
|
3577
3514
|
break;
|
|
3578
3515
|
}
|
|
3579
3516
|
|
|
3580
3517
|
throw _iteratorError;
|
|
3581
3518
|
|
|
3582
|
-
case
|
|
3583
|
-
return _context.finish(30);
|
|
3584
|
-
|
|
3585
|
-
case 34:
|
|
3519
|
+
case 28:
|
|
3586
3520
|
return _context.finish(25);
|
|
3587
3521
|
|
|
3588
|
-
case
|
|
3522
|
+
case 29:
|
|
3523
|
+
return _context.finish(20);
|
|
3524
|
+
|
|
3525
|
+
case 30:
|
|
3589
3526
|
observer.complete();
|
|
3590
3527
|
|
|
3591
|
-
case
|
|
3528
|
+
case 31:
|
|
3592
3529
|
case "end":
|
|
3593
3530
|
return _context.stop();
|
|
3594
3531
|
}
|
|
3595
3532
|
}
|
|
3596
|
-
}, _callee, null, [[3,
|
|
3533
|
+
}, _callee, null, [[3, 16, 20, 30], [21,, 25, 29]]);
|
|
3597
3534
|
}));
|
|
3598
3535
|
|
|
3599
3536
|
return function (_x) {
|