You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openwhisk.apache.org by al...@apache.org on 2020/12/23 22:10:55 UTC

[openwhisk-wskdebug] branch master updated (c3f0404 -> 2eb7c61)

This is an automated email from the ASF dual-hosted git repository.

alexkli pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/openwhisk-wskdebug.git.


    from c3f0404  bump openwhisk-client-js to 3.21.3
     new f6d3699  making flaky test more stable
     new f501029  npm audit fix
     new 6ffe92e  wskdebug does not work with new vs code debugger #74
     new 9aa166e  fix usage output formatting
     new e962dca  fix github formatting
     new ad940a7  readme: put name first in vs code launch.json examples
     new 8290e4f  example/nodejs: put name first in vs code launch.json examples
     new e1fbf33  travis: log detailed test output on failure
     new a6a3843  travis: log detailed test output on failure part 2
     new f94c53e  get most verbose logging on travis while keeping standard npm test quiet
     new 2eb7c61  pull image before test runs - should fix flaky agentmgr.test.js tests in Travis #84

The 11 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .travis.yml                         |  2 +-
 README.md                           | 60 ++++++++++++++++++++----------
 examples/nodejs/.vscode/launch.json | 45 ++++++++++++++++++-----
 index.js                            |  2 +-
 package-lock.json                   | 73 ++++++++++++++-----------------------
 package.json                        |  9 +++--
 src/log.js                          |  2 +-
 test/nodejs.test.js                 |  4 +-
 test/test.js                        |  6 ++-
 test/wskdebug.test.js               |  2 -
 10 files changed, 118 insertions(+), 87 deletions(-)


[openwhisk-wskdebug] 09/11: travis: log detailed test output on failure part 2

Posted by al...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit a6a38432ced10184be662d552cf69364616d51d3
Author: Alexander Klimetschek <ak...@adobe.com>
AuthorDate: Wed Dec 23 12:20:53 2020 -0800

    travis: log detailed test output on failure part 2
---
 .travis.yml | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/.travis.yml b/.travis.yml
index 1a8415b..da796b4 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -35,7 +35,4 @@ before_install:
   - ./travis/scancode.sh
 
 script:
-  - npm test
-
-after_failure:
-  - cat build/mocha.test.log
+  - npm test; cat build/mocha.test.log


[openwhisk-wskdebug] 10/11: get most verbose logging on travis while keeping standard npm test quiet

Posted by al...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit f94c53e75daf8cd04014494cba9f184a73321ae0
Author: Alexander Klimetschek <ak...@adobe.com>
AuthorDate: Wed Dec 23 13:34:58 2020 -0800

    get most verbose logging on travis while keeping standard npm test quiet
---
 .travis.yml           | 2 +-
 package.json          | 5 +++--
 src/log.js            | 2 +-
 test/wskdebug.test.js | 2 --
 4 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/.travis.yml b/.travis.yml
index da796b4..9c0aa3b 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -35,4 +35,4 @@ before_install:
   - ./travis/scancode.sh
 
 script:
