feat: help

This commit is contained in:
wss-git 2021-06-10 09:37:48 +08:00
parent 1c8d2ab139
commit f2fffa8a26
2 changed files with 26 additions and 12 deletions

View File

@ -1,11 +1,11 @@
export default [
{
header: 'Description',
content: 'Remote Invoke',
header: 'Invoke',
content: 'Invoke/trigger online functions.',
},
{
header: 'Usage',
content: '$ fc-remote-invoke invoke <options>',
content: '$ s invoke <options>',
},
{
header: 'Options',
@ -36,17 +36,17 @@ export default [
},
{
name: 'region',
description: 'Pass in region in cli mode',
description: 'Specify region in cli mode',
type: String,
},
{
name: 'service-name',
description: 'Pass in service name in cli mode',
description: 'Specify service name in cli mode',
type: String,
},
{
name: 'function-name',
description: 'Pass in function name in cli mode',
description: 'Specify function name in cli mode',
type: String,
},
],
@ -54,9 +54,15 @@ export default [
{
header: 'Global Options',
optionList: [
{
name: 'access',
description: 'Specify key alias.',
alias: 'a',
type: Boolean,
},
{
name: 'help',
description: 'fc-remote-invoke help for command',
description: 'fc-remote-invoke help for command.',
alias: 'h',
type: Boolean,
},
@ -71,11 +77,20 @@ export default [
],
},
{
header: 'Examples with Cli',
header: 'Examples with CLI',
content: [
'$ s cli fc-remote-invoke invoke --region * --service-name * --function-name * --event [payload]',
'$ s cli fc-remote-invoke invoke --region * --service-name * --function-name * --event-file [path]',
'$ s cli fc-remote-invoke invoke --region * --service-name * --function-name * --event-stdin',
{
example: '$ s cli fc-remote-invoke invoke --region * --service-name * --function-name * --event [payload]',
},
{
example: '$ s cli fc-remote-invoke invoke --region * --service-name * --function-name * --event-file [path]',
},
{
example: '$ s cli fc-remote-invoke invoke --region * --service-name * --function-name * --event-stdin',
},
{
example: 'You also can refer to the usage of fc-api and execute [s cli fc-api -h] for help. $ s cli fc-api invokeFunction -h',
},
],
},
]

View File

@ -106,7 +106,6 @@ export default class FcRemoteInvoke {
await this.report('fc-remote-invoke', 'invoke', credentials?.AccountID);
if (isHelp) {
console.log('??');
core.help(HELP);
return;
}