nxapi/src/cli/pctl.ts
Samuel Elliott 967a063220
Move utility functions
This avoids importing most dependencies when not used.
2022-05-21 23:52:36 +01:00

21 lines
603 B
TypeScript

import createDebug from 'debug';
import type { Arguments as ParentArguments } from '../cli.js';
import { Argv, YargsArguments } from '../util/yargs.js';
import * as commands from './pctl/index.js';
const debug = createDebug('cli:pctl');
export const command = 'pctl <command>';
export const desc = 'Nintendo Switch Parental Controls';
export function builder(yargs: Argv<ParentArguments>) {
for (const command of Object.values(commands)) {
// @ts-expect-error
yargs.command(command);
}
return yargs;
}
export type Arguments = YargsArguments<ReturnType<typeof builder>>;