@jbrowse/text-indexing 2.11.2 → 2.12.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.
@@ -3,7 +3,7 @@ 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
- exports.indexTracks = void 0;
6
+ exports.indexTracks = indexTracks;
7
7
  const fs_1 = __importDefault(require("fs"));
8
8
  const path_1 = __importDefault(require("path"));
9
9
  const stream_1 = require("stream");
@@ -22,7 +22,6 @@ async function indexTracks(args) {
22
22
  (0, util_1.checkAbortSignal)(signal);
23
23
  return [];
24
24
  }
25
- exports.indexTracks = indexTracks;
26
25
  async function perTrackIndex(tracks, statusCallback, outLocation, attributes, exclude, signal) {
27
26
  const outFlag = outLocation || '.';
28
27
  const isDir = fs_1.default.lstatSync(outFlag).isDirectory();
@@ -1,5 +1,3 @@
1
- /// <reference types="node" />
2
- /// <reference types="node" />
3
1
  import fs from 'fs';
4
2
  import fetch from 'node-fetch';
5
3
  import { LocalPathLocation, UriLocation, Track } from '../util';
@@ -3,7 +3,12 @@ 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
- exports.generateMeta = exports.guessAdapterFromFileName = exports.makeLocation = exports.getLocalOrRemoteStream = exports.isURL = exports.createRemoteStream = void 0;
6
+ exports.createRemoteStream = createRemoteStream;
7
+ exports.isURL = isURL;
8
+ exports.getLocalOrRemoteStream = getLocalOrRemoteStream;
9
+ exports.makeLocation = makeLocation;
10
+ exports.guessAdapterFromFileName = guessAdapterFromFileName;
11
+ exports.generateMeta = generateMeta;
7
12
  const fs_1 = __importDefault(require("fs"));
8
13
  const node_fetch_1 = __importDefault(require("node-fetch"));
9
14
  const path_1 = __importDefault(require("path"));
@@ -17,7 +22,6 @@ async function createRemoteStream(urlIn) {
17
22
  }
18
23
  return response;
19
24
  }
20
- exports.createRemoteStream = createRemoteStream;
21
25
  // Checks if the passed in string is a valid URL.
22
26
  // Returns a boolean.
23
27
  function isURL(FileName) {
@@ -30,7 +34,6 @@ function isURL(FileName) {
30
34
  }
31
35
  return url.protocol === 'http:' || url.protocol === 'https:';
32
36
  }
33
- exports.isURL = isURL;
34
37
  async function getLocalOrRemoteStream(uri, out) {
35
38
  var _a;
36
39
  let stream;
@@ -47,7 +50,6 @@ async function getLocalOrRemoteStream(uri, out) {
47
50
  }
48
51
  return { totalBytes, stream };
49
52
  }
