UNPKG

@metacall/deploy

Version:

Tool for deploying into MetaCall FaaS platform.

25 lines (21 loc) 856 B
"use strict"; /* * About File: It loads the config and assigns the jwt to the config Object JWT = "", empty string if the dev mode is on */ var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.startup = void 0; const auth_1 = require("./auth"); const args_1 = __importDefault(require("./cli/args")); const config_1 = require("./config"); const devToken = 'local'; // Use some random token in order to proceed const startup = async (confDir) => { const config = await (0, config_1.load)(confDir || config_1.defaultPath); const token = args_1.default['dev'] ? devToken : await (0, auth_1.auth)(config); return Object.assign(config, { token }); }; exports.startup = startup;