Skip to content

Commit 41f39f9

Browse files
authored
Merge pull request #2121 from nellh/jsr-export-fixes
chore: Add docstrings and export missing validateCommand object
2 parents 3974ad3 + 47572c5 commit 41f39f9

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

bids-validator/src/main.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@ import { consoleFormat } from './utils/output.ts'
99
import { setupLogging } from './utils/logger.ts'
1010
import type { ValidationResult } from './types/validation-result.ts'
1111

12+
/**
13+
* Validation entrypoint intended for command line usage with Deno
14+
*
15+
* Parses command line options, runs validation, and formats the result. Call `validate` directly for other environments
16+
*/
1217
export async function main(): Promise<ValidationResult> {
1318
const options = await parseOptions(Deno.args)
1419
colors.setColorEnabled(options.color ?? false)

bids-validator/src/setup/options.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,16 @@ import { Command, EnumType } from '@cliffy/command'
44
import { getVersion } from '../version.ts'
55
import type { Issue, Severity } from '../types/issues.ts'
66

7+
/**
8+
* BIDS Validator config file object definition
9+
*/
710
export type Config = {
811
[key in Severity]?: Partial<Issue>[]
912
}
1013

14+
/**
15+
* BIDS Validator options object definition
16+
*/
1117
export type ValidatorOptions = {
1218
datasetPath: string
1319
schema?: string
@@ -27,7 +33,8 @@ const modalityType = new EnumType<string>(
2733
['MRI', 'PET', 'MEG', 'EEG', 'iEEG', 'Microscopy', 'NIRS', 'MRS'],
2834
)
2935

30-
const validateCommand = new Command()
36+
/** Extendable Cliffy Command with built in BIDS validator options */
37+
export const validateCommand = new Command()
3138
.name('bids-validator')
3239
.type('debugLevel', new EnumType(LogLevelNames))
3340
.description(

0 commit comments

Comments
 (0)