Skip to content

Commit

Permalink
Run linter
Browse files Browse the repository at this point in the history
Signed-off-by: Joyce Quach <[email protected]>
  • Loading branch information
jtquach1 committed Sep 27, 2024
1 parent 59be14a commit 1db227a
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions src/commands/convert/neuvector2hdf.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {Command, Flags} from '@oclif/core';
import fs from 'fs';
import {NeuVectorMapper as Mapper} from '@mitre/hdf-converters';
import {checkSuffix} from '../../utils/global';
import {Command, Flags} from '@oclif/core'
import fs from 'fs'
import {NeuVectorMapper as Mapper} from '@mitre/hdf-converters'

Check failure on line 3 in src/commands/convert/neuvector2hdf.ts

View workflow job for this annotation

GitHub Actions / build

Module '"@mitre/hdf-converters"' has no exported member 'NeuVectorMapper'.
import {checkSuffix} from '../../utils/global'

export default class NeuVector2HDF extends Command {
readonly usage =
Expand All @@ -11,36 +11,36 @@ export default class NeuVector2HDF extends Command {
'Translate a NeuVector results JSON to a Heimdall Data Format JSON file';

readonly examples = [
'saf convert neuvector2hdf -i neuvector.json -o output-hdf-name.json'
'saf convert neuvector2hdf -i neuvector.json -o output-hdf-name.json',
];

readonly flags = {
help: Flags.help({char: 'h'}),
input: Flags.string({
char: 'i',
required: true,
description: 'Input NeuVector Results JSON File'
description: 'Input NeuVector Results JSON File',
}),
output: Flags.string({
char: 'o',
required: true,
description: 'Output HDF JSON file'
description: 'Output HDF JSON file',
}),
'with-raw': Flags.boolean({
char: 'w',
required: false,
description: 'Include raw input file in HDF JSON file'
})
description: 'Include raw input file in HDF JSON file',
}),
};

async run() {
const {flags} = await this.parse(NeuVector2HDF);
const input = fs.readFileSync(flags.input, 'utf8');
const {flags} = await this.parse(NeuVector2HDF)
const input = fs.readFileSync(flags.input, 'utf8')

const converter = new Mapper(input, flags['with-raw']);
const converter = new Mapper(input, flags['with-raw'])
fs.writeFileSync(
checkSuffix(flags.output),
JSON.stringify(converter.toHdf())
);
JSON.stringify(converter.toHdf()),
)
}
}

0 comments on commit 1db227a

Please sign in to comment.