From d65ceb8139d45534bf5fdbd5d634edc92bd2b40a Mon Sep 17 00:00:00 2001 From: Gregor Zupan <46669056+zgre@users.noreply.github.com> Date: Tue, 27 Oct 2020 16:31:46 +0100 Subject: [PATCH 1/2] Update index.js Using this plugin sls package command fails with: Environment variable TAGS must contain string Maybe using it earlier in hooks would solve it. --- index.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/index.js b/index.js index 436789d..4043b1c 100644 --- a/index.js +++ b/index.js @@ -7,15 +7,15 @@ module.exports = exports = class EncodeEnvironmentVariableObjects { constructor(serverless, options) { this._serverless = serverless; this.commands = { - deploy: { + initialize: { lifecycleEvents: [ - 'resources' + 'package' ] } }; this.hooks = { - 'before:deploy:resources': this.beforeDeployResources.bind(this) + 'before:initialize:package': this.beforeInitializePackage.bind(this) }; } From 52fad7109b2f18806da94bad8b7902f419023182 Mon Sep 17 00:00:00 2001 From: gregadunbit Date: Tue, 27 Oct 2020 16:43:00 +0100 Subject: [PATCH 2/2] changed also function name --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 4043b1c..f4835bf 100644 --- a/index.js +++ b/index.js @@ -19,7 +19,7 @@ module.exports = exports = class EncodeEnvironmentVariableObjects { }; } - beforeDeployResources() { + beforeInitializePackage() { let envProperties = []; if (this._serverless.service.custom && this._serverless.service.custom.encodeEnvObjects) {