UNPKG

746 BJavaScriptView Raw
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3const command_1 = require("@oclif/command");
4const base_legacy_command_1 = require("../base-legacy-command");
5class Invoke extends base_legacy_command_1.default {
6 async run() {
7 const { args, flags } = this.parse(Invoke);
8 const cmdArgs = [args.Function_Name];
9 if (flags.path) {
10 cmdArgs.push(`--path=${flags.path}`);
11 }
12 this.runLegacy(['invoke', ...cmdArgs]);
13 }
14}
15Invoke.description = 'Invoke Function locally';
16Invoke.flags = {
17 help: command_1.flags.help({ char: 'h' }),
18 path: command_1.flags.string({ char: 'p' })
19};
20Invoke.args = [{ name: 'Function_Name', required: true }];
21exports.default = Invoke;