nodejs-nomer 1.0.4 → 1.0.6
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/index.js +1 -1
- package/install_nomer.sh +2 -2
- package/package.json +3 -3
- package/src/index.js +1 -1
- package/src/utils.js +3 -3
package/dist/index.js
CHANGED
|
@@ -120,7 +120,7 @@ var Nomer = /*#__PURE__*/function () {
|
|
|
120
120
|
var schemaAppend = JSON.parse(properties["nomer.append.schema.output"]).map(function (i) {
|
|
121
121
|
return i.type;
|
|
122
122
|
});
|
|
123
|
-
return _result["default"].tsv(result, [].concat(_toConsumableArray(schemaInput), _toConsumableArray(schemaAppend)));
|
|
123
|
+
return _result["default"].tsv(result, [].concat(_toConsumableArray(schemaInput), ["matchType"], _toConsumableArray(schemaAppend)));
|
|
124
124
|
}
|
|
125
125
|
}]);
|
|
126
126
|
return Nomer;
|
package/install_nomer.sh
CHANGED
|
@@ -3,5 +3,5 @@
|
|
|
3
3
|
NOMER_VERSION=$1
|
|
4
4
|
|
|
5
5
|
echo "https://github.com/globalbioticinteractions/nomer/releases/download/${NOMER_VERSION}/nomer.jar)"
|
|
6
|
-
|
|
7
|
-
nomer clean && nomer version
|
|
6
|
+
sh -c "(curl -L https://github.com/globalbioticinteractions/nomer/releases/download/${NOMER_VERSION}/nomer.jar) > ./bin/nomer && chmod +x ./bin/nomer" && \
|
|
7
|
+
./bin/nomer clean && ./bin/nomer version
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nodejs-nomer",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.6",
|
|
4
4
|
"description": "NodeJS wrapper for nomer",
|
|
5
5
|
"config": {
|
|
6
|
-
"nomerVersion": "0.5.
|
|
6
|
+
"nomerVersion": "0.5.7"
|
|
7
7
|
},
|
|
8
8
|
"main": "index.js",
|
|
9
9
|
"scripts": {
|
|
@@ -33,4 +33,4 @@
|
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"properties-file": "^3.5.1"
|
|
35
35
|
}
|
|
36
|
-
}
|
|
36
|
+
}
|
package/src/index.js
CHANGED
|
@@ -97,7 +97,7 @@ class Nomer {
|
|
|
97
97
|
const properties = getProperties(content)
|
|
98
98
|
const schemaInput = JSON.parse(properties["nomer.schema.input"]).map((i) => i.type + 'Input')
|
|
99
99
|
const schemaAppend = JSON.parse(properties["nomer.append.schema.output"]).map((i) => i.type)
|
|
100
|
-
return Result.tsv(result, [...schemaInput, ...schemaAppend])
|
|
100
|
+
return Result.tsv(result, [...schemaInput, "matchType", ...schemaAppend])
|
|
101
101
|
}
|
|
102
102
|
|
|
103
103
|
|
package/src/utils.js
CHANGED
|
@@ -4,7 +4,7 @@ const getNomerValidateCmd = (filepath = "", cmd = "validate-term", properties =
|
|
|
4
4
|
if (filepath === "") {
|
|
5
5
|
throw new Exception("Filepath cannot be empty string");
|
|
6
6
|
}
|
|
7
|
-
let nomerCmd = `curl -L ${filepath} | nomer ${cmd}`;
|
|
7
|
+
let nomerCmd = `curl -L ${filepath} | ./bin/nomer ${cmd}`;
|
|
8
8
|
if (properties) {
|
|
9
9
|
nomerCmd = `${nomerCmd} -p ${properties}`;
|
|
10
10
|
}
|
|
@@ -13,7 +13,7 @@ const getNomerValidateCmd = (filepath = "", cmd = "validate-term", properties =
|
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
const getNomerMatchCmd = (query = "", cmd = "append", matcher = "globi-taxon-cache", properties = null, outputFormat = null, echoOpt = "-e") => {
|
|
16
|
-
let nomerCmd = `echo ${echoOpt} '${query}' | nomer ${cmd} ${matcher}`;
|
|
16
|
+
let nomerCmd = `echo ${echoOpt} '${query}' | ./bin/nomer ${cmd} ${matcher}`;
|
|
17
17
|
if (properties) {
|
|
18
18
|
nomerCmd = `${nomerCmd} -p ${properties}`;
|
|
19
19
|
}
|
|
@@ -25,7 +25,7 @@ const getNomerMatchCmd = (query = "", cmd = "append", matcher = "globi-taxon-cac
|
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
const getNomerSimpleCmd = (cmd = "version", verbose = false, properties = null, outputFormat = null) => {
|
|
28
|
-
let nomerCmd =
|
|
28
|
+
let nomerCmd = `./bin/nomer ${cmd}`;
|
|
29
29
|
if (properties) {
|
|
30
30
|
nomerCmd = `${nomerCmd} -p ${properties}`;
|
|
31
31
|
}
|