#!/usr/bin/env node
"use strict";(()=>{var e={id:460,ids:[460]};e.modules={56589:function(e,t,n){var o=this&&this.__awaiter||function(e,t,n,o){return new(n||(n=Promise))((function(r,s){function a(e){try{c(o.next(e))}catch(e){s(e)}}function i(e){try{c(o.throw(e))}catch(e){s(e)}}function c(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,i)}c((o=o.apply(e,t||[])).next())}))},r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=r(n(57147)),a=r(n(71017)),i=r(n(27277));t.default=class{constructor(){}help(){console.log(`\n  Run a command: ${i.default("npx crusher-cli [command]")}\n  Example:       ${i.default("npx crusher-cli create:test")}\n\n  ${i.default.hex("C1C1C1")("Commands")}\n\n  Basic\n      .                         Starts crusher\n      ${i.default.bold(i.default.hex("fff")("test:create"))}               Create a new test\n      ${i.default.bold(i.default.hex("fff")("test:run"))}                  Run all the tests\n      login                     Logs into your account or create new one\n      logout                    Logs out of your account\n\n  Other commands\n      init                      Initialize project in the repo\n      info                      Shows info about the project\n      whoami                    Information about the current logged-in user\n      token                     Get API token for integrations\n      invite                    Invite team members to your project\n      tunnel                    Open a tunnel to the project\n      help                      Show help\n    `)}getPathForType(e){return e.split(":").join("/")}run(){return o(this,void 0,void 0,(function*(){const e=process.argv[2];if(e&&s.default.existsSync(a.default.resolve(__dirname,"../commands/",`${this.getPathForType(e)}.js`))){const t=require;try{yield(new(t(a.default.resolve(__dirname,"../commands/",`${this.getPathForType(e)}.js`)).default)).init()}catch(e){"SIGINT"===e.message&&process.exit(1),console.log("Error:",e),process.exit(1)}}else this.help()}))}},process.on("uncaughtException",(e=>{console.log("Error:",e.message),process.exit(1)})),process.on("unhandledRejection",((e,t)=>{console.log("Error:",e.message),process.exit(1)}))}};var t=require("../shared.js");t.C(e);var n=(56589,t(t.s=56589));module.exports=n})();