MCPcopy
hub / github.com/serverless/serverless / buildArgvArray

Function buildArgvArray

packages/sf-core/src/utils/cli/cli.js:4–10  ·  view source on GitHub ↗
({ command, options })

Source from the content-addressed store, hash-verified

2import { ServerlessError, log, progress, writeText } from '@serverless/util'
3
4const buildArgvArray = ({ command, options }) => {
5 const argvArray = [...command] // Start with the command array
6 Object.entries(options).forEach(([key, value]) => {
7 argvArray.push(`--${key}`, `${value}`)
8 })
9 return argvArray
10}
11
12const validateCliSchema = async ({ schema, command, options, versions }) => {
13 const argv = buildArgvArray({

Callers 1

validateCliSchemaFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…