-  - npm test; cat build/mocha.test.log
+  - npm run test-verbose
diff --git a/package.json b/package.json
index 1ddc287..e2872f5 100644
--- a/package.json
+++ b/package.json
@@ -20,8 +20,9 @@
     },
     "scripts": {
         "pretest": "npm install --no-save ngrok",
-        "test": "WSKDEBUG_QUIET=1 nyc mocha test/**/*.test.js && test/install/test-npm-install.sh",
-        "posttest": "eslint .",
+        "test": "WSKDEBUG_QUIET=${WSKDEBUG_QUIET:-1} nyc mocha test/**/*.test.js",
+        "test-verbose": "WSKDEBUG_QUIET=0 DEBUG=wskdebug npm run test -- -v",
+        "posttest": "test/install/test-npm-install.sh && eslint .",
         "report-coverage": "nyc report --reporter=json && codecov -f coverage/coverage-final.json"
     },
     "nyc": {
diff --git a/src/log.js b/src/log.js
index c3c136d..1d898e2 100644
--- a/src/log.js
+++ b/src/log.js
@@ -220,6 +220,6 @@ module.exports = {
     isInteractive: spinner.isEnabled
 };
 
-if (process.env.WSKDEBUG_QUIET) {
+if (process.env.WSKDEBUG_QUIET === "1") {
     module.exports.quiet(true);
 }
diff --git a/test/wskdebug.test.js b/test/wskdebug.test.js
index e771336..7da1798 100644
--- a/test/wskdebug.test.js
+++ b/test/wskdebug.test.js
@@ -69,7 +69,6 @@ describe('wskdebug cli', function() {
 
         const stdio = test.endCaptureStdout();
 
-        assert.equal(stdio.stderr, "");
         // testing a couple strings that should rarely change
         assert(stdio.stdout.includes("Debug an Apache OpenWhisk <action> by forwarding its activations to a local docker"));
         assert(stdio.stdout.includes("Supported kinds:"));
@@ -87,7 +86,6 @@ describe('wskdebug cli', function() {
         await wskdebug(`--version`);
 
         const stdio = test.endCaptureStdout();
-        assert.equal(stdio.stderr, "");
         assert.equal(stripAnsi(stdio.stdout.trim()), require(`${process.cwd()}/package.json`).version);
     });
 


[openwhisk-wskdebug] 02/11: npm audit fix

Posted by al...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit f50102946fe2f8dc7aa80c0653c22f07e474fbd1
Author: Alexander Klimetschek <ak...@adobe.com>
AuthorDate: Tue Dec 22 22:45:18 2020 -0800

    npm audit fix
---
 package-lock.json | 73 +++++++++++++++++++++----------------------------------
 package.json      |  2 +-
 2 files changed, 29 insertions(+), 46 deletions(-)

diff --git a/package-lock.json b/package-lock.json
index 7a7dd04..3966821 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -488,9 +488,9 @@
             "dev": true
         },
         "base64-js": {
-            "version": "1.3.1",
-            "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.3.1.tgz",
-            "integrity": "sha512-mLQ4i2QO1ytvGWFWmcngKO//JXAQueZvwEKtjgQFM4jIK0kU+ytMfplL8j+n5mspOfjHwoAg+9yhb7BwAHm36g=="
+            "version": "1.5.1",
+            "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz",
+            "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA=="
         },
         "bcrypt-pbkdf": {
             "version": "1.0.2",
@@ -506,9 +506,9 @@
             "integrity": "sha512-Phlt0plgpIIBOGTT/ehfFnbNlfsDEiqmzE2KRXoX1bLIlir4X/MR+zSyBEkL05ffWgnRSf/DXv+WrUAVr93/ow=="
         },
         "bl": {
-            "version": "4.0.2",
-            "resolved": "https://registry.npmjs.org/bl/-/bl-4.0.2.tgz",
-            "integrity": "sha512-j4OH8f6Qg2bGuWfRiltT2HYGx0e1QcBTrK9KAHNMwMZdQnDZFk0ZSYIpADjYCB3U12nicC5tVJwSIhwOWjb4RQ==",
+            "version": "4.0.3",
+            "resolved": "https://registry.npmjs.org/bl/-/bl-4.0.3.tgz",
+            "integrity": "sha512-fs4G6/Hu4/EE+F75J8DuN/0IpQqNjAdC7aEQv7Qt8MHGUH7Ckv2MwTEEeN9QehD0pfIDkMI1bkHYkKy7xHyKIg==",
             "requires": {
                 "buffer": "^5.5.0",
                 "inherits": "^2.0.4",
@@ -540,12 +540,12 @@
             "dev": true
         },
         "buffer": {
-            "version": "5.6.0",
-            "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.6.0.tgz",
-            "integrity": "sha512-/gDYp/UtU0eA1ys8bOs9J6a+E/KWIY+DZ+Q2WESNUA0jFRsJOc0SNUO6xJ5SGA1xueg3NL65W6s+NY5l9cunuw==",
+            "version": "5.7.1",
+            "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz",
+            "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==",
             "requires": {
-                "base64-js": "^1.0.2",
-                "ieee754": "^1.1.4"
+                "base64-js": "^1.3.1",
+                "ieee754": "^1.1.13"
             }
         },
         "buffer-from": {
@@ -834,14 +834,6 @@
             "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",
             "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A=="
         },
-        "encoding": {
-            "version": "0.1.12",
-            "resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.12.tgz",
-            "integrity": "sha1-U4tm8+5izRq1HsMjgp0flIDHS+s=",
-            "requires": {
-                "iconv-lite": "~0.4.13"
-            }
-        },
         "end-of-stream": {
             "version": "1.4.4",
             "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz",
@@ -1502,9 +1494,9 @@
             }
         },
         "ieee754": {
-            "version": "1.1.13",
-            "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.13.tgz",
-            "integrity": "sha512-4vf7I2LYV/HaWerSo3XmlMkp5eZ83i+/CDluXi/IGTs/O1sejBNhTtnxzmRZfvOUqj7lZjqHkeTvpgSFDlWZTg=="
+            "version": "1.2.1",
+            "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz",
+            "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA=="
         },
         "ignore": {
             "version": "4.0.6",
@@ -1680,11 +1672,6 @@
                 "has": "^1.0.3"
             }
         },
-        "is-stream": {
-            "version": "1.1.0",
-            "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz",
-            "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ="
-        },
         "is-symbol": {
             "version": "1.0.3",
             "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.3.tgz",
@@ -1713,12 +1700,12 @@
             "dev": true
         },
         "isomorphic-fetch": {
-            "version": "2.2.1",
-            "resolved": "https://registry.npmjs.org/isomorphic-fetch/-/isomorphic-fetch-2.2.1.tgz",
-            "integrity": "sha1-YRrhrPFPXoH3KVB0coGf6XM1WKk=",
+            "version": "3.0.0",
+            "resolved": "https://registry.npmjs.org/isomorphic-fetch/-/isomorphic-fetch-3.0.0.tgz",
+            "integrity": "sha512-qvUtwJ3j6qwsF3jLxkZ72qCgjMysPzDfeV240JHiGZsANBYd+EEuu35v7dfrJ9Up0Ak07D7GGSkGhCHTqg/5wA==",
             "requires": {
-                "node-fetch": "^1.0.1",
-                "whatwg-fetch": ">=0.10.0"
+                "node-fetch": "^2.6.1",
+                "whatwg-fetch": "^3.4.1"
             }
         },
         "istanbul-lib-coverage": {
@@ -2480,13 +2467,9 @@
             }
         },
         "node-fetch": {
-            "version": "1.7.3",
-            "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-1.7.3.tgz",
-            "integrity": "sha512-NhZ4CsKx7cYm2vSrBAr2PvFOe6sWDf0UYLRqA6svUYg7+/TSfVAu49jYC4BvQ4Sms9SZgdqGBgroqfDhJdTyKQ==",
-            "requires": {
-                "encoding": "^0.1.11",
-                "is-stream": "^1.0.1"
-            }
+            "version": "2.6.1",
+            "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.1.tgz",
+            "integrity": "sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw=="
         },
         "node-preload": {
             "version": "0.2.1",
@@ -3299,9 +3282,9 @@
             },
             "dependencies": {
                 "node-fetch": {
-                    "version": "2.6.0",
-                    "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.0.tgz",
-                    "integrity": "sha512-8dG4H5ujfvFiqDmVu9fQ5bOHUC15JMjMY/Zumv26oOvvVJjM67KF8koCWIabKQ1GJIa9r2mMZscBq/TbdOcmNA==",
+                    "version": "2.6.1",
+                    "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.1.tgz",
+                    "integrity": "sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw==",
                     "dev": true
                 }
             }
@@ -3438,9 +3421,9 @@
             }
         },
         "whatwg-fetch": {
-            "version": "3.0.0",
-            "resolved": "https://registry.npmjs.org/whatwg-fetch/-/whatwg-fetch-3.0.0.tgz",
-            "integrity": "sha512-9GSJUgz1D4MfyKU7KRqwOjXCXTqWdFNvEr7eUBYchQiVc744mqK/MzXPNR2WsPkmkOa4ywfg8C2n8h+13Bey1Q=="
+            "version": "3.5.0",
+            "resolved": "https://registry.npmjs.org/whatwg-fetch/-/whatwg-fetch-3.5.0.tgz",
+            "integrity": "sha512-jXkLtsR42xhXg7akoDKvKWE40eJeI+2KZqcp2h3NsOrRnDvtWX36KcKl30dy+hxECivdk2BVUHVNrPtoMBUx6A=="
         },
         "which": {
             "version": "1.3.1",
diff --git a/package.json b/package.json
index 04bd248..1ddc287 100644
--- a/package.json
+++ b/package.json
@@ -51,7 +51,7 @@
         "fs-extra": "^8.1.0",
         "get-port": "^5.1.1",
         "is-port-reachable": "^3.0.0",
-        "isomorphic-fetch": "^2.2.1",
+        "isomorphic-fetch": "^3.0.0",
         "livereload": "^0.9.1",
         "manakin": "^0.5.2",
         "openwhisk": "^3.21.3",


[openwhisk-wskdebug] 03/11: wskdebug does not work with new vs code debugger #74

Posted by al...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 6ffe92e725d740b69228096f386f77f8aa28a562
Author: Alexander Klimetschek <ak...@adobe.com>
AuthorDate: Wed Dec 23 00:00:19 2020 -0800

    wskdebug does not work with new vs code debugger #74
    
    document new VS Code launch config starting with VS Code 1.48
---
 README.md                           | 49 ++++++++++++++++++++++++++-----------
 examples/nodejs/.vscode/launch.json | 37 +++++++++++++++++++++++-----
 2 files changed, 66 insertions(+), 20 deletions(-)

diff --git a/README.md b/README.md
index b43f064..001e607 100644
--- a/README.md
+++ b/README.md
@@ -122,21 +122,36 @@ The action to debug (e.g. `myaction`) must already be deployed.
 <a name="nodejs-visual-studio-code"></a>
 ### Node.js: Visual Studio Code
 
-> ⚠️ **VS Code June 2020 release (version 1.47) breaks wskdebug**
->
-> Breakpoints will not hit because it debugs the wskdebug process instead of the action.
->
-> Workaround: set `"debug.javascript.usePreview": false` in your VS Code `settings.json`.
->
-> A better solution will come with a new VS Code update and wskdebug 1.3.0.
->
-> More details in [issue #74](https://github.com/apache/openwhisk-wskdebug/issues/74).
-
 Add the configuration below to your [launch.json](https://code.visualstudio.com/docs/editor/debugging#_launch-configurations). Replace `MYACTION` with the name of your action and `ACTION.js` with the source file containing the action. When you run this, it will start wskdebug and should automatically connect the debugger.
 
 ```json
     "configurations": [
         {
+            "type": "pwa-node",
+            "request": "launch",
+            "name": "wskdebug MYACTION", // <-- adjust name for debug drop-down
+            "attachSimplePort": 0,
+            "killBehavior": "polite",
+            "runtimeExecutable": "wskdebug",
+            "args": [
+                "MYACTION",  // <-- replace with name of the action
+                "ACTION.js", // <-- replace with local path to action source file
+                "--cleanup", // remove helper actions on shutdown
+                "-l",        // enable live-reload
+                "-v"         // log parameters and results
+            ],
+            "localRoot": "${workspaceFolder}",
+            "remoteRoot": "/code",
+            "outputCapture": "std"
+        }
+    ]
+```
+
+In **VS Code versions <= 1.47** use the config below. If you use 1.47, you also have to set `"debug.javascript.usePreview": false` in your VS Code `settings.json`. See also [issue #74](https://github.com/apache/openwhisk-wskdebug/issues/74).
+
+```json
+    "configurations": [
+        {
             "type": "node",
             "request": "launch",
             "name": "wskdebug MYACTION",
@@ -149,7 +164,7 @@ Add the configuration below to your [launch.json](https://code.visualstudio.com/
     ]
 ```
 
-Stop the debugger in VS Code to end the debugging session and `wskdebug`.
+After you are done with the debugging, stop the debugger in VS Code to end the debugging session and `wskdebug`.
 
 This snippets enables browser LiveReloading using `-l`. For other reloading options, see [live reloading](#live-reloading).
 
@@ -175,9 +190,11 @@ To use custom credentials from a custom `.wskprops` and/or use a developer-speci
     ```json
     "configurations": [
         {
-            "type": "node",
+            "type": "pwa-node",
             "request": "launch",
             "name": "wskdebug",
+            "attachSimplePort": 0,
+            "killBehavior": "polite",
             "runtimeExecutable": "wskdebug",
             "args": [ "MYACTION", "ACTION.js", "-l" ],
             "localRoot": "${workspaceFolder}",
@@ -200,8 +217,10 @@ Here is a `.vscode/launch.json` example that uses compounds to expose a config s
 {
   "configurations": [
     {
-      "type": "node",
+      "type": "pwa-node",
       "request": "launch",
+      "attachSimplePort": 0,
+      "killBehavior": "polite",
       "name": "mypackage/action1",
       "runtimeExecutable": "wskdebug",
       "args": [
@@ -213,8 +232,10 @@ Here is a `.vscode/launch.json` example that uses compounds to expose a config s
       "outputCapture": "std"
     },
     {
-      "type": "node",
+      "type": "pwa-node",
       "request": "launch",
+      "attachSimplePort": 0,
+      "killBehavior": "polite",
       "name": "mypackage/action2",
       "runtimeExecutable": "wskdebug",
       "args": [
diff --git a/examples/nodejs/.vscode/launch.json b/examples/nodejs/.vscode/launch.json
index 47501f7..50f334b 100644
--- a/examples/nodejs/.vscode/launch.json
+++ b/examples/nodejs/.vscode/launch.json
@@ -5,9 +5,27 @@
     "version": "0.2.0",
     "configurations": [
         {
+            "type": "pwa-node",
+            "request": "launch",
+            "attachSimplePort": 0, // instead of "port", makes it auto-select a free debug port
+            "killBehavior": "polite",
+            "name": "wskdebug",
+            "runtimeExecutable": "wskdebug",
+            "args": [
+                "wskdebug-examples/webaction",
+                "${workspaceFolder}/webaction.js",
+                "--cleanup", // remove helper actions on shutdown (takes longer)
+                "-l", // enable live-reload
+                "-v"  // log parameters and results
+            ],
+            "localRoot": "${workspaceFolder}",
+            "remoteRoot": "/code",
+            "outputCapture": "std"
+        },
+        {
             "type": "node",
             "request": "launch",
-            "name": "wskdebug sample webaction",
+            "name": "wskdebug (VS Code <= 1.47)",
             "runtimeExecutable": "wskdebug",
             "args": [
                 "wskdebug-examples/webaction",
@@ -20,8 +38,10 @@
             "outputCapture": "std"
         },
         {
-            "type": "node",
+            "type": "pwa-node",
             "request": "launch",
+            "attachSimplePort": 0,
+            "killBehavior": "polite",
             "name": "wskdebug ngrok",
             "runtimeExecutable": "wskdebug",
             "args": [
@@ -35,24 +55,29 @@
             "outputCapture": "std"
         },
         {
-            "type": "node",
+            "type": "pwa-node",
             "request": "launch",
+            "attachSimplePort": 0,
+            "killBehavior": "polite",
             "name": "wskdebug with build",
             "runtimeExecutable": "wskdebug",
             "args": [
                 "wskdebug-examples/webaction",
                 "${workspaceFolder}/webaction.js",
                 "-l",
-                "--on-build", "mkdir build/; cp webaction.js build/",
-                "--build-path", "build/webaction.js"
+                "--on-build", "mkdir -p build/; cp webaction.js build/",
+                "--build-path", "build/webaction.js",
+                "--cleanup"
             ],
             "localRoot": "${workspaceFolder}",
             "remoteRoot": "/code",
             "outputCapture": "std"
         },
         {
-            "type": "node",
+            "type": "pwa-node",
             "request": "launch",
+            "attachSimplePort": 0,
+            "killBehavior": "polite",
             "name": "wskdebug with WSK_PACKAGE",
             "runtimeExecutable": "wskdebug",
             "args": [


[openwhisk-wskdebug] 11/11: pull image before test runs - should fix flaky agentmgr.test.js tests in Travis #84

Posted by al...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 2eb7c610cc3881e3155e0a5c2b77d7a70fd0bc09
Author: Alexander Klimetschek <ak...@adobe.com>
AuthorDate: Wed Dec 23 13:47:39 2020 -0800

    pull image before test runs - should fix flaky agentmgr.test.js tests in Travis #84
---
 package.json | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/package.json b/package.json
index e2872f5..4260447 100644
--- a/package.json
+++ b/package.json
@@ -19,7 +19,7 @@
         "wskdebug": "./wskdebug.js"
     },
     "scripts": {
-        "pretest": "npm install --no-save ngrok",
+        "pretest": "npm install --no-save ngrok && docker pull adobeapiplatform/adobe-action-nodejs-v10:3.0.21",
         "test": "WSKDEBUG_QUIET=${WSKDEBUG_QUIET:-1} nyc mocha test/**/*.test.js",
         "test-verbose": "WSKDEBUG_QUIET=0 DEBUG=wskdebug npm run test -- -v",
         "posttest": "test/install/test-npm-install.sh && eslint .",


[openwhisk-wskdebug] 06/11: readme: put name first in vs code launch.json examples

Posted by al...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit ad940a7927bfc4b00844a32da17928bc9cb3e46b
Author: Alexander Klimetschek <ak...@adobe.com>
AuthorDate: Wed Dec 23 11:06:13 2020 -0800

    readme: put name first in vs code launch.json examples
---
 README.md | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/README.md b/README.md
index 52101ef..d9e564a 100644
--- a/README.md
+++ b/README.md
@@ -127,9 +127,9 @@ Add the configuration below to your [launch.json](https://code.visualstudio.com/
 ```
     "configurations": [
         {
+            "name": "wskdebug MYACTION", // <-- adjust name for debug drop-down
             "type": "pwa-node",
             "request": "launch",
-            "name": "wskdebug MYACTION", // <-- adjust name for debug drop-down
             "attachSimplePort": 0,
             "killBehavior": "polite",
             "runtimeExecutable": "wskdebug",
@@ -153,9 +153,9 @@ In **VS Code versions <= 1.47** use the config below. If you use 1.47, you also
     "configurations": [
         {
             // legacy launch config for VS Code <= 1.47
+            "name": "wskdebug MYACTION",
             "type": "node",
             "request": "launch",
-            "name": "wskdebug MYACTION",
             "runtimeExecutable": "wskdebug",
             "args": [ "MYACTION", "ACTION.js", "-l" ],
             "localRoot": "${workspaceFolder}",
@@ -191,9 +191,9 @@ To use custom credentials from a custom `.wskprops` and/or use a developer-speci
     ```json
     "configurations": [
         {
+            "name": "wskdebug",
             "type": "pwa-node",
             "request": "launch",
-            "name": "wskdebug",
             "attachSimplePort": 0,
             "killBehavior": "polite",
             "runtimeExecutable": "wskdebug",
@@ -218,11 +218,11 @@ Here is a `.vscode/launch.json` example that uses compounds to expose a config s
 {
   "configurations": [
     {
+      "name": "mypackage/action1",
       "type": "pwa-node",
       "request": "launch",
       "attachSimplePort": 0,
       "killBehavior": "polite",
-      "name": "mypackage/action1",
       "runtimeExecutable": "wskdebug",
       "args": [
         "mypackage/action1",
@@ -233,11 +233,11 @@ Here is a `.vscode/launch.json` example that uses compounds to expose a config s
       "outputCapture": "std"
     },
     {
+      "name": "mypackage/action2",
       "type": "pwa-node",
       "request": "launch",
       "attachSimplePort": 0,
       "killBehavior": "polite",
-      "name": "mypackage/action2",
       "runtimeExecutable": "wskdebug",
       "args": [
         "mypackage/action2",


[openwhisk-wskdebug] 05/11: fix github formatting

Posted by al...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit e962dcac98debda0113d4f2da1145bbc4a09a0cf
Author: Alexander Klimetschek <ak...@adobe.com>
AuthorDate: Wed Dec 23 11:00:10 2020 -0800

    fix github formatting
---
 README.md | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/README.md b/README.md
index 001e607..52101ef 100644
--- a/README.md
+++ b/README.md
@@ -124,7 +124,7 @@ The action to debug (e.g. `myaction`) must already be deployed.
 
 Add the configuration below to your [launch.json](https://code.visualstudio.com/docs/editor/debugging#_launch-configurations). Replace `MYACTION` with the name of your action and `ACTION.js` with the source file containing the action. When you run this, it will start wskdebug and should automatically connect the debugger.
 
-```json
+```
     "configurations": [
         {
             "type": "pwa-node",
@@ -149,9 +149,10 @@ Add the configuration below to your [launch.json](https://code.visualstudio.com/
 
 In **VS Code versions <= 1.47** use the config below. If you use 1.47, you also have to set `"debug.javascript.usePreview": false` in your VS Code `settings.json`. See also [issue #74](https://github.com/apache/openwhisk-wskdebug/issues/74).
 
-```json
+```
     "configurations": [
         {
+            // legacy launch config for VS Code <= 1.47
             "type": "node",
             "request": "launch",
             "name": "wskdebug MYACTION",


[openwhisk-wskdebug] 07/11: example/nodejs: put name first in vs code launch.json examples

Posted by al...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 8290e4f0fd4c72ef1147a44501f60f11060c145f
Author: Alexander Klimetschek <ak...@adobe.com>
AuthorDate: Wed Dec 23 11:07:06 2020 -0800

    example/nodejs: put name first in vs code launch.json examples
---
 examples/nodejs/.vscode/launch.json | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/examples/nodejs/.vscode/launch.json b/examples/nodejs/.vscode/launch.json
index 50f334b..c952cf3 100644
--- a/examples/nodejs/.vscode/launch.json
+++ b/examples/nodejs/.vscode/launch.json
@@ -5,11 +5,11 @@
     "version": "0.2.0",
     "configurations": [
         {
+            "name": "wskdebug",
             "type": "pwa-node",
             "request": "launch",
             "attachSimplePort": 0, // instead of "port", makes it auto-select a free debug port
             "killBehavior": "polite",
-            "name": "wskdebug",
             "runtimeExecutable": "wskdebug",
             "args": [
                 "wskdebug-examples/webaction",
@@ -23,9 +23,9 @@
             "outputCapture": "std"
         },
         {
+            "name": "wskdebug (VS Code <= 1.47)",
             "type": "node",
             "request": "launch",
-            "name": "wskdebug (VS Code <= 1.47)",
             "runtimeExecutable": "wskdebug",
             "args": [
                 "wskdebug-examples/webaction",
@@ -38,11 +38,11 @@
             "outputCapture": "std"
         },
         {
+            "name": "wskdebug ngrok",
             "type": "pwa-node",
             "request": "launch",
             "attachSimplePort": 0,
             "killBehavior": "polite",
-            "name": "wskdebug ngrok",
             "runtimeExecutable": "wskdebug",
             "args": [
                 "wskdebug-examples/webaction",
@@ -55,11 +55,11 @@
             "outputCapture": "std"
         },
         {
+            "name": "wskdebug with build",
             "type": "pwa-node",
             "request": "launch",
             "attachSimplePort": 0,
             "killBehavior": "polite",
-            "name": "wskdebug with build",
             "runtimeExecutable": "wskdebug",
             "args": [
                 "wskdebug-examples/webaction",
@@ -74,11 +74,11 @@
             "outputCapture": "std"
         },
         {
+            "name": "wskdebug with WSK_PACKAGE",
             "type": "pwa-node",
             "request": "launch",
             "attachSimplePort": 0,
             "killBehavior": "polite",
-            "name": "wskdebug with WSK_PACKAGE",
             "runtimeExecutable": "wskdebug",
             "args": [
                 "webaction"
@@ -89,4 +89,4 @@
             "envFile": "${workspaceFolder}/.env"
         }
     ]
-}
\ No newline at end of file
+}


[openwhisk-wskdebug] 04/11: fix usage output formatting

Posted by al...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 9aa166e60b606d1c90264412505ee4e27e9cdfdd
Author: Alexander Klimetschek <ak...@adobe.com>
AuthorDate: Wed Dec 23 00:01:16 2020 -0800

    fix usage output formatting
---
 index.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/index.js b/index.js
index 57ec503..f277930 100644
--- a/index.js
+++ b/index.js
@@ -150,7 +150,7 @@ function yargsOptions(yargs) {
         alias: "condition",
         type: "string",
         group: "Agent options:",
-        describe: "Hit condition to trigger debugger. Javascript expression evaluated against input parameters. Example: 'debug == 'true'"
+        describe: "Hit condition to trigger debugger. Javascript expression evaluated against input parameters. Example: `debug == 'true'`"
     });
     yargs.option("agent-timeout", {
         type: "number",


[openwhisk-wskdebug] 01/11: making flaky test more stable

Posted by al...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit f6d369941ae3967f91fb5ef8f796c9cdaf8ba310
Author: Alexander Klimetschek <ak...@adobe.com>
AuthorDate: Tue Dec 22 21:48:47 2020 -0800

    making flaky test more stable
---
 test/nodejs.test.js | 4 ++--
 test/test.js        | 6 ++++--
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/test/nodejs.test.js b/test/nodejs.test.js
index 7369529..4608187 100644
--- a/test/nodejs.test.js
+++ b/test/nodejs.test.js
@@ -490,7 +490,7 @@ describe('nodejs', function() {
             { msg: "CORRECT/RESULT" },
             async () => {
                 // change action.js to test reloading
-                console.log("simulating modifiying action.js...");
+                console.log("[test] simulating modifiying action.js...");
 
                 fs.writeFileSync(`action.js`,
                     `
@@ -501,7 +501,7 @@ describe('nodejs', function() {
                     }
                 `);
 
-                await sleep(1);
+                await sleep(100);
             },
             { msg: "SECOND" },
             true // binary
diff --git a/test/test.js b/test/test.js
index ce8904d..74ac79d 100644
--- a/test/test.js
+++ b/test/test.js
@@ -282,6 +282,7 @@ function mockActionDoubleInvocation(action, code, params, result1, runBetween, r
     nockActivation(
         action,
         body => {
+            console.log("[test] mockActionDoubleInvocation: asserting result1")
             assert.deepStrictEqual(body, result1);
             return true;
         }
@@ -298,8 +299,8 @@ function mockActionDoubleInvocation(action, code, params, result1, runBetween, r
     result2.$activationId = activationId2;
 
     nockActivation(action, body => body.$waitForActivation === true)
-        .reply(200, () => {
-            runBetween();
+        .reply(200, async () => {
+            await runBetween();
             return {
                 response: {
                     result: Object.assign(params, { $activationId: activationId2 })
@@ -311,6 +312,7 @@ function mockActionDoubleInvocation(action, code, params, result1, runBetween, r
     nockActivation(
         action,
         body => {
+            console.log("[test] mockActionDoubleInvocation: asserting result2")
             assert.deepStrictEqual(body, result2);
             return true;
         }


[openwhisk-wskdebug] 08/11: travis: log detailed test output on failure

Posted by al...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit e1fbf33fbae2d43faabe4acb791f202215a27ebc
Author: Alexander Klimetschek <ak...@adobe.com>
AuthorDate: Wed Dec 23 12:03:17 2020 -0800

    travis: log detailed test output on failure
---
 .travis.yml | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/.travis.yml b/.travis.yml
index f2a7dbc..1a8415b 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -35,4 +35,7 @@ before_install:
   - ./travis/scancode.sh
 
 script:
-  - npm test -- -v
+  - npm test
+
+after_failure:
+  - cat build/mocha.test.log