UNPKG

592 BJavaScriptView Raw
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3const Case = require("case");
4const path = require("path");
5const helpers_1 = require("../helpers");
6exports.default = async (command, auth, type, name) => {
7 const vars = getVars(name, auth, type);
8 return await helpers_1.copyFiles(command, path.join(`generate/function`, auth, type), command.locator.srcFunctionsDir, vars);
9};
10function getVars(name, authType, functionType) {
11 return {
12 authType,
13 functionType,
14 fileName: name,
15 functionClassName: Case.pascal(name)
16 };
17}