Skip to content
This repository was archived by the owner on Jan 17, 2025. It is now read-only.

Commit 3cde510

Browse files
authored
Adapt project setup to ibm-functions org (#73)
* Update package info; update package name in docs and samples * Add npm deploy config
1 parent 48cc891 commit 3cde510

File tree

6 files changed

+27
-19
lines changed

6 files changed

+27
-19
lines changed

.travis.yml

+8
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,11 @@ before_install:
3030
- ./travis/scancode.sh
3131
before_script:
3232
- ./travis/setup.sh
33+
deploy:
34+
provider: npm
35+
36+
api_key:
37+
secure: lyftFmbsZ0S/kcAjf5nVR1W+a1IrtsSghQ7o9w6A7COTKNwBh1QNnF+yh8OL72Sc4/PgRiV4Z6Jg9ZFCt3bWd3tsRcXqTXXspFC/lHsj//0s6M+a0c9pFr/uhND0hWXrIkVr0VLXNPp/3LMORS7fzjKktx/yksivBcdGHj4SX4sz3wHI3uq6gfb9OQXWqcs7jBOgMClKFeqOLaDAFJzRf9DZFsV9z5Eq2MwCALaoXZBbbmNcq795fioHKnMLzMVlN16aWsuDyFxGn/LLMdlmgaDLiF0KITtLM1V9XNrEETurLD41TcNChlsBcsHA15Seg9bsiKU7PX7+s+kb55eB3Gg9wJYhXfND5OFh+DL3GT7tLPetXda8sHaCkoEKOEdy30HEqPYZLy7X2fYQj7Ety4sqhe6SRkPFYhuS6+r179B/0Xu+KF17y1VG7CWHwTEKotZOLF4TLOudJ9O7+rUI0xOlNXj7tAURjXY6OJ1DMAefpRcwM5xaC8/3OIimK7Ab3BZn4or1PwpzK5qQDnaI/350IAK9wDkLyyT1OFywq7xNyfgKhv5gIgjoYEBAdwNTjjMcrGaTyFxLSoo3SluXXMYy9H3FXfBwNJfbF8mfHf3K/U1IdjlJ4TxlEPoUvPSv1a5M2oswZwKeRM6Mqmal+P0tAJzOY2rsJxTtpwkeMpk=
38+
on:
39+
tags: true
40+
repo: ibm-functions/composer

README.md

+11-12
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@
1717
#
1818
-->
1919

20-
# Apache OpenWhisk Composer
20+
# @ibm-functions/composer
2121

22-
[![Travis](https://travis-ci.com/apache/openwhisk-composer.svg?branch=master)](https://travis-ci.com/apache/openwhisk-composer)
22+
[![Travis](https://travis-ci.org/ibm-functions/composer.svg?branch=master)](https://travis-ci.org/ibm-functions/composer)
2323
[![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
2424
[![Join
2525
Slack](https://img.shields.io/badge/join-slack-9B69A0.svg)](http://slack.openwhisk.org/)
@@ -47,7 +47,7 @@ This repository includes:
4747
Composer is distributed as Node.js package. To install this package, use the
4848
Node Package Manager:
4949
```
50-
npm install -g openwhisk-composer
50+
npm install -g @ibm-functions/composer
5151
```
5252
We recommend installing the package globally (with `-g` option) if you intend to
5353
use the `compose` and `deploy` commands to compile and deploy compositions.
@@ -57,7 +57,7 @@ use the `compose` and `deploy` commands to compile and deploy compositions.
5757
A composition is typically defined by means of a JavaScript expression as
5858
illustrated in [samples/demo.js](samples/demo.js):
5959
```javascript
60-
const composer = require('openwhisk-composer')
60+
const composer = require('@ibm-functions/composer')
6161

6262
module.exports = composer.if(
6363
composer.action('authenticate', { action: function ({ password }) { return { value: password === 'abc123' } } }),
@@ -98,17 +98,17 @@ existing definitions.
9898
## Running a composition
9999

100100
The `demo` composition may be invoked like any action, for instance using the
101-
OpenWhisk CLI:
101+
[IBM Cloud CLI](https://cloud.ibm.com/docs/cli):
102102
```
103-
wsk action invoke demo -p password passw0rd
103+
ibmcloud fn action invoke demo -p password passw0rd
104104
```
105105
```
106106
ok: invoked /_/demo with id 09ca3c7f8b68489c8a3c7f8b68b89cdc
107107
```
108108
The result of this invocation is the result of the last action in the
109109
composition, in this case the `failure` action since the password in incorrect:
110110
```
111-
wsk activation result 09ca3c7f8b68489c8a3c7f8b68b89cdc
111+
ibmcloud fn activation result 09ca3c7f8b68489c8a3c7f8b68b89cdc
112112
```
113113
```json
114114
{
@@ -119,7 +119,7 @@ wsk activation result 09ca3c7f8b68489c8a3c7f8b68b89cdc
119119

120120
This invocation creates a trace, i.e., a series of activation records:
121121
```
122-
wsk activation list
122+
ibmcloud fn activation list
123123
```
124124
<pre>
125125
Datetime Activation ID Kind Start Duration Status Entity
@@ -211,9 +211,8 @@ combinators or the `async` combinator.
211211
# Installation from Source
212212

213213
To install composer from a source release, download the composer source code
214-
from the [Apache OpenWhisk
215-
Downloads](https://openwhisk.apache.org/downloads.html) page, rename the release
216-
tarball to `openwhisk-composer.tgz` and install it with command:
214+
from [our GitHub repo](https://github.com/ibm-functions/composer/releases),
215+
rename the release tarball to `composer.tgz` and install it with command:
217216
```shell
218-
npm install -g openwhisk-composer.tgz
217+
npm install -g composer.tgz
219218
```

docs/COMBINATORS.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -544,7 +544,7 @@ belongs to the same package as the composition, without having to specify the
544544
package name beforehand.
545545

546546
```javascript
547-
const composer = require('openwhisk-composer')
547+
const composer = require('@ibm-functions/composer')
548548

549549
function invoke (actionShortName) {
550550
return composer.let(

package.json

+5-4
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{
22
"license": "Apache-2.0",
3-
"name": "openwhisk-composer",
3+
"name": "@ibm-functions/composer",
44
"version": "0.12.0",
55
"description": "Composer is a new programming model for composing cloud functions built on Apache OpenWhisk.",
6-
"homepage": "https://github.com/apache/openwhisk-composer",
6+
"homepage": "https://github.com/ibm-functions/composer",
77
"main": "composer.js",
88
"scripts": {
99
"test": "standard && mocha"
@@ -17,13 +17,14 @@
1717
"client.js",
1818
"composer.js",
1919
"conductor.js",
20-
"fqn.js",
2120
"docs/*.md",
21+
"fqn.js",
22+
"ibmcloud-utils.js",
2223
"samples/"
2324
],
2425
"repository": {
2526
"type": "git",
26-
"url": "https://github.com/apache/openwhisk-composer.git"
27+
"url": "https://github.com/ibm-functions/composer.git"
2728
},
2829
"keywords": [
2930
"functions",

samples/demo.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
* limitations under the License.
1616
*/
1717

18-
const composer = require('openwhisk-composer')
18+
const composer = require('@ibm-functions/composer')
1919

2020
module.exports = composer.if(
2121
composer.action('authenticate', { action: function ({ password }) { return { value: password === 'abc123' } } }),

samples/retry.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
* limitations under the License.
1616
*/
1717

18-
const composer = require('openwhisk-composer')
18+
const composer = require('@ibm-functions/composer')
1919

2020
function generateEvenNumber (args) {
2121
const number = Math.floor(Math.random() * 10)

0 commit comments

Comments
 (0)