Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
dselman committed Mar 11, 2017
2 parents 4c4defa + 7c75409 commit 9442d0b
Show file tree
Hide file tree
Showing 30 changed files with 155 additions and 124 deletions.
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
"packages": [
"packages/*"
],
"version": "0.4.5"
"version": "0.5.0"
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
},
"name": "fabric-composer",
"description": "You must install [Lerna](https://lernajs.io) to build this multi-package repository.",
"version": "0.4.5",
"version": "0.5.0",
"main": "index.js",
"private": true,
"scripts": {
Expand Down
6 changes: 3 additions & 3 deletions packages/composer-admin/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "composer-admin",
"version": "0.4.5",
"version": "0.5.0",
"description": "Fabric Composer Admin, code that manages business networks deployed to Hyperledger Fabric",
"engines": {
"node": ">=6",
Expand Down Expand Up @@ -47,8 +47,8 @@
"sinon-as-promised": "^4.0.2"
},
"dependencies": {
"composer-common": "^0.4.5",
"composer-connector-hlf": "^0.4.5"
"composer-common": "^0.5.0",
"composer-connector-hlf": "^0.5.0"
},
"license-check-config": {
"src": [
Expand Down
8 changes: 4 additions & 4 deletions packages/composer-cli/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "composer-cli",
"version": "0.4.5",
"version": "0.5.0",
"description": "Fabric Composer command line interfaces (CLIs)",
"engines": {
"node": ">=6",
Expand Down Expand Up @@ -41,9 +41,9 @@
"sinon-as-promised": "^4.0.2"
},
"dependencies": {
"composer-admin": "^0.4.5",
"composer-client": "^0.4.5",
"composer-common": "^0.4.5",
"composer-admin": "^0.5.0",
"composer-client": "^0.5.0",
"composer-common": "^0.5.0",
"homedir": "^0.6.0",
"moment": "^2.17.1",
"npm-paths": "^0.1.3",
Expand Down
6 changes: 3 additions & 3 deletions packages/composer-client/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "composer-client",
"version": "0.4.5",
"version": "0.5.0",
"description": "The node.js client library for Fabric Composer, a development framework for Hyperledger Fabric",
"engines": {
"node": ">=6",
Expand Down Expand Up @@ -43,8 +43,8 @@
"logError": true
},
"dependencies": {
"composer-common": "^0.4.5",
"composer-connector-hlf": "^0.4.5",
"composer-common": "^0.5.0",
"composer-connector-hlf": "^0.5.0",
"uuid": "^3.0.0"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/composer-common/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "composer-common",
"version": "0.4.5",
"version": "0.5.0",
"description": "Fabric Composer Common, code that is common across client, admin and runtime.",
"engines": {
"node": ">=6",
Expand Down
8 changes: 4 additions & 4 deletions packages/composer-connector-embedded/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "composer-connector-embedded",
"version": "0.4.5",
"version": "0.5.0",
"description": "The embedded client connector for Fabric Composer",
"engines": {
"node": ">=6",
Expand Down Expand Up @@ -53,8 +53,8 @@
"watchify": "^3.7.0"
},
"dependencies": {
"composer-common": "^0.4.5",
"composer-runtime": "^0.4.5",
"composer-runtime-embedded": "^0.4.5"
"composer-common": "^0.5.0",
"composer-runtime": "^0.5.0",
"composer-runtime-embedded": "^0.5.0"
}
}
2 changes: 1 addition & 1 deletion packages/composer-connector-hlf/lib/hfcconnection.js
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ class HFCConnection extends Connection {
})
.then(() => {
return HFCUtil
.invokeChainCode(securityContext, 'undeploy', [businessNetworkIdentifier]);
.invokeChainCode(securityContext, 'undeployBusinessNetwork', []);
})
.then(() => {
try {
Expand Down
6 changes: 3 additions & 3 deletions packages/composer-connector-hlf/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "composer-connector-hlf",
"version": "0.4.5",
"version": "0.5.0",
"description": "The Hyperledger Fabric Client connector for Fabric Composer",
"engines": {
"node": ">=6",
Expand Down Expand Up @@ -41,8 +41,8 @@
"logError": true
},
"dependencies": {
"composer-common": "^0.4.5",
"composer-runtime-hlf": "^0.4.5",
"composer-common": "^0.5.0",
"composer-runtime-hlf": "^0.5.0",
"fs-extra": "^1.0.0",
"hfc": "^0.6.5",
"semver": "^5.3.0",
Expand Down
12 changes: 12 additions & 0 deletions packages/composer-connector-hlf/test/hfcconnection.js
Original file line number Diff line number Diff line change
Expand Up @@ -403,6 +403,18 @@ describe('HFCConnection', () => {
});
}).should.throw(/Business network id must be specified/);
});

it('should make the correct call to the runtime', () => {
connection = new HFCConnection(mockConnectionManager, 'testprofile', null, mockChain, connectOptions);
sandbox.stub(HFCUtil, 'invokeChainCode');

return connection.undeploy(mockSecurityContext, 'testnetwork')
.then(() => {
sinon.assert.calledOnce(HFCUtil.invokeChainCode);
sinon.assert.calledWith(HFCUtil.invokeChainCode, mockSecurityContext, 'undeployBusinessNetwork', []);
});

});
});

describe('#update', function() {
Expand Down
6 changes: 3 additions & 3 deletions packages/composer-connector-hlfv1/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "composer-connector-hlfv1",
"version": "0.4.5",
"version": "0.5.0",
"description": "The Hyperledger Fabric v1.x Client connector for Fabric Composer",
"engines": {
"node": ">=6",
Expand Down Expand Up @@ -42,8 +42,8 @@
"logError": true
},
"dependencies": {
"composer-common": "^0.4.5",
"composer-runtime-hlfv1": "^0.4.5",
"composer-common": "^0.5.0",
"composer-runtime-hlfv1": "^0.5.0",
"fabric-sdk-node": "davidkel/fabric-sdk-node#Tested020317",
"fs-extra": "^1.0.0",
"semver": "^5.3.0",
Expand Down
4 changes: 2 additions & 2 deletions packages/composer-connector-proxy/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "composer-connector-proxy",
"version": "0.4.5",
"version": "0.5.0",
"description": "The proxying client connector for Fabric Composer",
"engines": {
"node": ">=6",
Expand Down Expand Up @@ -54,7 +54,7 @@
"watchify": "^3.7.0"
},
"dependencies": {
"composer-common": "^0.4.5",
"composer-common": "^0.5.0",
"socket.io-client": "^1.7.2"
}
}
8 changes: 4 additions & 4 deletions packages/composer-connector-server/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "composer-connector-server",
"version": "0.4.5",
"version": "0.5.0",
"description": "The remote connector server for Fabric Composer",
"engines": {
"node": ">=6",
Expand Down Expand Up @@ -45,9 +45,9 @@
"logError": true
},
"dependencies": {
"composer-common": "^0.4.5",
"composer-connector-embedded": "^0.4.5",
"composer-connector-hlf": "^0.4.5",
"composer-common": "^0.5.0",
"composer-connector-embedded": "^0.5.0",
"composer-connector-hlf": "^0.5.0",
"serializerr": "^1.0.3",
"socket.io": "^1.7.2",
"uuid": "^3.0.1",
Expand Down
8 changes: 4 additions & 4 deletions packages/composer-connector-web/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "composer-connector-web",
"version": "0.4.5",
"version": "0.5.0",
"description": "The web client connector for Fabric Composer",
"engines": {
"node": ">=6",
Expand Down Expand Up @@ -63,8 +63,8 @@
"watchify": "^3.7.0"
},
"dependencies": {
"composer-common": "^0.4.5",
"composer-runtime": "^0.4.5",
"composer-runtime-web": "^0.4.5"
"composer-common": "^0.5.0",
"composer-runtime": "^0.5.0",
"composer-runtime-web": "^0.5.0"
}
}
6 changes: 3 additions & 3 deletions packages/composer-playground-api/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "composer-playground-api",
"version": "0.4.5",
"version": "0.5.0",
"description": "The REST API for the Fabric Composer Playground",
"engines": {
"node": ">=6",
Expand Down Expand Up @@ -59,8 +59,8 @@
},
"dependencies": {
"body-parser": "^1.16.1",
"composer-common": "^0.4.5",
"composer-connector-server": "^0.4.5",
"composer-common": "^0.5.0",
"composer-connector-server": "^0.5.0",
"dotenv": "^4.0.0",
"express": "^4.14.1",
"http-status": "^1.0.1",
Expand Down
18 changes: 9 additions & 9 deletions packages/composer-playground/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "composer-playground",
"version": "0.4.5",
"version": "0.5.0",
"description": "A test harness/UI for the web runtime container for Fabric Composer",
"engines": {
"node": ">=6",
Expand Down Expand Up @@ -73,8 +73,8 @@
},
"dependencies": {
"@ng-bootstrap/ng-bootstrap": "^1.0.0-alpha.20",
"composer-common": "^0.4.5",
"composer-playground-api": "^0.4.5",
"composer-common": "^0.5.0",
"composer-playground-api": "^0.5.0",
"express": "^4.14.0",
"file-saver": "^1.3.3",
"is-docker": "^1.1.0",
Expand Down Expand Up @@ -120,12 +120,12 @@
"browserfs": "^1.1.0",
"codelyzer": "^2.0.0-beta.4",
"codemirror": "^5.22.0",
"composer-admin": "^0.4.5",
"composer-client": "^0.4.5",
"composer-connector-proxy": "^0.4.5",
"composer-connector-web": "^0.4.5",
"composer-runtime": "^0.4.5",
"composer-runtime-web": "^0.4.5",
"composer-admin": "^0.5.0",
"composer-client": "^0.5.0",
"composer-connector-proxy": "^0.5.0",
"composer-connector-web": "^0.5.0",
"composer-runtime": "^0.5.0",
"composer-runtime-web": "^0.5.0",
"copy-webpack-plugin": "^4.0.1",
"core-js": "^2.4.1",
"css-loader": "^0.26.1",
Expand Down
4 changes: 2 additions & 2 deletions packages/composer-rest-server/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "composer-rest-server",
"version": "0.4.5",
"version": "0.5.0",
"description": "Fabric Composer REST server that uses the Fabric Composer LoopBack connector",
"engines": {
"node": ">=6",
Expand Down Expand Up @@ -43,7 +43,7 @@
"loopback": "^3.0.0",
"loopback-boot": "^2.6.5",
"loopback-component-explorer": "^4.1.0",
"loopback-connector-composer": "^0.4.5",
"loopback-connector-composer": "^0.5.0",
"serve-favicon": "^2.0.1",
"strong-error-handler": "^1.0.1",
"touch": "^1.0.0",
Expand Down
4 changes: 2 additions & 2 deletions packages/composer-runtime-embedded/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "composer-runtime-embedded",
"version": "0.4.5",
"version": "0.5.0",
"description": "The embedded runtime container for Fabric Composer",
"engines": {
"node": ">=6",
Expand Down Expand Up @@ -54,7 +54,7 @@
"logError": true
},
"dependencies": {
"composer-runtime": "^0.4.5",
"composer-runtime": "^0.5.0",
"dexie": "^1.5.1",
"fake-indexeddb": "^1.0.8",
"uuid": "^3.0.1"
Expand Down
4 changes: 2 additions & 2 deletions packages/composer-runtime-hlf/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "composer-runtime-hlf",
"version": "0.4.5",
"version": "0.5.0",
"description": "The Hyperledger Fabric runtime container for Fabric Composer",
"engines": {
"node": ">=6",
Expand All @@ -24,7 +24,7 @@
"license": "Apache-2.0",
"dependencies": {},
"devDependencies": {
"composer-runtime": "^0.4.5",
"composer-runtime": "^0.5.0",
"babel-polyfill": "^6.20.0",
"babel-preset-es2015": "^6.18.0",
"babelify": "^7.3.0",
Expand Down
4 changes: 2 additions & 2 deletions packages/composer-runtime-hlfv1/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "composer-runtime-hlfv1",
"version": "0.4.5",
"version": "0.5.0",
"description": "The Hyperledger Fabric v1.x runtime container for Fabric Composer",
"engines": {
"node": ">=6",
Expand All @@ -24,7 +24,7 @@
"license": "Apache-2.0",
"dependencies": {},
"devDependencies": {
"composer-runtime": "^0.4.5",
"composer-runtime": "^0.5.0",
"babel-polyfill": "^6.20.0",
"babel-preset-es2015": "^6.18.0",
"babelify": "^7.3.0",
Expand Down
4 changes: 2 additions & 2 deletions packages/composer-runtime-web/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "composer-runtime-web",
"version": "0.4.5",
"version": "0.5.0",
"description": "The web runtime container for Fabric Composer",
"engines": {
"node": ">=6",
Expand Down Expand Up @@ -63,7 +63,7 @@
"logError": true
},
"dependencies": {
"composer-runtime": "^0.4.5",
"composer-runtime": "^0.5.0",
"dexie": "^1.5.1",
"uuid": "^3.0.1"
}
Expand Down
11 changes: 6 additions & 5 deletions packages/composer-runtime/lib/context.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,15 +81,16 @@ class Context {
return this.getDataService().getCollection('$sysdata')
.then((collection) => {

// check if the network has been undeployed first. if is has throw exception.
if (collection.undeployed){
throw new Error('Network has already been undeployed');
}

LOG.debug(method, 'Getting business network archive from the $sysdata collection');
return collection.get('businessnetwork');
})
.then((object) => {

// check if the network has been undeployed first. if is has throw exception.
if (object.undeployed){
throw new Error('Network has already been undeployed');
}

LOG.debug(method, 'Looking in cache for business network', object.hash);
let businessNetworkDefinition = businessNetworkCache.get(object.hash);
if (businessNetworkDefinition) {
Expand Down
Loading

0 comments on commit 9442d0b

Please sign in to comment.