mirror of
https://github.com/samuelthomas2774/nxapi.git
synced 2026-04-08 10:34:52 -05:00
26 lines
805 B
TypeScript
26 lines
805 B
TypeScript
import process from 'node:process';
|
|
import createDebug from 'debug';
|
|
import type { Arguments as ParentArguments } from '../cli.js';
|
|
import { Argv, YargsArguments } from '../util/yargs.js';
|
|
import * as commands from './nso/index.js';
|
|
|
|
const debug = createDebug('cli:nso');
|
|
|
|
export const command = 'nso <command>';
|
|
export const desc = 'Nintendo Switch Online';
|
|
|
|
export function builder(yargs: Argv<ParentArguments>) {
|
|
for (const command of Object.values(commands)) {
|
|
// @ts-expect-error
|
|
yargs.command(command);
|
|
}
|
|
|
|
return yargs.option('znc-proxy-url', {
|
|
describe: 'URL of Nintendo Switch Online app API proxy server to use',
|
|
type: 'string',
|
|
default: process.env.ZNC_PROXY_URL,
|
|
});
|
|
}
|
|
|
|
export type Arguments = YargsArguments<ReturnType<typeof builder>>;
|