diff --git a/README.md b/README.md index a1eb78d..fb7090d 100644 --- a/README.md +++ b/README.md @@ -34,7 +34,7 @@ plugins: #### Function -* **How it works?** When deployment region or stage don't match function regions or stages, that function will be deleted for deployment. +* **How it works?** When deployment region or stage don't match function regions or stages, that function will be deleted from deployment. * **regions** - Function accepted deployment regions. diff --git a/package.json b/package.json index 936c2bb..a7d29bb 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "serverless-plugin-select", - "version": "1.0.0-rc.1", + "version": "1.0.1-rc.1", "description": "Serverless plugin that selects which functions are to be deployed.", "main": "src/index.js", "scripts": { diff --git a/src/index.js b/src/index.js index 16ccb6d..b0fe1c1 100644 --- a/src/index.js +++ b/src/index.js @@ -28,20 +28,20 @@ class Select { /** Serverless hooks */ this.hooks = { - 'before:deploy:function:packageFunction': this.beforeCreateDeploymentArtifacts.bind(this), - 'before:deploy:createDeploymentArtifacts': this.beforeCreateDeploymentArtifacts.bind(this) + 'after:deploy:initialize': this.deployHook.bind(this), + 'before:deploy:function:initialize': this.deployHook.bind(this) } } /** - * @description Before create deployment artifacts + * @description Deploy hook * * @fulfil {} — Functions optimized * @reject {Error} Optimization error * * @return {(boolean|Promise)} * */ - beforeCreateDeploymentArtifacts () { + deployHook () { /** Skip function selection */ if (this.options.noDeploy) { return false