diff --git a/src/models/serverless.ts b/src/models/serverless.ts index 3a42741a..796fde4d 100644 --- a/src/models/serverless.ts +++ b/src/models/serverless.ts @@ -184,6 +184,7 @@ export interface ServerlessCommand { [key: string]: { usage: string; shortcut?: string; + type: string; }; }; commands?: ServerlessCommandMap; diff --git a/src/plugins/deploy/azureDeployPlugin.ts b/src/plugins/deploy/azureDeployPlugin.ts index ccc2e5b1..34405dad 100644 --- a/src/plugins/deploy/azureDeployPlugin.ts +++ b/src/plugins/deploy/azureDeployPlugin.ts @@ -39,7 +39,8 @@ export class AzureDeployPlugin extends AzureBasePlugin { ...constants.deployedServiceOptions, dryrun: { usage: "Get a summary for what the deployment would look like", - shortcut: "d" + shortcut: "d", + type: "boolean", } } } diff --git a/src/plugins/func/azureFuncPlugin.ts b/src/plugins/func/azureFuncPlugin.ts index 7c3d79a5..ce0d13c2 100644 --- a/src/plugins/func/azureFuncPlugin.ts +++ b/src/plugins/func/azureFuncPlugin.ts @@ -29,6 +29,7 @@ export class AzureFuncPlugin extends AzureBasePlugin { name: { usage: "Name of function to add", shortcut: "n", + type: "string", } } }, @@ -41,6 +42,7 @@ export class AzureFuncPlugin extends AzureBasePlugin { name: { usage: "Name of function to remove", shortcut: "n", + type: "string", } } } diff --git a/src/plugins/info/azureInfoPlugin.ts b/src/plugins/info/azureInfoPlugin.ts index bd03a9a5..5a259d93 100644 --- a/src/plugins/info/azureInfoPlugin.ts +++ b/src/plugins/info/azureInfoPlugin.ts @@ -23,10 +23,12 @@ export class AzureInfoPlugin extends AzureBasePlugin { dryrun: { usage: "Get a summary for what the deployment would look like", shortcut: "d", + type: "boolean", }, arm: { usage: "Inspect the ARM template of either the last successful deployment or the generated template", shortcut: "a", + type: "boolean", } } } diff --git a/src/plugins/invoke/azureInvokePlugin.ts b/src/plugins/invoke/azureInvokePlugin.ts index cffedd92..83f5186d 100644 --- a/src/plugins/invoke/azureInvokePlugin.ts +++ b/src/plugins/invoke/azureInvokePlugin.ts @@ -25,7 +25,8 @@ export class AzureInvokePlugin extends AzureBasePlugin { ...constants.invokeOptions, port: { usage: "Port through which locally running service is exposed", - shortcut: "t" + shortcut: "t", + type: "string", } }, lifecycleEvents: [ "local" ], diff --git a/src/plugins/offline/azureOfflinePlugin.ts b/src/plugins/offline/azureOfflinePlugin.ts index 097b407b..87135474 100644 --- a/src/plugins/offline/azureOfflinePlugin.ts +++ b/src/plugins/offline/azureOfflinePlugin.ts @@ -32,10 +32,12 @@ export class AzureOfflinePlugin extends AzureBasePlugin { nocleanup: { usage: "Do not clean up offline files after finishing process", shortcut: "n", + type: "boolean", }, spawnargs: { usage: "Arguments to add to spawned 'func host start' process", - shortcut: "a" + shortcut: "a", + type: "string", } } }, @@ -56,10 +58,12 @@ export class AzureOfflinePlugin extends AzureBasePlugin { nocleanup: { usage: "Do not clean up offline files after finishing process", shortcut: "n", + type: "boolean", }, spawnargs: { usage: "Arguments to add to spawned 'func host start' process", - shortcut: "a" + shortcut: "a", + type: "string", } } } diff --git a/src/plugins/remove/azureRemovePlugin.ts b/src/plugins/remove/azureRemovePlugin.ts index cc371f91..f0eeee48 100644 --- a/src/plugins/remove/azureRemovePlugin.ts +++ b/src/plugins/remove/azureRemovePlugin.ts @@ -18,7 +18,8 @@ export class AzureRemovePlugin extends AzureBasePlugin { options: { ...constants.deployedServiceOptions, force: { - usage: "Force remove resource group without additional prompt" + usage: "Force remove resource group without additional prompt", + type: "boolean" }, } } diff --git a/src/plugins/rollback/azureRollbackPlugin.ts b/src/plugins/rollback/azureRollbackPlugin.ts index 9c97f64b..be97922c 100644 --- a/src/plugins/rollback/azureRollbackPlugin.ts +++ b/src/plugins/rollback/azureRollbackPlugin.ts @@ -21,6 +21,7 @@ export class AzureRollbackPlugin extends AzureBasePlugin { timestamp: { usage: "Timestamp of previous deployment", shortcut: "t", + type: "string", }, ...constants.deployedServiceOptions } diff --git a/src/shared/constants.ts b/src/shared/constants.ts index 45a2ab3d..c092b99f 100644 --- a/src/shared/constants.ts +++ b/src/shared/constants.ts @@ -40,40 +40,49 @@ export const constants = { resourceGroup: { usage: "Resource group for the service", shortcut: "g", + type: "string", }, stage: { usage: "Stage of service", - shortcut: "s" + shortcut: "s", + type: "string", }, region: { usage: "Region of service", - shortcut: "r" + shortcut: "r", + type: "string", }, subscriptionId: { usage: "Sets the Azure subscription ID", shortcut: "i", + type: "string", }, function: { usage: "Deployment of individual function - NOT SUPPORTED", shortcut: "f", + type: "string", } }, invokeOptions: { function: { usage: "Function to call", shortcut: "f", + type: "string", }, path: { usage: "Path to file to put in body", - shortcut: "p" + shortcut: "p", + type: "string", }, data: { usage: "Data string for body of request", - shortcut: "d" + shortcut: "d", + type: "string", }, method: { usage: "HTTP method (Default is GET)", - shortcut: "m" + shortcut: "m", + type: "string", }, }, bearer: "Bearer ",