From 1671cdfe6f82fd130f9bf9c2b16f7ad2e976d5cf Mon Sep 17 00:00:00 2001 From: abetomo Date: Wed, 5 Jul 2017 10:14:07 +0900 Subject: [PATCH] Fix to deprecated the `configFile` option in the `pacakage` command Even if you specify it in the current specification, nothing has any effect. Therefore, I thought that it might be good to abolish it, but how about you? Since sudden deletion has a big influence, we have issued a warning once. --- bin/node-lambda | 3 +-- lib/main.js | 3 +++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/bin/node-lambda b/bin/node-lambda index 4dd45324..372208ca 100755 --- a/bin/node-lambda +++ b/bin/node-lambda @@ -107,8 +107,7 @@ program AWS_ENVIRONMENT) .option('-x, --excludeGlobs [' + EXCLUDE_GLOBS + ']', 'Space-separated glob pattern(s) for additional exclude files (e.g. "event.json dotenv.sample")', EXCLUDE_GLOBS) - .option('-f, --configFile [' + CONFIG_FILE + ']', - 'Path to file holding secret environment variables (e.g. "deploy.env")', CONFIG_FILE) + .option('-f, --configFile [' + CONFIG_FILE + ']', '!!! Deprecated option in package command !!!', CONFIG_FILE) .option('-D, --prebuiltDirectory [' + PREBUILT_DIRECTORY + ']', 'Prebuilt directory', PREBUILT_DIRECTORY) .action((prg) => lambda.package(prg)) diff --git a/lib/main.js b/lib/main.js index ade00b39..060da1bb 100644 --- a/lib/main.js +++ b/lib/main.js @@ -689,6 +689,9 @@ Lambda.prototype._updateScheduleEvents = (scheduleEvents, functionArn, scheduleL } Lambda.prototype.package = function (program) { + if (program.configFile) { + console.warn('[Warning] -f, --configFile option of the `package` command is deprecated.') + } const _this = this if (!program.packageDirectory) { throw new Error('packageDirectory not specified!')