1 | "use strict";
|
2 | Object.defineProperty(exports, "__esModule", { value: true });
|
3 | const command_1 = require("@oclif/command");
|
4 | const base_legacy_command_1 = require("../base-legacy-command");
|
5 | class 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 | }
|
15 | Invoke.description = 'Invoke Function locally';
|
16 | Invoke.flags = {
|
17 | help: command_1.flags.help({ char: 'h' }),
|
18 | path: command_1.flags.string({ char: 'p' })
|
19 | };
|
20 | Invoke.args = [{ name: 'Function_Name', required: true }];
|
21 | exports.default = Invoke;
|