adobe / aio-cli-plugin-app-dev

App Builder CLI - dev command
Apache License 2.0
0 stars 2 forks source link

Handle non-strings in createActionParametersFromRequest #100

Closed hparra closed 2 months ago

hparra commented 2 months ago

Description

Fix unhandled exception when createActionParametersFromRequest receives actionInputs values that are not strings, e.g.

# ...
      actions:
        getStageAdobeCom:
          function: ../../.build/dx-excshell-1/packages/health/actions/getStageAdobeCom.js
          runtime: nodejs:18
          web: "yes"
          annotations:
            require-adobe-auth: false
            final: true
          inputs:
            <<: [*baseInputs, *ADOBE_KEYS]
            TIMEOUT_PER_CHECK: 10000
            urls:
              - https://blog.stage.adobe.com # blog
              - https://business.stage.adobe.com # bacom
              - https://business.stage.adobe.com/blog/ # bacom-blog
              - https://milo.stage.adobe.com # milo
              - https://www.stage.adobe.com/creativecloud.html # cc
              - https://www.stage.adobe.com/acrobat.html # dc
              - https://www.stage.adobe.com # homepage

This is a naive fix. Hypothetically we should handle interpolation of strings within array or object but it's Friday evening and my own use-case works now. I didn't even know interpolation like this was thing.

Types of changes

Checklist:

codecov[bot] commented 2 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 100.00%. Comparing base (6d19970) to head (ebdd1a1). Report is 1 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #100 +/- ## ========================================= Coverage 100.00% 100.00% ========================================= Files 6 6 Lines 562 565 +3 Branches 122 124 +2 ========================================= + Hits 562 565 +3 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

purplecabbage commented 2 months ago

I am closing this, your commits were applied to #104