Skip to content

Commit 1c6852f

Browse files
authored
Add nodejs:14. (#4902)
1 parent 18bbac5 commit 1c6852f

File tree

6 files changed

+54
-68
lines changed

6 files changed

+54
-68
lines changed

ansible/files/runtimes.json

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,20 @@
7575
"attachmentName": "codefile",
7676
"attachmentType": "text/plain"
7777
}
78+
},
79+
{
80+
"kind": "nodejs:14",
81+
"default": false,
82+
"image": {
83+
"prefix": "openwhisk",
84+
"name": "action-nodejs-v14",
85+
"tag": "nightly"
86+
},
87+
"deprecated": false,
88+
"attached": {
89+
"attachmentName": "codefile",
90+
"attachmentType": "text/plain"
91+
}
7892
}
7993
],
8094
"python": [

core/controller/src/main/resources/apiv1swagger.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1891,10 +1891,10 @@
18911891
"blackbox",
18921892
"java:8",
18931893
"java:default",
1894-
"nodejs:6",
18951894
"nodejs:8",
18961895
"nodejs:10",
18971896
"nodejs:12",
1897+
"nodejs:14",
18981898
"nodejs:default",
18991899
"php:7.3",
19001900
"php:7.4",

docs/actions-nodejs.md

Lines changed: 15 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ and demonstrate how to bundle multiple JavaScript files and third party dependen
4343

4444
The CLI automatically infers the type of the action by using the source file extension.
4545
For `.js` source files, the action runs by using a Node.js runtime. You may specify
46-
the Node.js runtime to use by explicitly specifying the parameter `--kind nodejs:12`, `--kind nodejs:10`, `--kind nodejs:8`, or `--kind nodejs:6`
46+
the Node.js runtime to use by explicitly specifying the parameter `--kind nodejs:14`, `--kind nodejs:12`, `--kind nodejs:10`, or `--kind nodejs:8`.
4747

4848

4949
## Creating asynchronous actions
@@ -459,83 +459,33 @@ wsk action invoke my-action --result --param lines "[\"and now\", \"for somethin
459459

460460
## Reference
461461

462-
JavaScript actions can be executed in Node.js version 6, version 8 or version 10 environment.
462+
JavaScript actions can be executed in Node.js version 8, 10, 12 or 14.
463463
Currently actions are executed by default in a Node.js version 10 environment.
464464

465-
### Node.js version 6 environment
466-
The Node.js version 6.17.0 environment will be used for an action if the `--kind` flag is explicitly specified with a value of 'nodejs:6' when creating/updating the action.
467-
468-
The following packages are available to be used in the Node.js 6 environment:
469-
470-
- [apn v2.1.2](https://www.npmjs.com/package/apn) - A Node.js module for interfacing with the Apple Push Notification service.
471-
- [async v2.1.4](https://www.npmjs.com/package/async) - Provides functions for working with asynchronous functions.
472-
- [btoa v1.1.2](https://www.npmjs.com/package/btoa) - A port of the browser's btoa function.
473-
- [cheerio v0.22.0](https://www.npmjs.com/package/cheerio) - Fast, flexible & lean implementation of core jQuery designed specifically for the server.
474-
- [cloudant v1.6.2](https://www.npmjs.com/package/cloudant) - This is the official Cloudant library for Node.js.
475-
- [commander v2.9.0](https://www.npmjs.com/package/commander) - The complete solution for Node.js command-line interfaces.
476-
- [consul v0.27.0](https://www.npmjs.com/package/consul) - A client for Consul, involving service discovery and configuration.
477-
- [cookie-parser v1.4.3](https://www.npmjs.com/package/cookie-parser) - Parse Cookie header and populate req.cookies with an object keyed by the cookie names.
478-
- [cradle v0.7.1](https://www.npmjs.com/package/cradle) - A high-level, caching, CouchDB client for Node.js.
479-
- [errorhandler v1.5.0](https://www.npmjs.com/package/errorhandler) - Development-only error handler middleware.
480-
- [glob v7.1.1](https://www.npmjs.com/package/glob) - Match files by using patterns that the shell uses, like stars and stuff.
481-
- [gm v1.23.0](https://www.npmjs.com/package/gm) - GraphicsMagick and ImageMagick for Node.
482-
- [lodash v4.17.2](https://www.npmjs.com/package/lodash) - The Lodash library exported as Node.js modules.
483-
- [log4js v0.6.38](https://www.npmjs.com/package/log4js) - A conversion of the log4js framework designed to work with Node.
484-
- [iconv-lite v0.4.15](https://www.npmjs.com/package/iconv-lite) - Pure JS character encoding conversion
485-
- [marked v0.3.6](https://www.npmjs.com/package/marked) - A full-featured markdown parser and compiler, which is written in JavaScript. Built for speed.
486-
- [merge v1.2.0](https://www.npmjs.com/package/merge) - Merge multiple objects into one, optionally creating a new cloned object.
487-
- [moment v2.17.0](https://www.npmjs.com/package/moment) - A lightweight JavaScript date library for parsing, validating, manipulating, and formatting dates.
488-
- [mongodb v2.2.11](https://www.npmjs.com/package/mongodb) - The official MongoDB driver for Node.js.
489-
- [mustache v2.3.0](https://www.npmjs.com/package/mustache) - Mustache.js is an implementation of the mustache template system in JavaScript.
490-
- [nano v6.2.0](https://www.npmjs.com/package/nano) - Minimalistic CouchDB driver for Node.js.
491-
- [node-uuid v1.4.7](https://www.npmjs.com/package/node-uuid) - Deprecated UUID packaged.
492-
- [nodemailer v2.6.4](https://www.npmjs.com/package/nodemailer) - Send e-mails from Node.js – easy as cake!
493-
- [oauth2-server v2.4.1](https://www.npmjs.com/package/oauth2-server) - Complete, compliant, and well tested module for implementing an OAuth2 Server/Provider with express in Node.js.
494-
- [openwhisk v3.18.0](https://www.npmjs.com/package/openwhisk) - JavaScript client library for the OpenWhisk platform. Provides a wrapper around the OpenWhisk APIs.
495-
- [pkgcloud v1.4.0](https://www.npmjs.com/package/pkgcloud) - pkgcloud is a standard library for Node.js that abstracts away differences among multiple cloud providers.
496-
- [process v0.11.9](https://www.npmjs.com/package/process) - Require('process'); just like any other module.
497-
- [pug v2.0.0-beta6](https://www.npmjs.com/package/pug) - Implements the Pug templating language.
498-
- [redis v2.6.3](https://www.npmjs.com/package/redis) - This is a complete and feature-rich Redis client for Node.js.
499-
- [request v2.79.0](https://www.npmjs.com/package/request) - Request is the simplest way possible to make HTTP calls.
500-
- [request-promise v4.1.1](https://www.npmjs.com/package/request-promise) - The simplified HTTP request client 'request' with Promise support. Powered by Bluebird.
501-
- [rimraf v2.5.4](https://www.npmjs.com/package/rimraf) - The UNIX command rm -rf for node.
502-
- [semver v5.3.0](https://www.npmjs.com/package/semver) - Supports semantic versioning.
503-
- [sendgrid v4.7.1](https://www.npmjs.com/package/sendgrid) - Provides email support via the SendGrid API.
504-
- [serve-favicon v2.3.2](https://www.npmjs.com/package/serve-favicon) - Node.js middleware for serving a favicon.
505-
- [socket.io v1.6.0](https://www.npmjs.com/package/socket.io) - Socket.IO enables real-time bidirectional event-based communication.
506-
- [socket.io-client v1.6.0](https://www.npmjs.com/package/socket.io-client) - Client-side support for Socket.IO.
507-
- [superagent v3.0.0](https://www.npmjs.com/package/superagent) - SuperAgent is a small progressive client-side HTTP request library, and Node.js module with the same API, sporting many high-level HTTP client features.
508-
- [swagger-tools v0.10.1](https://www.npmjs.com/package/swagger-tools) - Tools that are related to working with Swagger, a way to document APIs.
509-
- [tmp v0.0.31](https://www.npmjs.com/package/tmp) - A simple temporary file and directory creator for Node.js.
510-
- [twilio v2.11.1](https://www.npmjs.com/package/twilio) - A wrapper for the Twilio API, related to voice, video, and messaging.
511-
- [underscore v1.8.3](https://www.npmjs.com/package/underscore) - Underscore.js is a utility-belt library for JavaScript that supports the usual functional suspects (each, map, reduce, filter...) without extending any core JavaScript objects.
512-
- [uuid v3.0.0](https://www.npmjs.com/package/uuid) - Simple, fast generation of RFC4122 UUIDS.
513-
- [validator v6.1.0](https://www.npmjs.com/package/validator) - A library of string validators and sanitizers.
514-
- [watson-developer-cloud v2.29.0](https://www.npmjs.com/package/watson-developer-cloud) - Node.js client library to use the Watson Developer Cloud services, a collection of APIs that use cognitive computing to solve complex problems.
515-
- [when v3.7.7](https://www.npmjs.com/package/when) - When.js is a rock solid, battle-tested Promises/A+ and when() implementation, including a complete ES6 Promise shim.
516-
- [winston v2.3.0](https://www.npmjs.com/package/winston) - A multi-transport async logging library for Node.js. "CHILL WINSTON! ... I put it in the logs."
517-
- [ws v1.1.1](https://www.npmjs.com/package/ws) - ws is a simple to use, blazing fast, and thoroughly tested WebSocket client and server implementation.
518-
- [xml2js v0.4.17](https://www.npmjs.com/package/xml2js) - Simple XML to JavaScript object converter. It supports bi-directional conversion.
519-
- [xmlhttprequest v1.8.0](https://www.npmjs.com/package/xmlhttprequest) - node-XMLHttpRequest is a wrapper for the built-in http client to emulate the browser XMLHttpRequest object.
520-
- [yauzl v2.7.0](https://www.npmjs.com/package/yauzl) - Yet another unzip library for node. For zipping.
521-
522465
### Node.js version 8 environment
523-
The Node.js version 8.15.1 environment is used if the `--kind` flag is explicitly specified with a value of 'nodejs:8' when creating or updating an Action.
466+
The Node.js version 8 environment is used if the `--kind` flag is explicitly specified with a value of 'nodejs:8' when creating or updating an Action.
524467

525468
The following packages are pre-installed in the Node.js version 8 environment:
526469

527-
- [openwhisk v3.18.0](https://www.npmjs.com/package/openwhisk) - JavaScript client library for the OpenWhisk platform. Provides a wrapper around the OpenWhisk APIs.
470+
- [openwhisk](https://www.npmjs.com/package/openwhisk) - JavaScript client library for the OpenWhisk platform. Provides a wrapper around the OpenWhisk APIs.
528471

529472
### Node.js version 10 environment
530-
The Node.js version 10.15.2 environment is used if the `--kind` flag is explicitly specified with a value of 'nodejs:10' when creating or updating an Action.
473+
The Node.js version 10 environment is used if the `--kind` flag is explicitly specified with a value of 'nodejs:10' when creating or updating an Action.
531474

532475
The following packages are pre-installed in the Node.js version 10 environment:
533476

534-
- [openwhisk v3.18.0](https://www.npmjs.com/package/openwhisk) - JavaScript client library for the OpenWhisk platform. Provides a wrapper around the OpenWhisk APIs.
477+
- [openwhisk](https://www.npmjs.com/package/openwhisk) - JavaScript client library for the OpenWhisk platform. Provides a wrapper around the OpenWhisk APIs.
535478

536479
### Node.js version 12 environment
537-
The Node.js version 12.0.0 environment is used if the `--kind` flag is explicitly specified with a value of 'nodejs:12' when creating or updating an Action.
480+
The Node.js version 12 environment is used if the `--kind` flag is explicitly specified with a value of 'nodejs:12' when creating or updating an Action.
481+
482+
The following packages are pre-installed in the Node.js version 12 environment:
483+
484+
- [openwhisk](https://www.npmjs.com/package/openwhisk) - JavaScript client library for the OpenWhisk platform. Provides a wrapper around the OpenWhisk APIs.
485+
486+
### Node.js version 14 environment
487+
The Node.js version 14 environment is used if the `--kind` flag is explicitly specified with a value of 'nodejs:14' when creating or updating an Action.
538488

539489
The following packages are pre-installed in the Node.js version 12 environment:
540490

541-
- [openwhisk v3.18.0](https://www.npmjs.com/package/openwhisk) - JavaScript client library for the OpenWhisk platform. Provides a wrapper around the OpenWhisk APIs.
491+
- [openwhisk](https://www.npmjs.com/package/openwhisk) - JavaScript client library for the OpenWhisk platform. Provides a wrapper around the OpenWhisk APIs.

docs/concurrency.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Concurrent activation processing within the same action container can be enabled
2929

3030
* enable the akka http client at invoker config
3131
* e.g. CONFIG_whisk_containerPool_akkaClient=true
32-
* use a kind that supports concurrency (currently only `nodejs:12`, `nodejs:10`, `nodejs:8` and `nodejs:6`)
32+
* use a kind that supports concurrency (currently only `nodejs:14`, `nodejs:12`, `nodejs:10`, and `nodejs:8`)
3333
* enable concurrency at runtime container env (nodejs container only allows concurrency when started with an env var __OW_ALLOW_CONCURRENT=true)
3434
* e.g. CONFIG_whisk_containerFactory_containerArgs_extraArgs_env_0="__OW_ALLOW_CONCURRENT=true"
3535
* disable log collection at invoker
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
/*
2+
* Licensed to the Apache Software Foundation (ASF) under one or more
3+
* contributor license agreements. See the NOTICE file distributed with
4+
* this work for additional information regarding copyright ownership.
5+
* The ASF licenses this file to You under the Apache License, Version 2.0
6+
* (the "License"); you may not use this file except in compliance with
7+
* the License. You may obtain a copy of the License at
8+
*
9+
* http://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS,
13+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
* See the License for the specific language governing permissions and
15+
* limitations under the License.
16+
*/
17+
18+
function main(args) {
19+
var str = args.delimiter + " ☃ " + args.delimiter;
20+
console.log(str);
21+
return { "winter": str };
22+
}

tools/actionProxy/invoke.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ def run(args):
133133
if args.verbose:
134134
print('Sending value: %s...' % json.dumps(value)[0:40])
135135
r = requests.post(containerRoute(args, 'run'), json = {"value": value})
136-
print(r.text)
136+
print(str(r.content, 'utf-8'))
137137

138138
def processPayload(payload):
139139
if payload and os.path.exists(payload):

0 commit comments

Comments
 (0)