50
- exports.getLocalOrRemoteStream = getLocalOrRemoteStream;
51
53
  function makeLocation(location, protocol) {
52
54
  if (protocol === 'uri') {
53
55
  return { uri: location, locationType: 'UriLocation' };
@@ -60,7 +62,6 @@ function makeLocation(location, protocol) {
60
62
  }
61
63
  throw new Error(`invalid protocol ${protocol}`);
62
64
  }
63
- exports.makeLocation = makeLocation;
64
65
  function guessAdapterFromFileName(filePath) {
65
66
  // const uri = isURL(filePath) ? filePath : path.resolve(filePath)
66
67
  const protocol = isURL(filePath) ? 'uri' : 'localPath';
@@ -124,7 +125,6 @@ function guessAdapterFromFileName(filePath) {
124
125
  throw new Error(`Unsupported file type ${filePath}`);
125
126
  }
126
127
  }
127
- exports.guessAdapterFromFileName = guessAdapterFromFileName;
128
128
  /**
129
129
  * Generates metadata of index given a filename (trackId or assembly)
130
130
  * @param name - assembly name or trackId
@@ -151,4 +151,3 @@ async function generateMeta({ configs, attributes, outDir, name, exclude, assemb
151
151
  assemblyNames,
152
152
  }, null, 2));
153
153
  }
154
- exports.generateMeta = generateMeta;
@@ -3,7 +3,7 @@ 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
- exports.indexGff3 = void 0;
6
+ exports.indexGff3 = indexGff3;
7
7
  const zlib_1 = require("zlib");
8
8
  const readline_1 = __importDefault(require("readline"));
9
9
  const util_1 = require("../util");
@@ -60,4 +60,3 @@ async function* indexGff3(config, attributes, inLocation, outLocation, typesToEx
60
60
  }
61
61
  // console.log('done')
62
62
  }
63
- exports.indexGff3 = indexGff3;
@@ -3,7 +3,7 @@ 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
- exports.indexVcf = void 0;
6
+ exports.indexVcf = indexVcf;
7
7
  const zlib_1 = require("zlib");
8
8
  const readline_1 = __importDefault(require("readline"));
9
9
  const util_1 = require("../util");
@@ -66,4 +66,3 @@ async function* indexVcf(config, attributesToIndex, inLocation, outLocation, typ
66
66
  }
67
67
  }
68
68
  }
69
- exports.indexVcf = indexVcf;
package/dist/util.js CHANGED
@@ -3,7 +3,9 @@ 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
- exports.decodeURIComponentNoThrow = exports.findTrackConfigsToIndex = exports.createTextSearchConf = void 0;
6
+ exports.createTextSearchConf = createTextSearchConf;
7
+ exports.findTrackConfigsToIndex = findTrackConfigsToIndex;
8
+ exports.decodeURIComponentNoThrow = decodeURIComponentNoThrow;
7
9
  const util_1 = require("@jbrowse/core/util");
8
10
  const sanitize_filename_1 = __importDefault(require("sanitize-filename"));
9
11
  const path_1 = __importDefault(require("path"));
@@ -29,7 +31,6 @@ function createTextSearchConf(name, trackIds, assemblyNames, locationPath) {
29
31
  assemblyNames,
30
32
  };
31
33
  }
32
- exports.createTextSearchConf = createTextSearchConf;
33
34
  function findTrackConfigsToIndex(tracks, trackIds, assemblyName) {
34
35
  return trackIds
35
36
  .map(trackId => {
@@ -42,7 +43,6 @@ function findTrackConfigsToIndex(tracks, trackIds, assemblyName) {
42
43
  .filter(track => assemblyName ? track.assemblyNames.includes(assemblyName) : true)
43
44
  .filter(track => { var _a; return (0, util_1.isSupportedIndexingAdapter)((_a = track.adapter) === null || _a === void 0 ? void 0 : _a.type); });
44
45
  }
45
- exports.findTrackConfigsToIndex = findTrackConfigsToIndex;
46
46
  function decodeURIComponentNoThrow(uri) {
47
47
  try {
48
48
  return decodeURIComponent(uri);
@@ -52,4 +52,3 @@ function decodeURIComponentNoThrow(uri) {
52
52
  return uri;
53
53
  }
54
54
  }
55
- exports.decodeURIComponentNoThrow = decodeURIComponentNoThrow;
@@ -1,5 +1,3 @@
1
- /// <reference types="node" />
2
- /// <reference types="node" />
3
1
  import fs from 'fs';
4
2
  import fetch from 'node-fetch';
5
3
  import { LocalPathLocation, UriLocation, Track } from '../util';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jbrowse/text-indexing",
3
- "version": "2.11.2",
3
+ "version": "2.12.1",
4
4
  "description": "JBrowse 2 text indexing for desktop",
5
5
  "keywords": [
6
6
  "jbrowse",
@@ -57,5 +57,5 @@
57
57
  "publishConfig": {
58
58
  "access": "public"
59
59
  },
60
- "gitHead": "511048cb6965f0bf624c96de244e7fd47fce17d6"
60
+ "gitHead": "20f16ae5a56ae5e4806aaa373131e540b0b5b0fd"
61
61
  }