ibm-functions / shell

An Electron-based development tool for IBM Cloud Functions and Composer.
Apache License 2.0
60 stars 16 forks source link

Error on preview composer.merge #1101

Open epiresdasilva opened 6 years ago

epiresdasilva commented 6 years ago

I'm getting an error when I try to preview my composer file on IBM Cloud Shell specifically when I use the merge function.

Example:

const composer = require('@ibm-functions/composer')

module.exports = composer.if(
        composer.sequence(
          composer.action('credit-card-online-debit-dev-findCreditCard'),
          params => { params.value = params.status === 'ACTIVE' }
        ),
        composer.if(
          composer.sequence(
              composer.merge(
                params => { params.debitValue},
                composer.action('credit-card-online-debit-dev-findBalance'),
              ),
              params => { params.value = params.balance - params.debitValue >= 0 }
          ),
          composer.action('credit-card-online-debit-dev-provisionalDebit'),
          params => { params.message = 'failure'}
        ),
        params => { params.message = 'failure' }
    )

Error: captura de tela 2018-10-25 as 20 10 12

starpit commented 6 years ago

hi, thanks for the bug report. indeed, with the recent open sourcing of Composer, the Shell project is a bit out of date! bear with us, as we try to figure out the best approach to fixing this important issue.

epiresdasilva commented 6 years ago

@starpit no problem, thank you too. Feel free to ask for more information if you need.