"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const error_1 = require("@pnpm/error");
const help_1 = require("../help");
const start_1 = require("./start");
const status_1 = require("./status");
const stop_1 = require("./stop");
exports.default = async (input, opts) => {
    switch (input[0]) {
        case 'start':
            return start_1.default(opts);
        case 'status':
            return status_1.default(opts);
        case 'stop':
            return stop_1.default(opts);
        default:
            help_1.default(['server']);
            if (input[0]) {
                throw new error_1.default('INVALID_SERVER_COMMAND', `"server ${input[0]}" is not a pnpm command. See "pnpm help server".`);
            }
    }
};
