#!/usr/bin/env node
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const worker_1 = require("../worker");
const yargs_1 = __importDefault(require("yargs"));
yargs_1.default
    .command({
    command: '*',
    builder: {
        serviceUrl: {
            description: 'specific tunnel service url.',
            type: 'number',
        },
        pollingServerUrl: {
            alias: ['baseUrl'],
            description: 'polling server url.',
            type: 'string',
            require: true,
        },
        secret: {
            description: 'auth secret for polling server.',
            type: 'string',
            require: true,
        },
        agentId: {
            description: 'agent name.',
            type: 'string',
            require: true,
        },
    },
    handler(settings) {
        (0, worker_1.makeTunnelClientWorker)({ settings });
    },
})
    .wrap(yargs_1.default.terminalWidth()).argv;
