101 lines
5.4 KiB
JavaScript
101 lines
5.4 KiB
JavaScript
"use strict";
|
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
exports.default = [
|
|
{
|
|
header: 'Invoke',
|
|
content: 'Invoke/trigger online functions.',
|
|
},
|
|
{
|
|
header: 'Usage',
|
|
content: '$ s invoke <options>',
|
|
},
|
|
{
|
|
header: 'Options',
|
|
optionList: [
|
|
{
|
|
name: 'invocation-type',
|
|
description: 'Invocation type: optional value "async"|"sync", default value "sync" (default: "sync")',
|
|
alias: 't',
|
|
type: String,
|
|
},
|
|
{
|
|
name: 'event',
|
|
description: 'Event data (strings) passed to the function during invocation (default: "").Http function format refers to [https://github.com/devsapp/fc-remote-invoke#特别说明]',
|
|
alias: 'e',
|
|
type: String,
|
|
},
|
|
{
|
|
name: 'event-file',
|
|
description: 'Event funtion: A file containing event data passed to the function during invoke. Http function: A file containing http request options sent to http trigger. Format refers to [https://github.com/devsapp/fc-remote-invoke#特别说明]',
|
|
alias: 'f',
|
|
type: String,
|
|
},
|
|
{
|
|
name: 'event-stdin',
|
|
description: 'Read from standard input, to support script pipeline.Http function format refers to [https://github.com/devsapp/fc-remote-invoke#特别说明]',
|
|
alias: 's',
|
|
type: Boolean,
|
|
},
|
|
{
|
|
name: 'region',
|
|
description: 'Specify region in cli mode',
|
|
type: String,
|
|
},
|
|
{
|
|
name: 'service-name',
|
|
description: 'Specify service name in cli mode',
|
|
type: String,
|
|
},
|
|
{
|
|
name: 'function-name',
|
|
description: 'Specify function name in cli mode',
|
|
type: String,
|
|
},
|
|
],
|
|
},
|
|
{
|
|
header: 'Global Options',
|
|
optionList: [
|
|
{
|
|
name: 'access',
|
|
description: 'Specify key alias.',
|
|
alias: 'a',
|
|
type: Boolean,
|
|
},
|
|
{
|
|
name: 'help',
|
|
description: 'fc-remote-invoke help for command.',
|
|
alias: 'h',
|
|
type: Boolean,
|
|
},
|
|
],
|
|
},
|
|
{
|
|
header: 'Examples with Yaml',
|
|
content: [
|
|
'$ s invoke',
|
|
'$ s <ProjectName> invoke',
|
|
'$ s exec -- invoke --invocation-type sync --event <payload>',
|
|
'$ s exec -- invoke --event-file <file-path>',
|
|
'$ s exec -- invoke --event-stdin',
|
|
],
|
|
},
|
|
{
|
|
header: 'Examples with CLI',
|
|
content: [
|
|
{
|
|
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 <file-path>',
|
|
},
|
|
{
|
|
example: '$ s cli fc-remote-invoke invoke --region * --service-name * --function-name * --event-stdin',
|
|
},
|
|
{
|
|
example: '\nYou also can refer to the usage of fc-api and execute [s cli fc-api -h] for help. $ s cli fc-api invokeFunction -h',
|
|
},
|
|
],
|
|
},
|
|
];
|
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaGVscC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9jb21tb24vaGVscC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOztBQUFBLGtCQUFlO0lBQ2I7UUFDRSxNQUFNLEVBQUUsUUFBUTtRQUNoQixPQUFPLEVBQUUsa0NBQWtDO0tBQzVDO0lBQ0Q7UUFDRSxNQUFNLEVBQUUsT0FBTztRQUNmLE9BQU8sRUFBRSxzQkFBc0I7S0FDaEM7SUFDRDtRQUNFLE1BQU0sRUFBRSxTQUFTO1FBQ2pCLFVBQVUsRUFBRTtZQUNWO2dCQUNFLElBQUksRUFBRSxpQkFBaUI7Z0JBQ3ZCLFdBQVcsRUFBRSx3RkFBd0Y7Z0JBQ3JHLEtBQUssRUFBRSxHQUFHO2dCQUNWLElBQUksRUFBRSxNQUFNO2FBQ2I7WUFDRDtnQkFDRSxJQUFJLEVBQUUsT0FBTztnQkFDYixXQUFXLEVBQUUsK0pBQStKO2dCQUM1SyxLQUFLLEVBQUUsR0FBRztnQkFDVixJQ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