-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #67 from bioinformatics-ua/change/pure-esm
Change to pure ECMAScript modules
- Loading branch information
Showing
28 changed files
with
705 additions
and
5,142 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"extension": [ | ||
".js" | ||
".ts" | ||
], | ||
"exclude": [ | ||
"gulpfile.js", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,8 @@ | ||
{ | ||
"extension": ["ts"], | ||
"spec": ["test/*.test.ts"], | ||
"require": "ts-node/register" | ||
"require": "ts-node/register", | ||
"node-option": [ | ||
"loader=ts-node/esm" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,23 +6,22 @@ | |
* | ||
* Usage: | ||
* dicoogle-query [-k] [-s server_location] [-p provider_name]* QUERY | ||
* | ||
* @author Eduardo Pinho ([email protected]) | ||
*/ | ||
var dicoogleClient = require("../lib"); | ||
var util = require('util'); | ||
var server = "http://localhost:8080"; | ||
var query; | ||
var keyword = undefined; | ||
var debug = false; | ||
var forceTTY = false; | ||
var forceJSON = false; | ||
var providers = []; | ||
import dicoogleClient from "../lib/index.js"; | ||
import { inspect } from 'node:util'; | ||
|
||
let server = "http://localhost:8080"; | ||
let query; | ||
let keyword = undefined; | ||
let debug = false; | ||
let forceTTY = false; | ||
let forceJSON = false; | ||
let providers = []; | ||
|
||
var USER = process.env.DICOOGLE_USER; | ||
var PASSWORD = process.env.DICOOGLE_PASSWORD; | ||
let USER = process.env.DICOOGLE_USER; | ||
let PASSWORD = process.env.DICOOGLE_PASSWORD; | ||
|
||
for (var i = 2; i < process.argv.length; i++) { | ||
for (let i = 2; i < process.argv.length; i++) { | ||
if (process.argv[i] === '--help' || process.argv[i] === '-h') { | ||
console.log("Usage: dicoogle-query [OPTIONS] QUERY"); | ||
console.log("Description: search for images in Dicoogle using text queries\n"); | ||
|
@@ -75,7 +74,7 @@ process.stdout.on('error', function() { | |
// ignore problem, the user must have just closed the consumer | ||
}); | ||
|
||
var Dicoogle = dicoogleClient(server); | ||
let Dicoogle = dicoogleClient(server); | ||
|
||
if (USER && PASSWORD) { | ||
Dicoogle.login(USER, PASSWORD, function(err, out) { | ||
|
@@ -105,7 +104,7 @@ function doSearch() { | |
} else { | ||
var result = outcome.results || []; | ||
if ((process.stdout.isTTY && !forceJSON) || forceTTY) { | ||
console.log(util.inspect(result, {colors: true, depth: 2})); | ||
console.log(inspect(result, {colors: true, depth: 2})); | ||
} else { | ||
console.log(JSON.stringify(result)); | ||
} | ||
|
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.