Skip to content
This repository was archived by the owner on Dec 9, 2024. It is now read-only.

fix: add types to fix deprecation warning #571

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/models/serverless.ts
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,7 @@ export interface ServerlessCommand {
[key: string]: {
usage: string;
shortcut?: string;
type: string;
};
};
commands?: ServerlessCommandMap;
Expand Down
3 changes: 2 additions & 1 deletion src/plugins/deploy/azureDeployPlugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ export class AzureDeployPlugin extends AzureBasePlugin<AzureLoginOptions> {
...constants.deployedServiceOptions,
dryrun: {
usage: "Get a summary for what the deployment would look like",
shortcut: "d"
shortcut: "d",
type: "boolean",
}
}
}
Expand Down
2 changes: 2 additions & 0 deletions src/plugins/func/azureFuncPlugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ export class AzureFuncPlugin extends AzureBasePlugin {
name: {
usage: "Name of function to add",
shortcut: "n",
type: "string",
}
}
},
Expand All @@ -41,6 +42,7 @@ export class AzureFuncPlugin extends AzureBasePlugin {
name: {
usage: "Name of function to remove",
shortcut: "n",
type: "string",
}
}
}
Expand Down
2 changes: 2 additions & 0 deletions src/plugins/info/azureInfoPlugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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",
}
}
}
Expand Down
3 changes: 2 additions & 1 deletion src/plugins/invoke/azureInvokePlugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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" ],
Expand Down
8 changes: 6 additions & 2 deletions src/plugins/offline/azureOfflinePlugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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",
}
}
},
Expand All @@ -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",
}
}
}
Expand Down
3 changes: 2 additions & 1 deletion src/plugins/remove/azureRemovePlugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},
}
}
Expand Down
1 change: 1 addition & 0 deletions src/plugins/rollback/azureRollbackPlugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ export class AzureRollbackPlugin extends AzureBasePlugin {
timestamp: {
usage: "Timestamp of previous deployment",
shortcut: "t",
type: "string",
},
...constants.deployedServiceOptions
}
Expand Down
19 changes: 14 additions & 5 deletions src/shared/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 ",
Expand Down