diff --git a/dist/index.js b/dist/index.js index 96aaebd..aa0a8b0 100644 --- a/dist/index.js +++ b/dist/index.js @@ -9,7 +9,9 @@ var Qenv = (function () { this.missingEnvVars = getMissingEnvVars(this.requiredEnvVars, this.availableEnvVars); //handle missing variables if (this.missingEnvVars.length > 0) { - plugins.beautylog.error("Some Env variables could not be resolved:"); + plugins.beautylog.info("Required Env Vars are:"); + console.log(this.requiredEnvVars); + plugins.beautylog.error("However some Env variables could not be resolved:"); console.log(this.missingEnvVars); if (failOnMissing) { plugins.beautylog.error("Exiting!"); @@ -57,4 +59,4 @@ var getMissingEnvVars = function (requiredEnvVarsArray, availableEnvVarsArray) { return plugins.lodash.difference(requiredEnvVarsArray, availableEnvVarsArray); }; -//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQSxJQUFZLE9BQU8sV0FBTSxnQkFBZ0IsQ0FBQyxDQUFBO0FBRTFDO0lBSUksY0FBWSxXQUEyQixFQUFDLGFBQWEsRUFBQyxhQUFvQjtRQUE5RCwyQkFBMkIsR0FBM0IsY0FBYyxPQUFPLENBQUMsR0FBRyxFQUFFO1FBQWUsNkJBQW9CLEdBQXBCLG9CQUFvQjtRQUN0RSxJQUFJLENBQUMsZUFBZSxHQUFHLGtCQUFrQixDQUFDLFdBQVcsQ0FBQyxDQUFDO1FBQ3ZELElBQUksQ0FBQyxnQkFBZ0IsR0FBRyxtQkFBbUIsQ0FBQyxJQUFJLENBQUMsZUFBZSxFQUFDLGFBQWEsQ0FBQyxDQUFDO1FBQ2hGLElBQUksQ0FBQyxjQUFjLEdBQUcsaUJBQWlCLENBQUMsSUFBSSxDQUFDLGVBQWUsRUFBQyxJQUFJLENBQUMsZ0JBQWdCLENBQUMsQ0FBQztRQUVwRiwwQkFBMEI7UUFDMUIsRUFBRSxDQUFDLENBQUMsSUFBSSxDQUFDLGNB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5zbWFydGZpbGUubG9jYWwudG9PYmplY3RTeW5jKGVudlltbFBhdGhBcmcpO1xuICAgIH1cbiAgICBjYXRjaChlcnIpe1xuICAgICAgICBwbHVnaW5zLmJlYXV0eWxvZy5sb2coXCJlbnYgZmlsZSBjb3VsZG4ndCBiZSBmb3VuZCBhdCBcIiArIGVudlltbFBhdGhBcmcpXG4gICAgICAgIGVudlltbCA9IHt9O1xuICAgIH1cbiAgICBmb3IobGV0IGtleUFyZyBpbiByZXF1aXJlZEVudlZhcnNBcmcpe1xuICAgICAgICBsZXQgcmVxdWlyZWRFbnZWYXI6c3RyaW5nID0gcmVxdWlyZWRFbnZWYXJzQXJnW2tleUFyZ107XG4gICAgICAgIGlmKHByb2Nlc3MuZW52W3JlcXVpcmVkRW52VmFyXSl7XG4gICAgICAgICAgICByZXN1bHQucHVzaChyZXF1aXJlZEVudlZhcik7XG4gICAgICAgIH0gZWxzZSBpZihlbnZZbWwuaGFzT3duUHJvcGVydHkocmVxdWlyZWRFbnZWYXIpKXtcbiAgICAgICAgICAgIHByb2Nlc3MuZW52W3JlcXVpcmVkRW52VmFyXSA9IGVudlltbFtyZXF1aXJlZEVudlZhcl07XG4gICAgICAgICAgICByZXN1bHQucHVzaChyZXF1aXJlZEVudlZhcik7XG4gICAgICAgIH1cbiAgICB9XG4gICAgcmV0dXJuIHJlc3VsdDtcbn1cblxubGV0IGdldE1pc3NpbmdFbnZWYXJzID0gKHJlcXVpcmVkRW52VmFyc0FycmF5OnN0cmluZ1tdLGF2YWlsYWJsZUVudlZhcnNBcnJheTpzdHJpbmdbXSkgPT4ge1xuICAgIHJldHVybiBwbHVnaW5zLmxvZGFzaC5kaWZmZXJlbmNlKHJlcXVpcmVkRW52VmFyc0FycmF5LGF2YWlsYWJsZUVudlZhcnNBcnJheSk7XG59Il19 diff --git a/ts/index.ts b/ts/index.ts index 583ca2f..8fdc435 100644 --- a/ts/index.ts +++ b/ts/index.ts @@ -11,7 +11,9 @@ export class Qenv { //handle missing variables if (this.missingEnvVars.length > 0){ - plugins.beautylog.error("Some Env variables could not be resolved:") + plugins.beautylog.info("Required Env Vars are:") + console.log(this.requiredEnvVars); + plugins.beautylog.error("However some Env variables could not be resolved:"); console.log(this.missingEnvVars); if(failOnMissing){ plugins.beautylog.error("Exiting!")