(context, providerName, service, parameters)
| 44 | * Entry point for adding function resource |
| 45 | */ |
| 46 | export const add = async (context, providerName, service, parameters): Promise<string> => { |
| 47 | const options = { |
| 48 | service, |
| 49 | providerPlugin: providerName, |
| 50 | build: true, |
| 51 | }; |
| 52 | // eslint-disable-next-line |
| 53 | const providerController = require(`./provider-utils/${providerName}/index`); |
| 54 | if (!providerController) { |
| 55 | context.print.error('Provider not configured for this category'); |
| 56 | return undefined; |
| 57 | } |
| 58 | return providerController.addResource(context, categoryName, service, options, parameters); |
| 59 | }; |
| 60 | |
| 61 | /** |
| 62 | * Entry point for updating function resource |
nothing calls this directly
no test coverage detected