-
Notifications
You must be signed in to change notification settings - Fork 515
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
FAB-1084 Move MemberServices out of HFC
To support the new member service aka COP, MemberService.js has been moved to it's own directory, hfc-cop, so that it can be published as a separate npmjs package. This also required the remaining HFC code to be moved to a new directory, hfc. The build tasks were modified to run against both directories. The readthedocs files remain in the root fabric-node-sdk directory. FAB-1084 Patch set 1: Move hfc src to hfc directory and add hfc-cop directory. Patch set 2: Readme update in root. Patch set 3: Remove MemberServices and references in hfc and headless-tests. Pare down package.json in root which is needed to npm install test dependencies. Patch set 4: Update commit message. Patch set 5: Move FabricCOPImpl to hfc-cop. Patch set 6: Change root package.json to point to hfc and hfc-cop directories and remove relative path to hfc from hfc-cop FabricCOPImpl requires. Patch set 7: the following changes were made - use 'hfc' and 'hfc-cop' modules instead of relative paths so that each package's dependencies can be properly found by npm - added gulp watch for hfc-cop's dependencies in the hfc folder - added gulp watch to update installed hfc and hfc-cop modules from source code changes during development - set required node and npm versions to earlier - updated how User object is obtained in tests with test/unit/unit.js -> getSubmitter() - updated README with the new developer workflow Change-Id: I16c85d2e3b73dca883b56e106e35bf4fceb97a8b Signed-off-by: cdaughtr <[email protected]> Signed-off-by: Jim Zhang <[email protected]>
- Loading branch information
1 parent
68d7280
commit 1f08e84
Showing
64 changed files
with
376 additions
and
898 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,20 @@ | ||
coverage | ||
docs/gen | ||
node_modules/* | ||
hfc/node_modules/* | ||
hfc-cop/node_modules/* | ||
hfc-cop/lib/api.js | ||
hfc-cop/lib/utils.js | ||
hfc-cop/lib/Config.js | ||
hfc-cop/lib/Remote.js | ||
hfc-cop/lib/hash.js | ||
hfc-cop/lib/impl/* | ||
test/fixtures/src/github.com/example_cc/Dockerfile | ||
test/fixtures/src/github.com/marbles_cc/Dockerfile | ||
npm-shrinkwrap.json | ||
npm-debug.log | ||
tmp | ||
.project | ||
.DS_Store | ||
hfc/.DS_Store | ||
hfc-cop/.DS_Store |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
'use strict'; | ||
|
||
var gulp = require('gulp'); | ||
var debug = require('gulp-debug'); | ||
|
||
const DEPS = [ | ||
'hfc/lib/api.js', | ||
'hfc/lib/hash.js', | ||
'hfc/lib/utils.js', | ||
'hfc/lib/Config.js', | ||
'hfc/lib/Remote.js', | ||
'hfc/lib/impl/CryptoSuite_ECDSA_AES.js', | ||
'hfc/lib/impl/ecdsa/*', | ||
'hfc/lib/impl/FileKeyValueStore.js' | ||
]; | ||
|
||
gulp.task('cop', function() { | ||
return gulp.src(DEPS, { base: 'hfc/' }) | ||
.pipe(debug()) | ||
.pipe(gulp.dest('hfc-cop/')); | ||
}); | ||
|
||
module.exports.DEPS = DEPS; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
var gulp = require('gulp'), | ||
watch = require('gulp-watch'), | ||
debug = require('gulp-debug'), | ||
cop = require('./cop.js'); | ||
|
||
gulp.task('watch', function () { | ||
watch(cop.DEPS, { ignoreInitial: false, base: 'hfc/' }) | ||
.pipe(debug()) | ||
.pipe(gulp.dest('hfc-cop/')); | ||
|
||
watch([ | ||
'hfc/lib/**/*', | ||
'hfc-cop/lib/**/*' | ||
], { ignoreInitial: false, base: './' }) | ||
.pipe(debug()) | ||
.pipe(gulp.dest('node_modules')); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
## Hyperledger Fabric Client SDK for Node.js, Membership Services (aka `COP`) | ||
|
||
See hyperledger\fabric-sdk-node root README.md for more information. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"request-timeout" : 3000, | ||
"tcert-batch-size" : 10, | ||
"crypto-asymmetric-key-algo": "ECDSA", | ||
"crypto-hash-algo": "SHA3", | ||
"crypto-keysize": 384, | ||
"crypto-suite": "./impl/CryptoSuite_ECDSA_AES.js", | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
{ | ||
"name": "hfc-cop", | ||
"version": "0.0.1", | ||
"main": "./lib/FabricCOPImpl.js", | ||
"repository": { | ||
"type": "gerrit", | ||
"url": "http://gerrit.hyperledger.org/r/fabric-sdk-node" | ||
}, | ||
"engines": { | ||
"node": ">=4.5.0", | ||
"npm": ">=2.15.9" | ||
}, | ||
"engine-strict": true, | ||
"engineStrict": true, | ||
"dependencies": { | ||
"asn1": "https://github.com/mcavage/node-asn1", | ||
"elliptic": "^6.2.3", | ||
"fs-extra": ">=0.30.0 <0.31.0", | ||
"grpc": "^1.0.0", | ||
"js-sha3": "^0.5.1", | ||
"jsrsasign": "^6.2.2", | ||
"jssha": "^2.1.0", | ||
"nconf": "^0.8.4", | ||
"sjcl": "1.0.3", | ||
"sjcl-codec": "0.1.1", | ||
"tar-fs": "^1.13.0", | ||
"url": "^0.11.0", | ||
"util": "^0.10.3" | ||
}, | ||
"license": "Apache-2.0", | ||
"licenses": [{ | ||
"type": "Apache-2.0", | ||
"url": "https://github.com/hyperledger/fabric/blob/master/LICENSE" | ||
}] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
## Hyperledger Fabric Client SDK for Node.js | ||
|
||
See hyperledger\fabric-sdk-node root README.md for more information. |
File renamed without changes.
File renamed without changes.
Oops, something went wrong.