Comparing version 1.0.17 to 1.0.18
@@ -19,2 +19,3 @@ /* | ||
tmp = require('tmp'), | ||
url = require('url'), | ||
path = require('path'), | ||
@@ -49,7 +50,15 @@ { getCreds } = require('./creds') | ||
} else { | ||
const url = `${apiHost}/api/v1/namespaces/${encodeURIComponent(action.namespace)}/actions/${encodeURIComponent(action.name)}?blocking=true&result=true` | ||
console.error(path, url) | ||
const apiHostParse = url.parse(apiHost) | ||
if (options.direct) { | ||
// talk directly to the openwhisk controller | ||
apiHostParse.protocol = 'http:' | ||
apiHostParse.port = 10001 | ||
delete apiHostParse.host | ||
} | ||
const theURL = `${url.format(apiHostParse)}api/v1/namespaces/${encodeURIComponent(action.namespace)}/actions/${encodeURIComponent(action.name)}?blocking=true&result=true` | ||
console.error(path, theURL) | ||
resolve({ | ||
script: path, cleanupCallback, url | ||
script: path, cleanupCallback, url: theURL | ||
}) | ||
@@ -56,0 +65,0 @@ } |
{ | ||
"name": "croaker", | ||
"version": "1.0.17", | ||
"version": "1.0.18", | ||
"description": "Load testing plugin for the Cloud Shell", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
60647
1335