Skip to content

Commit

Permalink
eslint fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
adrianpraja committed Nov 7, 2021
1 parent 7f013a3 commit 79d2d4b
Showing 1 changed file with 42 additions and 7 deletions.
49 changes: 42 additions & 7 deletions lib/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,12 @@ Lambda.prototype.deploy = function( program ) {
$config.AWS_SECRET = process.env[ $config.AWS_SECRET.Ref.split('env.')[1] ]


if ((typeof $config.Role === "object") && $config.Role.hasOwnProperty('Ref') && (typeof $config.Role.Ref === "string") && ($config.Role.Ref.indexOf('env.') === 0))
if (
(typeof $config.Role === "object") &&
Object.prototype.hasOwnProperty.call( $config.Role , 'Ref') &&
(typeof $config.Role.Ref === "string") &&
($config.Role.Ref.indexOf('env.') === 0)
)
$config.Role = process.env[ $config.Role.Ref.split('env.')[1] ]

if (!$config.FunctionName)
Expand Down Expand Up @@ -375,14 +380,29 @@ Lambda.prototype.delete = function( program ) {
process.exit(-1)
}

if ((typeof $config.AWS_KEY === "object") && $config.AWS_KEY.hasOwnProperty('Ref') && (typeof $config.AWS_KEY.Ref === "string") && ($config.AWS_KEY.Ref.indexOf('env.') === 0))
if (
(typeof $config.AWS_KEY === "object") &&
Object.prototype.hasOwnProperty.call( $config.AWS_KEY , 'Ref') &&
(typeof $config.AWS_KEY.Ref === "string") &&
($config.AWS_KEY.Ref.indexOf('env.') === 0)
)
$config.AWS_KEY = process.env[ $config.AWS_KEY.Ref.split('env.')[1] ]

if ((typeof $config.AWS_SECRET === "object") && $config.AWS_SECRET.hasOwnProperty('Ref') && (typeof $config.AWS_SECRET.Ref === "string") && ($config.AWS_SECRET.Ref.indexOf('env.') === 0))
if (
(typeof $config.AWS_SECRET === "object") &&
Object.prototype.hasOwnProperty.call( $config.AWS_SECRET , 'Ref') &&
(typeof $config.AWS_SECRET.Ref === "string") &&
($config.AWS_SECRET.Ref.indexOf('env.') === 0)
)
$config.AWS_SECRET = process.env[ $config.AWS_SECRET.Ref.split('env.')[1] ]


if ((typeof $config.Role === "object") && $config.Role.hasOwnProperty('Ref') && (typeof $config.Role.Ref === "string") && ($config.Role.Ref.indexOf('env.') === 0))
if (
(typeof $config.Role === "object") &&
Object.prototype.hasOwnProperty.call( $config.Role , 'Ref') &&
(typeof $config.Role.Ref === "string") &&
($config.Role.Ref.indexOf('env.') === 0)
)
$config.Role = process.env[ $config.Role.Ref.split('env.')[1] ]


Expand Down Expand Up @@ -438,14 +458,29 @@ Lambda.prototype.invoke = function( program ) {
process.exit(-1)
}

if ((typeof $config.AWS_KEY === "object") && $config.AWS_KEY.hasOwnProperty('Ref') && (typeof $config.AWS_KEY.Ref === "string") && ($config.AWS_KEY.Ref.indexOf('env.') === 0))
if (
(typeof $config.AWS_KEY === "object") &&
Object.prototype.hasOwnProperty.call( $config.AWS_KEY , 'Ref') &&
(typeof $config.AWS_KEY.Ref === "string") &&
($config.AWS_KEY.Ref.indexOf('env.') === 0)
)
$config.AWS_KEY = process.env[ $config.AWS_KEY.Ref.split('env.')[1] ]

if ((typeof $config.AWS_SECRET === "object") && $config.AWS_SECRET.hasOwnProperty('Ref') && (typeof $config.AWS_SECRET.Ref === "string") && ($config.AWS_SECRET.Ref.indexOf('env.') === 0))
if (
(typeof $config.AWS_SECRET === "object") &&
Object.prototype.hasOwnProperty.call( $config.AWS_SECRET , 'Ref') &&
(typeof $config.AWS_SECRET.Ref === "string") &&
($config.AWS_SECRET.Ref.indexOf('env.') === 0)
)
$config.AWS_SECRET = process.env[ $config.AWS_SECRET.Ref.split('env.')[1] ]


if ((typeof $config.Role === "object") && $config.Role.hasOwnProperty('Ref') && (typeof $config.Role.Ref === "string") && ($config.Role.Ref.indexOf('env.') === 0))
if (
(typeof $config.Role === "object") &&
Object.prototype.hasOwnProperty.call( $config.Role , 'Ref') &&
(typeof $config.Role.Ref === "string") &&
($config.Role.Ref.indexOf('env.') === 0)
)
$config.Role = process.env[ $config.Role.Ref.split('env.')[1] ]


Expand Down

0 comments on commit 79d2d4b

Please sign in to comment.