@jbrowse/plugin-legacy-jbrowse 2.18.0 → 3.0.1
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/GuessNCList/index.js +6 -8
- package/dist/JBrowse1Connection/model.js +17 -7
- package/dist/JBrowse1TextSearchAdapter/HttpMap.js +1 -2
- package/dist/JBrowse1TextSearchAdapter/index.js +17 -7
- package/dist/NCListAdapter/NCListAdapter.js +2 -2
- package/dist/NCListAdapter/index.js +20 -7
- package/esm/GuessNCList/index.js +6 -8
- package/esm/JBrowse1TextSearchAdapter/HttpMap.js +1 -2
- package/esm/NCListAdapter/NCListAdapter.js +1 -1
- package/esm/NCListAdapter/index.js +3 -0
- package/package.json +8 -10
|
@@ -5,16 +5,14 @@ const tracks_1 = require("@jbrowse/core/util/tracks");
|
|
|
5
5
|
function GuessNCListF(pluginManager) {
|
|
6
6
|
pluginManager.addToExtensionPoint('Core-guessAdapterForLocation', (adapterGuesser) => {
|
|
7
7
|
return (file, index, adapterHint) => {
|
|
8
|
-
const regexGuess = /trackData.jsonz?$/i;
|
|
9
|
-
const adapterName = 'NCListAdapter';
|
|
10
8
|
const fileName = (0, tracks_1.getFileName)(file);
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
9
|
+
return (/trackData.jsonz?$/i.test(fileName) && !adapterHint) ||
|
|
10
|
+
adapterHint === 'NCListAdapter'
|
|
11
|
+
? {
|
|
12
|
+
type: 'NCListAdapter',
|
|
14
13
|
rootUrlTemplate: file,
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
return adapterGuesser(file, index, adapterHint);
|
|
14
|
+
}
|
|
15
|
+
: adapterGuesser(file, index, adapterHint);
|
|
18
16
|
};
|
|
19
17
|
});
|
|
20
18
|
}
|
|
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
15
15
|
}) : function(o, v) {
|
|
16
16
|
o["default"] = v;
|
|
17
17
|
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
};
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
25
35
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
36
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
37
|
};
|
|
@@ -3,7 +3,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const buffer_1 = require("buffer");
|
|
7
6
|
const crc32_1 = __importDefault(require("crc/crc32"));
|
|
8
7
|
class HttpMap {
|
|
9
8
|
constructor(args) {
|
|
@@ -60,7 +59,7 @@ class HttpMap {
|
|
|
60
59
|
return '';
|
|
61
60
|
}
|
|
62
61
|
hash(data) {
|
|
63
|
-
return (0, crc32_1.default)(
|
|
62
|
+
return (0, crc32_1.default)(data).toString(16).toLowerCase().replace('-', 'n');
|
|
64
63
|
}
|
|
65
64
|
}
|
|
66
65
|
exports.default = HttpMap;
|
|
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
15
15
|
}) : function(o, v) {
|
|
16
16
|
o["default"] = v;
|
|
17
17
|
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
};
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
25
35
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
36
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
37
|
};
|
|
@@ -7,7 +7,7 @@ const nclist_1 = __importDefault(require("@gmod/nclist"));
|
|
|
7
7
|
const BaseAdapter_1 = require("@jbrowse/core/data_adapters/BaseAdapter");
|
|
8
8
|
const rxjs_1 = require("@jbrowse/core/util/rxjs");
|
|
9
9
|
const stopToken_1 = require("@jbrowse/core/util/stopToken");
|
|
10
|
-
const
|
|
10
|
+
const generic_filehandle2_1 = require("generic-filehandle2");
|
|
11
11
|
const NCListFeature_1 = __importDefault(require("./NCListFeature"));
|
|
12
12
|
class NCListAdapter extends BaseAdapter_1.BaseFeatureDataAdapter {
|
|
13
13
|
constructor(config, getSubAdapter, pluginManager) {
|
|
@@ -18,7 +18,7 @@ class NCListAdapter extends BaseAdapter_1.BaseFeatureDataAdapter {
|
|
|
18
18
|
this.nclist = new nclist_1.default({
|
|
19
19
|
baseUrl: '',
|
|
20
20
|
urlTemplate: rootUrlTemplate.uri,
|
|
21
|
-
readFile: (url) => new
|
|
21
|
+
readFile: (url) => new generic_filehandle2_1.RemoteFile(String(rootUrlTemplate.baseUri
|
|
22
22
|
? new URL(url, rootUrlTemplate.baseUri).toString()
|
|
23
23
|
: url)).readFile(),
|
|
24
24
|
});
|
|
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
15
15
|
}) : function(o, v) {
|
|
16
16
|
o["default"] = v;
|
|
17
17
|
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
};
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
25
35
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
36
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
37
|
};
|
|
@@ -34,6 +44,9 @@ function NCListAdapterF(pluginManager) {
|
|
|
34
44
|
name: 'NCListAdapter',
|
|
35
45
|
displayName: 'NCList adapter',
|
|
36
46
|
configSchema: configSchema_1.default,
|
|
47
|
+
adapterMetadata: {
|
|
48
|
+
category: 'Uncommon',
|
|
49
|
+
},
|
|
37
50
|
getAdapterClass: () => Promise.resolve().then(() => __importStar(require('./NCListAdapter'))).then(r => r.default),
|
|
38
51
|
}));
|
|
39
52
|
}
|
package/esm/GuessNCList/index.js
CHANGED
|
@@ -2,16 +2,14 @@ import { getFileName } from '@jbrowse/core/util/tracks';
|
|
|
2
2
|
export default function GuessNCListF(pluginManager) {
|
|
3
3
|
pluginManager.addToExtensionPoint('Core-guessAdapterForLocation', (adapterGuesser) => {
|
|
4
4
|
return (file, index, adapterHint) => {
|
|
5
|
-
const regexGuess = /trackData.jsonz?$/i;
|
|
6
|
-
const adapterName = 'NCListAdapter';
|
|
7
5
|
const fileName = getFileName(file);
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
6
|
+
return (/trackData.jsonz?$/i.test(fileName) && !adapterHint) ||
|
|
7
|
+
adapterHint === 'NCListAdapter'
|
|
8
|
+
? {
|
|
9
|
+
type: 'NCListAdapter',
|
|
11
10
|
rootUrlTemplate: file,
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
return adapterGuesser(file, index, adapterHint);
|
|
11
|
+
}
|
|
12
|
+
: adapterGuesser(file, index, adapterHint);
|
|
15
13
|
};
|
|
16
14
|
});
|
|
17
15
|
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { Buffer } from 'buffer';
|
|
2
1
|
import crc32 from 'crc/crc32';
|
|
3
2
|
export default class HttpMap {
|
|
4
3
|
constructor(args) {
|
|
@@ -55,6 +54,6 @@ export default class HttpMap {
|
|
|
55
54
|
return '';
|
|
56
55
|
}
|
|
57
56
|
hash(data) {
|
|
58
|
-
return crc32(
|
|
57
|
+
return crc32(data).toString(16).toLowerCase().replace('-', 'n');
|
|
59
58
|
}
|
|
60
59
|
}
|
|
@@ -2,7 +2,7 @@ import NCListStore from '@gmod/nclist';
|
|
|
2
2
|
import { BaseFeatureDataAdapter } from '@jbrowse/core/data_adapters/BaseAdapter';
|
|
3
3
|
import { ObservableCreate } from '@jbrowse/core/util/rxjs';
|
|
4
4
|
import { checkStopToken } from '@jbrowse/core/util/stopToken';
|
|
5
|
-
import { RemoteFile } from 'generic-
|
|
5
|
+
import { RemoteFile } from 'generic-filehandle2';
|
|
6
6
|
import NCListFeature from './NCListFeature';
|
|
7
7
|
export default class NCListAdapter extends BaseFeatureDataAdapter {
|
|
8
8
|
constructor(config, getSubAdapter, pluginManager) {
|
|
@@ -5,6 +5,9 @@ export default function NCListAdapterF(pluginManager) {
|
|
|
5
5
|
name: 'NCListAdapter',
|
|
6
6
|
displayName: 'NCList adapter',
|
|
7
7
|
configSchema,
|
|
8
|
+
adapterMetadata: {
|
|
9
|
+
category: 'Uncommon',
|
|
10
|
+
},
|
|
8
11
|
getAdapterClass: () => import('./NCListAdapter').then(r => r.default),
|
|
9
12
|
}));
|
|
10
13
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jbrowse/plugin-legacy-jbrowse",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.1",
|
|
4
4
|
"description": "JBrowse 2 plugin for connecting to and reading JBrowse 1 data",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"jbrowse",
|
|
@@ -36,18 +36,16 @@
|
|
|
36
36
|
"clean": "rimraf dist esm *.tsbuildinfo"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@gmod/nclist": "^
|
|
39
|
+
"@gmod/nclist": "^2.0.0",
|
|
40
|
+
"@jbrowse/core": "^3.0.1",
|
|
40
41
|
"crc": "^4.0.0",
|
|
41
|
-
"generic-
|
|
42
|
-
"get-value": "^3.0.
|
|
43
|
-
"set-value": "^4.0.1"
|
|
44
|
-
},
|
|
45
|
-
"peerDependencies": {
|
|
46
|
-
"@jbrowse/core": "^2.0.0",
|
|
42
|
+
"generic-filehandle2": "^1.0.0",
|
|
43
|
+
"get-value": "^3.0.0",
|
|
47
44
|
"mobx": "^6.0.0",
|
|
48
45
|
"mobx-react": "^9.0.0",
|
|
49
46
|
"mobx-state-tree": "^5.0.0",
|
|
50
|
-
"rxjs": "^7.0.0"
|
|
47
|
+
"rxjs": "^7.0.0",
|
|
48
|
+
"set-value": "^4.0.1"
|
|
51
49
|
},
|
|
52
50
|
"publishConfig": {
|
|
53
51
|
"access": "public"
|
|
@@ -55,5 +53,5 @@
|
|
|
55
53
|
"distModule": "esm/index.js",
|
|
56
54
|
"srcModule": "src/index.ts",
|
|
57
55
|
"module": "esm/index.js",
|
|
58
|
-
"gitHead": "
|
|
56
|
+
"gitHead": "aa2f1d1a89d2361c7fd1a93fe29506fa4554f5cc"
|
|
59
57
|
}
|