xref: /expo/packages/@expo/cli/src/register/index.ts (revision b7576b8a)
1#!/usr/bin/env node
2import { Command } from '../../bin/cli';
3import { assertArgs, printHelp } from '../utils/args';
4import { logCmdError } from '../utils/errors';
5
6export const expoRegister: Command = async (argv) => {
7  const args = assertArgs(
8    {
9      // Types
10      '--help': Boolean,
11      // Aliases
12      '-h': '--help',
13    },
14    argv
15  );
16
17  if (args['--help']) {
18    printHelp(
19      `Sign up for a new Expo account`,
20      `npx expo register`,
21      // Options
22      `-h, --help    Usage info`
23    );
24  }
25
26  const { registerAsync } = await import('./registerAsync.js');
27  return registerAsync().catch(logCmdError);
28};
29