Skip to content
This repository was archived by the owner on Mar 8, 2020. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
91 commits
Select commit Hold shift + click to select a range
76f3829
Add WebSQL adapter to handle Safari (#1484)
Jul 6, 2017
ea1da4b
Command changes ed (#1483)
EdProsser Jul 6, 2017
e682b18
Automatic version bump to 0.9.2
fabric-composer-app Jul 6, 2017
ab17b39
homepage fixes (#1496)
Tobias-Hunter Jul 6, 2017
ba75648
Added footer to playground (#1478)
Jul 6, 2017
8424d76
Improve wallet service test coverage (#1506)
jt-nti Jul 6, 2017
9a0351f
Tests updated to get the code coverage; and defects fixed that it fou…
mbwhite Jul 6, 2017
f993330
Complete PersistentModel API tests (resolves #930) (#1511)
Jul 7, 2017
c5fdad2
composer-common/lib/introspect unit tests (#1507)
Jul 7, 2017
a573928
Event validation (#1508)
Jul 7, 2017
1149319
PR for #796 (#1434)
bestbeforetoday Jul 7, 2017
e9be2ab
Added svg transformation when showing event (#1512)
Jul 10, 2017
fa843ff
Changed Github to GitHub (#1520)
Jul 10, 2017
6db781e
Issue 1332 - Enable query support in playground. (#1519)
KaiUsher Jul 10, 2017
30af048
Only deploy for tagged/release builds and the master branch (#1523)
Jul 10, 2017
8c28c1f
Enable complex queries against nested properties (#1524)
Jul 10, 2017
906a740
update validation notes for query (#1528)
KaiUsher Jul 11, 2017
f5fc034
Styling changes to README & typography fixes (#1532)
Tobias-Hunter Jul 11, 2017
7e6c956
Move to Hyperledger Fabric v1.0.0 (npm dependencies, system tests) (#…
Jul 11, 2017
e614ac0
Remove double scroll bar (#1527)
Jul 12, 2017
7a38ff6
Fix ability to issue identity to none existent participant (#1526)
Jul 12, 2017
b1c4e0d
Prevent identifying fields in transaction and event model (#1517) (#1…
Jul 12, 2017
eaf0b35
Updated tutorial guide, minor fixes to cmdline , package.json instruc…
Jul 12, 2017
36ddbf6
Use workaround for jekyll issue #6221 (#1551)
Jul 13, 2017
37de3c5
Merge PRs 1548 + 1550, pull e2e tests out into separate build (#1552)
Jul 13, 2017
c23276f
Automatic version bump to 0.9.3
fabric-composer-app Jul 13, 2017
1aafa37
Fix PouchDB version to v6.2.0 (#1558)
Jul 14, 2017
af75a0c
Ensure Composer module version is consistent for releases (#1559)
Jul 14, 2017
4d4913c
Common drawer component (#1562)
jt-nti Jul 14, 2017
a25cb7c
composer-common/lib/serializer unit tests (#1561)
Jul 14, 2017
ef358bb
Add outbound link tracking back to online playground button (#1564)
jt-nti Jul 14, 2017
f8bc6ea
Better error message (#1575)
davek-at-ibm Jul 17, 2017
860e859
Improve build performance (#1579)
Jul 17, 2017
ac21d86
Docs nav updates, file removal and overall cleanup (#1581)
winslet Jul 17, 2017
2067784
Table of Contents fix for Docs live urls (#1582)
winslet Jul 17, 2017
5417b3f
Feature system acls (#1580)
mbwhite Jul 17, 2017
8105f71
Identity registry (#1588)
Jul 18, 2017
509e9c0
Fix upload icon in file-import module (#1585)
jt-nti Jul 18, 2017
06dccb1
Fix backdrop animation (#1595)
jt-nti Jul 18, 2017
f2de434
Added version option to rest server (#1593)
Jul 18, 2017
79689df
Ubuntu pre reqs (#1598)
davek-at-ibm Jul 18, 2017
3193e1f
Runtime code for install and start (#1583)
davek-at-ibm Jul 18, 2017
4e4321b
Fix incorrectly compiled queries with dynamic limit/skip clauses (#1597)
Jul 18, 2017
2a0c8fb
Iss1471 (#1516)
samjsmith Jul 19, 2017
1e9a042
Remove system and abstract types from bna preview (#1602)
Jul 19, 2017
c4cdf3e
ACL Changes, Updates to Modelling Docs, Ongoing work on Diagnostics, …
EdProsser Jul 19, 2017
c2fcca1
Another ToC fix, RC -> v1.0, network start, runtime install, ACL addi…
EdProsser Jul 19, 2017
8401a82
Feature 921 (#1594)
fenglianxu Jul 20, 2017
d867656
remove bna files from composer-cli package (#1615)
davek-at-ibm Jul 20, 2017
6cfc5a3
20 july docs fixes (#1619)
winslet Jul 20, 2017
8edbb76
Automatic version bump to 0.10.1
fabric-composer-app Jul 20, 2017
b3e9951
Fixed type in query modal (#1624)
KaiUsher Jul 20, 2017
6da2143
Stabilise and Activate Protractor tests (#1625)
nklincoln Jul 20, 2017
8b24c53
issue #1174 fixes (#1629)
shacshar Jul 21, 2017
e94b9f7
minor doc fix (#1630)
davek-at-ibm Jul 21, 2017
f92f0bc
change logging & correct log statement level (#1604)
mbwhite Jul 21, 2017
5aec4f1
updates (#1634)
mbwhite Jul 21, 2017
119f6fe
JSDoc fixes for newConcept (#1633)
dselman Jul 21, 2017
90adc62
Filter out system transaction types in playground (#1644)
Jul 22, 2017
c431bbb
upgrade devDependency sinon (#1631)
aietcn Jul 23, 2017
aebbc98
Add composer identity list CLI command (#1642)
Jul 23, 2017
a502aa8
fixed network deploy output (#1647)
salmanbaset Jul 23, 2017
c7bd89c
Fix determinism errors (#1648)
Jul 24, 2017
be3beb6
Add IdCard to composer-common package (#1415) (#1641)
bestbeforetoday Jul 24, 2017
456eebb
Upgrade CLI Feature (#1643)
davek-at-ibm Jul 24, 2017
440d82c
Removing index index index, fixing community link, fixing API docs To…
EdProsser Jul 24, 2017
d4a4473
Fix import/export icons (#1638)
jt-nti Jul 24, 2017
5274211
Enable event subscription using WebSockets in the REST server (#1655)
Jul 25, 2017
476e733
Sort sample business networks - npm changes - Issue 1465 (#1542)
KaiUsher Jul 25, 2017
aac35a3
Issue 1639 - query validation (#1656)
dselman Jul 25, 2017
fa8004c
README.md File Editor (#1560) (#1574)
j-blandford Jul 25, 2017
15f71bd
Add TLS support for the REST server (#1665)
Jul 26, 2017
63cacf1
IdCard API changes (#1415) (#1663)
bestbeforetoday Jul 26, 2017
dbb4090
Docs and test docs changes, fixes, v1 changes in examples (#1664)
Jul 26, 2017
454affd
View Identity Cards (#1505)
cazfletch Jul 6, 2017
8d1d1a5
Update identities to master (#1554)
cazfletch Jul 13, 2017
d771650
Added editing of connection profiles to identities (#1521)
cazfletch Jul 13, 2017
fa4aba0
1413 id panel rework for id cards (#1571)
nklincoln Jul 15, 2017
1bfc070
Enable styled dropdown for Id panel (#1592)
nklincoln Jul 18, 2017
1a697bf
1428 remove (#1607)
joepavitt Jul 19, 2017
b16c1fa
Extract identity card component for use on login screen and (#1612)
jt-nti Jul 20, 2017
7099a6a
1415 import idcard prereqs (#1626)
jt-nti Jul 21, 2017
8ccc130
Add IdCard to composer-common package (#1651)
jt-nti Jul 24, 2017
ea5ed08
Add footer to login page (#1637)
jt-nti Jul 24, 2017
fd4e3eb
Update identities to master
Jul 26, 2017
8b4b86b
Update identities to master
Jul 26, 2017
3c8005b
Merge branch 'identities' into update-identities-v2
cazfletch Jul 26, 2017
3627081
Upgrade Documentation (#1666)
davek-at-ibm Jul 26, 2017
ac72154
Update identities to master
cazfletch Jul 6, 2017
9315944
Update identities to master
Jul 26, 2017
3f67499
Update identities to master
Jul 26, 2017
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,4 @@ packages/composer-runtime-hlfv1/vendor/gopkg.in/sourcemap.v1/
packages/composer-website/installers/fabric-dev-servers.zip
packages/composer-website/installers/hlfv*/fabric-dev-servers/

packages/composer-playground/e2e/downloads/*
packages/composer-playground/e2e/downloads/
30 changes: 2 additions & 28 deletions .travis/before-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,42 +4,16 @@
set -ev
set -o pipefail

# Download specific version of docker-compose
export DOCKER_COMPOSE_VERSION=1.11.2
sudo rm /usr/local/bin/docker-compose
curl -L https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-`uname -s`-`uname -m` > docker-compose
chmod +x docker-compose
sudo mv docker-compose /usr/local/bin
echo "Docker-compose version: "
docker-compose --version

# Update docker
sudo apt-get update
sudo apt-get remove docker docker-engine
sudo apt-get install linux-image-extra-$(uname -r) linux-image-extra-virtual
sudo apt-get install apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
sudo apt-get update
sudo apt-get install docker-ce
echo "Docker version: "
docker --version

# Install using pip as apt-get pulls the wrong version on Travis' trusty image
# python requests 2.9.2 is essential prereq for linkchecker

sudo pip install linkchecker
sudo pip install linkchecker --upgrade
sudo pip install requests==2.9.2
pip install linkchecker requests==2.9.2
linkchecker --version

# Grab the parent (root) directory.
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )/.." && pwd )"

npm install -g npm@4
npm install -g @alrra/travis-scripts

npm install -g asciify
npm install -g npm@4 lerna@2 @alrra/travis-scripts asciify


echo "ABORT_BUILD=false" > ${DIR}/build.cfg
Expand Down
4 changes: 2 additions & 2 deletions .travis/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@ fi
#exit 0;
#fi


# Use lerna bootstrap and not npm install; it's a lot faster in Travis.
cd ${DIR}
npm install 2>&1 | tee
lerna bootstrap 2>&1 | tee
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,8 @@ Suggested reading list is:

- [Introduction](https://hyperledger.github.io/composer/introduction/introduction.html)
- [Introduction Video](https://www.youtube.com/watch?v=fdFUsrsv5iw&t=23s)
- [Quick Start](https://hyperledger.github.io/composer/installing/quickstart.html)
- [Quick Start Video](https://www.youtube.com/watch?v=pEHBIfb_iqc&t=5s)
- [Tutorials](https://hyperledger.github.io/composer/tutorials/tutorialindex.html)
- [Quick Start](https://hyperledger.github.io/composer/installing/installing-index.html)
- [Tutorials](https://hyperledger.github.io/composer/tutorials/tutorials.html)

# Getting in touch

Expand Down
30 changes: 19 additions & 11 deletions contrib-notes/release-process/runtime-validation.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,26 +10,34 @@ A fresh virtualised image should be used where possible, to ensure that the proc
Cmd line Installation Verification (Mac OS X and Ubuntu). These test should be run following the instructions in the web pages.
_These should be run using the unstable releases of the code to validate what is going to be released is good_

This short output shows how to install and update the package.json of the getting started application to use the unstable versions. It replaces the procedure outlined in https://hyperledger.github.io/composer/installing/quickstart.html
This short output shows how to install and update the package.json of the getting started application to use the unstable versions and uses the Digital Property sample application as an indicative test of _unstable_. You

```bash
$ npm install -g composer-cli@unstable
<output redacted>
$ composer --version
composer-cli v0.5.2-20170313111819
composer-admin v0.5.2-20170313111819
composer-client v0.5.2-20170313111819
composer-common v0.5.2-20170313111819
composer-runtime-hlf v0.5.2-20170313111819
composer-connector-hlf v0.5.2-20170313111819

composer-cli v0.10.0-20170720064757
composer-admin v0.10.0-20170720064757
composer-client v0.10.0-20170720064757
composer-common v0.10.0-20170720064757
composer-runtime-hlf v0.10.0-20170720064757
composer-connector-hlf v0.10.0-20170720064757

# Execute the following 4 steps, to stand up a runtime Fabric
$ mkdir fabric-tools && cd fabric-tools
$ curl -O https://raw.githubusercontent.com/hyperledger/composer-tools/master/packages/fabric-dev-servers/fabric-dev-servers.zip
$./startFabric.sh # will remove containers that exist previously including dev-* containers
$./createComposerProfile.sh
$ cd # ie $HOME
#
$ git clone https://github.com/hyperledger/composer-sample-applications.git
<output redacted>
$ cd composer-sample-applications/packages/getting-started
$ cd composer-sample-applications/packages/digitalproperty-app
$ sed -i.ORIG 's/\("composer-.*".*\):.*"/\1:"unstable"/g' package.json
$ npm install --tag=unstable
$ npm test

$ npm run deployNetwork # will/should install a docker container suffixed with this 'unstable' composer release
$ docker ps -a # check the container version after the business network name eg digitalproperty-network
$ npm test # check the assets are bootstrapped / updated.
```

## New Feature Testing
Expand Down
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"lerna": "2.0.0-rc.4",
"lerna": "2.0.0",
"packages": [
"packages/*"
],
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"devDependencies": {
"colors": "^1.1.2",
"lerna": "^2.0.0-rc.4",
"lerna": "^2.0.0",
"licensecheck": "^1.3.0",
"moment": "^2.17.1",
"semver": "^5.3.0",
Expand Down Expand Up @@ -32,4 +32,4 @@
],
"author": "Hyperledger Composer",
"license": "Apache-2.0"
}
}
3 changes: 3 additions & 0 deletions packages/composer-admin/api.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,12 @@ class AdminConnection {
+ Promise getProfile(string)
+ Promise getAllProfiles()
+ Promise disconnect()
+ Promise install(BusinessNetworkIdentifier,Object)
+ Promise start(BusinessNetworkDefinition,Object)
+ Promise deploy(BusinessNetworkDefinition,Object)
+ Promise undeploy(string)
+ Promise update(BusinessNetworkDefinition)
+ Promise upgrade(BusinessNetworkIdentifier)
+ Promise ping()
+ Promise setLogLevel(any)
+ Promise getLogLevel()
Expand Down
6 changes: 6 additions & 0 deletions packages/composer-admin/changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@
#
# Note that the latest public API is documented using JSDocs and is available in api.txt.
#
Version 0.10.1 {a29c92b5be618f000f0e75ffa6840e4b} 2017-07-21
- added upgrade method.

Version 0.10.0 {3af411e8da53bb013ab9718ed5980c20} 2017-07-17
- added install and start method.

Version 0.9.1 {8b6c392e59b8ad38ea271315231ca0e5} 2017-06-30
- added getLogLevel & setLogLevel methods. added deployOptions to deploy method.

Expand Down
143 changes: 138 additions & 5 deletions packages/composer-admin/lib/adminconnection.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,13 @@
const ComboConnectionProfileStore = require('composer-common').ComboConnectionProfileStore;
const ConnectionProfileManager = require('composer-common').ConnectionProfileManager;
const EnvConnectionProfileStore = require('composer-common').EnvConnectionProfileStore;
const fs = require('fs');
const FSConnectionProfileStore = require('composer-common').FSConnectionProfileStore;
const Logger = require('composer-common').Logger;
const Util = require('composer-common').Util;
const uuid = require('uuid');

const fs = require('fs');
const LOG = Logger.getLog('AdminConnection');

/**
* This class creates an administration connection to a Hyperledger Composer runtime. The
Expand Down Expand Up @@ -89,7 +92,7 @@ class AdminConnection {
.then((securityContext) => {
this.securityContext = securityContext;
if (businessNetworkIdentifier) {
return this.connection.ping(this.securityContext);
return this.ping(this.securityContext);
}
});
}
Expand Down Expand Up @@ -205,6 +208,58 @@ class AdminConnection {
});
}

/**
* Installs the Hyperledger Composer runtime to the Hyperledger Fabric in preparation
* for the business network to be started. The connection mustbe connected for this method to succeed.
* You must pass the name of the business network that is defined in your archive that this
* runtime will be started with.
* @example
* // Install the Hyperledger Composer runtime
* var adminConnection = new AdminConnection();
* var businessNetworkDefinition = BusinessNetworkDefinition.fromArchive(myArchive);
* return adminConnection.install(businessNetworkDefinition.getName())
* .then(function(){
* // Business network definition installed
* })
* .catch(function(error){
* // Add optional error handling here.
* });
* @param {BusinessNetworkIdentifier} businessNetworkIdentifier - The name of business network which will be used to start this runtime.
* @param {Object} installOptions connector specific install options
* @return {Promise} A promise that will be fufilled when the business network has been
* deployed.
*/
install(businessNetworkIdentifier, installOptions) {
Util.securityCheck(this.securityContext);
return this.connection.install(this.securityContext, businessNetworkIdentifier, installOptions);
}

/**
* Starts a business network within the runtime previously installed to the Hyperledger Fabric with
* the same name as the business network to be started. The connection must be connected for this
* method to succeed.
* @example
* // Start a Business Network Definition
* var adminConnection = new AdminConnection();
* var businessNetworkDefinition = BusinessNetworkDefinition.fromArchive(myArchive);
* return adminConnection.start(businessNetworkDefinition)
* .then(function(){
* // Business network definition is started
* })
* .catch(function(error){
* // Add optional error handling here.
* });
* @param {BusinessNetworkDefinition} businessNetworkDefinition - The business network to start
* @param {Object} startOptions connector specific start options
* @return {Promise} A promise that will be fufilled when the business network has been
* deployed.
*/
start(businessNetworkDefinition, startOptions) {
Util.securityCheck(this.securityContext);
return this.connection.start(this.securityContext, businessNetworkDefinition, startOptions);
}


/**
* Deploys a new BusinessNetworkDefinition to the Hyperledger Fabric. The connection must
* be connected for this method to succeed.
Expand Down Expand Up @@ -274,6 +329,31 @@ class AdminConnection {
return this.connection.update(this.securityContext, businessNetworkDefinition);
}

/**
* Upgrades an existing business network's composer runtime to a later level.
* The connection must be connected for this method to succeed.
* @param {BusinessNetworkIdentifier} businessNetworkIdentifier - The name of business network whose runtime is to be upgraded.
* @return {Promise} A promise that will be fufilled when the composer runtime has been upgraded,
* or rejected otherwise.
* @example
* // Upgrade the Hyperledger Composer runtime
* var adminConnection = new AdminConnection();
* var businessNetworkDefinition = BusinessNetworkDefinition.fromArchive(myArchive);
* return adminConnection.upgrade(businessNetworkDefinition.getName())
* .then(function(){
* // Business network definition installed
* })
* .catch(function(error){
* // Add optional error handling here.
* });

* @memberof AdminConnection
*/
upgrade(businessNetworkIdentifier) {
Util.securityCheck(this.securityContext);
return this.connection.upgrade(this.securityContext, businessNetworkIdentifier);
}

/**
* Test the connection to the runtime and verify that the version of the
* runtime is compatible with this level of the node.js module.
Expand All @@ -291,8 +371,61 @@ class AdminConnection {
* been tested. The promise will be rejected if the version is incompatible.
*/
ping() {
const method = 'ping';
LOG.entry(method);
return this.pingInner()
.catch((error) => {
if (error.message.match(/ACTIVATION_REQUIRED/)) {
LOG.debug(method, 'Activation required, activating ...');
return this.activate()
.then(() => {
return this.pingInner();
});
}
throw error;
})
.then((result) => {
LOG.exit(method, result);
return result;
});
}

/**
* Test the connection to the runtime and verify that the version of the
* runtime is compatible with this level of the client node.js module.
* @private
* @return {Promise} A promise that will be fufilled when the connection has
* been tested. The promise will be rejected if the version is incompatible.
*/
pingInner() {
const method = 'pingInner';
LOG.entry(method);
Util.securityCheck(this.securityContext);
return this.connection.ping(this.securityContext);
return this.connection.ping(this.securityContext)
.then((result) => {
LOG.exit(method, result);
return result;
});
}

/**
* Activate the current identity on the currently connected business network.
* @private
* @return {Promise} A promise that will be fufilled when the connection has
* been tested. The promise will be rejected if the version is incompatible.
*/
activate() {
const method = 'activate';
LOG.entry(method);
const json = {
$class: 'org.hyperledger.composer.system.ActivateCurrentIdentity',
transactionId: uuid.v4(),
timestamp: new Date().toISOString()
};
return Util.invokeChainCode(this.securityContext, 'submitTransaction', ['default', JSON.stringify(json)])
.then(() => {
LOG.exit(method);
});
}

/**
Expand Down Expand Up @@ -373,7 +506,7 @@ class AdminConnection {
* @example
* // Import an identity into a profiles' wallet
* var adminConnection = new AdminConnection();
* return adminConnection.import('hlfv1', 'PeerAdmin', publicKey, privateKey)
* return adminConnection.importIdentity('hlfv1', 'PeerAdmin', publicKey, privateKey)
* .then(() => {
* // Identity imported
* console.log('identity imported successfully');
Expand All @@ -398,7 +531,7 @@ class AdminConnection {
return this.getProfile(connectionProfile);
})
.then((profileData) => {
return savedConnectionManager.importIdentity(profileData, id, publicKey, privateKey);
return savedConnectionManager.importIdentity(connectionProfile, profileData, id, publicKey, privateKey);
})
.catch((error) => {
throw new Error('failed to import identity. ' + error.message);
Expand Down
15 changes: 7 additions & 8 deletions packages/composer-admin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"postlint": "npm run licchk",
"licchk": "license-check",
"postlicchk": "npm run doc",
"doc": "jsdoc --pedantic --recurse -c jsdoc.conf"
"doc": "jsdoc --pedantic --recurse -c jsdoc.json"
},
"repository": {
"type": "git",
Expand All @@ -36,15 +36,14 @@
"eslint": "^3.17.1",
"jsdoc": "^3.4.3",
"license-check": "^1.1.5",
"mocha": "^3.2.0",
"nyc": "^10.1.2",
"sinon": "^1.17.7",
"sinon-as-promised": "^4.0.2"
"mocha": "^3.4.2",
"nyc": "^11.1.0",
"sinon": "^2.3.8"
},
"dependencies": {
"composer-common": "^0.10.1",
"composer-connector-hlf": "^0.10.1",
"composer-connector-hlfv1": "^0.10.1"
"composer-common": "0.10.1",
"composer-connector-hlf": "0.10.1",
"composer-connector-hlfv1": "0.10.1"
},
"license-check-config": {
"src": [
Expand Down
Loading