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

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


The following commit(s) were added to refs/heads/master by this push:
     new 8faa2e8  getting rid of node modules (#937)
8faa2e8 is described below

commit 8faa2e8b97f7a2c54c58fa9ebac67965da0d8301
Author: Priti Desai <[email protected]>
AuthorDate: Thu May 24 18:04:58 2018 -0700

    getting rid of node modules (#937)
    
    * getting rid of node modules
    
    * adding zip file
---
 tests/src/integration/docker/actions/exec.zip      | Bin 223 -> 334 bytes
 .../runtimetests/src/helloworld/helloworld.zip     | Bin 5764 -> 684 bytes
 .../runtimetests/src/helloworld/index.js           |  17 +-
 .../node_modules/string-format/README.md           | 211 ---------------------
 .../string-format/lib/string-format.js             | 107 -----------
 .../node_modules/string-format/package.json        | 101 ----------
 .../runtimetests/src/helloworld/package.json       |  16 +-
 .../actions/Hello.java                             |  32 ++++
 8 files changed, 47 insertions(+), 437 deletions(-)

diff --git a/tests/src/integration/docker/actions/exec.zip 
b/tests/src/integration/docker/actions/exec.zip
index e81c16a..55538e0 100644
Binary files a/tests/src/integration/docker/actions/exec.zip and 
b/tests/src/integration/docker/actions/exec.zip differ
diff --git a/tests/src/integration/runtimetests/src/helloworld/helloworld.zip 
b/tests/src/integration/runtimetests/src/helloworld/helloworld.zip
index 190f0ef..dafb5a3 100644
Binary files a/tests/src/integration/runtimetests/src/helloworld/helloworld.zip 
and b/tests/src/integration/runtimetests/src/helloworld/helloworld.zip differ
diff --git a/tests/src/integration/runtimetests/src/helloworld/index.js 
b/tests/src/integration/runtimetests/src/helloworld/index.js
index 838dd88..38c3ad8 100644
--- a/tests/src/integration/runtimetests/src/helloworld/index.js
+++ b/tests/src/integration/runtimetests/src/helloworld/index.js
@@ -1,11 +1,16 @@
 // Licensed to the Apache Software Foundation (ASF) under one or more 
contributor
 // license agreements; and to You under the Apache License, Version 2.0.
 
-function helloworld(params) {
-    var format = require('string-format');
-    var name = params.name || 'Stranger';
-    payload = format('Hello, {}!', name)
-    return { message: payload };
+/**
+ * Return a simple greeting message for someone.
+ *
+ * @param name A person's name.
+ * @param place Where the person is from.
+ */
+function main(params) {
+    var name = params.name || params.payload || 'stranger';
+    var place = params.place || 'somewhere';
+    return {payload:  'Hello, ' + name + ' from ' + place + '!'};
 }
+exports.main = main;
 
-exports.main = helloworld;
diff --git 
a/tests/src/integration/runtimetests/src/helloworld/node_modules/string-format/README.md
 
b/tests/src/integration/runtimetests/src/helloworld/node_modules/string-format/README.md
deleted file mode 100644
index 317d65a..0000000
--- 
a/tests/src/integration/runtimetests/src/helloworld/node_modules/string-format/README.md
+++ /dev/null
@@ -1,211 +0,0 @@
-<!--
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License.  You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
--->
-
-# String::format
-
-String::format is a small JavaScript library for formatting strings, based on
-Python's [`str.format()`][1]. For example:
-
-```javascript
-'"{firstName} {lastName}" <{email}>'.format(user)
-// => '"Jane Smith" <[email protected]>'
-```
-
-The equivalent concatenation:
-
-```javascript
-'"' + user.firstName + ' ' + user.lastName + '" <' + user.email + '>'
-// => '"Jane Smith" <[email protected]>'
-```
-
-### Installation
-
-#### Node
-
-1.  Install:
-
-        $ npm install string-format
-
-2.  Require:
-
-        var format = require('string-format')
-
-#### Browser
-
-1.  Define `window.format`:
-
-        <script src="path/to/string-format.js"></script>
-
-### Modes
-
-String::format can be used in two modes: [function mode](#function-mode) and
-[method mode](#method-mode).
-
-#### Function mode
-
-```javascript
-format('Hello, {}!', 'Alice')
-// => 'Hello, Alice!'
-```
-
-In this mode the first argument is a template string and the remaining
-arguments are values to be interpolated.
-
-#### Method mode
-
-```javascript
-'Hello, {}!'.format('Alice')
-// => 'Hello, Alice!'
-```
-
-In this mode values to be interpolated are supplied to the `format` method
-of a template string. This mode is not enabled by default. The method must
-first be defined via [`format.extend`](#formatextendprototype-transformers):
-
-```javascript
-format.extend(String.prototype)
-```
-
-`format(template, $0, $1, …, $N)` and `template.format($0, $1, …, $N)` can then
-be used interchangeably.
-
-### `format(template, $0, $1, …, $N)`
-
-Returns the result of replacing each `{…}` placeholder in the template string
-with its corresponding replacement.
-
-Placeholders may contain numbers which refer to positional arguments:
-
-```javascript
-'{0}, you have {1} unread message{2}'.format('Holly', 2, 's')
-// => 'Holly, you have 2 unread messages'
-```
-
-Unmatched placeholders produce no output:
-
-```javascript
-'{0}, you have {1} unread message{2}'.format('Steve', 1)
-// => 'Steve, you have 1 unread message'
-```
-
-A format string may reference a positional argument multiple times:
-
-```javascript
-"The name's {1}. {0} {1}.".format('James', 'Bond')
-// => "The name's Bond. James Bond."
-```
-
-Positional arguments may be referenced implicitly:
-
-```javascript
-'{}, you have {} unread message{}'.format('Steve', 1)
-// => 'Steve, you have 1 unread message'
-```
-
-A format string must not contain both implicit and explicit references:
-
-```javascript
-'My name is {} {}. Do you like the name {0}?'.format('Lemony', 'Snicket')
-// => ValueError: cannot switch from implicit to explicit numbering
-```
-
-`{{` and `}}` in format strings produce `{` and `}`:
-
-```javascript
-'{{}} creates an empty {} in {}'.format('dictionary', 'Python')
-// => '{} creates an empty dictionary in Python'
-```
-
-Dot notation may be used to reference object properties:
-
-```javascript
-var bobby = {firstName: 'Bobby', lastName: 'Fischer'}
-var garry = {firstName: 'Garry', lastName: 'Kasparov'}
-
-'{0.firstName} {0.lastName} vs. {1.firstName} {1.lastName}'.format(bobby, 
garry)
-// => 'Bobby Fischer vs. Garry Kasparov'
-```
-
-`0.` may be omitted when referencing a property of `{0}`:
-
-```javascript
-var repo = {owner: 'davidchambers', slug: 'string-format'}
-
-'https://github.com/{owner}/{slug}'.format(repo)
-// => 'https://github.com/davidchambers/string-format'
-```
-
-If the referenced property is a method, it is invoked with no arguments to
-determine the replacement:
-
-```javascript
-var sheldon = {
-  firstName:  'Sheldon',
-  lastName:   'Cooper',
-  dob:        new Date('1970-01-01'),
-  fullName:   function() { return '{firstName} {lastName}'.format(this) },
-  quip:       function() { return 'Bazinga!' }
-}
-
-'{fullName} was born at precisely {dob.toISOString}'.format(sheldon)
-// => 'Sheldon Cooper was born at precisely 1970-01-01T00:00:00.000Z'
-
-"I've always wanted to go to a goth club. {quip.toUpperCase}".format(sheldon)
-// => "I've always wanted to go to a goth club. BAZINGA!"
-```
-
-### `format.extend(prototype[, transformers])`
-
-This function defines a `format` method on the provided prototype (presumably
-`String.prototype`). One may provide an object mapping names to transformers.
-A transformer is applied if its name appears, prefixed with `!`, after a field
-name in a template string.
-
-```javascript
-format.extend(String.prototype, {
-  escape: function(s) {
-    return s.replace(/[&<>"'`]/g, function(c) {
-      return '&#' + c.charCodeAt(0) + ';'
-    })
-  },
-  upper: function(s) { return s.toUpperCase() }
-})
-
-'Hello, {!upper}!'.format('Alice')
-// => 'Hello, ALICE!'
-
-var restaurant = {
-  name: 'Anchor & Hope',
-  url: 'http://anchorandhopesf.com/'
-}
-
-'<a href="{url!escape}">{name!escape}</a>'.format(restaurant)
-// => '<a href="http://anchorandhopesf.com/";>Anchor &#38; Hope</a>'
-```
-
-### Running the test suite
-
-```console
-$ npm install
-$ npm test
-```
-
-
-[1]: http://docs.python.org/library/stdtypes.html#str.format
-[2]: 
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/bind
diff --git 
a/tests/src/integration/runtimetests/src/helloworld/node_modules/string-format/lib/string-format.js
 
b/tests/src/integration/runtimetests/src/helloworld/node_modules/string-format/lib/string-format.js
deleted file mode 100644
index 3d562c5..0000000
--- 
a/tests/src/integration/runtimetests/src/helloworld/node_modules/string-format/lib/string-format.js
+++ /dev/null
@@ -1,107 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more 
contributor
-# license agreements; and to You under the Apache License, Version 2.0.
-
-// Generated by CoffeeScript 1.8.0
-(function() {
-  var ValueError, create, explicitToImplicit, format, implicitToExplicit, 
lookup, resolve,
-    __hasProp = {}.hasOwnProperty,
-    __extends = function(child, parent) { for (var key in parent) { if 
(__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { 
this.constructor = child; } ctor.prototype = parent.prototype; child.prototype 
= new ctor(); child.__super__ = parent.prototype; return child; },
-    __slice = [].slice;
-
-  ValueError = (function(_super) {
-    __extends(ValueError, _super);
-
-    function ValueError(message) {
-      this.message = message;
-    }
-
-    ValueError.prototype.name = 'ValueError';
-
-    return ValueError;
-
-  })(Error);
-
-  implicitToExplicit = 'cannot switch from implicit to explicit numbering';
-
-  explicitToImplicit = 'cannot switch from explicit to implicit numbering';
-
-  create = function(transformers) {
-    if (transformers == null) {
-      transformers = {};
-    }
-    return function() {
-      var args, explicit, idx, implicit, message, template;
-      template = arguments[0], args = 2 <= arguments.length ? 
__slice.call(arguments, 1) : [];
-      idx = 0;
-      explicit = implicit = false;
-      message = 'cannot switch from {} to {} numbering';
-      return template.replace(/([{}])\1|[{](.*?)(?:!(.+?))?[}]/g, 
function(match, literal, key, transformer) {
-        var value, _ref, _ref1;
-        if (literal) {
-          return literal;
-        }
-        if (key.length) {
-          if (implicit) {
-            throw new ValueError(implicitToExplicit);
-          }
-          explicit = true;
-          value = (_ref = lookup(args, key)) != null ? _ref : '';
-        } else {
-          if (explicit) {
-            throw new ValueError(explicitToImplicit);
-          }
-          implicit = true;
-          value = (_ref1 = args[idx++]) != null ? _ref1 : '';
-        }
-        if (Object.prototype.hasOwnProperty.call(transformers, transformer)) {
-          return transformers[transformer](value);
-        } else {
-          return value;
-        }
-      });
-    };
-  };
-
-  lookup = function(object, key) {
-    var match;
-    if (!/^(\d+)([.]|$)/.test(key)) {
-      key = '0.' + key;
-    }
-    while (match = /(.+?)[.](.+)/.exec(key)) {
-      object = resolve(object, match[1]);
-      key = match[2];
-    }
-    return resolve(object, key);
-  };
-
-  resolve = function(object, key) {
-    var value;
-    value = object[key];
-    if (typeof value === 'function') {
-      return value.call(object);
-    } else {
-      return value;
-    }
-  };
-
-  format = create({});
-
-  format.create = create;
-
-  format.extend = function(prototype, transformers) {
-    var $format;
-    $format = create(transformers);
-    prototype.format = function() {
-      return $format.apply(null, [this].concat(__slice.call(arguments)));
-    };
-  };
-
-  if (typeof module !== 'undefined') {
-    module.exports = format;
-  } else if (typeof define === 'function' && define.amd) {
-    define(format);
-  } else {
-    window.format = format;
-  }
-
-}).call(this);
diff --git 
a/tests/src/integration/runtimetests/src/helloworld/node_modules/string-format/package.json
 
b/tests/src/integration/runtimetests/src/helloworld/node_modules/string-format/package.json
deleted file mode 100644
index d6524b6..0000000
--- 
a/tests/src/integration/runtimetests/src/helloworld/node_modules/string-format/package.json
+++ /dev/null
@@ -1,101 +0,0 @@
-{
-  "_args": [
-    [
-      {
-        "raw": "[email protected]",
-        "scope": null,
-        "escapedName": "string-format",
-        "name": "string-format",
-        "rawSpec": "0.5.0",
-        "spec": "0.5.0",
-        "type": "version"
-      },
-      ""
-    ]
-  ],
-  "_from": "[email protected]",
-  "_id": "[email protected]",
-  "_inCache": true,
-  "_location": "/string-format",
-  "_npmUser": {
-    "name": "davidchambers",
-    "email": "[email protected]"
-  },
-  "_npmVersion": "1.4.28",
-  "_phantomChildren": {},
-  "_requested": {
-    "raw": "[email protected]",
-    "scope": null,
-    "escapedName": "string-format",
-    "name": "string-format",
-    "rawSpec": "0.5.0",
-    "spec": "0.5.0",
-    "type": "version"
-  },
-  "_requiredBy": [
-    "/"
-  ],
-  "_resolved": 
"https://registry.npmjs.org/string-format/-/string-format-0.5.0.tgz";,
-  "_shasum": "bfc4a69a250f17f273d97336797daf5dca6ecf30",
-  "_shrinkwrap": null,
-  "_spec": "[email protected]",
-  "_where": "",
-  "author": {
-    "name": "David Chambers",
-    "email": "[email protected]"
-  },
-  "bugs": {
-    "url": "https://github.com/davidchambers/string-format/issues";
-  },
-  "dependencies": {},
-  "description": "Adds a `format` method to `String.prototype`. Inspired by 
Python's `str.format()`.",
-  "devDependencies": {
-    "coffee-script": "1.8.x",
-    "mocha": "2.x.x",
-    "ramda": "0.8.x",
-    "xyz": "0.5.x"
-  },
-  "directories": {},
-  "dist": {
-    "shasum": "bfc4a69a250f17f273d97336797daf5dca6ecf30",
-    "tarball": 
"https://registry.npmjs.org/string-format/-/string-format-0.5.0.tgz";
-  },
-  "files": [
-    "README.md",
-    "lib/string-format.js",
-    "package.json"
-  ],
-  "gitHead": "e98595d385a460edb8fe9bd384fe1af3da307a31",
-  "homepage": "https://github.com/davidchambers/string-format";,
-  "keywords": [
-    "string",
-    "formatting",
-    "language",
-    "util"
-  ],
-  "licenses": [
-    {
-      "type": "WTFPL",
-      "url": 
"https://raw.github.com/davidchambers/string-format/master/LICENSE";
-    }
-  ],
-  "main": "./lib/string-format",
-  "maintainers": [
-    {
-      "name": "davidchambers",
-      "email": "[email protected]"
-    }
-  ],
-  "name": "string-format",
-  "optionalDependencies": {},
-  "readme": "ERROR: No README data found!",
-  "repository": {
-    "type": "git",
-    "url": "git://github.com/davidchambers/string-format.git"
-  },
-  "scripts": {
-    "prepublish": "make clean && make",
-    "test": "make test"
-  },
-  "version": "0.5.0"
-}
diff --git a/tests/src/integration/runtimetests/src/helloworld/package.json 
b/tests/src/integration/runtimetests/src/helloworld/package.json
index 94de3f9..80cb6cd 100644
--- a/tests/src/integration/runtimetests/src/helloworld/package.json
+++ b/tests/src/integration/runtimetests/src/helloworld/package.json
@@ -1,14 +1,6 @@
 {
-       "name": "hello-world-sample",
-       "description": "",
-       "license": "Apache-2.0",
-       "repository": {
-               "type": "git",
-               "url": "https://github.com/apache/incubator-openwhisk-wskdeploy";
-       },
-       "version": "1.0.0",
-       "main": "index.js",
-       "dependencies": {
-               "string-format": "0.5.0"
-       }
+   "name": "my-action",
+   "main": "index.js",
+   "dependencies" : {
+   }
 }
diff --git 
a/tests/src/integration/validate-packages-in-manifest/actions/Hello.java 
b/tests/src/integration/validate-packages-in-manifest/actions/Hello.java
new file mode 100644
index 0000000..ab9630c
--- /dev/null
+++ b/tests/src/integration/validate-packages-in-manifest/actions/Hello.java
@@ -0,0 +1,32 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import com.google.gson.JsonObject;
+public class Hello {
+    private JsonObject response;
+
+    public static JsonObject main(JsonObject args) {
+        String name = "stranger";
+        if (args.has("name"))
+            name = args.getAsJsonPrimitive("name").getAsString();
+        JsonObject response = new JsonObject();
+        response.addProperty("greeting", "Hello " + name + "!");
+        System.out.println(response);
+        return response;
+    }
+}
+

-- 
To stop receiving notification emails like this one, please contact
[email protected].

Reply via email to