openwhisk-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tard...@apache.org
Subject [openwhisk-composer] branch master updated: feat: add support for passthrough http optons on deploy (#46)
Date Thu, 14 Nov 2019 22:37:33 GMT
This is an automated email from the ASF dual-hosted git repository.

tardieu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/openwhisk-composer.git


The following commit(s) were added to refs/heads/master by this push:
     new 308f149  feat: add support for passthrough http optons on deploy (#46)
308f149 is described below

commit 308f149c6829ae976b92124d497189ef86a019c5
Author: Nick Mitchell <starpit@users.noreply.github.com>
AuthorDate: Thu Nov 14 17:37:15 2019 -0500

    feat: add support for passthrough http optons on deploy (#46)
---
 client.js | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/client.js b/client.js
index 2794e0f..233b4a2 100644
--- a/client.js
+++ b/client.js
@@ -81,8 +81,13 @@ class Compositions {
     this.actions = wsk.actions
   }
 
-  deploy (composition, overwrite, debug, kind, timeout, memory, logs) {
-    const actions = (composition.actions || []).concat(conductor.generate(composition, debug,
kind, timeout, memory, logs))
+  deploy (composition, overwrite, debug, kind, timeout, memory, logs, httpOptions) {
+    function addHttpOptions (action) {
+      // the openwhisk npm allows passthrough request-style options
+      return Object.assign({}, action, httpOptions)
+    }
+
+    const actions = (composition.actions || []).concat(conductor.generate(composition, debug,
kind, timeout, memory, logs)).map(addHttpOptions)
     return actions.reduce((promise, action) => promise.then(() => overwrite &&
this.actions.delete(action).catch(() => { }))
       .then(() => this.actions.create(action)), Promise.resolve())
       .then(() => actions)


Mime
View raw message